commit 38f584720725866acc251d24d821e34362bec665 Author: Calin Crisan Date: Sat Feb 18 21:10:05 2017 +0200 inital commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..ff6ab0c710 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +/output +/.auto.deps +/.config.cmd +/.config.old +/..config.tmp +/.config +*.depend +*.o +/*.patch +/*.diff +*.orig +*.rej +*~ +*.pyc +/.download +/.buildroot-ccache-* +*.img.gz diff --git a/COPYING b/COPYING new file mode 100644 index 0000000000..0c018b0395 --- /dev/null +++ b/COPYING @@ -0,0 +1,355 @@ +With the exceptions below, Buildroot is distributed under the terms of +the GNU General Public License, reproduced below; either version 2 of +the License, or (at your option) any later version. + +Some files in Buildroot contain a different license statement. Those +files are licensed under the license contained in the file itself. + +Buildroot also bundles patch files, which are applied to the sources +of the various packages. Those patches are not covered by the license +of Buildroot. Instead, they are covered by the license of the software +to which the patches are applied. When said software is available +under multiple licenses, the Buildroot patches are only provided under +the publicly accessible licenses. + +----------------------------------------------------------------- + + 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. + + + Copyright (C) + + 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. + + , 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. diff --git a/Config.in b/Config.in new file mode 100644 index 0000000000..9bc8e5193b --- /dev/null +++ b/Config.in @@ -0,0 +1,725 @@ +# + +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 config symbols for packages to check system gcc version +config BR2_HOST_GCC_VERSION + string + option env="HOST_GCC_VERSION" + +config BR2_HOST_GCC_AT_LEAST_4_6 + bool + default y if BR2_HOST_GCC_VERSION = "4 6" + +config BR2_HOST_GCC_AT_LEAST_4_7 + bool + default y if BR2_HOST_GCC_VERSION = "4 7" + select BR2_HOST_GCC_AT_LEAST_4_6 + +config BR2_HOST_GCC_AT_LEAST_4_8 + bool + default y if BR2_HOST_GCC_VERSION = "4 8" + select BR2_HOST_GCC_AT_LEAST_4_7 + +config BR2_HOST_GCC_AT_LEAST_4_9 + bool + default y if BR2_HOST_GCC_VERSION = "4 9" + select BR2_HOST_GCC_AT_LEAST_4_8 + +config BR2_HOST_GCC_AT_LEAST_5 + bool + default y if BR2_HOST_GCC_VERSION = "5" + select BR2_HOST_GCC_AT_LEAST_4_9 + +# 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) + - local URIs of the form file://absolutepath + - 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. + +config BR2_CCACHE_USE_BASEDIR + bool "Use relative paths" + default y + help + Allow ccache to convert absolute paths within the output + directory into relative paths. + + During the build, many -I include directives are given with + an absolute path. These absolute paths end up in the hashes + that are computed by ccache. Therefore, when you build from a + different directory, the hash will be different and the + cached object will not be used. + + To improve cache performance, set this option to y. This + allows ccache to rewrite absolute paths within the output + directory into relative paths. Note that only paths within + the output directory will be rewritten; therefore, if you + change BR2_HOST_DIR to point outside the output directory and + subsequently move it to a different location, this will lead + to cache misses. + + This option has as a result that the debug information in the + object files also has only relative paths. Therefore, make + sure you cd to the build directory before starting gdb. See + the section "COMPILING IN DIFFERENT DIRECTORIES" in the + ccache manual for more information. + +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_2015_05 + bool + default y + +config BR2_DEPRECATED_SINCE_2015_08 + bool + default y + +config BR2_DEPRECATED_SINCE_2015_11 + bool + default y + +config BR2_DEPRECATED_SINCE_2016_02 + bool + default y + +config BR2_DEPRECATED_SINCE_2016_05 + 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 + +choice + bool "build code with Stack Smashing Protection" + default BR2_SSP_ALL if BR2_ENABLE_SSP # legacy + depends on BR2_TOOLCHAIN_HAS_SSP + help + Enable stack smashing protection support using GCC's + -fstack-protector option family. + + 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. + +config BR2_SSP_NONE + bool "None" + help + Disable stack-smashing protection. + +config BR2_SSP_REGULAR + bool "-fstack-protector" + help + Emit extra code to check for buffer overflows, such as stack + smashing attacks. This is done by adding a guard variable to + functions with vulnerable objects. This includes functions + that call alloca, and functions with buffers larger than 8 + bytes. The guards are initialized when a function is entered + and then checked when the function exits. If a guard check + fails, an error message is printed and the program exits. + +config BR2_SSP_STRONG + bool "-fstack-protector-strong" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Like -fstack-protector but includes additional functions to be + protected - those that have local array definitions, or have + references to local frame addresses. + +comment "Stack Smashing Protection strong needs a toolchain w/ gcc >= 4.9" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_SSP_ALL + bool "-fstack-protector-all" + help + Like -fstack-protector except that all functions are + protected. This option might have a significant performance + impact on the compiled binaries. + +endchoice + +comment "Stack Smashing Protection needs a toolchain w/ SSP" + 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 _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 + of a specific package , 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 - - that exists in + BR2_GLOBAL_PATCH_DIR, if the directory + /// exists, then all + *.patch files in this directory will be applied. + + Otherwise, if the directory / 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 the toolchain wrapper and binutils patches) + and external toolchain backends (through the 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 diff --git a/Config.in.legacy b/Config.in.legacy new file mode 100644 index 0000000000..b9c2f004f9 --- /dev/null +++ b/Config.in.legacy @@ -0,0 +1,2258 @@ +# +# Config.in.legacy - support for backward compatibility +# +# When an existing Config.in symbol is removed, it should be added again in +# this file, and take appropriate action to approximate backward compatibility. +# This will make the transition for the user more convenient. +# +# When adding legacy symbols to this file, add them to the front. The oldest +# symbols will be removed again after about two years. +# +# The symbol should be copied as-is from the place where it was previously +# defined, but the help text should be removed or replaced with something that +# explains how to fix it. +# +# For bool options, the old symbol should select BR2_LEGACY, so that the user +# is informed at build-time about selected legacy options. +# If there is an equivalent (set of) new symbols, these should be select'ed by +# the old symbol for backwards compatibility. +# It is not possible to select an option that is part of a choice. In that +# case, the new option should use the old symbol as default. This requires a +# change outside of Config.in.legacy, and this should be clearly marked as such +# in a comment, so that removal of legacy options also include the removal of +# these external references. +# +# [Example: renaming a bool option that is part of a choice from FOO to BAR] +# original choice: +# choice +# prompt "Choose foobar" +# config BR2_FOO_1 +# bool "foobar 1" +# config BR2_FOO_2 +# bool "foobar 2" +# endchoice +# +# becomes: +# choice +# prompt "Choose foobar" +# default BR2_BAR_1 if BR2_FOO_1 # legacy +# default BR2_BAR_2 if BR2_FOO_2 # legacy +# config BR2_BAR_1 +# bool "foobar 1" +# config BR2_BAR_2 +# bool "foobar 2" +# endchoice +# +# and in Config.in.legacy: +# config BR2_FOO_1 +# bool "foobar 1 has been renamed" +# help +# +# # Note: BR2_FOO_1 is still referenced from package/foo/Config.in +# config BR2_FOO_2 +# bool "foobar 2 has been renamed" +# help +# +# # Note: BR2_FOO_2 is still referenced from package/foo/Config.in +# +# [End of example] +# +# For string options, it is not possible to directly select another symbol. In +# this case, a hidden wrap bool option has to be added, that defaults to y if +# the old string is not set at its default value. The wrap symbol should select +# BR2_LEGACY. +# If the original symbol has been renamed, the new symbol should use the value +# of the old symbol as default. Like for choice options, a comment should be +# added to flag that the symbol is still used in another file. +# +# [Example: renaming a string option from FOO to BAR] +# original symbol: +# config BR2_FOO_STRING +# string "Some foo string" +# +# becomes: +# config BR2_BAR_STRING +# string "Some bar string" +# default BR2_FOO_STRING if BR2_FOO_STRING != "" # legacy +# +# and in Config.in.legacy: +# config BR2_FOO_STRING +# string "The foo string has been renamed" +# help +# +# +# config BR2_FOO_STRING_WRAP +# bool +# default y if BR2_FOO_STRING != "" +# select BR2_LEGACY +# +# # Note: BR2_FOO_STRING is still referenced from package/foo/Config.in +# +# [End of example] + +config BR2_SKIP_LEGACY + bool + option env="SKIP_LEGACY" + +if !BR2_SKIP_LEGACY + +config BR2_LEGACY + bool + help + This option is selected automatically when your old .config uses an + option that no longer exists in current buildroot. In that case, the + build will fail. Look for config options which are selected in the + menu below: they no longer exist and should be replaced by something + else. + +# This comment fits exactly in a 80-column display +comment "Legacy detected: check the content of the menu below" + depends on BR2_LEGACY + +menu "Legacy config options" + +if BR2_LEGACY +comment "----------------------------------------------------" +comment "Your old configuration uses legacy options that no " +comment "longer exist in buildroot, as indicated in the menu " +comment "below. As long as these options stay selected, or in" +comment "case of string options are non-empty, the build " +comment "will fail. " +comment "* " +comment "Where possible, an automatic conversion from old to " +comment "new symbols has been performed. Before making any " +comment "change in this legacy menu, make sure to exit the " +comment "configuration editor a first time and save the " +comment "configuration. Otherwise, the automatic conversion " +comment "of symbols will be lost. " +comment "* " +comment "After this initial save, reopen the configuration " +comment "editor, inspect the options selected below, read " +comment "their help texts, and verify/update the new " +comment "configuration in the corresponding configuration " +comment "menus. When everything is ok, you can disable the " +comment "legacy options in the menu below. Once you have " +comment "disabled all legacy options, this text will " +comment "disappear and you will be able to start the build. " +comment "* " +comment "Note: at some point in the future, the oldest legacy" +comment "options will be removed, and configuration files " +comment "that still have those options set, will fail to " +comment "build, or run, in unpredictable ways. " +comment "----------------------------------------------------" +endif + +############################################################################### +comment "Legacy options removed in 2016.05" + +config BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL + bool "openvpn polarssl crypto backend removed" + select BR2_LEGACY + help + The OpenVPN polarssl crypto backend option has been removed. + Version from 2.3.10 onwards need polarssl >= 1.3.8 but aren't + compatible with mbedtls (polarssl) series 2.x which is the + version provided in buildroot. And both can't coexist. + It now uses OpenSSL as the only option. + + +config BR2_PACKAGE_NGINX_HTTP_SPDY_MODULE + bool "nginx http spdy module removed" + select BR2_LEGACY + select BR2_PACKAGE_NGINX_HTTP_V2_MODULE + help + The ngx_http_spdy_module has been superseded by the + ngx_http_v2_module since nginx v1.9.5. The + ngx_http_v2_module modules has been automatically selected + in your configuration. + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RTP + bool "gst1-plugins-bad rtp plugin moved to good" + select BR2_LEGACY + help + The rtp plugin has been moved from gst1-plugins-base to + gst1-plugins-good. + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPG123 + bool "gst1-plugins-bad mpg123 plugin moved to ugly" + select BR2_LEGACY + help + The mpg123 plugin has been moved from gst1-plugins-bad to + gst1-plugins-ugly. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC + bool "PowerPC Sourcery toolchain has been removed" + select BR2_LEGACY + help + The Sourcery CodeBench toolchain for the PowerPC + architecture has been removed, as it was very old, not + maintained, and causing numerous build failures with modern + userspace packages. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_POWERPC_E500V2 + bool "PowerPC Sourcery E500v2 toolchain has been removed" + select BR2_LEGACY + help + The Sourcery CodeBench toolchain for the PowerPC E500v2 + architecture has been removed, as it was very old, not + maintained, and causing numerous build failures with modern + userspace packages. + +config BR2_x86_i386 + bool "x86 i386 support removed" + select BR2_LEGACY + help + The support for the i386 processors of the x86 architecture + has been removed. + +config BR2_PACKAGE_QT5WEBKIT_EXAMPLES + bool "qt5webkit-examples package removed" + select BR2_LEGACY + help + The qt5webkit-examples package has been removed, since it + was removed from upstream starting from Qt 5.6. + +config BR2_PACKAGE_QT5QUICK1 + bool "qt5quick1 package removed" + select BR2_LEGACY + help + The qt5quick1 package has been removed, since it was removed + from upstream starting from Qt 5.6. + +config BR2_TARGET_UBOOT_CUSTOM_PATCH_DIR + bool "uboot custom patch dir removed" + select BR2_LEGACY + help + The uboot custom patch directory option has been removed. Use + the improved BR2_TARGET_UBOOT_PATCH option instead. + +config BR2_PACKAGE_XDRIVER_XF86_INPUT_VOID + bool "xf86-input-void removed" + select BR2_LEGACY + help + The xf86-input-void package has been removed, there's no need + for it in any modern (post-2007) xorg server. + +config BR2_KERNEL_HEADERS_3_17 + bool "kernel headers version 3.17.x are no longer supported" + select BR2_KERNEL_HEADERS_3_18 + select BR2_LEGACY + help + Version 3.17.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + As an alternative, version 3.18.x of the headers have been + automatically selected in your configuration. + +config BR2_GDB_VERSION_7_7 + bool "gdb 7.7 has been removed" + select BR2_LEGACY + help + The 7.7 version of gdb has been removed. Use a newer version + instead. + +config BR2_PACKAGE_FOOMATIC_FILTERS + bool "foomatic-filters" + select BR2_LEGACY + help + The foomatic-filters package was removed. + +config BR2_PACKAGE_SAMBA + bool "samba" + select BR2_LEGACY + help + The samba package was removed in favour of samba4 since the + 3.x series isn't supported by upstream any longer. + +config BR2_PACKAGE_KODI_WAVPACK + bool "wavpack" + select BR2_LEGACY + help + wavpack support was removed in favour of ffmpeg: + https://github.com/xbmc/xbmc/commit/7916902c9e6f7a523265594f3ad7f921f93f1cd4 + +config BR2_PACKAGE_KODI_RSXS + bool "rsxs support in Kodi was moved to an addon" + select BR2_LEGACY + select BR2_PACKAGE_KODI_SCREENSAVER_RSXS + help + rsxs support in Kodi was moved to an addon + +config BR2_PACKAGE_KODI_GOOM + bool "Goom support in Kodi was moved to an addon" + select BR2_LEGACY + select BR2_PACKAGE_KODI_VISUALISATION_GOOM + help + Goom support in Kodi was moved to an addon + +config BR2_PACKAGE_SYSTEMD_ALL_EXTRAS + bool "systemd all extras option has been removed" + select BR2_LEGACY + select BR2_PACKAGE_XZ + select BR2_PACKAGE_LIBGCRYPT + help + The systemd option to enable "all extras" has been + removed. To get the same features, the libgcrypt and xz + package should now be enabled. + +config BR2_GCC_VERSION_4_5_X + bool "gcc 4.5.x has been removed" + select BR2_LEGACY + help + The 4.5.x version of gcc has been removed. Use a newer + version instead. + +config BR2_PACKAGE_SQLITE_READLINE + bool "command-line editing support was updated" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + select BR2_LEGACY + help + This option was removed in favour of the sqlite package + deciding itself depending on the enabled packages whether + command-line editing should be enabled, it also also takes + libedit into account. + +############################################################################### +comment "Legacy options removed in 2016.02" + +config BR2_PACKAGE_DOVECOT_BZIP2 + bool "bzip2 support option has been removed" + select BR2_LEGACY + select BR2_PACKAGE_BZIP2 + help + Bzip2 support is built if the bzip2 package is selected. + +config BR2_PACKAGE_DOVECOT_ZLIB + bool "zlib support option has been removed" + select BR2_LEGACY + select BR2_PACKAGE_ZLIB + help + Zlib support is built if the zlib package is selected. + +config BR2_PACKAGE_E2FSPROGS_FINDFS + bool "e2fsprogs findfs option has been removed" + select BR2_LEGACY + help + This option attempted to enable findfs capabilities from + e2fsprogs but has not worked since July 2015 (due to + packaging changes). One can use BusyBox's findfs support or + enable the BR2_PACKAGE_UTIL_LINUX_FINDFS option. + +config BR2_PACKAGE_OPENPOWERLINK_DEBUG_LEVEL + bool "openpowerlink debug option has been removed" + select BR2_LEGACY + help + This option depends on BR2_ENABLE_DEBUG which should not be used + by packages anymore. + +config BR2_PACKAGE_OPENPOWERLINK_KERNEL_MODULE + bool "openpowerlink package has been updated" + select BR2_LEGACY + select BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB + help + openpowerlink kernel modules are built if the + kernel stack library is selected. + +config BR2_PACKAGE_OPENPOWERLINK_LIBPCAP + bool "openpowerlink package has been updated" + select BR2_LEGACY + select BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB + help + The user space support has been split in two part: + - a monolitic user space library + - a user spae deamon driver + +config BR2_LINUX_KERNEL_SAME_AS_HEADERS + bool "using the linux headers version for the kernel has been removed" + select BR2_LEGACY + help + The option to use the version of the kernel headers for the + kernel to build has been removed. + + There is now the converse, better-suited and more versatile + option to use the kernel version for the linux headers. + +config BR2_PACKAGE_CUPS_PDFTOPS + bool "Pdftops support has been removed from Cups" + select BR2_LEGACY + help + Pdftops support has been removed from the cups package + It is now part of the cups-filters package. + +config BR2_KERNEL_HEADERS_3_16 + bool "kernel headers version 3.16.x are no longer supported" + select BR2_KERNEL_HEADERS_3_18 + select BR2_LEGACY + help + Version 3.16.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + As an alternative, version 3.18.x of the headers have been + automatically selected in your configuration. + +config BR2_PACKAGE_PYTHON_PYXML + bool "python-pyxml package has been removed" + select BR2_LEGACY + help + PyXML is obsolete and its functionality is covered either via + native Python XML support or python-lxml package. + +# BR2_ENABLE_SSP is still referenced in Config.in (default in choice) +config BR2_ENABLE_SSP + bool "Stack Smashing protection now has different levels" + help + The protection offered by SSP can now be selected from different + protection levels. Be sure to review the SSP level in the build + options menu. + +config BR2_PACKAGE_DIRECTFB_CLE266 + bool "cle266 driver for directfb removed" + select BR2_LEGACY + help + The cle266 directfb driver support has been removed. + It doesn't build in the latest version and it's unlikely + anyone has any use for it. + +config BR2_PACKAGE_DIRECTFB_UNICHROME + bool "unichrome driver for directfb removed" + select BR2_LEGACY + help + The unichrome directfb driver support has been removed. + It doesn't build in the latest version and it's unlikely + anyone has any use for it. + +config BR2_PACKAGE_LIBELEMENTARY + bool "libelementary has been renamed to elementary" + select BR2_LEGACY + select BR2_PACKAGE_ELEMENTARY + help + The libelementary package has been renamed to match the upstream + name. + +config BR2_PACKAGE_LIBEINA + bool "libeina package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libeina is now provided by the efl package. + +config BR2_PACKAGE_LIBEET + bool "libeet package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libeet is now provided by the efl package. + +config BR2_PACKAGE_LIBEVAS + bool "libevas package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libevas is now provided by the efl package. + +config BR2_PACKAGE_LIBECORE + bool "libecore package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libecore is now provided by the efl package. + +config BR2_PACKAGE_LIBEDBUS + bool "libedbus package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libedbus is now provided by the efl package. + +config BR2_PACKAGE_LIBEFREET + bool "libefreet package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libefreet is now provided by the efl package. + +config BR2_PACKAGE_LIBEIO + bool "libeio package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libeio is now provided by the efl package. + +config BR2_PACKAGE_LIBEMBRYO + bool "libembryo package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libembryo is now provided by the efl package. + +config BR2_PACKAGE_LIBEDJE + bool "libedje package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libedje is now provided by the efl package. + +config BR2_PACKAGE_LIBETHUMB + bool "libethumb package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_EFL + help + With EFL 1.15, libethumb is now provided by the efl package. + +config BR2_PACKAGE_INFOZIP + bool "infozip option has been renamed to zip" + select BR2_LEGACY + select BR2_PACKAGE_ZIP + help + Info-Zip's Zip package has been renamed from infozip to zip, + to avoid ambiguities with Info-Zip's UnZip which has been added + in the unzip package. + +config BR2_BR2_PACKAGE_NODEJS_0_10_X + bool "nodejs 0.10.x option removed" + select BR2_LEGACY + select BR2_PACKAGE_NODEJS + help + nodejs 0.10.x option has been removed. 0.10.x is now + automatically chosen for ARMv5 architectures only and the latest + nodejs for all other supported architectures. The correct nodejs + version has been automatically selected in your configuration. + +config BR2_BR2_PACKAGE_NODEJS_0_12_X + bool "nodejs version 0.12.x has been removed" + select BR2_LEGACY + select BR2_PACKAGE_NODEJS + help + nodejs version 0.12.x has been removed. As an alternative, + the latest nodejs version has been automatically selected in + your configuration. + +config BR2_BR2_PACKAGE_NODEJS_4_X + bool "nodejs version 4.x has been removed" + select BR2_LEGACY + select BR2_PACKAGE_NODEJS + help + nodejs version 4.x has been removed. As an alternative, + the latest nodejs version has been automatically selected in + your configuration. + +############################################################################### +comment "Legacy options removed in 2015.11" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REAL + bool "gst1-plugins-bad real plugin has been removed" + select BR2_LEGACY + help + The real plugin from GStreamer 1 bad plugins has been + removed. + +config BR2_PACKAGE_MEDIA_CTL + bool "media-ctl package has been removed" + select BR2_LEGACY + select BR2_PACKAGE_LIBV4L + select BR2_PACKAGE_LIBV4L_UTILS + help + media-ctl source and developement have been moved to + v4l-utils since June 2014. For an up-to-date media-ctl + version select BR2_PACKAGE_LIBV4L and BR2_PACKAGE_LIBV4L_UTILS. + +config BR2_PACKAGE_SCHIFRA + bool "schifra package has been removed" + select BR2_LEGACY + help + Schifra package has been maked broken since 2014.11 release and + haven't been fixed since then. + +config BR2_PACKAGE_ZXING + bool "zxing option has been renamed" + select BR2_LEGACY + select BR2_PACKAGE_ZXING_CPP + help + ZXing no longer provides the cpp bindings, it has been renamed to + BR2_PACKAGE_ZXING_CPP which uses a new upstream. + +# Since FreeRDP has new dependencies, protect this legacy to avoid the +# infamous "unmet direct dependencies" kconfig error. +config BR2_PACKAGE_FREERDP_CLIENT + bool "freerdp client option renamed" + depends on BR2_PACKAGE_FREERDP + select BR2_LEGACY + select BR2_PACKAGE_FREERDP_CLIENT_X11 + +config BR2_PACKAGE_BLACKBOX + bool "blackbox package has been removed" + select BR2_LEGACY + help + Upstream is dead and the package has been deprecated for + some time. There are other alternative maintained WMs. + +config BR2_KERNEL_HEADERS_3_0 + bool "kernel headers version 3.0.x are no longer supported" + select BR2_KERNEL_HEADERS_3_2 + select BR2_LEGACY + help + Version 3.0.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + As an alternative, version 3.2.x of the headers have been + automatically selected in your configuration. + +config BR2_KERNEL_HEADERS_3_11 + bool "kernel headers version 3.11.x are no longer supported" + select BR2_KERNEL_HEADERS_3_12 + select BR2_LEGACY + help + Version 3.11.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + As an alternative, version 3.12.x of the headers have been + automatically selected in your configuration. + +config BR2_KERNEL_HEADERS_3_13 + bool "kernel headers version 3.13.x are no longer supported" + select BR2_KERNEL_HEADERS_3_14 + select BR2_LEGACY + help + Version 3.13.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + As an alternative, version 3.14.x of the headers have been + automatically selected in your configuration. + +config BR2_KERNEL_HEADERS_3_15 + bool "kernel headers version 3.15.x are no longer supported" + select BR2_KERNEL_HEADERS_3_18 + select BR2_LEGACY + help + Version 3.15.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + As an alternative, version 3.18.x of the headers have been + automatically selected in your configuration. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_ANDI + bool "DirectFB example df_andi has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_BLTLOAD + bool "DirectFB example df_bltload has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_CPULOAD + bool "DirectFB example df_cpuload has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_DATABUFFER + bool "DirectFB example df_databuffer has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_DIOLOAD + bool "DirectFB example df_dioload has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_DOK + bool "DirectFB example df_dok has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_DRIVERTEST + bool "DirectFB example df_drivertest has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_FIRE + bool "DirectFB example df_fire has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_FLIP + bool "DirectFB example df_flip has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_FONTS + bool "DirectFB example df_fonts has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_INPUT + bool "DirectFB example df_input has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_JOYSTICK + bool "DirectFB example df_joystick has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_KNUCKLES + bool "DirectFB example df_knuckles has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_LAYER + bool "DirectFB example df_layer has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX + bool "DirectFB example df_matrix has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_MATRIX_WATER + bool "DirectFB example df_matrix_water has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_NEO + bool "DirectFB example df_neo has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_NETLOAD + bool "DirectFB example df_netload has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_PALETTE + bool "DirectFB example df_palette has been removed" + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_PARTICLE + bool "DirectFB example df_particle has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_PORTER + bool "DirectFB example df_porter has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_STRESS + bool "DirectFB example df_stress has been removed" + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_TEXTURE + bool "DirectFB example df_texture has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO + bool "DirectFB example df_video has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_VIDEO_PARTICLE + bool "DirectFB example df_video_particle has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_DIRECTFB_EXAMPLES_WINDOW + bool "DirectFB example df_window has been removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_EXAMPLES + help + The per-DirectFB example options have been removed. The + BR2_PACKAGE_DIRECTFB_EXAMPLES option now installs all + examples. + +config BR2_PACKAGE_KOBS_NG + bool "kobs-ng was replaced by imx-kobs" + select BR2_LEGACY + select BR2_PACKAGE_IMX_KOBS + help + The outdated kobs-ng has been replaced by the Freescale- + maintained imx-kobs package. + +config BR2_PACKAGE_SAWMAN + bool "sawman package removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_SAWMAN + help + This option has been removed because the sawman package no + longer exists: it was merged inside DirectFB itself. This + feature can now be enabled using the + BR2_PACKAGE_DIRECTFB_SAWMAN option. + +config BR2_PACKAGE_DIVINE + bool "divine package removed" + select BR2_LEGACY + select BR2_PACKAGE_DIRECTFB_DIVINE + help + This option has been removed because the divine package no + longer exists: it was merged inside DirectFB itself. This + feature can now be enabled using the + BR2_PACKAGE_DIRECTFB_DIVINE option. + +############################################################################### +comment "Legacy options removed in 2015.08" + +config BR2_PACKAGE_KODI_PVR_ADDONS + bool "Kodi PVR addon was split" + select BR2_LEGACY + select BR2_PACKAGE_KODI_PVR_ARGUSTV + select BR2_PACKAGE_KODI_PVR_DVBLINK + select BR2_PACKAGE_KODI_PVR_DVBVIEWER + select BR2_PACKAGE_KODI_PVR_FILMON + select BR2_PACKAGE_KODI_PVR_HTS + select BR2_PACKAGE_KODI_PVR_IPTVSIMPLE + select BR2_PACKAGE_KODI_PVR_MEDIAPORTAL_TVSERVER + select BR2_PACKAGE_KODI_PVR_MYTHTV + select BR2_PACKAGE_KODI_PVR_NEXTPVR + select BR2_PACKAGE_KODI_PVR_NJOY + select BR2_PACKAGE_KODI_PVR_PCTV + select BR2_PACKAGE_KODI_PVR_STALKER + select BR2_PACKAGE_KODI_PVR_VBOX + select BR2_PACKAGE_KODI_PVR_VDR_VNSI + select BR2_PACKAGE_KODI_PVR_VUPLUS + select BR2_PACKAGE_KODI_PVR_WMC + help + Kodi PVR addon was split into seperate modules + +config BR2_BINUTILS_VERSION_2_23_2 + bool "binutils 2.23 option renamed" + select BR2_LEGACY + select BR2_BINUTILS_VERSION_2_23_X + help + The binutils version option has been renamed to match the + same patchlevel logic used by gcc. The new option is now + BR2_BINUTILS_VERSION_2_23_X. + +config BR2_BINUTILS_VERSION_2_24 + bool "binutils 2.24 option renamed" + select BR2_LEGACY + select BR2_BINUTILS_VERSION_2_24_X + help + The binutils version option has been renamed to match the + same patchlevel logic used by gcc. The new option is now + BR2_BINUTILS_VERSION_2_24_X. + +config BR2_BINUTILS_VERSION_2_25 + bool "binutils 2.25 option renamed" + select BR2_LEGACY + select BR2_BINUTILS_VERSION_2_25_X + help + The binutils version option has been renamed to match the + same patchlevel logic used by gcc. The new option is now + BR2_BINUTILS_VERSION_2_25_X. + +config BR2_PACKAGE_PERF + bool "perf option has been renamed" + select BR2_LEGACY + select BR2_LINUX_KERNEL_TOOL_PERF + help + The perf package has been moved as a Linux tools package, + and the option to enable it is now + BR2_LINUX_KERNEL_TOOL_PERF. + +config BR2_BINUTILS_VERSION_2_22 + bool "binutils 2.22 removed" + select BR2_LEGACY + help + Binutils 2.22 has been removed, using a newer version is + recommended. + +config BR2_PACKAGE_GPU_VIV_BIN_MX6Q + bool "gpu-viv-bin-mx6q" + select BR2_LEGACY + select BR2_PACKAGE_IMX_GPU_VIV + help + Vivante graphics libraries have been renamed to + BR2_PACKAGE_IMX_GPU_VIV to be aligned with upstream package + name. + +config BR2_PACKAGE_LIBSEMANAGE_PYTHON_BINDINGS + depends on BR2_PACKAGE_PYTHON + bool "libsemanage python bindings removed" + select BR2_LEGACY + help + This option has been removed, since the libsemanage Python + bindings on the target were not useful. + +config BR2_TARGET_UBOOT_NETWORK + bool "U-Boot custom network settings removed" + select BR2_LEGACY + help + U-Boot's custom network settings options have been removed. + +############################################################################### +comment "Legacy options removed in 2015.05" + +config BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_512_16K + bool "jffs2 16kB erasesize NAND flash option renamed" + select BR2_LEGACY + select BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_16K + help + The JFFS2 NAND flash options now longer include the page + size. + +config BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_2K_128K + bool "jffs2 128kB erasesize NAND flash option renamed" + select BR2_LEGACY + select BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_128K + help + The JFFS2 NAND flash options now longer include the page + size. + +config BR2_PACKAGE_MONO_20 + bool "2.0/3.5 .Net Runtime" + select BR2_LEGACY + help + This option no longer exists, all versions of the .Net + runtime are now installed. + +config BR2_PACKAGE_MONO_40 + bool "4.0 .Net Runtime" + select BR2_LEGACY + help + This option no longer exists, all versions of the .Net + runtime are now installed. + +config BR2_PACKAGE_MONO_45 + bool "4.5 .Net Runtime" + select BR2_LEGACY + help + This option no longer exists, all versions of the .Net + runtime are now installed. + +config BR2_CIVETWEB_WITH_LUA + bool "civetweb lua option renamed" + select BR2_LEGACY + select BR2_PACKAGE_CIVETWEB_WITH_LUA + help + civetweb's lua option has been renamed to + BR2_PACKAGE_CIVETWEB_WITH_LUA to be aligned with how other + packages name options. + +config BR2_PACKAGE_TIFF_TIFF2PDF + bool "tiff utility-specific option removed" + select BR2_LEGACY + select BR2_PACKAGE_TIFF_UTILITIES + help + utility-specific options have been removed in favour of + the new option BR2_PACKAGE_TIFF_UTILITIES. + +config BR2_PACKAGE_TIFF_TIFFCP + bool "tiff utility-specific option removed" + select BR2_LEGACY + select BR2_PACKAGE_TIFF_UTILITIES + help + utility-specific options have been removed in favour of + the new option BR2_PACKAGE_TIFF_UTILITIES. + +config BR2_LINUX_KERNEL_EXT_RTAI_PATCH + bool "RTAI patch file path has been removed" + select BR2_LEGACY + help + This option has never worked, so it has been removed. + +config BR2_TARGET_GENERIC_PASSWD_DES + bool "Encoding passwords with DES has been removed" + select BR2_LEGACY + help + Paswords can now only be encoded with either of md5, sha256 or sha512. + The default is md5, which is stronger that DES (but still pretty weak). + +config BR2_PACKAGE_GTK2_THEME_HICOLOR + bool "hicolor (default theme) is a duplicate" + select BR2_LEGACY + select BR2_PACKAGE_HICOLOR_ICON_THEME + help + The option was just a duplicate of hicolor icon theme. + +config BR2_PACKAGE_VALGRIND_PTRCHECK + bool "valgrind's PTRCheck was renamed to SGCheck" + select BR2_LEGACY + select BR2_PACKAGE_VALGRIND_SGCHECK + help + PTRCheck was renamed to SGCheck in valgrind + +############################################################################### +comment "Legacy options removed in 2015.02" + +config BR2_PACKAGE_LIBGC + bool "libgc package removed" + select BR2_LEGACY + select BR2_PACKAGE_BDWGC + help + libgc has been removed because we have the same package under a + different name, bdwgc. + +config BR2_PACKAGE_WDCTL + bool "util-linux' wdctl option has been renamed" + select BR2_LEGACY + select BR2_PACKAGE_UTIL_LINUX_WDCTL + help + util-linux' wdctl option has been renamed to BR2_PACKAGE_UTIL_LINUX_WDCTL + to be aligned with how the other options are named. + +config BR2_PACKAGE_UTIL_LINUX_ARCH + bool "util-linux' arch option has been removed" + select BR2_LEGACY + help + util-linux' arch was dropped in util-linux 2.23, in favor of + the coreutils version. + +config BR2_PACKAGE_UTIL_LINUX_DDATE + bool "util-linux' ddate option has been removed" + select BR2_LEGACY + help + util-linux' ddate was dropped in util-linux 2.23. + +config BR2_PACKAGE_RPM_BZIP2_PAYLOADS + bool "rpm's bzip2 payloads option has been removed" + select BR2_LEGACY + select BR2_PACKAGE_BZIP2 + help + The bzip2 payloads option rely entirely on the dependant package bzip2. + So, you need to select it to enable this feature. + +config BR2_PACKAGE_RPM_XZ_PAYLOADS + bool "rpm's xz payloads option has been removed" + select BR2_LEGACY + select BR2_PACKAGE_XZ + help + The xz payloads option rely entirely on the dependant package xz. + So, you need to select it to enable this feature. + +config BR2_PACKAGE_M4 + bool "m4 target package removed" + select BR2_LEGACY + help + The m4 target package has been removed, it's been + deprecated for some time now. + +config BR2_PACKAGE_FLEX_BINARY + bool "flex binary in target option removed" + select BR2_LEGACY + help + The flex binary in the target option has been removed. + It's been deprecated for some time now and is essentially a + development tool which isn't very useful in the target. + +config BR2_PACKAGE_BISON + bool "bison target package removed" + select BR2_LEGACY + help + The bison target package has been removed, it's been + deprecated for some time now and is essentially a development + tool which isn't very useful in the target. + +config BR2_PACKAGE_GOB2 + bool "gob2 target package removed" + select BR2_LEGACY + help + The gob2 target package has been removed, it's been + deprecated for some time now and was essentially useless + without a target toolchain. + +config BR2_PACKAGE_DISTCC + bool "distcc target package removed" + select BR2_LEGACY + help + The distcc target package has been removed, it's been + deprecated for some time now and was essentially useless + without a target toolchain. + +config BR2_PACKAGE_HASERL_VERSION_0_8_X + bool "haserl 0.8.x version removed" + select BR2_LEGACY + help + The 0.8.x version option for haserl has been removed since it + has been deprecated for some time now. + You should be able to use the 0.9.x version without issues. + +config BR2_PACKAGE_STRONGSWAN_TOOLS + bool "strongswan option has been removed" + select BR2_LEGACY + select BR2_PACKAGE_STRONGSWAN_PKI + select BR2_PACKAGE_STRONGSWAN_SCEP + help + The tools option has been removed upstream and the different tools + have been split between the pki and scep options, with others + deprecated. + +config BR2_PACKAGE_XBMC_ADDON_XVDR + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_ADDON_XVDR + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_PVR_ADDONS + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_PVR_ADDONS + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_ALSA_LIB + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_ALSA_LIB + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_AVAHI + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_AVAHI + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_DBUS + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_DBUS + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_LIBBLURAY + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_LIBBLURAY + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_GOOM + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_GOOM + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_RSXS + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_RSXS + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_LIBCEC + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_LIBCEC + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_LIBMICROHTTPD + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_LIBMICROHTTPD + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_LIBNFS + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_LIBNFS + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_RTMPDUMP + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_RTMPDUMP + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_LIBSHAIRPLAY + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_LIBSHAIRPLAY + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_LIBSMBCLIENT + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_LIBSMBCLIENT + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_LIBTHEORA + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_LIBTHEORA + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_LIBUSB + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_LIBUSB + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_LIBVA + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_LIBVA + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PACKAGE_XBMC_WAVPACK + bool "xbmc options have been renamed" + select BR2_LEGACY + select BR2_PACKAGE_KODI_WAVPACK + help + The XBMC media center project was renamed to Kodi entertainment center + +config BR2_PREFER_STATIC_LIB + bool "static library option renamed" + select BR2_LEGACY + help + The BR2_PREFER_STATIC_LIB was renamed to BR2_STATIC_LIBS. It + highlights the fact that the option no longer "prefers" + static libraries, but "enforces" static libraries (i.e + shared libraries are completely unused). + + Take care of updating the type of libraries you want under the + "Build options" menu. + +############################################################################### +comment "Legacy options removed in 2014.11" + +config BR2_x86_generic + bool "x86 generic variant has been removed" + select BR2_LEGACY + help + The generic x86 CPU variant has been removed. Use another + CPU variant instead. + +config BR2_GCC_VERSION_4_4_X + bool "gcc 4.4.x has been removed" + select BR2_LEGACY + help + The 4.4.x version of gcc has been removed. Use a newer + version instead. + +config BR2_sparc_sparchfleon + bool "sparchfleon CPU has been removed" + select BR2_LEGACY + help + The sparchfleon CPU was only supported in a patched gcc 4.4 + version. Its support has been removed in favor of the leon3 + CPU starting from gcc 4.8.x. + +config BR2_sparc_sparchfleonv8 + bool "sparchfleonv8 CPU has been removed" + select BR2_LEGACY + help + The sparchfleonv8 CPU was only supported in a patched gcc + 4.4 version. Its support has been removed in favor of the + leon3 CPU starting from gcc 4.8.x. + +config BR2_sparc_sparcsfleon + bool "sparcsfleon CPU has been removed" + select BR2_LEGACY + help + The sparcsfleon CPU was only supported in a patched gcc 4.4 + version. Its support has been removed in favor of the leon3 + CPU starting from gcc 4.8.x. + +config BR2_sparc_sparcsfleonv8 + bool "sparcsfleonv8 CPU has been removed" + select BR2_LEGACY + help + The sparcsfleonv8 CPU was only supported in a patched gcc + 4.4 version. Its support has been removed in favor of the + leon3 CPU starting from gcc 4.8.x. + +config BR2_PACKAGE_XLIB_LIBPCIACCESS + bool "xlib-libpciaccess option has been renamed" + depends on BR2_PACKAGE_XORG7 + select BR2_LEGACY + select BR2_PACKAGE_LIBPCIACCESS + help + libpciaccess neither depends on X11 nor Xlib. Thus the + package has been renamed BR2_PACKAGE_LIBPCIACCESS + +config BR2_PACKAGE_LINUX_FIRMWARE_XC5000 + bool "Xceive xc5000 option has been renamed" + select BR2_LEGACY + select BR2_PACKAGE_LINUX_FIRMWARE_XCx000 + help + The Xceive xc5000 option now also handles older firmwares from + Xceive (the xc4000 series), as well as new firmwares (the xc5000c) + from Cresta, who bought Xceive. + +config BR2_PACKAGE_LINUX_FIRMWARE_CXGB4 + bool "Chelsio T4 option has been renamed" + select BR2_LEGACY + select BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4 + help + The Chelsio T4 option BR2_PACKAGE_LINUX_FIRMWARE_CXGB4 + has been renamed to BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4 + to better account for the fact that a T5 variant exists. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_7 + bool "BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_7 has been renamed" + select BR2_LEGACY + help + The option BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_7 was + renamed to BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV_7. You must + select it in: + Target packages -> Hardware handling -> + Firmware -> linux-firmware -> WiFi firmware -> + iwlwifi 3160/726x revision to use (revision 7) + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_8 + bool "BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_8 has been renamed" + select BR2_LEGACY + help + The option BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160_7260_8 was + renamed to BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_REV_8. You must + select it in: + Target packages -> Hardware handling -> + Firmware -> linux-firmware -> WiFi firmware -> + iwlwifi 3160/726x revision to use (revision 8) + +############################################################################### +comment "Legacy options removed in 2014.08" + +config BR2_PACKAGE_LIBELF + bool "libelf has been removed" + select BR2_PACKAGE_ELFUTILS + select BR2_LEGACY + help + The libelf package provided an old version of the libelf library + and is deprecated. The libelf library is now provided by the + elfutils package. + +config BR2_KERNEL_HEADERS_3_8 + bool "kernel headers version 3.8.x are no longer supported" + select BR2_KERNEL_HEADERS_3_10 + select BR2_LEGACY + help + Version 3.8.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + As an alternative, version 3.10.x of the headers have been + automatically selected in your configuration. + +config BR2_PACKAGE_GETTEXT_TOOLS + bool "support for gettext-tools on target has been removed" + select BR2_LEGACY + help + The option to install the gettext utilities on the target + has been removed. This is not necessary as Buildroot is not + designed to provide a full development environment on the + target. gettext tools should be used on the build machine + instead. + +config BR2_PACKAGE_PROCPS + bool "procps has been replaced by procps-ng" + select BR2_PACKAGE_PROCPS_NG + select BR2_LEGACY + help + The procps package has been replaced by the equivalent procps-ng. + +config BR2_BINUTILS_VERSION_2_20_1 + bool "binutils 2.20.1 has been removed" + select BR2_LEGACY + help + The 2.20.1 version of binutils has been removed. Use a newer + version instead. + +config BR2_BINUTILS_VERSION_2_21 + bool "binutils 2.21 has been removed" + select BR2_LEGACY + help + The 2.21 version of binutils has been removed. Use a newer + version instead. + +config BR2_BINUTILS_VERSION_2_23_1 + bool "binutils 2.23.1 has been removed" + select BR2_LEGACY + help + The 2.23.1 version of binutils has been removed. Use a newer + version instead. + +config BR2_UCLIBC_VERSION_0_9_32 + bool "uclibc 0.9.32 has been removed" + select BR2_LEGACY + help + The 0.9.32 version of uClibc has been removed. Use a newer + version instead. + +config BR2_GCC_VERSION_4_3_X + bool "gcc 4.3.x has been removed" + select BR2_LEGACY + help + The 4.3.x version of gcc has been removed. Use a newer + version instead. + +config BR2_GCC_VERSION_4_6_X + bool "gcc 4.6.x has been removed" + select BR2_LEGACY + help + The 4.6.x version of gcc has been removed. Use a newer + version instead. + +config BR2_GDB_VERSION_7_4 + bool "gdb 7.4 has been removed" + select BR2_LEGACY + help + The 7.4 version of gdb has been removed. Use a newer version + instead. + +config BR2_GDB_VERSION_7_5 + bool "gdb 7.5 has been removed" + select BR2_LEGACY + help + The 7.5 version of gdb has been removed. Use a newer version + instead. + +config BR2_BUSYBOX_VERSION_1_19_X + bool "busybox version selection has been removed" + select BR2_LEGACY + help + The possibility of selecting the Busybox version has been + removed. Use the latest version provided by the Busybox + package instead. + +config BR2_BUSYBOX_VERSION_1_20_X + bool "busybox version selection has been removed" + select BR2_LEGACY + help + The possibility of selecting the Busybox version has been + removed. Use the latest version provided by the Busybox + package instead. + +config BR2_BUSYBOX_VERSION_1_21_X + bool "busybox version selection has been removed" + select BR2_LEGACY + help + The possibility of selecting the Busybox version has been + removed. Use the latest version provided by the Busybox + package instead. + +config BR2_PACKAGE_LIBV4L_DECODE_TM6000 + bool "decode_tm6000" + select BR2_PACKAGE_LIBV4L_UTILS + select BR2_LEGACY + help + This libv4l option has been deprecated and replaced by a single + option to build all the libv4l utilities. + +config BR2_PACKAGE_LIBV4L_IR_KEYTABLE + bool "ir-keytable" + select BR2_PACKAGE_LIBV4L_UTILS + select BR2_LEGACY + help + This libv4l option has been deprecated and replaced by a single + option to build all the libv4l utilities. + +config BR2_PACKAGE_LIBV4L_V4L2_COMPLIANCE + bool "v4l2-compliance" + select BR2_PACKAGE_LIBV4L_UTILS + select BR2_LEGACY + help + This libv4l option has been deprecated and replaced by a single + option to build all the libv4l utilities. + +config BR2_PACKAGE_LIBV4L_V4L2_CTL + bool "v4l2-ctl" + select BR2_PACKAGE_LIBV4L_UTILS + select BR2_LEGACY + help + This libv4l option has been deprecated and replaced by a single + option to build all the libv4l utilities. + +config BR2_PACKAGE_LIBV4L_V4L2_DBG + bool "v4l2-dbg" + select BR2_PACKAGE_LIBV4L_UTILS + select BR2_LEGACY + help + This libv4l option has been deprecated and replaced by a single + option to build all the libv4l utilities. + +############################################################################### +comment "Legacy options removed in 2014.05" + +config BR2_PACKAGE_EVTEST_CAPTURE + bool "evtest-capture support removed (dropped since evtest 1.31)" + select BR2_LEGACY + help + Support for evtest-capture has been removed (dropped from + evtest package since version 1.31), use evemu package + instead. + +config BR2_KERNEL_HEADERS_3_6 + bool "kernel headers version 3.6.x are no longer supported" + select BR2_KERNEL_HEADERS_3_10 + select BR2_LEGACY + help + Version 3.6.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + As an alternative, version 3.10.x of the headers have been + automatically selected in your configuration. + +config BR2_KERNEL_HEADERS_3_7 + bool "kernel headers version 3.7.x are no longer supported" + select BR2_KERNEL_HEADERS_3_10 + select BR2_LEGACY + help + Version 3.7.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + As an alternative, version 3.10.x of the headers have been + automatically selected in your configuration. + +config BR2_PACKAGE_VALA + bool "vala target package has been removed" + select BR2_LEGACY + help + The 'vala' target package has been removed since it has been + deprecated for more than four buildroot releases. + Note: the host vala package still exists. + +config BR2_TARGET_TZ_ZONELIST + default BR2_PACKAGE_TZDATA_ZONELIST if BR2_PACKAGE_TZDATA_ZONELIST != "" + +config BR2_PACKAGE_TZDATA_ZONELIST + string "tzdata: the timezone list option has been renamed" + help + The option BR2_PACKAGE_TZDATA_ZONELIST has been renamed to + BR2_TARGET_TZ_ZONELIST, and moved to the "System configuration" + menu. You'll need to select BR2_TARGET_TZ_INFO. + +config BR2_PACKAGE_TZDATA_ZONELIST_WRAP + bool + default y if BR2_PACKAGE_TZDATA_ZONELIST != "" + select BR2_LEGACY + +config BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE + bool "Lua command-line editing none has been renamed" + select BR2_LEGACY + help + The BR2_PACKAGE_LUA_INTERPRETER_EDITING_NONE option has been + renamed to BR2_PACKAGE_LUA_EDITING_NONE. You will have to select + it in the corresponding choice. + +config BR2_PACKAGE_LUA_INTERPRETER_READLINE + bool "Lua command-line editing using readline has been renamed" + select BR2_LEGACY + help + The BR2_PACKAGE_LUA_INTERPRETER_READLINE option has been + renamed to BR2_PACKAGE_LUA_READLINE. You will have to select + it in the corresponding choice. + +config BR2_PACKAGE_LUA_INTERPRETER_LINENOISE + bool "Lua command-line editing using linenoise has been renamed" + select BR2_LEGACY + help + The BR2_PACKAGE_LUA_INTERPRETER_LINENOISE option has been + renamed to BR2_PACKAGE_LUA_LINENOISE. You will have to select + it in the corresponding choice. + +config BR2_PACKAGE_DVB_APPS_UTILS + bool "dvb-apps utilities now built by default" + select BR2_LEGACY + help + The dvb-apps utilities are now always built when the dvb-apps + package is selected. + +config BR2_KERNEL_HEADERS_SNAP + bool "Local Linux snapshot support removed" + select BR2_LEGACY + help + Support for using a custom snapshot to install the Linux + kernel headers has been removed. + +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV + bool "/dev management by udev removed" + select BR2_LEGACY + help + The 'udev' package has been converted to a virtual package. + The providers for this feature are: 'eudev', 'systemd'. + + Therefore, if you are not using 'systemd' as init system, you + must choose 'Dynamic using eudev' in the '/dev management' + menu to get the same behaviour as in your old configuration. + + If you are using 'systemd', its internal implementation of + 'udev' will be used automatically. + + You must also check the packages depending on 'udev' are still + selected. + +config BR2_PACKAGE_UDEV + bool "udev is now a virtual package" + select BR2_LEGACY + select BR2_PACKAGE_HAS_UDEV + help + The 'udev' package has been converted to a virtual package. + The providers for this feature are: 'eudev', 'systemd'. + + Your old configuration refers to packages depending on 'udev', + either for build or at runtime. + + Check that a 'udev' provider is selected. If you are not using + 'systemd' as init system, 'eudev' should be selected, which is + the case if '/dev management' is set to 'Dynamic using eudev'. + + If you are using 'systemd', its internal implementation of 'udev' + is used. + +config BR2_PACKAGE_UDEV_RULES_GEN + bool "udev rules generation handled by provider" + select BR2_LEGACY + select BR2_PACKAGE_EUDEV if !BR2_INIT_SYSTEMD + select BR2_PACKAGE_EUDEV_RULES_GEN if !BR2_INIT_SYSTEMD + help + The 'udev' package has been converted to a virtual package. + The providers for this feature are: 'eudev', 'systemd'. + + If you are not using 'systemd' as init system, udev rules + generation will be handled by 'eudev'. Check that + '/dev management' is set to 'Dynamic using eudev' to get + the same behaviour as in your old configuration. + + If you are using 'systemd', it internal implementation of 'udev' + will generate the rules. + +config BR2_PACKAGE_UDEV_ALL_EXTRAS + bool "udev extras removed" + select BR2_LEGACY + help + The 'udev' package has been converted to a virtual package. + The providers for this feature are: 'eudev', 'systemd'. + + The option to enable the extra features of 'udev' (gudev, ...) + has been removed. These features are automatically enabled in + the 'udev' providers if the dependencies are selected. For + example, selecting 'libglib2' will trigger the build of gudev. + +config BR2_PACKAGE_XLIB_LIBPTHREAD_STUBS + bool "xlib-libpthread-stubs option has been renamed" + depends on BR2_PACKAGE_XORG7 + select BR2_LEGACY + select BR2_PACKAGE_LIBPTHREAD_STUBS + help + The pthread stubs neither depend on X11 nor Xlib. Thus the + package has been renamed BR2_PACKAGE_LIBPTHREAD_STUBS + +############################################################################### +comment "Legacy options removed in 2014.02" + +config BR2_sh2 + bool "sh2 support removed" + select BR2_LEGACY + help + Due to an inexistent user base and generally poor Linux + support, the support for the SH2 architecture was removed. + +config BR2_sh3 + bool "sh3 support removed" + select BR2_LEGACY + help + Due to an inexistent user base and generally poor Linux + support, the support for the SH3 architecture was removed. + +config BR2_sh3eb + bool "sh3eb support removed" + select BR2_LEGACY + help + Due to an inexistent user base and generally poor Linux + support, the support for the SH3eb architecture was removed. + +config BR2_KERNEL_HEADERS_3_1 + bool "kernel headers version 3.1.x are no longer supported" + select BR2_KERNEL_HEADERS_3_2 + select BR2_LEGACY + help + Version 3.1.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + As an alternative, version 3.2.x of the headers have been + automatically selected in your configuration. + +config BR2_KERNEL_HEADERS_3_3 + bool "kernel headers version 3.3.x are no longer supported" + select BR2_KERNEL_HEADERS_3_4 + select BR2_LEGACY + help + Version 3.3.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + As an alternative, version 3.4.x of the headers have been + automatically selected in your configuration. + +config BR2_KERNEL_HEADERS_3_5 + bool "kernel headers version 3.5.x are no longer supported" + select BR2_KERNEL_HEADERS_3_10 + select BR2_LEGACY + help + Version 3.5.x of the Linux kernel headers have been deprecated + for more than four buildroot releases and are now removed. + As an alternative, version 3.10.x of the headers have been + automatically selected in your configuration. + +config BR2_GDB_VERSION_7_2 + bool "gdb 7.2.x is no longer supported" + select BR2_GDB_VERSION_7_6 + select BR2_LEGACY + help + Version 7.2.x of gdb has been deprecated for more than four + buildroot releases and is now removed. As an alternative, gdb + 7.5.x has been automatically selected in your configuration. + +config BR2_GDB_VERSION_7_3 + bool "gdb 7.3.x is no longer supported" + select BR2_GDB_VERSION_7_6 + select BR2_LEGACY + help + Version 7.3.x of gdb has been deprecated for more than four + buildroot releases and is now removed. As an alternative, gdb + 7.5.x has been automatically selected in your configuration. + +config BR2_PACKAGE_CCACHE + bool "ccache target package has been removed" + select BR2_LEGACY + help + The 'ccache' target package has been removed since it has been + deprecated for more than four buildroot releases. + Note: using ccache for speeding up builds is still supported. + +config BR2_HAVE_DOCUMENTATION + bool "support for documentation on target has been removed" + select BR2_LEGACY + help + Support for documentation on target has been removed since it has + been deprecated for more than four buildroot releases. + +config BR2_PACKAGE_AUTOMAKE + bool "automake target package has been removed" + select BR2_LEGACY + help + The 'automake' target package has been removed since it has been + deprecated for more than four buildroot releases. + Note: the host automake still exists. + +config BR2_PACKAGE_AUTOCONF + bool "autoconf target package has been removed" + select BR2_LEGACY + help + The 'autoconf' target package has been removed since it has been + deprecated for more than four buildroot releases. + Note: the host autoconf still exists. + +config BR2_PACKAGE_XSTROKE + bool "xstroke has been removed" + select BR2_LEGACY + help + The 'xstroke' package has been removed since it has been + deprecated for more than four buildroot releases. + +config BR2_PACKAGE_LZMA + bool "lzma target package has been removed" + select BR2_LEGACY + help + The 'lzma' target package has been removed since it has been + deprecated for more than four buildroot releases. + Note: generating lzma-compressed rootfs images is still supported. + +config BR2_PACKAGE_TTCP + bool "ttcp has been removed" + select BR2_LEGACY + help + The 'ttcp' package has been removed since it has been + deprecated for more than four buildroot releases. + +config BR2_PACKAGE_LIBNFC_LLCP + bool "libnfc-llcp has been replaced by libllcp" + select BR2_LEGACY + select BR2_PACKAGE_LIBLLCP + help + The 'libnfc-llcp' package has been removed since upstream renamed + to 'libllcp'. We have added a new package for 'libllcp' and bumped + the version at the same time. + +config BR2_PACKAGE_MYSQL_CLIENT + bool "MySQL client renamed to MySQL" + select BR2_LEGACY + select BR2_PACKAGE_MYSQL + help + The option has been renamed BR2_PACKAGE_MYSQL + +config BR2_PACKAGE_SQUASHFS3 + bool "squashfs3 has been removed" + select BR2_LEGACY + select BR2_PACKAGE_SQUASHFS + help + The 'squashfs3' package has been removed since it has been + deprecated for more than four buildroot releases. Package + 'squashfs' (4) has been selected automatically as replacement. + +config BR2_TARGET_ROOTFS_SQUASHFS3 + bool "squashfs3 rootfs support has been removed" + select BR2_LEGACY + help + Together with the removal of the squashfs3 package, support + for squashfs3 root filesystems has been removed too. Squashfs + root filesystems will automatically use squashfs4 now. + +config BR2_PACKAGE_NETKITBASE + bool "netkitbase has been removed" + select BR2_LEGACY + help + The 'netkitbase' package has been removed since it has been + deprecated since 2012.11. This package provided 'inetd' + which is replaced by 'xinet' and 'ping' which is replaced by + 'busybox' or 'fping'. + +config BR2_PACKAGE_NETKITTELNET + bool "netkittelnet has been removed" + select BR2_LEGACY + help + The 'netkittelnet' package has been removed since it has + been deprecated since 2012.11. 'busybox' provides a telnet + client and should be used instead. + +config BR2_PACKAGE_LUASQL + bool "luasql has been replaced by luasql-sqlite3" + select BR2_PACKAGE_LUASQL_SQLITE3 + select BR2_LEGACY + help + The option has been renamed BR2_PACKAGE_LUASQL_SQLITE3. + +config BR2_PACKAGE_LUACJSON + bool "luacjson has been replaced by lua-cjson" + select BR2_PACKAGE_LUA_CJSON + select BR2_LEGACY + help + The option has been renamed BR2_PACKAGE_LUA_CJSON. + +############################################################################### +comment "Legacy options removed in 2013.11" + +config BR2_PACKAGE_LVM2_DMSETUP_ONLY + bool "lvm2's 'dmsetup only' option removed" + select BR2_LEGACY + help + The BR2_PACKAGE_LVM2_DMSETUP_ONLY was a negative option, which + led to problems with other packages that need the full lvm2 + suite. Therefore, the option has been replaced with the positive + BR2_PACKAGE_LVM2_STANDARD_INSTALL option. + +# Note: BR2_PACKAGE_LVM2_DMSETUP_ONLY is still referenced in package/lvm2/Config.in +# in order to automatically propagate old configs + +config BR2_PACKAGE_QT_JAVASCRIPTCORE + bool "qt javascriptcore option removed" + select BR2_LEGACY + help + The BR2_PACKAGE_QT_JAVASCRIPTCORE option was available to + force the activation or disabling of the JIT compiler in the + Qt Javascript interpreter. However, the JIT compiler is not + available for all architectures, so forcing its activation + does not always work. Moreover, Qt knows by itself for which + architectures JIT support is possible, and will + automatically enable it if possible. + + Therefore, this option was in fact useless, and causing + build problems when enabled on architectures for which the + JIT support was not available. It has been removed, and + there is no replacement: Qt will enable JIT at compile time + when possible. + +config BR2_PACKAGE_MODULE_INIT_TOOLS + bool "module-init-tools replaced by kmod" + select BR2_PACKAGE_KMOD + select BR2_PACKAGE_KMOD_TOOLS + select BR2_LEGACY + help + The 'module-init-tools' package has been removed, since it + has been depracated upstream and replaced by 'kmod'. + +config BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL + string "u-boot: the git repository URL option has been renamed" + help + The option BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL has + been renamed to BR2_TARGET_UBOOT_CUSTOM_REPO_URL. + +config BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL_WRAP + bool + default y if BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL != "" + select BR2_LEGACY + +# Note: BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL is still referenced from +# boot/uboot/Config.in + +config BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION + string "u-boot: the git repository version option has been renamed" + help + The option BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION has + been renamed to BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION. + +config BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION_WRAP + bool + default y if BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION != "" + select BR2_LEGACY + +# Note: BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION is still referenced from +# boot/uboot/Config.in + +config BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL + string "linux: the git repository URL option has been renamed" + help + The option BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL has + been renamed to + BR2_LINUX_KERNEL_CUSTOM_REPO_URL. + +config BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL_WRAP + bool + default y if BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL != "" + select BR2_LEGACY + +# Note: BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL is still referenced from +# linux/Config.in + +config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION + string "linux: the git repository version option has been renamed" + help + The option BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION has + been renamed to + BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION. + +config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION_WRAP + bool + default y if BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION != "" + select BR2_LEGACY + +# Note: BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION is still referenced from +# linux/Config.in + +############################################################################### +comment "Legacy options removed in 2013.08" + +config BR2_ARM_OABI + bool "ARM OABI support has been removed" + select BR2_LEGACY + help + The support for the ARM OABI was deprecated since a while, + and has been removed completely from Buildroot. It is also + deprecated in upstream gcc, since gcc 4.7. People should + switch to EABI instead, which should not be a problem as + long as you don't have pre-built OABI binaries in your + system that you can't recompile. + +config BR2_PACKAGE_DOSFSTOOLS_DOSFSCK + bool "dosfstools dosfsck renamed to fsck.fat" + select BR2_LEGACY + select BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT + help + dosfsck was renamed upstream to fsck.fat for consistency. + +config BR2_PACKAGE_DOSFSTOOLS_DOSFSLABEL + bool "dosfstools dosfslabel renamed to fatlabel" + select BR2_LEGACY + select BR2_PACKAGE_DOSFSTOOLS_FATLABEL + help + doslabel was renamed upstream to fatlabel for consistency. + +config BR2_PACKAGE_DOSFSTOOLS_MKDOSFS + bool "dosfstools mkdosfs renamed to mkfs.fat" + select BR2_LEGACY + select BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT + help + mkdosfs was renamed upstream to mkfs.fat for consistency. + +config BR2_ELF2FLT + bool "the elf2flt option has been renamed" + select BR2_LEGACY + help + The BR2_ELF2FLT option has been renamed to + BR2_PACKAGE_HOST_ELF2FLT due to the conversion of elf2flt to + the package infrastructure. + +config BR2_VFP_FLOAT + bool "the ARM VFP floating point option has been renamed" + select BR2_LEGACY + help + Due to a major refactoring of the floating-point handling of + the ARM architecture support, the BR2_VFP_FLOAT option has + been replaced with a choice of options that allows to select + between various VFP versions/capabilities. + +config BR2_PACKAGE_GCC_TARGET + bool "gcc on the target filesystem has been removed" + select BR2_LEGACY + help + The support for gcc in the target filesystem was deprecated + since a while, and has been removed completely from Buildroot. + See Buildroot's documentation for more explanations. + +config BR2_HAVE_DEVFILES + bool "development files in target filesystem has been removed" + select BR2_LEGACY + help + The installation of the development files in the target + filesystem was deprecated since a while, and has been removed + completely from Buildroot. + See Buildroot's documentation for more explanations. + +############################################################################### +comment "Legacy options removed in 2013.05" + +config BR2_PACKAGE_LINUX_FIRMWARE_RTL_8192 + bool "Realtek 8192 replaced by Realtek 81xx" + select BR2_LEGACY + select BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX + help + Now covers the whole Realtek 81xx familly: 8188/8192. + +config BR2_PACKAGE_LINUX_FIRMWARE_RTL_8712 + bool "Realtek 8712 replaced by Realtek 87xx" + select BR2_LEGACY + select BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX + help + Now covers the whole Realtek 87xx familly: 8712/8723. + +############################################################################### +comment "Legacy options removed in 2013.02" + +config BR2_sa110 + bool "sa110 ARM target switched to strongarm" + select BR2_LEGACY + select BR2_strongarm + help + The SA110 is the same as a generic StrongARM, it just differs + in speed, peripherals and cache. + +config BR2_sa1100 + bool "sa1100 ARM target switched to strongarm" + select BR2_LEGACY + select BR2_strongarm + help + The SA1100 is the same as a generic StrongARM, it just differs + in speed, peripherals and cache. + +config BR2_PACKAGE_GDISK + bool "gdisk has been replaced by gptfdisk" + select BR2_LEGACY + select BR2_PACKAGE_GPTFDISK + help + The option has been renamed BR2_PACKAGE_GPTFDISK. + +config BR2_PACKAGE_GDISK_GDISK + bool "gdisk tool from gdisk has been replaced by gdisk in gptfdisk" + select BR2_LEGACY + select BR2_PACKAGE_GPTFDISK + select BR2_PACKAGE_GPTFDISK_GDISK + help + The option has been renamed BR2_PACKAGE_GPTFDISK_GDISK. + +config BR2_PACKAGE_GDISK_SGDISK + bool "sgdisk tool from gdisk has been replaced by sgdisk in gptfdisk" + select BR2_LEGACY + select BR2_PACKAGE_GPTFDISK + select BR2_PACKAGE_GPTFDISK_SGDISK + help + The option has been renamed BR2_PACKAGE_GPTFDISK_SGDISK. + +config BR2_PACKAGE_GDB_HOST + bool "gdb for the host option has been renamed" + select BR2_PACKAGE_HOST_GDB + select BR2_LEGACY + help + Due to the conversion of gdb to the package infrastructure, + the BR2_PACKAGE_GDB_HOST option has been renamed + BR2_PACKAGE_HOST_GDB. + +config BR2_PACKAGE_DIRECTB_DITHER_RGB16 + bool "DirectFB RGB16 dithering option has been renamed" + select BR2_PACKAGE_DIRECTFB_DITHER_RGB16 + select BR2_LEGACY + help + The option has been renamed + BR2_PACKAGE_DIRECTFB_DITHER_RGB16. + +config BR2_PACKAGE_DIRECTB_TESTS + bool "DirectFB Tests option has been renamed" + select BR2_PACKAGE_DIRECTFB_TESTS + select BR2_LEGACY + help + The option has been renamed + BR2_PACKAGE_DIRECTFB_TESTS. + +############################################################################### +comment "Legacy options removed in 2012.11" + +config BR2_PACKAGE_CUSTOMIZE + bool "customize package has been removed" + select BR2_LEGACY + help + The 'customize' special package has been removed. Instead, + we recommend to create either your own packages, or use a + post-build script to customize your root filesystem. See + Buildroot's documentation for more details. + +config BR2_PACKAGE_XSERVER_xorg + bool "X.org modular server" + select BR2_LEGACY + select BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + help + The option has been renamed + BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR. + +config BR2_PACKAGE_XSERVER_tinyx + bool "KDrive / TinyX server" + select BR2_LEGACY + select BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE + help + The option has been renamed + BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE. + +config BR2_PACKAGE_PTHREAD_STUBS + bool "pthread-stubs option has been renamed" + select BR2_LEGACY + select BR2_PACKAGE_LIBPTHREAD_STUBS + help + For consistency reason, the pthread-stubs package has been + renamed to libpthread-stubs. + +############################################################################### +comment "Legacy options removed in 2012.08" + +config BR2_PACKAGE_GETTEXT_STATIC + bool "libgettext.a is now selected by BR2_PREFER_STATIC_LIB" + select BR2_LEGACY + help + To build a static gettext library, select BR2_PREFER_STATIC_LIB. + + +config BR2_PACKAGE_LIBINTL + bool "libintl" + select BR2_LEGACY + select BR2_PACKAGE_GETTEXT + help + libintl is now installed by selecting BR2_PACKAGE_GETTEXT. This now + only installs the library, not the executables. + +config BR2_PACKAGE_INPUT_TOOLS_EVTEST + bool "input-tools evtest is now a separate package evtest" + select BR2_LEGACY + select BR2_PACKAGE_EVTEST + help + The evtest program from input-tools is now a separate package. + +config BR2_BFIN_FDPIC + bool "BR2_BFIN_FDPIC is now BR2_BINFMT_FDPIC" + select BR2_BINFMT_FDPIC + select BR2_LEGACY + +config BR2_BFIN_FLAT + bool "BR2_BFIN_FLAT is now BR2_BINFMT_FLAT" + select BR2_BINFMT_FLAT + select BR2_LEGACY + +endmenu + +endif # !SKIP_LEGACY diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..5b89598552 --- /dev/null +++ b/Makefile @@ -0,0 +1,1015 @@ +# Makefile for buildroot +# +# Copyright (C) 1999-2005 by Erik Andersen +# Copyright (C) 2006-2014 by the Buildroot developers +# Copyright (C) 2014-2016 by the Buildroot developers +# +# 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 := 2016.05 + +# 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 + +# 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 option when building, e.g: +# make -j$((`getconf _NPROCESSORS_ONLN`+1)) +.NOTPARALLEL: + +# absolute path +TOPDIR := $(CURDIR) +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 help +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= 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 ' 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 +ifneq ($(BR2_CCACHE_DIR),) +BR_CACHE_DIR := $(BR2_CCACHE_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) + Q = +ifndef VERBOSE + VERBOSE = 1 +endif +export VERBOSE +else + 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 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 + +# Determine the userland we are running on. +# +# Note that, despite its name, we are not interested in the actual +# architecture name. This is mostly used to determine whether some +# of the binary tools (e.g. pre-built external toolchains) can run +# on the current host. So we need to know if the userland we're +# running on can actually run those toolchains. +# +# For example, a 64-bit prebuilt toolchain will not run on a 64-bit +# kernel if the userland is 32-bit (e.g. in a chroot for example). +# +# So, we extract the first part of the tuple the host gcc was +# configured to generate code for; we assume this is our userland. +# +export HOSTARCH := $(shell LC_ALL=C $(HOSTCC_NOCCACHE) -v 2>&1 | \ + sed -e '/^Target: \([^-]*\).*/!d' \ + -e 's//\1/' \ + -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/' ) + +HOSTCC_VERSION := $(shell $(HOSTCC_NOCCACHE) --version | \ + sed -n -r 's/^.* ([0-9]*)\.([0-9]*)\.([0-9]*)[ ]*.*/\1 \2/p') + +# For gcc >= 5.x, we only need the major version. +ifneq ($(firstword $(HOSTCC_VERSION)),4) +HOSTCC_VERSION := $(firstword $(HOSTCC_VERSION)) +endif + +# 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 LD +unexport AR +unexport CXX +unexport CPP +unexport RANLIB +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 := +PACKAGES_ALL := + +# 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) +else +export BR_NO_CCACHE +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 + +# Now we are sure we have all the packages scanned and defined. We now +# check for each package in the list of enabled packages, that all its +# dependencies are indeed enabled. +# +# Only trigger the check for default builds. If the user forces building +# a package, even if not enabled in the configuration, we want to accept +# it. +# +ifeq ($(MAKECMDGOALS),) + +define CHECK_ONE_DEPENDENCY +ifeq ($$($(2)_TYPE),target) +ifeq ($$($(2)_IS_VIRTUAL),) +ifneq ($$($$($(2)_KCONFIG_VAR)),y) +$$(error $$($(2)_NAME) is in the dependency chain of $$($(1)_NAME) that \ +has added it to its _DEPENDENCIES variable without selecting it or \ +depending on it from Config.in) +endif +endif +endif +endef + +$(foreach pkg,$(call UPPERCASE,$(PACKAGES)),\ + $(foreach dep,$(call UPPERCASE,$($(pkg)_FINAL_ALL_DEPENDENCIES)),\ + $(eval $(call CHECK_ONE_DEPENDENCY,$(pkg),$(dep))$(sep)))) + +endif + +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 $@ + +# Populating the staging with the base directories is handled by the skeleton package +$(STAGING_DIR): + @mkdir -p $(STAGING_DIR) + @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. +# - ld.so: a non-stripped dynamic linker library is needed for valgrind +# - 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* ld-*.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 \ + if [ -e "$${langdir}" ]; \ + then \ + grep -qx "$${langdir##*/}" $(LOCALE_WHITELIST) || rm -rf $$langdir; \ + fi \ + 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 $(TARGET_DIR)/usr/lib $(TARGET_DIR)/usr/libexec \ + \( -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 + +# Valgrind needs ld.so with enough information, so only strip +# debugging symbols. + find $(TARGET_DIR)/lib -type f -name 'ld-*.so*' | \ + xargs -r $(STRIPCMD) $(STRIP_STRIP_DEBUG) + test -f $(TARGET_DIR)/etc/ld.so.conf && \ + { echo "ERROR: we shouldn't have a /etc/ld.so.conf file"; exit 1; } || true + test -d $(TARGET_DIR)/etc/ld.so.conf.d && \ + { echo "ERROR: we shouldn't have a /etc/ld.so.conf.d directory"; exit 1; } || true + mkdir -p $(TARGET_DIR)/etc + ( \ + 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 --keep-dirlinks $(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) + @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) \ + -o $(GRAPHS_DIR)/$(@).dot + dot $(BR2_GRAPH_DOT_OPTS) -T$(BR_GRAPH_OUT) \ + -o $(GRAPHS_DIR)/$(@).$(BR_GRAPH_OUT) \ + $(GRAPHS_DIR)/$(@).dot + +graph-size: + $(Q)mkdir -p $(GRAPHS_DIR) + $(Q)$(TOPDIR)/support/scripts/size-stats --builddir $(BASE_DIR) \ + --graph $(GRAPHS_DIR)/graph-size.$(BR_GRAPH_OUT) \ + --file-size-csv $(GRAPHS_DIR)/file-size-stats.csv \ + --package-size-csv $(GRAPHS_DIR)/package-size-stats.csv + +check-dependencies: + @cd "$(CONFIG_DIR)"; \ + $(TOPDIR)/support/scripts/graph-depends -C + +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) \ + HOST_GCC_VERSION="$(HOSTCC_VERSION)" \ + 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. Alternatively, if a non-empty VARS variable is passed, +# only the variables matching the make pattern passed in VARS are +# displayed. +printvars: + @$(foreach V, \ + $(sort $(if $(VARS),$(filter $(VARS),$(.VARIABLES)),$(.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 $(BR2_EXTERNAL_FILE) + +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 ' - Build and install and all its dependencies' + @echo ' -source - Only download the source files for ' + @echo ' -extract - Extract sources' + @echo ' -patch - Apply patches to ' + @echo ' -depends - Build '\''s dependencies' + @echo ' -configure - Build up to the configure step' + @echo ' -build - Build up to the build step' + @echo ' -graph-depends - Generate a graph of '\''s dependencies' + @echo ' -dirclean - Remove build directory' + @echo ' -reconfigure - Restart the build from the configure step' + @echo ' -rebuild - Restart the build from the build step' +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 ' graph-size - generate stats of the filesystem size' + @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) + +#include docs/manual/manual.mk +#-include $(BR2_EXTERNAL)/docs/*/*.mk + +.PHONY: $(noconfig_targets) + +endif #umask diff --git a/Makefile.legacy b/Makefile.legacy new file mode 100644 index 0000000000..764cfcd117 --- /dev/null +++ b/Makefile.legacy @@ -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))) diff --git a/README.md b/README.md new file mode 100644 index 0000000000..125b0e0ad2 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +**thingOS** is a lightweight Linux OS for things. diff --git a/arch/Config.in b/arch/Config.in new file mode 100644 index 0000000000..be37481ac2 --- /dev/null +++ b/arch/Config.in @@ -0,0 +1,408 @@ +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" + # MMU support is set by the subarchitecture file, arch/Config.in.m68k + 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_sparc64 + bool "SPARC64" + select BR2_ARCH_IS_64 + 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= when +# building gcc (internal backend) or -mfpu= in the toolchain +# wrapper (external toolchain) +config BR2_GCC_TARGET_FPU + string + +# The value of this option will be passed as --with-float= when +# building gcc (internal backend) or -mfloat-abi= in the toolchain +# wrapper (external toolchain) +config BR2_GCC_TARGET_FLOAT_ABI + string + +# The value of this option will be passed as --with-mode= when +# building gcc (internal backend) or -m in the toolchain +# wrapper (external toolchain) +config BR2_GCC_TARGET_MODE + string + +# 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 || BR2_sparc64 +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 diff --git a/arch/Config.in.aarch64 b/arch/Config.in.aarch64 new file mode 100644 index 0000000000..34cd409a59 --- /dev/null +++ b/arch/Config.in.aarch64 @@ -0,0 +1,7 @@ +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 diff --git a/arch/Config.in.arc b/arch/Config.in.arc new file mode 100644 index 0000000000..7d341f3136 --- /dev/null +++ b/arch/Config.in.arc @@ -0,0 +1,77 @@ +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 + 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 diff --git a/arch/Config.in.arm b/arch/Config.in.arm new file mode 100644 index 0000000000..ee612f50c8 --- /dev/null +++ b/arch/Config.in.arm @@ -0,0 +1,488 @@ +# 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 + +config BR2_ARM_CPU_ARMV7M + 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_arm1136j_s + bool "arm1136j-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_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_arm11mpcore + bool "mpcore" + select BR2_ARM_CPU_HAS_ARM + select BR2_ARM_CPU_MAYBE_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_a17 + bool "cortex-A17" + 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_THUMB2 + select BR2_ARM_CPU_ARMV7M +config BR2_cortex_m4 + bool "cortex-M4" + select BR2_ARM_CPU_HAS_THUMB2 + select BR2_ARM_CPU_ARMV7M +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 + +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. + +config BR2_ARM_ENABLE_VFP + bool "Enable VFP extension support" + depends on BR2_ARM_CPU_MAYBE_HAS_VFPV2 + select BR2_ARM_CPU_HAS_VFPV4 if BR2_ARM_CPU_MAYBE_HAS_VFPV4 + select BR2_ARM_CPU_HAS_VFPV3 if BR2_ARM_CPU_MAYBE_HAS_VFPV3 + select BR2_ARM_CPU_HAS_VFPV2 if BR2_ARM_CPU_MAYBE_HAS_VFPV2 + help + For some CPU cores, the VFP extension is optional. Select + this option if you are certain your particular + implementation has VFP support and you want to use it. + +choice + prompt "Target ABI" + depends on BR2_arm || BR2_armeb + default BR2_ARM_EABIHF if BR2_ARM_CPU_HAS_VFPV2 + 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_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 + +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 + 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 + 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 + 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 + 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 + 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 + 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 + # Thumb-1 and VFP are not compatible + depends on BR2_ARM_SOFT_FLOAT + 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. + +comment "Thumb1 is not compatible with VFP" + depends on BR2_ARM_CPU_HAS_THUMB + depends on !BR2_ARM_SOFT_FLOAT + +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_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 "mpcore" if BR2_arm11mpcore && BR2_ARM_CPU_HAS_VFPV2 + default "mpcorenovfp" if BR2_arm11mpcore + 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-a17" if BR2_cortex_a17 + default "cortex-m3" if BR2_cortex_m3 + default "cortex-m4" if BR2_cortex_m4 + 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 diff --git a/arch/Config.in.bfin b/arch/Config.in.bfin new file mode 100644 index 0000000000..415fc890d8 --- /dev/null +++ b/arch/Config.in.bfin @@ -0,0 +1,107 @@ +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_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. diff --git a/arch/Config.in.m68k b/arch/Config.in.m68k new file mode 100644 index 0000000000..da06c3a9bb --- /dev/null +++ b/arch/Config.in.m68k @@ -0,0 +1,41 @@ +config BR2_ARCH + default "m68k" if BR2_m68k + +config BR2_ENDIAN + default "BIG" + +# symbols used to distinguish between m68k and coldfire +# for gcc multilib +config BR2_m68k_m68k + bool + +config BR2_m68k_cf + bool + +# coldfire variants will be added later +choice + prompt "Target CPU" + depends on BR2_m68k + default BR2_m68k_68040 + help + Specific CPU variant to use + +config BR2_m68k_68040 + bool "68040" + select BR2_m68k_m68k + select BR2_ARCH_HAS_MMU_MANDATORY + +config BR2_m68k_cf5208 + bool "5208" + select BR2_m68k_cf + select BR2_SOFT_FLOAT + +endchoice + +config BR2_GCC_TARGET_CPU + default "68040" if BR2_m68k_68040 + default "5208" if BR2_m68k_cf5208 + +config BR2_GCC_TARGET_ARCH + default "m68k" if BR2_m68k_m68k + default "cf" if BR2_m68k_cf diff --git a/arch/Config.in.microblaze b/arch/Config.in.microblaze new file mode 100644 index 0000000000..2d4c1fec43 --- /dev/null +++ b/arch/Config.in.microblaze @@ -0,0 +1,11 @@ +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 diff --git a/arch/Config.in.mips b/arch/Config.in.mips new file mode 100644 index 0000000000..fda1a1d7e7 --- /dev/null +++ b/arch/Config.in.mips @@ -0,0 +1,85 @@ +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: 64, 64r2, 64r6 + non-64bit capable: 32, 32r2, 32r6 + +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_32r6 + bool "mips 32r6" + 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 +config BR2_mips_64r6 + bool "mips 64r6" + 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_GCC_TARGET_ARCH + default "mips32" if BR2_mips_32 + default "mips32r2" if BR2_mips_32r2 + default "mips32r6" if BR2_mips_32r6 + default "mips64" if BR2_mips_64 + default "mips64r2" if BR2_mips_64r2 + default "mips64r6" if BR2_mips_64r6 + +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 diff --git a/arch/Config.in.nios2 b/arch/Config.in.nios2 new file mode 100644 index 0000000000..ed638981aa --- /dev/null +++ b/arch/Config.in.nios2 @@ -0,0 +1,5 @@ +config BR2_ARCH + default "nios2" + +config BR2_ENDIAN + default "LITTLE" diff --git a/arch/Config.in.powerpc b/arch/Config.in.powerpc new file mode 100644 index 0000000000..09ac794d61 --- /dev/null +++ b/arch/Config.in.powerpc @@ -0,0 +1,214 @@ +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_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 "e5500" if BR2_powerpc_e5500 + default "e6500" if BR2_powerpc_e6500 + 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 diff --git a/arch/Config.in.sh b/arch/Config.in.sh new file mode 100644 index 0000000000..1bdea37cbc --- /dev/null +++ b/arch/Config.in.sh @@ -0,0 +1,30 @@ +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 diff --git a/arch/Config.in.sparc b/arch/Config.in.sparc new file mode 100644 index 0000000000..307540fdbf --- /dev/null +++ b/arch/Config.in.sparc @@ -0,0 +1,30 @@ +choice + prompt "Target Architecture Variant" + depends on BR2_sparc || BR2_sparc64 + default BR2_sparc_v8 if BR2_sparc + default BR2_sparc_v9 if BR2_sparc64 + help + Specific CPU variant to use + +config BR2_sparc_v8 + bool "v8" + depends on BR2_sparc +config BR2_sparc_leon3 + bool "leon3" + depends on BR2_sparc +config BR2_sparc_v9 + bool "v9" + depends on BR2_sparc64 +endchoice + +config BR2_ARCH + default "sparc" if BR2_sparc + default "sparc64" if BR2_sparc64 + +config BR2_ENDIAN + default "BIG" + +config BR2_GCC_TARGET_CPU + default "leon3" if BR2_sparc_leon3 + default "v8" if BR2_sparc_v8 + default "ultrasparc" if BR2_sparc_v9 diff --git a/arch/Config.in.x86 b/arch/Config.in.x86 new file mode 100644 index 0000000000..efa9567811 --- /dev/null +++ b/arch/Config.in.x86 @@ -0,0 +1,277 @@ +# 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_i486 + bool "i486" + depends on !BR2_x86_64 +config BR2_x86_i586 + bool "i586" + depends on !BR2_x86_64 +config BR2_x86_x1000 + bool "x1000" + depends on !BR2_x86_64 + help + The Intel X1000 is a Pentium class microprocessor in the + Quark (sub-Atom) Product Line. The X1000 has a bug on the + lock prefix requiring that prefix must be stripped at build + time. + + See https://en.wikipedia.org/wiki/Intel_Quark + +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 "i486" if BR2_x86_i486 + default "i586" if BR2_x86_i586 + default "i586" if BR2_x86_x1000 + 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_corei7_avx && BR2_i386 + default "i686" if BR2_x86_corei7_avx2 && 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_GCC_TARGET_ARCH + default "i486" if BR2_x86_i486 + default "i586" if BR2_x86_i586 + default "i586" if BR2_x86_x1000 + 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 diff --git a/arch/Config.in.xtensa b/arch/Config.in.xtensa new file mode 100644 index 0000000000..fcb3dc926f --- /dev/null +++ b/arch/Config.in.xtensa @@ -0,0 +1,56 @@ +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 diff --git a/board/bananapi/boot.cmd b/board/bananapi/boot.cmd new file mode 100644 index 0000000000..9789e58599 --- /dev/null +++ b/board/bananapi/boot.cmd @@ -0,0 +1,7 @@ +setenv bootargs console=tty1 root=/dev/mmcblk0p2 rootwait panic=10 earlyprintk quiet loglevel=1 ipv6.disable=1 ${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 + diff --git a/board/bananapi/kernel.config b/board/bananapi/kernel.config new file mode 100644 index 0000000000..0282da9f11 --- /dev/null +++ b/board/bananapi/kernel.config @@ -0,0 +1,3304 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 4.1.18 Kernel Configuration +# +CONFIG_ARM=y +CONFIG_ARM_HAS_SG_CHAIN=y +CONFIG_MIGHT_HAVE_PCI=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_ARM_PATCH_PHYS_VIRT=y +CONFIG_GENERIC_BUG=y +CONFIG_PGTABLE_LEVELS=2 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y + +# +# General setup +# +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +# CONFIG_COMPILE_TEST is not set +CONFIG_LOCALVERSION="-meye" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_KERNEL_LZO=y +CONFIG_HAVE_KERNEL_LZ4=y +CONFIG_KERNEL_GZIP=y +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_XZ is not set +# CONFIG_KERNEL_LZO is not set +# CONFIG_KERNEL_LZ4 is not set +CONFIG_DEFAULT_HOSTNAME="" +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_CROSS_MEMORY_ATTACH=y +CONFIG_FHANDLE=y +CONFIG_USELIB=y +# CONFIG_AUDIT is not set +CONFIG_HAVE_ARCH_AUDITSYSCALL=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y +CONFIG_HANDLE_DOMAIN_IRQ=y +# CONFIG_IRQ_DOMAIN_DEBUG is not set +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_SPARSE_IRQ=y +CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_ARCH_HAS_TICK_BROADCAST=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# Timers subsystem +# +CONFIG_TICK_ONESHOT=y +CONFIG_HZ_PERIODIC=y +# CONFIG_NO_HZ_IDLE is not set +# CONFIG_NO_HZ_FULL is not set +# CONFIG_NO_HZ is not set +CONFIG_HIGH_RES_TIMERS=y + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set +# CONFIG_IRQ_TIME_ACCOUNTING is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set + +# +# RCU Subsystem +# +CONFIG_PREEMPT_RCU=y +CONFIG_SRCU=y +# CONFIG_TASKS_RCU is not set +CONFIG_RCU_STALL_COMMON=y +# CONFIG_RCU_USER_QS is not set +CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_RCU_BOOST is not set +CONFIG_RCU_KTHREAD_PRIO=0 +# CONFIG_RCU_NOCB_CPU is not set +# CONFIG_RCU_EXPEDITE_BOOT is not set +CONFIG_BUILD_BIN2C=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=17 +CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 +CONFIG_GENERIC_SCHED_CLOCK=y +# CONFIG_CGROUPS is not set +# CONFIG_CHECKPOINT_RESTORE is not set +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set +# CONFIG_SYSFS_DEPRECATED is not set +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_XZ is not set +# CONFIG_RD_LZO is not set +# CONFIG_RD_LZ4 is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_HAVE_UID16=y +CONFIG_BPF=y +CONFIG_EXPERT=y +CONFIG_UID16=y +CONFIG_MULTIUSER=y +# CONFIG_SGETMASK_SYSCALL is not set +CONFIG_SYSFS_SYSCALL=y +# CONFIG_SYSCTL_SYSCALL is not set +# CONFIG_KALLSYMS is not set +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +# CONFIG_BPF_SYSCALL is not set +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_ADVISE_SYSCALLS=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +# CONFIG_PERF_EVENTS is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +CONFIG_SLUB_CPU_PARTIAL=y +# CONFIG_SYSTEM_TRUSTED_KEYRING is not set +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_JUMP_LABEL=y +# CONFIG_UPROBES is not set +# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_ARCH_USE_BUILTIN_BSWAP=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_OPTPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_PERF_REGS=y +CONFIG_HAVE_PERF_USER_STACK_DUMP=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP_FILTER=y +CONFIG_HAVE_CC_STACKPROTECTOR=y +# CONFIG_CC_STACKPROTECTOR is not set +CONFIG_CC_STACKPROTECTOR_NONE=y +# CONFIG_CC_STACKPROTECTOR_REGULAR is not set +# CONFIG_CC_STACKPROTECTOR_STRONG is not set +CONFIG_HAVE_CONTEXT_TRACKING=y +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y +CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_OLD_SIGACTION=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_MODULE_SIG is not set +# CONFIG_MODULE_COMPRESS is not set +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_BLK_DEV_BSGLIB is not set +# CONFIG_BLK_DEV_INTEGRITY is not set +# CONFIG_BLK_CMDLINE_PARSER is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_EFI_PARTITION=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_LOCK_SPIN_ON_OWNER=y +# CONFIG_FREEZER is not set + +# +# System Type +# +CONFIG_MMU=y +CONFIG_ARCH_MULTIPLATFORM=y +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_SHMOBILE_LEGACY is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C24XX is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP1 is not set + +# +# Multiple platform selection +# + +# +# CPU Core family selection +# +# CONFIG_ARCH_MULTI_V6 is not set +CONFIG_ARCH_MULTI_V7=y +CONFIG_ARCH_MULTI_V6_V7=y +# CONFIG_ARCH_MULTI_CPU_AUTO is not set +# CONFIG_ARCH_VIRT is not set +# CONFIG_ARCH_MVEBU is not set +# CONFIG_ARCH_ALPINE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCM is not set +# CONFIG_ARCH_BERLIN is not set +# CONFIG_ARCH_DIGICOLOR is not set +# CONFIG_ARCH_HIGHBANK is not set +# CONFIG_ARCH_HISI is not set +# CONFIG_ARCH_KEYSTONE is not set +# CONFIG_ARCH_MESON is not set +# CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_MEDIATEK is not set + +# +# TI OMAP/AM/DM/DRA Family +# +# CONFIG_ARCH_OMAP3 is not set +# CONFIG_ARCH_OMAP4 is not set +# CONFIG_SOC_OMAP5 is not set +# CONFIG_SOC_AM33XX is not set +# CONFIG_SOC_AM43XX is not set +# CONFIG_SOC_DRA7XX is not set +# CONFIG_ARCH_QCOM is not set +# CONFIG_ARCH_ROCKCHIP is not set +# CONFIG_ARCH_SOCFPGA is not set +# CONFIG_PLAT_SPEAR is not set +# CONFIG_ARCH_STI is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_SHMOBILE_MULTI is not set +CONFIG_ARCH_SUNXI=y +# CONFIG_MACH_SUN4I is not set +# CONFIG_MACH_SUN5I is not set +# CONFIG_MACH_SUN6I is not set +CONFIG_MACH_SUN7I=y +# CONFIG_MACH_SUN8I is not set +# CONFIG_MACH_SUN9I is not set +# CONFIG_ARCH_SIRF is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_WM8850 is not set +# CONFIG_ARCH_ZYNQ is not set + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +# CONFIG_ARM_LPAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARM_THUMB=y +# CONFIG_ARM_THUMBEE is not set +CONFIG_ARM_VIRT_EXT=y +CONFIG_SWP_EMULATE=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_KUSER_HELPERS=y +CONFIG_VDSO=y +CONFIG_OUTER_CACHE=y +CONFIG_OUTER_CACHE_SYNC=y +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +CONFIG_CACHE_L2X0=y +# CONFIG_PL310_ERRATA_588369 is not set +# CONFIG_PL310_ERRATA_727915 is not set +# CONFIG_PL310_ERRATA_753970 is not set +# CONFIG_PL310_ERRATA_769419 is not set +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +# CONFIG_ARM_KERNMEM_PERMS is not set +CONFIG_MULTI_IRQ_HANDLER=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_643719 is not set +# CONFIG_ARM_ERRATA_720789 is not set +# CONFIG_ARM_ERRATA_754322 is not set +# CONFIG_ARM_ERRATA_754327 is not set +# CONFIG_ARM_ERRATA_764369 is not set +# CONFIG_ARM_ERRATA_775420 is not set +# CONFIG_ARM_ERRATA_798181 is not set +# CONFIG_ARM_ERRATA_773022 is not set + +# +# Bus support +# +# CONFIG_PCI is not set +# CONFIG_PCI_DOMAINS_GENERIC is not set +# CONFIG_PCI_SYSCALL is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_HAVE_SMP=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_ARM_CPU_TOPOLOGY=y +# CONFIG_SCHED_MC is not set +# CONFIG_SCHED_SMT is not set +CONFIG_HAVE_ARM_ARCH_TIMER=y +# CONFIG_MCPM is not set +# CONFIG_BIG_LITTLE is not set +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_NR_CPUS=2 +# CONFIG_HOTPLUG_CPU is not set +CONFIG_ARM_PSCI=y +CONFIG_ARCH_NR_GPIO=416 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_HZ_FIXED=0 +# CONFIG_HZ_100 is not set +# CONFIG_HZ_200 is not set +# CONFIG_HZ_250 is not set +# CONFIG_HZ_300 is not set +# CONFIG_HZ_500 is not set +CONFIG_HZ_1000=y +CONFIG_HZ=1000 +CONFIG_SCHED_HRTICK=y +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HAVE_ARCH_PFN_VALID=y +# CONFIG_HIGHMEM is not set +CONFIG_ARCH_WANT_GENERAL_HUGETLB=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_NO_BOOTMEM=y +CONFIG_MEMORY_ISOLATION=y +# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_COMPACTION=y +CONFIG_MIGRATION=y +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CLEANCACHE=y +CONFIG_CMA=y +# CONFIG_CMA_DEBUG is not set +# CONFIG_CMA_DEBUGFS is not set +CONFIG_CMA_AREAS=7 +# CONFIG_ZPOOL is not set +# CONFIG_ZBUD is not set +# CONFIG_ZSMALLOC is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_ALIGNMENT_TRAP=y +CONFIG_UACCESS_WITH_MEMCPY=y +CONFIG_SECCOMP=y +CONFIG_SWIOTLB=y +CONFIG_IOMMU_HELPER=y +# CONFIG_XEN is not set + +# +# Boot options +# +CONFIG_USE_OF=y +CONFIG_ATAGS=y +# CONFIG_DEPRECATED_PARAM_STRUCT is not set +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +# CONFIG_ARM_APPENDED_DTB is not set +CONFIG_CMDLINE="" +# CONFIG_CRASH_DUMP is not set +CONFIG_AUTO_ZRELADDR=y + +# +# CPU Power Management +# + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y + +# +# CPU frequency scaling drivers +# +CONFIG_CPUFREQ_DT=y +# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set +# CONFIG_QORIQ_CPUFREQ is not set + +# +# CPU Idle +# +# CONFIG_CPU_IDLE is not set +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y +CONFIG_KERNEL_MODE_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y +CONFIG_BINFMT_SCRIPT=y +# CONFIG_HAVE_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_COREDUMP=y + +# +# Power management options +# +# CONFIG_SUSPEND is not set +# CONFIG_PM is not set +CONFIG_PM_OPP=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +# CONFIG_ARM_CPU_SUSPEND is not set +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_DIAG is not set +CONFIG_UNIX=y +# CONFIG_UNIX_DIAG is not set +# CONFIG_XFRM_USER is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_NET_IP_TUNNEL is not set +CONFIG_SYN_COOKIES=y +# CONFIG_NET_UDP_TUNNEL is not set +# CONFIG_NET_FOU is not set +# CONFIG_GENEVE is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NET_PTP_CLASSIFY=y +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_NETFILTER_ADVANCED is not set + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_LOG_COMMON=m +# CONFIG_NF_CONNTRACK_PROCFS is not set +CONFIG_NF_CONNTRACK_FTP=m +# CONFIG_NF_CONNTRACK_IRC is not set +CONFIG_NF_CONNTRACK_BROADCAST=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +# CONFIG_NF_CONNTRACK_SIP is not set +CONFIG_NF_CT_NETLINK=m +CONFIG_NF_NAT=m +CONFIG_NF_NAT_NEEDED=y +# CONFIG_NF_NAT_AMANDA is not set +CONFIG_NF_NAT_FTP=m +# CONFIG_NF_NAT_IRC is not set +# CONFIG_NF_NAT_SIP is not set +# CONFIG_NF_NAT_TFTP is not set +CONFIG_NF_NAT_REDIRECT=m +# CONFIG_NF_TABLES is not set +CONFIG_NETFILTER_XTABLES=y + +# +# Xtables combined modules +# +CONFIG_NETFILTER_XT_MARK=m + +# +# Xtables targets +# +CONFIG_NETFILTER_XT_TARGET_LOG=m +CONFIG_NETFILTER_XT_NAT=m +CONFIG_NETFILTER_XT_TARGET_NETMAP=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_REDIRECT=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m + +# +# Xtables matches +# +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +# CONFIG_IP_SET is not set +# CONFIG_IP_VS is not set + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=m +CONFIG_NF_CONNTRACK_IPV4=m +CONFIG_NF_LOG_ARP=m +CONFIG_NF_LOG_IPV4=m +CONFIG_NF_REJECT_IPV4=m +CONFIG_NF_NAT_IPV4=m +CONFIG_NF_NAT_MASQUERADE_IPV4=m +# CONFIG_NF_NAT_PPTP is not set +# CONFIG_NF_NAT_H323 is not set +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_NAT=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_MANGLE=m +# CONFIG_IP_NF_RAW is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +CONFIG_HAVE_NET_DSA=y +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y +# CONFIG_BATMAN_ADV is not set +# CONFIG_OPENVSWITCH is not set +# CONFIG_VSOCKETS is not set +# CONFIG_NETLINK_MMAP is not set +# CONFIG_NETLINK_DIAG is not set +# CONFIG_MPLS is not set +# CONFIG_HSR is not set +# CONFIG_NET_SWITCHDEV is not set +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +CONFIG_NET_RX_BUSY_POLL=y +CONFIG_BQL=y +# CONFIG_BPF_JIT is not set +CONFIG_NET_FLOW_LIMIT=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=m +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +# CONFIG_CFG80211_CERTIFICATION_ONUS is not set +# CONFIG_CFG80211_DEFAULT_PS is not set +# CONFIG_CFG80211_DEBUGFS is not set +# CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y +CONFIG_LIB80211=m +CONFIG_LIB80211_CRYPT_WEP=m +CONFIG_LIB80211_CRYPT_CCMP=m +CONFIG_LIB80211_CRYPT_TKIP=m +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=m +CONFIG_MAC80211_HAS_RC=y +CONFIG_MAC80211_RC_MINSTREL=y +CONFIG_MAC80211_RC_MINSTREL_HT=y +# CONFIG_MAC80211_RC_MINSTREL_VHT is not set +CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" +# CONFIG_MAC80211_MESH is not set +CONFIG_MAC80211_LEDS=y +# CONFIG_MAC80211_DEBUGFS is not set +# CONFIG_MAC80211_MESSAGE_TRACING is not set +# CONFIG_MAC80211_DEBUG_MENU is not set +# CONFIG_WIMAX is not set +CONFIG_RFKILL=m +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y +# CONFIG_RFKILL_REGULATOR is not set +# CONFIG_RFKILL_GPIO is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set +# CONFIG_NFC is not set +CONFIG_HAVE_BPF_JIT=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER=y +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set +CONFIG_ALLOW_DEV_COREDUMP=y +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_GENERIC_CPU_DEVICES is not set +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_IRQ=y +CONFIG_DMA_SHARED_BUFFER=y +# CONFIG_FENCE_TRACE is not set +CONFIG_DMA_CMA=y + +# +# Default contiguous memory area size: +# +CONFIG_CMA_SIZE_MBYTES=16 +CONFIG_CMA_SIZE_SEL_MBYTES=y +# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set +# CONFIG_CMA_SIZE_SEL_MIN is not set +# CONFIG_CMA_SIZE_SEL_MAX is not set +CONFIG_CMA_ALIGNMENT=8 + +# +# Bus devices +# +# CONFIG_BRCMSTB_GISB_ARB is not set +# CONFIG_VEXPRESS_CONFIG is not set +# CONFIG_CONNECTOR is not set +# CONFIG_MTD is not set +CONFIG_DTC=y +CONFIG_OF=y + +# +# Device Tree and Open Firmware support +# +# CONFIG_OF_UNITTEST is not set +CONFIG_OF_FLATTREE=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_IRQ=y +CONFIG_OF_NET=y +CONFIG_OF_MDIO=y +CONFIG_OF_RESERVED_MEM=y +# CONFIG_OF_OVERLAY is not set +CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_NULL_BLK is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +# CONFIG_BLK_DEV_LOOP is not set +# CONFIG_BLK_DEV_DRBD is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=2 +CONFIG_BLK_DEV_RAM_SIZE=4096 +# CONFIG_BLK_DEV_PMEM is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set + +# +# Misc devices +# +# CONFIG_SENSORS_LIS3LV02D is not set +# CONFIG_AD525X_DPOT is not set +# CONFIG_DUMMY_IRQ is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_TI_DAC7512 is not set +# CONFIG_BMP085_I2C is not set +# CONFIG_BMP085_SPI is not set +# CONFIG_USB_SWITCH_FSA9480 is not set +# CONFIG_LATTICE_ECP3_CONFIG is not set +# CONFIG_SRAM is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +CONFIG_EEPROM_93CX6=m +# CONFIG_EEPROM_93XX46 is not set +CONFIG_EEPROM_SUNXI_SID=y + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +# CONFIG_SENSORS_LIS3_SPI is not set +# CONFIG_SENSORS_LIS3_I2C is not set + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set + +# +# Intel MIC Bus Driver +# + +# +# Intel MIC Host Driver +# + +# +# Intel MIC Card Driver +# +# CONFIG_ECHO is not set +# CONFIG_CXL_BASE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_MQ_DEFAULT is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=m +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +CONFIG_ATA=y +# CONFIG_ATA_NONSTANDARD is not set +CONFIG_ATA_VERBOSE_ERROR=y +CONFIG_SATA_PMP=y + +# +# Controllers with non-SFF native interface +# +# CONFIG_SATA_AHCI_PLATFORM is not set +CONFIG_AHCI_SUNXI=y +# CONFIG_ATA_SFF is not set +# CONFIG_MD is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +CONFIG_MII=y +CONFIG_NET_CORE=y +# CONFIG_BONDING is not set +# CONFIG_DUMMY is not set +# CONFIG_EQUALIZER is not set +# CONFIG_NET_TEAM is not set +# CONFIG_MACVLAN is not set +# CONFIG_VXLAN is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_TUN=m +# CONFIG_VETH is not set +# CONFIG_NLMON is not set + +# +# CAIF transport drivers +# + +# +# Distributed Switch Architecture drivers +# +# CONFIG_NET_DSA_MV88E6XXX is not set +# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set +CONFIG_ETHERNET=y +CONFIG_NET_VENDOR_ALLWINNER=y +CONFIG_SUN4I_EMAC=y +# CONFIG_ALTERA_TSE is not set +# CONFIG_NET_VENDOR_ARC is not set +# CONFIG_NET_CADENCE is not set +# CONFIG_NET_VENDOR_BROADCOM is not set +# CONFIG_NET_VENDOR_CIRRUS is not set +# CONFIG_DM9000 is not set +# CONFIG_DNET is not set +# CONFIG_NET_VENDOR_FARADAY is not set +# CONFIG_NET_VENDOR_HISILICON is not set +# CONFIG_NET_VENDOR_INTEL is not set +# CONFIG_NET_VENDOR_MARVELL is not set +# CONFIG_NET_VENDOR_MICREL is not set +# CONFIG_NET_VENDOR_MICROCHIP is not set +# CONFIG_NET_VENDOR_NATSEMI is not set +# CONFIG_ETHOC is not set +# CONFIG_NET_VENDOR_QUALCOMM is not set +# CONFIG_NET_VENDOR_ROCKER is not set +# CONFIG_NET_VENDOR_SAMSUNG is not set +# CONFIG_NET_VENDOR_SEEQ is not set +# CONFIG_NET_VENDOR_SMSC is not set +CONFIG_NET_VENDOR_STMICRO=y +CONFIG_STMMAC_ETH=y +CONFIG_STMMAC_PLATFORM=y +# CONFIG_NET_VENDOR_VIA is not set +# CONFIG_NET_VENDOR_WIZNET is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_AT803X_PHY is not set +# CONFIG_AMD_PHY is not set +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_BCM7XXX_PHY is not set +# CONFIG_BCM87XX_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_MICREL_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +CONFIG_MDIO_SUN4I=y +# CONFIG_MDIO_BUS_MUX_GPIO is not set +# CONFIG_MDIO_BUS_MUX_MMIOREG is not set +# CONFIG_MDIO_BCM_UNIMAC is not set +# CONFIG_MICREL_KS8995MA is not set +CONFIG_PPP=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +# CONFIG_SLIP is not set +CONFIG_SLHC=m +CONFIG_USB_NET_DRIVERS=y +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=m +CONFIG_USB_USBNET=m +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_AX88179_178A=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_CDC_NCM=m +# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set +CONFIG_USB_NET_CDC_MBIM=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SR9700=m +CONFIG_USB_NET_SR9800=m +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=m +# CONFIG_USB_NET_GL620A is not set +# CONFIG_USB_NET_NET1080 is not set +# CONFIG_USB_NET_PLUSB is not set +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_RNDIS_HOST=m +# CONFIG_USB_NET_CDC_SUBSET is not set +# CONFIG_USB_NET_ZAURUS is not set +# CONFIG_USB_NET_CX82310_ETH is not set +# CONFIG_USB_NET_KALMIA is not set +# CONFIG_USB_NET_QMI_WWAN is not set +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +CONFIG_USB_IPHETH=m +# CONFIG_USB_SIERRA_NET is not set +# CONFIG_USB_VL600 is not set +CONFIG_WLAN=y +CONFIG_LIBERTAS_THINFIRM=m +# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set +CONFIG_LIBERTAS_THINFIRM_USB=m +CONFIG_AT76C50X_USB=m +CONFIG_USB_ZD1201=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_RTL8187=m +CONFIG_RTL8187_LEDS=y +# CONFIG_MAC80211_HWSIM is not set +CONFIG_ATH_COMMON=m +CONFIG_ATH_CARDS=m +# CONFIG_ATH_DEBUG is not set +CONFIG_ATH9K_HW=m +CONFIG_ATH9K_COMMON=m +# CONFIG_ATH9K_BTCOEX_SUPPORT is not set +CONFIG_ATH9K=m +CONFIG_ATH9K_AHB=y +# CONFIG_ATH9K_DEBUGFS is not set +# CONFIG_ATH9K_DYNACK is not set +CONFIG_ATH9K_RFKILL=y +# CONFIG_ATH9K_CHANNEL_CONTEXT is not set +CONFIG_ATH9K_PCOEM=y +CONFIG_ATH9K_HTC=m +# CONFIG_ATH9K_HTC_DEBUGFS is not set +CONFIG_CARL9170=m +# CONFIG_CARL9170_LEDS is not set +CONFIG_CARL9170_WPC=y +# CONFIG_CARL9170_HWRNG is not set +CONFIG_ATH6KL=m +# CONFIG_ATH6KL_SDIO is not set +CONFIG_ATH6KL_USB=m +# CONFIG_ATH6KL_DEBUG is not set +CONFIG_AR5523=m +CONFIG_ATH10K=m +# CONFIG_ATH10K_DEBUG is not set +# CONFIG_ATH10K_DEBUGFS is not set +CONFIG_WCN36XX=m +# CONFIG_WCN36XX_DEBUGFS is not set +CONFIG_B43=m +CONFIG_B43_BCMA=y +CONFIG_B43_SSB=y +CONFIG_B43_BUSES_BCMA_AND_SSB=y +# CONFIG_B43_BUSES_BCMA is not set +# CONFIG_B43_BUSES_SSB is not set +# CONFIG_B43_SDIO is not set +CONFIG_B43_BCMA_PIO=y +CONFIG_B43_PIO=y +CONFIG_B43_PHY_G=y +CONFIG_B43_PHY_N=y +CONFIG_B43_PHY_LP=y +CONFIG_B43_PHY_HT=y +CONFIG_B43_LEDS=y +CONFIG_B43_HWRNG=y +# CONFIG_B43_DEBUG is not set +CONFIG_B43LEGACY=m +CONFIG_B43LEGACY_LEDS=y +CONFIG_B43LEGACY_HWRNG=y +# CONFIG_B43LEGACY_DEBUG is not set +CONFIG_B43LEGACY_DMA=y +CONFIG_B43LEGACY_PIO=y +CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y +# CONFIG_B43LEGACY_DMA_MODE is not set +# CONFIG_B43LEGACY_PIO_MODE is not set +CONFIG_BRCMUTIL=m +# CONFIG_BRCMSMAC is not set +CONFIG_BRCMFMAC=m +CONFIG_BRCMFMAC_PROTO_BCDC=y +# CONFIG_BRCMFMAC_SDIO is not set +CONFIG_BRCMFMAC_USB=y +# CONFIG_BRCM_TRACING is not set +# CONFIG_BRCMDBG is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +# CONFIG_LIBERTAS_SDIO is not set +# CONFIG_LIBERTAS_SPI is not set +# CONFIG_LIBERTAS_DEBUG is not set +# CONFIG_LIBERTAS_MESH is not set +CONFIG_P54_COMMON=m +CONFIG_P54_USB=m +# CONFIG_P54_SPI is not set +CONFIG_P54_LEDS=y +CONFIG_RT2X00=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT33XX=y +CONFIG_RT2800USB_RT35XX=y +CONFIG_RT2800USB_RT3573=y +CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_RT55XX=y +CONFIG_RT2800USB_UNKNOWN=y +CONFIG_RT2800_LIB=m +CONFIG_RT2X00_LIB_USB=m +CONFIG_RT2X00_LIB=m +CONFIG_RT2X00_LIB_FIRMWARE=y +CONFIG_RT2X00_LIB_CRYPTO=y +CONFIG_RT2X00_LIB_LEDS=y +# CONFIG_RT2X00_DEBUG is not set +CONFIG_RTL8192CU=m +# CONFIG_WL_TI is not set +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set +CONFIG_MWIFIEX=m +# CONFIG_MWIFIEX_SDIO is not set +CONFIG_MWIFIEX_USB=m +# CONFIG_CW1200 is not set +CONFIG_RSI_91X=m +# CONFIG_RSI_DEBUGFS is not set +# CONFIG_RSI_SDIO is not set +CONFIG_RSI_USB=m + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# +# CONFIG_WAN is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set +# CONFIG_INPUT_MATRIXKMAP is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +# CONFIG_INPUT_EVDEV is not set +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_TTY=y +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +CONFIG_DEVMEM=y +# CONFIG_DEVKMEM is not set + +# +# Serial drivers +# +CONFIG_SERIAL_EARLYCON=y +CONFIG_SERIAL_8250=y +# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=8 +CONFIG_SERIAL_8250_RUNTIME_UARTS=8 +# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250_DW is not set +# CONFIG_SERIAL_8250_EM is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set +# CONFIG_SERIAL_MAX3100 is not set +# CONFIG_SERIAL_MAX310X is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_OF_PLATFORM is not set +# CONFIG_SERIAL_SCCNXP is not set +# CONFIG_SERIAL_SC16IS7XX is not set +# CONFIG_SERIAL_BCM63XX is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_IFX6X60 is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_SERIAL_ARC is not set +# CONFIG_SERIAL_FSL_LPUART is not set +# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set +# CONFIG_SERIAL_ST_ASC is not set +CONFIG_TTY_PRINTK=y +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_R3964 is not set +CONFIG_RAW_DRIVER=y +CONFIG_MAX_RAW_DEVS=256 +# CONFIG_TCG_TPM is not set +# CONFIG_XILLYBUS is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=m +CONFIG_I2C_MUX=m + +# +# Multiplexer I2C Chip support +# +# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set +# CONFIG_I2C_MUX_GPIO is not set +# CONFIG_I2C_MUX_PCA9541 is not set +# CONFIG_I2C_MUX_PCA954x is not set +# CONFIG_I2C_MUX_PINCTRL is not set +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=m + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_CBUS_GPIO is not set +# CONFIG_I2C_DESIGNWARE_PLATFORM is not set +# CONFIG_I2C_GPIO is not set +CONFIG_I2C_MV64XXX=m +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +# CONFIG_I2C_RK3X is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_DIOLAN_U2C is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_ROBOTFUZZ_OSIF is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_SLAVE is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_ALTERA is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_CADENCE is not set +# CONFIG_SPI_GPIO is not set +# CONFIG_SPI_FSL_SPI is not set +# CONFIG_SPI_OC_TINY is not set +# CONFIG_SPI_PXA2XX_PCI is not set +# CONFIG_SPI_ROCKCHIP is not set +# CONFIG_SPI_SC18IS602 is not set +CONFIG_SPI_SUN4I=m +# CONFIG_SPI_SUN6I is not set +# CONFIG_SPI_XCOMM is not set +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_DESIGNWARE is not set + +# +# SPI Protocol Masters +# +# CONFIG_SPI_SPIDEV is not set +# CONFIG_SPI_TLE62X0 is not set +# CONFIG_SPMI is not set +# CONFIG_HSI is not set + +# +# PPS support +# +CONFIG_PPS=y +# CONFIG_PPS_DEBUG is not set +# CONFIG_NTP_PPS is not set + +# +# PPS clients support +# +# CONFIG_PPS_CLIENT_KTIMER is not set +# CONFIG_PPS_CLIENT_LDISC is not set +# CONFIG_PPS_CLIENT_GPIO is not set + +# +# PPS generators support +# + +# +# PTP clock support +# +CONFIG_PTP_1588_CLOCK=y + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +CONFIG_PINCTRL=y + +# +# Pin controllers +# +CONFIG_PINMUX=y +CONFIG_PINCONF=y +CONFIG_GENERIC_PINCONF=y +# CONFIG_DEBUG_PINCTRL is not set +# CONFIG_PINCTRL_AMD is not set +# CONFIG_PINCTRL_SINGLE is not set +CONFIG_PINCTRL_SUNXI_COMMON=y +# CONFIG_PINCTRL_SUN4I_A10 is not set +# CONFIG_PINCTRL_SUN5I_A10S is not set +# CONFIG_PINCTRL_SUN5I_A13 is not set +# CONFIG_PINCTRL_SUN6I_A31 is not set +# CONFIG_PINCTRL_SUN6I_A31S is not set +# CONFIG_PINCTRL_SUN6I_A31_R is not set +CONFIG_PINCTRL_SUN7I_A20=y +# CONFIG_PINCTRL_SUN8I_A23 is not set +# CONFIG_PINCTRL_SUN8I_A23_R is not set +# CONFIG_PINCTRL_SUN9I_A80 is not set +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +CONFIG_GPIO_DEVRES=y +CONFIG_OF_GPIO=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y + +# +# Memory mapped GPIO drivers +# +# CONFIG_GPIO_74XX_MMIO is not set +# CONFIG_GPIO_ALTERA is not set +# CONFIG_GPIO_DWAPB is not set +# CONFIG_GPIO_EM is not set +# CONFIG_GPIO_GENERIC_PLATFORM is not set +# CONFIG_GPIO_GRGPIO is not set +# CONFIG_GPIO_SCH311X is not set +# CONFIG_GPIO_ZEVIO is not set + +# +# I2C GPIO expanders +# +# CONFIG_GPIO_ADP5588 is not set +# CONFIG_GPIO_ADNP is not set +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set + +# +# MFD GPIO expanders +# + +# +# SPI GPIO expanders +# +# CONFIG_GPIO_74X164 is not set +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_MC33880 is not set + +# +# USB GPIO expanders +# +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_POWER_AVS is not set +# CONFIG_HWMON is not set +# CONFIG_THERMAL is not set +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_CORE=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_GPIO_WATCHDOG is not set +# CONFIG_XILINX_WATCHDOG is not set +# CONFIG_CADENCE_WATCHDOG is not set +# CONFIG_DW_WATCHDOG is not set +CONFIG_SUNXI_WATCHDOG=y +# CONFIG_MAX63XX_WATCHDOG is not set +# CONFIG_MEN_A21_WDT is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=m +CONFIG_SSB_BLOCKIO=y +CONFIG_SSB_SDIOHOST_POSSIBLE=y +# CONFIG_SSB_SDIOHOST is not set +# CONFIG_SSB_SILENT is not set +# CONFIG_SSB_DEBUG is not set +# CONFIG_SSB_DRIVER_GPIO is not set +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +CONFIG_BCMA=m +CONFIG_BCMA_BLOCKIO=y +# CONFIG_BCMA_HOST_SOC is not set +# CONFIG_BCMA_DRIVER_GMAC_CMN is not set +# CONFIG_BCMA_DRIVER_GPIO is not set +# CONFIG_BCMA_DEBUG is not set + +# +# Multifunction device drivers +# +CONFIG_MFD_CORE=y +# CONFIG_MFD_AS3711 is not set +# CONFIG_MFD_AS3722 is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_AAT2870_CORE is not set +# CONFIG_MFD_ATMEL_HLCDC is not set +# CONFIG_MFD_BCM590XX is not set +CONFIG_MFD_AXP20X=y +# CONFIG_MFD_CROS_EC is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_DA9052_SPI is not set +# CONFIG_MFD_DA9052_I2C is not set +# CONFIG_MFD_DA9055 is not set +# CONFIG_MFD_DA9063 is not set +# CONFIG_MFD_DA9150 is not set +# CONFIG_MFD_DLN2 is not set +# CONFIG_MFD_MC13XXX_SPI is not set +# CONFIG_MFD_MC13XXX_I2C is not set +# CONFIG_MFD_HI6421_PMIC is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_INTEL_SOC_PMIC is not set +# CONFIG_MFD_KEMPLD is not set +# CONFIG_MFD_88PM800 is not set +# CONFIG_MFD_88PM805 is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_MAX14577 is not set +# CONFIG_MFD_MAX77686 is not set +# CONFIG_MFD_MAX77693 is not set +# CONFIG_MFD_MAX77843 is not set +# CONFIG_MFD_MAX8907 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_MT6397 is not set +# CONFIG_MFD_MENF21BMC is not set +# CONFIG_EZX_PCAP is not set +# CONFIG_MFD_VIPERBOARD is not set +# CONFIG_MFD_RETU is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_UCB1400_CORE is not set +# CONFIG_MFD_PM8921_CORE is not set +# CONFIG_MFD_RT5033 is not set +# CONFIG_MFD_RTSX_USB is not set +# CONFIG_MFD_RC5T583 is not set +# CONFIG_MFD_RK808 is not set +# CONFIG_MFD_RN5T618 is not set +# CONFIG_MFD_SEC_CORE is not set +# CONFIG_MFD_SI476X_CORE is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_SKY81452 is not set +# CONFIG_MFD_SMSC is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_SUN6I_PRCM is not set +# CONFIG_MFD_SYSCON is not set +# CONFIG_MFD_TI_AM335X_TSCADC is not set +# CONFIG_MFD_LP3943 is not set +# CONFIG_MFD_LP8788 is not set +# CONFIG_MFD_PALMAS is not set +# CONFIG_TPS6105X is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_MFD_TPS65090 is not set +# CONFIG_MFD_TPS65217 is not set +# CONFIG_MFD_TPS65218 is not set +# CONFIG_MFD_TPS6586X is not set +# CONFIG_MFD_TPS65910 is not set +# CONFIG_MFD_TPS65912 is not set +# CONFIG_MFD_TPS65912_I2C is not set +# CONFIG_MFD_TPS65912_SPI is not set +# CONFIG_MFD_TPS80031 is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_TWL6040_CORE is not set +# CONFIG_MFD_WL1273_CORE is not set +# CONFIG_MFD_LM3533 is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_MFD_ARIZONA_I2C is not set +# CONFIG_MFD_ARIZONA_SPI is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM831X_SPI is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +CONFIG_REGULATOR_FIXED_VOLTAGE=y +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_ACT8865 is not set +# CONFIG_REGULATOR_AD5398 is not set +CONFIG_REGULATOR_AXP20X=y +# CONFIG_REGULATOR_DA9210 is not set +# CONFIG_REGULATOR_DA9211 is not set +# CONFIG_REGULATOR_FAN53555 is not set +CONFIG_REGULATOR_GPIO=y +# CONFIG_REGULATOR_ISL9305 is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_LP872X is not set +# CONFIG_REGULATOR_LP8755 is not set +# CONFIG_REGULATOR_LTC3589 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_MAX8973 is not set +# CONFIG_REGULATOR_PFUZE100 is not set +# CONFIG_REGULATOR_TPS51632 is not set +# CONFIG_REGULATOR_TPS62360 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_REGULATOR_TPS6524X is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_ANALOG_TV_SUPPORT=y +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +# CONFIG_MEDIA_RADIO_SUPPORT is not set +# CONFIG_MEDIA_SDR_SUPPORT is not set +# CONFIG_MEDIA_RC_SUPPORT is not set +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_DEV=y +# CONFIG_VIDEO_V4L2_SUBDEV_API is not set +CONFIG_VIDEO_V4L2=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_VIDEO_TUNER=m +CONFIG_VIDEOBUF_GEN=m +CONFIG_VIDEOBUF_VMALLOC=m +CONFIG_VIDEOBUF2_CORE=y +CONFIG_VIDEOBUF2_MEMOPS=y +CONFIG_VIDEOBUF2_VMALLOC=y +CONFIG_DVB_CORE=y +# CONFIG_DVB_NET is not set +# CONFIG_TTPCI_EEPROM is not set +CONFIG_DVB_MAX_ADAPTERS=8 +# CONFIG_DVB_DYNAMIC_MINORS is not set + +# +# Media drivers +# +CONFIG_MEDIA_USB_SUPPORT=y + +# +# Webcam devices +# +CONFIG_USB_VIDEO_CLASS=y +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_GL860=m +CONFIG_USB_GSPCA_BENQ=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_DTCS033=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_JEILINJ=m +CONFIG_USB_GSPCA_JL2005BCD=m +CONFIG_USB_GSPCA_KINECT=m +CONFIG_USB_GSPCA_KONICA=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_MR97310A=m +CONFIG_USB_GSPCA_NW80X=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_OV534_9=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7302=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SE401=m +CONFIG_USB_GSPCA_SN9C2028=m +CONFIG_USB_GSPCA_SN9C20X=m +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SPCA1528=m +CONFIG_USB_GSPCA_SQ905=m +CONFIG_USB_GSPCA_SQ905C=m +CONFIG_USB_GSPCA_SQ930X=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_STK1135=m +CONFIG_USB_GSPCA_STV0680=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TOPRO=m +CONFIG_USB_GSPCA_TOUPTEK=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_VICAM=m +CONFIG_USB_GSPCA_XIRLINK_CIT=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_VIDEO_CPIA2=m +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_VIDEO_USBTV=m + +# +# Analog TV USB devices +# +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +CONFIG_VIDEO_PVRUSB2_DVB=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_STK1160_COMMON=m +CONFIG_VIDEO_STK1160_AC97=y +CONFIG_VIDEO_STK1160=m +CONFIG_VIDEO_GO7007=m +CONFIG_VIDEO_GO7007_USB=m +CONFIG_VIDEO_GO7007_LOADER=m +CONFIG_VIDEO_GO7007_USB_S2250_BOARD=m + +# +# Analog/digital TV USB devices +# +CONFIG_VIDEO_AU0828=m +CONFIG_VIDEO_AU0828_V4L2=y + +# +# Digital TV USB devices +# +CONFIG_DVB_USB_V2=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_AF9035=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_AZ6007=m +CONFIG_DVB_USB_CE6230=m +CONFIG_DVB_USB_EC168=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_MXL111SF=m +CONFIG_DVB_USB_RTL28XXU=m +CONFIG_DVB_USB_DVBSKY=m +CONFIG_SMS_USB_DRV=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set +CONFIG_DVB_AS102=m + +# +# Webcam, TV (analog/digital) USB devices +# +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_V4L2=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_SOC_CAMERA=m +# CONFIG_SOC_CAMERA_PLATFORM is not set +# CONFIG_V4L_MEM2MEM_DRIVERS is not set +# CONFIG_V4L_TEST_DRIVERS is not set + +# +# Supported MMC/SDIO adapters +# +# CONFIG_SMS_SDIO_DRV is not set +CONFIG_MEDIA_COMMON_OPTIONS=y + +# +# common driver options +# +CONFIG_VIDEO_CX2341X=m +CONFIG_VIDEO_TVEEPROM=m +CONFIG_CYPRESS_FIRMWARE=m +CONFIG_DVB_B2C2_FLEXCOP=m +CONFIG_SMS_SIANO_MDTV=m + +# +# Media ancillary drivers (tuners, sensors, i2c, frontends) +# +# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set +CONFIG_MEDIA_ATTACH=y + +# +# Encoders, decoders, sensors and other helper chips +# + +# +# Audio decoders, processors and mixers +# +# CONFIG_VIDEO_TVAUDIO is not set +# CONFIG_VIDEO_TDA7432 is not set +# CONFIG_VIDEO_TDA9840 is not set +# CONFIG_VIDEO_TEA6415C is not set +# CONFIG_VIDEO_TEA6420 is not set +CONFIG_VIDEO_MSP3400=m +# CONFIG_VIDEO_CS5345 is not set +CONFIG_VIDEO_CS53L32A=m +# CONFIG_VIDEO_TLV320AIC23B is not set +# CONFIG_VIDEO_UDA1342 is not set +CONFIG_VIDEO_WM8775=m +# CONFIG_VIDEO_WM8739 is not set +# CONFIG_VIDEO_VP27SMPX is not set +# CONFIG_VIDEO_SONY_BTF_MPX is not set + +# +# RDS decoders +# +# CONFIG_VIDEO_SAA6588 is not set + +# +# Video decoders +# +# CONFIG_VIDEO_ADV7183 is not set +# CONFIG_VIDEO_BT819 is not set +# CONFIG_VIDEO_BT856 is not set +# CONFIG_VIDEO_BT866 is not set +# CONFIG_VIDEO_KS0127 is not set +# CONFIG_VIDEO_ML86V7667 is not set +# CONFIG_VIDEO_SAA7110 is not set +CONFIG_VIDEO_SAA711X=m +# CONFIG_VIDEO_TVP514X is not set +# CONFIG_VIDEO_TVP5150 is not set +# CONFIG_VIDEO_TVP7002 is not set +# CONFIG_VIDEO_TW2804 is not set +# CONFIG_VIDEO_TW9903 is not set +# CONFIG_VIDEO_TW9906 is not set +# CONFIG_VIDEO_VPX3220 is not set + +# +# Video and audio decoders +# +# CONFIG_VIDEO_SAA717X is not set +CONFIG_VIDEO_CX25840=m + +# +# Video encoders +# +# CONFIG_VIDEO_SAA7127 is not set +# CONFIG_VIDEO_SAA7185 is not set +# CONFIG_VIDEO_ADV7170 is not set +# CONFIG_VIDEO_ADV7175 is not set +# CONFIG_VIDEO_ADV7343 is not set +# CONFIG_VIDEO_ADV7393 is not set +# CONFIG_VIDEO_AK881X is not set +# CONFIG_VIDEO_THS8200 is not set + +# +# Camera sensor devices +# +# CONFIG_VIDEO_OV2659 is not set +CONFIG_VIDEO_OV7640=m +CONFIG_VIDEO_OV7670=m +CONFIG_VIDEO_VS6624=m +CONFIG_VIDEO_MT9V011=m +CONFIG_VIDEO_SR030PC30=m + +# +# Flash devices +# +# CONFIG_VIDEO_ADP1653 is not set +# CONFIG_VIDEO_AS3645A is not set +# CONFIG_VIDEO_LM3560 is not set +# CONFIG_VIDEO_LM3646 is not set + +# +# Video improvement chips +# +# CONFIG_VIDEO_UPD64031A is not set +# CONFIG_VIDEO_UPD64083 is not set + +# +# Audio/Video compression chips +# +# CONFIG_VIDEO_SAA6752HS is not set + +# +# Miscellaneous helper chips +# +# CONFIG_VIDEO_THS7303 is not set +# CONFIG_VIDEO_M52790 is not set + +# +# Sensors used on soc_camera driver +# + +# +# soc_camera sensor drivers +# +CONFIG_SOC_CAMERA_IMX074=m +CONFIG_SOC_CAMERA_MT9M001=m +CONFIG_SOC_CAMERA_MT9M111=m +CONFIG_SOC_CAMERA_MT9T031=m +CONFIG_SOC_CAMERA_MT9T112=m +CONFIG_SOC_CAMERA_MT9V022=m +CONFIG_SOC_CAMERA_OV2640=m +CONFIG_SOC_CAMERA_OV5642=m +CONFIG_SOC_CAMERA_OV6650=m +CONFIG_SOC_CAMERA_OV772X=m +CONFIG_SOC_CAMERA_OV9640=m +CONFIG_SOC_CAMERA_OV9740=m +CONFIG_SOC_CAMERA_RJ54N1=m +CONFIG_SOC_CAMERA_TW9910=m +CONFIG_MEDIA_TUNER=y + +# +# Customize TV tuners +# +# CONFIG_MEDIA_TUNER_SIMPLE is not set +# CONFIG_MEDIA_TUNER_TDA8290 is not set +# CONFIG_MEDIA_TUNER_TDA827X is not set +# CONFIG_MEDIA_TUNER_TDA18271 is not set +# CONFIG_MEDIA_TUNER_TDA9887 is not set +# CONFIG_MEDIA_TUNER_TEA5761 is not set +# CONFIG_MEDIA_TUNER_TEA5767 is not set +# CONFIG_MEDIA_TUNER_MSI001 is not set +# CONFIG_MEDIA_TUNER_MT20XX is not set +# CONFIG_MEDIA_TUNER_MT2060 is not set +# CONFIG_MEDIA_TUNER_MT2063 is not set +# CONFIG_MEDIA_TUNER_MT2266 is not set +# CONFIG_MEDIA_TUNER_MT2131 is not set +# CONFIG_MEDIA_TUNER_QT1010 is not set +# CONFIG_MEDIA_TUNER_XC2028 is not set +# CONFIG_MEDIA_TUNER_XC5000 is not set +# CONFIG_MEDIA_TUNER_XC4000 is not set +# CONFIG_MEDIA_TUNER_MXL5005S is not set +# CONFIG_MEDIA_TUNER_MXL5007T is not set +# CONFIG_MEDIA_TUNER_MC44S803 is not set +# CONFIG_MEDIA_TUNER_MAX2165 is not set +# CONFIG_MEDIA_TUNER_TDA18218 is not set +# CONFIG_MEDIA_TUNER_FC0011 is not set +# CONFIG_MEDIA_TUNER_FC0012 is not set +# CONFIG_MEDIA_TUNER_FC0013 is not set +# CONFIG_MEDIA_TUNER_TDA18212 is not set +# CONFIG_MEDIA_TUNER_E4000 is not set +# CONFIG_MEDIA_TUNER_FC2580 is not set +# CONFIG_MEDIA_TUNER_M88RS6000T is not set +# CONFIG_MEDIA_TUNER_TUA9001 is not set +# CONFIG_MEDIA_TUNER_SI2157 is not set +# CONFIG_MEDIA_TUNER_IT913X is not set +# CONFIG_MEDIA_TUNER_R820T is not set +# CONFIG_MEDIA_TUNER_MXL301RF is not set +# CONFIG_MEDIA_TUNER_QM1D1C0042 is not set + +# +# Customise DVB Frontends +# + +# +# Multistandard (satellite) frontends +# +# CONFIG_DVB_STB0899 is not set +# CONFIG_DVB_STB6100 is not set +# CONFIG_DVB_STV090x is not set +# CONFIG_DVB_STV6110x is not set +# CONFIG_DVB_M88DS3103 is not set + +# +# Multistandard (cable + terrestrial) frontends +# +# CONFIG_DVB_DRXK is not set +# CONFIG_DVB_TDA18271C2DD is not set +# CONFIG_DVB_SI2165 is not set + +# +# DVB-S (satellite) frontends +# +# CONFIG_DVB_CX24110 is not set +# CONFIG_DVB_CX24123 is not set +# CONFIG_DVB_MT312 is not set +# CONFIG_DVB_ZL10036 is not set +# CONFIG_DVB_ZL10039 is not set +# CONFIG_DVB_S5H1420 is not set +# CONFIG_DVB_STV0288 is not set +# CONFIG_DVB_STB6000 is not set +# CONFIG_DVB_STV0299 is not set +# CONFIG_DVB_STV6110 is not set +# CONFIG_DVB_STV0900 is not set +# CONFIG_DVB_TDA8083 is not set +# CONFIG_DVB_TDA10086 is not set +# CONFIG_DVB_TDA8261 is not set +# CONFIG_DVB_VES1X93 is not set +# CONFIG_DVB_TUNER_ITD1000 is not set +# CONFIG_DVB_TUNER_CX24113 is not set +# CONFIG_DVB_TDA826X is not set +# CONFIG_DVB_TUA6100 is not set +# CONFIG_DVB_CX24116 is not set +# CONFIG_DVB_CX24117 is not set +# CONFIG_DVB_SI21XX is not set +# CONFIG_DVB_TS2020 is not set +# CONFIG_DVB_DS3000 is not set +# CONFIG_DVB_MB86A16 is not set +# CONFIG_DVB_TDA10071 is not set + +# +# DVB-T (terrestrial) frontends +# +# CONFIG_DVB_SP8870 is not set +# CONFIG_DVB_SP887X is not set +# CONFIG_DVB_CX22700 is not set +# CONFIG_DVB_CX22702 is not set +# CONFIG_DVB_S5H1432 is not set +# CONFIG_DVB_DRXD is not set +# CONFIG_DVB_L64781 is not set +# CONFIG_DVB_TDA1004X is not set +# CONFIG_DVB_NXT6000 is not set +# CONFIG_DVB_MT352 is not set +CONFIG_DVB_ZL10353=m +# CONFIG_DVB_DIB3000MB is not set +# CONFIG_DVB_DIB3000MC is not set +# CONFIG_DVB_DIB7000M is not set +# CONFIG_DVB_DIB7000P is not set +# CONFIG_DVB_DIB9000 is not set +# CONFIG_DVB_TDA10048 is not set +CONFIG_DVB_AF9013=m +CONFIG_DVB_EC100=m +# CONFIG_DVB_HD29L2 is not set +# CONFIG_DVB_STV0367 is not set +# CONFIG_DVB_CXD2820R is not set +CONFIG_DVB_RTL2830=m +CONFIG_DVB_RTL2832=m +# CONFIG_DVB_SI2168 is not set +CONFIG_DVB_AS102_FE=m + +# +# DVB-C (cable) frontends +# +# CONFIG_DVB_VES1820 is not set +# CONFIG_DVB_TDA10021 is not set +# CONFIG_DVB_TDA10023 is not set +# CONFIG_DVB_STV0297 is not set + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +# CONFIG_DVB_NXT200X is not set +# CONFIG_DVB_OR51211 is not set +# CONFIG_DVB_OR51132 is not set +# CONFIG_DVB_BCM3510 is not set +# CONFIG_DVB_LGDT330X is not set +# CONFIG_DVB_LGDT3305 is not set +# CONFIG_DVB_LGDT3306A is not set +# CONFIG_DVB_LG2160 is not set +# CONFIG_DVB_S5H1409 is not set +# CONFIG_DVB_AU8522_DTV is not set +# CONFIG_DVB_AU8522_V4L is not set +# CONFIG_DVB_S5H1411 is not set + +# +# ISDB-T (terrestrial) frontends +# +# CONFIG_DVB_S921 is not set +# CONFIG_DVB_DIB8000 is not set +# CONFIG_DVB_MB86A20S is not set + +# +# ISDB-S (satellite) & ISDB-T (terrestrial) frontends +# +# CONFIG_DVB_TC90522 is not set + +# +# Digital terrestrial only tuners/PLL +# +# CONFIG_DVB_PLL is not set +# CONFIG_DVB_TUNER_DIB0070 is not set +# CONFIG_DVB_TUNER_DIB0090 is not set + +# +# SEC control devices for DVB-S +# +# CONFIG_DVB_DRX39XYJ is not set +# CONFIG_DVB_LNBP21 is not set +# CONFIG_DVB_LNBP22 is not set +# CONFIG_DVB_ISL6405 is not set +# CONFIG_DVB_ISL6421 is not set +# CONFIG_DVB_ISL6423 is not set +# CONFIG_DVB_A8293 is not set +# CONFIG_DVB_SP2 is not set +# CONFIG_DVB_LGS8GL5 is not set +# CONFIG_DVB_LGS8GXX is not set +# CONFIG_DVB_ATBM8830 is not set +# CONFIG_DVB_TDA665x is not set +# CONFIG_DVB_IX2505V is not set +# CONFIG_DVB_M88RS2000 is not set +CONFIG_DVB_AF9033=m + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set + +# +# Graphics support +# +# CONFIG_IMX_IPUV3_CORE is not set + +# +# Direct Rendering Manager +# +# CONFIG_DRM is not set + +# +# Frame buffer Devices +# +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +CONFIG_FB_CMDLINE=y +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_OPENCORES is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_SMSCUFX is not set +# CONFIG_FB_UDL is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_AUO_K190X is not set +CONFIG_FB_SIMPLE=y +# CONFIG_FB_SSD1307 is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +# CONFIG_VGASTATE is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +# CONFIG_LOGO is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=m +CONFIG_SND_TIMER=m +CONFIG_SND_PCM=m +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_HRTIMER is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_VMASTER=y +# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +CONFIG_SND_AC97_CODEC=m +CONFIG_SND_DRIVERS=y +CONFIG_SND_DUMMY=m +CONFIG_SND_ALOOP=m +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_AC97_POWER_SAVE is not set + +# +# HD-Audio +# +CONFIG_SND_ARM=y +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_UA101=m +CONFIG_SND_USB_CAIAQ=m +CONFIG_SND_USB_CAIAQ_INPUT=y +CONFIG_SND_USB_6FIRE=m +# CONFIG_SND_USB_HIFACE is not set +# CONFIG_SND_BCD2000 is not set +# CONFIG_SND_USB_POD is not set +# CONFIG_SND_USB_PODHD is not set +# CONFIG_SND_USB_TONEPORT is not set +# CONFIG_SND_USB_VARIAX is not set +# CONFIG_SND_SOC is not set +# CONFIG_SOUND_PRIME is not set +CONFIG_AC97_BUS=m + +# +# HID support +# +CONFIG_HID=y +# CONFIG_HID_BATTERY_STRENGTH is not set +CONFIG_HIDRAW=y +# CONFIG_UHID is not set +CONFIG_HID_GENERIC=y + +# +# Special HID drivers +# +# CONFIG_HID_A4TECH is not set +# CONFIG_HID_ACRUX is not set +# CONFIG_HID_APPLE is not set +# CONFIG_HID_APPLEIR is not set +# CONFIG_HID_AUREAL is not set +CONFIG_HID_BELKIN=m +# CONFIG_HID_BETOP_FF is not set +CONFIG_HID_CHERRY=m +# CONFIG_HID_CHICONY is not set +# CONFIG_HID_PRODIKEYS is not set +# CONFIG_HID_CP2112 is not set +# CONFIG_HID_CYPRESS is not set +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EMS_FF is not set +# CONFIG_HID_ELECOM is not set +# CONFIG_HID_ELO is not set +CONFIG_HID_EZKEY=m +CONFIG_HID_HOLTEK=m +# CONFIG_HOLTEK_FF is not set +# CONFIG_HID_GT683R is not set +# CONFIG_HID_KEYTOUCH is not set +# CONFIG_HID_KYE is not set +# CONFIG_HID_UCLOGIC is not set +# CONFIG_HID_WALTOP is not set +# CONFIG_HID_GYRATION is not set +# CONFIG_HID_ICADE is not set +# CONFIG_HID_TWINHAN is not set +# CONFIG_HID_KENSINGTON is not set +# CONFIG_HID_LCPOWER is not set +# CONFIG_HID_LENOVO is not set +CONFIG_HID_LOGITECH=m +# CONFIG_HID_LOGITECH_DJ is not set +# CONFIG_HID_LOGITECH_HIDPP is not set +# CONFIG_LOGITECH_FF is not set +# CONFIG_LOGIRUMBLEPAD2_FF is not set +# CONFIG_LOGIG940_FF is not set +# CONFIG_LOGIWHEELS_FF is not set +# CONFIG_HID_MAGICMOUSE is not set +CONFIG_HID_MICROSOFT=m +CONFIG_HID_MONTEREY=m +# CONFIG_HID_MULTITOUCH is not set +# CONFIG_HID_NTRIG is not set +CONFIG_HID_ORTEK=m +# CONFIG_HID_PANTHERLORD is not set +# CONFIG_HID_PENMOUNT is not set +# CONFIG_HID_PETALYNX is not set +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_PLANTRONICS is not set +# CONFIG_HID_PRIMAX is not set +# CONFIG_HID_ROCCAT is not set +# CONFIG_HID_SAITEK is not set +CONFIG_HID_SAMSUNG=m +# CONFIG_HID_SONY is not set +# CONFIG_HID_SPEEDLINK is not set +# CONFIG_HID_STEELSERIES is not set +# CONFIG_HID_SUNPLUS is not set +# CONFIG_HID_RMI is not set +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +# CONFIG_HID_TIVO is not set +# CONFIG_HID_TOPSEED is not set +# CONFIG_HID_THINGM is not set +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_WACOM is not set +# CONFIG_HID_WIIMOTE is not set +# CONFIG_HID_XINMO is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +# CONFIG_HID_SENSOR_HUB is not set + +# +# USB HID support +# +CONFIG_USB_HID=y +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y + +# +# I2C HID support +# +# CONFIG_I2C_HID is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DEFAULT_PERSIST=y +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_OTG_FSM is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +# CONFIG_USB_XHCI_HCD is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_HCD_PLATFORM=y +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_FUSBH200_HCD is not set +# CONFIG_USB_FOTG210_HCD is not set +# CONFIG_USB_MAX3421_HCD is not set +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_HCD_PLATFORM=y +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_HCD_BCMA is not set +# CONFIG_USB_HCD_SSB is not set +# CONFIG_USB_HCD_TEST_MODE is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +# CONFIG_USB_PRINTER is not set +CONFIG_USB_WDM=m +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=m +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_REALTEK is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_STORAGE_ENE_UB6250 is not set +# CONFIG_USB_UAS is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USBIP_CORE is not set +# CONFIG_USB_MUSB_HDRC is not set +# CONFIG_USB_DWC3 is not set +# CONFIG_USB_DWC2 is not set +# CONFIG_USB_CHIPIDEA is not set +# CONFIG_USB_ISP1760 is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=m +# CONFIG_USB_SERIAL_GENERIC is not set +# CONFIG_USB_SERIAL_SIMPLE is not set +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +# CONFIG_USB_SERIAL_CP210X is not set +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +# CONFIG_USB_SERIAL_FTDI_SIO is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_F81232 is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +# CONFIG_USB_SERIAL_IUU is not set +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_METRO is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_MXUPORT is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +# CONFIG_USB_SERIAL_PL2303 is not set +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_QCAUX is not set +# CONFIG_USB_SERIAL_QUALCOMM is not set +# CONFIG_USB_SERIAL_SPCP8X5 is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_SYMBOL is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +CONFIG_USB_SERIAL_WWAN=m +CONFIG_USB_SERIAL_OPTION=m +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_OPTICON is not set +# CONFIG_USB_SERIAL_XSENS_MT is not set +# CONFIG_USB_SERIAL_WISHBONE is not set +# CONFIG_USB_SERIAL_SSU100 is not set +# CONFIG_USB_SERIAL_QT2 is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_EHSET_TEST_FIXTURE is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +# CONFIG_USB_EZUSB_FX2 is not set +# CONFIG_USB_HSIC_USB3503 is not set +# CONFIG_USB_LINK_LAYER_TEST is not set +# CONFIG_USB_CHAOSKEY is not set + +# +# USB Physical Layer drivers +# +# CONFIG_USB_PHY is not set +# CONFIG_NOP_USB_XCEIV is not set +# CONFIG_AM335X_PHY_USB is not set +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ISP1301 is not set +# CONFIG_USB_ULPI is not set +# CONFIG_USB_GADGET is not set +# CONFIG_USB_LED_TRIG is not set +# CONFIG_UWB is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_CLKGATE is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=8 +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_SPI is not set +# CONFIG_MMC_DW is not set +# CONFIG_MMC_VUB300 is not set +# CONFIG_MMC_USHC is not set +# CONFIG_MMC_USDHI6ROL0 is not set +CONFIG_MMC_SUNXI=y +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +# CONFIG_LEDS_CLASS_FLASH is not set + +# +# LED drivers +# +# CONFIG_LEDS_LM3530 is not set +# CONFIG_LEDS_LM3642 is not set +# CONFIG_LEDS_PCA9532 is not set +# CONFIG_LEDS_GPIO is not set +# CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_LP5521 is not set +# CONFIG_LEDS_LP5523 is not set +# CONFIG_LEDS_LP5562 is not set +# CONFIG_LEDS_LP8501 is not set +# CONFIG_LEDS_LP8860 is not set +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_PCA963X is not set +# CONFIG_LEDS_DAC124S085 is not set +# CONFIG_LEDS_REGULATOR is not set +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_LT3593 is not set +# CONFIG_LEDS_TCA6507 is not set +# CONFIG_LEDS_LM355x is not set + +# +# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) +# +# CONFIG_LEDS_BLINKM is not set +# CONFIG_LEDS_PM8941_WLED is not set + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +# CONFIG_LEDS_TRIGGER_TIMER is not set +# CONFIG_LEDS_TRIGGER_ONESHOT is not set +# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set +# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set +# CONFIG_LEDS_TRIGGER_CPU is not set +# CONFIG_LEDS_TRIGGER_GPIO is not set +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set + +# +# iptables trigger is under Netfilter config (LED target) +# +# CONFIG_LEDS_TRIGGER_TRANSIENT is not set +# CONFIG_LEDS_TRIGGER_CAMERA is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_SYSTOHC=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_ABB5ZES3 is not set +# CONFIG_RTC_DRV_ABX80X is not set +CONFIG_RTC_DRV_DS1307=m +CONFIG_RTC_DRV_DS1374=m +# CONFIG_RTC_DRV_DS1374_WDT is not set +CONFIG_RTC_DRV_DS1672=m +CONFIG_RTC_DRV_DS3232=m +# CONFIG_RTC_DRV_HYM8563 is not set +CONFIG_RTC_DRV_MAX6900=m +CONFIG_RTC_DRV_RS5C372=m +CONFIG_RTC_DRV_ISL1208=m +CONFIG_RTC_DRV_ISL12022=m +CONFIG_RTC_DRV_ISL12057=m +CONFIG_RTC_DRV_X1205=m +CONFIG_RTC_DRV_PCF2127=m +CONFIG_RTC_DRV_PCF8523=m +CONFIG_RTC_DRV_PCF8563=m +# CONFIG_RTC_DRV_PCF85063 is not set +CONFIG_RTC_DRV_PCF8583=m +CONFIG_RTC_DRV_M41T80=m +# CONFIG_RTC_DRV_M41T80_WDT is not set +CONFIG_RTC_DRV_BQ32K=m +CONFIG_RTC_DRV_S35390A=m +CONFIG_RTC_DRV_FM3130=m +CONFIG_RTC_DRV_RX8581=m +CONFIG_RTC_DRV_RX8025=m +CONFIG_RTC_DRV_EM3027=m +CONFIG_RTC_DRV_RV3029C2=m + +# +# SPI RTC drivers +# +CONFIG_RTC_DRV_M41T93=m +CONFIG_RTC_DRV_M41T94=m +CONFIG_RTC_DRV_DS1305=m +# CONFIG_RTC_DRV_DS1343 is not set +# CONFIG_RTC_DRV_DS1347 is not set +CONFIG_RTC_DRV_DS1390=m +CONFIG_RTC_DRV_MAX6902=m +CONFIG_RTC_DRV_R9701=m +CONFIG_RTC_DRV_RS5C348=m +CONFIG_RTC_DRV_DS3234=m +CONFIG_RTC_DRV_PCF2123=m +CONFIG_RTC_DRV_RX4581=m +# CONFIG_RTC_DRV_MCP795 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1685_FAMILY is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_DS2404 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +CONFIG_RTC_DRV_SUNXI=m +# CONFIG_RTC_DRV_SNVS is not set +# CONFIG_RTC_DRV_XGENE is not set + +# +# HID Sensor RTC drivers +# +# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +# CONFIG_VIRT_DRIVERS is not set + +# +# Virtio drivers +# +# CONFIG_VIRTIO_MMIO is not set + +# +# Microsoft Hyper-V guest support +# +CONFIG_STAGING=y +CONFIG_PRISM2_USB=m +# CONFIG_COMEDI is not set +CONFIG_RTLLIB=m +CONFIG_RTLLIB_CRYPTO_CCMP=m +CONFIG_RTLLIB_CRYPTO_TKIP=m +CONFIG_RTLLIB_CRYPTO_WEP=m +CONFIG_R8712U=m +CONFIG_R8188EU=m +CONFIG_88EU_AP_MODE=y +CONFIG_R8723AU=m +CONFIG_8723AU_AP_MODE=y +CONFIG_8723AU_BT_COEXIST=y +# CONFIG_VT6656 is not set +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# +# CONFIG_SPEAKUP is not set +# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set +# CONFIG_STAGING_MEDIA is not set + +# +# Android +# +# CONFIG_USB_WPAN_HCD is not set +# CONFIG_WIMAX_GDM72XX is not set +# CONFIG_LTE_GDM724X is not set +# CONFIG_LUSTRE_FS is not set +# CONFIG_DGAP is not set +# CONFIG_GS_FPGABOOT is not set +# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set +# CONFIG_FB_TFT is not set +# CONFIG_CHROME_PLATFORMS is not set +CONFIG_CLKDEV_LOOKUP=y +CONFIG_HAVE_CLK_PREPARE=y +CONFIG_COMMON_CLK=y + +# +# Common Clock Framework +# +# CONFIG_COMMON_CLK_SI5351 is not set +# CONFIG_COMMON_CLK_SI570 is not set +# CONFIG_CLK_QORIQ is not set +# CONFIG_COMMON_CLK_PXA is not set +# CONFIG_COMMON_CLK_CDCE706 is not set + +# +# Hardware Spinlock drivers +# + +# +# Clock Source drivers +# +CONFIG_CLKSRC_OF=y +CONFIG_CLKSRC_MMIO=y +CONFIG_SUN4I_TIMER=y +CONFIG_SUN5I_HSTIMER=y +CONFIG_ARM_ARCH_TIMER=y +CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y +# CONFIG_ATMEL_PIT is not set +# CONFIG_SH_TIMER_CMT is not set +# CONFIG_SH_TIMER_MTU2 is not set +# CONFIG_SH_TIMER_TMU is not set +# CONFIG_EM_TIMER_STI is not set +# CONFIG_MAILBOX is not set +# CONFIG_IOMMU_SUPPORT is not set + +# +# Remoteproc drivers +# +# CONFIG_STE_MODEM_RPROC is not set + +# +# Rpmsg drivers +# + +# +# SOC (System On Chip) specific Drivers +# +# CONFIG_SOC_TI is not set +# CONFIG_PM_DEVFREQ is not set +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set +# CONFIG_PWM is not set +CONFIG_IRQCHIP=y +CONFIG_ARM_GIC=y +# CONFIG_IPACK_BUS is not set +CONFIG_ARCH_HAS_RESET_CONTROLLER=y +CONFIG_RESET_CONTROLLER=y +# CONFIG_FMC is not set + +# +# PHY Subsystem +# +CONFIG_GENERIC_PHY=y +# CONFIG_BCM_KONA_USB2_PHY is not set +CONFIG_PHY_SUN4I_USB=y +# CONFIG_PHY_SUN9I_USB is not set +# CONFIG_POWERCAP is not set +# CONFIG_MCB is not set + +# +# Android +# +# CONFIG_ANDROID is not set + +# +# Firmware Drivers +# +# CONFIG_FIRMWARE_MEMMAP is not set + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +# CONFIG_EXT2_FS is not set +CONFIG_EXT3_FS=m +CONFIG_EXT3_DEFAULTS_TO_ORDERED=y +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +# CONFIG_EXT4_ENCRYPTION is not set +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD=m +# CONFIG_JBD_DEBUG is not set +CONFIG_JBD2=y +# CONFIG_JBD2_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +# CONFIG_F2FS_FS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_EXPORTFS=y +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +CONFIG_FANOTIFY=y +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=m +# CONFIG_CUSE is not set +# CONFIG_OVERLAY_FS is not set + +# +# Caches +# +CONFIG_FSCACHE=y +# CONFIG_FSCACHE_STATS is not set +# CONFIG_FSCACHE_HISTOGRAM is not set +# CONFIG_FSCACHE_DEBUG is not set +# CONFIG_FSCACHE_OBJECT_LIST is not set +CONFIG_CACHEFILES=y +# CONFIG_CACHEFILES_DEBUG is not set +# CONFIG_CACHEFILES_HISTOGRAM is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_KERNFS=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TMPFS_XATTR=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_CONFIGFS_FS=y +# CONFIG_MISC_FILESYSTEMS is not set +CONFIG_NETWORK_FILESYSTEMS=y +# CONFIG_NFS_FS is not set +# CONFIG_NFSD is not set +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=y +# CONFIG_CIFS_STATS is not set +CONFIG_CIFS_WEAK_PW_HASH=y +CONFIG_CIFS_UPCALL=y +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG is not set +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_CIFS_SMB2=y +CONFIG_CIFS_FSCACHE=y +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_MAC_ROMAN is not set +# CONFIG_NLS_MAC_CELTIC is not set +# CONFIG_NLS_MAC_CENTEURO is not set +# CONFIG_NLS_MAC_CROATIAN is not set +# CONFIG_NLS_MAC_CYRILLIC is not set +# CONFIG_NLS_MAC_GAELIC is not set +# CONFIG_NLS_MAC_GREEK is not set +# CONFIG_NLS_MAC_ICELAND is not set +# CONFIG_NLS_MAC_INUIT is not set +# CONFIG_NLS_MAC_ROMANIAN is not set +# CONFIG_NLS_MAC_TURKISH is not set +CONFIG_NLS_UTF8=y +# CONFIG_DLM is not set + +# +# Kernel hacking +# + +# +# printk and dmesg options +# +CONFIG_PRINTK_TIME=y +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4 +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_DYNAMIC_DEBUG is not set + +# +# Compile-time checks and compiler options +# +# CONFIG_DEBUG_INFO is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=2048 +CONFIG_STRIP_ASM_SYMS=y +# CONFIG_READABLE_ASM is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_PAGE_OWNER is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_FRAME_POINTER=y +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +CONFIG_MAGIC_SYSRQ=y +CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 +CONFIG_DEBUG_KERNEL=y + +# +# Memory Debugging +# +# CONFIG_PAGE_EXTENSION is not set +# CONFIG_DEBUG_PAGEALLOC is not set +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_DEBUG_SHIRQ is not set + +# +# Debug Lockups and Hangs +# +# CONFIG_LOCKUP_DETECTOR is not set +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_PANIC_TIMEOUT=0 +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_SCHED_STACK_END_CHECK is not set +# CONFIG_DEBUG_TIMEKEEPING is not set +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_PREEMPT is not set + +# +# Lock Debugging (spinlocks, mutexes, etc...) +# +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_LOCK_TORTURE_TEST is not set +# CONFIG_STACKTRACE is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_PI_LIST is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set + +# +# RCU Debugging +# +# CONFIG_PROVE_RCU is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_TORTURE_TEST is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=60 +# CONFIG_RCU_CPU_STALL_INFO is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set + +# +# Runtime Testing +# +# CONFIG_LKDTM is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_RBTREE_TEST is not set +# CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_PERCPU_TEST is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_TEST_HEXDUMP is not set +# CONFIG_TEST_STRING_HELPERS is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_TEST_RHASHTABLE is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_TEST_LKM is not set +# CONFIG_TEST_USER_COPY is not set +# CONFIG_TEST_BPF is not set +# CONFIG_TEST_FIRMWARE is not set +# CONFIG_TEST_UDELAY is not set +# CONFIG_MEMTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_ARM_PTDUMP is not set +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_UNWIND is not set +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_LL is not set +CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" +# CONFIG_DEBUG_UART_8250 is not set +CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +# CONFIG_PID_IN_CONTEXTIDR is not set +# CONFIG_DEBUG_SET_MODULE_RONX is not set +# CONFIG_CORESIGHT is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_PERSISTENT_KEYRINGS is not set +# CONFIG_BIG_KEYS is not set +# CONFIG_ENCRYPTED_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP=m +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_USER=m +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +CONFIG_CRYPTO_GF128MUL=m +CONFIG_CRYPTO_NULL=m +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_CRYPTD=m +# CONFIG_CRYPTO_MCRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set +CONFIG_CRYPTO_ABLK_HELPER=m + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=m +CONFIG_CRYPTO_GCM=m +CONFIG_CRYPTO_SEQIV=y + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTR=m +CONFIG_CRYPTO_CTS=m +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +CONFIG_CRYPTO_XTS=m + +# +# Hash modes +# +CONFIG_CRYPTO_CMAC=y +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_XCBC=m +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_CRC32 is not set +# CONFIG_CRYPTO_CRCT10DIF is not set +CONFIG_CRYPTO_GHASH=m +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +CONFIG_CRYPTO_CAST_COMMON=m +CONFIG_CRYPTO_CAST5=m +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=m +CONFIG_CRYPTO_ZLIB=m +# CONFIG_CRYPTO_LZO is not set +# CONFIG_CRYPTO_LZ4 is not set +# CONFIG_CRYPTO_LZ4HC is not set + +# +# Random Number Generation +# +CONFIG_CRYPTO_ANSI_CPRNG=m +# CONFIG_CRYPTO_DRBG_MENU is not set +CONFIG_CRYPTO_USER_API=m +# CONFIG_CRYPTO_USER_API_HASH is not set +CONFIG_CRYPTO_USER_API_SKCIPHER=m +# CONFIG_CRYPTO_USER_API_RNG is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +CONFIG_ARM_CRYPTO=y +CONFIG_CRYPTO_SHA1_ARM=m +CONFIG_CRYPTO_SHA1_ARM_NEON=m +CONFIG_CRYPTO_SHA1_ARM_CE=m +CONFIG_CRYPTO_SHA2_ARM_CE=m +CONFIG_CRYPTO_SHA256_ARM=m +CONFIG_CRYPTO_SHA512_ARM_NEON=m +CONFIG_CRYPTO_AES_ARM=m +CONFIG_CRYPTO_AES_ARM_BS=m +CONFIG_CRYPTO_AES_ARM_CE=m +CONFIG_CRYPTO_GHASH_ARM_CE=m +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_HAVE_ARCH_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_NET_UTILS=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_IO=y +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set +# CONFIG_CRC7 is not set +CONFIG_LIBCRC32C=y +# CONFIG_CRC8 is not set +# CONFIG_AUDIT_ARCH_COMPAT_GENERIC is not set +# CONFIG_RANDOM32_SELFTEST is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +# CONFIG_XZ_DEC is not set +# CONFIG_XZ_DEC_BCJ is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_ASSOCIATIVE_ARRAY=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT_MAP=y +CONFIG_HAS_DMA=y +CONFIG_CPU_RMAP=y +CONFIG_DQL=y +CONFIG_GLOB=y +# CONFIG_GLOB_SELFTEST is not set +CONFIG_NLATTR=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_AVERAGE=y +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set +CONFIG_LIBFDT=y +CONFIG_FONT_SUPPORT=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +CONFIG_ARCH_HAS_SG_CHAIN=y +# CONFIG_VIRTUALIZATION is not set diff --git a/board/bananapi/linux-clk-dmesg-flood.patch.gz b/board/bananapi/linux-clk-dmesg-flood.patch.gz new file mode 100644 index 0000000000..eb35234646 Binary files /dev/null and b/board/bananapi/linux-clk-dmesg-flood.patch.gz differ diff --git a/board/bananapi/linux-rtl8192cu.patch.gz b/board/bananapi/linux-rtl8192cu.patch.gz new file mode 100644 index 0000000000..ca2ab5e245 Binary files /dev/null and b/board/bananapi/linux-rtl8192cu.patch.gz differ diff --git a/board/bananapi/mkimage.sh b/board/bananapi/mkimage.sh new file mode 100755 index 0000000000..21fc43f036 --- /dev/null +++ b/board/bananapi/mkimage.sh @@ -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 + diff --git a/board/bananapi/overlay/etc/board b/board/bananapi/overlay/etc/board new file mode 100644 index 0000000000..44e71628a7 --- /dev/null +++ b/board/bananapi/overlay/etc/board @@ -0,0 +1 @@ +bananapi diff --git a/board/bananapi/overlay/etc/init.d/boardsn b/board/bananapi/overlay/etc/init.d/boardsn new file mode 100755 index 0000000000..f4431e6cf1 --- /dev/null +++ b/board/bananapi/overlay/etc/init.d/boardsn @@ -0,0 +1,5 @@ +#!/bin/bash + +sn=$(cat /sys/class/net/eth0/address 2>/dev/null| tr -d ':') +echo ${sn: -8} + diff --git a/board/bananapi/postscript.sh b/board/bananapi/postscript.sh new file mode 100755 index 0000000000..7eecf8486a --- /dev/null +++ b/board/bananapi/postscript.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +UBOOT_HOST_DIR=$TARGET/../build/host-uboot-tools-* + +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 + diff --git a/board/common/busybox.config b/board/common/busybox.config new file mode 100644 index 0000000000..2f893802ac --- /dev/null +++ b/board/common/busybox.config @@ -0,0 +1,1057 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.24.1 +# Sun Jul 31 15:31:53 2016 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +CONFIG_DESKTOP=y +# CONFIG_EXTRA_COMPAT is not set +CONFIG_INCLUDE_SUSv2=y +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_COMPRESS_USAGE is not set +CONFIG_FEATURE_INSTALLER=y +# CONFIG_INSTALL_NO_USR is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +# CONFIG_PAM is not set +CONFIG_FEATURE_USE_SENDFILE=y +CONFIG_LONG_OPTS=y +CONFIG_FEATURE_DEVPTS=y +CONFIG_FEATURE_CLEAN_UP=y +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_WTMP=y +# CONFIG_FEATURE_PIDFILE is not set +CONFIG_PID_FILE_PATH="" +CONFIG_FEATURE_SUID=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +CONFIG_FEATURE_SYSLOG=y +# CONFIG_FEATURE_HAVE_RPC is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_UNIT_TEST is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +# CONFIG_FEATURE_SYSTEMD is not set +CONFIG_FEATURE_RTMINMAX=y +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SMALL=1 +CONFIG_SHA3_SMALL=1 +# CONFIG_FEATURE_FAST_TOP is not set +# CONFIG_FEATURE_ETC_NETWORKS is not set +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +CONFIG_FEATURE_EDITING_VI=y +CONFIG_FEATURE_EDITING_HISTORY=999 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set +CONFIG_FEATURE_REVERSE_SEARCH=y +CONFIG_FEATURE_TAB_COMPLETION=y +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_FEATURE_SKIP_ROOTFS=y +CONFIG_MONOTONIC_SYSCALL=y +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_FEATURE_SEAMLESS_XZ is not set +# CONFIG_FEATURE_SEAMLESS_LZMA is not set +# CONFIG_FEATURE_SEAMLESS_BZ2 is not set +# CONFIG_FEATURE_SEAMLESS_GZ is not set +# CONFIG_FEATURE_SEAMLESS_Z is not set +# CONFIG_AR is not set +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +# CONFIG_FEATURE_AR_CREATE is not set +# CONFIG_UNCOMPRESS is not set +# CONFIG_GUNZIP is not set +# CONFIG_BUNZIP2 is not set +# CONFIG_UNLZMA is not set +# CONFIG_FEATURE_LZMA_FAST is not set +# CONFIG_LZMA is not set +# CONFIG_UNXZ is not set +# CONFIG_XZ is not set +# CONFIG_BZIP2 is not set +# CONFIG_CPIO is not set +# CONFIG_FEATURE_CPIO_O is not set +# CONFIG_FEATURE_CPIO_P is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +# CONFIG_GZIP is not set +# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set +CONFIG_GZIP_FAST=0 +# CONFIG_FEATURE_GZIP_LEVELS is not set +# CONFIG_LZOP is not set +# CONFIG_LZOP_COMPR_HIGH is not set +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +# CONFIG_TAR is not set +# CONFIG_FEATURE_TAR_CREATE is not set +# CONFIG_FEATURE_TAR_AUTODETECT is not set +# CONFIG_FEATURE_TAR_FROM is not set +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_GNU_EXTENSIONS is not set +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_FEATURE_TAR_TO_COMMAND is not set +# CONFIG_FEATURE_TAR_UNAME_GNAME is not set +# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set +# CONFIG_FEATURE_TAR_SELINUX is not set +# CONFIG_UNZIP is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_FEATURE_DATE_NANO=y +CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_FEATURE_DD_STATUS=y +CONFIG_HOSTID=y +CONFIG_ID=y +# CONFIG_GROUPS is not set +# CONFIG_SHUF is not set +CONFIG_SYNC=y +CONFIG_FEATURE_SYNC_FANCY=y +CONFIG_TEST=y +CONFIG_FEATURE_TEST_64=y +CONFIG_TOUCH=y +# CONFIG_FEATURE_TOUCH_NODEREF is not set +CONFIG_FEATURE_TOUCH_SUSV3=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +CONFIG_TRUNCATE=y +CONFIG_UNLINK=y +# CONFIG_BASE64 is not set +CONFIG_WHO=y +# CONFIG_USERS is not set +# CONFIG_CAL is not set +CONFIG_CATV=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set +CONFIG_CHROOT=y +CONFIG_CKSUM=y +# CONFIG_COMM is not set +CONFIG_CP=y +# CONFIG_FEATURE_CP_LONG_OPTIONS is not set +CONFIG_CUT=y +CONFIG_DF=y +# CONFIG_FEATURE_DF_FANCY is not set +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set +# CONFIG_EXPAND is not set +# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set +CONFIG_EXPR=y +CONFIG_EXPR_MATH_SUPPORT_64=y +CONFIG_FALSE=y +CONFIG_FOLD=y +# CONFIG_FSYNC is not set +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_INSTALL=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_FEATURE_MV_LONG_OPTIONS=y +CONFIG_NICE=y +CONFIG_NOHUP=y +CONFIG_OD=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y +CONFIG_SHA3SUM=y +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +# CONFIG_FEATURE_FLOAT_SLEEP is not set +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +# CONFIG_SPLIT is not set +# CONFIG_FEATURE_SPLIT_FANCY is not set +CONFIG_STAT=y +CONFIG_FEATURE_STAT_FORMAT=y +CONFIG_STTY=y +# CONFIG_SUM is not set +# CONFIG_TAC is not set +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNAME_OSNAME="GNU/Linux" +# CONFIG_UNEXPAND is not set +# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set +CONFIG_UNIQ=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +CONFIG_UUENCODE=y +CONFIG_WC=y +# CONFIG_FEATURE_WC_LARGE is not set +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options +# +CONFIG_FEATURE_VERBOSE=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +# CONFIG_CHVT is not set +# CONFIG_FGCONSOLE is not set +CONFIG_CLEAR=y +# CONFIG_DEALLOCVT is not set +# CONFIG_DUMPKMAP is not set +# CONFIG_KBD_MODE is not set +# CONFIG_LOADFONT is not set +# CONFIG_LOADKMAP is not set +# CONFIG_OPENVT is not set +CONFIG_RESET=y +# CONFIG_RESIZE is not set +# CONFIG_FEATURE_RESIZE_PRINT is not set +# CONFIG_SETCONSOLE is not set +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_SETFONT is not set +# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set +CONFIG_DEFAULT_SETFONT_DIR="" +# CONFIG_SETKEYCODES is not set +# CONFIG_SETLOGCONS is not set +# CONFIG_SHOWKEY is not set +# CONFIG_FEATURE_LOADFONT_PSF2 is not set +# CONFIG_FEATURE_LOADFONT_RAW is not set + +# +# Debian Utilities +# +# CONFIG_MKTEMP is not set +# CONFIG_PIPE_PROGRESS is not set +# CONFIG_RUN_PARTS is not set +# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set +# CONFIG_FEATURE_RUN_PARTS_FANCY is not set +CONFIG_START_STOP_DAEMON=y +CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +# CONFIG_FEATURE_AWK_LIBM is not set +CONFIG_FEATURE_AWK_GNU_EXTENSIONS=y +CONFIG_CMP=y +CONFIG_DIFF=y +# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set +CONFIG_FEATURE_DIFF_DIR=y +# CONFIG_ED is not set +CONFIG_PATCH=y +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_MAX_LEN=4096 +CONFIG_FEATURE_VI_8BIT=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_ASK_TERMINAL=y +CONFIG_FEATURE_VI_UNDO=y +CONFIG_FEATURE_VI_UNDO_QUEUE=y +CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=256 +CONFIG_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_MAXDEPTH=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_FEATURE_FIND_EXEC_PLUS=y +CONFIG_FEATURE_FIND_USER=y +CONFIG_FEATURE_FIND_GROUP=y +CONFIG_FEATURE_FIND_NOT=y +CONFIG_FEATURE_FIND_DEPTH=y +CONFIG_FEATURE_FIND_PAREN=y +CONFIG_FEATURE_FIND_SIZE=y +CONFIG_FEATURE_FIND_PRUNE=y +# CONFIG_FEATURE_FIND_DELETE is not set +CONFIG_FEATURE_FIND_PATH=y +CONFIG_FEATURE_FIND_REGEX=y +# CONFIG_FEATURE_FIND_CONTEXT is not set +# CONFIG_FEATURE_FIND_LINKS is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y +CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +CONFIG_FEATURE_KILL_REMOVED=y +CONFIG_FEATURE_KILL_DELAY=0 +CONFIG_FEATURE_INIT_SCTTY=y +CONFIG_FEATURE_INIT_SYSLOG=y +CONFIG_FEATURE_EXTRA_QUIET=y +# CONFIG_FEATURE_INIT_COREDUMPS is not set +CONFIG_FEATURE_INITRD=y +CONFIG_INIT_TERMINAL_TYPE="linux" +CONFIG_MESG=y +CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y + +# +# Login/Password Management Utilities +# +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set +CONFIG_FEATURE_SHADOWPASSWDS=y +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_USE_BB_SHADOW is not set +CONFIG_USE_BB_CRYPT=y +# CONFIG_USE_BB_CRYPT_SHA is not set +# CONFIG_ADDUSER is not set +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_LAST_ID=0 +CONFIG_FIRST_SYSTEM_ID=0 +CONFIG_LAST_SYSTEM_ID=0 +# CONFIG_ADDGROUP is not set +# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +CONFIG_DELUSER=y +CONFIG_DELGROUP=y +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +CONFIG_GETTY=y +CONFIG_LOGIN=y +# CONFIG_LOGIN_SESSION_AS_CHILD is not set +# CONFIG_LOGIN_SCRIPTS is not set +CONFIG_FEATURE_NOLOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +# CONFIG_CRYPTPW is not set +# CONFIG_CHPASSWD is not set +CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des" +# CONFIG_SU is not set +# CONFIG_FEATURE_SU_SYSLOG is not set +# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set +# CONFIG_SULOGIN is not set +CONFIG_VLOCK=y + +# +# Linux Ext2 FS Progs +# +# CONFIG_CHATTR is not set +# CONFIG_FSCK is not set +# CONFIG_LSATTR is not set +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +CONFIG_INSMOD=y +CONFIG_RMMOD=y +CONFIG_LSMOD=y +CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y +CONFIG_MODPROBE=y +CONFIG_FEATURE_MODPROBE_BLACKLIST=y +# CONFIG_DEPMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y +CONFIG_FEATURE_MODUTILS_ALIAS=y +CONFIG_FEATURE_MODUTILS_SYMBOLS=y +CONFIG_DEFAULT_MODULES_DIR="/lib/modules" +CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" + +# +# Linux System Utilities +# +# CONFIG_BLOCKDEV is not set +CONFIG_FATATTR=y +# CONFIG_FSTRIM is not set +# CONFIG_MDEV is not set +# CONFIG_FEATURE_MDEV_CONF is not set +# CONFIG_FEATURE_MDEV_RENAME is not set +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +# CONFIG_FEATURE_MDEV_EXEC is not set +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +CONFIG_MOUNT=y +# CONFIG_FEATURE_MOUNT_FAKE is not set +# CONFIG_FEATURE_MOUNT_VERBOSE is not set +# CONFIG_FEATURE_MOUNT_HELPERS is not set +# CONFIG_FEATURE_MOUNT_LABEL is not set +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_FEATURE_MOUNT_OTHERTAB=y +# CONFIG_REV is not set +CONFIG_UEVENT=y +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +# CONFIG_BLKID is not set +# CONFIG_FEATURE_BLKID_TYPE is not set +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +# CONFIG_FBSET is not set +# CONFIG_FEATURE_FBSET_FANCY is not set +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +# CONFIG_FDISK is not set +# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set +# CONFIG_FEATURE_FDISK_WRITABLE is not set +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FINDFS is not set +# CONFIG_FLOCK is not set +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_EXT2 is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_MKFS_REISER is not set +# CONFIG_MKFS_VFAT is not set +# CONFIG_GETOPT is not set +# CONFIG_FEATURE_GETOPT_LONG is not set +CONFIG_HEXDUMP=y +# CONFIG_FEATURE_HEXDUMP_REVERSE is not set +# CONFIG_HD is not set +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y +# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set +# CONFIG_IPCRM is not set +# CONFIG_IPCS is not set +# CONFIG_LOSETUP is not set +# CONFIG_LSPCI is not set +CONFIG_LSUSB=y +# CONFIG_MKSWAP is not set +# CONFIG_FEATURE_MKSWAP_UUID is not set +# CONFIG_MORE is not set +# CONFIG_PIVOT_ROOT is not set +# CONFIG_RDATE is not set +# CONFIG_RDEV is not set +# CONFIG_READPROFILE is not set +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +# CONFIG_SETARCH is not set +# CONFIG_SWAPONOFF is not set +# CONFIG_FEATURE_SWAPON_DISCARD is not set +# CONFIG_FEATURE_SWAPON_PRI is not set +# CONFIG_SWITCH_ROOT is not set +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set +# CONFIG_VOLUMEID is not set +# CONFIG_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set +# CONFIG_FEATURE_VOLUMEID_EXFAT is not set +# CONFIG_FEATURE_VOLUMEID_EXT is not set +# CONFIG_FEATURE_VOLUMEID_F2FS is not set +# CONFIG_FEATURE_VOLUMEID_FAT is not set +# CONFIG_FEATURE_VOLUMEID_HFS is not set +# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set +# CONFIG_FEATURE_VOLUMEID_JFS is not set +# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set +# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set +# CONFIG_FEATURE_VOLUMEID_LUKS is not set +# CONFIG_FEATURE_VOLUMEID_NILFS is not set +# CONFIG_FEATURE_VOLUMEID_NTFS is not set +# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set +# CONFIG_FEATURE_VOLUMEID_REISERFS is not set +# CONFIG_FEATURE_VOLUMEID_ROMFS is not set +# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set +# CONFIG_FEATURE_VOLUMEID_SYSV is not set +# CONFIG_FEATURE_VOLUMEID_UDF is not set +# CONFIG_FEATURE_VOLUMEID_XFS is not set + +# +# Miscellaneous Utilities +# +# CONFIG_CONSPY is not set +CONFIG_CROND=y +CONFIG_FEATURE_CROND_D=y +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_FEATURE_CROND_DIR="/data/etc" +CONFIG_I2CGET=y +CONFIG_I2CSET=y +CONFIG_I2CDUMP=y +CONFIG_I2CDETECT=y +CONFIG_LESS=y +CONFIG_FEATURE_LESS_MAXLINES=9999999 +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +CONFIG_FEATURE_LESS_TRUNCATE=y +# CONFIG_FEATURE_LESS_MARKS is not set +CONFIG_FEATURE_LESS_REGEXP=y +# CONFIG_FEATURE_LESS_WINCH is not set +# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set +# CONFIG_FEATURE_LESS_DASHCMD is not set +# CONFIG_FEATURE_LESS_LINENUMS is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +# CONFIG_RFKILL is not set +# CONFIG_SETSERIAL is not set +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set +# CONFIG_WALL is not set +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +# CONFIG_BEEP is not set +CONFIG_FEATURE_BEEP_FREQ=0 +CONFIG_FEATURE_BEEP_LENGTH_MS=0 +# CONFIG_CHAT is not set +# CONFIG_FEATURE_CHAT_NOFAIL is not set +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set +# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set +# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set +# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set +# CONFIG_FEATURE_CHAT_CLR_ABORT is not set +# CONFIG_CHRT is not set +CONFIG_CRONTAB=y +# CONFIG_DC is not set +# CONFIG_FEATURE_DC_LIBM is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +# CONFIG_DEVMEM is not set +CONFIG_EJECT=y +# CONFIG_FEATURE_EJECT_SCSI is not set +# CONFIG_FBSPLASH is not set +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +# CONFIG_FLASH_ERASEALL is not set +# CONFIG_IONICE is not set +# CONFIG_INOTIFYD is not set +# CONFIG_LAST is not set +# CONFIG_FEATURE_LAST_SMALL is not set +# CONFIG_FEATURE_LAST_FANCY is not set +# CONFIG_HDPARM is not set +# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +CONFIG_MAKEDEVS=y +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +CONFIG_FEATURE_MAKEDEVS_TABLE=y +# CONFIG_MAN is not set +# CONFIG_MICROCOM is not set +# CONFIG_MOUNTPOINT is not set +# CONFIG_MT is not set +# CONFIG_RAIDAUTORUN is not set +# CONFIG_READAHEAD is not set +# CONFIG_RUNLEVEL is not set +# CONFIG_RX is not set +# CONFIG_SETSID is not set +# CONFIG_STRINGS is not set +CONFIG_TIME=y +# CONFIG_TIMEOUT is not set +# CONFIG_TTYSIZE is not set +# CONFIG_VOLNAME is not set +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +CONFIG_NAMEIF=y +# CONFIG_FEATURE_NAMEIF_EXTENDED is not set +# CONFIG_NBDCLIENT is not set +# CONFIG_NC is not set +# CONFIG_NC_SERVER is not set +# CONFIG_NC_EXTRA is not set +# CONFIG_NC_110_COMPAT is not set +CONFIG_PING=y +# CONFIG_PING6 is not set +CONFIG_FEATURE_FANCY_PING=y +# CONFIG_WGET is not set +# CONFIG_FEATURE_WGET_STATUSBAR is not set +# CONFIG_FEATURE_WGET_AUTHENTICATION is not set +# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set +# CONFIG_FEATURE_WGET_TIMEOUT is not set +# CONFIG_FEATURE_WGET_OPENSSL is not set +# CONFIG_FEATURE_WGET_SSL_HELPER is not set +# CONFIG_WHOIS is not set +CONFIG_FEATURE_IPV6=y +# CONFIG_FEATURE_UNIX_LOCAL is not set +# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +# CONFIG_ARP is not set +CONFIG_ARPING=y +# CONFIG_BRCTL is not set +# CONFIG_FEATURE_BRCTL_FANCY is not set +# CONFIG_FEATURE_BRCTL_SHOW is not set +# CONFIG_DNSD is not set +# CONFIG_ETHER_WAKE is not set +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPD is not set +# CONFIG_FEATURE_FTP_WRITE is not set +# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +# CONFIG_FEATURE_FTP_AUTHENTICATION is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RANGES is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set +# CONFIG_IFCONFIG is not set +# CONFIG_FEATURE_IFCONFIG_STATUS is not set +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +# CONFIG_FEATURE_IFCONFIG_HW is not set +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +# CONFIG_IFENSLAVE is not set +# CONFIG_IFPLUGD is not set +# CONFIG_IFUPDOWN is not set +CONFIG_IFUPDOWN_IFSTATE_PATH="" +# CONFIG_FEATURE_IFUPDOWN_IP is not set +# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set +# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set +# CONFIG_FEATURE_IFUPDOWN_IPV4 is not set +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +# CONFIG_INETD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set +# CONFIG_FEATURE_INETD_RPC is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2" +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +CONFIG_FEATURE_IP_SHORT_FORMS=y +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +CONFIG_IPTUNNEL=y +CONFIG_IPRULE=y +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +CONFIG_NETSTAT=y +# CONFIG_FEATURE_NETSTAT_WIDE is not set +# CONFIG_FEATURE_NETSTAT_PRG is not set +CONFIG_NSLOOKUP=y +# CONFIG_NTPD is not set +# CONFIG_FEATURE_NTPD_SERVER is not set +# CONFIG_FEATURE_NTPD_CONF is not set +# CONFIG_PSCAN is not set +CONFIG_ROUTE=y +# CONFIG_SLATTACH is not set +# CONFIG_TCPSVD is not set +# CONFIG_TELNET is not set +# CONFIG_FEATURE_TELNET_TTYPE is not set +# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_STANDALONE is not set +# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set +# CONFIG_TFTP is not set +# CONFIG_TFTPD is not set +# CONFIG_FEATURE_TFTP_GET is not set +# CONFIG_FEATURE_TFTP_PUT is not set +# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set +# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +# CONFIG_TRACEROUTE6 is not set +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_TUNCTL is not set +# CONFIG_FEATURE_TUNCTL_UG is not set +# CONFIG_UDHCPC6 is not set +# CONFIG_UDHCPD is not set +# CONFIG_DHCPRELAY is not set +# CONFIG_DUMPLEASES is not set +# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set +# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +CONFIG_DHCPD_LEASES_FILE="" +# CONFIG_UDHCPC is not set +# CONFIG_FEATURE_UDHCPC_ARPING is not set +# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=0 +# CONFIG_FEATURE_UDHCP_RFC3397 is not set +# CONFIG_FEATURE_UDHCP_8021Q is not set +CONFIG_UDHCPC_DEFAULT_SCRIPT="" +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="" +# CONFIG_UDPSVD is not set +# CONFIG_VCONFIG is not set +# CONFIG_ZCIP is not set + +# +# Print Utilities +# +# CONFIG_LPD is not set +# CONFIG_LPR is not set +# CONFIG_LPQ is not set + +# +# Mail Utilities +# +# CONFIG_MAKEMIME is not set +CONFIG_FEATURE_MIME_CHARSET="" +# CONFIG_POPMAILDIR is not set +# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set +# CONFIG_REFORMIME is not set +# CONFIG_FEATURE_REFORMIME_COMPAT is not set +# CONFIG_SENDMAIL is not set + +# +# Process Utilities +# +# CONFIG_IOSTAT is not set +# CONFIG_LSOF is not set +# CONFIG_MPSTAT is not set +# CONFIG_NMETER is not set +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set +# CONFIG_PSTREE is not set +# CONFIG_PWDX is not set +# CONFIG_SMEMCAP is not set +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +# CONFIG_FEATURE_TOP_SMP_CPU is not set +# CONFIG_FEATURE_TOP_DECIMALS is not set +# CONFIG_FEATURE_TOP_SMP_PROCESS is not set +# CONFIG_FEATURE_TOPMEM is not set +CONFIG_UPTIME=y +# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set +CONFIG_FREE=y +# CONFIG_FUSER is not set +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +# CONFIG_PGREP is not set +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +# CONFIG_PKILL is not set +CONFIG_PS=y +# CONFIG_FEATURE_PS_WIDE is not set +# CONFIG_FEATURE_PS_LONG is not set +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +# CONFIG_FEATURE_SHOW_THREADS is not set +CONFIG_WATCH=y + +# +# Runit Utilities +# +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_SV is not set +CONFIG_SV_DEFAULT_SERVICE_DIR="" +# CONFIG_SVLOGD is not set +# CONFIG_CHPST is not set +# CONFIG_SETUIDGID is not set +# CONFIG_ENVUIDGID is not set +# CONFIG_ENVDIR is not set +# CONFIG_SOFTLIMIT is not set +# CONFIG_CHCON is not set +# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RESTORECON is not set +# CONFIG_RUNCON is not set +# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_SETSEBOOL is not set +# CONFIG_SESTATUS is not set + +# +# Shells +# +# CONFIG_ASH is not set +# CONFIG_ASH_BASH_COMPAT is not set +# CONFIG_ASH_IDLE_TIMEOUT is not set +# CONFIG_ASH_JOB_CONTROL is not set +# CONFIG_ASH_ALIAS is not set +# CONFIG_ASH_GETOPTS is not set +# CONFIG_ASH_BUILTIN_ECHO is not set +# CONFIG_ASH_BUILTIN_PRINTF is not set +# CONFIG_ASH_BUILTIN_TEST is not set +# CONFIG_ASH_HELP is not set +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_ASH_EXPAND_PRMT is not set +# CONFIG_CTTYHACK is not set +# CONFIG_HUSH is not set +# CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set +# CONFIG_HUSH_HELP is not set +# CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set +# CONFIG_HUSH_JOB is not set +# CONFIG_HUSH_TICK is not set +# CONFIG_HUSH_IF is not set +# CONFIG_HUSH_LOOPS is not set +# CONFIG_HUSH_CASE is not set +# CONFIG_HUSH_FUNCTIONS is not set +# CONFIG_HUSH_LOCAL is not set +# CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_MSH is not set +# CONFIG_FEATURE_SH_IS_ASH is not set +# CONFIG_FEATURE_SH_IS_HUSH is not set +CONFIG_FEATURE_SH_IS_NONE=y +# CONFIG_FEATURE_BASH_IS_ASH is not set +# CONFIG_FEATURE_BASH_IS_HUSH is not set +CONFIG_FEATURE_BASH_IS_NONE=y +# CONFIG_SH_MATH_SUPPORT is not set +# CONFIG_SH_MATH_SUPPORT_64 is not set +# CONFIG_FEATURE_SH_EXTRA_QUIET is not set +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +# CONFIG_FEATURE_SH_HISTFILESIZE is not set + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +# CONFIG_FEATURE_REMOTE_LOG is not set +# CONFIG_FEATURE_SYSLOGD_DUP is not set +CONFIG_FEATURE_SYSLOGD_CFG=y +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +CONFIG_FEATURE_KMSG_SYSLOG=y +# CONFIG_KLOGD is not set +# CONFIG_FEATURE_KLOGD_KLOGCTL is not set +CONFIG_LOGGER=y diff --git a/board/common/busybox_initramfs.config b/board/common/busybox_initramfs.config new file mode 100644 index 0000000000..c08079b66e --- /dev/null +++ b/board/common/busybox_initramfs.config @@ -0,0 +1,1057 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.24.2 +# Sat Feb 11 14:55:38 2017 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +CONFIG_DESKTOP=y +# CONFIG_EXTRA_COMPAT is not set +CONFIG_INCLUDE_SUSv2=y +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_COMPRESS_USAGE is not set +CONFIG_FEATURE_INSTALLER=y +# CONFIG_INSTALL_NO_USR is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +# CONFIG_PAM is not set +CONFIG_FEATURE_USE_SENDFILE=y +CONFIG_LONG_OPTS=y +CONFIG_FEATURE_DEVPTS=y +CONFIG_FEATURE_CLEAN_UP=y +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_WTMP=y +# CONFIG_FEATURE_PIDFILE is not set +CONFIG_PID_FILE_PATH="" +CONFIG_FEATURE_SUID=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +CONFIG_FEATURE_SYSLOG=y +# CONFIG_FEATURE_HAVE_RPC is not set + +# +# Build Options +# +CONFIG_STATIC=y +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_UNIT_TEST is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +# CONFIG_FEATURE_SYSTEMD is not set +CONFIG_FEATURE_RTMINMAX=y +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SMALL=1 +CONFIG_SHA3_SMALL=1 +# CONFIG_FEATURE_FAST_TOP is not set +# CONFIG_FEATURE_ETC_NETWORKS is not set +# CONFIG_FEATURE_USE_TERMIOS is not set +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +CONFIG_FEATURE_EDITING_VI=y +CONFIG_FEATURE_EDITING_HISTORY=999 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set +CONFIG_FEATURE_REVERSE_SEARCH=y +CONFIG_FEATURE_TAB_COMPLETION=y +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_FEATURE_SKIP_ROOTFS=y +CONFIG_MONOTONIC_SYSCALL=y +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_FEATURE_SEAMLESS_XZ is not set +# CONFIG_FEATURE_SEAMLESS_LZMA is not set +# CONFIG_FEATURE_SEAMLESS_BZ2 is not set +# CONFIG_FEATURE_SEAMLESS_GZ is not set +# CONFIG_FEATURE_SEAMLESS_Z is not set +# CONFIG_AR is not set +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +# CONFIG_FEATURE_AR_CREATE is not set +# CONFIG_UNCOMPRESS is not set +# CONFIG_GUNZIP is not set +# CONFIG_BUNZIP2 is not set +# CONFIG_UNLZMA is not set +# CONFIG_FEATURE_LZMA_FAST is not set +# CONFIG_LZMA is not set +# CONFIG_UNXZ is not set +# CONFIG_XZ is not set +# CONFIG_BZIP2 is not set +# CONFIG_CPIO is not set +# CONFIG_FEATURE_CPIO_O is not set +# CONFIG_FEATURE_CPIO_P is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +# CONFIG_GZIP is not set +# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set +CONFIG_GZIP_FAST=0 +# CONFIG_FEATURE_GZIP_LEVELS is not set +# CONFIG_LZOP is not set +# CONFIG_LZOP_COMPR_HIGH is not set +# CONFIG_RPM is not set +# CONFIG_RPM2CPIO is not set +# CONFIG_TAR is not set +# CONFIG_FEATURE_TAR_CREATE is not set +# CONFIG_FEATURE_TAR_AUTODETECT is not set +# CONFIG_FEATURE_TAR_FROM is not set +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_GNU_EXTENSIONS is not set +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_FEATURE_TAR_TO_COMMAND is not set +# CONFIG_FEATURE_TAR_UNAME_GNAME is not set +# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set +# CONFIG_FEATURE_TAR_SELINUX is not set +# CONFIG_UNZIP is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +CONFIG_FEATURE_DATE_NANO=y +CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_FEATURE_DD_STATUS=y +# CONFIG_HOSTID is not set +CONFIG_ID=y +# CONFIG_GROUPS is not set +# CONFIG_SHUF is not set +CONFIG_SYNC=y +CONFIG_FEATURE_SYNC_FANCY=y +CONFIG_TEST=y +CONFIG_FEATURE_TEST_64=y +CONFIG_TOUCH=y +# CONFIG_FEATURE_TOUCH_NODEREF is not set +CONFIG_FEATURE_TOUCH_SUSV3=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +CONFIG_TRUNCATE=y +CONFIG_UNLINK=y +# CONFIG_BASE64 is not set +# CONFIG_WHO is not set +# CONFIG_USERS is not set +# CONFIG_CAL is not set +# CONFIG_CATV is not set +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set +CONFIG_CHROOT=y +# CONFIG_CKSUM is not set +# CONFIG_COMM is not set +CONFIG_CP=y +# CONFIG_FEATURE_CP_LONG_OPTIONS is not set +CONFIG_CUT=y +CONFIG_DF=y +CONFIG_FEATURE_DF_FANCY=y +CONFIG_DIRNAME=y +# CONFIG_DOS2UNIX is not set +# CONFIG_UNIX2DOS is not set +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set +# CONFIG_EXPAND is not set +# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set +# CONFIG_EXPR is not set +# CONFIG_EXPR_MATH_SUPPORT_64 is not set +CONFIG_FALSE=y +CONFIG_FOLD=y +# CONFIG_FSYNC is not set +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +# CONFIG_INSTALL is not set +# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set +CONFIG_LN=y +# CONFIG_LOGNAME is not set +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_FEATURE_MV_LONG_OPTIONS=y +CONFIG_NICE=y +CONFIG_NOHUP=y +# CONFIG_OD is not set +# CONFIG_PRINTENV is not set +# CONFIG_PRINTF is not set +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set +# CONFIG_SEQ is not set +# CONFIG_SHA1SUM is not set +# CONFIG_SHA256SUM is not set +# CONFIG_SHA512SUM is not set +# CONFIG_SHA3SUM is not set +CONFIG_SLEEP=y +# CONFIG_FEATURE_FANCY_SLEEP is not set +# CONFIG_FEATURE_FLOAT_SLEEP is not set +# CONFIG_SORT is not set +# CONFIG_FEATURE_SORT_BIG is not set +# CONFIG_SPLIT is not set +# CONFIG_FEATURE_SPLIT_FANCY is not set +# CONFIG_STAT is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +# CONFIG_STTY is not set +# CONFIG_SUM is not set +# CONFIG_TAC is not set +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +# CONFIG_TEE is not set +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +CONFIG_TRUE=y +# CONFIG_TTY is not set +# CONFIG_UNAME is not set +CONFIG_UNAME_OSNAME="" +# CONFIG_UNEXPAND is not set +# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set +# CONFIG_UNIQ is not set +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_UUENCODE is not set +# CONFIG_WC is not set +# CONFIG_FEATURE_WC_LARGE is not set +CONFIG_WHOAMI=y +# CONFIG_YES is not set + +# +# Common options +# +CONFIG_FEATURE_VERBOSE=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +# CONFIG_CHVT is not set +# CONFIG_FGCONSOLE is not set +# CONFIG_CLEAR is not set +# CONFIG_DEALLOCVT is not set +# CONFIG_DUMPKMAP is not set +# CONFIG_KBD_MODE is not set +# CONFIG_LOADFONT is not set +# CONFIG_LOADKMAP is not set +# CONFIG_OPENVT is not set +# CONFIG_RESET is not set +# CONFIG_RESIZE is not set +# CONFIG_FEATURE_RESIZE_PRINT is not set +# CONFIG_SETCONSOLE is not set +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_SETFONT is not set +# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set +CONFIG_DEFAULT_SETFONT_DIR="" +# CONFIG_SETKEYCODES is not set +# CONFIG_SETLOGCONS is not set +# CONFIG_SHOWKEY is not set +# CONFIG_FEATURE_LOADFONT_PSF2 is not set +# CONFIG_FEATURE_LOADFONT_RAW is not set + +# +# Debian Utilities +# +# CONFIG_MKTEMP is not set +# CONFIG_PIPE_PROGRESS is not set +# CONFIG_RUN_PARTS is not set +# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set +# CONFIG_FEATURE_RUN_PARTS_FANCY is not set +# CONFIG_START_STOP_DAEMON is not set +# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set +# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set +CONFIG_WHICH=y + +# +# Editors +# +# CONFIG_AWK is not set +# CONFIG_FEATURE_AWK_LIBM is not set +# CONFIG_FEATURE_AWK_GNU_EXTENSIONS is not set +# CONFIG_CMP is not set +# CONFIG_DIFF is not set +# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set +# CONFIG_FEATURE_DIFF_DIR is not set +# CONFIG_ED is not set +# CONFIG_PATCH is not set +CONFIG_SED=y +# CONFIG_VI is not set +CONFIG_FEATURE_VI_MAX_LEN=0 +# CONFIG_FEATURE_VI_8BIT is not set +# CONFIG_FEATURE_VI_COLON is not set +# CONFIG_FEATURE_VI_YANKMARK is not set +# CONFIG_FEATURE_VI_SEARCH is not set +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +# CONFIG_FEATURE_VI_USE_SIGNALS is not set +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +# CONFIG_FEATURE_VI_WIN_RESIZE is not set +# CONFIG_FEATURE_VI_ASK_TERMINAL is not set +# CONFIG_FEATURE_VI_UNDO is not set +# CONFIG_FEATURE_VI_UNDO_QUEUE is not set +CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=0 +# CONFIG_FEATURE_ALLOW_EXEC is not set + +# +# Finding Utilities +# +# CONFIG_FIND is not set +# CONFIG_FEATURE_FIND_PRINT0 is not set +# CONFIG_FEATURE_FIND_MTIME is not set +# CONFIG_FEATURE_FIND_MMIN is not set +# CONFIG_FEATURE_FIND_PERM is not set +# CONFIG_FEATURE_FIND_TYPE is not set +# CONFIG_FEATURE_FIND_XDEV is not set +# CONFIG_FEATURE_FIND_MAXDEPTH is not set +# CONFIG_FEATURE_FIND_NEWER is not set +# CONFIG_FEATURE_FIND_INUM is not set +# CONFIG_FEATURE_FIND_EXEC is not set +# CONFIG_FEATURE_FIND_EXEC_PLUS is not set +# CONFIG_FEATURE_FIND_USER is not set +# CONFIG_FEATURE_FIND_GROUP is not set +# CONFIG_FEATURE_FIND_NOT is not set +# CONFIG_FEATURE_FIND_DEPTH is not set +# CONFIG_FEATURE_FIND_PAREN is not set +# CONFIG_FEATURE_FIND_SIZE is not set +# CONFIG_FEATURE_FIND_PRUNE is not set +# CONFIG_FEATURE_FIND_DELETE is not set +# CONFIG_FEATURE_FIND_PATH is not set +# CONFIG_FEATURE_FIND_REGEX is not set +# CONFIG_FEATURE_FIND_CONTEXT is not set +# CONFIG_FEATURE_FIND_LINKS is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y +CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +CONFIG_INIT=y +# CONFIG_FEATURE_USE_INITTAB is not set +# CONFIG_FEATURE_KILL_REMOVED is not set +CONFIG_FEATURE_KILL_DELAY=0 +CONFIG_FEATURE_INIT_SCTTY=y +CONFIG_FEATURE_INIT_SYSLOG=y +CONFIG_FEATURE_EXTRA_QUIET=y +# CONFIG_FEATURE_INIT_COREDUMPS is not set +CONFIG_FEATURE_INITRD=y +CONFIG_INIT_TERMINAL_TYPE="linux" +CONFIG_MESG=y +CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y + +# +# Login/Password Management Utilities +# +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set +# CONFIG_FEATURE_SHADOWPASSWDS is not set +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_USE_BB_SHADOW is not set +CONFIG_USE_BB_CRYPT=y +# CONFIG_USE_BB_CRYPT_SHA is not set +# CONFIG_ADDUSER is not set +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_LAST_ID=0 +CONFIG_FIRST_SYSTEM_ID=0 +CONFIG_LAST_SYSTEM_ID=0 +# CONFIG_ADDGROUP is not set +# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +# CONFIG_DELUSER is not set +# CONFIG_DELGROUP is not set +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +CONFIG_GETTY=y +# CONFIG_LOGIN is not set +# CONFIG_LOGIN_SESSION_AS_CHILD is not set +# CONFIG_LOGIN_SCRIPTS is not set +# CONFIG_FEATURE_NOLOGIN is not set +# CONFIG_FEATURE_SECURETTY is not set +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +# CONFIG_CRYPTPW is not set +# CONFIG_CHPASSWD is not set +CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des" +# CONFIG_SU is not set +# CONFIG_FEATURE_SU_SYSLOG is not set +# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Linux Ext2 FS Progs +# +# CONFIG_CHATTR is not set +# CONFIG_FSCK is not set +# CONFIG_LSATTR is not set +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +# CONFIG_INSMOD is not set +# CONFIG_RMMOD is not set +# CONFIG_LSMOD is not set +# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +# CONFIG_MODPROBE is not set +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_DEPMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set +# CONFIG_FEATURE_MODUTILS_ALIAS is not set +# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set +CONFIG_DEFAULT_MODULES_DIR="" +CONFIG_DEFAULT_DEPMOD_FILE="" + +# +# Linux System Utilities +# +# CONFIG_BLOCKDEV is not set +# CONFIG_FATATTR is not set +# CONFIG_FSTRIM is not set +# CONFIG_MDEV is not set +# CONFIG_FEATURE_MDEV_CONF is not set +# CONFIG_FEATURE_MDEV_RENAME is not set +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +# CONFIG_FEATURE_MDEV_EXEC is not set +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +CONFIG_MOUNT=y +# CONFIG_FEATURE_MOUNT_FAKE is not set +# CONFIG_FEATURE_MOUNT_VERBOSE is not set +# CONFIG_FEATURE_MOUNT_HELPERS is not set +# CONFIG_FEATURE_MOUNT_LABEL is not set +# CONFIG_FEATURE_MOUNT_NFS is not set +# CONFIG_FEATURE_MOUNT_CIFS is not set +CONFIG_FEATURE_MOUNT_FLAGS=y +# CONFIG_FEATURE_MOUNT_FSTAB is not set +# CONFIG_FEATURE_MOUNT_OTHERTAB is not set +# CONFIG_REV is not set +# CONFIG_UEVENT is not set +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +# CONFIG_BLKID is not set +# CONFIG_FEATURE_BLKID_TYPE is not set +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +# CONFIG_FBSET is not set +# CONFIG_FEATURE_FBSET_FANCY is not set +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +# CONFIG_FDISK is not set +# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set +# CONFIG_FEATURE_FDISK_WRITABLE is not set +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FINDFS is not set +# CONFIG_FLOCK is not set +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_EXT2 is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_MKFS_REISER is not set +# CONFIG_MKFS_VFAT is not set +# CONFIG_GETOPT is not set +# CONFIG_FEATURE_GETOPT_LONG is not set +# CONFIG_HEXDUMP is not set +# CONFIG_FEATURE_HEXDUMP_REVERSE is not set +# CONFIG_HD is not set +# CONFIG_HWCLOCK is not set +# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set +# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set +# CONFIG_IPCRM is not set +# CONFIG_IPCS is not set +# CONFIG_LOSETUP is not set +# CONFIG_LSPCI is not set +# CONFIG_LSUSB is not set +# CONFIG_MKSWAP is not set +# CONFIG_FEATURE_MKSWAP_UUID is not set +# CONFIG_MORE is not set +# CONFIG_PIVOT_ROOT is not set +# CONFIG_RDATE is not set +# CONFIG_RDEV is not set +# CONFIG_READPROFILE is not set +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +# CONFIG_SETARCH is not set +# CONFIG_SWAPONOFF is not set +# CONFIG_FEATURE_SWAPON_DISCARD is not set +# CONFIG_FEATURE_SWAPON_PRI is not set +# CONFIG_SWITCH_ROOT is not set +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set +# CONFIG_VOLUMEID is not set +# CONFIG_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set +# CONFIG_FEATURE_VOLUMEID_EXFAT is not set +# CONFIG_FEATURE_VOLUMEID_EXT is not set +# CONFIG_FEATURE_VOLUMEID_F2FS is not set +# CONFIG_FEATURE_VOLUMEID_FAT is not set +# CONFIG_FEATURE_VOLUMEID_HFS is not set +# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set +# CONFIG_FEATURE_VOLUMEID_JFS is not set +# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set +# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set +# CONFIG_FEATURE_VOLUMEID_LUKS is not set +# CONFIG_FEATURE_VOLUMEID_NILFS is not set +# CONFIG_FEATURE_VOLUMEID_NTFS is not set +# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set +# CONFIG_FEATURE_VOLUMEID_REISERFS is not set +# CONFIG_FEATURE_VOLUMEID_ROMFS is not set +# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set +# CONFIG_FEATURE_VOLUMEID_SYSV is not set +# CONFIG_FEATURE_VOLUMEID_UDF is not set +# CONFIG_FEATURE_VOLUMEID_XFS is not set + +# +# Miscellaneous Utilities +# +# CONFIG_CONSPY is not set +# CONFIG_CROND is not set +# CONFIG_FEATURE_CROND_D is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_FEATURE_CROND_DIR="" +# CONFIG_I2CGET is not set +# CONFIG_I2CSET is not set +# CONFIG_I2CDUMP is not set +# CONFIG_I2CDETECT is not set +# CONFIG_LESS is not set +CONFIG_FEATURE_LESS_MAXLINES=0 +# CONFIG_FEATURE_LESS_BRACKETS is not set +# CONFIG_FEATURE_LESS_FLAGS is not set +# CONFIG_FEATURE_LESS_TRUNCATE is not set +# CONFIG_FEATURE_LESS_MARKS is not set +# CONFIG_FEATURE_LESS_REGEXP is not set +# CONFIG_FEATURE_LESS_WINCH is not set +# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set +# CONFIG_FEATURE_LESS_DASHCMD is not set +# CONFIG_FEATURE_LESS_LINENUMS is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +# CONFIG_RFKILL is not set +# CONFIG_SETSERIAL is not set +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set +# CONFIG_WALL is not set +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +# CONFIG_BEEP is not set +CONFIG_FEATURE_BEEP_FREQ=0 +CONFIG_FEATURE_BEEP_LENGTH_MS=0 +# CONFIG_CHAT is not set +# CONFIG_FEATURE_CHAT_NOFAIL is not set +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set +# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set +# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set +# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set +# CONFIG_FEATURE_CHAT_CLR_ABORT is not set +# CONFIG_CHRT is not set +# CONFIG_CRONTAB is not set +# CONFIG_DC is not set +# CONFIG_FEATURE_DC_LIBM is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +# CONFIG_DEVMEM is not set +# CONFIG_EJECT is not set +# CONFIG_FEATURE_EJECT_SCSI is not set +# CONFIG_FBSPLASH is not set +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +# CONFIG_FLASH_ERASEALL is not set +# CONFIG_IONICE is not set +# CONFIG_INOTIFYD is not set +# CONFIG_LAST is not set +# CONFIG_FEATURE_LAST_SMALL is not set +# CONFIG_FEATURE_LAST_FANCY is not set +# CONFIG_HDPARM is not set +# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +# CONFIG_FEATURE_MAKEDEVS_TABLE is not set +# CONFIG_MAN is not set +# CONFIG_MICROCOM is not set +# CONFIG_MOUNTPOINT is not set +# CONFIG_MT is not set +# CONFIG_RAIDAUTORUN is not set +# CONFIG_READAHEAD is not set +# CONFIG_RUNLEVEL is not set +# CONFIG_RX is not set +# CONFIG_SETSID is not set +# CONFIG_STRINGS is not set +CONFIG_TIME=y +# CONFIG_TIMEOUT is not set +# CONFIG_TTYSIZE is not set +# CONFIG_VOLNAME is not set +# CONFIG_WATCHDOG is not set + +# +# Networking Utilities +# +# CONFIG_NAMEIF is not set +# CONFIG_FEATURE_NAMEIF_EXTENDED is not set +# CONFIG_NBDCLIENT is not set +# CONFIG_NC is not set +# CONFIG_NC_SERVER is not set +# CONFIG_NC_EXTRA is not set +# CONFIG_NC_110_COMPAT is not set +# CONFIG_PING is not set +# CONFIG_PING6 is not set +# CONFIG_FEATURE_FANCY_PING is not set +# CONFIG_WGET is not set +# CONFIG_FEATURE_WGET_STATUSBAR is not set +# CONFIG_FEATURE_WGET_AUTHENTICATION is not set +# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set +# CONFIG_FEATURE_WGET_TIMEOUT is not set +# CONFIG_FEATURE_WGET_OPENSSL is not set +# CONFIG_FEATURE_WGET_SSL_HELPER is not set +# CONFIG_WHOIS is not set +# CONFIG_FEATURE_IPV6 is not set +# CONFIG_FEATURE_UNIX_LOCAL is not set +# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +# CONFIG_ARP is not set +# CONFIG_ARPING is not set +# CONFIG_BRCTL is not set +# CONFIG_FEATURE_BRCTL_FANCY is not set +# CONFIG_FEATURE_BRCTL_SHOW is not set +# CONFIG_DNSD is not set +# CONFIG_ETHER_WAKE is not set +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPD is not set +# CONFIG_FEATURE_FTP_WRITE is not set +# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +# CONFIG_FEATURE_FTP_AUTHENTICATION is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +# CONFIG_HOSTNAME is not set +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RANGES is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set +# CONFIG_IFCONFIG is not set +# CONFIG_FEATURE_IFCONFIG_STATUS is not set +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +# CONFIG_FEATURE_IFCONFIG_HW is not set +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +# CONFIG_IFENSLAVE is not set +# CONFIG_IFPLUGD is not set +# CONFIG_IFUPDOWN is not set +CONFIG_IFUPDOWN_IFSTATE_PATH="" +# CONFIG_FEATURE_IFUPDOWN_IP is not set +# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set +# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set +# CONFIG_FEATURE_IFUPDOWN_IPV4 is not set +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +# CONFIG_INETD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set +# CONFIG_FEATURE_INETD_RPC is not set +# CONFIG_IP is not set +# CONFIG_FEATURE_IP_ADDRESS is not set +# CONFIG_FEATURE_IP_LINK is not set +# CONFIG_FEATURE_IP_ROUTE is not set +CONFIG_FEATURE_IP_ROUTE_DIR="" +# CONFIG_FEATURE_IP_TUNNEL is not set +# CONFIG_FEATURE_IP_RULE is not set +# CONFIG_FEATURE_IP_SHORT_FORMS is not set +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_IPRULE is not set +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +# CONFIG_NETSTAT is not set +# CONFIG_FEATURE_NETSTAT_WIDE is not set +# CONFIG_FEATURE_NETSTAT_PRG is not set +# CONFIG_NSLOOKUP is not set +# CONFIG_NTPD is not set +# CONFIG_FEATURE_NTPD_SERVER is not set +# CONFIG_FEATURE_NTPD_CONF is not set +# CONFIG_PSCAN is not set +# CONFIG_ROUTE is not set +# CONFIG_SLATTACH is not set +# CONFIG_TCPSVD is not set +# CONFIG_TELNET is not set +# CONFIG_FEATURE_TELNET_TTYPE is not set +# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_STANDALONE is not set +# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set +# CONFIG_TFTP is not set +# CONFIG_TFTPD is not set +# CONFIG_FEATURE_TFTP_GET is not set +# CONFIG_FEATURE_TFTP_PUT is not set +# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set +# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_TFTP_DEBUG is not set +# CONFIG_TRACEROUTE is not set +# CONFIG_TRACEROUTE6 is not set +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_TUNCTL is not set +# CONFIG_FEATURE_TUNCTL_UG is not set +# CONFIG_UDHCPC6 is not set +# CONFIG_UDHCPD is not set +# CONFIG_DHCPRELAY is not set +# CONFIG_DUMPLEASES is not set +# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set +# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +CONFIG_DHCPD_LEASES_FILE="" +# CONFIG_UDHCPC is not set +# CONFIG_FEATURE_UDHCPC_ARPING is not set +# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=0 +# CONFIG_FEATURE_UDHCP_RFC3397 is not set +# CONFIG_FEATURE_UDHCP_8021Q is not set +CONFIG_UDHCPC_DEFAULT_SCRIPT="" +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="" +# CONFIG_UDPSVD is not set +# CONFIG_VCONFIG is not set +# CONFIG_ZCIP is not set + +# +# Print Utilities +# +# CONFIG_LPD is not set +# CONFIG_LPR is not set +# CONFIG_LPQ is not set + +# +# Mail Utilities +# +# CONFIG_MAKEMIME is not set +CONFIG_FEATURE_MIME_CHARSET="" +# CONFIG_POPMAILDIR is not set +# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set +# CONFIG_REFORMIME is not set +# CONFIG_FEATURE_REFORMIME_COMPAT is not set +# CONFIG_SENDMAIL is not set + +# +# Process Utilities +# +# CONFIG_IOSTAT is not set +# CONFIG_LSOF is not set +# CONFIG_MPSTAT is not set +# CONFIG_NMETER is not set +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set +# CONFIG_PSTREE is not set +# CONFIG_PWDX is not set +# CONFIG_SMEMCAP is not set +# CONFIG_TOP is not set +# CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE is not set +# CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS is not set +# CONFIG_FEATURE_TOP_SMP_CPU is not set +# CONFIG_FEATURE_TOP_DECIMALS is not set +# CONFIG_FEATURE_TOP_SMP_PROCESS is not set +# CONFIG_FEATURE_TOPMEM is not set +# CONFIG_UPTIME is not set +# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set +# CONFIG_FREE is not set +# CONFIG_FUSER is not set +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +# CONFIG_PGREP is not set +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +# CONFIG_PKILL is not set +# CONFIG_PS is not set +# CONFIG_FEATURE_PS_WIDE is not set +# CONFIG_FEATURE_PS_LONG is not set +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +# CONFIG_RENICE is not set +# CONFIG_BB_SYSCTL is not set +# CONFIG_FEATURE_SHOW_THREADS is not set +# CONFIG_WATCH is not set + +# +# Runit Utilities +# +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_SV is not set +CONFIG_SV_DEFAULT_SERVICE_DIR="" +# CONFIG_SVLOGD is not set +# CONFIG_CHPST is not set +# CONFIG_SETUIDGID is not set +# CONFIG_ENVUIDGID is not set +# CONFIG_ENVDIR is not set +# CONFIG_SOFTLIMIT is not set +# CONFIG_CHCON is not set +# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RESTORECON is not set +# CONFIG_RUNCON is not set +# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_SETSEBOOL is not set +# CONFIG_SESTATUS is not set + +# +# Shells +# +CONFIG_ASH=y +CONFIG_ASH_BASH_COMPAT=y +# CONFIG_ASH_IDLE_TIMEOUT is not set +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_GETOPTS=y +CONFIG_ASH_BUILTIN_ECHO=y +CONFIG_ASH_BUILTIN_PRINTF=y +CONFIG_ASH_BUILTIN_TEST=y +CONFIG_ASH_HELP=y +CONFIG_ASH_CMDCMD=y +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +CONFIG_ASH_RANDOM_SUPPORT=y +CONFIG_ASH_EXPAND_PRMT=y +# CONFIG_CTTYHACK is not set +# CONFIG_HUSH is not set +# CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set +# CONFIG_HUSH_HELP is not set +# CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set +# CONFIG_HUSH_JOB is not set +# CONFIG_HUSH_TICK is not set +# CONFIG_HUSH_IF is not set +# CONFIG_HUSH_LOOPS is not set +# CONFIG_HUSH_CASE is not set +# CONFIG_HUSH_FUNCTIONS is not set +# CONFIG_HUSH_LOCAL is not set +# CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_MSH is not set +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +# CONFIG_FEATURE_BASH_IS_ASH is not set +# CONFIG_FEATURE_BASH_IS_HUSH is not set +CONFIG_FEATURE_BASH_IS_NONE=y +CONFIG_SH_MATH_SUPPORT=y +CONFIG_SH_MATH_SUPPORT_64=y +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +CONFIG_FEATURE_SH_HISTFILESIZE=y + +# +# System Logging Utilities +# +# CONFIG_SYSLOGD is not set +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +# CONFIG_FEATURE_REMOTE_LOG is not set +# CONFIG_FEATURE_SYSLOGD_DUP is not set +# CONFIG_FEATURE_SYSLOGD_CFG is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +# CONFIG_FEATURE_KMSG_SYSLOG is not set +# CONFIG_KLOGD is not set +# CONFIG_FEATURE_KLOGD_KLOGCTL is not set +# CONFIG_LOGGER is not set diff --git a/board/common/cleanups.sh b/board/common/cleanups.sh new file mode 100755 index 0000000000..019b964485 --- /dev/null +++ b/board/common/cleanups.sh @@ -0,0 +1,193 @@ +#!/bin/sh + +if [ -z "$TARGET" ]; then + echo "this script must be invoked from postscript.sh" + exit 1 +fi + +rm -f $TARGET/boot/.gitkeep + +# /etc stuff +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/etc/ssl/man +rm -rf $TARGET/etc/ssl/misc +rm -rf $TARGET/etc/ssl/private +rm -rf $TARGET/etc/logrotate.d + +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 + +# /usr/share stuff +rm -rf $TARGET/usr/share/bash-completion/ +rm -rf $TARGET/usr/share/locale/* +rm -rf $TARGET/usr/share/ffmpeg/ +rm -rf $TARGET/usr/share/perl5/ +rm -rf $TARGET/usr/share/common-lisp/ + +find $TARGET -name '*libmount*' | xargs rm -rf + +# various binaries +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/usr/sbin/ldattach +rm -f $TARGET/sbin/slattach +rm -f $TARGET/sbin/plipconfig +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/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/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/linux32 +rm -f $TARGET/usr/bin/linux64 +rm -f $TARGET/usr/bin/uname26 +rm -f $TARGET/bin/zcat +rm -f $TARGET/bin/zcmp +rm -f $TARGET/bin/zdiff +rm -f $TARGET/bin/zegrep +rm -f $TARGET/bin/zfgrep +rm -f $TARGET/bin/zforce +rm -f $TARGET/bin/zgrep +rm -f $TARGET/bin/zless +rm -f $TARGET/bin/zmore +rm -f $TARGET/bin/znew +rm -f $TARGET/bin/gzexe +rm -f $TARGET/bin/uncompress +rm -f $TARGET/usr/bin/v4l2-compliance +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 +rm -rf $TARGET/libexec + +# 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/wbinfo +rm -f $TARGET/usr/sbin/ctdb* +rm -f $TARGET/usr/sbin/winbindd +rm -f $TARGET/usr/share/perl5 + +# unused python folders +rm -rf $TARGET/usr/lib/python2.7/site-packages/samba/ +rm -rf $TARGET/usr/lib/python2.7/ensurepip/ + +# buildroot default startup scripts +rm -f $TARGET/etc/init.d/S01logging +rm -f $TARGET/etc/init.d/S10udev +rm -f $TARGET/etc/init.d/S15watchdog +rm -f $TARGET/etc/init.d/S49ntp +rm -f $TARGET/etc/init.d/S50sshd +rm -f $TARGET/etc/init.d/S50proftpd +rm -f $TARGET/etc/init.d/S20urandom +rm -f $TARGET/etc/init.d/S80dhcp-relay +rm -f $TARGET/etc/init.d/S80dhcp-server +rm -f $TARGET/etc/init.d/S91smb + +# other unwanted dirs +rm -rf $TARGET/data/* + diff --git a/board/common/mkimage.sh b/board/common/mkimage.sh new file mode 100755 index 0000000000..d9ef3cffa5 --- /dev/null +++ b/board/common/mkimage.sh @@ -0,0 +1,171 @@ +#!/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="20" # MB + +ROOT_SRC=$IMG_DIR/rootfs.tar +ROOT=$IMG_DIR/.root +ROOT_IMG=$IMG_DIR/root.img +ROOT_SIZE="180" # MB + +DISK_SIZE="220" # MB +OS_NAME=$(source $IMG_DIR/../../../board/common/overlay/etc/version && echo $os_short_name) + +# 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 < /proc/sysrq-trigger +} + +trap on_exit EXIT + +msg "Waiting for sdcard" +sleep 2 + +msg "Mounting pseudo filesystems" +mount -t devtmpfs devtmpfs /dev +mount -t proc proc /proc + +msg "Mounting boot partition" +mount $BOOT_DEV /boot + +msg "Mounting data partition" +mount $DATA_DEV /data + +if ! [ -r $FW_DIR/$FW_FILE_EXTR ]; then + msg "No firmware found, aborting" + exit 1 +fi + +if ! [ -r $FW_DIR/$ROOT_INFO_FILE ]; then + msg "No root partition info, aborting" + exit 1 +fi + +msg "Copying root image" +root_start=$(cat $FW_DIR/$ROOT_INFO_FILE | cut -d ' ' -f 1) +root_size=$(cat $FW_DIR/$ROOT_INFO_FILE | cut -d ' ' -f 2) + +dd if=$FW_DIR/$FW_FILE_EXTR skip=$root_start of=$ROOT_DEV bs=1048576 count=$root_size || exit 1 + +msg "Cleaning up" +rm -rf $FW_DIR + diff --git a/board/common/overlay/etc/adjtime b/board/common/overlay/etc/adjtime new file mode 120000 index 0000000000..6526627fd3 --- /dev/null +++ b/board/common/overlay/etc/adjtime @@ -0,0 +1 @@ +/data/etc/adjtime \ No newline at end of file diff --git a/board/common/overlay/etc/crontabs/root b/board/common/overlay/etc/crontabs/root new file mode 100644 index 0000000000..b106e1c3a3 --- /dev/null +++ b/board/common/overlay/etc/crontabs/root @@ -0,0 +1,2 @@ +14 3 * * * /usr/sbin/logrotate /etc/logrotate.conf + diff --git a/board/common/overlay/etc/date.conf b/board/common/overlay/etc/date.conf new file mode 100644 index 0000000000..35f15070e1 --- /dev/null +++ b/board/common/overlay/etc/date.conf @@ -0,0 +1,6 @@ +date_timeout=10 +date_method=http +date_host="google.com" +date_interval=900 +date_ntp_server="" + diff --git a/board/common/overlay/etc/fstab b/board/common/overlay/etc/fstab new file mode 100644 index 0000000000..0d7dc25122 --- /dev/null +++ b/board/common/overlay/etc/fstab @@ -0,0 +1,9 @@ +# +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 +/dev/mmcblk0p1 /boot vfat ro,defaults 0 0 +/dev/mmcblk0p3 /data ext4 defaults,noatime 0 0 + diff --git a/board/common/overlay/etc/group b/board/common/overlay/etc/group new file mode 100644 index 0000000000..41c396bcf5 --- /dev/null +++ b/board/common/overlay/etc/group @@ -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: diff --git a/board/common/overlay/etc/hosts b/board/common/overlay/etc/hosts new file mode 120000 index 0000000000..c6c85bedd4 --- /dev/null +++ b/board/common/overlay/etc/hosts @@ -0,0 +1 @@ +/tmp/hosts \ No newline at end of file diff --git a/board/common/overlay/etc/init.d/S00datapart b/board/common/overlay/etc/init.d/S00datapart new file mode 100755 index 0000000000..6ac2203e13 --- /dev/null +++ b/board/common/overlay/etc/init.d/S00datapart @@ -0,0 +1,55 @@ +#!/bin/bash + +disk_dev="/dev/mmcblk0" +data_dev="${disk_dev}p3" + +test -b $data_dev && exit 0 + +test -n "$os_version" || source /etc/init.d/base + +case "$1" in + start) + msg_begin "Creating data partition" + echo -e "n + p + 3 + \n + \n + w" | /sbin/fdisk $disk_dev 2>&1 >/dev/null | grep -v "Device or resource busy" | grep -v '^$' + partx -a $disk_dev &>/dev/null + test -b $data_dev && msg_done || msg_fail + + msg_begin "Formatting data partition" + mkfs.ext4 -q $data_dev + test $? == 0 && msg_done || msg_fail + + msg_begin "Mounting data partition" + mount /data + test $? == 0 && msg_done || msg_fail + + msg_begin "Creating required data files" + mkdir /data/etc + mkdir /data/log + mkdir -m 775 /data/output + mkdir -m 775 /data/media + cp /etc/version /data/etc/version + ln -s /usr/share/zoneinfo/UTC /data/etc/localtime + touch /data/etc/adjtime + sync + msg_done + + # mount other partitions depending on data + mount -a + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S01mountall b/board/common/overlay/etc/init.d/S01mountall new file mode 100755 index 0000000000..71ce7bb018 --- /dev/null +++ b/board/common/overlay/etc/init.d/S01mountall @@ -0,0 +1,44 @@ +#!/bin/bash + +test -n "$os_version" || source /etc/init.d/base + +mount_fs() { + msg_begin "Mounting filesystems" + /bin/mount -a + test $? == 0 && msg_done || msg_fail +} + +remount_rw() { + msg_begin "Remounting boot partition read-write" + mount -o remount,rw /boot + test $? == 0 && msg_done || msg_fail + + msg_begin "Remounting root partition read-write" + mount -o remount,rw / + test $? == 0 && msg_done || msg_fail +} + +mk_tty_login() { + test -z "$os_tty_login" && os_tty_login=tty1 + ln -sf /dev/$os_tty_login /dev/ttylogin +} + +case "$1" in + start) + mount_fs + test -n "$os_debug" || source /etc/init.d/conf + test "$os_debug" == "true" && remount_rw + mk_tty_login + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S02modules b/board/common/overlay/etc/init.d/S02modules new file mode 100755 index 0000000000..8e1b5a9fd8 --- /dev/null +++ b/board/common/overlay/etc/init.d/S02modules @@ -0,0 +1,33 @@ +#!/bin/bash + +sys_modules_file="/etc/modules" +modules_file="/data/etc/modules" + +test -n "$os_version" || source /etc/init.d/base + +case "$1" in + start) + msg_begin "Loading kernel modules" + + if [ -r $sys_modules_file ]; then + cat $sys_modules_file | while read line; do test -n "$line" && /sbin/modprobe $line &>/dev/null; done + fi + + if [ -r $modules_file ]; then + cat $modules_file | while read line; do test -n "$line" && /sbin/modprobe $line &>/dev/null; done + fi + + msg_done + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S03hostname b/board/common/overlay/etc/init.d/S03hostname new file mode 100755 index 0000000000..dc1a56e345 --- /dev/null +++ b/board/common/overlay/etc/init.d/S03hostname @@ -0,0 +1,43 @@ +#!/bin/bash + +sys_hostname_file="/etc/hostname" +boot_hostname_file="/boot/hostname" +hostname_file="/data/etc/hostname" + +test -n "$os_version" || source /etc/init.d/base + +case "$1" in + start) + msg_begin "Setting hostname" + + if ! [ -f $hostname_file ]; then + if [ -f $boot_hostname_file ]; then + cp $boot_hostname_file $hostname_file + elif [ -f $sys_hostname_file ]; then + cp $sys_hostname_file $hostname_file + fi + fi + + if [ -f $hostname_file ]; then + hostname=$(cat $hostname_file) + else + hostname="$os_prefix-$board_sn" + fi + + /bin/hostname $hostname + echo "127.0.0.1 localhost $hostname" > /etc/hosts + + msg_done + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S04syslog b/board/common/overlay/etc/init.d/S04syslog new file mode 100755 index 0000000000..e4fb1b4450 --- /dev/null +++ b/board/common/overlay/etc/init.d/S04syslog @@ -0,0 +1,29 @@ +#!/bin/bash + +test -n "$os_version" || source /etc/init.d/base + +dmesg_log="/var/log/dmesg.log" + +case "$1" in + start) + msg_begin "Starting syslogd" + syslogd + test $? == 0 && msg_done || msg_fail + echo "---- booting $os_name $os_version----" >> $dmesg_log + dmesg -T -w >> $dmesg_log & + ;; + + stop) + msg_begin "Stopping syslogd" + killall syslogd &>/dev/null + test $? == 0 && msg_done || msg_fail + killall dmesg &>/dev/null + ;; + + *) + echo "Usage: $0 {start|stop}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S10watchdog b/board/common/overlay/etc/init.d/S10watchdog new file mode 100755 index 0000000000..2ef0f11278 --- /dev/null +++ b/board/common/overlay/etc/init.d/S10watchdog @@ -0,0 +1,30 @@ +#!/bin/bash + +test -c /dev/watchdog || exit 0 + +test -n "$os_version" || source /etc/init.d/base + +case "$1" in + start) + msg_begin "Starting watchdog" + watchdog -t 5 /dev/watchdog + test $? == 0 && msg_done || msg_fail + ;; + + stop) + true + ;; + + reallystop) + msg_begin "Stopping watchdog" + killall watchdog &>/dev/null + test $? == 0 && msg_done || msg_fail + ;; + + *) + echo $"Usage: $0 {start|reallystop}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S12udev b/board/common/overlay/etc/init.d/S12udev new file mode 100755 index 0000000000..2c2bbdd61b --- /dev/null +++ b/board/common/overlay/etc/init.d/S12udev @@ -0,0 +1,48 @@ +#!/bin/bash + +test -f /etc/udev/udev.conf || exit 0 + +test -n "$os_version" || source /etc/init.d/base + +source /etc/udev/udev.conf + +start() { + msg_begin "Starting eudev" + echo '\000\000\000\000' > /proc/sys/kernel/hotplug + /sbin/udevd --daemon --resolve-names=never + test $? == 0 && msg_done || msg_fail + + /sbin/udevadm trigger --type=subsystems --action=add + /sbin/udevadm trigger --type=devices --action=add + /sbin/udevadm settle --timeout=30 +} + +stop() { + msg_begin "Stopping eudev" + udevadm control --stop-exec-queue + killall udevd &>/dev/null + test $? == 0 && msg_done || msg_fail +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S14postupgrade b/board/common/overlay/etc/init.d/S14postupgrade new file mode 100755 index 0000000000..ec7c3e1596 --- /dev/null +++ b/board/common/overlay/etc/init.d/S14postupgrade @@ -0,0 +1,53 @@ +#!/bin/bash + +test -n "$os_version" || source /etc/init.d/base + +sys_version_file="/etc/version" +version_file="/data/etc/version" +post_upgrade_dir="/usr/share/post-upgrade" + +hash=$(md5sum $version_file 2>/dev/null | cut -d ' ' -f 1) +sys_hash=$(md5sum $sys_version_file 2>/dev/null | cut -d ' ' -f 1) + +test "$hash" == "$sys_hash" && exit 0 + +function version_gt() { + if [ "$1" != "$2" ] && [ $(echo -e "$2\n$1" | sort -t . | head -n 1) == "$2" ]; then + return 0 + else + return 1 + fi +} + +function run_post_upgrade() { + version="$(source $version_file 2>/dev/null && echo $os_version)" + sys_version="$(source $sys_version_file 2>/dev/null && echo $os_version)" + + versions=$(ls -1 $post_upgrade_dir | cut -d '.' -f 1) + for v in $versions; do + if [ -z "$version" ] || version_gt $v $version; then + msg_begin "Post-upgrading to version $v" + out=$($post_upgrade_dir/$v.sh 2>&1) + test $? == 0 && msg_done || msg_fail + echo "$out" | logger -t post-upgrade + fi + done +} + +case "$1" in + start) + run_post_upgrade + cp $sys_version_file $version_file + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S21passwd b/board/common/overlay/etc/init.d/S21passwd new file mode 100755 index 0000000000..45fdde678b --- /dev/null +++ b/board/common/overlay/etc/init.d/S21passwd @@ -0,0 +1,44 @@ +#!/bin/bash + +test -n "$os_version" || source /etc/init.d/base + +case "$1" in + start) + # make sure root and admin users exist in shadow file + 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 + password=$(/etc/init.d/adminpw) + msg_begin "Setting root password" + + rm -f /data/etc/shadow+ + 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 + sync + + msg_done + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S35wifi b/board/common/overlay/etc/init.d/S35wifi new file mode 100755 index 0000000000..90801dcbd5 --- /dev/null +++ b/board/common/overlay/etc/init.d/S35wifi @@ -0,0 +1,138 @@ +#!/bin/bash + +sys_conf="/etc/wpa_supplicant.conf" +boot_conf="/boot/wpa_supplicant.conf" +conf="/data/etc/wpa_supplicant.conf" + +log="/var/log/wpa_supplicant.log" +prog="/usr/sbin/wpa_supplicant" +driver=wext + +sys_watch_conf="/etc/watch.conf" +boot_watch_conf="/boot/watch.conf" +watch_conf="/data/etc/watch.conf" + +if ! [ -f $watch_conf ]; then + if [ -f $boot_watch_conf ]; then + cp $boot_watch_conf $watch_conf + elif [ -f $sys_watch_conf ]; then + cp $sys_watch_conf $watch_conf + fi +fi + +source $watch_conf + +if ! [ -f $conf ]; then + if [ -f $boot_conf ]; then + cp $boot_conf $conf + elif [ -f $sys_conf ]; then + cp $sys_conf $conf + fi +fi + +test -f $conf || exit 0 + +ssid=$(cat $conf | grep ssid | grep -v scan_ssid | cut -d '"' -f 2) +test -n "$ssid" || exit 0 + +test -n "$os_version" || source /etc/init.d/base +test -n "$os_debug" || source /etc/init.d/conf + +test "$os_networkless" == "true" && exit 0 + +connected() { + ip link show dev $os_wlan 2>&1 | grep LOWER_UP &> /dev/null && return 0 || return 1 +} + +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() { + test -n "$os_country" && iw reg set $os_country + + msg_begin "Starting wpa_supplicant" + + # wait up to 5 seconds for interface + count=0 + while ! ifconfig $os_wlan >/dev/null 2>&1; do + sleep 1 + count=$(($count + 1)) + if [ $count -ge 5 ]; then + msg_fail "no device" + return 1 + fi + done + + module=$(basename $(readlink /sys/class/net/$os_wlan/device/driver/module 2>/dev/null) 2>/dev/null) + + iwconfig $os_wlan power off &> /dev/null + iw $os_wlan set power_save off &> /dev/null + $prog -i$os_wlan -c$conf -D$driver -B &> $log + count=0 + while true; do + sleep 1 + + if connected; then + break + fi + + if [ $count -gt $link_watch_timeout ] || ! pidof wpa_supplicant > /dev/null; then + test -n "$module" && msg_fail "failed ($module)"|| msg_fail + return 1 + fi + + count=$(($count + 1)) + done + + if [ "$link_watch" == "true" ]; then + watch & + fi + + test -n "$module" && msg_done "done ($module)"|| msg_done +} + +stop() { + msg_begin "Stopping wpa_supplicant" + killall wpa_supplicant &>/dev/null + ps | grep wifi | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + msg_done +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +# continue after an unsuccessfull wifi start +# as we may still have an ethernet connection available +exit 0 + diff --git a/board/common/overlay/etc/init.d/S36ppp b/board/common/overlay/etc/init.d/S36ppp new file mode 100755 index 0000000000..9ba5822c9e --- /dev/null +++ b/board/common/overlay/etc/init.d/S36ppp @@ -0,0 +1,138 @@ +#!/bin/bash + +sys_conf="/etc/ppp/default" +boot_conf="/boot/ppp" +conf="/data/etc/ppp" + +prog="/usr/sbin/pppd" +provider="mobile" + +watch_conf="/data/etc/watch.conf" + +source $watch_conf + +if ! [ -d $conf ]; then + if [ -d $boot_conf ]; then + cp -r $boot_conf $conf + elif [ -d $sys_conf ]; then + cp -r $sys_conf $conf + fi +fi + +test -e $conf/modem || exit 0 +test -e $conf/apn || exit 0 + +test -n "$os_version" || source /etc/init.d/base +test -n "$os_debug" || source /etc/init.d/conf + +test "$os_networkless" == "true" && exit 0 + +connected() { + ifconfig | grep $os_ppp &>/dev/null 2>&1 && return 0 || return 1 +} + +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 +} + +udev_trigger_add() { + for ((i = 0; i < $1; i++)); do + /sbin/udevadm trigger --type=devices --action=add + done +} + +start() { + test -e $conf/auth || touch $conf/auth + test -e $conf/extra || touch $conf/extra + test -e $conf/pin || touch $conf/pin + mknod /dev/ppp c 108 0 &>/dev/null + + msg_begin "Starting pppd" + + # wait for modem + modem=$(head -n 1 $conf/modem) + if ! [ -e /dev/$modem ]; then + udev_trigger_add 4 & + fi + + 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 + msg_fail "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 + msg_fail + return + fi + + count=$(($count + 1)) + done + + if [ "$link_watch" == "true" ]; then + watch & + fi + + msg_done +} + +stop() { + msg_begin "Stopping pppd" + killall pppd &>/dev/null + ps | grep ppp | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + msg_done +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S40network b/board/common/overlay/etc/init.d/S40network new file mode 100755 index 0000000000..9d19886753 --- /dev/null +++ b/board/common/overlay/etc/init.d/S40network @@ -0,0 +1,233 @@ +#!/bin/bash + +mkdir -p /var/lib/dhcp +dh_conf="/var/cache/dhclient.conf" +sys_static_conf="/etc/static_ip.conf" +boot_static_conf="/boot/static_ip.conf" +static_conf="/data/etc/static_ip.conf" +watch_conf="/data/etc/watch.conf" + +link_nego_timeout=10 + +source $watch_conf + +if ! [ -f $static_conf ]; then + if [ -f $boot_static_conf ]; then + cp $boot_static_conf $static_conf + elif [ -f $sys_static_conf ]; then + cp $sys_static_conf $static_conf + fi +fi + +test -r $static_conf && source $static_conf + +test -n "$os_version" || source /etc/init.d/base +test -n "$os_debug" || source /etc/init.d/conf + +watch_eth() { + count=0 + while true; do + sleep 5 + if [ "$(cat /sys/class/net/$os_eth/operstate 2>/dev/null)" == "up" ]; 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() { + msg_begin "Configuring wireless network" + if ! ifconfig $os_wlan &>/dev/null; then + msg_fail "no device" + return 1 + fi + + if [ "$(cat /sys/class/net/$os_wlan/carrier 2>/dev/null)" != "1" ]; then + msg_fail "no link" + return 1 + fi + + if [ -n "$mtu" ]; then + ip link set mtu $mtu dev $os_wlan + fi + + if [ -n "$static_ip" ]; then + msg_done $static_ip + ifconfig $os_wlan $static_ip up + static_ip="" # won't be used again + else + msg_done dhcp + dhclient -cf "$dh_conf" $os_wlan + fi + + if [ "$ip_watch" == "true" ] && ip addr show dev $os_wlan | grep inet &>/dev/null; then + watch_ip $os_wlan & + fi +} + +start_eth() { + msg_begin "Configuring wired network" + + # wait for driver + w=3 + count=0 + while ! ifconfig $os_eth >/dev/null 2>&1; do + sleep 1 + count=$(($count + 1)) + if [ $count -ge $w ]; then + msg_done "no device" + return 1 + fi + done + + # bring it up + ifconfig $os_eth up + + # wait for operstate + w=3 + count=0 + while [ "$(cat /sys/class/net/$os_eth/operstate 2>&1)" == "unknown" ]; do + sleep 1 + count=$(($count + 1)) + if [ $count -ge $w ]; then + msg_done "no link" + return 1 + fi + done + + # wait for link + test "$link_watch" == "true" || link_nego_timeout=5 + count=0 + while [ "$(cat /sys/class/net/$os_eth/carrier 2>&1)" != "1" ]; do + sleep 1 + count=$(($count + 1)) + if [ $count -ge $link_nego_timeout ]; then + msg_done "no link" + return 1 + fi + done + + if [ -n "$mtu" ]; then + ip link set mtu $mtu dev $os_eth + fi + + if [ -n "$static_ip" ]; then + msg_done $static_ip + ifconfig $os_eth $static_ip up + static_ip="" # won't be used again + else + msg_done dhcp + dhclient -cf "$dh_conf" $os_eth + fi + + if [ "$link_watch" == "true" ]; then + watch_eth & + fi + + if [ "$ip_watch" == "true" ] && ip addr show dev $os_eth | grep inet &>/dev/null; then + watch_ip $os_eth & + fi +} + +start() { + hostname=$(hostname) + echo "send host-name = \"$hostname\";" > /var/cache/dhclient.conf + + start_lo + + test "$os_networkless" == "true" && return 0 + + ssid=$(cat /data/etc/wpa_supplicant.conf 2>&1 | grep ssid | grep -v scan_ssid | cut -d '"' -f 2) + test -n "$ssid" && start_wlan && wlan_ok="ok" + + test -r /data/etc/ppp/modem && ppp_ok="ok" # TODO actually test the ppp link + + # if wifi or ppp link ok, start eth in background + if [ "$wlan_ok" == "ok" ] || [ "$ppp_ok" == "ok" ]; then + start_eth &>/dev/null & + else + start_eth && eth_ok="ok" + fi + + if [ "$eth_ok" != "ok" ] && [ "$wlan_ok" != "ok" ] && [ "$ppp_ok" != "ok" ]; then + if [ "$link_watch" == "true" ]; then + logger -t ethernet -s "no network connection available, rebooting" + reboot + return 1 + else + logger -t ethernet -s "no network connection available" + return 0 + fi + fi + + if [ -n "$static_gw" ]; then + msg_begin "Setting static gateway to $static_gw" + ip route add default via $static_gw + test $? == 0 && msg_done || msg_fail + fi + + if [ -n "$static_dns" ]; then + msg_begin "Setting static DNS server to $static_dns" + echo "nameserver $static_dns" > /etc/resolv.conf + test $? == 0 && msg_done || msg_fail + fi +} + +stop() { + msg_begin "Stopping network" + killall dhclient &>/dev/null + ps | grep S40network | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + msg_done +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S41netwatch b/board/common/overlay/etc/init.d/S41netwatch new file mode 100755 index 0000000000..940d515083 --- /dev/null +++ b/board/common/overlay/etc/init.d/S41netwatch @@ -0,0 +1,60 @@ +#!/bin/bash + +watch_conf="/data/etc/watch.conf" +netwatch_retries=3 +netwatch_timeout=5 +netwatch_interval=20 + +test -f $watch_conf && source $watch_conf || exit 0 + +test -z "$netwatch_host" || -z "$netwatch_port" && exit 0 + +test -n "$os_version" || source /etc/init.d/base +test -n "$os_debug" || source /etc/init.d/conf + +test "$os_networkless" == "true" && exit 0 + +watch() { + count=0 + netwatch_retries=$(($netwatch_retries - 1)) + while true; do + if nc -z -w $netwatch_timeout $netwatch_host $netwatch_port /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) + msg_begin "Starting netwatch" + watch & + msg_done + ;; + + stop) + msg_begin "Stopping netwatch" + ps | grep netwatch | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + msg_done + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S50date b/board/common/overlay/etc/init.d/S50date new file mode 100755 index 0000000000..ab547004dd --- /dev/null +++ b/board/common/overlay/etc/init.d/S50date @@ -0,0 +1,149 @@ +#!/bin/bash + +sys_conf="/etc/date.conf" +boot_conf="/boot/date.conf" +conf="/data/etc/date.conf" + +sys_ntp_conf="/etc/ntp.conf" +boot_ntp_conf="/boot/ntp.conf" +ntp_conf="/data/etc/ntp.conf" + +if ! [ -f $conf ]; then + if [ -f $boot_conf ]; then + cp $boot_conf $conf + elif [ -f $sys_conf ]; then + cp $sys_conf $conf + fi +fi + +if ! [ -f $ntp_conf ]; then + if [ -f $boot_ntp_conf ]; then + cp $boot_ntp_conf $ntp_conf + elif [ -f $sys_ntp_conf ]; then + cp $sys_ntp_conf $ntp_conf + fi +fi + +test -f $conf || exit 0 + +test -n "$os_version" || source /etc/init.d/base +test -n "$os_debug" || source /etc/init.d/conf + +test "$os_networkless" == "true" && exit 0 + +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 $ntp_conf | grep server | head -n 1 | cut -d ' ' -f 2 | xargs ntpdate -t $date_timeout -s +} + +start_http() { + msg_begin "Setting current date using http" + set_current_date_http + test $? == 0 && msg_done "$(date)" || msg_fail + + msg_begin "Starting http date updater" + while true; do + sleep $date_interval + set_current_date_http + done & + msg_done +} + +start_ntp() { + mkdir -p /var/lib/ntp + + cat $ntp_conf | grep -v iburst > ${ntp_conf}.tmp + + if [ -n "$date_ntp_server" ]; then + echo "server $date_ntp_server iburst" > $ntp_conf + else + cat $sys_ntp_conf | grep iburst > $ntp_conf + fi + + cat ${ntp_conf}.tmp >> $ntp_conf + rm ${ntp_conf}.tmp + + msg_begin "Setting current date using ntp" + set_current_date_ntp + test $? == 0 && msg_done "$(date)" || msg_fail + + msg_begin "Starting ntpd" + ntpd -g -c $ntp_conf + test $? == 0 && msg_done || msg_fail +} + +stop_http() { + msg_begin "Stopping date updater" + ps | grep S60date | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + test $? == 0 && msg_done || msg_fail +} + +stop_ntp() { + msg_begin "Stopping ntpd" + killall ntpd &>/dev/null + test $? == 0 && msg_done || msg_fail +} + +start() { + if [ "$date_method" == "http" ]; then + start_http + else + start_ntp + fi + + echo "system date is $(date '+%Y-%m-%d %H:%M:%S')" > /dev/kmsg +} + +stop() { + if [ "$date_method" == "http" ]; then + stop_http + else + stop_ntp + fi +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S51crond b/board/common/overlay/etc/init.d/S51crond new file mode 100755 index 0000000000..1a839f71df --- /dev/null +++ b/board/common/overlay/etc/init.d/S51crond @@ -0,0 +1,48 @@ +#!/bin/bash + +sys_conf="/etc/crontabs" +conf="/data/etc/crontabs" + +test -n "$os_version" || source /etc/init.d/base + +start() { + msg_begin "Starting crond" + + if [ -d $sys_conf ]; then + /usr/sbin/crond -c $sys_conf + fi + + mkdir -p $conf + /usr/sbin/crond -c $conf + + test $? == 0 && msg_done || msg_fail +} + +stop() { + msg_begin "Stopping crond" + killall crond &>/dev/null + test $? == 0 && msg_done || msg_fail +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 + diff --git a/board/common/overlay/etc/init.d/S60sshd b/board/common/overlay/etc/init.d/S60sshd new file mode 100755 index 0000000000..37546b1161 --- /dev/null +++ b/board/common/overlay/etc/init.d/S60sshd @@ -0,0 +1,54 @@ +#!/bin/bash + +conf="/etc/sshd_config" + +test -f $conf || exit 0 + +test -n "$os_version" || source /etc/init.d/base +test -n "$os_debug" || source /etc/init.d/conf + +test "$os_networkless" == "true" && exit 0 + +start() { + msg_begin "Starting sshd" + + # create any missing keys + if ! /usr/bin/ssh-keygen -A >/dev/null; then + msg_fail + return 1 + fi + + umask 077 + hostname=$(hostname) + echo "Welcome to $hostname!" > /var/cache/sshd_banner + sync + + /usr/sbin/sshd -f $conf + test $? == 0 && msg_done || msg_fail +} + +stop() { + msg_begin "Stopping sshd" + killall sshd &>/dev/null + test $? == 0 && msg_done || msg_fail +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + diff --git a/board/common/overlay/etc/init.d/S98userinit b/board/common/overlay/etc/init.d/S98userinit new file mode 100755 index 0000000000..ffaf1dfb10 --- /dev/null +++ b/board/common/overlay/etc/init.d/S98userinit @@ -0,0 +1,26 @@ +#!/bin/bash + +userinit_sh="/data/etc/userinit.sh" + +test -f $userinit_sh || exit 0 + +test -n "$os_version" || source /etc/init.d/base + +case "$1" in + start) + msg_begin "Executing user init script" + /bin/bash $userinit_sh + test $? == 0 && msg_done || msg_fail + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/S99showinfo b/board/common/overlay/etc/init.d/S99showinfo new file mode 100755 index 0000000000..1e0b7390d1 --- /dev/null +++ b/board/common/overlay/etc/init.d/S99showinfo @@ -0,0 +1,45 @@ +#!/bin/bash + +test -n "$os_version" || source /etc/init.d/base +test -n "$os_debug" || source /etc/init.d/conf + +msg_info() { + echo " # $1" +} + +show_iface_ip_addr() { + addr=$(ip addr show dev $1 2>/dev/null | grep inet | tr -s ' ' | sed -r 's/^\s+//' | cut -d ' ' -f 2) + test -n "$addr" && msg_info "Interface $1 has IP address $addr" +} + +show_gateway() { + gateway=$(ip route | grep default | cut -d ' ' -f 3) + test -n "$gateway" && msg_info "Default gateway is $gateway" +} + +show_dns() { + test -r /etc/resolv.conf || return + dns=$(cat /etc/resolv.conf | grep nameserver | head -n 1 | cut -d ' ' -f 2) + test -n "$dns" && msg_info "DNS server address is $dns" +} + +case "$1" in + start) + show_iface_ip_addr $os_eth + show_iface_ip_addr $os_wlan + show_iface_ip_addr $os_ppp + show_gateway + show_dns + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/common/overlay/etc/init.d/adminpw b/board/common/overlay/etc/init.d/adminpw new file mode 100755 index 0000000000..8e45d40e1c --- /dev/null +++ b/board/common/overlay/etc/init.d/adminpw @@ -0,0 +1,6 @@ +#!/bin/bash + +if [ -f /data/etc/motion.conf ]; then + cat /data/etc/motion.conf | grep admin_password | grep -v _hash | cut -d ' ' -f 3- +fi + diff --git a/board/common/overlay/etc/init.d/base b/board/common/overlay/etc/init.d/base new file mode 100755 index 0000000000..563aefd10b --- /dev/null +++ b/board/common/overlay/etc/init.d/base @@ -0,0 +1,18 @@ +#!/bin/bash + +source /etc/version +board_sn=$(/etc/init.d/boardsn) +board_name=$(cat /etc/board) + +msg_begin() { + echo -n " * $1: " +} + +msg_done() { + test -n "$1" && echo $1 || echo "done" +} + +msg_fail() { + test -n "$1" && echo $1 || echo "failed" +} + diff --git a/board/common/overlay/etc/init.d/boardsn b/board/common/overlay/etc/init.d/boardsn new file mode 100755 index 0000000000..2e82bbd253 --- /dev/null +++ b/board/common/overlay/etc/init.d/boardsn @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "00000000" + diff --git a/board/common/overlay/etc/init.d/conf b/board/common/overlay/etc/init.d/conf new file mode 100644 index 0000000000..fd1afc129c --- /dev/null +++ b/board/common/overlay/etc/init.d/conf @@ -0,0 +1,29 @@ +#!/bin/bash + +_sys_conf="/etc/os.conf" +_boot_conf="/boot/os.conf" +_conf="/data/etc/os.conf" + +if ! [ -f $_conf ]; then + if [ -f $_boot_conf ]; then + cp $_boot_conf $_conf + elif [ -f $_sys_conf ]; then + cp $_sys_conf $_conf + fi +fi + +source $_conf + +has_net_conn() { + test "$os_networkless" == "true" && return 1 + + addr_eth=$(ip addr show dev $os_eth 2>/dev/null | grep inet | tr -s ' ' | sed -r 's/^\s+//' | cut -d ' ' -f 2) + addr_wlan=$(ip addr show dev $os_wlan 2>/dev/null | grep inet | tr -s ' ' | sed -r 's/^\s+//' | cut -d ' ' -f 2) + + if [ -n "$addr_eth" ] || [ -n "$addr_wlan" ]; then + return 0 + else + return 1 + fi +} + diff --git a/board/common/overlay/etc/init.d/mountsys b/board/common/overlay/etc/init.d/mountsys new file mode 100755 index 0000000000..744b29a360 --- /dev/null +++ b/board/common/overlay/etc/init.d/mountsys @@ -0,0 +1,10 @@ +#!/bin/bash + +/bin/mkdir -p /dev/pts +/bin/mkdir -p /dev/shm +/bin/mount --make-shared / +/bin/mount -a -t proc +/bin/mount -a -t devpts +/bin/mount -a -t tmpfs +/bin/mount -a -t sysfs + diff --git a/board/common/overlay/etc/init.d/rcK b/board/common/overlay/etc/init.d/rcK new file mode 100755 index 0000000000..90d77ec140 --- /dev/null +++ b/board/common/overlay/etc/init.d/rcK @@ -0,0 +1,22 @@ +#!/bin/sh + +boot_log=/var/log/boot.log +pid_file=/tmp/rc.pid + +source /etc/init.d/base + +echo "---- shutting down $os_name $os_version ----" >> $boot_log + +# stop all init scripts in /etc/init.d, +# executing them in reverse numerical order. +(for i in $(ls -r /etc/init.d/S??*); do + [ ! -x "$i" ] && continue + [ -f /data/etc/no_$(basename $i) ] && continue + $i stop +done& echo $! > $pid_file) | tee -a $boot_log & + +pid=$(cat $pid_file) +while kill -0 $pid 2>/dev/null; do + sleep 1 +done + diff --git a/board/common/overlay/etc/init.d/rcS b/board/common/overlay/etc/init.d/rcS new file mode 100755 index 0000000000..c4079c65d0 --- /dev/null +++ b/board/common/overlay/etc/init.d/rcS @@ -0,0 +1,25 @@ +#!/bin/sh + +boot_log=/var/log/boot.log +tmp_boot_log=/tmp/boot.log +pid_file=/tmp/rc.pid + +source /etc/init.d/base + +echo "---- booting $os_name $os_version----" >> $tmp_boot_log + +# start all init scripts in /etc/init.d, +# executing them in numerical order. +(for i in /etc/init.d/S??*; do + [ ! -x "$i" ] && continue + [ -f /data/etc/no_$(basename $i) ] && continue + $i start || break +done& echo $! > $pid_file) | tee -a $tmp_boot_log & + +pid=$(cat $pid_file) +while kill -0 $pid 2>/dev/null; do + sleep 1 +done + +test -d $(dirname $boot_log) && cat $tmp_boot_log >> $boot_log + diff --git a/board/common/overlay/etc/inittab b/board/common/overlay/etc/inittab new file mode 100644 index 0000000000..4df8eb21e7 --- /dev/null +++ b/board/common/overlay/etc/inittab @@ -0,0 +1,29 @@ +# /etc/inittab +# +# Copyright (C) 2001 Erik Andersen +# +# 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 == 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 +::sysinit:/etc/init.d/mountsys +::sysinit:/etc/init.d/rcS + +# Start a getty for local login +ttylogin::respawn:/sbin/getty -L ttylogin 115200 vt100 + +# Stuff to do for the 3-finger salute +::ctrlaltdel:/sbin/reboot + +# Stuff to do before rebooting +::shutdown:/etc/init.d/rcK +null::shutdown:/bin/umount -a -r + diff --git a/board/common/overlay/etc/inputrc b/board/common/overlay/etc/inputrc new file mode 100644 index 0000000000..2f1cb601a5 --- /dev/null +++ b/board/common/overlay/etc/inputrc @@ -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, ) +#"\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 + diff --git a/board/common/overlay/etc/issue b/board/common/overlay/etc/issue new file mode 100644 index 0000000000..b9d3c46ab7 --- /dev/null +++ b/board/common/overlay/etc/issue @@ -0,0 +1 @@ +Welcome to \n! diff --git a/board/common/overlay/etc/localtime b/board/common/overlay/etc/localtime new file mode 120000 index 0000000000..eadb7fa382 --- /dev/null +++ b/board/common/overlay/etc/localtime @@ -0,0 +1 @@ +/data/etc/localtime \ No newline at end of file diff --git a/board/common/overlay/etc/logrotate.conf b/board/common/overlay/etc/logrotate.conf new file mode 100644 index 0000000000..f2adab19e0 --- /dev/null +++ b/board/common/overlay/etc/logrotate.conf @@ -0,0 +1,9 @@ +/var/log/*.log /var/log/messages /var/log/samba/*.* { + rotate 9 + compress + copytruncate + size 10M + missingok + nomail +} + diff --git a/board/common/overlay/etc/mime.types b/board/common/overlay/etc/mime.types new file mode 100644 index 0000000000..8af0a167be --- /dev/null +++ b/board/common/overlay/etc/mime.types @@ -0,0 +1,1918 @@ +application/1d-interleaved-parityfec +application/3gpp-ims+xml +application/CSTAdata+xml +application/EDI-Consent +application/EDI-X12 +application/EDIFACT +application/H224 +application/activemessage +application/andrew-inset ez +application/annodex anx +application/applefile +application/applixware aw +application/atom+xml atom +application/atomcat+xml atomcat +application/atomdeleted+xml +application/atomicmail +application/atomserv+xml atomsrv +application/atomsvc+xml atomsvc +application/auth-policy+xml +application/batch-SMTP +application/batch-smtp +application/bbolin lin +application/beep+xml +application/calendar+xml +application/cals-1840 +application/ccmp+xml +application/ccxml+xml ccxml +application/cdmi-capability cdmia +application/cdmi-container cdmic +application/cdmi-domain cdmid +application/cdmi-object cdmio +application/cdmi-queue cdmiq +application/cea-2018+xml +application/cellml+xml +application/cfw +application/cnrp+xml +application/commonground +application/conference-info+xml +application/cpl+xml +application/csta+xml +application/cstadata+xml +application/cu-seeme cu +application/cybercash +application/davmount+xml davmount +application/dca-rft +application/dec-dx +application/dialog-info+xml +application/dicom dcm +application/dns +application/docbook+xml dbk +application/dskpp+xml +application/dsptype tsp +application/dssc+der dssc +application/dssc+xml xdssc +application/dvcs +application/ecmascript ecma es +application/edi-consent +application/edi-x12 +application/edifact +application/emma+xml emma +application/epp+xml +application/epub+zip epub +application/eshop +application/example +application/exi exi +application/fastinfoset +application/fastsoap +application/fdt+xml +application/fits +application/font-tdpfr pfr +application/framework-attributes+xml +application/futuresplash spl +application/ghostview +application/gml+xml gml +application/gpx+xml gpx +application/gxf gxf +application/gzip +application/h224 +application/held+xml +application/hta hta +application/http +application/hyperstudio stk +application/ibe-key-request+xml +application/ibe-pkg-reply+xml +application/ibe-pp-data +application/iges +application/im-iscomposing+xml +application/index +application/index.cmd +application/index.obj +application/index.response +application/index.vnd +application/inkml+xml ink inkml +application/iotp +application/ipfix ipfix +application/ipp +application/isup +application/java-archive jar +application/java-serialized-object ser +application/java-vm class +application/javascript js +application/json json +application/jsonml+json jsonml +application/kpml-request+xml +application/kpml-response+xml +application/link-format +application/lost+xml lostxml +application/lostsync+xml +application/m3g m3g +application/mac-binhex40 hqx +application/mac-compactpro cpt +application/macwriteii +application/mads+xml mads +application/marc mrc +application/marcxml+xml mrcx +application/mathematica ma mb nb nbp +application/mathml+xml mathml +application/mathml-content+xml +application/mathml-presentation+xml +application/mbms-associated-procedure-description+xml +application/mbms-deregister+xml +application/mbms-envelope+xml +application/mbms-msk+xml +application/mbms-msk-response+xml +application/mbms-protection-description+xml +application/mbms-reception-report+xml +application/mbms-register+xml +application/mbms-register-response+xml +application/mbms-user-service-description+xml +application/mbox mbox +application/media-policy-dataset+xml +application/media_control+xml +application/mediaservercontrol+xml mscml +application/metalink+xml metalink +application/metalink4+xml meta4 +application/mets+xml mets +application/mikey +application/mods+xml mods +application/moss-keys +application/moss-signature +application/mosskey-data +application/mosskey-request +application/mp21 m21 mp21 +application/mp4 mp4s +application/mpeg4-generic +application/mpeg4-iod +application/mpeg4-iod-xmt +application/ms-tnef +application/msaccess mdb +application/msc-ivr+xml +application/msc-mixer+xml +application/msword doc dot +application/mxf mxf +application/nasdata +application/news-checkgroups +application/news-groupinfo +application/news-message-id +application/news-transmission +application/nlsml+xml +application/nss +application/ocsp-request +application/ocsp-response +application/octet-stream bin bpk deploy dist distz dmg dms dump elc iso lha lrf lzh mar pkg so +application/oda oda +application/oebps-package+xml opf +application/ogg ogg ogx +application/omdoc+xml omdoc +application/onenote one onepkg onetmp onetoc onetoc2 +application/oxps oxps +application/parityfec +application/patch-ops-error+xml xer +application/pdf pdf +application/pgp-encrypted asc pgp +application/pgp-keys key +application/pgp-signature asc pgp sig +application/pics-rules prf +application/pidf+xml +application/pidf-diff+xml +application/pkcs10 p10 +application/pkcs7-mime p7c p7m +application/pkcs7-signature p7s +application/pkcs8 p8 +application/pkix-attr-cert ac +application/pkix-cert cer +application/pkix-crl crl +application/pkix-pkipath pkipath +application/pkixcmp pki +application/pls+xml pls +application/poc-settings+xml +application/postscript ai eps eps2 eps3 epsf epsi ps +application/prs.alvestrand.titrax-sheet +application/prs.cww cww +application/prs.nprend +application/prs.plucker +application/prs.rdf-xml-crypt +application/prs.xsf+xml +application/pskc+xml pskcxml +application/qsig +application/raptorfec +application/rar rar +application/rdf+xml rdf +application/reginfo+xml rif +application/relax-ng-compact-syntax rnc +application/remote-printing +application/resource-lists+xml rl +application/resource-lists-diff+xml rld +application/riscos +application/rlmi+xml +application/rls-services+xml rs +application/rpki-ghostbusters gbr +application/rpki-manifest mft +application/rpki-roa roa +application/rpki-updown +application/rsd+xml rsd +application/rss+xml rss +application/rtf rtf +application/rtx +application/samlassertion+xml +application/samlmetadata+xml +application/sbml+xml sbml +application/scvp-cv-request scq +application/scvp-cv-response scs +application/scvp-vp-request spq +application/scvp-vp-response spp +application/sdp sdp +application/sep+xml +application/set-payment +application/set-payment-initiation setpay +application/set-registration +application/set-registration-initiation setreg +application/sgml +application/sgml-open-catalog +application/shf+xml shf +application/sieve +application/simple-filter+xml +application/simple-message-summary +application/simpleSymbolContainer +application/simplesymbolcontainer +application/sla stl +application/slate +application/smil smi smil +application/smil+xml smi smil +application/smpte336m +application/soap+fastinfoset +application/soap+xml +application/sparql-query rq +application/sparql-results+xml srx +application/spirits-event+xml +application/srgs gram +application/srgs+xml grxml +application/sru+xml sru +application/ssdl+xml ssdl +application/ssml+xml ssml +application/tamp-apex-update +application/tamp-apex-update-confirm +application/tamp-community-update +application/tamp-community-update-confirm +application/tamp-error +application/tamp-sequence-adjust +application/tamp-sequence-adjust-confirm +application/tamp-status-query +application/tamp-status-response +application/tamp-update +application/tamp-update-confirm +application/tei+xml tei teicorpus +application/thraud+xml tfi +application/timestamp-query +application/timestamp-reply +application/timestamped-data tsd +application/tve-trigger +application/ulpfec +application/vcard+xml +application/vemmi +application/vividence.scriptfile +application/vnd.3M.Post-it-Notes +application/vnd.3gpp.bsf+xml +application/vnd.3gpp.pic-bw-large plb +application/vnd.3gpp.pic-bw-small psb +application/vnd.3gpp.pic-bw-var pvb +application/vnd.3gpp.sms +application/vnd.3gpp2.bcmcsinfo+xml +application/vnd.3gpp2.sms +application/vnd.3gpp2.tcap tcap +application/vnd.3m.post-it-notes pwn +application/vnd.FloGraphIt +application/vnd.HandHeld-Entertainment+xml +application/vnd.Kinar +application/vnd.MFER +application/vnd.Mobius.DAF +application/vnd.Mobius.DIS +application/vnd.Mobius.MBK +application/vnd.Mobius.MQY +application/vnd.Mobius.MSL +application/vnd.Mobius.PLC +application/vnd.Mobius.TXF +application/vnd.Quark.QuarkXPress +application/vnd.RenLearn.rlprint +application/vnd.SimTech-MindMapper +application/vnd.accpac.simply.aso aso +application/vnd.accpac.simply.imp imp +application/vnd.acucobol acu +application/vnd.acucorp acutc atc +application/vnd.adobe.air-application-installer-package+zip air +application/vnd.adobe.formscentral.fcdt fcdt +application/vnd.adobe.fxp fxp fxpl +application/vnd.adobe.partial-upload +application/vnd.adobe.xdp+xml xdp +application/vnd.adobe.xfdf xfdf +application/vnd.aether.imp +application/vnd.ah-barcode +application/vnd.ahead.space ahead +application/vnd.airzip.filesecure.azf azf +application/vnd.airzip.filesecure.azs azs +application/vnd.amazon.ebook azw +application/vnd.americandynamics.acc acc +application/vnd.amiga.ami ami +application/vnd.amundsen.maze+xml +application/vnd.android.package-archive apk +application/vnd.anser-web-certificate-issue-initiation cii +application/vnd.anser-web-funds-transfer-initiation fti +application/vnd.antix.game-component atx +application/vnd.apple.installer+xml mpkg +application/vnd.apple.mpegurl m3u8 +application/vnd.arastra.swi swi +application/vnd.aristanetworks.swi swi +application/vnd.astraea-software.iota iota +application/vnd.audiograph aep +application/vnd.autopackage +application/vnd.avistar+xml +application/vnd.balsamiq.bmml+xml +application/vnd.blueice.multipass mpm +application/vnd.bluetooth.ep.oob +application/vnd.bmi bmi +application/vnd.businessobjects rep +application/vnd.cab-jscript +application/vnd.canon-cpdl +application/vnd.canon-lips +application/vnd.cendio.thinlinc.clientconf +application/vnd.century-systems.tcp_stream +application/vnd.chemdraw+xml cdxml +application/vnd.chipnuts.karaoke-mmd mmd +application/vnd.cinderella cdy +application/vnd.cirpack.isdn-ext +application/vnd.claymore cla +application/vnd.cloanto.rp9 rp9 +application/vnd.clonk.c4group c4d c4f c4g c4p c4u +application/vnd.cluetrust.cartomobile-config c11amc +application/vnd.cluetrust.cartomobile-config-pkg c11amz +application/vnd.collection+json +application/vnd.collection.next+json +application/vnd.commerce-battelle +application/vnd.commonspace csp +application/vnd.comsocaller +application/vnd.contact.cmsg cdbcmsg +application/vnd.cosmocaller cmc +application/vnd.crick.clicker clkx +application/vnd.crick.clicker.keyboard clkk +application/vnd.crick.clicker.palette clkp +application/vnd.crick.clicker.template clkt +application/vnd.crick.clicker.wordbank clkw +application/vnd.criticaltools.wbs+xml wbs +application/vnd.ctc-posml pml +application/vnd.ctct.ws+xml +application/vnd.cups-pdf +application/vnd.cups-postscript +application/vnd.cups-ppd ppd +application/vnd.cups-raster +application/vnd.cups-raw +application/vnd.curl +application/vnd.curl.car car +application/vnd.curl.pcurl pcurl +application/vnd.cyan.dean.root+xml +application/vnd.cybank +application/vnd.dart dart +application/vnd.data-vision.rdz rdz +application/vnd.dece.data uvd uvf uvvd uvvf +application/vnd.dece.ttml+xml uvt uvvt +application/vnd.dece.unspecified uvvx uvx +application/vnd.dece.zip uvvz uvz +application/vnd.denovo.fcselayout-link fe_launch +application/vnd.dir-bi.plate-dl-nosuffix +application/vnd.dm.delegation+xml +application/vnd.dna dna +application/vnd.dolby.mlp mlp +application/vnd.dolby.mobile.1 +application/vnd.dolby.mobile.2 +application/vnd.dpgraph dpg +application/vnd.dreamfactory dfac +application/vnd.ds-keypoint kpxx +application/vnd.dtg.local +application/vnd.dtg.local.flash +application/vnd.dtg.local.html +application/vnd.dvb.ait ait +application/vnd.dvb.dvbj +application/vnd.dvb.esgcontainer +application/vnd.dvb.ipdcdftnotifaccess +application/vnd.dvb.ipdcesgaccess +application/vnd.dvb.ipdcesgaccess2 +application/vnd.dvb.ipdcesgpdd +application/vnd.dvb.ipdcroaming +application/vnd.dvb.iptv.alfec-base +application/vnd.dvb.iptv.alfec-enhancement +application/vnd.dvb.notif-aggregate-root+xml +application/vnd.dvb.notif-container+xml +application/vnd.dvb.notif-generic+xml +application/vnd.dvb.notif-ia-msglist+xml +application/vnd.dvb.notif-ia-registration-request+xml +application/vnd.dvb.notif-ia-registration-response+xml +application/vnd.dvb.notif-init+xml +application/vnd.dvb.pfr +application/vnd.dvb.service svc +application/vnd.dxr +application/vnd.dynageo geo +application/vnd.easykaraoke.cdgdownload +application/vnd.ecdis-update +application/vnd.ecowin.chart mag +application/vnd.ecowin.filerequest +application/vnd.ecowin.fileupdate +application/vnd.ecowin.series +application/vnd.ecowin.seriesrequest +application/vnd.ecowin.seriesupdate +application/vnd.emclient.accessrequest+xml +application/vnd.enliven nml +application/vnd.eprints.data+xml +application/vnd.epson.esf esf +application/vnd.epson.msf msf +application/vnd.epson.quickanime qam +application/vnd.epson.salt slt +application/vnd.epson.ssf ssf +application/vnd.ericsson.quickcall +application/vnd.eszigno3+xml es3 et3 +application/vnd.etsi.aoc+xml +application/vnd.etsi.cug+xml +application/vnd.etsi.iptvcommand+xml +application/vnd.etsi.iptvdiscovery+xml +application/vnd.etsi.iptvprofile+xml +application/vnd.etsi.iptvsad-bc+xml +application/vnd.etsi.iptvsad-cod+xml +application/vnd.etsi.iptvsad-npvr+xml +application/vnd.etsi.iptvservice+xml +application/vnd.etsi.iptvsync+xml +application/vnd.etsi.iptvueprofile+xml +application/vnd.etsi.mcid+xml +application/vnd.etsi.overload-control-policy-dataset+xml +application/vnd.etsi.sci+xml +application/vnd.etsi.simservs+xml +application/vnd.etsi.tsl+xml +application/vnd.etsi.tsl.der +application/vnd.eudora.data +application/vnd.ezpix-album ez2 +application/vnd.ezpix-package ez3 +application/vnd.f-secure.mobile +application/vnd.fdf fdf +application/vnd.fdsn.mseed mseed +application/vnd.fdsn.seed dataless seed +application/vnd.ffsns +application/vnd.fints +application/vnd.flographit gph +application/vnd.fluxtime.clip ftc +application/vnd.font-fontforge-sfd +application/vnd.framemaker book fm frame maker +application/vnd.frogans.fnc fnc +application/vnd.frogans.ltf ltf +application/vnd.fsc.weblaunch fsc +application/vnd.fujitsu.oasys oas +application/vnd.fujitsu.oasys2 oa2 +application/vnd.fujitsu.oasys3 oa3 +application/vnd.fujitsu.oasysgp fg5 +application/vnd.fujitsu.oasysprs bh2 +application/vnd.fujixerox.ART-EX +application/vnd.fujixerox.ART4 +application/vnd.fujixerox.HBPL +application/vnd.fujixerox.art-ex +application/vnd.fujixerox.art4 +application/vnd.fujixerox.ddd ddd +application/vnd.fujixerox.docuworks xdw +application/vnd.fujixerox.docuworks.binder xbd +application/vnd.fujixerox.hbpl +application/vnd.fut-misnet +application/vnd.fuzzysheet fzs +application/vnd.genomatix.tuxedo txd +application/vnd.geocube+xml +application/vnd.geogebra.file ggb +application/vnd.geogebra.tool ggt +application/vnd.geometry-explorer gex gre +application/vnd.geonext gxt +application/vnd.geoplan g2w +application/vnd.geospace g3w +application/vnd.globalplatform.card-content-mgt +application/vnd.globalplatform.card-content-mgt-response +application/vnd.gmx gmx +application/vnd.google-earth.kml+xml kml +application/vnd.google-earth.kmz kmz +application/vnd.grafeq gqf gqs +application/vnd.gridmp +application/vnd.groove-account gac +application/vnd.groove-help ghf +application/vnd.groove-identity-message gim +application/vnd.groove-injector grv +application/vnd.groove-tool-message gtm +application/vnd.groove-tool-template tpl +application/vnd.groove-vcard vcg +application/vnd.hal+json +application/vnd.hal+xml hal +application/vnd.handheld-entertainment+xml zmm +application/vnd.hbci hbci +application/vnd.hcl-bireports +application/vnd.hhe.lesson-player les +application/vnd.hp-HPGL +application/vnd.hp-PCL +application/vnd.hp-PCLXL +application/vnd.hp-hpgl hpgl +application/vnd.hp-hpid hpid +application/vnd.hp-hps hps +application/vnd.hp-jlyt jlt +application/vnd.hp-pcl pcl +application/vnd.hp-pclxl pclxl +application/vnd.httphone +application/vnd.hydrostatix.sof-data sfd-hdstx +application/vnd.hzn-3d-crossword x3d +application/vnd.ibm.MiniPay +application/vnd.ibm.afplinedata +application/vnd.ibm.electronic-media +application/vnd.ibm.minipay mpy +application/vnd.ibm.modcap afp list3820 listafp +application/vnd.ibm.rights-management irm +application/vnd.ibm.secure-container sc +application/vnd.iccprofile icc icm +application/vnd.ieee.1905 +application/vnd.igloader igl +application/vnd.immervision-ivp ivp +application/vnd.immervision-ivu ivu +application/vnd.informedcontrol.rms+xml +application/vnd.informix-visionary +application/vnd.infotech.project +application/vnd.infotech.project+xml +application/vnd.innopath.wamp.notification +application/vnd.insors.igm igm +application/vnd.intercon.formnet xpw xpx +application/vnd.intergeo i2g +application/vnd.intertrust.digibox +application/vnd.intertrust.nncp +application/vnd.intu.qbo qbo +application/vnd.intu.qfx qfx +application/vnd.iptc.g2.conceptitem+xml +application/vnd.iptc.g2.knowledgeitem+xml +application/vnd.iptc.g2.newsitem+xml +application/vnd.iptc.g2.newsmessage+xml +application/vnd.iptc.g2.packageitem+xml +application/vnd.iptc.g2.planningitem+xml +application/vnd.ipunplugged.rcprofile rcprofile +application/vnd.irepository.package+xml irp +application/vnd.is-xpr xpr +application/vnd.isac.fcs fcs +application/vnd.jam jam +application/vnd.japannet-directory-service +application/vnd.japannet-jpnstore-wakeup +application/vnd.japannet-payment-wakeup +application/vnd.japannet-registration +application/vnd.japannet-registration-wakeup +application/vnd.japannet-setstore-wakeup +application/vnd.japannet-verification +application/vnd.japannet-verification-wakeup +application/vnd.jcp.javame.midlet-rms rms +application/vnd.jisp jisp +application/vnd.joost.joda-archive joda +application/vnd.jsk.isdn-ngn +application/vnd.kahootz ktr ktz +application/vnd.kde.karbon karbon +application/vnd.kde.kchart chrt +application/vnd.kde.kformula kfo +application/vnd.kde.kivio flw +application/vnd.kde.kontour kon +application/vnd.kde.kpresenter kpr kpt +application/vnd.kde.kspread ksp +application/vnd.kde.kword kwd kwt +application/vnd.kenameaapp htke +application/vnd.kidspiration kia +application/vnd.kinar kne knp +application/vnd.koan skd skm skp skt +application/vnd.kodak-descriptor sse +application/vnd.las.las+xml lasxml +application/vnd.liberty-request+xml +application/vnd.llamagraphics.life-balance.desktop lbd +application/vnd.llamagraphics.life-balance.exchange+xml lbe +application/vnd.lotus-1-2-3 123 +application/vnd.lotus-approach apr +application/vnd.lotus-freelance pre +application/vnd.lotus-notes nsf +application/vnd.lotus-organizer org +application/vnd.lotus-screencam scm +application/vnd.lotus-wordpro lwp +application/vnd.macports.portpkg portpkg +application/vnd.marlin.drm.actiontoken+xml +application/vnd.marlin.drm.conftoken+xml +application/vnd.marlin.drm.license+xml +application/vnd.marlin.drm.mdcf +application/vnd.mcd mcd +application/vnd.medcalcdata mc1 +application/vnd.mediastation.cdkey cdkey +application/vnd.meridian-slingshot +application/vnd.mfer mwf +application/vnd.mfmp mfm +application/vnd.micrografx.flo flo +application/vnd.micrografx.igx igx +application/vnd.mif mif +application/vnd.minisoft-hp3000-save +application/vnd.mitsubishi.misty-guard.trustweb +application/vnd.mobius.daf daf +application/vnd.mobius.dis dis +application/vnd.mobius.mbk mbk +application/vnd.mobius.mqy mqy +application/vnd.mobius.msl msl +application/vnd.mobius.plc plc +application/vnd.mobius.txf txf +application/vnd.mophun.application mpn +application/vnd.mophun.certificate mpc +application/vnd.motorola.flexsuite +application/vnd.motorola.flexsuite.adsi +application/vnd.motorola.flexsuite.fis +application/vnd.motorola.flexsuite.gotap +application/vnd.motorola.flexsuite.kmr +application/vnd.motorola.flexsuite.ttc +application/vnd.motorola.flexsuite.wem +application/vnd.motorola.iprm +application/vnd.mozilla.xul+xml xul +application/vnd.ms-artgalry cil +application/vnd.ms-asf +application/vnd.ms-cab-compressed cab +application/vnd.ms-excel xla xlb xlc xlm xls xlt xlw +application/vnd.ms-excel.addin.macroEnabled.12 xlam +application/vnd.ms-excel.addin.macroenabled.12 xlam +application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb +application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb +application/vnd.ms-excel.sheet.macroEnabled.12 xlsm +application/vnd.ms-excel.sheet.macroenabled.12 xlsm +application/vnd.ms-excel.template.macroEnabled.12 xltm +application/vnd.ms-excel.template.macroenabled.12 xltm +application/vnd.ms-fontobject eot +application/vnd.ms-htmlhelp chm +application/vnd.ms-ims ims +application/vnd.ms-lrm lrm +application/vnd.ms-office.activeX+xml +application/vnd.ms-officetheme thmx +application/vnd.ms-pki.seccat cat +application/vnd.ms-pki.stl stl +application/vnd.ms-playready.initiator+xml +application/vnd.ms-powerpoint pot pps ppt +application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam +application/vnd.ms-powerpoint.addin.macroenabled.12 ppam +application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm +application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm +application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm +application/vnd.ms-powerpoint.slide.macroenabled.12 sldm +application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm +application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm +application/vnd.ms-powerpoint.template.macroEnabled.12 potm +application/vnd.ms-powerpoint.template.macroenabled.12 potm +application/vnd.ms-project mpp mpt +application/vnd.ms-tnef +application/vnd.ms-wmdrm.lic-chlg-req +application/vnd.ms-wmdrm.lic-resp +application/vnd.ms-wmdrm.meter-chlg-req +application/vnd.ms-wmdrm.meter-resp +application/vnd.ms-word.document.macroEnabled.12 docm +application/vnd.ms-word.document.macroenabled.12 docm +application/vnd.ms-word.template.macroEnabled.12 dotm +application/vnd.ms-word.template.macroenabled.12 dotm +application/vnd.ms-works wcm wdb wks wps +application/vnd.ms-wpl wpl +application/vnd.ms-xpsdocument xps +application/vnd.mseq mseq +application/vnd.msign +application/vnd.multiad.creator +application/vnd.multiad.creator.cif +application/vnd.music-niff +application/vnd.musician mus +application/vnd.muvee.style msty +application/vnd.mynfc taglet +application/vnd.ncd.control +application/vnd.ncd.reference +application/vnd.nervana +application/vnd.netfpx +application/vnd.neurolanguage.nlu nlu +application/vnd.nintendo.nitro.rom +application/vnd.nitf nitf ntf +application/vnd.noblenet-directory nnd +application/vnd.noblenet-sealer nns +application/vnd.noblenet-web nnw +application/vnd.nokia.catalogs +application/vnd.nokia.conml+wbxml +application/vnd.nokia.conml+xml +application/vnd.nokia.iSDS-radio-presets +application/vnd.nokia.iptv.config+xml +application/vnd.nokia.isds-radio-presets +application/vnd.nokia.landmark+wbxml +application/vnd.nokia.landmark+xml +application/vnd.nokia.landmarkcollection+xml +application/vnd.nokia.n-gage.ac+xml +application/vnd.nokia.n-gage.data ngdat +application/vnd.nokia.n-gage.symbian.install n-gage +application/vnd.nokia.ncd +application/vnd.nokia.pcd+wbxml +application/vnd.nokia.pcd+xml +application/vnd.nokia.radio-preset rpst +application/vnd.nokia.radio-presets rpss +application/vnd.novadigm.EDM +application/vnd.novadigm.EDX +application/vnd.novadigm.EXT +application/vnd.novadigm.edm edm +application/vnd.novadigm.edx edx +application/vnd.novadigm.ext ext +application/vnd.ntt-local.content-share +application/vnd.ntt-local.file-transfer +application/vnd.ntt-local.sip-ta_remote +application/vnd.ntt-local.sip-ta_tcp_stream +application/vnd.oasis.opendocument.chart odc +application/vnd.oasis.opendocument.chart-template otc +application/vnd.oasis.opendocument.database odb +application/vnd.oasis.opendocument.formula odf +application/vnd.oasis.opendocument.formula-template odft +application/vnd.oasis.opendocument.graphics odg +application/vnd.oasis.opendocument.graphics-template otg +application/vnd.oasis.opendocument.image odi +application/vnd.oasis.opendocument.image-template oti +application/vnd.oasis.opendocument.presentation odp +application/vnd.oasis.opendocument.presentation-template otp +application/vnd.oasis.opendocument.spreadsheet ods +application/vnd.oasis.opendocument.spreadsheet-template ots +application/vnd.oasis.opendocument.text odt +application/vnd.oasis.opendocument.text-master odm otm +application/vnd.oasis.opendocument.text-template ott +application/vnd.oasis.opendocument.text-web oth +application/vnd.obn +application/vnd.oftn.l10n+json +application/vnd.oipf.contentaccessdownload+xml +application/vnd.oipf.contentaccessstreaming+xml +application/vnd.oipf.cspg-hexbinary +application/vnd.oipf.dae.svg+xml +application/vnd.oipf.dae.xhtml+xml +application/vnd.oipf.mippvcontrolmessage+xml +application/vnd.oipf.pae.gem +application/vnd.oipf.spdiscovery+xml +application/vnd.oipf.spdlist+xml +application/vnd.oipf.ueprofile+xml +application/vnd.oipf.userprofile+xml +application/vnd.olpc-sugar xo +application/vnd.oma-scws-config +application/vnd.oma-scws-http-request +application/vnd.oma-scws-http-response +application/vnd.oma.bcast.associated-procedure-parameter+xml +application/vnd.oma.bcast.drm-trigger+xml +application/vnd.oma.bcast.imd+xml +application/vnd.oma.bcast.ltkm +application/vnd.oma.bcast.notification+xml +application/vnd.oma.bcast.provisioningtrigger +application/vnd.oma.bcast.sgboot +application/vnd.oma.bcast.sgdd+xml +application/vnd.oma.bcast.sgdu +application/vnd.oma.bcast.simple-symbol-container +application/vnd.oma.bcast.smartcard-trigger+xml +application/vnd.oma.bcast.sprov+xml +application/vnd.oma.bcast.stkm +application/vnd.oma.cab-address-book+xml +application/vnd.oma.cab-pcc+xml +application/vnd.oma.cab-subs-invite+xml +application/vnd.oma.cab-user-prefs+xml +application/vnd.oma.dcd +application/vnd.oma.dcdc +application/vnd.oma.dd2+xml dd2 +application/vnd.oma.drm.risd+xml +application/vnd.oma.group-usage-list+xml +application/vnd.oma.pal+xml +application/vnd.oma.poc.detailed-progress-report+xml +application/vnd.oma.poc.final-report+xml +application/vnd.oma.poc.groups+xml +application/vnd.oma.poc.invocation-descriptor+xml +application/vnd.oma.poc.optimized-progress-report+xml +application/vnd.oma.push +application/vnd.oma.scidm.messages+xml +application/vnd.oma.xcap-directory+xml +application/vnd.omads-email+xml +application/vnd.omads-file+xml +application/vnd.omads-folder+xml +application/vnd.omaloc-supl-init +application/vnd.openofficeorg.extension oxt +application/vnd.openxmlformats-officedocument.custom-properties+xml +application/vnd.openxmlformats-officedocument.customXmlProperties+xml +application/vnd.openxmlformats-officedocument.drawing+xml +application/vnd.openxmlformats-officedocument.drawingml.chart+xml +application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml +application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml +application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml +application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml +application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml +application/vnd.openxmlformats-officedocument.extended-properties+xml +application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml +application/vnd.openxmlformats-officedocument.presentationml.comments+xml +application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml +application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml +application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml +application/vnd.openxmlformats-officedocument.presentationml.presProps+xml +application/vnd.openxmlformats-officedocument.presentationml.presentation pptx +application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml +application/vnd.openxmlformats-officedocument.presentationml.slide sldx +application/vnd.openxmlformats-officedocument.presentationml.slide+xml +application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml +application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml +application/vnd.openxmlformats-officedocument.presentationml.slideUpdateInfo+xml +application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx +application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml +application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml +application/vnd.openxmlformats-officedocument.presentationml.tags+xml +application/vnd.openxmlformats-officedocument.presentationml.template potx +application/vnd.openxmlformats-officedocument.presentationml.template.main+xml +application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx +application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml +application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml +application/vnd.openxmlformats-officedocument.theme+xml +application/vnd.openxmlformats-officedocument.themeOverride+xml +application/vnd.openxmlformats-officedocument.vmlDrawing +application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.document docx +application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx +application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml +application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml +application/vnd.openxmlformats-package.core-properties+xml +application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml +application/vnd.openxmlformats-package.relationships+xml +application/vnd.orange.indata +application/vnd.osa.netdeploy +application/vnd.osgeo.mapguide.package mgp +application/vnd.osgi.bundle +application/vnd.osgi.dp dp +application/vnd.osgi.subsystem esa +application/vnd.otps.ct-kip+xml +application/vnd.palm oprc pdb pqa +application/vnd.paos.xml +application/vnd.pawaafile paw +application/vnd.pg.format str +application/vnd.pg.osasli ei6 +application/vnd.piaccess.application-licence +application/vnd.picsel efif +application/vnd.pmi.widget wg +application/vnd.poc.group-advertisement+xml +application/vnd.pocketlearn plf +application/vnd.powerbuilder6 pbd +application/vnd.powerbuilder6-s +application/vnd.powerbuilder7 +application/vnd.powerbuilder7-s +application/vnd.powerbuilder75 +application/vnd.powerbuilder75-s +application/vnd.preminet +application/vnd.previewsystems.box box +application/vnd.proteus.magazine mgz +application/vnd.publishare-delta-tree qps +application/vnd.pvi.ptid1 ptid +application/vnd.pwg-multiplexed +application/vnd.pwg-xhtml-print+xml +application/vnd.qualcomm.brew-app-res +application/vnd.quark.quarkxpress qwd qwt qxb qxd qxl qxt +application/vnd.quobject-quoxdocument +application/vnd.radisys.moml+xml +application/vnd.radisys.msml+xml +application/vnd.radisys.msml-audit+xml +application/vnd.radisys.msml-audit-conf+xml +application/vnd.radisys.msml-audit-conn+xml +application/vnd.radisys.msml-audit-dialog+xml +application/vnd.radisys.msml-audit-stream+xml +application/vnd.radisys.msml-conf+xml +application/vnd.radisys.msml-dialog+xml +application/vnd.radisys.msml-dialog-base+xml +application/vnd.radisys.msml-dialog-fax-detect+xml +application/vnd.radisys.msml-dialog-fax-sendrecv+xml +application/vnd.radisys.msml-dialog-group+xml +application/vnd.radisys.msml-dialog-speech+xml +application/vnd.radisys.msml-dialog-transform+xml +application/vnd.rainstor.data +application/vnd.rapid +application/vnd.realvnc.bed bed +application/vnd.recordare.musicxml mxl +application/vnd.recordare.musicxml+xml musicxml +application/vnd.renlearn.rlprint +application/vnd.rig.cryptonote cryptonote +application/vnd.rim.cod cod +application/vnd.rn-realmedia rm +application/vnd.rn-realmedia-vbr rmvb +application/vnd.route66.link66+xml link66 +application/vnd.rs-274x +application/vnd.ruckus.download +application/vnd.s3sms +application/vnd.sailingtracker.track st +application/vnd.sbm.cid +application/vnd.sbm.mid2 +application/vnd.scribus +application/vnd.sealed.3df +application/vnd.sealed.csf +application/vnd.sealed.doc +application/vnd.sealed.eml +application/vnd.sealed.mht +application/vnd.sealed.net +application/vnd.sealed.ppt +application/vnd.sealed.tiff +application/vnd.sealed.xls +application/vnd.sealedmedia.softseal.html +application/vnd.sealedmedia.softseal.pdf +application/vnd.seemail see +application/vnd.sema sema +application/vnd.semd semd +application/vnd.semf semf +application/vnd.shana.informed.formdata ifm +application/vnd.shana.informed.formtemplate itp +application/vnd.shana.informed.interchange iif +application/vnd.shana.informed.package ipk +application/vnd.simtech-mindmapper twd twds +application/vnd.smaf mmf +application/vnd.smart.notebook +application/vnd.smart.teacher teacher +application/vnd.software602.filler.form+xml +application/vnd.software602.filler.form-xml-zip +application/vnd.solent.sdkm+xml sdkd sdkm +application/vnd.spotfire.dxp dxp +application/vnd.spotfire.sfs sfs +application/vnd.sss-cod +application/vnd.sss-dtf +application/vnd.sss-ntf +application/vnd.stardivision.calc sdc +application/vnd.stardivision.chart sds +application/vnd.stardivision.draw sda +application/vnd.stardivision.impress sdd sdp +application/vnd.stardivision.math sdf smf +application/vnd.stardivision.writer sdw vor +application/vnd.stardivision.writer-global sgl +application/vnd.stepmania.package smzip +application/vnd.stepmania.stepchart sm +application/vnd.street-stream +application/vnd.sun.wadl+xml +application/vnd.sun.xml.calc sxc +application/vnd.sun.xml.calc.template stc +application/vnd.sun.xml.draw sxd +application/vnd.sun.xml.draw.template std +application/vnd.sun.xml.impress sxi +application/vnd.sun.xml.impress.template sti +application/vnd.sun.xml.math sxm +application/vnd.sun.xml.writer sxw +application/vnd.sun.xml.writer.global sxg +application/vnd.sun.xml.writer.template stw +application/vnd.sus-calendar sus susp +application/vnd.svd svd +application/vnd.swiftview-ics +application/vnd.symbian.install sis sisx +application/vnd.syncml+xml xsm +application/vnd.syncml.dm+wbxml bdm +application/vnd.syncml.dm+xml xdm +application/vnd.syncml.dm.notification +application/vnd.syncml.dmddf+wbxml +application/vnd.syncml.dmddf+xml +application/vnd.syncml.dmtnds+wbxml +application/vnd.syncml.dmtnds+xml +application/vnd.syncml.ds.notification +application/vnd.tao.intent-module-archive tao +application/vnd.tcpdump.pcap cap dmp pcap +application/vnd.tmobile-livetv tmo +application/vnd.trid.tpt tpt +application/vnd.triscape.mxs mxs +application/vnd.trueapp tra +application/vnd.truedoc +application/vnd.tve-trigger +application/vnd.ubisoft.webplayer +application/vnd.ufdl ufd ufdl +application/vnd.uiq.theme utz +application/vnd.umajin umj +application/vnd.unity unityweb +application/vnd.uoml+xml uoml +application/vnd.uplanet.alert +application/vnd.uplanet.alert-wbxml +application/vnd.uplanet.bearer-choice +application/vnd.uplanet.bearer-choice-wbxml +application/vnd.uplanet.cacheop +application/vnd.uplanet.cacheop-wbxml +application/vnd.uplanet.channel +application/vnd.uplanet.channel-wbxml +application/vnd.uplanet.list +application/vnd.uplanet.list-wbxml +application/vnd.uplanet.listcmd +application/vnd.uplanet.listcmd-wbxml +application/vnd.uplanet.signal +application/vnd.vcx vcx +application/vnd.vd-study +application/vnd.vectorworks +application/vnd.verimatrix.vcas +application/vnd.vidsoft.vidconference +application/vnd.visio vsd vss vst vsw +application/vnd.visionary vis +application/vnd.vividence.scriptfile +application/vnd.vsf vsf +application/vnd.wap.sic +application/vnd.wap.slc +application/vnd.wap.wbxml wbxml +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/vnd.webturbo wtb +application/vnd.wfa.wsc +application/vnd.wmc +application/vnd.wmf.bootstrap +application/vnd.wolfram.mathematica +application/vnd.wolfram.mathematica.package +application/vnd.wolfram.player nbp +application/vnd.wordperfect wpd +application/vnd.wordperfect5.1 wp5 +application/vnd.wqd wqd +application/vnd.wrq-hp3000-labelled +application/vnd.wt.stf stf +application/vnd.wv.csp+wbxml +application/vnd.wv.csp+xml +application/vnd.wv.ssp+xml +application/vnd.xara xar +application/vnd.xfdl xfdl +application/vnd.xfdl.webform +application/vnd.xmi+xml +application/vnd.xmpie.cpkg +application/vnd.xmpie.dpkg +application/vnd.xmpie.plan +application/vnd.xmpie.ppkg +application/vnd.xmpie.xlim +application/vnd.yamaha.hv-dic hvd +application/vnd.yamaha.hv-script hvs +application/vnd.yamaha.hv-voice hvp +application/vnd.yamaha.openscoreformat osf +application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg +application/vnd.yamaha.remote-setup +application/vnd.yamaha.smaf-audio saf +application/vnd.yamaha.smaf-phrase spf +application/vnd.yamaha.through-ngn +application/vnd.yamaha.tunnel-udpencap +application/vnd.yellowriver-custom-menu cmp +application/vnd.zul zir zirz +application/vnd.zzazz.deck+xml zaz +application/voicexml+xml vxml +application/vq-rtcpxr +application/watcherinfo+xml +application/whoispp-query +application/whoispp-response +application/widget wgt +application/winhlp hlp +application/wita +application/wordperfect wpd +application/wordperfect5.1 wp5 +application/wsdl+xml wsdl +application/wspolicy+xml wspolicy +application/x-123 wk +application/x-7z-compressed 7z +application/x-abiword abw +application/x-ace-compressed ace +application/x-apple-diskimage dmg +application/x-authorware-bin aab u32 vox x32 +application/x-authorware-map aam +application/x-authorware-seg aas +application/x-bcpio bcpio +application/x-bittorrent torrent +application/x-blorb blb blorb +application/x-bzip bz +application/x-bzip2 boz bz2 +application/x-cab cab +application/x-cbr cb7 cba cbr cbt cbz +application/x-cbz cbz +application/x-cdf cda cdf +application/x-cdlink vcd +application/x-cfs-compressed cfs +application/x-chat chat +application/x-chess-pgn pgn +application/x-compress +application/x-comsol mph +application/x-conference nsc +application/x-core +application/x-cpio cpio +application/x-csh csh +application/x-debian-package deb udeb +application/x-dgc-compressed dgc +application/x-director cct cst cxt dcr dir dxr fgd swa w3d +application/x-dms dms +application/x-doom wad +application/x-dtbncx+xml ncx +application/x-dtbook+xml dtb +application/x-dtbresource+xml res +application/x-dvi dvi +application/x-envoy evy +application/x-eva eva +application/x-executable +application/x-flac flac +application/x-font gsf pcf pcf.Z pfa pfb +application/x-font-bdf bdf +application/x-font-dos +application/x-font-framemaker +application/x-font-ghostscript gsf +application/x-font-libgrx +application/x-font-linux-psf psf +application/x-font-otf otf +application/x-font-pcf pcf +application/x-font-snf snf +application/x-font-speedo +application/x-font-sunos-news +application/x-font-ttf ttc ttf +application/x-font-type1 afm pfa pfb pfm +application/x-font-vfont +application/x-font-woff woff +application/x-freearc arc +application/x-freemind mm +application/x-futuresplash spl +application/x-ganttproject gan +application/x-gca-compressed gca +application/x-glulx ulx +application/x-gnumeric gnumeric +application/x-go-sgf sgf +application/x-gramps-xml gramps +application/x-graphing-calculator gcf +application/x-gtar gtar taz tgz +application/x-gtar-compressed taz tgz +application/x-gzip +application/x-hdf hdf +application/x-hwp hwp +application/x-ica ica +application/x-info info +application/x-install-instructions install +application/x-internet-signup ins isp +application/x-iphone iii +application/x-iso9660-image iso +application/x-jam jam +application/x-java-applet +application/x-java-bean +application/x-java-jnlp-file jnlp +application/x-javascript js +application/x-jmol jmz +application/x-kchart chrt +application/x-kdelnk +application/x-killustrator kil +application/x-koan skd skm skp skt +application/x-kpresenter kpr kpt +application/x-kspread ksp +application/x-kword kwd kwt +application/x-latex latex +application/x-lha lha +application/x-lyx lyx +application/x-lzh lzh +application/x-lzh-compressed lha lzh +application/x-lzx lzx +application/x-maker book fb fbdoc fm frame frm maker +application/x-md5 md5 +application/x-mie mie +application/x-mif mif +application/x-mobipocket-ebook mobi prc +application/x-mpegURL m3u8 +application/x-ms-application application +application/x-ms-shortcut lnk +application/x-ms-wmd wmd +application/x-ms-wmz wmz +application/x-ms-xbap xbap +application/x-msaccess mdb +application/x-msbinder obd +application/x-mscardfile crd +application/x-msclip clp +application/x-msdos-program bat com dll exe +application/x-msdownload bat com dll exe msi +application/x-msi msi +application/x-msmediaview m13 m14 mvb +application/x-msmetafile emf emz wmf wmz +application/x-msmoney mny +application/x-mspublisher pub +application/x-msschedule scd +application/x-msterminal trm +application/x-mswrite wri +application/x-netcdf cdf nc +application/x-ns-proxy-autoconfig dat pac +application/x-nwc nwc +application/x-nzb nzb +application/x-object o +application/x-oz-application oza +application/x-pkcs12 p12 pfx +application/x-pkcs7-certificates p7b spc +application/x-pkcs7-certreqresp p7r +application/x-pkcs7-crl crl +application/x-python-code pyc pyo +application/x-qgis qgs shp shx +application/x-quicktimeplayer qtl +application/x-rar-compressed rar +application/x-rdp rdp +application/x-redhat-package-manager rpm +application/x-research-info-systems ris +application/x-rss+xml rss +application/x-ruby rb +application/x-rx +application/x-scilab sce sci +application/x-scilab-xcos xcos +application/x-sh sh +application/x-sha1 sha1 +application/x-shar shar +application/x-shellscript +application/x-shockwave-flash swf swfl +application/x-silverlight scr +application/x-silverlight-app xap +application/x-sql sql +application/x-stuffit sit sitx +application/x-stuffitx sitx +application/x-subrip srt +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-t3vm-image t3 +application/x-tads gam +application/x-tar tar +application/x-tcl tcl +application/x-tex tex +application/x-tex-gf gf +application/x-tex-pk pk +application/x-tex-tfm tfm +application/x-texinfo texi texinfo +application/x-tgif obj +application/x-trash % bak old sik ~ +application/x-troff roff t tr +application/x-troff-man man +application/x-troff-me me +application/x-troff-ms ms +application/x-ustar ustar +application/x-videolan +application/x-wais-source src +application/x-wingz wz +application/x-x509-ca-cert crt der +application/x-xcf xcf +application/x-xfig fig +application/x-xliff+xml xlf +application/x-xpinstall xpi +application/x-xz xz +application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 +application/x400-bp +application/xaml+xml xaml +application/xcap-att+xml +application/xcap-caps+xml +application/xcap-diff+xml xdf +application/xcap-el+xml +application/xcap-error+xml +application/xcap-ns+xml +application/xcon-conference-info+xml +application/xcon-conference-info-diff+xml +application/xenc+xml xenc +application/xhtml+xml xht xhtml +application/xhtml-voice+xml +application/xml xml xsd xsl +application/xml-dtd dtd +application/xml-external-parsed-entity +application/xmpp+xml +application/xop+xml xop +application/xproc+xml xpl +application/xslt+xml xslt +application/xspf+xml xspf +application/xv+xml mxml xhvml xvm xvml +application/yang yang +application/yin+xml yin +application/zip zip +application/zlib +audio/1d-interleaved-parityfec +audio/32kadpcm +audio/3gpp +audio/3gpp2 +audio/AMR +audio/AMR-WB +audio/ATRAC-ADVANCED-LOSSLESS +audio/ATRAC-X +audio/ATRAC3 +audio/BV16 +audio/BV32 +audio/CN +audio/DAT12 +audio/DV +audio/DVI4 +audio/EVRC +audio/EVRC-QCP +audio/EVRC0 +audio/EVRC1 +audio/EVRCB +audio/EVRCB0 +audio/EVRCB1 +audio/EVRCWB +audio/EVRCWB0 +audio/EVRCWB1 +audio/G719 +audio/G722 +audio/G7221 +audio/G723 +audio/G726-16 +audio/G726-24 +audio/G726-32 +audio/G726-40 +audio/G728 +audio/G729 +audio/G7291 +audio/G729D +audio/G729E +audio/GSM +audio/GSM-EFR +audio/GSM-HR-08 +audio/L16 +audio/L20 +audio/L24 +audio/L8 +audio/LPC +audio/MP4A-LATM +audio/MPA +audio/PCMA +audio/PCMA-WB +audio/PCMU +audio/PCMU-WB +audio/QCELP +audio/RED +audio/SMV +audio/SMV-QCP +audio/SMV0 +audio/UEMCLIP +audio/VDVI +audio/VMR-WB +audio/ac3 +audio/adpcm adp +audio/amr amr +audio/amr-wb awb +audio/amr-wb+ +audio/annodex axa +audio/asc +audio/basic au snd +audio/bv16 +audio/bv32 +audio/clearmode +audio/cn +audio/csound csd orc sco +audio/dat12 +audio/dls +audio/dsr-es201108 +audio/dsr-es202050 +audio/dsr-es202211 +audio/dsr-es202212 +audio/dvi4 +audio/eac3 +audio/evrc +audio/evrc-qcp +audio/evrc0 +audio/evrc1 +audio/evrcb +audio/evrcb0 +audio/evrcb1 +audio/evrcwb +audio/evrcwb0 +audio/evrcwb1 +audio/example +audio/flac flac +audio/fwdred +audio/g.722.1 +audio/g719 +audio/g722 +audio/g7221 +audio/g723 +audio/g726-16 +audio/g726-24 +audio/g726-32 +audio/g726-40 +audio/g728 +audio/g729 +audio/g7291 +audio/g729d +audio/g729e +audio/gsm +audio/gsm-efr +audio/iLBC +audio/ilbc +audio/ip-mr_v2.5 +audio/l16 +audio/l20 +audio/l24 +audio/l8 +audio/lpc +audio/midi kar mid midi rmi +audio/mobile-xmf +audio/mp4 mp4a +audio/mp4a-latm +audio/mpa +audio/mpa-robust +audio/mpeg m2a m3a m4a mp2 mp2a mp3 mpega mpga +audio/mpeg4-generic +audio/mpegurl m3u +audio/ogg oga ogg opus spx +audio/parityfec +audio/pcma +audio/pcma-wb +audio/pcmu +audio/pcmu-wb +audio/prs.sid sid +audio/qcelp +audio/raptorfec +audio/red +audio/rtp-enc-aescm128 +audio/rtp-midi +audio/rtx +audio/s3m s3m +audio/silk sil +audio/smv +audio/smv-qcp +audio/smv0 +audio/sp-midi +audio/speex +audio/t140c +audio/t38 +audio/telephone-event +audio/tone +audio/ulpfec +audio/vdvi +audio/vmr-wb +audio/vnd.3gpp.iufp +audio/vnd.4SB +audio/vnd.4sb +audio/vnd.CELP +audio/vnd.audiokoz +audio/vnd.celp +audio/vnd.cisco.nse +audio/vnd.cmles.radio-events +audio/vnd.cns.anp1 +audio/vnd.cns.inf1 +audio/vnd.dece.audio uva uvva +audio/vnd.digital-winds eol +audio/vnd.dlna.adts +audio/vnd.dolby.heaac.1 +audio/vnd.dolby.heaac.2 +audio/vnd.dolby.mlp +audio/vnd.dolby.mps +audio/vnd.dolby.pl2 +audio/vnd.dolby.pl2x +audio/vnd.dolby.pl2z +audio/vnd.dolby.pulse.1 +audio/vnd.dra dra +audio/vnd.dts dts +audio/vnd.dts.hd dtshd +audio/vnd.dvb.file +audio/vnd.everad.plj +audio/vnd.hns.audio +audio/vnd.lucent.voice lvp +audio/vnd.ms-playready.media.pya pya +audio/vnd.nokia.mobile-xmf +audio/vnd.nortel.vbk +audio/vnd.nuera.ecelp4800 ecelp4800 +audio/vnd.nuera.ecelp7470 ecelp7470 +audio/vnd.nuera.ecelp9600 ecelp9600 +audio/vnd.octel.sbc +audio/vnd.qcelp +audio/vnd.rhetorex.32kadpcm +audio/vnd.rip rip +audio/vnd.sealedmedia.softseal.mpeg +audio/vnd.vmx.cvsd +audio/vorbis +audio/vorbis-config +audio/webm weba +audio/x-aac aac +audio/x-aiff aif aifc aiff +audio/x-caf caf +audio/x-flac flac +audio/x-gsm gsm +audio/x-matroska mka +audio/x-mpegurl m3u +audio/x-ms-wax wax +audio/x-ms-wma wma +audio/x-pn-realaudio ra ram rm +audio/x-pn-realaudio-plugin rmp +audio/x-realaudio ra +audio/x-scpls pls +audio/x-sd2 sd2 +audio/x-wav wav +audio/xm xm +chemical/x-alchemy alc +chemical/x-cache cac cache +chemical/x-cache-csf csf +chemical/x-cactvs-binary cascii cbin ctab +chemical/x-cdx cdx +chemical/x-cerius cer +chemical/x-chem3d c3d +chemical/x-chemdraw chm +chemical/x-cif cif +chemical/x-cmdf cmdf +chemical/x-cml cml +chemical/x-compass cpa +chemical/x-crossfire bsd +chemical/x-csml csm csml +chemical/x-ctx ctx +chemical/x-cxf cef cxf +chemical/x-embl-dl-nucleotide emb embl +chemical/x-galactic-spc spc +chemical/x-gamess-input gam gamin inp +chemical/x-gaussian-checkpoint fch fchk +chemical/x-gaussian-cube cub +chemical/x-gaussian-input gau gjc gjf +chemical/x-gaussian-log gal +chemical/x-gcg8-sequence gcg +chemical/x-genbank gen +chemical/x-hin hin +chemical/x-isostar ist istr +chemical/x-jcamp-dx dx jdx +chemical/x-kinemage kin +chemical/x-macmolecule mcm +chemical/x-macromodel-input mmd mmod +chemical/x-mdl-molfile mol +chemical/x-mdl-rdfile rd +chemical/x-mdl-rxnfile rxn +chemical/x-mdl-sdfile sd sdf +chemical/x-mdl-tgf tgf +chemical/x-mmcif mcif +chemical/x-mol2 mol2 +chemical/x-molconn-Z b +chemical/x-mopac-graph gpt +chemical/x-mopac-input dat mop mopcrt mpc zmt +chemical/x-mopac-out moo +chemical/x-mopac-vib mvb +chemical/x-ncbi-asn1 asn +chemical/x-ncbi-asn1-ascii ent prt +chemical/x-ncbi-asn1-binary aso val +chemical/x-ncbi-asn1-spec asn +chemical/x-pdb ent pdb +chemical/x-rosdal ros +chemical/x-swissprot sw +chemical/x-vamas-iso14976 vms +chemical/x-vmd vmd +chemical/x-xtel xtel +chemical/x-xyz xyz +image/bmp bmp +image/cgm cgm +image/example +image/fits +image/g3fax g3 +image/gif gif +image/ief ief +image/jp2 +image/jpeg jpe jpeg jpg +image/jpm +image/jpx +image/ktx ktx +image/naplps +image/pcx pcx +image/png png +image/prs.btif btif +image/prs.pti +image/pwg-raster +image/sgi sgi +image/svg+xml svg svgz +image/t38 +image/tiff tif tiff +image/tiff-fx +image/vnd.adobe.photoshop psd +image/vnd.airzip.accelerator.azv +image/vnd.cns.inf2 +image/vnd.dece.graphic uvg uvi uvvg uvvi +image/vnd.djvu djv djvu +image/vnd.dvb.subtitle sub +image/vnd.dwg dwg +image/vnd.dxf dxf +image/vnd.fastbidsheet fbs +image/vnd.fpx fpx +image/vnd.fst fst +image/vnd.fujixerox.edmics-mmr mmr +image/vnd.fujixerox.edmics-rlc rlc +image/vnd.globalgraphics.pgb +image/vnd.microsoft.icon ico +image/vnd.mix +image/vnd.ms-modi mdi +image/vnd.ms-photo wdp +image/vnd.net-fpx npx +image/vnd.radiance +image/vnd.sealed.png +image/vnd.sealedmedia.softseal.gif +image/vnd.sealedmedia.softseal.jpg +image/vnd.svf +image/vnd.wap.wbmp wbmp +image/vnd.xiff xif +image/webp webp +image/x-3ds 3ds +image/x-canon-cr2 cr2 +image/x-canon-crw crw +image/x-cmu-raster ras +image/x-cmx cmx +image/x-coreldraw cdr +image/x-coreldrawpattern pat +image/x-coreldrawtemplate cdt +image/x-corelphotopaint cpt +image/x-epson-erf erf +image/x-freehand fh fh4 fh5 fh7 fhc +image/x-icon ico +image/x-jg art +image/x-jng jng +image/x-mrsid-image sid +image/x-ms-bmp bmp +image/x-nikon-nef nef +image/x-olympus-orf orf +image/x-pcx pcx +image/x-photoshop psd +image/x-pict pct pic +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-tga tga +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd +inode/blockdevice +inode/chardevice +inode/directory +inode/directory-locked +inode/fifo +inode/socket +message/CPIM +message/cpim +message/delivery-status +message/disposition-notification +message/example +message/external-body +message/feedback-report +message/global +message/global-delivery-status +message/global-disposition-notification +message/global-headers +message/http +message/imdn+xml +message/news +message/partial +message/rfc822 eml mime +message/s-http +message/sip +message/sipfrag +message/tracking-status +message/vnd.si.simp +model/example +model/iges iges igs +model/mesh mesh msh silo +model/vnd.collada+xml dae +model/vnd.dwf dwf +model/vnd.flatland.3dml +model/vnd.gdl gdl +model/vnd.gs-gdl +model/vnd.gs.gdl +model/vnd.gtw gtw +model/vnd.moml+xml +model/vnd.mts mts +model/vnd.parasolid.transmit.binary +model/vnd.parasolid.transmit.text +model/vnd.vtu vtu +model/vrml vrml wrl +model/x3d+binary x3db x3dbz +model/x3d+vrml x3dv x3dvz +model/x3d+xml x3d x3dz +multipart/alternative +multipart/appledouble +multipart/byteranges +multipart/digest +multipart/encrypted +multipart/example +multipart/form-data +multipart/header-set +multipart/mixed +multipart/parallel +multipart/related +multipart/report +multipart/signed +multipart/voice-message +text/cache-manifest appcache +text/calendar ics icz ifb +text/comma-separated-values csv +text/css css +text/csv csv +text/directory +text/dns +text/ecmascript +text/english +text/enriched +text/example +text/h323 323 +text/html htm html shtml +text/iuls uls +text/javascript +text/mathml mml +text/n3 n3 +text/parityfec +text/plain asc brf conf def diff in list log pot srt text txt +text/prs.fallenstein.rst +text/prs.lines.tag dsc +text/red +text/rfc822-headers +text/richtext rtx +text/rtf rtf +text/rtp-enc-aescm128 +text/rtx +text/scriptlet sct wsc +text/sgml sgm sgml +text/t140 +text/tab-separated-values tsv +text/texmacs tm ts +text/troff man me ms roff t tr +text/turtle ttl +text/ulpfec +text/uri-list uri uris urls +text/vcard vcard +text/vnd.DMClientScript +text/vnd.IPTC.NITF +text/vnd.IPTC.NewsML +text/vnd.abc +text/vnd.curl curl +text/vnd.curl.dcurl dcurl +text/vnd.curl.mcurl mcurl +text/vnd.curl.scurl scurl +text/vnd.dmclientscript +text/vnd.dvb.subtitle sub +text/vnd.esmertec.theme-descriptor +text/vnd.flatland.3dml +text/vnd.fly fly +text/vnd.fmi.flexstor flx +text/vnd.graphviz gv +text/vnd.in3d.3dml 3dml +text/vnd.in3d.spot spot +text/vnd.iptc.newsml +text/vnd.iptc.nitf +text/vnd.latex-z +text/vnd.motorola.reflex +text/vnd.ms-mediapackage +text/vnd.net2phone.commcenter.command +text/vnd.si.uricatalogue +text/vnd.sun.j2me.app-descriptor jad +text/vnd.trolltech.linguist +text/vnd.wap.si +text/vnd.wap.sl +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/x-asm asm s +text/x-bibtex bib +text/x-boo boo +text/x-c c cc cpp cxx dic h hh +text/x-c++hdr h++ hh hpp hxx +text/x-c++src c++ cc cpp cxx +text/x-chdr h +text/x-component htc +text/x-crontab +text/x-csh csh +text/x-csrc c +text/x-diff diff patch +text/x-dsrc d +text/x-fortran f f77 f90 for +text/x-haskell hs +text/x-java java +text/x-java-source java +text/x-lilypond ly +text/x-literate-haskell lhs +text/x-makefile +text/x-moc moc +text/x-nfo nfo +text/x-opml opml +text/x-pascal p pas +text/x-pcs-gcd gcd +text/x-perl pl pm +text/x-psp psp +text/x-python py +text/x-scala scala +text/x-server-parsed-html +text/x-setext etx +text/x-sfv sfv +text/x-sh sh +text/x-tcl tcl tk +text/x-tex cls ltx sty tex +text/x-uuencode uu +text/x-vcalendar vcs +text/x-vcard vcf +text/xml +text/xml-external-parsed-entity +video/1d-interleaved-parityfec +video/3gpp 3gp +video/3gpp-tt +video/3gpp2 3g2 +video/BMPEG +video/BT656 +video/CelB +video/DV +video/H261 +video/H263 +video/H263-1998 +video/H263-2000 +video/H264 +video/H264-RCDO +video/H264-SVC +video/JPEG +video/MJ2 +video/MP1S +video/MP2P +video/MP2T ts +video/MP4V-ES +video/MPV +video/SMPTE292M +video/annodex axv +video/bmpeg +video/bt656 +video/celb +video/dl dl +video/dv dif dv +video/example +video/fli fli +video/gl gl +video/h261 h261 +video/h263 h263 +video/h263-1998 +video/h263-2000 +video/h264 h264 +video/jpeg jpgv +video/jpeg2000 +video/jpm jpgm jpm +video/mj2 mj2 mjp2 +video/mp1s +video/mp2p +video/mp2t +video/mp4 mp4 mp4v mpg4 +video/mp4v-es +video/mpeg m1v m2v mpe mpeg mpg +video/mpeg4-generic +video/mpv +video/nv +video/ogg ogv +video/parityfec +video/pointer +video/quicktime mov qt +video/raptorfec +video/raw +video/rtp-enc-aescm128 +video/rtx +video/smpte292m +video/ulpfec +video/vc1 +video/vnd.CCTV +video/vnd.cctv +video/vnd.dece.hd uvh uvvh +video/vnd.dece.mobile uvm uvvm +video/vnd.dece.mp4 +video/vnd.dece.pd uvp uvvp +video/vnd.dece.sd uvs uvvs +video/vnd.dece.video uvv uvvv +video/vnd.directv.mpeg +video/vnd.directv.mpeg-tts +video/vnd.dlna.mpeg-tts +video/vnd.dvb.file dvb +video/vnd.fvt fvt +video/vnd.hns.video +video/vnd.iptvforum.1dparityfec-1010 +video/vnd.iptvforum.1dparityfec-2005 +video/vnd.iptvforum.2dparityfec-1010 +video/vnd.iptvforum.2dparityfec-2005 +video/vnd.iptvforum.ttsavc +video/vnd.iptvforum.ttsmpeg2 +video/vnd.motorola.video +video/vnd.motorola.videop +video/vnd.mpegurl m4u mxu +video/vnd.ms-playready.media.pyv pyv +video/vnd.mts +video/vnd.nokia.interleaved-multimedia +video/vnd.nokia.videovoip +video/vnd.objectvideo +video/vnd.sealed.mpeg1 +video/vnd.sealed.mpeg4 +video/vnd.sealed.swf +video/vnd.sealedmedia.softseal.mov +video/vnd.uvvu.mp4 uvu uvvu +video/vnd.vivo viv +video/webm webm +video/x-f4v f4v +video/x-fli fli +video/x-flv flv +video/x-la-asf lsf lsx +video/x-m4v m4v +video/x-matroska mk3d mks mkv mpv +video/x-mng mng +video/x-ms-asf asf asx +video/x-ms-vob vob +video/x-ms-wm wm +video/x-ms-wmv wmv +video/x-ms-wmx wmx +video/x-ms-wvx wvx +video/x-msvideo avi +video/x-sgi-movie movie +video/x-smv smv +x-conference/x-cooltalk ice +x-epoc/x-sisx-app sisx +x-world/x-vrml vrm vrml wrl diff --git a/board/common/overlay/etc/modprobe.d/modprobe.conf b/board/common/overlay/etc/modprobe.d/modprobe.conf new file mode 100644 index 0000000000..fd739a3b6e --- /dev/null +++ b/board/common/overlay/etc/modprobe.d/modprobe.conf @@ -0,0 +1,7 @@ +# wifi +options 8192cu rtw_power_mgnt=0 rtw_enusbss=0 +options mwifiex disconnect_on_suspend=0 +options rndis_wlan power_save=0 +options b43 hwpctl=0 +options ath6kl_core suspend_mode=1 +options brcmfmac roamoff=1 diff --git a/board/common/overlay/etc/modprobe.d/user-modprobe.conf b/board/common/overlay/etc/modprobe.d/user-modprobe.conf new file mode 120000 index 0000000000..bd30587b45 --- /dev/null +++ b/board/common/overlay/etc/modprobe.d/user-modprobe.conf @@ -0,0 +1 @@ +/data/etc/modprobe.conf \ No newline at end of file diff --git a/board/common/overlay/etc/modules b/board/common/overlay/etc/modules new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/overlay/etc/mtab b/board/common/overlay/etc/mtab new file mode 120000 index 0000000000..4c0a0948bc --- /dev/null +++ b/board/common/overlay/etc/mtab @@ -0,0 +1 @@ +/proc/mounts \ No newline at end of file diff --git a/board/common/overlay/etc/nsswitch.conf b/board/common/overlay/etc/nsswitch.conf new file mode 100644 index 0000000000..d81e2f053e --- /dev/null +++ b/board/common/overlay/etc/nsswitch.conf @@ -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 + diff --git a/board/common/overlay/etc/ntp.conf b/board/common/overlay/etc/ntp.conf new file mode 100644 index 0000000000..1e0978560e --- /dev/null +++ b/board/common/overlay/etc/ntp.conf @@ -0,0 +1,13 @@ +server 0.pool.ntp.org iburst +server 1.pool.ntp.org iburst +server 2.pool.ntp.org iburst + +server 127.127.1.0 +fudge 127.127.1.0 stratum 10 + +restrict default noquery nopeer +restrict 127.0.0.1 +restrict ::1 + +driftfile /var/lib/ntp/ntp.drift + diff --git a/board/common/overlay/etc/os.conf b/board/common/overlay/etc/os.conf new file mode 100644 index 0000000000..96fff5eb4a --- /dev/null +++ b/board/common/overlay/etc/os.conf @@ -0,0 +1,12 @@ +os_debug="false" +os_prereleases="false" +os_tty_login="tty1" +os_eth="eth0" +os_wlan="wlan0" +os_ppp="ppp0" +os_networkless="false" +os_country="GB" +os_firmware_method="github" +os_firmware_repo="ccrisan/thingos" +os_firmware_username="" +os_firmware_password="" diff --git a/board/common/overlay/etc/passwd b/board/common/overlay/etc/passwd new file mode 100644 index 0000000000..afbaaa5a8b --- /dev/null +++ b/board/common/overlay/etc/passwd @@ -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 diff --git a/board/common/overlay/etc/ppp/chatscripts/mobile.chat b/board/common/overlay/etc/ppp/chatscripts/mobile.chat new file mode 100644 index 0000000000..fcc8293667 --- /dev/null +++ b/board/common/overlay/etc/ppp/chatscripts/mobile.chat @@ -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' @/data/etc/ppp/pin +'OK\d-AT-OK' 'ATI' +'OK' 'ATZ' +'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0' +'OK' @/data/etc/ppp/extra +'OK-AT-OK' @/data/etc/ppp/apn +'OK' 'ATDT*99***1#' +TIMEOUT 30 +CONNECT '' diff --git a/board/common/overlay/etc/ppp/ip-up b/board/common/overlay/etc/ppp/ip-up new file mode 100755 index 0000000000..b23b7fb054 --- /dev/null +++ b/board/common/overlay/etc/ppp/ip-up @@ -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 + diff --git a/board/common/overlay/etc/ppp/options b/board/common/overlay/etc/ppp/options new file mode 100644 index 0000000000..7e2d8ffee1 --- /dev/null +++ b/board/common/overlay/etc/ppp/options @@ -0,0 +1,13 @@ +lock +crtscts +modem +passive +novj +defaultroute +noipdefault +usepeerdns +noauth +hide-password +persist +holdoff 10 +maxfail 0 diff --git a/board/common/overlay/etc/ppp/peers/mobile b/board/common/overlay/etc/ppp/peers/mobile new file mode 100644 index 0000000000..03d451c681 --- /dev/null +++ b/board/common/overlay/etc/ppp/peers/mobile @@ -0,0 +1,4 @@ +file /data/etc/ppp/modem +file /etc/ppp/options +file /data/etc/ppp/auth +connect "/usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile.chat" diff --git a/board/common/overlay/etc/profile b/board/common/overlay/etc/profile new file mode 100644 index 0000000000..189f73c23f --- /dev/null +++ b/board/common/overlay/etc/profile @@ -0,0 +1,32 @@ +export PATH=/bin:/sbin:/usr/bin:/usr/sbin + +# 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="/usr/bin/less" + export EDITOR="/usr/bin/nano" + export INPUTRC="/etc/inputrc" + export TERM=linux +fi; + +if [ -f /data/etc/profile ]; then + source /data/etc/profile +fi diff --git a/board/common/overlay/etc/protocols b/board/common/overlay/etc/protocols new file mode 100644 index 0000000000..cfdd5adb65 --- /dev/null +++ b/board/common/overlay/etc/protocols @@ -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 diff --git a/board/common/overlay/etc/random-seed b/board/common/overlay/etc/random-seed new file mode 100644 index 0000000000..f26038adc5 Binary files /dev/null and b/board/common/overlay/etc/random-seed differ diff --git a/board/common/overlay/etc/resolv.conf b/board/common/overlay/etc/resolv.conf new file mode 120000 index 0000000000..71f6f96576 --- /dev/null +++ b/board/common/overlay/etc/resolv.conf @@ -0,0 +1 @@ +../tmp/resolv.conf \ No newline at end of file diff --git a/board/common/overlay/etc/securetty b/board/common/overlay/etc/securetty new file mode 100644 index 0000000000..0722677165 --- /dev/null +++ b/board/common/overlay/etc/securetty @@ -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 diff --git a/board/common/overlay/etc/services b/board/common/overlay/etc/services new file mode 100644 index 0000000000..b287b63ea0 --- /dev/null +++ b/board/common/overlay/etc/services @@ -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 + diff --git a/board/common/overlay/etc/shadow b/board/common/overlay/etc/shadow new file mode 120000 index 0000000000..711b43aef7 --- /dev/null +++ b/board/common/overlay/etc/shadow @@ -0,0 +1 @@ +/data/etc/shadow \ No newline at end of file diff --git a/board/common/overlay/etc/sshd_config b/board/common/overlay/etc/sshd_config new file mode 100644 index 0000000000..82cdedf8fe --- /dev/null +++ b/board/common/overlay/etc/sshd_config @@ -0,0 +1,17 @@ +Port 22 +ListenAddress 0.0.0.0 + +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 +IPQoS cs0 cs0 diff --git a/board/common/overlay/etc/syslog.conf b/board/common/overlay/etc/syslog.conf new file mode 100644 index 0000000000..38e2e9a33e --- /dev/null +++ b/board/common/overlay/etc/syslog.conf @@ -0,0 +1,2 @@ +syslog.=info /dev/null +*.*;syslog.!info /var/log/messages diff --git a/board/common/overlay/etc/udev/rules.d/61-usb-storage.rules b/board/common/overlay/etc/udev/rules.d/61-usb-storage.rules new file mode 100644 index 0000000000..5cce64c1ad --- /dev/null +++ b/board/common/overlay/etc/udev/rules.d/61-usb-storage.rules @@ -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" diff --git a/board/common/overlay/etc/version b/board/common/overlay/etc/version new file mode 100644 index 0000000000..d7b4c0174e --- /dev/null +++ b/board/common/overlay/etc/version @@ -0,0 +1,4 @@ +os_name="motionEyeOS" +os_short_name="motioneyeos" +os_prefix="meye" +os_version="20170212" diff --git a/board/common/overlay/etc/watch.conf b/board/common/overlay/etc/watch.conf new file mode 100644 index 0000000000..34d46b9089 --- /dev/null +++ b/board/common/overlay/etc/watch.conf @@ -0,0 +1,15 @@ +link_watch="true" +link_watch_timeout=20 + +ip_watch="true" +ip_watch_timeout=40 + +#netwatch_host=www.google.com +#netwatch_port=80 +netwatch_retries=3 +netwatch_timeout=5 +netwatch_interval=20 + +#meyewatch_disable="true" +meyewatch_timeout=120 + diff --git a/board/common/overlay/etc/wpa_supplicant.conf b/board/common/overlay/etc/wpa_supplicant.conf new file mode 100644 index 0000000000..776be0a427 --- /dev/null +++ b/board/common/overlay/etc/wpa_supplicant.conf @@ -0,0 +1,6 @@ +update_config=1 +ctrl_interface=/var/run/wpa_supplicant + +network={ + scan_ssid=1 +} diff --git a/board/common/overlay/lib/firmware/brcm/brcmfmac43430-sdio.bin b/board/common/overlay/lib/firmware/brcm/brcmfmac43430-sdio.bin new file mode 100644 index 0000000000..84ab5b0dee Binary files /dev/null and b/board/common/overlay/lib/firmware/brcm/brcmfmac43430-sdio.bin differ diff --git a/board/common/overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt b/board/common/overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt new file mode 100644 index 0000000000..ea4f648a18 --- /dev/null +++ b/board/common/overlay/lib/firmware/brcm/brcmfmac43430-sdio.txt @@ -0,0 +1,66 @@ +# NVRAM file for BCM943430WLPTH +# 2.4 GHz, 20 MHz BW mode + +# The following parameter values are just placeholders, need to be updated. +manfid=0x2d0 +prodid=0x0727 +vendid=0x14e4 +devid=0x43e2 +boardtype=0x0727 +boardrev=0x1101 +boardnum=22 +macaddr=00:90:4c:c5:12:38 +sromrev=11 +boardflags=0x00404201 +boardflags3=0x08000000 +xtalfreq=37400 +nocrc=1 +ag0=255 +aa2g=1 +ccode=ALL + +pa0itssit=0x20 +extpagain2g=0 +#PA parameters for 2.4GHz, measured at CHIP OUTPUT +pa2ga0=-168,7161,-820 +AvVmid_c0=0x0,0xc8 +cckpwroffset0=5 + +# PPR params +maxp2ga0=84 +txpwrbckof=6 +cckbw202gpo=0 +legofdmbw202gpo=0x66111111 +mcsbw202gpo=0x77711111 +propbw202gpo=0xdd + +# OFDM IIR : +ofdmdigfilttype=18 +ofdmdigfilttypebe=18 +# PAPD mode: +papdmode=1 +papdvalidtest=1 +pacalidx2g=42 +papdepsoffset=-22 +papdendidx=58 + +# LTECX flags +ltecxmux=0 +ltecxpadnum=0x0102 +ltecxfnsel=0x44 +ltecxgcigpio=0x01 + +il0macaddr=00:90:4c:c5:12:38 +wl0id=0x431b + +deadman_to=0xffffffff +# muxenab: 0x1 for UART enable, 0x2 for GPIOs, 0x8 for JTAG +muxenab=0x1 +# CLDO PWM voltage settings - 0x4 - 1.1 volt +#cldo_pwm=0x4 + +#VCO freq 326.4MHz +spurconfig=0x3 + +edonthd20l=-75 +edoffthd20ul=-80 diff --git a/board/common/overlay/sbin/dhclient-script b/board/common/overlay/sbin/dhclient-script new file mode 100755 index 0000000000..c01eda152d --- /dev/null +++ b/board/common/overlay/sbin/dhclient-script @@ -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 + diff --git a/board/common/overlay/sbin/fwupdate b/board/common/overlay/sbin/fwupdate new file mode 100755 index 0000000000..66c8df6170 --- /dev/null +++ b/board/common/overlay/sbin/fwupdate @@ -0,0 +1,385 @@ +#!/bin/bash + + +#### usage #### + +function exit_usage() { + echo "Usage: fwupdate versions (lists available versions)" + echo " fwupdate current (shows the current version" + echo " fwupdate download (downloads a firmware version)" + echo " fwupdate extract (extracts the downloaded firmware archive)" + echo " fwupdate flashboot (flashes the boot partition from extracted image)" + echo " fwupdate flashreboot (prepares for reboot + root partititon flash)" + echo " fwupdate status (shows the current firmware updating status; see below)" + echo "" + echo "Statuses:" + echo " idle" + echo " downloading : %" + echo " downloaded " + echo " extracting " + echo " extracted " + echo " flashing boot " + echo " boot ready " + echo "" + + exit 1 +} + +if [ -z "$1" ]; then + exit_usage +fi + + +#### configuration #### + +SYS_VERSION_FILE=/etc/version +SYS_BOARD_FILE=/etc/board +OS_CONF=/data/etc/os.conf + +BOOT_DEV=/dev/mmcblk0p1 +MIN_FREE_DISK=$((500*1024)) # 500 MB +VER_FILE=version +ROOT_INFO_FILE=root_info +BOOT_READY_FILE=boot_flash_ready + +FW_DIR=/data/.fwupdate +FW_FILE=firmware.img.gz +FW_FILE_EXTR=firmware.img + +WGET_LOG_FILE=wget.log +WGET_PID_FILE=wget.pid + +GUNZIP_LOG_FILE=gunzip.log +GUNZIP_PID_FILE=gunzip.pid + +DD_LOG_FILE=dd.log +DD_PID_FILE=dd.pid + + +#### versions #### + +function show_versions() { + source $OS_CONF + board=$(cat $SYS_BOARD_FILE) + show_url=$1 + + # the /usr/libexec/list-versions-* helpers return a table with the following format: + # ||| + versions=$(FW_USERNAME=$os_firmware_username FW_PASSWORD=$os_firmware_password \ + /usr/libexec/list-versions-$os_firmware_method $os_firmware_repo) + + for version in $versions; do + OIFS=$IFS + IFS="|" + varr=($version) + IFS=$OIFS + if [ "$os_prereleases" == "false" ] && [ "${varr[1]}" == "true" ]; then + continue # skip prereleases + fi + if [ "$board" != "${varr[2]}" ]; then + continue # skip other boards + fi + + if [ "$show_url" == "true" ]; then + echo ${varr[0]} ${varr[3]} + else + echo ${varr[0]} + fi + done +} + +function show_current() { + source $SYS_VERSION_FILE + + echo $os_version +} + + +#### download #### + +function do_download() { + echo "downloading..." + + rm -f $FW_DIR/$FW_FILE + rm -f $FW_DIR/$FW_FILE_EXTR + rm -f $FW_DIR/$BOOT_READY_FILE + + source $OS_CONF + board=$(cat $SYS_BOARD_FILE) + url=$1 + version=$1 + + if ! [[ "$url" == http* ]]; then # a version was given + url=$(show_versions true | grep "^$1" | cut -d ' ' -f 2) + else + version="custom" + fi + + if [ -z "$url" ]; then + echo "no such version" 1>&2 + exit 1 + fi + + free_disk=$(df /data | tail -n 1 | tr -s ' ' | cut -d ' ' -f 4) + if [ "$free_disk" -lt $MIN_FREE_DISK ]; then + echo "not enough disk space" 1>&2 + exit 1 + fi + + rm -rf $FW_DIR/* + mkdir -p $FW_DIR + echo $version > $FW_DIR/$VER_FILE + + wget --no-check-certificate -O $FW_DIR/$FW_FILE --quiet --show-progress --progress=dot "$url" &> $FW_DIR/$WGET_LOG_FILE & + pid=$! + echo $pid > $FW_DIR/$WGET_PID_FILE + wait $pid +} + +function download_status() { + if [ -f $FW_DIR/$WGET_PID_FILE ]; then + pid=$(cat $FW_DIR/$WGET_PID_FILE) + if kill -0 $pid &>/dev/null; then + progress=$(tail -n2 $FW_DIR/$WGET_LOG_FILE | grep -oe '[[:digit:]]*%') + if [ -z "$progress" ]; then + progress="0%" + fi + + progress=($progress) + + echo ${progress[0]} + return + fi + fi + + if [ -f $FW_DIR/$FW_FILE ]; then + echo "done" + fi +} + + +#### extract #### + +function do_extract() { + echo "extracting..." + + rm -f $FW_DIR/$FW_FILE_EXTR + rm -f $FW_DIR/$BOOT_READY_FILE + + if ! [ -f $FW_DIR/$FW_FILE ]; then + echo "firmware file not downloaded" 1>&2 + exit 1 + fi + + rm -f $FW_DIR/$FW_FILE_EXTR + + gunzip -k -c $FW_DIR/$FW_FILE > $FW_DIR/$FW_FILE_EXTR 2>$FW_DIR/$GUNZIP_LOG_FILE & + pid=$! + echo $pid > $FW_DIR/$GUNZIP_PID_FILE + wait $pid + + # TODO verify hash +} + +function extract_status() { + if [ -f $FW_DIR/$GUNZIP_PID_FILE ]; then + pid=$(cat $FW_DIR/$GUNZIP_PID_FILE) + if kill -0 $pid &>/dev/null; then + echo "running" + return + fi + fi + + if [ -f $FW_DIR/$FW_FILE_EXTR ]; then + echo "done" + fi +} + + +#### flash boot #### + +function flash_boot() { + echo "flashing boot..." + + rm -f $FW_DIR/$BOOT_READY_FILE + + set +e + board=$(cat $SYS_BOARD_FILE) + + cp -r /boot $FW_DIR/old_boot + umount /boot + trap flash_cleanup EXIT + + mount -o remount,rw / + mv /sbin/reboot /sbin/reboot.bak + ln -s /bin/true /sbin/reboot + + boot_info=$(fdisk --bytes -l -o device,start,end,size $FW_DIR/$FW_FILE_EXTR | grep "${FW_FILE_EXTR}1") + boot_info=($boot_info) + boot_start=$((${boot_info[1]} / 2048)) # in MB + boot_size=$((${boot_info[3]} / 1048576)) # in MB + + root_info=$(fdisk --bytes -l -o device,start,end,size $FW_DIR/$FW_FILE_EXTR | grep "${FW_FILE_EXTR}2") + root_info=($root_info) + root_start=$((${root_info[1]} / 2048)) # in MB + root_size=$((${root_info[3]} / 1048576)) # in MB + + echo $root_start $root_size > $FW_DIR/$ROOT_INFO_FILE + + dd if=$FW_DIR/$FW_FILE_EXTR skip=$boot_start of=$BOOT_DEV bs=1048576 count=$boot_size &>$FW_DIR/$DD_LOG_FILE & + pid=$! + echo $pid > $FW_DIR/$DD_PID_FILE + wait $pid + + mount -o rw /boot + restore_boot_$board $FW_DIR/old_boot 2>/dev/null || true + touch $FW_DIR/$BOOT_READY_FILE +} + +function flash_boot_status() { + if [ -f $FW_DIR/$DD_PID_FILE ]; then + pid=$(cat $FW_DIR/$DD_PID_FILE) + if kill -0 $pid &>/dev/null; then + echo "running" + return + fi + fi + + if [ -f $FW_DIR/$BOOT_READY_FILE ]; then + echo "done" + fi +} + +function flash_cleanup() { + if [ -f /sbin/reboot.bak ]; then + rm -f /sbin/reboot + mv /sbin/reboot.bak /sbin/reboot + fi + + mount /boot 2>/dev/null +} + +function restore_boot_raspberrypi() { + old_boot=$1 + cp $old_boot/config.txt /boot +} + +function restore_boot_raspberrypi2() { + restore_boot_raspberrypi +} + +function restore_boot_raspberrypi3() { + restore_boot_raspberrypi +} + + +#### flash reboot #### + +function flash_reboot() { + echo "preparing for reboot..." + + board=$(cat $SYS_BOARD_FILE) + + mount -o remount,rw /boot + prepare_boot_$board + + sync + busybox reboot & + sleep 10 + echo b > /proc/sysrq-trigger + + exit 0 +} + +function prepare_boot_raspberrypi() { + echo "initramfs fwupdater.gz" >> /boot/config.txt +} + +function prepare_boot_raspberrypi2() { + prepare_boot_raspberrypi +} + +function prepare_boot_raspberrypi3() { + prepare_boot_raspberrypi +} + + +#### status #### + +function show_status() { + status=$(flash_boot_status) + if [ "$status" == "running" ]; then + echo "flashing boot $(new_version)" + return + elif [ "$status" == "done" ]; then + echo "boot ready $(new_version)" + return + fi + + status=$(extract_status) + if [ "$status" == "running" ]; then + echo "extracting $(new_version)" + return + elif [ "$status" == "done" ]; then + echo "extracted $(new_version)" + return + fi + + status=$(download_status) + if [ "$status" == "done" ]; then + echo "downloaded $(new_version)" + return + elif [ -n "$status" ]; then + echo "downloading $(new_version): $status" + return + fi + + echo "idle" +} + +function new_version() { + cat $FW_DIR/$VER_FILE +} + + +case "$1" in + versions) + show_versions + ;; + + current) + show_current + ;; + + download) + if [ -z "$2" ]; then + exit_usage + fi + + do_download $2 + show_status + ;; + + extract) + do_extract + show_status + ;; + + flashboot) + flash_boot + show_status + ;; + + flashreboot) + flash_reboot + ;; + + status) + show_status + ;; + + *) + exit_usage + ;; +esac + diff --git a/board/common/overlay/sbin/reboot b/board/common/overlay/sbin/reboot new file mode 100755 index 0000000000..5278c19d34 --- /dev/null +++ b/board/common/overlay/sbin/reboot @@ -0,0 +1,7 @@ +#!/bin/bash + +set +e +/bin/sync +(sleep 10 && /usr/bin/killall -STOP watchdog) & +/bin/busybox reboot + diff --git a/board/common/overlay/usr/libexec/list-versions-bitbucket b/board/common/overlay/usr/libexec/list-versions-bitbucket new file mode 100755 index 0000000000..e54c188a84 --- /dev/null +++ b/board/common/overlay/usr/libexec/list-versions-bitbucket @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ -z "$1" ]; then + echo "Usage: $0 " 1>&2 + exit -1 +fi + +opts="-s -S -f" +test -n "$FW_USERNAME" && opts+=" --user $FW_USERNAME:$FW_PASSWORD" +url="https://api.bitbucket.org/2.0/repositories/$1/downloads?pagelen=100&_=$(date +%s)" +jq_expr='.values[] | [{a: .name | split("-"), url: .links.self.href}] | map((.a[2] | rtrimstr(".img.gz") | rtrimstr(".img")), "false", .a[1], .url) | join("|")' + +curl $opts $url | jq --raw-output "$jq_expr" +exit ${PIPESTATUS[0]} + diff --git a/board/common/overlay/usr/libexec/list-versions-github b/board/common/overlay/usr/libexec/list-versions-github new file mode 100755 index 0000000000..edea55c26c --- /dev/null +++ b/board/common/overlay/usr/libexec/list-versions-github @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ -z "$1" ]; then + echo "Usage: $0 " 1>&2 + exit -1 +fi + +opts="-s -S -f" +test -n "$FW_USERNAME" && opts+=" --user $FW_USERNAME:$FW_PASSWORD" +url=https://api.github.com/repos/$1/releases +jq_expr='.[] | {version: .name, prerelease: .prerelease | tostring} + (.assets[] | {name: .name | split("-")[1], url: .browser_download_url}) | flatten | join("|")' + +curl $opts $url | jq --raw-output "$jq_expr" +exit ${PIPESTATUS[0]} + diff --git a/board/common/overlay/usr/share/post-upgrade/20160828.sh b/board/common/overlay/usr/share/post-upgrade/20160828.sh new file mode 100755 index 0000000000..8a66549a9a --- /dev/null +++ b/board/common/overlay/usr/share/post-upgrade/20160828.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# more settings have been added to [/data]/etc/os.conf + +echo 'os_networkless="false"' >> /data/etc/os.conf +echo 'os_eth="eth0"' >> /data/etc/os.conf +echo 'os_wlan="wlan0"' >> /data/etc/os.conf +echo 'os_ppp="ppp0"' >> /data/etc/os.conf + +# boolean values in watch.conf have been normalized to "true" and "false" +sed -i 's/=no/="false"/' /data/etc/watch.conf +sed -i 's/=yes/="true"/' /data/etc/watch.conf + diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Abidjan b/board/common/overlay/usr/share/zoneinfo/Africa/Abidjan new file mode 100644 index 0000000000..65d19ec265 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Abidjan differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Accra b/board/common/overlay/usr/share/zoneinfo/Africa/Accra new file mode 100644 index 0000000000..8c473eda0b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Accra differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Addis_Ababa b/board/common/overlay/usr/share/zoneinfo/Africa/Addis_Ababa new file mode 100644 index 0000000000..5a95ab6662 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Addis_Ababa differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Algiers b/board/common/overlay/usr/share/zoneinfo/Africa/Algiers new file mode 100644 index 0000000000..c888831171 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Algiers differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Asmara b/board/common/overlay/usr/share/zoneinfo/Africa/Asmara new file mode 100644 index 0000000000..d1e876e2ff Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Asmara differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Bamako b/board/common/overlay/usr/share/zoneinfo/Africa/Bamako new file mode 100644 index 0000000000..da18d71377 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Bamako differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Bangui b/board/common/overlay/usr/share/zoneinfo/Africa/Bangui new file mode 100644 index 0000000000..883e597eb0 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Bangui differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Banjul b/board/common/overlay/usr/share/zoneinfo/Africa/Banjul new file mode 100644 index 0000000000..a85a7d8726 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Banjul differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Bissau b/board/common/overlay/usr/share/zoneinfo/Africa/Bissau new file mode 100644 index 0000000000..ab4a195a88 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Bissau differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Blantyre b/board/common/overlay/usr/share/zoneinfo/Africa/Blantyre new file mode 100644 index 0000000000..2972580dad Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Blantyre differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Brazzaville b/board/common/overlay/usr/share/zoneinfo/Africa/Brazzaville new file mode 100644 index 0000000000..abb0c08700 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Brazzaville differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Bujumbura b/board/common/overlay/usr/share/zoneinfo/Africa/Bujumbura new file mode 100644 index 0000000000..cac5652457 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Bujumbura differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Cairo b/board/common/overlay/usr/share/zoneinfo/Africa/Cairo new file mode 100644 index 0000000000..2b2a3d750b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Cairo differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Casablanca b/board/common/overlay/usr/share/zoneinfo/Africa/Casablanca new file mode 100644 index 0000000000..395cbda420 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Casablanca differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Ceuta b/board/common/overlay/usr/share/zoneinfo/Africa/Ceuta new file mode 100644 index 0000000000..c9b0c08bc8 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Ceuta differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Conakry b/board/common/overlay/usr/share/zoneinfo/Africa/Conakry new file mode 100644 index 0000000000..75b8523fb2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Conakry differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Dakar b/board/common/overlay/usr/share/zoneinfo/Africa/Dakar new file mode 100644 index 0000000000..31104133c2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Dakar differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Dar_es_Salaam b/board/common/overlay/usr/share/zoneinfo/Africa/Dar_es_Salaam new file mode 100644 index 0000000000..720d76c830 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Dar_es_Salaam differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Djibouti b/board/common/overlay/usr/share/zoneinfo/Africa/Djibouti new file mode 100644 index 0000000000..297d93a3e4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Djibouti differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Douala b/board/common/overlay/usr/share/zoneinfo/Africa/Douala new file mode 100644 index 0000000000..8627f2e05e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Douala differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/El_Aaiun b/board/common/overlay/usr/share/zoneinfo/Africa/El_Aaiun new file mode 100644 index 0000000000..93b86cc36c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/El_Aaiun differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Freetown b/board/common/overlay/usr/share/zoneinfo/Africa/Freetown new file mode 100644 index 0000000000..720b8e3c90 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Freetown differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Gaborone b/board/common/overlay/usr/share/zoneinfo/Africa/Gaborone new file mode 100644 index 0000000000..e2abcb6643 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Gaborone differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Harare b/board/common/overlay/usr/share/zoneinfo/Africa/Harare new file mode 100644 index 0000000000..258b393637 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Harare differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Johannesburg b/board/common/overlay/usr/share/zoneinfo/Africa/Johannesburg new file mode 100644 index 0000000000..d1bec73815 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Johannesburg differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Juba b/board/common/overlay/usr/share/zoneinfo/Africa/Juba new file mode 100644 index 0000000000..6f62fd764c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Juba differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Kampala b/board/common/overlay/usr/share/zoneinfo/Africa/Kampala new file mode 100644 index 0000000000..b018ba26f2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Kampala differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Khartoum b/board/common/overlay/usr/share/zoneinfo/Africa/Khartoum new file mode 100644 index 0000000000..6f62fd764c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Khartoum differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Kigali b/board/common/overlay/usr/share/zoneinfo/Africa/Kigali new file mode 100644 index 0000000000..c9623c56e8 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Kigali differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Kinshasa b/board/common/overlay/usr/share/zoneinfo/Africa/Kinshasa new file mode 100644 index 0000000000..e8481f3476 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Kinshasa differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Lagos b/board/common/overlay/usr/share/zoneinfo/Africa/Lagos new file mode 100644 index 0000000000..cbdc0450fc Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Lagos differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Libreville b/board/common/overlay/usr/share/zoneinfo/Africa/Libreville new file mode 100644 index 0000000000..d7691ae56f Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Libreville differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Lome b/board/common/overlay/usr/share/zoneinfo/Africa/Lome new file mode 100644 index 0000000000..297ec5dae3 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Lome differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Luanda b/board/common/overlay/usr/share/zoneinfo/Africa/Luanda new file mode 100644 index 0000000000..576b2043cf Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Luanda differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Lubumbashi b/board/common/overlay/usr/share/zoneinfo/Africa/Lubumbashi new file mode 100644 index 0000000000..d3fab52a6c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Lubumbashi differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Lusaka b/board/common/overlay/usr/share/zoneinfo/Africa/Lusaka new file mode 100644 index 0000000000..87d7a95fc7 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Lusaka differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Malabo b/board/common/overlay/usr/share/zoneinfo/Africa/Malabo new file mode 100644 index 0000000000..c70de1f99d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Malabo differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Maputo b/board/common/overlay/usr/share/zoneinfo/Africa/Maputo new file mode 100644 index 0000000000..31cfad771a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Maputo differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Maseru b/board/common/overlay/usr/share/zoneinfo/Africa/Maseru new file mode 100644 index 0000000000..117006eead Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Maseru differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Mbabane b/board/common/overlay/usr/share/zoneinfo/Africa/Mbabane new file mode 100644 index 0000000000..be6ed60baa Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Mbabane differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Mogadishu b/board/common/overlay/usr/share/zoneinfo/Africa/Mogadishu new file mode 100644 index 0000000000..bd08463429 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Mogadishu differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Monrovia b/board/common/overlay/usr/share/zoneinfo/Africa/Monrovia new file mode 100644 index 0000000000..bd2fa4e631 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Monrovia differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Nairobi b/board/common/overlay/usr/share/zoneinfo/Africa/Nairobi new file mode 100644 index 0000000000..72676bb987 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Nairobi differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Ndjamena b/board/common/overlay/usr/share/zoneinfo/Africa/Ndjamena new file mode 100644 index 0000000000..8779590e04 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Ndjamena differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Niamey b/board/common/overlay/usr/share/zoneinfo/Africa/Niamey new file mode 100644 index 0000000000..799381c310 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Niamey differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Nouakchott b/board/common/overlay/usr/share/zoneinfo/Africa/Nouakchott new file mode 100644 index 0000000000..ead817afcd Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Nouakchott differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Ouagadougou b/board/common/overlay/usr/share/zoneinfo/Africa/Ouagadougou new file mode 100644 index 0000000000..df782a489c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Ouagadougou differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Porto-Novo b/board/common/overlay/usr/share/zoneinfo/Africa/Porto-Novo new file mode 100644 index 0000000000..600a30d82a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Porto-Novo differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Sao_Tome b/board/common/overlay/usr/share/zoneinfo/Africa/Sao_Tome new file mode 100644 index 0000000000..ddf7fb42e4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Sao_Tome differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Tripoli b/board/common/overlay/usr/share/zoneinfo/Africa/Tripoli new file mode 100644 index 0000000000..bd885315f8 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Tripoli differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Tunis b/board/common/overlay/usr/share/zoneinfo/Africa/Tunis new file mode 100644 index 0000000000..dd559ee763 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Tunis differ diff --git a/board/common/overlay/usr/share/zoneinfo/Africa/Windhoek b/board/common/overlay/usr/share/zoneinfo/Africa/Windhoek new file mode 100644 index 0000000000..6f22b0a7df Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Africa/Windhoek differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Adak b/board/common/overlay/usr/share/zoneinfo/America/Adak new file mode 100644 index 0000000000..391ec98ec0 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Adak differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Anchorage b/board/common/overlay/usr/share/zoneinfo/America/Anchorage new file mode 100644 index 0000000000..d14735026a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Anchorage differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Anguilla b/board/common/overlay/usr/share/zoneinfo/America/Anguilla new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Anguilla differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Antigua b/board/common/overlay/usr/share/zoneinfo/America/Antigua new file mode 100644 index 0000000000..608b635977 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Antigua differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Araguaina b/board/common/overlay/usr/share/zoneinfo/America/Araguaina new file mode 100644 index 0000000000..ceb7977cf5 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Araguaina differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Argentina/Buenos_Aires b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Buenos_Aires new file mode 100644 index 0000000000..5a52a51fc8 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Buenos_Aires differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Argentina/Catamarca b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Catamarca new file mode 100644 index 0000000000..b9c987bb56 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Catamarca differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Argentina/Cordoba b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Cordoba new file mode 100644 index 0000000000..a703e957d5 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Cordoba differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Argentina/Jujuy b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Jujuy new file mode 100644 index 0000000000..86800f0344 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Jujuy differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Argentina/La_Rioja b/board/common/overlay/usr/share/zoneinfo/America/Argentina/La_Rioja new file mode 100644 index 0000000000..333819a15f Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Argentina/La_Rioja differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Argentina/Mendoza b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Mendoza new file mode 100644 index 0000000000..76afd5909e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Mendoza differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Argentina/Rio_Gallegos b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Rio_Gallegos new file mode 100644 index 0000000000..65d0230a2d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Rio_Gallegos differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Argentina/Salta b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Salta new file mode 100644 index 0000000000..963917a01a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Salta differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Argentina/San_Juan b/board/common/overlay/usr/share/zoneinfo/America/Argentina/San_Juan new file mode 100644 index 0000000000..fe7007b85c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Argentina/San_Juan differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Argentina/San_Luis b/board/common/overlay/usr/share/zoneinfo/America/Argentina/San_Luis new file mode 100644 index 0000000000..e19478819e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Argentina/San_Luis differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Argentina/Tucuman b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Tucuman new file mode 100644 index 0000000000..be7bd27163 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Tucuman differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Argentina/Ushuaia b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Ushuaia new file mode 100644 index 0000000000..18590effb0 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Argentina/Ushuaia differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Aruba b/board/common/overlay/usr/share/zoneinfo/America/Aruba new file mode 100644 index 0000000000..2d01c18860 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Aruba differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Asuncion b/board/common/overlay/usr/share/zoneinfo/America/Asuncion new file mode 100644 index 0000000000..59f78918fa Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Asuncion differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Atikokan b/board/common/overlay/usr/share/zoneinfo/America/Atikokan new file mode 100644 index 0000000000..1b49e37c94 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Atikokan differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Bahia b/board/common/overlay/usr/share/zoneinfo/America/Bahia new file mode 100644 index 0000000000..403d9d1060 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Bahia differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Bahia_Banderas b/board/common/overlay/usr/share/zoneinfo/America/Bahia_Banderas new file mode 100644 index 0000000000..cd531078d0 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Bahia_Banderas differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Barbados b/board/common/overlay/usr/share/zoneinfo/America/Barbados new file mode 100644 index 0000000000..7bb7ac4d6a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Barbados differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Belem b/board/common/overlay/usr/share/zoneinfo/America/Belem new file mode 100644 index 0000000000..9c37b6a5c4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Belem differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Belize b/board/common/overlay/usr/share/zoneinfo/America/Belize new file mode 100644 index 0000000000..a18cd39058 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Belize differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Blanc-Sablon b/board/common/overlay/usr/share/zoneinfo/America/Blanc-Sablon new file mode 100644 index 0000000000..8a33789afc Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Blanc-Sablon differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Boa_Vista b/board/common/overlay/usr/share/zoneinfo/America/Boa_Vista new file mode 100644 index 0000000000..cb15afbf5c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Boa_Vista differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Bogota b/board/common/overlay/usr/share/zoneinfo/America/Bogota new file mode 100644 index 0000000000..bddda98a2c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Bogota differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Boise b/board/common/overlay/usr/share/zoneinfo/America/Boise new file mode 100644 index 0000000000..441afe55c4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Boise differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Cambridge_Bay b/board/common/overlay/usr/share/zoneinfo/America/Cambridge_Bay new file mode 100644 index 0000000000..99c77c5b20 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Cambridge_Bay differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Campo_Grande b/board/common/overlay/usr/share/zoneinfo/America/Campo_Grande new file mode 100644 index 0000000000..4684098104 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Campo_Grande differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Cancun b/board/common/overlay/usr/share/zoneinfo/America/Cancun new file mode 100644 index 0000000000..90993faa70 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Cancun differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Caracas b/board/common/overlay/usr/share/zoneinfo/America/Caracas new file mode 100644 index 0000000000..d96a5c00bf Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Caracas differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Cayenne b/board/common/overlay/usr/share/zoneinfo/America/Cayenne new file mode 100644 index 0000000000..7109a98ec5 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Cayenne differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Cayman b/board/common/overlay/usr/share/zoneinfo/America/Cayman new file mode 100644 index 0000000000..98d9b98d3b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Cayman differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Chicago b/board/common/overlay/usr/share/zoneinfo/America/Chicago new file mode 100644 index 0000000000..71aae7246a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Chicago differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Chihuahua b/board/common/overlay/usr/share/zoneinfo/America/Chihuahua new file mode 100644 index 0000000000..b2687241cd Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Chihuahua differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Costa_Rica b/board/common/overlay/usr/share/zoneinfo/America/Costa_Rica new file mode 100644 index 0000000000..018d945b11 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Costa_Rica differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Creston b/board/common/overlay/usr/share/zoneinfo/America/Creston new file mode 100644 index 0000000000..1cf719ae83 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Creston differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Cuiaba b/board/common/overlay/usr/share/zoneinfo/America/Cuiaba new file mode 100644 index 0000000000..232ef670ff Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Cuiaba differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Curacao b/board/common/overlay/usr/share/zoneinfo/America/Curacao new file mode 100644 index 0000000000..2d01c18860 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Curacao differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Danmarkshavn b/board/common/overlay/usr/share/zoneinfo/America/Danmarkshavn new file mode 100644 index 0000000000..9feacfb1c9 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Danmarkshavn differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Dawson b/board/common/overlay/usr/share/zoneinfo/America/Dawson new file mode 100644 index 0000000000..fab0609998 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Dawson differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Dawson_Creek b/board/common/overlay/usr/share/zoneinfo/America/Dawson_Creek new file mode 100644 index 0000000000..c3fb166b08 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Dawson_Creek differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Denver b/board/common/overlay/usr/share/zoneinfo/America/Denver new file mode 100644 index 0000000000..f8908febf2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Denver differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Detroit b/board/common/overlay/usr/share/zoneinfo/America/Detroit new file mode 100644 index 0000000000..da53d46df3 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Detroit differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Dominica b/board/common/overlay/usr/share/zoneinfo/America/Dominica new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Dominica differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Edmonton b/board/common/overlay/usr/share/zoneinfo/America/Edmonton new file mode 100644 index 0000000000..3fa0579891 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Edmonton differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Eirunepe b/board/common/overlay/usr/share/zoneinfo/America/Eirunepe new file mode 100644 index 0000000000..c93d917091 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Eirunepe differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/El_Salvador b/board/common/overlay/usr/share/zoneinfo/America/El_Salvador new file mode 100644 index 0000000000..ac774e83f4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/El_Salvador differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Fortaleza b/board/common/overlay/usr/share/zoneinfo/America/Fortaleza new file mode 100644 index 0000000000..2598c53559 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Fortaleza differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Glace_Bay b/board/common/overlay/usr/share/zoneinfo/America/Glace_Bay new file mode 100644 index 0000000000..48412a4cbf Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Glace_Bay differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Godthab b/board/common/overlay/usr/share/zoneinfo/America/Godthab new file mode 100644 index 0000000000..5cb97910f8 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Godthab differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Goose_Bay b/board/common/overlay/usr/share/zoneinfo/America/Goose_Bay new file mode 100644 index 0000000000..83e5a9b398 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Goose_Bay differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Grand_Turk b/board/common/overlay/usr/share/zoneinfo/America/Grand_Turk new file mode 100644 index 0000000000..0dfd686fd5 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Grand_Turk differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Grenada b/board/common/overlay/usr/share/zoneinfo/America/Grenada new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Grenada differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Guadeloupe b/board/common/overlay/usr/share/zoneinfo/America/Guadeloupe new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Guadeloupe differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Guatemala b/board/common/overlay/usr/share/zoneinfo/America/Guatemala new file mode 100644 index 0000000000..6118b5ce2d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Guatemala differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Guayaquil b/board/common/overlay/usr/share/zoneinfo/America/Guayaquil new file mode 100644 index 0000000000..e6de7f8da2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Guayaquil differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Guyana b/board/common/overlay/usr/share/zoneinfo/America/Guyana new file mode 100644 index 0000000000..5f98c4a0e8 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Guyana differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Halifax b/board/common/overlay/usr/share/zoneinfo/America/Halifax new file mode 100644 index 0000000000..756099abe6 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Halifax differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Havana b/board/common/overlay/usr/share/zoneinfo/America/Havana new file mode 100644 index 0000000000..c2623e05f5 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Havana differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Hermosillo b/board/common/overlay/usr/share/zoneinfo/America/Hermosillo new file mode 100644 index 0000000000..26c269d967 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Hermosillo differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Indiana/Indianapolis b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Indianapolis new file mode 100644 index 0000000000..aa3dfc4373 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Indianapolis differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Indiana/Knox b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Knox new file mode 100644 index 0000000000..33169f4596 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Knox differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Indiana/Marengo b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Marengo new file mode 100644 index 0000000000..255b739718 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Marengo differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Indiana/Petersburg b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Petersburg new file mode 100644 index 0000000000..c611106d57 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Petersburg differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Indiana/Tell_City b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Tell_City new file mode 100644 index 0000000000..97e319e343 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Tell_City differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Indiana/Vevay b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Vevay new file mode 100644 index 0000000000..de6167c082 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Vevay differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Indiana/Vincennes b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Vincennes new file mode 100644 index 0000000000..b79f6725b6 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Vincennes differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Indiana/Winamac b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Winamac new file mode 100644 index 0000000000..b2611e75ee Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Indiana/Winamac differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Inuvik b/board/common/overlay/usr/share/zoneinfo/America/Inuvik new file mode 100644 index 0000000000..c17af37f5f Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Inuvik differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Iqaluit b/board/common/overlay/usr/share/zoneinfo/America/Iqaluit new file mode 100644 index 0000000000..cea5c2e0f3 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Iqaluit differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Jamaica b/board/common/overlay/usr/share/zoneinfo/America/Jamaica new file mode 100644 index 0000000000..b89c18787e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Jamaica differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Juneau b/board/common/overlay/usr/share/zoneinfo/America/Juneau new file mode 100644 index 0000000000..48bd37e88e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Juneau differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Kentucky/Louisville b/board/common/overlay/usr/share/zoneinfo/America/Kentucky/Louisville new file mode 100644 index 0000000000..65e7e19049 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Kentucky/Louisville differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Kentucky/Monticello b/board/common/overlay/usr/share/zoneinfo/America/Kentucky/Monticello new file mode 100644 index 0000000000..fc2f1b0df8 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Kentucky/Monticello differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Kralendijk b/board/common/overlay/usr/share/zoneinfo/America/Kralendijk new file mode 100644 index 0000000000..2d01c18860 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Kralendijk differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/La_Paz b/board/common/overlay/usr/share/zoneinfo/America/La_Paz new file mode 100644 index 0000000000..2a5a15e4c4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/La_Paz differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Lima b/board/common/overlay/usr/share/zoneinfo/America/Lima new file mode 100644 index 0000000000..a37eeff7de Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Lima differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Los_Angeles b/board/common/overlay/usr/share/zoneinfo/America/Los_Angeles new file mode 100644 index 0000000000..3b7ce1dcee Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Los_Angeles differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Lower_Princes b/board/common/overlay/usr/share/zoneinfo/America/Lower_Princes new file mode 100644 index 0000000000..2d01c18860 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Lower_Princes differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Maceio b/board/common/overlay/usr/share/zoneinfo/America/Maceio new file mode 100644 index 0000000000..b5201e81d4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Maceio differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Managua b/board/common/overlay/usr/share/zoneinfo/America/Managua new file mode 100644 index 0000000000..f1c35040ce Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Managua differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Manaus b/board/common/overlay/usr/share/zoneinfo/America/Manaus new file mode 100644 index 0000000000..1129211841 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Manaus differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Marigot b/board/common/overlay/usr/share/zoneinfo/America/Marigot new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Marigot differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Martinique b/board/common/overlay/usr/share/zoneinfo/America/Martinique new file mode 100644 index 0000000000..c223ef5c20 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Martinique differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Matamoros b/board/common/overlay/usr/share/zoneinfo/America/Matamoros new file mode 100644 index 0000000000..5c59984def Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Matamoros differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Mazatlan b/board/common/overlay/usr/share/zoneinfo/America/Mazatlan new file mode 100644 index 0000000000..43ee12d84a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Mazatlan differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Menominee b/board/common/overlay/usr/share/zoneinfo/America/Menominee new file mode 100644 index 0000000000..438f5ff0b8 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Menominee differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Merida b/board/common/overlay/usr/share/zoneinfo/America/Merida new file mode 100644 index 0000000000..b46298e1f2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Merida differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Metlakatla b/board/common/overlay/usr/share/zoneinfo/America/Metlakatla new file mode 100644 index 0000000000..4145b9a581 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Metlakatla differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Mexico_City b/board/common/overlay/usr/share/zoneinfo/America/Mexico_City new file mode 100644 index 0000000000..1434ab0880 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Mexico_City differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Miquelon b/board/common/overlay/usr/share/zoneinfo/America/Miquelon new file mode 100644 index 0000000000..52cd391ebb Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Miquelon differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Moncton b/board/common/overlay/usr/share/zoneinfo/America/Moncton new file mode 100644 index 0000000000..b51125ebf1 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Moncton differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Monterrey b/board/common/overlay/usr/share/zoneinfo/America/Monterrey new file mode 100644 index 0000000000..7dc5057774 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Monterrey differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Montevideo b/board/common/overlay/usr/share/zoneinfo/America/Montevideo new file mode 100644 index 0000000000..4745f0dfb2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Montevideo differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Montreal b/board/common/overlay/usr/share/zoneinfo/America/Montreal new file mode 100644 index 0000000000..47633bd49f Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Montreal differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Montserrat b/board/common/overlay/usr/share/zoneinfo/America/Montserrat new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Montserrat differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Nassau b/board/common/overlay/usr/share/zoneinfo/America/Nassau new file mode 100644 index 0000000000..5091eb5d8d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Nassau differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/New_York b/board/common/overlay/usr/share/zoneinfo/America/New_York new file mode 100644 index 0000000000..b2c2377f4e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/New_York differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Nipigon b/board/common/overlay/usr/share/zoneinfo/America/Nipigon new file mode 100644 index 0000000000..619f1f7590 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Nipigon differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Nome b/board/common/overlay/usr/share/zoneinfo/America/Nome new file mode 100644 index 0000000000..b682bfd9cd Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Nome differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Noronha b/board/common/overlay/usr/share/zoneinfo/America/Noronha new file mode 100644 index 0000000000..c60239009e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Noronha differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/North_Dakota/Beulah b/board/common/overlay/usr/share/zoneinfo/America/North_Dakota/Beulah new file mode 100644 index 0000000000..c1e3b025b9 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/North_Dakota/Beulah differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/North_Dakota/Center b/board/common/overlay/usr/share/zoneinfo/America/North_Dakota/Center new file mode 100644 index 0000000000..786ba1778a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/North_Dakota/Center differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/North_Dakota/New_Salem b/board/common/overlay/usr/share/zoneinfo/America/North_Dakota/New_Salem new file mode 100644 index 0000000000..3488e466d5 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/North_Dakota/New_Salem differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Ojinaga b/board/common/overlay/usr/share/zoneinfo/America/Ojinaga new file mode 100644 index 0000000000..37d78301bd Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Ojinaga differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Panama b/board/common/overlay/usr/share/zoneinfo/America/Panama new file mode 100644 index 0000000000..3a4ff2aecf Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Panama differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Pangnirtung b/board/common/overlay/usr/share/zoneinfo/America/Pangnirtung new file mode 100644 index 0000000000..80a6009381 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Pangnirtung differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Paramaribo b/board/common/overlay/usr/share/zoneinfo/America/Paramaribo new file mode 100644 index 0000000000..6f889ccaf1 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Paramaribo differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Phoenix b/board/common/overlay/usr/share/zoneinfo/America/Phoenix new file mode 100644 index 0000000000..67589026c2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Phoenix differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Port-au-Prince b/board/common/overlay/usr/share/zoneinfo/America/Port-au-Prince new file mode 100644 index 0000000000..3f86e8ab75 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Port-au-Prince differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Port_of_Spain b/board/common/overlay/usr/share/zoneinfo/America/Port_of_Spain new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Port_of_Spain differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Porto_Velho b/board/common/overlay/usr/share/zoneinfo/America/Porto_Velho new file mode 100644 index 0000000000..1277479232 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Porto_Velho differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Puerto_Rico b/board/common/overlay/usr/share/zoneinfo/America/Puerto_Rico new file mode 100644 index 0000000000..eada37a111 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Puerto_Rico differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Rainy_River b/board/common/overlay/usr/share/zoneinfo/America/Rainy_River new file mode 100644 index 0000000000..e006a30dbf Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Rainy_River differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Rankin_Inlet b/board/common/overlay/usr/share/zoneinfo/America/Rankin_Inlet new file mode 100644 index 0000000000..99195714c4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Rankin_Inlet differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Recife b/board/common/overlay/usr/share/zoneinfo/America/Recife new file mode 100644 index 0000000000..0903a77195 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Recife differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Regina b/board/common/overlay/usr/share/zoneinfo/America/Regina new file mode 100644 index 0000000000..20c9c84df4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Regina differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Resolute b/board/common/overlay/usr/share/zoneinfo/America/Resolute new file mode 100644 index 0000000000..7713f5bead Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Resolute differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Rio_Branco b/board/common/overlay/usr/share/zoneinfo/America/Rio_Branco new file mode 100644 index 0000000000..21cf598ff1 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Rio_Branco differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Santa_Isabel b/board/common/overlay/usr/share/zoneinfo/America/Santa_Isabel new file mode 100644 index 0000000000..80a2f2d5b1 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Santa_Isabel differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Santarem b/board/common/overlay/usr/share/zoneinfo/America/Santarem new file mode 100644 index 0000000000..45419528f9 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Santarem differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Santiago b/board/common/overlay/usr/share/zoneinfo/America/Santiago new file mode 100644 index 0000000000..7cf0a1e187 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Santiago differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Santo_Domingo b/board/common/overlay/usr/share/zoneinfo/America/Santo_Domingo new file mode 100644 index 0000000000..23ace9adc3 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Santo_Domingo differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Sao_Paulo b/board/common/overlay/usr/share/zoneinfo/America/Sao_Paulo new file mode 100644 index 0000000000..8df63a17bd Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Sao_Paulo differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Scoresbysund b/board/common/overlay/usr/share/zoneinfo/America/Scoresbysund new file mode 100644 index 0000000000..fae3757ce9 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Scoresbysund differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Sitka b/board/common/overlay/usr/share/zoneinfo/America/Sitka new file mode 100644 index 0000000000..f2ae47a323 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Sitka differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/St_Barthelemy b/board/common/overlay/usr/share/zoneinfo/America/St_Barthelemy new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/St_Barthelemy differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/St_Johns b/board/common/overlay/usr/share/zoneinfo/America/St_Johns new file mode 100644 index 0000000000..e7a18d601d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/St_Johns differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/St_Kitts b/board/common/overlay/usr/share/zoneinfo/America/St_Kitts new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/St_Kitts differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/St_Lucia b/board/common/overlay/usr/share/zoneinfo/America/St_Lucia new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/St_Lucia differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/St_Thomas b/board/common/overlay/usr/share/zoneinfo/America/St_Thomas new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/St_Thomas differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/St_Vincent b/board/common/overlay/usr/share/zoneinfo/America/St_Vincent new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/St_Vincent differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Swift_Current b/board/common/overlay/usr/share/zoneinfo/America/Swift_Current new file mode 100644 index 0000000000..8e9ef255ee Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Swift_Current differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Tegucigalpa b/board/common/overlay/usr/share/zoneinfo/America/Tegucigalpa new file mode 100644 index 0000000000..477e93950c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Tegucigalpa differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Thule b/board/common/overlay/usr/share/zoneinfo/America/Thule new file mode 100644 index 0000000000..2969ebe59b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Thule differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Thunder_Bay b/board/common/overlay/usr/share/zoneinfo/America/Thunder_Bay new file mode 100644 index 0000000000..34f750b4df Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Thunder_Bay differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Tijuana b/board/common/overlay/usr/share/zoneinfo/America/Tijuana new file mode 100644 index 0000000000..fffdc24bfc Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Tijuana differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Toronto b/board/common/overlay/usr/share/zoneinfo/America/Toronto new file mode 100644 index 0000000000..1698477a48 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Toronto differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Tortola b/board/common/overlay/usr/share/zoneinfo/America/Tortola new file mode 100644 index 0000000000..bdedd1bd9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Tortola differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Vancouver b/board/common/overlay/usr/share/zoneinfo/America/Vancouver new file mode 100644 index 0000000000..0c1fa52690 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Vancouver differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Whitehorse b/board/common/overlay/usr/share/zoneinfo/America/Whitehorse new file mode 100644 index 0000000000..15216d55ff Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Whitehorse differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Winnipeg b/board/common/overlay/usr/share/zoneinfo/America/Winnipeg new file mode 100644 index 0000000000..2d22791686 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Winnipeg differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Yakutat b/board/common/overlay/usr/share/zoneinfo/America/Yakutat new file mode 100644 index 0000000000..8071602773 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Yakutat differ diff --git a/board/common/overlay/usr/share/zoneinfo/America/Yellowknife b/board/common/overlay/usr/share/zoneinfo/America/Yellowknife new file mode 100644 index 0000000000..947bec914b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/America/Yellowknife differ diff --git a/board/common/overlay/usr/share/zoneinfo/Antarctica/Casey b/board/common/overlay/usr/share/zoneinfo/Antarctica/Casey new file mode 100644 index 0000000000..8ebf0598ff Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Antarctica/Casey differ diff --git a/board/common/overlay/usr/share/zoneinfo/Antarctica/Davis b/board/common/overlay/usr/share/zoneinfo/Antarctica/Davis new file mode 100644 index 0000000000..cd7acad690 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Antarctica/Davis differ diff --git a/board/common/overlay/usr/share/zoneinfo/Antarctica/DumontDUrville b/board/common/overlay/usr/share/zoneinfo/Antarctica/DumontDUrville new file mode 100644 index 0000000000..5ea18e6e77 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Antarctica/DumontDUrville differ diff --git a/board/common/overlay/usr/share/zoneinfo/Antarctica/Macquarie b/board/common/overlay/usr/share/zoneinfo/Antarctica/Macquarie new file mode 100644 index 0000000000..cbad31bb94 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Antarctica/Macquarie differ diff --git a/board/common/overlay/usr/share/zoneinfo/Antarctica/Mawson b/board/common/overlay/usr/share/zoneinfo/Antarctica/Mawson new file mode 100644 index 0000000000..48e24e1e5e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Antarctica/Mawson differ diff --git a/board/common/overlay/usr/share/zoneinfo/Antarctica/McMurdo b/board/common/overlay/usr/share/zoneinfo/Antarctica/McMurdo new file mode 100644 index 0000000000..a40767df93 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Antarctica/McMurdo differ diff --git a/board/common/overlay/usr/share/zoneinfo/Antarctica/Palmer b/board/common/overlay/usr/share/zoneinfo/Antarctica/Palmer new file mode 100644 index 0000000000..a1bcf2784b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Antarctica/Palmer differ diff --git a/board/common/overlay/usr/share/zoneinfo/Antarctica/Rothera b/board/common/overlay/usr/share/zoneinfo/Antarctica/Rothera new file mode 100644 index 0000000000..b5dc735639 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Antarctica/Rothera differ diff --git a/board/common/overlay/usr/share/zoneinfo/Antarctica/Syowa b/board/common/overlay/usr/share/zoneinfo/Antarctica/Syowa new file mode 100644 index 0000000000..ba6e5f3887 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Antarctica/Syowa differ diff --git a/board/common/overlay/usr/share/zoneinfo/Antarctica/Troll b/board/common/overlay/usr/share/zoneinfo/Antarctica/Troll new file mode 100644 index 0000000000..ad6c8b4f6c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Antarctica/Troll differ diff --git a/board/common/overlay/usr/share/zoneinfo/Antarctica/Vostok b/board/common/overlay/usr/share/zoneinfo/Antarctica/Vostok new file mode 100644 index 0000000000..e19e2b7cdb Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Antarctica/Vostok differ diff --git a/board/common/overlay/usr/share/zoneinfo/Arctic/Longyearbyen b/board/common/overlay/usr/share/zoneinfo/Arctic/Longyearbyen new file mode 100644 index 0000000000..6326961453 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Arctic/Longyearbyen differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Aden b/board/common/overlay/usr/share/zoneinfo/Asia/Aden new file mode 100644 index 0000000000..5948b310b9 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Aden differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Almaty b/board/common/overlay/usr/share/zoneinfo/Asia/Almaty new file mode 100644 index 0000000000..52f941e266 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Almaty differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Amman b/board/common/overlay/usr/share/zoneinfo/Asia/Amman new file mode 100644 index 0000000000..281b304e2f Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Amman differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Anadyr b/board/common/overlay/usr/share/zoneinfo/Asia/Anadyr new file mode 100644 index 0000000000..2841a6376d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Anadyr differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Aqtau b/board/common/overlay/usr/share/zoneinfo/Asia/Aqtau new file mode 100644 index 0000000000..27a3d50d37 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Aqtau differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Aqtobe b/board/common/overlay/usr/share/zoneinfo/Asia/Aqtobe new file mode 100644 index 0000000000..3683be2db8 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Aqtobe differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Ashgabat b/board/common/overlay/usr/share/zoneinfo/Asia/Ashgabat new file mode 100644 index 0000000000..589dbc18ea Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Ashgabat differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Baghdad b/board/common/overlay/usr/share/zoneinfo/Asia/Baghdad new file mode 100644 index 0000000000..3ad361495c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Baghdad differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Bahrain b/board/common/overlay/usr/share/zoneinfo/Asia/Bahrain new file mode 100644 index 0000000000..d87b7ce739 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Bahrain differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Baku b/board/common/overlay/usr/share/zoneinfo/Asia/Baku new file mode 100644 index 0000000000..72ae96e9cc Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Baku differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Bangkok b/board/common/overlay/usr/share/zoneinfo/Asia/Bangkok new file mode 100644 index 0000000000..44a1018ef6 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Bangkok differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Beirut b/board/common/overlay/usr/share/zoneinfo/Asia/Beirut new file mode 100644 index 0000000000..c1270bc1ad Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Beirut differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Bishkek b/board/common/overlay/usr/share/zoneinfo/Asia/Bishkek new file mode 100644 index 0000000000..fc827d8871 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Bishkek differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Brunei b/board/common/overlay/usr/share/zoneinfo/Asia/Brunei new file mode 100644 index 0000000000..d6e713d436 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Brunei differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Choibalsan b/board/common/overlay/usr/share/zoneinfo/Asia/Choibalsan new file mode 100644 index 0000000000..043b7ed5c2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Choibalsan differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Chongqing b/board/common/overlay/usr/share/zoneinfo/Asia/Chongqing new file mode 100644 index 0000000000..8a7a28a480 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Chongqing differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Colombo b/board/common/overlay/usr/share/zoneinfo/Asia/Colombo new file mode 100644 index 0000000000..c71c0503d9 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Colombo differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Damascus b/board/common/overlay/usr/share/zoneinfo/Asia/Damascus new file mode 100644 index 0000000000..4b610b5a08 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Damascus differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Dhaka b/board/common/overlay/usr/share/zoneinfo/Asia/Dhaka new file mode 100644 index 0000000000..52e98ffc2c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Dhaka differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Dili b/board/common/overlay/usr/share/zoneinfo/Asia/Dili new file mode 100644 index 0000000000..e5b743a6fc Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Dili differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Dubai b/board/common/overlay/usr/share/zoneinfo/Asia/Dubai new file mode 100644 index 0000000000..53f70d57a1 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Dubai differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Dushanbe b/board/common/overlay/usr/share/zoneinfo/Asia/Dushanbe new file mode 100644 index 0000000000..c65ff2a7b3 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Dushanbe differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Gaza b/board/common/overlay/usr/share/zoneinfo/Asia/Gaza new file mode 100644 index 0000000000..fed3f9d433 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Gaza differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Harbin b/board/common/overlay/usr/share/zoneinfo/Asia/Harbin new file mode 100644 index 0000000000..11e352a511 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Harbin differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Hebron b/board/common/overlay/usr/share/zoneinfo/Asia/Hebron new file mode 100644 index 0000000000..a4234dc67e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Hebron differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Ho_Chi_Minh b/board/common/overlay/usr/share/zoneinfo/Asia/Ho_Chi_Minh new file mode 100644 index 0000000000..6401a10256 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Ho_Chi_Minh differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Hong_Kong b/board/common/overlay/usr/share/zoneinfo/Asia/Hong_Kong new file mode 100644 index 0000000000..8e5c581366 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Hong_Kong differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Hovd b/board/common/overlay/usr/share/zoneinfo/Asia/Hovd new file mode 100644 index 0000000000..27fab05c19 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Hovd differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Irkutsk b/board/common/overlay/usr/share/zoneinfo/Asia/Irkutsk new file mode 100644 index 0000000000..7c38e7fd6b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Irkutsk differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Jakarta b/board/common/overlay/usr/share/zoneinfo/Asia/Jakarta new file mode 100644 index 0000000000..66450d6370 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Jakarta differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Jayapura b/board/common/overlay/usr/share/zoneinfo/Asia/Jayapura new file mode 100644 index 0000000000..e28f9def30 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Jayapura differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Jerusalem b/board/common/overlay/usr/share/zoneinfo/Asia/Jerusalem new file mode 100644 index 0000000000..8676bfb026 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Jerusalem differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Kabul b/board/common/overlay/usr/share/zoneinfo/Asia/Kabul new file mode 100644 index 0000000000..7392c0497a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Kabul differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Kamchatka b/board/common/overlay/usr/share/zoneinfo/Asia/Kamchatka new file mode 100644 index 0000000000..090bf48895 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Kamchatka differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Karachi b/board/common/overlay/usr/share/zoneinfo/Asia/Karachi new file mode 100644 index 0000000000..a8ff8cb769 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Karachi differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Kashgar b/board/common/overlay/usr/share/zoneinfo/Asia/Kashgar new file mode 100644 index 0000000000..25e64945cf Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Kashgar differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Kathmandu b/board/common/overlay/usr/share/zoneinfo/Asia/Kathmandu new file mode 100644 index 0000000000..65c7b63258 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Kathmandu differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Khandyga b/board/common/overlay/usr/share/zoneinfo/Asia/Khandyga new file mode 100644 index 0000000000..39d2c2df80 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Khandyga differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Kolkata b/board/common/overlay/usr/share/zoneinfo/Asia/Kolkata new file mode 100644 index 0000000000..bc909c92c1 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Kolkata differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Krasnoyarsk b/board/common/overlay/usr/share/zoneinfo/Asia/Krasnoyarsk new file mode 100644 index 0000000000..580e8dd2f4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Krasnoyarsk differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Kuala_Lumpur b/board/common/overlay/usr/share/zoneinfo/Asia/Kuala_Lumpur new file mode 100644 index 0000000000..41bba37b0c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Kuala_Lumpur differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Kuching b/board/common/overlay/usr/share/zoneinfo/Asia/Kuching new file mode 100644 index 0000000000..272f46546e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Kuching differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Kuwait b/board/common/overlay/usr/share/zoneinfo/Asia/Kuwait new file mode 100644 index 0000000000..1dab31cba0 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Kuwait differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Macau b/board/common/overlay/usr/share/zoneinfo/Asia/Macau new file mode 100644 index 0000000000..7c93779578 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Macau differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Magadan b/board/common/overlay/usr/share/zoneinfo/Asia/Magadan new file mode 100644 index 0000000000..e3c76b57f5 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Magadan differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Makassar b/board/common/overlay/usr/share/zoneinfo/Asia/Makassar new file mode 100644 index 0000000000..eb7d42ef4d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Makassar differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Manila b/board/common/overlay/usr/share/zoneinfo/Asia/Manila new file mode 100644 index 0000000000..0e90ba6326 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Manila differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Muscat b/board/common/overlay/usr/share/zoneinfo/Asia/Muscat new file mode 100644 index 0000000000..daee4cc82a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Muscat differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Nicosia b/board/common/overlay/usr/share/zoneinfo/Asia/Nicosia new file mode 100644 index 0000000000..f7f10ab766 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Nicosia differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Novokuznetsk b/board/common/overlay/usr/share/zoneinfo/Asia/Novokuznetsk new file mode 100644 index 0000000000..f78c1f88bf Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Novokuznetsk differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Novosibirsk b/board/common/overlay/usr/share/zoneinfo/Asia/Novosibirsk new file mode 100644 index 0000000000..c401a9817d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Novosibirsk differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Omsk b/board/common/overlay/usr/share/zoneinfo/Asia/Omsk new file mode 100644 index 0000000000..a3dbb4bb1c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Omsk differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Oral b/board/common/overlay/usr/share/zoneinfo/Asia/Oral new file mode 100644 index 0000000000..8da2a1dee7 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Oral differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Phnom_Penh b/board/common/overlay/usr/share/zoneinfo/Asia/Phnom_Penh new file mode 100644 index 0000000000..5a52722a16 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Phnom_Penh differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Pontianak b/board/common/overlay/usr/share/zoneinfo/Asia/Pontianak new file mode 100644 index 0000000000..54b3d5081d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Pontianak differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Pyongyang b/board/common/overlay/usr/share/zoneinfo/Asia/Pyongyang new file mode 100644 index 0000000000..9dbd3c1ae0 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Pyongyang differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Qatar b/board/common/overlay/usr/share/zoneinfo/Asia/Qatar new file mode 100644 index 0000000000..49668c2583 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Qatar differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Qyzylorda b/board/common/overlay/usr/share/zoneinfo/Asia/Qyzylorda new file mode 100644 index 0000000000..fc3bf46bcc Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Qyzylorda differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Rangoon b/board/common/overlay/usr/share/zoneinfo/Asia/Rangoon new file mode 100644 index 0000000000..68591c56e7 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Rangoon differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Riyadh b/board/common/overlay/usr/share/zoneinfo/Asia/Riyadh new file mode 100644 index 0000000000..6ebe393d0b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Riyadh differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Sakhalin b/board/common/overlay/usr/share/zoneinfo/Asia/Sakhalin new file mode 100644 index 0000000000..f5105a363c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Sakhalin differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Samarkand b/board/common/overlay/usr/share/zoneinfo/Asia/Samarkand new file mode 100644 index 0000000000..191c07c127 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Samarkand differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Seoul b/board/common/overlay/usr/share/zoneinfo/Asia/Seoul new file mode 100644 index 0000000000..96bb0c36d7 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Seoul differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Shanghai b/board/common/overlay/usr/share/zoneinfo/Asia/Shanghai new file mode 100644 index 0000000000..af6d6fbbd2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Shanghai differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Singapore b/board/common/overlay/usr/share/zoneinfo/Asia/Singapore new file mode 100644 index 0000000000..a6f2db8f3a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Singapore differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Taipei b/board/common/overlay/usr/share/zoneinfo/Asia/Taipei new file mode 100644 index 0000000000..70cfb27ca9 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Taipei differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Tashkent b/board/common/overlay/usr/share/zoneinfo/Asia/Tashkent new file mode 100644 index 0000000000..5bc806238a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Tashkent differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Tbilisi b/board/common/overlay/usr/share/zoneinfo/Asia/Tbilisi new file mode 100644 index 0000000000..d7e40548ac Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Tbilisi differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Tehran b/board/common/overlay/usr/share/zoneinfo/Asia/Tehran new file mode 100644 index 0000000000..62d316190d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Tehran differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Thimphu b/board/common/overlay/usr/share/zoneinfo/Asia/Thimphu new file mode 100644 index 0000000000..90294aea20 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Thimphu differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Tokyo b/board/common/overlay/usr/share/zoneinfo/Asia/Tokyo new file mode 100644 index 0000000000..058c1e99ba Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Tokyo differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Ulaanbaatar b/board/common/overlay/usr/share/zoneinfo/Asia/Ulaanbaatar new file mode 100644 index 0000000000..39bdd89416 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Ulaanbaatar differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Urumqi b/board/common/overlay/usr/share/zoneinfo/Asia/Urumqi new file mode 100644 index 0000000000..f46ff380a0 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Urumqi differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Ust-Nera b/board/common/overlay/usr/share/zoneinfo/Asia/Ust-Nera new file mode 100644 index 0000000000..ae89650f10 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Ust-Nera differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Vientiane b/board/common/overlay/usr/share/zoneinfo/Asia/Vientiane new file mode 100644 index 0000000000..7d39589f19 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Vientiane differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Vladivostok b/board/common/overlay/usr/share/zoneinfo/Asia/Vladivostok new file mode 100644 index 0000000000..42783d9289 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Vladivostok differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Yakutsk b/board/common/overlay/usr/share/zoneinfo/Asia/Yakutsk new file mode 100644 index 0000000000..461901f6f8 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Yakutsk differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Yekaterinburg b/board/common/overlay/usr/share/zoneinfo/Asia/Yekaterinburg new file mode 100644 index 0000000000..aca50c6e1d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Yekaterinburg differ diff --git a/board/common/overlay/usr/share/zoneinfo/Asia/Yerevan b/board/common/overlay/usr/share/zoneinfo/Asia/Yerevan new file mode 100644 index 0000000000..c4ab2197f8 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Asia/Yerevan differ diff --git a/board/common/overlay/usr/share/zoneinfo/Atlantic/Azores b/board/common/overlay/usr/share/zoneinfo/Atlantic/Azores new file mode 100644 index 0000000000..19e4004067 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Atlantic/Azores differ diff --git a/board/common/overlay/usr/share/zoneinfo/Atlantic/Bermuda b/board/common/overlay/usr/share/zoneinfo/Atlantic/Bermuda new file mode 100644 index 0000000000..3a5c6dbf7a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Atlantic/Bermuda differ diff --git a/board/common/overlay/usr/share/zoneinfo/Atlantic/Canary b/board/common/overlay/usr/share/zoneinfo/Atlantic/Canary new file mode 100644 index 0000000000..972388be71 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Atlantic/Canary differ diff --git a/board/common/overlay/usr/share/zoneinfo/Atlantic/Cape_Verde b/board/common/overlay/usr/share/zoneinfo/Atlantic/Cape_Verde new file mode 100644 index 0000000000..5238ac8a67 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Atlantic/Cape_Verde differ diff --git a/board/common/overlay/usr/share/zoneinfo/Atlantic/Faroe b/board/common/overlay/usr/share/zoneinfo/Atlantic/Faroe new file mode 100644 index 0000000000..4dab7ef085 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Atlantic/Faroe differ diff --git a/board/common/overlay/usr/share/zoneinfo/Atlantic/Madeira b/board/common/overlay/usr/share/zoneinfo/Atlantic/Madeira new file mode 100644 index 0000000000..2175096cf1 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Atlantic/Madeira differ diff --git a/board/common/overlay/usr/share/zoneinfo/Atlantic/Reykjavik b/board/common/overlay/usr/share/zoneinfo/Atlantic/Reykjavik new file mode 100644 index 0000000000..e97f13a652 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Atlantic/Reykjavik differ diff --git a/board/common/overlay/usr/share/zoneinfo/Atlantic/South_Georgia b/board/common/overlay/usr/share/zoneinfo/Atlantic/South_Georgia new file mode 100644 index 0000000000..ab2c8236b0 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Atlantic/South_Georgia differ diff --git a/board/common/overlay/usr/share/zoneinfo/Atlantic/St_Helena b/board/common/overlay/usr/share/zoneinfo/Atlantic/St_Helena new file mode 100644 index 0000000000..d365e3ddf3 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Atlantic/St_Helena differ diff --git a/board/common/overlay/usr/share/zoneinfo/Atlantic/Stanley b/board/common/overlay/usr/share/zoneinfo/Atlantic/Stanley new file mode 100644 index 0000000000..34f9d022cd Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Atlantic/Stanley differ diff --git a/board/common/overlay/usr/share/zoneinfo/Australia/Adelaide b/board/common/overlay/usr/share/zoneinfo/Australia/Adelaide new file mode 100644 index 0000000000..b350cb6660 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Australia/Adelaide differ diff --git a/board/common/overlay/usr/share/zoneinfo/Australia/Brisbane b/board/common/overlay/usr/share/zoneinfo/Australia/Brisbane new file mode 100644 index 0000000000..3e899a163f Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Australia/Brisbane differ diff --git a/board/common/overlay/usr/share/zoneinfo/Australia/Broken_Hill b/board/common/overlay/usr/share/zoneinfo/Australia/Broken_Hill new file mode 100644 index 0000000000..d8f3155c84 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Australia/Broken_Hill differ diff --git a/board/common/overlay/usr/share/zoneinfo/Australia/Currie b/board/common/overlay/usr/share/zoneinfo/Australia/Currie new file mode 100644 index 0000000000..43ca1e4558 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Australia/Currie differ diff --git a/board/common/overlay/usr/share/zoneinfo/Australia/Darwin b/board/common/overlay/usr/share/zoneinfo/Australia/Darwin new file mode 100644 index 0000000000..c44512fbb7 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Australia/Darwin differ diff --git a/board/common/overlay/usr/share/zoneinfo/Australia/Eucla b/board/common/overlay/usr/share/zoneinfo/Australia/Eucla new file mode 100644 index 0000000000..e78c2d4251 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Australia/Eucla differ diff --git a/board/common/overlay/usr/share/zoneinfo/Australia/Hobart b/board/common/overlay/usr/share/zoneinfo/Australia/Hobart new file mode 100644 index 0000000000..c4604e5386 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Australia/Hobart differ diff --git a/board/common/overlay/usr/share/zoneinfo/Australia/Lindeman b/board/common/overlay/usr/share/zoneinfo/Australia/Lindeman new file mode 100644 index 0000000000..05c3c1c324 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Australia/Lindeman differ diff --git a/board/common/overlay/usr/share/zoneinfo/Australia/Lord_Howe b/board/common/overlay/usr/share/zoneinfo/Australia/Lord_Howe new file mode 100644 index 0000000000..1f542d3700 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Australia/Lord_Howe differ diff --git a/board/common/overlay/usr/share/zoneinfo/Australia/Melbourne b/board/common/overlay/usr/share/zoneinfo/Australia/Melbourne new file mode 100644 index 0000000000..af3152f6c4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Australia/Melbourne differ diff --git a/board/common/overlay/usr/share/zoneinfo/Australia/Perth b/board/common/overlay/usr/share/zoneinfo/Australia/Perth new file mode 100644 index 0000000000..1c7ebb795c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Australia/Perth differ diff --git a/board/common/overlay/usr/share/zoneinfo/Australia/Sydney b/board/common/overlay/usr/share/zoneinfo/Australia/Sydney new file mode 100644 index 0000000000..d95c245e5e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Australia/Sydney differ diff --git a/board/common/overlay/usr/share/zoneinfo/Canada/Atlantic b/board/common/overlay/usr/share/zoneinfo/Canada/Atlantic new file mode 100644 index 0000000000..756099abe6 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Canada/Atlantic differ diff --git a/board/common/overlay/usr/share/zoneinfo/Canada/Central b/board/common/overlay/usr/share/zoneinfo/Canada/Central new file mode 100644 index 0000000000..2d22791686 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Canada/Central differ diff --git a/board/common/overlay/usr/share/zoneinfo/Canada/Eastern b/board/common/overlay/usr/share/zoneinfo/Canada/Eastern new file mode 100644 index 0000000000..1698477a48 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Canada/Eastern differ diff --git a/board/common/overlay/usr/share/zoneinfo/Canada/Mountain b/board/common/overlay/usr/share/zoneinfo/Canada/Mountain new file mode 100644 index 0000000000..3fa0579891 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Canada/Mountain differ diff --git a/board/common/overlay/usr/share/zoneinfo/Canada/Newfoundland b/board/common/overlay/usr/share/zoneinfo/Canada/Newfoundland new file mode 100644 index 0000000000..e7a18d601d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Canada/Newfoundland differ diff --git a/board/common/overlay/usr/share/zoneinfo/Canada/Pacific b/board/common/overlay/usr/share/zoneinfo/Canada/Pacific new file mode 100644 index 0000000000..0c1fa52690 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Canada/Pacific differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Amsterdam b/board/common/overlay/usr/share/zoneinfo/Europe/Amsterdam new file mode 100644 index 0000000000..30ca3243a5 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Amsterdam differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Andorra b/board/common/overlay/usr/share/zoneinfo/Europe/Andorra new file mode 100644 index 0000000000..cf9533a3e4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Andorra differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Athens b/board/common/overlay/usr/share/zoneinfo/Europe/Athens new file mode 100644 index 0000000000..726e56c3fe Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Athens differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Belgrade b/board/common/overlay/usr/share/zoneinfo/Europe/Belgrade new file mode 100644 index 0000000000..5f0389f039 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Belgrade differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Berlin b/board/common/overlay/usr/share/zoneinfo/Europe/Berlin new file mode 100644 index 0000000000..96059c7854 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Berlin differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Bratislava b/board/common/overlay/usr/share/zoneinfo/Europe/Bratislava new file mode 100644 index 0000000000..9ab78e9156 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Bratislava differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Brussels b/board/common/overlay/usr/share/zoneinfo/Europe/Brussels new file mode 100644 index 0000000000..2791edeba3 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Brussels differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Bucharest b/board/common/overlay/usr/share/zoneinfo/Europe/Bucharest new file mode 100644 index 0000000000..de2a5f0af1 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Bucharest differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Budapest b/board/common/overlay/usr/share/zoneinfo/Europe/Budapest new file mode 100644 index 0000000000..1b787b16ce Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Budapest differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Busingen b/board/common/overlay/usr/share/zoneinfo/Europe/Busingen new file mode 100644 index 0000000000..440f158c14 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Busingen differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Chisinau b/board/common/overlay/usr/share/zoneinfo/Europe/Chisinau new file mode 100644 index 0000000000..983cc70716 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Chisinau differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Copenhagen b/board/common/overlay/usr/share/zoneinfo/Europe/Copenhagen new file mode 100644 index 0000000000..af7e9269e5 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Copenhagen differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Dublin b/board/common/overlay/usr/share/zoneinfo/Europe/Dublin new file mode 100644 index 0000000000..3dec02693d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Dublin differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Gibraltar b/board/common/overlay/usr/share/zoneinfo/Europe/Gibraltar new file mode 100644 index 0000000000..f3dbeb65ec Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Gibraltar differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Guernsey b/board/common/overlay/usr/share/zoneinfo/Europe/Guernsey new file mode 100644 index 0000000000..fe63ff7e7f Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Guernsey differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Helsinki b/board/common/overlay/usr/share/zoneinfo/Europe/Helsinki new file mode 100644 index 0000000000..19d7babd53 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Helsinki differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Isle_of_Man b/board/common/overlay/usr/share/zoneinfo/Europe/Isle_of_Man new file mode 100644 index 0000000000..fe63ff7e7f Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Isle_of_Man differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Istanbul b/board/common/overlay/usr/share/zoneinfo/Europe/Istanbul new file mode 100644 index 0000000000..50a2838e9b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Istanbul differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Jersey b/board/common/overlay/usr/share/zoneinfo/Europe/Jersey new file mode 100644 index 0000000000..fe63ff7e7f Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Jersey differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Kaliningrad b/board/common/overlay/usr/share/zoneinfo/Europe/Kaliningrad new file mode 100644 index 0000000000..fa6bab8620 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Kaliningrad differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Kiev b/board/common/overlay/usr/share/zoneinfo/Europe/Kiev new file mode 100644 index 0000000000..7a941649d8 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Kiev differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Lisbon b/board/common/overlay/usr/share/zoneinfo/Europe/Lisbon new file mode 100644 index 0000000000..168accf060 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Lisbon differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Ljubljana b/board/common/overlay/usr/share/zoneinfo/Europe/Ljubljana new file mode 100644 index 0000000000..5f0389f039 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Ljubljana differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/London b/board/common/overlay/usr/share/zoneinfo/Europe/London new file mode 100644 index 0000000000..fe63ff7e7f Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/London differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Luxembourg b/board/common/overlay/usr/share/zoneinfo/Europe/Luxembourg new file mode 100644 index 0000000000..6c194a5cdc Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Luxembourg differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Madrid b/board/common/overlay/usr/share/zoneinfo/Europe/Madrid new file mode 100644 index 0000000000..931195955a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Madrid differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Malta b/board/common/overlay/usr/share/zoneinfo/Europe/Malta new file mode 100644 index 0000000000..5f518a1f17 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Malta differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Mariehamn b/board/common/overlay/usr/share/zoneinfo/Europe/Mariehamn new file mode 100644 index 0000000000..19d7babd53 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Mariehamn differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Minsk b/board/common/overlay/usr/share/zoneinfo/Europe/Minsk new file mode 100644 index 0000000000..ba9971c631 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Minsk differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Monaco b/board/common/overlay/usr/share/zoneinfo/Europe/Monaco new file mode 100644 index 0000000000..664f6161ab Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Monaco differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Moscow b/board/common/overlay/usr/share/zoneinfo/Europe/Moscow new file mode 100644 index 0000000000..d3ce2c6b05 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Moscow differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Oslo b/board/common/overlay/usr/share/zoneinfo/Europe/Oslo new file mode 100644 index 0000000000..6326961453 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Oslo differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Paris b/board/common/overlay/usr/share/zoneinfo/Europe/Paris new file mode 100644 index 0000000000..fd8ea7dbae Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Paris differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Podgorica b/board/common/overlay/usr/share/zoneinfo/Europe/Podgorica new file mode 100644 index 0000000000..5f0389f039 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Podgorica differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Prague b/board/common/overlay/usr/share/zoneinfo/Europe/Prague new file mode 100644 index 0000000000..9ab78e9156 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Prague differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Riga b/board/common/overlay/usr/share/zoneinfo/Europe/Riga new file mode 100644 index 0000000000..abea45d309 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Riga differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Rome b/board/common/overlay/usr/share/zoneinfo/Europe/Rome new file mode 100644 index 0000000000..28ddffe0d9 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Rome differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Samara b/board/common/overlay/usr/share/zoneinfo/Europe/Samara new file mode 100644 index 0000000000..fe5060094b Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Samara differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/San_Marino b/board/common/overlay/usr/share/zoneinfo/Europe/San_Marino new file mode 100644 index 0000000000..28ddffe0d9 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/San_Marino differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Sarajevo b/board/common/overlay/usr/share/zoneinfo/Europe/Sarajevo new file mode 100644 index 0000000000..5f0389f039 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Sarajevo differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Simferopol b/board/common/overlay/usr/share/zoneinfo/Europe/Simferopol new file mode 100644 index 0000000000..a1f07fd52a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Simferopol differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Skopje b/board/common/overlay/usr/share/zoneinfo/Europe/Skopje new file mode 100644 index 0000000000..5f0389f039 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Skopje differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Sofia b/board/common/overlay/usr/share/zoneinfo/Europe/Sofia new file mode 100644 index 0000000000..d8032335b2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Sofia differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Stockholm b/board/common/overlay/usr/share/zoneinfo/Europe/Stockholm new file mode 100644 index 0000000000..3bc6dbd9d1 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Stockholm differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Tallinn b/board/common/overlay/usr/share/zoneinfo/Europe/Tallinn new file mode 100644 index 0000000000..4ba4424121 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Tallinn differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Tirane b/board/common/overlay/usr/share/zoneinfo/Europe/Tirane new file mode 100644 index 0000000000..0b86017d24 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Tirane differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Uzhgorod b/board/common/overlay/usr/share/zoneinfo/Europe/Uzhgorod new file mode 100644 index 0000000000..7032ab9b34 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Uzhgorod differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Vaduz b/board/common/overlay/usr/share/zoneinfo/Europe/Vaduz new file mode 100644 index 0000000000..440f158c14 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Vaduz differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Vatican b/board/common/overlay/usr/share/zoneinfo/Europe/Vatican new file mode 100644 index 0000000000..28ddffe0d9 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Vatican differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Vienna b/board/common/overlay/usr/share/zoneinfo/Europe/Vienna new file mode 100644 index 0000000000..8e4c9a9b5f Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Vienna differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Vilnius b/board/common/overlay/usr/share/zoneinfo/Europe/Vilnius new file mode 100644 index 0000000000..b6545b2494 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Vilnius differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Volgograd b/board/common/overlay/usr/share/zoneinfo/Europe/Volgograd new file mode 100644 index 0000000000..b91e4fbff6 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Volgograd differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Warsaw b/board/common/overlay/usr/share/zoneinfo/Europe/Warsaw new file mode 100644 index 0000000000..3797b1cb65 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Warsaw differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Zagreb b/board/common/overlay/usr/share/zoneinfo/Europe/Zagreb new file mode 100644 index 0000000000..5f0389f039 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Zagreb differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Zaporozhye b/board/common/overlay/usr/share/zoneinfo/Europe/Zaporozhye new file mode 100644 index 0000000000..2ccf8998b2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Zaporozhye differ diff --git a/board/common/overlay/usr/share/zoneinfo/Europe/Zurich b/board/common/overlay/usr/share/zoneinfo/Europe/Zurich new file mode 100644 index 0000000000..440f158c14 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Europe/Zurich differ diff --git a/board/common/overlay/usr/share/zoneinfo/GMT b/board/common/overlay/usr/share/zoneinfo/GMT new file mode 100644 index 0000000000..2ee14295f1 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/GMT differ diff --git a/board/common/overlay/usr/share/zoneinfo/Indian/Antananarivo b/board/common/overlay/usr/share/zoneinfo/Indian/Antananarivo new file mode 100644 index 0000000000..ef6e745c45 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Indian/Antananarivo differ diff --git a/board/common/overlay/usr/share/zoneinfo/Indian/Chagos b/board/common/overlay/usr/share/zoneinfo/Indian/Chagos new file mode 100644 index 0000000000..864d3e29a2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Indian/Chagos differ diff --git a/board/common/overlay/usr/share/zoneinfo/Indian/Christmas b/board/common/overlay/usr/share/zoneinfo/Indian/Christmas new file mode 100644 index 0000000000..686d5b3c65 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Indian/Christmas differ diff --git a/board/common/overlay/usr/share/zoneinfo/Indian/Cocos b/board/common/overlay/usr/share/zoneinfo/Indian/Cocos new file mode 100644 index 0000000000..6f7d869f0f Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Indian/Cocos differ diff --git a/board/common/overlay/usr/share/zoneinfo/Indian/Comoro b/board/common/overlay/usr/share/zoneinfo/Indian/Comoro new file mode 100644 index 0000000000..297c6db63c Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Indian/Comoro differ diff --git a/board/common/overlay/usr/share/zoneinfo/Indian/Kerguelen b/board/common/overlay/usr/share/zoneinfo/Indian/Kerguelen new file mode 100644 index 0000000000..1f42bbc1ff Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Indian/Kerguelen differ diff --git a/board/common/overlay/usr/share/zoneinfo/Indian/Mahe b/board/common/overlay/usr/share/zoneinfo/Indian/Mahe new file mode 100644 index 0000000000..d048242cac Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Indian/Mahe differ diff --git a/board/common/overlay/usr/share/zoneinfo/Indian/Maldives b/board/common/overlay/usr/share/zoneinfo/Indian/Maldives new file mode 100644 index 0000000000..65e7eeee8d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Indian/Maldives differ diff --git a/board/common/overlay/usr/share/zoneinfo/Indian/Mauritius b/board/common/overlay/usr/share/zoneinfo/Indian/Mauritius new file mode 100644 index 0000000000..54f2220108 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Indian/Mauritius differ diff --git a/board/common/overlay/usr/share/zoneinfo/Indian/Mayotte b/board/common/overlay/usr/share/zoneinfo/Indian/Mayotte new file mode 100644 index 0000000000..8401a37aa0 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Indian/Mayotte differ diff --git a/board/common/overlay/usr/share/zoneinfo/Indian/Reunion b/board/common/overlay/usr/share/zoneinfo/Indian/Reunion new file mode 100644 index 0000000000..9b3830ec31 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Indian/Reunion differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Apia b/board/common/overlay/usr/share/zoneinfo/Pacific/Apia new file mode 100644 index 0000000000..efe6d5a1de Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Apia differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Auckland b/board/common/overlay/usr/share/zoneinfo/Pacific/Auckland new file mode 100644 index 0000000000..a40767df93 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Auckland differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Chatham b/board/common/overlay/usr/share/zoneinfo/Pacific/Chatham new file mode 100644 index 0000000000..6329e4fce0 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Chatham differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Chuuk b/board/common/overlay/usr/share/zoneinfo/Pacific/Chuuk new file mode 100644 index 0000000000..0ef473871d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Chuuk differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Easter b/board/common/overlay/usr/share/zoneinfo/Pacific/Easter new file mode 100644 index 0000000000..1e2f484b79 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Easter differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Efate b/board/common/overlay/usr/share/zoneinfo/Pacific/Efate new file mode 100644 index 0000000000..c46154a805 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Efate differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Enderbury b/board/common/overlay/usr/share/zoneinfo/Pacific/Enderbury new file mode 100644 index 0000000000..69e75d754e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Enderbury differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Fakaofo b/board/common/overlay/usr/share/zoneinfo/Pacific/Fakaofo new file mode 100644 index 0000000000..22902f98fe Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Fakaofo differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Fiji b/board/common/overlay/usr/share/zoneinfo/Pacific/Fiji new file mode 100644 index 0000000000..cf5af8dcef Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Fiji differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Funafuti b/board/common/overlay/usr/share/zoneinfo/Pacific/Funafuti new file mode 100644 index 0000000000..66cf5e1df3 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Funafuti differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Galapagos b/board/common/overlay/usr/share/zoneinfo/Pacific/Galapagos new file mode 100644 index 0000000000..7504cc66f5 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Galapagos differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Gambier b/board/common/overlay/usr/share/zoneinfo/Pacific/Gambier new file mode 100644 index 0000000000..fc49c03f6e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Gambier differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Guadalcanal b/board/common/overlay/usr/share/zoneinfo/Pacific/Guadalcanal new file mode 100644 index 0000000000..3a4ec12e56 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Guadalcanal differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Guam b/board/common/overlay/usr/share/zoneinfo/Pacific/Guam new file mode 100644 index 0000000000..a05292f4ba Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Guam differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Honolulu b/board/common/overlay/usr/share/zoneinfo/Pacific/Honolulu new file mode 100644 index 0000000000..1b4684b9b4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Honolulu differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Johnston b/board/common/overlay/usr/share/zoneinfo/Pacific/Johnston new file mode 100644 index 0000000000..1b4684b9b4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Johnston differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Kiritimati b/board/common/overlay/usr/share/zoneinfo/Pacific/Kiritimati new file mode 100644 index 0000000000..7131453c55 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Kiritimati differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Kosrae b/board/common/overlay/usr/share/zoneinfo/Pacific/Kosrae new file mode 100644 index 0000000000..61b7561589 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Kosrae differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Kwajalein b/board/common/overlay/usr/share/zoneinfo/Pacific/Kwajalein new file mode 100644 index 0000000000..b57237272d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Kwajalein differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Majuro b/board/common/overlay/usr/share/zoneinfo/Pacific/Majuro new file mode 100644 index 0000000000..eab93a2af9 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Majuro differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Marquesas b/board/common/overlay/usr/share/zoneinfo/Pacific/Marquesas new file mode 100644 index 0000000000..cd2d5b073a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Marquesas differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Midway b/board/common/overlay/usr/share/zoneinfo/Pacific/Midway new file mode 100644 index 0000000000..8889a26fa7 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Midway differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Nauru b/board/common/overlay/usr/share/zoneinfo/Pacific/Nauru new file mode 100644 index 0000000000..1d8179bcb5 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Nauru differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Niue b/board/common/overlay/usr/share/zoneinfo/Pacific/Niue new file mode 100644 index 0000000000..b9f18a544a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Niue differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Norfolk b/board/common/overlay/usr/share/zoneinfo/Pacific/Norfolk new file mode 100644 index 0000000000..2e989c2556 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Norfolk differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Noumea b/board/common/overlay/usr/share/zoneinfo/Pacific/Noumea new file mode 100644 index 0000000000..ae9e138fa5 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Noumea differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Pago_Pago b/board/common/overlay/usr/share/zoneinfo/Pacific/Pago_Pago new file mode 100644 index 0000000000..fa084ba584 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Pago_Pago differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Palau b/board/common/overlay/usr/share/zoneinfo/Pacific/Palau new file mode 100644 index 0000000000..efc556b140 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Palau differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Pitcairn b/board/common/overlay/usr/share/zoneinfo/Pacific/Pitcairn new file mode 100644 index 0000000000..51f01c6410 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Pitcairn differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Pohnpei b/board/common/overlay/usr/share/zoneinfo/Pacific/Pohnpei new file mode 100644 index 0000000000..f175ea5875 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Pohnpei differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Port_Moresby b/board/common/overlay/usr/share/zoneinfo/Pacific/Port_Moresby new file mode 100644 index 0000000000..8d4d12ccb0 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Port_Moresby differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Rarotonga b/board/common/overlay/usr/share/zoneinfo/Pacific/Rarotonga new file mode 100644 index 0000000000..581299788a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Rarotonga differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Saipan b/board/common/overlay/usr/share/zoneinfo/Pacific/Saipan new file mode 100644 index 0000000000..519c86e966 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Saipan differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Tahiti b/board/common/overlay/usr/share/zoneinfo/Pacific/Tahiti new file mode 100644 index 0000000000..22f8697467 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Tahiti differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Tarawa b/board/common/overlay/usr/share/zoneinfo/Pacific/Tarawa new file mode 100644 index 0000000000..065dcd8194 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Tarawa differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Tongatapu b/board/common/overlay/usr/share/zoneinfo/Pacific/Tongatapu new file mode 100644 index 0000000000..01ab6b87ef Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Tongatapu differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Wake b/board/common/overlay/usr/share/zoneinfo/Pacific/Wake new file mode 100644 index 0000000000..f89c52829a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Wake differ diff --git a/board/common/overlay/usr/share/zoneinfo/Pacific/Wallis b/board/common/overlay/usr/share/zoneinfo/Pacific/Wallis new file mode 100644 index 0000000000..9aaf558f1d Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/Pacific/Wallis differ diff --git a/board/common/overlay/usr/share/zoneinfo/US/Alaska b/board/common/overlay/usr/share/zoneinfo/US/Alaska new file mode 100644 index 0000000000..d14735026a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/US/Alaska differ diff --git a/board/common/overlay/usr/share/zoneinfo/US/Arizona b/board/common/overlay/usr/share/zoneinfo/US/Arizona new file mode 100644 index 0000000000..67589026c2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/US/Arizona differ diff --git a/board/common/overlay/usr/share/zoneinfo/US/Central b/board/common/overlay/usr/share/zoneinfo/US/Central new file mode 100644 index 0000000000..71aae7246a Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/US/Central differ diff --git a/board/common/overlay/usr/share/zoneinfo/US/Eastern b/board/common/overlay/usr/share/zoneinfo/US/Eastern new file mode 100644 index 0000000000..b2c2377f4e Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/US/Eastern differ diff --git a/board/common/overlay/usr/share/zoneinfo/US/Hawaii b/board/common/overlay/usr/share/zoneinfo/US/Hawaii new file mode 100644 index 0000000000..1b4684b9b4 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/US/Hawaii differ diff --git a/board/common/overlay/usr/share/zoneinfo/US/Mountain b/board/common/overlay/usr/share/zoneinfo/US/Mountain new file mode 100644 index 0000000000..f8908febf2 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/US/Mountain differ diff --git a/board/common/overlay/usr/share/zoneinfo/US/Pacific b/board/common/overlay/usr/share/zoneinfo/US/Pacific new file mode 100644 index 0000000000..3b7ce1dcee Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/US/Pacific differ diff --git a/board/common/overlay/usr/share/zoneinfo/UTC b/board/common/overlay/usr/share/zoneinfo/UTC new file mode 100644 index 0000000000..5583f5b0c6 Binary files /dev/null and b/board/common/overlay/usr/share/zoneinfo/UTC differ diff --git a/board/common/postscript.sh b/board/common/postscript.sh new file mode 100755 index 0000000000..c4c4cf5b7e --- /dev/null +++ b/board/common/postscript.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +export TARGET="$1" +export BOARD=$(basename $(dirname $TARGET)) +export COMMON_DIR=$(dirname $0) +export BOARD_DIR=$COMMON_DIR/../$BOARD +export BOOT_DIR=$TARGET/../images/boot/ +export IMG_DIR=$TARGET/../images + +mkdir -p $BOOT_DIR + +test -x $BOARD_DIR/postscript.sh && $BOARD_DIR/postscript.sh + +# transform /var contents into symlinks +rm -rf $TARGET/var/cache +rm -rf $TARGET/var/lib +rm -rf $TARGET/var/lock +rm -rf $TARGET/var/log +rm -rf $TARGET/var/run +rm -rf $TARGET/var/spool +rm -rf $TARGET/var/tmp + +ln -s /tmp $TARGET/var/cache +ln -s /tmp $TARGET/var/lib +ln -s /tmp $TARGET/var/lock +ln -s /data/log $TARGET/var/log +ln -s /tmp $TARGET/var/run +ln -s /tmp $TARGET/var/spool +ln -s /tmp $TARGET/var/tmp + +$COMMON_DIR/cleanups.sh +test -x $BOARD_DIR/cleanups.sh && test -x $BOARD_DIR/cleanups.sh || true + diff --git a/board/common/skeleton-initramfs/bin/.empty b/board/common/skeleton-initramfs/bin/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/boot/.empty b/board/common/skeleton-initramfs/boot/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/data/.empty b/board/common/skeleton-initramfs/data/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/dev/log b/board/common/skeleton-initramfs/dev/log new file mode 120000 index 0000000000..d96b3b1cb8 --- /dev/null +++ b/board/common/skeleton-initramfs/dev/log @@ -0,0 +1 @@ +../tmp/log \ No newline at end of file diff --git a/board/common/skeleton-initramfs/dev/pts/.empty b/board/common/skeleton-initramfs/dev/pts/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/lib/.empty b/board/common/skeleton-initramfs/lib/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/proc/.empty b/board/common/skeleton-initramfs/proc/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/run b/board/common/skeleton-initramfs/run new file mode 120000 index 0000000000..1c2f433de1 --- /dev/null +++ b/board/common/skeleton-initramfs/run @@ -0,0 +1 @@ +tmp \ No newline at end of file diff --git a/board/common/skeleton-initramfs/sbin/.empty b/board/common/skeleton-initramfs/sbin/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/sys/.empty b/board/common/skeleton-initramfs/sys/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/tmp/.empty b/board/common/skeleton-initramfs/tmp/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/usr/lib/.empty b/board/common/skeleton-initramfs/usr/lib/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/var/cache/.empty b/board/common/skeleton-initramfs/var/cache/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/var/lib/.empty b/board/common/skeleton-initramfs/var/lib/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/var/lock/.empty b/board/common/skeleton-initramfs/var/lock/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/var/log/.empty b/board/common/skeleton-initramfs/var/log/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/var/run/.empty b/board/common/skeleton-initramfs/var/run/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/var/spool/.empty b/board/common/skeleton-initramfs/var/spool/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton-initramfs/var/tmp/.empty b/board/common/skeleton-initramfs/var/tmp/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/bin/.empty b/board/common/skeleton/bin/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/bin/sh b/board/common/skeleton/bin/sh new file mode 120000 index 0000000000..5d4150d089 --- /dev/null +++ b/board/common/skeleton/bin/sh @@ -0,0 +1 @@ +/bin/bash \ No newline at end of file diff --git a/board/common/skeleton/boot/.empty b/board/common/skeleton/boot/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/data/.empty b/board/common/skeleton/data/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/dev/log b/board/common/skeleton/dev/log new file mode 120000 index 0000000000..d96b3b1cb8 --- /dev/null +++ b/board/common/skeleton/dev/log @@ -0,0 +1 @@ +../tmp/log \ No newline at end of file diff --git a/board/common/skeleton/dev/pts/.empty b/board/common/skeleton/dev/pts/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/lib/.empty b/board/common/skeleton/lib/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/media/.empty b/board/common/skeleton/media/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/mnt/.empty b/board/common/skeleton/mnt/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/opt/.empty b/board/common/skeleton/opt/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/proc/.empty b/board/common/skeleton/proc/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/root/.bash_history b/board/common/skeleton/root/.bash_history new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/root/.bash_logout b/board/common/skeleton/root/.bash_logout new file mode 100644 index 0000000000..d0fb6fceb5 --- /dev/null +++ b/board/common/skeleton/root/.bash_logout @@ -0,0 +1,6 @@ +# when leaving the console clear the screen to increase privacy + +case "`tty`" in + /dev/tty[0-9]*) clear +esac + diff --git a/board/common/skeleton/root/.bash_profile b/board/common/skeleton/root/.bash_profile new file mode 100644 index 0000000000..01cdf1b624 --- /dev/null +++ b/board/common/skeleton/root/.bash_profile @@ -0,0 +1,6 @@ +umask 022 + +if [ -f ~/.bashrc ]; then + source ~/.bashrc +fi + diff --git a/board/common/skeleton/run b/board/common/skeleton/run new file mode 120000 index 0000000000..1c2f433de1 --- /dev/null +++ b/board/common/skeleton/run @@ -0,0 +1 @@ +tmp \ No newline at end of file diff --git a/board/common/skeleton/sbin/.empty b/board/common/skeleton/sbin/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/sys/.empty b/board/common/skeleton/sys/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/tmp/.empty b/board/common/skeleton/tmp/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/usr/bin/.empty b/board/common/skeleton/usr/bin/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/usr/lib/.empty b/board/common/skeleton/usr/lib/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/usr/sbin/.empty b/board/common/skeleton/usr/sbin/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/usr/share/.empty b/board/common/skeleton/usr/share/.empty new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/board/common/skeleton/usr/share/.empty @@ -0,0 +1 @@ + diff --git a/board/common/skeleton/var/cache/.empty b/board/common/skeleton/var/cache/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/var/lib/.empty b/board/common/skeleton/var/lib/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/var/lock/.empty b/board/common/skeleton/var/lock/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/var/log/.empty b/board/common/skeleton/var/log/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/var/run/.empty b/board/common/skeleton/var/run/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/var/spool/.empty b/board/common/skeleton/var/spool/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/common/skeleton/var/tmp/.empty b/board/common/skeleton/var/tmp/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/board/odroidc1/bl1.bin.hardkernel b/board/odroidc1/bl1.bin.hardkernel new file mode 100644 index 0000000000..75be9b4fd4 Binary files /dev/null and b/board/odroidc1/bl1.bin.hardkernel differ diff --git a/board/odroidc1/boot.ini b/board/odroidc1/boot.ini new file mode 100644 index 0000000000..857a09eb53 --- /dev/null +++ b/board/odroidc1/boot.ini @@ -0,0 +1,62 @@ +ODROIDC-UBOOT-CONFIG + +# Possible screen resolutions +# Uncomment only a single Line! The line with setenv written. +# At least one mode must be selected. + +# setenv m "vga" # 640x480 +# setenv m "480p" # 720x480 +# setenv m "576p" # 720x576 +# setenv m "800x480p60hz" # 800x480 +# setenv m "800x600p60hz" # 800x600 +# setenv m "1024x600p60hz" # 1024x600 +# setenv m "1024x768p60hz" # 1024x768 +# setenv m "1360x768p60hz" # 1360x768 +# setenv m "1366x768p60hz" # 1366x768 +# setenv m "1440x900p60hz" # 1440x900 +# setenv m "1600x900p60hz" # 1600x900 +# setenv m "1680x1050p60hz" # 1680x1050 +# setenv m "720p" # 720p 1280x720 +# setenv m "800p" # 1280x800 +# setenv m "1920x1200" # 1920x1200 +setenv m "1024x768p60hz" # 1080P 1920x1080 + +# HDMI DVI Mode Configuration +setenv vout_mode "hdmi" +# setenv vout_mode "dvi" + +# HDMI BPP Mode +setenv m_bpp "32" +# setenv m_bpp "24" +# setenv m_bpp "16" + +# UHS Card Configuration +# Uncomment the line below to __DISABLE__ UHS-1 MicroSD support +# This might break boot for some brand models of cards. +#setenv disableuhs "disableuhs" + + +# Disable VPU (Video decoding engine, Saves RAM!!!) +# 0 = disabled +# 1 = enabled +setenv vpu "0" + +# Disable HDMI Output (Again, saves ram!) +# 0 = disabled +# 1 = enabled +setenv hdmioutput "0" + +# Boot Arguments +setenv bootargs "console=ttyS0,115200n8 root=/dev/mmcblk0p2 rootwait ro no_console_suspend panic=10 quiet loglevel=1 ipv6.disable=1 vdaccfg=0xa000 logo=osd1,loaded,0x7900000,720p,full dmfc=3 cvbsmode=576cvbs hdmimode=${m} m_bpp=${m_bpp} vout=${vout_mode} ${disableuhs}" + +# Booting +fatload mmc 0:1 0x21000000 uImage +fatload mmc 0:1 0x21800000 meson8b_odroidc.dtb +fdt addr 21800000 + +if test "${vpu}" = "0"; then fdt rm /mesonstream; fdt rm /vdec; fdt rm /ppmgr; fi + +if test "${hdmioutput}" = "0"; then fdt rm /mesonfb; fi + +bootm 0x21000000 - 0x21800000 + diff --git a/board/odroidc1/kernel.config b/board/odroidc1/kernel.config new file mode 100644 index 0000000000..67fc7df643 --- /dev/null +++ b/board/odroidc1/kernel.config @@ -0,0 +1,4625 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 3.10.80 Kernel Configuration +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_FIQ=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_NEED_MACH_MEMORY_H=y +CONFIG_GENERIC_BUG=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y + +# +# General setup +# +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_XZ is not set +CONFIG_KERNEL_LZO=y +CONFIG_DEFAULT_HOSTNAME="(none)" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_FHANDLE=y +CONFIG_AUDIT=y +# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_IRQ_DOMAIN=y +# CONFIG_IRQ_DOMAIN_DEBUG is not set +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_ARCH_HAS_TICK_BROADCAST=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# Timers subsystem +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ_COMMON=y +# CONFIG_HZ_PERIODIC is not set +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_IRQ_TIME_ACCOUNTING is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y + +# +# RCU Subsystem +# +CONFIG_TREE_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y +CONFIG_RCU_STALL_COMMON=y +# CONFIG_RCU_USER_QS is not set +CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_RCU_FAST_NO_HZ is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_RCU_BOOST is not set +# CONFIG_RCU_NOCB_CPU is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=19 +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CPUSETS=y +CONFIG_PROC_PID_CPUSET=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_MEMCG=y +CONFIG_MEMCG_SWAP=y +CONFIG_MEMCG_SWAP_ENABLED=y +# CONFIG_MEMCG_KMEM is not set +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_BLK_CGROUP=y +# CONFIG_DEBUG_BLK_CGROUP is not set +# CONFIG_CHECKPOINT_RESTORE is not set +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_UIDGID_CONVERTED=y +CONFIG_UIDGID_STRICT_TYPE_CHECKS=y +# CONFIG_SCHED_AUTOGROUP is not set +CONFIG_MM_OWNER=y +# CONFIG_SYSFS_DEPRECATED is not set +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_RD_XZ=y +CONFIG_RD_LZO=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_HAVE_UID16=y +CONFIG_HOTPLUG=y +CONFIG_PANIC_TIMEOUT=0 +CONFIG_EXPERT=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLUB_DEBUG=y +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +# CONFIG_JUMP_LABEL is not set +# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_HAVE_CONTEXT_TRACKING=y +CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_OLD_SIGACTION=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_MODULE_SIG is not set +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +CONFIG_BLK_DEV_BSGLIB=y +# CONFIG_BLK_DEV_INTEGRITY is not set +# CONFIG_BLK_DEV_THROTTLING is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CFQ_GROUP_IOSCHED is not set +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_FREEZER=y + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_MULTIPLATFORM is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_PXA is not set +CONFIG_PLAT_MESON=y +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C24XX is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP1 is not set + +# +# Amlogic Meson platform +# +# CONFIG_ARCH_MESON6 is not set +# CONFIG_ARCH_MESON6TV is not set +# CONFIG_ARCH_MESON6TVD is not set +# CONFIG_ARCH_MESON8 is not set +CONFIG_ARCH_MESON8B=y +# CONFIG_ARCH_MESON8M2 is not set +# CONFIG_ARCH_MESONG9TV is not set + +# +# Meson development boards +# +# CONFIG_MACH_MESON8B_COMMON_BOARD is not set +CONFIG_MACH_MESON8B_ODROIDC=y +# CONFIG_MESON_IRQ is not set +CONFIG_MESON_ARM_GIC=y +CONFIG_MESON_CLOCK_TICK_RATE=24000000 +# CONFIG_MESON_ARM_GIC_FIQ is not set +CONFIG_MESON_SUSPEND=y +# CONFIG_SUSPEND_WATCHDOG is not set +# CONFIG_MESON_SUSPEND_TEST is not set +# CONFIG_SCREEN_ON_EARLY is not set +# CONFIG_CLK81_DFS is not set +CONFIG_MESON_LEGACY_REGISTER_API=y +# CONFIG_MESON_CPU_EMULATOR is not set +CONFIG_CLKTREE_DEBUG=y +# CONFIG_MESON_CPU_TEMP_SENSOR is not set +CONFIG_MESON_SUSPEND_FIRMWARE_BASE=0x04f00000 +# CONFIG_MESON_TRUSTZONE is not set +# CONFIG_MESON_CUSTOM_BOARD_SUPPORT is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_KEYBOARD_GPIO_POLLED is not set +# CONFIG_PLAT_SPEAR is not set + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +# CONFIG_ARM_LPAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARM_THUMB=y +# CONFIG_ARM_THUMBEE is not set +CONFIG_ARM_VIRT_EXT=y +CONFIG_SWP_EMULATE=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_KUSER_HELPERS=y +CONFIG_OUTER_CACHE=y +CONFIG_OUTER_CACHE_SYNC=y +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +CONFIG_CACHE_L2X0=y +CONFIG_CACHE_PL310=y +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_NR_BANKS=8 +CONFIG_MULTI_IRQ_HANDLER=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_742230 is not set +# CONFIG_ARM_ERRATA_742231 is not set +# CONFIG_PL310_ERRATA_588369 is not set +# CONFIG_ARM_ERRATA_643719 is not set +# CONFIG_ARM_ERRATA_720789 is not set +# CONFIG_PL310_ERRATA_727915 is not set +# CONFIG_ARM_ERRATA_743622 is not set +# CONFIG_ARM_ERRATA_751472 is not set +# CONFIG_PL310_ERRATA_753970 is not set +CONFIG_ARM_ERRATA_754322=y +# CONFIG_ARM_ERRATA_754327 is not set +CONFIG_ARM_ERRATA_764369=y +# CONFIG_PL310_ERRATA_769419 is not set +# CONFIG_ARM_ERRATA_775420 is not set +# CONFIG_ARM_ERRATA_798181 is not set +# CONFIG_FIQ_DEBUGGER is not set + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_HAVE_SMP=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_ARM_CPU_TOPOLOGY=y +# CONFIG_SCHED_MC is not set +# CONFIG_SCHED_SMT is not set +CONFIG_HAVE_ARM_SCU=y +# CONFIG_HAVE_ARM_ARCH_TIMER is not set +# CONFIG_MCPM is not set +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_NR_CPUS=4 +CONFIG_HOTPLUG_CPU=y +# CONFIG_ARM_PSCI is not set +CONFIG_LOCAL_TIMERS=y +CONFIG_ARCH_NR_GPIO=0 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_HZ=100 +CONFIG_SCHED_HRTICK=y +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +CONFIG_OABI_COMPAT=y +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HAVE_ARCH_PFN_VALID=y +CONFIG_HIGHMEM=y +# CONFIG_HIGHPTE is not set +CONFIG_HW_PERF_EVENTS=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_MEMORY_ISOLATION=y +# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_COMPACTION=y +CONFIG_MIGRATION=y +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_BOUNCE=y +CONFIG_KSM=y +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CROSS_MEMORY_ATTACH=y +# CONFIG_CLEANCACHE is not set +# CONFIG_FRONTSWAP is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_SECCOMP is not set +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_XEN is not set +# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set + +# +# Boot options +# +CONFIG_USE_OF=y +CONFIG_ATAGS=y +# CONFIG_DEPRECATED_PARAM_STRUCT is not set +# CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE is not set +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +# CONFIG_ARM_APPENDED_DTB is not set +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set +# CONFIG_CRASH_DUMP is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_HOTPLUG=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y + +# +# ARM CPU frequency scaling drivers +# +# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set +# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set +# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set +# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set +CONFIG_AMLOGIC_MESON_CPUFREQ=y +CONFIG_FIX_SYSPLL=y +# CONFIG_CPU_IDLE is not set +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +# CONFIG_FPE_NWFPE is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y +CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y +CONFIG_BINFMT_SCRIPT=y +# CONFIG_HAVE_AOUT is not set +CONFIG_BINFMT_MISC=y +CONFIG_COREDUMP=y + +# +# Power management options +# +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_HAS_WAKELOCK=y +CONFIG_HAS_EARLYSUSPEND=y +CONFIG_WAKELOCK=y +CONFIG_WAKELOCK_STAT=y +CONFIG_USER_WAKELOCK=y +CONFIG_EARLYSUSPEND=y +# CONFIG_NO_USER_SPACE_SCREEN_ACCESS_CONTROL is not set +# CONFIG_CONSOLE_EARLYSUSPEND is not set +CONFIG_FB_EARLYSUSPEND=y +CONFIG_PM_SLEEP=y +CONFIG_PM_SLEEP_SMP=y +# CONFIG_PM_AUTOSLEEP is not set +# CONFIG_PM_WAKELOCKS is not set +CONFIG_PM_RUNTIME=y +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +# CONFIG_APM_EMULATION is not set +CONFIG_PM_CLK=y +CONFIG_CPU_PM=y +# CONFIG_SUSPEND_TIME is not set +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARM_CPU_SUSPEND=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_DIAG=y +CONFIG_UNIX=y +CONFIG_UNIX_DIAG=y +CONFIG_XFRM=y +CONFIG_XFRM_ALGO=y +CONFIG_XFRM_USER=m +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +CONFIG_NET_KEY=y +# CONFIG_NET_KEY_MIGRATE is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +# CONFIG_IP_FIB_TRIE_STATS is not set +CONFIG_IP_MULTIPLE_TABLES=y +# CONFIG_IP_ROUTE_MULTIPATH is not set +# CONFIG_IP_ROUTE_VERBOSE is not set +CONFIG_IP_ROUTE_CLASSID=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_NET_IP_TUNNEL is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_NET_IPVTI is not set +# CONFIG_INET_AH is not set +CONFIG_INET_ESP=y +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_INET_UDP_DIAG is not set +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_VEGAS=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_YEAH=m +CONFIG_TCP_CONG_ILLINOIS=m +CONFIG_DEFAULT_RENO=y +CONFIG_DEFAULT_TCP_CONG="reno" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_NETLABEL is not set +# CONFIG_ANDROID_PARANOID_NETWORK is not set +CONFIG_NET_ACTIVITY_STATS=y +CONFIG_NETWORK_SECMARK=y +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y +CONFIG_BRIDGE_NETFILTER=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_ACCT=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_MARK=y +CONFIG_NF_CONNTRACK_SECMARK=y +CONFIG_NF_CONNTRACK_ZONES=y +CONFIG_NF_CONNTRACK_PROCFS=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CONNTRACK_TIMEOUT=y +CONFIG_NF_CONNTRACK_TIMESTAMP=y +CONFIG_NF_CONNTRACK_LABELS=y +CONFIG_NF_CT_PROTO_DCCP=m +CONFIG_NF_CT_PROTO_GRE=m +CONFIG_NF_CT_PROTO_SCTP=m +CONFIG_NF_CT_PROTO_UDPLITE=m +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_BROADCAST=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NF_CT_NETLINK_TIMEOUT=m +CONFIG_NF_CT_NETLINK_HELPER=m +CONFIG_NETFILTER_NETLINK_QUEUE_CT=y +CONFIG_NF_NAT=m +CONFIG_NF_NAT_NEEDED=y +CONFIG_NF_NAT_PROTO_DCCP=m +CONFIG_NF_NAT_PROTO_UDPLITE=m +CONFIG_NF_NAT_PROTO_SCTP=m +CONFIG_NF_NAT_AMANDA=m +CONFIG_NF_NAT_FTP=m +CONFIG_NF_NAT_IRC=m +CONFIG_NF_NAT_SIP=m +CONFIG_NF_NAT_TFTP=m +CONFIG_NETFILTER_TPROXY=m +CONFIG_NETFILTER_XTABLES=y + +# +# Xtables combined modules +# +CONFIG_NETFILTER_XT_MARK=y +CONFIG_NETFILTER_XT_CONNMARK=m +CONFIG_NETFILTER_XT_SET=m + +# +# Xtables targets +# +CONFIG_NETFILTER_XT_TARGET_AUDIT=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m +CONFIG_NETFILTER_XT_TARGET_CT=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HL=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_LOG=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NETMAP=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_RATEEST=m +CONFIG_NETFILTER_XT_TARGET_REDIRECT=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m +CONFIG_NETFILTER_XT_TARGET_TRACE=m +CONFIG_NETFILTER_XT_TARGET_SECMARK=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m + +# +# Xtables matches +# +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_CPU=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ECN=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_HL=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +# CONFIG_NETFILTER_XT_MATCH_QUOTA2 is not set +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_MAX=256 +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m +CONFIG_IP_VS=m +CONFIG_IP_VS_DEBUG=y +CONFIG_IP_VS_TAB_BITS=12 + +# +# IPVS transport protocol load balancing support +# +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_AH_ESP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +CONFIG_IP_VS_PROTO_SCTP=y + +# +# IPVS scheduler +# +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m + +# +# IPVS SH scheduler +# +CONFIG_IP_VS_SH_TAB_BITS=8 + +# +# IPVS application helper +# +CONFIG_IP_VS_FTP=m +CONFIG_IP_VS_NFCT=y +CONFIG_IP_VS_PE_SIP=m + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=m +CONFIG_NF_CONNTRACK_IPV4=m +CONFIG_NF_CONNTRACK_PROC_COMPAT=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_REJECT_SKERR=y +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_NF_NAT_IPV4=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_NF_NAT_SNMP_BASIC=m +CONFIG_NF_NAT_PROTO_GRE=m +CONFIG_NF_NAT_PPTP=m +CONFIG_NF_NAT_H323=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_SECURITY=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_BRIDGE_EBT_NFLOG=m +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +CONFIG_L2TP=m +CONFIG_L2TP_DEBUGFS=m +CONFIG_L2TP_V3=y +CONFIG_L2TP_IP=m +CONFIG_L2TP_ETH=m +CONFIG_STP=y +CONFIG_GARP=m +CONFIG_MRP=m +CONFIG_BRIDGE=y +# CONFIG_BRIDGE_IGMP_SNOOPING is not set +# CONFIG_BRIDGE_VLAN_FILTERING is not set +CONFIG_HAVE_NET_DSA=y +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_VLAN_8021Q_MVRP=y +# CONFIG_DECNET is not set +CONFIG_LLC=y +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +CONFIG_PHONET=y +# CONFIG_IEEE802154 is not set +CONFIG_NET_SCHED=y + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFB=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_MQPRIO=m +CONFIG_NET_SCH_CHOKE=m +CONFIG_NET_SCH_QFQ=m +CONFIG_NET_SCH_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_PLUG=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_FLOW=m +CONFIG_NET_CLS_CGROUP=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_STACK=32 +# CONFIG_NET_EMATCH_CMP is not set +# CONFIG_NET_EMATCH_NBYTE is not set +CONFIG_NET_EMATCH_U32=y +# CONFIG_NET_EMATCH_META is not set +# CONFIG_NET_EMATCH_TEXT is not set +# CONFIG_NET_EMATCH_CANID is not set +# CONFIG_NET_EMATCH_IPSET is not set +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=y +CONFIG_NET_ACT_GACT=y +# CONFIG_GACT_PROB is not set +CONFIG_NET_ACT_MIRRED=y +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_NAT=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_ACT_SKBEDIT=m +CONFIG_NET_ACT_CSUM=m +# CONFIG_NET_CLS_IND is not set +CONFIG_NET_SCH_FIFO=y +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=m +# CONFIG_BATMAN_ADV is not set +# CONFIG_OPENVSWITCH is not set +# CONFIG_VSOCKETS is not set +# CONFIG_NETLINK_MMAP is not set +# CONFIG_NETLINK_DIAG is not set +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +# CONFIG_NETPRIO_CGROUP is not set +CONFIG_BQL=y +# CONFIG_BPF_JIT is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +CONFIG_CAN=m +CONFIG_CAN_RAW=m +CONFIG_CAN_BCM=m +CONFIG_CAN_GW=m + +# +# CAN Device Drivers +# +CONFIG_CAN_VCAN=m +# CONFIG_CAN_SLCAN is not set +CONFIG_CAN_DEV=m +CONFIG_CAN_CALC_BITTIMING=y +# CONFIG_CAN_LEDS is not set +# CONFIG_CAN_AT91 is not set +CONFIG_CAN_MCP251X=m +# CONFIG_CAN_GRCAN is not set +# CONFIG_CAN_SJA1000 is not set +# CONFIG_CAN_C_CAN is not set +# CONFIG_CAN_CC770 is not set + +# +# CAN USB interfaces +# +# CONFIG_CAN_EMS_USB is not set +# CONFIG_CAN_ESD_USB2 is not set +# CONFIG_CAN_KVASER_USB is not set +# CONFIG_CAN_PEAK_USB is not set +# CONFIG_CAN_8DEV_USB is not set +# CONFIG_CAN_SOFTING is not set +# CONFIG_CAN_DEBUG_DEVICES is not set +# CONFIG_IRDA is not set +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_ATH3K=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIVHCI=m +CONFIG_BT_MRVL=m +# CONFIG_BT_MRVL_SDIO is not set +CONFIG_BT_ATH3K=m +# CONFIG_AF_RXRPC is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +# CONFIG_CFG80211 is not set +# CONFIG_LIB80211 is not set + +# +# CFG80211 needs to be enabled for MAC80211 +# +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +CONFIG_RFKILL_PM=y +CONFIG_RFKILL_LEDS=y +# CONFIG_RFKILL_INPUT is not set +# CONFIG_RFKILL_REGULATOR is not set +# CONFIG_RFKILL_GPIO is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set +# CONFIG_NFC is not set +CONFIG_HAVE_BPF_JIT=y + +# +# Device Drivers +# + +# +# Amlogic Device Drivers +# + +# +# Char devices +# +# CONFIG_EARLY_INIT is not set + +# +# Register Debug Support +# +# CONFIG_AML_REG_DEBUG is not set +CONFIG_AM_UART=y +CONFIG_AM_UART_CONSOLE=y +CONFIG_OF_LM=y +CONFIG_AML_RTC=y + +# +# I2C Hardware Bus support +# +CONFIG_I2C_AML=m +# CONFIG_I2C_SW_AML is not set +# CONFIG_BCM2079X_I2C is not set +CONFIG_AM_INPUT=y +CONFIG_SARADC_AM=y +# CONFIG_MESON_INPUT_REMOTE is not set +CONFIG_MESON_NEW_INPUT_REMOTE=y +CONFIG_NEW_AM_REMOTE=y +CONFIG_NEW_AM_IR_TX=y +# CONFIG_MESON_INPUT_KEYBOARD is not set +CONFIG_MESON_INPUT_TOUCHSCREEN=y +# CONFIG_ADC_TOUCHSCREEN_AM is not set +# CONFIG_ITK_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_PIXCIR_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_PIXCIR_NEW_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_SINTEK_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_EETI_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_SIS92XX_CAPACITIVE_TOUCHSCREEN is not set +CONFIG_FOCALTECH_CAPACITIVE_TOUCHSCREEN=y +# CONFIG_SITRONIX_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_HX8520_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_RAYDIUM_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_GOODIX_CAPACITIVE_TOUCHSCREEN is not set +CONFIG_GOODIX_GT81XX_CAPACITIVE_TOUCHSCREEN=y +# CONFIG_GOODIX_GT82X_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_UOR7X5X_RESISTIVE_TOUCHSCREEN is not set +# CONFIG_UOR6X5X_RESISTIVE_TOUCHSCREEN is not set +# CONFIG_GSLX680_CAPACITIVE_TOUCHSCREEN is not set +CONFIG_GSLX680_COMPATIBLE_CAPACITIVE_TOUCHSCREEN=y +# CONFIG_GSLX680B_CAPACITIVE_TOUCHSCREEN is not set +CONFIG_GOODIX_GT9XX_CAPACITIVE_TOUCHSCREEN=y +# CONFIG_FT5X02_CAPACITIVE_TOUCHSCREEN is not set +CONFIG_NOVATEK_CAPACITIVE_TOUCHSCREEN=y + +# +# Ct36x Touch device support +# +CONFIG_TOUCHSCREEN_CT36X=y +CONFIG_TOUCHSCREEN_CT36X_PLATFORM_AMLCHIP=y +# CONFIG_TOUCHSCREEN_CT36X_PLATFORM_GENERIC is not set +# CONFIG_TOUCHSCREEN_CT36X_PLATFORM_ROCKCHIP is not set +# CONFIG_TOUCHSCREEN_CT36X_PLATFORM_ALLWINNER is not set +# CONFIG_TOUCHSCREEN_CT36X_CHIP_CT360 is not set +CONFIG_TOUCHSCREEN_CT36X_CHIP_CT365=y +CONFIG_TOUCHSCREEN_CT36X_MISC=y +# CONFIG_TOUCHSCREEN_CT36X_MISC_X_REVERSE is not set +# CONFIG_TOUCHSCREEN_CT36X_MISC_Y_REVERSE is not set +# CONFIG_TOUCHSCREEN_CT36X_MISC_XY_SWAP is not set +CONFIG_TOUCHSCREEN_CT36X_MISC_NEW_TPS=y +# CONFIG_SIMCARD_DETECT_AM is not set +# CONFIG_AML_HOLD_KEY is not set +# CONFIG_AML_CALL_KEY is not set +CONFIG_SENSOR_DEVICES=y +CONFIG_GRAVITY_BMA250=y +CONFIG_GRAVITY_BMA222=y +CONFIG_GRAVITY_MMA7660=y +CONFIG_GRAVITY_MIR3DA=y +CONFIG_GRAVITY_LIS3DH=y +CONFIG_GRAVITY_MMA8452=y +CONFIG_GRAVITY_MC32X0=y +CONFIG_GRAVITY_DMARD06=y +CONFIG_GRAVITY_MMA865X=y +CONFIG_GRAVITY_LSM303D=y +CONFIG_GRAVITY_DMARD10=y +CONFIG_GRAVITY_KXTJ9=y +CONFIG_GRAVITY_STK8313=y +CONFIG_GRAVITY_STK8312=y +CONFIG_GRAVITY_MM3A310=y +CONFIG_GRAVITY_MXC622X=y +CONFIG_GRAVITY_MXC6255XC=y +# CONFIG_GYROSCOPE_L3GD20 is not set +CONFIG_LIGHT_CM36283=y +CONFIG_LIGHT_CM3232=y +CONFIG_LIGHT_CM3217=y +CONFIG_LIGHT_LTR501=y +CONFIG_LIGHT_EPL6814=y +CONFIG_LIGHT_ISL29023=y +CONFIG_LIGHT_STK220X=y +CONFIG_LIGHT_LTR558=y +# CONFIG_AML_GPIO_KEY is not set +CONFIG_GPIO_AMLOGIC=y +CONFIG_PINCTRL_AMLOGIC=y + +# +# Power Management Support +# +# CONFIG_AMLOGIC_BOARD_HAS_PMU is not set +# CONFIG_AML_PMU_ALGORITHM_SUPPORT is not set +# CONFIG_AML_DVFS is not set +# CONFIG_MESON_CS_DCDC_REGULATOR is not set + +# +# Security key Support +# +# CONFIG_SECURITYKEY is not set + +# +# key management Support +# +# CONFIG_UNIFY_KEY_MANAGE is not set + +# +# EFUSE Support +# +CONFIG_EFUSE=y +# CONFIG_EFUSE_WRITE_VERSION_PERMIT is not set +CONFIG_EFUSE_LAYOUT_VERSION=3 + +# +# Smartcard support +# +# CONFIG_AM_SMARTCARD is not set +CONFIG_AML_VIRTUAL_THERMAL=y +CONFIG_AMLOGIC_THERMAL=y +CONFIG_AML_WDT=y + +# +# AMLOGIC SPI Hardware bus support +# +CONFIG_AMLOGIC_SPICC_MASTER=m +# CONFIG_AMLOGIC_SPICC_MASTER_DEBUG is not set +CONFIG_MESON_PWM=m +CONFIG_MESON_PWM_CTRL=m + +# +# USB Support +# +CONFIG_AMLOGIC_USB=y +CONFIG_USB_DWC_OTG_HCD=y +CONFIG_USB_HOST_ELECT_TEST=y + +# +# MMC/SD/SDIO Host Controller Drivers +# + +# +# Multimedia Card support +# +CONFIG_MMC_AML=y +# CONFIG_MMC_AML_DEBUG is not set +# CONFIG_AML_MMC_DEBUG_FORCE_SINGLE_BLOCK_RW is not set + +# +# SPI NOR Flash support +# +# CONFIG_AMLOGIC_SPI_NOR is not set + +# +# Network devices +# + +# +# Ethernet Support +# +CONFIG_AM_ETHERNET=y +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +CONFIG_AML_PHY=y +# CONFIG_AML_LAN8720 is not set +# CONFIG_AML_IP101_PHY is not set +# CONFIG_AML_KSZ8091 is not set +CONFIG_AML_RTL8211F=y +CONFIG_AM_ETHERNET_DEBUG_LEVEL=1 +CONFIG_AM_WIFI=y +# CONFIG_AM_WIFI_SD_MMC is not set +# CONFIG_DHD_USE_STATIC_BUF is not set +CONFIG_AM_WIFI_USB=y + +# +# Bluetooth Device Support +# +CONFIG_BT_DEVICE=y +CONFIG_BT_WAKE_CTRL=y +# CONFIG_BT_RTKBTUSB is not set +# CONFIG_MESON_NFC is not set + +# +# Audio devices +# + +# +# Audio Interface +# +CONFIG_AMAUDIO=y + +# +# Amlogic Audio Interface V2 +# +# CONFIG_AMAUDIO2 is not set + +# +# Audio dsp process +# +CONFIG_AML_AUDIO_DSP=y + +# +# Video devices +# +CONFIG_AML_VFM=y +CONFIG_AM_PTSSERVER=y +# CONFIG_H264_4K2K_SINGLE_CORE is not set +CONFIG_VSYNC_RDMA=y +CONFIG_AM_VIDEO=y +# CONFIG_AM_VIDEO2 is not set +# CONFIG_KEEP_FRAME_RESERVED is not set +# CONFIG_SUPPORT_VIDEO_ON_VPP2 is not set +CONFIG_GE2D_KEEP_FRAME=y + +# +# Video Decoders +# +CONFIG_AM_VDEC_MPEG12=y +CONFIG_AM_VDEC_MPEG4=y +CONFIG_AM_VDEC_VC1=y +CONFIG_AM_VDEC_H264=y +# CONFIG_AM_VDEC_H264MVC is not set +CONFIG_AM_VDEC_H265=y +CONFIG_AM_VDEC_MJPEG=y +CONFIG_AM_ENCODER=y +CONFIG_AM_JPEG_ENCODER=y +CONFIG_AM_PIC_DEC=y +CONFIG_AM_VDEC_REAL=y +CONFIG_AM_VDEC_AVS=y +CONFIG_AM_JPEGDEC=y +CONFIG_AM_TIMESYNC=y +CONFIG_AM_STREAMING=y +CONFIG_AM_SUBTITLE=y +CONFIG_AM_VIDEOCAPTURE=y + +# +# Canvas management driver +# +CONFIG_AM_CANVAS=y +CONFIG_AM_DISPLAY_MODULE=y + +# +# Amlogic video output module +# +CONFIG_AM_TV_OUTPUT=y +CONFIG_AML_VOUT_FRAMERATE_AUTOMATION=y +# CONFIG_AM_LCD_OUTPUT is not set + +# +# Amlogic video output2 module +# +# CONFIG_AM_TV_OUTPUT2 is not set + +# +# Amlogic TV LCD Support +# +# CONFIG_AML_TV_LCD is not set + +# +# Amlogic osd module +# +CONFIG_FB_AM=y +CONFIG_FB_OSD2_ENABLE=y +CONFIG_FB_OSD2_CURSOR=y +CONFIG_FB_OSD2_DEFAULT_BITS_PER_PIXEL=32 +CONFIG_FB_OSD2_DEFAULT_WIDTH=32 +CONFIG_FB_OSD2_DEFAULT_HEIGHT=32 +CONFIG_FB_OSD2_DEFAULT_WIDTH_VIRTUAL=32 +CONFIG_FB_OSD2_DEFAULT_HEIGHT_VIRTUAL=32 +CONFIG_FB_OSD1_DEFAULT_BITS_PER_PIXEL=16 +CONFIG_FB_OSD1_DEFAULT_WIDTH=720 +CONFIG_FB_OSD1_DEFAULT_HEIGHT=480 +CONFIG_FB_OSD1_DEFAULT_WIDTH_VIRTUAL=720 +CONFIG_FB_OSD1_DEFAULT_HEIGHT_VIRTUAL=480 +CONFIG_FB_AMLOGIC_UMP=y + +# +# Amlogic osd_ext module +# + +# +# Amlogic Backlight Support +# +# CONFIG_AMLOGIC_BACKLIGHT is not set +# CONFIG_AML_BL_PWM_ATTR is not set +# CONFIG_AML_LOCAL_DIMMING is not set +# CONFIG_IW7023_BACKLIGHT is not set +# CONFIG_IW7023_USE_EEPROM is not set +CONFIG_AM_GE2D=y +CONFIG_AM_LOGO=y +CONFIG_AM_HDMI_ONLY=y + +# +# HDMI TX Support +# +CONFIG_AML_HDMI_TX=y +# CONFIG_AML_HDMI_TX_HDCP is not set +# CONFIG_AML_HDMI_TX_CTS_DVI is not set +CONFIG_TVIN=y +CONFIG_TVIN_VDIN=y +# CONFIG_TVIN_AFE is not set +# CONFIG_TVIN_HDMI is not set +CONFIG_TVIN_BT656=y +CONFIG_TVIN_CSI=y +CONFIG_VIUIN=y +# CONFIG_GAMMA_AUTO_TUNE is not set +# CONFIG_AM_HDMI_REPEATER is not set +# CONFIG_TVIN_IT660X is not set +# CONFIG_TVIN_ISP is not set +# CONFIG_TVIN_VDIN_CTRL is not set +# CONFIG_AML_EXT_HDMIIN is not set +# CONFIG_DEBUG_DRIVER is not set + +# +# Post Process Manager driver +# +CONFIG_POST_PROCESS_MANAGER=y +CONFIG_POST_PROCESS_MANAGER_PPSCALER=y +# CONFIG_POST_PROCESS_MANAGER_3D_PROCESS is not set + +# +# Amlogic Camera Support +# +# CONFIG_VIDEO_AMLOGIC_CAPTURE is not set + +# +# V4L2 Video Support +# +# CONFIG_V4L_AMLOGIC_VIDEO is not set +# CONFIG_V4L_AMLOGIC_VIDEO2 is not set + +# +# Amlogic ion video support +# +# CONFIG_VIDEOBUF2_ION is not set +# CONFIG_AMLOGIC_IONVIDEO is not set + +# +# Deinterlace driver +# +CONFIG_DEINTERLACE=y +# CONFIG_AM_DEINTERLACE_SD_ONLY is not set + +# +# MIPI Support +# +# CONFIG_AMLOGIC_MIPI is not set +# CONFIG_D2D3_PROCESS is not set + +# +# Amlogic VE & CM +# +# CONFIG_AM_VECM is not set + +# +# Amlogic DVB driver +# +# CONFIG_AM_DVB is not set + +# +# AMLOGIC CI Driver +# +# CONFIG_AM_PCMCIA is not set +# CONFIG_AM_IOBUS is not set + +# +# Amlogic Crypto Support +# +CONFIG_CRYPTO_AML_HW_CRYPRO=y +CONFIG_CRYPTO_DEVICE_DRIVER=y + +# +# MHL Support +# +# CONFIG_PANEL_IT6681 is not set + +# +# Amlogic PMU battery algorithm Support +# + +# +# Amlogic touch algorithm Support +# +# CONFIG_AML_TOUCH_ALGORITHM_SUPPORT is not set + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_FW_LOADER_USER_HELPER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_GENERIC_CPU_DEVICES is not set +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_SPI=y +CONFIG_DMA_SHARED_BUFFER=y +CONFIG_CMA=y +# CONFIG_CMA_DEBUG is not set + +# +# Default contiguous memory area size: +# +CONFIG_CMA_SIZE_MBYTES=8 +CONFIG_CMA_SIZE_SEL_MBYTES=y +# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set +# CONFIG_CMA_SIZE_SEL_MIN is not set +# CONFIG_CMA_SIZE_SEL_MAX is not set +CONFIG_CMA_ALIGNMENT=8 +CONFIG_CMA_AREAS=7 + +# +# Bus devices +# +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_TESTS is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set +CONFIG_MTD_OF_PARTS=y +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set +# CONFIG_MTD_SWAP is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set +# CONFIG_MTD_SST25L is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOCG3 is not set +CONFIG_MTD_NAND_IDS=y +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_ECC_BCH is not set +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_DENALI is not set +# CONFIG_MTD_NAND_GPIO is not set +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_DOCG4 is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +# CONFIG_MTD_UBI is not set +CONFIG_DTC=y +CONFIG_OF=y + +# +# Device Tree and Open Firmware support +# +CONFIG_PROC_DEVICETREE=y +CONFIG_OF_SELFTEST=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_IRQ=y +CONFIG_OF_DEVICE=y +CONFIG_OF_I2C=y +CONFIG_OF_NET=y +CONFIG_OF_MDIO=y +CONFIG_OF_MTD=y +CONFIG_PARPORT=m +# CONFIG_PARPORT_PC is not set +# CONFIG_PARPORT_GSC is not set +# CONFIG_PARPORT_AX88796 is not set +# CONFIG_PARPORT_1284 is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +CONFIG_BLK_DEV_DRBD=m +# CONFIG_DRBD_FAULT_INJECTION is not set +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set + +# +# Misc devices +# +# CONFIG_SENSORS_LIS3LV02D is not set +# CONFIG_AD525X_DPOT is not set +# CONFIG_ATMEL_PWM is not set +# CONFIG_DUMMY_IRQ is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ATMEL_SSC is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_TI_DAC7512 is not set +# CONFIG_UID_STAT is not set +CONFIG_BMP085=y +CONFIG_BMP085_I2C=m +# CONFIG_BMP085_SPI is not set +CONFIG_SI1132=m +CONFIG_SI702X=m +# CONFIG_USB_SWITCH_FSA9480 is not set +# CONFIG_LATTICE_ECP3_CONFIG is not set +# CONFIG_SRAM is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +CONFIG_EEPROM_93CX6=m +# CONFIG_EEPROM_93XX46 is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +# CONFIG_SENSORS_LIS3_SPI is not set +# CONFIG_SENSORS_LIS3_I2C is not set + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +CONFIG_SCSI_ISCSI_ATTRS=m +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m +# CONFIG_SCSI_UFSHCD is not set +# CONFIG_LIBFC is not set +# CONFIG_LIBFCOE is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +CONFIG_MD=y +CONFIG_BLK_DEV_MD=y +CONFIG_MD_AUTODETECT=y +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +CONFIG_MD_RAID456=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m +# CONFIG_BCACHE is not set +CONFIG_BLK_DEV_DM_BUILTIN=y +CONFIG_BLK_DEV_DM=y +CONFIG_DM_DEBUG=y +CONFIG_DM_BUFIO=m +CONFIG_DM_BIO_PRISON=m +CONFIG_DM_PERSISTENT_DATA=m +CONFIG_DM_CRYPT=y +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +# CONFIG_DM_DEBUG_BLOCK_STACK_TRACING is not set +CONFIG_DM_CACHE=m +CONFIG_DM_CACHE_MQ=m +CONFIG_DM_CACHE_CLEANER=m +CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m +# CONFIG_DM_LOG_USERSPACE is not set +# CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set +# CONFIG_DM_DELAY is not set +CONFIG_DM_UEVENT=y +# CONFIG_DM_FLAKEY is not set +# CONFIG_DM_VERITY is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +CONFIG_NET_CORE=y +CONFIG_BONDING=m +# CONFIG_DUMMY is not set +# CONFIG_EQUALIZER is not set +CONFIG_MII=y +# CONFIG_IFB is not set +# CONFIG_NET_TEAM is not set +CONFIG_MACVLAN=m +CONFIG_MACVTAP=m +# CONFIG_VXLAN is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_TUN=y +CONFIG_VETH=m + +# +# CAIF transport drivers +# + +# +# Distributed Switch Architecture drivers +# +# CONFIG_NET_DSA_MV88E6XXX is not set +# CONFIG_NET_DSA_MV88E6060 is not set +# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set +# CONFIG_NET_DSA_MV88E6131 is not set +# CONFIG_NET_DSA_MV88E6123_61_65 is not set +CONFIG_ETHERNET=y +CONFIG_NET_CADENCE=y +# CONFIG_ARM_AT91_ETHER is not set +# CONFIG_MACB is not set +CONFIG_NET_VENDOR_BROADCOM=y +# CONFIG_B44 is not set +# CONFIG_NET_CALXEDA_XGMAC is not set +CONFIG_NET_VENDOR_CIRRUS=y +# CONFIG_CS89x0 is not set +# CONFIG_DM9000 is not set +# CONFIG_DNET is not set +CONFIG_NET_VENDOR_FARADAY=y +# CONFIG_FTMAC100 is not set +# CONFIG_FTGMAC100 is not set +CONFIG_NET_VENDOR_INTEL=y +CONFIG_NET_VENDOR_I825XX=y +CONFIG_NET_VENDOR_MARVELL=y +# CONFIG_MVMDIO is not set +CONFIG_NET_VENDOR_MICREL=y +# CONFIG_KS8851 is not set +# CONFIG_KS8851_MLL is not set +CONFIG_NET_VENDOR_MICROCHIP=y +# CONFIG_ENC28J60 is not set +CONFIG_NET_VENDOR_NATSEMI=y +CONFIG_NET_VENDOR_8390=y +# CONFIG_AX88796 is not set +# CONFIG_ETHOC is not set +CONFIG_NET_VENDOR_SEEQ=y +CONFIG_NET_VENDOR_SMSC=y +# CONFIG_SMC91X is not set +# CONFIG_SMC911X is not set +# CONFIG_SMSC911X is not set +CONFIG_NET_VENDOR_STMICRO=y +# CONFIG_STMMAC_ETH is not set +CONFIG_NET_VENDOR_WIZNET=y +# CONFIG_WIZNET_W5100 is not set +# CONFIG_WIZNET_W5300 is not set + +# +# MII PHY device drivers +# +# CONFIG_AT803X_PHY is not set +# CONFIG_AMD_PHY is not set +# CONFIG_MARVELL_PHY is not set +# CONFIG_AMLOGIC_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_BCM87XX_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_MICREL_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +# CONFIG_MDIO_BUS_MUX_GPIO is not set +# CONFIG_MDIO_BUS_MUX_MMIOREG is not set +# CONFIG_MICREL_KS8995MA is not set +# CONFIG_PLIP is not set +CONFIG_PPP=y +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=m +CONFIG_PPPOL2TP=m +CONFIG_PPPOLAC=m +CONFIG_PPPOPNS=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +# CONFIG_SLIP is not set +CONFIG_SLHC=y + +# +# USB Network Adapters +# +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=m +CONFIG_USB_USBNET=m +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_AX88179_178A=m +CONFIG_USB_NET_CDCETHER=m +# CONFIG_USB_NET_CDC_EEM is not set +CONFIG_USB_NET_CDC_NCM=m +# CONFIG_USB_NET_CDC_MBIM is not set +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_CDC_SUBSET=m +# CONFIG_USB_ALI_M5632 is not set +# CONFIG_USB_AN2720 is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_EPSON2888 is not set +# CONFIG_USB_KC2190 is not set +CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_NET_CX82310_ETH=m +CONFIG_USB_NET_KALMIA=m +CONFIG_USB_NET_QMI_WWAN=m +CONFIG_USB_HSO=m +# CONFIG_USB_NET_INT51X1 is not set +CONFIG_USB_CDC_PHONET=m +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +# CONFIG_USB_VL600 is not set +# CONFIG_WLAN is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# +# CONFIG_WAN is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=m +CONFIG_INPUT_POLLDEV=y +# CONFIG_INPUT_SPARSEKMAP is not set +# CONFIG_INPUT_MATRIXKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=m +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set +# CONFIG_INPUT_KEYRESET is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ADP5588 is not set +# CONFIG_KEYBOARD_ADP5589 is not set +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_QT1070 is not set +# CONFIG_KEYBOARD_QT2160 is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_GPIO is not set +# CONFIG_KEYBOARD_TCA6416 is not set +# CONFIG_KEYBOARD_TCA8418 is not set +# CONFIG_KEYBOARD_MATRIX is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_LM8333 is not set +# CONFIG_KEYBOARD_MAX7359 is not set +# CONFIG_KEYBOARD_MCS is not set +# CONFIG_KEYBOARD_MPR121 is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_SAMSUNG is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_CYPRESS=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_ELANTECH is not set +# CONFIG_MOUSE_PS2_SENTELIC is not set +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_BCM5974 is not set +# CONFIG_MOUSE_CYAPA is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_MOUSE_GPIO is not set +# CONFIG_MOUSE_SYNAPTICS_I2C is not set +# CONFIG_MOUSE_SYNAPTICS_USB is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_DB9 is not set +CONFIG_JOYSTICK_GAMECON=m +# CONFIG_JOYSTICK_TURBOGRAFX is not set +# CONFIG_JOYSTICK_AS5011 is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +# CONFIG_JOYSTICK_WALKERA0701 is not set +CONFIG_INPUT_TABLET=y +CONFIG_TABLET_USB_ACECAD=m +CONFIG_TABLET_USB_AIPTEK=m +CONFIG_TABLET_USB_GTCO=m +CONFIG_TABLET_USB_HANWANG=m +CONFIG_TABLET_USB_KBTAB=m +CONFIG_TABLET_USB_WACOM=m +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_AD7877 is not set +# CONFIG_TOUCHSCREEN_AD7879 is not set +# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set +# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set +# CONFIG_TOUCHSCREEN_BU21013 is not set +# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set +# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set +# CONFIG_TOUCHSCREEN_DYNAPRO is not set +# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set +# CONFIG_TOUCHSCREEN_EETI is not set +# CONFIG_TOUCHSCREEN_EGALAX is not set +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# CONFIG_TOUCHSCREEN_ILI210X is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set +# CONFIG_TOUCHSCREEN_WACOM_I2C is not set +# CONFIG_TOUCHSCREEN_MAX11801 is not set +# CONFIG_TOUCHSCREEN_MCS5000 is not set +# CONFIG_TOUCHSCREEN_MMS114 is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_INEXIO is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_PIXCIR is not set +# CONFIG_TOUCHSCREEN_WM97XX is not set +# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set +# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set +# CONFIG_TOUCHSCREEN_TSC_SERIO is not set +# CONFIG_TOUCHSCREEN_TSC2005 is not set +# CONFIG_TOUCHSCREEN_TSC2007 is not set +# CONFIG_TOUCHSCREEN_W90X900 is not set +# CONFIG_TOUCHSCREEN_ST1232 is not set +# CONFIG_TOUCHSCREEN_TPS6507X is not set +CONFIG_TOUCHSCREEN_DWAV_USB_MT=m +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_BMA150 is not set +# CONFIG_INPUT_MMA8450 is not set +# CONFIG_INPUT_MPU3050 is not set +# CONFIG_INPUT_GP2A is not set +# CONFIG_INPUT_GPIO_TILT_POLLED is not set +CONFIG_INPUT_ATI_REMOTE2=m +# CONFIG_INPUT_KEYCHORD is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_KXTJ9 is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=m +CONFIG_INPUT_GPIO=m +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_PWM_BEEPER is not set +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_IMS_PCU is not set +# CONFIG_INPUT_CMA3000 is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_PARKBD is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_SERIO_ARC_PS2 is not set +# CONFIG_SERIO_APBPS2 is not set +CONFIG_GAMEPORT=m +# CONFIG_GAMEPORT_NS558 is not set +# CONFIG_GAMEPORT_L4 is not set + +# +# Character devices +# +CONFIG_TTY=y +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_VT_CONSOLE_SLEEP=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_UNIX98_PTYS=y +CONFIG_DEVPTS_MULTIPLE_INSTANCES=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +CONFIG_DEVMEM=y +CONFIG_DEVKMEM=y + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MAX3100 is not set +# CONFIG_SERIAL_MAX310X is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_SCCNXP is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_IFX6X60 is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_SERIAL_ARC is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_PRINTER is not set +# CONFIG_PPDEV is not set +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_HW_RANDOM_ATMEL is not set +CONFIG_HW_RANDOM_MESON=y +# CONFIG_HW_RANDOM_EXYNOS is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_DCC_TTY is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y + +# +# Multiplexer I2C Chip support +# +# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set +# CONFIG_I2C_MUX_GPIO is not set +# CONFIG_I2C_MUX_PCA9541 is not set +# CONFIG_I2C_MUX_PCA954x is not set +# CONFIG_I2C_MUX_PINCTRL is not set +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_CBUS_GPIO is not set +# CONFIG_I2C_DESIGNWARE_PLATFORM is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_DIOLAN_U2C is not set +# CONFIG_I2C_PARPORT is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_ALTERA is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_BUTTERFLY is not set +# CONFIG_SPI_GPIO is not set +# CONFIG_SPI_LM70_LLP is not set +# CONFIG_SPI_FSL_SPI is not set +# CONFIG_SPI_OC_TINY is not set +# CONFIG_SPI_PXA2XX_PCI is not set +# CONFIG_SPI_SC18IS602 is not set +# CONFIG_SPI_XCOMM is not set +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_DESIGNWARE is not set + +# +# SPI Protocol Masters +# +CONFIG_SPI_SPIDEV=m +# CONFIG_SPI_TLE62X0 is not set + +# +# Qualcomm MSM SSBI bus support +# +# CONFIG_SSBI is not set +# CONFIG_HSI is not set + +# +# PPS support +# +CONFIG_PPS=m +# CONFIG_PPS_DEBUG is not set + +# +# PPS clients support +# +# CONFIG_PPS_CLIENT_KTIMER is not set +# CONFIG_PPS_CLIENT_LDISC is not set +# CONFIG_PPS_CLIENT_PARPORT is not set +CONFIG_PPS_CLIENT_GPIO=m + +# +# PPS generators support +# + +# +# PTP clock support +# +# CONFIG_PTP_1588_CLOCK is not set + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +# CONFIG_PTP_1588_CLOCK_PCH is not set +CONFIG_PINCTRL=y + +# +# Pin controllers +# +CONFIG_PINMUX=y +CONFIG_PINCONF=y +# CONFIG_DEBUG_PINCTRL is not set +# CONFIG_PINCTRL_SINGLE is not set +# CONFIG_PINCTRL_EXYNOS is not set +# CONFIG_PINCTRL_EXYNOS5440 is not set +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIO_DEVRES=y +CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y + +# +# Memory mapped GPIO drivers: +# +# CONFIG_GPIO_GENERIC_PLATFORM is not set +# CONFIG_GPIO_EM is not set +# CONFIG_GPIO_RCAR is not set +# CONFIG_GPIO_TS5500 is not set +# CONFIG_GPIO_GRGPIO is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +# CONFIG_GPIO_ADP5588 is not set +# CONFIG_GPIO_ADNP is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_MC33880 is not set +# CONFIG_GPIO_74X164 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# + +# +# USB GPIO expanders: +# +CONFIG_W1=m + +# +# 1-wire Bus Masters +# +# CONFIG_W1_MASTER_DS2490 is not set +# CONFIG_W1_MASTER_DS2482 is not set +# CONFIG_W1_MASTER_DS1WM is not set +CONFIG_W1_MASTER_GPIO=m + +# +# 1-wire Slaves +# +CONFIG_W1_SLAVE_THERM=m +# CONFIG_W1_SLAVE_SMEM is not set +# CONFIG_W1_SLAVE_DS2408 is not set +# CONFIG_W1_SLAVE_DS2413 is not set +# CONFIG_W1_SLAVE_DS2423 is not set +# CONFIG_W1_SLAVE_DS2431 is not set +# CONFIG_W1_SLAVE_DS2433 is not set +# CONFIG_W1_SLAVE_DS2760 is not set +# CONFIG_W1_SLAVE_DS2780 is not set +# CONFIG_W1_SLAVE_DS2781 is not set +# CONFIG_W1_SLAVE_DS28E04 is not set +# CONFIG_W1_SLAVE_BQ27000 is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_TEST_POWER is not set +# CONFIG_BATTERY_DS2780 is not set +# CONFIG_BATTERY_DS2781 is not set +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_SBS is not set +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +# CONFIG_BATTERY_MAX17042 is not set +# CONFIG_BATTERY_ANDROID is not set +# CONFIG_CHARGER_MAX8903 is not set +# CONFIG_CHARGER_LP8727 is not set +# CONFIG_CHARGER_GPIO is not set +# CONFIG_CHARGER_MANAGER is not set +# CONFIG_CHARGER_BQ2415X is not set +# CONFIG_CHARGER_SMB347 is not set +# CONFIG_BATTERY_GOLDFISH is not set +# CONFIG_POWER_RESET is not set +# CONFIG_POWER_RESET_RESTART is not set +# CONFIG_POWER_AVS is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_AD7314 is not set +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADCXX is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ADT7310 is not set +# CONFIG_SENSORS_ADT7410 is not set +# CONFIG_SENSORS_ADT7411 is not set +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +# CONFIG_SENSORS_ASC7621 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS620 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_GPIO_FAN is not set +# CONFIG_SENSORS_HIH6130 is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_JC42 is not set +# CONFIG_SENSORS_LINEAGE is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM70 is not set +# CONFIG_SENSORS_LM73 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4151 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4261 is not set +# CONFIG_SENSORS_LM95234 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_LM95245 is not set +# CONFIG_SENSORS_MAX1111 is not set +# CONFIG_SENSORS_MAX16065 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX1668 is not set +# CONFIG_SENSORS_MAX197 is not set +# CONFIG_SENSORS_MAX6639 is not set +# CONFIG_SENSORS_MAX6642 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_MAX6697 is not set +# CONFIG_SENSORS_MCP3021 is not set +# CONFIG_SENSORS_NCT6775 is not set +# CONFIG_SENSORS_NTC_THERMISTOR is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_PMBUS is not set +# CONFIG_SENSORS_SHT15 is not set +# CONFIG_SENSORS_SHT21 is not set +# CONFIG_SENSORS_SMM665 is not set +# CONFIG_SENSORS_DME1737 is not set +# CONFIG_SENSORS_EMC1403 is not set +# CONFIG_SENSORS_EMC2103 is not set +# CONFIG_SENSORS_EMC6W201 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH56XX_COMMON is not set +# CONFIG_SENSORS_SCH5627 is not set +# CONFIG_SENSORS_SCH5636 is not set +# CONFIG_SENSORS_ADS1015 is not set +# CONFIG_SENSORS_ADS7828 is not set +# CONFIG_SENSORS_ADS7871 is not set +# CONFIG_SENSORS_AMC6821 is not set +# CONFIG_SENSORS_INA209 is not set +# CONFIG_SENSORS_INA2XX is not set +# CONFIG_SENSORS_THMC50 is not set +# CONFIG_SENSORS_TMP102 is not set +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83795 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +CONFIG_THERMAL=y +CONFIG_THERMAL_HWMON=y +CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y +# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set +# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set +# CONFIG_THERMAL_GOV_FAIR_SHARE is not set +CONFIG_THERMAL_GOV_STEP_WISE=y +# CONFIG_THERMAL_GOV_USER_SPACE is not set +CONFIG_CPU_THERMAL=y +CONFIG_CPUCORE_THERMAL=y +CONFIG_GPU_THERMAL=y +CONFIG_GPUCORE_THERMAL=y +# CONFIG_THERMAL_EMULATION is not set +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_CORE=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_DW_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +# CONFIG_BCMA is not set + +# +# Multifunction device drivers +# +CONFIG_MFD_CORE=m +# CONFIG_MFD_AS3711 is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_AAT2870_CORE is not set +# CONFIG_MFD_CROS_EC is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_DA9052_SPI is not set +# CONFIG_MFD_DA9052_I2C is not set +# CONFIG_MFD_DA9055 is not set +# CONFIG_MFD_MC13XXX_SPI is not set +# CONFIG_MFD_MC13XXX_I2C is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_MFD_88PM800 is not set +# CONFIG_MFD_88PM805 is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_MAX77686 is not set +# CONFIG_MFD_MAX77693 is not set +# CONFIG_MFD_MAX8907 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_EZX_PCAP is not set +# CONFIG_MFD_VIPERBOARD is not set +# CONFIG_MFD_RETU is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_UCB1400_CORE is not set +# CONFIG_MFD_RC5T583 is not set +# CONFIG_MFD_SEC_CORE is not set +# CONFIG_MFD_SI476X_CORE is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_SMSC is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_SYSCON is not set +# CONFIG_MFD_TI_AM335X_TSCADC is not set +# CONFIG_MFD_LP8788 is not set +# CONFIG_MFD_PALMAS is not set +# CONFIG_TPS6105X is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_MFD_TPS65090 is not set +# CONFIG_MFD_TPS65217 is not set +# CONFIG_MFD_TPS6586X is not set +# CONFIG_MFD_TPS65910 is not set +# CONFIG_MFD_TPS65912 is not set +# CONFIG_MFD_TPS65912_I2C is not set +# CONFIG_MFD_TPS65912_SPI is not set +# CONFIG_MFD_TPS80031 is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_TWL6040_CORE is not set +# CONFIG_MFD_WL1273_CORE is not set +# CONFIG_MFD_LM3533 is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_MFD_ARIZONA_I2C is not set +# CONFIG_MFD_ARIZONA_SPI is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM831X_SPI is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +# CONFIG_REGULATOR_DUMMY is not set +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_GPIO is not set +# CONFIG_REGULATOR_AD5398 is not set +# CONFIG_REGULATOR_FAN53555 is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_MAX8973 is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_LP872X is not set +# CONFIG_REGULATOR_LP8755 is not set +# CONFIG_REGULATOR_TPS51632 is not set +# CONFIG_REGULATOR_TPS62360 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_REGULATOR_TPS6524X is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_ANALOG_TV_SUPPORT=y +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +# CONFIG_MEDIA_RADIO_SUPPORT is not set +CONFIG_MEDIA_RC_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_MEDIA_CONTROLLER_DVB=y +CONFIG_VIDEO_DEV=y +# CONFIG_VIDEO_V4L2_SUBDEV_API is not set +CONFIG_VIDEO_V4L2=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_VIDEO_TUNER=m +CONFIG_VIDEOBUF_GEN=m +CONFIG_VIDEOBUF_VMALLOC=m +CONFIG_VIDEOBUF_DVB=m +CONFIG_VIDEOBUF2_CORE=m +CONFIG_VIDEOBUF2_MEMOPS=m +CONFIG_VIDEOBUF2_VMALLOC=m +# CONFIG_VIDEO_V4L2_INT_DEVICE is not set +CONFIG_DVB_CORE=y +CONFIG_DVB_NET=y +CONFIG_TTPCI_EEPROM=m +CONFIG_DVB_MAX_ADAPTERS=8 +CONFIG_DVB_DYNAMIC_MINORS=y + +# +# Media drivers +# +CONFIG_RC_CORE=y +CONFIG_RC_MAP=y +CONFIG_RC_DECODERS=y +CONFIG_LIRC=m +CONFIG_IR_LIRC_CODEC=m +CONFIG_IR_NEC_DECODER=m +CONFIG_IR_RC5_DECODER=m +CONFIG_IR_RC6_DECODER=m +CONFIG_IR_JVC_DECODER=m +CONFIG_IR_SONY_DECODER=m +CONFIG_IR_RC5_SZ_DECODER=m +CONFIG_IR_SANYO_DECODER=m +CONFIG_IR_MCE_KBD_DECODER=m +CONFIG_RC_DEVICES=y +CONFIG_RC_ATI_REMOTE=m +CONFIG_IR_IMON=m +CONFIG_IR_MCEUSB=m +CONFIG_IR_MESON=m +CONFIG_IR_REDRAT3=m +CONFIG_IR_STREAMZAP=m +CONFIG_IR_IGUANA=m +CONFIG_IR_TTUSBIR=m +CONFIG_RC_LOOPBACK=m +CONFIG_IR_GPIO_CIR=m +CONFIG_MEDIA_USB_SUPPORT=y + +# +# Webcam devices +# +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_GL860=m +CONFIG_USB_GSPCA_BENQ=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_JEILINJ=m +CONFIG_USB_GSPCA_JL2005BCD=m +CONFIG_USB_GSPCA_KINECT=m +CONFIG_USB_GSPCA_KONICA=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_MR97310A=m +CONFIG_USB_GSPCA_NW80X=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_OV534_9=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7302=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SE401=m +CONFIG_USB_GSPCA_SN9C2028=m +CONFIG_USB_GSPCA_SN9C20X=m +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SPCA1528=m +CONFIG_USB_GSPCA_SQ905=m +CONFIG_USB_GSPCA_SQ905C=m +CONFIG_USB_GSPCA_SQ930X=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_STV0680=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TOPRO=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_VICAM=m +CONFIG_USB_GSPCA_XIRLINK_CIT=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_USB_PWC=m +CONFIG_USB_PWC_DEBUG=y +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_VIDEO_CPIA2=m +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_USB_SN9C102=m + +# +# Analog TV USB devices +# +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +CONFIG_VIDEO_PVRUSB2_DVB=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_TLG2300=m +CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_STK1160=m +CONFIG_VIDEO_STK1160_AC97=y + +# +# Analog/digital TV USB devices +# +CONFIG_VIDEO_AU0828=m +CONFIG_VIDEO_AU0828_V4L2=y +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_RC=y +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_CX231XX_DVB=m +CONFIG_VIDEO_TM6000=m +CONFIG_VIDEO_TM6000_ALSA=m +CONFIG_VIDEO_TM6000_DVB=m + +# +# Digital TV USB devices +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +CONFIG_DVB_USB_A800=m +CONFIG_DVB_USB_DIBUSB_MB=m +CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +CONFIG_DVB_USB_UMT_010=m +CONFIG_DVB_USB_CXUSB=m +CONFIG_DVB_USB_M920X=m +CONFIG_DVB_USB_DIGITV=m +CONFIG_DVB_USB_VP7045=m +CONFIG_DVB_USB_VP702X=m +CONFIG_DVB_USB_GP8PSK=m +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_PCTV452E=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_FRIIO=m +CONFIG_DVB_USB_AZ6027=m +CONFIG_DVB_USB_TECHNISAT_USB2=m +CONFIG_DVB_USB_V2=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_AF9035=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_AZ6007=m +CONFIG_DVB_USB_CE6230=m +CONFIG_DVB_USB_EC168=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_IT913X=m +CONFIG_DVB_USB_LME2510=m +CONFIG_DVB_USB_MXL111SF=m +CONFIG_DVB_USB_RTL28XXU=m +CONFIG_DVB_USB_DVBSKY=m +CONFIG_SMS_USB_DRV=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set + +# +# Webcam, TV (analog/digital) USB devices +# +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_VIDEO_EM28XX_RC=m +CONFIG_V4L_PLATFORM_DRIVERS=y +# CONFIG_SOC_CAMERA is not set +# CONFIG_V4L_MEM2MEM_DRIVERS is not set +# CONFIG_V4L_TEST_DRIVERS is not set + +# +# Supported MMC/SDIO adapters +# +# CONFIG_SMS_SDIO_DRV is not set +# CONFIG_MEDIA_PARPORT_SUPPORT is not set +CONFIG_MEDIA_COMMON_OPTIONS=y + +# +# common driver options +# +CONFIG_VIDEO_CX2341X=m +CONFIG_VIDEO_TVEEPROM=m +CONFIG_CYPRESS_FIRMWARE=m +CONFIG_DVB_B2C2_FLEXCOP=m +CONFIG_SMS_SIANO_MDTV=m +CONFIG_SMS_SIANO_RC=y +# CONFIG_SMS_SIANO_DEBUGFS is not set + +# +# Media ancillary drivers (tuners, sensors, i2c, frontends) +# +CONFIG_MEDIA_SUBDRV_AUTOSELECT=y +CONFIG_MEDIA_ATTACH=y +CONFIG_VIDEO_IR_I2C=y + +# +# Audio decoders, processors and mixers +# +CONFIG_VIDEO_MSP3400=m +CONFIG_VIDEO_CS53L32A=m +CONFIG_VIDEO_WM8775=m + +# +# RDS decoders +# + +# +# Video decoders +# +CONFIG_VIDEO_SAA711X=m +CONFIG_VIDEO_TVP5150=m + +# +# Video and audio decoders +# +CONFIG_VIDEO_CX25840=m + +# +# Video encoders +# + +# +# Camera sensor devices +# +CONFIG_VIDEO_MT9V011=m + +# +# Flash devices +# + +# +# Video improvement chips +# + +# +# Miscelaneous helper chips +# + +# +# Sensors used on soc_camera driver +# +CONFIG_MEDIA_TUNER=y +CONFIG_MEDIA_TUNER_SIMPLE=y +CONFIG_MEDIA_TUNER_TDA8290=y +CONFIG_MEDIA_TUNER_TDA827X=y +CONFIG_MEDIA_TUNER_TDA18271=y +CONFIG_MEDIA_TUNER_TDA9887=y +CONFIG_MEDIA_TUNER_MT20XX=y +CONFIG_MEDIA_TUNER_MT2060=m +CONFIG_MEDIA_TUNER_MT2063=m +CONFIG_MEDIA_TUNER_MT2266=m +CONFIG_MEDIA_TUNER_QT1010=m +CONFIG_MEDIA_TUNER_XC2028=y +CONFIG_MEDIA_TUNER_XC5000=y +CONFIG_MEDIA_TUNER_XC4000=y +CONFIG_MEDIA_TUNER_MXL5005S=m +CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_MC44S803=y +CONFIG_MEDIA_TUNER_MAX2165=m +CONFIG_MEDIA_TUNER_TDA18218=m +CONFIG_MEDIA_TUNER_FC0011=m +CONFIG_MEDIA_TUNER_FC0012=m +CONFIG_MEDIA_TUNER_FC0013=m +CONFIG_MEDIA_TUNER_TDA18212=m +CONFIG_MEDIA_TUNER_E4000=m +CONFIG_MEDIA_TUNER_FC2580=m +CONFIG_MEDIA_TUNER_M88TS2022=m +CONFIG_MEDIA_TUNER_TUA9001=m +CONFIG_MEDIA_TUNER_SI2157=m +CONFIG_MEDIA_TUNER_IT913X=m +CONFIG_MEDIA_TUNER_R820T=m + +# +# Multistandard (satellite) frontends +# +CONFIG_DVB_STB0899=m +CONFIG_DVB_STB6100=m +CONFIG_DVB_STV090x=m +CONFIG_DVB_STV6110x=m +CONFIG_DVB_M88DS3103=m + +# +# Multistandard (cable + terrestrial) frontends +# +CONFIG_DVB_DRXK=m +CONFIG_DVB_TDA18271C2DD=m + +# +# DVB-S (satellite) frontends +# +CONFIG_DVB_CX24123=m +CONFIG_DVB_MT312=m +CONFIG_DVB_ZL10039=m +CONFIG_DVB_S5H1420=m +CONFIG_DVB_STV0288=m +CONFIG_DVB_STB6000=m +CONFIG_DVB_STV0299=m +CONFIG_DVB_STV6110=m +CONFIG_DVB_STV0900=m +CONFIG_DVB_TDA10086=m +CONFIG_DVB_TUNER_ITD1000=m +CONFIG_DVB_TUNER_CX24113=m +CONFIG_DVB_TDA826X=m +CONFIG_DVB_CX24116=m +CONFIG_DVB_SI21XX=m +CONFIG_DVB_TS2020=m +CONFIG_DVB_DS3000=m +CONFIG_DVB_TDA10071=m + +# +# DVB-T (terrestrial) frontends +# +CONFIG_DVB_CX22702=m +CONFIG_DVB_DRXD=m +CONFIG_DVB_TDA1004X=m +CONFIG_DVB_NXT6000=m +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +CONFIG_DVB_DIB3000MB=m +CONFIG_DVB_DIB3000MC=m +CONFIG_DVB_DIB7000M=m +CONFIG_DVB_DIB7000P=m +CONFIG_DVB_TDA10048=m +CONFIG_DVB_AF9013=m +CONFIG_DVB_EC100=m +CONFIG_DVB_CXD2820R=m +CONFIG_DVB_RTL2830=m +CONFIG_DVB_RTL2832=m +CONFIG_DVB_SI2168=m +# CONFIG_DVB_AS102_FE is not set + +# +# DVB-C (cable) frontends +# +CONFIG_DVB_TDA10023=m +CONFIG_DVB_STV0297=m + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +CONFIG_DVB_NXT200X=m +CONFIG_DVB_BCM3510=m +CONFIG_DVB_LGDT330X=m +CONFIG_DVB_LGDT3305=m +CONFIG_DVB_LG2160=m +CONFIG_DVB_S5H1409=m +CONFIG_DVB_AU8522=m +CONFIG_DVB_AU8522_DTV=m +CONFIG_DVB_AU8522_V4L=m +CONFIG_DVB_S5H1411=m + +# +# ISDB-T (terrestrial) frontends +# +CONFIG_DVB_S921=m +CONFIG_DVB_DIB8000=m +CONFIG_DVB_MB86A20S=m + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +CONFIG_DVB_TUNER_DIB0070=m +CONFIG_DVB_TUNER_DIB0090=m + +# +# SEC control devices for DVB-S +# +CONFIG_DVB_LNBP21=m +CONFIG_DVB_LNBP22=m +CONFIG_DVB_ISL6421=m +CONFIG_DVB_ISL6423=m +CONFIG_DVB_A8293=m +CONFIG_DVB_SP2=m +CONFIG_DVB_LGS8GXX=m +CONFIG_DVB_ATBM8830=m +CONFIG_DVB_IX2505V=m +CONFIG_DVB_IT913X_FE=m +CONFIG_DVB_M88RS2000=m +CONFIG_DVB_AF9033=m + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set + +# +# Graphics support +# +CONFIG_DRM=y +CONFIG_DRM_USB=m +CONFIG_DRM_KMS_HELPER=m +# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set + +# +# I2C encoder or helper chips +# +# CONFIG_DRM_I2C_CH7006 is not set +# CONFIG_DRM_I2C_SIL164 is not set +# CONFIG_DRM_I2C_NXP_TDA998X is not set +CONFIG_DRM_MALI=y +CONFIG_DRM_UDL=m +# CONFIG_DRM_TILCDC is not set +CONFIG_ION=y +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_HDMI=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +CONFIG_FB_SYS_FILLRECT=m +CONFIG_FB_SYS_COPYAREA=m +CONFIG_FB_SYS_IMAGEBLIT=m +# CONFIG_FB_FOREIGN_ENDIAN is not set +CONFIG_FB_SYS_FOPS=m +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +CONFIG_FB_BACKLIGHT=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_TMIO is not set +# CONFIG_FB_SMSCUFX is not set +CONFIG_FB_UDL=m +# CONFIG_FB_GOLDFISH is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_AUO_K190X is not set +# CONFIG_FB_SIMPLE is not set +# CONFIG_EXYNOS_VIDEO is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=m +# CONFIG_LCD_L4F00242T03 is not set +# CONFIG_LCD_LMS283GF05 is not set +# CONFIG_LCD_LTV350QV is not set +# CONFIG_LCD_ILI922X is not set +# CONFIG_LCD_ILI9320 is not set +# CONFIG_LCD_TDO24M is not set +# CONFIG_LCD_VGG2432A4 is not set +# CONFIG_LCD_PLATFORM is not set +# CONFIG_LCD_S6E63M0 is not set +# CONFIG_LCD_LD9040 is not set +# CONFIG_LCD_AMS369FG06 is not set +# CONFIG_LCD_LMS501KF03 is not set +# CONFIG_LCD_HX8357 is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_GENERIC=y +# CONFIG_BACKLIGHT_PWM is not set +# CONFIG_BACKLIGHT_ADP8860 is not set +# CONFIG_BACKLIGHT_ADP8870 is not set +# CONFIG_BACKLIGHT_LM3630 is not set +# CONFIG_BACKLIGHT_LM3639 is not set +# CONFIG_BACKLIGHT_LP855X is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +CONFIG_FONT_PEARL_8x8=y +CONFIG_FONT_ACORN_8x8=y +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_FB_SSD1307 is not set +CONFIG_FB_TFT=m +CONFIG_FB_TFT_ODROIDC32=m +CONFIG_FB_TFT_ST7565=m +CONFIG_FB_TFT_AGM1264K_FL=m +CONFIG_FB_TFT_BD663474=m +CONFIG_FB_TFT_HX8340BN=m +CONFIG_FB_TFT_HX8347D=m +CONFIG_FB_TFT_HX8353D=m +CONFIG_FB_TFT_ILI9320=m +CONFIG_FB_TFT_ILI9325=m +CONFIG_FB_TFT_ILI9340=m +CONFIG_FB_TFT_ILI9341=m +CONFIG_FB_TFT_ILI9481=m +CONFIG_FB_TFT_ILI9486=m +CONFIG_FB_TFT_PCD8544=m +CONFIG_FB_TFT_RA8875=m +CONFIG_FB_TFT_S6D02A1=m +CONFIG_FB_TFT_S6D1121=m +CONFIG_FB_TFT_SSD1289=m +CONFIG_FB_TFT_SSD1306=m +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +CONFIG_FB_TFT_ST7735R=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1701=m +CONFIG_FB_TFT_UPD161704=m +CONFIG_FB_TFT_WATTEROTT=m +CONFIG_FB_FLEX=m +CONFIG_FB_TFT_FBTFT_DEVICE=m +CONFIG_SOUND=y +CONFIG_SOUND_OSS_CORE=y +CONFIG_SOUND_OSS_CORE_PRECLAIM=y +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +CONFIG_SND_COMPRESS_OFFLOAD=y +CONFIG_SND_JACK=y +CONFIG_SND_SEQUENCER=m +# CONFIG_SND_SEQ_DUMMY is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +# CONFIG_SND_HRTIMER is not set +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_VMASTER=y +CONFIG_SND_RAWMIDI_SEQ=m +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +CONFIG_SND_AC97_CODEC=m +CONFIG_SND_DRIVERS=y +# CONFIG_SND_DUMMY is not set +CONFIG_SND_ALOOP=m +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_MTS64 is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_PORTMAN2X4 is not set +# CONFIG_SND_AC97_POWER_SAVE is not set +CONFIG_SND_ARM=y +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_UA101=m +CONFIG_SND_USB_CAIAQ=m +# CONFIG_SND_USB_CAIAQ_INPUT is not set +CONFIG_SND_USB_6FIRE=m +CONFIG_SND_SOC=y +# CONFIG_SND_ATMEL_SOC is not set +# CONFIG_SND_DESIGNWARE_I2S is not set +# CONFIG_SND_AML_M6_SOC is not set +CONFIG_SND_AML_M8_SOC=y +# CONFIG_SND_AML_M_DUMMY_CODEC is not set +CONFIG_SND_AML_M8=y +# CONFIG_SND_AML_M8_PCM is not set +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_AML_M8_CODEC=y +CONFIG_SND_SOC_DUMMY_CODEC=y +CONFIG_SND_SOC_PCM5102=y +# CONFIG_SND_SIMPLE_CARD is not set +# CONFIG_SOUND_PRIME is not set +CONFIG_AC97_BUS=m + +# +# HID support +# +CONFIG_HID=y +# CONFIG_HID_BATTERY_STRENGTH is not set +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_GENERIC=y + +# +# Special HID drivers +# +CONFIG_HID_A4TECH=m +CONFIG_HID_ACRUX=m +CONFIG_HID_ACRUX_FF=y +CONFIG_HID_APPLE=m +# CONFIG_HID_APPLEIR is not set +CONFIG_HID_AUREAL=m +CONFIG_HID_BELKIN=m +CONFIG_HID_CHERRY=m +CONFIG_HID_CHICONY=m +CONFIG_HID_PRODIKEYS=m +CONFIG_HID_CYPRESS=m +CONFIG_HID_DRAGONRISE=m +CONFIG_DRAGONRISE_FF=y +CONFIG_HID_EMS_FF=m +CONFIG_HID_ELECOM=m +CONFIG_HID_EZKEY=m +CONFIG_HID_HOLTEK=m +CONFIG_HOLTEK_FF=y +CONFIG_HID_KEYTOUCH=m +CONFIG_HID_KYE=m +CONFIG_HID_UCLOGIC=m +CONFIG_HID_WALTOP=m +CONFIG_HID_GYRATION=m +CONFIG_HID_ICADE=m +CONFIG_HID_TWINHAN=m +CONFIG_HID_KENSINGTON=m +CONFIG_HID_LCPOWER=m +CONFIG_HID_LENOVO_TPKBD=m +CONFIG_HID_LOGITECH=m +CONFIG_HID_LOGITECH_DJ=m +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWHEELS_FF=y +CONFIG_HID_MAGICMOUSE=m +CONFIG_HID_MICROSOFT=m +CONFIG_HID_MONTEREY=m +CONFIG_HID_MULTITOUCH=m +CONFIG_HID_NTRIG=m +CONFIG_HID_ORTEK=m +CONFIG_HID_PANTHERLORD=m +# CONFIG_PANTHERLORD_FF is not set +CONFIG_HID_PETALYNX=m +CONFIG_HID_PICOLCD=m +# CONFIG_HID_PICOLCD_FB is not set +# CONFIG_HID_PICOLCD_BACKLIGHT is not set +# CONFIG_HID_PICOLCD_LCD is not set +# CONFIG_HID_PICOLCD_LEDS is not set +# CONFIG_HID_PICOLCD_CIR is not set +CONFIG_HID_PRIMAX=m +CONFIG_HID_PS3REMOTE=m +CONFIG_HID_ROCCAT=m +CONFIG_HID_SAITEK=m +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m +CONFIG_HID_SPEEDLINK=m +CONFIG_HID_STEELSERIES=m +CONFIG_HID_SUNPLUS=m +CONFIG_HID_GREENASIA=m +CONFIG_GREENASIA_FF=y +CONFIG_HID_SMARTJOYPLUS=m +CONFIG_SMARTJOYPLUS_FF=y +CONFIG_HID_TIVO=m +CONFIG_HID_TOPSEED=m +CONFIG_HID_THINGM=m +CONFIG_HID_THRUSTMASTER=m +CONFIG_THRUSTMASTER_FF=y +CONFIG_HID_WACOM=m +CONFIG_HID_WIIMOTE=m +CONFIG_HID_WIIMOTE_EXT=y +CONFIG_HID_XINMO=m +CONFIG_HID_ZEROPLUS=m +CONFIG_ZEROPLUS_FF=y +CONFIG_HID_ZYDACRON=m +CONFIG_HID_SENSOR_HUB=m + +# +# USB HID support +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +CONFIG_USB_HIDDEV=y + +# +# I2C HID support +# +# CONFIG_I2C_HID is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_EHCI is not set +# CONFIG_USB_ARCH_HAS_XHCI is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEFAULT_PERSIST=y +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +CONFIG_USB_MON=m +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_MUSB_HDRC is not set +# CONFIG_USB_RENESAS_USBHS is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_WDM=m +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_REALTEK is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_STORAGE_ENE_UB6250 is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_DWC3 is not set +# CONFIG_USB_CHIPIDEA is not set + +# +# USB port drivers +# +# CONFIG_USB_USS720 is not set +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_SIMPLE=m +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_F81232=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_METRO=m +CONFIG_USB_SERIAL_MOS7720=m +# CONFIG_USB_SERIAL_MOS7715_PARPORT is not set +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QCAUX=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_WWAN=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_XSENS_MT=m +CONFIG_USB_SERIAL_WISHBONE=m +CONFIG_USB_SERIAL_ZTE=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_QT2=m +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +CONFIG_USB_EZUSB_FX2=m +# CONFIG_USB_HSIC_USB3503 is not set +# CONFIG_USB_PHY is not set +# CONFIG_USB_OTG_WAKELOCK is not set +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG is not set +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_GADGET_VBUS_DRAW=500 +CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 + +# +# USB Peripheral Controller +# +# CONFIG_USB_FUSB300 is not set +# CONFIG_USB_R8A66597 is not set +# CONFIG_USB_PXA27X is not set +# CONFIG_USB_MV_UDC is not set +# CONFIG_USB_MV_U3D is not set +CONFIG_USB_GADGET_DWC_OTG=y +CONFIG_USB_DWC_OTG=y +# CONFIG_USB_M66592 is not set +# CONFIG_USB_NET2272 is not set +# CONFIG_USB_DUMMY_HCD is not set +CONFIG_USB_LIBCOMPOSITE=m +CONFIG_USB_F_ACM=m +CONFIG_USB_F_SS_LB=m +CONFIG_USB_U_SERIAL=m +CONFIG_USB_F_SERIAL=m +CONFIG_USB_F_OBEX=m +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_GADGET_UAC1=y +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +# CONFIG_USB_ETH_EEM is not set +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_FUNCTIONFS=m +# CONFIG_USB_FUNCTIONFS_ETH is not set +# CONFIG_USB_FUNCTIONFS_RNDIS is not set +CONFIG_USB_FUNCTIONFS_GENERIC=y +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_USB_MIDI_GADGET=m +CONFIG_USB_G_PRINTER=m +CONFIG_USB_CDC_COMPOSITE=m +# CONFIG_USB_G_NOKIA is not set +CONFIG_USB_G_ACM_MS=m +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_MULTI_RNDIS=y +# CONFIG_USB_G_MULTI_CDC is not set +# CONFIG_USB_G_HID is not set +# CONFIG_USB_G_DBGP is not set +CONFIG_USB_G_WEBCAM=m +CONFIG_MMC=y +CONFIG_MMC_DEBUG=y +CONFIG_MMC_UNSAFE_RESUME=y +# CONFIG_MMC_CLKGATE is not set +# CONFIG_MMC_EMBEDDED_SDIO is not set +# CONFIG_MMC_PARANOID_SD_INIT is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=16 +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_EMMC_SECURE_STORAGE is not set +# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_SDHCI_PXAV3 is not set +# CONFIG_MMC_SDHCI_PXAV2 is not set +# CONFIG_MMC_DW is not set +CONFIG_MMC_VUB300=m +CONFIG_MMC_USHC=m +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +# CONFIG_LEDS_LM3530 is not set +# CONFIG_LEDS_LM3642 is not set +# CONFIG_LEDS_PCA9532 is not set +CONFIG_LEDS_GPIO=y +# CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_LP5521 is not set +# CONFIG_LEDS_LP5523 is not set +# CONFIG_LEDS_LP5562 is not set +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_PCA9633 is not set +# CONFIG_LEDS_DAC124S085 is not set +# CONFIG_LEDS_PWM is not set +# CONFIG_LEDS_REGULATOR is not set +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_LT3593 is not set +# CONFIG_LEDS_RENESAS_TPU is not set +# CONFIG_LEDS_TCA6507 is not set +# CONFIG_LEDS_LM355x is not set +# CONFIG_LEDS_OT200 is not set +# CONFIG_LEDS_BLINKM is not set + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=m +CONFIG_LEDS_TRIGGER_ONESHOT=m +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=m +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=m +CONFIG_LEDS_TRIGGER_DEFAULT_ON=m + +# +# iptables trigger is under Netfilter config (LED target) +# +CONFIG_LEDS_TRIGGER_TRANSIENT=m +# CONFIG_LEDS_TRIGGER_CAMERA is not set +CONFIG_SWITCH=y +# CONFIG_SWITCH_GPIO is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_SYSTOHC=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8523 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set +# CONFIG_RTC_DRV_EM3027 is not set +# CONFIG_RTC_DRV_RV3029C2 is not set + +# +# SPI RTC drivers +# +# CONFIG_RTC_DRV_M41T93 is not set +# CONFIG_RTC_DRV_M41T94 is not set +# CONFIG_RTC_DRV_DS1305 is not set +# CONFIG_RTC_DRV_DS1390 is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_R9701 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_DS3234 is not set +# CONFIG_RTC_DRV_PCF2123 is not set +# CONFIG_RTC_DRV_RX4581 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set +# CONFIG_RTC_DRV_DS2404 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_RTC_DRV_SNVS is not set + +# +# HID Sensor RTC drivers +# +# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +CONFIG_UIO=y +CONFIG_UIO_PDRV=y +CONFIG_UIO_PDRV_GENIRQ=y +# CONFIG_UIO_DMEM_GENIRQ is not set +# CONFIG_VIRT_DRIVERS is not set + +# +# Virtio drivers +# +# CONFIG_VIRTIO_MMIO is not set + +# +# Microsoft Hyper-V guest support +# +CONFIG_STAGING=y +CONFIG_USBIP_CORE=m +CONFIG_USBIP_VHCI_HCD=m +CONFIG_USBIP_HOST=m +# CONFIG_USBIP_DEBUG is not set +# CONFIG_ECHO is not set +# CONFIG_COMEDI is not set +# CONFIG_ASUS_OLED is not set +# CONFIG_PANEL is not set +CONFIG_R8712U=m +CONFIG_RTS5139=m +CONFIG_RTS5139_DEBUG=y +# CONFIG_TRANZPORT is not set +# CONFIG_LINE6_USB is not set +CONFIG_USB_SERIAL_QUATECH2=m +CONFIG_ZSMALLOC=y +CONFIG_ZRAM=m +CONFIG_ZRAM_DEBUG=y +CONFIG_USB_ENESTORAGE=m +# CONFIG_BCM_WIMAX is not set +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# +# CONFIG_SPEAKUP is not set +# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set +# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set +# CONFIG_STAGING_MEDIA is not set + +# +# Android +# +CONFIG_ANDROID=y +# CONFIG_ANDROID_BINDER_IPC is not set +# CONFIG_ASHMEM is not set +# CONFIG_ANDROID_LOGGER is not set +CONFIG_ANDROID_TIMED_OUTPUT=y +# CONFIG_ANDROID_TIMED_GPIO is not set +# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set +CONFIG_ANDROID_INTF_ALARM_DEV=y +CONFIG_SYNC=y +# CONFIG_SW_SYNC is not set +# CONFIG_USB_WPAN_HCD is not set +# CONFIG_WIMAX_GDM72XX is not set +# CONFIG_CED1401 is not set +# CONFIG_DGRP is not set +CONFIG_CLKDEV_LOOKUP=y + +# +# Hardware Spinlock drivers +# +# CONFIG_MAILBOX is not set +CONFIG_IOMMU_SUPPORT=y +CONFIG_OF_IOMMU=y + +# +# Remoteproc drivers +# +# CONFIG_STE_MODEM_RPROC is not set + +# +# Rpmsg drivers +# +# CONFIG_PM_DEVFREQ is not set +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set +CONFIG_PWM=y +CONFIG_IRQCHIP=y +CONFIG_ARM_GIC=y +# CONFIG_IPACK_BUS is not set +# CONFIG_RESET_CONTROLLER is not set +CONFIG_MALI400=y +CONFIG_MALI450=y +# CONFIG_MALI400_DEBUG is not set +# CONFIG_MALI400_PROFILING is not set +CONFIG_MALI400_UMP=y +CONFIG_MALI_DVFS=y +CONFIG_MALI_DMA_BUF_MAP_ON_ATTACH=y +CONFIG_MALI_SHARED_INTERRUPTS=y +# CONFIG_MALI_PMU_PARALLEL_POWER_UP is not set +# CONFIG_MALI_QUIET is not set +CONFIG_UMP=y +# CONFIG_UMP_DEBUG is not set +CONFIG_UMPLOCK=y + +# +# ODROID Specific Hardware +# +CONFIG_ODROID_TOUCHSCREEN_ADS7846=m +CONFIG_ODROID_AML_GPIO_LIB=m + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_EXT4_DEBUG=y +CONFIG_JBD2=y +# CONFIG_JBD2_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_PROC_INFO=y +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +CONFIG_BTRFS_FS=m +CONFIG_BTRFS_FS_POSIX_ACL=y +# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set +CONFIG_BTRFS_FS_RUN_SANITY_TESTS=y +# CONFIG_BTRFS_DEBUG is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_EXPORTFS=y +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +CONFIG_QUOTA=y +# CONFIG_QUOTA_NETLINK_INTERFACE is not set +CONFIG_PRINT_QUOTA_WARNING=y +# CONFIG_QUOTA_DEBUG is not set +CONFIG_QUOTA_TREE=y +# CONFIG_QFMT_V1 is not set +CONFIG_QFMT_V2=y +CONFIG_QUOTACTL=y +CONFIG_AUTOFS4_FS=m +CONFIG_FUSE_FS=m +# CONFIG_CUSE is not set +CONFIG_OVERLAYFS_FS=y +CONFIG_GENERIC_ACL=y + +# +# Caches +# +CONFIG_FSCACHE=m +# CONFIG_FSCACHE_STATS is not set +# CONFIG_FSCACHE_HISTOGRAM is not set +# CONFIG_FSCACHE_DEBUG is not set +# CONFIG_FSCACHE_OBJECT_LIST is not set +# CONFIG_CACHEFILES is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_RW=y + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TMPFS_XATTR=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_CONFIGFS_FS=y +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_LOGFS is not set +CONFIG_CRAMFS=y +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_ZLIB=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX6FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_PSTORE is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_F2FS_FS=m +CONFIG_F2FS_STAT_FS=y +CONFIG_F2FS_FS_XATTR=y +CONFIG_F2FS_FS_POSIX_ACL=y +CONFIG_AUFS_FS=y +CONFIG_AUFS_BRANCH_MAX_127=y +# CONFIG_AUFS_BRANCH_MAX_511 is not set +# CONFIG_AUFS_BRANCH_MAX_1023 is not set +# CONFIG_AUFS_BRANCH_MAX_32767 is not set +CONFIG_AUFS_SBILIST=y +# CONFIG_AUFS_HNOTIFY is not set +CONFIG_AUFS_EXPORT=y +# CONFIG_AUFS_XATTR is not set +# CONFIG_AUFS_FHSM is not set +# CONFIG_AUFS_RDU is not set +# CONFIG_AUFS_SHWH is not set +# CONFIG_AUFS_BR_RAMFS is not set +CONFIG_AUFS_BR_FUSE=y +CONFIG_AUFS_POLL=y +CONFIG_AUFS_BR_HFSPLUS=y +CONFIG_AUFS_BDEV_LOOP=y +# CONFIG_AUFS_DEBUG is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=m +CONFIG_NFS_V2=m +CONFIG_NFS_V3=m +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=m +# CONFIG_NFS_SWAP is not set +CONFIG_NFS_V4_1=y +CONFIG_PNFS_FILE_LAYOUT=m +CONFIG_PNFS_BLOCK=m +CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" +# CONFIG_NFS_FSCACHE is not set +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +# CONFIG_NFSD_FAULT_INJECTION is not set +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_SUNRPC_BACKCHANNEL=y +# CONFIG_SUNRPC_DEBUG is not set +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +CONFIG_CIFS_XATTR=y +# CONFIG_CIFS_POSIX is not set +# CONFIG_CIFS_ACL is not set +# CONFIG_CIFS_DEBUG is not set +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_CIFS_SMB2=y +# CONFIG_CIFS_FSCACHE is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m +CONFIG_NLS_UTF8=m +# CONFIG_DLM is not set + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +CONFIG_READABLE_ASM=y +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_SECTION_MISMATCH=y +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_LOCKUP_DETECTOR=y +CONFIG_HARDLOCKUP_DETECTOR_OTHER_CPU=y +CONFIG_HARDLOCKUP_DETECTOR=y +CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y +CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=1 +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1 +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1 +CONFIG_SCHED_DEBUG=y +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_DEBUG_ON is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +CONFIG_STACKTRACE=y +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_HIGHMEM is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_INFO_REDUCED is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +# CONFIG_BOOT_PRINTK_DELAY is not set + +# +# RCU Debugging +# +# CONFIG_PROVE_RCU_DELAY is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=21 +CONFIG_RCU_CPU_STALL_VERBOSE=y +# CONFIG_RCU_CPU_STALL_INFO is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_LKDTM is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACING_SUPPORT=y +CONFIG_FTRACE=y +# CONFIG_FUNCTION_TRACER is not set +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_PREEMPT_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_ENABLE_DEFAULT_TRACERS is not set +# CONFIG_FTRACE_SYSCALLS is not set +# CONFIG_TRACER_SNAPSHOT is not set +CONFIG_BRANCH_PROFILE_NONE=y +# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set +# CONFIG_PROFILE_ALL_BRANCHES is not set +# CONFIG_STACK_TRACER is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_PROBE_EVENTS is not set +# CONFIG_RBTREE_TEST is not set +# CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_ASYNC_RAID6_TEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_TEST_STRING_HELPERS is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_STRICT_DEVMEM is not set +CONFIG_ARM_UNWIND=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_RODATA is not set +# CONFIG_DEBUG_LL is not set +CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" +CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" +# CONFIG_PID_IN_CONTEXTIDR is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_ENCRYPTED_KEYS is not set +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +CONFIG_SECURITY=y +CONFIG_SECURITYFS=y +CONFIG_SECURITY_NETWORK=y +# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_PATH=y +CONFIG_LSM_MMAP_MIN_ADDR=32768 +CONFIG_SECURITY_SELINUX=y +# CONFIG_SECURITY_SELINUX_BOOTPARAM is not set +# CONFIG_SECURITY_SELINUX_DISABLE is not set +CONFIG_SECURITY_SELINUX_DEVELOP=y +CONFIG_SECURITY_SELINUX_AVC_STATS=y +CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 +# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set +# CONFIG_SECURITY_SMACK is not set +# CONFIG_SECURITY_TOMOYO is not set +CONFIG_SECURITY_APPARMOR=y +CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1 +# CONFIG_SECURITY_YAMA is not set +# CONFIG_IMA is not set +# CONFIG_EVM is not set +# CONFIG_DEFAULT_SECURITY_SELINUX is not set +CONFIG_DEFAULT_SECURITY_APPARMOR=y +# CONFIG_DEFAULT_SECURITY_DAC is not set +CONFIG_DEFAULT_SECURITY="apparmor" +CONFIG_XOR_BLOCKS=m +CONFIG_ASYNC_CORE=m +CONFIG_ASYNC_MEMCPY=m +CONFIG_ASYNC_XOR=m +CONFIG_ASYNC_PQ=m +CONFIG_ASYNC_RAID6_RECOV=m +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP=m +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_USER is not set +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +CONFIG_CRYPTO_GF128MUL=m +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +CONFIG_CRYPTO_AUTHENC=y +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=y +# CONFIG_CRYPTO_GCM is not set +CONFIG_CRYPTO_SEQIV=y + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTR=y +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_LRW=m +CONFIG_CRYPTO_PCBC=y +CONFIG_CRYPTO_XTS=m + +# +# Hash modes +# +# CONFIG_CRYPTO_CMAC is not set +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_CRC32 is not set +# CONFIG_CRYPTO_GHASH is not set +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_RMD128=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_RMD256=m +CONFIG_CRYPTO_RMD320=m +CONFIG_CRYPTO_SHA1=y +# CONFIG_CRYPTO_SHA1_ARM is not set +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_AES_ARM=m +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_BLOWFISH_COMMON=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST_COMMON=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_FCRYPT=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_SALSA20=m +CONFIG_CRYPTO_SEED=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_ZLIB=m +CONFIG_CRYPTO_LZO=m + +# +# Random Number Generation +# +CONFIG_CRYPTO_ANSI_CPRNG=m +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +CONFIG_CRYPTO_HW=y +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_RAID6_PQ=m +CONFIG_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_IO=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set +CONFIG_CRC7=y +CONFIG_LIBCRC32C=y +# CONFIG_CRC8 is not set +CONFIG_AUDIT_GENERIC=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_XZ_DEC=y +# CONFIG_XZ_DEC_X86 is not set +# CONFIG_XZ_DEC_POWERPC is not set +# CONFIG_XZ_DEC_IA64 is not set +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +# CONFIG_XZ_DEC_SPARC is not set +CONFIG_XZ_DEC_BCJ=y +# CONFIG_XZ_DEC_TEST is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_DECOMPRESS_XZ=y +CONFIG_DECOMPRESS_LZO=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_CPU_RMAP=y +CONFIG_DQL=y +CONFIG_NLATTR=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_LRU_CACHE=m +CONFIG_AVERAGE=y +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set +CONFIG_OID_REGISTRY=m +# CONFIG_VIRTUALIZATION is not set +CONFIG_BACKPORT_INTEGRATE=y +CONFIG_BACKPORT_DIR="backports" +CONFIG_BACKPORT_VERSION="backports-20150129-0-gdd4a670" +CONFIG_BACKPORT_KERNEL_VERSION="next-20150129-0-g828f79f" +CONFIG_BACKPORT_KERNEL_NAME="Linux" +CONFIG_BACKPORT_LINUX=y +CONFIG_BACKPORT_KERNEL_3_11=y +CONFIG_BACKPORT_KERNEL_3_12=y +CONFIG_BACKPORT_KERNEL_3_13=y +CONFIG_BACKPORT_KERNEL_3_14=y +CONFIG_BACKPORT_KERNEL_3_15=y +CONFIG_BACKPORT_KERNEL_3_16=y +CONFIG_BACKPORT_KERNEL_3_17=y +CONFIG_BACKPORT_KERNEL_3_18=y +CONFIG_BACKPORT_KERNEL_3_19=y +CONFIG_BACKPORT_KERNEL_3_20=y +CONFIG_BACKPORT_KERNEL_3_21=y +CONFIG_BACKPORT_KERNEL_3_22=y +CONFIG_BACKPORT_KERNEL_3_23=y +CONFIG_BACKPORT_KERNEL_3_24=y +CONFIG_BACKPORT_KERNEL_3_25=y +CONFIG_BACKPORT_KERNEL_3_26=y +CONFIG_BACKPORT_KERNEL_3_27=y +CONFIG_BACKPORT_KERNEL_3_28=y +CONFIG_BACKPORT_KERNEL_3_29=y +CONFIG_BACKPORT_KERNEL_3_30=y +CONFIG_BACKPORT_KERNEL_3_31=y +CONFIG_BACKPORT_KERNEL_3_32=y +CONFIG_BACKPORT_KERNEL_3_33=y +CONFIG_BACKPORT_KERNEL_3_34=y +CONFIG_BACKPORT_KERNEL_3_35=y +CONFIG_BACKPORT_KERNEL_3_36=y +CONFIG_BACKPORT_KERNEL_3_37=y +CONFIG_BACKPORT_KERNEL_3_38=y +CONFIG_BACKPORT_KERNEL_3_39=y +CONFIG_BACKPORT_KERNEL_3_40=y +CONFIG_BACKPORT_KERNEL_3_41=y +CONFIG_BACKPORT_KERNEL_3_42=y +CONFIG_BACKPORT_KERNEL_3_43=y +CONFIG_BACKPORT_KERNEL_3_44=y +CONFIG_BACKPORT_KERNEL_3_45=y +CONFIG_BACKPORT_KERNEL_3_46=y +CONFIG_BACKPORT_KERNEL_3_47=y +CONFIG_BACKPORT_KERNEL_3_48=y +CONFIG_BACKPORT_KERNEL_3_49=y +CONFIG_BACKPORT_KERNEL_3_50=y +CONFIG_BACKPORT_KERNEL_3_51=y +CONFIG_BACKPORT_KERNEL_3_52=y +CONFIG_BACKPORT_KERNEL_3_53=y +CONFIG_BACKPORT_KERNEL_3_54=y +CONFIG_BACKPORT_KERNEL_3_55=y +CONFIG_BACKPORT_KERNEL_3_56=y +CONFIG_BACKPORT_KERNEL_3_57=y +CONFIG_BACKPORT_KERNEL_3_58=y +CONFIG_BACKPORT_KERNEL_3_59=y +CONFIG_BACKPORT_KERNEL_3_60=y +CONFIG_BACKPORT_KERNEL_3_61=y +CONFIG_BACKPORT_KERNEL_3_62=y +CONFIG_BACKPORT_KERNEL_3_63=y +CONFIG_BACKPORT_KERNEL_3_64=y +CONFIG_BACKPORT_KERNEL_3_65=y +CONFIG_BACKPORT_KERNEL_3_66=y +CONFIG_BACKPORT_KERNEL_3_67=y +CONFIG_BACKPORT_KERNEL_3_68=y +CONFIG_BACKPORT_KERNEL_3_69=y +CONFIG_BACKPORT_KERNEL_3_70=y +CONFIG_BACKPORT_KERNEL_3_71=y +CONFIG_BACKPORT_KERNEL_3_72=y +CONFIG_BACKPORT_KERNEL_3_73=y +CONFIG_BACKPORT_KERNEL_3_74=y +CONFIG_BACKPORT_KERNEL_3_75=y +CONFIG_BACKPORT_KERNEL_3_76=y +CONFIG_BACKPORT_KERNEL_3_77=y +CONFIG_BACKPORT_KERNEL_3_78=y +CONFIG_BACKPORT_KERNEL_3_79=y +CONFIG_BACKPORT_KERNEL_3_80=y +CONFIG_BACKPORT_KERNEL_3_81=y +CONFIG_BACKPORT_KERNEL_3_82=y +CONFIG_BACKPORT_KERNEL_3_83=y +CONFIG_BACKPORT_KERNEL_3_84=y +CONFIG_BACKPORT_KERNEL_3_85=y +CONFIG_BACKPORT_KERNEL_3_86=y +CONFIG_BACKPORT_KERNEL_3_87=y +CONFIG_BACKPORT_KERNEL_3_88=y +CONFIG_BACKPORT_KERNEL_3_89=y +CONFIG_BACKPORT_KERNEL_3_90=y +CONFIG_BACKPORT_KERNEL_3_91=y +CONFIG_BACKPORT_KERNEL_3_92=y +CONFIG_BACKPORT_KERNEL_3_93=y +CONFIG_BACKPORT_KERNEL_3_94=y +CONFIG_BACKPORT_KERNEL_3_95=y +CONFIG_BACKPORT_KERNEL_3_96=y +CONFIG_BACKPORT_KERNEL_3_97=y +CONFIG_BACKPORT_KERNEL_3_98=y +CONFIG_BACKPORT_BPAUTO_BUILD_CORDIC=m +CONFIG_BACKPORT_BPAUTO_USERSEL_BUILD_ALL=y +# CONFIG_BACKPORT_BPAUTO_BUILD_CRYPTO_CCM is not set +CONFIG_BACKPORT_CFG80211=y +# CONFIG_BACKPORT_NL80211_TESTMODE is not set +# CONFIG_BACKPORT_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_BACKPORT_CFG80211_REG_DEBUG is not set +# CONFIG_BACKPORT_CFG80211_CERTIFICATION_ONUS is not set +# CONFIG_BACKPORT_CFG80211_DEFAULT_PS is not set +CONFIG_BACKPORT_CFG80211_DEBUGFS=y +# CONFIG_BACKPORT_CFG80211_INTERNAL_REGDB is not set +CONFIG_BACKPORT_CFG80211_WEXT=y +# CONFIG_BACKPORT_LIB80211 is not set +CONFIG_BACKPORT_MAC80211=y +CONFIG_BACKPORT_MAC80211_HAS_RC=y +CONFIG_BACKPORT_MAC80211_RC_MINSTREL=y +CONFIG_BACKPORT_MAC80211_RC_MINSTREL_HT=y +# CONFIG_BACKPORT_MAC80211_RC_MINSTREL_VHT is not set +CONFIG_BACKPORT_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_BACKPORT_MAC80211_RC_DEFAULT="minstrel_ht" +# CONFIG_BACKPORT_MAC80211_MESH is not set +CONFIG_BACKPORT_MAC80211_LEDS=y +# CONFIG_BACKPORT_MAC80211_DEBUGFS is not set +# CONFIG_BACKPORT_MAC80211_MESSAGE_TRACING is not set +# CONFIG_BACKPORT_MAC80211_DEBUG_MENU is not set +CONFIG_BACKPORT_WLAN=y +# CONFIG_BACKPORT_LIBERTAS_THINFIRM is not set +CONFIG_BACKPORT_AT76C50X_USB=m +CONFIG_BACKPORT_USB_NET_RNDIS_WLAN=m +CONFIG_BACKPORT_RTL8187=m +CONFIG_BACKPORT_MAC80211_HWSIM=m +CONFIG_BACKPORT_ATH_COMMON=m +CONFIG_BACKPORT_ATH_CARDS=m +# CONFIG_BACKPORT_ATH_DEBUG is not set +CONFIG_BACKPORT_ATH9K_HW=m +CONFIG_BACKPORT_ATH9K_COMMON=m +CONFIG_BACKPORT_ATH9K_BTCOEX_SUPPORT=y +CONFIG_BACKPORT_ATH9K=m +CONFIG_BACKPORT_ATH9K_AHB=y +# CONFIG_BACKPORT_ATH9K_DEBUGFS is not set +CONFIG_BACKPORT_ATH9K_DYNACK=y +# CONFIG_BACKPORT_ATH9K_WOW is not set +CONFIG_BACKPORT_ATH9K_RFKILL=y +# CONFIG_BACKPORT_ATH9K_CHANNEL_CONTEXT is not set +CONFIG_BACKPORT_ATH9K_PCOEM=y +CONFIG_BACKPORT_ATH9K_HTC=m +# CONFIG_BACKPORT_ATH9K_HTC_DEBUGFS is not set +CONFIG_BACKPORT_CARL9170=m +CONFIG_BACKPORT_CARL9170_LEDS=y +CONFIG_BACKPORT_CARL9170_WPC=y +CONFIG_BACKPORT_CARL9170_HWRNG=y +CONFIG_BACKPORT_ATH6KL=m +# CONFIG_BACKPORT_ATH6KL_SDIO is not set +CONFIG_BACKPORT_ATH6KL_USB=m +# CONFIG_BACKPORT_ATH6KL_DEBUG is not set +CONFIG_BACKPORT_AR5523=m +CONFIG_BACKPORT_ATH10K=m +# CONFIG_BACKPORT_ATH10K_DEBUG is not set +# CONFIG_BACKPORT_ATH10K_DEBUGFS is not set +CONFIG_BACKPORT_WCN36XX=m +# CONFIG_BACKPORT_WCN36XX_DEBUGFS is not set +# CONFIG_BACKPORT_BRCMFMAC is not set +# CONFIG_BACKPORT_LIBERTAS is not set +CONFIG_BACKPORT_P54_COMMON=m +CONFIG_BACKPORT_P54_USB=m +# CONFIG_BACKPORT_P54_SPI is not set +CONFIG_BACKPORT_RT2X00=m +CONFIG_BACKPORT_RT2500USB=m +CONFIG_BACKPORT_RT73USB=m +CONFIG_BACKPORT_RT2800USB=m +CONFIG_BACKPORT_RT2800USB_RT33XX=y +CONFIG_BACKPORT_RT2800USB_RT35XX=y +CONFIG_BACKPORT_RT2800USB_RT3573=y +CONFIG_BACKPORT_RT2800USB_RT53XX=y +CONFIG_BACKPORT_RT2800USB_RT55XX=y +CONFIG_BACKPORT_RT2800USB_UNKNOWN=y +CONFIG_BACKPORT_RT2800_LIB=m +CONFIG_BACKPORT_RT2X00_LIB_USB=m +CONFIG_BACKPORT_RT2X00_LIB=m +CONFIG_BACKPORT_RT2X00_LIB_FIRMWARE=y +CONFIG_BACKPORT_RT2X00_LIB_CRYPTO=y +CONFIG_BACKPORT_RT2X00_LIB_LEDS=y +# CONFIG_BACKPORT_RT2X00_DEBUG is not set +CONFIG_BACKPORT_RTL_CARDS=m +# CONFIG_BACKPORT_RTL8192CU is not set +CONFIG_BACKPORT_RTL8192C_COMMON=m +CONFIG_BACKPORT_WL_TI=y +# CONFIG_BACKPORT_WL1251 is not set +# CONFIG_BACKPORT_WL12XX is not set +# CONFIG_BACKPORT_WL18XX is not set +CONFIG_BACKPORT_ZD1211RW=m +# CONFIG_BACKPORT_ZD1211RW_DEBUG is not set +CONFIG_BACKPORT_MWIFIEX=m +# CONFIG_BACKPORT_MWIFIEX_SDIO is not set +CONFIG_BACKPORT_MWIFIEX_USB=m +CONFIG_BACKPORT_RSI_91X=m +# CONFIG_BACKPORT_RSI_DEBUGFS is not set +# CONFIG_BACKPORT_RSI_SDIO is not set +CONFIG_BACKPORT_RSI_USB=m +CONFIG_BACKPORT_USB_NET_DRIVERS=y +CONFIG_BACKPORT_USB_USBNET=m +CONFIG_BACKPORT_USB_NET_CDCETHER=m +CONFIG_BACKPORT_USB_NET_CDC_NCM=m +CONFIG_BACKPORT_USB_NET_CDC_MBIM=m +CONFIG_BACKPORT_USB_NET_RNDIS_HOST=m +CONFIG_BACKPORT_USB_NET_QMI_WWAN=m +CONFIG_BACKPORT_USB_SIERRA_NET=m +# CONFIG_BACKPORT_NFC is not set +# CONFIG_BACKPORT_IEEE802154 is not set + +# +# USB Device Class drivers +# +CONFIG_BACKPORT_USB_WDM=m +CONFIG_RTL8192CU=m +CONFIG_RTL8812AU=m +CONFIG_RTL8188EU=m +CONFIG_RTL8192DU=m diff --git a/board/odroidc1/mkimage.sh b/board/odroidc1/mkimage.sh new file mode 100755 index 0000000000..3c8d0af446 --- /dev/null +++ b/board/odroidc1/mkimage.sh @@ -0,0 +1,16 @@ +#!/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.bin +export UBOOT_SEEK=64 +BL1=$IMG_DIR/bl1.bin.hardkernel + +source $COMMON_DIR/mkimage.sh + +dd conv=notrunc if=$BL1 of=$DISK_IMG bs=1 count=442 +dd conv=notrunc if=$BL1 of=$DISK_IMG bs=512 skip=1 seek=1 + diff --git a/board/odroidc1/overlay/etc/board b/board/odroidc1/overlay/etc/board new file mode 100644 index 0000000000..fbd2d4eecc --- /dev/null +++ b/board/odroidc1/overlay/etc/board @@ -0,0 +1 @@ +odroidc1 diff --git a/board/odroidc1/overlay/etc/init.d/boardsn b/board/odroidc1/overlay/etc/init.d/boardsn new file mode 100755 index 0000000000..34ca56a576 --- /dev/null +++ b/board/odroidc1/overlay/etc/init.d/boardsn @@ -0,0 +1,5 @@ +#!/bin/bash + +sn=$(cat /sys/class/net/eth0/address 2>/dev/null | tr -d ':') +echo ${sn: -8} + diff --git a/board/odroidc1/overlay/etc/os.conf b/board/odroidc1/overlay/etc/os.conf new file mode 100644 index 0000000000..e12b10ec7d --- /dev/null +++ b/board/odroidc1/overlay/etc/os.conf @@ -0,0 +1,11 @@ +os_debug="false" +os_prereleases="false" +os_tty_login="ttyS0" +os_eth="eth0" +os_wlan="wlan0" +os_ppp="ppp0" +os_networkless="false" +os_firmware_method="github" +os_firmware_repo="ccrisan/thingos" +os_firmware_username="" +os_firmware_password="" diff --git a/board/odroidc1/postscript.sh b/board/odroidc1/postscript.sh new file mode 100755 index 0000000000..b963a45140 --- /dev/null +++ b/board/odroidc1/postscript.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# boot directory +mkdir -p $BOOT_DIR + +cp $IMG_DIR/uImage $BOOT_DIR +cp $IMG_DIR/meson8b_odroidc.dtb $BOOT_DIR +cp $BOARD_DIR/bl1.bin.hardkernel $IMG_DIR +cp $BOARD_DIR/u-boot.bin $IMG_DIR +cp $BOARD_DIR/boot.ini $BOOT_DIR + +# disable software updating +sed -i 's/enable_update true/enable_update false/' $TARGET/etc/motioneye.conf + +# fix some lib dirs +if ! [ -L $TARGET/lib/arm-linux-gnueabihf ]; then + mv $TARGET/lib/arm-linux-gnueabihf/* $TARGET/lib + rmdir $TARGET/lib/arm-linux-gnueabihf + ln -s /lib $TARGET/lib/arm-linux-gnueabihf +fi + +if ! [ -L $TARGET/usr/lib/arm-linux-gnueabihf ]; then + ln -s /usr/lib $TARGET/usr/lib/arm-linux-gnueabihf +fi + diff --git a/board/odroidc1/u-boot.bin b/board/odroidc1/u-boot.bin new file mode 100644 index 0000000000..387111bde5 Binary files /dev/null and b/board/odroidc1/u-boot.bin differ diff --git a/board/odroidc2/bl1.bin.hardkernel b/board/odroidc2/bl1.bin.hardkernel new file mode 100644 index 0000000000..571fc4677b Binary files /dev/null and b/board/odroidc2/bl1.bin.hardkernel differ diff --git a/board/odroidc2/boot.ini b/board/odroidc2/boot.ini new file mode 100644 index 0000000000..a324b296ff --- /dev/null +++ b/board/odroidc2/boot.ini @@ -0,0 +1,108 @@ +ODROIDC2-UBOOT-CONFIG + +# Possible screen resolutions +# Uncomment only a single Line! The line with setenv written. +# At least one mode must be selected. + +# 480 Lines (720x480) +# setenv m "480i60hz" # Interlaced 60Hz +# setenv m "480i_rpt" # Interlaced for Rear Projection Televisions 60Hz +# setenv m "480p60hz" # 480 Progressive 60Hz +# setenv m "480p_rpt" # 480 Progressive for Rear Projection Televisions 60Hz + +# 576 Lines (720x576) +# setenv m "576i50hz" # Interlaced 50Hz +# setenv m "576i_rpt" # Interlaced for Rear Projection Televisions 50Hz +# setenv m "576p50hz" # Progressive 50Hz +# setenv m "576p_rpt" # Progressive for Rear Projection Televisions 50Hz + +# 720 Lines (1280x720) +# setenv m "720p50hz" # 50Hz +# setenv m "720p60hz" # 60Hz + +# 1080 Lines (1920x1080) +# setenv m "1080i60hz" # Interlaced 60Hz +#setenv m "1080p60hz" # Progressive 60Hz +# setenv m "1080i50hz" # Interlaced 50Hz +# setenv m "1080p50hz" # Progressive 50Hz +# setenv m "1080p24hz" # Progressive 24Hz + +# 4K (3840x2160) +# setenv m "2160p30hz" # Progressive 30Hz +# setenv m "2160p25hz" # Progressive 25Hz +# setenv m "2160p24hz" # Progressive 24Hz +# setenv m "smpte24hz" # Progressive 24Hz SMPTE +# setenv m "2160p50hz" # Progressive 50Hz +# setenv m "2160p60hz" # Progressive 60Hz +# setenv m "2160p50hz420" # Progressive 50Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it) +# setenv m "2160p60hz420" # Progressive 60Hz with YCbCr 4:2:0 (Requires TV/Monitor that supports it) + +### VESA modes ### +# setenv m "640x480p60hz" +# setenv m "800x480p60hz" +# setenv m "800x600p60hz" +# setenv m "1024x600p60hz" + setenv m "1024x768p60hz" +# setenv m "1280x800p60hz" +# setenv m "1280x1024p60hz" +# setenv m "1360x768p60hz" +# setenv m "1440x900p60hz" +# setenv m "1600x900p60hz" +# setenv m "1680x1050p60hz" +# setenv m "1600x1200p60hz" +# setenv m "1920x1200p60hz" +# setenv m "2560x1080p60hz" +# setenv m "2560x1440p60hz" +# setenv m "2560x1600p60hz" +# setenv m "3440x1440p60hz" + +# HDMI BPP Mode +setenv m_bpp "32" +# setenv m_bpp "24" +# setenv m_bpp "16" + +# HDMI DVI/VGA modes +# Uncomment only a single Line! The line with setenv written. +# At least one mode must be selected. +# setenv vout "dvi" +# setenv vout "vga" + +# HDMI HotPlug Detection control +# Allows you to force HDMI thinking that the cable is connected. +# true = HDMI will believe that cable is always connected +# false = will let board/monitor negotiate the connection status +setenv hpd "true" +# setenv hpd "false" + +# Meson Timer +# 1 - Meson Timer +# 0 - Arch Timer +# Using meson_timer improves the video playback whoever it breaks KVM (virtualization). +# Using arch timer allows KVM/Virtualization to work however you'll experience poor video +setenv mesontimer "1" + +# Server Mode (aka. No Graphics) +# Setting nographics to 1 will disable all video subsystem +# This mode is ideal of server type usage. (Saves ~300Mb of RAM) +setenv nographics "0" + +########################################### + +# Boot Arguments +setenv bootargs "console=ttyS0,115200n8 root=/dev/mmcblk0p2 rootwait ro no_console_suspend panic=10 quiet loglevel=1 ipv6.disable=1 hdmimode=${m} m_bpp=${m_bpp} vout=${vout} net.ifnames=0 elevator=noop disablehpd=${hpd}" + +# Booting + +fatload mmc 0:1 0x11000000 Image +fatload mmc 0:1 0x1000000 meson64_odroidc2.dtb +fdt addr 0x1000000 + +if test "${mesontimer}" = "0"; then fdt rm /meson_timer; fdt rm /cpus/cpu@0/timer; fdt rm /cpus/cpu@1/timer; fdt rm /cpus/cpu@2/timer; fdt rm /cpus/cpu@3/timer; fi +if test "${mesontimer}" = "1"; then fdt rm /timer; fi + +if test "${nographics}" = "1"; then fdt rm /reserved-memory; fdt rm /aocec; fi +if test "${nographics}" = "1"; then fdt rm /meson-fb; fdt rm /amhdmitx; fdt rm /picdec; fdt rm /ppmgr; fi +if test "${nographics}" = "1"; then fdt rm /meson-vout; fdt rm /mesonstream; fdt rm /meson-fb; fi +if test "${nographics}" = "1"; then fdt rm /deinterlace; fdt rm /codec_mm; fi + +booti 0x11000000 - 0x1000000 diff --git a/board/odroidc2/kernel.config b/board/odroidc2/kernel.config new file mode 100644 index 0000000000..67fc7df643 --- /dev/null +++ b/board/odroidc2/kernel.config @@ -0,0 +1,4625 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 3.10.80 Kernel Configuration +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_FIQ=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_NEED_MACH_MEMORY_H=y +CONFIG_GENERIC_BUG=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y + +# +# General setup +# +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_XZ is not set +CONFIG_KERNEL_LZO=y +CONFIG_DEFAULT_HOSTNAME="(none)" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_FHANDLE=y +CONFIG_AUDIT=y +# CONFIG_AUDIT_LOGINUID_IMMUTABLE is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_IRQ_DOMAIN=y +# CONFIG_IRQ_DOMAIN_DEBUG is not set +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_ARCH_HAS_TICK_BROADCAST=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# Timers subsystem +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ_COMMON=y +# CONFIG_HZ_PERIODIC is not set +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_IRQ_TIME_ACCOUNTING is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y + +# +# RCU Subsystem +# +CONFIG_TREE_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y +CONFIG_RCU_STALL_COMMON=y +# CONFIG_RCU_USER_QS is not set +CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_RCU_FAST_NO_HZ is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_RCU_BOOST is not set +# CONFIG_RCU_NOCB_CPU is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=19 +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CPUSETS=y +CONFIG_PROC_PID_CPUSET=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_MEMCG=y +CONFIG_MEMCG_SWAP=y +CONFIG_MEMCG_SWAP_ENABLED=y +# CONFIG_MEMCG_KMEM is not set +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_BLK_CGROUP=y +# CONFIG_DEBUG_BLK_CGROUP is not set +# CONFIG_CHECKPOINT_RESTORE is not set +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_UIDGID_CONVERTED=y +CONFIG_UIDGID_STRICT_TYPE_CHECKS=y +# CONFIG_SCHED_AUTOGROUP is not set +CONFIG_MM_OWNER=y +# CONFIG_SYSFS_DEPRECATED is not set +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_RD_XZ=y +CONFIG_RD_LZO=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_HAVE_UID16=y +CONFIG_HOTPLUG=y +CONFIG_PANIC_TIMEOUT=0 +CONFIG_EXPERT=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLUB_DEBUG=y +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +# CONFIG_JUMP_LABEL is not set +# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_HAVE_CONTEXT_TRACKING=y +CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_OLD_SIGACTION=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_MODULE_SIG is not set +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +CONFIG_BLK_DEV_BSGLIB=y +# CONFIG_BLK_DEV_INTEGRITY is not set +# CONFIG_BLK_DEV_THROTTLING is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +# CONFIG_LDM_DEBUG is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_CFQ_GROUP_IOSCHED is not set +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_FREEZER=y + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_MULTIPLATFORM is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_PXA is not set +CONFIG_PLAT_MESON=y +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C24XX is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP1 is not set + +# +# Amlogic Meson platform +# +# CONFIG_ARCH_MESON6 is not set +# CONFIG_ARCH_MESON6TV is not set +# CONFIG_ARCH_MESON6TVD is not set +# CONFIG_ARCH_MESON8 is not set +CONFIG_ARCH_MESON8B=y +# CONFIG_ARCH_MESON8M2 is not set +# CONFIG_ARCH_MESONG9TV is not set + +# +# Meson development boards +# +# CONFIG_MACH_MESON8B_COMMON_BOARD is not set +CONFIG_MACH_MESON8B_ODROIDC=y +# CONFIG_MESON_IRQ is not set +CONFIG_MESON_ARM_GIC=y +CONFIG_MESON_CLOCK_TICK_RATE=24000000 +# CONFIG_MESON_ARM_GIC_FIQ is not set +CONFIG_MESON_SUSPEND=y +# CONFIG_SUSPEND_WATCHDOG is not set +# CONFIG_MESON_SUSPEND_TEST is not set +# CONFIG_SCREEN_ON_EARLY is not set +# CONFIG_CLK81_DFS is not set +CONFIG_MESON_LEGACY_REGISTER_API=y +# CONFIG_MESON_CPU_EMULATOR is not set +CONFIG_CLKTREE_DEBUG=y +# CONFIG_MESON_CPU_TEMP_SENSOR is not set +CONFIG_MESON_SUSPEND_FIRMWARE_BASE=0x04f00000 +# CONFIG_MESON_TRUSTZONE is not set +# CONFIG_MESON_CUSTOM_BOARD_SUPPORT is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_KEYBOARD_GPIO_POLLED is not set +# CONFIG_PLAT_SPEAR is not set + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +# CONFIG_ARM_LPAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARM_THUMB=y +# CONFIG_ARM_THUMBEE is not set +CONFIG_ARM_VIRT_EXT=y +CONFIG_SWP_EMULATE=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_KUSER_HELPERS=y +CONFIG_OUTER_CACHE=y +CONFIG_OUTER_CACHE_SYNC=y +CONFIG_MIGHT_HAVE_CACHE_L2X0=y +CONFIG_CACHE_L2X0=y +CONFIG_CACHE_PL310=y +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_NR_BANKS=8 +CONFIG_MULTI_IRQ_HANDLER=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_742230 is not set +# CONFIG_ARM_ERRATA_742231 is not set +# CONFIG_PL310_ERRATA_588369 is not set +# CONFIG_ARM_ERRATA_643719 is not set +# CONFIG_ARM_ERRATA_720789 is not set +# CONFIG_PL310_ERRATA_727915 is not set +# CONFIG_ARM_ERRATA_743622 is not set +# CONFIG_ARM_ERRATA_751472 is not set +# CONFIG_PL310_ERRATA_753970 is not set +CONFIG_ARM_ERRATA_754322=y +# CONFIG_ARM_ERRATA_754327 is not set +CONFIG_ARM_ERRATA_764369=y +# CONFIG_PL310_ERRATA_769419 is not set +# CONFIG_ARM_ERRATA_775420 is not set +# CONFIG_ARM_ERRATA_798181 is not set +# CONFIG_FIQ_DEBUGGER is not set + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_HAVE_SMP=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_ARM_CPU_TOPOLOGY=y +# CONFIG_SCHED_MC is not set +# CONFIG_SCHED_SMT is not set +CONFIG_HAVE_ARM_SCU=y +# CONFIG_HAVE_ARM_ARCH_TIMER is not set +# CONFIG_MCPM is not set +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_NR_CPUS=4 +CONFIG_HOTPLUG_CPU=y +# CONFIG_ARM_PSCI is not set +CONFIG_LOCAL_TIMERS=y +CONFIG_ARCH_NR_GPIO=0 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_HZ=100 +CONFIG_SCHED_HRTICK=y +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +CONFIG_OABI_COMPAT=y +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HAVE_ARCH_PFN_VALID=y +CONFIG_HIGHMEM=y +# CONFIG_HIGHPTE is not set +CONFIG_HW_PERF_EVENTS=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_MEMORY_ISOLATION=y +# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_COMPACTION=y +CONFIG_MIGRATION=y +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_BOUNCE=y +CONFIG_KSM=y +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CROSS_MEMORY_ATTACH=y +# CONFIG_CLEANCACHE is not set +# CONFIG_FRONTSWAP is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_SECCOMP is not set +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_XEN is not set +# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set + +# +# Boot options +# +CONFIG_USE_OF=y +CONFIG_ATAGS=y +# CONFIG_DEPRECATED_PARAM_STRUCT is not set +# CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE is not set +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +# CONFIG_ARM_APPENDED_DTB is not set +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set +# CONFIG_CRASH_DUMP is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_HOTPLUG=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y + +# +# ARM CPU frequency scaling drivers +# +# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set +# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set +# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set +# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set +CONFIG_AMLOGIC_MESON_CPUFREQ=y +CONFIG_FIX_SYSPLL=y +# CONFIG_CPU_IDLE is not set +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +# CONFIG_FPE_NWFPE is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y +CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y +CONFIG_BINFMT_SCRIPT=y +# CONFIG_HAVE_AOUT is not set +CONFIG_BINFMT_MISC=y +CONFIG_COREDUMP=y + +# +# Power management options +# +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_HAS_WAKELOCK=y +CONFIG_HAS_EARLYSUSPEND=y +CONFIG_WAKELOCK=y +CONFIG_WAKELOCK_STAT=y +CONFIG_USER_WAKELOCK=y +CONFIG_EARLYSUSPEND=y +# CONFIG_NO_USER_SPACE_SCREEN_ACCESS_CONTROL is not set +# CONFIG_CONSOLE_EARLYSUSPEND is not set +CONFIG_FB_EARLYSUSPEND=y +CONFIG_PM_SLEEP=y +CONFIG_PM_SLEEP_SMP=y +# CONFIG_PM_AUTOSLEEP is not set +# CONFIG_PM_WAKELOCKS is not set +CONFIG_PM_RUNTIME=y +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +# CONFIG_APM_EMULATION is not set +CONFIG_PM_CLK=y +CONFIG_CPU_PM=y +# CONFIG_SUSPEND_TIME is not set +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARM_CPU_SUSPEND=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_PACKET_DIAG=y +CONFIG_UNIX=y +CONFIG_UNIX_DIAG=y +CONFIG_XFRM=y +CONFIG_XFRM_ALGO=y +CONFIG_XFRM_USER=m +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +CONFIG_NET_KEY=y +# CONFIG_NET_KEY_MIGRATE is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +# CONFIG_IP_FIB_TRIE_STATS is not set +CONFIG_IP_MULTIPLE_TABLES=y +# CONFIG_IP_ROUTE_MULTIPATH is not set +# CONFIG_IP_ROUTE_VERBOSE is not set +CONFIG_IP_ROUTE_CLASSID=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_NET_IP_TUNNEL is not set +# CONFIG_IP_MROUTE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_NET_IPVTI is not set +# CONFIG_INET_AH is not set +CONFIG_INET_ESP=y +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_INET_UDP_DIAG is not set +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=m +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_VEGAS=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_YEAH=m +CONFIG_TCP_CONG_ILLINOIS=m +CONFIG_DEFAULT_RENO=y +CONFIG_DEFAULT_TCP_CONG="reno" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_NETLABEL is not set +# CONFIG_ANDROID_PARANOID_NETWORK is not set +CONFIG_NET_ACTIVITY_STATS=y +CONFIG_NETWORK_SECMARK=y +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y +CONFIG_BRIDGE_NETFILTER=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_ACCT=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_MARK=y +CONFIG_NF_CONNTRACK_SECMARK=y +CONFIG_NF_CONNTRACK_ZONES=y +CONFIG_NF_CONNTRACK_PROCFS=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CONNTRACK_TIMEOUT=y +CONFIG_NF_CONNTRACK_TIMESTAMP=y +CONFIG_NF_CONNTRACK_LABELS=y +CONFIG_NF_CT_PROTO_DCCP=m +CONFIG_NF_CT_PROTO_GRE=m +CONFIG_NF_CT_PROTO_SCTP=m +CONFIG_NF_CT_PROTO_UDPLITE=m +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_BROADCAST=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NF_CT_NETLINK_TIMEOUT=m +CONFIG_NF_CT_NETLINK_HELPER=m +CONFIG_NETFILTER_NETLINK_QUEUE_CT=y +CONFIG_NF_NAT=m +CONFIG_NF_NAT_NEEDED=y +CONFIG_NF_NAT_PROTO_DCCP=m +CONFIG_NF_NAT_PROTO_UDPLITE=m +CONFIG_NF_NAT_PROTO_SCTP=m +CONFIG_NF_NAT_AMANDA=m +CONFIG_NF_NAT_FTP=m +CONFIG_NF_NAT_IRC=m +CONFIG_NF_NAT_SIP=m +CONFIG_NF_NAT_TFTP=m +CONFIG_NETFILTER_TPROXY=m +CONFIG_NETFILTER_XTABLES=y + +# +# Xtables combined modules +# +CONFIG_NETFILTER_XT_MARK=y +CONFIG_NETFILTER_XT_CONNMARK=m +CONFIG_NETFILTER_XT_SET=m + +# +# Xtables targets +# +CONFIG_NETFILTER_XT_TARGET_AUDIT=m +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m +CONFIG_NETFILTER_XT_TARGET_CT=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HL=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_LOG=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NETMAP=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_RATEEST=m +CONFIG_NETFILTER_XT_TARGET_REDIRECT=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m +CONFIG_NETFILTER_XT_TARGET_TRACE=m +CONFIG_NETFILTER_XT_TARGET_SECMARK=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m + +# +# Xtables matches +# +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_CPU=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ECN=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_HL=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +# CONFIG_NETFILTER_XT_MATCH_QUOTA2 is not set +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_MAX=256 +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m +CONFIG_IP_VS=m +CONFIG_IP_VS_DEBUG=y +CONFIG_IP_VS_TAB_BITS=12 + +# +# IPVS transport protocol load balancing support +# +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_AH_ESP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +CONFIG_IP_VS_PROTO_SCTP=y + +# +# IPVS scheduler +# +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m + +# +# IPVS SH scheduler +# +CONFIG_IP_VS_SH_TAB_BITS=8 + +# +# IPVS application helper +# +CONFIG_IP_VS_FTP=m +CONFIG_IP_VS_NFCT=y +CONFIG_IP_VS_PE_SIP=m + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=m +CONFIG_NF_CONNTRACK_IPV4=m +CONFIG_NF_CONNTRACK_PROC_COMPAT=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_REJECT_SKERR=y +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_NF_NAT_IPV4=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_NF_NAT_SNMP_BASIC=m +CONFIG_NF_NAT_PROTO_GRE=m +CONFIG_NF_NAT_PPTP=m +CONFIG_NF_NAT_H323=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_SECURITY=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m +CONFIG_BRIDGE_NF_EBTABLES=m +CONFIG_BRIDGE_EBT_BROUTE=m +CONFIG_BRIDGE_EBT_T_FILTER=m +CONFIG_BRIDGE_EBT_T_NAT=m +CONFIG_BRIDGE_EBT_802_3=m +CONFIG_BRIDGE_EBT_AMONG=m +CONFIG_BRIDGE_EBT_ARP=m +CONFIG_BRIDGE_EBT_IP=m +CONFIG_BRIDGE_EBT_LIMIT=m +CONFIG_BRIDGE_EBT_MARK=m +CONFIG_BRIDGE_EBT_PKTTYPE=m +CONFIG_BRIDGE_EBT_STP=m +CONFIG_BRIDGE_EBT_VLAN=m +CONFIG_BRIDGE_EBT_ARPREPLY=m +CONFIG_BRIDGE_EBT_DNAT=m +CONFIG_BRIDGE_EBT_MARK_T=m +CONFIG_BRIDGE_EBT_REDIRECT=m +CONFIG_BRIDGE_EBT_SNAT=m +CONFIG_BRIDGE_EBT_LOG=m +CONFIG_BRIDGE_EBT_ULOG=m +CONFIG_BRIDGE_EBT_NFLOG=m +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +CONFIG_L2TP=m +CONFIG_L2TP_DEBUGFS=m +CONFIG_L2TP_V3=y +CONFIG_L2TP_IP=m +CONFIG_L2TP_ETH=m +CONFIG_STP=y +CONFIG_GARP=m +CONFIG_MRP=m +CONFIG_BRIDGE=y +# CONFIG_BRIDGE_IGMP_SNOOPING is not set +# CONFIG_BRIDGE_VLAN_FILTERING is not set +CONFIG_HAVE_NET_DSA=y +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +CONFIG_VLAN_8021Q_MVRP=y +# CONFIG_DECNET is not set +CONFIG_LLC=y +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +CONFIG_PHONET=y +# CONFIG_IEEE802154 is not set +CONFIG_NET_SCHED=y + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFB=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_MQPRIO=m +CONFIG_NET_SCH_CHOKE=m +CONFIG_NET_SCH_QFQ=m +CONFIG_NET_SCH_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_PLUG=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_FLOW=m +CONFIG_NET_CLS_CGROUP=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_STACK=32 +# CONFIG_NET_EMATCH_CMP is not set +# CONFIG_NET_EMATCH_NBYTE is not set +CONFIG_NET_EMATCH_U32=y +# CONFIG_NET_EMATCH_META is not set +# CONFIG_NET_EMATCH_TEXT is not set +# CONFIG_NET_EMATCH_CANID is not set +# CONFIG_NET_EMATCH_IPSET is not set +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=y +CONFIG_NET_ACT_GACT=y +# CONFIG_GACT_PROB is not set +CONFIG_NET_ACT_MIRRED=y +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_NAT=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_ACT_SKBEDIT=m +CONFIG_NET_ACT_CSUM=m +# CONFIG_NET_CLS_IND is not set +CONFIG_NET_SCH_FIFO=y +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=m +# CONFIG_BATMAN_ADV is not set +# CONFIG_OPENVSWITCH is not set +# CONFIG_VSOCKETS is not set +# CONFIG_NETLINK_MMAP is not set +# CONFIG_NETLINK_DIAG is not set +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +# CONFIG_NETPRIO_CGROUP is not set +CONFIG_BQL=y +# CONFIG_BPF_JIT is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +CONFIG_CAN=m +CONFIG_CAN_RAW=m +CONFIG_CAN_BCM=m +CONFIG_CAN_GW=m + +# +# CAN Device Drivers +# +CONFIG_CAN_VCAN=m +# CONFIG_CAN_SLCAN is not set +CONFIG_CAN_DEV=m +CONFIG_CAN_CALC_BITTIMING=y +# CONFIG_CAN_LEDS is not set +# CONFIG_CAN_AT91 is not set +CONFIG_CAN_MCP251X=m +# CONFIG_CAN_GRCAN is not set +# CONFIG_CAN_SJA1000 is not set +# CONFIG_CAN_C_CAN is not set +# CONFIG_CAN_CC770 is not set + +# +# CAN USB interfaces +# +# CONFIG_CAN_EMS_USB is not set +# CONFIG_CAN_ESD_USB2 is not set +# CONFIG_CAN_KVASER_USB is not set +# CONFIG_CAN_PEAK_USB is not set +# CONFIG_CAN_8DEV_USB is not set +# CONFIG_CAN_SOFTING is not set +# CONFIG_CAN_DEBUG_DEVICES is not set +# CONFIG_IRDA is not set +CONFIG_BT=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=y +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=y + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_ATH3K=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIVHCI=m +CONFIG_BT_MRVL=m +# CONFIG_BT_MRVL_SDIO is not set +CONFIG_BT_ATH3K=m +# CONFIG_AF_RXRPC is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +# CONFIG_CFG80211 is not set +# CONFIG_LIB80211 is not set + +# +# CFG80211 needs to be enabled for MAC80211 +# +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +CONFIG_RFKILL_PM=y +CONFIG_RFKILL_LEDS=y +# CONFIG_RFKILL_INPUT is not set +# CONFIG_RFKILL_REGULATOR is not set +# CONFIG_RFKILL_GPIO is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set +# CONFIG_NFC is not set +CONFIG_HAVE_BPF_JIT=y + +# +# Device Drivers +# + +# +# Amlogic Device Drivers +# + +# +# Char devices +# +# CONFIG_EARLY_INIT is not set + +# +# Register Debug Support +# +# CONFIG_AML_REG_DEBUG is not set +CONFIG_AM_UART=y +CONFIG_AM_UART_CONSOLE=y +CONFIG_OF_LM=y +CONFIG_AML_RTC=y + +# +# I2C Hardware Bus support +# +CONFIG_I2C_AML=m +# CONFIG_I2C_SW_AML is not set +# CONFIG_BCM2079X_I2C is not set +CONFIG_AM_INPUT=y +CONFIG_SARADC_AM=y +# CONFIG_MESON_INPUT_REMOTE is not set +CONFIG_MESON_NEW_INPUT_REMOTE=y +CONFIG_NEW_AM_REMOTE=y +CONFIG_NEW_AM_IR_TX=y +# CONFIG_MESON_INPUT_KEYBOARD is not set +CONFIG_MESON_INPUT_TOUCHSCREEN=y +# CONFIG_ADC_TOUCHSCREEN_AM is not set +# CONFIG_ITK_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_PIXCIR_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_PIXCIR_NEW_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_SINTEK_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_EETI_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_SIS92XX_CAPACITIVE_TOUCHSCREEN is not set +CONFIG_FOCALTECH_CAPACITIVE_TOUCHSCREEN=y +# CONFIG_SITRONIX_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_HX8520_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_RAYDIUM_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_GOODIX_CAPACITIVE_TOUCHSCREEN is not set +CONFIG_GOODIX_GT81XX_CAPACITIVE_TOUCHSCREEN=y +# CONFIG_GOODIX_GT82X_CAPACITIVE_TOUCHSCREEN is not set +# CONFIG_UOR7X5X_RESISTIVE_TOUCHSCREEN is not set +# CONFIG_UOR6X5X_RESISTIVE_TOUCHSCREEN is not set +# CONFIG_GSLX680_CAPACITIVE_TOUCHSCREEN is not set +CONFIG_GSLX680_COMPATIBLE_CAPACITIVE_TOUCHSCREEN=y +# CONFIG_GSLX680B_CAPACITIVE_TOUCHSCREEN is not set +CONFIG_GOODIX_GT9XX_CAPACITIVE_TOUCHSCREEN=y +# CONFIG_FT5X02_CAPACITIVE_TOUCHSCREEN is not set +CONFIG_NOVATEK_CAPACITIVE_TOUCHSCREEN=y + +# +# Ct36x Touch device support +# +CONFIG_TOUCHSCREEN_CT36X=y +CONFIG_TOUCHSCREEN_CT36X_PLATFORM_AMLCHIP=y +# CONFIG_TOUCHSCREEN_CT36X_PLATFORM_GENERIC is not set +# CONFIG_TOUCHSCREEN_CT36X_PLATFORM_ROCKCHIP is not set +# CONFIG_TOUCHSCREEN_CT36X_PLATFORM_ALLWINNER is not set +# CONFIG_TOUCHSCREEN_CT36X_CHIP_CT360 is not set +CONFIG_TOUCHSCREEN_CT36X_CHIP_CT365=y +CONFIG_TOUCHSCREEN_CT36X_MISC=y +# CONFIG_TOUCHSCREEN_CT36X_MISC_X_REVERSE is not set +# CONFIG_TOUCHSCREEN_CT36X_MISC_Y_REVERSE is not set +# CONFIG_TOUCHSCREEN_CT36X_MISC_XY_SWAP is not set +CONFIG_TOUCHSCREEN_CT36X_MISC_NEW_TPS=y +# CONFIG_SIMCARD_DETECT_AM is not set +# CONFIG_AML_HOLD_KEY is not set +# CONFIG_AML_CALL_KEY is not set +CONFIG_SENSOR_DEVICES=y +CONFIG_GRAVITY_BMA250=y +CONFIG_GRAVITY_BMA222=y +CONFIG_GRAVITY_MMA7660=y +CONFIG_GRAVITY_MIR3DA=y +CONFIG_GRAVITY_LIS3DH=y +CONFIG_GRAVITY_MMA8452=y +CONFIG_GRAVITY_MC32X0=y +CONFIG_GRAVITY_DMARD06=y +CONFIG_GRAVITY_MMA865X=y +CONFIG_GRAVITY_LSM303D=y +CONFIG_GRAVITY_DMARD10=y +CONFIG_GRAVITY_KXTJ9=y +CONFIG_GRAVITY_STK8313=y +CONFIG_GRAVITY_STK8312=y +CONFIG_GRAVITY_MM3A310=y +CONFIG_GRAVITY_MXC622X=y +CONFIG_GRAVITY_MXC6255XC=y +# CONFIG_GYROSCOPE_L3GD20 is not set +CONFIG_LIGHT_CM36283=y +CONFIG_LIGHT_CM3232=y +CONFIG_LIGHT_CM3217=y +CONFIG_LIGHT_LTR501=y +CONFIG_LIGHT_EPL6814=y +CONFIG_LIGHT_ISL29023=y +CONFIG_LIGHT_STK220X=y +CONFIG_LIGHT_LTR558=y +# CONFIG_AML_GPIO_KEY is not set +CONFIG_GPIO_AMLOGIC=y +CONFIG_PINCTRL_AMLOGIC=y + +# +# Power Management Support +# +# CONFIG_AMLOGIC_BOARD_HAS_PMU is not set +# CONFIG_AML_PMU_ALGORITHM_SUPPORT is not set +# CONFIG_AML_DVFS is not set +# CONFIG_MESON_CS_DCDC_REGULATOR is not set + +# +# Security key Support +# +# CONFIG_SECURITYKEY is not set + +# +# key management Support +# +# CONFIG_UNIFY_KEY_MANAGE is not set + +# +# EFUSE Support +# +CONFIG_EFUSE=y +# CONFIG_EFUSE_WRITE_VERSION_PERMIT is not set +CONFIG_EFUSE_LAYOUT_VERSION=3 + +# +# Smartcard support +# +# CONFIG_AM_SMARTCARD is not set +CONFIG_AML_VIRTUAL_THERMAL=y +CONFIG_AMLOGIC_THERMAL=y +CONFIG_AML_WDT=y + +# +# AMLOGIC SPI Hardware bus support +# +CONFIG_AMLOGIC_SPICC_MASTER=m +# CONFIG_AMLOGIC_SPICC_MASTER_DEBUG is not set +CONFIG_MESON_PWM=m +CONFIG_MESON_PWM_CTRL=m + +# +# USB Support +# +CONFIG_AMLOGIC_USB=y +CONFIG_USB_DWC_OTG_HCD=y +CONFIG_USB_HOST_ELECT_TEST=y + +# +# MMC/SD/SDIO Host Controller Drivers +# + +# +# Multimedia Card support +# +CONFIG_MMC_AML=y +# CONFIG_MMC_AML_DEBUG is not set +# CONFIG_AML_MMC_DEBUG_FORCE_SINGLE_BLOCK_RW is not set + +# +# SPI NOR Flash support +# +# CONFIG_AMLOGIC_SPI_NOR is not set + +# +# Network devices +# + +# +# Ethernet Support +# +CONFIG_AM_ETHERNET=y +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +CONFIG_AML_PHY=y +# CONFIG_AML_LAN8720 is not set +# CONFIG_AML_IP101_PHY is not set +# CONFIG_AML_KSZ8091 is not set +CONFIG_AML_RTL8211F=y +CONFIG_AM_ETHERNET_DEBUG_LEVEL=1 +CONFIG_AM_WIFI=y +# CONFIG_AM_WIFI_SD_MMC is not set +# CONFIG_DHD_USE_STATIC_BUF is not set +CONFIG_AM_WIFI_USB=y + +# +# Bluetooth Device Support +# +CONFIG_BT_DEVICE=y +CONFIG_BT_WAKE_CTRL=y +# CONFIG_BT_RTKBTUSB is not set +# CONFIG_MESON_NFC is not set + +# +# Audio devices +# + +# +# Audio Interface +# +CONFIG_AMAUDIO=y + +# +# Amlogic Audio Interface V2 +# +# CONFIG_AMAUDIO2 is not set + +# +# Audio dsp process +# +CONFIG_AML_AUDIO_DSP=y + +# +# Video devices +# +CONFIG_AML_VFM=y +CONFIG_AM_PTSSERVER=y +# CONFIG_H264_4K2K_SINGLE_CORE is not set +CONFIG_VSYNC_RDMA=y +CONFIG_AM_VIDEO=y +# CONFIG_AM_VIDEO2 is not set +# CONFIG_KEEP_FRAME_RESERVED is not set +# CONFIG_SUPPORT_VIDEO_ON_VPP2 is not set +CONFIG_GE2D_KEEP_FRAME=y + +# +# Video Decoders +# +CONFIG_AM_VDEC_MPEG12=y +CONFIG_AM_VDEC_MPEG4=y +CONFIG_AM_VDEC_VC1=y +CONFIG_AM_VDEC_H264=y +# CONFIG_AM_VDEC_H264MVC is not set +CONFIG_AM_VDEC_H265=y +CONFIG_AM_VDEC_MJPEG=y +CONFIG_AM_ENCODER=y +CONFIG_AM_JPEG_ENCODER=y +CONFIG_AM_PIC_DEC=y +CONFIG_AM_VDEC_REAL=y +CONFIG_AM_VDEC_AVS=y +CONFIG_AM_JPEGDEC=y +CONFIG_AM_TIMESYNC=y +CONFIG_AM_STREAMING=y +CONFIG_AM_SUBTITLE=y +CONFIG_AM_VIDEOCAPTURE=y + +# +# Canvas management driver +# +CONFIG_AM_CANVAS=y +CONFIG_AM_DISPLAY_MODULE=y + +# +# Amlogic video output module +# +CONFIG_AM_TV_OUTPUT=y +CONFIG_AML_VOUT_FRAMERATE_AUTOMATION=y +# CONFIG_AM_LCD_OUTPUT is not set + +# +# Amlogic video output2 module +# +# CONFIG_AM_TV_OUTPUT2 is not set + +# +# Amlogic TV LCD Support +# +# CONFIG_AML_TV_LCD is not set + +# +# Amlogic osd module +# +CONFIG_FB_AM=y +CONFIG_FB_OSD2_ENABLE=y +CONFIG_FB_OSD2_CURSOR=y +CONFIG_FB_OSD2_DEFAULT_BITS_PER_PIXEL=32 +CONFIG_FB_OSD2_DEFAULT_WIDTH=32 +CONFIG_FB_OSD2_DEFAULT_HEIGHT=32 +CONFIG_FB_OSD2_DEFAULT_WIDTH_VIRTUAL=32 +CONFIG_FB_OSD2_DEFAULT_HEIGHT_VIRTUAL=32 +CONFIG_FB_OSD1_DEFAULT_BITS_PER_PIXEL=16 +CONFIG_FB_OSD1_DEFAULT_WIDTH=720 +CONFIG_FB_OSD1_DEFAULT_HEIGHT=480 +CONFIG_FB_OSD1_DEFAULT_WIDTH_VIRTUAL=720 +CONFIG_FB_OSD1_DEFAULT_HEIGHT_VIRTUAL=480 +CONFIG_FB_AMLOGIC_UMP=y + +# +# Amlogic osd_ext module +# + +# +# Amlogic Backlight Support +# +# CONFIG_AMLOGIC_BACKLIGHT is not set +# CONFIG_AML_BL_PWM_ATTR is not set +# CONFIG_AML_LOCAL_DIMMING is not set +# CONFIG_IW7023_BACKLIGHT is not set +# CONFIG_IW7023_USE_EEPROM is not set +CONFIG_AM_GE2D=y +CONFIG_AM_LOGO=y +CONFIG_AM_HDMI_ONLY=y + +# +# HDMI TX Support +# +CONFIG_AML_HDMI_TX=y +# CONFIG_AML_HDMI_TX_HDCP is not set +# CONFIG_AML_HDMI_TX_CTS_DVI is not set +CONFIG_TVIN=y +CONFIG_TVIN_VDIN=y +# CONFIG_TVIN_AFE is not set +# CONFIG_TVIN_HDMI is not set +CONFIG_TVIN_BT656=y +CONFIG_TVIN_CSI=y +CONFIG_VIUIN=y +# CONFIG_GAMMA_AUTO_TUNE is not set +# CONFIG_AM_HDMI_REPEATER is not set +# CONFIG_TVIN_IT660X is not set +# CONFIG_TVIN_ISP is not set +# CONFIG_TVIN_VDIN_CTRL is not set +# CONFIG_AML_EXT_HDMIIN is not set +# CONFIG_DEBUG_DRIVER is not set + +# +# Post Process Manager driver +# +CONFIG_POST_PROCESS_MANAGER=y +CONFIG_POST_PROCESS_MANAGER_PPSCALER=y +# CONFIG_POST_PROCESS_MANAGER_3D_PROCESS is not set + +# +# Amlogic Camera Support +# +# CONFIG_VIDEO_AMLOGIC_CAPTURE is not set + +# +# V4L2 Video Support +# +# CONFIG_V4L_AMLOGIC_VIDEO is not set +# CONFIG_V4L_AMLOGIC_VIDEO2 is not set + +# +# Amlogic ion video support +# +# CONFIG_VIDEOBUF2_ION is not set +# CONFIG_AMLOGIC_IONVIDEO is not set + +# +# Deinterlace driver +# +CONFIG_DEINTERLACE=y +# CONFIG_AM_DEINTERLACE_SD_ONLY is not set + +# +# MIPI Support +# +# CONFIG_AMLOGIC_MIPI is not set +# CONFIG_D2D3_PROCESS is not set + +# +# Amlogic VE & CM +# +# CONFIG_AM_VECM is not set + +# +# Amlogic DVB driver +# +# CONFIG_AM_DVB is not set + +# +# AMLOGIC CI Driver +# +# CONFIG_AM_PCMCIA is not set +# CONFIG_AM_IOBUS is not set + +# +# Amlogic Crypto Support +# +CONFIG_CRYPTO_AML_HW_CRYPRO=y +CONFIG_CRYPTO_DEVICE_DRIVER=y + +# +# MHL Support +# +# CONFIG_PANEL_IT6681 is not set + +# +# Amlogic PMU battery algorithm Support +# + +# +# Amlogic touch algorithm Support +# +# CONFIG_AML_TOUCH_ALGORITHM_SUPPORT is not set + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_FW_LOADER_USER_HELPER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_GENERIC_CPU_DEVICES is not set +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_SPI=y +CONFIG_DMA_SHARED_BUFFER=y +CONFIG_CMA=y +# CONFIG_CMA_DEBUG is not set + +# +# Default contiguous memory area size: +# +CONFIG_CMA_SIZE_MBYTES=8 +CONFIG_CMA_SIZE_SEL_MBYTES=y +# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set +# CONFIG_CMA_SIZE_SEL_MIN is not set +# CONFIG_CMA_SIZE_SEL_MAX is not set +CONFIG_CMA_ALIGNMENT=8 +CONFIG_CMA_AREAS=7 + +# +# Bus devices +# +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_TESTS is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set +CONFIG_MTD_OF_PARTS=y +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set +# CONFIG_MTD_SWAP is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set +# CONFIG_MTD_SST25L is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOCG3 is not set +CONFIG_MTD_NAND_IDS=y +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_ECC_BCH is not set +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_DENALI is not set +# CONFIG_MTD_NAND_GPIO is not set +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_DOCG4 is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +# CONFIG_MTD_UBI is not set +CONFIG_DTC=y +CONFIG_OF=y + +# +# Device Tree and Open Firmware support +# +CONFIG_PROC_DEVICETREE=y +CONFIG_OF_SELFTEST=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_IRQ=y +CONFIG_OF_DEVICE=y +CONFIG_OF_I2C=y +CONFIG_OF_NET=y +CONFIG_OF_MDIO=y +CONFIG_OF_MTD=y +CONFIG_PARPORT=m +# CONFIG_PARPORT_PC is not set +# CONFIG_PARPORT_GSC is not set +# CONFIG_PARPORT_AX88796 is not set +# CONFIG_PARPORT_1284 is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +CONFIG_BLK_DEV_DRBD=m +# CONFIG_DRBD_FAULT_INJECTION is not set +CONFIG_BLK_DEV_NBD=m +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set + +# +# Misc devices +# +# CONFIG_SENSORS_LIS3LV02D is not set +# CONFIG_AD525X_DPOT is not set +# CONFIG_ATMEL_PWM is not set +# CONFIG_DUMMY_IRQ is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ATMEL_SSC is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_TI_DAC7512 is not set +# CONFIG_UID_STAT is not set +CONFIG_BMP085=y +CONFIG_BMP085_I2C=m +# CONFIG_BMP085_SPI is not set +CONFIG_SI1132=m +CONFIG_SI702X=m +# CONFIG_USB_SWITCH_FSA9480 is not set +# CONFIG_LATTICE_ECP3_CONFIG is not set +# CONFIG_SRAM is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +CONFIG_EEPROM_93CX6=m +# CONFIG_EEPROM_93XX46 is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +# CONFIG_SENSORS_LIS3_SPI is not set +# CONFIG_SENSORS_LIS3_I2C is not set + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +CONFIG_SCSI_ISCSI_ATTRS=m +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m +# CONFIG_SCSI_UFSHCD is not set +# CONFIG_LIBFC is not set +# CONFIG_LIBFCOE is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +CONFIG_MD=y +CONFIG_BLK_DEV_MD=y +CONFIG_MD_AUTODETECT=y +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +CONFIG_MD_RAID456=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m +# CONFIG_BCACHE is not set +CONFIG_BLK_DEV_DM_BUILTIN=y +CONFIG_BLK_DEV_DM=y +CONFIG_DM_DEBUG=y +CONFIG_DM_BUFIO=m +CONFIG_DM_BIO_PRISON=m +CONFIG_DM_PERSISTENT_DATA=m +CONFIG_DM_CRYPT=y +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +# CONFIG_DM_DEBUG_BLOCK_STACK_TRACING is not set +CONFIG_DM_CACHE=m +CONFIG_DM_CACHE_MQ=m +CONFIG_DM_CACHE_CLEANER=m +CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m +# CONFIG_DM_LOG_USERSPACE is not set +# CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set +# CONFIG_DM_DELAY is not set +CONFIG_DM_UEVENT=y +# CONFIG_DM_FLAKEY is not set +# CONFIG_DM_VERITY is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +CONFIG_NET_CORE=y +CONFIG_BONDING=m +# CONFIG_DUMMY is not set +# CONFIG_EQUALIZER is not set +CONFIG_MII=y +# CONFIG_IFB is not set +# CONFIG_NET_TEAM is not set +CONFIG_MACVLAN=m +CONFIG_MACVTAP=m +# CONFIG_VXLAN is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_TUN=y +CONFIG_VETH=m + +# +# CAIF transport drivers +# + +# +# Distributed Switch Architecture drivers +# +# CONFIG_NET_DSA_MV88E6XXX is not set +# CONFIG_NET_DSA_MV88E6060 is not set +# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set +# CONFIG_NET_DSA_MV88E6131 is not set +# CONFIG_NET_DSA_MV88E6123_61_65 is not set +CONFIG_ETHERNET=y +CONFIG_NET_CADENCE=y +# CONFIG_ARM_AT91_ETHER is not set +# CONFIG_MACB is not set +CONFIG_NET_VENDOR_BROADCOM=y +# CONFIG_B44 is not set +# CONFIG_NET_CALXEDA_XGMAC is not set +CONFIG_NET_VENDOR_CIRRUS=y +# CONFIG_CS89x0 is not set +# CONFIG_DM9000 is not set +# CONFIG_DNET is not set +CONFIG_NET_VENDOR_FARADAY=y +# CONFIG_FTMAC100 is not set +# CONFIG_FTGMAC100 is not set +CONFIG_NET_VENDOR_INTEL=y +CONFIG_NET_VENDOR_I825XX=y +CONFIG_NET_VENDOR_MARVELL=y +# CONFIG_MVMDIO is not set +CONFIG_NET_VENDOR_MICREL=y +# CONFIG_KS8851 is not set +# CONFIG_KS8851_MLL is not set +CONFIG_NET_VENDOR_MICROCHIP=y +# CONFIG_ENC28J60 is not set +CONFIG_NET_VENDOR_NATSEMI=y +CONFIG_NET_VENDOR_8390=y +# CONFIG_AX88796 is not set +# CONFIG_ETHOC is not set +CONFIG_NET_VENDOR_SEEQ=y +CONFIG_NET_VENDOR_SMSC=y +# CONFIG_SMC91X is not set +# CONFIG_SMC911X is not set +# CONFIG_SMSC911X is not set +CONFIG_NET_VENDOR_STMICRO=y +# CONFIG_STMMAC_ETH is not set +CONFIG_NET_VENDOR_WIZNET=y +# CONFIG_WIZNET_W5100 is not set +# CONFIG_WIZNET_W5300 is not set + +# +# MII PHY device drivers +# +# CONFIG_AT803X_PHY is not set +# CONFIG_AMD_PHY is not set +# CONFIG_MARVELL_PHY is not set +# CONFIG_AMLOGIC_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_BCM87XX_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_MICREL_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +# CONFIG_MDIO_BUS_MUX_GPIO is not set +# CONFIG_MDIO_BUS_MUX_MMIOREG is not set +# CONFIG_MICREL_KS8995MA is not set +# CONFIG_PLIP is not set +CONFIG_PPP=y +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=m +CONFIG_PPPOL2TP=m +CONFIG_PPPOLAC=m +CONFIG_PPPOPNS=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +# CONFIG_SLIP is not set +CONFIG_SLHC=y + +# +# USB Network Adapters +# +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=m +CONFIG_USB_USBNET=m +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_AX88179_178A=m +CONFIG_USB_NET_CDCETHER=m +# CONFIG_USB_NET_CDC_EEM is not set +CONFIG_USB_NET_CDC_NCM=m +# CONFIG_USB_NET_CDC_MBIM is not set +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=m +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_CDC_SUBSET=m +# CONFIG_USB_ALI_M5632 is not set +# CONFIG_USB_AN2720 is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_EPSON2888 is not set +# CONFIG_USB_KC2190 is not set +CONFIG_USB_NET_ZAURUS=m +CONFIG_USB_NET_CX82310_ETH=m +CONFIG_USB_NET_KALMIA=m +CONFIG_USB_NET_QMI_WWAN=m +CONFIG_USB_HSO=m +# CONFIG_USB_NET_INT51X1 is not set +CONFIG_USB_CDC_PHONET=m +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +# CONFIG_USB_VL600 is not set +# CONFIG_WLAN is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# +# CONFIG_WAN is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=m +CONFIG_INPUT_POLLDEV=y +# CONFIG_INPUT_SPARSEKMAP is not set +# CONFIG_INPUT_MATRIXKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=m +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set +# CONFIG_INPUT_KEYRESET is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ADP5588 is not set +# CONFIG_KEYBOARD_ADP5589 is not set +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_QT1070 is not set +# CONFIG_KEYBOARD_QT2160 is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_GPIO is not set +# CONFIG_KEYBOARD_TCA6416 is not set +# CONFIG_KEYBOARD_TCA8418 is not set +# CONFIG_KEYBOARD_MATRIX is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_LM8333 is not set +# CONFIG_KEYBOARD_MAX7359 is not set +# CONFIG_KEYBOARD_MCS is not set +# CONFIG_KEYBOARD_MPR121 is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_SAMSUNG is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_CYPRESS=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_ELANTECH is not set +# CONFIG_MOUSE_PS2_SENTELIC is not set +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_BCM5974 is not set +# CONFIG_MOUSE_CYAPA is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_MOUSE_GPIO is not set +# CONFIG_MOUSE_SYNAPTICS_I2C is not set +# CONFIG_MOUSE_SYNAPTICS_USB is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_DB9 is not set +CONFIG_JOYSTICK_GAMECON=m +# CONFIG_JOYSTICK_TURBOGRAFX is not set +# CONFIG_JOYSTICK_AS5011 is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +# CONFIG_JOYSTICK_WALKERA0701 is not set +CONFIG_INPUT_TABLET=y +CONFIG_TABLET_USB_ACECAD=m +CONFIG_TABLET_USB_AIPTEK=m +CONFIG_TABLET_USB_GTCO=m +CONFIG_TABLET_USB_HANWANG=m +CONFIG_TABLET_USB_KBTAB=m +CONFIG_TABLET_USB_WACOM=m +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_AD7877 is not set +# CONFIG_TOUCHSCREEN_AD7879 is not set +# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set +# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set +# CONFIG_TOUCHSCREEN_BU21013 is not set +# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set +# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set +# CONFIG_TOUCHSCREEN_DYNAPRO is not set +# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set +# CONFIG_TOUCHSCREEN_EETI is not set +# CONFIG_TOUCHSCREEN_EGALAX is not set +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# CONFIG_TOUCHSCREEN_ILI210X is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set +# CONFIG_TOUCHSCREEN_WACOM_I2C is not set +# CONFIG_TOUCHSCREEN_MAX11801 is not set +# CONFIG_TOUCHSCREEN_MCS5000 is not set +# CONFIG_TOUCHSCREEN_MMS114 is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_INEXIO is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_PIXCIR is not set +# CONFIG_TOUCHSCREEN_WM97XX is not set +# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set +# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set +# CONFIG_TOUCHSCREEN_TSC_SERIO is not set +# CONFIG_TOUCHSCREEN_TSC2005 is not set +# CONFIG_TOUCHSCREEN_TSC2007 is not set +# CONFIG_TOUCHSCREEN_W90X900 is not set +# CONFIG_TOUCHSCREEN_ST1232 is not set +# CONFIG_TOUCHSCREEN_TPS6507X is not set +CONFIG_TOUCHSCREEN_DWAV_USB_MT=m +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_BMA150 is not set +# CONFIG_INPUT_MMA8450 is not set +# CONFIG_INPUT_MPU3050 is not set +# CONFIG_INPUT_GP2A is not set +# CONFIG_INPUT_GPIO_TILT_POLLED is not set +CONFIG_INPUT_ATI_REMOTE2=m +# CONFIG_INPUT_KEYCHORD is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_KXTJ9 is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=m +CONFIG_INPUT_GPIO=m +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_PWM_BEEPER is not set +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_IMS_PCU is not set +# CONFIG_INPUT_CMA3000 is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_PARKBD is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_SERIO_ARC_PS2 is not set +# CONFIG_SERIO_APBPS2 is not set +CONFIG_GAMEPORT=m +# CONFIG_GAMEPORT_NS558 is not set +# CONFIG_GAMEPORT_L4 is not set + +# +# Character devices +# +CONFIG_TTY=y +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_VT_CONSOLE_SLEEP=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_UNIX98_PTYS=y +CONFIG_DEVPTS_MULTIPLE_INSTANCES=y +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +CONFIG_DEVMEM=y +CONFIG_DEVKMEM=y + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MAX3100 is not set +# CONFIG_SERIAL_MAX310X is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_SCCNXP is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_IFX6X60 is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_SERIAL_ARC is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_PRINTER is not set +# CONFIG_PPDEV is not set +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_HW_RANDOM_ATMEL is not set +CONFIG_HW_RANDOM_MESON=y +# CONFIG_HW_RANDOM_EXYNOS is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_DCC_TTY is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y + +# +# Multiplexer I2C Chip support +# +# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set +# CONFIG_I2C_MUX_GPIO is not set +# CONFIG_I2C_MUX_PCA9541 is not set +# CONFIG_I2C_MUX_PCA954x is not set +# CONFIG_I2C_MUX_PINCTRL is not set +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_CBUS_GPIO is not set +# CONFIG_I2C_DESIGNWARE_PLATFORM is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_DIOLAN_U2C is not set +# CONFIG_I2C_PARPORT is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_ALTERA is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_BUTTERFLY is not set +# CONFIG_SPI_GPIO is not set +# CONFIG_SPI_LM70_LLP is not set +# CONFIG_SPI_FSL_SPI is not set +# CONFIG_SPI_OC_TINY is not set +# CONFIG_SPI_PXA2XX_PCI is not set +# CONFIG_SPI_SC18IS602 is not set +# CONFIG_SPI_XCOMM is not set +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_DESIGNWARE is not set + +# +# SPI Protocol Masters +# +CONFIG_SPI_SPIDEV=m +# CONFIG_SPI_TLE62X0 is not set + +# +# Qualcomm MSM SSBI bus support +# +# CONFIG_SSBI is not set +# CONFIG_HSI is not set + +# +# PPS support +# +CONFIG_PPS=m +# CONFIG_PPS_DEBUG is not set + +# +# PPS clients support +# +# CONFIG_PPS_CLIENT_KTIMER is not set +# CONFIG_PPS_CLIENT_LDISC is not set +# CONFIG_PPS_CLIENT_PARPORT is not set +CONFIG_PPS_CLIENT_GPIO=m + +# +# PPS generators support +# + +# +# PTP clock support +# +# CONFIG_PTP_1588_CLOCK is not set + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +# CONFIG_PTP_1588_CLOCK_PCH is not set +CONFIG_PINCTRL=y + +# +# Pin controllers +# +CONFIG_PINMUX=y +CONFIG_PINCONF=y +# CONFIG_DEBUG_PINCTRL is not set +# CONFIG_PINCTRL_SINGLE is not set +# CONFIG_PINCTRL_EXYNOS is not set +# CONFIG_PINCTRL_EXYNOS5440 is not set +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIO_DEVRES=y +CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y + +# +# Memory mapped GPIO drivers: +# +# CONFIG_GPIO_GENERIC_PLATFORM is not set +# CONFIG_GPIO_EM is not set +# CONFIG_GPIO_RCAR is not set +# CONFIG_GPIO_TS5500 is not set +# CONFIG_GPIO_GRGPIO is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +# CONFIG_GPIO_ADP5588 is not set +# CONFIG_GPIO_ADNP is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_MC33880 is not set +# CONFIG_GPIO_74X164 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# + +# +# USB GPIO expanders: +# +CONFIG_W1=m + +# +# 1-wire Bus Masters +# +# CONFIG_W1_MASTER_DS2490 is not set +# CONFIG_W1_MASTER_DS2482 is not set +# CONFIG_W1_MASTER_DS1WM is not set +CONFIG_W1_MASTER_GPIO=m + +# +# 1-wire Slaves +# +CONFIG_W1_SLAVE_THERM=m +# CONFIG_W1_SLAVE_SMEM is not set +# CONFIG_W1_SLAVE_DS2408 is not set +# CONFIG_W1_SLAVE_DS2413 is not set +# CONFIG_W1_SLAVE_DS2423 is not set +# CONFIG_W1_SLAVE_DS2431 is not set +# CONFIG_W1_SLAVE_DS2433 is not set +# CONFIG_W1_SLAVE_DS2760 is not set +# CONFIG_W1_SLAVE_DS2780 is not set +# CONFIG_W1_SLAVE_DS2781 is not set +# CONFIG_W1_SLAVE_DS28E04 is not set +# CONFIG_W1_SLAVE_BQ27000 is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_TEST_POWER is not set +# CONFIG_BATTERY_DS2780 is not set +# CONFIG_BATTERY_DS2781 is not set +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_SBS is not set +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +# CONFIG_BATTERY_MAX17042 is not set +# CONFIG_BATTERY_ANDROID is not set +# CONFIG_CHARGER_MAX8903 is not set +# CONFIG_CHARGER_LP8727 is not set +# CONFIG_CHARGER_GPIO is not set +# CONFIG_CHARGER_MANAGER is not set +# CONFIG_CHARGER_BQ2415X is not set +# CONFIG_CHARGER_SMB347 is not set +# CONFIG_BATTERY_GOLDFISH is not set +# CONFIG_POWER_RESET is not set +# CONFIG_POWER_RESET_RESTART is not set +# CONFIG_POWER_AVS is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_AD7314 is not set +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADCXX is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ADT7310 is not set +# CONFIG_SENSORS_ADT7410 is not set +# CONFIG_SENSORS_ADT7411 is not set +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +# CONFIG_SENSORS_ASC7621 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS620 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_GPIO_FAN is not set +# CONFIG_SENSORS_HIH6130 is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_JC42 is not set +# CONFIG_SENSORS_LINEAGE is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM70 is not set +# CONFIG_SENSORS_LM73 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4151 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4261 is not set +# CONFIG_SENSORS_LM95234 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_LM95245 is not set +# CONFIG_SENSORS_MAX1111 is not set +# CONFIG_SENSORS_MAX16065 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX1668 is not set +# CONFIG_SENSORS_MAX197 is not set +# CONFIG_SENSORS_MAX6639 is not set +# CONFIG_SENSORS_MAX6642 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_MAX6697 is not set +# CONFIG_SENSORS_MCP3021 is not set +# CONFIG_SENSORS_NCT6775 is not set +# CONFIG_SENSORS_NTC_THERMISTOR is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_PMBUS is not set +# CONFIG_SENSORS_SHT15 is not set +# CONFIG_SENSORS_SHT21 is not set +# CONFIG_SENSORS_SMM665 is not set +# CONFIG_SENSORS_DME1737 is not set +# CONFIG_SENSORS_EMC1403 is not set +# CONFIG_SENSORS_EMC2103 is not set +# CONFIG_SENSORS_EMC6W201 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH56XX_COMMON is not set +# CONFIG_SENSORS_SCH5627 is not set +# CONFIG_SENSORS_SCH5636 is not set +# CONFIG_SENSORS_ADS1015 is not set +# CONFIG_SENSORS_ADS7828 is not set +# CONFIG_SENSORS_ADS7871 is not set +# CONFIG_SENSORS_AMC6821 is not set +# CONFIG_SENSORS_INA209 is not set +# CONFIG_SENSORS_INA2XX is not set +# CONFIG_SENSORS_THMC50 is not set +# CONFIG_SENSORS_TMP102 is not set +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83795 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +CONFIG_THERMAL=y +CONFIG_THERMAL_HWMON=y +CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y +# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set +# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set +# CONFIG_THERMAL_GOV_FAIR_SHARE is not set +CONFIG_THERMAL_GOV_STEP_WISE=y +# CONFIG_THERMAL_GOV_USER_SPACE is not set +CONFIG_CPU_THERMAL=y +CONFIG_CPUCORE_THERMAL=y +CONFIG_GPU_THERMAL=y +CONFIG_GPUCORE_THERMAL=y +# CONFIG_THERMAL_EMULATION is not set +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_CORE=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_DW_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +# CONFIG_BCMA is not set + +# +# Multifunction device drivers +# +CONFIG_MFD_CORE=m +# CONFIG_MFD_AS3711 is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_AAT2870_CORE is not set +# CONFIG_MFD_CROS_EC is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_DA9052_SPI is not set +# CONFIG_MFD_DA9052_I2C is not set +# CONFIG_MFD_DA9055 is not set +# CONFIG_MFD_MC13XXX_SPI is not set +# CONFIG_MFD_MC13XXX_I2C is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_MFD_88PM800 is not set +# CONFIG_MFD_88PM805 is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_MAX77686 is not set +# CONFIG_MFD_MAX77693 is not set +# CONFIG_MFD_MAX8907 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_EZX_PCAP is not set +# CONFIG_MFD_VIPERBOARD is not set +# CONFIG_MFD_RETU is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_UCB1400_CORE is not set +# CONFIG_MFD_RC5T583 is not set +# CONFIG_MFD_SEC_CORE is not set +# CONFIG_MFD_SI476X_CORE is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_SMSC is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_SYSCON is not set +# CONFIG_MFD_TI_AM335X_TSCADC is not set +# CONFIG_MFD_LP8788 is not set +# CONFIG_MFD_PALMAS is not set +# CONFIG_TPS6105X is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_MFD_TPS65090 is not set +# CONFIG_MFD_TPS65217 is not set +# CONFIG_MFD_TPS6586X is not set +# CONFIG_MFD_TPS65910 is not set +# CONFIG_MFD_TPS65912 is not set +# CONFIG_MFD_TPS65912_I2C is not set +# CONFIG_MFD_TPS65912_SPI is not set +# CONFIG_MFD_TPS80031 is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_TWL6040_CORE is not set +# CONFIG_MFD_WL1273_CORE is not set +# CONFIG_MFD_LM3533 is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_MFD_ARIZONA_I2C is not set +# CONFIG_MFD_ARIZONA_SPI is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM831X_SPI is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +# CONFIG_REGULATOR_DUMMY is not set +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_GPIO is not set +# CONFIG_REGULATOR_AD5398 is not set +# CONFIG_REGULATOR_FAN53555 is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_MAX8973 is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_LP872X is not set +# CONFIG_REGULATOR_LP8755 is not set +# CONFIG_REGULATOR_TPS51632 is not set +# CONFIG_REGULATOR_TPS62360 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_REGULATOR_TPS6524X is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_ANALOG_TV_SUPPORT=y +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +# CONFIG_MEDIA_RADIO_SUPPORT is not set +CONFIG_MEDIA_RC_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_MEDIA_CONTROLLER_DVB=y +CONFIG_VIDEO_DEV=y +# CONFIG_VIDEO_V4L2_SUBDEV_API is not set +CONFIG_VIDEO_V4L2=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_VIDEO_TUNER=m +CONFIG_VIDEOBUF_GEN=m +CONFIG_VIDEOBUF_VMALLOC=m +CONFIG_VIDEOBUF_DVB=m +CONFIG_VIDEOBUF2_CORE=m +CONFIG_VIDEOBUF2_MEMOPS=m +CONFIG_VIDEOBUF2_VMALLOC=m +# CONFIG_VIDEO_V4L2_INT_DEVICE is not set +CONFIG_DVB_CORE=y +CONFIG_DVB_NET=y +CONFIG_TTPCI_EEPROM=m +CONFIG_DVB_MAX_ADAPTERS=8 +CONFIG_DVB_DYNAMIC_MINORS=y + +# +# Media drivers +# +CONFIG_RC_CORE=y +CONFIG_RC_MAP=y +CONFIG_RC_DECODERS=y +CONFIG_LIRC=m +CONFIG_IR_LIRC_CODEC=m +CONFIG_IR_NEC_DECODER=m +CONFIG_IR_RC5_DECODER=m +CONFIG_IR_RC6_DECODER=m +CONFIG_IR_JVC_DECODER=m +CONFIG_IR_SONY_DECODER=m +CONFIG_IR_RC5_SZ_DECODER=m +CONFIG_IR_SANYO_DECODER=m +CONFIG_IR_MCE_KBD_DECODER=m +CONFIG_RC_DEVICES=y +CONFIG_RC_ATI_REMOTE=m +CONFIG_IR_IMON=m +CONFIG_IR_MCEUSB=m +CONFIG_IR_MESON=m +CONFIG_IR_REDRAT3=m +CONFIG_IR_STREAMZAP=m +CONFIG_IR_IGUANA=m +CONFIG_IR_TTUSBIR=m +CONFIG_RC_LOOPBACK=m +CONFIG_IR_GPIO_CIR=m +CONFIG_MEDIA_USB_SUPPORT=y + +# +# Webcam devices +# +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_GL860=m +CONFIG_USB_GSPCA_BENQ=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_JEILINJ=m +CONFIG_USB_GSPCA_JL2005BCD=m +CONFIG_USB_GSPCA_KINECT=m +CONFIG_USB_GSPCA_KONICA=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_MR97310A=m +CONFIG_USB_GSPCA_NW80X=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_OV534_9=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7302=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SE401=m +CONFIG_USB_GSPCA_SN9C2028=m +CONFIG_USB_GSPCA_SN9C20X=m +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SPCA1528=m +CONFIG_USB_GSPCA_SQ905=m +CONFIG_USB_GSPCA_SQ905C=m +CONFIG_USB_GSPCA_SQ930X=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_STV0680=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TOPRO=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_VICAM=m +CONFIG_USB_GSPCA_XIRLINK_CIT=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_USB_PWC=m +CONFIG_USB_PWC_DEBUG=y +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_VIDEO_CPIA2=m +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_USB_SN9C102=m + +# +# Analog TV USB devices +# +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +CONFIG_VIDEO_PVRUSB2_DVB=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_TLG2300=m +CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_STK1160=m +CONFIG_VIDEO_STK1160_AC97=y + +# +# Analog/digital TV USB devices +# +CONFIG_VIDEO_AU0828=m +CONFIG_VIDEO_AU0828_V4L2=y +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_RC=y +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_CX231XX_DVB=m +CONFIG_VIDEO_TM6000=m +CONFIG_VIDEO_TM6000_ALSA=m +CONFIG_VIDEO_TM6000_DVB=m + +# +# Digital TV USB devices +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +CONFIG_DVB_USB_A800=m +CONFIG_DVB_USB_DIBUSB_MB=m +CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +CONFIG_DVB_USB_UMT_010=m +CONFIG_DVB_USB_CXUSB=m +CONFIG_DVB_USB_M920X=m +CONFIG_DVB_USB_DIGITV=m +CONFIG_DVB_USB_VP7045=m +CONFIG_DVB_USB_VP702X=m +CONFIG_DVB_USB_GP8PSK=m +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_PCTV452E=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_FRIIO=m +CONFIG_DVB_USB_AZ6027=m +CONFIG_DVB_USB_TECHNISAT_USB2=m +CONFIG_DVB_USB_V2=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_AF9035=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_AZ6007=m +CONFIG_DVB_USB_CE6230=m +CONFIG_DVB_USB_EC168=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_IT913X=m +CONFIG_DVB_USB_LME2510=m +CONFIG_DVB_USB_MXL111SF=m +CONFIG_DVB_USB_RTL28XXU=m +CONFIG_DVB_USB_DVBSKY=m +CONFIG_SMS_USB_DRV=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set + +# +# Webcam, TV (analog/digital) USB devices +# +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_VIDEO_EM28XX_RC=m +CONFIG_V4L_PLATFORM_DRIVERS=y +# CONFIG_SOC_CAMERA is not set +# CONFIG_V4L_MEM2MEM_DRIVERS is not set +# CONFIG_V4L_TEST_DRIVERS is not set + +# +# Supported MMC/SDIO adapters +# +# CONFIG_SMS_SDIO_DRV is not set +# CONFIG_MEDIA_PARPORT_SUPPORT is not set +CONFIG_MEDIA_COMMON_OPTIONS=y + +# +# common driver options +# +CONFIG_VIDEO_CX2341X=m +CONFIG_VIDEO_TVEEPROM=m +CONFIG_CYPRESS_FIRMWARE=m +CONFIG_DVB_B2C2_FLEXCOP=m +CONFIG_SMS_SIANO_MDTV=m +CONFIG_SMS_SIANO_RC=y +# CONFIG_SMS_SIANO_DEBUGFS is not set + +# +# Media ancillary drivers (tuners, sensors, i2c, frontends) +# +CONFIG_MEDIA_SUBDRV_AUTOSELECT=y +CONFIG_MEDIA_ATTACH=y +CONFIG_VIDEO_IR_I2C=y + +# +# Audio decoders, processors and mixers +# +CONFIG_VIDEO_MSP3400=m +CONFIG_VIDEO_CS53L32A=m +CONFIG_VIDEO_WM8775=m + +# +# RDS decoders +# + +# +# Video decoders +# +CONFIG_VIDEO_SAA711X=m +CONFIG_VIDEO_TVP5150=m + +# +# Video and audio decoders +# +CONFIG_VIDEO_CX25840=m + +# +# Video encoders +# + +# +# Camera sensor devices +# +CONFIG_VIDEO_MT9V011=m + +# +# Flash devices +# + +# +# Video improvement chips +# + +# +# Miscelaneous helper chips +# + +# +# Sensors used on soc_camera driver +# +CONFIG_MEDIA_TUNER=y +CONFIG_MEDIA_TUNER_SIMPLE=y +CONFIG_MEDIA_TUNER_TDA8290=y +CONFIG_MEDIA_TUNER_TDA827X=y +CONFIG_MEDIA_TUNER_TDA18271=y +CONFIG_MEDIA_TUNER_TDA9887=y +CONFIG_MEDIA_TUNER_MT20XX=y +CONFIG_MEDIA_TUNER_MT2060=m +CONFIG_MEDIA_TUNER_MT2063=m +CONFIG_MEDIA_TUNER_MT2266=m +CONFIG_MEDIA_TUNER_QT1010=m +CONFIG_MEDIA_TUNER_XC2028=y +CONFIG_MEDIA_TUNER_XC5000=y +CONFIG_MEDIA_TUNER_XC4000=y +CONFIG_MEDIA_TUNER_MXL5005S=m +CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_MC44S803=y +CONFIG_MEDIA_TUNER_MAX2165=m +CONFIG_MEDIA_TUNER_TDA18218=m +CONFIG_MEDIA_TUNER_FC0011=m +CONFIG_MEDIA_TUNER_FC0012=m +CONFIG_MEDIA_TUNER_FC0013=m +CONFIG_MEDIA_TUNER_TDA18212=m +CONFIG_MEDIA_TUNER_E4000=m +CONFIG_MEDIA_TUNER_FC2580=m +CONFIG_MEDIA_TUNER_M88TS2022=m +CONFIG_MEDIA_TUNER_TUA9001=m +CONFIG_MEDIA_TUNER_SI2157=m +CONFIG_MEDIA_TUNER_IT913X=m +CONFIG_MEDIA_TUNER_R820T=m + +# +# Multistandard (satellite) frontends +# +CONFIG_DVB_STB0899=m +CONFIG_DVB_STB6100=m +CONFIG_DVB_STV090x=m +CONFIG_DVB_STV6110x=m +CONFIG_DVB_M88DS3103=m + +# +# Multistandard (cable + terrestrial) frontends +# +CONFIG_DVB_DRXK=m +CONFIG_DVB_TDA18271C2DD=m + +# +# DVB-S (satellite) frontends +# +CONFIG_DVB_CX24123=m +CONFIG_DVB_MT312=m +CONFIG_DVB_ZL10039=m +CONFIG_DVB_S5H1420=m +CONFIG_DVB_STV0288=m +CONFIG_DVB_STB6000=m +CONFIG_DVB_STV0299=m +CONFIG_DVB_STV6110=m +CONFIG_DVB_STV0900=m +CONFIG_DVB_TDA10086=m +CONFIG_DVB_TUNER_ITD1000=m +CONFIG_DVB_TUNER_CX24113=m +CONFIG_DVB_TDA826X=m +CONFIG_DVB_CX24116=m +CONFIG_DVB_SI21XX=m +CONFIG_DVB_TS2020=m +CONFIG_DVB_DS3000=m +CONFIG_DVB_TDA10071=m + +# +# DVB-T (terrestrial) frontends +# +CONFIG_DVB_CX22702=m +CONFIG_DVB_DRXD=m +CONFIG_DVB_TDA1004X=m +CONFIG_DVB_NXT6000=m +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +CONFIG_DVB_DIB3000MB=m +CONFIG_DVB_DIB3000MC=m +CONFIG_DVB_DIB7000M=m +CONFIG_DVB_DIB7000P=m +CONFIG_DVB_TDA10048=m +CONFIG_DVB_AF9013=m +CONFIG_DVB_EC100=m +CONFIG_DVB_CXD2820R=m +CONFIG_DVB_RTL2830=m +CONFIG_DVB_RTL2832=m +CONFIG_DVB_SI2168=m +# CONFIG_DVB_AS102_FE is not set + +# +# DVB-C (cable) frontends +# +CONFIG_DVB_TDA10023=m +CONFIG_DVB_STV0297=m + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +CONFIG_DVB_NXT200X=m +CONFIG_DVB_BCM3510=m +CONFIG_DVB_LGDT330X=m +CONFIG_DVB_LGDT3305=m +CONFIG_DVB_LG2160=m +CONFIG_DVB_S5H1409=m +CONFIG_DVB_AU8522=m +CONFIG_DVB_AU8522_DTV=m +CONFIG_DVB_AU8522_V4L=m +CONFIG_DVB_S5H1411=m + +# +# ISDB-T (terrestrial) frontends +# +CONFIG_DVB_S921=m +CONFIG_DVB_DIB8000=m +CONFIG_DVB_MB86A20S=m + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +CONFIG_DVB_TUNER_DIB0070=m +CONFIG_DVB_TUNER_DIB0090=m + +# +# SEC control devices for DVB-S +# +CONFIG_DVB_LNBP21=m +CONFIG_DVB_LNBP22=m +CONFIG_DVB_ISL6421=m +CONFIG_DVB_ISL6423=m +CONFIG_DVB_A8293=m +CONFIG_DVB_SP2=m +CONFIG_DVB_LGS8GXX=m +CONFIG_DVB_ATBM8830=m +CONFIG_DVB_IX2505V=m +CONFIG_DVB_IT913X_FE=m +CONFIG_DVB_M88RS2000=m +CONFIG_DVB_AF9033=m + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set + +# +# Graphics support +# +CONFIG_DRM=y +CONFIG_DRM_USB=m +CONFIG_DRM_KMS_HELPER=m +# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set + +# +# I2C encoder or helper chips +# +# CONFIG_DRM_I2C_CH7006 is not set +# CONFIG_DRM_I2C_SIL164 is not set +# CONFIG_DRM_I2C_NXP_TDA998X is not set +CONFIG_DRM_MALI=y +CONFIG_DRM_UDL=m +# CONFIG_DRM_TILCDC is not set +CONFIG_ION=y +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_HDMI=y +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +CONFIG_FB_SYS_FILLRECT=m +CONFIG_FB_SYS_COPYAREA=m +CONFIG_FB_SYS_IMAGEBLIT=m +# CONFIG_FB_FOREIGN_ENDIAN is not set +CONFIG_FB_SYS_FOPS=m +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +CONFIG_FB_BACKLIGHT=y +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_TMIO is not set +# CONFIG_FB_SMSCUFX is not set +CONFIG_FB_UDL=m +# CONFIG_FB_GOLDFISH is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_AUO_K190X is not set +# CONFIG_FB_SIMPLE is not set +# CONFIG_EXYNOS_VIDEO is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=m +# CONFIG_LCD_L4F00242T03 is not set +# CONFIG_LCD_LMS283GF05 is not set +# CONFIG_LCD_LTV350QV is not set +# CONFIG_LCD_ILI922X is not set +# CONFIG_LCD_ILI9320 is not set +# CONFIG_LCD_TDO24M is not set +# CONFIG_LCD_VGG2432A4 is not set +# CONFIG_LCD_PLATFORM is not set +# CONFIG_LCD_S6E63M0 is not set +# CONFIG_LCD_LD9040 is not set +# CONFIG_LCD_AMS369FG06 is not set +# CONFIG_LCD_LMS501KF03 is not set +# CONFIG_LCD_HX8357 is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_GENERIC=y +# CONFIG_BACKLIGHT_PWM is not set +# CONFIG_BACKLIGHT_ADP8860 is not set +# CONFIG_BACKLIGHT_ADP8870 is not set +# CONFIG_BACKLIGHT_LM3630 is not set +# CONFIG_BACKLIGHT_LM3639 is not set +# CONFIG_BACKLIGHT_LP855X is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +CONFIG_FONT_PEARL_8x8=y +CONFIG_FONT_ACORN_8x8=y +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +CONFIG_LOGO=y +CONFIG_LOGO_LINUX_MONO=y +CONFIG_LOGO_LINUX_VGA16=y +CONFIG_LOGO_LINUX_CLUT224=y +# CONFIG_FB_SSD1307 is not set +CONFIG_FB_TFT=m +CONFIG_FB_TFT_ODROIDC32=m +CONFIG_FB_TFT_ST7565=m +CONFIG_FB_TFT_AGM1264K_FL=m +CONFIG_FB_TFT_BD663474=m +CONFIG_FB_TFT_HX8340BN=m +CONFIG_FB_TFT_HX8347D=m +CONFIG_FB_TFT_HX8353D=m +CONFIG_FB_TFT_ILI9320=m +CONFIG_FB_TFT_ILI9325=m +CONFIG_FB_TFT_ILI9340=m +CONFIG_FB_TFT_ILI9341=m +CONFIG_FB_TFT_ILI9481=m +CONFIG_FB_TFT_ILI9486=m +CONFIG_FB_TFT_PCD8544=m +CONFIG_FB_TFT_RA8875=m +CONFIG_FB_TFT_S6D02A1=m +CONFIG_FB_TFT_S6D1121=m +CONFIG_FB_TFT_SSD1289=m +CONFIG_FB_TFT_SSD1306=m +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +CONFIG_FB_TFT_ST7735R=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1701=m +CONFIG_FB_TFT_UPD161704=m +CONFIG_FB_TFT_WATTEROTT=m +CONFIG_FB_FLEX=m +CONFIG_FB_TFT_FBTFT_DEVICE=m +CONFIG_SOUND=y +CONFIG_SOUND_OSS_CORE=y +CONFIG_SOUND_OSS_CORE_PRECLAIM=y +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +CONFIG_SND_COMPRESS_OFFLOAD=y +CONFIG_SND_JACK=y +CONFIG_SND_SEQUENCER=m +# CONFIG_SND_SEQ_DUMMY is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +# CONFIG_SND_HRTIMER is not set +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_VMASTER=y +CONFIG_SND_RAWMIDI_SEQ=m +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +CONFIG_SND_AC97_CODEC=m +CONFIG_SND_DRIVERS=y +# CONFIG_SND_DUMMY is not set +CONFIG_SND_ALOOP=m +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_MTS64 is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_PORTMAN2X4 is not set +# CONFIG_SND_AC97_POWER_SAVE is not set +CONFIG_SND_ARM=y +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_UA101=m +CONFIG_SND_USB_CAIAQ=m +# CONFIG_SND_USB_CAIAQ_INPUT is not set +CONFIG_SND_USB_6FIRE=m +CONFIG_SND_SOC=y +# CONFIG_SND_ATMEL_SOC is not set +# CONFIG_SND_DESIGNWARE_I2S is not set +# CONFIG_SND_AML_M6_SOC is not set +CONFIG_SND_AML_M8_SOC=y +# CONFIG_SND_AML_M_DUMMY_CODEC is not set +CONFIG_SND_AML_M8=y +# CONFIG_SND_AML_M8_PCM is not set +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_AML_M8_CODEC=y +CONFIG_SND_SOC_DUMMY_CODEC=y +CONFIG_SND_SOC_PCM5102=y +# CONFIG_SND_SIMPLE_CARD is not set +# CONFIG_SOUND_PRIME is not set +CONFIG_AC97_BUS=m + +# +# HID support +# +CONFIG_HID=y +# CONFIG_HID_BATTERY_STRENGTH is not set +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_GENERIC=y + +# +# Special HID drivers +# +CONFIG_HID_A4TECH=m +CONFIG_HID_ACRUX=m +CONFIG_HID_ACRUX_FF=y +CONFIG_HID_APPLE=m +# CONFIG_HID_APPLEIR is not set +CONFIG_HID_AUREAL=m +CONFIG_HID_BELKIN=m +CONFIG_HID_CHERRY=m +CONFIG_HID_CHICONY=m +CONFIG_HID_PRODIKEYS=m +CONFIG_HID_CYPRESS=m +CONFIG_HID_DRAGONRISE=m +CONFIG_DRAGONRISE_FF=y +CONFIG_HID_EMS_FF=m +CONFIG_HID_ELECOM=m +CONFIG_HID_EZKEY=m +CONFIG_HID_HOLTEK=m +CONFIG_HOLTEK_FF=y +CONFIG_HID_KEYTOUCH=m +CONFIG_HID_KYE=m +CONFIG_HID_UCLOGIC=m +CONFIG_HID_WALTOP=m +CONFIG_HID_GYRATION=m +CONFIG_HID_ICADE=m +CONFIG_HID_TWINHAN=m +CONFIG_HID_KENSINGTON=m +CONFIG_HID_LCPOWER=m +CONFIG_HID_LENOVO_TPKBD=m +CONFIG_HID_LOGITECH=m +CONFIG_HID_LOGITECH_DJ=m +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWHEELS_FF=y +CONFIG_HID_MAGICMOUSE=m +CONFIG_HID_MICROSOFT=m +CONFIG_HID_MONTEREY=m +CONFIG_HID_MULTITOUCH=m +CONFIG_HID_NTRIG=m +CONFIG_HID_ORTEK=m +CONFIG_HID_PANTHERLORD=m +# CONFIG_PANTHERLORD_FF is not set +CONFIG_HID_PETALYNX=m +CONFIG_HID_PICOLCD=m +# CONFIG_HID_PICOLCD_FB is not set +# CONFIG_HID_PICOLCD_BACKLIGHT is not set +# CONFIG_HID_PICOLCD_LCD is not set +# CONFIG_HID_PICOLCD_LEDS is not set +# CONFIG_HID_PICOLCD_CIR is not set +CONFIG_HID_PRIMAX=m +CONFIG_HID_PS3REMOTE=m +CONFIG_HID_ROCCAT=m +CONFIG_HID_SAITEK=m +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m +CONFIG_HID_SPEEDLINK=m +CONFIG_HID_STEELSERIES=m +CONFIG_HID_SUNPLUS=m +CONFIG_HID_GREENASIA=m +CONFIG_GREENASIA_FF=y +CONFIG_HID_SMARTJOYPLUS=m +CONFIG_SMARTJOYPLUS_FF=y +CONFIG_HID_TIVO=m +CONFIG_HID_TOPSEED=m +CONFIG_HID_THINGM=m +CONFIG_HID_THRUSTMASTER=m +CONFIG_THRUSTMASTER_FF=y +CONFIG_HID_WACOM=m +CONFIG_HID_WIIMOTE=m +CONFIG_HID_WIIMOTE_EXT=y +CONFIG_HID_XINMO=m +CONFIG_HID_ZEROPLUS=m +CONFIG_ZEROPLUS_FF=y +CONFIG_HID_ZYDACRON=m +CONFIG_HID_SENSOR_HUB=m + +# +# USB HID support +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +CONFIG_USB_HIDDEV=y + +# +# I2C HID support +# +# CONFIG_I2C_HID is not set +# CONFIG_USB_ARCH_HAS_OHCI is not set +# CONFIG_USB_ARCH_HAS_EHCI is not set +# CONFIG_USB_ARCH_HAS_XHCI is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEFAULT_PERSIST=y +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +CONFIG_USB_MON=m +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_MUSB_HDRC is not set +# CONFIG_USB_RENESAS_USBHS is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_WDM=m +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_REALTEK is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_STORAGE_ENE_UB6250 is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USB_DWC3 is not set +# CONFIG_USB_CHIPIDEA is not set + +# +# USB port drivers +# +# CONFIG_USB_USS720 is not set +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_SIMPLE=m +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_F81232=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_METRO=m +CONFIG_USB_SERIAL_MOS7720=m +# CONFIG_USB_SERIAL_MOS7715_PARPORT is not set +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QCAUX=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_WWAN=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_XSENS_MT=m +CONFIG_USB_SERIAL_WISHBONE=m +CONFIG_USB_SERIAL_ZTE=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_QT2=m +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +CONFIG_USB_EZUSB_FX2=m +# CONFIG_USB_HSIC_USB3503 is not set +# CONFIG_USB_PHY is not set +# CONFIG_USB_OTG_WAKELOCK is not set +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG is not set +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_GADGET_VBUS_DRAW=500 +CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 + +# +# USB Peripheral Controller +# +# CONFIG_USB_FUSB300 is not set +# CONFIG_USB_R8A66597 is not set +# CONFIG_USB_PXA27X is not set +# CONFIG_USB_MV_UDC is not set +# CONFIG_USB_MV_U3D is not set +CONFIG_USB_GADGET_DWC_OTG=y +CONFIG_USB_DWC_OTG=y +# CONFIG_USB_M66592 is not set +# CONFIG_USB_NET2272 is not set +# CONFIG_USB_DUMMY_HCD is not set +CONFIG_USB_LIBCOMPOSITE=m +CONFIG_USB_F_ACM=m +CONFIG_USB_F_SS_LB=m +CONFIG_USB_U_SERIAL=m +CONFIG_USB_F_SERIAL=m +CONFIG_USB_F_OBEX=m +CONFIG_USB_ZERO=m +CONFIG_USB_AUDIO=m +CONFIG_GADGET_UAC1=y +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +# CONFIG_USB_ETH_EEM is not set +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_FUNCTIONFS=m +# CONFIG_USB_FUNCTIONFS_ETH is not set +# CONFIG_USB_FUNCTIONFS_RNDIS is not set +CONFIG_USB_FUNCTIONFS_GENERIC=y +CONFIG_USB_MASS_STORAGE=m +CONFIG_USB_G_SERIAL=m +CONFIG_USB_MIDI_GADGET=m +CONFIG_USB_G_PRINTER=m +CONFIG_USB_CDC_COMPOSITE=m +# CONFIG_USB_G_NOKIA is not set +CONFIG_USB_G_ACM_MS=m +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_MULTI_RNDIS=y +# CONFIG_USB_G_MULTI_CDC is not set +# CONFIG_USB_G_HID is not set +# CONFIG_USB_G_DBGP is not set +CONFIG_USB_G_WEBCAM=m +CONFIG_MMC=y +CONFIG_MMC_DEBUG=y +CONFIG_MMC_UNSAFE_RESUME=y +# CONFIG_MMC_CLKGATE is not set +# CONFIG_MMC_EMBEDDED_SDIO is not set +# CONFIG_MMC_PARANOID_SD_INIT is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=16 +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_EMMC_SECURE_STORAGE is not set +# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_SDHCI_PXAV3 is not set +# CONFIG_MMC_SDHCI_PXAV2 is not set +# CONFIG_MMC_DW is not set +CONFIG_MMC_VUB300=m +CONFIG_MMC_USHC=m +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +# CONFIG_LEDS_LM3530 is not set +# CONFIG_LEDS_LM3642 is not set +# CONFIG_LEDS_PCA9532 is not set +CONFIG_LEDS_GPIO=y +# CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_LP5521 is not set +# CONFIG_LEDS_LP5523 is not set +# CONFIG_LEDS_LP5562 is not set +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_PCA9633 is not set +# CONFIG_LEDS_DAC124S085 is not set +# CONFIG_LEDS_PWM is not set +# CONFIG_LEDS_REGULATOR is not set +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_LT3593 is not set +# CONFIG_LEDS_RENESAS_TPU is not set +# CONFIG_LEDS_TCA6507 is not set +# CONFIG_LEDS_LM355x is not set +# CONFIG_LEDS_OT200 is not set +# CONFIG_LEDS_BLINKM is not set + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=m +CONFIG_LEDS_TRIGGER_ONESHOT=m +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=m +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=m +CONFIG_LEDS_TRIGGER_DEFAULT_ON=m + +# +# iptables trigger is under Netfilter config (LED target) +# +CONFIG_LEDS_TRIGGER_TRANSIENT=m +# CONFIG_LEDS_TRIGGER_CAMERA is not set +CONFIG_SWITCH=y +# CONFIG_SWITCH_GPIO is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_SYSTOHC=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8523 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set +# CONFIG_RTC_DRV_EM3027 is not set +# CONFIG_RTC_DRV_RV3029C2 is not set + +# +# SPI RTC drivers +# +# CONFIG_RTC_DRV_M41T93 is not set +# CONFIG_RTC_DRV_M41T94 is not set +# CONFIG_RTC_DRV_DS1305 is not set +# CONFIG_RTC_DRV_DS1390 is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_R9701 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_DS3234 is not set +# CONFIG_RTC_DRV_PCF2123 is not set +# CONFIG_RTC_DRV_RX4581 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set +# CONFIG_RTC_DRV_DS2404 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_RTC_DRV_SNVS is not set + +# +# HID Sensor RTC drivers +# +# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +CONFIG_UIO=y +CONFIG_UIO_PDRV=y +CONFIG_UIO_PDRV_GENIRQ=y +# CONFIG_UIO_DMEM_GENIRQ is not set +# CONFIG_VIRT_DRIVERS is not set + +# +# Virtio drivers +# +# CONFIG_VIRTIO_MMIO is not set + +# +# Microsoft Hyper-V guest support +# +CONFIG_STAGING=y +CONFIG_USBIP_CORE=m +CONFIG_USBIP_VHCI_HCD=m +CONFIG_USBIP_HOST=m +# CONFIG_USBIP_DEBUG is not set +# CONFIG_ECHO is not set +# CONFIG_COMEDI is not set +# CONFIG_ASUS_OLED is not set +# CONFIG_PANEL is not set +CONFIG_R8712U=m +CONFIG_RTS5139=m +CONFIG_RTS5139_DEBUG=y +# CONFIG_TRANZPORT is not set +# CONFIG_LINE6_USB is not set +CONFIG_USB_SERIAL_QUATECH2=m +CONFIG_ZSMALLOC=y +CONFIG_ZRAM=m +CONFIG_ZRAM_DEBUG=y +CONFIG_USB_ENESTORAGE=m +# CONFIG_BCM_WIMAX is not set +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# +# CONFIG_SPEAKUP is not set +# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set +# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set +# CONFIG_STAGING_MEDIA is not set + +# +# Android +# +CONFIG_ANDROID=y +# CONFIG_ANDROID_BINDER_IPC is not set +# CONFIG_ASHMEM is not set +# CONFIG_ANDROID_LOGGER is not set +CONFIG_ANDROID_TIMED_OUTPUT=y +# CONFIG_ANDROID_TIMED_GPIO is not set +# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set +CONFIG_ANDROID_INTF_ALARM_DEV=y +CONFIG_SYNC=y +# CONFIG_SW_SYNC is not set +# CONFIG_USB_WPAN_HCD is not set +# CONFIG_WIMAX_GDM72XX is not set +# CONFIG_CED1401 is not set +# CONFIG_DGRP is not set +CONFIG_CLKDEV_LOOKUP=y + +# +# Hardware Spinlock drivers +# +# CONFIG_MAILBOX is not set +CONFIG_IOMMU_SUPPORT=y +CONFIG_OF_IOMMU=y + +# +# Remoteproc drivers +# +# CONFIG_STE_MODEM_RPROC is not set + +# +# Rpmsg drivers +# +# CONFIG_PM_DEVFREQ is not set +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set +CONFIG_PWM=y +CONFIG_IRQCHIP=y +CONFIG_ARM_GIC=y +# CONFIG_IPACK_BUS is not set +# CONFIG_RESET_CONTROLLER is not set +CONFIG_MALI400=y +CONFIG_MALI450=y +# CONFIG_MALI400_DEBUG is not set +# CONFIG_MALI400_PROFILING is not set +CONFIG_MALI400_UMP=y +CONFIG_MALI_DVFS=y +CONFIG_MALI_DMA_BUF_MAP_ON_ATTACH=y +CONFIG_MALI_SHARED_INTERRUPTS=y +# CONFIG_MALI_PMU_PARALLEL_POWER_UP is not set +# CONFIG_MALI_QUIET is not set +CONFIG_UMP=y +# CONFIG_UMP_DEBUG is not set +CONFIG_UMPLOCK=y + +# +# ODROID Specific Hardware +# +CONFIG_ODROID_TOUCHSCREEN_ADS7846=m +CONFIG_ODROID_AML_GPIO_LIB=m + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +CONFIG_EXT4_DEBUG=y +CONFIG_JBD2=y +# CONFIG_JBD2_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_PROC_INFO=y +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +CONFIG_BTRFS_FS=m +CONFIG_BTRFS_FS_POSIX_ACL=y +# CONFIG_BTRFS_FS_CHECK_INTEGRITY is not set +CONFIG_BTRFS_FS_RUN_SANITY_TESTS=y +# CONFIG_BTRFS_DEBUG is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_EXPORTFS=y +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +CONFIG_QUOTA=y +# CONFIG_QUOTA_NETLINK_INTERFACE is not set +CONFIG_PRINT_QUOTA_WARNING=y +# CONFIG_QUOTA_DEBUG is not set +CONFIG_QUOTA_TREE=y +# CONFIG_QFMT_V1 is not set +CONFIG_QFMT_V2=y +CONFIG_QUOTACTL=y +CONFIG_AUTOFS4_FS=m +CONFIG_FUSE_FS=m +# CONFIG_CUSE is not set +CONFIG_OVERLAYFS_FS=y +CONFIG_GENERIC_ACL=y + +# +# Caches +# +CONFIG_FSCACHE=m +# CONFIG_FSCACHE_STATS is not set +# CONFIG_FSCACHE_HISTOGRAM is not set +# CONFIG_FSCACHE_DEBUG is not set +# CONFIG_FSCACHE_OBJECT_LIST is not set +# CONFIG_CACHEFILES is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_RW=y + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TMPFS_XATTR=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_CONFIGFS_FS=y +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +CONFIG_ECRYPT_FS=m +CONFIG_ECRYPT_FS_MESSAGING=y +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_JFFS2_FS is not set +# CONFIG_LOGFS is not set +CONFIG_CRAMFS=y +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_ZLIB=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX6FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_PSTORE is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_F2FS_FS=m +CONFIG_F2FS_STAT_FS=y +CONFIG_F2FS_FS_XATTR=y +CONFIG_F2FS_FS_POSIX_ACL=y +CONFIG_AUFS_FS=y +CONFIG_AUFS_BRANCH_MAX_127=y +# CONFIG_AUFS_BRANCH_MAX_511 is not set +# CONFIG_AUFS_BRANCH_MAX_1023 is not set +# CONFIG_AUFS_BRANCH_MAX_32767 is not set +CONFIG_AUFS_SBILIST=y +# CONFIG_AUFS_HNOTIFY is not set +CONFIG_AUFS_EXPORT=y +# CONFIG_AUFS_XATTR is not set +# CONFIG_AUFS_FHSM is not set +# CONFIG_AUFS_RDU is not set +# CONFIG_AUFS_SHWH is not set +# CONFIG_AUFS_BR_RAMFS is not set +CONFIG_AUFS_BR_FUSE=y +CONFIG_AUFS_POLL=y +CONFIG_AUFS_BR_HFSPLUS=y +CONFIG_AUFS_BDEV_LOOP=y +# CONFIG_AUFS_DEBUG is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=m +CONFIG_NFS_V2=m +CONFIG_NFS_V3=m +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=m +# CONFIG_NFS_SWAP is not set +CONFIG_NFS_V4_1=y +CONFIG_PNFS_FILE_LAYOUT=m +CONFIG_PNFS_BLOCK=m +CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" +# CONFIG_NFS_FSCACHE is not set +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +# CONFIG_NFSD_FAULT_INJECTION is not set +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_SUNRPC_BACKCHANNEL=y +# CONFIG_SUNRPC_DEBUG is not set +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=m +# CONFIG_CIFS_STATS is not set +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +CONFIG_CIFS_XATTR=y +# CONFIG_CIFS_POSIX is not set +# CONFIG_CIFS_ACL is not set +# CONFIG_CIFS_DEBUG is not set +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_CIFS_SMB2=y +# CONFIG_CIFS_FSCACHE is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=m +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m +CONFIG_NLS_UTF8=m +# CONFIG_DLM is not set + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +CONFIG_READABLE_ASM=y +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_SECTION_MISMATCH=y +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_LOCKUP_DETECTOR=y +CONFIG_HARDLOCKUP_DETECTOR_OTHER_CPU=y +CONFIG_HARDLOCKUP_DETECTOR=y +CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y +CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=1 +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1 +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +CONFIG_BOOTPARAM_HUNG_TASK_PANIC=y +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1 +CONFIG_SCHED_DEBUG=y +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_DEBUG_ON is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +CONFIG_STACKTRACE=y +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_HIGHMEM is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_INFO_REDUCED is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +# CONFIG_BOOT_PRINTK_DELAY is not set + +# +# RCU Debugging +# +# CONFIG_PROVE_RCU_DELAY is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=21 +CONFIG_RCU_CPU_STALL_VERBOSE=y +# CONFIG_RCU_CPU_STALL_INFO is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_LKDTM is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACING_SUPPORT=y +CONFIG_FTRACE=y +# CONFIG_FUNCTION_TRACER is not set +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_PREEMPT_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_ENABLE_DEFAULT_TRACERS is not set +# CONFIG_FTRACE_SYSCALLS is not set +# CONFIG_TRACER_SNAPSHOT is not set +CONFIG_BRANCH_PROFILE_NONE=y +# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set +# CONFIG_PROFILE_ALL_BRANCHES is not set +# CONFIG_STACK_TRACER is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_PROBE_EVENTS is not set +# CONFIG_RBTREE_TEST is not set +# CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_ASYNC_RAID6_TEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_TEST_STRING_HELPERS is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_STRICT_DEVMEM is not set +CONFIG_ARM_UNWIND=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_RODATA is not set +# CONFIG_DEBUG_LL is not set +CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" +CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" +# CONFIG_PID_IN_CONTEXTIDR is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_ENCRYPTED_KEYS is not set +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +CONFIG_SECURITY=y +CONFIG_SECURITYFS=y +CONFIG_SECURITY_NETWORK=y +# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_PATH=y +CONFIG_LSM_MMAP_MIN_ADDR=32768 +CONFIG_SECURITY_SELINUX=y +# CONFIG_SECURITY_SELINUX_BOOTPARAM is not set +# CONFIG_SECURITY_SELINUX_DISABLE is not set +CONFIG_SECURITY_SELINUX_DEVELOP=y +CONFIG_SECURITY_SELINUX_AVC_STATS=y +CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 +# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set +# CONFIG_SECURITY_SMACK is not set +# CONFIG_SECURITY_TOMOYO is not set +CONFIG_SECURITY_APPARMOR=y +CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1 +# CONFIG_SECURITY_YAMA is not set +# CONFIG_IMA is not set +# CONFIG_EVM is not set +# CONFIG_DEFAULT_SECURITY_SELINUX is not set +CONFIG_DEFAULT_SECURITY_APPARMOR=y +# CONFIG_DEFAULT_SECURITY_DAC is not set +CONFIG_DEFAULT_SECURITY="apparmor" +CONFIG_XOR_BLOCKS=m +CONFIG_ASYNC_CORE=m +CONFIG_ASYNC_MEMCPY=m +CONFIG_ASYNC_XOR=m +CONFIG_ASYNC_PQ=m +CONFIG_ASYNC_RAID6_RECOV=m +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP=m +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_USER is not set +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +CONFIG_CRYPTO_GF128MUL=m +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +CONFIG_CRYPTO_AUTHENC=y +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=y +# CONFIG_CRYPTO_GCM is not set +CONFIG_CRYPTO_SEQIV=y + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTR=y +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_LRW=m +CONFIG_CRYPTO_PCBC=y +CONFIG_CRYPTO_XTS=m + +# +# Hash modes +# +# CONFIG_CRYPTO_CMAC is not set +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_CRC32 is not set +# CONFIG_CRYPTO_GHASH is not set +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_RMD128=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_RMD256=m +CONFIG_CRYPTO_RMD320=m +CONFIG_CRYPTO_SHA1=y +# CONFIG_CRYPTO_SHA1_ARM is not set +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_AES_ARM=m +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_BLOWFISH_COMMON=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST_COMMON=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_FCRYPT=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_SALSA20=m +CONFIG_CRYPTO_SEED=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_ZLIB=m +CONFIG_CRYPTO_LZO=m + +# +# Random Number Generation +# +CONFIG_CRYPTO_ANSI_CPRNG=m +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +CONFIG_CRYPTO_HW=y +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_RAID6_PQ=m +CONFIG_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_IO=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set +CONFIG_CRC7=y +CONFIG_LIBCRC32C=y +# CONFIG_CRC8 is not set +CONFIG_AUDIT_GENERIC=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_XZ_DEC=y +# CONFIG_XZ_DEC_X86 is not set +# CONFIG_XZ_DEC_POWERPC is not set +# CONFIG_XZ_DEC_IA64 is not set +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +# CONFIG_XZ_DEC_SPARC is not set +CONFIG_XZ_DEC_BCJ=y +# CONFIG_XZ_DEC_TEST is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_DECOMPRESS_XZ=y +CONFIG_DECOMPRESS_LZO=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_CPU_RMAP=y +CONFIG_DQL=y +CONFIG_NLATTR=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_LRU_CACHE=m +CONFIG_AVERAGE=y +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set +CONFIG_OID_REGISTRY=m +# CONFIG_VIRTUALIZATION is not set +CONFIG_BACKPORT_INTEGRATE=y +CONFIG_BACKPORT_DIR="backports" +CONFIG_BACKPORT_VERSION="backports-20150129-0-gdd4a670" +CONFIG_BACKPORT_KERNEL_VERSION="next-20150129-0-g828f79f" +CONFIG_BACKPORT_KERNEL_NAME="Linux" +CONFIG_BACKPORT_LINUX=y +CONFIG_BACKPORT_KERNEL_3_11=y +CONFIG_BACKPORT_KERNEL_3_12=y +CONFIG_BACKPORT_KERNEL_3_13=y +CONFIG_BACKPORT_KERNEL_3_14=y +CONFIG_BACKPORT_KERNEL_3_15=y +CONFIG_BACKPORT_KERNEL_3_16=y +CONFIG_BACKPORT_KERNEL_3_17=y +CONFIG_BACKPORT_KERNEL_3_18=y +CONFIG_BACKPORT_KERNEL_3_19=y +CONFIG_BACKPORT_KERNEL_3_20=y +CONFIG_BACKPORT_KERNEL_3_21=y +CONFIG_BACKPORT_KERNEL_3_22=y +CONFIG_BACKPORT_KERNEL_3_23=y +CONFIG_BACKPORT_KERNEL_3_24=y +CONFIG_BACKPORT_KERNEL_3_25=y +CONFIG_BACKPORT_KERNEL_3_26=y +CONFIG_BACKPORT_KERNEL_3_27=y +CONFIG_BACKPORT_KERNEL_3_28=y +CONFIG_BACKPORT_KERNEL_3_29=y +CONFIG_BACKPORT_KERNEL_3_30=y +CONFIG_BACKPORT_KERNEL_3_31=y +CONFIG_BACKPORT_KERNEL_3_32=y +CONFIG_BACKPORT_KERNEL_3_33=y +CONFIG_BACKPORT_KERNEL_3_34=y +CONFIG_BACKPORT_KERNEL_3_35=y +CONFIG_BACKPORT_KERNEL_3_36=y +CONFIG_BACKPORT_KERNEL_3_37=y +CONFIG_BACKPORT_KERNEL_3_38=y +CONFIG_BACKPORT_KERNEL_3_39=y +CONFIG_BACKPORT_KERNEL_3_40=y +CONFIG_BACKPORT_KERNEL_3_41=y +CONFIG_BACKPORT_KERNEL_3_42=y +CONFIG_BACKPORT_KERNEL_3_43=y +CONFIG_BACKPORT_KERNEL_3_44=y +CONFIG_BACKPORT_KERNEL_3_45=y +CONFIG_BACKPORT_KERNEL_3_46=y +CONFIG_BACKPORT_KERNEL_3_47=y +CONFIG_BACKPORT_KERNEL_3_48=y +CONFIG_BACKPORT_KERNEL_3_49=y +CONFIG_BACKPORT_KERNEL_3_50=y +CONFIG_BACKPORT_KERNEL_3_51=y +CONFIG_BACKPORT_KERNEL_3_52=y +CONFIG_BACKPORT_KERNEL_3_53=y +CONFIG_BACKPORT_KERNEL_3_54=y +CONFIG_BACKPORT_KERNEL_3_55=y +CONFIG_BACKPORT_KERNEL_3_56=y +CONFIG_BACKPORT_KERNEL_3_57=y +CONFIG_BACKPORT_KERNEL_3_58=y +CONFIG_BACKPORT_KERNEL_3_59=y +CONFIG_BACKPORT_KERNEL_3_60=y +CONFIG_BACKPORT_KERNEL_3_61=y +CONFIG_BACKPORT_KERNEL_3_62=y +CONFIG_BACKPORT_KERNEL_3_63=y +CONFIG_BACKPORT_KERNEL_3_64=y +CONFIG_BACKPORT_KERNEL_3_65=y +CONFIG_BACKPORT_KERNEL_3_66=y +CONFIG_BACKPORT_KERNEL_3_67=y +CONFIG_BACKPORT_KERNEL_3_68=y +CONFIG_BACKPORT_KERNEL_3_69=y +CONFIG_BACKPORT_KERNEL_3_70=y +CONFIG_BACKPORT_KERNEL_3_71=y +CONFIG_BACKPORT_KERNEL_3_72=y +CONFIG_BACKPORT_KERNEL_3_73=y +CONFIG_BACKPORT_KERNEL_3_74=y +CONFIG_BACKPORT_KERNEL_3_75=y +CONFIG_BACKPORT_KERNEL_3_76=y +CONFIG_BACKPORT_KERNEL_3_77=y +CONFIG_BACKPORT_KERNEL_3_78=y +CONFIG_BACKPORT_KERNEL_3_79=y +CONFIG_BACKPORT_KERNEL_3_80=y +CONFIG_BACKPORT_KERNEL_3_81=y +CONFIG_BACKPORT_KERNEL_3_82=y +CONFIG_BACKPORT_KERNEL_3_83=y +CONFIG_BACKPORT_KERNEL_3_84=y +CONFIG_BACKPORT_KERNEL_3_85=y +CONFIG_BACKPORT_KERNEL_3_86=y +CONFIG_BACKPORT_KERNEL_3_87=y +CONFIG_BACKPORT_KERNEL_3_88=y +CONFIG_BACKPORT_KERNEL_3_89=y +CONFIG_BACKPORT_KERNEL_3_90=y +CONFIG_BACKPORT_KERNEL_3_91=y +CONFIG_BACKPORT_KERNEL_3_92=y +CONFIG_BACKPORT_KERNEL_3_93=y +CONFIG_BACKPORT_KERNEL_3_94=y +CONFIG_BACKPORT_KERNEL_3_95=y +CONFIG_BACKPORT_KERNEL_3_96=y +CONFIG_BACKPORT_KERNEL_3_97=y +CONFIG_BACKPORT_KERNEL_3_98=y +CONFIG_BACKPORT_BPAUTO_BUILD_CORDIC=m +CONFIG_BACKPORT_BPAUTO_USERSEL_BUILD_ALL=y +# CONFIG_BACKPORT_BPAUTO_BUILD_CRYPTO_CCM is not set +CONFIG_BACKPORT_CFG80211=y +# CONFIG_BACKPORT_NL80211_TESTMODE is not set +# CONFIG_BACKPORT_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_BACKPORT_CFG80211_REG_DEBUG is not set +# CONFIG_BACKPORT_CFG80211_CERTIFICATION_ONUS is not set +# CONFIG_BACKPORT_CFG80211_DEFAULT_PS is not set +CONFIG_BACKPORT_CFG80211_DEBUGFS=y +# CONFIG_BACKPORT_CFG80211_INTERNAL_REGDB is not set +CONFIG_BACKPORT_CFG80211_WEXT=y +# CONFIG_BACKPORT_LIB80211 is not set +CONFIG_BACKPORT_MAC80211=y +CONFIG_BACKPORT_MAC80211_HAS_RC=y +CONFIG_BACKPORT_MAC80211_RC_MINSTREL=y +CONFIG_BACKPORT_MAC80211_RC_MINSTREL_HT=y +# CONFIG_BACKPORT_MAC80211_RC_MINSTREL_VHT is not set +CONFIG_BACKPORT_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_BACKPORT_MAC80211_RC_DEFAULT="minstrel_ht" +# CONFIG_BACKPORT_MAC80211_MESH is not set +CONFIG_BACKPORT_MAC80211_LEDS=y +# CONFIG_BACKPORT_MAC80211_DEBUGFS is not set +# CONFIG_BACKPORT_MAC80211_MESSAGE_TRACING is not set +# CONFIG_BACKPORT_MAC80211_DEBUG_MENU is not set +CONFIG_BACKPORT_WLAN=y +# CONFIG_BACKPORT_LIBERTAS_THINFIRM is not set +CONFIG_BACKPORT_AT76C50X_USB=m +CONFIG_BACKPORT_USB_NET_RNDIS_WLAN=m +CONFIG_BACKPORT_RTL8187=m +CONFIG_BACKPORT_MAC80211_HWSIM=m +CONFIG_BACKPORT_ATH_COMMON=m +CONFIG_BACKPORT_ATH_CARDS=m +# CONFIG_BACKPORT_ATH_DEBUG is not set +CONFIG_BACKPORT_ATH9K_HW=m +CONFIG_BACKPORT_ATH9K_COMMON=m +CONFIG_BACKPORT_ATH9K_BTCOEX_SUPPORT=y +CONFIG_BACKPORT_ATH9K=m +CONFIG_BACKPORT_ATH9K_AHB=y +# CONFIG_BACKPORT_ATH9K_DEBUGFS is not set +CONFIG_BACKPORT_ATH9K_DYNACK=y +# CONFIG_BACKPORT_ATH9K_WOW is not set +CONFIG_BACKPORT_ATH9K_RFKILL=y +# CONFIG_BACKPORT_ATH9K_CHANNEL_CONTEXT is not set +CONFIG_BACKPORT_ATH9K_PCOEM=y +CONFIG_BACKPORT_ATH9K_HTC=m +# CONFIG_BACKPORT_ATH9K_HTC_DEBUGFS is not set +CONFIG_BACKPORT_CARL9170=m +CONFIG_BACKPORT_CARL9170_LEDS=y +CONFIG_BACKPORT_CARL9170_WPC=y +CONFIG_BACKPORT_CARL9170_HWRNG=y +CONFIG_BACKPORT_ATH6KL=m +# CONFIG_BACKPORT_ATH6KL_SDIO is not set +CONFIG_BACKPORT_ATH6KL_USB=m +# CONFIG_BACKPORT_ATH6KL_DEBUG is not set +CONFIG_BACKPORT_AR5523=m +CONFIG_BACKPORT_ATH10K=m +# CONFIG_BACKPORT_ATH10K_DEBUG is not set +# CONFIG_BACKPORT_ATH10K_DEBUGFS is not set +CONFIG_BACKPORT_WCN36XX=m +# CONFIG_BACKPORT_WCN36XX_DEBUGFS is not set +# CONFIG_BACKPORT_BRCMFMAC is not set +# CONFIG_BACKPORT_LIBERTAS is not set +CONFIG_BACKPORT_P54_COMMON=m +CONFIG_BACKPORT_P54_USB=m +# CONFIG_BACKPORT_P54_SPI is not set +CONFIG_BACKPORT_RT2X00=m +CONFIG_BACKPORT_RT2500USB=m +CONFIG_BACKPORT_RT73USB=m +CONFIG_BACKPORT_RT2800USB=m +CONFIG_BACKPORT_RT2800USB_RT33XX=y +CONFIG_BACKPORT_RT2800USB_RT35XX=y +CONFIG_BACKPORT_RT2800USB_RT3573=y +CONFIG_BACKPORT_RT2800USB_RT53XX=y +CONFIG_BACKPORT_RT2800USB_RT55XX=y +CONFIG_BACKPORT_RT2800USB_UNKNOWN=y +CONFIG_BACKPORT_RT2800_LIB=m +CONFIG_BACKPORT_RT2X00_LIB_USB=m +CONFIG_BACKPORT_RT2X00_LIB=m +CONFIG_BACKPORT_RT2X00_LIB_FIRMWARE=y +CONFIG_BACKPORT_RT2X00_LIB_CRYPTO=y +CONFIG_BACKPORT_RT2X00_LIB_LEDS=y +# CONFIG_BACKPORT_RT2X00_DEBUG is not set +CONFIG_BACKPORT_RTL_CARDS=m +# CONFIG_BACKPORT_RTL8192CU is not set +CONFIG_BACKPORT_RTL8192C_COMMON=m +CONFIG_BACKPORT_WL_TI=y +# CONFIG_BACKPORT_WL1251 is not set +# CONFIG_BACKPORT_WL12XX is not set +# CONFIG_BACKPORT_WL18XX is not set +CONFIG_BACKPORT_ZD1211RW=m +# CONFIG_BACKPORT_ZD1211RW_DEBUG is not set +CONFIG_BACKPORT_MWIFIEX=m +# CONFIG_BACKPORT_MWIFIEX_SDIO is not set +CONFIG_BACKPORT_MWIFIEX_USB=m +CONFIG_BACKPORT_RSI_91X=m +# CONFIG_BACKPORT_RSI_DEBUGFS is not set +# CONFIG_BACKPORT_RSI_SDIO is not set +CONFIG_BACKPORT_RSI_USB=m +CONFIG_BACKPORT_USB_NET_DRIVERS=y +CONFIG_BACKPORT_USB_USBNET=m +CONFIG_BACKPORT_USB_NET_CDCETHER=m +CONFIG_BACKPORT_USB_NET_CDC_NCM=m +CONFIG_BACKPORT_USB_NET_CDC_MBIM=m +CONFIG_BACKPORT_USB_NET_RNDIS_HOST=m +CONFIG_BACKPORT_USB_NET_QMI_WWAN=m +CONFIG_BACKPORT_USB_SIERRA_NET=m +# CONFIG_BACKPORT_NFC is not set +# CONFIG_BACKPORT_IEEE802154 is not set + +# +# USB Device Class drivers +# +CONFIG_BACKPORT_USB_WDM=m +CONFIG_RTL8192CU=m +CONFIG_RTL8812AU=m +CONFIG_RTL8188EU=m +CONFIG_RTL8192DU=m diff --git a/board/odroidc2/mkimage.sh b/board/odroidc2/mkimage.sh new file mode 100755 index 0000000000..39e8b5f230 --- /dev/null +++ b/board/odroidc2/mkimage.sh @@ -0,0 +1,16 @@ +#!/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.bin +export UBOOT_SEEK=97 +BL1=$IMG_DIR/bl1.bin.hardkernel + +source $COMMON_DIR/mkimage.sh + +dd conv=notrunc if=$BL1 of=$DISK_IMG bs=1 count=442 +dd conv=notrunc if=$BL1 of=$DISK_IMG bs=512 skip=1 seek=1 + diff --git a/board/odroidc2/overlay/etc/board b/board/odroidc2/overlay/etc/board new file mode 100644 index 0000000000..99e98869a7 --- /dev/null +++ b/board/odroidc2/overlay/etc/board @@ -0,0 +1 @@ +odroidc2 diff --git a/board/odroidc2/overlay/etc/init.d/S02ethup b/board/odroidc2/overlay/etc/init.d/S02ethup new file mode 100755 index 0000000000..fafddcbc7c --- /dev/null +++ b/board/odroidc2/overlay/etc/init.d/S02ethup @@ -0,0 +1,4 @@ +#!/bin/bash + +ifconfig eth0 up + diff --git a/board/odroidc2/overlay/etc/init.d/boardsn b/board/odroidc2/overlay/etc/init.d/boardsn new file mode 100755 index 0000000000..34ca56a576 --- /dev/null +++ b/board/odroidc2/overlay/etc/init.d/boardsn @@ -0,0 +1,5 @@ +#!/bin/bash + +sn=$(cat /sys/class/net/eth0/address 2>/dev/null | tr -d ':') +echo ${sn: -8} + diff --git a/board/odroidc2/overlay/etc/os.conf b/board/odroidc2/overlay/etc/os.conf new file mode 100644 index 0000000000..e12b10ec7d --- /dev/null +++ b/board/odroidc2/overlay/etc/os.conf @@ -0,0 +1,11 @@ +os_debug="false" +os_prereleases="false" +os_tty_login="ttyS0" +os_eth="eth0" +os_wlan="wlan0" +os_ppp="ppp0" +os_networkless="false" +os_firmware_method="github" +os_firmware_repo="ccrisan/thingos" +os_firmware_username="" +os_firmware_password="" diff --git a/board/odroidc2/postscript.sh b/board/odroidc2/postscript.sh new file mode 100755 index 0000000000..f2ae24cf74 --- /dev/null +++ b/board/odroidc2/postscript.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# boot directory +mkdir -p $BOOT_DIR + +cp $IMG_DIR/Image $BOOT_DIR +cp $IMG_DIR/meson64_odroidc2.dtb $BOOT_DIR +cp $BOARD_DIR/bl1.bin.hardkernel $IMG_DIR +cp $BOARD_DIR/u-boot.bin $IMG_DIR +cp $BOARD_DIR/boot.ini $BOOT_DIR + +# disable software updating +sed -i 's/enable_update true/enable_update false/' $TARGET/etc/motioneye.conf diff --git a/board/odroidc2/u-boot.bin b/board/odroidc2/u-boot.bin new file mode 100644 index 0000000000..0bc9ddc3b5 Binary files /dev/null and b/board/odroidc2/u-boot.bin differ diff --git a/board/odroidxu4/bl1.bin.hardkernel b/board/odroidxu4/bl1.bin.hardkernel new file mode 100644 index 0000000000..b4d79f5f3a Binary files /dev/null and b/board/odroidxu4/bl1.bin.hardkernel differ diff --git a/board/odroidxu4/bl2.bin.hardkernel b/board/odroidxu4/bl2.bin.hardkernel new file mode 100644 index 0000000000..36019ffa43 Binary files /dev/null and b/board/odroidxu4/bl2.bin.hardkernel differ diff --git a/board/odroidxu4/boot.ini b/board/odroidxu4/boot.ini new file mode 100644 index 0000000000..a9c915f321 --- /dev/null +++ b/board/odroidxu4/boot.ini @@ -0,0 +1,7 @@ +ODROIDXU-UBOOT-CONFIG + +setenv fdt_high "0xffffffff" +setenv bootcmd "fatload mmc 0:1 0x40008000 zImage; fatload mmc 0:1 0x44000000 exynos5422-odroidxu3.dtb; bootz 0x40008000 - 0x44000000" +setenv bootargs "console=tty1 root=/dev/mmcblk0p2 rootwait ro no_console_suspend panic=10 quiet loglevel=1 ipv6.disable=1" +boot + diff --git a/board/odroidxu4/kernel.config b/board/odroidxu4/kernel.config new file mode 100644 index 0000000000..9ca077a763 --- /dev/null +++ b/board/odroidxu4/kernel.config @@ -0,0 +1,4400 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm 3.10.92 Kernel Configuration +# +CONFIG_ARM=y +CONFIG_ARM_HAS_SG_CHAIN=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_ARM_DMA_USE_IOMMU=y +CONFIG_ARM_DMA_IOMMU_ALIGNMENT=8 +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_NO_IOPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_ARM_PATCH_PHYS_VIRT=y +CONFIG_NEED_MACH_GPIO_H=y +CONFIG_NEED_MACH_MEMORY_H=y +CONFIG_GENERIC_BUG=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y + +# +# General setup +# +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_KERNEL_LZO=y +# CONFIG_KERNEL_GZIP is not set +# CONFIG_KERNEL_LZMA is not set +CONFIG_KERNEL_XZ=y +# CONFIG_KERNEL_LZO is not set +CONFIG_DEFAULT_HOSTNAME="(none)" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_FHANDLE=y +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_IRQ_DOMAIN=y +# CONFIG_IRQ_DOMAIN_DEBUG is not set +CONFIG_SPARSE_IRQ=y +CONFIG_KTIME_SCALAR=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_ARCH_HAS_TICK_BROADCAST=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# Timers subsystem +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ_COMMON=y +# CONFIG_HZ_PERIODIC is not set +CONFIG_NO_HZ_IDLE=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_IRQ_TIME_ACCOUNTING is not set +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y + +# +# RCU Subsystem +# +CONFIG_TREE_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y +CONFIG_RCU_STALL_COMMON=y +# CONFIG_RCU_USER_QS is not set +CONFIG_RCU_FANOUT=32 +CONFIG_RCU_FANOUT_LEAF=16 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_RCU_FAST_NO_HZ is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_RCU_BOOST is not set +# CONFIG_RCU_NOCB_CPU is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=17 +CONFIG_CGROUPS=y +CONFIG_CGROUP_DEBUG=y +CONFIG_CGROUP_FREEZER=y +# CONFIG_CGROUP_DEVICE is not set +# CONFIG_CPUSETS is not set +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +# CONFIG_MEMCG is not set +# CONFIG_CGROUP_PERF is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_RT_GROUP_SCHED=y +# CONFIG_BLK_CGROUP is not set +# CONFIG_CHECKPOINT_RESTORE is not set +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_UIDGID_CONVERTED=y +CONFIG_UIDGID_STRICT_TYPE_CHECKS=y +# CONFIG_SCHED_AUTOGROUP is not set +# CONFIG_SYSFS_DEPRECATED is not set +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_RD_XZ=y +CONFIG_RD_LZO=y +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_HAVE_UID16=y +CONFIG_HOTPLUG=y +CONFIG_PANIC_TIMEOUT=0 +CONFIG_EXPERT=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_SLUB_DEBUG is not set +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +# CONFIG_PROFILING is not set +CONFIG_TRACEPOINTS=y +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +# CONFIG_JUMP_LABEL is not set +# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP_FILTER=y +CONFIG_HAVE_CONTEXT_TRACKING=y +CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_MODULES_USE_ELF_REL=y +CONFIG_CLONE_BACKWARDS=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_OLD_SIGACTION=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +# CONFIG_MODULE_SIG is not set +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +CONFIG_BLK_DEV_BSGLIB=y +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_PADATA=y +CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_FREEZER=y + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_MULTIPLATFORM is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C24XX is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +CONFIG_ARCH_EXYNOS=y +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP1 is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_KEYBOARD_GPIO_POLLED is not set +CONFIG_PLAT_SAMSUNG=y +CONFIG_PLAT_S5P=y + +# +# Boot options +# +# CONFIG_S3C_BOOT_ERROR_RESET is not set +CONFIG_S3C_BOOT_UART_FORCE_FIFO=y +CONFIG_S3C_LOWLEVEL_UART_PORT=2 +# CONFIG_S5P_CLOCK is not set +CONFIG_SAMSUNG_IRQ_VIC_TIMER=y +# CONFIG_S5P_IRQ is not set +CONFIG_SAMSUNG_GPIOLIB_4BIT=y +CONFIG_S5P_GPIO_DRVSTR=y +CONFIG_SAMSUNG_GPIO_EXTRA=0 +CONFIG_S3C_GPIO_SPACE=0 +CONFIG_S3C_GPIO_TRACK=y +# CONFIG_S3C_ADC is not set +CONFIG_S5P_DEV_MFC=y +CONFIG_S3C24XX_PWM=y +CONFIG_SAMSUNG_DMADEV=y + +# +# Power management +# +# CONFIG_SAMSUNG_PM_DEBUG is not set +# CONFIG_SAMSUNG_PM_CHECK is not set +CONFIG_S5P_PM=y +CONFIG_S5P_SLEEP=y +# CONFIG_SAMSUNG_CORE_TEST is not set +# CONFIG_PLAT_SPEAR is not set + +# +# SAMSUNG EXYNOS SoCs Support +# +# CONFIG_ARCH_EXYNOS4 is not set +CONFIG_ARCH_EXYNOS5=y + +# +# EXYNOS SoCs +# +# CONFIG_SOC_EXYNOS5250 is not set +CONFIG_SOC_EXYNOS5422=y +CONFIG_SOC_EXYNOS5422_REV_0=y +# CONFIG_SOC_EXYNOS5430 is not set +CONFIG_EXYNOS5422_BTS=y +# CONFIG_SOC_EXYNOS5440 is not set +CONFIG_EXYNOS_SNAPSHOT=y +# CONFIG_EXYNOS_SNAPSHOT_REG is not set +# CONFIG_EXYNOS_SNAPSHOT_HRTIMER is not set +# CONFIG_EXYNOS_SNAPSHOT_SOFTIRQ is not set +# CONFIG_EXYNOS_SNAPSHOT_HOOK_LOGGER is not set +CONFIG_EXYNOS_SNAPSHOT_PANIC_REBOOT=y +# CONFIG_EXYNOS_SNAPSHOT_FORCE_DUMP_MODE is not set +CONFIG_EXYNOS5_DYNAMIC_CPU_HOTPLUG=y +CONFIG_EXYNOS_CONTENT_PATH_PROTECTION=y +# CONFIG_ASV_MARGIN_TEST is not set + +# +# Flattened Device Tree based board for EXYNOS SoCs +# +# CONFIG_MACH_EXYNOS5_DT is not set +# CONFIG_MACH_SMDK5422 is not set +# CONFIG_MACH_XYREF5422 is not set +CONFIG_MACH_ODROIDXU3=y +# CONFIG_MACH_XYREF5430 is not set + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_TRUSTZONE=y +# CONFIG_ARM_LPAE is not set +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_ARM_THUMB=y +# CONFIG_ARM_THUMBEE is not set +CONFIG_ARM_VIRT_EXT=y +CONFIG_SWP_EMULATE=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_KUSER_HELPERS=y +CONFIG_L2_AUTO_CLOCK_DISABLE=y +# CONFIG_CACHE_L2X0 is not set +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_NR_BANKS=16 +CONFIG_MULTI_IRQ_HANDLER=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_742230 is not set +# CONFIG_ARM_ERRATA_742231 is not set +# CONFIG_ARM_ERRATA_643719 is not set +# CONFIG_ARM_ERRATA_720789 is not set +# CONFIG_ARM_ERRATA_743622 is not set +# CONFIG_ARM_ERRATA_751472 is not set +# CONFIG_ARM_ERRATA_754322 is not set +# CONFIG_ARM_ERRATA_754327 is not set +# CONFIG_ARM_ERRATA_764369 is not set +# CONFIG_ARM_ERRATA_761320 is not set +# CONFIG_ARM_ERRATA_766421 is not set +# CONFIG_ARM_ERRATA_773022 is not set +# CONFIG_ARM_ERRATA_774769 is not set +# CONFIG_ARM_ERRATA_775420 is not set +# CONFIG_ARM_ERRATA_798181 is not set +# CONFIG_FIQ_DEBUGGER is not set + +# +# Bus support +# +CONFIG_ARM_AMBA=y +# CONFIG_PCI_SYSCALL is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_HAVE_SMP=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_ARM_CPU_TOPOLOGY=y +CONFIG_SCHED_MC=y +# CONFIG_SCHED_SMT is not set +CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE=y +CONFIG_SCHED_HMP=y +# CONFIG_SCHED_HMP_PRIO_FILTER is not set +CONFIG_HMP_FAST_CPU_MASK="4-7" +CONFIG_HMP_SLOW_CPU_MASK="0-3" +CONFIG_HMP_VARIABLE_SCALE=y +CONFIG_HMP_FREQUENCY_INVARIANT_SCALE=y +CONFIG_HAVE_ARM_SCU=y +# CONFIG_HAVE_ARM_ARCH_TIMER is not set +# CONFIG_MCPM is not set +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_NR_CPUS=8 +CONFIG_HOTPLUG_CPU=y +# CONFIG_ARM_PSCI is not set +CONFIG_LOCAL_TIMERS=y +CONFIG_ARCH_NR_GPIO=0 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_HZ=200 +CONFIG_SCHED_HRTICK=y +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HAVE_ARCH_PFN_VALID=y +CONFIG_HIGHMEM=y +# CONFIG_HIGHPTE is not set +CONFIG_HW_PERF_EVENTS=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_MEMORY_ISOLATION=y +# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=999999 +CONFIG_COMPACTION=y +CONFIG_MIGRATION=y +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_BOUNCE=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CROSS_MEMORY_ATTACH=y +# CONFIG_CLEANCACHE is not set +# CONFIG_FRONTSWAP is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +CONFIG_SECCOMP=y +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_XEN is not set +# CONFIG_ARM_FLUSH_CONSOLE_ON_RESTART is not set + +# +# Boot options +# +CONFIG_USE_OF=y +# CONFIG_ATAGS is not set +CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE=y +CONFIG_BUILD_ARM_APPENDED_DTB_IMAGE_NAMES="exynos5422-odroidxu3" +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_ARM_APPENDED_DTB=y +CONFIG_ARM_ATAG_DTB_COMPAT=y +# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER is not set +CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND=y +CONFIG_CMDLINE="console=ttySAC2,115200n8 vmalloc=512M" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set +# CONFIG_CRASH_DUMP is not set +CONFIG_AUTO_ZRELADDR=y + +# +# CPU Power Management +# + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_STAT=y +# CONFIG_CPU_FREQ_STAT_DETAILS is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +# CONFIG_GENERIC_CPUFREQ_CPU0 is not set + +# +# ARM CPU frequency scaling drivers +# +# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set +# CONFIG_ARM_EXYNOS_CPUFREQ is not set +CONFIG_ARM_EXYNOS_MP_CPUFREQ=y +# CONFIG_ARM_EXYNOS4210_CPUFREQ is not set +# CONFIG_ARM_EXYNOS4X12_CPUFREQ is not set +# CONFIG_ARM_EXYNOS5250_CPUFREQ is not set +# CONFIG_ARM_EXYNOS5430_CPUFREQ is not set +CONFIG_ARM_EXYNOS5422_CPUFREQ=y +# CONFIG_ARM_EXYNOS5440_CPUFREQ is not set +# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set +CONFIG_CPU_IDLE=y +# CONFIG_CPU_IDLE_MULTIPLE_DRIVERS is not set +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_IDLE_GOV_MENU=y +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set +# CONFIG_EXYNOS_CPUIDLE_C2 is not set +# CONFIG_EXYNOS_IDLE_CLOCK_DOWN is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y +CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y +CONFIG_BINFMT_SCRIPT=y +# CONFIG_HAVE_AOUT is not set +CONFIG_BINFMT_MISC=m +CONFIG_COREDUMP=y + +# +# Power management options +# +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_HAS_WAKELOCK=y +CONFIG_WAKELOCK=y +CONFIG_PM_SLEEP=y +CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_AUTOSLEEP=y +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=100 +CONFIG_PM_WAKELOCKS_GC=y +CONFIG_PM_RUNTIME=y +CONFIG_PM_RUNTIME_TEST_SYSFS=y +CONFIG_PM=y +CONFIG_PM_DEBUG=y +CONFIG_PM_ADVANCED_DEBUG=y +# CONFIG_PM_TEST_SUSPEND is not set +CONFIG_PM_SLEEP_DEBUG=y +# CONFIG_APM_EMULATION is not set +CONFIG_ARCH_HAS_OPP=y +CONFIG_PM_OPP=y +CONFIG_PM_CLK=y +CONFIG_PM_GENERIC_DOMAINS=y +CONFIG_PM_GENERIC_DOMAINS_SLEEP=y +CONFIG_PM_GENERIC_DOMAINS_RUNTIME=y +CONFIG_CPU_PM=y +# CONFIG_SUSPEND_TIME is not set +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_ARM_CPU_SUSPEND=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_DIAG is not set +CONFIG_UNIX=y +# CONFIG_UNIX_DIAG is not set +CONFIG_XFRM=y +CONFIG_XFRM_ALGO=y +CONFIG_XFRM_USER=y +# CONFIG_XFRM_SUB_POLICY is not set +CONFIG_XFRM_MIGRATE=y +# CONFIG_XFRM_STATISTICS is not set +CONFIG_XFRM_IPCOMP=m +CONFIG_NET_KEY=y +# CONFIG_NET_KEY_MIGRATE is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +# CONFIG_IP_FIB_TRIE_STATS is not set +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_ROUTE_CLASSID=y +# CONFIG_IP_PNP is not set +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m +CONFIG_NET_IP_TUNNEL=m +CONFIG_NET_IPGRE=m +CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_IP_MROUTE=y +CONFIG_IP_MROUTE_MULTIPLE_TABLES=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +CONFIG_ARPD=y +CONFIG_SYN_COOKIES=y +# CONFIG_NET_IPVTI is not set +CONFIG_INET_AH=m +CONFIG_INET_ESP=y +CONFIG_INET_IPCOMP=m +CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=m +CONFIG_INET_XFRM_MODE_BEET=m +CONFIG_INET_LRO=m +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_INET_UDP_DIAG is not set +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=y +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HSTCP=m +# CONFIG_TCP_CONG_HYBLA is not set +# CONFIG_TCP_CONG_VEGAS is not set +# CONFIG_TCP_CONG_SCALABLE is not set +# CONFIG_TCP_CONG_LP is not set +# CONFIG_TCP_CONG_VENO is not set +# CONFIG_TCP_CONG_YEAH is not set +# CONFIG_TCP_CONG_ILLINOIS is not set +CONFIG_DEFAULT_CUBIC=y +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="cubic" +CONFIG_TCP_MD5SIG=y +# CONFIG_IPV6 is not set +# CONFIG_ANDROID_PARANOID_NETWORK is not set +CONFIG_NET_ACTIVITY_STATS=y +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=y +CONFIG_NETFILTER_NETLINK_ACCT=m +CONFIG_NETFILTER_NETLINK_QUEUE=y +CONFIG_NETFILTER_NETLINK_LOG=y +CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_MARK=y +# CONFIG_NF_CONNTRACK_ZONES is not set +CONFIG_NF_CONNTRACK_PROCFS=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CONNTRACK_TIMEOUT=y +CONFIG_NF_CONNTRACK_TIMESTAMP=y +CONFIG_NF_CONNTRACK_LABELS=y +CONFIG_NF_CT_PROTO_DCCP=m +CONFIG_NF_CT_PROTO_GRE=m +CONFIG_NF_CT_PROTO_SCTP=m +CONFIG_NF_CT_PROTO_UDPLITE=m +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_BROADCAST=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NF_CT_NETLINK_TIMEOUT=m +CONFIG_NF_CT_NETLINK_HELPER=m +CONFIG_NETFILTER_NETLINK_QUEUE_CT=y +CONFIG_NF_NAT=m +CONFIG_NF_NAT_NEEDED=y +CONFIG_NF_NAT_PROTO_DCCP=m +CONFIG_NF_NAT_PROTO_UDPLITE=m +CONFIG_NF_NAT_PROTO_SCTP=m +CONFIG_NF_NAT_AMANDA=m +CONFIG_NF_NAT_FTP=m +CONFIG_NF_NAT_IRC=m +CONFIG_NF_NAT_SIP=m +CONFIG_NF_NAT_TFTP=m +CONFIG_NETFILTER_TPROXY=m +CONFIG_NETFILTER_XTABLES=y + +# +# Xtables combined modules +# +CONFIG_NETFILTER_XT_MARK=m +CONFIG_NETFILTER_XT_CONNMARK=m +# CONFIG_NETFILTER_XT_SET is not set + +# +# Xtables targets +# +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_CT=m +CONFIG_NETFILTER_XT_TARGET_DSCP=m +CONFIG_NETFILTER_XT_TARGET_HL=m +CONFIG_NETFILTER_XT_TARGET_HMARK=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_LOG=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NETMAP=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +CONFIG_NETFILTER_XT_TARGET_NOTRACK=m +CONFIG_NETFILTER_XT_TARGET_RATEEST=m +CONFIG_NETFILTER_XT_TARGET_REDIRECT=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +CONFIG_NETFILTER_XT_TARGET_TPROXY=m +CONFIG_NETFILTER_XT_TARGET_TRACE=m +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m + +# +# Xtables matches +# +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +CONFIG_NETFILTER_XT_MATCH_BPF=m +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLABEL=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_CPU=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ECN=y +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_HL=y +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +# CONFIG_NETFILTER_XT_MATCH_IPVS is not set +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_NFACCT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=y +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_SOCKET=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_MAX=256 +CONFIG_IP_SET_BITMAP_IP=m +CONFIG_IP_SET_BITMAP_IPMAC=m +CONFIG_IP_SET_BITMAP_PORT=m +CONFIG_IP_SET_HASH_IP=m +CONFIG_IP_SET_HASH_IPPORT=m +CONFIG_IP_SET_HASH_IPPORTIP=m +CONFIG_IP_SET_HASH_IPPORTNET=m +CONFIG_IP_SET_HASH_NET=m +CONFIG_IP_SET_HASH_NETPORT=m +CONFIG_IP_SET_HASH_NETIFACE=m +CONFIG_IP_SET_LIST_SET=m +CONFIG_IP_VS=m +# CONFIG_IP_VS_DEBUG is not set +CONFIG_IP_VS_TAB_BITS=12 + +# +# IPVS transport protocol load balancing support +# +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_AH_ESP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +CONFIG_IP_VS_PROTO_SCTP=y + +# +# IPVS scheduler +# +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m + +# +# IPVS SH scheduler +# +CONFIG_IP_VS_SH_TAB_BITS=8 + +# +# IPVS application helper +# +CONFIG_IP_VS_FTP=m +CONFIG_IP_VS_NFCT=y +CONFIG_IP_VS_PE_SIP=m + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=m +CONFIG_NF_CONNTRACK_IPV4=m +CONFIG_NF_CONNTRACK_PROC_COMPAT=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_RPFILTER=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_REJECT_SKERR=y +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_NF_NAT_IPV4=m +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_NF_NAT_SNMP_BASIC=m +CONFIG_NF_NAT_PROTO_GRE=m +CONFIG_NF_NAT_PPTP=m +CONFIG_NF_NAT_H323=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=y +CONFIG_IP_NF_ARPFILTER=y +CONFIG_IP_NF_ARP_MANGLE=y +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +CONFIG_L2TP=m +CONFIG_L2TP_DEBUGFS=m +CONFIG_L2TP_V3=y +CONFIG_L2TP_IP=m +CONFIG_L2TP_ETH=m +# CONFIG_BRIDGE is not set +CONFIG_HAVE_NET_DSA=y +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +CONFIG_NET_SCHED=y + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFB=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_MQPRIO=m +CONFIG_NET_SCH_CHOKE=m +CONFIG_NET_SCH_QFQ=m +CONFIG_NET_SCH_CODEL=m +CONFIG_NET_SCH_FQ_CODEL=m +CONFIG_NET_SCH_INGRESS=m +CONFIG_NET_SCH_PLUG=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_FLOW=m +CONFIG_NET_CLS_CGROUP=m +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_STACK=32 +CONFIG_NET_EMATCH_CMP=m +CONFIG_NET_EMATCH_NBYTE=m +CONFIG_NET_EMATCH_U32=y +CONFIG_NET_EMATCH_META=m +CONFIG_NET_EMATCH_TEXT=m +CONFIG_NET_EMATCH_IPSET=m +CONFIG_NET_CLS_ACT=y +CONFIG_NET_ACT_POLICE=m +CONFIG_NET_ACT_GACT=m +CONFIG_GACT_PROB=y +CONFIG_NET_ACT_MIRRED=m +CONFIG_NET_ACT_IPT=m +CONFIG_NET_ACT_NAT=m +CONFIG_NET_ACT_PEDIT=m +CONFIG_NET_ACT_SIMP=m +CONFIG_NET_ACT_SKBEDIT=m +CONFIG_NET_ACT_CSUM=m +CONFIG_NET_CLS_IND=y +CONFIG_NET_SCH_FIFO=y +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=m +# CONFIG_BATMAN_ADV is not set +# CONFIG_OPENVSWITCH is not set +CONFIG_VSOCKETS=m +CONFIG_NETLINK_MMAP=y +CONFIG_NETLINK_DIAG=m +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +CONFIG_NETPRIO_CGROUP=m +CONFIG_BQL=y +# CONFIG_BPF_JIT is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NET_DROP_MONITOR is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +CONFIG_BT=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_ATH3K=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIUART_3WIRE=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +CONFIG_BT_HCIVHCI=m +# CONFIG_BT_MRVL is not set +# CONFIG_BT_ATH3K is not set +# CONFIG_AF_RXRPC is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +# CONFIG_CFG80211 is not set +# CONFIG_LIB80211 is not set + +# +# CFG80211 needs to be enabled for MAC80211 +# +CONFIG_WIMAX=m +CONFIG_WIMAX_DEBUG_LEVEL=8 +CONFIG_RFKILL=m +CONFIG_RFKILL_PM=y +CONFIG_RFKILL_LEDS=y +# CONFIG_RFKILL_INPUT is not set +CONFIG_RFKILL_REGULATOR=m +# CONFIG_RFKILL_GPIO is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set +CONFIG_NFC=m +CONFIG_NFC_NCI=m +CONFIG_NFC_HCI=m +# CONFIG_NFC_SHDLC is not set + +# +# Near Field Communication (NFC) devices +# +CONFIG_NFC_PN533=m +# CONFIG_NFC_PN544 is not set +# CONFIG_NFC_MICROREAD is not set +CONFIG_HAVE_BPF_JIT=y + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="mfc_fw.bin edid/1024x768.bin edid/1280x800.bin edid/1920x1080.bin edid/720x480.bin edid/800x600.bin edid/800x480.bin edid/1280x1024.bin edid/1280x720.bin edid/1440x900.bin edid/1680x1050.bin edid/1920x1080_50hz.bin edid/640x480.bin edid/720x576.bin" +CONFIG_EXTRA_FIRMWARE_DIR="firmware" +# CONFIG_FW_LOADER_USER_HELPER is not set +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_GENERIC_CPU_DEVICES is not set +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_SPI=y +CONFIG_REGMAP_MMIO=y +CONFIG_REGMAP_IRQ=y +CONFIG_DMA_SHARED_BUFFER=y +CONFIG_CMA=y +# CONFIG_CMA_DEBUG is not set + +# +# Default contiguous memory area size: +# +CONFIG_CMA_SIZE_MBYTES=256 +CONFIG_CMA_SIZE_SEL_MBYTES=y +# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set +# CONFIG_CMA_SIZE_SEL_MIN is not set +# CONFIG_CMA_SIZE_SEL_MAX is not set +CONFIG_CMA_ALIGNMENT=8 +CONFIG_CMA_AREAS=16 + +# +# Bus devices +# +# CONFIG_CONNECTOR is not set +# CONFIG_MTD is not set +CONFIG_DTC=y +CONFIG_OF=y + +# +# Device Tree and Open Firmware support +# +CONFIG_PROC_DEVICETREE=y +CONFIG_OF_SELFTEST=y +CONFIG_OF_FLATTREE=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_IRQ=y +CONFIG_OF_DEVICE=y +CONFIG_OF_I2C=y +CONFIG_OF_NET=y +CONFIG_OF_MDIO=y +CONFIG_PARPORT=m +# CONFIG_PARPORT_PC is not set +# CONFIG_PARPORT_GSC is not set +# CONFIG_PARPORT_AX88796 is not set +# CONFIG_PARPORT_1284 is not set +CONFIG_PARPORT_NOT_PC=y +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 +CONFIG_BLK_DEV_CRYPTOLOOP=y +# CONFIG_BLK_DEV_DRBD is not set +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_RAM=m +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=8192 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +CONFIG_ATA_OVER_ETH=m +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set + +# +# Misc devices +# +# CONFIG_SENSORS_LIS3LV02D is not set +# CONFIG_AD525X_DPOT is not set +# CONFIG_ATMEL_PWM is not set +# CONFIG_DUMMY_IRQ is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ATMEL_SSC is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_TI_DAC7512 is not set +# CONFIG_UID_STAT is not set +# CONFIG_BMP085_I2C is not set +# CONFIG_BMP085_SPI is not set +# CONFIG_USB_SWITCH_FSA9480 is not set +# CONFIG_LATTICE_ECP3_CONFIG is not set +# CONFIG_SRAM is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +CONFIG_EEPROM_93CX6=m +# CONFIG_EEPROM_93XX46 is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +# CONFIG_SENSORS_LIS3_SPI is not set +# CONFIG_SENSORS_LIS3_I2C is not set + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set +# CONFIG_MIPI_LLI is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +CONFIG_SCSI_NETLINK=y +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=m +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +CONFIG_SCSI_FC_ATTRS=m +CONFIG_SCSI_ISCSI_ATTRS=m +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m +# CONFIG_SCSI_UFSHCD is not set +CONFIG_LIBFC=m +CONFIG_LIBFCOE=m +CONFIG_FCOE=m +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +CONFIG_MD_RAID456=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m +# CONFIG_BCACHE is not set +CONFIG_BLK_DEV_DM_BUILTIN=y +CONFIG_BLK_DEV_DM=y +# CONFIG_DM_DEBUG is not set +CONFIG_DM_BUFIO=m +CONFIG_DM_BIO_PRISON=m +CONFIG_DM_PERSISTENT_DATA=m +CONFIG_DM_CRYPT=y +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_THIN_PROVISIONING=m +CONFIG_DM_DEBUG_BLOCK_STACK_TRACING=y +CONFIG_DM_CACHE=m +CONFIG_DM_CACHE_MQ=m +CONFIG_DM_CACHE_CLEANER=m +CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m +# CONFIG_DM_LOG_USERSPACE is not set +# CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set +# CONFIG_DM_DELAY is not set +# CONFIG_DM_UEVENT is not set +# CONFIG_DM_FLAKEY is not set +CONFIG_DM_VERITY=m +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m +CONFIG_LOOPBACK_TARGET=m +CONFIG_TCM_FC=m +CONFIG_ISCSI_TARGET=m +CONFIG_NETDEVICES=y +CONFIG_NET_CORE=y +CONFIG_BONDING=m +CONFIG_DUMMY=m +# CONFIG_EQUALIZER is not set +CONFIG_MII=y +# CONFIG_IFB is not set +CONFIG_NET_TEAM=m +CONFIG_NET_TEAM_MODE_BROADCAST=m +CONFIG_NET_TEAM_MODE_ROUNDROBIN=m +CONFIG_NET_TEAM_MODE_RANDOM=m +CONFIG_NET_TEAM_MODE_ACTIVEBACKUP=m +CONFIG_NET_TEAM_MODE_LOADBALANCE=m +CONFIG_MACVLAN=m +CONFIG_MACVTAP=m +# CONFIG_VXLAN is not set +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y +CONFIG_NETPOLL=y +CONFIG_NETPOLL_TRAP=y +CONFIG_NET_POLL_CONTROLLER=y +CONFIG_TUN=y +CONFIG_VETH=m + +# +# CAIF transport drivers +# + +# +# Distributed Switch Architecture drivers +# +# CONFIG_NET_DSA_MV88E6XXX is not set +# CONFIG_NET_DSA_MV88E6060 is not set +# CONFIG_NET_DSA_MV88E6XXX_NEED_PPU is not set +# CONFIG_NET_DSA_MV88E6131 is not set +# CONFIG_NET_DSA_MV88E6123_61_65 is not set +CONFIG_ETHERNET=y +# CONFIG_NET_CADENCE is not set +CONFIG_NET_VENDOR_BROADCOM=y +# CONFIG_B44 is not set +# CONFIG_NET_CALXEDA_XGMAC is not set +CONFIG_NET_VENDOR_CIRRUS=y +# CONFIG_CS89x0 is not set +# CONFIG_DM9000 is not set +# CONFIG_DNET is not set +CONFIG_NET_VENDOR_FARADAY=y +# CONFIG_FTMAC100 is not set +# CONFIG_FTGMAC100 is not set +CONFIG_NET_VENDOR_INTEL=y +# CONFIG_NET_VENDOR_I825XX is not set +CONFIG_NET_VENDOR_MARVELL=y +# CONFIG_MVMDIO is not set +CONFIG_NET_VENDOR_MICREL=y +# CONFIG_KS8842 is not set +# CONFIG_KS8851 is not set +# CONFIG_KS8851_MLL is not set +CONFIG_NET_VENDOR_MICROCHIP=y +# CONFIG_ENC28J60 is not set +CONFIG_NET_VENDOR_NATSEMI=y +# CONFIG_NET_VENDOR_8390 is not set +# CONFIG_ETHOC is not set +CONFIG_NET_VENDOR_SEEQ=y +CONFIG_NET_VENDOR_SMSC=y +# CONFIG_SMC91X is not set +# CONFIG_SMC911X is not set +# CONFIG_SMSC911X is not set +CONFIG_NET_VENDOR_STMICRO=y +# CONFIG_STMMAC_ETH is not set +CONFIG_NET_VENDOR_WIZNET=y +# CONFIG_WIZNET_W5100 is not set +# CONFIG_WIZNET_W5300 is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_AT803X_PHY is not set +# CONFIG_AMD_PHY is not set +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_BCM87XX_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_MICREL_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +# CONFIG_MDIO_BUS_MUX_GPIO is not set +# CONFIG_MDIO_BUS_MUX_MMIOREG is not set +# CONFIG_MICREL_KS8995MA is not set +# CONFIG_PLIP is not set +CONFIG_PPP=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=m +CONFIG_PPTP=m +CONFIG_PPPOL2TP=m +CONFIG_PPPOLAC=m +CONFIG_PPPOPNS=m +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +# CONFIG_SLIP is not set +CONFIG_SLHC=m + +# +# USB Network Adapters +# +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_RTL8152=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_AX88179_178A=m +CONFIG_USB_NET_CDCETHER=m +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_CDC_NCM=m +CONFIG_USB_NET_CDC_MBIM=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_NET1080=m +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_CDC_SUBSET=m +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_KC2190=y +# CONFIG_USB_NET_ZAURUS is not set +CONFIG_USB_NET_CX82310_ETH=m +CONFIG_USB_NET_KALMIA=m +CONFIG_USB_NET_QMI_WWAN=m +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +CONFIG_USB_VL600=m +# CONFIG_WLAN is not set + +# +# WiMAX Wireless Broadband devices +# +CONFIG_WIMAX_I2400M=m +CONFIG_WIMAX_I2400M_USB=m +CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 +# CONFIG_WAN is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set +CONFIG_INPUT_MATRIXKMAP=y + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=m +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set +CONFIG_INPUT_KEYRESET=y +CONFIG_GLOVE_TOUCH=y + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ADP5588 is not set +# CONFIG_KEYBOARD_ADP5589 is not set +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_QT1070 is not set +# CONFIG_KEYBOARD_QT2160 is not set +# CONFIG_KEYBOARD_LKKBD is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_KEYBOARD_TCA6416 is not set +# CONFIG_KEYBOARD_TCA8418 is not set +# CONFIG_KEYBOARD_MATRIX is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_LM8333 is not set +# CONFIG_KEYBOARD_MAX7359 is not set +# CONFIG_KEYBOARD_MCS is not set +# CONFIG_KEYBOARD_MPR121 is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +CONFIG_KEYBOARD_SAMSUNG=y +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +# CONFIG_MOUSE_PS2 is not set +# CONFIG_MOUSE_SERIAL is not set +CONFIG_MOUSE_APPLETOUCH=m +CONFIG_MOUSE_BCM5974=m +# CONFIG_MOUSE_CYAPA is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_MOUSE_GPIO is not set +# CONFIG_MOUSE_SYNAPTICS_I2C is not set +CONFIG_MOUSE_SYNAPTICS_USB=m +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_AD7877 is not set +# CONFIG_TOUCHSCREEN_AD7879 is not set +# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set +# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set +# CONFIG_TOUCHSCREEN_BU21013 is not set +# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set +# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set +# CONFIG_TOUCHSCREEN_DYNAPRO is not set +# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set +# CONFIG_TOUCHSCREEN_EETI is not set +# CONFIG_TOUCHSCREEN_EGALAX is not set +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# CONFIG_TOUCHSCREEN_ILI210X is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set +# CONFIG_TOUCHSCREEN_WACOM_I2C is not set +# CONFIG_TOUCHSCREEN_MAX11801 is not set +# CONFIG_TOUCHSCREEN_MCS5000 is not set +# CONFIG_TOUCHSCREEN_MMS114 is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_INEXIO is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set +# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_PIXCIR is not set +# CONFIG_TOUCHSCREEN_WM97XX is not set +# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set +# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set +# CONFIG_TOUCHSCREEN_TSC_SERIO is not set +# CONFIG_TOUCHSCREEN_TSC2005 is not set +# CONFIG_TOUCHSCREEN_TSC2007 is not set +# CONFIG_TOUCHSCREEN_W90X900 is not set +# CONFIG_TOUCHSCREEN_ST1232 is not set +# CONFIG_TOUCHSCREEN_TPS6507X is not set +# CONFIG_TOUCHSCREEN_MXT540E is not set +CONFIG_TOUCHSCREEN_DWAV_USB_MT=m +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_BMA150 is not set +# CONFIG_INPUT_MMA8450 is not set +# CONFIG_INPUT_MPU3050 is not set +# CONFIG_INPUT_GP2A is not set +# CONFIG_INPUT_GPIO_TILT_POLLED is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYCHORD is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_KXTJ9 is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=m +# CONFIG_INPUT_GPIO is not set +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_PWM_BEEPER is not set +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_IMS_PCU is not set +# CONFIG_INPUT_CMA3000 is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_PARKBD is not set +# CONFIG_SERIO_AMBAKMI is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_SERIO_ARC_PS2 is not set +# CONFIG_SERIO_APBPS2 is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_TTY=y +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_VT_CONSOLE_SLEEP=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=256 +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +CONFIG_DEVMEM=y +CONFIG_DEVKMEM=y + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y +# CONFIG_SERIAL_8250_CONSOLE is not set +CONFIG_SERIAL_8250_DMA=y +CONFIG_SERIAL_8250_NR_UARTS=4 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250_DW is not set +# CONFIG_SERIAL_8250_EM is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_AMBA_PL010 is not set +# CONFIG_SERIAL_AMBA_PL011 is not set +CONFIG_SERIAL_SAMSUNG=y +# CONFIG_SERIAL_SAMSUNG_DMA is not set +CONFIG_SERIAL_SAMSUNG_UARTS_4=y +CONFIG_SERIAL_SAMSUNG_UARTS=4 +CONFIG_SERIAL_SAMSUNG_CONSOLE=y +# CONFIG_SERIAL_MAX3100 is not set +# CONFIG_SERIAL_MAX310X is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_OF_PLATFORM=y +# CONFIG_SERIAL_SCCNXP is not set +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_IFX6X60 is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_SERIAL_ARC is not set +# CONFIG_TTY_PRINTK is not set +CONFIG_PRINTER=m +# CONFIG_LP_CONSOLE is not set +CONFIG_PPDEV=m +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_HW_RANDOM_ATMEL is not set +# CONFIG_HW_RANDOM_EXYNOS is not set +# CONFIG_HW_RANDOM_EXYNOS_SWD is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_DCC_TTY is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_CBUS_GPIO is not set +# CONFIG_I2C_DESIGNWARE_PLATFORM is not set +CONFIG_I2C_EXYNOS5=y +CONFIG_I2C_GPIO=y +CONFIG_I2C_GPIO_CUSTOM=m +# CONFIG_I2C_NOMADIK is not set +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +CONFIG_HAVE_S3C2410_I2C=y +CONFIG_I2C_S3C2410=y +CONFIG_HAVE_EXYNOS5_HSI2C=y +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_DIOLAN_U2C is not set +# CONFIG_I2C_PARPORT is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_ALTERA is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_BUTTERFLY is not set +# CONFIG_SPI_GPIO is not set +# CONFIG_SPI_LM70_LLP is not set +# CONFIG_SPI_FSL_SPI is not set +# CONFIG_SPI_OC_TINY is not set +# CONFIG_SPI_PL022 is not set +# CONFIG_SPI_PXA2XX_PCI is not set +CONFIG_SPI_S3C64XX=y +# CONFIG_SPI_SC18IS602 is not set +# CONFIG_SPI_XCOMM is not set +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_DESIGNWARE is not set + +# +# SPI Protocol Masters +# +CONFIG_SPI_SPIDEV=m +# CONFIG_SPI_TLE62X0 is not set + +# +# Qualcomm MSM SSBI bus support +# +# CONFIG_SSBI is not set +# CONFIG_HSI is not set + +# +# PPS support +# +# CONFIG_PPS is not set + +# +# PPS generators support +# + +# +# PTP clock support +# +# CONFIG_PTP_1588_CLOCK is not set + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +# CONFIG_PTP_1588_CLOCK_PCH is not set +CONFIG_PINCTRL=y + +# +# Pin controllers +# +CONFIG_PINMUX=y +CONFIG_PINCONF=y +# CONFIG_DEBUG_PINCTRL is not set +# CONFIG_PINCTRL_SINGLE is not set +CONFIG_PINCTRL_SAMSUNG=y +CONFIG_PINCTRL_EXYNOS=y +# CONFIG_PINCTRL_EXYNOS5440 is not set +CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIO_DEVRES=y +CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y +CONFIG_DEBUG_GPIO=y +CONFIG_GPIO_SYSFS=y + +# +# Memory mapped GPIO drivers: +# +# CONFIG_GPIO_GENERIC_PLATFORM is not set +# CONFIG_GPIO_EM is not set +# CONFIG_GPIO_PL061 is not set +# CONFIG_GPIO_RCAR is not set +# CONFIG_GPIO_TS5500 is not set +# CONFIG_GPIO_GRGPIO is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +# CONFIG_GPIO_ADP5588 is not set +# CONFIG_GPIO_ADNP is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_MC33880 is not set +# CONFIG_GPIO_74X164 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# + +# +# USB GPIO expanders: +# +CONFIG_W1=m + +# +# 1-wire Bus Masters +# +# CONFIG_W1_MASTER_DS2490 is not set +# CONFIG_W1_MASTER_DS2482 is not set +# CONFIG_W1_MASTER_DS1WM is not set +# CONFIG_W1_MASTER_GPIO is not set + +# +# 1-wire Slaves +# +# CONFIG_W1_SLAVE_THERM is not set +# CONFIG_W1_SLAVE_SMEM is not set +# CONFIG_W1_SLAVE_DS2408 is not set +# CONFIG_W1_SLAVE_DS2413 is not set +# CONFIG_W1_SLAVE_DS2423 is not set +# CONFIG_W1_SLAVE_DS2431 is not set +# CONFIG_W1_SLAVE_DS2433 is not set +# CONFIG_W1_SLAVE_DS2760 is not set +# CONFIG_W1_SLAVE_DS2780 is not set +# CONFIG_W1_SLAVE_DS2781 is not set +# CONFIG_W1_SLAVE_DS28E04 is not set +# CONFIG_W1_SLAVE_BQ27000 is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_GENERIC_ADC_BATTERY is not set +# CONFIG_TEST_POWER is not set +# CONFIG_BATTERY_DS2780 is not set +# CONFIG_BATTERY_DS2781 is not set +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_SBS is not set +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +# CONFIG_BATTERY_MAX17042 is not set +# CONFIG_CHARGER_ISP1704 is not set +# CONFIG_CHARGER_MAX8903 is not set +# CONFIG_CHARGER_LP8727 is not set +# CONFIG_CHARGER_GPIO is not set +# CONFIG_CHARGER_MANAGER is not set +# CONFIG_CHARGER_BQ2415X is not set +CONFIG_CHARGER_BQ24160=y +# CONFIG_CHARGER_SMB347 is not set +# CONFIG_BATTERY_GOLDFISH is not set +# CONFIG_POWER_RESET is not set +# CONFIG_POWER_RESET_RESTART is not set +# CONFIG_POWER_AVS is not set +# CONFIG_HWMON is not set +CONFIG_THERMAL=y +CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y +# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set +# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set +# CONFIG_THERMAL_GOV_FAIR_SHARE is not set +CONFIG_THERMAL_GOV_STEP_WISE=y +# CONFIG_THERMAL_GOV_USER_SPACE is not set +CONFIG_CPU_THERMAL=y +# CONFIG_THERMAL_EMULATION is not set +CONFIG_EXYNOS_THERMAL=y +# CONFIG_CPU_THERMAL_IPA is not set +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_CORE=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_ARM_SP805_WATCHDOG is not set +CONFIG_HAVE_S3C2410_WATCHDOG=y +CONFIG_S3C2410_WATCHDOG=y +# CONFIG_DW_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +# CONFIG_BCMA is not set + +# +# Multifunction device drivers +# +CONFIG_MFD_CORE=y +# CONFIG_MFD_AS3711 is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_AAT2870_CORE is not set +# CONFIG_MFD_CROS_EC is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_DA9052_SPI is not set +# CONFIG_MFD_DA9052_I2C is not set +# CONFIG_MFD_DA9055 is not set +# CONFIG_MFD_MC13XXX_SPI is not set +# CONFIG_MFD_MC13XXX_I2C is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_MFD_88PM800 is not set +# CONFIG_MFD_88PM805 is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_MAX77686 is not set +# CONFIG_MFD_MAX77693 is not set +# CONFIG_MFD_MAX8907 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_EZX_PCAP is not set +# CONFIG_MFD_VIPERBOARD is not set +# CONFIG_MFD_RETU is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_UCB1400_CORE is not set +# CONFIG_MFD_RC5T583 is not set +CONFIG_MFD_SEC_CORE=y +# CONFIG_MFD_SI476X_CORE is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_SMSC is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_STMPE is not set +CONFIG_MFD_SYSCON=y +# CONFIG_MFD_TI_AM335X_TSCADC is not set +# CONFIG_MFD_LP8788 is not set +# CONFIG_MFD_PALMAS is not set +# CONFIG_TPS6105X is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_MFD_TPS65090 is not set +# CONFIG_MFD_TPS65217 is not set +# CONFIG_MFD_TPS6586X is not set +# CONFIG_MFD_TPS65910 is not set +# CONFIG_MFD_TPS65912 is not set +# CONFIG_MFD_TPS65912_I2C is not set +# CONFIG_MFD_TPS65912_SPI is not set +# CONFIG_MFD_TPS80031 is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_TWL6040_CORE is not set +# CONFIG_MFD_WL1273_CORE is not set +# CONFIG_MFD_LM3533 is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_MFD_ARIZONA_I2C is not set +# CONFIG_MFD_ARIZONA_SPI is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM831X_SPI is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +# CONFIG_REGULATOR_DUMMY is not set +CONFIG_REGULATOR_FIXED_VOLTAGE=y +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_GPIO is not set +# CONFIG_REGULATOR_AD5398 is not set +# CONFIG_REGULATOR_FAN53555 is not set +# CONFIG_REGULATOR_ANATOP is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_MAX8973 is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_LP872X is not set +# CONFIG_REGULATOR_LP8755 is not set +CONFIG_REGULATOR_S2MPS11=y +# CONFIG_REGULATOR_S2MPS13 is not set +# CONFIG_REGULATOR_S5M8767 is not set +# CONFIG_REGULATOR_TPS51632 is not set +# CONFIG_REGULATOR_TPS62360 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_REGULATOR_TPS6524X is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_MEDIA_CAMERA_SUPPORT=y +CONFIG_MEDIA_ANALOG_TV_SUPPORT=y +CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y +CONFIG_MEDIA_RADIO_SUPPORT=y +CONFIG_MEDIA_RC_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_DEV=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_VIDEO_V4L2=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_VIDEO_TUNER=m +CONFIG_VIDEOBUF_GEN=m +CONFIG_VIDEOBUF_VMALLOC=m +CONFIG_VIDEOBUF_DVB=m +CONFIG_VIDEOBUF2_CORE=y +CONFIG_VIDEOBUF2_MEMOPS=y +CONFIG_VIDEOBUF2_VMALLOC=m +CONFIG_VIDEOBUF2_ION=y +# CONFIG_VIDEO_V4L2_INT_DEVICE is not set +CONFIG_DVB_CORE=y +CONFIG_DVB_NET=y +CONFIG_TTPCI_EEPROM=m +CONFIG_DVB_MAX_ADAPTERS=8 +# CONFIG_DVB_DYNAMIC_MINORS is not set + +# +# Media drivers +# +CONFIG_RC_CORE=y +CONFIG_RC_MAP=y +CONFIG_RC_DECODERS=y +CONFIG_LIRC=m +CONFIG_IR_LIRC_CODEC=m +CONFIG_IR_NEC_DECODER=y +CONFIG_IR_RC5_DECODER=y +CONFIG_IR_RC6_DECODER=y +CONFIG_IR_JVC_DECODER=y +CONFIG_IR_SONY_DECODER=y +CONFIG_IR_RC5_SZ_DECODER=y +CONFIG_IR_SANYO_DECODER=y +CONFIG_IR_MCE_KBD_DECODER=y +CONFIG_RC_DEVICES=y +CONFIG_RC_ATI_REMOTE=m +CONFIG_IR_IMON=m +CONFIG_IR_MCEUSB=m +CONFIG_IR_REDRAT3=m +CONFIG_IR_STREAMZAP=m +CONFIG_IR_IGUANA=m +CONFIG_IR_TTUSBIR=m +CONFIG_RC_LOOPBACK=m +CONFIG_IR_GPIO_CIR=m +CONFIG_IR_GPIOPLUG_CIR=m +CONFIG_MEDIA_USB_SUPPORT=y + +# +# Webcam devices +# +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +CONFIG_USB_GL860=m +CONFIG_USB_GSPCA_BENQ=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +CONFIG_USB_GSPCA_JEILINJ=m +CONFIG_USB_GSPCA_JL2005BCD=m +CONFIG_USB_GSPCA_KINECT=m +CONFIG_USB_GSPCA_KONICA=m +CONFIG_USB_GSPCA_MARS=m +CONFIG_USB_GSPCA_MR97310A=m +CONFIG_USB_GSPCA_NW80X=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_OV534_9=m +CONFIG_USB_GSPCA_PAC207=m +CONFIG_USB_GSPCA_PAC7302=m +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SE401=m +CONFIG_USB_GSPCA_SN9C2028=m +CONFIG_USB_GSPCA_SN9C20X=m +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SPCA1528=m +CONFIG_USB_GSPCA_SQ905=m +CONFIG_USB_GSPCA_SQ905C=m +CONFIG_USB_GSPCA_SQ930X=m +CONFIG_USB_GSPCA_STK014=m +CONFIG_USB_GSPCA_STV0680=m +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TOPRO=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_VICAM=m +CONFIG_USB_GSPCA_XIRLINK_CIT=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_USB_PWC=m +CONFIG_USB_PWC_DEBUG=y +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_VIDEO_CPIA2=m +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_USB_SN9C102=m + +# +# Analog TV USB devices +# +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +CONFIG_VIDEO_PVRUSB2_DVB=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_TLG2300=m +CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_STK1160=m +CONFIG_VIDEO_STK1160_AC97=y + +# +# Analog/digital TV USB devices +# +CONFIG_VIDEO_AU0828=m +CONFIG_VIDEO_AU0828_V4L2=y +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_RC=y +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_CX231XX_DVB=m +CONFIG_VIDEO_TM6000=m +CONFIG_VIDEO_TM6000_ALSA=m +CONFIG_VIDEO_TM6000_DVB=m + +# +# Digital TV USB devices +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +CONFIG_DVB_USB_A800=m +CONFIG_DVB_USB_DIBUSB_MB=m +CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +CONFIG_DVB_USB_UMT_010=m +CONFIG_DVB_USB_CXUSB=m +CONFIG_DVB_USB_M920X=m +CONFIG_DVB_USB_DIGITV=m +CONFIG_DVB_USB_VP7045=m +CONFIG_DVB_USB_VP702X=m +CONFIG_DVB_USB_GP8PSK=m +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_PCTV452E=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_FRIIO=m +CONFIG_DVB_USB_AZ6027=m +CONFIG_DVB_USB_TECHNISAT_USB2=m +CONFIG_DVB_USB_V2=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_AF9035=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_AZ6007=m +CONFIG_DVB_USB_CE6230=m +CONFIG_DVB_USB_EC168=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_IT913X=m +CONFIG_DVB_USB_LME2510=m +CONFIG_DVB_USB_MXL111SF=m +CONFIG_DVB_USB_RTL28XXU=m +CONFIG_SMS_USB_DRV=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set + +# +# Webcam, TV (analog/digital) USB devices +# +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_VIDEO_EM28XX_RC=m +CONFIG_V4L_PLATFORM_DRIVERS=y +CONFIG_VIDEO_EXYNOS=y +# CONFIG_VIDEO_EXYNOS_GSCALER_1_3 is not set +# CONFIG_VIDEO_EXYNOS_GSCALER is not set +CONFIG_VIDEO_EXYNOS_MFC=y +# CONFIG_EXYNOS_MFC_V6 is not set +CONFIG_EXYNOS_MFC_V8=y +# CONFIG_VIDEO_EXYNOS_HEVC is not set +# CONFIG_VIDEO_EXYNOS_FIMC_IS is not set +# CONFIG_VIDEO_EXYNOS_SCALER is not set +# CONFIG_VIDEO_EXYNOS_FIMG2D is not set +# CONFIG_VIDEO_EXYNOS_JPEG is not set +# CONFIG_VIDEO_EXYNOS_HX_JPEG is not set +# CONFIG_VIDEO_EXYNOS_TV is not set +CONFIG_VIDEO_EXYNOS_HDMI_CEC=y +# CONFIG_VIDEO_TIMBERDALE is not set +# CONFIG_SOC_CAMERA is not set +# CONFIG_VIDEO_SAMSUNG_EXYNOS4_IS is not set +# CONFIG_VIDEO_SAMSUNG_S5P_TV is not set +CONFIG_V4L_MEM2MEM_DRIVERS=y +# CONFIG_VIDEO_MEM2MEM_DEINTERLACE is not set +# CONFIG_VIDEO_SAMSUNG_S5P_G2D is not set +# CONFIG_VIDEO_SAMSUNG_S5P_JPEG is not set +# CONFIG_VIDEO_SAMSUNG_S5P_MFC is not set +# CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC is not set +# CONFIG_VIDEO_SH_VEU is not set +# CONFIG_V4L_TEST_DRIVERS is not set + +# +# Supported MMC/SDIO adapters +# +# CONFIG_SMS_SDIO_DRV is not set +# CONFIG_MEDIA_PARPORT_SUPPORT is not set +CONFIG_RADIO_ADAPTERS=y +# CONFIG_RADIO_SI470X is not set +# CONFIG_USB_MR800 is not set +# CONFIG_USB_DSBR is not set +# CONFIG_RADIO_SHARK is not set +# CONFIG_RADIO_SHARK2 is not set +# CONFIG_I2C_SI4713 is not set +# CONFIG_RADIO_SI4713 is not set +# CONFIG_USB_KEENE is not set +# CONFIG_USB_MA901 is not set +# CONFIG_RADIO_TEA5764 is not set +# CONFIG_RADIO_SAA7706H is not set +# CONFIG_RADIO_TEF6862 is not set +# CONFIG_RADIO_WL1273 is not set + +# +# Texas Instruments WL128x FM driver (ST based) +# +# CONFIG_RADIO_WL128X is not set +CONFIG_MEDIA_COMMON_OPTIONS=y + +# +# common driver options +# +CONFIG_VIDEO_CX2341X=m +CONFIG_VIDEO_TVEEPROM=m +CONFIG_CYPRESS_FIRMWARE=m +CONFIG_DVB_B2C2_FLEXCOP=m +CONFIG_SMS_SIANO_MDTV=m +CONFIG_SMS_SIANO_RC=y +# CONFIG_SMS_SIANO_DEBUGFS is not set + +# +# Media ancillary drivers (tuners, sensors, i2c, frontends) +# +CONFIG_MEDIA_SUBDRV_AUTOSELECT=y +CONFIG_MEDIA_ATTACH=y +CONFIG_VIDEO_IR_I2C=y + +# +# Audio decoders, processors and mixers +# +CONFIG_VIDEO_MSP3400=m +CONFIG_VIDEO_CS53L32A=m +CONFIG_VIDEO_WM8775=m + +# +# RDS decoders +# + +# +# Video decoders +# +CONFIG_VIDEO_SAA711X=m +CONFIG_VIDEO_TVP5150=m + +# +# Video and audio decoders +# +CONFIG_VIDEO_CX25840=m + +# +# Video encoders +# + +# +# Camera sensor devices +# +CONFIG_VIDEO_MT9V011=m + +# +# Flash devices +# + +# +# Video improvement chips +# + +# +# Miscelaneous helper chips +# + +# +# Sensors used on soc_camera driver +# +CONFIG_MEDIA_TUNER=y +CONFIG_MEDIA_TUNER_SIMPLE=y +CONFIG_MEDIA_TUNER_TDA8290=y +CONFIG_MEDIA_TUNER_TDA827X=y +CONFIG_MEDIA_TUNER_TDA18271=y +CONFIG_MEDIA_TUNER_TDA9887=y +CONFIG_MEDIA_TUNER_TEA5761=y +CONFIG_MEDIA_TUNER_TEA5767=y +CONFIG_MEDIA_TUNER_MT20XX=y +CONFIG_MEDIA_TUNER_MT2060=m +CONFIG_MEDIA_TUNER_MT2063=m +CONFIG_MEDIA_TUNER_MT2266=m +CONFIG_MEDIA_TUNER_QT1010=m +CONFIG_MEDIA_TUNER_XC2028=y +CONFIG_MEDIA_TUNER_XC5000=y +CONFIG_MEDIA_TUNER_XC4000=y +CONFIG_MEDIA_TUNER_MXL5005S=m +CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_MC44S803=y +CONFIG_MEDIA_TUNER_MAX2165=m +CONFIG_MEDIA_TUNER_TDA18218=m +CONFIG_MEDIA_TUNER_FC0011=m +CONFIG_MEDIA_TUNER_FC0012=m +CONFIG_MEDIA_TUNER_FC0013=m +CONFIG_MEDIA_TUNER_TDA18212=m +CONFIG_MEDIA_TUNER_E4000=m +CONFIG_MEDIA_TUNER_FC2580=m +CONFIG_MEDIA_TUNER_TUA9001=m +CONFIG_MEDIA_TUNER_IT913X=m +CONFIG_MEDIA_TUNER_R820T=m + +# +# Multistandard (satellite) frontends +# +CONFIG_DVB_STB0899=m +CONFIG_DVB_STB6100=m +CONFIG_DVB_STV090x=m +CONFIG_DVB_STV6110x=m + +# +# Multistandard (cable + terrestrial) frontends +# +CONFIG_DVB_DRXK=m +CONFIG_DVB_TDA18271C2DD=m + +# +# DVB-S (satellite) frontends +# +CONFIG_DVB_CX24123=m +CONFIG_DVB_MT312=m +CONFIG_DVB_ZL10039=m +CONFIG_DVB_S5H1420=m +CONFIG_DVB_STV0288=m +CONFIG_DVB_STB6000=m +CONFIG_DVB_STV0299=m +CONFIG_DVB_STV6110=m +CONFIG_DVB_STV0900=m +CONFIG_DVB_TDA10086=m +CONFIG_DVB_TUNER_ITD1000=m +CONFIG_DVB_TUNER_CX24113=m +CONFIG_DVB_TDA826X=m +CONFIG_DVB_CX24116=m +CONFIG_DVB_SI21XX=m +CONFIG_DVB_TS2020=m +CONFIG_DVB_DS3000=m +CONFIG_DVB_TDA10071=m + +# +# DVB-T (terrestrial) frontends +# +CONFIG_DVB_CX22702=m +CONFIG_DVB_DRXD=m +CONFIG_DVB_TDA1004X=m +CONFIG_DVB_NXT6000=m +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +CONFIG_DVB_DIB3000MB=m +CONFIG_DVB_DIB3000MC=m +CONFIG_DVB_DIB7000M=m +CONFIG_DVB_DIB7000P=m +CONFIG_DVB_TDA10048=m +CONFIG_DVB_AF9013=m +CONFIG_DVB_EC100=m +CONFIG_DVB_CXD2820R=m +CONFIG_DVB_RTL2830=m +CONFIG_DVB_RTL2832=m + +# +# DVB-C (cable) frontends +# +CONFIG_DVB_TDA10023=m +CONFIG_DVB_STV0297=m + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +CONFIG_DVB_NXT200X=m +CONFIG_DVB_BCM3510=m +CONFIG_DVB_LGDT330X=m +CONFIG_DVB_LGDT3305=m +CONFIG_DVB_LG2160=m +CONFIG_DVB_S5H1409=m +CONFIG_DVB_AU8522=m +CONFIG_DVB_AU8522_DTV=m +CONFIG_DVB_AU8522_V4L=m +CONFIG_DVB_S5H1411=m + +# +# ISDB-T (terrestrial) frontends +# +CONFIG_DVB_S921=m +CONFIG_DVB_DIB8000=m +CONFIG_DVB_MB86A20S=m + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +CONFIG_DVB_TUNER_DIB0070=m +CONFIG_DVB_TUNER_DIB0090=m + +# +# SEC control devices for DVB-S +# +CONFIG_DVB_LNBP21=m +CONFIG_DVB_LNBP22=m +CONFIG_DVB_ISL6421=m +CONFIG_DVB_ISL6423=m +CONFIG_DVB_A8293=m +CONFIG_DVB_LGS8GXX=m +CONFIG_DVB_ATBM8830=m +CONFIG_DVB_IX2505V=m +CONFIG_DVB_IT913X_FE=m +CONFIG_DVB_M88RS2000=m +CONFIG_DVB_AF9033=m + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set + +# +# Graphics support +# +CONFIG_DRM=y +CONFIG_DRM_USB=m +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_KMS_FB_HELPER=y +CONFIG_DRM_LOAD_EDID_FIRMWARE=y + +# +# I2C encoder or helper chips +# +# CONFIG_DRM_I2C_CH7006 is not set +# CONFIG_DRM_I2C_SIL164 is not set +# CONFIG_DRM_I2C_NXP_TDA998X is not set +# CONFIG_DRM_PTN3460 is not set +CONFIG_DRM_EXYNOS=y +CONFIG_DRM_EXYNOS_IOMMU=y +CONFIG_DRM_EXYNOS_DMABUF=y +CONFIG_DRM_EXYNOS_FIMD=y +# CONFIG_DRM_EXYNOS_DPI is not set +# CONFIG_DRM_EXYNOS_DSI is not set +CONFIG_DRM_EXYNOS_DP=y +CONFIG_DRM_EXYNOS_HDMI=y +# CONFIG_DRM_EXYNOS_VIDI is not set +# CONFIG_DRM_EXYNOS_G2D is not set +# CONFIG_DRM_EXYNOS_IPP is not set +CONFIG_DRM_UDL=m +# CONFIG_DRM_ARMADA is not set +# CONFIG_DRM_TILCDC is not set + +# +# ARM GPU Configuration +# +CONFIG_MALI_MIDGARD=y +# CONFIG_MALI_GATOR_SUPPORT is not set +CONFIG_MALI_MIDGARD_DVFS=y +CONFIG_MALI_MIDGARD_RT_PM=y +# CONFIG_MALI_MIDGARD_ENABLE_TRACE is not set +CONFIG_MALI_MIDGARD_DEBUG_SYS=y +CONFIG_MALI_EXPERT=y +# CONFIG_MALI_DEVFREQ is not set +# CONFIG_MALI_DEBUG_SHADER_SPLIT_FS is not set +CONFIG_MALI_PLATFORM_FAKE=y +CONFIG_MALI_PLATFORM_THIRDPARTY=y +CONFIG_MALI_PLATFORM_THIRDPARTY_NAME="5422" +# CONFIG_MALI_DEBUG is not set +# CONFIG_MALI_NO_MALI is not set +# CONFIG_MALI_TRACE_TIMELINE is not set +# CONFIG_MALI_SYSTEM_TRACE is not set +# CONFIG_MALI_GPU_TRACEPOINTS is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_VIDEOMODE_HELPERS=y +CONFIG_HDMI=y +CONFIG_FB=y +CONFIG_FIRMWARE_EDID=y +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +CONFIG_FB_SYS_FILLRECT=m +CONFIG_FB_SYS_COPYAREA=m +CONFIG_FB_SYS_IMAGEBLIT=m +# CONFIG_FB_FOREIGN_ENDIAN is not set +CONFIG_FB_SYS_FOPS=m +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +CONFIG_FB_BACKLIGHT=y +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_ARMCLCD is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_TMIO is not set +# CONFIG_DECON_TV is not set +# CONFIG_DECON is not set +# CONFIG_FB_S3C is not set +# CONFIG_FB_SMSCUFX is not set +CONFIG_FB_UDL=m +# CONFIG_FB_GOLDFISH is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_AUO_K190X is not set +# CONFIG_FB_SIMPLE is not set +# CONFIG_EXYNOS_VIDEO is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=y +# CONFIG_LCD_L4F00242T03 is not set +# CONFIG_LCD_LMS283GF05 is not set +# CONFIG_LCD_LTV350QV is not set +# CONFIG_LCD_ILI922X is not set +# CONFIG_LCD_ILI9320 is not set +# CONFIG_LCD_TDO24M is not set +# CONFIG_LCD_VGG2432A4 is not set +# CONFIG_LCD_PLATFORM is not set +# CONFIG_LCD_S6E63M0 is not set +# CONFIG_LCD_LD9040 is not set +# CONFIG_LCD_AMS369FG06 is not set +# CONFIG_LCD_LMS501KF03 is not set +# CONFIG_LCD_HX8357 is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_GENERIC=y +# CONFIG_BACKLIGHT_PWM is not set +# CONFIG_BACKLIGHT_ADP8860 is not set +# CONFIG_BACKLIGHT_ADP8870 is not set +# CONFIG_BACKLIGHT_LM3630 is not set +# CONFIG_BACKLIGHT_LM3639 is not set +# CONFIG_BACKLIGHT_LP855X is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_LOGO is not set +# CONFIG_FB_SSD1307 is not set +CONFIG_FB_TFT=m +CONFIG_FB_TFT_AGM1264K_FL=m +CONFIG_FB_TFT_BD663474=m +CONFIG_FB_TFT_HX8340BN=m +CONFIG_FB_TFT_HX8347D=m +CONFIG_FB_TFT_HX8353D=m +CONFIG_FB_TFT_ILI9320=m +CONFIG_FB_TFT_ILI9325=m +CONFIG_FB_TFT_ILI9340=m +CONFIG_FB_TFT_ILI9341=m +CONFIG_FB_TFT_ILI9481=m +CONFIG_FB_TFT_ILI9486=m +CONFIG_FB_TFT_PCD8544=m +CONFIG_FB_TFT_RA8875=m +CONFIG_FB_TFT_S6D02A1=m +CONFIG_FB_TFT_S6D1121=m +CONFIG_FB_TFT_SSD1289=m +CONFIG_FB_TFT_SSD1306=m +CONFIG_FB_TFT_SSD1331=m +CONFIG_FB_TFT_SSD1351=m +CONFIG_FB_TFT_ST7735R=m +CONFIG_FB_TFT_TINYLCD=m +CONFIG_FB_TFT_TLS8204=m +CONFIG_FB_TFT_UC1701=m +CONFIG_FB_TFT_UPD161704=m +CONFIG_FB_TFT_WATTEROTT=m +CONFIG_FB_FLEX=m +CONFIG_FB_TFT_FBTFT_DEVICE=m +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +CONFIG_SND_COMPRESS_OFFLOAD=y +CONFIG_SND_JACK=y +CONFIG_SND_SEQUENCER=m +# CONFIG_SND_SEQ_DUMMY is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_SEQUENCER_OSS is not set +# CONFIG_SND_HRTIMER is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_VMASTER=y +CONFIG_SND_RAWMIDI_SEQ=m +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +CONFIG_SND_AC97_CODEC=m +CONFIG_SND_DRIVERS=y +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_ALOOP is not set +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_MTS64 is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_PORTMAN2X4 is not set +# CONFIG_SND_AC97_POWER_SAVE is not set +CONFIG_SND_ARM=y +# CONFIG_SND_ARMAACI is not set +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=m +# CONFIG_SND_USB_UA101 is not set +# CONFIG_SND_USB_CAIAQ is not set +# CONFIG_SND_USB_6FIRE is not set +CONFIG_SND_SOC=y +# CONFIG_SND_ATMEL_SOC is not set +# CONFIG_SND_DESIGNWARE_I2S is not set +CONFIG_SND_SOC_SAMSUNG=y +CONFIG_SND_SAMSUNG_I2S=y +CONFIG_SND_SAMSUNG_AUDSS=y +# CONFIG_SND_SAMSUNG_IOMMU is not set +# CONFIG_SND_SAMSUNG_FAKEDMA is not set +# CONFIG_SND_SOC_SAMSUNG_SMDK_WM8994 is not set +# CONFIG_SND_SOC_SAMSUNG_SMDK_SPDIF is not set +# CONFIG_SND_SOC_SMDK_WM8994_PCM is not set +# CONFIG_SND_SOC_SAMSUNG_XYREF5430_ES515 is not set +# CONFIG_SND_SOC_SAMSUNG_XYREF5422_ES515 is not set +CONFIG_SND_SOC_SAMSUNG_ODROID_MAX98090=y +# CONFIG_SND_SOC_SAMSUNG_SMDK5422_WM8994 is not set +# CONFIG_SND_SAMSUNG_SEIREN is not set +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_MAX98090=y +CONFIG_SND_SOC_DUMMY_CODEC=y +# CONFIG_SND_SIMPLE_CARD is not set +# CONFIG_SOUND_PRIME is not set +CONFIG_AC97_BUS=m + +# +# HID support +# +CONFIG_HID=y +# CONFIG_HID_BATTERY_STRENGTH is not set +CONFIG_HIDRAW=y +# CONFIG_UHID is not set +CONFIG_HID_GENERIC=y + +# +# Special HID drivers +# +CONFIG_HID_A4TECH=m +CONFIG_HID_ACRUX=m +CONFIG_HID_ACRUX_FF=y +CONFIG_HID_APPLE=m +CONFIG_HID_APPLEIR=m +CONFIG_HID_AUREAL=m +CONFIG_HID_BELKIN=m +CONFIG_HID_CHERRY=m +CONFIG_HID_CHICONY=m +CONFIG_HID_PRODIKEYS=m +CONFIG_HID_CYPRESS=m +CONFIG_HID_DRAGONRISE=m +CONFIG_DRAGONRISE_FF=y +CONFIG_HID_EMS_FF=m +CONFIG_HID_ELECOM=m +CONFIG_HID_EZKEY=m +CONFIG_HID_HOLTEK=m +# CONFIG_HOLTEK_FF is not set +CONFIG_HID_KEYTOUCH=m +CONFIG_HID_KYE=m +CONFIG_HID_UCLOGIC=m +CONFIG_HID_WALTOP=m +CONFIG_HID_GYRATION=m +CONFIG_HID_ICADE=m +CONFIG_HID_TWINHAN=m +CONFIG_HID_KENSINGTON=m +CONFIG_HID_LCPOWER=m +CONFIG_HID_LENOVO_TPKBD=m +CONFIG_HID_LOGITECH=y +CONFIG_HID_LOGITECH_DJ=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWHEELS_FF=y +CONFIG_HID_MAGICMOUSE=m +CONFIG_HID_MICROSOFT=m +CONFIG_HID_MONTEREY=m +CONFIG_HID_MULTITOUCH=m +CONFIG_HID_NTRIG=m +CONFIG_HID_ORTEK=m +CONFIG_HID_PANTHERLORD=m +CONFIG_PANTHERLORD_FF=y +CONFIG_HID_PETALYNX=m +CONFIG_HID_PICOLCD=m +CONFIG_HID_PICOLCD_FB=y +CONFIG_HID_PICOLCD_BACKLIGHT=y +CONFIG_HID_PICOLCD_LCD=y +CONFIG_HID_PICOLCD_LEDS=y +CONFIG_HID_PICOLCD_CIR=y +CONFIG_HID_PRIMAX=m +CONFIG_HID_PS3REMOTE=m +CONFIG_HID_ROCCAT=m +CONFIG_HID_SAITEK=m +CONFIG_HID_SAMSUNG=m +CONFIG_HID_SONY=m +CONFIG_HID_SPEEDLINK=m +CONFIG_HID_STEELSERIES=m +CONFIG_HID_SUNPLUS=m +CONFIG_HID_GREENASIA=m +CONFIG_GREENASIA_FF=y +CONFIG_HID_SMARTJOYPLUS=m +CONFIG_SMARTJOYPLUS_FF=y +CONFIG_HID_TIVO=m +CONFIG_HID_TOPSEED=m +CONFIG_HID_THINGM=m +CONFIG_HID_THRUSTMASTER=m +# CONFIG_THRUSTMASTER_FF is not set +CONFIG_HID_WACOM=m +CONFIG_HID_WIIMOTE=m +CONFIG_HID_WIIMOTE_EXT=y +CONFIG_HID_ZEROPLUS=m +CONFIG_ZEROPLUS_FF=y +# CONFIG_HID_ZYDACRON is not set +CONFIG_HID_SENSOR_HUB=m + +# +# USB HID support +# +CONFIG_USB_HID=y +CONFIG_HID_PID=y +CONFIG_USB_HIDDEV=y + +# +# I2C HID support +# +# CONFIG_I2C_HID is not set +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB_ARCH_HAS_XHCI=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEFAULT_PERSIST=y +# CONFIG_USB_DYNAMIC_MINORS is not set +CONFIG_USB_OTG=y +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +CONFIG_USB_MON=m +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PLATFORM=y +# CONFIG_USB_XHCI_HCD_DEBUGGING is not set +CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_S5P=y +# CONFIG_USB_EHCI_HCD_PLATFORM is not set +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +CONFIG_USB_OHCI_HCD=y +CONFIG_USB_OHCI_EXYNOS=y +# CONFIG_USB_OHCI_HCD_PLATFORM is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set +# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +# CONFIG_USB_U132_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_MUSB_HDRC is not set +# CONFIG_USB_RENESAS_USBHS is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_WDM=m +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_REALTEK=m +CONFIG_REALTEK_AUTOPM=y +CONFIG_USB_STORAGE_DATAFAB=m +CONFIG_USB_STORAGE_FREECOM=m +CONFIG_USB_STORAGE_ISD200=m +CONFIG_USB_STORAGE_USBAT=m +CONFIG_USB_STORAGE_SDDR09=m +CONFIG_USB_STORAGE_SDDR55=m +CONFIG_USB_STORAGE_JUMPSHOT=m +CONFIG_USB_STORAGE_ALAUDA=m +CONFIG_USB_STORAGE_ONETOUCH=m +CONFIG_USB_STORAGE_KARMA=m +CONFIG_USB_STORAGE_CYPRESS_ATACB=m +CONFIG_USB_STORAGE_ENE_UB6250=m + +# +# USB Imaging devices +# +CONFIG_USB_MDC800=m +CONFIG_USB_MICROTEK=m +CONFIG_USB_DWC3=y +# CONFIG_USB_DWC3_HOST is not set +# CONFIG_USB_DWC3_GADGET is not set +CONFIG_USB_DWC3_DUAL_ROLE=y + +# +# Platform Glue Driver Support +# +CONFIG_USB_DWC3_EXYNOS=y + +# +# Debugging features +# +# CONFIG_USB_DWC3_DEBUG is not set +# CONFIG_USB_CHIPIDEA is not set + +# +# USB port drivers +# +# CONFIG_USB_USS720 is not set +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +CONFIG_USB_SERIAL_CP210X=m +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_F81232=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_METRO=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7715_PARPORT=y +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_MOTOROLA=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QCAUX=m +CONFIG_USB_SERIAL_QUALCOMM=m +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_SAFE=m +CONFIG_USB_SERIAL_SAFE_PADDED=y +CONFIG_USB_SERIAL_SIEMENS_MPI=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +CONFIG_USB_SERIAL_SYMBOL=m +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_WWAN=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m +CONFIG_USB_SERIAL_XSENS_MT=m +CONFIG_USB_SERIAL_ZIO=m +CONFIG_USB_SERIAL_WISHBONE=m +CONFIG_USB_SERIAL_ZTE=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_QT2=m +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +CONFIG_USB_ADUTUX=m +CONFIG_USB_SEVSEG=m +CONFIG_USB_RIO500=m +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_LED=m +CONFIG_USB_CYPRESS_CY7C63=m +CONFIG_USB_CYTHERM=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_FTDI_ELAN=m +# CONFIG_USB_APPLEDISPLAY is not set +CONFIG_USB_SISUSBVGA=m +# CONFIG_USB_SISUSBVGA_CON is not set +CONFIG_USB_LD=m +CONFIG_USB_TRANCEVIBRATOR=m +CONFIG_USB_IOWARRIOR=m +# CONFIG_USB_TEST is not set +CONFIG_USB_ISIGHTFW=m +CONFIG_USB_YUREX=m +CONFIG_USB_EZUSB_FX2=m +# CONFIG_USB_HSIC_USB3503 is not set +CONFIG_USB_EXYNOS_SWITCH=y +CONFIG_USB_PHY=y +# CONFIG_USB_OTG_WAKELOCK is not set +# CONFIG_NOP_USB_XCEIV is not set +# CONFIG_OMAP_CONTROL_USB is not set +# CONFIG_OMAP_USB3 is not set +CONFIG_SAMSUNG_USBPHY=y +CONFIG_SAMSUNG_USB2PHY=y +CONFIG_SAMSUNG_USB2PHY_DUMMY=y +CONFIG_SAMSUNG_USB3PHY=y +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ISP1301 is not set +# CONFIG_USB_RCAR_PHY is not set +# CONFIG_USB_ULPI is not set +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG is not set +# CONFIG_USB_GADGET_DEBUG_FILES is not set +# CONFIG_USB_GADGET_DEBUG_FS is not set +CONFIG_USB_GADGET_VBUS_DRAW=500 +CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 + +# +# USB Peripheral Controller +# +# CONFIG_USB_FUSB300 is not set +# CONFIG_USB_R8A66597 is not set +# CONFIG_USB_PXA27X is not set +# CONFIG_USB_MV_UDC is not set +# CONFIG_USB_MV_U3D is not set +# CONFIG_USB_M66592 is not set +# CONFIG_USB_NET2272 is not set +# CONFIG_USB_DUMMY_HCD is not set +CONFIG_USB_LIBCOMPOSITE=m +CONFIG_USB_F_ACM=m +CONFIG_USB_F_SS_LB=m +CONFIG_USB_U_SERIAL=m +CONFIG_USB_F_SERIAL=m +CONFIG_USB_F_OBEX=m +CONFIG_USB_ZERO=m +# CONFIG_USB_ZERO_HNPTEST is not set +CONFIG_USB_AUDIO=m +CONFIG_GADGET_UAC1=y +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +CONFIG_USB_ETH_EEM=y +CONFIG_USB_G_NCM=m +CONFIG_USB_GADGETFS=m +CONFIG_USB_FUNCTIONFS=m +CONFIG_USB_FUNCTIONFS_ETH=y +CONFIG_USB_FUNCTIONFS_RNDIS=y +CONFIG_USB_FUNCTIONFS_GENERIC=y +CONFIG_USB_MASS_STORAGE=m +# CONFIG_USB_GADGET_TARGET is not set +CONFIG_USB_G_SERIAL=m +CONFIG_USB_MIDI_GADGET=m +CONFIG_USB_G_PRINTER=m +CONFIG_USB_CDC_COMPOSITE=m +CONFIG_USB_G_ACM_MS=m +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_MULTI_RNDIS=y +# CONFIG_USB_G_MULTI_CDC is not set +CONFIG_USB_G_HID=m +# CONFIG_USB_G_DBGP is not set +CONFIG_USB_G_WEBCAM=m +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_UNSAFE_RESUME=y +CONFIG_MMC_CLKGATE=y +CONFIG_MMC_EMBEDDED_SDIO=y +CONFIG_MMC_PARANOID_SD_INIT=y + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=8 +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_MMC_BLOCK_DEFERRED_RESUME is not set +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set +# CONFIG_MMC_SUPPORT_BKOPS_MODE is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_ARMMMCI is not set +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_SDHCI_PXAV3 is not set +# CONFIG_MMC_SDHCI_PXAV2 is not set +CONFIG_MMC_DW=y +CONFIG_MMC_DW_BYPASS_FMP=y +# CONFIG_MMC_DW_FMP_DM_CRYPT is not set +CONFIG_MMC_DW_IDMAC=y +CONFIG_MMC_DW_PLTFM=y +CONFIG_MMC_DW_EXYNOS=y +# CONFIG_MMC_VUB300 is not set +# CONFIG_MMC_USHC is not set +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +# CONFIG_LEDS_LM3530 is not set +# CONFIG_LEDS_LM3642 is not set +# CONFIG_LEDS_PCA9532 is not set +CONFIG_LEDS_GPIO=y +# CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_LP5521 is not set +# CONFIG_LEDS_LP5523 is not set +# CONFIG_LEDS_LP5562 is not set +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_PCA9633 is not set +# CONFIG_LEDS_DAC124S085 is not set +# CONFIG_LEDS_PWM is not set +# CONFIG_LEDS_REGULATOR is not set +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_LT3593 is not set +# CONFIG_LEDS_RENESAS_TPU is not set +# CONFIG_LEDS_TCA6507 is not set +# CONFIG_LEDS_LM355x is not set +# CONFIG_LEDS_OT200 is not set +# CONFIG_LEDS_BLINKM is not set + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_ONESHOT=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set +CONFIG_LEDS_TRIGGER_CPU=y +CONFIG_LEDS_TRIGGER_GPIO=y +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set + +# +# iptables trigger is under Netfilter config (LED target) +# +CONFIG_LEDS_TRIGGER_TRANSIENT=y +# CONFIG_LEDS_TRIGGER_CAMERA is not set +CONFIG_SWITCH=y +# CONFIG_SWITCH_GPIO is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_SYSTOHC=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8523 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set +# CONFIG_RTC_DRV_EM3027 is not set +# CONFIG_RTC_DRV_RV3029C2 is not set + +# +# SPI RTC drivers +# +# CONFIG_RTC_DRV_M41T93 is not set +# CONFIG_RTC_DRV_M41T94 is not set +# CONFIG_RTC_DRV_DS1305 is not set +# CONFIG_RTC_DRV_DS1390 is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_R9701 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_DS3234 is not set +# CONFIG_RTC_DRV_PCF2123 is not set +# CONFIG_RTC_DRV_RX4581 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set +# CONFIG_RTC_DRV_DS2404 is not set + +# +# on-CPU RTC drivers +# +CONFIG_HAVE_S3C_RTC=y +# CONFIG_RTC_DRV_S3C is not set +CONFIG_RTC_DRV_SEC=y +# CONFIG_RTC_DRV_PL030 is not set +# CONFIG_RTC_DRV_PL031 is not set +# CONFIG_RTC_DRV_SNVS is not set + +# +# HID Sensor RTC drivers +# +# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set +CONFIG_DMADEVICES=y +# CONFIG_DMADEVICES_DEBUG is not set + +# +# DMA Devices +# +# CONFIG_AMBA_PL08X is not set +# CONFIG_DW_DMAC is not set +# CONFIG_TIMB_DMA is not set +CONFIG_PL330_DMA=y +# CONFIG_PL330TEST_LOG is not set +CONFIG_DMA_ENGINE=y +CONFIG_DMA_OF=y + +# +# DMA Clients +# +# CONFIG_ASYNC_TX_DMA is not set +# CONFIG_DMATEST is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +# CONFIG_VFIO is not set +# CONFIG_VIRT_DRIVERS is not set + +# +# Virtio drivers +# +# CONFIG_VIRTIO_MMIO is not set + +# +# Microsoft Hyper-V guest support +# +CONFIG_STAGING=y +CONFIG_USBIP_CORE=m +CONFIG_USBIP_VHCI_HCD=m +# CONFIG_USBIP_HOST is not set +# CONFIG_USBIP_DEBUG is not set +# CONFIG_ECHO is not set +# CONFIG_COMEDI is not set +# CONFIG_ASUS_OLED is not set +# CONFIG_PANEL is not set +CONFIG_R8712U=m +CONFIG_RTS5139=m +# CONFIG_RTS5139_DEBUG is not set +# CONFIG_TRANZPORT is not set +# CONFIG_LINE6_USB is not set +# CONFIG_USB_SERIAL_QUATECH2 is not set + +# +# IIO staging drivers +# + +# +# Accelerometers +# +# CONFIG_ADIS16201 is not set +# CONFIG_ADIS16203 is not set +# CONFIG_ADIS16204 is not set +# CONFIG_ADIS16209 is not set +# CONFIG_ADIS16220 is not set +# CONFIG_ADIS16240 is not set +# CONFIG_LIS3L02DQ is not set + +# +# Analog to digital converters +# +# CONFIG_AD7291 is not set +# CONFIG_AD7606 is not set +# CONFIG_AD799X is not set +# CONFIG_AD7780 is not set +# CONFIG_AD7816 is not set +# CONFIG_AD7192 is not set +# CONFIG_AD7280 is not set + +# +# Analog digital bi-direction converters +# +# CONFIG_ADT7316 is not set + +# +# Capacitance to digital converters +# +# CONFIG_AD7150 is not set +# CONFIG_AD7152 is not set +# CONFIG_AD7746 is not set + +# +# Direct Digital Synthesis +# +# CONFIG_AD5930 is not set +# CONFIG_AD9832 is not set +# CONFIG_AD9834 is not set +# CONFIG_AD9850 is not set +# CONFIG_AD9852 is not set +# CONFIG_AD9910 is not set +# CONFIG_AD9951 is not set + +# +# Digital gyroscope sensors +# +# CONFIG_ADIS16060 is not set +# CONFIG_ADIS16130 is not set +# CONFIG_ADIS16260 is not set + +# +# Network Analyzer, Impedance Converters +# +# CONFIG_AD5933 is not set + +# +# Light sensors +# +# CONFIG_SENSORS_ISL29018 is not set +# CONFIG_SENSORS_ISL29028 is not set +# CONFIG_TSL2583 is not set +# CONFIG_TSL2x7x is not set + +# +# Magnetometer sensors +# +# CONFIG_SENSORS_HMC5843 is not set + +# +# Active energy metering IC +# +# CONFIG_ADE7753 is not set +# CONFIG_ADE7754 is not set +# CONFIG_ADE7758 is not set +# CONFIG_ADE7759 is not set +# CONFIG_ADE7854 is not set + +# +# Resolver to digital converters +# +# CONFIG_AD2S90 is not set +# CONFIG_AD2S1200 is not set +# CONFIG_AD2S1210 is not set + +# +# Triggers - standalone +# +# CONFIG_IIO_SIMPLE_DUMMY is not set +# CONFIG_ZSMALLOC is not set +CONFIG_USB_ENESTORAGE=m +# CONFIG_BCM_WIMAX is not set +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# +# CONFIG_SPEAKUP is not set +# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set +# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set +# CONFIG_STAGING_MEDIA is not set + +# +# Android +# +CONFIG_ANDROID=y +# CONFIG_ANDROID_BINDER_IPC is not set +# CONFIG_ASHMEM is not set +# CONFIG_ANDROID_LOGGER is not set +CONFIG_ANDROID_TIMED_OUTPUT=y +# CONFIG_ANDROID_TIMED_GPIO is not set +# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set +# CONFIG_ANDROID_INTF_ALARM_DEV is not set +CONFIG_SYNC=y +CONFIG_SW_SYNC=y +CONFIG_SW_SYNC_USER=y +CONFIG_ION=y +# CONFIG_ION_TEST is not set +CONFIG_ION_EXYNOS=y +CONFIG_ION_EXYNOS_OF=y +# CONFIG_USB_WPAN_HCD is not set +# CONFIG_WIMAX_GDM72XX is not set +# CONFIG_CED1401 is not set +# CONFIG_DGRP is not set +CONFIG_CLKDEV_LOOKUP=y +CONFIG_HAVE_CLK_PREPARE=y +CONFIG_COMMON_CLK=y + +# +# Common Clock Framework +# +CONFIG_COMMON_CLK_DEBUG=y +# CONFIG_COMMON_CLK_SI5351 is not set + +# +# Hardware Spinlock drivers +# +CONFIG_CLKSRC_OF=y +CONFIG_CLKSRC_EXYNOS_MCT=y +# CONFIG_MAILBOX is not set +CONFIG_IOMMU_API=y +CONFIG_IOMMU_SUPPORT=y +CONFIG_OF_IOMMU=y +CONFIG_EXYNOS_IOMMU=y +CONFIG_EXYNOS5_IOMMU=y +# CONFIG_EXYNOS7_IOMMU is not set +CONFIG_EXYNOS_IOVMM=y +CONFIG_EXYNOS_IOMMU_NO_MASTER_CLKGATE=y +# CONFIG_EXYNOS_IOMMU_DEBUG is not set + +# +# Remoteproc drivers +# +# CONFIG_STE_MODEM_RPROC is not set + +# +# Rpmsg drivers +# +CONFIG_PM_DEVFREQ=y + +# +# DEVFREQ Governors +# +CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y +# CONFIG_DEVFREQ_GOV_SIMPLE_USAGE is not set +CONFIG_DEVFREQ_GOV_SIMPLE_EXYNOS=y +CONFIG_DEVFREQ_GOV_PERFORMANCE=y +# CONFIG_DEVFREQ_GOV_POWERSAVE is not set +# CONFIG_DEVFREQ_GOV_USERSPACE is not set + +# +# DEVFREQ Drivers +# +CONFIG_ARM_EXYNOS5422_BUS_DEVFREQ=y +# CONFIG_EXTCON is not set +# CONFIG_MEMORY is not set +CONFIG_IIO=y +# CONFIG_IIO_BUFFER is not set +# CONFIG_IIO_TRIGGER is not set + +# +# Accelerometers +# +# CONFIG_HID_SENSOR_ACCEL_3D is not set +# CONFIG_KXSD9 is not set +# CONFIG_IIO_ST_ACCEL_3AXIS is not set + +# +# Analog to digital converters +# +# CONFIG_AD7266 is not set +# CONFIG_AD7298 is not set +# CONFIG_AD7923 is not set +# CONFIG_AD7791 is not set +# CONFIG_AD7793 is not set +# CONFIG_AD7476 is not set +# CONFIG_AD7887 is not set +CONFIG_EXYNOS_ADC=y +# CONFIG_MAX1363 is not set +# CONFIG_TI_ADC081C is not set + +# +# Amplifiers +# +# CONFIG_AD8366 is not set + +# +# Hid Sensor IIO Common +# +# CONFIG_HID_SENSOR_IIO_COMMON is not set + +# +# Digital to analog converters +# +# CONFIG_AD5064 is not set +# CONFIG_AD5360 is not set +# CONFIG_AD5380 is not set +# CONFIG_AD5421 is not set +# CONFIG_AD5624R_SPI is not set +# CONFIG_AD5446 is not set +# CONFIG_AD5449 is not set +# CONFIG_AD5504 is not set +# CONFIG_AD5755 is not set +# CONFIG_AD5764 is not set +# CONFIG_AD5791 is not set +# CONFIG_AD5686 is not set +# CONFIG_MAX517 is not set +# CONFIG_MCP4725 is not set + +# +# Frequency Synthesizers DDS/PLL +# + +# +# Clock Generator/Distribution +# +# CONFIG_AD9523 is not set + +# +# Phase-Locked Loop (PLL) frequency synthesizers +# +# CONFIG_ADF4350 is not set + +# +# Digital gyroscope sensors +# +# CONFIG_ADIS16080 is not set +# CONFIG_ADIS16136 is not set +# CONFIG_ADXRS450 is not set +# CONFIG_HID_SENSOR_GYRO_3D is not set +# CONFIG_IIO_ST_GYRO_3AXIS is not set +# CONFIG_ITG3200 is not set + +# +# Inertial measurement units +# +# CONFIG_ADIS16400 is not set +# CONFIG_ADIS16480 is not set +# CONFIG_INV_MPU6050_IIO is not set + +# +# Light sensors +# +# CONFIG_ADJD_S311 is not set +# CONFIG_SENSORS_TSL2563 is not set +# CONFIG_VCNL4000 is not set +# CONFIG_HID_SENSOR_ALS is not set + +# +# Magnetometer sensors +# +# CONFIG_AK8975 is not set +# CONFIG_HID_SENSOR_MAGNETOMETER_3D is not set +# CONFIG_IIO_ST_MAGN_3AXIS is not set +CONFIG_PWM=y +CONFIG_PWM_SAMSUNG=y +CONFIG_IRQCHIP=y +CONFIG_ARM_GIC=y +# CONFIG_IPACK_BUS is not set +# CONFIG_RESET_CONTROLLER is not set +# CONFIG_MOBICORE_DRIVER is not set + +# +# ODROID Specific Hardware +# +CONFIG_ODROID_EXYNOS5_FAN=y +CONFIG_ODROID_EXYNOS5_SP=m +CONFIG_ODROID_EXYNOS5_IOBOARD=m +# CONFIG_ODROID_EXYNOS5_IOBOARD_DEBUG is not set +CONFIG_ODROID_EXYNOS5_HDMI_PHY_TUNE=y +# CONFIG_ODROID_EXYNOS5_HDMI_PHY_TUNE_DEBUG is not set + +# +# PHY Subsystem +# +CONFIG_GENERIC_PHY=y +# CONFIG_PHY_EXYNOS_MIPI_VIDEO is not set +CONFIG_PHY_EXYNOS_DP_VIDEO=y +# CONFIG_BCM_KONA_USB2_PHY is not set +# CONFIG_PHY_SAMSUNG_USB2 is not set +# CONFIG_PHY_EXYNOS5_USBDRD is not set + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD2=y +# CONFIG_JBD2_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_PROC_INFO=y +CONFIG_REISERFS_FS_XATTR=y +CONFIG_REISERFS_FS_POSIX_ACL=y +CONFIG_REISERFS_FS_SECURITY=y +CONFIG_JFS_FS=m +CONFIG_JFS_POSIX_ACL=y +CONFIG_JFS_SECURITY=y +# CONFIG_JFS_DEBUG is not set +CONFIG_JFS_STATISTICS=y +# CONFIG_XFS_FS is not set +CONFIG_GFS2_FS=m +CONFIG_OCFS2_FS=m +CONFIG_OCFS2_FS_O2CB=m +CONFIG_OCFS2_FS_STATS=y +CONFIG_OCFS2_DEBUG_MASKLOG=y +# CONFIG_OCFS2_DEBUG_FS is not set +CONFIG_BTRFS_FS=m +CONFIG_BTRFS_FS_POSIX_ACL=y +CONFIG_BTRFS_FS_CHECK_INTEGRITY=y +# CONFIG_BTRFS_FS_RUN_SANITY_TESTS is not set +# CONFIG_BTRFS_DEBUG is not set +CONFIG_NILFS2_FS=m +CONFIG_FS_POSIX_ACL=y +CONFIG_EXPORTFS=y +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +CONFIG_FANOTIFY=y +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +CONFIG_PRINT_QUOTA_WARNING=y +# CONFIG_QUOTA_DEBUG is not set +CONFIG_QUOTA_TREE=m +# CONFIG_QFMT_V1 is not set +# CONFIG_QFMT_V2 is not set +CONFIG_QUOTACTL=y +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=m +CONFIG_CUSE=m +CONFIG_GENERIC_ACL=y + +# +# Caches +# +CONFIG_FSCACHE=m +# CONFIG_FSCACHE_STATS is not set +# CONFIG_FSCACHE_HISTOGRAM is not set +# CONFIG_FSCACHE_DEBUG is not set +# CONFIG_FSCACHE_OBJECT_LIST is not set +# CONFIG_CACHEFILES is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=m +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_RW=y + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TMPFS_XATTR=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_CONFIGFS_FS=y +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +CONFIG_BEFS_FS=m +# CONFIG_BEFS_DEBUG is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_LOGFS=m +CONFIG_CRAMFS=y +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_XATTR=y +CONFIG_SQUASHFS_ZLIB=y +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +CONFIG_MINIX_FS=m +# CONFIG_OMFS_FS is not set +CONFIG_HPFS_FS=m +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX6FS_FS is not set +CONFIG_ROMFS_FS=y +CONFIG_ROMFS_BACKED_BY_BLOCK=y +CONFIG_ROMFS_ON_BLOCK=y +# CONFIG_PSTORE is not set +# CONFIG_SYSV_FS is not set +CONFIG_UFS_FS=m +CONFIG_UFS_FS_WRITE=y +# CONFIG_UFS_DEBUG is not set +CONFIG_F2FS_FS=m +CONFIG_F2FS_STAT_FS=y +CONFIG_F2FS_FS_XATTR=y +CONFIG_F2FS_FS_POSIX_ACL=y +# CONFIG_AUFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=m +CONFIG_NFS_V2=m +CONFIG_NFS_V3=m +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=m +CONFIG_NFS_SWAP=y +CONFIG_NFS_V4_1=y +CONFIG_PNFS_FILE_LAYOUT=m +CONFIG_PNFS_BLOCK=m +CONFIG_NFS_V4_1_IMPLEMENTATION_ID_DOMAIN="kernel.org" +# CONFIG_NFS_FSCACHE is not set +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +CONFIG_NFSD=m +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +# CONFIG_NFSD_FAULT_INJECTION is not set +CONFIG_LOCKD=m +CONFIG_LOCKD_V4=y +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=m +CONFIG_SUNRPC_GSS=m +CONFIG_SUNRPC_BACKCHANNEL=y +CONFIG_SUNRPC_SWAP=y +CONFIG_RPCSEC_GSS_KRB5=m +# CONFIG_SUNRPC_DEBUG is not set +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +CONFIG_CIFS_STATS2=y +CONFIG_CIFS_WEAK_PW_HASH=y +CONFIG_CIFS_UPCALL=y +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +CONFIG_CIFS_ACL=y +# CONFIG_CIFS_DEBUG is not set +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_CIFS_SMB2=y +# CONFIG_CIFS_FSCACHE is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_MAC_ROMAN=m +CONFIG_NLS_MAC_CELTIC=m +CONFIG_NLS_MAC_CENTEURO=m +CONFIG_NLS_MAC_CROATIAN=m +CONFIG_NLS_MAC_CYRILLIC=m +CONFIG_NLS_MAC_GAELIC=m +CONFIG_NLS_MAC_GREEK=m +CONFIG_NLS_MAC_ICELAND=m +CONFIG_NLS_MAC_INUIT=m +CONFIG_NLS_MAC_ROMANIAN=m +CONFIG_NLS_MAC_TURKISH=m +CONFIG_NLS_UTF8=m +# CONFIG_DLM is not set + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_PRINTK_CORE_NUM=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +CONFIG_LOCKUP_DETECTOR=y +CONFIG_HARDLOCKUP_DETECTOR_OTHER_CPU=y +CONFIG_HARDLOCKUP_DETECTOR=y +CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y +CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=1 +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y +CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=1 +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_DETECT_HUNG_TASK=y +CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120 +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +CONFIG_SCHED_DEBUG=y +CONFIG_SCHEDSTATS=y +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +CONFIG_DEBUG_PREEMPT=y +CONFIG_DEBUG_RT_MUTEXES=y +CONFIG_DEBUG_PI_LIST=y +# CONFIG_RT_MUTEX_TESTER is not set +CONFIG_DEBUG_SPINLOCK=y +CONFIG_DEBUG_MUTEXES=y +CONFIG_DEBUG_LOCK_ALLOC=y +# CONFIG_PROVE_LOCKING is not set +CONFIG_LOCKDEP=y +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_LOCKDEP is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +CONFIG_STACKTRACE=y +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_HIGHMEM is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +CONFIG_DEBUG_MEMORY_INIT=y +CONFIG_DEBUG_LIST=y +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set + +# +# RCU Debugging +# +# CONFIG_PROVE_RCU_DELAY is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=21 +CONFIG_RCU_CPU_STALL_VERBOSE=y +# CONFIG_RCU_CPU_STALL_INFO is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_LKDTM is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_NOP_TRACER=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACE_CLOCK=y +CONFIG_RING_BUFFER=y +CONFIG_EVENT_TRACING=y +CONFIG_CONTEXT_SWITCH_TRACER=y +CONFIG_TRACING=y +CONFIG_GENERIC_TRACER=y +CONFIG_TRACING_SUPPORT=y +CONFIG_FTRACE=y +CONFIG_FUNCTION_TRACER=y +CONFIG_FUNCTION_GRAPH_TRACER=y +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_PREEMPT_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_FTRACE_SYSCALLS is not set +# CONFIG_TRACER_SNAPSHOT is not set +CONFIG_BRANCH_PROFILE_NONE=y +# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set +# CONFIG_PROFILE_ALL_BRANCHES is not set +# CONFIG_STACK_TRACER is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_PROBE_EVENTS is not set +CONFIG_DYNAMIC_FTRACE=y +# CONFIG_FUNCTION_PROFILER is not set +CONFIG_FTRACE_MCOUNT_RECORD=y +# CONFIG_FTRACE_STARTUP_TEST is not set +# CONFIG_RING_BUFFER_BENCHMARK is not set +# CONFIG_RING_BUFFER_STARTUP_TEST is not set +# CONFIG_RBTREE_TEST is not set +# CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_ASYNC_RAID6_TEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_TEST_STRING_HELPERS is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_UNWIND is not set +CONFIG_OLD_MCOUNT=y +CONFIG_DEBUG_USER=y +# CONFIG_DEBUG_RODATA is not set +# CONFIG_DEBUG_LL is not set +CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S" +CONFIG_UNCOMPRESS_INCLUDE="mach/uncompress.h" +# CONFIG_OC_ETM is not set +# CONFIG_PID_IN_CONTEXTIDR is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_ENCRYPTED_KEYS is not set +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_XOR_BLOCKS=m +CONFIG_ASYNC_CORE=m +CONFIG_ASYNC_MEMCPY=m +CONFIG_ASYNC_XOR=m +CONFIG_ASYNC_PQ=m +CONFIG_ASYNC_RAID6_RECOV=m +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP=m +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_USER is not set +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +CONFIG_CRYPTO_GF128MUL=y +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_PCRYPT=m +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_CRYPTD=m +CONFIG_CRYPTO_AUTHENC=y +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=m +CONFIG_CRYPTO_GCM=m +CONFIG_CRYPTO_SEQIV=y + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTR=y +CONFIG_CRYPTO_CTS=m +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_LRW=m +CONFIG_CRYPTO_PCBC=m +CONFIG_CRYPTO_XTS=y + +# +# Hash modes +# +CONFIG_CRYPTO_CMAC=m +CONFIG_CRYPTO_HMAC=y +CONFIG_CRYPTO_XCBC=m +CONFIG_CRYPTO_VMAC=m + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_CRC32=m +CONFIG_CRYPTO_GHASH=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +CONFIG_CRYPTO_RMD128=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_RMD256=m +CONFIG_CRYPTO_RMD320=m +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA1_ARM=m +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_AES_ARM=m +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_BLOWFISH_COMMON=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST_COMMON=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_FCRYPT=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_SALSA20=m +CONFIG_CRYPTO_SEED=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TWOFISH=y +CONFIG_CRYPTO_TWOFISH_COMMON=y + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_ZLIB=m +CONFIG_CRYPTO_LZO=m + +# +# Random Number Generation +# +CONFIG_CRYPTO_ANSI_CPRNG=y +CONFIG_CRYPTO_USER_API=m +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_S5P_DEV_ACE=y +# CONFIG_ACE_USE_SSS_VER_5 is not set +CONFIG_ACE_USE_SLIMSSS_VER_1=y +# CONFIG_ACE_USE_CCI is not set +CONFIG_ACE_BC=y +CONFIG_ACE_BC_ASYNC=y +# CONFIG_ACE_BC_IRQMODE is not set +CONFIG_ACE_HASH_SHA1=y +CONFIG_ACE_HASH_SHA256=y +# CONFIG_ACE_DEBUG is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set +CONFIG_BINARY_PRINTF=y + +# +# Library routines +# +CONFIG_RAID6_PQ=m +CONFIG_BITREVERSE=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_IO=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=m +CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set +# CONFIG_CRC7 is not set +CONFIG_LIBCRC32C=y +# CONFIG_CRC8 is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_XZ_DEC=y +# CONFIG_XZ_DEC_X86 is not set +# CONFIG_XZ_DEC_POWERPC is not set +# CONFIG_XZ_DEC_IA64 is not set +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +# CONFIG_XZ_DEC_SPARC is not set +CONFIG_XZ_DEC_BCJ=y +# CONFIG_XZ_DEC_TEST is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_DECOMPRESS_XZ=y +CONFIG_DECOMPRESS_LZO=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_BTREE=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_DMA=y +CONFIG_CPU_RMAP=y +CONFIG_DQL=y +CONFIG_NLATTR=y +CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y +CONFIG_AVERAGE=y +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set +CONFIG_OID_REGISTRY=m +# CONFIG_VIRTUALIZATION is not set +CONFIG_BACKPORT_INTEGRATE=y +CONFIG_BACKPORT_DIR="backports" +CONFIG_BACKPORT_VERSION="backports-20150222-0-g2745ccd" +CONFIG_BACKPORT_KERNEL_VERSION="next-20150222-0-g53e418f1" +CONFIG_BACKPORT_KERNEL_NAME="Linux" +CONFIG_BACKPORT_LINUX=y +CONFIG_BACKPORT_KERNEL_3_11=y +CONFIG_BACKPORT_KERNEL_3_12=y +CONFIG_BACKPORT_KERNEL_3_13=y +CONFIG_BACKPORT_KERNEL_3_14=y +CONFIG_BACKPORT_KERNEL_3_15=y +CONFIG_BACKPORT_KERNEL_3_16=y +CONFIG_BACKPORT_KERNEL_3_17=y +CONFIG_BACKPORT_KERNEL_3_18=y +CONFIG_BACKPORT_KERNEL_3_19=y +CONFIG_BACKPORT_KERNEL_3_20=y +CONFIG_BACKPORT_KERNEL_3_21=y +CONFIG_BACKPORT_KERNEL_3_22=y +CONFIG_BACKPORT_KERNEL_3_23=y +CONFIG_BACKPORT_KERNEL_3_24=y +CONFIG_BACKPORT_KERNEL_3_25=y +CONFIG_BACKPORT_KERNEL_3_26=y +CONFIG_BACKPORT_KERNEL_3_27=y +CONFIG_BACKPORT_KERNEL_3_28=y +CONFIG_BACKPORT_KERNEL_3_29=y +CONFIG_BACKPORT_KERNEL_3_30=y +CONFIG_BACKPORT_KERNEL_3_31=y +CONFIG_BACKPORT_KERNEL_3_32=y +CONFIG_BACKPORT_KERNEL_3_33=y +CONFIG_BACKPORT_KERNEL_3_34=y +CONFIG_BACKPORT_KERNEL_3_35=y +CONFIG_BACKPORT_KERNEL_3_36=y +CONFIG_BACKPORT_KERNEL_3_37=y +CONFIG_BACKPORT_KERNEL_3_38=y +CONFIG_BACKPORT_KERNEL_3_39=y +CONFIG_BACKPORT_KERNEL_3_40=y +CONFIG_BACKPORT_KERNEL_3_41=y +CONFIG_BACKPORT_KERNEL_3_42=y +CONFIG_BACKPORT_KERNEL_3_43=y +CONFIG_BACKPORT_KERNEL_3_44=y +CONFIG_BACKPORT_KERNEL_3_45=y +CONFIG_BACKPORT_KERNEL_3_46=y +CONFIG_BACKPORT_KERNEL_3_47=y +CONFIG_BACKPORT_KERNEL_3_48=y +CONFIG_BACKPORT_KERNEL_3_49=y +CONFIG_BACKPORT_KERNEL_3_50=y +CONFIG_BACKPORT_KERNEL_3_51=y +CONFIG_BACKPORT_KERNEL_3_52=y +CONFIG_BACKPORT_KERNEL_3_53=y +CONFIG_BACKPORT_KERNEL_3_54=y +CONFIG_BACKPORT_KERNEL_3_55=y +CONFIG_BACKPORT_KERNEL_3_56=y +CONFIG_BACKPORT_KERNEL_3_57=y +CONFIG_BACKPORT_KERNEL_3_58=y +CONFIG_BACKPORT_KERNEL_3_59=y +CONFIG_BACKPORT_KERNEL_3_60=y +CONFIG_BACKPORT_KERNEL_3_61=y +CONFIG_BACKPORT_KERNEL_3_62=y +CONFIG_BACKPORT_KERNEL_3_63=y +CONFIG_BACKPORT_KERNEL_3_64=y +CONFIG_BACKPORT_KERNEL_3_65=y +CONFIG_BACKPORT_KERNEL_3_66=y +CONFIG_BACKPORT_KERNEL_3_67=y +CONFIG_BACKPORT_KERNEL_3_68=y +CONFIG_BACKPORT_KERNEL_3_69=y +CONFIG_BACKPORT_KERNEL_3_70=y +CONFIG_BACKPORT_KERNEL_3_71=y +CONFIG_BACKPORT_KERNEL_3_72=y +CONFIG_BACKPORT_KERNEL_3_73=y +CONFIG_BACKPORT_KERNEL_3_74=y +CONFIG_BACKPORT_KERNEL_3_75=y +CONFIG_BACKPORT_KERNEL_3_76=y +CONFIG_BACKPORT_KERNEL_3_77=y +CONFIG_BACKPORT_KERNEL_3_78=y +CONFIG_BACKPORT_KERNEL_3_79=y +CONFIG_BACKPORT_KERNEL_3_80=y +CONFIG_BACKPORT_KERNEL_3_81=y +CONFIG_BACKPORT_KERNEL_3_82=y +CONFIG_BACKPORT_KERNEL_3_83=y +CONFIG_BACKPORT_KERNEL_3_84=y +CONFIG_BACKPORT_KERNEL_3_85=y +CONFIG_BACKPORT_KERNEL_3_86=y +CONFIG_BACKPORT_KERNEL_3_87=y +CONFIG_BACKPORT_KERNEL_3_88=y +CONFIG_BACKPORT_KERNEL_3_89=y +CONFIG_BACKPORT_KERNEL_3_90=y +CONFIG_BACKPORT_KERNEL_3_91=y +CONFIG_BACKPORT_KERNEL_3_92=y +CONFIG_BACKPORT_KERNEL_3_93=y +CONFIG_BACKPORT_KERNEL_3_94=y +CONFIG_BACKPORT_KERNEL_3_95=y +CONFIG_BACKPORT_KERNEL_3_96=y +CONFIG_BACKPORT_KERNEL_3_97=y +CONFIG_BACKPORT_KERNEL_3_98=y +CONFIG_BACKPORT_BPAUTO_BUILD_CORDIC=m +CONFIG_BACKPORT_BPAUTO_USERSEL_BUILD_ALL=y +# CONFIG_BACKPORT_BPAUTO_BUILD_CRYPTO_CCM is not set +CONFIG_BACKPORT_CFG80211=m +# CONFIG_BACKPORT_NL80211_TESTMODE is not set +# CONFIG_BACKPORT_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_BACKPORT_CFG80211_REG_DEBUG is not set +# CONFIG_BACKPORT_CFG80211_CERTIFICATION_ONUS is not set +CONFIG_BACKPORT_CFG80211_DEFAULT_PS=y +# CONFIG_BACKPORT_CFG80211_DEBUGFS is not set +# CONFIG_BACKPORT_CFG80211_INTERNAL_REGDB is not set +# CONFIG_BACKPORT_CFG80211_WEXT is not set +# CONFIG_BACKPORT_LIB80211 is not set +CONFIG_BACKPORT_MAC80211=m +CONFIG_BACKPORT_MAC80211_HAS_RC=y +CONFIG_BACKPORT_MAC80211_RC_MINSTREL=y +CONFIG_BACKPORT_MAC80211_RC_MINSTREL_HT=y +# CONFIG_BACKPORT_MAC80211_RC_MINSTREL_VHT is not set +CONFIG_BACKPORT_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_BACKPORT_MAC80211_RC_DEFAULT="minstrel_ht" +# CONFIG_BACKPORT_MAC80211_MESH is not set +CONFIG_BACKPORT_MAC80211_LEDS=y +# CONFIG_BACKPORT_MAC80211_DEBUGFS is not set +# CONFIG_BACKPORT_MAC80211_MESSAGE_TRACING is not set +# CONFIG_BACKPORT_MAC80211_DEBUG_MENU is not set +# CONFIG_BACKPORT_BT is not set +CONFIG_BACKPORT_WLAN=y +# CONFIG_BACKPORT_LIBERTAS_THINFIRM is not set +CONFIG_BACKPORT_AT76C50X_USB=m +CONFIG_BACKPORT_USB_NET_RNDIS_WLAN=m +CONFIG_BACKPORT_RTL8187=m +# CONFIG_BACKPORT_MAC80211_HWSIM is not set +CONFIG_BACKPORT_ATH_COMMON=m +CONFIG_BACKPORT_ATH_CARDS=m +# CONFIG_BACKPORT_ATH_DEBUG is not set +CONFIG_BACKPORT_ATH9K_HW=m +CONFIG_BACKPORT_ATH9K_COMMON=m +CONFIG_BACKPORT_ATH9K_BTCOEX_SUPPORT=y +CONFIG_BACKPORT_ATH9K=m +# CONFIG_BACKPORT_ATH9K_AHB is not set +# CONFIG_BACKPORT_ATH9K_DEBUGFS is not set +# CONFIG_BACKPORT_ATH9K_DYNACK is not set +# CONFIG_BACKPORT_ATH9K_WOW is not set +# CONFIG_BACKPORT_ATH9K_CHANNEL_CONTEXT is not set +CONFIG_BACKPORT_ATH9K_PCOEM=y +CONFIG_BACKPORT_ATH9K_HTC=m +# CONFIG_BACKPORT_ATH9K_HTC_DEBUGFS is not set +CONFIG_BACKPORT_CARL9170=m +CONFIG_BACKPORT_CARL9170_LEDS=y +CONFIG_BACKPORT_CARL9170_WPC=y +# CONFIG_BACKPORT_CARL9170_HWRNG is not set +CONFIG_BACKPORT_ATH6KL=m +# CONFIG_BACKPORT_ATH6KL_SDIO is not set +CONFIG_BACKPORT_ATH6KL_USB=m +# CONFIG_BACKPORT_ATH6KL_DEBUG is not set +# CONFIG_BACKPORT_ATH6KL_TRACING is not set +CONFIG_BACKPORT_AR5523=m +CONFIG_BACKPORT_ATH10K=m +# CONFIG_BACKPORT_ATH10K_DEBUG is not set +# CONFIG_BACKPORT_ATH10K_DEBUGFS is not set +# CONFIG_BACKPORT_ATH10K_TRACING is not set +CONFIG_BACKPORT_WCN36XX=m +# CONFIG_BACKPORT_WCN36XX_DEBUGFS is not set +CONFIG_BACKPORT_BRCMUTIL=m +CONFIG_BACKPORT_BRCMFMAC=m +CONFIG_BACKPORT_BRCMFMAC_PROTO_BCDC=y +# CONFIG_BACKPORT_BRCMFMAC_SDIO is not set +CONFIG_BACKPORT_BRCMFMAC_USB=y +# CONFIG_BACKPORT_LIBERTAS is not set +CONFIG_BACKPORT_P54_COMMON=m +CONFIG_BACKPORT_P54_USB=m +# CONFIG_BACKPORT_P54_SPI is not set +CONFIG_BACKPORT_RT2X00=m +CONFIG_BACKPORT_RT2500USB=m +CONFIG_BACKPORT_RT73USB=m +CONFIG_BACKPORT_RT2800USB=m +CONFIG_BACKPORT_RT2800USB_RT33XX=y +CONFIG_BACKPORT_RT2800USB_RT35XX=y +CONFIG_BACKPORT_RT2800USB_RT3573=y +CONFIG_BACKPORT_RT2800USB_RT53XX=y +CONFIG_BACKPORT_RT2800USB_RT55XX=y +CONFIG_BACKPORT_RT2800USB_UNKNOWN=y +CONFIG_BACKPORT_RT2800_LIB=m +CONFIG_BACKPORT_RT2X00_LIB_USB=m +CONFIG_BACKPORT_RT2X00_LIB=m +CONFIG_BACKPORT_RT2X00_LIB_FIRMWARE=y +CONFIG_BACKPORT_RT2X00_LIB_CRYPTO=y +CONFIG_BACKPORT_RT2X00_LIB_LEDS=y +# CONFIG_BACKPORT_RT2X00_DEBUG is not set +CONFIG_BACKPORT_RTL_CARDS=m +# CONFIG_BACKPORT_RTL8192CU is not set +CONFIG_BACKPORT_RTL8192C_COMMON=m +# CONFIG_BACKPORT_WL_TI is not set +CONFIG_BACKPORT_ZD1211RW=m +# CONFIG_BACKPORT_ZD1211RW_DEBUG is not set +# CONFIG_BACKPORT_MWIFIEX is not set +# CONFIG_BACKPORT_RSI_91X is not set +CONFIG_BACKPORT_USB_NET_DRIVERS=m +CONFIG_BACKPORT_USB_USBNET=m +CONFIG_BACKPORT_USB_NET_CDCETHER=m +# CONFIG_BACKPORT_USB_NET_CDC_NCM is not set +# CONFIG_BACKPORT_USB_NET_CDC_MBIM is not set +CONFIG_BACKPORT_USB_NET_RNDIS_HOST=m +# CONFIG_BACKPORT_USB_NET_QMI_WWAN is not set +# CONFIG_BACKPORT_USB_SIERRA_NET is not set +# CONFIG_BACKPORT_NFC is not set +# CONFIG_BACKPORT_NFC_DIGITAL is not set +# CONFIG_BACKPORT_NFC_NCI is not set +# CONFIG_BACKPORT_NFC_NCI_SPI is not set +# CONFIG_BACKPORT_NFC_HCI is not set +# CONFIG_BACKPORT_NFC_SHDLC is not set +# CONFIG_BACKPORT_IEEE802154 is not set + +# +# USB Device Class drivers +# +CONFIG_BACKPORT_USB_WDM=m +CONFIG_RTL8192CU=m +CONFIG_RTL8821AU=m +CONFIG_RTL8188EU=m +CONFIG_RTL8192DU=m diff --git a/board/odroidxu4/mkimage.sh b/board/odroidxu4/mkimage.sh new file mode 100755 index 0000000000..409d891605 --- /dev/null +++ b/board/odroidxu4/mkimage.sh @@ -0,0 +1,19 @@ +#!/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.bin +export UBOOT_SEEK=63 +BL1=$IMG_DIR/bl1.bin.hardkernel +BL2=$IMG_DIR/bl2.bin.hardkernel +TZSW=$IMG_DIR/tzsw.bin.hardkernel +source $COMMON_DIR/mkimage.sh + +dd conv=notrunc if=$BL1 of=$DISK_IMG bs=512 seek=1 +dd conv=notrunc if=$BL2 of=$DISK_IMG bs=512 seek=31 +dd conv=notrunc if=$TZSW of=$DISK_IMG bs=512 seek=719 +dd conv=notrunc if=/dev/zero of=$DISK_IMG bs=512 seek=1231 count=32 + diff --git a/board/odroidxu4/overlay/etc/board b/board/odroidxu4/overlay/etc/board new file mode 100644 index 0000000000..ccee912b5e --- /dev/null +++ b/board/odroidxu4/overlay/etc/board @@ -0,0 +1 @@ +odroidxu4 diff --git a/board/odroidxu4/overlay/etc/init.d/S02waiteth b/board/odroidxu4/overlay/etc/init.d/S02waiteth new file mode 100755 index 0000000000..6873243889 --- /dev/null +++ b/board/odroidxu4/overlay/etc/init.d/S02waiteth @@ -0,0 +1,20 @@ +#!/bin/bash + +test -n "$os_version" || source /etc/init.d/base + +case "$1" in + start) + sleep 2 + ;; + + stop) + true + ;; + + *) + echo "Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/odroidxu4/overlay/etc/init.d/boardsn b/board/odroidxu4/overlay/etc/init.d/boardsn new file mode 100755 index 0000000000..34ca56a576 --- /dev/null +++ b/board/odroidxu4/overlay/etc/init.d/boardsn @@ -0,0 +1,5 @@ +#!/bin/bash + +sn=$(cat /sys/class/net/eth0/address 2>/dev/null | tr -d ':') +echo ${sn: -8} + diff --git a/board/odroidxu4/overlay/etc/modules b/board/odroidxu4/overlay/etc/modules new file mode 100644 index 0000000000..d756d4ecab --- /dev/null +++ b/board/odroidxu4/overlay/etc/modules @@ -0,0 +1,2 @@ +r8152 + diff --git a/board/odroidxu4/overlay/lib/arm-linux-gnueabihf b/board/odroidxu4/overlay/lib/arm-linux-gnueabihf new file mode 120000 index 0000000000..dc555529d5 --- /dev/null +++ b/board/odroidxu4/overlay/lib/arm-linux-gnueabihf @@ -0,0 +1 @@ +/lib \ No newline at end of file diff --git a/board/odroidxu4/overlay/usr/lib/arm-linux-gnueabihf b/board/odroidxu4/overlay/usr/lib/arm-linux-gnueabihf new file mode 120000 index 0000000000..6c1836ebc7 --- /dev/null +++ b/board/odroidxu4/overlay/usr/lib/arm-linux-gnueabihf @@ -0,0 +1 @@ +/usr/lib \ No newline at end of file diff --git a/board/odroidxu4/postscript.sh b/board/odroidxu4/postscript.sh new file mode 100755 index 0000000000..e1636023a3 --- /dev/null +++ b/board/odroidxu4/postscript.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# boot directory +mkdir -p $BOOT_DIR + +cp $IMG_DIR/zImage $BOOT_DIR +cp $IMG_DIR/exynos5422-odroidxu3.dtb $BOOT_DIR +cp $BOARD_DIR/bl1.bin.hardkernel $IMG_DIR +cp $BOARD_DIR/bl2.bin.hardkernel $IMG_DIR +cp $BOARD_DIR/tzsw.bin.hardkernel $IMG_DIR +cp $BOARD_DIR/u-boot.bin $IMG_DIR +cp $BOARD_DIR/boot.ini $BOOT_DIR + +# disable software updating +sed -i 's/enable_update true/enable_update false/' $TARGET/etc/motioneye.conf + diff --git a/board/odroidxu4/tzsw.bin.hardkernel b/board/odroidxu4/tzsw.bin.hardkernel new file mode 100644 index 0000000000..23ecc6efc7 Binary files /dev/null and b/board/odroidxu4/tzsw.bin.hardkernel differ diff --git a/board/odroidxu4/u-boot.bin b/board/odroidxu4/u-boot.bin new file mode 100644 index 0000000000..ea1bf7ac78 Binary files /dev/null and b/board/odroidxu4/u-boot.bin differ diff --git a/board/raspberrypi/cleanups.sh b/board/raspberrypi/cleanups.sh new file mode 100755 index 0000000000..7e41addaed --- /dev/null +++ b/board/raspberrypi/cleanups.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +rm -rf $TARGET/opt/vc/src +rm -rf $TARGET/opt/vc/include + diff --git a/board/raspberrypi/cmdline.txt b/board/raspberrypi/cmdline.txt new file mode 100644 index 0000000000..16d676103d --- /dev/null +++ b/board/raspberrypi/cmdline.txt @@ -0,0 +1 @@ +dwc_otg.fiq_fix_enable=1 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait ro rootflags=noload panic=10 quiet loglevel=1 ipv6.disable=1 diff --git a/board/raspberrypi/config.txt b/board/raspberrypi/config.txt new file mode 100644 index 0000000000..75c5a66045 --- /dev/null +++ b/board/raspberrypi/config.txt @@ -0,0 +1,9 @@ +gpu_mem=128 +gpu_mem_256=128 +gpu_mem_512=128 + +dtparam=i2c_arm=on +dtparam=i2s=on +dtparam=spi=on +dtparam=audio=on + diff --git a/board/raspberrypi/fwupdater.gz b/board/raspberrypi/fwupdater.gz new file mode 100644 index 0000000000..f6b4df253f Binary files /dev/null and b/board/raspberrypi/fwupdater.gz differ diff --git a/board/raspberrypi/mkimage.sh b/board/raspberrypi/mkimage.sh new file mode 100755 index 0000000000..9d0d2dbf71 --- /dev/null +++ b/board/raspberrypi/mkimage.sh @@ -0,0 +1,10 @@ +#!/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/ + +$COMMON_DIR/mkimage.sh + diff --git a/board/raspberrypi/overlay-initramfs/remove_initramfs b/board/raspberrypi/overlay-initramfs/remove_initramfs new file mode 100755 index 0000000000..a38cdc4ace --- /dev/null +++ b/board/raspberrypi/overlay-initramfs/remove_initramfs @@ -0,0 +1,4 @@ +#!/bin/sh + +sed -i 's/^initramfs.*//g' /boot/config.txt + diff --git a/board/raspberrypi/overlay/etc/board b/board/raspberrypi/overlay/etc/board new file mode 100644 index 0000000000..41757af4a7 --- /dev/null +++ b/board/raspberrypi/overlay/etc/board @@ -0,0 +1 @@ +raspberrypi diff --git a/board/raspberrypi/overlay/etc/init.d/S05cpufreq b/board/raspberrypi/overlay/etc/init.d/S05cpufreq new file mode 100755 index 0000000000..5c97047d42 --- /dev/null +++ b/board/raspberrypi/overlay/etc/init.d/S05cpufreq @@ -0,0 +1,36 @@ +#!/bin/bash + +test -n "$os_version" || source /etc/init.d/base + +gov="ondemand" +cpufreqdir="/sys/devices/system/cpu/cpu0/cpufreq" +govdir="/sys/devices/system/cpu/cpufreq/$gov" + +configure() { + echo $gov > $cpufreqdir/scaling_governor + if [ $gov == "ondemand" ]; then + echo 50 > $govdir/up_threshold + echo 100000 > $govdir/sampling_rate + echo 50 > $govdir/sampling_down_factor + echo 1 > $govdir/io_is_busy + fi +} + +case "$1" in + start) + msg_begin "Configuring CPU frequency" + configure + test $? == 0 && msg_done || msg_fail + ;; + + stop) + true + ;; + + *) + echo $"Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/raspberrypi/overlay/etc/init.d/S11brownout b/board/raspberrypi/overlay/etc/init.d/S11brownout new file mode 100755 index 0000000000..80a256d157 --- /dev/null +++ b/board/raspberrypi/overlay/etc/init.d/S11brownout @@ -0,0 +1,38 @@ +#!/bin/bash + +check_interval=30 +readv=/sys/class/leds/led1/brightness + +test -e "$readv" || exit 0 + +test -n "$os_version" || source /etc/init.d/base + +watch() { + while true; do + if [ "$(cat $readv)" == "0" ]; then + logger -t brownout -s "low power supply voltage detected" + fi + sleep $check_interval + done +} + +case "$1" in + start) + msg_begin "Starting brownout detector" + watch & + test $? == 0 && msg_done || msg_fail + ;; + + stop) + msg_begin "Stopping brownout detector" + ps | grep brownout | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + test $? == 0 && msg_done || msg_fail + ;; + + *) + echo $"Usage: $0 {start|stop}" + exit 1 +esac + +exit $? + diff --git a/board/raspberrypi/overlay/etc/init.d/boardsn b/board/raspberrypi/overlay/etc/init.d/boardsn new file mode 100755 index 0000000000..16881c26f7 --- /dev/null +++ b/board/raspberrypi/overlay/etc/init.d/boardsn @@ -0,0 +1,5 @@ +#!/bin/bash + +sn=$(cat /proc/cpuinfo | grep Serial | tr -d ' ' | cut -d ':' -f 2) +echo ${sn: -8} + diff --git a/board/raspberrypi/overlay/etc/ld.so.preload b/board/raspberrypi/overlay/etc/ld.so.preload new file mode 100644 index 0000000000..863162b676 --- /dev/null +++ b/board/raspberrypi/overlay/etc/ld.so.preload @@ -0,0 +1 @@ +/usr/lib/libarmmem.so diff --git a/board/raspberrypi/postscript.sh b/board/raspberrypi/postscript.sh new file mode 100755 index 0000000000..fda3f4e444 --- /dev/null +++ b/board/raspberrypi/postscript.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +RPI_FW_DIR=$TARGET/../images/rpi-firmware + +cp $BOARD_DIR/config.txt $BOOT_DIR +cp $BOARD_DIR/cmdline.txt $BOOT_DIR +cp $BOARD_DIR/fwupdater.gz $BOOT_DIR +cp $IMG_DIR/zImage $BOOT_DIR/kernel.img +cp $IMG_DIR/bcm2708-rpi-b.dtb $BOOT_DIR +cp $IMG_DIR/bcm2708-rpi-b-plus.dtb $BOOT_DIR +cp $IMG_DIR/bcm2708-rpi-cm.dtb $BOOT_DIR +cp $RPI_FW_DIR/bootcode.bin $BOOT_DIR +cp $RPI_FW_DIR/start.elf $BOOT_DIR +cp $RPI_FW_DIR/fixup.dat $BOOT_DIR + diff --git a/board/raspberrypi2/cleanups.sh b/board/raspberrypi2/cleanups.sh new file mode 120000 index 0000000000..d9a8ba25c5 --- /dev/null +++ b/board/raspberrypi2/cleanups.sh @@ -0,0 +1 @@ +../raspberrypi/cleanups.sh \ No newline at end of file diff --git a/board/raspberrypi2/cmdline.txt b/board/raspberrypi2/cmdline.txt new file mode 100644 index 0000000000..16d676103d --- /dev/null +++ b/board/raspberrypi2/cmdline.txt @@ -0,0 +1 @@ +dwc_otg.fiq_fix_enable=1 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait ro rootflags=noload panic=10 quiet loglevel=1 ipv6.disable=1 diff --git a/board/raspberrypi2/config.txt b/board/raspberrypi2/config.txt new file mode 100644 index 0000000000..b7f96a2ef7 --- /dev/null +++ b/board/raspberrypi2/config.txt @@ -0,0 +1,7 @@ +gpu_mem=128 + +dtparam=i2c_arm=on +dtparam=i2s=on +dtparam=spi=on +dtparam=audio=on + diff --git a/board/raspberrypi2/fwupdater.gz b/board/raspberrypi2/fwupdater.gz new file mode 100644 index 0000000000..f6b4df253f Binary files /dev/null and b/board/raspberrypi2/fwupdater.gz differ diff --git a/board/raspberrypi2/mkimage.sh b/board/raspberrypi2/mkimage.sh new file mode 120000 index 0000000000..437f24e6f6 --- /dev/null +++ b/board/raspberrypi2/mkimage.sh @@ -0,0 +1 @@ +../raspberrypi/mkimage.sh \ No newline at end of file diff --git a/board/raspberrypi2/overlay/etc/board b/board/raspberrypi2/overlay/etc/board new file mode 100644 index 0000000000..3b00436474 --- /dev/null +++ b/board/raspberrypi2/overlay/etc/board @@ -0,0 +1 @@ +raspberrypi2 diff --git a/board/raspberrypi2/overlay/etc/init.d/S05cpufreq b/board/raspberrypi2/overlay/etc/init.d/S05cpufreq new file mode 100755 index 0000000000..5c97047d42 --- /dev/null +++ b/board/raspberrypi2/overlay/etc/init.d/S05cpufreq @@ -0,0 +1,36 @@ +#!/bin/bash + +test -n "$os_version" || source /etc/init.d/base + +gov="ondemand" +cpufreqdir="/sys/devices/system/cpu/cpu0/cpufreq" +govdir="/sys/devices/system/cpu/cpufreq/$gov" + +configure() { + echo $gov > $cpufreqdir/scaling_governor + if [ $gov == "ondemand" ]; then + echo 50 > $govdir/up_threshold + echo 100000 > $govdir/sampling_rate + echo 50 > $govdir/sampling_down_factor + echo 1 > $govdir/io_is_busy + fi +} + +case "$1" in + start) + msg_begin "Configuring CPU frequency" + configure + test $? == 0 && msg_done || msg_fail + ;; + + stop) + true + ;; + + *) + echo $"Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/raspberrypi2/overlay/etc/init.d/S11brownout b/board/raspberrypi2/overlay/etc/init.d/S11brownout new file mode 100755 index 0000000000..80a256d157 --- /dev/null +++ b/board/raspberrypi2/overlay/etc/init.d/S11brownout @@ -0,0 +1,38 @@ +#!/bin/bash + +check_interval=30 +readv=/sys/class/leds/led1/brightness + +test -e "$readv" || exit 0 + +test -n "$os_version" || source /etc/init.d/base + +watch() { + while true; do + if [ "$(cat $readv)" == "0" ]; then + logger -t brownout -s "low power supply voltage detected" + fi + sleep $check_interval + done +} + +case "$1" in + start) + msg_begin "Starting brownout detector" + watch & + test $? == 0 && msg_done || msg_fail + ;; + + stop) + msg_begin "Stopping brownout detector" + ps | grep brownout | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + test $? == 0 && msg_done || msg_fail + ;; + + *) + echo $"Usage: $0 {start|stop}" + exit 1 +esac + +exit $? + diff --git a/board/raspberrypi2/overlay/etc/init.d/boardsn b/board/raspberrypi2/overlay/etc/init.d/boardsn new file mode 100755 index 0000000000..16881c26f7 --- /dev/null +++ b/board/raspberrypi2/overlay/etc/init.d/boardsn @@ -0,0 +1,5 @@ +#!/bin/bash + +sn=$(cat /proc/cpuinfo | grep Serial | tr -d ' ' | cut -d ':' -f 2) +echo ${sn: -8} + diff --git a/board/raspberrypi2/postscript.sh b/board/raspberrypi2/postscript.sh new file mode 100755 index 0000000000..eccf760684 --- /dev/null +++ b/board/raspberrypi2/postscript.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +RPI_FW_DIR=$TARGET/../images/rpi-firmware + +cp $BOARD_DIR/config.txt $BOOT_DIR +cp $BOARD_DIR/cmdline.txt $BOOT_DIR +cp $BOARD_DIR/fwupdater.gz $BOOT_DIR +cp $IMG_DIR/zImage $BOOT_DIR/kernel.img +cp $IMG_DIR/bcm2709-rpi-2-b.dtb $BOOT_DIR +cp $RPI_FW_DIR/bootcode.bin $BOOT_DIR +cp $RPI_FW_DIR/start.elf $BOOT_DIR +cp $RPI_FW_DIR/fixup.dat $BOOT_DIR + diff --git a/board/raspberrypi3/cleanups.sh b/board/raspberrypi3/cleanups.sh new file mode 120000 index 0000000000..d9a8ba25c5 --- /dev/null +++ b/board/raspberrypi3/cleanups.sh @@ -0,0 +1 @@ +../raspberrypi/cleanups.sh \ No newline at end of file diff --git a/board/raspberrypi3/cmdline.txt b/board/raspberrypi3/cmdline.txt new file mode 100644 index 0000000000..16d676103d --- /dev/null +++ b/board/raspberrypi3/cmdline.txt @@ -0,0 +1 @@ +dwc_otg.fiq_fix_enable=1 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait ro rootflags=noload panic=10 quiet loglevel=1 ipv6.disable=1 diff --git a/board/raspberrypi3/config.txt b/board/raspberrypi3/config.txt new file mode 100644 index 0000000000..b7f96a2ef7 --- /dev/null +++ b/board/raspberrypi3/config.txt @@ -0,0 +1,7 @@ +gpu_mem=128 + +dtparam=i2c_arm=on +dtparam=i2s=on +dtparam=spi=on +dtparam=audio=on + diff --git a/board/raspberrypi3/fwupdater.gz b/board/raspberrypi3/fwupdater.gz new file mode 100644 index 0000000000..f6b4df253f Binary files /dev/null and b/board/raspberrypi3/fwupdater.gz differ diff --git a/board/raspberrypi3/mkimage.sh b/board/raspberrypi3/mkimage.sh new file mode 120000 index 0000000000..437f24e6f6 --- /dev/null +++ b/board/raspberrypi3/mkimage.sh @@ -0,0 +1 @@ +../raspberrypi/mkimage.sh \ No newline at end of file diff --git a/board/raspberrypi3/overlay/etc/board b/board/raspberrypi3/overlay/etc/board new file mode 100644 index 0000000000..362cbd3022 --- /dev/null +++ b/board/raspberrypi3/overlay/etc/board @@ -0,0 +1 @@ +raspberrypi3 diff --git a/board/raspberrypi3/overlay/etc/init.d/S05cpufreq b/board/raspberrypi3/overlay/etc/init.d/S05cpufreq new file mode 100755 index 0000000000..5c97047d42 --- /dev/null +++ b/board/raspberrypi3/overlay/etc/init.d/S05cpufreq @@ -0,0 +1,36 @@ +#!/bin/bash + +test -n "$os_version" || source /etc/init.d/base + +gov="ondemand" +cpufreqdir="/sys/devices/system/cpu/cpu0/cpufreq" +govdir="/sys/devices/system/cpu/cpufreq/$gov" + +configure() { + echo $gov > $cpufreqdir/scaling_governor + if [ $gov == "ondemand" ]; then + echo 50 > $govdir/up_threshold + echo 100000 > $govdir/sampling_rate + echo 50 > $govdir/sampling_down_factor + echo 1 > $govdir/io_is_busy + fi +} + +case "$1" in + start) + msg_begin "Configuring CPU frequency" + configure + test $? == 0 && msg_done || msg_fail + ;; + + stop) + true + ;; + + *) + echo $"Usage: $0 {start}" + exit 1 +esac + +exit $? + diff --git a/board/raspberrypi3/overlay/etc/init.d/S11brownout b/board/raspberrypi3/overlay/etc/init.d/S11brownout new file mode 100755 index 0000000000..80a256d157 --- /dev/null +++ b/board/raspberrypi3/overlay/etc/init.d/S11brownout @@ -0,0 +1,38 @@ +#!/bin/bash + +check_interval=30 +readv=/sys/class/leds/led1/brightness + +test -e "$readv" || exit 0 + +test -n "$os_version" || source /etc/init.d/base + +watch() { + while true; do + if [ "$(cat $readv)" == "0" ]; then + logger -t brownout -s "low power supply voltage detected" + fi + sleep $check_interval + done +} + +case "$1" in + start) + msg_begin "Starting brownout detector" + watch & + test $? == 0 && msg_done || msg_fail + ;; + + stop) + msg_begin "Stopping brownout detector" + ps | grep brownout | grep -v $$ | grep -v grep | tr -s ' ' | sed -e 's/^\s//' | cut -d ' ' -f 1 | xargs -r kill + test $? == 0 && msg_done || msg_fail + ;; + + *) + echo $"Usage: $0 {start|stop}" + exit 1 +esac + +exit $? + diff --git a/board/raspberrypi3/overlay/etc/init.d/boardsn b/board/raspberrypi3/overlay/etc/init.d/boardsn new file mode 100755 index 0000000000..16881c26f7 --- /dev/null +++ b/board/raspberrypi3/overlay/etc/init.d/boardsn @@ -0,0 +1,5 @@ +#!/bin/bash + +sn=$(cat /proc/cpuinfo | grep Serial | tr -d ' ' | cut -d ':' -f 2) +echo ${sn: -8} + diff --git a/board/raspberrypi3/postscript.sh b/board/raspberrypi3/postscript.sh new file mode 100755 index 0000000000..c76bfb264c --- /dev/null +++ b/board/raspberrypi3/postscript.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +RPI_FW_DIR=$TARGET/../images/rpi-firmware + +cp $BOARD_DIR/config.txt $BOOT_DIR +cp $BOARD_DIR/cmdline.txt $BOOT_DIR +cp $BOARD_DIR/fwupdater.gz $BOOT_DIR +cp $IMG_DIR/zImage $BOOT_DIR/kernel.img +cp $IMG_DIR/bcm2710-rpi-3-b.dtb $BOOT_DIR +cp $RPI_FW_DIR/bootcode.bin $BOOT_DIR +cp $RPI_FW_DIR/start.elf $BOOT_DIR +cp $RPI_FW_DIR/fixup.dat $BOOT_DIR + diff --git a/boot/Config.in b/boot/Config.in new file mode 100644 index 0000000000..de52815007 --- /dev/null +++ b/boot/Config.in @@ -0,0 +1,8 @@ +menu "Bootloaders" + +source "boot/grub/Config.in" +source "boot/grub2/Config.in" +source "boot/syslinux/Config.in" +source "boot/uboot/Config.in" + +endmenu diff --git a/boot/common.mk b/boot/common.mk new file mode 100644 index 0000000000..3021e51949 --- /dev/null +++ b/boot/common.mk @@ -0,0 +1 @@ +include $(sort $(wildcard boot/*/*.mk)) diff --git a/boot/grub/Config.in b/boot/grub/Config.in new file mode 100644 index 0000000000..4db8642acf --- /dev/null +++ b/boot/grub/Config.in @@ -0,0 +1,200 @@ +config BR2_TARGET_GRUB + bool "grub" + depends on BR2_i386 || BR2_x86_64 + select BR2_HOSTARCH_NEEDS_IA32_COMPILER + help + The GRand Unified Bootloader for x86 systems. + + Some notes on creating a disk image with Grub installed: + 1. Create an empty disk image + dd if=/dev/zero of=disk.img bs=1M count=32 + 2. Create one primary partition + cfdisk -h 16 -s 63 disk.img + 3. Set up a loop device + sudo losetup -f disk.img + 4. Set up loop devices per partitions + sudo partx -a /dev/loop0 + 5. Create the ext2 filesystem + sudo mkfs.ext2 -L root /dev/loop0p1 + 6. Mount the filesystem + mount /dev/loop0p1 /mnt + 7. Extract the root filesystem + sudo tar -C /mnt -xf output/images/rootfs.tar + 8. Unmount the filesystem, clean up loop device + sudo umount /mnt + sudo partx -d /dev/loop0 + sudo losetup -d /dev/loop0 + 9. Install grub + output/host/sbin/grub --device-map=/dev/null + and in the grub shell, enter: + device (hd0) disk.img + geometry (hd0) 16 63 + root (hd0,0) + setup (hd0) + 10. Image is ready + Can be tested in Qemu, with: + qemu-system-{i386,x86-64} -hda disk.img + +if BR2_TARGET_GRUB + +config BR2_TARGET_GRUB_SPLASH + bool "Splashimage support" + help + Add support for splashimage. + + A splashimage is a 14-color indexed .xpm picture which is + displayed as background for the grub menu. See + http://www.katspace.org/computers/Grub_Splash/ for details + on how to generate a splashimage. + +config BR2_TARGET_GRUB_DISKLESS + bool "diskless support" + help + enable diskless support + +menu "filesystem drivers" + +config BR2_TARGET_GRUB_FS_EXT2 + bool "ext2" + default y + help + Enable support for the ext2 filesystem in Grub + +config BR2_TARGET_GRUB_FS_FAT + bool "FAT" + default y + help + Enable support for the FAT filesystem in Grub. + +config BR2_TARGET_GRUB_FS_ISO9660 + bool "ISO9660" + help + Enable support for the ISO9660 filesystem in Grub. + +config BR2_TARGET_GRUB_FS_JFS + bool "IBM JFS" + help + Enable support for the JFS filesystem in Grub. + +config BR2_TARGET_GRUB_FS_REISERFS + bool "ReiserFS" + help + Enable support for the ReiserFS filesystem in Grub. + +config BR2_TARGET_GRUB_FS_XFS + bool "SGI XFS" + help + Enable support for the XFS filesystem in Grub. + +endmenu + +menu "network drivers" + +config BR2_TARGET_GRUB_3c595 + bool "3Com595 driver" + help + enable 3Com595 driver + +config BR2_TARGET_GRUB_3c90x + bool "3Com90x driver" + help + enable 3Com90x driver + +config BR2_TARGET_GRUB_davicom + bool "Davicom driver" + help + enable Davicom driver + +config BR2_TARGET_GRUB_e1000 + bool "Etherexpress Pro/1000 driver" + help + enable Etherexpress Pro/1000 driver + +config BR2_TARGET_GRUB_eepro100 + bool "Etherexpress Pro/100 driver" + help + enable Etherexpress Pro/100 driver + +config BR2_TARGET_GRUB_epic100 + bool "SMC 83c170 EPIC/100 driver" + help + enable SMC 83c170 EPIC/100 driver + +config BR2_TARGET_GRUB_forcedeth + bool "Nvidia Geforce driver" + help + enable Nvidia Geforce driver + +config BR2_TARGET_GRUB_natsemi + bool "NatSemi DP8381x driver" + help + enable NatSemi DP8381x driver + +config BR2_TARGET_GRUB_ns83820 + bool "NS83820 driver" + help + enable NS83820 driver + +config BR2_TARGET_GRUB_ns8390 + bool "NE2000 PCI driver" + help + enable NE2000 PCI driver + +config BR2_TARGET_GRUB_pcnet32 + bool "AMD Lance/PCI PCNet/32 driver" + help + enable AMD Lance/PCI PCNet/32 driver + +config BR2_TARGET_GRUB_pnic + bool "Bochs Pseudo Nic driver" + help + enable Bochs Pseudo Nic driver + +config BR2_TARGET_GRUB_rtl8139 + bool "Realtek 8139 driver" + help + enable Realtek 8139 driver + +config BR2_TARGET_GRUB_r8169 + bool "Realtek 8169 driver" + help + enable Realtek 8169 driver + +config BR2_TARGET_GRUB_sis900 + bool "SIS 900 and SIS 7016 driver" + help + enable SIS 900 and SIS 7016 driver + +config BR2_TARGET_GRUB_tg3 + bool "Broadcom Tigon3 driver" + help + enable Broadcom Tigon3 driver + +config BR2_TARGET_GRUB_tulip + bool "Tulip driver" + help + enable Tulip driver + +config BR2_TARGET_GRUB_tlan + bool "TI ThunderLAN driver" + help + enable TI ThunderLAN driver + +config BR2_TARGET_GRUB_undi + bool "PXE UNDI driver" + help + enable PXE UNDI driver + +config BR2_TARGET_GRUB_via_rhine + bool "Rhine-I/II driver" + help + enable Rhine-I/II driver + +config BR2_TARGET_GRUB_w89c840 + bool "Winbond W89c840 driver" + help + enable Winbond W89c840 driver + +endmenu + +endif # BR2_TARGET_GRUB diff --git a/boot/grub/grub.100-autoreconf.patch b/boot/grub/grub.100-autoreconf.patch new file mode 100644 index 0000000000..e5dd8343af --- /dev/null +++ b/boot/grub/grub.100-autoreconf.patch @@ -0,0 +1,1407 @@ +diff -rup grub-0.97.oorig/aclocal.m4 grub-0.97/aclocal.m4 +--- grub-0.97.oorig/aclocal.m4 2005-05-08 04:41:18.000000000 +0200 ++++ grub-0.97/aclocal.m4 2006-03-12 14:00:35.000000000 +0100 +@@ -1,7 +1,7 @@ +-# generated automatically by aclocal 1.9.4 -*- Autoconf -*- ++# generated automatically by aclocal 1.9.6 -*- Autoconf -*- + +-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +-# Free Software Foundation, Inc. ++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ++# 2005 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -11,23 +11,11 @@ + # even the implied warranty of MERCHANTABILITY or FITNESS FOR A + # PARTICULAR PURPOSE. + +-# -*- Autoconf -*- +-# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +-# Generated from amversion.in; do not edit by hand. +- +-# 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, 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 ++# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + + # AM_AUTOMAKE_VERSION(VERSION) + # ---------------------------- +@@ -40,26 +28,15 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api + # Call AM_AUTOMAKE_VERSION so it can be traced. + # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +- [AM_AUTOMAKE_VERSION([1.9.4])]) +- +-# AM_AUX_DIR_EXPAND +- +-# Copyright (C) 2001, 2003 Free Software Foundation, Inc. ++ [AM_AUTOMAKE_VERSION([1.9.6])]) + +-# 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, or (at your option) +-# any later version. ++# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +-# 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. ++# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets + # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +@@ -106,26 +83,16 @@ AC_PREREQ([2.50])dnl + am_aux_dir=`cd $ac_aux_dir && pwd` + ]) + +-# AM_CONDITIONAL -*- Autoconf -*- ++# AM_CONDITIONAL -*- Autoconf -*- + +-# Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc. +- +-# 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, 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. ++# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 ++# Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-# serial 6 ++# serial 7 + + # AM_CONDITIONAL(NAME, SHELL-CONDITION) + # ------------------------------------- +@@ -149,26 +116,15 @@ AC_CONFIG_COMMANDS_PRE( + Usually this means the macro was only invoked conditionally.]]) + fi])]) + +-# serial 7 -*- Autoconf -*- + +-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 ++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 + # Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-# 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, 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. +- ++# serial 8 + + # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be + # written in clear, in which case automake, when reading aclocal.m4, +@@ -177,7 +133,6 @@ fi])]) + # CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + +- + # _AM_DEPENDENCIES(NAME) + # ---------------------- + # See how the compiler implements dependency checking. +@@ -317,27 +272,16 @@ AM_CONDITIONAL([AMDEP], [test "x$enable_ + AC_SUBST([AMDEPBACKSLASH]) + ]) + +-# Generate code to set up dependency tracking. -*- Autoconf -*- +- +-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +-# Free Software Foundation, Inc. +- +-# 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, or (at your option) +-# any later version. ++# Generate code to set up dependency tracking. -*- Autoconf -*- + +-# 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. ++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 ++# Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-#serial 2 ++#serial 3 + + # _AM_OUTPUT_DEPENDENCY_COMMANDS + # ------------------------------ +@@ -396,30 +340,19 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS] + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) + ]) + +-# Do all the work for Automake. -*- Autoconf -*- ++# Do all the work for Automake. -*- Autoconf -*- + +-# This macro actually does too much some checks are only needed if +-# your package does certain things. But this isn't really a big deal. +- +-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 + # Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-# 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, 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. ++# serial 12 + +-# serial 11 ++# This macro actually does too much. Some checks are only needed if ++# your package does certain things. But this isn't really a big deal. + + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) + # AM_INIT_AUTOMAKE([OPTIONS]) +@@ -521,51 +454,27 @@ for _am_header in $config_headers :; do + done + echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + ++# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ + # AM_PROG_INSTALL_SH + # ------------------ + # Define $install_sh. +- +-# Copyright (C) 2001, 2003 Free Software Foundation, Inc. +- +-# 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, 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. +- + AC_DEFUN([AM_PROG_INSTALL_SH], + [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl + install_sh=${install_sh-"$am_aux_dir/install-sh"} + AC_SUBST(install_sh)]) + +-# -*- Autoconf -*- +-# Copyright (C) 2003 Free Software Foundation, Inc. +- +-# 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, 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. ++# Copyright (C) 2003, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-# serial 1 ++# serial 2 + + # Check whether the underlying file-system supports filenames + # with a leading dot. For instance MS-DOS doesn't. +@@ -580,28 +489,17 @@ fi + rmdir .tst 2>/dev/null + AC_SUBST([am__leading_dot])]) + +-# Add --enable-maintainer-mode option to configure. ++# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- + # From Jim Meyering + +-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 ++# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 + # Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-# 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, 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. +- +-# serial 3 ++# serial 4 + + AC_DEFUN([AM_MAINTAINER_MODE], + [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) +@@ -620,26 +518,15 @@ AC_DEFUN([AM_MAINTAINER_MODE], + + AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +-# Check to see how 'make' treats includes. -*- Autoconf -*- +- +-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. ++# Check to see how 'make' treats includes. -*- Autoconf -*- + +-# 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, 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. ++# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-# serial 2 ++# serial 3 + + # AM_MAKE_INCLUDE() + # ----------------- +@@ -683,27 +570,16 @@ AC_MSG_RESULT([$_am_result]) + rm -f confinc confmf + ]) + +-# -*- Autoconf -*- +- +- +-# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. +- +-# 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, or (at your option) +-# any later version. ++# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +-# 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. ++# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 ++# Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-# serial 3 ++# serial 4 + + # AM_MISSING_PROG(NAME, PROGRAM) + # ------------------------------ +@@ -729,27 +605,16 @@ else + fi + ]) + ++# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ + # AM_PROG_MKDIR_P + # --------------- + # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. +- +-# Copyright (C) 2003, 2004 Free Software Foundation, Inc. +- +-# 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, 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. +- ++# + # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories + # created by `make install' are always world readable, even if the + # installer happens to have an overly restrictive umask (e.g. 077). +@@ -803,26 +668,15 @@ else + fi + AC_SUBST([mkdir_p])]) + +-# Helper functions for option handling. -*- Autoconf -*- ++# Helper functions for option handling. -*- Autoconf -*- + +-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +- +-# 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, 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. ++# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-# serial 2 ++# serial 3 + + # _AM_MANGLE_OPTION(NAME) + # ----------------------- +@@ -847,28 +701,16 @@ AC_DEFUN([_AM_SET_OPTIONS], + AC_DEFUN([_AM_IF_OPTION], + [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +-# +-# Check to make sure that the build environment is sane. +-# +- +-# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. +- +-# 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, or (at your option) +-# any later version. ++# Check to make sure that the build environment is sane. -*- Autoconf -*- + +-# 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. ++# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 ++# Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-# serial 3 ++# serial 4 + + # AM_SANITY_CHECK + # --------------- +@@ -911,25 +753,14 @@ Check your system clock]) + fi + AC_MSG_RESULT(yes)]) + +-# AM_PROG_INSTALL_STRIP +- +-# Copyright (C) 2001, 2003 Free Software Foundation, Inc. +- +-# 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, 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. ++# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + ++# AM_PROG_INSTALL_STRIP ++# --------------------- + # One issue with vendor `install' (even GNU) is that you can't + # specify the program used to strip binaries. This is especially + # annoying in cross-compiling environments, where the build's strip +@@ -952,25 +783,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) + + # Check how to create a tarball. -*- Autoconf -*- + +-# Copyright (C) 2004 Free Software Foundation, Inc. +- +-# 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, 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. +- +-# serial 1 ++# Copyright (C) 2004, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + ++# serial 2 + + # _AM_PROG_TAR(FORMAT) + # -------------------- +Only in grub-0.97/: autom4te.cache +diff -rup grub-0.97.oorig/configure grub-0.97/configure +--- grub-0.97.oorig/configure 2005-05-08 04:48:12.000000000 +0200 ++++ grub-0.97/configure 2006-03-12 14:00:38.000000000 +0100 +@@ -311,7 +311,7 @@ ac_includes_default="\ + # include + #endif" + +-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT PERL CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CCAS RANLIB ac_ct_RANLIB STAGE1_CFLAGS STAGE2_CFLAGS GRUB_CFLAGS OBJCOPY ac_ct_OBJCOPY GRUB_LIBS CPP EGREP NETBOOT_SUPPORT_TRUE NETBOOT_SUPPORT_FALSE DISKLESS_SUPPORT_TRUE DISKLESS_SUPPORT_FALSE HERCULES_SUPPORT_TRUE HERCULES_SUPPORT_FALSE SERIAL_SUPPORT_TRUE SERIAL_SUPPORT_FALSE SERIAL_SPEED_SIMULATION_TRUE SERIAL_SPEED_SIMULATION_FALSE BUILD_EXAMPLE_KERNEL_TRUE BUILD_EXAMPLE_KERNEL_FALSE FSYS_CFLAGS NET_CFLAGS NET_EXTRAFLAGS NETBOOT_DRIVERS CCASFLAGS LIBOBJS LTLIBOBJS' ++ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT PERL CC ac_ct_CC CFLAGS LDFLAGS CPPFLAGS EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CCAS RANLIB ac_ct_RANLIB STAGE1_CFLAGS STAGE2_CFLAGS GRUB_CFLAGS OBJCOPY ac_ct_OBJCOPY GRUB_LIBS CPP EGREP NETBOOT_SUPPORT_TRUE NETBOOT_SUPPORT_FALSE DISKLESS_SUPPORT_TRUE DISKLESS_SUPPORT_FALSE GRAPHICS_SUPPORT_TRUE GRAPHICS_SUPPORT_FALSE HERCULES_SUPPORT_TRUE HERCULES_SUPPORT_FALSE SERIAL_SUPPORT_TRUE SERIAL_SUPPORT_FALSE SERIAL_SPEED_SIMULATION_TRUE SERIAL_SPEED_SIMULATION_FALSE BUILD_EXAMPLE_KERNEL_TRUE BUILD_EXAMPLE_KERNEL_FALSE FSYS_CFLAGS NET_CFLAGS NET_EXTRAFLAGS NETBOOT_DRIVERS CCASFLAGS LIBOBJS LTLIBOBJS' + ac_subst_files='' + + # Initialize some variables set by options. +@@ -914,6 +914,7 @@ Optional Features: + set the default memory location for WD/SMC + --enable-cs-scan=LIST probe for CS89x0 base address using LIST + --enable-diskless enable diskless support ++ --disable-graphics disable graphics terminal support + --disable-hercules disable hercules terminal support + --disable-serial disable serial terminal support + --enable-serial-speed-simulation +@@ -1032,7 +1033,7 @@ esac + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi +- cd $ac_popdir ++ cd "$ac_popdir" + done + fi + +@@ -2631,8 +2632,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2690,8 +2690,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2807,8 +2806,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2862,8 +2860,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2908,8 +2905,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -2953,8 +2949,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3458,8 +3453,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3523,8 +3517,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3595,8 +3588,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -3656,8 +3648,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4095,8 +4086,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4161,8 +4151,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4234,8 +4223,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4300,8 +4288,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4366,8 +4353,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4440,8 +4426,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4506,8 +4491,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4597,8 +4581,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4673,8 +4656,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -4745,8 +4727,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_l + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -5070,8 +5051,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -5241,8 +5221,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -5313,8 +5292,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && +- { ac_try='test -z "$ac_c_werror_flag" +- || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? +@@ -5966,6 +5944,22 @@ else + fi + + ++# Check whether --enable-graphics or --disable-graphics was given. ++if test "${enable_graphics+set}" = set; then ++ enableval="$enable_graphics" ++ ++fi; ++ ++ ++if test "x$enable_graphics" != xno; then ++ GRAPHICS_SUPPORT_TRUE= ++ GRAPHICS_SUPPORT_FALSE='#' ++else ++ GRAPHICS_SUPPORT_TRUE='#' ++ GRAPHICS_SUPPORT_FALSE= ++fi ++ ++ + # Check whether --enable-hercules or --disable-hercules was given. + if test "${enable_hercules+set}" = set; then + enableval="$enable_hercules" +@@ -6270,6 +6264,13 @@ echo "$as_me: error: conditional \"DISKL + Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } + fi ++if test -z "${GRAPHICS_SUPPORT_TRUE}" && test -z "${GRAPHICS_SUPPORT_FALSE}"; then ++ { { echo "$as_me:$LINENO: error: conditional \"GRAPHICS_SUPPORT\" was never defined. ++Usually this means the macro was only invoked conditionally." >&5 ++echo "$as_me: error: conditional \"GRAPHICS_SUPPORT\" was never defined. ++Usually this means the macro was only invoked conditionally." >&2;} ++ { (exit 1); exit 1; }; } ++fi + if test -z "${HERCULES_SUPPORT_TRUE}" && test -z "${HERCULES_SUPPORT_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HERCULES_SUPPORT\" was never defined. + Usually this means the macro was only invoked conditionally." >&5 +@@ -6907,6 +6908,8 @@ s,@NETBOOT_SUPPORT_TRUE@,$NETBOOT_SUPPOR + s,@NETBOOT_SUPPORT_FALSE@,$NETBOOT_SUPPORT_FALSE,;t t + s,@DISKLESS_SUPPORT_TRUE@,$DISKLESS_SUPPORT_TRUE,;t t + s,@DISKLESS_SUPPORT_FALSE@,$DISKLESS_SUPPORT_FALSE,;t t ++s,@GRAPHICS_SUPPORT_TRUE@,$GRAPHICS_SUPPORT_TRUE,;t t ++s,@GRAPHICS_SUPPORT_FALSE@,$GRAPHICS_SUPPORT_FALSE,;t t + s,@HERCULES_SUPPORT_TRUE@,$HERCULES_SUPPORT_TRUE,;t t + s,@HERCULES_SUPPORT_FALSE@,$HERCULES_SUPPORT_FALSE,;t t + s,@SERIAL_SUPPORT_TRUE@,$SERIAL_SUPPORT_TRUE,;t t +@@ -7088,11 +7091,6 @@ esac + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + +- if test x"$ac_file" != x-; then +- { echo "$as_me:$LINENO: creating $ac_file" >&5 +-echo "$as_me: creating $ac_file" >&6;} +- rm -f "$ac_file" +- fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ +@@ -7131,6 +7129,12 @@ echo "$as_me: error: cannot find input f + fi;; + esac + done` || { (exit 1); exit 1; } ++ ++ if test x"$ac_file" != x-; then ++ { echo "$as_me:$LINENO: creating $ac_file" >&5 ++echo "$as_me: creating $ac_file" >&6;} ++ rm -f "$ac_file" ++ fi + _ACEOF + cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +diff -rup grub-0.97.oorig/docs/Makefile.in grub-0.97/docs/Makefile.in +--- grub-0.97.oorig/docs/Makefile.in 2005-05-08 04:42:34.000000000 +0200 ++++ grub-0.97/docs/Makefile.in 2006-03-12 14:00:43.000000000 +0100 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.9.4 from Makefile.am. ++# Makefile.in generated by automake 1.9.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004 Free Software Foundation, Inc. ++# 2003, 2004, 2005 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -15,8 +15,6 @@ + @SET_MAKE@ + + +-SOURCES = $(kernel_SOURCES) +- + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +@@ -120,6 +118,8 @@ ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ + FSYS_CFLAGS = @FSYS_CFLAGS@ ++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ ++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ + GRUB_CFLAGS = @GRUB_CFLAGS@ + GRUB_LIBS = @GRUB_LIBS@ + HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ +@@ -304,9 +304,11 @@ kernel-kernel.obj: kernel.c + restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && cd $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ +- for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ +- if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ +- done; \ ++ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ ++ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ ++ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ ++ done; \ ++ else :; fi && \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ +@@ -371,10 +373,11 @@ multiboot.dvi: multiboot.texi $(multiboo + multiboot.pdf: multiboot.texi $(multiboot_TEXINFOS) + multiboot.html: multiboot.texi $(multiboot_TEXINFOS) + .dvi.ps: ++ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ + $(DVIPS) -o $@ $< + + uninstall-info-am: +- $(PRE_UNINSTALL) ++ @$(PRE_UNINSTALL) + @if (install-info --version && \ + install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ + list='$(INFO_DEPS)'; \ +@@ -390,7 +393,7 @@ uninstall-info-am: + relfile=`echo "$$file" | sed 's|^.*/||'`; \ + relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ + (if cd "$(DESTDIR)$(infodir)"; then \ +- echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \ ++ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ + rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ + else :; fi); \ + done +@@ -403,10 +406,13 @@ dist-info: $(INFO_DEPS) + $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ + if test -f $$base; then d=.; else d=$(srcdir); fi; \ +- for file in $$d/$$base*; do \ +- relfile=`expr "$$file" : "$$d/\(.*\)"`; \ +- test -f $(distdir)/$$relfile || \ +- cp -p $$file $(distdir)/$$relfile; \ ++ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ ++ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ ++ if test -f $$file; then \ ++ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ ++ test -f $(distdir)/$$relfile || \ ++ cp -p $$file $(distdir)/$$relfile; \ ++ else :; fi; \ + done; \ + done + +diff -rup grub-0.97.oorig/grub/Makefile.in grub-0.97/grub/Makefile.in +--- grub-0.97.oorig/grub/Makefile.in 2005-05-08 04:42:34.000000000 +0200 ++++ grub-0.97/grub/Makefile.in 2006-03-12 14:00:43.000000000 +0100 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.9.4 from Makefile.am. ++# Makefile.in generated by automake 1.9.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004 Free Software Foundation, Inc. ++# 2003, 2004, 2005 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -14,8 +14,6 @@ + + @SET_MAKE@ + +-SOURCES = $(grub_SOURCES) +- + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +@@ -97,6 +95,8 @@ ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ + FSYS_CFLAGS = @FSYS_CFLAGS@ ++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ ++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ + GRUB_CFLAGS = @GRUB_CFLAGS@ + GRUB_LIBS = @GRUB_LIBS@ + HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ +diff -rup grub-0.97.oorig/lib/Makefile.in grub-0.97/lib/Makefile.in +--- grub-0.97.oorig/lib/Makefile.in 2005-05-08 04:42:35.000000000 +0200 ++++ grub-0.97/lib/Makefile.in 2006-03-12 14:00:44.000000000 +0100 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.9.4 from Makefile.am. ++# Makefile.in generated by automake 1.9.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004 Free Software Foundation, Inc. ++# 2003, 2004, 2005 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -14,8 +14,6 @@ + + @SET_MAKE@ + +-SOURCES = $(libcommon_a_SOURCES) +- + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +@@ -96,6 +94,8 @@ ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ + FSYS_CFLAGS = @FSYS_CFLAGS@ ++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ ++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ + GRUB_CFLAGS = @GRUB_CFLAGS@ + GRUB_LIBS = @GRUB_LIBS@ + HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ +diff -rup grub-0.97.oorig/Makefile.in grub-0.97/Makefile.in +--- grub-0.97.oorig/Makefile.in 2005-05-08 04:42:40.000000000 +0200 ++++ grub-0.97/Makefile.in 2006-03-12 14:00:49.000000000 +0100 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.9.4 from Makefile.am. ++# Makefile.in generated by automake 1.9.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004 Free Software Foundation, Inc. ++# 2003, 2004, 2005 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -101,6 +101,8 @@ ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ + FSYS_CFLAGS = @FSYS_CFLAGS@ ++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ ++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ + GRUB_CFLAGS = @GRUB_CFLAGS@ + GRUB_LIBS = @GRUB_LIBS@ + HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ +@@ -250,7 +252,13 @@ uninstall-info-am: + # (which will cause the Makefiles to be regenerated when you run `make'); + # (2) otherwise, pass the desired values on the `make' command line. + $(RECURSIVE_TARGETS): +- @set fnord $$MAKEFLAGS; amf=$$2; \ ++ @failcom='exit 1'; \ ++ for f in x $$MAKEFLAGS; do \ ++ case $$f in \ ++ *=* | --[!k]*);; \ ++ *k*) failcom='fail=yes';; \ ++ esac; \ ++ done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ +@@ -262,7 +270,7 @@ $(RECURSIVE_TARGETS): + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ +- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ++ || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ +@@ -270,7 +278,13 @@ $(RECURSIVE_TARGETS): + + mostlyclean-recursive clean-recursive distclean-recursive \ + maintainer-clean-recursive: +- @set fnord $$MAKEFLAGS; amf=$$2; \ ++ @failcom='exit 1'; \ ++ for f in x $$MAKEFLAGS; do \ ++ case $$f in \ ++ *=* | --[!k]*);; \ ++ *k*) failcom='fail=yes';; \ ++ esac; \ ++ done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ +@@ -291,7 +305,7 @@ maintainer-clean-recursive: + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ +- || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ ++ || eval $$failcom; \ + done && test -z "$$fail" + tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ +diff -rup grub-0.97.oorig/netboot/Makefile.in grub-0.97/netboot/Makefile.in +--- grub-0.97.oorig/netboot/Makefile.in 2005-05-08 04:42:35.000000000 +0200 ++++ grub-0.97/netboot/Makefile.in 2006-03-12 14:00:44.000000000 +0100 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.9.4 from Makefile.am. ++# Makefile.in generated by automake 1.9.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004 Free Software Foundation, Inc. ++# 2003, 2004, 2005 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -14,8 +14,6 @@ + + @SET_MAKE@ + +-SOURCES = $(libdrivers_a_SOURCES) $(EXTRA_libdrivers_a_SOURCES) +- + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +@@ -97,6 +95,8 @@ ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ + FSYS_CFLAGS = @FSYS_CFLAGS@ ++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ ++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ + GRUB_CFLAGS = @GRUB_CFLAGS@ + GRUB_LIBS = @GRUB_LIBS@ + HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ +diff -rup grub-0.97.oorig/stage1/Makefile.in grub-0.97/stage1/Makefile.in +--- grub-0.97.oorig/stage1/Makefile.in 2005-05-08 04:42:36.000000000 +0200 ++++ grub-0.97/stage1/Makefile.in 2006-03-12 14:00:45.000000000 +0100 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.9.4 from Makefile.am. ++# Makefile.in generated by automake 1.9.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004 Free Software Foundation, Inc. ++# 2003, 2004, 2005 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -15,8 +15,6 @@ + @SET_MAKE@ + + +-SOURCES = $(stage1_exec_SOURCES) +- + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +@@ -102,6 +100,8 @@ ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ + FSYS_CFLAGS = @FSYS_CFLAGS@ ++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ ++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ + GRUB_CFLAGS = @GRUB_CFLAGS@ + GRUB_LIBS = @GRUB_LIBS@ + HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ +diff -rup grub-0.97.oorig/stage2/Makefile.in grub-0.97/stage2/Makefile.in +--- grub-0.97.oorig/stage2/Makefile.in 2005-05-08 04:42:39.000000000 +0200 ++++ grub-0.97/stage2/Makefile.in 2006-03-12 14:00:48.000000000 +0100 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.9.4 from Makefile.am. ++# Makefile.in generated by automake 1.9.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004 Free Software Foundation, Inc. ++# 2003, 2004, 2005 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -18,8 +18,6 @@ + + + +-SOURCES = $(libgrub_a_SOURCES) $(diskless_exec_SOURCES) $(e2fs_stage1_5_exec_SOURCES) $(fat_stage1_5_exec_SOURCES) $(ffs_stage1_5_exec_SOURCES) $(iso9660_stage1_5_exec_SOURCES) $(jfs_stage1_5_exec_SOURCES) $(minix_stage1_5_exec_SOURCES) $(nbloader_exec_SOURCES) $(pre_stage2_exec_SOURCES) $(pxeloader_exec_SOURCES) $(reiserfs_stage1_5_exec_SOURCES) $(start_exec_SOURCES) $(start_eltorito_exec_SOURCES) $(ufs2_stage1_5_exec_SOURCES) $(vstafs_stage1_5_exec_SOURCES) $(xfs_stage1_5_exec_SOURCES) +- + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +@@ -100,7 +98,7 @@ am_libgrub_a_OBJECTS = libgrub_a-boot.$( + libgrub_a-fsys_xfs.$(OBJEXT) libgrub_a-gunzip.$(OBJEXT) \ + libgrub_a-md5.$(OBJEXT) libgrub_a-serial.$(OBJEXT) \ + libgrub_a-stage2.$(OBJEXT) libgrub_a-terminfo.$(OBJEXT) \ +- libgrub_a-tparm.$(OBJEXT) ++ libgrub_a-tparm.$(OBJEXT) libgrub_a-graphics.$(OBJEXT) + libgrub_a_OBJECTS = $(am_libgrub_a_OBJECTS) + PROGRAMS = $(noinst_PROGRAMS) + am__objects_1 = diskless_exec-asm.$(OBJEXT) \ +@@ -125,7 +123,8 @@ am__objects_1 = diskless_exec-asm.$(OBJE + diskless_exec-serial.$(OBJEXT) \ + diskless_exec-smp-imps.$(OBJEXT) \ + diskless_exec-stage2.$(OBJEXT) \ +- diskless_exec-terminfo.$(OBJEXT) diskless_exec-tparm.$(OBJEXT) ++ diskless_exec-terminfo.$(OBJEXT) diskless_exec-tparm.$(OBJEXT) \ ++ diskless_exec-graphics.$(OBJEXT) + am_diskless_exec_OBJECTS = $(am__objects_1) + diskless_exec_OBJECTS = $(am_diskless_exec_OBJECTS) + diskless_exec_DEPENDENCIES = ../netboot/libdrivers.a +@@ -217,7 +216,8 @@ am_pre_stage2_exec_OBJECTS = pre_stage2_ + pre_stage2_exec-smp-imps.$(OBJEXT) \ + pre_stage2_exec-stage2.$(OBJEXT) \ + pre_stage2_exec-terminfo.$(OBJEXT) \ +- pre_stage2_exec-tparm.$(OBJEXT) ++ pre_stage2_exec-tparm.$(OBJEXT) \ ++ pre_stage2_exec-graphics.$(OBJEXT) + pre_stage2_exec_OBJECTS = $(am_pre_stage2_exec_OBJECTS) + @NETBOOT_SUPPORT_TRUE@pre_stage2_exec_DEPENDENCIES = \ + @NETBOOT_SUPPORT_TRUE@ ../netboot/libdrivers.a +@@ -344,6 +344,8 @@ ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ + FSYS_CFLAGS = @FSYS_CFLAGS@ ++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ ++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ + GRUB_CFLAGS = @GRUB_CFLAGS@ + GRUB_LIBS = @GRUB_LIBS@ + HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ +@@ -435,7 +437,7 @@ noinst_HEADERS = apic.h defs.h dir.h dis + fat.h filesys.h freebsd.h fs.h hercules.h i386-elf.h \ + imgact_aout.h iso9660.h jfs.h mb_header.h mb_info.h md5.h \ + nbi.h pc_slice.h serial.h shared.h smp-imps.h term.h \ +- terminfo.h tparm.h nbi.h ufs2.h vstafs.h xfs.h ++ terminfo.h tparm.h nbi.h ufs2.h vstafs.h xfs.h graphics.h + + EXTRA_DIST = setjmp.S apm.S $(noinst_SCRIPTS) + +@@ -448,7 +450,7 @@ libgrub_a_SOURCES = boot.c builtins.c ch + disk_io.c fsys_ext2fs.c fsys_fat.c fsys_ffs.c fsys_iso9660.c \ + fsys_jfs.c fsys_minix.c fsys_reiserfs.c fsys_ufs2.c \ + fsys_vstafs.c fsys_xfs.c gunzip.c md5.c serial.c stage2.c \ +- terminfo.c tparm.c ++ terminfo.c tparm.c graphics.c + + libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \ + -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \ +@@ -479,8 +481,10 @@ START_ELTORITO_LINK = -nostdlib -Wl,-N - + @SERIAL_SUPPORT_TRUE@SERIAL_FLAGS = -DSUPPORT_SERIAL=1 + @HERCULES_SUPPORT_FALSE@HERCULES_FLAGS = + @HERCULES_SUPPORT_TRUE@HERCULES_FLAGS = -DSUPPORT_HERCULES=1 ++@GRAPHICS_SUPPORT_FALSE@GRAPHICS_FLAGS = ++@GRAPHICS_SUPPORT_TRUE@GRAPHICS_FLAGS = -DSUPPORT_GRAPHICS=1 + STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS) ++ $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS) $(GRAPHICS_FLAGS) + + STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000 + STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1 +@@ -490,7 +494,8 @@ pre_stage2_exec_SOURCES = asm.S bios.c b + cmdline.c common.c console.c disk_io.c fsys_ext2fs.c \ + fsys_fat.c fsys_ffs.c fsys_iso9660.c fsys_jfs.c fsys_minix.c \ + fsys_reiserfs.c fsys_ufs2.c fsys_vstafs.c fsys_xfs.c gunzip.c \ +- hercules.c md5.c serial.c smp-imps.c stage2.c terminfo.c tparm.c ++ hercules.c md5.c serial.c smp-imps.c stage2.c terminfo.c tparm.c \ ++ graphics.c + + pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) + pre_stage2_exec_CCASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) +@@ -766,6 +771,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-fsys_ufs2.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-fsys_vstafs.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-fsys_xfs.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-graphics.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-gunzip.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-hercules.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diskless_exec-md5.Po@am__quote@ +@@ -820,6 +826,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-fsys_ufs2.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-fsys_vstafs.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-fsys_xfs.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-graphics.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-gunzip.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-md5.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libgrub_a-serial.Po@am__quote@ +@@ -850,6 +857,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-fsys_ufs2.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-fsys_vstafs.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-fsys_xfs.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-graphics.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-gunzip.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-hercules.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pre_stage2_exec-md5.Po@am__quote@ +@@ -1367,6 +1375,20 @@ libgrub_a-tparm.obj: tparm.c + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -c -o libgrub_a-tparm.obj `if test -f 'tparm.c'; then $(CYGPATH_W) 'tparm.c'; else $(CYGPATH_W) '$(srcdir)/tparm.c'; fi` + ++libgrub_a-graphics.o: graphics.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -MT libgrub_a-graphics.o -MD -MP -MF "$(DEPDIR)/libgrub_a-graphics.Tpo" -c -o libgrub_a-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgrub_a-graphics.Tpo" "$(DEPDIR)/libgrub_a-graphics.Po"; else rm -f "$(DEPDIR)/libgrub_a-graphics.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='libgrub_a-graphics.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -c -o libgrub_a-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c ++ ++libgrub_a-graphics.obj: graphics.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -MT libgrub_a-graphics.obj -MD -MP -MF "$(DEPDIR)/libgrub_a-graphics.Tpo" -c -o libgrub_a-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libgrub_a-graphics.Tpo" "$(DEPDIR)/libgrub_a-graphics.Po"; else rm -f "$(DEPDIR)/libgrub_a-graphics.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='libgrub_a-graphics.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgrub_a_CFLAGS) $(CFLAGS) -c -o libgrub_a-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi` ++ + diskless_exec-bios.o: bios.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -MT diskless_exec-bios.o -MD -MP -MF "$(DEPDIR)/diskless_exec-bios.Tpo" -c -o diskless_exec-bios.o `test -f 'bios.c' || echo '$(srcdir)/'`bios.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/diskless_exec-bios.Tpo" "$(DEPDIR)/diskless_exec-bios.Po"; else rm -f "$(DEPDIR)/diskless_exec-bios.Tpo"; exit 1; fi +@@ -1731,6 +1753,20 @@ diskless_exec-tparm.obj: tparm.c + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -c -o diskless_exec-tparm.obj `if test -f 'tparm.c'; then $(CYGPATH_W) 'tparm.c'; else $(CYGPATH_W) '$(srcdir)/tparm.c'; fi` + ++diskless_exec-graphics.o: graphics.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -MT diskless_exec-graphics.o -MD -MP -MF "$(DEPDIR)/diskless_exec-graphics.Tpo" -c -o diskless_exec-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/diskless_exec-graphics.Tpo" "$(DEPDIR)/diskless_exec-graphics.Po"; else rm -f "$(DEPDIR)/diskless_exec-graphics.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='diskless_exec-graphics.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -c -o diskless_exec-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c ++ ++diskless_exec-graphics.obj: graphics.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -MT diskless_exec-graphics.obj -MD -MP -MF "$(DEPDIR)/diskless_exec-graphics.Tpo" -c -o diskless_exec-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/diskless_exec-graphics.Tpo" "$(DEPDIR)/diskless_exec-graphics.Po"; else rm -f "$(DEPDIR)/diskless_exec-graphics.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='diskless_exec-graphics.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -c -o diskless_exec-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi` ++ + e2fs_stage1_5_exec-common.o: common.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(e2fs_stage1_5_exec_CFLAGS) $(CFLAGS) -MT e2fs_stage1_5_exec-common.o -MD -MP -MF "$(DEPDIR)/e2fs_stage1_5_exec-common.Tpo" -c -o e2fs_stage1_5_exec-common.o `test -f 'common.c' || echo '$(srcdir)/'`common.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/e2fs_stage1_5_exec-common.Tpo" "$(DEPDIR)/e2fs_stage1_5_exec-common.Po"; else rm -f "$(DEPDIR)/e2fs_stage1_5_exec-common.Tpo"; exit 1; fi +@@ -2599,6 +2635,20 @@ pre_stage2_exec-tparm.obj: tparm.c + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -c -o pre_stage2_exec-tparm.obj `if test -f 'tparm.c'; then $(CYGPATH_W) 'tparm.c'; else $(CYGPATH_W) '$(srcdir)/tparm.c'; fi` + ++pre_stage2_exec-graphics.o: graphics.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -MT pre_stage2_exec-graphics.o -MD -MP -MF "$(DEPDIR)/pre_stage2_exec-graphics.Tpo" -c -o pre_stage2_exec-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/pre_stage2_exec-graphics.Tpo" "$(DEPDIR)/pre_stage2_exec-graphics.Po"; else rm -f "$(DEPDIR)/pre_stage2_exec-graphics.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='pre_stage2_exec-graphics.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -c -o pre_stage2_exec-graphics.o `test -f 'graphics.c' || echo '$(srcdir)/'`graphics.c ++ ++pre_stage2_exec-graphics.obj: graphics.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -MT pre_stage2_exec-graphics.obj -MD -MP -MF "$(DEPDIR)/pre_stage2_exec-graphics.Tpo" -c -o pre_stage2_exec-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/pre_stage2_exec-graphics.Tpo" "$(DEPDIR)/pre_stage2_exec-graphics.Po"; else rm -f "$(DEPDIR)/pre_stage2_exec-graphics.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='graphics.c' object='pre_stage2_exec-graphics.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -c -o pre_stage2_exec-graphics.obj `if test -f 'graphics.c'; then $(CYGPATH_W) 'graphics.c'; else $(CYGPATH_W) '$(srcdir)/graphics.c'; fi` ++ + reiserfs_stage1_5_exec-common.o: common.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(reiserfs_stage1_5_exec_CFLAGS) $(CFLAGS) -MT reiserfs_stage1_5_exec-common.o -MD -MP -MF "$(DEPDIR)/reiserfs_stage1_5_exec-common.Tpo" -c -o reiserfs_stage1_5_exec-common.o `test -f 'common.c' || echo '$(srcdir)/'`common.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/reiserfs_stage1_5_exec-common.Tpo" "$(DEPDIR)/reiserfs_stage1_5_exec-common.Po"; else rm -f "$(DEPDIR)/reiserfs_stage1_5_exec-common.Tpo"; exit 1; fi +diff -rup grub-0.97.oorig/util/Makefile.in grub-0.97/util/Makefile.in +--- grub-0.97.oorig/util/Makefile.in 2005-05-08 04:42:39.000000000 +0200 ++++ grub-0.97/util/Makefile.in 2006-03-12 14:00:48.000000000 +0100 +@@ -1,8 +1,8 @@ +-# Makefile.in generated by automake 1.9.4 from Makefile.am. ++# Makefile.in generated by automake 1.9.6 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +-# 2003, 2004 Free Software Foundation, Inc. ++# 2003, 2004, 2005 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation + # gives unlimited permission to copy and/or distribute it, + # with or without modifications, as long as this notice is preserved. +@@ -15,8 +15,6 @@ + @SET_MAKE@ + + +-SOURCES = $(mbchk_SOURCES) +- + srcdir = @srcdir@ + top_srcdir = @top_srcdir@ + VPATH = @srcdir@ +@@ -102,6 +100,8 @@ ECHO_T = @ECHO_T@ + EGREP = @EGREP@ + EXEEXT = @EXEEXT@ + FSYS_CFLAGS = @FSYS_CFLAGS@ ++GRAPHICS_SUPPORT_FALSE = @GRAPHICS_SUPPORT_FALSE@ ++GRAPHICS_SUPPORT_TRUE = @GRAPHICS_SUPPORT_TRUE@ + GRUB_CFLAGS = @GRUB_CFLAGS@ + GRUB_LIBS = @GRUB_LIBS@ + HERCULES_SUPPORT_FALSE = @HERCULES_SUPPORT_FALSE@ diff --git a/boot/grub/grub.200-fix_mbr_handling.patch b/boot/grub/grub.200-fix_mbr_handling.patch new file mode 100644 index 0000000000..21e200f172 --- /dev/null +++ b/boot/grub/grub.200-fix_mbr_handling.patch @@ -0,0 +1,13 @@ +Index: b/stage2/disk_io.c +=================================================================== +--- a/stage2/disk_io.c ++++ b/stage2/disk_io.c +@@ -365,7 +365,7 @@ + int + devwrite (unsigned int sector, int sector_count, char *buf) + { +-#if defined(GRUB_UTIL) && defined(__linux__) ++#if defined(GRUB_UTIL) && defined(__linux__) && !defined(SUPPORT_LOOPDEV) + if (current_partition != 0xFFFFFF + && is_disk_device (device_map, current_drive)) + { diff --git a/boot/grub/grub.300-honor_UCLIBC_HAS_LFS.patch b/boot/grub/grub.300-honor_UCLIBC_HAS_LFS.patch new file mode 100644 index 0000000000..8ed9d76c36 --- /dev/null +++ b/boot/grub/grub.300-honor_UCLIBC_HAS_LFS.patch @@ -0,0 +1,36 @@ +Index: b/grub/asmstub.c +=================================================================== +--- a/grub/asmstub.c ++++ b/grub/asmstub.c +@@ -18,10 +18,13 @@ + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + ++#include ++#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__) + /* Try to use glibc's transparant LFS support. */ + #define _LARGEFILE_SOURCE 1 + /* lseek becomes synonymous with lseek64. */ + #define _FILE_OFFSET_BITS 64 ++#endif + + /* Simulator entry point. */ + int grub_stage2 (void); +Index: b/lib/device.c +=================================================================== +--- a/lib/device.c ++++ b/lib/device.c +@@ -18,10 +18,13 @@ + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + ++#include ++#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_LFS__) + /* Try to use glibc's transparant LFS support. */ + #define _LARGEFILE_SOURCE 1 + /* lseek becomes synonymous with lseek64. */ + #define _FILE_OFFSET_BITS 64 ++#endif + + #include + #include diff --git a/boot/grub/grub.400-nic_update2.patch b/boot/grub/grub.400-nic_update2.patch new file mode 100644 index 0000000000..5e3c16d46c --- /dev/null +++ b/boot/grub/grub.400-nic_update2.patch @@ -0,0 +1,47064 @@ +Submitted By: Jim Gifford (patches at jg555 dot com) +Date: 2005-08-31 +Initial Package Version: 0.97 +Origin: OpenSolaris, Joe Ciccone, Jim Gifford +Upstream Status: N/A +Description: Adds support for Forcedeth and other NIC's + Fixes for GCC 4.x + Removal of bad network drivers + +Index: b/configure +=================================================================== +--- a/configure ++++ b/configure +@@ -872,47 +872,32 @@ + --disable-packet-retransmission + turn off packet retransmission + --enable-pci-direct access PCI directly instead of using BIOS +- --enable-3c509 enable 3Com509 driver +- --enable-3c529 enable 3Com529 driver + --enable-3c595 enable 3Com595 driver + --enable-3c90x enable 3Com90x driver +- --enable-cs89x0 enable CS89x0 driver + --enable-davicom enable Davicom driver +- --enable-depca enable DEPCA and EtherWORKS driver +- --enable-eepro enable Etherexpress Pro/10 driver ++ --enable-e1000 enable Etherexpress Pro/1000 driver + --enable-eepro100 enable Etherexpress Pro/100 driver + --enable-epic100 enable SMC 83c170 EPIC/100 driver +- --enable-3c507 enable 3Com507 driver +- --enable-exos205 enable EXOS205 driver +- --enable-ni5210 enable Racal-Interlan NI5210 driver +- --enable-lance enable Lance PCI PCNet/32 driver +- --enable-ne2100 enable Novell NE2100 driver +- --enable-ni6510 enable Racal-Interlan NI6510 driver ++ --enable-forcedeth enable Nvidia Geforce driver + --enable-natsemi enable NatSemi DP8381x driver +- --enable-ni5010 enable Racal-Interlan NI5010 driver +- --enable-3c503 enable 3Com503 driver +- --enable-ne enable NE1000/2000 ISA driver ++ --enable-ns83820 enable NS83820 driver + --enable-ns8390 enable NE2000 PCI driver +- --enable-wd enable WD8003/8013, SMC8216/8416 driver +- --enable-otulip enable old Tulip driver ++ --enable-pcnet32 enable AMD Lance/PCI PCNet/32 driver ++ --enable-pnic enable Bochs Pseudo Nic driver + --enable-rtl8139 enable Realtek 8139 driver ++ --enable-r8169 enable Realtek 8169 driver + --enable-sis900 enable SIS 900 and SIS 7016 driver +- --enable-sk-g16 enable Schneider and Koch G16 driver +- --enable-smc9000 enable SMC9000 driver +- --enable-tiara enable Tiara driver ++ --enable-tg3 enable Broadcom Tigon3 driver + --enable-tulip enable Tulip driver ++ --enable-tlan enable TI ThunderLAN driver ++ --enable-undi enable PXE UNDI driver + --enable-via-rhine enable Rhine-I/II driver +- --enable-w89c840 enable Winbond W89c840, Compex RL100-ATX driver +- --enable-3c503-shmem use 3c503 shared memory mode +- --enable-3c503-aui use AUI by default on 3c503 cards ++ --enable-w89c840 enable Winbond W89c840 driver + --enable-compex-rl2000-fix + specify this if you have a Compex RL2000 PCI +- --enable-smc9000-scan=LIST +- probe for SMC9000 I/O addresses using LIST + --enable-ne-scan=LIST probe for NE base address using LIST + --enable-wd-default-mem=MEM + set the default memory location for WD/SMC +- --enable-cs-scan=LIST probe for CS89x0 base address using LIST + --enable-diskless enable diskless support + --disable-graphics disable graphics terminal support + --disable-hercules disable hercules terminal support +@@ -5537,7 +5522,7 @@ + + fi; + if test "x$enable_packet_retransmission" != xno; then +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1" ++ NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1 -DCONFIG_PCI" + fi + + # Check whether --enable-pci-direct or --disable-pci-direct was given. +@@ -5549,26 +5534,6 @@ + NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONFIG_PCI_DIRECT=1" + fi + +-# Check whether --enable-3c509 or --disable-3c509 was given. +-if test "${enable_3c509+set}" = set; then +- enableval="$enable_3c509" +- +-fi; +-if test "x$enable_3c509" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C509" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c509.o" +-fi +- +-# Check whether --enable-3c529 or --disable-3c529 was given. +-if test "${enable_3c529+set}" = set; then +- enableval="$enable_3c529" +- +-fi; +-if test "x$enable_3c529" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C529=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c529.o" +-fi +- + # Check whether --enable-3c595 or --disable-3c595 was given. + if test "${enable_3c595+set}" = set; then + enableval="$enable_3c595" +@@ -5589,16 +5554,6 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c90x.o" + fi + +-# Check whether --enable-cs89x0 or --disable-cs89x0 was given. +-if test "${enable_cs89x0+set}" = set; then +- enableval="$enable_cs89x0" +- +-fi; +-if test "x$enable_cs89x0" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_CS89X0=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS cs89x0.o" +-fi +- + # Check whether --enable-davicom or --disable-davicom was given. + if test "${enable_davicom+set}" = set; then + enableval="$enable_davicom" +@@ -5609,24 +5564,14 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS davicom.o" + fi + +-# Check whether --enable-depca or --disable-depca was given. +-if test "${enable_depca+set}" = set; then +- enableval="$enable_depca" ++# Check whether --enable-e1000 or --disable-e1000 was given. ++if test "${enable_e1000+set}" = set; then ++ enableval="$enable_e1000" + + fi; +-if test "x$enable_depca" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_DEPCA=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS depca.o" +-fi +- +-# Check whether --enable-eepro or --disable-eepro was given. +-if test "${enable_eepro+set}" = set; then +- enableval="$enable_eepro" +- +-fi; +-if test "x$enable_eepro" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EEPRO=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS eepro.o" ++if test "x$enable_e1000" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_E1000=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS e1000.o" + fi + + # Check whether --enable-eepro100 or --disable-eepro100 was given. +@@ -5649,64 +5594,14 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS epic100.o" + fi + +-# Check whether --enable-3c507 or --disable-3c507 was given. +-if test "${enable_3c507+set}" = set; then +- enableval="$enable_3c507" +- +-fi; +-if test "x$enable_3c507" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C507=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c507.o" +-fi +- +-# Check whether --enable-exos205 or --disable-exos205 was given. +-if test "${enable_exos205+set}" = set; then +- enableval="$enable_exos205" +- +-fi; +-if test "x$enable_exos205" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EXOS205=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS exos205.o" +-fi +- +-# Check whether --enable-ni5210 or --disable-ni5210 was given. +-if test "${enable_ni5210+set}" = set; then +- enableval="$enable_ni5210" +- +-fi; +-if test "x$enable_ni5210" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI5210=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni5210.o" +-fi +- +-# Check whether --enable-lance or --disable-lance was given. +-if test "${enable_lance+set}" = set; then +- enableval="$enable_lance" +- +-fi; +-if test "x$enable_lance" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_LANCE=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS lance.o" +-fi +- +-# Check whether --enable-ne2100 or --disable-ne2100 was given. +-if test "${enable_ne2100+set}" = set; then +- enableval="$enable_ne2100" +- +-fi; +-if test "x$enable_ne2100" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NE2100=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ne2100.o" +-fi +- +-# Check whether --enable-ni6510 or --disable-ni6510 was given. +-if test "${enable_ni6510+set}" = set; then +- enableval="$enable_ni6510" ++# Check whether --enable-forcedeth or --disable-forcedeth was given. ++if test "${enable_forcedeth+set}" = set; then ++ enableval="$enable_forcedeth" + + fi; +-if test "x$enable_ni6510" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI6510=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni6510.o" ++if test "x$enable_forcedeth" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_FORCEDETH=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS forcedeth.o" + fi + + # Check whether --enable-natsemi or --disable-natsemi was given. +@@ -5719,34 +5614,14 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS natsemi.o" + fi + +-# Check whether --enable-ni5010 or --disable-ni5010 was given. +-if test "${enable_ni5010+set}" = set; then +- enableval="$enable_ni5010" ++# Check whether --enable-ns83820 or --disable-ns83820 was given. ++if test "${enable_ns83820+set}" = set; then ++ enableval="$enable_ns83820" + + fi; +-if test "x$enable_ni5010" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI5010=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni5010.o" +-fi +- +-# Check whether --enable-3c503 or --disable-3c503 was given. +-if test "${enable_3c503+set}" = set; then +- enableval="$enable_3c503" +- +-fi; +-if test "x$enable_3c503" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C503=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c503.o" +-fi +- +-# Check whether --enable-ne or --disable-ne was given. +-if test "${enable_ne+set}" = set; then +- enableval="$enable_ne" +- +-fi; +-if test "x$enable_ne" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NE=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ne.o" ++if test "x$enable_ns83820" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NS83820=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns83820.o" + fi + + # Check whether --enable-ns8390 or --disable-ns8390 was given. +@@ -5759,24 +5634,24 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns8390.o" + fi + +-# Check whether --enable-wd or --disable-wd was given. +-if test "${enable_wd+set}" = set; then +- enableval="$enable_wd" ++# Check whether --enable-pcnet32 or --disable-pcnet32 was given. ++if test "${enable_pcnet32+set}" = set; then ++ enableval="$enable_pcnet32" + + fi; +-if test "x$enable_wd" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_WD=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS wd.o" ++if test "x$enable_pcnet32" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PCNET32=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS pcnet32.o" + fi + +-# Check whether --enable-otulip or --disable-otulip was given. +-if test "${enable_otulip+set}" = set; then +- enableval="$enable_otulip" ++# Check whether --enable-pnic or --disable-pnic was given. ++if test "${enable_pnic+set}" = set; then ++ enableval="$enable_pnic" + + fi; +-if test "x$enable_otulip" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_OTULIP=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS otulip.o" ++if test "x$enable_pnic" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PNIC=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS pnic.o" + fi + + # Check whether --enable-rtl8139 or --disable-rtl8139 was given. +@@ -5789,6 +5664,16 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS rtl8139.o" + fi + ++# Check whether --enable-r8169 or --disable-r8169 was given. ++if test "${enable_r8169+set}" = set; then ++ enableval="$enable_r8169" ++ ++fi; ++if test "x$enable_r8169" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_R8169=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS r8169.o" ++fi ++ + # Check whether --enable-sis900 or --disable-sis900 was given. + if test "${enable_sis900+set}" = set; then + enableval="$enable_sis900" +@@ -5799,34 +5684,14 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS sis900.o" + fi + +-# Check whether --enable-sk-g16 or --disable-sk-g16 was given. +-if test "${enable_sk_g16+set}" = set; then +- enableval="$enable_sk_g16" +- +-fi; +-if test "x$enable_sk_g16" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SK_G16=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS sk_g16.o" +-fi +- +-# Check whether --enable-smc9000 or --disable-smc9000 was given. +-if test "${enable_smc9000+set}" = set; then +- enableval="$enable_smc9000" +- +-fi; +-if test "x$enable_smc9000" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SMC9000=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS smc9000.o" +-fi +- +-# Check whether --enable-tiara or --disable-tiara was given. +-if test "${enable_tiara+set}" = set; then +- enableval="$enable_tiara" ++# Check whether --enable-tg3 or --disable-tg3 was given. ++if test "${enable_tg3+set}" = set; then ++ enableval="$enable_tg3" + + fi; +-if test "x$enable_tiara" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TIARA=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS tiara.o" ++if test "x$enable_tg3" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TG3=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS tg3.o" + fi + + # Check whether --enable-tulip or --disable-tulip was given. +@@ -5839,6 +5704,16 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS tulip.o" + fi + ++# Check whether --enable-tlan or --disable-tlan was given. ++if test "${enable_tlan+set}" = set; then ++ enableval="$enable_tlan" ++ ++fi; ++if test "x$enable_tlan" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TLAN=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS tlan.o" ++fi ++ + # Check whether --enable-via-rhine or --disable-via-rhine was given. + if test "${enable_via_rhine+set}" = set; then + enableval="$enable_via_rhine" +@@ -5873,24 +5748,6 @@ + FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_TFTP=1" + fi + +-# Check whether --enable-3c503-shmem or --disable-3c503-shmem was given. +-if test "${enable_3c503_shmem+set}" = set; then +- enableval="$enable_3c503_shmem" +- +-fi; +-if test "x$enable_3c503_shmem" = xyes; then +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DT503_SHMEM=1" +-fi +- +-# Check whether --enable-3c503-aui or --disable-3c503-aui was given. +-if test "${enable_3c503_aui+set}" = set; then +- enableval="$enable_3c503_aui" +- +-fi; +-if test "x$enable_3c503_aui" = xyes; then +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DT503_AUI=1" +-fi +- + # Check whether --enable-compex-rl2000-fix or --disable-compex-rl2000-fix was given. + if test "${enable_compex_rl2000_fix+set}" = set; then + enableval="$enable_compex_rl2000_fix" +@@ -5900,12 +5757,6 @@ + NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCOMPEX_RL2000_FIX=1" + fi + +-# Check whether --enable-smc9000-scan or --disable-smc9000-scan was given. +-if test "${enable_smc9000_scan+set}" = set; then +- enableval="$enable_smc9000_scan" +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DSMC9000_SCAN=$enable_smc9000_scan" +-fi; +- + # Check whether --enable-ne-scan or --disable-ne-scan was given. + if test "${enable_ne_scan+set}" = set; then + enableval="$enable_ne_scan" +@@ -5922,12 +5773,6 @@ + NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DWD_DEFAULT_MEM=0xCC000" + fi; + +-# Check whether --enable-cs-scan or --disable-cs-scan was given. +-if test "${enable_cs_scan+set}" = set; then +- enableval="$enable_cs_scan" +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCS_SCAN=$enable_cs_scan" +-fi; +- + # Check whether --enable-diskless or --disable-diskless was given. + if test "${enable_diskless+set}" = set; then + enableval="$enable_diskless" +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -344,7 +344,7 @@ + [ --disable-packet-retransmission + turn off packet retransmission]) + if test "x$enable_packet_retransmission" != xno; then +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1" ++ NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCONGESTED=1 -DCONFIG_PCI" + fi + + AC_ARG_ENABLE(pci-direct, +@@ -354,20 +354,6 @@ + fi + + dnl Device drivers. +-AC_ARG_ENABLE(3c509, +- [ --enable-3c509 enable 3Com509 driver]) +-if test "x$enable_3c509" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C509" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c509.o" +-fi +- +-AC_ARG_ENABLE(3c529, +- [ --enable-3c529 enable 3Com529 driver]) +-if test "x$enable_3c529" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C529=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c529.o" +-fi +- + AC_ARG_ENABLE(3c595, + [ --enable-3c595 enable 3Com595 driver]) + if test "x$enable_3c595" = xyes; then +@@ -382,13 +368,6 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c90x.o" + fi + +-AC_ARG_ENABLE(cs89x0, +- [ --enable-cs89x0 enable CS89x0 driver]) +-if test "x$enable_cs89x0" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_CS89X0=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS cs89x0.o" +-fi +- + AC_ARG_ENABLE(davicom, + [ --enable-davicom enable Davicom driver]) + if test "x$enable_davicom" = xyes; then +@@ -396,18 +375,11 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS davicom.o" + fi + +-AC_ARG_ENABLE(depca, +- [ --enable-depca enable DEPCA and EtherWORKS driver]) +-if test "x$enable_depca" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_DEPCA=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS depca.o" +-fi +- +-AC_ARG_ENABLE(eepro, +- [ --enable-eepro enable Etherexpress Pro/10 driver]) +-if test "x$enable_eepro" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EEPRO=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS eepro.o" ++AC_ARG_ENABLE(e1000, ++ [ --enable-e1000 enable Etherexpress Pro/1000 driver]) ++if test "x$enable_e1000" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_E1000=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS e1000.o" + fi + + AC_ARG_ENABLE(eepro100, +@@ -424,46 +396,11 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS epic100.o" + fi + +-AC_ARG_ENABLE(3c507, +- [ --enable-3c507 enable 3Com507 driver]) +-if test "x$enable_3c507" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C507=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c507.o" +-fi +- +-AC_ARG_ENABLE(exos205, +- [ --enable-exos205 enable EXOS205 driver]) +-if test "x$enable_exos205" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_EXOS205=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS exos205.o" +-fi +- +-AC_ARG_ENABLE(ni5210, +- [ --enable-ni5210 enable Racal-Interlan NI5210 driver]) +-if test "x$enable_ni5210" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI5210=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni5210.o" +-fi +- +-AC_ARG_ENABLE(lance, +- [ --enable-lance enable Lance PCI PCNet/32 driver]) +-if test "x$enable_lance" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_LANCE=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS lance.o" +-fi +- +-AC_ARG_ENABLE(ne2100, +- [ --enable-ne2100 enable Novell NE2100 driver]) +-if test "x$enable_ne2100" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NE2100=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ne2100.o" +-fi +- +-AC_ARG_ENABLE(ni6510, +- [ --enable-ni6510 enable Racal-Interlan NI6510 driver]) +-if test "x$enable_ni6510" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI6510=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni6510.o" ++AC_ARG_ENABLE(forcedeth, ++ [ --enable-forcedeth enable Nvidia Geforce driver]) ++if test "x$enable_forcedeth" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_FORCEDETH=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS forcedeth.o" + fi + + AC_ARG_ENABLE(natsemi, +@@ -473,25 +410,11 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS natsemi.o" + fi + +-AC_ARG_ENABLE(ni5010, +- [ --enable-ni5010 enable Racal-Interlan NI5010 driver]) +-if test "x$enable_ni5010" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NI5010=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ni5010.o" +-fi +- +-AC_ARG_ENABLE(3c503, +- [ --enable-3c503 enable 3Com503 driver]) +-if test "x$enable_3c503" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_3C503=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS 3c503.o" +-fi +- +-AC_ARG_ENABLE(ne, +- [ --enable-ne enable NE1000/2000 ISA driver]) +-if test "x$enable_ne" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NE=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS ne.o" ++AC_ARG_ENABLE(ns83820, ++ [ --enable-ns83820 enable NS83820 driver]) ++if test "x$enable_ns83820" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_NS83820=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns83820.o" + fi + + AC_ARG_ENABLE(ns8390, +@@ -501,18 +424,18 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS ns8390.o" + fi + +-AC_ARG_ENABLE(wd, +- [ --enable-wd enable WD8003/8013, SMC8216/8416 driver]) +-if test "x$enable_wd" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_WD=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS wd.o" ++AC_ARG_ENABLE(pcnet32, ++ [ --enable-pcnet32 enable AMD Lance/PCI PCNet/32 driver]) ++if test "x$enable_pcnet32" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PCNET32=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS pcnet32.o" + fi + +-AC_ARG_ENABLE(otulip, +- [ --enable-otulip enable old Tulip driver]) +-if test "x$enable_otulip" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_OTULIP=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS otulip.o" ++AC_ARG_ENABLE(pnic, ++ [ --enable-pnic enable Bochs Pseudo Nic driver]) ++if test "x$enable_pnic" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_PNIC=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS pnic.o" + fi + + AC_ARG_ENABLE(rtl8139, +@@ -522,6 +445,13 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS rtl8139.o" + fi + ++AC_ARG_ENABLE(r8169, ++ [ --enable-r8169 enable Realtek 8169 driver]) ++if test "x$enable_r8169" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_R8169=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS r8169.o" ++fi ++ + AC_ARG_ENABLE(sis900, + [ --enable-sis900 enable SIS 900 and SIS 7016 driver]) + if test "x$enable_sis900" = xyes; then +@@ -529,25 +459,11 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS sis900.o" + fi + +-AC_ARG_ENABLE(sk-g16, +- [ --enable-sk-g16 enable Schneider and Koch G16 driver]) +-if test "x$enable_sk_g16" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SK_G16=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS sk_g16.o" +-fi +- +-AC_ARG_ENABLE(smc9000, +- [ --enable-smc9000 enable SMC9000 driver]) +-if test "x$enable_smc9000" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_SMC9000=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS smc9000.o" +-fi +- +-AC_ARG_ENABLE(tiara, +- [ --enable-tiara enable Tiara driver]) +-if test "x$enable_tiara" = xyes; then +- NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TIARA=1" +- NETBOOT_DRIVERS="$NETBOOT_DRIVERS tiara.o" ++AC_ARG_ENABLE(tg3, ++ [ --enable-tg3 enable Broadcom Tigon3 driver]) ++if test "x$enable_tg3" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TG3=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS tg3.o" + fi + + AC_ARG_ENABLE(tulip, +@@ -557,6 +473,13 @@ + NETBOOT_DRIVERS="$NETBOOT_DRIVERS tulip.o" + fi + ++AC_ARG_ENABLE(tlan, ++ [ --enable-tlan enable TI ThunderLAN driver]) ++if test "x$enable_tlan" = xyes; then ++ NET_CFLAGS="$NET_CFLAGS -DINCLUDE_TLAN=1" ++ NETBOOT_DRIVERS="$NETBOOT_DRIVERS tlan.o" ++fi ++ + AC_ARG_ENABLE(via-rhine, + [ --enable-via-rhine enable Rhine-I/II driver]) + if test "x$enable_via_rhine" = xyes; then +@@ -565,7 +488,7 @@ + fi + + AC_ARG_ENABLE(w89c840, +- [ --enable-w89c840 enable Winbond W89c840, Compex RL100-ATX driver]) ++ [ --enable-w89c840 enable Winbond W89c840 driver]) + if test "x$enable_w89c840" = xyes; then + NET_CFLAGS="$NET_CFLAGS -DINCLUDE_W89C840=1" + NETBOOT_DRIVERS="$NETBOOT_DRIVERS w89c840.o" +@@ -577,19 +500,7 @@ + FSYS_CFLAGS="$FSYS_CFLAGS -DFSYS_TFTP=1" + fi + +-dnl Extra options. +-AC_ARG_ENABLE(3c503-shmem, +- [ --enable-3c503-shmem use 3c503 shared memory mode]) +-if test "x$enable_3c503_shmem" = xyes; then +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DT503_SHMEM=1" +-fi +- +-AC_ARG_ENABLE(3c503-aui, +- [ --enable-3c503-aui use AUI by default on 3c503 cards]) +-if test "x$enable_3c503_aui" = xyes; then +- NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DT503_AUI=1" +-fi +- ++dnl extra flag for ns8390.c + AC_ARG_ENABLE(compex-rl2000-fix, + [ --enable-compex-rl2000-fix + specify this if you have a Compex RL2000 PCI]) +@@ -597,11 +508,6 @@ + NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCOMPEX_RL2000_FIX=1" + fi + +-AC_ARG_ENABLE(smc9000-scan, +- [ --enable-smc9000-scan=LIST +- probe for SMC9000 I/O addresses using LIST], +- [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DSMC9000_SCAN=$enable_smc9000_scan"]) +- + AC_ARG_ENABLE(ne-scan, + [ --enable-ne-scan=LIST probe for NE base address using LIST], + [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DNE_SCAN=$enable_ne_scan"], +@@ -613,10 +519,6 @@ + [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DWD_DEFAULT_MEM=$enable_wd_default_mem"], + [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DWD_DEFAULT_MEM=0xCC000"]) + +-AC_ARG_ENABLE(cs-scan, +- [ --enable-cs-scan=LIST probe for CS89x0 base address using LIST], +- [NET_EXTRAFLAGS="$NET_EXTRAFLAGS -DCS_SCAN=$enable_cs_scan"]) +- + dnl Diskless + AC_ARG_ENABLE(diskless, + [ --enable-diskless enable diskless support]) +Index: b/netboot/3c509.h +=================================================================== +--- a/netboot/3c509.h ++++ /dev/null +@@ -1,397 +0,0 @@ +-/* +- * Copyright (c) 1993 Herb Peyerl (hpeyerl@novatel.ca) All rights reserved. +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions are +- * met: 1. Redistributions of source code must retain the above copyright +- * notice, this list of conditions and the following disclaimer. 2. The name +- * of the author may not be used to endorse or promote products derived from +- * this software withough specific prior written permission +- * +- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +- * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +- * +- * if_epreg.h,v 1.4 1994/11/13 10:12:37 gibbs Exp Modified by: +- * +- October 2, 1994 +- +- Modified by: Andres Vega Garcia +- +- INRIA - Sophia Antipolis, France +- e-mail: avega@sophia.inria.fr +- finger: avega@pax.inria.fr +- +- */ +- +-/* +- * Ethernet software status per interface. +- */ +-/* +- * Some global constants +- */ +- +-#define TX_INIT_RATE 16 +-#define TX_INIT_MAX_RATE 64 +-#define RX_INIT_LATENCY 64 +-#define RX_INIT_EARLY_THRESH 64 +-#define MIN_RX_EARLY_THRESHF 16 /* not less than ether_header */ +-#define MIN_RX_EARLY_THRESHL 4 +- +-#define EEPROMSIZE 0x40 +-#define MAX_EEPROMBUSY 1000 +-#define EP_LAST_TAG 0xd7 +-#define EP_MAX_BOARDS 16 +-#define EP_ID_PORT 0x100 +- +-/* +- * some macros to acces long named fields +- */ +-#define IS_BASE (eth_nic_base) +-#define BASE (eth_nic_base) +- +-/* +- * Commands to read/write EEPROM trough EEPROM command register (Window 0, +- * Offset 0xa) +- */ +-#define EEPROM_CMD_RD 0x0080 /* Read: Address required (5 bits) */ +-#define EEPROM_CMD_WR 0x0040 /* Write: Address required (5 bits) */ +-#define EEPROM_CMD_ERASE 0x00c0 /* Erase: Address required (5 bits) */ +-#define EEPROM_CMD_EWEN 0x0030 /* Erase/Write Enable: No data required */ +- +-#define EEPROM_BUSY (1<<15) +-#define EEPROM_TST_MODE (1<<14) +- +-/* +- * Some short functions, worth to let them be a macro +- */ +-#define is_eeprom_busy(b) (inw((b)+EP_W0_EEPROM_COMMAND)&EEPROM_BUSY) +-#define GO_WINDOW(x) outw(WINDOW_SELECT|(x), BASE+EP_COMMAND) +- +-/************************************************************************** +- * +- * These define the EEPROM data structure. They are used in the probe +- * function to verify the existance of the adapter after having sent +- * the ID_Sequence. +- * +- * There are others but only the ones we use are defined here. +- * +- **************************************************************************/ +- +-#define EEPROM_NODE_ADDR_0 0x0 /* Word */ +-#define EEPROM_NODE_ADDR_1 0x1 /* Word */ +-#define EEPROM_NODE_ADDR_2 0x2 /* Word */ +-#define EEPROM_PROD_ID 0x3 /* 0x9[0-f]50 */ +-#define EEPROM_MFG_ID 0x7 /* 0x6d50 */ +-#define EEPROM_ADDR_CFG 0x8 /* Base addr */ +-#define EEPROM_RESOURCE_CFG 0x9 /* IRQ. Bits 12-15 */ +- +-/************************************************************************** +- * +- * These are the registers for the 3Com 3c509 and their bit patterns when +- * applicable. They have been taken out the the "EtherLink III Parallel +- * Tasking EISA and ISA Technical Reference" "Beta Draft 10/30/92" manual +- * from 3com. +- * +- **************************************************************************/ +- +-#define EP_COMMAND 0x0e /* Write. BASE+0x0e is always a +- * command reg. */ +-#define EP_STATUS 0x0e /* Read. BASE+0x0e is always status +- * reg. */ +-#define EP_WINDOW 0x0f /* Read. BASE+0x0f is always window +- * reg. */ +-/* +- * Window 0 registers. Setup. +- */ +-/* Write */ +-#define EP_W0_EEPROM_DATA 0x0c +-#define EP_W0_EEPROM_COMMAND 0x0a +-#define EP_W0_RESOURCE_CFG 0x08 +-#define EP_W0_ADDRESS_CFG 0x06 +-#define EP_W0_CONFIG_CTRL 0x04 +-/* Read */ +-#define EP_W0_PRODUCT_ID 0x02 +-#define EP_W0_MFG_ID 0x00 +- +-/* +- * Window 1 registers. Operating Set. +- */ +-/* Write */ +-#define EP_W1_TX_PIO_WR_2 0x02 +-#define EP_W1_TX_PIO_WR_1 0x00 +-/* Read */ +-#define EP_W1_FREE_TX 0x0c +-#define EP_W1_TX_STATUS 0x0b /* byte */ +-#define EP_W1_TIMER 0x0a /* byte */ +-#define EP_W1_RX_STATUS 0x08 +-#define EP_W1_RX_PIO_RD_2 0x02 +-#define EP_W1_RX_PIO_RD_1 0x00 +- +-/* +- * Window 2 registers. Station Address Setup/Read +- */ +-/* Read/Write */ +-#define EP_W2_ADDR_5 0x05 +-#define EP_W2_ADDR_4 0x04 +-#define EP_W2_ADDR_3 0x03 +-#define EP_W2_ADDR_2 0x02 +-#define EP_W2_ADDR_1 0x01 +-#define EP_W2_ADDR_0 0x00 +- +-/* +- * Window 3 registers. FIFO Management. +- */ +-/* Read */ +-#define EP_W3_FREE_TX 0x0c +-#define EP_W3_FREE_RX 0x0a +- +-/* +- * Window 4 registers. Diagnostics. +- */ +-/* Read/Write */ +-#define EP_W4_MEDIA_TYPE 0x0a +-#define EP_W4_CTRLR_STATUS 0x08 +-#define EP_W4_NET_DIAG 0x06 +-#define EP_W4_FIFO_DIAG 0x04 +-#define EP_W4_HOST_DIAG 0x02 +-#define EP_W4_TX_DIAG 0x00 +- +-/* +- * Window 5 Registers. Results and Internal status. +- */ +-/* Read */ +-#define EP_W5_READ_0_MASK 0x0c +-#define EP_W5_INTR_MASK 0x0a +-#define EP_W5_RX_FILTER 0x08 +-#define EP_W5_RX_EARLY_THRESH 0x06 +-#define EP_W5_TX_AVAIL_THRESH 0x02 +-#define EP_W5_TX_START_THRESH 0x00 +- +-/* +- * Window 6 registers. Statistics. +- */ +-/* Read/Write */ +-#define TX_TOTAL_OK 0x0c +-#define RX_TOTAL_OK 0x0a +-#define TX_DEFERRALS 0x08 +-#define RX_FRAMES_OK 0x07 +-#define TX_FRAMES_OK 0x06 +-#define RX_OVERRUNS 0x05 +-#define TX_COLLISIONS 0x04 +-#define TX_AFTER_1_COLLISION 0x03 +-#define TX_AFTER_X_COLLISIONS 0x02 +-#define TX_NO_SQE 0x01 +-#define TX_CD_LOST 0x00 +- +-/**************************************** +- * +- * Register definitions. +- * +- ****************************************/ +- +-/* +- * Command register. All windows. +- * +- * 16 bit register. +- * 15-11: 5-bit code for command to be executed. +- * 10-0: 11-bit arg if any. For commands with no args; +- * this can be set to anything. +- */ +-#define GLOBAL_RESET (unsigned short) 0x0000 /* Wait at least 1ms +- * after issuing */ +-#define WINDOW_SELECT (unsigned short) (0x1<<11) +-#define START_TRANSCEIVER (unsigned short) (0x2<<11) /* Read ADDR_CFG reg to +- * determine whether +- * this is needed. If +- * so; wait 800 uSec +- * before using trans- +- * ceiver. */ +-#define RX_DISABLE (unsigned short) (0x3<<11) /* state disabled on +- * power-up */ +-#define RX_ENABLE (unsigned short) (0x4<<11) +-#define RX_RESET (unsigned short) (0x5<<11) +-#define RX_DISCARD_TOP_PACK (unsigned short) (0x8<<11) +-#define TX_ENABLE (unsigned short) (0x9<<11) +-#define TX_DISABLE (unsigned short) (0xa<<11) +-#define TX_RESET (unsigned short) (0xb<<11) +-#define REQ_INTR (unsigned short) (0xc<<11) +-#define SET_INTR_MASK (unsigned short) (0xe<<11) +-#define SET_RD_0_MASK (unsigned short) (0xf<<11) +-#define SET_RX_FILTER (unsigned short) (0x10<<11) +-#define FIL_INDIVIDUAL (unsigned short) (0x1) +-#define FIL_GROUP (unsigned short) (0x2) +-#define FIL_BRDCST (unsigned short) (0x4) +-#define FIL_ALL (unsigned short) (0x8) +-#define SET_RX_EARLY_THRESH (unsigned short) (0x11<<11) +-#define SET_TX_AVAIL_THRESH (unsigned short) (0x12<<11) +-#define SET_TX_START_THRESH (unsigned short) (0x13<<11) +-#define STATS_ENABLE (unsigned short) (0x15<<11) +-#define STATS_DISABLE (unsigned short) (0x16<<11) +-#define STOP_TRANSCEIVER (unsigned short) (0x17<<11) +-/* +- * The following C_* acknowledge the various interrupts. Some of them don't +- * do anything. See the manual. +- */ +-#define ACK_INTR (unsigned short) (0x6800) +-#define C_INTR_LATCH (unsigned short) (ACK_INTR|0x1) +-#define C_CARD_FAILURE (unsigned short) (ACK_INTR|0x2) +-#define C_TX_COMPLETE (unsigned short) (ACK_INTR|0x4) +-#define C_TX_AVAIL (unsigned short) (ACK_INTR|0x8) +-#define C_RX_COMPLETE (unsigned short) (ACK_INTR|0x10) +-#define C_RX_EARLY (unsigned short) (ACK_INTR|0x20) +-#define C_INT_RQD (unsigned short) (ACK_INTR|0x40) +-#define C_UPD_STATS (unsigned short) (ACK_INTR|0x80) +- +-/* +- * Status register. All windows. +- * +- * 15-13: Window number(0-7). +- * 12: Command_in_progress. +- * 11: reserved. +- * 10: reserved. +- * 9: reserved. +- * 8: reserved. +- * 7: Update Statistics. +- * 6: Interrupt Requested. +- * 5: RX Early. +- * 4: RX Complete. +- * 3: TX Available. +- * 2: TX Complete. +- * 1: Adapter Failure. +- * 0: Interrupt Latch. +- */ +-#define S_INTR_LATCH (unsigned short) (0x1) +-#define S_CARD_FAILURE (unsigned short) (0x2) +-#define S_TX_COMPLETE (unsigned short) (0x4) +-#define S_TX_AVAIL (unsigned short) (0x8) +-#define S_RX_COMPLETE (unsigned short) (0x10) +-#define S_RX_EARLY (unsigned short) (0x20) +-#define S_INT_RQD (unsigned short) (0x40) +-#define S_UPD_STATS (unsigned short) (0x80) +-#define S_5_INTS (S_CARD_FAILURE|S_TX_COMPLETE|\ +- S_TX_AVAIL|S_RX_COMPLETE|S_RX_EARLY) +-#define S_COMMAND_IN_PROGRESS (unsigned short) (0x1000) +- +-/* +- * FIFO Registers. +- * RX Status. Window 1/Port 08 +- * +- * 15: Incomplete or FIFO empty. +- * 14: 1: Error in RX Packet 0: Incomplete or no error. +- * 13-11: Type of error. +- * 1000 = Overrun. +- * 1011 = Run Packet Error. +- * 1100 = Alignment Error. +- * 1101 = CRC Error. +- * 1001 = Oversize Packet Error (>1514 bytes) +- * 0010 = Dribble Bits. +- * (all other error codes, no errors.) +- * +- * 10-0: RX Bytes (0-1514) +- */ +-#define ERR_RX_INCOMPLETE (unsigned short) (0x1<<15) +-#define ERR_RX (unsigned short) (0x1<<14) +-#define ERR_RX_OVERRUN (unsigned short) (0x8<<11) +-#define ERR_RX_RUN_PKT (unsigned short) (0xb<<11) +-#define ERR_RX_ALIGN (unsigned short) (0xc<<11) +-#define ERR_RX_CRC (unsigned short) (0xd<<11) +-#define ERR_RX_OVERSIZE (unsigned short) (0x9<<11) +-#define ERR_RX_DRIBBLE (unsigned short) (0x2<<11) +- +-/* +- * FIFO Registers. +- * TX Status. Window 1/Port 0B +- * +- * Reports the transmit status of a completed transmission. Writing this +- * register pops the transmit completion stack. +- * +- * Window 1/Port 0x0b. +- * +- * 7: Complete +- * 6: Interrupt on successful transmission requested. +- * 5: Jabber Error (TP Only, TX Reset required. ) +- * 4: Underrun (TX Reset required. ) +- * 3: Maximum Collisions. +- * 2: TX Status Overflow. +- * 1-0: Undefined. +- * +- */ +-#define TXS_COMPLETE 0x80 +-#define TXS_SUCCES_INTR_REQ 0x40 +-#define TXS_JABBER 0x20 +-#define TXS_UNDERRUN 0x10 +-#define TXS_MAX_COLLISION 0x8 +-#define TXS_STATUS_OVERFLOW 0x4 +- +-/* +- * Configuration control register. +- * Window 0/Port 04 +- */ +-/* Read */ +-#define IS_AUI (1<<13) +-#define IS_BNC (1<<12) +-#define IS_UTP (1<<9) +-/* Write */ +-#define ENABLE_DRQ_IRQ 0x0001 +-#define W0_P4_CMD_RESET_ADAPTER 0x4 +-#define W0_P4_CMD_ENABLE_ADAPTER 0x1 +-/* +- * Media type and status. +- * Window 4/Port 0A +- */ +-#define ENABLE_UTP 0xc0 +-#define DISABLE_UTP 0x0 +- +-/* +- * Resource control register +- */ +- +-#define SET_IRQ(i) ( ((i)<<12) | 0xF00) /* set IRQ i */ +- +-/* +- * Receive status register +- */ +- +-#define RX_BYTES_MASK (unsigned short) (0x07ff) +-#define RX_ERROR 0x4000 +-#define RX_INCOMPLETE 0x8000 +- +- +-/* +- * Misc defines for various things. +- */ +-#define ACTIVATE_ADAPTER_TO_CONFIG 0xff /* to the id_port */ +-#define MFG_ID 0x6d50 /* in EEPROM and W0 ADDR_CONFIG */ +-#define PROD_ID 0x9150 +- +-#define AUI 0x1 +-#define BNC 0x2 +-#define UTP 0x4 +- +-#define RX_BYTES_MASK (unsigned short) (0x07ff) +- +- /* EISA support */ +-#define EP_EISA_START 0x1000 +-#define EP_EISA_W0 0x0c80 +- +-#ifdef INCLUDE_3C529 +- /* MCA support */ +-#define MCA_MOTHERBOARD_SETUP_REG 0x94 +-#define MCA_ADAPTER_SETUP_REG 0x96 +-#define MCA_MAX_SLOT_NR 8 +-#define MCA_POS_REG(n) (0x100+(n)) +-#endif +- +-/* +- * Local variables: +- * c-basic-offset: 8 +- * End: +- */ +Index: b/netboot/3c595.c +=================================================================== +--- a/netboot/3c595.c ++++ b/netboot/3c595.c +@@ -20,6 +20,7 @@ + * + * Copyright (c) 1994 Herb Peyerl + * ++* timlegge 08-24-2003 Add Multicast Support + */ + + /* #define EDEBUG */ +@@ -30,7 +31,7 @@ + #include "3c595.h" + #include "timer.h" + +-static unsigned short eth_nic_base, eth_asic_base; ++static unsigned short eth_nic_base; + static unsigned short vx_connector, vx_connectors; + + static struct connector_entry { +@@ -57,14 +58,12 @@ + static void vxgetlink(void); + static void vxsetlink(void); + +-#define udelay(n) waiton_timer2(((n)*TICKS_PER_MS)/1000) +- + /************************************************************************** + ETH_RESET - Reset adapter + ***************************************************************************/ + static void t595_reset(struct nic *nic) + { +- int i, j; ++ int i; + + /*********************************************************** + Reset 3Com 595 card +@@ -133,7 +132,7 @@ + outw(ACK_INTR | 0xff, BASE + VX_COMMAND); + + outw(SET_RX_FILTER | FIL_INDIVIDUAL | +- FIL_BRDCST, BASE + VX_COMMAND); ++ FIL_BRDCST|FIL_MULTICAST, BASE + VX_COMMAND); + + vxsetlink(); + /*{ +@@ -225,10 +224,9 @@ + /************************************************************************** + ETH_POLL - Wait for a frame + ***************************************************************************/ +-static int t595_poll(struct nic *nic) ++static int t595_poll(struct nic *nic, int retrieve) + { + /* common variables */ +- unsigned short type = 0; /* used by EDEBUG */ + /* variables for 3C595 */ + short status, cst; + register short rx_fifo; +@@ -262,6 +260,8 @@ + if (rx_fifo==0) + return 0; + ++ if ( ! retrieve ) return 1; ++ + /* read packet */ + #ifdef EDEBUG + printf("[l=%d",rx_fifo); +@@ -300,12 +300,15 @@ + outw(RX_DISCARD_TOP_PACK, BASE + VX_COMMAND); + while (inw(BASE + VX_STATUS) & S_COMMAND_IN_PROGRESS); + #ifdef EDEBUG ++{ ++ unsigned short type = 0; /* used by EDEBUG */ + type = (nic->packet[12]<<8) | nic->packet[13]; + if(nic->packet[0]+nic->packet[1]+nic->packet[2]+nic->packet[3]+nic->packet[4]+ + nic->packet[5] == 0xFF*ETH_ALEN) + printf(",t=%hX,b]",type); + else + printf(",t=%hX]",type); ++} + #endif + return 1; + } +@@ -382,9 +385,8 @@ + static void + vxsetlink(void) + { +- int i, j, k; ++ int i, j; + char *reason, *warning; +- static short prev_flags; + static char prev_conn = -1; + + if (prev_conn == -1) { +@@ -438,28 +440,47 @@ + GO_WINDOW(1); + } + +-static void t595_disable(struct nic *nic) ++static void t595_disable(struct dev *dev) + { +- outw(STOP_TRANSCEIVER, BASE + VX_COMMAND); +- udelay(8000); +- GO_WINDOW(4); +- outw(0, BASE + VX_W4_MEDIA_TYPE); +- GO_WINDOW(1); ++ struct nic *nic = (struct nic *)dev; ++ t595_reset(nic); ++ ++ outw(STOP_TRANSCEIVER, BASE + VX_COMMAND); ++ udelay(8000); ++ GO_WINDOW(4); ++ outw(0, BASE + VX_W4_MEDIA_TYPE); ++ GO_WINDOW(1); ++} ++ ++static void t595_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } + } + + /************************************************************************** + ETH_PROBE - Look for an adapter + ***************************************************************************/ +-struct nic *t595_probe(struct nic *nic, unsigned short *probeaddrs, struct pci_device *pci) ++static int t595_probe(struct dev *dev, struct pci_device *pci) + { ++ struct nic *nic = (struct nic *)dev; + int i; + unsigned short *p; + +- if (probeaddrs == 0 || probeaddrs[0] == 0) ++ if (pci->ioaddr == 0) + return 0; + /* eth_nic_base = probeaddrs[0] & ~3; */ + eth_nic_base = pci->ioaddr; + ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ + GO_WINDOW(0); + outw(GLOBAL_RESET, BASE + VX_COMMAND); + VX_BUSY_WAIT; +@@ -487,14 +508,40 @@ + printf("Ethernet address: %!\n", nic->node_addr); + + t595_reset(nic); +- nic->reset = t595_reset; +- nic->poll = t595_poll; ++ dev->disable = t595_disable; ++ nic->poll = t595_poll; + nic->transmit = t595_transmit; +- nic->disable = t595_disable; +- return nic; ++ nic->irq = t595_irq; ++ return 1; + + } + ++static struct pci_id t595_nics[] = { ++PCI_ROM(0x10b7, 0x5900, "3c590", "3Com590"), /* Vortex 10Mbps */ ++PCI_ROM(0x10b7, 0x5950, "3c595", "3Com595"), /* Vortex 100baseTx */ ++PCI_ROM(0x10b7, 0x5951, "3c595-1", "3Com595"), /* Vortex 100baseT4 */ ++PCI_ROM(0x10b7, 0x5952, "3c595-2", "3Com595"), /* Vortex 100base-MII */ ++PCI_ROM(0x10b7, 0x9000, "3c900-tpo", "3Com900-TPO"), /* 10 Base TPO */ ++PCI_ROM(0x10b7, 0x9001, "3c900-t4", "3Com900-Combo"), /* 10/100 T4 */ ++PCI_ROM(0x10b7, 0x9004, "3c900b-tpo", "3Com900B-TPO"), /* 10 Base TPO */ ++PCI_ROM(0x10b7, 0x9005, "3c900b-combo", "3Com900B-Combo"), /* 10 Base Combo */ ++PCI_ROM(0x10b7, 0x9006, "3c900b-tpb2", "3Com900B-2/T"), /* 10 Base TP and Base2 */ ++PCI_ROM(0x10b7, 0x900a, "3c900b-fl", "3Com900B-FL"), /* 10 Base F */ ++PCI_ROM(0x10b7, 0x9800, "3c980-cyclone-1", "3Com980-Cyclone"), /* Cyclone */ ++PCI_ROM(0x10b7, 0x9805, "3c9805-1", "3Com9805"), /* Dual Port Server Cyclone */ ++PCI_ROM(0x10b7, 0x7646, "3csoho100-tx-1", "3CSOHO100-TX"), /* Hurricane */ ++PCI_ROM(0x10b7, 0x4500, "3c450-1", "3Com450 HomePNA Tornado"), ++}; ++ ++struct pci_driver t595_driver = { ++ .type = NIC_DRIVER, ++ .name = "3C595", ++ .probe = t595_probe, ++ .ids = t595_nics, ++ .id_count = sizeof(t595_nics)/sizeof(t595_nics[0]), ++ .class = 0, ++}; ++ + /* + * Local variables: + * c-basic-offset: 8 +Index: b/netboot/3c90x.c +=================================================================== +--- a/netboot/3c90x.c ++++ b/netboot/3c90x.c +@@ -1,7 +1,7 @@ + /* + * 3c90x.c -- This file implements the 3c90x driver for etherboot. Written + * by Greg Beeley, Greg.Beeley@LightSys.org. Modified by Steve Smith, +- * Steve.Smith@Juno.Com ++ * Steve.Smith@Juno.Com. Alignment bug fix Neil Newell (nn@icenoir.net). + * + * This program Copyright (C) 1999 LightSys Technology Services, Inc. + * Portions Copyright (C) 1999 Steve Smith +@@ -31,13 +31,15 @@ + * Re-wrote poll and transmit for + * better error recovery and heavy + * network traffic operation ++ * v2.01 5-26-2003 NN Fixed driver alignment issue which ++ * caused system lockups if driver structures ++ * not 8-byte aligned. + * + */ + + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + #include "timer.h" + + #define XCVR_MAGIC (0x5A00) +@@ -47,9 +49,6 @@ + **/ + #define XMIT_RETRIES 250 + +-#undef virt_to_bus +-#define virt_to_bus(x) ((unsigned long)x) +- + /*** Register definitions for the 3c905 ***/ + enum Registers + { +@@ -225,7 +224,7 @@ + unsigned int DataAddr; + unsigned int DataLength; + } +- TXD; ++ TXD __attribute__ ((aligned(8))); /* 64-bit aligned for bus mastering */ + + /*** RX descriptor ***/ + typedef struct +@@ -235,7 +234,7 @@ + unsigned int DataAddr; + unsigned int DataLength; + } +- RXD; ++ RXD __attribute__ ((aligned(8))); /* 64-bit aligned for bus mastering */ + + /*** Global variables ***/ + static struct +@@ -311,6 +310,7 @@ + } + + ++#if 0 + /*** a3c90x_internal_WriteEepromWord - write a physical word of + *** data to the onboard serial eeprom (not the BIOS prom, but the + *** nvram in the card that stores, among other things, the MAC +@@ -344,8 +344,9 @@ + + return 0; + } ++#endif + +- ++#if 0 + /*** a3c90x_internal_WriteEeprom - write data to the serial eeprom, + *** and re-compute the eeprom checksum. + ***/ +@@ -384,8 +385,7 @@ + + return 0; + } +- +- ++#endif + + /*** a3c90x_reset: exported function that resets the card to its default + *** state. This is so the Linux driver can re-set the card up the way +@@ -393,12 +393,10 @@ + *** not alter the selected transceiver that we used to download the boot + *** image. + ***/ +-static void +-a3c90x_reset(struct nic *nic) ++static void a3c90x_reset(void) + { +- int cfg; +- + #ifdef CFG_3C90X_PRESERVE_XCVR ++ int cfg; + /** Read the current InternalConfig value. **/ + a3c90x_internal_SetWindow(INF_3C90X.IOAddr, winTxRxOptions3); + cfg = inl(INF_3C90X.IOAddr + regInternalConfig_3_l); +@@ -473,7 +471,7 @@ + *** p - the pointer to the packet data itself. + ***/ + static void +-a3c90x_transmit(struct nic *nic, const char *d, unsigned int t, ++a3c90x_transmit(struct nic *nic __unused, const char *d, unsigned int t, + unsigned int s, const char *p) + { + +@@ -553,7 +551,7 @@ + if (status & 0x02) + { + printf("3C90X: Tx Reclaim Error (%hhX)\n", status); +- a3c90x_reset(NULL); ++ a3c90x_reset(); + } + else if (status & 0x04) + { +@@ -572,18 +570,18 @@ + else if (status & 0x10) + { + printf("3C90X: Tx Underrun (%hhX)\n", status); +- a3c90x_reset(NULL); ++ a3c90x_reset(); + } + else if (status & 0x20) + { + printf("3C90X: Tx Jabber (%hhX)\n", status); +- a3c90x_reset(NULL); ++ a3c90x_reset(); + } + else if ((status & 0x80) != 0x80) + { + printf("3C90X: Internal Error - Incomplete Transmission (%hhX)\n", + status); +- a3c90x_reset(NULL); ++ a3c90x_reset(); + } + } + +@@ -601,7 +599,7 @@ + *** in nic->packetlen. Return 1 if a packet was found. + ***/ + static int +-a3c90x_poll(struct nic *nic) ++a3c90x_poll(struct nic *nic, int retrieve) + { + int i, errcode; + +@@ -610,6 +608,8 @@ + return 0; + } + ++ if ( ! retrieve ) return 1; ++ + /** we don't need to acknowledge rxComplete -- the upload engine + ** does it for us. + **/ +@@ -663,34 +663,51 @@ + *** [Ken] + ***/ + static void +-a3c90x_disable(struct nic *nic) +- { ++a3c90x_disable(struct dev *dev __unused) ++{ ++ /* reset and disable merge */ ++ a3c90x_reset(); + /* Disable the receiver and transmitter. */ + outw(cmdRxDisable, INF_3C90X.IOAddr + regCommandIntStatus_w); + outw(cmdTxDisable, INF_3C90X.IOAddr + regCommandIntStatus_w); +- } +- ++} + ++static void a3c90x_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} + + /*** a3c90x_probe: exported routine to probe for the 3c905 card and perform + *** initialization. If this routine is called, the pci functions did find the + *** card. We just have to init it here. + ***/ +-struct nic* +-a3c90x_probe(struct nic *nic, unsigned short *probeaddrs, struct pci_device *pci) +- { ++static int a3c90x_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *)dev; + int i, c; + unsigned short eeprom[0x21]; + unsigned int cfg; + unsigned int mopt; ++ unsigned int mstat; + unsigned short linktype; ++#define HWADDR_OFFSET 10 + +- if (probeaddrs == 0 || probeaddrs[0] == 0) ++ if (pci->ioaddr == 0) + return 0; + + adjust_pci_device(pci); + +- INF_3C90X.IOAddr = probeaddrs[0] & ~3; ++ nic->ioaddr = pci->ioaddr & ~3; ++ nic->irqno = 0; ++ ++ INF_3C90X.IOAddr = pci->ioaddr & ~3; + INF_3C90X.CurrentWindow = 255; + switch (a3c90x_internal_ReadEeprom(INF_3C90X.IOAddr, 0x03)) + { +@@ -756,30 +773,45 @@ + "Copyright 1999 LightSys Technology Services, Inc.\n" + "Portions Copyright 1999 Steve Smith\n"); + printf("Provided with ABSOLUTELY NO WARRANTY.\n"); ++#ifdef CFG_3C90X_BOOTROM_FIX ++ if (INF_3C90X.isBrev) ++ { ++ printf("NOTE: 3c905b bootrom fix enabled; has side " ++ "effects. See 3c90x.txt for info.\n"); ++ } ++#endif + printf("-------------------------------------------------------" + "------------------------\n"); + + /** Retrieve the Hardware address and print it on the screen. **/ +- INF_3C90X.HWAddr[0] = eeprom[0]>>8; +- INF_3C90X.HWAddr[1] = eeprom[0]&0xFF; +- INF_3C90X.HWAddr[2] = eeprom[1]>>8; +- INF_3C90X.HWAddr[3] = eeprom[1]&0xFF; +- INF_3C90X.HWAddr[4] = eeprom[2]>>8; +- INF_3C90X.HWAddr[5] = eeprom[2]&0xFF; ++ INF_3C90X.HWAddr[0] = eeprom[HWADDR_OFFSET + 0]>>8; ++ INF_3C90X.HWAddr[1] = eeprom[HWADDR_OFFSET + 0]&0xFF; ++ INF_3C90X.HWAddr[2] = eeprom[HWADDR_OFFSET + 1]>>8; ++ INF_3C90X.HWAddr[3] = eeprom[HWADDR_OFFSET + 1]&0xFF; ++ INF_3C90X.HWAddr[4] = eeprom[HWADDR_OFFSET + 2]>>8; ++ INF_3C90X.HWAddr[5] = eeprom[HWADDR_OFFSET + 2]&0xFF; + printf("MAC Address = %!\n", INF_3C90X.HWAddr); + ++ /* Test if the link is good, if not continue */ ++ a3c90x_internal_SetWindow(INF_3C90X.IOAddr, winDiagnostics4); ++ mstat = inw(INF_3C90X.IOAddr + regMediaStatus_4_w); ++ if((mstat & (1<<11)) == 0) { ++ printf("Valid link not established\n"); ++ return 0; ++ } ++ + /** Program the MAC address into the station address registers **/ + a3c90x_internal_SetWindow(INF_3C90X.IOAddr, winAddressing2); +- outw(htons(eeprom[0]), INF_3C90X.IOAddr + regStationAddress_2_3w); +- outw(htons(eeprom[1]), INF_3C90X.IOAddr + regStationAddress_2_3w+2); +- outw(htons(eeprom[2]), INF_3C90X.IOAddr + regStationAddress_2_3w+4); ++ outw(htons(eeprom[HWADDR_OFFSET + 0]), INF_3C90X.IOAddr + regStationAddress_2_3w); ++ outw(htons(eeprom[HWADDR_OFFSET + 1]), INF_3C90X.IOAddr + regStationAddress_2_3w+2); ++ outw(htons(eeprom[HWADDR_OFFSET + 2]), INF_3C90X.IOAddr + regStationAddress_2_3w+4); + outw(0, INF_3C90X.IOAddr + regStationMask_2_3w+0); + outw(0, INF_3C90X.IOAddr + regStationMask_2_3w+2); + outw(0, INF_3C90X.IOAddr + regStationMask_2_3w+4); + + /** Fill in our entry in the etherboot arp table **/ + for(i=0;inode_addr[i] = (eeprom[i/2] >> (8*((i&1)^1))) & 0xff; ++ nic->node_addr[i] = (eeprom[HWADDR_OFFSET + i/2] >> (8*((i&1)^1))) & 0xff; + + /** Read the media options register, print a message and set default + ** xcvr. +@@ -903,8 +935,8 @@ + while (inw(INF_3C90X.IOAddr + regCommandIntStatus_w) & INT_CMDINPROGRESS) + ; + +- /** Set the RX filter = receive only individual pkts & bcast. **/ +- a3c90x_internal_IssueCommand(INF_3C90X.IOAddr, cmdSetRxFilter, 0x01 + 0x04); ++ /** Set the RX filter = receive only individual pkts & multicast & bcast. **/ ++ a3c90x_internal_IssueCommand(INF_3C90X.IOAddr, cmdSetRxFilter, 0x01 + 0x02 + 0x04); + a3c90x_internal_IssueCommand(INF_3C90X.IOAddr, cmdRxEnable, 0); + + +@@ -918,12 +950,46 @@ + cmdAcknowledgeInterrupt, 0x661); + + /** Set our exported functions **/ +- nic->reset = a3c90x_reset; ++ dev->disable = a3c90x_disable; + nic->poll = a3c90x_poll; + nic->transmit = a3c90x_transmit; +- nic->disable = a3c90x_disable; ++ nic->irq = a3c90x_irq; + +- return nic; +- } ++ return 1; ++} + + ++static struct pci_id a3c90x_nics[] = { ++/* Original 90x revisions: */ ++PCI_ROM(0x10b7, 0x9000, "3c905-tpo", "3Com900-TPO"), /* 10 Base TPO */ ++PCI_ROM(0x10b7, 0x9001, "3c905-t4", "3Com900-Combo"), /* 10/100 T4 */ ++PCI_ROM(0x10b7, 0x9050, "3c905-tpo100", "3Com905-TX"), /* 100 Base TX / 10/100 TPO */ ++PCI_ROM(0x10b7, 0x9051, "3c905-combo", "3Com905-T4"), /* 100 Base T4 / 10 Base Combo */ ++/* Newer 90xB revisions: */ ++PCI_ROM(0x10b7, 0x9004, "3c905b-tpo", "3Com900B-TPO"), /* 10 Base TPO */ ++PCI_ROM(0x10b7, 0x9005, "3c905b-combo", "3Com900B-Combo"), /* 10 Base Combo */ ++PCI_ROM(0x10b7, 0x9006, "3c905b-tpb2", "3Com900B-2/T"), /* 10 Base TP and Base2 */ ++PCI_ROM(0x10b7, 0x900a, "3c905b-fl", "3Com900B-FL"), /* 10 Base FL */ ++PCI_ROM(0x10b7, 0x9055, "3c905b-tpo100", "3Com905B-TX"), /* 10/100 TPO */ ++PCI_ROM(0x10b7, 0x9056, "3c905b-t4", "3Com905B-T4"), /* 10/100 T4 */ ++PCI_ROM(0x10b7, 0x9058, "3c905b-9058", "3Com905B-9058"), /* Cyclone 10/100/BNC */ ++PCI_ROM(0x10b7, 0x905a, "3c905b-fx", "3Com905B-FL"), /* 100 Base FX / 10 Base FX */ ++/* Newer 90xC revision: */ ++PCI_ROM(0x10b7, 0x9200, "3c905c-tpo", "3Com905C-TXM"), /* 10/100 TPO (3C905C-TXM) */ ++PCI_ROM(0x10b7, 0x9210, "3c920b-emb-wnm","3Com20B-EMB WNM"), ++PCI_ROM(0x10b7, 0x9800, "3c980", "3Com980-Cyclone"), /* Cyclone */ ++PCI_ROM(0x10b7, 0x9805, "3c9805", "3Com9805"), /* Dual Port Server Cyclone */ ++PCI_ROM(0x10b7, 0x7646, "3csoho100-tx", "3CSOHO100-TX"), /* Hurricane */ ++PCI_ROM(0x10b7, 0x4500, "3c450", "3Com450 HomePNA Tornado"), ++PCI_ROM(0x10b7, 0x1201, "3c982a", "3Com982A"), ++PCI_ROM(0x10b7, 0x1202, "3c982b", "3Com982B"), ++}; ++ ++struct pci_driver a3c90x_driver = { ++ .type = NIC_DRIVER, ++ .name = "3C90X", ++ .probe = a3c90x_probe, ++ .ids = a3c90x_nics, ++ .id_count = sizeof(a3c90x_nics)/sizeof(a3c90x_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/3c90x.txt +=================================================================== +--- a/netboot/3c90x.txt ++++ /dev/null +@@ -1,307 +0,0 @@ +- +- Instructions for use of the 3C90X driver for EtherBoot +- +- Original 3C905B support by: +- Greg Beeley (Greg.Beeley@LightSys.org), +- LightSys Technology Services, Inc. +- February 11, 1999 +- +- Updates for 3C90X family by: +- Steve Smith (steve.smith@juno.com) +- October 1, 1999 +- +- Minor documentation updates by +- Greg Beeley (Greg.Beeley@LightSys.org) +- March 29, 2000 +- +-------------------------------------------------------------------------------- +- +-I OVERVIEW +- +- The 3c90X series ethernet cards are a group of high-performance busmaster +- DMA cards from 3Com. This particular driver supports both the 3c90x and +- the 3c90xB revision cards. 3C90xC family support has been tested to some +- degree but not extensively. +- +- Here's the licensing information: +- +- This program Copyright (C) 1999 LightSys Technology Services, Inc. +- Portions Copyright (C) 1999 Steve Smith. +- +- This program may be re-distributed in source or binary form, modified, +- sold, or copied for any purpose, provided that the above copyright message +- and this text are included with all source copies or derivative works, and +- provided that the above copyright message and this text are included in the +- documentation of any binary-only distributions. This program is +- distributed WITHOUT ANY WARRANTY, without even the warranty of FITNESS FOR +- A PARTICULAR PURPOSE or MERCHANTABILITY. Please read the associated +- documentation "3c90x.txt" before compiling and using this driver. +- +- +-II FLASH PROMS +- +- The 3c90xB cards, according to the 3Com documentation, only accept the +- following flash memory chips: +- +- Atmel AT29C512 (64 kilobyte) +- Atmel AT29C010 (128 kilobyte) +- +- The 3c90x cards, according to the 3Com documentation, accept the +- following flash memory chips capacities: +- +- 64 kb (8 kB) +- 128 kb (16 kB) +- 256 kb (32 kB) and +- 512 kb (64 kB) +- +- Atmel AT29C512 (64 kilobyte) chips are specifically listed for both +- adapters, but flashing on the 3c905b cards would only be supported +- through the Atmel parts. Any device, of the supported size, should +- be supported when programmed by a dedicated PROM programmer (e.g. +- not the card). +- +- To use this driver in such a PROM, visit Atmel's web site and download +- their .PDF file containing a list of their distributors. Contact the +- distributors for pricing information. The prices are quite reasonable +- (about $3 US each for the 64 kB part), and are comparable to what one would +- expect for similarly sized standard EPROMs. And, the flash chips are much +- easier to work with, as they don't need to be UV-erased to be reprogrammed. +- The 3C905B card actually provides a method to program the flash memory +- while it is resident on board the card itself; if someone would like to +- write a small DOS program to do the programming, I can provide the +- information about the registers and so forth. +- +- A utility program, 3c90xutil, is provided with Etherboot in the 'contrib' +- directory that allows for the on-board flashing of the ROM while Linux +- is running. The program has been successfully used under Linux, but I +- have heard problem reports of its use under FreeBSD. Anyone willing to +- make it work under FreeBSD is more than welcome to do so! +- +- You also have the option of using EPROM chips - the 3C905B-TX-NM has been +- successfully tested with 27C256 (32kB) and 27C512 (64kB) chips with a +- specified access time of 100ns and faster. +- +- +-III GENERAL USE +- +- Normally, the basic procedure for using this driver is as follows: +- +- 1. Run the 3c90xcfg program on the driver diskette to enable the +- boot PROM and set it to 64k or 128k, as appropriate. +- 2. Build the appropriate 3c90x.fd0 or 3c90x.fd0 floppy image with +- possibly the value CFG_3C90X_XCVR defined to the transceiver type that +- you want to use (i.e., 10/100 rj45, AUI, coax, MII). +- 3. Run the floppy image on the PC to be network booted, to get +- it configured, and to verify that it will boot properly. +- 4. Build the 3c90x.rom or 3c90x.lzrom PROM image and program +- it into the flash or EPROM memory chip. +- 5. Put the PROM in the ethernet card, boot and enable 'boot from +- network first' in the system BIOS, save and reboot. +- +- Here are some issues to be aware of: +- +- 1. If you experience crashes or different behaviour when using the +- boot PROM, add the setting CFG_3C90X_BOOTROM_FIX and go through the +- steps 2-5 above. This works around a bug in some 3c905B cards (see +- below), but has some side-effects which may not be desirable. +- Please note that you have to boot off a floppy (not PROM!) once for +- this fix to take effect. +- 2. The possible need to manually set the CFG_3C90X_XCVR value to +- configure the transceiver type. Values are listed below. +- 3. The possible need to define CFG_3C90X_PRESERVE_XCVR for use in +- operating systems that don't intelligently determine the +- transceiver type. +- +- Some things that are on the 'To-Do' list, perhaps for me, but perhaps +- for any other volunteers out there: +- +- 1. Extend the driver to fully implement the auto-select +- algorithm if the card has multiple media ports. +- 2. Fix any bugs in the code .... +- 3. Extend the driver to support the 3c905c revision cards +- "officially". Right now, the support has been primarily empirical +- and not based on 3c905C documentation. +- +- Now for the details.... +- +- This driver has been tested on roughly 300 systems. The main two +- configuration issues to contend with are: +- +- 1. Ensure that PCI Busmastering is enabled for the adapter (configured +- in the CMOS setup) +- 2. Some systems don't work properly with the adapter when plug and +- play OS is enabled; I always set it to "No" or "Disabled" -- this makes +- it easier and really doesn't adversely affect anything. +- +- Roughly 95% of the systems worked when configured properly. A few +- have issues with booting locally once the boot PROM has been installed +- (this number has been less than 2%). Other configuration issues that +- to check: +- +- 1. Newer BIOS's actually work correctly with the network boot order. +- Set the network adapter first. Most older BIOS's automatically go to +- the network boot PROM first. +- 2. For systems where the adapter was already installed and is just +- having the PROM installed, try setting the "reset configuration data" +- to yes in the CMOS setup if the BIOS isn't seen at first. If your BIOS +- doesn't have this option, remove the card, start the system, shut down, +- install the card and restart (or switch to a different PCI slot). +- 3. Make sure the CMOS security settings aren't preventing a boot. +- +- The 3c905B cards have a significant 'bug' that relates to the flash prom: +- unless the card is set internally to the MII transceiver, it will only +- read the first 8k of the PROM image. Don't ask why -- it seems really +- obscure, but it has to do with the way they mux'd the address lines +- from the PCI bus to the ROM. Unfortunately, most of us are not using +- MII transceivers, and even the .lzrom image ends up being just a little +- bit larger than 8k. Note that the workaround for this is disabled by +- default, because the Windows NT 4.0 driver does not like it (no packets +- are transmitted). +- +- So, the solution that I've used is to internally set the card's nvram +- configuration to use MII when it boots. The 3c905b driver does this +- automatically. This way, the 16k prom image can be loaded into memory, +- and then the 3c905b driver can set the temporary configuration of the +- card to an appropriate value, either configurable by the user or chosen +- by the driver. +- +- To enable the 3c905B bugfix, which is necessary for these cards when +- booting from the Flash ROM, define -DCFG_3C90X_BOOTROM_FIX when building, +- create a floppy image and boot it once. +- Thereafter, the card should accept the larger prom image. +- +- The driver should choose an appropriate transceiver on the card. However, +- if it doesn't on your card or if you need to, for instance, set your +- card to 10mbps when connected to an unmanaged 10/100 hub, you can specify +- which transceiver you want to use. To do this, build the 3c905b.fd0 +- image with -DCFG_3C90X_XCVR=x, where 'x' is one of the following +- values: +- +- 0 10Base-T +- 1 10mbps AUI +- 3 10Base-2 (thinnet/coax) +- 4 100Base-TX +- 5 100Base-FX +- 6 MII +- 8 Auto-negotiation 10Base-T / 100Base-TX (usually the default) +- 9 MII External MAC Mode +- 255 Allow driver to choose an 'appropriate' media port. +- +- Then proceed from step 2 in the above 'general use' instructions. The +- .rom image can be built with CFG_3C90X_XCVR set to a value, but you +- normally don't want to do this, since it is easier to change the +- transceiver type by rebuilding a new floppy, changing the BIOS to floppy +- boot, booting, and then changing the BIOS back to network boot. If +- CFG_3C90X_XCVR is not set in a particular build, it just uses the +- current configuration (either its 'best guess' or whatever the stored +- CFG_3C90X_XCVR value was from the last time it was set). +- +- [[ Note for the more technically inclined: The CFG_3C90X_XCVR value is +- programmed into a register in the card's NVRAM that was reserved for +- LanWorks PROM images to use. When the driver boots, the card comes +- up in MII mode, and the driver checks the LanWorks register to find +- out if the user specified a transceiver type. If it finds that +- information, it uses that, otherwise it picks a transceiver that the +- card has based on the 3c905b's MediaOptions register. This driver isn't +- quite smart enough to always determine which media port is actually +- _connected_; maybe someone else would like to take on that task (it +- actually involves sending a self-directed packet and seeing if it +- comes back. IF it does, that port is connected). ]] +- +- Another issue to keep in mind is that it is possible that some OS'es +- might not be happy with the way I've handled the PROM-image hack with +- setting MII mode on bootup. Linux 2.0.35 does not have this problem. +- Behavior of other systems may vary. The 3com documentation specifically +- says that, at least with the card that I have, the device driver in the +- OS should auto-select the media port, so other drivers should work fine +- with this 'hack'. However, if yours doesn't seem to, you can try defining +- CFG_3C90X_PRESERVE_XCVR when building to cause Etherboot to keep the +- working setting (that allowed the bootp/tftp process) across the eth_reset +- operation. +- +- +-IV FOR DEVELOPERS.... +- +- If you would like to fix/extend/etc. this driver, feel free to do so; just +- be sure you can test the modified version on the 3c905B-TX cards that the +- driver was originally designed for. This section of this document gives +- some information that might be relevant to a programmer. +- +- A. Main Entry Point +- +- a3c90x_probe is the main entry point for this driver. It is referred +- to in an array in 'config.c'. +- +- B. Other Important Functions +- +- The functions a3c90x_transmit, a3c90x_poll, a3c90x_reset, and +- a3c90x_disable are static functions that EtherBoot finds out about +- as a result of a3c90x_probe setting entries in the nic structure +- for them. The EtherBoot framework does not use interrupts. It is +- polled. All transmit and receive operations are initiated by the +- etherboot framework, not by an interrupt or by the driver. +- +- C. Internal Functions +- +- The following functions are internal to the driver: +- +- a3c90x_internal_IssueCommand - sends a command to the 3c905b card. +- a3c90x_internal_SetWindow - shifts between one of eight register +- windows onboard the 3c90x. The bottom 16 bytes of the card's +- I/O space are multiplexed among 128 bytes, only 16 of which are +- visible at any one time. This SetWindow function selects one of +- the eight sets. +- a3c90x_internal_ReadEeprom - reads a word (16 bits) from the +- card's onboard nvram. This is NOT the BIOS boot rom. This is +- where the card stores such things as its hardware address. +- a3c90x_internal_WriteEeprom - writes a word (16 bits) to the +- card's nvram, and recomputes the eeprom checksum. +- a3c90x_internal_WriteEepromWord - writes a word (16 bits) to the +- card's nvram. Used by the above routine. +- a3c90x_internal_WriteEepromWord - writes a word (16 bits) to the +- card's nvram. Used by the above routine. +- +- D. Globals +- +- All global variables are inside a global structure named INF_3C90X. +- So, wherever you see that structure referenced, you know the variable +- is a global. Just keeps things a little neater. +- +- E. Enumerations +- +- There are quite a few enumerated type definitions for registers and +- so forth, many for registers that I didn't even touch in the driver. +- Register types start with 'reg', window numbers (for SetWindow) +- start with 'win', and commands (for IssueCommand) start with 'cmd'. +- Register offsets also include an indication in the name as to the +- size of the register (_b = byte, _w = word, _l = long), and which +- window the register is in, if it is windowed (0-7). +- +- F. Why the 'a3c90x' name? +- +- I had to come up with a letter at the beginning of all of the +- identifiers, since 3com so conveniently had their name start with a +- number. Another driver used 't' (for 'three'?); I chose 'a' for +- no reason at all. +- +-Addendum by Jorge L. deLyra , 22Nov2000 re +-working around the 3C905 hardware bug mentioned above: +- +-Use this floppy to fix any 3COM model 3C905B PCI 10/100 Ethernet cards +-that fail to load and run the boot program the first time around. If +-they have a "Lucent" rather than a "Broadcom" chipset these cards have +-a configuration bug that causes a hang when trying to load the boot +-program from the PROM, if you try to use them right out of the box. +- +-The boot program in this floppy is the file named 3c905b-tpo100.rom +-from Etherboot version 4.6.10, compiled with the bugfix parameter +- +- CFG_3C90X_BOOTROM_FIX +- +-You have to take the chip off the card and boot the system once using +-this floppy. Once loaded from the floppy, the boot program will access +-the card and change some setting in it, correcting the problem. After +-that you may use either this boot program or the normal one, compiled +-without this bugfix parameter, to boot the machine from the PROM chip. +- +-[Any recent Etherboot version should do, not just 4.6.10 - Ed.] +Index: b/netboot/Makefile.am +=================================================================== +--- a/netboot/Makefile.am ++++ b/netboot/Makefile.am +@@ -10,58 +10,72 @@ + + noinst_LIBRARIES = $(LIBDRIVERS) + +-libdrivers_a_SOURCES = cards.h config.c etherboot.h \ +- fsys_tftp.c linux-asm-io.h linux-asm-string.h \ +- main.c misc.c nic.h osdep.h pci.c pci.h timer.c timer.h +-EXTRA_libdrivers_a_SOURCES = 3c509.c 3c509.h 3c595.c 3c595.h 3c90x.c \ +- cs89x0.c cs89x0.h davicom.c depca.c eepro.c eepro100.c \ +- epic100.c epic100.h fa311.c i82586.c lance.c natsemi.c \ +- ni5010.c ns8390.c ns8390.h otulip.c otulip.h rtl8139.c \ +- sis900.c sis900.h sk_g16.c sk_g16.h smc9000.c smc9000.h \ +- tiara.c tlan.c tulip.c via-rhine.c w89c840.c ++libdrivers_a_SOURCES = big_bswap.h bootp.h byteswap.h config.c cpu.h \ ++ dev.h elf.h endian.h etherboot.h fsys_tftp.c grub.h \ ++ i386_byteswap.h i386_elf.h i386_endian.h i386_timer.c \ ++ if_arp.h if_ether.h igmp.h in.h io.h ip.h isa.h latch.h \ ++ little_bswap.h misc.c nic.c nic.h osdep.h pci.c pci.h \ ++ pci_ids.h pci_io.c stdint.h tftp.h timer.c timer.h \ ++ types.h udp.h mii.h pic8259.c pic8259.h pxe.h basemem.c segoff.h ++EXTRA_libdrivers_a_SOURCES = 3c595.c 3c595.h 3c90x.c davicom.c \ ++ e1000.c e1000_hw.h eepro100.c epic100.c epic100.h natsemi.c \ ++ ns8390.c ns8390.h pcnet32.c rtl8139.c sis900.c sis900.h \ ++ sundance.c tg3.c tg3.h tlan.c tlan.h tulip.c via-rhine.c \ ++ w89c840.c r8169.c forcedeth.c ns83820.c pnic.c pnic_api.c \ ++ undi.c undi.h + libdrivers_a_CFLAGS = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + -DFSYS_TFTP=1 $(NET_CFLAGS) $(NET_EXTRAFLAGS) + # Filled by configure. + libdrivers_a_LIBADD = @NETBOOT_DRIVERS@ + libdrivers_a_DEPENDENCIES = $(libdrivers_a_LIBADD) + +-EXTRA_DIST = README.netboot 3c90x.txt cs89x0.txt sis900.txt tulip.txt ++EXTRA_DIST = README.netboot + + # These below are several special rules for the device drivers. + # We cannot use a simple rule for them... + + # What objects are derived from a driver? +-3c509_drivers = 3c509.o 3c529.o ++#3c509_drivers = 3c509.o 3c529.o + 3c595_drivers = 3c595.o + 3c90x_drivers = 3c90x.o +-cs89x0_drivers = cs89x0.o ++#cs89x0_drivers = cs89x0.o + davicom_drivers = davicom.o +-depca_drivers = depca.o +-eepro_drivers = eepro.o ++#depca_drivers = depca.o ++#eepro_drivers = eepro.o ++e1000_drivers = e1000.o + eepro100_drivers = eepro100.o + epic100_drivers = epic100.o + #fa311_drivers = fa311.o +-i82586_drivers = 3c507.o exos205.o ni5210.o +-lance_drivers = lance.o ne2100.o ni6510.o ++forcedeth_drivers = forcedeth.o ++#i82586_drivers = 3c507.o exos205.o ni5210.o ++#lance_drivers = lance.o ne2100.o ni6510.o + natsemi_drivers = natsemi.o +-ni5010_drivers = ni5010.o ++#ni5010_drivers = ni5010.o ++ns83820_drivers = ns83820.o + ns8390_drivers = 3c503.o ne.o ns8390.o wd.o +-otulip_drivers = otulip.o ++#otulip_drivers = otulip.o ++pcnet32_drivers = pcnet32.o ++pnic_drivers = pnic.o ++r8169_drivers = r8169.o + rtl8139_drivers = rtl8139.o + sis900_drivers = sis900.o +-sk_g16_drivers = sk_g16.o +-smc9000_drivers = smc9000.o +-tiara_drivers = tiara.o +-#tlan_drivers = tlan.o ++#sk_g16_drivers = sk_g16.o ++sundance_driver = sundance.o ++#smc9000_drivers = smc9000.o ++tg3_drivers = tg3.o ++#tiara_drivers = tiara.o ++tlan_drivers = tlan.o + tulip_drivers = tulip.o ++undi_drivers = undi.o + via_rhine_drivers = via_rhine.o + w89c840_drivers = w89c840.o + ++ + # Is it really necessary to specify dependecies explicitly? +-$(3c509_drivers): 3c509.c 3c509.h +-$(3c509_drivers): %.o: 3c509.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(3c509_drivers): 3c509.c 3c509.h ++#$(3c509_drivers): %.o: 3c509.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + $(3c595_drivers): 3c595.c 3c595.h + $(3c595_drivers): %.o: 3c595.c +@@ -73,23 +87,28 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(cs89x0_drivers): cs89x0.c cs89x0.h +-$(cs89x0_drivers): %.o: cs89x0.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(cs89x0_drivers): cs89x0.c cs89x0.h ++#$(cs89x0_drivers): %.o: cs89x0.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + $(davicom_drivers): davicom.c + $(davicom_drivers): %.o: davicom.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(depca_drivers): depca.c +-$(depca_drivers): %.o: depca.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(depca_drivers): depca.c ++#$(depca_drivers): %.o: depca.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++#$(eepro_drivers): eepro.c ++#$(eepro_drivers): %.o: eepro.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(eepro_drivers): eepro.c +-$(eepro_drivers): %.o: eepro.c ++$(e1000_drivers): e1000.c e1000_hw.h ++$(e1000_drivers): %.o: e1000.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +@@ -103,28 +122,38 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + ++$(forcedeth_drivers): forcedeth.c ++$(forcedeth_drivers): %.o: forcedeth.c ++ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ + #$(fa311_drivers): fa311.c + #$(fa311_drivers): %.o: fa311.c + # $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + # $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(i82586_drivers): i82586.c +-$(i82586_drivers): %.o: i82586.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(i82586_drivers): i82586.c ++#$(i82586_drivers): %.o: i82586.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(lance_drivers): lance.c +-$(lance_drivers): %.o: lance.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(lance_drivers): lance.c ++#$(lance_drivers): %.o: lance.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + $(natsemi_drivers): natsemi.c + $(natsemi_drivers): %.o: natsemi.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(ni5010_drivers): ni5010.c +-$(ni5010_drivers): %.o: ni5010.c ++#$(ni5010_drivers): ni5010.c ++#$(ni5010_drivers): %.o: ni5010.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(ns83820_drivers): ns83820.c ++$(ns83820_drivers): %.o: ns83820.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +@@ -133,8 +162,18 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(otulip_drivers): otulip.c otulip.h +-$(otulip_drivers): %.o: otulip.c ++#$(otulip_drivers): otulip.c otulip.h ++#$(otulip_drivers): %.o: otulip.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(pcnet32_drivers): pcnet32.c ++$(pcnet32_drivers): %.o: pcnet32.c ++ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(pnic_drivers): pnic.c ++$(pnic_drivers): %.o: pnic.c pnic_api.h + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +@@ -143,36 +182,56 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(sis900_drivers): sis900.c +-$(sis900_drivers): %.o: sis900.c sis900.h ++$(r8169_drivers): r8169.c ++$(r8169_drivers): %.o: r8169.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(sk_g16_drivers): sk_g16.c sk_g16.h +-$(sk_g16_drivers): %.o: sk_g16.c ++$(sis900_drivers): sis900.c sis900.h ++$(sis900_drivers): %.o: sis900.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(smc9000_drivers): smc9000.c smc9000.h +-$(smc9000_drivers): %.o: smc9000.c ++#$(sk_g16_drivers): sk_g16.c sk_g16.h ++#$(sk_g16_drivers): %.o: sk_g16.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++#$(smc9000_drivers): smc9000.c smc9000.h ++#$(smc9000_drivers): %.o: smc9000.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(sundance_drivers): sundance.c ++$(sundance_drivers): %.o: sundance.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(tiara_drivers): tiara.c +-$(tiara_drivers): %.o: tiara.c ++$(tg3_drivers): tg3.c tg3.h ++$(tg3_drivers): %.o: tg3.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-#$(tlan_drivers): tlan.c +-#$(tlan_drivers): %.o: tlan.c ++#$(tiara_drivers): tiara.c ++#$(tiara_drivers): %.o: tiara.c + # $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + # $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + ++$(tlan_drivers): tlan.c tlan.h ++$(tlan_drivers): %.o: tlan.c ++ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ + $(tulip_drivers): tulip.c + $(tulip_drivers): %.o: tulip.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + ++$(undi_drivers): undi.c undi.h ++$(undi_drivers): %.o: undi.c ++ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ + $(via_rhine_drivers): via-rhine.c + $(via_rhine_drivers): %.o: via-rhine.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +@@ -184,36 +243,45 @@ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + # Per-object flags. +-3c509_o_CFLAGS = -DINCLUDE_3C509=1 +-3c529_o_CFLAGS = -DINCLUDE_3C529=1 ++#3c509_o_CFLAGS = -DINCLUDE_3C509=1 ++#3c529_o_CFLAGS = -DINCLUDE_3C529=1 + 3c595_o_CFLAGS = -DINCLUDE_3C595=1 + 3c90x_o_CFLAGS = -DINCLUDE_3C90X=1 +-cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1 ++#cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1 + davicom_o_CFLAGS = -DINCLUDE_DAVICOM=1 +-depca_o_CFLAGS = -DINCLUDE_DEPCA=1 +-eepro_o_CFLAGS = -DINCLUDE_EEPRO=1 ++#depca_o_CFLAGS = -DINCLUDE_DEPCA=1 ++#eepro_o_CFLAGS = -DINCLUDE_EEPRO=1 ++e1000_o_CFLAGS = -DINCLUDE_E1000=1 + eepro100_o_CFLAGS = -DINCLUDE_EEPRO100=1 + epic100_o_CFLAGS = -DINCLUDE_EPIC100=1 + #fa311_o_CFLAGS = -DINCLUDE_FA311=1 +-3c507_o_CFLAGS = -DINCLUDE_3C507=1 +-exos205_o_CFLAGS = -DINCLUDE_EXOS205=1 +-ni5210_o_CFLAGS = -DINCLUDE_NI5210=1 +-lance_o_CFLAGS = -DINCLUDE_LANCE=1 +-ne2100_o_CFLAGS = -DINCLUDE_NE2100=1 +-ni6510_o_CFLAGS = -DINCLUDE_NI6510=1 ++forcedeth_o_CFLAGS = -DINCLUDE_FORCEDETH=1 ++#3c507_o_CFLAGS = -DINCLUDE_3C507=1 ++#exos205_o_CFLAGS = -DINCLUDE_EXOS205=1 ++#ni5210_o_CFLAGS = -DINCLUDE_NI5210=1 ++#lance_o_CFLAGS = -DINCLUDE_LANCE=1 ++#ne2100_o_CFLAGS = -DINCLUDE_NE2100=1 ++#ni6510_o_CFLAGS = -DINCLUDE_NI6510=1 + natsemi_o_CFLAGS = -DINCLUDE_NATSEMI=1 +-ni5010_o_CFLAGS = -DINCLUDE_NI5010=1 +-3c503_o_CFLAGS = -DINCLUDE_3C503=1 +-ne_o_CFLAGS = -DINCLUDE_NE=1 ++#ni5010_o_CFLAGS = -DINCLUDE_NI5010=1 ++#3c503_o_CFLAGS = -DINCLUDE_3C503=1 ++#ne_o_CFLAGS = -DINCLUDE_NE=1 ++ns83820_o_CFLAGS = -DINCLUDE_NS83820=1 + ns8390_o_CFLAGS = -DINCLUDE_NS8390=1 +-wd_o_CFLAGS = -DINCLUDE_WD=1 +-otulip_o_CFLAGS = -DINCLUDE_OTULIP=1 ++#wd_o_CFLAGS = -DINCLUDE_WD=1 ++#otulip_o_CFLAGS = -DINCLUDE_OTULIP=1 ++pcnet32_o_CFLAGS = -DINCLUDE_PCNET32=1 ++pnic_o_CFLAGS = -DINCLUDE_PNIC=1 ++r8169_o_CFLAGS = -DINCLUDE_R8169=1 + rtl8139_o_CFLAGS = -DINCLUDE_RTL8139=1 + sis900_o_CFLAGS = -DINCLUDE_SIS900=1 +-sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1 +-smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1 +-tiara_o_CFLAGS = -DINCLUDE_TIARA=1 +-#tlan_o_CFLAGS = -DINCLUDE_TLAN=1 ++#sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1 ++#smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1 ++sundance_o_CFLAGS = -DINCLUDE_SUNDANCE=1 ++#tiara_o_CFLAGS = -DINCLUDE_TIARA=1 ++tg3_o_CFLAGS = -DINCLUDE_TG3=1 ++tlan_o_CFLAGS = -DINCLUDE_TLAN=1 + tulip_o_CFLAGS = -DINCLUDE_TULIP=1 ++undi_o_CFLAGS = -DINCLUDE_UNDI=1 + via_rhine_o_CFLAGS = -DINCLUDE_VIA_RHINE=1 + w89c840_o_CFLAGS = -DINCLUDE_W89C840=1 +Index: b/netboot/Makefile.in +=================================================================== +--- a/netboot/Makefile.in ++++ b/netboot/Makefile.in +@@ -46,18 +46,51 @@ + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_HEADER = $(top_builddir)/config.h + CONFIG_CLEAN_FILES = +-LIBRARIES = $(noinst_LIBRARIES) + AR = ar + ARFLAGS = cru ++LIBRARIES = $(noinst_LIBRARIES) + libdrivers_a_AR = $(AR) $(ARFLAGS) + am_libdrivers_a_OBJECTS = libdrivers_a-config.$(OBJEXT) \ +- libdrivers_a-fsys_tftp.$(OBJEXT) libdrivers_a-main.$(OBJEXT) \ +- libdrivers_a-misc.$(OBJEXT) libdrivers_a-pci.$(OBJEXT) \ +- libdrivers_a-timer.$(OBJEXT) ++ libdrivers_a-fsys_tftp.$(OBJEXT) \ ++ libdrivers_a-i386_timer.$(OBJEXT) libdrivers_a-misc.$(OBJEXT) \ ++ libdrivers_a-nic.$(OBJEXT) libdrivers_a-pci.$(OBJEXT) \ ++ libdrivers_a-pci_io.$(OBJEXT) libdrivers_a-timer.$(OBJEXT) \ ++ libdrivers_a-pic8259.$(OBJEXT) libdrivers_a-basemem.$(OBJEXT) + libdrivers_a_OBJECTS = $(am_libdrivers_a_OBJECTS) + DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) + depcomp = $(SHELL) $(top_srcdir)/depcomp + am__depfiles_maybe = depfiles ++@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/libdrivers_a-3c595.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-3c90x.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-basemem.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-config.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-davicom.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-e1000.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-eepro100.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-epic100.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-forcedeth.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-fsys_tftp.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-i386_timer.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-misc.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-natsemi.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-nic.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-ns83820.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-ns8390.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pci.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pci_io.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pcnet32.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pic8259.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pnic.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-pnic_api.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-r8169.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-rtl8139.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-sis900.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-tg3.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-timer.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-tlan.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-tulip.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-via-rhine.Po \ ++@AMDEP_TRUE@ ./$(DEPDIR)/libdrivers_a-w89c840.Po + COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) +@@ -148,8 +181,6 @@ + am__include = @am__include@ + am__leading_dot = @am__leading_dot@ + am__quote = @am__quote@ +-am__tar = @am__tar@ +-am__untar = @am__untar@ + bindir = @bindir@ + build = @build@ + build_alias = @build_alias@ +@@ -186,16 +217,19 @@ + # Don't build the netboot support by default. + @NETBOOT_SUPPORT_TRUE@LIBDRIVERS = libdrivers.a + noinst_LIBRARIES = $(LIBDRIVERS) +-libdrivers_a_SOURCES = cards.h config.c etherboot.h \ +- fsys_tftp.c linux-asm-io.h linux-asm-string.h \ +- main.c misc.c nic.h osdep.h pci.c pci.h timer.c timer.h +- +-EXTRA_libdrivers_a_SOURCES = 3c509.c 3c509.h 3c595.c 3c595.h 3c90x.c \ +- cs89x0.c cs89x0.h davicom.c depca.c eepro.c eepro100.c \ +- epic100.c epic100.h fa311.c i82586.c lance.c natsemi.c \ +- ni5010.c ns8390.c ns8390.h otulip.c otulip.h rtl8139.c \ +- sis900.c sis900.h sk_g16.c sk_g16.h smc9000.c smc9000.h \ +- tiara.c tlan.c tulip.c via-rhine.c w89c840.c ++libdrivers_a_SOURCES = big_bswap.h bootp.h byteswap.h config.c cpu.h \ ++ dev.h elf.h endian.h etherboot.h fsys_tftp.c grub.h \ ++ i386_byteswap.h i386_elf.h i386_endian.h i386_timer.c \ ++ if_arp.h if_ether.h igmp.h in.h io.h ip.h isa.h latch.h \ ++ little_bswap.h misc.c nic.c nic.h osdep.h pci.c pci.h \ ++ pci_ids.h pci_io.c stdint.h tftp.h timer.c timer.h \ ++ types.h udp.h mii.h pic8259.c pic8259.h pxe.h basemem.c segoff.h ++ ++EXTRA_libdrivers_a_SOURCES = 3c595.c 3c595.h 3c90x.c davicom.c \ ++ e1000.c e1000_hw.h eepro100.c epic100.c epic100.h natsemi.c \ ++ ns8390.c ns8390.h pcnet32.c rtl8139.c sis900.c sis900.h \ ++ tg3.c tg3.h tlan.c tlan.h tulip.c via-rhine.c \ ++ w89c840.c r8169.c forcedeth.c ns83820.c pnic.c pnic_api.c + + libdrivers_a_CFLAGS = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + -DFSYS_TFTP=1 $(NET_CFLAGS) $(NET_EXTRAFLAGS) +@@ -203,69 +237,83 @@ + # Filled by configure. + libdrivers_a_LIBADD = @NETBOOT_DRIVERS@ + libdrivers_a_DEPENDENCIES = $(libdrivers_a_LIBADD) +-EXTRA_DIST = README.netboot 3c90x.txt cs89x0.txt sis900.txt tulip.txt ++EXTRA_DIST = README.netboot + + # These below are several special rules for the device drivers. + # We cannot use a simple rule for them... + + # What objects are derived from a driver? +-3c509_drivers = 3c509.o 3c529.o ++#3c509_drivers = 3c509.o 3c529.o + 3c595_drivers = 3c595.o + 3c90x_drivers = 3c90x.o +-cs89x0_drivers = cs89x0.o ++#cs89x0_drivers = cs89x0.o + davicom_drivers = davicom.o +-depca_drivers = depca.o +-eepro_drivers = eepro.o ++#depca_drivers = depca.o ++#eepro_drivers = eepro.o ++e1000_drivers = e1000.o + eepro100_drivers = eepro100.o + epic100_drivers = epic100.o + #fa311_drivers = fa311.o +-i82586_drivers = 3c507.o exos205.o ni5210.o +-lance_drivers = lance.o ne2100.o ni6510.o ++forcedeth_drivers = forcedeth.o ++#i82586_drivers = 3c507.o exos205.o ni5210.o ++#lance_drivers = lance.o ne2100.o ni6510.o + natsemi_drivers = natsemi.o +-ni5010_drivers = ni5010.o ++#ni5010_drivers = ni5010.o ++ns83820_drivers = ns83820.o + ns8390_drivers = 3c503.o ne.o ns8390.o wd.o +-otulip_drivers = otulip.o ++#otulip_drivers = otulip.o ++pcnet32_drivers = pcnet32.o ++pnic_drivers = pnic.o ++r8169_drivers = r8169.o + rtl8139_drivers = rtl8139.o + sis900_drivers = sis900.o +-sk_g16_drivers = sk_g16.o +-smc9000_drivers = smc9000.o +-tiara_drivers = tiara.o +-#tlan_drivers = tlan.o ++#sk_g16_drivers = sk_g16.o ++#smc9000_drivers = smc9000.o ++tg3_drivers = tg3.o ++#tiara_drivers = tiara.o ++tlan_drivers = tlan.o + tulip_drivers = tulip.o + via_rhine_drivers = via_rhine.o + w89c840_drivers = w89c840.o + + # Per-object flags. +-3c509_o_CFLAGS = -DINCLUDE_3C509=1 +-3c529_o_CFLAGS = -DINCLUDE_3C529=1 ++#3c509_o_CFLAGS = -DINCLUDE_3C509=1 ++#3c529_o_CFLAGS = -DINCLUDE_3C529=1 + 3c595_o_CFLAGS = -DINCLUDE_3C595=1 + 3c90x_o_CFLAGS = -DINCLUDE_3C90X=1 +-cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1 ++#cs89x0_o_CFLAGS = -DINCLUDE_CS89X0=1 + davicom_o_CFLAGS = -DINCLUDE_DAVICOM=1 +-depca_o_CFLAGS = -DINCLUDE_DEPCA=1 +-eepro_o_CFLAGS = -DINCLUDE_EEPRO=1 ++#depca_o_CFLAGS = -DINCLUDE_DEPCA=1 ++#eepro_o_CFLAGS = -DINCLUDE_EEPRO=1 ++e1000_o_CFLAGS = -DINCLUDE_E1000=1 + eepro100_o_CFLAGS = -DINCLUDE_EEPRO100=1 + epic100_o_CFLAGS = -DINCLUDE_EPIC100=1 + #fa311_o_CFLAGS = -DINCLUDE_FA311=1 +-3c507_o_CFLAGS = -DINCLUDE_3C507=1 +-exos205_o_CFLAGS = -DINCLUDE_EXOS205=1 +-ni5210_o_CFLAGS = -DINCLUDE_NI5210=1 +-lance_o_CFLAGS = -DINCLUDE_LANCE=1 +-ne2100_o_CFLAGS = -DINCLUDE_NE2100=1 +-ni6510_o_CFLAGS = -DINCLUDE_NI6510=1 ++forcedeth_o_CFLAGS = -DINCLUDE_FORCEDETH=1 ++#3c507_o_CFLAGS = -DINCLUDE_3C507=1 ++#exos205_o_CFLAGS = -DINCLUDE_EXOS205=1 ++#ni5210_o_CFLAGS = -DINCLUDE_NI5210=1 ++#lance_o_CFLAGS = -DINCLUDE_LANCE=1 ++#ne2100_o_CFLAGS = -DINCLUDE_NE2100=1 ++#ni6510_o_CFLAGS = -DINCLUDE_NI6510=1 + natsemi_o_CFLAGS = -DINCLUDE_NATSEMI=1 +-ni5010_o_CFLAGS = -DINCLUDE_NI5010=1 +-3c503_o_CFLAGS = -DINCLUDE_3C503=1 +-ne_o_CFLAGS = -DINCLUDE_NE=1 ++#ni5010_o_CFLAGS = -DINCLUDE_NI5010=1 ++#3c503_o_CFLAGS = -DINCLUDE_3C503=1 ++#ne_o_CFLAGS = -DINCLUDE_NE=1 ++ns83820_o_CFLAGS = -DINCLUDE_NS83820=1 + ns8390_o_CFLAGS = -DINCLUDE_NS8390=1 +-wd_o_CFLAGS = -DINCLUDE_WD=1 +-otulip_o_CFLAGS = -DINCLUDE_OTULIP=1 ++#wd_o_CFLAGS = -DINCLUDE_WD=1 ++#otulip_o_CFLAGS = -DINCLUDE_OTULIP=1 ++pcnet32_o_CFLAGS = -DINCLUDE_PCNET32=1 ++pnic_o_CFLAGS = -DINCLUDE_PNIC=1 ++r8169_o_CFLAGS = -DINCLUDE_R8169=1 + rtl8139_o_CFLAGS = -DINCLUDE_RTL8139=1 + sis900_o_CFLAGS = -DINCLUDE_SIS900=1 +-sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1 +-smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1 +-tiara_o_CFLAGS = -DINCLUDE_TIARA=1 +-#tlan_o_CFLAGS = -DINCLUDE_TLAN=1 ++#sk_g16_o_CFLAGS = -DINCLUDE_SK_G16=1 ++#smc9000_o_CFLAGS = -DINCLUDE_SMC9000=1 ++#tiara_o_CFLAGS = -DINCLUDE_TIARA=1 ++tg3_o_CFLAGS = -DINCLUDE_TG3=1 ++tlan_o_CFLAGS = -DINCLUDE_TLAN=1 + tulip_o_CFLAGS = -DINCLUDE_TULIP=1 + via_rhine_o_CFLAGS = -DINCLUDE_VIA_RHINE=1 + w89c840_o_CFLAGS = -DINCLUDE_W89C840=1 +@@ -316,32 +364,32 @@ + distclean-compile: + -rm -f *.tab.c + +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-3c509.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-3c595.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-3c90x.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-basemem.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-config.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-cs89x0.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-davicom.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-depca.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-eepro.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-e1000.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-eepro100.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-epic100.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-fa311.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-forcedeth.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-fsys_tftp.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-i82586.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-lance.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-main.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-i386_timer.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-misc.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-natsemi.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-ni5010.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-nic.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-ns83820.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-ns8390.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-otulip.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pci.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pci_io.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pcnet32.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pic8259.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pnic.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-pnic_api.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-r8169.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-rtl8139.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-sis900.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-sk_g16.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-smc9000.Po@am__quote@ +-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-tiara.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-tg3.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-timer.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-tlan.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdrivers_a-tulip.Po@am__quote@ +@@ -352,450 +400,513 @@ + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(COMPILE) -c $< + + .c.obj: + @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + + libdrivers_a-config.o: config.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-config.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-config.Tpo" -c -o libdrivers_a-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-config.Tpo" "$(DEPDIR)/libdrivers_a-config.Po"; else rm -f "$(DEPDIR)/libdrivers_a-config.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config.c' object='libdrivers_a-config.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-config.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-config.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-config.o `test -f 'config.c' || echo '$(srcdir)/'`config.c + + libdrivers_a-config.obj: config.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-config.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-config.Tpo" -c -o libdrivers_a-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-config.Tpo" "$(DEPDIR)/libdrivers_a-config.Po"; else rm -f "$(DEPDIR)/libdrivers_a-config.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='config.c' object='libdrivers_a-config.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-config.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-config.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-config.obj `if test -f 'config.c'; then $(CYGPATH_W) 'config.c'; else $(CYGPATH_W) '$(srcdir)/config.c'; fi` + + libdrivers_a-fsys_tftp.o: fsys_tftp.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-fsys_tftp.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo" -c -o libdrivers_a-fsys_tftp.o `test -f 'fsys_tftp.c' || echo '$(srcdir)/'`fsys_tftp.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo" "$(DEPDIR)/libdrivers_a-fsys_tftp.Po"; else rm -f "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fsys_tftp.c' object='libdrivers_a-fsys_tftp.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-fsys_tftp.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-fsys_tftp.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-fsys_tftp.o `test -f 'fsys_tftp.c' || echo '$(srcdir)/'`fsys_tftp.c + + libdrivers_a-fsys_tftp.obj: fsys_tftp.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-fsys_tftp.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo" -c -o libdrivers_a-fsys_tftp.obj `if test -f 'fsys_tftp.c'; then $(CYGPATH_W) 'fsys_tftp.c'; else $(CYGPATH_W) '$(srcdir)/fsys_tftp.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo" "$(DEPDIR)/libdrivers_a-fsys_tftp.Po"; else rm -f "$(DEPDIR)/libdrivers_a-fsys_tftp.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fsys_tftp.c' object='libdrivers_a-fsys_tftp.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-fsys_tftp.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-fsys_tftp.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-fsys_tftp.obj `if test -f 'fsys_tftp.c'; then $(CYGPATH_W) 'fsys_tftp.c'; else $(CYGPATH_W) '$(srcdir)/fsys_tftp.c'; fi` + +-libdrivers_a-main.o: main.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-main.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-main.Tpo" -c -o libdrivers_a-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-main.Tpo" "$(DEPDIR)/libdrivers_a-main.Po"; else rm -f "$(DEPDIR)/libdrivers_a-main.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='libdrivers_a-main.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c +- +-libdrivers_a-main.obj: main.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-main.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-main.Tpo" -c -o libdrivers_a-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-main.Tpo" "$(DEPDIR)/libdrivers_a-main.Po"; else rm -f "$(DEPDIR)/libdrivers_a-main.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='libdrivers_a-main.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` ++libdrivers_a-i386_timer.o: i386_timer.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-i386_timer.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-i386_timer.Tpo" -c -o libdrivers_a-i386_timer.o `test -f 'i386_timer.c' || echo '$(srcdir)/'`i386_timer.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-i386_timer.Tpo" "$(DEPDIR)/libdrivers_a-i386_timer.Po"; else rm -f "$(DEPDIR)/libdrivers_a-i386_timer.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i386_timer.c' object='libdrivers_a-i386_timer.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-i386_timer.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-i386_timer.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-i386_timer.o `test -f 'i386_timer.c' || echo '$(srcdir)/'`i386_timer.c ++ ++libdrivers_a-i386_timer.obj: i386_timer.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-i386_timer.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-i386_timer.Tpo" -c -o libdrivers_a-i386_timer.obj `if test -f 'i386_timer.c'; then $(CYGPATH_W) 'i386_timer.c'; else $(CYGPATH_W) '$(srcdir)/i386_timer.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-i386_timer.Tpo" "$(DEPDIR)/libdrivers_a-i386_timer.Po"; else rm -f "$(DEPDIR)/libdrivers_a-i386_timer.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i386_timer.c' object='libdrivers_a-i386_timer.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-i386_timer.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-i386_timer.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-i386_timer.obj `if test -f 'i386_timer.c'; then $(CYGPATH_W) 'i386_timer.c'; else $(CYGPATH_W) '$(srcdir)/i386_timer.c'; fi` + + libdrivers_a-misc.o: misc.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-misc.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-misc.Tpo" -c -o libdrivers_a-misc.o `test -f 'misc.c' || echo '$(srcdir)/'`misc.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-misc.Tpo" "$(DEPDIR)/libdrivers_a-misc.Po"; else rm -f "$(DEPDIR)/libdrivers_a-misc.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='misc.c' object='libdrivers_a-misc.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-misc.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-misc.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-misc.o `test -f 'misc.c' || echo '$(srcdir)/'`misc.c + + libdrivers_a-misc.obj: misc.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-misc.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-misc.Tpo" -c -o libdrivers_a-misc.obj `if test -f 'misc.c'; then $(CYGPATH_W) 'misc.c'; else $(CYGPATH_W) '$(srcdir)/misc.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-misc.Tpo" "$(DEPDIR)/libdrivers_a-misc.Po"; else rm -f "$(DEPDIR)/libdrivers_a-misc.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='misc.c' object='libdrivers_a-misc.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-misc.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-misc.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-misc.obj `if test -f 'misc.c'; then $(CYGPATH_W) 'misc.c'; else $(CYGPATH_W) '$(srcdir)/misc.c'; fi` + ++libdrivers_a-nic.o: nic.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-nic.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-nic.Tpo" -c -o libdrivers_a-nic.o `test -f 'nic.c' || echo '$(srcdir)/'`nic.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-nic.Tpo" "$(DEPDIR)/libdrivers_a-nic.Po"; else rm -f "$(DEPDIR)/libdrivers_a-nic.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nic.c' object='libdrivers_a-nic.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-nic.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-nic.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-nic.o `test -f 'nic.c' || echo '$(srcdir)/'`nic.c ++ ++libdrivers_a-nic.obj: nic.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-nic.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-nic.Tpo" -c -o libdrivers_a-nic.obj `if test -f 'nic.c'; then $(CYGPATH_W) 'nic.c'; else $(CYGPATH_W) '$(srcdir)/nic.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-nic.Tpo" "$(DEPDIR)/libdrivers_a-nic.Po"; else rm -f "$(DEPDIR)/libdrivers_a-nic.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='nic.c' object='libdrivers_a-nic.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-nic.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-nic.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-nic.obj `if test -f 'nic.c'; then $(CYGPATH_W) 'nic.c'; else $(CYGPATH_W) '$(srcdir)/nic.c'; fi` ++ + libdrivers_a-pci.o: pci.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pci.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pci.Tpo" -c -o libdrivers_a-pci.o `test -f 'pci.c' || echo '$(srcdir)/'`pci.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pci.Tpo" "$(DEPDIR)/libdrivers_a-pci.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pci.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pci.c' object='libdrivers_a-pci.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pci.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pci.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pci.o `test -f 'pci.c' || echo '$(srcdir)/'`pci.c + + libdrivers_a-pci.obj: pci.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pci.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pci.Tpo" -c -o libdrivers_a-pci.obj `if test -f 'pci.c'; then $(CYGPATH_W) 'pci.c'; else $(CYGPATH_W) '$(srcdir)/pci.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pci.Tpo" "$(DEPDIR)/libdrivers_a-pci.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pci.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pci.c' object='libdrivers_a-pci.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pci.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pci.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pci.obj `if test -f 'pci.c'; then $(CYGPATH_W) 'pci.c'; else $(CYGPATH_W) '$(srcdir)/pci.c'; fi` + ++libdrivers_a-pci_io.o: pci_io.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pci_io.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pci_io.Tpo" -c -o libdrivers_a-pci_io.o `test -f 'pci_io.c' || echo '$(srcdir)/'`pci_io.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pci_io.Tpo" "$(DEPDIR)/libdrivers_a-pci_io.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pci_io.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pci_io.c' object='libdrivers_a-pci_io.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pci_io.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pci_io.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pci_io.o `test -f 'pci_io.c' || echo '$(srcdir)/'`pci_io.c ++ ++libdrivers_a-pci_io.obj: pci_io.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pci_io.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pci_io.Tpo" -c -o libdrivers_a-pci_io.obj `if test -f 'pci_io.c'; then $(CYGPATH_W) 'pci_io.c'; else $(CYGPATH_W) '$(srcdir)/pci_io.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pci_io.Tpo" "$(DEPDIR)/libdrivers_a-pci_io.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pci_io.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pci_io.c' object='libdrivers_a-pci_io.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pci_io.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pci_io.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pci_io.obj `if test -f 'pci_io.c'; then $(CYGPATH_W) 'pci_io.c'; else $(CYGPATH_W) '$(srcdir)/pci_io.c'; fi` ++ + libdrivers_a-timer.o: timer.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-timer.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-timer.Tpo" -c -o libdrivers_a-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-timer.Tpo" "$(DEPDIR)/libdrivers_a-timer.Po"; else rm -f "$(DEPDIR)/libdrivers_a-timer.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timer.c' object='libdrivers_a-timer.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-timer.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-timer.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-timer.o `test -f 'timer.c' || echo '$(srcdir)/'`timer.c + + libdrivers_a-timer.obj: timer.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-timer.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-timer.Tpo" -c -o libdrivers_a-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-timer.Tpo" "$(DEPDIR)/libdrivers_a-timer.Po"; else rm -f "$(DEPDIR)/libdrivers_a-timer.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='timer.c' object='libdrivers_a-timer.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-timer.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-timer.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-timer.obj `if test -f 'timer.c'; then $(CYGPATH_W) 'timer.c'; else $(CYGPATH_W) '$(srcdir)/timer.c'; fi` + +-libdrivers_a-3c509.o: 3c509.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c509.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c509.Tpo" -c -o libdrivers_a-3c509.o `test -f '3c509.c' || echo '$(srcdir)/'`3c509.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c509.Tpo" "$(DEPDIR)/libdrivers_a-3c509.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c509.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c509.c' object='libdrivers_a-3c509.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c509.o `test -f '3c509.c' || echo '$(srcdir)/'`3c509.c +- +-libdrivers_a-3c509.obj: 3c509.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c509.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c509.Tpo" -c -o libdrivers_a-3c509.obj `if test -f '3c509.c'; then $(CYGPATH_W) '3c509.c'; else $(CYGPATH_W) '$(srcdir)/3c509.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c509.Tpo" "$(DEPDIR)/libdrivers_a-3c509.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c509.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c509.c' object='libdrivers_a-3c509.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c509.obj `if test -f '3c509.c'; then $(CYGPATH_W) '3c509.c'; else $(CYGPATH_W) '$(srcdir)/3c509.c'; fi` ++libdrivers_a-pic8259.o: pic8259.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pic8259.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pic8259.Tpo" -c -o libdrivers_a-pic8259.o `test -f 'pic8259.c' || echo '$(srcdir)/'`pic8259.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pic8259.Tpo" "$(DEPDIR)/libdrivers_a-pic8259.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pic8259.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pic8259.c' object='libdrivers_a-pic8259.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pic8259.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pic8259.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pic8259.o `test -f 'pic8259.c' || echo '$(srcdir)/'`pic8259.c ++ ++libdrivers_a-pic8259.obj: pic8259.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pic8259.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pic8259.Tpo" -c -o libdrivers_a-pic8259.obj `if test -f 'pic8259.c'; then $(CYGPATH_W) 'pic8259.c'; else $(CYGPATH_W) '$(srcdir)/pic8259.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pic8259.Tpo" "$(DEPDIR)/libdrivers_a-pic8259.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pic8259.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pic8259.c' object='libdrivers_a-pic8259.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pic8259.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pic8259.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pic8259.obj `if test -f 'pic8259.c'; then $(CYGPATH_W) 'pic8259.c'; else $(CYGPATH_W) '$(srcdir)/pic8259.c'; fi` ++ ++libdrivers_a-basemem.o: basemem.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-basemem.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-basemem.Tpo" -c -o libdrivers_a-basemem.o `test -f 'basemem.c' || echo '$(srcdir)/'`basemem.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-basemem.Tpo" "$(DEPDIR)/libdrivers_a-basemem.Po"; else rm -f "$(DEPDIR)/libdrivers_a-basemem.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='basemem.c' object='libdrivers_a-basemem.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-basemem.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-basemem.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-basemem.o `test -f 'basemem.c' || echo '$(srcdir)/'`basemem.c ++ ++libdrivers_a-basemem.obj: basemem.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-basemem.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-basemem.Tpo" -c -o libdrivers_a-basemem.obj `if test -f 'basemem.c'; then $(CYGPATH_W) 'basemem.c'; else $(CYGPATH_W) '$(srcdir)/basemem.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-basemem.Tpo" "$(DEPDIR)/libdrivers_a-basemem.Po"; else rm -f "$(DEPDIR)/libdrivers_a-basemem.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='basemem.c' object='libdrivers_a-basemem.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-basemem.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-basemem.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-basemem.obj `if test -f 'basemem.c'; then $(CYGPATH_W) 'basemem.c'; else $(CYGPATH_W) '$(srcdir)/basemem.c'; fi` + + libdrivers_a-3c595.o: 3c595.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c595.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c595.Tpo" -c -o libdrivers_a-3c595.o `test -f '3c595.c' || echo '$(srcdir)/'`3c595.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c595.Tpo" "$(DEPDIR)/libdrivers_a-3c595.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c595.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c595.c' object='libdrivers_a-3c595.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-3c595.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-3c595.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c595.o `test -f '3c595.c' || echo '$(srcdir)/'`3c595.c + + libdrivers_a-3c595.obj: 3c595.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c595.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c595.Tpo" -c -o libdrivers_a-3c595.obj `if test -f '3c595.c'; then $(CYGPATH_W) '3c595.c'; else $(CYGPATH_W) '$(srcdir)/3c595.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c595.Tpo" "$(DEPDIR)/libdrivers_a-3c595.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c595.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c595.c' object='libdrivers_a-3c595.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-3c595.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-3c595.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c595.obj `if test -f '3c595.c'; then $(CYGPATH_W) '3c595.c'; else $(CYGPATH_W) '$(srcdir)/3c595.c'; fi` + + libdrivers_a-3c90x.o: 3c90x.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c90x.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c90x.Tpo" -c -o libdrivers_a-3c90x.o `test -f '3c90x.c' || echo '$(srcdir)/'`3c90x.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c90x.Tpo" "$(DEPDIR)/libdrivers_a-3c90x.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c90x.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c90x.c' object='libdrivers_a-3c90x.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-3c90x.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-3c90x.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c90x.o `test -f '3c90x.c' || echo '$(srcdir)/'`3c90x.c + + libdrivers_a-3c90x.obj: 3c90x.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-3c90x.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-3c90x.Tpo" -c -o libdrivers_a-3c90x.obj `if test -f '3c90x.c'; then $(CYGPATH_W) '3c90x.c'; else $(CYGPATH_W) '$(srcdir)/3c90x.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-3c90x.Tpo" "$(DEPDIR)/libdrivers_a-3c90x.Po"; else rm -f "$(DEPDIR)/libdrivers_a-3c90x.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='3c90x.c' object='libdrivers_a-3c90x.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-3c90x.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-3c90x.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-3c90x.obj `if test -f '3c90x.c'; then $(CYGPATH_W) '3c90x.c'; else $(CYGPATH_W) '$(srcdir)/3c90x.c'; fi` + +-libdrivers_a-cs89x0.o: cs89x0.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-cs89x0.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-cs89x0.Tpo" -c -o libdrivers_a-cs89x0.o `test -f 'cs89x0.c' || echo '$(srcdir)/'`cs89x0.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-cs89x0.Tpo" "$(DEPDIR)/libdrivers_a-cs89x0.Po"; else rm -f "$(DEPDIR)/libdrivers_a-cs89x0.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cs89x0.c' object='libdrivers_a-cs89x0.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-cs89x0.o `test -f 'cs89x0.c' || echo '$(srcdir)/'`cs89x0.c +- +-libdrivers_a-cs89x0.obj: cs89x0.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-cs89x0.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-cs89x0.Tpo" -c -o libdrivers_a-cs89x0.obj `if test -f 'cs89x0.c'; then $(CYGPATH_W) 'cs89x0.c'; else $(CYGPATH_W) '$(srcdir)/cs89x0.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-cs89x0.Tpo" "$(DEPDIR)/libdrivers_a-cs89x0.Po"; else rm -f "$(DEPDIR)/libdrivers_a-cs89x0.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='cs89x0.c' object='libdrivers_a-cs89x0.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-cs89x0.obj `if test -f 'cs89x0.c'; then $(CYGPATH_W) 'cs89x0.c'; else $(CYGPATH_W) '$(srcdir)/cs89x0.c'; fi` +- + libdrivers_a-davicom.o: davicom.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-davicom.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-davicom.Tpo" -c -o libdrivers_a-davicom.o `test -f 'davicom.c' || echo '$(srcdir)/'`davicom.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-davicom.Tpo" "$(DEPDIR)/libdrivers_a-davicom.Po"; else rm -f "$(DEPDIR)/libdrivers_a-davicom.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='davicom.c' object='libdrivers_a-davicom.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-davicom.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-davicom.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-davicom.o `test -f 'davicom.c' || echo '$(srcdir)/'`davicom.c + + libdrivers_a-davicom.obj: davicom.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-davicom.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-davicom.Tpo" -c -o libdrivers_a-davicom.obj `if test -f 'davicom.c'; then $(CYGPATH_W) 'davicom.c'; else $(CYGPATH_W) '$(srcdir)/davicom.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-davicom.Tpo" "$(DEPDIR)/libdrivers_a-davicom.Po"; else rm -f "$(DEPDIR)/libdrivers_a-davicom.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='davicom.c' object='libdrivers_a-davicom.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-davicom.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-davicom.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-davicom.obj `if test -f 'davicom.c'; then $(CYGPATH_W) 'davicom.c'; else $(CYGPATH_W) '$(srcdir)/davicom.c'; fi` + +-libdrivers_a-depca.o: depca.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-depca.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-depca.Tpo" -c -o libdrivers_a-depca.o `test -f 'depca.c' || echo '$(srcdir)/'`depca.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-depca.Tpo" "$(DEPDIR)/libdrivers_a-depca.Po"; else rm -f "$(DEPDIR)/libdrivers_a-depca.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='depca.c' object='libdrivers_a-depca.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-depca.o `test -f 'depca.c' || echo '$(srcdir)/'`depca.c +- +-libdrivers_a-depca.obj: depca.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-depca.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-depca.Tpo" -c -o libdrivers_a-depca.obj `if test -f 'depca.c'; then $(CYGPATH_W) 'depca.c'; else $(CYGPATH_W) '$(srcdir)/depca.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-depca.Tpo" "$(DEPDIR)/libdrivers_a-depca.Po"; else rm -f "$(DEPDIR)/libdrivers_a-depca.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='depca.c' object='libdrivers_a-depca.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-depca.obj `if test -f 'depca.c'; then $(CYGPATH_W) 'depca.c'; else $(CYGPATH_W) '$(srcdir)/depca.c'; fi` +- +-libdrivers_a-eepro.o: eepro.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-eepro.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-eepro.Tpo" -c -o libdrivers_a-eepro.o `test -f 'eepro.c' || echo '$(srcdir)/'`eepro.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-eepro.Tpo" "$(DEPDIR)/libdrivers_a-eepro.Po"; else rm -f "$(DEPDIR)/libdrivers_a-eepro.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eepro.c' object='libdrivers_a-eepro.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-eepro.o `test -f 'eepro.c' || echo '$(srcdir)/'`eepro.c +- +-libdrivers_a-eepro.obj: eepro.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-eepro.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-eepro.Tpo" -c -o libdrivers_a-eepro.obj `if test -f 'eepro.c'; then $(CYGPATH_W) 'eepro.c'; else $(CYGPATH_W) '$(srcdir)/eepro.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-eepro.Tpo" "$(DEPDIR)/libdrivers_a-eepro.Po"; else rm -f "$(DEPDIR)/libdrivers_a-eepro.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eepro.c' object='libdrivers_a-eepro.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-eepro.obj `if test -f 'eepro.c'; then $(CYGPATH_W) 'eepro.c'; else $(CYGPATH_W) '$(srcdir)/eepro.c'; fi` ++libdrivers_a-e1000.o: e1000.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-e1000.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-e1000.Tpo" -c -o libdrivers_a-e1000.o `test -f 'e1000.c' || echo '$(srcdir)/'`e1000.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-e1000.Tpo" "$(DEPDIR)/libdrivers_a-e1000.Po"; else rm -f "$(DEPDIR)/libdrivers_a-e1000.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='e1000.c' object='libdrivers_a-e1000.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-e1000.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-e1000.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-e1000.o `test -f 'e1000.c' || echo '$(srcdir)/'`e1000.c ++ ++libdrivers_a-e1000.obj: e1000.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-e1000.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-e1000.Tpo" -c -o libdrivers_a-e1000.obj `if test -f 'e1000.c'; then $(CYGPATH_W) 'e1000.c'; else $(CYGPATH_W) '$(srcdir)/e1000.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-e1000.Tpo" "$(DEPDIR)/libdrivers_a-e1000.Po"; else rm -f "$(DEPDIR)/libdrivers_a-e1000.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='e1000.c' object='libdrivers_a-e1000.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-e1000.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-e1000.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-e1000.obj `if test -f 'e1000.c'; then $(CYGPATH_W) 'e1000.c'; else $(CYGPATH_W) '$(srcdir)/e1000.c'; fi` + + libdrivers_a-eepro100.o: eepro100.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-eepro100.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-eepro100.Tpo" -c -o libdrivers_a-eepro100.o `test -f 'eepro100.c' || echo '$(srcdir)/'`eepro100.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-eepro100.Tpo" "$(DEPDIR)/libdrivers_a-eepro100.Po"; else rm -f "$(DEPDIR)/libdrivers_a-eepro100.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eepro100.c' object='libdrivers_a-eepro100.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-eepro100.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-eepro100.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-eepro100.o `test -f 'eepro100.c' || echo '$(srcdir)/'`eepro100.c + + libdrivers_a-eepro100.obj: eepro100.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-eepro100.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-eepro100.Tpo" -c -o libdrivers_a-eepro100.obj `if test -f 'eepro100.c'; then $(CYGPATH_W) 'eepro100.c'; else $(CYGPATH_W) '$(srcdir)/eepro100.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-eepro100.Tpo" "$(DEPDIR)/libdrivers_a-eepro100.Po"; else rm -f "$(DEPDIR)/libdrivers_a-eepro100.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='eepro100.c' object='libdrivers_a-eepro100.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-eepro100.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-eepro100.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-eepro100.obj `if test -f 'eepro100.c'; then $(CYGPATH_W) 'eepro100.c'; else $(CYGPATH_W) '$(srcdir)/eepro100.c'; fi` + + libdrivers_a-epic100.o: epic100.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-epic100.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-epic100.Tpo" -c -o libdrivers_a-epic100.o `test -f 'epic100.c' || echo '$(srcdir)/'`epic100.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-epic100.Tpo" "$(DEPDIR)/libdrivers_a-epic100.Po"; else rm -f "$(DEPDIR)/libdrivers_a-epic100.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='epic100.c' object='libdrivers_a-epic100.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-epic100.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-epic100.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-epic100.o `test -f 'epic100.c' || echo '$(srcdir)/'`epic100.c + + libdrivers_a-epic100.obj: epic100.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-epic100.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-epic100.Tpo" -c -o libdrivers_a-epic100.obj `if test -f 'epic100.c'; then $(CYGPATH_W) 'epic100.c'; else $(CYGPATH_W) '$(srcdir)/epic100.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-epic100.Tpo" "$(DEPDIR)/libdrivers_a-epic100.Po"; else rm -f "$(DEPDIR)/libdrivers_a-epic100.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='epic100.c' object='libdrivers_a-epic100.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-epic100.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-epic100.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-epic100.obj `if test -f 'epic100.c'; then $(CYGPATH_W) 'epic100.c'; else $(CYGPATH_W) '$(srcdir)/epic100.c'; fi` + +-libdrivers_a-fa311.o: fa311.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-fa311.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-fa311.Tpo" -c -o libdrivers_a-fa311.o `test -f 'fa311.c' || echo '$(srcdir)/'`fa311.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-fa311.Tpo" "$(DEPDIR)/libdrivers_a-fa311.Po"; else rm -f "$(DEPDIR)/libdrivers_a-fa311.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fa311.c' object='libdrivers_a-fa311.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-fa311.o `test -f 'fa311.c' || echo '$(srcdir)/'`fa311.c +- +-libdrivers_a-fa311.obj: fa311.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-fa311.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-fa311.Tpo" -c -o libdrivers_a-fa311.obj `if test -f 'fa311.c'; then $(CYGPATH_W) 'fa311.c'; else $(CYGPATH_W) '$(srcdir)/fa311.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-fa311.Tpo" "$(DEPDIR)/libdrivers_a-fa311.Po"; else rm -f "$(DEPDIR)/libdrivers_a-fa311.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fa311.c' object='libdrivers_a-fa311.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-fa311.obj `if test -f 'fa311.c'; then $(CYGPATH_W) 'fa311.c'; else $(CYGPATH_W) '$(srcdir)/fa311.c'; fi` +- +-libdrivers_a-i82586.o: i82586.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-i82586.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-i82586.Tpo" -c -o libdrivers_a-i82586.o `test -f 'i82586.c' || echo '$(srcdir)/'`i82586.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-i82586.Tpo" "$(DEPDIR)/libdrivers_a-i82586.Po"; else rm -f "$(DEPDIR)/libdrivers_a-i82586.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i82586.c' object='libdrivers_a-i82586.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-i82586.o `test -f 'i82586.c' || echo '$(srcdir)/'`i82586.c +- +-libdrivers_a-i82586.obj: i82586.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-i82586.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-i82586.Tpo" -c -o libdrivers_a-i82586.obj `if test -f 'i82586.c'; then $(CYGPATH_W) 'i82586.c'; else $(CYGPATH_W) '$(srcdir)/i82586.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-i82586.Tpo" "$(DEPDIR)/libdrivers_a-i82586.Po"; else rm -f "$(DEPDIR)/libdrivers_a-i82586.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='i82586.c' object='libdrivers_a-i82586.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-i82586.obj `if test -f 'i82586.c'; then $(CYGPATH_W) 'i82586.c'; else $(CYGPATH_W) '$(srcdir)/i82586.c'; fi` +- +-libdrivers_a-lance.o: lance.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-lance.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-lance.Tpo" -c -o libdrivers_a-lance.o `test -f 'lance.c' || echo '$(srcdir)/'`lance.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-lance.Tpo" "$(DEPDIR)/libdrivers_a-lance.Po"; else rm -f "$(DEPDIR)/libdrivers_a-lance.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lance.c' object='libdrivers_a-lance.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-lance.o `test -f 'lance.c' || echo '$(srcdir)/'`lance.c +- +-libdrivers_a-lance.obj: lance.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-lance.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-lance.Tpo" -c -o libdrivers_a-lance.obj `if test -f 'lance.c'; then $(CYGPATH_W) 'lance.c'; else $(CYGPATH_W) '$(srcdir)/lance.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-lance.Tpo" "$(DEPDIR)/libdrivers_a-lance.Po"; else rm -f "$(DEPDIR)/libdrivers_a-lance.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='lance.c' object='libdrivers_a-lance.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-lance.obj `if test -f 'lance.c'; then $(CYGPATH_W) 'lance.c'; else $(CYGPATH_W) '$(srcdir)/lance.c'; fi` +- + libdrivers_a-natsemi.o: natsemi.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-natsemi.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-natsemi.Tpo" -c -o libdrivers_a-natsemi.o `test -f 'natsemi.c' || echo '$(srcdir)/'`natsemi.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-natsemi.Tpo" "$(DEPDIR)/libdrivers_a-natsemi.Po"; else rm -f "$(DEPDIR)/libdrivers_a-natsemi.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='natsemi.c' object='libdrivers_a-natsemi.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-natsemi.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-natsemi.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-natsemi.o `test -f 'natsemi.c' || echo '$(srcdir)/'`natsemi.c + + libdrivers_a-natsemi.obj: natsemi.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-natsemi.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-natsemi.Tpo" -c -o libdrivers_a-natsemi.obj `if test -f 'natsemi.c'; then $(CYGPATH_W) 'natsemi.c'; else $(CYGPATH_W) '$(srcdir)/natsemi.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-natsemi.Tpo" "$(DEPDIR)/libdrivers_a-natsemi.Po"; else rm -f "$(DEPDIR)/libdrivers_a-natsemi.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='natsemi.c' object='libdrivers_a-natsemi.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-natsemi.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-natsemi.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-natsemi.obj `if test -f 'natsemi.c'; then $(CYGPATH_W) 'natsemi.c'; else $(CYGPATH_W) '$(srcdir)/natsemi.c'; fi` + +-libdrivers_a-ni5010.o: ni5010.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ni5010.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-ni5010.Tpo" -c -o libdrivers_a-ni5010.o `test -f 'ni5010.c' || echo '$(srcdir)/'`ni5010.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ni5010.Tpo" "$(DEPDIR)/libdrivers_a-ni5010.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ni5010.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ni5010.c' object='libdrivers_a-ni5010.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ni5010.o `test -f 'ni5010.c' || echo '$(srcdir)/'`ni5010.c +- +-libdrivers_a-ni5010.obj: ni5010.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ni5010.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-ni5010.Tpo" -c -o libdrivers_a-ni5010.obj `if test -f 'ni5010.c'; then $(CYGPATH_W) 'ni5010.c'; else $(CYGPATH_W) '$(srcdir)/ni5010.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ni5010.Tpo" "$(DEPDIR)/libdrivers_a-ni5010.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ni5010.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ni5010.c' object='libdrivers_a-ni5010.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ni5010.obj `if test -f 'ni5010.c'; then $(CYGPATH_W) 'ni5010.c'; else $(CYGPATH_W) '$(srcdir)/ni5010.c'; fi` +- + libdrivers_a-ns8390.o: ns8390.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ns8390.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-ns8390.Tpo" -c -o libdrivers_a-ns8390.o `test -f 'ns8390.c' || echo '$(srcdir)/'`ns8390.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ns8390.Tpo" "$(DEPDIR)/libdrivers_a-ns8390.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ns8390.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ns8390.c' object='libdrivers_a-ns8390.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-ns8390.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-ns8390.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ns8390.o `test -f 'ns8390.c' || echo '$(srcdir)/'`ns8390.c + + libdrivers_a-ns8390.obj: ns8390.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ns8390.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-ns8390.Tpo" -c -o libdrivers_a-ns8390.obj `if test -f 'ns8390.c'; then $(CYGPATH_W) 'ns8390.c'; else $(CYGPATH_W) '$(srcdir)/ns8390.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ns8390.Tpo" "$(DEPDIR)/libdrivers_a-ns8390.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ns8390.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ns8390.c' object='libdrivers_a-ns8390.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-ns8390.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-ns8390.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ns8390.obj `if test -f 'ns8390.c'; then $(CYGPATH_W) 'ns8390.c'; else $(CYGPATH_W) '$(srcdir)/ns8390.c'; fi` + +-libdrivers_a-otulip.o: otulip.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-otulip.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-otulip.Tpo" -c -o libdrivers_a-otulip.o `test -f 'otulip.c' || echo '$(srcdir)/'`otulip.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-otulip.Tpo" "$(DEPDIR)/libdrivers_a-otulip.Po"; else rm -f "$(DEPDIR)/libdrivers_a-otulip.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='otulip.c' object='libdrivers_a-otulip.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-otulip.o `test -f 'otulip.c' || echo '$(srcdir)/'`otulip.c +- +-libdrivers_a-otulip.obj: otulip.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-otulip.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-otulip.Tpo" -c -o libdrivers_a-otulip.obj `if test -f 'otulip.c'; then $(CYGPATH_W) 'otulip.c'; else $(CYGPATH_W) '$(srcdir)/otulip.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-otulip.Tpo" "$(DEPDIR)/libdrivers_a-otulip.Po"; else rm -f "$(DEPDIR)/libdrivers_a-otulip.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='otulip.c' object='libdrivers_a-otulip.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-otulip.obj `if test -f 'otulip.c'; then $(CYGPATH_W) 'otulip.c'; else $(CYGPATH_W) '$(srcdir)/otulip.c'; fi` ++libdrivers_a-pcnet32.o: pcnet32.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pcnet32.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pcnet32.Tpo" -c -o libdrivers_a-pcnet32.o `test -f 'pcnet32.c' || echo '$(srcdir)/'`pcnet32.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pcnet32.Tpo" "$(DEPDIR)/libdrivers_a-pcnet32.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pcnet32.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pcnet32.c' object='libdrivers_a-pcnet32.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pcnet32.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pcnet32.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pcnet32.o `test -f 'pcnet32.c' || echo '$(srcdir)/'`pcnet32.c ++ ++libdrivers_a-pcnet32.obj: pcnet32.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pcnet32.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pcnet32.Tpo" -c -o libdrivers_a-pcnet32.obj `if test -f 'pcnet32.c'; then $(CYGPATH_W) 'pcnet32.c'; else $(CYGPATH_W) '$(srcdir)/pcnet32.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pcnet32.Tpo" "$(DEPDIR)/libdrivers_a-pcnet32.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pcnet32.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pcnet32.c' object='libdrivers_a-pcnet32.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pcnet32.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pcnet32.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pcnet32.obj `if test -f 'pcnet32.c'; then $(CYGPATH_W) 'pcnet32.c'; else $(CYGPATH_W) '$(srcdir)/pcnet32.c'; fi` + + libdrivers_a-rtl8139.o: rtl8139.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-rtl8139.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-rtl8139.Tpo" -c -o libdrivers_a-rtl8139.o `test -f 'rtl8139.c' || echo '$(srcdir)/'`rtl8139.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-rtl8139.Tpo" "$(DEPDIR)/libdrivers_a-rtl8139.Po"; else rm -f "$(DEPDIR)/libdrivers_a-rtl8139.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rtl8139.c' object='libdrivers_a-rtl8139.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-rtl8139.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-rtl8139.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-rtl8139.o `test -f 'rtl8139.c' || echo '$(srcdir)/'`rtl8139.c + + libdrivers_a-rtl8139.obj: rtl8139.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-rtl8139.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-rtl8139.Tpo" -c -o libdrivers_a-rtl8139.obj `if test -f 'rtl8139.c'; then $(CYGPATH_W) 'rtl8139.c'; else $(CYGPATH_W) '$(srcdir)/rtl8139.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-rtl8139.Tpo" "$(DEPDIR)/libdrivers_a-rtl8139.Po"; else rm -f "$(DEPDIR)/libdrivers_a-rtl8139.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='rtl8139.c' object='libdrivers_a-rtl8139.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-rtl8139.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-rtl8139.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-rtl8139.obj `if test -f 'rtl8139.c'; then $(CYGPATH_W) 'rtl8139.c'; else $(CYGPATH_W) '$(srcdir)/rtl8139.c'; fi` + + libdrivers_a-sis900.o: sis900.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-sis900.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-sis900.Tpo" -c -o libdrivers_a-sis900.o `test -f 'sis900.c' || echo '$(srcdir)/'`sis900.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-sis900.Tpo" "$(DEPDIR)/libdrivers_a-sis900.Po"; else rm -f "$(DEPDIR)/libdrivers_a-sis900.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sis900.c' object='libdrivers_a-sis900.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-sis900.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-sis900.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-sis900.o `test -f 'sis900.c' || echo '$(srcdir)/'`sis900.c + + libdrivers_a-sis900.obj: sis900.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-sis900.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-sis900.Tpo" -c -o libdrivers_a-sis900.obj `if test -f 'sis900.c'; then $(CYGPATH_W) 'sis900.c'; else $(CYGPATH_W) '$(srcdir)/sis900.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-sis900.Tpo" "$(DEPDIR)/libdrivers_a-sis900.Po"; else rm -f "$(DEPDIR)/libdrivers_a-sis900.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sis900.c' object='libdrivers_a-sis900.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-sis900.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-sis900.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-sis900.obj `if test -f 'sis900.c'; then $(CYGPATH_W) 'sis900.c'; else $(CYGPATH_W) '$(srcdir)/sis900.c'; fi` + +-libdrivers_a-sk_g16.o: sk_g16.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-sk_g16.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-sk_g16.Tpo" -c -o libdrivers_a-sk_g16.o `test -f 'sk_g16.c' || echo '$(srcdir)/'`sk_g16.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-sk_g16.Tpo" "$(DEPDIR)/libdrivers_a-sk_g16.Po"; else rm -f "$(DEPDIR)/libdrivers_a-sk_g16.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sk_g16.c' object='libdrivers_a-sk_g16.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-sk_g16.o `test -f 'sk_g16.c' || echo '$(srcdir)/'`sk_g16.c +- +-libdrivers_a-sk_g16.obj: sk_g16.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-sk_g16.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-sk_g16.Tpo" -c -o libdrivers_a-sk_g16.obj `if test -f 'sk_g16.c'; then $(CYGPATH_W) 'sk_g16.c'; else $(CYGPATH_W) '$(srcdir)/sk_g16.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-sk_g16.Tpo" "$(DEPDIR)/libdrivers_a-sk_g16.Po"; else rm -f "$(DEPDIR)/libdrivers_a-sk_g16.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sk_g16.c' object='libdrivers_a-sk_g16.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-sk_g16.obj `if test -f 'sk_g16.c'; then $(CYGPATH_W) 'sk_g16.c'; else $(CYGPATH_W) '$(srcdir)/sk_g16.c'; fi` +- +-libdrivers_a-smc9000.o: smc9000.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-smc9000.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-smc9000.Tpo" -c -o libdrivers_a-smc9000.o `test -f 'smc9000.c' || echo '$(srcdir)/'`smc9000.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-smc9000.Tpo" "$(DEPDIR)/libdrivers_a-smc9000.Po"; else rm -f "$(DEPDIR)/libdrivers_a-smc9000.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smc9000.c' object='libdrivers_a-smc9000.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-smc9000.o `test -f 'smc9000.c' || echo '$(srcdir)/'`smc9000.c +- +-libdrivers_a-smc9000.obj: smc9000.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-smc9000.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-smc9000.Tpo" -c -o libdrivers_a-smc9000.obj `if test -f 'smc9000.c'; then $(CYGPATH_W) 'smc9000.c'; else $(CYGPATH_W) '$(srcdir)/smc9000.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-smc9000.Tpo" "$(DEPDIR)/libdrivers_a-smc9000.Po"; else rm -f "$(DEPDIR)/libdrivers_a-smc9000.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='smc9000.c' object='libdrivers_a-smc9000.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-smc9000.obj `if test -f 'smc9000.c'; then $(CYGPATH_W) 'smc9000.c'; else $(CYGPATH_W) '$(srcdir)/smc9000.c'; fi` +- +-libdrivers_a-tiara.o: tiara.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tiara.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-tiara.Tpo" -c -o libdrivers_a-tiara.o `test -f 'tiara.c' || echo '$(srcdir)/'`tiara.c; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tiara.Tpo" "$(DEPDIR)/libdrivers_a-tiara.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tiara.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tiara.c' object='libdrivers_a-tiara.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tiara.o `test -f 'tiara.c' || echo '$(srcdir)/'`tiara.c +- +-libdrivers_a-tiara.obj: tiara.c +-@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tiara.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-tiara.Tpo" -c -o libdrivers_a-tiara.obj `if test -f 'tiara.c'; then $(CYGPATH_W) 'tiara.c'; else $(CYGPATH_W) '$(srcdir)/tiara.c'; fi`; \ +-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tiara.Tpo" "$(DEPDIR)/libdrivers_a-tiara.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tiara.Tpo"; exit 1; fi +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tiara.c' object='libdrivers_a-tiara.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +-@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tiara.obj `if test -f 'tiara.c'; then $(CYGPATH_W) 'tiara.c'; else $(CYGPATH_W) '$(srcdir)/tiara.c'; fi` ++libdrivers_a-tg3.o: tg3.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tg3.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-tg3.Tpo" -c -o libdrivers_a-tg3.o `test -f 'tg3.c' || echo '$(srcdir)/'`tg3.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tg3.Tpo" "$(DEPDIR)/libdrivers_a-tg3.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tg3.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tg3.c' object='libdrivers_a-tg3.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tg3.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tg3.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tg3.o `test -f 'tg3.c' || echo '$(srcdir)/'`tg3.c ++ ++libdrivers_a-tg3.obj: tg3.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tg3.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-tg3.Tpo" -c -o libdrivers_a-tg3.obj `if test -f 'tg3.c'; then $(CYGPATH_W) 'tg3.c'; else $(CYGPATH_W) '$(srcdir)/tg3.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tg3.Tpo" "$(DEPDIR)/libdrivers_a-tg3.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tg3.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tg3.c' object='libdrivers_a-tg3.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tg3.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tg3.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tg3.obj `if test -f 'tg3.c'; then $(CYGPATH_W) 'tg3.c'; else $(CYGPATH_W) '$(srcdir)/tg3.c'; fi` + + libdrivers_a-tlan.o: tlan.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tlan.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-tlan.Tpo" -c -o libdrivers_a-tlan.o `test -f 'tlan.c' || echo '$(srcdir)/'`tlan.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tlan.Tpo" "$(DEPDIR)/libdrivers_a-tlan.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tlan.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tlan.c' object='libdrivers_a-tlan.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tlan.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tlan.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tlan.o `test -f 'tlan.c' || echo '$(srcdir)/'`tlan.c + + libdrivers_a-tlan.obj: tlan.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tlan.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-tlan.Tpo" -c -o libdrivers_a-tlan.obj `if test -f 'tlan.c'; then $(CYGPATH_W) 'tlan.c'; else $(CYGPATH_W) '$(srcdir)/tlan.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tlan.Tpo" "$(DEPDIR)/libdrivers_a-tlan.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tlan.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tlan.c' object='libdrivers_a-tlan.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tlan.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tlan.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tlan.obj `if test -f 'tlan.c'; then $(CYGPATH_W) 'tlan.c'; else $(CYGPATH_W) '$(srcdir)/tlan.c'; fi` + + libdrivers_a-tulip.o: tulip.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tulip.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-tulip.Tpo" -c -o libdrivers_a-tulip.o `test -f 'tulip.c' || echo '$(srcdir)/'`tulip.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tulip.Tpo" "$(DEPDIR)/libdrivers_a-tulip.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tulip.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tulip.c' object='libdrivers_a-tulip.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tulip.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tulip.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tulip.o `test -f 'tulip.c' || echo '$(srcdir)/'`tulip.c + + libdrivers_a-tulip.obj: tulip.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-tulip.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-tulip.Tpo" -c -o libdrivers_a-tulip.obj `if test -f 'tulip.c'; then $(CYGPATH_W) 'tulip.c'; else $(CYGPATH_W) '$(srcdir)/tulip.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-tulip.Tpo" "$(DEPDIR)/libdrivers_a-tulip.Po"; else rm -f "$(DEPDIR)/libdrivers_a-tulip.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='tulip.c' object='libdrivers_a-tulip.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-tulip.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-tulip.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-tulip.obj `if test -f 'tulip.c'; then $(CYGPATH_W) 'tulip.c'; else $(CYGPATH_W) '$(srcdir)/tulip.c'; fi` + + libdrivers_a-via-rhine.o: via-rhine.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-via-rhine.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-via-rhine.Tpo" -c -o libdrivers_a-via-rhine.o `test -f 'via-rhine.c' || echo '$(srcdir)/'`via-rhine.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-via-rhine.Tpo" "$(DEPDIR)/libdrivers_a-via-rhine.Po"; else rm -f "$(DEPDIR)/libdrivers_a-via-rhine.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='via-rhine.c' object='libdrivers_a-via-rhine.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-via-rhine.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-via-rhine.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-via-rhine.o `test -f 'via-rhine.c' || echo '$(srcdir)/'`via-rhine.c + + libdrivers_a-via-rhine.obj: via-rhine.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-via-rhine.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-via-rhine.Tpo" -c -o libdrivers_a-via-rhine.obj `if test -f 'via-rhine.c'; then $(CYGPATH_W) 'via-rhine.c'; else $(CYGPATH_W) '$(srcdir)/via-rhine.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-via-rhine.Tpo" "$(DEPDIR)/libdrivers_a-via-rhine.Po"; else rm -f "$(DEPDIR)/libdrivers_a-via-rhine.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='via-rhine.c' object='libdrivers_a-via-rhine.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-via-rhine.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-via-rhine.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-via-rhine.obj `if test -f 'via-rhine.c'; then $(CYGPATH_W) 'via-rhine.c'; else $(CYGPATH_W) '$(srcdir)/via-rhine.c'; fi` + + libdrivers_a-w89c840.o: w89c840.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-w89c840.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-w89c840.Tpo" -c -o libdrivers_a-w89c840.o `test -f 'w89c840.c' || echo '$(srcdir)/'`w89c840.c; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-w89c840.Tpo" "$(DEPDIR)/libdrivers_a-w89c840.Po"; else rm -f "$(DEPDIR)/libdrivers_a-w89c840.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='w89c840.c' object='libdrivers_a-w89c840.o' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-w89c840.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-w89c840.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-w89c840.o `test -f 'w89c840.c' || echo '$(srcdir)/'`w89c840.c + + libdrivers_a-w89c840.obj: w89c840.c + @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-w89c840.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-w89c840.Tpo" -c -o libdrivers_a-w89c840.obj `if test -f 'w89c840.c'; then $(CYGPATH_W) 'w89c840.c'; else $(CYGPATH_W) '$(srcdir)/w89c840.c'; fi`; \ + @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-w89c840.Tpo" "$(DEPDIR)/libdrivers_a-w89c840.Po"; else rm -f "$(DEPDIR)/libdrivers_a-w89c840.Tpo"; exit 1; fi + @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='w89c840.c' object='libdrivers_a-w89c840.obj' libtool=no @AMDEPBACKSLASH@ +-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-w89c840.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-w89c840.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-w89c840.obj `if test -f 'w89c840.c'; then $(CYGPATH_W) 'w89c840.c'; else $(CYGPATH_W) '$(srcdir)/w89c840.c'; fi` +-uninstall-info-am: ++ ++libdrivers_a-r8169.o: r8169.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-r8169.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-r8169.Tpo" -c -o libdrivers_a-r8169.o `test -f 'r8169.c' || echo '$(srcdir)/'`r8169.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-r8169.Tpo" "$(DEPDIR)/libdrivers_a-r8169.Po"; else rm -f "$(DEPDIR)/libdrivers_a-r8169.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r8169.c' object='libdrivers_a-r8169.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-r8169.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-r8169.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-r8169.o `test -f 'r8169.c' || echo '$(srcdir)/'`r8169.c ++ ++libdrivers_a-r8169.obj: r8169.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-r8169.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-r8169.Tpo" -c -o libdrivers_a-r8169.obj `if test -f 'r8169.c'; then $(CYGPATH_W) 'r8169.c'; else $(CYGPATH_W) '$(srcdir)/r8169.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-r8169.Tpo" "$(DEPDIR)/libdrivers_a-r8169.Po"; else rm -f "$(DEPDIR)/libdrivers_a-r8169.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='r8169.c' object='libdrivers_a-r8169.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-r8169.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-r8169.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-r8169.obj `if test -f 'r8169.c'; then $(CYGPATH_W) 'r8169.c'; else $(CYGPATH_W) '$(srcdir)/r8169.c'; fi` ++ ++libdrivers_a-forcedeth.o: forcedeth.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-forcedeth.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-forcedeth.Tpo" -c -o libdrivers_a-forcedeth.o `test -f 'forcedeth.c' || echo '$(srcdir)/'`forcedeth.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-forcedeth.Tpo" "$(DEPDIR)/libdrivers_a-forcedeth.Po"; else rm -f "$(DEPDIR)/libdrivers_a-forcedeth.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='forcedeth.c' object='libdrivers_a-forcedeth.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-forcedeth.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-forcedeth.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-forcedeth.o `test -f 'forcedeth.c' || echo '$(srcdir)/'`forcedeth.c ++ ++libdrivers_a-forcedeth.obj: forcedeth.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-forcedeth.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-forcedeth.Tpo" -c -o libdrivers_a-forcedeth.obj `if test -f 'forcedeth.c'; then $(CYGPATH_W) 'forcedeth.c'; else $(CYGPATH_W) '$(srcdir)/forcedeth.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-forcedeth.Tpo" "$(DEPDIR)/libdrivers_a-forcedeth.Po"; else rm -f "$(DEPDIR)/libdrivers_a-forcedeth.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='forcedeth.c' object='libdrivers_a-forcedeth.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-forcedeth.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-forcedeth.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-forcedeth.obj `if test -f 'forcedeth.c'; then $(CYGPATH_W) 'forcedeth.c'; else $(CYGPATH_W) '$(srcdir)/forcedeth.c'; fi` ++ ++libdrivers_a-ns83820.o: ns83820.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ns83820.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-ns83820.Tpo" -c -o libdrivers_a-ns83820.o `test -f 'ns83820.c' || echo '$(srcdir)/'`ns83820.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ns83820.Tpo" "$(DEPDIR)/libdrivers_a-ns83820.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ns83820.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ns83820.c' object='libdrivers_a-ns83820.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-ns83820.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-ns83820.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ns83820.o `test -f 'ns83820.c' || echo '$(srcdir)/'`ns83820.c ++ ++libdrivers_a-ns83820.obj: ns83820.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-ns83820.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-ns83820.Tpo" -c -o libdrivers_a-ns83820.obj `if test -f 'ns83820.c'; then $(CYGPATH_W) 'ns83820.c'; else $(CYGPATH_W) '$(srcdir)/ns83820.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-ns83820.Tpo" "$(DEPDIR)/libdrivers_a-ns83820.Po"; else rm -f "$(DEPDIR)/libdrivers_a-ns83820.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ns83820.c' object='libdrivers_a-ns83820.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-ns83820.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-ns83820.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-ns83820.obj `if test -f 'ns83820.c'; then $(CYGPATH_W) 'ns83820.c'; else $(CYGPATH_W) '$(srcdir)/ns83820.c'; fi` ++ ++libdrivers_a-pnic.o: pnic.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pnic.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pnic.Tpo" -c -o libdrivers_a-pnic.o `test -f 'pnic.c' || echo '$(srcdir)/'`pnic.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pnic.Tpo" "$(DEPDIR)/libdrivers_a-pnic.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pnic.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnic.c' object='libdrivers_a-pnic.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pnic.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pnic.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pnic.o `test -f 'pnic.c' || echo '$(srcdir)/'`pnic.c ++ ++libdrivers_a-pnic.obj: pnic.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pnic.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pnic.Tpo" -c -o libdrivers_a-pnic.obj `if test -f 'pnic.c'; then $(CYGPATH_W) 'pnic.c'; else $(CYGPATH_W) '$(srcdir)/pnic.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pnic.Tpo" "$(DEPDIR)/libdrivers_a-pnic.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pnic.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnic.c' object='libdrivers_a-pnic.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pnic.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pnic.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pnic.obj `if test -f 'pnic.c'; then $(CYGPATH_W) 'pnic.c'; else $(CYGPATH_W) '$(srcdir)/pnic.c'; fi` ++ ++libdrivers_a-pnic_api.o: pnic_api.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pnic_api.o -MD -MP -MF "$(DEPDIR)/libdrivers_a-pnic_api.Tpo" -c -o libdrivers_a-pnic_api.o `test -f 'pnic_api.c' || echo '$(srcdir)/'`pnic_api.c; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pnic_api.Tpo" "$(DEPDIR)/libdrivers_a-pnic_api.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pnic_api.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnic_api.c' object='libdrivers_a-pnic_api.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pnic_api.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pnic_api.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pnic_api.o `test -f 'pnic_api.c' || echo '$(srcdir)/'`pnic_api.c ++ ++libdrivers_a-pnic_api.obj: pnic_api.c ++@am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -MT libdrivers_a-pnic_api.obj -MD -MP -MF "$(DEPDIR)/libdrivers_a-pnic_api.Tpo" -c -o libdrivers_a-pnic_api.obj `if test -f 'pnic_api.c'; then $(CYGPATH_W) 'pnic_api.c'; else $(CYGPATH_W) '$(srcdir)/pnic_api.c'; fi`; \ ++@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libdrivers_a-pnic_api.Tpo" "$(DEPDIR)/libdrivers_a-pnic_api.Po"; else rm -f "$(DEPDIR)/libdrivers_a-pnic_api.Tpo"; exit 1; fi ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='pnic_api.c' object='libdrivers_a-pnic_api.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/libdrivers_a-pnic_api.Po' tmpdepfile='$(DEPDIR)/libdrivers_a-pnic_api.TPo' @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libdrivers_a_CFLAGS) $(CFLAGS) -c -o libdrivers_a-pnic_api.obj `if test -f 'pnic_api.c'; then $(CYGPATH_W) 'pnic_api.c'; else $(CYGPATH_W) '$(srcdir)/pnic_api.c'; fi` + + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ +@@ -817,11 +928,9 @@ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ +- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ +- test -n "$$unique" || unique=$$empty_fix; \ +- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ +- $$tags $$unique; \ +- fi ++ test -z "$(ETAGS_ARGS)$$tags$$unique" \ ++ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ ++ $$tags $$unique + ctags: CTAGS + CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) +@@ -895,7 +1004,7 @@ + clean-generic: + + distclean-generic: +- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) ++ -rm -f $(CONFIG_CLEAN_FILES) + + maintainer-clean-generic: + @echo "This command is intended for maintainers to use" +@@ -962,10 +1071,10 @@ + + + # Is it really necessary to specify dependecies explicitly? +-$(3c509_drivers): 3c509.c 3c509.h +-$(3c509_drivers): %.o: 3c509.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(3c509_drivers): 3c509.c 3c509.h ++#$(3c509_drivers): %.o: 3c509.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + $(3c595_drivers): 3c595.c 3c595.h + $(3c595_drivers): %.o: 3c595.c +@@ -977,23 +1086,28 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(cs89x0_drivers): cs89x0.c cs89x0.h +-$(cs89x0_drivers): %.o: cs89x0.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(cs89x0_drivers): cs89x0.c cs89x0.h ++#$(cs89x0_drivers): %.o: cs89x0.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + $(davicom_drivers): davicom.c + $(davicom_drivers): %.o: davicom.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(depca_drivers): depca.c +-$(depca_drivers): %.o: depca.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(depca_drivers): depca.c ++#$(depca_drivers): %.o: depca.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(eepro_drivers): eepro.c +-$(eepro_drivers): %.o: eepro.c ++#$(eepro_drivers): eepro.c ++#$(eepro_drivers): %.o: eepro.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(e1000_drivers): e1000.c e1000_hw.h ++$(e1000_drivers): %.o: e1000.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +@@ -1007,28 +1121,38 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + ++$(forcedeth_drivers): forcedeth.c ++$(forcedeth_drivers): %.o: forcedeth.c ++ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ + #$(fa311_drivers): fa311.c + #$(fa311_drivers): %.o: fa311.c + # $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + # $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(i82586_drivers): i82586.c +-$(i82586_drivers): %.o: i82586.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(i82586_drivers): i82586.c ++#$(i82586_drivers): %.o: i82586.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(lance_drivers): lance.c +-$(lance_drivers): %.o: lance.c +- $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++#$(lance_drivers): lance.c ++#$(lance_drivers): %.o: lance.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + + $(natsemi_drivers): natsemi.c + $(natsemi_drivers): %.o: natsemi.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(ni5010_drivers): ni5010.c +-$(ni5010_drivers): %.o: ni5010.c ++#$(ni5010_drivers): ni5010.c ++#$(ni5010_drivers): %.o: ni5010.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(ns83820_drivers): ns83820.c ++$(ns83820_drivers): %.o: ns83820.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +@@ -1037,41 +1161,62 @@ + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(otulip_drivers): otulip.c otulip.h +-$(otulip_drivers): %.o: otulip.c ++#$(otulip_drivers): otulip.c otulip.h ++#$(otulip_drivers): %.o: otulip.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++$(pcnet32_drivers): pcnet32.c ++$(pcnet32_drivers): %.o: pcnet32.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(rtl8139_drivers): rtl8139.c +-$(rtl8139_drivers): %.o: rtl8139.c ++$(pnic_drivers): pnic.c ++$(pnic_drivers): %.o: pnic.c pnic_api.h + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(sis900_drivers): sis900.c +-$(sis900_drivers): %.o: sis900.c sis900.h ++$(rtl8139_drivers): rtl8139.c ++$(rtl8139_drivers): %.o: rtl8139.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(sk_g16_drivers): sk_g16.c sk_g16.h +-$(sk_g16_drivers): %.o: sk_g16.c ++$(r8169_drivers): r8169.c ++$(r8169_drivers): %.o: r8169.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(smc9000_drivers): smc9000.c smc9000.h +-$(smc9000_drivers): %.o: smc9000.c ++$(sis900_drivers): sis900.c sis900.h ++$(sis900_drivers): %.o: sis900.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-$(tiara_drivers): tiara.c +-$(tiara_drivers): %.o: tiara.c ++#$(sk_g16_drivers): sk_g16.c sk_g16.h ++#$(sk_g16_drivers): %.o: sk_g16.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++#$(smc9000_drivers): smc9000.c smc9000.h ++#$(smc9000_drivers): %.o: smc9000.c ++# $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++# $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ ++ ++$(tg3_drivers): tg3.c tg3.h ++$(tg3_drivers): %.o: tg3.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + +-#$(tlan_drivers): tlan.c +-#$(tlan_drivers): %.o: tlan.c ++#$(tiara_drivers): tiara.c ++#$(tiara_drivers): %.o: tiara.c + # $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ + # $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< + ++$(tlan_drivers): tlan.c tlan.h ++$(tlan_drivers): %.o: tlan.c ++ $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++ $(NET_EXTRAFLAGS) $($(basename $@)_o_CFLAGS) -o $@ -c $< ++ + $(tulip_drivers): tulip.c + $(tulip_drivers): %.o: tulip.c + $(COMPILE) $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +Index: b/netboot/basemem.c +=================================================================== +--- /dev/null ++++ b/netboot/basemem.c +@@ -0,0 +1,178 @@ ++#include "etherboot.h" ++#define DEBUG_BASEMEM ++/* Routines to allocate base memory in a BIOS-compatible way, by ++ * updating the Free Base Memory Size counter at 40:13h. ++ * ++ * Michael Brown (mcb30) ++ * $Id: grub-0.95-diskless-patch-2-undi.patch,v 1.1.1.1 2005/06/14 08:18:50 wesolows Exp $ ++ */ ++ ++#define fbms ( ( uint16_t * ) phys_to_virt ( 0x413 ) ) ++#define BASE_MEMORY_MAX ( 640 ) ++#define FREE_BLOCK_MAGIC ( ('!'<<0) + ('F'<<8) + ('R'<<16) + ('E'<<24) ) ++ ++typedef struct free_base_memory_block { ++ uint32_t magic; ++ uint16_t size_kb; ++} free_base_memory_block_t; ++ ++/* Return amount of free base memory in bytes ++ */ ++ ++uint32_t get_free_base_memory ( void ) { ++ return *fbms << 10; ++} ++ ++/* Adjust the real mode stack pointer. We keep the real mode stack at ++ * the top of free base memory, rather than allocating space for it. ++ */ ++ ++inline void adjust_real_mode_stack ( void ) { ++/* real_mode_stack = ( *fbms << 10 ); */ ++} ++ ++/* Allocate N bytes of base memory. Amount allocated will be rounded ++ * up to the nearest kB, since that's the granularity of the BIOS FBMS ++ * counter. Returns NULL if memory cannot be allocated. ++ */ ++ ++void * allot_base_memory ( size_t size ) { ++ uint16_t size_kb = ( size + 1023 ) >> 10; ++ void *ptr = NULL; ++ ++#ifdef DEBUG_BASEMEM ++ printf ( "Trying to allocate %d kB of base memory, %d kB free\n", ++ size_kb, *fbms ); ++#endif ++ ++ /* Free up any unused memory before we start */ ++ free_unused_base_memory(); ++ ++ /* Check available base memory */ ++ if ( size_kb > *fbms ) { return NULL; } ++ ++ /* Reduce available base memory */ ++ *fbms -= size_kb; ++ ++ /* Calculate address of memory allocated */ ++ ptr = phys_to_virt ( *fbms << 10 ); ++ ++#ifdef DEBUG_BASEMEM ++ /* Zero out memory. We do this so that allocation of ++ * already-used space will show up in the form of a crash as ++ * soon as possible. ++ */ ++ memset ( ptr, 0, size_kb << 10 ); ++#endif ++ ++ /* Adjust real mode stack pointer */ ++ adjust_real_mode_stack (); ++ ++ return ptr; ++} ++ ++/* Free base memory allocated by allot_base_memory. The BIOS provides ++ * nothing better than a LIFO mechanism for freeing memory (i.e. it ++ * just has the single "total free memory" counter), but we improve ++ * upon this slightly; as long as you free all the allotted blocks, it ++ * doesn't matter what order you free them in. (This will only work ++ * for blocks that are freed via forget_base_memory()). ++ * ++ * Yes, it's annoying that you have to remember the size of the blocks ++ * you've allotted. However, since our granularity of allocation is ++ * 1K, the alternative is to risk wasting the occasional kB of base ++ * memory, which is a Bad Thing. Really, you should be using as ++ * little base memory as possible, so consider the awkwardness of the ++ * API to be a feature! :-) ++ */ ++ ++void forget_base_memory ( void *ptr, size_t size ) { ++ uint16_t remainder = virt_to_phys(ptr) & 1023; ++ uint16_t size_kb = ( size + remainder + 1023 ) >> 10; ++ free_base_memory_block_t *free_block = ++ ( free_base_memory_block_t * ) ( ptr - remainder ); ++ ++ if ( ( ptr == NULL ) || ( size == 0 ) ) { return; } ++ ++#ifdef DEBUG_BASEMEM ++ printf ( "Trying to free %d bytes base memory at 0x%x\n", ++ size, virt_to_phys ( ptr ) ); ++ if ( remainder > 0 ) { ++ printf ( "WARNING: destructively expanding free block " ++ "downwards to 0x%x\n", ++ virt_to_phys ( ptr - remainder ) ); ++ } ++#endif ++ ++ /* Mark every kilobyte within this block as free. This is ++ * overkill for normal purposes, but helps when something has ++ * allocated base memory with a granularity finer than the ++ * BIOS granularity of 1kB. PXE ROMs tend to do this when ++ * they allocate their own memory. This method allows us to ++ * free their blocks (admittedly in a rather dangerous, ++ * tread-on-anything-either-side sort of way, but there's no ++ * other way to do it). ++ * ++ * Since we're marking every kB as free, there's actually no ++ * need for recording the size of the blocks. However, we ++ * keep this in so that debug messages are friendlier. It ++ * probably adds around 8 bytes to the overall code size. ++ */ ++ while ( size_kb > 0 ) { ++ /* Mark this block as unused */ ++ free_block->magic = FREE_BLOCK_MAGIC; ++ free_block->size_kb = size_kb; ++ /* Move up by 1 kB */ ++ (void *)(free_block += ( 1 << 10 )); ++ size_kb--; ++ } ++ ++ /* Free up unused base memory */ ++ free_unused_base_memory(); ++} ++ ++/* Do the actual freeing of memory. This is split out from ++ * forget_base_memory() so that it may be called separately. It ++ * should be called whenever base memory is deallocated by an external ++ * entity (if we can detect that it has done so) so that we get the ++ * chance to free up our own blocks. ++ */ ++void free_unused_base_memory ( void ) { ++ free_base_memory_block_t *free_block = NULL; ++ ++ /* Try to release memory back to the BIOS. Free all ++ * consecutive blocks marked as free. ++ */ ++ while ( 1 ) { ++ /* Calculate address of next potential free block */ ++ free_block = ( free_base_memory_block_t * ) ++ phys_to_virt ( *fbms << 10 ); ++ ++ /* Stop processing if we're all the way up to 640K or ++ * if this is not a free block ++ */ ++ if ( ( *fbms == BASE_MEMORY_MAX ) || ++ ( free_block->magic != FREE_BLOCK_MAGIC ) ) { ++ break; ++ } ++ ++ /* Return memory to BIOS */ ++ *fbms += free_block->size_kb; ++ ++#ifdef DEBUG_BASEMEM ++ printf ( "Freed %d kB base memory, %d kB now free\n", ++ free_block->size_kb, *fbms ); ++ ++ /* Zero out freed block. We do this in case ++ * the block contained any structures that ++ * might be located by scanning through ++ * memory. ++ */ ++ memset ( free_block, 0, free_block->size_kb << 10 ); ++#endif ++ } ++ ++ /* Adjust real mode stack pointer */ ++ adjust_real_mode_stack (); ++} ++ +Index: b/netboot/big_bswap.h +=================================================================== +--- /dev/null ++++ b/netboot/big_bswap.h +@@ -0,0 +1,17 @@ ++#ifndef ETHERBOOT_BIG_BSWAP_H ++#define ETHERBOOT_BIG_BSWAP_H ++ ++#define ntohl(x) (x) ++#define htonl(x) (x) ++#define ntohs(x) (x) ++#define htons(x) (x) ++#define cpu_to_le32(x) __bswap_32(x) ++#define cpu_to_le16(x) __bswap_16(x) ++#define cpu_to_be32(x) (x) ++#define cpu_to_be16(x) (x) ++#define le32_to_cpu(x) __bswap_32(x) ++#define le16_to_cpu(x) __bswap_16(x) ++#define be32_to_cpu(x) (x) ++#define be16_to_cpu(x) (x) ++ ++#endif /* ETHERBOOT_BIG_BSWAP_H */ +Index: b/netboot/bootp.h +=================================================================== +--- /dev/null ++++ b/netboot/bootp.h +@@ -0,0 +1,182 @@ ++#ifndef _BOOTP_H ++#define _BOOTP_H ++ ++#include "if_ether.h" ++#include "ip.h" ++#include "udp.h" ++ ++#ifndef MAX_BOOTP_RETRIES ++#define MAX_BOOTP_RETRIES 20 ++#endif ++ ++#ifdef ALTERNATE_DHCP_PORTS_1067_1068 ++#undef NON_STANDARD_BOOTP_SERVER ++#define NON_STANDARD_BOOTP_SERVER 1067 ++#undef NON_STANDARD_BOOTP_CLIENT ++#define NON_STANDARD_BOOTP_CLIENT 1068 ++#endif ++ ++#ifdef NON_STANDARD_BOOTP_SERVER ++#define BOOTP_SERVER NON_STANDARD_BOOTP_SERVER ++#else ++#define BOOTP_SERVER 67 ++#endif ++#ifdef NON_STANDARD_BOOTP_CLIENT ++#define BOOTP_CLIENT NON_STANDARD_BOOTP_CLIENT ++#else ++#define BOOTP_CLIENT 68 ++#endif ++ ++#define BOOTP_REQUEST 1 ++#define BOOTP_REPLY 2 ++ ++#define TAG_LEN(p) (*((p)+1)) ++#define RFC1533_COOKIE 99, 130, 83, 99 ++#define RFC1533_PAD 0 ++#define RFC1533_NETMASK 1 ++#define RFC1533_TIMEOFFSET 2 ++#define RFC1533_GATEWAY 3 ++#define RFC1533_TIMESERVER 4 ++#define RFC1533_IEN116NS 5 ++#define RFC1533_DNS 6 ++#define RFC1533_LOGSERVER 7 ++#define RFC1533_COOKIESERVER 8 ++#define RFC1533_LPRSERVER 9 ++#define RFC1533_IMPRESSSERVER 10 ++#define RFC1533_RESOURCESERVER 11 ++#define RFC1533_HOSTNAME 12 ++#define RFC1533_BOOTFILESIZE 13 ++#define RFC1533_MERITDUMPFILE 14 ++#define RFC1533_DOMAINNAME 15 ++#define RFC1533_SWAPSERVER 16 ++#define RFC1533_ROOTPATH 17 ++#define RFC1533_EXTENSIONPATH 18 ++#define RFC1533_IPFORWARDING 19 ++#define RFC1533_IPSOURCEROUTING 20 ++#define RFC1533_IPPOLICYFILTER 21 ++#define RFC1533_IPMAXREASSEMBLY 22 ++#define RFC1533_IPTTL 23 ++#define RFC1533_IPMTU 24 ++#define RFC1533_IPMTUPLATEAU 25 ++#define RFC1533_INTMTU 26 ++#define RFC1533_INTLOCALSUBNETS 27 ++#define RFC1533_INTBROADCAST 28 ++#define RFC1533_INTICMPDISCOVER 29 ++#define RFC1533_INTICMPRESPOND 30 ++#define RFC1533_INTROUTEDISCOVER 31 ++#define RFC1533_INTROUTESOLICIT 32 ++#define RFC1533_INTSTATICROUTES 33 ++#define RFC1533_LLTRAILERENCAP 34 ++#define RFC1533_LLARPCACHETMO 35 ++#define RFC1533_LLETHERNETENCAP 36 ++#define RFC1533_TCPTTL 37 ++#define RFC1533_TCPKEEPALIVETMO 38 ++#define RFC1533_TCPKEEPALIVEGB 39 ++#define RFC1533_NISDOMAIN 40 ++#define RFC1533_NISSERVER 41 ++#define RFC1533_NTPSERVER 42 ++#define RFC1533_VENDOR 43 ++#define RFC1533_NBNS 44 ++#define RFC1533_NBDD 45 ++#define RFC1533_NBNT 46 ++#define RFC1533_NBSCOPE 47 ++#define RFC1533_XFS 48 ++#define RFC1533_XDM 49 ++#ifndef NO_DHCP_SUPPORT ++#define RFC2132_REQ_ADDR 50 ++#define RFC2132_MSG_TYPE 53 ++#define RFC2132_SRV_ID 54 ++#define RFC2132_PARAM_LIST 55 ++#define RFC2132_MAX_SIZE 57 ++#define RFC2132_VENDOR_CLASS_ID 60 ++ ++#define DHCPDISCOVER 1 ++#define DHCPOFFER 2 ++#define DHCPREQUEST 3 ++#define DHCPACK 5 ++#endif /* NO_DHCP_SUPPORT */ ++ ++#define RFC1533_VENDOR_MAJOR 0 ++#define RFC1533_VENDOR_MINOR 0 ++ ++#define RFC1533_VENDOR_MAGIC 128 ++#define RFC1533_VENDOR_ADDPARM 129 ++#define RFC1533_VENDOR_ETHDEV 130 ++#ifdef IMAGE_FREEBSD ++#define RFC1533_VENDOR_HOWTO 132 ++#define RFC1533_VENDOR_KERNEL_ENV 133 ++#endif ++#define RFC1533_VENDOR_ETHERBOOT_ENCAP 150 ++#define RFC1533_VENDOR_MNUOPTS 160 ++#define RFC1533_VENDOR_NIC_DEV_ID 175 ++#define RFC1533_VENDOR_SELECTION 176 ++#define RFC1533_VENDOR_ARCH 177 ++#define RFC1533_VENDOR_MOTD 184 ++#define RFC1533_VENDOR_NUMOFMOTD 8 ++#define RFC1533_VENDOR_IMG 192 ++#define RFC1533_VENDOR_NUMOFIMG 16 ++ ++#define RFC1533_VENDOR_CONFIGFILE 150 ++ ++#define RFC1533_END 255 ++ ++#define BOOTP_VENDOR_LEN 64 ++ ++#define DHCP_OPT_LEN 312 ++ ++/* Format of a bootp packet */ ++struct bootp_t { ++ uint8_t bp_op; ++ uint8_t bp_htype; ++ uint8_t bp_hlen; ++ uint8_t bp_hops; ++ uint32_t bp_xid; ++ uint16_t bp_secs; ++ uint16_t unused; ++ in_addr bp_ciaddr; ++ in_addr bp_yiaddr; ++ in_addr bp_siaddr; ++ in_addr bp_giaddr; ++ uint8_t bp_hwaddr[16]; ++ uint8_t bp_sname[64]; ++ char bp_file[128]; ++ uint8_t bp_vend[BOOTP_VENDOR_LEN]; ++}; ++ ++struct dhcp_t { ++ uint8_t bp_op; ++ uint8_t bp_htype; ++ uint8_t bp_hlen; ++ uint8_t bp_hops; ++ uint32_t bp_xid; ++ uint16_t bp_secs; ++ uint16_t bp_flag; ++ in_addr bp_ciaddr; ++ in_addr bp_yiaddr; ++ in_addr bp_siaddr; ++ in_addr bp_giaddr; ++ uint8_t bp_hwaddr[16]; ++ uint8_t bp_sname[64]; ++ char bp_file[128]; ++ uint8_t bp_vend[DHCP_OPT_LEN]; ++}; ++ ++/* Format of a bootp IP packet */ ++struct bootpip_t ++{ ++ struct iphdr ip; ++ struct udphdr udp; ++ struct bootp_t bp; ++}; ++struct dhcpip_t ++{ ++ struct iphdr ip; ++ struct udphdr udp; ++ struct dhcp_t bp; ++}; ++ ++#define MAX_RFC1533_VENDLEN (ETH_MAX_MTU - sizeof(struct bootpip_t) + BOOTP_VENDOR_LEN) ++ ++#define BOOTP_DATA_ADDR (&bootp_data) ++ ++#endif /* _BOOTP_H */ +Index: b/netboot/byteswap.h +=================================================================== +--- /dev/null ++++ b/netboot/byteswap.h +@@ -0,0 +1,20 @@ ++#ifndef ETHERBOOT_BYTESWAP_H ++#define ETHERBOOT_BYTESWAP_H ++ ++#include "endian.h" ++#include "i386_byteswap.h" ++ ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#include "little_bswap.h" ++#endif ++#if __BYTE_ORDER == __BIG_ENDIAN ++#include "big_bswap.h" ++#endif ++ ++/* Make routines available to all */ ++#define swap32(x) __bswap_32(x) ++#define swap16(x) __bswap_16(x) ++#define bswap_32(x) __bswap_32(x) ++#define bswap_16(x) __bswap_16(x) ++ ++#endif /* ETHERBOOT_BYTESWAP_H */ +Index: b/netboot/cards.h +=================================================================== +--- a/netboot/cards.h ++++ /dev/null +@@ -1,183 +0,0 @@ +-#ifndef CARDS_H +-#define CARDS_H +- +-/* +- * 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, or (at +- * your option) any later version. +- */ +- +-#include "nic.h" +- +-/* OK, this is how the PCI support hack works: if pci.h is included before +- * this file is included, assume that the driver supports PCI. This means that +- * this file is usually included last. */ +- +-#ifdef PCI_H +-#define PCI_ARG(x) ,x +-#else +-#define PCI_ARG(x) +-#endif +- +-#ifdef INCLUDE_WD +-extern struct nic *wd_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_3C503 +-extern struct nic *t503_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_VIA_RHINE +-extern struct nic *rhine_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NE +-extern struct nic *ne_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NS8390 +-extern struct nic *nepci_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_3C509 +-extern struct nic *t509_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_3C529 +-extern struct nic *t529_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_3C595 +-extern struct nic *t595_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_3C90X +-extern struct nic *a3c90x_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_EEPRO +-extern struct nic *eepro_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_EEPRO100 +-extern struct nic *eepro100_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_EPIC100 +-extern struct nic *epic100_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_OTULIP +-extern struct nic *otulip_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_TULIP +-extern struct nic *tulip_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_DAVICOM +-extern struct nic *davicom_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_CS89X0 +-extern struct nic *cs89x0_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_LANCE +-extern struct nic *lancepci_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NE2100 +-extern struct nic *ne2100_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NI6510 +-extern struct nic *ni6510_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_SK_G16 +-extern struct nic *SK_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_3C507 +-extern struct nic *t507_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NI5010 +-extern struct nic *ni5010_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NI5210 +-extern struct nic *ni5210_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_EXOS205 +-extern struct nic *exos205_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_SMC9000 +-extern struct nic *smc9000_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_TIARA +-extern struct nic *tiara_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_DEPCA +-extern struct nic *depca_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_RTL8139 +-extern struct nic *rtl8139_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_W89C840 +-extern struct nic *w89c840_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_SIS900 +-extern struct nic *sis900_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_NATSEMI +-extern struct nic *natsemi_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#ifdef INCLUDE_TLAN +-extern struct nic *tlan_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-#endif /* CARDS_H */ +Index: b/netboot/config.c +=================================================================== +--- a/netboot/config.c ++++ b/netboot/config.c +@@ -1,598 +1,165 @@ + /* +- * GRUB -- GRand Unified Bootloader +- * Copyright (C) 2001,2002 Free Software Foundation, Inc. +- * +- * 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., 675 Mass Ave, Cambridge, MA 02139, USA. +- */ +- +-/* Based on "src/config.c" in etherboot-5.0.5. */ +- +-/* + * 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, or (at + * your option) any later version. + */ + +-#define GRUB 1 +-#include +-#include ++#include "grub.h" ++#include "pci.h" ++#include "isa.h" ++#include "nic.h" + +-#undef INCLUDE_PCI +-#if defined(INCLUDE_NS8390) || defined(INCLUDE_EEPRO100) || defined(INCLUDE_LANCE) || defined(INCLUDE_EPIC100) || defined(INCLUDE_TULIP) || defined(INCLUDE_OTULIP) || defined(INCLUDE_3C90X) || defined(INCLUDE_3C595) || defined(INCLUDE_RTL8139) || defined(INCLUDE_VIA_RHINE) || defined(INCLUDE_W89C840) || defined(INCLUDE_DAVICOM) || defined(INCLUDE_SIS900) || defined(INCLUDE_NATSEMI) || defined(INCLUDE_TLAN) +- /* || others later */ +-# define INCLUDE_PCI +-# include +-static unsigned short pci_ioaddrs[16]; +- +-static struct pci_device pci_nic_list[] = ++#ifdef CONFIG_PCI ++static int pci_probe(struct dev *dev, const char *type_name) + { +-#ifdef INCLUDE_NS8390 +- { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8029, +- "Realtek 8029", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940, +- "Winbond NE2000-PCI", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL2000, +- "Compex ReadyLink 2000", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_KTI, PCI_DEVICE_ID_KTI_ET32P2, +- "KTI ET32P2", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_NETVIN, PCI_DEVICE_ID_NETVIN_NV5000SC, +- "NetVin NV5000SC", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_HT80232, +- "Holtek HT80232", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_3C90X +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO, +- "3Com900-TPO", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO, +- "3Com900-Combo", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905TX, +- "3Com905-TX", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905T4, +- "3Com905-T4", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9004, +- "3Com900B-TPO", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9005, +- "3Com900B-Combo", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9006, +- "3Com900B-2/T", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x900A, +- "3Com900B-FL", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905B_TX, +- "3Com905B-TX", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9056, +- "3Com905B-T4", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x905A, +- "3Com905B-FL", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905C_TXM, +- "3Com905C-TXM", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9800, +- "3Com980-Cyclone", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9805, +- "3Com9805", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x7646, +- "3CSOHO100-TX", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_3C595 +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C590, +- "3Com590", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595, +- "3Com595", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_1, +- "3Com595", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_2, +- "3Com595", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO, +- "3Com900-TPO", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO, +- "3Com900-Combo", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9004, +- "3Com900B-TPO", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9005, +- "3Com900B-Combo", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9006, +- "3Com900B-2/T", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x900A, +- "3Com900B-FL", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9800, +- "3Com980-Cyclone", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x9805, +- "3Com9805", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_3COM, 0x7646, +- "3CSOHO100-TX", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_EEPRO100 +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82557, +- "Intel EtherExpressPro100", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82559ER, +- "Intel EtherExpressPro100 82559ER", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1029, +- "Intel EtherExpressPro100 ID1029", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1030, +- "Intel Corporation 82559 InBusiness 10/100", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82562, +- "Intel EtherExpressPro100 82562EM", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_EPIC100 +- { PCI_VENDOR_ID_SMC, PCI_DEVICE_ID_SMC_EPIC100, +- "SMC EtherPowerII", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_LANCE +- { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, +- "AMD Lance/PCI", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_AMD_HOMEPNA, PCI_DEVICE_ID_AMD_HOMEPNA, +- "AMD Lance/HomePNA", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_RTL8139 +- { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139, +- "Realtek 8139", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DLINK, PCI_DEVICE_ID_DFE530TXP, +- "DFE530TX+/DFE538TX", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_SMC_1211, PCI_DEVICE_ID_SMC_1211, +- "SMC EZ10/100", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_OTULIP +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, +- "Digital Tulip", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, +- "Digital Tulip Fast", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, +- "Digital Tulip+", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, +- "Digital Tulip 21142", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_TULIP +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, +- "Digital Tulip", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, +- "Digital Tulip Fast", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, +- "Digital Tulip+", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, +- "Digital Tulip 21142", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_MACRONIX, PCI_DEVICE_ID_MX987x5, +- "Macronix MX987x5", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_LC82C115, +- "LinkSys LNE100TX", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_DEC_TULIP, +- "Netgear FA310TX", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, +- "Davicom 9102", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9009, +- "Davicom 9009", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_ADMTEK, PCI_DEVICE_ID_ADMTEK_0985, +- "ADMtek Centaur-P", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_ADMTEK, 0x0981, +- "ADMtek AN981 Comet", 0, 0, 0, 0}, +- { 0x125B, 0x1400, +- "ASIX AX88140", 0, 0, 0, 0 }, +- { 0x11F6, 0x9881, +- "Compex RL100-TX", 0, 0, 0, 0 }, +-#endif +-#ifdef INCLUDE_DAVICOM +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, +- "Davicom 9102", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9009, +- "Davicom 9009", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_VIA_RHINE +- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_VT6102, +- "VIA 6102", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_RHINE_I, +- "VIA 3043", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_86C100A, +- "VIA 86C100A", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_W89C840 +- { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C840, +- "Winbond W89C840F", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL100ATX, +- "Compex RL100ATX", 0, 0, 0, 0}, +-#endif +-#ifdef INCLUDE_SIS900 +- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS900, +- "SIS900", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS7016, +- "SIS7016", 0, 0, 0, 0}, +-#endif +- +-#ifdef INCLUDE_NATSEMI +- { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_DP83815, +- "DP83815", 0, 0, 0, 0}, +-#endif +- +-#ifdef INCLUDE_TLAN +- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2326, +- "OC2326", 0, 0, 0, 0}, ++/* ++ * NIC probing is in pci device order, followed by the ++ * link order of the drivers. A driver that matches ++ * on vendor and device id will supersede a driver ++ * that matches on pci class. ++ * ++ * If you want to probe for another device behind the same pci ++ * device just increment index. And the previous probe call ++ * will be repeated. ++ */ ++ struct pci_probe_state *state = &dev->state.pci; ++ printf("Probing pci %s...\n", type_name); ++ if (dev->how_probe == PROBE_FIRST) { ++ state->advance = 1; ++ state->dev.driver = 0; ++ state->dev.bus = 0; ++ state->dev.devfn = 0; ++ dev->index = -1; ++ } ++ for(;;) { ++ if ((dev->how_probe != PROBE_AWAKE) && state->advance) { ++ find_pci(dev->type, &state->dev); ++ dev->index = -1; ++ } ++ state->advance = 1; ++ ++ if (state->dev.driver == 0) ++ break; ++ ++#if 0 ++ /* FIXME the romaddr code needs a total rethought to be useful */ ++ if (state->dev.romaddr != ((unsigned long) rom.rom_segment << 4)) { ++ continue; ++ } ++#endif ++ if (dev->how_probe != PROBE_AWAKE) { ++ dev->type_index++; ++ } ++ dev->devid.bus_type = PCI_BUS_TYPE; ++ dev->devid.vendor_id = htons(state->dev.vendor); ++ dev->devid.device_id = htons(state->dev.dev_id); ++ /* FIXME how do I handle dev->index + PROBE_AGAIN?? */ ++ ++ printf("[%s]", state->dev.name); ++ if (state->dev.driver->probe(dev, &state->dev)) { ++ state->advance = (dev->index == -1); ++ return PROBE_WORKED; ++ } ++ putchar('\n'); ++ } ++ return PROBE_FAILED; ++} + #endif + +- /* other PCI NICs go here */ +- {0, 0, NULL, 0, 0, 0, 0} +-}; +-#endif /* INCLUDE_*PCI */ +- +-#include +- +-#ifdef INCLUDE_PCI +-struct pci_dispatch_table ++#ifdef CONFIG_ISA ++static int isa_probe(struct dev *dev, const char *type_name) + { +- unsigned short vendor; +- unsigned short dev_id; +- struct nic *(*eth_probe) (struct nic *, unsigned short *, +- struct pci_device *); +-}; +- +-static struct pci_dispatch_table PCI_NIC[] = +-{ +-# ifdef INCLUDE_NS8390 +- { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8029, nepci_probe }, +- { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C940, nepci_probe }, +- { PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL2000, nepci_probe }, +- { PCI_VENDOR_ID_KTI, PCI_DEVICE_ID_KTI_ET32P2, nepci_probe }, +- { PCI_VENDOR_ID_NETVIN, PCI_DEVICE_ID_NETVIN_NV5000SC, nepci_probe }, +- { PCI_VENDOR_ID_HOLTEK, PCI_DEVICE_ID_HOLTEK_HT80232, nepci_probe }, +-# endif /* INCLUDE_NS8390 */ +-# ifdef INCLUDE_3C90X +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905TX, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905T4, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x9004, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x9005, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x9006, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x900A, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905B_TX, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x9056, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x905A, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C905C_TXM, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x9800, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x9805, a3c90x_probe }, +- { PCI_VENDOR_ID_3COM, 0x7646, a3c90x_probe }, +-# endif /* INCLUDE_3C90X */ +-# ifdef INCLUDE_3C595 +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C590, t595_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595, t595_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_1, t595_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C595_2, t595_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900TPO, t595_probe }, +- { PCI_VENDOR_ID_3COM, PCI_DEVICE_ID_3COM_3C900COMBO, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x9004, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x9005, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x9006, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x900A, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x9800, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x9805, t595_probe }, +- { PCI_VENDOR_ID_3COM, 0x7646, t595_probe }, +-# endif /* INCLUDE_3C595 */ +-# ifdef INCLUDE_EEPRO100 +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82557, eepro100_probe }, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82559ER, eepro100_probe }, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1029, eepro100_probe }, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ID1030, eepro100_probe }, +- { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82562, eepro100_probe }, +-# endif /* INCLUDE_EEPRO100 */ +-# ifdef INCLUDE_EPIC100 +- { PCI_VENDOR_ID_SMC, PCI_DEVICE_ID_SMC_EPIC100, epic100_probe }, +-# endif /* INCLUDE_EPIC100 */ +-# ifdef INCLUDE_LANCE +- { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_LANCE, lancepci_probe }, +- { PCI_VENDOR_ID_AMD_HOMEPNA, PCI_DEVICE_ID_AMD_HOMEPNA, lancepci_probe }, +-# endif /* INCLUDE_LANCE */ +-# ifdef INCLUDE_RTL8139 +- { PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139, rtl8139_probe }, +- { PCI_VENDOR_ID_DLINK, PCI_DEVICE_ID_DFE530TXP, rtl8139_probe }, +- { PCI_VENDOR_ID_SMC_1211, PCI_DEVICE_ID_SMC_1211, rtl8139_probe }, +-# endif /* INCLUDE_RTL8139 */ +-# ifdef INCLUDE_OTULIP +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, otulip_probe }, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, otulip_probe }, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, otulip_probe }, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, otulip_probe }, +-# endif /* INCLUDE_OTULIP */ +-# ifdef INCLUDE_TULIP +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP, tulip_probe }, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_FAST, tulip_probe }, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_TULIP_PLUS, tulip_probe }, +- { PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142, tulip_probe }, +- { PCI_VENDOR_ID_MACRONIX, PCI_DEVICE_ID_MX987x5, tulip_probe }, +- { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_LC82C115, tulip_probe }, +- { PCI_VENDOR_ID_LINKSYS, PCI_DEVICE_ID_DEC_TULIP, tulip_probe }, +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, tulip_probe }, +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9009, tulip_probe }, +- { PCI_VENDOR_ID_ADMTEK, PCI_DEVICE_ID_ADMTEK_0985, tulip_probe }, +- { PCI_VENDOR_ID_ADMTEK, 0x0981, tulip_probe }, +- { 0x125B, 0x1400, tulip_probe }, +- { 0x11F6, 0x9881, tulip_probe }, +-# endif /* INCLUDE_TULIP */ +-# ifdef INCLUDE_DAVICOM +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9102, davicom_probe }, +- { PCI_VENDOR_ID_DAVICOM, PCI_DEVICE_ID_DM9009, davicom_probe }, +-# endif /* INCLUDE_DAVICOM */ +-# ifdef INCLUDE_VIA_RHINE +- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_VT6102, rhine_probe }, +- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_RHINE_I, rhine_probe }, +- { PCI_VENDOR_ID_VIATEC, PCI_DEVICE_ID_VIA_86C100A, rhine_probe }, +-# endif /* INCLUDE_VIA_RHINE */ +-# ifdef INCLUDE_W89C840 +- { PCI_VENDOR_ID_WINBOND2, PCI_DEVICE_ID_WINBOND2_89C840, w89c840_probe }, +- { PCI_VENDOR_ID_COMPEX, PCI_DEVICE_ID_COMPEX_RL100ATX, w89c840_probe }, +-# endif /* INCLUDE_W89C840 */ +-# ifdef INCLUDE_SIS900 +- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS900, sis900_probe }, +- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS7016, sis900_probe }, +-# endif /* INCLUDE_SIS900 */ +-# ifdef INCLUDE_NATSEMI +- { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_DP83815, natsemi_probe }, +-# endif /* INCLUDE_NATSEMI */ +-# ifdef INCLUDE_TLAN +- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2326, tlan_probe }, +-# endif /* INCLUDE_TLAN */ +- { 0, 0, 0 } +-}; +-#endif /* GRUB && INCLUDE_PCI */ +- +-struct dispatch_table +-{ +- const char *nic_name; +-#ifdef INCLUDE_PCI +- struct nic *(*eth_probe) (struct nic *, unsigned short *, +- struct pci_device *); +-#else +- struct nic *(*eth_probe) (struct nic *, unsigned short *); +-#endif /* INCLUDE_PCI */ +- unsigned short *probe_ioaddrs; /* for probe overrides */ +-}; +- + /* +- * NIC probing is in order of appearance in this table. ++ * NIC probing is in the order the drivers were linked togeter. + * If for some reason you want to change the order, +- * just rearrange the entries (bracketed by the #ifdef/#endif) ++ * just change the order you list the drivers in. + */ +-static struct dispatch_table NIC[] = +-{ +-#ifdef INCLUDE_RTL8139 +- { "RTL8139", rtl8139_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_SIS900 +- { "SIS900", sis900_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_NATSEMI +- { "NATSEMI", natsemi_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_WD +- { "WD", wd_probe, 0 }, +-#endif +-#ifdef INCLUDE_3C503 +- { "3C503", t503_probe, 0 }, +-#endif +-#ifdef INCLUDE_NE +- { "NE*000", ne_probe, 0 }, +-#endif +-#ifdef INCLUDE_3C509 +- { "3C5x9", t509_probe, 0 }, +-#endif +-#ifdef INCLUDE_3C529 +- { "3C5x9", t529_probe, 0 }, +-#endif +-#ifdef INCLUDE_3C595 +- { "3C595", t595_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_3C90X +- { "3C90X", a3c90x_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_EEPRO +- { "EEPRO", eepro_probe, 0 }, +-#endif +-#ifdef INCLUDE_EEPRO100 +- { "EEPRO100", eepro100_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_EPIC100 +- { "EPIC100", epic100_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_OTULIP +- { "OTulip", otulip_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_TULIP +- { "Tulip", tulip_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_DAVICOM +- { "DAVICOM", davicom_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_CS89X0 +- { "CS89x0", cs89x0_probe, 0 }, +-#endif +-#ifdef INCLUDE_NE2100 +- { "NE2100", ne2100_probe, 0 }, +-#endif +-#ifdef INCLUDE_NI6510 +- { "NI6510", ni6510_probe, 0 }, +-#endif +-#ifdef INCLUDE_SK_G16 +- { "SK_G16", SK_probe, 0 }, +-#endif +-#ifdef INCLUDE_3C507 +- { "3C507", t507_probe, 0 }, +-#endif +-#ifdef INCLUDE_NI5010 +- { "NI5010", ni5010_probe, 0 }, +-#endif +-#ifdef INCLUDE_NI5210 +- { "NI5210", ni5210_probe, 0 }, +-#endif +-#ifdef INCLUDE_EXOS205 +- { "EXOS205", exos205_probe, 0 }, +-#endif +-#ifdef INCLUDE_SMC9000 +- { "SMC9000", smc9000_probe, 0 }, +-#endif +-#ifdef INCLUDE_TIARA +- { "TIARA", tiara_probe, 0 }, +-#endif +-#ifdef INCLUDE_DEPCA +- { "DEPCA", depca_probe, 0 }, +-#endif +-#ifdef INCLUDE_NS8390 +- { "NE2000/PCI", nepci_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_LANCE +- { "LANCE/PCI", lancepci_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_VIA_RHINE +- { "VIA 86C100", rhine_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_W89C840 +- { "W89C840F", w89c840_probe, pci_ioaddrs }, +-#endif +-#ifdef INCLUDE_TLAN +- { "Olicom 2326", tlan_probe, pci_ioaddrs }, +-#endif +- /* this entry must always be last to mark the end of list */ +- { 0, 0, 0 } +-}; +- +-#define NIC_TABLE_SIZE (sizeof (NIC) / sizeof (NIC[0])) +- +-static int +-eth_dummy (struct nic *dummy) +-{ +- return 0; ++ struct isa_probe_state *state = &dev->state.isa; ++ printf("Probing isa %s...\n", type_name); ++ if (dev->how_probe == PROBE_FIRST) { ++ state->advance = 0; ++ state->driver = isa_drivers; ++ dev->index = -1; ++ } ++ for(;;) ++ { ++ if ((dev->how_probe != PROBE_AWAKE) && state->advance) { ++ state->driver++; ++ dev->index = -1; ++ } ++ state->advance = 1; ++ ++ if (state->driver >= isa_drivers_end) ++ break; ++ ++ if (state->driver->type != dev->type) ++ continue; ++ ++ if (dev->how_probe != PROBE_AWAKE) { ++ dev->type_index++; ++ } ++ printf("[%s]", state->driver->name); ++ dev->devid.bus_type = ISA_BUS_TYPE; ++ /* FIXME how do I handle dev->index + PROBE_AGAIN?? */ ++ /* driver will fill in vendor and device IDs */ ++ if (state->driver->probe(dev, state->driver->ioaddrs)) { ++ state->advance = (dev->index == -1); ++ return PROBE_WORKED; ++ } ++ putchar('\n'); ++ } ++ return PROBE_FAILED; + } +- +-static char packet[ETH_FRAME_LEN]; +- +-struct nic nic = +-{ +- (void (*) (struct nic *)) eth_dummy, /* reset */ +- eth_dummy, /* poll */ +- (void (*) (struct nic *, const char *, +- unsigned int, unsigned int, +- const char *)) eth_dummy, /* transmit */ +- (void (*) (struct nic *)) eth_dummy, /* disable */ +-#ifdef T503_AUI +- 1, /* aui */ + #else +- 0, /* no aui */ ++#define isa_probe(d,tn) (PROBE_FAILED) + #endif +- &rom, /* rom_info */ +- arptable[ARP_CLIENT].node, /* node_addr */ +- packet, /* packet */ +- 0, /* packetlen */ +- 0, /* priv_data */ ++static const char *driver_name[] = { ++ "nic", ++ "disk", ++ "floppy", + }; +- +-void +-eth_reset (void) ++int probe(struct dev *dev) + { +- (*nic.reset) (&nic); +-} ++ const char *type_name; + +-int +-eth_probe (void) +-{ +- struct pci_device *p; +- const struct dispatch_table *t; +- static int probed = 0; ++ EnterFunction("probe"); + +- /* If already probed, don't try to probe it any longer. */ +- if (probed) +- return 1; +- +- /* Clear the ready flag. */ +- network_ready = 0; +- /* Clear the ARP table. */ +- grub_memset ((char *) arptable, 0, +- MAX_ARP * sizeof (struct arptable_t)); +- +- p = 0; +- +-#ifdef INCLUDE_PCI +- /* In GRUB, the ROM info is initialized here. */ +- rom = *((struct rom_info *) ROM_INFO_LOCATION); +- +- eth_pci_init(pci_nic_list); +- pci_ioaddrs[0] = 0; +- pci_ioaddrs[1] = 0; +- /* at this point we have a list of possible PCI candidates +- we just pick the first one with a non-zero ioaddr */ +- for (p = pci_nic_list; p->vendor != 0; ++p) +- { +- if (p->ioaddr != 0) +- { +- pci_ioaddrs[0] = p->ioaddr; +- break; ++ type_name = ""; ++ if ((dev->type >= 0) && ++ (dev->type < sizeof(driver_name)/sizeof(driver_name[0]))) { ++ type_name = driver_name[dev->type]; + } +- } +-#endif +- +- etherboot_printf("Probing..."); +- +-#ifdef INCLUDE_PCI +- if (p->vendor) +- { +- struct pci_dispatch_table *pt; +- +- for (pt = PCI_NIC; pt->eth_probe != 0; pt++) +- if (p->vendor == pt->vendor && p->dev_id == pt->dev_id) +- { +- etherboot_printf ("[%s]", p->name); +- if ((pt->eth_probe) (&nic, pci_ioaddrs, p)) +- { +- probed = 1; +- return 1; +- } +- } +- } +-#endif /* INCLUDE_PCI */ +- +- for (t = NIC; t->nic_name != 0; ++t) +- { +- etherboot_printf("[%s]", t->nic_name); +-#ifdef INCLUDE_PCI +- if ((*t->eth_probe) (&nic, t->probe_ioaddrs, p)) +- { +- probed = 1; +- return 1; ++ if (dev->how_probe == PROBE_FIRST) { ++ dev->to_probe = PROBE_PCI; ++ memset(&dev->state, 0, sizeof(dev->state)); + } +-#else +- if ((*t->eth_probe) (&nic, t->probe_ioaddrs)) +- { +- probed = 1; +- return 1; ++ if (dev->to_probe == PROBE_PCI) { ++ dev->how_probe = pci_probe(dev, type_name); ++ if (dev->how_probe == PROBE_FAILED) { ++ dev->to_probe = PROBE_ISA; ++ } ++ } ++ if (dev->to_probe == PROBE_ISA) { ++ dev->how_probe = isa_probe(dev, type_name); ++ if (dev->how_probe == PROBE_FAILED) { ++ dev->to_probe = PROBE_NONE; ++ } ++ } ++ if ((dev->to_probe != PROBE_PCI) && ++ (dev->to_probe != PROBE_ISA)) { ++ dev->how_probe = PROBE_FAILED; ++ + } +-#endif /* INCLUDE_PCI */ +- } +- +- return 0; +-} +- +-int +-eth_poll (void) +-{ +- return ((*nic.poll) (&nic)); +-} + +-void +-eth_transmit (const char *d, unsigned int t, unsigned int s, const void *p) +-{ +- (*nic.transmit) (&nic, d, t, s, p); +- if (t == IP) +- twiddle (); ++ LeaveFunction("probe"); ++ return dev->how_probe; + } + +-void +-eth_disable (void) ++void disable(struct dev *dev) + { +- (*nic.disable) (&nic); ++ if (dev->disable) { ++ dev->disable(dev); ++ dev->disable = 0; ++ } + } +Index: b/netboot/cpu.h +=================================================================== +--- /dev/null ++++ b/netboot/cpu.h +@@ -0,0 +1,243 @@ ++#ifndef I386_BITS_CPU_H ++#define I386_BITS_CPU_H ++ ++ ++/* Sample usage: CPU_FEATURE_P(cpu.x86_capability, FPU) */ ++#define CPU_FEATURE_P(CAP, FEATURE) \ ++ (!!(CAP[(X86_FEATURE_##FEATURE)/32] & ((X86_FEATURE_##FEATURE) & 0x1f))) ++ ++#define NCAPINTS 4 /* Currently we have 4 32-bit words worth of info */ ++ ++/* Intel-defined CPU features, CPUID level 0x00000001, word 0 */ ++#define X86_FEATURE_FPU (0*32+ 0) /* Onboard FPU */ ++#define X86_FEATURE_VME (0*32+ 1) /* Virtual Mode Extensions */ ++#define X86_FEATURE_DE (0*32+ 2) /* Debugging Extensions */ ++#define X86_FEATURE_PSE (0*32+ 3) /* Page Size Extensions */ ++#define X86_FEATURE_TSC (0*32+ 4) /* Time Stamp Counter */ ++#define X86_FEATURE_MSR (0*32+ 5) /* Model-Specific Registers, RDMSR, WRMSR */ ++#define X86_FEATURE_PAE (0*32+ 6) /* Physical Address Extensions */ ++#define X86_FEATURE_MCE (0*32+ 7) /* Machine Check Architecture */ ++#define X86_FEATURE_CX8 (0*32+ 8) /* CMPXCHG8 instruction */ ++#define X86_FEATURE_APIC (0*32+ 9) /* Onboard APIC */ ++#define X86_FEATURE_SEP (0*32+11) /* SYSENTER/SYSEXIT */ ++#define X86_FEATURE_MTRR (0*32+12) /* Memory Type Range Registers */ ++#define X86_FEATURE_PGE (0*32+13) /* Page Global Enable */ ++#define X86_FEATURE_MCA (0*32+14) /* Machine Check Architecture */ ++#define X86_FEATURE_CMOV (0*32+15) /* CMOV instruction (FCMOVCC and FCOMI too if FPU present) */ ++#define X86_FEATURE_PAT (0*32+16) /* Page Attribute Table */ ++#define X86_FEATURE_PSE36 (0*32+17) /* 36-bit PSEs */ ++#define X86_FEATURE_PN (0*32+18) /* Processor serial number */ ++#define X86_FEATURE_CLFLSH (0*32+19) /* Supports the CLFLUSH instruction */ ++#define X86_FEATURE_DTES (0*32+21) /* Debug Trace Store */ ++#define X86_FEATURE_ACPI (0*32+22) /* ACPI via MSR */ ++#define X86_FEATURE_MMX (0*32+23) /* Multimedia Extensions */ ++#define X86_FEATURE_FXSR (0*32+24) /* FXSAVE and FXRSTOR instructions (fast save and restore */ ++ /* of FPU context), and CR4.OSFXSR available */ ++#define X86_FEATURE_XMM (0*32+25) /* Streaming SIMD Extensions */ ++#define X86_FEATURE_XMM2 (0*32+26) /* Streaming SIMD Extensions-2 */ ++#define X86_FEATURE_SELFSNOOP (0*32+27) /* CPU self snoop */ ++#define X86_FEATURE_HT (0*32+28) /* Hyper-Threading */ ++#define X86_FEATURE_ACC (0*32+29) /* Automatic clock control */ ++#define X86_FEATURE_IA64 (0*32+30) /* IA-64 processor */ ++ ++/* AMD-defined CPU features, CPUID level 0x80000001, word 1 */ ++/* Don't duplicate feature flags which are redundant with Intel! */ ++#define X86_FEATURE_SYSCALL (1*32+11) /* SYSCALL/SYSRET */ ++#define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */ ++#define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */ ++#define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */ ++#define X86_FEATURE_3DNOW (1*32+31) /* 3DNow! */ ++ ++/* Transmeta-defined CPU features, CPUID level 0x80860001, word 2 */ ++#define X86_FEATURE_RECOVERY (2*32+ 0) /* CPU in recovery mode */ ++#define X86_FEATURE_LONGRUN (2*32+ 1) /* Longrun power control */ ++#define X86_FEATURE_LRTI (2*32+ 3) /* LongRun table interface */ ++ ++/* Other features, Linux-defined mapping, word 3 */ ++/* This range is used for feature bits which conflict or are synthesized */ ++#define X86_FEATURE_CXMMX (3*32+ 0) /* Cyrix MMX extensions */ ++#define X86_FEATURE_K6_MTRR (3*32+ 1) /* AMD K6 nonstandard MTRRs */ ++#define X86_FEATURE_CYRIX_ARR (3*32+ 2) /* Cyrix ARRs (= MTRRs) */ ++#define X86_FEATURE_CENTAUR_MCR (3*32+ 3) /* Centaur MCRs (= MTRRs) */ ++ ++#define MAX_X86_VENDOR_ID 16 ++struct cpuinfo_x86 { ++ uint8_t x86; /* CPU family */ ++ uint8_t x86_model; ++ uint8_t x86_mask; ++ ++ int cpuid_level; /* Maximum supported CPUID level, -1=no CPUID */ ++ unsigned x86_capability[NCAPINTS]; ++ char x86_vendor_id[MAX_X86_VENDOR_ID]; ++}; ++ ++ ++#define X86_VENDOR_INTEL 0 ++#define X86_VENDOR_CYRIX 1 ++#define X86_VENDOR_AMD 2 ++#define X86_VENDOR_UMC 3 ++#define X86_VENDOR_NEXGEN 4 ++#define X86_VENDOR_CENTAUR 5 ++#define X86_VENDOR_RISE 6 ++#define X86_VENDOR_TRANSMETA 7 ++#define X86_VENDOR_NSC 8 ++#define X86_VENDOR_UNKNOWN 0xff ++ ++/* ++ * EFLAGS bits ++ */ ++#define X86_EFLAGS_CF 0x00000001 /* Carry Flag */ ++#define X86_EFLAGS_PF 0x00000004 /* Parity Flag */ ++#define X86_EFLAGS_AF 0x00000010 /* Auxillary carry Flag */ ++#define X86_EFLAGS_ZF 0x00000040 /* Zero Flag */ ++#define X86_EFLAGS_SF 0x00000080 /* Sign Flag */ ++#define X86_EFLAGS_TF 0x00000100 /* Trap Flag */ ++#define X86_EFLAGS_IF 0x00000200 /* Interrupt Flag */ ++#define X86_EFLAGS_DF 0x00000400 /* Direction Flag */ ++#define X86_EFLAGS_OF 0x00000800 /* Overflow Flag */ ++#define X86_EFLAGS_IOPL 0x00003000 /* IOPL mask */ ++#define X86_EFLAGS_NT 0x00004000 /* Nested Task */ ++#define X86_EFLAGS_RF 0x00010000 /* Resume Flag */ ++#define X86_EFLAGS_VM 0x00020000 /* Virtual Mode */ ++#define X86_EFLAGS_AC 0x00040000 /* Alignment Check */ ++#define X86_EFLAGS_VIF 0x00080000 /* Virtual Interrupt Flag */ ++#define X86_EFLAGS_VIP 0x00100000 /* Virtual Interrupt Pending */ ++#define X86_EFLAGS_ID 0x00200000 /* CPUID detection flag */ ++ ++/* ++ * Generic CPUID function ++ */ ++static inline void cpuid(int op, ++ unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx) ++{ ++ __asm__("cpuid" ++ : "=a" (*eax), ++ "=b" (*ebx), ++ "=c" (*ecx), ++ "=d" (*edx) ++ : "0" (op)); ++} ++ ++/* ++ * CPUID functions returning a single datum ++ */ ++static inline unsigned int cpuid_eax(unsigned int op) ++{ ++ unsigned int eax; ++ ++ __asm__("cpuid" ++ : "=a" (eax) ++ : "0" (op) ++ : "bx", "cx", "dx"); ++ return eax; ++} ++static inline unsigned int cpuid_ebx(unsigned int op) ++{ ++ unsigned int eax, ebx; ++ ++ __asm__("cpuid" ++ : "=a" (eax), "=b" (ebx) ++ : "0" (op) ++ : "cx", "dx" ); ++ return ebx; ++} ++static inline unsigned int cpuid_ecx(unsigned int op) ++{ ++ unsigned int eax, ecx; ++ ++ __asm__("cpuid" ++ : "=a" (eax), "=c" (ecx) ++ : "0" (op) ++ : "bx", "dx" ); ++ return ecx; ++} ++static inline unsigned int cpuid_edx(unsigned int op) ++{ ++ unsigned int eax, edx; ++ ++ __asm__("cpuid" ++ : "=a" (eax), "=d" (edx) ++ : "0" (op) ++ : "bx", "cx"); ++ return edx; ++} ++ ++/* ++ * Intel CPU features in CR4 ++ */ ++#define X86_CR4_VME 0x0001 /* enable vm86 extensions */ ++#define X86_CR4_PVI 0x0002 /* virtual interrupts flag enable */ ++#define X86_CR4_TSD 0x0004 /* disable time stamp at ipl 3 */ ++#define X86_CR4_DE 0x0008 /* enable debugging extensions */ ++#define X86_CR4_PSE 0x0010 /* enable page size extensions */ ++#define X86_CR4_PAE 0x0020 /* enable physical address extensions */ ++#define X86_CR4_MCE 0x0040 /* Machine check enable */ ++#define X86_CR4_PGE 0x0080 /* enable global pages */ ++#define X86_CR4_PCE 0x0100 /* enable performance counters at ipl 3 */ ++#define X86_CR4_OSFXSR 0x0200 /* enable fast FPU save and restore */ ++#define X86_CR4_OSXMMEXCPT 0x0400 /* enable unmasked SSE exceptions */ ++ ++ ++#define MSR_K6_EFER 0xC0000080 ++/* EFER bits: */ ++#define _EFER_SCE 0 /* SYSCALL/SYSRET */ ++#define _EFER_LME 8 /* Long mode enable */ ++#define _EFER_LMA 10 /* Long mode active (read-only) */ ++#define _EFER_NX 11 /* No execute enable */ ++ ++#define EFER_SCE (1<<_EFER_SCE) ++#define EFER_LME (1< +- +- * disabled all "advanced" features; this should make the code more reliable +- +- * reorganized the reset function +- +- * always reset the address port, so that autoprobing will continue working +- +- * some cosmetic changes +- +- * 2.5 +- +- Thu Dec 5 21:00:00 1996 Markus Gutschke +- +- * tested the code against a CS8900 card +- +- * lots of minor bug fixes and adjustments +- +- * this is the first release, that actually works! it still requires some +- changes in order to be more tolerant to different environments +- +- * 4 +- +- Fri Nov 22 23:00:00 1996 Markus Gutschke +- +- * read the manuals for the CS89x0 chipsets and took note of all the +- changes that will be neccessary in order to adapt Russel Nelson's code +- to the requirements of a BOOT-Prom +- +- * 6 +- +- Thu Nov 19 22:00:00 1996 Markus Gutschke +- +- * Synched with Russel Nelson's current code (v1.00) +- +- * 2 +- +- Thu Nov 12 18:00:00 1996 Markus Gutschke +- +- * Cleaned up some of the code and tried to optimize the code size. +- +- * 1.5 +- +- Sun Nov 10 16:30:00 1996 Markus Gutschke +- +- * First experimental release. This code compiles fine, but I +- have no way of testing whether it actually works. +- +- * I did not (yet) bother to make the code 16bit aware, so for +- the time being, it will only work for Etherboot/32. +- +- * 12 +- +- */ +- +-#include "etherboot.h" +-#include "nic.h" +-#include "cards.h" +-#include "cs89x0.h" +- +-static unsigned short eth_nic_base; +-static unsigned long eth_mem_start; +-static unsigned short eth_irq; +-static unsigned short eth_cs_type; /* one of: CS8900, CS8920, CS8920M */ +-static unsigned short eth_auto_neg_cnf; +-static unsigned short eth_adapter_cnf; +-static unsigned short eth_linectl; +- +-/************************************************************************* +- CS89x0 - specific routines +-**************************************************************************/ +- +-static inline int readreg(int portno) +-{ +- outw(portno, eth_nic_base + ADD_PORT); +- return inw(eth_nic_base + DATA_PORT); +-} +- +-static inline void writereg(int portno, int value) +-{ +- outw(portno, eth_nic_base + ADD_PORT); +- outw(value, eth_nic_base + DATA_PORT); +- return; +-} +- +-/************************************************************************* +-EEPROM access +-**************************************************************************/ +- +-static int wait_eeprom_ready(void) +-{ +- unsigned long tmo = currticks() + 4*TICKS_PER_SEC; +- +- /* check to see if the EEPROM is ready, a timeout is used - +- just in case EEPROM is ready when SI_BUSY in the +- PP_SelfST is clear */ +- while(readreg(PP_SelfST) & SI_BUSY) { +- if (currticks() >= tmo) +- return -1; } +- return 0; +-} +- +-static int get_eeprom_data(int off, int len, unsigned short *buffer) +-{ +- int i; +- +-#ifdef EDEBUG +- printf("\ncs: EEPROM data from %hX for %hX:",off,len); +-#endif +- for (i = 0; i < len; i++) { +- if (wait_eeprom_ready() < 0) +- return -1; +- /* Now send the EEPROM read command and EEPROM location +- to read */ +- writereg(PP_EECMD, (off + i) | EEPROM_READ_CMD); +- if (wait_eeprom_ready() < 0) +- return -1; +- buffer[i] = readreg(PP_EEData); +-#ifdef EDEBUG +- if (!(i%10)) +- printf("\ncs: "); +- printf("%hX ", buffer[i]); +-#endif +- } +-#ifdef EDEBUG +- putchar('\n'); +-#endif +- +- return(0); +-} +- +-static int get_eeprom_chksum(int off, int len, unsigned short *buffer) +-{ +- int i, cksum; +- +- cksum = 0; +- for (i = 0; i < len; i++) +- cksum += buffer[i]; +- cksum &= 0xffff; +- if (cksum == 0) +- return 0; +- return -1; +-} +- +-/************************************************************************* +-Activate all of the available media and probe for network +-**************************************************************************/ +- +-static void clrline(void) +-{ +- int i; +- +- putchar('\r'); +- for (i = 79; i--; ) putchar(' '); +- printf("\rcs: "); +- return; +-} +- +-static void control_dc_dc(int on_not_off) +-{ +- unsigned int selfcontrol; +- unsigned long tmo = currticks() + TICKS_PER_SEC; +- +- /* control the DC to DC convertor in the SelfControl register. */ +- selfcontrol = HCB1_ENBL; /* Enable the HCB1 bit as an output */ +- if (((eth_adapter_cnf & A_CNF_DC_DC_POLARITY) != 0) ^ on_not_off) +- selfcontrol |= HCB1; +- else +- selfcontrol &= ~HCB1; +- writereg(PP_SelfCTL, selfcontrol); +- +- /* Wait for the DC/DC converter to power up - 1000ms */ +- while (currticks() < tmo); +- +- return; +-} +- +-static int detect_tp(void) +-{ +- unsigned long tmo; +- +- /* Turn on the chip auto detection of 10BT/ AUI */ +- +- clrline(); printf("attempting %s:","TP"); +- +- /* If connected to another full duplex capable 10-Base-T card +- the link pulses seem to be lost when the auto detect bit in +- the LineCTL is set. To overcome this the auto detect bit +- will be cleared whilst testing the 10-Base-T interface. +- This would not be necessary for the sparrow chip but is +- simpler to do it anyway. */ +- writereg(PP_LineCTL, eth_linectl &~ AUI_ONLY); +- control_dc_dc(0); +- +- /* Delay for the hardware to work out if the TP cable is +- present - 150ms */ +- for (tmo = currticks() + 4; currticks() < tmo; ); +- +- if ((readreg(PP_LineST) & LINK_OK) == 0) +- return 0; +- +- if (eth_cs_type != CS8900) { +- +- writereg(PP_AutoNegCTL, eth_auto_neg_cnf & AUTO_NEG_MASK); +- +- if ((eth_auto_neg_cnf & AUTO_NEG_BITS) == AUTO_NEG_ENABLE) { +- printf(" negotiating duplex... "); +- while (readreg(PP_AutoNegST) & AUTO_NEG_BUSY) { +- if (currticks() - tmo > 40*TICKS_PER_SEC) { +- printf("time out "); +- break; +- } +- } +- } +- if (readreg(PP_AutoNegST) & FDX_ACTIVE) +- printf("using full duplex"); +- else +- printf("using half duplex"); +- } +- +- return A_CNF_MEDIA_10B_T; +-} +- +-/* send a test packet - return true if carrier bits are ok */ +-static int send_test_pkt(struct nic *nic) +-{ +- static unsigned char testpacket[] = { 0,0,0,0,0,0, 0,0,0,0,0,0, +- 0, 46, /*A 46 in network order */ +- 0, 0, /*DSAP=0 & SSAP=0 fields */ +- 0xf3,0 /*Control (Test Req+P bit set)*/ }; +- unsigned long tmo; +- +- writereg(PP_LineCTL, readreg(PP_LineCTL) | SERIAL_TX_ON); +- +- memcpy(testpacket, nic->node_addr, ETH_ALEN); +- memcpy(testpacket+ETH_ALEN, nic->node_addr, ETH_ALEN); +- +- outw(TX_AFTER_ALL, eth_nic_base + TX_CMD_PORT); +- outw(ETH_ZLEN, eth_nic_base + TX_LEN_PORT); +- +- /* Test to see if the chip has allocated memory for the packet */ +- for (tmo = currticks() + 2; +- (readreg(PP_BusST) & READY_FOR_TX_NOW) == 0; ) +- if (currticks() >= tmo) +- return(0); +- +- /* Write the contents of the packet */ +- outsw(eth_nic_base + TX_FRAME_PORT, testpacket, +- (ETH_ZLEN+1)>>1); +- +- printf(" sending test packet "); +- /* wait a couple of timer ticks for packet to be received */ +- for (tmo = currticks() + 2; currticks() < tmo; ); +- +- if ((readreg(PP_TxEvent) & TX_SEND_OK_BITS) == TX_OK) { +- printf("succeeded"); +- return 1; +- } +- printf("failed"); +- return 0; +-} +- +- +-static int detect_aui(struct nic *nic) +-{ +- clrline(); printf("attempting %s:","AUI"); +- control_dc_dc(0); +- +- writereg(PP_LineCTL, (eth_linectl & ~AUTO_AUI_10BASET) | AUI_ONLY); +- +- if (send_test_pkt(nic)) { +- return A_CNF_MEDIA_AUI; } +- else +- return 0; +-} +- +-static int detect_bnc(struct nic *nic) +-{ +- clrline(); printf("attempting %s:","BNC"); +- control_dc_dc(1); +- +- writereg(PP_LineCTL, (eth_linectl & ~AUTO_AUI_10BASET) | AUI_ONLY); +- +- if (send_test_pkt(nic)) { +- return A_CNF_MEDIA_10B_2; } +- else +- return 0; +-} +- +-/************************************************************************** +-ETH_RESET - Reset adapter +-***************************************************************************/ +- +-static void cs89x0_reset(struct nic *nic) +-{ +- int i; +- unsigned long reset_tmo; +- +- writereg(PP_SelfCTL, readreg(PP_SelfCTL) | POWER_ON_RESET); +- +- /* wait for two ticks; that is 2*55ms */ +- for (reset_tmo = currticks() + 2; currticks() < reset_tmo; ); +- +- if (eth_cs_type != CS8900) { +- /* Hardware problem requires PNP registers to be reconfigured +- after a reset */ +- if (eth_irq != 0xFFFF) { +- outw(PP_CS8920_ISAINT, eth_nic_base + ADD_PORT); +- outb(eth_irq, eth_nic_base + DATA_PORT); +- outb(0, eth_nic_base + DATA_PORT + 1); } +- +- if (eth_mem_start) { +- outw(PP_CS8920_ISAMemB, eth_nic_base + ADD_PORT); +- outb((eth_mem_start >> 8) & 0xff, eth_nic_base + DATA_PORT); +- outb((eth_mem_start >> 24) & 0xff, eth_nic_base + DATA_PORT + 1); } } +- +- /* Wait until the chip is reset */ +- for (reset_tmo = currticks() + 2; +- (readreg(PP_SelfST) & INIT_DONE) == 0 && +- currticks() < reset_tmo; ); +- +- /* disable interrupts and memory accesses */ +- writereg(PP_BusCTL, 0); +- +- /* set the ethernet address */ +- for (i=0; i < ETH_ALEN/2; i++) +- writereg(PP_IA+i*2, +- nic->node_addr[i*2] | +- (nic->node_addr[i*2+1] << 8)); +- +- /* receive only error free packets addressed to this card */ +- writereg(PP_RxCTL, DEF_RX_ACCEPT); +- +- /* do not generate any interrupts on receive operations */ +- writereg(PP_RxCFG, 0); +- +- /* do not generate any interrupts on transmit operations */ +- writereg(PP_TxCFG, 0); +- +- /* do not generate any interrupts on buffer operations */ +- writereg(PP_BufCFG, 0); +- +- /* reset address port, so that autoprobing will keep working */ +- outw(PP_ChipID, eth_nic_base + ADD_PORT); +- +- return; +-} +- +-/************************************************************************** +-ETH_TRANSMIT - Transmit a frame +-***************************************************************************/ +- +-static void cs89x0_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- unsigned long tmo; +- int sr; +- +- /* does this size have to be rounded??? please, +- somebody have a look in the specs */ +- if ((sr = ((s + ETH_HLEN + 1)&~1)) < ETH_ZLEN) +- sr = ETH_ZLEN; +- +-retry: +- /* initiate a transmit sequence */ +- outw(TX_AFTER_ALL, eth_nic_base + TX_CMD_PORT); +- outw(sr, eth_nic_base + TX_LEN_PORT); +- +- /* Test to see if the chip has allocated memory for the packet */ +- if ((readreg(PP_BusST) & READY_FOR_TX_NOW) == 0) { +- /* Oops... this should not happen! */ +- printf("cs: unable to send packet; retrying...\n"); +- for (tmo = currticks() + 5*TICKS_PER_SEC; currticks() < tmo; ); +- cs89x0_reset(nic); +- goto retry; } +- +- /* Write the contents of the packet */ +- outsw(eth_nic_base + TX_FRAME_PORT, d, ETH_ALEN/2); +- outsw(eth_nic_base + TX_FRAME_PORT, nic->node_addr, +- ETH_ALEN/2); +- outw(((t >> 8)&0xFF)|(t << 8), eth_nic_base + TX_FRAME_PORT); +- outsw(eth_nic_base + TX_FRAME_PORT, p, (s+1)/2); +- for (sr = sr/2 - (s+1)/2 - ETH_ALEN - 1; sr-- > 0; +- outw(0, eth_nic_base + TX_FRAME_PORT)); +- +- /* wait for transfer to succeed */ +- for (tmo = currticks()+5*TICKS_PER_SEC; +- (s = readreg(PP_TxEvent)&~0x1F) == 0 && currticks() < tmo;) +- /* nothing */ ; +- if ((s & TX_SEND_OK_BITS) != TX_OK) { +- printf("\ntransmission error %#hX\n", s); +- } +- +- return; +-} +- +-/************************************************************************** +-ETH_POLL - Wait for a frame +-***************************************************************************/ +- +-static int cs89x0_poll(struct nic *nic) +-{ +- int status; +- +- status = readreg(PP_RxEvent); +- +- if ((status & RX_OK) == 0) +- return(0); +- +- status = inw(eth_nic_base + RX_FRAME_PORT); +- nic->packetlen = inw(eth_nic_base + RX_FRAME_PORT); +- insw(eth_nic_base + RX_FRAME_PORT, nic->packet, nic->packetlen >> 1); +- if (nic->packetlen & 1) +- nic->packet[nic->packetlen-1] = inw(eth_nic_base + RX_FRAME_PORT); +- return 1; +-} +- +-static void cs89x0_disable(struct nic *nic) +-{ +- cs89x0_reset(nic); +-} +- +-/************************************************************************** +-ETH_PROBE - Look for an adapter +-***************************************************************************/ +- +-struct nic *cs89x0_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- static const unsigned int netcard_portlist[] = { +-#ifdef CS_SCAN +- CS_SCAN, +-#else /* use "conservative" default values for autoprobing */ +- 0x300,0x320,0x340,0x200,0x220,0x240, +- 0x260,0x280,0x2a0,0x2c0,0x2e0, +- /* if that did not work, then be more aggressive */ +- 0x301,0x321,0x341,0x201,0x221,0x241, +- 0x261,0x281,0x2a1,0x2c1,0x2e1, +-#endif +- 0}; +- +- int i, result = -1; +- unsigned rev_type = 0, ioaddr, ioidx, isa_cnf, cs_revision; +- unsigned short eeprom_buff[CHKSUM_LEN]; +- +- +- for (ioidx = 0; (ioaddr=netcard_portlist[ioidx++]) != 0; ) { +- /* if they give us an odd I/O address, then do ONE write to +- the address port, to get it back to address zero, where we +- expect to find the EISA signature word. */ +- if (ioaddr & 1) { +- ioaddr &= ~1; +- if ((inw(ioaddr + ADD_PORT) & ADD_MASK) != ADD_SIG) +- continue; +- outw(PP_ChipID, ioaddr + ADD_PORT); +- } +- +- if (inw(ioaddr + DATA_PORT) != CHIP_EISA_ID_SIG) +- continue; +- eth_nic_base = ioaddr; +- +- /* get the chip type */ +- rev_type = readreg(PRODUCT_ID_ADD); +- eth_cs_type = rev_type &~ REVISON_BITS; +- cs_revision = ((rev_type & REVISON_BITS) >> 8) + 'A'; +- +- printf("\ncs: cs89%c0%s rev %c, base %#hX", +- eth_cs_type==CS8900?'0':'2', +- eth_cs_type==CS8920M?"M":"", +- cs_revision, +- eth_nic_base); +- +- /* First check to see if an EEPROM is attached*/ +- if ((readreg(PP_SelfST) & EEPROM_PRESENT) == 0) { +- printf("\ncs: no EEPROM...\n"); +- outw(PP_ChipID, eth_nic_base + ADD_PORT); +- continue; } +- else if (get_eeprom_data(START_EEPROM_DATA,CHKSUM_LEN, +- eeprom_buff) < 0) { +- printf("\ncs: EEPROM read failed...\n"); +- outw(PP_ChipID, eth_nic_base + ADD_PORT); +- continue; } +- else if (get_eeprom_chksum(START_EEPROM_DATA,CHKSUM_LEN, +- eeprom_buff) < 0) { +- printf("\ncs: EEPROM checksum bad...\n"); +- outw(PP_ChipID, eth_nic_base + ADD_PORT); +- continue; } +- +- /* get transmission control word but keep the +- autonegotiation bits */ +- eth_auto_neg_cnf = eeprom_buff[AUTO_NEG_CNF_OFFSET/2]; +- /* Store adapter configuration */ +- eth_adapter_cnf = eeprom_buff[ADAPTER_CNF_OFFSET/2]; +- /* Store ISA configuration */ +- isa_cnf = eeprom_buff[ISA_CNF_OFFSET/2]; +- +- /* store the initial memory base address */ +- eth_mem_start = eeprom_buff[PACKET_PAGE_OFFSET/2] << 8; +- +- printf("%s%s%s, addr ", +- (eth_adapter_cnf & A_CNF_10B_T)?", RJ-45":"", +- (eth_adapter_cnf & A_CNF_AUI)?", AUI":"", +- (eth_adapter_cnf & A_CNF_10B_2)?", BNC":""); +- +- /* If this is a CS8900 then no pnp soft */ +- if (eth_cs_type != CS8900 && +- /* Check if the ISA IRQ has been set */ +- (i = readreg(PP_CS8920_ISAINT) & 0xff, +- (i != 0 && i < CS8920_NO_INTS))) +- eth_irq = i; +- else { +- i = isa_cnf & INT_NO_MASK; +- if (eth_cs_type == CS8900) { +- /* the table that follows is dependent +- upon how you wired up your cs8900 +- in your system. The table is the +- same as the cs8900 engineering demo +- board. irq_map also depends on the +- contents of the table. Also see +- write_irq, which is the reverse +- mapping of the table below. */ +- if (i < 4) i = "\012\013\014\005"[i]; +- else printf("\ncs: BUG: isa_config is %d\n", i); } +- eth_irq = i; } +- +- /* Retrieve and print the ethernet address. */ +- for (i=0; inode_addr[i] = ((unsigned char *)eeprom_buff)[i]; +- } +- printf("%!\n", nic->node_addr); +- +- /* Set the LineCTL quintuplet based on adapter +- configuration read from EEPROM */ +- if ((eth_adapter_cnf & A_CNF_EXTND_10B_2) && +- (eth_adapter_cnf & A_CNF_LOW_RX_SQUELCH)) +- eth_linectl = LOW_RX_SQUELCH; +- else +- eth_linectl = 0; +- +- /* check to make sure that they have the "right" +- hardware available */ +- switch(eth_adapter_cnf & A_CNF_MEDIA_TYPE) { +- case A_CNF_MEDIA_10B_T: result = eth_adapter_cnf & A_CNF_10B_T; +- break; +- case A_CNF_MEDIA_AUI: result = eth_adapter_cnf & A_CNF_AUI; +- break; +- case A_CNF_MEDIA_10B_2: result = eth_adapter_cnf & A_CNF_10B_2; +- break; +- default: result = eth_adapter_cnf & (A_CNF_10B_T | A_CNF_AUI | +- A_CNF_10B_2); +- } +- if (!result) { +- printf("cs: EEPROM is configured for unavailable media\n"); +- error: +- writereg(PP_LineCTL, readreg(PP_LineCTL) & +- ~(SERIAL_TX_ON | SERIAL_RX_ON)); +- outw(PP_ChipID, eth_nic_base + ADD_PORT); +- continue; +- } +- +- /* Initialize the card for probing of the attached media */ +- cs89x0_reset(nic); +- +- /* set the hardware to the configured choice */ +- switch(eth_adapter_cnf & A_CNF_MEDIA_TYPE) { +- case A_CNF_MEDIA_10B_T: +- result = detect_tp(); +- if (!result) { +- clrline(); +- printf("10Base-T (RJ-45%s", +- ") has no cable\n"); } +- /* check "ignore missing media" bit */ +- if (eth_auto_neg_cnf & IMM_BIT) +- /* Yes! I don't care if I see a link pulse */ +- result = A_CNF_MEDIA_10B_T; +- break; +- case A_CNF_MEDIA_AUI: +- result = detect_aui(nic); +- if (!result) { +- clrline(); +- printf("10Base-5 (AUI%s", +- ") has no cable\n"); } +- /* check "ignore missing media" bit */ +- if (eth_auto_neg_cnf & IMM_BIT) +- /* Yes! I don't care if I see a carrrier */ +- result = A_CNF_MEDIA_AUI; +- break; +- case A_CNF_MEDIA_10B_2: +- result = detect_bnc(nic); +- if (!result) { +- clrline(); +- printf("10Base-2 (BNC%s", +- ") has no cable\n"); } +- /* check "ignore missing media" bit */ +- if (eth_auto_neg_cnf & IMM_BIT) +- /* Yes! I don't care if I can xmit a packet */ +- result = A_CNF_MEDIA_10B_2; +- break; +- case A_CNF_MEDIA_AUTO: +- writereg(PP_LineCTL, eth_linectl | AUTO_AUI_10BASET); +- if (eth_adapter_cnf & A_CNF_10B_T) +- if ((result = detect_tp()) != 0) +- break; +- if (eth_adapter_cnf & A_CNF_AUI) +- if ((result = detect_aui(nic)) != 0) +- break; +- if (eth_adapter_cnf & A_CNF_10B_2) +- if ((result = detect_bnc(nic)) != 0) +- break; +- clrline(); printf("no media detected\n"); +- goto error; +- } +- clrline(); +- switch(result) { +- case 0: printf("no network cable attached to configured media\n"); +- goto error; +- case A_CNF_MEDIA_10B_T: printf("using 10Base-T (RJ-45)\n"); +- break; +- case A_CNF_MEDIA_AUI: printf("using 10Base-5 (AUI)\n"); +- break; +- case A_CNF_MEDIA_10B_2: printf("using 10Base-2 (BNC)\n"); +- break; +- } +- +- /* Turn on both receive and transmit operations */ +- writereg(PP_LineCTL, readreg(PP_LineCTL) | SERIAL_RX_ON | +- SERIAL_TX_ON); +- +- break; +- } +- +- if (ioaddr == 0) +- return (0); +- nic->reset = cs89x0_reset; +- nic->poll = cs89x0_poll; +- nic->transmit = cs89x0_transmit; +- nic->disable = cs89x0_disable; +- return (nic); +-} +- +-/* +- * Local variables: +- * c-basic-offset: 8 +- * End: +- */ +- +Index: b/netboot/cs89x0.h +=================================================================== +--- a/netboot/cs89x0.h ++++ b/netboot/cs89x0.h +@@ -16,464 +16,3 @@ + -- quote from email + **/ + +-/* Copyright, 1988-1992, Russell Nelson, Crynwr Software +- +- 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, version 1. +- +- This program is distributed in the hope that it will be useful, +- but WITHOUT ANY WARRANTY; without even the implied warranty of +- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +- GNU General Public License for more details. +- +- You should have received a copy of the GNU General Public License +- along with this program; if not, write to the Free Software +- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +- +-#define PP_ChipID 0x0000 /* offset 0h -> Corp -ID */ +- /* offset 2h -> Model/Product Number */ +- /* offset 3h -> Chip Revision Number */ +- +-#define PP_ISAIOB 0x0020 /* IO base address */ +-#define PP_CS8900_ISAINT 0x0022 /* ISA interrupt select */ +-#define PP_CS8920_ISAINT 0x0370 /* ISA interrupt select */ +-#define PP_CS8900_ISADMA 0x0024 /* ISA Rec DMA channel */ +-#define PP_CS8920_ISADMA 0x0374 /* ISA Rec DMA channel */ +-#define PP_ISASOF 0x0026 /* ISA DMA offset */ +-#define PP_DmaFrameCnt 0x0028 /* ISA DMA Frame count */ +-#define PP_DmaByteCnt 0x002A /* ISA DMA Byte count */ +-#define PP_CS8900_ISAMemB 0x002C /* Memory base */ +-#define PP_CS8920_ISAMemB 0x0348 /* */ +- +-#define PP_ISABootBase 0x0030 /* Boot Prom base */ +-#define PP_ISABootMask 0x0034 /* Boot Prom Mask */ +- +-/* EEPROM data and command registers */ +-#define PP_EECMD 0x0040 /* NVR Interface Command register */ +-#define PP_EEData 0x0042 /* NVR Interface Data Register */ +-#define PP_DebugReg 0x0044 /* Debug Register */ +- +-#define PP_RxCFG 0x0102 /* Rx Bus config */ +-#define PP_RxCTL 0x0104 /* Receive Control Register */ +-#define PP_TxCFG 0x0106 /* Transmit Config Register */ +-#define PP_TxCMD 0x0108 /* Transmit Command Register */ +-#define PP_BufCFG 0x010A /* Bus configuration Register */ +-#define PP_LineCTL 0x0112 /* Line Config Register */ +-#define PP_SelfCTL 0x0114 /* Self Command Register */ +-#define PP_BusCTL 0x0116 /* ISA bus control Register */ +-#define PP_TestCTL 0x0118 /* Test Register */ +-#define PP_AutoNegCTL 0x011C /* Auto Negotiation Ctrl */ +- +-#define PP_ISQ 0x0120 /* Interrupt Status */ +-#define PP_RxEvent 0x0124 /* Rx Event Register */ +-#define PP_TxEvent 0x0128 /* Tx Event Register */ +-#define PP_BufEvent 0x012C /* Bus Event Register */ +-#define PP_RxMiss 0x0130 /* Receive Miss Count */ +-#define PP_TxCol 0x0132 /* Transmit Collision Count */ +-#define PP_LineST 0x0134 /* Line State Register */ +-#define PP_SelfST 0x0136 /* Self State register */ +-#define PP_BusST 0x0138 /* Bus Status */ +-#define PP_TDR 0x013C /* Time Domain Reflectometry */ +-#define PP_AutoNegST 0x013E /* Auto Neg Status */ +-#define PP_TxCommand 0x0144 /* Tx Command */ +-#define PP_TxLength 0x0146 /* Tx Length */ +-#define PP_LAF 0x0150 /* Hash Table */ +-#define PP_IA 0x0158 /* Physical Address Register */ +- +-#define PP_RxStatus 0x0400 /* Receive start of frame */ +-#define PP_RxLength 0x0402 /* Receive Length of frame */ +-#define PP_RxFrame 0x0404 /* Receive frame pointer */ +-#define PP_TxFrame 0x0A00 /* Transmit frame pointer */ +- +-/* Primary I/O Base Address. If no I/O base is supplied by the user, then this */ +-/* can be used as the default I/O base to access the PacketPage Area. */ +-#define DEFAULTIOBASE 0x0300 +-#define FIRST_IO 0x020C /* First I/O port to check */ +-#define LAST_IO 0x037C /* Last I/O port to check (+10h) */ +-#define ADD_MASK 0x3000 /* Mask it use of the ADD_PORT register */ +-#define ADD_SIG 0x3000 /* Expected ID signature */ +- +-#define CHIP_EISA_ID_SIG 0x630E /* Product ID Code for Crystal Chip (CS8900 spec 4.3) */ +- +-#ifdef IBMEIPKT +-#define EISA_ID_SIG 0x4D24 /* IBM */ +-#define PART_NO_SIG 0x1010 /* IBM */ +-#define MONGOOSE_BIT 0x0000 /* IBM */ +-#else +-#define EISA_ID_SIG 0x630E /* PnP Vendor ID (same as chip id for Crystal board) */ +-#define PART_NO_SIG 0x4000 /* ID code CS8920 board (PnP Vendor Product code) */ +-#define MONGOOSE_BIT 0x2000 /* PART_NO_SIG + MONGOOSE_BUT => ID of mongoose */ +-#endif +- +-#define PRODUCT_ID_ADD 0x0002 /* Address of product ID */ +- +-/* Mask to find out the types of registers */ +-#define REG_TYPE_MASK 0x001F +- +-/* Eeprom Commands */ +-#define ERSE_WR_ENBL 0x00F0 +-#define ERSE_WR_DISABLE 0x0000 +- +-/* Defines Control/Config register quintuplet numbers */ +-#define RX_BUF_CFG 0x0003 +-#define RX_CONTROL 0x0005 +-#define TX_CFG 0x0007 +-#define TX_COMMAND 0x0009 +-#define BUF_CFG 0x000B +-#define LINE_CONTROL 0x0013 +-#define SELF_CONTROL 0x0015 +-#define BUS_CONTROL 0x0017 +-#define TEST_CONTROL 0x0019 +- +-/* Defines Status/Count registers quintuplet numbers */ +-#define RX_EVENT 0x0004 +-#define TX_EVENT 0x0008 +-#define BUF_EVENT 0x000C +-#define RX_MISS_COUNT 0x0010 +-#define TX_COL_COUNT 0x0012 +-#define LINE_STATUS 0x0014 +-#define SELF_STATUS 0x0016 +-#define BUS_STATUS 0x0018 +-#define TDR 0x001C +- +-/* PP_RxCFG - Receive Configuration and Interrupt Mask bit definition - Read/write */ +-#define SKIP_1 0x0040 +-#define RX_STREAM_ENBL 0x0080 +-#define RX_OK_ENBL 0x0100 +-#define RX_DMA_ONLY 0x0200 +-#define AUTO_RX_DMA 0x0400 +-#define BUFFER_CRC 0x0800 +-#define RX_CRC_ERROR_ENBL 0x1000 +-#define RX_RUNT_ENBL 0x2000 +-#define RX_EXTRA_DATA_ENBL 0x4000 +- +-/* PP_RxCTL - Receive Control bit definition - Read/write */ +-#define RX_IA_HASH_ACCEPT 0x0040 +-#define RX_PROM_ACCEPT 0x0080 +-#define RX_OK_ACCEPT 0x0100 +-#define RX_MULTCAST_ACCEPT 0x0200 +-#define RX_IA_ACCEPT 0x0400 +-#define RX_BROADCAST_ACCEPT 0x0800 +-#define RX_BAD_CRC_ACCEPT 0x1000 +-#define RX_RUNT_ACCEPT 0x2000 +-#define RX_EXTRA_DATA_ACCEPT 0x4000 +-#define RX_ALL_ACCEPT (RX_PROM_ACCEPT|RX_BAD_CRC_ACCEPT|RX_RUNT_ACCEPT|RX_EXTRA_DATA_ACCEPT) +-/* Default receive mode - individually addressed, broadcast, and error free */ +-#define DEF_RX_ACCEPT (RX_IA_ACCEPT | RX_BROADCAST_ACCEPT | RX_OK_ACCEPT) +- +-/* PP_TxCFG - Transmit Configuration Interrupt Mask bit definition - Read/write */ +-#define TX_LOST_CRS_ENBL 0x0040 +-#define TX_SQE_ERROR_ENBL 0x0080 +-#define TX_OK_ENBL 0x0100 +-#define TX_LATE_COL_ENBL 0x0200 +-#define TX_JBR_ENBL 0x0400 +-#define TX_ANY_COL_ENBL 0x0800 +-#define TX_16_COL_ENBL 0x8000 +- +-/* PP_TxCMD - Transmit Command bit definition - Read-only */ +-#define TX_START_4_BYTES 0x0000 +-#define TX_START_64_BYTES 0x0040 +-#define TX_START_128_BYTES 0x0080 +-#define TX_START_ALL_BYTES 0x00C0 +-#define TX_FORCE 0x0100 +-#define TX_ONE_COL 0x0200 +-#define TX_TWO_PART_DEFF_DISABLE 0x0400 +-#define TX_NO_CRC 0x1000 +-#define TX_RUNT 0x2000 +- +-/* PP_BufCFG - Buffer Configuration Interrupt Mask bit definition - Read/write */ +-#define GENERATE_SW_INTERRUPT 0x0040 +-#define RX_DMA_ENBL 0x0080 +-#define READY_FOR_TX_ENBL 0x0100 +-#define TX_UNDERRUN_ENBL 0x0200 +-#define RX_MISS_ENBL 0x0400 +-#define RX_128_BYTE_ENBL 0x0800 +-#define TX_COL_COUNT_OVRFLOW_ENBL 0x1000 +-#define RX_MISS_COUNT_OVRFLOW_ENBL 0x2000 +-#define RX_DEST_MATCH_ENBL 0x8000 +- +-/* PP_LineCTL - Line Control bit definition - Read/write */ +-#define SERIAL_RX_ON 0x0040 +-#define SERIAL_TX_ON 0x0080 +-#define AUI_ONLY 0x0100 +-#define AUTO_AUI_10BASET 0x0200 +-#define MODIFIED_BACKOFF 0x0800 +-#define NO_AUTO_POLARITY 0x1000 +-#define TWO_PART_DEFDIS 0x2000 +-#define LOW_RX_SQUELCH 0x4000 +- +-/* PP_SelfCTL - Software Self Control bit definition - Read/write */ +-#define POWER_ON_RESET 0x0040 +-#define SW_STOP 0x0100 +-#define SLEEP_ON 0x0200 +-#define AUTO_WAKEUP 0x0400 +-#define HCB0_ENBL 0x1000 +-#define HCB1_ENBL 0x2000 +-#define HCB0 0x4000 +-#define HCB1 0x8000 +- +-/* PP_BusCTL - ISA Bus Control bit definition - Read/write */ +-#define RESET_RX_DMA 0x0040 +-#define MEMORY_ON 0x0400 +-#define DMA_BURST_MODE 0x0800 +-#define IO_CHANNEL_READY_ON 0x1000 +-#define RX_DMA_SIZE_64K 0x2000 +-#define ENABLE_IRQ 0x8000 +- +-/* PP_TestCTL - Test Control bit definition - Read/write */ +-#define LINK_OFF 0x0080 +-#define ENDEC_LOOPBACK 0x0200 +-#define AUI_LOOPBACK 0x0400 +-#define BACKOFF_OFF 0x0800 +-#define FAST_TEST 0x8000 +- +-/* PP_RxEvent - Receive Event Bit definition - Read-only */ +-#define RX_IA_HASHED 0x0040 +-#define RX_DRIBBLE 0x0080 +-#define RX_OK 0x0100 +-#define RX_HASHED 0x0200 +-#define RX_IA 0x0400 +-#define RX_BROADCAST 0x0800 +-#define RX_CRC_ERROR 0x1000 +-#define RX_RUNT 0x2000 +-#define RX_EXTRA_DATA 0x4000 +- +-#define HASH_INDEX_MASK 0x0FC00 +- +-/* PP_TxEvent - Transmit Event Bit definition - Read-only */ +-#define TX_LOST_CRS 0x0040 +-#define TX_SQE_ERROR 0x0080 +-#define TX_OK 0x0100 +-#define TX_LATE_COL 0x0200 +-#define TX_JBR 0x0400 +-#define TX_16_COL 0x8000 +-#define TX_SEND_OK_BITS (TX_OK|TX_LOST_CRS) +-#define TX_COL_COUNT_MASK 0x7800 +- +-/* PP_BufEvent - Buffer Event Bit definition - Read-only */ +-#define SW_INTERRUPT 0x0040 +-#define RX_DMA 0x0080 +-#define READY_FOR_TX 0x0100 +-#define TX_UNDERRUN 0x0200 +-#define RX_MISS 0x0400 +-#define RX_128_BYTE 0x0800 +-#define TX_COL_OVRFLW 0x1000 +-#define RX_MISS_OVRFLW 0x2000 +-#define RX_DEST_MATCH 0x8000 +- +-/* PP_LineST - Ethernet Line Status bit definition - Read-only */ +-#define LINK_OK 0x0080 +-#define AUI_ON 0x0100 +-#define TENBASET_ON 0x0200 +-#define POLARITY_OK 0x1000 +-#define CRS_OK 0x4000 +- +-/* PP_SelfST - Chip Software Status bit definition */ +-#define ACTIVE_33V 0x0040 +-#define INIT_DONE 0x0080 +-#define SI_BUSY 0x0100 +-#define EEPROM_PRESENT 0x0200 +-#define EEPROM_OK 0x0400 +-#define EL_PRESENT 0x0800 +-#define EE_SIZE_64 0x1000 +- +-/* PP_BusST - ISA Bus Status bit definition */ +-#define TX_BID_ERROR 0x0080 +-#define READY_FOR_TX_NOW 0x0100 +- +-/* PP_AutoNegCTL - Auto Negotiation Control bit definition */ +-#define RE_NEG_NOW 0x0040 +-#define ALLOW_FDX 0x0080 +-#define AUTO_NEG_ENABLE 0x0100 +-#define NLP_ENABLE 0x0200 +-#define FORCE_FDX 0x8000 +-#define AUTO_NEG_BITS (FORCE_FDX|NLP_ENABLE|AUTO_NEG_ENABLE) +-#define AUTO_NEG_MASK (FORCE_FDX|NLP_ENABLE|AUTO_NEG_ENABLE|ALLOW_FDX|RE_NEG_NOW) +- +-/* PP_AutoNegST - Auto Negotiation Status bit definition */ +-#define AUTO_NEG_BUSY 0x0080 +-#define FLP_LINK 0x0100 +-#define FLP_LINK_GOOD 0x0800 +-#define LINK_FAULT 0x1000 +-#define HDX_ACTIVE 0x4000 +-#define FDX_ACTIVE 0x8000 +- +-/* The following block defines the ISQ event types */ +-#define ISQ_RECEIVER_EVENT 0x04 +-#define ISQ_TRANSMITTER_EVENT 0x08 +-#define ISQ_BUFFER_EVENT 0x0c +-#define ISQ_RX_MISS_EVENT 0x10 +-#define ISQ_TX_COL_EVENT 0x12 +- +-#define ISQ_EVENT_MASK 0x003F /* ISQ mask to find out type of event */ +-#define ISQ_HIST 16 /* small history buffer */ +-#define AUTOINCREMENT 0x8000 /* Bit mask to set bit-15 for autoincrement */ +- +-#define TXRXBUFSIZE 0x0600 +-#define RXDMABUFSIZE 0x8000 +-#define RXDMASIZE 0x4000 +-#define TXRX_LENGTH_MASK 0x07FF +- +-/* rx options bits */ +-#define RCV_WITH_RXON 1 /* Set SerRx ON */ +-#define RCV_COUNTS 2 /* Use Framecnt1 */ +-#define RCV_PONG 4 /* Pong respondent */ +-#define RCV_DONG 8 /* Dong operation */ +-#define RCV_POLLING 0x10 /* Poll RxEvent */ +-#define RCV_ISQ 0x20 /* Use ISQ, int */ +-#define RCV_AUTO_DMA 0x100 /* Set AutoRxDMAE */ +-#define RCV_DMA 0x200 /* Set RxDMA only */ +-#define RCV_DMA_ALL 0x400 /* Copy all DMA'ed */ +-#define RCV_FIXED_DATA 0x800 /* Every frame same */ +-#define RCV_IO 0x1000 /* Use ISA IO only */ +-#define RCV_MEMORY 0x2000 /* Use ISA Memory */ +- +-#define RAM_SIZE 0x1000 /* The card has 4k bytes or RAM */ +-#define PKT_START PP_TxFrame /* Start of packet RAM */ +- +-#define RX_FRAME_PORT 0x0000 +-#define TX_FRAME_PORT RX_FRAME_PORT +-#define TX_CMD_PORT 0x0004 +-#define TX_NOW 0x0000 /* Tx packet after 5 bytes copied */ +-#define TX_AFTER_381 0x0020 /* Tx packet after 381 bytes copied */ +-#define TX_AFTER_ALL 0x0060 /* Tx packet after all bytes copied */ +-#define TX_LEN_PORT 0x0006 +-#define ISQ_PORT 0x0008 +-#define ADD_PORT 0x000A +-#define DATA_PORT 0x000C +- +-#define EEPROM_WRITE_EN 0x00F0 +-#define EEPROM_WRITE_DIS 0x0000 +-#define EEPROM_WRITE_CMD 0x0100 +-#define EEPROM_READ_CMD 0x0200 +- +-/* Receive Header */ +-/* Description of header of each packet in receive area of memory */ +-#define RBUF_EVENT_LOW 0 /* Low byte of RxEvent - status of received frame */ +-#define RBUF_EVENT_HIGH 1 /* High byte of RxEvent - status of received frame */ +-#define RBUF_LEN_LOW 2 /* Length of received data - low byte */ +-#define RBUF_LEN_HI 3 /* Length of received data - high byte */ +-#define RBUF_HEAD_LEN 4 /* Length of this header */ +- +-#define CHIP_READ 0x1 /* Used to mark state of the repins code (chip or dma) */ +-#define DMA_READ 0x2 /* Used to mark state of the repins code (chip or dma) */ +- +-/* for bios scan */ +-/* */ +-#ifdef CSDEBUG +-/* use these values for debugging bios scan */ +-#define BIOS_START_SEG 0x00000 +-#define BIOS_OFFSET_INC 0x0010 +-#else +-#define BIOS_START_SEG 0x0c000 +-#define BIOS_OFFSET_INC 0x0200 +-#endif +- +-#define BIOS_LAST_OFFSET 0x0fc00 +- +-/* Byte offsets into the EEPROM configuration buffer */ +-#define ISA_CNF_OFFSET 0x6 +-#define TX_CTL_OFFSET (ISA_CNF_OFFSET + 8) /* 8900 eeprom */ +-#define AUTO_NEG_CNF_OFFSET (ISA_CNF_OFFSET + 8) /* 8920 eeprom */ +- +- /* the assumption here is that the bits in the eeprom are generally */ +- /* in the same position as those in the autonegctl register. */ +- /* Of course the IMM bit is not in that register so it must be */ +- /* masked out */ +-#define EE_FORCE_FDX 0x8000 +-#define EE_NLP_ENABLE 0x0200 +-#define EE_AUTO_NEG_ENABLE 0x0100 +-#define EE_ALLOW_FDX 0x0080 +-#define EE_AUTO_NEG_CNF_MASK (EE_FORCE_FDX|EE_NLP_ENABLE|EE_AUTO_NEG_ENABLE|EE_ALLOW_FDX) +- +-#define IMM_BIT 0x0040 /* ignore missing media */ +- +-#define ADAPTER_CNF_OFFSET (AUTO_NEG_CNF_OFFSET + 2) +-#define A_CNF_10B_T 0x0001 +-#define A_CNF_AUI 0x0002 +-#define A_CNF_10B_2 0x0004 +-#define A_CNF_MEDIA_TYPE 0x0060 +-#define A_CNF_MEDIA_AUTO 0x0000 +-#define A_CNF_MEDIA_10B_T 0x0020 +-#define A_CNF_MEDIA_AUI 0x0040 +-#define A_CNF_MEDIA_10B_2 0x0060 +-#define A_CNF_DC_DC_POLARITY 0x0080 +-#define A_CNF_NO_AUTO_POLARITY 0x2000 +-#define A_CNF_LOW_RX_SQUELCH 0x4000 +-#define A_CNF_EXTND_10B_2 0x8000 +- +-#define PACKET_PAGE_OFFSET 0x8 +- +-/* Bit definitions for the ISA configuration word from the EEPROM */ +-#define INT_NO_MASK 0x000F +-#define DMA_NO_MASK 0x0070 +-#define ISA_DMA_SIZE 0x0200 +-#define ISA_AUTO_RxDMA 0x0400 +-#define ISA_RxDMA 0x0800 +-#define DMA_BURST 0x1000 +-#define STREAM_TRANSFER 0x2000 +-#define ANY_ISA_DMA (ISA_AUTO_RxDMA | ISA_RxDMA) +- +-/* DMA controller registers */ +-#define DMA_BASE 0x00 /* DMA controller base */ +-#define DMA_BASE_2 0x0C0 /* DMA controller base */ +- +-#define DMA_STAT 0x0D0 /* DMA controller status register */ +-#define DMA_MASK 0x0D4 /* DMA controller mask register */ +-#define DMA_MODE 0x0D6 /* DMA controller mode register */ +-#define DMA_RESETFF 0x0D8 /* DMA controller first/last flip flop */ +- +-/* DMA data */ +-#define DMA_DISABLE 0x04 /* Disable channel n */ +-#define DMA_ENABLE 0x00 /* Enable channel n */ +-/* Demand transfers, incr. address, auto init, writes, ch. n */ +-#define DMA_RX_MODE 0x14 +-/* Demand transfers, incr. address, auto init, reads, ch. n */ +-#define DMA_TX_MODE 0x18 +- +-#define DMA_SIZE (16*1024) /* Size of dma buffer - 16k */ +- +-#define CS8900 0x0000 +-#define CS8920 0x4000 +-#define CS8920M 0x6000 +-#define REVISON_BITS 0x1F00 +-#define EEVER_NUMBER 0x12 +-#define CHKSUM_LEN 0x14 +-#define CHKSUM_VAL 0x0000 +-#define START_EEPROM_DATA 0x001c /* Offset into eeprom for start of data */ +-#define IRQ_MAP_EEPROM_DATA 0x0046 /* Offset into eeprom for the IRQ map */ +-#define IRQ_MAP_LEN 0x0004 /* No of bytes to read for the IRQ map */ +-#define PNP_IRQ_FRMT 0x0022 /* PNP small item IRQ format */ +-#define CS8900_IRQ_MAP 0x1c20 /* This IRQ map is fixed */ +- +-#define CS8920_NO_INTS 0x0F /* Max CS8920 interrupt select # */ +- +-#define PNP_ADD_PORT 0x0279 +-#define PNP_WRITE_PORT 0x0A79 +- +-#define GET_PNP_ISA_STRUCT 0x40 +-#define PNP_ISA_STRUCT_LEN 0x06 +-#define PNP_CSN_CNT_OFF 0x01 +-#define PNP_RD_PORT_OFF 0x02 +-#define PNP_FUNCTION_OK 0x00 +-#define PNP_WAKE 0x03 +-#define PNP_RSRC_DATA 0x04 +-#define PNP_RSRC_READY 0x01 +-#define PNP_STATUS 0x05 +-#define PNP_ACTIVATE 0x30 +-#define PNP_CNF_IO_H 0x60 +-#define PNP_CNF_IO_L 0x61 +-#define PNP_CNF_INT 0x70 +-#define PNP_CNF_DMA 0x74 +-#define PNP_CNF_MEM 0x48 +- +-#define BIT0 1 +-#define BIT15 0x8000 +- +-/* +- * Local variables: +- * c-basic-offset: 8 +- * End: +- */ +- +Index: b/netboot/cs89x0.txt +=================================================================== +--- a/netboot/cs89x0.txt ++++ /dev/null +@@ -1,26 +0,0 @@ +-Permission is granted to distribute the enclosed cs89x0.[ch] driver +-only in conjunction with the Etherboot package. The code is +-ordinarily distributed under the GPL. +- +-Russ Nelson, January 2000 +- +-CREDITS +- +-I want to thank +- +- Mike Cruse +- for providing an evaluation NIC and for sponsoring the +- development of this driver. +- +- Randall Sears +- Deva Bodas +- Andreas Kraemer +- Wolfgang Krause <100303.2673@compuserve.com> +- for excellent technical support and for providing the required +- programming information. I appreciate Crystal Semiconductor's +- commitment towards free software. +- +- Russell Nelson +- for writing the Linux device driver for the CS89x0 +- chipset. Russel's code is very well designed and simplified my +- job a lot. +Index: b/netboot/davicom.c +=================================================================== +--- a/netboot/davicom.c ++++ b/netboot/davicom.c +@@ -1,12 +1,12 @@ ++#ifdef ALLMULTI ++#error multicast support is not yet implemented ++#endif + /* + DAVICOM DM9009/DM9102/DM9102A Etherboot Driver V1.00 + +- This driver was ported from Marty Conner's Tulip Etherboot driver. +- Thanks Marty Connor (mdc@thinguin.org) +- You can get Tulip driver source file from this URL: ++ This driver was ported from Marty Connor's Tulip Etherboot driver. ++ Thanks Marty Connor (mdc@etherboot.org) + +- "http://etherboot.sourceforge..net/#Distribution" +- + This davicom etherboot driver supports DM9009/DM9102/DM9102A/ + DM9102A+DM9801/DM9102A+DM9802 NICs. + +@@ -36,7 +36,6 @@ + register(CR6) + */ + +- + /*********************************************************************/ + /* Declarations */ + /*********************************************************************/ +@@ -44,7 +43,6 @@ + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + + #undef DAVICOM_DEBUG + #undef DAVICOM_DEBUG_WHERE +@@ -99,8 +97,10 @@ + #define eeprom_delay() inl(ee_addr) + + /* helpful macro if on a big_endian machine for changing byte order. +- not strictly needed on Intel */ ++ not strictly needed on Intel ++ Already defined in Etherboot includes + #define le16_to_cpu(val) (val) ++*/ + + /* transmit and receive descriptor format */ + struct txdesc { +@@ -138,20 +138,12 @@ + /* transmit descriptor and buffer */ + #define NTXD 2 + static struct txdesc txd[NTXD] __attribute__ ((aligned(4))); +-#ifdef USE_LOWMEM_BUFFER +-#define txb ((char *)0x10000 - BUFLEN) +-#else + static unsigned char txb[BUFLEN] __attribute__ ((aligned(4))); +-#endif + + /* receive descriptor(s) and buffer(s) */ + #define NRXD 4 + static struct rxdesc rxd[NRXD] __attribute__ ((aligned(4))); +-#ifdef USE_LOWMEM_BUFFER +-#define rxb ((char *)0x10000 - NRXD * BUFLEN - BUFLEN) +-#else + static unsigned char rxb[NRXD * BUFLEN] __attribute__ ((aligned(4))); +-#endif + static int rxd_tail; + static int TxPtr; + +@@ -161,15 +153,13 @@ + /*********************************************************************/ + static void whereami(const char *str); + static int read_eeprom(unsigned long ioaddr, int location, int addr_len); +-struct nic *davicom_probe(struct nic *nic, unsigned short *io_addrs, +- struct pci_device *pci); ++static int davicom_probe(struct dev *dev, struct pci_device *pci); + static void davicom_init_chain(struct nic *nic); /* Sten 10/9 */ + static void davicom_reset(struct nic *nic); + static void davicom_transmit(struct nic *nic, const char *d, unsigned int t, + unsigned int s, const char *p); +-static int davicom_poll(struct nic *nic); +-static void davicom_disable(struct nic *nic); +-static void whereami (const char *str); ++static int davicom_poll(struct nic *nic, int retrieve); ++static void davicom_disable(struct dev *dev); + #ifdef DAVICOM_DEBUG + static void davicom_more(void); + #endif /* DAVICOM_DEBUG */ +@@ -184,13 +174,10 @@ + /*********************************************************************/ + /* Utility Routines */ + /*********************************************************************/ +- +-static inline void whereami (const char *str) ++static inline void whereami(const char *str) + { +-#ifdef DAVICOM_DEBUG_WHERE + printf("%s\n", str); + /* sleep(2); */ +-#endif + } + + #ifdef DAVICOM_DEBUG +@@ -360,7 +347,7 @@ + /* + Sense media mode and set CR6 + */ +-static void davicom_media_chk(struct nic * nic) ++static void davicom_media_chk(struct nic * nic __unused) + { + unsigned long to, csr6; + +@@ -446,8 +433,8 @@ + /* Sten: Set 2 TX descriptor but use one TX buffer because + it transmit a packet and wait complete every time. */ + for (i=0; ipacketlen = (rxd[rxd_tail].status & 0x3FFF0000) >> 16; +@@ -627,10 +615,13 @@ + /*********************************************************************/ + /* eth_disable - Disable the interface */ + /*********************************************************************/ +-static void davicom_disable(struct nic *nic) ++static void davicom_disable(struct dev *dev) + { ++ struct nic *nic = (struct nic *)dev; + whereami("davicom_disable\n"); + ++ davicom_reset(nic); ++ + /* disable interrupts */ + outl(0x00000000, ioaddr + CSR7); + +@@ -640,24 +631,43 @@ + /* Clear the missed-packet counter. */ + (volatile unsigned long)inl(ioaddr + CSR8); + } ++ ++ ++/*********************************************************************/ ++/* eth_irq - enable, disable and force interrupts */ ++/*********************************************************************/ ++static void davicom_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ + + /*********************************************************************/ + /* eth_probe - Look for an adapter */ + /*********************************************************************/ +-struct nic *davicom_probe(struct nic *nic, unsigned short *io_addrs, +- struct pci_device *pci) ++static int davicom_probe(struct dev *dev, struct pci_device *pci) + { ++ struct nic *nic = (struct nic *)dev; + unsigned int i; +- u32 l1, l2; + + whereami("davicom_probe\n"); + +- if (io_addrs == 0 || *io_addrs == 0) ++ if (pci->ioaddr == 0) + return 0; + + vendor = pci->vendor; + dev_id = pci->dev_id; +- ioaddr = *io_addrs; ++ ioaddr = pci->ioaddr & ~3; ++ ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; + + /* wakeup chip */ + pcibios_write_config_dword(pci->bus, pci->devfn, 0x40, 0x00000000); +@@ -683,10 +693,26 @@ + /* initialize device */ + davicom_reset(nic); + +- nic->reset = davicom_reset; ++ dev->disable = davicom_disable; + nic->poll = davicom_poll; + nic->transmit = davicom_transmit; +- nic->disable = davicom_disable; ++ nic->irq = davicom_irq; + +- return nic; ++ return 1; + } ++ ++static struct pci_id davicom_nics[] = { ++PCI_ROM(0x1282, 0x9100, "davicom9100", "Davicom 9100"), ++PCI_ROM(0x1282, 0x9102, "davicom9102", "Davicom 9102"), ++PCI_ROM(0x1282, 0x9009, "davicom9009", "Davicom 9009"), ++PCI_ROM(0x1282, 0x9132, "davicom9132", "Davicom 9132"), /* Needs probably some fixing */ ++}; ++ ++struct pci_driver davicom_driver = { ++ .type = NIC_DRIVER, ++ .name = "DAVICOM", ++ .probe = davicom_probe, ++ .ids = davicom_nics, ++ .id_count = sizeof(davicom_nics)/sizeof(davicom_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/depca.c +=================================================================== +--- a/netboot/depca.c ++++ /dev/null +@@ -1,752 +0,0 @@ +-/* Etherboot: depca.h merged, comments from Linux driver retained */ +-/* depca.c: A DIGITAL DEPCA & EtherWORKS ethernet driver for linux. +- +- Written 1994, 1995 by David C. Davies. +- +- +- Copyright 1994 David C. Davies +- and +- United States Government +- (as represented by the Director, National Security Agency). +- +- Copyright 1995 Digital Equipment Corporation. +- +- +- This software may be used and distributed according to the terms of +- the GNU Public License, incorporated herein by reference. +- +- This driver is written for the Digital Equipment Corporation series +- of DEPCA and EtherWORKS ethernet cards: +- +- DEPCA (the original) +- DE100 +- DE101 +- DE200 Turbo +- DE201 Turbo +- DE202 Turbo (TP BNC) +- DE210 +- DE422 (EISA) +- +- The driver has been tested on DE100, DE200 and DE202 cards in a +- relatively busy network. The DE422 has been tested a little. +- +- This driver will NOT work for the DE203, DE204 and DE205 series of +- cards, since they have a new custom ASIC in place of the AMD LANCE +- chip. See the 'ewrk3.c' driver in the Linux source tree for running +- those cards. +- +- I have benchmarked the driver with a DE100 at 595kB/s to (542kB/s from) +- a DECstation 5000/200. +- +- The author may be reached at davies@maniac.ultranet.com +- +- ========================================================================= +- +- The driver was originally based on the 'lance.c' driver from Donald +- Becker which is included with the standard driver distribution for +- linux. V0.4 is a complete re-write with only the kernel interface +- remaining from the original code. +- +- 1) Lance.c code in /linux/drivers/net/ +- 2) "Ethernet/IEEE 802.3 Family. 1992 World Network Data Book/Handbook", +- AMD, 1992 [(800) 222-9323]. +- 3) "Am79C90 CMOS Local Area Network Controller for Ethernet (C-LANCE)", +- AMD, Pub. #17881, May 1993. +- 4) "Am79C960 PCnet-ISA(tm), Single-Chip Ethernet Controller for ISA", +- AMD, Pub. #16907, May 1992 +- 5) "DEC EtherWORKS LC Ethernet Controller Owners Manual", +- Digital Equipment corporation, 1990, Pub. #EK-DE100-OM.003 +- 6) "DEC EtherWORKS Turbo Ethernet Controller Owners Manual", +- Digital Equipment corporation, 1990, Pub. #EK-DE200-OM.003 +- 7) "DEPCA Hardware Reference Manual", Pub. #EK-DEPCA-PR +- Digital Equipment Corporation, 1989 +- 8) "DEC EtherWORKS Turbo_(TP BNC) Ethernet Controller Owners Manual", +- Digital Equipment corporation, 1991, Pub. #EK-DE202-OM.001 +- +- +- Peter Bauer's depca.c (V0.5) was referred to when debugging V0.1 of this +- driver. +- +- The original DEPCA card requires that the ethernet ROM address counter +- be enabled to count and has an 8 bit NICSR. The ROM counter enabling is +- only done when a 0x08 is read as the first address octet (to minimise +- the chances of writing over some other hardware's I/O register). The +- NICSR accesses have been changed to byte accesses for all the cards +- supported by this driver, since there is only one useful bit in the MSB +- (remote boot timeout) and it is not used. Also, there is a maximum of +- only 48kB network RAM for this card. My thanks to Torbjorn Lindh for +- help debugging all this (and holding my feet to the fire until I got it +- right). +- +- The DE200 series boards have on-board 64kB RAM for use as a shared +- memory network buffer. Only the DE100 cards make use of a 2kB buffer +- mode which has not been implemented in this driver (only the 32kB and +- 64kB modes are supported [16kB/48kB for the original DEPCA]). +- +- At the most only 2 DEPCA cards can be supported on the ISA bus because +- there is only provision for two I/O base addresses on each card (0x300 +- and 0x200). The I/O address is detected by searching for a byte sequence +- in the Ethernet station address PROM at the expected I/O address for the +- Ethernet PROM. The shared memory base address is 'autoprobed' by +- looking for the self test PROM and detecting the card name. When a +- second DEPCA is detected, information is placed in the base_addr +- variable of the next device structure (which is created if necessary), +- thus enabling ethif_probe initialization for the device. More than 2 +- EISA cards can be supported, but care will be needed assigning the +- shared memory to ensure that each slot has the correct IRQ, I/O address +- and shared memory address assigned. +- +- ************************************************************************ +- +- NOTE: If you are using two ISA DEPCAs, it is important that you assign +- the base memory addresses correctly. The driver autoprobes I/O 0x300 +- then 0x200. The base memory address for the first device must be less +- than that of the second so that the auto probe will correctly assign the +- I/O and memory addresses on the same card. I can't think of a way to do +- this unambiguously at the moment, since there is nothing on the cards to +- tie I/O and memory information together. +- +- I am unable to test 2 cards together for now, so this code is +- unchecked. All reports, good or bad, are welcome. +- +- ************************************************************************ +- +- The board IRQ setting must be at an unused IRQ which is auto-probed +- using Donald Becker's autoprobe routines. DEPCA and DE100 board IRQs are +- {2,3,4,5,7}, whereas the DE200 is at {5,9,10,11,15}. Note that IRQ2 is +- really IRQ9 in machines with 16 IRQ lines. +- +- No 16MB memory limitation should exist with this driver as DMA is not +- used and the common memory area is in low memory on the network card (my +- current system has 20MB and I've not had problems yet). +- +- The ability to load this driver as a loadable module has been added. To +- utilise this ability, you have to do <8 things: +- +- 0) have a copy of the loadable modules code installed on your system. +- 1) copy depca.c from the /linux/drivers/net directory to your favourite +- temporary directory. +- 2) if you wish, edit the source code near line 1530 to reflect the I/O +- address and IRQ you're using (see also 5). +- 3) compile depca.c, but include -DMODULE in the command line to ensure +- that the correct bits are compiled (see end of source code). +- 4) if you are wanting to add a new card, goto 5. Otherwise, recompile a +- kernel with the depca configuration turned off and reboot. +- 5) insmod depca.o [irq=7] [io=0x200] [mem=0xd0000] [adapter_name=DE100] +- [Alan Cox: Changed the code to allow command line irq/io assignments] +- [Dave Davies: Changed the code to allow command line mem/name +- assignments] +- 6) run the net startup bits for your eth?? interface manually +- (usually /etc/rc.inet[12] at boot time). +- 7) enjoy! +- +- Note that autoprobing is not allowed in loadable modules - the system is +- already up and running and you're messing with interrupts. +- +- To unload a module, turn off the associated interface +- 'ifconfig eth?? down' then 'rmmod depca'. +- +- To assign a base memory address for the shared memory when running as a +- loadable module, see 5 above. To include the adapter name (if you have +- no PROM but know the card name) also see 5 above. Note that this last +- option will not work with kernel built-in depca's. +- +- The shared memory assignment for a loadable module makes sense to avoid +- the 'memory autoprobe' picking the wrong shared memory (for the case of +- 2 depca's in a PC). +- +- ************************************************************************ +- Support for MCA EtherWORKS cards added 11-3-98. +- Verified to work with up to 2 DE212 cards in a system (although not +- fully stress-tested). +- +- Currently known bugs/limitations: +- +- Note: with the MCA stuff as a module, it trusts the MCA configuration, +- not the command line for IRQ and memory address. You can +- specify them if you want, but it will throw your values out. +- You still have to pass the IO address it was configured as +- though. +- +- ************************************************************************ +- TO DO: +- ------ +- +- +- Revision History +- ---------------- +- +- Version Date Description +- +- 0.1 25-jan-94 Initial writing. +- 0.2 27-jan-94 Added LANCE TX hardware buffer chaining. +- 0.3 1-feb-94 Added multiple DEPCA support. +- 0.31 4-feb-94 Added DE202 recognition. +- 0.32 19-feb-94 Tidy up. Improve multi-DEPCA support. +- 0.33 25-feb-94 Fix DEPCA ethernet ROM counter enable. +- Add jabber packet fix from murf@perftech.com +- and becker@super.org +- 0.34 7-mar-94 Fix DEPCA max network memory RAM & NICSR access. +- 0.35 8-mar-94 Added DE201 recognition. Tidied up. +- 0.351 30-apr-94 Added EISA support. Added DE422 recognition. +- 0.36 16-may-94 DE422 fix released. +- 0.37 22-jul-94 Added MODULE support +- 0.38 15-aug-94 Added DBR ROM switch in depca_close(). +- Multi DEPCA bug fix. +- 0.38axp 15-sep-94 Special version for Alpha AXP Linux V1.0. +- 0.381 12-dec-94 Added DE101 recognition, fix multicast bug. +- 0.382 9-feb-95 Fix recognition bug reported by . +- 0.383 22-feb-95 Fix for conflict with VESA SCSI reported by +- +- 0.384 17-mar-95 Fix a ring full bug reported by +- 0.385 3-apr-95 Fix a recognition bug reported by +- +- 0.386 21-apr-95 Fix the last fix...sorry, must be galloping senility +- 0.40 25-May-95 Rewrite for portability & updated. +- ALPHA support from +- 0.41 26-Jun-95 Added verify_area() calls in depca_ioctl() from +- suggestion by +- 0.42 27-Dec-95 Add 'mem' shared memory assignment for loadable +- modules. +- Add 'adapter_name' for loadable modules when no PROM. +- Both above from a suggestion by +- . +- Add new multicasting code. +- 0.421 22-Apr-96 Fix alloc_device() bug +- 0.422 29-Apr-96 Fix depca_hw_init() bug +- 0.423 7-Jun-96 Fix module load bug +- 0.43 16-Aug-96 Update alloc_device() to conform to de4x5.c +- 0.44 1-Sep-97 Fix *_probe() to test check_region() first - bug +- reported by +- 0.45 3-Nov-98 Added support for MCA EtherWORKS (DE210/DE212) cards +- by +- 0.451 5-Nov-98 Fixed mca stuff cuz I'm a dummy. +- 0.5 14-Nov-98 Re-spin for 2.1.x kernels. +- 0.51 27-Jun-99 Correct received packet length for CRC from +- report by +- +- ========================================================================= +-*/ +- +-#include "etherboot.h" +-#include "nic.h" +-#include "cards.h" +- +-/* +-** I/O addresses. Note that the 2k buffer option is not supported in +-** this driver. +-*/ +-#define DEPCA_NICSR ioaddr+0x00 /* Network interface CSR */ +-#define DEPCA_RBI ioaddr+0x02 /* RAM buffer index (2k buffer mode) */ +-#define DEPCA_DATA ioaddr+0x04 /* LANCE registers' data port */ +-#define DEPCA_ADDR ioaddr+0x06 /* LANCE registers' address port */ +-#define DEPCA_HBASE ioaddr+0x08 /* EISA high memory base address reg. */ +-#define DEPCA_PROM ioaddr+0x0c /* Ethernet address ROM data port */ +-#define DEPCA_CNFG ioaddr+0x0c /* EISA Configuration port */ +-#define DEPCA_RBSA ioaddr+0x0e /* RAM buffer starting address (2k buff.) */ +- +-/* +-** These are LANCE registers addressable through DEPCA_ADDR +-*/ +-#define CSR0 0 +-#define CSR1 1 +-#define CSR2 2 +-#define CSR3 3 +- +-/* +-** NETWORK INTERFACE CSR (NI_CSR) bit definitions +-*/ +- +-#define TO 0x0100 /* Time Out for remote boot */ +-#define SHE 0x0080 /* SHadow memory Enable */ +-#define BS 0x0040 /* Bank Select */ +-#define BUF 0x0020 /* BUFfer size (1->32k, 0->64k) */ +-#define RBE 0x0010 /* Remote Boot Enable (1->net boot) */ +-#define AAC 0x0008 /* Address ROM Address Counter (1->enable) */ +-#define _128KB 0x0008 /* 128kB Network RAM (1->enable) */ +-#define IM 0x0004 /* Interrupt Mask (1->mask) */ +-#define IEN 0x0002 /* Interrupt tristate ENable (1->enable) */ +-#define LED 0x0001 /* LED control */ +- +-/* +-** Control and Status Register 0 (CSR0) bit definitions +-*/ +- +-#define ERR 0x8000 /* Error summary */ +-#define BABL 0x4000 /* Babble transmitter timeout error */ +-#define CERR 0x2000 /* Collision Error */ +-#define MISS 0x1000 /* Missed packet */ +-#define MERR 0x0800 /* Memory Error */ +-#define RINT 0x0400 /* Receiver Interrupt */ +-#define TINT 0x0200 /* Transmit Interrupt */ +-#define IDON 0x0100 /* Initialization Done */ +-#define INTR 0x0080 /* Interrupt Flag */ +-#define INEA 0x0040 /* Interrupt Enable */ +-#define RXON 0x0020 /* Receiver on */ +-#define TXON 0x0010 /* Transmitter on */ +-#define TDMD 0x0008 /* Transmit Demand */ +-#define STOP 0x0004 /* Stop */ +-#define STRT 0x0002 /* Start */ +-#define INIT 0x0001 /* Initialize */ +-#define INTM 0xff00 /* Interrupt Mask */ +-#define INTE 0xfff0 /* Interrupt Enable */ +- +-/* +-** CONTROL AND STATUS REGISTER 3 (CSR3) +-*/ +- +-#define BSWP 0x0004 /* Byte SWaP */ +-#define ACON 0x0002 /* ALE control */ +-#define BCON 0x0001 /* Byte CONtrol */ +- +-/* +-** Initialization Block Mode Register +-*/ +- +-#define PROM 0x8000 /* Promiscuous Mode */ +-#define EMBA 0x0080 /* Enable Modified Back-off Algorithm */ +-#define INTL 0x0040 /* Internal Loopback */ +-#define DRTY 0x0020 /* Disable Retry */ +-#define COLL 0x0010 /* Force Collision */ +-#define DTCR 0x0008 /* Disable Transmit CRC */ +-#define LOOP 0x0004 /* Loopback */ +-#define DTX 0x0002 /* Disable the Transmitter */ +-#define DRX 0x0001 /* Disable the Receiver */ +- +-/* +-** Receive Message Descriptor 1 (RMD1) bit definitions. +-*/ +- +-#define R_OWN 0x80000000 /* Owner bit 0 = host, 1 = lance */ +-#define R_ERR 0x4000 /* Error Summary */ +-#define R_FRAM 0x2000 /* Framing Error */ +-#define R_OFLO 0x1000 /* Overflow Error */ +-#define R_CRC 0x0800 /* CRC Error */ +-#define R_BUFF 0x0400 /* Buffer Error */ +-#define R_STP 0x0200 /* Start of Packet */ +-#define R_ENP 0x0100 /* End of Packet */ +- +-/* +-** Transmit Message Descriptor 1 (TMD1) bit definitions. +-*/ +- +-#define T_OWN 0x80000000 /* Owner bit 0 = host, 1 = lance */ +-#define T_ERR 0x4000 /* Error Summary */ +-#define T_ADD_FCS 0x2000 /* More the 1 retry needed to Xmit */ +-#define T_MORE 0x1000 /* >1 retry to transmit packet */ +-#define T_ONE 0x0800 /* 1 try needed to transmit the packet */ +-#define T_DEF 0x0400 /* Deferred */ +-#define T_STP 0x02000000 /* Start of Packet */ +-#define T_ENP 0x01000000 /* End of Packet */ +-#define T_FLAGS 0xff000000 /* TX Flags Field */ +- +-/* +-** Transmit Message Descriptor 3 (TMD3) bit definitions. +-*/ +- +-#define TMD3_BUFF 0x8000 /* BUFFer error */ +-#define TMD3_UFLO 0x4000 /* UnderFLOw error */ +-#define TMD3_RES 0x2000 /* REServed */ +-#define TMD3_LCOL 0x1000 /* Late COLlision */ +-#define TMD3_LCAR 0x0800 /* Loss of CARrier */ +-#define TMD3_RTRY 0x0400 /* ReTRY error */ +- +-/* +-** Ethernet PROM defines +-*/ +-#define PROBE_LENGTH 32 +- +-/* +-** Set the number of Tx and Rx buffers. Ensure that the memory requested +-** here is <= to the amount of shared memory set up by the board switches. +-** The number of descriptors MUST BE A POWER OF 2. +-** +-** total_memory = NUM_RX_DESC*(8+RX_BUFF_SZ) + NUM_TX_DESC*(8+TX_BUFF_SZ) +-*/ +-#define NUM_RX_DESC 2 /* Number of RX descriptors */ +-#define NUM_TX_DESC 2 /* Number of TX descriptors */ +-#define RX_BUFF_SZ 1536 /* Buffer size for each Rx buffer */ +-#define TX_BUFF_SZ 1536 /* Buffer size for each Tx buffer */ +- +-/* +-** ISA Bus defines +-*/ +-#define DEPCA_IO_PORTS {0x300, 0x200, 0} +- +-#ifndef DEPCA_MODEL +-#define DEPCA_MODEL DEPCA +-#endif +- +-static enum { +- DEPCA, DE100, DE101, DE200, DE201, DE202, DE210, DE212, DE422, unknown +-} adapter = DEPCA_MODEL; +- +-/* +-** Name <-> Adapter mapping +-*/ +- +-static char *adapter_name[] = { +- "DEPCA", +- "DE100","DE101", +- "DE200","DE201","DE202", +- "DE210","DE212", +- "DE422", +- "" +-}; +- +-#ifndef DEPCA_RAM_BASE +-#define DEPCA_RAM_BASE 0xd0000 +-#endif +- +-/* +-** Memory Alignment. Each descriptor is 4 longwords long. To force a +-** particular alignment on the TX descriptor, adjust DESC_SKIP_LEN and +-** DESC_ALIGN. ALIGN aligns the start address of the private memory area +-** and hence the RX descriptor ring's first entry. +-*/ +-#define ALIGN4 ((u32)4 - 1) /* 1 longword align */ +-#define ALIGN8 ((u32)8 - 1) /* 2 longword (quadword) align */ +-#define ALIGN ALIGN8 /* Keep the LANCE happy... */ +- +-typedef long s32; +-typedef unsigned long u32; +-typedef short s16; +-typedef unsigned short u16; +-typedef char s8; +-typedef unsigned char u8; +- +-/* +-** The DEPCA Rx and Tx ring descriptors. +-*/ +-struct depca_rx_desc { +- volatile s32 base; +- s16 buf_length; /* This length is negative 2's complement! */ +- s16 msg_length; /* This length is "normal". */ +-}; +- +-struct depca_tx_desc { +- volatile s32 base; +- s16 length; /* This length is negative 2's complement! */ +- s16 misc; /* Errors and TDR info */ +-}; +- +-#define LA_MASK 0x0000ffff /* LANCE address mask for mapping network RAM +- to LANCE memory address space */ +- +-/* +-** The Lance initialization block, described in databook, in common memory. +-*/ +-struct depca_init { +- u16 mode; /* Mode register */ +- u8 phys_addr[ETH_ALEN]; /* Physical ethernet address */ +- u8 mcast_table[8]; /* Multicast Hash Table. */ +- u32 rx_ring; /* Rx ring base pointer & ring length */ +- u32 tx_ring; /* Tx ring base pointer & ring length */ +-}; +- +-struct depca_private { +- struct depca_rx_desc *rx_ring; +- struct depca_tx_desc *tx_ring; +- struct depca_init init_block; /* Shadow init block */ +- char *rx_memcpy[NUM_RX_DESC]; +- char *tx_memcpy[NUM_TX_DESC]; +- u32 bus_offset; /* ISA bus address offset */ +- u32 sh_mem; /* address of shared mem */ +- u32 dma_buffs; /* Rx & Tx buffer start */ +- int rx_cur, tx_cur; /* Next free ring entry */ +- int txRingMask, rxRingMask; +- s32 rx_rlen, tx_rlen; +- /* log2([rt]xRingMask+1) for the descriptors */ +-}; +- +-static Address mem_start = DEPCA_RAM_BASE; +-static Address mem_len, offset; +-static unsigned short ioaddr = 0; +-static struct depca_private lp; +- +-/* +-** Miscellaneous defines... +-*/ +-#define STOP_DEPCA \ +- outw(CSR0, DEPCA_ADDR);\ +- outw(STOP, DEPCA_DATA) +- +-/* Initialize the lance Rx and Tx descriptor rings. */ +-static void depca_init_ring(struct nic *nic) +-{ +- int i; +- u32 p; +- +- lp.rx_cur = lp.tx_cur = 0; +- /* Initialize the base addresses and length of each buffer in the ring */ +- for (i = 0; i <= lp.rxRingMask; i++) { +- writel((p = lp.dma_buffs + i * RX_BUFF_SZ) | R_OWN, &lp.rx_ring[i].base); +- writew(-RX_BUFF_SZ, &lp.rx_ring[i].buf_length); +- lp.rx_memcpy[i] = (char *) (p + lp.bus_offset); +- } +- for (i = 0; i <= lp.txRingMask; i++) { +- writel((p = lp.dma_buffs + (i + lp.txRingMask + 1) * TX_BUFF_SZ) & 0x00ffffff, &lp.tx_ring[i].base); +- lp.tx_memcpy[i] = (char *) (p + lp.bus_offset); +- } +- +- /* Set up the initialization block */ +- lp.init_block.rx_ring = ((u32) ((u32) lp.rx_ring) & LA_MASK) | lp.rx_rlen; +- lp.init_block.tx_ring = ((u32) ((u32) lp.tx_ring) & LA_MASK) | lp.tx_rlen; +- for (i = 0; i < ETH_ALEN; i++) +- lp.init_block.phys_addr[i] = nic->node_addr[i]; +- lp.init_block.mode = 0x0000; /* Enable the Tx and Rx */ +- memset(lp.init_block.mcast_table, 0, sizeof(lp.init_block.mcast_table)); +-} +- +-static void LoadCSRs(void) +-{ +- outw(CSR1, DEPCA_ADDR); /* initialisation block address LSW */ +- outw((u16) (lp.sh_mem & LA_MASK), DEPCA_DATA); +- outw(CSR2, DEPCA_ADDR); /* initialisation block address MSW */ +- outw((u16) ((lp.sh_mem & LA_MASK) >> 16), DEPCA_DATA); +- outw(CSR3, DEPCA_ADDR); /* ALE control */ +- outw(ACON, DEPCA_DATA); +- outw(CSR0, DEPCA_ADDR); /* Point back to CSR0 */ +-} +- +-static int InitRestartDepca(void) +-{ +- int i; +- +- /* Copy the shadow init_block to shared memory */ +- memcpy_toio((char *)lp.sh_mem, &lp.init_block, sizeof(struct depca_init)); +- outw(CSR0, DEPCA_ADDR); /* point back to CSR0 */ +- outw(INIT, DEPCA_DATA); /* initialise DEPCA */ +- +- for (i = 0; i < 100 && !(inw(DEPCA_DATA) & IDON); i++) +- ; +- if (i < 100) { +- /* clear IDON by writing a 1, and start LANCE */ +- outw(IDON | STRT, DEPCA_DATA); +- } else { +- printf("DEPCA not initialised\n"); +- return (1); +- } +- return (0); +-} +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void depca_reset(struct nic *nic) +-{ +- s16 nicsr; +- int i, j; +- +- STOP_DEPCA; +- nicsr = inb(DEPCA_NICSR); +- nicsr = ((nicsr & ~SHE & ~RBE & ~IEN) | IM); +- outb(nicsr, DEPCA_NICSR); +- if (inw(DEPCA_DATA) != STOP) +- { +- printf("depca: Cannot stop NIC\n"); +- return; +- } +- +- /* Initialisation block */ +- lp.sh_mem = mem_start; +- mem_start += sizeof(struct depca_init); +- /* Tx & Rx descriptors (aligned to a quadword boundary) */ +- mem_start = (mem_start + ALIGN) & ~ALIGN; +- lp.rx_ring = (struct depca_rx_desc *) mem_start; +- mem_start += (sizeof(struct depca_rx_desc) * NUM_RX_DESC); +- lp.tx_ring = (struct depca_tx_desc *) mem_start; +- mem_start += (sizeof(struct depca_tx_desc) * NUM_TX_DESC); +- +- lp.bus_offset = mem_start & 0x00ff0000; +- /* LANCE re-mapped start address */ +- lp.dma_buffs = mem_start & LA_MASK; +- +- /* Finish initialising the ring information. */ +- lp.rxRingMask = NUM_RX_DESC - 1; +- lp.txRingMask = NUM_TX_DESC - 1; +- +- /* Calculate Tx/Rx RLEN size for the descriptors. */ +- for (i = 0, j = lp.rxRingMask; j > 0; i++) { +- j >>= 1; +- } +- lp.rx_rlen = (s32) (i << 29); +- for (i = 0, j = lp.txRingMask; j > 0; i++) { +- j >>= 1; +- } +- lp.tx_rlen = (s32) (i << 29); +- +- /* Load the initialisation block */ +- depca_init_ring(nic); +- LoadCSRs(); +- InitRestartDepca(); +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int depca_poll(struct nic *nic) +-{ +- int entry; +- u32 status; +- +- entry = lp.rx_cur; +- if ((status = readl(&lp.rx_ring[entry].base) & R_OWN)) +- return (0); +- memcpy(nic->packet, lp.rx_memcpy[entry], nic->packetlen = lp.rx_ring[entry].msg_length); +- lp.rx_ring[entry].base |= R_OWN; +- lp.rx_cur = (++lp.rx_cur) & lp.rxRingMask; +- return (1); +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void depca_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- int entry, len; +- char *mem; +- +- /* send the packet to destination */ +- /* +- ** Caution: the right order is important here... dont +- ** setup the ownership rights until all the other +- ** information is in place +- */ +- mem = lp.tx_memcpy[entry = lp.tx_cur]; +- memcpy_toio(mem, d, ETH_ALEN); +- memcpy_toio(mem + ETH_ALEN, nic->node_addr, ETH_ALEN); +- mem[ETH_ALEN * 2] = t >> 8; +- mem[ETH_ALEN * 2 + 1] = t; +- memcpy_toio(mem + ETH_HLEN, p, s); +- s += ETH_HLEN; +- len = (s < ETH_ZLEN ? ETH_ZLEN : s); +- /* clean out flags */ +- writel(readl(&lp.tx_ring[entry].base) & ~T_FLAGS, &lp.tx_ring[entry].base); +- /* clears other error flags */ +- writew(0x0000, &lp.tx_ring[entry].misc); +- /* packet length in buffer */ +- writew(-len, &lp.tx_ring[entry].length); +- /* start and end of packet, ownership */ +- writel(readl(&lp.tx_ring[entry].base) | (T_STP|T_ENP|T_OWN), &lp.tx_ring[entry].base); +- /* update current pointers */ +- lp.tx_cur = (++lp.tx_cur) & lp.txRingMask; +-} +- +-/************************************************************************** +-DISABLE - Turn off ethernet interface +-***************************************************************************/ +-static void depca_disable(struct nic *nic) +-{ +- STOP_DEPCA; +-} +- +-/* +-** Look for a special sequence in the Ethernet station address PROM that +-** is common across all DEPCA products. Note that the original DEPCA needs +-** its ROM address counter to be initialized and enabled. Only enable +-** if the first address octet is a 0x08 - this minimises the chances of +-** messing around with some other hardware, but it assumes that this DEPCA +-** card initialized itself correctly. +-** +-** Search the Ethernet address ROM for the signature. Since the ROM address +-** counter can start at an arbitrary point, the search must include the entire +-** probe sequence length plus the (length_of_the_signature - 1). +-** Stop the search IMMEDIATELY after the signature is found so that the +-** PROM address counter is correctly positioned at the start of the +-** ethernet address for later read out. +-*/ +-static int depca_probe1(struct nic *nic) +-{ +- u8 data, nicsr; +- /* This is only correct for little endian machines, but then +- Etherboot doesn't work on anything but a PC */ +- u8 sig[] = { 0xFF, 0x00, 0x55, 0xAA, 0xFF, 0x00, 0x55, 0xAA }; +- int i, j; +- long sum, chksum; +- +- data = inb(DEPCA_PROM); /* clear counter on DEPCA */ +- data = inb(DEPCA_PROM); /* read data */ +- if (data == 0x8) { +- nicsr = inb(DEPCA_NICSR); +- nicsr |= AAC; +- outb(nicsr, DEPCA_NICSR); +- } +- for (i = 0, j = 0; j < (int)sizeof(sig) && i < PROBE_LENGTH+((int)sizeof(sig))-1; ++i) { +- data = inb(DEPCA_PROM); +- if (data == sig[j]) /* track signature */ +- ++j; +- else +- j = (data == sig[0]) ? 1 : 0; +- } +- if (j != sizeof(sig)) +- return (0); +- /* put the card in its initial state */ +- STOP_DEPCA; +- nicsr = ((inb(DEPCA_NICSR) & ~SHE & ~RBE & ~IEN) | IM); +- outb(nicsr, DEPCA_NICSR); +- if (inw(DEPCA_DATA) != STOP) +- return (0); +- memcpy((char *)mem_start, sig, sizeof(sig)); +- if (memcmp((char *)mem_start, sig, sizeof(sig)) != 0) +- return (0); +- for (i = 0, j = 0, sum = 0; j < 3; j++) { +- sum <<= 1; +- if (sum > 0xFFFF) +- sum -= 0xFFFF; +- sum += (u8)(nic->node_addr[i++] = inb(DEPCA_PROM)); +- sum += (u16)((nic->node_addr[i++] = inb(DEPCA_PROM)) << 8); +- if (sum > 0xFFFF) +- sum -= 0xFFFF; +- } +- if (sum == 0xFFFF) +- sum = 0; +- chksum = (u8)inb(DEPCA_PROM); +- chksum |= (u16)(inb(DEPCA_PROM) << 8); +- mem_len = (adapter == DEPCA) ? (48 << 10) : (64 << 10); +- offset = 0; +- if (nicsr & BUF) { +- offset = 0x8000; +- nicsr &= ~BS; +- mem_len -= (32 << 10); +- } +- if (adapter != DEPCA) /* enable shadow RAM */ +- outb(nicsr |= SHE, DEPCA_NICSR); +- printf("%s base %#hX, memory [%#hX-%#hX], addr %!", +- adapter_name[adapter], ioaddr, mem_start, mem_start + mem_len, +- nic->node_addr); +- if (sum != chksum) +- printf(" (bad checksum)"); +- putchar('\n'); +- return (1); +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +-struct nic *depca_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- static unsigned short base[] = DEPCA_IO_PORTS; +- int i; +- +- if (probe_addrs == 0 || probe_addrs[0] == 0) +- probe_addrs = base; /* Use defaults */ +- for (i = 0; (ioaddr = base[i]) != 0; ++i) { +- if (depca_probe1(nic)) +- break; +- } +- if (ioaddr == 0) +- return (0); +- depca_reset(nic); +- /* point to NIC specific routines */ +- nic->reset = depca_reset; +- nic->poll = depca_poll; +- nic->transmit = depca_transmit; +- nic->disable = depca_disable; +- return (nic); +-} +Index: b/netboot/dev.h +=================================================================== +--- /dev/null ++++ b/netboot/dev.h +@@ -0,0 +1,83 @@ ++#ifndef _DEV_H ++#define _DEV_H ++ ++#include "isa.h" ++#include "pci.h" ++ ++/* Need to check the packing of this struct if Etherboot is ported */ ++struct dev_id ++{ ++ unsigned short vendor_id; ++ unsigned short device_id; ++ unsigned char bus_type; ++#define PCI_BUS_TYPE 1 ++#define ISA_BUS_TYPE 2 ++}; ++ ++/* Dont use sizeof, that will include the padding */ ++#define DEV_ID_SIZE 8 ++ ++ ++struct pci_probe_state ++{ ++#ifdef CONFIG_PCI ++ struct pci_device dev; ++ int advance; ++#else ++ int dummy; ++#endif ++}; ++struct isa_probe_state ++{ ++#ifdef CONFIG_ISA ++ const struct isa_driver *driver; ++ int advance; ++#else ++ int dummy; ++#endif ++}; ++ ++union probe_state ++{ ++ struct pci_probe_state pci; ++ struct isa_probe_state isa; ++}; ++ ++struct dev ++{ ++ void (*disable)P((struct dev *)); ++ struct dev_id devid; /* device ID string (sent to DHCP server) */ ++ int index; /* Index of next device on this controller to probe */ ++ int type; /* Type of device I am probing for */ ++ int how_probe; /* First, next or awake */ ++ int to_probe; /* Flavor of device I am probing */ ++ int failsafe; /* Failsafe probe requested */ ++ int type_index; /* Index of this device (within type) */ ++#define PROBE_NONE 0 ++#define PROBE_PCI 1 ++#define PROBE_ISA 2 ++ union probe_state state; ++}; ++ ++ ++#define NIC_DRIVER 0 ++#define DISK_DRIVER 1 ++#define FLOPPY_DRIVER 2 ++ ++#define BRIDGE_DRIVER 1000 ++ ++#define PROBE_FIRST (-1) ++#define PROBE_NEXT 0 ++#define PROBE_AWAKE 1 /* After calling disable bring up the same device */ ++ ++/* The probe result codes are selected ++ * to allow them to be fed back into the probe ++ * routine and get a successful probe. ++ */ ++#define PROBE_FAILED PROBE_FIRST ++#define PROBE_WORKED PROBE_NEXT ++ ++extern int probe(struct dev *dev); ++extern void disable(struct dev *dev); ++ ++#endif /* _DEV_H */ +Index: b/netboot/e1000.c +=================================================================== +--- /dev/null ++++ b/netboot/e1000.c +@@ -0,0 +1,3682 @@ ++/************************************************************************** ++Etherboot - BOOTP/TFTP Bootstrap Program ++Inter Pro 1000 for Etherboot ++Drivers are port from Intel's Linux driver e1000-4.3.15 ++ ++***************************************************************************/ ++/******************************************************************************* ++ ++ ++ Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved. ++ ++ 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. ++ ++ The full GNU General Public License is included in this distribution in the ++ file called LICENSE. ++ ++ Contact Information: ++ Linux NICS ++ Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 ++ ++*******************************************************************************/ ++/* ++ * Copyright (C) Archway Digital Solutions. ++ * ++ * written by Chrsitopher Li or ++ * 2/9/2002 ++ * ++ * Copyright (C) Linux Networx. ++ * Massive upgrade to work with the new intel gigabit NICs. ++ * ++ * ++ * Support for 82541ei & 82547ei chips from Intel's Linux driver 5.1.13 added by ++ * Georg Baum , sponsored by PetaMem GmbH and linkLINE Communications, Inc. ++ * ++ * 01/2004: Updated to Linux driver 5.2.22 by Georg Baum ++ */ ++ ++/* to get some global routines like printf */ ++#include "etherboot.h" ++/* to get the interface to the body of the program */ ++#include "nic.h" ++/* to get the PCI support functions, if this is a PCI NIC */ ++#include "pci.h" ++#include "timer.h" ++ ++typedef unsigned char *dma_addr_t; ++ ++typedef enum { ++ FALSE = 0, ++ TRUE = 1 ++} boolean_t; ++ ++#define DEBUG 0 ++ ++ ++/* Some pieces of code are disabled with #if 0 ... #endif. ++ * They are not deleted to show where the etherboot driver differs ++ * from the linux driver below the function level. ++ * Some member variables of the hw struct have been eliminated ++ * and the corresponding inplace checks inserted instead. ++ * Pieces such as LED handling that we definitely don't need are deleted. ++ * ++ * The following defines should not be needed normally, ++ * but may be helpful for debugging purposes. */ ++ ++/* Define this if you want to program the transmission control register ++ * the way the Linux driver does it. */ ++#undef LINUX_DRIVER_TCTL ++ ++/* Define this to behave more like the Linux driver. */ ++#undef LINUX_DRIVER ++ ++#include "e1000_hw.h" ++ ++/* NIC specific static variables go here */ ++static struct e1000_hw hw; ++static char tx_pool[128 + 16]; ++static char rx_pool[128 + 16]; ++static char packet[2096]; ++ ++static struct e1000_tx_desc *tx_base; ++static struct e1000_rx_desc *rx_base; ++ ++static int tx_tail; ++static int rx_tail, rx_last; ++ ++/* Function forward declarations */ ++static int e1000_setup_link(struct e1000_hw *hw); ++static int e1000_setup_fiber_serdes_link(struct e1000_hw *hw); ++static int e1000_setup_copper_link(struct e1000_hw *hw); ++static int e1000_phy_setup_autoneg(struct e1000_hw *hw); ++static void e1000_config_collision_dist(struct e1000_hw *hw); ++static int e1000_config_mac_to_phy(struct e1000_hw *hw); ++static int e1000_config_fc_after_link_up(struct e1000_hw *hw); ++static int e1000_check_for_link(struct e1000_hw *hw); ++static int e1000_wait_autoneg(struct e1000_hw *hw); ++static void e1000_get_speed_and_duplex(struct e1000_hw *hw, uint16_t *speed, uint16_t *duplex); ++static int e1000_read_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy_data); ++static int e1000_read_phy_reg_ex(struct e1000_hw *hw, uint32_t reg_addr, uint16_t *phy_data); ++static int e1000_write_phy_reg(struct e1000_hw *hw, uint32_t reg_addr, uint16_t phy_data); ++static int e1000_write_phy_reg_ex(struct e1000_hw *hw, uint32_t reg_addr, uint16_t phy_data); ++static void e1000_phy_hw_reset(struct e1000_hw *hw); ++static int e1000_phy_reset(struct e1000_hw *hw); ++static int e1000_detect_gig_phy(struct e1000_hw *hw); ++ ++/* Printing macros... */ ++ ++#define E1000_ERR(args...) printf("e1000: " args) ++ ++#if DEBUG >= 3 ++#define E1000_DBG(args...) printf("e1000: " args) ++#else ++#define E1000_DBG(args...) ++#endif ++ ++#define MSGOUT(S, A, B) printk(S "\n", A, B) ++#if DEBUG >= 2 ++#define DEBUGFUNC(F) DEBUGOUT(F "\n"); ++#else ++#define DEBUGFUNC(F) ++#endif ++#if DEBUG >= 1 ++#define DEBUGOUT(S) printf(S) ++#define DEBUGOUT1(S,A) printf(S,A) ++#define DEBUGOUT2(S,A,B) printf(S,A,B) ++#define DEBUGOUT3(S,A,B,C) printf(S,A,B,C) ++#define DEBUGOUT7(S,A,B,C,D,E,F,G) printf(S,A,B,C,D,E,F,G) ++#else ++#define DEBUGOUT(S) ++#define DEBUGOUT1(S,A) ++#define DEBUGOUT2(S,A,B) ++#define DEBUGOUT3(S,A,B,C) ++#define DEBUGOUT7(S,A,B,C,D,E,F,G) ++#endif ++ ++#define E1000_WRITE_REG(a, reg, value) ( \ ++ ((a)->mac_type >= e1000_82543) ? \ ++ (writel((value), ((a)->hw_addr + E1000_##reg))) : \ ++ (writel((value), ((a)->hw_addr + E1000_82542_##reg)))) ++ ++#define E1000_READ_REG(a, reg) ( \ ++ ((a)->mac_type >= e1000_82543) ? \ ++ readl((a)->hw_addr + E1000_##reg) : \ ++ readl((a)->hw_addr + E1000_82542_##reg)) ++ ++#define E1000_WRITE_REG_ARRAY(a, reg, offset, value) ( \ ++ ((a)->mac_type >= e1000_82543) ? \ ++ writel((value), ((a)->hw_addr + E1000_##reg + ((offset) << 2))) : \ ++ writel((value), ((a)->hw_addr + E1000_82542_##reg + ((offset) << 2)))) ++ ++#define E1000_READ_REG_ARRAY(a, reg, offset) ( \ ++ ((a)->mac_type >= e1000_82543) ? \ ++ readl((a)->hw_addr + E1000_##reg + ((offset) << 2)) : \ ++ readl((a)->hw_addr + E1000_82542_##reg + ((offset) << 2))) ++ ++#define E1000_WRITE_FLUSH(a) {uint32_t x; x = E1000_READ_REG(a, STATUS);} ++ ++uint32_t ++e1000_io_read(struct e1000_hw *hw __unused, uint32_t port) ++{ ++ return inl(port); ++} ++ ++void ++e1000_io_write(struct e1000_hw *hw __unused, uint32_t port, uint32_t value) ++{ ++ outl(value, port); ++} ++ ++static inline void e1000_pci_set_mwi(struct e1000_hw *hw) ++{ ++ pci_write_config_word(hw->pdev, PCI_COMMAND, hw->pci_cmd_word); ++} ++ ++static inline void e1000_pci_clear_mwi(struct e1000_hw *hw) ++{ ++ pci_write_config_word(hw->pdev, PCI_COMMAND, ++ hw->pci_cmd_word & ~PCI_COMMAND_INVALIDATE); ++} ++ ++/****************************************************************************** ++ * Raises the EEPROM's clock input. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * eecd - EECD's current value ++ *****************************************************************************/ ++static void ++e1000_raise_ee_clk(struct e1000_hw *hw, ++ uint32_t *eecd) ++{ ++ /* Raise the clock input to the EEPROM (by setting the SK bit), and then ++ * wait microseconds. ++ */ ++ *eecd = *eecd | E1000_EECD_SK; ++ E1000_WRITE_REG(hw, EECD, *eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(hw->eeprom.delay_usec); ++} ++ ++/****************************************************************************** ++ * Lowers the EEPROM's clock input. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * eecd - EECD's current value ++ *****************************************************************************/ ++static void ++e1000_lower_ee_clk(struct e1000_hw *hw, ++ uint32_t *eecd) ++{ ++ /* Lower the clock input to the EEPROM (by clearing the SK bit), and then ++ * wait 50 microseconds. ++ */ ++ *eecd = *eecd & ~E1000_EECD_SK; ++ E1000_WRITE_REG(hw, EECD, *eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(hw->eeprom.delay_usec); ++} ++ ++/****************************************************************************** ++ * Shift data bits out to the EEPROM. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * data - data to send to the EEPROM ++ * count - number of bits to shift out ++ *****************************************************************************/ ++static void ++e1000_shift_out_ee_bits(struct e1000_hw *hw, ++ uint16_t data, ++ uint16_t count) ++{ ++ struct e1000_eeprom_info *eeprom = &hw->eeprom; ++ uint32_t eecd; ++ uint32_t mask; ++ ++ /* We need to shift "count" bits out to the EEPROM. So, value in the ++ * "data" parameter will be shifted out to the EEPROM one bit at a time. ++ * In order to do this, "data" must be broken down into bits. ++ */ ++ mask = 0x01 << (count - 1); ++ eecd = E1000_READ_REG(hw, EECD); ++ if (eeprom->type == e1000_eeprom_microwire) { ++ eecd &= ~E1000_EECD_DO; ++ } else if (eeprom->type == e1000_eeprom_spi) { ++ eecd |= E1000_EECD_DO; ++ } ++ do { ++ /* A "1" is shifted out to the EEPROM by setting bit "DI" to a "1", ++ * and then raising and then lowering the clock (the SK bit controls ++ * the clock input to the EEPROM). A "0" is shifted out to the EEPROM ++ * by setting "DI" to "0" and then raising and then lowering the clock. ++ */ ++ eecd &= ~E1000_EECD_DI; ++ ++ if(data & mask) ++ eecd |= E1000_EECD_DI; ++ ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ ++ udelay(eeprom->delay_usec); ++ ++ e1000_raise_ee_clk(hw, &eecd); ++ e1000_lower_ee_clk(hw, &eecd); ++ ++ mask = mask >> 1; ++ ++ } while(mask); ++ ++ /* We leave the "DI" bit set to "0" when we leave this routine. */ ++ eecd &= ~E1000_EECD_DI; ++ E1000_WRITE_REG(hw, EECD, eecd); ++} ++ ++/****************************************************************************** ++ * Shift data bits in from the EEPROM ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static uint16_t ++e1000_shift_in_ee_bits(struct e1000_hw *hw, ++ uint16_t count) ++{ ++ uint32_t eecd; ++ uint32_t i; ++ uint16_t data; ++ ++ /* In order to read a register from the EEPROM, we need to shift 'count' ++ * bits in from the EEPROM. Bits are "shifted in" by raising the clock ++ * input to the EEPROM (setting the SK bit), and then reading the value of ++ * the "DO" bit. During this "shifting in" process the "DI" bit should ++ * always be clear. ++ */ ++ ++ eecd = E1000_READ_REG(hw, EECD); ++ ++ eecd &= ~(E1000_EECD_DO | E1000_EECD_DI); ++ data = 0; ++ ++ for(i = 0; i < count; i++) { ++ data = data << 1; ++ e1000_raise_ee_clk(hw, &eecd); ++ ++ eecd = E1000_READ_REG(hw, EECD); ++ ++ eecd &= ~(E1000_EECD_DI); ++ if(eecd & E1000_EECD_DO) ++ data |= 1; ++ ++ e1000_lower_ee_clk(hw, &eecd); ++ } ++ ++ return data; ++} ++ ++/****************************************************************************** ++ * Prepares EEPROM for access ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Lowers EEPROM clock. Clears input pin. Sets the chip select pin. This ++ * function should be called before issuing a command to the EEPROM. ++ *****************************************************************************/ ++static int32_t ++e1000_acquire_eeprom(struct e1000_hw *hw) ++{ ++ struct e1000_eeprom_info *eeprom = &hw->eeprom; ++ uint32_t eecd, i=0; ++ ++ eecd = E1000_READ_REG(hw, EECD); ++ ++ /* Request EEPROM Access */ ++ if(hw->mac_type > e1000_82544) { ++ eecd |= E1000_EECD_REQ; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ eecd = E1000_READ_REG(hw, EECD); ++ while((!(eecd & E1000_EECD_GNT)) && ++ (i < E1000_EEPROM_GRANT_ATTEMPTS)) { ++ i++; ++ udelay(5); ++ eecd = E1000_READ_REG(hw, EECD); ++ } ++ if(!(eecd & E1000_EECD_GNT)) { ++ eecd &= ~E1000_EECD_REQ; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ DEBUGOUT("Could not acquire EEPROM grant\n"); ++ return -E1000_ERR_EEPROM; ++ } ++ } ++ ++ /* Setup EEPROM for Read/Write */ ++ ++ if (eeprom->type == e1000_eeprom_microwire) { ++ /* Clear SK and DI */ ++ eecd &= ~(E1000_EECD_DI | E1000_EECD_SK); ++ E1000_WRITE_REG(hw, EECD, eecd); ++ ++ /* Set CS */ ++ eecd |= E1000_EECD_CS; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ } else if (eeprom->type == e1000_eeprom_spi) { ++ /* Clear SK and CS */ ++ eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); ++ E1000_WRITE_REG(hw, EECD, eecd); ++ udelay(1); ++ } ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Returns EEPROM to a "standby" state ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static void ++e1000_standby_eeprom(struct e1000_hw *hw) ++{ ++ struct e1000_eeprom_info *eeprom = &hw->eeprom; ++ uint32_t eecd; ++ ++ eecd = E1000_READ_REG(hw, EECD); ++ ++ if(eeprom->type == e1000_eeprom_microwire) { ++ ++ /* Deselect EEPROM */ ++ eecd &= ~(E1000_EECD_CS | E1000_EECD_SK); ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(eeprom->delay_usec); ++ ++ /* Clock high */ ++ eecd |= E1000_EECD_SK; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(eeprom->delay_usec); ++ ++ /* Select EEPROM */ ++ eecd |= E1000_EECD_CS; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(eeprom->delay_usec); ++ ++ /* Clock low */ ++ eecd &= ~E1000_EECD_SK; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(eeprom->delay_usec); ++ } else if(eeprom->type == e1000_eeprom_spi) { ++ /* Toggle CS to flush commands */ ++ eecd |= E1000_EECD_CS; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(eeprom->delay_usec); ++ eecd &= ~E1000_EECD_CS; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(eeprom->delay_usec); ++ } ++} ++ ++/****************************************************************************** ++ * Terminates a command by inverting the EEPROM's chip select pin ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static void ++e1000_release_eeprom(struct e1000_hw *hw) ++{ ++ uint32_t eecd; ++ ++ eecd = E1000_READ_REG(hw, EECD); ++ ++ if (hw->eeprom.type == e1000_eeprom_spi) { ++ eecd |= E1000_EECD_CS; /* Pull CS high */ ++ eecd &= ~E1000_EECD_SK; /* Lower SCK */ ++ ++ E1000_WRITE_REG(hw, EECD, eecd); ++ ++ udelay(hw->eeprom.delay_usec); ++ } else if(hw->eeprom.type == e1000_eeprom_microwire) { ++ /* cleanup eeprom */ ++ ++ /* CS on Microwire is active-high */ ++ eecd &= ~(E1000_EECD_CS | E1000_EECD_DI); ++ ++ E1000_WRITE_REG(hw, EECD, eecd); ++ ++ /* Rising edge of clock */ ++ eecd |= E1000_EECD_SK; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(hw->eeprom.delay_usec); ++ ++ /* Falling edge of clock */ ++ eecd &= ~E1000_EECD_SK; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ E1000_WRITE_FLUSH(hw); ++ udelay(hw->eeprom.delay_usec); ++ } ++ ++ /* Stop requesting EEPROM access */ ++ if(hw->mac_type > e1000_82544) { ++ eecd &= ~E1000_EECD_REQ; ++ E1000_WRITE_REG(hw, EECD, eecd); ++ } ++} ++ ++/****************************************************************************** ++ * Reads a 16 bit word from the EEPROM. ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static int32_t ++e1000_spi_eeprom_ready(struct e1000_hw *hw) ++{ ++ uint16_t retry_count = 0; ++ uint8_t spi_stat_reg; ++ ++ /* Read "Status Register" repeatedly until the LSB is cleared. The ++ * EEPROM will signal that the command has been completed by clearing ++ * bit 0 of the internal status register. If it's not cleared within ++ * 5 milliseconds, then error out. ++ */ ++ retry_count = 0; ++ do { ++ e1000_shift_out_ee_bits(hw, EEPROM_RDSR_OPCODE_SPI, ++ hw->eeprom.opcode_bits); ++ spi_stat_reg = (uint8_t)e1000_shift_in_ee_bits(hw, 8); ++ if (!(spi_stat_reg & EEPROM_STATUS_RDY_SPI)) ++ break; ++ ++ udelay(5); ++ retry_count += 5; ++ ++ } while(retry_count < EEPROM_MAX_RETRY_SPI); ++ ++ /* ATMEL SPI write time could vary from 0-20mSec on 3.3V devices (and ++ * only 0-5mSec on 5V devices) ++ */ ++ if(retry_count >= EEPROM_MAX_RETRY_SPI) { ++ DEBUGOUT("SPI EEPROM Status error\n"); ++ return -E1000_ERR_EEPROM; ++ } ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Reads a 16 bit word from the EEPROM. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * offset - offset of word in the EEPROM to read ++ * data - word read from the EEPROM ++ * words - number of words to read ++ *****************************************************************************/ ++static int ++e1000_read_eeprom(struct e1000_hw *hw, ++ uint16_t offset, ++ uint16_t words, ++ uint16_t *data) ++{ ++ struct e1000_eeprom_info *eeprom = &hw->eeprom; ++ uint32_t i = 0; ++ ++ DEBUGFUNC("e1000_read_eeprom"); ++ ++ /* A check for invalid values: offset too large, too many words, and not ++ * enough words. ++ */ ++ if((offset > eeprom->word_size) || (words > eeprom->word_size - offset) || ++ (words == 0)) { ++ DEBUGOUT("\"words\" parameter out of bounds\n"); ++ return -E1000_ERR_EEPROM; ++ } ++ ++ /* Prepare the EEPROM for reading */ ++ if(e1000_acquire_eeprom(hw) != E1000_SUCCESS) ++ return -E1000_ERR_EEPROM; ++ ++ if(eeprom->type == e1000_eeprom_spi) { ++ uint16_t word_in; ++ uint8_t read_opcode = EEPROM_READ_OPCODE_SPI; ++ ++ if(e1000_spi_eeprom_ready(hw)) { ++ e1000_release_eeprom(hw); ++ return -E1000_ERR_EEPROM; ++ } ++ ++ e1000_standby_eeprom(hw); ++ ++ /* Some SPI eeproms use the 8th address bit embedded in the opcode */ ++ if((eeprom->address_bits == 8) && (offset >= 128)) ++ read_opcode |= EEPROM_A8_OPCODE_SPI; ++ ++ /* Send the READ command (opcode + addr) */ ++ e1000_shift_out_ee_bits(hw, read_opcode, eeprom->opcode_bits); ++ e1000_shift_out_ee_bits(hw, (uint16_t)(offset*2), eeprom->address_bits); ++ ++ /* Read the data. The address of the eeprom internally increments with ++ * each byte (spi) being read, saving on the overhead of eeprom setup ++ * and tear-down. The address counter will roll over if reading beyond ++ * the size of the eeprom, thus allowing the entire memory to be read ++ * starting from any offset. */ ++ for (i = 0; i < words; i++) { ++ word_in = e1000_shift_in_ee_bits(hw, 16); ++ data[i] = (word_in >> 8) | (word_in << 8); ++ } ++ } else if(eeprom->type == e1000_eeprom_microwire) { ++ for (i = 0; i < words; i++) { ++ /* Send the READ command (opcode + addr) */ ++ e1000_shift_out_ee_bits(hw, EEPROM_READ_OPCODE_MICROWIRE, ++ eeprom->opcode_bits); ++ e1000_shift_out_ee_bits(hw, (uint16_t)(offset + i), ++ eeprom->address_bits); ++ ++ /* Read the data. For microwire, each word requires the overhead ++ * of eeprom setup and tear-down. */ ++ data[i] = e1000_shift_in_ee_bits(hw, 16); ++ e1000_standby_eeprom(hw); ++ } ++ } ++ ++ /* End this read operation */ ++ e1000_release_eeprom(hw); ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Verifies that the EEPROM has a valid checksum ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Reads the first 64 16 bit words of the EEPROM and sums the values read. ++ * If the the sum of the 64 16 bit words is 0xBABA, the EEPROM's checksum is ++ * valid. ++ *****************************************************************************/ ++static int ++e1000_validate_eeprom_checksum(struct e1000_hw *hw) ++{ ++ uint16_t checksum = 0; ++ uint16_t i, eeprom_data; ++ ++ DEBUGFUNC("e1000_validate_eeprom_checksum"); ++ ++ for(i = 0; i < (EEPROM_CHECKSUM_REG + 1); i++) { ++ if(e1000_read_eeprom(hw, i, 1, &eeprom_data) < 0) { ++ DEBUGOUT("EEPROM Read Error\n"); ++ return -E1000_ERR_EEPROM; ++ } ++ checksum += eeprom_data; ++ } ++ ++ if(checksum == (uint16_t) EEPROM_SUM) ++ return E1000_SUCCESS; ++ else { ++ DEBUGOUT("EEPROM Checksum Invalid\n"); ++ return -E1000_ERR_EEPROM; ++ } ++} ++ ++/****************************************************************************** ++ * Reads the adapter's MAC address from the EEPROM and inverts the LSB for the ++ * second function of dual function devices ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static int ++e1000_read_mac_addr(struct e1000_hw *hw) ++{ ++ uint16_t offset; ++ uint16_t eeprom_data; ++ int i; ++ ++ DEBUGFUNC("e1000_read_mac_addr"); ++ ++ for(i = 0; i < NODE_ADDRESS_SIZE; i += 2) { ++ offset = i >> 1; ++ if(e1000_read_eeprom(hw, offset, 1, &eeprom_data) < 0) { ++ DEBUGOUT("EEPROM Read Error\n"); ++ return -E1000_ERR_EEPROM; ++ } ++ hw->mac_addr[i] = eeprom_data & 0xff; ++ hw->mac_addr[i+1] = (eeprom_data >> 8) & 0xff; ++ } ++ if(((hw->mac_type == e1000_82546) || (hw->mac_type == e1000_82546_rev_3)) && ++ (E1000_READ_REG(hw, STATUS) & E1000_STATUS_FUNC_1)) ++ /* Invert the last bit if this is the second device */ ++ hw->mac_addr[5] ^= 1; ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Initializes receive address filters. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Places the MAC address in receive address register 0 and clears the rest ++ * of the receive addresss registers. Clears the multicast table. Assumes ++ * the receiver is in reset when the routine is called. ++ *****************************************************************************/ ++static void ++e1000_init_rx_addrs(struct e1000_hw *hw) ++{ ++ uint32_t i; ++ uint32_t addr_low; ++ uint32_t addr_high; ++ ++ DEBUGFUNC("e1000_init_rx_addrs"); ++ ++ /* Setup the receive address. */ ++ DEBUGOUT("Programming MAC Address into RAR[0]\n"); ++ addr_low = (hw->mac_addr[0] | ++ (hw->mac_addr[1] << 8) | ++ (hw->mac_addr[2] << 16) | (hw->mac_addr[3] << 24)); ++ ++ addr_high = (hw->mac_addr[4] | ++ (hw->mac_addr[5] << 8) | E1000_RAH_AV); ++ ++ E1000_WRITE_REG_ARRAY(hw, RA, 0, addr_low); ++ E1000_WRITE_REG_ARRAY(hw, RA, 1, addr_high); ++ ++ /* Zero out the other 15 receive addresses. */ ++ DEBUGOUT("Clearing RAR[1-15]\n"); ++ for(i = 1; i < E1000_RAR_ENTRIES; i++) { ++ E1000_WRITE_REG_ARRAY(hw, RA, (i << 1), 0); ++ E1000_WRITE_REG_ARRAY(hw, RA, ((i << 1) + 1), 0); ++ } ++} ++ ++/****************************************************************************** ++ * Clears the VLAN filer table ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static void ++e1000_clear_vfta(struct e1000_hw *hw) ++{ ++ uint32_t offset; ++ ++ for(offset = 0; offset < E1000_VLAN_FILTER_TBL_SIZE; offset++) ++ E1000_WRITE_REG_ARRAY(hw, VFTA, offset, 0); ++} ++ ++/****************************************************************************** ++* Writes a value to one of the devices registers using port I/O (as opposed to ++* memory mapped I/O). Only 82544 and newer devices support port I/O. * ++* hw - Struct containing variables accessed by shared code ++* offset - offset to write to * value - value to write ++*****************************************************************************/ ++void e1000_write_reg_io(struct e1000_hw *hw, uint32_t offset, uint32_t value){ ++ uint32_t io_addr = hw->io_base; ++ uint32_t io_data = hw->io_base + 4; ++ e1000_io_write(hw, io_addr, offset); ++ e1000_io_write(hw, io_data, value); ++} ++ ++/****************************************************************************** ++ * Set the phy type member in the hw struct. ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static int32_t ++e1000_set_phy_type(struct e1000_hw *hw) ++{ ++ DEBUGFUNC("e1000_set_phy_type"); ++ ++ switch(hw->phy_id) { ++ case M88E1000_E_PHY_ID: ++ case M88E1000_I_PHY_ID: ++ case M88E1011_I_PHY_ID: ++ hw->phy_type = e1000_phy_m88; ++ break; ++ case IGP01E1000_I_PHY_ID: ++ hw->phy_type = e1000_phy_igp; ++ break; ++ default: ++ /* Should never have loaded on this device */ ++ hw->phy_type = e1000_phy_undefined; ++ return -E1000_ERR_PHY_TYPE; ++ } ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * IGP phy init script - initializes the GbE PHY ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static void ++e1000_phy_init_script(struct e1000_hw *hw) ++{ ++ DEBUGFUNC("e1000_phy_init_script"); ++ ++#if 0 ++ /* See e1000_sw_init() of the Linux driver */ ++ if(hw->phy_init_script) { ++#else ++ if((hw->mac_type == e1000_82541) || ++ (hw->mac_type == e1000_82547) || ++ (hw->mac_type == e1000_82541_rev_2) || ++ (hw->mac_type == e1000_82547_rev_2)) { ++#endif ++ mdelay(20); ++ ++ e1000_write_phy_reg(hw,0x0000,0x0140); ++ ++ mdelay(5); ++ ++ if(hw->mac_type == e1000_82541 || hw->mac_type == e1000_82547) { ++ e1000_write_phy_reg(hw, 0x1F95, 0x0001); ++ ++ e1000_write_phy_reg(hw, 0x1F71, 0xBD21); ++ ++ e1000_write_phy_reg(hw, 0x1F79, 0x0018); ++ ++ e1000_write_phy_reg(hw, 0x1F30, 0x1600); ++ ++ e1000_write_phy_reg(hw, 0x1F31, 0x0014); ++ ++ e1000_write_phy_reg(hw, 0x1F32, 0x161C); ++ ++ e1000_write_phy_reg(hw, 0x1F94, 0x0003); ++ ++ e1000_write_phy_reg(hw, 0x1F96, 0x003F); ++ ++ e1000_write_phy_reg(hw, 0x2010, 0x0008); ++ } else { ++ e1000_write_phy_reg(hw, 0x1F73, 0x0099); ++ } ++ ++ e1000_write_phy_reg(hw, 0x0000, 0x3300); ++ ++ ++ if(hw->mac_type == e1000_82547) { ++ uint16_t fused, fine, coarse; ++ ++ /* Move to analog registers page */ ++ e1000_read_phy_reg(hw, IGP01E1000_ANALOG_SPARE_FUSE_STATUS, &fused); ++ ++ if(!(fused & IGP01E1000_ANALOG_SPARE_FUSE_ENABLED)) { ++ e1000_read_phy_reg(hw, IGP01E1000_ANALOG_FUSE_STATUS, &fused); ++ ++ fine = fused & IGP01E1000_ANALOG_FUSE_FINE_MASK; ++ coarse = fused & IGP01E1000_ANALOG_FUSE_COARSE_MASK; ++ ++ if(coarse > IGP01E1000_ANALOG_FUSE_COARSE_THRESH) { ++ coarse -= IGP01E1000_ANALOG_FUSE_COARSE_10; ++ fine -= IGP01E1000_ANALOG_FUSE_FINE_1; ++ } else if(coarse == IGP01E1000_ANALOG_FUSE_COARSE_THRESH) ++ fine -= IGP01E1000_ANALOG_FUSE_FINE_10; ++ ++ fused = (fused & IGP01E1000_ANALOG_FUSE_POLY_MASK) | ++ (fine & IGP01E1000_ANALOG_FUSE_FINE_MASK) | ++ (coarse & IGP01E1000_ANALOG_FUSE_COARSE_MASK); ++ ++ e1000_write_phy_reg(hw, IGP01E1000_ANALOG_FUSE_CONTROL, fused); ++ e1000_write_phy_reg(hw, IGP01E1000_ANALOG_FUSE_BYPASS, ++ IGP01E1000_ANALOG_FUSE_ENABLE_SW_CONTROL); ++ } ++ } ++ } ++} ++ ++/****************************************************************************** ++ * Set the mac type member in the hw struct. ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static int ++e1000_set_mac_type(struct e1000_hw *hw) ++{ ++ DEBUGFUNC("e1000_set_mac_type"); ++ ++ switch (hw->device_id) { ++ case E1000_DEV_ID_82542: ++ switch (hw->revision_id) { ++ case E1000_82542_2_0_REV_ID: ++ hw->mac_type = e1000_82542_rev2_0; ++ break; ++ case E1000_82542_2_1_REV_ID: ++ hw->mac_type = e1000_82542_rev2_1; ++ break; ++ default: ++ /* Invalid 82542 revision ID */ ++ return -E1000_ERR_MAC_TYPE; ++ } ++ break; ++ case E1000_DEV_ID_82543GC_FIBER: ++ case E1000_DEV_ID_82543GC_COPPER: ++ hw->mac_type = e1000_82543; ++ break; ++ case E1000_DEV_ID_82544EI_COPPER: ++ case E1000_DEV_ID_82544EI_FIBER: ++ case E1000_DEV_ID_82544GC_COPPER: ++ case E1000_DEV_ID_82544GC_LOM: ++ hw->mac_type = e1000_82544; ++ break; ++ case E1000_DEV_ID_82540EM: ++ case E1000_DEV_ID_82540EM_LOM: ++ case E1000_DEV_ID_82540EP: ++ case E1000_DEV_ID_82540EP_LOM: ++ case E1000_DEV_ID_82540EP_LP: ++ hw->mac_type = e1000_82540; ++ break; ++ case E1000_DEV_ID_82545EM_COPPER: ++ case E1000_DEV_ID_82545EM_FIBER: ++ hw->mac_type = e1000_82545; ++ break; ++ case E1000_DEV_ID_82545GM_COPPER: ++ case E1000_DEV_ID_82545GM_FIBER: ++ case E1000_DEV_ID_82545GM_SERDES: ++ hw->mac_type = e1000_82545_rev_3; ++ break; ++ case E1000_DEV_ID_82546EB_COPPER: ++ case E1000_DEV_ID_82546EB_FIBER: ++ case E1000_DEV_ID_82546EB_QUAD_COPPER: ++ hw->mac_type = e1000_82546; ++ break; ++ case E1000_DEV_ID_82546GB_COPPER: ++ case E1000_DEV_ID_82546GB_FIBER: ++ case E1000_DEV_ID_82546GB_SERDES: ++ hw->mac_type = e1000_82546_rev_3; ++ break; ++ case E1000_DEV_ID_82541EI: ++ case E1000_DEV_ID_82541EI_MOBILE: ++ hw->mac_type = e1000_82541; ++ break; ++ case E1000_DEV_ID_82541ER: ++ case E1000_DEV_ID_82541GI: ++ case E1000_DEV_ID_82541GI_MOBILE: ++ hw->mac_type = e1000_82541_rev_2; ++ break; ++ case E1000_DEV_ID_82547EI: ++ hw->mac_type = e1000_82547; ++ break; ++ case E1000_DEV_ID_82547GI: ++ hw->mac_type = e1000_82547_rev_2; ++ break; ++ default: ++ /* Should never have loaded on this device */ ++ return -E1000_ERR_MAC_TYPE; ++ } ++ ++ return E1000_SUCCESS; ++} ++ ++/***************************************************************************** ++ * Set media type and TBI compatibility. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * **************************************************************************/ ++static void ++e1000_set_media_type(struct e1000_hw *hw) ++{ ++ uint32_t status; ++ ++ DEBUGFUNC("e1000_set_media_type"); ++ ++ if(hw->mac_type != e1000_82543) { ++ /* tbi_compatibility is only valid on 82543 */ ++ hw->tbi_compatibility_en = FALSE; ++ } ++ ++ switch (hw->device_id) { ++ case E1000_DEV_ID_82545GM_SERDES: ++ case E1000_DEV_ID_82546GB_SERDES: ++ hw->media_type = e1000_media_type_internal_serdes; ++ break; ++ default: ++ if(hw->mac_type >= e1000_82543) { ++ status = E1000_READ_REG(hw, STATUS); ++ if(status & E1000_STATUS_TBIMODE) { ++ hw->media_type = e1000_media_type_fiber; ++ /* tbi_compatibility not valid on fiber */ ++ hw->tbi_compatibility_en = FALSE; ++ } else { ++ hw->media_type = e1000_media_type_copper; ++ } ++ } else { ++ /* This is an 82542 (fiber only) */ ++ hw->media_type = e1000_media_type_fiber; ++ } ++ } ++} ++ ++/****************************************************************************** ++ * Reset the transmit and receive units; mask and clear all interrupts. ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static void ++e1000_reset_hw(struct e1000_hw *hw) ++{ ++ uint32_t ctrl; ++ uint32_t ctrl_ext; ++ uint32_t icr; ++ uint32_t manc; ++ ++ DEBUGFUNC("e1000_reset_hw"); ++ ++ /* For 82542 (rev 2.0), disable MWI before issuing a device reset */ ++ if(hw->mac_type == e1000_82542_rev2_0) { ++ DEBUGOUT("Disabling MWI on 82542 rev 2.0\n"); ++ e1000_pci_clear_mwi(hw); ++ } ++ ++ /* Clear interrupt mask to stop board from generating interrupts */ ++ DEBUGOUT("Masking off all interrupts\n"); ++ E1000_WRITE_REG(hw, IMC, 0xffffffff); ++ ++ /* Disable the Transmit and Receive units. Then delay to allow ++ * any pending transactions to complete before we hit the MAC with ++ * the global reset. ++ */ ++ E1000_WRITE_REG(hw, RCTL, 0); ++ E1000_WRITE_REG(hw, TCTL, E1000_TCTL_PSP); ++ E1000_WRITE_FLUSH(hw); ++ ++ /* The tbi_compatibility_on Flag must be cleared when Rctl is cleared. */ ++ hw->tbi_compatibility_on = FALSE; ++ ++ /* Delay to allow any outstanding PCI transactions to complete before ++ * resetting the device ++ */ ++ mdelay(10); ++ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ ++ /* Must reset the PHY before resetting the MAC */ ++ if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) { ++ E1000_WRITE_REG_IO(hw, CTRL, (ctrl | E1000_CTRL_PHY_RST)); ++ mdelay(5); ++ } ++ ++ /* Issue a global reset to the MAC. This will reset the chip's ++ * transmit, receive, DMA, and link units. It will not effect ++ * the current PCI configuration. The global reset bit is self- ++ * clearing, and should clear within a microsecond. ++ */ ++ DEBUGOUT("Issuing a global reset to MAC\n"); ++ ++ switch(hw->mac_type) { ++ case e1000_82544: ++ case e1000_82540: ++ case e1000_82545: ++ case e1000_82546: ++ case e1000_82541: ++ case e1000_82541_rev_2: ++ /* These controllers can't ack the 64-bit write when issuing the ++ * reset, so use IO-mapping as a workaround to issue the reset */ ++ E1000_WRITE_REG_IO(hw, CTRL, (ctrl | E1000_CTRL_RST)); ++ break; ++ case e1000_82545_rev_3: ++ case e1000_82546_rev_3: ++ /* Reset is performed on a shadow of the control register */ ++ E1000_WRITE_REG(hw, CTRL_DUP, (ctrl | E1000_CTRL_RST)); ++ break; ++ default: ++ E1000_WRITE_REG(hw, CTRL, (ctrl | E1000_CTRL_RST)); ++ break; ++ } ++ ++ /* After MAC reset, force reload of EEPROM to restore power-on settings to ++ * device. Later controllers reload the EEPROM automatically, so just wait ++ * for reload to complete. ++ */ ++ switch(hw->mac_type) { ++ case e1000_82542_rev2_0: ++ case e1000_82542_rev2_1: ++ case e1000_82543: ++ case e1000_82544: ++ /* Wait for reset to complete */ ++ udelay(10); ++ ctrl_ext = E1000_READ_REG(hw, CTRL_EXT); ++ ctrl_ext |= E1000_CTRL_EXT_EE_RST; ++ E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); ++ E1000_WRITE_FLUSH(hw); ++ /* Wait for EEPROM reload */ ++ mdelay(2); ++ break; ++ case e1000_82541: ++ case e1000_82541_rev_2: ++ case e1000_82547: ++ case e1000_82547_rev_2: ++ /* Wait for EEPROM reload */ ++ mdelay(20); ++ break; ++ default: ++ /* Wait for EEPROM reload (it happens automatically) */ ++ mdelay(5); ++ break; ++ } ++ ++ /* Disable HW ARPs on ASF enabled adapters */ ++ if(hw->mac_type >= e1000_82540) { ++ manc = E1000_READ_REG(hw, MANC); ++ manc &= ~(E1000_MANC_ARP_EN); ++ E1000_WRITE_REG(hw, MANC, manc); ++ } ++ ++ if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) { ++ e1000_phy_init_script(hw); ++ } ++ ++ /* Clear interrupt mask to stop board from generating interrupts */ ++ DEBUGOUT("Masking off all interrupts\n"); ++ E1000_WRITE_REG(hw, IMC, 0xffffffff); ++ ++ /* Clear any pending interrupt events. */ ++ icr = E1000_READ_REG(hw, ICR); ++ ++ /* If MWI was previously enabled, reenable it. */ ++ if(hw->mac_type == e1000_82542_rev2_0) { ++#ifdef LINUX_DRIVER ++ if(hw->pci_cmd_word & CMD_MEM_WRT_INVALIDATE) ++#endif ++ e1000_pci_set_mwi(hw); ++ } ++} ++ ++/****************************************************************************** ++ * Performs basic configuration of the adapter. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Assumes that the controller has previously been reset and is in a ++ * post-reset uninitialized state. Initializes the receive address registers, ++ * multicast table, and VLAN filter table. Calls routines to setup link ++ * configuration and flow control settings. Clears all on-chip counters. Leaves ++ * the transmit and receive units disabled and uninitialized. ++ *****************************************************************************/ ++static int ++e1000_init_hw(struct e1000_hw *hw) ++{ ++ uint32_t ctrl, status; ++ uint32_t i; ++ int32_t ret_val; ++ uint16_t pcix_cmd_word; ++ uint16_t pcix_stat_hi_word; ++ uint16_t cmd_mmrbc; ++ uint16_t stat_mmrbc; ++ e1000_bus_type bus_type = e1000_bus_type_unknown; ++ ++ DEBUGFUNC("e1000_init_hw"); ++ ++ /* Set the media type and TBI compatibility */ ++ e1000_set_media_type(hw); ++ ++ /* Disabling VLAN filtering. */ ++ DEBUGOUT("Initializing the IEEE VLAN\n"); ++ E1000_WRITE_REG(hw, VET, 0); ++ ++ e1000_clear_vfta(hw); ++ ++ /* For 82542 (rev 2.0), disable MWI and put the receiver into reset */ ++ if(hw->mac_type == e1000_82542_rev2_0) { ++ DEBUGOUT("Disabling MWI on 82542 rev 2.0\n"); ++ e1000_pci_clear_mwi(hw); ++ E1000_WRITE_REG(hw, RCTL, E1000_RCTL_RST); ++ E1000_WRITE_FLUSH(hw); ++ mdelay(5); ++ } ++ ++ /* Setup the receive address. This involves initializing all of the Receive ++ * Address Registers (RARs 0 - 15). ++ */ ++ e1000_init_rx_addrs(hw); ++ ++ /* For 82542 (rev 2.0), take the receiver out of reset and enable MWI */ ++ if(hw->mac_type == e1000_82542_rev2_0) { ++ E1000_WRITE_REG(hw, RCTL, 0); ++ E1000_WRITE_FLUSH(hw); ++ mdelay(1); ++#ifdef LINUX_DRIVER ++ if(hw->pci_cmd_word & CMD_MEM_WRT_INVALIDATE) ++#endif ++ e1000_pci_set_mwi(hw); ++ } ++ ++ /* Zero out the Multicast HASH table */ ++ DEBUGOUT("Zeroing the MTA\n"); ++ for(i = 0; i < E1000_MC_TBL_SIZE; i++) ++ E1000_WRITE_REG_ARRAY(hw, MTA, i, 0); ++ ++#if 0 ++ /* Set the PCI priority bit correctly in the CTRL register. This ++ * determines if the adapter gives priority to receives, or if it ++ * gives equal priority to transmits and receives. ++ */ ++ if(hw->dma_fairness) { ++ ctrl = E1000_READ_REG(hw, CTRL); ++ E1000_WRITE_REG(hw, CTRL, ctrl | E1000_CTRL_PRIOR); ++ } ++#endif ++ ++ switch(hw->mac_type) { ++ case e1000_82545_rev_3: ++ case e1000_82546_rev_3: ++ break; ++ default: ++ if (hw->mac_type >= e1000_82543) { ++ /* See e1000_get_bus_info() of the Linux driver */ ++ status = E1000_READ_REG(hw, STATUS); ++ bus_type = (status & E1000_STATUS_PCIX_MODE) ? ++ e1000_bus_type_pcix : e1000_bus_type_pci; ++ } ++ ++ /* Workaround for PCI-X problem when BIOS sets MMRBC incorrectly. */ ++ if(bus_type == e1000_bus_type_pcix) { ++ pci_read_config_word(hw->pdev, PCIX_COMMAND_REGISTER, &pcix_cmd_word); ++ pci_read_config_word(hw->pdev, PCIX_STATUS_REGISTER_HI, &pcix_stat_hi_word); ++ cmd_mmrbc = (pcix_cmd_word & PCIX_COMMAND_MMRBC_MASK) >> ++ PCIX_COMMAND_MMRBC_SHIFT; ++ stat_mmrbc = (pcix_stat_hi_word & PCIX_STATUS_HI_MMRBC_MASK) >> ++ PCIX_STATUS_HI_MMRBC_SHIFT; ++ if(stat_mmrbc == PCIX_STATUS_HI_MMRBC_4K) ++ stat_mmrbc = PCIX_STATUS_HI_MMRBC_2K; ++ if(cmd_mmrbc > stat_mmrbc) { ++ pcix_cmd_word &= ~PCIX_COMMAND_MMRBC_MASK; ++ pcix_cmd_word |= stat_mmrbc << PCIX_COMMAND_MMRBC_SHIFT; ++ pci_write_config_word(hw->pdev, PCIX_COMMAND_REGISTER, pcix_cmd_word); ++ } ++ } ++ break; ++ } ++ ++ /* Call a subroutine to configure the link and setup flow control. */ ++ ret_val = e1000_setup_link(hw); ++ ++ /* Set the transmit descriptor write-back policy */ ++ if(hw->mac_type > e1000_82544) { ++ ctrl = E1000_READ_REG(hw, TXDCTL); ++ ctrl = (ctrl & ~E1000_TXDCTL_WTHRESH) | E1000_TXDCTL_FULL_TX_DESC_WB; ++ E1000_WRITE_REG(hw, TXDCTL, ctrl); ++ } ++ ++#if 0 ++ /* Clear all of the statistics registers (clear on read). It is ++ * important that we do this after we have tried to establish link ++ * because the symbol error count will increment wildly if there ++ * is no link. ++ */ ++ e1000_clear_hw_cntrs(hw); ++#endif ++ ++ return ret_val; ++} ++ ++/****************************************************************************** ++ * Adjust SERDES output amplitude based on EEPROM setting. ++ * ++ * hw - Struct containing variables accessed by shared code. ++ *****************************************************************************/ ++static int32_t ++e1000_adjust_serdes_amplitude(struct e1000_hw *hw) ++{ ++ uint16_t eeprom_data; ++ int32_t ret_val; ++ ++ DEBUGFUNC("e1000_adjust_serdes_amplitude"); ++ ++ if(hw->media_type != e1000_media_type_internal_serdes) ++ return E1000_SUCCESS; ++ ++ switch(hw->mac_type) { ++ case e1000_82545_rev_3: ++ case e1000_82546_rev_3: ++ break; ++ default: ++ return E1000_SUCCESS; ++ } ++ ++ if ((ret_val = e1000_read_eeprom(hw, EEPROM_SERDES_AMPLITUDE, 1, ++ &eeprom_data))) { ++ return ret_val; ++ } ++ ++ if(eeprom_data != EEPROM_RESERVED_WORD) { ++ /* Adjust SERDES output amplitude only. */ ++ eeprom_data &= EEPROM_SERDES_AMPLITUDE_MASK; ++ if((ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_EXT_CTRL, ++ eeprom_data))) ++ return ret_val; ++ } ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Configures flow control and link settings. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Determines which flow control settings to use. Calls the apropriate media- ++ * specific link configuration function. Configures the flow control settings. ++ * Assuming the adapter has a valid link partner, a valid link should be ++ * established. Assumes the hardware has previously been reset and the ++ * transmitter and receiver are not enabled. ++ *****************************************************************************/ ++static int ++e1000_setup_link(struct e1000_hw *hw) ++{ ++ uint32_t ctrl_ext; ++ int32_t ret_val; ++ uint16_t eeprom_data; ++ ++ DEBUGFUNC("e1000_setup_link"); ++ ++ /* Read and store word 0x0F of the EEPROM. This word contains bits ++ * that determine the hardware's default PAUSE (flow control) mode, ++ * a bit that determines whether the HW defaults to enabling or ++ * disabling auto-negotiation, and the direction of the ++ * SW defined pins. If there is no SW over-ride of the flow ++ * control setting, then the variable hw->fc will ++ * be initialized based on a value in the EEPROM. ++ */ ++ if(e1000_read_eeprom(hw, EEPROM_INIT_CONTROL2_REG, 1, &eeprom_data) < 0) { ++ DEBUGOUT("EEPROM Read Error\n"); ++ return -E1000_ERR_EEPROM; ++ } ++ ++ if(hw->fc == e1000_fc_default) { ++ if((eeprom_data & EEPROM_WORD0F_PAUSE_MASK) == 0) ++ hw->fc = e1000_fc_none; ++ else if((eeprom_data & EEPROM_WORD0F_PAUSE_MASK) == ++ EEPROM_WORD0F_ASM_DIR) ++ hw->fc = e1000_fc_tx_pause; ++ else ++ hw->fc = e1000_fc_full; ++ } ++ ++ /* We want to save off the original Flow Control configuration just ++ * in case we get disconnected and then reconnected into a different ++ * hub or switch with different Flow Control capabilities. ++ */ ++ if(hw->mac_type == e1000_82542_rev2_0) ++ hw->fc &= (~e1000_fc_tx_pause); ++ ++#if 0 ++ /* See e1000_sw_init() of the Linux driver */ ++ if((hw->mac_type < e1000_82543) && (hw->report_tx_early == 1)) ++#else ++ if((hw->mac_type < e1000_82543) && (hw->mac_type >= e1000_82543)) ++#endif ++ hw->fc &= (~e1000_fc_rx_pause); ++ ++#if 0 ++ hw->original_fc = hw->fc; ++#endif ++ ++ DEBUGOUT1("After fix-ups FlowControl is now = %x\n", hw->fc); ++ ++ /* Take the 4 bits from EEPROM word 0x0F that determine the initial ++ * polarity value for the SW controlled pins, and setup the ++ * Extended Device Control reg with that info. ++ * This is needed because one of the SW controlled pins is used for ++ * signal detection. So this should be done before e1000_setup_pcs_link() ++ * or e1000_phy_setup() is called. ++ */ ++ if(hw->mac_type == e1000_82543) { ++ ctrl_ext = ((eeprom_data & EEPROM_WORD0F_SWPDIO_EXT) << ++ SWDPIO__EXT_SHIFT); ++ E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); ++ } ++ ++ /* Call the necessary subroutine to configure the link. */ ++ ret_val = (hw->media_type == e1000_media_type_copper) ? ++ e1000_setup_copper_link(hw) : ++ e1000_setup_fiber_serdes_link(hw); ++ if (ret_val < 0) { ++ return ret_val; ++ } ++ ++ /* Initialize the flow control address, type, and PAUSE timer ++ * registers to their default values. This is done even if flow ++ * control is disabled, because it does not hurt anything to ++ * initialize these registers. ++ */ ++ DEBUGOUT("Initializing the Flow Control address, type and timer regs\n"); ++ ++ E1000_WRITE_REG(hw, FCAL, FLOW_CONTROL_ADDRESS_LOW); ++ E1000_WRITE_REG(hw, FCAH, FLOW_CONTROL_ADDRESS_HIGH); ++ E1000_WRITE_REG(hw, FCT, FLOW_CONTROL_TYPE); ++#if 0 ++ E1000_WRITE_REG(hw, FCTTV, hw->fc_pause_time); ++#else ++ E1000_WRITE_REG(hw, FCTTV, FC_DEFAULT_TX_TIMER); ++#endif ++ ++ /* Set the flow control receive threshold registers. Normally, ++ * these registers will be set to a default threshold that may be ++ * adjusted later by the driver's runtime code. However, if the ++ * ability to transmit pause frames in not enabled, then these ++ * registers will be set to 0. ++ */ ++ if(!(hw->fc & e1000_fc_tx_pause)) { ++ E1000_WRITE_REG(hw, FCRTL, 0); ++ E1000_WRITE_REG(hw, FCRTH, 0); ++ } else { ++ /* We need to set up the Receive Threshold high and low water marks ++ * as well as (optionally) enabling the transmission of XON frames. ++ */ ++#if 0 ++ if(hw->fc_send_xon) { ++ E1000_WRITE_REG(hw, FCRTL, (hw->fc_low_water | E1000_FCRTL_XONE)); ++ E1000_WRITE_REG(hw, FCRTH, hw->fc_high_water); ++ } else { ++ E1000_WRITE_REG(hw, FCRTL, hw->fc_low_water); ++ E1000_WRITE_REG(hw, FCRTH, hw->fc_high_water); ++ } ++#else ++ E1000_WRITE_REG(hw, FCRTL, (FC_DEFAULT_LO_THRESH | E1000_FCRTL_XONE)); ++ E1000_WRITE_REG(hw, FCRTH, FC_DEFAULT_HI_THRESH); ++#endif ++ } ++ return ret_val; ++} ++ ++/****************************************************************************** ++ * Sets up link for a fiber based or serdes based adapter ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Manipulates Physical Coding Sublayer functions in order to configure ++ * link. Assumes the hardware has been previously reset and the transmitter ++ * and receiver are not enabled. ++ *****************************************************************************/ ++static int ++e1000_setup_fiber_serdes_link(struct e1000_hw *hw) ++{ ++ uint32_t ctrl; ++ uint32_t status; ++ uint32_t txcw = 0; ++ uint32_t i; ++ uint32_t signal = 0; ++ int32_t ret_val; ++ ++ DEBUGFUNC("e1000_setup_fiber_serdes_link"); ++ ++ /* On adapters with a MAC newer than 82544, SW Defineable pin 1 will be ++ * set when the optics detect a signal. On older adapters, it will be ++ * cleared when there is a signal. This applies to fiber media only. ++ * If we're on serdes media, adjust the output amplitude to value set in ++ * the EEPROM. ++ */ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ if(hw->media_type == e1000_media_type_fiber) ++ signal = (hw->mac_type > e1000_82544) ? E1000_CTRL_SWDPIN1 : 0; ++ ++ if((ret_val = e1000_adjust_serdes_amplitude(hw))) ++ return ret_val; ++ ++ /* Take the link out of reset */ ++ ctrl &= ~(E1000_CTRL_LRST); ++ ++#if 0 ++ /* Adjust VCO speed to improve BER performance */ ++ if((ret_val = e1000_set_vco_speed(hw))) ++ return ret_val; ++#endif ++ ++ e1000_config_collision_dist(hw); ++ ++ /* Check for a software override of the flow control settings, and setup ++ * the device accordingly. If auto-negotiation is enabled, then software ++ * will have to set the "PAUSE" bits to the correct value in the Tranmsit ++ * Config Word Register (TXCW) and re-start auto-negotiation. However, if ++ * auto-negotiation is disabled, then software will have to manually ++ * configure the two flow control enable bits in the CTRL register. ++ * ++ * The possible values of the "fc" parameter are: ++ * 0: Flow control is completely disabled ++ * 1: Rx flow control is enabled (we can receive pause frames, but ++ * not send pause frames). ++ * 2: Tx flow control is enabled (we can send pause frames but we do ++ * not support receiving pause frames). ++ * 3: Both Rx and TX flow control (symmetric) are enabled. ++ */ ++ switch (hw->fc) { ++ case e1000_fc_none: ++ /* Flow control is completely disabled by a software over-ride. */ ++ txcw = (E1000_TXCW_ANE | E1000_TXCW_FD); ++ break; ++ case e1000_fc_rx_pause: ++ /* RX Flow control is enabled and TX Flow control is disabled by a ++ * software over-ride. Since there really isn't a way to advertise ++ * that we are capable of RX Pause ONLY, we will advertise that we ++ * support both symmetric and asymmetric RX PAUSE. Later, we will ++ * disable the adapter's ability to send PAUSE frames. ++ */ ++ txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_PAUSE_MASK); ++ break; ++ case e1000_fc_tx_pause: ++ /* TX Flow control is enabled, and RX Flow control is disabled, by a ++ * software over-ride. ++ */ ++ txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_ASM_DIR); ++ break; ++ case e1000_fc_full: ++ /* Flow control (both RX and TX) is enabled by a software over-ride. */ ++ txcw = (E1000_TXCW_ANE | E1000_TXCW_FD | E1000_TXCW_PAUSE_MASK); ++ break; ++ default: ++ DEBUGOUT("Flow control param set incorrectly\n"); ++ return -E1000_ERR_CONFIG; ++ break; ++ } ++ ++ /* Since auto-negotiation is enabled, take the link out of reset (the link ++ * will be in reset, because we previously reset the chip). This will ++ * restart auto-negotiation. If auto-neogtiation is successful then the ++ * link-up status bit will be set and the flow control enable bits (RFCE ++ * and TFCE) will be set according to their negotiated value. ++ */ ++ DEBUGOUT("Auto-negotiation enabled\n"); ++ ++ E1000_WRITE_REG(hw, TXCW, txcw); ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ E1000_WRITE_FLUSH(hw); ++ ++ hw->txcw = txcw; ++ mdelay(1); ++ ++ /* If we have a signal (the cable is plugged in) then poll for a "Link-Up" ++ * indication in the Device Status Register. Time-out if a link isn't ++ * seen in 500 milliseconds seconds (Auto-negotiation should complete in ++ * less than 500 milliseconds even if the other end is doing it in SW). ++ * For internal serdes, we just assume a signal is present, then poll. ++ */ ++ if(hw->media_type == e1000_media_type_internal_serdes || ++ (E1000_READ_REG(hw, CTRL) & E1000_CTRL_SWDPIN1) == signal) { ++ DEBUGOUT("Looking for Link\n"); ++ for(i = 0; i < (LINK_UP_TIMEOUT / 10); i++) { ++ mdelay(10); ++ status = E1000_READ_REG(hw, STATUS); ++ if(status & E1000_STATUS_LU) break; ++ } ++ if(i == (LINK_UP_TIMEOUT / 10)) { ++ DEBUGOUT("Never got a valid link from auto-neg!!!\n"); ++ hw->autoneg_failed = 1; ++ /* AutoNeg failed to achieve a link, so we'll call ++ * e1000_check_for_link. This routine will force the link up if ++ * we detect a signal. This will allow us to communicate with ++ * non-autonegotiating link partners. ++ */ ++ if((ret_val = e1000_check_for_link(hw))) { ++ DEBUGOUT("Error while checking for link\n"); ++ return ret_val; ++ } ++ hw->autoneg_failed = 0; ++ } else { ++ hw->autoneg_failed = 0; ++ DEBUGOUT("Valid Link Found\n"); ++ } ++ } else { ++ DEBUGOUT("No Signal Detected\n"); ++ } ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++* Detects which PHY is present and the speed and duplex ++* ++* hw - Struct containing variables accessed by shared code ++******************************************************************************/ ++static int ++e1000_setup_copper_link(struct e1000_hw *hw) ++{ ++ uint32_t ctrl; ++ int32_t ret_val; ++ uint16_t i; ++ uint16_t phy_data; ++ ++ DEBUGFUNC("e1000_setup_copper_link"); ++ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ /* With 82543, we need to force speed and duplex on the MAC equal to what ++ * the PHY speed and duplex configuration is. In addition, we need to ++ * perform a hardware reset on the PHY to take it out of reset. ++ */ ++ if(hw->mac_type > e1000_82543) { ++ ctrl |= E1000_CTRL_SLU; ++ ctrl &= ~(E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX); ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ } else { ++ ctrl |= (E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX | E1000_CTRL_SLU); ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ e1000_phy_hw_reset(hw); ++ } ++ ++ /* Make sure we have a valid PHY */ ++ if((ret_val = e1000_detect_gig_phy(hw))) { ++ DEBUGOUT("Error, did not detect valid phy.\n"); ++ return ret_val; ++ } ++ DEBUGOUT1("Phy ID = %x \n", hw->phy_id); ++ ++ if(hw->mac_type <= e1000_82543 || ++ hw->mac_type == e1000_82541 || hw->mac_type == e1000_82547 || ++#if 0 ++ hw->mac_type == e1000_82541_rev_2 || hw->mac_type == e1000_82547_rev_2) ++ hw->phy_reset_disable = FALSE; ++ ++ if(!hw->phy_reset_disable) { ++#else ++ hw->mac_type == e1000_82541_rev_2 || hw->mac_type == e1000_82547_rev_2) { ++#endif ++ if (hw->phy_type == e1000_phy_igp) { ++ ++ if((ret_val = e1000_phy_reset(hw))) { ++ DEBUGOUT("Error Resetting the PHY\n"); ++ return ret_val; ++ } ++ ++ /* Wait 10ms for MAC to configure PHY from eeprom settings */ ++ mdelay(15); ++ ++#if 0 ++ /* disable lplu d3 during driver init */ ++ if((ret_val = e1000_set_d3_lplu_state(hw, FALSE))) { ++ DEBUGOUT("Error Disabling LPLU D3\n"); ++ return ret_val; ++ } ++ ++ /* Configure mdi-mdix settings */ ++ if((ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CTRL, ++ &phy_data))) ++ return ret_val; ++ ++ if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) { ++ hw->dsp_config_state = e1000_dsp_config_disabled; ++ /* Force MDI for IGP B-0 PHY */ ++ phy_data &= ~(IGP01E1000_PSCR_AUTO_MDIX | ++ IGP01E1000_PSCR_FORCE_MDI_MDIX); ++ hw->mdix = 1; ++ ++ } else { ++ hw->dsp_config_state = e1000_dsp_config_enabled; ++ phy_data &= ~IGP01E1000_PSCR_AUTO_MDIX; ++ ++ switch (hw->mdix) { ++ case 1: ++ phy_data &= ~IGP01E1000_PSCR_FORCE_MDI_MDIX; ++ break; ++ case 2: ++ phy_data |= IGP01E1000_PSCR_FORCE_MDI_MDIX; ++ break; ++ case 0: ++ default: ++ phy_data |= IGP01E1000_PSCR_AUTO_MDIX; ++ break; ++ } ++ } ++ if((ret_val = e1000_write_phy_reg(hw, IGP01E1000_PHY_PORT_CTRL, ++ phy_data))) ++ return ret_val; ++ ++ /* set auto-master slave resolution settings */ ++ e1000_ms_type phy_ms_setting = hw->master_slave; ++ ++ if(hw->ffe_config_state == e1000_ffe_config_active) ++ hw->ffe_config_state = e1000_ffe_config_enabled; ++ ++ if(hw->dsp_config_state == e1000_dsp_config_activated) ++ hw->dsp_config_state = e1000_dsp_config_enabled; ++#endif ++ ++ /* when autonegotiation advertisment is only 1000Mbps then we ++ * should disable SmartSpeed and enable Auto MasterSlave ++ * resolution as hardware default. */ ++ if(hw->autoneg_advertised == ADVERTISE_1000_FULL) { ++ /* Disable SmartSpeed */ ++ if((ret_val = e1000_read_phy_reg(hw, ++ IGP01E1000_PHY_PORT_CONFIG, ++ &phy_data))) ++ return ret_val; ++ phy_data &= ~IGP01E1000_PSCFR_SMART_SPEED; ++ if((ret_val = e1000_write_phy_reg(hw, ++ IGP01E1000_PHY_PORT_CONFIG, ++ phy_data))) ++ return ret_val; ++ /* Set auto Master/Slave resolution process */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, ++ &phy_data))) ++ return ret_val; ++ phy_data &= ~CR_1000T_MS_ENABLE; ++ if((ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, ++ phy_data))) ++ return ret_val; ++ } ++ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, ++ &phy_data))) ++ return ret_val; ++ ++#if 0 ++ /* load defaults for future use */ ++ hw->original_master_slave = (phy_data & CR_1000T_MS_ENABLE) ? ++ ((phy_data & CR_1000T_MS_VALUE) ? ++ e1000_ms_force_master : ++ e1000_ms_force_slave) : ++ e1000_ms_auto; ++ ++ switch (phy_ms_setting) { ++ case e1000_ms_force_master: ++ phy_data |= (CR_1000T_MS_ENABLE | CR_1000T_MS_VALUE); ++ break; ++ case e1000_ms_force_slave: ++ phy_data |= CR_1000T_MS_ENABLE; ++ phy_data &= ~(CR_1000T_MS_VALUE); ++ break; ++ case e1000_ms_auto: ++ phy_data &= ~CR_1000T_MS_ENABLE; ++ default: ++ break; ++ } ++#endif ++ ++ if((ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, ++ phy_data))) ++ return ret_val; ++ } else { ++ /* Enable CRS on TX. This must be set for half-duplex operation. */ ++ if((ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, ++ &phy_data))) ++ return ret_val; ++ ++ phy_data |= M88E1000_PSCR_ASSERT_CRS_ON_TX; ++ ++ /* Options: ++ * MDI/MDI-X = 0 (default) ++ * 0 - Auto for all speeds ++ * 1 - MDI mode ++ * 2 - MDI-X mode ++ * 3 - Auto for 1000Base-T only (MDI-X for 10/100Base-T modes) ++ */ ++#if 0 ++ phy_data &= ~M88E1000_PSCR_AUTO_X_MODE; ++ ++ switch (hw->mdix) { ++ case 1: ++ phy_data |= M88E1000_PSCR_MDI_MANUAL_MODE; ++ break; ++ case 2: ++ phy_data |= M88E1000_PSCR_MDIX_MANUAL_MODE; ++ break; ++ case 3: ++ phy_data |= M88E1000_PSCR_AUTO_X_1000T; ++ break; ++ case 0: ++ default: ++#endif ++ phy_data |= M88E1000_PSCR_AUTO_X_MODE; ++#if 0 ++ break; ++ } ++#endif ++ ++ /* Options: ++ * disable_polarity_correction = 0 (default) ++ * Automatic Correction for Reversed Cable Polarity ++ * 0 - Disabled ++ * 1 - Enabled ++ */ ++ phy_data &= ~M88E1000_PSCR_POLARITY_REVERSAL; ++ if((ret_val = e1000_write_phy_reg(hw, M88E1000_PHY_SPEC_CTRL, ++ phy_data))) ++ return ret_val; ++ ++ /* Force TX_CLK in the Extended PHY Specific Control Register ++ * to 25MHz clock. ++ */ ++ if((ret_val = e1000_read_phy_reg(hw, M88E1000_EXT_PHY_SPEC_CTRL, ++ &phy_data))) ++ return ret_val; ++ ++ phy_data |= M88E1000_EPSCR_TX_CLK_25; ++ ++#ifdef LINUX_DRIVER ++ if (hw->phy_revision < M88E1011_I_REV_4) { ++#endif ++ /* Configure Master and Slave downshift values */ ++ phy_data &= ~(M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK | ++ M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK); ++ phy_data |= (M88E1000_EPSCR_MASTER_DOWNSHIFT_1X | ++ M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X); ++ if((ret_val = e1000_write_phy_reg(hw, ++ M88E1000_EXT_PHY_SPEC_CTRL, ++ phy_data))) ++ return ret_val; ++ } ++ ++ /* SW Reset the PHY so all changes take effect */ ++ if((ret_val = e1000_phy_reset(hw))) { ++ DEBUGOUT("Error Resetting the PHY\n"); ++ return ret_val; ++#ifdef LINUX_DRIVER ++ } ++#endif ++ } ++ ++ /* Options: ++ * autoneg = 1 (default) ++ * PHY will advertise value(s) parsed from ++ * autoneg_advertised and fc ++ * autoneg = 0 ++ * PHY will be set to 10H, 10F, 100H, or 100F ++ * depending on value parsed from forced_speed_duplex. ++ */ ++ ++ /* Is autoneg enabled? This is enabled by default or by software ++ * override. If so, call e1000_phy_setup_autoneg routine to parse the ++ * autoneg_advertised and fc options. If autoneg is NOT enabled, then ++ * the user should have provided a speed/duplex override. If so, then ++ * call e1000_phy_force_speed_duplex to parse and set this up. ++ */ ++ /* Perform some bounds checking on the hw->autoneg_advertised ++ * parameter. If this variable is zero, then set it to the default. ++ */ ++ hw->autoneg_advertised &= AUTONEG_ADVERTISE_SPEED_DEFAULT; ++ ++ /* If autoneg_advertised is zero, we assume it was not defaulted ++ * by the calling code so we set to advertise full capability. ++ */ ++ if(hw->autoneg_advertised == 0) ++ hw->autoneg_advertised = AUTONEG_ADVERTISE_SPEED_DEFAULT; ++ ++ DEBUGOUT("Reconfiguring auto-neg advertisement params\n"); ++ if((ret_val = e1000_phy_setup_autoneg(hw))) { ++ DEBUGOUT("Error Setting up Auto-Negotiation\n"); ++ return ret_val; ++ } ++ DEBUGOUT("Restarting Auto-Neg\n"); ++ ++ /* Restart auto-negotiation by setting the Auto Neg Enable bit and ++ * the Auto Neg Restart bit in the PHY control register. ++ */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_CTRL, &phy_data))) ++ return ret_val; ++ ++ phy_data |= (MII_CR_AUTO_NEG_EN | MII_CR_RESTART_AUTO_NEG); ++ if((ret_val = e1000_write_phy_reg(hw, PHY_CTRL, phy_data))) ++ return ret_val; ++ ++#if 0 ++ /* Does the user want to wait for Auto-Neg to complete here, or ++ * check at a later time (for example, callback routine). ++ */ ++ if(hw->wait_autoneg_complete) { ++ if((ret_val = e1000_wait_autoneg(hw))) { ++ DEBUGOUT("Error while waiting for autoneg to complete\n"); ++ return ret_val; ++ } ++ } ++#else ++ /* If we do not wait for autonegotiation to complete I ++ * do not see a valid link status. ++ */ ++ if((ret_val = e1000_wait_autoneg(hw))) { ++ DEBUGOUT("Error while waiting for autoneg to complete\n"); ++ return ret_val; ++ } ++#endif ++ } /* !hw->phy_reset_disable */ ++ ++ /* Check link status. Wait up to 100 microseconds for link to become ++ * valid. ++ */ ++ for(i = 0; i < 10; i++) { ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) ++ return ret_val; ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) ++ return ret_val; ++ ++ if(phy_data & MII_SR_LINK_STATUS) { ++ /* We have link, so we need to finish the config process: ++ * 1) Set up the MAC to the current PHY speed/duplex ++ * if we are on 82543. If we ++ * are on newer silicon, we only need to configure ++ * collision distance in the Transmit Control Register. ++ * 2) Set up flow control on the MAC to that established with ++ * the link partner. ++ */ ++ if(hw->mac_type >= e1000_82544) { ++ e1000_config_collision_dist(hw); ++ } else { ++ if((ret_val = e1000_config_mac_to_phy(hw))) { ++ DEBUGOUT("Error configuring MAC to PHY settings\n"); ++ return ret_val; ++ } ++ } ++ if((ret_val = e1000_config_fc_after_link_up(hw))) { ++ DEBUGOUT("Error Configuring Flow Control\n"); ++ return ret_val; ++ } ++#if 0 ++ if(hw->phy_type == e1000_phy_igp) { ++ if((ret_val = e1000_config_dsp_after_link_change(hw, TRUE))) { ++ DEBUGOUT("Error Configuring DSP after link up\n"); ++ return ret_val; ++ } ++ } ++#endif ++ DEBUGOUT("Valid link established!!!\n"); ++ return E1000_SUCCESS; ++ } ++ udelay(10); ++ } ++ ++ DEBUGOUT("Unable to establish link!!!\n"); ++ return -E1000_ERR_NOLINK; ++} ++ ++/****************************************************************************** ++* Configures PHY autoneg and flow control advertisement settings ++* ++* hw - Struct containing variables accessed by shared code ++******************************************************************************/ ++static int ++e1000_phy_setup_autoneg(struct e1000_hw *hw) ++{ ++ int32_t ret_val; ++ uint16_t mii_autoneg_adv_reg; ++ uint16_t mii_1000t_ctrl_reg; ++ ++ DEBUGFUNC("e1000_phy_setup_autoneg"); ++ ++ /* Read the MII Auto-Neg Advertisement Register (Address 4). */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_AUTONEG_ADV, ++ &mii_autoneg_adv_reg))) ++ return ret_val; ++ ++ /* Read the MII 1000Base-T Control Register (Address 9). */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_1000T_CTRL, &mii_1000t_ctrl_reg))) ++ return ret_val; ++ ++ /* Need to parse both autoneg_advertised and fc and set up ++ * the appropriate PHY registers. First we will parse for ++ * autoneg_advertised software override. Since we can advertise ++ * a plethora of combinations, we need to check each bit ++ * individually. ++ */ ++ ++ /* First we clear all the 10/100 mb speed bits in the Auto-Neg ++ * Advertisement Register (Address 4) and the 1000 mb speed bits in ++ * the 1000Base-T Control Register (Address 9). ++ */ ++ mii_autoneg_adv_reg &= ~REG4_SPEED_MASK; ++ mii_1000t_ctrl_reg &= ~REG9_SPEED_MASK; ++ ++ DEBUGOUT1("autoneg_advertised %x\n", hw->autoneg_advertised); ++ ++ /* Do we want to advertise 10 Mb Half Duplex? */ ++ if(hw->autoneg_advertised & ADVERTISE_10_HALF) { ++ DEBUGOUT("Advertise 10mb Half duplex\n"); ++ mii_autoneg_adv_reg |= NWAY_AR_10T_HD_CAPS; ++ } ++ ++ /* Do we want to advertise 10 Mb Full Duplex? */ ++ if(hw->autoneg_advertised & ADVERTISE_10_FULL) { ++ DEBUGOUT("Advertise 10mb Full duplex\n"); ++ mii_autoneg_adv_reg |= NWAY_AR_10T_FD_CAPS; ++ } ++ ++ /* Do we want to advertise 100 Mb Half Duplex? */ ++ if(hw->autoneg_advertised & ADVERTISE_100_HALF) { ++ DEBUGOUT("Advertise 100mb Half duplex\n"); ++ mii_autoneg_adv_reg |= NWAY_AR_100TX_HD_CAPS; ++ } ++ ++ /* Do we want to advertise 100 Mb Full Duplex? */ ++ if(hw->autoneg_advertised & ADVERTISE_100_FULL) { ++ DEBUGOUT("Advertise 100mb Full duplex\n"); ++ mii_autoneg_adv_reg |= NWAY_AR_100TX_FD_CAPS; ++ } ++ ++ /* We do not allow the Phy to advertise 1000 Mb Half Duplex */ ++ if(hw->autoneg_advertised & ADVERTISE_1000_HALF) { ++ DEBUGOUT("Advertise 1000mb Half duplex requested, request denied!\n"); ++ } ++ ++ /* Do we want to advertise 1000 Mb Full Duplex? */ ++ if(hw->autoneg_advertised & ADVERTISE_1000_FULL) { ++ DEBUGOUT("Advertise 1000mb Full duplex\n"); ++ mii_1000t_ctrl_reg |= CR_1000T_FD_CAPS; ++ } ++ ++ /* Check for a software override of the flow control settings, and ++ * setup the PHY advertisement registers accordingly. If ++ * auto-negotiation is enabled, then software will have to set the ++ * "PAUSE" bits to the correct value in the Auto-Negotiation ++ * Advertisement Register (PHY_AUTONEG_ADV) and re-start auto-negotiation. ++ * ++ * The possible values of the "fc" parameter are: ++ * 0: Flow control is completely disabled ++ * 1: Rx flow control is enabled (we can receive pause frames ++ * but not send pause frames). ++ * 2: Tx flow control is enabled (we can send pause frames ++ * but we do not support receiving pause frames). ++ * 3: Both Rx and TX flow control (symmetric) are enabled. ++ * other: No software override. The flow control configuration ++ * in the EEPROM is used. ++ */ ++ switch (hw->fc) { ++ case e1000_fc_none: /* 0 */ ++ /* Flow control (RX & TX) is completely disabled by a ++ * software over-ride. ++ */ ++ mii_autoneg_adv_reg &= ~(NWAY_AR_ASM_DIR | NWAY_AR_PAUSE); ++ break; ++ case e1000_fc_rx_pause: /* 1 */ ++ /* RX Flow control is enabled, and TX Flow control is ++ * disabled, by a software over-ride. ++ */ ++ /* Since there really isn't a way to advertise that we are ++ * capable of RX Pause ONLY, we will advertise that we ++ * support both symmetric and asymmetric RX PAUSE. Later ++ * (in e1000_config_fc_after_link_up) we will disable the ++ *hw's ability to send PAUSE frames. ++ */ ++ mii_autoneg_adv_reg |= (NWAY_AR_ASM_DIR | NWAY_AR_PAUSE); ++ break; ++ case e1000_fc_tx_pause: /* 2 */ ++ /* TX Flow control is enabled, and RX Flow control is ++ * disabled, by a software over-ride. ++ */ ++ mii_autoneg_adv_reg |= NWAY_AR_ASM_DIR; ++ mii_autoneg_adv_reg &= ~NWAY_AR_PAUSE; ++ break; ++ case e1000_fc_full: /* 3 */ ++ /* Flow control (both RX and TX) is enabled by a software ++ * over-ride. ++ */ ++ mii_autoneg_adv_reg |= (NWAY_AR_ASM_DIR | NWAY_AR_PAUSE); ++ break; ++ default: ++ DEBUGOUT("Flow control param set incorrectly\n"); ++ return -E1000_ERR_CONFIG; ++ } ++ ++ if((ret_val = e1000_write_phy_reg(hw, PHY_AUTONEG_ADV, ++ mii_autoneg_adv_reg))) ++ return ret_val; ++ ++ DEBUGOUT1("Auto-Neg Advertising %x\n", mii_autoneg_adv_reg); ++ ++ if((ret_val = e1000_write_phy_reg(hw, PHY_1000T_CTRL, mii_1000t_ctrl_reg))) ++ return ret_val; ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++* Sets the collision distance in the Transmit Control register ++* ++* hw - Struct containing variables accessed by shared code ++* ++* Link should have been established previously. Reads the speed and duplex ++* information from the Device Status register. ++******************************************************************************/ ++static void ++e1000_config_collision_dist(struct e1000_hw *hw) ++{ ++ uint32_t tctl; ++ ++ tctl = E1000_READ_REG(hw, TCTL); ++ ++ tctl &= ~E1000_TCTL_COLD; ++ tctl |= E1000_COLLISION_DISTANCE << E1000_COLD_SHIFT; ++ ++ E1000_WRITE_REG(hw, TCTL, tctl); ++ E1000_WRITE_FLUSH(hw); ++} ++ ++/****************************************************************************** ++* Sets MAC speed and duplex settings to reflect the those in the PHY ++* ++* hw - Struct containing variables accessed by shared code ++* mii_reg - data to write to the MII control register ++* ++* The contents of the PHY register containing the needed information need to ++* be passed in. ++******************************************************************************/ ++static int ++e1000_config_mac_to_phy(struct e1000_hw *hw) ++{ ++ uint32_t ctrl; ++ int32_t ret_val; ++ uint16_t phy_data; ++ ++ DEBUGFUNC("e1000_config_mac_to_phy"); ++ ++ /* Read the Device Control Register and set the bits to Force Speed ++ * and Duplex. ++ */ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ ctrl |= (E1000_CTRL_FRCSPD | E1000_CTRL_FRCDPX); ++ ctrl &= ~(E1000_CTRL_SPD_SEL | E1000_CTRL_ILOS); ++ ++ /* Set up duplex in the Device Control and Transmit Control ++ * registers depending on negotiated values. ++ */ ++ if (hw->phy_type == e1000_phy_igp) { ++ if((ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_STATUS, ++ &phy_data))) ++ return ret_val; ++ ++ if(phy_data & IGP01E1000_PSSR_FULL_DUPLEX) ctrl |= E1000_CTRL_FD; ++ else ctrl &= ~E1000_CTRL_FD; ++ ++ e1000_config_collision_dist(hw); ++ ++ /* Set up speed in the Device Control register depending on ++ * negotiated values. ++ */ ++ if((phy_data & IGP01E1000_PSSR_SPEED_MASK) == ++ IGP01E1000_PSSR_SPEED_1000MBPS) ++ ctrl |= E1000_CTRL_SPD_1000; ++ else if((phy_data & IGP01E1000_PSSR_SPEED_MASK) == ++ IGP01E1000_PSSR_SPEED_100MBPS) ++ ctrl |= E1000_CTRL_SPD_100; ++ } else { ++ if((ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, ++ &phy_data))) ++ return ret_val; ++ ++ if(phy_data & M88E1000_PSSR_DPLX) ctrl |= E1000_CTRL_FD; ++ else ctrl &= ~E1000_CTRL_FD; ++ ++ e1000_config_collision_dist(hw); ++ ++ /* Set up speed in the Device Control register depending on ++ * negotiated values. ++ */ ++ if((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_1000MBS) ++ ctrl |= E1000_CTRL_SPD_1000; ++ else if((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_100MBS) ++ ctrl |= E1000_CTRL_SPD_100; ++ } ++ /* Write the configured values back to the Device Control Reg. */ ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Forces the MAC's flow control settings. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Sets the TFCE and RFCE bits in the device control register to reflect ++ * the adapter settings. TFCE and RFCE need to be explicitly set by ++ * software when a Copper PHY is used because autonegotiation is managed ++ * by the PHY rather than the MAC. Software must also configure these ++ * bits when link is forced on a fiber connection. ++ *****************************************************************************/ ++static int ++e1000_force_mac_fc(struct e1000_hw *hw) ++{ ++ uint32_t ctrl; ++ ++ DEBUGFUNC("e1000_force_mac_fc"); ++ ++ /* Get the current configuration of the Device Control Register */ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ ++ /* Because we didn't get link via the internal auto-negotiation ++ * mechanism (we either forced link or we got link via PHY ++ * auto-neg), we have to manually enable/disable transmit an ++ * receive flow control. ++ * ++ * The "Case" statement below enables/disable flow control ++ * according to the "hw->fc" parameter. ++ * ++ * The possible values of the "fc" parameter are: ++ * 0: Flow control is completely disabled ++ * 1: Rx flow control is enabled (we can receive pause ++ * frames but not send pause frames). ++ * 2: Tx flow control is enabled (we can send pause frames ++ * frames but we do not receive pause frames). ++ * 3: Both Rx and TX flow control (symmetric) is enabled. ++ * other: No other values should be possible at this point. ++ */ ++ ++ switch (hw->fc) { ++ case e1000_fc_none: ++ ctrl &= (~(E1000_CTRL_TFCE | E1000_CTRL_RFCE)); ++ break; ++ case e1000_fc_rx_pause: ++ ctrl &= (~E1000_CTRL_TFCE); ++ ctrl |= E1000_CTRL_RFCE; ++ break; ++ case e1000_fc_tx_pause: ++ ctrl &= (~E1000_CTRL_RFCE); ++ ctrl |= E1000_CTRL_TFCE; ++ break; ++ case e1000_fc_full: ++ ctrl |= (E1000_CTRL_TFCE | E1000_CTRL_RFCE); ++ break; ++ default: ++ DEBUGOUT("Flow control param set incorrectly\n"); ++ return -E1000_ERR_CONFIG; ++ } ++ ++ /* Disable TX Flow Control for 82542 (rev 2.0) */ ++ if(hw->mac_type == e1000_82542_rev2_0) ++ ctrl &= (~E1000_CTRL_TFCE); ++ ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Configures flow control settings after link is established ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Should be called immediately after a valid link has been established. ++ * Forces MAC flow control settings if link was forced. When in MII/GMII mode ++ * and autonegotiation is enabled, the MAC flow control settings will be set ++ * based on the flow control negotiated by the PHY. In TBI mode, the TFCE ++ * and RFCE bits will be automaticaly set to the negotiated flow control mode. ++ *****************************************************************************/ ++static int ++e1000_config_fc_after_link_up(struct e1000_hw *hw) ++{ ++ int32_t ret_val; ++ uint16_t mii_status_reg; ++ uint16_t mii_nway_adv_reg; ++ uint16_t mii_nway_lp_ability_reg; ++ uint16_t speed; ++ uint16_t duplex; ++ ++ DEBUGFUNC("e1000_config_fc_after_link_up"); ++ ++ /* Check for the case where we have fiber media and auto-neg failed ++ * so we had to force link. In this case, we need to force the ++ * configuration of the MAC to match the "fc" parameter. ++ */ ++ if(((hw->media_type == e1000_media_type_fiber) && (hw->autoneg_failed)) || ++ ((hw->media_type == e1000_media_type_internal_serdes) && (hw->autoneg_failed))) { ++ if((ret_val = e1000_force_mac_fc(hw))) { ++ DEBUGOUT("Error forcing flow control settings\n"); ++ return ret_val; ++ } ++ } ++ ++ /* Check for the case where we have copper media and auto-neg is ++ * enabled. In this case, we need to check and see if Auto-Neg ++ * has completed, and if so, how the PHY and link partner has ++ * flow control configured. ++ */ ++ if(hw->media_type == e1000_media_type_copper) { ++ /* Read the MII Status Register and check to see if AutoNeg ++ * has completed. We read this twice because this reg has ++ * some "sticky" (latched) bits. ++ */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg))) ++ return ret_val; ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &mii_status_reg))) ++ return ret_val; ++ ++ if(mii_status_reg & MII_SR_AUTONEG_COMPLETE) { ++ /* The AutoNeg process has completed, so we now need to ++ * read both the Auto Negotiation Advertisement Register ++ * (Address 4) and the Auto_Negotiation Base Page Ability ++ * Register (Address 5) to determine how flow control was ++ * negotiated. ++ */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_AUTONEG_ADV, ++ &mii_nway_adv_reg))) ++ return ret_val; ++ if((ret_val = e1000_read_phy_reg(hw, PHY_LP_ABILITY, ++ &mii_nway_lp_ability_reg))) ++ return ret_val; ++ ++ /* Two bits in the Auto Negotiation Advertisement Register ++ * (Address 4) and two bits in the Auto Negotiation Base ++ * Page Ability Register (Address 5) determine flow control ++ * for both the PHY and the link partner. The following ++ * table, taken out of the IEEE 802.3ab/D6.0 dated March 25, ++ * 1999, describes these PAUSE resolution bits and how flow ++ * control is determined based upon these settings. ++ * NOTE: DC = Don't Care ++ * ++ * LOCAL DEVICE | LINK PARTNER ++ * PAUSE | ASM_DIR | PAUSE | ASM_DIR | NIC Resolution ++ *-------|---------|-------|---------|-------------------- ++ * 0 | 0 | DC | DC | e1000_fc_none ++ * 0 | 1 | 0 | DC | e1000_fc_none ++ * 0 | 1 | 1 | 0 | e1000_fc_none ++ * 0 | 1 | 1 | 1 | e1000_fc_tx_pause ++ * 1 | 0 | 0 | DC | e1000_fc_none ++ * 1 | DC | 1 | DC | e1000_fc_full ++ * 1 | 1 | 0 | 0 | e1000_fc_none ++ * 1 | 1 | 0 | 1 | e1000_fc_rx_pause ++ * ++ */ ++ /* Are both PAUSE bits set to 1? If so, this implies ++ * Symmetric Flow Control is enabled at both ends. The ++ * ASM_DIR bits are irrelevant per the spec. ++ * ++ * For Symmetric Flow Control: ++ * ++ * LOCAL DEVICE | LINK PARTNER ++ * PAUSE | ASM_DIR | PAUSE | ASM_DIR | Result ++ *-------|---------|-------|---------|-------------------- ++ * 1 | DC | 1 | DC | e1000_fc_full ++ * ++ */ ++ if((mii_nway_adv_reg & NWAY_AR_PAUSE) && ++ (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE)) { ++ /* Now we need to check if the user selected RX ONLY ++ * of pause frames. In this case, we had to advertise ++ * FULL flow control because we could not advertise RX ++ * ONLY. Hence, we must now check to see if we need to ++ * turn OFF the TRANSMISSION of PAUSE frames. ++ */ ++#if 0 ++ if(hw->original_fc == e1000_fc_full) { ++ hw->fc = e1000_fc_full; ++#else ++ if(hw->fc == e1000_fc_full) { ++#endif ++ DEBUGOUT("Flow Control = FULL.\r\n"); ++ } else { ++ hw->fc = e1000_fc_rx_pause; ++ DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); ++ } ++ } ++ /* For receiving PAUSE frames ONLY. ++ * ++ * LOCAL DEVICE | LINK PARTNER ++ * PAUSE | ASM_DIR | PAUSE | ASM_DIR | Result ++ *-------|---------|-------|---------|-------------------- ++ * 0 | 1 | 1 | 1 | e1000_fc_tx_pause ++ * ++ */ ++ else if(!(mii_nway_adv_reg & NWAY_AR_PAUSE) && ++ (mii_nway_adv_reg & NWAY_AR_ASM_DIR) && ++ (mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && ++ (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { ++ hw->fc = e1000_fc_tx_pause; ++ DEBUGOUT("Flow Control = TX PAUSE frames only.\r\n"); ++ } ++ /* For transmitting PAUSE frames ONLY. ++ * ++ * LOCAL DEVICE | LINK PARTNER ++ * PAUSE | ASM_DIR | PAUSE | ASM_DIR | Result ++ *-------|---------|-------|---------|-------------------- ++ * 1 | 1 | 0 | 1 | e1000_fc_rx_pause ++ * ++ */ ++ else if((mii_nway_adv_reg & NWAY_AR_PAUSE) && ++ (mii_nway_adv_reg & NWAY_AR_ASM_DIR) && ++ !(mii_nway_lp_ability_reg & NWAY_LPAR_PAUSE) && ++ (mii_nway_lp_ability_reg & NWAY_LPAR_ASM_DIR)) { ++ hw->fc = e1000_fc_rx_pause; ++ DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); ++ } ++ /* Per the IEEE spec, at this point flow control should be ++ * disabled. However, we want to consider that we could ++ * be connected to a legacy switch that doesn't advertise ++ * desired flow control, but can be forced on the link ++ * partner. So if we advertised no flow control, that is ++ * what we will resolve to. If we advertised some kind of ++ * receive capability (Rx Pause Only or Full Flow Control) ++ * and the link partner advertised none, we will configure ++ * ourselves to enable Rx Flow Control only. We can do ++ * this safely for two reasons: If the link partner really ++ * didn't want flow control enabled, and we enable Rx, no ++ * harm done since we won't be receiving any PAUSE frames ++ * anyway. If the intent on the link partner was to have ++ * flow control enabled, then by us enabling RX only, we ++ * can at least receive pause frames and process them. ++ * This is a good idea because in most cases, since we are ++ * predominantly a server NIC, more times than not we will ++ * be asked to delay transmission of packets than asking ++ * our link partner to pause transmission of frames. ++ */ ++#if 0 ++ else if(hw->original_fc == e1000_fc_none || ++ hw->original_fc == e1000_fc_tx_pause) { ++#else ++ else if(hw->fc == e1000_fc_none) ++ DEBUGOUT("Flow Control = NONE.\r\n"); ++ else if(hw->fc == e1000_fc_tx_pause) { ++#endif ++ hw->fc = e1000_fc_none; ++ DEBUGOUT("Flow Control = NONE.\r\n"); ++ } else { ++ hw->fc = e1000_fc_rx_pause; ++ DEBUGOUT("Flow Control = RX PAUSE frames only.\r\n"); ++ } ++ ++ /* Now we need to do one last check... If we auto- ++ * negotiated to HALF DUPLEX, flow control should not be ++ * enabled per IEEE 802.3 spec. ++ */ ++ e1000_get_speed_and_duplex(hw, &speed, &duplex); ++ ++ if(duplex == HALF_DUPLEX) ++ hw->fc = e1000_fc_none; ++ ++ /* Now we call a subroutine to actually force the MAC ++ * controller to use the correct flow control settings. ++ */ ++ if((ret_val = e1000_force_mac_fc(hw))) { ++ DEBUGOUT("Error forcing flow control settings\n"); ++ return ret_val; ++ } ++ } else { ++ DEBUGOUT("Copper PHY and Auto Neg has not completed.\r\n"); ++ } ++ } ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Checks to see if the link status of the hardware has changed. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * ++ * Called by any function that needs to check the link status of the adapter. ++ *****************************************************************************/ ++static int ++e1000_check_for_link(struct e1000_hw *hw) ++{ ++ uint32_t rxcw; ++ uint32_t ctrl; ++ uint32_t status; ++ uint32_t rctl; ++ uint32_t signal = 0; ++ int32_t ret_val; ++ uint16_t phy_data; ++ uint16_t lp_capability; ++ ++ DEBUGFUNC("e1000_check_for_link"); ++ ++ /* On adapters with a MAC newer than 82544, SW Defineable pin 1 will be ++ * set when the optics detect a signal. On older adapters, it will be ++ * cleared when there is a signal. This applies to fiber media only. ++ */ ++ if(hw->media_type == e1000_media_type_fiber) ++ signal = (hw->mac_type > e1000_82544) ? E1000_CTRL_SWDPIN1 : 0; ++ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ status = E1000_READ_REG(hw, STATUS); ++ rxcw = E1000_READ_REG(hw, RXCW); ++ ++ /* If we have a copper PHY then we only want to go out to the PHY ++ * registers to see if Auto-Neg has completed and/or if our link ++ * status has changed. The get_link_status flag will be set if we ++ * receive a Link Status Change interrupt or we have Rx Sequence ++ * Errors. ++ */ ++#if 0 ++ if((hw->media_type == e1000_media_type_copper) && hw->get_link_status) { ++#else ++ if(hw->media_type == e1000_media_type_copper) { ++#endif ++ /* First we want to see if the MII Status Register reports ++ * link. If so, then we want to get the current speed/duplex ++ * of the PHY. ++ * Read the register twice since the link bit is sticky. ++ */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) ++ return ret_val; ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) ++ return ret_val; ++ ++ if(phy_data & MII_SR_LINK_STATUS) { ++#if 0 ++ hw->get_link_status = FALSE; ++#endif ++ } else { ++ /* No link detected */ ++ return -E1000_ERR_NOLINK; ++ } ++ ++ /* We have a M88E1000 PHY and Auto-Neg is enabled. If we ++ * have Si on board that is 82544 or newer, Auto ++ * Speed Detection takes care of MAC speed/duplex ++ * configuration. So we only need to configure Collision ++ * Distance in the MAC. Otherwise, we need to force ++ * speed/duplex on the MAC to the current PHY speed/duplex ++ * settings. ++ */ ++ if(hw->mac_type >= e1000_82544) ++ e1000_config_collision_dist(hw); ++ else { ++ if((ret_val = e1000_config_mac_to_phy(hw))) { ++ DEBUGOUT("Error configuring MAC to PHY settings\n"); ++ return ret_val; ++ } ++ } ++ ++ /* Configure Flow Control now that Auto-Neg has completed. First, we ++ * need to restore the desired flow control settings because we may ++ * have had to re-autoneg with a different link partner. ++ */ ++ if((ret_val = e1000_config_fc_after_link_up(hw))) { ++ DEBUGOUT("Error configuring flow control\n"); ++ return ret_val; ++ } ++ ++ /* At this point we know that we are on copper and we have ++ * auto-negotiated link. These are conditions for checking the link ++ * parter capability register. We use the link partner capability to ++ * determine if TBI Compatibility needs to be turned on or off. If ++ * the link partner advertises any speed in addition to Gigabit, then ++ * we assume that they are GMII-based, and TBI compatibility is not ++ * needed. If no other speeds are advertised, we assume the link ++ * partner is TBI-based, and we turn on TBI Compatibility. ++ */ ++ if(hw->tbi_compatibility_en) { ++ if((ret_val = e1000_read_phy_reg(hw, PHY_LP_ABILITY, ++ &lp_capability))) ++ return ret_val; ++ if(lp_capability & (NWAY_LPAR_10T_HD_CAPS | ++ NWAY_LPAR_10T_FD_CAPS | ++ NWAY_LPAR_100TX_HD_CAPS | ++ NWAY_LPAR_100TX_FD_CAPS | ++ NWAY_LPAR_100T4_CAPS)) { ++ /* If our link partner advertises anything in addition to ++ * gigabit, we do not need to enable TBI compatibility. ++ */ ++ if(hw->tbi_compatibility_on) { ++ /* If we previously were in the mode, turn it off. */ ++ rctl = E1000_READ_REG(hw, RCTL); ++ rctl &= ~E1000_RCTL_SBP; ++ E1000_WRITE_REG(hw, RCTL, rctl); ++ hw->tbi_compatibility_on = FALSE; ++ } ++ } else { ++ /* If TBI compatibility is was previously off, turn it on. For ++ * compatibility with a TBI link partner, we will store bad ++ * packets. Some frames have an additional byte on the end and ++ * will look like CRC errors to to the hardware. ++ */ ++ if(!hw->tbi_compatibility_on) { ++ hw->tbi_compatibility_on = TRUE; ++ rctl = E1000_READ_REG(hw, RCTL); ++ rctl |= E1000_RCTL_SBP; ++ E1000_WRITE_REG(hw, RCTL, rctl); ++ } ++ } ++ } ++ } ++ /* If we don't have link (auto-negotiation failed or link partner cannot ++ * auto-negotiate), the cable is plugged in (we have signal), and our ++ * link partner is not trying to auto-negotiate with us (we are receiving ++ * idles or data), we need to force link up. We also need to give ++ * auto-negotiation time to complete, in case the cable was just plugged ++ * in. The autoneg_failed flag does this. ++ */ ++ else if((((hw->media_type == e1000_media_type_fiber) && ++ ((ctrl & E1000_CTRL_SWDPIN1) == signal)) || ++ (hw->media_type == e1000_media_type_internal_serdes)) && ++ (!(status & E1000_STATUS_LU)) && ++ (!(rxcw & E1000_RXCW_C))) { ++ if(hw->autoneg_failed == 0) { ++ hw->autoneg_failed = 1; ++ return 0; ++ } ++ DEBUGOUT("NOT RXing /C/, disable AutoNeg and force link.\r\n"); ++ ++ /* Disable auto-negotiation in the TXCW register */ ++ E1000_WRITE_REG(hw, TXCW, (hw->txcw & ~E1000_TXCW_ANE)); ++ ++ /* Force link-up and also force full-duplex. */ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ ctrl |= (E1000_CTRL_SLU | E1000_CTRL_FD); ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ ++ /* Configure Flow Control after forcing link up. */ ++ if((ret_val = e1000_config_fc_after_link_up(hw))) { ++ DEBUGOUT("Error configuring flow control\n"); ++ return ret_val; ++ } ++ } ++ /* If we are forcing link and we are receiving /C/ ordered sets, re-enable ++ * auto-negotiation in the TXCW register and disable forced link in the ++ * Device Control register in an attempt to auto-negotiate with our link ++ * partner. ++ */ ++ else if(((hw->media_type == e1000_media_type_fiber) || ++ (hw->media_type == e1000_media_type_internal_serdes)) && ++ (ctrl & E1000_CTRL_SLU) && ++ (rxcw & E1000_RXCW_C)) { ++ DEBUGOUT("RXing /C/, enable AutoNeg and stop forcing link.\r\n"); ++ E1000_WRITE_REG(hw, TXCW, hw->txcw); ++ E1000_WRITE_REG(hw, CTRL, (ctrl & ~E1000_CTRL_SLU)); ++ } ++#if 0 ++ /* If we force link for non-auto-negotiation switch, check link status ++ * based on MAC synchronization for internal serdes media type. ++ */ ++ else if((hw->media_type == e1000_media_type_internal_serdes) && ++ !(E1000_TXCW_ANE & E1000_READ_REG(hw, TXCW))) { ++ /* SYNCH bit and IV bit are sticky. */ ++ udelay(10); ++ if(E1000_RXCW_SYNCH & E1000_READ_REG(hw, RXCW)) { ++ if(!(rxcw & E1000_RXCW_IV)) { ++ hw->serdes_link_down = FALSE; ++ DEBUGOUT("SERDES: Link is up.\n"); ++ } ++ } else { ++ hw->serdes_link_down = TRUE; ++ DEBUGOUT("SERDES: Link is down.\n"); ++ } ++ } ++#endif ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++ * Detects the current speed and duplex settings of the hardware. ++ * ++ * hw - Struct containing variables accessed by shared code ++ * speed - Speed of the connection ++ * duplex - Duplex setting of the connection ++ *****************************************************************************/ ++static void ++e1000_get_speed_and_duplex(struct e1000_hw *hw, ++ uint16_t *speed, ++ uint16_t *duplex) ++{ ++ uint32_t status; ++ ++ DEBUGFUNC("e1000_get_speed_and_duplex"); ++ ++ if(hw->mac_type >= e1000_82543) { ++ status = E1000_READ_REG(hw, STATUS); ++ if(status & E1000_STATUS_SPEED_1000) { ++ *speed = SPEED_1000; ++ DEBUGOUT("1000 Mbs, "); ++ } else if(status & E1000_STATUS_SPEED_100) { ++ *speed = SPEED_100; ++ DEBUGOUT("100 Mbs, "); ++ } else { ++ *speed = SPEED_10; ++ DEBUGOUT("10 Mbs, "); ++ } ++ ++ if(status & E1000_STATUS_FD) { ++ *duplex = FULL_DUPLEX; ++ DEBUGOUT("Full Duplex\r\n"); ++ } else { ++ *duplex = HALF_DUPLEX; ++ DEBUGOUT(" Half Duplex\r\n"); ++ } ++ } else { ++ DEBUGOUT("1000 Mbs, Full Duplex\r\n"); ++ *speed = SPEED_1000; ++ *duplex = FULL_DUPLEX; ++ } ++} ++ ++/****************************************************************************** ++* Blocks until autoneg completes or times out (~4.5 seconds) ++* ++* hw - Struct containing variables accessed by shared code ++******************************************************************************/ ++static int ++e1000_wait_autoneg(struct e1000_hw *hw) ++{ ++ int32_t ret_val; ++ uint16_t i; ++ uint16_t phy_data; ++ ++ DEBUGFUNC("e1000_wait_autoneg"); ++ DEBUGOUT("Waiting for Auto-Neg to complete.\n"); ++ ++ /* We will wait for autoneg to complete or 4.5 seconds to expire. */ ++ for(i = PHY_AUTO_NEG_TIME; i > 0; i--) { ++ /* Read the MII Status Register and wait for Auto-Neg ++ * Complete bit to be set. ++ */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) ++ return ret_val; ++ if((ret_val = e1000_read_phy_reg(hw, PHY_STATUS, &phy_data))) ++ return ret_val; ++ if(phy_data & MII_SR_AUTONEG_COMPLETE) { ++ DEBUGOUT("Auto-Neg complete.\n"); ++ return E1000_SUCCESS; ++ } ++ mdelay(100); ++ } ++ DEBUGOUT("Auto-Neg timedout.\n"); ++ return -E1000_ERR_TIMEOUT; ++} ++ ++/****************************************************************************** ++* Raises the Management Data Clock ++* ++* hw - Struct containing variables accessed by shared code ++* ctrl - Device control register's current value ++******************************************************************************/ ++static void ++e1000_raise_mdi_clk(struct e1000_hw *hw, ++ uint32_t *ctrl) ++{ ++ /* Raise the clock input to the Management Data Clock (by setting the MDC ++ * bit), and then delay 10 microseconds. ++ */ ++ E1000_WRITE_REG(hw, CTRL, (*ctrl | E1000_CTRL_MDC)); ++ E1000_WRITE_FLUSH(hw); ++ udelay(10); ++} ++ ++/****************************************************************************** ++* Lowers the Management Data Clock ++* ++* hw - Struct containing variables accessed by shared code ++* ctrl - Device control register's current value ++******************************************************************************/ ++static void ++e1000_lower_mdi_clk(struct e1000_hw *hw, ++ uint32_t *ctrl) ++{ ++ /* Lower the clock input to the Management Data Clock (by clearing the MDC ++ * bit), and then delay 10 microseconds. ++ */ ++ E1000_WRITE_REG(hw, CTRL, (*ctrl & ~E1000_CTRL_MDC)); ++ E1000_WRITE_FLUSH(hw); ++ udelay(10); ++} ++ ++/****************************************************************************** ++* Shifts data bits out to the PHY ++* ++* hw - Struct containing variables accessed by shared code ++* data - Data to send out to the PHY ++* count - Number of bits to shift out ++* ++* Bits are shifted out in MSB to LSB order. ++******************************************************************************/ ++static void ++e1000_shift_out_mdi_bits(struct e1000_hw *hw, ++ uint32_t data, ++ uint16_t count) ++{ ++ uint32_t ctrl; ++ uint32_t mask; ++ ++ /* We need to shift "count" number of bits out to the PHY. So, the value ++ * in the "data" parameter will be shifted out to the PHY one bit at a ++ * time. In order to do this, "data" must be broken down into bits. ++ */ ++ mask = 0x01; ++ mask <<= (count - 1); ++ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ ++ /* Set MDIO_DIR and MDC_DIR direction bits to be used as output pins. */ ++ ctrl |= (E1000_CTRL_MDIO_DIR | E1000_CTRL_MDC_DIR); ++ ++ while(mask) { ++ /* A "1" is shifted out to the PHY by setting the MDIO bit to "1" and ++ * then raising and lowering the Management Data Clock. A "0" is ++ * shifted out to the PHY by setting the MDIO bit to "0" and then ++ * raising and lowering the clock. ++ */ ++ if(data & mask) ctrl |= E1000_CTRL_MDIO; ++ else ctrl &= ~E1000_CTRL_MDIO; ++ ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ E1000_WRITE_FLUSH(hw); ++ ++ udelay(10); ++ ++ e1000_raise_mdi_clk(hw, &ctrl); ++ e1000_lower_mdi_clk(hw, &ctrl); ++ ++ mask = mask >> 1; ++ } ++} ++ ++/****************************************************************************** ++* Shifts data bits in from the PHY ++* ++* hw - Struct containing variables accessed by shared code ++* ++* Bits are shifted in in MSB to LSB order. ++******************************************************************************/ ++static uint16_t ++e1000_shift_in_mdi_bits(struct e1000_hw *hw) ++{ ++ uint32_t ctrl; ++ uint16_t data = 0; ++ uint8_t i; ++ ++ /* In order to read a register from the PHY, we need to shift in a total ++ * of 18 bits from the PHY. The first two bit (turnaround) times are used ++ * to avoid contention on the MDIO pin when a read operation is performed. ++ * These two bits are ignored by us and thrown away. Bits are "shifted in" ++ * by raising the input to the Management Data Clock (setting the MDC bit), ++ * and then reading the value of the MDIO bit. ++ */ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ ++ /* Clear MDIO_DIR (SWDPIO1) to indicate this bit is to be used as input. */ ++ ctrl &= ~E1000_CTRL_MDIO_DIR; ++ ctrl &= ~E1000_CTRL_MDIO; ++ ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ E1000_WRITE_FLUSH(hw); ++ ++ /* Raise and Lower the clock before reading in the data. This accounts for ++ * the turnaround bits. The first clock occurred when we clocked out the ++ * last bit of the Register Address. ++ */ ++ e1000_raise_mdi_clk(hw, &ctrl); ++ e1000_lower_mdi_clk(hw, &ctrl); ++ ++ for(data = 0, i = 0; i < 16; i++) { ++ data = data << 1; ++ e1000_raise_mdi_clk(hw, &ctrl); ++ ctrl = E1000_READ_REG(hw, CTRL); ++ /* Check to see if we shifted in a "1". */ ++ if(ctrl & E1000_CTRL_MDIO) data |= 1; ++ e1000_lower_mdi_clk(hw, &ctrl); ++ } ++ ++ e1000_raise_mdi_clk(hw, &ctrl); ++ e1000_lower_mdi_clk(hw, &ctrl); ++ ++ return data; ++} ++ ++/***************************************************************************** ++* Reads the value from a PHY register, if the value is on a specific non zero ++* page, sets the page first. ++* ++* hw - Struct containing variables accessed by shared code ++* reg_addr - address of the PHY register to read ++******************************************************************************/ ++static int ++e1000_read_phy_reg(struct e1000_hw *hw, ++ uint32_t reg_addr, ++ uint16_t *phy_data) ++{ ++ uint32_t ret_val; ++ ++ DEBUGFUNC("e1000_read_phy_reg"); ++ ++ if(hw->phy_type == e1000_phy_igp && ++ (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { ++ if((ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, ++ (uint16_t)reg_addr))) ++ return ret_val; ++ } ++ ++ ret_val = e1000_read_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr, ++ phy_data); ++ ++ return ret_val; ++} ++ ++static int ++e1000_read_phy_reg_ex(struct e1000_hw *hw, ++ uint32_t reg_addr, ++ uint16_t *phy_data) ++{ ++ uint32_t i; ++ uint32_t mdic = 0; ++ const uint32_t phy_addr = 1; ++ ++ DEBUGFUNC("e1000_read_phy_reg_ex"); ++ ++ if(reg_addr > MAX_PHY_REG_ADDRESS) { ++ DEBUGOUT1("PHY Address %d is out of range\n", reg_addr); ++ return -E1000_ERR_PARAM; ++ } ++ ++ if(hw->mac_type > e1000_82543) { ++ /* Set up Op-code, Phy Address, and register address in the MDI ++ * Control register. The MAC will take care of interfacing with the ++ * PHY to retrieve the desired data. ++ */ ++ mdic = ((reg_addr << E1000_MDIC_REG_SHIFT) | ++ (phy_addr << E1000_MDIC_PHY_SHIFT) | ++ (E1000_MDIC_OP_READ)); ++ ++ E1000_WRITE_REG(hw, MDIC, mdic); ++ ++ /* Poll the ready bit to see if the MDI read completed */ ++ for(i = 0; i < 64; i++) { ++ udelay(50); ++ mdic = E1000_READ_REG(hw, MDIC); ++ if(mdic & E1000_MDIC_READY) break; ++ } ++ if(!(mdic & E1000_MDIC_READY)) { ++ DEBUGOUT("MDI Read did not complete\n"); ++ return -E1000_ERR_PHY; ++ } ++ if(mdic & E1000_MDIC_ERROR) { ++ DEBUGOUT("MDI Error\n"); ++ return -E1000_ERR_PHY; ++ } ++ *phy_data = (uint16_t) mdic; ++ } else { ++ /* We must first send a preamble through the MDIO pin to signal the ++ * beginning of an MII instruction. This is done by sending 32 ++ * consecutive "1" bits. ++ */ ++ e1000_shift_out_mdi_bits(hw, PHY_PREAMBLE, PHY_PREAMBLE_SIZE); ++ ++ /* Now combine the next few fields that are required for a read ++ * operation. We use this method instead of calling the ++ * e1000_shift_out_mdi_bits routine five different times. The format of ++ * a MII read instruction consists of a shift out of 14 bits and is ++ * defined as follows: ++ * ++ * followed by a shift in of 18 bits. This first two bits shifted in ++ * are TurnAround bits used to avoid contention on the MDIO pin when a ++ * READ operation is performed. These two bits are thrown away ++ * followed by a shift in of 16 bits which contains the desired data. ++ */ ++ mdic = ((reg_addr) | (phy_addr << 5) | ++ (PHY_OP_READ << 10) | (PHY_SOF << 12)); ++ ++ e1000_shift_out_mdi_bits(hw, mdic, 14); ++ ++ /* Now that we've shifted out the read command to the MII, we need to ++ * "shift in" the 16-bit value (18 total bits) of the requested PHY ++ * register address. ++ */ ++ *phy_data = e1000_shift_in_mdi_bits(hw); ++ } ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++* Writes a value to a PHY register ++* ++* hw - Struct containing variables accessed by shared code ++* reg_addr - address of the PHY register to write ++* data - data to write to the PHY ++******************************************************************************/ ++static int ++e1000_write_phy_reg(struct e1000_hw *hw, ++ uint32_t reg_addr, ++ uint16_t phy_data) ++{ ++ uint32_t ret_val; ++ ++ DEBUGFUNC("e1000_write_phy_reg"); ++ ++ if(hw->phy_type == e1000_phy_igp && ++ (reg_addr > MAX_PHY_MULTI_PAGE_REG)) { ++ if((ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT, ++ (uint16_t)reg_addr))) ++ return ret_val; ++ } ++ ++ ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr, ++ phy_data); ++ ++ return ret_val; ++} ++ ++static int ++e1000_write_phy_reg_ex(struct e1000_hw *hw, ++ uint32_t reg_addr, ++ uint16_t phy_data) ++{ ++ uint32_t i; ++ uint32_t mdic = 0; ++ const uint32_t phy_addr = 1; ++ ++ DEBUGFUNC("e1000_write_phy_reg_ex"); ++ ++ if(reg_addr > MAX_PHY_REG_ADDRESS) { ++ DEBUGOUT1("PHY Address %d is out of range\n", reg_addr); ++ return -E1000_ERR_PARAM; ++ } ++ ++ if(hw->mac_type > e1000_82543) { ++ /* Set up Op-code, Phy Address, register address, and data intended ++ * for the PHY register in the MDI Control register. The MAC will take ++ * care of interfacing with the PHY to send the desired data. ++ */ ++ mdic = (((uint32_t) phy_data) | ++ (reg_addr << E1000_MDIC_REG_SHIFT) | ++ (phy_addr << E1000_MDIC_PHY_SHIFT) | ++ (E1000_MDIC_OP_WRITE)); ++ ++ E1000_WRITE_REG(hw, MDIC, mdic); ++ ++ /* Poll the ready bit to see if the MDI read completed */ ++ for(i = 0; i < 640; i++) { ++ udelay(5); ++ mdic = E1000_READ_REG(hw, MDIC); ++ if(mdic & E1000_MDIC_READY) break; ++ } ++ if(!(mdic & E1000_MDIC_READY)) { ++ DEBUGOUT("MDI Write did not complete\n"); ++ return -E1000_ERR_PHY; ++ } ++ } else { ++ /* We'll need to use the SW defined pins to shift the write command ++ * out to the PHY. We first send a preamble to the PHY to signal the ++ * beginning of the MII instruction. This is done by sending 32 ++ * consecutive "1" bits. ++ */ ++ e1000_shift_out_mdi_bits(hw, PHY_PREAMBLE, PHY_PREAMBLE_SIZE); ++ ++ /* Now combine the remaining required fields that will indicate a ++ * write operation. We use this method instead of calling the ++ * e1000_shift_out_mdi_bits routine for each field in the command. The ++ * format of a MII write instruction is as follows: ++ * . ++ */ ++ mdic = ((PHY_TURNAROUND) | (reg_addr << 2) | (phy_addr << 7) | ++ (PHY_OP_WRITE << 12) | (PHY_SOF << 14)); ++ mdic <<= 16; ++ mdic |= (uint32_t) phy_data; ++ ++ e1000_shift_out_mdi_bits(hw, mdic, 32); ++ } ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++* Returns the PHY to the power-on reset state ++* ++* hw - Struct containing variables accessed by shared code ++******************************************************************************/ ++static void ++e1000_phy_hw_reset(struct e1000_hw *hw) ++{ ++ uint32_t ctrl, ctrl_ext; ++ ++ DEBUGFUNC("e1000_phy_hw_reset"); ++ ++ DEBUGOUT("Resetting Phy...\n"); ++ ++ if(hw->mac_type > e1000_82543) { ++ /* Read the device control register and assert the E1000_CTRL_PHY_RST ++ * bit. Then, take it out of reset. ++ */ ++ ctrl = E1000_READ_REG(hw, CTRL); ++ E1000_WRITE_REG(hw, CTRL, ctrl | E1000_CTRL_PHY_RST); ++ E1000_WRITE_FLUSH(hw); ++ mdelay(10); ++ E1000_WRITE_REG(hw, CTRL, ctrl); ++ E1000_WRITE_FLUSH(hw); ++ } else { ++ /* Read the Extended Device Control Register, assert the PHY_RESET_DIR ++ * bit to put the PHY into reset. Then, take it out of reset. ++ */ ++ ctrl_ext = E1000_READ_REG(hw, CTRL_EXT); ++ ctrl_ext |= E1000_CTRL_EXT_SDP4_DIR; ++ ctrl_ext &= ~E1000_CTRL_EXT_SDP4_DATA; ++ E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); ++ E1000_WRITE_FLUSH(hw); ++ mdelay(10); ++ ctrl_ext |= E1000_CTRL_EXT_SDP4_DATA; ++ E1000_WRITE_REG(hw, CTRL_EXT, ctrl_ext); ++ E1000_WRITE_FLUSH(hw); ++ } ++ udelay(150); ++} ++ ++/****************************************************************************** ++* Resets the PHY ++* ++* hw - Struct containing variables accessed by shared code ++* ++* Sets bit 15 of the MII Control regiser ++******************************************************************************/ ++static int ++e1000_phy_reset(struct e1000_hw *hw) ++{ ++ int32_t ret_val; ++ uint16_t phy_data; ++ ++ DEBUGFUNC("e1000_phy_reset"); ++ ++ if(hw->mac_type != e1000_82541_rev_2) { ++ if((ret_val = e1000_read_phy_reg(hw, PHY_CTRL, &phy_data))) ++ return ret_val; ++ ++ phy_data |= MII_CR_RESET; ++ if((ret_val = e1000_write_phy_reg(hw, PHY_CTRL, phy_data))) ++ return ret_val; ++ ++ udelay(1); ++ } else e1000_phy_hw_reset(hw); ++ ++ if(hw->phy_type == e1000_phy_igp) ++ e1000_phy_init_script(hw); ++ ++ return E1000_SUCCESS; ++} ++ ++/****************************************************************************** ++* Probes the expected PHY address for known PHY IDs ++* ++* hw - Struct containing variables accessed by shared code ++******************************************************************************/ ++static int ++e1000_detect_gig_phy(struct e1000_hw *hw) ++{ ++ int32_t phy_init_status, ret_val; ++ uint16_t phy_id_high, phy_id_low; ++ boolean_t match = FALSE; ++ ++ DEBUGFUNC("e1000_detect_gig_phy"); ++ ++ /* Read the PHY ID Registers to identify which PHY is onboard. */ ++ if((ret_val = e1000_read_phy_reg(hw, PHY_ID1, &phy_id_high))) ++ return ret_val; ++ ++ hw->phy_id = (uint32_t) (phy_id_high << 16); ++ udelay(20); ++ if((ret_val = e1000_read_phy_reg(hw, PHY_ID2, &phy_id_low))) ++ return ret_val; ++ ++ hw->phy_id |= (uint32_t) (phy_id_low & PHY_REVISION_MASK); ++#ifdef LINUX_DRIVER ++ hw->phy_revision = (uint32_t) phy_id_low & ~PHY_REVISION_MASK; ++#endif ++ ++ switch(hw->mac_type) { ++ case e1000_82543: ++ if(hw->phy_id == M88E1000_E_PHY_ID) match = TRUE; ++ break; ++ case e1000_82544: ++ if(hw->phy_id == M88E1000_I_PHY_ID) match = TRUE; ++ break; ++ case e1000_82540: ++ case e1000_82545: ++ case e1000_82545_rev_3: ++ case e1000_82546: ++ case e1000_82546_rev_3: ++ if(hw->phy_id == M88E1011_I_PHY_ID) match = TRUE; ++ break; ++ case e1000_82541: ++ case e1000_82541_rev_2: ++ case e1000_82547: ++ case e1000_82547_rev_2: ++ if(hw->phy_id == IGP01E1000_I_PHY_ID) match = TRUE; ++ break; ++ default: ++ DEBUGOUT1("Invalid MAC type %d\n", hw->mac_type); ++ return -E1000_ERR_CONFIG; ++ } ++ phy_init_status = e1000_set_phy_type(hw); ++ ++ if ((match) && (phy_init_status == E1000_SUCCESS)) { ++ DEBUGOUT1("PHY ID 0x%X detected\n", hw->phy_id); ++ return E1000_SUCCESS; ++ } ++ DEBUGOUT1("Invalid PHY ID 0x%X\n", hw->phy_id); ++ return -E1000_ERR_PHY; ++} ++ ++/****************************************************************************** ++ * Sets up eeprom variables in the hw struct. Must be called after mac_type ++ * is configured. ++ * ++ * hw - Struct containing variables accessed by shared code ++ *****************************************************************************/ ++static void ++e1000_init_eeprom_params(struct e1000_hw *hw) ++{ ++ struct e1000_eeprom_info *eeprom = &hw->eeprom; ++ uint32_t eecd = E1000_READ_REG(hw, EECD); ++ uint16_t eeprom_size; ++ ++ DEBUGFUNC("e1000_init_eeprom_params"); ++ ++ switch (hw->mac_type) { ++ case e1000_82542_rev2_0: ++ case e1000_82542_rev2_1: ++ case e1000_82543: ++ case e1000_82544: ++ eeprom->type = e1000_eeprom_microwire; ++ eeprom->word_size = 64; ++ eeprom->opcode_bits = 3; ++ eeprom->address_bits = 6; ++ eeprom->delay_usec = 50; ++ break; ++ case e1000_82540: ++ case e1000_82545: ++ case e1000_82545_rev_3: ++ case e1000_82546: ++ case e1000_82546_rev_3: ++ eeprom->type = e1000_eeprom_microwire; ++ eeprom->opcode_bits = 3; ++ eeprom->delay_usec = 50; ++ if(eecd & E1000_EECD_SIZE) { ++ eeprom->word_size = 256; ++ eeprom->address_bits = 8; ++ } else { ++ eeprom->word_size = 64; ++ eeprom->address_bits = 6; ++ } ++ break; ++ case e1000_82541: ++ case e1000_82541_rev_2: ++ case e1000_82547: ++ case e1000_82547_rev_2: ++ if (eecd & E1000_EECD_TYPE) { ++ eeprom->type = e1000_eeprom_spi; ++ if (eecd & E1000_EECD_ADDR_BITS) { ++ eeprom->page_size = 32; ++ eeprom->address_bits = 16; ++ } else { ++ eeprom->page_size = 8; ++ eeprom->address_bits = 8; ++ } ++ } else { ++ eeprom->type = e1000_eeprom_microwire; ++ eeprom->opcode_bits = 3; ++ eeprom->delay_usec = 50; ++ if (eecd & E1000_EECD_ADDR_BITS) { ++ eeprom->word_size = 256; ++ eeprom->address_bits = 8; ++ } else { ++ eeprom->word_size = 64; ++ eeprom->address_bits = 6; ++ } ++ } ++ break; ++ default: ++ eeprom->type = e1000_eeprom_spi; ++ if (eecd & E1000_EECD_ADDR_BITS) { ++ eeprom->page_size = 32; ++ eeprom->address_bits = 16; ++ } else { ++ eeprom->page_size = 8; ++ eeprom->address_bits = 8; ++ } ++ break; ++ } ++ ++ if (eeprom->type == e1000_eeprom_spi) { ++ eeprom->opcode_bits = 8; ++ eeprom->delay_usec = 1; ++ eeprom->word_size = 64; ++ if (e1000_read_eeprom(hw, EEPROM_CFG, 1, &eeprom_size) == 0) { ++ eeprom_size &= EEPROM_SIZE_MASK; ++ ++ switch (eeprom_size) { ++ case EEPROM_SIZE_16KB: ++ eeprom->word_size = 8192; ++ break; ++ case EEPROM_SIZE_8KB: ++ eeprom->word_size = 4096; ++ break; ++ case EEPROM_SIZE_4KB: ++ eeprom->word_size = 2048; ++ break; ++ case EEPROM_SIZE_2KB: ++ eeprom->word_size = 1024; ++ break; ++ case EEPROM_SIZE_1KB: ++ eeprom->word_size = 512; ++ break; ++ case EEPROM_SIZE_512B: ++ eeprom->word_size = 256; ++ break; ++ case EEPROM_SIZE_128B: ++ default: ++ break; ++ } ++ } ++ } ++} ++ ++/** ++ * e1000_reset - Reset the adapter ++ */ ++ ++static int ++e1000_reset(struct e1000_hw *hw) ++{ ++ uint32_t pba; ++ /* Repartition Pba for greater than 9k mtu ++ * To take effect CTRL.RST is required. ++ */ ++ ++ if(hw->mac_type < e1000_82547) { ++ pba = E1000_PBA_48K; ++ } else { ++ pba = E1000_PBA_30K; ++ } ++ E1000_WRITE_REG(hw, PBA, pba); ++ ++ /* flow control settings */ ++#if 0 ++ hw->fc_high_water = FC_DEFAULT_HI_THRESH; ++ hw->fc_low_water = FC_DEFAULT_LO_THRESH; ++ hw->fc_pause_time = FC_DEFAULT_TX_TIMER; ++ hw->fc_send_xon = 1; ++ hw->fc = hw->original_fc; ++#endif ++ ++ e1000_reset_hw(hw); ++ if(hw->mac_type >= e1000_82544) ++ E1000_WRITE_REG(hw, WUC, 0); ++ return e1000_init_hw(hw); ++} ++ ++/** ++ * e1000_sw_init - Initialize general software structures (struct e1000_adapter) ++ * @adapter: board private structure to initialize ++ * ++ * e1000_sw_init initializes the Adapter private data structure. ++ * Fields are initialized based on PCI device information and ++ * OS network device settings (MTU size). ++ **/ ++ ++static int ++e1000_sw_init(struct pci_device *pdev, struct e1000_hw *hw) ++{ ++ int result; ++ ++ /* PCI config space info */ ++ pci_read_config_word(pdev, PCI_VENDOR_ID, &hw->vendor_id); ++ pci_read_config_word(pdev, PCI_DEVICE_ID, &hw->device_id); ++ pci_read_config_byte(pdev, PCI_REVISION, &hw->revision_id); ++#if 0 ++ pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, ++ &hw->subsystem_vendor_id); ++ pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &hw->subsystem_id); ++#endif ++ ++ pci_read_config_word(pdev, PCI_COMMAND, &hw->pci_cmd_word); ++ ++ /* identify the MAC */ ++ ++ result = e1000_set_mac_type(hw); ++ if (result) { ++ E1000_ERR("Unknown MAC Type\n"); ++ return result; ++ } ++ ++ /* initialize eeprom parameters */ ++ ++ e1000_init_eeprom_params(hw); ++ ++#if 0 ++ if((hw->mac_type == e1000_82541) || ++ (hw->mac_type == e1000_82547) || ++ (hw->mac_type == e1000_82541_rev_2) || ++ (hw->mac_type == e1000_82547_rev_2)) ++ hw->phy_init_script = 1; ++#endif ++ ++ e1000_set_media_type(hw); ++ ++#if 0 ++ if(hw->mac_type < e1000_82543) ++ hw->report_tx_early = 0; ++ else ++ hw->report_tx_early = 1; ++ ++ hw->wait_autoneg_complete = FALSE; ++#endif ++ hw->tbi_compatibility_en = TRUE; ++#if 0 ++ hw->adaptive_ifs = TRUE; ++ ++ /* Copper options */ ++ ++ if(hw->media_type == e1000_media_type_copper) { ++ hw->mdix = AUTO_ALL_MODES; ++ hw->disable_polarity_correction = FALSE; ++ hw->master_slave = E1000_MASTER_SLAVE; ++ } ++#endif ++ return E1000_SUCCESS; ++} ++ ++static void fill_rx (void) ++{ ++ struct e1000_rx_desc *rd; ++ rx_last = rx_tail; ++ rd = rx_base + rx_tail; ++ rx_tail = (rx_tail + 1) % 8; ++ memset (rd, 0, 16); ++ rd->buffer_addr = virt_to_bus(&packet); ++ E1000_WRITE_REG (&hw, RDT, rx_tail); ++} ++ ++static void init_descriptor (void) ++{ ++ unsigned long ptr; ++ unsigned long tctl; ++ ++ ptr = virt_to_phys(tx_pool); ++ if (ptr & 0xf) ++ ptr = (ptr + 0x10) & (~0xf); ++ ++ tx_base = phys_to_virt(ptr); ++ ++ E1000_WRITE_REG (&hw, TDBAL, virt_to_bus(tx_base)); ++ E1000_WRITE_REG (&hw, TDBAH, 0); ++ E1000_WRITE_REG (&hw, TDLEN, 128); ++ ++ /* Setup the HW Tx Head and Tail descriptor pointers */ ++ ++ E1000_WRITE_REG (&hw, TDH, 0); ++ E1000_WRITE_REG (&hw, TDT, 0); ++ tx_tail = 0; ++ ++ /* Program the Transmit Control Register */ ++ ++#ifdef LINUX_DRIVER_TCTL ++ tctl = E1000_READ_REG(&hw, TCTL); ++ ++ tctl &= ~E1000_TCTL_CT; ++ tctl |= E1000_TCTL_EN | E1000_TCTL_PSP | ++ (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT); ++#else ++ tctl = E1000_TCTL_PSP | E1000_TCTL_EN | ++ (E1000_COLLISION_THRESHOLD << E1000_CT_SHIFT) | ++ (E1000_HDX_COLLISION_DISTANCE << E1000_COLD_SHIFT); ++#endif ++ ++ E1000_WRITE_REG (&hw, TCTL, tctl); ++ ++ e1000_config_collision_dist(&hw); ++ ++ ++ rx_tail = 0; ++ /* disable receive */ ++ E1000_WRITE_REG (&hw, RCTL, 0); ++ ptr = virt_to_phys(rx_pool); ++ if (ptr & 0xf) ++ ptr = (ptr + 0x10) & (~0xf); ++ rx_base = phys_to_virt(ptr); ++ ++ /* Setup the Base and Length of the Rx Descriptor Ring */ ++ ++ E1000_WRITE_REG (&hw, RDBAL, virt_to_bus(rx_base)); ++ E1000_WRITE_REG (&hw, RDBAH, 0); ++ ++ E1000_WRITE_REG (&hw, RDLEN, 128); ++ ++ /* Setup the HW Rx Head and Tail Descriptor Pointers */ ++ E1000_WRITE_REG (&hw, RDH, 0); ++ E1000_WRITE_REG (&hw, RDT, 0); ++ ++ E1000_WRITE_REG (&hw, RCTL, ++ E1000_RCTL_EN | ++ E1000_RCTL_BAM | ++ E1000_RCTL_SZ_2048 | ++ E1000_RCTL_MPE); ++ fill_rx(); ++} ++ ++ ++ ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int ++e1000_poll (struct nic *nic, int retrieve) ++{ ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ struct e1000_rx_desc *rd; ++ ++ rd = rx_base + rx_last; ++ if (!rd->status & E1000_RXD_STAT_DD) ++ return 0; ++ ++ if ( ! retrieve ) return 1; ++ ++ // printf("recv: packet %! -> %! len=%d \n", packet+6, packet,rd->Length); ++ memcpy (nic->packet, packet, rd->length); ++ nic->packetlen = rd->length; ++ fill_rx (); ++ return 1; ++} ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void ++e1000_transmit (struct nic *nic, const char *d, /* Destination */ ++ unsigned int type, /* Type */ ++ unsigned int size, /* size */ ++ const char *p) /* Packet */ ++{ ++ /* send the packet to destination */ ++ struct eth_hdr { ++ unsigned char dst_addr[ETH_ALEN]; ++ unsigned char src_addr[ETH_ALEN]; ++ unsigned short type; ++ } hdr; ++ struct e1000_tx_desc *txhd; /* header */ ++ struct e1000_tx_desc *txp; /* payload */ ++ DEBUGFUNC("send"); ++ ++ memcpy (&hdr.dst_addr, d, ETH_ALEN); ++ memcpy (&hdr.src_addr, nic->node_addr, ETH_ALEN); ++ ++ hdr.type = htons (type); ++ txhd = tx_base + tx_tail; ++ tx_tail = (tx_tail + 1) % 8; ++ txp = tx_base + tx_tail; ++ tx_tail = (tx_tail + 1) % 8; ++ ++ txhd->buffer_addr = virt_to_bus (&hdr); ++ txhd->lower.data = sizeof (hdr); ++ txhd->upper.data = 0; ++ ++ txp->buffer_addr = virt_to_bus(p); ++ txp->lower.data = E1000_TXD_CMD_RPS | E1000_TXD_CMD_EOP | E1000_TXD_CMD_IFCS | size; ++ txp->upper.data = 0; ++ ++ E1000_WRITE_REG (&hw, TDT, tx_tail); ++ while (!(txp->upper.data & E1000_TXD_STAT_DD)) { ++ udelay(10); /* give the nic a chance to write to the register */ ++ poll_interruptions(); ++ } ++ DEBUGFUNC("send end"); ++} ++ ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void e1000_disable (struct dev *dev __unused) ++{ ++ /* Clear the transmit ring */ ++ E1000_WRITE_REG (&hw, TDH, 0); ++ E1000_WRITE_REG (&hw, TDT, 0); ++ ++ /* Clear the receive ring */ ++ E1000_WRITE_REG (&hw, RDH, 0); ++ E1000_WRITE_REG (&hw, RDT, 0); ++ ++ /* put the card in its initial state */ ++ E1000_WRITE_REG (&hw, CTRL, E1000_CTRL_RST); ++ ++ /* Turn off the ethernet interface */ ++ E1000_WRITE_REG (&hw, RCTL, 0); ++ E1000_WRITE_REG (&hw, TCTL, 0); ++ mdelay (10); ++ ++ /* Unmap my window to the device */ ++ iounmap(hw.hw_addr); ++} ++ ++/************************************************************************** ++IRQ - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void e1000_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++#define IORESOURCE_IO 0x00000100 /* Resource type */ ++#define BAR_0 0 ++#define BAR_1 1 ++#define BAR_5 5 ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++You should omit the last argument struct pci_device * for a non-PCI NIC ++***************************************************************************/ ++static int e1000_probe(struct dev *dev, struct pci_device *p) ++{ ++ struct nic *nic = (struct nic *)dev; ++ unsigned long mmio_start, mmio_len; ++ int ret_val, i; ++ ++ if (p == 0) ++ return 0; ++ /* Initialize hw with default values */ ++ memset(&hw, 0, sizeof(hw)); ++ hw.pdev = p; ++ ++#if 1 ++ /* Are these variables needed? */ ++ hw.fc = e1000_fc_none; ++#if 0 ++ hw.original_fc = e1000_fc_none; ++#endif ++ hw.autoneg_failed = 0; ++#if 0 ++ hw.get_link_status = TRUE; ++#endif ++#endif ++ ++ mmio_start = pci_bar_start(p, PCI_BASE_ADDRESS_0); ++ mmio_len = pci_bar_size(p, PCI_BASE_ADDRESS_0); ++ hw.hw_addr = ioremap(mmio_start, mmio_len); ++ ++ for(i = BAR_1; i <= BAR_5; i++) { ++ if(pci_bar_size(p, i) == 0) ++ continue; ++ if(pci_find_capability(p, i) & IORESOURCE_IO) { ++ hw.io_base = pci_bar_start(p, i); ++ break; ++ } ++ } ++ ++ adjust_pci_device(p); ++ ++ nic->ioaddr = p->ioaddr & ~3; ++ nic->irqno = 0; ++ ++ /* From Matt Hortman */ ++ /* MAC and Phy settings */ ++ ++ /* setup the private structure */ ++ if (e1000_sw_init(p, &hw) < 0) { ++ iounmap(hw.hw_addr); ++ return 0; ++ } ++ ++ /* make sure the EEPROM is good */ ++ ++ if (e1000_validate_eeprom_checksum(&hw) < 0) { ++ printf ("The EEPROM Checksum Is Not Valid\n"); ++ iounmap(hw.hw_addr); ++ return 0; ++ } ++ ++ /* copy the MAC address out of the EEPROM */ ++ ++ e1000_read_mac_addr(&hw); ++ memcpy (nic->node_addr, hw.mac_addr, ETH_ALEN); ++ ++ printf("Ethernet addr: %!\n", nic->node_addr); ++ ++ /* reset the hardware with the new settings */ ++ ++ ret_val = e1000_reset(&hw); ++ if (ret_val < 0) { ++ if ((ret_val == -E1000_ERR_NOLINK) || ++ (ret_val == -E1000_ERR_TIMEOUT)) { ++ E1000_ERR("Valid Link not detected\n"); ++ } else { ++ E1000_ERR("Hardware Initialization Failed\n"); ++ } ++ iounmap(hw.hw_addr); ++ return 0; ++ } ++ init_descriptor(); ++ ++ /* point to NIC specific routines */ ++ dev->disable = e1000_disable; ++ nic->poll = e1000_poll; ++ nic->transmit = e1000_transmit; ++ nic->irq = e1000_irq; ++ ++ return 1; ++} ++ ++static struct pci_id e1000_nics[] = { ++PCI_ROM(0x8086, 0x1000, "e1000-82542", "Intel EtherExpressPro1000"), ++PCI_ROM(0x8086, 0x1001, "e1000-82543gc-fiber", "Intel EtherExpressPro1000 82543GC Fiber"), ++PCI_ROM(0x8086, 0x1004, "e1000-82543gc-copper", "Intel EtherExpressPro1000 82543GC Copper"), ++PCI_ROM(0x8086, 0x1008, "e1000-82544ei-copper", "Intel EtherExpressPro1000 82544EI Copper"), ++PCI_ROM(0x8086, 0x1009, "e1000-82544ei-fiber", "Intel EtherExpressPro1000 82544EI Fiber"), ++PCI_ROM(0x8086, 0x100C, "e1000-82544gc-copper", "Intel EtherExpressPro1000 82544GC Copper"), ++PCI_ROM(0x8086, 0x100D, "e1000-82544gc-lom", "Intel EtherExpressPro1000 82544GC LOM"), ++PCI_ROM(0x8086, 0x100E, "e1000-82540em", "Intel EtherExpressPro1000 82540EM"), ++PCI_ROM(0x8086, 0x100F, "e1000-82545em-copper", "Intel EtherExpressPro1000 82545EM Copper"), ++PCI_ROM(0x8086, 0x1010, "e1000-82546eb-copper", "Intel EtherExpressPro1000 82546EB Copper"), ++PCI_ROM(0x8086, 0x1011, "e1000-82545em-fiber", "Intel EtherExpressPro1000 82545EM Fiber"), ++PCI_ROM(0x8086, 0x1012, "e1000-82546eb-fiber", "Intel EtherExpressPro1000 82546EB Copper"), ++PCI_ROM(0x8086, 0x1013, "e1000-82541ei", "Intel EtherExpressPro1000 82541EI"), ++PCI_ROM(0x8086, 0x1015, "e1000-82540em-lom", "Intel EtherExpressPro1000 82540EM LOM"), ++PCI_ROM(0x8086, 0x1016, "e1000-82540ep-lom", "Intel EtherExpressPro1000 82540EP LOM"), ++PCI_ROM(0x8086, 0x1017, "e1000-82540ep", "Intel EtherExpressPro1000 82540EP"), ++PCI_ROM(0x8086, 0x1018, "e1000-82541ep", "Intel EtherExpressPro1000 82541EP"), ++PCI_ROM(0x8086, 0x1019, "e1000-82547ei", "Intel EtherExpressPro1000 82547EI"), ++PCI_ROM(0x8086, 0x101d, "e1000-82546eb-quad-copper", "Intel EtherExpressPro1000 82546EB Quad Copper"), ++PCI_ROM(0x8086, 0x101e, "e1000-82540ep-lp", "Intel EtherExpressPro1000 82540EP LP"), ++PCI_ROM(0x8086, 0x1026, "e1000-82545gm-copper", "Intel EtherExpressPro1000 82545GM Copper"), ++PCI_ROM(0x8086, 0x1027, "e1000-82545gm-fiber", "Intel EtherExpressPro1000 82545GM Fiber"), ++PCI_ROM(0x8086, 0x1028, "e1000-82545gm-serdes", "Intel EtherExpressPro1000 82545GM SERDES"), ++PCI_ROM(0x8086, 0x1075, "e1000-82547gi", "Intel EtherExpressPro1000 82547GI"), ++PCI_ROM(0x8086, 0x1076, "e1000-82541gi", "Intel EtherExpressPro1000 82541GI"), ++PCI_ROM(0x8086, 0x1077, "e1000-82541gi-mobile", "Intel EtherExpressPro1000 82541GI Mobile"), ++PCI_ROM(0x8086, 0x1078, "e1000-82541er", "Intel EtherExpressPro1000 82541ER"), ++PCI_ROM(0x8086, 0x1079, "e1000-82546gb-copper", "Intel EtherExpressPro1000 82546GB Copper"), ++PCI_ROM(0x8086, 0x107a, "e1000-82546gb-fiber", "Intel EtherExpressPro1000 82546GB Fiber"), ++PCI_ROM(0x8086, 0x107b, "e1000-82546gb-serdes", "Intel EtherExpressPro1000 82546GB SERDES"), ++}; ++ ++struct pci_driver e1000_driver = { ++ .type = NIC_DRIVER, ++ .name = "E1000", ++ .probe = e1000_probe, ++ .ids = e1000_nics, ++ .id_count = sizeof(e1000_nics)/sizeof(e1000_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/e1000_hw.h +=================================================================== +--- /dev/null ++++ b/netboot/e1000_hw.h +@@ -0,0 +1,2058 @@ ++/******************************************************************************* ++ ++ ++ Copyright(c) 1999 - 2003 Intel Corporation. All rights reserved. ++ ++ 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. ++ ++ The full GNU General Public License is included in this distribution in the ++ file called LICENSE. ++ ++ Contact Information: ++ Linux NICS ++ Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497 ++ ++*******************************************************************************/ ++ ++/* e1000_hw.h ++ * Structures, enums, and macros for the MAC ++ */ ++ ++#ifndef _E1000_HW_H_ ++#define _E1000_HW_H_ ++ ++/* Forward declarations of structures used by the shared code */ ++struct e1000_hw; ++struct e1000_hw_stats; ++ ++/* Enumerated types specific to the e1000 hardware */ ++/* Media Access Controlers */ ++typedef enum { ++ e1000_undefined = 0, ++ e1000_82542_rev2_0, ++ e1000_82542_rev2_1, ++ e1000_82543, ++ e1000_82544, ++ e1000_82540, ++ e1000_82545, ++ e1000_82545_rev_3, ++ e1000_82546, ++ e1000_82546_rev_3, ++ e1000_82541, ++ e1000_82541_rev_2, ++ e1000_82547, ++ e1000_82547_rev_2, ++ e1000_num_macs ++} e1000_mac_type; ++ ++typedef enum { ++ e1000_eeprom_uninitialized = 0, ++ e1000_eeprom_spi, ++ e1000_eeprom_microwire, ++ e1000_num_eeprom_types ++} e1000_eeprom_type; ++ ++/* Media Types */ ++typedef enum { ++ e1000_media_type_copper = 0, ++ e1000_media_type_fiber = 1, ++ e1000_media_type_internal_serdes = 2, ++ e1000_num_media_types ++} e1000_media_type; ++ ++typedef enum { ++ e1000_10_half = 0, ++ e1000_10_full = 1, ++ e1000_100_half = 2, ++ e1000_100_full = 3 ++} e1000_speed_duplex_type; ++ ++/* Flow Control Settings */ ++typedef enum { ++ e1000_fc_none = 0, ++ e1000_fc_rx_pause = 1, ++ e1000_fc_tx_pause = 2, ++ e1000_fc_full = 3, ++ e1000_fc_default = 0xFF ++} e1000_fc_type; ++ ++/* PCI bus types */ ++typedef enum { ++ e1000_bus_type_unknown = 0, ++ e1000_bus_type_pci, ++ e1000_bus_type_pcix, ++ e1000_bus_type_reserved ++} e1000_bus_type; ++ ++/* PCI bus speeds */ ++typedef enum { ++ e1000_bus_speed_unknown = 0, ++ e1000_bus_speed_33, ++ e1000_bus_speed_66, ++ e1000_bus_speed_100, ++ e1000_bus_speed_120, ++ e1000_bus_speed_133, ++ e1000_bus_speed_reserved ++} e1000_bus_speed; ++ ++/* PCI bus widths */ ++typedef enum { ++ e1000_bus_width_unknown = 0, ++ e1000_bus_width_32, ++ e1000_bus_width_64, ++ e1000_bus_width_reserved ++} e1000_bus_width; ++ ++/* PHY status info structure and supporting enums */ ++typedef enum { ++ e1000_cable_length_50 = 0, ++ e1000_cable_length_50_80, ++ e1000_cable_length_80_110, ++ e1000_cable_length_110_140, ++ e1000_cable_length_140, ++ e1000_cable_length_undefined = 0xFF ++} e1000_cable_length; ++ ++typedef enum { ++ e1000_igp_cable_length_10 = 10, ++ e1000_igp_cable_length_20 = 20, ++ e1000_igp_cable_length_30 = 30, ++ e1000_igp_cable_length_40 = 40, ++ e1000_igp_cable_length_50 = 50, ++ e1000_igp_cable_length_60 = 60, ++ e1000_igp_cable_length_70 = 70, ++ e1000_igp_cable_length_80 = 80, ++ e1000_igp_cable_length_90 = 90, ++ e1000_igp_cable_length_100 = 100, ++ e1000_igp_cable_length_110 = 110, ++ e1000_igp_cable_length_120 = 120, ++ e1000_igp_cable_length_130 = 130, ++ e1000_igp_cable_length_140 = 140, ++ e1000_igp_cable_length_150 = 150, ++ e1000_igp_cable_length_160 = 160, ++ e1000_igp_cable_length_170 = 170, ++ e1000_igp_cable_length_180 = 180 ++} e1000_igp_cable_length; ++ ++typedef enum { ++ e1000_10bt_ext_dist_enable_normal = 0, ++ e1000_10bt_ext_dist_enable_lower, ++ e1000_10bt_ext_dist_enable_undefined = 0xFF ++} e1000_10bt_ext_dist_enable; ++ ++typedef enum { ++ e1000_rev_polarity_normal = 0, ++ e1000_rev_polarity_reversed, ++ e1000_rev_polarity_undefined = 0xFF ++} e1000_rev_polarity; ++ ++typedef enum { ++ e1000_downshift_normal = 0, ++ e1000_downshift_activated, ++ e1000_downshift_undefined = 0xFF ++} e1000_downshift; ++ ++typedef enum { ++ e1000_polarity_reversal_enabled = 0, ++ e1000_polarity_reversal_disabled, ++ e1000_polarity_reversal_undefined = 0xFF ++} e1000_polarity_reversal; ++ ++typedef enum { ++ e1000_auto_x_mode_manual_mdi = 0, ++ e1000_auto_x_mode_manual_mdix, ++ e1000_auto_x_mode_auto1, ++ e1000_auto_x_mode_auto2, ++ e1000_auto_x_mode_undefined = 0xFF ++} e1000_auto_x_mode; ++ ++typedef enum { ++ e1000_1000t_rx_status_not_ok = 0, ++ e1000_1000t_rx_status_ok, ++ e1000_1000t_rx_status_undefined = 0xFF ++} e1000_1000t_rx_status; ++ ++typedef enum { ++ e1000_phy_m88 = 0, ++ e1000_phy_igp, ++ e1000_phy_undefined = 0xFF ++} e1000_phy_type; ++ ++typedef enum { ++ e1000_ms_hw_default = 0, ++ e1000_ms_force_master, ++ e1000_ms_force_slave, ++ e1000_ms_auto ++} e1000_ms_type; ++ ++typedef enum { ++ e1000_ffe_config_enabled = 0, ++ e1000_ffe_config_active, ++ e1000_ffe_config_blocked ++} e1000_ffe_config; ++ ++typedef enum { ++ e1000_dsp_config_disabled = 0, ++ e1000_dsp_config_enabled, ++ e1000_dsp_config_activated, ++ e1000_dsp_config_undefined = 0xFF ++} e1000_dsp_config; ++ ++struct e1000_phy_info { ++ e1000_cable_length cable_length; ++ e1000_10bt_ext_dist_enable extended_10bt_distance; ++ e1000_rev_polarity cable_polarity; ++ e1000_downshift downshift; ++ e1000_polarity_reversal polarity_correction; ++ e1000_auto_x_mode mdix_mode; ++ e1000_1000t_rx_status local_rx; ++ e1000_1000t_rx_status remote_rx; ++}; ++ ++struct e1000_phy_stats { ++ uint32_t idle_errors; ++ uint32_t receive_errors; ++}; ++ ++struct e1000_eeprom_info { ++ e1000_eeprom_type type; ++ uint16_t word_size; ++ uint16_t opcode_bits; ++ uint16_t address_bits; ++ uint16_t delay_usec; ++ uint16_t page_size; ++}; ++ ++ ++ ++/* Error Codes */ ++#define E1000_SUCCESS 0 ++#define E1000_ERR_EEPROM 1 ++#define E1000_ERR_PHY 2 ++#define E1000_ERR_CONFIG 3 ++#define E1000_ERR_PARAM 4 ++#define E1000_ERR_MAC_TYPE 5 ++#define E1000_ERR_PHY_TYPE 6 ++#define E1000_ERR_NOLINK 7 ++#define E1000_ERR_TIMEOUT 8 ++ ++#define E1000_READ_REG_IO(a, reg) \ ++ e1000_read_reg_io((a), E1000_##reg) ++#define E1000_WRITE_REG_IO(a, reg, val) \ ++ e1000_write_reg_io((a), E1000_##reg, val) ++ ++/* PCI Device IDs */ ++#define E1000_DEV_ID_82542 0x1000 ++#define E1000_DEV_ID_82543GC_FIBER 0x1001 ++#define E1000_DEV_ID_82543GC_COPPER 0x1004 ++#define E1000_DEV_ID_82544EI_COPPER 0x1008 ++#define E1000_DEV_ID_82544EI_FIBER 0x1009 ++#define E1000_DEV_ID_82544GC_COPPER 0x100C ++#define E1000_DEV_ID_82544GC_LOM 0x100D ++#define E1000_DEV_ID_82540EM 0x100E ++#define E1000_DEV_ID_82540EM_LOM 0x1015 ++#define E1000_DEV_ID_82540EP_LOM 0x1016 ++#define E1000_DEV_ID_82540EP 0x1017 ++#define E1000_DEV_ID_82540EP_LP 0x101E ++#define E1000_DEV_ID_82545EM_COPPER 0x100F ++#define E1000_DEV_ID_82545EM_FIBER 0x1011 ++#define E1000_DEV_ID_82545GM_COPPER 0x1026 ++#define E1000_DEV_ID_82545GM_FIBER 0x1027 ++#define E1000_DEV_ID_82545GM_SERDES 0x1028 ++#define E1000_DEV_ID_82546EB_COPPER 0x1010 ++#define E1000_DEV_ID_82546EB_FIBER 0x1012 ++#define E1000_DEV_ID_82546EB_QUAD_COPPER 0x101D ++#define E1000_DEV_ID_82541EI 0x1013 ++#define E1000_DEV_ID_82541EI_MOBILE 0x1018 ++#define E1000_DEV_ID_82541ER 0x1078 ++#define E1000_DEV_ID_82547GI 0x1075 ++#define E1000_DEV_ID_82541GI 0x1076 ++#define E1000_DEV_ID_82541GI_MOBILE 0x1077 ++#define E1000_DEV_ID_82546GB_COPPER 0x1079 ++#define E1000_DEV_ID_82546GB_FIBER 0x107A ++#define E1000_DEV_ID_82546GB_SERDES 0x107B ++#define E1000_DEV_ID_82547EI 0x1019 ++ ++#define NODE_ADDRESS_SIZE 6 ++#define ETH_LENGTH_OF_ADDRESS 6 ++ ++/* MAC decode size is 128K - This is the size of BAR0 */ ++#define MAC_DECODE_SIZE (128 * 1024) ++ ++#define E1000_82542_2_0_REV_ID 2 ++#define E1000_82542_2_1_REV_ID 3 ++ ++#define SPEED_10 10 ++#define SPEED_100 100 ++#define SPEED_1000 1000 ++#define HALF_DUPLEX 1 ++#define FULL_DUPLEX 2 ++ ++/* The sizes (in bytes) of a ethernet packet */ ++#define ENET_HEADER_SIZE 14 ++#define MAXIMUM_ETHERNET_FRAME_SIZE 1518 /* With FCS */ ++#define MINIMUM_ETHERNET_FRAME_SIZE 64 /* With FCS */ ++#define ETHERNET_FCS_SIZE 4 ++#define MAXIMUM_ETHERNET_PACKET_SIZE \ ++ (MAXIMUM_ETHERNET_FRAME_SIZE - ETHERNET_FCS_SIZE) ++#define MINIMUM_ETHERNET_PACKET_SIZE \ ++ (MINIMUM_ETHERNET_FRAME_SIZE - ETHERNET_FCS_SIZE) ++#define CRC_LENGTH ETHERNET_FCS_SIZE ++#define MAX_JUMBO_FRAME_SIZE 0x3F00 ++ ++ ++/* 802.1q VLAN Packet Sizes */ ++#define VLAN_TAG_SIZE 4 /* 802.3ac tag (not DMAed) */ ++ ++/* Ethertype field values */ ++#define ETHERNET_IEEE_VLAN_TYPE 0x8100 /* 802.3ac packet */ ++#define ETHERNET_IP_TYPE 0x0800 /* IP packets */ ++#define ETHERNET_ARP_TYPE 0x0806 /* Address Resolution Protocol (ARP) */ ++ ++/* Packet Header defines */ ++#define IP_PROTOCOL_TCP 6 ++#define IP_PROTOCOL_UDP 0x11 ++ ++/* This defines the bits that are set in the Interrupt Mask ++ * Set/Read Register. Each bit is documented below: ++ * o RXDMT0 = Receive Descriptor Minimum Threshold hit (ring 0) ++ * o RXSEQ = Receive Sequence Error ++ */ ++#define POLL_IMS_ENABLE_MASK ( \ ++ E1000_IMS_RXDMT0 | \ ++ E1000_IMS_RXSEQ) ++ ++/* This defines the bits that are set in the Interrupt Mask ++ * Set/Read Register. Each bit is documented below: ++ * o RXT0 = Receiver Timer Interrupt (ring 0) ++ * o TXDW = Transmit Descriptor Written Back ++ * o RXDMT0 = Receive Descriptor Minimum Threshold hit (ring 0) ++ * o RXSEQ = Receive Sequence Error ++ * o LSC = Link Status Change ++ */ ++#define IMS_ENABLE_MASK ( \ ++ E1000_IMS_RXT0 | \ ++ E1000_IMS_TXDW | \ ++ E1000_IMS_RXDMT0 | \ ++ E1000_IMS_RXSEQ | \ ++ E1000_IMS_LSC) ++ ++/* Number of high/low register pairs in the RAR. The RAR (Receive Address ++ * Registers) holds the directed and multicast addresses that we monitor. We ++ * reserve one of these spots for our directed address, allowing us room for ++ * E1000_RAR_ENTRIES - 1 multicast addresses. ++ */ ++#define E1000_RAR_ENTRIES 15 ++ ++#define MIN_NUMBER_OF_DESCRIPTORS 8 ++#define MAX_NUMBER_OF_DESCRIPTORS 0xFFF8 ++ ++/* Receive Descriptor */ ++struct e1000_rx_desc { ++ uint64_t buffer_addr; /* Address of the descriptor's data buffer */ ++ uint16_t length; /* Length of data DMAed into data buffer */ ++ uint16_t csum; /* Packet checksum */ ++ uint8_t status; /* Descriptor status */ ++ uint8_t errors; /* Descriptor Errors */ ++ uint16_t special; ++}; ++ ++/* Receive Decriptor bit definitions */ ++#define E1000_RXD_STAT_DD 0x01 /* Descriptor Done */ ++#define E1000_RXD_STAT_EOP 0x02 /* End of Packet */ ++#define E1000_RXD_STAT_IXSM 0x04 /* Ignore checksum */ ++#define E1000_RXD_STAT_VP 0x08 /* IEEE VLAN Packet */ ++#define E1000_RXD_STAT_TCPCS 0x20 /* TCP xsum calculated */ ++#define E1000_RXD_STAT_IPCS 0x40 /* IP xsum calculated */ ++#define E1000_RXD_STAT_PIF 0x80 /* passed in-exact filter */ ++#define E1000_RXD_ERR_CE 0x01 /* CRC Error */ ++#define E1000_RXD_ERR_SE 0x02 /* Symbol Error */ ++#define E1000_RXD_ERR_SEQ 0x04 /* Sequence Error */ ++#define E1000_RXD_ERR_CXE 0x10 /* Carrier Extension Error */ ++#define E1000_RXD_ERR_TCPE 0x20 /* TCP/UDP Checksum Error */ ++#define E1000_RXD_ERR_IPE 0x40 /* IP Checksum Error */ ++#define E1000_RXD_ERR_RXE 0x80 /* Rx Data Error */ ++#define E1000_RXD_SPC_VLAN_MASK 0x0FFF /* VLAN ID is in lower 12 bits */ ++#define E1000_RXD_SPC_PRI_MASK 0xE000 /* Priority is in upper 3 bits */ ++#define E1000_RXD_SPC_PRI_SHIFT 0x000D /* Priority is in upper 3 of 16 */ ++#define E1000_RXD_SPC_CFI_MASK 0x1000 /* CFI is bit 12 */ ++#define E1000_RXD_SPC_CFI_SHIFT 0x000C /* CFI is bit 12 */ ++ ++/* mask to determine if packets should be dropped due to frame errors */ ++#define E1000_RXD_ERR_FRAME_ERR_MASK ( \ ++ E1000_RXD_ERR_CE | \ ++ E1000_RXD_ERR_SE | \ ++ E1000_RXD_ERR_SEQ | \ ++ E1000_RXD_ERR_CXE | \ ++ E1000_RXD_ERR_RXE) ++ ++/* Transmit Descriptor */ ++struct e1000_tx_desc { ++ uint64_t buffer_addr; /* Address of the descriptor's data buffer */ ++ union { ++ uint32_t data; ++ struct { ++ uint16_t length; /* Data buffer length */ ++ uint8_t cso; /* Checksum offset */ ++ uint8_t cmd; /* Descriptor control */ ++ } flags; ++ } lower; ++ union { ++ uint32_t data; ++ struct { ++ uint8_t status; /* Descriptor status */ ++ uint8_t css; /* Checksum start */ ++ uint16_t special; ++ } fields; ++ } upper; ++}; ++ ++/* Transmit Descriptor bit definitions */ ++#define E1000_TXD_DTYP_D 0x00100000 /* Data Descriptor */ ++#define E1000_TXD_DTYP_C 0x00000000 /* Context Descriptor */ ++#define E1000_TXD_POPTS_IXSM 0x01 /* Insert IP checksum */ ++#define E1000_TXD_POPTS_TXSM 0x02 /* Insert TCP/UDP checksum */ ++#define E1000_TXD_CMD_EOP 0x01000000 /* End of Packet */ ++#define E1000_TXD_CMD_IFCS 0x02000000 /* Insert FCS (Ethernet CRC) */ ++#define E1000_TXD_CMD_IC 0x04000000 /* Insert Checksum */ ++#define E1000_TXD_CMD_RS 0x08000000 /* Report Status */ ++#define E1000_TXD_CMD_RPS 0x10000000 /* Report Packet Sent */ ++#define E1000_TXD_CMD_DEXT 0x20000000 /* Descriptor extension (0 = legacy) */ ++#define E1000_TXD_CMD_VLE 0x40000000 /* Add VLAN tag */ ++#define E1000_TXD_CMD_IDE 0x80000000 /* Enable Tidv register */ ++#define E1000_TXD_STAT_DD 0x00000001 /* Descriptor Done */ ++#define E1000_TXD_STAT_EC 0x00000002 /* Excess Collisions */ ++#define E1000_TXD_STAT_LC 0x00000004 /* Late Collisions */ ++#define E1000_TXD_STAT_TU 0x00000008 /* Transmit underrun */ ++#define E1000_TXD_CMD_TCP 0x01000000 /* TCP packet */ ++#define E1000_TXD_CMD_IP 0x02000000 /* IP packet */ ++#define E1000_TXD_CMD_TSE 0x04000000 /* TCP Seg enable */ ++#define E1000_TXD_STAT_TC 0x00000004 /* Tx Underrun */ ++ ++/* Offload Context Descriptor */ ++struct e1000_context_desc { ++ union { ++ uint32_t ip_config; ++ struct { ++ uint8_t ipcss; /* IP checksum start */ ++ uint8_t ipcso; /* IP checksum offset */ ++ uint16_t ipcse; /* IP checksum end */ ++ } ip_fields; ++ } lower_setup; ++ union { ++ uint32_t tcp_config; ++ struct { ++ uint8_t tucss; /* TCP checksum start */ ++ uint8_t tucso; /* TCP checksum offset */ ++ uint16_t tucse; /* TCP checksum end */ ++ } tcp_fields; ++ } upper_setup; ++ uint32_t cmd_and_length; /* */ ++ union { ++ uint32_t data; ++ struct { ++ uint8_t status; /* Descriptor status */ ++ uint8_t hdr_len; /* Header length */ ++ uint16_t mss; /* Maximum segment size */ ++ } fields; ++ } tcp_seg_setup; ++}; ++ ++/* Offload data descriptor */ ++struct e1000_data_desc { ++ uint64_t buffer_addr; /* Address of the descriptor's buffer address */ ++ union { ++ uint32_t data; ++ struct { ++ uint16_t length; /* Data buffer length */ ++ uint8_t typ_len_ext; /* */ ++ uint8_t cmd; /* */ ++ } flags; ++ } lower; ++ union { ++ uint32_t data; ++ struct { ++ uint8_t status; /* Descriptor status */ ++ uint8_t popts; /* Packet Options */ ++ uint16_t special; /* */ ++ } fields; ++ } upper; ++}; ++ ++/* Filters */ ++#define E1000_NUM_UNICAST 16 /* Unicast filter entries */ ++#define E1000_MC_TBL_SIZE 128 /* Multicast Filter Table (4096 bits) */ ++#define E1000_VLAN_FILTER_TBL_SIZE 128 /* VLAN Filter Table (4096 bits) */ ++ ++ ++/* Receive Address Register */ ++struct e1000_rar { ++ volatile uint32_t low; /* receive address low */ ++ volatile uint32_t high; /* receive address high */ ++}; ++ ++/* Number of entries in the Multicast Table Array (MTA). */ ++#define E1000_NUM_MTA_REGISTERS 128 ++ ++/* IPv4 Address Table Entry */ ++struct e1000_ipv4_at_entry { ++ volatile uint32_t ipv4_addr; /* IP Address (RW) */ ++ volatile uint32_t reserved; ++}; ++ ++/* Four wakeup IP addresses are supported */ ++#define E1000_WAKEUP_IP_ADDRESS_COUNT_MAX 4 ++#define E1000_IP4AT_SIZE E1000_WAKEUP_IP_ADDRESS_COUNT_MAX ++#define E1000_IP6AT_SIZE 1 ++ ++/* IPv6 Address Table Entry */ ++struct e1000_ipv6_at_entry { ++ volatile uint8_t ipv6_addr[16]; ++}; ++ ++/* Flexible Filter Length Table Entry */ ++struct e1000_fflt_entry { ++ volatile uint32_t length; /* Flexible Filter Length (RW) */ ++ volatile uint32_t reserved; ++}; ++ ++/* Flexible Filter Mask Table Entry */ ++struct e1000_ffmt_entry { ++ volatile uint32_t mask; /* Flexible Filter Mask (RW) */ ++ volatile uint32_t reserved; ++}; ++ ++/* Flexible Filter Value Table Entry */ ++struct e1000_ffvt_entry { ++ volatile uint32_t value; /* Flexible Filter Value (RW) */ ++ volatile uint32_t reserved; ++}; ++ ++/* Four Flexible Filters are supported */ ++#define E1000_FLEXIBLE_FILTER_COUNT_MAX 4 ++ ++/* Each Flexible Filter is at most 128 (0x80) bytes in length */ ++#define E1000_FLEXIBLE_FILTER_SIZE_MAX 128 ++ ++#define E1000_FFLT_SIZE E1000_FLEXIBLE_FILTER_COUNT_MAX ++#define E1000_FFMT_SIZE E1000_FLEXIBLE_FILTER_SIZE_MAX ++#define E1000_FFVT_SIZE E1000_FLEXIBLE_FILTER_SIZE_MAX ++ ++/* Register Set. (82543, 82544) ++ * ++ * Registers are defined to be 32 bits and should be accessed as 32 bit values. ++ * These registers are physically located on the NIC, but are mapped into the ++ * host memory address space. ++ * ++ * RW - register is both readable and writable ++ * RO - register is read only ++ * WO - register is write only ++ * R/clr - register is read only and is cleared when read ++ * A - register array ++ */ ++#define E1000_CTRL 0x00000 /* Device Control - RW */ ++#define E1000_CTRL_DUP 0x00004 /* Device Control Duplicate (Shadow) - RW */ ++#define E1000_STATUS 0x00008 /* Device Status - RO */ ++#define E1000_EECD 0x00010 /* EEPROM/Flash Control - RW */ ++#define E1000_EERD 0x00014 /* EEPROM Read - RW */ ++#define E1000_CTRL_EXT 0x00018 /* Extended Device Control - RW */ ++#define E1000_FLA 0x0001C /* Flash Access - RW */ ++#define E1000_MDIC 0x00020 /* MDI Control - RW */ ++#define E1000_FCAL 0x00028 /* Flow Control Address Low - RW */ ++#define E1000_FCAH 0x0002C /* Flow Control Address High -RW */ ++#define E1000_FCT 0x00030 /* Flow Control Type - RW */ ++#define E1000_VET 0x00038 /* VLAN Ether Type - RW */ ++#define E1000_ICR 0x000C0 /* Interrupt Cause Read - R/clr */ ++#define E1000_ITR 0x000C4 /* Interrupt Throttling Rate - RW */ ++#define E1000_ICS 0x000C8 /* Interrupt Cause Set - WO */ ++#define E1000_IMS 0x000D0 /* Interrupt Mask Set - RW */ ++#define E1000_IMC 0x000D8 /* Interrupt Mask Clear - WO */ ++#define E1000_RCTL 0x00100 /* RX Control - RW */ ++#define E1000_FCTTV 0x00170 /* Flow Control Transmit Timer Value - RW */ ++#define E1000_TXCW 0x00178 /* TX Configuration Word - RW */ ++#define E1000_RXCW 0x00180 /* RX Configuration Word - RO */ ++#define E1000_TCTL 0x00400 /* TX Control - RW */ ++#define E1000_TIPG 0x00410 /* TX Inter-packet gap -RW */ ++#define E1000_TBT 0x00448 /* TX Burst Timer - RW */ ++#define E1000_AIT 0x00458 /* Adaptive Interframe Spacing Throttle - RW */ ++#define E1000_LEDCTL 0x00E00 /* LED Control - RW */ ++#define E1000_PBA 0x01000 /* Packet Buffer Allocation - RW */ ++#define E1000_FCRTL 0x02160 /* Flow Control Receive Threshold Low - RW */ ++#define E1000_FCRTH 0x02168 /* Flow Control Receive Threshold High - RW */ ++#define E1000_RDBAL 0x02800 /* RX Descriptor Base Address Low - RW */ ++#define E1000_RDBAH 0x02804 /* RX Descriptor Base Address High - RW */ ++#define E1000_RDLEN 0x02808 /* RX Descriptor Length - RW */ ++#define E1000_RDH 0x02810 /* RX Descriptor Head - RW */ ++#define E1000_RDT 0x02818 /* RX Descriptor Tail - RW */ ++#define E1000_RDTR 0x02820 /* RX Delay Timer - RW */ ++#define E1000_RXDCTL 0x02828 /* RX Descriptor Control - RW */ ++#define E1000_RADV 0x0282C /* RX Interrupt Absolute Delay Timer - RW */ ++#define E1000_RSRPD 0x02C00 /* RX Small Packet Detect - RW */ ++#define E1000_TXDMAC 0x03000 /* TX DMA Control - RW */ ++#define E1000_TDFH 0x03410 /* TX Data FIFO Head - RW */ ++#define E1000_TDFT 0x03418 /* TX Data FIFO Tail - RW */ ++#define E1000_TDFHS 0x03420 /* TX Data FIFO Head Saved - RW */ ++#define E1000_TDFTS 0x03428 /* TX Data FIFO Tail Saved - RW */ ++#define E1000_TDFPC 0x03430 /* TX Data FIFO Packet Count - RW */ ++#define E1000_TDBAL 0x03800 /* TX Descriptor Base Address Low - RW */ ++#define E1000_TDBAH 0x03804 /* TX Descriptor Base Address High - RW */ ++#define E1000_TDLEN 0x03808 /* TX Descriptor Length - RW */ ++#define E1000_TDH 0x03810 /* TX Descriptor Head - RW */ ++#define E1000_TDT 0x03818 /* TX Descripotr Tail - RW */ ++#define E1000_TIDV 0x03820 /* TX Interrupt Delay Value - RW */ ++#define E1000_TXDCTL 0x03828 /* TX Descriptor Control - RW */ ++#define E1000_TADV 0x0382C /* TX Interrupt Absolute Delay Val - RW */ ++#define E1000_TSPMT 0x03830 /* TCP Segmentation PAD & Min Threshold - RW */ ++#define E1000_CRCERRS 0x04000 /* CRC Error Count - R/clr */ ++#define E1000_ALGNERRC 0x04004 /* Alignment Error Count - R/clr */ ++#define E1000_SYMERRS 0x04008 /* Symbol Error Count - R/clr */ ++#define E1000_RXERRC 0x0400C /* Receive Error Count - R/clr */ ++#define E1000_MPC 0x04010 /* Missed Packet Count - R/clr */ ++#define E1000_SCC 0x04014 /* Single Collision Count - R/clr */ ++#define E1000_ECOL 0x04018 /* Excessive Collision Count - R/clr */ ++#define E1000_MCC 0x0401C /* Multiple Collision Count - R/clr */ ++#define E1000_LATECOL 0x04020 /* Late Collision Count - R/clr */ ++#define E1000_COLC 0x04028 /* Collision Count - R/clr */ ++#define E1000_DC 0x04030 /* Defer Count - R/clr */ ++#define E1000_TNCRS 0x04034 /* TX-No CRS - R/clr */ ++#define E1000_SEC 0x04038 /* Sequence Error Count - R/clr */ ++#define E1000_CEXTERR 0x0403C /* Carrier Extension Error Count - R/clr */ ++#define E1000_RLEC 0x04040 /* Receive Length Error Count - R/clr */ ++#define E1000_XONRXC 0x04048 /* XON RX Count - R/clr */ ++#define E1000_XONTXC 0x0404C /* XON TX Count - R/clr */ ++#define E1000_XOFFRXC 0x04050 /* XOFF RX Count - R/clr */ ++#define E1000_XOFFTXC 0x04054 /* XOFF TX Count - R/clr */ ++#define E1000_FCRUC 0x04058 /* Flow Control RX Unsupported Count- R/clr */ ++#define E1000_PRC64 0x0405C /* Packets RX (64 bytes) - R/clr */ ++#define E1000_PRC127 0x04060 /* Packets RX (65-127 bytes) - R/clr */ ++#define E1000_PRC255 0x04064 /* Packets RX (128-255 bytes) - R/clr */ ++#define E1000_PRC511 0x04068 /* Packets RX (255-511 bytes) - R/clr */ ++#define E1000_PRC1023 0x0406C /* Packets RX (512-1023 bytes) - R/clr */ ++#define E1000_PRC1522 0x04070 /* Packets RX (1024-1522 bytes) - R/clr */ ++#define E1000_GPRC 0x04074 /* Good Packets RX Count - R/clr */ ++#define E1000_BPRC 0x04078 /* Broadcast Packets RX Count - R/clr */ ++#define E1000_MPRC 0x0407C /* Multicast Packets RX Count - R/clr */ ++#define E1000_GPTC 0x04080 /* Good Packets TX Count - R/clr */ ++#define E1000_GORCL 0x04088 /* Good Octets RX Count Low - R/clr */ ++#define E1000_GORCH 0x0408C /* Good Octets RX Count High - R/clr */ ++#define E1000_GOTCL 0x04090 /* Good Octets TX Count Low - R/clr */ ++#define E1000_GOTCH 0x04094 /* Good Octets TX Count High - R/clr */ ++#define E1000_RNBC 0x040A0 /* RX No Buffers Count - R/clr */ ++#define E1000_RUC 0x040A4 /* RX Undersize Count - R/clr */ ++#define E1000_RFC 0x040A8 /* RX Fragment Count - R/clr */ ++#define E1000_ROC 0x040AC /* RX Oversize Count - R/clr */ ++#define E1000_RJC 0x040B0 /* RX Jabber Count - R/clr */ ++#define E1000_MGTPRC 0x040B4 /* Management Packets RX Count - R/clr */ ++#define E1000_MGTPDC 0x040B8 /* Management Packets Dropped Count - R/clr */ ++#define E1000_MGTPTC 0x040BC /* Management Packets TX Count - R/clr */ ++#define E1000_TORL 0x040C0 /* Total Octets RX Low - R/clr */ ++#define E1000_TORH 0x040C4 /* Total Octets RX High - R/clr */ ++#define E1000_TOTL 0x040C8 /* Total Octets TX Low - R/clr */ ++#define E1000_TOTH 0x040CC /* Total Octets TX High - R/clr */ ++#define E1000_TPR 0x040D0 /* Total Packets RX - R/clr */ ++#define E1000_TPT 0x040D4 /* Total Packets TX - R/clr */ ++#define E1000_PTC64 0x040D8 /* Packets TX (64 bytes) - R/clr */ ++#define E1000_PTC127 0x040DC /* Packets TX (65-127 bytes) - R/clr */ ++#define E1000_PTC255 0x040E0 /* Packets TX (128-255 bytes) - R/clr */ ++#define E1000_PTC511 0x040E4 /* Packets TX (256-511 bytes) - R/clr */ ++#define E1000_PTC1023 0x040E8 /* Packets TX (512-1023 bytes) - R/clr */ ++#define E1000_PTC1522 0x040EC /* Packets TX (1024-1522 Bytes) - R/clr */ ++#define E1000_MPTC 0x040F0 /* Multicast Packets TX Count - R/clr */ ++#define E1000_BPTC 0x040F4 /* Broadcast Packets TX Count - R/clr */ ++#define E1000_TSCTC 0x040F8 /* TCP Segmentation Context TX - R/clr */ ++#define E1000_TSCTFC 0x040FC /* TCP Segmentation Context TX Fail - R/clr */ ++#define E1000_RXCSUM 0x05000 /* RX Checksum Control - RW */ ++#define E1000_MTA 0x05200 /* Multicast Table Array - RW Array */ ++#define E1000_RA 0x05400 /* Receive Address - RW Array */ ++#define E1000_VFTA 0x05600 /* VLAN Filter Table Array - RW Array */ ++#define E1000_WUC 0x05800 /* Wakeup Control - RW */ ++#define E1000_WUFC 0x05808 /* Wakeup Filter Control - RW */ ++#define E1000_WUS 0x05810 /* Wakeup Status - RO */ ++#define E1000_MANC 0x05820 /* Management Control - RW */ ++#define E1000_IPAV 0x05838 /* IP Address Valid - RW */ ++#define E1000_IP4AT 0x05840 /* IPv4 Address Table - RW Array */ ++#define E1000_IP6AT 0x05880 /* IPv6 Address Table - RW Array */ ++#define E1000_WUPL 0x05900 /* Wakeup Packet Length - RW */ ++#define E1000_WUPM 0x05A00 /* Wakeup Packet Memory - RO A */ ++#define E1000_FFLT 0x05F00 /* Flexible Filter Length Table - RW Array */ ++#define E1000_FFMT 0x09000 /* Flexible Filter Mask Table - RW Array */ ++#define E1000_FFVT 0x09800 /* Flexible Filter Value Table - RW Array */ ++ ++/* Register Set (82542) ++ * ++ * Some of the 82542 registers are located at different offsets than they are ++ * in more current versions of the 8254x. Despite the difference in location, ++ * the registers function in the same manner. ++ */ ++#define E1000_82542_CTRL E1000_CTRL ++#define E1000_82542_CTRL_DUP E1000_CTRL_DUP ++#define E1000_82542_STATUS E1000_STATUS ++#define E1000_82542_EECD E1000_EECD ++#define E1000_82542_EERD E1000_EERD ++#define E1000_82542_CTRL_EXT E1000_CTRL_EXT ++#define E1000_82542_FLA E1000_FLA ++#define E1000_82542_MDIC E1000_MDIC ++#define E1000_82542_FCAL E1000_FCAL ++#define E1000_82542_FCAH E1000_FCAH ++#define E1000_82542_FCT E1000_FCT ++#define E1000_82542_VET E1000_VET ++#define E1000_82542_RA 0x00040 ++#define E1000_82542_ICR E1000_ICR ++#define E1000_82542_ITR E1000_ITR ++#define E1000_82542_ICS E1000_ICS ++#define E1000_82542_IMS E1000_IMS ++#define E1000_82542_IMC E1000_IMC ++#define E1000_82542_RCTL E1000_RCTL ++#define E1000_82542_RDTR 0x00108 ++#define E1000_82542_RDBAL 0x00110 ++#define E1000_82542_RDBAH 0x00114 ++#define E1000_82542_RDLEN 0x00118 ++#define E1000_82542_RDH 0x00120 ++#define E1000_82542_RDT 0x00128 ++#define E1000_82542_FCRTH 0x00160 ++#define E1000_82542_FCRTL 0x00168 ++#define E1000_82542_FCTTV E1000_FCTTV ++#define E1000_82542_TXCW E1000_TXCW ++#define E1000_82542_RXCW E1000_RXCW ++#define E1000_82542_MTA 0x00200 ++#define E1000_82542_TCTL E1000_TCTL ++#define E1000_82542_TIPG E1000_TIPG ++#define E1000_82542_TDBAL 0x00420 ++#define E1000_82542_TDBAH 0x00424 ++#define E1000_82542_TDLEN 0x00428 ++#define E1000_82542_TDH 0x00430 ++#define E1000_82542_TDT 0x00438 ++#define E1000_82542_TIDV 0x00440 ++#define E1000_82542_TBT E1000_TBT ++#define E1000_82542_AIT E1000_AIT ++#define E1000_82542_VFTA 0x00600 ++#define E1000_82542_LEDCTL E1000_LEDCTL ++#define E1000_82542_PBA E1000_PBA ++#define E1000_82542_RXDCTL E1000_RXDCTL ++#define E1000_82542_RADV E1000_RADV ++#define E1000_82542_RSRPD E1000_RSRPD ++#define E1000_82542_TXDMAC E1000_TXDMAC ++#define E1000_82542_TDFHS E1000_TDFHS ++#define E1000_82542_TDFTS E1000_TDFTS ++#define E1000_82542_TDFPC E1000_TDFPC ++#define E1000_82542_TXDCTL E1000_TXDCTL ++#define E1000_82542_TADV E1000_TADV ++#define E1000_82542_TSPMT E1000_TSPMT ++#define E1000_82542_CRCERRS E1000_CRCERRS ++#define E1000_82542_ALGNERRC E1000_ALGNERRC ++#define E1000_82542_SYMERRS E1000_SYMERRS ++#define E1000_82542_RXERRC E1000_RXERRC ++#define E1000_82542_MPC E1000_MPC ++#define E1000_82542_SCC E1000_SCC ++#define E1000_82542_ECOL E1000_ECOL ++#define E1000_82542_MCC E1000_MCC ++#define E1000_82542_LATECOL E1000_LATECOL ++#define E1000_82542_COLC E1000_COLC ++#define E1000_82542_DC E1000_DC ++#define E1000_82542_TNCRS E1000_TNCRS ++#define E1000_82542_SEC E1000_SEC ++#define E1000_82542_CEXTERR E1000_CEXTERR ++#define E1000_82542_RLEC E1000_RLEC ++#define E1000_82542_XONRXC E1000_XONRXC ++#define E1000_82542_XONTXC E1000_XONTXC ++#define E1000_82542_XOFFRXC E1000_XOFFRXC ++#define E1000_82542_XOFFTXC E1000_XOFFTXC ++#define E1000_82542_FCRUC E1000_FCRUC ++#define E1000_82542_PRC64 E1000_PRC64 ++#define E1000_82542_PRC127 E1000_PRC127 ++#define E1000_82542_PRC255 E1000_PRC255 ++#define E1000_82542_PRC511 E1000_PRC511 ++#define E1000_82542_PRC1023 E1000_PRC1023 ++#define E1000_82542_PRC1522 E1000_PRC1522 ++#define E1000_82542_GPRC E1000_GPRC ++#define E1000_82542_BPRC E1000_BPRC ++#define E1000_82542_MPRC E1000_MPRC ++#define E1000_82542_GPTC E1000_GPTC ++#define E1000_82542_GORCL E1000_GORCL ++#define E1000_82542_GORCH E1000_GORCH ++#define E1000_82542_GOTCL E1000_GOTCL ++#define E1000_82542_GOTCH E1000_GOTCH ++#define E1000_82542_RNBC E1000_RNBC ++#define E1000_82542_RUC E1000_RUC ++#define E1000_82542_RFC E1000_RFC ++#define E1000_82542_ROC E1000_ROC ++#define E1000_82542_RJC E1000_RJC ++#define E1000_82542_MGTPRC E1000_MGTPRC ++#define E1000_82542_MGTPDC E1000_MGTPDC ++#define E1000_82542_MGTPTC E1000_MGTPTC ++#define E1000_82542_TORL E1000_TORL ++#define E1000_82542_TORH E1000_TORH ++#define E1000_82542_TOTL E1000_TOTL ++#define E1000_82542_TOTH E1000_TOTH ++#define E1000_82542_TPR E1000_TPR ++#define E1000_82542_TPT E1000_TPT ++#define E1000_82542_PTC64 E1000_PTC64 ++#define E1000_82542_PTC127 E1000_PTC127 ++#define E1000_82542_PTC255 E1000_PTC255 ++#define E1000_82542_PTC511 E1000_PTC511 ++#define E1000_82542_PTC1023 E1000_PTC1023 ++#define E1000_82542_PTC1522 E1000_PTC1522 ++#define E1000_82542_MPTC E1000_MPTC ++#define E1000_82542_BPTC E1000_BPTC ++#define E1000_82542_TSCTC E1000_TSCTC ++#define E1000_82542_TSCTFC E1000_TSCTFC ++#define E1000_82542_RXCSUM E1000_RXCSUM ++#define E1000_82542_WUC E1000_WUC ++#define E1000_82542_WUFC E1000_WUFC ++#define E1000_82542_WUS E1000_WUS ++#define E1000_82542_MANC E1000_MANC ++#define E1000_82542_IPAV E1000_IPAV ++#define E1000_82542_IP4AT E1000_IP4AT ++#define E1000_82542_IP6AT E1000_IP6AT ++#define E1000_82542_WUPL E1000_WUPL ++#define E1000_82542_WUPM E1000_WUPM ++#define E1000_82542_FFLT E1000_FFLT ++#define E1000_82542_TDFH 0x08010 ++#define E1000_82542_TDFT 0x08018 ++#define E1000_82542_FFMT E1000_FFMT ++#define E1000_82542_FFVT E1000_FFVT ++ ++/* Statistics counters collected by the MAC */ ++struct e1000_hw_stats { ++ uint64_t crcerrs; ++ uint64_t algnerrc; ++ uint64_t symerrs; ++ uint64_t rxerrc; ++ uint64_t mpc; ++ uint64_t scc; ++ uint64_t ecol; ++ uint64_t mcc; ++ uint64_t latecol; ++ uint64_t colc; ++ uint64_t dc; ++ uint64_t tncrs; ++ uint64_t sec; ++ uint64_t cexterr; ++ uint64_t rlec; ++ uint64_t xonrxc; ++ uint64_t xontxc; ++ uint64_t xoffrxc; ++ uint64_t xofftxc; ++ uint64_t fcruc; ++ uint64_t prc64; ++ uint64_t prc127; ++ uint64_t prc255; ++ uint64_t prc511; ++ uint64_t prc1023; ++ uint64_t prc1522; ++ uint64_t gprc; ++ uint64_t bprc; ++ uint64_t mprc; ++ uint64_t gptc; ++ uint64_t gorcl; ++ uint64_t gorch; ++ uint64_t gotcl; ++ uint64_t gotch; ++ uint64_t rnbc; ++ uint64_t ruc; ++ uint64_t rfc; ++ uint64_t roc; ++ uint64_t rjc; ++ uint64_t mgprc; ++ uint64_t mgpdc; ++ uint64_t mgptc; ++ uint64_t torl; ++ uint64_t torh; ++ uint64_t totl; ++ uint64_t toth; ++ uint64_t tpr; ++ uint64_t tpt; ++ uint64_t ptc64; ++ uint64_t ptc127; ++ uint64_t ptc255; ++ uint64_t ptc511; ++ uint64_t ptc1023; ++ uint64_t ptc1522; ++ uint64_t mptc; ++ uint64_t bptc; ++ uint64_t tsctc; ++ uint64_t tsctfc; ++}; ++ ++/* Structure containing variables used by the shared code (e1000_hw.c) */ ++struct e1000_hw { ++ struct pci_device *pdev; ++ uint8_t *hw_addr; ++ e1000_mac_type mac_type; ++ e1000_phy_type phy_type; ++#if 0 ++ uint32_t phy_init_script; ++#endif ++ e1000_media_type media_type; ++ e1000_fc_type fc; ++#if 0 ++ e1000_bus_speed bus_speed; ++ e1000_bus_width bus_width; ++ e1000_bus_type bus_type; ++#endif ++ struct e1000_eeprom_info eeprom; ++#if 0 ++ e1000_ms_type master_slave; ++ e1000_ms_type original_master_slave; ++ e1000_ffe_config ffe_config_state; ++#endif ++ uint32_t io_base; ++ uint32_t phy_id; ++#ifdef LINUX_DRIVER ++ uint32_t phy_revision; ++#endif ++ uint32_t phy_addr; ++#if 0 ++ uint32_t original_fc; ++#endif ++ uint32_t txcw; ++ uint32_t autoneg_failed; ++#if 0 ++ uint32_t max_frame_size; ++ uint32_t min_frame_size; ++ uint32_t mc_filter_type; ++ uint32_t num_mc_addrs; ++ uint32_t collision_delta; ++ uint32_t tx_packet_delta; ++ uint32_t ledctl_default; ++ uint32_t ledctl_mode1; ++ uint32_t ledctl_mode2; ++ uint16_t phy_spd_default; ++#endif ++ uint16_t autoneg_advertised; ++ uint16_t pci_cmd_word; ++#if 0 ++ uint16_t fc_high_water; ++ uint16_t fc_low_water; ++ uint16_t fc_pause_time; ++ uint16_t current_ifs_val; ++ uint16_t ifs_min_val; ++ uint16_t ifs_max_val; ++ uint16_t ifs_step_size; ++ uint16_t ifs_ratio; ++#endif ++ uint16_t device_id; ++ uint16_t vendor_id; ++#if 0 ++ uint16_t subsystem_id; ++ uint16_t subsystem_vendor_id; ++#endif ++ uint8_t revision_id; ++#if 0 ++ uint8_t autoneg; ++ uint8_t mdix; ++ uint8_t forced_speed_duplex; ++ uint8_t wait_autoneg_complete; ++ uint8_t dma_fairness; ++#endif ++ uint8_t mac_addr[NODE_ADDRESS_SIZE]; ++#if 0 ++ uint8_t perm_mac_addr[NODE_ADDRESS_SIZE]; ++ boolean_t disable_polarity_correction; ++ boolean_t speed_downgraded; ++ e1000_dsp_config dsp_config_state; ++ boolean_t get_link_status; ++ boolean_t serdes_link_down; ++#endif ++ boolean_t tbi_compatibility_en; ++ boolean_t tbi_compatibility_on; ++#if 0 ++ boolean_t phy_reset_disable; ++ boolean_t fc_send_xon; ++ boolean_t fc_strict_ieee; ++ boolean_t report_tx_early; ++ boolean_t adaptive_ifs; ++ boolean_t ifs_params_forced; ++ boolean_t in_ifs_mode; ++#endif ++}; ++ ++ ++#define E1000_EEPROM_SWDPIN0 0x0001 /* SWDPIN 0 EEPROM Value */ ++#define E1000_EEPROM_LED_LOGIC 0x0020 /* Led Logic Word */ ++ ++/* Register Bit Masks */ ++/* Device Control */ ++#define E1000_CTRL_FD 0x00000001 /* Full duplex.0=half; 1=full */ ++#define E1000_CTRL_BEM 0x00000002 /* Endian Mode.0=little,1=big */ ++#define E1000_CTRL_PRIOR 0x00000004 /* Priority on PCI. 0=rx,1=fair */ ++#define E1000_CTRL_LRST 0x00000008 /* Link reset. 0=normal,1=reset */ ++#define E1000_CTRL_TME 0x00000010 /* Test mode. 0=normal,1=test */ ++#define E1000_CTRL_SLE 0x00000020 /* Serial Link on 0=dis,1=en */ ++#define E1000_CTRL_ASDE 0x00000020 /* Auto-speed detect enable */ ++#define E1000_CTRL_SLU 0x00000040 /* Set link up (Force Link) */ ++#define E1000_CTRL_ILOS 0x00000080 /* Invert Loss-Of Signal */ ++#define E1000_CTRL_SPD_SEL 0x00000300 /* Speed Select Mask */ ++#define E1000_CTRL_SPD_10 0x00000000 /* Force 10Mb */ ++#define E1000_CTRL_SPD_100 0x00000100 /* Force 100Mb */ ++#define E1000_CTRL_SPD_1000 0x00000200 /* Force 1Gb */ ++#define E1000_CTRL_BEM32 0x00000400 /* Big Endian 32 mode */ ++#define E1000_CTRL_FRCSPD 0x00000800 /* Force Speed */ ++#define E1000_CTRL_FRCDPX 0x00001000 /* Force Duplex */ ++#define E1000_CTRL_SWDPIN0 0x00040000 /* SWDPIN 0 value */ ++#define E1000_CTRL_SWDPIN1 0x00080000 /* SWDPIN 1 value */ ++#define E1000_CTRL_SWDPIN2 0x00100000 /* SWDPIN 2 value */ ++#define E1000_CTRL_SWDPIN3 0x00200000 /* SWDPIN 3 value */ ++#define E1000_CTRL_SWDPIO0 0x00400000 /* SWDPIN 0 Input or output */ ++#define E1000_CTRL_SWDPIO1 0x00800000 /* SWDPIN 1 input or output */ ++#define E1000_CTRL_SWDPIO2 0x01000000 /* SWDPIN 2 input or output */ ++#define E1000_CTRL_SWDPIO3 0x02000000 /* SWDPIN 3 input or output */ ++#define E1000_CTRL_RST 0x04000000 /* Global reset */ ++#define E1000_CTRL_RFCE 0x08000000 /* Receive Flow Control enable */ ++#define E1000_CTRL_TFCE 0x10000000 /* Transmit flow control enable */ ++#define E1000_CTRL_RTE 0x20000000 /* Routing tag enable */ ++#define E1000_CTRL_VME 0x40000000 /* IEEE VLAN mode enable */ ++#define E1000_CTRL_PHY_RST 0x80000000 /* PHY Reset */ ++ ++/* Device Status */ ++#define E1000_STATUS_FD 0x00000001 /* Full duplex.0=half,1=full */ ++#define E1000_STATUS_LU 0x00000002 /* Link up.0=no,1=link */ ++#define E1000_STATUS_FUNC_MASK 0x0000000C /* PCI Function Mask */ ++#define E1000_STATUS_FUNC_0 0x00000000 /* Function 0 */ ++#define E1000_STATUS_FUNC_1 0x00000004 /* Function 1 */ ++#define E1000_STATUS_TXOFF 0x00000010 /* transmission paused */ ++#define E1000_STATUS_TBIMODE 0x00000020 /* TBI mode */ ++#define E1000_STATUS_SPEED_MASK 0x000000C0 ++#define E1000_STATUS_SPEED_10 0x00000000 /* Speed 10Mb/s */ ++#define E1000_STATUS_SPEED_100 0x00000040 /* Speed 100Mb/s */ ++#define E1000_STATUS_SPEED_1000 0x00000080 /* Speed 1000Mb/s */ ++#define E1000_STATUS_ASDV 0x00000300 /* Auto speed detect value */ ++#define E1000_STATUS_MTXCKOK 0x00000400 /* MTX clock running OK */ ++#define E1000_STATUS_PCI66 0x00000800 /* In 66Mhz slot */ ++#define E1000_STATUS_BUS64 0x00001000 /* In 64 bit slot */ ++#define E1000_STATUS_PCIX_MODE 0x00002000 /* PCI-X mode */ ++#define E1000_STATUS_PCIX_SPEED 0x0000C000 /* PCI-X bus speed */ ++ ++/* Constants used to intrepret the masked PCI-X bus speed. */ ++#define E1000_STATUS_PCIX_SPEED_66 0x00000000 /* PCI-X bus speed 50-66 MHz */ ++#define E1000_STATUS_PCIX_SPEED_100 0x00004000 /* PCI-X bus speed 66-100 MHz */ ++#define E1000_STATUS_PCIX_SPEED_133 0x00008000 /* PCI-X bus speed 100-133 MHz */ ++ ++/* EEPROM/Flash Control */ ++#define E1000_EECD_SK 0x00000001 /* EEPROM Clock */ ++#define E1000_EECD_CS 0x00000002 /* EEPROM Chip Select */ ++#define E1000_EECD_DI 0x00000004 /* EEPROM Data In */ ++#define E1000_EECD_DO 0x00000008 /* EEPROM Data Out */ ++#define E1000_EECD_FWE_MASK 0x00000030 ++#define E1000_EECD_FWE_DIS 0x00000010 /* Disable FLASH writes */ ++#define E1000_EECD_FWE_EN 0x00000020 /* Enable FLASH writes */ ++#define E1000_EECD_FWE_SHIFT 4 ++#define E1000_EECD_REQ 0x00000040 /* EEPROM Access Request */ ++#define E1000_EECD_GNT 0x00000080 /* EEPROM Access Grant */ ++#define E1000_EECD_PRES 0x00000100 /* EEPROM Present */ ++#define E1000_EECD_SIZE 0x00000200 /* EEPROM Size (0=64 word 1=256 word) */ ++#define E1000_EECD_ADDR_BITS 0x00000400 /* EEPROM Addressing bits based on type ++ * (0-small, 1-large) */ ++#define E1000_EECD_TYPE 0x00002000 /* EEPROM Type (1-SPI, 0-Microwire) */ ++#ifndef E1000_EEPROM_GRANT_ATTEMPTS ++#define E1000_EEPROM_GRANT_ATTEMPTS 1000 /* EEPROM # attempts to gain grant */ ++#endif ++ ++/* EEPROM Read */ ++#define E1000_EERD_START 0x00000001 /* Start Read */ ++#define E1000_EERD_DONE 0x00000010 /* Read Done */ ++#define E1000_EERD_ADDR_SHIFT 8 ++#define E1000_EERD_ADDR_MASK 0x0000FF00 /* Read Address */ ++#define E1000_EERD_DATA_SHIFT 16 ++#define E1000_EERD_DATA_MASK 0xFFFF0000 /* Read Data */ ++ ++/* SPI EEPROM Status Register */ ++#define EEPROM_STATUS_RDY_SPI 0x01 ++#define EEPROM_STATUS_WEN_SPI 0x02 ++#define EEPROM_STATUS_BP0_SPI 0x04 ++#define EEPROM_STATUS_BP1_SPI 0x08 ++#define EEPROM_STATUS_WPEN_SPI 0x80 ++ ++/* Extended Device Control */ ++#define E1000_CTRL_EXT_GPI0_EN 0x00000001 /* Maps SDP4 to GPI0 */ ++#define E1000_CTRL_EXT_GPI1_EN 0x00000002 /* Maps SDP5 to GPI1 */ ++#define E1000_CTRL_EXT_PHYINT_EN E1000_CTRL_EXT_GPI1_EN ++#define E1000_CTRL_EXT_GPI2_EN 0x00000004 /* Maps SDP6 to GPI2 */ ++#define E1000_CTRL_EXT_GPI3_EN 0x00000008 /* Maps SDP7 to GPI3 */ ++#define E1000_CTRL_EXT_SDP4_DATA 0x00000010 /* Value of SW Defineable Pin 4 */ ++#define E1000_CTRL_EXT_SDP5_DATA 0x00000020 /* Value of SW Defineable Pin 5 */ ++#define E1000_CTRL_EXT_PHY_INT E1000_CTRL_EXT_SDP5_DATA ++#define E1000_CTRL_EXT_SDP6_DATA 0x00000040 /* Value of SW Defineable Pin 6 */ ++#define E1000_CTRL_EXT_SDP7_DATA 0x00000080 /* Value of SW Defineable Pin 7 */ ++#define E1000_CTRL_EXT_SDP4_DIR 0x00000100 /* Direction of SDP4 0=in 1=out */ ++#define E1000_CTRL_EXT_SDP5_DIR 0x00000200 /* Direction of SDP5 0=in 1=out */ ++#define E1000_CTRL_EXT_SDP6_DIR 0x00000400 /* Direction of SDP6 0=in 1=out */ ++#define E1000_CTRL_EXT_SDP7_DIR 0x00000800 /* Direction of SDP7 0=in 1=out */ ++#define E1000_CTRL_EXT_ASDCHK 0x00001000 /* Initiate an ASD sequence */ ++#define E1000_CTRL_EXT_EE_RST 0x00002000 /* Reinitialize from EEPROM */ ++#define E1000_CTRL_EXT_IPS 0x00004000 /* Invert Power State */ ++#define E1000_CTRL_EXT_SPD_BYPS 0x00008000 /* Speed Select Bypass */ ++#define E1000_CTRL_EXT_LINK_MODE_MASK 0x00C00000 ++#define E1000_CTRL_EXT_LINK_MODE_GMII 0x00000000 ++#define E1000_CTRL_EXT_LINK_MODE_TBI 0x00C00000 ++#define E1000_CTRL_EXT_WR_WMARK_MASK 0x03000000 ++#define E1000_CTRL_EXT_WR_WMARK_256 0x00000000 ++#define E1000_CTRL_EXT_WR_WMARK_320 0x01000000 ++#define E1000_CTRL_EXT_WR_WMARK_384 0x02000000 ++#define E1000_CTRL_EXT_WR_WMARK_448 0x03000000 ++ ++/* MDI Control */ ++#define E1000_MDIC_DATA_MASK 0x0000FFFF ++#define E1000_MDIC_REG_MASK 0x001F0000 ++#define E1000_MDIC_REG_SHIFT 16 ++#define E1000_MDIC_PHY_MASK 0x03E00000 ++#define E1000_MDIC_PHY_SHIFT 21 ++#define E1000_MDIC_OP_WRITE 0x04000000 ++#define E1000_MDIC_OP_READ 0x08000000 ++#define E1000_MDIC_READY 0x10000000 ++#define E1000_MDIC_INT_EN 0x20000000 ++#define E1000_MDIC_ERROR 0x40000000 ++ ++/* LED Control */ ++#define E1000_LEDCTL_LED0_MODE_MASK 0x0000000F ++#define E1000_LEDCTL_LED0_MODE_SHIFT 0 ++#define E1000_LEDCTL_LED0_IVRT 0x00000040 ++#define E1000_LEDCTL_LED0_BLINK 0x00000080 ++#define E1000_LEDCTL_LED1_MODE_MASK 0x00000F00 ++#define E1000_LEDCTL_LED1_MODE_SHIFT 8 ++#define E1000_LEDCTL_LED1_IVRT 0x00004000 ++#define E1000_LEDCTL_LED1_BLINK 0x00008000 ++#define E1000_LEDCTL_LED2_MODE_MASK 0x000F0000 ++#define E1000_LEDCTL_LED2_MODE_SHIFT 16 ++#define E1000_LEDCTL_LED2_IVRT 0x00400000 ++#define E1000_LEDCTL_LED2_BLINK 0x00800000 ++#define E1000_LEDCTL_LED3_MODE_MASK 0x0F000000 ++#define E1000_LEDCTL_LED3_MODE_SHIFT 24 ++#define E1000_LEDCTL_LED3_IVRT 0x40000000 ++#define E1000_LEDCTL_LED3_BLINK 0x80000000 ++ ++#define E1000_LEDCTL_MODE_LINK_10_1000 0x0 ++#define E1000_LEDCTL_MODE_LINK_100_1000 0x1 ++#define E1000_LEDCTL_MODE_LINK_UP 0x2 ++#define E1000_LEDCTL_MODE_ACTIVITY 0x3 ++#define E1000_LEDCTL_MODE_LINK_ACTIVITY 0x4 ++#define E1000_LEDCTL_MODE_LINK_10 0x5 ++#define E1000_LEDCTL_MODE_LINK_100 0x6 ++#define E1000_LEDCTL_MODE_LINK_1000 0x7 ++#define E1000_LEDCTL_MODE_PCIX_MODE 0x8 ++#define E1000_LEDCTL_MODE_FULL_DUPLEX 0x9 ++#define E1000_LEDCTL_MODE_COLLISION 0xA ++#define E1000_LEDCTL_MODE_BUS_SPEED 0xB ++#define E1000_LEDCTL_MODE_BUS_SIZE 0xC ++#define E1000_LEDCTL_MODE_PAUSED 0xD ++#define E1000_LEDCTL_MODE_LED_ON 0xE ++#define E1000_LEDCTL_MODE_LED_OFF 0xF ++ ++/* Receive Address */ ++#define E1000_RAH_AV 0x80000000 /* Receive descriptor valid */ ++ ++/* Interrupt Cause Read */ ++#define E1000_ICR_TXDW 0x00000001 /* Transmit desc written back */ ++#define E1000_ICR_TXQE 0x00000002 /* Transmit Queue empty */ ++#define E1000_ICR_LSC 0x00000004 /* Link Status Change */ ++#define E1000_ICR_RXSEQ 0x00000008 /* rx sequence error */ ++#define E1000_ICR_RXDMT0 0x00000010 /* rx desc min. threshold (0) */ ++#define E1000_ICR_RXO 0x00000040 /* rx overrun */ ++#define E1000_ICR_RXT0 0x00000080 /* rx timer intr (ring 0) */ ++#define E1000_ICR_MDAC 0x00000200 /* MDIO access complete */ ++#define E1000_ICR_RXCFG 0x00000400 /* RX /c/ ordered set */ ++#define E1000_ICR_GPI_EN0 0x00000800 /* GP Int 0 */ ++#define E1000_ICR_GPI_EN1 0x00001000 /* GP Int 1 */ ++#define E1000_ICR_GPI_EN2 0x00002000 /* GP Int 2 */ ++#define E1000_ICR_GPI_EN3 0x00004000 /* GP Int 3 */ ++#define E1000_ICR_TXD_LOW 0x00008000 ++#define E1000_ICR_SRPD 0x00010000 ++ ++/* Interrupt Cause Set */ ++#define E1000_ICS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ ++#define E1000_ICS_TXQE E1000_ICR_TXQE /* Transmit Queue empty */ ++#define E1000_ICS_LSC E1000_ICR_LSC /* Link Status Change */ ++#define E1000_ICS_RXSEQ E1000_ICR_RXSEQ /* rx sequence error */ ++#define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ ++#define E1000_ICS_RXO E1000_ICR_RXO /* rx overrun */ ++#define E1000_ICS_RXT0 E1000_ICR_RXT0 /* rx timer intr */ ++#define E1000_ICS_MDAC E1000_ICR_MDAC /* MDIO access complete */ ++#define E1000_ICS_RXCFG E1000_ICR_RXCFG /* RX /c/ ordered set */ ++#define E1000_ICS_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */ ++#define E1000_ICS_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */ ++#define E1000_ICS_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */ ++#define E1000_ICS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ ++#define E1000_ICS_TXD_LOW E1000_ICR_TXD_LOW ++#define E1000_ICS_SRPD E1000_ICR_SRPD ++ ++/* Interrupt Mask Set */ ++#define E1000_IMS_TXDW E1000_ICR_TXDW /* Transmit desc written back */ ++#define E1000_IMS_TXQE E1000_ICR_TXQE /* Transmit Queue empty */ ++#define E1000_IMS_LSC E1000_ICR_LSC /* Link Status Change */ ++#define E1000_IMS_RXSEQ E1000_ICR_RXSEQ /* rx sequence error */ ++#define E1000_IMS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ ++#define E1000_IMS_RXO E1000_ICR_RXO /* rx overrun */ ++#define E1000_IMS_RXT0 E1000_ICR_RXT0 /* rx timer intr */ ++#define E1000_IMS_MDAC E1000_ICR_MDAC /* MDIO access complete */ ++#define E1000_IMS_RXCFG E1000_ICR_RXCFG /* RX /c/ ordered set */ ++#define E1000_IMS_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */ ++#define E1000_IMS_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */ ++#define E1000_IMS_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */ ++#define E1000_IMS_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ ++#define E1000_IMS_TXD_LOW E1000_ICR_TXD_LOW ++#define E1000_IMS_SRPD E1000_ICR_SRPD ++ ++/* Interrupt Mask Clear */ ++#define E1000_IMC_TXDW E1000_ICR_TXDW /* Transmit desc written back */ ++#define E1000_IMC_TXQE E1000_ICR_TXQE /* Transmit Queue empty */ ++#define E1000_IMC_LSC E1000_ICR_LSC /* Link Status Change */ ++#define E1000_IMC_RXSEQ E1000_ICR_RXSEQ /* rx sequence error */ ++#define E1000_IMC_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ ++#define E1000_IMC_RXO E1000_ICR_RXO /* rx overrun */ ++#define E1000_IMC_RXT0 E1000_ICR_RXT0 /* rx timer intr */ ++#define E1000_IMC_MDAC E1000_ICR_MDAC /* MDIO access complete */ ++#define E1000_IMC_RXCFG E1000_ICR_RXCFG /* RX /c/ ordered set */ ++#define E1000_IMC_GPI_EN0 E1000_ICR_GPI_EN0 /* GP Int 0 */ ++#define E1000_IMC_GPI_EN1 E1000_ICR_GPI_EN1 /* GP Int 1 */ ++#define E1000_IMC_GPI_EN2 E1000_ICR_GPI_EN2 /* GP Int 2 */ ++#define E1000_IMC_GPI_EN3 E1000_ICR_GPI_EN3 /* GP Int 3 */ ++#define E1000_IMC_TXD_LOW E1000_ICR_TXD_LOW ++#define E1000_IMC_SRPD E1000_ICR_SRPD ++ ++/* Receive Control */ ++#define E1000_RCTL_RST 0x00000001 /* Software reset */ ++#define E1000_RCTL_EN 0x00000002 /* enable */ ++#define E1000_RCTL_SBP 0x00000004 /* store bad packet */ ++#define E1000_RCTL_UPE 0x00000008 /* unicast promiscuous enable */ ++#define E1000_RCTL_MPE 0x00000010 /* multicast promiscuous enab */ ++#define E1000_RCTL_LPE 0x00000020 /* long packet enable */ ++#define E1000_RCTL_LBM_NO 0x00000000 /* no loopback mode */ ++#define E1000_RCTL_LBM_MAC 0x00000040 /* MAC loopback mode */ ++#define E1000_RCTL_LBM_SLP 0x00000080 /* serial link loopback mode */ ++#define E1000_RCTL_LBM_TCVR 0x000000C0 /* tcvr loopback mode */ ++#define E1000_RCTL_RDMTS_HALF 0x00000000 /* rx desc min threshold size */ ++#define E1000_RCTL_RDMTS_QUAT 0x00000100 /* rx desc min threshold size */ ++#define E1000_RCTL_RDMTS_EIGTH 0x00000200 /* rx desc min threshold size */ ++#define E1000_RCTL_MO_SHIFT 12 /* multicast offset shift */ ++#define E1000_RCTL_MO_0 0x00000000 /* multicast offset 11:0 */ ++#define E1000_RCTL_MO_1 0x00001000 /* multicast offset 12:1 */ ++#define E1000_RCTL_MO_2 0x00002000 /* multicast offset 13:2 */ ++#define E1000_RCTL_MO_3 0x00003000 /* multicast offset 15:4 */ ++#define E1000_RCTL_MDR 0x00004000 /* multicast desc ring 0 */ ++#define E1000_RCTL_BAM 0x00008000 /* broadcast enable */ ++/* these buffer sizes are valid if E1000_RCTL_BSEX is 0 */ ++#define E1000_RCTL_SZ_2048 0x00000000 /* rx buffer size 2048 */ ++#define E1000_RCTL_SZ_1024 0x00010000 /* rx buffer size 1024 */ ++#define E1000_RCTL_SZ_512 0x00020000 /* rx buffer size 512 */ ++#define E1000_RCTL_SZ_256 0x00030000 /* rx buffer size 256 */ ++/* these buffer sizes are valid if E1000_RCTL_BSEX is 1 */ ++#define E1000_RCTL_SZ_16384 0x00010000 /* rx buffer size 16384 */ ++#define E1000_RCTL_SZ_8192 0x00020000 /* rx buffer size 8192 */ ++#define E1000_RCTL_SZ_4096 0x00030000 /* rx buffer size 4096 */ ++#define E1000_RCTL_VFE 0x00040000 /* vlan filter enable */ ++#define E1000_RCTL_CFIEN 0x00080000 /* canonical form enable */ ++#define E1000_RCTL_CFI 0x00100000 /* canonical form indicator */ ++#define E1000_RCTL_DPF 0x00400000 /* discard pause frames */ ++#define E1000_RCTL_PMCF 0x00800000 /* pass MAC control frames */ ++#define E1000_RCTL_BSEX 0x02000000 /* Buffer size extension */ ++ ++/* Receive Descriptor */ ++#define E1000_RDT_DELAY 0x0000ffff /* Delay timer (1=1024us) */ ++#define E1000_RDT_FPDB 0x80000000 /* Flush descriptor block */ ++#define E1000_RDLEN_LEN 0x0007ff80 /* descriptor length */ ++#define E1000_RDH_RDH 0x0000ffff /* receive descriptor head */ ++#define E1000_RDT_RDT 0x0000ffff /* receive descriptor tail */ ++ ++/* Flow Control */ ++#define E1000_FCRTH_RTH 0x0000FFF8 /* Mask Bits[15:3] for RTH */ ++#define E1000_FCRTH_XFCE 0x80000000 /* External Flow Control Enable */ ++#define E1000_FCRTL_RTL 0x0000FFF8 /* Mask Bits[15:3] for RTL */ ++#define E1000_FCRTL_XONE 0x80000000 /* Enable XON frame transmission */ ++ ++/* Receive Descriptor Control */ ++#define E1000_RXDCTL_PTHRESH 0x0000003F /* RXDCTL Prefetch Threshold */ ++#define E1000_RXDCTL_HTHRESH 0x00003F00 /* RXDCTL Host Threshold */ ++#define E1000_RXDCTL_WTHRESH 0x003F0000 /* RXDCTL Writeback Threshold */ ++#define E1000_RXDCTL_GRAN 0x01000000 /* RXDCTL Granularity */ ++ ++/* Transmit Descriptor Control */ ++#define E1000_TXDCTL_PTHRESH 0x000000FF /* TXDCTL Prefetch Threshold */ ++#define E1000_TXDCTL_HTHRESH 0x0000FF00 /* TXDCTL Host Threshold */ ++#define E1000_TXDCTL_WTHRESH 0x00FF0000 /* TXDCTL Writeback Threshold */ ++#define E1000_TXDCTL_GRAN 0x01000000 /* TXDCTL Granularity */ ++#define E1000_TXDCTL_LWTHRESH 0xFE000000 /* TXDCTL Low Threshold */ ++#define E1000_TXDCTL_FULL_TX_DESC_WB 0x01010000 /* GRAN=1, WTHRESH=1 */ ++ ++/* Transmit Configuration Word */ ++#define E1000_TXCW_FD 0x00000020 /* TXCW full duplex */ ++#define E1000_TXCW_HD 0x00000040 /* TXCW half duplex */ ++#define E1000_TXCW_PAUSE 0x00000080 /* TXCW sym pause request */ ++#define E1000_TXCW_ASM_DIR 0x00000100 /* TXCW astm pause direction */ ++#define E1000_TXCW_PAUSE_MASK 0x00000180 /* TXCW pause request mask */ ++#define E1000_TXCW_RF 0x00003000 /* TXCW remote fault */ ++#define E1000_TXCW_NP 0x00008000 /* TXCW next page */ ++#define E1000_TXCW_CW 0x0000ffff /* TxConfigWord mask */ ++#define E1000_TXCW_TXC 0x40000000 /* Transmit Config control */ ++#define E1000_TXCW_ANE 0x80000000 /* Auto-neg enable */ ++ ++/* Receive Configuration Word */ ++#define E1000_RXCW_CW 0x0000ffff /* RxConfigWord mask */ ++#define E1000_RXCW_NC 0x04000000 /* Receive config no carrier */ ++#define E1000_RXCW_IV 0x08000000 /* Receive config invalid */ ++#define E1000_RXCW_CC 0x10000000 /* Receive config change */ ++#define E1000_RXCW_C 0x20000000 /* Receive config */ ++#define E1000_RXCW_SYNCH 0x40000000 /* Receive config synch */ ++#define E1000_RXCW_ANC 0x80000000 /* Auto-neg complete */ ++ ++/* Transmit Control */ ++#define E1000_TCTL_RST 0x00000001 /* software reset */ ++#define E1000_TCTL_EN 0x00000002 /* enable tx */ ++#define E1000_TCTL_BCE 0x00000004 /* busy check enable */ ++#define E1000_TCTL_PSP 0x00000008 /* pad short packets */ ++#define E1000_TCTL_CT 0x00000ff0 /* collision threshold */ ++#define E1000_TCTL_COLD 0x003ff000 /* collision distance */ ++#define E1000_TCTL_SWXOFF 0x00400000 /* SW Xoff transmission */ ++#define E1000_TCTL_PBE 0x00800000 /* Packet Burst Enable */ ++#define E1000_TCTL_RTLC 0x01000000 /* Re-transmit on late collision */ ++#define E1000_TCTL_NRTU 0x02000000 /* No Re-transmit on underrun */ ++ ++/* Receive Checksum Control */ ++#define E1000_RXCSUM_PCSS_MASK 0x000000FF /* Packet Checksum Start */ ++#define E1000_RXCSUM_IPOFL 0x00000100 /* IPv4 checksum offload */ ++#define E1000_RXCSUM_TUOFL 0x00000200 /* TCP / UDP checksum offload */ ++#define E1000_RXCSUM_IPV6OFL 0x00000400 /* IPv6 checksum offload */ ++ ++/* Definitions for power management and wakeup registers */ ++/* Wake Up Control */ ++#define E1000_WUC_APME 0x00000001 /* APM Enable */ ++#define E1000_WUC_PME_EN 0x00000002 /* PME Enable */ ++#define E1000_WUC_PME_STATUS 0x00000004 /* PME Status */ ++#define E1000_WUC_APMPME 0x00000008 /* Assert PME on APM Wakeup */ ++#define E1000_WUC_SPM 0x80000000 /* Enable SPM */ ++ ++/* Wake Up Filter Control */ ++#define E1000_WUFC_LNKC 0x00000001 /* Link Status Change Wakeup Enable */ ++#define E1000_WUFC_MAG 0x00000002 /* Magic Packet Wakeup Enable */ ++#define E1000_WUFC_EX 0x00000004 /* Directed Exact Wakeup Enable */ ++#define E1000_WUFC_MC 0x00000008 /* Directed Multicast Wakeup Enable */ ++#define E1000_WUFC_BC 0x00000010 /* Broadcast Wakeup Enable */ ++#define E1000_WUFC_ARP 0x00000020 /* ARP Request Packet Wakeup Enable */ ++#define E1000_WUFC_IPV4 0x00000040 /* Directed IPv4 Packet Wakeup Enable */ ++#define E1000_WUFC_IPV6 0x00000080 /* Directed IPv6 Packet Wakeup Enable */ ++#define E1000_WUFC_FLX0 0x00010000 /* Flexible Filter 0 Enable */ ++#define E1000_WUFC_FLX1 0x00020000 /* Flexible Filter 1 Enable */ ++#define E1000_WUFC_FLX2 0x00040000 /* Flexible Filter 2 Enable */ ++#define E1000_WUFC_FLX3 0x00080000 /* Flexible Filter 3 Enable */ ++#define E1000_WUFC_ALL_FILTERS 0x000F00FF /* Mask for all wakeup filters */ ++#define E1000_WUFC_FLX_OFFSET 16 /* Offset to the Flexible Filters bits */ ++#define E1000_WUFC_FLX_FILTERS 0x000F0000 /* Mask for the 4 flexible filters */ ++ ++/* Wake Up Status */ ++#define E1000_WUS_LNKC 0x00000001 /* Link Status Changed */ ++#define E1000_WUS_MAG 0x00000002 /* Magic Packet Received */ ++#define E1000_WUS_EX 0x00000004 /* Directed Exact Received */ ++#define E1000_WUS_MC 0x00000008 /* Directed Multicast Received */ ++#define E1000_WUS_BC 0x00000010 /* Broadcast Received */ ++#define E1000_WUS_ARP 0x00000020 /* ARP Request Packet Received */ ++#define E1000_WUS_IPV4 0x00000040 /* Directed IPv4 Packet Wakeup Received */ ++#define E1000_WUS_IPV6 0x00000080 /* Directed IPv6 Packet Wakeup Received */ ++#define E1000_WUS_FLX0 0x00010000 /* Flexible Filter 0 Match */ ++#define E1000_WUS_FLX1 0x00020000 /* Flexible Filter 1 Match */ ++#define E1000_WUS_FLX2 0x00040000 /* Flexible Filter 2 Match */ ++#define E1000_WUS_FLX3 0x00080000 /* Flexible Filter 3 Match */ ++#define E1000_WUS_FLX_FILTERS 0x000F0000 /* Mask for the 4 flexible filters */ ++ ++/* Management Control */ ++#define E1000_MANC_SMBUS_EN 0x00000001 /* SMBus Enabled - RO */ ++#define E1000_MANC_ASF_EN 0x00000002 /* ASF Enabled - RO */ ++#define E1000_MANC_R_ON_FORCE 0x00000004 /* Reset on Force TCO - RO */ ++#define E1000_MANC_RMCP_EN 0x00000100 /* Enable RCMP 026Fh Filtering */ ++#define E1000_MANC_0298_EN 0x00000200 /* Enable RCMP 0298h Filtering */ ++#define E1000_MANC_IPV4_EN 0x00000400 /* Enable IPv4 */ ++#define E1000_MANC_IPV6_EN 0x00000800 /* Enable IPv6 */ ++#define E1000_MANC_SNAP_EN 0x00001000 /* Accept LLC/SNAP */ ++#define E1000_MANC_ARP_EN 0x00002000 /* Enable ARP Request Filtering */ ++#define E1000_MANC_NEIGHBOR_EN 0x00004000 /* Enable Neighbor Discovery ++ * Filtering */ ++#define E1000_MANC_TCO_RESET 0x00010000 /* TCO Reset Occurred */ ++#define E1000_MANC_RCV_TCO_EN 0x00020000 /* Receive TCO Packets Enabled */ ++#define E1000_MANC_REPORT_STATUS 0x00040000 /* Status Reporting Enabled */ ++#define E1000_MANC_SMB_REQ 0x01000000 /* SMBus Request */ ++#define E1000_MANC_SMB_GNT 0x02000000 /* SMBus Grant */ ++#define E1000_MANC_SMB_CLK_IN 0x04000000 /* SMBus Clock In */ ++#define E1000_MANC_SMB_DATA_IN 0x08000000 /* SMBus Data In */ ++#define E1000_MANC_SMB_DATA_OUT 0x10000000 /* SMBus Data Out */ ++#define E1000_MANC_SMB_CLK_OUT 0x20000000 /* SMBus Clock Out */ ++ ++#define E1000_MANC_SMB_DATA_OUT_SHIFT 28 /* SMBus Data Out Shift */ ++#define E1000_MANC_SMB_CLK_OUT_SHIFT 29 /* SMBus Clock Out Shift */ ++ ++/* Wake Up Packet Length */ ++#define E1000_WUPL_LENGTH_MASK 0x0FFF /* Only the lower 12 bits are valid */ ++ ++#define E1000_MDALIGN 4096 ++ ++/* EEPROM Commands - Microwire */ ++#define EEPROM_READ_OPCODE_MICROWIRE 0x6 /* EEPROM read opcode */ ++#define EEPROM_WRITE_OPCODE_MICROWIRE 0x5 /* EEPROM write opcode */ ++#define EEPROM_ERASE_OPCODE_MICROWIRE 0x7 /* EEPROM erase opcode */ ++#define EEPROM_EWEN_OPCODE_MICROWIRE 0x13 /* EEPROM erase/write enable */ ++#define EEPROM_EWDS_OPCODE_MICROWIRE 0x10 /* EEPROM erast/write disable */ ++ ++/* EEPROM Commands - SPI */ ++#define EEPROM_MAX_RETRY_SPI 5000 /* Max wait of 5ms, for RDY signal */ ++#define EEPROM_READ_OPCODE_SPI 0x3 /* EEPROM read opcode */ ++#define EEPROM_WRITE_OPCODE_SPI 0x2 /* EEPROM write opcode */ ++#define EEPROM_A8_OPCODE_SPI 0x8 /* opcode bit-3 = address bit-8 */ ++#define EEPROM_WREN_OPCODE_SPI 0x6 /* EEPROM set Write Enable latch */ ++#define EEPROM_WRDI_OPCODE_SPI 0x4 /* EEPROM reset Write Enable latch */ ++#define EEPROM_RDSR_OPCODE_SPI 0x5 /* EEPROM read Status register */ ++#define EEPROM_WRSR_OPCODE_SPI 0x1 /* EEPROM write Status register */ ++ ++/* EEPROM Size definitions */ ++#define EEPROM_SIZE_16KB 0x1800 ++#define EEPROM_SIZE_8KB 0x1400 ++#define EEPROM_SIZE_4KB 0x1000 ++#define EEPROM_SIZE_2KB 0x0C00 ++#define EEPROM_SIZE_1KB 0x0800 ++#define EEPROM_SIZE_512B 0x0400 ++#define EEPROM_SIZE_128B 0x0000 ++#define EEPROM_SIZE_MASK 0x1C00 ++ ++/* EEPROM Word Offsets */ ++#define EEPROM_COMPAT 0x0003 ++#define EEPROM_ID_LED_SETTINGS 0x0004 ++#define EEPROM_SERDES_AMPLITUDE 0x0006 /* For SERDES output amplitude adjustment. */ ++#define EEPROM_INIT_CONTROL1_REG 0x000A ++#define EEPROM_INIT_CONTROL2_REG 0x000F ++#define EEPROM_INIT_CONTROL3_PORT_B 0x0014 ++#define EEPROM_INIT_CONTROL3_PORT_A 0x0024 ++#define EEPROM_CFG 0x0012 ++#define EEPROM_FLASH_VERSION 0x0032 ++#define EEPROM_CHECKSUM_REG 0x003F ++ ++/* Word definitions for ID LED Settings */ ++#define ID_LED_RESERVED_0000 0x0000 ++#define ID_LED_RESERVED_FFFF 0xFFFF ++#define ID_LED_DEFAULT ((ID_LED_OFF1_ON2 << 12) | \ ++ (ID_LED_OFF1_OFF2 << 8) | \ ++ (ID_LED_DEF1_DEF2 << 4) | \ ++ (ID_LED_DEF1_DEF2)) ++#define ID_LED_DEF1_DEF2 0x1 ++#define ID_LED_DEF1_ON2 0x2 ++#define ID_LED_DEF1_OFF2 0x3 ++#define ID_LED_ON1_DEF2 0x4 ++#define ID_LED_ON1_ON2 0x5 ++#define ID_LED_ON1_OFF2 0x6 ++#define ID_LED_OFF1_DEF2 0x7 ++#define ID_LED_OFF1_ON2 0x8 ++#define ID_LED_OFF1_OFF2 0x9 ++ ++#define IGP_ACTIVITY_LED_MASK 0xFFFFF0FF ++#define IGP_ACTIVITY_LED_ENABLE 0x0300 ++#define IGP_LED3_MODE 0x07000000 ++ ++ ++/* Mask bits for SERDES amplitude adjustment in Word 6 of the EEPROM */ ++#define EEPROM_SERDES_AMPLITUDE_MASK 0x000F ++ ++/* Mask bits for fields in Word 0x0a of the EEPROM */ ++#define EEPROM_WORD0A_ILOS 0x0010 ++#define EEPROM_WORD0A_SWDPIO 0x01E0 ++#define EEPROM_WORD0A_LRST 0x0200 ++#define EEPROM_WORD0A_FD 0x0400 ++#define EEPROM_WORD0A_66MHZ 0x0800 ++ ++/* Mask bits for fields in Word 0x0f of the EEPROM */ ++#define EEPROM_WORD0F_PAUSE_MASK 0x3000 ++#define EEPROM_WORD0F_PAUSE 0x1000 ++#define EEPROM_WORD0F_ASM_DIR 0x2000 ++#define EEPROM_WORD0F_ANE 0x0800 ++#define EEPROM_WORD0F_SWPDIO_EXT 0x00F0 ++ ++/* For checksumming, the sum of all words in the EEPROM should equal 0xBABA. */ ++#define EEPROM_SUM 0xBABA ++ ++/* EEPROM Map defines (WORD OFFSETS)*/ ++#define EEPROM_NODE_ADDRESS_BYTE_0 0 ++#define EEPROM_PBA_BYTE_1 8 ++ ++#define EEPROM_RESERVED_WORD 0xFFFF ++ ++/* EEPROM Map Sizes (Byte Counts) */ ++#define PBA_SIZE 4 ++ ++/* Collision related configuration parameters */ ++#define E1000_COLLISION_THRESHOLD 16 ++#define E1000_CT_SHIFT 4 ++#define E1000_COLLISION_DISTANCE 64 ++#define E1000_FDX_COLLISION_DISTANCE E1000_COLLISION_DISTANCE ++#define E1000_HDX_COLLISION_DISTANCE E1000_COLLISION_DISTANCE ++#define E1000_COLD_SHIFT 12 ++ ++/* Number of Transmit and Receive Descriptors must be a multiple of 8 */ ++#define REQ_TX_DESCRIPTOR_MULTIPLE 8 ++#define REQ_RX_DESCRIPTOR_MULTIPLE 8 ++ ++/* Default values for the transmit IPG register */ ++#define DEFAULT_82542_TIPG_IPGT 10 ++#define DEFAULT_82543_TIPG_IPGT_FIBER 9 ++#define DEFAULT_82543_TIPG_IPGT_COPPER 8 ++ ++#define E1000_TIPG_IPGT_MASK 0x000003FF ++#define E1000_TIPG_IPGR1_MASK 0x000FFC00 ++#define E1000_TIPG_IPGR2_MASK 0x3FF00000 ++ ++#define DEFAULT_82542_TIPG_IPGR1 2 ++#define DEFAULT_82543_TIPG_IPGR1 8 ++#define E1000_TIPG_IPGR1_SHIFT 10 ++ ++#define DEFAULT_82542_TIPG_IPGR2 10 ++#define DEFAULT_82543_TIPG_IPGR2 6 ++#define E1000_TIPG_IPGR2_SHIFT 20 ++ ++#define E1000_TXDMAC_DPP 0x00000001 ++ ++/* Adaptive IFS defines */ ++#define TX_THRESHOLD_START 8 ++#define TX_THRESHOLD_INCREMENT 10 ++#define TX_THRESHOLD_DECREMENT 1 ++#define TX_THRESHOLD_STOP 190 ++#define TX_THRESHOLD_DISABLE 0 ++#define TX_THRESHOLD_TIMER_MS 10000 ++#define MIN_NUM_XMITS 1000 ++#define IFS_MAX 80 ++#define IFS_STEP 10 ++#define IFS_MIN 40 ++#define IFS_RATIO 4 ++ ++/* PBA constants */ ++#define E1000_PBA_16K 0x0010 /* 16KB, default TX allocation */ ++#define E1000_PBA_22K 0x0016 ++#define E1000_PBA_24K 0x0018 ++#define E1000_PBA_30K 0x001E ++#define E1000_PBA_40K 0x0028 ++#define E1000_PBA_48K 0x0030 /* 48KB, default RX allocation */ ++ ++/* Flow Control Constants */ ++#define FLOW_CONTROL_ADDRESS_LOW 0x00C28001 ++#define FLOW_CONTROL_ADDRESS_HIGH 0x00000100 ++#define FLOW_CONTROL_TYPE 0x8808 ++ ++/* The historical defaults for the flow control values are given below. */ ++#define FC_DEFAULT_HI_THRESH (0x8000) /* 32KB */ ++#define FC_DEFAULT_LO_THRESH (0x4000) /* 16KB */ ++#define FC_DEFAULT_TX_TIMER (0x100) /* ~130 us */ ++ ++/* PCIX Config space */ ++#define PCIX_COMMAND_REGISTER 0xE6 ++#define PCIX_STATUS_REGISTER_LO 0xE8 ++#define PCIX_STATUS_REGISTER_HI 0xEA ++ ++#define PCIX_COMMAND_MMRBC_MASK 0x000C ++#define PCIX_COMMAND_MMRBC_SHIFT 0x2 ++#define PCIX_STATUS_HI_MMRBC_MASK 0x0060 ++#define PCIX_STATUS_HI_MMRBC_SHIFT 0x5 ++#define PCIX_STATUS_HI_MMRBC_4K 0x3 ++#define PCIX_STATUS_HI_MMRBC_2K 0x2 ++ ++ ++/* Number of bits required to shift right the "pause" bits from the ++ * EEPROM (bits 13:12) to the "pause" (bits 8:7) field in the TXCW register. ++ */ ++#define PAUSE_SHIFT 5 ++ ++/* Number of bits required to shift left the "SWDPIO" bits from the ++ * EEPROM (bits 8:5) to the "SWDPIO" (bits 25:22) field in the CTRL register. ++ */ ++#define SWDPIO_SHIFT 17 ++ ++/* Number of bits required to shift left the "SWDPIO_EXT" bits from the ++ * EEPROM word F (bits 7:4) to the bits 11:8 of The Extended CTRL register. ++ */ ++#define SWDPIO__EXT_SHIFT 4 ++ ++/* Number of bits required to shift left the "ILOS" bit from the EEPROM ++ * (bit 4) to the "ILOS" (bit 7) field in the CTRL register. ++ */ ++#define ILOS_SHIFT 3 ++ ++ ++#define RECEIVE_BUFFER_ALIGN_SIZE (256) ++ ++/* Number of milliseconds we wait for auto-negotiation to complete */ ++#define LINK_UP_TIMEOUT 500 ++ ++#define E1000_TX_BUFFER_SIZE ((uint32_t)1514) ++ ++/* The carrier extension symbol, as received by the NIC. */ ++#define CARRIER_EXTENSION 0x0F ++ ++/* TBI_ACCEPT macro definition: ++ * ++ * This macro requires: ++ * adapter = a pointer to struct e1000_hw ++ * status = the 8 bit status field of the RX descriptor with EOP set ++ * error = the 8 bit error field of the RX descriptor with EOP set ++ * length = the sum of all the length fields of the RX descriptors that ++ * make up the current frame ++ * last_byte = the last byte of the frame DMAed by the hardware ++ * max_frame_length = the maximum frame length we want to accept. ++ * min_frame_length = the minimum frame length we want to accept. ++ * ++ * This macro is a conditional that should be used in the interrupt ++ * handler's Rx processing routine when RxErrors have been detected. ++ * ++ * Typical use: ++ * ... ++ * if (TBI_ACCEPT) { ++ * accept_frame = TRUE; ++ * e1000_tbi_adjust_stats(adapter, MacAddress); ++ * frame_length--; ++ * } else { ++ * accept_frame = FALSE; ++ * } ++ * ... ++ */ ++ ++#define TBI_ACCEPT(adapter, status, errors, length, last_byte) \ ++ ((adapter)->tbi_compatibility_on && \ ++ (((errors) & E1000_RXD_ERR_FRAME_ERR_MASK) == E1000_RXD_ERR_CE) && \ ++ ((last_byte) == CARRIER_EXTENSION) && \ ++ (((status) & E1000_RXD_STAT_VP) ? \ ++ (((length) > ((adapter)->min_frame_size - VLAN_TAG_SIZE)) && \ ++ ((length) <= ((adapter)->max_frame_size + 1))) : \ ++ (((length) > (adapter)->min_frame_size) && \ ++ ((length) <= ((adapter)->max_frame_size + VLAN_TAG_SIZE + 1))))) ++ ++ ++/* Structures, enums, and macros for the PHY */ ++ ++/* Bit definitions for the Management Data IO (MDIO) and Management Data ++ * Clock (MDC) pins in the Device Control Register. ++ */ ++#define E1000_CTRL_PHY_RESET_DIR E1000_CTRL_SWDPIO0 ++#define E1000_CTRL_PHY_RESET E1000_CTRL_SWDPIN0 ++#define E1000_CTRL_MDIO_DIR E1000_CTRL_SWDPIO2 ++#define E1000_CTRL_MDIO E1000_CTRL_SWDPIN2 ++#define E1000_CTRL_MDC_DIR E1000_CTRL_SWDPIO3 ++#define E1000_CTRL_MDC E1000_CTRL_SWDPIN3 ++#define E1000_CTRL_PHY_RESET_DIR4 E1000_CTRL_EXT_SDP4_DIR ++#define E1000_CTRL_PHY_RESET4 E1000_CTRL_EXT_SDP4_DATA ++ ++/* PHY 1000 MII Register/Bit Definitions */ ++/* PHY Registers defined by IEEE */ ++#define PHY_CTRL 0x00 /* Control Register */ ++#define PHY_STATUS 0x01 /* Status Regiser */ ++#define PHY_ID1 0x02 /* Phy Id Reg (word 1) */ ++#define PHY_ID2 0x03 /* Phy Id Reg (word 2) */ ++#define PHY_AUTONEG_ADV 0x04 /* Autoneg Advertisement */ ++#define PHY_LP_ABILITY 0x05 /* Link Partner Ability (Base Page) */ ++#define PHY_AUTONEG_EXP 0x06 /* Autoneg Expansion Reg */ ++#define PHY_NEXT_PAGE_TX 0x07 /* Next Page TX */ ++#define PHY_LP_NEXT_PAGE 0x08 /* Link Partner Next Page */ ++#define PHY_1000T_CTRL 0x09 /* 1000Base-T Control Reg */ ++#define PHY_1000T_STATUS 0x0A /* 1000Base-T Status Reg */ ++#define PHY_EXT_STATUS 0x0F /* Extended Status Reg */ ++ ++/* M88E1000 Specific Registers */ ++#define M88E1000_PHY_SPEC_CTRL 0x10 /* PHY Specific Control Register */ ++#define M88E1000_PHY_SPEC_STATUS 0x11 /* PHY Specific Status Register */ ++#define M88E1000_INT_ENABLE 0x12 /* Interrupt Enable Register */ ++#define M88E1000_INT_STATUS 0x13 /* Interrupt Status Register */ ++#define M88E1000_EXT_PHY_SPEC_CTRL 0x14 /* Extended PHY Specific Control */ ++#define M88E1000_RX_ERR_CNTR 0x15 /* Receive Error Counter */ ++ ++#define M88E1000_PHY_EXT_CTRL 0x1A /* PHY extend control register */ ++#define M88E1000_PHY_PAGE_SELECT 0x1D /* Reg 29 for page number setting */ ++#define M88E1000_PHY_GEN_CONTROL 0x1E /* Its meaning depends on reg 29 */ ++#define M88E1000_PHY_VCO_REG_BIT8 0x100 /* Bits 8 & 11 are adjusted for */ ++#define M88E1000_PHY_VCO_REG_BIT11 0x800 /* improved BER performance */ ++ ++#define IGP01E1000_IEEE_REGS_PAGE 0x0000 ++#define IGP01E1000_IEEE_RESTART_AUTONEG 0x3300 ++#define IGP01E1000_IEEE_FORCE_GIGA 0x0140 ++ ++/* IGP01E1000 Specific Registers */ ++#define IGP01E1000_PHY_PORT_CONFIG 0x10 /* PHY Specific Port Config Register */ ++#define IGP01E1000_PHY_PORT_STATUS 0x11 /* PHY Specific Status Register */ ++#define IGP01E1000_PHY_PORT_CTRL 0x12 /* PHY Specific Control Register */ ++#define IGP01E1000_PHY_LINK_HEALTH 0x13 /* PHY Link Health Register */ ++#define IGP01E1000_GMII_FIFO 0x14 /* GMII FIFO Register */ ++#define IGP01E1000_PHY_CHANNEL_QUALITY 0x15 /* PHY Channel Quality Register */ ++#define IGP01E1000_PHY_PAGE_SELECT 0x1F /* PHY Page Select Core Register */ ++ ++/* IGP01E1000 AGC Registers - stores the cable length values*/ ++#define IGP01E1000_PHY_AGC_A 0x1172 ++#define IGP01E1000_PHY_AGC_B 0x1272 ++#define IGP01E1000_PHY_AGC_C 0x1472 ++#define IGP01E1000_PHY_AGC_D 0x1872 ++ ++/* IGP01E1000 DSP Reset Register */ ++#define IGP01E1000_PHY_DSP_RESET 0x1F33 ++#define IGP01E1000_PHY_DSP_SET 0x1F71 ++#define IGP01E1000_PHY_DSP_FFE 0x1F35 ++ ++#define IGP01E1000_PHY_CHANNEL_NUM 4 ++#define IGP01E1000_PHY_AGC_PARAM_A 0x1171 ++#define IGP01E1000_PHY_AGC_PARAM_B 0x1271 ++#define IGP01E1000_PHY_AGC_PARAM_C 0x1471 ++#define IGP01E1000_PHY_AGC_PARAM_D 0x1871 ++ ++#define IGP01E1000_PHY_EDAC_MU_INDEX 0xC000 ++#define IGP01E1000_PHY_EDAC_SIGN_EXT_9_BITS 0x8000 ++ ++#define IGP01E1000_PHY_ANALOG_TX_STATE 0x2890 ++#define IGP01E1000_PHY_ANALOG_CLASS_A 0x2000 ++#define IGP01E1000_PHY_FORCE_ANALOG_ENABLE 0x0004 ++#define IGP01E1000_PHY_DSP_FFE_CM_CP 0x0069 ++ ++#define IGP01E1000_PHY_DSP_FFE_DEFAULT 0x002A ++/* IGP01E1000 PCS Initialization register - stores the polarity status when ++ * speed = 1000 Mbps. */ ++#define IGP01E1000_PHY_PCS_INIT_REG 0x00B4 ++#define IGP01E1000_PHY_PCS_CTRL_REG 0x00B5 ++ ++#define IGP01E1000_ANALOG_REGS_PAGE 0x20C0 ++ ++#define MAX_PHY_REG_ADDRESS 0x1F /* 5 bit address bus (0-0x1F) */ ++#define MAX_PHY_MULTI_PAGE_REG 0xF /*Registers that are equal on all pages*/ ++/* PHY Control Register */ ++#define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */ ++#define MII_CR_COLL_TEST_ENABLE 0x0080 /* Collision test enable */ ++#define MII_CR_FULL_DUPLEX 0x0100 /* FDX =1, half duplex =0 */ ++#define MII_CR_RESTART_AUTO_NEG 0x0200 /* Restart auto negotiation */ ++#define MII_CR_ISOLATE 0x0400 /* Isolate PHY from MII */ ++#define MII_CR_POWER_DOWN 0x0800 /* Power down */ ++#define MII_CR_AUTO_NEG_EN 0x1000 /* Auto Neg Enable */ ++#define MII_CR_SPEED_SELECT_LSB 0x2000 /* bits 6,13: 10=1000, 01=100, 00=10 */ ++#define MII_CR_LOOPBACK 0x4000 /* 0 = normal, 1 = loopback */ ++#define MII_CR_RESET 0x8000 /* 0 = normal, 1 = PHY reset */ ++ ++/* PHY Status Register */ ++#define MII_SR_EXTENDED_CAPS 0x0001 /* Extended register capabilities */ ++#define MII_SR_JABBER_DETECT 0x0002 /* Jabber Detected */ ++#define MII_SR_LINK_STATUS 0x0004 /* Link Status 1 = link */ ++#define MII_SR_AUTONEG_CAPS 0x0008 /* Auto Neg Capable */ ++#define MII_SR_REMOTE_FAULT 0x0010 /* Remote Fault Detect */ ++#define MII_SR_AUTONEG_COMPLETE 0x0020 /* Auto Neg Complete */ ++#define MII_SR_PREAMBLE_SUPPRESS 0x0040 /* Preamble may be suppressed */ ++#define MII_SR_EXTENDED_STATUS 0x0100 /* Ext. status info in Reg 0x0F */ ++#define MII_SR_100T2_HD_CAPS 0x0200 /* 100T2 Half Duplex Capable */ ++#define MII_SR_100T2_FD_CAPS 0x0400 /* 100T2 Full Duplex Capable */ ++#define MII_SR_10T_HD_CAPS 0x0800 /* 10T Half Duplex Capable */ ++#define MII_SR_10T_FD_CAPS 0x1000 /* 10T Full Duplex Capable */ ++#define MII_SR_100X_HD_CAPS 0x2000 /* 100X Half Duplex Capable */ ++#define MII_SR_100X_FD_CAPS 0x4000 /* 100X Full Duplex Capable */ ++#define MII_SR_100T4_CAPS 0x8000 /* 100T4 Capable */ ++ ++/* Autoneg Advertisement Register */ ++#define NWAY_AR_SELECTOR_FIELD 0x0001 /* indicates IEEE 802.3 CSMA/CD */ ++#define NWAY_AR_10T_HD_CAPS 0x0020 /* 10T Half Duplex Capable */ ++#define NWAY_AR_10T_FD_CAPS 0x0040 /* 10T Full Duplex Capable */ ++#define NWAY_AR_100TX_HD_CAPS 0x0080 /* 100TX Half Duplex Capable */ ++#define NWAY_AR_100TX_FD_CAPS 0x0100 /* 100TX Full Duplex Capable */ ++#define NWAY_AR_100T4_CAPS 0x0200 /* 100T4 Capable */ ++#define NWAY_AR_PAUSE 0x0400 /* Pause operation desired */ ++#define NWAY_AR_ASM_DIR 0x0800 /* Asymmetric Pause Direction bit */ ++#define NWAY_AR_REMOTE_FAULT 0x2000 /* Remote Fault detected */ ++#define NWAY_AR_NEXT_PAGE 0x8000 /* Next Page ability supported */ ++ ++/* Link Partner Ability Register (Base Page) */ ++#define NWAY_LPAR_SELECTOR_FIELD 0x0000 /* LP protocol selector field */ ++#define NWAY_LPAR_10T_HD_CAPS 0x0020 /* LP is 10T Half Duplex Capable */ ++#define NWAY_LPAR_10T_FD_CAPS 0x0040 /* LP is 10T Full Duplex Capable */ ++#define NWAY_LPAR_100TX_HD_CAPS 0x0080 /* LP is 100TX Half Duplex Capable */ ++#define NWAY_LPAR_100TX_FD_CAPS 0x0100 /* LP is 100TX Full Duplex Capable */ ++#define NWAY_LPAR_100T4_CAPS 0x0200 /* LP is 100T4 Capable */ ++#define NWAY_LPAR_PAUSE 0x0400 /* LP Pause operation desired */ ++#define NWAY_LPAR_ASM_DIR 0x0800 /* LP Asymmetric Pause Direction bit */ ++#define NWAY_LPAR_REMOTE_FAULT 0x2000 /* LP has detected Remote Fault */ ++#define NWAY_LPAR_ACKNOWLEDGE 0x4000 /* LP has rx'd link code word */ ++#define NWAY_LPAR_NEXT_PAGE 0x8000 /* Next Page ability supported */ ++ ++/* Autoneg Expansion Register */ ++#define NWAY_ER_LP_NWAY_CAPS 0x0001 /* LP has Auto Neg Capability */ ++#define NWAY_ER_PAGE_RXD 0x0002 /* LP is 10T Half Duplex Capable */ ++#define NWAY_ER_NEXT_PAGE_CAPS 0x0004 /* LP is 10T Full Duplex Capable */ ++#define NWAY_ER_LP_NEXT_PAGE_CAPS 0x0008 /* LP is 100TX Half Duplex Capable */ ++#define NWAY_ER_PAR_DETECT_FAULT 0x0010 /* LP is 100TX Full Duplex Capable */ ++ ++/* Next Page TX Register */ ++#define NPTX_MSG_CODE_FIELD 0x0001 /* NP msg code or unformatted data */ ++#define NPTX_TOGGLE 0x0800 /* Toggles between exchanges ++ * of different NP ++ */ ++#define NPTX_ACKNOWLDGE2 0x1000 /* 1 = will comply with msg ++ * 0 = cannot comply with msg ++ */ ++#define NPTX_MSG_PAGE 0x2000 /* formatted(1)/unformatted(0) pg */ ++#define NPTX_NEXT_PAGE 0x8000 /* 1 = addition NP will follow ++ * 0 = sending last NP ++ */ ++ ++/* Link Partner Next Page Register */ ++#define LP_RNPR_MSG_CODE_FIELD 0x0001 /* NP msg code or unformatted data */ ++#define LP_RNPR_TOGGLE 0x0800 /* Toggles between exchanges ++ * of different NP ++ */ ++#define LP_RNPR_ACKNOWLDGE2 0x1000 /* 1 = will comply with msg ++ * 0 = cannot comply with msg ++ */ ++#define LP_RNPR_MSG_PAGE 0x2000 /* formatted(1)/unformatted(0) pg */ ++#define LP_RNPR_ACKNOWLDGE 0x4000 /* 1 = ACK / 0 = NO ACK */ ++#define LP_RNPR_NEXT_PAGE 0x8000 /* 1 = addition NP will follow ++ * 0 = sending last NP ++ */ ++ ++/* 1000BASE-T Control Register */ ++#define CR_1000T_ASYM_PAUSE 0x0080 /* Advertise asymmetric pause bit */ ++#define CR_1000T_HD_CAPS 0x0100 /* Advertise 1000T HD capability */ ++#define CR_1000T_FD_CAPS 0x0200 /* Advertise 1000T FD capability */ ++#define CR_1000T_REPEATER_DTE 0x0400 /* 1=Repeater/switch device port */ ++ /* 0=DTE device */ ++#define CR_1000T_MS_VALUE 0x0800 /* 1=Configure PHY as Master */ ++ /* 0=Configure PHY as Slave */ ++#define CR_1000T_MS_ENABLE 0x1000 /* 1=Master/Slave manual config value */ ++ /* 0=Automatic Master/Slave config */ ++#define CR_1000T_TEST_MODE_NORMAL 0x0000 /* Normal Operation */ ++#define CR_1000T_TEST_MODE_1 0x2000 /* Transmit Waveform test */ ++#define CR_1000T_TEST_MODE_2 0x4000 /* Master Transmit Jitter test */ ++#define CR_1000T_TEST_MODE_3 0x6000 /* Slave Transmit Jitter test */ ++#define CR_1000T_TEST_MODE_4 0x8000 /* Transmitter Distortion test */ ++ ++/* 1000BASE-T Status Register */ ++#define SR_1000T_IDLE_ERROR_CNT 0x00FF /* Num idle errors since last read */ ++#define SR_1000T_ASYM_PAUSE_DIR 0x0100 /* LP asymmetric pause direction bit */ ++#define SR_1000T_LP_HD_CAPS 0x0400 /* LP is 1000T HD capable */ ++#define SR_1000T_LP_FD_CAPS 0x0800 /* LP is 1000T FD capable */ ++#define SR_1000T_REMOTE_RX_STATUS 0x1000 /* Remote receiver OK */ ++#define SR_1000T_LOCAL_RX_STATUS 0x2000 /* Local receiver OK */ ++#define SR_1000T_MS_CONFIG_RES 0x4000 /* 1=Local TX is Master, 0=Slave */ ++#define SR_1000T_MS_CONFIG_FAULT 0x8000 /* Master/Slave config fault */ ++#define SR_1000T_REMOTE_RX_STATUS_SHIFT 12 ++#define SR_1000T_LOCAL_RX_STATUS_SHIFT 13 ++#define SR_1000T_PHY_EXCESSIVE_IDLE_ERR_COUNT 5 ++#define FFE_IDLE_ERR_COUNT_TIMEOUT_20 20 ++#define FFE_IDLE_ERR_COUNT_TIMEOUT_100 100 ++ ++/* Extended Status Register */ ++#define IEEE_ESR_1000T_HD_CAPS 0x1000 /* 1000T HD capable */ ++#define IEEE_ESR_1000T_FD_CAPS 0x2000 /* 1000T FD capable */ ++#define IEEE_ESR_1000X_HD_CAPS 0x4000 /* 1000X HD capable */ ++#define IEEE_ESR_1000X_FD_CAPS 0x8000 /* 1000X FD capable */ ++ ++#define PHY_TX_POLARITY_MASK 0x0100 /* register 10h bit 8 (polarity bit) */ ++#define PHY_TX_NORMAL_POLARITY 0 /* register 10h bit 8 (normal polarity) */ ++ ++#define AUTO_POLARITY_DISABLE 0x0010 /* register 11h bit 4 */ ++ /* (0=enable, 1=disable) */ ++ ++/* M88E1000 PHY Specific Control Register */ ++#define M88E1000_PSCR_JABBER_DISABLE 0x0001 /* 1=Jabber Function disabled */ ++#define M88E1000_PSCR_POLARITY_REVERSAL 0x0002 /* 1=Polarity Reversal enabled */ ++#define M88E1000_PSCR_SQE_TEST 0x0004 /* 1=SQE Test enabled */ ++#define M88E1000_PSCR_CLK125_DISABLE 0x0010 /* 1=CLK125 low, ++ * 0=CLK125 toggling ++ */ ++#define M88E1000_PSCR_MDI_MANUAL_MODE 0x0000 /* MDI Crossover Mode bits 6:5 */ ++ /* Manual MDI configuration */ ++#define M88E1000_PSCR_MDIX_MANUAL_MODE 0x0020 /* Manual MDIX configuration */ ++#define M88E1000_PSCR_AUTO_X_1000T 0x0040 /* 1000BASE-T: Auto crossover, ++ * 100BASE-TX/10BASE-T: ++ * MDI Mode ++ */ ++#define M88E1000_PSCR_AUTO_X_MODE 0x0060 /* Auto crossover enabled ++ * all speeds. ++ */ ++#define M88E1000_PSCR_10BT_EXT_DIST_ENABLE 0x0080 ++ /* 1=Enable Extended 10BASE-T distance ++ * (Lower 10BASE-T RX Threshold) ++ * 0=Normal 10BASE-T RX Threshold */ ++#define M88E1000_PSCR_MII_5BIT_ENABLE 0x0100 ++ /* 1=5-Bit interface in 100BASE-TX ++ * 0=MII interface in 100BASE-TX */ ++#define M88E1000_PSCR_SCRAMBLER_DISABLE 0x0200 /* 1=Scrambler disable */ ++#define M88E1000_PSCR_FORCE_LINK_GOOD 0x0400 /* 1=Force link good */ ++#define M88E1000_PSCR_ASSERT_CRS_ON_TX 0x0800 /* 1=Assert CRS on Transmit */ ++ ++#define M88E1000_PSCR_POLARITY_REVERSAL_SHIFT 1 ++#define M88E1000_PSCR_AUTO_X_MODE_SHIFT 5 ++#define M88E1000_PSCR_10BT_EXT_DIST_ENABLE_SHIFT 7 ++ ++/* M88E1000 PHY Specific Status Register */ ++#define M88E1000_PSSR_JABBER 0x0001 /* 1=Jabber */ ++#define M88E1000_PSSR_REV_POLARITY 0x0002 /* 1=Polarity reversed */ ++#define M88E1000_PSSR_DOWNSHIFT 0x0020 /* 1=Downshifted */ ++#define M88E1000_PSSR_MDIX 0x0040 /* 1=MDIX; 0=MDI */ ++#define M88E1000_PSSR_CABLE_LENGTH 0x0380 /* 0=<50M;1=50-80M;2=80-110M; ++ * 3=110-140M;4=>140M */ ++#define M88E1000_PSSR_LINK 0x0400 /* 1=Link up, 0=Link down */ ++#define M88E1000_PSSR_SPD_DPLX_RESOLVED 0x0800 /* 1=Speed & Duplex resolved */ ++#define M88E1000_PSSR_PAGE_RCVD 0x1000 /* 1=Page received */ ++#define M88E1000_PSSR_DPLX 0x2000 /* 1=Duplex 0=Half Duplex */ ++#define M88E1000_PSSR_SPEED 0xC000 /* Speed, bits 14:15 */ ++#define M88E1000_PSSR_10MBS 0x0000 /* 00=10Mbs */ ++#define M88E1000_PSSR_100MBS 0x4000 /* 01=100Mbs */ ++#define M88E1000_PSSR_1000MBS 0x8000 /* 10=1000Mbs */ ++ ++#define M88E1000_PSSR_REV_POLARITY_SHIFT 1 ++#define M88E1000_PSSR_DOWNSHIFT_SHIFT 5 ++#define M88E1000_PSSR_MDIX_SHIFT 6 ++#define M88E1000_PSSR_CABLE_LENGTH_SHIFT 7 ++ ++/* M88E1000 Extended PHY Specific Control Register */ ++#define M88E1000_EPSCR_FIBER_LOOPBACK 0x4000 /* 1=Fiber loopback */ ++#define M88E1000_EPSCR_DOWN_NO_IDLE 0x8000 /* 1=Lost lock detect enabled. ++ * Will assert lost lock and bring ++ * link down if idle not seen ++ * within 1ms in 1000BASE-T ++ */ ++/* Number of times we will attempt to autonegotiate before downshifting if we ++ * are the master */ ++#define M88E1000_EPSCR_MASTER_DOWNSHIFT_MASK 0x0C00 ++#define M88E1000_EPSCR_MASTER_DOWNSHIFT_1X 0x0000 ++#define M88E1000_EPSCR_MASTER_DOWNSHIFT_2X 0x0400 ++#define M88E1000_EPSCR_MASTER_DOWNSHIFT_3X 0x0800 ++#define M88E1000_EPSCR_MASTER_DOWNSHIFT_4X 0x0C00 ++/* Number of times we will attempt to autonegotiate before downshifting if we ++ * are the slave */ ++#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_MASK 0x0300 ++#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_DIS 0x0000 ++#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_1X 0x0100 ++#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_2X 0x0200 ++#define M88E1000_EPSCR_SLAVE_DOWNSHIFT_3X 0x0300 ++#define M88E1000_EPSCR_TX_CLK_2_5 0x0060 /* 2.5 MHz TX_CLK */ ++#define M88E1000_EPSCR_TX_CLK_25 0x0070 /* 25 MHz TX_CLK */ ++#define M88E1000_EPSCR_TX_CLK_0 0x0000 /* NO TX_CLK */ ++ ++/* IGP01E1000 Specific Port Config Register - R/W */ ++#define IGP01E1000_PSCFR_AUTO_MDIX_PAR_DETECT 0x0010 ++#define IGP01E1000_PSCFR_PRE_EN 0x0020 ++#define IGP01E1000_PSCFR_SMART_SPEED 0x0080 ++#define IGP01E1000_PSCFR_DISABLE_TPLOOPBACK 0x0100 ++#define IGP01E1000_PSCFR_DISABLE_JABBER 0x0400 ++#define IGP01E1000_PSCFR_DISABLE_TRANSMIT 0x2000 ++ ++/* IGP01E1000 Specific Port Status Register - R/O */ ++#define IGP01E1000_PSSR_AUTONEG_FAILED 0x0001 /* RO LH SC */ ++#define IGP01E1000_PSSR_POLARITY_REVERSED 0x0002 ++#define IGP01E1000_PSSR_CABLE_LENGTH 0x007C ++#define IGP01E1000_PSSR_FULL_DUPLEX 0x0200 ++#define IGP01E1000_PSSR_LINK_UP 0x0400 ++#define IGP01E1000_PSSR_MDIX 0x0800 ++#define IGP01E1000_PSSR_SPEED_MASK 0xC000 /* speed bits mask */ ++#define IGP01E1000_PSSR_SPEED_10MBPS 0x4000 ++#define IGP01E1000_PSSR_SPEED_100MBPS 0x8000 ++#define IGP01E1000_PSSR_SPEED_1000MBPS 0xC000 ++#define IGP01E1000_PSSR_CABLE_LENGTH_SHIFT 0x0002 /* shift right 2 */ ++#define IGP01E1000_PSSR_MDIX_SHIFT 0x000B /* shift right 11 */ ++ ++/* IGP01E1000 Specific Port Control Register - R/W */ ++#define IGP01E1000_PSCR_TP_LOOPBACK 0x0001 ++#define IGP01E1000_PSCR_CORRECT_NC_SCMBLR 0x0200 ++#define IGP01E1000_PSCR_TEN_CRS_SELECT 0x0400 ++#define IGP01E1000_PSCR_FLIP_CHIP 0x0800 ++#define IGP01E1000_PSCR_AUTO_MDIX 0x1000 ++#define IGP01E1000_PSCR_FORCE_MDI_MDIX 0x2000 /* 0-MDI, 1-MDIX */ ++ ++/* IGP01E1000 Specific Port Link Health Register */ ++#define IGP01E1000_PLHR_SS_DOWNGRADE 0x8000 ++#define IGP01E1000_PLHR_GIG_SCRAMBLER_ERROR 0x4000 ++#define IGP01E1000_PLHR_GIG_REM_RCVR_NOK 0x0800 /* LH */ ++#define IGP01E1000_PLHR_IDLE_ERROR_CNT_OFLOW 0x0400 /* LH */ ++#define IGP01E1000_PLHR_DATA_ERR_1 0x0200 /* LH */ ++#define IGP01E1000_PLHR_DATA_ERR_0 0x0100 ++#define IGP01E1000_PLHR_AUTONEG_FAULT 0x0010 ++#define IGP01E1000_PLHR_AUTONEG_ACTIVE 0x0008 ++#define IGP01E1000_PLHR_VALID_CHANNEL_D 0x0004 ++#define IGP01E1000_PLHR_VALID_CHANNEL_C 0x0002 ++#define IGP01E1000_PLHR_VALID_CHANNEL_B 0x0001 ++#define IGP01E1000_PLHR_VALID_CHANNEL_A 0x0000 ++ ++/* IGP01E1000 Channel Quality Register */ ++#define IGP01E1000_MSE_CHANNEL_D 0x000F ++#define IGP01E1000_MSE_CHANNEL_C 0x00F0 ++#define IGP01E1000_MSE_CHANNEL_B 0x0F00 ++#define IGP01E1000_MSE_CHANNEL_A 0xF000 ++ ++/* IGP01E1000 DSP reset macros */ ++#define DSP_RESET_ENABLE 0x0 ++#define DSP_RESET_DISABLE 0x2 ++#define E1000_MAX_DSP_RESETS 10 ++ ++/* IGP01E1000 AGC Registers */ ++ ++#define IGP01E1000_AGC_LENGTH_SHIFT 7 /* Coarse - 13:11, Fine - 10:7 */ ++ ++/* 7 bits (3 Coarse + 4 Fine) --> 128 optional values */ ++#define IGP01E1000_AGC_LENGTH_TABLE_SIZE 128 ++ ++/* The precision of the length is +/- 10 meters */ ++#define IGP01E1000_AGC_RANGE 10 ++ ++/* IGP01E1000 PCS Initialization register */ ++/* bits 3:6 in the PCS registers stores the channels polarity */ ++#define IGP01E1000_PHY_POLARITY_MASK 0x0078 ++ ++/* IGP01E1000 GMII FIFO Register */ ++#define IGP01E1000_GMII_FLEX_SPD 0x10 /* Enable flexible speed ++ * on Link-Up */ ++#define IGP01E1000_GMII_SPD 0x20 /* Enable SPD */ ++ ++/* IGP01E1000 Analog Register */ ++#define IGP01E1000_ANALOG_SPARE_FUSE_STATUS 0x20D1 ++#define IGP01E1000_ANALOG_FUSE_STATUS 0x20D0 ++#define IGP01E1000_ANALOG_FUSE_CONTROL 0x20DC ++#define IGP01E1000_ANALOG_FUSE_BYPASS 0x20DE ++ ++#define IGP01E1000_ANALOG_FUSE_POLY_MASK 0xF000 ++#define IGP01E1000_ANALOG_FUSE_FINE_MASK 0x0F80 ++#define IGP01E1000_ANALOG_FUSE_COARSE_MASK 0x0070 ++#define IGP01E1000_ANALOG_SPARE_FUSE_ENABLED 0x0100 ++#define IGP01E1000_ANALOG_FUSE_ENABLE_SW_CONTROL 0x0002 ++ ++#define IGP01E1000_ANALOG_FUSE_COARSE_THRESH 0x0040 ++#define IGP01E1000_ANALOG_FUSE_COARSE_10 0x0010 ++#define IGP01E1000_ANALOG_FUSE_FINE_1 0x0080 ++#define IGP01E1000_ANALOG_FUSE_FINE_10 0x0500 ++ ++/* Bit definitions for valid PHY IDs. */ ++#define M88E1000_E_PHY_ID 0x01410C50 ++#define M88E1000_I_PHY_ID 0x01410C30 ++#define M88E1011_I_PHY_ID 0x01410C20 ++#define IGP01E1000_I_PHY_ID 0x02A80380 ++#define M88E1000_12_PHY_ID M88E1000_E_PHY_ID ++#define M88E1000_14_PHY_ID M88E1000_E_PHY_ID ++#define M88E1011_I_REV_4 0x04 ++ ++/* Miscellaneous PHY bit definitions. */ ++#define PHY_PREAMBLE 0xFFFFFFFF ++#define PHY_SOF 0x01 ++#define PHY_OP_READ 0x02 ++#define PHY_OP_WRITE 0x01 ++#define PHY_TURNAROUND 0x02 ++#define PHY_PREAMBLE_SIZE 32 ++#define MII_CR_SPEED_1000 0x0040 ++#define MII_CR_SPEED_100 0x2000 ++#define MII_CR_SPEED_10 0x0000 ++#define E1000_PHY_ADDRESS 0x01 ++#define PHY_AUTO_NEG_TIME 45 /* 4.5 Seconds */ ++#define PHY_FORCE_TIME 20 /* 2.0 Seconds */ ++#define PHY_REVISION_MASK 0xFFFFFFF0 ++#define DEVICE_SPEED_MASK 0x00000300 /* Device Ctrl Reg Speed Mask */ ++#define REG4_SPEED_MASK 0x01E0 ++#define REG9_SPEED_MASK 0x0300 ++#define ADVERTISE_10_HALF 0x0001 ++#define ADVERTISE_10_FULL 0x0002 ++#define ADVERTISE_100_HALF 0x0004 ++#define ADVERTISE_100_FULL 0x0008 ++#define ADVERTISE_1000_HALF 0x0010 ++#define ADVERTISE_1000_FULL 0x0020 ++#define AUTONEG_ADVERTISE_SPEED_DEFAULT 0x002F /* Everything but 1000-Half */ ++#define AUTONEG_ADVERTISE_10_100_ALL 0x000F /* All 10/100 speeds*/ ++#define AUTONEG_ADVERTISE_10_ALL 0x0003 /* 10Mbps Full & Half speeds*/ ++ ++#endif /* _E1000_HW_H_ */ +Index: b/netboot/eepro.c +=================================================================== +--- a/netboot/eepro.c ++++ /dev/null +@@ -1,586 +0,0 @@ +-/************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +-Intel EEPRO/10 NIC driver for Etherboot +-Adapted from Linux eepro.c from kernel 2.2.17 +- +-This board accepts a 32 pin EEPROM (29C256), however a test with a +-27C010 shows that this EPROM also works in the socket, but it's not clear +-how repeatably. The two top address pins appear to be held low, thus +-the bottom 32kB of the 27C010 is visible in the CPU's address space. +-To be sure you could put 4 copies of the code in the 27C010, then +-it doesn't matter whether the extra lines are held low or high, just +-hopefully not floating as CMOS chips don't like floating inputs. +- +-Be careful with seating the EPROM as the socket on my board actually +-has 34 pins, the top row of 2 are not used. +-***************************************************************************/ +- +-/* +- * 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, or (at +- * your option) any later version. +- */ +- +-/* to get some global routines like printf */ +-#include "etherboot.h" +-/* to get the interface to the body of the program */ +-#include "nic.h" +-/* to get our own prototype */ +-#include "cards.h" +-/* we use timer2 for microsecond waits */ +-#include "timer.h" +- +-#undef DEBUG /* only after include files */ +- +-/* Different 82595 chips */ +-#define LAN595 0 +-#define LAN595TX 1 +-#define LAN595FX 2 +-#define LAN595FX_10ISA 3 +- +-#define SLOW_DOWN inb(0x80); +- +-/* The station (ethernet) address prefix, used for IDing the board. */ +-#define SA_ADDR0 0x00 /* Etherexpress Pro/10 */ +-#define SA_ADDR1 0xaa +-#define SA_ADDR2 0x00 +- +-#define GetBit(x,y) ((x & (1<>y) +- +-/* EEPROM Word 0: */ +-#define ee_PnP 0 /* Plug 'n Play enable bit */ +-#define ee_Word1 1 /* Word 1? */ +-#define ee_BusWidth 2 /* 8/16 bit */ +-#define ee_FlashAddr 3 /* Flash Address */ +-#define ee_FlashMask 0x7 /* Mask */ +-#define ee_AutoIO 6 /* */ +-#define ee_reserved0 7 /* =0! */ +-#define ee_Flash 8 /* Flash there? */ +-#define ee_AutoNeg 9 /* Auto Negotiation enabled? */ +-#define ee_IO0 10 /* IO Address LSB */ +-#define ee_IO0Mask 0x /*...*/ +-#define ee_IO1 15 /* IO MSB */ +- +-/* EEPROM Word 1: */ +-#define ee_IntSel 0 /* Interrupt */ +-#define ee_IntMask 0x7 +-#define ee_LI 3 /* Link Integrity 0= enabled */ +-#define ee_PC 4 /* Polarity Correction 0= enabled */ +-#define ee_TPE_AUI 5 /* PortSelection 1=TPE */ +-#define ee_Jabber 6 /* Jabber prevention 0= enabled */ +-#define ee_AutoPort 7 /* Auto Port Selection 1= Disabled */ +-#define ee_SMOUT 8 /* SMout Pin Control 0= Input */ +-#define ee_PROM 9 /* Flash EPROM / PROM 0=Flash */ +-#define ee_reserved1 10 /* .. 12 =0! */ +-#define ee_AltReady 13 /* Alternate Ready, 0=normal */ +-#define ee_reserved2 14 /* =0! */ +-#define ee_Duplex 15 +- +-/* Word2,3,4: */ +-#define ee_IA5 0 /*bit start for individual Addr Byte 5 */ +-#define ee_IA4 8 /*bit start for individual Addr Byte 5 */ +-#define ee_IA3 0 /*bit start for individual Addr Byte 5 */ +-#define ee_IA2 8 /*bit start for individual Addr Byte 5 */ +-#define ee_IA1 0 /*bit start for individual Addr Byte 5 */ +-#define ee_IA0 8 /*bit start for individual Addr Byte 5 */ +- +-/* Word 5: */ +-#define ee_BNC_TPE 0 /* 0=TPE */ +-#define ee_BootType 1 /* 00=None, 01=IPX, 10=ODI, 11=NDIS */ +-#define ee_BootTypeMask 0x3 +-#define ee_NumConn 3 /* Number of Connections 0= One or Two */ +-#define ee_FlashSock 4 /* Presence of Flash Socket 0= Present */ +-#define ee_PortTPE 5 +-#define ee_PortBNC 6 +-#define ee_PortAUI 7 +-#define ee_PowerMgt 10 /* 0= disabled */ +-#define ee_CP 13 /* Concurrent Processing */ +-#define ee_CPMask 0x7 +- +-/* Word 6: */ +-#define ee_Stepping 0 /* Stepping info */ +-#define ee_StepMask 0x0F +-#define ee_BoardID 4 /* Manucaturer Board ID, reserved */ +-#define ee_BoardMask 0x0FFF +- +-/* Word 7: */ +-#define ee_INT_TO_IRQ 0 /* int to IRQ Mapping = 0x1EB8 for Pro/10+ */ +-#define ee_FX_INT2IRQ 0x1EB8 /* the _only_ mapping allowed for FX chips */ +- +-/*..*/ +-#define ee_SIZE 0x40 /* total EEprom Size */ +-#define ee_Checksum 0xBABA /* initial and final value for adding checksum */ +- +- +-/* Card identification via EEprom: */ +-#define ee_addr_vendor 0x10 /* Word offset for EISA Vendor ID */ +-#define ee_addr_id 0x11 /* Word offset for Card ID */ +-#define ee_addr_SN 0x12 /* Serial Number */ +-#define ee_addr_CRC_8 0x14 /* CRC over last thee Bytes */ +- +- +-#define ee_vendor_intel0 0x25 /* Vendor ID Intel */ +-#define ee_vendor_intel1 0xD4 +-#define ee_id_eepro10p0 0x10 /* ID for eepro/10+ */ +-#define ee_id_eepro10p1 0x31 +- +-/* now this section could be used by both boards: the oldies and the ee10: +- * ee10 uses tx buffer before of rx buffer and the oldies the inverse. +- * (aris) +- */ +-#define RAM_SIZE 0x8000 +- +-#define RCV_HEADER 8 +-#define RCV_DEFAULT_RAM 0x6000 +-#define RCV_RAM rcv_ram +- +-static unsigned rcv_ram = RCV_DEFAULT_RAM; +- +-#define XMT_HEADER 8 +-#define XMT_RAM (RAM_SIZE - RCV_RAM) +- +-#define XMT_START ((rcv_start + RCV_RAM) % RAM_SIZE) +- +-#define RCV_LOWER_LIMIT (rcv_start >> 8) +-#define RCV_UPPER_LIMIT (((rcv_start + RCV_RAM) - 2) >> 8) +-#define XMT_LOWER_LIMIT (XMT_START >> 8) +-#define XMT_UPPER_LIMIT (((XMT_START + XMT_RAM) - 2) >> 8) +- +-#define RCV_START_PRO 0x00 +-#define RCV_START_10 XMT_RAM +- /* by default the old driver */ +-static unsigned rcv_start = RCV_START_PRO; +- +-#define RCV_DONE 0x0008 +-#define RX_OK 0x2000 +-#define RX_ERROR 0x0d81 +- +-#define TX_DONE_BIT 0x0080 +-#define CHAIN_BIT 0x8000 +-#define XMT_STATUS 0x02 +-#define XMT_CHAIN 0x04 +-#define XMT_COUNT 0x06 +- +-#define BANK0_SELECT 0x00 +-#define BANK1_SELECT 0x40 +-#define BANK2_SELECT 0x80 +- +-/* Bank 0 registers */ +-#define COMMAND_REG 0x00 /* Register 0 */ +-#define MC_SETUP 0x03 +-#define XMT_CMD 0x04 +-#define DIAGNOSE_CMD 0x07 +-#define RCV_ENABLE_CMD 0x08 +-#define RCV_DISABLE_CMD 0x0a +-#define STOP_RCV_CMD 0x0b +-#define RESET_CMD 0x0e +-#define POWER_DOWN_CMD 0x18 +-#define RESUME_XMT_CMD 0x1c +-#define SEL_RESET_CMD 0x1e +-#define STATUS_REG 0x01 /* Register 1 */ +-#define RX_INT 0x02 +-#define TX_INT 0x04 +-#define EXEC_STATUS 0x30 +-#define ID_REG 0x02 /* Register 2 */ +-#define R_ROBIN_BITS 0xc0 /* round robin counter */ +-#define ID_REG_MASK 0x2c +-#define ID_REG_SIG 0x24 +-#define AUTO_ENABLE 0x10 +-#define INT_MASK_REG 0x03 /* Register 3 */ +-#define RX_STOP_MASK 0x01 +-#define RX_MASK 0x02 +-#define TX_MASK 0x04 +-#define EXEC_MASK 0x08 +-#define ALL_MASK 0x0f +-#define IO_32_BIT 0x10 +-#define RCV_BAR 0x04 /* The following are word (16-bit) registers */ +-#define RCV_STOP 0x06 +- +-#define XMT_BAR_PRO 0x0a +-#define XMT_BAR_10 0x0b +-static unsigned xmt_bar = XMT_BAR_PRO; +- +-#define HOST_ADDRESS_REG 0x0c +-#define IO_PORT 0x0e +-#define IO_PORT_32_BIT 0x0c +- +-/* Bank 1 registers */ +-#define REG1 0x01 +-#define WORD_WIDTH 0x02 +-#define INT_ENABLE 0x80 +-#define INT_NO_REG 0x02 +-#define RCV_LOWER_LIMIT_REG 0x08 +-#define RCV_UPPER_LIMIT_REG 0x09 +- +-#define XMT_LOWER_LIMIT_REG_PRO 0x0a +-#define XMT_UPPER_LIMIT_REG_PRO 0x0b +-#define XMT_LOWER_LIMIT_REG_10 0x0b +-#define XMT_UPPER_LIMIT_REG_10 0x0a +-static unsigned xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_PRO; +-static unsigned xmt_upper_limit_reg = XMT_UPPER_LIMIT_REG_PRO; +- +-/* Bank 2 registers */ +-#define XMT_Chain_Int 0x20 /* Interrupt at the end of the transmit chain */ +-#define XMT_Chain_ErrStop 0x40 /* Interrupt at the end of the chain even if there are errors */ +-#define RCV_Discard_BadFrame 0x80 /* Throw bad frames away, and continue to receive others */ +-#define REG2 0x02 +-#define PRMSC_Mode 0x01 +-#define Multi_IA 0x20 +-#define REG3 0x03 +-#define TPE_BIT 0x04 +-#define BNC_BIT 0x20 +-#define REG13 0x0d +-#define FDX 0x00 +-#define A_N_ENABLE 0x02 +- +-#define I_ADD_REG0 0x04 +-#define I_ADD_REG1 0x05 +-#define I_ADD_REG2 0x06 +-#define I_ADD_REG3 0x07 +-#define I_ADD_REG4 0x08 +-#define I_ADD_REG5 0x09 +- +-#define EEPROM_REG_PRO 0x0a +-#define EEPROM_REG_10 0x0b +-static unsigned eeprom_reg = EEPROM_REG_PRO; +- +-#define EESK 0x01 +-#define EECS 0x02 +-#define EEDI 0x04 +-#define EEDO 0x08 +- +-/* The horrible routine to read a word from the serial EEPROM. */ +-/* IMPORTANT - the 82595 will be set to Bank 0 after the eeprom is read */ +- +-/* The delay between EEPROM clock transitions. */ +-#define eeprom_delay() { udelay(40); } +-#define EE_READ_CMD (6 << 6) +- +-/* do a full reset */ +-#define eepro_full_reset(ioaddr) outb(RESET_CMD, ioaddr); udelay(40); +- +-/* do a nice reset */ +-#define eepro_sel_reset(ioaddr) { \ +- outb(SEL_RESET_CMD, ioaddr); \ +- SLOW_DOWN; \ +- SLOW_DOWN; \ +- } +- +-/* clear all interrupts */ +-#define eepro_clear_int(ioaddr) outb(ALL_MASK, ioaddr + STATUS_REG) +- +-/* enable rx */ +-#define eepro_en_rx(ioaddr) outb(RCV_ENABLE_CMD, ioaddr) +- +-/* disable rx */ +-#define eepro_dis_rx(ioaddr) outb(RCV_DISABLE_CMD, ioaddr) +- +-/* switch bank */ +-#define eepro_sw2bank0(ioaddr) outb(BANK0_SELECT, ioaddr) +-#define eepro_sw2bank1(ioaddr) outb(BANK1_SELECT, ioaddr) +-#define eepro_sw2bank2(ioaddr) outb(BANK2_SELECT, ioaddr) +- +-static unsigned int rx_start, tx_start; +-static int tx_last; +-static unsigned tx_end; +-static int eepro = 0; +-static unsigned short ioaddr = 0; +-static unsigned int mem_start, mem_end = RCV_DEFAULT_RAM / 1024; +- +-#define udelay(n) waiton_timer2(((n)*TICKS_PER_MS)/1000) +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void eepro_reset(struct nic *nic) +-{ +- int temp_reg, i; +- +- /* put the card in its initial state */ +- eepro_sw2bank2(ioaddr); /* be careful, bank2 now */ +- temp_reg = inb(ioaddr + eeprom_reg); +-#ifdef DEBUG +- printf("Stepping %d\n", temp_reg >> 5); +-#endif +- if (temp_reg & 0x10) /* check the TurnOff Enable bit */ +- outb(temp_reg & 0xEF, ioaddr + eeprom_reg); +- for (i = 0; i < ETH_ALEN; i++) /* fill the MAC address */ +- outb(nic->node_addr[i], ioaddr + I_ADD_REG0 + i); +- temp_reg = inb(ioaddr + REG1); +- /* setup Transmit Chaining and discard bad RCV frames */ +- outb(temp_reg | XMT_Chain_Int | XMT_Chain_ErrStop +- | RCV_Discard_BadFrame, ioaddr + REG1); +- temp_reg = inb(ioaddr + REG2); /* match broadcast */ +- outb(temp_reg | 0x14, ioaddr + REG2); +- temp_reg = inb(ioaddr + REG3); +- outb(temp_reg & 0x3F, ioaddr + REG3); /* clear test mode */ +- /* set the receiving mode */ +- eepro_sw2bank1(ioaddr); /* be careful, bank1 now */ +- /* initialise the RCV and XMT upper and lower limits */ +- outb(RCV_LOWER_LIMIT, ioaddr + RCV_LOWER_LIMIT_REG); +- outb(RCV_UPPER_LIMIT, ioaddr + RCV_UPPER_LIMIT_REG); +- outb(XMT_LOWER_LIMIT, ioaddr + xmt_lower_limit_reg); +- outb(XMT_UPPER_LIMIT, ioaddr + xmt_upper_limit_reg); +- eepro_sw2bank0(ioaddr); /* Switch back to bank 0 */ +- eepro_clear_int(ioaddr); +- /* Initialise RCV */ +- outw(rx_start = (RCV_LOWER_LIMIT << 8), ioaddr + RCV_BAR); +- outw(((RCV_UPPER_LIMIT << 8) | 0xFE), ioaddr + RCV_STOP); +- /* Intialise XMT */ +- outw((XMT_LOWER_LIMIT << 8), ioaddr + xmt_bar); +- eepro_sel_reset(ioaddr); +- tx_start = tx_end = (XMT_LOWER_LIMIT << 8); +- tx_last = 0; +- eepro_en_rx(ioaddr); +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int eepro_poll(struct nic *nic) +-{ +- int i; +- unsigned int rcv_car = rx_start; +- unsigned int rcv_event, rcv_status, rcv_next_frame, rcv_size; +- +- /* return true if there's an ethernet packet ready to read */ +- /* nic->packet should contain data on return */ +- /* nic->packetlen should contain length of data */ +-#if 0 +- if ((inb(ioaddr + STATUS_REG) & 0x40) == 0) +- return (0); +- outb(0x40, ioaddr + STATUS_REG); +-#endif +- outw(rcv_car, ioaddr + HOST_ADDRESS_REG); +- rcv_event = inw(ioaddr + IO_PORT); +- if (rcv_event != RCV_DONE) +- return (0); +- rcv_status = inw(ioaddr + IO_PORT); +- rcv_next_frame = inw(ioaddr + IO_PORT); +- rcv_size = inw(ioaddr + IO_PORT); +-#if 0 +- printf("%hX %hX %d %hhX\n", rcv_status, rcv_next_frame, rcv_size, +- inb(ioaddr + STATUS_REG)); +-#endif +- if ((rcv_status & (RX_OK|RX_ERROR)) != RX_OK) { +- printf("Receive error %hX\n", rcv_status); +- return (0); +- } +- rcv_size &= 0x3FFF; +- insw(ioaddr + IO_PORT, nic->packet, ((rcv_size + 3) >> 1)); +-#if 0 +- for (i = 0; i < 48; i++) { +- printf("%hhX", nic->packet[i]); +- putchar(i % 16 == 15 ? '\n' : ' '); +- } +-#endif +- nic->packetlen = rcv_size; +- rcv_car = rx_start + RCV_HEADER + rcv_size; +- rx_start = rcv_next_frame; +- if (rcv_car == 0) +- rcv_car = ((RCV_UPPER_LIMIT << 8) | 0xff); +- outw(rcv_car - 1, ioaddr + RCV_STOP); +- return (1); +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void eepro_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- unsigned int status, tx_available, last, end, length; +- unsigned short type; +- int boguscount = 20; +- +- length = s + ETH_HLEN; +- if (tx_end > tx_start) +- tx_available = XMT_RAM - (tx_end - tx_start); +- else if (tx_end < tx_start) +- tx_available = tx_start - tx_end; +- else +- tx_available = XMT_RAM; +- last = tx_end; +- end = last + (((length + 3) >> 1) << 1) + XMT_HEADER; +- if (end >= (XMT_UPPER_LIMIT << 8)) { +- last = (XMT_LOWER_LIMIT << 8); +- end = last + (((length + 3) >> 1) << 1) + XMT_HEADER; +- } +- outw(last, ioaddr + HOST_ADDRESS_REG); +- outw(XMT_CMD, ioaddr + IO_PORT); +- outw(0, ioaddr + IO_PORT); +- outw(end, ioaddr + IO_PORT); +- outw(length, ioaddr + IO_PORT); +- outsw(ioaddr + IO_PORT, d, ETH_ALEN / 2); +- outsw(ioaddr + IO_PORT, nic->node_addr, ETH_ALEN / 2); +- type = htons(t); +- outsw(ioaddr + IO_PORT, &type, sizeof(type) / 2); +- outsw(ioaddr + IO_PORT, p, (s + 3) >> 1); +- /* A dummy read to flush the DRAM write pipeline */ +- status = inw(ioaddr + IO_PORT); +- outw(last, ioaddr + xmt_bar); +- outb(XMT_CMD, ioaddr); +- tx_start = last; +- tx_last = last; +- tx_end = end; +-#if 0 +- printf("%d %d\n", tx_start, tx_end); +-#endif +- while (boguscount > 0) { +- if (((status = inw(ioaddr + IO_PORT)) & TX_DONE_BIT) == 0) { +- udelay(40); +- boguscount--; +- continue; +- } +-#if DEBUG +- if ((status & 0x2000) == 0) +- printf("Transmit status %hX\n", status); +-#endif +- } +-} +- +-/************************************************************************** +-DISABLE - Turn off ethernet interface +-***************************************************************************/ +-static void eepro_disable(struct nic *nic) +-{ +- eepro_sw2bank0(ioaddr); /* Switch to bank 0 */ +- /* Flush the Tx and disable Rx */ +- outb(STOP_RCV_CMD, ioaddr); +- tx_start = tx_end = (XMT_LOWER_LIMIT << 8); +- tx_last = 0; +- /* Reset the 82595 */ +- eepro_full_reset(ioaddr); +-} +- +-static int read_eeprom(int location) +-{ +- int i; +- unsigned short retval = 0; +- int ee_addr = ioaddr + eeprom_reg; +- int read_cmd = location | EE_READ_CMD; +- int ctrl_val = EECS; +- +- if (eepro == LAN595FX_10ISA) { +- eepro_sw2bank1(ioaddr); +- outb(0x00, ioaddr + STATUS_REG); +- } +- eepro_sw2bank2(ioaddr); +- outb(ctrl_val, ee_addr); +- /* shift the read command bits out */ +- for (i = 8; i >= 0; i--) { +- short outval = (read_cmd & (1 << i)) ? ctrl_val | EEDI : ctrl_val; +- outb(outval, ee_addr); +- outb(outval | EESK, ee_addr); /* EEPROM clock tick */ +- eeprom_delay(); +- outb(outval, ee_addr); /* finish EEPROM clock tick */ +- eeprom_delay(); +- } +- outb(ctrl_val, ee_addr); +- for (i = 16; i > 0; i--) { +- outb(ctrl_val | EESK, ee_addr); +- eeprom_delay(); +- retval = (retval << 1) | ((inb(ee_addr) & EEDO) ? 1 : 0); +- outb(ctrl_val, ee_addr); +- eeprom_delay(); +- } +- /* terminate the EEPROM access */ +- ctrl_val &= ~EECS; +- outb(ctrl_val | EESK, ee_addr); +- eeprom_delay(); +- outb(ctrl_val, ee_addr); +- eeprom_delay(); +- eepro_sw2bank0(ioaddr); +- return (retval); +-} +- +-static int eepro_probe1(struct nic *nic) +-{ +- int i, id, counter, l_eepro = 0; +- union { +- unsigned char caddr[ETH_ALEN]; +- unsigned short saddr[ETH_ALEN/2]; +- } station_addr; +- char *name; +- +- id = inb(ioaddr + ID_REG); +- if ((id & ID_REG_MASK) != ID_REG_SIG) +- return (0); +- counter = id & R_ROBIN_BITS; +- if (((id = inb(ioaddr + ID_REG)) & R_ROBIN_BITS) != (counter + 0x40)) +- return (0); +- /* yes the 82595 has been found */ +- station_addr.saddr[2] = read_eeprom(2); +- if (station_addr.saddr[2] == 0x0000 || station_addr.saddr[2] == 0xFFFF) { +- l_eepro = 3; +- eepro = LAN595FX_10ISA; +- eeprom_reg= EEPROM_REG_10; +- rcv_start = RCV_START_10; +- xmt_lower_limit_reg = XMT_LOWER_LIMIT_REG_10; +- xmt_upper_limit_reg = XMT_UPPER_LIMIT_REG_10; +- station_addr.saddr[2] = read_eeprom(2); +- } +- station_addr.saddr[1] = read_eeprom(3); +- station_addr.saddr[0] = read_eeprom(4); +- if (l_eepro) +- name = "Intel EtherExpress 10 ISA"; +- else if (read_eeprom(7) == ee_FX_INT2IRQ) { +- name = "Intel EtherExpress Pro/10+ ISA"; +- l_eepro = 2; +- } else if (station_addr.saddr[0] == SA_ADDR1) { +- name = "Intel EtherExpress Pro/10 ISA"; +- l_eepro = 1; +- } else { +- l_eepro = 0; +- name = "Intel 82595-based LAN card"; +- } +- station_addr.saddr[0] = swap16(station_addr.saddr[0]); +- station_addr.saddr[1] = swap16(station_addr.saddr[1]); +- station_addr.saddr[2] = swap16(station_addr.saddr[2]); +- for (i = 0; i < ETH_ALEN; i++) { +- nic->node_addr[i] = station_addr.caddr[i]; +- } +- printf("\n%s ioaddr %#hX, addr %!", name, ioaddr, nic->node_addr); +- mem_start = RCV_LOWER_LIMIT << 8; +- if ((mem_end & 0x3F) < 3 || (mem_end & 0x3F) > 29) +- mem_end = RCV_UPPER_LIMIT << 8; +- else { +- mem_end = mem_end * 1024 + (RCV_LOWER_LIMIT << 8); +- rcv_ram = mem_end - (RCV_LOWER_LIMIT << 8); +- } +- printf(", Rx mem %dK, if %s\n", (mem_end - mem_start) >> 10, +- GetBit(read_eeprom(5), ee_BNC_TPE) ? "BNC" : "TP"); +- return (1); +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +-struct nic *eepro_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- unsigned short *p; +- /* same probe list as the Linux driver */ +- static unsigned short ioaddrs[] = { +- 0x300, 0x210, 0x240, 0x280, 0x2C0, 0x200, 0x320, 0x340, 0x360, 0}; +- +- if (probe_addrs == 0 || probe_addrs[0] == 0) +- probe_addrs = ioaddrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; p++) { +- if (eepro_probe1(nic)) +- break; +- } +- if (*p == 0) +- return (0); +- eepro_reset(nic); +- /* point to NIC specific routines */ +- nic->reset = eepro_reset; +- nic->poll = eepro_poll; +- nic->transmit = eepro_transmit; +- nic->disable = eepro_disable; +- return (nic); +-} +Index: b/netboot/eepro100.c +=================================================================== +--- a/netboot/eepro100.c ++++ b/netboot/eepro100.c +@@ -80,8 +80,8 @@ + * + * Caveats: + * +- * The etherboot framework moves the code to the 32k segment from +- * 0x98000 to 0xa0000. There is just a little room between the end of ++ * The Etherboot framework moves the code to the 48k segment from ++ * 0x94000 to 0xa0000. There is just a little room between the end of + * this driver and the 0xa0000 address. If you compile in too many + * features, this will overflow. + * The number under "hex" in the output of size that scrolls by while +@@ -92,17 +92,13 @@ + /* The etherboot authors seem to dislike the argument ordering in + * outb macros that Linux uses. I disklike the confusion that this + * has caused even more.... This file uses the Linux argument ordering. */ +-/* Sorry not us. It's inherted code from FreeBSD. [The authors] */ ++/* Sorry not us. It's inherited code from FreeBSD. [The authors] */ + + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + #include "timer.h" + +-#undef virt_to_bus +-#define virt_to_bus(x) ((unsigned long)x) +- + static int ioaddr; + + typedef unsigned char u8; +@@ -121,6 +117,18 @@ + SCBEarlyRx = 20, /* Early receive byte count. */ + }; + ++enum SCBCmdBits { ++ SCBMaskCmdDone=0x8000, SCBMaskRxDone=0x4000, SCBMaskCmdIdle=0x2000, ++ SCBMaskRxSuspend=0x1000, SCBMaskEarlyRx=0x0800, SCBMaskFlowCtl=0x0400, ++ SCBTriggerIntr=0x0200, SCBMaskAll=0x0100, ++ /* The rest are Rx and Tx commands. */ ++ CUStart=0x0010, CUResume=0x0020, CUStatsAddr=0x0040, CUShowStats=0x0050, ++ CUCmdBase=0x0060, /* CU Base address (set to zero) . */ ++ CUDumpStats=0x0070, /* Dump then reset stats counters. */ ++ RxStart=0x0001, RxResume=0x0002, RxAbort=0x0004, RxAddrLoad=0x0006, ++ RxResumeNoResources=0x0007, ++}; ++ + static int do_eeprom_cmd(int cmd, int cmd_len); + void hd(void *where, int n); + +@@ -139,8 +147,6 @@ + #define EE_WRITE_1 0x4806 + #define EE_ENB (0x4800 | EE_CS) + +-#define udelay(n) waiton_timer2(((n)*TICKS_PER_MS)/1000) +- + /* The EEPROM commands include the alway-set leading bit. */ + #define EE_READ_CMD 6 + +@@ -184,9 +190,18 @@ + Typically this takes 0 ticks. */ + static inline void wait_for_cmd_done(int cmd_ioaddr) + { +- short wait = 100; +- do ; +- while(inb(cmd_ioaddr) && --wait >= 0); ++ int wait = 0; ++ int delayed_cmd; ++ ++ do ++ if (inb(cmd_ioaddr) == 0) return; ++ while(++wait <= 100); ++ delayed_cmd = inb(cmd_ioaddr); ++ do ++ if (inb(cmd_ioaddr) == 0) break; ++ while(++wait <= 10000); ++ printf("Command %2.2x was not immediately accepted, %d ticks!\n", ++ delayed_cmd, wait); + } + + /* Elements of the dump_statistics block. This block must be lword aligned. */ +@@ -212,35 +227,30 @@ + + /* A speedo3 TX buffer descriptor with two buffers... */ + static struct TxFD { +- volatile s16 status; +- s16 command; +- u32 link; /* void * */ +- u32 tx_desc_addr; /* (almost) Always points to the tx_buf_addr element. */ +- s32 count; /* # of TBD (=2), Tx start thresh., etc. */ +- /* This constitutes two "TBD" entries: hdr and data */ +- u32 tx_buf_addr0; /* void *, header of frame to be transmitted. */ +- s32 tx_buf_size0; /* Length of Tx hdr. */ +- u32 tx_buf_addr1; /* void *, data to be transmitted. */ +- s32 tx_buf_size1; /* Length of Tx data. */ ++ volatile s16 status; ++ s16 command; ++ u32 link; /* void * */ ++ u32 tx_desc_addr; /* (almost) Always points to the tx_buf_addr element. */ ++ s32 count; /* # of TBD (=2), Tx start thresh., etc. */ ++ /* This constitutes two "TBD" entries: hdr and data */ ++ u32 tx_buf_addr0; /* void *, header of frame to be transmitted. */ ++ s32 tx_buf_size0; /* Length of Tx hdr. */ ++ u32 tx_buf_addr1; /* void *, data to be transmitted. */ ++ s32 tx_buf_size1; /* Length of Tx data. */ + } txfd; + + struct RxFD { /* Receive frame descriptor. */ +- volatile s16 status; +- s16 command; +- u32 link; /* struct RxFD * */ +- u32 rx_buf_addr; /* void * */ +- u16 count; +- u16 size; +- char packet[1518]; ++ volatile s16 status; ++ s16 command; ++ u32 link; /* struct RxFD * */ ++ u32 rx_buf_addr; /* void * */ ++ u16 count; ++ u16 size; ++ char packet[1518]; + }; + +-#ifdef USE_LOWMEM_BUFFER +-#define rxfd ((struct RxFD *)(0x10000 - sizeof(struct RxFD))) +-#define ACCESS(x) x-> +-#else + static struct RxFD rxfd; + #define ACCESS(x) x. +-#endif + + static int congenb = 0; /* Enable congestion control in the DP83840. */ + static int txfifo = 8; /* Tx FIFO threshold in 4 byte units, 0-15 */ +@@ -256,8 +266,7 @@ + u32 link; + unsigned char data[22]; + } confcmd = { +- 0, CmdConfigure, +- (u32) & txfd, ++ 0, 0, 0, /* filled in later */ + {22, 0x08, 0, 0, 0, 0x80, 0x32, 0x03, 1, /* 1=Use MII 0=Use AUI */ + 0, 0x2E, 0, 0x60, 0, + 0xf2, 0x48, 0, 0x40, 0xf2, 0x80, /* 0x40=Force full-duplex */ +@@ -276,19 +285,20 @@ + + static int mdio_write(int phy_id, int location, int value) + { +- int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */ ++ int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */ + +- outl(0x04000000 | (location<<16) | (phy_id<<21) | value, +- ioaddr + SCBCtrlMDI); +- do { +- udelay(16); +- +- val = inl(ioaddr + SCBCtrlMDI); +- if (--boguscnt < 0) { +- printf(" mdio_write() timed out with val = %X.\n", val); +- } +- } while (! (val & 0x10000000)); +- return val & 0xffff; ++ outl(0x04000000 | (location<<16) | (phy_id<<21) | value, ++ ioaddr + SCBCtrlMDI); ++ do { ++ udelay(16); ++ ++ val = inl(ioaddr + SCBCtrlMDI); ++ if (--boguscnt < 0) { ++ printf(" mdio_write() timed out with val = %X.\n", val); ++ break; ++ } ++ } while (! (val & 0x10000000)); ++ return val & 0xffff; + } + + /* Support function: mdio_read +@@ -298,17 +308,19 @@ + */ + static int mdio_read(int phy_id, int location) + { +- int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */ +- outl(0x08000000 | (location<<16) | (phy_id<<21), ioaddr + SCBCtrlMDI); +- do { +- udelay(16); +- +- val = inl(ioaddr + SCBCtrlMDI); +- if (--boguscnt < 0) { +- printf( " mdio_read() timed out with val = %X.\n", val); +- } +- } while (! (val & 0x10000000)); +- return val & 0xffff; ++ int val, boguscnt = 64*4; /* <64 usec. to complete, typ 27 ticks */ ++ outl(0x08000000 | (location<<16) | (phy_id<<21), ioaddr + SCBCtrlMDI); ++ do { ++ udelay(16); ++ ++ val = inl(ioaddr + SCBCtrlMDI); ++ ++ if (--boguscnt < 0) { ++ printf( " mdio_read() timed out with val = %X.\n", val); ++ break; ++ } ++ } while (! (val & 0x10000000)); ++ return val & 0xffff; + } + + /* The fixes for the code were kindly provided by Dragan Stancevic +@@ -340,25 +352,26 @@ + return retval; + } + ++#if 0 + static inline void whereami (const char *str) + { +-#if 0 + printf ("%s\n", str); + sleep (2); +-#endif + } ++#else ++#define whereami(s) ++#endif + +-/* function: eepro100_reset +- * resets the card. This is used to allow Etherboot to probe the card again +- * from a "virginal" state.... +- * Arguments: none +- * +- * returns: void. +- */ +- +-static void eepro100_reset(struct nic *nic) ++static void eepro100_irq(struct nic *nic __unused, irq_action_t action __unused) + { +- outl(0, ioaddr + SCBPort); ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } + } + + /* function: eepro100_transmit +@@ -373,61 +386,87 @@ + + static void eepro100_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p) + { +- struct eth_hdr { +- unsigned char dst_addr[ETH_ALEN]; +- unsigned char src_addr[ETH_ALEN]; +- unsigned short type; +- } hdr; +- unsigned short status; +- int to; +- int s1, s2; +- +- status = inw(ioaddr + SCBStatus); +- /* Acknowledge all of the current interrupt sources ASAP. */ +- outw(status & 0xfc00, ioaddr + SCBStatus); ++ struct eth_hdr { ++ unsigned char dst_addr[ETH_ALEN]; ++ unsigned char src_addr[ETH_ALEN]; ++ unsigned short type; ++ } hdr; ++ unsigned short status; ++ int s1, s2; ++ ++ status = inw(ioaddr + SCBStatus); ++ /* Acknowledge all of the current interrupt sources ASAP. */ ++ outw(status & 0xfc00, ioaddr + SCBStatus); + + #ifdef DEBUG +- printf ("transmitting type %hX packet (%d bytes). status = %hX, cmd=%hX\n", +- t, s, status, inw (ioaddr + SCBCmd)); ++ printf ("transmitting type %hX packet (%d bytes). status = %hX, cmd=%hX\n", ++ t, s, status, inw (ioaddr + SCBCmd)); + #endif + +- memcpy (&hdr.dst_addr, d, ETH_ALEN); +- memcpy (&hdr.src_addr, nic->node_addr, ETH_ALEN); ++ memcpy (&hdr.dst_addr, d, ETH_ALEN); ++ memcpy (&hdr.src_addr, nic->node_addr, ETH_ALEN); + +- hdr.type = htons (t); ++ hdr.type = htons (t); + +- txfd.status = 0; +- txfd.command = CmdSuspend | CmdTx | CmdTxFlex; +- txfd.link = virt_to_bus (&txfd); +- txfd.count = 0x02208000; +- txfd.tx_desc_addr = (u32)&txfd.tx_buf_addr0; ++ txfd.status = 0; ++ txfd.command = CmdSuspend | CmdTx | CmdTxFlex; ++ txfd.link = virt_to_bus (&txfd); ++ txfd.count = 0x02208000; ++ txfd.tx_desc_addr = virt_to_bus(&txfd.tx_buf_addr0); + +- txfd.tx_buf_addr0 = virt_to_bus (&hdr); +- txfd.tx_buf_size0 = sizeof (hdr); ++ txfd.tx_buf_addr0 = virt_to_bus (&hdr); ++ txfd.tx_buf_size0 = sizeof (hdr); + +- txfd.tx_buf_addr1 = virt_to_bus (p); +- txfd.tx_buf_size1 = s; ++ txfd.tx_buf_addr1 = virt_to_bus (p); ++ txfd.tx_buf_size1 = s; + + #ifdef DEBUG +- printf ("txfd: \n"); +- hd (&txfd, sizeof (txfd)); ++ printf ("txfd: \n"); ++ hd (&txfd, sizeof (txfd)); + #endif + +- outl(virt_to_bus(&txfd), ioaddr + SCBPointer); +- outw(INT_MASK | CU_START, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); +- +- s1 = inw (ioaddr + SCBStatus); +- load_timer2(10*TICKS_PER_MS); /* timeout 10 ms for transmit */ +- while (!txfd.status && timer2_running()) +- /* Wait */; +- s2 = inw (ioaddr + SCBStatus); ++ outl(virt_to_bus(&txfd), ioaddr + SCBPointer); ++ outw(INT_MASK | CU_START, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ ++ s1 = inw (ioaddr + SCBStatus); ++ load_timer2(10*TICKS_PER_MS); /* timeout 10 ms for transmit */ ++ while (!txfd.status && timer2_running()) ++ /* Wait */; ++ s2 = inw (ioaddr + SCBStatus); + + #ifdef DEBUG +- printf ("s1 = %hX, s2 = %hX.\n", s1, s2); ++ printf ("s1 = %hX, s2 = %hX.\n", s1, s2); + #endif + } + ++/* ++ * Sometimes the receiver stops making progress. This routine knows how to ++ * get it going again, without losing packets or being otherwise nasty like ++ * a chip reset would be. Previously the driver had a whole sequence ++ * of if RxSuspended, if it's no buffers do one thing, if it's no resources, ++ * do another, etc. But those things don't really matter. Separate logic ++ * in the ISR provides for allocating buffers--the other half of operation ++ * is just making sure the receiver is active. speedo_rx_soft_reset does that. ++ * This problem with the old, more involved algorithm is shown up under ++ * ping floods on the order of 60K packets/second on a 100Mbps fdx network. ++ */ ++static void ++speedo_rx_soft_reset(void) ++{ ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ /* ++ * Put the hardware into a known state. ++ */ ++ outb(RX_ABORT, ioaddr + SCBCmd); ++ ++ ACCESS(rxfd)rx_buf_addr = 0xffffffff; ++ ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ ++ outb(RX_START, ioaddr + SCBCmd); ++} ++ + /* function: eepro100_poll / eth_poll + * This recieves a packet from the network. + * +@@ -440,34 +479,87 @@ + * returns the length of the packet in nic->packetlen. + */ + +-static int eepro100_poll(struct nic *nic) ++static int eepro100_poll(struct nic *nic, int retrieve) + { +- if (!ACCESS(rxfd)status) +- return 0; ++ unsigned int status; ++ status = inw(ioaddr + SCBStatus); + +- /* Ok. We got a packet. Now restart the reciever.... */ +- ACCESS(rxfd)status = 0; +- ACCESS(rxfd)command = 0xc000; +- outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); +- outw(INT_MASK | RX_START, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); ++ if (!ACCESS(rxfd)status) ++ return 0; ++ ++ /* There is a packet ready */ ++ if ( ! retrieve ) return 1; ++ ++ /* ++ * The chip may have suspended reception for various reasons. ++ * Check for that, and re-prime it should this be the case. ++ */ ++ switch ((status >> 2) & 0xf) { ++ case 0: /* Idle */ ++ break; ++ case 1: /* Suspended */ ++ case 2: /* No resources (RxFDs) */ ++ case 9: /* Suspended with no more RBDs */ ++ case 10: /* No resources due to no RBDs */ ++ case 12: /* Ready with no RBDs */ ++ speedo_rx_soft_reset(); ++ break; ++ case 3: case 5: case 6: case 7: case 8: ++ case 11: case 13: case 14: case 15: ++ /* these are all reserved values */ ++ break; ++ } ++ ++ /* Ok. We got a packet. Now restart the reciever.... */ ++ ACCESS(rxfd)status = 0; ++ ACCESS(rxfd)command = 0xc000; ++ outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); ++ outw(INT_MASK | RX_START, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); + + #ifdef DEBUG +- printf ("Got a packet: Len = %d.\n", ACCESS(rxfd)count & 0x3fff); ++ printf ("Got a packet: Len = %d.\n", ACCESS(rxfd)count & 0x3fff); + #endif +- nic->packetlen = ACCESS(rxfd)count & 0x3fff; +- memcpy (nic->packet, ACCESS(rxfd)packet, nic->packetlen); ++ nic->packetlen = ACCESS(rxfd)count & 0x3fff; ++ memcpy (nic->packet, ACCESS(rxfd)packet, nic->packetlen); + #ifdef DEBUG +- hd (nic->packet, 0x30); ++ hd (nic->packet, 0x30); + #endif +- return 1; ++ return 1; + } + +-static void eepro100_disable(struct nic *nic) ++/* function: eepro100_disable ++ * resets the card. This is used to allow Etherboot or Linux ++ * to probe the card again from a "virginal" state.... ++ * Arguments: none ++ * ++ * returns: void. ++ */ ++static void eepro100_disable(struct dev *dev __unused) + { +- /* See if this PartialReset solves the problem with interfering with +- kernel operation after Etherboot hands over. - Ken 20001102 */ +- outl(2, ioaddr + SCBPort); ++/* from eepro100_reset */ ++ outl(0, ioaddr + SCBPort); ++/* from eepro100_disable */ ++ /* See if this PartialReset solves the problem with interfering with ++ kernel operation after Etherboot hands over. - Ken 20001102 */ ++ outl(2, ioaddr + SCBPort); ++ ++ /* The following is from the Intel e100 driver. ++ * This hopefully solves the problem with hanging hard DOS images. */ ++ ++ /* wait for the reset to take effect */ ++ udelay(20); ++ ++ /* Mask off our interrupt line -- it is unmasked after reset */ ++ { ++ u16 intr_status; ++ /* Disable interrupts on our PCI board by setting the mask bit */ ++ outw(INT_MASK, ioaddr + SCBCmd); ++ intr_status = inw(ioaddr + SCBStatus); ++ /* ack and clear intrs */ ++ outw(intr_status, ioaddr + SCBStatus); ++ inw(ioaddr + SCBStatus); ++ } + } + + /* exported function: eepro100_probe / eth_probe +@@ -478,25 +570,30 @@ + * leaves the 82557 initialized, and ready to recieve packets. + */ + +-struct nic *eepro100_probe(struct nic *nic, unsigned short *probeaddrs, struct pci_device *p) ++static int eepro100_probe(struct dev *dev, struct pci_device *p) + { ++ struct nic *nic = (struct nic *)dev; + unsigned short sum = 0; + int i; + int read_cmd, ee_size; +- unsigned short value; + int options; +- int promisc; ++ int rx_mode; + + /* we cache only the first few words of the EEPROM data + be careful not to access beyond this array */ + unsigned short eeprom[16]; + +- if (probeaddrs == 0 || probeaddrs[0] == 0) ++ if (p->ioaddr == 0) + return 0; +- ioaddr = probeaddrs[0] & ~3; /* Mask the bit that says "this is an io addr" */ ++ ioaddr = p->ioaddr & ~3; /* Mask the bit that says "this is an io addr" */ ++ nic->ioaddr = ioaddr; + + adjust_pci_device(p); + ++ /* Copy IRQ from PCI information */ ++ /* nic->irqno = pci->irq; */ ++ nic->irqno = 0; ++ + if ((do_eeprom_cmd(EE_READ_CMD << 24, 27) & 0xffe0000) + == 0xffe0000) { + ee_size = 0x100; +@@ -513,123 +610,138 @@ + sum += value; + } + +- for (i=0;inode_addr[i] = (eeprom[i/2] >> (8*(i&1))) & 0xff; +- } +- printf ("Ethernet addr: %!\n", nic->node_addr); +- +- if (sum != 0xBABA) +- printf("eepro100: Invalid EEPROM checksum %#hX, " +- "check settings before activating this device!\n", sum); +- outl(0, ioaddr + SCBPort); +- udelay (10000); +- +- whereami ("Got eeprom."); +- +- outl(virt_to_bus(&lstats), ioaddr + SCBPointer); +- outw(INT_MASK | CU_STATSADDR, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); +- +- whereami ("set stats addr."); +- /* INIT RX stuff. */ +- +- /* Base = 0 */ +- outl(0, ioaddr + SCBPointer); +- outw(INT_MASK | RX_ADDR_LOAD, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); +- +- whereami ("set rx base addr."); +- +- ACCESS(rxfd)status = 0x0001; +- ACCESS(rxfd)command = 0x0000; +- ACCESS(rxfd)link = virt_to_bus(&(ACCESS(rxfd)status)); +- ACCESS(rxfd)rx_buf_addr = (int) &nic->packet; +- ACCESS(rxfd)count = 0; +- ACCESS(rxfd)size = 1528; +- +- outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); +- outw(INT_MASK | RX_START, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); +- +- whereami ("started RX process."); +- +- /* Start the reciever.... */ +- ACCESS(rxfd)status = 0; +- ACCESS(rxfd)command = 0xc000; +- outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); +- outw(INT_MASK | RX_START, ioaddr + SCBCmd); +- +- /* INIT TX stuff. */ +- +- /* Base = 0 */ +- outl(0, ioaddr + SCBPointer); +- outw(INT_MASK | CU_CMD_BASE, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); +- +- whereami ("set TX base addr."); +- +- txfd.command = (CmdIASetup); +- txfd.status = 0x0000; +- txfd.link = virt_to_bus (&confcmd); +- +- { +- char *t = (char *)&txfd.tx_desc_addr; ++ for (i=0;inode_addr[i] = (eeprom[i/2] >> (8*(i&1))) & 0xff; ++ } ++ printf ("Ethernet addr: %!\n", nic->node_addr); + +- for (i=0;inode_addr[i]; +- } ++ if (sum != 0xBABA) ++ printf("eepro100: Invalid EEPROM checksum %#hX, " ++ "check settings before activating this device!\n", sum); ++ outl(0, ioaddr + SCBPort); ++ udelay (10000); ++ whereami ("Got eeprom."); ++ ++ /* Base = 0 */ ++ outl(0, ioaddr + SCBPointer); ++ outw(INT_MASK | RX_ADDR_LOAD, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ whereami ("set rx base addr."); ++ ++ outl(virt_to_bus(&lstats), ioaddr + SCBPointer); ++ outw(INT_MASK | CU_STATSADDR, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ whereami ("set stats addr."); ++ ++ /* INIT RX stuff. */ ++ ACCESS(rxfd)status = 0x0001; ++ ACCESS(rxfd)command = 0x0000; ++ ACCESS(rxfd)link = virt_to_bus(&(ACCESS(rxfd)status)); ++ ACCESS(rxfd)rx_buf_addr = virt_to_bus(&nic->packet); ++ ACCESS(rxfd)count = 0; ++ ACCESS(rxfd)size = 1528; ++ ++ outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); ++ outw(INT_MASK | RX_START, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ ++ whereami ("started RX process."); ++ ++ /* Start the reciever.... */ ++ ACCESS(rxfd)status = 0; ++ ACCESS(rxfd)command = 0xc000; ++ outl(virt_to_bus(&(ACCESS(rxfd)status)), ioaddr + SCBPointer); ++ outw(INT_MASK | RX_START, ioaddr + SCBCmd); ++ ++ /* INIT TX stuff. */ ++ ++ /* Base = 0 */ ++ outl(0, ioaddr + SCBPointer); ++ outw(INT_MASK | CU_CMD_BASE, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ ++ whereami ("set TX base addr."); ++ ++ txfd.command = (CmdIASetup); ++ txfd.status = 0x0000; ++ txfd.link = virt_to_bus (&confcmd); ++ ++ { ++ char *t = (char *)&txfd.tx_desc_addr; ++ ++ for (i=0;inode_addr[i]; ++ } + + #ifdef DEBUG +- printf ("Setup_eaddr:\n"); +- hd (&txfd, 0x20); ++ printf ("Setup_eaddr:\n"); ++ hd (&txfd, 0x20); + #endif +- /* options = 0x40; */ /* 10mbps half duplex... */ +- options = 0x00; /* Autosense */ +- +- promisc = 0; +- +- if ( ((eeprom[6]>>8) & 0x3f) == DP83840 +- || ((eeprom[6]>>8) & 0x3f) == DP83840A) { +- int mdi_reg23 = mdio_read(eeprom[6] & 0x1f, 23) | 0x0422; +- if (congenb) +- mdi_reg23 |= 0x0100; +- printf(" DP83840 specific setup, setting register 23 to %hX.\n", +- mdi_reg23); +- mdio_write(eeprom[6] & 0x1f, 23, mdi_reg23); +- } +- whereami ("Done DP8340 special setup."); +- if (options != 0) { +- mdio_write(eeprom[6] & 0x1f, 0, +- ((options & 0x20) ? 0x2000 : 0) | /* 100mbps? */ +- ((options & 0x10) ? 0x0100 : 0)); /* Full duplex? */ +- whereami ("set mdio_register."); +- } ++ /* options = 0x40; */ /* 10mbps half duplex... */ ++ options = 0x00; /* Autosense */ + +- confcmd.command = CmdSuspend | CmdConfigure; +- confcmd.status = 0x0000; +- confcmd.link = virt_to_bus (&txfd); +- confcmd.data[1] = (txfifo << 4) | rxfifo; +- confcmd.data[4] = rxdmacount; +- confcmd.data[5] = txdmacount + 0x80; +- confcmd.data[15] = promisc ? 0x49: 0x48; +- confcmd.data[19] = (options & 0x10) ? 0xC0 : 0x80; +- confcmd.data[21] = promisc ? 0x0D: 0x05; ++#ifdef PROMISC ++ rx_mode = 3; ++#elif ALLMULTI ++ rx_mode = 1; ++#else ++ rx_mode = 0; ++#endif + +- outl(virt_to_bus(&txfd), ioaddr + SCBPointer); +- outw(INT_MASK | CU_START, ioaddr + SCBCmd); +- wait_for_cmd_done(ioaddr + SCBCmd); ++ if ( ((eeprom[6]>>8) & 0x3f) == DP83840 ++ || ((eeprom[6]>>8) & 0x3f) == DP83840A) { ++ int mdi_reg23 = mdio_read(eeprom[6] & 0x1f, 23) | 0x0422; ++ if (congenb) ++ mdi_reg23 |= 0x0100; ++ printf(" DP83840 specific setup, setting register 23 to %hX.\n", ++ mdi_reg23); ++ mdio_write(eeprom[6] & 0x1f, 23, mdi_reg23); ++ } ++ whereami ("Done DP8340 special setup."); ++ if (options != 0) { ++ mdio_write(eeprom[6] & 0x1f, 0, ++ ((options & 0x20) ? 0x2000 : 0) | /* 100mbps? */ ++ ((options & 0x10) ? 0x0100 : 0)); /* Full duplex? */ ++ whereami ("set mdio_register."); ++ } + +- whereami ("started TX thingy (config, iasetup)."); ++ confcmd.command = CmdSuspend | CmdConfigure; ++ confcmd.status = 0x0000; ++ confcmd.link = virt_to_bus (&txfd); ++ confcmd.data[1] = (txfifo << 4) | rxfifo; ++ confcmd.data[4] = rxdmacount; ++ confcmd.data[5] = txdmacount + 0x80; ++ confcmd.data[15] = (rx_mode & 2) ? 0x49: 0x48; ++ confcmd.data[19] = (options & 0x10) ? 0xC0 : 0x80; ++ confcmd.data[21] = (rx_mode & 1) ? 0x0D: 0x05; ++ ++ outl(virt_to_bus(&txfd), ioaddr + SCBPointer); ++ outw(INT_MASK | CU_START, ioaddr + SCBCmd); ++ wait_for_cmd_done(ioaddr + SCBCmd); ++ ++ whereami ("started TX thingy (config, iasetup)."); ++ ++ load_timer2(10*TICKS_PER_MS); ++ while (!txfd.status && timer2_running()) ++ /* Wait */; ++ ++ /* Read the status register once to disgard stale data */ ++ mdio_read(eeprom[6] & 0x1f, 1); ++ /* Check to see if the network cable is plugged in. ++ * This allows for faster failure if there is nothing ++ * we can do. ++ */ ++ if (!(mdio_read(eeprom[6] & 0x1f, 1) & (1 << 2))) { ++ printf("Valid link not established\n"); ++ eepro100_disable(dev); ++ return 0; ++ } + +- load_timer2(10*TICKS_PER_MS); +- while (!txfd.status && timer2_running()) +- /* Wait */; +- +- nic->reset = eepro100_reset; +- nic->poll = eepro100_poll; +- nic->transmit = eepro100_transmit; +- nic->disable = eepro100_disable; +- return nic; ++ dev->disable = eepro100_disable; ++ nic->poll = eepro100_poll; ++ nic->transmit = eepro100_transmit; ++ nic->irq = eepro100_irq; ++ return 1; + } + + /*********************************************************************/ +@@ -639,16 +751,59 @@ + /* Hexdump a number of bytes from memory... */ + void hd (void *where, int n) + { +- int i; ++ int i; + +- while (n > 0) { +- printf ("%X ", where); +- for (i=0;i < ( (n>16)?16:n);i++) +- printf (" %hhX", ((char *)where)[i]); +- printf ("\n"); +- n -= 16; +- where += 16; +- } ++ while (n > 0) { ++ printf ("%X ", where); ++ for (i=0;i < ( (n>16)?16:n);i++) ++ printf (" %hhX", ((char *)where)[i]); ++ printf ("\n"); ++ n -= 16; ++ where += 16; ++ } + } + #endif + ++static struct pci_id eepro100_nics[] = { ++PCI_ROM(0x8086, 0x1029, "id1029", "Intel EtherExpressPro100 ID1029"), ++PCI_ROM(0x8086, 0x1030, "id1030", "Intel EtherExpressPro100 ID1030"), ++PCI_ROM(0x8086, 0x1031, "82801cam", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"), ++PCI_ROM(0x8086, 0x1032, "eepro100-1032", "Intel PRO/100 VE Network Connection"), ++PCI_ROM(0x8086, 0x1033, "eepro100-1033", "Intel PRO/100 VM Network Connection"), ++PCI_ROM(0x8086, 0x1034, "eepro100-1034", "Intel PRO/100 VM Network Connection"), ++PCI_ROM(0x8086, 0x1035, "eepro100-1035", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"), ++PCI_ROM(0x8086, 0x1036, "eepro100-1036", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"), ++PCI_ROM(0x8086, 0x1037, "eepro100-1037", "Intel 82801CAM (ICH3) Chipset Ethernet Controller"), ++PCI_ROM(0x8086, 0x1038, "id1038", "Intel PRO/100 VM Network Connection"), ++PCI_ROM(0x8086, 0x1039, "82562et", "Intel PRO100 VE 82562ET"), ++PCI_ROM(0x8086, 0x103a, "id103a", "Intel Corporation 82559 InBusiness 10/100"), ++PCI_ROM(0x8086, 0x103b, "82562etb", "Intel PRO100 VE 82562ETB"), ++PCI_ROM(0x8086, 0x103c, "eepro100-103c", "Intel PRO/100 VM Network Connection"), ++PCI_ROM(0x8086, 0x103d, "eepro100-103d", "Intel PRO/100 VE Network Connection"), ++PCI_ROM(0x8086, 0x103e, "eepro100-103e", "Intel PRO/100 VM Network Connection"), ++PCI_ROM(0x8086, 0x1059, "82551qm", "Intel PRO/100 M Mobile Connection"), ++PCI_ROM(0x8086, 0x1209, "82559er", "Intel EtherExpressPro100 82559ER"), ++PCI_ROM(0x8086, 0x1227, "82865", "Intel 82865 EtherExpress PRO/100A"), ++PCI_ROM(0x8086, 0x1228, "82556", "Intel 82556 EtherExpress PRO/100 Smart"), ++PCI_ROM(0x8086, 0x1229, "eepro100", "Intel EtherExpressPro100"), ++PCI_ROM(0x8086, 0x2449, "82562em", "Intel EtherExpressPro100 82562EM"), ++PCI_ROM(0x8086, 0x2459, "82562-1", "Intel 82562 based Fast Ethernet Connection"), ++PCI_ROM(0x8086, 0x245d, "82562-2", "Intel 82562 based Fast Ethernet Connection"), ++PCI_ROM(0x8086, 0x1050, "82562ez", "Intel 82562EZ Network Connection"), ++PCI_ROM(0x8086, 0x5200, "eepro100-5200", "Intel EtherExpress PRO/100 Intelligent Server"), ++PCI_ROM(0x8086, 0x5201, "eepro100-5201", "Intel EtherExpress PRO/100 Intelligent Server"), ++}; ++ ++/* Cards with device ids 0x1030 to 0x103F, 0x2449, 0x2459 or 0x245D might need ++ * a workaround for hardware bug on 10 mbit half duplex (see linux driver eepro100.c) ++ * 2003/03/17 gbaum */ ++ ++ ++struct pci_driver eepro100_driver = { ++ .type = NIC_DRIVER, ++ .name = "EEPRO100", ++ .probe = eepro100_probe, ++ .ids = eepro100_nics, ++ .id_count = sizeof(eepro100_nics)/sizeof(eepro100_nics[0]), ++ .class = 0 ++}; +Index: b/netboot/elf.h +=================================================================== +--- /dev/null ++++ b/netboot/elf.h +@@ -0,0 +1,234 @@ ++#ifndef ELF_H ++#define ELF_H ++ ++#define EI_NIDENT 16 /* Size of e_ident array. */ ++ ++/* Values for e_type. */ ++#define ET_NONE 0 /* No file type */ ++#define ET_REL 1 /* Relocatable file */ ++#define ET_EXEC 2 /* Executable file */ ++#define ET_DYN 3 /* Shared object file */ ++#define ET_CORE 4 /* Core file */ ++ ++/* Values for e_machine (architecute). */ ++#define EM_NONE 0 /* No machine */ ++#define EM_M32 1 /* AT&T WE 32100 */ ++#define EM_SPARC 2 /* SUN SPARC */ ++#define EM_386 3 /* Intel 80386+ */ ++#define EM_68K 4 /* Motorola m68k family */ ++#define EM_88K 5 /* Motorola m88k family */ ++#define EM_486 6 /* Perhaps disused */ ++#define EM_860 7 /* Intel 80860 */ ++#define EM_MIPS 8 /* MIPS R3000 big-endian */ ++#define EM_S370 9 /* IBM System/370 */ ++#define EM_MIPS_RS3_LE 10 /* MIPS R3000 little-endian */ ++ ++#define EM_PARISC 15 /* HPPA */ ++#define EM_VPP500 17 /* Fujitsu VPP500 */ ++#define EM_SPARC32PLUS 18 /* Sun's "v8plus" */ ++#define EM_960 19 /* Intel 80960 */ ++#define EM_PPC 20 /* PowerPC */ ++#define EM_PPC64 21 /* PowerPC 64-bit */ ++#define EM_S390 22 /* IBM S390 */ ++ ++#define EM_V800 36 /* NEC V800 series */ ++#define EM_FR20 37 /* Fujitsu FR20 */ ++#define EM_RH32 38 /* TRW RH-32 */ ++#define EM_RCE 39 /* Motorola RCE */ ++#define EM_ARM 40 /* ARM */ ++#define EM_FAKE_ALPHA 41 /* Digital Alpha */ ++#define EM_SH 42 /* Hitachi SH */ ++#define EM_SPARCV9 43 /* SPARC v9 64-bit */ ++#define EM_TRICORE 44 /* Siemens Tricore */ ++#define EM_ARC 45 /* Argonaut RISC Core */ ++#define EM_H8_300 46 /* Hitachi H8/300 */ ++#define EM_H8_300H 47 /* Hitachi H8/300H */ ++#define EM_H8S 48 /* Hitachi H8S */ ++#define EM_H8_500 49 /* Hitachi H8/500 */ ++#define EM_IA_64 50 /* Intel Merced */ ++#define EM_MIPS_X 51 /* Stanford MIPS-X */ ++#define EM_COLDFIRE 52 /* Motorola Coldfire */ ++#define EM_68HC12 53 /* Motorola M68HC12 */ ++#define EM_MMA 54 /* Fujitsu MMA Multimedia Accelerator*/ ++#define EM_PCP 55 /* Siemens PCP */ ++#define EM_NCPU 56 /* Sony nCPU embeeded RISC */ ++#define EM_NDR1 57 /* Denso NDR1 microprocessor */ ++#define EM_STARCORE 58 /* Motorola Start*Core processor */ ++#define EM_ME16 59 /* Toyota ME16 processor */ ++#define EM_ST100 60 /* STMicroelectronic ST100 processor */ ++#define EM_TINYJ 61 /* Advanced Logic Corp. Tinyj emb.fam*/ ++#define EM_X86_64 62 /* AMD x86-64 architecture */ ++#define EM_PDSP 63 /* Sony DSP Processor */ ++ ++#define EM_FX66 66 /* Siemens FX66 microcontroller */ ++#define EM_ST9PLUS 67 /* STMicroelectronics ST9+ 8/16 mc */ ++#define EM_ST7 68 /* STmicroelectronics ST7 8 bit mc */ ++#define EM_68HC16 69 /* Motorola MC68HC16 microcontroller */ ++#define EM_68HC11 70 /* Motorola MC68HC11 microcontroller */ ++#define EM_68HC08 71 /* Motorola MC68HC08 microcontroller */ ++#define EM_68HC05 72 /* Motorola MC68HC05 microcontroller */ ++#define EM_SVX 73 /* Silicon Graphics SVx */ ++#define EM_AT19 74 /* STMicroelectronics ST19 8 bit mc */ ++#define EM_VAX 75 /* Digital VAX */ ++#define EM_CRIS 76 /* Axis Communications 32-bit embedded processor */ ++#define EM_JAVELIN 77 /* Infineon Technologies 32-bit embedded processor */ ++#define EM_FIREPATH 78 /* Element 14 64-bit DSP Processor */ ++#define EM_ZSP 79 /* LSI Logic 16-bit DSP Processor */ ++#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */ ++#define EM_HUANY 81 /* Harvard University machine-independent object files */ ++#define EM_PRISM 82 /* SiTera Prism */ ++#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */ ++#define EM_FR30 84 /* Fujitsu FR30 */ ++#define EM_D10V 85 /* Mitsubishi D10V */ ++#define EM_D30V 86 /* Mitsubishi D30V */ ++#define EM_V850 87 /* NEC v850 */ ++#define EM_M32R 88 /* Mitsubishi M32R */ ++#define EM_MN10300 89 /* Matsushita MN10300 */ ++#define EM_MN10200 90 /* Matsushita MN10200 */ ++#define EM_PJ 91 /* picoJava */ ++#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */ ++#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */ ++#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */ ++#define EM_NUM 95 ++ ++/* Values for p_type. */ ++#define PT_NULL 0 /* Unused entry. */ ++#define PT_LOAD 1 /* Loadable segment. */ ++#define PT_DYNAMIC 2 /* Dynamic linking information segment. */ ++#define PT_INTERP 3 /* Pathname of interpreter. */ ++#define PT_NOTE 4 /* Auxiliary information. */ ++#define PT_SHLIB 5 /* Reserved (not used). */ ++#define PT_PHDR 6 /* Location of program header itself. */ ++ ++/* Values for p_flags. */ ++#define PF_X 0x1 /* Executable. */ ++#define PF_W 0x2 /* Writable. */ ++#define PF_R 0x4 /* Readable. */ ++ ++ ++#define ELF_PROGRAM_RETURNS_BIT 0x8000000 /* e_flags bit 31 */ ++ ++#define EI_MAG0 0 ++#define ELFMAG0 0x7f ++ ++#define EI_MAG1 1 ++#define ELFMAG1 'E' ++ ++#define EI_MAG2 2 ++#define ELFMAG2 'L' ++ ++#define EI_MAG3 3 ++#define ELFMAG3 'F' ++ ++#define ELFMAG "\177ELF" ++ ++#define EI_CLASS 4 /* File class byte index */ ++#define ELFCLASSNONE 0 /* Invalid class */ ++#define ELFCLASS32 1 /* 32-bit objects */ ++#define ELFCLASS64 2 /* 64-bit objects */ ++ ++#define EI_DATA 5 /* Data encodeing byte index */ ++#define ELFDATANONE 0 /* Invalid data encoding */ ++#define ELFDATA2LSB 1 /* 2's complement little endian */ ++#define ELFDATA2MSB 2 /* 2's complement big endian */ ++ ++#define EI_VERSION 6 /* File version byte index */ ++ /* Value must be EV_CURRENT */ ++ ++#define EV_NONE 0 /* Invalid ELF Version */ ++#define EV_CURRENT 1 /* Current version */ ++ ++#define ELF32_PHDR_SIZE (8*4) /* Size of an elf program header */ ++ ++#ifndef ASSEMBLY ++/* ++ * ELF definitions common to all 32-bit architectures. ++ */ ++ ++typedef uint32_t Elf32_Addr; ++typedef uint16_t Elf32_Half; ++typedef uint32_t Elf32_Off; ++typedef int32_t Elf32_Sword; ++typedef uint32_t Elf32_Word; ++typedef uint32_t Elf32_Size; ++ ++typedef uint64_t Elf64_Addr; ++typedef uint16_t Elf64_Half; ++typedef uint64_t Elf64_Off; ++typedef int32_t Elf64_Sword; ++typedef uint32_t Elf64_Word; ++typedef uint64_t Elf64_Size; ++ ++/* ++ * ELF header. ++ */ ++typedef struct { ++ unsigned char e_ident[EI_NIDENT]; /* File identification. */ ++ Elf32_Half e_type; /* File type. */ ++ Elf32_Half e_machine; /* Machine architecture. */ ++ Elf32_Word e_version; /* ELF format version. */ ++ Elf32_Addr e_entry; /* Entry point. */ ++ Elf32_Off e_phoff; /* Program header file offset. */ ++ Elf32_Off e_shoff; /* Section header file offset. */ ++ Elf32_Word e_flags; /* Architecture-specific flags. */ ++ Elf32_Half e_ehsize; /* Size of ELF header in bytes. */ ++ Elf32_Half e_phentsize; /* Size of program header entry. */ ++ Elf32_Half e_phnum; /* Number of program header entries. */ ++ Elf32_Half e_shentsize; /* Size of section header entry. */ ++ Elf32_Half e_shnum; /* Number of section header entries. */ ++ Elf32_Half e_shstrndx; /* Section name strings section. */ ++} Elf32_Ehdr; ++ ++typedef struct { ++ unsigned char e_ident[EI_NIDENT]; /* File identification. */ ++ Elf64_Half e_type; /* File type. */ ++ Elf64_Half e_machine; /* Machine architecture. */ ++ Elf64_Word e_version; /* ELF format version. */ ++ Elf64_Addr e_entry; /* Entry point. */ ++ Elf64_Off e_phoff; /* Program header file offset. */ ++ Elf64_Off e_shoff; /* Section header file offset. */ ++ Elf64_Word e_flags; /* Architecture-specific flags. */ ++ Elf64_Half e_ehsize; /* Size of ELF header in bytes. */ ++ Elf64_Half e_phentsize; /* Size of program header entry. */ ++ Elf64_Half e_phnum; /* Number of program header entries. */ ++ Elf64_Half e_shentsize; /* Size of section header entry. */ ++ Elf64_Half e_shnum; /* Number of section header entries. */ ++ Elf64_Half e_shstrndx; /* Section name strings section. */ ++} Elf64_Ehdr; ++ ++/* ++ * Program header. ++ */ ++typedef struct { ++ Elf32_Word p_type; /* Entry type. */ ++ Elf32_Off p_offset; /* File offset of contents. */ ++ Elf32_Addr p_vaddr; /* Virtual address (not used). */ ++ Elf32_Addr p_paddr; /* Physical address. */ ++ Elf32_Size p_filesz; /* Size of contents in file. */ ++ Elf32_Size p_memsz; /* Size of contents in memory. */ ++ Elf32_Word p_flags; /* Access permission flags. */ ++ Elf32_Size p_align; /* Alignment in memory and file. */ ++} Elf32_Phdr; ++ ++typedef struct { ++ Elf64_Word p_type; /* Entry type. */ ++ Elf64_Word p_flags; /* Access permission flags. */ ++ Elf64_Off p_offset; /* File offset of contents. */ ++ Elf64_Addr p_vaddr; /* Virtual address (not used). */ ++ Elf64_Addr p_paddr; /* Physical address. */ ++ Elf64_Size p_filesz; /* Size of contents in file. */ ++ Elf64_Size p_memsz; /* Size of contents in memory. */ ++ Elf64_Size p_align; /* Alignment in memory and file. */ ++} Elf64_Phdr; ++ ++/* Standardized Elf image notes for booting... The name for all of these is ELFBoot */ ++ ++ ++/* ELF Defines for the current architecture */ ++#include "i386_elf.h" ++ ++#endif /* ASSEMBLY */ ++ ++//#include "elf_boot.h" ++ ++#endif /* ELF_H */ +Index: b/netboot/endian.h +=================================================================== +--- /dev/null ++++ b/netboot/endian.h +@@ -0,0 +1,19 @@ ++#ifndef ETHERBOOT_ENDIAN_H ++#define ETHERBOOT_ENDIAN_H ++ ++/* Definitions for byte order, according to significance of bytes, ++ from low addresses to high addresses. The value is what you get by ++ putting '4' in the most significant byte, '3' in the second most ++ significant byte, '2' in the second least significant byte, and '1' ++ in the least significant byte, and then writing down one digit for ++ each byte, starting with the byte at the lowest address at the left, ++ and proceeding to the byte with the highest address at the right. */ ++ ++#define __LITTLE_ENDIAN 1234 ++#define __BIG_ENDIAN 4321 ++#define __PDP_ENDIAN 3412 ++ ++#include "i386_endian.h" ++ ++ ++#endif /* ETHERBOOT_ENDIAN_H */ +Index: b/netboot/epic100.c +=================================================================== +--- a/netboot/epic100.c ++++ b/netboot/epic100.c +@@ -1,15 +1,18 @@ ++ + /* epic100.c: A SMC 83c170 EPIC/100 fast ethernet driver for Etherboot */ + ++/* 05/06/2003 timlegge Fixed relocation and implemented Multicast */ + #define LINUX_OUT_MACROS + + #include "etherboot.h" ++#include "pci.h" + #include "nic.h" +-#include "cards.h" + #include "timer.h" + #include "epic100.h" + +-#undef virt_to_bus +-#define virt_to_bus(x) ((unsigned long)x) ++/* Condensed operations for readability */ ++#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) ++#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) + + #define TX_RING_SIZE 2 /* use at least 2 buffers for TX */ + #define RX_RING_SIZE 2 +@@ -26,23 +29,18 @@ + + /* The EPIC100 Rx and Tx buffer descriptors. */ + struct epic_rx_desc { +- unsigned short status; +- unsigned short rxlength; +- unsigned long bufaddr; +- unsigned short buflength; +- unsigned short control; +- unsigned long next; ++ unsigned long status; ++ unsigned long bufaddr; ++ unsigned long buflength; ++ unsigned long next; + }; +- + /* description of the tx descriptors control bits commonly used */ + #define TD_STDFLAGS TD_LASTDESC + + struct epic_tx_desc { +- unsigned short status; +- unsigned short txlength; +- unsigned long bufaddr; +- unsigned short buflength; +- unsigned short control; ++ unsigned long status; ++ unsigned long bufaddr; ++ unsigned long buflength; + unsigned long next; + }; + +@@ -51,12 +49,15 @@ + + static void epic100_open(void); + static void epic100_init_ring(void); +-static void epic100_disable(struct nic *nic); +-static int epic100_poll(struct nic *nic); ++static void epic100_disable(struct dev *dev); ++static int epic100_poll(struct nic *nic, int retrieve); + static void epic100_transmit(struct nic *nic, const char *destaddr, + unsigned int type, unsigned int len, const char *data); ++#ifdef DEBUG_EEPROM + static int read_eeprom(int location); ++#endif + static int mii_read(int phy_id, int location); ++static void epic100_irq(struct nic *nic, irq_action_t action); + + static int ioaddr; + +@@ -69,6 +70,7 @@ + static int mmctl ; + static int mmdata ; + static int lan0 ; ++static int mc0 ; + static int rxcon ; + static int txcon ; + static int prcdar ; +@@ -80,37 +82,27 @@ + static unsigned short eeprom[64]; + #endif + static signed char phys[4]; /* MII device addresses. */ +-static struct epic_rx_desc rx_ring[RX_RING_SIZE]; +-static struct epic_tx_desc tx_ring[TX_RING_SIZE]; +-#ifdef USE_LOWMEM_BUFFER +-#define rx_packet ((char *)0x10000 - PKT_BUF_SZ * RX_RING_SIZE) +-#define tx_packet ((char *)0x10000 - PKT_BUF_SZ * RX_RING_SIZE - PKT_BUF_SZ * TX_RING_SIZE) +-#else +-static char rx_packet[PKT_BUF_SZ * RX_RING_SIZE]; +-static char tx_packet[PKT_BUF_SZ * TX_RING_SIZE]; +-#endif ++static struct epic_rx_desc rx_ring[RX_RING_SIZE] ++ __attribute__ ((aligned(4))); ++static struct epic_tx_desc tx_ring[TX_RING_SIZE] ++ __attribute__ ((aligned(4))); ++static unsigned char rx_packet[PKT_BUF_SZ * RX_RING_SIZE]; ++static unsigned char tx_packet[PKT_BUF_SZ * TX_RING_SIZE]; + + /***********************************************************************/ + /* Externally visible functions */ + /***********************************************************************/ + +- static void +-epic100_reset(struct nic *nic) +-{ +- /* Soft reset the chip. */ +- outl(GC_SOFT_RESET, genctl); +-} + +- struct nic* +-epic100_probe(struct nic *nic, unsigned short *probeaddrs) ++ static int ++epic100_probe(struct dev *dev, struct pci_device *pci) + { +- unsigned short sum = 0; +- unsigned short value; ++ struct nic *nic = (struct nic *)dev; + int i; + unsigned short* ap; + unsigned int phy, phy_idx; + +- if (probeaddrs == 0 || probeaddrs[0] == 0) ++ if (pci->ioaddr == 0) + return 0; + + /* Ideally we would detect all network cards in slot order. That would +@@ -118,7 +110,9 @@ + well with the current structure. So instead we detect just the + Epic cards in slot order. */ + +- ioaddr = probeaddrs[0] & ~3; /* Mask the bit that says "this is an io addr" */ ++ ioaddr = pci->ioaddr; ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; + + /* compute all used static epic100 registers address */ + command = ioaddr + COMMAND; /* Control Register */ +@@ -130,6 +124,7 @@ + mmctl = ioaddr + MMCTL; /* MII Management Interface Control */ + mmdata = ioaddr + MMDATA; /* MII Management Interface Data */ + lan0 = ioaddr + LAN0; /* MAC address. (0x40-0x48) */ ++ mc0 = ioaddr + MC0; /* Multicast Control */ + rxcon = ioaddr + RXCON; /* Receive Control */ + txcon = ioaddr + TXCON; /* Transmit Control */ + prcdar = ioaddr + PRCDAR; /* PCI Receive Current Descr Address */ +@@ -160,11 +155,15 @@ + } + + #ifdef DEBUG_EEPROM ++{ ++ unsigned short sum = 0; ++ unsigned short value; + for (i = 0; i < 64; i++) { + value = read_eeprom(i); + eeprom[i] = value; + sum += value; + } ++} + + #if (EPIC_DEBUG > 1) + printf("EEPROM contents\n"); +@@ -202,15 +201,26 @@ + + epic100_open(); + +- nic->reset = epic100_reset; ++ dev->disable = epic100_disable; + nic->poll = epic100_poll; + nic->transmit = epic100_transmit; +- nic->disable = epic100_disable; ++ nic->irq = epic100_irq; + +- return nic; ++ return 1; + } + +- static void ++static void set_rx_mode(void) ++{ ++ unsigned char mc_filter[8]; ++ int i; ++ memset(mc_filter, 0xff, sizeof(mc_filter)); ++ outl(0x0C, rxcon); ++ for(i = 0; i < 4; i++) ++ outw(((unsigned short *)mc_filter)[i], mc0 + i*4); ++ return; ++} ++ ++ static void + epic100_open(void) + { + int mii_reg5; +@@ -237,11 +247,11 @@ + outl(tmp, txcon); + + /* Give adress of RX and TX ring to the chip */ +- outl(virt_to_bus(&rx_ring), prcdar); +- outl(virt_to_bus(&tx_ring), ptcdar); ++ outl(virt_to_le32desc(&rx_ring), prcdar); ++ outl(virt_to_le32desc(&tx_ring), ptcdar); + + /* Start the chip's Rx process: receive unicast and broadcast */ +- outl(0x04, rxcon); ++ set_rx_mode(); + outl(CR_START_RX | CR_QUEUE_RX, command); + + putchar('\n'); +@@ -252,34 +262,30 @@ + epic100_init_ring(void) + { + int i; +- char* p; + + cur_rx = cur_tx = 0; + +- p = &rx_packet[0]; + for (i = 0; i < RX_RING_SIZE; i++) { +- rx_ring[i].status = RRING_OWN; /* Owned by Epic chip */ +- rx_ring[i].buflength = PKT_BUF_SZ; +- rx_ring[i].bufaddr = virt_to_bus(p + (PKT_BUF_SZ * i)); +- rx_ring[i].control = 0; +- rx_ring[i].next = virt_to_bus(&(rx_ring[i + 1]) ); ++ rx_ring[i].status = cpu_to_le32(RRING_OWN); /* Owned by Epic chip */ ++ rx_ring[i].buflength = cpu_to_le32(PKT_BUF_SZ); ++ rx_ring[i].bufaddr = virt_to_bus(&rx_packet[i * PKT_BUF_SZ]); ++ rx_ring[i].next = virt_to_le32desc(&rx_ring[i + 1]) ; + } + /* Mark the last entry as wrapping the ring. */ +- rx_ring[i-1].next = virt_to_bus(&rx_ring[0]); ++ rx_ring[i-1].next = virt_to_le32desc(&rx_ring[0]); + + /* + *The Tx buffer descriptor is filled in as needed, + * but we do need to clear the ownership bit. + */ +- p = &tx_packet[0]; + + for (i = 0; i < TX_RING_SIZE; i++) { +- tx_ring[i].status = 0; /* Owned by CPU */ +- tx_ring[i].bufaddr = virt_to_bus(p + (PKT_BUF_SZ * i)); +- tx_ring[i].control = TD_STDFLAGS; +- tx_ring[i].next = virt_to_bus(&(tx_ring[i + 1]) ); ++ tx_ring[i].status = 0x0000; /* Owned by CPU */ ++ tx_ring[i].buflength = 0x0000 | cpu_to_le32(TD_STDFLAGS << 16); ++ tx_ring[i].bufaddr = virt_to_bus(&tx_packet[i * PKT_BUF_SZ]); ++ tx_ring[i].next = virt_to_le32desc(&tx_ring[i + 1]); + } +- tx_ring[i-1].next = virt_to_bus(&tx_ring[0]); ++ tx_ring[i-1].next = virt_to_le32desc(&tx_ring[0]); + } + + /* function: epic100_transmit +@@ -296,7 +302,7 @@ + unsigned int len, const char *data) + { + unsigned short nstype; +- char* txp; ++ unsigned char *txp; + int entry; + + /* Calculate the next Tx descriptor entry. */ +@@ -310,7 +316,7 @@ + return; + } + +- txp = (char*)tx_ring[entry].bufaddr; ++ txp = tx_packet + (entry * PKT_BUF_SZ); + + memcpy(txp, destaddr, ETH_ALEN); + memcpy(txp + ETH_ALEN, nic->node_addr, ETH_ALEN); +@@ -319,26 +325,29 @@ + memcpy(txp + ETH_HLEN, data, len); + + len += ETH_HLEN; +- ++ len &= 0x0FFF; ++ while(len < ETH_ZLEN) ++ txp[len++] = '\0'; + /* + * Caution: the write order is important here, + * set the base address with the "ownership" + * bits last. + */ +- tx_ring[entry].txlength = (len >= 60 ? len : 60); +- tx_ring[entry].buflength = len; +- tx_ring[entry].status = TRING_OWN; /* Pass ownership to the chip. */ ++ ++ tx_ring[entry].buflength |= cpu_to_le32(len); ++ tx_ring[entry].status = cpu_to_le32(len << 16) | ++ cpu_to_le32(TRING_OWN); /* Pass ownership to the chip. */ + + cur_tx++; + + /* Trigger an immediate transmit demand. */ +- outl(CR_QUEUE_TX, command); +- ++ outl(CR_QUEUE_TX, command); ++ + load_timer2(10*TICKS_PER_MS); /* timeout 10 ms for transmit */ +- while ((tx_ring[entry].status & TRING_OWN) && timer2_running()) ++ while ((le32_to_cpu(tx_ring[entry].status) & (TRING_OWN)) && timer2_running()) + /* Wait */; + +- if ((tx_ring[entry].status & TRING_OWN) != 0) ++ if ((le32_to_cpu(tx_ring[entry].status) & TRING_OWN) != 0) + printf("Oops, transmitter timeout, status=%hX\n", + tx_ring[entry].status); + } +@@ -356,17 +365,19 @@ + */ + + static int +-epic100_poll(struct nic *nic) ++epic100_poll(struct nic *nic, int retrieve) + { + int entry; +- int status; + int retcode; +- ++ int status; + entry = cur_rx % RX_RING_SIZE; + +- if ((status = rx_ring[entry].status & RRING_OWN) == RRING_OWN) ++ if ((rx_ring[entry].status & cpu_to_le32(RRING_OWN)) == RRING_OWN) + return (0); + ++ if ( ! retrieve ) return 1; ++ ++ status = le32_to_cpu(rx_ring[entry].status); + /* We own the next entry, it's a new packet. Send it up. */ + + #if (EPIC_DEBUG > 4) +@@ -383,8 +394,8 @@ + retcode = 0; + } else { + /* Omit the four octet CRC from the length. */ +- nic->packetlen = rx_ring[entry].rxlength - 4; +- memcpy(nic->packet, (char*)rx_ring[entry].bufaddr, nic->packetlen); ++ nic->packetlen = le32_to_cpu((rx_ring[entry].buflength))- 4; ++ memcpy(nic->packet, &rx_packet[entry * PKT_BUF_SZ], nic->packetlen); + retcode = 1; + } + +@@ -395,17 +406,30 @@ + rx_ring[entry].status = RRING_OWN; + + /* Restart Receiver */ +- outl(CR_START_RX | CR_QUEUE_RX, command); ++ outl(CR_START_RX | CR_QUEUE_RX, command); + + return retcode; + } + + + static void +-epic100_disable(struct nic *nic) ++epic100_disable(struct dev *dev __unused) + { ++ /* Soft reset the chip. */ ++ outl(GC_SOFT_RESET, genctl); + } + ++static void epic100_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} + + #ifdef DEBUG_EEPROM + /* Serial EEPROM section. */ +@@ -479,3 +503,18 @@ + break; + return inw(mmdata); + } ++ ++ ++static struct pci_id epic100_nics[] = { ++PCI_ROM(0x10b8, 0x0005, "epic100", "SMC EtherPowerII"), /* SMC 83c170 EPIC/100 */ ++PCI_ROM(0x10b8, 0x0006, "smc-83c175", "SMC EPIC/C 83c175"), ++}; ++ ++struct pci_driver epic100_driver = { ++ .type = NIC_DRIVER, ++ .name = "EPIC100", ++ .probe = epic100_probe, ++ .ids = epic100_nics, ++ .id_count = sizeof(epic100_nics)/sizeof(epic100_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/etherboot.h +=================================================================== +--- a/netboot/etherboot.h ++++ b/netboot/etherboot.h +@@ -1,6 +1,6 @@ + /* + * GRUB -- GRand Unified Bootloader +- * Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. ++ * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. + * + * 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 +@@ -17,528 +17,40 @@ + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +-/* RULE: You must define the macro ``GRUB'' when including this header +- file in GRUB code. */ ++#ifndef ETHERBOOT_H ++#define ETHERBOOT_H + +-/* Based on "src/etherboot.h" in etherboot-5.0.5. */ +- +-/************************************************************************** +-ETHERBOOT - BOOTP/TFTP Bootstrap Program +- +-Author: Martin Renters +- Date: Dec/93 +- +-**************************************************************************/ +- +-/* Include GRUB-specific macros and prototypes here. */ +-#include +- +-/* FIXME: For now, enable the DHCP support. Perhaps I should segregate +- the DHCP support from the BOOTP support, and permit both to +- co-exist. */ +-#undef NO_DHCP_SUPPORT +- +-/* In GRUB, the relocated address in Etherboot doesn't have any sense. +- Just define it as a bogus value. */ +-#define RELOC 0 +- +-/* FIXME: Should be an option. */ +-#define BACKOFF_LIMIT 7 +- +-#include +- +-#define CTRL_C 3 +- +-#ifndef MAX_TFTP_RETRIES +-# define MAX_TFTP_RETRIES 20 ++#include "shared.h" ++#include "osdep.h" ++#include "if_ether.h" ++#include "in.h" ++ ++/* Link configuration time in tenths of a second */ ++#ifndef VALID_LINK_TIMEOUT ++#define VALID_LINK_TIMEOUT 100 /* 10.0 seconds */ + #endif + +-#ifndef MAX_BOOTP_RETRIES +-# define MAX_BOOTP_RETRIES 20 +-#endif +- +-#define MAX_BOOTP_EXTLEN (ETH_FRAME_LEN - ETH_HLEN - \ +- sizeof (struct bootp_t)) +- +-#ifndef MAX_ARP_RETRIES +-# define MAX_ARP_RETRIES 20 +-#endif +- +-#ifndef MAX_RPC_RETRIES +-# define MAX_RPC_RETRIES 20 +-#endif +- +-#define TICKS_PER_SEC 18 +- +-/* Inter-packet retry in ticks */ +-#define TIMEOUT (10 * TICKS_PER_SEC) +- +-/* These settings have sense only if compiled with -DCONGESTED */ +-/* total retransmission timeout in ticks */ +-#define TFTP_TIMEOUT (30 * TICKS_PER_SEC) +-/* packet retransmission timeout in ticks */ +-#define TFTP_REXMT (3 * TICKS_PER_SEC) +- + #ifndef NULL + # define NULL ((void *) 0) + #endif + +-/* +- I'm moving towards the defined names in linux/if_ether.h for clarity. +- The confusion between 60/64 and 1514/1518 arose because the NS8390 +- counts the 4 byte frame checksum in the incoming packet, but not +- in the outgoing packet. 60/1514 are the correct numbers for most +- if not all of the other NIC controllers. I will be retiring the +- 64/1518 defines in the lead-up to 5.0. +-*/ +- +-#define ETH_ALEN 6 /* Size of Ethernet address */ +-#define ETH_HLEN 14 /* Size of ethernet header */ +-#define ETH_ZLEN 60 /* Minimum packet */ +-/*#define ETH_MIN_PACKET 64*/ +-#define ETH_FRAME_LEN 1514 /* Maximum packet */ +-/*#define ETH_MAX_PACKET 1518*/ +-/* Because some DHCP/BOOTP servers don't treat the maximum length the same +- as Etherboot, subtract the size of an IP header and that of an UDP +- header. */ +-#define ETH_MAX_MTU (ETH_FRAME_LEN - ETH_HLEN \ +- - sizeof (struct iphdr) \ +- - sizeof (struct udphdr)) +- +-#define ARP_CLIENT 0 +-#define ARP_SERVER 1 +-#define ARP_GATEWAY 2 +-#define ARP_ROOTSERVER 3 +-#define ARP_SWAPSERVER 4 +-#define MAX_ARP ARP_SWAPSERVER+1 +- +-#define RARP_REQUEST 3 +-#define RARP_REPLY 4 +- +-#define IP 0x0800 +-#define ARP 0x0806 +-#define RARP 0x8035 +- +-#define BOOTP_SERVER 67 +-#define BOOTP_CLIENT 68 +-#define TFTP_PORT 69 +-#define SUNRPC_PORT 111 +- +-#define IP_UDP 17 +-/* Same after going through htonl */ +-#define IP_BROADCAST 0xFFFFFFFF +- +-#define ARP_REQUEST 1 +-#define ARP_REPLY 2 +- +-#define BOOTP_REQUEST 1 +-#define BOOTP_REPLY 2 +- +-#define TAG_LEN(p) (*((p) + 1)) +-#define RFC1533_COOKIE 99, 130, 83, 99 +-#define RFC1533_PAD 0 +-#define RFC1533_NETMASK 1 +-#define RFC1533_TIMEOFFSET 2 +-#define RFC1533_GATEWAY 3 +-#define RFC1533_TIMESERVER 4 +-#define RFC1533_IEN116NS 5 +-#define RFC1533_DNS 6 +-#define RFC1533_LOGSERVER 7 +-#define RFC1533_COOKIESERVER 8 +-#define RFC1533_LPRSERVER 9 +-#define RFC1533_IMPRESSSERVER 10 +-#define RFC1533_RESOURCESERVER 11 +-#define RFC1533_HOSTNAME 12 +-#define RFC1533_BOOTFILESIZE 13 +-#define RFC1533_MERITDUMPFILE 14 +-#define RFC1533_DOMAINNAME 15 +-#define RFC1533_SWAPSERVER 16 +-#define RFC1533_ROOTPATH 17 +-#define RFC1533_EXTENSIONPATH 18 +-#define RFC1533_IPFORWARDING 19 +-#define RFC1533_IPSOURCEROUTING 20 +-#define RFC1533_IPPOLICYFILTER 21 +-#define RFC1533_IPMAXREASSEMBLY 22 +-#define RFC1533_IPTTL 23 +-#define RFC1533_IPMTU 24 +-#define RFC1533_IPMTUPLATEAU 25 +-#define RFC1533_INTMTU 26 +-#define RFC1533_INTLOCALSUBNETS 27 +-#define RFC1533_INTBROADCAST 28 +-#define RFC1533_INTICMPDISCOVER 29 +-#define RFC1533_INTICMPRESPOND 30 +-#define RFC1533_INTROUTEDISCOVER 31 +-#define RFC1533_INTROUTESOLICIT 32 +-#define RFC1533_INTSTATICROUTES 33 +-#define RFC1533_LLTRAILERENCAP 34 +-#define RFC1533_LLARPCACHETMO 35 +-#define RFC1533_LLETHERNETENCAP 36 +-#define RFC1533_TCPTTL 37 +-#define RFC1533_TCPKEEPALIVETMO 38 +-#define RFC1533_TCPKEEPALIVEGB 39 +-#define RFC1533_NISDOMAIN 40 +-#define RFC1533_NISSERVER 41 +-#define RFC1533_NTPSERVER 42 +-#define RFC1533_VENDOR 43 +-#define RFC1533_NBNS 44 +-#define RFC1533_NBDD 45 +-#define RFC1533_NBNT 46 +-#define RFC1533_NBSCOPE 47 +-#define RFC1533_XFS 48 +-#define RFC1533_XDM 49 +-#ifndef NO_DHCP_SUPPORT +-#define RFC2132_REQ_ADDR 50 +-#define RFC2132_MSG_TYPE 53 +-#define RFC2132_SRV_ID 54 +-#define RFC2132_PARAM_LIST 55 +-#define RFC2132_MAX_SIZE 57 +-#define RFC2132_VENDOR_CLASS_ID 60 +- +-#define DHCPDISCOVER 1 +-#define DHCPOFFER 2 +-#define DHCPREQUEST 3 +-#define DHCPACK 5 +-#endif /* NO_DHCP_SUPPORT */ +- +-#define RFC1533_VENDOR_MAJOR 0 +-#define RFC1533_VENDOR_MINOR 0 +- +-#define RFC1533_VENDOR_MAGIC 128 +-#define RFC1533_VENDOR_ADDPARM 129 +-#define RFC1533_VENDOR_MNUOPTS 160 +-#define RFC1533_VENDOR_SELECTION 176 +-#define RFC1533_VENDOR_MOTD 184 +-#define RFC1533_VENDOR_NUMOFMOTD 8 +-#define RFC1533_VENDOR_IMG 192 +-#define RFC1533_VENDOR_NUMOFIMG 16 +- +-#define RFC1533_VENDOR_CONFIGFILE 150 +- +-#define RFC1533_END 255 +- +-#define BOOTP_VENDOR_LEN 64 +-#ifndef NO_DHCP_SUPPORT +-#define DHCP_OPT_LEN 312 +-#endif /* NO_DHCP_SUPPORT */ +- +-#define TFTP_DEFAULTSIZE_PACKET 512 +-#define TFTP_MAX_PACKET 1432 /* 512 */ +- +-#define TFTP_RRQ 1 +-#define TFTP_WRQ 2 +-#define TFTP_DATA 3 +-#define TFTP_ACK 4 +-#define TFTP_ERROR 5 +-#define TFTP_OACK 6 +- +-#define TFTP_CODE_EOF 1 +-#define TFTP_CODE_MORE 2 +-#define TFTP_CODE_ERROR 3 +-#define TFTP_CODE_BOOT 4 +-#define TFTP_CODE_CFG 5 +- +-#define AWAIT_ARP 0 +-#define AWAIT_BOOTP 1 +-#define AWAIT_TFTP 2 +-#define AWAIT_RARP 3 +-#define AWAIT_RPC 4 +-#define AWAIT_QDRAIN 5 /* drain queue, process ARP requests */ +- +-typedef struct +-{ +- unsigned long s_addr; +-} +-in_addr; +- +-struct arptable_t +-{ +- in_addr ipaddr; +- unsigned char node[6]; +-}; +- +-/* +- * A pity sipaddr and tipaddr are not longword aligned or we could use +- * in_addr. No, I don't want to use #pragma packed. +- */ +-struct arprequest +-{ +- unsigned short hwtype; +- unsigned short protocol; +- char hwlen; +- char protolen; +- unsigned short opcode; +- char shwaddr[6]; +- char sipaddr[4]; +- char thwaddr[6]; +- char tipaddr[4]; +-}; +- +-struct iphdr +-{ +- char verhdrlen; +- char service; +- unsigned short len; +- unsigned short ident; +- unsigned short frags; +- char ttl; +- char protocol; +- unsigned short chksum; +- in_addr src; +- in_addr dest; +-}; +- +-struct udphdr +-{ +- unsigned short src; +- unsigned short dest; +- unsigned short len; +- unsigned short chksum; +-}; +- +-/* Format of a bootp packet. */ +-struct bootp_t +-{ +- char bp_op; +- char bp_htype; +- char bp_hlen; +- char bp_hops; +- unsigned long bp_xid; +- unsigned short bp_secs; +- unsigned short unused; +- in_addr bp_ciaddr; +- in_addr bp_yiaddr; +- in_addr bp_siaddr; +- in_addr bp_giaddr; +- char bp_hwaddr[16]; +- char bp_sname[64]; +- char bp_file[128]; +-#ifdef NO_DHCP_SUPPORT +- char bp_vend[BOOTP_VENDOR_LEN]; +-#else +- char bp_vend[DHCP_OPT_LEN]; +-#endif /* NO_DHCP_SUPPORT */ +-}; +- +-/* Format of a bootp IP packet. */ +-struct bootpip_t +-{ +- struct iphdr ip; +- struct udphdr udp; +- struct bootp_t bp; +-}; +- +-/* Format of bootp packet with extensions. */ +-struct bootpd_t +-{ +- struct bootp_t bootp_reply; +- unsigned char bootp_extension[MAX_BOOTP_EXTLEN]; +-}; +- +-struct tftp_t +-{ +- struct iphdr ip; +- struct udphdr udp; +- unsigned short opcode; +- union +- { +- char rrq[TFTP_DEFAULTSIZE_PACKET]; +- +- struct +- { +- unsigned short block; +- char download[TFTP_MAX_PACKET]; +- } +- data; +- +- struct +- { +- unsigned short block; +- } +- ack; +- +- struct +- { +- unsigned short errcode; +- char errmsg[TFTP_DEFAULTSIZE_PACKET]; +- } +- err; +- +- struct +- { +- char data[TFTP_DEFAULTSIZE_PACKET+2]; +- } +- oack; +- } +- u; +-}; +- +-/* Define a smaller tftp packet solely for making requests to conserve stack +- 512 bytes should be enough. */ +-struct tftpreq_t +-{ +- struct iphdr ip; +- struct udphdr udp; +- unsigned short opcode; +- union +- { +- char rrq[512]; +- +- struct +- { +- unsigned short block; +- } +- ack; +- +- struct +- { +- unsigned short errcode; +- char errmsg[512-2]; +- } +- err; +- } +- u; +-}; +- +-#define TFTP_MIN_PACKET (sizeof(struct iphdr) + sizeof(struct udphdr) + 4) +- +-struct rpc_t +-{ +- struct iphdr ip; +- struct udphdr udp; +- union +- { +- char data[300]; /* longest RPC call must fit!!!! */ +- +- struct +- { +- long id; +- long type; +- long rpcvers; +- long prog; +- long vers; +- long proc; +- long data[1]; +- } +- call; +- +- struct +- { +- long id; +- long type; +- long rstatus; +- long verifier; +- long v2; +- long astatus; +- long data[1]; +- } +- reply; +- } +- u; +-}; +- +-#define PROG_PORTMAP 100000 +-#define PROG_NFS 100003 +-#define PROG_MOUNT 100005 +- +-#define MSG_CALL 0 +-#define MSG_REPLY 1 +- +-#define PORTMAP_GETPORT 3 +- +-#define MOUNT_ADDENTRY 1 +-#define MOUNT_UMOUNTALL 4 +- +-#define NFS_LOOKUP 4 +-#define NFS_READ 6 +- +-#define NFS_FHSIZE 32 +- +-#define NFSERR_PERM 1 +-#define NFSERR_NOENT 2 +-#define NFSERR_ACCES 13 +- +-/* Block size used for NFS read accesses. A RPC reply packet (including all +- * headers) must fit within a single Ethernet frame to avoid fragmentation. +- * Chosen to be a power of two, as most NFS servers are optimized for this. */ +-#define NFS_READ_SIZE 1024 +- +-#define FLOPPY_BOOT_LOCATION 0x7c00 +-/* Must match offsets in loader.S */ +-#define ROM_SEGMENT 0x1fa +-#define ROM_LENGTH 0x1fc +- +-#define ROM_INFO_LOCATION (FLOPPY_BOOT_LOCATION + ROM_SEGMENT) +-/* at end of floppy boot block */ +- +-struct rom_info +-{ +- unsigned short rom_segment; +- unsigned short rom_length; +-}; +- +-static inline int +-rom_address_ok (struct rom_info *rom, int assigned_rom_segment) +-{ +- return (assigned_rom_segment < 0xC000 +- || assigned_rom_segment == rom->rom_segment); +-} +- +-/* Define a type for passing info to a loaded program. */ +-struct ebinfo +-{ +- unsigned char major, minor; /* Version */ +- unsigned short flags; /* Bit flags */ +-}; +- +-/*************************************************************************** +-External prototypes +-***************************************************************************/ +-/* main.c */ +-extern void print_network_configuration (void); +-extern int ifconfig (char *ip, char *sm, char *gw, char *svr); +-extern int udp_transmit (unsigned long destip, unsigned int srcsock, +- unsigned int destsock, int len, const void *buf); +-extern int await_reply (int type, int ival, void *ptr, int timeout); +-extern int decode_rfc1533 (unsigned char *, int, int, int); +-extern long rfc2131_sleep_interval (int base, int exp); +-extern void cleanup (void); +-extern int rarp (void); +-extern int bootp (void); +-extern void cleanup_net (void); +- +-/* config.c */ +-extern void print_config (void); +-extern void eth_reset (void); +-extern int eth_probe (void); +-extern int eth_poll (void); +-extern void eth_transmit (const char *d, unsigned int t, +- unsigned int s, const void *p); +-extern void eth_disable (void); +- +-/* misc.c */ +-extern void twiddle (void); +-extern void sleep (int secs); +-extern int getdec (char **s); +-extern void etherboot_printf (const char *, ...); +-extern int etherboot_sprintf (char *, const char *, ...); +-extern int inet_aton (char *p, in_addr *i); +- +-/*************************************************************************** +-External variables +-***************************************************************************/ +-/* main.c */ +-extern int ip_abort; +-extern int network_ready; +-extern struct rom_info rom; +-extern struct arptable_t arptable[MAX_ARP]; +- +-/* config.c */ +-extern struct nic nic; ++#define gateA20_set() gateA20(1) ++#define gateA20_unset() gateA20(0) ++#define EBDEBUG 0 ++/* The 'rom_info' maybe arch depended. It must be moved to some other ++ * place */ ++struct rom_info { ++ unsigned short rom_segment; ++ unsigned short rom_length; ++}; ++ ++extern void poll_interruptions P((void)); ++ ++/* For UNDI drivers */ ++extern void fake_irq ( uint8_t irq ); ++extern void _trivial_irq_handler_start; ++extern uint32_t get_free_base_memory ( void ); ++extern void forget_base_memory ( void*, size_t ); ++extern void free_unused_base_memory ( void ); + +-/* Local hack - define some macros to use etherboot source files "as is". */ +-#ifndef GRUB +-# undef printf +-# define printf etherboot_printf +-# undef sprintf +-# define sprintf etherboot_sprintf +-#endif /* GRUB */ ++#endif /* ETHERBOOT_H */ +Index: b/netboot/fa311.c +=================================================================== +--- a/netboot/fa311.c ++++ /dev/null +@@ -1,421 +0,0 @@ +-/* +- Driver for the National Semiconductor DP83810 Ethernet controller. +- +- Portions Copyright (C) 2001 Inprimis Technologies, Inc. +- http://www.inprimis.com/ +- +- This driver is based (heavily) on the Linux driver for this chip +- which is copyright 1999-2001 by Donald Becker. +- +- This software has no warranties expressed or implied for any +- purpose. +- +- This software may be used and distributed according to the terms of +- the GNU General Public License (GPL), incorporated herein by reference. +- Drivers based on or derived from this code fall under the GPL and must +- retain the authorship, copyright and license notice. This file is not +- a complete program and may only be used when the entire operating +- system is licensed under the GPL. License for under other terms may be +- available. Contact the original author for details. +- +- The original author may be reached as becker@scyld.com, or at +- Scyld Computing Corporation +- 410 Severn Ave., Suite 210 +- Annapolis MD 21403 +-*/ +- +- +-typedef unsigned char u8; +-typedef signed char s8; +-typedef unsigned short u16; +-typedef signed short s16; +-typedef unsigned int u32; +-typedef signed int s32; +- +-#include "etherboot.h" +-#include "nic.h" +-#include "pci.h" +- +-#undef virt_to_bus +-#define virt_to_bus(x) ((unsigned long)x) +-#define cpu_to_le32(val) (val) +-#define le32_to_cpu(val) (val) +-#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) +-#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) +- +-#define TX_RING_SIZE 1 +-#define RX_RING_SIZE 4 +-#define TIME_OUT 1000000 +-#define PKT_BUF_SZ 1536 +- +-/* Offsets to the device registers. */ +-enum register_offsets { +- ChipCmd=0x00, ChipConfig=0x04, EECtrl=0x08, PCIBusCfg=0x0C, +- IntrStatus=0x10, IntrMask=0x14, IntrEnable=0x18, +- TxRingPtr=0x20, TxConfig=0x24, +- RxRingPtr=0x30, RxConfig=0x34, +- WOLCmd=0x40, PauseCmd=0x44, RxFilterAddr=0x48, RxFilterData=0x4C, +- BootRomAddr=0x50, BootRomData=0x54, StatsCtrl=0x5C, StatsData=0x60, +- RxPktErrs=0x60, RxMissed=0x68, RxCRCErrs=0x64, +-}; +- +-/* Bit in ChipCmd. */ +-enum ChipCmdBits { +- ChipReset=0x100, RxReset=0x20, TxReset=0x10, RxOff=0x08, RxOn=0x04, +- TxOff=0x02, TxOn=0x01, +-}; +- +-/* Bits in the interrupt status/mask registers. */ +-enum intr_status_bits { +- IntrRxDone=0x0001, IntrRxIntr=0x0002, IntrRxErr=0x0004, IntrRxEarly=0x0008, +- IntrRxIdle=0x0010, IntrRxOverrun=0x0020, +- IntrTxDone=0x0040, IntrTxIntr=0x0080, IntrTxErr=0x0100, +- IntrTxIdle=0x0200, IntrTxUnderrun=0x0400, +- StatsMax=0x0800, LinkChange=0x4000, WOLPkt=0x2000, +- RxResetDone=0x1000000, TxResetDone=0x2000000, +- IntrPCIErr=0x00f00000, IntrNormalSummary=0x0251, IntrAbnormalSummary=0xED20, +-}; +- +-/* Bits in the RxMode register. */ +-enum rx_mode_bits { +- AcceptErr=0x20, AcceptRunt=0x10, AcceptBroadcast=0xC0000000, +- AcceptMulticast=0x00200000, AcceptAllMulticast=0x20000000, +- AcceptAllPhys=0x10000000, AcceptMyPhys=0x08000000, +-}; +- +-/* Bits in network_desc.status */ +-enum desc_status_bits { +- DescOwn=0x80000000, DescMore=0x40000000, DescIntr=0x20000000, +- DescNoCRC=0x10000000, +- DescPktOK=0x08000000, RxTooLong=0x00400000, +-}; +- +-/* The Rx and Tx buffer descriptors. */ +-struct netdev_desc { +- u32 next_desc; +- s32 cmd_status; +- u32 addr; +-}; +- +-static struct FA311_DEV { +- unsigned int ioaddr; +- unsigned short vendor; +- unsigned short device; +- unsigned int cur_rx; +- unsigned int cur_tx; +- unsigned int rx_buf_sz; +- volatile struct netdev_desc *rx_head_desc; +- volatile struct netdev_desc rx_ring[RX_RING_SIZE] __attribute__ ((aligned (4))); +- volatile struct netdev_desc tx_ring[TX_RING_SIZE] __attribute__ ((aligned (4))); +-} fa311_dev; +- +-static int eeprom_read(long ioaddr, int location); +-static void init_ring(struct FA311_DEV *dev); +-static void fa311_reset(struct nic *nic); +-static int fa311_poll(struct nic *nic); +-static void fa311_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p); +-static void fa311_disable(struct nic *nic); +- +-static char rx_packet[PKT_BUF_SZ * RX_RING_SIZE] __attribute__ ((aligned (4))); +-static char tx_packet[PKT_BUF_SZ * TX_RING_SIZE] __attribute__ ((aligned (4))); +- +-struct nic * fa311_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) +-{ +-int prev_eedata; +-int i; +-int duplex; +-int tx_config; +-int rx_config; +-unsigned char macaddr[6]; +-unsigned char mactest; +-unsigned char pci_bus = 0; +-struct FA311_DEV* dev = &fa311_dev; +- +- if (io_addrs == 0 || *io_addrs == 0) +- return (0); +- memset(dev, 0, sizeof(*dev)); +- dev->vendor = pci->vendor; +- dev->device = pci->dev_id; +- dev->ioaddr = pci->membase; +- +- /* Work around the dropped serial bit. */ +- prev_eedata = eeprom_read(dev->ioaddr, 6); +- for (i = 0; i < 3; i++) { +- int eedata = eeprom_read(dev->ioaddr, i + 7); +- macaddr[i*2] = (eedata << 1) + (prev_eedata >> 15); +- macaddr[i*2+1] = eedata >> 7; +- prev_eedata = eedata; +- } +- mactest = 0; +- for (i = 0; i < 6; i++) +- mactest |= macaddr[i]; +- if (mactest == 0) +- return (0); +- for (i = 0; i < 6; i++) +- nic->node_addr[i] = macaddr[i]; +- printf("%! ", nic->node_addr); +- +- adjust_pci_device(pci); +- +- fa311_reset(nic); +- +- nic->reset = fa311_reset; +- nic->disable = fa311_disable; +- nic->poll = fa311_poll; +- nic->transmit = fa311_transmit; +- +- init_ring(dev); +- +- writel(virt_to_bus(dev->rx_ring), dev->ioaddr + RxRingPtr); +- writel(virt_to_bus(dev->tx_ring), dev->ioaddr + TxRingPtr); +- +- for (i = 0; i < 6; i += 2) +- { +- writel(i, dev->ioaddr + RxFilterAddr); +- writew(macaddr[i] + (macaddr[i+1] << 8), +- dev->ioaddr + RxFilterData); +- } +- +- /* Initialize other registers. */ +- /* Configure for standard, in-spec Ethernet. */ +- if (readl(dev->ioaddr + ChipConfig) & 0x20000000) +- { /* Full duplex */ +- tx_config = 0xD0801002; +- rx_config = 0x10000020; +- } +- else +- { +- tx_config = 0x10801002; +- rx_config = 0x0020; +- } +- writel(tx_config, dev->ioaddr + TxConfig); +- writel(rx_config, dev->ioaddr + RxConfig); +- +- duplex = readl(dev->ioaddr + ChipConfig) & 0x20000000 ? 1 : 0; +- if (duplex) { +- rx_config |= 0x10000000; +- tx_config |= 0xC0000000; +- } else { +- rx_config &= ~0x10000000; +- tx_config &= ~0xC0000000; +- } +- writew(tx_config, dev->ioaddr + TxConfig); +- writew(rx_config, dev->ioaddr + RxConfig); +- +- writel(AcceptBroadcast | AcceptAllMulticast | AcceptMyPhys, +- dev->ioaddr + RxFilterAddr); +- +- writel(RxOn | TxOn, dev->ioaddr + ChipCmd); +- writel(4, dev->ioaddr + StatsCtrl); /* Clear Stats */ +- return nic; +- +-} +- +-static void fa311_reset(struct nic *nic) +-{ +-u32 chip_config; +-struct FA311_DEV* dev = &fa311_dev; +- +- /* Reset the chip to erase previous misconfiguration. */ +- outl(ChipReset, dev->ioaddr + ChipCmd); +- +- if ((readl(dev->ioaddr + ChipConfig) & 0xe000) != 0xe000) +- { +- chip_config = readl(dev->ioaddr + ChipConfig); +- } +-} +- +-static int fa311_poll(struct nic *nic) +-{ +-s32 desc_status; +-int to; +-int entry; +-int retcode; +-struct FA311_DEV* dev = &fa311_dev; +- +- retcode = 0; +- entry = dev->cur_rx; +- to = TIME_OUT; +- while (to != 0) +- { +- desc_status = dev->rx_ring[entry].cmd_status; +- if ((desc_status & DescOwn) != 0) +- break; +- else +- --to; +- } +- if (to != 0) +- { +- readl(dev->ioaddr + IntrStatus); /* clear interrrupt bits */ +- /* driver owns the next entry it's a new packet. Send it up. */ +- if ((desc_status & (DescMore|DescPktOK|RxTooLong)) == DescPktOK) +- { +- nic->packetlen = (desc_status & 0x0fff) - 4; /* Omit CRC size. */ +- memcpy(nic->packet, (char*)(dev->rx_ring[entry].addr), nic->packetlen); +- retcode = 1; +- } +- /* Give the descriptor back to the chip */ +- dev->rx_ring[entry].cmd_status = cpu_to_le32(dev->rx_buf_sz); +- dev->cur_rx++; +- if (dev->cur_rx >= RX_RING_SIZE) +- dev->cur_rx = 0; +- dev->rx_head_desc = &dev->rx_ring[dev->cur_rx]; +- } +- /* Restart Rx engine if stopped. */ +- writel(RxOn, dev->ioaddr + ChipCmd); +- return retcode; +-} +- +-static void fa311_transmit(struct nic *nic, const char *destaddr, unsigned int type, unsigned int len, const char *data) +-{ +-unsigned short nstype; +-s32 desc_status; +-int to; +-int entry; +-char* txp; +-unsigned char* s; +-struct FA311_DEV* dev = &fa311_dev; +- +- /* Calculate the next Tx descriptor entry. */ +- entry = dev->cur_tx; +- txp = (char*)(dev->tx_ring[entry].addr); +- +- memcpy(txp, destaddr, ETH_ALEN); +- memcpy(txp + ETH_ALEN, nic->node_addr, ETH_ALEN); +- nstype = htons(type); +- memcpy(txp + 12, (char*)&nstype, 2); +- memcpy(txp + ETH_HLEN, data, len); +- len += ETH_HLEN; +- /* pad frame */ +- if (len < ETH_ZLEN) +- { +- s = (unsigned char*)(txp+len); +- while (s < (unsigned char*)(txp+ETH_ZLEN)) +- *s++ = 0; +- len = ETH_ZLEN; +- } +- dev->tx_ring[entry].cmd_status = cpu_to_le32(DescOwn | len); +- dev->cur_tx++; +- if (dev->cur_tx >= TX_RING_SIZE) +- dev->cur_tx = 0; +- +- /* Wake the potentially-idle transmit channel. */ +- writel(TxOn, dev->ioaddr + ChipCmd); +- +- /* wait for tranmission to complete */ +- to = TIME_OUT; +- while (to != 0) +- { +- desc_status = dev->tx_ring[entry].cmd_status; +- if ((desc_status & DescOwn) == 0) +- break; +- else +- --to; +- } +- +- readl(dev->ioaddr + IntrStatus); /* clear interrrupt bits */ +- return; +-} +- +-static void fa311_disable(struct nic *nic) +-{ +-struct FA311_DEV* dev = &fa311_dev; +- +- /* Stop the chip's Tx and Rx processes. */ +- writel(RxOff | TxOff, dev->ioaddr + ChipCmd); +-} +- +- +-/* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. +- The EEPROM code is for the common 93c06/46 EEPROMs with 6 bit addresses. */ +- +-/* Delay between EEPROM clock transitions. +- No extra delay is needed with 33Mhz PCI, but future 66Mhz access may need +- a delay. Note that pre-2.0.34 kernels had a cache-alignment bug that +- made udelay() unreliable. +- The old method of using an ISA access as a delay, __SLOW_DOWN_IO__, is +- depricated. +-*/ +-#define eeprom_delay(ee_addr) inl(ee_addr) +- +-enum EEPROM_Ctrl_Bits { +- EE_ShiftClk=0x04, EE_DataIn=0x01, EE_ChipSelect=0x08, EE_DataOut=0x02, +-}; +-#define EE_Write0 (EE_ChipSelect) +-#define EE_Write1 (EE_ChipSelect | EE_DataIn) +- +-/* The EEPROM commands include the alway-set leading bit. */ +-enum EEPROM_Cmds { +- EE_WriteCmd=(5 << 6), EE_ReadCmd=(6 << 6), EE_EraseCmd=(7 << 6), +-}; +- +- +-static int eeprom_read(long addr, int location) +-{ +- int i; +- int retval = 0; +- int ee_addr = addr + EECtrl; +- int read_cmd = location | EE_ReadCmd; +- writel(EE_Write0, ee_addr); +- +- /* Shift the read command bits out. */ +- for (i = 10; i >= 0; i--) { +- short dataval = (read_cmd & (1 << i)) ? EE_Write1 : EE_Write0; +- writel(dataval, ee_addr); +- eeprom_delay(ee_addr); +- writel(dataval | EE_ShiftClk, ee_addr); +- eeprom_delay(ee_addr); +- } +- writel(EE_ChipSelect, ee_addr); +- eeprom_delay(ee_addr); +- +- for (i = 0; i < 16; i++) { +- writel(EE_ChipSelect | EE_ShiftClk, ee_addr); +- eeprom_delay(ee_addr); +- retval |= (readl(ee_addr) & EE_DataOut) ? 1 << i : 0; +- writel(EE_ChipSelect, ee_addr); +- eeprom_delay(ee_addr); +- } +- +- /* Terminate the EEPROM access. */ +- writel(EE_Write0, ee_addr); +- writel(0, ee_addr); +- return retval; +-} +- +-/* Initialize the Rx and Tx rings, along with various 'dev' bits. */ +-static void init_ring(struct FA311_DEV *dev) +-{ +- int i; +- +- dev->cur_rx = 0; +- dev->cur_tx = 0; +- +- dev->rx_buf_sz = PKT_BUF_SZ; +- dev->rx_head_desc = &dev->rx_ring[0]; +- +- /* Initialize all Rx descriptors. */ +- for (i = 0; i < RX_RING_SIZE; i++) { +- dev->rx_ring[i].next_desc = virt_to_le32desc(&dev->rx_ring[i+1]); +- dev->rx_ring[i].cmd_status = DescOwn; +- } +- /* Mark the last entry as wrapping the ring. */ +- dev->rx_ring[i-1].next_desc = virt_to_le32desc(&dev->rx_ring[0]); +- +- /* Fill in the Rx buffers. Handle allocation failure gracefully. */ +- for (i = 0; i < RX_RING_SIZE; i++) { +- dev->rx_ring[i].addr = (u32)(&rx_packet[PKT_BUF_SZ * i]); +- dev->rx_ring[i].cmd_status = cpu_to_le32(dev->rx_buf_sz); +- } +- +- for (i = 0; i < TX_RING_SIZE; i++) { +- dev->tx_ring[i].next_desc = virt_to_le32desc(&dev->tx_ring[i+1]); +- dev->tx_ring[i].cmd_status = 0; +- } +- dev->tx_ring[i-1].next_desc = virt_to_le32desc(&dev->tx_ring[0]); +- +- for (i = 0; i < TX_RING_SIZE; i++) +- dev->tx_ring[i].addr = (u32)(&tx_packet[PKT_BUF_SZ * i]); +- return; +-} +- +Index: b/netboot/forcedeth.c +=================================================================== +--- /dev/null ++++ b/netboot/forcedeth.c +@@ -0,0 +1,1039 @@ ++/************************************************************************** ++* forcedeth.c -- Etherboot device driver for the NVIDIA nForce ++* media access controllers. ++* ++* Note: This driver is based on the Linux driver that was based on ++* a cleanroom reimplementation which was based on reverse ++* engineered documentation written by Carl-Daniel Hailfinger ++* and Andrew de Quincey. It's neither supported nor endorsed ++* by NVIDIA Corp. Use at your own risk. ++* ++* Written 2004 by Timothy Legge ++* ++* 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., 675 Mass Ave, Cambridge, MA 02139, USA. ++* ++* Portions of this code based on: ++* forcedeth: Ethernet driver for NVIDIA nForce media access controllers: ++* ++* (C) 2003 Manfred Spraul ++* See Linux Driver for full information ++* ++* Linux Driver Version 0.22, 19 Jan 2004 ++* ++* ++* REVISION HISTORY: ++* ================ ++* v1.0 01-31-2004 timlegge Initial port of Linux driver ++* v1.1 02-03-2004 timlegge Large Clean up, first release ++* ++* Indent Options: indent -kr -i8 ++***************************************************************************/ ++ ++/* to get some global routines like printf */ ++#include "etherboot.h" ++/* to get the interface to the body of the program */ ++#include "nic.h" ++/* to get the PCI support functions, if this is a PCI NIC */ ++#include "pci.h" ++/* Include timer support functions */ ++#include "timer.h" ++ ++#define drv_version "v1.1" ++#define drv_date "02-03-2004" ++ ++//#define TFTM_DEBUG ++#ifdef TFTM_DEBUG ++#define dprintf(x) printf x ++#else ++#define dprintf(x) ++#endif ++ ++typedef unsigned char u8; ++typedef signed char s8; ++typedef unsigned short u16; ++typedef signed short s16; ++typedef unsigned int u32; ++typedef signed int s32; ++ ++/* Condensed operations for readability. */ ++#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) ++#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) ++ ++unsigned long BASE; ++/* NIC specific static variables go here */ ++ ++ ++/* ++ * Hardware access: ++ */ ++ ++#define DEV_NEED_LASTPACKET1 0x0001 ++#define DEV_IRQMASK_1 0x0002 ++#define DEV_IRQMASK_2 0x0004 ++#define DEV_NEED_TIMERIRQ 0x0008 ++ ++enum { ++ NvRegIrqStatus = 0x000, ++#define NVREG_IRQSTAT_MIIEVENT 0040 ++#define NVREG_IRQSTAT_MASK 0x1ff ++ NvRegIrqMask = 0x004, ++#define NVREG_IRQ_RX 0x0002 ++#define NVREG_IRQ_RX_NOBUF 0x0004 ++#define NVREG_IRQ_TX_ERR 0x0008 ++#define NVREG_IRQ_TX2 0x0010 ++#define NVREG_IRQ_TIMER 0x0020 ++#define NVREG_IRQ_LINK 0x0040 ++#define NVREG_IRQ_TX1 0x0100 ++#define NVREG_IRQMASK_WANTED_1 0x005f ++#define NVREG_IRQMASK_WANTED_2 0x0147 ++#define NVREG_IRQ_UNKNOWN (~(NVREG_IRQ_RX|NVREG_IRQ_RX_NOBUF|NVREG_IRQ_TX_ERR|NVREG_IRQ_TX2|NVREG_IRQ_TIMER|NVREG_IRQ_LINK|NVREG_IRQ_TX1)) ++ ++ NvRegUnknownSetupReg6 = 0x008, ++#define NVREG_UNKSETUP6_VAL 3 ++ ++/* ++ * NVREG_POLL_DEFAULT is the interval length of the timer source on the nic ++ * NVREG_POLL_DEFAULT=97 would result in an interval length of 1 ms ++ */ ++ NvRegPollingInterval = 0x00c, ++#define NVREG_POLL_DEFAULT 970 ++ NvRegMisc1 = 0x080, ++#define NVREG_MISC1_HD 0x02 ++#define NVREG_MISC1_FORCE 0x3b0f3c ++ ++ NvRegTransmitterControl = 0x084, ++#define NVREG_XMITCTL_START 0x01 ++ NvRegTransmitterStatus = 0x088, ++#define NVREG_XMITSTAT_BUSY 0x01 ++ ++ NvRegPacketFilterFlags = 0x8c, ++#define NVREG_PFF_ALWAYS 0x7F0008 ++#define NVREG_PFF_PROMISC 0x80 ++#define NVREG_PFF_MYADDR 0x20 ++ ++ NvRegOffloadConfig = 0x90, ++#define NVREG_OFFLOAD_HOMEPHY 0x601 ++#define NVREG_OFFLOAD_NORMAL 0x5ee ++ NvRegReceiverControl = 0x094, ++#define NVREG_RCVCTL_START 0x01 ++ NvRegReceiverStatus = 0x98, ++#define NVREG_RCVSTAT_BUSY 0x01 ++ ++ NvRegRandomSeed = 0x9c, ++#define NVREG_RNDSEED_MASK 0x00ff ++#define NVREG_RNDSEED_FORCE 0x7f00 ++ ++ NvRegUnknownSetupReg1 = 0xA0, ++#define NVREG_UNKSETUP1_VAL 0x16070f ++ NvRegUnknownSetupReg2 = 0xA4, ++#define NVREG_UNKSETUP2_VAL 0x16 ++ NvRegMacAddrA = 0xA8, ++ NvRegMacAddrB = 0xAC, ++ NvRegMulticastAddrA = 0xB0, ++#define NVREG_MCASTADDRA_FORCE 0x01 ++ NvRegMulticastAddrB = 0xB4, ++ NvRegMulticastMaskA = 0xB8, ++ NvRegMulticastMaskB = 0xBC, ++ ++ NvRegTxRingPhysAddr = 0x100, ++ NvRegRxRingPhysAddr = 0x104, ++ NvRegRingSizes = 0x108, ++#define NVREG_RINGSZ_TXSHIFT 0 ++#define NVREG_RINGSZ_RXSHIFT 16 ++ NvRegUnknownTransmitterReg = 0x10c, ++ NvRegLinkSpeed = 0x110, ++#define NVREG_LINKSPEED_FORCE 0x10000 ++#define NVREG_LINKSPEED_10 10 ++#define NVREG_LINKSPEED_100 100 ++#define NVREG_LINKSPEED_1000 1000 ++ NvRegUnknownSetupReg5 = 0x130, ++#define NVREG_UNKSETUP5_BIT31 (1<<31) ++ NvRegUnknownSetupReg3 = 0x134, ++#define NVREG_UNKSETUP3_VAL1 0x200010 ++ NvRegTxRxControl = 0x144, ++#define NVREG_TXRXCTL_KICK 0x0001 ++#define NVREG_TXRXCTL_BIT1 0x0002 ++#define NVREG_TXRXCTL_BIT2 0x0004 ++#define NVREG_TXRXCTL_IDLE 0x0008 ++#define NVREG_TXRXCTL_RESET 0x0010 ++ NvRegMIIStatus = 0x180, ++#define NVREG_MIISTAT_ERROR 0x0001 ++#define NVREG_MIISTAT_LINKCHANGE 0x0008 ++#define NVREG_MIISTAT_MASK 0x000f ++#define NVREG_MIISTAT_MASK2 0x000f ++ NvRegUnknownSetupReg4 = 0x184, ++#define NVREG_UNKSETUP4_VAL 8 ++ ++ NvRegAdapterControl = 0x188, ++#define NVREG_ADAPTCTL_START 0x02 ++#define NVREG_ADAPTCTL_LINKUP 0x04 ++#define NVREG_ADAPTCTL_PHYVALID 0x4000 ++#define NVREG_ADAPTCTL_RUNNING 0x100000 ++#define NVREG_ADAPTCTL_PHYSHIFT 24 ++ NvRegMIISpeed = 0x18c, ++#define NVREG_MIISPEED_BIT8 (1<<8) ++#define NVREG_MIIDELAY 5 ++ NvRegMIIControl = 0x190, ++#define NVREG_MIICTL_INUSE 0x10000 ++#define NVREG_MIICTL_WRITE 0x08000 ++#define NVREG_MIICTL_ADDRSHIFT 5 ++ NvRegMIIData = 0x194, ++ NvRegWakeUpFlags = 0x200, ++#define NVREG_WAKEUPFLAGS_VAL 0x7770 ++#define NVREG_WAKEUPFLAGS_BUSYSHIFT 24 ++#define NVREG_WAKEUPFLAGS_ENABLESHIFT 16 ++#define NVREG_WAKEUPFLAGS_D3SHIFT 12 ++#define NVREG_WAKEUPFLAGS_D2SHIFT 8 ++#define NVREG_WAKEUPFLAGS_D1SHIFT 4 ++#define NVREG_WAKEUPFLAGS_D0SHIFT 0 ++#define NVREG_WAKEUPFLAGS_ACCEPT_MAGPAT 0x01 ++#define NVREG_WAKEUPFLAGS_ACCEPT_WAKEUPPAT 0x02 ++#define NVREG_WAKEUPFLAGS_ACCEPT_LINKCHANGE 0x04 ++ ++ NvRegPatternCRC = 0x204, ++ NvRegPatternMask = 0x208, ++ NvRegPowerCap = 0x268, ++#define NVREG_POWERCAP_D3SUPP (1<<30) ++#define NVREG_POWERCAP_D2SUPP (1<<26) ++#define NVREG_POWERCAP_D1SUPP (1<<25) ++ NvRegPowerState = 0x26c, ++#define NVREG_POWERSTATE_POWEREDUP 0x8000 ++#define NVREG_POWERSTATE_VALID 0x0100 ++#define NVREG_POWERSTATE_MASK 0x0003 ++#define NVREG_POWERSTATE_D0 0x0000 ++#define NVREG_POWERSTATE_D1 0x0001 ++#define NVREG_POWERSTATE_D2 0x0002 ++#define NVREG_POWERSTATE_D3 0x0003 ++}; ++ ++ ++ ++#define NV_TX_LASTPACKET (1<<0) ++#define NV_TX_RETRYERROR (1<<3) ++#define NV_TX_LASTPACKET1 (1<<8) ++#define NV_TX_DEFERRED (1<<10) ++#define NV_TX_CARRIERLOST (1<<11) ++#define NV_TX_LATECOLLISION (1<<12) ++#define NV_TX_UNDERFLOW (1<<13) ++#define NV_TX_ERROR (1<<14) ++#define NV_TX_VALID (1<<15) ++ ++#define NV_RX_DESCRIPTORVALID (1<<0) ++#define NV_RX_MISSEDFRAME (1<<1) ++#define NV_RX_SUBSTRACT1 (1<<3) ++#define NV_RX_ERROR1 (1<<7) ++#define NV_RX_ERROR2 (1<<8) ++#define NV_RX_ERROR3 (1<<9) ++#define NV_RX_ERROR4 (1<<10) ++#define NV_RX_CRCERR (1<<11) ++#define NV_RX_OVERFLOW (1<<12) ++#define NV_RX_FRAMINGERR (1<<13) ++#define NV_RX_ERROR (1<<14) ++#define NV_RX_AVAIL (1<<15) ++ ++/* Miscelaneous hardware related defines: */ ++#define NV_PCI_REGSZ 0x270 ++ ++/* various timeout delays: all in usec */ ++#define NV_TXRX_RESET_DELAY 4 ++#define NV_TXSTOP_DELAY1 10 ++#define NV_TXSTOP_DELAY1MAX 500000 ++#define NV_TXSTOP_DELAY2 100 ++#define NV_RXSTOP_DELAY1 10 ++#define NV_RXSTOP_DELAY1MAX 500000 ++#define NV_RXSTOP_DELAY2 100 ++#define NV_SETUP5_DELAY 5 ++#define NV_SETUP5_DELAYMAX 50000 ++#define NV_POWERUP_DELAY 5 ++#define NV_POWERUP_DELAYMAX 5000 ++#define NV_MIIBUSY_DELAY 50 ++#define NV_MIIPHY_DELAY 10 ++#define NV_MIIPHY_DELAYMAX 10000 ++ ++#define NV_WAKEUPPATTERNS 5 ++#define NV_WAKEUPMASKENTRIES 4 ++ ++/* General driver defaults */ ++#define NV_WATCHDOG_TIMEO (2*HZ) ++#define DEFAULT_MTU 1500 /* also maximum supported, at least for now */ ++ ++#define RX_RING 4 ++#define TX_RING 2 ++/* limited to 1 packet until we understand NV_TX_LASTPACKET */ ++#define TX_LIMIT_STOP 10 ++#define TX_LIMIT_START 5 ++ ++/* rx/tx mac addr + type + vlan + align + slack*/ ++#define RX_NIC_BUFSIZE (DEFAULT_MTU + 64) ++/* even more slack */ ++#define RX_ALLOC_BUFSIZE (DEFAULT_MTU + 128) ++ ++#define OOM_REFILL (1+HZ/20) ++#define POLL_WAIT (1+HZ/100) ++ ++struct ring_desc { ++ u32 PacketBuffer; ++ u16 Length; ++ u16 Flags; ++}; ++ ++ ++/* Define the TX Descriptor */ ++static struct ring_desc tx_ring[TX_RING]; ++ ++/* Create a static buffer of size RX_BUF_SZ for each ++TX Descriptor. All descriptors point to a ++part of this buffer */ ++static unsigned char txb[TX_RING * RX_NIC_BUFSIZE]; ++ ++/* Define the TX Descriptor */ ++static struct ring_desc rx_ring[RX_RING]; ++ ++/* Create a static buffer of size RX_BUF_SZ for each ++RX Descriptor All descriptors point to a ++part of this buffer */ ++static unsigned char rxb[RX_RING * RX_NIC_BUFSIZE]; ++ ++/* Private Storage for the NIC */ ++struct forcedeth_private { ++ /* General data: ++ * Locking: spin_lock(&np->lock); */ ++ int in_shutdown; ++ u32 linkspeed; ++ int duplex; ++ int phyaddr; ++ ++ /* General data: RO fields */ ++ u8 *ring_addr; ++ u32 orig_mac[2]; ++ u32 irqmask; ++ /* rx specific fields. ++ * Locking: Within irq hander or disable_irq+spin_lock(&np->lock); ++ */ ++ struct ring_desc *rx_ring; ++ unsigned int cur_rx, refill_rx; ++ struct sk_buff *rx_skbuff[RX_RING]; ++ u32 rx_dma[RX_RING]; ++ unsigned int rx_buf_sz; ++ ++ /* ++ * tx specific fields. ++ */ ++ struct ring_desc *tx_ring; ++ unsigned int next_tx, nic_tx; ++ struct sk_buff *tx_skbuff[TX_RING]; ++ u32 tx_dma[TX_RING]; ++ u16 tx_flags; ++} npx; ++ ++static struct forcedeth_private *np; ++ ++static inline void pci_push(u8 * base) ++{ ++ /* force out pending posted writes */ ++ readl(base); ++} ++static int reg_delay(int offset, u32 mask, ++ u32 target, int delay, int delaymax, const char *msg) ++{ ++ u8 *base = (u8 *) BASE; ++ ++ pci_push(base); ++ do { ++ udelay(delay); ++ delaymax -= delay; ++ if (delaymax < 0) { ++ if (msg) ++ printf(msg); ++ return 1; ++ } ++ } while ((readl(base + offset) & mask) != target); ++ return 0; ++} ++ ++#define MII_READ (-1) ++#define MII_PHYSID1 0x02 /* PHYS ID 1 */ ++#define MII_PHYSID2 0x03 /* PHYS ID 2 */ ++#define MII_BMCR 0x00 /* Basic mode control register */ ++#define MII_BMSR 0x01 /* Basic mode status register */ ++#define MII_ADVERTISE 0x04 /* Advertisement control reg */ ++#define MII_LPA 0x05 /* Link partner ability reg */ ++ ++#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ ++ ++/* Link partner ability register. */ ++#define LPA_SLCT 0x001f /* Same as advertise selector */ ++#define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */ ++#define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */ ++#define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ ++#define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ ++#define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ ++#define LPA_RESV 0x1c00 /* Unused... */ ++#define LPA_RFAULT 0x2000 /* Link partner faulted */ ++#define LPA_LPACK 0x4000 /* Link partner acked us */ ++#define LPA_NPAGE 0x8000 /* Next page bit */ ++ ++/* mii_rw: read/write a register on the PHY. ++ * ++ * Caller must guarantee serialization ++ */ ++static int mii_rw(struct nic *nic __unused, int addr, int miireg, ++ int value) ++{ ++ u8 *base = (u8 *) BASE; ++ int was_running; ++ u32 reg; ++ int retval; ++ ++ writel(NVREG_MIISTAT_MASK, base + NvRegMIIStatus); ++ was_running = 0; ++ reg = readl(base + NvRegAdapterControl); ++ if (reg & NVREG_ADAPTCTL_RUNNING) { ++ was_running = 1; ++ writel(reg & ~NVREG_ADAPTCTL_RUNNING, ++ base + NvRegAdapterControl); ++ } ++ reg = readl(base + NvRegMIIControl); ++ if (reg & NVREG_MIICTL_INUSE) { ++ writel(NVREG_MIICTL_INUSE, base + NvRegMIIControl); ++ udelay(NV_MIIBUSY_DELAY); ++ } ++ ++ reg = ++ NVREG_MIICTL_INUSE | (addr << NVREG_MIICTL_ADDRSHIFT) | miireg; ++ if (value != MII_READ) { ++ writel(value, base + NvRegMIIData); ++ reg |= NVREG_MIICTL_WRITE; ++ } ++ writel(reg, base + NvRegMIIControl); ++ ++ if (reg_delay(NvRegMIIControl, NVREG_MIICTL_INUSE, 0, ++ NV_MIIPHY_DELAY, NV_MIIPHY_DELAYMAX, NULL)) { ++ dprintf(("mii_rw of reg %d at PHY %d timed out.\n", ++ miireg, addr)); ++ retval = -1; ++ } else if (value != MII_READ) { ++ /* it was a write operation - fewer failures are detectable */ ++ dprintf(("mii_rw wrote 0x%x to reg %d at PHY %d\n", ++ value, miireg, addr)); ++ retval = 0; ++ } else if (readl(base + NvRegMIIStatus) & NVREG_MIISTAT_ERROR) { ++ dprintf(("mii_rw of reg %d at PHY %d failed.\n", ++ miireg, addr)); ++ retval = -1; ++ } else { ++ /* FIXME: why is that required? */ ++ udelay(50); ++ retval = readl(base + NvRegMIIData); ++ dprintf(("mii_rw read from reg %d at PHY %d: 0x%x.\n", ++ miireg, addr, retval)); ++ } ++ if (was_running) { ++ reg = readl(base + NvRegAdapterControl); ++ writel(reg | NVREG_ADAPTCTL_RUNNING, ++ base + NvRegAdapterControl); ++ } ++ return retval; ++} ++ ++static void start_rx(struct nic *nic __unused) ++{ ++ u8 *base = (u8 *) BASE; ++ ++ dprintf(("start_rx\n")); ++ /* Already running? Stop it. */ ++ if (readl(base + NvRegReceiverControl) & NVREG_RCVCTL_START) { ++ writel(0, base + NvRegReceiverControl); ++ pci_push(base); ++ } ++ writel(np->linkspeed, base + NvRegLinkSpeed); ++ pci_push(base); ++ writel(NVREG_RCVCTL_START, base + NvRegReceiverControl); ++ pci_push(base); ++} ++ ++static void stop_rx(void) ++{ ++ u8 *base = (u8 *) BASE; ++ ++ dprintf(("stop_rx\n")); ++ writel(0, base + NvRegReceiverControl); ++ reg_delay(NvRegReceiverStatus, NVREG_RCVSTAT_BUSY, 0, ++ NV_RXSTOP_DELAY1, NV_RXSTOP_DELAY1MAX, ++ "stop_rx: ReceiverStatus remained busy"); ++ ++ udelay(NV_RXSTOP_DELAY2); ++ writel(0, base + NvRegLinkSpeed); ++} ++ ++static void start_tx(struct nic *nic __unused) ++{ ++ u8 *base = (u8 *) BASE; ++ ++ dprintf(("start_tx\n")); ++ writel(NVREG_XMITCTL_START, base + NvRegTransmitterControl); ++ pci_push(base); ++} ++ ++static void stop_tx(void) ++{ ++ u8 *base = (u8 *) BASE; ++ ++ dprintf(("stop_tx\n")); ++ writel(0, base + NvRegTransmitterControl); ++ reg_delay(NvRegTransmitterStatus, NVREG_XMITSTAT_BUSY, 0, ++ NV_TXSTOP_DELAY1, NV_TXSTOP_DELAY1MAX, ++ "stop_tx: TransmitterStatus remained busy"); ++ ++ udelay(NV_TXSTOP_DELAY2); ++ writel(0, base + NvRegUnknownTransmitterReg); ++} ++ ++ ++static void txrx_reset(struct nic *nic __unused) ++{ ++ u8 *base = (u8 *) BASE; ++ ++ dprintf(("txrx_reset\n")); ++ writel(NVREG_TXRXCTL_BIT2 | NVREG_TXRXCTL_RESET, ++ base + NvRegTxRxControl); ++ pci_push(base); ++ udelay(NV_TXRX_RESET_DELAY); ++ writel(NVREG_TXRXCTL_BIT2, base + NvRegTxRxControl); ++ pci_push(base); ++} ++ ++/* ++ * alloc_rx: fill rx ring entries. ++ * Return 1 if the allocations for the skbs failed and the ++ * rx engine is without Available descriptors ++ */ ++static int alloc_rx(struct nic *nic __unused) ++{ ++ unsigned int refill_rx = np->refill_rx; ++ int i; ++ //while (np->cur_rx != refill_rx) { ++ for (i = 0; i < RX_RING; i++) { ++ //int nr = refill_rx % RX_RING; ++ rx_ring[i].PacketBuffer = ++ virt_to_le32desc(&rxb[i * RX_NIC_BUFSIZE]); ++ rx_ring[i].Length = cpu_to_le16(RX_NIC_BUFSIZE); ++ wmb(); ++ rx_ring[i].Flags = cpu_to_le16(NV_RX_AVAIL); ++ /* printf("alloc_rx: Packet %d marked as Available\n", ++ refill_rx); */ ++ refill_rx++; ++ } ++ np->refill_rx = refill_rx; ++ if (np->cur_rx - refill_rx == RX_RING) ++ return 1; ++ return 0; ++} ++ ++static int update_linkspeed(struct nic *nic) ++{ ++ int adv, lpa, newdup; ++ u32 newls; ++ adv = mii_rw(nic, np->phyaddr, MII_ADVERTISE, MII_READ); ++ lpa = mii_rw(nic, np->phyaddr, MII_LPA, MII_READ); ++ dprintf(("update_linkspeed: PHY advertises 0x%hX, lpa 0x%hX.\n", ++ adv, lpa)); ++ ++ /* FIXME: handle parallel detection properly, handle gigabit ethernet */ ++ lpa = lpa & adv; ++ if (lpa & LPA_100FULL) { ++ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_100; ++ newdup = 1; ++ } else if (lpa & LPA_100HALF) { ++ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_100; ++ newdup = 0; ++ } else if (lpa & LPA_10FULL) { ++ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_10; ++ newdup = 1; ++ } else if (lpa & LPA_10HALF) { ++ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_10; ++ newdup = 0; ++ } else { ++ printf("bad ability %hX - falling back to 10HD.\n", lpa); ++ newls = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_10; ++ newdup = 0; ++ } ++ if (np->duplex != newdup || np->linkspeed != newls) { ++ np->duplex = newdup; ++ np->linkspeed = newls; ++ return 1; ++ } ++ return 0; ++} ++ ++ ++ ++static int init_ring(struct nic *nic) ++{ ++ int i; ++ ++ np->next_tx = np->nic_tx = 0; ++ for (i = 0; i < TX_RING; i++) { ++ tx_ring[i].Flags = 0; ++ } ++ ++ np->cur_rx = 0; ++ np->refill_rx = 0; ++ for (i = 0; i < RX_RING; i++) { ++ rx_ring[i].Flags = 0; ++ } ++ return alloc_rx(nic); ++} ++ ++static void set_multicast(struct nic *nic) ++{ ++ ++ u8 *base = (u8 *) BASE; ++ u32 addr[2]; ++ u32 mask[2]; ++ u32 pff; ++ u32 alwaysOff[2]; ++ u32 alwaysOn[2]; ++ ++ memset(addr, 0, sizeof(addr)); ++ memset(mask, 0, sizeof(mask)); ++ ++ pff = NVREG_PFF_MYADDR; ++ ++ alwaysOn[0] = alwaysOn[1] = alwaysOff[0] = alwaysOff[1] = 0; ++ ++ addr[0] = alwaysOn[0]; ++ addr[1] = alwaysOn[1]; ++ mask[0] = alwaysOn[0] | alwaysOff[0]; ++ mask[1] = alwaysOn[1] | alwaysOff[1]; ++ ++ addr[0] |= NVREG_MCASTADDRA_FORCE; ++ pff |= NVREG_PFF_ALWAYS; ++ stop_rx(); ++ writel(addr[0], base + NvRegMulticastAddrA); ++ writel(addr[1], base + NvRegMulticastAddrB); ++ writel(mask[0], base + NvRegMulticastMaskA); ++ writel(mask[1], base + NvRegMulticastMaskB); ++ writel(pff, base + NvRegPacketFilterFlags); ++ start_rx(nic); ++} ++ ++/************************************************************************** ++RESET - Reset the NIC to prepare for use ++***************************************************************************/ ++static int forcedeth_reset(struct nic *nic) ++{ ++ u8 *base = (u8 *) BASE; ++ int ret, oom, i; ++ ret = 0; ++ dprintf(("forcedeth: open\n")); ++ ++ /* 1) erase previous misconfiguration */ ++ /* 4.1-1: stop adapter: ignored, 4.3 seems to be overkill */ ++ writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA); ++ writel(0, base + NvRegMulticastAddrB); ++ writel(0, base + NvRegMulticastMaskA); ++ writel(0, base + NvRegMulticastMaskB); ++ writel(0, base + NvRegPacketFilterFlags); ++ writel(0, base + NvRegAdapterControl); ++ writel(0, base + NvRegLinkSpeed); ++ writel(0, base + NvRegUnknownTransmitterReg); ++ txrx_reset(nic); ++ writel(0, base + NvRegUnknownSetupReg6); ++ ++ /* 2) initialize descriptor rings */ ++ np->in_shutdown = 0; ++ oom = init_ring(nic); ++ ++ /* 3) set mac address */ ++ { ++ u32 mac[2]; ++ ++ mac[0] = ++ (nic->node_addr[0] << 0) + (nic->node_addr[1] << 8) + ++ (nic->node_addr[2] << 16) + (nic->node_addr[3] << 24); ++ mac[1] = ++ (nic->node_addr[4] << 0) + (nic->node_addr[5] << 8); ++ ++ writel(mac[0], base + NvRegMacAddrA); ++ writel(mac[1], base + NvRegMacAddrB); ++ } ++ ++ /* 4) continue setup */ ++ np->linkspeed = NVREG_LINKSPEED_FORCE | NVREG_LINKSPEED_10; ++ np->duplex = 0; ++ writel(NVREG_UNKSETUP3_VAL1, base + NvRegUnknownSetupReg3); ++ writel(0, base + NvRegTxRxControl); ++ pci_push(base); ++ writel(NVREG_TXRXCTL_BIT1, base + NvRegTxRxControl); ++ ++ reg_delay(NvRegUnknownSetupReg5, NVREG_UNKSETUP5_BIT31, ++ NVREG_UNKSETUP5_BIT31, NV_SETUP5_DELAY, ++ NV_SETUP5_DELAYMAX, ++ "open: SetupReg5, Bit 31 remained off\n"); ++ writel(0, base + NvRegUnknownSetupReg4); ++ ++ /* 5) Find a suitable PHY */ ++ writel(NVREG_MIISPEED_BIT8 | NVREG_MIIDELAY, base + NvRegMIISpeed); ++ for (i = 1; i < 32; i++) { ++ int id1, id2; ++ ++ id1 = mii_rw(nic, i, MII_PHYSID1, MII_READ); ++ if (id1 < 0) ++ continue; ++ id2 = mii_rw(nic, i, MII_PHYSID2, MII_READ); ++ if (id2 < 0) ++ continue; ++ dprintf(("open: Found PHY %04x:%04x at address %d.\n", ++ id1, id2, i)); ++ np->phyaddr = i; ++ ++ update_linkspeed(nic); ++ ++ break; ++ } ++ if (i == 32) { ++ printf("open: failing due to lack of suitable PHY.\n"); ++ ret = -1; ++ goto out_drain; ++ } ++ ++ printf("%d-Mbs Link, %s-Duplex\n", ++ np->linkspeed & NVREG_LINKSPEED_10 ? 10 : 100, ++ np->duplex ? "Full" : "Half"); ++ /* 6) continue setup */ ++ writel(NVREG_MISC1_FORCE | (np->duplex ? 0 : NVREG_MISC1_HD), ++ base + NvRegMisc1); ++ writel(readl(base + NvRegTransmitterStatus), ++ base + NvRegTransmitterStatus); ++ writel(NVREG_PFF_ALWAYS, base + NvRegPacketFilterFlags); ++ writel(NVREG_OFFLOAD_NORMAL, base + NvRegOffloadConfig); ++ ++ writel(readl(base + NvRegReceiverStatus), ++ base + NvRegReceiverStatus); ++ ++ /* FIXME: I cheated and used the calculator to get a random number */ ++ i = 75963081; ++ writel(NVREG_RNDSEED_FORCE | (i & NVREG_RNDSEED_MASK), ++ base + NvRegRandomSeed); ++ writel(NVREG_UNKSETUP1_VAL, base + NvRegUnknownSetupReg1); ++ writel(NVREG_UNKSETUP2_VAL, base + NvRegUnknownSetupReg2); ++ writel(NVREG_POLL_DEFAULT, base + NvRegPollingInterval); ++ writel(NVREG_UNKSETUP6_VAL, base + NvRegUnknownSetupReg6); ++ writel((np-> ++ phyaddr << NVREG_ADAPTCTL_PHYSHIFT) | ++ NVREG_ADAPTCTL_PHYVALID, base + NvRegAdapterControl); ++ writel(NVREG_UNKSETUP4_VAL, base + NvRegUnknownSetupReg4); ++ writel(NVREG_WAKEUPFLAGS_VAL, base + NvRegWakeUpFlags); ++ ++ /* 7) start packet processing */ ++ writel((u32) virt_to_le32desc(&rx_ring[0]), ++ base + NvRegRxRingPhysAddr); ++ writel((u32) virt_to_le32desc(&tx_ring[0]), ++ base + NvRegTxRingPhysAddr); ++ ++ ++ writel(((RX_RING - 1) << NVREG_RINGSZ_RXSHIFT) + ++ ((TX_RING - 1) << NVREG_RINGSZ_TXSHIFT), ++ base + NvRegRingSizes); ++ ++ i = readl(base + NvRegPowerState); ++ if ((i & NVREG_POWERSTATE_POWEREDUP) == 0) { ++ writel(NVREG_POWERSTATE_POWEREDUP | i, ++ base + NvRegPowerState); ++ } ++ pci_push(base); ++ udelay(10); ++ writel(readl(base + NvRegPowerState) | NVREG_POWERSTATE_VALID, ++ base + NvRegPowerState); ++ writel(NVREG_ADAPTCTL_RUNNING, base + NvRegAdapterControl); ++ ++ writel(0, base + NvRegIrqMask); ++ pci_push(base); ++ writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); ++ pci_push(base); ++ writel(NVREG_MIISTAT_MASK2, base + NvRegMIIStatus); ++ writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus); ++ pci_push(base); ++/* ++ writel(np->irqmask, base + NvRegIrqMask); ++*/ ++ writel(NVREG_MCASTADDRA_FORCE, base + NvRegMulticastAddrA); ++ writel(0, base + NvRegMulticastAddrB); ++ writel(0, base + NvRegMulticastMaskA); ++ writel(0, base + NvRegMulticastMaskB); ++ writel(NVREG_PFF_ALWAYS | NVREG_PFF_MYADDR, ++ base + NvRegPacketFilterFlags); ++ ++ set_multicast(nic); ++ //start_rx(nic); ++ start_tx(nic); ++ ++ if (! ++ (mii_rw(nic, np->phyaddr, MII_BMSR, MII_READ) & ++ BMSR_ANEGCOMPLETE)) { ++ printf("no link during initialization.\n"); ++ } ++ ++ udelay(10000); ++ out_drain: ++ return ret; ++} ++ ++//extern void hex_dump(const char *data, const unsigned int len); ++ ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int forcedeth_poll(struct nic *nic, int retrieve) ++{ ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ ++ struct ring_desc *prd; ++ int len; ++ int i; ++ ++ i = np->cur_rx % RX_RING; ++ prd = &rx_ring[i]; ++ ++ if ( ! (prd->Flags & cpu_to_le16(NV_RX_DESCRIPTORVALID)) ) { ++ return 0; ++ } ++ ++ if ( ! retrieve ) return 1; ++ ++ /* got a valid packet - forward it to the network core */ ++ len = cpu_to_le16(prd->Length); ++ nic->packetlen = len; ++ //hex_dump(rxb + (i * RX_NIC_BUFSIZE), len); ++ memcpy(nic->packet, rxb + ++ (i * RX_NIC_BUFSIZE), nic->packetlen); ++ ++ wmb(); ++ np->cur_rx++; ++ alloc_rx(nic); ++ return 1; ++} ++ ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void forcedeth_transmit(struct nic *nic, const char *d, /* Destination */ ++ unsigned int t, /* Type */ ++ unsigned int s, /* size */ ++ const char *p) ++{ /* Packet */ ++ /* send the packet to destination */ ++ u8 *ptxb; ++ u16 nstype; ++ //u16 status; ++ u8 *base = (u8 *) BASE; ++ int nr = np->next_tx % TX_RING; ++ ++ /* point to the current txb incase multiple tx_rings are used */ ++ ptxb = txb + (nr * RX_NIC_BUFSIZE); ++ //np->tx_skbuff[nr] = ptxb; ++ ++ /* copy the packet to ring buffer */ ++ memcpy(ptxb, d, ETH_ALEN); /* dst */ ++ memcpy(ptxb + ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ ++ nstype = htons((u16) t); /* type */ ++ memcpy(ptxb + 2 * ETH_ALEN, (u8 *) & nstype, 2); /* type */ ++ memcpy(ptxb + ETH_HLEN, p, s); ++ ++ s += ETH_HLEN; ++ while (s < ETH_ZLEN) /* pad to min length */ ++ ptxb[s++] = '\0'; ++ ++ tx_ring[nr].PacketBuffer = (u32) virt_to_le32desc(ptxb); ++ tx_ring[nr].Length = cpu_to_le16(s - 1); ++ ++ wmb(); ++ tx_ring[nr].Flags = np->tx_flags; ++ ++ writel(NVREG_TXRXCTL_KICK, base + NvRegTxRxControl); ++ pci_push(base); ++ tx_ring[nr].Flags = np->tx_flags; ++ np->next_tx++; ++} ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void forcedeth_disable(struct dev *dev __unused) ++{ ++ /* put the card in its initial state */ ++ /* This function serves 3 purposes. ++ * This disables DMA and interrupts so we don't receive ++ * unexpected packets or interrupts from the card after ++ * etherboot has finished. ++ * This frees resources so etherboot may use ++ * this driver on another interface ++ * This allows etherboot to reinitialize the interface ++ * if something is something goes wrong. ++ */ ++ u8 *base = (u8 *) BASE; ++ np->in_shutdown = 1; ++ stop_tx(); ++ stop_rx(); ++ ++ /* disable interrupts on the nic or we will lock up */ ++ writel(0, base + NvRegIrqMask); ++ pci_push(base); ++ dprintf(("Irqmask is zero again\n")); ++ ++ /* specia op:o write back the misordered MAC address - otherwise ++ * the next probe_nic would see a wrong address. ++ */ ++ writel(np->orig_mac[0], base + NvRegMacAddrA); ++ writel(np->orig_mac[1], base + NvRegMacAddrB); ++} ++ ++/************************************************************************** ++IRQ - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void forcedeth_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++***************************************************************************/ ++#define IORESOURCE_MEM 0x00000200 ++#define board_found 1 ++#define valid_link 0 ++static int forcedeth_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *) dev; ++ unsigned long addr; ++ int sz; ++ u8 *base; ++ ++ if (pci->ioaddr == 0) ++ return 0; ++ ++ printf("forcedeth.c: Found %s, vendor=0x%hX, device=0x%hX\n", ++ pci->name, pci->vendor, pci->dev_id); ++ ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ++ /* point to private storage */ ++ np = &npx; ++ ++ adjust_pci_device(pci); ++ ++ addr = pci_bar_start(pci, PCI_BASE_ADDRESS_0); ++ sz = pci_bar_size(pci, PCI_BASE_ADDRESS_0); ++ ++ /* BASE is used throughout to address the card */ ++ BASE = (unsigned long) ioremap(addr, sz); ++ if (!BASE) ++ return 0; ++ //rx_ring[0] = rx_ring; ++ //tx_ring[0] = tx_ring; ++ ++ /* read the mac address */ ++ base = (u8 *) BASE; ++ np->orig_mac[0] = readl(base + NvRegMacAddrA); ++ np->orig_mac[1] = readl(base + NvRegMacAddrB); ++ ++ nic->node_addr[0] = (np->orig_mac[1] >> 8) & 0xff; ++ nic->node_addr[1] = (np->orig_mac[1] >> 0) & 0xff; ++ nic->node_addr[2] = (np->orig_mac[0] >> 24) & 0xff; ++ nic->node_addr[3] = (np->orig_mac[0] >> 16) & 0xff; ++ nic->node_addr[4] = (np->orig_mac[0] >> 8) & 0xff; ++ nic->node_addr[5] = (np->orig_mac[0] >> 0) & 0xff; ++#ifdef LINUX ++ if (!is_valid_ether_addr(dev->dev_addr)) { ++ /* ++ * Bad mac address. At least one bios sets the mac address ++ * to 01:23:45:67:89:ab ++ */ ++ printk(KERN_ERR ++ "%s: Invalid Mac address detected: %02x:%02x:%02x:%02x:%02x:%02x\n", ++ pci_name(pci_dev), dev->dev_addr[0], ++ dev->dev_addr[1], dev->dev_addr[2], ++ dev->dev_addr[3], dev->dev_addr[4], ++ dev->dev_addr[5]); ++ printk(KERN_ERR ++ "Please complain to your hardware vendor. Switching to a random MAC.\n"); ++ dev->dev_addr[0] = 0x00; ++ dev->dev_addr[1] = 0x00; ++ dev->dev_addr[2] = 0x6c; ++ get_random_bytes(&dev->dev_addr[3], 3); ++ } ++#endif ++ printf("%s: MAC Address %!, ", pci->name, nic->node_addr); ++ ++ np->tx_flags = ++ cpu_to_le16(NV_TX_LASTPACKET | NV_TX_LASTPACKET1 | ++ NV_TX_VALID); ++ switch (pci->dev_id) { ++ case 0x01C3: // nforce ++ np->irqmask = NVREG_IRQMASK_WANTED_2; ++ np->irqmask |= NVREG_IRQ_TIMER; ++ break; ++ case 0x0066: // nforce2 ++ np->tx_flags |= cpu_to_le16(NV_TX_LASTPACKET1); ++ np->irqmask = NVREG_IRQMASK_WANTED_2; ++ np->irqmask |= NVREG_IRQ_TIMER; ++ break; ++ case 0x00D6: // nforce3 ++ np->tx_flags |= cpu_to_le16(NV_TX_LASTPACKET1); ++ np->irqmask = NVREG_IRQMASK_WANTED_2; ++ np->irqmask |= NVREG_IRQ_TIMER; ++ ++ } ++ dprintf(("%s: forcedeth.c: subsystem: %hX:%hX bound to %s\n", ++ pci->name, pci->vendor, pci->dev_id, pci->name)); ++ ++ forcedeth_reset(nic); ++// if (board_found && valid_link) ++ /* point to NIC specific routines */ ++ dev->disable = forcedeth_disable; ++ nic->poll = forcedeth_poll; ++ nic->transmit = forcedeth_transmit; ++ nic->irq = forcedeth_irq; ++ return 1; ++// } ++ /* else */ ++} ++ ++static struct pci_id forcedeth_nics[] = { ++ PCI_ROM(0x10de, 0x01C3, "nforce", "nForce Ethernet Controller"), ++ PCI_ROM(0x10de, 0x0066, "nforce2", "nForce2 Ethernet Controller"), ++ PCI_ROM(0x10de, 0x00D6, "nforce3", "nForce3 Ethernet Controller"), ++}; ++ ++struct pci_driver forcedeth_driver = { ++ .type = NIC_DRIVER, ++ .name = "forcedeth", ++ .probe = forcedeth_probe, ++ .ids = forcedeth_nics, ++ .id_count = sizeof(forcedeth_nics) / sizeof(forcedeth_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/fsys_tftp.c +=================================================================== +--- a/netboot/fsys_tftp.c ++++ b/netboot/fsys_tftp.c +@@ -29,14 +29,15 @@ + /* #define TFTP_DEBUG 1 */ + + #include ++#include + +-#define GRUB 1 +-#include +-#include ++#include "grub.h" ++#include "tftp.h" ++#include "nic.h" + + static int retry; + static unsigned short iport = 2000; +-static unsigned short oport; ++static unsigned short oport = 0; + static unsigned short block, prevblock; + static int bcounter; + static struct tftp_t tp, saved_tp; +@@ -46,6 +47,172 @@ + static unsigned short len, saved_len; + static char *buf; + ++/** ++ * tftp_read ++ * ++ * Read file with _name_, data handled by _fnc_. In fact, grub never ++ * use it, we just use it to read dhcp config file. ++ */ ++static int await_tftp(int ival, void *ptr __unused, ++ unsigned short ptype __unused, struct iphdr *ip, ++ struct udphdr *udp) ++{ ++ if (!udp) { ++ return 0; ++ } ++ if (arptable[ARP_CLIENT].ipaddr.s_addr != ip->dest.s_addr) ++ return 0; ++ if (ntohs(udp->dest) != ival) ++ return 0; ++ return 1; ++} ++ ++int tftp_file_read(const char *name, int (*fnc)(unsigned char *, unsigned int, unsigned int, int)) ++{ ++ struct tftpreq_t tp; ++ struct tftp_t *tr; ++ int rc; ++ ++ retry = 0; ++ block = 0; ++ prevblock = 0; ++ bcounter = 0; ++ ++ ++ rx_qdrain(); ++ ++ tp.opcode = htons(TFTP_RRQ); ++ /* Warning: the following assumes the layout of bootp_t. ++ But that's fixed by the IP, UDP and BOOTP specs. */ ++ len = sizeof(tp.ip) + sizeof(tp.udp) + sizeof(tp.opcode) + ++ sprintf((char *)tp.u.rrq, "%s%coctet%cblksize%c%d", ++ name, 0, 0, 0, TFTP_MAX_PACKET) + 1; ++ if (!udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, ++iport, ++ TFTP_PORT, len, &tp)) ++ return (0); ++ for (;;) ++ { ++ long timeout; ++#ifdef CONGESTED ++ timeout = rfc2131_sleep_interval(block?TFTP_REXMT: TIMEOUT, retry); ++#else ++ timeout = rfc2131_sleep_interval(TIMEOUT, retry); ++#endif ++ if (!await_reply(await_tftp, iport, NULL, timeout)) ++ { ++ if (!block && retry++ < MAX_TFTP_RETRIES) ++ { /* maybe initial request was lost */ ++ if (!udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, ++ ++iport, TFTP_PORT, len, &tp)) ++ return (0); ++ continue; ++ } ++#ifdef CONGESTED ++ if (block && ((retry += TFTP_REXMT) < TFTP_TIMEOUT)) ++ { /* we resend our last ack */ ++#ifdef MDEBUG ++ printf("\n"); ++#endif ++ udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, ++ iport, oport, ++ TFTP_MIN_PACKET, &tp); ++ continue; ++ } ++#endif ++ break; /* timeout */ ++ } ++ tr = (struct tftp_t *)&nic.packet[ETH_HLEN]; ++ if (tr->opcode == ntohs(TFTP_ERROR)) ++ { ++ printf("TFTP error %d (%s)\n", ++ ntohs(tr->u.err.errcode), ++ tr->u.err.errmsg); ++ break; ++ } ++ ++ if (tr->opcode == ntohs(TFTP_OACK)) { ++ char *p = tr->u.oack.data, *e; ++ ++ if (prevblock) /* shouldn't happen */ ++ continue; /* ignore it */ ++ len = ntohs(tr->udp.len) - sizeof(struct udphdr) - 2; ++ if (len > TFTP_MAX_PACKET) ++ goto noak; ++ e = p + len; ++ while (*p != '\0' && p < e) { ++/* if (!strcasecmp("blksize", p)) { */ ++ if (!grub_strcmp("blksize", p)) { ++ p += 8; ++/* if ((packetsize = strtoul(p, &p, 10)) < */ ++ if ((packetsize = getdec(&p)) < TFTP_DEFAULTSIZE_PACKET) ++ goto noak; ++ while (p < e && *p) p++; ++ if (p < e) ++ p++; ++ } ++ else { ++ noak: ++ tp.opcode = htons(TFTP_ERROR); ++ tp.u.err.errcode = 8; ++/* ++ * Warning: the following assumes the layout of bootp_t. ++ * But that's fixed by the IP, UDP and BOOTP specs. ++ */ ++ len = sizeof(tp.ip) + sizeof(tp.udp) + sizeof(tp.opcode) + sizeof(tp.u.err.errcode) + ++/* ++ * Normally bad form to omit the format string, but in this case ++ * the string we are copying from is fixed. sprintf is just being ++ * used as a strcpy and strlen. ++ */ ++ sprintf((char *)tp.u.err.errmsg, ++ "RFC1782 error") + 1; ++ udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, ++ iport, ntohs(tr->udp.src), ++ len, &tp); ++ return (0); ++ } ++ } ++ if (p > e) ++ goto noak; ++ block = tp.u.ack.block = 0; /* this ensures, that */ ++ /* the packet does not get */ ++ /* processed as data! */ ++ } ++ else if (tr->opcode == htons(TFTP_DATA)) { ++ len = ntohs(tr->udp.len) - sizeof(struct udphdr) - 4; ++ if (len > packetsize) /* shouldn't happen */ ++ continue; /* ignore it */ ++ block = ntohs(tp.u.ack.block = tr->u.data.block); } ++ else {/* neither TFTP_OACK nor TFTP_DATA */ ++ break; ++ } ++ ++ if ((block || bcounter) && (block != (unsigned short)(prevblock+1))) { ++ /* Block order should be continuous */ ++ tp.u.ack.block = htons(block = prevblock); ++ } ++ tp.opcode = htons(TFTP_ACK); ++ oport = ntohs(tr->udp.src); ++ udp_transmit(arptable[ARP_SERVER].ipaddr.s_addr, iport, ++ oport, TFTP_MIN_PACKET, &tp); /* ack */ ++ if ((unsigned short)(block-prevblock) != 1) { ++ /* Retransmission or OACK, don't process via callback ++ * and don't change the value of prevblock. */ ++ continue; ++ } ++ prevblock = block; ++ retry = 0; /* It's the right place to zero the timer? */ ++ if ((rc = fnc(tr->u.data.download, ++ ++bcounter, len, len < packetsize)) <= 0) ++ return(rc); ++ if (len < packetsize) { /* End of data --- fnc should not have returned */ ++ printf("tftp download complete, but\n"); ++ return (1); ++ } ++ } ++ return (0); ++} ++ + /* Fill the buffer by receiving the data via the TFTP protocol. */ + static int + buf_fill (int abort) +@@ -65,9 +232,9 @@ + timeout = rfc2131_sleep_interval (TIMEOUT, retry); + #endif + +- if (! await_reply (AWAIT_TFTP, iport, NULL, timeout)) ++ if (! await_reply (await_tftp, iport, NULL, timeout)) + { +- if (ip_abort) ++ if (user_abort) + return 0; + + if (! block && retry++ < MAX_TFTP_RETRIES) +@@ -270,13 +437,7 @@ + buf_read = 0; + saved_filepos = 0; + +- /* Clear out the Rx queue first. It contains nothing of interest, +- * except possibly ARP requests from the DHCP/TFTP server. We use +- * polling throughout Etherboot, so some time may have passed since we +- * last polled the receive queue, which may now be filled with +- * broadcast packets. This will cause the reply to the packets we are +- * about to send to be lost immediately. Not very clever. */ +- await_reply (AWAIT_QDRAIN, 0, NULL, 0); ++ rx_qdrain(); + + #ifdef TFTP_DEBUG + grub_printf ("send_rrq ()\n"); +Index: b/netboot/grub.h +=================================================================== +--- /dev/null ++++ b/netboot/grub.h +@@ -0,0 +1,171 @@ ++#ifndef GRUB_H ++#define GRUB_H ++ ++#include "osdep.h" ++#include "byteswap.h" ++#include "in.h" ++#include "ip.h" ++#include "udp.h" ++#include "if_ether.h" ++#include "latch.h" ++#include "io.h" ++#include "nic.h" ++#include ++ ++#define K_ESC '\033' ++#define K_EOF '\04' /* Ctrl-D */ ++#define K_INTR '\03' /* Ctrl-C */ ++ ++#ifndef MAX_RPC_RETRIES ++#define MAX_RPC_RETRIES 20 ++#endif ++ ++ ++/* Inter-packet retry in ticks */ ++#ifndef TIMEOUT ++#define TIMEOUT (10*TICKS_PER_SEC) ++#endif ++ ++#ifndef NULL ++#define NULL ((void *)0) ++#endif ++ ++ ++#define ARP_CLIENT 0 ++#define ARP_SERVER 1 ++#define ARP_GATEWAY 2 ++#define MAX_ARP ARP_GATEWAY+1 ++ ++#define IGMP_SERVER 0 ++#define MAX_IGMP IGMP_SERVER+1 ++ ++#define RARP_REQUEST 3 ++#define RARP_REPLY 4 ++ ++ ++#define MULTICAST_MASK 0xF0000000 ++#define MULTICAST_NETWORK 0xE0000000 ++ ++struct arptable_t { ++ in_addr ipaddr; ++ uint8_t node[6]; ++}; ++ ++struct igmptable_t { ++ in_addr group; ++ unsigned long time; ++}; ++ ++#define KERNEL_BUF (BOOTP_DATA_ADDR->bootp_reply.bp_file) ++ ++#define FLOPPY_BOOT_LOCATION 0x7c00 ++/* Must match offsets in loader.S */ ++#define ROM_SEGMENT 0x1fa ++#define ROM_LENGTH 0x1fc ++ ++#define ROM_INFO_LOCATION (FLOPPY_BOOT_LOCATION+ROM_SEGMENT) ++/* at end of floppy boot block */ ++ ++ ++ ++/* Define a type for passing info to a loaded program */ ++struct ebinfo { ++ uint8_t major, minor; /* Version */ ++ uint16_t flags; /* Bit flags */ ++}; ++ ++/*************************************************************************** ++External prototypes ++***************************************************************************/ ++extern void rx_qdrain P((void)); ++extern int tftp P((const char *name, int (*)(unsigned char *, unsigned int, unsigned int, int))); ++extern int ip_transmit P((int len, const void *buf)); ++extern void build_ip_hdr P((unsigned long destip, int ttl, int protocol, ++ int option_len, int len, const void *buf)); ++extern void build_udp_hdr P((unsigned long destip, ++ unsigned int srcsock, unsigned int destsock, int ttl, ++ int len, const void *buf)); ++extern int udp_transmit P((unsigned long destip, unsigned int srcsock, ++ unsigned int destsock, int len, const void *buf)); ++typedef int (*reply_t)(int ival, void *ptr, unsigned short ptype, struct iphdr *ip, struct udphdr *udp); ++extern int await_reply P((reply_t reply, int ival, void *ptr, long timeout)); ++extern int decode_rfc1533 P((unsigned char *, unsigned int, unsigned int, int)); ++extern void join_group(int slot, unsigned long group); ++extern void leave_group(int slot); ++#define RAND_MAX 2147483647L ++extern uint16_t ipchksum P((const void *ip, unsigned long len)); ++extern uint16_t add_ipchksums P((unsigned long offset, uint16_t sum, uint16_t new)); ++extern int32_t random P((void)); ++extern long rfc2131_sleep_interval P((long base, int exp)); ++extern long rfc1112_sleep_interval P((long base, int exp)); ++#ifndef DOWNLOAD_PROTO_TFTP ++#define tftp(fname, load_block) 0 ++#endif ++extern void cleanup P((void)); ++ ++/* misc.c */ ++extern void twiddle P((void)); ++extern void sleep P((int secs)); ++extern void interruptible_sleep P((int secs)); ++extern void poll_interruptions P((void)); ++extern int strcasecmp P((const char *a, const char *b)); ++extern char *substr P((const char *a, const char *b)); ++extern unsigned long strtoul P((const char *p, const char **, int base)); ++extern void printf P((const char *, ...)); ++extern int sprintf P((char *, const char *, ...)); ++extern int inet_aton P((char *p, in_addr *i)); ++extern void putchar P((int)); ++extern int getchar P((void)); ++extern int iskey P((void)); ++ ++extern void grub_printf(const char *, ...); ++extern char config_file[128]; ++extern void etherboot_printf(const char *, ...); ++extern int etherboot_sprintf(char *, const char *, ...); ++extern int getdec(char **s); ++extern void cleanup_net(void); ++extern void print_network_configuration (void); ++extern int ifconfig (char *, char *, char *, char *); ++extern struct arptable_t arptable[MAX_ARP]; ++ ++#undef printf ++#undef sprintf ++#define printf etherboot_printf ++#define sprintf etherboot_sprintf ++ ++#ifdef DEBUG ++#define EnterFunction(func) printf("Enter: " func "\n"); ++#define LeaveFunction(func) printf("Leave: " func "\n"); ++#else ++#define EnterFunction(func) ++#define LeaveFunction(func) ++#endif ++ ++/* ++ * Some codes from etherboot use a level in DEBUG. Define it to be ++ * zero means no debug info output, that will make them silence in ++ * compiling. Up it as you want. ++ */ ++#ifndef DEBUG ++# define DEBUG 0 ++#endif ++ ++/*#define RPC_DEBUG*/ ++ ++extern char *hostname; ++ ++extern int hostnamelen; ++/* Whether network is ready */ ++extern int network_ready; ++ ++/* User aborted in await_reply if not zero */ ++extern int user_abort; ++ ++extern int rarp(void); ++extern int grub_eth_probe(void); ++extern int bootp(void); ++ ++extern int dhcp(void); ++ ++extern struct nic nic; ++#endif /* GRUB_H */ +Index: b/netboot/i386_byteswap.h +=================================================================== +--- /dev/null ++++ b/netboot/i386_byteswap.h +@@ -0,0 +1,46 @@ ++#ifndef ETHERBOOT_BITS_BYTESWAP_H ++#define ETHERBOOT_BITS_BYTESWAP_H ++ ++#include "types.h" ++static inline uint16_t __i386_bswap_16(uint16_t x) ++{ ++ __asm__("xchgb %b0,%h0\n\t" ++ : "=q" (x) ++ : "0" (x)); ++ return x; ++} ++ ++static inline uint32_t __i386_bswap_32(uint32_t x) ++{ ++ __asm__("xchgb %b0,%h0\n\t" ++ "rorl $16,%0\n\t" ++ "xchgb %b0,%h0" ++ : "=q" (x) ++ : "0" (x)); ++ return x; ++} ++ ++ ++#define __bswap_constant_16(x) \ ++ ((uint16_t)((((uint16_t)(x) & 0x00ff) << 8) | \ ++ (((uint16_t)(x) & 0xff00) >> 8))) ++ ++#define __bswap_constant_32(x) \ ++ ((uint32_t)((((uint32_t)(x) & 0x000000ffU) << 24) | \ ++ (((uint32_t)(x) & 0x0000ff00U) << 8) | \ ++ (((uint32_t)(x) & 0x00ff0000U) >> 8) | \ ++ (((uint32_t)(x) & 0xff000000U) >> 24))) ++ ++#define __bswap_16(x) \ ++ (__builtin_constant_p(x) ? \ ++ __bswap_constant_16(x) : \ ++ __i386_bswap_16(x)) ++ ++ ++#define __bswap_32(x) \ ++ (__builtin_constant_p(x) ? \ ++ __bswap_constant_32(x) : \ ++ __i386_bswap_32(x)) ++ ++ ++#endif /* ETHERBOOT_BITS_BYTESWAP_H */ +Index: b/netboot/i386_elf.h +=================================================================== +--- /dev/null ++++ b/netboot/i386_elf.h +@@ -0,0 +1,91 @@ ++#ifndef I386_BITS_ELF_H ++#define I386_BITS_ELF_H ++ ++#include "cpu.h" ++ ++#ifdef CONFIG_X86_64 ++/* ELF Defines for the 64bit version of the current architecture */ ++#define EM_CURRENT_64 EM_X86_64 ++#define EM_CURRENT_64_PRESENT ( \ ++ CPU_FEATURE_P(cpu_info.x86_capability, LM) && \ ++ CPU_FEATURE_P(cpu_info.x86_capability, PAE) && \ ++ CPU_FEATURE_P(cpu_info.x86_capability, PSE)) ++ ++#define ELF_CHECK_X86_64_ARCH(x) \ ++ (EM_CURRENT_64_PRESENT && ((x).e_machine == EM_X86_64)) ++#define __unused_i386 ++#else ++#define ELF_CHECK_X86_64_ARCH(x) 0 ++#define __unused_i386 __unused ++#endif ++ ++ ++/* ELF Defines for the current architecture */ ++#define EM_CURRENT EM_386 ++#define ELFDATA_CURRENT ELFDATA2LSB ++ ++#define ELF_CHECK_I386_ARCH(x) \ ++ (((x).e_machine == EM_386) || ((x).e_machine == EM_486)) ++ ++#define ELF_CHECK_ARCH(x) \ ++ ((ELF_CHECK_I386_ARCH(x) || ELF_CHECK_X86_64_ARCH(x)) && \ ++ ((x).e_entry <= 0xffffffffUL)) ++ ++#ifdef IMAGE_FREEBSD ++/* ++ * FreeBSD has this rather strange "feature" of its design. ++ * At some point in its evolution, FreeBSD started to rely ++ * externally on private/static/debug internal symbol information. ++ * That is, some of the interfaces that software uses to access ++ * and work with the FreeBSD kernel are made available not ++ * via the shared library symbol information (the .DYNAMIC section) ++ * but rather the debug symbols. This means that any symbol, not ++ * just publicly defined symbols can be (and are) used by system ++ * tools to make the system work. (such as top, swapinfo, swapon, ++ * etc) ++ * ++ * Even worse, however, is the fact that standard ELF loaders do ++ * not know how to load the symbols since they are not within ++ * an ELF PT_LOAD section. The kernel needs these symbols to ++ * operate so the following changes/additions to the boot ++ * loading of EtherBoot have been made to get the kernel to load. ++ * All of the changes are within IMAGE_FREEBSD such that the ++ * extra/changed code only compiles when FREEBSD support is ++ * enabled. ++ */ ++ ++/* ++ * Section header for FreeBSD (debug symbol kludge!) support ++ */ ++typedef struct { ++ Elf32_Word sh_name; /* Section name (index into the ++ section header string table). */ ++ Elf32_Word sh_type; /* Section type. */ ++ Elf32_Word sh_flags; /* Section flags. */ ++ Elf32_Addr sh_addr; /* Address in memory image. */ ++ Elf32_Off sh_offset; /* Offset in file. */ ++ Elf32_Size sh_size; /* Size in bytes. */ ++ Elf32_Word sh_link; /* Index of a related section. */ ++ Elf32_Word sh_info; /* Depends on section type. */ ++ Elf32_Size sh_addralign; /* Alignment in bytes. */ ++ Elf32_Size sh_entsize; /* Size of each entry in section. */ ++} Elf32_Shdr; ++ ++/* sh_type */ ++#define SHT_SYMTAB 2 /* symbol table section */ ++#define SHT_STRTAB 3 /* string table section */ ++ ++/* ++ * Module information subtypes (for the metadata that we need to build) ++ */ ++#define MODINFO_END 0x0000 /* End of list */ ++#define MODINFO_NAME 0x0001 /* Name of module (string) */ ++#define MODINFO_TYPE 0x0002 /* Type of module (string) */ ++#define MODINFO_METADATA 0x8000 /* Module-specfic */ ++ ++#define MODINFOMD_SSYM 0x0003 /* start of symbols */ ++#define MODINFOMD_ESYM 0x0004 /* end of symbols */ ++ ++#endif /* IMAGE_FREEBSD */ ++ ++#endif /* I386_BITS_ELF_H */ +Index: b/netboot/i386_endian.h +=================================================================== +--- /dev/null ++++ b/netboot/i386_endian.h +@@ -0,0 +1,6 @@ ++#ifndef ETHERBOOT_BITS_ENDIAN_H ++#define ETHERBOOT_BITS_ENDIAN_H ++ ++#define __BYTE_ORDER __LITTLE_ENDIAN ++ ++#endif /* ETHERBOOT_BITS_ENDIAN_H */ +Index: b/netboot/i386_timer.c +=================================================================== +--- /dev/null ++++ b/netboot/i386_timer.c +@@ -0,0 +1,192 @@ ++/* A couple of routines to implement a low-overhead timer for drivers */ ++ ++ /* ++ * 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, or (at ++ * your option) any later version. ++ */ ++#include "grub.h" ++#include "osdep.h" ++#include "io.h" ++#include "timer.h" ++#include "latch.h" ++ ++void __load_timer2(unsigned int ticks) ++{ ++ /* ++ * Now let's take care of PPC channel 2 ++ * ++ * Set the Gate high, program PPC channel 2 for mode 0, ++ * (interrupt on terminal count mode), binary count, ++ * load 5 * LATCH count, (LSB and MSB) to begin countdown. ++ * ++ * Note some implementations have a bug where the high bits byte ++ * of channel 2 is ignored. ++ */ ++ /* Set up the timer gate, turn off the speaker */ ++ /* Set the Gate high, disable speaker */ ++ outb((inb(PPC_PORTB) & ~PPCB_SPKR) | PPCB_T2GATE, PPC_PORTB); ++ /* binary, mode 0, LSB/MSB, Ch 2 */ ++ outb(TIMER2_SEL|WORD_ACCESS|MODE0|BINARY_COUNT, TIMER_MODE_PORT); ++ /* LSB of ticks */ ++ outb(ticks & 0xFF, TIMER2_PORT); ++ /* MSB of ticks */ ++ outb(ticks >> 8, TIMER2_PORT); ++} ++ ++static int __timer2_running(void) ++{ ++ return ((inb(PPC_PORTB) & PPCB_T2OUT) == 0); ++} ++ ++#if !defined(CONFIG_TSC_CURRTICKS) ++void setup_timers(void) ++{ ++ return; ++} ++ ++void load_timer2(unsigned int ticks) ++{ ++ return __load_timer2(ticks); ++} ++ ++int timer2_running(void) ++{ ++ return __timer2_running(); ++} ++ ++void ndelay(unsigned int nsecs) ++{ ++ waiton_timer2((nsecs * CLOCK_TICK_RATE)/1000000000); ++} ++void udelay(unsigned int usecs) ++{ ++ waiton_timer2((usecs * TICKS_PER_MS)/1000); ++} ++#endif /* !defined(CONFIG_TSC_CURRTICKS) */ ++ ++#if defined(CONFIG_TSC_CURRTICKS) ++ ++#define rdtsc(low,high) \ ++ __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) ++ ++#define rdtscll(val) \ ++ __asm__ __volatile__ ("rdtsc" : "=A" (val)) ++ ++ ++/* Number of clock ticks to time with the rtc */ ++#define LATCH 0xFF ++ ++#define LATCHES_PER_SEC ((CLOCK_TICK_RATE + (LATCH/2))/LATCH) ++#define TICKS_PER_LATCH ((LATCHES_PER_SEC + (TICKS_PER_SEC/2))/TICKS_PER_SEC) ++ ++static void sleep_latch(void) ++{ ++ __load_timer2(LATCH); ++ while(__timer2_running()); ++} ++ ++/* ------ Calibrate the TSC ------- ++ * Time how long it takes to excute a loop that runs in known time. ++ * And find the convertion needed to get to CLOCK_TICK_RATE ++ */ ++ ++ ++static unsigned long long calibrate_tsc(void) ++{ ++ unsigned long startlow, starthigh; ++ unsigned long endlow, endhigh; ++ ++ rdtsc(startlow,starthigh); ++ sleep_latch(); ++ rdtsc(endlow,endhigh); ++ ++ /* 64-bit subtract - gcc just messes up with long longs */ ++ __asm__("subl %2,%0\n\t" ++ "sbbl %3,%1" ++ :"=a" (endlow), "=d" (endhigh) ++ :"g" (startlow), "g" (starthigh), ++ "0" (endlow), "1" (endhigh)); ++ ++ /* Error: ECPUTOOFAST */ ++ if (endhigh) ++ goto bad_ctc; ++ ++ endlow *= TICKS_PER_LATCH; ++ return endlow; ++ ++ /* ++ * The CTC wasn't reliable: we got a hit on the very first read, ++ * or the CPU was so fast/slow that the quotient wouldn't fit in ++ * 32 bits.. ++ */ ++bad_ctc: ++ printf("bad_ctc\n"); ++ return 0; ++} ++ ++static unsigned long clocks_per_tick; ++void setup_timers(void) ++{ ++ if (!clocks_per_tick) { ++ clocks_per_tick = calibrate_tsc(); ++ /* Display the CPU Mhz to easily test if the calibration was bad */ ++ printf("CPU %ld Mhz\n", (clocks_per_tick/1000 * TICKS_PER_SEC)/1000); ++ } ++} ++ ++unsigned long currticks(void) ++{ ++ unsigned long clocks_high, clocks_low; ++ unsigned long currticks; ++ /* Read the Time Stamp Counter */ ++ rdtsc(clocks_low, clocks_high); ++ ++ /* currticks = clocks / clocks_per_tick; */ ++ __asm__("divl %1" ++ :"=a" (currticks) ++ :"r" (clocks_per_tick), "0" (clocks_low), "d" (clocks_high)); ++ ++ ++ return currticks; ++} ++ ++static unsigned long long timer_timeout; ++static int __timer_running(void) ++{ ++ unsigned long long now; ++ rdtscll(now); ++ return now < timer_timeout; ++} ++ ++void udelay(unsigned int usecs) ++{ ++ unsigned long long now; ++ rdtscll(now); ++ timer_timeout = now + usecs * ((clocks_per_tick * TICKS_PER_SEC)/(1000*1000)); ++ while(__timer_running()); ++} ++void ndelay(unsigned int nsecs) ++{ ++ unsigned long long now; ++ rdtscll(now); ++ timer_timeout = now + nsecs * ((clocks_per_tick * TICKS_PER_SEC)/(1000*1000*1000)); ++ while(__timer_running()); ++} ++ ++void load_timer2(unsigned int timer2_ticks) ++{ ++ unsigned long long now; ++ unsigned long clocks; ++ rdtscll(now); ++ clocks = timer2_ticks * ((clocks_per_tick * TICKS_PER_SEC)/CLOCK_TICK_RATE); ++ timer_timeout = now + clocks; ++} ++ ++int timer2_running(void) ++{ ++ return __timer_running(); ++} ++ ++#endif /* RTC_CURRTICKS */ +Index: b/netboot/i82586.c +=================================================================== +--- a/netboot/i82586.c ++++ /dev/null +@@ -1,825 +0,0 @@ +-/************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +-i82586 NIC driver for Etherboot +-Ken Yap, January 1998 +-***************************************************************************/ +- +-/* +- * 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, or (at +- * your option) any later version. +- */ +- +-#include "etherboot.h" +-#include "nic.h" +-#include "cards.h" +-#include "timer.h" +- +-#define udelay(n) waiton_timer2(((n)*TICKS_PER_MS)/1000) +- +-/* Sources of information: +- +- Donald Becker's excellent 3c507 driver in Linux +- Intel 82596 data sheet (yes, 82596; it has a 586 compatibility mode) +-*/ +- +-/* Code below mostly stolen wholesale from 3c507.c driver in Linux */ +- +-/* +- Details of the i82586. +- +- You'll really need the databook to understand the details of this part, +- but the outline is that the i82586 has two separate processing units. +- Both are started from a list of three configuration tables, of which only +- the last, the System Control Block (SCB), is used after reset-time. The SCB +- has the following fields: +- Status word +- Command word +- Tx/Command block addr. +- Rx block addr. +- The command word accepts the following controls for the Tx and Rx units: +- */ +- +-#define CUC_START 0x0100 +-#define CUC_RESUME 0x0200 +-#define CUC_SUSPEND 0x0300 +-#define RX_START 0x0010 +-#define RX_RESUME 0x0020 +-#define RX_SUSPEND 0x0030 +- +-/* The Rx unit uses a list of frame descriptors and a list of data buffer +- descriptors. We use full-sized (1518 byte) data buffers, so there is +- a one-to-one pairing of frame descriptors to buffer descriptors. +- +- The Tx ("command") unit executes a list of commands that look like: +- Status word Written by the 82586 when the command is done. +- Command word Command in lower 3 bits, post-command action in upper 3 +- Link word The address of the next command. +- Parameters (as needed). +- +- Some definitions related to the Command Word are: +- */ +-#define CMD_EOL 0x8000 /* The last command of the list, stop. */ +-#define CMD_SUSP 0x4000 /* Suspend after doing cmd. */ +-#define CMD_INTR 0x2000 /* Interrupt after doing cmd. */ +- +-enum commands { +- CmdNOp = 0, CmdSASetup = 1, CmdConfigure = 2, CmdMulticastList = 3, +- CmdTx = 4, CmdTDR = 5, CmdDump = 6, CmdDiagnose = 7}; +- +-/* +- Details of the EtherLink16 Implementation +- +- The 3c507 and NI5210 are generic shared-memory i82586 implementations. +- 3c507: The host can map 16K, 32K, 48K, or 64K of the 64K memory into +- 0x0[CD][08]0000, or all 64K into 0xF[02468]0000. +- NI5210: The host can map 8k or 16k at 0x[CDE][048C]000 but we +- assume 8k because to have 16k you cannot put a ROM on the NIC. +- */ +- +-/* Offsets from the base I/O address. */ +- +-#ifdef INCLUDE_3C507 +- +-#define SA_DATA 0 /* Station address data, or 3Com signature. */ +-#define MISC_CTRL 6 /* Switch the SA_DATA banks, and bus config bits. */ +-#define RESET_IRQ 10 /* Reset the latched IRQ line. */ +-#define I82586_ATTN 11 /* Frob the 82586 Channel Attention line. */ +-#define ROM_CONFIG 13 +-#define MEM_CONFIG 14 +-#define IRQ_CONFIG 15 +-#define EL16_IO_EXTENT 16 +- +-/* The ID port is used at boot-time to locate the ethercard. */ +-#define ID_PORT 0x100 +- +-#endif +- +-#ifdef INCLUDE_NI5210 +- +-#define NI52_RESET 0 /* writing to this address, resets the i82586 */ +-#define I82586_ATTN 1 /* channel attention, kick the 586 */ +- +-#endif +- +-#ifdef INCLUDE_EXOS205 +- +-#define EXOS205_RESET 0 /* writing to this address, resets the i82586 */ +-#define I82586_ATTN 1 /* channel attention, kick the 586 */ +- +-#endif +- +-/* Offsets to registers in the mailbox (SCB). */ +-#define iSCB_STATUS 0x8 +-#define iSCB_CMD 0xA +-#define iSCB_CBL 0xC /* Command BLock offset. */ +-#define iSCB_RFA 0xE /* Rx Frame Area offset. */ +- +-/* Since the 3c507 maps the shared memory window so that the last byte is +-at 82586 address FFFF, the first byte is at 82586 address 0, 16K, 32K, or +-48K corresponding to window sizes of 64K, 48K, 32K and 16K respectively. +-We can account for this be setting the 'SBC Base' entry in the ISCP table +-below for all the 16 bit offset addresses, and also adding the 'SCB Base' +-value to all 24 bit physical addresses (in the SCP table and the TX and RX +-Buffer Descriptors). +- -Mark +-*/ +- +-/* +- What follows in 'init_words[]' is the "program" that is downloaded to the +- 82586 memory. It's mostly tables and command blocks, and starts at the +- reset address 0xfffff6. This is designed to be similar to the EtherExpress, +- thus the unusual location of the SCB at 0x0008. +- +- Even with the additional "don't care" values, doing it this way takes less +- program space than initializing the individual tables, and I feel it's much +- cleaner. +- +- The databook is particularly useless for the first two structures, I had +- to use the Crynwr driver as an example. +- +- The memory setup is as follows: +-*/ +- +-#define CONFIG_CMD 0x18 +-#define SET_SA_CMD 0x24 +-#define SA_OFFSET 0x2A +-#define IDLELOOP 0x30 +-#define TDR_CMD 0x38 +-#define TDR_TIME 0x3C +-#define DUMP_CMD 0x40 +-#define DIAG_CMD 0x48 +-#define SET_MC_CMD 0x4E +-#define DUMP_DATA 0x56 /* A 170 byte buffer for dump and Set-MC into. */ +- +-#define TX_BUF_START 0x0100 +-#define TX_BUF_SIZE (1518+14+20+16) /* packet+header+TBD */ +- +-#define RX_BUF_START 0x1000 +-#define RX_BUF_SIZE (1518+14+18) /* packet+header+RBD */ +-#define RX_BUF_END (mem_end - mem_start - 20) +- +-/* +- That's it: only 86 bytes to set up the beast, including every extra +- command available. The 170 byte buffer at DUMP_DATA is shared between the +- Dump command (called only by the diagnostic program) and the SetMulticastList +- command. +- +- To complete the memory setup you only have to write the station address at +- SA_OFFSET and create the Tx & Rx buffer lists. +- +- The Tx command chain and buffer list is setup as follows: +- A Tx command table, with the data buffer pointing to... +- A Tx data buffer descriptor. The packet is in a single buffer, rather than +- chaining together several smaller buffers. +- A NoOp command, which initially points to itself, +- And the packet data. +- +- A transmit is done by filling in the Tx command table and data buffer, +- re-writing the NoOp command, and finally changing the offset of the last +- command to point to the current Tx command. When the Tx command is finished, +- it jumps to the NoOp, when it loops until the next Tx command changes the +- "link offset" in the NoOp. This way the 82586 never has to go through the +- slow restart sequence. +- +- The Rx buffer list is set up in the obvious ring structure. We have enough +- memory (and low enough interrupt latency) that we can avoid the complicated +- Rx buffer linked lists by alway associating a full-size Rx data buffer with +- each Rx data frame. +- +- I currently use one transmit buffer starting at TX_BUF_START (0x0100), and +- use the rest of memory, from RX_BUF_START to RX_BUF_END, for Rx buffers. +- +- */ +- +-static unsigned short init_words[] = { +- /* System Configuration Pointer (SCP). */ +-#if defined(INCLUDE_3C507) +- 0x0000, /* Set bus size to 16 bits. */ +-#else +- 0x0001, /* Set bus size to 8 bits */ +-#endif +- 0,0, /* pad words. */ +- 0x0000,0x0000, /* ISCP phys addr, set in init_82586_mem(). */ +- +- /* Intermediate System Configuration Pointer (ISCP). */ +- 0x0001, /* Status word that's cleared when init is done. */ +- 0x0008,0,0, /* SCB offset, (skip, skip) */ +- +- /* System Control Block (SCB). */ +- 0,0xf000|RX_START|CUC_START, /* SCB status and cmd. */ +- CONFIG_CMD, /* Command list pointer, points to Configure. */ +- RX_BUF_START, /* Rx block list. */ +- 0,0,0,0, /* Error count: CRC, align, buffer, overrun. */ +- +- /* 0x0018: Configure command. Change to put MAC data with packet. */ +- 0, CmdConfigure, /* Status, command. */ +- SET_SA_CMD, /* Next command is Set Station Addr. */ +- 0x0804, /* "4" bytes of config data, 8 byte FIFO. */ +- 0x2e40, /* Magic values, including MAC data location. */ +- 0, /* Unused pad word. */ +- +- /* 0x0024: Setup station address command. */ +- 0, CmdSASetup, +- SET_MC_CMD, /* Next command. */ +- 0xaa00,0xb000,0x0bad, /* Station address (to be filled in) */ +- +- /* 0x0030: NOP, looping back to itself. Point to first Tx buffer to Tx. */ +- 0, CmdNOp, IDLELOOP, 0 /* pad */, +- +- /* 0x0038: A unused Time-Domain Reflectometer command. */ +- 0, CmdTDR, IDLELOOP, 0, +- +- /* 0x0040: An unused Dump State command. */ +- 0, CmdDump, IDLELOOP, DUMP_DATA, +- +- /* 0x0048: An unused Diagnose command. */ +- 0, CmdDiagnose, IDLELOOP, +- +- /* 0x004E: An empty set-multicast-list command. */ +- 0, CmdMulticastList, IDLELOOP, 0, +-}; +- +-/* NIC specific static variables go here */ +- +-static unsigned short ioaddr, irq, scb_base; +-static Address mem_start, mem_end; +-static unsigned short rx_head, rx_tail; +- +-#define read_mem(m,s) fmemcpy((char *)s, m, sizeof(s)) +- +-static void setup_rx_buffers(struct nic *nic) +-{ +- Address write_ptr; +- unsigned short cur_rx_buf; +- static unsigned short rx_cmd[16] = { +- 0x0000, /* Rx status */ +- 0x0000, /* Rx command, only and last */ +- RX_BUF_START, /* Link (will be adjusted) */ +- RX_BUF_START + 22, /* Buffer offset (will be adjusted) */ +- 0x0000, 0x0000, 0x0000, /* Pad for dest addr */ +- 0x0000, 0x0000, 0x0000, /* Pad for source addr */ +- 0x0000, /* Pad for protocol */ +- 0x0000, /* Buffer: Actual count */ +- -1, /* Buffer: Next (none) */ +- RX_BUF_START + 0x20, /* Buffer: Address low (+ scb_base) (will be adjusted) */ +- 0x0000, /* Buffer: Address high */ +- 0x8000 | (RX_BUF_SIZE - 0x20) +- }; +- +- cur_rx_buf = rx_head = RX_BUF_START; +- do { /* While there is room for one more buffer */ +- write_ptr = mem_start + cur_rx_buf; +- /* adjust some contents */ +- rx_cmd[1] = 0x0000; +- rx_cmd[2] = cur_rx_buf + RX_BUF_SIZE; +- rx_cmd[3] = cur_rx_buf + 22; +- rx_cmd[13] = cur_rx_buf + 0x20 + scb_base; +- memcpy((char *)write_ptr, (char *)rx_cmd, sizeof(rx_cmd)); +- rx_tail = cur_rx_buf; +- cur_rx_buf += RX_BUF_SIZE; +- } while (cur_rx_buf <= RX_BUF_END - RX_BUF_SIZE); +- /* Terminate the list by setting the EOL bit and wrap ther pointer +- to make the list a ring. */ +- write_ptr = mem_start + rx_tail; +- rx_cmd[1] = 0xC000; +- rx_cmd[2] = rx_head; +- memcpy((char *)write_ptr, (char *)rx_cmd, sizeof(unsigned short) * 3); +-} +- +-static void ack_status(void) +-{ +- unsigned short cmd, status; +- unsigned short *shmem = (short *)mem_start; +- +- cmd = (status = shmem[iSCB_STATUS>>1]) & 0xf000; +- if (status & 0x100) /* CU suspended? */ +- cmd |= CUC_RESUME; +- if ((status & 0x200) == 0) /* CU not active? */ +- cmd |= CUC_START; +- if (status & 0x010) /* RU suspended? */ +- cmd |= RX_RESUME; +- else if ((status & 0x040) == 0) /* RU not active? */ +- cmd |= RX_START; +- if (cmd == 0) /* Nothing to do */ +- return; +- shmem[iSCB_CMD>>1] = cmd; +-#if defined(DEBUG) +- printf("Status %hX Command %hX\n", status, cmd); +-#endif +- outb(0, ioaddr + I82586_ATTN); +-} +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +- +-static void i82586_reset(struct nic *nic) +-{ +- unsigned long time; +- unsigned short *shmem = (short *)mem_start; +- +- /* put the card in its initial state */ +- +-#ifdef INCLUDE_3C507 +- /* Enable loopback to protect the wire while starting up, +- and hold the 586 in reset during the memory initialisation. */ +- outb(0x20, ioaddr + MISC_CTRL); +-#endif +- +- /* Fix the ISCP address and base. */ +- init_words[3] = scb_base; +- init_words[7] = scb_base; +- +- /* Write the words at 0xfff6. */ +- /* Write the words at 0x0000. */ +- /* Fill in the station address. */ +- memcpy((char *)(mem_end - 10), (char *)init_words, 10); +- memcpy((char *)mem_start, (char *)&init_words[5], sizeof(init_words) - 10); +- memcpy((char *)mem_start + SA_OFFSET, nic->node_addr, ETH_ALEN); +- setup_rx_buffers(nic); +- +-#ifdef INCLUDE_3C507 +- /* Start the 586 by releasing the reset line, but leave loopback. */ +- outb(0xA0, ioaddr + MISC_CTRL); +-#endif +- +- /* This was time consuming to track down; you need to give two channel +- attention signals to reliably start up the i82586. */ +- outb(0, ioaddr + I82586_ATTN); +- time = currticks() + TICKS_PER_SEC; /* allow 1 second to init */ +- while ( +- shmem[iSCB_STATUS>>1] == 0) +- { +- if (currticks() > time) +- { +- printf("i82586 initialisation timed out with status %hX, cmd %hX\n", +- shmem[iSCB_STATUS>>1], shmem[iSCB_CMD>>1]); +- break; +- } +- } +- /* Issue channel-attn -- the 82586 won't start. */ +- outb(0, ioaddr + I82586_ATTN); +- +-#ifdef INCLUDE_3C507 +- /* Disable loopback. */ +- outb(0x80, ioaddr + MISC_CTRL); +-#endif +-#if defined(DEBUG) +- printf("i82586 status %hX, cmd %hX\n", +- shmem[iSCB_STATUS>>1], shmem[iSCB_CMD>>1]); +-#endif +-} +- +-/************************************************************************** +- POLL - Wait for a frame +- ***************************************************************************/ +-static int i82586_poll(struct nic *nic) +-{ +- int status; +- unsigned short rfd_cmd, next_rx_frame, data_buffer_addr, +- frame_status, pkt_len; +- unsigned short *shmem = (short *)mem_start + rx_head; +- +- /* return true if there's an ethernet packet ready to read */ +- if ( +- ((frame_status = shmem[0]) & 0x8000) == 0) +- return (0); /* nope */ +- rfd_cmd = shmem[1]; +- next_rx_frame = shmem[2]; +- data_buffer_addr = shmem[3]; +- pkt_len = shmem[11]; +- status = 0; +- if (rfd_cmd != 0 || data_buffer_addr != rx_head + 22 +- || (pkt_len & 0xC000) != 0xC000) +- printf("\nRx frame corrupt, discarded"); +- else if ((frame_status & 0x2000) == 0) +- printf("\nRx frame had error"); +- else +- { +- /* We have a frame, copy it to our buffer */ +- pkt_len &= 0x3FFF; +- memcpy(nic->packet, (char *)mem_start + rx_head + 0x20, pkt_len); +- /* Only packets not from ourself */ +- if (memcmp(nic->packet + ETH_ALEN, nic->node_addr, ETH_ALEN) != 0) +- { +- nic->packetlen = pkt_len; +- status = 1; +- } +- } +- /* Clear the status word and set EOL on Rx frame */ +- shmem[0] = 0; +- shmem[1] = 0xC000; +- *(short *)(mem_start + rx_tail + 2) = 0; +- rx_tail = rx_head; +- rx_head = next_rx_frame; +- ack_status(); +- return (status); +-} +- +-/************************************************************************** +- TRANSMIT - Transmit a frame +- ***************************************************************************/ +-static void i82586_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- Address bptr; +- unsigned short type, z; +- static unsigned short tx_cmd[11] = { +- 0x0, /* Tx status */ +- CmdTx, /* Tx command */ +- TX_BUF_START+16, /* Next command is a NoOp */ +- TX_BUF_START+8, /* Data Buffer offset */ +- 0x8000, /* | with size */ +- 0xffff, /* No next data buffer */ +- TX_BUF_START+22, /* + scb_base */ +- 0x0, /* Buffer address high bits (always zero) */ +- 0x0, /* Nop status */ +- CmdNOp, /* Nop command */ +- TX_BUF_START+16 /* Next is myself */ +- }; +- unsigned short *shmem = (short *)mem_start + TX_BUF_START; +- +- /* send the packet to destination */ +- /* adjust some contents */ +- type = htons(t); +- if (s < ETH_ZLEN) +- s = ETH_ZLEN; +- tx_cmd[4] = (s + ETH_HLEN) | 0x8000; +- tx_cmd[6] = TX_BUF_START + 22 + scb_base; +- bptr = mem_start + TX_BUF_START; +- memcpy((char *)bptr, (char *)tx_cmd, sizeof(tx_cmd)); +- bptr += sizeof(tx_cmd); +- memcpy((char *)bptr, d, ETH_ALEN); +- bptr += ETH_ALEN; +- memcpy((char *)bptr, nic->node_addr, ETH_ALEN); +- bptr += ETH_ALEN; +- memcpy((char *)bptr, (char *)&type, sizeof(type)); +- bptr += sizeof(type); +- memcpy((char *)bptr, p, s); +- /* Change the offset in the IDLELOOP */ +- *(unsigned short *)(mem_start + IDLELOOP + 4) = TX_BUF_START; +- /* Wait for transmit completion */ +- while ( +- (shmem[0] & 0x2000) == 0) +- ; +- /* Change the offset in the IDLELOOP back and +- change the final loop to point here */ +- *(unsigned short *)(mem_start + IDLELOOP + 4) = IDLELOOP; +- *(unsigned short *)(mem_start + TX_BUF_START + 20) = IDLELOOP; +- ack_status(); +-} +- +-/************************************************************************** +- DISABLE - Turn off ethernet interface +- ***************************************************************************/ +-static void i82586_disable(struct nic *nic) +-{ +- unsigned short *shmem = (short *)mem_start; +- +-#if 0 +- /* Flush the Tx and disable Rx. */ +- shmem[iSCB_CMD>>1] = RX_SUSPEND | CUC_SUSPEND; +- outb(0, ioaddr + I82586_ATTN); +-#ifdef INCLUDE_NI5210 +- outb(0, ioaddr + NI52_RESET); +-#endif +-#endif /* 0 */ +-} +- +-#ifdef INCLUDE_3C507 +- +-static int t507_probe1(struct nic *nic, unsigned short ioaddr) +-{ +- int i; +- Address size; +- char mem_config; +- char if_port; +- +- if (inb(ioaddr) != '*' || inb(ioaddr+1) != '3' +- || inb(ioaddr+2) != 'C' || inb(ioaddr+3) != 'O') +- return (0); +- irq = inb(ioaddr + IRQ_CONFIG) & 0x0f; +- mem_config = inb(ioaddr + MEM_CONFIG); +- if (mem_config & 0x20) +- { +- size = 65536L; +- mem_start = 0xf00000L + (mem_config & 0x08 ? 0x080000L +- : (((Address)mem_config & 0x3) << 17)); +- } +- else +- { +- size = ((((Address)mem_config & 0x3) + 1) << 14); +- mem_start = 0x0c0000L + (((Address)mem_config & 0x18) << 12); +- } +- mem_end = mem_start + size; +- scb_base = 65536L - size; +- if_port = inb(ioaddr + ROM_CONFIG) & 0x80; +- /* Get station address */ +- outb(0x01, ioaddr + MISC_CTRL); +- for (i = 0; i < ETH_ALEN; ++i) +- { +- nic->node_addr[i] = inb(ioaddr+i); +- } +- printf("\n3c507 ioaddr %#hX, IRQ %d, mem [%#X-%#X], %sternal xcvr, addr %!\n", +- ioaddr, irq, mem_start, mem_end, if_port ? "in" : "ex", nic->node_addr); +- return (1); +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +- +-struct nic *t507_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- static unsigned char init_ID_done = 0; +- unsigned short lrs_state = 0xff; +- static unsigned short io_addrs[] = { 0x300, 0x320, 0x340, 0x280, 0 }; +- unsigned short *p; +- int i; +- +- if (init_ID_done == 0) +- { +- /* Send the ID sequence to the ID_PORT to enable the board */ +- outb(0x00, ID_PORT); +- for (i = 0; i < 255; ++i) +- { +- outb(lrs_state, ID_PORT); +- lrs_state <<= 1; +- if (lrs_state & 0x100) +- lrs_state ^= 0xe7; +- } +- outb(0x00, ID_PORT); +- init_ID_done = 1; +- } +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- if (probe_addrs == 0) +- probe_addrs = io_addrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) +- if (t507_probe1(nic, ioaddr)) +- break; +- if (ioaddr != 0) +- { +- /* point to NIC specific routines */ +- i82586_reset(nic); +- nic->reset = i82586_reset; +- nic->poll = i82586_poll; +- nic->transmit = i82586_transmit; +- nic->disable = i82586_disable; +- return nic; +- } +- /* else */ +- { +- return 0; +- } +-} +- +-#endif +- +-#ifdef INCLUDE_NI5210 +- +-static int ni5210_probe2(void) +-{ +- unsigned short i; +- unsigned short shmem[10]; +- +- /* Fix the ISCP address and base. */ +- init_words[3] = scb_base; +- init_words[7] = scb_base; +- +- /* Write the words at 0xfff6. */ +- /* Write the words at 0x0000. */ +- memcpy((char *)(mem_end - 10), (char *)init_words, 10); +- memcpy((char *)mem_start, (char *)&init_words[5], sizeof(init_words) - 10); +- if (*(unsigned short *)mem_start != 1) +- return (0); +- outb(0, ioaddr + NI52_RESET); +- outb(0, ioaddr + I82586_ATTN); +- udelay(32); +- i = 50; +- while ( +- shmem[iSCB_STATUS>>1] == 0) +- { +- if (--i == 0) +- { +- printf("i82586 initialisation timed out with status %hX, cmd %hX\n", +- shmem[iSCB_STATUS>>1], shmem[iSCB_CMD>>1]); +- break; +- } +- } +- /* Issue channel-attn -- the 82586 won't start. */ +- outb(0, ioaddr + I82586_ATTN); +- if (*(unsigned short *)mem_start != 0) +- return (0); +- return (1); +-} +- +-static int ni5210_probe1(struct nic *nic) +-{ +- int i; +- static Address mem_addrs[] = { +- 0xc0000, 0xc4000, 0xc8000, 0xcc000, +- 0xd0000, 0xd4000, 0xd8000, 0xdc000, +- 0xe0000, 0xe4000, 0xe8000, 0xec000, +- 0 }; +- Address *p; +- +- if (inb(ioaddr + 6) != 0x0 || inb(ioaddr + 7) != 0x55) +- return (0); +- scb_base = -8192; /* assume 8k memory */ +- for (p = mem_addrs; (mem_start = *p) != 0; ++p) +- if (mem_end = mem_start + 8192, ni5210_probe2()) +- break; +- if (mem_start == 0) +- return (0); +- /* Get station address */ +- for (i = 0; i < ETH_ALEN; ++i) +- { +- nic->node_addr[i] = inb(ioaddr+i); +- } +- printf("\nNI5210 ioaddr %#hX, mem [%#X-%#X], addr %!\n", +- ioaddr, mem_start, mem_end, nic->node_addr); +- return (1); +-} +- +-struct nic *ni5210_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- /* missing entries are addresses usually already used */ +- static unsigned short io_addrs[] = { +- 0x200, 0x208, 0x210, 0x218, 0x220, 0x228, 0x230, 0x238, +- 0x240, 0x248, 0x250, 0x258, 0x260, 0x268, 0x270, /*Par*/ +- 0x280, 0x288, 0x290, 0x298, 0x2A0, 0x2A8, 0x2B0, 0x2B8, +- 0x2C0, 0x2C8, 0x2D0, 0x2D8, 0x2E0, 0x2E8, 0x2F0, /*Ser*/ +- 0x300, 0x308, 0x310, 0x318, 0x320, 0x328, 0x330, 0x338, +- 0x340, 0x348, 0x350, 0x358, 0x360, 0x368, 0x370, /*Par*/ +- 0x380, 0x388, 0x390, 0x398, 0x3A0, 0x3A8, /*Vid,Par*/ +- 0x3C0, 0x3C8, 0x3D0, 0x3D8, 0x3E0, 0x3E8, /*Ser*/ +- 0x0 +- }; +- unsigned short *p; +- int i; +- +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- if (probe_addrs == 0) +- probe_addrs = io_addrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) +- if (ni5210_probe1(nic)) +- break; +- if (ioaddr != 0) +- { +- /* point to NIC specific routines */ +- i82586_reset(nic); +- nic->reset = i82586_reset; +- nic->poll = i82586_poll; +- nic->transmit = i82586_transmit; +- nic->disable = i82586_disable; +- return nic; +- } +- /* else */ +- { +- return 0; +- } +-} +-#endif +- +-#ifdef INCLUDE_EXOS205 +- +-/* +- * Code to download to I186 in EXOS205 +- */ +- +-static unsigned char exos_i186_init[] = +-{ +-0x08,0x00,0x14,0x00,0x00,0x00,0xaa,0xfa,0x33,0xc0,0xba,0xfe,0xff,0xef,0xb8,0xf8, +-0xff,0xe7,0xa0,0xb8,0x7c,0x00,0xe7,0xa4,0xb8,0xbc,0x80,0xe7,0xa8,0x8c,0xc8,0x8e, +-0xd8,0xbb,0x2f,0x0e,0xc6,0x07,0xa5,0x33,0xc9,0xeb,0x00,0xeb,0x00,0xeb,0x00,0xe2, +-0xf8,0xbe,0x2c,0x0e,0xba,0x02,0x05,0x33,0xdb,0xb9,0x03,0x00,0xec,0x24,0x0f,0x8a, +-0xe0,0x02,0xd8,0x42,0x42,0xec,0x02,0xd8,0xd0,0xe0,0xd0,0xe0,0xd0,0xe0,0xd0,0xe0, +-0x0a,0xc4,0x88,0x04,0x42,0x42,0x46,0xe2,0xe3,0x8a,0xe3,0xd0,0xec,0xd0,0xec,0xd0, +-0xec,0xd0,0xec,0x80,0xe3,0x0f,0x02,0xe3,0x80,0xf4,0x05,0xec,0x3a,0xe0,0x74,0x05, +-0xc6,0x04,0x5a,0xeb,0xfe,0xc6,0x04,0x55,0x33,0xc0,0x8e,0xd8,0xbe,0x38,0x00,0xc7, +-0x04,0xce,0x0e,0x46,0x46,0xc7,0x04,0x00,0xff,0xfb,0xba,0x3c,0x00,0xb8,0x03,0x00, +-0xef,0x33,0xdb,0x33,0xc9,0xbd,0x04,0x0f,0x90,0x90,0x90,0x90,0xe2,0xfa,0x43,0x2e, +-0x89,0x5e,0x00,0xeb,0xf3,0x52,0xba,0x00,0x06,0xef,0x50,0x53,0x55,0xbd,0xf8,0x0e, +-0x2e,0x8b,0x5e,0x00,0x43,0x2e,0x89,0x5e,0x00,0xba,0x22,0x00,0xb8,0x00,0x80,0xef, +-0x5d,0x5b,0x58,0x5a,0xcf,0x49,0x4e,0x54,0x52,0x20,0x63,0x6e,0x74,0x2d,0x3e,0x00, +-0x00,0x4c,0x4f,0x4f,0x50,0x20,0x63,0x6e,0x74,0x2d,0x3e,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xea,0x30,0x0e,0x00,0xff,0x00,0x00,0x00,0x00, +-0x00,0x00,0x00,0x00,0x00,0x00,00 +-}; +- +-/* These offsets are from the end of the i186 download code */ +- +-#define OFFSET_SEMA 0x1D1 +-#define OFFSET_ADDR 0x1D7 +- +-static int exos205_probe2(void) +-{ +- unsigned short i; +- unsigned short shmem[10]; +- +- /* Fix the ISCP address and base. */ +- init_words[3] = scb_base; +- init_words[7] = scb_base; +- +- /* Write the words at 0xfff6. */ +- /* Write the words at 0x0000. */ +- memcpy((char *)(mem_end - 10), (char *)init_words, 10); +- memcpy((char *)mem_start, (char *)&init_words[5], sizeof(init_words) - 10); +- if (*(unsigned short *)mem_start != 1) +- return (0); +- outb(0, ioaddr + EXOS205_RESET); +- outb(0, ioaddr + I82586_ATTN); +- i = 50; +- while ( +- shmem[iSCB_STATUS>>1] == 0) +- { +- if (--i == 0) +- { +- printf("i82586 initialisation timed out with status %hX, cmd %hX\n", +- shmem[iSCB_STATUS>>1], shmem[iSCB_CMD>>1]); +- break; +- } +- } +- /* Issue channel-attn -- the 82586 won't start. */ +- outb(0, ioaddr + I82586_ATTN); +- if (*(unsigned short *)mem_start != 0) +- return (0); +- return (1); +-} +- +-static int exos205_probe1(struct nic *nic) +-{ +- int i; +- /* If you know the other addresses please let me know */ +- static Address mem_addrs[] = { +- 0xcc000, 0 }; +- Address *p; +- +- scb_base = -16384; /* assume 8k memory */ +- for (p = mem_addrs; (mem_start = *p) != 0; ++p) +- if (mem_end = mem_start + 16384, exos205_probe2()) +- break; +- if (mem_start == 0) +- return (0); +- /* Get station address */ +- for (i = 0; i < ETH_ALEN; ++i) +- { +- nic->node_addr[i] = inb(ioaddr+i); +- } +- printf("\nEXOS205 ioaddr %#hX, mem [%#X-%#X], addr %!\n", +- ioaddr, mem_start, mem_end, nic->node_addr); +- return (1); +-} +- +-struct nic *exos205_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- /* If you know the other addresses, please let me know */ +- static unsigned short io_addrs[] = { +- 0x310, 0x0 +- }; +- unsigned short *p; +- int i; +- +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- if (probe_addrs == 0) +- probe_addrs = io_addrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) +- if (exos205_probe1(nic)) +- break; +- if (ioaddr != 0) +- { +- /* point to NIC specific routines */ +- i82586_reset(nic); +- nic->reset = i82586_reset; +- nic->poll = i82586_poll; +- nic->transmit = i82586_transmit; +- nic->disable = i82586_disable; +- return nic; +- } +- /* else */ +- { +- return 0; +- } +-} +- +-#endif +Index: b/netboot/if_arp.h +=================================================================== +--- /dev/null ++++ b/netboot/if_arp.h +@@ -0,0 +1,29 @@ ++#ifndef _IF_ARP_H ++#define _IF_ARP_H ++ ++#include "types.h" ++ ++#define ARP_REQUEST 1 ++#define ARP_REPLY 2 ++ ++#ifndef MAX_ARP_RETRIES ++#define MAX_ARP_RETRIES 20 ++#endif ++ ++/* ++ * A pity sipaddr and tipaddr are not longword aligned or we could use ++ * in_addr. No, I don't want to use #pragma packed. ++ */ ++struct arprequest { ++ uint16_t hwtype; ++ uint16_t protocol; ++ uint8_t hwlen; ++ uint8_t protolen; ++ uint16_t opcode; ++ uint8_t shwaddr[6]; ++ uint8_t sipaddr[4]; ++ uint8_t thwaddr[6]; ++ uint8_t tipaddr[4]; ++}; ++ ++#endif /* _IF_ARP_H */ +Index: b/netboot/if_ether.h +=================================================================== +--- /dev/null ++++ b/netboot/if_ether.h +@@ -0,0 +1,21 @@ ++#ifndef _IF_ETHER_H ++#define _IF_ETHER_H ++ ++/* ++ I'm moving towards the defined names in linux/if_ether.h for clarity. ++ The confusion between 60/64 and 1514/1518 arose because the NS8390 ++ counts the 4 byte frame checksum in the incoming packet, but not ++ in the outgoing packet. 60/1514 are the correct numbers for most ++ if not all of the other NIC controllers. ++*/ ++ ++#define ETH_ALEN 6 /* Size of Ethernet address */ ++#define ETH_HLEN 14 /* Size of ethernet header */ ++#define ETH_ZLEN 60 /* Minimum packet */ ++#define ETH_FRAME_LEN 1514 /* Maximum packet */ ++#define ETH_DATA_ALIGN 2 /* Amount needed to align the data after an ethernet header */ ++#ifndef ETH_MAX_MTU ++#define ETH_MAX_MTU (ETH_FRAME_LEN-ETH_HLEN) ++#endif ++ ++#endif /* _IF_ETHER_H */ +Index: b/netboot/igmp.h +=================================================================== +--- /dev/null ++++ b/netboot/igmp.h +@@ -0,0 +1,27 @@ ++#ifndef _IGMP_H ++#define _IGMP_H ++ ++/* Max interval between IGMP packets */ ++#define IGMP_INTERVAL (10*TICKS_PER_SEC) ++#define IGMPv1_ROUTER_PRESENT_TIMEOUT (400*TICKS_PER_SEC) ++ ++#define IGMP_QUERY 0x11 ++#define IGMPv1_REPORT 0x12 ++#define IGMPv2_REPORT 0x16 ++#define IGMP_LEAVE 0x17 ++#define GROUP_ALL_HOSTS 0xe0000001 /* 224.0.0.1 Host byte order */ ++ ++struct igmp { ++ uint8_t type; ++ uint8_t response_time; ++ uint16_t chksum; ++ in_addr group; ++}; ++ ++struct igmp_ip_t { /* Format of an igmp ip packet */ ++ struct iphdr ip; ++ uint8_t router_alert[4]; /* Router alert option */ ++ struct igmp igmp; ++}; ++ ++#endif /* _IGMP_H */ +Index: b/netboot/in.h +=================================================================== +--- /dev/null ++++ b/netboot/in.h +@@ -0,0 +1,21 @@ ++#ifndef _IN_H ++#define _IN_H ++ ++#include "types.h" ++ ++#define IP 0x0800 ++#define ARP 0x0806 ++#define RARP 0x8035 ++ ++#define IP_ICMP 1 ++#define IP_IGMP 2 ++#define IP_UDP 17 ++ ++/* Same after going through htonl */ ++#define IP_BROADCAST 0xFFFFFFFF ++ ++typedef struct { ++ uint32_t s_addr; ++} in_addr; ++ ++#endif /* _IN_H */ +Index: b/netboot/io.h +=================================================================== +--- /dev/null ++++ b/netboot/io.h +@@ -0,0 +1,239 @@ ++#ifndef IO_H ++#define IO_H ++ ++ ++/* Amount of relocation etherboot is experiencing */ ++extern unsigned long virt_offset; ++ ++/* Don't require identity mapped physical memory, ++ * osloader.c is the only valid user at the moment. ++ */ ++unsigned long virt_to_phys(volatile const void *virt_addr); ++void *phys_to_virt(unsigned long phys_addr); ++ ++/* virt_to_bus converts an addresss inside of etherboot [_start, _end] ++ * into a memory access cards can use. ++ */ ++#define virt_to_bus virt_to_phys ++ ++ ++/* bus_to_virt reverses virt_to_bus, the address must be output ++ * from virt_to_bus to be valid. This function does not work on ++ * all bus addresses. ++ */ ++#define bus_to_virt phys_to_virt ++ ++/* ioremap converts a random 32bit bus address into something ++ * etherboot can access. ++ */ ++static inline void *ioremap(unsigned long bus_addr, unsigned long length __unused) ++{ ++ return bus_to_virt(bus_addr); ++} ++ ++/* iounmap cleans up anything ioremap had to setup */ ++static inline void iounmap(void *virt_addr __unused) ++{ ++ return; ++} ++ ++/* ++ * This file contains the definitions for the x86 IO instructions ++ * inb/inw/inl/outb/outw/outl and the "string versions" of the same ++ * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing" ++ * versions of the single-IO instructions (inb_p/inw_p/..). ++ * ++ * This file is not meant to be obfuscating: it's just complicated ++ * to (a) handle it all in a way that makes gcc able to optimize it ++ * as well as possible and (b) trying to avoid writing the same thing ++ * over and over again with slight variations and possibly making a ++ * mistake somewhere. ++ */ ++ ++/* ++ * Thanks to James van Artsdalen for a better timing-fix than ++ * the two short jumps: using outb's to a nonexistent port seems ++ * to guarantee better timings even on fast machines. ++ * ++ * On the other hand, I'd like to be sure of a non-existent port: ++ * I feel a bit unsafe about using 0x80 (should be safe, though) ++ * ++ * Linus ++ */ ++ ++#ifdef SLOW_IO_BY_JUMPING ++#define __SLOW_DOWN_IO __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:") ++#else ++#define __SLOW_DOWN_IO __asm__ __volatile__("outb %al,$0x80") ++#endif ++ ++#ifdef REALLY_SLOW_IO ++#define SLOW_DOWN_IO { __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; } ++#else ++#define SLOW_DOWN_IO __SLOW_DOWN_IO ++#endif ++ ++/* ++ * readX/writeX() are used to access memory mapped devices. On some ++ * architectures the memory mapped IO stuff needs to be accessed ++ * differently. On the x86 architecture, we just read/write the ++ * memory location directly. ++ */ ++#define readb(addr) (*(volatile unsigned char *) (addr)) ++#define readw(addr) (*(volatile unsigned short *) (addr)) ++#define readl(addr) (*(volatile unsigned int *) (addr)) ++ ++#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b)) ++#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b)) ++#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b)) ++ ++#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) ++#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) ++ ++/* ++ * Force strict CPU ordering. ++ * And yes, this is required on UP too when we're talking ++ * to devices. ++ * ++ * For now, "wmb()" doesn't actually do anything, as all ++ * Intel CPU's follow what Intel calls a *Processor Order*, ++ * in which all writes are seen in the program order even ++ * outside the CPU. ++ * ++ * I expect future Intel CPU's to have a weaker ordering, ++ * but I'd also expect them to finally get their act together ++ * and add some real memory barriers if so. ++ * ++ * Some non intel clones support out of order store. wmb() ceases to be a ++ * nop for these. ++ */ ++ ++#define mb() __asm__ __volatile__ ("lock; addl $0,0(%%esp)": : :"memory") ++#define rmb() mb() ++#define wmb() mb(); ++ ++ ++/* ++ * Talk about misusing macros.. ++ */ ++ ++#define __OUT1(s,x) \ ++extern void __out##s(unsigned x value, unsigned short port); \ ++extern inline void __out##s(unsigned x value, unsigned short port) { ++ ++#define __OUT2(s,s1,s2) \ ++__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" ++ ++#define __OUT(s,s1,x) \ ++__OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); } \ ++__OUT1(s##c,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); } \ ++__OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); SLOW_DOWN_IO; } \ ++__OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } ++ ++#define __IN1(s,x) \ ++extern unsigned x __in##s(unsigned short port); \ ++extern inline unsigned x __in##s(unsigned short port) { unsigned x _v; ++ ++#define __IN2(s,s1,s2) \ ++__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" ++ ++#define __IN(s,s1,x,i...) \ ++__IN1(s,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); return _v; } \ ++__IN1(s##c,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); return _v; } \ ++__IN1(s##_p,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); SLOW_DOWN_IO; return _v; } \ ++__IN1(s##c_p,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; } ++ ++#define __INS(s) \ ++extern void ins##s(unsigned short port, void * addr, unsigned long count); \ ++extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \ ++{ __asm__ __volatile__ ("cld ; rep ; ins" #s \ ++: "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } ++ ++#define __OUTS(s) \ ++extern void outs##s(unsigned short port, const void * addr, unsigned long count); \ ++extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ ++{ __asm__ __volatile__ ("cld ; rep ; outs" #s \ ++: "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } ++ ++__IN(b,"", char) ++__IN(w,"",short) ++__IN(l,"", long) ++ ++__OUT(b,"b",char) ++__OUT(w,"w",short) ++__OUT(l,,int) ++ ++__INS(b) ++__INS(w) ++__INS(l) ++ ++__OUTS(b) ++__OUTS(w) ++__OUTS(l) ++ ++/* ++ * Note that due to the way __builtin_constant_p() works, you ++ * - can't use it inside a inline function (it will never be true) ++ * - you don't have to worry about side effects within the __builtin.. ++ */ ++#define outb(val,port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __outbc((val),(port)) : \ ++ __outb((val),(port))) ++ ++#define inb(port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __inbc(port) : \ ++ __inb(port)) ++ ++#define outb_p(val,port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __outbc_p((val),(port)) : \ ++ __outb_p((val),(port))) ++ ++#define inb_p(port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __inbc_p(port) : \ ++ __inb_p(port)) ++ ++#define outw(val,port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __outwc((val),(port)) : \ ++ __outw((val),(port))) ++ ++#define inw(port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __inwc(port) : \ ++ __inw(port)) ++ ++#define outw_p(val,port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __outwc_p((val),(port)) : \ ++ __outw_p((val),(port))) ++ ++#define inw_p(port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __inwc_p(port) : \ ++ __inw_p(port)) ++ ++#define outl(val,port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __outlc((val),(port)) : \ ++ __outl((val),(port))) ++ ++#define inl(port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __inlc(port) : \ ++ __inl(port)) ++ ++#define outl_p(val,port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __outlc_p((val),(port)) : \ ++ __outl_p((val),(port))) ++ ++#define inl_p(port) \ ++((__builtin_constant_p((port)) && (port) < 256) ? \ ++ __inlc_p(port) : \ ++ __inl_p(port)) ++ ++#endif /* ETHERBOOT_IO_H */ +Index: b/netboot/ip.h +=================================================================== +--- /dev/null ++++ b/netboot/ip.h +@@ -0,0 +1,36 @@ ++#ifndef _IP_H ++#define _IP_H ++ ++/* We need 'uint16_t' */ ++#include "types.h" ++/* We need 'in_addr' */ ++#include "in.h" ++ ++struct iphdr { ++ uint8_t verhdrlen; ++ uint8_t service; ++ uint16_t len; ++ uint16_t ident; ++ uint16_t frags; ++ uint8_t ttl; ++ uint8_t protocol; ++ uint16_t chksum; ++ in_addr src; ++ in_addr dest; ++}; ++ ++extern void build_ip_hdr(unsigned long __destip, int __ttl, int __protocol, ++ int __option_len, int __len, const void * __buf); ++ ++extern int ip_transmit(int __len, const void * __buf); ++ ++extern uint16_t ipchksum(const void * __data, unsigned long __length); ++ ++extern uint16_t add_ipchksums(unsigned long __offset, uint16_t __sum, ++ uint16_t __new); ++ ++ ++ ++ ++ ++#endif /* _IP_H */ +Index: b/netboot/isa.h +=================================================================== +--- /dev/null ++++ b/netboot/isa.h +@@ -0,0 +1,27 @@ ++#if !defined(ISA_H) && defined(CONFIG_ISA) ++#define ISA_H ++ ++struct dev; ++ ++#define ISAPNP_VENDOR(a,b,c) (((((a)-'A'+1)&0x3f)<<2)|\ ++ ((((b)-'A'+1)&0x18)>>3)|((((b)-'A'+1)&7)<<13)|\ ++ ((((c)-'A'+1)&0x1f)<<8)) ++ ++#define GENERIC_ISAPNP_VENDOR ISAPNP_VENDOR('P','N','P') ++ ++struct isa_driver ++{ ++ int type; ++ const char *name; ++ int (*probe)(struct dev *, unsigned short *); ++ unsigned short *ioaddrs; ++}; ++ ++#define __isa_driver __attribute__ ((unused,__section__(".drivers.isa"))) ++extern const struct isa_driver isa_drivers[]; ++extern const struct isa_driver isa_drivers_end[]; ++ ++#define ISA_ROM(IMAGE, DESCRIPTION) ++ ++#endif /* ISA_H */ ++ +Index: b/netboot/lance.c +=================================================================== +--- a/netboot/lance.c ++++ /dev/null +@@ -1,564 +0,0 @@ +-/************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +-LANCE NIC driver for Etherboot +-Large portions borrowed from the Linux LANCE driver by Donald Becker +-Ken Yap, July 1997 +-***************************************************************************/ +- +-/* +- * 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, or (at +- * your option) any later version. +- */ +- +-/* to get some global routines like printf */ +-#include "etherboot.h" +-/* to get the interface to the body of the program */ +-#include "nic.h" +-#ifdef INCLUDE_LANCE +-#include "pci.h" +-#endif +-#include "cards.h" +- +-/* Offsets from base I/O address */ +-#if defined(INCLUDE_NE2100) || defined(INCLUDE_LANCE) +-#define LANCE_ETH_ADDR 0x0 +-#define LANCE_DATA 0x10 +-#define LANCE_ADDR 0x12 +-#define LANCE_RESET 0x14 +-#define LANCE_BUS_IF 0x16 +-#define LANCE_TOTAL_SIZE 0x18 +-#endif +-#ifdef INCLUDE_NI6510 +-#define LANCE_ETH_ADDR 0x8 +-#define LANCE_DATA 0x0 +-#define LANCE_ADDR 0x2 +-#define LANCE_RESET 0x4 +-#define LANCE_BUS_IF 0x6 +-#define LANCE_TOTAL_SIZE 0x10 +-#endif +- +-/* lance_poll() now can use multiple Rx buffers to prevent packet loss. Set +- * Set LANCE_LOG_RX_BUFFERS to 0..7 for 1, 2, 4, 8, 16, 32, 64 or 128 Rx +- * buffers. Usually 4 (=16 Rx buffers) is a good value. (Andreas Neuhaus) +- * Decreased to 2 (=4 Rx buffers) (Ken Yap, 20010305) */ +- +-#define LANCE_LOG_RX_BUFFERS 2 /* Use 2^2=4 Rx buffers */ +- +-#define RX_RING_SIZE (1 << (LANCE_LOG_RX_BUFFERS)) +-#define RX_RING_MOD_MASK (RX_RING_SIZE - 1) +-#define RX_RING_LEN_BITS ((LANCE_LOG_RX_BUFFERS) << 29) +- +-struct lance_init_block +-{ +- unsigned short mode; +- unsigned char phys_addr[ETH_ALEN]; +- unsigned long filter[2]; +- Address rx_ring; +- Address tx_ring; +-}; +- +-struct lance_rx_head +-{ +- union { +- Address base; +- unsigned char addr[4]; +- } u; +- short buf_length; /* 2s complement */ +- short msg_length; +-}; +- +-struct lance_tx_head +-{ +- union { +- Address base; +- unsigned char addr[4]; +- } u; +- short buf_length; /* 2s complement */ +- short misc; +-}; +- +-struct lance_interface +-{ +- struct lance_init_block init_block; +- struct lance_rx_head rx_ring[RX_RING_SIZE]; +- struct lance_tx_head tx_ring; +- unsigned char rbuf[RX_RING_SIZE][ETH_FRAME_LEN+4]; +- unsigned char tbuf[ETH_FRAME_LEN]; +- /* +- * Do not alter the order of the struct members above; +- * the hardware depends on the correct alignment. +- */ +- int rx_idx; +-}; +- +-#define LANCE_MUST_PAD 0x00000001 +-#define LANCE_ENABLE_AUTOSELECT 0x00000002 +-#define LANCE_SELECT_PHONELINE 0x00000004 +-#define LANCE_MUST_UNRESET 0x00000008 +- +-/* A mapping from the chip ID number to the part number and features. +- These are from the datasheets -- in real life the '970 version +- reportedly has the same ID as the '965. */ +-static const struct lance_chip_type +-{ +- int id_number; +- const char *name; +- int flags; +-} chip_table[] = { +- {0x0000, "LANCE 7990", /* Ancient lance chip. */ +- LANCE_MUST_PAD + LANCE_MUST_UNRESET}, +- {0x0003, "PCnet/ISA 79C960", /* 79C960 PCnet/ISA. */ +- LANCE_ENABLE_AUTOSELECT}, +- {0x2260, "PCnet/ISA+ 79C961", /* 79C961 PCnet/ISA+, Plug-n-Play. */ +- LANCE_ENABLE_AUTOSELECT}, +- {0x2420, "PCnet/PCI 79C970", /* 79C970 or 79C974 PCnet-SCSI, PCI. */ +- LANCE_ENABLE_AUTOSELECT}, +- /* Bug: the PCnet/PCI actually uses the PCnet/VLB ID number, so just call +- it the PCnet32. */ +- {0x2430, "PCnet32", /* 79C965 PCnet for VL bus. */ +- LANCE_ENABLE_AUTOSELECT}, +- {0x2621, "PCnet/PCI-II 79C970A", /* 79C970A PCInetPCI II. */ +- LANCE_ENABLE_AUTOSELECT}, +- {0x2625, "PCnet-FAST III 79C973", /* 79C973 PCInet-FAST III. */ +- LANCE_ENABLE_AUTOSELECT}, +- {0x2626, "PCnet/HomePNA 79C978", +- LANCE_ENABLE_AUTOSELECT|LANCE_SELECT_PHONELINE}, +- {0x0, "PCnet (unknown)", +- LANCE_ENABLE_AUTOSELECT}, +-}; +- +-/* Define a macro for converting program addresses to real addresses */ +-#undef virt_to_bus +-#define virt_to_bus(x) ((unsigned long)x) +- +-static int chip_version; +-static int lance_version; +-static unsigned short ioaddr; +-#ifndef INCLUDE_LANCE +-static int dma; +-#endif +-static struct lance_interface *lp; +- +-/* additional 8 bytes for 8-byte alignment space */ +-#ifdef USE_LOWMEM_BUFFER +-#define lance ((char *)0x10000 - (sizeof(struct lance_interface)+8)) +-#else +-static char lance[sizeof(struct lance_interface)+8]; +-#endif +- +-#ifndef INCLUDE_LANCE +-/* DMA defines and helper routines */ +- +-/* DMA controller registers */ +-#define DMA1_CMD_REG 0x08 /* command register (w) */ +-#define DMA1_STAT_REG 0x08 /* status register (r) */ +-#define DMA1_REQ_REG 0x09 /* request register (w) */ +-#define DMA1_MASK_REG 0x0A /* single-channel mask (w) */ +-#define DMA1_MODE_REG 0x0B /* mode register (w) */ +-#define DMA1_CLEAR_FF_REG 0x0C /* clear pointer flip-flop (w) */ +-#define DMA1_TEMP_REG 0x0D /* Temporary Register (r) */ +-#define DMA1_RESET_REG 0x0D /* Master Clear (w) */ +-#define DMA1_CLR_MASK_REG 0x0E /* Clear Mask */ +-#define DMA1_MASK_ALL_REG 0x0F /* all-channels mask (w) */ +- +-#define DMA2_CMD_REG 0xD0 /* command register (w) */ +-#define DMA2_STAT_REG 0xD0 /* status register (r) */ +-#define DMA2_REQ_REG 0xD2 /* request register (w) */ +-#define DMA2_MASK_REG 0xD4 /* single-channel mask (w) */ +-#define DMA2_MODE_REG 0xD6 /* mode register (w) */ +-#define DMA2_CLEAR_FF_REG 0xD8 /* clear pointer flip-flop (w) */ +-#define DMA2_TEMP_REG 0xDA /* Temporary Register (r) */ +-#define DMA2_RESET_REG 0xDA /* Master Clear (w) */ +-#define DMA2_CLR_MASK_REG 0xDC /* Clear Mask */ +-#define DMA2_MASK_ALL_REG 0xDE /* all-channels mask (w) */ +- +- +-#define DMA_MODE_READ 0x44 /* I/O to memory, no autoinit, increment, single mode */ +-#define DMA_MODE_WRITE 0x48 /* memory to I/O, no autoinit, increment, single mode */ +-#define DMA_MODE_CASCADE 0xC0 /* pass thru DREQ->HRQ, DACK<-HLDA only */ +- +-/* enable/disable a specific DMA channel */ +-static void enable_dma(unsigned int dmanr) +-{ +- if (dmanr <= 3) +- outb_p(dmanr, DMA1_MASK_REG); +- else +- outb_p(dmanr & 3, DMA2_MASK_REG); +-} +- +-static void disable_dma(unsigned int dmanr) +-{ +- if (dmanr <= 3) +- outb_p(dmanr | 4, DMA1_MASK_REG); +- else +- outb_p((dmanr & 3) | 4, DMA2_MASK_REG); +-} +- +-/* set mode (above) for a specific DMA channel */ +-static void set_dma_mode(unsigned int dmanr, char mode) +-{ +- if (dmanr <= 3) +- outb_p(mode | dmanr, DMA1_MODE_REG); +- else +- outb_p(mode | (dmanr&3), DMA2_MODE_REG); +-} +-#endif /* !INCLUDE_LANCE */ +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void lance_reset(struct nic *nic) +-{ +- int i; +- Address l; +- +- /* Reset the LANCE */ +- (void)inw(ioaddr+LANCE_RESET); +- /* Un-Reset the LANCE, needed only for the NE2100 */ +- if (chip_table[lance_version].flags & LANCE_MUST_UNRESET) +- outw(0, ioaddr+LANCE_RESET); +- if (chip_table[lance_version].flags & LANCE_ENABLE_AUTOSELECT) +- { +- /* This is 79C960 specific; Turn on auto-select of media +- (AUI, BNC). */ +- outw(0x2, ioaddr+LANCE_ADDR); +- /* Don't touch 10base2 power bit. */ +- outw(inw(ioaddr+LANCE_BUS_IF) | 0x2, ioaddr+LANCE_BUS_IF); +- } +- /* HomePNA cards need to explicitly pick the phoneline interface. +- * Some of these cards have ethernet interfaces as well, this +- * code might require some modification for those. +- */ +- if (chip_table[lance_version].flags & LANCE_SELECT_PHONELINE) { +- short media, check ; +- /* this is specific to HomePNA cards... */ +- outw(49, ioaddr+0x12) ; +- media = inw(ioaddr+0x16) ; +-#ifdef DEBUG +- printf("media was %d\n", media) ; +-#endif +- media &= ~3 ; +- media |= 1 ; +-#ifdef DEBUG +- printf("media changed to %d\n", media) ; +-#endif +- media &= ~3 ; +- media |= 1 ; +- outw(49, ioaddr+0x12) ; +- outw(media, ioaddr+0x16) ; +- outw(49, ioaddr+0x12) ; +- check = inw(ioaddr+0x16) ; +-#ifdef DEBUG +- printf("check %s, media was set properly\n", +- check == media ? "passed" : "FAILED" ) ; +-#endif +- } +- +- /* Re-initialise the LANCE, and start it when done. */ +- /* Set station address */ +- for (i = 0; i < ETH_ALEN; ++i) +- lp->init_block.phys_addr[i] = nic->node_addr[i]; +- /* Preset the receive ring headers */ +- for (i=0; irx_ring[i].buf_length = -ETH_FRAME_LEN-4; +- /* OWN */ +- lp->rx_ring[i].u.base = virt_to_bus(lp->rbuf[i]) & 0xffffff; +- /* we set the top byte as the very last thing */ +- lp->rx_ring[i].u.addr[3] = 0x80; +- } +- lp->rx_idx = 0; +- lp->init_block.mode = 0x0; /* enable Rx and Tx */ +- l = (Address)virt_to_bus(&lp->init_block); +- outw(0x1, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw((short)l, ioaddr+LANCE_DATA); +- outw(0x2, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw((short)(l >> 16), ioaddr+LANCE_DATA); +- outw(0x4, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw(0x915, ioaddr+LANCE_DATA); +- outw(0x0, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw(0x4, ioaddr+LANCE_DATA); /* stop */ +- outw(0x1, ioaddr+LANCE_DATA); /* init */ +- for (i = 10000; i > 0; --i) +- if (inw(ioaddr+LANCE_DATA) & 0x100) +- break; +-#ifdef DEBUG +- if (i <= 0) +- printf("Init timed out\n"); +-#endif +- /* Apparently clearing the InitDone bit here triggers a bug +- in the '974. (Mark Stockton) */ +- outw(0x2, ioaddr+LANCE_DATA); /* start */ +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int lance_poll(struct nic *nic) +-{ +- int status; +- +- status = lp->rx_ring[lp->rx_idx].u.base >> 24; +- if (status & 0x80) +- return (0); +-#ifdef DEBUG +- printf("LANCE packet received rx_ring.u.base %X mcnt %hX csr0 %hX\n", +- lp->rx_ring[lp->rx_idx].u.base, lp->rx_ring[lp->rx_idx].msg_length, +- inw(ioaddr+LANCE_DATA)); +-#endif +- if (status == 0x3) +- memcpy(nic->packet, lp->rbuf[lp->rx_idx], nic->packetlen = lp->rx_ring[lp->rx_idx].msg_length); +- /* Andrew Boyd of QNX reports that some revs of the 79C765 +- clear the buffer length */ +- lp->rx_ring[lp->rx_idx].buf_length = -ETH_FRAME_LEN-4; +- lp->rx_ring[lp->rx_idx].u.addr[3] |= 0x80; /* prime for next receive */ +- +- /* I'm not sure if the following is still ok with multiple Rx buffers, but it works */ +- outw(0x0, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw(0x500, ioaddr+LANCE_DATA); /* clear receive + InitDone */ +- +- /* Switch to the next Rx ring buffer */ +- lp->rx_idx = (lp->rx_idx + 1) & RX_RING_MOD_MASK; +- +- return (status == 0x3); +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void lance_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- unsigned long time; +- +- /* copy the packet to ring buffer */ +- memcpy(lp->tbuf, d, ETH_ALEN); /* dst */ +- memcpy(&lp->tbuf[ETH_ALEN], nic->node_addr, ETH_ALEN); /* src */ +- lp->tbuf[ETH_ALEN+ETH_ALEN] = t >> 8; /* type */ +- lp->tbuf[ETH_ALEN+ETH_ALEN+1] = t; /* type */ +- memcpy(&lp->tbuf[ETH_HLEN], p, s); +- s += ETH_HLEN; +- if (chip_table[chip_version].flags & LANCE_MUST_PAD) +- while (s < ETH_ZLEN) /* pad to min length */ +- lp->tbuf[s++] = 0; +- lp->tx_ring.buf_length = -s; +- lp->tx_ring.misc = 0x0; +- /* OWN, STP, ENP */ +- lp->tx_ring.u.base = virt_to_bus(lp->tbuf) & 0xffffff; +- /* we set the top byte as the very last thing */ +- lp->tx_ring.u.addr[3] = 0x83; +- /* Trigger an immediate send poll */ +- outw(0x0, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); /* as in the datasheets... */ +- /* Klaus Espenlaub: the value below was 0x48, but that enabled the +- * interrupt line, causing a hang if for some reasone the interrupt +- * controller had the LANCE interrupt enabled. I have no idea why +- * nobody ran into this before... */ +- outw(0x08, ioaddr+LANCE_DATA); +- /* wait for transmit complete */ +- time = currticks() + TICKS_PER_SEC; /* wait one second */ +- while (currticks() < time && (lp->tx_ring.u.base & 0x80000000) != 0) +- ; +- if ((lp->tx_ring.u.base & 0x80000000) != 0) +- printf("LANCE timed out on transmit\n"); +- (void)inw(ioaddr+LANCE_ADDR); +- outw(0x200, ioaddr+LANCE_DATA); /* clear transmit + InitDone */ +-#ifdef DEBUG +- printf("tx_ring.u.base %X tx_ring.buf_length %hX tx_ring.misc %hX csr0 %hX\n", +- lp->tx_ring.u.base, lp->tx_ring.buf_length, lp->tx_ring.misc, +- inw(ioaddr+LANCE_DATA)); +-#endif +-} +- +-static void lance_disable(struct nic *nic) +-{ +- (void)inw(ioaddr+LANCE_RESET); +- if (chip_table[lance_version].flags & LANCE_MUST_UNRESET) +- outw(0, ioaddr+LANCE_RESET); +- +- outw(0, ioaddr+LANCE_ADDR); +- outw(0x0004, ioaddr+LANCE_DATA); /* stop the LANCE */ +- +-#ifndef INCLUDE_LANCE +- disable_dma(dma); +-#endif +-} +- +-#ifdef INCLUDE_LANCE +-static int lance_probe1(struct nic *nic, struct pci_device *pci) +-#else +-static int lance_probe1(struct nic *nic) +-#endif +-{ +- int reset_val ; +- unsigned int i; +- Address l; +- short dma_channels; +-#ifndef INCLUDE_LANCE +- static const char dmas[] = { 5, 6, 7, 3 }; +-#endif +- +- reset_val = inw(ioaddr+LANCE_RESET); +- outw(reset_val, ioaddr+LANCE_RESET); +-#if 1 /* Klaus Espenlaub -- was #ifdef INCLUDE_NE2100*/ +- outw(0x0, ioaddr+LANCE_ADDR); /* Switch to window 0 */ +- if (inw(ioaddr+LANCE_DATA) != 0x4) +- return (-1); +-#endif +- outw(88, ioaddr+LANCE_ADDR); /* Get the version of the chip */ +- if (inw(ioaddr+LANCE_ADDR) != 88) +- lance_version = 0; +- else +- { +- chip_version = inw(ioaddr+LANCE_DATA); +- outw(89, ioaddr+LANCE_ADDR); +- chip_version |= inw(ioaddr+LANCE_DATA) << 16; +- if ((chip_version & 0xfff) != 0x3) +- return (-1); +- chip_version = (chip_version >> 12) & 0xffff; +- for (lance_version = 1; chip_table[lance_version].id_number != 0; ++lance_version) +- if (chip_table[lance_version].id_number == chip_version) +- break; +- } +- /* make sure data structure is 8-byte aligned */ +- l = ((Address)lance + 7) & ~7; +- lp = (struct lance_interface *)l; +- lp->init_block.mode = 0x3; /* disable Rx and Tx */ +- lp->init_block.filter[0] = lp->init_block.filter[1] = 0x0; +- /* using multiple Rx buffer and a single Tx buffer */ +- lp->init_block.rx_ring = (virt_to_bus(&lp->rx_ring) & 0xffffff) | RX_RING_LEN_BITS; +- lp->init_block.tx_ring = virt_to_bus(&lp->tx_ring) & 0xffffff; +- l = virt_to_bus(&lp->init_block); +- outw(0x1, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw((unsigned short)l, ioaddr+LANCE_DATA); +- outw(0x2, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw((unsigned short)(l >> 16), ioaddr+LANCE_DATA); +- outw(0x4, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- outw(0x915, ioaddr+LANCE_DATA); +- outw(0x0, ioaddr+LANCE_ADDR); +- (void)inw(ioaddr+LANCE_ADDR); +- /* Get station address */ +- for (i = 0; i < ETH_ALEN; ++i) { +- nic->node_addr[i] = inb(ioaddr+LANCE_ETH_ADDR+i); +- } +-#ifndef INCLUDE_LANCE +- /* now probe for DMA channel */ +- dma_channels = ((inb(DMA1_STAT_REG) >> 4) & 0xf) | +- (inb(DMA2_STAT_REG) & 0xf0); +- /* need to fix when PCI provides DMA info */ +- for (i = 0; i < (sizeof(dmas)/sizeof(dmas[0])); ++i) +- { +- int j; +- +- dma = dmas[i]; +- /* Don't enable a permanently busy DMA channel, +- or the machine will hang */ +- if (dma_channels & (1 << dma)) +- continue; +- outw(0x7f04, ioaddr+LANCE_DATA); /* clear memory error bits */ +- set_dma_mode(dma, DMA_MODE_CASCADE); +- enable_dma(dma); +- outw(0x1, ioaddr+LANCE_DATA); /* init */ +- for (j = 100; j > 0; --j) +- if (inw(ioaddr+LANCE_DATA) & 0x900) +- break; +- if (inw(ioaddr+LANCE_DATA) & 0x100) +- break; +- else +- disable_dma(dma); +- } +- if (i >= (sizeof(dmas)/sizeof(dmas[0]))) +- dma = 0; +- printf("\n%s base %#X, DMA %d, addr %!\n", +- chip_table[lance_version].name, ioaddr, dma, nic->node_addr); +-#else +- printf(" %s base %#hX, addr %!\n", chip_table[lance_version].name, ioaddr, nic->node_addr); +-#endif +- if (chip_table[chip_version].flags & LANCE_ENABLE_AUTOSELECT) { +- /* Turn on auto-select of media (10baseT or BNC) so that the +- * user watch the LEDs. */ +- outw(0x0002, ioaddr+LANCE_ADDR); +- /* Don't touch 10base2 power bit. */ +- outw(inw(ioaddr+LANCE_BUS_IF) | 0x0002, ioaddr+LANCE_BUS_IF); +- } +- return (lance_version); +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +- +-#ifdef INCLUDE_LANCE +-struct nic *lancepci_probe(struct nic *nic, unsigned short *probe_addrs, struct pci_device *pci) +-#endif +-#ifdef INCLUDE_NE2100 +-struct nic *ne2100_probe(struct nic *nic, unsigned short *probe_addrs) +-#endif +-#ifdef INCLUDE_NI6510 +-struct nic *ni6510_probe(struct nic *nic, unsigned short *probe_addrs) +-#endif +-{ +- unsigned short *p; +-#ifndef INCLUDE_LANCE +- static unsigned short io_addrs[] = { 0x300, 0x320, 0x340, 0x360, 0 }; +-#endif +- +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- if (probe_addrs == 0) { +-#ifdef INCLUDE_LANCE +- return 0; +-#else +- probe_addrs = io_addrs; +-#endif +- } +- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) +- { +- char offset15, offset14 = inb(ioaddr + 14); +- unsigned short pci_cmd; +- +-#ifdef INCLUDE_NE2100 +- if ((offset14 == 0x52 || offset14 == 0x57) && +- ((offset15 = inb(ioaddr + 15)) == 0x57 || offset15 == 0x44)) +- if (lance_probe1(nic) >= 0) +- break; +-#endif +-#ifdef INCLUDE_NI6510 +- if ((offset14 == 0x00 || offset14 == 0x52) && +- ((offset15 = inb(ioaddr + 15)) == 0x55 || offset15 == 0x44)) +- if (lance_probe1(nic) >= 0) +- break; +-#endif +-#ifdef INCLUDE_LANCE +- adjust_pci_device(pci); +- if (lance_probe1(nic, pci) >= 0) +- break; +-#endif +- } +- /* if board found */ +- if (ioaddr != 0) +- { +- /* point to NIC specific routines */ +- lance_reset(nic); +- nic->reset = lance_reset; +- nic->poll = lance_poll; +- nic->transmit = lance_transmit; +- nic->disable = lance_disable; +- return nic; +- } +- +- /* no board found */ +- return 0; +-} +Index: b/netboot/latch.h +=================================================================== +--- /dev/null ++++ b/netboot/latch.h +@@ -0,0 +1,10 @@ ++#ifndef LATCH_H ++#define LATCH_H ++ ++#define TICKS_PER_SEC 18 ++ ++/* For different calibrators of the TSC move the declaration of ++ * sleep_latch and the definitions of it's length here... ++ */ ++ ++#endif /* LATCH_H */ +Index: b/netboot/linux-asm-io.h +=================================================================== +--- a/netboot/linux-asm-io.h ++++ /dev/null +@@ -1,187 +0,0 @@ +-#ifndef _ASM_IO_H +-#define _ASM_IO_H +- +-/* +- * This file contains the definitions for the x86 IO instructions +- * inb/inw/inl/outb/outw/outl and the "string versions" of the same +- * (insb/insw/insl/outsb/outsw/outsl). You can also use "pausing" +- * versions of the single-IO instructions (inb_p/inw_p/..). +- * +- * This file is not meant to be obfuscating: it's just complicated +- * to (a) handle it all in a way that makes gcc able to optimize it +- * as well as possible and (b) trying to avoid writing the same thing +- * over and over again with slight variations and possibly making a +- * mistake somewhere. +- */ +- +-/* +- * Thanks to James van Artsdalen for a better timing-fix than +- * the two short jumps: using outb's to a nonexistent port seems +- * to guarantee better timings even on fast machines. +- * +- * On the other hand, I'd like to be sure of a non-existent port: +- * I feel a bit unsafe about using 0x80 (should be safe, though) +- * +- * Linus +- */ +- +-#ifdef SLOW_IO_BY_JUMPING +-#define __SLOW_DOWN_IO __asm__ __volatile__("jmp 1f\n1:\tjmp 1f\n1:") +-#else +-#define __SLOW_DOWN_IO __asm__ __volatile__("outb %al,$0x80") +-#endif +- +-#ifdef REALLY_SLOW_IO +-#define SLOW_DOWN_IO { __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; __SLOW_DOWN_IO; } +-#else +-#define SLOW_DOWN_IO __SLOW_DOWN_IO +-#endif +- +-/* +- * readX/writeX() are used to access memory mapped devices. On some +- * architectures the memory mapped IO stuff needs to be accessed +- * differently. On the x86 architecture, we just read/write the +- * memory location directly. +- */ +-#define readb(addr) (*(volatile unsigned char *) (addr)) +-#define readw(addr) (*(volatile unsigned short *) (addr)) +-#define readl(addr) (*(volatile unsigned int *) (addr)) +- +-#define writeb(b,addr) ((*(volatile unsigned char *) (addr)) = (b)) +-#define writew(b,addr) ((*(volatile unsigned short *) (addr)) = (b)) +-#define writel(b,addr) ((*(volatile unsigned int *) (addr)) = (b)) +- +-#define memset_io(a,b,c) memset((void *)(a),(b),(c)) +-#define memcpy_fromio(a,b,c) memcpy((a),(void *)(b),(c)) +-#define memcpy_toio(a,b,c) memcpy((void *)(a),(b),(c)) +- +-/* +- * Again, i386 does not require mem IO specific function. +- */ +- +-#define eth_io_copy_and_sum(a,b,c,d) eth_copy_and_sum((a),(void *)(b),(c),(d)) +- +-/* +- * Talk about misusing macros.. +- */ +- +-#define __OUT1(s,x) \ +-extern void __out##s(unsigned x value, unsigned short port); \ +-extern inline void __out##s(unsigned x value, unsigned short port) { +- +-#define __OUT2(s,s1,s2) \ +-__asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1" +- +-#define __OUT(s,s1,x) \ +-__OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); } \ +-__OUT1(s##c,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); } \ +-__OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "d" (port)); SLOW_DOWN_IO; } \ +-__OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO; } +- +-#define __IN1(s,x) \ +-extern unsigned x __in##s(unsigned short port); \ +-extern inline unsigned x __in##s(unsigned short port) { unsigned x _v; +- +-#define __IN2(s,s1,s2) \ +-__asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0" +- +-#define __IN(s,s1,x,i...) \ +-__IN1(s,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); return _v; } \ +-__IN1(s##c,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); return _v; } \ +-__IN1(s##_p,x) __IN2(s,s1,"w") : "=a" (_v) : "d" (port) ,##i ); SLOW_DOWN_IO; return _v; } \ +-__IN1(s##c_p,x) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO; return _v; } +- +-#define __INS(s) \ +-extern void ins##s(unsigned short port, void * addr, unsigned long count); \ +-extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \ +-{ __asm__ __volatile__ ("cld ; rep ; ins" #s \ +-: "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } +- +-#define __OUTS(s) \ +-extern void outs##s(unsigned short port, const void * addr, unsigned long count); \ +-extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \ +-{ __asm__ __volatile__ ("cld ; rep ; outs" #s \ +-: "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); } +- +-__IN(b,"", char) +-__IN(w,"",short) +-__IN(l,"", long) +- +-__OUT(b,"b",char) +-__OUT(w,"w",short) +-__OUT(l,,int) +- +-__INS(b) +-__INS(w) +-__INS(l) +- +-__OUTS(b) +-__OUTS(w) +-__OUTS(l) +- +-/* +- * Note that due to the way __builtin_constant_p() works, you +- * - can't use it inside a inline function (it will never be true) +- * - you don't have to worry about side effects within the __builtin.. +- */ +-#define outb(val,port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __outbc((val),(port)) : \ +- __outb((val),(port))) +- +-#define inb(port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __inbc(port) : \ +- __inb(port)) +- +-#define outb_p(val,port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __outbc_p((val),(port)) : \ +- __outb_p((val),(port))) +- +-#define inb_p(port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __inbc_p(port) : \ +- __inb_p(port)) +- +-#define outw(val,port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __outwc((val),(port)) : \ +- __outw((val),(port))) +- +-#define inw(port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __inwc(port) : \ +- __inw(port)) +- +-#define outw_p(val,port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __outwc_p((val),(port)) : \ +- __outw_p((val),(port))) +- +-#define inw_p(port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __inwc_p(port) : \ +- __inw_p(port)) +- +-#define outl(val,port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __outlc((val),(port)) : \ +- __outl((val),(port))) +- +-#define inl(port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __inlc(port) : \ +- __inl(port)) +- +-#define outl_p(val,port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __outlc_p((val),(port)) : \ +- __outl_p((val),(port))) +- +-#define inl_p(port) \ +-((__builtin_constant_p((port)) && (port) < 256) ? \ +- __inlc_p(port) : \ +- __inl_p(port)) +- +-#endif +Index: b/netboot/linux-asm-string.h +=================================================================== +--- a/netboot/linux-asm-string.h ++++ /dev/null +@@ -1,291 +0,0 @@ +-/* +- * Taken from Linux /usr/include/asm/string.h +- * All except memcpy, memmove, memset and memcmp removed. +- */ +- +-#ifndef _I386_STRING_H_ +-#define _I386_STRING_H_ +- +-/* +- * This string-include defines all string functions as inline +- * functions. Use gcc. It also assumes ds=es=data space, this should be +- * normal. Most of the string-functions are rather heavily hand-optimized, +- * see especially strtok,strstr,str[c]spn. They should work, but are not +- * very easy to understand. Everything is done entirely within the register +- * set, making the functions fast and clean. String instructions have been +- * used through-out, making for "slightly" unclear code :-) +- * +- * NO Copyright (C) 1991, 1992 Linus Torvalds, +- * consider these trivial functions to be PD. +- */ +- +-typedef int size_t; +- +-extern void *__memcpy(void * to, const void * from, size_t n); +-extern void *__constant_memcpy(void * to, const void * from, size_t n); +-extern void *memmove(void * dest,const void * src, size_t n); +-extern void *__memset_generic(void * s, char c,size_t count); +-extern void *__constant_c_memset(void * s, unsigned long c, size_t count); +-extern void *__constant_c_and_count_memset(void * s, unsigned long pattern, size_t count); +- +- +-extern inline void * __memcpy(void * to, const void * from, size_t n) +-{ +-int d0, d1, d2; +-__asm__ __volatile__( +- "cld\n\t" +- "rep ; movsl\n\t" +- "testb $2,%b4\n\t" +- "je 1f\n\t" +- "movsw\n" +- "1:\ttestb $1,%b4\n\t" +- "je 2f\n\t" +- "movsb\n" +- "2:" +- : "=&c" (d0), "=&D" (d1), "=&S" (d2) +- :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from) +- : "memory"); +-return (to); +-} +- +-/* +- * This looks horribly ugly, but the compiler can optimize it totally, +- * as the count is constant. +- */ +-extern inline void * __constant_memcpy(void * to, const void * from, size_t n) +-{ +- switch (n) { +- case 0: +- return to; +- case 1: +- *(unsigned char *)to = *(const unsigned char *)from; +- return to; +- case 2: +- *(unsigned short *)to = *(const unsigned short *)from; +- return to; +- case 3: +- *(unsigned short *)to = *(const unsigned short *)from; +- *(2+(unsigned char *)to) = *(2+(const unsigned char *)from); +- return to; +- case 4: +- *(unsigned long *)to = *(const unsigned long *)from; +- return to; +- case 6: /* for Ethernet addresses */ +- *(unsigned long *)to = *(const unsigned long *)from; +- *(2+(unsigned short *)to) = *(2+(const unsigned short *)from); +- return to; +- case 8: +- *(unsigned long *)to = *(const unsigned long *)from; +- *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); +- return to; +- case 12: +- *(unsigned long *)to = *(const unsigned long *)from; +- *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); +- *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); +- return to; +- case 16: +- *(unsigned long *)to = *(const unsigned long *)from; +- *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); +- *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); +- *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); +- return to; +- case 20: +- *(unsigned long *)to = *(const unsigned long *)from; +- *(1+(unsigned long *)to) = *(1+(const unsigned long *)from); +- *(2+(unsigned long *)to) = *(2+(const unsigned long *)from); +- *(3+(unsigned long *)to) = *(3+(const unsigned long *)from); +- *(4+(unsigned long *)to) = *(4+(const unsigned long *)from); +- return to; +- } +-#define COMMON(x) \ +-__asm__ __volatile__( \ +- "cld\n\t" \ +- "rep ; movsl" \ +- x \ +- : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ +- : "0" (n/4),"1" ((long) to),"2" ((long) from) \ +- : "memory"); +-{ +- int d0, d1, d2; +- switch (n % 4) { +- case 0: COMMON(""); return to; +- case 1: COMMON("\n\tmovsb"); return to; +- case 2: COMMON("\n\tmovsw"); return to; +- default: COMMON("\n\tmovsw\n\tmovsb"); return to; +- } +-} +- +-#undef COMMON +-} +- +-#define __HAVE_ARCH_MEMCPY +-#define memcpy(t, f, n) \ +-(__builtin_constant_p(n) ? \ +- __constant_memcpy((t),(f),(n)) : \ +- __memcpy((t),(f),(n))) +- +-#define __HAVE_ARCH_MEMMOVE +-extern inline void * memmove(void * dest,const void * src, size_t n) +-{ +-int d0, d1, d2; +-if (dest ++#include "grub.h" ++#include "timer.h" + +-void +-sleep (int secs) ++#include "nic.h" ++ ++/************************************************************************** ++RANDOM - compute a random number between 0 and 2147483647L or 2147483562? ++**************************************************************************/ ++int32_t random(void) + { +- unsigned long tmo = currticks () + secs; ++ static int32_t seed = 0; ++ int32_t q; ++ if (!seed) /* Initialize linear congruential generator */ ++ seed = currticks() + *(int32_t *)&arptable[ARP_CLIENT].node ++ + ((int16_t *)arptable[ARP_CLIENT].node)[2]; ++ /* simplified version of the LCG given in Bruce Schneier's ++ "Applied Cryptography" */ ++ q = seed/53668; ++ if ((seed = 40014*(seed-53668*q) - 12211*q) < 0) seed += 2147483563L; ++ return seed; ++} + +- while (currticks () < tmo) +- ; ++/************************************************************************** ++POLL INTERRUPTIONS ++**************************************************************************/ ++void poll_interruptions(void) ++{ ++ if (checkkey() != -1 && ASCII_CHAR(getkey()) == K_INTR) { ++ user_abort++; ++ } + } + +-void +-twiddle (void) ++/************************************************************************** ++SLEEP ++**************************************************************************/ ++void sleep(int secs) + { +- static unsigned long lastticks = 0; +- static int count = 0; +- static const char tiddles[]="-\\|/"; +- unsigned long ticks; ++ unsigned long tmo; + +- if (debug) +- { +- if ((ticks = currticks ()) == lastticks) +- return; +- +- lastticks = ticks; +- grub_putchar (tiddles[(count++) & 3]); +- grub_putchar ('\b'); +- } ++ for (tmo = currticks()+secs*TICKS_PER_SEC; currticks() < tmo; ) { ++ poll_interruptions(); ++ } ++} ++ ++/************************************************************************** ++INTERRUPTIBLE SLEEP ++**************************************************************************/ ++void interruptible_sleep(int secs) ++{ ++ printf("\n"); ++ return sleep(secs); ++} ++ ++/************************************************************************** ++TWIDDLE ++**************************************************************************/ ++void twiddle(void) ++{ ++#ifdef BAR_PROGRESS ++ static int count=0; ++ static const char tiddles[]="-\\|/"; ++ static unsigned long lastticks = 0; ++ unsigned long ticks; ++#endif ++#ifdef FREEBSD_PXEEMU ++ extern char pxeemu_nbp_active; ++ if(pxeemu_nbp_active != 0) ++ return; ++#endif ++#ifdef BAR_PROGRESS ++ /* Limit the maximum rate at which characters are printed */ ++ ticks = currticks(); ++ if ((lastticks + (TICKS_PER_SEC/18)) > ticks) ++ return; ++ lastticks = ticks; ++ ++ putchar(tiddles[(count++)&3]); ++ putchar('\b'); ++#else ++ //putchar('.'); ++#endif /* BAR_PROGRESS */ + } + ++ + /* Because Etherboot uses its own formats for the printf family, + define separate definitions from GRUB. */ + /************************************************************************** +@@ -264,3 +317,5 @@ + + return ret; + } ++ ++ +Index: b/netboot/natsemi.c +=================================================================== +--- a/netboot/natsemi.c ++++ b/netboot/natsemi.c +@@ -47,15 +47,15 @@ + /* Revision History */ + + /* ++ 13 Dec 2003 timlegge 1.1 Enabled Multicast Support + 29 May 2001 mdc 1.0 + Initial Release. Tested with Netgear FA311 and FA312 boards +-*/ ++*/ + /* Includes */ + + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + + /* defines */ + +@@ -71,21 +71,18 @@ + + #define NUM_RX_DESC 4 /* Number of Rx descriptor registers. */ + +-typedef unsigned char u8; +-typedef signed char s8; +-typedef unsigned short u16; +-typedef signed short s16; +-typedef unsigned int u32; +-typedef signed int s32; ++typedef uint8_t u8; ++typedef int8_t s8; ++typedef uint16_t u16; ++typedef int16_t s16; ++typedef uint32_t u32; ++typedef int32_t s32; + + /* helpful macroes if on a big_endian machine for changing byte order. + not strictly needed on Intel */ +-#define le16_to_cpu(val) (val) +-#define cpu_to_le32(val) (val) + #define get_unaligned(ptr) (*(ptr)) + #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) )) + #define get_u16(ptr) (*(u16 *)(ptr)) +-#define virt_to_bus(x) ((unsigned long)x) + #define virt_to_le32desc(addr) virt_to_bus(addr) + + enum pcistuff { +@@ -161,7 +158,8 @@ + AcceptMulticast = 0x00200000, + AcceptAllMulticast = 0x20000000, + AcceptAllPhys = 0x10000000, +- AcceptMyPhys = 0x08000000 ++ AcceptMyPhys = 0x08000000, ++ RxFilterEnable = 0x80000000 + }; + + typedef struct _BufferDesc { +@@ -207,17 +205,12 @@ + static BufferDesc txd __attribute__ ((aligned(4))); + static BufferDesc rxd[NUM_RX_DESC] __attribute__ ((aligned(4))); + +-#ifdef USE_LOWMEM_BUFFER +-#define txb ((char *)0x10000 - TX_BUF_SIZE) +-#define rxb ((char *)0x10000 - NUM_RX_DESC*RX_BUF_SIZE - TX_BUF_SIZE) +-#else + static unsigned char txb[TX_BUF_SIZE] __attribute__ ((aligned(4))); + static unsigned char rxb[NUM_RX_DESC * RX_BUF_SIZE] __attribute__ ((aligned(4))); +-#endif + + /* Function Prototypes */ + +-struct nic *natsemi_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci); ++static int natsemi_probe(struct dev *dev, struct pci_device *pci); + static int eeprom_read(long addr, int location); + static int mdio_read(int phy_id, int location); + static void natsemi_init(struct nic *nic); +@@ -228,8 +221,9 @@ + static void natsemi_set_rx_mode(struct nic *nic); + static void natsemi_check_duplex(struct nic *nic); + static void natsemi_transmit(struct nic *nic, const char *d, unsigned int t, unsigned int s, const char *p); +-static int natsemi_poll(struct nic *nic); +-static void natsemi_disable(struct nic *nic); ++static int natsemi_poll(struct nic *nic, int retrieve); ++static void natsemi_disable(struct dev *dev); ++static void natsemi_irq(struct nic *nic, irq_action_t action); + + /* + * Function: natsemi_probe +@@ -245,24 +239,28 @@ + * Returns: struct nic *: pointer to NIC data structure + */ + +-struct nic * +-natsemi_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) ++static int ++natsemi_probe(struct dev *dev, struct pci_device *pci) + { ++ struct nic *nic = (struct nic *)dev; + int i; + int prev_eedata; + u32 tmp; + +- if (io_addrs == 0 || *io_addrs == 0) +- return NULL; ++ if (pci->ioaddr == 0) ++ return 0; ++ ++ adjust_pci_device(pci); + + /* initialize some commonly used globals */ + +- ioaddr = *io_addrs & ~3; ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ++ ioaddr = pci->ioaddr & ~3; + vendor = pci->vendor; + dev_id = pci->dev_id; + nic_name = pci->name; +- +- adjust_pci_device(pci); + + /* natsemi has a non-standard PM control register + * in PCI config space. Some boards apparently need +@@ -317,12 +315,12 @@ + /* initialize device */ + natsemi_init(nic); + +- nic->reset = natsemi_init; ++ dev->disable = natsemi_disable; + nic->poll = natsemi_poll; + nic->transmit = natsemi_transmit; +- nic->disable = natsemi_disable; ++ nic->irq = natsemi_irq; + +- return nic; ++ return 1; + } + + /* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. +@@ -452,7 +450,7 @@ + * Returns: void. + */ + static void +-natsemi_reset(struct nic *nic) ++natsemi_reset(struct nic *nic __unused) + { + outl(ChipReset, ioaddr + ChipCmd); + +@@ -504,14 +502,14 @@ + */ + + static void +-natsemi_init_txd(struct nic *nic) ++natsemi_init_txd(struct nic *nic __unused) + { + txd.link = (u32) 0; + txd.cmdsts = (u32) 0; +- txd.bufptr = (u32) &txb[0]; ++ txd.bufptr = virt_to_bus(&txb[0]); + + /* load Transmit Descriptor Register */ +- outl((u32) &txd, ioaddr + TxRingPtr); ++ outl(virt_to_bus(&txd), ioaddr + TxRingPtr); + if (natsemi_debug > 1) + printf("natsemi_init_txd: TX descriptor register loaded with: %X\n", + inl(ioaddr + TxRingPtr)); +@@ -527,7 +525,7 @@ + */ + + static void +-natsemi_init_rxd(struct nic *nic) ++natsemi_init_rxd(struct nic *nic __unused) + { + int i; + +@@ -535,16 +533,16 @@ + + /* init RX descriptor */ + for (i = 0; i < NUM_RX_DESC; i++) { +- rxd[i].link = (i+1 < NUM_RX_DESC) ? (u32) &rxd[i+1] : (u32) &rxd[0]; ++ rxd[i].link = virt_to_bus((i+1 < NUM_RX_DESC) ? &rxd[i+1] : &rxd[0]); + rxd[i].cmdsts = (u32) RX_BUF_SIZE; +- rxd[i].bufptr = (u32) &rxb[i*RX_BUF_SIZE]; ++ rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]); + if (natsemi_debug > 1) + printf("natsemi_init_rxd: rxd[%d]=%X link=%X cmdsts=%X bufptr=%X\n", + i, &rxd[i], rxd[i].link, rxd[i].cmdsts, rxd[i].bufptr); + } + + /* load Receive Descriptor Register */ +- outl((u32) &rxd[0], ioaddr + RxRingPtr); ++ outl(virt_to_bus(&rxd[0]), ioaddr + RxRingPtr); + + if (natsemi_debug > 1) + printf("natsemi_init_rxd: RX descriptor register loaded with: %X\n", +@@ -562,14 +560,15 @@ + * Returns: void. + */ + +-static void natsemi_set_rx_mode(struct nic *nic) ++static void natsemi_set_rx_mode(struct nic *nic __unused) + { +- u32 rx_mode = AcceptBroadcast | AcceptMyPhys; ++ u32 rx_mode = RxFilterEnable | AcceptBroadcast | ++ AcceptAllMulticast | AcceptMyPhys; + + outl(rx_mode, ioaddr + RxFilterAddr); + } + +-static void natsemi_check_duplex(struct nic *nic) ++static void natsemi_check_duplex(struct nic *nic __unused) + { + int duplex = inl(ioaddr + ChipConfig) & 0x20000000 ? 1 : 0; + +@@ -607,14 +606,14 @@ + unsigned int s, /* size */ + const char *p) /* Packet */ + { +- u32 status, to, nstype; ++ u32 to, nstype; + volatile u32 tx_status; + + /* Stop the transmitter */ + outl(TxOff, ioaddr + ChipCmd); + + /* load Transmit Descriptor Register */ +- outl((u32) &txd, ioaddr + TxRingPtr); ++ outl(virt_to_bus(&txd), ioaddr + TxRingPtr); + if (natsemi_debug > 1) + printf("natsemi_transmit: TX descriptor register loaded with: %X\n", + inl(ioaddr + TxRingPtr)); +@@ -636,7 +635,7 @@ + txb[s++] = '\0'; + + /* set the transmit buffer descriptor and enable Transmit State Machine */ +- txd.bufptr = (u32) &txb[0]; ++ txd.bufptr = virt_to_bus(&txb[0]); + txd.cmdsts = (u32) OWN | s; + + /* restart the transmitter */ +@@ -647,7 +646,7 @@ + + to = currticks() + TX_TIMEOUT; + +- while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to)) ++ while (((tx_status=txd.cmdsts & OWN) && (currticks() < to)) + /* wait */ ; + + if (currticks() >= to) { +@@ -674,7 +673,7 @@ + */ + + static int +-natsemi_poll(struct nic *nic) ++natsemi_poll(struct nic *nic, int retrieve) + { + u32 rx_status = rxd[cur_rx].cmdsts; + int retstat = 0; +@@ -685,6 +684,8 @@ + if (!(rx_status & OWN)) + return retstat; + ++ if ( ! retrieve ) return 1; ++ + if (natsemi_debug > 1) + printf("natsemi_poll: got a packet: cur_rx:%d, status:%X\n", + cur_rx, rx_status); +@@ -704,7 +705,7 @@ + + /* return the descriptor and buffer to receive ring */ + rxd[cur_rx].cmdsts = RX_BUF_SIZE; +- rxd[cur_rx].bufptr = (u32) &rxb[cur_rx*RX_BUF_SIZE]; ++ rxd[cur_rx].bufptr = virt_to_bus(&rxb[cur_rx*RX_BUF_SIZE]); + + if (++cur_rx == NUM_RX_DESC) + cur_rx = 0; +@@ -725,8 +726,12 @@ + */ + + static void +-natsemi_disable(struct nic *nic) ++natsemi_disable(struct dev *dev) + { ++ struct nic *nic = (struct nic *)dev; ++ /* merge reset and disable */ ++ natsemi_init(nic); ++ + /* Disable interrupts using the mask. */ + outl(0, ioaddr + IntrMask); + outl(0, ioaddr + IntrEnable); +@@ -737,3 +742,39 @@ + /* Restore PME enable bit */ + outl(SavedClkRun, ioaddr + ClkRun); + } ++ ++/* Function: natsemi_irq ++ * ++ * Description: Enable, Disable, or Force interrupts ++ * ++ * Arguments: struct nic *nic: NIC data structure ++ * irq_action_t action: requested action to perform ++ * ++ * Returns: void. ++ */ ++ ++static void ++natsemi_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++static struct pci_id natsemi_nics[] = { ++PCI_ROM(0x100b, 0x0020, "dp83815", "DP83815"), ++}; ++ ++struct pci_driver natsemi_driver = { ++ .type = NIC_DRIVER, ++ .name = "NATSEMI", ++ .probe = natsemi_probe, ++ .ids = natsemi_nics, ++ .id_count = sizeof(natsemi_nics)/sizeof(natsemi_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/nfs.h +=================================================================== +--- /dev/null ++++ b/netboot/nfs.h +@@ -0,0 +1,63 @@ ++#ifndef _NFS_H ++#define _NFS_H ++ ++#define SUNRPC_PORT 111 ++ ++#define PROG_PORTMAP 100000 ++#define PROG_NFS 100003 ++#define PROG_MOUNT 100005 ++ ++#define MSG_CALL 0 ++#define MSG_REPLY 1 ++ ++#define PORTMAP_GETPORT 3 ++ ++#define MOUNT_ADDENTRY 1 ++#define MOUNT_UMOUNTALL 4 ++ ++#define NFS_LOOKUP 4 ++#define NFS_READLINK 5 ++#define NFS_READ 6 ++ ++#define NFS_FHSIZE 32 ++ ++#define NFSERR_PERM 1 ++#define NFSERR_NOENT 2 ++#define NFSERR_ACCES 13 ++#define NFSERR_ISDIR 21 ++#define NFSERR_INVAL 22 ++ ++/* Block size used for NFS read accesses. A RPC reply packet (including all ++ * headers) must fit within a single Ethernet frame to avoid fragmentation. ++ * Chosen to be a power of two, as most NFS servers are optimized for this. */ ++#define NFS_READ_SIZE 1024 ++ ++#define NFS_MAXLINKDEPTH 16 ++ ++struct rpc_t { ++ struct iphdr ip; ++ struct udphdr udp; ++ union { ++ uint8_t data[300]; /* longest RPC call must fit!!!! */ ++ struct { ++ uint32_t id; ++ uint32_t type; ++ uint32_t rpcvers; ++ uint32_t prog; ++ uint32_t vers; ++ uint32_t proc; ++ uint32_t data[1]; ++ } call; ++ struct { ++ uint32_t id; ++ uint32_t type; ++ uint32_t rstatus; ++ uint32_t verifier; ++ uint32_t v2; ++ uint32_t astatus; ++ uint32_t data[1]; ++ } reply; ++ } u; ++}; ++ ++#endif /* _NFS_H */ +Index: b/netboot/ni5010.c +=================================================================== +--- a/netboot/ni5010.c ++++ /dev/null +@@ -1,371 +0,0 @@ +-/************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +-Driver for NI5010. +-Code freely taken from Jan-Pascal van Best and Andreas Mohr's +-Linux NI5010 driver. +-***************************************************************************/ +- +-/* +- * 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, or (at +- * your option) any later version. +- */ +- +-/* to get some global routines like printf */ +-#include "etherboot.h" +-/* to get the interface to the body of the program */ +-#include "nic.h" +-/* to get our own prototype */ +-#include "cards.h" +- +-/* ni5010.h file included verbatim */ +-/* +- * Racal-Interlan ni5010 Ethernet definitions +- * +- * This is an extension to the Linux operating system, and is covered by the +- * same Gnu Public License that covers that work. +- * +- * copyrights (c) 1996 by Jan-Pascal van Best (jvbest@wi.leidenuniv.nl) +- * +- * I have done a look in the following sources: +- * crynwr-packet-driver by Russ Nelson +- */ +- +-#define NI5010_BUFSIZE 2048 /* number of bytes in a buffer */ +- +-#define NI5010_MAGICVAL0 0x00 /* magic-values for ni5010 card */ +-#define NI5010_MAGICVAL1 0x55 +-#define NI5010_MAGICVAL2 0xAA +- +-#define SA_ADDR0 0x02 +-#define SA_ADDR1 0x07 +-#define SA_ADDR2 0x01 +- +-/* The number of low I/O ports used by the ni5010 ethercard. */ +-#define NI5010_IO_EXTENT 32 +- +-#define PRINTK(x) if (NI5010_DEBUG) printk x +-#define PRINTK2(x) if (NI5010_DEBUG>=2) printk x +-#define PRINTK3(x) if (NI5010_DEBUG>=3) printk x +- +-/* The various IE command registers */ +-#define EDLC_XSTAT (ioaddr + 0x00) /* EDLC transmit csr */ +-#define EDLC_XCLR (ioaddr + 0x00) /* EDLC transmit "Clear IRQ" */ +-#define EDLC_XMASK (ioaddr + 0x01) /* EDLC transmit "IRQ Masks" */ +-#define EDLC_RSTAT (ioaddr + 0x02) /* EDLC receive csr */ +-#define EDLC_RCLR (ioaddr + 0x02) /* EDLC receive "Clear IRQ" */ +-#define EDLC_RMASK (ioaddr + 0x03) /* EDLC receive "IRQ Masks" */ +-#define EDLC_XMODE (ioaddr + 0x04) /* EDLC transmit Mode */ +-#define EDLC_RMODE (ioaddr + 0x05) /* EDLC receive Mode */ +-#define EDLC_RESET (ioaddr + 0x06) /* EDLC RESET register */ +-#define EDLC_TDR1 (ioaddr + 0x07) /* "Time Domain Reflectometry" reg1 */ +-#define EDLC_ADDR (ioaddr + 0x08) /* EDLC station address, 6 bytes */ +- /* 0x0E doesn't exist for r/w */ +-#define EDLC_TDR2 (ioaddr + 0x0f) /* "Time Domain Reflectometry" reg2 */ +-#define IE_GP (ioaddr + 0x10) /* GP pointer (word register) */ +- /* 0x11 is 2nd byte of GP Pointer */ +-#define IE_RCNT (ioaddr + 0x10) /* Count of bytes in rcv'd packet */ +- /* 0x11 is 2nd byte of "Byte Count" */ +-#define IE_MMODE (ioaddr + 0x12) /* Memory Mode register */ +-#define IE_DMA_RST (ioaddr + 0x13) /* IE DMA Reset. write only */ +-#define IE_ISTAT (ioaddr + 0x13) /* IE Interrupt Status. read only */ +-#define IE_RBUF (ioaddr + 0x14) /* IE Receive Buffer port */ +-#define IE_XBUF (ioaddr + 0x15) /* IE Transmit Buffer port */ +-#define IE_SAPROM (ioaddr + 0x16) /* window on station addr prom */ +-#define IE_RESET (ioaddr + 0x17) /* any write causes Board Reset */ +- +-/* bits in EDLC_XSTAT, interrupt clear on write, status when read */ +-#define XS_TPOK 0x80 /* transmit packet successful */ +-#define XS_CS 0x40 /* carrier sense */ +-#define XS_RCVD 0x20 /* transmitted packet received */ +-#define XS_SHORT 0x10 /* transmission media is shorted */ +-#define XS_UFLW 0x08 /* underflow. iff failed board */ +-#define XS_COLL 0x04 /* collision occurred */ +-#define XS_16COLL 0x02 /* 16th collision occurred */ +-#define XS_PERR 0x01 /* parity error */ +- +-#define XS_CLR_UFLW 0x08 /* clear underflow */ +-#define XS_CLR_COLL 0x04 /* clear collision */ +-#define XS_CLR_16COLL 0x02 /* clear 16th collision */ +-#define XS_CLR_PERR 0x01 /* clear parity error */ +- +-/* bits in EDLC_XMASK, mask/enable transmit interrupts. register is r/w */ +-#define XM_TPOK 0x80 /* =1 to enable Xmt Pkt OK interrupts */ +-#define XM_RCVD 0x20 /* =1 to enable Xmt Pkt Rcvd ints */ +-#define XM_UFLW 0x08 /* =1 to enable Xmt Underflow ints */ +-#define XM_COLL 0x04 /* =1 to enable Xmt Collision ints */ +-#define XM_COLL16 0x02 /* =1 to enable Xmt 16th Coll ints */ +-#define XM_PERR 0x01 /* =1 to enable Xmt Parity Error ints */ +- /* note: always clear this bit */ +-#define XM_ALL (XM_TPOK | XM_RCVD | XM_UFLW | XM_COLL | XM_COLL16) +- +-/* bits in EDLC_RSTAT, interrupt clear on write, status when read */ +-#define RS_PKT_OK 0x80 /* received good packet */ +-#define RS_RST_PKT 0x10 /* RESET packet received */ +-#define RS_RUNT 0x08 /* Runt Pkt rcvd. Len < 64 Bytes */ +-#define RS_ALIGN 0x04 /* Alignment error. not 8 bit aligned */ +-#define RS_CRC_ERR 0x02 /* Bad CRC on rcvd pkt */ +-#define RS_OFLW 0x01 /* overflow for rcv FIFO */ +-#define RS_VALID_BITS ( RS_PKT_OK | RS_RST_PKT | RS_RUNT | RS_ALIGN | RS_CRC_ERR | RS_OFLW ) +- /* all valid RSTAT bits */ +- +-#define RS_CLR_PKT_OK 0x80 /* clear rcvd packet interrupt */ +-#define RS_CLR_RST_PKT 0x10 /* clear RESET packet received */ +-#define RS_CLR_RUNT 0x08 /* clear Runt Pckt received */ +-#define RS_CLR_ALIGN 0x04 /* clear Alignment error */ +-#define RS_CLR_CRC_ERR 0x02 /* clear CRC error */ +-#define RS_CLR_OFLW 0x01 /* clear rcv FIFO Overflow */ +- +-/* bits in EDLC_RMASK, mask/enable receive interrupts. register is r/w */ +-#define RM_PKT_OK 0x80 /* =1 to enable rcvd good packet ints */ +-#define RM_RST_PKT 0x10 /* =1 to enable RESET packet ints */ +-#define RM_RUNT 0x08 /* =1 to enable Runt Pkt rcvd ints */ +-#define RM_ALIGN 0x04 /* =1 to enable Alignment error ints */ +-#define RM_CRC_ERR 0x02 /* =1 to enable Bad CRC error ints */ +-#define RM_OFLW 0x01 /* =1 to enable overflow error ints */ +- +-/* bits in EDLC_RMODE, set Receive Packet mode. register is r/w */ +-#define RMD_TEST 0x80 /* =1 for Chip testing. normally 0 */ +-#define RMD_ADD_SIZ 0x10 /* =1 5-byte addr match. normally 0 */ +-#define RMD_EN_RUNT 0x08 /* =1 enable runt rcv. normally 0 */ +-#define RMD_EN_RST 0x04 /* =1 to rcv RESET pkt. normally 0 */ +- +-#define RMD_PROMISC 0x03 /* receive *all* packets. unusual */ +-#define RMD_MULTICAST 0x02 /* receive multicasts too. unusual */ +-#define RMD_BROADCAST 0x01 /* receive broadcasts & normal. usual */ +-#define RMD_NO_PACKETS 0x00 /* don't receive any packets. unusual */ +- +-/* bits in EDLC_XMODE, set Transmit Packet mode. register is r/w */ +-#define XMD_COLL_CNT 0xf0 /* coll's since success. read-only */ +-#define XMD_IG_PAR 0x08 /* =1 to ignore parity. ALWAYS set */ +-#define XMD_T_MODE 0x04 /* =1 to power xcvr. ALWAYS set this */ +-#define XMD_LBC 0x02 /* =1 for loopback. normally set */ +-#define XMD_DIS_C 0x01 /* =1 disables contention. normally 0 */ +- +-/* bits in EDLC_RESET, write only */ +-#define RS_RESET 0x80 /* =1 to hold EDLC in reset state */ +- +-/* bits in IE_MMODE, write only */ +-#define MM_EN_DMA 0x80 /* =1 begin DMA xfer, Cplt clrs it */ +-#define MM_EN_RCV 0x40 /* =1 allows Pkt rcv. clr'd by rcv */ +-#define MM_EN_XMT 0x20 /* =1 begin Xmt pkt. Cplt clrs it */ +-#define MM_BUS_PAGE 0x18 /* =00 ALWAYS. Used when MUX=1 */ +-#define MM_NET_PAGE 0x06 /* =00 ALWAYS. Used when MUX=0 */ +-#define MM_MUX 0x01 /* =1 means Rcv Buff on system bus */ +- /* =0 means Xmt Buff on system bus */ +- +-/* bits in IE_ISTAT, read only */ +-#define IS_TDIAG 0x80 /* =1 if Diagnostic problem */ +-#define IS_EN_RCV 0x20 /* =1 until frame is rcv'd cplt */ +-#define IS_EN_XMT 0x10 /* =1 until frame is xmt'd cplt */ +-#define IS_EN_DMA 0x08 /* =1 until DMA is cplt or aborted */ +-#define IS_DMA_INT 0x04 /* =0 iff DMA done interrupt. */ +-#define IS_R_INT 0x02 /* =0 iff unmasked Rcv interrupt */ +-#define IS_X_INT 0x01 /* =0 iff unmasked Xmt interrupt */ +- +-/* NIC specific static variables go here */ +- +-static unsigned short ioaddr = 0; +-static unsigned int bufsize_rcv = 0; +- +-#if 0 +-static void show_registers(void) +-{ +- printf("XSTAT %hhX ", inb(EDLC_XSTAT)); +- printf("XMASK %hhX ", inb(EDLC_XMASK)); +- printf("RSTAT %hhX ", inb(EDLC_RSTAT)); +- printf("RMASK %hhX ", inb(EDLC_RMASK)); +- printf("RMODE %hhX ", inb(EDLC_RMODE)); +- printf("XMODE %hhX ", inb(EDLC_XMODE)); +- printf("ISTAT %hhX\n", inb(IE_ISTAT)); +-} +-#endif +- +-static void reset_receiver(void) +-{ +- outw(0, IE_GP); /* Receive packet at start of buffer */ +- outb(RS_VALID_BITS, EDLC_RCLR); /* Clear all pending Rcv interrupts */ +- outb(MM_EN_RCV, IE_MMODE); /* Enable rcv */ +-} +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void ni5010_reset(struct nic *nic) +-{ +- int i; +- +- /* Reset the hardware here. Don't forget to set the station address. */ +- outb(RS_RESET, EDLC_RESET); /* Hold up EDLC_RESET while configing board */ +- outb(0, IE_RESET); /* Hardware reset of ni5010 board */ +- outb(0, EDLC_XMASK); /* Disable all Xmt interrupts */ +- outb(0, EDLC_RMASK); /* Disable all Rcv interrupt */ +- outb(0xFF, EDLC_XCLR); /* Clear all pending Xmt interrupts */ +- outb(0xFF, EDLC_RCLR); /* Clear all pending Rcv interrupts */ +- outb(XMD_LBC, EDLC_XMODE); /* Only loopback xmits */ +- /* Set the station address */ +- for(i = 0; i < ETH_ALEN; i++) +- outb(nic->node_addr[i], EDLC_ADDR + i); +- outb(XMD_IG_PAR | XMD_T_MODE | XMD_LBC, EDLC_XMODE); +- /* Normal packet xmit mode */ +- outb(RMD_BROADCAST, EDLC_RMODE); +- /* Receive broadcast and normal packets */ +- reset_receiver(); +- outb(0x00, EDLC_RESET); /* Un-reset the ni5010 */ +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int ni5010_poll(struct nic *nic) +-{ +- int rcv_stat; +- +- if (((rcv_stat = inb(EDLC_RSTAT)) & RS_VALID_BITS) != RS_PKT_OK) { +- outb(rcv_stat, EDLC_RSTAT); /* Clear the status */ +- return (0); +- } +- outb(rcv_stat, EDLC_RCLR); /* Clear the status */ +- nic->packetlen = inw(IE_RCNT); +- /* Read packet into buffer */ +- outb(MM_MUX, IE_MMODE); /* Rcv buffer to system bus */ +- outw(0, IE_GP); /* Seek to beginning of packet */ +- insb(IE_RBUF, nic->packet, nic->packetlen); +- return (1); +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void ni5010_transmit(struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- unsigned int len; +- int buf_offs, xmt_stat; +- unsigned long time; +- +- len = s + ETH_HLEN; +- if (len < ETH_ZLEN) +- len = ETH_ZLEN; +- buf_offs = NI5010_BUFSIZE - len; +- outb(0, EDLC_RMASK); /* Mask all receive interrupts */ +- outb(0, IE_MMODE); /* Put Xmit buffer on system bus */ +- outb(0xFF, EDLC_RCLR); /* Clear out pending rcv interrupts */ +- outw(buf_offs, IE_GP); /* Point GP at start of packet */ +- outsb(IE_XBUF, d, ETH_ALEN); /* Put dst in buffer */ +- outsb(IE_XBUF, nic->node_addr, ETH_ALEN);/* Put src in buffer */ +- outb(t >> 8, IE_XBUF); +- outb(t, IE_XBUF); +- outsb(IE_XBUF, p, s); /* Put data in buffer */ +- while (s++ < ETH_ZLEN - ETH_HLEN) /* Pad to min size */ +- outb(0, IE_XBUF); +- outw(buf_offs, IE_GP); /* Rewrite where packet starts */ +- /* should work without that outb() (Crynwr used it) */ +- /*outb(MM_MUX, IE_MMODE);*/ +- /* Xmt buffer to EDLC bus */ +- outb(MM_EN_XMT | MM_MUX, IE_MMODE); /* Begin transmission */ +- /* wait for transmit complete */ +- while (((xmt_stat = inb(IE_ISTAT)) & IS_EN_XMT) != 0) +- ; +- reset_receiver(); /* Immediately switch to receive */ +-} +- +-/************************************************************************** +-DISABLE - Turn off ethernet interface +-***************************************************************************/ +-static void ni5010_disable(struct nic *nic) +-{ +- outb(0, IE_MMODE); +- outb(RS_RESET, EDLC_RESET); +-} +- +-static inline int rd_port(void) +-{ +- inb(IE_RBUF); +- return inb(IE_SAPROM); +-} +- +-static int ni5010_probe1(struct nic *nic) +-{ +- int i, boguscount = 40, data; +- +- /* The tests are from the Linux NI5010 driver +- I don't understand it all, but if it works for them... */ +- if (inb(ioaddr) == 0xFF) +- return (0); +- while ((rd_port() & rd_port() & rd_port() +- & rd_port() & rd_port() & rd_port()) != 0xFF) +- { +- if (boguscount-- <= 0) +- return (0); +- } +- for (i = 0; i < 32; i++) +- if ((data = rd_port()) != 0xFF) +- break; +- if (data == 0xFF) +- return (0); +- if (data == SA_ADDR0 && rd_port() == SA_ADDR1 && rd_port() == SA_ADDR2) { +- for (i = 0; i < 4; i++) +- rd_port(); +- if (rd_port() != NI5010_MAGICVAL1 || rd_port() != NI5010_MAGICVAL2) +- return (0); +- } else +- return (0); +- for (i = 0; i < ETH_ALEN; i++) { +- outw(i, IE_GP); +- nic->node_addr[i] = inb(IE_SAPROM); +- } +- printf("\nNI5010 ioaddr %#hX, addr %!\n", ioaddr, nic->node_addr); +-/* get the size of the onboard receive buffer +- * higher addresses than bufsize are wrapped into real buffer +- * i.e. data for offs. 0x801 is written to 0x1 with a 2K onboard buffer +- */ +- if (bufsize_rcv == 0) { +- outb(1, IE_MMODE); /* Put Rcv buffer on system bus */ +- outw(0, IE_GP); /* Point GP at start of packet */ +- outb(0, IE_RBUF); /* set buffer byte 0 to 0 */ +- for (i = 1; i < 0xFF; i++) { +- outw(i << 8, IE_GP); /* Point GP at packet size to be tested */ +- outb(i, IE_RBUF); +- outw(0x0, IE_GP); /* Point GP at start of packet */ +- data = inb(IE_RBUF); +- if (data == i) break; +- } +- bufsize_rcv = i << 8; +- outw(0, IE_GP); /* Point GP at start of packet */ +- outb(0, IE_RBUF); /* set buffer byte 0 to 0 again */ +- } +- printf("Bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE); +- return (1); +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +-struct nic *ni5010_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- static unsigned short io_addrs[] = { +- 0x300, 0x320, 0x340, 0x360, 0x380, 0x3a0, 0 }; +- unsigned short *p; +- +- /* if probe_addrs is 0, then use list above */ +- if (probe_addrs == 0 || *probe_addrs == 0) +- probe_addrs = io_addrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; p++) { +- if (ni5010_probe1(nic)) +- break; +- } +- if (ioaddr == 0) +- return (0); +- ni5010_reset(nic); +- /* point to NIC specific routines */ +- nic->reset = ni5010_reset; +- nic->poll = ni5010_poll; +- nic->transmit = ni5010_transmit; +- nic->disable = ni5010_disable; +- return (nic); +-} +Index: b/netboot/nic.c +=================================================================== +--- /dev/null ++++ b/netboot/nic.c +@@ -0,0 +1,1198 @@ ++/************************************************************************** ++Etherboot - Network Bootstrap Program ++ ++Literature dealing with the network protocols: ++ ARP - RFC826 ++ RARP - RFC903 ++ IP - RFC791 ++ UDP - RFC768 ++ BOOTP - RFC951, RFC2132 (vendor extensions) ++ DHCP - RFC2131, RFC2132 (options) ++ TFTP - RFC1350, RFC2347 (options), RFC2348 (blocksize), RFC2349 (tsize) ++ RPC - RFC1831, RFC1832 (XDR), RFC1833 (rpcbind/portmapper) ++ NFS - RFC1094, RFC1813 (v3, useful for clarifications, not implemented) ++ IGMP - RFC1112, RFC2113, RFC2365, RFC2236, RFC3171 ++ ++**************************************************************************/ ++#include "etherboot.h" ++#include "grub.h" ++#include "nic.h" ++#include "elf.h" /* FOR EM_CURRENT */ ++#include "bootp.h" ++#include "if_arp.h" ++#include "tftp.h" ++#include "timer.h" ++#include "ip.h" ++#include "udp.h" ++ ++/* Currently no other module uses rom, but it is available */ ++struct rom_info rom; ++struct arptable_t arptable[MAX_ARP]; ++#if MULTICAST_LEVEL2 ++unsigned long last_igmpv1 = 0; ++struct igmptable_t igmptable[MAX_IGMP]; ++#endif ++static unsigned long netmask; ++/* Used by nfs.c */ ++char *hostname = ""; ++int hostnamelen = 0; ++static uint32_t xid; ++static unsigned char *end_of_rfc1533 = NULL; ++static const unsigned char broadcast[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; ++static const in_addr zeroIP = { 0L }; ++static char rfc1533_venddata[MAX_RFC1533_VENDLEN]; ++static unsigned char rfc1533_cookie[4] = { RFC1533_COOKIE }; ++static unsigned char rfc1533_cookie_bootp[5] = { RFC1533_COOKIE, RFC1533_END }; ++static unsigned char rfc1533_cookie_dhcp[] = { RFC1533_COOKIE }; ++static int dhcp_reply; ++static in_addr dhcp_server = { 0L }; ++static in_addr dhcp_addr = { 0L }; ++ ++static const unsigned char dhcpdiscover[] = { ++ RFC2132_MSG_TYPE, 1, DHCPDISCOVER, ++ RFC2132_MAX_SIZE, 2, /* request as much as we can */ ++ ETH_MAX_MTU / 256, ETH_MAX_MTU % 256, ++ /* Vendor class identifier */ ++ RFC2132_VENDOR_CLASS_ID, 10, 'G', 'R', 'U', 'B', 'C', 'l', 'i', 'e', 'n', 't', ++ RFC2132_PARAM_LIST, 4, RFC1533_NETMASK, RFC1533_GATEWAY, ++ RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH, RFC1533_END ++}; ++static const unsigned char dhcprequest [] = { ++ RFC2132_MSG_TYPE,1,DHCPREQUEST, ++ RFC2132_SRV_ID,4,0,0,0,0, ++ RFC2132_REQ_ADDR,4,0,0,0,0, ++ RFC2132_MAX_SIZE,2, /* request as much as we can */ ++ ETH_MAX_MTU / 256, ETH_MAX_MTU % 256, ++ /* Vendor class identifier */ ++ RFC2132_VENDOR_CLASS_ID, 10, 'G', 'R', 'U', 'B', 'C', 'l', 'i', 'e', 'n', 't', ++ RFC2132_PARAM_LIST, ++ /* 4 standard + 2 vendortags */ ++ 4 + 2, ++ /* Standard parameters */ ++ RFC1533_NETMASK, RFC1533_GATEWAY, ++ RFC1533_HOSTNAME, RFC1533_EXTENSIONPATH, ++ /* Etherboot vendortags */ ++ RFC1533_VENDOR_MAGIC, ++ RFC1533_VENDOR_CONFIGFILE, ++ RFC1533_END ++}; ++ ++/* See nic.h */ ++int user_abort = 0; ++int network_ready = 0; ++ ++#ifdef REQUIRE_VCI_ETHERBOOT ++int vci_etherboot; ++#endif ++ ++static int dummy(void *unused __unused) ++{ ++ return (0); ++} ++ ++/* Careful. We need an aligned buffer to avoid problems on machines ++ * that care about alignment. To trivally align the ethernet data ++ * (the ip hdr and arp requests) we offset the packet by 2 bytes. ++ * leaving the ethernet data 16 byte aligned. Beyond this ++ * we use memmove but this makes the common cast simple and fast. ++ */ ++static char packet[ETH_FRAME_LEN + ETH_DATA_ALIGN] __aligned; ++ ++struct nic nic = ++{ ++ { ++ 0, /* dev.disable */ ++ { ++ 0, ++ 0, ++ PCI_BUS_TYPE, ++ }, /* dev.devid */ ++ 0, /* index */ ++ 0, /* type */ ++ PROBE_FIRST, /* how_pobe */ ++ PROBE_NONE, /* to_probe */ ++ 0, /* failsafe */ ++ 0, /* type_index */ ++ {}, /* state */ ++ }, ++ (int (*)(struct nic *, int))dummy, /* poll */ ++ (void (*)(struct nic *, const char *, ++ unsigned int, unsigned int, ++ const char *))dummy, /* transmit */ ++ (void (*)(struct nic *, irq_action_t))dummy, /* irq */ ++ 0, /* flags */ ++ &rom, /* rom_info */ ++ arptable[ARP_CLIENT].node, /* node_addr */ ++ packet + ETH_DATA_ALIGN, /* packet */ ++ 0, /* packetlen */ ++ 0, /* ioaddr */ ++ 0, /* irqno */ ++ NULL, /* priv_data */ ++}; ++ ++ ++ ++int grub_eth_probe(void) ++{ ++ static int probed = 0; ++ struct dev *dev; ++ ++ EnterFunction("grub_eth_probe"); ++ ++ if (probed) ++ return 1; ++ ++ network_ready = 0; ++ grub_memset((char *)arptable, 0, MAX_ARP * sizeof(struct arptable_t)); ++ dev = &nic.dev; ++ dev->how_probe = -1; ++ dev->type = NIC_DRIVER; ++ dev->failsafe = 1; ++ rom = *((struct rom_info *)ROM_INFO_LOCATION); ++ ++ probed = (eth_probe(dev) == PROBE_WORKED); ++ ++ LeaveFunction("grub_eth_probe"); ++ return probed; ++} ++ ++int eth_probe(struct dev *dev) ++{ ++ return probe(dev); ++} ++ ++int eth_poll(int retrieve) ++{ ++ return ((*nic.poll)(&nic, retrieve)); ++} ++ ++void eth_transmit(const char *d, unsigned int t, unsigned int s, const void *p) ++{ ++ (*nic.transmit)(&nic, d, t, s, p); ++ if (t == IP) twiddle(); ++} ++ ++void eth_disable(void) ++{ ++#ifdef MULTICAST_LEVEL2 ++ int i; ++ for(i = 0; i < MAX_IGMP; i++) { ++ leave_group(i); ++ } ++#endif ++ disable(&nic.dev); ++} ++ ++void eth_irq (irq_action_t action) ++{ ++ (*nic.irq)(&nic,action); ++} ++ ++/************************************************************************** ++IPCHKSUM - Checksum IP Header ++**************************************************************************/ ++uint16_t ipchksum(const void *data, unsigned long length) ++{ ++ unsigned long sum; ++ unsigned long i; ++ const uint8_t *ptr; ++ ++ /* In the most straight forward way possible, ++ * compute an ip style checksum. ++ */ ++ sum = 0; ++ ptr = data; ++ for(i = 0; i < length; i++) { ++ unsigned long value; ++ value = ptr[i]; ++ if (i & 1) { ++ value <<= 8; ++ } ++ /* Add the new value */ ++ sum += value; ++ /* Wrap around the carry */ ++ if (sum > 0xFFFF) { ++ sum = (sum + (sum >> 16)) & 0xFFFF; ++ } ++ } ++ return (~cpu_to_le16(sum)) & 0xFFFF; ++} ++ ++uint16_t add_ipchksums(unsigned long offset, uint16_t sum, uint16_t new) ++{ ++ unsigned long checksum; ++ sum = ~sum & 0xFFFF; ++ new = ~new & 0xFFFF; ++ if (offset & 1) { ++ /* byte swap the sum if it came from an odd offset ++ * since the computation is endian independant this ++ * works. ++ */ ++ new = bswap_16(new); ++ } ++ checksum = sum + new; ++ if (checksum > 0xFFFF) { ++ checksum -= 0xFFFF; ++ } ++ return (~checksum) & 0xFFFF; ++} ++ ++/************************************************************************** ++DEFAULT_NETMASK - Return default netmask for IP address ++**************************************************************************/ ++static inline unsigned long default_netmask(void) ++{ ++ int net = ntohl(arptable[ARP_CLIENT].ipaddr.s_addr) >> 24; ++ if (net <= 127) ++ return(htonl(0xff000000)); ++ else if (net < 192) ++ return(htonl(0xffff0000)); ++ else ++ return(htonl(0xffffff00)); ++} ++ ++/************************************************************************** ++IP_TRANSMIT - Send an IP datagram ++**************************************************************************/ ++static int await_arp(int ival, void *ptr, ++ unsigned short ptype, struct iphdr *ip __unused, struct udphdr *udp __unused) ++{ ++ struct arprequest *arpreply; ++ if (ptype != ARP) ++ return 0; ++ if (nic.packetlen < ETH_HLEN + sizeof(struct arprequest)) ++ return 0; ++ arpreply = (struct arprequest *)&nic.packet[ETH_HLEN]; ++ ++ if (arpreply->opcode != htons(ARP_REPLY)) ++ return 0; ++ if (memcmp(arpreply->sipaddr, ptr, sizeof(in_addr)) != 0) ++ return 0; ++ memcpy(arptable[ival].node, arpreply->shwaddr, ETH_ALEN); ++ return 1; ++} ++ ++int ip_transmit(int len, const void *buf) ++{ ++ unsigned long destip; ++ struct iphdr *ip; ++ struct arprequest arpreq; ++ int arpentry, i; ++ int retry; ++ ++ ip = (struct iphdr *)buf; ++ destip = ip->dest.s_addr; ++ if (destip == IP_BROADCAST) { ++ eth_transmit(broadcast, IP, len, buf); ++#ifdef MULTICAST_LEVEL1 ++ } else if ((destip & htonl(MULTICAST_MASK)) == htonl(MULTICAST_NETWORK)) { ++ unsigned char multicast[6]; ++ unsigned long hdestip; ++ hdestip = ntohl(destip); ++ multicast[0] = 0x01; ++ multicast[1] = 0x00; ++ multicast[2] = 0x5e; ++ multicast[3] = (hdestip >> 16) & 0x7; ++ multicast[4] = (hdestip >> 8) & 0xff; ++ multicast[5] = hdestip & 0xff; ++ eth_transmit(multicast, IP, len, buf); ++#endif ++ } else { ++ if (((destip & netmask) != ++ (arptable[ARP_CLIENT].ipaddr.s_addr & netmask)) && ++ arptable[ARP_GATEWAY].ipaddr.s_addr) ++ destip = arptable[ARP_GATEWAY].ipaddr.s_addr; ++ for(arpentry = 0; arpentryverhdrlen = 0x45; ++ ip->verhdrlen += (option_len/4); ++ ip->service = 0; ++ ip->len = htons(len); ++ ip->ident = 0; ++ ip->frags = 0; /* Should we set don't fragment? */ ++ ip->ttl = ttl; ++ ip->protocol = protocol; ++ ip->chksum = 0; ++ ip->src.s_addr = arptable[ARP_CLIENT].ipaddr.s_addr; ++ ip->dest.s_addr = destip; ++ ip->chksum = ipchksum(buf, sizeof(struct iphdr) + option_len); ++} ++ ++static uint16_t udpchksum(struct iphdr *ip, struct udphdr *udp) ++{ ++ struct udp_pseudo_hdr pseudo; ++ uint16_t checksum; ++ ++ /* Compute the pseudo header */ ++ pseudo.src.s_addr = ip->src.s_addr; ++ pseudo.dest.s_addr = ip->dest.s_addr; ++ pseudo.unused = 0; ++ pseudo.protocol = IP_UDP; ++ pseudo.len = udp->len; ++ ++ /* Sum the pseudo header */ ++ checksum = ipchksum(&pseudo, 12); ++ ++ /* Sum the rest of the udp packet */ ++ checksum = add_ipchksums(12, checksum, ipchksum(udp, ntohs(udp->len))); ++ return checksum; ++} ++ ++ ++void build_udp_hdr(unsigned long destip, ++ unsigned int srcsock, unsigned int destsock, int ttl, ++ int len, const void *buf) ++{ ++ struct iphdr *ip; ++ struct udphdr *udp; ++ ip = (struct iphdr *)buf; ++ build_ip_hdr(destip, ttl, IP_UDP, 0, len, buf); ++ udp = (struct udphdr *)((char *)buf + sizeof(struct iphdr)); ++ udp->src = htons(srcsock); ++ udp->dest = htons(destsock); ++ udp->len = htons(len - sizeof(struct iphdr)); ++ udp->chksum = 0; ++ if ((udp->chksum = udpchksum(ip, udp)) == 0) ++ udp->chksum = 0xffff; ++} ++ ++ ++/************************************************************************** ++UDP_TRANSMIT - Send an UDP datagram ++**************************************************************************/ ++int udp_transmit(unsigned long destip, unsigned int srcsock, ++ unsigned int destsock, int len, const void *buf) ++{ ++ build_udp_hdr(destip, srcsock, destsock, 60, len, buf); ++ return ip_transmit(len, buf); ++} ++ ++/************************************************************************** ++QDRAIN - clear the nic's receive queue ++**************************************************************************/ ++static int await_qdrain(int ival __unused, void *ptr __unused, ++ unsigned short ptype __unused, ++ struct iphdr *ip __unused, struct udphdr *udp __unused) ++{ ++ return 0; ++} ++ ++void rx_qdrain(void) ++{ ++ /* Clear out the Rx queue first. It contains nothing of interest, ++ * except possibly ARP requests from the DHCP/TFTP server. We use ++ * polling throughout Etherboot, so some time may have passed since we ++ * last polled the receive queue, which may now be filled with ++ * broadcast packets. This will cause the reply to the packets we are ++ * about to send to be lost immediately. Not very clever. */ ++ await_reply(await_qdrain, 0, NULL, 0); ++} ++ ++/** ++ * rarp ++ * ++ * Get IP address by rarp. Just copy from etherboot ++ **/ ++static int await_rarp(int ival, void *ptr, unsigned short ptype, ++ struct iphdr *ip, struct udphdr *udp) ++{ ++ struct arprequest *arpreply; ++ if (ptype != RARP) ++ return 0; ++ if (nic.packetlen < ETH_HLEN + sizeof(struct arprequest)) ++ return 0; ++ arpreply = (struct arprequest *)&nic.packet[ETH_HLEN]; ++ if (arpreply->opcode != htons(RARP_REPLY)) ++ return 0; ++ if (memcmp(arpreply->thwaddr, ptr, ETH_ALEN) == 0){ ++ memcpy(arptable[ARP_SERVER].node, arpreply->shwaddr, ETH_ALEN); ++ memcpy(&arptable[ARP_SERVER].ipaddr, arpreply->sipaddr, sizeof(in_addr)); ++ memcpy(&arptable[ARP_CLIENT].ipaddr, arpreply->tipaddr, sizeof(in_addr)); ++ return 1; ++ } ++ return 0; ++} ++ ++int rarp(void) ++{ ++ int retry; ++ ++ /* arp and rarp requests share the same packet structure. */ ++ struct arprequest rarpreq; ++ ++ if(!grub_eth_probe()) ++ return 0; ++ network_ready = 0; ++ ++ memset(&rarpreq, 0, sizeof(rarpreq)); ++ ++ rarpreq.hwtype = htons(1); ++ rarpreq.protocol = htons(IP); ++ rarpreq.hwlen = ETH_ALEN; ++ rarpreq.protolen = 4; ++ rarpreq.opcode = htons(RARP_REQUEST); ++ memcpy(&rarpreq.shwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); ++ /* sipaddr is already zeroed out */ ++ memcpy(&rarpreq.thwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); ++ /* tipaddr is already zeroed out */ ++ ++ for (retry = 0; retry < MAX_ARP_RETRIES; ++retry) { ++ long timeout; ++ eth_transmit(broadcast, RARP, sizeof(rarpreq), &rarpreq); ++ ++ timeout = rfc2131_sleep_interval(TIMEOUT, retry); ++ if (await_reply(await_rarp, 0, rarpreq.shwaddr, timeout)) ++ break; ++ if (user_abort) ++ return 0; ++ } ++ ++ if (retry < MAX_ARP_RETRIES) { ++ network_ready = 1; ++ return (1); ++ } ++ return (0); ++} ++ ++/** ++ * bootp ++ * ++ * Get IP address by bootp, segregate from bootp in etherboot. ++ **/ ++static int await_bootp(int ival __unused, void *ptr __unused, ++ unsigned short ptype __unused, struct iphdr *ip __unused, ++ struct udphdr *udp) ++{ ++ struct bootp_t *bootpreply; ++ int len; /* Length of vendor */ ++ ++ if (!udp) { ++ return 0; ++ } ++ bootpreply = (struct bootp_t *) ++ &nic.packet[ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr)]; ++ len = nic.packetlen - (ETH_HLEN + sizeof(struct iphdr) + ++ sizeof(struct udphdr) + sizeof(struct bootp_t) - BOOTP_VENDOR_LEN); ++ if (len < 0) { ++ return 0; ++ } ++ if (udp->dest != htons(BOOTP_CLIENT)) ++ return 0; ++ if (bootpreply->bp_op != BOOTP_REPLY) ++ return 0; ++ if (bootpreply->bp_xid != xid) ++ return 0; ++ if (memcmp((char *)&bootpreply->bp_siaddr, (char *)&zeroIP, sizeof(in_addr)) == 0) ++ return 0; ++ if ((memcmp(broadcast, bootpreply->bp_hwaddr, ETH_ALEN) != 0) && ++ (memcmp(arptable[ARP_CLIENT].node, bootpreply->bp_hwaddr, ETH_ALEN) != 0)) { ++ return 0; ++ } ++ arptable[ARP_CLIENT].ipaddr.s_addr = bootpreply->bp_yiaddr.s_addr; ++ netmask = default_netmask(); ++ arptable[ARP_SERVER].ipaddr.s_addr = bootpreply->bp_siaddr.s_addr; ++ memset(arptable[ARP_SERVER].node, 0, ETH_ALEN); /* Kill arp */ ++ arptable[ARP_GATEWAY].ipaddr.s_addr = bootpreply->bp_giaddr.s_addr; ++ memset(arptable[ARP_GATEWAY].node, 0, ETH_ALEN); /* Kill arp */ ++ /* We don't care bootpreply->bp_file, it must be 'pxegrub':-) */ ++ memcpy((char *)rfc1533_venddata, (char *)(bootpreply->bp_vend), len); ++ decode_rfc1533(rfc1533_venddata, 0, len, 1); ++ return(1); ++} ++ ++int bootp(void) ++{ ++ int retry; ++ struct bootpip_t ip; ++ unsigned long starttime; ++ ++ EnterFunction("bootp"); ++ ++ if(!grub_eth_probe()) ++ return 0; ++ network_ready = 0; ++ ++ memset(&ip, 0, sizeof(struct bootpip_t)); ++ ip.bp.bp_op = BOOTP_REQUEST; ++ ip.bp.bp_htype = 1; ++ ip.bp.bp_hlen = ETH_ALEN; ++ starttime = currticks(); ++ /* Use lower 32 bits of node address, more likely to be ++ distinct than the time since booting */ ++ memcpy(&xid, &arptable[ARP_CLIENT].node[2], sizeof(xid)); ++ ip.bp.bp_xid = xid += htonl(starttime); ++ /* bp_secs defaults to zero */ ++ memcpy(ip.bp.bp_hwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); ++ memcpy(ip.bp.bp_vend, rfc1533_cookie_bootp, sizeof(rfc1533_cookie_bootp)); /* request RFC-style options */ ++ ++ for (retry = 0; retry < MAX_BOOTP_RETRIES; ) { ++ long timeout; ++ ++ rx_qdrain(); ++ ++ udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER, ++ sizeof(struct bootpip_t), &ip); ++ timeout = rfc2131_sleep_interval(TIMEOUT, retry++); ++ if (await_reply(await_bootp, 0, NULL, timeout)){ ++ network_ready = 1; ++ return(1); ++ } ++ if (user_abort) ++ return 0; ++ ip.bp.bp_secs = htons((currticks()-starttime)/TICKS_PER_SEC); ++ } ++ return(0); ++} ++ ++/** ++ * dhcp ++ * ++ * Get IP address by dhcp, segregate from bootp in etherboot. ++ **/ ++static int await_dhcp(int ival __unused, void *ptr __unused, ++ unsigned short ptype __unused, struct iphdr *ip __unused, ++ struct udphdr *udp) ++{ ++ struct dhcp_t *dhcpreply; ++ int len; ++ ++ if (!udp) { ++ return 0; ++ } ++ dhcpreply = (struct dhcp_t *) ++ &nic.packet[ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr)]; ++ len = nic.packetlen - (ETH_HLEN + sizeof(struct iphdr) + ++ sizeof(struct udphdr) + sizeof(struct dhcp_t) - DHCP_OPT_LEN); ++ if (len < 0){ ++ return 0; ++ } ++ if (udp->dest != htons(BOOTP_CLIENT)) ++ return 0; ++ if (dhcpreply->bp_op != BOOTP_REPLY) ++ return 0; ++ if (dhcpreply->bp_xid != xid) ++ return 0; ++ if (memcmp((char *)&dhcpreply->bp_siaddr, (char *)&zeroIP, sizeof(in_addr)) == 0) ++ return 0; ++ if ((memcmp(broadcast, dhcpreply->bp_hwaddr, ETH_ALEN) != 0) && ++ (memcmp(arptable[ARP_CLIENT].node, dhcpreply->bp_hwaddr, ETH_ALEN) != 0)) { ++ return 0; ++ } ++ arptable[ARP_CLIENT].ipaddr.s_addr = dhcpreply->bp_yiaddr.s_addr; ++ dhcp_addr.s_addr = dhcpreply->bp_yiaddr.s_addr; ++ netmask = default_netmask(); ++ arptable[ARP_SERVER].ipaddr.s_addr = dhcpreply->bp_siaddr.s_addr; ++ memset(arptable[ARP_SERVER].node, 0, ETH_ALEN); /* Kill arp */ ++ arptable[ARP_GATEWAY].ipaddr.s_addr = dhcpreply->bp_giaddr.s_addr; ++ memset(arptable[ARP_GATEWAY].node, 0, ETH_ALEN); /* Kill arp */ ++ /* We don't care bootpreply->bp_file. It must be 'pxegrub' */ ++ memcpy((char *)rfc1533_venddata, (char *)(dhcpreply->bp_vend), len); ++ decode_rfc1533(rfc1533_venddata, 0, len, 1); ++ return(1); ++} ++ ++int dhcp(void) ++{ ++ int retry; ++ int reqretry; ++ struct dhcpip_t ip; ++ unsigned long starttime; ++ ++ if(!grub_eth_probe()) ++ return 0; ++ ++ network_ready = 0; ++ ++ memset(&ip, 0, sizeof(struct dhcpip_t)); ++ ip.bp.bp_op = BOOTP_REQUEST; ++ ip.bp.bp_htype = 1; ++ ip.bp.bp_hlen = ETH_ALEN; ++ starttime = currticks(); ++ /* Use lower 32 bits of node address, more likely to be ++ distinct than the time since booting */ ++ memcpy(&xid, &arptable[ARP_CLIENT].node[2], sizeof(xid)); ++ ip.bp.bp_xid = xid += htonl(starttime); ++ memcpy(ip.bp.bp_hwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); ++ memcpy(ip.bp.bp_vend, rfc1533_cookie_dhcp, sizeof rfc1533_cookie_dhcp); /* request RFC-style options */ ++ memcpy(ip.bp.bp_vend + sizeof rfc1533_cookie_dhcp, dhcpdiscover, sizeof dhcpdiscover); ++ ++ for (retry = 0; retry < MAX_BOOTP_RETRIES; ) { ++ long timeout; ++ ++ rx_qdrain(); ++ ++ udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER, ++ sizeof(struct bootpip_t), &ip); ++ timeout = rfc2131_sleep_interval(TIMEOUT, retry++); ++ if (await_reply(await_dhcp, 0, NULL, timeout)) { ++ /* If not a DHCPOFFER then must be just a ++ BOOTP reply, be backward compatible with ++ BOOTP then. Jscott report a bug here, but I ++ don't know how it happened */ ++ if (dhcp_reply != DHCPOFFER){ ++ network_ready = 1; ++ return(1); ++ } ++ dhcp_reply = 0; ++ memcpy(ip.bp.bp_vend, rfc1533_cookie_dhcp, sizeof rfc1533_cookie_dhcp); ++ memcpy(ip.bp.bp_vend + sizeof rfc1533_cookie_dhcp, dhcprequest, sizeof dhcprequest); ++ /* Beware: the magic numbers 9 and 15 depend on ++ the layout of dhcprequest */ ++ memcpy(&ip.bp.bp_vend[9], &dhcp_server, sizeof(in_addr)); ++ memcpy(&ip.bp.bp_vend[15], &dhcp_addr, sizeof(in_addr)); ++ for (reqretry = 0; reqretry < MAX_BOOTP_RETRIES; ) { ++ udp_transmit(IP_BROADCAST, BOOTP_CLIENT, BOOTP_SERVER, ++ sizeof(struct bootpip_t), &ip); ++ dhcp_reply=0; ++ timeout = rfc2131_sleep_interval(TIMEOUT, reqretry++); ++ if (await_reply(await_dhcp, 0, NULL, timeout)) ++ if (dhcp_reply == DHCPACK){ ++ network_ready = 1; ++ return(1); ++ } ++ if (user_abort) ++ return 0; ++ } ++ } ++ if (user_abort) ++ return 0; ++ ip.bp.bp_secs = htons((currticks()-starttime)/TICKS_PER_SEC); ++ } ++ return(0); ++} ++ ++#ifdef MULTICAST_LEVEL2 ++static void send_igmp_reports(unsigned long now) ++{ ++ int i; ++ for(i = 0; i < MAX_IGMP; i++) { ++ if (igmptable[i].time && (now >= igmptable[i].time)) { ++ struct igmp_ip_t igmp; ++ igmp.router_alert[0] = 0x94; ++ igmp.router_alert[1] = 0x04; ++ igmp.router_alert[2] = 0; ++ igmp.router_alert[3] = 0; ++ build_ip_hdr(igmptable[i].group.s_addr, ++ 1, IP_IGMP, sizeof(igmp.router_alert), sizeof(igmp), &igmp); ++ igmp.igmp.type = IGMPv2_REPORT; ++ if (last_igmpv1 && ++ (now < last_igmpv1 + IGMPv1_ROUTER_PRESENT_TIMEOUT)) { ++ igmp.igmp.type = IGMPv1_REPORT; ++ } ++ igmp.igmp.response_time = 0; ++ igmp.igmp.chksum = 0; ++ igmp.igmp.group.s_addr = igmptable[i].group.s_addr; ++ igmp.igmp.chksum = ipchksum(&igmp.igmp, sizeof(igmp.igmp)); ++ ip_transmit(sizeof(igmp), &igmp); ++#ifdef MDEBUG ++ printf("Sent IGMP report to: %@\n", igmp.igmp.group.s_addr); ++#endif ++ /* Don't send another igmp report until asked */ ++ igmptable[i].time = 0; ++ } ++ } ++} ++ ++static void process_igmp(struct iphdr *ip, unsigned long now) ++{ ++ struct igmp *igmp; ++ int i; ++ unsigned iplen = 0; ++ if (!ip || (ip->protocol == IP_IGMP) || ++ (nic.packetlen < sizeof(struct iphdr) + sizeof(struct igmp))) { ++ return; ++ } ++ iplen = (ip->verhdrlen & 0xf)*4; ++ igmp = (struct igmp *)&nic.packet[sizeof(struct iphdr)]; ++ if (ipchksum(igmp, ntohs(ip->len) - iplen) != 0) ++ return; ++ if ((igmp->type == IGMP_QUERY) && ++ (ip->dest.s_addr == htonl(GROUP_ALL_HOSTS))) { ++ unsigned long interval = IGMP_INTERVAL; ++ if (igmp->response_time == 0) { ++ last_igmpv1 = now; ++ } else { ++ interval = (igmp->response_time * TICKS_PER_SEC)/10; ++ } ++ ++#ifdef MDEBUG ++ printf("Received IGMP query for: %@\n", igmp->group.s_addr); ++#endif ++ for(i = 0; i < MAX_IGMP; i++) { ++ uint32_t group = igmptable[i].group.s_addr; ++ if ((group == 0) || (group == igmp->group.s_addr)) { ++ unsigned long time; ++ time = currticks() + rfc1112_sleep_interval(interval, 0); ++ if (time < igmptable[i].time) { ++ igmptable[i].time = time; ++ } ++ } ++ } ++ } ++ if (((igmp->type == IGMPv1_REPORT) || (igmp->type == IGMPv2_REPORT)) && ++ (ip->dest.s_addr == igmp->group.s_addr)) { ++#ifdef MDEBUG ++ printf("Received IGMP report for: %@\n", igmp->group.s_addr); ++#endif ++ for(i = 0; i < MAX_IGMP; i++) { ++ if ((igmptable[i].group.s_addr == igmp->group.s_addr) && ++ igmptable[i].time != 0) { ++ igmptable[i].time = 0; ++ } ++ } ++ } ++} ++ ++void leave_group(int slot) ++{ ++ /* Be very stupid and always send a leave group message if ++ * I have subscribed. Imperfect but it is standards ++ * compliant, easy and reliable to implement. ++ * ++ * The optimal group leave method is to only send leave when, ++ * we were the last host to respond to a query on this group, ++ * and igmpv1 compatibility is not enabled. ++ */ ++ if (igmptable[slot].group.s_addr) { ++ struct igmp_ip_t igmp; ++ igmp.router_alert[0] = 0x94; ++ igmp.router_alert[1] = 0x04; ++ igmp.router_alert[2] = 0; ++ igmp.router_alert[3] = 0; ++ build_ip_hdr(htonl(GROUP_ALL_HOSTS), ++ 1, IP_IGMP, sizeof(igmp.router_alert), sizeof(igmp), &igmp); ++ igmp.igmp.type = IGMP_LEAVE; ++ igmp.igmp.response_time = 0; ++ igmp.igmp.chksum = 0; ++ igmp.igmp.group.s_addr = igmptable[slot].group.s_addr; ++ igmp.igmp.chksum = ipchksum(&igmp.igmp, sizeof(igmp)); ++ ip_transmit(sizeof(igmp), &igmp); ++#ifdef MDEBUG ++ printf("Sent IGMP leave for: %@\n", igmp.igmp.group.s_addr); ++#endif ++ } ++ memset(&igmptable[slot], 0, sizeof(igmptable[0])); ++} ++ ++void join_group(int slot, unsigned long group) ++{ ++ /* I have already joined */ ++ if (igmptable[slot].group.s_addr == group) ++ return; ++ if (igmptable[slot].group.s_addr) { ++ leave_group(slot); ++ } ++ /* Only join a group if we are given a multicast ip, this way ++ * code can be given a non-multicast (broadcast or unicast ip) ++ * and still work... ++ */ ++ if ((group & htonl(MULTICAST_MASK)) == htonl(MULTICAST_NETWORK)) { ++ igmptable[slot].group.s_addr = group; ++ igmptable[slot].time = currticks(); ++ } ++} ++#else ++#define send_igmp_reports(now); ++#define process_igmp(ip, now) ++#endif ++ ++/************************************************************************** ++AWAIT_REPLY - Wait until we get a response for our request ++************f**************************************************************/ ++int await_reply(reply_t reply, int ival, void *ptr, long timeout) ++{ ++ unsigned long time, now; ++ struct iphdr *ip; ++ unsigned iplen = 0; ++ struct udphdr *udp; ++ unsigned short ptype; ++ int result; ++ ++ user_abort = 0; ++ ++ time = timeout + currticks(); ++ /* The timeout check is done below. The timeout is only checked if ++ * there is no packet in the Rx queue. This assumes that eth_poll() ++ * needs a negligible amount of time. ++ */ ++ for (;;) { ++ now = currticks(); ++ send_igmp_reports(now); ++ result = eth_poll(1); ++ if (result == 0) { ++ /* We don't have anything */ ++ ++ /* Check for abort key only if the Rx queue is empty - ++ * as long as we have something to process, don't ++ * assume that something failed. It is unlikely that ++ * we have no processing time left between packets. */ ++ poll_interruptions(); ++ /* Do the timeout after at least a full queue walk. */ ++ if ((timeout == 0) || (currticks() > time) || user_abort == 1) { ++ break; ++ } ++ continue; ++ } ++ ++ /* We have something! */ ++ ++ /* Find the Ethernet packet type */ ++ if (nic.packetlen >= ETH_HLEN) { ++ ptype = ((unsigned short) nic.packet[12]) << 8 ++ | ((unsigned short) nic.packet[13]); ++ } else continue; /* what else could we do with it? */ ++ /* Verify an IP header */ ++ ip = 0; ++ if ((ptype == IP) && (nic.packetlen >= ETH_HLEN + sizeof(struct iphdr))) { ++ unsigned ipoptlen; ++ ip = (struct iphdr *)&nic.packet[ETH_HLEN]; ++ if ((ip->verhdrlen < 0x45) || (ip->verhdrlen > 0x4F)) ++ continue; ++ iplen = (ip->verhdrlen & 0xf) * 4; ++ if (ipchksum(ip, iplen) != 0) ++ continue; ++ if (ip->frags & htons(0x3FFF)) { ++ static int warned_fragmentation = 0; ++ if (!warned_fragmentation) { ++ printf("ALERT: got a fragmented packet - reconfigure your server\n"); ++ warned_fragmentation = 1; ++ } ++ continue; ++ } ++ if (ntohs(ip->len) > ETH_MAX_MTU) ++ continue; ++ ++ ipoptlen = iplen - sizeof(struct iphdr); ++ if (ipoptlen) { ++ /* Delete the ip options, to guarantee ++ * good alignment, and make etherboot simpler. ++ */ ++ memmove(&nic.packet[ETH_HLEN + sizeof(struct iphdr)], ++ &nic.packet[ETH_HLEN + iplen], ++ nic.packetlen - ipoptlen); ++ nic.packetlen -= ipoptlen; ++ } ++ } ++ udp = 0; ++ if (ip && (ip->protocol == IP_UDP) && ++ (nic.packetlen >= ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr))) { ++ udp = (struct udphdr *)&nic.packet[ETH_HLEN + sizeof(struct iphdr)]; ++ ++ /* Make certain we have a reasonable packet length */ ++ if (ntohs(udp->len) > (ntohs(ip->len) - iplen)) ++ continue; ++ ++ if (udp->chksum && udpchksum(ip, udp)) { ++ printf("UDP checksum error\n"); ++ continue; ++ } ++ } ++ result = reply(ival, ptr, ptype, ip, udp); ++ if (result > 0) { ++ return result; ++ } ++ ++ /* If it isn't a packet the upper layer wants see if there is a default ++ * action. This allows us reply to arp and igmp queryies. ++ */ ++ if ((ptype == ARP) && ++ (nic.packetlen >= ETH_HLEN + sizeof(struct arprequest))) { ++ struct arprequest *arpreply; ++ unsigned long tmp; ++ ++ arpreply = (struct arprequest *)&nic.packet[ETH_HLEN]; ++ memcpy(&tmp, arpreply->tipaddr, sizeof(in_addr)); ++ if ((arpreply->opcode == htons(ARP_REQUEST)) && ++ (tmp == arptable[ARP_CLIENT].ipaddr.s_addr)) { ++ arpreply->opcode = htons(ARP_REPLY); ++ memcpy(arpreply->tipaddr, arpreply->sipaddr, sizeof(in_addr)); ++ memcpy(arpreply->thwaddr, arpreply->shwaddr, ETH_ALEN); ++ memcpy(arpreply->sipaddr, &arptable[ARP_CLIENT].ipaddr, sizeof(in_addr)); ++ memcpy(arpreply->shwaddr, arptable[ARP_CLIENT].node, ETH_ALEN); ++ eth_transmit(arpreply->thwaddr, ARP, ++ sizeof(struct arprequest), ++ arpreply); ++#ifdef MDEBUG ++ memcpy(&tmp, arpreply->tipaddr, sizeof(in_addr)); ++ printf("Sent ARP reply to: %@\n",tmp); ++#endif /* MDEBUG */ ++ } ++ } ++ process_igmp(ip, now); ++ } ++ return(0); ++} ++ ++#ifdef REQUIRE_VCI_ETHERBOOT ++/************************************************************************** ++FIND_VCI_ETHERBOOT - Looks for "Etherboot" in Vendor Encapsulated Identifiers ++On entry p points to byte count of VCI options ++**************************************************************************/ ++static int find_vci_etherboot(unsigned char *p) ++{ ++ unsigned char *end = p + 1 + *p; ++ ++ for (p++; p < end; ) { ++ if (*p == RFC2132_VENDOR_CLASS_ID) { ++ if (strncmp("Etherboot", p + 2, sizeof("Etherboot") - 1) == 0) ++ return (1); ++ } else if (*p == RFC1533_END) ++ return (0); ++ p += TAG_LEN(p) + 2; ++ } ++ return (0); ++} ++#endif /* REQUIRE_VCI_ETHERBOOT */ ++ ++/** ++ * decode_rfc1533 ++ * ++ * Decodes RFC1533 header ++ **/ ++int decode_rfc1533(unsigned char *p, unsigned int block, unsigned int len, int eof) ++{ ++ static unsigned char *extdata = NULL, *extend = NULL; ++ unsigned char *extpath = NULL; ++ unsigned char *endp; ++ ++ if (block == 0) { ++ end_of_rfc1533 = NULL; ++ if (memcmp(p, rfc1533_cookie, sizeof(rfc1533_cookie))) ++ return(0); /* no RFC 1533 header found */ ++ p += 4; ++ endp = p + len; ++ } else { ++ if (block == 1) { ++ if (memcmp(p, rfc1533_cookie, sizeof(rfc1533_cookie))) ++ return(0); /* no RFC 1533 header found */ ++ p += 4; ++ len -= 4; } ++ if (extend + len <= (unsigned char *) ++ rfc1533_venddata + sizeof(rfc1533_venddata)) { ++ memcpy(extend, p, len); ++ extend += len; ++ } else { ++ printf("Overflow in vendor data buffer! Aborting...\n"); ++ *extdata = RFC1533_END; ++ return(0); ++ } ++ p = extdata; endp = extend; ++ } ++ if (!eof) ++ return 1; ++ while (p < endp) { ++ unsigned char c = *p; ++ if (c == RFC1533_PAD) { ++ p++; ++ continue; ++ } ++ else if (c == RFC1533_END) { ++ end_of_rfc1533 = endp = p; ++ continue; ++ } ++ else if (c == RFC1533_NETMASK) ++ memcpy(&netmask, p+2, sizeof(in_addr)); ++ else if (c == RFC1533_GATEWAY) { ++ /* This is a little simplistic, but it will ++ usually be sufficient. ++ Take only the first entry */ ++ if (TAG_LEN(p) >= sizeof(in_addr)) ++ memcpy(&arptable[ARP_GATEWAY].ipaddr, p+2, sizeof(in_addr)); ++ } ++ else if (c == RFC1533_EXTENSIONPATH) ++ extpath = p; ++ else if (c == RFC2132_MSG_TYPE) ++ dhcp_reply=*(p+2); ++ else if (c == RFC2132_SRV_ID) ++ memcpy(&dhcp_server, p+2, sizeof(in_addr)); ++ else if (c == RFC1533_HOSTNAME) { ++ hostname = p + 2; ++ hostnamelen = *(p + 1); ++ } ++ else if (c == RFC1533_VENDOR_CONFIGFILE){ ++ int l = TAG_LEN (p); ++ ++ /* Eliminate the trailing NULs according to RFC 2132. */ ++ while (*(p + 2 + l - 1) == '\000' && l > 0) ++ l--; ++ ++ /* XXX: Should check if LEN is less than the maximum length ++ of CONFIG_FILE. This kind of robustness will be a goal ++ in GRUB 1.0. */ ++ memcpy (config_file, p + 2, l); ++ config_file[l] = 0; ++ } ++ else { ++ ; ++ } ++ p += TAG_LEN(p) + 2; ++ } ++ extdata = extend = endp; ++ if (block <= 0 && extpath != NULL) { ++ char fname[64]; ++ if (TAG_LEN(extpath) >= sizeof(fname)){ ++ printf("Overflow in vendor data buffer! Aborting...\n"); ++ *extdata = RFC1533_END; ++ return(0); ++ } ++ memcpy(fname, extpath+2, TAG_LEN(extpath)); ++ fname[(int)TAG_LEN(extpath)] = '\0'; ++ printf("Loading BOOTP-extension file: %s\n",fname); ++ tftp_file_read(fname, decode_rfc1533); ++ } ++ return 1; /* proceed with next block */ ++} ++ ++ ++/* FIXME double check TWO_SECOND_DIVISOR */ ++#define TWO_SECOND_DIVISOR (RAND_MAX/TICKS_PER_SEC) ++/************************************************************************** ++RFC2131_SLEEP_INTERVAL - sleep for expotentially longer times (base << exp) +- 1 sec) ++**************************************************************************/ ++long rfc2131_sleep_interval(long base, int exp) ++{ ++ unsigned long tmo; ++#ifdef BACKOFF_LIMIT ++ if (exp > BACKOFF_LIMIT) ++ exp = BACKOFF_LIMIT; ++#endif ++ tmo = (base << exp) + (TICKS_PER_SEC - (random()/TWO_SECOND_DIVISOR)); ++ return tmo; ++} ++ ++#ifdef MULTICAST_LEVEL2 ++/************************************************************************** ++RFC1112_SLEEP_INTERVAL - sleep for expotentially longer times, up to (base << exp) ++**************************************************************************/ ++long rfc1112_sleep_interval(long base, int exp) ++{ ++ unsigned long divisor, tmo; ++#ifdef BACKOFF_LIMIT ++ if (exp > BACKOFF_LIMIT) ++ exp = BACKOFF_LIMIT; ++#endif ++ divisor = RAND_MAX/(base << exp); ++ tmo = random()/divisor; ++ return tmo; ++} ++#endif /* MULTICAST_LEVEL_2 */ ++/* ifconfig - configure network interface. */ ++int ++ifconfig (char *ip, char *sm, char *gw, char *svr) ++{ ++ in_addr tmp; ++ ++ if (sm) ++ { ++ if (! inet_aton (sm, &tmp)) ++ return 0; ++ ++ netmask = tmp.s_addr; ++ } ++ ++ if (ip) ++ { ++ if (! inet_aton (ip, &arptable[ARP_CLIENT].ipaddr)) ++ return 0; ++ ++ if (! netmask && ! sm) ++ netmask = default_netmask (); ++ } ++ ++ if (gw && ! inet_aton (gw, &arptable[ARP_GATEWAY].ipaddr)) ++ return 0; ++ ++ /* Clear out the ARP entry. */ ++ grub_memset (arptable[ARP_GATEWAY].node, 0, ETH_ALEN); ++ ++ if (svr && ! inet_aton (svr, &arptable[ARP_SERVER].ipaddr)) ++ return 0; ++ ++ /* Likewise. */ ++ grub_memset (arptable[ARP_SERVER].node, 0, ETH_ALEN); ++ ++ if (ip || sm) ++ { ++ if (IP_BROADCAST == (netmask | arptable[ARP_CLIENT].ipaddr.s_addr) ++ || netmask == (netmask | arptable[ARP_CLIENT].ipaddr.s_addr) ++ || ! netmask) ++ network_ready = 0; ++ else ++ network_ready = 1; ++ } ++ ++ return 1; ++} ++ ++/* ++ * print_network_configuration ++ * ++ * Output the network configuration. It may broke the graphic console now.:-( ++ */ ++void print_network_configuration (void) ++{ ++ EnterFunction("print_network_configuration"); ++ if (! grub_eth_probe ()) ++ grub_printf ("No ethernet card found.\n"); ++ else if (! network_ready) ++ grub_printf ("Not initialized yet.\n"); ++ else { ++ etherboot_printf ("Address: %@\n", arptable[ARP_CLIENT].ipaddr.s_addr); ++ etherboot_printf ("Netmask: %@\n", netmask); ++ etherboot_printf ("Server: %@\n", arptable[ARP_SERVER].ipaddr.s_addr); ++ etherboot_printf ("Gateway: %@\n", arptable[ARP_GATEWAY].ipaddr.s_addr); ++ } ++ LeaveFunction("print_network_configuration"); ++} ++ ++/** ++ * cleanup_net ++ * ++ * Mark network unusable, and disable NICs ++ */ ++void cleanup_net (void) ++{ ++ if (network_ready){ ++ /* Stop receiving packets. */ ++ eth_disable (); ++ network_ready = 0; ++ } ++} +Index: b/netboot/nic.h +=================================================================== +--- a/netboot/nic.h ++++ b/netboot/nic.h +@@ -8,24 +8,38 @@ + #ifndef NIC_H + #define NIC_H + ++#include "dev.h" ++ ++typedef enum { ++ DISABLE = 0, ++ ENABLE, ++ FORCE ++} irq_action_t; ++ + /* + * Structure returned from eth_probe and passed to other driver + * functions. + */ +- + struct nic + { +- void (*reset)P((struct nic *)); +- int (*poll)P((struct nic *)); ++ struct dev dev; /* This must come first */ ++ int (*poll)P((struct nic *, int retrieve)); + void (*transmit)P((struct nic *, const char *d, + unsigned int t, unsigned int s, const char *p)); +- void (*disable)P((struct nic *)); ++ void (*irq)P((struct nic *, irq_action_t)); + int flags; /* driver specific flags */ + struct rom_info *rom_info; /* -> rom_info from main */ + unsigned char *node_addr; +- char *packet; ++ unsigned char *packet; + unsigned int packetlen; ++ unsigned int ioaddr; ++ unsigned char irqno; + void *priv_data; /* driver can hang private data here */ + }; + ++extern int eth_probe(struct dev *dev); ++extern int eth_poll(int retrieve); ++extern void eth_transmit(const char *d, unsigned int t, unsigned int s, const void *p); ++extern void eth_disable(void); ++extern void eth_irq(irq_action_t action); + #endif /* NIC_H */ +Index: b/netboot/ns83820.c +=================================================================== +--- /dev/null ++++ b/netboot/ns83820.c +@@ -0,0 +1,1020 @@ ++/************************************************************************** ++* ns83820.c: Etherboot device driver for the National Semiconductor 83820 ++* Written 2004 by Timothy Legge ++* ++* 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., 675 Mass Ave, Cambridge, MA 02139, USA. ++* ++* Portions of this code based on: ++* ns83820.c by Benjamin LaHaise with contributions ++* for Linux kernel 2.4.x. ++* ++* Linux Driver Version 0.20, 20020610 ++* ++* This development of this Etherboot driver was funded by: ++* ++* NXTV: http://www.nxtv.com/ ++* ++* REVISION HISTORY: ++* ================ ++* ++* v1.0 02-16-2004 timlegge Initial port of Linux driver ++* v1.1 02-19-2004 timlegge More rohbust transmit and poll ++* ++* Indent Options: indent -kr -i8 ++***************************************************************************/ ++ ++/* to get some global routines like printf */ ++#include "etherboot.h" ++/* to get the interface to the body of the program */ ++#include "nic.h" ++/* to get the PCI support functions, if this is a PCI NIC */ ++#include "pci.h" ++ ++#if ARCH == ia64 /* Support 64-bit addressing */ ++#define USE_64BIT_ADDR ++#endif ++ ++//#define DDEBUG ++#ifdef DDEBUG ++#define dprintf(x) printf x ++#else ++#define dprintf(x) ++#endif ++ ++typedef unsigned char u8; ++typedef signed char s8; ++typedef unsigned short u16; ++typedef signed short s16; ++typedef unsigned int u32; ++typedef signed int s32; ++ ++#define HZ 100 ++ ++/* Condensed operations for readability. */ ++#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) ++#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) ++ ++/* NIC specific static variables go here */ ++ ++/* Global parameters. See MODULE_PARM near the bottom. */ ++// static int ihr = 2; ++static int reset_phy = 0; ++static int lnksts = 0; /* CFG_LNKSTS bit polarity */ ++ ++#if defined(CONFIG_HIGHMEM64G) || defined(__ia64__) ++#define USE_64BIT_ADDR "+" ++#endif ++ ++#if defined(USE_64BIT_ADDR) ++#define TRY_DAC 1 ++#else ++#define TRY_DAC 0 ++#endif ++ ++/* tunables */ ++#define RX_BUF_SIZE 1500 /* 8192 */ ++ ++/* Must not exceed ~65000. */ ++#define NR_RX_DESC 64 ++#define NR_TX_DESC 1 ++ ++ /* not tunable *//* Extra 6 bytes for 64 bit alignment (divisable by 8) */ ++#define REAL_RX_BUF_SIZE (RX_BUF_SIZE + 14 + 6) /* rx/tx mac addr + type */ ++ ++#define MIN_TX_DESC_FREE 8 ++ ++/* register defines */ ++#define CFGCS 0x04 ++ ++#define CR_TXE 0x00000001 ++#define CR_TXD 0x00000002 ++/* Ramit : Here's a tip, don't do a RXD immediately followed by an RXE ++ * The Receive engine skips one descriptor and moves ++ * onto the next one!! */ ++#define CR_RXE 0x00000004 ++#define CR_RXD 0x00000008 ++#define CR_TXR 0x00000010 ++#define CR_RXR 0x00000020 ++#define CR_SWI 0x00000080 ++#define CR_RST 0x00000100 ++ ++#define PTSCR_EEBIST_FAIL 0x00000001 ++#define PTSCR_EEBIST_EN 0x00000002 ++#define PTSCR_EELOAD_EN 0x00000004 ++#define PTSCR_RBIST_FAIL 0x000001b8 ++#define PTSCR_RBIST_DONE 0x00000200 ++#define PTSCR_RBIST_EN 0x00000400 ++#define PTSCR_RBIST_RST 0x00002000 ++ ++#define MEAR_EEDI 0x00000001 ++#define MEAR_EEDO 0x00000002 ++#define MEAR_EECLK 0x00000004 ++#define MEAR_EESEL 0x00000008 ++#define MEAR_MDIO 0x00000010 ++#define MEAR_MDDIR 0x00000020 ++#define MEAR_MDC 0x00000040 ++ ++#define ISR_TXDESC3 0x40000000 ++#define ISR_TXDESC2 0x20000000 ++#define ISR_TXDESC1 0x10000000 ++#define ISR_TXDESC0 0x08000000 ++#define ISR_RXDESC3 0x04000000 ++#define ISR_RXDESC2 0x02000000 ++#define ISR_RXDESC1 0x01000000 ++#define ISR_RXDESC0 0x00800000 ++#define ISR_TXRCMP 0x00400000 ++#define ISR_RXRCMP 0x00200000 ++#define ISR_DPERR 0x00100000 ++#define ISR_SSERR 0x00080000 ++#define ISR_RMABT 0x00040000 ++#define ISR_RTABT 0x00020000 ++#define ISR_RXSOVR 0x00010000 ++#define ISR_HIBINT 0x00008000 ++#define ISR_PHY 0x00004000 ++#define ISR_PME 0x00002000 ++#define ISR_SWI 0x00001000 ++#define ISR_MIB 0x00000800 ++#define ISR_TXURN 0x00000400 ++#define ISR_TXIDLE 0x00000200 ++#define ISR_TXERR 0x00000100 ++#define ISR_TXDESC 0x00000080 ++#define ISR_TXOK 0x00000040 ++#define ISR_RXORN 0x00000020 ++#define ISR_RXIDLE 0x00000010 ++#define ISR_RXEARLY 0x00000008 ++#define ISR_RXERR 0x00000004 ++#define ISR_RXDESC 0x00000002 ++#define ISR_RXOK 0x00000001 ++ ++#define TXCFG_CSI 0x80000000 ++#define TXCFG_HBI 0x40000000 ++#define TXCFG_MLB 0x20000000 ++#define TXCFG_ATP 0x10000000 ++#define TXCFG_ECRETRY 0x00800000 ++#define TXCFG_BRST_DIS 0x00080000 ++#define TXCFG_MXDMA1024 0x00000000 ++#define TXCFG_MXDMA512 0x00700000 ++#define TXCFG_MXDMA256 0x00600000 ++#define TXCFG_MXDMA128 0x00500000 ++#define TXCFG_MXDMA64 0x00400000 ++#define TXCFG_MXDMA32 0x00300000 ++#define TXCFG_MXDMA16 0x00200000 ++#define TXCFG_MXDMA8 0x00100000 ++ ++#define CFG_LNKSTS 0x80000000 ++#define CFG_SPDSTS 0x60000000 ++#define CFG_SPDSTS1 0x40000000 ++#define CFG_SPDSTS0 0x20000000 ++#define CFG_DUPSTS 0x10000000 ++#define CFG_TBI_EN 0x01000000 ++#define CFG_MODE_1000 0x00400000 ++/* Ramit : Dont' ever use AUTO_1000, it never works and is buggy. ++ * Read the Phy response and then configure the MAC accordingly */ ++#define CFG_AUTO_1000 0x00200000 ++#define CFG_PINT_CTL 0x001c0000 ++#define CFG_PINT_DUPSTS 0x00100000 ++#define CFG_PINT_LNKSTS 0x00080000 ++#define CFG_PINT_SPDSTS 0x00040000 ++#define CFG_TMRTEST 0x00020000 ++#define CFG_MRM_DIS 0x00010000 ++#define CFG_MWI_DIS 0x00008000 ++#define CFG_T64ADDR 0x00004000 ++#define CFG_PCI64_DET 0x00002000 ++#define CFG_DATA64_EN 0x00001000 ++#define CFG_M64ADDR 0x00000800 ++#define CFG_PHY_RST 0x00000400 ++#define CFG_PHY_DIS 0x00000200 ++#define CFG_EXTSTS_EN 0x00000100 ++#define CFG_REQALG 0x00000080 ++#define CFG_SB 0x00000040 ++#define CFG_POW 0x00000020 ++#define CFG_EXD 0x00000010 ++#define CFG_PESEL 0x00000008 ++#define CFG_BROM_DIS 0x00000004 ++#define CFG_EXT_125 0x00000002 ++#define CFG_BEM 0x00000001 ++ ++#define EXTSTS_UDPPKT 0x00200000 ++#define EXTSTS_TCPPKT 0x00080000 ++#define EXTSTS_IPPKT 0x00020000 ++ ++#define SPDSTS_POLARITY (CFG_SPDSTS1 | CFG_SPDSTS0 | CFG_DUPSTS | (lnksts ? CFG_LNKSTS : 0)) ++ ++#define MIBC_MIBS 0x00000008 ++#define MIBC_ACLR 0x00000004 ++#define MIBC_FRZ 0x00000002 ++#define MIBC_WRN 0x00000001 ++ ++#define PCR_PSEN (1 << 31) ++#define PCR_PS_MCAST (1 << 30) ++#define PCR_PS_DA (1 << 29) ++#define PCR_STHI_8 (3 << 23) ++#define PCR_STLO_4 (1 << 23) ++#define PCR_FFHI_8K (3 << 21) ++#define PCR_FFLO_4K (1 << 21) ++#define PCR_PAUSE_CNT 0xFFFE ++ ++#define RXCFG_AEP 0x80000000 ++#define RXCFG_ARP 0x40000000 ++#define RXCFG_STRIPCRC 0x20000000 ++#define RXCFG_RX_FD 0x10000000 ++#define RXCFG_ALP 0x08000000 ++#define RXCFG_AIRL 0x04000000 ++#define RXCFG_MXDMA512 0x00700000 ++#define RXCFG_DRTH 0x0000003e ++#define RXCFG_DRTH0 0x00000002 ++ ++#define RFCR_RFEN 0x80000000 ++#define RFCR_AAB 0x40000000 ++#define RFCR_AAM 0x20000000 ++#define RFCR_AAU 0x10000000 ++#define RFCR_APM 0x08000000 ++#define RFCR_APAT 0x07800000 ++#define RFCR_APAT3 0x04000000 ++#define RFCR_APAT2 0x02000000 ++#define RFCR_APAT1 0x01000000 ++#define RFCR_APAT0 0x00800000 ++#define RFCR_AARP 0x00400000 ++#define RFCR_MHEN 0x00200000 ++#define RFCR_UHEN 0x00100000 ++#define RFCR_ULM 0x00080000 ++ ++#define VRCR_RUDPE 0x00000080 ++#define VRCR_RTCPE 0x00000040 ++#define VRCR_RIPE 0x00000020 ++#define VRCR_IPEN 0x00000010 ++#define VRCR_DUTF 0x00000008 ++#define VRCR_DVTF 0x00000004 ++#define VRCR_VTREN 0x00000002 ++#define VRCR_VTDEN 0x00000001 ++ ++#define VTCR_PPCHK 0x00000008 ++#define VTCR_GCHK 0x00000004 ++#define VTCR_VPPTI 0x00000002 ++#define VTCR_VGTI 0x00000001 ++ ++#define CR 0x00 ++#define CFG 0x04 ++#define MEAR 0x08 ++#define PTSCR 0x0c ++#define ISR 0x10 ++#define IMR 0x14 ++#define IER 0x18 ++#define IHR 0x1c ++#define TXDP 0x20 ++#define TXDP_HI 0x24 ++#define TXCFG 0x28 ++#define GPIOR 0x2c ++#define RXDP 0x30 ++#define RXDP_HI 0x34 ++#define RXCFG 0x38 ++#define PQCR 0x3c ++#define WCSR 0x40 ++#define PCR 0x44 ++#define RFCR 0x48 ++#define RFDR 0x4c ++ ++#define SRR 0x58 ++ ++#define VRCR 0xbc ++#define VTCR 0xc0 ++#define VDR 0xc4 ++#define CCSR 0xcc ++ ++#define TBICR 0xe0 ++#define TBISR 0xe4 ++#define TANAR 0xe8 ++#define TANLPAR 0xec ++#define TANER 0xf0 ++#define TESR 0xf4 ++ ++#define TBICR_MR_AN_ENABLE 0x00001000 ++#define TBICR_MR_RESTART_AN 0x00000200 ++ ++#define TBISR_MR_LINK_STATUS 0x00000020 ++#define TBISR_MR_AN_COMPLETE 0x00000004 ++ ++#define TANAR_PS2 0x00000100 ++#define TANAR_PS1 0x00000080 ++#define TANAR_HALF_DUP 0x00000040 ++#define TANAR_FULL_DUP 0x00000020 ++ ++#define GPIOR_GP5_OE 0x00000200 ++#define GPIOR_GP4_OE 0x00000100 ++#define GPIOR_GP3_OE 0x00000080 ++#define GPIOR_GP2_OE 0x00000040 ++#define GPIOR_GP1_OE 0x00000020 ++#define GPIOR_GP3_OUT 0x00000004 ++#define GPIOR_GP1_OUT 0x00000001 ++ ++#define LINK_AUTONEGOTIATE 0x01 ++#define LINK_DOWN 0x02 ++#define LINK_UP 0x04 ++ ++ ++#define __kick_rx() writel(CR_RXE, ns->base + CR) ++ ++#define kick_rx() do { \ ++ dprintf(("kick_rx: maybe kicking\n")); \ ++ writel(virt_to_le32desc(&rx_ring[ns->cur_rx]), ns->base + RXDP); \ ++ if (ns->next_rx == ns->next_empty) \ ++ printf("uh-oh: next_rx == next_empty???\n"); \ ++ __kick_rx(); \ ++} while(0) ++ ++ ++#ifdef USE_64BIT_ADDR ++#define HW_ADDR_LEN 8 ++#else ++#define HW_ADDR_LEN 4 ++#endif ++ ++#define CMDSTS_OWN 0x80000000 ++#define CMDSTS_MORE 0x40000000 ++#define CMDSTS_INTR 0x20000000 ++#define CMDSTS_ERR 0x10000000 ++#define CMDSTS_OK 0x08000000 ++#define CMDSTS_LEN_MASK 0x0000ffff ++ ++#define CMDSTS_DEST_MASK 0x01800000 ++#define CMDSTS_DEST_SELF 0x00800000 ++#define CMDSTS_DEST_MULTI 0x01000000 ++ ++#define DESC_SIZE 8 /* Should be cache line sized */ ++ ++#ifdef USE_64BIT_ADDR ++struct ring_desc { ++ uint64_t link; ++ uint64_t bufptr; ++ u32 cmdsts; ++ u32 extsts; /* Extended status field */ ++}; ++#else ++struct ring_desc { ++ u32 link; ++ u32 bufptr; ++ u32 cmdsts; ++ u32 extsts; /* Extended status field */ ++}; ++#endif ++ ++/* Define the TX Descriptor */ ++static struct ring_desc tx_ring[NR_TX_DESC] ++ __attribute__ ((aligned(8))); ++ ++/* Create a static buffer of size REAL_RX_BUF_SIZE for each ++TX Descriptor. All descriptors point to a ++part of this buffer */ ++static unsigned char txb[NR_TX_DESC * REAL_RX_BUF_SIZE]; ++ ++/* Define the TX Descriptor */ ++static struct ring_desc rx_ring[NR_RX_DESC] ++ __attribute__ ((aligned(8))); ++ ++/* Create a static buffer of size REAL_RX_BUF_SIZE for each ++RX Descriptor All descriptors point to a ++part of this buffer */ ++static unsigned char rxb[NR_RX_DESC * REAL_RX_BUF_SIZE] ++ __attribute__ ((aligned(8))); ++ ++/* Private Storage for the NIC */ ++struct ns83820_private { ++ u8 *base; ++ int up; ++ long idle; ++ u32 *next_rx_desc; ++ u16 next_rx, next_empty; ++ u32 cur_rx; ++ u32 *descs; ++ unsigned ihr; ++ u32 CFG_cache; ++ u32 MEAR_cache; ++ u32 IMR_cache; ++ int linkstate; ++ u16 tx_done_idx; ++ u16 tx_idx; ++ u16 tx_intr_idx; ++ u32 phy_descs; ++ u32 *tx_descs; ++ ++} nsx; ++static struct ns83820_private *ns; ++ ++static void phy_intr(struct nic *nic __unused) ++{ ++ static char *speeds[] = ++ { "10", "100", "1000", "1000(?)", "1000F" }; ++ u32 cfg, new_cfg; ++ u32 tbisr, tanar, tanlpar; ++ int speed, fullduplex, newlinkstate; ++ ++ cfg = readl(ns->base + CFG) ^ SPDSTS_POLARITY; ++ if (ns->CFG_cache & CFG_TBI_EN) { ++ /* we have an optical transceiver */ ++ tbisr = readl(ns->base + TBISR); ++ tanar = readl(ns->base + TANAR); ++ tanlpar = readl(ns->base + TANLPAR); ++ dprintf(("phy_intr: tbisr=%hX, tanar=%hX, tanlpar=%hX\n", ++ tbisr, tanar, tanlpar)); ++ ++ if ((fullduplex = (tanlpar & TANAR_FULL_DUP) ++ && (tanar & TANAR_FULL_DUP))) { ++ ++ /* both of us are full duplex */ ++ writel(readl(ns->base + TXCFG) ++ | TXCFG_CSI | TXCFG_HBI | TXCFG_ATP, ++ ns->base + TXCFG); ++ writel(readl(ns->base + RXCFG) | RXCFG_RX_FD, ++ ns->base + RXCFG); ++ /* Light up full duplex LED */ ++ writel(readl(ns->base + GPIOR) | GPIOR_GP1_OUT, ++ ns->base + GPIOR); ++ ++ } else if (((tanlpar & TANAR_HALF_DUP) ++ && (tanar & TANAR_HALF_DUP)) ++ || ((tanlpar & TANAR_FULL_DUP) ++ && (tanar & TANAR_HALF_DUP)) ++ || ((tanlpar & TANAR_HALF_DUP) ++ && (tanar & TANAR_FULL_DUP))) { ++ ++ /* one or both of us are half duplex */ ++ writel((readl(ns->base + TXCFG) ++ & ~(TXCFG_CSI | TXCFG_HBI)) | TXCFG_ATP, ++ ns->base + TXCFG); ++ writel(readl(ns->base + RXCFG) & ~RXCFG_RX_FD, ++ ns->base + RXCFG); ++ /* Turn off full duplex LED */ ++ writel(readl(ns->base + GPIOR) & ~GPIOR_GP1_OUT, ++ ns->base + GPIOR); ++ } ++ ++ speed = 4; /* 1000F */ ++ ++ } else { ++ /* we have a copper transceiver */ ++ new_cfg = ++ ns->CFG_cache & ~(CFG_SB | CFG_MODE_1000 | CFG_SPDSTS); ++ ++ if (cfg & CFG_SPDSTS1) ++ new_cfg |= CFG_MODE_1000; ++ else ++ new_cfg &= ~CFG_MODE_1000; ++ ++ speed = ((cfg / CFG_SPDSTS0) & 3); ++ fullduplex = (cfg & CFG_DUPSTS); ++ ++ if (fullduplex) ++ new_cfg |= CFG_SB; ++ ++ if ((cfg & CFG_LNKSTS) && ++ ((new_cfg ^ ns->CFG_cache) & CFG_MODE_1000)) { ++ writel(new_cfg, ns->base + CFG); ++ ns->CFG_cache = new_cfg; ++ } ++ ++ ns->CFG_cache &= ~CFG_SPDSTS; ++ ns->CFG_cache |= cfg & CFG_SPDSTS; ++ } ++ ++ newlinkstate = (cfg & CFG_LNKSTS) ? LINK_UP : LINK_DOWN; ++ ++ if (newlinkstate & LINK_UP && ns->linkstate != newlinkstate) { ++ printf("link now %s mbps, %s duplex and up.\n", ++ speeds[speed], fullduplex ? "full" : "half"); ++ } else if (newlinkstate & LINK_DOWN ++ && ns->linkstate != newlinkstate) { ++ printf("link now down.\n"); ++ } ++ ns->linkstate = newlinkstate; ++} ++static void ns83820_set_multicast(struct nic *nic __unused); ++static void ns83820_setup_rx(struct nic *nic) ++{ ++ unsigned i; ++ ns->idle = 1; ++ ns->next_rx = 0; ++ ns->next_rx_desc = ns->descs; ++ ns->next_empty = 0; ++ ns->cur_rx = 0; ++ ++ ++ for (i = 0; i < NR_RX_DESC; i++) { ++ rx_ring[i].link = virt_to_le32desc(&rx_ring[i + 1]); ++ rx_ring[i].bufptr = ++ virt_to_le32desc(&rxb[i * REAL_RX_BUF_SIZE]); ++ rx_ring[i].cmdsts = cpu_to_le32(REAL_RX_BUF_SIZE); ++ rx_ring[i].extsts = cpu_to_le32(0); ++ } ++// No need to wrap the ring ++// rx_ring[i].link = virt_to_le32desc(&rx_ring[0]); ++ writel(0, ns->base + RXDP_HI); ++ writel(virt_to_le32desc(&rx_ring[0]), ns->base + RXDP); ++ ++ dprintf(("starting receiver\n")); ++ ++ writel(0x0001, ns->base + CCSR); ++ writel(0, ns->base + RFCR); ++ writel(0x7fc00000, ns->base + RFCR); ++ writel(0xffc00000, ns->base + RFCR); ++ ++ ns->up = 1; ++ ++ phy_intr(nic); ++ ++ /* Okay, let it rip */ ++ ns->IMR_cache |= ISR_PHY; ++ ns->IMR_cache |= ISR_RXRCMP; ++ //dev->IMR_cache |= ISR_RXERR; ++ //dev->IMR_cache |= ISR_RXOK; ++ ns->IMR_cache |= ISR_RXORN; ++ ns->IMR_cache |= ISR_RXSOVR; ++ ns->IMR_cache |= ISR_RXDESC; ++ ns->IMR_cache |= ISR_RXIDLE; ++ ns->IMR_cache |= ISR_TXDESC; ++ ns->IMR_cache |= ISR_TXIDLE; ++ ++ // No reason to enable interupts... ++ // writel(ns->IMR_cache, ns->base + IMR); ++ // writel(1, ns->base + IER); ++ ns83820_set_multicast(nic); ++ kick_rx(); ++} ++ ++ ++static void ns83820_do_reset(struct nic *nic __unused, u32 which) ++{ ++ dprintf(("resetting chip...\n")); ++ writel(which, ns->base + CR); ++ do { ++ ++ } while (readl(ns->base + CR) & which); ++ dprintf(("okay!\n")); ++} ++ ++static void ns83820_reset(struct nic *nic) ++{ ++ unsigned i; ++ dprintf(("ns83820_reset\n")); ++ ++ writel(0, ns->base + PQCR); ++ ++ ns83820_setup_rx(nic); ++ ++ for (i = 0; i < NR_TX_DESC; i++) { ++ tx_ring[i].link = 0; ++ tx_ring[i].bufptr = 0; ++ tx_ring[i].cmdsts = cpu_to_le32(0); ++ tx_ring[i].extsts = cpu_to_le32(0); ++ } ++ ++ ns->tx_idx = 0; ++ ns->tx_done_idx = 0; ++ writel(0, ns->base + TXDP_HI); ++ return; ++} ++static void ns83820_getmac(struct nic *nic __unused, u8 * mac) ++{ ++ unsigned i; ++ for (i = 0; i < 3; i++) { ++ u32 data; ++ /* Read from the perfect match memory: this is loaded by ++ * the chip from the EEPROM via the EELOAD self test. ++ */ ++ writel(i * 2, ns->base + RFCR); ++ data = readl(ns->base + RFDR); ++ *mac++ = data; ++ *mac++ = data >> 8; ++ } ++} ++ ++static void ns83820_set_multicast(struct nic *nic __unused) ++{ ++ u8 *rfcr = ns->base + RFCR; ++ u32 and_mask = 0xffffffff; ++ u32 or_mask = 0; ++ u32 val; ++ ++ /* Support Multicast */ ++ and_mask &= ~(RFCR_AAU | RFCR_AAM); ++ or_mask |= RFCR_AAM; ++ val = (readl(rfcr) & and_mask) | or_mask; ++ /* Ramit : RFCR Write Fix doc says RFEN must be 0 modify other bits */ ++ writel(val & ~RFCR_RFEN, rfcr); ++ writel(val, rfcr); ++ ++} ++static void ns83820_run_bist(struct nic *nic __unused, const char *name, ++ u32 enable, u32 done, u32 fail) ++{ ++ int timed_out = 0; ++ long start; ++ u32 status; ++ int loops = 0; ++ ++ dprintf(("start %s\n", name)) ++ ++ start = currticks(); ++ ++ writel(enable, ns->base + PTSCR); ++ for (;;) { ++ loops++; ++ status = readl(ns->base + PTSCR); ++ if (!(status & enable)) ++ break; ++ if (status & done) ++ break; ++ if (status & fail) ++ break; ++ if ((currticks() - start) >= HZ) { ++ timed_out = 1; ++ break; ++ } ++ } ++ ++ if (status & fail) ++ printf("%s failed! (0x%hX & 0x%hX)\n", name, status, fail); ++ else if (timed_out) ++ printf("run_bist %s timed out! (%hX)\n", name, status); ++ dprintf(("done %s in %d loops\n", name, loops)); ++} ++ ++/************************************* ++Check Link ++*************************************/ ++static void ns83820_check_intr(struct nic *nic) { ++ int i; ++ u32 isr = readl(ns->base + ISR); ++ if(ISR_PHY & isr) ++ phy_intr(nic); ++ if(( ISR_RXIDLE | ISR_RXDESC | ISR_RXERR) & isr) ++ kick_rx(); ++ for (i = 0; i < NR_RX_DESC; i++) { ++ if (rx_ring[i].cmdsts == CMDSTS_OWN) { ++// rx_ring[i].link = virt_to_le32desc(&rx_ring[i + 1]); ++ rx_ring[i].cmdsts = cpu_to_le32(REAL_RX_BUF_SIZE); ++ } ++ } ++} ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int ns83820_poll(struct nic *nic, int retrieve) ++{ ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ u32 cmdsts; ++ int entry = ns->cur_rx; ++ ++ ns83820_check_intr(nic); ++ ++ cmdsts = le32_to_cpu(rx_ring[entry].cmdsts); ++ ++ if ( ! ( (CMDSTS_OWN & (cmdsts)) && (cmdsts != (CMDSTS_OWN)) ) ) ++ return 0; ++ ++ if ( ! retrieve ) return 1; ++ ++ if (! (CMDSTS_OK & cmdsts) ) ++ return 0; ++ ++ nic->packetlen = cmdsts & 0xffff; ++ memcpy(nic->packet, ++ rxb + (entry * REAL_RX_BUF_SIZE), ++ nic->packetlen); ++ // rx_ring[entry].link = 0; ++ rx_ring[entry].cmdsts = cpu_to_le32(CMDSTS_OWN); ++ ++ ns->cur_rx = ++ns->cur_rx % NR_RX_DESC; ++ ++ if (ns->cur_rx == 0) /* We have wrapped the ring */ ++ kick_rx(); ++ ++ return 1; ++} ++ ++static inline void kick_tx(struct nic *nic __unused) ++{ ++ dprintf(("kick_tx\n")); ++ writel(CR_TXE, ns->base + CR); ++} ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void ns83820_transmit(struct nic *nic, const char *d, /* Destination */ ++ unsigned int t, /* Type */ ++ unsigned int s, /* size */ ++ const char *p) ++{ /* Packet */ ++ /* send the packet to destination */ ++ ++ u16 nstype; ++ u32 cmdsts, extsts; ++ int cur_tx = 0; ++ u32 isr = readl(ns->base + ISR); ++ if (ISR_TXIDLE & isr) ++ kick_tx(nic); ++ /* point to the current txb incase multiple tx_rings are used */ ++ memcpy(txb, d, ETH_ALEN); ++ memcpy(txb + ETH_ALEN, nic->node_addr, ETH_ALEN); ++ nstype = htons((u16) t); ++ memcpy(txb + 2 * ETH_ALEN, (u8 *) & nstype, 2); ++ memcpy(txb + ETH_HLEN, p, s); ++ s += ETH_HLEN; ++ s &= 0x0FFF; ++ while (s < ETH_ZLEN) ++ txb[s++] = '\0'; ++ ++ /* Setup the transmit descriptor */ ++ extsts = 0; ++ extsts |= EXTSTS_UDPPKT; ++ ++ tx_ring[cur_tx].bufptr = virt_to_le32desc(&txb); ++ tx_ring[cur_tx].extsts = cpu_to_le32(extsts); ++ ++ cmdsts = cpu_to_le32(0); ++ cmdsts |= cpu_to_le32(CMDSTS_OWN | s); ++ tx_ring[cur_tx].cmdsts = cpu_to_le32(cmdsts); ++ ++ writel(virt_to_le32desc(&tx_ring[0]), ns->base + TXDP); ++ kick_tx(nic); ++} ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void ns83820_disable(struct dev *dev) ++{ ++ /* put the card in its initial state */ ++ /* This function serves 3 purposes. ++ * This disables DMA and interrupts so we don't receive ++ * unexpected packets or interrupts from the card after ++ * etherboot has finished. ++ * This frees resources so etherboot may use ++ * this driver on another interface ++ * This allows etherboot to reinitialize the interface ++ * if something is something goes wrong. ++ */ ++ /* disable interrupts */ ++ writel(0, ns->base + IMR); ++ writel(0, ns->base + IER); ++ readl(ns->base + IER); ++ ++ ns->up = 0; ++ ++ ns83820_do_reset((struct nic *) dev, CR_RST); ++ ++ ns->IMR_cache &= ++ ~(ISR_RXOK | ISR_RXDESC | ISR_RXERR | ISR_RXEARLY | ++ ISR_RXIDLE); ++ writel(ns->IMR_cache, ns->base + IMR); ++ ++ /* touch the pci bus... */ ++ readl(ns->base + IMR); ++ ++ /* assumes the transmitter is already disabled and reset */ ++ writel(0, ns->base + RXDP_HI); ++ writel(0, ns->base + RXDP); ++} ++ ++/************************************************************************** ++IRQ - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void ns83820_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++***************************************************************************/ ++ ++#define board_found 1 ++#define valid_link 0 ++static int ns83820_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *) dev; ++ int sz; ++ long addr; ++ int using_dac = 0; ++ ++ if (pci->ioaddr == 0) ++ return 0; ++ ++ printf("ns83820.c: Found %s, vendor=0x%hX, device=0x%hX\n", ++ pci->name, pci->vendor, pci->dev_id); ++ ++ /* point to private storage */ ++ ns = &nsx; ++ ++ adjust_pci_device(pci); ++ ++ addr = pci_bar_start(pci, PCI_BASE_ADDRESS_1); ++ sz = pci_bar_size(pci, PCI_BASE_ADDRESS_1); ++ ++ ns->base = ioremap(addr, (1UL << 12)); ++// ns->base = ioremap(addr, sz); ++ ++ if (!ns->base) ++ return 0; ++ ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ++ /* disable interrupts */ ++ writel(0, ns->base + IMR); ++ writel(0, ns->base + IER); ++ readl(ns->base + IER); ++ ++ ns->IMR_cache = 0; ++ ++ ns83820_do_reset(nic, CR_RST); ++ ++ /* Must reset the ram bist before running it */ ++ writel(PTSCR_RBIST_RST, ns->base + PTSCR); ++ ns83820_run_bist(nic, "sram bist", PTSCR_RBIST_EN, ++ PTSCR_RBIST_DONE, PTSCR_RBIST_FAIL); ++ ns83820_run_bist(nic, "eeprom bist", PTSCR_EEBIST_EN, 0, ++ PTSCR_EEBIST_FAIL); ++ ns83820_run_bist(nic, "eeprom load", PTSCR_EELOAD_EN, 0, 0); ++ ++ /* I love config registers */ ++ ns->CFG_cache = readl(ns->base + CFG); ++ ++ if ((ns->CFG_cache & CFG_PCI64_DET)) { ++ printf("%s: detected 64 bit PCI data bus.\n", pci->name); ++ /*dev->CFG_cache |= CFG_DATA64_EN; */ ++ if (!(ns->CFG_cache & CFG_DATA64_EN)) ++ printf ++ ("%s: EEPROM did not enable 64 bit bus. Disabled.\n", ++ pci->name); ++ } else ++ ns->CFG_cache &= ~(CFG_DATA64_EN); ++ ++ ns->CFG_cache &= (CFG_TBI_EN | CFG_MRM_DIS | CFG_MWI_DIS | ++ CFG_T64ADDR | CFG_DATA64_EN | CFG_EXT_125 | ++ CFG_M64ADDR); ++ ns->CFG_cache |= ++ CFG_PINT_DUPSTS | CFG_PINT_LNKSTS | CFG_PINT_SPDSTS | ++ CFG_EXTSTS_EN | CFG_EXD | CFG_PESEL; ++ ns->CFG_cache |= CFG_REQALG; ++ ns->CFG_cache |= CFG_POW; ++ ns->CFG_cache |= CFG_TMRTEST; ++ ++ /* When compiled with 64 bit addressing, we must always enable ++ * the 64 bit descriptor format. ++ */ ++#ifdef USE_64BIT_ADDR ++ ns->CFG_cache |= CFG_M64ADDR; ++#endif ++ ++//FIXME: Enable section on dac or remove this ++ if (using_dac) ++ ns->CFG_cache |= CFG_T64ADDR; ++ ++ /* Big endian mode does not seem to do what the docs suggest */ ++ ns->CFG_cache &= ~CFG_BEM; ++ ++ /* setup optical transceiver if we have one */ ++ if (ns->CFG_cache & CFG_TBI_EN) { ++ dprintf(("%s: enabling optical transceiver\n", pci->name)); ++ writel(readl(ns->base + GPIOR) | 0x3e8, ns->base + GPIOR); ++ ++ /* setup auto negotiation feature advertisement */ ++ writel(readl(ns->base + TANAR) ++ | TANAR_HALF_DUP | TANAR_FULL_DUP, ++ ns->base + TANAR); ++ ++ /* start auto negotiation */ ++ writel(TBICR_MR_AN_ENABLE | TBICR_MR_RESTART_AN, ++ ns->base + TBICR); ++ writel(TBICR_MR_AN_ENABLE, ns->base + TBICR); ++ ns->linkstate = LINK_AUTONEGOTIATE; ++ ++ ns->CFG_cache |= CFG_MODE_1000; ++ } ++ writel(ns->CFG_cache, ns->base + CFG); ++ dprintf(("CFG: %hX\n", ns->CFG_cache)); ++ ++ /* FIXME: reset_phy is defaulted to 0, should we reset anyway? */ ++ if (reset_phy) { ++ dprintf(("%s: resetting phy\n", pci->name)); ++ writel(ns->CFG_cache | CFG_PHY_RST, ns->base + CFG); ++ writel(ns->CFG_cache, ns->base + CFG); ++ } ++#if 0 /* Huh? This sets the PCI latency register. Should be done via ++ * the PCI layer. FIXME. ++ */ ++ if (readl(dev->base + SRR)) ++ writel(readl(dev->base + 0x20c) | 0xfe00, ++ dev->base + 0x20c); ++#endif ++ ++ /* Note! The DMA burst size interacts with packet ++ * transmission, such that the largest packet that ++ * can be transmitted is 8192 - FLTH - burst size. ++ * If only the transmit fifo was larger... ++ */ ++ /* Ramit : 1024 DMA is not a good idea, it ends up banging ++ * some DELL and COMPAQ SMP systems */ ++ writel(TXCFG_CSI | TXCFG_HBI | TXCFG_ATP | TXCFG_MXDMA512 ++ | ((1600 / 32) * 0x100), ns->base + TXCFG); ++ ++ /* Set Rx to full duplex, don't accept runt, errored, long or length ++ * range errored packets. Use 512 byte DMA. ++ */ ++ /* Ramit : 1024 DMA is not a good idea, it ends up banging ++ * some DELL and COMPAQ SMP systems ++ * Turn on ALP, only we are accpeting Jumbo Packets */ ++ writel(RXCFG_AEP | RXCFG_ARP | RXCFG_AIRL | RXCFG_RX_FD ++ | RXCFG_STRIPCRC ++ //| RXCFG_ALP ++ | (RXCFG_MXDMA512) | 0, ns->base + RXCFG); ++ ++ /* Disable priority queueing */ ++ writel(0, ns->base + PQCR); ++ ++ /* Enable IP checksum validation and detetion of VLAN headers. ++ * Note: do not set the reject options as at least the 0x102 ++ * revision of the chip does not properly accept IP fragments ++ * at least for UDP. ++ */ ++ /* Ramit : Be sure to turn on RXCFG_ARP if VLAN's are enabled, since ++ * the MAC it calculates the packetsize AFTER stripping the VLAN ++ * header, and if a VLAN Tagged packet of 64 bytes is received (like ++ * a ping with a VLAN header) then the card, strips the 4 byte VLAN ++ * tag and then checks the packet size, so if RXCFG_ARP is not enabled, ++ * it discrards it!. These guys...... ++ */ ++ writel(VRCR_IPEN | VRCR_VTDEN, ns->base + VRCR); ++ ++ /* Enable per-packet TCP/UDP/IP checksumming */ ++ writel(VTCR_PPCHK, ns->base + VTCR); ++ ++ /* Ramit : Enable async and sync pause frames */ ++// writel(0, ns->base + PCR); ++ writel((PCR_PS_MCAST | PCR_PS_DA | PCR_PSEN | PCR_FFLO_4K | ++ PCR_FFHI_8K | PCR_STLO_4 | PCR_STHI_8 | PCR_PAUSE_CNT), ++ ns->base + PCR); ++ ++ /* Disable Wake On Lan */ ++ writel(0, ns->base + WCSR); ++ ++ ns83820_getmac(nic, nic->node_addr); ++ printf("%! at ioaddr 0x%hX, ", nic->node_addr, ns->base); ++ ++ if (using_dac) { ++ dprintf(("%s: using 64 bit addressing.\n", pci->name)); ++ } ++ ++ dprintf(("%s: DP83820 %d.%d: %! io=0x%hX\n", ++ pci->name, ++ (unsigned) readl(ns->base + SRR) >> 8, ++ (unsigned) readl(ns->base + SRR) & 0xff, ++ nic->node_addr, pci->ioaddr)); ++ ++#ifdef PHY_CODE_IS_FINISHED ++ ns83820_probe_phy(dev); ++#endif ++ ++ ns83820_reset(nic); ++ /* point to NIC specific routines */ ++ dev->disable = ns83820_disable; ++ nic->poll = ns83820_poll; ++ nic->transmit = ns83820_transmit; ++ nic->irq = ns83820_irq; ++ return 1; ++} ++ ++static struct pci_id ns83820_nics[] = { ++ PCI_ROM(0x100b, 0x0022, "ns83820", "National Semiconductor 83820"), ++}; ++ ++struct pci_driver ns83820_driver = { ++ .type = NIC_DRIVER, ++ .name = "NS83820/PCI", ++ .probe = ns83820_probe, ++ .ids = ns83820_nics, ++ .id_count = sizeof(ns83820_nics) / sizeof(ns83820_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/ns8390.c +=================================================================== +--- a/netboot/ns8390.c ++++ b/netboot/ns8390.c +@@ -13,11 +13,15 @@ + the proper functioning of this software, nor do the authors assume any + responsibility for damages incurred with its use. + ++Multicast support added by Timothy Legge (timlegge@users.sourceforge.net) 09/28/2003 ++Relocation support added by Ken Yap (ken_yap@users.sourceforge.net) 28/12/02 + 3c503 support added by Bill Paul (wpaul@ctr.columbia.edu) on 11/15/94 + SMC8416 support added by Bill Paul (wpaul@ctr.columbia.edu) on 12/25/94 + 3c503 PIO support added by Jim Hague (jim.hague@acm.org) on 2/17/98 + RX overrun by Klaus Espenlaub (espenlaub@informatik.uni-ulm.de) on 3/10/99 + parts taken from the Linux 8390 driver (by Donald Becker and Paul Gortmaker) ++SMC8416 PIO support added by Andrew Bettison (andrewb@zip.com.au) on 4/3/02 ++ based on the Linux 8390 driver (by Donald Becker and Paul Gortmaker) + + **************************************************************************/ + +@@ -26,10 +30,16 @@ + #include "ns8390.h" + #ifdef INCLUDE_NS8390 + #include "pci.h" ++#else ++#include "isa.h" + #endif +-#include "cards.h" + +-static unsigned char eth_vendor, eth_flags, eth_laar; ++typedef int Address; ++ ++static unsigned char eth_vendor, eth_flags; ++#ifdef INCLUDE_WD ++static unsigned char eth_laar; ++#endif + static unsigned short eth_nic_base, eth_asic_base; + static unsigned char eth_memsize, eth_rx_start, eth_tx_start; + static Address eth_bmem, eth_rmem; +@@ -66,6 +76,7 @@ + #endif + + #if defined(INCLUDE_WD) ++#define ASIC_PIO WD_IAR + #define eth_probe wd_probe + #if defined(INCLUDE_3C503) || defined(INCLUDE_NE) || defined(INCLUDE_NS8390) + Error you must only define one of INCLUDE_WD, INCLUDE_3C503, INCLUDE_NE, INCLUDE_NS8390 +@@ -101,13 +112,16 @@ + #endif + #endif + +-#if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) || (defined(INCLUDE_3C503) && !defined(T503_SHMEM)) ++#if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) || (defined(INCLUDE_3C503) && !defined(T503_SHMEM)) || (defined(INCLUDE_WD) && defined(WD_790_PIO)) + /************************************************************************** + ETH_PIO_READ - Read a frame via Programmed I/O + **************************************************************************/ + static void eth_pio_read(unsigned int src, unsigned char *dst, unsigned int cnt) + { +- if (eth_flags & FLAG_16BIT) { ++cnt; cnt &= ~1; } ++#ifdef INCLUDE_WD ++ outb(src & 0xff, eth_asic_base + WD_GP2); ++ outb(src >> 8, eth_asic_base + WD_GP2); ++#else + outb(D8390_COMMAND_RD2 | + D8390_COMMAND_STA, eth_nic_base + D8390_P0_COMMAND); + outb(cnt, eth_nic_base + D8390_P0_RBCR0); +@@ -122,9 +136,10 @@ + outb(src >> 8, eth_asic_base + _3COM_DAMSB); + outb(t503_output | _3COM_CR_START, eth_asic_base + _3COM_CR); + #endif ++#endif + + if (eth_flags & FLAG_16BIT) +- cnt >>= 1; ++ cnt = (cnt + 1) >> 1; + + while(cnt--) { + #ifdef INCLUDE_3C503 +@@ -153,7 +168,10 @@ + #ifdef COMPEX_RL2000_FIX + unsigned int x; + #endif /* COMPEX_RL2000_FIX */ +- if (eth_flags & FLAG_16BIT) { ++cnt; cnt &= ~1; } ++#ifdef INCLUDE_WD ++ outb(dst & 0xff, eth_asic_base + WD_GP2); ++ outb(dst >> 8, eth_asic_base + WD_GP2); ++#else + outb(D8390_COMMAND_RD2 | + D8390_COMMAND_STA, eth_nic_base + D8390_P0_COMMAND); + outb(D8390_ISR_RDC, eth_nic_base + D8390_P0_ISR); +@@ -170,9 +188,10 @@ + + outb(t503_output | _3COM_CR_DDIR | _3COM_CR_START, eth_asic_base + _3COM_CR); + #endif ++#endif + + if (eth_flags & FLAG_16BIT) +- cnt >>= 1; ++ cnt = (cnt + 1) >> 1; + + while(cnt--) + { +@@ -201,17 +220,40 @@ + if (x >= COMPEX_RL2000_TRIES) + printf("Warning: Compex RL2000 aborted wait!\n"); + #endif /* COMPEX_RL2000_FIX */ ++#ifndef INCLUDE_WD + while((inb(eth_nic_base + D8390_P0_ISR) & D8390_ISR_RDC) + != D8390_ISR_RDC); + #endif ++#endif + } + #else + /************************************************************************** + ETH_PIO_READ - Dummy routine when NE2000 not compiled in + **************************************************************************/ +-static void eth_pio_read(unsigned int src, unsigned char *dst, unsigned int cnt) {} ++static void eth_pio_read(unsigned int src __unused, unsigned char *dst __unused, unsigned int cnt __unused) {} + #endif + ++ ++/************************************************************************** ++enable_multycast - Enable Multicast ++**************************************************************************/ ++static void enable_multicast(unsigned short eth_nic_base) ++{ ++ unsigned char mcfilter[8]; ++ int i; ++ memset(mcfilter, 0xFF, 8); ++ outb(4, eth_nic_base+D8390_P0_RCR); ++ outb(D8390_COMMAND_RD2 + D8390_COMMAND_PS1, eth_nic_base + D8390_P0_COMMAND); ++ for(i=0;i<8;i++) ++ { ++ outb(mcfilter[i], eth_nic_base + 8 + i); ++ if(inb(eth_nic_base + 8 + i)!=mcfilter[i]) ++ printf("Error SMC 83C690 Multicast filter read/write mishap %d\n",i); ++ } ++ outb(D8390_COMMAND_RD2 + D8390_COMMAND_PS0, eth_nic_base + D8390_P0_COMMAND); ++ outb(4 | 0x08, eth_nic_base+D8390_P0_RCR); ++} ++ + /************************************************************************** + NS8390_RESET - Reset adapter + **************************************************************************/ +@@ -238,7 +280,14 @@ + outb(eth_tx_start, eth_nic_base+D8390_P0_TPSR); + outb(eth_rx_start, eth_nic_base+D8390_P0_PSTART); + #ifdef INCLUDE_WD +- if (eth_flags & FLAG_790) outb(0, eth_nic_base + 0x09); ++ if (eth_flags & FLAG_790) { ++#ifdef WD_790_PIO ++ outb(0x10, eth_asic_base + 0x06); /* disable interrupts, enable PIO */ ++ outb(0x01, eth_nic_base + 0x09); /* enable ring read auto-wrap */ ++#else ++ outb(0, eth_nic_base + 0x09); ++#endif ++ } + #endif + outb(eth_memsize, eth_nic_base+D8390_P0_PSTOP); + outb(eth_memsize - 1, eth_nic_base+D8390_P0_BOUND); +@@ -266,8 +315,10 @@ + outb(D8390_COMMAND_PS0 | + D8390_COMMAND_RD2 | D8390_COMMAND_STA, eth_nic_base+D8390_P0_COMMAND); + outb(0xFF, eth_nic_base+D8390_P0_ISR); +- outb(0, eth_nic_base+D8390_P0_TCR); +- outb(4, eth_nic_base+D8390_P0_RCR); /* allow broadcast frames */ ++ outb(0, eth_nic_base+D8390_P0_TCR); /* transmitter on */ ++ outb(4, eth_nic_base+D8390_P0_RCR); /* allow rx broadcast frames */ ++ ++ enable_multicast(eth_nic_base); + + #ifdef INCLUDE_3C503 + /* +@@ -281,7 +332,7 @@ + #endif + } + +-static int ns8390_poll(struct nic *nic); ++static int ns8390_poll(struct nic *nic, int retrieve); + + #ifndef INCLUDE_3C503 + /************************************************************************** +@@ -324,7 +375,7 @@ + + /* clear the RX ring, acknowledge overrun interrupt */ + eth_drain_receiver = 1; +- while (ns8390_poll(nic)) ++ while (ns8390_poll(nic, 1)) + /* Nothing */; + eth_drain_receiver = 0; + outb(D8390_ISR_OVW, eth_nic_base+D8390_P0_ISR); +@@ -344,50 +395,54 @@ + unsigned int s, /* size */ + const char *p) /* Packet */ + { ++#if defined(INCLUDE_3C503) || (defined(INCLUDE_WD) && ! defined(WD_790_PIO)) ++ Address eth_vmem = bus_to_virt(eth_bmem); ++#endif + #ifdef INCLUDE_3C503 + if (!(eth_flags & FLAG_PIO)) { +- memcpy((char *)eth_bmem, d, ETH_ALEN); /* dst */ +- memcpy((char *)eth_bmem+ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ +- *((char *)eth_bmem+12) = t>>8; /* type */ +- *((char *)eth_bmem+13) = t; +- memcpy((char *)eth_bmem+ETH_HLEN, p, s); ++ memcpy((char *)eth_vmem, d, ETH_ALEN); /* dst */ ++ memcpy((char *)eth_vmem+ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ ++ *((char *)eth_vmem+12) = t>>8; /* type */ ++ *((char *)eth_vmem+13) = t; ++ memcpy((char *)eth_vmem+ETH_HLEN, p, s); + s += ETH_HLEN; +- while (s < ETH_ZLEN) *((char *)eth_bmem+(s++)) = 0; ++ while (s < ETH_ZLEN) *((char *)eth_vmem+(s++)) = 0; + } + #endif + + #ifdef INCLUDE_WD +- /* Memory interface */ + if (eth_flags & FLAG_16BIT) { + outb(eth_laar | WD_LAAR_M16EN, eth_asic_base + WD_LAAR); + inb(0x84); + } ++#ifndef WD_790_PIO ++ /* Memory interface */ + if (eth_flags & FLAG_790) { + outb(WD_MSR_MENB, eth_asic_base + WD_MSR); + inb(0x84); + } + inb(0x84); +- memcpy((char *)eth_bmem, d, ETH_ALEN); /* dst */ +- memcpy((char *)eth_bmem+ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ +- *((char *)eth_bmem+12) = t>>8; /* type */ +- *((char *)eth_bmem+13) = t; +- memcpy((char *)eth_bmem+ETH_HLEN, p, s); ++ memcpy((char *)eth_vmem, d, ETH_ALEN); /* dst */ ++ memcpy((char *)eth_vmem+ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ ++ *((char *)eth_vmem+12) = t>>8; /* type */ ++ *((char *)eth_vmem+13) = t; ++ memcpy((char *)eth_vmem+ETH_HLEN, p, s); + s += ETH_HLEN; +- while (s < ETH_ZLEN) *((char *)eth_bmem+(s++)) = 0; ++ while (s < ETH_ZLEN) *((char *)eth_vmem+(s++)) = 0; + if (eth_flags & FLAG_790) { + outb(0, eth_asic_base + WD_MSR); + inb(0x84); + } +- if (eth_flags & FLAG_16BIT) { +- outb(eth_laar & ~WD_LAAR_M16EN, eth_asic_base + WD_LAAR); +- inb(0x84); +- } ++#else ++ inb(0x84); ++#endif + #endif + + #if defined(INCLUDE_3C503) +- if (eth_flags & FLAG_PIO) { ++ if (eth_flags & FLAG_PIO) + #endif +-#if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) || (defined(INCLUDE_3C503) && !defined(T503_SHMEM)) ++#if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) || (defined(INCLUDE_3C503) && !defined(T503_SHMEM)) || (defined(INCLUDE_WD) && defined(WD_790_PIO)) ++ { + /* Programmed I/O */ + unsigned short type; + type = (t >> 8) | (t << 8); +@@ -398,12 +453,16 @@ + eth_pio_write(p, (eth_tx_start<<8)+ETH_HLEN, s); + s += ETH_HLEN; + if (s < ETH_ZLEN) s = ETH_ZLEN; ++ } + #endif + #if defined(INCLUDE_3C503) +- } + #endif + + #ifdef INCLUDE_WD ++ if (eth_flags & FLAG_16BIT) { ++ outb(eth_laar & ~WD_LAAR_M16EN, eth_asic_base + WD_LAAR); ++ inb(0x84); ++ } + if (eth_flags & FLAG_790) + outb(D8390_COMMAND_PS0 | + D8390_COMMAND_STA, eth_nic_base+D8390_P0_COMMAND); +@@ -428,7 +487,7 @@ + /************************************************************************** + NS8390_POLL - Wait for a frame + **************************************************************************/ +-static int ns8390_poll(struct nic *nic) ++static int ns8390_poll(struct nic *nic, int retrieve) + { + int ret = 0; + unsigned char rstat, curr, next; +@@ -453,22 +512,27 @@ + outb(D8390_COMMAND_PS0, eth_nic_base+D8390_P0_COMMAND); + if (curr >= eth_memsize) curr=eth_rx_start; + if (curr == next) return(0); ++ ++ if ( ! retrieve ) return 1; ++ + #ifdef INCLUDE_WD + if (eth_flags & FLAG_16BIT) { + outb(eth_laar | WD_LAAR_M16EN, eth_asic_base + WD_LAAR); + inb(0x84); + } ++#ifndef WD_790_PIO + if (eth_flags & FLAG_790) { + outb(WD_MSR_MENB, eth_asic_base + WD_MSR); + inb(0x84); + } ++#endif + inb(0x84); + #endif + pktoff = next << 8; + if (eth_flags & FLAG_PIO) + eth_pio_read(pktoff, (char *)&pkthdr, 4); + else +- memcpy(&pkthdr, (char *)eth_rmem + pktoff, 4); ++ memcpy(&pkthdr, bus_to_virt(eth_rmem + pktoff), 4); + pktoff += sizeof(pkthdr); + /* incoming length includes FCS so must sub 4 */ + len = pkthdr.len - 4; +@@ -486,7 +550,7 @@ + if (eth_flags & FLAG_PIO) + eth_pio_read(pktoff, p, frag); + else +- memcpy(p, (char *)eth_rmem + pktoff, frag); ++ memcpy(p, bus_to_virt(eth_rmem + pktoff), frag); + pktoff = eth_rx_start << 8; + p += frag; + len -= frag; +@@ -495,14 +559,16 @@ + if (eth_flags & FLAG_PIO) + eth_pio_read(pktoff, p, len); + else +- memcpy(p, (char *)eth_rmem + pktoff, len); ++ memcpy(p, bus_to_virt(eth_rmem + pktoff), len); + ret = 1; + } + #ifdef INCLUDE_WD ++#ifndef WD_790_PIO + if (eth_flags & FLAG_790) { + outb(0, eth_asic_base + WD_MSR); + inb(0x84); + } ++#endif + if (eth_flags & FLAG_16BIT) { + outb(eth_laar & ~WD_LAAR_M16EN, eth_asic_base + WD_LAAR); + inb(0x84); +@@ -519,31 +585,56 @@ + /************************************************************************** + NS8390_DISABLE - Turn off adapter + **************************************************************************/ +-static void ns8390_disable(struct nic *nic) ++static void ns8390_disable(struct dev *dev) + { ++ struct nic *nic = (struct nic *)dev; ++ /* reset and disable merge */ ++ ns8390_reset(nic); ++} ++ ++/************************************************************************** ++NS8390_IRQ - Enable, Disable, or Force interrupts ++**************************************************************************/ ++static void ns8390_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } + } + + /************************************************************************** + ETH_PROBE - Look for an adapter + **************************************************************************/ + #ifdef INCLUDE_NS8390 +-struct nic *eth_probe(struct nic *nic, unsigned short *probe_addrs, +- struct pci_device *pci) ++static int eth_probe (struct dev *dev, struct pci_device *pci) + #else +-struct nic *eth_probe(struct nic *nic, unsigned short *probe_addrs) ++static int eth_probe (struct dev *dev, unsigned short *probe_addrs __unused) + #endif + { ++ struct nic *nic = (struct nic *)dev; + int i; +- struct wd_board *brd; +- unsigned short chksum; +- unsigned char c; ++#ifdef INCLUDE_NS8390 ++ unsigned short pci_probe_addrs[] = { pci->ioaddr, 0 }; ++ unsigned short *probe_addrs = pci_probe_addrs; ++#endif + eth_vendor = VENDOR_NONE; + eth_drain_receiver = 0; + ++ nic->irqno = 0; ++ + #ifdef INCLUDE_WD ++{ + /****************************************************************** + Search for WD/SMC cards + ******************************************************************/ ++ struct wd_board *brd; ++ unsigned short chksum; ++ unsigned char c; + for (eth_asic_base = WD_LOW_BASE; eth_asic_base <= WD_HIGH_BASE; + eth_asic_base += 0x20) { + chksum = 0; +@@ -560,6 +651,9 @@ + /* We've found a board */ + eth_vendor = VENDOR_WD; + eth_nic_base = eth_asic_base + WD_NIC_ADDR; ++ ++ nic->ioaddr = eth_nic_base; ++ + c = inb(eth_asic_base+WD_BID); /* Get board id */ + for (brd = wd_boards; brd->name; brd++) + if (brd->id == c) break; +@@ -582,8 +676,9 @@ + } else + eth_bmem = WD_DEFAULT_MEM; + if (brd->id == TYPE_SMC8216T || brd->id == TYPE_SMC8216C) { +- *((unsigned int *)(eth_bmem + 8192)) = (unsigned int)0; +- if (*((unsigned int *)(eth_bmem + 8192))) { ++ /* from Linux driver, 8416BT detects as 8216 sometimes */ ++ unsigned int addr = inb(eth_asic_base + 0xb); ++ if (((addr >> 4) & 3) == 0) { + brd += 2; + eth_memsize = brd->memsize; + } +@@ -592,19 +687,27 @@ + for (i=0; inode_addr[i] = inb(i+eth_asic_base+WD_LAR); + } +- printf("\n%s base %#hx, memory %#hx, addr %!\n", +- brd->name, eth_asic_base, eth_bmem, nic->node_addr); ++ printf("\n%s base %#hx", brd->name, eth_asic_base); + if (eth_flags & FLAG_790) { ++#ifdef WD_790_PIO ++ printf(", PIO mode, addr %!\n", nic->node_addr); ++ eth_bmem = 0; ++ eth_flags |= FLAG_PIO; /* force PIO mode */ ++ outb(0, eth_asic_base+WD_MSR); ++#else ++ printf(", memory %#x, addr %!\n", eth_bmem, nic->node_addr); + outb(WD_MSR_MENB, eth_asic_base+WD_MSR); + outb((inb(eth_asic_base+0x04) | + 0x80), eth_asic_base+0x04); +- outb((((unsigned)eth_bmem >> 13) & 0x0F) | +- (((unsigned)eth_bmem >> 11) & 0x40) | ++ outb(((unsigned)(eth_bmem >> 13) & 0x0F) | ++ ((unsigned)(eth_bmem >> 11) & 0x40) | + (inb(eth_asic_base+0x0B) & 0xB0), eth_asic_base+0x0B); + outb((inb(eth_asic_base+0x04) & + ~0x80), eth_asic_base+0x04); ++#endif + } else { +- outb((((unsigned)eth_bmem >> 13) & 0x3F) | 0x40, eth_asic_base+WD_MSR); ++ printf(", memory %#x, addr %!\n", eth_bmem, nic->node_addr); ++ outb(((unsigned)(eth_bmem >> 13) & 0x3F) | 0x40, eth_asic_base+WD_MSR); + } + if (eth_flags & FLAG_16BIT) { + if (eth_flags & FLAG_790) { +@@ -624,8 +727,14 @@ + } + inb(0x84); + } ++} + #endif + #ifdef INCLUDE_3C503 ++#ifdef T503_AUI ++ nic->flags = 1; /* aui */ ++#else ++ nic->flags = 0; /* no aui */ ++#endif + /****************************************************************** + Search for 3Com 3c503 if no WD/SMC cards + ******************************************************************/ +@@ -708,11 +817,12 @@ + /* Get our ethernet address */ + + outb(_3COM_CR_EALO | _3COM_CR_XSEL, eth_asic_base + _3COM_CR); ++ nic->ioaddr = eth_nic_base; + printf("\n3Com 3c503 base %#hx, ", eth_nic_base); + if (eth_flags & FLAG_PIO) + printf("PIO mode"); + else +- printf("memory %#hx", eth_bmem); ++ printf("memory %#x", eth_bmem); + for (i=0; inode_addr[i] = inb(eth_nic_base+i); + } +@@ -734,9 +844,9 @@ + */ + + if (!(eth_flags & FLAG_PIO)) { +- memset((char *)eth_bmem, 0, 0x2000); ++ memset(bus_to_virt(eth_bmem), 0, 0x2000); + for(i = 0; i < 0x2000; ++i) +- if (*(((char *)eth_bmem)+i)) { ++ if (*((char *)(bus_to_virt(eth_bmem+i)))) { + printf ("Failed to clear 3c503 shared mem.\n"); + return (0); + } +@@ -749,9 +859,11 @@ + } + #endif + #if defined(INCLUDE_NE) || defined(INCLUDE_NS8390) ++{ + /****************************************************************** + Search for NE1000/2000 if no WD/SMC or 3com cards + ******************************************************************/ ++ unsigned char c; + if (eth_vendor == VENDOR_NONE) { + char romdata[16], testbuf[32]; + int idx; +@@ -810,23 +922,94 @@ + for (i=0; inode_addr[i] = romdata[i + ((eth_flags & FLAG_16BIT) ? i : 0)]; + } ++ nic->ioaddr = eth_nic_base; + printf("\nNE%c000 base %#hx, addr %!\n", + (eth_flags & FLAG_16BIT) ? '2' : '1', eth_nic_base, + nic->node_addr); + } ++} + #endif + if (eth_vendor == VENDOR_NONE) + return(0); + if (eth_vendor != VENDOR_3COM) + eth_rmem = eth_bmem; + ns8390_reset(nic); +- nic->reset = ns8390_reset; +- nic->poll = ns8390_poll; ++ ++ dev->disable = ns8390_disable; ++ nic->poll = ns8390_poll; + nic->transmit = ns8390_transmit; +- nic->disable = ns8390_disable; +- return(nic); ++ nic->irq = ns8390_irq; ++ ++ /* Based on PnP ISA map */ ++#ifdef INCLUDE_WD ++ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); ++ dev->devid.device_id = htons(0x812a); ++#endif ++#ifdef INCLUDE_3C503 ++ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); ++ dev->devid.device_id = htons(0x80f3); ++#endif ++#ifdef INCLUDE_NE ++ dev->devid.vendor_id = htons(GENERIC_ISAPNP_VENDOR); ++ dev->devid.device_id = htons(0x80d6); ++#endif ++ return 1; + } + ++#ifdef INCLUDE_WD ++static struct isa_driver wd_driver __isa_driver = { ++ .type = NIC_DRIVER, ++ .name = "WD", ++ .probe = wd_probe, ++ .ioaddrs = 0, ++}; ++#endif ++ ++#ifdef INCLUDE_3C503 ++static struct isa_driver t503_driver __isa_driver = { ++ .type = NIC_DRIVER, ++ .name = "3C503", ++ .probe = t503_probe, ++ .ioaddrs = 0, ++}; ++#endif ++ ++#ifdef INCLUDE_NE ++static struct isa_driver ne_driver __isa_driver = { ++ .type = NIC_DRIVER, ++ .name = "NE*000", ++ .probe = ne_probe, ++ .ioaddrs = 0, ++}; ++#endif ++ ++#ifdef INCLUDE_NS8390 ++static struct pci_id nepci_nics[] = { ++/* A few NE2000 PCI clones, list not exhaustive */ ++PCI_ROM(0x10ec, 0x8029, "rtl8029", "Realtek 8029"), ++PCI_ROM(0x1186, 0x0300, "dlink-528", "D-Link DE-528"), ++PCI_ROM(0x1050, 0x0940, "winbond940", "Winbond NE2000-PCI"), /* Winbond 86C940 / 89C940 */ ++PCI_ROM(0x1050, 0x5a5a, "winbond940f", "Winbond W89c940F"), /* Winbond 89C940F */ ++PCI_ROM(0x11f6, 0x1401, "compexrl2000", "Compex ReadyLink 2000"), ++PCI_ROM(0x8e2e, 0x3000, "ktiet32p2", "KTI ET32P2"), ++PCI_ROM(0x4a14, 0x5000, "nv5000sc", "NetVin NV5000SC"), ++PCI_ROM(0x12c3, 0x0058, "holtek80232", "Holtek HT80232"), ++PCI_ROM(0x12c3, 0x5598, "holtek80229", "Holtek HT80229"), ++PCI_ROM(0x10bd, 0x0e34, "surecom-ne34", "Surecom NE34"), ++PCI_ROM(0x1106, 0x0926, "via86c926", "Via 86c926"), ++}; ++ ++struct pci_driver nepci_driver = { ++ .type = NIC_DRIVER, ++ .name = "NE2000/PCI", ++ .probe = nepci_probe, ++ .ids = nepci_nics, ++ .id_count = sizeof(nepci_nics)/sizeof(nepci_nics[0]), ++ .class = 0, ++}; ++ ++#endif /* INCLUDE_NS8390 */ ++ + /* + * Local variables: + * c-basic-offset: 8 +Index: b/netboot/osdep.h +=================================================================== +--- a/netboot/osdep.h ++++ b/netboot/osdep.h +@@ -1,94 +1,18 @@ +-#ifndef __OSDEP_H__ +-#define __OSDEP_H__ ++#ifndef _OSDEP_H ++#define _OSDEP_H + +-/* +- * 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, or (at +- * your option) any later version. +- */ ++#define __unused __attribute__((unused)) ++#define __aligned __attribute__((aligned(16))) + +-#define __LITTLE_ENDIAN /* x86 */ +- +-/* Taken from /usr/include/linux/hfs_sysdep.h */ +-#if defined(__BIG_ENDIAN) +-# if !defined(__constant_htonl) +-# define __constant_htonl(x) (x) +-# endif +-# if !defined(__constant_htons) +-# define __constant_htons(x) (x) +-# endif +-#elif defined(__LITTLE_ENDIAN) +-# if !defined(__constant_htonl) +-# define __constant_htonl(x) \ +- ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \ +- (((unsigned long int)(x) & 0x0000ff00U) << 8) | \ +- (((unsigned long int)(x) & 0x00ff0000U) >> 8) | \ +- (((unsigned long int)(x) & 0xff000000U) >> 24))) +-# endif +-# if !defined(__constant_htons) +-# define __constant_htons(x) \ +- ((unsigned short int)((((unsigned short int)(x) & 0x00ff) << 8) | \ +- (((unsigned short int)(x) & 0xff00) >> 8))) +-# endif +-#else +-# error "Don't know if bytes are big- or little-endian!" +-#endif +- +-#define ntohl(x) \ +-(__builtin_constant_p(x) ? \ +- __constant_htonl((x)) : \ +- __swap32(x)) +-#define htonl(x) \ +-(__builtin_constant_p(x) ? \ +- __constant_htonl((x)) : \ +- __swap32(x)) +-#define ntohs(x) \ +-(__builtin_constant_p(x) ? \ +- __constant_htons((x)) : \ +- __swap16(x)) +-#define htons(x) \ +-(__builtin_constant_p(x) ? \ +- __constant_htons((x)) : \ +- __swap16(x)) +- +-static inline unsigned long int __swap32(unsigned long int x) +-{ +- __asm__("xchgb %b0,%h0\n\t" +- "rorl $16,%0\n\t" +- "xchgb %b0,%h0" +- : "=q" (x) +- : "0" (x)); +- return x; +-} +- +-static inline unsigned short int __swap16(unsigned short int x) +-{ +- __asm__("xchgb %b0,%h0" +- : "=q" (x) +- : "0" (x)); +- return x; +-} +- +-/* Make routines available to all */ +-#define swap32(x) __swap32(x) +-#define swap16(x) __swap16(x) +- +-#include "linux-asm-io.h" +- +-typedef unsigned long Address; ++#include "io.h" ++#include "byteswap.h" ++#include "latch.h" + + /* ANSI prototyping macro */ + #ifdef __STDC__ +-#define P(x) x ++# define P(x) x + #else +-#define P(x) () ++# define P(x) () + #endif + + #endif +- +-/* +- * Local variables: +- * c-basic-offset: 8 +- * End: +- */ +Index: b/netboot/otulip.c +=================================================================== +--- a/netboot/otulip.c ++++ /dev/null +@@ -1,374 +0,0 @@ +-/* +- Etherboot DEC Tulip driver +- adapted by Ken Yap from +- +- FreeBSD netboot DEC 21143 driver +- +- Author: David Sharp +- date: Nov/98 +- +- Known to work on DEC DE500 using 21143-PC chipset. +- Even on cards with the same chipset there can be +- incompatablity problems with the way media selection +- and status LED settings are done. See comments below. +- +- Some code fragments were taken from verious places, +- Ken Yap's etherboot, FreeBSD's if_de.c, and various +- Linux related files. DEC's manuals for the 21143 and +- SROM format were very helpful. The Linux de driver +- development page has a number of links to useful +- related information. Have a look at: +- ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/tulip-devel.html +- +-*/ +- +-#include "etherboot.h" +-#include "nic.h" +-#include "pci.h" +-#include "cards.h" +-#include "otulip.h" +- +-static unsigned short vendor, dev_id; +-static unsigned short ioaddr; +-static unsigned int *membase; +-static unsigned char srom[1024]; +- +-#define BUFLEN 1536 /* must be longword divisable */ +- /* buffers must be longword aligned */ +- +-/* transmit descriptor and buffer */ +-static struct txdesc txd; +- +-/* receive descriptor(s) and buffer(s) */ +-#define NRXD 4 +-static struct rxdesc rxd[NRXD]; +-static int rxd_tail = 0; +-#ifdef USE_LOWMEM_BUFFER +-#define rxb ((char *)0x10000 - NRXD * BUFLEN) +-#define txb ((char *)0x10000 - NRXD * BUFLEN - BUFLEN) +-#else +-static unsigned char rxb[NRXD * BUFLEN]; +-static unsigned char txb[BUFLEN]; +-#endif +- +-static unsigned char ehdr[ETH_HLEN]; /* buffer for ethernet header */ +- +-enum tulip_offsets { +- CSR0=0, CSR1=0x08, CSR2=0x10, CSR3=0x18, CSR4=0x20, CSR5=0x28, +- CSR6=0x30, CSR7=0x38, CSR8=0x40, CSR9=0x48, CSR10=0x50, CSR11=0x58, +- CSR12=0x60, CSR13=0x68, CSR14=0x70, CSR15=0x78 }; +- +- +-/***************************************************************************/ +-/* 21143 specific stuff */ +-/***************************************************************************/ +- +-/* XXX assume 33MHz PCI bus, this is not very accurate and should be +- used only with gross over estimations of required delay times unless +- you tune UADJUST to your specific processor and I/O subsystem */ +- +-#define UADJUST 870 +-static void udelay(unsigned long usec) { +- unsigned long i; +- for (i=((usec*UADJUST)/33)+1; i>0; i--) (void) TULIP_CSR_READ(csr_0); +-} +- +-/* The following srom related code was taken from FreeBSD's if_de.c */ +-/* with minor alterations to make it work here. the Linux code is */ +-/* better but this was easier to use */ +- +-static void delay_300ns(void) +-{ +- int idx; +- for (idx = (300 / 33) + 1; idx > 0; idx--) +- (void) TULIP_CSR_READ(csr_busmode); +-} +- +-#define EMIT do { TULIP_CSR_WRITE(csr_srom_mii, csr); delay_300ns(); } while (0) +- +-static void srom_idle(void) +-{ +- unsigned bit, csr; +- +- csr = SROMSEL ; EMIT; +- csr = SROMSEL | SROMRD; EMIT; +- csr ^= SROMCS; EMIT; +- csr ^= SROMCLKON; EMIT; +- /* +- * Write 25 cycles of 0 which will force the SROM to be idle. +- */ +- for (bit = 3 + SROM_BITWIDTH + 16; bit > 0; bit--) { +- csr ^= SROMCLKOFF; EMIT; /* clock low; data not valid */ +- csr ^= SROMCLKON; EMIT; /* clock high; data valid */ +- } +- csr ^= SROMCLKOFF; EMIT; +- csr ^= SROMCS; EMIT; +- csr = 0; EMIT; +-} +- +-static void srom_read(void) +-{ +- unsigned idx; +- const unsigned bitwidth = SROM_BITWIDTH; +- const unsigned cmdmask = (SROMCMD_RD << bitwidth); +- const unsigned msb = 1 << (bitwidth + 3 - 1); +- unsigned lastidx = (1 << bitwidth) - 1; +- +- srom_idle(); +- +- for (idx = 0; idx <= lastidx; idx++) { +- unsigned lastbit, data, bits, bit, csr; +- csr = SROMSEL ; EMIT; +- csr = SROMSEL | SROMRD; EMIT; +- csr ^= SROMCSON; EMIT; +- csr ^= SROMCLKON; EMIT; +- +- lastbit = 0; +- for (bits = idx|cmdmask, bit = bitwidth + 3; bit > 0; bit--, bits <<= 1) +- { +- const unsigned thisbit = bits & msb; +- csr ^= SROMCLKOFF; EMIT; /* clock low; data not valid */ +- if (thisbit != lastbit) { +- csr ^= SROMDOUT; EMIT; /* clock low; invert data */ +- } else { +- EMIT; +- } +- csr ^= SROMCLKON; EMIT; /* clock high; data valid */ +- lastbit = thisbit; +- } +- csr ^= SROMCLKOFF; EMIT; +- +- for (data = 0, bits = 0; bits < 16; bits++) { +- data <<= 1; +- csr ^= SROMCLKON; EMIT; /* clock high; data valid */ +- data |= TULIP_CSR_READ(csr_srom_mii) & SROMDIN ? 1 : 0; +- csr ^= SROMCLKOFF; EMIT; /* clock low; data not valid */ +- } +- srom[idx*2] = data & 0xFF; +- srom[idx*2+1] = data >> 8; +- csr = SROMSEL | SROMRD; EMIT; +- csr = 0; EMIT; +- } +- srom_idle(); +-} +- +-/************************************************************************** +-ETH_RESET - Reset adapter +-***************************************************************************/ +-static void tulip_reset(struct nic *nic) +-{ +- int x,cnt=2; +- +- outl(0x00000001, ioaddr + CSR0); +- udelay(1000); +- /* turn off reset and set cache align=16lword, burst=unlimit */ +- outl(0x01A08000, ioaddr + CSR0); +- +- /* for some reason the media selection does not take +- the first time se it is repeated. */ +- +- while(cnt--) { +- /* stop TX,RX processes */ +- if (cnt == 1) +- outl(0x32404000, ioaddr + CSR6); +- else +- outl(0x32000040, ioaddr + CSR6); +- +- /* XXX - media selection is vendor specific and hard coded right +- here. This should be fixed to use the hints in the SROM and +- allow media selection by the user at runtime. MII support +- should also be added. Support for chips other than the +- 21143 should be added here as well */ +- +- /* start set to 10Mbps half-duplex */ +- +- /* setup SIA */ +- outl(0x0, ioaddr + CSR13); /* reset SIA */ +- outl(0x7f3f, ioaddr + CSR14); +- outl(0x8000008, ioaddr + CSR15); +- outl(0x0, ioaddr + CSR13); +- outl(0x1, ioaddr + CSR13); +- outl(0x2404000, ioaddr + CSR6); +- +- /* initalize GP */ +- outl(0x8af0008, ioaddr + CSR15); +- outl(0x50008, ioaddr + CSR15); +- +- /* end set to 10Mbps half-duplex */ +- +- if (vendor == PCI_VENDOR_ID_MACRONIX && dev_id == PCI_DEVICE_ID_MX987x5) { +- /* do stuff for MX98715 */ +- outl(0x01a80000, ioaddr + CSR6); +- outl(0xFFFFFFFF, ioaddr + CSR14); +- outl(0x00001000, ioaddr + CSR12); +- } +- +- outl(0x0, ioaddr + CSR7); /* disable interrupts */ +- +- /* construct setup packet which is used by the 21143 to +- program its CAM to recognize interesting MAC addresses */ +- +- memset(&txd, 0, sizeof(struct txdesc)); +- txd.buf1addr = &txb[0]; +- txd.buf2addr = &txb[0]; /* just in case */ +- txd.buf1sz = 192; /* setup packet must be 192 bytes */ +- txd.buf2sz = 0; +- txd.control = 0x020; /* setup packet */ +- txd.status = 0x80000000; /* give ownership to 21143 */ +- +- /* construct perfect filter frame */ +- /* with mac address as first match */ +- /* and broadcast address for all others */ +- +- for(x=0;x<192;x++) txb[x] = 0xff; +- txb[0] = nic->node_addr[0]; +- txb[1] = nic->node_addr[1]; +- txb[4] = nic->node_addr[2]; +- txb[5] = nic->node_addr[3]; +- txb[8] = nic->node_addr[4]; +- txb[9] = nic->node_addr[5]; +- outl((unsigned long)&txd, ioaddr + CSR4); /* set xmit buf */ +- outl(0x2406000, ioaddr + CSR6); /* start transmiter */ +- +- udelay(50000); /* wait for the setup packet to be processed */ +- +- } +- +- /* setup receive descriptor */ +- { +- int x; +- for(x=0;xnode_addr, ETH_ALEN); +- ehdr[ETH_ALEN*2] = (t >> 8) & 0xff; +- ehdr[ETH_ALEN*2+1] = t & 0xff; +- +- /* setup the transmit descriptor */ +- +- memset(&txd, 0, sizeof(struct txdesc)); +- +- txd.buf1addr = &ehdr[0]; /* ethernet header */ +- txd.buf1sz = ETH_HLEN; +- +- txd.buf2addr = p; /* packet to transmit */ +- txd.buf2sz = s; +- +- txd.control = 0x188; /* LS+FS+TER */ +- +- txd.status = 0x80000000; /* give it to 21143 */ +- +- outl(inl(ioaddr + CSR6) & ~0x00004000, ioaddr + CSR6); +- outl((unsigned long)&txd, ioaddr + CSR4); +- outl(inl(ioaddr + CSR6) | 0x00004000, ioaddr + CSR6); +- +-/* Wait for transmit to complete before returning. not well tested. +- +- time = currticks(); +- while(txd.status & 0x80000000) { +- if (currticks() - time > 20) { +- printf("transmit timeout.\n"); +- break; +- } +- } +-*/ +- +-} +- +-/************************************************************************** +-ETH_POLL - Wait for a frame +-***************************************************************************/ +-static int tulip_poll(struct nic *nic) +-{ +- if (rxd[rxd_tail].status & 0x80000000) return 0; +- +- nic->packetlen = (rxd[rxd_tail].status & 0x3FFF0000) >> 16; +- +- /* copy packet to working buffer */ +- /* XXX - this copy could be avoided with a little more work +- but for now we are content with it because the optimised +- memcpy(, , ) is quite fast */ +- +- memcpy(nic->packet, rxb + rxd_tail * BUFLEN, nic->packetlen); +- +- /* return the descriptor and buffer to recieve ring */ +- rxd[rxd_tail].status = 0x80000000; +- rxd_tail++; +- if (rxd_tail == NRXD) rxd_tail = 0; +- +- return 1; +-} +- +-static void tulip_disable(struct nic *nic) +-{ +- /* nothing for the moment */ +-} +- +-/************************************************************************** +-ETH_PROBE - Look for an adapter +-***************************************************************************/ +-struct nic *otulip_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) +-{ +- int i; +- +- if (io_addrs == 0 || *io_addrs == 0) +- return (0); +- vendor = pci->vendor; +- dev_id = pci->dev_id; +- ioaddr = *io_addrs; +- membase = (unsigned int *)pci->membase; +- +- /* wakeup chip */ +- pcibios_write_config_dword(pci->bus,pci->devfn,0x40,0x00000000); +- +- /* Stop the chip's Tx and Rx processes. */ +- /* outl(inl(ioaddr + CSR6) & ~0x2002, ioaddr + CSR6); */ +- /* Clear the missed-packet counter. */ +- /* (volatile int)inl(ioaddr + CSR8); */ +- +- srom_read(); +- +- for (i=0; i < ETH_ALEN; i++) +- nic->node_addr[i] = srom[20+i]; +- +- printf("Tulip %! at ioaddr %#hX\n", nic->node_addr, ioaddr); +- +- tulip_reset(nic); +- +- nic->reset = tulip_reset; +- nic->poll = tulip_poll; +- nic->transmit = tulip_transmit; +- nic->disable = tulip_disable; +- return nic; +-} +Index: b/netboot/otulip.h +=================================================================== +--- a/netboot/otulip.h ++++ /dev/null +@@ -1,76 +0,0 @@ +-/* mostly stolen from FreeBSD if_de.c, if_devar.h */ +- +-#define TULIP_CSR_READ(csr) (membase[csr*2]) +-#define CSR_READ(csr) (membase[csr*2]) +-#define TULIP_CSR_WRITE(csr, val) (membase[csr*2] = val) +-#define CSR_WRITE(csr, val) (membase[csr*2] = val) +- +-#define csr_0 0 +-#define csr_1 1 +-#define csr_2 2 +-#define csr_3 3 +-#define csr_4 4 +-#define csr_5 5 +-#define csr_6 6 +-#define csr_7 7 +-#define csr_8 8 +-#define csr_9 9 +-#define csr_10 10 +-#define csr_11 11 +-#define csr_12 12 +-#define csr_13 13 +-#define csr_14 14 +-#define csr_15 15 +- +-#define csr_busmode csr_0 +-#define csr_txpoll csr_1 +-#define csr_rxpoll csr_2 +-#define csr_rxlist csr_3 +-#define csr_txlist csr_4 +-#define csr_status csr_5 +-#define csr_command csr_6 +-#define csr_intr csr_7 +-#define csr_missed_frames csr_8 +-#define csr_enetrom csr_9 /* 21040 */ +-#define csr_reserved csr_10 /* 21040 */ +-#define csr_full_duplex csr_11 /* 21040 */ +-#define csr_bootrom csr_10 /* 21041/21140A/?? */ +-#define csr_gp csr_12 /* 21140* */ +-#define csr_watchdog csr_15 /* 21140* */ +-#define csr_gp_timer csr_11 /* 21041/21140* */ +-#define csr_srom_mii csr_9 /* 21041/21140* */ +-#define csr_sia_status csr_12 /* 2104x */ +-#define csr_sia_connectivity csr_13 /* 2104x */ +-#define csr_sia_tx_rx csr_14 /* 2104x */ +-#define csr_sia_general csr_15 /* 2104x */ +- +-#define SROMSEL 0x0800 +-#define SROMCS 0x0001 +-#define SROMCLKON 0x0002 +-#define SROMCLKOFF 0x0002 +-#define SROMRD 0x4000 +-#define SROMWR 0x2000 +-#define SROM_BITWIDTH 6 +-#define SROMCMD_RD 6 +-#define SROMCSON 0x0001 +-#define SROMDOUT 0x0004 +-#define SROMDIN 0x0008 +- +- +-struct txdesc { +- unsigned long status; /* owner, status */ +- unsigned long buf1sz:11, /* size of buffer 1 */ +- buf2sz:11, /* size of buffer 2 */ +- control:10; /* control bits */ +- const unsigned char *buf1addr; /* buffer 1 address */ +- const unsigned char *buf2addr; /* buffer 2 address */ +-}; +- +-struct rxdesc { +- unsigned long status; /* owner, status */ +- unsigned long buf1sz:11, /* size of buffer 1 */ +- buf2sz:11, /* size of buffer 2 */ +- control:10; /* control bits */ +- unsigned char *buf1addr; /* buffer 1 address */ +- unsigned char *buf2addr; /* buffer 2 address */ +-}; +Index: b/netboot/pci.c +=================================================================== +--- a/netboot/pci.c ++++ b/netboot/pci.c +@@ -1,15 +1,3 @@ +-/* +-** Support for NE2000 PCI clones added David Monro June 1997 +-** Generalised to other NICs by Ken Yap July 1997 +-** +-** Most of this is taken from: +-** +-** /usr/src/linux/drivers/pci/pci.c +-** /usr/src/linux/include/linux/pci.h +-** /usr/src/linux/arch/i386/bios32.c +-** /usr/src/linux/include/linux/bios32.h +-** /usr/src/linux/drivers/net/ne.c +-*/ + + /* + * This program is free software; you can redistribute it and/or +@@ -18,402 +6,294 @@ + * your option) any later version. + */ + +-#include "etherboot.h" ++#include "grub.h" + #include "pci.h" + +-/*#define DEBUG 1*/ +-#define DEBUG 0 +- +-#ifdef CONFIG_PCI_DIRECT +-#define PCIBIOS_SUCCESSFUL 0x00 +- +-/* +- * Functions for accessing PCI configuration space with type 1 accesses +- */ +- +-#define CONFIG_CMD(bus, device_fn, where) (0x80000000 | (bus << 16) | (device_fn << 8) | (where & ~3)) +- +-int pcibios_read_config_byte(unsigned int bus, unsigned int device_fn, +- unsigned int where, unsigned char *value) ++unsigned long virt_offset = 0; ++unsigned long virt_to_phys(volatile const void *virt_addr) + { +- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); +- *value = inb(0xCFC + (where&3)); +- return PCIBIOS_SUCCESSFUL; ++ return ((unsigned long)virt_addr) + virt_offset; + } + +-int pcibios_read_config_word (unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned short *value) ++void *phys_to_virt(unsigned long phys_addr) + { +- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); +- *value = inw(0xCFC + (where&2)); +- return PCIBIOS_SUCCESSFUL; ++ return (void *)(phys_addr - virt_offset); + } + +-int pcibios_read_config_dword (unsigned int bus, unsigned int device_fn, +- unsigned int where, unsigned int *value) +-{ +- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); +- *value = inl(0xCFC); +- return PCIBIOS_SUCCESSFUL; +-} ++#ifdef INCLUDE_3C595 ++extern struct pci_driver t595_driver; ++#endif /* INCLUDE_3C595 */ + +-int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, +- unsigned int where, unsigned char value) +-{ +- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); +- outb(value, 0xCFC + (where&3)); +- return PCIBIOS_SUCCESSFUL; +-} ++#ifdef INCLUDE_3C90X ++extern struct pci_driver a3c90x_driver; ++#endif /* INCLUDE_3C90X */ + +-int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, +- unsigned int where, unsigned short value) +-{ +- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); +- outw(value, 0xCFC + (where&2)); +- return PCIBIOS_SUCCESSFUL; +-} ++#ifdef INCLUDE_DAVICOM ++extern struct pci_driver davicom_driver; ++#endif /* INCLUDE_DAVICOM */ + +-int pcibios_write_config_dword (unsigned int bus, unsigned int device_fn, unsigned int where, unsigned int value) +-{ +- outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); +- outl(value, 0xCFC); +- return PCIBIOS_SUCCESSFUL; +-} ++#ifdef INCLUDE_E1000 ++extern struct pci_driver e1000_driver; ++#endif /* INCLUDE_E1000 */ + +-#undef CONFIG_CMD ++#ifdef INCLUDE_EEPRO100 ++extern struct pci_driver eepro100_driver; ++#endif /* INCLUDE_EEPRO100 */ + +-#else /* CONFIG_PCI_DIRECT not defined */ ++#ifdef INCLUDE_EPIC100 ++extern struct pci_driver epic100_driver; ++#endif /* INCLUDE_EPIC100 */ + +-static struct { +- unsigned long address; +- unsigned short segment; +-} bios32_indirect = { 0, KERN_CODE_SEG }; +- +-static long pcibios_entry; +-static struct { +- unsigned long address; +- unsigned short segment; +-} pci_indirect = { 0, KERN_CODE_SEG }; ++#ifdef INCLUDE_FORCEDETH ++extern struct pci_driver forcedeth_driver; ++#endif /* INCLUDE_FORCEDETH */ + +-static unsigned long bios32_service(unsigned long service) +-{ +- unsigned char return_code; /* %al */ +- unsigned long address; /* %ebx */ +- unsigned long length; /* %ecx */ +- unsigned long entry; /* %edx */ +- unsigned long flags; +- +- save_flags(flags); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%edi)" +-#else +- "lcall *(%%edi)" +-#endif +- : "=a" (return_code), +- "=b" (address), +- "=c" (length), +- "=d" (entry) +- : "0" (service), +- "1" (0), +- "D" (&bios32_indirect)); +- restore_flags(flags); +- +- switch (return_code) { +- case 0: +- return address + entry; +- case 0x80: /* Not present */ +- printf("bios32_service(%d) : not present\n", service); +- return 0; +- default: /* Shouldn't happen */ +- printf("bios32_service(%d) : returned %#X, mail drew@colorado.edu\n", +- service, return_code); +- return 0; +- } +-} ++#ifdef INCLUDE_NATSEMI ++extern struct pci_driver natsemi_driver; ++#endif /* INCLUDE_NATSEMI */ + +-int pcibios_read_config_byte(unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned char *value) +-{ +- unsigned long ret; +- unsigned long bx = (bus << 8) | device_fn; +- unsigned long flags; +- +- save_flags(flags); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%esi)\n\t" +-#else +- "lcall *(%%esi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:" +- : "=c" (*value), +- "=a" (ret) +- : "1" (PCIBIOS_READ_CONFIG_BYTE), +- "b" (bx), +- "D" ((long) where), +- "S" (&pci_indirect)); +- restore_flags(flags); +- return (int) (ret & 0xff00) >> 8; +-} ++#ifdef INCLUDE_NS83820 ++extern struct pci_driver ns83820_driver; ++#endif /* INCLUDE_NS83820 */ + +-int pcibios_read_config_word(unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned short *value) +-{ +- unsigned long ret; +- unsigned long bx = (bus << 8) | device_fn; +- unsigned long flags; +- +- save_flags(flags); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%esi)\n\t" +-#else +- "lcall *(%%esi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:" +- : "=c" (*value), +- "=a" (ret) +- : "1" (PCIBIOS_READ_CONFIG_WORD), +- "b" (bx), +- "D" ((long) where), +- "S" (&pci_indirect)); +- restore_flags(flags); +- return (int) (ret & 0xff00) >> 8; +-} ++#ifdef INCLUDE_NS8390 ++extern struct pci_driver nepci_driver; ++#endif /* INCLUDE_NS8390 */ + +-int pcibios_read_config_dword(unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned int *value) +-{ +- unsigned long ret; +- unsigned long bx = (bus << 8) | device_fn; +- unsigned long flags; +- +- save_flags(flags); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%esi)\n\t" +-#else +- "lcall *(%%esi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:" +- : "=c" (*value), +- "=a" (ret) +- : "1" (PCIBIOS_READ_CONFIG_DWORD), +- "b" (bx), +- "D" ((long) where), +- "S" (&pci_indirect)); +- restore_flags(flags); +- return (int) (ret & 0xff00) >> 8; +-} ++#ifdef INCLUDE_PCNET32 ++extern struct pci_driver pcnet32_driver; ++#endif /* INCLUDE_PCNET32 */ + +-int pcibios_write_config_byte (unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned char value) +-{ +- unsigned long ret; +- unsigned long bx = (bus << 8) | device_fn; +- unsigned long flags; +- +- save_flags(flags); cli(); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%esi)\n\t" +-#else +- "lcall *(%%esi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:" +- : "=a" (ret) +- : "0" (PCIBIOS_WRITE_CONFIG_BYTE), +- "c" (value), +- "b" (bx), +- "D" ((long) where), +- "S" (&pci_indirect)); +- restore_flags(flags); +- return (int) (ret & 0xff00) >> 8; +-} ++#ifdef INCLUDE_PNIC ++extern struct pci_driver pnic_driver; ++#endif /* INCLUDE_PNIC */ + +-int pcibios_write_config_word (unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned short value) +-{ +- unsigned long ret; +- unsigned long bx = (bus << 8) | device_fn; +- unsigned long flags; +- +- save_flags(flags); cli(); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%esi)\n\t" +-#else +- "lcall *(%%esi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:" +- : "=a" (ret) +- : "0" (PCIBIOS_WRITE_CONFIG_WORD), +- "c" (value), +- "b" (bx), +- "D" ((long) where), +- "S" (&pci_indirect)); +- restore_flags(flags); +- return (int) (ret & 0xff00) >> 8; +-} ++#ifdef INCLUDE_RTL8139 ++extern struct pci_driver rtl8139_driver; ++#endif /* INCLUDE_RTL8139 */ + +-int pcibios_write_config_dword (unsigned int bus, +- unsigned int device_fn, unsigned int where, unsigned int value) +-{ +- unsigned long ret; +- unsigned long bx = (bus << 8) | device_fn; +- unsigned long flags; +- +- save_flags(flags); cli(); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%esi)\n\t" +-#else +- "lcall *(%%esi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:" +- : "=a" (ret) +- : "0" (PCIBIOS_WRITE_CONFIG_DWORD), +- "c" (value), +- "b" (bx), +- "D" ((long) where), +- "S" (&pci_indirect)); +- restore_flags(flags); +- return (int) (ret & 0xff00) >> 8; +-} ++#ifdef INCLUDE_SIS900 ++extern struct pci_driver sis900_driver; ++extern struct pci_driver sis_bridge_driver; ++#endif /* INCLUDE_SIS900 */ + +-static void check_pcibios(void) +-{ +- unsigned long signature; +- unsigned char present_status; +- unsigned char major_revision; +- unsigned char minor_revision; +- unsigned long flags; +- int pack; +- +- if ((pcibios_entry = bios32_service(PCI_SERVICE))) { +- pci_indirect.address = pcibios_entry; +- +- save_flags(flags); +- __asm__( +-#ifdef ABSOLUTE_WITHOUT_ASTERISK +- "lcall (%%edi)\n\t" +-#else +- "lcall *(%%edi)\n\t" +-#endif +- "jc 1f\n\t" +- "xor %%ah, %%ah\n" +- "1:\tshl $8, %%eax\n\t" +- "movw %%bx, %%ax" +- : "=d" (signature), +- "=a" (pack) +- : "1" (PCIBIOS_PCI_BIOS_PRESENT), +- "D" (&pci_indirect) +- : "bx", "cx"); +- restore_flags(flags); +- +- present_status = (pack >> 16) & 0xff; +- major_revision = (pack >> 8) & 0xff; +- minor_revision = pack & 0xff; +- if (present_status || (signature != PCI_SIGNATURE)) { +- printf("ERROR: BIOS32 says PCI BIOS, but no PCI " +- "BIOS????\n"); +- pcibios_entry = 0; +- } +-#if DEBUG +- if (pcibios_entry) { +- printf ("pcibios_init : PCI BIOS revision %hhX.%hhX" +- " entry at %#X\n", major_revision, +- minor_revision, pcibios_entry); +- } +-#endif +- } +-} ++#ifdef INCLUDE_SUNDANCE ++extern struct pci_driver sundance_driver; ++#endif /* INCLUDE_SUNDANCE */ + +-static void pcibios_init(void) +-{ +- union bios32 *check; +- unsigned char sum; +- int i, length; +- unsigned long bios32_entry = 0; +- +- /* +- * Follow the standard procedure for locating the BIOS32 Service +- * directory by scanning the permissible address range from +- * 0xe0000 through 0xfffff for a valid BIOS32 structure. +- * +- */ ++#ifdef INCLUDE_TG3 ++extern struct pci_driver tg3_driver; ++#endif /* INCLUDE_TG3 */ ++ ++#ifdef INCLUDE_TLAN ++extern struct pci_driver tlan_driver; ++#endif /* INCLUDE_TLAN */ ++ ++#ifdef INCLUDE_TULIP ++extern struct pci_driver tulip_driver; ++#endif /* INCLUDE_TULIP */ ++ ++#ifdef INCLUDE_UNDI ++extern struct pci_driver undi_driver; ++#endif /* INCLUDE_UNDI */ ++ ++#ifdef INCLUDE_VIA_RHINE ++extern struct pci_driver rhine_driver; ++#endif/* INCLUDE_VIA_RHINE */ ++ ++#ifdef INCLUDE_W89C840 ++extern struct pci_driver w89c840_driver; ++#endif /* INCLUDE_W89C840 */ ++ ++#ifdef INCLUDE_R8169 ++extern struct pci_driver r8169_driver; ++#endif /* INCLUDE_R8169 */ ++ ++static const struct pci_driver *pci_drivers[] = { ++ ++#ifdef INCLUDE_3C595 ++ &t595_driver, ++#endif /* INCLUDE_3C595 */ ++ ++#ifdef INCLUDE_3C90X ++ &a3c90x_driver, ++#endif /* INCLUDE_3C90X */ ++ ++#ifdef INCLUDE_DAVICOM ++ &davicom_driver, ++#endif /* INCLUDE_DAVICOM */ ++ ++#ifdef INCLUDE_E1000 ++ &e1000_driver, ++#endif /* INCLUDE_E1000 */ ++ ++#ifdef INCLUDE_EEPRO100 ++ &eepro100_driver, ++#endif /* INCLUDE_EEPRO100 */ ++ ++#ifdef INCLUDE_EPIC100 ++ &epic100_driver, ++#endif /* INCLUDE_EPIC100 */ ++ ++#ifdef INCLUDE_FORCEDETH ++ &forcedeth_driver, ++#endif /* INCLUDE_FORCEDETH */ ++ ++#ifdef INCLUDE_NATSEMI ++ &natsemi_driver, ++#endif /* INCLUDE_NATSEMI */ ++ ++#ifdef INCLUDE_NS83820 ++ &ns83820_driver, ++#endif /* INCLUDE_NS83820 */ ++ ++#ifdef INCLUDE_NS8390 ++ &nepci_driver, ++#endif /* INCLUDE_NS8390 */ ++ ++#ifdef INCLUDE_PCNET32 ++ &pcnet32_driver, ++#endif /* INCLUDE_PCNET32 */ ++ ++#ifdef INCLUDE_PNIC ++ &pnic_driver, ++#endif /* INCLUDE_PNIC */ + +- for (check = (union bios32 *) 0xe0000; check <= (union bios32 *) 0xffff0; ++check) { +- if (check->fields.signature != BIOS32_SIGNATURE) ++#ifdef INCLUDE_RTL8139 ++ &rtl8139_driver, ++#endif /* INCLUDE_RTL8139 */ ++ ++#ifdef INCLUDE_SIS900 ++ &sis900_driver, ++ &sis_bridge_driver, ++#endif /* INCLUDE_SIS900 */ ++ ++#ifdef INCLUDE_SUNDANCE ++ &sundance_driver, ++#endif /* INCLUDE_SUNDANCE */ ++ ++#ifdef INCLUDE_TG3 ++ & tg3_driver, ++#endif /* INCLUDE_TG3 */ ++ ++#ifdef INCLUDE_TLAN ++ &tlan_driver, ++#endif /* INCLUDE_TLAN */ ++ ++#ifdef INCLUDE_TULIP ++ & tulip_driver, ++#endif /* INCLUDE_TULIP */ ++ ++#ifdef INCLUDE_VIA_RHINE ++ &rhine_driver, ++#endif/* INCLUDE_VIA_RHINE */ ++ ++#ifdef INCLUDE_W89C840 ++ &w89c840_driver, ++#endif /* INCLUDE_W89C840 */ ++ ++#ifdef INCLUDE_R8169 ++ &r8169_driver, ++#endif /* INCLUDE_R8169 */ ++ ++/* We must be the last one */ ++#ifdef INCLUDE_UNDI ++ &undi_driver, ++#endif /* INCLUDE_UNDI */ ++ ++ 0 ++}; ++ ++static void scan_drivers( ++ int type, ++ uint32_t class, uint16_t vendor, uint16_t device, ++ const struct pci_driver *last_driver, struct pci_device *dev) ++{ ++ const struct pci_driver *skip_driver = last_driver; ++ /* Assume there is only one match of the correct type */ ++ const struct pci_driver *driver; ++ int i, j; ++ ++ for(j = 0; pci_drivers[j] != 0; j++){ ++ driver = pci_drivers[j]; ++ if (driver->type != type) + continue; +- length = check->fields.length * 16; +- if (!length) ++ if (skip_driver) { ++ if (skip_driver == driver) ++ skip_driver = 0; + continue; +- sum = 0; +- for (i = 0; i < length ; ++i) +- sum += check->chars[i]; +- if (sum != 0) ++ } ++ for(i = 0; i < driver->id_count; i++) { ++ if ((vendor == driver->ids[i].vendor) && ++ (device == driver->ids[i].dev_id)) { ++ ++ dev->driver = driver; ++ dev->name = driver->ids[i].name; ++ ++ goto out; ++ } ++ } ++ } ++ if (!class) { ++ goto out; ++ } ++ for(j = 0; pci_drivers[j] != 0; j++){ ++ driver = pci_drivers[j]; ++ if (driver->type != type) + continue; +- if (check->fields.revision != 0) { +- printf("pcibios_init : unsupported revision %d at %#X, mail drew@colorado.edu\n", +- check->fields.revision, check); ++ if (skip_driver) { ++ if (skip_driver == driver) ++ skip_driver = 0; + continue; + } +-#if DEBUG +- printf("pcibios_init : BIOS32 Service Directory " +- "structure at %#X\n", check); +-#endif +- if (!bios32_entry) { +- if (check->fields.entry >= 0x100000) { +- printf("pcibios_init: entry in high " +- "memory, giving up\n"); +- return; +- } else { +- bios32_entry = check->fields.entry; +-#if DEBUG +- printf("pcibios_init : BIOS32 Service Directory" +- " entry at %#X\n", bios32_entry); +-#endif +- bios32_indirect.address = bios32_entry; +- } ++ if (last_driver == driver) ++ continue; ++ if ((class >> 8) == driver->class) { ++ dev->driver = driver; ++ dev->name = driver->name; ++ goto out; + } + } +- if (bios32_entry) +- check_pcibios(); ++ out: ++ return; + } +-#endif /* CONFIG_PCI_DIRECT not defined*/ + +-static void scan_bus(struct pci_device *pcidev) ++void scan_pci_bus(int type, struct pci_device *dev) + { +- unsigned int devfn, l, bus, buses; ++ unsigned int first_bus, first_devfn; ++ const struct pci_driver *first_driver; ++ unsigned int devfn, bus, buses; + unsigned char hdr_type = 0; +- unsigned short vendor, device; +- unsigned int membase, ioaddr, romaddr; +- int i, reg; +- unsigned int pci_ioaddr = 0; +- ++ uint32_t class; ++ uint16_t vendor, device; ++ uint32_t l, membase, ioaddr, romaddr; ++ int reg; ++ ++ EnterFunction("scan_pci_bus"); ++ first_bus = 0; ++ first_devfn = 0; ++ first_driver = 0; ++ if (dev->driver) { ++ first_driver = dev->driver; ++ first_bus = dev->bus; ++ first_devfn = dev->devfn; ++ /* Re read the header type on a restart */ ++ pcibios_read_config_byte(first_bus, first_devfn & ~0x7, ++ PCI_HEADER_TYPE, &hdr_type); ++ dev->driver = 0; ++ dev->bus = 0; ++ dev->devfn = 0; ++ } ++ + /* Scan all PCI buses, until we find our card. +- * We could be smart only scan the required busses but that ++ * We could be smart only scan the required buses but that + * is error prone, and tricky. +- * By scanning all possible pci busses in order we should find ++ * By scanning all possible pci buses in order we should find + * our card eventually. + */ + buses=256; +- for (bus = 0; bus < buses; ++bus) { +- for (devfn = 0; devfn < 0xff; ++devfn) { ++ for (bus = first_bus; bus < buses; ++bus) { ++ for (devfn = first_devfn; devfn < 0xff; ++devfn, first_driver = 0) { + if (PCI_FUNC (devfn) == 0) + pcibios_read_config_byte(bus, devfn, PCI_HEADER_TYPE, &hdr_type); + else if (!(hdr_type & 0x80)) /* not a multi-function device */ +@@ -421,61 +301,90 @@ + pcibios_read_config_dword(bus, devfn, PCI_VENDOR_ID, &l); + /* some broken boards return 0 if a slot is empty: */ + if (l == 0xffffffff || l == 0x00000000) { +- hdr_type = 0; + continue; + } + vendor = l & 0xffff; + device = (l >> 16) & 0xffff; + ++ pcibios_read_config_dword(bus, devfn, PCI_REVISION, &l); ++ class = (l >> 8) & 0xffffff; + #if DEBUG +- printf("bus %hhX, function %hhX, vendor %hX, device %hX\n", +- bus, devfn, vendor, device); ++ { ++ int i; ++ printf("%hhx:%hhx.%hhx [%hX/%hX] ---- ", ++ bus, PCI_SLOT(devfn), PCI_FUNC(devfn), ++ vendor, device); ++#if DEBUG > 1 ++ for(i = 0; i < 256; i++) { ++ unsigned char byte; ++ if ((i & 0xf) == 0) { ++ printf("%hhx: ", i); ++ } ++ pcibios_read_config_byte(bus, devfn, i, &byte); ++ printf("%hhx ", byte); ++ if ((i & 0xf) == 0xf) { ++ printf("\n"); ++ } ++ } ++#endif ++ ++ } ++#endif ++ scan_drivers(type, class, vendor, device, first_driver, dev); ++ if (!dev->driver){ ++#if DEBUG ++ printf("No driver fit.\n"); + #endif +- for (i = 0; pcidev[i].vendor != 0; i++) { +- if (vendor != pcidev[i].vendor +- || device != pcidev[i].dev_id) ++ continue; ++ } ++#if DEBUG ++ printf("Get Driver:\n"); ++#endif ++ dev->devfn = devfn; ++ dev->bus = bus; ++ dev->class = class; ++ dev->vendor = vendor; ++ dev->dev_id = device; ++ ++ ++ /* Get the ROM base address */ ++ pcibios_read_config_dword(bus, devfn, ++ PCI_ROM_ADDRESS, &romaddr); ++ romaddr >>= 10; ++ dev->romaddr = romaddr; ++ ++ /* Get the ``membase'' */ ++ pcibios_read_config_dword(bus, devfn, ++ PCI_BASE_ADDRESS_1, &membase); ++ dev->membase = membase; ++ ++ /* Get the ``ioaddr'' */ ++ for (reg = PCI_BASE_ADDRESS_0; reg <= PCI_BASE_ADDRESS_5; reg += 4) { ++ pcibios_read_config_dword(bus, devfn, reg, &ioaddr); ++ if ((ioaddr & PCI_BASE_ADDRESS_IO_MASK) == 0 || (ioaddr & PCI_BASE_ADDRESS_SPACE_IO) == 0) + continue; +- pcidev[i].devfn = devfn; +- pcidev[i].bus = bus; +- for (reg = PCI_BASE_ADDRESS_0; reg <= PCI_BASE_ADDRESS_5; reg += 4) { +- pcibios_read_config_dword(bus, devfn, reg, &ioaddr); +- +- if ((ioaddr & PCI_BASE_ADDRESS_IO_MASK) == 0 || (ioaddr & PCI_BASE_ADDRESS_SPACE_IO) == 0) +- continue; +- /* Strip the I/O address out of the returned value */ +- ioaddr &= PCI_BASE_ADDRESS_IO_MASK; +- /* Get the memory base address */ +- pcibios_read_config_dword(bus, devfn, +- PCI_BASE_ADDRESS_1, &membase); +- /* Get the ROM base address */ +- pcibios_read_config_dword(bus, devfn, PCI_ROM_ADDRESS, &romaddr); +- romaddr >>= 10; +- printf("Found %s at %#hx, ROM address %#hx\n", +- pcidev[i].name, ioaddr, romaddr); +- /* Take the first one or the one that matches in boot ROM address */ +- if (pci_ioaddr == 0 || romaddr == ((unsigned long) rom.rom_segment << 4)) { +- pcidev[i].membase = membase; +- pcidev[i].ioaddr = ioaddr; +- return; +- } +- } ++ ++ ++ /* Strip the I/O address out of the returned value */ ++ ioaddr &= PCI_BASE_ADDRESS_IO_MASK; ++ ++ /* Take the first one or the one that matches in boot ROM address */ ++ dev->ioaddr = ioaddr; + } ++#if DEBUG > 2 ++ printf("Found %s ROM address %#hx\n", ++ dev->name, romaddr); ++#endif ++ LeaveFunction("scan_pci_bus"); ++ return; + } ++ first_devfn = 0; + } ++ first_bus = 0; ++ LeaveFunction("scan_pci_bus"); + } + +-void eth_pci_init(struct pci_device *pcidev) +-{ +-#ifndef CONFIG_PCI_DIRECT +- pcibios_init(); +- if (!pcibios_entry) { +- printf("pci_init: no BIOS32 detected\n"); +- return; +- } +-#endif +- scan_bus(pcidev); +- /* return values are in pcidev structures */ +-} ++ + + /* + * Set device to be a busmaster in case BIOS neglected to do so. +@@ -489,13 +398,134 @@ + pcibios_read_config_word(p->bus, p->devfn, PCI_COMMAND, &pci_command); + new_command = pci_command | PCI_COMMAND_MASTER|PCI_COMMAND_IO; + if (pci_command != new_command) { +- printf("The PCI BIOS has not enabled this device!\nUpdating PCI command %hX->%hX. pci_bus %hhX pci_device_fn %hhX\n", ++#if DEBUG > 0 ++ printf( ++ "The PCI BIOS has not enabled this device!\n" ++ "Updating PCI command %hX->%hX. pci_bus %hhX pci_device_fn %hhX\n", + pci_command, new_command, p->bus, p->devfn); ++#endif + pcibios_write_config_word(p->bus, p->devfn, PCI_COMMAND, new_command); + } + pcibios_read_config_byte(p->bus, p->devfn, PCI_LATENCY_TIMER, &pci_latency); + if (pci_latency < 32) { +- printf("PCI latency timer (CFLT) is unreasonably low at %d. Setting to 32 clocks.\n", pci_latency); ++#if DEBUG > 0 ++ printf("PCI latency timer (CFLT) is unreasonably low at %d. Setting to 32 clocks.\n", ++ pci_latency); ++#endif + pcibios_write_config_byte(p->bus, p->devfn, PCI_LATENCY_TIMER, 32); + } + } ++ ++/* ++ * Find the start of a pci resource. ++ */ ++unsigned long pci_bar_start(struct pci_device *dev, unsigned int index) ++{ ++ uint32_t lo, hi; ++ unsigned long bar; ++ pci_read_config_dword(dev, index, &lo); ++ if (lo & PCI_BASE_ADDRESS_SPACE_IO) { ++ bar = lo & PCI_BASE_ADDRESS_IO_MASK; ++ } else { ++ bar = 0; ++ if ((lo & PCI_BASE_ADDRESS_MEM_TYPE_MASK) == PCI_BASE_ADDRESS_MEM_TYPE_64) { ++ pci_read_config_dword(dev, index + 4, &hi); ++ if (hi) { ++ if (sizeof(unsigned long) > sizeof(uint32_t)) { ++ bar = hi; ++ /* It's REALLY interesting:-) */ ++ bar <<=32; ++ } ++ else { ++ printf("Unhandled 64bit BAR\n"); ++ return -1UL; ++ } ++ } ++ } ++ bar |= lo & PCI_BASE_ADDRESS_MEM_MASK; ++ } ++ return bar + pcibios_bus_base(dev->bus); ++} ++ ++/* ++ * Find the size of a pci resource. ++ */ ++unsigned long pci_bar_size(struct pci_device *dev, unsigned int bar) ++{ ++ uint32_t start, size; ++ /* Save the original bar */ ++ pci_read_config_dword(dev, bar, &start); ++ /* Compute which bits can be set */ ++ pci_write_config_dword(dev, bar, ~0); ++ pci_read_config_dword(dev, bar, &size); ++ /* Restore the original size */ ++ pci_write_config_dword(dev, bar, start); ++ /* Find the significant bits */ ++ if (start & PCI_BASE_ADDRESS_SPACE_IO) { ++ size &= PCI_BASE_ADDRESS_IO_MASK; ++ } else { ++ size &= PCI_BASE_ADDRESS_MEM_MASK; ++ } ++ /* Find the lowest bit set */ ++ size = size & ~(size - 1); ++ return size; ++} ++ ++/** ++ * pci_find_capability - query for devices' capabilities ++ * @dev: PCI device to query ++ * @cap: capability code ++ * ++ * Tell if a device supports a given PCI capability. ++ * Returns the address of the requested capability structure within the ++ * device's PCI configuration space or 0 in case the device does not ++ * support it. Possible values for @cap: ++ * ++ * %PCI_CAP_ID_PM Power Management ++ * ++ * %PCI_CAP_ID_AGP Accelerated Graphics Port ++ * ++ * %PCI_CAP_ID_VPD Vital Product Data ++ * ++ * %PCI_CAP_ID_SLOTID Slot Identification ++ * ++ * %PCI_CAP_ID_MSI Message Signalled Interrupts ++ * ++ * %PCI_CAP_ID_CHSWP CompactPCI HotSwap ++ */ ++int pci_find_capability(struct pci_device *dev, int cap) ++{ ++ uint16_t status; ++ uint8_t pos, id; ++ uint8_t hdr_type; ++ int ttl = 48; ++ ++ pci_read_config_word(dev, PCI_STATUS, &status); ++ if (!(status & PCI_STATUS_CAP_LIST)) ++ return 0; ++ pci_read_config_byte(dev, PCI_HEADER_TYPE, &hdr_type); ++ switch (hdr_type & 0x7F) { ++ case PCI_HEADER_TYPE_NORMAL: ++ case PCI_HEADER_TYPE_BRIDGE: ++ default: ++ pci_read_config_byte(dev, PCI_CAPABILITY_LIST, &pos); ++ break; ++ case PCI_HEADER_TYPE_CARDBUS: ++ pci_read_config_byte(dev, PCI_CB_CAPABILITY_LIST, &pos); ++ break; ++ } ++ while (ttl-- && pos >= 0x40) { ++ pos &= ~3; ++ pci_read_config_byte(dev, pos + PCI_CAP_LIST_ID, &id); ++#if DEBUG > 0 ++ printf("Capability: %d\n", id); ++#endif ++ if (id == 0xff) ++ break; ++ if (id == cap) ++ return pos; ++ pci_read_config_byte(dev, pos + PCI_CAP_LIST_NEXT, &pos); ++ } ++ return 0; ++} ++ +Index: b/netboot/pci.h +=================================================================== +--- a/netboot/pci.h ++++ b/netboot/pci.h +@@ -1,4 +1,4 @@ +-#ifndef PCI_H ++#if !defined(PCI_H) && defined(CONFIG_PCI) + #define PCI_H + + /* +@@ -21,10 +21,19 @@ + * your option) any later version. + */ + ++#include "pci_ids.h" ++ + #define PCI_COMMAND_IO 0x1 /* Enable response in I/O space */ + #define PCI_COMMAND_MEM 0x2 /* Enable response in mem space */ + #define PCI_COMMAND_MASTER 0x4 /* Enable bus mastering */ + #define PCI_LATENCY_TIMER 0x0d /* 8 bits */ ++#define PCI_COMMAND_SPECIAL 0x8 /* Enable response to special cycles */ ++#define PCI_COMMAND_INVALIDATE 0x10 /* Use memory write and invalidate */ ++#define PCI_COMMAND_VGA_PALETTE 0x20 /* Enable palette snooping */ ++#define PCI_COMMAND_PARITY 0x40 /* Enable parity checking */ ++#define PCI_COMMAND_WAIT 0x80 /* Enable address/data stepping */ ++#define PCI_COMMAND_SERR 0x100 /* Enable SERR */ ++#define PCI_COMMAND_FAST_BACK 0x200 /* Enable back-to-back writes */ + + #define PCIBIOS_PCI_FUNCTION_ID 0xb1XX + #define PCIBIOS_PCI_BIOS_PRESENT 0xb101 +@@ -42,10 +51,37 @@ + #define PCI_DEVICE_ID 0x02 /* 16 bits */ + #define PCI_COMMAND 0x04 /* 16 bits */ + ++#define PCI_STATUS 0x06 /* 16 bits */ ++#define PCI_STATUS_CAP_LIST 0x10 /* Support Capability List */ ++#define PCI_STATUS_66MHZ 0x20 /* Support 66 Mhz PCI 2.1 bus */ ++#define PCI_STATUS_UDF 0x40 /* Support User Definable Features [obsolete] */ ++#define PCI_STATUS_FAST_BACK 0x80 /* Accept fast-back to back */ ++#define PCI_STATUS_PARITY 0x100 /* Detected parity error */ ++#define PCI_STATUS_DEVSEL_MASK 0x600 /* DEVSEL timing */ ++#define PCI_STATUS_DEVSEL_FAST 0x000 ++#define PCI_STATUS_DEVSEL_MEDIUM 0x200 ++#define PCI_STATUS_DEVSEL_SLOW 0x400 ++#define PCI_STATUS_SIG_TARGET_ABORT 0x800 /* Set on target abort */ ++#define PCI_STATUS_REC_TARGET_ABORT 0x1000 /* Master ack of " */ ++#define PCI_STATUS_REC_MASTER_ABORT 0x2000 /* Set on master abort */ ++#define PCI_STATUS_SIG_SYSTEM_ERROR 0x4000 /* Set when we drive SERR */ ++#define PCI_STATUS_DETECTED_PARITY 0x8000 /* Set on parity error */ ++ + #define PCI_REVISION 0x08 /* 8 bits */ ++#define PCI_REVISION_ID 0x08 /* 8 bits */ ++#define PCI_CLASS_REVISION 0x08 /* 32 bits */ + #define PCI_CLASS_CODE 0x0b /* 8 bits */ + #define PCI_SUBCLASS_CODE 0x0a /* 8 bits */ + #define PCI_HEADER_TYPE 0x0e /* 8 bits */ ++#define PCI_HEADER_TYPE_NORMAL 0 ++#define PCI_HEADER_TYPE_BRIDGE 1 ++#define PCI_HEADER_TYPE_CARDBUS 2 ++ ++ ++/* Header type 0 (normal devices) */ ++#define PCI_CARDBUS_CIS 0x28 ++#define PCI_SUBSYSTEM_VENDOR_ID 0x2c ++#define PCI_SUBSYSTEM_ID 0x2e + + #define PCI_BASE_ADDRESS_0 0x10 /* 32 bits */ + #define PCI_BASE_ADDRESS_1 0x14 /* 32 bits */ +@@ -54,15 +90,155 @@ + #define PCI_BASE_ADDRESS_4 0x20 /* 32 bits */ + #define PCI_BASE_ADDRESS_5 0x24 /* 32 bits */ + ++#define PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06 ++#define PCI_BASE_ADDRESS_MEM_TYPE_32 0x00 /* 32 bit address */ ++#define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02 /* Below 1M [obsolete] */ ++#define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */ ++ + #ifndef PCI_BASE_ADDRESS_IO_MASK + #define PCI_BASE_ADDRESS_IO_MASK (~0x03) + #endif ++#ifndef PCI_BASE_ADDRESS_MEM_MASK ++#define PCI_BASE_ADDRESS_MEM_MASK (~0x0f) ++#endif + #define PCI_BASE_ADDRESS_SPACE_IO 0x01 + #define PCI_ROM_ADDRESS 0x30 /* 32 bits */ + #define PCI_ROM_ADDRESS_ENABLE 0x01 /* Write 1 to enable ROM, + bits 31..11 are address, + 10..2 are reserved */ + ++#define PCI_CAPABILITY_LIST 0x34 /* Offset of first capability list entry */ ++ ++#define PCI_INTERRUPT_LINE 0x3c /* IRQ number (0-15) */ ++#define PCI_INTERRUPT_PIN 0x3d /* IRQ pin on PCI bus (A-D) */ ++ ++/* Header type 1 (PCI-to-PCI bridges) */ ++#define PCI_PRIMARY_BUS 0x18 /* Primary bus number */ ++#define PCI_SECONDARY_BUS 0x19 /* Secondary bus number */ ++#define PCI_SUBORDINATE_BUS 0x1a /* Highest bus number behind the bridge */ ++#define PCI_SEC_LATENCY_TIMER 0x1b /* Latency timer for secondary interface */ ++#define PCI_IO_BASE 0x1c /* I/O range behind the bridge */ ++#define PCI_IO_LIMIT 0x1d ++#define PCI_IO_RANGE_TYPE_MASK 0x0f /* I/O bridging type */ ++#define PCI_IO_RANGE_TYPE_16 0x00 ++#define PCI_IO_RANGE_TYPE_32 0x01 ++#define PCI_IO_RANGE_MASK ~0x0f ++#define PCI_SEC_STATUS 0x1e /* Secondary status register, only bit 14 used */ ++#define PCI_MEMORY_BASE 0x20 /* Memory range behind */ ++#define PCI_MEMORY_LIMIT 0x22 ++#define PCI_MEMORY_RANGE_TYPE_MASK 0x0f ++#define PCI_MEMORY_RANGE_MASK ~0x0f ++#define PCI_PREF_MEMORY_BASE 0x24 /* Prefetchable memory range behind */ ++#define PCI_PREF_MEMORY_LIMIT 0x26 ++#define PCI_PREF_RANGE_TYPE_MASK 0x0f ++#define PCI_PREF_RANGE_TYPE_32 0x00 ++#define PCI_PREF_RANGE_TYPE_64 0x01 ++#define PCI_PREF_RANGE_MASK ~0x0f ++#define PCI_PREF_BASE_UPPER32 0x28 /* Upper half of prefetchable memory range */ ++#define PCI_PREF_LIMIT_UPPER32 0x2c ++#define PCI_IO_BASE_UPPER16 0x30 /* Upper half of I/O addresses */ ++#define PCI_IO_LIMIT_UPPER16 0x32 ++/* 0x34 same as for htype 0 */ ++/* 0x35-0x3b is reserved */ ++#define PCI_ROM_ADDRESS1 0x38 /* Same as PCI_ROM_ADDRESS, but for htype 1 */ ++/* 0x3c-0x3d are same as for htype 0 */ ++#define PCI_BRIDGE_CONTROL 0x3e ++#define PCI_BRIDGE_CTL_PARITY 0x01 /* Enable parity detection on secondary interface */ ++#define PCI_BRIDGE_CTL_SERR 0x02 /* The same for SERR forwarding */ ++#define PCI_BRIDGE_CTL_NO_ISA 0x04 /* Disable bridging of ISA ports */ ++#define PCI_BRIDGE_CTL_VGA 0x08 /* Forward VGA addresses */ ++#define PCI_BRIDGE_CTL_MASTER_ABORT 0x20 /* Report master aborts */ ++#define PCI_BRIDGE_CTL_BUS_RESET 0x40 /* Secondary bus reset */ ++#define PCI_BRIDGE_CTL_FAST_BACK 0x80 /* Fast Back2Back enabled on secondary interface */ ++ ++#define PCI_CB_CAPABILITY_LIST 0x14 ++ ++/* Capability lists */ ++ ++#define PCI_CAP_LIST_ID 0 /* Capability ID */ ++#define PCI_CAP_ID_PM 0x01 /* Power Management */ ++#define PCI_CAP_ID_AGP 0x02 /* Accelerated Graphics Port */ ++#define PCI_CAP_ID_VPD 0x03 /* Vital Product Data */ ++#define PCI_CAP_ID_SLOTID 0x04 /* Slot Identification */ ++#define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */ ++#define PCI_CAP_ID_CHSWP 0x06 /* CompactPCI HotSwap */ ++#define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ ++#define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ ++#define PCI_CAP_SIZEOF 4 ++ ++/* Power Management Registers */ ++ ++#define PCI_PM_PMC 2 /* PM Capabilities Register */ ++#define PCI_PM_CAP_VER_MASK 0x0007 /* Version */ ++#define PCI_PM_CAP_PME_CLOCK 0x0008 /* PME clock required */ ++#define PCI_PM_CAP_RESERVED 0x0010 /* Reserved field */ ++#define PCI_PM_CAP_DSI 0x0020 /* Device specific initialization */ ++#define PCI_PM_CAP_AUX_POWER 0x01C0 /* Auxilliary power support mask */ ++#define PCI_PM_CAP_D1 0x0200 /* D1 power state support */ ++#define PCI_PM_CAP_D2 0x0400 /* D2 power state support */ ++#define PCI_PM_CAP_PME 0x0800 /* PME pin supported */ ++#define PCI_PM_CAP_PME_MASK 0xF800 /* PME Mask of all supported states */ ++#define PCI_PM_CAP_PME_D0 0x0800 /* PME# from D0 */ ++#define PCI_PM_CAP_PME_D1 0x1000 /* PME# from D1 */ ++#define PCI_PM_CAP_PME_D2 0x2000 /* PME# from D2 */ ++#define PCI_PM_CAP_PME_D3 0x4000 /* PME# from D3 (hot) */ ++#define PCI_PM_CAP_PME_D3cold 0x8000 /* PME# from D3 (cold) */ ++#define PCI_PM_CTRL 4 /* PM control and status register */ ++#define PCI_PM_CTRL_STATE_MASK 0x0003 /* Current power state (D0 to D3) */ ++#define PCI_PM_CTRL_PME_ENABLE 0x0100 /* PME pin enable */ ++#define PCI_PM_CTRL_DATA_SEL_MASK 0x1e00 /* Data select (??) */ ++#define PCI_PM_CTRL_DATA_SCALE_MASK 0x6000 /* Data scale (??) */ ++#define PCI_PM_CTRL_PME_STATUS 0x8000 /* PME pin status */ ++#define PCI_PM_PPB_EXTENSIONS 6 /* PPB support extensions (??) */ ++#define PCI_PM_PPB_B2_B3 0x40 /* Stop clock when in D3hot (??) */ ++#define PCI_PM_BPCC_ENABLE 0x80 /* Bus power/clock control enable (??) */ ++#define PCI_PM_DATA_REGISTER 7 /* (??) */ ++#define PCI_PM_SIZEOF 8 ++ ++/* AGP registers */ ++ ++#define PCI_AGP_VERSION 2 /* BCD version number */ ++#define PCI_AGP_RFU 3 /* Rest of capability flags */ ++#define PCI_AGP_STATUS 4 /* Status register */ ++#define PCI_AGP_STATUS_RQ_MASK 0xff000000 /* Maximum number of requests - 1 */ ++#define PCI_AGP_STATUS_SBA 0x0200 /* Sideband addressing supported */ ++#define PCI_AGP_STATUS_64BIT 0x0020 /* 64-bit addressing supported */ ++#define PCI_AGP_STATUS_FW 0x0010 /* FW transfers supported */ ++#define PCI_AGP_STATUS_RATE4 0x0004 /* 4x transfer rate supported */ ++#define PCI_AGP_STATUS_RATE2 0x0002 /* 2x transfer rate supported */ ++#define PCI_AGP_STATUS_RATE1 0x0001 /* 1x transfer rate supported */ ++#define PCI_AGP_COMMAND 8 /* Control register */ ++#define PCI_AGP_COMMAND_RQ_MASK 0xff000000 /* Master: Maximum number of requests */ ++#define PCI_AGP_COMMAND_SBA 0x0200 /* Sideband addressing enabled */ ++#define PCI_AGP_COMMAND_AGP 0x0100 /* Allow processing of AGP transactions */ ++#define PCI_AGP_COMMAND_64BIT 0x0020 /* Allow processing of 64-bit addresses */ ++#define PCI_AGP_COMMAND_FW 0x0010 /* Force FW transfers */ ++#define PCI_AGP_COMMAND_RATE4 0x0004 /* Use 4x rate */ ++#define PCI_AGP_COMMAND_RATE2 0x0002 /* Use 2x rate */ ++#define PCI_AGP_COMMAND_RATE1 0x0001 /* Use 1x rate */ ++#define PCI_AGP_SIZEOF 12 ++ ++/* Slot Identification */ ++ ++#define PCI_SID_ESR 2 /* Expansion Slot Register */ ++#define PCI_SID_ESR_NSLOTS 0x1f /* Number of expansion slots available */ ++#define PCI_SID_ESR_FIC 0x20 /* First In Chassis Flag */ ++#define PCI_SID_CHASSIS_NR 3 /* Chassis Number */ ++ ++/* Message Signalled Interrupts registers */ ++ ++#define PCI_MSI_FLAGS 2 /* Various flags */ ++#define PCI_MSI_FLAGS_64BIT 0x80 /* 64-bit addresses allowed */ ++#define PCI_MSI_FLAGS_QSIZE 0x70 /* Message queue size configured */ ++#define PCI_MSI_FLAGS_QMASK 0x0e /* Maximum queue size available */ ++#define PCI_MSI_FLAGS_ENABLE 0x01 /* MSI feature enabled */ ++#define PCI_MSI_RFU 3 /* Rest of capability flags */ ++#define PCI_MSI_ADDRESS_LO 4 /* Lower 32 bits */ ++#define PCI_MSI_ADDRESS_HI 8 /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */ ++#define PCI_MSI_DATA_32 8 /* 16 bits of data for 32-bit devices */ ++#define PCI_MSI_DATA_64 12 /* 16 bits of data for 64-bit devices */ ++ ++#define PCI_SLOT(devfn) ((devfn) >> 3) + #define PCI_FUNC(devfn) ((devfn) & 0x07) + + #define BIOS32_SIGNATURE (('_' << 0) + ('3' << 8) + ('2' << 16) + ('_' << 24)) +@@ -85,108 +261,97 @@ + char chars[16]; + }; + +-#define KERN_CODE_SEG 0x8 /* This _MUST_ match start.S */ +- +-/* Stuff for asm */ +-#define save_flags(x) \ +-__asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */ :"memory") +- +-#define cli() __asm__ __volatile__ ("cli": : :"memory") +- +-#define restore_flags(x) \ +-__asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") +- +-#define PCI_VENDOR_ID_ADMTEK 0x1317 +-#define PCI_DEVICE_ID_ADMTEK_0985 0x0985 +-#define PCI_VENDOR_ID_REALTEK 0x10ec +-#define PCI_DEVICE_ID_REALTEK_8029 0x8029 +-#define PCI_DEVICE_ID_REALTEK_8139 0x8139 +-#define PCI_VENDOR_ID_WINBOND2 0x1050 +-#define PCI_DEVICE_ID_WINBOND2_89C940 0x0940 +-#define PCI_DEVICE_ID_WINBOND2_89C840 0x0840 +-#define PCI_VENDOR_ID_COMPEX 0x11f6 +-#define PCI_DEVICE_ID_COMPEX_RL2000 0x1401 +-#define PCI_DEVICE_ID_COMPEX_RL100ATX 0x2011 +-#define PCI_VENDOR_ID_KTI 0x8e2e +-#define PCI_DEVICE_ID_KTI_ET32P2 0x3000 +-#define PCI_VENDOR_ID_NETVIN 0x4a14 +-#define PCI_DEVICE_ID_NETVIN_NV5000SC 0x5000 +-#define PCI_VENDOR_ID_HOLTEK 0x12c3 +-#define PCI_DEVICE_ID_HOLTEK_HT80232 0x0058 +-#define PCI_VENDOR_ID_3COM 0x10b7 +-#define PCI_DEVICE_ID_3COM_3C590 0x5900 +-#define PCI_DEVICE_ID_3COM_3C595 0x5950 +-#define PCI_DEVICE_ID_3COM_3C595_1 0x5951 +-#define PCI_DEVICE_ID_3COM_3C595_2 0x5952 +-#define PCI_DEVICE_ID_3COM_3C900TPO 0x9000 +-#define PCI_DEVICE_ID_3COM_3C900COMBO 0x9001 +-#define PCI_DEVICE_ID_3COM_3C905TX 0x9050 +-#define PCI_DEVICE_ID_3COM_3C905T4 0x9051 +-#define PCI_DEVICE_ID_3COM_3C905B_TX 0x9055 +-#define PCI_DEVICE_ID_3COM_3C905C_TXM 0x9200 +-#define PCI_VENDOR_ID_INTEL 0x8086 +-#define PCI_DEVICE_ID_INTEL_82557 0x1229 +-#define PCI_DEVICE_ID_INTEL_82559ER 0x1209 +-#define PCI_DEVICE_ID_INTEL_ID1029 0x1029 +-#define PCI_DEVICE_ID_INTEL_ID1030 0x1030 +-#define PCI_DEVICE_ID_INTEL_82562 0x2449 +-#define PCI_VENDOR_ID_AMD 0x1022 +-#define PCI_DEVICE_ID_AMD_LANCE 0x2000 +-#define PCI_VENDOR_ID_AMD_HOMEPNA 0x1022 +-#define PCI_DEVICE_ID_AMD_HOMEPNA 0x2001 +-#define PCI_VENDOR_ID_SMC_1211 0x1113 +-#define PCI_DEVICE_ID_SMC_1211 0x1211 +-#define PCI_VENDOR_ID_DEC 0x1011 +-#define PCI_DEVICE_ID_DEC_TULIP 0x0002 +-#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009 +-#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014 +-#define PCI_DEVICE_ID_DEC_21142 0x0019 +-#define PCI_VENDOR_ID_SMC 0x10B8 +-#ifndef PCI_DEVICE_ID_SMC_EPIC100 +-# define PCI_DEVICE_ID_SMC_EPIC100 0x0005 +-#endif +-#define PCI_VENDOR_ID_MACRONIX 0x10d9 +-#define PCI_DEVICE_ID_MX987x5 0x0531 +-#define PCI_VENDOR_ID_LINKSYS 0x11AD +-#define PCI_DEVICE_ID_LC82C115 0xC115 +-#define PCI_VENDOR_ID_VIATEC 0x1106 +-#define PCI_DEVICE_ID_VIA_RHINE_I 0x3043 +-#define PCI_DEVICE_ID_VIA_VT6102 0x3065 +-#define PCI_DEVICE_ID_VIA_86C100A 0x6100 +-#define PCI_VENDOR_ID_DAVICOM 0x1282 +-#define PCI_DEVICE_ID_DM9009 0x9009 +-#define PCI_DEVICE_ID_DM9102 0x9102 +-#define PCI_VENDOR_ID_SIS 0x1039 +-#define PCI_DEVICE_ID_SIS900 0x0900 +-#define PCI_DEVICE_ID_SIS7016 0x7016 +-#define PCI_VENDOR_ID_DLINK 0x1186 +-#define PCI_DEVICE_ID_DFE530TXP 0x1300 +-#define PCI_VENDOR_ID_NS 0x100B +-#define PCI_DEVICE_ID_DP83815 0x0020 +-#define PCI_VENDOR_ID_OLICOM 0x108d +-#define PCI_DEVICE_ID_OLICOM_OC3136 0x0001 +-#define PCI_DEVICE_ID_OLICOM_OC2315 0x0011 +-#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 +-#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 +-#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 +-#define PCI_DEVICE_ID_OLICOM_OC6151 0x0021 ++struct pci_device; ++struct dev; ++typedef int (*pci_probe_t)(struct dev *, struct pci_device *); + + struct pci_device { +- unsigned short vendor, dev_id; +- const char *name; +- unsigned int membase; +- unsigned short ioaddr; +- unsigned char devfn; +- unsigned char bus; ++ uint32_t class; ++ uint16_t vendor, dev_id; ++ const char *name; ++ /* membase and ioaddr are silly and depricated */ ++ unsigned int membase; ++ unsigned int ioaddr; ++ unsigned int romaddr; ++ unsigned char irq; ++ unsigned char devfn; ++ unsigned char bus; ++ unsigned char use_specified; ++ const struct pci_driver *driver; ++}; ++ ++extern void scan_pci_bus(int type, struct pci_device *dev); ++extern void find_pci(int type, struct pci_device *dev); ++ ++extern int pcibios_read_config_byte(unsigned int bus, unsigned int device_fn, unsigned int where, uint8_t *value); ++extern int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, unsigned int where, uint8_t value); ++extern int pcibios_read_config_word(unsigned int bus, unsigned int device_fn, unsigned int where, uint16_t *value); ++extern int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, unsigned int where, uint16_t value); ++extern int pcibios_read_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, uint32_t *value); ++extern int pcibios_write_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, uint32_t value); ++extern unsigned long pcibios_bus_base(unsigned int bus); ++extern void adjust_pci_device(struct pci_device *p); ++ ++ ++static inline int ++pci_read_config_byte(struct pci_device *dev, unsigned int where, uint8_t *value) ++{ ++ return pcibios_read_config_byte(dev->bus, dev->devfn, where, value); ++} ++static inline int ++pci_write_config_byte(struct pci_device *dev, unsigned int where, uint8_t value) ++{ ++ return pcibios_write_config_byte(dev->bus, dev->devfn, where, value); ++} ++static inline int ++pci_read_config_word(struct pci_device *dev, unsigned int where, uint16_t *value) ++{ ++ return pcibios_read_config_word(dev->bus, dev->devfn, where, value); ++} ++static inline int ++pci_write_config_word(struct pci_device *dev, unsigned int where, uint16_t value) ++{ ++ return pcibios_write_config_word(dev->bus, dev->devfn, where, value); ++} ++static inline int ++pci_read_config_dword(struct pci_device *dev, unsigned int where, uint32_t *value) ++{ ++ return pcibios_read_config_dword(dev->bus, dev->devfn, where, value); ++} ++static inline int ++pci_write_config_dword(struct pci_device *dev, unsigned int where, uint32_t value) ++{ ++ return pcibios_write_config_dword(dev->bus, dev->devfn, where, value); ++} ++ ++/* Helper functions to find the size of a pci bar */ ++extern unsigned long pci_bar_start(struct pci_device *dev, unsigned int bar); ++extern unsigned long pci_bar_size(struct pci_device *dev, unsigned int bar); ++/* Helper function to find pci capabilities */ ++extern int pci_find_capability(struct pci_device *dev, int cap); ++struct pci_id { ++ unsigned short vendor, dev_id; ++ const char *name; ++}; ++ ++struct dev; ++/* Most pci drivers will use this */ ++struct pci_driver { ++ int type; ++ const char *name; ++ pci_probe_t probe; ++ struct pci_id *ids; ++ int id_count; ++ ++/* On a few occasions the hardware is standardized enough that ++ * we only need to know the class of the device and not the exact ++ * type to drive the device correctly. If this is the case ++ * set a class value other than 0. ++ */ ++ unsigned short class; + }; + +-extern void eth_pci_init(struct pci_device *); ++#define PCI_ROM(VENDOR_ID, DEVICE_ID, IMAGE, DESCRIPTION) \ ++ { VENDOR_ID, DEVICE_ID, IMAGE, } + +-extern int pcibios_read_config_byte(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned char *value); +-extern int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, unsigned int where, unsigned char value); +-extern int pcibios_read_config_word(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned short *value); +-extern int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, unsigned int where, unsigned short value); +-extern int pcibios_read_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned int *value); +-extern int pcibios_write_config_dword(unsigned int bus, unsigned int device_fn, unsigned int where, unsigned int value); +-void adjust_pci_device(struct pci_device *p); + #endif /* PCI_H */ +Index: b/netboot/pci_ids.h +=================================================================== +--- /dev/null ++++ b/netboot/pci_ids.h +@@ -0,0 +1,1809 @@ ++/* ++ * PCI Class, Vendor and Device IDs ++ * ++ * Please keep sorted. ++ */ ++ ++/* Device classes and subclasses */ ++ ++#define PCI_CLASS_NOT_DEFINED 0x0000 ++#define PCI_CLASS_NOT_DEFINED_VGA 0x0001 ++ ++#define PCI_BASE_CLASS_STORAGE 0x01 ++#define PCI_CLASS_STORAGE_SCSI 0x0100 ++#define PCI_CLASS_STORAGE_IDE 0x0101 ++#define PCI_CLASS_STORAGE_FLOPPY 0x0102 ++#define PCI_CLASS_STORAGE_IPI 0x0103 ++#define PCI_CLASS_STORAGE_RAID 0x0104 ++#define PCI_CLASS_STORAGE_OTHER 0x0180 ++ ++#define PCI_BASE_CLASS_NETWORK 0x02 ++#define PCI_CLASS_NETWORK_ETHERNET 0x0200 ++#define PCI_CLASS_NETWORK_TOKEN_RING 0x0201 ++#define PCI_CLASS_NETWORK_FDDI 0x0202 ++#define PCI_CLASS_NETWORK_ATM 0x0203 ++#define PCI_CLASS_NETWORK_OTHER 0x0280 ++ ++#define PCI_BASE_CLASS_DISPLAY 0x03 ++#define PCI_CLASS_DISPLAY_VGA 0x0300 ++#define PCI_CLASS_DISPLAY_XGA 0x0301 ++#define PCI_CLASS_DISPLAY_3D 0x0302 ++#define PCI_CLASS_DISPLAY_OTHER 0x0380 ++ ++#define PCI_BASE_CLASS_MULTIMEDIA 0x04 ++#define PCI_CLASS_MULTIMEDIA_VIDEO 0x0400 ++#define PCI_CLASS_MULTIMEDIA_AUDIO 0x0401 ++#define PCI_CLASS_MULTIMEDIA_PHONE 0x0402 ++#define PCI_CLASS_MULTIMEDIA_OTHER 0x0480 ++ ++#define PCI_BASE_CLASS_MEMORY 0x05 ++#define PCI_CLASS_MEMORY_RAM 0x0500 ++#define PCI_CLASS_MEMORY_FLASH 0x0501 ++#define PCI_CLASS_MEMORY_OTHER 0x0580 ++ ++#define PCI_BASE_CLASS_BRIDGE 0x06 ++#define PCI_CLASS_BRIDGE_HOST 0x0600 ++#define PCI_CLASS_BRIDGE_ISA 0x0601 ++#define PCI_CLASS_BRIDGE_EISA 0x0602 ++#define PCI_CLASS_BRIDGE_MC 0x0603 ++#define PCI_CLASS_BRIDGE_PCI 0x0604 ++#define PCI_CLASS_BRIDGE_PCMCIA 0x0605 ++#define PCI_CLASS_BRIDGE_NUBUS 0x0606 ++#define PCI_CLASS_BRIDGE_CARDBUS 0x0607 ++#define PCI_CLASS_BRIDGE_RACEWAY 0x0608 ++#define PCI_CLASS_BRIDGE_OTHER 0x0680 ++ ++#define PCI_BASE_CLASS_COMMUNICATION 0x07 ++#define PCI_CLASS_COMMUNICATION_SERIAL 0x0700 ++#define PCI_CLASS_COMMUNICATION_PARALLEL 0x0701 ++#define PCI_CLASS_COMMUNICATION_MULTISERIAL 0x0702 ++#define PCI_CLASS_COMMUNICATION_MODEM 0x0703 ++#define PCI_CLASS_COMMUNICATION_OTHER 0x0780 ++ ++#define PCI_BASE_CLASS_SYSTEM 0x08 ++#define PCI_CLASS_SYSTEM_PIC 0x0800 ++#define PCI_CLASS_SYSTEM_DMA 0x0801 ++#define PCI_CLASS_SYSTEM_TIMER 0x0802 ++#define PCI_CLASS_SYSTEM_RTC 0x0803 ++#define PCI_CLASS_SYSTEM_PCI_HOTPLUG 0x0804 ++#define PCI_CLASS_SYSTEM_OTHER 0x0880 ++ ++#define PCI_BASE_CLASS_INPUT 0x09 ++#define PCI_CLASS_INPUT_KEYBOARD 0x0900 ++#define PCI_CLASS_INPUT_PEN 0x0901 ++#define PCI_CLASS_INPUT_MOUSE 0x0902 ++#define PCI_CLASS_INPUT_SCANNER 0x0903 ++#define PCI_CLASS_INPUT_GAMEPORT 0x0904 ++#define PCI_CLASS_INPUT_OTHER 0x0980 ++ ++#define PCI_BASE_CLASS_DOCKING 0x0a ++#define PCI_CLASS_DOCKING_GENERIC 0x0a00 ++#define PCI_CLASS_DOCKING_OTHER 0x0a80 ++ ++#define PCI_BASE_CLASS_PROCESSOR 0x0b ++#define PCI_CLASS_PROCESSOR_386 0x0b00 ++#define PCI_CLASS_PROCESSOR_486 0x0b01 ++#define PCI_CLASS_PROCESSOR_PENTIUM 0x0b02 ++#define PCI_CLASS_PROCESSOR_ALPHA 0x0b10 ++#define PCI_CLASS_PROCESSOR_POWERPC 0x0b20 ++#define PCI_CLASS_PROCESSOR_MIPS 0x0b30 ++#define PCI_CLASS_PROCESSOR_CO 0x0b40 ++ ++#define PCI_BASE_CLASS_SERIAL 0x0c ++#define PCI_CLASS_SERIAL_FIREWIRE 0x0c00 ++#define PCI_CLASS_SERIAL_ACCESS 0x0c01 ++#define PCI_CLASS_SERIAL_SSA 0x0c02 ++#define PCI_CLASS_SERIAL_USB 0x0c03 ++#define PCI_CLASS_SERIAL_FIBER 0x0c04 ++#define PCI_CLASS_SERIAL_SMBUS 0x0c05 ++ ++#define PCI_BASE_CLASS_INTELLIGENT 0x0e ++#define PCI_CLASS_INTELLIGENT_I2O 0x0e00 ++ ++#define PCI_BASE_CLASS_SATELLITE 0x0f ++#define PCI_CLASS_SATELLITE_TV 0x0f00 ++#define PCI_CLASS_SATELLITE_AUDIO 0x0f01 ++#define PCI_CLASS_SATELLITE_VOICE 0x0f03 ++#define PCI_CLASS_SATELLITE_DATA 0x0f04 ++ ++#define PCI_BASE_CLASS_CRYPT 0x10 ++#define PCI_CLASS_CRYPT_NETWORK 0x1000 ++#define PCI_CLASS_CRYPT_ENTERTAINMENT 0x1001 ++#define PCI_CLASS_CRYPT_OTHER 0x1080 ++ ++#define PCI_BASE_CLASS_SIGNAL_PROCESSING 0x11 ++#define PCI_CLASS_SP_DPIO 0x1100 ++#define PCI_CLASS_SP_OTHER 0x1180 ++ ++#define PCI_CLASS_OTHERS 0xff ++ ++/* Vendors and devices. Sort key: vendor first, device next. */ ++ ++#define PCI_VENDOR_ID_DYNALINK 0x0675 ++#define PCI_DEVICE_ID_DYNALINK_IS64PH 0x1702 ++ ++#define PCI_VENDOR_ID_BERKOM 0x0871 ++#define PCI_DEVICE_ID_BERKOM_A1T 0xffa1 ++#define PCI_DEVICE_ID_BERKOM_T_CONCEPT 0xffa2 ++#define PCI_DEVICE_ID_BERKOM_A4T 0xffa4 ++#define PCI_DEVICE_ID_BERKOM_SCITEL_QUADRO 0xffa8 ++ ++#define PCI_VENDOR_ID_COMPAQ 0x0e11 ++#define PCI_DEVICE_ID_COMPAQ_TOKENRING 0x0508 ++#define PCI_DEVICE_ID_COMPAQ_1280 0x3033 ++#define PCI_DEVICE_ID_COMPAQ_TRIFLEX 0x4000 ++#define PCI_DEVICE_ID_COMPAQ_6010 0x6010 ++#define PCI_DEVICE_ID_COMPAQ_SMART2P 0xae10 ++#define PCI_DEVICE_ID_COMPAQ_NETEL100 0xae32 ++#define PCI_DEVICE_ID_COMPAQ_NETEL10 0xae34 ++#define PCI_DEVICE_ID_COMPAQ_NETFLEX3I 0xae35 ++#define PCI_DEVICE_ID_COMPAQ_NETEL100D 0xae40 ++#define PCI_DEVICE_ID_COMPAQ_NETEL100PI 0xae43 ++#define PCI_DEVICE_ID_COMPAQ_NETEL100I 0xb011 ++#define PCI_DEVICE_ID_COMPAQ_CISS 0xb060 ++#define PCI_DEVICE_ID_COMPAQ_CISSB 0xb178 ++#define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130 ++#define PCI_DEVICE_ID_COMPAQ_NETFLEX3B 0xf150 ++ ++#define PCI_VENDOR_ID_NCR 0x1000 ++#define PCI_VENDOR_ID_LSI_LOGIC 0x1000 ++#define PCI_DEVICE_ID_NCR_53C810 0x0001 ++#define PCI_DEVICE_ID_NCR_53C820 0x0002 ++#define PCI_DEVICE_ID_NCR_53C825 0x0003 ++#define PCI_DEVICE_ID_NCR_53C815 0x0004 ++#define PCI_DEVICE_ID_LSI_53C810AP 0x0005 ++#define PCI_DEVICE_ID_NCR_53C860 0x0006 ++#define PCI_DEVICE_ID_LSI_53C1510 0x000a ++#define PCI_DEVICE_ID_NCR_53C896 0x000b ++#define PCI_DEVICE_ID_NCR_53C895 0x000c ++#define PCI_DEVICE_ID_NCR_53C885 0x000d ++#define PCI_DEVICE_ID_NCR_53C875 0x000f ++#define PCI_DEVICE_ID_NCR_53C1510 0x0010 ++#define PCI_DEVICE_ID_LSI_53C895A 0x0012 ++#define PCI_DEVICE_ID_LSI_53C875A 0x0013 ++#define PCI_DEVICE_ID_LSI_53C1010_33 0x0020 ++#define PCI_DEVICE_ID_LSI_53C1010_66 0x0021 ++#define PCI_DEVICE_ID_LSI_53C1030 0x0030 ++#define PCI_DEVICE_ID_LSI_53C1035 0x0040 ++#define PCI_DEVICE_ID_NCR_53C875J 0x008f ++#define PCI_DEVICE_ID_LSI_FC909 0x0621 ++#define PCI_DEVICE_ID_LSI_FC929 0x0622 ++#define PCI_DEVICE_ID_LSI_FC929_LAN 0x0623 ++#define PCI_DEVICE_ID_LSI_FC919 0x0624 ++#define PCI_DEVICE_ID_LSI_FC919_LAN 0x0625 ++#define PCI_DEVICE_ID_NCR_YELLOWFIN 0x0701 ++#define PCI_DEVICE_ID_LSI_61C102 0x0901 ++#define PCI_DEVICE_ID_LSI_63C815 0x1000 ++ ++#define PCI_VENDOR_ID_ATI 0x1002 ++/* Mach64 */ ++#define PCI_DEVICE_ID_ATI_68800 0x4158 ++#define PCI_DEVICE_ID_ATI_215CT222 0x4354 ++#define PCI_DEVICE_ID_ATI_210888CX 0x4358 ++#define PCI_DEVICE_ID_ATI_215ET222 0x4554 ++/* Mach64 / Rage */ ++#define PCI_DEVICE_ID_ATI_215GB 0x4742 ++#define PCI_DEVICE_ID_ATI_215GD 0x4744 ++#define PCI_DEVICE_ID_ATI_215GI 0x4749 ++#define PCI_DEVICE_ID_ATI_215GP 0x4750 ++#define PCI_DEVICE_ID_ATI_215GQ 0x4751 ++#define PCI_DEVICE_ID_ATI_215XL 0x4752 ++#define PCI_DEVICE_ID_ATI_215GT 0x4754 ++#define PCI_DEVICE_ID_ATI_215GTB 0x4755 ++#define PCI_DEVICE_ID_ATI_215_IV 0x4756 ++#define PCI_DEVICE_ID_ATI_215_IW 0x4757 ++#define PCI_DEVICE_ID_ATI_215_IZ 0x475A ++#define PCI_DEVICE_ID_ATI_210888GX 0x4758 ++#define PCI_DEVICE_ID_ATI_215_LB 0x4c42 ++#define PCI_DEVICE_ID_ATI_215_LD 0x4c44 ++#define PCI_DEVICE_ID_ATI_215_LG 0x4c47 ++#define PCI_DEVICE_ID_ATI_215_LI 0x4c49 ++#define PCI_DEVICE_ID_ATI_215_LM 0x4c4D ++#define PCI_DEVICE_ID_ATI_215_LN 0x4c4E ++#define PCI_DEVICE_ID_ATI_215_LR 0x4c52 ++#define PCI_DEVICE_ID_ATI_215_LS 0x4c53 ++#define PCI_DEVICE_ID_ATI_264_LT 0x4c54 ++/* Mach64 VT */ ++#define PCI_DEVICE_ID_ATI_264VT 0x5654 ++#define PCI_DEVICE_ID_ATI_264VU 0x5655 ++#define PCI_DEVICE_ID_ATI_264VV 0x5656 ++/* Rage128 Pro GL */ ++#define PCI_DEVICE_ID_ATI_Rage128_PA 0x5041 ++#define PCI_DEVICE_ID_ATI_Rage128_PB 0x5042 ++#define PCI_DEVICE_ID_ATI_Rage128_PC 0x5043 ++#define PCI_DEVICE_ID_ATI_Rage128_PD 0x5044 ++#define PCI_DEVICE_ID_ATI_Rage128_PE 0x5045 ++#define PCI_DEVICE_ID_ATI_RAGE128_PF 0x5046 ++/* Rage128 Pro VR */ ++#define PCI_DEVICE_ID_ATI_RAGE128_PG 0x5047 ++#define PCI_DEVICE_ID_ATI_RAGE128_PH 0x5048 ++#define PCI_DEVICE_ID_ATI_RAGE128_PI 0x5049 ++#define PCI_DEVICE_ID_ATI_RAGE128_PJ 0x504A ++#define PCI_DEVICE_ID_ATI_RAGE128_PK 0x504B ++#define PCI_DEVICE_ID_ATI_RAGE128_PL 0x504C ++#define PCI_DEVICE_ID_ATI_RAGE128_PM 0x504D ++#define PCI_DEVICE_ID_ATI_RAGE128_PN 0x504E ++#define PCI_DEVICE_ID_ATI_RAGE128_PO 0x504F ++#define PCI_DEVICE_ID_ATI_RAGE128_PP 0x5050 ++#define PCI_DEVICE_ID_ATI_RAGE128_PQ 0x5051 ++#define PCI_DEVICE_ID_ATI_RAGE128_PR 0x5052 ++#define PCI_DEVICE_ID_ATI_RAGE128_TR 0x5452 ++#define PCI_DEVICE_ID_ATI_RAGE128_PS 0x5053 ++#define PCI_DEVICE_ID_ATI_RAGE128_PT 0x5054 ++#define PCI_DEVICE_ID_ATI_RAGE128_PU 0x5055 ++#define PCI_DEVICE_ID_ATI_RAGE128_PV 0x5056 ++#define PCI_DEVICE_ID_ATI_RAGE128_PW 0x5057 ++#define PCI_DEVICE_ID_ATI_RAGE128_PX 0x5058 ++/* Rage128 GL */ ++#define PCI_DEVICE_ID_ATI_RAGE128_RE 0x5245 ++#define PCI_DEVICE_ID_ATI_RAGE128_RF 0x5246 ++#define PCI_DEVICE_ID_ATI_RAGE128_RG 0x534b ++#define PCI_DEVICE_ID_ATI_RAGE128_RH 0x534c ++#define PCI_DEVICE_ID_ATI_RAGE128_RI 0x534d ++/* Rage128 VR */ ++#define PCI_DEVICE_ID_ATI_RAGE128_RK 0x524b ++#define PCI_DEVICE_ID_ATI_RAGE128_RL 0x524c ++#define PCI_DEVICE_ID_ATI_RAGE128_RM 0x5345 ++#define PCI_DEVICE_ID_ATI_RAGE128_RN 0x5346 ++#define PCI_DEVICE_ID_ATI_RAGE128_RO 0x5347 ++/* Rage128 M3 */ ++#define PCI_DEVICE_ID_ATI_RAGE128_LE 0x4c45 ++#define PCI_DEVICE_ID_ATI_RAGE128_LF 0x4c46 ++/* Rage128 Pro Ultra */ ++#define PCI_DEVICE_ID_ATI_RAGE128_U1 0x5446 ++#define PCI_DEVICE_ID_ATI_RAGE128_U2 0x544C ++#define PCI_DEVICE_ID_ATI_RAGE128_U3 0x5452 ++/* Radeon M4 */ ++#define PCI_DEVICE_ID_ATI_RADEON_LE 0x4d45 ++#define PCI_DEVICE_ID_ATI_RADEON_LF 0x4d46 ++/* Radeon NV-100 */ ++#define PCI_DEVICE_ID_ATI_RADEON_N1 0x5159 ++#define PCI_DEVICE_ID_ATI_RADEON_N2 0x515a ++/* Radeon */ ++#define PCI_DEVICE_ID_ATI_RADEON_RA 0x5144 ++#define PCI_DEVICE_ID_ATI_RADEON_RB 0x5145 ++#define PCI_DEVICE_ID_ATI_RADEON_RC 0x5146 ++#define PCI_DEVICE_ID_ATI_RADEON_RD 0x5147 ++ ++#define PCI_VENDOR_ID_VLSI 0x1004 ++#define PCI_DEVICE_ID_VLSI_82C592 0x0005 ++#define PCI_DEVICE_ID_VLSI_82C593 0x0006 ++#define PCI_DEVICE_ID_VLSI_82C594 0x0007 ++#define PCI_DEVICE_ID_VLSI_82C597 0x0009 ++#define PCI_DEVICE_ID_VLSI_82C541 0x000c ++#define PCI_DEVICE_ID_VLSI_82C543 0x000d ++#define PCI_DEVICE_ID_VLSI_82C532 0x0101 ++#define PCI_DEVICE_ID_VLSI_82C534 0x0102 ++#define PCI_DEVICE_ID_VLSI_82C535 0x0104 ++#define PCI_DEVICE_ID_VLSI_82C147 0x0105 ++#define PCI_DEVICE_ID_VLSI_VAS96011 0x0702 ++ ++#define PCI_VENDOR_ID_ADL 0x1005 ++#define PCI_DEVICE_ID_ADL_2301 0x2301 ++ ++#define PCI_VENDOR_ID_NS 0x100b ++#define PCI_DEVICE_ID_NS_87415 0x0002 ++#define PCI_DEVICE_ID_NS_87560_LIO 0x000e ++#define PCI_DEVICE_ID_NS_87560_USB 0x0012 ++#define PCI_DEVICE_ID_NS_83815 0x0020 ++#define PCI_DEVICE_ID_DP83815 0x0020 ++#define PCI_DEVICE_ID_NS_83820 0x0022 ++#define PCI_DEVICE_ID_NS_87410 0xd001 ++ ++#define PCI_VENDOR_ID_TSENG 0x100c ++#define PCI_DEVICE_ID_TSENG_W32P_2 0x3202 ++#define PCI_DEVICE_ID_TSENG_W32P_b 0x3205 ++#define PCI_DEVICE_ID_TSENG_W32P_c 0x3206 ++#define PCI_DEVICE_ID_TSENG_W32P_d 0x3207 ++#define PCI_DEVICE_ID_TSENG_ET6000 0x3208 ++ ++#define PCI_VENDOR_ID_WEITEK 0x100e ++#define PCI_DEVICE_ID_WEITEK_P9000 0x9001 ++#define PCI_DEVICE_ID_WEITEK_P9100 0x9100 ++ ++#define PCI_VENDOR_ID_DEC 0x1011 ++#define PCI_DEVICE_ID_DEC_BRD 0x0001 ++#define PCI_DEVICE_ID_DEC_TULIP 0x0002 ++#define PCI_DEVICE_ID_DEC_TGA 0x0004 ++#define PCI_DEVICE_ID_DEC_TULIP_FAST 0x0009 ++#define PCI_DEVICE_ID_DEC_TGA2 0x000D ++#define PCI_DEVICE_ID_DEC_FDDI 0x000F ++#define PCI_DEVICE_ID_DEC_TULIP_PLUS 0x0014 ++#define PCI_DEVICE_ID_DEC_21142 0x0019 ++#define PCI_DEVICE_ID_DEC_21052 0x0021 ++#define PCI_DEVICE_ID_DEC_21150 0x0022 ++#define PCI_DEVICE_ID_DEC_21152 0x0024 ++#define PCI_DEVICE_ID_DEC_21153 0x0025 ++#define PCI_DEVICE_ID_DEC_21154 0x0026 ++#define PCI_DEVICE_ID_DEC_21285 0x1065 ++#define PCI_DEVICE_ID_COMPAQ_42XX 0x0046 ++ ++#define PCI_VENDOR_ID_CIRRUS 0x1013 ++#define PCI_DEVICE_ID_CIRRUS_7548 0x0038 ++#define PCI_DEVICE_ID_CIRRUS_5430 0x00a0 ++#define PCI_DEVICE_ID_CIRRUS_5434_4 0x00a4 ++#define PCI_DEVICE_ID_CIRRUS_5434_8 0x00a8 ++#define PCI_DEVICE_ID_CIRRUS_5436 0x00ac ++#define PCI_DEVICE_ID_CIRRUS_5446 0x00b8 ++#define PCI_DEVICE_ID_CIRRUS_5480 0x00bc ++#define PCI_DEVICE_ID_CIRRUS_5462 0x00d0 ++#define PCI_DEVICE_ID_CIRRUS_5464 0x00d4 ++#define PCI_DEVICE_ID_CIRRUS_5465 0x00d6 ++#define PCI_DEVICE_ID_CIRRUS_6729 0x1100 ++#define PCI_DEVICE_ID_CIRRUS_6832 0x1110 ++#define PCI_DEVICE_ID_CIRRUS_7542 0x1200 ++#define PCI_DEVICE_ID_CIRRUS_7543 0x1202 ++#define PCI_DEVICE_ID_CIRRUS_7541 0x1204 ++ ++#define PCI_VENDOR_ID_IBM 0x1014 ++#define PCI_DEVICE_ID_IBM_FIRE_CORAL 0x000a ++#define PCI_DEVICE_ID_IBM_TR 0x0018 ++#define PCI_DEVICE_ID_IBM_82G2675 0x001d ++#define PCI_DEVICE_ID_IBM_MCA 0x0020 ++#define PCI_DEVICE_ID_IBM_82351 0x0022 ++#define PCI_DEVICE_ID_IBM_PYTHON 0x002d ++#define PCI_DEVICE_ID_IBM_SERVERAID 0x002e ++#define PCI_DEVICE_ID_IBM_TR_WAKE 0x003e ++#define PCI_DEVICE_ID_IBM_MPIC 0x0046 ++#define PCI_DEVICE_ID_IBM_3780IDSP 0x007d ++#define PCI_DEVICE_ID_IBM_CHUKAR 0x0096 ++#define PCI_DEVICE_ID_IBM_405GP 0x0156 ++#define PCI_DEVICE_ID_IBM_SERVERAIDI960 0x01bd ++#define PCI_DEVICE_ID_IBM_MPIC_2 0xffff ++ ++#define PCI_VENDOR_ID_COMPEX2 0x101a // pci.ids says "AT&T GIS (NCR)" ++#define PCI_DEVICE_ID_COMPEX2_100VG 0x0005 ++ ++#define PCI_VENDOR_ID_WD 0x101c ++#define PCI_DEVICE_ID_WD_7197 0x3296 ++ ++#define PCI_VENDOR_ID_AMI 0x101e ++#define PCI_DEVICE_ID_AMI_MEGARAID3 0x1960 ++#define PCI_DEVICE_ID_AMI_MEGARAID 0x9010 ++#define PCI_DEVICE_ID_AMI_MEGARAID2 0x9060 ++ ++#define PCI_VENDOR_ID_AMD 0x1022 ++ ++#define PCI_DEVICE_ID_AMD_LANCE 0x2000 ++#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 ++#define PCI_DEVICE_ID_AMD_HOMEPNA 0x2001 ++#define PCI_DEVICE_ID_AMD_SCSI 0x2020 ++#define PCI_DEVICE_ID_AMD_FE_GATE_7006 0x7006 ++#define PCI_DEVICE_ID_AMD_FE_GATE_7007 0x7007 ++#define PCI_DEVICE_ID_AMD_FE_GATE_700C 0x700C ++#define PCI_DEVIDE_ID_AMD_FE_GATE_700D 0x700D ++#define PCI_DEVICE_ID_AMD_FE_GATE_700E 0x700E ++#define PCI_DEVICE_ID_AMD_FE_GATE_700F 0x700F ++#define PCI_DEVICE_ID_AMD_COBRA_7400 0x7400 ++#define PCI_DEVICE_ID_AMD_COBRA_7401 0x7401 ++#define PCI_DEVICE_ID_AMD_COBRA_7403 0x7403 ++#define PCI_DEVICE_ID_AMD_COBRA_7404 0x7404 ++#define PCI_DEVICE_ID_AMD_VIPER_7408 0x7408 ++#define PCI_DEVICE_ID_AMD_VIPER_7409 0x7409 ++#define PCI_DEVICE_ID_AMD_VIPER_740B 0x740B ++#define PCI_DEVICE_ID_AMD_VIPER_740C 0x740C ++#define PCI_DEVICE_ID_AMD_VIPER_7410 0x7410 ++#define PCI_DEVICE_ID_AMD_VIPER_7411 0x7411 ++#define PCI_DEVICE_ID_AMD_VIPER_7413 0x7413 ++#define PCI_DEVICE_ID_AMD_VIPER_7414 0x7414 ++#define PCI_DEVICE_ID_AMD_VIPER_7440 0x7440 ++#define PCI_DEVICE_ID_AMD_VIPER_7441 0x7441 ++#define PCI_DEVICE_ID_AMD_VIPER_7443 0x7443 ++#define PCI_DEVICE_ID_AMD_VIPER_7448 0x7448 ++#define PCI_DEVICE_ID_AMD_VIPER_7449 0x7449 ++ ++#define PCI_VENDOR_ID_TRIDENT 0x1023 ++#define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX 0x2000 ++#define PCI_DEVICE_ID_TRIDENT_4DWAVE_NX 0x2001 ++#define PCI_DEVICE_ID_TRIDENT_9320 0x9320 ++#define PCI_DEVICE_ID_TRIDENT_9388 0x9388 ++#define PCI_DEVICE_ID_TRIDENT_9397 0x9397 ++#define PCI_DEVICE_ID_TRIDENT_939A 0x939A ++#define PCI_DEVICE_ID_TRIDENT_9520 0x9520 ++#define PCI_DEVICE_ID_TRIDENT_9525 0x9525 ++#define PCI_DEVICE_ID_TRIDENT_9420 0x9420 ++#define PCI_DEVICE_ID_TRIDENT_9440 0x9440 ++#define PCI_DEVICE_ID_TRIDENT_9660 0x9660 ++#define PCI_DEVICE_ID_TRIDENT_9750 0x9750 ++#define PCI_DEVICE_ID_TRIDENT_9850 0x9850 ++#define PCI_DEVICE_ID_TRIDENT_9880 0x9880 ++#define PCI_DEVICE_ID_TRIDENT_8400 0x8400 ++#define PCI_DEVICE_ID_TRIDENT_8420 0x8420 ++#define PCI_DEVICE_ID_TRIDENT_8500 0x8500 ++ ++#define PCI_VENDOR_ID_AI 0x1025 ++#define PCI_DEVICE_ID_AI_M1435 0x1435 ++ ++#define PCI_VENDOR_ID_DELL 0x1028 ++ ++#define PCI_VENDOR_ID_MATROX 0x102B ++#define PCI_DEVICE_ID_MATROX_MGA_2 0x0518 ++#define PCI_DEVICE_ID_MATROX_MIL 0x0519 ++#define PCI_DEVICE_ID_MATROX_MYS 0x051A ++#define PCI_DEVICE_ID_MATROX_MIL_2 0x051b ++#define PCI_DEVICE_ID_MATROX_MIL_2_AGP 0x051f ++#define PCI_DEVICE_ID_MATROX_MGA_IMP 0x0d10 ++#define PCI_DEVICE_ID_MATROX_G100_MM 0x1000 ++#define PCI_DEVICE_ID_MATROX_G100_AGP 0x1001 ++#define PCI_DEVICE_ID_MATROX_G200_PCI 0x0520 ++#define PCI_DEVICE_ID_MATROX_G200_AGP 0x0521 ++#define PCI_DEVICE_ID_MATROX_G400 0x0525 ++#define PCI_DEVICE_ID_MATROX_G550 0x2527 ++#define PCI_DEVICE_ID_MATROX_VIA 0x4536 ++ ++#define PCI_VENDOR_ID_CT 0x102c ++#define PCI_DEVICE_ID_CT_65545 0x00d8 ++#define PCI_DEVICE_ID_CT_65548 0x00dc ++#define PCI_DEVICE_ID_CT_65550 0x00e0 ++#define PCI_DEVICE_ID_CT_65554 0x00e4 ++#define PCI_DEVICE_ID_CT_65555 0x00e5 ++ ++#define PCI_VENDOR_ID_MIRO 0x1031 ++#define PCI_DEVICE_ID_MIRO_36050 0x5601 ++ ++#define PCI_VENDOR_ID_NEC 0x1033 ++#define PCI_DEVICE_ID_NEC_PCX2 0x0046 ++#define PCI_DEVICE_ID_NEC_NILE4 0x005a ++#define PCI_DEVICE_ID_NEC_VRC5476 0x009b ++ ++#define PCI_VENDOR_ID_FD 0x1036 ++#define PCI_DEVICE_ID_FD_36C70 0x0000 ++ ++#define PCI_VENDOR_ID_SIS 0x1039 ++#define PCI_VENDOR_ID_SI 0x1039 ++#define PCI_DEVICE_ID_SI_5591_AGP 0x0001 ++#define PCI_DEVICE_ID_SI_6202 0x0002 ++#define PCI_DEVICE_ID_SI_503 0x0008 ++#define PCI_DEVICE_ID_SI_ACPI 0x0009 ++#define PCI_DEVICE_ID_SI_5597_VGA 0x0200 ++#define PCI_DEVICE_ID_SI_6205 0x0205 ++#define PCI_DEVICE_ID_SI_501 0x0406 ++#define PCI_DEVICE_ID_SI_496 0x0496 ++#define PCI_DEVICE_ID_SI_300 0x0300 ++#define PCI_DEVICE_ID_SI_315H 0x0310 ++#define PCI_DEVICE_ID_SI_315 0x0315 ++#define PCI_DEVICE_ID_SI_315PRO 0x0325 ++#define PCI_DEVICE_ID_SI_530 0x0530 ++#define PCI_DEVICE_ID_SI_540 0x0540 ++#define PCI_DEVICE_ID_SI_550 0x0550 ++#define PCI_DEVICE_ID_SI_601 0x0601 ++#define PCI_DEVICE_ID_SI_620 0x0620 ++#define PCI_DEVICE_ID_SI_630 0x0630 ++#define PCI_DEVICE_ID_SI_635 0x0635 ++#define PCI_DEVICE_ID_SI_640 0x0640 ++#define PCI_DEVICE_ID_SI_645 0x0645 ++#define PCI_DEVICE_ID_SI_650 0x0650 ++#define PCI_DEVICE_ID_SI_730 0x0730 ++#define PCI_DEVICE_ID_SI_735 0x0735 ++#define PCI_DEVICE_ID_SI_740 0x0740 ++#define PCI_DEVICE_ID_SI_745 0x0745 ++#define PCI_DEVICE_ID_SI_750 0x0750 ++#define PCI_DEVICE_ID_SI_900 0x0900 ++#define PCI_DEVICE_ID_SIS900 0x0900 ++#define PCI_DEVICE_ID_SI_5107 0x5107 ++#define PCI_DEVICE_ID_SI_5300 0x5300 ++#define PCI_DEVICE_ID_SI_540_VGA 0x5300 ++#define PCI_DEVICE_ID_SI_550_VGA 0x5315 ++#define PCI_DEVICE_ID_SI_5511 0x5511 ++#define PCI_DEVICE_ID_SI_5513 0x5513 ++#define PCI_DEVICE_ID_SI_5571 0x5571 ++#define PCI_DEVICE_ID_SI_5591 0x5591 ++#define PCI_DEVICE_ID_SI_5597 0x5597 ++#define PCI_DEVICE_ID_SI_5598 0x5598 ++#define PCI_DEVICE_ID_SI_5600 0x5600 ++#define PCI_DEVICE_ID_SI_6300 0x6300 ++#define PCI_DEVICE_ID_SI_630_VGA 0x6300 ++#define PCI_DEVICE_ID_SI_6306 0x6306 ++#define PCI_DEVICE_ID_SI_6326 0x6326 ++#define PCI_DEVICE_ID_SI_7001 0x7001 ++#define PCI_DEVICE_ID_SI_7016 0x7016 ++#define PCI_DEVICE_ID_SIS7016 0x7016 ++#define PCI_DEVICE_ID_SI_730_VGA 0x7300 ++ ++#define PCI_VENDOR_ID_HP 0x103c ++#define PCI_DEVICE_ID_HP_DONNER_GFX 0x1008 ++#define PCI_DEVICE_ID_HP_TACHYON 0x1028 ++#define PCI_DEVICE_ID_HP_TACHLITE 0x1029 ++#define PCI_DEVICE_ID_HP_J2585A 0x1030 ++#define PCI_DEVICE_ID_HP_J2585B 0x1031 ++#define PCI_DEVICE_ID_HP_SAS 0x1048 ++#define PCI_DEVICE_ID_HP_DIVA1 0x1049 ++#define PCI_DEVICE_ID_HP_DIVA2 0x104A ++#define PCI_DEVICE_ID_HP_SP2_0 0x104B ++ ++#define PCI_VENDOR_ID_PCTECH 0x1042 ++#define PCI_DEVICE_ID_PCTECH_RZ1000 0x1000 ++#define PCI_DEVICE_ID_PCTECH_RZ1001 0x1001 ++#define PCI_DEVICE_ID_PCTECH_SAMURAI_0 0x3000 ++#define PCI_DEVICE_ID_PCTECH_SAMURAI_1 0x3010 ++#define PCI_DEVICE_ID_PCTECH_SAMURAI_IDE 0x3020 ++ ++#define PCI_VENDOR_ID_ASUSTEK 0x1043 ++#define PCI_DEVICE_ID_ASUSTEK_0675 0x0675 ++ ++#define PCI_VENDOR_ID_DPT 0x1044 ++#define PCI_DEVICE_ID_DPT 0xa400 ++ ++#define PCI_VENDOR_ID_OPTI 0x1045 ++#define PCI_DEVICE_ID_OPTI_92C178 0xc178 ++#define PCI_DEVICE_ID_OPTI_82C557 0xc557 ++#define PCI_DEVICE_ID_OPTI_82C558 0xc558 ++#define PCI_DEVICE_ID_OPTI_82C621 0xc621 ++#define PCI_DEVICE_ID_OPTI_82C700 0xc700 ++#define PCI_DEVICE_ID_OPTI_82C701 0xc701 ++#define PCI_DEVICE_ID_OPTI_82C814 0xc814 ++#define PCI_DEVICE_ID_OPTI_82C822 0xc822 ++#define PCI_DEVICE_ID_OPTI_82C861 0xc861 ++#define PCI_DEVICE_ID_OPTI_82C825 0xd568 ++ ++#define PCI_VENDOR_ID_ELSA 0x1048 ++#define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 ++#define PCI_DEVICE_ID_ELSA_QS3000 0x3000 ++ ++#define PCI_VENDOR_ID_ELSA 0x1048 ++#define PCI_DEVICE_ID_ELSA_MICROLINK 0x1000 ++#define PCI_DEVICE_ID_ELSA_QS3000 0x3000 ++ ++#define PCI_VENDOR_ID_SGS 0x104a ++#define PCI_DEVICE_ID_SGS_2000 0x0008 ++#define PCI_DEVICE_ID_SGS_1764 0x0009 ++ ++#define PCI_VENDOR_ID_BUSLOGIC 0x104B ++#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC 0x0140 ++#define PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER 0x1040 ++#define PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT 0x8130 ++ ++#define PCI_VENDOR_ID_TI 0x104c ++#define PCI_DEVICE_ID_TI_TVP4010 0x3d04 ++#define PCI_DEVICE_ID_TI_TVP4020 0x3d07 ++#define PCI_DEVICE_ID_TI_1130 0xac12 ++#define PCI_DEVICE_ID_TI_1031 0xac13 ++#define PCI_DEVICE_ID_TI_1131 0xac15 ++#define PCI_DEVICE_ID_TI_1250 0xac16 ++#define PCI_DEVICE_ID_TI_1220 0xac17 ++#define PCI_DEVICE_ID_TI_1221 0xac19 ++#define PCI_DEVICE_ID_TI_1210 0xac1a ++#define PCI_DEVICE_ID_TI_1410 0xac50 ++#define PCI_DEVICE_ID_TI_1450 0xac1b ++#define PCI_DEVICE_ID_TI_1225 0xac1c ++#define PCI_DEVICE_ID_TI_1251A 0xac1d ++#define PCI_DEVICE_ID_TI_1211 0xac1e ++#define PCI_DEVICE_ID_TI_1251B 0xac1f ++#define PCI_DEVICE_ID_TI_4410 0xac41 ++#define PCI_DEVICE_ID_TI_4451 0xac42 ++#define PCI_DEVICE_ID_TI_1420 0xac51 ++ ++#define PCI_VENDOR_ID_SONY 0x104d ++#define PCI_DEVICE_ID_SONY_CXD3222 0x8039 ++ ++#define PCI_VENDOR_ID_OAK 0x104e ++#define PCI_DEVICE_ID_OAK_OTI107 0x0107 ++ ++/* Winbond have two vendor IDs! See 0x10ad as well */ ++#define PCI_VENDOR_ID_WINBOND2 0x1050 ++#define PCI_DEVICE_ID_WINBOND2_89C840 0x0840 ++#define PCI_DEVICE_ID_WINBOND2_89C940 0x0940 ++#define PCI_DEVICE_ID_WINBOND2_89C940F 0x5a5a ++#define PCI_DEVICE_ID_WINBOND2_6692 0x6692 ++ ++#define PCI_VENDOR_ID_ANIGMA 0x1051 ++#define PCI_DEVICE_ID_ANIGMA_MC145575 0x0100 ++ ++#define PCI_VENDOR_ID_EFAR 0x1055 ++#define PCI_DEVICE_ID_EFAR_SLC90E66_1 0x9130 ++#define PCI_DEVICE_ID_EFAR_SLC90E66_0 0x9460 ++#define PCI_DEVICE_ID_EFAR_SLC90E66_2 0x9462 ++#define PCI_DEVICE_ID_EFAR_SLC90E66_3 0x9463 ++ ++#define PCI_VENDOR_ID_MOTOROLA 0x1057 ++#define PCI_VENDOR_ID_MOTOROLA_OOPS 0x1507 ++#define PCI_DEVICE_ID_MOTOROLA_MPC105 0x0001 ++#define PCI_DEVICE_ID_MOTOROLA_MPC106 0x0002 ++#define PCI_DEVICE_ID_MOTOROLA_RAVEN 0x4801 ++#define PCI_DEVICE_ID_MOTOROLA_FALCON 0x4802 ++#define PCI_DEVICE_ID_MOTOROLA_CPX8216 0x4806 ++ ++#define PCI_VENDOR_ID_PROMISE 0x105a ++#define PCI_DEVICE_ID_PROMISE_20265 0x0d30 ++#define PCI_DEVICE_ID_PROMISE_20267 0x4d30 ++#define PCI_DEVICE_ID_PROMISE_20246 0x4d33 ++#define PCI_DEVICE_ID_PROMISE_20262 0x4d38 ++#define PCI_DEVICE_ID_PROMISE_20268 0x4d68 ++#define PCI_DEVICE_ID_PROMISE_20268R 0x6268 ++#define PCI_DEVICE_ID_PROMISE_20269 0x4d69 ++#define PCI_DEVICE_ID_PROMISE_20275 0x1275 ++#define PCI_DEVICE_ID_PROMISE_5300 0x5300 ++ ++#define PCI_VENDOR_ID_N9 0x105d ++#define PCI_DEVICE_ID_N9_I128 0x2309 ++#define PCI_DEVICE_ID_N9_I128_2 0x2339 ++#define PCI_DEVICE_ID_N9_I128_T2R 0x493d ++ ++#define PCI_VENDOR_ID_UMC 0x1060 ++#define PCI_DEVICE_ID_UMC_UM8673F 0x0101 ++#define PCI_DEVICE_ID_UMC_UM8891A 0x0891 ++#define PCI_DEVICE_ID_UMC_UM8886BF 0x673a ++#define PCI_DEVICE_ID_UMC_UM8886A 0x886a ++#define PCI_DEVICE_ID_UMC_UM8881F 0x8881 ++#define PCI_DEVICE_ID_UMC_UM8886F 0x8886 ++#define PCI_DEVICE_ID_UMC_UM9017F 0x9017 ++#define PCI_DEVICE_ID_UMC_UM8886N 0xe886 ++#define PCI_DEVICE_ID_UMC_UM8891N 0xe891 ++ ++#define PCI_VENDOR_ID_X 0x1061 ++#define PCI_DEVICE_ID_X_AGX016 0x0001 ++ ++#define PCI_VENDOR_ID_MYLEX 0x1069 ++#define PCI_DEVICE_ID_MYLEX_DAC960_P 0x0001 ++#define PCI_DEVICE_ID_MYLEX_DAC960_PD 0x0002 ++#define PCI_DEVICE_ID_MYLEX_DAC960_PG 0x0010 ++#define PCI_DEVICE_ID_MYLEX_DAC960_LA 0x0020 ++#define PCI_DEVICE_ID_MYLEX_DAC960_LP 0x0050 ++#define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 ++ ++#define PCI_VENDOR_ID_PICOP 0x1066 ++#define PCI_DEVICE_ID_PICOP_PT86C52X 0x0001 ++#define PCI_DEVICE_ID_PICOP_PT80C524 0x8002 ++ ++#define PCI_VENDOR_ID_APPLE 0x106b ++#define PCI_DEVICE_ID_APPLE_BANDIT 0x0001 ++#define PCI_DEVICE_ID_APPLE_GC 0x0002 ++#define PCI_DEVICE_ID_APPLE_HYDRA 0x000e ++#define PCI_DEVICE_ID_APPLE_UNI_N_FW 0x0018 ++#define PCI_DEVICE_ID_APPLE_KL_USB 0x0019 ++#define PCI_DEVICE_ID_APPLE_UNI_N_AGP 0x0020 ++#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC 0x0021 ++#define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030 ++ ++#define PCI_VENDOR_ID_YAMAHA 0x1073 ++#define PCI_DEVICE_ID_YAMAHA_724 0x0004 ++#define PCI_DEVICE_ID_YAMAHA_724F 0x000d ++#define PCI_DEVICE_ID_YAMAHA_740 0x000a ++#define PCI_DEVICE_ID_YAMAHA_740C 0x000c ++#define PCI_DEVICE_ID_YAMAHA_744 0x0010 ++#define PCI_DEVICE_ID_YAMAHA_754 0x0012 ++ ++#define PCI_VENDOR_ID_NEXGEN 0x1074 ++#define PCI_DEVICE_ID_NEXGEN_82C501 0x4e78 ++ ++#define PCI_VENDOR_ID_QLOGIC 0x1077 ++#define PCI_DEVICE_ID_QLOGIC_ISP1020 0x1020 ++#define PCI_DEVICE_ID_QLOGIC_ISP1022 0x1022 ++#define PCI_DEVICE_ID_QLOGIC_ISP2100 0x2100 ++#define PCI_DEVICE_ID_QLOGIC_ISP2200 0x2200 ++ ++#define PCI_VENDOR_ID_CYRIX 0x1078 ++#define PCI_DEVICE_ID_CYRIX_5510 0x0000 ++#define PCI_DEVICE_ID_CYRIX_PCI_MASTER 0x0001 ++#define PCI_DEVICE_ID_CYRIX_5520 0x0002 ++#define PCI_DEVICE_ID_CYRIX_5530_LEGACY 0x0100 ++#define PCI_DEVICE_ID_CYRIX_5530_SMI 0x0101 ++#define PCI_DEVICE_ID_CYRIX_5530_IDE 0x0102 ++#define PCI_DEVICE_ID_CYRIX_5530_AUDIO 0x0103 ++#define PCI_DEVICE_ID_CYRIX_5530_VIDEO 0x0104 ++ ++#define PCI_VENDOR_ID_LEADTEK 0x107d ++#define PCI_DEVICE_ID_LEADTEK_805 0x0000 ++ ++#define PCI_VENDOR_ID_INTERPHASE 0x107e ++#define PCI_DEVICE_ID_INTERPHASE_5526 0x0004 ++#define PCI_DEVICE_ID_INTERPHASE_55x6 0x0005 ++#define PCI_DEVICE_ID_INTERPHASE_5575 0x0008 ++ ++#define PCI_VENDOR_ID_CONTAQ 0x1080 ++#define PCI_DEVICE_ID_CONTAQ_82C599 0x0600 ++#define PCI_DEVICE_ID_CONTAQ_82C693 0xc693 ++ ++#define PCI_VENDOR_ID_FOREX 0x1083 ++ ++#define PCI_VENDOR_ID_OLICOM 0x108d ++#define PCI_DEVICE_ID_OLICOM_OC3136 0x0001 ++#define PCI_DEVICE_ID_OLICOM_OC2315 0x0011 ++#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 ++#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 ++#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 ++#define PCI_DEVICE_ID_OLICOM_OC6151 0x0021 ++ ++#define PCI_VENDOR_ID_SUN 0x108e ++#define PCI_DEVICE_ID_SUN_EBUS 0x1000 ++#define PCI_DEVICE_ID_SUN_HAPPYMEAL 0x1001 ++#define PCI_DEVICE_ID_SUN_RIO_EBUS 0x1100 ++#define PCI_DEVICE_ID_SUN_RIO_GEM 0x1101 ++#define PCI_DEVICE_ID_SUN_RIO_1394 0x1102 ++#define PCI_DEVICE_ID_SUN_RIO_USB 0x1103 ++#define PCI_DEVICE_ID_SUN_GEM 0x2bad ++#define PCI_DEVICE_ID_SUN_SIMBA 0x5000 ++#define PCI_DEVICE_ID_SUN_PBM 0x8000 ++#define PCI_DEVICE_ID_SUN_SCHIZO 0x8001 ++#define PCI_DEVICE_ID_SUN_SABRE 0xa000 ++#define PCI_DEVICE_ID_SUN_HUMMINGBIRD 0xa001 ++ ++#define PCI_VENDOR_ID_CMD 0x1095 ++#define PCI_DEVICE_ID_CMD_640 0x0640 ++#define PCI_DEVICE_ID_CMD_643 0x0643 ++#define PCI_DEVICE_ID_CMD_646 0x0646 ++#define PCI_DEVICE_ID_CMD_647 0x0647 ++#define PCI_DEVICE_ID_CMD_648 0x0648 ++#define PCI_DEVICE_ID_CMD_649 0x0649 ++#define PCI_DEVICE_ID_CMD_670 0x0670 ++#define PCI_DEVICE_ID_CMD_680 0x0680 ++ ++#define PCI_VENDOR_ID_VISION 0x1098 ++#define PCI_DEVICE_ID_VISION_QD8500 0x0001 ++#define PCI_DEVICE_ID_VISION_QD8580 0x0002 ++ ++#define PCI_VENDOR_ID_BROOKTREE 0x109e ++#define PCI_DEVICE_ID_BROOKTREE_848 0x0350 ++#define PCI_DEVICE_ID_BROOKTREE_849A 0x0351 ++#define PCI_DEVICE_ID_BROOKTREE_878_1 0x036e ++#define PCI_DEVICE_ID_BROOKTREE_878 0x0878 ++#define PCI_DEVICE_ID_BROOKTREE_8474 0x8474 ++ ++#define PCI_VENDOR_ID_SIERRA 0x10a8 ++#define PCI_DEVICE_ID_SIERRA_STB 0x0000 ++ ++#define PCI_VENDOR_ID_SGI 0x10a9 ++#define PCI_DEVICE_ID_SGI_IOC3 0x0003 ++ ++#define PCI_VENDOR_ID_ACC 0x10aa ++#define PCI_DEVICE_ID_ACC_2056 0x0000 ++ ++#define PCI_VENDOR_ID_WINBOND 0x10ad ++#define PCI_DEVICE_ID_WINBOND_83769 0x0001 ++#define PCI_DEVICE_ID_WINBOND_82C105 0x0105 ++#define PCI_DEVICE_ID_WINBOND_83C553 0x0565 ++ ++#define PCI_VENDOR_ID_DATABOOK 0x10b3 ++#define PCI_DEVICE_ID_DATABOOK_87144 0xb106 ++ ++#define PCI_VENDOR_ID_PLX 0x10b5 ++#define PCI_DEVICE_ID_PLX_R685 0x1030 ++#define PCI_DEVICE_ID_PLX_ROMULUS 0x106a ++#define PCI_DEVICE_ID_PLX_SPCOM800 0x1076 ++#define PCI_DEVICE_ID_PLX_1077 0x1077 ++#define PCI_DEVICE_ID_PLX_SPCOM200 0x1103 ++#define PCI_DEVICE_ID_PLX_DJINN_ITOO 0x1151 ++#define PCI_DEVICE_ID_PLX_R753 0x1152 ++#define PCI_DEVICE_ID_PLX_9050 0x9050 ++#define PCI_DEVICE_ID_PLX_9060 0x9060 ++#define PCI_DEVICE_ID_PLX_9060ES 0x906E ++#define PCI_DEVICE_ID_PLX_9060SD 0x906D ++#define PCI_DEVICE_ID_PLX_9080 0x9080 ++#define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 ++ ++#define PCI_VENDOR_ID_MADGE 0x10b6 ++#define PCI_DEVICE_ID_MADGE_MK2 0x0002 ++#define PCI_DEVICE_ID_MADGE_C155S 0x1001 ++ ++#define PCI_VENDOR_ID_3COM 0x10b7 ++#define PCI_DEVICE_ID_3COM_3C985 0x0001 ++#define PCI_DEVICE_ID_3COM_3C339 0x3390 ++#define PCI_DEVICE_ID_3COM_3C590 0x5900 ++#define PCI_DEVICE_ID_3COM_3C595 0x5950 ++#define PCI_DEVICE_ID_3COM_3C595TX 0x5950 ++#define PCI_DEVICE_ID_3COM_3C595_1 0x5951 ++#define PCI_DEVICE_ID_3COM_3C595T4 0x5951 ++#define PCI_DEVICE_ID_3COM_3C595_2 0x5952 ++#define PCI_DEVICE_ID_3COM_3C595MII 0x5952 ++#define PCI_DEVICE_ID_3COM_3C900TPO 0x9000 ++#define PCI_DEVICE_ID_3COM_3C900COMBO 0x9001 ++#define PCI_DEVICE_ID_3COM_3C905TX 0x9050 ++#define PCI_DEVICE_ID_3COM_3C905T4 0x9051 ++#define PCI_DEVICE_ID_3COM_3C905B_TX 0x9055 ++#define PCI_DEVICE_ID_3COM_3C905C_TXM 0x9200 ++ ++#define PCI_VENDOR_ID_SMC 0x10b8 ++#define PCI_DEVICE_ID_SMC_EPIC100 0x0005 ++ ++#define PCI_VENDOR_ID_SUNDANCE 0x13F0 ++#define PCI_DEVICE_ID_SUNDANCE_ALTA 0x0201 ++ ++#define PCI_VENDOR_ID_AL 0x10b9 ++#define PCI_DEVICE_ID_AL_M1445 0x1445 ++#define PCI_DEVICE_ID_AL_M1449 0x1449 ++#define PCI_DEVICE_ID_AL_M1451 0x1451 ++#define PCI_DEVICE_ID_AL_M1461 0x1461 ++#define PCI_DEVICE_ID_AL_M1489 0x1489 ++#define PCI_DEVICE_ID_AL_M1511 0x1511 ++#define PCI_DEVICE_ID_AL_M1513 0x1513 ++#define PCI_DEVICE_ID_AL_M1521 0x1521 ++#define PCI_DEVICE_ID_AL_M1523 0x1523 ++#define PCI_DEVICE_ID_AL_M1531 0x1531 ++#define PCI_DEVICE_ID_AL_M1533 0x1533 ++#define PCI_DEVICE_ID_AL_M1541 0x1541 ++#define PCI_DEVICE_ID_AL_M1621 0x1621 ++#define PCI_DEVICE_ID_AL_M1631 0x1631 ++#define PCI_DEVICE_ID_AL_M1641 0x1641 ++#define PCI_DEVICE_ID_AL_M1647 0x1647 ++#define PCI_DEVICE_ID_AL_M1651 0x1651 ++#define PCI_DEVICE_ID_AL_M1543 0x1543 ++#define PCI_DEVICE_ID_AL_M3307 0x3307 ++#define PCI_DEVICE_ID_AL_M4803 0x5215 ++#define PCI_DEVICE_ID_AL_M5219 0x5219 ++#define PCI_DEVICE_ID_AL_M5229 0x5229 ++#define PCI_DEVICE_ID_AL_M5237 0x5237 ++#define PCI_DEVICE_ID_AL_M5243 0x5243 ++#define PCI_DEVICE_ID_AL_M5451 0x5451 ++#define PCI_DEVICE_ID_AL_M7101 0x7101 ++ ++#define PCI_VENDOR_ID_MITSUBISHI 0x10ba ++ ++#define PCI_VENDOR_ID_SURECOM 0x10bd ++#define PCI_DEVICE_ID_SURECOM_NE34 0x0e34 ++ ++#define PCI_VENDOR_ID_NEOMAGIC 0x10c8 ++#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2070 0x0001 ++#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128V 0x0002 ++#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZV 0x0003 ++#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_NM2160 0x0004 ++#define PCI_DEVICE_ID_NEOMAGIC_MAGICMEDIA_256AV 0x0005 ++#define PCI_DEVICE_ID_NEOMAGIC_MAGICGRAPH_128ZVPLUS 0x0083 ++ ++#define PCI_VENDOR_ID_ASP 0x10cd ++#define PCI_DEVICE_ID_ASP_ABP940 0x1200 ++#define PCI_DEVICE_ID_ASP_ABP940U 0x1300 ++#define PCI_DEVICE_ID_ASP_ABP940UW 0x2300 ++ ++#define PCI_VENDOR_ID_MACRONIX 0x10d9 ++#define PCI_DEVICE_ID_MACRONIX_MX98713 0x0512 ++#define PCI_DEVICE_ID_MX987x3 0x0512 ++#define PCI_DEVICE_ID_MACRONIX_MX987x5 0x0531 ++#define PCI_DEVICE_ID_MX987x5 0x0531 ++ ++#define PCI_VENDOR_ID_TCONRAD 0x10da ++#define PCI_DEVICE_ID_TCONRAD_TOKENRING 0x0508 ++ ++#define PCI_VENDOR_ID_CERN 0x10dc ++#define PCI_DEVICE_ID_CERN_SPSB_PMC 0x0001 ++#define PCI_DEVICE_ID_CERN_SPSB_PCI 0x0002 ++#define PCI_DEVICE_ID_CERN_HIPPI_DST 0x0021 ++#define PCI_DEVICE_ID_CERN_HIPPI_SRC 0x0022 ++ ++#define PCI_VENDOR_ID_NVIDIA 0x10de ++#define PCI_DEVICE_ID_NVIDIA_TNT 0x0020 ++#define PCI_DEVICE_ID_NVIDIA_TNT2 0x0028 ++#define PCI_DEVICE_ID_NVIDIA_UTNT2 0x0029 ++#define PCI_DEVICE_ID_NVIDIA_VTNT2 0x002C ++#define PCI_DEVICE_ID_NVIDIA_UVTNT2 0x002D ++#define PCI_DEVICE_ID_NVIDIA_ITNT2 0x00A0 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE_SDR 0x0100 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE_DDR 0x0101 ++#define PCI_DEVICE_ID_NVIDIA_QUADRO 0x0103 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX 0x0110 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_MX2 0x0111 ++#define PCI_DEVICE_ID_NVIDIA_QUADRO2_MXR 0x0113 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS 0x0150 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_GTS2 0x0151 ++#define PCI_DEVICE_ID_NVIDIA_GEFORCE2_ULTRA 0x0152 ++#define PCI_DEVICE_ID_NVIDIA_QUADRO2_PRO 0x0153 ++ ++#define PCI_VENDOR_ID_IMS 0x10e0 ++#define PCI_DEVICE_ID_IMS_8849 0x8849 ++#define PCI_DEVICE_ID_IMS_TT128 0x9128 ++#define PCI_DEVICE_ID_IMS_TT3D 0x9135 ++ ++#define PCI_VENDOR_ID_TEKRAM2 0x10e1 ++#define PCI_DEVICE_ID_TEKRAM2_690c 0x690c ++ ++#define PCI_VENDOR_ID_TUNDRA 0x10e3 ++#define PCI_DEVICE_ID_TUNDRA_CA91C042 0x0000 ++ ++#define PCI_VENDOR_ID_AMCC 0x10e8 ++#define PCI_DEVICE_ID_AMCC_MYRINET 0x8043 ++#define PCI_DEVICE_ID_AMCC_PARASTATION 0x8062 ++#define PCI_DEVICE_ID_AMCC_S5933 0x807d ++#define PCI_DEVICE_ID_AMCC_S5933_HEPC3 0x809c ++ ++#define PCI_VENDOR_ID_INTERG 0x10ea ++#define PCI_DEVICE_ID_INTERG_1680 0x1680 ++#define PCI_DEVICE_ID_INTERG_1682 0x1682 ++#define PCI_DEVICE_ID_INTERG_2000 0x2000 ++#define PCI_DEVICE_ID_INTERG_2010 0x2010 ++#define PCI_DEVICE_ID_INTERG_5000 0x5000 ++#define PCI_DEVICE_ID_INTERG_5050 0x5050 ++ ++#define PCI_VENDOR_ID_REALTEK 0x10ec ++#define PCI_DEVICE_ID_REALTEK_8029 0x8029 ++#define PCI_DEVICE_ID_REALTEK_8129 0x8129 ++#define PCI_DEVICE_ID_REALTEK_8139 0x8139 ++ ++#define PCI_VENDOR_ID_XILINX 0x10ee ++#define PCI_DEVICE_ID_TURBOPAM 0x4020 ++ ++#define PCI_VENDOR_ID_TRUEVISION 0x10fa ++#define PCI_DEVICE_ID_TRUEVISION_T1000 0x000c ++ ++#define PCI_VENDOR_ID_INIT 0x1101 ++#define PCI_DEVICE_ID_INIT_320P 0x9100 ++#define PCI_DEVICE_ID_INIT_360P 0x9500 ++ ++#define PCI_VENDOR_ID_CREATIVE 0x1102 // duplicate: ECTIVA ++#define PCI_DEVICE_ID_CREATIVE_EMU10K1 0x0002 ++ ++#define PCI_VENDOR_ID_ECTIVA 0x1102 // duplicate: CREATIVE ++#define PCI_DEVICE_ID_ECTIVA_EV1938 0x8938 ++ ++#define PCI_VENDOR_ID_TTI 0x1103 ++#define PCI_DEVICE_ID_TTI_HPT343 0x0003 ++#define PCI_DEVICE_ID_TTI_HPT366 0x0004 ++ ++#define PCI_VENDOR_ID_VIA 0x1106 ++#define PCI_VENDOR_ID_VIATEC 0x1106 ++#define PCI_DEVICE_ID_VIA_8363_0 0x0305 ++#define PCI_DEVICE_ID_VIA_8371_0 0x0391 ++#define PCI_DEVICE_ID_VIA_8501_0 0x0501 ++#define PCI_DEVICE_ID_VIA_82C505 0x0505 ++#define PCI_DEVICE_ID_VIA_82C561 0x0561 ++#define PCI_DEVICE_ID_VIA_82C586_1 0x0571 ++#define PCI_DEVICE_ID_VIA_82C576 0x0576 ++#define PCI_DEVICE_ID_VIA_82C585 0x0585 ++#define PCI_DEVICE_ID_VIA_82C586_0 0x0586 ++#define PCI_DEVICE_ID_VIA_82C595 0x0595 ++#define PCI_DEVICE_ID_VIA_82C596 0x0596 ++#define PCI_DEVICE_ID_VIA_82C597_0 0x0597 ++#define PCI_DEVICE_ID_VIA_82C598_0 0x0598 ++#define PCI_DEVICE_ID_VIA_8601_0 0x0601 ++#define PCI_DEVICE_ID_VIA_8605_0 0x0605 ++#define PCI_DEVICE_ID_VIA_82C680 0x0680 ++#define PCI_DEVICE_ID_VIA_82C686 0x0686 ++#define PCI_DEVICE_ID_VIA_82C691 0x0691 ++#define PCI_DEVICE_ID_VIA_82C693 0x0693 ++#define PCI_DEVICE_ID_VIA_82C693_1 0x0698 ++#define PCI_DEVICE_ID_VIA_82C926 0x0926 ++#define PCI_DEVICE_ID_VIA_82C576_1 0x1571 ++#define PCI_DEVICE_ID_VIA_82C595_97 0x1595 ++#define PCI_DEVICE_ID_VIA_82C586_2 0x3038 ++#define PCI_DEVICE_ID_VIA_82C586_3 0x3040 ++#define PCI_DEVICE_ID_VIA_RHINE_I 0x3043 ++#define PCI_DEVICE_ID_VIA_6305 0x3044 ++#define PCI_DEVICE_ID_VIA_82C596_3 0x3050 ++#define PCI_DEVICE_ID_VIA_82C596B_3 0x3051 ++#define PCI_DEVICE_ID_VIA_82C686_4 0x3057 ++#define PCI_DEVICE_ID_VIA_82C686_5 0x3058 ++#define PCI_DEVICE_ID_VIA_8233_5 0x3059 ++#define PCI_DEVICE_ID_VIA_8233_7 0x3065 ++#define PCI_DEVICE_ID_VIA_VT6102 0x3065 ++#define PCI_DEVICE_ID_VIA_82C686_6 0x3068 ++#define PCI_DEVICE_ID_VIA_8233_0 0x3074 ++#define PCI_DEVICE_ID_VIA_VT6105 0x3106 ++#define PCI_DEVICE_ID_VIA_8233C_0 0x3109 ++#define PCI_DEVICE_ID_VIA_8633_0 0x3091 ++#define PCI_DEVICE_ID_VIA_8367_0 0x3099 ++#define PCI_DEVICE_ID_VIA_86C100A 0x6100 ++#define PCI_DEVICE_ID_VIA_8231 0x8231 ++#define PCI_DEVICE_ID_VIA_8231_4 0x8235 ++#define PCI_DEVICE_ID_VIA_8365_1 0x8305 ++#define PCI_DEVICE_ID_VIA_8371_1 0x8391 ++#define PCI_DEVICE_ID_VIA_8501_1 0x8501 ++#define PCI_DEVICE_ID_VIA_82C597_1 0x8597 ++#define PCI_DEVICE_ID_VIA_82C598_1 0x8598 ++#define PCI_DEVICE_ID_VIA_8601_1 0x8601 ++#define PCI_DEVICE_ID_VIA_8505_1 0X8605 ++#define PCI_DEVICE_ID_VIA_8633_1 0xB091 ++#define PCI_DEVICE_ID_VIA_8367_1 0xB099 ++ ++#define PCI_VENDOR_ID_SIEMENS 0x110A ++#define PCI_DEVICE_ID_SIEMENS_DSCC4 0x2102 ++ ++#define PCI_VENDOR_ID_SMC2 0x1113 ++#define PCI_DEVICE_ID_SMC2_1211TX 0x1211 ++#define PCI_DEVICE_ID_SMC2_1211 0x1211 ++#define PCI_DEVICE_ID_SMC2_1216 0x1216 ++ ++#define PCI_VENDOR_ID_VORTEX 0x1119 ++#define PCI_DEVICE_ID_VORTEX_GDT60x0 0x0000 ++#define PCI_DEVICE_ID_VORTEX_GDT6000B 0x0001 ++#define PCI_DEVICE_ID_VORTEX_GDT6x10 0x0002 ++#define PCI_DEVICE_ID_VORTEX_GDT6x20 0x0003 ++#define PCI_DEVICE_ID_VORTEX_GDT6530 0x0004 ++#define PCI_DEVICE_ID_VORTEX_GDT6550 0x0005 ++#define PCI_DEVICE_ID_VORTEX_GDT6x17 0x0006 ++#define PCI_DEVICE_ID_VORTEX_GDT6x27 0x0007 ++#define PCI_DEVICE_ID_VORTEX_GDT6537 0x0008 ++#define PCI_DEVICE_ID_VORTEX_GDT6557 0x0009 ++#define PCI_DEVICE_ID_VORTEX_GDT6x15 0x000a ++#define PCI_DEVICE_ID_VORTEX_GDT6x25 0x000b ++#define PCI_DEVICE_ID_VORTEX_GDT6535 0x000c ++#define PCI_DEVICE_ID_VORTEX_GDT6555 0x000d ++#define PCI_DEVICE_ID_VORTEX_GDT6x17RP 0x0100 ++#define PCI_DEVICE_ID_VORTEX_GDT6x27RP 0x0101 ++#define PCI_DEVICE_ID_VORTEX_GDT6537RP 0x0102 ++#define PCI_DEVICE_ID_VORTEX_GDT6557RP 0x0103 ++#define PCI_DEVICE_ID_VORTEX_GDT6x11RP 0x0104 ++#define PCI_DEVICE_ID_VORTEX_GDT6x21RP 0x0105 ++#define PCI_DEVICE_ID_VORTEX_GDT6x17RP1 0x0110 ++#define PCI_DEVICE_ID_VORTEX_GDT6x27RP1 0x0111 ++#define PCI_DEVICE_ID_VORTEX_GDT6537RP1 0x0112 ++#define PCI_DEVICE_ID_VORTEX_GDT6557RP1 0x0113 ++#define PCI_DEVICE_ID_VORTEX_GDT6x11RP1 0x0114 ++#define PCI_DEVICE_ID_VORTEX_GDT6x21RP1 0x0115 ++#define PCI_DEVICE_ID_VORTEX_GDT6x17RP2 0x0120 ++#define PCI_DEVICE_ID_VORTEX_GDT6x27RP2 0x0121 ++#define PCI_DEVICE_ID_VORTEX_GDT6537RP2 0x0122 ++#define PCI_DEVICE_ID_VORTEX_GDT6557RP2 0x0123 ++#define PCI_DEVICE_ID_VORTEX_GDT6x11RP2 0x0124 ++#define PCI_DEVICE_ID_VORTEX_GDT6x21RP2 0x0125 ++ ++#define PCI_VENDOR_ID_EF 0x111a ++#define PCI_DEVICE_ID_EF_ATM_FPGA 0x0000 ++#define PCI_DEVICE_ID_EF_ATM_ASIC 0x0002 ++ ++#define PCI_VENDOR_ID_IDT 0x111d ++#define PCI_DEVICE_ID_IDT_IDT77201 0x0001 ++ ++#define PCI_VENDOR_ID_FORE 0x1127 ++#define PCI_DEVICE_ID_FORE_PCA200PC 0x0210 ++#define PCI_DEVICE_ID_FORE_PCA200E 0x0300 ++ ++#define PCI_VENDOR_ID_IMAGINGTECH 0x112f ++#define PCI_DEVICE_ID_IMAGINGTECH_ICPCI 0x0000 ++ ++#define PCI_VENDOR_ID_PHILIPS 0x1131 ++#define PCI_DEVICE_ID_PHILIPS_SAA7145 0x7145 ++#define PCI_DEVICE_ID_PHILIPS_SAA7146 0x7146 ++#define PCI_DEVICE_ID_PHILIPS_SAA9730 0x9730 ++ ++#define PCI_VENDOR_ID_EICON 0x1133 ++#define PCI_DEVICE_ID_EICON_DIVA20PRO 0xe001 ++#define PCI_DEVICE_ID_EICON_DIVA20 0xe002 ++#define PCI_DEVICE_ID_EICON_DIVA20PRO_U 0xe003 ++#define PCI_DEVICE_ID_EICON_DIVA20_U 0xe004 ++#define PCI_DEVICE_ID_EICON_DIVA201 0xe005 ++#define PCI_DEVICE_ID_EICON_MAESTRA 0xe010 ++#define PCI_DEVICE_ID_EICON_MAESTRAQ 0xe012 ++#define PCI_DEVICE_ID_EICON_MAESTRAQ_U 0xe013 ++#define PCI_DEVICE_ID_EICON_MAESTRAP 0xe014 ++ ++#define PCI_VENDOR_ID_CYCLONE 0x113c ++#define PCI_DEVICE_ID_CYCLONE_SDK 0x0001 ++ ++#define PCI_VENDOR_ID_ALLIANCE 0x1142 ++#define PCI_DEVICE_ID_ALLIANCE_PROMOTIO 0x3210 ++#define PCI_DEVICE_ID_ALLIANCE_PROVIDEO 0x6422 ++#define PCI_DEVICE_ID_ALLIANCE_AT24 0x6424 ++#define PCI_DEVICE_ID_ALLIANCE_AT3D 0x643d ++ ++#define PCI_VENDOR_ID_SYSKONNECT 0x1148 ++#define PCI_DEVICE_ID_SYSKONNECT_FP 0x4000 ++#define PCI_DEVICE_ID_SYSKONNECT_TR 0x4200 ++#define PCI_DEVICE_ID_SYSKONNECT_GE 0x4300 ++ ++#define PCI_VENDOR_ID_VMIC 0x114a ++#define PCI_DEVICE_ID_VMIC_VME 0x7587 ++ ++#define PCI_VENDOR_ID_DIGI 0x114f ++#define PCI_DEVICE_ID_DIGI_EPC 0x0002 ++#define PCI_DEVICE_ID_DIGI_RIGHTSWITCH 0x0003 ++#define PCI_DEVICE_ID_DIGI_XEM 0x0004 ++#define PCI_DEVICE_ID_DIGI_XR 0x0005 ++#define PCI_DEVICE_ID_DIGI_CX 0x0006 ++#define PCI_DEVICE_ID_DIGI_XRJ 0x0009 ++#define PCI_DEVICE_ID_DIGI_EPCJ 0x000a ++#define PCI_DEVICE_ID_DIGI_XR_920 0x0027 ++#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_E 0x0070 ++#define PCI_DEVICE_ID_DIGI_DF_M_E 0x0071 ++#define PCI_DEVICE_ID_DIGI_DF_M_IOM2_A 0x0072 ++#define PCI_DEVICE_ID_DIGI_DF_M_A 0x0073 ++ ++#define PCI_VENDOR_ID_MUTECH 0x1159 ++#define PCI_DEVICE_ID_MUTECH_MV1000 0x0001 ++ ++#define PCI_VENDOR_ID_XIRCOM 0x115d ++#define PCI_DEVICE_ID_XIRCOM_X3201_ETH 0x0003 ++#define PCI_DEVICE_ID_XIRCOM_X3201_MDM 0x0103 ++ ++#define PCI_VENDOR_ID_RENDITION 0x1163 ++#define PCI_DEVICE_ID_RENDITION_VERITE 0x0001 ++#define PCI_DEVICE_ID_RENDITION_VERITE2100 0x2000 ++ ++#define PCI_VENDOR_ID_SERVERWORKS 0x1166 ++#define PCI_DEVICE_ID_SERVERWORKS_HE 0x0008 ++#define PCI_DEVICE_ID_SERVERWORKS_LE 0x0009 ++#define PCI_DEVICE_ID_SERVERWORKS_CIOB30 0x0010 ++#define PCI_DEVICE_ID_SERVERWORKS_CMIC_HE 0x0011 ++#define PCI_DEVICE_ID_SERVERWORKS_OSB4 0x0200 ++#define PCI_DEVICE_ID_SERVERWORKS_CSB5 0x0201 ++#define PCI_DEVICE_ID_SERVERWORKS_OSB4IDE 0x0211 ++#define PCI_DEVICE_ID_SERVERWORKS_CSB5IDE 0x0212 ++#define PCI_DEVICE_ID_SERVERWORKS_OSB4USB 0x0220 ++#define PCI_DEVICE_ID_SERVERWORKS_CSB5USB PCI_DEVICE_ID_SERVERWORKS_OSB4USB ++#define PCI_DEVICE_ID_SERVERWORKS_CSB5ISA 0x0230 ++ ++#define PCI_VENDOR_ID_SBE 0x1176 ++#define PCI_DEVICE_ID_SBE_WANXL100 0x0301 ++#define PCI_DEVICE_ID_SBE_WANXL200 0x0302 ++#define PCI_DEVICE_ID_SBE_WANXL400 0x0104 ++ ++#define PCI_VENDOR_ID_TOSHIBA 0x1179 ++#define PCI_DEVICE_ID_TOSHIBA_601 0x0601 ++#define PCI_DEVICE_ID_TOSHIBA_TOPIC95 0x060a ++#define PCI_DEVICE_ID_TOSHIBA_TOPIC97 0x060f ++ ++#define PCI_VENDOR_ID_RICOH 0x1180 ++#define PCI_DEVICE_ID_RICOH_RL5C465 0x0465 ++#define PCI_DEVICE_ID_RICOH_RL5C466 0x0466 ++#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475 ++#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476 ++#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 ++ ++#define PCI_VENDOR_ID_DLINK 0x1186 ++#define PCI_DEVICE_ID_DFE530TXP 0x1300 ++#define PCI_DEVICE_ID_DFE530TXS 0x1002 ++ ++#define PCI_VENDOR_ID_ARTOP 0x1191 ++#define PCI_DEVICE_ID_ARTOP_ATP8400 0x0004 ++#define PCI_DEVICE_ID_ARTOP_ATP850UF 0x0005 ++#define PCI_DEVICE_ID_ARTOP_ATP860 0x0006 ++#define PCI_DEVICE_ID_ARTOP_ATP860R 0x0007 ++#define PCI_DEVICE_ID_ARTOP_AEC7610 0x8002 ++#define PCI_DEVICE_ID_ARTOP_AEC7612UW 0x8010 ++#define PCI_DEVICE_ID_ARTOP_AEC7612U 0x8020 ++#define PCI_DEVICE_ID_ARTOP_AEC7612S 0x8030 ++#define PCI_DEVICE_ID_ARTOP_AEC7612D 0x8040 ++#define PCI_DEVICE_ID_ARTOP_AEC7612SUW 0x8050 ++#define PCI_DEVICE_ID_ARTOP_8060 0x8060 ++ ++#define PCI_VENDOR_ID_ZEITNET 0x1193 ++#define PCI_DEVICE_ID_ZEITNET_1221 0x0001 ++#define PCI_DEVICE_ID_ZEITNET_1225 0x0002 ++ ++#define PCI_VENDOR_ID_OMEGA 0x119b ++#define PCI_DEVICE_ID_OMEGA_82C092G 0x1221 ++ ++#define PCI_VENDOR_ID_FUJITSU_ME 0x119e ++#define PCI_DEVICE_ID_FUJITSU_FS155 0x0001 ++#define PCI_DEVICE_ID_FUJITSU_FS50 0x0003 ++ ++#define PCI_SUBVENDOR_ID_KEYSPAN 0x11a9 ++#define PCI_SUBDEVICE_ID_KEYSPAN_SX2 0x5334 ++ ++#define PCI_VENDOR_ID_GALILEO 0x11ab ++#define PCI_DEVICE_ID_GALILEO_GT64011 0x4146 ++#define PCI_DEVICE_ID_GALILEO_GT64111 0x4146 ++#define PCI_DEVICE_ID_GALILEO_GT96100 0x9652 ++#define PCI_DEVICE_ID_GALILEO_GT96100A 0x9653 ++ ++#define PCI_VENDOR_ID_LINKSYS 0x11ad ++#define PCI_VENDOR_ID_LITEON 0x11ad ++#define PCI_DEVICE_ID_LITEON_LNE100TX 0x0002 ++#define PCI_DEVICE_ID_LC82C115 0xC115 ++ ++#define PCI_VENDOR_ID_V3 0x11b0 ++#define PCI_DEVICE_ID_V3_V960 0x0001 ++#define PCI_DEVICE_ID_V3_V350 0x0001 ++#define PCI_DEVICE_ID_V3_V961 0x0002 ++#define PCI_DEVICE_ID_V3_V351 0x0002 ++ ++#define PCI_VENDOR_ID_NP 0x11bc ++#define PCI_DEVICE_ID_NP_PCI_FDDI 0x0001 ++ ++#define PCI_VENDOR_ID_ATT 0x11c1 ++#define PCI_DEVICE_ID_ATT_L56XMF 0x0440 ++#define PCI_DEVICE_ID_ATT_VENUS_MODEM 0x480 ++ ++#define PCI_VENDOR_ID_SPECIALIX 0x11cb ++#define PCI_DEVICE_ID_SPECIALIX_IO8 0x2000 ++#define PCI_DEVICE_ID_SPECIALIX_XIO 0x4000 ++#define PCI_DEVICE_ID_SPECIALIX_RIO 0x8000 ++#define PCI_SUBDEVICE_ID_SPECIALIX_SPEED4 0xa004 ++ ++#define PCI_VENDOR_ID_AURAVISION 0x11d1 ++#define PCI_DEVICE_ID_AURAVISION_VXP524 0x01f7 ++ ++#define PCI_VENDOR_ID_ANALOG_DEVICES 0x11d4 ++#define PCI_DEVICE_ID_AD1889JS 0x1889 ++ ++#define PCI_VENDOR_ID_IKON 0x11d5 ++#define PCI_DEVICE_ID_IKON_10115 0x0115 ++#define PCI_DEVICE_ID_IKON_10117 0x0117 ++ ++#define PCI_VENDOR_ID_ZORAN 0x11de ++#define PCI_DEVICE_ID_ZORAN_36057 0x6057 ++#define PCI_DEVICE_ID_ZORAN_36120 0x6120 ++ ++#define PCI_VENDOR_ID_KINETIC 0x11f4 ++#define PCI_DEVICE_ID_KINETIC_2915 0x2915 ++ ++#define PCI_VENDOR_ID_COMPEX 0x11f6 ++#define PCI_DEVICE_ID_COMPEX_ENET100VG4 0x0112 ++#define PCI_DEVICE_ID_COMPEX_RL2000 0x1401 ++#define PCI_DEVICE_ID_COMPEX_RL100ATX 0x2011 ++ ++#define PCI_VENDOR_ID_RP 0x11fe ++#define PCI_DEVICE_ID_RP32INTF 0x0001 ++#define PCI_DEVICE_ID_RP8INTF 0x0002 ++#define PCI_DEVICE_ID_RP16INTF 0x0003 ++#define PCI_DEVICE_ID_RP4QUAD 0x0004 ++#define PCI_DEVICE_ID_RP8OCTA 0x0005 ++#define PCI_DEVICE_ID_RP8J 0x0006 ++#define PCI_DEVICE_ID_RPP4 0x000A ++#define PCI_DEVICE_ID_RPP8 0x000B ++#define PCI_DEVICE_ID_RP8M 0x000C ++ ++#define PCI_VENDOR_ID_CYCLADES 0x120e ++#define PCI_DEVICE_ID_CYCLOM_Y_Lo 0x0100 ++#define PCI_DEVICE_ID_CYCLOM_Y_Hi 0x0101 ++#define PCI_DEVICE_ID_CYCLOM_4Y_Lo 0x0102 ++#define PCI_DEVICE_ID_CYCLOM_4Y_Hi 0x0103 ++#define PCI_DEVICE_ID_CYCLOM_8Y_Lo 0x0104 ++#define PCI_DEVICE_ID_CYCLOM_8Y_Hi 0x0105 ++#define PCI_DEVICE_ID_CYCLOM_Z_Lo 0x0200 ++#define PCI_DEVICE_ID_CYCLOM_Z_Hi 0x0201 ++#define PCI_DEVICE_ID_PC300_RX_2 0x0300 ++#define PCI_DEVICE_ID_PC300_RX_1 0x0301 ++#define PCI_DEVICE_ID_PC300_TE_2 0x0310 ++#define PCI_DEVICE_ID_PC300_TE_1 0x0311 ++ ++#define PCI_VENDOR_ID_ESSENTIAL 0x120f ++#define PCI_DEVICE_ID_ESSENTIAL_ROADRUNNER 0x0001 ++ ++#define PCI_VENDOR_ID_O2 0x1217 ++#define PCI_DEVICE_ID_O2_6729 0x6729 ++#define PCI_DEVICE_ID_O2_6730 0x673a ++#define PCI_DEVICE_ID_O2_6832 0x6832 ++#define PCI_DEVICE_ID_O2_6836 0x6836 ++ ++#define PCI_VENDOR_ID_3DFX 0x121a ++#define PCI_DEVICE_ID_3DFX_VOODOO 0x0001 ++#define PCI_DEVICE_ID_3DFX_VOODOO2 0x0002 ++#define PCI_DEVICE_ID_3DFX_BANSHEE 0x0003 ++#define PCI_DEVICE_ID_3DFX_VOODOO3 0x0005 ++ ++#define PCI_VENDOR_ID_SIGMADES 0x1236 ++#define PCI_DEVICE_ID_SIGMADES_6425 0x6401 ++ ++#define PCI_VENDOR_ID_CCUBE 0x123f ++ ++#define PCI_VENDOR_ID_AVM 0x1244 ++#define PCI_DEVICE_ID_AVM_B1 0x0700 ++#define PCI_DEVICE_ID_AVM_C4 0x0800 ++#define PCI_DEVICE_ID_AVM_A1 0x0a00 ++#define PCI_DEVICE_ID_AVM_A1_V2 0x0e00 ++#define PCI_DEVICE_ID_AVM_C2 0x1100 ++#define PCI_DEVICE_ID_AVM_T1 0x1200 ++ ++#define PCI_VENDOR_ID_DIPIX 0x1246 ++ ++#define PCI_VENDOR_ID_STALLION 0x124d ++#define PCI_DEVICE_ID_STALLION_ECHPCI832 0x0000 ++#define PCI_DEVICE_ID_STALLION_ECHPCI864 0x0002 ++#define PCI_DEVICE_ID_STALLION_EIOPCI 0x0003 ++ ++#define PCI_VENDOR_ID_OPTIBASE 0x1255 ++#define PCI_DEVICE_ID_OPTIBASE_FORGE 0x1110 ++#define PCI_DEVICE_ID_OPTIBASE_FUSION 0x1210 ++#define PCI_DEVICE_ID_OPTIBASE_VPLEX 0x2110 ++#define PCI_DEVICE_ID_OPTIBASE_VPLEXCC 0x2120 ++#define PCI_DEVICE_ID_OPTIBASE_VQUEST 0x2130 ++ ++#define PCI_VENDOR_ID_ESS 0x125d ++#define PCI_DEVICE_ID_ESS_ESS1968 0x1968 ++#define PCI_DEVICE_ID_ESS_AUDIOPCI 0x1969 ++#define PCI_DEVICE_ID_ESS_ESS1978 0x1978 ++ ++#define PCI_VENDOR_ID_HARRIS 0x1260 ++#define PCI_DEVICE_ID_HARRIS_PRISM2 0x3873 ++ ++#define PCI_VENDOR_ID_SATSAGEM 0x1267 ++#define PCI_DEVICE_ID_SATSAGEM_NICCY 0x1016 ++#define PCI_DEVICE_ID_SATSAGEM_PCR2101 0x5352 ++#define PCI_DEVICE_ID_SATSAGEM_TELSATTURBO 0x5a4b ++ ++#define PCI_VENDOR_ID_HUGHES 0x1273 ++#define PCI_DEVICE_ID_HUGHES_DIRECPC 0x0002 ++ ++#define PCI_VENDOR_ID_ENSONIQ 0x1274 ++#define PCI_DEVICE_ID_ENSONIQ_CT5880 0x5880 ++#define PCI_DEVICE_ID_ENSONIQ_ES1370 0x5000 ++#define PCI_DEVICE_ID_ENSONIQ_ES1371 0x1371 ++ ++#define PCI_VENDOR_ID_ROCKWELL 0x127A ++ ++#define PCI_VENDOR_ID_DAVICOM 0x1282 ++#define PCI_DEVICE_ID_DM9009 0x9009 ++#define PCI_DEVICE_ID_DM9102 0x9102 ++ ++#define PCI_VENDOR_ID_ITE 0x1283 ++#define PCI_DEVICE_ID_ITE_IT8172G_AUDIO 0x0801 ++#define PCI_DEVICE_ID_ITE_IT8172G 0x8172 ++#define PCI_DEVICE_ID_ITE_8872 0x8872 ++ ++ ++/* formerly Platform Tech */ ++#define PCI_VENDOR_ID_ESS_OLD 0x1285 ++#define PCI_DEVICE_ID_ESS_ESS0100 0x0100 ++ ++#define PCI_VENDOR_ID_ALTEON 0x12ae ++#define PCI_DEVICE_ID_ALTEON_ACENIC 0x0001 ++ ++#define PCI_VENDOR_ID_USR 0x12B9 ++ ++#define PCI_VENDOR_ID_HOLTEK 0x12c3 ++#define PCI_DEVICE_ID_HOLTEK_HT80232 0x0058 ++ ++#define PCI_SUBVENDOR_ID_CONNECT_TECH 0x12c4 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232 0x0001 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_232 0x0002 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_232 0x0003 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485 0x0004 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_4_4 0x0005 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485 0x0006 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH4_485_2_2 0x0007 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH2_485 0x0008 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_485_2_6 0x0009 ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH081101V1 0x000A ++#define PCI_SUBDEVICE_ID_CONNECT_TECH_BH041101V1 0x000B ++ ++#define PCI_VENDOR_ID_PICTUREL 0x12c5 ++#define PCI_DEVICE_ID_PICTUREL_PCIVST 0x0081 ++ ++#define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2 ++#define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018 ++ ++#define PCI_SUBVENDOR_ID_CHASE_PCIFAST 0x12E0 ++#define PCI_SUBDEVICE_ID_CHASE_PCIFAST4 0x0031 ++#define PCI_SUBDEVICE_ID_CHASE_PCIFAST8 0x0021 ++#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16 0x0011 ++#define PCI_SUBDEVICE_ID_CHASE_PCIFAST16FMC 0x0041 ++#define PCI_SUBVENDOR_ID_CHASE_PCIRAS 0x124D ++#define PCI_SUBDEVICE_ID_CHASE_PCIRAS4 0xF001 ++#define PCI_SUBDEVICE_ID_CHASE_PCIRAS8 0xF010 ++ ++#define PCI_VENDOR_ID_AUREAL 0x12eb ++#define PCI_DEVICE_ID_AUREAL_VORTEX_1 0x0001 ++#define PCI_DEVICE_ID_AUREAL_VORTEX_2 0x0002 ++ ++#define PCI_VENDOR_ID_CBOARDS 0x1307 ++#define PCI_DEVICE_ID_CBOARDS_DAS1602_16 0x0001 ++ ++#define PCI_VENDOR_ID_SIIG 0x131f ++#define PCI_DEVICE_ID_SIIG_1S_10x_550 0x1000 ++#define PCI_DEVICE_ID_SIIG_1S_10x_650 0x1001 ++#define PCI_DEVICE_ID_SIIG_1S_10x_850 0x1002 ++#define PCI_DEVICE_ID_SIIG_1S1P_10x_550 0x1010 ++#define PCI_DEVICE_ID_SIIG_1S1P_10x_650 0x1011 ++#define PCI_DEVICE_ID_SIIG_1S1P_10x_850 0x1012 ++#define PCI_DEVICE_ID_SIIG_1P_10x 0x1020 ++#define PCI_DEVICE_ID_SIIG_2P_10x 0x1021 ++#define PCI_DEVICE_ID_SIIG_2S_10x_550 0x1030 ++#define PCI_DEVICE_ID_SIIG_2S_10x_650 0x1031 ++#define PCI_DEVICE_ID_SIIG_2S_10x_850 0x1032 ++#define PCI_DEVICE_ID_SIIG_2S1P_10x_550 0x1034 ++#define PCI_DEVICE_ID_SIIG_2S1P_10x_650 0x1035 ++#define PCI_DEVICE_ID_SIIG_2S1P_10x_850 0x1036 ++#define PCI_DEVICE_ID_SIIG_4S_10x_550 0x1050 ++#define PCI_DEVICE_ID_SIIG_4S_10x_650 0x1051 ++#define PCI_DEVICE_ID_SIIG_4S_10x_850 0x1052 ++#define PCI_DEVICE_ID_SIIG_1S_20x_550 0x2000 ++#define PCI_DEVICE_ID_SIIG_1S_20x_650 0x2001 ++#define PCI_DEVICE_ID_SIIG_1S_20x_850 0x2002 ++#define PCI_DEVICE_ID_SIIG_1P_20x 0x2020 ++#define PCI_DEVICE_ID_SIIG_2P_20x 0x2021 ++#define PCI_DEVICE_ID_SIIG_2S_20x_550 0x2030 ++#define PCI_DEVICE_ID_SIIG_2S_20x_650 0x2031 ++#define PCI_DEVICE_ID_SIIG_2S_20x_850 0x2032 ++#define PCI_DEVICE_ID_SIIG_2P1S_20x_550 0x2040 ++#define PCI_DEVICE_ID_SIIG_2P1S_20x_650 0x2041 ++#define PCI_DEVICE_ID_SIIG_2P1S_20x_850 0x2042 ++#define PCI_DEVICE_ID_SIIG_1S1P_20x_550 0x2010 ++#define PCI_DEVICE_ID_SIIG_1S1P_20x_650 0x2011 ++#define PCI_DEVICE_ID_SIIG_1S1P_20x_850 0x2012 ++#define PCI_DEVICE_ID_SIIG_4S_20x_550 0x2050 ++#define PCI_DEVICE_ID_SIIG_4S_20x_650 0x2051 ++#define PCI_DEVICE_ID_SIIG_4S_20x_850 0x2052 ++#define PCI_DEVICE_ID_SIIG_2S1P_20x_550 0x2060 ++#define PCI_DEVICE_ID_SIIG_2S1P_20x_650 0x2061 ++#define PCI_DEVICE_ID_SIIG_2S1P_20x_850 0x2062 ++ ++#define PCI_VENDOR_ID_ADMTEK 0x1317 ++#define PCI_DEVICE_ID_ADMTEK_0985 0x0985 ++ ++#define PCI_VENDOR_ID_DOMEX 0x134a ++#define PCI_DEVICE_ID_DOMEX_DMX3191D 0x0001 ++ ++#define PCI_VENDOR_ID_QUATECH 0x135C ++#define PCI_DEVICE_ID_QUATECH_QSC100 0x0010 ++#define PCI_DEVICE_ID_QUATECH_DSC100 0x0020 ++#define PCI_DEVICE_ID_QUATECH_DSC200 0x0030 ++#define PCI_DEVICE_ID_QUATECH_QSC200 0x0040 ++#define PCI_DEVICE_ID_QUATECH_ESC100D 0x0050 ++#define PCI_DEVICE_ID_QUATECH_ESC100M 0x0060 ++ ++#define PCI_VENDOR_ID_SEALEVEL 0x135e ++#define PCI_DEVICE_ID_SEALEVEL_U530 0x7101 ++#define PCI_DEVICE_ID_SEALEVEL_UCOMM2 0x7201 ++#define PCI_DEVICE_ID_SEALEVEL_UCOMM422 0x7402 ++#define PCI_DEVICE_ID_SEALEVEL_UCOMM232 0x7202 ++#define PCI_DEVICE_ID_SEALEVEL_COMM4 0x7401 ++#define PCI_DEVICE_ID_SEALEVEL_COMM8 0x7801 ++ ++#define PCI_VENDOR_ID_HYPERCOPE 0x1365 ++#define PCI_DEVICE_ID_HYPERCOPE_PLX 0x9050 ++#define PCI_SUBDEVICE_ID_HYPERCOPE_OLD_ERGO 0x0104 ++#define PCI_SUBDEVICE_ID_HYPERCOPE_ERGO 0x0106 ++#define PCI_SUBDEVICE_ID_HYPERCOPE_METRO 0x0107 ++#define PCI_SUBDEVICE_ID_HYPERCOPE_CHAMP2 0x0108 ++#define PCI_SUBDEVICE_ID_HYPERCOPE_PLEXUS 0x0109 ++ ++#define PCI_VENDOR_ID_KAWASAKI 0x136b ++#define PCI_DEVICE_ID_MCHIP_KL5A72002 0xff01 ++ ++#define PCI_VENDOR_ID_LMC 0x1376 ++#define PCI_DEVICE_ID_LMC_HSSI 0x0003 ++#define PCI_DEVICE_ID_LMC_DS3 0x0004 ++#define PCI_DEVICE_ID_LMC_SSI 0x0005 ++#define PCI_DEVICE_ID_LMC_T1 0x0006 ++ ++#define PCI_VENDOR_ID_NETGEAR 0x1385 ++#define PCI_DEVICE_ID_NETGEAR_MA301 0x4100 ++#define PCI_DEVICE_ID_NETGEAR_GA620 0x620a ++#define PCI_DEVICE_ID_NETGEAR_GA622 0x622a ++ ++#define PCI_VENDOR_ID_APPLICOM 0x1389 ++#define PCI_DEVICE_ID_APPLICOM_PCIGENERIC 0x0001 ++#define PCI_DEVICE_ID_APPLICOM_PCI2000IBS_CAN 0x0002 ++#define PCI_DEVICE_ID_APPLICOM_PCI2000PFB 0x0003 ++ ++#define PCI_VENDOR_ID_MOXA 0x1393 ++#define PCI_DEVICE_ID_MOXA_C104 0x1040 ++#define PCI_DEVICE_ID_MOXA_C168 0x1680 ++#define PCI_DEVICE_ID_MOXA_CP204J 0x2040 ++#define PCI_DEVICE_ID_MOXA_C218 0x2180 ++#define PCI_DEVICE_ID_MOXA_C320 0x3200 ++ ++#define PCI_VENDOR_ID_CCD 0x1397 ++#define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 ++#define PCI_DEVICE_ID_CCD_B000 0xb000 ++#define PCI_DEVICE_ID_CCD_B006 0xb006 ++#define PCI_DEVICE_ID_CCD_B007 0xb007 ++#define PCI_DEVICE_ID_CCD_B008 0xb008 ++#define PCI_DEVICE_ID_CCD_B009 0xb009 ++#define PCI_DEVICE_ID_CCD_B00A 0xb00a ++#define PCI_DEVICE_ID_CCD_B00B 0xb00b ++#define PCI_DEVICE_ID_CCD_B00C 0xb00c ++#define PCI_DEVICE_ID_CCD_B100 0xb100 ++ ++#define PCI_VENDOR_ID_MICROGATE 0x13c0 ++#define PCI_DEVICE_ID_MICROGATE_USC 0x0010 ++#define PCI_DEVICE_ID_MICROGATE_SCC 0x0020 ++#define PCI_DEVICE_ID_MICROGATE_SCA 0x0030 ++ ++#define PCI_VENDOR_ID_3WARE 0x13C1 ++#define PCI_DEVICE_ID_3WARE_1000 0x1000 ++ ++#define PCI_VENDOR_ID_ABOCOM 0x13D1 ++#define PCI_DEVICE_ID_ABOCOM_2BD1 0x2BD1 ++ ++#define PCI_VENDOR_ID_CMEDIA 0x13f6 ++#define PCI_DEVICE_ID_CMEDIA_CM8338A 0x0100 ++#define PCI_DEVICE_ID_CMEDIA_CM8338B 0x0101 ++#define PCI_DEVICE_ID_CMEDIA_CM8738 0x0111 ++#define PCI_DEVICE_ID_CMEDIA_CM8738B 0x0112 ++ ++#define PCI_VENDOR_ID_LAVA 0x1407 ++#define PCI_DEVICE_ID_LAVA_DSERIAL 0x0100 /* 2x 16550 */ ++#define PCI_DEVICE_ID_LAVA_QUATRO_A 0x0101 /* 2x 16550, half of 4 port */ ++#define PCI_DEVICE_ID_LAVA_QUATRO_B 0x0102 /* 2x 16550, half of 4 port */ ++#define PCI_DEVICE_ID_LAVA_PORT_PLUS 0x0200 /* 2x 16650 */ ++#define PCI_DEVICE_ID_LAVA_QUAD_A 0x0201 /* 2x 16650, half of 4 port */ ++#define PCI_DEVICE_ID_LAVA_QUAD_B 0x0202 /* 2x 16650, half of 4 port */ ++#define PCI_DEVICE_ID_LAVA_SSERIAL 0x0500 /* 1x 16550 */ ++#define PCI_DEVICE_ID_LAVA_PORT_650 0x0600 /* 1x 16650 */ ++#define PCI_DEVICE_ID_LAVA_PARALLEL 0x8000 ++#define PCI_DEVICE_ID_LAVA_DUAL_PAR_A 0x8002 /* The Lava Dual Parallel is */ ++#define PCI_DEVICE_ID_LAVA_DUAL_PAR_B 0x8003 /* two PCI devices on a card */ ++#define PCI_DEVICE_ID_LAVA_BOCA_IOPPAR 0x8800 ++ ++#define PCI_VENDOR_ID_TIMEDIA 0x1409 ++#define PCI_DEVICE_ID_TIMEDIA_1889 0x7168 ++ ++#define PCI_VENDOR_ID_OXSEMI 0x1415 ++#define PCI_DEVICE_ID_OXSEMI_12PCI840 0x8403 ++#define PCI_DEVICE_ID_OXSEMI_16PCI954 0x9501 ++#define PCI_DEVICE_ID_OXSEMI_16PCI952 0x950A ++#define PCI_DEVICE_ID_OXSEMI_16PCI95N 0x9511 ++#define PCI_DEVICE_ID_OXSEMI_16PCI954PP 0x9513 ++ ++#define PCI_VENDOR_ID_AIRONET 0x14b9 ++#define PCI_DEVICE_ID_AIRONET_4800_1 0x0001 ++#define PCI_DEVICE_ID_AIRONET_4800 0x4500 // values switched? see ++#define PCI_DEVICE_ID_AIRONET_4500 0x4800 // drivers/net/aironet4500_card.c ++ ++#define PCI_VENDOR_ID_TITAN 0x14D2 ++#define PCI_DEVICE_ID_TITAN_010L 0x8001 ++#define PCI_DEVICE_ID_TITAN_100L 0x8010 ++#define PCI_DEVICE_ID_TITAN_110L 0x8011 ++#define PCI_DEVICE_ID_TITAN_200L 0x8020 ++#define PCI_DEVICE_ID_TITAN_210L 0x8021 ++#define PCI_DEVICE_ID_TITAN_400L 0x8040 ++#define PCI_DEVICE_ID_TITAN_800L 0x8080 ++#define PCI_DEVICE_ID_TITAN_100 0xA001 ++#define PCI_DEVICE_ID_TITAN_200 0xA005 ++#define PCI_DEVICE_ID_TITAN_400 0xA003 ++#define PCI_DEVICE_ID_TITAN_800B 0xA004 ++ ++#define PCI_VENDOR_ID_PANACOM 0x14d4 ++#define PCI_DEVICE_ID_PANACOM_QUADMODEM 0x0400 ++#define PCI_DEVICE_ID_PANACOM_DUALMODEM 0x0402 ++ ++#define PCI_VENDOR_ID_BROADCOM 0x14e4 ++#define PCI_DEVICE_ID_TIGON3_5700 0x1644 ++#define PCI_DEVICE_ID_TIGON3_5701 0x1645 ++#define PCI_DEVICE_ID_TIGON3_5702 0x1646 ++#define PCI_DEVICE_ID_TIGON3_5703 0x1647 ++#define PCI_DEVICE_ID_TIGON3_5704 0x1648 ++#define PCI_DEVICE_ID_TIGON3_5702FE 0x164d ++#define PCI_DEVICE_ID_TIGON3_5705 0x1653 ++#define PCI_DEVICE_ID_TIGON3_5705_2 0x1654 ++#define PCI_DEVICE_ID_TIGON3_5705M 0x165d ++#define PCI_DEVICE_ID_TIGON3_5705M_2 0x165e ++#define PCI_DEVICE_ID_TIGON3_5782 0x1696 ++#define PCI_DEVICE_ID_TIGON3_5788 0x169c ++#define PCI_DEVICE_ID_TIGON3_5702X 0x16a6 ++#define PCI_DEVICE_ID_TIGON3_5703X 0x16a7 ++#define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 ++#define PCI_DEVICE_ID_TIGON3_5702A3 0x16c6 ++#define PCI_DEVICE_ID_TIGON3_5703A3 0x16c7 ++#define PCI_DEVICE_ID_TIGON3_5901 0x170d ++#define PCI_DEVICE_ID_TIGON3_5901_2 0x170e ++ ++#define PCI_VENDOR_ID_SYBA 0x1592 ++#define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 ++#define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 ++ ++#define PCI_VENDOR_ID_MORETON 0x15aa ++#define PCI_DEVICE_ID_RASTEL_2PORT 0x2000 ++ ++#define PCI_VENDOR_ID_ZOLTRIX 0x15b0 ++#define PCI_DEVICE_ID_ZOLTRIX_2BD0 0x2bd0 ++ ++#define PCI_VENDOR_ID_PDC 0x15e9 ++#define PCI_DEVICE_ID_PDC_1841 0x1841 ++ ++#define PCI_VENDOR_ID_SYMPHONY 0x1c1c ++#define PCI_DEVICE_ID_SYMPHONY_101 0x0001 ++ ++#define PCI_VENDOR_ID_TEKRAM 0x1de1 ++#define PCI_DEVICE_ID_TEKRAM_DC290 0xdc29 ++ ++#define PCI_VENDOR_ID_3DLABS 0x3d3d ++#define PCI_DEVICE_ID_3DLABS_300SX 0x0001 ++#define PCI_DEVICE_ID_3DLABS_500TX 0x0002 ++#define PCI_DEVICE_ID_3DLABS_DELTA 0x0003 ++#define PCI_DEVICE_ID_3DLABS_PERMEDIA 0x0004 ++#define PCI_DEVICE_ID_3DLABS_MX 0x0006 ++#define PCI_DEVICE_ID_3DLABS_PERMEDIA2 0x0007 ++#define PCI_DEVICE_ID_3DLABS_GAMMA 0x0008 ++#define PCI_DEVICE_ID_3DLABS_PERMEDIA2V 0x0009 ++ ++#define PCI_VENDOR_ID_AVANCE 0x4005 ++#define PCI_DEVICE_ID_AVANCE_ALG2064 0x2064 ++#define PCI_DEVICE_ID_AVANCE_2302 0x2302 ++ ++#define PCI_VENDOR_ID_AKS 0x416c ++#define PCI_DEVICE_ID_AKS_ALADDINCARD 0x0100 ++#define PCI_DEVICE_ID_AKS_CPC 0x0200 ++ ++#define PCI_VENDOR_ID_NETVIN 0x4a14 ++#define PCI_DEVICE_ID_NETVIN_NV5000SC 0x5000 ++ ++#define PCI_VENDOR_ID_S3 0x5333 ++#define PCI_DEVICE_ID_S3_PLATO_PXS 0x0551 ++#define PCI_DEVICE_ID_S3_ViRGE 0x5631 ++#define PCI_DEVICE_ID_S3_TRIO 0x8811 ++#define PCI_DEVICE_ID_S3_AURORA64VP 0x8812 ++#define PCI_DEVICE_ID_S3_TRIO64UVP 0x8814 ++#define PCI_DEVICE_ID_S3_ViRGE_VX 0x883d ++#define PCI_DEVICE_ID_S3_868 0x8880 ++#define PCI_DEVICE_ID_S3_928 0x88b0 ++#define PCI_DEVICE_ID_S3_864_1 0x88c0 ++#define PCI_DEVICE_ID_S3_864_2 0x88c1 ++#define PCI_DEVICE_ID_S3_964_1 0x88d0 ++#define PCI_DEVICE_ID_S3_964_2 0x88d1 ++#define PCI_DEVICE_ID_S3_968 0x88f0 ++#define PCI_DEVICE_ID_S3_TRIO64V2 0x8901 ++#define PCI_DEVICE_ID_S3_PLATO_PXG 0x8902 ++#define PCI_DEVICE_ID_S3_ViRGE_DXGX 0x8a01 ++#define PCI_DEVICE_ID_S3_ViRGE_GX2 0x8a10 ++#define PCI_DEVICE_ID_S3_ViRGE_MX 0x8c01 ++#define PCI_DEVICE_ID_S3_ViRGE_MXP 0x8c02 ++#define PCI_DEVICE_ID_S3_ViRGE_MXPMV 0x8c03 ++#define PCI_DEVICE_ID_S3_SONICVIBES 0xca00 ++ ++#define PCI_VENDOR_ID_DCI 0x6666 ++#define PCI_DEVICE_ID_DCI_PCCOM4 0x0001 ++#define PCI_DEVICE_ID_DCI_PCCOM8 0x0002 ++ ++#define PCI_VENDOR_ID_GENROCO 0x5555 ++#define PCI_DEVICE_ID_GENROCO_HFP832 0x0003 ++ ++#define PCI_VENDOR_ID_INTEL 0x8086 ++#define PCI_DEVICE_ID_INTEL_21145 0x0039 ++#define PCI_DEVICE_ID_INTEL_82375 0x0482 ++#define PCI_DEVICE_ID_INTEL_82424 0x0483 ++#define PCI_DEVICE_ID_INTEL_82378 0x0484 ++#define PCI_DEVICE_ID_INTEL_82430 0x0486 ++#define PCI_DEVICE_ID_INTEL_82434 0x04a3 ++#define PCI_DEVICE_ID_INTEL_I960 0x0960 ++#define PCI_DEVICE_ID_INTEL_82542 0x1000 ++#define PCI_DEVICE_ID_INTEL_82543GC_FIBER 0x1001 ++#define PCI_DEVICE_ID_INTEL_82543GC_COPPER 0x1004 ++#define PCI_DEVICE_ID_INTEL_82544EI_COPPER 0x1008 ++#define PCI_DEVICE_ID_INTEL_82544EI_FIBER 0x1009 ++#define PCI_DEVICE_ID_INTEL_82544GC_COPPER 0x100C ++#define PCI_DEVICE_ID_INTEL_82544GC_LOM 0x100D ++#define PCI_DEVICE_ID_INTEL_82540EM 0x100E ++#define PCI_DEVICE_ID_INTEL_82545EM_COPPER 0x100F ++#define PCI_DEVICE_ID_INTEL_82546EB_COPPER 0x1010 ++#define PCI_DEVICE_ID_INTEL_82545EM_FIBER 0x1011 ++#define PCI_DEVICE_ID_INTEL_82546EB_FIBER 0x1012 ++#define PCI_DEVICE_ID_INTEL_82540EM_LOM 0x1015 ++#define PCI_DEVICE_ID_INTEL_ID1029 0x1029 ++#define PCI_DEVICE_ID_INTEL_ID1030 0x1030 ++#define PCI_DEVICE_ID_INTEL_ID1031 0x1031 ++#define PCI_DEVICE_ID_INTEL_ID1038 0x1038 ++#define PCI_DEVICE_ID_INTEL_ID1039 0x1039 ++#define PCI_DEVICE_ID_INTEL_ID103A 0x103A ++#define PCI_DEVICE_ID_INTEL_82562ET 0x1031 ++#define PCI_DEVICE_ID_INTEL_82559ER 0x1209 ++#define PCI_DEVICE_ID_INTEL_82092AA_0 0x1221 ++#define PCI_DEVICE_ID_INTEL_82092AA_1 0x1222 ++#define PCI_DEVICE_ID_INTEL_7116 0x1223 ++#define PCI_DEVICE_ID_INTEL_82596 0x1226 ++#define PCI_DEVICE_ID_INTEL_82865 0x1227 ++#define PCI_DEVICE_ID_INTEL_82557 0x1229 ++#define PCI_DEVICE_ID_INTEL_82437 0x122d ++#define PCI_DEVICE_ID_INTEL_82371FB_0 0x122e ++#define PCI_DEVICE_ID_INTEL_82371FB_1 0x1230 ++#define PCI_DEVICE_ID_INTEL_82371MX 0x1234 ++#define PCI_DEVICE_ID_INTEL_82437MX 0x1235 ++#define PCI_DEVICE_ID_INTEL_82441 0x1237 ++#define PCI_DEVICE_ID_INTEL_82380FB 0x124b ++#define PCI_DEVICE_ID_INTEL_82439 0x1250 ++#define PCI_DEVICE_ID_INTEL_80960_RP 0x1960 ++#define PCI_DEVICE_ID_INTEL_82801AA_0 0x2410 ++#define PCI_DEVICE_ID_INTEL_82801AA_1 0x2411 ++#define PCI_DEVICE_ID_INTEL_82801AA_2 0x2412 ++#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413 ++#define PCI_DEVICE_ID_INTEL_82801AA_5 0x2415 ++#define PCI_DEVICE_ID_INTEL_82801AA_6 0x2416 ++#define PCI_DEVICE_ID_INTEL_82801AA_8 0x2418 ++#define PCI_DEVICE_ID_INTEL_82801AB_0 0x2420 ++#define PCI_DEVICE_ID_INTEL_82801AB_1 0x2421 ++#define PCI_DEVICE_ID_INTEL_82801AB_2 0x2422 ++#define PCI_DEVICE_ID_INTEL_82801AB_3 0x2423 ++#define PCI_DEVICE_ID_INTEL_82801AB_5 0x2425 ++#define PCI_DEVICE_ID_INTEL_82801AB_6 0x2426 ++#define PCI_DEVICE_ID_INTEL_82801AB_8 0x2428 ++#define PCI_DEVICE_ID_INTEL_82801BA_0 0x2440 ++#define PCI_DEVICE_ID_INTEL_82801BA_1 0x2442 ++#define PCI_DEVICE_ID_INTEL_82801BA_2 0x2443 ++#define PCI_DEVICE_ID_INTEL_82801BA_3 0x2444 ++#define PCI_DEVICE_ID_INTEL_82801BA_4 0x2445 ++#define PCI_DEVICE_ID_INTEL_82801BA_5 0x2446 ++#define PCI_DEVICE_ID_INTEL_82801BA_6 0x2448 ++#define PCI_DEVICE_ID_INTEL_82801BA_7 0x2449 ++#define PCI_DEVICE_ID_INTEL_82562 0x2449 ++#define PCI_DEVICE_ID_INTEL_82801BA_8 0x244a ++#define PCI_DEVICE_ID_INTEL_82801BA_9 0x244b ++#define PCI_DEVICE_ID_INTEL_82801BA_10 0x244c ++#define PCI_DEVICE_ID_INTEL_82801BA_11 0x244e ++#define PCI_DEVICE_ID_INTEL_82801CA_0 0x2480 ++#define PCI_DEVICE_ID_INTEL_82801CA_2 0x2482 ++#define PCI_DEVICE_ID_INTEL_82801CA_3 0x2483 ++#define PCI_DEVICE_ID_INTEL_82801CA_4 0x2484 ++#define PCI_DEVICE_ID_INTEL_82801CA_5 0x2485 ++#define PCI_DEVICE_ID_INTEL_82801CA_6 0x2486 ++#define PCI_DEVICE_ID_INTEL_82801CA_7 0x2487 ++#define PCI_DEVICE_ID_INTEL_82801CA_10 0x248a ++#define PCI_DEVICE_ID_INTEL_82801CA_11 0x248b ++#define PCI_DEVICE_ID_INTEL_82801CA_12 0x248c ++#define PCI_DEVICE_ID_INTEL_80310 0x530d ++#define PCI_DEVICE_ID_INTEL_82371SB_0 0x7000 ++#define PCI_DEVICE_ID_INTEL_82371SB_1 0x7010 ++#define PCI_DEVICE_ID_INTEL_82371SB_2 0x7020 ++#define PCI_DEVICE_ID_INTEL_82437VX 0x7030 ++#define PCI_DEVICE_ID_INTEL_82439TX 0x7100 ++#define PCI_DEVICE_ID_INTEL_82371AB_0 0x7110 ++#define PCI_DEVICE_ID_INTEL_82371AB 0x7111 ++#define PCI_DEVICE_ID_INTEL_82371AB_2 0x7112 ++#define PCI_DEVICE_ID_INTEL_82371AB_3 0x7113 ++#define PCI_DEVICE_ID_INTEL_82810_MC1 0x7120 ++#define PCI_DEVICE_ID_INTEL_82810_IG1 0x7121 ++#define PCI_DEVICE_ID_INTEL_82810_MC3 0x7122 ++#define PCI_DEVICE_ID_INTEL_82810_IG3 0x7123 ++#define PCI_DEVICE_ID_INTEL_82443LX_0 0x7180 ++#define PCI_DEVICE_ID_INTEL_82443LX_1 0x7181 ++#define PCI_DEVICE_ID_INTEL_82443BX_0 0x7190 ++#define PCI_DEVICE_ID_INTEL_82443BX_1 0x7191 ++#define PCI_DEVICE_ID_INTEL_82443BX_2 0x7192 ++#define PCI_DEVICE_ID_INTEL_82443MX_0 0x7198 ++#define PCI_DEVICE_ID_INTEL_82443MX_1 0x7199 ++#define PCI_DEVICE_ID_INTEL_82443MX_2 0x719a ++#define PCI_DEVICE_ID_INTEL_82443MX_3 0x719b ++#define PCI_DEVICE_ID_INTEL_82372FB_0 0x7600 ++#define PCI_DEVICE_ID_INTEL_82372FB_1 0x7601 ++#define PCI_DEVICE_ID_INTEL_82372FB_2 0x7602 ++#define PCI_DEVICE_ID_INTEL_82372FB_3 0x7603 ++#define PCI_DEVICE_ID_INTEL_82454GX 0x84c4 ++#define PCI_DEVICE_ID_INTEL_82450GX 0x84c5 ++#define PCI_DEVICE_ID_INTEL_82451NX 0x84ca ++ ++#define PCI_VENDOR_ID_COMPUTONE 0x8e0e ++#define PCI_DEVICE_ID_COMPUTONE_IP2EX 0x0291 ++#define PCI_DEVICE_ID_COMPUTONE_PG 0x0302 ++#define PCI_SUBVENDOR_ID_COMPUTONE 0x8e0e ++#define PCI_SUBDEVICE_ID_COMPUTONE_PG4 0x0001 ++#define PCI_SUBDEVICE_ID_COMPUTONE_PG8 0x0002 ++#define PCI_SUBDEVICE_ID_COMPUTONE_PG6 0x0003 ++ ++#define PCI_VENDOR_ID_KTI 0x8e2e ++#define PCI_DEVICE_ID_KTI_ET32P2 0x3000 ++ ++#define PCI_VENDOR_ID_ADAPTEC 0x9004 ++#define PCI_DEVICE_ID_ADAPTEC_7810 0x1078 ++#define PCI_DEVICE_ID_ADAPTEC_7821 0x2178 ++#define PCI_DEVICE_ID_ADAPTEC_38602 0x3860 ++#define PCI_DEVICE_ID_ADAPTEC_7850 0x5078 ++#define PCI_DEVICE_ID_ADAPTEC_7855 0x5578 ++#define PCI_DEVICE_ID_ADAPTEC_5800 0x5800 ++#define PCI_DEVICE_ID_ADAPTEC_3860 0x6038 ++#define PCI_DEVICE_ID_ADAPTEC_1480A 0x6075 ++#define PCI_DEVICE_ID_ADAPTEC_7860 0x6078 ++#define PCI_DEVICE_ID_ADAPTEC_7861 0x6178 ++#define PCI_DEVICE_ID_ADAPTEC_7870 0x7078 ++#define PCI_DEVICE_ID_ADAPTEC_7871 0x7178 ++#define PCI_DEVICE_ID_ADAPTEC_7872 0x7278 ++#define PCI_DEVICE_ID_ADAPTEC_7873 0x7378 ++#define PCI_DEVICE_ID_ADAPTEC_7874 0x7478 ++#define PCI_DEVICE_ID_ADAPTEC_7895 0x7895 ++#define PCI_DEVICE_ID_ADAPTEC_7880 0x8078 ++#define PCI_DEVICE_ID_ADAPTEC_7881 0x8178 ++#define PCI_DEVICE_ID_ADAPTEC_7882 0x8278 ++#define PCI_DEVICE_ID_ADAPTEC_7883 0x8378 ++#define PCI_DEVICE_ID_ADAPTEC_7884 0x8478 ++#define PCI_DEVICE_ID_ADAPTEC_7885 0x8578 ++#define PCI_DEVICE_ID_ADAPTEC_7886 0x8678 ++#define PCI_DEVICE_ID_ADAPTEC_7887 0x8778 ++#define PCI_DEVICE_ID_ADAPTEC_7888 0x8878 ++#define PCI_DEVICE_ID_ADAPTEC_1030 0x8b78 ++ ++#define PCI_VENDOR_ID_ADAPTEC2 0x9005 ++#define PCI_DEVICE_ID_ADAPTEC2_2940U2 0x0010 ++#define PCI_DEVICE_ID_ADAPTEC2_2930U2 0x0011 ++#define PCI_DEVICE_ID_ADAPTEC2_7890B 0x0013 ++#define PCI_DEVICE_ID_ADAPTEC2_7890 0x001f ++#define PCI_DEVICE_ID_ADAPTEC2_3940U2 0x0050 ++#define PCI_DEVICE_ID_ADAPTEC2_3950U2D 0x0051 ++#define PCI_DEVICE_ID_ADAPTEC2_7896 0x005f ++#define PCI_DEVICE_ID_ADAPTEC2_7892A 0x0080 ++#define PCI_DEVICE_ID_ADAPTEC2_7892B 0x0081 ++#define PCI_DEVICE_ID_ADAPTEC2_7892D 0x0083 ++#define PCI_DEVICE_ID_ADAPTEC2_7892P 0x008f ++#define PCI_DEVICE_ID_ADAPTEC2_7899A 0x00c0 ++#define PCI_DEVICE_ID_ADAPTEC2_7899B 0x00c1 ++#define PCI_DEVICE_ID_ADAPTEC2_7899D 0x00c3 ++#define PCI_DEVICE_ID_ADAPTEC2_7899P 0x00cf ++ ++#define PCI_VENDOR_ID_ATRONICS 0x907f ++#define PCI_DEVICE_ID_ATRONICS_2015 0x2015 ++ ++#define PCI_VENDOR_ID_HOLTEK2 0x9412 ++#define PCI_DEVICE_ID_HOLTEK2_6565 0x6565 ++ ++#define PCI_VENDOR_ID_NETMOS 0x9710 ++#define PCI_DEVICE_ID_NETMOS_9735 0x9735 ++#define PCI_DEVICE_ID_NETMOS_9835 0x9835 ++ ++#define PCI_SUBVENDOR_ID_EXSYS 0xd84d ++#define PCI_SUBDEVICE_ID_EXSYS_4014 0x4014 ++ ++#define PCI_VENDOR_ID_TIGERJET 0xe159 ++#define PCI_DEVICE_ID_TIGERJET_300 0x0001 ++#define PCI_DEVICE_ID_TIGERJET_100 0x0002 ++ ++#define PCI_VENDOR_ID_ARK 0xedd8 ++#define PCI_DEVICE_ID_ARK_STING 0xa091 ++#define PCI_DEVICE_ID_ARK_STINGARK 0xa099 ++#define PCI_DEVICE_ID_ARK_2000MT 0xa0a1 ++ +Index: b/netboot/pci_io.c +=================================================================== +--- /dev/null ++++ b/netboot/pci_io.c +@@ -0,0 +1,431 @@ ++/* ++** Support for NE2000 PCI clones added David Monro June 1997 ++** Generalised to other NICs by Ken Yap July 1997 ++** ++** Most of this is taken from: ++** ++** /usr/src/linux/drivers/pci/pci.c ++** /usr/src/linux/include/linux/pci.h ++** /usr/src/linux/arch/i386/bios32.c ++** /usr/src/linux/include/linux/bios32.h ++** /usr/src/linux/drivers/net/ne.c ++*/ ++#define PCBIOS ++#include "grub.h" ++#include "pci.h" ++ ++#ifdef CONFIG_PCI_DIRECT ++#define PCIBIOS_SUCCESSFUL 0x00 ++ ++#define DEBUG 0 ++ ++/* ++ * Functions for accessing PCI configuration space with type 1 accesses ++ */ ++ ++#define CONFIG_CMD(bus, device_fn, where) (0x80000000 | (bus << 16) | (device_fn << 8) | (where & ~3)) ++ ++int pcibios_read_config_byte(unsigned int bus, unsigned int device_fn, ++ unsigned int where, uint8_t *value) ++{ ++ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); ++ *value = inb(0xCFC + (where&3)); ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++int pcibios_read_config_word (unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint16_t *value) ++{ ++ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); ++ *value = inw(0xCFC + (where&2)); ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++int pcibios_read_config_dword (unsigned int bus, unsigned int device_fn, ++ unsigned int where, uint32_t *value) ++{ ++ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); ++ *value = inl(0xCFC); ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++int pcibios_write_config_byte (unsigned int bus, unsigned int device_fn, ++ unsigned int where, uint8_t value) ++{ ++ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); ++ outb(value, 0xCFC + (where&3)); ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++int pcibios_write_config_word (unsigned int bus, unsigned int device_fn, ++ unsigned int where, uint16_t value) ++{ ++ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); ++ outw(value, 0xCFC + (where&2)); ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++int pcibios_write_config_dword (unsigned int bus, unsigned int device_fn, unsigned int where, uint32_t value) ++{ ++ outl(CONFIG_CMD(bus,device_fn,where), 0xCF8); ++ outl(value, 0xCFC); ++ return PCIBIOS_SUCCESSFUL; ++} ++ ++#undef CONFIG_CMD ++ ++#else /* CONFIG_PCI_DIRECT not defined */ ++ ++#if !defined(PCBIOS) ++#error "The pcibios can only be used when the PCBIOS support is compiled in" ++#endif ++ ++ ++#define KERN_CODE_SEG 0X8 ++/* Stuff for asm */ ++#define save_flags(x) \ ++__asm__ __volatile__("pushfl ; popl %0":"=g" (x): /* no input */ :"memory") ++ ++#define cli() __asm__ __volatile__ ("cli": : :"memory") ++ ++#define restore_flags(x) \ ++__asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") ++ ++ ++ ++static struct { ++ unsigned long address; ++ unsigned short segment; ++} bios32_indirect = { 0, KERN_CODE_SEG }; ++ ++static long pcibios_entry = 0; ++static struct { ++ unsigned long address; ++ unsigned short segment; ++} pci_indirect = { 0, KERN_CODE_SEG }; ++ ++static unsigned long bios32_service(unsigned long service) ++{ ++ unsigned char return_code; /* %al */ ++ unsigned long address; /* %ebx */ ++ unsigned long length; /* %ecx */ ++ unsigned long entry; /* %edx */ ++ unsigned long flags; ++ ++ save_flags(flags); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%edi)" ++#else ++ "lcall *(%%edi)" ++#endif ++ : "=a" (return_code), ++ "=b" (address), ++ "=c" (length), ++ "=d" (entry) ++ : "0" (service), ++ "1" (0), ++ "D" (&bios32_indirect)); ++ restore_flags(flags); ++ ++ switch (return_code) { ++ case 0: ++ return address + entry; ++ case 0x80: /* Not present */ ++ printf("bios32_service(%d) : not present\n", service); ++ return 0; ++ default: /* Shouldn't happen */ ++ printf("bios32_service(%d) : returned %#X, mail drew@colorado.edu\n", ++ service, return_code); ++ return 0; ++ } ++} ++ ++int pcibios_read_config_byte(unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint8_t *value) ++{ ++ unsigned long ret; ++ unsigned long bx = (bus << 8) | device_fn; ++ unsigned long flags; ++ ++ save_flags(flags); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%esi)\n\t" ++#else ++ "lcall *(%%esi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:" ++ : "=c" (*value), ++ "=a" (ret) ++ : "1" (PCIBIOS_READ_CONFIG_BYTE), ++ "b" (bx), ++ "D" ((long) where), ++ "S" (&pci_indirect)); ++ restore_flags(flags); ++ return (int) (ret & 0xff00) >> 8; ++} ++ ++int pcibios_read_config_word(unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint16_t *value) ++{ ++ unsigned long ret; ++ unsigned long bx = (bus << 8) | device_fn; ++ unsigned long flags; ++ ++ save_flags(flags); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%esi)\n\t" ++#else ++ "lcall *(%%esi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:" ++ : "=c" (*value), ++ "=a" (ret) ++ : "1" (PCIBIOS_READ_CONFIG_WORD), ++ "b" (bx), ++ "D" ((long) where), ++ "S" (&pci_indirect)); ++ restore_flags(flags); ++ return (int) (ret & 0xff00) >> 8; ++} ++ ++int pcibios_read_config_dword(unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint32_t *value) ++{ ++ unsigned long ret; ++ unsigned long bx = (bus << 8) | device_fn; ++ unsigned long flags; ++ ++ save_flags(flags); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%esi)\n\t" ++#else ++ "lcall *(%%esi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:" ++ : "=c" (*value), ++ "=a" (ret) ++ : "1" (PCIBIOS_READ_CONFIG_DWORD), ++ "b" (bx), ++ "D" ((long) where), ++ "S" (&pci_indirect)); ++ restore_flags(flags); ++ return (int) (ret & 0xff00) >> 8; ++} ++ ++int pcibios_write_config_byte (unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint8_t value) ++{ ++ unsigned long ret; ++ unsigned long bx = (bus << 8) | device_fn; ++ unsigned long flags; ++ ++ save_flags(flags); cli(); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%esi)\n\t" ++#else ++ "lcall *(%%esi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:" ++ : "=a" (ret) ++ : "0" (PCIBIOS_WRITE_CONFIG_BYTE), ++ "c" (value), ++ "b" (bx), ++ "D" ((long) where), ++ "S" (&pci_indirect)); ++ restore_flags(flags); ++ return (int) (ret & 0xff00) >> 8; ++} ++ ++int pcibios_write_config_word (unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint16_t value) ++{ ++ unsigned long ret; ++ unsigned long bx = (bus << 8) | device_fn; ++ unsigned long flags; ++ ++ save_flags(flags); cli(); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%esi)\n\t" ++#else ++ "lcall *(%%esi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:" ++ : "=a" (ret) ++ : "0" (PCIBIOS_WRITE_CONFIG_WORD), ++ "c" (value), ++ "b" (bx), ++ "D" ((long) where), ++ "S" (&pci_indirect)); ++ restore_flags(flags); ++ return (int) (ret & 0xff00) >> 8; ++} ++ ++int pcibios_write_config_dword (unsigned int bus, ++ unsigned int device_fn, unsigned int where, uint32_t value) ++{ ++ unsigned long ret; ++ unsigned long bx = (bus << 8) | device_fn; ++ unsigned long flags; ++ ++ save_flags(flags); cli(); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%esi)\n\t" ++#else ++ "lcall *(%%esi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:" ++ : "=a" (ret) ++ : "0" (PCIBIOS_WRITE_CONFIG_DWORD), ++ "c" (value), ++ "b" (bx), ++ "D" ((long) where), ++ "S" (&pci_indirect)); ++ restore_flags(flags); ++ return (int) (ret & 0xff00) >> 8; ++} ++ ++static void check_pcibios(void) ++{ ++ unsigned long signature; ++ unsigned char present_status; ++ unsigned char major_revision; ++ unsigned char minor_revision; ++ unsigned long flags; ++ int pack; ++ ++ if ((pcibios_entry = bios32_service(PCI_SERVICE))) { ++ pci_indirect.address = pcibios_entry; ++ ++ save_flags(flags); ++ __asm__( ++#ifdef ABSOLUTE_WITHOUT_ASTERISK ++ "lcall (%%edi)\n\t" ++#else ++ "lcall *(%%edi)\n\t" ++#endif ++ "jc 1f\n\t" ++ "xor %%ah, %%ah\n" ++ "1:\tshl $8, %%eax\n\t" ++ "movw %%bx, %%ax" ++ : "=d" (signature), ++ "=a" (pack) ++ : "1" (PCIBIOS_PCI_BIOS_PRESENT), ++ "D" (&pci_indirect) ++ : "bx", "cx"); ++ restore_flags(flags); ++ ++ present_status = (pack >> 16) & 0xff; ++ major_revision = (pack >> 8) & 0xff; ++ minor_revision = pack & 0xff; ++ if (present_status || (signature != PCI_SIGNATURE)) { ++ printf("ERROR: BIOS32 says PCI BIOS, but no PCI " ++ "BIOS????\n"); ++ pcibios_entry = 0; ++ } ++#if DEBUG ++ if (pcibios_entry) { ++ printf ("pcibios_init : PCI BIOS revision %hhX.%hhX" ++ " entry at %#X\n", major_revision, ++ minor_revision, pcibios_entry); ++ } ++#endif ++ } ++} ++ ++static void pcibios_init(void) ++{ ++ union bios32 *check; ++ unsigned char sum; ++ int i, length; ++ unsigned long bios32_entry = 0; ++ ++ EnterFunction("pcibios_init"); ++ /* ++ * Follow the standard procedure for locating the BIOS32 Service ++ * directory by scanning the permissible address range from ++ * 0xe0000 through 0xfffff for a valid BIOS32 structure. ++ * ++ */ ++ ++ for (check = (union bios32 *) 0xe0000; check <= (union bios32 *) 0xffff0; ++check) { ++ if (check->fields.signature != BIOS32_SIGNATURE) ++ continue; ++ length = check->fields.length * 16; ++ if (!length) ++ continue; ++ sum = 0; ++ for (i = 0; i < length ; ++i) ++ sum += check->chars[i]; ++ if (sum != 0) ++ continue; ++ if (check->fields.revision != 0) { ++ printf("pcibios_init : unsupported revision %d at %#X, mail drew@colorado.edu\n", ++ check->fields.revision, check); ++ continue; ++ } ++#if DEBUG ++ printf("pcibios_init : BIOS32 Service Directory " ++ "structure at %#X\n", check); ++#endif ++ if (!bios32_entry) { ++ if (check->fields.entry >= 0x100000) { ++ printf("pcibios_init: entry in high " ++ "memory, giving up\n"); ++ return; ++ } else { ++ bios32_entry = check->fields.entry; ++#if DEBUG ++ printf("pcibios_init : BIOS32 Service Directory" ++ " entry at %#X\n", bios32_entry); ++#endif ++ bios32_indirect.address = bios32_entry; ++ } ++ } ++ } ++ if (bios32_entry) ++ check_pcibios(); ++ LeaveFunction("pcibios_init"); ++} ++ ++#endif /* CONFIG_PCI_DIRECT not defined*/ ++ ++unsigned long pcibios_bus_base(unsigned int bus __unused) ++{ ++ /* architecturally this must be 0 */ ++ return 0; ++} ++ ++void find_pci(int type, struct pci_device *dev) ++{ ++ EnterFunction("find_pci"); ++#ifndef CONFIG_PCI_DIRECT ++ if (!pcibios_entry) { ++ pcibios_init(); ++ } ++ if (!pcibios_entry) { ++ printf("pci_init: no BIOS32 detected\n"); ++ return; ++ } ++#endif ++ LeaveFunction("find_pci"); ++ return scan_pci_bus(type, dev); ++} +Index: b/netboot/pcnet32.c +=================================================================== +--- /dev/null ++++ b/netboot/pcnet32.c +@@ -0,0 +1,1004 @@ ++/************************************************************************** ++* ++* pcnet32.c -- Etherboot device driver for the AMD PCnet32 ++* Written 2003-2003 by Timothy Legge ++* ++* 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., 675 Mass Ave, Cambridge, MA 02139, USA. ++* ++* Portions of this code based on: ++* pcnet32.c: An AMD PCnet32 ethernet driver for linux: ++* ++* (C) 1996-1999 Thomas Bogendoerfer ++* See Linux Driver for full information ++* ++* The transmit and poll functions were written with reference to: ++* lance.c - LANCE NIC driver for Etherboot written by Ken Yap ++* ++* Linux Driver Version 1.27a, 10.02.2002 ++* ++* ++* REVISION HISTORY: ++* ================ ++* v1.0 08-06-2003 timlegge Initial port of Linux driver ++* v1.1 08-23-2003 timlegge Add multicast support ++* v1.2 01-17-2004 timlegge Initial driver output cleanup ++* v1.3 03-29-2004 timlegge More driver cleanup ++* ++* Indent Options: indent -kr -i8 ++***************************************************************************/ ++ ++/* to get some global routines like printf */ ++#include "etherboot.h" ++/* to get the interface to the body of the program */ ++#include "nic.h" ++/* to get the PCI support functions, if this is a PCI NIC */ ++#include "pci.h" ++/* Include the time functions */ ++#include "timer.h" ++#include "mii.h" ++/* void hex_dump(const char *data, const unsigned int len); */ ++ ++/* Etherboot Specific definations */ ++#define drv_version "v1.3" ++#define drv_date "03-29-2004" ++ ++typedef unsigned char u8; ++typedef signed char s8; ++typedef unsigned short u16; ++typedef signed short s16; ++typedef unsigned int u32; ++typedef signed int s32; ++ ++static u32 ioaddr; /* Globally used for the card's io address */ ++ ++#ifdef EDEBUG ++#define dprintf(x) printf x ++#else ++#define dprintf(x) ++#endif ++ ++/* Condensed operations for readability. */ ++#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) ++#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) ++ ++/* End Etherboot Specific */ ++ ++int cards_found /* __initdata */ ; ++ ++#ifdef REMOVE ++/* FIXME: Remove these they are probably pointless */ ++ ++/* ++ * VLB I/O addresses ++ */ ++static unsigned int pcnet32_portlist[] /*__initdata */ = ++{ 0x300, 0x320, 0x340, 0x360, 0 }; ++ ++static int pcnet32_debug = 1; ++static int tx_start = 1; /* Mapping -- 0:20, 1:64, 2:128, 3:~220 (depends on chip vers) */ ++static int pcnet32vlb; /* check for VLB cards ? */ ++ ++static struct net_device *pcnet32_dev; ++ ++static int max_interrupt_work = 80; ++static int rx_copybreak = 200; ++#endif ++#define PCNET32_PORT_AUI 0x00 ++#define PCNET32_PORT_10BT 0x01 ++#define PCNET32_PORT_GPSI 0x02 ++#define PCNET32_PORT_MII 0x03 ++ ++#define PCNET32_PORT_PORTSEL 0x03 ++#define PCNET32_PORT_ASEL 0x04 ++#define PCNET32_PORT_100 0x40 ++#define PCNET32_PORT_FD 0x80 ++ ++#define PCNET32_DMA_MASK 0xffffffff ++ ++/* ++ * table to translate option values from tulip ++ * to internal options ++ */ ++static unsigned char options_mapping[] = { ++ PCNET32_PORT_ASEL, /* 0 Auto-select */ ++ PCNET32_PORT_AUI, /* 1 BNC/AUI */ ++ PCNET32_PORT_AUI, /* 2 AUI/BNC */ ++ PCNET32_PORT_ASEL, /* 3 not supported */ ++ PCNET32_PORT_10BT | PCNET32_PORT_FD, /* 4 10baseT-FD */ ++ PCNET32_PORT_ASEL, /* 5 not supported */ ++ PCNET32_PORT_ASEL, /* 6 not supported */ ++ PCNET32_PORT_ASEL, /* 7 not supported */ ++ PCNET32_PORT_ASEL, /* 8 not supported */ ++ PCNET32_PORT_MII, /* 9 MII 10baseT */ ++ PCNET32_PORT_MII | PCNET32_PORT_FD, /* 10 MII 10baseT-FD */ ++ PCNET32_PORT_MII, /* 11 MII (autosel) */ ++ PCNET32_PORT_10BT, /* 12 10BaseT */ ++ PCNET32_PORT_MII | PCNET32_PORT_100, /* 13 MII 100BaseTx */ ++ PCNET32_PORT_MII | PCNET32_PORT_100 | PCNET32_PORT_FD, /* 14 MII 100BaseTx-FD */ ++ PCNET32_PORT_ASEL /* 15 not supported */ ++}; ++ ++#define MAX_UNITS 8 /* More are supported, limit only on options */ ++static int options[MAX_UNITS]; ++static int full_duplex[MAX_UNITS]; ++ ++/* ++ * Theory of Operation ++ * ++ * This driver uses the same software structure as the normal lance ++ * driver. So look for a verbose description in lance.c. The differences ++ * to the normal lance driver is the use of the 32bit mode of PCnet32 ++ * and PCnetPCI chips. Because these chips are 32bit chips, there is no ++ * 16MB limitation and we don't need bounce buffers. ++ */ ++ ++ ++ ++/* ++ * Set the number of Tx and Rx buffers, using Log_2(# buffers). ++ * Reasonable default values are 4 Tx buffers, and 16 Rx buffers. ++ * That translates to 2 (4 == 2^^2) and 4 (16 == 2^^4). ++ */ ++#ifndef PCNET32_LOG_TX_BUFFERS ++#define PCNET32_LOG_TX_BUFFERS 1 ++#define PCNET32_LOG_RX_BUFFERS 2 ++#endif ++ ++#define TX_RING_SIZE (1 << (PCNET32_LOG_TX_BUFFERS)) ++#define TX_RING_MOD_MASK (TX_RING_SIZE - 1) ++/* FIXME: Fix this to allow multiple tx_ring descriptors */ ++#define TX_RING_LEN_BITS 0x0000 /*PCNET32_LOG_TX_BUFFERS) << 12) */ ++ ++#define RX_RING_SIZE (1 << (PCNET32_LOG_RX_BUFFERS)) ++#define RX_RING_MOD_MASK (RX_RING_SIZE - 1) ++#define RX_RING_LEN_BITS ((PCNET32_LOG_RX_BUFFERS) << 4) ++ ++#define PKT_BUF_SZ 1544 ++ ++/* Offsets from base I/O address. */ ++#define PCNET32_WIO_RDP 0x10 ++#define PCNET32_WIO_RAP 0x12 ++#define PCNET32_WIO_RESET 0x14 ++#define PCNET32_WIO_BDP 0x16 ++ ++#define PCNET32_DWIO_RDP 0x10 ++#define PCNET32_DWIO_RAP 0x14 ++#define PCNET32_DWIO_RESET 0x18 ++#define PCNET32_DWIO_BDP 0x1C ++ ++#define PCNET32_TOTAL_SIZE 0x20 ++ ++/* Buffers for the tx and Rx */ ++ ++/* Create a static buffer of size PKT_BUF_SZ for each ++TX Descriptor. All descriptors point to a ++part of this buffer */ ++static unsigned char txb[PKT_BUF_SZ * TX_RING_SIZE]; ++// __attribute__ ((aligned(16))); ++ ++/* Create a static buffer of size PKT_BUF_SZ for each ++RX Descriptor All descriptors point to a ++part of this buffer */ ++static unsigned char rxb[RX_RING_SIZE * PKT_BUF_SZ]; ++// __attribute__ ((aligned(16))); ++ ++/* The PCNET32 Rx and Tx ring descriptors. */ ++struct pcnet32_rx_head { ++ u32 base; ++ s16 buf_length; ++ s16 status; ++ u32 msg_length; ++ u32 reserved; ++}; ++ ++struct pcnet32_tx_head { ++ u32 base; ++ s16 length; ++ s16 status; ++ u32 misc; ++ u32 reserved; ++}; ++ ++/* The PCNET32 32-Bit initialization block, described in databook. */ ++struct pcnet32_init_block { ++ u16 mode; ++ u16 tlen_rlen; ++ u8 phys_addr[6]; ++ u16 reserved; ++ u32 filter[2]; ++ /* Receive and transmit ring base, along with extra bits. */ ++ u32 rx_ring; ++ u32 tx_ring; ++}; ++/* PCnet32 access functions */ ++struct pcnet32_access { ++ u16(*read_csr) (unsigned long, int); ++ void (*write_csr) (unsigned long, int, u16); ++ u16(*read_bcr) (unsigned long, int); ++ void (*write_bcr) (unsigned long, int, u16); ++ u16(*read_rap) (unsigned long); ++ void (*write_rap) (unsigned long, u16); ++ void (*reset) (unsigned long); ++}; ++ ++/* Define the TX Descriptor */ ++static struct pcnet32_tx_head tx_ring[TX_RING_SIZE] ++ __attribute__ ((aligned(16))); ++ ++ ++/* Define the RX Descriptor */ ++static struct pcnet32_rx_head rx_ring[RX_RING_SIZE] ++ __attribute__ ((aligned(16))); ++ ++/* May need to be moved to mii.h */ ++struct mii_if_info { ++ int phy_id; ++ int advertising; ++ unsigned int full_duplex:1; /* is full duplex? */ ++}; ++ ++/* ++ * The first three fields of pcnet32_private are read by the ethernet device ++ * so we allocate the structure should be allocated by pci_alloc_consistent(). ++ */ ++#define MII_CNT 4 ++struct pcnet32_private { ++ struct pcnet32_init_block init_block; ++ struct pci_dev *pci_dev; /* Pointer to the associated pci device structure */ ++ const char *name; ++ /* The saved address of a sent-in-place packet/buffer, for skfree(). */ ++ struct sk_buff *tx_skbuff[TX_RING_SIZE]; ++ struct sk_buff *rx_skbuff[RX_RING_SIZE]; ++ struct pcnet32_access a; ++ unsigned int cur_rx, cur_tx; /* The next free ring entry */ ++ char tx_full; ++ int options; ++ int shared_irq:1, /* shared irq possible */ ++ ltint:1, /* enable TxDone-intr inhibitor */ ++ dxsuflo:1, /* disable transmit stop on uflo */ ++ mii:1; /* mii port available */ ++ struct mii_if_info mii_if; ++ unsigned char phys[MII_CNT]; ++ struct net_device *next; ++ int full_duplex:1; ++} lpx; ++ ++static struct pcnet32_private *lp; ++ ++static int mdio_read(struct nic *nic __unused, int phy_id, int reg_num); ++#if 0 ++static void mdio_write(struct nic *nic __unused, int phy_id, int reg_num, ++ int val); ++#endif ++enum pci_flags_bit { ++ PCI_USES_IO = 1, PCI_USES_MEM = 2, PCI_USES_MASTER = 4, ++ PCI_ADDR0 = 0x10 << 0, PCI_ADDR1 = 0x10 << 1, PCI_ADDR2 = ++ 0x10 << 2, PCI_ADDR3 = 0x10 << 3, ++}; ++ ++ ++static u16 pcnet32_wio_read_csr(unsigned long addr, int index) ++{ ++ outw(index, addr + PCNET32_WIO_RAP); ++ return inw(addr + PCNET32_WIO_RDP); ++} ++ ++static void pcnet32_wio_write_csr(unsigned long addr, int index, u16 val) ++{ ++ outw(index, addr + PCNET32_WIO_RAP); ++ outw(val, addr + PCNET32_WIO_RDP); ++} ++ ++static u16 pcnet32_wio_read_bcr(unsigned long addr, int index) ++{ ++ outw(index, addr + PCNET32_WIO_RAP); ++ return inw(addr + PCNET32_WIO_BDP); ++} ++ ++static void pcnet32_wio_write_bcr(unsigned long addr, int index, u16 val) ++{ ++ outw(index, addr + PCNET32_WIO_RAP); ++ outw(val, addr + PCNET32_WIO_BDP); ++} ++ ++static u16 pcnet32_wio_read_rap(unsigned long addr) ++{ ++ return inw(addr + PCNET32_WIO_RAP); ++} ++ ++static void pcnet32_wio_write_rap(unsigned long addr, u16 val) ++{ ++ outw(val, addr + PCNET32_WIO_RAP); ++} ++ ++static void pcnet32_wio_reset(unsigned long addr) ++{ ++ inw(addr + PCNET32_WIO_RESET); ++} ++ ++static int pcnet32_wio_check(unsigned long addr) ++{ ++ outw(88, addr + PCNET32_WIO_RAP); ++ return (inw(addr + PCNET32_WIO_RAP) == 88); ++} ++ ++static struct pcnet32_access pcnet32_wio = { ++ read_csr:pcnet32_wio_read_csr, ++ write_csr:pcnet32_wio_write_csr, ++ read_bcr:pcnet32_wio_read_bcr, ++ write_bcr:pcnet32_wio_write_bcr, ++ read_rap:pcnet32_wio_read_rap, ++ write_rap:pcnet32_wio_write_rap, ++ reset:pcnet32_wio_reset ++}; ++ ++static u16 pcnet32_dwio_read_csr(unsigned long addr, int index) ++{ ++ outl(index, addr + PCNET32_DWIO_RAP); ++ return (inl(addr + PCNET32_DWIO_RDP) & 0xffff); ++} ++ ++static void pcnet32_dwio_write_csr(unsigned long addr, int index, u16 val) ++{ ++ outl(index, addr + PCNET32_DWIO_RAP); ++ outl(val, addr + PCNET32_DWIO_RDP); ++} ++ ++static u16 pcnet32_dwio_read_bcr(unsigned long addr, int index) ++{ ++ outl(index, addr + PCNET32_DWIO_RAP); ++ return (inl(addr + PCNET32_DWIO_BDP) & 0xffff); ++} ++ ++static void pcnet32_dwio_write_bcr(unsigned long addr, int index, u16 val) ++{ ++ outl(index, addr + PCNET32_DWIO_RAP); ++ outl(val, addr + PCNET32_DWIO_BDP); ++} ++ ++static u16 pcnet32_dwio_read_rap(unsigned long addr) ++{ ++ return (inl(addr + PCNET32_DWIO_RAP) & 0xffff); ++} ++ ++static void pcnet32_dwio_write_rap(unsigned long addr, u16 val) ++{ ++ outl(val, addr + PCNET32_DWIO_RAP); ++} ++ ++static void pcnet32_dwio_reset(unsigned long addr) ++{ ++ inl(addr + PCNET32_DWIO_RESET); ++} ++ ++static int pcnet32_dwio_check(unsigned long addr) ++{ ++ outl(88, addr + PCNET32_DWIO_RAP); ++ return ((inl(addr + PCNET32_DWIO_RAP) & 0xffff) == 88); ++} ++ ++static struct pcnet32_access pcnet32_dwio = { ++ read_csr:pcnet32_dwio_read_csr, ++ write_csr:pcnet32_dwio_write_csr, ++ read_bcr:pcnet32_dwio_read_bcr, ++ write_bcr:pcnet32_dwio_write_bcr, ++ read_rap:pcnet32_dwio_read_rap, ++ write_rap:pcnet32_dwio_write_rap, ++ reset:pcnet32_dwio_reset ++}; ++ ++ ++/* Initialize the PCNET32 Rx and Tx rings. */ ++static int pcnet32_init_ring(struct nic *nic) ++{ ++ int i; ++ ++ lp->tx_full = 0; ++ lp->cur_rx = lp->cur_tx = 0; ++ ++ for (i = 0; i < RX_RING_SIZE; i++) { ++ rx_ring[i].base = (u32) virt_to_le32desc(&rxb[i]); ++ rx_ring[i].buf_length = le16_to_cpu(-PKT_BUF_SZ); ++ rx_ring[i].status = le16_to_cpu(0x8000); ++ } ++ ++ /* The Tx buffer address is filled in as needed, but we do need to clear ++ the upper ownership bit. */ ++ for (i = 0; i < TX_RING_SIZE; i++) { ++ tx_ring[i].base = 0; ++ tx_ring[i].status = 0; ++ } ++ ++ ++ lp->init_block.tlen_rlen = ++ le16_to_cpu(TX_RING_LEN_BITS | RX_RING_LEN_BITS); ++ for (i = 0; i < 6; i++) ++ lp->init_block.phys_addr[i] = nic->node_addr[i]; ++ lp->init_block.rx_ring = (u32) virt_to_le32desc(&rx_ring[0]); ++ lp->init_block.tx_ring = (u32) virt_to_le32desc(&tx_ring[0]); ++ return 0; ++} ++ ++/************************************************************************** ++RESET - Reset adapter ++***************************************************************************/ ++static void pcnet32_reset(struct nic *nic) ++{ ++ /* put the card in its initial state */ ++ u16 val; ++ int i; ++ ++ /* Reset the PCNET32 */ ++ lp->a.reset(ioaddr); ++ ++ /* switch pcnet32 to 32bit mode */ ++ lp->a.write_bcr(ioaddr, 20, 2); ++ ++ /* set/reset autoselect bit */ ++ val = lp->a.read_bcr(ioaddr, 2) & ~2; ++ if (lp->options & PCNET32_PORT_ASEL) ++ val |= 2; ++ lp->a.write_bcr(ioaddr, 2, val); ++ /* handle full duplex setting */ ++ if (lp->full_duplex) { ++ val = lp->a.read_bcr(ioaddr, 9) & ~3; ++ if (lp->options & PCNET32_PORT_FD) { ++ val |= 1; ++ if (lp->options == ++ (PCNET32_PORT_FD | PCNET32_PORT_AUI)) ++ val |= 2; ++ } else if (lp->options & PCNET32_PORT_ASEL) { ++ /* workaround of xSeries250, turn on for 79C975 only */ ++ i = ((lp->a. ++ read_csr(ioaddr, ++ 88) | (lp->a.read_csr(ioaddr, ++ 89) << 16)) >> ++ 12) & 0xffff; ++ if (i == 0x2627) ++ val |= 3; ++ } ++ lp->a.write_bcr(ioaddr, 9, val); ++ } ++ ++ /* set/reset GPSI bit in test register */ ++ val = lp->a.read_csr(ioaddr, 124) & ~0x10; ++ if ((lp->options & PCNET32_PORT_PORTSEL) == PCNET32_PORT_GPSI) ++ val |= 0x10; ++ lp->a.write_csr(ioaddr, 124, val); ++ ++ if (lp->mii && !(lp->options & PCNET32_PORT_ASEL)) { ++ val = lp->a.read_bcr(ioaddr, 32) & ~0x38; /* disable Auto Negotiation, set 10Mpbs, HD */ ++ if (lp->options & PCNET32_PORT_FD) ++ val |= 0x10; ++ if (lp->options & PCNET32_PORT_100) ++ val |= 0x08; ++ lp->a.write_bcr(ioaddr, 32, val); ++ } else { ++ if (lp->options & PCNET32_PORT_ASEL) { /* enable auto negotiate, setup, disable fd */ ++ val = lp->a.read_bcr(ioaddr, 32) & ~0x98; ++ val |= 0x20; ++ lp->a.write_bcr(ioaddr, 32, val); ++ } ++ } ++ ++#ifdef DO_DXSUFLO ++ if (lp->dxsuflo) { /* Disable transmit stop on underflow */ ++ val = lp->a.read_csr(ioaddr, 3); ++ val |= 0x40; ++ lp->a.write_csr(ioaddr, 3, val); ++ } ++#endif ++ ++ if (lp->ltint) { /* Enable TxDone-intr inhibitor */ ++ val = lp->a.read_csr(ioaddr, 5); ++ val |= (1 << 14); ++ lp->a.write_csr(ioaddr, 5, val); ++ } ++ lp->init_block.mode = ++ le16_to_cpu((lp->options & PCNET32_PORT_PORTSEL) << 7); ++ lp->init_block.filter[0] = 0xffffffff; ++ lp->init_block.filter[1] = 0xffffffff; ++ ++ pcnet32_init_ring(nic); ++ ++ ++ /* Re-initialize the PCNET32, and start it when done. */ ++ lp->a.write_csr(ioaddr, 1, ++ (virt_to_bus(&lp->init_block)) & 0xffff); ++ lp->a.write_csr(ioaddr, 2, (virt_to_bus(&lp->init_block)) >> 16); ++ lp->a.write_csr(ioaddr, 4, 0x0915); ++ lp->a.write_csr(ioaddr, 0, 0x0001); ++ ++ ++ i = 0; ++ while (i++ < 100) ++ if (lp->a.read_csr(ioaddr, 0) & 0x0100) ++ break; ++ /* ++ * We used to clear the InitDone bit, 0x0100, here but Mark Stockton ++ * reports that doing so triggers a bug in the '974. ++ */ ++ lp->a.write_csr(ioaddr, 0, 0x0042); ++ ++ dprintf(("pcnet32 open, csr0 %hX.\n", lp->a.read_csr(ioaddr, 0))); ++ ++} ++ ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int pcnet32_poll(struct nic *nic __unused, int retrieve) ++{ ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ ++ int status; ++ int entry; ++ ++ entry = lp->cur_rx & RX_RING_MOD_MASK; ++ status = ((short) le16_to_cpu(rx_ring[entry].status) >> 8); ++ ++ if (status < 0) ++ return 0; ++ ++ if ( ! retrieve ) return 1; ++ ++ if (status == 0x03) { ++ nic->packetlen = ++ (le32_to_cpu(rx_ring[entry].msg_length) & 0xfff) - 4; ++ memcpy(nic->packet, &rxb[entry], nic->packetlen); ++ ++ /* Andrew Boyd of QNX reports that some revs of the 79C765 ++ * clear the buffer length */ ++ rx_ring[entry].buf_length = le16_to_cpu(-PKT_BUF_SZ); ++ rx_ring[entry].status |= le16_to_cpu(0x8000); /* prime for next receive */ ++ /* Switch to the next Rx ring buffer */ ++ lp->cur_rx++; ++ ++ } else { ++ return 0; ++ } ++ ++ return 1; ++} ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void pcnet32_transmit(struct nic *nic __unused, const char *d, /* Destination */ ++ unsigned int t, /* Type */ ++ unsigned int s, /* size */ ++ const char *p) ++{ /* Packet */ ++ /* send the packet to destination */ ++ unsigned long time; ++ u8 *ptxb; ++ u16 nstype; ++ u16 status; ++ int entry = 0; /*lp->cur_tx & TX_RING_MOD_MASK; */ ++ ++ status = 0x8300; ++ /* point to the current txb incase multiple tx_rings are used */ ++ ptxb = txb + (lp->cur_tx * PKT_BUF_SZ); ++ ++ /* copy the packet to ring buffer */ ++ memcpy(ptxb, d, ETH_ALEN); /* dst */ ++ memcpy(ptxb + ETH_ALEN, nic->node_addr, ETH_ALEN); /* src */ ++ nstype = htons((u16) t); /* type */ ++ memcpy(ptxb + 2 * ETH_ALEN, (u8 *) & nstype, 2); /* type */ ++ memcpy(ptxb + ETH_HLEN, p, s); ++ ++ s += ETH_HLEN; ++ while (s < ETH_ZLEN) /* pad to min length */ ++ ptxb[s++] = '\0'; ++ ++ tx_ring[entry].length = le16_to_cpu(-s); ++ tx_ring[entry].misc = 0x00000000; ++ tx_ring[entry].base = (u32) virt_to_le32desc(ptxb); ++ ++ /* we set the top byte as the very last thing */ ++ tx_ring[entry].status = le16_to_cpu(status); ++ ++ ++ /* Trigger an immediate send poll */ ++ lp->a.write_csr(ioaddr, 0, 0x0048); ++ ++ /* wait for transmit complete */ ++ lp->cur_tx = 0; /* (lp->cur_tx + 1); */ ++ time = currticks() + TICKS_PER_SEC; /* wait one second */ ++ while (currticks() < time && ++ ((short) le16_to_cpu(tx_ring[entry].status) < 0)); ++ ++ if ((short) le16_to_cpu(tx_ring[entry].status) < 0) ++ printf("PCNET32 timed out on transmit\n"); ++ ++ /* Stop pointing at the current txb ++ * otherwise the card continues to send the packet */ ++ tx_ring[entry].base = 0; ++ ++} ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void pcnet32_disable(struct dev *dev __unused) ++{ ++ /* Stop the PCNET32 here -- it ocassionally polls memory if we don't */ ++ lp->a.write_csr(ioaddr, 0, 0x0004); ++ ++ /* ++ * Switch back to 16-bit mode to avoid problesm with dumb ++ * DOS packet driver after a warm reboot ++ */ ++ lp->a.write_bcr(ioaddr, 20, 4); ++} ++ ++/************************************************************************** ++IRQ - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void pcnet32_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++You should omit the last argument struct pci_device * for a non-PCI NIC ++***************************************************************************/ ++static int pcnet32_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *) dev; ++ int i, media; ++ int fdx, mii, fset, dxsuflo, ltint; ++ int chip_version; ++ char *chipname; ++ struct pcnet32_access *a = NULL; ++ u8 promaddr[6]; ++ ++ int shared = 1; ++ if (pci->ioaddr == 0) ++ return 0; ++ ++ /* BASE is used throughout to address the card */ ++ ioaddr = pci->ioaddr; ++ printf("pcnet32.c: Found %s, Vendor=0x%hX Device=0x%hX\n", ++ pci->name, pci->vendor, pci->dev_id); ++ ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ++ /* reset the chip */ ++ pcnet32_wio_reset(ioaddr); ++ ++ /* NOTE: 16-bit check is first, otherwise some older PCnet chips fail */ ++ if (pcnet32_wio_read_csr(ioaddr, 0) == 4 ++ && pcnet32_wio_check(ioaddr)) { ++ a = &pcnet32_wio; ++ } else { ++ pcnet32_dwio_reset(ioaddr); ++ if (pcnet32_dwio_read_csr(ioaddr, 0) == 4 ++ && pcnet32_dwio_check(ioaddr)) { ++ a = &pcnet32_dwio; ++ } else ++ return 0; ++ } ++ ++ chip_version = ++ a->read_csr(ioaddr, 88) | (a->read_csr(ioaddr, 89) << 16); ++ ++ dprintf(("PCnet chip version is %0xhX\n", chip_version)); ++ if ((chip_version & 0xfff) != 0x003) ++ return 0; ++ ++ /* initialize variables */ ++ fdx = mii = fset = dxsuflo = ltint = 0; ++ chip_version = (chip_version >> 12) & 0xffff; ++ ++ switch (chip_version) { ++ case 0x2420: ++ chipname = "PCnet/PCI 79C970"; /* PCI */ ++ break; ++ case 0x2430: ++ if (shared) ++ chipname = "PCnet/PCI 79C970"; /* 970 gives the wrong chip id back */ ++ else ++ chipname = "PCnet/32 79C965"; /* 486/VL bus */ ++ break; ++ case 0x2621: ++ chipname = "PCnet/PCI II 79C970A"; /* PCI */ ++ fdx = 1; ++ break; ++ case 0x2623: ++ chipname = "PCnet/FAST 79C971"; /* PCI */ ++ fdx = 1; ++ mii = 1; ++ fset = 1; ++ ltint = 1; ++ break; ++ case 0x2624: ++ chipname = "PCnet/FAST+ 79C972"; /* PCI */ ++ fdx = 1; ++ mii = 1; ++ fset = 1; ++ break; ++ case 0x2625: ++ chipname = "PCnet/FAST III 79C973"; /* PCI */ ++ fdx = 1; ++ mii = 1; ++ break; ++ case 0x2626: ++ chipname = "PCnet/Home 79C978"; /* PCI */ ++ fdx = 1; ++ /* ++ * This is based on specs published at www.amd.com. This section ++ * assumes that a card with a 79C978 wants to go into 1Mb HomePNA ++ * mode. The 79C978 can also go into standard ethernet, and there ++ * probably should be some sort of module option to select the ++ * mode by which the card should operate ++ */ ++ /* switch to home wiring mode */ ++ media = a->read_bcr(ioaddr, 49); ++ ++ printf("media reset to %#x.\n", media); ++ a->write_bcr(ioaddr, 49, media); ++ break; ++ case 0x2627: ++ chipname = "PCnet/FAST III 79C975"; /* PCI */ ++ fdx = 1; ++ mii = 1; ++ break; ++ default: ++ printf("PCnet version %#x, no PCnet32 chip.\n", ++ chip_version); ++ return 0; ++ } ++ ++ /* ++ * On selected chips turn on the BCR18:NOUFLO bit. This stops transmit ++ * starting until the packet is loaded. Strike one for reliability, lose ++ * one for latency - although on PCI this isnt a big loss. Older chips ++ * have FIFO's smaller than a packet, so you can't do this. ++ */ ++ ++ if (fset) { ++ a->write_bcr(ioaddr, 18, ++ (a->read_bcr(ioaddr, 18) | 0x0800)); ++ a->write_csr(ioaddr, 80, ++ (a->read_csr(ioaddr, 80) & 0x0C00) | 0x0c00); ++ dxsuflo = 1; ++ ltint = 1; ++ } ++ ++ dprintf(("%s at %hX,", chipname, ioaddr)); ++ ++ /* read PROM address */ ++ for (i = 0; i < 6; i++) ++ promaddr[i] = inb(ioaddr + i); ++ ++ /* Update the nic structure with the MAC Address */ ++ for (i = 0; i < ETH_ALEN; i++) { ++ nic->node_addr[i] = promaddr[i]; ++ } ++ /* Print out some hardware info */ ++ printf("%s: %! at ioaddr %hX, ", pci->name, nic->node_addr, ++ ioaddr); ++ ++ /* Set to pci bus master */ ++ adjust_pci_device(pci); ++ ++ /* point to private storage */ ++ lp = &lpx; ++ ++#if EBDEBUG ++ if (((chip_version + 1) & 0xfffe) == 0x2624) { /* Version 0x2623 or 0x2624 */ ++ i = a->read_csr(ioaddr, 80) & 0x0C00; /* Check tx_start_pt */ ++ dprintf((" tx_start_pt(0x%hX):", i)); ++ switch (i >> 10) { ++ case 0: ++ dprintf((" 20 bytes,")); ++ break; ++ case 1: ++ dprintf((" 64 bytes,")); ++ break; ++ case 2: ++ dprintf((" 128 bytes,")); ++ break; ++ case 3: ++ dprintf(("~220 bytes,")); ++ break; ++ } ++ i = a->read_bcr(ioaddr, 18); /* Check Burst/Bus control */ ++ dprintf((" BCR18(%hX):", i & 0xffff)); ++ if (i & (1 << 5)) ++ dprintf(("BurstWrEn ")); ++ if (i & (1 << 6)) ++ dprintf(("BurstRdEn ")); ++ if (i & (1 << 7)) ++ dprintf(("DWordIO ")); ++ if (i & (1 << 11)) ++ dprintf(("NoUFlow ")); ++ i = a->read_bcr(ioaddr, 25); ++ dprintf((" SRAMSIZE=0x%hX,", i << 8)); ++ i = a->read_bcr(ioaddr, 26); ++ dprintf((" SRAM_BND=0x%hX,", i << 8)); ++ i = a->read_bcr(ioaddr, 27); ++ if (i & (1 << 14)) ++ dprintf(("LowLatRx")); ++ } ++#endif ++ lp->name = chipname; ++ lp->shared_irq = shared; ++ lp->full_duplex = fdx; ++ lp->dxsuflo = dxsuflo; ++ lp->ltint = ltint; ++ lp->mii = mii; ++ /* FIXME: Fix Options for only one card */ ++ if ((cards_found >= MAX_UNITS) ++ || ((unsigned int) options[cards_found] > sizeof(options_mapping))) ++ lp->options = PCNET32_PORT_ASEL; ++ else ++ lp->options = options_mapping[options[cards_found]]; ++ ++ if (fdx && !(lp->options & PCNET32_PORT_ASEL) && ++ ((cards_found >= MAX_UNITS) || full_duplex[cards_found])) ++ lp->options |= PCNET32_PORT_FD; ++ ++ if (!a) { ++ printf("No access methods\n"); ++ return 0; ++ } ++ lp->a = *a; ++ ++ /* detect special T1/E1 WAN card by checking for MAC address */ ++ if (nic->node_addr[0] == 0x00 && nic->node_addr[1] == 0xe0 ++ && nic->node_addr[2] == 0x75) ++ lp->options = PCNET32_PORT_FD | PCNET32_PORT_GPSI; ++ ++ lp->init_block.mode = le16_to_cpu(0x0003); /* Disable Rx and Tx. */ ++ lp->init_block.tlen_rlen = ++ le16_to_cpu(TX_RING_LEN_BITS | RX_RING_LEN_BITS); ++ for (i = 0; i < 6; i++) ++ lp->init_block.phys_addr[i] = nic->node_addr[i]; ++ lp->init_block.filter[0] = 0xffffffff; ++ lp->init_block.filter[1] = 0xffffffff; ++ lp->init_block.rx_ring = virt_to_bus(&rx_ring); ++ lp->init_block.tx_ring = virt_to_bus(&tx_ring); ++ ++ /* switch pcnet32 to 32bit mode */ ++ a->write_bcr(ioaddr, 20, 2); ++ ++ ++ a->write_csr(ioaddr, 1, (virt_to_bus(&lp->init_block)) & 0xffff); ++ a->write_csr(ioaddr, 2, (virt_to_bus(&lp->init_block)) >> 16); ++ ++ /* ++ * To auto-IRQ we enable the initialization-done and DMA error ++ * interrupts. For ISA boards we get a DMA error, but VLB and PCI ++ * boards will work. ++ */ ++ /* Trigger an initialization just for the interrupt. */ ++ ++ a->write_csr(ioaddr, 0, 0x41); ++ mdelay(1); ++ ++ cards_found++; ++ ++ /* point to NIC specific routines */ ++ pcnet32_reset(nic); ++ if (1) { ++ int tmp; ++ int phy, phy_idx = 0; ++ u16 mii_lpa; ++ lp->phys[0] = 1; /* Default Setting */ ++ for (phy = 1; phy < 32 && phy_idx < MII_CNT; phy++) { ++ int mii_status = mdio_read(nic, phy, MII_BMSR); ++ if (mii_status != 0xffff && mii_status != 0x0000) { ++ lp->phys[phy_idx++] = phy; ++ lp->mii_if.advertising = ++ mdio_read(nic, phy, MII_ADVERTISE); ++ if ((mii_status & 0x0040) == 0) { ++ tmp = phy; ++ dprintf (("MII PHY found at address %d, status " ++ "%hX advertising %hX\n", phy, mii_status, ++ lp->mii_if.advertising)); ++ } ++ } ++ } ++ if (phy_idx == 0) ++ printf("No MII transceiver found!\n"); ++ lp->mii_if.phy_id = lp->phys[0]; ++ ++ lp->mii_if.advertising = ++ mdio_read(nic, lp->phys[0], MII_ADVERTISE); ++ ++ mii_lpa = mdio_read(nic, lp->phys[0], MII_LPA); ++ lp->mii_if.advertising &= mii_lpa; ++ if (lp->mii_if.advertising & ADVERTISE_100FULL) ++ printf("100Mbps Full-Duplex\n"); ++ else if (lp->mii_if.advertising & ADVERTISE_100HALF) ++ printf("100Mbps Half-Duplex\n"); ++ else if (lp->mii_if.advertising & ADVERTISE_10FULL) ++ printf("10Mbps Full-Duplex\n"); ++ else if (lp->mii_if.advertising & ADVERTISE_10HALF) ++ printf("10Mbps Half-Duplex\n"); ++ else ++ printf("\n"); ++ } ++ ++ nic->poll = pcnet32_poll; ++ nic->transmit = pcnet32_transmit; ++ dev->disable = pcnet32_disable; ++ nic->irq = pcnet32_irq; ++ ++ return 1; ++} ++static int mdio_read(struct nic *nic __unused, int phy_id, int reg_num) ++{ ++ u16 val_out; ++ int phyaddr; ++ ++ if (!lp->mii) ++ return 0; ++ ++ phyaddr = lp->a.read_bcr(ioaddr, 33); ++ ++ lp->a.write_bcr(ioaddr, 33, ++ ((phy_id & 0x1f) << 5) | (reg_num & 0x1f)); ++ val_out = lp->a.read_bcr(ioaddr, 34); ++ lp->a.write_bcr(ioaddr, 33, phyaddr); ++ ++ return val_out; ++} ++ ++#if 0 ++static void mdio_write(struct nic *nic __unused, int phy_id, int reg_num, ++ int val) ++{ ++ int phyaddr; ++ ++ if (!lp->mii) ++ return; ++ ++ phyaddr = lp->a.read_bcr(ioaddr, 33); ++ ++ lp->a.write_bcr(ioaddr, 33, ++ ((phy_id & 0x1f) << 5) | (reg_num & 0x1f)); ++ lp->a.write_bcr(ioaddr, 34, val); ++ lp->a.write_bcr(ioaddr, 33, phyaddr); ++} ++#endif ++ ++static struct pci_id pcnet32_nics[] = { ++ PCI_ROM(0x1022, 0x2000, "lancepci", "AMD Lance/PCI"), ++ PCI_ROM(0x1022, 0x2625, "pcnetfastiii", "AMD Lance/PCI PCNet/32"), ++ PCI_ROM(0x1022, 0x2001, "amdhomepna", "AMD Lance/HomePNA"), ++}; ++ ++struct pci_driver pcnet32_driver = { ++ .type = NIC_DRIVER, ++ .name = "PCNET32/PCI", ++ .probe = pcnet32_probe, ++ .ids = pcnet32_nics, ++ .id_count = sizeof(pcnet32_nics) / sizeof(pcnet32_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/pic8259.c +=================================================================== +--- /dev/null ++++ b/netboot/pic8259.c +@@ -0,0 +1,267 @@ ++/* ++ * Basic support for controlling the 8259 Programmable Interrupt Controllers. ++ * ++ * Initially written by Michael Brown (mcb30). ++ */ ++ ++#include ++#include ++ ++#ifdef DEBUG_IRQ ++#define DBG(...) printf ( __VA_ARGS__ ) ++#else ++#define DBG(...) ++#endif ++ ++/* Current locations of trivial IRQ handler. These will change at ++ * runtime when relocation is used; the handler needs to be copied to ++ * base memory before being installed. ++ */ ++void (*trivial_irq_handler)P((void)) = _trivial_irq_handler; ++uint16_t volatile *trivial_irq_trigger_count = &_trivial_irq_trigger_count; ++segoff_t *trivial_irq_chain_to = &_trivial_irq_chain_to; ++uint8_t *trivial_irq_chain = &_trivial_irq_chain; ++irq_t trivial_irq_installed_on = IRQ_NONE; ++ ++/* Previous trigger count for trivial IRQ handler */ ++static uint16_t trivial_irq_previous_trigger_count = 0; ++ ++/* Install a handler for the specified IRQ. Address of previous ++ * handler will be stored in previous_handler. Enabled/disabled state ++ * of IRQ will be preserved across call, therefore if the handler does ++ * chaining, ensure that either (a) IRQ is disabled before call, or ++ * (b) previous_handler points directly to the place that the handler ++ * picks up its chain-to address. ++ */ ++ ++int install_irq_handler ( irq_t irq, segoff_t *handler, ++ uint8_t *previously_enabled, ++ segoff_t *previous_handler ) { ++ segoff_t *irq_vector = IRQ_VECTOR ( irq ); ++ *previously_enabled = irq_enabled ( irq ); ++ ++ if ( irq > IRQ_MAX ) { ++ DBG ( "Invalid IRQ number %d\n" ); ++ return 0; ++ } ++ ++ previous_handler->segment = irq_vector->segment; ++ previous_handler->offset = irq_vector->offset; ++ if ( *previously_enabled ) disable_irq ( irq ); ++ DBG ( "Installing handler at %hx:%hx for IRQ %d, leaving %s\n", ++ handler->segment, handler->offset, irq, ++ ( *previously_enabled ? "enabled" : "disabled" ) ); ++ DBG ( "...(previous handler at %hx:%hx)\n", ++ previous_handler->segment, previous_handler->offset ); ++ irq_vector->segment = handler->segment; ++ irq_vector->offset = handler->offset; ++ if ( *previously_enabled ) enable_irq ( irq ); ++ return 1; ++} ++ ++/* Remove handler for the specified IRQ. Routine checks that another ++ * handler has not been installed that chains to handler before ++ * uninstalling handler. Enabled/disabled state of the IRQ will be ++ * restored to that specified by previously_enabled. ++ */ ++ ++int remove_irq_handler ( irq_t irq, segoff_t *handler, ++ uint8_t *previously_enabled, ++ segoff_t *previous_handler ) { ++ segoff_t *irq_vector = IRQ_VECTOR ( irq ); ++ ++ if ( irq > IRQ_MAX ) { ++ DBG ( "Invalid IRQ number %d\n" ); ++ return 0; ++ } ++ if ( ( irq_vector->segment != handler->segment ) || ++ ( irq_vector->offset != handler->offset ) ) { ++ DBG ( "Cannot remove handler for IRQ %d\n" ); ++ return 0; ++ } ++ ++ DBG ( "Removing handler for IRQ %d\n", irq ); ++ disable_irq ( irq ); ++ irq_vector->segment = previous_handler->segment; ++ irq_vector->offset = previous_handler->offset; ++ if ( *previously_enabled ) enable_irq ( irq ); ++ return 1; ++} ++ ++/* Install the trivial IRQ handler. This routine installs the ++ * handler, tests it and enables the IRQ. ++ */ ++ ++int install_trivial_irq_handler ( irq_t irq ) { ++ segoff_t trivial_irq_handler_segoff = SEGOFF(trivial_irq_handler); ++ ++ if ( trivial_irq_installed_on != IRQ_NONE ) { ++ DBG ( "Can install trivial IRQ handler only once\n" ); ++ return 0; ++ } ++ if ( SEGMENT(trivial_irq_handler) > 0xffff ) { ++ DBG ( "Trivial IRQ handler not in base memory\n" ); ++ return 0; ++ } ++ ++ DBG ( "Installing trivial IRQ handler on IRQ %d\n", irq ); ++ if ( ! install_irq_handler ( irq, &trivial_irq_handler_segoff, ++ trivial_irq_chain, ++ trivial_irq_chain_to ) ) ++ return 0; ++ trivial_irq_installed_on = irq; ++ ++ DBG ( "Testing trivial IRQ handler\n" ); ++ disable_irq ( irq ); ++ *trivial_irq_trigger_count = 0; ++ trivial_irq_previous_trigger_count = 0; ++ fake_irq ( irq ); ++ if ( ! trivial_irq_triggered ( irq ) ) { ++ DBG ( "Installation of trivial IRQ handler failed\n" ); ++ remove_trivial_irq_handler ( irq ); ++ return 0; ++ } ++ DBG ( "Trivial IRQ handler installed successfully\n" ); ++ enable_irq ( irq ); ++ return 1; ++} ++ ++/* Remove the trivial IRQ handler. ++ */ ++ ++int remove_trivial_irq_handler ( irq_t irq ) { ++ segoff_t trivial_irq_handler_segoff = SEGOFF(trivial_irq_handler); ++ ++ if ( trivial_irq_installed_on == IRQ_NONE ) return 1; ++ if ( irq != trivial_irq_installed_on ) { ++ DBG ( "Cannot uninstall trivial IRQ handler from IRQ %d; " ++ "is installed on IRQ %d\n", irq, ++ trivial_irq_installed_on ); ++ return 0; ++ } ++ ++ if ( ! remove_irq_handler ( irq, &trivial_irq_handler_segoff, ++ trivial_irq_chain, ++ trivial_irq_chain_to ) ) ++ return 0; ++ ++ if ( trivial_irq_triggered ( trivial_irq_installed_on ) ) { ++ DBG ( "Sending EOI for unwanted trivial IRQ\n" ); ++ send_specific_eoi ( trivial_irq_installed_on ); ++ } ++ ++ trivial_irq_installed_on = IRQ_NONE; ++ return 1; ++} ++ ++/* Safe method to detect whether or not trivial IRQ has been ++ * triggered. Using this call avoids potential race conditions. This ++ * call will return success only once per trigger. ++ */ ++ ++int trivial_irq_triggered ( irq_t irq ) { ++ uint16_t trivial_irq_this_trigger_count = *trivial_irq_trigger_count; ++ int triggered = ( trivial_irq_this_trigger_count - ++ trivial_irq_previous_trigger_count ); ++ ++ /* irq is not used at present, but we have it in the API for ++ * future-proofing; in case we want the facility to have ++ * multiple trivial IRQ handlers installed simultaneously. ++ * ++ * Avoid compiler warning about unused variable. ++ */ ++ if ( irq == IRQ_NONE ) {}; ++ ++ trivial_irq_previous_trigger_count = trivial_irq_this_trigger_count; ++ return triggered ? 1 : 0; ++} ++ ++/* Copy trivial IRQ handler to a new location. Typically used to copy ++ * the handler into base memory; when relocation is being used we need ++ * to do this before installing the handler. ++ * ++ * Call with target=NULL in order to restore the handler to its ++ * original location. ++ */ ++ ++int copy_trivial_irq_handler ( void *target, size_t target_size ) { ++ irq_t currently_installed_on = trivial_irq_installed_on; ++ uint32_t offset = ( target == NULL ? 0 : ++ target - &_trivial_irq_handler_start ); ++ ++ if (( target != NULL ) && ( target_size < TRIVIAL_IRQ_HANDLER_SIZE )) { ++ DBG ( "Insufficient space to copy trivial IRQ handler\n" ); ++ return 0; ++ } ++ ++ if ( currently_installed_on != IRQ_NONE ) { ++ DBG ("WARNING: relocating trivial IRQ handler while in use\n"); ++ if ( ! remove_trivial_irq_handler ( currently_installed_on ) ) ++ return 0; ++ } ++ ++ /* Do the actual copy */ ++ if ( target != NULL ) { ++ DBG ( "Copying trivial IRQ handler to %hx:%hx\n", ++ SEGMENT(target), OFFSET(target) ); ++ memcpy ( target, &_trivial_irq_handler_start, ++ TRIVIAL_IRQ_HANDLER_SIZE ); ++ } else { ++ DBG ( "Restoring trivial IRQ handler to original location\n" ); ++ } ++ /* Update all the pointers to structures within the handler */ ++ trivial_irq_handler = ( void (*)P((void)) ) ++ ( (void*)_trivial_irq_handler + offset ); ++ trivial_irq_trigger_count = (uint16_t*) ++ ( (void*)&_trivial_irq_trigger_count + offset ); ++ trivial_irq_chain_to = (segoff_t*) ++ ( (void*)&_trivial_irq_chain_to + offset ); ++ trivial_irq_chain = (uint8_t*) ++ ( (void*)&_trivial_irq_chain + offset ); ++ ++ if ( currently_installed_on != IRQ_NONE ) { ++ if ( ! install_trivial_irq_handler ( currently_installed_on ) ) ++ return 0; ++ } ++ return 1; ++} ++ ++/* Send non-specific EOI(s). This seems to be inherently unsafe. ++ */ ++ ++void send_nonspecific_eoi ( irq_t irq ) { ++ DBG ( "Sending non-specific EOI for IRQ %d\n", irq ); ++ if ( irq >= IRQ_PIC_CUTOFF ) { ++ outb ( ICR_EOI_NON_SPECIFIC, PIC2_ICR ); ++ } ++ outb ( ICR_EOI_NON_SPECIFIC, PIC1_ICR ); ++} ++ ++/* Send specific EOI(s). ++ */ ++ ++void send_specific_eoi ( irq_t irq ) { ++ DBG ( "Sending specific EOI for IRQ %d\n", irq ); ++ outb ( ICR_EOI_SPECIFIC | ICR_VALUE(irq), ICR_REG(irq) ); ++ if ( irq >= IRQ_PIC_CUTOFF ) { ++ outb ( ICR_EOI_SPECIFIC | ICR_VALUE(CHAINED_IRQ), ++ ICR_REG(CHAINED_IRQ) ); ++ } ++} ++ ++/* Dump current 8259 status: enabled IRQs and handler addresses. ++ */ ++ ++#ifdef DEBUG_IRQ ++void dump_irq_status ( void ) { ++ int irq = 0; ++ ++ for ( irq = 0; irq < 16; irq++ ) { ++ if ( irq_enabled ( irq ) ) { ++ printf ( "IRQ%d enabled, ISR at %hx:%hx\n", irq, ++ IRQ_VECTOR(irq)->segment, ++ IRQ_VECTOR(irq)->offset ); ++ } ++ } ++} ++#endif +Index: b/netboot/pic8259.h +=================================================================== +--- /dev/null ++++ b/netboot/pic8259.h +@@ -0,0 +1,99 @@ ++/* ++ * Basic support for controlling the 8259 Programmable Interrupt Controllers. ++ * ++ * Initially written by Michael Brown (mcb30). ++ */ ++ ++#ifndef PIC8259_H ++#define PIC8259_H ++ ++/* For segoff_t */ ++#include ++ ++#define IRQ_PIC_CUTOFF (8) ++ ++/* 8259 register locations */ ++#define PIC1_ICW1 (0x20) ++#define PIC1_OCW2 (0x20) ++#define PIC1_OCW3 (0x20) ++#define PIC1_ICR (0x20) ++#define PIC1_IRR (0x20) ++#define PIC1_ISR (0x20) ++#define PIC1_ICW2 (0x21) ++#define PIC1_ICW3 (0x21) ++#define PIC1_ICW4 (0x21) ++#define PIC1_IMR (0x21) ++#define PIC2_ICW1 (0xa0) ++#define PIC2_OCW2 (0xa0) ++#define PIC2_OCW3 (0xa0) ++#define PIC2_ICR (0xa0) ++#define PIC2_IRR (0xa0) ++#define PIC2_ISR (0xa0) ++#define PIC2_ICW2 (0xa1) ++#define PIC2_ICW3 (0xa1) ++#define PIC2_ICW4 (0xa1) ++#define PIC2_IMR (0xa1) ++ ++/* Register command values */ ++#define OCW3_ID (0x08) ++#define OCW3_READ_IRR (0x03) ++#define OCW3_READ_ISR (0x02) ++#define ICR_EOI_NON_SPECIFIC (0x20) ++#define ICR_EOI_NOP (0x40) ++#define ICR_EOI_SPECIFIC (0x60) ++#define ICR_EOI_SET_PRIORITY (0xc0) ++ ++/* Macros to enable/disable IRQs */ ++#define IMR_REG(x) ( (x) < IRQ_PIC_CUTOFF ? PIC1_IMR : PIC2_IMR ) ++#define IMR_BIT(x) ( 1 << ( (x) % IRQ_PIC_CUTOFF ) ) ++#define irq_enabled(x) ( ( inb ( IMR_REG(x) ) & IMR_BIT(x) ) == 0 ) ++#define enable_irq(x) outb ( inb( IMR_REG(x) ) & ~IMR_BIT(x), IMR_REG(x) ) ++#define disable_irq(x) outb ( inb( IMR_REG(x) ) | IMR_BIT(x), IMR_REG(x) ) ++ ++/* Macros for acknowledging IRQs */ ++#define ICR_REG(x) ( (x) < IRQ_PIC_CUTOFF ? PIC1_ICR : PIC2_ICR ) ++#define ICR_VALUE(x) ( (x) % IRQ_PIC_CUTOFF ) ++#define CHAINED_IRQ 2 ++ ++/* Utility macros to convert IRQ numbers to INT numbers and INT vectors */ ++#define IRQ_INT(x) ( (x)ioaddr + PNIC_REG_LEN ); ++ /* Write input data */ ++ for ( i = 0; i < input_length; i++ ) { ++ outb( ((char*)input)[i], nic->ioaddr + PNIC_REG_DATA ); ++ } ++ } ++ /* Write command */ ++ outw ( command, nic->ioaddr + PNIC_REG_CMD ); ++ /* Retrieve status */ ++ status = inw ( nic->ioaddr + PNIC_REG_STAT ); ++ /* Retrieve output length */ ++ _output_length = inw ( nic->ioaddr + PNIC_REG_LEN ); ++ if ( output_length == NULL ) { ++ if ( _output_length != output_max_length ) { ++ printf ( "pnic_command %#hx: wrong data length " ++ "returned (expected %d, got %d)\n", command, ++ output_max_length, _output_length ); ++ } ++ } else { ++ *output_length = _output_length; ++ } ++ if ( output != NULL ) { ++ if ( _output_length > output_max_length ) { ++ printf ( "pnic_command %#hx: output buffer too small " ++ "(have %d, need %d)\n", command, ++ output_max_length, _output_length ); ++ _output_length = output_max_length; ++ } ++ /* Retrieve output data */ ++ for ( i = 0; i < _output_length; i++ ) { ++ ((char*)output)[i] = ++ inb ( nic->ioaddr + PNIC_REG_DATA ); ++ } ++ } ++ return status; ++} ++ ++static uint16_t pnic_command ( struct nic *nic, uint16_t command, ++ void *input, uint16_t input_length, ++ void *output, uint16_t output_max_length, ++ uint16_t *output_length ) { ++ pnic_priv_data_t *priv = (pnic_priv_data_t*)nic->priv_data; ++ uint16_t status = pnic_command_quiet ( nic, command, ++ input, input_length, ++ output, output_max_length, ++ output_length ); ++ if ( status == PNIC_STATUS_OK ) return status; ++ printf ( "PNIC command %#hx (len %#hx) failed with status %#hx\n", ++ command, input_length, status ); ++ if ( priv->api_version ) pnic_api_check(priv->api_version); ++ return status; ++} ++ ++/* Check API version matches that of NIC */ ++static int pnic_api_check ( uint16_t api_version ) { ++ if ( api_version != PNIC_API_VERSION ) { ++ printf ( "Warning: API version mismatch! " ++ "(NIC's is %d.%d, ours is %d.%d)\n", ++ api_version >> 8, api_version & 0xff, ++ PNIC_API_VERSION >> 8, PNIC_API_VERSION & 0xff ); ++ } ++ if ( api_version < PNIC_API_VERSION ) { ++ printf ( "*** You may need to update your copy of Bochs ***\n" ); ++ } ++ return ( api_version == PNIC_API_VERSION ); ++} ++ ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int pnic_poll(struct nic *nic, int retrieve) ++{ ++ uint16_t length; ++ uint16_t qlen; ++ ++ /* Check receive queue length to see if there's anything to ++ * get. Necessary since once we've called PNIC_CMD_RECV we ++ * have to read out the packet, otherwise it's lost forever. ++ */ ++ if ( pnic_command ( nic, PNIC_CMD_RECV_QLEN, NULL, 0, ++ &qlen, sizeof(qlen), NULL ) ++ != PNIC_STATUS_OK ) return ( 0 ); ++ if ( qlen == 0 ) return ( 0 ); ++ ++ /* There is a packet ready. Return 1 if we're only checking. */ ++ if ( ! retrieve ) return ( 1 ); ++ ++ /* Retrieve the packet */ ++ if ( pnic_command ( nic, PNIC_CMD_RECV, NULL, 0, ++ nic->packet, ETH_FRAME_LEN, &length ) ++ != PNIC_STATUS_OK ) return ( 0 ); ++ nic->packetlen = length; ++ return ( 1 ); ++} ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void pnic_transmit( ++ struct nic *nic, ++ const char *dest, /* Destination */ ++ unsigned int type, /* Type */ ++ unsigned int size, /* size */ ++ const char *data) /* Packet */ ++{ ++ unsigned int nstype = htons ( type ); ++ ++ if ( ( ETH_HLEN + size ) >= ETH_FRAME_LEN ) { ++ printf ( "pnic_transmit: packet too large\n" ); ++ return; ++ } ++ ++ /* Assemble packet */ ++ memcpy ( tx_buffer, dest, ETH_ALEN ); ++ memcpy ( tx_buffer + ETH_ALEN, nic->node_addr, ETH_ALEN ); ++ memcpy ( tx_buffer + 2 * ETH_ALEN, &nstype, 2 ); ++ memcpy ( tx_buffer + ETH_HLEN, data, size ); ++ ++ pnic_command ( nic, PNIC_CMD_XMIT, tx_buffer, ETH_HLEN + size, ++ NULL, 0, NULL ); ++} ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void pnic_disable(struct dev *dev) ++{ ++ struct nic *nic = (struct nic *)dev; ++ pnic_command ( nic, PNIC_CMD_RESET, NULL, 0, NULL, 0, NULL ); ++} ++ ++/************************************************************************** ++IRQ - Handle card interrupt status ++***************************************************************************/ ++static void pnic_irq ( struct nic *nic, irq_action_t action ) ++{ ++ uint8_t enabled; ++ ++ switch ( action ) { ++ case DISABLE : ++ case ENABLE : ++ enabled = ( action == ENABLE ? 1 : 0 ); ++ pnic_command ( nic, PNIC_CMD_MASK_IRQ, ++ &enabled, sizeof(enabled), NULL, 0, NULL ); ++ break; ++ case FORCE : ++ pnic_command ( nic, PNIC_CMD_FORCE_IRQ, ++ NULL, 0, NULL, 0, NULL ); ++ break; ++ } ++} ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++***************************************************************************/ ++ ++static int pnic_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *)dev; ++ static pnic_priv_data_t priv; ++ uint16_t status; ++ ++ printf(" - "); ++ ++ /* Clear private data structure and chain it in */ ++ memset ( &priv, 0, sizeof(priv) ); ++ nic->priv_data = &priv; ++ ++ /* Mask the bit that says "this is an io addr" */ ++ nic->ioaddr = pci->ioaddr & ~3; ++ nic->irqno = pci->irq; ++ /* Not sure what this does, but the rtl8139 driver does it */ ++ adjust_pci_device(pci); ++ ++ status = pnic_command_quiet( nic, PNIC_CMD_API_VER, NULL, 0, ++ &priv.api_version, ++ sizeof(priv.api_version), NULL ); ++ if ( status != PNIC_STATUS_OK ) { ++ printf ( "PNIC failed installation check, code %#hx\n", ++ status ); ++ return 0; ++ } ++ pnic_api_check(priv.api_version); ++ status = pnic_command ( nic, PNIC_CMD_READ_MAC, NULL, 0, ++ nic->node_addr, ETH_ALEN, NULL ); ++ printf ( "Detected Bochs Pseudo NIC MAC %! (API v%d.%d) at %#hx\n", ++ nic->node_addr, priv.api_version>>8, priv.api_version&0xff, ++ nic->ioaddr ); ++ ++ /* point to NIC specific routines */ ++ dev->disable = pnic_disable; ++ nic->poll = pnic_poll; ++ nic->transmit = pnic_transmit; ++ nic->irq = pnic_irq; ++ return 1; ++} ++ ++static struct pci_id pnic_nics[] = { ++/* genrules.pl doesn't let us use macros for PCI IDs...*/ ++PCI_ROM(0xfefe, 0xefef, "pnic", "Bochs Pseudo NIC Adaptor"), ++}; ++ ++struct pci_driver pnic_driver = { ++ .type = NIC_DRIVER, ++ .name = "PNIC", ++ .probe = pnic_probe, ++ .ids = pnic_nics, ++ .id_count = sizeof(pnic_nics)/sizeof(pnic_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/pnic_api.h +=================================================================== +--- /dev/null ++++ b/netboot/pnic_api.h +@@ -0,0 +1,59 @@ ++/* ++ * Constants etc. for the Bochs/Etherboot pseudo-NIC ++ * ++ * This header file must be valid C and C++. ++ * ++ * Operation of the pseudo-NIC (PNIC) is pretty simple. To write a ++ * command plus data, first write the length of the data to ++ * PNIC_REG_LEN, then write the data a byte at a type to ++ * PNIC_REG_DATA, then write the command code to PNIC_REG_CMD. The ++ * status will be available from PNIC_REG_STAT. The length of any ++ * data returned will be in PNIC_REG_LEN and can be read a byte at a ++ * time from PNIC_REG_DATA. ++ */ ++ ++/* ++ * PCI parameters ++ */ ++#define PNIC_PCI_VENDOR 0xfefe /* Hopefully these won't clash with */ ++#define PNIC_PCI_DEVICE 0xefef /* any real PCI device IDs. */ ++ ++/* ++ * 'Hardware' register addresses, offset from io_base ++ */ ++#define PNIC_REG_CMD 0x00 /* Command register, 2 bytes, write only */ ++#define PNIC_REG_STAT 0x00 /* Status register, 2 bytes, read only */ ++#define PNIC_REG_LEN 0x02 /* Length register, 2 bytes, read-write */ ++#define PNIC_REG_DATA 0x04 /* Data port, 1 byte, read-write */ ++/* ++ * PNIC_MAX_REG used in Bochs to claim i/o space ++ */ ++#define PNIC_MAX_REG 0x04 ++ ++/* ++ * Command code definitions: write these into PNIC_REG_CMD ++ */ ++#define PNIC_CMD_NOOP 0x0000 ++#define PNIC_CMD_API_VER 0x0001 ++#define PNIC_CMD_READ_MAC 0x0002 ++#define PNIC_CMD_RESET 0x0003 ++#define PNIC_CMD_XMIT 0x0004 ++#define PNIC_CMD_RECV 0x0005 ++#define PNIC_CMD_RECV_QLEN 0x0006 ++#define PNIC_CMD_MASK_IRQ 0x0007 ++#define PNIC_CMD_FORCE_IRQ 0x0008 ++ ++/* ++ * Status code definitions: read these from PNIC_REG_STAT ++ * ++ * We avoid using status codes that might be confused with ++ * randomly-read data (e.g. 0x0000, 0xffff etc.) ++ */ ++#define PNIC_STATUS_OK 0x4f4b /* 'OK' */ ++#define PNIC_STATUS_UNKNOWN_CMD 0x3f3f /* '??' */ ++ ++/* ++ * Other miscellaneous information ++ */ ++ ++#define PNIC_API_VERSION 0x0101 /* 1.1 */ +Index: b/netboot/pxe.h +=================================================================== +--- /dev/null ++++ b/netboot/pxe.h +@@ -0,0 +1,521 @@ ++/* ++ * Copyright (c) 2000 Alfred Perlstein ++ * All rights reserved. ++ * Copyright (c) 2000 Paul Saab ++ * All rights reserved. ++ * Copyright (c) 2000 John Baldwin ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ * $FreeBSD: src/sys/boot/i386/libi386/pxe.h,v 1.4.2.2 2000/09/10 02:52:18 ps Exp $ ++ */ ++ ++/* ++ * The typedefs and structures declared in this file ++ * clearly violate style(9), the reason for this is to conform to the ++ * typedefs/structure-names used in the Intel literature to avoid confusion. ++ * ++ * It's for your own good. :) ++ */ ++ ++/* SEGOFF16_t defined in separate header for Etherboot ++ */ ++#include ++ ++/* It seems that intel didn't think about ABI, ++ * either that or 16bit ABI != 32bit ABI (which seems reasonable) ++ * I have to thank Intel for the hair loss I incurred trying to figure ++ * out why PXE was mis-reading structures I was passing it (at least ++ * from my point of view) ++ * ++ * Solution: use gcc's '__attribute__ ((packed))' to correctly align ++ * structures passed into PXE ++ * Question: does this really work for PXE's expected ABI? ++ */ ++#define PACKED __attribute__ ((packed)) ++ ++#define S_SIZE(s) s, sizeof(s) - 1 ++ ++#define IP_STR "%d.%d.%d.%d" ++#define IP_ARGS(ip) \ ++ (int)(ip >> 24) & 0xff, (int)(ip >> 16) & 0xff, \ ++ (int)(ip >> 8) & 0xff, (int)ip & 0xff ++ ++#define MAC_STR "%02x:%02x:%02x:%02x:%02x:%02x" ++#define MAC_ARGS(mac) \ ++ mac[0], mac[1], mac[2], mac[3], mac[4], mac[5] ++ ++#define PXENFSROOTPATH "/pxeroot" ++ ++typedef struct { ++ uint16_t Seg_Addr; ++ uint32_t Phy_Addr; ++ uint16_t Seg_Size; ++} PACKED SEGDESC_t; /* PACKED is required, otherwise gcc pads this out to 12 ++ bytes - mbrown@fensystems.co.uk (mcb30) 17/5/03 */ ++ ++typedef uint16_t SEGSEL_t; ++typedef uint16_t PXENV_STATUS_t; ++typedef uint32_t IP4_t; ++typedef uint32_t ADDR32_t; ++typedef uint16_t UDP_PORT_t; ++ ++#define MAC_ADDR_LEN 16 ++typedef uint8_t MAC_ADDR[MAC_ADDR_LEN]; ++ ++/* PXENV+ */ ++typedef struct { ++ uint8_t Signature[6]; /* 'PXENV+' */ ++ uint16_t Version; /* MSB = major, LSB = minor */ ++ uint8_t Length; /* structure length */ ++ uint8_t Checksum; /* checksum pad */ ++ SEGOFF16_t RMEntry; /* SEG:OFF to PXE entry point */ ++ /* don't use PMOffset and PMSelector (from the 2.1 PXE manual) */ ++ uint32_t PMOffset; /* Protected mode entry */ ++ SEGSEL_t PMSelector; /* Protected mode selector */ ++ SEGSEL_t StackSeg; /* Stack segment address */ ++ uint16_t StackSize; /* Stack segment size (bytes) */ ++ SEGSEL_t BC_CodeSeg; /* BC Code segment address */ ++ uint16_t BC_CodeSize; /* BC Code segment size (bytes) */ ++ SEGSEL_t BC_DataSeg; /* BC Data segment address */ ++ uint16_t BC_DataSize; /* BC Data segment size (bytes) */ ++ SEGSEL_t UNDIDataSeg; /* UNDI Data segment address */ ++ uint16_t UNDIDataSize; /* UNDI Data segment size (bytes) */ ++ SEGSEL_t UNDICodeSeg; /* UNDI Code segment address */ ++ uint16_t UNDICodeSize; /* UNDI Code segment size (bytes) */ ++ SEGOFF16_t PXEPtr; /* SEG:OFF to !PXE struct, ++ only present when Version > 2.1 */ ++} PACKED pxenv_t; ++ ++/* !PXE */ ++typedef struct { ++ uint8_t Signature[4]; ++ uint8_t StructLength; ++ uint8_t StructCksum; ++ uint8_t StructRev; ++ uint8_t reserved_1; ++ SEGOFF16_t UNDIROMID; ++ SEGOFF16_t BaseROMID; ++ SEGOFF16_t EntryPointSP; ++ SEGOFF16_t EntryPointESP; ++ SEGOFF16_t StatusCallout; ++ uint8_t reserved_2; ++ uint8_t SegDescCn; ++ SEGSEL_t FirstSelector; ++ SEGDESC_t Stack; ++ SEGDESC_t UNDIData; ++ SEGDESC_t UNDICode; ++ SEGDESC_t UNDICodeWrite; ++ SEGDESC_t BC_Data; ++ SEGDESC_t BC_Code; ++ SEGDESC_t BC_CodeWrite; ++} PACKED pxe_t; ++ ++#define PXENV_START_UNDI 0x0000 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint16_t ax; ++ uint16_t bx; ++ uint16_t dx; ++ uint16_t di; ++ uint16_t es; ++} PACKED t_PXENV_START_UNDI; ++ ++#define PXENV_UNDI_STARTUP 0x0001 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_STARTUP; ++ ++#define PXENV_UNDI_CLEANUP 0x0002 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_CLEANUP; ++ ++#define PXENV_UNDI_INITIALIZE 0x0003 ++typedef struct { ++ PXENV_STATUS_t Status; ++ ADDR32_t ProtocolIni; /* Phys addr of a copy of the driver module */ ++ uint8_t reserved[8]; ++} PACKED t_PXENV_UNDI_INITIALIZE; ++ ++ ++#define MAXNUM_MCADDR 8 ++typedef struct { ++ uint16_t MCastAddrCount; ++ MAC_ADDR McastAddr[MAXNUM_MCADDR]; ++} PACKED t_PXENV_UNDI_MCAST_ADDRESS; ++ ++#define PXENV_UNDI_RESET_ADAPTER 0x0004 ++typedef struct { ++ PXENV_STATUS_t Status; ++ t_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf; ++} PACKED t_PXENV_UNDI_RESET; ++ ++#define PXENV_UNDI_SHUTDOWN 0x0005 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_SHUTDOWN; ++ ++#define PXENV_UNDI_OPEN 0x0006 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint16_t OpenFlag; ++ uint16_t PktFilter; ++# define FLTR_DIRECTED 0x0001 ++# define FLTR_BRDCST 0x0002 ++# define FLTR_PRMSCS 0x0003 ++# define FLTR_SRC_RTG 0x0004 ++ ++ t_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf; ++} PACKED t_PXENV_UNDI_OPEN; ++ ++#define PXENV_UNDI_CLOSE 0x0007 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_CLOSE; ++ ++#define PXENV_UNDI_TRANSMIT 0x0008 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint8_t Protocol; ++# define P_UNKNOWN 0 ++# define P_IP 1 ++# define P_ARP 2 ++# define P_RARP 3 ++ ++ uint8_t XmitFlag; ++# define XMT_DESTADDR 0x0000 ++# define XMT_BROADCAST 0x0001 ++ ++ SEGOFF16_t DestAddr; ++ SEGOFF16_t TBD; ++ uint32_t Reserved[2]; ++} PACKED t_PXENV_UNDI_TRANSMIT; ++ ++#define MAX_DATA_BLKS 8 ++typedef struct { ++ uint16_t ImmedLength; ++ SEGOFF16_t Xmit; ++ uint16_t DataBlkCount; ++ struct DataBlk { ++ uint8_t TDPtrType; ++ uint8_t TDRsvdByte; ++ uint16_t TDDataLen; ++ SEGOFF16_t TDDataPtr; ++ } DataBlock[MAX_DATA_BLKS]; ++} PACKED t_PXENV_UNDI_TBD; ++ ++#define PXENV_UNDI_SET_MCAST_ADDRESS 0x0009 ++typedef struct { ++ PXENV_STATUS_t Status; ++ t_PXENV_UNDI_MCAST_ADDRESS R_Mcast_Buf; ++} PACKED t_PXENV_UNDI_SET_MCAST_ADDR; ++ ++#define PXENV_UNDI_SET_STATION_ADDRESS 0x000A ++typedef struct { ++ PXENV_STATUS_t Status; ++ MAC_ADDR StationAddress; /* Temp MAC addres to use */ ++} PACKED t_PXENV_UNDI_SET_STATION_ADDRESS; ++ ++#define PXENV_UNDI_SET_PACKET_FILTER 0x000B ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint8_t filter; /* see UNDI_OPEN (0x0006) */ ++} PACKED t_PXENV_UNDI_SET_PACKET_FILTER; ++ ++#define PXENV_UNDI_GET_INFORMATION 0x000C ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint16_t BaseIo; /* Adapter base I/O address */ ++ uint16_t IntNumber; /* Adapter IRQ number */ ++ uint16_t MaxTranUnit; /* Adapter maximum transmit unit */ ++ uint16_t HwType; /* Type of protocol at the hardware addr */ ++# define ETHER_TYPE 1 ++# define EXP_ETHER_TYPE 2 ++# define IEEE_TYPE 6 ++# define ARCNET_TYPE 7 ++ ++ uint16_t HwAddrLen; /* Length of hardware address */ ++ MAC_ADDR CurrentNodeAddress; /* Current hardware address */ ++ MAC_ADDR PermNodeAddress; /* Permanent hardware address */ ++ SEGSEL_t ROMAddress; /* Real mode ROM segment address */ ++ uint16_t RxBufCt; /* Receive queue length */ ++ uint16_t TxBufCt; /* Transmit queue length */ ++} PACKED t_PXENV_UNDI_GET_INFORMATION; ++ ++#define PXENV_UNDI_GET_STATISTICS 0x000D ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint32_t XmitGoodFrames; /* Number of successful transmissions */ ++ uint32_t RcvGoodFrames; /* Number of good frames received */ ++ uint32_t RcvCRCErrors; /* Number of frames with CRC errors */ ++ uint32_t RcvResourceErrors; /* Number of frames dropped */ ++} PACKED t_PXENV_UNDI_GET_STATISTICS; ++ ++#define PXENV_UNDI_CLEAR_STATISTICS 0x000E ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_CLEAR_STATISTICS; ++ ++#define PXENV_UNDI_INITIATE_DIAGS 0x000F ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_INITIATE_DIAGS; ++ ++#define PXENV_UNDI_FORCE_INTERRUPT 0x0010 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_UNDI_FORCE_INTERRUPT; ++ ++#define PXENV_UNDI_GET_MCAST_ADDRESS 0x0011 ++typedef struct { ++ PXENV_STATUS_t Status; ++ IP4_t InetAddr; /* IP mulicast address */ ++ MAC_ADDR MediaAddr; /* MAC multicast address */ ++} PACKED t_PXENV_UNDI_GET_MCAST_ADDR; ++ ++#define PXENV_UNDI_GET_NIC_TYPE 0x0012 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint8_t NicType; /* Type of NIC */ ++# define PCI_NIC 2 ++# define PnP_NIC 3 ++# define CardBus_NIC 4 ++ ++ union { ++ struct { ++ uint16_t Vendor_ID; ++ uint16_t Dev_ID; ++ uint8_t Base_Class; ++ uint8_t Sub_Class; ++ uint8_t Prog_Intf; ++ uint8_t Rev; ++ uint16_t BusDevFunc; ++ uint16_t SubVendor_ID; ++ uint16_t SubDevice_ID; ++ } pci, cardbus; ++ struct { ++ uint32_t EISA_Dev_ID; ++ uint8_t Base_Class; ++ uint8_t Sub_Class; ++ uint8_t Prog_Intf; ++ uint16_t CardSelNum; ++ } pnp; ++ } info; ++} PACKED t_PXENV_UNDI_GET_NIC_TYPE; ++ ++#define PXENV_UNDI_GET_IFACE_INFO 0x0013 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint8_t IfaceType[16]; /* Name of MAC type in ASCII. */ ++ uint32_t LinkSpeed; /* Defined in NDIS 2.0 spec */ ++ uint32_t ServiceFlags; /* Defined in NDIS 2.0 spec */ ++ uint32_t Reserved[4]; /* must be 0 */ ++} PACKED t_PXENV_UNDI_GET_IFACE_INFO; ++ ++#define PXENV_UNDI_ISR 0x0014 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint16_t FuncFlag; /* PXENV_UNDI_ISR_OUT_xxx */ ++ uint16_t BufferLength; /* Length of Frame */ ++ uint16_t FrameLength; /* Total length of reciever frame */ ++ uint16_t FrameHeaderLength; /* Length of the media header in Frame */ ++ SEGOFF16_t Frame; /* receive buffer */ ++ uint8_t ProtType; /* Protocol type */ ++ uint8_t PktType; /* Packet Type */ ++# define PXENV_UNDI_ISR_IN_START 1 ++# define PXENV_UNDI_ISR_IN_PROCESS 2 ++# define PXENV_UNDI_ISR_IN_GET_NEXT 3 ++ ++ /* one of these will be returned for PXENV_UNDI_ISR_IN_START */ ++# define PXENV_UNDI_ISR_OUT_OURS 0 ++# define PXENV_UNDI_ISR_OUT_NOT_OURS 1 ++ ++ /* ++ * one of these will bre returnd for PXEND_UNDI_ISR_IN_PROCESS ++ * and PXENV_UNDI_ISR_IN_GET_NEXT ++ */ ++# define PXENV_UNDI_ISR_OUT_DONE 0 ++# define PXENV_UNDI_ISR_OUT_TRANSMIT 2 ++# define PXENV_UNDI_ISR_OUT_RECEIVE 3 ++# define PXENV_UNDI_ISR_OUT_BUSY 4 ++} PACKED t_PXENV_UNDI_ISR; ++ ++#define PXENV_STOP_UNDI 0x0015 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_STOP_UNDI; ++ ++#define PXENV_TFTP_OPEN 0x0020 ++typedef struct { ++ PXENV_STATUS_t Status; ++ IP4_t ServerIPAddress; ++ IP4_t GatewayIPAddress; ++ uint8_t FileName[128]; ++ UDP_PORT_t TFTPPort; ++ uint16_t PacketSize; ++} PACKED t_PXENV_TFTP_OPEN; ++ ++#define PXENV_TFTP_CLOSE 0x0021 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_TFTP_CLOSE; ++ ++#define PXENV_TFTP_READ 0x0022 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint16_t PacketNumber; ++ uint16_t BufferSize; ++ SEGOFF16_t Buffer; ++} PACKED t_PXENV_TFTP_READ; ++ ++#define PXENV_TFTP_READ_FILE 0x0023 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint8_t FileName[128]; ++ uint32_t BufferSize; ++ ADDR32_t Buffer; ++ IP4_t ServerIPAddress; ++ IP4_t GatewayIPAdress; ++ IP4_t McastIPAdress; ++ UDP_PORT_t TFTPClntPort; ++ UDP_PORT_t TFTPSrvPort; ++ uint16_t TFTPOpenTimeOut; ++ uint16_t TFTPReopenDelay; ++} PACKED t_PXENV_TFTP_READ_FILE; ++ ++#define PXENV_TFTP_GET_FSIZE 0x0025 ++typedef struct { ++ PXENV_STATUS_t Status; ++ IP4_t ServerIPAddress; ++ IP4_t GatewayIPAdress; ++ uint8_t FileName[128]; ++ uint32_t FileSize; ++} PACKED t_PXENV_TFTP_GET_FSIZE; ++ ++#define PXENV_UDP_OPEN 0x0030 ++typedef struct { ++ PXENV_STATUS_t Status; ++ IP4_t src_ip; /* IP address of this station */ ++} PACKED t_PXENV_UDP_OPEN; ++ ++#define PXENV_UDP_CLOSE 0x0031 ++typedef struct { ++ PXENV_STATUS_t status; ++} PACKED t_PXENV_UDP_CLOSE; ++ ++#define PXENV_UDP_READ 0x0032 ++typedef struct { ++ PXENV_STATUS_t status; ++ IP4_t src_ip; /* IP of sender */ ++ IP4_t dest_ip; /* Only accept packets sent to this IP */ ++ UDP_PORT_t s_port; /* UDP source port of sender */ ++ UDP_PORT_t d_port; /* Only accept packets sent to this port */ ++ uint16_t buffer_size; /* Size of the packet buffer */ ++ SEGOFF16_t buffer; /* SEG:OFF to the packet buffer */ ++} PACKED t_PXENV_UDP_READ; ++ ++#define PXENV_UDP_WRITE 0x0033 ++typedef struct { ++ PXENV_STATUS_t status; ++ IP4_t ip; /* dest ip addr */ ++ IP4_t gw; /* ip gateway */ ++ UDP_PORT_t src_port; /* source udp port */ ++ UDP_PORT_t dst_port; /* destination udp port */ ++ uint16_t buffer_size; /* Size of the packet buffer */ ++ SEGOFF16_t buffer; /* SEG:OFF to the packet buffer */ ++} PACKED t_PXENV_UDP_WRITE; ++ ++#define PXENV_UNLOAD_STACK 0x0070 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint8_t reserved[10]; ++} PACKED t_PXENV_UNLOAD_STACK; ++ ++ ++#define PXENV_GET_CACHED_INFO 0x0071 ++typedef struct { ++ PXENV_STATUS_t Status; ++ uint16_t PacketType; /* type (defined right here) */ ++# define PXENV_PACKET_TYPE_DHCP_DISCOVER 1 ++# define PXENV_PACKET_TYPE_DHCP_ACK 2 ++# define PXENV_PACKET_TYPE_BINL_REPLY 3 ++ uint16_t BufferSize; /* max to copy, leave at 0 for pointer */ ++ SEGOFF16_t Buffer; /* copy to, leave at 0 for pointer */ ++ uint16_t BufferLimit; /* max size of buffer in BC dataseg ? */ ++} PACKED t_PXENV_GET_CACHED_INFO; ++ ++ ++/* structure filled in by PXENV_GET_CACHED_INFO ++ * (how we determine which IP we downloaded the initial bootstrap from) ++ * words can't describe... ++ */ ++typedef struct { ++ uint8_t opcode; ++# define BOOTP_REQ 1 ++# define BOOTP_REP 2 ++ uint8_t Hardware; /* hardware type */ ++ uint8_t Hardlen; /* hardware addr len */ ++ uint8_t Gatehops; /* zero it */ ++ uint32_t ident; /* random number chosen by client */ ++ uint16_t seconds; /* seconds since did initial bootstrap */ ++ uint16_t Flags; /* seconds since did initial bootstrap */ ++# define BOOTP_BCAST 0x8000 /* ? */ ++ IP4_t cip; /* Client IP */ ++ IP4_t yip; /* Your IP */ ++ IP4_t sip; /* IP to use for next boot stage */ ++ IP4_t gip; /* Relay IP ? */ ++ MAC_ADDR CAddr; /* Client hardware address */ ++ uint8_t Sname[64]; /* Server's hostname (Optional) */ ++ uint8_t bootfile[128]; /* boot filename */ ++ union { ++# if 1 ++# define BOOTP_DHCPVEND 1024 /* DHCP extended vendor field size */ ++# else ++# define BOOTP_DHCPVEND 312 /* DHCP standard vendor field size */ ++# endif ++ uint8_t d[BOOTP_DHCPVEND]; /* raw array of vendor/dhcp options */ ++ struct { ++ uint8_t magic[4]; /* DHCP magic cookie */ ++# ifndef VM_RFC1048 ++# define VM_RFC1048 0x63825363L /* ? */ ++# endif ++ uint32_t flags; /* bootp flags/opcodes */ ++ uint8_t pad[56]; /* I don't think intel knows what a ++ union does... */ ++ } v; ++ } vendor; ++} PACKED BOOTPLAYER; ++ ++#define PXENV_RESTART_TFTP 0x0073 ++#define t_PXENV_RESTART_TFTP t_PXENV_TFTP_READ_FILE ++ ++#define PXENV_START_BASE 0x0075 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_START_BASE; ++ ++#define PXENV_STOP_BASE 0x0076 ++typedef struct { ++ PXENV_STATUS_t Status; ++} PACKED t_PXENV_STOP_BASE; +Index: b/netboot/r8169.c +=================================================================== +--- /dev/null ++++ b/netboot/r8169.c +@@ -0,0 +1,854 @@ ++/************************************************************************** ++* r8169.c: Etherboot device driver for the RealTek RTL-8169 Gigabit ++* Written 2003 by Timothy Legge ++* ++* 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., 675 Mass Ave, Cambridge, MA 02139, USA. ++* ++* Portions of this code based on: ++* r8169.c: A RealTek RTL-8169 Gigabit Ethernet driver ++* for Linux kernel 2.4.x. ++* ++* Written 2002 ShuChen ++* See Linux Driver for full information ++* ++* Linux Driver Version 1.27a, 10.02.2002 ++* ++* Thanks to: ++* Jean Chen of RealTek Semiconductor Corp. for ++* providing the evaluation NIC used to develop ++* this driver. RealTek's support for Etherboot ++* is appreciated. ++* ++* REVISION HISTORY: ++* ================ ++* ++* v1.0 11-26-2003 timlegge Initial port of Linux driver ++* v1.5 01-17-2004 timlegge Initial driver output cleanup ++* v1.6 03-27-2004 timlegge Additional Cleanup ++* ++* Indent Options: indent -kr -i8 ++***************************************************************************/ ++ ++/* to get some global routines like printf */ ++#include "etherboot.h" ++/* to get the interface to the body of the program */ ++#include "nic.h" ++/* to get the PCI support functions, if this is a PCI NIC */ ++#include "pci.h" ++#include "timer.h" ++ ++#define drv_version "v1.6" ++#define drv_date "03-27-2004" ++ ++typedef unsigned char u8; ++typedef signed char s8; ++typedef unsigned short u16; ++typedef signed short s16; ++typedef unsigned int u32; ++typedef signed int s32; ++ ++#define HZ 1000 ++ ++static u32 ioaddr; ++ ++#ifdef EDEBUG ++#define dprintf(x) printf x ++#else ++#define dprintf(x) ++#endif ++ ++/* Condensed operations for readability. */ ++#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) ++#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) ++ ++#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) ++ ++/* media options ++ _10_Half = 0x01, ++ _10_Full = 0x02, ++ _100_Half = 0x04, ++ _100_Full = 0x08, ++ _1000_Full = 0x10, ++*/ ++static int media = -1; ++ ++#if 0 ++/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ ++static int max_interrupt_work = 20; ++#endif ++ ++#if 0 ++/* Maximum number of multicast addresses to filter (vs. Rx-all-multicast). ++ The RTL chips use a 64 element hash table based on the Ethernet CRC. */ ++static int multicast_filter_limit = 32; ++#endif ++ ++/* MAC address length*/ ++#define MAC_ADDR_LEN 6 ++ ++/* max supported gigabit ethernet frame size -- must be at least (dev->mtu+14+4).*/ ++#define MAX_ETH_FRAME_SIZE 1536 ++ ++#define TX_FIFO_THRESH 256 /* In bytes */ ++ ++#define RX_FIFO_THRESH 7 /* 7 means NO threshold, Rx buffer level before first PCI xfer. */ ++#define RX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */ ++#define TX_DMA_BURST 6 /* Maximum PCI burst, '6' is 1024 */ ++#define EarlyTxThld 0x3F /* 0x3F means NO early transmit */ ++#define RxPacketMaxSize 0x0800 /* Maximum size supported is 16K-1 */ ++#define InterFrameGap 0x03 /* 3 means InterFrameGap = the shortest one */ ++ ++#define NUM_TX_DESC 1 /* Number of Tx descriptor registers */ ++#define NUM_RX_DESC 4 /* Number of Rx descriptor registers */ ++#define RX_BUF_SIZE 1536 /* Rx Buffer size */ ++ ++#define RTL_MIN_IO_SIZE 0x80 ++#define TX_TIMEOUT (6*HZ) ++ ++/* write/read MMIO register */ ++#define RTL_W8(reg, val8) writeb ((val8), ioaddr + (reg)) ++#define RTL_W16(reg, val16) writew ((val16), ioaddr + (reg)) ++#define RTL_W32(reg, val32) writel ((val32), ioaddr + (reg)) ++#define RTL_R8(reg) readb (ioaddr + (reg)) ++#define RTL_R16(reg) readw (ioaddr + (reg)) ++#define RTL_R32(reg) ((unsigned long) readl (ioaddr + (reg))) ++ ++enum RTL8169_registers { ++ MAC0 = 0, /* Ethernet hardware address. */ ++ MAR0 = 8, /* Multicast filter. */ ++ TxDescStartAddr = 0x20, ++ TxHDescStartAddr = 0x28, ++ FLASH = 0x30, ++ ERSR = 0x36, ++ ChipCmd = 0x37, ++ TxPoll = 0x38, ++ IntrMask = 0x3C, ++ IntrStatus = 0x3E, ++ TxConfig = 0x40, ++ RxConfig = 0x44, ++ RxMissed = 0x4C, ++ Cfg9346 = 0x50, ++ Config0 = 0x51, ++ Config1 = 0x52, ++ Config2 = 0x53, ++ Config3 = 0x54, ++ Config4 = 0x55, ++ Config5 = 0x56, ++ MultiIntr = 0x5C, ++ PHYAR = 0x60, ++ TBICSR = 0x64, ++ TBI_ANAR = 0x68, ++ TBI_LPAR = 0x6A, ++ PHYstatus = 0x6C, ++ RxMaxSize = 0xDA, ++ CPlusCmd = 0xE0, ++ RxDescStartAddr = 0xE4, ++ EarlyTxThres = 0xEC, ++ FuncEvent = 0xF0, ++ FuncEventMask = 0xF4, ++ FuncPresetState = 0xF8, ++ FuncForceEvent = 0xFC, ++}; ++ ++enum RTL8169_register_content { ++ /*InterruptStatusBits */ ++ SYSErr = 0x8000, ++ PCSTimeout = 0x4000, ++ SWInt = 0x0100, ++ TxDescUnavail = 0x80, ++ RxFIFOOver = 0x40, ++ RxUnderrun = 0x20, ++ RxOverflow = 0x10, ++ TxErr = 0x08, ++ TxOK = 0x04, ++ RxErr = 0x02, ++ RxOK = 0x01, ++ ++ /*RxStatusDesc */ ++ RxRES = 0x00200000, ++ RxCRC = 0x00080000, ++ RxRUNT = 0x00100000, ++ RxRWT = 0x00400000, ++ ++ /*ChipCmdBits */ ++ CmdReset = 0x10, ++ CmdRxEnb = 0x08, ++ CmdTxEnb = 0x04, ++ RxBufEmpty = 0x01, ++ ++ /*Cfg9346Bits */ ++ Cfg9346_Lock = 0x00, ++ Cfg9346_Unlock = 0xC0, ++ ++ /*rx_mode_bits */ ++ AcceptErr = 0x20, ++ AcceptRunt = 0x10, ++ AcceptBroadcast = 0x08, ++ AcceptMulticast = 0x04, ++ AcceptMyPhys = 0x02, ++ AcceptAllPhys = 0x01, ++ ++ /*RxConfigBits */ ++ RxCfgFIFOShift = 13, ++ RxCfgDMAShift = 8, ++ ++ /*TxConfigBits */ ++ TxInterFrameGapShift = 24, ++ TxDMAShift = 8, /* DMA burst value (0-7) is shift this many bits */ ++ ++ /*rtl8169_PHYstatus */ ++ TBI_Enable = 0x80, ++ TxFlowCtrl = 0x40, ++ RxFlowCtrl = 0x20, ++ _1000bpsF = 0x10, ++ _100bps = 0x08, ++ _10bps = 0x04, ++ LinkStatus = 0x02, ++ FullDup = 0x01, ++ ++ /*GIGABIT_PHY_registers */ ++ PHY_CTRL_REG = 0, ++ PHY_STAT_REG = 1, ++ PHY_AUTO_NEGO_REG = 4, ++ PHY_1000_CTRL_REG = 9, ++ ++ /*GIGABIT_PHY_REG_BIT */ ++ PHY_Restart_Auto_Nego = 0x0200, ++ PHY_Enable_Auto_Nego = 0x1000, ++ ++ /* PHY_STAT_REG = 1; */ ++ PHY_Auto_Neco_Comp = 0x0020, ++ ++ /* PHY_AUTO_NEGO_REG = 4; */ ++ PHY_Cap_10_Half = 0x0020, ++ PHY_Cap_10_Full = 0x0040, ++ PHY_Cap_100_Half = 0x0080, ++ PHY_Cap_100_Full = 0x0100, ++ ++ /* PHY_1000_CTRL_REG = 9; */ ++ PHY_Cap_1000_Full = 0x0200, ++ ++ PHY_Cap_Null = 0x0, ++ ++ /*_MediaType*/ ++ _10_Half = 0x01, ++ _10_Full = 0x02, ++ _100_Half = 0x04, ++ _100_Full = 0x08, ++ _1000_Full = 0x10, ++ ++ /*_TBICSRBit*/ ++ TBILinkOK = 0x02000000, ++}; ++ ++static struct { ++ const char *name; ++ u8 version; /* depend on RTL8169 docs */ ++ u32 RxConfigMask; /* should clear the bits supported by this chip */ ++} rtl_chip_info[] = { ++ { ++"RTL-8169", 0x00, 0xff7e1880,},}; ++ ++enum _DescStatusBit { ++ OWNbit = 0x80000000, ++ EORbit = 0x40000000, ++ FSbit = 0x20000000, ++ LSbit = 0x10000000, ++}; ++ ++struct TxDesc { ++ u32 status; ++ u32 vlan_tag; ++ u32 buf_addr; ++ u32 buf_Haddr; ++}; ++ ++struct RxDesc { ++ u32 status; ++ u32 vlan_tag; ++ u32 buf_addr; ++ u32 buf_Haddr; ++}; ++ ++/* The descriptors for this card are required to be aligned on ++256 byte boundaries. As the align attribute does not do more than ++16 bytes of alignment it requires some extra steps. Add 256 to the ++size of the array and the init_ring adjusts the alignment */ ++ ++/* Define the TX Descriptor */ ++static u8 tx_ring[NUM_TX_DESC * sizeof(struct TxDesc) + 256]; ++ ++/* Create a static buffer of size RX_BUF_SZ for each ++TX Descriptor. All descriptors point to a ++part of this buffer */ ++static unsigned char txb[NUM_TX_DESC * RX_BUF_SIZE]; ++ ++/* Define the RX Descriptor */ ++static u8 rx_ring[NUM_RX_DESC * sizeof(struct TxDesc) + 256]; ++ ++/* Create a static buffer of size RX_BUF_SZ for each ++RX Descriptor All descriptors point to a ++part of this buffer */ ++static unsigned char rxb[NUM_RX_DESC * RX_BUF_SIZE]; ++ ++struct rtl8169_private { ++ void *mmio_addr; /* memory map physical address */ ++ int chipset; ++ unsigned long cur_rx; /* Index into the Rx descriptor buffer of next Rx pkt. */ ++ unsigned long cur_tx; /* Index into the Tx descriptor buffer of next Rx pkt. */ ++ unsigned char *TxDescArrays; /* Index of Tx Descriptor buffer */ ++ unsigned char *RxDescArrays; /* Index of Rx Descriptor buffer */ ++ struct TxDesc *TxDescArray; /* Index of 256-alignment Tx Descriptor buffer */ ++ struct RxDesc *RxDescArray; /* Index of 256-alignment Rx Descriptor buffer */ ++ unsigned char *RxBufferRing[NUM_RX_DESC]; /* Index of Rx Buffer array */ ++ unsigned char *Tx_skbuff[NUM_TX_DESC]; ++} tpx; ++ ++static struct rtl8169_private *tpc; ++ ++static const u16 rtl8169_intr_mask = ++ SYSErr | PCSTimeout | RxUnderrun | RxOverflow | RxFIFOOver | TxErr | ++ TxOK | RxErr | RxOK; ++static const unsigned int rtl8169_rx_config = ++ (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift); ++ ++void mdio_write(int RegAddr, int value) ++{ ++ int i; ++ ++ RTL_W32(PHYAR, 0x80000000 | (RegAddr & 0xFF) << 16 | value); ++ udelay(1000); ++ ++ for (i = 2000; i > 0; i--) { ++ /* Check if the RTL8169 has completed writing to the specified MII register */ ++ if (!(RTL_R32(PHYAR) & 0x80000000)) { ++ break; ++ } else { ++ udelay(100); ++ } ++ } ++} ++ ++int mdio_read(int RegAddr) ++{ ++ int i, value = -1; ++ ++ RTL_W32(PHYAR, 0x0 | (RegAddr & 0xFF) << 16); ++ udelay(1000); ++ ++ for (i = 2000; i > 0; i--) { ++ /* Check if the RTL8169 has completed retrieving data from the specified MII register */ ++ if (RTL_R32(PHYAR) & 0x80000000) { ++ value = (int) (RTL_R32(PHYAR) & 0xFFFF); ++ break; ++ } else { ++ udelay(100); ++ } ++ } ++ return value; ++} ++ ++static int rtl8169_init_board(struct pci_device *pdev) ++{ ++ int i; ++ unsigned long rtreg_base, rtreg_len; ++ u32 tmp; ++ ++ rtreg_base = pci_bar_start(pdev, PCI_BASE_ADDRESS_1); ++ rtreg_len = pci_bar_size(pdev, PCI_BASE_ADDRESS_1); ++ ++ /* check for weird/broken PCI region reporting */ ++ if (rtreg_len < RTL_MIN_IO_SIZE) { ++ printf("Invalid PCI region size(s), aborting\n"); ++ } ++ ++ adjust_pci_device(pdev); ++/* pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); */ ++ ++ /* ioremap MMIO region */ ++ ioaddr = (unsigned long) ioremap(rtreg_base, rtreg_len); ++ if (ioaddr == 0) ++ return 0; ++ ++ tpc->mmio_addr = &ioaddr; ++ /* Soft reset the chip. */ ++ RTL_W8(ChipCmd, CmdReset); ++ ++ /* Check that the chip has finished the reset. */ ++ for (i = 1000; i > 0; i--) ++ if ((RTL_R8(ChipCmd) & CmdReset) == 0) ++ break; ++ else ++ udelay(10); ++ ++ /* identify chip attached to board */ ++ tmp = RTL_R32(TxConfig); ++ tmp = ((tmp & 0x7c000000) + ((tmp & 0x00800000) << 2)) >> 24; ++ ++ for (i = ARRAY_SIZE(rtl_chip_info) - 1; i >= 0; i--) ++ if (tmp == rtl_chip_info[i].version) { ++ tpc->chipset = i; ++ goto match; ++ } ++ /* if unknown chip, assume array element #0, original RTL-8169 in this case */ ++ dprintf(("PCI device: unknown chip version, assuming RTL-8169\n")); ++ dprintf(("PCI device: TxConfig = 0x%hX\n", ++ (unsigned long) RTL_R32(TxConfig))); ++ tpc->chipset = 0; ++ return 1; ++ match: ++ return 0; ++ ++} ++ ++/************************************************************************** ++IRQ - Wait for a frame ++***************************************************************************/ ++void r8169_irq ( struct nic *nic __unused, irq_action_t action ) { ++ int intr_status = 0; ++ int interested = RxUnderrun | RxOverflow | RxFIFOOver | RxErr | RxOK; ++ ++ switch ( action ) { ++ case DISABLE: ++ case ENABLE: ++ intr_status = RTL_R16(IntrStatus); ++ /* h/w no longer present (hotplug?) or major error, ++ bail */ ++ if (intr_status == 0xFFFF) ++ break; ++ ++ intr_status = intr_status & ~interested; ++ if ( action == ENABLE ) ++ intr_status = intr_status | interested; ++ RTL_W16(IntrMask, intr_status); ++ break; ++ case FORCE : ++ RTL_W8(TxPoll, (RTL_R8(TxPoll) | 0x01)); ++ break; ++ } ++} ++ ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int r8169_poll(struct nic *nic, int retreive) ++{ ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ int cur_rx; ++ unsigned int intr_status = 0; ++ cur_rx = tpc->cur_rx; ++ if ((tpc->RxDescArray[cur_rx].status & OWNbit) == 0) { ++ /* There is a packet ready */ ++ if(!retreive) ++ return 1; ++ intr_status = RTL_R16(IntrStatus); ++ /* h/w no longer present (hotplug?) or major error, ++ bail */ ++ if (intr_status == 0xFFFF) ++ return 0; ++ RTL_W16(IntrStatus, intr_status & ++ ~(RxFIFOOver | RxOverflow | RxOK)); ++ ++ if (!(tpc->RxDescArray[cur_rx].status & RxRES)) { ++ nic->packetlen = (int) (tpc->RxDescArray[cur_rx]. ++ status & 0x00001FFF) - 4; ++ memcpy(nic->packet, tpc->RxBufferRing[cur_rx], ++ nic->packetlen); ++ if (cur_rx == NUM_RX_DESC - 1) ++ tpc->RxDescArray[cur_rx].status = ++ (OWNbit | EORbit) + RX_BUF_SIZE; ++ else ++ tpc->RxDescArray[cur_rx].status = ++ OWNbit + RX_BUF_SIZE; ++ tpc->RxDescArray[cur_rx].buf_addr = ++ virt_to_bus(tpc->RxBufferRing[cur_rx]); ++ } else ++ printf("Error Rx"); ++ /* FIXME: shouldn't I reset the status on an error */ ++ cur_rx = (cur_rx + 1) % NUM_RX_DESC; ++ tpc->cur_rx = cur_rx; ++ RTL_W16(IntrStatus, intr_status & ++ (RxFIFOOver | RxOverflow | RxOK)); ++ ++ return 1; ++ ++ } ++ tpc->cur_rx = cur_rx; ++ /* FIXME: There is no reason to do this as cur_rx did not change */ ++ ++ return (0); /* initially as this is called to flush the input */ ++ ++} ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void r8169_transmit(struct nic *nic, const char *d, /* Destination */ ++ unsigned int t, /* Type */ ++ unsigned int s, /* size */ ++ const char *p) ++{ /* Packet */ ++ /* send the packet to destination */ ++ ++ u16 nstype; ++ u32 to; ++ u8 *ptxb; ++ int entry = tpc->cur_tx % NUM_TX_DESC; ++ ++ /* point to the current txb incase multiple tx_rings are used */ ++ ptxb = tpc->Tx_skbuff[entry * MAX_ETH_FRAME_SIZE]; ++ memcpy(ptxb, d, ETH_ALEN); ++ memcpy(ptxb + ETH_ALEN, nic->node_addr, ETH_ALEN); ++ nstype = htons((u16) t); ++ memcpy(ptxb + 2 * ETH_ALEN, (u8 *) & nstype, 2); ++ memcpy(ptxb + ETH_HLEN, p, s); ++ s += ETH_HLEN; ++ s &= 0x0FFF; ++ while (s < ETH_ZLEN) ++ ptxb[s++] = '\0'; ++ ++ tpc->TxDescArray[entry].buf_addr = virt_to_bus(ptxb); ++ if (entry != (NUM_TX_DESC - 1)) ++ tpc->TxDescArray[entry].status = ++ (OWNbit | FSbit | LSbit) | ((s > ETH_ZLEN) ? s : ++ ETH_ZLEN); ++ else ++ tpc->TxDescArray[entry].status = ++ (OWNbit | EORbit | FSbit | LSbit) | ((s > ETH_ZLEN) ? s ++ : ETH_ZLEN); ++ RTL_W8(TxPoll, 0x40); /* set polling bit */ ++ ++ tpc->cur_tx++; ++ to = currticks() + TX_TIMEOUT; ++ while ((tpc->TxDescArray[entry].status & OWNbit) && (currticks() < to)); /* wait */ ++ ++ if (currticks() >= to) { ++ printf("TX Time Out"); ++ } ++} ++ ++static void rtl8169_set_rx_mode(struct nic *nic __unused) ++{ ++ u32 mc_filter[2]; /* Multicast hash filter */ ++ int rx_mode; ++ u32 tmp = 0; ++ ++ /* IFF_ALLMULTI */ ++ /* Too many to filter perfectly -- accept all multicasts. */ ++ rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; ++ mc_filter[1] = mc_filter[0] = 0xffffffff; ++ ++ tmp = ++ rtl8169_rx_config | rx_mode | (RTL_R32(RxConfig) & ++ rtl_chip_info[tpc->chipset]. ++ RxConfigMask); ++ ++ RTL_W32(RxConfig, tmp); ++ RTL_W32(MAR0 + 0, mc_filter[0]); ++ RTL_W32(MAR0 + 4, mc_filter[1]); ++} ++static void rtl8169_hw_start(struct nic *nic) ++{ ++ u32 i; ++ ++ /* Soft reset the chip. */ ++ RTL_W8(ChipCmd, CmdReset); ++ ++ /* Check that the chip has finished the reset. */ ++ for (i = 1000; i > 0; i--) { ++ if ((RTL_R8(ChipCmd) & CmdReset) == 0) ++ break; ++ else ++ udelay(10); ++ } ++ ++ RTL_W8(Cfg9346, Cfg9346_Unlock); ++ RTL_W8(ChipCmd, CmdTxEnb | CmdRxEnb); ++ RTL_W8(EarlyTxThres, EarlyTxThld); ++ ++ /* For gigabit rtl8169 */ ++ RTL_W16(RxMaxSize, RxPacketMaxSize); ++ ++ /* Set Rx Config register */ ++ i = rtl8169_rx_config | (RTL_R32(RxConfig) & ++ rtl_chip_info[tpc->chipset].RxConfigMask); ++ RTL_W32(RxConfig, i); ++ ++ /* Set DMA burst size and Interframe Gap Time */ ++ RTL_W32(TxConfig, ++ (TX_DMA_BURST << TxDMAShift) | (InterFrameGap << ++ TxInterFrameGapShift)); ++ ++ ++ tpc->cur_rx = 0; ++ ++ RTL_W32(TxDescStartAddr, virt_to_le32desc(tpc->TxDescArray)); ++ RTL_W32(RxDescStartAddr, virt_to_le32desc(tpc->RxDescArray)); ++ RTL_W8(Cfg9346, Cfg9346_Lock); ++ udelay(10); ++ ++ RTL_W32(RxMissed, 0); ++ ++ rtl8169_set_rx_mode(nic); ++ ++ /* no early-rx interrupts */ ++ RTL_W16(MultiIntr, RTL_R16(MultiIntr) & 0xF000); ++} ++ ++static void rtl8169_init_ring(struct nic *nic __unused) ++{ ++ int i; ++ ++ tpc->cur_rx = 0; ++ tpc->cur_tx = 0; ++ memset(tpc->TxDescArray, 0x0, NUM_TX_DESC * sizeof(struct TxDesc)); ++ memset(tpc->RxDescArray, 0x0, NUM_RX_DESC * sizeof(struct RxDesc)); ++ ++ for (i = 0; i < NUM_TX_DESC; i++) { ++ tpc->Tx_skbuff[i] = &txb[i]; ++ } ++ ++ for (i = 0; i < NUM_RX_DESC; i++) { ++ if (i == (NUM_RX_DESC - 1)) ++ tpc->RxDescArray[i].status = ++ (OWNbit | EORbit) + RX_BUF_SIZE; ++ else ++ tpc->RxDescArray[i].status = OWNbit + RX_BUF_SIZE; ++ ++ tpc->RxBufferRing[i] = &rxb[i * RX_BUF_SIZE]; ++ tpc->RxDescArray[i].buf_addr = ++ virt_to_bus(tpc->RxBufferRing[i]); ++ } ++} ++ ++/************************************************************************** ++RESET - Finish setting up the ethernet interface ++***************************************************************************/ ++static void r8169_reset(struct nic *nic) ++{ ++ int i; ++ u8 diff; ++ u32 TxPhyAddr, RxPhyAddr; ++ ++ tpc->TxDescArrays = tx_ring; ++ if (tpc->TxDescArrays == 0) ++ printf("Allot Error"); ++ /* Tx Desscriptor needs 256 bytes alignment; */ ++ TxPhyAddr = virt_to_bus(tpc->TxDescArrays); ++ diff = 256 - (TxPhyAddr - ((TxPhyAddr >> 8) << 8)); ++ TxPhyAddr += diff; ++ tpc->TxDescArray = (struct TxDesc *) (tpc->TxDescArrays + diff); ++ ++ tpc->RxDescArrays = rx_ring; ++ /* Rx Desscriptor needs 256 bytes alignment; */ ++ RxPhyAddr = virt_to_bus(tpc->RxDescArrays); ++ diff = 256 - (RxPhyAddr - ((RxPhyAddr >> 8) << 8)); ++ RxPhyAddr += diff; ++ tpc->RxDescArray = (struct RxDesc *) (tpc->RxDescArrays + diff); ++ ++ if (tpc->TxDescArrays == NULL || tpc->RxDescArrays == NULL) { ++ printf("Allocate RxDescArray or TxDescArray failed\n"); ++ return; ++ } ++ ++ rtl8169_init_ring(nic); ++ rtl8169_hw_start(nic); ++ /* Construct a perfect filter frame with the mac address as first match ++ * and broadcast for all others */ ++ for (i = 0; i < 192; i++) ++ txb[i] = 0xFF; ++ ++ txb[0] = nic->node_addr[0]; ++ txb[1] = nic->node_addr[1]; ++ txb[2] = nic->node_addr[2]; ++ txb[3] = nic->node_addr[3]; ++ txb[4] = nic->node_addr[4]; ++ txb[5] = nic->node_addr[5]; ++} ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void r8169_disable(struct dev *dev __unused) ++{ ++ int i; ++ /* Stop the chip's Tx and Rx DMA processes. */ ++ RTL_W8(ChipCmd, 0x00); ++ ++ /* Disable interrupts by clearing the interrupt mask. */ ++ RTL_W16(IntrMask, 0x0000); ++ ++ RTL_W32(RxMissed, 0); ++ ++ tpc->TxDescArrays = NULL; ++ tpc->RxDescArrays = NULL; ++ tpc->TxDescArray = NULL; ++ tpc->RxDescArray = NULL; ++ for (i = 0; i < NUM_RX_DESC; i++) { ++ tpc->RxBufferRing[i] = NULL; ++ } ++} ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++***************************************************************************/ ++ ++#define board_found 1 ++#define valid_link 0 ++static int r8169_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *) dev; ++ static int board_idx = -1; ++ static int printed_version = 0; ++ int i, rc; ++ int option = -1, Cap10_100 = 0, Cap1000 = 0; ++ ++ printf("r8169.c: Found %s, Vendor=%hX Device=%hX\n", ++ pci->name, pci->vendor, pci->dev_id); ++ ++ board_idx++; ++ ++ printed_version = 1; ++ ++ /* point to private storage */ ++ tpc = &tpx; ++ ++ rc = rtl8169_init_board(pci); /* Return code is meaningless */ ++ ++ /* Get MAC address. FIXME: read EEPROM */ ++ for (i = 0; i < MAC_ADDR_LEN; i++) ++ nic->node_addr[i] = RTL_R8(MAC0 + i); ++ ++ dprintf(("%s: Identified chip type is '%s'.\n", pci->name, ++ rtl_chip_info[tpc->chipset].name)); ++ /* Print out some hardware info */ ++ printf("%s: %! at ioaddr %hX, ", pci->name, nic->node_addr, ++ ioaddr); ++ ++ /* if TBI is not endbled */ ++ if (!(RTL_R8(PHYstatus) & TBI_Enable)) { ++ int val = mdio_read(PHY_AUTO_NEGO_REG); ++ ++ option = media; ++ /* Force RTL8169 in 10/100/1000 Full/Half mode. */ ++ if (option > 0) { ++ printf(" Force-mode Enabled.\n"); ++ Cap10_100 = 0, Cap1000 = 0; ++ switch (option) { ++ case _10_Half: ++ Cap10_100 = PHY_Cap_10_Half; ++ Cap1000 = PHY_Cap_Null; ++ break; ++ case _10_Full: ++ Cap10_100 = PHY_Cap_10_Full; ++ Cap1000 = PHY_Cap_Null; ++ break; ++ case _100_Half: ++ Cap10_100 = PHY_Cap_100_Half; ++ Cap1000 = PHY_Cap_Null; ++ break; ++ case _100_Full: ++ Cap10_100 = PHY_Cap_100_Full; ++ Cap1000 = PHY_Cap_Null; ++ break; ++ case _1000_Full: ++ Cap10_100 = PHY_Cap_Null; ++ Cap1000 = PHY_Cap_1000_Full; ++ break; ++ default: ++ break; ++ } ++ /* leave PHY_AUTO_NEGO_REG bit4:0 unchanged */ ++ mdio_write(PHY_AUTO_NEGO_REG, ++ Cap10_100 | (val & 0x1F)); ++ mdio_write(PHY_1000_CTRL_REG, Cap1000); ++ } else { ++ dprintf(("Auto-negotiation Enabled.\n", ++ pci->name)); ++ ++ /* enable 10/100 Full/Half Mode, leave PHY_AUTO_NEGO_REG bit4:0 unchanged */ ++ mdio_write(PHY_AUTO_NEGO_REG, ++ PHY_Cap_10_Half | PHY_Cap_10_Full | ++ PHY_Cap_100_Half | PHY_Cap_100_Full | ++ (val & 0x1F)); ++ ++ /* enable 1000 Full Mode */ ++ mdio_write(PHY_1000_CTRL_REG, PHY_Cap_1000_Full); ++ ++ } ++ ++ /* Enable auto-negotiation and restart auto-nigotiation */ ++ mdio_write(PHY_CTRL_REG, ++ PHY_Enable_Auto_Nego | PHY_Restart_Auto_Nego); ++ udelay(100); ++ ++ /* wait for auto-negotiation process */ ++ for (i = 10000; i > 0; i--) { ++ /* Check if auto-negotiation complete */ ++ if (mdio_read(PHY_STAT_REG) & PHY_Auto_Neco_Comp) { ++ udelay(100); ++ option = RTL_R8(PHYstatus); ++ if (option & _1000bpsF) { ++ printf ++ ("1000Mbps Full-duplex operation.\n"); ++ } else { ++ printf ++ ("%sMbps %s-duplex operation.\n", ++ (option & _100bps) ? "100" : ++ "10", ++ (option & FullDup) ? "Full" : ++ "Half"); ++ } ++ break; ++ } else { ++ udelay(100); ++ } ++ } /* end for-loop to wait for auto-negotiation process */ ++ ++ } else { ++ udelay(100); ++ printf ++ ("%s: 1000Mbps Full-duplex operation, TBI Link %s!\n", ++ pci->name, ++ (RTL_R32(TBICSR) & TBILinkOK) ? "OK" : "Failed"); ++ ++ } ++ ++ r8169_reset(nic); ++ /* point to NIC specific routines */ ++ dev->disable = r8169_disable; ++ nic->poll = r8169_poll; ++ nic->transmit = r8169_transmit; ++ nic->irqno = pci->irq; ++ nic->irq = r8169_irq; ++ nic->ioaddr = ioaddr; ++ return 1; ++ ++} ++ ++static struct pci_id r8169_nics[] = { ++ PCI_ROM(0x10ec, 0x8169, "r8169", "RealTek RTL8169 Gigabit Ethernet"), ++}; ++ ++struct pci_driver r8169_driver = { ++ .type = NIC_DRIVER, ++ .name = "r8169/PCI", ++ .probe = r8169_probe, ++ .ids = r8169_nics, ++ .id_count = sizeof(r8169_nics) / sizeof(r8169_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/rtl8139.c +=================================================================== +--- a/netboot/rtl8139.c ++++ b/netboot/rtl8139.c +@@ -17,6 +17,8 @@ + /*********************************************************************/ + + /* ++ 28 Dec 2002 ken_yap@users.sourceforge.net (Ken Yap) ++ Put in virt_to_bus calls to allow Etherboot relocation. + + 06 Apr 2001 ken_yap@users.sourceforge.net (Ken Yap) + Following email from Hyun-Joon Cha, added a disable routine, otherwise +@@ -63,7 +65,6 @@ + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + #include "timer.h" + + #define RTL_TIMEOUT (1*TICKS_PER_SEC) +@@ -112,9 +113,19 @@ + * definitions we will probably never need to know about. */ + }; + ++enum RxEarlyStatusBits { ++ ERGood=0x08, ERBad=0x04, EROVW=0x02, EROK=0x01 ++}; ++ + enum ChipCmdBits { + CmdReset=0x10, CmdRxEnb=0x08, CmdTxEnb=0x04, RxBufEmpty=0x01, }; + ++enum IntrMaskBits { ++ SERR=0x8000, TimeOut=0x4000, LenChg=0x2000, ++ FOVW=0x40, PUN_LinkChg=0x20, RXOVW=0x10, ++ TER=0x08, TOK=0x04, RER=0x02, ROK=0x01 ++}; ++ + /* Interrupt register bits, using my own meaningful names. */ + enum IntrStatusBits { + PCIErr=0x8000, PCSTimeout=0x4000, CableLenChange= 0x2000, +@@ -155,74 +166,68 @@ + AcceptMulticast=0x04, AcceptMyPhys=0x02, AcceptAllPhys=0x01, + }; + +-static int ioaddr; + static unsigned int cur_rx,cur_tx; + + /* The RTL8139 can only transmit from a contiguous, aligned memory block. */ + static unsigned char tx_buffer[TX_BUF_SIZE] __attribute__((aligned(4))); +- +-/* I know that this is a MEGA HACK, but the tagged boot image specification +- * states that we can do whatever we want below 0x10000 - so we do! */ +-/* But we still give the user the choice of using an internal buffer +- just in case - Ken */ +-#ifdef USE_LOWMEM_BUFFER +-#define rx_ring ((unsigned char *)(0x10000 - (RX_BUF_LEN + 16))) +-#else + static unsigned char rx_ring[RX_BUF_LEN+16] __attribute__((aligned(4))); +-#endif + +-struct nic *rtl8139_probe(struct nic *nic, unsigned short *probeaddrs, +- struct pci_device *pci); +-static int read_eeprom(int location); ++static int rtl8139_probe(struct dev *dev, struct pci_device *pci); ++static int read_eeprom(struct nic *nic, int location, int addr_len); + static void rtl_reset(struct nic *nic); + static void rtl_transmit(struct nic *nic, const char *destaddr, + unsigned int type, unsigned int len, const char *data); +-static int rtl_poll(struct nic *nic); +-static void rtl_disable(struct nic*); ++static int rtl_poll(struct nic *nic, int retrieve); ++static void rtl_disable(struct dev *); ++static void rtl_irq(struct nic *nic, irq_action_t action); + + +-struct nic *rtl8139_probe(struct nic *nic, unsigned short *probeaddrs, +- struct pci_device *pci) ++static int rtl8139_probe(struct dev *dev, struct pci_device *pci) + { ++ struct nic *nic = (struct nic *)dev; + int i; + int speed10, fullduplex; ++ int addr_len; ++ unsigned short *ap = (unsigned short*)nic->node_addr; + + /* There are enough "RTL8139" strings on the console already, so + * be brief and concentrate on the interesting pieces of info... */ + printf(" - "); + + /* Mask the bit that says "this is an io addr" */ +- ioaddr = probeaddrs[0] & ~3; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ++ /* Copy IRQ from PCI information */ ++ nic->irqno = pci->irq; + + adjust_pci_device(pci); + + /* Bring the chip out of low-power mode. */ +- outb(0x00, ioaddr + Config1); +- +- if (read_eeprom(0) != 0xffff) { +- unsigned short *ap = (unsigned short*)nic->node_addr; +- for (i = 0; i < 3; i++) +- *ap++ = read_eeprom(i + 7); +- } else { +- unsigned char *ap = (unsigned char*)nic->node_addr; +- for (i = 0; i < ETH_ALEN; i++) +- *ap++ = inb(ioaddr + MAC0 + i); +- } ++ outb(0x00, nic->ioaddr + Config1); + +- speed10 = inb(ioaddr + MediaStatus) & MSRSpeed10; +- fullduplex = inw(ioaddr + MII_BMCR) & BMCRDuplex; +- printf("ioaddr %#hX, addr %! %sMbps %s-duplex\n", ioaddr, +- nic->node_addr, speed10 ? "10" : "100", +- fullduplex ? "full" : "half"); ++ addr_len = read_eeprom(nic,0,8) == 0x8129 ? 8 : 6; ++ for (i = 0; i < 3; i++) ++ *ap++ = read_eeprom(nic,i + 7,addr_len); ++ ++ speed10 = inb(nic->ioaddr + MediaStatus) & MSRSpeed10; ++ fullduplex = inw(nic->ioaddr + MII_BMCR) & BMCRDuplex; ++ printf("ioaddr %#hX, irq %d, addr %! %sMbps %s-duplex\n", nic->ioaddr, ++ nic->irqno, nic->node_addr, speed10 ? "10" : "100", ++ fullduplex ? "full" : "half"); + + rtl_reset(nic); + +- nic->reset = rtl_reset; +- nic->poll = rtl_poll; ++ if (inb(nic->ioaddr + MediaStatus) & MSRLinkFail) { ++ printf("Cable not connected or other link failure\n"); ++ return(0); ++ } ++ ++ dev->disable = rtl_disable; ++ nic->poll = rtl_poll; + nic->transmit = rtl_transmit; +- nic->disable = rtl_disable; ++ nic->irq = rtl_irq; + +- return nic; ++ return 1; + } + + /* Serial EEPROM section. */ +@@ -244,22 +249,23 @@ + #define eeprom_delay() inl(ee_addr) + + /* The EEPROM commands include the alway-set leading bit. */ +-#define EE_WRITE_CMD (5 << 6) +-#define EE_READ_CMD (6 << 6) +-#define EE_ERASE_CMD (7 << 6) ++#define EE_WRITE_CMD (5) ++#define EE_READ_CMD (6) ++#define EE_ERASE_CMD (7) + +-static int read_eeprom(int location) ++static int read_eeprom(struct nic *nic, int location, int addr_len) + { + int i; + unsigned int retval = 0; +- long ee_addr = ioaddr + Cfg9346; +- int read_cmd = location | EE_READ_CMD; ++ long ee_addr = nic->ioaddr + Cfg9346; ++ int read_cmd = location | (EE_READ_CMD << addr_len); + + outb(EE_ENB & ~EE_CS, ee_addr); + outb(EE_ENB, ee_addr); ++ eeprom_delay(); + + /* Shift the read command bits out. */ +- for (i = 10; i >= 0; i--) { ++ for (i = 4 + addr_len; i >= 0; i--) { + int dataval = (read_cmd & (1 << i)) ? EE_DATA_WRITE : 0; + outb(EE_ENB | dataval, ee_addr); + eeprom_delay(); +@@ -279,31 +285,51 @@ + + /* Terminate the EEPROM access. */ + outb(~EE_CS, ee_addr); ++ eeprom_delay(); + return retval; + } + ++static const unsigned int rtl8139_rx_config = ++ (RX_BUF_LEN_IDX << 11) | ++ (RX_FIFO_THRESH << 13) | ++ (RX_DMA_BURST << 8); ++ ++static void set_rx_mode(struct nic *nic) { ++ unsigned int mc_filter[2]; ++ int rx_mode; ++ /* !IFF_PROMISC */ ++ rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; ++ mc_filter[1] = mc_filter[0] = 0xffffffff; ++ ++ outl(rtl8139_rx_config | rx_mode, nic->ioaddr + RxConfig); ++ ++ outl(mc_filter[0], nic->ioaddr + MAR0 + 0); ++ outl(mc_filter[1], nic->ioaddr + MAR0 + 4); ++} ++ + static void rtl_reset(struct nic* nic) + { + int i; + +- outb(CmdReset, ioaddr + ChipCmd); ++ outb(CmdReset, nic->ioaddr + ChipCmd); + + cur_rx = 0; + cur_tx = 0; + + /* Give the chip 10ms to finish the reset. */ + load_timer2(10*TICKS_PER_MS); +- while ((inb(ioaddr + ChipCmd) & CmdReset) != 0 && timer2_running()) ++ while ((inb(nic->ioaddr + ChipCmd) & CmdReset) != 0 && ++ timer2_running()) + /* wait */; + + for (i = 0; i < ETH_ALEN; i++) +- outb(nic->node_addr[i], ioaddr + MAC0 + i); ++ outb(nic->node_addr[i], nic->ioaddr + MAC0 + i); + + /* Must enable Tx/Rx before setting transfer thresholds! */ +- outb(CmdRxEnb | CmdTxEnb, ioaddr + ChipCmd); ++ outb(CmdRxEnb | CmdTxEnb, nic->ioaddr + ChipCmd); + outl((RX_FIFO_THRESH<<13) | (RX_BUF_LEN_IDX<<11) | (RX_DMA_BURST<<8), +- ioaddr + RxConfig); /* accept no frames yet! */ +- outl((TX_DMA_BURST<<8)|0x03000000, ioaddr + TxConfig); ++ nic->ioaddr + RxConfig); /* accept no frames yet! */ ++ outl((TX_DMA_BURST<<8)|0x03000000, nic->ioaddr + TxConfig); + + /* The Linux driver changes Config1 here to use a different LED pattern + * for half duplex or full/autodetect duplex (for full/autodetect, the +@@ -316,19 +342,26 @@ + #ifdef DEBUG_RX + printf("rx ring address is %X\n",(unsigned long)rx_ring); + #endif +- outl((unsigned long)rx_ring, ioaddr + RxBuf); ++ outl((unsigned long)virt_to_bus(rx_ring), nic->ioaddr + RxBuf); ++ ++ + +- /* Start the chip's Tx and Rx process. */ +- outl(0, ioaddr + RxMissed); +- /* set_rx_mode */ +- outb(AcceptBroadcast|AcceptMyPhys, ioaddr + RxConfig); + /* If we add multicast support, the MAR0 register would have to be + * initialized to 0xffffffffffffffff (two 32 bit accesses). Etherboot + * only needs broadcast (for ARP/RARP/BOOTP/DHCP) and unicast. */ +- outb(CmdRxEnb | CmdTxEnb, ioaddr + ChipCmd); + ++ outb(CmdRxEnb | CmdTxEnb, nic->ioaddr + ChipCmd); ++ ++ outl(rtl8139_rx_config, nic->ioaddr + RxConfig); ++ ++ /* Start the chip's Tx and Rx process. */ ++ outl(0, nic->ioaddr + RxMissed); ++ ++ /* set_rx_mode */ ++ set_rx_mode(nic); ++ + /* Disable all known interrupts by setting the interrupt mask. */ +- outw(0, ioaddr + IntrMask); ++ outw(0, nic->ioaddr + IntrMask); + } + + static void rtl_transmit(struct nic *nic, const char *destaddr, +@@ -337,10 +370,11 @@ + unsigned int status, to, nstype; + unsigned long txstatus; + ++ /* nstype assignment moved up here to avoid gcc 3.0.3 compiler bug */ ++ nstype = htons(type); + memcpy(tx_buffer, destaddr, ETH_ALEN); + memcpy(tx_buffer + ETH_ALEN, nic->node_addr, ETH_ALEN); +- nstype = htons(type); +- memcpy(tx_buffer + 2 * ETH_ALEN, (char*)&nstype, 2); ++ memcpy(tx_buffer + 2 * ETH_ALEN, &nstype, 2); + memcpy(tx_buffer + ETH_HLEN, data, len); + + len += ETH_HLEN; +@@ -354,22 +388,22 @@ + tx_buffer[len++] = '\0'; + } + +- outl((unsigned long)tx_buffer, ioaddr + TxAddr0 + cur_tx*4); ++ outl((unsigned long)virt_to_bus(tx_buffer), nic->ioaddr + TxAddr0 + cur_tx*4); + outl(((TX_FIFO_THRESH<<11) & 0x003f0000) | len, +- ioaddr + TxStatus0 + cur_tx*4); ++ nic->ioaddr + TxStatus0 + cur_tx*4); + + to = currticks() + RTL_TIMEOUT; + + do { +- status = inw(ioaddr + IntrStatus); ++ status = inw(nic->ioaddr + IntrStatus); + /* Only acknlowledge interrupt sources we can properly handle + * here - the RxOverflow/RxFIFOOver MUST be handled in the + * rtl_poll() function. */ +- outw(status & (TxOK | TxErr | PCIErr), ioaddr + IntrStatus); ++ outw(status & (TxOK | TxErr | PCIErr), nic->ioaddr + IntrStatus); + if ((status & (TxOK | TxErr | PCIErr)) != 0) break; + } while (currticks() < to); + +- txstatus = inl(ioaddr+ TxStatus0 + cur_tx*4); ++ txstatus = inl(nic->ioaddr+ TxStatus0 + cur_tx*4); + + if (status & TxOK) { + cur_tx = (cur_tx + 1) % NUM_TX_DESC; +@@ -386,19 +420,22 @@ + } + } + +-static int rtl_poll(struct nic *nic) ++static int rtl_poll(struct nic *nic, int retrieve) + { + unsigned int status; + unsigned int ring_offs; + unsigned int rx_size, rx_status; + +- if (inb(ioaddr + ChipCmd) & RxBufEmpty) { ++ if (inb(nic->ioaddr + ChipCmd) & RxBufEmpty) { + return 0; + } + +- status = inw(ioaddr + IntrStatus); ++ /* There is a packet ready */ ++ if ( ! retrieve ) return 1; ++ ++ status = inw(nic->ioaddr + IntrStatus); + /* See below for the rest of the interrupt acknowledges. */ +- outw(status & ~(RxFIFOOver | RxOverflow | RxOK), ioaddr + IntrStatus); ++ outw(status & ~(RxFIFOOver | RxOverflow | RxOK), nic->ioaddr + IntrStatus); + + #ifdef DEBUG_RX + printf("rtl_poll: int %hX ", status); +@@ -438,21 +475,77 @@ + nic->packet[12], nic->packet[13], rx_status); + #endif + cur_rx = (cur_rx + rx_size + 4 + 3) & ~3; +- outw(cur_rx - 16, ioaddr + RxBufPtr); ++ outw(cur_rx - 16, nic->ioaddr + RxBufPtr); + /* See RTL8139 Programming Guide V0.1 for the official handling of + * Rx overflow situations. The document itself contains basically no + * usable information, except for a few exception handling rules. */ +- outw(status & (RxFIFOOver | RxOverflow | RxOK), ioaddr + IntrStatus); ++ outw(status & (RxFIFOOver | RxOverflow | RxOK), nic->ioaddr + IntrStatus); + return 1; + } + +-static void rtl_disable(struct nic *nic) ++static void rtl_irq(struct nic *nic, irq_action_t action) + { ++ unsigned int mask; ++ /* Bit of a guess as to which interrupts we should allow */ ++ unsigned int interested = ROK | RER | RXOVW | FOVW | SERR; ++ ++ switch ( action ) { ++ case DISABLE : ++ case ENABLE : ++ mask = inw(nic->ioaddr + IntrMask); ++ mask = mask & ~interested; ++ if ( action == ENABLE ) mask = mask | interested; ++ outw(mask, nic->ioaddr + IntrMask); ++ break; ++ case FORCE : ++ /* Apparently writing a 1 to this read-only bit of a ++ * read-only and otherwise unrelated register will ++ * force an interrupt. If you ever want to see how ++ * not to write a datasheet, read the one for the ++ * RTL8139... ++ */ ++ outb(EROK, nic->ioaddr + RxEarlyStatus); ++ break; ++ } ++} ++ ++static void rtl_disable(struct dev *dev) ++{ ++ struct nic *nic = (struct nic *)dev; ++ /* merge reset and disable */ ++ rtl_reset(nic); ++ + /* reset the chip */ +- outb(CmdReset, ioaddr + ChipCmd); ++ outb(CmdReset, nic->ioaddr + ChipCmd); + + /* 10 ms timeout */ + load_timer2(10*TICKS_PER_MS); +- while ((inb(ioaddr + ChipCmd) & CmdReset) != 0 && timer2_running()) ++ while ((inb(nic->ioaddr + ChipCmd) & CmdReset) != 0 && timer2_running()) + /* wait */; + } ++ ++static struct pci_id rtl8139_nics[] = { ++PCI_ROM(0x10ec, 0x8129, "rtl8129", "Realtek 8129"), ++PCI_ROM(0x10ec, 0x8139, "rtl8139", "Realtek 8139"), ++PCI_ROM(0x10ec, 0x8138, "rtl8139b", "Realtek 8139B"), ++PCI_ROM(0x1186, 0x1300, "dfe538", "DFE530TX+/DFE538TX"), ++PCI_ROM(0x1113, 0x1211, "smc1211-1", "SMC EZ10/100"), ++PCI_ROM(0x1112, 0x1211, "smc1211", "SMC EZ10/100"), ++PCI_ROM(0x1500, 0x1360, "delta8139", "Delta Electronics 8139"), ++PCI_ROM(0x4033, 0x1360, "addtron8139", "Addtron Technology 8139"), ++PCI_ROM(0x1186, 0x1340, "dfe690txd", "D-Link DFE690TXD"), ++PCI_ROM(0x13d1, 0xab06, "fe2000vx", "AboCom FE2000VX"), ++PCI_ROM(0x1259, 0xa117, "allied8139", "Allied Telesyn 8139"), ++PCI_ROM(0x14ea, 0xab06, "fnw3603tx", "Planex FNW-3603-TX"), ++PCI_ROM(0x14ea, 0xab07, "fnw3800tx", "Planex FNW-3800-TX"), ++PCI_ROM(0xffff, 0x8139, "clone-rtl8139", "Cloned 8139"), ++}; ++ ++struct pci_driver rtl8139_driver = { ++ .type = NIC_DRIVER, ++ .name = "RTL8139", ++ .probe = rtl8139_probe, ++ .ids = rtl8139_nics, ++ .id_count = sizeof(rtl8139_nics)/sizeof(rtl8139_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/segoff.h +=================================================================== +--- /dev/null ++++ b/netboot/segoff.h +@@ -0,0 +1,43 @@ ++/* ++ * Segment:offset types and macros ++ * ++ * Initially written by Michael Brown (mcb30). ++ */ ++ ++#ifndef SEGOFF_H ++#define SEGOFF_H ++ ++#include ++#include ++ ++/* Segment:offset structure. Note that the order within the structure ++ * is offset:segment. ++ */ ++typedef struct { ++ uint16_t offset; ++ uint16_t segment; ++} segoff_t; ++ ++/* For PXE stuff */ ++typedef segoff_t SEGOFF16_t; ++ ++/* Macros for converting from virtual to segment:offset addresses, ++ * when we don't actually care which of the many isomorphic results we ++ * get. ++ */ ++#ifdef DEBUG_SEGMENT ++uint16_t SEGMENT ( const void * const ptr ) { ++ uint32_t phys = virt_to_phys ( ptr ); ++ if ( phys > 0xfffff ) { ++ printf ( "FATAL ERROR: segment address out of range\n" ); ++ } ++ return phys >> 4; ++} ++#else ++#define SEGMENT(x) ( virt_to_phys ( x ) >> 4 ) ++#endif ++#define OFFSET(x) ( virt_to_phys ( x ) & 0xf ) ++#define SEGOFF(x) { OFFSET(x), SEGMENT(x) } ++#define VIRTUAL(x,y) ( phys_to_virt ( ( ( x ) << 4 ) + ( y ) ) ) ++ ++#endif /* SEGOFF_H */ +Index: b/netboot/sis900.c +=================================================================== +--- a/netboot/sis900.c ++++ b/netboot/sis900.c +@@ -27,6 +27,11 @@ + /* Revision History */ + + /* ++ 07 Dec 2003 timlegge - Enabled Multicast Support ++ 06 Dec 2003 timlegge - Fixed relocation issue in 5.2 ++ 04 Jan 2002 Chien-Yu Chen, Doug Ambrisko, Marty Connor Patch to Etherboot 5.0.5 ++ Added support for the SiS 630ET plus various bug fixes from linux kernel ++ source 2.4.17. + 01 March 2001 mdc 1.0 + Initial Release. Tested with PCI based sis900 card and ThinkNIC + computer. +@@ -35,13 +40,12 @@ + Testet with SIS730S chipset + ICS1893 + */ + +- + /* Includes */ + + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" ++#include "timer.h" + + #include "sis900.h" + +@@ -51,6 +55,7 @@ + + static unsigned short vendor, dev_id; + static unsigned long ioaddr; ++static u8 pci_revision; + + static unsigned int cur_phy; + +@@ -58,15 +63,10 @@ + + static BufferDesc txd; + static BufferDesc rxd[NUM_RX_DESC]; +- +-#ifdef USE_LOWMEM_BUFFER +-#define txb ((char *)0x10000 - TX_BUF_SIZE) +-#define rxb ((char *)0x10000 - NUM_RX_DESC*RX_BUF_SIZE - TX_BUF_SIZE) +-#else + static unsigned char txb[TX_BUF_SIZE]; + static unsigned char rxb[NUM_RX_DESC * RX_BUF_SIZE]; +-#endif + ++#if 0 + static struct mac_chip_info { + const char *name; + u16 vendor_id, device_id, flags; +@@ -78,11 +78,13 @@ + PCI_COMMAND_IO|PCI_COMMAND_MASTER, SIS900_TOTAL_SIZE}, + {0,0,0,0,0} /* 0 terminated list. */ + }; ++#endif + + static void sis900_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); + static void amd79c901_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); + static void ics1893_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); + static void rtl8201_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); ++static void vt6103_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex); + + static struct mii_chip_info { + const char * name; +@@ -96,6 +98,7 @@ + {"AMD 79C901 HomePNA PHY", 0x0000, 0x35c8, amd79c901_read_mode}, + {"ICS 1893 Integrated PHYceiver" , 0x0015, 0xf441,ics1893_read_mode}, + {"RTL 8201 10/100Mbps Phyceiver" , 0x0000, 0x8201,rtl8201_read_mode}, ++ {"VIA 6103 10/100Mbps Phyceiver", 0x0101, 0x8f20,vt6103_read_mode}, + {0,0,0,0} + }; + +@@ -106,24 +109,32 @@ + u16 status; + } mii; + +- + // PCI to ISA bridge for SIS640E access +-static struct pci_device pci_isa_bridge_list[] = { ++static struct pci_id pci_isa_bridge_list[] = { + { 0x1039, 0x0008, +- "SIS 85C503/5513 PCI to ISA bridge", 0, 0, 0, 0}, +- {0, 0, NULL, 0, 0, 0, 0} ++ "SIS 85C503/5513 PCI to ISA bridge"}, ++}; ++ ++struct pci_driver sis_bridge_driver = { ++ .type = BRIDGE_DRIVER, ++ .name = "", ++ .probe = 0, ++ .ids = pci_isa_bridge_list, ++ .id_count = sizeof(pci_isa_bridge_list)/sizeof(pci_isa_bridge_list[0]), ++ .class = 0, + }; + + /* Function Prototypes */ + +-struct nic *sis900_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci); ++static int sis900_probe(struct dev *dev, struct pci_device *pci); + + static u16 sis900_read_eeprom(int location); + static void sis900_mdio_reset(long mdio_addr); + static void sis900_mdio_idle(long mdio_addr); + static u16 sis900_mdio_read(int phy_id, int location); ++#if 0 + static void sis900_mdio_write(int phy_id, int location, int val); +- ++#endif + static void sis900_init(struct nic *nic); + + static void sis900_reset(struct nic *nic); +@@ -136,9 +147,11 @@ + + static void sis900_transmit(struct nic *nic, const char *d, + unsigned int t, unsigned int s, const char *p); +-static int sis900_poll(struct nic *nic); ++static int sis900_poll(struct nic *nic, int retrieve); ++ ++static void sis900_disable(struct dev *dev); + +-static void sis900_disable(struct nic *nic); ++static void sis900_irq(struct nic *nic, irq_action_t action); + + /** + * sis900_get_mac_addr: - Get MAC address for stand alone SiS900 model +@@ -149,7 +162,7 @@ + * MAC address is read from read_eeprom() into @net_dev->dev_addr. + */ + +-static int sis900_get_mac_addr(struct pci_device * pci_dev , struct nic *nic) ++static int sis900_get_mac_addr(struct pci_device * pci_dev __unused, struct nic *nic) + { + u16 signature; + int i; +@@ -168,6 +181,50 @@ + } + + /** ++ * sis96x_get_mac_addr: - Get MAC address for SiS962 or SiS963 model ++ * @pci_dev: the sis900 pci device ++ * @net_dev: the net device to get address for ++ * ++ * SiS962 or SiS963 model, use EEPROM to store MAC address. And EEPROM ++ * is shared by ++ * LAN and 1394. When access EEPROM, send EEREQ signal to hardware first ++ * and wait for EEGNT. If EEGNT is ON, EEPROM is permitted to be access ++ * by LAN, otherwise is not. After MAC address is read from EEPROM, send ++ * EEDONE signal to refuse EEPROM access by LAN. ++ * The EEPROM map of SiS962 or SiS963 is different to SiS900. ++ * The signature field in SiS962 or SiS963 spec is meaningless. ++ * MAC address is read into @net_dev->dev_addr. ++ */ ++ ++static int sis96x_get_mac_addr(struct pci_device * pci_dev __unused, struct nic *nic) ++{ ++/* long ioaddr = net_dev->base_addr; */ ++ long ee_addr = ioaddr + mear; ++ u32 waittime = 0; ++ int i; ++ ++ printf("Alternate function\n"); ++ ++ outl(EEREQ, ee_addr); ++ while(waittime < 2000) { ++ if(inl(ee_addr) & EEGNT) { ++ ++ /* get MAC address from EEPROM */ ++ for (i = 0; i < 3; i++) ++ ((u16 *)(nic->node_addr))[i] = sis900_read_eeprom(i+EEPROMMACAddr); ++ ++ outl(EEDONE, ee_addr); ++ return 1; ++ } else { ++ udelay(1); ++ waittime ++; ++ } ++ } ++ outl(EEDONE, ee_addr); ++ return 0; ++} ++ ++/** + * sis630e_get_mac_addr: - Get MAC address for SiS630E model + * @pci_dev: the sis900 pci device + * @net_dev: the net device to get address for +@@ -177,17 +234,21 @@ + * MAC address is read into @net_dev->dev_addr. + */ + +-static int sis630e_get_mac_addr(struct pci_device * pci_dev, struct nic *nic) ++static int sis630e_get_mac_addr(struct pci_device * pci_dev __unused, struct nic *nic) + { + u8 reg; + int i; +- struct pci_device *p; +- +- // find PCI to ISA bridge +- eth_pci_init(pci_isa_bridge_list); ++ struct pci_device p[1]; + +- /* the firts entry in this list should contain bus/devfn */ +- p = pci_isa_bridge_list; ++ /* find PCI to ISA bridge */ ++ memset(p, 0, sizeof(p)); ++ do { ++ find_pci(BRIDGE_DRIVER, p); ++ } while(p->driver && p->driver != &sis_bridge_driver); ++ ++ /* error on failure */ ++ if (!p->driver) ++ return 0; + + pcibios_read_config_byte(p->bus,p->devfn, 0x48, ®); + pcibios_write_config_byte(p->bus,p->devfn, 0x48, reg | 0x40); +@@ -201,7 +262,43 @@ + + return 1; + } +- ++ ++/** ++ * sis630e_get_mac_addr: - Get MAC address for SiS630E model ++ * @pci_dev: the sis900 pci device ++ * @net_dev: the net device to get address for ++ * ++ * SiS630E model, use APC CMOS RAM to store MAC address. ++ * APC CMOS RAM is accessed through ISA bridge. ++ * MAC address is read into @net_dev->dev_addr. ++ */ ++ ++static int sis635_get_mac_addr(struct pci_device * pci_dev __unused, struct nic *nic) ++{ ++ u32 rfcrSave; ++ u32 i; ++ ++ ++ rfcrSave = inl(rfcr + ioaddr); ++ ++ outl(rfcrSave | RELOAD, ioaddr + cr); ++ outl(0, ioaddr + cr); ++ ++ /* disable packet filtering before setting filter */ ++ outl(rfcrSave & ~RFEN, rfcr + ioaddr); ++ ++ /* load MAC addr to filter data register */ ++ for (i = 0 ; i < 3 ; i++) { ++ outl((i << RFADDR_shift), ioaddr + rfcr); ++ *( ((u16 *)nic->node_addr) + i) = inw(ioaddr + rfdr); ++ } ++ ++ /* enable packet filitering */ ++ outl(rfcrSave | RFEN, rfcr + ioaddr); ++ ++ return 1; ++} ++ + /* + * Function: sis900_probe + * +@@ -216,19 +313,21 @@ + * Returns: struct nic *: pointer to NIC data structure + */ + +-struct nic *sis900_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) ++static int sis900_probe(struct dev *dev, struct pci_device *pci) + { ++ struct nic *nic = (struct nic *)dev; + int i; + int found=0; + int phy_addr; +- u16 signature; + u8 revision; + int ret; + +- if (io_addrs == 0 || *io_addrs == 0) +- return NULL; ++ if (pci->ioaddr == 0) ++ return 0; + +- ioaddr = *io_addrs & ~3; ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ioaddr = pci->ioaddr & ~3; + vendor = pci->vendor; + dev_id = pci->dev_id; + +@@ -240,19 +339,29 @@ + /* get MAC address */ + ret = 0; + pcibios_read_config_byte(pci->bus,pci->devfn, PCI_REVISION, &revision); +- if (revision == SIS630E_900_REV || revision == SIS630EA1_900_REV) +- ret = sis630e_get_mac_addr(pci, nic); +- else if (revision == SIS630S_900_REV) ++ ++ /* save for use later in sis900_reset() */ ++ pci_revision = revision; ++ ++ if (revision == SIS630E_900_REV) + ret = sis630e_get_mac_addr(pci, nic); ++ else if ((revision > 0x81) && (revision <= 0x90)) ++ ret = sis635_get_mac_addr(pci, nic); ++ else if (revision == SIS96x_900_REV) ++ ret = sis96x_get_mac_addr(pci, nic); + else + ret = sis900_get_mac_addr(pci, nic); + + if (ret == 0) + { + printf ("sis900_probe: Error MAC address not found\n"); +- return NULL; ++ return 0; + } + ++ /* 630ET : set the mii access mode as software-mode */ ++ if (revision == SIS630ET_900_REV) ++ outl(ACCESSMODE | inl(ioaddr + cr), ioaddr + cr); ++ + printf("\nsis900_probe: MAC addr %! at ioaddr %#hX\n", + nic->node_addr, ioaddr); + printf("sis900_probe: Vendor:%#hX Device:%#hX\n", vendor, dev_id); +@@ -264,7 +373,7 @@ + for (phy_addr = 0; phy_addr < 32; phy_addr++) { + u16 mii_status; + u16 phy_id0, phy_id1; +- ++ + mii_status = sis900_mdio_read(phy_addr, MII_STATUS); + if (mii_status == 0xffff || mii_status == 0x0000) + /* the mii is not accessable, try next one */ +@@ -272,7 +381,7 @@ + + phy_id0 = sis900_mdio_read(phy_addr, MII_PHY_ID0); + phy_id1 = sis900_mdio_read(phy_addr, MII_PHY_ID1); +- ++ + /* search our mii table for the current mii */ + for (i = 0; mii_chip_table[i].phy_id1; i++) { + +@@ -294,7 +403,7 @@ + + if (found == 0) { + printf("sis900_probe: No MII transceivers found!\n"); +- return NULL; ++ return 0; + } + + /* Arbitrarily select the last PHY found as current PHY */ +@@ -304,15 +413,14 @@ + /* initialize device */ + sis900_init(nic); + +- nic->reset = sis900_init; ++ dev->disable = sis900_disable; + nic->poll = sis900_poll; + nic->transmit = sis900_transmit; +- nic->disable = sis900_disable; ++ nic->irq = sis900_irq; + +- return nic; ++ return 1; + } + +- + /* + * EEPROM Routines: These functions read and write to EEPROM for + * retrieving the MAC address and other configuration information about +@@ -322,7 +430,6 @@ + /* Delay between EEPROM clock transitions. */ + #define eeprom_delay() inl(ee_addr) + +- + /* Function: sis900_read_eeprom + * + * Description: reads and returns a given location from EEPROM +@@ -378,7 +485,6 @@ + + #define sis900_mdio_delay() inl(mdio_addr) + +- + /* + Read and write the MII management registers using software-generated + serial MDIO protocol. Note that the command bits and data bits are +@@ -432,9 +538,11 @@ + outl(MDC, mdio_addr); + sis900_mdio_delay(); + } ++ outl(0x00, mdio_addr); + return retval; + } + ++#if 0 + static void sis900_mdio_write(int phy_id, int location, int value) + { + long mdio_addr = ioaddr + mear; +@@ -471,10 +579,11 @@ + outb(MDC, mdio_addr); + sis900_mdio_delay(); + } ++ outl(0x00, mdio_addr); + return; + } ++#endif + +- + /* Function: sis900_init + * + * Description: resets the ethernet controller chip and various +@@ -500,10 +609,9 @@ + + sis900_check_mode(nic); + +- outl(RxENA, ioaddr + cr); ++ outl(RxENA| inl(ioaddr + cr), ioaddr + cr); + } + +- + /* + * Function: sis900_reset + * +@@ -515,7 +623,7 @@ + */ + + static void +-sis900_reset(struct nic *nic) ++sis900_reset(struct nic *nic __unused) + { + int i = 0; + u32 status = TxRCMP | RxRCMP; +@@ -524,16 +632,19 @@ + outl(0, ioaddr + imr); + outl(0, ioaddr + rfcr); + +- outl(RxRESET | TxRESET | RESET, ioaddr + cr); +- ++ outl(RxRESET | TxRESET | RESET | inl(ioaddr + cr), ioaddr + cr); ++ + /* Check that the chip has finished the reset. */ + while (status && (i++ < 1000)) { + status ^= (inl(isr + ioaddr) & status); + } +- outl(PESEL, ioaddr + cfg); ++ ++ if( (pci_revision == SIS635A_900_REV) || (pci_revision == SIS900B_900_REV) ) ++ outl(PESEL | RND_CNT, ioaddr + cfg); ++ else ++ outl(PESEL, ioaddr + cfg); + } + +- + /* Function: sis_init_rxfilter + * + * Description: sets receive filter address to our MAC address +@@ -552,7 +663,7 @@ + rfcrSave = inl(rfcr + ioaddr); + + /* disable packet filtering before setting filter */ +- outl(rfcrSave & ~RFEN, rfcr); ++ outl(rfcrSave & ~RFEN, rfcr + ioaddr); + + /* load MAC addr to filter data register */ + for (i = 0 ; i < 3 ; i++) { +@@ -571,7 +682,6 @@ + outl(rfcrSave | RFEN, rfcr + ioaddr); + } + +- + /* + * Function: sis_init_txd + * +@@ -583,20 +693,19 @@ + */ + + static void +-sis900_init_txd(struct nic *nic) ++sis900_init_txd(struct nic *nic __unused) + { + txd.link = (u32) 0; + txd.cmdsts = (u32) 0; +- txd.bufptr = (u32) &txb[0]; ++ txd.bufptr = virt_to_bus(&txb[0]); + + /* load Transmit Descriptor Register */ +- outl((u32) &txd, ioaddr + txdp); ++ outl(virt_to_bus(&txd), ioaddr + txdp); + if (sis900_debug > 0) + printf("sis900_init_txd: TX descriptor register loaded with: %X\n", + inl(ioaddr + txdp)); + } + +- + /* Function: sis_init_rxd + * + * Description: initializes the Rx descriptor ring +@@ -607,7 +716,7 @@ + */ + + static void +-sis900_init_rxd(struct nic *nic) ++sis900_init_rxd(struct nic *nic __unused) + { + int i; + +@@ -615,16 +724,16 @@ + + /* init RX descriptor */ + for (i = 0; i < NUM_RX_DESC; i++) { +- rxd[i].link = (i+1 < NUM_RX_DESC) ? (u32) &rxd[i+1] : (u32) &rxd[0]; ++ rxd[i].link = virt_to_bus((i+1 < NUM_RX_DESC) ? &rxd[i+1] : &rxd[0]); + rxd[i].cmdsts = (u32) RX_BUF_SIZE; +- rxd[i].bufptr = (u32) &rxb[i*RX_BUF_SIZE]; ++ rxd[i].bufptr = virt_to_bus(&rxb[i*RX_BUF_SIZE]); + if (sis900_debug > 0) + printf("sis900_init_rxd: rxd[%d]=%X link=%X cmdsts=%X bufptr=%X\n", + i, &rxd[i], rxd[i].link, rxd[i].cmdsts, rxd[i].bufptr); + } + + /* load Receive Descriptor Register */ +- outl((u32) &rxd[0], ioaddr + rxdp); ++ outl(virt_to_bus(&rxd[0]), ioaddr + rxdp); + + if (sis900_debug > 0) + printf("sis900_init_rxd: RX descriptor register loaded with: %X\n", +@@ -632,7 +741,6 @@ + + } + +- + /* Function: sis_init_rxd + * + * Description: +@@ -644,25 +752,36 @@ + * Returns: void. + */ + +-static void sis900_set_rx_mode(struct nic *nic) ++static void sis900_set_rx_mode(struct nic *nic __unused) + { +- int i; ++ int i, table_entries; ++ u32 rx_mode; ++ u16 mc_filter[16] = {0}; /* 256/128 bits multicast hash table */ ++ ++ if((pci_revision == SIS635A_900_REV) || (pci_revision == SIS900B_900_REV)) ++ table_entries = 16; ++ else ++ table_entries = 8; + +- /* Configure Multicast Hash Table in Receive Filter +- to reject all MCAST packets */ +- for (i = 0; i < 8; i++) { ++ /* accept all multicast packet */ ++ rx_mode = RFAAB | RFAAM; ++ for (i = 0; i < table_entries; i++) ++ mc_filter[i] = 0xffff; ++ ++ /* update Multicast Hash Table in Receive Filter */ ++ for (i = 0; i < table_entries; i++) { + /* why plus 0x04? That makes the correct value for hash table. */ + outl((u32)(0x00000004+i) << RFADDR_shift, ioaddr + rfcr); +- outl((u32)(0x0), ioaddr + rfdr); ++ outl(mc_filter[i], ioaddr + rfdr); + } +- /* Accept Broadcast packets, destination addresses that match ++ ++ /* Accept Broadcast and multicast packets, destination addresses that match + our MAC address */ +- outl(RFEN | RFAAB, ioaddr + rfcr); ++ outl(RFEN | rx_mode, ioaddr + rfcr); + + return; + } + +- + /* Function: sis900_check_mode + * + * Description: checks the state of transmit and receive +@@ -674,15 +793,21 @@ + */ + + static void +-sis900_check_mode (struct nic *nic) ++sis900_check_mode(struct nic *nic) + { + int speed, duplex; + u32 tx_flags = 0, rx_flags = 0; + + mii.chip_info->read_mode(nic, cur_phy, &speed, &duplex); + +- tx_flags = TxATP | (TX_DMA_BURST << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); +- rx_flags = RX_DMA_BURST << RxMXDMA_shift; ++ if( inl(ioaddr + cfg) & EDB_MASTER_EN ) { ++ tx_flags = TxATP | (DMA_BURST_64 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); ++ rx_flags = DMA_BURST_64 << RxMXDMA_shift; ++ } ++ else { ++ tx_flags = TxATP | (DMA_BURST_512 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); ++ rx_flags = DMA_BURST_512 << RxMXDMA_shift; ++ } + + if (speed == HW_SPEED_HOME || speed == HW_SPEED_10_MBPS) { + rx_flags |= (RxDRNT_10 << RxDRNT_shift); +@@ -702,7 +827,6 @@ + outl (rx_flags, ioaddr + rxcfg); + } + +- + /* Function: sis900_read_mode + * + * Description: retrieves and displays speed and duplex +@@ -714,24 +838,33 @@ + */ + + static void +-sis900_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex) ++sis900_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) + { + int i = 0; + u32 status; ++ u16 phy_id0, phy_id1; + + /* STSOUT register is Latched on Transition, read operation updates it */ + while (i++ < 2) + status = sis900_mdio_read(phy_addr, MII_STSOUT); + +- if (status & MII_STSOUT_SPD) +- *speed = HW_SPEED_100_MBPS; +- else +- *speed = HW_SPEED_10_MBPS; +- +- if (status & MII_STSOUT_DPLX) +- *duplex = FDX_CAPABLE_FULL_SELECTED; +- else +- *duplex = FDX_CAPABLE_HALF_SELECTED; ++ *speed = HW_SPEED_10_MBPS; ++ *duplex = FDX_CAPABLE_HALF_SELECTED; ++ ++ if (status & (MII_NWAY_TX | MII_NWAY_TX_FDX)) ++ *speed = HW_SPEED_100_MBPS; ++ if (status & ( MII_NWAY_TX_FDX | MII_NWAY_T_FDX)) ++ *duplex = FDX_CAPABLE_FULL_SELECTED; ++ ++ /* Workaround for Realtek RTL8201 PHY issue */ ++ phy_id0 = sis900_mdio_read(phy_addr, MII_PHY_ID0); ++ phy_id1 = sis900_mdio_read(phy_addr, MII_PHY_ID1); ++ if((phy_id0 == 0x0000) && ((phy_id1 & 0xFFF0) == 0x8200)){ ++ if(sis900_mdio_read(phy_addr, MII_CONTROL) & MII_CNTL_FDX) ++ *duplex = FDX_CAPABLE_FULL_SELECTED; ++ if(sis900_mdio_read(phy_addr, 0x0019) & 0x01) ++ *speed = HW_SPEED_100_MBPS; ++ } + + if (status & MII_STSOUT_LINK_FAIL) + printf("sis900_read_mode: Media Link Off\n"); +@@ -743,7 +876,6 @@ + "full" : "half"); + } + +- + /* Function: amd79c901_read_mode + * + * Description: retrieves and displays speed and duplex +@@ -755,7 +887,7 @@ + */ + + static void +-amd79c901_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex) ++amd79c901_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) + { + int i; + u16 status; +@@ -796,7 +928,6 @@ + } + } + +- + /** + * ics1893_read_mode: - read media mode for ICS1893 PHY + * @net_dev: the net device to read mode for +@@ -808,7 +939,7 @@ + * to determine the speed and duplex mode for sis900 + */ + +-static void ics1893_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex) ++static void ics1893_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) + { + int i = 0; + u32 status; +@@ -848,7 +979,7 @@ + * to determine the speed and duplex mode for sis900 + */ + +-static void rtl8201_read_mode(struct nic *nic, int phy_addr, int *speed, int *duplex) ++static void rtl8201_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) + { + u32 status; + +@@ -878,7 +1009,51 @@ + *duplex == FDX_CAPABLE_FULL_SELECTED ? + "full" : "half"); + else +- printf("rtl9201_read_config_mode: Media Link Off\n"); ++ printf("rtl8201_read_config_mode: Media Link Off\n"); ++} ++ ++/** ++ * vt6103_read_mode: - read media mode for vt6103 phy ++ * @nic: the net device to read mode for ++ * @phy_addr: mii phy address ++ * @speed: the transmit speed to be determined ++ * @duplex: the duplex mode to be determined ++ * ++ * read MII_STATUS register from rtl8201 phy ++ * to determine the speed and duplex mode for sis900 ++ */ ++ ++static void vt6103_read_mode(struct nic *nic __unused, int phy_addr, int *speed, int *duplex) ++{ ++ u32 status; ++ ++ status = sis900_mdio_read(phy_addr, MII_STATUS); ++ ++ if (status & MII_STAT_CAN_TX_FDX) { ++ *speed = HW_SPEED_100_MBPS; ++ *duplex = FDX_CAPABLE_FULL_SELECTED; ++ } ++ else if (status & MII_STAT_CAN_TX) { ++ *speed = HW_SPEED_100_MBPS; ++ *duplex = FDX_CAPABLE_HALF_SELECTED; ++ } ++ else if (status & MII_STAT_CAN_T_FDX) { ++ *speed = HW_SPEED_10_MBPS; ++ *duplex = FDX_CAPABLE_FULL_SELECTED; ++ } ++ else if (status & MII_STAT_CAN_T) { ++ *speed = HW_SPEED_10_MBPS; ++ *duplex = FDX_CAPABLE_HALF_SELECTED; ++ } ++ ++ if (status & MII_STAT_LINK) ++ printf("vt6103_read_mode: Media Link On %s %s-duplex \n", ++ *speed == HW_SPEED_100_MBPS ? ++ "100mbps" : "10mbps", ++ *duplex == FDX_CAPABLE_FULL_SELECTED ? ++ "full" : "half"); ++ else ++ printf("vt6103_read_config_mode: Media Link Off\n"); + } + + /* Function: sis900_transmit +@@ -900,14 +1075,14 @@ + unsigned int s, /* size */ + const char *p) /* Packet */ + { +- u32 status, to, nstype; ++ u32 to, nstype; + volatile u32 tx_status; + + /* Stop the transmitter */ +- outl(TxDIS, ioaddr + cr); ++ outl(TxDIS | inl(ioaddr + cr), ioaddr + cr); + + /* load Transmit Descriptor Register */ +- outl((u32) &txd, ioaddr + txdp); ++ outl(virt_to_bus(&txd), ioaddr + txdp); + if (sis900_debug > 1) + printf("sis900_transmit: TX descriptor register loaded with: %X\n", + inl(ioaddr + txdp)); +@@ -929,18 +1104,18 @@ + txb[s++] = '\0'; + + /* set the transmit buffer descriptor and enable Transmit State Machine */ +- txd.bufptr = (u32) &txb[0]; ++ txd.bufptr = virt_to_bus(&txb[0]); + txd.cmdsts = (u32) OWN | s; + + /* restart the transmitter */ +- outl(TxENA, ioaddr + cr); ++ outl(TxENA | inl(ioaddr + cr), ioaddr + cr); + + if (sis900_debug > 1) + printf("sis900_transmit: Queued Tx packet size %d.\n", (int) s); + + to = currticks() + TX_TIMEOUT; + +- while (((tx_status=txd.cmdsts) & OWN) && (currticks() < to)) ++ while (((tx_status=txd.cmdsts & OWN) && (currticks() < to)) + /* wait */ ; + + if (currticks() >= to) { +@@ -955,7 +1130,6 @@ + outl(0, ioaddr + imr); + } + +- + /* Function: sis900_poll + * + * Description: checks for a received packet and returns it if found. +@@ -971,7 +1145,7 @@ + */ + + static int +-sis900_poll(struct nic *nic) ++sis900_poll(struct nic *nic, int retrieve) + { + u32 rx_status = rxd[cur_rx].cmdsts; + int retstat = 0; +@@ -986,6 +1160,8 @@ + printf("sis900_poll: got a packet: cur_rx:%d, status:%X\n", + cur_rx, rx_status); + ++ if ( ! retrieve ) return 1; ++ + nic->packetlen = (rx_status & DSIZE) - CRC_SIZE; + + if (rx_status & (ABORT|OVERRUN|TOOLONG|RUNT|RXISERR|CRCERR|FAERR)) { +@@ -1001,18 +1177,18 @@ + + /* return the descriptor and buffer to receive ring */ + rxd[cur_rx].cmdsts = RX_BUF_SIZE; +- rxd[cur_rx].bufptr = (u32) &rxb[cur_rx*RX_BUF_SIZE]; ++ rxd[cur_rx].bufptr = virt_to_bus(&rxb[cur_rx*RX_BUF_SIZE]); + + if (++cur_rx == NUM_RX_DESC) + cur_rx = 0; + + /* re-enable the potentially idle receive state machine */ +- outl(RxENA , ioaddr + cr); ++ outl(RxENA | inl(ioaddr + cr), ioaddr + cr); + + return retstat; ++ + } + +- + /* Function: sis900_disable + * + * Description: Turns off interrupts and stops Tx and Rx engines +@@ -1023,12 +1199,53 @@ + */ + + static void +-sis900_disable(struct nic *nic) ++sis900_disable(struct dev *dev) + { ++ struct nic *nic = (struct nic *)dev; ++ /* merge reset and disable */ ++ sis900_init(nic); ++ + /* Disable interrupts by clearing the interrupt mask. */ + outl(0, ioaddr + imr); + outl(0, ioaddr + ier); + + /* Stop the chip's Tx and Rx Status Machine */ +- outl(RxDIS | TxDIS, ioaddr + cr); ++ outl(RxDIS | TxDIS | inl(ioaddr + cr), ioaddr + cr); ++} ++ ++/* Function: sis900_irq ++ * ++ * Description: Enable, Disable, or Force, interrupts ++ * ++ * Arguments: struct nic *nic: NIC data structure ++ * irq_action_t action: Requested action ++ * ++ * Returns: void. ++ */ ++ ++static void ++sis900_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } + } ++ ++static struct pci_id sis900_nics[] = { ++PCI_ROM(0x1039, 0x0900, "sis900", "SIS900"), ++PCI_ROM(0x1039, 0x7016, "sis7016", "SIS7016"), ++}; ++ ++struct pci_driver sis900_driver = { ++ .type = NIC_DRIVER, ++ .name = "SIS900", ++ .probe = sis900_probe, ++ .ids = sis900_nics, ++ .id_count = sizeof(sis900_nics)/sizeof(sis900_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/sis900.h +=================================================================== +--- a/netboot/sis900.h ++++ b/netboot/sis900.h +@@ -39,14 +39,16 @@ + + /* Symbolic names for bits in various registers */ + enum sis900_command_register_bits { +- RESET = 0x00000100, +- SWI = 0x00000080, +- RxRESET = 0x00000020, +- TxRESET = 0x00000010, +- RxDIS = 0x00000008, +- RxENA = 0x00000004, +- TxDIS = 0x00000002, +- TxENA = 0x00000001 ++ RELOAD = 0x00000400, ++ ACCESSMODE = 0x00000200, ++ RESET = 0x00000100, ++ SWI = 0x00000080, ++ RxRESET = 0x00000020, ++ TxRESET = 0x00000010, ++ RxDIS = 0x00000008, ++ RxENA = 0x00000004, ++ TxDIS = 0x00000002, ++ TxENA = 0x00000001 + }; + + enum sis900_configuration_register_bits { +@@ -57,7 +59,10 @@ + EXD = 0x00000010, + PESEL = 0x00000008, + LPM = 0x00000004, +- BEM = 0x00000001 ++ BEM = 0x00000001, ++ RND_CNT = 0x00000400, ++ FAIR_BACKOFF = 0x00000200, ++ EDB_MASTER_EN = 0x00002000 + }; + + enum sis900_eeprom_access_reigster_bits { +@@ -108,6 +113,10 @@ + #define TX_DMA_BURST 0 + #define RX_DMA_BURST 0 + ++enum sis900_tx_rx_dma{ ++ DMA_BURST_512 = 0, DMA_BURST_64 = 5 ++}; ++ + /* transmit FIFO threshholds */ + #define TX_FILL_THRESH 16 /* 1/4 FIFO size */ + #define TxFILLT_shift 8 +@@ -172,6 +181,11 @@ + EEeraseAll = 0x0120, + EEwriteAll = 0x0110, + EEaddrMask = 0x013F, ++ EEcmdShift = 16 ++}; ++/* For SiS962 or SiS963, request the eeprom software access */ ++enum sis96x_eeprom_command { ++ EEREQ = 0x00000400, EEDONE = 0x00000200, EEGNT = 0x00000100 + }; + + /* Manamgement Data I/O (mdio) frame */ +@@ -236,7 +250,8 @@ + MII_CONFIG1 = 0x0010, + MII_CONFIG2 = 0x0011, + MII_STSOUT = 0x0012, +- MII_MASK = 0x0013 ++ MII_MASK = 0x0013, ++ MII_RESV = 0x0014 + }; + + /* mii registers specific to AMD 79C901 */ +@@ -320,7 +335,9 @@ + + enum sis900_revision_id { + SIS630A_900_REV = 0x80, SIS630E_900_REV = 0x81, +- SIS630S_900_REV = 0x82, SIS630EA1_900_REV = 0x83 ++ SIS630S_900_REV = 0x82, SIS630EA1_900_REV = 0x83, ++ SIS630ET_900_REV = 0x84, SIS635A_900_REV = 0x90, ++ SIS96x_900_REV = 0X91, SIS900B_900_REV = 0x03 + }; + + enum sis630_revision_id { +Index: b/netboot/sis900.txt +=================================================================== +--- a/netboot/sis900.txt ++++ /dev/null +@@ -1,91 +0,0 @@ +-How I added the SIS900 card to Etherboot +- +-Author: Marty Connor (mdc@thinguin.org) +- +-Date: 25 Febrary 2001 +- +-Description: +- +-This file is intended to help people who want to write an Etherboot +-driver or port another driver to Etherboot. It is a starting point. +-Perhaps someday I may write a more detailed description of writing an +-Etherboot driver. This text should help get people started, and +-studying sis900.[ch] should help show the basic structure and +-techniques involved in writing and Etherboot driver. +- +-*********************************************************************** +- +-0. Back up all the files I need to modify: +- +-cd etherboot-4.7.20/src +-cp Makefile Makefile.orig +-cp config.c config.c.orig +-cp pci.h pci.h.orig +-cp NIC NIC.orig +-cp cards.h cards.h.orig +- +-1. Edit src/Makefile to add SIS900FLAGS to defines +- +-SIS900FLAGS= -DINCLUDE_SIS900 +- +-2. edit src/pci.h to add PCI signatures for card +- +-#define PCI_VENDOR_ID_SIS 0x1039 +-#define PCI_DEVICE_ID_SIS900 0x0900 +-#define PCI_DEVICE_ID_SIS7016 0x7016 +- +-3. Edit src/config.c to add the card to the card probe list +- +-#if defined(INCLUDE_NS8390) || defined(INCLUDE_EEPRO100) || +- defined(INCLUDE_LANCE) || defined(INCLUDE_EPIC100) || +- defined(INCLUDE_TULIP) || defined(INCLUDE_OTULIP) || +- defined(INCLUDE_3C90X) || defined(INCLUDE_3C595) || +- defined(INCLUDE_RTL8139) || defined(INCLUDE_VIA_RHINE) || +- defined(INCLUDE_SIS900) || defined(INCLUDE_W89C840) +- +-... and ... +- +-#ifdef INCLUDE_SIS900 +- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS900, +- "SIS900", 0, 0, 0, 0}, +- { PCI_VENDOR_ID_SIS, PCI_DEVICE_ID_SIS7016, +- "SIS7016", 0, 0, 0, 0}, +-#endif +- +-... and ... +- +-#ifdef INCLUDE_SIS900 +- { "SIS900", sis900_probe, pci_ioaddrs }, +-#endif +- +-4. Edit NIC to add sis900 and sis7016 to NIC list +- +-# SIS 900 and SIS 7016 +-sis900 sis900 0x1039,0x0900 +-sis7016 sis900 0x1039,0x7016 +- +-5. Edit cards.h to add sis900 probe routine declaration +- +-#ifdef INCLUDE_SIS900 +-extern struct nic *sis900_probe(struct nic *, unsigned short * +- PCI_ARG(struct pci_device *)); +-#endif +- +-*********************************************************************** +- +-At this point, you can begin creating your driver source file. See +-the "Writing and Etherboot Driver" section of the Etherboot +-documentation for some hints. See the skel.c file for a starting +-point. If there is a Linux driver for the card, you may be able to +-use that. Copy and learn from existing Etherboot drivers (this is GPL +-/ Open Source software!). +- +-Join the etherboot-developers and etherboot-users mailing lists +-(information is on etherboot.sourceforge.net) for information and +-assistance. We invite more developers to help improve Etherboot. +- +-Visit the http://etherboot.sourceforge.net, http://thinguin.org, +-http://rom-o-matic.net, and http://ltsp.org sites for information and +-assistance. +- +-Enjoy. +Index: b/netboot/smc9000.c +=================================================================== +--- a/netboot/smc9000.c ++++ /dev/null +@@ -1,522 +0,0 @@ +- /*------------------------------------------------------------------------ +- * smc9000.c +- * This is a Etherboot driver for SMC's 9000 series of Ethernet cards. +- * +- * Copyright (C) 1998 Daniel Engström +- * Based on the Linux SMC9000 driver, smc9194.c by Eric Stahlman +- * Copyright (C) 1996 by Erik Stahlman +- * +- * This software may be used and distributed according to the terms +- * of the GNU Public License, incorporated herein by reference. +- * +- * "Features" of the SMC chip: +- * 4608 byte packet memory. ( for the 91C92/4. Others have more ) +- * EEPROM for configuration +- * AUI/TP selection +- * +- * Authors +- * Erik Stahlman +- * Daniel Engström +- * +- * History +- * 98-09-25 Daniel Engström Etherboot driver crated from Eric's +- * Linux driver. +- * +- *---------------------------------------------------------------------------*/ +-#define LINUX_OUT_MACROS 1 +-#define SMC9000_VERBOSE 1 +-#define SMC9000_DEBUG 0 +- +-#include "etherboot.h" +-#include "nic.h" +-#include "cards.h" +-#include "smc9000.h" +- +-# define _outb outb +-# define _outw outw +- +-static const char smc9000_version[] = "Version 0.99 98-09-30"; +-static unsigned int smc9000_base=0; +-static const char *interfaces[ 2 ] = { "TP", "AUI" }; +-static const char *chip_ids[ 15 ] = { +- NULL, NULL, NULL, +- /* 3 */ "SMC91C90/91C92", +- /* 4 */ "SMC91C94", +- /* 5 */ "SMC91C95", +- NULL, +- /* 7 */ "SMC91C100", +- /* 8 */ "SMC91C100FD", +- NULL, NULL, NULL, +- NULL, NULL, NULL +-}; +-static const char smc91c96_id[] = "SMC91C96"; +- +-/* +- * Function: smc_reset( int ioaddr ) +- * Purpose: +- * This sets the SMC91xx chip to its normal state, hopefully from whatever +- * mess that any other DOS driver has put it in. +- * +- * Maybe I should reset more registers to defaults in here? SOFTRESET should +- * do that for me. +- * +- * Method: +- * 1. send a SOFT RESET +- * 2. wait for it to finish +- * 3. reset the memory management unit +- * 4. clear all interrupts +- * +-*/ +-static void smc_reset(int ioaddr) +-{ +- /* This resets the registers mostly to defaults, but doesn't +- * affect EEPROM. That seems unnecessary */ +- SMC_SELECT_BANK(ioaddr, 0); +- _outw( RCR_SOFTRESET, ioaddr + RCR ); +- +- /* this should pause enough for the chip to be happy */ +- SMC_DELAY(ioaddr); +- +- /* Set the transmit and receive configuration registers to +- * default values */ +- _outw(RCR_CLEAR, ioaddr + RCR); +- _outw(TCR_CLEAR, ioaddr + TCR); +- +- /* Reset the MMU */ +- SMC_SELECT_BANK(ioaddr, 2); +- _outw( MC_RESET, ioaddr + MMU_CMD ); +- +- /* Note: It doesn't seem that waiting for the MMU busy is needed here, +- * but this is a place where future chipsets _COULD_ break. Be wary +- * of issuing another MMU command right after this */ +- _outb(0, ioaddr + INT_MASK); +-} +- +- +-/*---------------------------------------------------------------------- +- * Function: smc_probe( int ioaddr ) +- * +- * Purpose: +- * Tests to see if a given ioaddr points to an SMC9xxx chip. +- * Returns a 0 on success +- * +- * Algorithm: +- * (1) see if the high byte of BANK_SELECT is 0x33 +- * (2) compare the ioaddr with the base register's address +- * (3) see if I recognize the chip ID in the appropriate register +- * +- * --------------------------------------------------------------------- +- */ +-static int smc_probe( int ioaddr ) +-{ +- word bank; +- word revision_register; +- word base_address_register; +- +- /* First, see if the high byte is 0x33 */ +- bank = inw(ioaddr + BANK_SELECT); +- if ((bank & 0xFF00) != 0x3300) { +- return -1; +- } +- /* The above MIGHT indicate a device, but I need to write to further +- * test this. */ +- _outw(0x0, ioaddr + BANK_SELECT); +- bank = inw(ioaddr + BANK_SELECT); +- if ((bank & 0xFF00) != 0x3300) { +- return -1; +- } +- +- /* well, we've already written once, so hopefully another time won't +- * hurt. This time, I need to switch the bank register to bank 1, +- * so I can access the base address register */ +- SMC_SELECT_BANK(ioaddr, 1); +- base_address_register = inw(ioaddr + BASE); +- +- if (ioaddr != (base_address_register >> 3 & 0x3E0)) { +-#ifdef SMC9000_VERBOSE +- printf("SMC9000: IOADDR %hX doesn't match configuration (%hX)." +- "Probably not a SMC chip\n", +- ioaddr, base_address_register >> 3 & 0x3E0); +-#endif +- /* well, the base address register didn't match. Must not have +- * been a SMC chip after all. */ +- return -1; +- } +- +- +- /* check if the revision register is something that I recognize. +- * These might need to be added to later, as future revisions +- * could be added. */ +- SMC_SELECT_BANK(ioaddr, 3); +- revision_register = inw(ioaddr + REVISION); +- if (!chip_ids[(revision_register >> 4) & 0xF]) { +- /* I don't recognize this chip, so... */ +-#ifdef SMC9000_VERBOSE +- printf("SMC9000: IO %hX: Unrecognized revision register:" +- " %hX, Contact author.\n", ioaddr, revision_register); +-#endif +- return -1; +- } +- +- /* at this point I'll assume that the chip is an SMC9xxx. +- * It might be prudent to check a listing of MAC addresses +- * against the hardware address, or do some other tests. */ +- return 0; +-} +- +- +-/************************************************************************** +- * ETH_RESET - Reset adapter +- ***************************************************************************/ +- +-static void smc9000_reset(struct nic *nic) +-{ +- smc_reset(smc9000_base); +-} +- +-/************************************************************************** +- * ETH_TRANSMIT - Transmit a frame +- ***************************************************************************/ +-static void smc9000_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- word length; /* real, length incl. header */ +- word numPages; +- unsigned long time_out; +- byte packet_no; +- word status; +- int i; +- +- /* We dont pad here since we can have the hardware doing it for us */ +- length = (s + ETH_HLEN + 1)&~1; +- +- /* convert to MMU pages */ +- numPages = length / 256; +- +- if (numPages > 7 ) { +-#ifdef SMC9000_VERBOSE +- printf("SMC9000: Far too big packet error. \n"); +-#endif +- return; +- } +- +- /* dont try more than, say 30 times */ +- for (i=0;i<30;i++) { +- /* now, try to allocate the memory */ +- SMC_SELECT_BANK(smc9000_base, 2); +- _outw(MC_ALLOC | numPages, smc9000_base + MMU_CMD); +- +- status = 0; +- /* wait for the memory allocation to finnish */ +- for (time_out = currticks() + 5*TICKS_PER_SEC; currticks() < time_out; ) { +- status = inb(smc9000_base + INTERRUPT); +- if ( status & IM_ALLOC_INT ) { +- /* acknowledge the interrupt */ +- _outb(IM_ALLOC_INT, smc9000_base + INTERRUPT); +- break; +- } +- } +- +- if ((status & IM_ALLOC_INT) != 0 ) { +- /* We've got the memory */ +- break; +- } else { +- printf("SMC9000: Memory allocation timed out, resetting MMU.\n"); +- _outw(MC_RESET, smc9000_base + MMU_CMD); +- } +- } +- +- /* If I get here, I _know_ there is a packet slot waiting for me */ +- packet_no = inb(smc9000_base + PNR_ARR + 1); +- if (packet_no & 0x80) { +- /* or isn't there? BAD CHIP! */ +- printf("SMC9000: Memory allocation failed. \n"); +- return; +- } +- +- /* we have a packet address, so tell the card to use it */ +- _outb(packet_no, smc9000_base + PNR_ARR); +- +- /* point to the beginning of the packet */ +- _outw(PTR_AUTOINC, smc9000_base + POINTER); +- +-#if SMC9000_DEBUG > 2 +- printf("Trying to xmit packet of length %hX\n", length ); +-#endif +- +- /* send the packet length ( +6 for status, length and ctl byte ) +- * and the status word ( set to zeros ) */ +- _outw(0, smc9000_base + DATA_1 ); +- +- /* send the packet length ( +6 for status words, length, and ctl) */ +- _outb((length+6) & 0xFF, smc9000_base + DATA_1); +- _outb((length+6) >> 8 , smc9000_base + DATA_1); +- +- /* Write the contents of the packet */ +- +- /* The ethernet header first... */ +- outsw(smc9000_base + DATA_1, d, ETH_ALEN >> 1); +- outsw(smc9000_base + DATA_1, nic->node_addr, ETH_ALEN >> 1); +- _outw(htons(t), smc9000_base + DATA_1); +- +- /* ... the data ... */ +- outsw(smc9000_base + DATA_1 , p, s >> 1); +- +- /* ... and the last byte, if there is one. */ +- if ((s & 1) == 0) { +- _outw(0, smc9000_base + DATA_1); +- } else { +- _outb(p[s-1], smc9000_base + DATA_1); +- _outb(0x20, smc9000_base + DATA_1); +- } +- +- /* and let the chipset deal with it */ +- _outw(MC_ENQUEUE , smc9000_base + MMU_CMD); +- +- status = 0; time_out = currticks() + 5*TICKS_PER_SEC; +- do { +- status = inb(smc9000_base + INTERRUPT); +- +- if ((status & IM_TX_INT ) != 0) { +- word tx_status; +- +- /* ack interrupt */ +- _outb(IM_TX_INT, smc9000_base + INTERRUPT); +- +- packet_no = inw(smc9000_base + FIFO_PORTS); +- packet_no &= 0x7F; +- +- /* select this as the packet to read from */ +- _outb( packet_no, smc9000_base + PNR_ARR ); +- +- /* read the first word from this packet */ +- _outw( PTR_AUTOINC | PTR_READ, smc9000_base + POINTER ); +- +- tx_status = inw( smc9000_base + DATA_1 ); +- +- if (0 == (tx_status & TS_SUCCESS)) { +-#ifdef SMC9000_VERBOSE +- printf("SMC9000: TX FAIL STATUS: %hX \n", tx_status); +-#endif +- /* re-enable transmit */ +- SMC_SELECT_BANK(smc9000_base, 0); +- _outw(inw(smc9000_base + TCR ) | TCR_ENABLE, smc9000_base + TCR ); +- } +- +- /* kill the packet */ +- SMC_SELECT_BANK(smc9000_base, 2); +- _outw(MC_FREEPKT, smc9000_base + MMU_CMD); +- +- return; +- } +- }while(currticks() < time_out); +- +- printf("SMC9000: Waring TX timed out, resetting board\n"); +- smc_reset(smc9000_base); +- return; +-} +- +-/************************************************************************** +- * ETH_POLL - Wait for a frame +- ***************************************************************************/ +-static int smc9000_poll(struct nic *nic) +-{ +- if(!smc9000_base) +- return 0; +- +- SMC_SELECT_BANK(smc9000_base, 2); +- if (inw(smc9000_base + FIFO_PORTS) & FP_RXEMPTY) +- return 0; +- +- /* start reading from the start of the packet */ +- _outw(PTR_READ | PTR_RCV | PTR_AUTOINC, smc9000_base + POINTER); +- +- /* First read the status and check that we're ok */ +- if (!(inw(smc9000_base + DATA_1) & RS_ERRORS)) { +- /* Next: read the packet length and mask off the top bits */ +- nic->packetlen = (inw(smc9000_base + DATA_1) & 0x07ff); +- +- /* the packet length includes the 3 extra words */ +- nic->packetlen -= 6; +-#if SMC9000_DEBUG > 2 +- printf(" Reading %d words (and %d byte(s))\n", +- (nic->packetlen >> 1), nic->packetlen & 1); +-#endif +- /* read the packet (and the last "extra" word) */ +- insw(smc9000_base + DATA_1, nic->packet, (nic->packetlen+2) >> 1); +- /* is there an odd last byte ? */ +- if (nic->packet[nic->packetlen+1] & 0x20) +- nic->packetlen++; +- +- /* error or good, tell the card to get rid of this packet */ +- _outw(MC_RELEASE, smc9000_base + MMU_CMD); +- return 1; +- } +- +- printf("SMC9000: RX error\n"); +- /* error or good, tell the card to get rid of this packet */ +- _outw(MC_RELEASE, smc9000_base + MMU_CMD); +- return 0; +-} +- +-static void smc9000_disable(struct nic *nic) +-{ +- if(!smc9000_base) +- return; +- +- /* no more interrupts for me */ +- SMC_SELECT_BANK(smc9000_base, 2); +- _outb( 0, smc9000_base + INT_MASK); +- +- /* and tell the card to stay away from that nasty outside world */ +- SMC_SELECT_BANK(smc9000_base, 0); +- _outb( RCR_CLEAR, smc9000_base + RCR ); +- _outb( TCR_CLEAR, smc9000_base + TCR ); +-} +- +-/************************************************************************** +- * ETH_PROBE - Look for an adapter +- ***************************************************************************/ +- +-struct nic *smc9000_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- unsigned short revision; +- int memory; +- int media; +- const char * version_string; +- const char * if_string; +- int i; +- +- /* +- * the SMC9000 can be at any of the following port addresses. To change, +- * for a slightly different card, you can add it to the array. Keep in +- * mind that the array must end in zero. +- */ +- static unsigned short portlist[] = { +-#ifdef SMC9000_SCAN +- SMC9000_SCAN, +-#else +- 0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0, +- 0x300, 0x320, 0x340, 0x360, 0x380, 0x3A0, 0x3C0, 0x3E0, +-#endif +- 0 }; +- +- printf("\nSMC9000 %s\n", smc9000_version); +-#ifdef SMC9000_VERBOSE +- printf("Copyright (C) 1998 Daniel Engstr\x94m\n"); +- printf("Copyright (C) 1996 Eric Stahlman\n"); +-#endif +- /* if no addresses supplied, fall back on defaults */ +- if (probe_addrs == 0 || probe_addrs[0] == 0) +- probe_addrs = portlist; +- +- /* check every ethernet address */ +- for (i = 0; probe_addrs[i]; i++) { +- /* check this specific address */ +- if (smc_probe(probe_addrs[i]) == 0) +- smc9000_base = probe_addrs[i]; +- } +- +- /* couldn't find anything */ +- if(0 == smc9000_base) +- goto out; +- +- /* +- * Get the MAC address ( bank 1, regs 4 - 9 ) +- */ +- SMC_SELECT_BANK(smc9000_base, 1); +- for ( i = 0; i < 6; i += 2 ) { +- word address; +- +- address = inw(smc9000_base + ADDR0 + i); +- nic->node_addr[i+1] = address >> 8; +- nic->node_addr[i] = address & 0xFF; +- } +- +- +- /* get the memory information */ +- SMC_SELECT_BANK(smc9000_base, 0); +- memory = ( inw(smc9000_base + MCR) >> 9 ) & 0x7; /* multiplier */ +- memory *= 256 * (inw(smc9000_base + MIR) & 0xFF); +- +- /* +- * Now, I want to find out more about the chip. This is sort of +- * redundant, but it's cleaner to have it in both, rather than having +- * one VERY long probe procedure. +- */ +- SMC_SELECT_BANK(smc9000_base, 3); +- revision = inw(smc9000_base + REVISION); +- version_string = chip_ids[(revision >> 4) & 0xF]; +- +- if (((revision & 0xF0) >> 4 == CHIP_9196) && +- ((revision & 0x0F) >= REV_9196)) { +- /* This is a 91c96. 'c96 has the same chip id as 'c94 (4) but +- * a revision starting at 6 */ +- version_string = smc91c96_id; +- } +- +- if ( !version_string ) { +- /* I shouldn't get here because this call was done before.... */ +- goto out; +- } +- +- /* is it using AUI or 10BaseT ? */ +- SMC_SELECT_BANK(smc9000_base, 1); +- if (inw(smc9000_base + CONFIG) & CFG_AUI_SELECT) +- media = 2; +- else +- media = 1; +- +- if_string = interfaces[media - 1]; +- +- /* now, reset the chip, and put it into a known state */ +- smc_reset(smc9000_base); +- +- printf("%s rev:%d I/O port:%hX Interface:%s RAM:%d bytes \n", +- version_string, revision & 0xF, +- smc9000_base, if_string, memory ); +- /* +- * Print the Ethernet address +- */ +- printf("Ethernet MAC address: %!\n", nic->node_addr); +- +- SMC_SELECT_BANK(smc9000_base, 0); +- +- /* see the header file for options in TCR/RCR NORMAL*/ +- _outw(TCR_NORMAL, smc9000_base + TCR); +- _outw(RCR_NORMAL, smc9000_base + RCR); +- +- /* Select which interface to use */ +- SMC_SELECT_BANK(smc9000_base, 1); +- if ( media == 1 ) { +- _outw( inw( smc9000_base + CONFIG ) & ~CFG_AUI_SELECT, +- smc9000_base + CONFIG ); +- } +- else if ( media == 2 ) { +- _outw( inw( smc9000_base + CONFIG ) | CFG_AUI_SELECT, +- smc9000_base + CONFIG ); +- } +- +- nic->reset = smc9000_reset; +- nic->poll = smc9000_poll; +- nic->transmit = smc9000_transmit; +- nic->disable = smc9000_disable; +- +- +- return nic; +- +-out: +-#ifdef SMC9000_VERBOSE +- printf("No SMC9000 adapters found\n"); +-#endif +- smc9000_base = 0; +- +- return (0); +-} +- +- +- +Index: b/netboot/smc9000.h +=================================================================== +--- a/netboot/smc9000.h ++++ /dev/null +@@ -1,205 +0,0 @@ +-/*------------------------------------------------------------------------ +- * smc9000.h +- * +- * Copyright (C) 1998 by Daniel Engström +- * Copyright (C) 1996 by Erik Stahlman +- * +- * This software may be used and distributed according to the terms +- * of the GNU Public License, incorporated herein by reference. +- * +- * This file contains register information and access macros for +- * the SMC91xxx chipset. +- * +- * Information contained in this file was obtained from the SMC91C94 +- * manual from SMC. To get a copy, if you really want one, you can find +- * information under www.smsc.com in the components division. +- * ( this thanks to advice from Donald Becker ). +- * +- * Authors +- * Daniel Engström +- * Erik Stahlman +- * +- * History +- * 96-01-06 Erik Stahlman moved definitions here from main .c +- * file +- * 96-01-19 Erik Stahlman polished this up some, and added +- * better error handling +- * 98-09-25 Daniel Engström adjusted for Etherboot +- * 98-09-27 Daniel Engström moved some static strings back to the +- * main .c file +- * --------------------------------------------------------------------------*/ +-#ifndef _SMC9000_H_ +-# define _SMC9000_H_ +- +-/* I want some simple types */ +-typedef unsigned char byte; +-typedef unsigned short word; +-typedef unsigned long int dword; +- +-/*--------------------------------------------------------------- +- * +- * A description of the SMC registers is probably in order here, +- * although for details, the SMC datasheet is invaluable. +- * +- * Basically, the chip has 4 banks of registers ( 0 to 3 ), which +- * are accessed by writing a number into the BANK_SELECT register +- * ( I also use a SMC_SELECT_BANK macro for this ). +- * +- * The banks are configured so that for most purposes, bank 2 is all +- * that is needed for simple run time tasks. +- * ----------------------------------------------------------------------*/ +- +-/* +- * Bank Select Register: +- * +- * yyyy yyyy 0000 00xx +- * xx = bank number +- * yyyy yyyy = 0x33, for identification purposes. +- */ +-#define BANK_SELECT 14 +- +-/* BANK 0 */ +- +-#define TCR 0 /* transmit control register */ +-#define TCR_ENABLE 0x0001 /* if this is 1, we can transmit */ +-#define TCR_FDUPLX 0x0800 /* receive packets sent out */ +-#define TCR_STP_SQET 0x1000 /* stop transmitting if Signal quality error */ +-#define TCR_MON_CNS 0x0400 /* monitors the carrier status */ +-#define TCR_PAD_ENABLE 0x0080 /* pads short packets to 64 bytes */ +- +-#define TCR_CLEAR 0 /* do NOTHING */ +-/* the normal settings for the TCR register : */ +-#define TCR_NORMAL (TCR_ENABLE | TCR_PAD_ENABLE) +- +- +-#define EPH_STATUS 2 +-#define ES_LINK_OK 0x4000 /* is the link integrity ok ? */ +- +-#define RCR 4 +-#define RCR_SOFTRESET 0x8000 /* resets the chip */ +-#define RCR_STRIP_CRC 0x200 /* strips CRC */ +-#define RCR_ENABLE 0x100 /* IFF this is set, we can receive packets */ +-#define RCR_ALMUL 0x4 /* receive all multicast packets */ +-#define RCR_PROMISC 0x2 /* enable promiscuous mode */ +- +-/* the normal settings for the RCR register : */ +-#define RCR_NORMAL (RCR_STRIP_CRC | RCR_ENABLE) +-#define RCR_CLEAR 0x0 /* set it to a base state */ +- +-#define COUNTER 6 +-#define MIR 8 +-#define MCR 10 +-/* 12 is reserved */ +- +-/* BANK 1 */ +-#define CONFIG 0 +-#define CFG_AUI_SELECT 0x100 +-#define BASE 2 +-#define ADDR0 4 +-#define ADDR1 6 +-#define ADDR2 8 +-#define GENERAL 10 +-#define CONTROL 12 +-#define CTL_POWERDOWN 0x2000 +-#define CTL_LE_ENABLE 0x80 +-#define CTL_CR_ENABLE 0x40 +-#define CTL_TE_ENABLE 0x0020 +-#define CTL_AUTO_RELEASE 0x0800 +-#define CTL_EPROM_ACCESS 0x0003 /* high if Eprom is being read */ +- +-/* BANK 2 */ +-#define MMU_CMD 0 +-#define MC_BUSY 1 /* only readable bit in the register */ +-#define MC_NOP 0 +-#define MC_ALLOC 0x20 /* or with number of 256 byte packets */ +-#define MC_RESET 0x40 +-#define MC_REMOVE 0x60 /* remove the current rx packet */ +-#define MC_RELEASE 0x80 /* remove and release the current rx packet */ +-#define MC_FREEPKT 0xA0 /* Release packet in PNR register */ +-#define MC_ENQUEUE 0xC0 /* Enqueue the packet for transmit */ +- +-#define PNR_ARR 2 +-#define FIFO_PORTS 4 +- +-#define FP_RXEMPTY 0x8000 +-#define FP_TXEMPTY 0x80 +- +-#define POINTER 6 +-#define PTR_READ 0x2000 +-#define PTR_RCV 0x8000 +-#define PTR_AUTOINC 0x4000 +-#define PTR_AUTO_INC 0x0040 +- +-#define DATA_1 8 +-#define DATA_2 10 +-#define INTERRUPT 12 +- +-#define INT_MASK 13 +-#define IM_RCV_INT 0x1 +-#define IM_TX_INT 0x2 +-#define IM_TX_EMPTY_INT 0x4 +-#define IM_ALLOC_INT 0x8 +-#define IM_RX_OVRN_INT 0x10 +-#define IM_EPH_INT 0x20 +-#define IM_ERCV_INT 0x40 /* not on SMC9192 */ +- +-/* BANK 3 */ +-#define MULTICAST1 0 +-#define MULTICAST2 2 +-#define MULTICAST3 4 +-#define MULTICAST4 6 +-#define MGMT 8 +-#define REVISION 10 /* ( hi: chip id low: rev # ) */ +- +- +-/* this is NOT on SMC9192 */ +-#define ERCV 12 +- +-/* Note that 9194 and 9196 have the smame chip id, +- * the 9196 will have revisions starting at 6 */ +-#define CHIP_9190 3 +-#define CHIP_9194 4 +-#define CHIP_9195 5 +-#define CHIP_9196 4 +-#define CHIP_91100 7 +-#define CHIP_91100FD 8 +- +-#define REV_9196 6 +- +-/* +- * Transmit status bits +- */ +-#define TS_SUCCESS 0x0001 +-#define TS_LOSTCAR 0x0400 +-#define TS_LATCOL 0x0200 +-#define TS_16COL 0x0010 +- +-/* +- * Receive status bits +- */ +-#define RS_ALGNERR 0x8000 +-#define RS_BADCRC 0x2000 +-#define RS_ODDFRAME 0x1000 +-#define RS_TOOLONG 0x0800 +-#define RS_TOOSHORT 0x0400 +-#define RS_MULTICAST 0x0001 +-#define RS_ERRORS (RS_ALGNERR | RS_BADCRC | RS_TOOLONG | RS_TOOSHORT) +- +- +-/*------------------------------------------------------------------------- +- * I define some macros to make it easier to do somewhat common +- * or slightly complicated, repeated tasks. +- --------------------------------------------------------------------------*/ +- +-/* select a register bank, 0 to 3 */ +- +-#define SMC_SELECT_BANK(x, y) { _outw( y, x + BANK_SELECT ); } +- +-/* define a small delay for the reset */ +-#define SMC_DELAY(x) { inw( x + RCR );\ +- inw( x + RCR );\ +- inw( x + RCR ); } +- +- +-#endif /* _SMC_9000_H_ */ +- +Index: b/netboot/stdint.h +=================================================================== +--- /dev/null ++++ b/netboot/stdint.h +@@ -0,0 +1,18 @@ ++#ifndef STDINT_H ++#define STDINT_H ++/* ++ * I'm architecture depended. Check me before port GRUB ++ */ ++typedef unsigned size_t; ++ ++typedef unsigned char uint8_t; ++typedef unsigned short uint16_t; ++typedef unsigned long uint32_t; ++typedef unsigned long long uint64_t; ++ ++typedef signed char int8_t; ++typedef signed short int16_t; ++typedef signed long int32_t; ++typedef signed long long int64_t; ++ ++#endif /* STDINT_H */ +Index: b/netboot/tftp.h +=================================================================== +--- /dev/null ++++ b/netboot/tftp.h +@@ -0,0 +1,82 @@ ++#ifndef _TFTP_H ++#define _TFTP_H ++ ++#include "if_ether.h" ++#include "ip.h" ++#include "udp.h" ++ ++#ifndef MAX_TFTP_RETRIES ++#define MAX_TFTP_RETRIES 20 ++#endif ++ ++/* These settings have sense only if compiled with -DCONGESTED */ ++/* total retransmission timeout in ticks */ ++#define TFTP_TIMEOUT (30*TICKS_PER_SEC) ++/* packet retransmission timeout in ticks */ ++#define TFTP_REXMT (3*TICKS_PER_SEC) ++ ++#define TFTP_PORT 69 ++#define TFTP_DEFAULTSIZE_PACKET 512 ++#define TFTP_MAX_PACKET 1432 /* 512 */ ++ ++#define TFTP_RRQ 1 ++#define TFTP_WRQ 2 ++#define TFTP_DATA 3 ++#define TFTP_ACK 4 ++#define TFTP_ERROR 5 ++#define TFTP_OACK 6 ++ ++#define TFTP_CODE_EOF 1 ++#define TFTP_CODE_MORE 2 ++#define TFTP_CODE_ERROR 3 ++#define TFTP_CODE_BOOT 4 ++#define TFTP_CODE_CFG 5 ++ ++struct tftp_t { ++ struct iphdr ip; ++ struct udphdr udp; ++ uint16_t opcode; ++ union { ++ uint8_t rrq[TFTP_DEFAULTSIZE_PACKET]; ++ struct { ++ uint16_t block; ++ uint8_t download[TFTP_MAX_PACKET]; ++ } data; ++ struct { ++ uint16_t block; ++ } ack; ++ struct { ++ uint16_t errcode; ++ uint8_t errmsg[TFTP_DEFAULTSIZE_PACKET]; ++ } err; ++ struct { ++ uint8_t data[TFTP_DEFAULTSIZE_PACKET+2]; ++ } oack; ++ } u; ++}; ++ ++/* define a smaller tftp packet solely for making requests to conserve stack ++ 512 bytes should be enough */ ++struct tftpreq_t { ++ struct iphdr ip; ++ struct udphdr udp; ++ uint16_t opcode; ++ union { ++ uint8_t rrq[512]; ++ struct { ++ uint16_t block; ++ } ack; ++ struct { ++ uint16_t errcode; ++ uint8_t errmsg[512-2]; ++ } err; ++ } u; ++}; ++ ++#define TFTP_MIN_PACKET (sizeof(struct iphdr) + sizeof(struct udphdr) + 4) ++ ++typedef int (*read_actor_t)(unsigned char *, unsigned int, unsigned int, int); ++ ++int tftp_file_read(const char *name, read_actor_t); ++ ++#endif /* _TFTP_H */ +Index: b/netboot/tg3.c +=================================================================== +--- /dev/null ++++ b/netboot/tg3.c +@@ -0,0 +1,3322 @@ ++/* $Id: grub-0.95-diskless-patch-2.patch,v 1.1.1.1 2005/06/14 08:18:50 wesolows Exp $ ++ * tg3.c: Broadcom Tigon3 ethernet driver. ++ * ++ * Copyright (C) 2001, 2002 David S. Miller (davem@redhat.com) ++ * Copyright (C) 2001, 2002 Jeff Garzik (jgarzik@mandrakesoft.com) ++ * Copyright (C) 2003 Eric Biederman (ebiederman@lnxi.com) [etherboot port] ++ */ ++ ++/* 11-13-2003 timlegge Fix Issue with NetGear GA302T ++ * 11-18-2003 ebiederm Generalize NetGear Fix to what the code was supposed to be. ++ */ ++ ++#include "etherboot.h" ++#include "nic.h" ++#include "pci.h" ++#include "timer.h" ++/*#include "string.h"*/ ++#include "tg3.h" ++ ++#define SUPPORT_COPPER_PHY 1 ++#define SUPPORT_FIBER_PHY 1 ++#define SUPPORT_LINK_REPORT 1 ++#define SUPPORT_PARTNO_STR 1 ++#define SUPPORT_PHY_STR 1 ++ ++struct tg3 tg3; ++ ++/* Dummy defines for error handling */ ++#define EBUSY 1 ++#define ENODEV 2 ++#define EINVAL 3 ++#define ENOMEM 4 ++ ++ ++/* These numbers seem to be hard coded in the NIC firmware somehow. ++ * You can't change the ring sizes, but you can change where you place ++ * them in the NIC onboard memory. ++ */ ++#define TG3_RX_RING_SIZE 512 ++#define TG3_DEF_RX_RING_PENDING 20 /* RX_RING_PENDING seems to be o.k. at 20 and 200 */ ++#define TG3_RX_RCB_RING_SIZE 1024 ++ ++/* (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 ? \ ++ 512 : 1024) */ ++ #define TG3_TX_RING_SIZE 512 ++#define TG3_DEF_TX_RING_PENDING (TG3_TX_RING_SIZE - 1) ++ ++#define TG3_RX_RING_BYTES (sizeof(struct tg3_rx_buffer_desc) * TG3_RX_RING_SIZE) ++#define TG3_RX_RCB_RING_BYTES (sizeof(struct tg3_rx_buffer_desc) * TG3_RX_RCB_RING_SIZE) ++ ++#define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * TG3_TX_RING_SIZE) ++#define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1)) ++#define PREV_TX(N) (((N) - 1) & (TG3_TX_RING_SIZE - 1)) ++ ++#define RX_PKT_BUF_SZ (1536 + 2 + 64) ++ ++ ++static struct bss { ++ struct tg3_rx_buffer_desc rx_std[TG3_RX_RING_SIZE]; ++ struct tg3_rx_buffer_desc rx_rcb[TG3_RX_RCB_RING_SIZE]; ++ struct tg3_tx_buffer_desc tx_ring[TG3_TX_RING_SIZE]; ++ struct tg3_hw_status hw_status; ++ struct tg3_hw_stats hw_stats; ++ unsigned char rx_bufs[TG3_DEF_RX_RING_PENDING][RX_PKT_BUF_SZ]; ++} tg3_bss; ++ ++/** ++ * pci_save_state - save the PCI configuration space of a device before suspending ++ * @dev: - PCI device that we're dealing with ++ * @buffer: - buffer to hold config space context ++ * ++ * @buffer must be large enough to hold the entire PCI 2.2 config space ++ * (>= 64 bytes). ++ */ ++static int pci_save_state(struct pci_device *dev, uint32_t *buffer) ++{ ++ int i; ++ for (i = 0; i < 16; i++) ++ pci_read_config_dword(dev, i * 4,&buffer[i]); ++ return 0; ++} ++ ++/** ++ * pci_restore_state - Restore the saved state of a PCI device ++ * @dev: - PCI device that we're dealing with ++ * @buffer: - saved PCI config space ++ * ++ */ ++static int pci_restore_state(struct pci_device *dev, uint32_t *buffer) ++{ ++ int i; ++ ++ for (i = 0; i < 16; i++) ++ pci_write_config_dword(dev,i * 4, buffer[i]); ++ return 0; ++} ++ ++static void tg3_write_indirect_reg32(uint32_t off, uint32_t val) ++{ ++ pci_write_config_dword(tg3.pdev, TG3PCI_REG_BASE_ADDR, off); ++ pci_write_config_dword(tg3.pdev, TG3PCI_REG_DATA, val); ++} ++ ++#define tw32(reg,val) tg3_write_indirect_reg32((reg),(val)) ++#define tw32_mailbox(reg, val) writel(((val) & 0xffffffff), tg3.regs + (reg)) ++#define tw16(reg,val) writew(((val) & 0xffff), tg3.regs + (reg)) ++#define tw8(reg,val) writeb(((val) & 0xff), tg3.regs + (reg)) ++#define tr32(reg) readl(tg3.regs + (reg)) ++#define tr16(reg) readw(tg3.regs + (reg)) ++#define tr8(reg) readb(tg3.regs + (reg)) ++ ++static void tw32_carefully(uint32_t reg, uint32_t val) ++{ ++ tw32(reg, val); ++ tr32(reg); ++ udelay(100); ++} ++ ++static void tw32_mailbox2(uint32_t reg, uint32_t val) ++{ ++ tw32_mailbox(reg, val); ++ tr32(reg); ++} ++ ++static void tg3_write_mem(uint32_t off, uint32_t val) ++{ ++ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_BASE_ADDR, off); ++ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_DATA, val); ++ ++ /* Always leave this as zero. */ ++ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0); ++} ++ ++static void tg3_read_mem(uint32_t off, uint32_t *val) ++{ ++ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_BASE_ADDR, off); ++ pci_read_config_dword(tg3.pdev, TG3PCI_MEM_WIN_DATA, val); ++ ++ /* Always leave this as zero. */ ++ pci_write_config_dword(tg3.pdev, TG3PCI_MEM_WIN_BASE_ADDR, 0); ++} ++ ++static void tg3_disable_ints(struct tg3 *tp) ++{ ++ tw32(TG3PCI_MISC_HOST_CTRL, ++ (tp->misc_host_ctrl | MISC_HOST_CTRL_MASK_PCI_INT)); ++ tw32_mailbox2(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001); ++} ++ ++static void tg3_switch_clocks(struct tg3 *tp) ++{ ++ uint32_t orig_clock_ctrl, clock_ctrl; ++ ++ clock_ctrl = tr32(TG3PCI_CLOCK_CTRL); ++ ++ orig_clock_ctrl = clock_ctrl; ++ clock_ctrl &= (CLOCK_CTRL_FORCE_CLKRUN | CLOCK_CTRL_CLKRUN_OENABLE | 0x1f); ++ tp->pci_clock_ctrl = clock_ctrl; ++ ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) && ++ (orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE)!=0) { ++ tw32_carefully(TG3PCI_CLOCK_CTRL, ++ clock_ctrl | (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK)); ++ tw32_carefully(TG3PCI_CLOCK_CTRL, ++ clock_ctrl | (CLOCK_CTRL_ALTCLK)); ++ } ++ tw32_carefully(TG3PCI_CLOCK_CTRL, clock_ctrl); ++} ++ ++#define PHY_BUSY_LOOPS 5000 ++ ++static int tg3_readphy(struct tg3 *tp, int reg, uint32_t *val) ++{ ++ uint32_t frame_val; ++ int loops, ret; ++ ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL); ++ ++ *val = 0xffffffff; ++ ++ frame_val = ((PHY_ADDR << MI_COM_PHY_ADDR_SHIFT) & ++ MI_COM_PHY_ADDR_MASK); ++ frame_val |= ((reg << MI_COM_REG_ADDR_SHIFT) & ++ MI_COM_REG_ADDR_MASK); ++ frame_val |= (MI_COM_CMD_READ | MI_COM_START); ++ ++ tw32_carefully(MAC_MI_COM, frame_val); ++ ++ loops = PHY_BUSY_LOOPS; ++ while (loops-- > 0) { ++ udelay(10); ++ frame_val = tr32(MAC_MI_COM); ++ ++ if ((frame_val & MI_COM_BUSY) == 0) { ++ udelay(5); ++ frame_val = tr32(MAC_MI_COM); ++ break; ++ } ++ } ++ ++ ret = -EBUSY; ++ if (loops > 0) { ++ *val = frame_val & MI_COM_DATA_MASK; ++ ret = 0; ++ } ++ ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode); ++ ++ return ret; ++} ++ ++static int tg3_writephy(struct tg3 *tp, int reg, uint32_t val) ++{ ++ uint32_t frame_val; ++ int loops, ret; ++ ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode & ~MAC_MI_MODE_AUTO_POLL); ++ ++ frame_val = ((PHY_ADDR << MI_COM_PHY_ADDR_SHIFT) & ++ MI_COM_PHY_ADDR_MASK); ++ frame_val |= ((reg << MI_COM_REG_ADDR_SHIFT) & ++ MI_COM_REG_ADDR_MASK); ++ frame_val |= (val & MI_COM_DATA_MASK); ++ frame_val |= (MI_COM_CMD_WRITE | MI_COM_START); ++ ++ tw32_carefully(MAC_MI_COM, frame_val); ++ ++ loops = PHY_BUSY_LOOPS; ++ while (loops-- > 0) { ++ udelay(10); ++ frame_val = tr32(MAC_MI_COM); ++ if ((frame_val & MI_COM_BUSY) == 0) { ++ udelay(5); ++ frame_val = tr32(MAC_MI_COM); ++ break; ++ } ++ } ++ ++ ret = -EBUSY; ++ if (loops > 0) ++ ret = 0; ++ ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode); ++ ++ return ret; ++} ++ ++static int tg3_writedsp(struct tg3 *tp, uint16_t addr, uint16_t val) ++{ ++ int err; ++ err = tg3_writephy(tp, MII_TG3_DSP_ADDRESS, addr); ++ err |= tg3_writephy(tp, MII_TG3_DSP_RW_PORT, val); ++ return err; ++} ++ ++ ++static void tg3_phy_set_wirespeed(struct tg3 *tp) ++{ ++ uint32_t val; ++ ++ if (tp->tg3_flags2 & TG3_FLG2_NO_ETH_WIRE_SPEED) ++ return; ++ ++ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x7007); ++ tg3_readphy(tp, MII_TG3_AUX_CTRL, &val); ++ tg3_writephy(tp, MII_TG3_AUX_CTRL, (val | (1 << 15) | (1 << 4))); ++} ++ ++static int tg3_bmcr_reset(struct tg3 *tp) ++{ ++ uint32_t phy_control; ++ int limit, err; ++ ++ /* OK, reset it, and poll the BMCR_RESET bit until it ++ * clears or we time out. ++ */ ++ phy_control = BMCR_RESET; ++ err = tg3_writephy(tp, MII_BMCR, phy_control); ++ if (err != 0) ++ return -EBUSY; ++ ++ limit = 5000; ++ while (limit--) { ++ err = tg3_readphy(tp, MII_BMCR, &phy_control); ++ if (err != 0) ++ return -EBUSY; ++ ++ if ((phy_control & BMCR_RESET) == 0) { ++ udelay(40); ++ break; ++ } ++ udelay(10); ++ } ++ if (limit <= 0) ++ return -EBUSY; ++ ++ return 0; ++} ++ ++static int tg3_wait_macro_done(struct tg3 *tp) ++{ ++ int limit = 100; ++ ++ while (limit--) { ++ uint32_t tmp32; ++ ++ tg3_readphy(tp, 0x16, &tmp32); ++ if ((tmp32 & 0x1000) == 0) ++ break; ++ } ++ if (limit <= 0) ++ return -EBUSY; ++ ++ return 0; ++} ++ ++static int tg3_phy_write_and_check_testpat(struct tg3 *tp, int *resetp) ++{ ++ static const uint32_t test_pat[4][6] = { ++ { 0x00005555, 0x00000005, 0x00002aaa, 0x0000000a, 0x00003456, 0x00000003 }, ++ { 0x00002aaa, 0x0000000a, 0x00003333, 0x00000003, 0x0000789a, 0x00000005 }, ++ { 0x00005a5a, 0x00000005, 0x00002a6a, 0x0000000a, 0x00001bcd, 0x00000003 }, ++ { 0x00002a5a, 0x0000000a, 0x000033c3, 0x00000003, 0x00002ef1, 0x00000005 } ++ }; ++ int chan; ++ ++ for (chan = 0; chan < 4; chan++) { ++ int i; ++ ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, ++ (chan * 0x2000) | 0x0200); ++ tg3_writephy(tp, 0x16, 0x0002); ++ ++ for (i = 0; i < 6; i++) ++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, ++ test_pat[chan][i]); ++ ++ tg3_writephy(tp, 0x16, 0x0202); ++ if (tg3_wait_macro_done(tp)) { ++ *resetp = 1; ++ return -EBUSY; ++ } ++ ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, ++ (chan * 0x2000) | 0x0200); ++ tg3_writephy(tp, 0x16, 0x0082); ++ if (tg3_wait_macro_done(tp)) { ++ *resetp = 1; ++ return -EBUSY; ++ } ++ ++ tg3_writephy(tp, 0x16, 0x0802); ++ if (tg3_wait_macro_done(tp)) { ++ *resetp = 1; ++ return -EBUSY; ++ } ++ ++ for (i = 0; i < 6; i += 2) { ++ uint32_t low, high; ++ ++ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &low); ++ tg3_readphy(tp, MII_TG3_DSP_RW_PORT, &high); ++ if (tg3_wait_macro_done(tp)) { ++ *resetp = 1; ++ return -EBUSY; ++ } ++ low &= 0x7fff; ++ high &= 0x000f; ++ if (low != test_pat[chan][i] || ++ high != test_pat[chan][i+1]) { ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x000b); ++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x4001); ++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x4005); ++ ++ return -EBUSY; ++ } ++ } ++ } ++ ++ return 0; ++} ++ ++static int tg3_phy_reset_chanpat(struct tg3 *tp) ++{ ++ int chan; ++ ++ for (chan = 0; chan < 4; chan++) { ++ int i; ++ ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, ++ (chan * 0x2000) | 0x0200); ++ tg3_writephy(tp, 0x16, 0x0002); ++ for (i = 0; i < 6; i++) ++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x000); ++ tg3_writephy(tp, 0x16, 0x0202); ++ if (tg3_wait_macro_done(tp)) ++ return -EBUSY; ++ } ++ ++ return 0; ++} ++ ++static int tg3_phy_reset_5703_4_5(struct tg3 *tp) ++{ ++ uint32_t reg32, phy9_orig; ++ int retries, do_phy_reset, err; ++ ++ retries = 10; ++ do_phy_reset = 1; ++ do { ++ if (do_phy_reset) { ++ err = tg3_bmcr_reset(tp); ++ if (err) ++ return err; ++ do_phy_reset = 0; ++ } ++ ++ /* Disable transmitter and interrupt. */ ++ tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32); ++ reg32 |= 0x3000; ++ tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32); ++ ++ /* Set full-duplex, 1000 mbps. */ ++ tg3_writephy(tp, MII_BMCR, ++ BMCR_FULLDPLX | TG3_BMCR_SPEED1000); ++ ++ /* Set to master mode. */ ++ tg3_readphy(tp, MII_TG3_CTRL, &phy9_orig); ++ tg3_writephy(tp, MII_TG3_CTRL, ++ (MII_TG3_CTRL_AS_MASTER | ++ MII_TG3_CTRL_ENABLE_AS_MASTER)); ++ ++ /* Enable SM_DSP_CLOCK and 6dB. */ ++ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00); ++ ++ /* Block the PHY control access. */ ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8005); ++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x0800); ++ ++ err = tg3_phy_write_and_check_testpat(tp, &do_phy_reset); ++ if (!err) ++ break; ++ } while (--retries); ++ ++ err = tg3_phy_reset_chanpat(tp); ++ if (err) ++ return err; ++ ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8005); ++ tg3_writephy(tp, MII_TG3_DSP_RW_PORT, 0x0000); ++ ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x8200); ++ tg3_writephy(tp, 0x16, 0x0000); ++ ++ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0400); ++ ++ tg3_writephy(tp, MII_TG3_CTRL, phy9_orig); ++ ++ tg3_readphy(tp, MII_TG3_EXT_CTRL, ®32); ++ reg32 &= ~0x3000; ++ tg3_writephy(tp, MII_TG3_EXT_CTRL, reg32); ++ ++ return err; ++} ++ ++/* This will reset the tigon3 PHY if there is no valid ++ * link. ++ */ ++static int tg3_phy_reset(struct tg3 *tp) ++{ ++ uint32_t phy_status; ++ int err; ++ ++ err = tg3_readphy(tp, MII_BMSR, &phy_status); ++ err |= tg3_readphy(tp, MII_BMSR, &phy_status); ++ if (err != 0) ++ return -EBUSY; ++ ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) { ++ err = tg3_phy_reset_5703_4_5(tp); ++ if (err) ++ return err; ++ goto out; ++ } ++ err = tg3_bmcr_reset(tp); ++ if (err) ++ return err; ++ out: ++ tg3_phy_set_wirespeed(tp); ++ return 0; ++} ++ ++static void tg3_set_power_state_0(struct tg3 *tp) ++{ ++ uint16_t power_control; ++ int pm = tp->pm_cap; ++ ++ /* Make sure register accesses (indirect or otherwise) ++ * will function correctly. ++ */ ++ pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, tp->misc_host_ctrl); ++ ++ pci_read_config_word(tp->pdev, pm + PCI_PM_CTRL, &power_control); ++ ++ power_control |= PCI_PM_CTRL_PME_STATUS; ++ power_control &= ~(PCI_PM_CTRL_STATE_MASK); ++ power_control |= 0; ++ pci_write_config_word(tp->pdev, pm + PCI_PM_CTRL, power_control); ++ ++ tw32_carefully(GRC_LOCAL_CTRL, tp->grc_local_ctrl); ++ ++ return; ++} ++ ++ ++#if SUPPORT_LINK_REPORT ++static void tg3_link_report(struct tg3 *tp) ++{ ++ if (!tp->carrier_ok) { ++ printf("Link is down.\n"); ++ } else { ++ printf("Link is up at %d Mbps, %s duplex. %s %s %s\n", ++ (tp->link_config.active_speed == SPEED_1000 ? ++ 1000 : ++ (tp->link_config.active_speed == SPEED_100 ? ++ 100 : 10)), ++ (tp->link_config.active_duplex == DUPLEX_FULL ? ++ "full" : "half"), ++ (tp->tg3_flags & TG3_FLAG_TX_PAUSE) ? "TX" : "", ++ (tp->tg3_flags & TG3_FLAG_RX_PAUSE) ? "RX" : "", ++ (tp->tg3_flags & (TG3_FLAG_TX_PAUSE |TG3_FLAG_RX_PAUSE)) ? "flow control" : ""); ++ } ++} ++#else ++#define tg3_link_report(tp) ++#endif ++ ++static void tg3_setup_flow_control(struct tg3 *tp, uint32_t local_adv, uint32_t remote_adv) ++{ ++ uint32_t new_tg3_flags = 0; ++ ++ if (local_adv & ADVERTISE_PAUSE_CAP) { ++ if (local_adv & ADVERTISE_PAUSE_ASYM) { ++ if (remote_adv & LPA_PAUSE_CAP) ++ new_tg3_flags |= ++ (TG3_FLAG_RX_PAUSE | ++ TG3_FLAG_TX_PAUSE); ++ else if (remote_adv & LPA_PAUSE_ASYM) ++ new_tg3_flags |= ++ (TG3_FLAG_RX_PAUSE); ++ } else { ++ if (remote_adv & LPA_PAUSE_CAP) ++ new_tg3_flags |= ++ (TG3_FLAG_RX_PAUSE | ++ TG3_FLAG_TX_PAUSE); ++ } ++ } else if (local_adv & ADVERTISE_PAUSE_ASYM) { ++ if ((remote_adv & LPA_PAUSE_CAP) && ++ (remote_adv & LPA_PAUSE_ASYM)) ++ new_tg3_flags |= TG3_FLAG_TX_PAUSE; ++ } ++ ++ tp->tg3_flags &= ~(TG3_FLAG_RX_PAUSE | TG3_FLAG_TX_PAUSE); ++ tp->tg3_flags |= new_tg3_flags; ++ ++ if (new_tg3_flags & TG3_FLAG_RX_PAUSE) ++ tp->rx_mode |= RX_MODE_FLOW_CTRL_ENABLE; ++ else ++ tp->rx_mode &= ~RX_MODE_FLOW_CTRL_ENABLE; ++ ++ if (new_tg3_flags & TG3_FLAG_TX_PAUSE) ++ tp->tx_mode |= TX_MODE_FLOW_CTRL_ENABLE; ++ else ++ tp->tx_mode &= ~TX_MODE_FLOW_CTRL_ENABLE; ++} ++ ++#if SUPPORT_COPPER_PHY ++static void tg3_aux_stat_to_speed_duplex( ++ struct tg3 *tp __unused, uint32_t val, uint8_t *speed, uint8_t *duplex) ++{ ++ static const uint8_t map[] = { ++ [0] = (SPEED_INVALID << 2) | DUPLEX_INVALID, ++ [MII_TG3_AUX_STAT_10HALF >> 8] = (SPEED_10 << 2) | DUPLEX_HALF, ++ [MII_TG3_AUX_STAT_10FULL >> 8] = (SPEED_10 << 2) | DUPLEX_FULL, ++ [MII_TG3_AUX_STAT_100HALF >> 8] = (SPEED_100 << 2) | DUPLEX_HALF, ++ [MII_TG3_AUX_STAT_100_4 >> 8] = (SPEED_INVALID << 2) | DUPLEX_INVALID, ++ [MII_TG3_AUX_STAT_100FULL >> 8] = (SPEED_100 << 2) | DUPLEX_FULL, ++ [MII_TG3_AUX_STAT_1000HALF >> 8] = (SPEED_1000 << 2) | DUPLEX_HALF, ++ [MII_TG3_AUX_STAT_1000FULL >> 8] = (SPEED_1000 << 2) | DUPLEX_FULL, ++ }; ++ uint8_t result; ++ result = map[(val & MII_TG3_AUX_STAT_SPDMASK) >> 8]; ++ *speed = result >> 2; ++ *duplex = result & 3; ++} ++ ++static int tg3_phy_copper_begin(struct tg3 *tp) ++{ ++ uint32_t new_adv; ++ ++ tp->link_config.advertising = ++ (ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | ++ ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | ++ ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full | ++ ADVERTISED_Autoneg | ADVERTISED_MII); ++ ++ if (tp->tg3_flags & TG3_FLAG_10_100_ONLY) { ++ tp->link_config.advertising &= ++ ~(ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full); ++ } ++ ++ new_adv = (ADVERTISE_CSMA | ADVERTISE_PAUSE_CAP); ++ if (tp->link_config.advertising & ADVERTISED_10baseT_Half) { ++ new_adv |= ADVERTISE_10HALF; ++ } ++ if (tp->link_config.advertising & ADVERTISED_10baseT_Full) { ++ new_adv |= ADVERTISE_10FULL; ++ } ++ if (tp->link_config.advertising & ADVERTISED_100baseT_Half) { ++ new_adv |= ADVERTISE_100HALF; ++ } ++ if (tp->link_config.advertising & ADVERTISED_100baseT_Full) { ++ new_adv |= ADVERTISE_100FULL; ++ } ++ tg3_writephy(tp, MII_ADVERTISE, new_adv); ++ ++ if (tp->link_config.advertising & ++ (ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full)) { ++ new_adv = 0; ++ if (tp->link_config.advertising & ADVERTISED_1000baseT_Half) { ++ new_adv |= MII_TG3_CTRL_ADV_1000_HALF; ++ } ++ if (tp->link_config.advertising & ADVERTISED_1000baseT_Full) { ++ new_adv |= MII_TG3_CTRL_ADV_1000_FULL; ++ } ++ if (!(tp->tg3_flags & TG3_FLAG_10_100_ONLY) && ++ (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 || ++ tp->pci_chip_rev_id == CHIPREV_ID_5701_B0)) { ++ new_adv |= (MII_TG3_CTRL_AS_MASTER | ++ MII_TG3_CTRL_ENABLE_AS_MASTER); ++ } ++ tg3_writephy(tp, MII_TG3_CTRL, new_adv); ++ } else { ++ tg3_writephy(tp, MII_TG3_CTRL, 0); ++ } ++ ++ tg3_writephy(tp, MII_BMCR, BMCR_ANENABLE | BMCR_ANRESTART); ++ ++ return 0; ++} ++ ++static int tg3_init_5401phy_dsp(struct tg3 *tp) ++{ ++ int err; ++ ++ /* Turn off tap power management. */ ++ err = tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c20); ++ ++ err |= tg3_writedsp(tp, 0x0012, 0x1804); ++ err |= tg3_writedsp(tp, 0x0013, 0x1204); ++ err |= tg3_writedsp(tp, 0x8006, 0x0132); ++ err |= tg3_writedsp(tp, 0x8006, 0x0232); ++ err |= tg3_writedsp(tp, 0x201f, 0x0a20); ++ ++ udelay(40); ++ ++ return err; ++} ++ ++static int tg3_setup_copper_phy(struct tg3 *tp) ++{ ++ int current_link_up; ++ uint32_t bmsr, dummy; ++ int i, err; ++ ++ tw32_carefully(MAC_STATUS, ++ (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)); ++ ++ tp->mi_mode = MAC_MI_MODE_BASE; ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode); ++ ++ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x02); ++ ++ /* Some third-party PHYs need to be reset on link going ++ * down. ++ */ ++ if ( ( (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || ++ (tp->pci_chip_rev_id == CHIPREV_ID_5705_A0)) && ++ (tp->carrier_ok)) { ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ if (!(bmsr & BMSR_LSTATUS)) ++ tg3_phy_reset(tp); ++ } ++ ++ if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401) { ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ ++ if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE)) ++ bmsr = 0; ++ ++ if (!(bmsr & BMSR_LSTATUS)) { ++ err = tg3_init_5401phy_dsp(tp); ++ if (err) ++ return err; ++ ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ for (i = 0; i < 1000; i++) { ++ udelay(10); ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ if (bmsr & BMSR_LSTATUS) { ++ udelay(40); ++ break; ++ } ++ } ++ ++ if ((tp->phy_id & PHY_ID_REV_MASK) == PHY_REV_BCM5401_B0 && ++ !(bmsr & BMSR_LSTATUS) && ++ tp->link_config.active_speed == SPEED_1000) { ++ err = tg3_phy_reset(tp); ++ if (!err) ++ err = tg3_init_5401phy_dsp(tp); ++ if (err) ++ return err; ++ } ++ } ++ } else if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 || ++ tp->pci_chip_rev_id == CHIPREV_ID_5701_B0) { ++ /* 5701 {A0,B0} CRC bug workaround */ ++ tg3_writephy(tp, 0x15, 0x0a75); ++ tg3_writephy(tp, 0x1c, 0x8c68); ++ tg3_writephy(tp, 0x1c, 0x8d68); ++ tg3_writephy(tp, 0x1c, 0x8c68); ++ } ++ ++ /* Clear pending interrupts... */ ++ tg3_readphy(tp, MII_TG3_ISTAT, &dummy); ++ tg3_readphy(tp, MII_TG3_ISTAT, &dummy); ++ ++ tg3_writephy(tp, MII_TG3_IMASK, ~0); ++ ++ if (tp->led_mode == led_mode_three_link) ++ tg3_writephy(tp, MII_TG3_EXT_CTRL, ++ MII_TG3_EXT_CTRL_LNK3_LED_MODE); ++ else ++ tg3_writephy(tp, MII_TG3_EXT_CTRL, 0); ++ ++ current_link_up = 0; ++ ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ tg3_readphy(tp, MII_BMSR, &bmsr); ++ ++ if (bmsr & BMSR_LSTATUS) { ++ uint32_t aux_stat, bmcr; ++ ++ tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat); ++ for (i = 0; i < 2000; i++) { ++ udelay(10); ++ tg3_readphy(tp, MII_TG3_AUX_STAT, &aux_stat); ++ if (aux_stat) ++ break; ++ } ++ ++ tg3_aux_stat_to_speed_duplex(tp, aux_stat, ++ &tp->link_config.active_speed, ++ &tp->link_config.active_duplex); ++ tg3_readphy(tp, MII_BMCR, &bmcr); ++ tg3_readphy(tp, MII_BMCR, &bmcr); ++ if (bmcr & BMCR_ANENABLE) { ++ uint32_t gig_ctrl; ++ ++ current_link_up = 1; ++ ++ /* Force autoneg restart if we are exiting ++ * low power mode. ++ */ ++ tg3_readphy(tp, MII_TG3_CTRL, &gig_ctrl); ++ if (!(gig_ctrl & (MII_TG3_CTRL_ADV_1000_HALF | ++ MII_TG3_CTRL_ADV_1000_FULL))) { ++ current_link_up = 0; ++ } ++ } else { ++ current_link_up = 0; ++ } ++ } ++ ++ if (current_link_up == 1 && ++ (tp->link_config.active_duplex == DUPLEX_FULL)) { ++ uint32_t local_adv, remote_adv; ++ ++ tg3_readphy(tp, MII_ADVERTISE, &local_adv); ++ local_adv &= (ADVERTISE_PAUSE_CAP | ADVERTISE_PAUSE_ASYM); ++ ++ tg3_readphy(tp, MII_LPA, &remote_adv); ++ remote_adv &= (LPA_PAUSE_CAP | LPA_PAUSE_ASYM); ++ ++ /* If we are not advertising full pause capability, ++ * something is wrong. Bring the link down and reconfigure. ++ */ ++ if (local_adv != ADVERTISE_PAUSE_CAP) { ++ current_link_up = 0; ++ } else { ++ tg3_setup_flow_control(tp, local_adv, remote_adv); ++ } ++ } ++ ++ if (current_link_up == 0) { ++ uint32_t tmp; ++ ++ tg3_phy_copper_begin(tp); ++ ++ tg3_readphy(tp, MII_BMSR, &tmp); ++ tg3_readphy(tp, MII_BMSR, &tmp); ++ if (tmp & BMSR_LSTATUS) ++ current_link_up = 1; ++ } ++ ++ tp->mac_mode &= ~MAC_MODE_PORT_MODE_MASK; ++ if (current_link_up == 1) { ++ if (tp->link_config.active_speed == SPEED_100 || ++ tp->link_config.active_speed == SPEED_10) ++ tp->mac_mode |= MAC_MODE_PORT_MODE_MII; ++ else ++ tp->mac_mode |= MAC_MODE_PORT_MODE_GMII; ++ } else ++ tp->mac_mode |= MAC_MODE_PORT_MODE_GMII; ++ ++ tp->mac_mode &= ~MAC_MODE_HALF_DUPLEX; ++ if (tp->link_config.active_duplex == DUPLEX_HALF) ++ tp->mac_mode |= MAC_MODE_HALF_DUPLEX; ++ ++ tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) { ++ if ((tp->led_mode == led_mode_link10) || ++ (current_link_up == 1 && ++ tp->link_config.active_speed == SPEED_10)) ++ tp->mac_mode |= MAC_MODE_LINK_POLARITY; ++ } else { ++ if (current_link_up == 1) ++ tp->mac_mode |= MAC_MODE_LINK_POLARITY; ++ tw32(MAC_LED_CTRL, LED_CTRL_PHY_MODE_1); ++ } ++ ++ /* ??? Without this setting Netgear GA302T PHY does not ++ * ??? send/receive packets... ++ * With this other PHYs cannot bring up the link ++ */ ++ if ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5411 && ++ tp->pci_chip_rev_id == CHIPREV_ID_5700_ALTIMA) { ++ tp->mi_mode |= MAC_MI_MODE_AUTO_POLL; ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode); ++ } ++ ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ /* Link change polled. */ ++ tw32_carefully(MAC_EVENT, 0); ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 && ++ current_link_up == 1 && ++ tp->link_config.active_speed == SPEED_1000 && ++ ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) || ++ (tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED))) { ++ udelay(120); ++ tw32_carefully(MAC_STATUS, ++ (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)); ++ tg3_write_mem( ++ NIC_SRAM_FIRMWARE_MBOX, ++ NIC_SRAM_FIRMWARE_MBOX_MAGIC2); ++ } ++ ++ if (current_link_up != tp->carrier_ok) { ++ tp->carrier_ok = current_link_up; ++ tg3_link_report(tp); ++ } ++ ++ return 0; ++} ++#else ++#define tg3_setup_copper_phy(TP) (-EINVAL) ++#endif /* SUPPORT_COPPER_PHY */ ++ ++#if SUPPORT_FIBER_PHY ++struct tg3_fiber_aneginfo { ++ int state; ++#define ANEG_STATE_UNKNOWN 0 ++#define ANEG_STATE_AN_ENABLE 1 ++#define ANEG_STATE_RESTART_INIT 2 ++#define ANEG_STATE_RESTART 3 ++#define ANEG_STATE_DISABLE_LINK_OK 4 ++#define ANEG_STATE_ABILITY_DETECT_INIT 5 ++#define ANEG_STATE_ABILITY_DETECT 6 ++#define ANEG_STATE_ACK_DETECT_INIT 7 ++#define ANEG_STATE_ACK_DETECT 8 ++#define ANEG_STATE_COMPLETE_ACK_INIT 9 ++#define ANEG_STATE_COMPLETE_ACK 10 ++#define ANEG_STATE_IDLE_DETECT_INIT 11 ++#define ANEG_STATE_IDLE_DETECT 12 ++#define ANEG_STATE_LINK_OK 13 ++#define ANEG_STATE_NEXT_PAGE_WAIT_INIT 14 ++#define ANEG_STATE_NEXT_PAGE_WAIT 15 ++ ++ uint32_t flags; ++#define MR_AN_ENABLE 0x00000001 ++#define MR_RESTART_AN 0x00000002 ++#define MR_AN_COMPLETE 0x00000004 ++#define MR_PAGE_RX 0x00000008 ++#define MR_NP_LOADED 0x00000010 ++#define MR_TOGGLE_TX 0x00000020 ++#define MR_LP_ADV_FULL_DUPLEX 0x00000040 ++#define MR_LP_ADV_HALF_DUPLEX 0x00000080 ++#define MR_LP_ADV_SYM_PAUSE 0x00000100 ++#define MR_LP_ADV_ASYM_PAUSE 0x00000200 ++#define MR_LP_ADV_REMOTE_FAULT1 0x00000400 ++#define MR_LP_ADV_REMOTE_FAULT2 0x00000800 ++#define MR_LP_ADV_NEXT_PAGE 0x00001000 ++#define MR_TOGGLE_RX 0x00002000 ++#define MR_NP_RX 0x00004000 ++ ++#define MR_LINK_OK 0x80000000 ++ ++ unsigned long link_time, cur_time; ++ ++ uint32_t ability_match_cfg; ++ int ability_match_count; ++ ++ char ability_match, idle_match, ack_match; ++ ++ uint32_t txconfig, rxconfig; ++#define ANEG_CFG_NP 0x00000080 ++#define ANEG_CFG_ACK 0x00000040 ++#define ANEG_CFG_RF2 0x00000020 ++#define ANEG_CFG_RF1 0x00000010 ++#define ANEG_CFG_PS2 0x00000001 ++#define ANEG_CFG_PS1 0x00008000 ++#define ANEG_CFG_HD 0x00004000 ++#define ANEG_CFG_FD 0x00002000 ++#define ANEG_CFG_INVAL 0x00001f06 ++ ++}; ++#define ANEG_OK 0 ++#define ANEG_DONE 1 ++#define ANEG_TIMER_ENAB 2 ++#define ANEG_FAILED -1 ++ ++#define ANEG_STATE_SETTLE_TIME 10000 ++ ++static int tg3_fiber_aneg_smachine(struct tg3 *tp, ++ struct tg3_fiber_aneginfo *ap) ++{ ++ unsigned long delta; ++ uint32_t rx_cfg_reg; ++ int ret; ++ ++ if (ap->state == ANEG_STATE_UNKNOWN) { ++ ap->rxconfig = 0; ++ ap->link_time = 0; ++ ap->cur_time = 0; ++ ap->ability_match_cfg = 0; ++ ap->ability_match_count = 0; ++ ap->ability_match = 0; ++ ap->idle_match = 0; ++ ap->ack_match = 0; ++ } ++ ap->cur_time++; ++ ++ if (tr32(MAC_STATUS) & MAC_STATUS_RCVD_CFG) { ++ rx_cfg_reg = tr32(MAC_RX_AUTO_NEG); ++ ++ if (rx_cfg_reg != ap->ability_match_cfg) { ++ ap->ability_match_cfg = rx_cfg_reg; ++ ap->ability_match = 0; ++ ap->ability_match_count = 0; ++ } else { ++ if (++ap->ability_match_count > 1) { ++ ap->ability_match = 1; ++ ap->ability_match_cfg = rx_cfg_reg; ++ } ++ } ++ if (rx_cfg_reg & ANEG_CFG_ACK) ++ ap->ack_match = 1; ++ else ++ ap->ack_match = 0; ++ ++ ap->idle_match = 0; ++ } else { ++ ap->idle_match = 1; ++ ap->ability_match_cfg = 0; ++ ap->ability_match_count = 0; ++ ap->ability_match = 0; ++ ap->ack_match = 0; ++ ++ rx_cfg_reg = 0; ++ } ++ ++ ap->rxconfig = rx_cfg_reg; ++ ret = ANEG_OK; ++ ++ switch(ap->state) { ++ case ANEG_STATE_UNKNOWN: ++ if (ap->flags & (MR_AN_ENABLE | MR_RESTART_AN)) ++ ap->state = ANEG_STATE_AN_ENABLE; ++ ++ /* fallthru */ ++ case ANEG_STATE_AN_ENABLE: ++ ap->flags &= ~(MR_AN_COMPLETE | MR_PAGE_RX); ++ if (ap->flags & MR_AN_ENABLE) { ++ ap->link_time = 0; ++ ap->cur_time = 0; ++ ap->ability_match_cfg = 0; ++ ap->ability_match_count = 0; ++ ap->ability_match = 0; ++ ap->idle_match = 0; ++ ap->ack_match = 0; ++ ++ ap->state = ANEG_STATE_RESTART_INIT; ++ } else { ++ ap->state = ANEG_STATE_DISABLE_LINK_OK; ++ } ++ break; ++ ++ case ANEG_STATE_RESTART_INIT: ++ ap->link_time = ap->cur_time; ++ ap->flags &= ~(MR_NP_LOADED); ++ ap->txconfig = 0; ++ tw32(MAC_TX_AUTO_NEG, 0); ++ tp->mac_mode |= MAC_MODE_SEND_CONFIGS; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ ret = ANEG_TIMER_ENAB; ++ ap->state = ANEG_STATE_RESTART; ++ ++ /* fallthru */ ++ case ANEG_STATE_RESTART: ++ delta = ap->cur_time - ap->link_time; ++ if (delta > ANEG_STATE_SETTLE_TIME) { ++ ap->state = ANEG_STATE_ABILITY_DETECT_INIT; ++ } else { ++ ret = ANEG_TIMER_ENAB; ++ } ++ break; ++ ++ case ANEG_STATE_DISABLE_LINK_OK: ++ ret = ANEG_DONE; ++ break; ++ ++ case ANEG_STATE_ABILITY_DETECT_INIT: ++ ap->flags &= ~(MR_TOGGLE_TX); ++ ap->txconfig = (ANEG_CFG_FD | ANEG_CFG_PS1); ++ tw32(MAC_TX_AUTO_NEG, ap->txconfig); ++ tp->mac_mode |= MAC_MODE_SEND_CONFIGS; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ ap->state = ANEG_STATE_ABILITY_DETECT; ++ break; ++ ++ case ANEG_STATE_ABILITY_DETECT: ++ if (ap->ability_match != 0 && ap->rxconfig != 0) { ++ ap->state = ANEG_STATE_ACK_DETECT_INIT; ++ } ++ break; ++ ++ case ANEG_STATE_ACK_DETECT_INIT: ++ ap->txconfig |= ANEG_CFG_ACK; ++ tw32(MAC_TX_AUTO_NEG, ap->txconfig); ++ tp->mac_mode |= MAC_MODE_SEND_CONFIGS; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ ap->state = ANEG_STATE_ACK_DETECT; ++ ++ /* fallthru */ ++ case ANEG_STATE_ACK_DETECT: ++ if (ap->ack_match != 0) { ++ if ((ap->rxconfig & ~ANEG_CFG_ACK) == ++ (ap->ability_match_cfg & ~ANEG_CFG_ACK)) { ++ ap->state = ANEG_STATE_COMPLETE_ACK_INIT; ++ } else { ++ ap->state = ANEG_STATE_AN_ENABLE; ++ } ++ } else if (ap->ability_match != 0 && ++ ap->rxconfig == 0) { ++ ap->state = ANEG_STATE_AN_ENABLE; ++ } ++ break; ++ ++ case ANEG_STATE_COMPLETE_ACK_INIT: ++ if (ap->rxconfig & ANEG_CFG_INVAL) { ++ ret = ANEG_FAILED; ++ break; ++ } ++ ap->flags &= ~(MR_LP_ADV_FULL_DUPLEX | ++ MR_LP_ADV_HALF_DUPLEX | ++ MR_LP_ADV_SYM_PAUSE | ++ MR_LP_ADV_ASYM_PAUSE | ++ MR_LP_ADV_REMOTE_FAULT1 | ++ MR_LP_ADV_REMOTE_FAULT2 | ++ MR_LP_ADV_NEXT_PAGE | ++ MR_TOGGLE_RX | ++ MR_NP_RX); ++ if (ap->rxconfig & ANEG_CFG_FD) ++ ap->flags |= MR_LP_ADV_FULL_DUPLEX; ++ if (ap->rxconfig & ANEG_CFG_HD) ++ ap->flags |= MR_LP_ADV_HALF_DUPLEX; ++ if (ap->rxconfig & ANEG_CFG_PS1) ++ ap->flags |= MR_LP_ADV_SYM_PAUSE; ++ if (ap->rxconfig & ANEG_CFG_PS2) ++ ap->flags |= MR_LP_ADV_ASYM_PAUSE; ++ if (ap->rxconfig & ANEG_CFG_RF1) ++ ap->flags |= MR_LP_ADV_REMOTE_FAULT1; ++ if (ap->rxconfig & ANEG_CFG_RF2) ++ ap->flags |= MR_LP_ADV_REMOTE_FAULT2; ++ if (ap->rxconfig & ANEG_CFG_NP) ++ ap->flags |= MR_LP_ADV_NEXT_PAGE; ++ ++ ap->link_time = ap->cur_time; ++ ++ ap->flags ^= (MR_TOGGLE_TX); ++ if (ap->rxconfig & 0x0008) ++ ap->flags |= MR_TOGGLE_RX; ++ if (ap->rxconfig & ANEG_CFG_NP) ++ ap->flags |= MR_NP_RX; ++ ap->flags |= MR_PAGE_RX; ++ ++ ap->state = ANEG_STATE_COMPLETE_ACK; ++ ret = ANEG_TIMER_ENAB; ++ break; ++ ++ case ANEG_STATE_COMPLETE_ACK: ++ if (ap->ability_match != 0 && ++ ap->rxconfig == 0) { ++ ap->state = ANEG_STATE_AN_ENABLE; ++ break; ++ } ++ delta = ap->cur_time - ap->link_time; ++ if (delta > ANEG_STATE_SETTLE_TIME) { ++ if (!(ap->flags & (MR_LP_ADV_NEXT_PAGE))) { ++ ap->state = ANEG_STATE_IDLE_DETECT_INIT; ++ } else { ++ if ((ap->txconfig & ANEG_CFG_NP) == 0 && ++ !(ap->flags & MR_NP_RX)) { ++ ap->state = ANEG_STATE_IDLE_DETECT_INIT; ++ } else { ++ ret = ANEG_FAILED; ++ } ++ } ++ } ++ break; ++ ++ case ANEG_STATE_IDLE_DETECT_INIT: ++ ap->link_time = ap->cur_time; ++ tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ ap->state = ANEG_STATE_IDLE_DETECT; ++ ret = ANEG_TIMER_ENAB; ++ break; ++ ++ case ANEG_STATE_IDLE_DETECT: ++ if (ap->ability_match != 0 && ++ ap->rxconfig == 0) { ++ ap->state = ANEG_STATE_AN_ENABLE; ++ break; ++ } ++ delta = ap->cur_time - ap->link_time; ++ if (delta > ANEG_STATE_SETTLE_TIME) { ++ /* XXX another gem from the Broadcom driver :( */ ++ ap->state = ANEG_STATE_LINK_OK; ++ } ++ break; ++ ++ case ANEG_STATE_LINK_OK: ++ ap->flags |= (MR_AN_COMPLETE | MR_LINK_OK); ++ ret = ANEG_DONE; ++ break; ++ ++ case ANEG_STATE_NEXT_PAGE_WAIT_INIT: ++ /* ??? unimplemented */ ++ break; ++ ++ case ANEG_STATE_NEXT_PAGE_WAIT: ++ /* ??? unimplemented */ ++ break; ++ ++ default: ++ ret = ANEG_FAILED; ++ break; ++ }; ++ ++ return ret; ++} ++ ++static int tg3_setup_fiber_phy(struct tg3 *tp) ++{ ++ uint32_t orig_pause_cfg; ++ uint16_t orig_active_speed; ++ uint8_t orig_active_duplex; ++ int current_link_up; ++ int i; ++ ++ orig_pause_cfg = ++ (tp->tg3_flags & (TG3_FLAG_RX_PAUSE | ++ TG3_FLAG_TX_PAUSE)); ++ orig_active_speed = tp->link_config.active_speed; ++ orig_active_duplex = tp->link_config.active_duplex; ++ ++ tp->mac_mode &= ~(MAC_MODE_PORT_MODE_MASK | MAC_MODE_HALF_DUPLEX); ++ tp->mac_mode |= MAC_MODE_PORT_MODE_TBI; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ /* Reset when initting first time or we have a link. */ ++ if (!(tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) || ++ (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) { ++ /* Set PLL lock range. */ ++ tg3_writephy(tp, 0x16, 0x8007); ++ ++ /* SW reset */ ++ tg3_writephy(tp, MII_BMCR, BMCR_RESET); ++ ++ /* Wait for reset to complete. */ ++ mdelay(5); ++ ++ /* Config mode; select PMA/Ch 1 regs. */ ++ tg3_writephy(tp, 0x10, 0x8411); ++ ++ /* Enable auto-lock and comdet, select txclk for tx. */ ++ tg3_writephy(tp, 0x11, 0x0a10); ++ ++ tg3_writephy(tp, 0x18, 0x00a0); ++ tg3_writephy(tp, 0x16, 0x41ff); ++ ++ /* Assert and deassert POR. */ ++ tg3_writephy(tp, 0x13, 0x0400); ++ udelay(40); ++ tg3_writephy(tp, 0x13, 0x0000); ++ ++ tg3_writephy(tp, 0x11, 0x0a50); ++ udelay(40); ++ tg3_writephy(tp, 0x11, 0x0a10); ++ ++ /* Wait for signal to stabilize */ ++ mdelay(150); ++ ++ /* Deselect the channel register so we can read the PHYID ++ * later. ++ */ ++ tg3_writephy(tp, 0x10, 0x8011); ++ } ++ ++ /* Disable link change interrupt. */ ++ tw32_carefully(MAC_EVENT, 0); ++ ++ current_link_up = 0; ++ if (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) { ++ if (!(tp->tg3_flags & TG3_FLAG_GOT_SERDES_FLOWCTL)) { ++ struct tg3_fiber_aneginfo aninfo; ++ int status = ANEG_FAILED; ++ unsigned int tick; ++ uint32_t tmp; ++ ++ memset(&aninfo, 0, sizeof(aninfo)); ++ aninfo.flags |= (MR_AN_ENABLE); ++ ++ tw32(MAC_TX_AUTO_NEG, 0); ++ ++ tmp = tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK; ++ tw32_carefully(MAC_MODE, tmp | MAC_MODE_PORT_MODE_GMII); ++ ++ tw32_carefully(MAC_MODE, tp->mac_mode | MAC_MODE_SEND_CONFIGS); ++ ++ aninfo.state = ANEG_STATE_UNKNOWN; ++ aninfo.cur_time = 0; ++ tick = 0; ++ while (++tick < 195000) { ++ status = tg3_fiber_aneg_smachine(tp, &aninfo); ++ if (status == ANEG_DONE || ++ status == ANEG_FAILED) ++ break; ++ ++ udelay(1); ++ } ++ ++ tp->mac_mode &= ~MAC_MODE_SEND_CONFIGS; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ if (status == ANEG_DONE && ++ (aninfo.flags & ++ (MR_AN_COMPLETE | MR_LINK_OK | ++ MR_LP_ADV_FULL_DUPLEX))) { ++ uint32_t local_adv, remote_adv; ++ ++ local_adv = ADVERTISE_PAUSE_CAP; ++ remote_adv = 0; ++ if (aninfo.flags & MR_LP_ADV_SYM_PAUSE) ++ remote_adv |= LPA_PAUSE_CAP; ++ if (aninfo.flags & MR_LP_ADV_ASYM_PAUSE) ++ remote_adv |= LPA_PAUSE_ASYM; ++ ++ tg3_setup_flow_control(tp, local_adv, remote_adv); ++ ++ tp->tg3_flags |= ++ TG3_FLAG_GOT_SERDES_FLOWCTL; ++ current_link_up = 1; ++ } ++ for (i = 0; i < 60; i++) { ++ udelay(20); ++ tw32_carefully(MAC_STATUS, ++ (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)); ++ if ((tr32(MAC_STATUS) & ++ (MAC_STATUS_SYNC_CHANGED | ++ MAC_STATUS_CFG_CHANGED)) == 0) ++ break; ++ } ++ if (current_link_up == 0 && ++ (tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED)) { ++ current_link_up = 1; ++ } ++ } else { ++ /* Forcing 1000FD link up. */ ++ current_link_up = 1; ++ } ++ } ++ ++ tp->mac_mode &= ~MAC_MODE_LINK_POLARITY; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ tp->hw_status->status = ++ (SD_STATUS_UPDATED | ++ (tp->hw_status->status & ~SD_STATUS_LINK_CHG)); ++ ++ for (i = 0; i < 100; i++) { ++ udelay(20); ++ tw32_carefully(MAC_STATUS, ++ (MAC_STATUS_SYNC_CHANGED | MAC_STATUS_CFG_CHANGED)); ++ if ((tr32(MAC_STATUS) & ++ (MAC_STATUS_SYNC_CHANGED | ++ MAC_STATUS_CFG_CHANGED)) == 0) ++ break; ++ } ++ ++ if ((tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) == 0) ++ current_link_up = 0; ++ ++ if (current_link_up == 1) { ++ tp->link_config.active_speed = SPEED_1000; ++ tp->link_config.active_duplex = DUPLEX_FULL; ++ } else { ++ tp->link_config.active_speed = SPEED_INVALID; ++ tp->link_config.active_duplex = DUPLEX_INVALID; ++ } ++ ++ if (current_link_up != tp->carrier_ok) { ++ tp->carrier_ok = current_link_up; ++ tg3_link_report(tp); ++ } else { ++ uint32_t now_pause_cfg = ++ tp->tg3_flags & (TG3_FLAG_RX_PAUSE | ++ TG3_FLAG_TX_PAUSE); ++ if (orig_pause_cfg != now_pause_cfg || ++ orig_active_speed != tp->link_config.active_speed || ++ orig_active_duplex != tp->link_config.active_duplex) ++ tg3_link_report(tp); ++ } ++ ++ if ((tr32(MAC_STATUS) & MAC_STATUS_PCS_SYNCED) == 0) { ++ tw32_carefully(MAC_MODE, tp->mac_mode | MAC_MODE_LINK_POLARITY); ++ if (tp->tg3_flags & TG3_FLAG_INIT_COMPLETE) { ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ } ++ } ++ ++ return 0; ++} ++#else ++#define tg3_setup_fiber_phy(TP) (-EINVAL) ++#endif /* SUPPORT_FIBER_PHY */ ++ ++static int tg3_setup_phy(struct tg3 *tp) ++{ ++ int err; ++ ++ if (tp->phy_id == PHY_ID_SERDES) { ++ err = tg3_setup_fiber_phy(tp); ++ } else { ++ err = tg3_setup_copper_phy(tp); ++ } ++ ++ if (tp->link_config.active_speed == SPEED_1000 && ++ tp->link_config.active_duplex == DUPLEX_HALF) ++ tw32(MAC_TX_LENGTHS, ++ ((2 << TX_LENGTHS_IPG_CRS_SHIFT) | ++ (6 << TX_LENGTHS_IPG_SHIFT) | ++ (0xff << TX_LENGTHS_SLOT_TIME_SHIFT))); ++ else ++ tw32(MAC_TX_LENGTHS, ++ ((2 << TX_LENGTHS_IPG_CRS_SHIFT) | ++ (6 << TX_LENGTHS_IPG_SHIFT) | ++ (32 << TX_LENGTHS_SLOT_TIME_SHIFT))); ++ ++ return err; ++} ++ ++ ++#define MAX_WAIT_CNT 1000 ++ ++/* To stop a block, clear the enable bit and poll till it ++ * clears. ++ */ ++static int tg3_stop_block(struct tg3 *tp, unsigned long ofs, uint32_t enable_bit) ++{ ++ unsigned int i; ++ uint32_t val; ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { ++ switch(ofs) { ++ case RCVLSC_MODE: ++ case DMAC_MODE: ++ case MBFREE_MODE: ++ case BUFMGR_MODE: ++ case MEMARB_MODE: ++ /* We can't enable/disable these bits of the ++ * 5705, just say success. ++ */ ++ return 0; ++ default: ++ break; ++ } ++ } ++ val = tr32(ofs); ++ val &= ~enable_bit; ++ tw32(ofs, val); ++ tr32(ofs); ++ ++ for (i = 0; i < MAX_WAIT_CNT; i++) { ++ udelay(100); ++ val = tr32(ofs); ++ if ((val & enable_bit) == 0) ++ break; ++ } ++ ++ if (i == MAX_WAIT_CNT) { ++ printf("tg3_stop_block timed out, ofs=%lx enable_bit=%x\n", ++ ofs, enable_bit); ++ return -ENODEV; ++ } ++ ++ return 0; ++} ++ ++static int tg3_abort_hw(struct tg3 *tp) ++{ ++ int i, err; ++ ++ tg3_disable_ints(tp); ++ ++ tp->rx_mode &= ~RX_MODE_ENABLE; ++ tw32_carefully(MAC_RX_MODE, tp->rx_mode); ++ ++ err = tg3_stop_block(tp, RCVBDI_MODE, RCVBDI_MODE_ENABLE); ++ err |= tg3_stop_block(tp, RCVLPC_MODE, RCVLPC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, RCVLSC_MODE, RCVLSC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, RCVDBDI_MODE, RCVDBDI_MODE_ENABLE); ++ err |= tg3_stop_block(tp, RCVDCC_MODE, RCVDCC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, RCVCC_MODE, RCVCC_MODE_ENABLE); ++ ++ err |= tg3_stop_block(tp, SNDBDS_MODE, SNDBDS_MODE_ENABLE); ++ err |= tg3_stop_block(tp, SNDBDI_MODE, SNDBDI_MODE_ENABLE); ++ err |= tg3_stop_block(tp, SNDDATAI_MODE, SNDDATAI_MODE_ENABLE); ++ err |= tg3_stop_block(tp, RDMAC_MODE, RDMAC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, SNDDATAC_MODE, SNDDATAC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, SNDBDC_MODE, SNDBDC_MODE_ENABLE); ++ if (err) ++ goto out; ++ ++ tp->mac_mode &= ~MAC_MODE_TDE_ENABLE; ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ tp->tx_mode &= ~TX_MODE_ENABLE; ++ tw32_carefully(MAC_TX_MODE, tp->tx_mode); ++ ++ for (i = 0; i < MAX_WAIT_CNT; i++) { ++ udelay(100); ++ if (!(tr32(MAC_TX_MODE) & TX_MODE_ENABLE)) ++ break; ++ } ++ if (i >= MAX_WAIT_CNT) { ++ printf("tg3_abort_hw timed out TX_MODE_ENABLE will not clear MAC_TX_MODE=%x\n", ++ tr32(MAC_TX_MODE)); ++ return -ENODEV; ++ } ++ ++ err = tg3_stop_block(tp, HOSTCC_MODE, HOSTCC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, WDMAC_MODE, WDMAC_MODE_ENABLE); ++ err |= tg3_stop_block(tp, MBFREE_MODE, MBFREE_MODE_ENABLE); ++ ++ tw32(FTQ_RESET, 0xffffffff); ++ tw32(FTQ_RESET, 0x00000000); ++ ++ err |= tg3_stop_block(tp, BUFMGR_MODE, BUFMGR_MODE_ENABLE); ++ err |= tg3_stop_block(tp, MEMARB_MODE, MEMARB_MODE_ENABLE); ++ if (err) ++ goto out; ++ ++ memset(tp->hw_status, 0, TG3_HW_STATUS_SIZE); ++ ++out: ++ return err; ++} ++ ++static void tg3_chip_reset(struct tg3 *tp) ++{ ++ uint32_t val; ++ ++ if (!(tp->tg3_flags2 & TG3_FLG2_SUN_5704)) { ++ /* Force NVRAM to settle. ++ * This deals with a chip bug which can result in EEPROM ++ * corruption. ++ */ ++ if (tp->tg3_flags & TG3_FLAG_NVRAM) { ++ int i; ++ ++ tw32(NVRAM_SWARB, SWARB_REQ_SET1); ++ for (i = 0; i < 100000; i++) { ++ if (tr32(NVRAM_SWARB) & SWARB_GNT1) ++ break; ++ udelay(10); ++ } ++ } ++ } ++ /* In Etherboot we don't need to worry about the 5701 ++ * REG_WRITE_BUG because we do all register writes indirectly. ++ */ ++ ++ /* do the reset */ ++ val = GRC_MISC_CFG_CORECLK_RESET; ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) ++ val |= GRC_MISC_CFG_KEEP_GPHY_POWER; ++ tw32(GRC_MISC_CFG, val); ++ ++ /* Flush PCI posted writes. The normal MMIO registers ++ * are inaccessible at this time so this is the only ++ * way to make this reliably. I tried to use indirect ++ * register read/write but this upset some 5701 variants. ++ */ ++ pci_read_config_dword(tp->pdev, PCI_COMMAND, &val); ++ ++ udelay(120); ++ ++ /* Re-enable indirect register accesses. */ ++ pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, ++ tp->misc_host_ctrl); ++ ++ /* Set MAX PCI retry to zero. */ ++ val = (PCISTATE_ROM_ENABLE | PCISTATE_ROM_RETRY_ENABLE); ++ if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0 && ++ (tp->tg3_flags & TG3_FLAG_PCIX_MODE)) ++ val |= PCISTATE_RETRY_SAME_DMA; ++ pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, val); ++ ++ pci_restore_state(tp->pdev, tp->pci_cfg_state); ++ ++ /* Make sure PCI-X relaxed ordering bit is clear. */ ++ pci_read_config_dword(tp->pdev, TG3PCI_X_CAPS, &val); ++ val &= ~PCIX_CAPS_RELAXED_ORDERING; ++ pci_write_config_dword(tp->pdev, TG3PCI_X_CAPS, val); ++ ++ tw32(MEMARB_MODE, MEMARB_MODE_ENABLE); ++ ++ if (((tp->nic_sram_data_cfg & NIC_SRAM_DATA_CFG_MINI_PCI) != 0) && ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) { ++ tp->pci_clock_ctrl |= ++ (CLOCK_CTRL_FORCE_CLKRUN | CLOCK_CTRL_CLKRUN_OENABLE); ++ tw32(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl); ++ } ++ ++ tw32(TG3PCI_MISC_HOST_CTRL, tp->misc_host_ctrl); ++} ++ ++static void tg3_stop_fw(struct tg3 *tp) ++{ ++ if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) { ++ uint32_t val; ++ int i; ++ ++ tg3_write_mem(NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_PAUSE_FW); ++ val = tr32(GRC_RX_CPU_EVENT); ++ val |= (1 << 14); ++ tw32(GRC_RX_CPU_EVENT, val); ++ ++ /* Wait for RX cpu to ACK the event. */ ++ for (i = 0; i < 100; i++) { ++ if (!(tr32(GRC_RX_CPU_EVENT) & (1 << 14))) ++ break; ++ udelay(1); ++ } ++ } ++} ++ ++static int tg3_restart_fw(struct tg3 *tp, uint32_t state) ++{ ++ uint32_t val; ++ int i; ++ ++ tg3_write_mem(NIC_SRAM_FIRMWARE_MBOX, ++ NIC_SRAM_FIRMWARE_MBOX_MAGIC1); ++ /* Wait for firmware initialization to complete. */ ++ for (i = 0; i < 100000; i++) { ++ tg3_read_mem(NIC_SRAM_FIRMWARE_MBOX, &val); ++ if (val == (uint32_t) ~NIC_SRAM_FIRMWARE_MBOX_MAGIC1) ++ break; ++ udelay(10); ++ } ++ if (i >= 100000 && ++ !(tp->tg3_flags2 & TG3_FLG2_SUN_5704)) { ++ printf("Firmware will not restart magic=%x\n", ++ val); ++ return -ENODEV; ++ } ++ if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) { ++ state = DRV_STATE_SUSPEND; ++ } ++ tg3_write_mem(NIC_SRAM_FW_DRV_STATE_MBOX, state); ++ return 0; ++} ++ ++static int tg3_halt(struct tg3 *tp) ++{ ++ tg3_stop_fw(tp); ++ tg3_abort_hw(tp); ++ tg3_chip_reset(tp); ++ return tg3_restart_fw(tp, DRV_STATE_UNLOAD); ++} ++ ++static void __tg3_set_mac_addr(struct tg3 *tp) ++{ ++ uint32_t addr_high, addr_low; ++ int i; ++ ++ addr_high = ((tp->nic->node_addr[0] << 8) | ++ tp->nic->node_addr[1]); ++ addr_low = ((tp->nic->node_addr[2] << 24) | ++ (tp->nic->node_addr[3] << 16) | ++ (tp->nic->node_addr[4] << 8) | ++ (tp->nic->node_addr[5] << 0)); ++ for (i = 0; i < 4; i++) { ++ tw32(MAC_ADDR_0_HIGH + (i * 8), addr_high); ++ tw32(MAC_ADDR_0_LOW + (i * 8), addr_low); ++ } ++ ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700) && ++ (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) && ++ (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705)) { ++ for(i = 0; i < 12; i++) { ++ tw32(MAC_EXTADDR_0_HIGH + (i * 8), addr_high); ++ tw32(MAC_EXTADDR_0_LOW + (i * 8), addr_low); ++ } ++ } ++ addr_high = (tp->nic->node_addr[0] + ++ tp->nic->node_addr[1] + ++ tp->nic->node_addr[2] + ++ tp->nic->node_addr[3] + ++ tp->nic->node_addr[4] + ++ tp->nic->node_addr[5]) & ++ TX_BACKOFF_SEED_MASK; ++ tw32(MAC_TX_BACKOFF_SEED, addr_high); ++} ++ ++static void tg3_set_bdinfo(struct tg3 *tp, uint32_t bdinfo_addr, ++ dma_addr_t mapping, uint32_t maxlen_flags, ++ uint32_t nic_addr) ++{ ++ tg3_write_mem((bdinfo_addr + ++ TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH), ++ ((uint64_t) mapping >> 32)); ++ tg3_write_mem((bdinfo_addr + ++ TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW), ++ ((uint64_t) mapping & 0xffffffff)); ++ tg3_write_mem((bdinfo_addr + ++ TG3_BDINFO_MAXLEN_FLAGS), ++ maxlen_flags); ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ tg3_write_mem((bdinfo_addr + TG3_BDINFO_NIC_ADDR), nic_addr); ++ } ++} ++ ++ ++static void tg3_init_rings(struct tg3 *tp) ++{ ++ unsigned i; ++ ++ /* Zero out the tg3 variables */ ++ memset(&tg3_bss, 0, sizeof(tg3_bss)); ++ tp->rx_std = &tg3_bss.rx_std[0]; ++ tp->rx_rcb = &tg3_bss.rx_rcb[0]; ++ tp->tx_ring = &tg3_bss.tx_ring[0]; ++ tp->hw_status = &tg3_bss.hw_status; ++ tp->hw_stats = &tg3_bss.hw_stats; ++ tp->mac_mode = 0; ++ ++ ++ /* Initialize tx/rx rings for packet processing. ++ * ++ * The chip has been shut down and the driver detached from ++ * the networking, so no interrupts or new tx packets will ++ * end up in the driver. ++ */ ++ ++ /* Initialize invariants of the rings, we only set this ++ * stuff once. This works because the card does not ++ * write into the rx buffer posting rings. ++ */ ++ for (i = 0; i < TG3_RX_RING_SIZE; i++) { ++ struct tg3_rx_buffer_desc *rxd; ++ ++ rxd = &tp->rx_std[i]; ++ rxd->idx_len = (RX_PKT_BUF_SZ - 2 - 64) << RXD_LEN_SHIFT; ++ rxd->type_flags = (RXD_FLAG_END << RXD_FLAGS_SHIFT); ++ rxd->opaque = (RXD_OPAQUE_RING_STD | (i << RXD_OPAQUE_INDEX_SHIFT)); ++ ++ /* Note where the receive buffer for the ring is placed */ ++ rxd->addr_hi = 0; ++ rxd->addr_lo = virt_to_bus( ++ &tg3_bss.rx_bufs[i%TG3_DEF_RX_RING_PENDING][2]); ++ } ++} ++ ++#define TG3_WRITE_SETTINGS(TABLE) \ ++do { \ ++ const uint32_t *_table, *_end; \ ++ _table = TABLE; \ ++ _end = _table + sizeof(TABLE)/sizeof(TABLE[0]); \ ++ for(; _table < _end; _table += 2) { \ ++ tw32(_table[0], _table[1]); \ ++ } \ ++} while(0) ++ ++ ++/* initialize/reset the tg3 */ ++static int tg3_setup_hw(struct tg3 *tp) ++{ ++ uint32_t val, rdmac_mode; ++ int i, err, limit; ++ ++ /* Simply don't support setups with extremly buggy firmware in etherboot */ ++ if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0) { ++ printf("Error 5701_A0 firmware bug detected\n"); ++ return -EINVAL; ++ } ++ ++ tg3_disable_ints(tp); ++ ++ /* Originally this was all in tg3_init_hw */ ++ ++ /* Force the chip into D0. */ ++ tg3_set_power_state_0(tp); ++ ++ tg3_switch_clocks(tp); ++ ++ tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0); ++ ++ ++ /* Originally this was all in tg3_reset_hw */ ++ ++ tg3_stop_fw(tp); ++ ++ /* No need to call tg3_abort_hw here, it is called before tg3_setup_hw. */ ++ ++ tg3_chip_reset(tp); ++ ++ tw32(GRC_MODE, tp->grc_mode); /* Redundant? */ ++ ++ err = tg3_restart_fw(tp, DRV_STATE_START); ++ if (err) ++ return err; ++ ++ if (tp->phy_id == PHY_ID_SERDES) { ++ tp->mac_mode = MAC_MODE_PORT_MODE_TBI; ++ } ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ ++ /* This works around an issue with Athlon chipsets on ++ * B3 tigon3 silicon. This bit has no effect on any ++ * other revision. ++ */ ++ tp->pci_clock_ctrl |= CLOCK_CTRL_DELAY_PCI_GRANT; ++ tw32_carefully(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl); ++ ++ if (tp->pci_chip_rev_id == CHIPREV_ID_5704_A0 && ++ (tp->tg3_flags & TG3_FLAG_PCIX_MODE)) { ++ val = tr32(TG3PCI_PCISTATE); ++ val |= PCISTATE_RETRY_SAME_DMA; ++ tw32(TG3PCI_PCISTATE, val); ++ } ++ ++ /* Descriptor ring init may make accesses to the ++ * NIC SRAM area to setup the TX descriptors, so we ++ * can only do this after the hardware has been ++ * successfully reset. ++ */ ++ tg3_init_rings(tp); ++ ++ /* Clear statistics/status block in chip */ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ for (i = NIC_SRAM_STATS_BLK; ++ i < NIC_SRAM_STATUS_BLK + TG3_HW_STATUS_SIZE; ++ i += sizeof(uint32_t)) { ++ tg3_write_mem(i, 0); ++ udelay(40); ++ } ++ } ++ ++ /* This value is determined during the probe time DMA ++ * engine test, tg3_setup_dma. ++ */ ++ tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); ++ ++ tp->grc_mode &= ~(GRC_MODE_HOST_SENDBDS | ++ GRC_MODE_4X_NIC_SEND_RINGS | ++ GRC_MODE_NO_TX_PHDR_CSUM | ++ GRC_MODE_NO_RX_PHDR_CSUM); ++ tp->grc_mode |= GRC_MODE_HOST_SENDBDS; ++ tp->grc_mode |= GRC_MODE_NO_TX_PHDR_CSUM; ++ tp->grc_mode |= GRC_MODE_NO_RX_PHDR_CSUM; ++ ++ tw32(GRC_MODE, ++ tp->grc_mode | ++ (GRC_MODE_IRQ_ON_MAC_ATTN | GRC_MODE_HOST_STACKUP)); ++ ++ /* Setup the timer prescalar register. Clock is always 66Mhz. */ ++ tw32(GRC_MISC_CFG, ++ (65 << GRC_MISC_CFG_PRESCALAR_SHIFT)); ++ ++ /* Initialize MBUF/DESC pool. */ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ tw32(BUFMGR_MB_POOL_ADDR, NIC_SRAM_MBUF_POOL_BASE); ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) ++ tw32(BUFMGR_MB_POOL_SIZE, NIC_SRAM_MBUF_POOL_SIZE64); ++ else ++ tw32(BUFMGR_MB_POOL_SIZE, NIC_SRAM_MBUF_POOL_SIZE96); ++ tw32(BUFMGR_DMA_DESC_POOL_ADDR, NIC_SRAM_DMA_DESC_POOL_BASE); ++ tw32(BUFMGR_DMA_DESC_POOL_SIZE, NIC_SRAM_DMA_DESC_POOL_SIZE); ++ } ++ if (!(tp->tg3_flags & TG3_FLAG_JUMBO_ENABLE)) { ++ tw32(BUFMGR_MB_RDMA_LOW_WATER, ++ tp->bufmgr_config.mbuf_read_dma_low_water); ++ tw32(BUFMGR_MB_MACRX_LOW_WATER, ++ tp->bufmgr_config.mbuf_mac_rx_low_water); ++ tw32(BUFMGR_MB_HIGH_WATER, ++ tp->bufmgr_config.mbuf_high_water); ++ } else { ++ tw32(BUFMGR_MB_RDMA_LOW_WATER, ++ tp->bufmgr_config.mbuf_read_dma_low_water_jumbo); ++ tw32(BUFMGR_MB_MACRX_LOW_WATER, ++ tp->bufmgr_config.mbuf_mac_rx_low_water_jumbo); ++ tw32(BUFMGR_MB_HIGH_WATER, ++ tp->bufmgr_config.mbuf_high_water_jumbo); ++ } ++ tw32(BUFMGR_DMA_LOW_WATER, ++ tp->bufmgr_config.dma_low_water); ++ tw32(BUFMGR_DMA_HIGH_WATER, ++ tp->bufmgr_config.dma_high_water); ++ ++ tw32(BUFMGR_MODE, BUFMGR_MODE_ENABLE | BUFMGR_MODE_ATTN_ENABLE); ++ for (i = 0; i < 2000; i++) { ++ if (tr32(BUFMGR_MODE) & BUFMGR_MODE_ENABLE) ++ break; ++ udelay(10); ++ } ++ if (i >= 2000) { ++ printf("tg3_setup_hw cannot enable BUFMGR\n"); ++ return -ENODEV; ++ } ++ ++ tw32(FTQ_RESET, 0xffffffff); ++ tw32(FTQ_RESET, 0x00000000); ++ for (i = 0; i < 2000; i++) { ++ if (tr32(FTQ_RESET) == 0x00000000) ++ break; ++ udelay(10); ++ } ++ if (i >= 2000) { ++ printf("tg3_setup_hw cannot reset FTQ\n"); ++ return -ENODEV; ++ } ++ ++ /* Initialize TG3_BDINFO's at: ++ * RCVDBDI_STD_BD: standard eth size rx ring ++ * RCVDBDI_JUMBO_BD: jumbo frame rx ring ++ * RCVDBDI_MINI_BD: small frame rx ring (??? does not work) ++ * ++ * like so: ++ * TG3_BDINFO_HOST_ADDR: high/low parts of DMA address of ring ++ * TG3_BDINFO_MAXLEN_FLAGS: (rx max buffer size << 16) | ++ * ring attribute flags ++ * TG3_BDINFO_NIC_ADDR: location of descriptors in nic SRAM ++ * ++ * Standard receive ring @ NIC_SRAM_RX_BUFFER_DESC, 512 entries. ++ * Jumbo receive ring @ NIC_SRAM_RX_JUMBO_BUFFER_DESC, 256 entries. ++ * ++ * ??? No space allocated for mini receive ring? :( ++ * ++ * The size of each ring is fixed in the firmware, but the location is ++ * configurable. ++ */ ++ { ++ static const uint32_t table_all[] = { ++ /* Setup replenish thresholds. */ ++ RCVBDI_STD_THRESH, TG3_DEF_RX_RING_PENDING / 8, ++ ++ /* Etherboot lives below 4GB */ ++ RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_HIGH, 0, ++ RCVDBDI_STD_BD + TG3_BDINFO_NIC_ADDR, NIC_SRAM_RX_BUFFER_DESC, ++ }; ++ static const uint32_t table_not_5705[] = { ++ /* Buffer maximum length */ ++ RCVDBDI_STD_BD + TG3_BDINFO_MAXLEN_FLAGS, RX_STD_MAX_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT, ++ ++ /* Disable the mini frame rx ring */ ++ RCVDBDI_MINI_BD + TG3_BDINFO_MAXLEN_FLAGS, BDINFO_FLAGS_DISABLED, ++ ++ /* Disable the jumbo frame rx ring */ ++ RCVBDI_JUMBO_THRESH, 0, ++ RCVDBDI_JUMBO_BD + TG3_BDINFO_MAXLEN_FLAGS, BDINFO_FLAGS_DISABLED, ++ ++ ++ }; ++ TG3_WRITE_SETTINGS(table_all); ++ tw32(RCVDBDI_STD_BD + TG3_BDINFO_HOST_ADDR + TG3_64BIT_REG_LOW, ++ virt_to_bus(tp->rx_std)); ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { ++ tw32(RCVDBDI_STD_BD + TG3_BDINFO_MAXLEN_FLAGS, ++ RX_STD_MAX_SIZE_5705 << BDINFO_FLAGS_MAXLEN_SHIFT); ++ } else { ++ TG3_WRITE_SETTINGS(table_not_5705); ++ } ++ } ++ ++ ++ /* There is only one send ring on 5705, no need to explicitly ++ * disable the others. ++ */ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ /* Clear out send RCB ring in SRAM. */ ++ for (i = NIC_SRAM_SEND_RCB; i < NIC_SRAM_RCV_RET_RCB; i += TG3_BDINFO_SIZE) ++ tg3_write_mem(i + TG3_BDINFO_MAXLEN_FLAGS, BDINFO_FLAGS_DISABLED); ++ } ++ ++ tp->tx_prod = 0; ++ tw32_mailbox(MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW, 0); ++ tw32_mailbox2(MAILBOX_SNDNIC_PROD_IDX_0 + TG3_64BIT_REG_LOW, 0); ++ ++ tg3_set_bdinfo(tp, ++ NIC_SRAM_SEND_RCB, ++ virt_to_bus(tp->tx_ring), ++ (TG3_TX_RING_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT), ++ NIC_SRAM_TX_BUFFER_DESC); ++ ++ /* There is only one receive return ring on 5705, no need to explicitly ++ * disable the others. ++ */ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ for (i = NIC_SRAM_RCV_RET_RCB; i < NIC_SRAM_STATS_BLK; i += TG3_BDINFO_SIZE) { ++ tg3_write_mem(i + TG3_BDINFO_MAXLEN_FLAGS, ++ BDINFO_FLAGS_DISABLED); ++ } ++ } ++ ++ tp->rx_rcb_ptr = 0; ++ tw32_mailbox2(MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW, 0); ++ ++ tg3_set_bdinfo(tp, ++ NIC_SRAM_RCV_RET_RCB, ++ virt_to_bus(tp->rx_rcb), ++ (TG3_RX_RCB_RING_SIZE << BDINFO_FLAGS_MAXLEN_SHIFT), ++ 0); ++ ++ tp->rx_std_ptr = TG3_DEF_RX_RING_PENDING; ++ tw32_mailbox2(MAILBOX_RCV_STD_PROD_IDX + TG3_64BIT_REG_LOW, ++ tp->rx_std_ptr); ++ ++ tw32_mailbox2(MAILBOX_RCV_JUMBO_PROD_IDX + TG3_64BIT_REG_LOW, 0); ++ ++ /* Initialize MAC address and backoff seed. */ ++ __tg3_set_mac_addr(tp); ++ ++ /* Calculate RDMAC_MODE setting early, we need it to determine ++ * the RCVLPC_STATE_ENABLE mask. ++ */ ++ rdmac_mode = (RDMAC_MODE_ENABLE | RDMAC_MODE_TGTABORT_ENAB | ++ RDMAC_MODE_MSTABORT_ENAB | RDMAC_MODE_PARITYERR_ENAB | ++ RDMAC_MODE_ADDROFLOW_ENAB | RDMAC_MODE_FIFOOFLOW_ENAB | ++ RDMAC_MODE_FIFOURUN_ENAB | RDMAC_MODE_FIFOOREAD_ENAB | ++ RDMAC_MODE_LNGREAD_ENAB); ++ if (tp->tg3_flags & TG3_FLAG_SPLIT_MODE) ++ rdmac_mode |= RDMAC_MODE_SPLIT_ENABLE; ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { ++ if (tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) { ++ if (!(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) && ++ !(tp->tg3_flags2 & TG3_FLG2_IS_5788)) { ++ rdmac_mode |= RDMAC_MODE_FIFO_LONG_BURST; ++ } ++ } ++ } ++ ++ /* Setup host coalescing engine. */ ++ tw32(HOSTCC_MODE, 0); ++ for (i = 0; i < 2000; i++) { ++ if (!(tr32(HOSTCC_MODE) & HOSTCC_MODE_ENABLE)) ++ break; ++ udelay(10); ++ } ++ ++ tp->mac_mode = MAC_MODE_TXSTAT_ENABLE | MAC_MODE_RXSTAT_ENABLE | ++ MAC_MODE_TDE_ENABLE | MAC_MODE_RDE_ENABLE | MAC_MODE_FHDE_ENABLE; ++ tw32_carefully(MAC_MODE, tp->mac_mode | MAC_MODE_RXSTAT_CLEAR | MAC_MODE_TXSTAT_CLEAR); ++ ++ tp->grc_local_ctrl = GRC_LCLCTRL_INT_ON_ATTN | GRC_LCLCTRL_AUTO_SEEPROM; ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) ++ tp->grc_local_ctrl |= (GRC_LCLCTRL_GPIO_OE1 | ++ GRC_LCLCTRL_GPIO_OUTPUT1); ++ tw32_carefully(GRC_LOCAL_CTRL, tp->grc_local_ctrl); ++ ++ tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0); ++ tr32(MAILBOX_INTERRUPT_0); ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ tw32_carefully(DMAC_MODE, DMAC_MODE_ENABLE); ++ } ++ ++ val = ( WDMAC_MODE_ENABLE | WDMAC_MODE_TGTABORT_ENAB | ++ WDMAC_MODE_MSTABORT_ENAB | WDMAC_MODE_PARITYERR_ENAB | ++ WDMAC_MODE_ADDROFLOW_ENAB | WDMAC_MODE_FIFOOFLOW_ENAB | ++ WDMAC_MODE_FIFOURUN_ENAB | WDMAC_MODE_FIFOOREAD_ENAB | ++ WDMAC_MODE_LNGREAD_ENAB); ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) && ++ ((tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH) != 0) && ++ !(tp->tg3_flags2 & TG3_FLG2_IS_5788)) { ++ val |= WDMAC_MODE_RX_ACCEL; ++ } ++ tw32_carefully(WDMAC_MODE, val); ++ ++ if ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) != 0) { ++ val = tr32(TG3PCI_X_CAPS); ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) { ++ val &= PCIX_CAPS_BURST_MASK; ++ val |= (PCIX_CAPS_MAX_BURST_CPIOB << PCIX_CAPS_BURST_SHIFT); ++ } else if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { ++ val &= ~(PCIX_CAPS_SPLIT_MASK | PCIX_CAPS_BURST_MASK); ++ val |= (PCIX_CAPS_MAX_BURST_CPIOB << PCIX_CAPS_BURST_SHIFT); ++ if (tp->tg3_flags & TG3_FLAG_SPLIT_MODE) ++ val |= (tp->split_mode_max_reqs << ++ PCIX_CAPS_SPLIT_SHIFT); ++ } ++ tw32(TG3PCI_X_CAPS, val); ++ } ++ ++ tw32_carefully(RDMAC_MODE, rdmac_mode); ++ { ++ static const uint32_t table_all[] = { ++ /* MTU + ethernet header + FCS + optional VLAN tag */ ++ MAC_RX_MTU_SIZE, ETH_MAX_MTU + ETH_HLEN + 8, ++ ++ /* The slot time is changed by tg3_setup_phy if we ++ * run at gigabit with half duplex. ++ */ ++ MAC_TX_LENGTHS, ++ (2 << TX_LENGTHS_IPG_CRS_SHIFT) | ++ (6 << TX_LENGTHS_IPG_SHIFT) | ++ (32 << TX_LENGTHS_SLOT_TIME_SHIFT), ++ ++ /* Receive rules. */ ++ MAC_RCV_RULE_CFG, RCV_RULE_CFG_DEFAULT_CLASS, ++ RCVLPC_CONFIG, 0x0181, ++ ++ /* Receive/send statistics. */ ++ RCVLPC_STATS_ENABLE, 0xffffff, ++ RCVLPC_STATSCTRL, RCVLPC_STATSCTRL_ENABLE, ++ SNDDATAI_STATSENAB, 0xffffff, ++ SNDDATAI_STATSCTRL, (SNDDATAI_SCTRL_ENABLE |SNDDATAI_SCTRL_FASTUPD), ++ ++ /* Host coalescing engine */ ++ HOSTCC_RXCOL_TICKS, 0, ++ HOSTCC_TXCOL_TICKS, LOW_TXCOL_TICKS, ++ HOSTCC_RXMAX_FRAMES, 1, ++ HOSTCC_TXMAX_FRAMES, LOW_RXMAX_FRAMES, ++ HOSTCC_RXCOAL_MAXF_INT, 1, ++ HOSTCC_TXCOAL_MAXF_INT, 0, ++ ++ /* Status/statistics block address. */ ++ /* Etherboot lives below 4GB, so HIGH == 0 */ ++ HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH, 0, ++ ++ /* No need to enable 32byte coalesce mode. */ ++ HOSTCC_MODE, HOSTCC_MODE_ENABLE | 0, ++ ++ RCVCC_MODE, RCVCC_MODE_ENABLE | RCVCC_MODE_ATTN_ENABLE, ++ RCVLPC_MODE, RCVLPC_MODE_ENABLE, ++ ++ RCVDCC_MODE, RCVDCC_MODE_ENABLE | RCVDCC_MODE_ATTN_ENABLE, ++ ++ SNDDATAC_MODE, SNDDATAC_MODE_ENABLE, ++ SNDBDC_MODE, SNDBDC_MODE_ENABLE | SNDBDC_MODE_ATTN_ENABLE, ++ RCVBDI_MODE, RCVBDI_MODE_ENABLE | RCVBDI_MODE_RCB_ATTN_ENAB, ++ RCVDBDI_MODE, RCVDBDI_MODE_ENABLE | RCVDBDI_MODE_INV_RING_SZ, ++ SNDDATAI_MODE, SNDDATAI_MODE_ENABLE, ++ SNDBDI_MODE, SNDBDI_MODE_ENABLE | SNDBDI_MODE_ATTN_ENABLE, ++ SNDBDS_MODE, SNDBDS_MODE_ENABLE | SNDBDS_MODE_ATTN_ENABLE, ++ ++ /* Accept all multicast frames. */ ++ MAC_HASH_REG_0, 0xffffffff, ++ MAC_HASH_REG_1, 0xffffffff, ++ MAC_HASH_REG_2, 0xffffffff, ++ MAC_HASH_REG_3, 0xffffffff, ++ }; ++ static const uint32_t table_not_5705[] = { ++ /* Host coalescing engine */ ++ HOSTCC_RXCOAL_TICK_INT, 0, ++ HOSTCC_TXCOAL_TICK_INT, 0, ++ ++ /* Status/statistics block address. */ ++ /* Etherboot lives below 4GB, so HIGH == 0 */ ++ HOSTCC_STAT_COAL_TICKS, DEFAULT_STAT_COAL_TICKS, ++ HOSTCC_STATS_BLK_HOST_ADDR + TG3_64BIT_REG_HIGH, 0, ++ HOSTCC_STATS_BLK_NIC_ADDR, NIC_SRAM_STATS_BLK, ++ HOSTCC_STATUS_BLK_NIC_ADDR, NIC_SRAM_STATUS_BLK, ++ ++ RCVLSC_MODE, RCVLSC_MODE_ENABLE | RCVLSC_MODE_ATTN_ENABLE, ++ ++ MBFREE_MODE, MBFREE_MODE_ENABLE, ++ }; ++ TG3_WRITE_SETTINGS(table_all); ++ tw32(HOSTCC_STATS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW, ++ virt_to_bus(tp->hw_stats)); ++ tw32(HOSTCC_STATUS_BLK_HOST_ADDR + TG3_64BIT_REG_LOW, ++ virt_to_bus(tp->hw_status)); ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) { ++ TG3_WRITE_SETTINGS(table_not_5705); ++ } ++ } ++ ++ tp->tx_mode = TX_MODE_ENABLE; ++ tw32_carefully(MAC_TX_MODE, tp->tx_mode); ++ ++ tp->rx_mode = RX_MODE_ENABLE; ++ tw32_carefully(MAC_RX_MODE, tp->rx_mode); ++ ++ tp->mi_mode = MAC_MI_MODE_BASE; ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode); ++ ++ tw32(MAC_LED_CTRL, 0); ++ tw32(MAC_MI_STAT, MAC_MI_STAT_LNKSTAT_ATTN_ENAB); ++ if (tp->phy_id == PHY_ID_SERDES) { ++ tw32_carefully(MAC_RX_MODE, RX_MODE_RESET); ++ } ++ tp->rx_mode |= RX_MODE_KEEP_VLAN_TAG; /* drop tagged vlan packets */ ++ tw32_carefully(MAC_RX_MODE, tp->rx_mode); ++ ++ if (tp->pci_chip_rev_id == CHIPREV_ID_5703_A1) ++ tw32(MAC_SERDES_CFG, 0x616000); ++ ++ /* Prevent chip from dropping frames when flow control ++ * is enabled. ++ */ ++ tw32(MAC_LOW_WMARK_MAX_RX_FRAME, 2); ++ tr32(MAC_LOW_WMARK_MAX_RX_FRAME); ++ ++ err = tg3_setup_phy(tp); ++ ++ /* Ignore CRC stats */ ++ ++ /* Initialize receive rules. */ ++ tw32(MAC_RCV_RULE_0, 0xc2000000 & RCV_RULE_DISABLE_MASK); ++ tw32(MAC_RCV_VALUE_0, 0xffffffff & RCV_RULE_DISABLE_MASK); ++ tw32(MAC_RCV_RULE_1, 0x86000004 & RCV_RULE_DISABLE_MASK); ++ tw32(MAC_RCV_VALUE_1, 0xffffffff & RCV_RULE_DISABLE_MASK); ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) ++ limit = 8; ++ else ++ limit = 16; ++ if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) ++ limit -= 4; ++ switch (limit) { ++ case 16: tw32(MAC_RCV_RULE_15, 0); tw32(MAC_RCV_VALUE_15, 0); ++ case 15: tw32(MAC_RCV_RULE_14, 0); tw32(MAC_RCV_VALUE_14, 0); ++ case 14: tw32(MAC_RCV_RULE_13, 0); tw32(MAC_RCV_VALUE_13, 0); ++ case 13: tw32(MAC_RCV_RULE_12, 0); tw32(MAC_RCV_VALUE_12, 0); ++ case 12: tw32(MAC_RCV_RULE_11, 0); tw32(MAC_RCV_VALUE_11, 0); ++ case 11: tw32(MAC_RCV_RULE_10, 0); tw32(MAC_RCV_VALUE_10, 0); ++ case 10: tw32(MAC_RCV_RULE_9, 0); tw32(MAC_RCV_VALUE_9, 0); ++ case 9: tw32(MAC_RCV_RULE_8, 0); tw32(MAC_RCV_VALUE_8, 0); ++ case 8: tw32(MAC_RCV_RULE_7, 0); tw32(MAC_RCV_VALUE_7, 0); ++ case 7: tw32(MAC_RCV_RULE_6, 0); tw32(MAC_RCV_VALUE_6, 0); ++ case 6: tw32(MAC_RCV_RULE_5, 0); tw32(MAC_RCV_VALUE_5, 0); ++ case 5: tw32(MAC_RCV_RULE_4, 0); tw32(MAC_RCV_VALUE_4, 0); ++ case 4: /* tw32(MAC_RCV_RULE_3, 0); tw32(MAC_RCV_VALUE_3, 0); */ ++ case 3: /* tw32(MAC_RCV_RULE_2, 0); tw32(MAC_RCV_VALUE_2, 0); */ ++ case 2: ++ case 1: ++ default: ++ break; ++ }; ++ ++ return err; ++} ++ ++ ++ ++/* Chips other than 5700/5701 use the NVRAM for fetching info. */ ++static void tg3_nvram_init(struct tg3 *tp) ++{ ++ tw32(GRC_EEPROM_ADDR, ++ (EEPROM_ADDR_FSM_RESET | ++ (EEPROM_DEFAULT_CLOCK_PERIOD << ++ EEPROM_ADDR_CLKPERD_SHIFT))); ++ ++ mdelay(1); ++ ++ /* Enable seeprom accesses. */ ++ tw32_carefully(GRC_LOCAL_CTRL, ++ tr32(GRC_LOCAL_CTRL) | GRC_LCLCTRL_AUTO_SEEPROM); ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700 && ++ GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) { ++ uint32_t nvcfg1 = tr32(NVRAM_CFG1); ++ ++ tp->tg3_flags |= TG3_FLAG_NVRAM; ++ if (nvcfg1 & NVRAM_CFG1_FLASHIF_ENAB) { ++ if (nvcfg1 & NVRAM_CFG1_BUFFERED_MODE) ++ tp->tg3_flags |= TG3_FLAG_NVRAM_BUFFERED; ++ } else { ++ nvcfg1 &= ~NVRAM_CFG1_COMPAT_BYPASS; ++ tw32(NVRAM_CFG1, nvcfg1); ++ } ++ ++ } else { ++ tp->tg3_flags &= ~(TG3_FLAG_NVRAM | TG3_FLAG_NVRAM_BUFFERED); ++ } ++} ++ ++ ++static int tg3_nvram_read_using_eeprom( ++ struct tg3 *tp __unused, uint32_t offset, uint32_t *val) ++{ ++ uint32_t tmp; ++ int i; ++ ++ if (offset > EEPROM_ADDR_ADDR_MASK || ++ (offset % 4) != 0) { ++ return -EINVAL; ++ } ++ ++ tmp = tr32(GRC_EEPROM_ADDR) & ~(EEPROM_ADDR_ADDR_MASK | ++ EEPROM_ADDR_DEVID_MASK | ++ EEPROM_ADDR_READ); ++ tw32(GRC_EEPROM_ADDR, ++ tmp | ++ (0 << EEPROM_ADDR_DEVID_SHIFT) | ++ ((offset << EEPROM_ADDR_ADDR_SHIFT) & ++ EEPROM_ADDR_ADDR_MASK) | ++ EEPROM_ADDR_READ | EEPROM_ADDR_START); ++ ++ for (i = 0; i < 10000; i++) { ++ tmp = tr32(GRC_EEPROM_ADDR); ++ ++ if (tmp & EEPROM_ADDR_COMPLETE) ++ break; ++ udelay(100); ++ } ++ if (!(tmp & EEPROM_ADDR_COMPLETE)) { ++ return -EBUSY; ++ } ++ ++ *val = tr32(GRC_EEPROM_DATA); ++ return 0; ++} ++ ++static int tg3_nvram_read(struct tg3 *tp, uint32_t offset, uint32_t *val) ++{ ++ int i, saw_done_clear; ++ ++ if (!(tp->tg3_flags & TG3_FLAG_NVRAM)) ++ return tg3_nvram_read_using_eeprom(tp, offset, val); ++ ++ if (tp->tg3_flags & TG3_FLAG_NVRAM_BUFFERED) ++ offset = ((offset / NVRAM_BUFFERED_PAGE_SIZE) << ++ NVRAM_BUFFERED_PAGE_POS) + ++ (offset % NVRAM_BUFFERED_PAGE_SIZE); ++ ++ if (offset > NVRAM_ADDR_MSK) ++ return -EINVAL; ++ ++ tw32(NVRAM_SWARB, SWARB_REQ_SET1); ++ for (i = 0; i < 1000; i++) { ++ if (tr32(NVRAM_SWARB) & SWARB_GNT1) ++ break; ++ udelay(20); ++ } ++ ++ tw32(NVRAM_ADDR, offset); ++ tw32(NVRAM_CMD, ++ NVRAM_CMD_RD | NVRAM_CMD_GO | ++ NVRAM_CMD_FIRST | NVRAM_CMD_LAST | NVRAM_CMD_DONE); ++ ++ /* Wait for done bit to clear then set again. */ ++ saw_done_clear = 0; ++ for (i = 0; i < 1000; i++) { ++ udelay(10); ++ if (!saw_done_clear && ++ !(tr32(NVRAM_CMD) & NVRAM_CMD_DONE)) ++ saw_done_clear = 1; ++ else if (saw_done_clear && ++ (tr32(NVRAM_CMD) & NVRAM_CMD_DONE)) ++ break; ++ } ++ if (i >= 1000) { ++ tw32(NVRAM_SWARB, SWARB_REQ_CLR1); ++ return -EBUSY; ++ } ++ ++ *val = bswap_32(tr32(NVRAM_RDDATA)); ++ tw32(NVRAM_SWARB, 0x20); ++ ++ return 0; ++} ++ ++struct subsys_tbl_ent { ++ uint16_t subsys_vendor, subsys_devid; ++ uint32_t phy_id; ++}; ++ ++static struct subsys_tbl_ent subsys_id_to_phy_id[] = { ++ /* Broadcom boards. */ ++ { 0x14e4, 0x1644, PHY_ID_BCM5401 }, /* BCM95700A6 */ ++ { 0x14e4, 0x0001, PHY_ID_BCM5701 }, /* BCM95701A5 */ ++ { 0x14e4, 0x0002, PHY_ID_BCM8002 }, /* BCM95700T6 */ ++ { 0x14e4, 0x0003, PHY_ID_SERDES }, /* BCM95700A9 */ ++ { 0x14e4, 0x0005, PHY_ID_BCM5701 }, /* BCM95701T1 */ ++ { 0x14e4, 0x0006, PHY_ID_BCM5701 }, /* BCM95701T8 */ ++ { 0x14e4, 0x0007, PHY_ID_SERDES }, /* BCM95701A7 */ ++ { 0x14e4, 0x0008, PHY_ID_BCM5701 }, /* BCM95701A10 */ ++ { 0x14e4, 0x8008, PHY_ID_BCM5701 }, /* BCM95701A12 */ ++ { 0x14e4, 0x0009, PHY_ID_BCM5701 }, /* BCM95703Ax1 */ ++ { 0x14e4, 0x8009, PHY_ID_BCM5701 }, /* BCM95703Ax2 */ ++ ++ /* 3com boards. */ ++ { PCI_VENDOR_ID_3COM, 0x1000, PHY_ID_BCM5401 }, /* 3C996T */ ++ { PCI_VENDOR_ID_3COM, 0x1006, PHY_ID_BCM5701 }, /* 3C996BT */ ++ /* { PCI_VENDOR_ID_3COM, 0x1002, PHY_ID_XXX }, 3C996CT */ ++ /* { PCI_VENDOR_ID_3COM, 0x1003, PHY_ID_XXX }, 3C997T */ ++ { PCI_VENDOR_ID_3COM, 0x1004, PHY_ID_SERDES }, /* 3C996SX */ ++ /* { PCI_VENDOR_ID_3COM, 0x1005, PHY_ID_XXX }, 3C997SZ */ ++ { PCI_VENDOR_ID_3COM, 0x1007, PHY_ID_BCM5701 }, /* 3C1000T */ ++ { PCI_VENDOR_ID_3COM, 0x1008, PHY_ID_BCM5701 }, /* 3C940BR01 */ ++ ++ /* DELL boards. */ ++ { PCI_VENDOR_ID_DELL, 0x00d1, PHY_ID_BCM5401 }, /* VIPER */ ++ { PCI_VENDOR_ID_DELL, 0x0106, PHY_ID_BCM5401 }, /* JAGUAR */ ++ { PCI_VENDOR_ID_DELL, 0x0109, PHY_ID_BCM5411 }, /* MERLOT */ ++ { PCI_VENDOR_ID_DELL, 0x010a, PHY_ID_BCM5411 }, /* SLIM_MERLOT */ ++ ++ /* Compaq boards. */ ++ { PCI_VENDOR_ID_COMPAQ, 0x007c, PHY_ID_BCM5701 }, /* BANSHEE */ ++ { PCI_VENDOR_ID_COMPAQ, 0x009a, PHY_ID_BCM5701 }, /* BANSHEE_2 */ ++ { PCI_VENDOR_ID_COMPAQ, 0x007d, PHY_ID_SERDES }, /* CHANGELING */ ++ { PCI_VENDOR_ID_COMPAQ, 0x0085, PHY_ID_BCM5701 }, /* NC7780 */ ++ { PCI_VENDOR_ID_COMPAQ, 0x0099, PHY_ID_BCM5701 } /* NC7780_2 */ ++}; ++ ++static int tg3_phy_probe(struct tg3 *tp) ++{ ++ uint32_t eeprom_phy_id, hw_phy_id_1, hw_phy_id_2; ++ uint32_t hw_phy_id, hw_phy_id_masked; ++ enum phy_led_mode eeprom_led_mode; ++ uint32_t val; ++ unsigned i; ++ int eeprom_signature_found, err; ++ ++ tp->phy_id = PHY_ID_INVALID; ++ ++ for (i = 0; i < sizeof(subsys_id_to_phy_id)/sizeof(subsys_id_to_phy_id[0]); i++) { ++ if ((subsys_id_to_phy_id[i].subsys_vendor == tp->subsystem_vendor) && ++ (subsys_id_to_phy_id[i].subsys_devid == tp->subsystem_device)) { ++ tp->phy_id = subsys_id_to_phy_id[i].phy_id; ++ break; ++ } ++ } ++ ++ eeprom_phy_id = PHY_ID_INVALID; ++ eeprom_led_mode = led_mode_auto; ++ eeprom_signature_found = 0; ++ tg3_read_mem(NIC_SRAM_DATA_SIG, &val); ++ if (val == NIC_SRAM_DATA_SIG_MAGIC) { ++ uint32_t nic_cfg; ++ ++ tg3_read_mem(NIC_SRAM_DATA_CFG, &nic_cfg); ++ tp->nic_sram_data_cfg = nic_cfg; ++ ++ eeprom_signature_found = 1; ++ ++ if ((nic_cfg & NIC_SRAM_DATA_CFG_PHY_TYPE_MASK) == ++ NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER) { ++ eeprom_phy_id = PHY_ID_SERDES; ++ } else { ++ uint32_t nic_phy_id; ++ ++ tg3_read_mem(NIC_SRAM_DATA_PHY_ID, &nic_phy_id); ++ if (nic_phy_id != 0) { ++ uint32_t id1 = nic_phy_id & NIC_SRAM_DATA_PHY_ID1_MASK; ++ uint32_t id2 = nic_phy_id & NIC_SRAM_DATA_PHY_ID2_MASK; ++ ++ eeprom_phy_id = (id1 >> 16) << 10; ++ eeprom_phy_id |= (id2 & 0xfc00) << 16; ++ eeprom_phy_id |= (id2 & 0x03ff) << 0; ++ } ++ } ++ ++ switch (nic_cfg & NIC_SRAM_DATA_CFG_LED_MODE_MASK) { ++ case NIC_SRAM_DATA_CFG_LED_TRIPLE_SPD: ++ eeprom_led_mode = led_mode_three_link; ++ break; ++ ++ case NIC_SRAM_DATA_CFG_LED_LINK_SPD: ++ eeprom_led_mode = led_mode_link10; ++ break; ++ ++ default: ++ eeprom_led_mode = led_mode_auto; ++ break; ++ }; ++ if (((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) && ++ (nic_cfg & NIC_SRAM_DATA_CFG_EEPROM_WP)) { ++ tp->tg3_flags |= TG3_FLAG_EEPROM_WRITE_PROT; ++ } ++ ++ if (nic_cfg & NIC_SRAM_DATA_CFG_ASF_ENABLE) ++ tp->tg3_flags |= TG3_FLAG_ENABLE_ASF; ++ if (nic_cfg & NIC_SRAM_DATA_CFG_FIBER_WOL) ++ tp->tg3_flags |= TG3_FLAG_SERDES_WOL_CAP; ++ } ++ ++ /* Now read the physical PHY_ID from the chip and verify ++ * that it is sane. If it doesn't look good, we fall back ++ * to either the hard-coded table based PHY_ID and failing ++ * that the value found in the eeprom area. ++ */ ++ err = tg3_readphy(tp, MII_PHYSID1, &hw_phy_id_1); ++ err |= tg3_readphy(tp, MII_PHYSID2, &hw_phy_id_2); ++ ++ hw_phy_id = (hw_phy_id_1 & 0xffff) << 10; ++ hw_phy_id |= (hw_phy_id_2 & 0xfc00) << 16; ++ hw_phy_id |= (hw_phy_id_2 & 0x03ff) << 0; ++ ++ hw_phy_id_masked = hw_phy_id & PHY_ID_MASK; ++ ++ if (!err && KNOWN_PHY_ID(hw_phy_id_masked)) { ++ tp->phy_id = hw_phy_id; ++ } else { ++ /* phy_id currently holds the value found in the ++ * subsys_id_to_phy_id[] table or PHY_ID_INVALID ++ * if a match was not found there. ++ */ ++ if (tp->phy_id == PHY_ID_INVALID) { ++ if (!eeprom_signature_found || ++ !KNOWN_PHY_ID(eeprom_phy_id & PHY_ID_MASK)) ++ return -ENODEV; ++ tp->phy_id = eeprom_phy_id; ++ } ++ } ++ ++ err = tg3_phy_reset(tp); ++ if (err) ++ return err; ++ ++ if (tp->pci_chip_rev_id == CHIPREV_ID_5701_A0 || ++ tp->pci_chip_rev_id == CHIPREV_ID_5701_B0) { ++ uint32_t mii_tg3_ctrl; ++ ++ /* These chips, when reset, only advertise 10Mb ++ * capabilities. Fix that. ++ */ ++ err = tg3_writephy(tp, MII_ADVERTISE, ++ (ADVERTISE_CSMA | ++ ADVERTISE_PAUSE_CAP | ++ ADVERTISE_10HALF | ++ ADVERTISE_10FULL | ++ ADVERTISE_100HALF | ++ ADVERTISE_100FULL)); ++ mii_tg3_ctrl = (MII_TG3_CTRL_ADV_1000_HALF | ++ MII_TG3_CTRL_ADV_1000_FULL | ++ MII_TG3_CTRL_AS_MASTER | ++ MII_TG3_CTRL_ENABLE_AS_MASTER); ++ if (tp->tg3_flags & TG3_FLAG_10_100_ONLY) ++ mii_tg3_ctrl = 0; ++ ++ err |= tg3_writephy(tp, MII_TG3_CTRL, mii_tg3_ctrl); ++ err |= tg3_writephy(tp, MII_BMCR, ++ (BMCR_ANRESTART | BMCR_ANENABLE)); ++ } ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) { ++ tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x0c00); ++ tg3_writephy(tp, MII_TG3_DSP_ADDRESS, 0x201f); ++ tg3_writedsp(tp, MII_TG3_DSP_RW_PORT, 0x2aaa); ++ } ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { ++ tg3_writephy(tp, 0x1c, 0x8d68); ++ tg3_writephy(tp, 0x1c, 0x8d68); ++ } ++ ++ /* Enable Ethernet@WireSpeed */ ++ tg3_phy_set_wirespeed(tp); ++ ++ if (!err && ((tp->phy_id & PHY_ID_MASK) == PHY_ID_BCM5401)) { ++ err = tg3_init_5401phy_dsp(tp); ++ } ++ ++ /* Determine the PHY led mode. ++ * Be careful if this gets set wrong it can result in an inability to ++ * establish a link. ++ */ ++ if (tp->phy_id == PHY_ID_SERDES) { ++ tp->led_mode = led_mode_three_link; ++ } ++ else if (tp->subsystem_vendor == PCI_VENDOR_ID_DELL) { ++ tp->led_mode = led_mode_link10; ++ } else { ++ tp->led_mode = led_mode_three_link; ++ if (eeprom_signature_found && ++ eeprom_led_mode != led_mode_auto) ++ tp->led_mode = eeprom_led_mode; ++ } ++ ++ if (tp->phy_id == PHY_ID_SERDES) ++ tp->link_config.advertising = ++ (ADVERTISED_1000baseT_Half | ++ ADVERTISED_1000baseT_Full | ++ ADVERTISED_Autoneg | ++ ADVERTISED_FIBRE); ++ if (tp->tg3_flags & TG3_FLAG_10_100_ONLY) ++ tp->link_config.advertising &= ++ ~(ADVERTISED_1000baseT_Half | ++ ADVERTISED_1000baseT_Full); ++ ++ return err; ++} ++ ++#if SUPPORT_PARTNO_STR ++static void tg3_read_partno(struct tg3 *tp) ++{ ++ unsigned char vpd_data[256]; ++ int i; ++ ++ for (i = 0; i < 256; i += 4) { ++ uint32_t tmp; ++ ++ if (tg3_nvram_read(tp, 0x100 + i, &tmp)) ++ goto out_not_found; ++ ++ vpd_data[i + 0] = ((tmp >> 0) & 0xff); ++ vpd_data[i + 1] = ((tmp >> 8) & 0xff); ++ vpd_data[i + 2] = ((tmp >> 16) & 0xff); ++ vpd_data[i + 3] = ((tmp >> 24) & 0xff); ++ } ++ ++ /* Now parse and find the part number. */ ++ for (i = 0; i < 256; ) { ++ unsigned char val = vpd_data[i]; ++ int block_end; ++ ++ if (val == 0x82 || val == 0x91) { ++ i = (i + 3 + ++ (vpd_data[i + 1] + ++ (vpd_data[i + 2] << 8))); ++ continue; ++ } ++ ++ if (val != 0x90) ++ goto out_not_found; ++ ++ block_end = (i + 3 + ++ (vpd_data[i + 1] + ++ (vpd_data[i + 2] << 8))); ++ i += 3; ++ while (i < block_end) { ++ if (vpd_data[i + 0] == 'P' && ++ vpd_data[i + 1] == 'N') { ++ int partno_len = vpd_data[i + 2]; ++ ++ if (partno_len > 24) ++ goto out_not_found; ++ ++ memcpy(tp->board_part_number, ++ &vpd_data[i + 3], ++ partno_len); ++ ++ /* Success. */ ++ return; ++ } ++ } ++ ++ /* Part number not found. */ ++ goto out_not_found; ++ } ++ ++out_not_found: ++ memcpy(tp->board_part_number, "none", sizeof("none")); ++} ++#else ++#define tg3_read_partno(TP) ((TP)->board_part_number[0] = '\0') ++#endif ++ ++static int tg3_get_invariants(struct tg3 *tp) ++{ ++ uint32_t misc_ctrl_reg; ++ uint32_t pci_state_reg, grc_misc_cfg; ++ uint16_t pci_cmd; ++ uint8_t pci_latency; ++ int err; ++ ++ /* Read the subsystem vendor and device ids */ ++ pci_read_config_word(tp->pdev, PCI_SUBSYSTEM_VENDOR_ID, &tp->subsystem_vendor); ++ pci_read_config_word(tp->pdev, PCI_SUBSYSTEM_ID, &tp->subsystem_device); ++ ++ /* The sun_5704 code needs infrastructure etherboot does have ++ * ignore it for now. ++ */ ++ ++ /* If we have an AMD 762 or Intel ICH/ICH0 chipset, write ++ * reordering to the mailbox registers done by the host ++ * controller can cause major troubles. We read back from ++ * every mailbox register write to force the writes to be ++ * posted to the chip in order. ++ * ++ * TG3_FLAG_MBOX_WRITE_REORDER has been forced on. ++ */ ++ ++ /* Force memory write invalidate off. If we leave it on, ++ * then on 5700_BX chips we have to enable a workaround. ++ * The workaround is to set the TG3PCI_DMA_RW_CTRL boundry ++ * to match the cacheline size. The Broadcom driver have this ++ * workaround but turns MWI off all the times so never uses ++ * it. This seems to suggest that the workaround is insufficient. ++ */ ++ pci_read_config_word(tp->pdev, PCI_COMMAND, &pci_cmd); ++ pci_cmd &= ~PCI_COMMAND_INVALIDATE; ++ /* Also, force SERR#/PERR# in PCI command. */ ++ pci_cmd |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR; ++ pci_write_config_word(tp->pdev, PCI_COMMAND, pci_cmd); ++ ++ /* It is absolutely critical that TG3PCI_MISC_HOST_CTRL ++ * has the register indirect write enable bit set before ++ * we try to access any of the MMIO registers. It is also ++ * critical that the PCI-X hw workaround situation is decided ++ * before that as well. ++ */ ++ pci_read_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, &misc_ctrl_reg); ++ ++ tp->pci_chip_rev_id = (misc_ctrl_reg >> MISC_HOST_CTRL_CHIPREV_SHIFT); ++ ++ /* Initialize misc host control in PCI block. */ ++ tp->misc_host_ctrl |= (misc_ctrl_reg & ++ MISC_HOST_CTRL_CHIPREV); ++ pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL, ++ tp->misc_host_ctrl); ++ ++ pci_read_config_byte(tp->pdev, PCI_LATENCY_TIMER, &pci_latency); ++ if (pci_latency < 64) { ++ pci_write_config_byte(tp->pdev, PCI_LATENCY_TIMER, 64); ++ } ++ ++ pci_read_config_dword(tp->pdev, TG3PCI_PCISTATE, &pci_state_reg); ++ ++ /* If this is a 5700 BX chipset, and we are in PCI-X ++ * mode, enable register write workaround. ++ * ++ * The workaround is to use indirect register accesses ++ * for all chip writes not to mailbox registers. ++ * ++ * In etherboot to simplify things we just always use this work around. ++ */ ++ if ((pci_state_reg & PCISTATE_CONV_PCI_MODE) == 0) { ++ tp->tg3_flags |= TG3_FLAG_PCIX_MODE; ++ } ++ /* Back to back register writes can cause problems on the 5701, ++ * the workaround is to read back all reg writes except those to ++ * mailbox regs. ++ * In etherboot we always use indirect register accesses so ++ * we don't see this. ++ */ ++ ++ if ((pci_state_reg & PCISTATE_BUS_SPEED_HIGH) != 0) ++ tp->tg3_flags |= TG3_FLAG_PCI_HIGH_SPEED; ++ if ((pci_state_reg & PCISTATE_BUS_32BIT) != 0) ++ tp->tg3_flags |= TG3_FLAG_PCI_32BIT; ++ ++ /* Chip-specific fixup from Broadcom driver */ ++ if ((tp->pci_chip_rev_id == CHIPREV_ID_5704_A0) && ++ (!(pci_state_reg & PCISTATE_RETRY_SAME_DMA))) { ++ pci_state_reg |= PCISTATE_RETRY_SAME_DMA; ++ pci_write_config_dword(tp->pdev, TG3PCI_PCISTATE, pci_state_reg); ++ } ++ ++ /* Force the chip into D0. */ ++ tg3_set_power_state_0(tp); ++ ++ /* Etherboot does not ask the tg3 to do checksums */ ++ /* Etherboot does not ask the tg3 to do jumbo frames */ ++ /* Ehterboot does not ask the tg3 to use WakeOnLan. */ ++ ++ /* A few boards don't want Ethernet@WireSpeed phy feature */ ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700) || ++ ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) && ++ (tp->pci_chip_rev_id != CHIPREV_ID_5705_A0) && ++ (tp->pci_chip_rev_id != CHIPREV_ID_5705_A1))) { ++ tp->tg3_flags2 |= TG3_FLG2_NO_ETH_WIRE_SPEED; ++ } ++ ++ /* Avoid tagged irq status etherboot does not use irqs */ ++ ++ /* Only 5701 and later support tagged irq status mode. ++ * Also, 5788 chips cannot use tagged irq status. ++ * ++ * However, since etherboot does not use irqs avoid tagged irqs ++ * status because the interrupt condition is more difficult to ++ * fully clear in that mode. ++ */ ++ ++ /* Since some 5700_AX && 5700_BX have problems with 32BYTE ++ * coalesce_mode, and the rest work fine anything set. ++ * Don't enable HOST_CC_MODE_32BYTE in etherboot. ++ */ ++ ++ /* Initialize MAC MI mode, polling disabled. */ ++ tw32_carefully(MAC_MI_MODE, tp->mi_mode); ++ ++ /* Initialize data/descriptor byte/word swapping. */ ++ tw32(GRC_MODE, tp->grc_mode); ++ ++ tg3_switch_clocks(tp); ++ ++ /* Clear this out for sanity. */ ++ tw32(TG3PCI_MEM_WIN_BASE_ADDR, 0); ++ ++ /* Etherboot does not need to check if the PCIX_TARGET_HWBUG ++ * is needed. It always uses it. ++ */ ++ ++ udelay(50); ++ tg3_nvram_init(tp); ++ ++ /* The TX descriptors will reside in main memory. ++ */ ++ ++ /* See which board we are using. ++ */ ++ grc_misc_cfg = tr32(GRC_MISC_CFG); ++ grc_misc_cfg &= GRC_MISC_CFG_BOARD_ID_MASK; ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704 && ++ grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5704CIOBE) { ++ tp->tg3_flags |= TG3_FLAG_SPLIT_MODE; ++ tp->split_mode_max_reqs = SPLIT_MODE_5704_MAX_REQ; ++ } ++ ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 && ++ (grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788 || ++ grc_misc_cfg == GRC_MISC_CFG_BOARD_ID_5788M)) ++ tp->tg3_flags2 |= TG3_FLG2_IS_5788; ++ ++ /* these are limited to 10/100 only */ ++ if (((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) && ++ ((grc_misc_cfg == 0x8000) || (grc_misc_cfg == 0x4000))) || ++ ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) && ++ (tp->pdev->vendor == PCI_VENDOR_ID_BROADCOM) && ++ ((tp->pdev->dev_id == PCI_DEVICE_ID_TIGON3_5901) || ++ (tp->pdev->dev_id == PCI_DEVICE_ID_TIGON3_5901_2)))) { ++ tp->tg3_flags |= TG3_FLAG_10_100_ONLY; ++ } ++ ++ err = tg3_phy_probe(tp); ++ if (err) { ++ printf("phy probe failed, err %d\n", err); ++ } ++ ++ tg3_read_partno(tp); ++ ++ ++ /* 5700 BX chips need to have their TX producer index mailboxes ++ * written twice to workaround a bug. ++ * In etherboot we do this unconditionally to simplify things. ++ */ ++ ++ /* 5700 chips can get confused if TX buffers straddle the ++ * 4GB address boundary in some cases. ++ * ++ * In etherboot we can ignore the problem as etherboot lives below 4GB. ++ */ ++ ++ /* In etherboot wake-on-lan is unconditionally disabled */ ++ return err; ++} ++ ++static int tg3_get_device_address(struct tg3 *tp) ++{ ++ struct nic *nic = tp->nic; ++ uint32_t hi, lo, mac_offset; ++ ++ if (PCI_FUNC(tp->pdev->devfn) == 0) ++ mac_offset = 0x7c; ++ else ++ mac_offset = 0xcc; ++ ++ /* First try to get it from MAC address mailbox. */ ++ tg3_read_mem(NIC_SRAM_MAC_ADDR_HIGH_MBOX, &hi); ++ if ((hi >> 16) == 0x484b) { ++ nic->node_addr[0] = (hi >> 8) & 0xff; ++ nic->node_addr[1] = (hi >> 0) & 0xff; ++ ++ tg3_read_mem(NIC_SRAM_MAC_ADDR_LOW_MBOX, &lo); ++ nic->node_addr[2] = (lo >> 24) & 0xff; ++ nic->node_addr[3] = (lo >> 16) & 0xff; ++ nic->node_addr[4] = (lo >> 8) & 0xff; ++ nic->node_addr[5] = (lo >> 0) & 0xff; ++ } ++ /* Next, try NVRAM. */ ++ else if (!tg3_nvram_read(tp, mac_offset + 0, &hi) && ++ !tg3_nvram_read(tp, mac_offset + 4, &lo)) { ++ nic->node_addr[0] = ((hi >> 16) & 0xff); ++ nic->node_addr[1] = ((hi >> 24) & 0xff); ++ nic->node_addr[2] = ((lo >> 0) & 0xff); ++ nic->node_addr[3] = ((lo >> 8) & 0xff); ++ nic->node_addr[4] = ((lo >> 16) & 0xff); ++ nic->node_addr[5] = ((lo >> 24) & 0xff); ++ } ++ /* Finally just fetch it out of the MAC control regs. */ ++ else { ++ hi = tr32(MAC_ADDR_0_HIGH); ++ lo = tr32(MAC_ADDR_0_LOW); ++ ++ nic->node_addr[5] = lo & 0xff; ++ nic->node_addr[4] = (lo >> 8) & 0xff; ++ nic->node_addr[3] = (lo >> 16) & 0xff; ++ nic->node_addr[2] = (lo >> 24) & 0xff; ++ nic->node_addr[1] = hi & 0xff; ++ nic->node_addr[0] = (hi >> 8) & 0xff; ++ } ++ ++ return 0; ++} ++ ++ ++static int tg3_setup_dma(struct tg3 *tp) ++{ ++ tw32(TG3PCI_CLOCK_CTRL, 0); ++ ++ if ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) == 0) { ++ tp->dma_rwctrl = ++ (0x7 << DMA_RWCTRL_PCI_WRITE_CMD_SHIFT) | ++ (0x6 << DMA_RWCTRL_PCI_READ_CMD_SHIFT) | ++ (0x7 << DMA_RWCTRL_WRITE_WATER_SHIFT) | ++ (0x7 << DMA_RWCTRL_READ_WATER_SHIFT) | ++ (0x0f << DMA_RWCTRL_MIN_DMA_SHIFT); ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) { ++ tp->dma_rwctrl &= ~(DMA_RWCTRL_MIN_DMA << DMA_RWCTRL_MIN_DMA_SHIFT); ++ } ++ } else { ++ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) ++ tp->dma_rwctrl = ++ (0x7 << DMA_RWCTRL_PCI_WRITE_CMD_SHIFT) | ++ (0x6 << DMA_RWCTRL_PCI_READ_CMD_SHIFT) | ++ (0x3 << DMA_RWCTRL_WRITE_WATER_SHIFT) | ++ (0x7 << DMA_RWCTRL_READ_WATER_SHIFT) | ++ (0x00 << DMA_RWCTRL_MIN_DMA_SHIFT); ++ else ++ tp->dma_rwctrl = ++ (0x7 << DMA_RWCTRL_PCI_WRITE_CMD_SHIFT) | ++ (0x6 << DMA_RWCTRL_PCI_READ_CMD_SHIFT) | ++ (0x3 << DMA_RWCTRL_WRITE_WATER_SHIFT) | ++ (0x3 << DMA_RWCTRL_READ_WATER_SHIFT) | ++ (0x0f << DMA_RWCTRL_MIN_DMA_SHIFT); ++ ++ /* Wheee, some more chip bugs... */ ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704)) { ++ uint32_t ccval = tr32(TG3PCI_CLOCK_CTRL) & 0x1f; ++ ++ if ((ccval == 0x6) || (ccval == 0x7)) { ++ tp->dma_rwctrl |= DMA_RWCTRL_ONE_DMA; ++ } ++ } ++ } ++ ++ if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703) || ++ (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704)) { ++ tp->dma_rwctrl &= ~(DMA_RWCTRL_MIN_DMA << DMA_RWCTRL_MIN_DMA_SHIFT); ++ } ++ ++ tp->dma_rwctrl |= DMA_RWCTRL_ASSERT_ALL_BE; ++ ++ tw32(TG3PCI_DMA_RW_CTRL, tp->dma_rwctrl); ++ ++ return 0; ++} ++ ++static void tg3_init_link_config(struct tg3 *tp) ++{ ++ tp->link_config.advertising = ++ (ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | ++ ADVERTISED_100baseT_Half | ADVERTISED_100baseT_Full | ++ ADVERTISED_1000baseT_Half | ADVERTISED_1000baseT_Full | ++ ADVERTISED_Autoneg | ADVERTISED_MII); ++ tp->carrier_ok = 0; ++ tp->link_config.active_speed = SPEED_INVALID; ++ tp->link_config.active_duplex = DUPLEX_INVALID; ++} ++ ++ ++#if SUPPORT_PHY_STR ++static const char * tg3_phy_string(struct tg3 *tp) ++{ ++ switch (tp->phy_id & PHY_ID_MASK) { ++ case PHY_ID_BCM5400: return "5400"; ++ case PHY_ID_BCM5401: return "5401"; ++ case PHY_ID_BCM5411: return "5411"; ++ case PHY_ID_BCM5701: return "5701"; ++ case PHY_ID_BCM5703: return "5703"; ++ case PHY_ID_BCM5704: return "5704"; ++ case PHY_ID_BCM8002: return "8002"; ++ case PHY_ID_SERDES: return "serdes"; ++ default: return "unknown"; ++ }; ++} ++#else ++#define tg3_phy_string(TP) "?" ++#endif ++ ++ ++static void tg3_poll_link(struct tg3 *tp) ++{ ++ uint32_t mac_stat; ++ ++ mac_stat = tr32(MAC_STATUS); ++ if (tp->phy_id == PHY_ID_SERDES) { ++ if (tp->carrier_ok? ++ (mac_stat & MAC_STATUS_LNKSTATE_CHANGED): ++ (mac_stat & MAC_STATUS_PCS_SYNCED)) { ++ tw32_carefully(MAC_MODE, tp->mac_mode & ~MAC_MODE_PORT_MODE_MASK); ++ tw32_carefully(MAC_MODE, tp->mac_mode); ++ ++ tg3_setup_phy(tp); ++ } ++ } ++ else { ++ if (mac_stat & MAC_STATUS_LNKSTATE_CHANGED) { ++ tg3_setup_phy(tp); ++ } ++ } ++} ++ ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static void tg3_ack_irqs(struct tg3 *tp) ++{ ++ if (tp->hw_status->status & SD_STATUS_UPDATED) { ++ /* ++ * writing any value to intr-mbox-0 clears PCI INTA# and ++ * chip-internal interrupt pending events. ++ * writing non-zero to intr-mbox-0 additional tells the ++ * NIC to stop sending us irqs, engaging "in-intr-handler" ++ * event coalescing. ++ */ ++ tw32_mailbox(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, ++ 0x00000001); ++ /* ++ * Flush PCI write. This also guarantees that our ++ * status block has been flushed to host memory. ++ */ ++ tr32(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW); ++ tp->hw_status->status &= ~SD_STATUS_UPDATED; ++ } ++} ++ ++static int tg3_poll(struct nic *nic, int retrieve) ++{ ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ ++ struct tg3 *tp = &tg3; ++ int result; ++ ++ result = 0; ++ ++ if ( (tp->hw_status->idx[0].rx_producer != tp->rx_rcb_ptr) && !retrieve ) ++ return 1; ++ ++ tg3_ack_irqs(tp); ++ ++ if (tp->hw_status->idx[0].rx_producer != tp->rx_rcb_ptr) { ++ struct tg3_rx_buffer_desc *desc; ++ unsigned int len; ++ desc = &tp->rx_rcb[tp->rx_rcb_ptr]; ++ if ((desc->opaque & RXD_OPAQUE_RING_MASK) == RXD_OPAQUE_RING_STD) { ++ len = ((desc->idx_len & RXD_LEN_MASK) >> RXD_LEN_SHIFT) - 4; /* omit crc */ ++ ++ nic->packetlen = len; ++ memcpy(nic->packet, bus_to_virt(desc->addr_lo), len); ++ result = 1; ++ } ++ tp->rx_rcb_ptr = (tp->rx_rcb_ptr + 1) % TG3_RX_RCB_RING_SIZE; ++ ++ /* ACK the status ring */ ++ tw32_mailbox2(MAILBOX_RCVRET_CON_IDX_0 + TG3_64BIT_REG_LOW, tp->rx_rcb_ptr); ++ ++ /* Refill RX ring. */ ++ if (result) { ++ tp->rx_std_ptr = (tp->rx_std_ptr + 1) % TG3_RX_RING_SIZE; ++ tw32_mailbox2(MAILBOX_RCV_STD_PROD_IDX + TG3_64BIT_REG_LOW, tp->rx_std_ptr); ++ } ++ } ++ tg3_poll_link(tp); ++ return result; ++} ++ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++#if 0 ++static void tg3_set_txd(struct tg3 *tp, int entry, ++ dma_addr_t mapping, int len, uint32_t flags, ++ uint32_t mss_and_is_end) ++{ ++ struct tg3_tx_buffer_desc *txd = &tp->tx_ring[entry]; ++ int is_end = (mss_and_is_end & 0x1); ++ if (is_end) { ++ flags |= TXD_FLAG_END; ++ } ++ ++ txd->addr_hi = 0; ++ txd->addr_lo = mapping & 0xffffffff; ++ txd->len_flags = (len << TXD_LEN_SHIFT) | flags; ++ txd->vlan_tag = 0 << TXD_VLAN_TAG_SHIFT; ++} ++#endif ++ ++static void tg3_transmit(struct nic *nic, const char *dst_addr, ++ unsigned int type, unsigned int size, const char *packet) ++{ ++ static struct eth_frame { ++ uint8_t dst_addr[ETH_ALEN]; ++ uint8_t src_addr[ETH_ALEN]; ++ uint16_t type; ++ uint8_t data [ETH_FRAME_LEN - ETH_HLEN]; ++ } frame[2]; ++ static int frame_idx; ++ ++ /* send the packet to destination */ ++ struct tg3_tx_buffer_desc *txd; ++ struct tg3 *tp; ++ uint32_t entry; ++ int i; ++ ++ /* Wait until there is a free packet frame */ ++ tp = &tg3; ++ i = 0; ++ entry = tp->tx_prod; ++ while((tp->hw_status->idx[0].tx_consumer != entry) && ++ (tp->hw_status->idx[0].tx_consumer != PREV_TX(entry))) { ++ mdelay(10); /* give the nick a chance */ ++ poll_interruptions(); ++ if (++i > 500) { /* timeout 5s for transmit */ ++ printf("transmit timed out\n"); ++ tg3_halt(tp); ++ tg3_setup_hw(tp); ++ return; ++ } ++ } ++ if (i != 0) { ++ printf("#"); ++ } ++ ++ /* Copy the packet to the our local buffer */ ++ memcpy(&frame[frame_idx].dst_addr, dst_addr, ETH_ALEN); ++ memcpy(&frame[frame_idx].src_addr, nic->node_addr, ETH_ALEN); ++ frame[frame_idx].type = htons(type); ++ memset(&frame[frame_idx].data, 0, sizeof(frame[frame_idx].data)); ++ memcpy(&frame[frame_idx].data, packet, size); ++ ++ /* Setup the ring buffer entry to transmit */ ++ txd = &tp->tx_ring[entry]; ++ txd->addr_hi = 0; /* Etherboot runs under 4GB */ ++ txd->addr_lo = virt_to_bus(&frame[frame_idx]); ++ txd->len_flags = ((size + ETH_HLEN) << TXD_LEN_SHIFT) | TXD_FLAG_END; ++ txd->vlan_tag = 0 << TXD_VLAN_TAG_SHIFT; ++ ++ /* Advance to the next entry */ ++ entry = NEXT_TX(entry); ++ frame_idx ^= 1; ++ ++ /* Packets are ready, update Tx producer idx local and on card */ ++ tw32_mailbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); ++ tw32_mailbox2((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); ++ tp->tx_prod = entry; ++} ++ ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++static void tg3_disable(struct dev *dev __unused) ++{ ++ struct tg3 *tp = &tg3; ++ /* put the card in its initial state */ ++ /* This function serves 3 purposes. ++ * This disables DMA and interrupts so we don't receive ++ * unexpected packets or interrupts from the card after ++ * etherboot has finished. ++ * This frees resources so etherboot may use ++ * this driver on another interface ++ * This allows etherboot to reinitialize the interface ++ * if something is something goes wrong. ++ */ ++ tg3_halt(tp); ++ tp->tg3_flags &= ~(TG3_FLAG_INIT_COMPLETE|TG3_FLAG_GOT_SERDES_FLOWCTL); ++ tp->carrier_ok = 0; ++ iounmap((void *)tp->regs); ++} ++ ++/************************************************************************** ++IRQ - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void tg3_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++You should omit the last argument struct pci_device * for a non-PCI NIC ++***************************************************************************/ ++static int tg3_probe(struct dev *dev, struct pci_device *pdev) ++{ ++ struct nic *nic = (struct nic *)dev; ++ struct tg3 *tp = &tg3; ++ unsigned long tg3reg_base, tg3reg_len; ++ int i, err, pm_cap; ++ ++ if (pdev == 0) ++ return 0; ++ ++ memset(tp, 0, sizeof(*tp)); ++ ++ adjust_pci_device(pdev); ++ ++ nic->irqno = 0; ++ nic->ioaddr = pdev->ioaddr & ~3; ++ ++ /* Find power-management capability. */ ++ pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM); ++ if (pm_cap == 0) { ++ printf("Cannot find PowerManagement capability, aborting.\n"); ++ return 0; ++ } ++ tg3reg_base = pci_bar_start(pdev, PCI_BASE_ADDRESS_0); ++ if (tg3reg_base == -1UL) { ++ printf("Unuseable bar\n"); ++ return 0; ++ } ++ tg3reg_len = pci_bar_size(pdev, PCI_BASE_ADDRESS_0); ++ ++ tp->pdev = pdev; ++ tp->nic = nic; ++ tp->pm_cap = pm_cap; ++ tp->rx_mode = 0; ++ tp->tx_mode = 0; ++ tp->mi_mode = MAC_MI_MODE_BASE; ++ tp->tg3_flags = 0 & ~TG3_FLAG_INIT_COMPLETE; ++ ++ /* The word/byte swap controls here control register access byte ++ * swapping. DMA data byte swapping is controlled in the GRC_MODE ++ * setting below. ++ */ ++ tp->misc_host_ctrl = ++ MISC_HOST_CTRL_MASK_PCI_INT | ++ MISC_HOST_CTRL_WORD_SWAP | ++ MISC_HOST_CTRL_INDIR_ACCESS | ++ MISC_HOST_CTRL_PCISTATE_RW; ++ ++ /* The NONFRM (non-frame) byte/word swap controls take effect ++ * on descriptor entries, anything which isn't packet data. ++ * ++ * The StrongARM chips on the board (one for tx, one for rx) ++ * are running in big-endian mode. ++ */ ++ tp->grc_mode = (GRC_MODE_WSWAP_DATA | GRC_MODE_BSWAP_DATA | ++ GRC_MODE_WSWAP_NONFRM_DATA); ++#if __BYTE_ORDER == __BIG_ENDIAN ++ tp->grc_mode |= GRC_MODE_BSWAP_NONFRM_DATA; ++#endif ++ tp->regs = (unsigned long) ioremap(tg3reg_base, tg3reg_len); ++ if (tp->regs == 0UL) { ++ printf("Cannot map device registers, aborting\n"); ++ return 0; ++ } ++ ++ tg3_init_link_config(tp); ++ ++ err = tg3_get_invariants(tp); ++ if (err) { ++ printf("Problem fetching invariants of chip, aborting.\n"); ++ goto err_out_iounmap; ++ } ++ ++ err = tg3_get_device_address(tp); ++ if (err) { ++ printf("Could not obtain valid ethernet address, aborting.\n"); ++ goto err_out_iounmap; ++ } ++ printf("Ethernet addr: %!\n", nic->node_addr); ++ ++ tg3_setup_dma(tp); ++ ++ /* Now that we have fully setup the chip, save away a snapshot ++ * of the PCI config space. We need to restore this after ++ * GRC_MISC_CFG core clock resets and some resume events. ++ */ ++ pci_save_state(tp->pdev, tp->pci_cfg_state); ++ ++ printf("Tigon3 [partno(%s) rev %hx PHY(%s)] (PCI%s:%s:%s)\n", ++ tp->board_part_number, ++ tp->pci_chip_rev_id, ++ tg3_phy_string(tp), ++ ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ? "X" : ""), ++ ((tp->tg3_flags & TG3_FLAG_PCI_HIGH_SPEED) ? ++ ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ? "133MHz" : "66MHz") : ++ ((tp->tg3_flags & TG3_FLAG_PCIX_MODE) ? "100MHz" : "33MHz")), ++ ((tp->tg3_flags & TG3_FLAG_PCI_32BIT) ? "32-bit" : "64-bit")); ++ ++ ++ err = tg3_setup_hw(tp); ++ if (err) { ++ goto err_out_disable; ++ } ++ tp->tg3_flags |= TG3_FLAG_INIT_COMPLETE; ++ ++ /* Wait for a reasonable time for the link to come up */ ++ tg3_poll_link(tp); ++ for(i = 0; !tp->carrier_ok && (i < VALID_LINK_TIMEOUT*100); i++) { ++ mdelay(1); ++ tg3_poll_link(tp); ++ } ++ if (!tp->carrier_ok){ ++ printf("Valid link not established\n"); ++ goto err_out_disable; ++ } ++ ++ dev->disable = tg3_disable; ++ nic->poll = tg3_poll; ++ nic->transmit = tg3_transmit; ++ nic->irq = tg3_irq; ++ ++ return 1; ++ ++ err_out_iounmap: ++ iounmap((void *)tp->regs); ++ return 0; ++ err_out_disable: ++ tg3_disable(dev); ++ return 0; ++} ++ ++static struct pci_id tg3_nics[] = { ++PCI_ROM(0x14e4, 0x1644, "tg3-5700", "Broadcom Tigon 3 5700"), ++PCI_ROM(0x14e4, 0x1645, "tg3-5701", "Broadcom Tigon 3 5701"), ++PCI_ROM(0x14e4, 0x1646, "tg3-5702", "Broadcom Tigon 3 5702"), ++PCI_ROM(0x14e4, 0x1647, "tg3-5703", "Broadcom Tigon 3 5703"), ++PCI_ROM(0x14e4, 0x1648, "tg3-5704", "Broadcom Tigon 3 5704"), ++PCI_ROM(0x14e4, 0x164d, "tg3-5702FE", "Broadcom Tigon 3 5702FE"), ++PCI_ROM(0x14e4, 0x1653, "tg3-5705", "Broadcom Tigon 3 5705"), ++PCI_ROM(0x14e4, 0x1654, "tg3-5705_2", "Broadcom Tigon 3 5705_2"), ++PCI_ROM(0x14e4, 0x165d, "tg3-5705M", "Broadcom Tigon 3 5705M"), ++PCI_ROM(0x14e4, 0x165e, "tg3-5705M_2", "Broadcom Tigon 3 5705M_2"), ++PCI_ROM(0x14e4, 0x1696, "tg3-5782", "Broadcom Tigon 3 5782"), ++PCI_ROM(0x14e4, 0x169c, "tg3-5788", "Broadcom Tigon 3 5788"), ++PCI_ROM(0x14e4, 0x16a6, "tg3-5702X", "Broadcom Tigon 3 5702X"), ++PCI_ROM(0x14e4, 0x16a7, "tg3-5703X", "Broadcom Tigon 3 5703X"), ++PCI_ROM(0x14e4, 0x16a8, "tg3-5704S", "Broadcom Tigon 3 5704S"), ++PCI_ROM(0x14e4, 0x16c6, "tg3-5702A3", "Broadcom Tigon 3 5702A3"), ++PCI_ROM(0x14e4, 0x16c7, "tg3-5703A3", "Broadcom Tigon 3 5703A3"), ++PCI_ROM(0x14e4, 0x170d, "tg3-5901", "Broadcom Tigon 3 5901"), ++PCI_ROM(0x14e4, 0x170e, "tg3-5901_2", "Broadcom Tigon 3 5901_2"), ++PCI_ROM(0x1148, 0x4400, "tg3-9DXX", "Syskonnect 9DXX"), ++PCI_ROM(0x1148, 0x4500, "tg3-9MXX", "Syskonnect 9MXX"), ++PCI_ROM(0x173b, 0x03e8, "tg3-ac1000", "Altima AC1000"), ++PCI_ROM(0x173b, 0x03e9, "tg3-ac1001", "Altima AC1001"), ++PCI_ROM(0x173b, 0x03ea, "tg3-ac9100", "Altima AC9100"), ++PCI_ROM(0x173b, 0x03eb, "tg3-ac1003", "Altima AC1003"), ++}; ++ ++struct pci_driver tg3_driver = { ++ .type = NIC_DRIVER, ++ .name = "TG3", ++ .probe = tg3_probe, ++ .ids = tg3_nics, ++ .id_count = sizeof(tg3_nics)/sizeof(tg3_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/tg3.h +=================================================================== +--- /dev/null ++++ b/netboot/tg3.h +@@ -0,0 +1,2203 @@ ++/* $Id: grub-0.95-diskless-patch-2.patch,v 1.1.1.1 2005/06/14 08:18:50 wesolows Exp $ ++ * tg3.h: Definitions for Broadcom Tigon3 ethernet driver. ++ * ++ * Copyright (C) 2001, 2002 David S. Miller (davem@redhat.com) ++ * Copyright (C) 2001 Jeff Garzik (jgarzik@mandrakesoft.com) ++ */ ++ ++#ifndef _T3_H ++#define _T3_H ++ ++#include "stdint.h" ++ ++typedef unsigned long dma_addr_t; ++ ++/* From mii.h */ ++ ++/* Indicates what features are advertised by the interface. */ ++#define ADVERTISED_10baseT_Half (1 << 0) ++#define ADVERTISED_10baseT_Full (1 << 1) ++#define ADVERTISED_100baseT_Half (1 << 2) ++#define ADVERTISED_100baseT_Full (1 << 3) ++#define ADVERTISED_1000baseT_Half (1 << 4) ++#define ADVERTISED_1000baseT_Full (1 << 5) ++#define ADVERTISED_Autoneg (1 << 6) ++#define ADVERTISED_TP (1 << 7) ++#define ADVERTISED_AUI (1 << 8) ++#define ADVERTISED_MII (1 << 9) ++#define ADVERTISED_FIBRE (1 << 10) ++#define ADVERTISED_BNC (1 << 11) ++ ++/* The following are all involved in forcing a particular link ++ * mode for the device for setting things. When getting the ++ * devices settings, these indicate the current mode and whether ++ * it was foced up into this mode or autonegotiated. ++ */ ++ ++/* The forced speed, 10Mb, 100Mb, gigabit. */ ++#define SPEED_10 0 ++#define SPEED_100 1 ++#define SPEED_1000 2 ++#define SPEED_INVALID 3 ++ ++ ++/* Duplex, half or full. */ ++#define DUPLEX_HALF 0x00 ++#define DUPLEX_FULL 0x01 ++#define DUPLEX_INVALID 0x02 ++ ++/* Which connector port. */ ++#define PORT_TP 0x00 ++#define PORT_AUI 0x01 ++#define PORT_MII 0x02 ++#define PORT_FIBRE 0x03 ++#define PORT_BNC 0x04 ++ ++/* Which tranceiver to use. */ ++#define XCVR_INTERNAL 0x00 ++#define XCVR_EXTERNAL 0x01 ++#define XCVR_DUMMY1 0x02 ++#define XCVR_DUMMY2 0x03 ++#define XCVR_DUMMY3 0x04 ++ ++/* Enable or disable autonegotiation. If this is set to enable, ++ * the forced link modes above are completely ignored. ++ */ ++#define AUTONEG_DISABLE 0x00 ++#define AUTONEG_ENABLE 0x01 ++ ++/* Wake-On-Lan options. */ ++#define WAKE_PHY (1 << 0) ++#define WAKE_UCAST (1 << 1) ++#define WAKE_MCAST (1 << 2) ++#define WAKE_BCAST (1 << 3) ++#define WAKE_ARP (1 << 4) ++#define WAKE_MAGIC (1 << 5) ++#define WAKE_MAGICSECURE (1 << 6) /* only meaningful if WAKE_MAGIC */ ++ ++/* Generic MII registers. */ ++ ++#define MII_BMCR 0x00 /* Basic mode control register */ ++#define MII_BMSR 0x01 /* Basic mode status register */ ++#define MII_PHYSID1 0x02 /* PHYS ID 1 */ ++#define MII_PHYSID2 0x03 /* PHYS ID 2 */ ++#define MII_ADVERTISE 0x04 /* Advertisement control reg */ ++#define MII_LPA 0x05 /* Link partner ability reg */ ++#define MII_EXPANSION 0x06 /* Expansion register */ ++#define MII_DCOUNTER 0x12 /* Disconnect counter */ ++#define MII_FCSCOUNTER 0x13 /* False carrier counter */ ++#define MII_NWAYTEST 0x14 /* N-way auto-neg test reg */ ++#define MII_RERRCOUNTER 0x15 /* Receive error counter */ ++#define MII_SREVISION 0x16 /* Silicon revision */ ++#define MII_RESV1 0x17 /* Reserved... */ ++#define MII_LBRERROR 0x18 /* Lpback, rx, bypass error */ ++#define MII_PHYADDR 0x19 /* PHY address */ ++#define MII_RESV2 0x1a /* Reserved... */ ++#define MII_TPISTATUS 0x1b /* TPI status for 10mbps */ ++#define MII_NCONFIG 0x1c /* Network interface config */ ++ ++/* Basic mode control register. */ ++#define BMCR_RESV 0x007f /* Unused... */ ++#define BMCR_CTST 0x0080 /* Collision test */ ++#define BMCR_FULLDPLX 0x0100 /* Full duplex */ ++#define BMCR_ANRESTART 0x0200 /* Auto negotiation restart */ ++#define BMCR_ISOLATE 0x0400 /* Disconnect DP83840 from MII */ ++#define BMCR_PDOWN 0x0800 /* Powerdown the DP83840 */ ++#define BMCR_ANENABLE 0x1000 /* Enable auto negotiation */ ++#define BMCR_SPEED100 0x2000 /* Select 100Mbps */ ++#define BMCR_LOOPBACK 0x4000 /* TXD loopback bits */ ++#define BMCR_RESET 0x8000 /* Reset the DP83840 */ ++ ++/* Basic mode status register. */ ++#define BMSR_ERCAP 0x0001 /* Ext-reg capability */ ++#define BMSR_JCD 0x0002 /* Jabber detected */ ++#define BMSR_LSTATUS 0x0004 /* Link status */ ++#define BMSR_ANEGCAPABLE 0x0008 /* Able to do auto-negotiation */ ++#define BMSR_RFAULT 0x0010 /* Remote fault detected */ ++#define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ ++#define BMSR_RESV 0x07c0 /* Unused... */ ++#define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */ ++#define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */ ++#define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */ ++#define BMSR_100FULL 0x4000 /* Can do 100mbps, full-duplex */ ++#define BMSR_100BASE4 0x8000 /* Can do 100mbps, 4k packets */ ++ ++/* Advertisement control register. */ ++#define ADVERTISE_SLCT 0x001f /* Selector bits */ ++#define ADVERTISE_CSMA 0x0001 /* Only selector supported */ ++#define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ ++#define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ ++#define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ ++#define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ ++#define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */ ++#define ADVERTISE_RESV 0x1c00 /* Unused... */ ++#define ADVERTISE_RFAULT 0x2000 /* Say we can detect faults */ ++#define ADVERTISE_LPACK 0x4000 /* Ack link partners response */ ++#define ADVERTISE_NPAGE 0x8000 /* Next page bit */ ++ ++#define ADVERTISE_FULL (ADVERTISE_100FULL | ADVERTISE_10FULL | \ ++ ADVERTISE_CSMA) ++#define ADVERTISE_ALL (ADVERTISE_10HALF | ADVERTISE_10FULL | \ ++ ADVERTISE_100HALF | ADVERTISE_100FULL) ++ ++/* Link partner ability register. */ ++#define LPA_SLCT 0x001f /* Same as advertise selector */ ++#define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */ ++#define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */ ++#define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ ++#define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ ++#define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ ++#define LPA_RESV 0x1c00 /* Unused... */ ++#define LPA_RFAULT 0x2000 /* Link partner faulted */ ++#define LPA_LPACK 0x4000 /* Link partner acked us */ ++#define LPA_NPAGE 0x8000 /* Next page bit */ ++ ++#define LPA_DUPLEX (LPA_10FULL | LPA_100FULL) ++#define LPA_100 (LPA_100FULL | LPA_100HALF | LPA_100BASE4) ++ ++/* Expansion register for auto-negotiation. */ ++#define EXPANSION_NWAY 0x0001 /* Can do N-way auto-nego */ ++#define EXPANSION_LCWP 0x0002 /* Got new RX page code word */ ++#define EXPANSION_ENABLENPAGE 0x0004 /* This enables npage words */ ++#define EXPANSION_NPCAPABLE 0x0008 /* Link partner supports npage */ ++#define EXPANSION_MFAULTS 0x0010 /* Multiple faults detected */ ++#define EXPANSION_RESV 0xffe0 /* Unused... */ ++ ++/* N-way test register. */ ++#define NWAYTEST_RESV1 0x00ff /* Unused... */ ++#define NWAYTEST_LOOPBACK 0x0100 /* Enable loopback for N-way */ ++#define NWAYTEST_RESV2 0xfe00 /* Unused... */ ++ ++ ++/* From tg3.h */ ++ ++#define TG3_64BIT_REG_HIGH 0x00UL ++#define TG3_64BIT_REG_LOW 0x04UL ++ ++/* Descriptor block info. */ ++#define TG3_BDINFO_HOST_ADDR 0x0UL /* 64-bit */ ++#define TG3_BDINFO_MAXLEN_FLAGS 0x8UL /* 32-bit */ ++#define BDINFO_FLAGS_USE_EXT_RECV 0x00000001 /* ext rx_buffer_desc */ ++#define BDINFO_FLAGS_DISABLED 0x00000002 ++#define BDINFO_FLAGS_MAXLEN_MASK 0xffff0000 ++#define BDINFO_FLAGS_MAXLEN_SHIFT 16 ++#define TG3_BDINFO_NIC_ADDR 0xcUL /* 32-bit */ ++#define TG3_BDINFO_SIZE 0x10UL ++ ++#define RX_COPY_THRESHOLD 256 ++ ++#define RX_STD_MAX_SIZE 1536 ++#define RX_STD_MAX_SIZE_5705 512 ++#define RX_JUMBO_MAX_SIZE 0xdeadbeef /* XXX */ ++ ++/* First 256 bytes are a mirror of PCI config space. */ ++#define TG3PCI_VENDOR 0x00000000 ++#define TG3PCI_VENDOR_BROADCOM 0x14e4 ++#define TG3PCI_DEVICE 0x00000002 ++#define TG3PCI_DEVICE_TIGON3_1 0x1644 /* BCM5700 */ ++#define TG3PCI_DEVICE_TIGON3_2 0x1645 /* BCM5701 */ ++#define TG3PCI_DEVICE_TIGON3_3 0x1646 /* BCM5702 */ ++#define TG3PCI_DEVICE_TIGON3_4 0x1647 /* BCM5703 */ ++#define TG3PCI_COMMAND 0x00000004 ++#define TG3PCI_STATUS 0x00000006 ++#define TG3PCI_CCREVID 0x00000008 ++#define TG3PCI_CACHELINESZ 0x0000000c ++#define TG3PCI_LATTIMER 0x0000000d ++#define TG3PCI_HEADERTYPE 0x0000000e ++#define TG3PCI_BIST 0x0000000f ++#define TG3PCI_BASE0_LOW 0x00000010 ++#define TG3PCI_BASE0_HIGH 0x00000014 ++/* 0x18 --> 0x2c unused */ ++#define TG3PCI_SUBSYSVENID 0x0000002c ++#define TG3PCI_SUBSYSID 0x0000002e ++#define TG3PCI_ROMADDR 0x00000030 ++#define TG3PCI_CAPLIST 0x00000034 ++/* 0x35 --> 0x3c unused */ ++#define TG3PCI_IRQ_LINE 0x0000003c ++#define TG3PCI_IRQ_PIN 0x0000003d ++#define TG3PCI_MIN_GNT 0x0000003e ++#define TG3PCI_MAX_LAT 0x0000003f ++#define TG3PCI_X_CAPS 0x00000040 ++#define PCIX_CAPS_RELAXED_ORDERING 0x00020000 ++#define PCIX_CAPS_SPLIT_MASK 0x00700000 ++#define PCIX_CAPS_SPLIT_SHIFT 20 ++#define PCIX_CAPS_BURST_MASK 0x000c0000 ++#define PCIX_CAPS_BURST_SHIFT 18 ++#define PCIX_CAPS_MAX_BURST_CPIOB 2 ++#define TG3PCI_PM_CAP_PTR 0x00000041 ++#define TG3PCI_X_COMMAND 0x00000042 ++#define TG3PCI_X_STATUS 0x00000044 ++#define TG3PCI_PM_CAP_ID 0x00000048 ++#define TG3PCI_VPD_CAP_PTR 0x00000049 ++#define TG3PCI_PM_CAPS 0x0000004a ++#define TG3PCI_PM_CTRL_STAT 0x0000004c ++#define TG3PCI_BR_SUPP_EXT 0x0000004e ++#define TG3PCI_PM_DATA 0x0000004f ++#define TG3PCI_VPD_CAP_ID 0x00000050 ++#define TG3PCI_MSI_CAP_PTR 0x00000051 ++#define TG3PCI_VPD_ADDR_FLAG 0x00000052 ++#define VPD_ADDR_FLAG_WRITE 0x00008000 ++#define TG3PCI_VPD_DATA 0x00000054 ++#define TG3PCI_MSI_CAP_ID 0x00000058 ++#define TG3PCI_NXT_CAP_PTR 0x00000059 ++#define TG3PCI_MSI_CTRL 0x0000005a ++#define TG3PCI_MSI_ADDR_LOW 0x0000005c ++#define TG3PCI_MSI_ADDR_HIGH 0x00000060 ++#define TG3PCI_MSI_DATA 0x00000064 ++/* 0x66 --> 0x68 unused */ ++#define TG3PCI_MISC_HOST_CTRL 0x00000068 ++#define MISC_HOST_CTRL_CLEAR_INT 0x00000001 ++#define MISC_HOST_CTRL_MASK_PCI_INT 0x00000002 ++#define MISC_HOST_CTRL_BYTE_SWAP 0x00000004 ++#define MISC_HOST_CTRL_WORD_SWAP 0x00000008 ++#define MISC_HOST_CTRL_PCISTATE_RW 0x00000010 ++#define MISC_HOST_CTRL_CLKREG_RW 0x00000020 ++#define MISC_HOST_CTRL_REGWORD_SWAP 0x00000040 ++#define MISC_HOST_CTRL_INDIR_ACCESS 0x00000080 ++#define MISC_HOST_CTRL_IRQ_MASK_MODE 0x00000100 ++#define MISC_HOST_CTRL_TAGGED_STATUS 0x00000200 ++#define MISC_HOST_CTRL_CHIPREV 0xffff0000 ++#define MISC_HOST_CTRL_CHIPREV_SHIFT 16 ++#define GET_CHIP_REV_ID(MISC_HOST_CTRL) \ ++ (((MISC_HOST_CTRL) & MISC_HOST_CTRL_CHIPREV) >> \ ++ MISC_HOST_CTRL_CHIPREV_SHIFT) ++#define CHIPREV_ID_5700_A0 0x7000 ++#define CHIPREV_ID_5700_A1 0x7001 ++#define CHIPREV_ID_5700_B0 0x7100 ++#define CHIPREV_ID_5700_B1 0x7101 ++#define CHIPREV_ID_5700_B3 0x7102 ++#define CHIPREV_ID_5700_ALTIMA 0x7104 ++#define CHIPREV_ID_5700_C0 0x7200 ++#define CHIPREV_ID_5701_A0 0x0000 ++#define CHIPREV_ID_5701_B0 0x0100 ++#define CHIPREV_ID_5701_B2 0x0102 ++#define CHIPREV_ID_5701_B5 0x0105 ++#define CHIPREV_ID_5703_A0 0x1000 ++#define CHIPREV_ID_5703_A1 0x1001 ++#define CHIPREV_ID_5703_A2 0x1002 ++#define CHIPREV_ID_5703_A3 0x1003 ++#define CHIPREV_ID_5704_A0 0x2000 ++#define CHIPREV_ID_5704_A1 0x2001 ++#define CHIPREV_ID_5704_A2 0x2002 ++#define CHIPREV_ID_5705_A0 0x3000 ++#define CHIPREV_ID_5705_A1 0x3001 ++#define CHIPREV_ID_5705_A2 0x3002 ++#define CHIPREV_ID_5705_A3 0x3003 ++#define GET_ASIC_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 12) ++#define ASIC_REV_5700 0x07 ++#define ASIC_REV_5701 0x00 ++#define ASIC_REV_5703 0x01 ++#define ASIC_REV_5704 0x02 ++#define ASIC_REV_5705 0x03 ++#define GET_CHIP_REV(CHIP_REV_ID) ((CHIP_REV_ID) >> 8) ++#define CHIPREV_5700_AX 0x70 ++#define CHIPREV_5700_BX 0x71 ++#define CHIPREV_5700_CX 0x72 ++#define CHIPREV_5701_AX 0x00 ++#define GET_METAL_REV(CHIP_REV_ID) ((CHIP_REV_ID) & 0xff) ++#define METAL_REV_A0 0x00 ++#define METAL_REV_A1 0x01 ++#define METAL_REV_B0 0x00 ++#define METAL_REV_B1 0x01 ++#define METAL_REV_B2 0x02 ++#define TG3PCI_DMA_RW_CTRL 0x0000006c ++#define DMA_RWCTRL_MIN_DMA 0x000000ff ++#define DMA_RWCTRL_MIN_DMA_SHIFT 0 ++#define DMA_RWCTRL_READ_BNDRY_MASK 0x00000700 ++#define DMA_RWCTRL_READ_BNDRY_DISAB 0x00000000 ++#define DMA_RWCTRL_READ_BNDRY_16 0x00000100 ++#define DMA_RWCTRL_READ_BNDRY_32 0x00000200 ++#define DMA_RWCTRL_READ_BNDRY_64 0x00000300 ++#define DMA_RWCTRL_READ_BNDRY_128 0x00000400 ++#define DMA_RWCTRL_READ_BNDRY_256 0x00000500 ++#define DMA_RWCTRL_READ_BNDRY_512 0x00000600 ++#define DMA_RWCTRL_READ_BNDRY_1024 0x00000700 ++#define DMA_RWCTRL_WRITE_BNDRY_MASK 0x00003800 ++#define DMA_RWCTRL_WRITE_BNDRY_DISAB 0x00000000 ++#define DMA_RWCTRL_WRITE_BNDRY_16 0x00000800 ++#define DMA_RWCTRL_WRITE_BNDRY_32 0x00001000 ++#define DMA_RWCTRL_WRITE_BNDRY_64 0x00001800 ++#define DMA_RWCTRL_WRITE_BNDRY_128 0x00002000 ++#define DMA_RWCTRL_WRITE_BNDRY_256 0x00002800 ++#define DMA_RWCTRL_WRITE_BNDRY_512 0x00003000 ++#define DMA_RWCTRL_WRITE_BNDRY_1024 0x00003800 ++#define DMA_RWCTRL_ONE_DMA 0x00004000 ++#define DMA_RWCTRL_READ_WATER 0x00070000 ++#define DMA_RWCTRL_READ_WATER_SHIFT 16 ++#define DMA_RWCTRL_WRITE_WATER 0x00380000 ++#define DMA_RWCTRL_WRITE_WATER_SHIFT 19 ++#define DMA_RWCTRL_USE_MEM_READ_MULT 0x00400000 ++#define DMA_RWCTRL_ASSERT_ALL_BE 0x00800000 ++#define DMA_RWCTRL_PCI_READ_CMD 0x0f000000 ++#define DMA_RWCTRL_PCI_READ_CMD_SHIFT 24 ++#define DMA_RWCTRL_PCI_WRITE_CMD 0xf0000000 ++#define DMA_RWCTRL_PCI_WRITE_CMD_SHIFT 28 ++#define TG3PCI_PCISTATE 0x00000070 ++#define PCISTATE_FORCE_RESET 0x00000001 ++#define PCISTATE_INT_NOT_ACTIVE 0x00000002 ++#define PCISTATE_CONV_PCI_MODE 0x00000004 ++#define PCISTATE_BUS_SPEED_HIGH 0x00000008 ++#define PCISTATE_BUS_32BIT 0x00000010 ++#define PCISTATE_ROM_ENABLE 0x00000020 ++#define PCISTATE_ROM_RETRY_ENABLE 0x00000040 ++#define PCISTATE_FLAT_VIEW 0x00000100 ++#define PCISTATE_RETRY_SAME_DMA 0x00002000 ++#define TG3PCI_CLOCK_CTRL 0x00000074 ++#define CLOCK_CTRL_CORECLK_DISABLE 0x00000200 ++#define CLOCK_CTRL_RXCLK_DISABLE 0x00000400 ++#define CLOCK_CTRL_TXCLK_DISABLE 0x00000800 ++#define CLOCK_CTRL_ALTCLK 0x00001000 ++#define CLOCK_CTRL_PWRDOWN_PLL133 0x00008000 ++#define CLOCK_CTRL_44MHZ_CORE 0x00040000 ++#define CLOCK_CTRL_625_CORE 0x00100000 ++#define CLOCK_CTRL_FORCE_CLKRUN 0x00200000 ++#define CLOCK_CTRL_CLKRUN_OENABLE 0x00400000 ++#define CLOCK_CTRL_DELAY_PCI_GRANT 0x80000000 ++#define TG3PCI_REG_BASE_ADDR 0x00000078 ++#define TG3PCI_MEM_WIN_BASE_ADDR 0x0000007c ++#define TG3PCI_REG_DATA 0x00000080 ++#define TG3PCI_MEM_WIN_DATA 0x00000084 ++#define TG3PCI_MODE_CTRL 0x00000088 ++#define TG3PCI_MISC_CFG 0x0000008c ++#define TG3PCI_MISC_LOCAL_CTRL 0x00000090 ++/* 0x94 --> 0x98 unused */ ++#define TG3PCI_STD_RING_PROD_IDX 0x00000098 /* 64-bit */ ++#define TG3PCI_RCV_RET_RING_CON_IDX 0x000000a0 /* 64-bit */ ++#define TG3PCI_SND_PROD_IDX 0x000000a8 /* 64-bit */ ++/* 0xb0 --> 0x100 unused */ ++ ++/* 0x100 --> 0x200 unused */ ++ ++/* Mailbox registers */ ++#define MAILBOX_INTERRUPT_0 0x00000200 /* 64-bit */ ++#define MAILBOX_INTERRUPT_1 0x00000208 /* 64-bit */ ++#define MAILBOX_INTERRUPT_2 0x00000210 /* 64-bit */ ++#define MAILBOX_INTERRUPT_3 0x00000218 /* 64-bit */ ++#define MAILBOX_GENERAL_0 0x00000220 /* 64-bit */ ++#define MAILBOX_GENERAL_1 0x00000228 /* 64-bit */ ++#define MAILBOX_GENERAL_2 0x00000230 /* 64-bit */ ++#define MAILBOX_GENERAL_3 0x00000238 /* 64-bit */ ++#define MAILBOX_GENERAL_4 0x00000240 /* 64-bit */ ++#define MAILBOX_GENERAL_5 0x00000248 /* 64-bit */ ++#define MAILBOX_GENERAL_6 0x00000250 /* 64-bit */ ++#define MAILBOX_GENERAL_7 0x00000258 /* 64-bit */ ++#define MAILBOX_RELOAD_STAT 0x00000260 /* 64-bit */ ++#define MAILBOX_RCV_STD_PROD_IDX 0x00000268 /* 64-bit */ ++#define MAILBOX_RCV_JUMBO_PROD_IDX 0x00000270 /* 64-bit */ ++#define MAILBOX_RCV_MINI_PROD_IDX 0x00000278 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_0 0x00000280 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_1 0x00000288 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_2 0x00000290 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_3 0x00000298 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_4 0x000002a0 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_5 0x000002a8 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_6 0x000002b0 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_7 0x000002b8 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_8 0x000002c0 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_9 0x000002c8 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_10 0x000002d0 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_11 0x000002d8 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_12 0x000002e0 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_13 0x000002e8 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_14 0x000002f0 /* 64-bit */ ++#define MAILBOX_RCVRET_CON_IDX_15 0x000002f8 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_0 0x00000300 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_1 0x00000308 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_2 0x00000310 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_3 0x00000318 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_4 0x00000320 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_5 0x00000328 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_6 0x00000330 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_7 0x00000338 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_8 0x00000340 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_9 0x00000348 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_10 0x00000350 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_11 0x00000358 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_12 0x00000360 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_13 0x00000368 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_14 0x00000370 /* 64-bit */ ++#define MAILBOX_SNDHOST_PROD_IDX_15 0x00000378 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_0 0x00000380 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_1 0x00000388 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_2 0x00000390 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_3 0x00000398 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_4 0x000003a0 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_5 0x000003a8 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_6 0x000003b0 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_7 0x000003b8 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_8 0x000003c0 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_9 0x000003c8 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_10 0x000003d0 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_11 0x000003d8 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_12 0x000003e0 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_13 0x000003e8 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_14 0x000003f0 /* 64-bit */ ++#define MAILBOX_SNDNIC_PROD_IDX_15 0x000003f8 /* 64-bit */ ++ ++/* MAC control registers */ ++#define MAC_MODE 0x00000400 ++#define MAC_MODE_RESET 0x00000001 ++#define MAC_MODE_HALF_DUPLEX 0x00000002 ++#define MAC_MODE_PORT_MODE_MASK 0x0000000c ++#define MAC_MODE_PORT_MODE_TBI 0x0000000c ++#define MAC_MODE_PORT_MODE_GMII 0x00000008 ++#define MAC_MODE_PORT_MODE_MII 0x00000004 ++#define MAC_MODE_PORT_MODE_NONE 0x00000000 ++#define MAC_MODE_PORT_INT_LPBACK 0x00000010 ++#define MAC_MODE_TAGGED_MAC_CTRL 0x00000080 ++#define MAC_MODE_TX_BURSTING 0x00000100 ++#define MAC_MODE_MAX_DEFER 0x00000200 ++#define MAC_MODE_LINK_POLARITY 0x00000400 ++#define MAC_MODE_RXSTAT_ENABLE 0x00000800 ++#define MAC_MODE_RXSTAT_CLEAR 0x00001000 ++#define MAC_MODE_RXSTAT_FLUSH 0x00002000 ++#define MAC_MODE_TXSTAT_ENABLE 0x00004000 ++#define MAC_MODE_TXSTAT_CLEAR 0x00008000 ++#define MAC_MODE_TXSTAT_FLUSH 0x00010000 ++#define MAC_MODE_SEND_CONFIGS 0x00020000 ++#define MAC_MODE_MAGIC_PKT_ENABLE 0x00040000 ++#define MAC_MODE_ACPI_ENABLE 0x00080000 ++#define MAC_MODE_MIP_ENABLE 0x00100000 ++#define MAC_MODE_TDE_ENABLE 0x00200000 ++#define MAC_MODE_RDE_ENABLE 0x00400000 ++#define MAC_MODE_FHDE_ENABLE 0x00800000 ++#define MAC_STATUS 0x00000404 ++#define MAC_STATUS_PCS_SYNCED 0x00000001 ++#define MAC_STATUS_SIGNAL_DET 0x00000002 ++#define MAC_STATUS_RCVD_CFG 0x00000004 ++#define MAC_STATUS_CFG_CHANGED 0x00000008 ++#define MAC_STATUS_SYNC_CHANGED 0x00000010 ++#define MAC_STATUS_PORT_DEC_ERR 0x00000400 ++#define MAC_STATUS_LNKSTATE_CHANGED 0x00001000 ++#define MAC_STATUS_MI_COMPLETION 0x00400000 ++#define MAC_STATUS_MI_INTERRUPT 0x00800000 ++#define MAC_STATUS_AP_ERROR 0x01000000 ++#define MAC_STATUS_ODI_ERROR 0x02000000 ++#define MAC_STATUS_RXSTAT_OVERRUN 0x04000000 ++#define MAC_STATUS_TXSTAT_OVERRUN 0x08000000 ++#define MAC_EVENT 0x00000408 ++#define MAC_EVENT_PORT_DECODE_ERR 0x00000400 ++#define MAC_EVENT_LNKSTATE_CHANGED 0x00001000 ++#define MAC_EVENT_MI_COMPLETION 0x00400000 ++#define MAC_EVENT_MI_INTERRUPT 0x00800000 ++#define MAC_EVENT_AP_ERROR 0x01000000 ++#define MAC_EVENT_ODI_ERROR 0x02000000 ++#define MAC_EVENT_RXSTAT_OVERRUN 0x04000000 ++#define MAC_EVENT_TXSTAT_OVERRUN 0x08000000 ++#define MAC_LED_CTRL 0x0000040c ++#define LED_CTRL_LNKLED_OVERRIDE 0x00000001 ++#define LED_CTRL_1000MBPS_ON 0x00000002 ++#define LED_CTRL_100MBPS_ON 0x00000004 ++#define LED_CTRL_10MBPS_ON 0x00000008 ++#define LED_CTRL_TRAFFIC_OVERRIDE 0x00000010 ++#define LED_CTRL_TRAFFIC_BLINK 0x00000020 ++#define LED_CTRL_TRAFFIC_LED 0x00000040 ++#define LED_CTRL_1000MBPS_STATUS 0x00000080 ++#define LED_CTRL_100MBPS_STATUS 0x00000100 ++#define LED_CTRL_10MBPS_STATUS 0x00000200 ++#define LED_CTRL_TRAFFIC_STATUS 0x00000400 ++#define LED_CTRL_MAC_MODE 0x00000000 ++#define LED_CTRL_PHY_MODE_1 0x00000800 ++#define LED_CTRL_PHY_MODE_2 0x00001000 ++#define LED_CTRL_BLINK_RATE_MASK 0x7ff80000 ++#define LED_CTRL_BLINK_RATE_SHIFT 19 ++#define LED_CTRL_BLINK_PER_OVERRIDE 0x00080000 ++#define LED_CTRL_BLINK_RATE_OVERRIDE 0x80000000 ++#define MAC_ADDR_0_HIGH 0x00000410 /* upper 2 bytes */ ++#define MAC_ADDR_0_LOW 0x00000414 /* lower 4 bytes */ ++#define MAC_ADDR_1_HIGH 0x00000418 /* upper 2 bytes */ ++#define MAC_ADDR_1_LOW 0x0000041c /* lower 4 bytes */ ++#define MAC_ADDR_2_HIGH 0x00000420 /* upper 2 bytes */ ++#define MAC_ADDR_2_LOW 0x00000424 /* lower 4 bytes */ ++#define MAC_ADDR_3_HIGH 0x00000428 /* upper 2 bytes */ ++#define MAC_ADDR_3_LOW 0x0000042c /* lower 4 bytes */ ++#define MAC_ACPI_MBUF_PTR 0x00000430 ++#define MAC_ACPI_LEN_OFFSET 0x00000434 ++#define ACPI_LENOFF_LEN_MASK 0x0000ffff ++#define ACPI_LENOFF_LEN_SHIFT 0 ++#define ACPI_LENOFF_OFF_MASK 0x0fff0000 ++#define ACPI_LENOFF_OFF_SHIFT 16 ++#define MAC_TX_BACKOFF_SEED 0x00000438 ++#define TX_BACKOFF_SEED_MASK 0x000003ff ++#define MAC_RX_MTU_SIZE 0x0000043c ++#define RX_MTU_SIZE_MASK 0x0000ffff ++#define MAC_PCS_TEST 0x00000440 ++#define PCS_TEST_PATTERN_MASK 0x000fffff ++#define PCS_TEST_PATTERN_SHIFT 0 ++#define PCS_TEST_ENABLE 0x00100000 ++#define MAC_TX_AUTO_NEG 0x00000444 ++#define TX_AUTO_NEG_MASK 0x0000ffff ++#define TX_AUTO_NEG_SHIFT 0 ++#define MAC_RX_AUTO_NEG 0x00000448 ++#define RX_AUTO_NEG_MASK 0x0000ffff ++#define RX_AUTO_NEG_SHIFT 0 ++#define MAC_MI_COM 0x0000044c ++#define MI_COM_CMD_MASK 0x0c000000 ++#define MI_COM_CMD_WRITE 0x04000000 ++#define MI_COM_CMD_READ 0x08000000 ++#define MI_COM_READ_FAILED 0x10000000 ++#define MI_COM_START 0x20000000 ++#define MI_COM_BUSY 0x20000000 ++#define MI_COM_PHY_ADDR_MASK 0x03e00000 ++#define MI_COM_PHY_ADDR_SHIFT 21 ++#define MI_COM_REG_ADDR_MASK 0x001f0000 ++#define MI_COM_REG_ADDR_SHIFT 16 ++#define MI_COM_DATA_MASK 0x0000ffff ++#define MAC_MI_STAT 0x00000450 ++#define MAC_MI_STAT_LNKSTAT_ATTN_ENAB 0x00000001 ++#define MAC_MI_MODE 0x00000454 ++#define MAC_MI_MODE_CLK_10MHZ 0x00000001 ++#define MAC_MI_MODE_SHORT_PREAMBLE 0x00000002 ++#define MAC_MI_MODE_AUTO_POLL 0x00000010 ++#define MAC_MI_MODE_CORE_CLK_62MHZ 0x00008000 ++#define MAC_MI_MODE_BASE 0x000c0000 /* XXX magic values XXX */ ++#define MAC_AUTO_POLL_STATUS 0x00000458 ++#define MAC_AUTO_POLL_ERROR 0x00000001 ++#define MAC_TX_MODE 0x0000045c ++#define TX_MODE_RESET 0x00000001 ++#define TX_MODE_ENABLE 0x00000002 ++#define TX_MODE_FLOW_CTRL_ENABLE 0x00000010 ++#define TX_MODE_BIG_BCKOFF_ENABLE 0x00000020 ++#define TX_MODE_LONG_PAUSE_ENABLE 0x00000040 ++#define MAC_TX_STATUS 0x00000460 ++#define TX_STATUS_XOFFED 0x00000001 ++#define TX_STATUS_SENT_XOFF 0x00000002 ++#define TX_STATUS_SENT_XON 0x00000004 ++#define TX_STATUS_LINK_UP 0x00000008 ++#define TX_STATUS_ODI_UNDERRUN 0x00000010 ++#define TX_STATUS_ODI_OVERRUN 0x00000020 ++#define MAC_TX_LENGTHS 0x00000464 ++#define TX_LENGTHS_SLOT_TIME_MASK 0x000000ff ++#define TX_LENGTHS_SLOT_TIME_SHIFT 0 ++#define TX_LENGTHS_IPG_MASK 0x00000f00 ++#define TX_LENGTHS_IPG_SHIFT 8 ++#define TX_LENGTHS_IPG_CRS_MASK 0x00003000 ++#define TX_LENGTHS_IPG_CRS_SHIFT 12 ++#define MAC_RX_MODE 0x00000468 ++#define RX_MODE_RESET 0x00000001 ++#define RX_MODE_ENABLE 0x00000002 ++#define RX_MODE_FLOW_CTRL_ENABLE 0x00000004 ++#define RX_MODE_KEEP_MAC_CTRL 0x00000008 ++#define RX_MODE_KEEP_PAUSE 0x00000010 ++#define RX_MODE_ACCEPT_OVERSIZED 0x00000020 ++#define RX_MODE_ACCEPT_RUNTS 0x00000040 ++#define RX_MODE_LEN_CHECK 0x00000080 ++#define RX_MODE_PROMISC 0x00000100 ++#define RX_MODE_NO_CRC_CHECK 0x00000200 ++#define RX_MODE_KEEP_VLAN_TAG 0x00000400 ++#define MAC_RX_STATUS 0x0000046c ++#define RX_STATUS_REMOTE_TX_XOFFED 0x00000001 ++#define RX_STATUS_XOFF_RCVD 0x00000002 ++#define RX_STATUS_XON_RCVD 0x00000004 ++#define MAC_HASH_REG_0 0x00000470 ++#define MAC_HASH_REG_1 0x00000474 ++#define MAC_HASH_REG_2 0x00000478 ++#define MAC_HASH_REG_3 0x0000047c ++#define MAC_RCV_RULE_0 0x00000480 ++#define MAC_RCV_VALUE_0 0x00000484 ++#define MAC_RCV_RULE_1 0x00000488 ++#define MAC_RCV_VALUE_1 0x0000048c ++#define MAC_RCV_RULE_2 0x00000490 ++#define MAC_RCV_VALUE_2 0x00000494 ++#define MAC_RCV_RULE_3 0x00000498 ++#define MAC_RCV_VALUE_3 0x0000049c ++#define MAC_RCV_RULE_4 0x000004a0 ++#define MAC_RCV_VALUE_4 0x000004a4 ++#define MAC_RCV_RULE_5 0x000004a8 ++#define MAC_RCV_VALUE_5 0x000004ac ++#define MAC_RCV_RULE_6 0x000004b0 ++#define MAC_RCV_VALUE_6 0x000004b4 ++#define MAC_RCV_RULE_7 0x000004b8 ++#define MAC_RCV_VALUE_7 0x000004bc ++#define MAC_RCV_RULE_8 0x000004c0 ++#define MAC_RCV_VALUE_8 0x000004c4 ++#define MAC_RCV_RULE_9 0x000004c8 ++#define MAC_RCV_VALUE_9 0x000004cc ++#define MAC_RCV_RULE_10 0x000004d0 ++#define MAC_RCV_VALUE_10 0x000004d4 ++#define MAC_RCV_RULE_11 0x000004d8 ++#define MAC_RCV_VALUE_11 0x000004dc ++#define MAC_RCV_RULE_12 0x000004e0 ++#define MAC_RCV_VALUE_12 0x000004e4 ++#define MAC_RCV_RULE_13 0x000004e8 ++#define MAC_RCV_VALUE_13 0x000004ec ++#define MAC_RCV_RULE_14 0x000004f0 ++#define MAC_RCV_VALUE_14 0x000004f4 ++#define MAC_RCV_RULE_15 0x000004f8 ++#define MAC_RCV_VALUE_15 0x000004fc ++#define RCV_RULE_DISABLE_MASK 0x7fffffff ++#define MAC_RCV_RULE_CFG 0x00000500 ++#define RCV_RULE_CFG_DEFAULT_CLASS 0x00000008 ++#define MAC_LOW_WMARK_MAX_RX_FRAME 0x00000504 ++/* 0x508 --> 0x520 unused */ ++#define MAC_HASHREGU_0 0x00000520 ++#define MAC_HASHREGU_1 0x00000524 ++#define MAC_HASHREGU_2 0x00000528 ++#define MAC_HASHREGU_3 0x0000052c ++#define MAC_EXTADDR_0_HIGH 0x00000530 ++#define MAC_EXTADDR_0_LOW 0x00000534 ++#define MAC_EXTADDR_1_HIGH 0x00000538 ++#define MAC_EXTADDR_1_LOW 0x0000053c ++#define MAC_EXTADDR_2_HIGH 0x00000540 ++#define MAC_EXTADDR_2_LOW 0x00000544 ++#define MAC_EXTADDR_3_HIGH 0x00000548 ++#define MAC_EXTADDR_3_LOW 0x0000054c ++#define MAC_EXTADDR_4_HIGH 0x00000550 ++#define MAC_EXTADDR_4_LOW 0x00000554 ++#define MAC_EXTADDR_5_HIGH 0x00000558 ++#define MAC_EXTADDR_5_LOW 0x0000055c ++#define MAC_EXTADDR_6_HIGH 0x00000560 ++#define MAC_EXTADDR_6_LOW 0x00000564 ++#define MAC_EXTADDR_7_HIGH 0x00000568 ++#define MAC_EXTADDR_7_LOW 0x0000056c ++#define MAC_EXTADDR_8_HIGH 0x00000570 ++#define MAC_EXTADDR_8_LOW 0x00000574 ++#define MAC_EXTADDR_9_HIGH 0x00000578 ++#define MAC_EXTADDR_9_LOW 0x0000057c ++#define MAC_EXTADDR_10_HIGH 0x00000580 ++#define MAC_EXTADDR_10_LOW 0x00000584 ++#define MAC_EXTADDR_11_HIGH 0x00000588 ++#define MAC_EXTADDR_11_LOW 0x0000058c ++#define MAC_SERDES_CFG 0x00000590 ++#define MAC_SERDES_STAT 0x00000594 ++/* 0x598 --> 0x600 unused */ ++#define MAC_TX_MAC_STATE_BASE 0x00000600 /* 16 bytes */ ++#define MAC_RX_MAC_STATE_BASE 0x00000610 /* 20 bytes */ ++/* 0x624 --> 0x800 unused */ ++#define MAC_TX_STATS_OCTETS 0x00000800 ++#define MAC_TX_STATS_RESV1 0x00000804 ++#define MAC_TX_STATS_COLLISIONS 0x00000808 ++#define MAC_TX_STATS_XON_SENT 0x0000080c ++#define MAC_TX_STATS_XOFF_SENT 0x00000810 ++#define MAC_TX_STATS_RESV2 0x00000814 ++#define MAC_TX_STATS_MAC_ERRORS 0x00000818 ++#define MAC_TX_STATS_SINGLE_COLLISIONS 0x0000081c ++#define MAC_TX_STATS_MULT_COLLISIONS 0x00000820 ++#define MAC_TX_STATS_DEFERRED 0x00000824 ++#define MAC_TX_STATS_RESV3 0x00000828 ++#define MAC_TX_STATS_EXCESSIVE_COL 0x0000082c ++#define MAC_TX_STATS_LATE_COL 0x00000830 ++#define MAC_TX_STATS_RESV4_1 0x00000834 ++#define MAC_TX_STATS_RESV4_2 0x00000838 ++#define MAC_TX_STATS_RESV4_3 0x0000083c ++#define MAC_TX_STATS_RESV4_4 0x00000840 ++#define MAC_TX_STATS_RESV4_5 0x00000844 ++#define MAC_TX_STATS_RESV4_6 0x00000848 ++#define MAC_TX_STATS_RESV4_7 0x0000084c ++#define MAC_TX_STATS_RESV4_8 0x00000850 ++#define MAC_TX_STATS_RESV4_9 0x00000854 ++#define MAC_TX_STATS_RESV4_10 0x00000858 ++#define MAC_TX_STATS_RESV4_11 0x0000085c ++#define MAC_TX_STATS_RESV4_12 0x00000860 ++#define MAC_TX_STATS_RESV4_13 0x00000864 ++#define MAC_TX_STATS_RESV4_14 0x00000868 ++#define MAC_TX_STATS_UCAST 0x0000086c ++#define MAC_TX_STATS_MCAST 0x00000870 ++#define MAC_TX_STATS_BCAST 0x00000874 ++#define MAC_TX_STATS_RESV5_1 0x00000878 ++#define MAC_TX_STATS_RESV5_2 0x0000087c ++#define MAC_RX_STATS_OCTETS 0x00000880 ++#define MAC_RX_STATS_RESV1 0x00000884 ++#define MAC_RX_STATS_FRAGMENTS 0x00000888 ++#define MAC_RX_STATS_UCAST 0x0000088c ++#define MAC_RX_STATS_MCAST 0x00000890 ++#define MAC_RX_STATS_BCAST 0x00000894 ++#define MAC_RX_STATS_FCS_ERRORS 0x00000898 ++#define MAC_RX_STATS_ALIGN_ERRORS 0x0000089c ++#define MAC_RX_STATS_XON_PAUSE_RECVD 0x000008a0 ++#define MAC_RX_STATS_XOFF_PAUSE_RECVD 0x000008a4 ++#define MAC_RX_STATS_MAC_CTRL_RECVD 0x000008a8 ++#define MAC_RX_STATS_XOFF_ENTERED 0x000008ac ++#define MAC_RX_STATS_FRAME_TOO_LONG 0x000008b0 ++#define MAC_RX_STATS_JABBERS 0x000008b4 ++#define MAC_RX_STATS_UNDERSIZE 0x000008b8 ++/* 0x8bc --> 0xc00 unused */ ++ ++/* Send data initiator control registers */ ++#define SNDDATAI_MODE 0x00000c00 ++#define SNDDATAI_MODE_RESET 0x00000001 ++#define SNDDATAI_MODE_ENABLE 0x00000002 ++#define SNDDATAI_MODE_STAT_OFLOW_ENAB 0x00000004 ++#define SNDDATAI_STATUS 0x00000c04 ++#define SNDDATAI_STATUS_STAT_OFLOW 0x00000004 ++#define SNDDATAI_STATSCTRL 0x00000c08 ++#define SNDDATAI_SCTRL_ENABLE 0x00000001 ++#define SNDDATAI_SCTRL_FASTUPD 0x00000002 ++#define SNDDATAI_SCTRL_CLEAR 0x00000004 ++#define SNDDATAI_SCTRL_FLUSH 0x00000008 ++#define SNDDATAI_SCTRL_FORCE_ZERO 0x00000010 ++#define SNDDATAI_STATSENAB 0x00000c0c ++#define SNDDATAI_STATSINCMASK 0x00000c10 ++/* 0xc14 --> 0xc80 unused */ ++#define SNDDATAI_COS_CNT_0 0x00000c80 ++#define SNDDATAI_COS_CNT_1 0x00000c84 ++#define SNDDATAI_COS_CNT_2 0x00000c88 ++#define SNDDATAI_COS_CNT_3 0x00000c8c ++#define SNDDATAI_COS_CNT_4 0x00000c90 ++#define SNDDATAI_COS_CNT_5 0x00000c94 ++#define SNDDATAI_COS_CNT_6 0x00000c98 ++#define SNDDATAI_COS_CNT_7 0x00000c9c ++#define SNDDATAI_COS_CNT_8 0x00000ca0 ++#define SNDDATAI_COS_CNT_9 0x00000ca4 ++#define SNDDATAI_COS_CNT_10 0x00000ca8 ++#define SNDDATAI_COS_CNT_11 0x00000cac ++#define SNDDATAI_COS_CNT_12 0x00000cb0 ++#define SNDDATAI_COS_CNT_13 0x00000cb4 ++#define SNDDATAI_COS_CNT_14 0x00000cb8 ++#define SNDDATAI_COS_CNT_15 0x00000cbc ++#define SNDDATAI_DMA_RDQ_FULL_CNT 0x00000cc0 ++#define SNDDATAI_DMA_PRIO_RDQ_FULL_CNT 0x00000cc4 ++#define SNDDATAI_SDCQ_FULL_CNT 0x00000cc8 ++#define SNDDATAI_NICRNG_SSND_PIDX_CNT 0x00000ccc ++#define SNDDATAI_STATS_UPDATED_CNT 0x00000cd0 ++#define SNDDATAI_INTERRUPTS_CNT 0x00000cd4 ++#define SNDDATAI_AVOID_INTERRUPTS_CNT 0x00000cd8 ++#define SNDDATAI_SND_THRESH_HIT_CNT 0x00000cdc ++/* 0xce0 --> 0x1000 unused */ ++ ++/* Send data completion control registers */ ++#define SNDDATAC_MODE 0x00001000 ++#define SNDDATAC_MODE_RESET 0x00000001 ++#define SNDDATAC_MODE_ENABLE 0x00000002 ++/* 0x1004 --> 0x1400 unused */ ++ ++/* Send BD ring selector */ ++#define SNDBDS_MODE 0x00001400 ++#define SNDBDS_MODE_RESET 0x00000001 ++#define SNDBDS_MODE_ENABLE 0x00000002 ++#define SNDBDS_MODE_ATTN_ENABLE 0x00000004 ++#define SNDBDS_STATUS 0x00001404 ++#define SNDBDS_STATUS_ERROR_ATTN 0x00000004 ++#define SNDBDS_HWDIAG 0x00001408 ++/* 0x140c --> 0x1440 */ ++#define SNDBDS_SEL_CON_IDX_0 0x00001440 ++#define SNDBDS_SEL_CON_IDX_1 0x00001444 ++#define SNDBDS_SEL_CON_IDX_2 0x00001448 ++#define SNDBDS_SEL_CON_IDX_3 0x0000144c ++#define SNDBDS_SEL_CON_IDX_4 0x00001450 ++#define SNDBDS_SEL_CON_IDX_5 0x00001454 ++#define SNDBDS_SEL_CON_IDX_6 0x00001458 ++#define SNDBDS_SEL_CON_IDX_7 0x0000145c ++#define SNDBDS_SEL_CON_IDX_8 0x00001460 ++#define SNDBDS_SEL_CON_IDX_9 0x00001464 ++#define SNDBDS_SEL_CON_IDX_10 0x00001468 ++#define SNDBDS_SEL_CON_IDX_11 0x0000146c ++#define SNDBDS_SEL_CON_IDX_12 0x00001470 ++#define SNDBDS_SEL_CON_IDX_13 0x00001474 ++#define SNDBDS_SEL_CON_IDX_14 0x00001478 ++#define SNDBDS_SEL_CON_IDX_15 0x0000147c ++/* 0x1480 --> 0x1800 unused */ ++ ++/* Send BD initiator control registers */ ++#define SNDBDI_MODE 0x00001800 ++#define SNDBDI_MODE_RESET 0x00000001 ++#define SNDBDI_MODE_ENABLE 0x00000002 ++#define SNDBDI_MODE_ATTN_ENABLE 0x00000004 ++#define SNDBDI_STATUS 0x00001804 ++#define SNDBDI_STATUS_ERROR_ATTN 0x00000004 ++#define SNDBDI_IN_PROD_IDX_0 0x00001808 ++#define SNDBDI_IN_PROD_IDX_1 0x0000180c ++#define SNDBDI_IN_PROD_IDX_2 0x00001810 ++#define SNDBDI_IN_PROD_IDX_3 0x00001814 ++#define SNDBDI_IN_PROD_IDX_4 0x00001818 ++#define SNDBDI_IN_PROD_IDX_5 0x0000181c ++#define SNDBDI_IN_PROD_IDX_6 0x00001820 ++#define SNDBDI_IN_PROD_IDX_7 0x00001824 ++#define SNDBDI_IN_PROD_IDX_8 0x00001828 ++#define SNDBDI_IN_PROD_IDX_9 0x0000182c ++#define SNDBDI_IN_PROD_IDX_10 0x00001830 ++#define SNDBDI_IN_PROD_IDX_11 0x00001834 ++#define SNDBDI_IN_PROD_IDX_12 0x00001838 ++#define SNDBDI_IN_PROD_IDX_13 0x0000183c ++#define SNDBDI_IN_PROD_IDX_14 0x00001840 ++#define SNDBDI_IN_PROD_IDX_15 0x00001844 ++/* 0x1848 --> 0x1c00 unused */ ++ ++/* Send BD completion control registers */ ++#define SNDBDC_MODE 0x00001c00 ++#define SNDBDC_MODE_RESET 0x00000001 ++#define SNDBDC_MODE_ENABLE 0x00000002 ++#define SNDBDC_MODE_ATTN_ENABLE 0x00000004 ++/* 0x1c04 --> 0x2000 unused */ ++ ++/* Receive list placement control registers */ ++#define RCVLPC_MODE 0x00002000 ++#define RCVLPC_MODE_RESET 0x00000001 ++#define RCVLPC_MODE_ENABLE 0x00000002 ++#define RCVLPC_MODE_CLASS0_ATTN_ENAB 0x00000004 ++#define RCVLPC_MODE_MAPOOR_AATTN_ENAB 0x00000008 ++#define RCVLPC_MODE_STAT_OFLOW_ENAB 0x00000010 ++#define RCVLPC_STATUS 0x00002004 ++#define RCVLPC_STATUS_CLASS0 0x00000004 ++#define RCVLPC_STATUS_MAPOOR 0x00000008 ++#define RCVLPC_STATUS_STAT_OFLOW 0x00000010 ++#define RCVLPC_LOCK 0x00002008 ++#define RCVLPC_LOCK_REQ_MASK 0x0000ffff ++#define RCVLPC_LOCK_REQ_SHIFT 0 ++#define RCVLPC_LOCK_GRANT_MASK 0xffff0000 ++#define RCVLPC_LOCK_GRANT_SHIFT 16 ++#define RCVLPC_NON_EMPTY_BITS 0x0000200c ++#define RCVLPC_NON_EMPTY_BITS_MASK 0x0000ffff ++#define RCVLPC_CONFIG 0x00002010 ++#define RCVLPC_STATSCTRL 0x00002014 ++#define RCVLPC_STATSCTRL_ENABLE 0x00000001 ++#define RCVLPC_STATSCTRL_FASTUPD 0x00000002 ++#define RCVLPC_STATS_ENABLE 0x00002018 ++#define RCVLPC_STATSENAB_LNGBRST_RFIX 0x00400000 ++#define RCVLPC_STATS_INCMASK 0x0000201c ++/* 0x2020 --> 0x2100 unused */ ++#define RCVLPC_SELLST_BASE 0x00002100 /* 16 16-byte entries */ ++#define SELLST_TAIL 0x00000004 ++#define SELLST_CONT 0x00000008 ++#define SELLST_UNUSED 0x0000000c ++#define RCVLPC_COS_CNTL_BASE 0x00002200 /* 16 4-byte entries */ ++#define RCVLPC_DROP_FILTER_CNT 0x00002240 ++#define RCVLPC_DMA_WQ_FULL_CNT 0x00002244 ++#define RCVLPC_DMA_HIPRIO_WQ_FULL_CNT 0x00002248 ++#define RCVLPC_NO_RCV_BD_CNT 0x0000224c ++#define RCVLPC_IN_DISCARDS_CNT 0x00002250 ++#define RCVLPC_IN_ERRORS_CNT 0x00002254 ++#define RCVLPC_RCV_THRESH_HIT_CNT 0x00002258 ++/* 0x225c --> 0x2400 unused */ ++ ++/* Receive Data and Receive BD Initiator Control */ ++#define RCVDBDI_MODE 0x00002400 ++#define RCVDBDI_MODE_RESET 0x00000001 ++#define RCVDBDI_MODE_ENABLE 0x00000002 ++#define RCVDBDI_MODE_JUMBOBD_NEEDED 0x00000004 ++#define RCVDBDI_MODE_FRM_TOO_BIG 0x00000008 ++#define RCVDBDI_MODE_INV_RING_SZ 0x00000010 ++#define RCVDBDI_STATUS 0x00002404 ++#define RCVDBDI_STATUS_JUMBOBD_NEEDED 0x00000004 ++#define RCVDBDI_STATUS_FRM_TOO_BIG 0x00000008 ++#define RCVDBDI_STATUS_INV_RING_SZ 0x00000010 ++#define RCVDBDI_SPLIT_FRAME_MINSZ 0x00002408 ++/* 0x240c --> 0x2440 unused */ ++#define RCVDBDI_JUMBO_BD 0x00002440 /* TG3_BDINFO_... */ ++#define RCVDBDI_STD_BD 0x00002450 /* TG3_BDINFO_... */ ++#define RCVDBDI_MINI_BD 0x00002460 /* TG3_BDINFO_... */ ++#define RCVDBDI_JUMBO_CON_IDX 0x00002470 ++#define RCVDBDI_STD_CON_IDX 0x00002474 ++#define RCVDBDI_MINI_CON_IDX 0x00002478 ++/* 0x247c --> 0x2480 unused */ ++#define RCVDBDI_BD_PROD_IDX_0 0x00002480 ++#define RCVDBDI_BD_PROD_IDX_1 0x00002484 ++#define RCVDBDI_BD_PROD_IDX_2 0x00002488 ++#define RCVDBDI_BD_PROD_IDX_3 0x0000248c ++#define RCVDBDI_BD_PROD_IDX_4 0x00002490 ++#define RCVDBDI_BD_PROD_IDX_5 0x00002494 ++#define RCVDBDI_BD_PROD_IDX_6 0x00002498 ++#define RCVDBDI_BD_PROD_IDX_7 0x0000249c ++#define RCVDBDI_BD_PROD_IDX_8 0x000024a0 ++#define RCVDBDI_BD_PROD_IDX_9 0x000024a4 ++#define RCVDBDI_BD_PROD_IDX_10 0x000024a8 ++#define RCVDBDI_BD_PROD_IDX_11 0x000024ac ++#define RCVDBDI_BD_PROD_IDX_12 0x000024b0 ++#define RCVDBDI_BD_PROD_IDX_13 0x000024b4 ++#define RCVDBDI_BD_PROD_IDX_14 0x000024b8 ++#define RCVDBDI_BD_PROD_IDX_15 0x000024bc ++#define RCVDBDI_HWDIAG 0x000024c0 ++/* 0x24c4 --> 0x2800 unused */ ++ ++/* Receive Data Completion Control */ ++#define RCVDCC_MODE 0x00002800 ++#define RCVDCC_MODE_RESET 0x00000001 ++#define RCVDCC_MODE_ENABLE 0x00000002 ++#define RCVDCC_MODE_ATTN_ENABLE 0x00000004 ++/* 0x2804 --> 0x2c00 unused */ ++ ++/* Receive BD Initiator Control Registers */ ++#define RCVBDI_MODE 0x00002c00 ++#define RCVBDI_MODE_RESET 0x00000001 ++#define RCVBDI_MODE_ENABLE 0x00000002 ++#define RCVBDI_MODE_RCB_ATTN_ENAB 0x00000004 ++#define RCVBDI_STATUS 0x00002c04 ++#define RCVBDI_STATUS_RCB_ATTN 0x00000004 ++#define RCVBDI_JUMBO_PROD_IDX 0x00002c08 ++#define RCVBDI_STD_PROD_IDX 0x00002c0c ++#define RCVBDI_MINI_PROD_IDX 0x00002c10 ++#define RCVBDI_MINI_THRESH 0x00002c14 ++#define RCVBDI_STD_THRESH 0x00002c18 ++#define RCVBDI_JUMBO_THRESH 0x00002c1c ++/* 0x2c20 --> 0x3000 unused */ ++ ++/* Receive BD Completion Control Registers */ ++#define RCVCC_MODE 0x00003000 ++#define RCVCC_MODE_RESET 0x00000001 ++#define RCVCC_MODE_ENABLE 0x00000002 ++#define RCVCC_MODE_ATTN_ENABLE 0x00000004 ++#define RCVCC_STATUS 0x00003004 ++#define RCVCC_STATUS_ERROR_ATTN 0x00000004 ++#define RCVCC_JUMP_PROD_IDX 0x00003008 ++#define RCVCC_STD_PROD_IDX 0x0000300c ++#define RCVCC_MINI_PROD_IDX 0x00003010 ++/* 0x3014 --> 0x3400 unused */ ++ ++/* Receive list selector control registers */ ++#define RCVLSC_MODE 0x00003400 ++#define RCVLSC_MODE_RESET 0x00000001 ++#define RCVLSC_MODE_ENABLE 0x00000002 ++#define RCVLSC_MODE_ATTN_ENABLE 0x00000004 ++#define RCVLSC_STATUS 0x00003404 ++#define RCVLSC_STATUS_ERROR_ATTN 0x00000004 ++/* 0x3408 --> 0x3800 unused */ ++ ++/* Mbuf cluster free registers */ ++#define MBFREE_MODE 0x00003800 ++#define MBFREE_MODE_RESET 0x00000001 ++#define MBFREE_MODE_ENABLE 0x00000002 ++#define MBFREE_STATUS 0x00003804 ++/* 0x3808 --> 0x3c00 unused */ ++ ++/* Host coalescing control registers */ ++#define HOSTCC_MODE 0x00003c00 ++#define HOSTCC_MODE_RESET 0x00000001 ++#define HOSTCC_MODE_ENABLE 0x00000002 ++#define HOSTCC_MODE_ATTN 0x00000004 ++#define HOSTCC_MODE_NOW 0x00000008 ++#define HOSTCC_MODE_FULL_STATUS 0x00000000 ++#define HOSTCC_MODE_64BYTE 0x00000080 ++#define HOSTCC_MODE_32BYTE 0x00000100 ++#define HOSTCC_MODE_CLRTICK_RXBD 0x00000200 ++#define HOSTCC_MODE_CLRTICK_TXBD 0x00000400 ++#define HOSTCC_MODE_NOINT_ON_NOW 0x00000800 ++#define HOSTCC_MODE_NOINT_ON_FORCE 0x00001000 ++#define HOSTCC_STATUS 0x00003c04 ++#define HOSTCC_STATUS_ERROR_ATTN 0x00000004 ++#define HOSTCC_RXCOL_TICKS 0x00003c08 ++#define LOW_RXCOL_TICKS 0x00000032 ++#define DEFAULT_RXCOL_TICKS 0x00000048 ++#define HIGH_RXCOL_TICKS 0x00000096 ++#define HOSTCC_TXCOL_TICKS 0x00003c0c ++#define LOW_TXCOL_TICKS 0x00000096 ++#define DEFAULT_TXCOL_TICKS 0x0000012c ++#define HIGH_TXCOL_TICKS 0x00000145 ++#define HOSTCC_RXMAX_FRAMES 0x00003c10 ++#define LOW_RXMAX_FRAMES 0x00000005 ++#define DEFAULT_RXMAX_FRAMES 0x00000008 ++#define HIGH_RXMAX_FRAMES 0x00000012 ++#define HOSTCC_TXMAX_FRAMES 0x00003c14 ++#define LOW_TXMAX_FRAMES 0x00000035 ++#define DEFAULT_TXMAX_FRAMES 0x0000004b ++#define HIGH_TXMAX_FRAMES 0x00000052 ++#define HOSTCC_RXCOAL_TICK_INT 0x00003c18 ++#define DEFAULT_RXCOAL_TICK_INT 0x00000019 ++#define HOSTCC_TXCOAL_TICK_INT 0x00003c1c ++#define DEFAULT_TXCOAL_TICK_INT 0x00000019 ++#define HOSTCC_RXCOAL_MAXF_INT 0x00003c20 ++#define DEFAULT_RXCOAL_MAXF_INT 0x00000005 ++#define HOSTCC_TXCOAL_MAXF_INT 0x00003c24 ++#define DEFAULT_TXCOAL_MAXF_INT 0x00000005 ++#define HOSTCC_STAT_COAL_TICKS 0x00003c28 ++#define DEFAULT_STAT_COAL_TICKS 0x000f4240 ++/* 0x3c2c --> 0x3c30 unused */ ++#define HOSTCC_STATS_BLK_HOST_ADDR 0x00003c30 /* 64-bit */ ++#define HOSTCC_STATUS_BLK_HOST_ADDR 0x00003c38 /* 64-bit */ ++#define HOSTCC_STATS_BLK_NIC_ADDR 0x00003c40 ++#define HOSTCC_STATUS_BLK_NIC_ADDR 0x00003c44 ++#define HOSTCC_FLOW_ATTN 0x00003c48 ++/* 0x3c4c --> 0x3c50 unused */ ++#define HOSTCC_JUMBO_CON_IDX 0x00003c50 ++#define HOSTCC_STD_CON_IDX 0x00003c54 ++#define HOSTCC_MINI_CON_IDX 0x00003c58 ++/* 0x3c5c --> 0x3c80 unused */ ++#define HOSTCC_RET_PROD_IDX_0 0x00003c80 ++#define HOSTCC_RET_PROD_IDX_1 0x00003c84 ++#define HOSTCC_RET_PROD_IDX_2 0x00003c88 ++#define HOSTCC_RET_PROD_IDX_3 0x00003c8c ++#define HOSTCC_RET_PROD_IDX_4 0x00003c90 ++#define HOSTCC_RET_PROD_IDX_5 0x00003c94 ++#define HOSTCC_RET_PROD_IDX_6 0x00003c98 ++#define HOSTCC_RET_PROD_IDX_7 0x00003c9c ++#define HOSTCC_RET_PROD_IDX_8 0x00003ca0 ++#define HOSTCC_RET_PROD_IDX_9 0x00003ca4 ++#define HOSTCC_RET_PROD_IDX_10 0x00003ca8 ++#define HOSTCC_RET_PROD_IDX_11 0x00003cac ++#define HOSTCC_RET_PROD_IDX_12 0x00003cb0 ++#define HOSTCC_RET_PROD_IDX_13 0x00003cb4 ++#define HOSTCC_RET_PROD_IDX_14 0x00003cb8 ++#define HOSTCC_RET_PROD_IDX_15 0x00003cbc ++#define HOSTCC_SND_CON_IDX_0 0x00003cc0 ++#define HOSTCC_SND_CON_IDX_1 0x00003cc4 ++#define HOSTCC_SND_CON_IDX_2 0x00003cc8 ++#define HOSTCC_SND_CON_IDX_3 0x00003ccc ++#define HOSTCC_SND_CON_IDX_4 0x00003cd0 ++#define HOSTCC_SND_CON_IDX_5 0x00003cd4 ++#define HOSTCC_SND_CON_IDX_6 0x00003cd8 ++#define HOSTCC_SND_CON_IDX_7 0x00003cdc ++#define HOSTCC_SND_CON_IDX_8 0x00003ce0 ++#define HOSTCC_SND_CON_IDX_9 0x00003ce4 ++#define HOSTCC_SND_CON_IDX_10 0x00003ce8 ++#define HOSTCC_SND_CON_IDX_11 0x00003cec ++#define HOSTCC_SND_CON_IDX_12 0x00003cf0 ++#define HOSTCC_SND_CON_IDX_13 0x00003cf4 ++#define HOSTCC_SND_CON_IDX_14 0x00003cf8 ++#define HOSTCC_SND_CON_IDX_15 0x00003cfc ++/* 0x3d00 --> 0x4000 unused */ ++ ++/* Memory arbiter control registers */ ++#define MEMARB_MODE 0x00004000 ++#define MEMARB_MODE_RESET 0x00000001 ++#define MEMARB_MODE_ENABLE 0x00000002 ++#define MEMARB_STATUS 0x00004004 ++#define MEMARB_TRAP_ADDR_LOW 0x00004008 ++#define MEMARB_TRAP_ADDR_HIGH 0x0000400c ++/* 0x4010 --> 0x4400 unused */ ++ ++/* Buffer manager control registers */ ++#define BUFMGR_MODE 0x00004400 ++#define BUFMGR_MODE_RESET 0x00000001 ++#define BUFMGR_MODE_ENABLE 0x00000002 ++#define BUFMGR_MODE_ATTN_ENABLE 0x00000004 ++#define BUFMGR_MODE_BM_TEST 0x00000008 ++#define BUFMGR_MODE_MBLOW_ATTN_ENAB 0x00000010 ++#define BUFMGR_STATUS 0x00004404 ++#define BUFMGR_STATUS_ERROR 0x00000004 ++#define BUFMGR_STATUS_MBLOW 0x00000010 ++#define BUFMGR_MB_POOL_ADDR 0x00004408 ++#define BUFMGR_MB_POOL_SIZE 0x0000440c ++#define BUFMGR_MB_RDMA_LOW_WATER 0x00004410 ++#define DEFAULT_MB_RDMA_LOW_WATER 0x00000050 ++#define DEFAULT_MB_RDMA_LOW_WATER_5705 0x00000000 ++#define DEFAULT_MB_RDMA_LOW_WATER_JUMBO 0x00000130 ++#define BUFMGR_MB_MACRX_LOW_WATER 0x00004414 ++#define DEFAULT_MB_MACRX_LOW_WATER 0x00000020 ++#define DEFAULT_MB_MACRX_LOW_WATER_5705 0x00000010 ++#define DEFAULT_MB_MACRX_LOW_WATER_JUMBO 0x00000098 ++#define BUFMGR_MB_HIGH_WATER 0x00004418 ++#define DEFAULT_MB_HIGH_WATER 0x00000060 ++#define DEFAULT_MB_HIGH_WATER_5705 0x00000060 ++#define DEFAULT_MB_HIGH_WATER_JUMBO 0x0000017c ++#define BUFMGR_RX_MB_ALLOC_REQ 0x0000441c ++#define BUFMGR_MB_ALLOC_BIT 0x10000000 ++#define BUFMGR_RX_MB_ALLOC_RESP 0x00004420 ++#define BUFMGR_TX_MB_ALLOC_REQ 0x00004424 ++#define BUFMGR_TX_MB_ALLOC_RESP 0x00004428 ++#define BUFMGR_DMA_DESC_POOL_ADDR 0x0000442c ++#define BUFMGR_DMA_DESC_POOL_SIZE 0x00004430 ++#define BUFMGR_DMA_LOW_WATER 0x00004434 ++#define DEFAULT_DMA_LOW_WATER 0x00000005 ++#define BUFMGR_DMA_HIGH_WATER 0x00004438 ++#define DEFAULT_DMA_HIGH_WATER 0x0000000a ++#define BUFMGR_RX_DMA_ALLOC_REQ 0x0000443c ++#define BUFMGR_RX_DMA_ALLOC_RESP 0x00004440 ++#define BUFMGR_TX_DMA_ALLOC_REQ 0x00004444 ++#define BUFMGR_TX_DMA_ALLOC_RESP 0x00004448 ++#define BUFMGR_HWDIAG_0 0x0000444c ++#define BUFMGR_HWDIAG_1 0x00004450 ++#define BUFMGR_HWDIAG_2 0x00004454 ++/* 0x4458 --> 0x4800 unused */ ++ ++/* Read DMA control registers */ ++#define RDMAC_MODE 0x00004800 ++#define RDMAC_MODE_RESET 0x00000001 ++#define RDMAC_MODE_ENABLE 0x00000002 ++#define RDMAC_MODE_TGTABORT_ENAB 0x00000004 ++#define RDMAC_MODE_MSTABORT_ENAB 0x00000008 ++#define RDMAC_MODE_PARITYERR_ENAB 0x00000010 ++#define RDMAC_MODE_ADDROFLOW_ENAB 0x00000020 ++#define RDMAC_MODE_FIFOOFLOW_ENAB 0x00000040 ++#define RDMAC_MODE_FIFOURUN_ENAB 0x00000080 ++#define RDMAC_MODE_FIFOOREAD_ENAB 0x00000100 ++#define RDMAC_MODE_LNGREAD_ENAB 0x00000200 ++#define RDMAC_MODE_SPLIT_ENABLE 0x00000800 ++#define RDMAC_MODE_SPLIT_RESET 0x00001000 ++#define RDMAC_MODE_FIFO_SIZE_128 0x00020000 ++#define RDMAC_MODE_FIFO_LONG_BURST 0x00030000 ++#define RDMAC_STATUS 0x00004804 ++#define RDMAC_STATUS_TGTABORT 0x00000004 ++#define RDMAC_STATUS_MSTABORT 0x00000008 ++#define RDMAC_STATUS_PARITYERR 0x00000010 ++#define RDMAC_STATUS_ADDROFLOW 0x00000020 ++#define RDMAC_STATUS_FIFOOFLOW 0x00000040 ++#define RDMAC_STATUS_FIFOURUN 0x00000080 ++#define RDMAC_STATUS_FIFOOREAD 0x00000100 ++#define RDMAC_STATUS_LNGREAD 0x00000200 ++/* 0x4808 --> 0x4c00 unused */ ++ ++/* Write DMA control registers */ ++#define WDMAC_MODE 0x00004c00 ++#define WDMAC_MODE_RESET 0x00000001 ++#define WDMAC_MODE_ENABLE 0x00000002 ++#define WDMAC_MODE_TGTABORT_ENAB 0x00000004 ++#define WDMAC_MODE_MSTABORT_ENAB 0x00000008 ++#define WDMAC_MODE_PARITYERR_ENAB 0x00000010 ++#define WDMAC_MODE_ADDROFLOW_ENAB 0x00000020 ++#define WDMAC_MODE_FIFOOFLOW_ENAB 0x00000040 ++#define WDMAC_MODE_FIFOURUN_ENAB 0x00000080 ++#define WDMAC_MODE_FIFOOREAD_ENAB 0x00000100 ++#define WDMAC_MODE_LNGREAD_ENAB 0x00000200 ++#define WDMAC_MODE_RX_ACCEL 0x00000400 ++#define WDMAC_STATUS 0x00004c04 ++#define WDMAC_STATUS_TGTABORT 0x00000004 ++#define WDMAC_STATUS_MSTABORT 0x00000008 ++#define WDMAC_STATUS_PARITYERR 0x00000010 ++#define WDMAC_STATUS_ADDROFLOW 0x00000020 ++#define WDMAC_STATUS_FIFOOFLOW 0x00000040 ++#define WDMAC_STATUS_FIFOURUN 0x00000080 ++#define WDMAC_STATUS_FIFOOREAD 0x00000100 ++#define WDMAC_STATUS_LNGREAD 0x00000200 ++/* 0x4c08 --> 0x5000 unused */ ++ ++/* Per-cpu register offsets (arm9) */ ++#define CPU_MODE 0x00000000 ++#define CPU_MODE_RESET 0x00000001 ++#define CPU_MODE_HALT 0x00000400 ++#define CPU_STATE 0x00000004 ++#define CPU_EVTMASK 0x00000008 ++/* 0xc --> 0x1c reserved */ ++#define CPU_PC 0x0000001c ++#define CPU_INSN 0x00000020 ++#define CPU_SPAD_UFLOW 0x00000024 ++#define CPU_WDOG_CLEAR 0x00000028 ++#define CPU_WDOG_VECTOR 0x0000002c ++#define CPU_WDOG_PC 0x00000030 ++#define CPU_HW_BP 0x00000034 ++/* 0x38 --> 0x44 unused */ ++#define CPU_WDOG_SAVED_STATE 0x00000044 ++#define CPU_LAST_BRANCH_ADDR 0x00000048 ++#define CPU_SPAD_UFLOW_SET 0x0000004c ++/* 0x50 --> 0x200 unused */ ++#define CPU_R0 0x00000200 ++#define CPU_R1 0x00000204 ++#define CPU_R2 0x00000208 ++#define CPU_R3 0x0000020c ++#define CPU_R4 0x00000210 ++#define CPU_R5 0x00000214 ++#define CPU_R6 0x00000218 ++#define CPU_R7 0x0000021c ++#define CPU_R8 0x00000220 ++#define CPU_R9 0x00000224 ++#define CPU_R10 0x00000228 ++#define CPU_R11 0x0000022c ++#define CPU_R12 0x00000230 ++#define CPU_R13 0x00000234 ++#define CPU_R14 0x00000238 ++#define CPU_R15 0x0000023c ++#define CPU_R16 0x00000240 ++#define CPU_R17 0x00000244 ++#define CPU_R18 0x00000248 ++#define CPU_R19 0x0000024c ++#define CPU_R20 0x00000250 ++#define CPU_R21 0x00000254 ++#define CPU_R22 0x00000258 ++#define CPU_R23 0x0000025c ++#define CPU_R24 0x00000260 ++#define CPU_R25 0x00000264 ++#define CPU_R26 0x00000268 ++#define CPU_R27 0x0000026c ++#define CPU_R28 0x00000270 ++#define CPU_R29 0x00000274 ++#define CPU_R30 0x00000278 ++#define CPU_R31 0x0000027c ++/* 0x280 --> 0x400 unused */ ++ ++#define RX_CPU_BASE 0x00005000 ++#define TX_CPU_BASE 0x00005400 ++ ++/* Mailboxes */ ++#define GRCMBOX_INTERRUPT_0 0x00005800 /* 64-bit */ ++#define GRCMBOX_INTERRUPT_1 0x00005808 /* 64-bit */ ++#define GRCMBOX_INTERRUPT_2 0x00005810 /* 64-bit */ ++#define GRCMBOX_INTERRUPT_3 0x00005818 /* 64-bit */ ++#define GRCMBOX_GENERAL_0 0x00005820 /* 64-bit */ ++#define GRCMBOX_GENERAL_1 0x00005828 /* 64-bit */ ++#define GRCMBOX_GENERAL_2 0x00005830 /* 64-bit */ ++#define GRCMBOX_GENERAL_3 0x00005838 /* 64-bit */ ++#define GRCMBOX_GENERAL_4 0x00005840 /* 64-bit */ ++#define GRCMBOX_GENERAL_5 0x00005848 /* 64-bit */ ++#define GRCMBOX_GENERAL_6 0x00005850 /* 64-bit */ ++#define GRCMBOX_GENERAL_7 0x00005858 /* 64-bit */ ++#define GRCMBOX_RELOAD_STAT 0x00005860 /* 64-bit */ ++#define GRCMBOX_RCVSTD_PROD_IDX 0x00005868 /* 64-bit */ ++#define GRCMBOX_RCVJUMBO_PROD_IDX 0x00005870 /* 64-bit */ ++#define GRCMBOX_RCVMINI_PROD_IDX 0x00005878 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_0 0x00005880 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_1 0x00005888 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_2 0x00005890 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_3 0x00005898 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_4 0x000058a0 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_5 0x000058a8 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_6 0x000058b0 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_7 0x000058b8 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_8 0x000058c0 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_9 0x000058c8 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_10 0x000058d0 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_11 0x000058d8 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_12 0x000058e0 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_13 0x000058e8 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_14 0x000058f0 /* 64-bit */ ++#define GRCMBOX_RCVRET_CON_IDX_15 0x000058f8 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_0 0x00005900 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_1 0x00005908 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_2 0x00005910 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_3 0x00005918 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_4 0x00005920 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_5 0x00005928 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_6 0x00005930 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_7 0x00005938 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_8 0x00005940 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_9 0x00005948 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_10 0x00005950 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_11 0x00005958 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_12 0x00005960 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_13 0x00005968 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_14 0x00005970 /* 64-bit */ ++#define GRCMBOX_SNDHOST_PROD_IDX_15 0x00005978 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_0 0x00005980 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_1 0x00005988 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_2 0x00005990 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_3 0x00005998 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_4 0x000059a0 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_5 0x000059a8 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_6 0x000059b0 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_7 0x000059b8 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_8 0x000059c0 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_9 0x000059c8 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_10 0x000059d0 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_11 0x000059d8 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_12 0x000059e0 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_13 0x000059e8 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_14 0x000059f0 /* 64-bit */ ++#define GRCMBOX_SNDNIC_PROD_IDX_15 0x000059f8 /* 64-bit */ ++#define GRCMBOX_HIGH_PRIO_EV_VECTOR 0x00005a00 ++#define GRCMBOX_HIGH_PRIO_EV_MASK 0x00005a04 ++#define GRCMBOX_LOW_PRIO_EV_VEC 0x00005a08 ++#define GRCMBOX_LOW_PRIO_EV_MASK 0x00005a0c ++/* 0x5a10 --> 0x5c00 */ ++ ++/* Flow Through queues */ ++#define FTQ_RESET 0x00005c00 ++/* 0x5c04 --> 0x5c10 unused */ ++#define FTQ_DMA_NORM_READ_CTL 0x00005c10 ++#define FTQ_DMA_NORM_READ_FULL_CNT 0x00005c14 ++#define FTQ_DMA_NORM_READ_FIFO_ENQDEQ 0x00005c18 ++#define FTQ_DMA_NORM_READ_WRITE_PEEK 0x00005c1c ++#define FTQ_DMA_HIGH_READ_CTL 0x00005c20 ++#define FTQ_DMA_HIGH_READ_FULL_CNT 0x00005c24 ++#define FTQ_DMA_HIGH_READ_FIFO_ENQDEQ 0x00005c28 ++#define FTQ_DMA_HIGH_READ_WRITE_PEEK 0x00005c2c ++#define FTQ_DMA_COMP_DISC_CTL 0x00005c30 ++#define FTQ_DMA_COMP_DISC_FULL_CNT 0x00005c34 ++#define FTQ_DMA_COMP_DISC_FIFO_ENQDEQ 0x00005c38 ++#define FTQ_DMA_COMP_DISC_WRITE_PEEK 0x00005c3c ++#define FTQ_SEND_BD_COMP_CTL 0x00005c40 ++#define FTQ_SEND_BD_COMP_FULL_CNT 0x00005c44 ++#define FTQ_SEND_BD_COMP_FIFO_ENQDEQ 0x00005c48 ++#define FTQ_SEND_BD_COMP_WRITE_PEEK 0x00005c4c ++#define FTQ_SEND_DATA_INIT_CTL 0x00005c50 ++#define FTQ_SEND_DATA_INIT_FULL_CNT 0x00005c54 ++#define FTQ_SEND_DATA_INIT_FIFO_ENQDEQ 0x00005c58 ++#define FTQ_SEND_DATA_INIT_WRITE_PEEK 0x00005c5c ++#define FTQ_DMA_NORM_WRITE_CTL 0x00005c60 ++#define FTQ_DMA_NORM_WRITE_FULL_CNT 0x00005c64 ++#define FTQ_DMA_NORM_WRITE_FIFO_ENQDEQ 0x00005c68 ++#define FTQ_DMA_NORM_WRITE_WRITE_PEEK 0x00005c6c ++#define FTQ_DMA_HIGH_WRITE_CTL 0x00005c70 ++#define FTQ_DMA_HIGH_WRITE_FULL_CNT 0x00005c74 ++#define FTQ_DMA_HIGH_WRITE_FIFO_ENQDEQ 0x00005c78 ++#define FTQ_DMA_HIGH_WRITE_WRITE_PEEK 0x00005c7c ++#define FTQ_SWTYPE1_CTL 0x00005c80 ++#define FTQ_SWTYPE1_FULL_CNT 0x00005c84 ++#define FTQ_SWTYPE1_FIFO_ENQDEQ 0x00005c88 ++#define FTQ_SWTYPE1_WRITE_PEEK 0x00005c8c ++#define FTQ_SEND_DATA_COMP_CTL 0x00005c90 ++#define FTQ_SEND_DATA_COMP_FULL_CNT 0x00005c94 ++#define FTQ_SEND_DATA_COMP_FIFO_ENQDEQ 0x00005c98 ++#define FTQ_SEND_DATA_COMP_WRITE_PEEK 0x00005c9c ++#define FTQ_HOST_COAL_CTL 0x00005ca0 ++#define FTQ_HOST_COAL_FULL_CNT 0x00005ca4 ++#define FTQ_HOST_COAL_FIFO_ENQDEQ 0x00005ca8 ++#define FTQ_HOST_COAL_WRITE_PEEK 0x00005cac ++#define FTQ_MAC_TX_CTL 0x00005cb0 ++#define FTQ_MAC_TX_FULL_CNT 0x00005cb4 ++#define FTQ_MAC_TX_FIFO_ENQDEQ 0x00005cb8 ++#define FTQ_MAC_TX_WRITE_PEEK 0x00005cbc ++#define FTQ_MB_FREE_CTL 0x00005cc0 ++#define FTQ_MB_FREE_FULL_CNT 0x00005cc4 ++#define FTQ_MB_FREE_FIFO_ENQDEQ 0x00005cc8 ++#define FTQ_MB_FREE_WRITE_PEEK 0x00005ccc ++#define FTQ_RCVBD_COMP_CTL 0x00005cd0 ++#define FTQ_RCVBD_COMP_FULL_CNT 0x00005cd4 ++#define FTQ_RCVBD_COMP_FIFO_ENQDEQ 0x00005cd8 ++#define FTQ_RCVBD_COMP_WRITE_PEEK 0x00005cdc ++#define FTQ_RCVLST_PLMT_CTL 0x00005ce0 ++#define FTQ_RCVLST_PLMT_FULL_CNT 0x00005ce4 ++#define FTQ_RCVLST_PLMT_FIFO_ENQDEQ 0x00005ce8 ++#define FTQ_RCVLST_PLMT_WRITE_PEEK 0x00005cec ++#define FTQ_RCVDATA_INI_CTL 0x00005cf0 ++#define FTQ_RCVDATA_INI_FULL_CNT 0x00005cf4 ++#define FTQ_RCVDATA_INI_FIFO_ENQDEQ 0x00005cf8 ++#define FTQ_RCVDATA_INI_WRITE_PEEK 0x00005cfc ++#define FTQ_RCVDATA_COMP_CTL 0x00005d00 ++#define FTQ_RCVDATA_COMP_FULL_CNT 0x00005d04 ++#define FTQ_RCVDATA_COMP_FIFO_ENQDEQ 0x00005d08 ++#define FTQ_RCVDATA_COMP_WRITE_PEEK 0x00005d0c ++#define FTQ_SWTYPE2_CTL 0x00005d10 ++#define FTQ_SWTYPE2_FULL_CNT 0x00005d14 ++#define FTQ_SWTYPE2_FIFO_ENQDEQ 0x00005d18 ++#define FTQ_SWTYPE2_WRITE_PEEK 0x00005d1c ++/* 0x5d20 --> 0x6000 unused */ ++ ++/* Message signaled interrupt registers */ ++#define MSGINT_MODE 0x00006000 ++#define MSGINT_MODE_RESET 0x00000001 ++#define MSGINT_MODE_ENABLE 0x00000002 ++#define MSGINT_STATUS 0x00006004 ++#define MSGINT_FIFO 0x00006008 ++/* 0x600c --> 0x6400 unused */ ++ ++/* DMA completion registers */ ++#define DMAC_MODE 0x00006400 ++#define DMAC_MODE_RESET 0x00000001 ++#define DMAC_MODE_ENABLE 0x00000002 ++/* 0x6404 --> 0x6800 unused */ ++ ++/* GRC registers */ ++#define GRC_MODE 0x00006800 ++#define GRC_MODE_UPD_ON_COAL 0x00000001 ++#define GRC_MODE_BSWAP_NONFRM_DATA 0x00000002 ++#define GRC_MODE_WSWAP_NONFRM_DATA 0x00000004 ++#define GRC_MODE_BSWAP_DATA 0x00000010 ++#define GRC_MODE_WSWAP_DATA 0x00000020 ++#define GRC_MODE_SPLITHDR 0x00000100 ++#define GRC_MODE_NOFRM_CRACKING 0x00000200 ++#define GRC_MODE_INCL_CRC 0x00000400 ++#define GRC_MODE_ALLOW_BAD_FRMS 0x00000800 ++#define GRC_MODE_NOIRQ_ON_SENDS 0x00002000 ++#define GRC_MODE_NOIRQ_ON_RCV 0x00004000 ++#define GRC_MODE_FORCE_PCI32BIT 0x00008000 ++#define GRC_MODE_HOST_STACKUP 0x00010000 ++#define GRC_MODE_HOST_SENDBDS 0x00020000 ++#define GRC_MODE_NO_TX_PHDR_CSUM 0x00100000 ++#define GRC_MODE_NO_RX_PHDR_CSUM 0x00800000 ++#define GRC_MODE_IRQ_ON_TX_CPU_ATTN 0x01000000 ++#define GRC_MODE_IRQ_ON_RX_CPU_ATTN 0x02000000 ++#define GRC_MODE_IRQ_ON_MAC_ATTN 0x04000000 ++#define GRC_MODE_IRQ_ON_DMA_ATTN 0x08000000 ++#define GRC_MODE_IRQ_ON_FLOW_ATTN 0x10000000 ++#define GRC_MODE_4X_NIC_SEND_RINGS 0x20000000 ++#define GRC_MODE_MCAST_FRM_ENABLE 0x40000000 ++#define GRC_MISC_CFG 0x00006804 ++#define GRC_MISC_CFG_CORECLK_RESET 0x00000001 ++#define GRC_MISC_CFG_PRESCALAR_MASK 0x000000fe ++#define GRC_MISC_CFG_PRESCALAR_SHIFT 1 ++#define GRC_MISC_CFG_BOARD_ID_MASK 0x0001e000 ++#define GRC_MISC_CFG_BOARD_ID_5700 0x0001e000 ++#define GRC_MISC_CFG_BOARD_ID_5701 0x00000000 ++#define GRC_MISC_CFG_BOARD_ID_5702FE 0x00004000 ++#define GRC_MISC_CFG_BOARD_ID_5703 0x00000000 ++#define GRC_MISC_CFG_BOARD_ID_5703S 0x00002000 ++#define GRC_MISC_CFG_BOARD_ID_5704 0x00000000 ++#define GRC_MISC_CFG_BOARD_ID_5704CIOBE 0x00004000 ++#define GRC_MISC_CFG_BOARD_ID_5704_A2 0x00008000 ++#define GRC_MISC_CFG_BOARD_ID_5788 0x00010000 ++#define GRC_MISC_CFG_BOARD_ID_5788M 0x00018000 ++#define GRC_MISC_CFG_BOARD_ID_AC91002A1 0x00018000 ++#define GRC_MISC_CFG_KEEP_GPHY_POWER 0x04000000 ++#define GRC_LOCAL_CTRL 0x00006808 ++#define GRC_LCLCTRL_INT_ACTIVE 0x00000001 ++#define GRC_LCLCTRL_CLEARINT 0x00000002 ++#define GRC_LCLCTRL_SETINT 0x00000004 ++#define GRC_LCLCTRL_INT_ON_ATTN 0x00000008 ++#define GRC_LCLCTRL_GPIO_INPUT0 0x00000100 ++#define GRC_LCLCTRL_GPIO_INPUT1 0x00000200 ++#define GRC_LCLCTRL_GPIO_INPUT2 0x00000400 ++#define GRC_LCLCTRL_GPIO_OE0 0x00000800 ++#define GRC_LCLCTRL_GPIO_OE1 0x00001000 ++#define GRC_LCLCTRL_GPIO_OE2 0x00002000 ++#define GRC_LCLCTRL_GPIO_OUTPUT0 0x00004000 ++#define GRC_LCLCTRL_GPIO_OUTPUT1 0x00008000 ++#define GRC_LCLCTRL_GPIO_OUTPUT2 0x00010000 ++#define GRC_LCLCTRL_EXTMEM_ENABLE 0x00020000 ++#define GRC_LCLCTRL_MEMSZ_MASK 0x001c0000 ++#define GRC_LCLCTRL_MEMSZ_256K 0x00000000 ++#define GRC_LCLCTRL_MEMSZ_512K 0x00040000 ++#define GRC_LCLCTRL_MEMSZ_1M 0x00080000 ++#define GRC_LCLCTRL_MEMSZ_2M 0x000c0000 ++#define GRC_LCLCTRL_MEMSZ_4M 0x00100000 ++#define GRC_LCLCTRL_MEMSZ_8M 0x00140000 ++#define GRC_LCLCTRL_MEMSZ_16M 0x00180000 ++#define GRC_LCLCTRL_BANK_SELECT 0x00200000 ++#define GRC_LCLCTRL_SSRAM_TYPE 0x00400000 ++#define GRC_LCLCTRL_AUTO_SEEPROM 0x01000000 ++#define GRC_TIMER 0x0000680c ++#define GRC_RX_CPU_EVENT 0x00006810 ++#define GRC_RX_TIMER_REF 0x00006814 ++#define GRC_RX_CPU_SEM 0x00006818 ++#define GRC_REMOTE_RX_CPU_ATTN 0x0000681c ++#define GRC_TX_CPU_EVENT 0x00006820 ++#define GRC_TX_TIMER_REF 0x00006824 ++#define GRC_TX_CPU_SEM 0x00006828 ++#define GRC_REMOTE_TX_CPU_ATTN 0x0000682c ++#define GRC_MEM_POWER_UP 0x00006830 /* 64-bit */ ++#define GRC_EEPROM_ADDR 0x00006838 ++#define EEPROM_ADDR_WRITE 0x00000000 ++#define EEPROM_ADDR_READ 0x80000000 ++#define EEPROM_ADDR_COMPLETE 0x40000000 ++#define EEPROM_ADDR_FSM_RESET 0x20000000 ++#define EEPROM_ADDR_DEVID_MASK 0x1c000000 ++#define EEPROM_ADDR_DEVID_SHIFT 26 ++#define EEPROM_ADDR_START 0x02000000 ++#define EEPROM_ADDR_CLKPERD_SHIFT 16 ++#define EEPROM_ADDR_ADDR_MASK 0x0000ffff ++#define EEPROM_ADDR_ADDR_SHIFT 0 ++#define EEPROM_DEFAULT_CLOCK_PERIOD 0x60 ++#define EEPROM_CHIP_SIZE (64 * 1024) ++#define GRC_EEPROM_DATA 0x0000683c ++#define GRC_EEPROM_CTRL 0x00006840 ++#define GRC_MDI_CTRL 0x00006844 ++#define GRC_SEEPROM_DELAY 0x00006848 ++/* 0x684c --> 0x6c00 unused */ ++ ++/* 0x6c00 --> 0x7000 unused */ ++ ++/* NVRAM Control registers */ ++#define NVRAM_CMD 0x00007000 ++#define NVRAM_CMD_RESET 0x00000001 ++#define NVRAM_CMD_DONE 0x00000008 ++#define NVRAM_CMD_GO 0x00000010 ++#define NVRAM_CMD_WR 0x00000020 ++#define NVRAM_CMD_RD 0x00000000 ++#define NVRAM_CMD_ERASE 0x00000040 ++#define NVRAM_CMD_FIRST 0x00000080 ++#define NVRAM_CMD_LAST 0x00000100 ++#define NVRAM_STAT 0x00007004 ++#define NVRAM_WRDATA 0x00007008 ++#define NVRAM_ADDR 0x0000700c ++#define NVRAM_ADDR_MSK 0x00ffffff ++#define NVRAM_RDDATA 0x00007010 ++#define NVRAM_CFG1 0x00007014 ++#define NVRAM_CFG1_FLASHIF_ENAB 0x00000001 ++#define NVRAM_CFG1_BUFFERED_MODE 0x00000002 ++#define NVRAM_CFG1_PASS_THRU 0x00000004 ++#define NVRAM_CFG1_BIT_BANG 0x00000008 ++#define NVRAM_CFG1_COMPAT_BYPASS 0x80000000 ++#define NVRAM_CFG2 0x00007018 ++#define NVRAM_CFG3 0x0000701c ++#define NVRAM_SWARB 0x00007020 ++#define SWARB_REQ_SET0 0x00000001 ++#define SWARB_REQ_SET1 0x00000002 ++#define SWARB_REQ_SET2 0x00000004 ++#define SWARB_REQ_SET3 0x00000008 ++#define SWARB_REQ_CLR0 0x00000010 ++#define SWARB_REQ_CLR1 0x00000020 ++#define SWARB_REQ_CLR2 0x00000040 ++#define SWARB_REQ_CLR3 0x00000080 ++#define SWARB_GNT0 0x00000100 ++#define SWARB_GNT1 0x00000200 ++#define SWARB_GNT2 0x00000400 ++#define SWARB_GNT3 0x00000800 ++#define SWARB_REQ0 0x00001000 ++#define SWARB_REQ1 0x00002000 ++#define SWARB_REQ2 0x00004000 ++#define SWARB_REQ3 0x00008000 ++#define NVRAM_BUFFERED_PAGE_SIZE 264 ++#define NVRAM_BUFFERED_PAGE_POS 9 ++/* 0x7024 --> 0x7400 unused */ ++ ++/* 0x7400 --> 0x8000 unused */ ++ ++/* 32K Window into NIC internal memory */ ++#define NIC_SRAM_WIN_BASE 0x00008000 ++ ++/* Offsets into first 32k of NIC internal memory. */ ++#define NIC_SRAM_PAGE_ZERO 0x00000000 ++#define NIC_SRAM_SEND_RCB 0x00000100 /* 16 * TG3_BDINFO_... */ ++#define NIC_SRAM_RCV_RET_RCB 0x00000200 /* 16 * TG3_BDINFO_... */ ++#define NIC_SRAM_STATS_BLK 0x00000300 ++#define NIC_SRAM_STATUS_BLK 0x00000b00 ++ ++#define NIC_SRAM_FIRMWARE_MBOX 0x00000b50 ++#define NIC_SRAM_FIRMWARE_MBOX_MAGIC1 0x4B657654 ++#define NIC_SRAM_FIRMWARE_MBOX_MAGIC2 0x4861764b /* !dma on linkchg */ ++ ++#define NIC_SRAM_DATA_SIG 0x00000b54 ++#define NIC_SRAM_DATA_SIG_MAGIC 0x4b657654 /* ascii for 'KevT' */ ++ ++#define NIC_SRAM_DATA_CFG 0x00000b58 ++#define NIC_SRAM_DATA_CFG_LED_MODE_MASK 0x0000000c ++#define NIC_SRAM_DATA_CFG_LED_MODE_UNKNOWN 0x00000000 ++#define NIC_SRAM_DATA_CFG_LED_TRIPLE_SPD 0x00000004 ++#define NIC_SRAM_DATA_CFG_LED_OPEN_DRAIN 0x00000004 ++#define NIC_SRAM_DATA_CFG_LED_LINK_SPD 0x00000008 ++#define NIC_SRAM_DATA_CFG_LED_OUTPUT 0x00000008 ++#define NIC_SRAM_DATA_CFG_PHY_TYPE_MASK 0x00000030 ++#define NIC_SRAM_DATA_CFG_PHY_TYPE_UNKNOWN 0x00000000 ++#define NIC_SRAM_DATA_CFG_PHY_TYPE_COPPER 0x00000010 ++#define NIC_SRAM_DATA_CFG_PHY_TYPE_FIBER 0x00000020 ++#define NIC_SRAM_DATA_CFG_WOL_ENABLE 0x00000040 ++#define NIC_SRAM_DATA_CFG_ASF_ENABLE 0x00000080 ++#define NIC_SRAM_DATA_CFG_EEPROM_WP 0x00000100 ++#define NIC_SRAM_DATA_CFG_MINI_PCI 0x00001000 ++#define NIC_SRAM_DATA_CFG_FIBER_WOL 0x00004000 ++ ++#define NIC_SRAM_DATA_PHY_ID 0x00000b74 ++#define NIC_SRAM_DATA_PHY_ID1_MASK 0xffff0000 ++#define NIC_SRAM_DATA_PHY_ID2_MASK 0x0000ffff ++ ++#define NIC_SRAM_FW_CMD_MBOX 0x00000b78 ++#define FWCMD_NICDRV_ALIVE 0x00000001 ++#define FWCMD_NICDRV_PAUSE_FW 0x00000002 ++#define FWCMD_NICDRV_IPV4ADDR_CHG 0x00000003 ++#define FWCMD_NICDRV_IPV6ADDR_CHG 0x00000004 ++#define FWCMD_NICDRV_FIX_DMAR 0x00000005 ++#define FWCMD_NICDRV_FIX_DMAW 0x00000006 ++#define NIC_SRAM_FW_CMD_LEN_MBOX 0x00000b7c ++#define NIC_SRAM_FW_CMD_DATA_MBOX 0x00000b80 ++#define NIC_SRAM_FW_ASF_STATUS_MBOX 0x00000c00 ++#define NIC_SRAM_FW_DRV_STATE_MBOX 0x00000c04 ++#define DRV_STATE_START 0x00000001 ++#define DRV_STATE_UNLOAD 0x00000002 ++#define DRV_STATE_WOL 0x00000003 ++#define DRV_STATE_SUSPEND 0x00000004 ++ ++#define NIC_SRAM_FW_RESET_TYPE_MBOX 0x00000c08 ++ ++#define NIC_SRAM_MAC_ADDR_HIGH_MBOX 0x00000c14 ++#define NIC_SRAM_MAC_ADDR_LOW_MBOX 0x00000c18 ++ ++#define NIC_SRAM_RX_MINI_BUFFER_DESC 0x00001000 ++ ++#define NIC_SRAM_DMA_DESC_POOL_BASE 0x00002000 ++#define NIC_SRAM_DMA_DESC_POOL_SIZE 0x00002000 ++#define NIC_SRAM_TX_BUFFER_DESC 0x00004000 /* 512 entries */ ++#define NIC_SRAM_RX_BUFFER_DESC 0x00006000 /* 256 entries */ ++#define NIC_SRAM_RX_JUMBO_BUFFER_DESC 0x00007000 /* 256 entries */ ++#define NIC_SRAM_MBUF_POOL_BASE 0x00008000 ++#define NIC_SRAM_MBUF_POOL_SIZE96 0x00018000 ++#define NIC_SRAM_MBUF_POOL_SIZE64 0x00010000 ++#define NIC_SRAM_MBUF_POOL_BASE5705 0x00010000 ++#define NIC_SRAM_MBUF_POOL_SIZE5705 0x0000e000 ++ ++/* Currently this is fixed. */ ++#define PHY_ADDR 0x01 ++ ++/* Tigon3 specific PHY MII registers. */ ++#define TG3_BMCR_SPEED1000 0x0040 ++ ++#define MII_TG3_CTRL 0x09 /* 1000-baseT control register */ ++#define MII_TG3_CTRL_ADV_1000_HALF 0x0100 ++#define MII_TG3_CTRL_ADV_1000_FULL 0x0200 ++#define MII_TG3_CTRL_AS_MASTER 0x0800 ++#define MII_TG3_CTRL_ENABLE_AS_MASTER 0x1000 ++ ++#define MII_TG3_EXT_CTRL 0x10 /* Extended control register */ ++#define MII_TG3_EXT_CTRL_LNK3_LED_MODE 0x0002 ++#define MII_TG3_EXT_CTRL_TBI 0x8000 ++ ++#define MII_TG3_EXT_STAT 0x11 /* Extended status register */ ++#define MII_TG3_EXT_STAT_LPASS 0x0100 ++ ++#define MII_TG3_DSP_RW_PORT 0x15 /* DSP coefficient read/write port */ ++ ++#define MII_TG3_DSP_ADDRESS 0x17 /* DSP address register */ ++ ++#define MII_TG3_AUX_CTRL 0x18 /* auxilliary control register */ ++ ++#define MII_TG3_AUX_STAT 0x19 /* auxilliary status register */ ++#define MII_TG3_AUX_STAT_LPASS 0x0004 ++#define MII_TG3_AUX_STAT_SPDMASK 0x0700 ++#define MII_TG3_AUX_STAT_10HALF 0x0100 ++#define MII_TG3_AUX_STAT_10FULL 0x0200 ++#define MII_TG3_AUX_STAT_100HALF 0x0300 ++#define MII_TG3_AUX_STAT_100_4 0x0400 ++#define MII_TG3_AUX_STAT_100FULL 0x0500 ++#define MII_TG3_AUX_STAT_1000HALF 0x0600 ++#define MII_TG3_AUX_STAT_1000FULL 0x0700 ++ ++#define MII_TG3_ISTAT 0x1a /* IRQ status register */ ++#define MII_TG3_IMASK 0x1b /* IRQ mask register */ ++ ++/* ISTAT/IMASK event bits */ ++#define MII_TG3_INT_LINKCHG 0x0002 ++#define MII_TG3_INT_SPEEDCHG 0x0004 ++#define MII_TG3_INT_DUPLEXCHG 0x0008 ++#define MII_TG3_INT_ANEG_PAGE_RX 0x0400 ++ ++/* XXX Add this to mii.h */ ++#ifndef ADVERTISE_PAUSE ++#define ADVERTISE_PAUSE_CAP 0x0400 ++#endif ++#ifndef ADVERTISE_PAUSE_ASYM ++#define ADVERTISE_PAUSE_ASYM 0x0800 ++#endif ++#ifndef LPA_PAUSE ++#define LPA_PAUSE_CAP 0x0400 ++#endif ++#ifndef LPA_PAUSE_ASYM ++#define LPA_PAUSE_ASYM 0x0800 ++#endif ++ ++/* There are two ways to manage the TX descriptors on the tigon3. ++ * Either the descriptors are in host DMA'able memory, or they ++ * exist only in the cards on-chip SRAM. All 16 send bds are under ++ * the same mode, they may not be configured individually. ++ * ++ * The mode we use is controlled by TG3_FLAG_HOST_TXDS in tp->tg3_flags. ++ * ++ * To use host memory TX descriptors: ++ * 1) Set GRC_MODE_HOST_SENDBDS in GRC_MODE register. ++ * Make sure GRC_MODE_4X_NIC_SEND_RINGS is clear. ++ * 2) Allocate DMA'able memory. ++ * 3) In NIC_SRAM_SEND_RCB (of desired index) of on-chip SRAM: ++ * a) Set TG3_BDINFO_HOST_ADDR to DMA address of memory ++ * obtained in step 2 ++ * b) Set TG3_BDINFO_NIC_ADDR to NIC_SRAM_TX_BUFFER_DESC. ++ * c) Set len field of TG3_BDINFO_MAXLEN_FLAGS to number ++ * of TX descriptors. Leave flags field clear. ++ * 4) Access TX descriptors via host memory. The chip ++ * will refetch into local SRAM as needed when producer ++ * index mailboxes are updated. ++ * ++ * To use on-chip TX descriptors: ++ * 1) Set GRC_MODE_4X_NIC_SEND_RINGS in GRC_MODE register. ++ * Make sure GRC_MODE_HOST_SENDBDS is clear. ++ * 2) In NIC_SRAM_SEND_RCB (of desired index) of on-chip SRAM: ++ * a) Set TG3_BDINFO_HOST_ADDR to zero. ++ * b) Set TG3_BDINFO_NIC_ADDR to NIC_SRAM_TX_BUFFER_DESC ++ * c) TG3_BDINFO_MAXLEN_FLAGS is don't care. ++ * 3) Access TX descriptors directly in on-chip SRAM ++ * using normal {read,write}l(). (and not using ++ * pointer dereferencing of ioremap()'d memory like ++ * the broken Broadcom driver does) ++ * ++ * Note that BDINFO_FLAGS_DISABLED should be set in the flags field of ++ * TG3_BDINFO_MAXLEN_FLAGS of all unused SEND_RCB indices. ++ */ ++struct tg3_tx_buffer_desc { ++ uint32_t addr_hi; ++ uint32_t addr_lo; ++ ++ uint32_t len_flags; ++#define TXD_FLAG_TCPUDP_CSUM 0x0001 ++#define TXD_FLAG_IP_CSUM 0x0002 ++#define TXD_FLAG_END 0x0004 ++#define TXD_FLAG_IP_FRAG 0x0008 ++#define TXD_FLAG_IP_FRAG_END 0x0010 ++#define TXD_FLAG_VLAN 0x0040 ++#define TXD_FLAG_COAL_NOW 0x0080 ++#define TXD_FLAG_CPU_PRE_DMA 0x0100 ++#define TXD_FLAG_CPU_POST_DMA 0x0200 ++#define TXD_FLAG_ADD_SRC_ADDR 0x1000 ++#define TXD_FLAG_CHOOSE_SRC_ADDR 0x6000 ++#define TXD_FLAG_NO_CRC 0x8000 ++#define TXD_LEN_SHIFT 16 ++ ++ uint32_t vlan_tag; ++#define TXD_VLAN_TAG_SHIFT 0 ++#define TXD_MSS_SHIFT 16 ++}; ++ ++#define TXD_ADDR 0x00UL /* 64-bit */ ++#define TXD_LEN_FLAGS 0x08UL /* 32-bit (upper 16-bits are len) */ ++#define TXD_VLAN_TAG 0x0cUL /* 32-bit (upper 16-bits are tag) */ ++#define TXD_SIZE 0x10UL ++ ++struct tg3_rx_buffer_desc { ++ uint32_t addr_hi; ++ uint32_t addr_lo; ++ ++ uint32_t idx_len; ++#define RXD_IDX_MASK 0xffff0000 ++#define RXD_IDX_SHIFT 16 ++#define RXD_LEN_MASK 0x0000ffff ++#define RXD_LEN_SHIFT 0 ++ ++ uint32_t type_flags; ++#define RXD_TYPE_SHIFT 16 ++#define RXD_FLAGS_SHIFT 0 ++ ++#define RXD_FLAG_END 0x0004 ++#define RXD_FLAG_MINI 0x0800 ++#define RXD_FLAG_JUMBO 0x0020 ++#define RXD_FLAG_VLAN 0x0040 ++#define RXD_FLAG_ERROR 0x0400 ++#define RXD_FLAG_IP_CSUM 0x1000 ++#define RXD_FLAG_TCPUDP_CSUM 0x2000 ++#define RXD_FLAG_IS_TCP 0x4000 ++ ++ uint32_t ip_tcp_csum; ++#define RXD_IPCSUM_MASK 0xffff0000 ++#define RXD_IPCSUM_SHIFT 16 ++#define RXD_TCPCSUM_MASK 0x0000ffff ++#define RXD_TCPCSUM_SHIFT 0 ++ ++ uint32_t err_vlan; ++ ++#define RXD_VLAN_MASK 0x0000ffff ++ ++#define RXD_ERR_BAD_CRC 0x00010000 ++#define RXD_ERR_COLLISION 0x00020000 ++#define RXD_ERR_LINK_LOST 0x00040000 ++#define RXD_ERR_PHY_DECODE 0x00080000 ++#define RXD_ERR_ODD_NIBBLE_RCVD_MII 0x00100000 ++#define RXD_ERR_MAC_ABRT 0x00200000 ++#define RXD_ERR_TOO_SMALL 0x00400000 ++#define RXD_ERR_NO_RESOURCES 0x00800000 ++#define RXD_ERR_HUGE_FRAME 0x01000000 ++#define RXD_ERR_MASK 0xffff0000 ++ ++ uint32_t reserved; ++ uint32_t opaque; ++#define RXD_OPAQUE_INDEX_MASK 0x0000ffff ++#define RXD_OPAQUE_INDEX_SHIFT 0 ++#define RXD_OPAQUE_RING_STD 0x00010000 ++#define RXD_OPAQUE_RING_JUMBO 0x00020000 ++#define RXD_OPAQUE_RING_MINI 0x00040000 ++#define RXD_OPAQUE_RING_MASK 0x00070000 ++}; ++ ++struct tg3_ext_rx_buffer_desc { ++ struct { ++ uint32_t addr_hi; ++ uint32_t addr_lo; ++ } addrlist[3]; ++ uint32_t len2_len1; ++ uint32_t resv_len3; ++ struct tg3_rx_buffer_desc std; ++}; ++ ++/* We only use this when testing out the DMA engine ++ * at probe time. This is the internal format of buffer ++ * descriptors used by the chip at NIC_SRAM_DMA_DESCS. ++ */ ++struct tg3_internal_buffer_desc { ++ uint32_t addr_hi; ++ uint32_t addr_lo; ++ uint32_t nic_mbuf; ++ /* XXX FIX THIS */ ++#if __BYTE_ORDER == __BIG_ENDIAN ++ uint16_t cqid_sqid; ++ uint16_t len; ++#else ++ uint16_t len; ++ uint16_t cqid_sqid; ++#endif ++ uint32_t flags; ++ uint32_t __cookie1; ++ uint32_t __cookie2; ++ uint32_t __cookie3; ++}; ++ ++#define TG3_HW_STATUS_SIZE 0x50 ++struct tg3_hw_status { ++ uint32_t status; ++#define SD_STATUS_UPDATED 0x00000001 ++#define SD_STATUS_LINK_CHG 0x00000002 ++#define SD_STATUS_ERROR 0x00000004 ++ ++ uint32_t status_tag; ++ ++#if __BYTE_ORDER == __BIG_ENDIAN ++ uint16_t rx_consumer; ++ uint16_t rx_jumbo_consumer; ++#else ++ uint16_t rx_jumbo_consumer; ++ uint16_t rx_consumer; ++#endif ++ ++#if __BYTE_ORDER == __BIG_ENDIAN ++ uint16_t reserved; ++ uint16_t rx_mini_consumer; ++#else ++ uint16_t rx_mini_consumer; ++ uint16_t reserved; ++#endif ++ struct { ++#if __BYTE_ORDER == __BIG_ENDIAN ++ uint16_t tx_consumer; ++ uint16_t rx_producer; ++#else ++ uint16_t rx_producer; ++ uint16_t tx_consumer; ++#endif ++ } idx[16]; ++}; ++ ++typedef struct { ++ uint32_t high, low; ++} tg3_stat64_t; ++ ++struct tg3_hw_stats { ++ uint8_t __reserved0[0x400-0x300]; ++ ++ /* Statistics maintained by Receive MAC. */ ++ tg3_stat64_t rx_octets; ++ uint64_t __reserved1; ++ tg3_stat64_t rx_fragments; ++ tg3_stat64_t rx_ucast_packets; ++ tg3_stat64_t rx_mcast_packets; ++ tg3_stat64_t rx_bcast_packets; ++ tg3_stat64_t rx_fcs_errors; ++ tg3_stat64_t rx_align_errors; ++ tg3_stat64_t rx_xon_pause_rcvd; ++ tg3_stat64_t rx_xoff_pause_rcvd; ++ tg3_stat64_t rx_mac_ctrl_rcvd; ++ tg3_stat64_t rx_xoff_entered; ++ tg3_stat64_t rx_frame_too_long_errors; ++ tg3_stat64_t rx_jabbers; ++ tg3_stat64_t rx_undersize_packets; ++ tg3_stat64_t rx_in_length_errors; ++ tg3_stat64_t rx_out_length_errors; ++ tg3_stat64_t rx_64_or_less_octet_packets; ++ tg3_stat64_t rx_65_to_127_octet_packets; ++ tg3_stat64_t rx_128_to_255_octet_packets; ++ tg3_stat64_t rx_256_to_511_octet_packets; ++ tg3_stat64_t rx_512_to_1023_octet_packets; ++ tg3_stat64_t rx_1024_to_1522_octet_packets; ++ tg3_stat64_t rx_1523_to_2047_octet_packets; ++ tg3_stat64_t rx_2048_to_4095_octet_packets; ++ tg3_stat64_t rx_4096_to_8191_octet_packets; ++ tg3_stat64_t rx_8192_to_9022_octet_packets; ++ ++ uint64_t __unused0[37]; ++ ++ /* Statistics maintained by Transmit MAC. */ ++ tg3_stat64_t tx_octets; ++ uint64_t __reserved2; ++ tg3_stat64_t tx_collisions; ++ tg3_stat64_t tx_xon_sent; ++ tg3_stat64_t tx_xoff_sent; ++ tg3_stat64_t tx_flow_control; ++ tg3_stat64_t tx_mac_errors; ++ tg3_stat64_t tx_single_collisions; ++ tg3_stat64_t tx_mult_collisions; ++ tg3_stat64_t tx_deferred; ++ uint64_t __reserved3; ++ tg3_stat64_t tx_excessive_collisions; ++ tg3_stat64_t tx_late_collisions; ++ tg3_stat64_t tx_collide_2times; ++ tg3_stat64_t tx_collide_3times; ++ tg3_stat64_t tx_collide_4times; ++ tg3_stat64_t tx_collide_5times; ++ tg3_stat64_t tx_collide_6times; ++ tg3_stat64_t tx_collide_7times; ++ tg3_stat64_t tx_collide_8times; ++ tg3_stat64_t tx_collide_9times; ++ tg3_stat64_t tx_collide_10times; ++ tg3_stat64_t tx_collide_11times; ++ tg3_stat64_t tx_collide_12times; ++ tg3_stat64_t tx_collide_13times; ++ tg3_stat64_t tx_collide_14times; ++ tg3_stat64_t tx_collide_15times; ++ tg3_stat64_t tx_ucast_packets; ++ tg3_stat64_t tx_mcast_packets; ++ tg3_stat64_t tx_bcast_packets; ++ tg3_stat64_t tx_carrier_sense_errors; ++ tg3_stat64_t tx_discards; ++ tg3_stat64_t tx_errors; ++ ++ uint64_t __unused1[31]; ++ ++ /* Statistics maintained by Receive List Placement. */ ++ tg3_stat64_t COS_rx_packets[16]; ++ tg3_stat64_t COS_rx_filter_dropped; ++ tg3_stat64_t dma_writeq_full; ++ tg3_stat64_t dma_write_prioq_full; ++ tg3_stat64_t rxbds_empty; ++ tg3_stat64_t rx_discards; ++ tg3_stat64_t rx_errors; ++ tg3_stat64_t rx_threshold_hit; ++ ++ uint64_t __unused2[9]; ++ ++ /* Statistics maintained by Send Data Initiator. */ ++ tg3_stat64_t COS_out_packets[16]; ++ tg3_stat64_t dma_readq_full; ++ tg3_stat64_t dma_read_prioq_full; ++ tg3_stat64_t tx_comp_queue_full; ++ ++ /* Statistics maintained by Host Coalescing. */ ++ tg3_stat64_t ring_set_send_prod_index; ++ tg3_stat64_t ring_status_update; ++ tg3_stat64_t nic_irqs; ++ tg3_stat64_t nic_avoided_irqs; ++ tg3_stat64_t nic_tx_threshold_hit; ++ ++ uint8_t __reserved4[0xb00-0x9c0]; ++}; ++ ++enum phy_led_mode { ++ led_mode_auto, ++ led_mode_three_link, ++ led_mode_link10 ++}; ++ ++#if 0 ++/* 'mapping' is superfluous as the chip does not write into ++ * the tx/rx post rings so we could just fetch it from there. ++ * But the cache behavior is better how we are doing it now. ++ */ ++struct ring_info { ++ struct sk_buff *skb; ++ DECLARE_PCI_UNMAP_ADDR(mapping) ++}; ++ ++struct tx_ring_info { ++ struct sk_buff *skb; ++ DECLARE_PCI_UNMAP_ADDR(mapping) ++ uint32_t prev_vlan_tag; ++}; ++#endif ++ ++struct tg3_config_info { ++ uint32_t flags; ++}; ++ ++struct tg3_link_config { ++ /* Describes what we're trying to get. */ ++ uint32_t advertising; ++#if 0 ++ uint16_t speed; ++ uint8_t duplex; ++ uint8_t autoneg; ++#define SPEED_INVALID 0xffff ++#define DUPLEX_INVALID 0xff ++#define AUTONEG_INVALID 0xff ++#endif ++ ++ /* Describes what we actually have. */ ++ uint8_t active_speed; ++ uint8_t active_duplex; ++ ++ /* When we go in and out of low power mode we need ++ * to swap with this state. ++ */ ++#if 0 ++ int phy_is_low_power; ++ uint16_t orig_speed; ++ uint8_t orig_duplex; ++ uint8_t orig_autoneg; ++#endif ++}; ++ ++struct tg3_bufmgr_config { ++ uint32_t mbuf_read_dma_low_water; ++ uint32_t mbuf_mac_rx_low_water; ++ uint32_t mbuf_high_water; ++ ++ uint32_t mbuf_read_dma_low_water_jumbo; ++ uint32_t mbuf_mac_rx_low_water_jumbo; ++ uint32_t mbuf_high_water_jumbo; ++ ++ uint32_t dma_low_water; ++ uint32_t dma_high_water; ++}; ++ ++struct tg3 { ++#if 0 ++ /* SMP locking strategy: ++ * ++ * lock: Held during all operations except TX packet ++ * processing. ++ * ++ * tx_lock: Held during tg3_start_xmit{,_4gbug} and tg3_tx ++ * ++ * If you want to shut up all asynchronous processing you must ++ * acquire both locks, 'lock' taken before 'tx_lock'. IRQs must ++ * be disabled to take 'lock' but only softirq disabling is ++ * necessary for acquisition of 'tx_lock'. ++ */ ++ spinlock_t lock; ++ spinlock_t tx_lock; ++#endif ++ ++ uint32_t tx_prod; ++#if 0 ++ uint32_t tx_cons; ++#endif ++ uint32_t rx_rcb_ptr; ++ uint32_t rx_std_ptr; ++#if 0 ++ uint32_t rx_jumbo_ptr; ++ spinlock_t indirect_lock; ++ ++ struct net_device_stats net_stats; ++ struct net_device_stats net_stats_prev; ++#endif ++ unsigned long phy_crc_errors; ++ ++#if 0 ++ uint32_t rx_offset; ++#endif ++ uint32_t tg3_flags; ++#if 0 ++#define TG3_FLAG_HOST_TXDS 0x00000001 ++#endif ++#define TG3_FLAG_TXD_MBOX_HWBUG 0x00000002 ++#define TG3_FLAG_RX_CHECKSUMS 0x00000004 ++#define TG3_FLAG_USE_LINKCHG_REG 0x00000008 ++#define TG3_FLAG_USE_MI_INTERRUPT 0x00000010 ++#define TG3_FLAG_ENABLE_ASF 0x00000020 ++#define TG3_FLAG_5701_REG_WRITE_BUG 0x00000040 ++#define TG3_FLAG_POLL_SERDES 0x00000080 ++#define TG3_FLAG_MBOX_WRITE_REORDER 0x00000100 ++#define TG3_FLAG_PCIX_TARGET_HWBUG 0x00000200 ++#define TG3_FLAG_WOL_SPEED_100MB 0x00000400 ++#define TG3_FLAG_WOL_ENABLE 0x00000800 ++#define TG3_FLAG_EEPROM_WRITE_PROT 0x00001000 ++#define TG3_FLAG_NVRAM 0x00002000 ++#define TG3_FLAG_NVRAM_BUFFERED 0x00004000 ++#define TG3_FLAG_RX_PAUSE 0x00008000 ++#define TG3_FLAG_TX_PAUSE 0x00010000 ++#define TG3_FLAG_PCIX_MODE 0x00020000 ++#define TG3_FLAG_PCI_HIGH_SPEED 0x00040000 ++#define TG3_FLAG_PCI_32BIT 0x00080000 ++#define TG3_FLAG_NO_TX_PSEUDO_CSUM 0x00100000 ++#define TG3_FLAG_NO_RX_PSEUDO_CSUM 0x00200000 ++#define TG3_FLAG_SERDES_WOL_CAP 0x00400000 ++#define TG3_FLAG_JUMBO_ENABLE 0x00800000 ++#define TG3_FLAG_10_100_ONLY 0x01000000 ++#define TG3_FLAG_PAUSE_AUTONEG 0x02000000 ++#define TG3_FLAG_PAUSE_RX 0x04000000 ++#define TG3_FLAG_PAUSE_TX 0x08000000 ++#define TG3_FLAG_BROKEN_CHECKSUMS 0x10000000 ++#define TG3_FLAG_GOT_SERDES_FLOWCTL 0x20000000 ++#define TG3_FLAG_SPLIT_MODE 0x40000000 ++#define TG3_FLAG_INIT_COMPLETE 0x80000000 ++ ++ uint32_t tg3_flags2; ++#define TG3_FLG2_RESTART_TIMER 0x00000001 ++#define TG3_FLG2_SUN_5704 0x00000002 ++#define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004 ++#define TG3_FLG2_IS_5788 0x00000008 ++#define TG3_FLG2_MAX_RXPEND_64 0x00000010 ++#define TG3_FLG2_TSO_CAPABLE 0x00000020 ++ ++ ++ ++ uint32_t split_mode_max_reqs; ++#define SPLIT_MODE_5704_MAX_REQ 3 ++ ++#if 0 ++ struct timer_list timer; ++ uint16_t timer_counter; ++ uint16_t timer_multiplier; ++ uint32_t timer_offset; ++ uint16_t asf_counter; ++ uint16_t asf_multiplier; ++#endif ++ ++ struct tg3_link_config link_config; ++ struct tg3_bufmgr_config bufmgr_config; ++ ++#if 0 ++ uint32_t rx_pending; ++ uint32_t rx_jumbo_pending; ++ uint32_t tx_pending; ++#endif ++ ++ /* cache h/w values, often passed straight to h/w */ ++ uint32_t rx_mode; ++ uint32_t tx_mode; ++ uint32_t mac_mode; ++ uint32_t mi_mode; ++ uint32_t misc_host_ctrl; ++ uint32_t grc_mode; ++ uint32_t grc_local_ctrl; ++ uint32_t dma_rwctrl; ++#if 0 ++ uint32_t coalesce_mode; ++#endif ++ ++ /* PCI block */ ++ uint16_t pci_chip_rev_id; ++#if 0 ++ uint8_t pci_cacheline_sz; ++ uint8_t pci_lat_timer; ++ uint8_t pci_hdr_type; ++ uint8_t pci_bist; ++#endif ++ uint32_t pci_cfg_state[64 / sizeof(uint32_t)]; ++ ++ int pm_cap; ++ ++ /* PHY info */ ++ uint32_t phy_id; ++#define PHY_ID_MASK 0xfffffff0 ++#define PHY_ID_BCM5400 0x60008040 ++#define PHY_ID_BCM5401 0x60008050 ++#define PHY_ID_BCM5411 0x60008070 ++#define PHY_ID_BCM5701 0x60008110 ++#define PHY_ID_BCM5703 0x60008160 ++#define PHY_ID_BCM5704 0x60008190 ++#define PHY_ID_BCM5705 0x600081a0 ++#define PHY_ID_BCM8002 0x60010140 ++#define PHY_ID_SERDES 0xfeedbee0 ++#define PHY_ID_INVALID 0xffffffff ++#define PHY_ID_REV_MASK 0x0000000f ++#define PHY_REV_BCM5401_B0 0x1 ++#define PHY_REV_BCM5401_B2 0x3 ++#define PHY_REV_BCM5401_C0 0x6 ++#define PHY_REV_BCM5411_X0 0x1 /* Found on Netgear GA302T */ ++ ++ enum phy_led_mode led_mode; ++ ++ char board_part_number[24]; ++ uint32_t nic_sram_data_cfg; ++ uint32_t pci_clock_ctrl; ++#if 0 ++ struct pci_device *pdev_peer; ++#endif ++ ++ /* This macro assumes the passed PHY ID is already masked ++ * with PHY_ID_MASK. ++ */ ++#define KNOWN_PHY_ID(X) \ ++ ((X) == PHY_ID_BCM5400 || (X) == PHY_ID_BCM5401 || \ ++ (X) == PHY_ID_BCM5411 || (X) == PHY_ID_BCM5701 || \ ++ (X) == PHY_ID_BCM5703 || (X) == PHY_ID_BCM5704 || \ ++ (X) == PHY_ID_BCM5705 || \ ++ (X) == PHY_ID_BCM8002 || (X) == PHY_ID_SERDES) ++ ++ unsigned long regs; ++ struct pci_device *pdev; ++ struct nic *nic; ++#if 0 ++ struct net_device *dev; ++#endif ++#if TG3_VLAN_TAG_USED ++ struct vlan_group *vlgrp; ++#endif ++ ++ struct tg3_rx_buffer_desc *rx_std; ++#if 0 ++ struct ring_info *rx_std_buffers; ++ dma_addr_t rx_std_mapping; ++ struct tg3_rx_buffer_desc *rx_jumbo; ++ struct ring_info *rx_jumbo_buffers; ++ dma_addr_t rx_jumbo_mapping; ++#endif ++ ++ struct tg3_rx_buffer_desc *rx_rcb; ++#if 0 ++ dma_addr_t rx_rcb_mapping; ++#endif ++ ++ /* TX descs are only used if TG3_FLAG_HOST_TXDS is set. */ ++ struct tg3_tx_buffer_desc *tx_ring; ++#if 0 ++ struct tx_ring_info *tx_buffers; ++ dma_addr_t tx_desc_mapping; ++#endif ++ ++ struct tg3_hw_status *hw_status; ++#if 0 ++ dma_addr_t status_mapping; ++#endif ++#if 0 ++ uint32_t msg_enable; ++#endif ++ ++ struct tg3_hw_stats *hw_stats; ++#if 0 ++ dma_addr_t stats_mapping; ++#endif ++ ++ int carrier_ok; ++ uint16_t subsystem_vendor; ++ uint16_t subsystem_device; ++}; ++ ++#endif /* !(_T3_H) */ +Index: b/netboot/tiara.c +=================================================================== +--- a/netboot/tiara.c ++++ /dev/null +@@ -1,255 +0,0 @@ +-/************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +- +-TIARA (Fujitsu Etherstar) NIC driver for Etherboot +-Copyright (c) Ken Yap 1998 +- +-Information gleaned from: +- +-TIARA.ASM Packet driver by Brian Fisher, Queens U, Kingston, Ontario +-Fujitsu MB86960 spec sheet (different chip but same family) +-***************************************************************************/ +- +-/* +- * 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, or (at +- * your option) any later version. +- */ +- +-/* to get some global routines like printf */ +-#include "etherboot.h" +-/* to get the interface to the body of the program */ +-#include "nic.h" +-#include "cards.h" +- +-/* +- EtherStar I/O Register offsets +-*/ +- +-/* Offsets of registers */ +-#define DLCR_XMIT_STAT 0x00 +-#define DLCR_XMIT_MASK 0x01 +-#define DLCR_RECV_STAT 0x02 +-#define DLCR_RECV_MASK 0x03 +-#define DLCR_XMIT_MODE 0x04 +-#define DLCR_RECV_MODE 0x05 +-#define DLCR_ENABLE 0x06 +-#define DLCR_TDR_LOW 0x07 +-#define DLCR_NODE_ID 0x08 +-#define DLCR_TDR_HIGH 0x0F +-#define BMPR_MEM_PORT 0x10 +-#define BMPR_PKT_LEN 0x12 +-#define BMPR_DMA_ENABLE 0x14 +-#define PROM_ID 0x18 +- +-#define TMST 0x80 +-#define TMT_OK 0x80 +-#define TMT_16COLL 0x02 +-#define BUF_EMPTY 0x40 +- +-#define CARD_DISABLE 0x80 /* written to DLCR_ENABLE to disable card */ +-#define CARD_ENABLE 0 /* written to DLCR_ENABLE to enable card */ +- +-#define CLEAR_STATUS 0x0F /* used to clear status info */ +-/* +- 00001111B +- !!!!!!!!-------- +- !!!!!!!+--------CLEAR BUS WRITE ERROR +- !!!!!!+---------CLEAR 16 COLLISION +- !!!!!+----------CLEAR COLLISION +- !!!!+-----------CLEAR UNDERFLOW +- !!!+------------NC +- !!+-------------NC +- !+--------------NC +- +---------------NC +-*/ +- +-#define NO_TX_IRQS 0 /* written to clear transmit IRQs */ +- +-#define CLR_RCV_STATUS 0xCF /* clears receive status */ +- +-#define EN_RCV_IRQS 0x80 /* enable receive interrupts */ +-/* +- 10000000B +- !!!!!!!!-------- +- !!!!!!!+--------ENABLE OVERFLOW +- !!!!!!+---------ENABLE CRC +- !!!!!+----------ENABLE ALIGN +- !!!!+-----------ENABLE SHORT PKT +- !!!+------------DISABLE REMOTE RESET +- !!+-------------RESERVED +- !+--------------RESERVED +- +---------------ENABLE PKT READY +-*/ +- +-#define XMIT_MODE 0x02 +-/* +- 00000010B +- !!!!!!!!---------ENABLE CARRIER DETECT +- !!!!!!!+---------DISABLE LOOPBACK +-*/ +- +-#define RECV_MODE 0x02 +-/* +- 00000010B +- !!!!!!!!---------ACCEPT ALL PACKETS +- !!!!!!!+---------ACCEPT PHYSICAL, MULTICAST, AND +- !!!!!!+----------BROADCAST PACKETS +- !!!!!+-----------DISABLE REMOTE RESET +- !!!!+------------DISABLE SHORT PACKETS +- !!!+-------------USE 6 BYTE ADDRESS +- !!+--------------NC +- !+---------------NC +- +----------------DISABLE CRC TEST MODE +-*/ +- +-/* NIC specific static variables go here */ +- +-static unsigned short ioaddr; +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void tiara_reset(struct nic *nic) +-{ +- int i; +- +- outb(CARD_DISABLE, ioaddr + DLCR_ENABLE); +- outb(CLEAR_STATUS, ioaddr + DLCR_XMIT_STAT); +- outb(NO_TX_IRQS, ioaddr + DLCR_XMIT_MASK); +- outb(CLR_RCV_STATUS, ioaddr + DLCR_RECV_STAT); +- outb(XMIT_MODE, ioaddr + DLCR_XMIT_MODE); +- outb(RECV_MODE, ioaddr + DLCR_RECV_MODE); +- /* Vacuum recv buffer */ +- while ((inb(ioaddr + DLCR_RECV_MODE) & BUF_EMPTY) == 0) +- inb(ioaddr + BMPR_MEM_PORT); +- /* Set node address */ +- for (i = 0; i < ETH_ALEN; ++i) +- outb(nic->node_addr[i], ioaddr + DLCR_NODE_ID + i); +- outb(CLR_RCV_STATUS, ioaddr + DLCR_RECV_STAT); +- outb(CARD_ENABLE, ioaddr + DLCR_ENABLE); +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int tiara_poll(struct nic *nic) +-{ +- unsigned int len; +- +- if (inb(ioaddr + DLCR_RECV_MODE) & BUF_EMPTY) +- return (0); +- /* Ack packet */ +- outw(CLR_RCV_STATUS, ioaddr + DLCR_RECV_STAT); +- len = inw(ioaddr + BMPR_MEM_PORT); /* throw away status */ +- len = inw(ioaddr + BMPR_MEM_PORT); +- /* Drop overlength packets */ +- if (len > ETH_FRAME_LEN) +- return (0); /* should we drain the buffer? */ +- insw(ioaddr + BMPR_MEM_PORT, nic->packet, len / 2); +- /* If it's our own, drop it */ +- if (memcmp(nic->packet + ETH_ALEN, nic->node_addr, ETH_ALEN) == 0) +- return (0); +- nic->packetlen = len; +- return (1); +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void tiara_transmit( +-struct nic *nic, +-const char *d, /* Destination */ +-unsigned int t, /* Type */ +-unsigned int s, /* size */ +-const char *p) /* Packet */ +-{ +- unsigned int len; +- unsigned long time; +- +- len = s + ETH_HLEN; +- if (len < ETH_ZLEN) +- len = ETH_ZLEN; +- t = htons(t); +- outsw(ioaddr + BMPR_MEM_PORT, d, ETH_ALEN / 2); +- outsw(ioaddr + BMPR_MEM_PORT, nic->node_addr, ETH_ALEN / 2); +- outw(t, ioaddr + BMPR_MEM_PORT); +- outsw(ioaddr + BMPR_MEM_PORT, p, s / 2); +- if (s & 1) /* last byte */ +- outb(p[s-1], ioaddr + BMPR_MEM_PORT); +- while (s++ < ETH_ZLEN - ETH_HLEN) /* pad */ +- outb(0, ioaddr + BMPR_MEM_PORT); +- outw(len | (TMST << 8), ioaddr + BMPR_PKT_LEN); +- /* wait for transmit complete */ +- time = currticks() + TICKS_PER_SEC; /* wait one second */ +- while (currticks() < time && (inb(ioaddr) & (TMT_OK|TMT_16COLL)) == 0) +- ; +- if ((inb(ioaddr) & (TMT_OK|TMT_16COLL)) == 0) +- printf("Tiara timed out on transmit\n"); +- /* Do we need to ack the transmit? */ +-} +- +-/************************************************************************** +-DISABLE - Turn off ethernet interface +-***************************************************************************/ +-static void tiara_disable(struct nic *nic) +-{ +- /* Apparently only a power down can do this properly */ +- outb(CARD_DISABLE, ioaddr + DLCR_ENABLE); +-} +- +-static int tiara_probe1(struct nic *nic) +-{ +- /* Hope all the Tiara cards have this vendor prefix */ +- static char vendor_prefix[] = { 0x08, 0x00, 0x1A }; +- static char all_ones[] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; +- int i; +- +- for (i = 0; i < ETH_ALEN; ++i) +- nic->node_addr[i] = inb(ioaddr + PROM_ID + i); +- if (memcmp(nic->node_addr, vendor_prefix, sizeof(vendor_prefix)) != 0) +- return (0); +- if (memcmp(nic->node_addr, all_ones, sizeof(all_ones)) == 0) +- return (0); +- printf("\nTiara ioaddr %#hX, addr %!\n", ioaddr, nic->node_addr); +- return (1); +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-***************************************************************************/ +-struct nic *tiara_probe(struct nic *nic, unsigned short *probe_addrs) +-{ +- /* missing entries are addresses usually already used */ +- static unsigned short io_addrs[] = { +- 0x100, 0x120, 0x140, 0x160, +- 0x180, 0x1A0, 0x1C0, 0x1E0, +- 0x200, 0x220, 0x240, /*Par*/ +- 0x280, 0x2A0, 0x2C0, /*Ser*/ +- 0x300, 0x320, 0x340, /*Par*/ +- 0x380, /*Vid,Par*/ 0x3C0, /*Ser*/ +- 0x0 +- }; +- unsigned short *p; +- +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- if (probe_addrs == 0) +- probe_addrs = io_addrs; +- for (p = probe_addrs; (ioaddr = *p) != 0; ++p) +- if (tiara_probe1(nic)) +- break; +- /* if board found */ +- if (ioaddr != 0) +- { +- tiara_reset(nic); +- /* point to NIC specific routines */ +- nic->reset = tiara_reset; +- nic->poll = tiara_poll; +- nic->transmit = tiara_transmit; +- nic->disable = tiara_disable; +- return nic; +- } +- else +- return (0); +-} +Index: b/netboot/timer.c +=================================================================== +--- a/netboot/timer.c ++++ b/netboot/timer.c +@@ -6,122 +6,24 @@ + * published by the Free Software Foundation; either version 2, or (at + * your option) any later version. + */ +- +-#include "etherboot.h" ++#include "grub.h" + #include "timer.h" + +-void load_timer2(unsigned int ticks) +-{ +- /* Set up the timer gate, turn off the speaker */ +- outb((inb(PPC_PORTB) & ~PPCB_SPKR) | PPCB_T2GATE, PPC_PORTB); +- outb(TIMER2_SEL|WORD_ACCESS|MODE0|BINARY_COUNT, TIMER_MODE_PORT); +- outb(ticks & 0xFF, TIMER2_PORT); +- outb(ticks >> 8, TIMER2_PORT); +-} +- +-#if defined(CONFIG_TSC_CURRTICKS) +-#define rdtsc(low,high) \ +- __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) +- +-#define rdtscll(val) \ +- __asm__ __volatile__ ("rdtsc" : "=A" (val)) +- +- +-#define HZ TICKS_PER_SEC +-#define CLOCK_TICK_RATE 1193180U /* Underlying HZ */ +-/* LATCH is used in the interval timer and ftape setup. */ +-#define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ ++/* Machine Independant timer helper functions */ + +- +-/* ------ Calibrate the TSC ------- +- * Return 2^32 * (1 / (TSC clocks per usec)) for do_fast_gettimeoffset(). +- * Too much 64-bit arithmetic here to do this cleanly in C, and for +- * accuracy's sake we want to keep the overhead on the CTC speaker (channel 2) +- * output busy loop as low as possible. We avoid reading the CTC registers +- * directly because of the awkward 8-bit access mechanism of the 82C54 +- * device. +- */ +- +-#define CALIBRATE_LATCH (5 * LATCH) +- +-static unsigned long long calibrate_tsc(void) ++void mdelay(unsigned int msecs) + { +- /* Set the Gate high, disable speaker */ +- outb((inb(0x61) & ~0x02) | 0x01, 0x61); +- +- /* +- * Now let's take care of CTC channel 2 +- * +- * Set the Gate high, program CTC channel 2 for mode 0, +- * (interrupt on terminal count mode), binary count, +- * load 5 * LATCH count, (LSB and MSB) to begin countdown. +- */ +- outb(0xb0, 0x43); /* binary, mode 0, LSB/MSB, Ch 2 */ +- outb(CALIBRATE_LATCH & 0xff, 0x42); /* LSB of count */ +- outb(CALIBRATE_LATCH >> 8, 0x42); /* MSB of count */ +- +- { +- unsigned long startlow, starthigh; +- unsigned long endlow, endhigh; +- unsigned long count; +- +- rdtsc(startlow,starthigh); +- count = 0; +- do { +- count++; +- } while ((inb(0x61) & 0x20) == 0); +- rdtsc(endlow,endhigh); +- +- /* Error: ECTCNEVERSET */ +- if (count <= 1) +- goto bad_ctc; +- +- /* 64-bit subtract - gcc just messes up with long longs */ +- __asm__("subl %2,%0\n\t" +- "sbbl %3,%1" +- :"=a" (endlow), "=d" (endhigh) +- :"g" (startlow), "g" (starthigh), +- "0" (endlow), "1" (endhigh)); +- +- /* Error: ECPUTOOFAST */ +- if (endhigh) +- goto bad_ctc; +- +- endlow /= 5; +- return endlow; ++ unsigned int i; ++ for(i = 0; i < msecs; i++) { ++ udelay(1000); ++ poll_interruptions(); + } +- +- /* +- * The CTC wasn't reliable: we got a hit on the very first read, +- * or the CPU was so fast/slow that the quotient wouldn't fit in +- * 32 bits.. +- */ +-bad_ctc: +- printf("bad_ctc\n"); +- return 0; + } + +- +-unsigned long currticks(void) ++void waiton_timer2(unsigned int ticks) + { +- static unsigned long clocks_per_tick; +- unsigned long clocks_high, clocks_low; +- unsigned long currticks; +- if (!clocks_per_tick) { +- clocks_per_tick = calibrate_tsc(); +- printf("clocks_per_tick = %d\n", clocks_per_tick); ++ load_timer2(ticks); ++ while(timer2_running()) { ++ poll_interruptions(); + } +- +- /* Read the Time Stamp Counter */ +- rdtsc(clocks_low, clocks_high); +- +- /* currticks = clocks / clocks_per_tick; */ +- __asm__("divl %1" +- :"=a" (currticks) +- :"r" (clocks_per_tick), "0" (clocks_low), "d" (clocks_high)); +- +- +- return currticks; + } +- +-#endif /* RTC_CURRTICKS */ +Index: b/netboot/timer.h +=================================================================== +--- a/netboot/timer.h ++++ b/netboot/timer.h +@@ -36,7 +36,8 @@ + #define BCD_COUNT 0x01 + + /* Timers tick over at this rate */ +-#define TICKS_PER_MS 1193 ++#define CLOCK_TICK_RATE 1193180U ++#define TICKS_PER_MS (CLOCK_TICK_RATE/1000) + + /* Parallel Peripheral Controller Port B */ + #define PPC_PORTB 0x61 +@@ -49,16 +50,19 @@ + /* Ticks must be between 0 and 65535 (0 == 65536) + because it is a 16 bit counter */ + extern void load_timer2(unsigned int ticks); +-extern inline int timer2_running(void) +-{ +- return ((inb(PPC_PORTB) & PPCB_T2OUT) == 0); +-} +- +-extern inline void waiton_timer2(unsigned int ticks) +-{ +- load_timer2(ticks); +- while ((inb(PPC_PORTB) & PPCB_T2OUT) == 0) +- ; +-} ++extern inline int timer2_running(void); ++extern void waiton_timer2(unsigned int ticks); ++extern void __load_timer2(unsigned int ticks); ++ ++extern void setup_timers(void); ++extern void ndelay(unsigned int nsecs); ++extern void udelay(unsigned int usecs); ++extern void mdelay(unsigned int msecs); ++//extern unsigned long currticks(void); ++ ++struct timeval { ++ long tv_sec; ++ long tv_usec; ++}; + + #endif /* TIMER_H */ +Index: b/netboot/tlan.c +=================================================================== +--- a/netboot/tlan.c ++++ b/netboot/tlan.c +@@ -1,3746 +1,1814 @@ ++#define EB51 ++ ++#ifdef EB50 ++#define __unused __attribute__((unused)) ++#endif ++ + /************************************************************************** +-Etherboot - BOOTP/TFTP Bootstrap Program +-TLAN driver for Etherboot ++* ++* tlan.c -- Etherboot device driver for the Texas Instruments ThunderLAN ++* Written 2003-2003 by Timothy Legge ++* ++* 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., 675 Mass Ave, Cambridge, MA 02139, USA. ++* ++* Portions of this code based on: ++* lan.c: Linux ThunderLan Driver: ++* ++* by James Banks ++* ++* (C) 1997-1998 Caldera, Inc. ++* (C) 1998 James Banks ++* (C) 1999-2001 Torben Mathiasen ++* (C) 2002 Samuel Chessman ++* ++* REVISION HISTORY: ++* ================ ++* v1.0 07-08-2003 timlegge Initial not quite working version ++* v1.1 07-27-2003 timlegge Sync 5.0 and 5.1 versions ++* v1.2 08-19-2003 timlegge Implement Multicast Support ++* v1.3 08-23-2003 timlegge Fix the transmit Function ++* v1.4 01-17-2004 timlegge Initial driver output cleanup ++* ++* Indent Options: indent -kr -i8 + ***************************************************************************/ + +-/* +- * 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, or (at +- * your option) any later version. +- */ +- + /* to get some global routines like printf */ + #include "etherboot.h" + /* to get the interface to the body of the program */ + #include "nic.h" + /* to get the PCI support functions, if this is a PCI NIC */ + #include "pci.h" +-/* to get our own prototype */ +-#include "cards.h" +- +- /***************************************************************** +- * TLan Definitions +- * +- ****************************************************************/ ++#include "timer.h" ++#include "tlan.h" + +-#define TLAN_MIN_FRAME_SIZE 64 +-#define TLAN_MAX_FRAME_SIZE 1600 ++#define drv_version "v1.4" ++#define drv_date "01-17-2004" + +-#define TLAN_NUM_RX_LISTS 32 +-#define TLAN_NUM_TX_LISTS 64 ++/* NIC specific static variables go here */ ++#define HZ 100 ++#define TX_TIME_OUT (6*HZ) + +-#define TLAN_IGNORE 0 +-#define TLAN_RECORD 1 ++#ifdef EB50 ++#define cpu_to_le32(val) (val) ++#define le32_to_cpu(val) (val) ++#define virt_to_bus(x) ((unsigned long) x) ++#define bus_to_virt(x) ((unsigned long) x) ++#endif + +-#define TLAN_DBG(lvl, format, args...) if (debug&lvl) printf("TLAN: " format, ##args ); +-#define TLAN_DEBUG_GNRL 0x0001 +-#define TLAN_DEBUG_TX 0x0002 +-#define TLAN_DEBUG_RX 0x0004 +-#define TLAN_DEBUG_LIST 0x0008 +-#define TLAN_DEBUG_PROBE 0x0010 ++/* Condensed operations for readability. */ ++#define virt_to_le32desc(addr) cpu_to_le32(virt_to_bus(addr)) ++#define le32desc_to_virt(addr) bus_to_virt(le32_to_cpu(addr)) + +-#define MAX_TLAN_BOARDS 8 /* Max number of boards installed at a time */ + +- /***************************************************************** +- * Device Identification Definitions +- * +- ****************************************************************/ +- +-#define PCI_DEVICE_ID_NETELLIGENT_10_T2 0xB012 +-#define PCI_DEVICE_ID_NETELLIGENT_10_100_WS_5100 0xB030 +-#ifndef PCI_DEVICE_ID_OLICOM_OC2183 +-#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 +-#endif +-#ifndef PCI_DEVICE_ID_OLICOM_OC2325 +-#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 +-#endif +-#ifndef PCI_DEVICE_ID_OLICOM_OC2326 +-#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 +-#endif +-#define TLAN_ADAPTER_NONE 0x00000000 +-#define TLAN_ADAPTER_UNMANAGED_PHY 0x00000001 +-#define TLAN_ADAPTER_BIT_RATE_PHY 0x00000002 +-#define TLAN_ADAPTER_USE_INTERN_10 0x00000004 +-#define TLAN_ADAPTER_ACTIVITY_LED 0x00000008 +-#define TLAN_SPEED_DEFAULT 0 +-#define TLAN_SPEED_10 10 +-#define TLAN_SPEED_100 100 +-#define TLAN_DUPLEX_DEFAULT 0 +-#define TLAN_DUPLEX_HALF 1 +-#define TLAN_DUPLEX_FULL 2 +-#define TLAN_BUFFERS_PER_LIST 10 +-#define TLAN_LAST_BUFFER 0x80000000 +-#define TLAN_CSTAT_UNUSED 0x8000 +-#define TLAN_CSTAT_FRM_CMP 0x4000 +-#define TLAN_CSTAT_READY 0x3000 +-#define TLAN_CSTAT_EOC 0x0800 +-#define TLAN_CSTAT_RX_ERROR 0x0400 +-#define TLAN_CSTAT_PASS_CRC 0x0200 +-#define TLAN_CSTAT_DP_PR 0x0100 +- +- /***************************************************************** +- * PHY definitions +- * +- ****************************************************************/ +- +-#define TLAN_PHY_MAX_ADDR 0x1F +-#define TLAN_PHY_NONE 0x20 +- +- /***************************************************************** +- * TLan Driver Timer Definitions +- * +- ****************************************************************/ +- +-#define TLAN_TIMER_LINK_BEAT 1 +-#define TLAN_TIMER_ACTIVITY 2 +-#define TLAN_TIMER_PHY_PDOWN 3 +-#define TLAN_TIMER_PHY_PUP 4 +-#define TLAN_TIMER_PHY_RESET 5 +-#define TLAN_TIMER_PHY_START_LINK 6 +-#define TLAN_TIMER_PHY_FINISH_AN 7 +-#define TLAN_TIMER_FINISH_RESET 8 +-#define TLAN_TIMER_ACT_DELAY (HZ/10) +- +- /***************************************************************** +- * TLan Driver Eeprom Definitions +- * +- ****************************************************************/ +- +-#define TLAN_EEPROM_ACK 0 +-#define TLAN_EEPROM_STOP 1 +- +- /***************************************************************** +- * Host Register Offsets and Contents +- * +- ****************************************************************/ +- +-#define TLAN_HOST_CMD 0x00 +-#define TLAN_HC_GO 0x80000000 +-#define TLAN_HC_STOP 0x40000000 +-#define TLAN_HC_ACK 0x20000000 +-#define TLAN_HC_CS_MASK 0x1FE00000 +-#define TLAN_HC_EOC 0x00100000 +-#define TLAN_HC_RT 0x00080000 +-#define TLAN_HC_NES 0x00040000 +-#define TLAN_HC_AD_RST 0x00008000 +-#define TLAN_HC_LD_TMR 0x00004000 +-#define TLAN_HC_LD_THR 0x00002000 +-#define TLAN_HC_REQ_INT 0x00001000 +-#define TLAN_HC_INT_OFF 0x00000800 +-#define TLAN_HC_INT_ON 0x00000400 +-#define TLAN_HC_AC_MASK 0x000000FF +-#define TLAN_CH_PARM 0x04 +-#define TLAN_DIO_ADR 0x08 +-#define TLAN_DA_ADR_INC 0x8000 +-#define TLAN_DA_RAM_ADR 0x4000 +-#define TLAN_HOST_INT 0x0A +-#define TLAN_HI_IV_MASK 0x1FE0 +-#define TLAN_HI_IT_MASK 0x001C +-#define TLAN_DIO_DATA 0x0C +- +-/* ThunderLAN Internal Register DIO Offsets */ +- +-#define TLAN_NET_CMD 0x00 +-#define TLAN_NET_CMD_NRESET 0x80 +-#define TLAN_NET_CMD_NWRAP 0x40 +-#define TLAN_NET_CMD_CSF 0x20 +-#define TLAN_NET_CMD_CAF 0x10 +-#define TLAN_NET_CMD_NOBRX 0x08 +-#define TLAN_NET_CMD_DUPLEX 0x04 +-#define TLAN_NET_CMD_TRFRAM 0x02 +-#define TLAN_NET_CMD_TXPACE 0x01 +-#define TLAN_NET_SIO 0x01 +-#define TLAN_NET_SIO_MINTEN 0x80 +-#define TLAN_NET_SIO_ECLOK 0x40 +-#define TLAN_NET_SIO_ETXEN 0x20 +-#define TLAN_NET_SIO_EDATA 0x10 +-#define TLAN_NET_SIO_NMRST 0x08 +-#define TLAN_NET_SIO_MCLK 0x04 +-#define TLAN_NET_SIO_MTXEN 0x02 +-#define TLAN_NET_SIO_MDATA 0x01 +-#define TLAN_NET_STS 0x02 +-#define TLAN_NET_STS_MIRQ 0x80 +-#define TLAN_NET_STS_HBEAT 0x40 +-#define TLAN_NET_STS_TXSTOP 0x20 +-#define TLAN_NET_STS_RXSTOP 0x10 +-#define TLAN_NET_STS_RSRVD 0x0F +-#define TLAN_NET_MASK 0x03 +-#define TLAN_NET_MASK_MASK7 0x80 +-#define TLAN_NET_MASK_MASK6 0x40 +-#define TLAN_NET_MASK_MASK5 0x20 +-#define TLAN_NET_MASK_MASK4 0x10 +-#define TLAN_NET_MASK_RSRVD 0x0F +-#define TLAN_NET_CONFIG 0x04 +-#define TLAN_NET_CFG_RCLK 0x8000 +-#define TLAN_NET_CFG_TCLK 0x4000 +-#define TLAN_NET_CFG_BIT 0x2000 +-#define TLAN_NET_CFG_RXCRC 0x1000 +-#define TLAN_NET_CFG_PEF 0x0800 +-#define TLAN_NET_CFG_1FRAG 0x0400 +-#define TLAN_NET_CFG_1CHAN 0x0200 +-#define TLAN_NET_CFG_MTEST 0x0100 +-#define TLAN_NET_CFG_PHY_EN 0x0080 +-#define TLAN_NET_CFG_MSMASK 0x007F +-#define TLAN_MAN_TEST 0x06 +-#define TLAN_DEF_VENDOR_ID 0x08 +-#define TLAN_DEF_DEVICE_ID 0x0A +-#define TLAN_DEF_REVISION 0x0C +-#define TLAN_DEF_SUBCLASS 0x0D +-#define TLAN_DEF_MIN_LAT 0x0E +-#define TLAN_DEF_MAX_LAT 0x0F +-#define TLAN_AREG_0 0x10 +-#define TLAN_AREG_1 0x16 +-#define TLAN_AREG_2 0x1C +-#define TLAN_AREG_3 0x22 +-#define TLAN_HASH_1 0x28 +-#define TLAN_HASH_2 0x2C +-#define TLAN_GOOD_TX_FRMS 0x30 +-#define TLAN_TX_UNDERUNS 0x33 +-#define TLAN_GOOD_RX_FRMS 0x34 +-#define TLAN_RX_OVERRUNS 0x37 +-#define TLAN_DEFERRED_TX 0x38 +-#define TLAN_CRC_ERRORS 0x3A +-#define TLAN_CODE_ERRORS 0x3B +-#define TLAN_MULTICOL_FRMS 0x3C +-#define TLAN_SINGLECOL_FRMS 0x3E +-#define TLAN_EXCESSCOL_FRMS 0x40 +-#define TLAN_LATE_COLS 0x41 +-#define TLAN_CARRIER_LOSS 0x42 +-#define TLAN_ACOMMIT 0x43 +-#define TLAN_LED_REG 0x44 +-#define TLAN_LED_ACT 0x10 +-#define TLAN_LED_LINK 0x01 +-#define TLAN_BSIZE_REG 0x45 +-#define TLAN_MAX_RX 0x46 +-#define TLAN_INT_DIS 0x48 +-#define TLAN_ID_TX_EOC 0x04 +-#define TLAN_ID_RX_EOF 0x02 +-#define TLAN_ID_RX_EOC 0x01 +- +-/* ThunderLAN Interrupt Codes */ +- +-#define TLAN_INT_NUMBER_OF_INTS 8 +- +-#define TLAN_INT_NONE 0x0000 +-#define TLAN_INT_TX_EOF 0x0001 +-#define TLAN_INT_STAT_OVERFLOW 0x0002 +-#define TLAN_INT_RX_EOF 0x0003 +-#define TLAN_INT_DUMMY 0x0004 +-#define TLAN_INT_TX_EOC 0x0005 +-#define TLAN_INT_STATUS_CHECK 0x0006 +-#define TLAN_INT_RX_EOC 0x0007 +-#define TLAN_TLPHY_ID 0x10 +-#define TLAN_TLPHY_CTL 0x11 +-#define TLAN_TC_IGLINK 0x8000 +-#define TLAN_TC_SWAPOL 0x4000 +-#define TLAN_TC_AUISEL 0x2000 +-#define TLAN_TC_SQEEN 0x1000 +-#define TLAN_TC_MTEST 0x0800 +-#define TLAN_TC_RESERVED 0x07F8 +-#define TLAN_TC_NFEW 0x0004 +-#define TLAN_TC_INTEN 0x0002 +-#define TLAN_TC_TINT 0x0001 +-#define TLAN_TLPHY_STS 0x12 +-#define TLAN_TS_MINT 0x8000 +-#define TLAN_TS_PHOK 0x4000 +-#define TLAN_TS_POLOK 0x2000 +-#define TLAN_TS_TPENERGY 0x1000 +-#define TLAN_TS_RESERVED 0x0FFF +-#define TLAN_TLPHY_PAR 0x19 +-#define TLAN_PHY_CIM_STAT 0x0020 +-#define TLAN_PHY_SPEED_100 0x0040 +-#define TLAN_PHY_DUPLEX_FULL 0x0080 +-#define TLAN_PHY_AN_EN_STAT 0x0400 +- +- +-/* ThunderLAN MII Registers */ +- +-/* Generic MII/PHY Registers */ +- +-#define MII_GEN_CTL 0x00 +-#define MII_GC_RESET 0x8000 +-#define MII_GC_LOOPBK 0x4000 +-#define MII_GC_SPEEDSEL 0x2000 +-#define MII_GC_AUTOENB 0x1000 +-#define MII_GC_PDOWN 0x0800 +-#define MII_GC_ISOLATE 0x0400 +-#define MII_GC_AUTORSRT 0x0200 +-#define MII_GC_DUPLEX 0x0100 +-#define MII_GC_COLTEST 0x0080 +-#define MII_GC_RESERVED 0x007F +-#define MII_GEN_STS 0x01 +-#define MII_GS_100BT4 0x8000 +-#define MII_GS_100BTXFD 0x4000 +-#define MII_GS_100BTXHD 0x2000 +-#define MII_GS_10BTFD 0x1000 +-#define MII_GS_10BTHD 0x0800 +-#define MII_GS_RESERVED 0x07C0 +-#define MII_GS_AUTOCMPLT 0x0020 +-#define MII_GS_RFLT 0x0010 +-#define MII_GS_AUTONEG 0x0008 +-#define MII_GS_LINK 0x0004 +-#define MII_GS_JABBER 0x0002 +-#define MII_GS_EXTCAP 0x0001 +-#define MII_GEN_ID_HI 0x02 +-#define MII_GEN_ID_LO 0x03 +-#define MII_GIL_OUI 0xFC00 +-#define MII_GIL_MODEL 0x03F0 +-#define MII_GIL_REVISION 0x000F +-#define MII_AN_ADV 0x04 +-#define MII_AN_LPA 0x05 +-#define MII_AN_EXP 0x06 +- +-/* ThunderLAN Specific MII/PHY Registers */ +- +-#define TLAN_TC_IGLINK 0x8000 +-#define TLAN_TC_SWAPOL 0x4000 +-#define TLAN_TC_AUISEL 0x2000 +-#define TLAN_TC_SQEEN 0x1000 +-#define TLAN_TC_MTEST 0x0800 +-#define TLAN_TC_RESERVED 0x07F8 +-#define TLAN_TC_NFEW 0x0004 +-#define TLAN_TC_INTEN 0x0002 +-#define TLAN_TC_TINT 0x0001 +-#define TLAN_TS_MINT 0x8000 +-#define TLAN_TS_PHOK 0x4000 +-#define TLAN_TS_POLOK 0x2000 +-#define TLAN_TS_TPENERGY 0x1000 +-#define TLAN_TS_RESERVED 0x0FFF +-#define TLAN_PHY_CIM_STAT 0x0020 +-#define TLAN_PHY_SPEED_100 0x0040 +-#define TLAN_PHY_DUPLEX_FULL 0x0080 +-#define TLAN_PHY_AN_EN_STAT 0x0400 +- +-/* National Sem. & Level1 PHY id's */ +-#define NAT_SEM_ID1 0x2000 +-#define NAT_SEM_ID2 0x5C01 +-#define LEVEL1_ID1 0x7810 +-#define LEVEL1_ID2 0x0000 +- +-#define TLan_ClearBit( bit, port ) outb_p(inb_p(port) & ~bit, port) +-#define TLan_GetBit( bit, port ) ((int) (inb_p(port) & bit)) +-#define TLan_SetBit( bit, port ) outb_p(inb_p(port) | bit, port) +- +-typedef unsigned int u32; +-typedef unsigned short u16; +-typedef unsigned char u8; ++static void TLan_ResetLists(struct nic *nic __unused); ++static void TLan_ResetAdapter(struct nic *nic __unused); ++static void TLan_FinishReset(struct nic *nic __unused); + +-/* Routines to access internal registers. */ ++static void TLan_EeSendStart(u16); ++static int TLan_EeSendByte(u16, u8, int); ++static void TLan_EeReceiveByte(u16, u8 *, int); ++static int TLan_EeReadByte(u16 io_base, u8, u8 *); + +-inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr) +-{ +- outw(internal_addr, base_addr + TLAN_DIO_ADR); +- return (inb((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x3))); +- +-} /* TLan_DioRead8 */ ++static void TLan_PhyDetect(struct nic *nic); ++static void TLan_PhyPowerDown(struct nic *nic); ++static void TLan_PhyPowerUp(struct nic *nic); + +-inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr) +-{ +- outw(internal_addr, base_addr + TLAN_DIO_ADR); +- return (inw((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x2))); + +-} /* TLan_DioRead16 */ ++static void TLan_SetMac(struct nic *nic __unused, int areg, char *mac); + +-inline u32 TLan_DioRead32(u16 base_addr, u16 internal_addr) +-{ +- outw(internal_addr, base_addr + TLAN_DIO_ADR); +- return (inl(base_addr + TLAN_DIO_DATA)); ++static void TLan_PhyReset(struct nic *nic); ++static void TLan_PhyStartLink(struct nic *nic); ++static void TLan_PhyFinishAutoNeg(struct nic *nic); + +-} /* TLan_DioRead32 */ ++#ifdef MONITOR ++static void TLan_PhyMonitor(struct nic *nic); ++#endif + +-inline void TLan_DioWrite8(u16 base_addr, u16 internal_addr, u8 data) +-{ +- outw(internal_addr, base_addr + TLAN_DIO_ADR); +- outb(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x3)); + +-} ++static void refill_rx(struct nic *nic __unused); + +-inline void TLan_DioWrite16(u16 base_addr, u16 internal_addr, u16 data) +-{ +- outw(internal_addr, base_addr + TLAN_DIO_ADR); +- outw(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); ++static int TLan_MiiReadReg(struct nic *nic __unused, u16, u16, u16 *); ++static void TLan_MiiSendData(u16, u32, unsigned); ++static void TLan_MiiSync(u16); ++static void TLan_MiiWriteReg(struct nic *nic __unused, u16, u16, u16); + +-} + +-inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data) +-{ +- outw(internal_addr, base_addr + TLAN_DIO_ADR); +- outl(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); ++const char *media[] = { ++ "10BaseT-HD ", "10BaseT-FD ", "100baseTx-HD ", ++ "100baseTx-FD", "100baseT4", 0 ++}; + +-} ++/* This much match tlan_pci_tbl[]! */ ++enum tlan_nics { ++ NETEL10 = 0, NETEL100 = 1, NETFLEX3I = 2, THUNDER = 3, NETFLEX3B = ++ 4, NETEL100PI = 5, ++ NETEL100D = 6, NETEL100I = 7, OC2183 = 8, OC2325 = 9, OC2326 = ++ 10, NETELLIGENT_10_100_WS_5100 = 11, ++ NETELLIGENT_10_T2 = 12 ++}; + +-/* NIC specific static variables go here */ ++struct pci_id_info { ++ const char *name; ++ int nic_id; ++ struct match_info { ++ u32 pci, pci_mask, subsystem, subsystem_mask; ++ u32 revision, revision_mask; /* Only 8 bits. */ ++ } id; ++ u32 flags; ++ u16 addrOfs; /* Address Offset */ ++}; + +-/***************************************************************************** +-****************************************************************************** ++static struct pci_id_info tlan_pci_tbl[] = { ++ {"Compaq Netelligent 10 T PCI UTP", NETEL10, ++ {0xae340e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, ++ {"Compaq Netelligent 10/100 TX PCI UTP", NETEL100, ++ {0xae320e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, ++ {"Compaq Integrated NetFlex-3/P", NETFLEX3I, ++ {0xae350e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_NONE, 0x83}, ++ {"Compaq NetFlex-3/P", THUNDER, ++ {0xf1300e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_UNMANAGED_PHY | TLAN_ADAPTER_BIT_RATE_PHY, 0x83}, ++ {"Compaq NetFlex-3/P", NETFLEX3B, ++ {0xf1500e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_NONE, 0x83}, ++ {"Compaq Netelligent Integrated 10/100 TX UTP", NETEL100PI, ++ {0xae430e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, ++ {"Compaq Netelligent Dual 10/100 TX PCI UTP", NETEL100D, ++ {0xae400e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_NONE, 0x83}, ++ {"Compaq Netelligent 10/100 TX Embedded UTP", NETEL100I, ++ {0xb0110e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_NONE, 0x83}, ++ {"Olicom OC-2183/2185", OC2183, ++ {0x0013108d, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_USE_INTERN_10, 0x83}, ++ {"Olicom OC-2325", OC2325, ++ {0x0012108d, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_UNMANAGED_PHY, 0xF8}, ++ {"Olicom OC-2326", OC2326, ++ {0x0014108d, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_USE_INTERN_10, 0xF8}, ++ {"Compaq Netelligent 10/100 TX UTP", NETELLIGENT_10_100_WS_5100, ++ {0xb0300e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, ++ {"Compaq Netelligent 10 T/2 PCI UTP/Coax", NETELLIGENT_10_T2, ++ {0xb0120e11, 0xffffffff, 0, 0, 0, 0}, ++ TLAN_ADAPTER_NONE, 0x83}, ++ {"Compaq NetFlex-3/E", 0, /* EISA card */ ++ {0, 0, 0, 0, 0, 0}, ++ TLAN_ADAPTER_ACTIVITY_LED | TLAN_ADAPTER_UNMANAGED_PHY | ++ TLAN_ADAPTER_BIT_RATE_PHY, 0x83}, ++ {"Compaq NetFlex-3/E", 0, /* EISA card */ ++ {0, 0, 0, 0, 0, 0}, ++ TLAN_ADAPTER_ACTIVITY_LED, 0x83}, ++ {0, 0, ++ {0, 0, 0, 0, 0, 0}, ++ 0, 0}, ++}; + +- ThunderLAN Driver Eeprom routines + +- The Compaq Netelligent 10 and 10/100 cards use a Microchip 24C02A +- EEPROM. These functions are based on information in Microchip's +- data sheet. I don't know how well this functions will work with +- other EEPROMs. ++struct TLanList { ++ u32 forward; ++ u16 cStat; ++ u16 frameSize; ++ struct { ++ u32 count; ++ u32 address; ++ } buffer[TLAN_BUFFERS_PER_LIST]; ++}; + +-****************************************************************************** +-*****************************************************************************/ + +- /*************************************************************** +- * TLan_EeSendStart +- * +- * Returns: +- * Nothing +- * Parms: +- * io_base The IO port base address for the +- * TLAN device with the EEPROM to +- * use. +- * +- * This function sends a start cycle to an EEPROM attached +- * to a TLAN chip. +- * +- **************************************************************/ + +-static void TLan_EeSendStart( u16 io_base ) +-{ +- u16 sio; ++struct TLanList tx_ring[TLAN_NUM_TX_LISTS]; ++static unsigned char txb[TLAN_MAX_FRAME_SIZE * TLAN_NUM_TX_LISTS]; + +- outw( TLAN_NET_SIO, io_base + TLAN_DIO_ADR ); +- sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; ++struct TLanList rx_ring[TLAN_NUM_RX_LISTS]; ++static unsigned char rxb[TLAN_MAX_FRAME_SIZE * TLAN_NUM_RX_LISTS]; + +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); +- TLan_SetBit( TLAN_NET_SIO_ETXEN, sio ); +- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); +- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); ++typedef u8 TLanBuffer[TLAN_MAX_FRAME_SIZE]; + +-} /* TLan_EeSendStart */ + +- /*************************************************************** +- * TLan_EeSendByte +- * +- * Returns: +- * If the correct ack was received, 0, otherwise 1 +- * Parms: io_base The IO port base address for the +- * TLAN device with the EEPROM to +- * use. +- * data The 8 bits of information to +- * send to the EEPROM. +- * stop If TLAN_EEPROM_STOP is passed, a +- * stop cycle is sent after the +- * byte is sent after the ack is +- * read. +- * +- * This function sends a byte on the serial EEPROM line, +- * driving the clock to send each bit. The function then +- * reverses transmission direction and reads an acknowledge +- * bit. +- * +- **************************************************************/ ++int chip_idx; + +-static int TLan_EeSendByte( u16 io_base, u8 data, int stop ) +-{ +- int err; +- u8 place; +- u16 sio; + +- outw( TLAN_NET_SIO, io_base + TLAN_DIO_ADR ); +- sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; ++/***************************************************************** ++* TLAN Private Information Structure ++* ++****************************************************************/ ++struct tlan_private { ++ unsigned short vendor_id; /* PCI Vendor code */ ++ unsigned short dev_id; /* PCI Device code */ ++ const char *nic_name; ++ u8 *padBuffer; ++ u8 *rxBuffer; ++ struct TLanList *rx_head_desc; ++ u32 rxHead; ++ u32 rxTail; ++ u32 rxEocCount; ++ unsigned int cur_rx, dirty_rx; /* Producer/consumer ring indicies */ ++ unsigned int cur_tx, dirty_tx; ++ unsigned rx_buf_sz; /* Based on mtu + Slack */ ++ struct TLanList *txList; ++ struct TLanList *rxList; ++ u8 *txBuffer; ++ u32 txHead; ++ u32 txInProgress; ++ u32 txTail; ++ int eoc; ++ u32 txBusyCount; ++ u32 phyOnline; ++ u32 timerSetAt; ++ u32 timerType; ++ u32 adapterRev; ++ u32 aui; ++ u32 debug; ++ u32 duplex; ++ u32 phy[2]; ++ u32 phyNum; ++ u32 speed; ++ u8 tlanRev; ++ u8 tlanFullDuplex; ++ char devName[8]; ++ u8 link; ++ u8 is_eisa; ++ u8 neg_be_verbose; ++} TLanPrivateInfo; + +- /* Assume clock is low, tx is enabled; */ +- for ( place = 0x80; place != 0; place >>= 1 ) { +- if ( place & data ) +- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); +- else +- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); +- } +- TLan_ClearBit( TLAN_NET_SIO_ETXEN, sio ); +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- err = TLan_GetBit( TLAN_NET_SIO_EDATA, sio ); +- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_SetBit( TLAN_NET_SIO_ETXEN, sio ); ++static struct tlan_private *priv; + +- if ( ( ! err ) && stop ) { +- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); /* STOP, raise data while clock is high */ +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); +- } ++u32 BASE; + +- return ( err ); + +-} /* TLan_EeSendByte */ + +- /*************************************************************** +- * TLan_EeReceiveByte +- * +- * Returns: +- * Nothing +- * Parms: +- * io_base The IO port base address for the +- * TLAN device with the EEPROM to +- * use. +- * data An address to a char to hold the +- * data sent from the EEPROM. +- * stop If TLAN_EEPROM_STOP is passed, a +- * stop cycle is sent after the +- * byte is received, and no ack is +- * sent. +- * +- * This function receives 8 bits of data from the EEPROM +- * over the serial link. It then sends and ack bit, or no +- * ack and a stop bit. This function is used to retrieve +- * data after the address of a byte in the EEPROM has been +- * sent. +- * +- **************************************************************/ ++/*************************************************************** ++* TLan_ResetLists ++* ++* Returns: ++* Nothing ++* Parms: ++* dev The device structure with the list ++* stuctures to be reset. ++* ++* This routine sets the variables associated with managing ++* the TLAN lists to their initial values. ++* ++**************************************************************/ + +-static void TLan_EeReceiveByte( u16 io_base, u8 *data, int stop ) ++void TLan_ResetLists(struct nic *nic __unused) + { +- u8 place; +- u16 sio; + +- outw( TLAN_NET_SIO, io_base + TLAN_DIO_ADR ); +- sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; +- *data = 0; ++ int i; ++ struct TLanList *list; ++ priv->txHead = 0; ++ priv->txTail = 0; + +- /* Assume clock is low, tx is enabled; */ +- TLan_ClearBit( TLAN_NET_SIO_ETXEN, sio ); +- for ( place = 0x80; place; place >>= 1 ) { +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- if ( TLan_GetBit( TLAN_NET_SIO_EDATA, sio ) ) +- *data |= place; +- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); ++ for (i = 0; i < TLAN_NUM_TX_LISTS; i++) { ++ list = &tx_ring[i]; ++ list->cStat = TLAN_CSTAT_UNUSED; ++/* list->buffer[0].address = 0; */ ++ list->buffer[0].address = virt_to_bus(txb + ++ (i * TLAN_MAX_FRAME_SIZE)); ++ list->buffer[2].count = 0; ++ list->buffer[2].address = 0; ++ list->buffer[9].address = 0; ++/* list->forward = 0; */ + } + +- TLan_SetBit( TLAN_NET_SIO_ETXEN, sio ); +- if ( ! stop ) { +- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); /* Ack = 0 */ +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); +- } else { +- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); /* No ack = 1 (?) */ +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_ClearBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_ClearBit( TLAN_NET_SIO_EDATA, sio ); /* STOP, raise data while clock is high */ +- TLan_SetBit( TLAN_NET_SIO_ECLOK, sio ); +- TLan_SetBit( TLAN_NET_SIO_EDATA, sio ); +- } ++ priv->cur_rx = 0; ++ priv->rx_buf_sz = (TLAN_MAX_FRAME_SIZE); ++ priv->rx_head_desc = &rx_ring[0]; ++ ++ /* Initialize all the Rx descriptors */ ++ for (i = 0; i < TLAN_NUM_RX_LISTS; i++) { ++ rx_ring[i].forward = virt_to_le32desc(&rx_ring[i + 1]); ++ rx_ring[i].cStat = TLAN_CSTAT_READY; ++ rx_ring[i].frameSize = TLAN_MAX_FRAME_SIZE; ++ rx_ring[i].buffer[0].count = ++ TLAN_MAX_FRAME_SIZE | TLAN_LAST_BUFFER; ++ rx_ring[i].buffer[0].address = ++ virt_to_le32desc(&rxb[i * TLAN_MAX_FRAME_SIZE]); ++ rx_ring[i].buffer[1].count = 0; ++ rx_ring[i].buffer[1].address = 0; ++ } ++ ++ /* Mark the last entry as wrapping the ring */ ++ rx_ring[i - 1].forward = virt_to_le32desc(&rx_ring[0]); ++ priv->dirty_rx = (unsigned int) (i - TLAN_NUM_RX_LISTS); + +-} /* TLan_EeReceiveByte */ ++} /* TLan_ResetLists */ + +- /*************************************************************** +- * TLan_EeReadByte +- * +- * Returns: +- * No error = 0, else, the stage at which the error +- * occurred. +- * Parms: +- * io_base The IO port base address for the +- * TLAN device with the EEPROM to +- * use. +- * ee_addr The address of the byte in the +- * EEPROM whose contents are to be +- * retrieved. +- * data An address to a char to hold the +- * data obtained from the EEPROM. +- * +- * This function reads a byte of information from an byte +- * cell in the EEPROM. +- * +- **************************************************************/ ++/*************************************************************** ++* TLan_Reset ++* ++* Returns: ++* 0 ++* Parms: ++* dev Pointer to device structure of adapter ++* to be reset. ++* ++* This function resets the adapter and it's physical ++* device. See Chap. 3, pp. 9-10 of the "ThunderLAN ++* Programmer's Guide" for details. The routine tries to ++* implement what is detailed there, though adjustments ++* have been made. ++* ++**************************************************************/ + +-static int TLan_EeReadByte( u16 io_base, u8 ee_addr, u8 *data ) ++void TLan_ResetAdapter(struct nic *nic __unused) + { +- int err; +- unsigned long flags = 0; +- int ret=0; ++ int i; ++ u32 addr; ++ u32 data; ++ u8 data8; + +- TLan_EeSendStart( io_base ); +- err = TLan_EeSendByte( io_base, 0xA0, TLAN_EEPROM_ACK ); +- if (err) +- { +- ret=1; +- goto fail; +- } +- err = TLan_EeSendByte( io_base, ee_addr, TLAN_EEPROM_ACK ); +- if (err) +- { +- ret=2; +- goto fail; +- } +- TLan_EeSendStart( io_base ); +- err = TLan_EeSendByte( io_base, 0xA1, TLAN_EEPROM_ACK ); +- if (err) +- { +- ret=3; +- goto fail; +- } +- TLan_EeReceiveByte( io_base, data, TLAN_EEPROM_STOP ); +-fail: ++ priv->tlanFullDuplex = FALSE; ++ priv->phyOnline = 0; ++/* 1. Assert reset bit. */ + +- return ret; ++ data = inl(BASE + TLAN_HOST_CMD); ++ data |= TLAN_HC_AD_RST; ++ outl(data, BASE + TLAN_HOST_CMD); + +-} /* TLan_EeReadByte */ ++ udelay(1000); + +-#if 0 +-/* Not yet converted from Linux driver */ +-/***************************************************************************** +-****************************************************************************** ++/* 2. Turn off interrupts. ( Probably isn't necessary ) */ + +- ThunderLAN Driver PHY Layer Routines ++ data = inl(BASE + TLAN_HOST_CMD); ++ data |= TLAN_HC_INT_OFF; ++ outl(data, BASE + TLAN_HOST_CMD); ++/* 3. Clear AREGs and HASHs. */ + +-****************************************************************************** +-*****************************************************************************/ ++ for (i = TLAN_AREG_0; i <= TLAN_HASH_2; i += 4) { ++ TLan_DioWrite32(BASE, (u16) i, 0); ++ } + +- /********************************************************************* +- * TLan_PhyPrint +- * +- * Returns: +- * Nothing +- * Parms: +- * dev A pointer to the device structure of the +- * TLAN device having the PHYs to be detailed. +- * +- * This function prints the registers a PHY (aka tranceiver). +- * +- ********************************************************************/ ++/* 4. Setup NetConfig register. */ + +-void TLan_PhyPrint( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 i, data0, data1, data2, data3, phy; ++ data = ++ TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN; ++ TLan_DioWrite16(BASE, TLAN_NET_CONFIG, (u16) data); + +- phy = priv->phy[priv->phyNum]; ++/* 5. Load Ld_Tmr and Ld_Thr in HOST_CMD. */ + +- if ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) { +- printk( "TLAN: Device %s, Unmanaged PHY.\n", dev->name ); +- } else if ( phy <= TLAN_PHY_MAX_ADDR ) { +- printk( "TLAN: Device %s, PHY 0x%02x.\n", dev->name, phy ); +- printk( "TLAN: Off. +0 +1 +2 +3 \n" ); +- for ( i = 0; i < 0x20; i+= 4 ) { +- printk( "TLAN: 0x%02x", i ); +- TLan_MiiReadReg( dev, phy, i, &data0 ); +- printk( " 0x%04hx", data0 ); +- TLan_MiiReadReg( dev, phy, i + 1, &data1 ); +- printk( " 0x%04hx", data1 ); +- TLan_MiiReadReg( dev, phy, i + 2, &data2 ); +- printk( " 0x%04hx", data2 ); +- TLan_MiiReadReg( dev, phy, i + 3, &data3 ); +- printk( " 0x%04hx\n", data3 ); +- } +- } else { +- printk( "TLAN: Device %s, Invalid PHY.\n", dev->name ); +- } ++ outl(TLAN_HC_LD_TMR | 0x3f, BASE + TLAN_HOST_CMD); ++ outl(TLAN_HC_LD_THR | 0x0, BASE + TLAN_HOST_CMD); + +-} /* TLan_PhyPrint */ ++/* 6. Unreset the MII by setting NMRST (in NetSio) to 1. */ + +- /********************************************************************* +- * TLan_PhyDetect +- * +- * Returns: +- * Nothing +- * Parms: +- * dev A pointer to the device structure of the adapter +- * for which the PHY needs determined. +- * +- * So far I've found that adapters which have external PHYs +- * may also use the internal PHY for part of the functionality. +- * (eg, AUI/Thinnet). This function finds out if this TLAN +- * chip has an internal PHY, and then finds the first external +- * PHY (starting from address 0) if it exists). +- * +- ********************************************************************/ ++ outw(TLAN_NET_SIO, BASE + TLAN_DIO_ADR); ++ addr = BASE + TLAN_DIO_DATA + TLAN_NET_SIO; ++ TLan_SetBit(TLAN_NET_SIO_NMRST, addr); + +-void TLan_PhyDetect( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 control; +- u16 hi; +- u16 lo; +- u32 phy; ++/* 7. Setup the remaining registers. */ + +- if ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) { +- priv->phyNum = 0xFFFF; +- return; ++ if (priv->tlanRev >= 0x30) { ++ data8 = TLAN_ID_TX_EOC | TLAN_ID_RX_EOC; ++ TLan_DioWrite8(BASE, TLAN_INT_DIS, data8); + } ++ TLan_PhyDetect(nic); ++ data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN; + +- TLan_MiiReadReg( dev, TLAN_PHY_MAX_ADDR, MII_GEN_ID_HI, &hi ); +- +- if ( hi != 0xFFFF ) { +- priv->phy[0] = TLAN_PHY_MAX_ADDR; +- } else { +- priv->phy[0] = TLAN_PHY_NONE; ++ if (tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_BIT_RATE_PHY) { ++ data |= TLAN_NET_CFG_BIT; ++ if (priv->aui == 1) { ++ TLan_DioWrite8(BASE, TLAN_ACOMMIT, 0x0a); ++ } else if (priv->duplex == TLAN_DUPLEX_FULL) { ++ TLan_DioWrite8(BASE, TLAN_ACOMMIT, 0x00); ++ priv->tlanFullDuplex = TRUE; ++ } else { ++ TLan_DioWrite8(BASE, TLAN_ACOMMIT, 0x08); ++ } + } + +- priv->phy[1] = TLAN_PHY_NONE; +- for ( phy = 0; phy <= TLAN_PHY_MAX_ADDR; phy++ ) { +- TLan_MiiReadReg( dev, phy, MII_GEN_CTL, &control ); +- TLan_MiiReadReg( dev, phy, MII_GEN_ID_HI, &hi ); +- TLan_MiiReadReg( dev, phy, MII_GEN_ID_LO, &lo ); +- if ( ( control != 0xFFFF ) || ( hi != 0xFFFF ) || ( lo != 0xFFFF ) ) { +- TLAN_DBG( TLAN_DEBUG_GNRL, "PHY found at %02x %04x %04x %04x\n", phy, control, hi, lo ); +- if ( ( priv->phy[1] == TLAN_PHY_NONE ) && ( phy != TLAN_PHY_MAX_ADDR ) ) { +- priv->phy[1] = phy; +- } +- } ++ if (priv->phyNum == 0) { ++ data |= TLAN_NET_CFG_PHY_EN; + } ++ TLan_DioWrite16(BASE, TLAN_NET_CONFIG, (u16) data); + +- if ( priv->phy[1] != TLAN_PHY_NONE ) { +- priv->phyNum = 1; +- } else if ( priv->phy[0] != TLAN_PHY_NONE ) { +- priv->phyNum = 0; ++ if (tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_UNMANAGED_PHY) { ++ TLan_FinishReset(nic); + } else { +- printk( "TLAN: Cannot initialize device, no PHY was found!\n" ); ++ TLan_PhyPowerDown(nic); + } + +-} /* TLan_PhyDetect */ ++} /* TLan_ResetAdapter */ + +-void TLan_PhyPowerDown( struct net_device *dev ) ++void TLan_FinishReset(struct nic *nic) + { +- TLanPrivateInfo *priv = dev->priv; +- u16 value; + +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Powering down PHY(s).\n", dev->name ); +- value = MII_GC_PDOWN | MII_GC_LOOPBK | MII_GC_ISOLATE; +- TLan_MiiSync( dev->base_addr ); +- TLan_MiiWriteReg( dev, priv->phy[priv->phyNum], MII_GEN_CTL, value ); +- if ( ( priv->phyNum == 0 ) && ( priv->phy[1] != TLAN_PHY_NONE ) && ( ! ( priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10 ) ) ) { +- TLan_MiiSync( dev->base_addr ); +- TLan_MiiWriteReg( dev, priv->phy[1], MII_GEN_CTL, value ); ++ u8 data; ++ u32 phy; ++ u8 sio; ++ u16 status; ++ u16 partner; ++ u16 tlphy_ctl; ++ u16 tlphy_par; ++ u16 tlphy_id1, tlphy_id2; ++ int i; ++ ++ phy = priv->phy[priv->phyNum]; ++ ++ data = TLAN_NET_CMD_NRESET | TLAN_NET_CMD_NWRAP; ++ if (priv->tlanFullDuplex) { ++ data |= TLAN_NET_CMD_DUPLEX; + } ++ TLan_DioWrite8(BASE, TLAN_NET_CMD, data); ++ data = TLAN_NET_MASK_MASK4 | TLAN_NET_MASK_MASK5; ++ if (priv->phyNum == 0) { ++ data |= TLAN_NET_MASK_MASK7; ++ } ++ TLan_DioWrite8(BASE, TLAN_NET_MASK, data); ++ TLan_DioWrite16(BASE, TLAN_MAX_RX, ((1536) + 7) & ~7); ++ TLan_MiiReadReg(nic, phy, MII_GEN_ID_HI, &tlphy_id1); ++ TLan_MiiReadReg(nic, phy, MII_GEN_ID_LO, &tlphy_id2); + +- /* Wait for 50 ms and powerup +- * This is abitrary. It is intended to make sure the +- * tranceiver settles. +- */ +- TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_PUP ); ++ if ((tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_UNMANAGED_PHY) ++ || (priv->aui)) { ++ status = MII_GS_LINK; ++ printf("TLAN: %s: Link forced.\n", priv->nic_name); ++ } else { ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); ++ udelay(1000); ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); ++ if ((status & MII_GS_LINK) && /* We only support link info on Nat.Sem. PHY's */ ++ (tlphy_id1 == NAT_SEM_ID1) ++ && (tlphy_id2 == NAT_SEM_ID2)) { ++ TLan_MiiReadReg(nic, phy, MII_AN_LPA, &partner); ++ TLan_MiiReadReg(nic, phy, TLAN_TLPHY_PAR, ++ &tlphy_par); + +-} /* TLan_PhyPowerDown */ ++ printf("TLAN: %s: Link active with ", ++ priv->nic_name); ++ if (!(tlphy_par & TLAN_PHY_AN_EN_STAT)) { ++ printf("forced 10%sMbps %s-Duplex\n", ++ tlphy_par & TLAN_PHY_SPEED_100 ? "" ++ : "0", ++ tlphy_par & TLAN_PHY_DUPLEX_FULL ? ++ "Full" : "Half"); ++ } else { ++ printf ++ ("AutoNegotiation enabled, at 10%sMbps %s-Duplex\n", ++ tlphy_par & TLAN_PHY_SPEED_100 ? "" : ++ "0", ++ tlphy_par & TLAN_PHY_DUPLEX_FULL ? ++ "Full" : "Half"); ++ printf("TLAN: Partner capability: "); ++ for (i = 5; i <= 10; i++) ++ if (partner & (1 << i)) ++ printf("%s", media[i - 5]); ++ printf("\n"); ++ } + +-void TLan_PhyPowerUp( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 value; ++ TLan_DioWrite8(BASE, TLAN_LED_REG, TLAN_LED_LINK); ++#ifdef MONITOR ++ /* We have link beat..for now anyway */ ++ priv->link = 1; ++ /*Enabling link beat monitoring */ ++ /* TLan_SetTimer( nic, (10*HZ), TLAN_TIMER_LINK_BEAT ); */ ++ mdelay(10000); ++ TLan_PhyMonitor(nic); ++#endif ++ } else if (status & MII_GS_LINK) { ++ printf("TLAN: %s: Link active\n", priv->nic_name); ++ TLan_DioWrite8(BASE, TLAN_LED_REG, TLAN_LED_LINK); ++ } ++ } + +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Powering up PHY.\n", dev->name ); +- TLan_MiiSync( dev->base_addr ); +- value = MII_GC_LOOPBK; +- TLan_MiiWriteReg( dev, priv->phy[priv->phyNum], MII_GEN_CTL, value ); +- TLan_MiiSync(dev->base_addr); +- /* Wait for 500 ms and reset the +- * tranceiver. The TLAN docs say both 50 ms and +- * 500 ms, so do the longer, just in case. +- */ +- TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_RESET ); ++ if (priv->phyNum == 0) { ++ TLan_MiiReadReg(nic, phy, TLAN_TLPHY_CTL, &tlphy_ctl); ++ tlphy_ctl |= TLAN_TC_INTEN; ++ TLan_MiiWriteReg(nic, phy, TLAN_TLPHY_CTL, tlphy_ctl); ++ sio = TLan_DioRead8(BASE, TLAN_NET_SIO); ++ sio |= TLAN_NET_SIO_MINTEN; ++ TLan_DioWrite8(BASE, TLAN_NET_SIO, sio); ++ } + +-} /* TLan_PhyPowerUp */ ++ if (status & MII_GS_LINK) { ++ TLan_SetMac(nic, 0, nic->node_addr); ++ priv->phyOnline = 1; ++ outb((TLAN_HC_INT_ON >> 8), BASE + TLAN_HOST_CMD + 1); ++/* if ( debug >= 1 && debug != TLAN_DEBUG_PROBE ) { ++ outb( ( TLAN_HC_REQ_INT >> 8 ), BASE + TLAN_HOST_CMD + 1 ); ++ } + +-void TLan_PhyReset( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 phy; +- u16 value; ++ */ ++ outl(virt_to_bus(&rx_ring), BASE + TLAN_CH_PARM); ++ outl(TLAN_HC_GO | TLAN_HC_RT, BASE + TLAN_HOST_CMD); ++ } else { ++ printf ++ ("TLAN: %s: Link inactive, will retry in 10 secs...\n", ++ priv->nic_name); ++ /* TLan_SetTimer( nic, (10*HZ), TLAN_TIMER_FINISH_RESET ); */ ++ mdelay(10000); ++ TLan_FinishReset(nic); ++ return; + +- phy = priv->phy[priv->phyNum]; ++ } + +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Reseting PHY.\n", dev->name ); +- TLan_MiiSync( dev->base_addr ); +- value = MII_GC_LOOPBK | MII_GC_RESET; +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, value ); +- TLan_MiiReadReg( dev, phy, MII_GEN_CTL, &value ); +- while ( value & MII_GC_RESET ) { +- TLan_MiiReadReg( dev, phy, MII_GEN_CTL, &value ); +- } +- +- /* Wait for 500 ms and initialize. +- * I don't remember why I wait this long. +- * I've changed this to 50ms, as it seems long enough. +- */ +- TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_START_LINK ); +- +-} /* TLan_PhyReset */ +- +-void TLan_PhyStartLink( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 ability; +- u16 control; +- u16 data; +- u16 phy; +- u16 status; +- u16 tctl; +- +- phy = priv->phy[priv->phyNum]; +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Trying to activate link.\n", dev->name ); +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &ability ); +- +- if ( ( status & MII_GS_AUTONEG ) && +- ( ! priv->aui ) ) { +- ability = status >> 11; +- if ( priv->speed == TLAN_SPEED_10 && +- priv->duplex == TLAN_DUPLEX_HALF) { +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x0000); +- } else if ( priv->speed == TLAN_SPEED_10 && +- priv->duplex == TLAN_DUPLEX_FULL) { +- priv->tlanFullDuplex = TRUE; +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x0100); +- } else if ( priv->speed == TLAN_SPEED_100 && +- priv->duplex == TLAN_DUPLEX_HALF) { +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x2000); +- } else if ( priv->speed == TLAN_SPEED_100 && +- priv->duplex == TLAN_DUPLEX_FULL) { +- priv->tlanFullDuplex = TRUE; +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x2100); +- } else { +- +- /* Set Auto-Neg advertisement */ +- TLan_MiiWriteReg( dev, phy, MII_AN_ADV, (ability << 5) | 1); +- /* Enablee Auto-Neg */ +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x1000 ); +- /* Restart Auto-Neg */ +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, 0x1200 ); +- /* Wait for 4 sec for autonegotiation +- * to complete. The max spec time is less than this +- * but the card need additional time to start AN. +- * .5 sec should be plenty extra. +- */ +- printk( "TLAN: %s: Starting autonegotiation.\n", dev->name ); +- TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_PHY_FINISH_AN ); +- return; +- } +- +- } +- +- if ( ( priv->aui ) && ( priv->phyNum != 0 ) ) { +- priv->phyNum = 0; +- data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN; +- TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, data ); +- TLan_SetTimer( dev, (40*HZ/1000), TLAN_TIMER_PHY_PDOWN ); +- return; +- } else if ( priv->phyNum == 0 ) { +- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_CTL, &tctl ); +- if ( priv->aui ) { +- tctl |= TLAN_TC_AUISEL; +- } else { +- tctl &= ~TLAN_TC_AUISEL; +- control = 0; +- if ( priv->duplex == TLAN_DUPLEX_FULL ) { +- control |= MII_GC_DUPLEX; +- priv->tlanFullDuplex = TRUE; +- } +- if ( priv->speed == TLAN_SPEED_100 ) { +- control |= MII_GC_SPEEDSEL; +- } +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, control ); +- } +- TLan_MiiWriteReg( dev, phy, TLAN_TLPHY_CTL, tctl ); +- } +- +- /* Wait for 2 sec to give the tranceiver time +- * to establish link. +- */ +- TLan_SetTimer( dev, (4*HZ), TLAN_TIMER_FINISH_RESET ); +- +-} /* TLan_PhyStartLink */ +- +-void TLan_PhyFinishAutoNeg( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 an_adv; +- u16 an_lpa; +- u16 data; +- u16 mode; +- u16 phy; +- u16 status; +- +- phy = priv->phy[priv->phyNum]; +- +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); +- udelay( 1000 ); +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); +- +- if ( ! ( status & MII_GS_AUTOCMPLT ) ) { +- /* Wait for 8 sec to give the process +- * more time. Perhaps we should fail after a while. +- */ +- if (!priv->neg_be_verbose++) { +- printk(KERN_INFO "TLAN: Giving autonegotiation more time.\n"); +- printk(KERN_INFO "TLAN: Please check that your adapter has\n"); +- printk(KERN_INFO "TLAN: been properly connected to a HUB or Switch.\n"); +- printk(KERN_INFO "TLAN: Trying to establish link in the background...\n"); +- } +- TLan_SetTimer( dev, (8*HZ), TLAN_TIMER_PHY_FINISH_AN ); +- return; +- } +- +- printk( "TLAN: %s: Autonegotiation complete.\n", dev->name ); +- TLan_MiiReadReg( dev, phy, MII_AN_ADV, &an_adv ); +- TLan_MiiReadReg( dev, phy, MII_AN_LPA, &an_lpa ); +- mode = an_adv & an_lpa & 0x03E0; +- if ( mode & 0x0100 ) { +- priv->tlanFullDuplex = TRUE; +- } else if ( ! ( mode & 0x0080 ) && ( mode & 0x0040 ) ) { +- priv->tlanFullDuplex = TRUE; +- } +- +- if ( ( ! ( mode & 0x0180 ) ) && ( priv->adapter->flags & TLAN_ADAPTER_USE_INTERN_10 ) && ( priv->phyNum != 0 ) ) { +- priv->phyNum = 0; +- data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN; +- TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, data ); +- TLan_SetTimer( dev, (400*HZ/1000), TLAN_TIMER_PHY_PDOWN ); +- return; +- } +- +- if ( priv->phyNum == 0 ) { +- if ( ( priv->duplex == TLAN_DUPLEX_FULL ) || ( an_adv & an_lpa & 0x0040 ) ) { +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, MII_GC_AUTOENB | MII_GC_DUPLEX ); +- printk( "TLAN: Starting internal PHY with FULL-DUPLEX\n" ); +- } else { +- TLan_MiiWriteReg( dev, phy, MII_GEN_CTL, MII_GC_AUTOENB ); +- printk( "TLAN: Starting internal PHY with HALF-DUPLEX\n" ); +- } +- } +- +- /* Wait for 100 ms. No reason in partiticular. +- */ +- TLan_SetTimer( dev, (HZ/10), TLAN_TIMER_FINISH_RESET ); +- +-} /* TLan_PhyFinishAutoNeg */ +- +-#ifdef MONITOR +- +- /********************************************************************* +- * +- * TLan_phyMonitor +- * +- * Returns: +- * None +- * +- * Params: +- * dev The device structure of this device. +- * +- * +- * This function monitors PHY condition by reading the status +- * register via the MII bus. This can be used to give info +- * about link changes (up/down), and possible switch to alternate +- * media. +- * +- * ******************************************************************/ +- +-void TLan_PhyMonitor( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u16 phy; +- u16 phy_status; +- +- phy = priv->phy[priv->phyNum]; +- +- /* Get PHY status register */ +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &phy_status ); +- +- /* Check if link has been lost */ +- if (!(phy_status & MII_GS_LINK)) { +- if (priv->link) { +- priv->link = 0; +- printk(KERN_DEBUG "TLAN: %s has lost link\n", dev->name); +- dev->flags &= ~IFF_RUNNING; +- TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); +- return; +- } +- } +- +- /* Link restablished? */ +- if ((phy_status & MII_GS_LINK) && !priv->link) { +- priv->link = 1; +- printk(KERN_DEBUG "TLAN: %s has reestablished link\n", dev->name); +- dev->flags |= IFF_RUNNING; +- } +- +- /* Setup a new monitor */ +- TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); +-} +- +-#endif /* MONITOR */ +- +-/***************************************************************************** +-****************************************************************************** +- +- ThunderLAN Driver MII Routines +- +- These routines are based on the information in Chap. 2 of the +- "ThunderLAN Programmer's Guide", pp. 15-24. +- +-****************************************************************************** +-*****************************************************************************/ +- +- /*************************************************************** +- * TLan_MiiReadReg +- * +- * Returns: +- * 0 if ack received ok +- * 1 otherwise. +- * +- * Parms: +- * dev The device structure containing +- * The io address and interrupt count +- * for this device. +- * phy The address of the PHY to be queried. +- * reg The register whose contents are to be +- * retreived. +- * val A pointer to a variable to store the +- * retrieved value. +- * +- * This function uses the TLAN's MII bus to retreive the contents +- * of a given register on a PHY. It sends the appropriate info +- * and then reads the 16-bit register value from the MII bus via +- * the TLAN SIO register. +- * +- **************************************************************/ +- +-int TLan_MiiReadReg( struct net_device *dev, u16 phy, u16 reg, u16 *val ) +-{ +- u8 nack; +- u16 sio, tmp; +- u32 i; +- int err; +- int minten; +- TLanPrivateInfo *priv = dev->priv; +- unsigned long flags = 0; +- +- err = FALSE; +- outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR); +- sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; +- +- if (!in_irq()) +- spin_lock_irqsave(&priv->lock, flags); +- +- TLan_MiiSync(dev->base_addr); +- +- minten = TLan_GetBit( TLAN_NET_SIO_MINTEN, sio ); +- if ( minten ) +- TLan_ClearBit(TLAN_NET_SIO_MINTEN, sio); +- +- TLan_MiiSendData( dev->base_addr, 0x1, 2 ); /* Start ( 01b ) */ +- TLan_MiiSendData( dev->base_addr, 0x2, 2 ); /* Read ( 10b ) */ +- TLan_MiiSendData( dev->base_addr, phy, 5 ); /* Device # */ +- TLan_MiiSendData( dev->base_addr, reg, 5 ); /* Register # */ +- +- TLan_ClearBit(TLAN_NET_SIO_MTXEN, sio); /* Change direction */ +- +- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Clock Idle bit */ +- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); +- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Wait 300ns */ +- +- nack = TLan_GetBit(TLAN_NET_SIO_MDATA, sio); /* Check for ACK */ +- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); /* Finish ACK */ +- if (nack) { /* No ACK, so fake it */ +- for (i = 0; i < 16; i++) { +- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); +- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); +- } +- tmp = 0xffff; +- err = TRUE; +- } else { /* ACK, so read data */ +- for (tmp = 0, i = 0x8000; i; i >>= 1) { +- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); +- if (TLan_GetBit(TLAN_NET_SIO_MDATA, sio)) +- tmp |= i; +- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); +- } +- } +- +- TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Idle cycle */ +- TLan_SetBit(TLAN_NET_SIO_MCLK, sio); +- +- if ( minten ) +- TLan_SetBit(TLAN_NET_SIO_MINTEN, sio); +- +- *val = tmp; +- +- if (!in_irq()) +- spin_unlock_irqrestore(&priv->lock, flags); +- +- return err; +- +-} /* TLan_MiiReadReg */ +- +- /*************************************************************** +- * TLan_MiiSendData +- * +- * Returns: +- * Nothing +- * Parms: +- * base_port The base IO port of the adapter in +- * question. +- * dev The address of the PHY to be queried. +- * data The value to be placed on the MII bus. +- * num_bits The number of bits in data that are to +- * be placed on the MII bus. +- * +- * This function sends on sequence of bits on the MII +- * configuration bus. +- * +- **************************************************************/ +- +-void TLan_MiiSendData( u16 base_port, u32 data, unsigned num_bits ) +-{ +- u16 sio; +- u32 i; +- +- if ( num_bits == 0 ) +- return; +- +- outw( TLAN_NET_SIO, base_port + TLAN_DIO_ADR ); +- sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO; +- TLan_SetBit( TLAN_NET_SIO_MTXEN, sio ); +- +- for ( i = ( 0x1 << ( num_bits - 1 ) ); i; i >>= 1 ) { +- TLan_ClearBit( TLAN_NET_SIO_MCLK, sio ); +- (void) TLan_GetBit( TLAN_NET_SIO_MCLK, sio ); +- if ( data & i ) +- TLan_SetBit( TLAN_NET_SIO_MDATA, sio ); +- else +- TLan_ClearBit( TLAN_NET_SIO_MDATA, sio ); +- TLan_SetBit( TLAN_NET_SIO_MCLK, sio ); +- (void) TLan_GetBit( TLAN_NET_SIO_MCLK, sio ); +- } +- +-} /* TLan_MiiSendData */ +- +- /*************************************************************** +- * TLan_MiiSync +- * +- * Returns: +- * Nothing +- * Parms: +- * base_port The base IO port of the adapter in +- * question. +- * +- * This functions syncs all PHYs in terms of the MII configuration +- * bus. +- * +- **************************************************************/ +- +-void TLan_MiiSync( u16 base_port ) +-{ +- int i; +- u16 sio; +- +- outw( TLAN_NET_SIO, base_port + TLAN_DIO_ADR ); +- sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO; +- +- TLan_ClearBit( TLAN_NET_SIO_MTXEN, sio ); +- for ( i = 0; i < 32; i++ ) { +- TLan_ClearBit( TLAN_NET_SIO_MCLK, sio ); +- TLan_SetBit( TLAN_NET_SIO_MCLK, sio ); +- } +- +-} /* TLan_MiiSync */ +- +- /*************************************************************** +- * TLan_MiiWriteReg +- * +- * Returns: +- * Nothing +- * Parms: +- * dev The device structure for the device +- * to write to. +- * phy The address of the PHY to be written to. +- * reg The register whose contents are to be +- * written. +- * val The value to be written to the register. +- * +- * This function uses the TLAN's MII bus to write the contents of a +- * given register on a PHY. It sends the appropriate info and then +- * writes the 16-bit register value from the MII configuration bus +- * via the TLAN SIO register. +- * +- **************************************************************/ +- +-void TLan_MiiWriteReg( struct net_device *dev, u16 phy, u16 reg, u16 val ) +-{ +- u16 sio; +- int minten; +- unsigned long flags = 0; +- TLanPrivateInfo *priv = dev->priv; +- +- outw(TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR); +- sio = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; +- +- if (!in_irq()) +- spin_lock_irqsave(&priv->lock, flags); +- +- TLan_MiiSync( dev->base_addr ); +- +- minten = TLan_GetBit( TLAN_NET_SIO_MINTEN, sio ); +- if ( minten ) +- TLan_ClearBit( TLAN_NET_SIO_MINTEN, sio ); +- +- TLan_MiiSendData( dev->base_addr, 0x1, 2 ); /* Start ( 01b ) */ +- TLan_MiiSendData( dev->base_addr, 0x1, 2 ); /* Write ( 01b ) */ +- TLan_MiiSendData( dev->base_addr, phy, 5 ); /* Device # */ +- TLan_MiiSendData( dev->base_addr, reg, 5 ); /* Register # */ +- +- TLan_MiiSendData( dev->base_addr, 0x2, 2 ); /* Send ACK */ +- TLan_MiiSendData( dev->base_addr, val, 16 ); /* Send Data */ +- +- TLan_ClearBit( TLAN_NET_SIO_MCLK, sio ); /* Idle cycle */ +- TLan_SetBit( TLAN_NET_SIO_MCLK, sio ); +- +- if ( minten ) +- TLan_SetBit( TLAN_NET_SIO_MINTEN, sio ); +- +- if (!in_irq()) +- spin_unlock_irqrestore(&priv->lock, flags); +- +-} /* TLan_MiiWriteReg */ +-#endif +- +-/************************************************************************** +-RESET - Reset adapter +-***************************************************************************/ +-static void skel_reset(struct nic *nic) +-{ +- /* put the card in its initial state */ +-} +- +-/************************************************************************** +-POLL - Wait for a frame +-***************************************************************************/ +-static int skel_poll(struct nic *nic) +-{ +- /* return true if there's an ethernet packet ready to read */ +- /* nic->packet should contain data on return */ +- /* nic->packetlen should contain length of data */ +- return (0); /* initially as this is called to flush the input */ +-} +- +-/************************************************************************** +-TRANSMIT - Transmit a frame +-***************************************************************************/ +-static void skel_transmit( +- struct nic *nic, +- const char *d, /* Destination */ +- unsigned int t, /* Type */ +- unsigned int s, /* size */ +- const char *p) /* Packet */ +-{ +- /* send the packet to destination */ +-} +- +-/************************************************************************** +-DISABLE - Turn off ethernet interface +-***************************************************************************/ +-static void skel_disable(struct nic *nic) +-{ +-} +- +-/************************************************************************** +-PROBE - Look for an adapter, this routine's visible to the outside +-You should omit the last argument struct pci_device * for a non-PCI NIC +-***************************************************************************/ +-struct nic *tlan_probe(struct nic *nic, unsigned short *probe_addrs, +- struct pci_device *p) +-{ +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- /* if board found */ +- { +- /* point to NIC specific routines */ +- nic->reset = skel_reset; +- nic->poll = skel_poll; +- nic->transmit = skel_transmit; +- nic->disable = skel_disable; +- return nic; +- } +- /* else */ +- return 0; +-} +- +-#if 0 +-#ifndef TLAN_H +-#define TLAN_H +-/******************************************************************** +- * +- * Linux ThunderLAN Driver +- * +- * tlan.h +- * by James Banks +- * +- * (C) 1997-1998 Caldera, Inc. +- * (C) 1999-2001 Torben Mathiasen +- * +- * This software may be used and distributed according to the terms +- * of the GNU General Public License, incorporated herein by reference. +- * +- ** This file is best viewed/edited with tabstop=4, colums>=132 +- * +- * +- * Dec 10, 1999 Torben Mathiasen +- * New Maintainer +- * +- ********************************************************************/ +- +-#include +-#include +-#include +- +-#define FALSE 0 +-#define TRUE 1 +- +-#define TX_TIMEOUT (10*HZ) /* We need time for auto-neg */ +- +-typedef struct tlan_adapter_entry { +- u16 vendorId; +- u16 deviceId; +- char *deviceLabel; +- u32 flags; +- u16 addrOfs; +-} TLanAdapterEntry; +- +- /***************************************************************** +- * EISA Definitions +- * +- ****************************************************************/ +- +-#define EISA_ID 0xc80 /* EISA ID Registers */ +-#define EISA_ID0 0xc80 /* EISA ID Register 0 */ +-#define EISA_ID1 0xc81 /* EISA ID Register 1 */ +-#define EISA_ID2 0xc82 /* EISA ID Register 2 */ +-#define EISA_ID3 0xc83 /* EISA ID Register 3 */ +-#define EISA_CR 0xc84 /* EISA Control Register */ +-#define EISA_REG0 0xc88 /* EISA Configuration Register 0 */ +-#define EISA_REG1 0xc89 /* EISA Configuration Register 1 */ +-#define EISA_REG2 0xc8a /* EISA Configuration Register 2 */ +-#define EISA_REG3 0xc8f /* EISA Configuration Register 3 */ +-#define EISA_APROM 0xc90 /* Ethernet Address PROM */ +- +- /***************************************************************** +- * Rx/Tx List Definitions +- * +- ****************************************************************/ +- +-typedef struct tlan_buffer_ref_tag { +- u32 count; +- u32 address; +-} TLanBufferRef; +- +-typedef struct tlan_list_tag { +- u32 forward; +- u16 cStat; +- u16 frameSize; +- TLanBufferRef buffer[TLAN_BUFFERS_PER_LIST]; +-} TLanList; +- +-typedef u8 TLanBuffer[TLAN_MAX_FRAME_SIZE]; +- +- /***************************************************************** +- * TLAN Private Information Structure +- * +- ****************************************************************/ +- +-typedef struct tlan_private_tag { +- struct net_device *nextDevice; +- void *dmaStorage; +- u8 *padBuffer; +- TLanList *rxList; +- u8 *rxBuffer; +- u32 rxHead; +- u32 rxTail; +- u32 rxEocCount; +- TLanList *txList; +- u8 *txBuffer; +- u32 txHead; +- u32 txInProgress; +- u32 txTail; +- u32 txBusyCount; +- u32 phyOnline; +- u32 timerSetAt; +- u32 timerType; +- struct timer_list timer; +- struct net_device_stats stats; +- struct board *adapter; +- u32 adapterRev; +- u32 aui; +- u32 debug; +- u32 duplex; +- u32 phy[2]; +- u32 phyNum; +- u32 speed; +- u8 tlanRev; +- u8 tlanFullDuplex; +- char devName[8]; +- spinlock_t lock; +- u8 link; +- u8 is_eisa; +- struct tq_struct tlan_tqueue; +- u8 neg_be_verbose; +-} TLanPrivateInfo; +- +-#define TLAN_HC_GO 0x80000000 +-#define TLAN_HC_STOP 0x40000000 +-#define TLAN_HC_ACK 0x20000000 +-#define TLAN_HC_CS_MASK 0x1FE00000 +-#define TLAN_HC_EOC 0x00100000 +-#define TLAN_HC_RT 0x00080000 +-#define TLAN_HC_NES 0x00040000 +-#define TLAN_HC_AD_RST 0x00008000 +-#define TLAN_HC_LD_TMR 0x00004000 +-#define TLAN_HC_LD_THR 0x00002000 +-#define TLAN_HC_REQ_INT 0x00001000 +-#define TLAN_HC_INT_OFF 0x00000800 +-#define TLAN_HC_INT_ON 0x00000400 +-#define TLAN_HC_AC_MASK 0x000000FF +-#define TLAN_DA_ADR_INC 0x8000 +-#define TLAN_DA_RAM_ADR 0x4000 +-#define TLAN_HI_IV_MASK 0x1FE0 +-#define TLAN_HI_IT_MASK 0x001C +- +-#define TLAN_NET_CMD_NRESET 0x80 +-#define TLAN_NET_CMD_NWRAP 0x40 +-#define TLAN_NET_CMD_CSF 0x20 +-#define TLAN_NET_CMD_CAF 0x10 +-#define TLAN_NET_CMD_NOBRX 0x08 +-#define TLAN_NET_CMD_DUPLEX 0x04 +-#define TLAN_NET_CMD_TRFRAM 0x02 +-#define TLAN_NET_CMD_TXPACE 0x01 +-#define TLAN_NET_SIO_MINTEN 0x80 +-#define TLAN_NET_SIO_ECLOK 0x40 +-#define TLAN_NET_SIO_ETXEN 0x20 +-#define TLAN_NET_SIO_EDATA 0x10 +-#define TLAN_NET_SIO_NMRST 0x08 +-#define TLAN_NET_SIO_MCLK 0x04 +-#define TLAN_NET_SIO_MTXEN 0x02 +-#define TLAN_NET_SIO_MDATA 0x01 +-#define TLAN_NET_STS_MIRQ 0x80 +-#define TLAN_NET_STS_HBEAT 0x40 +-#define TLAN_NET_STS_TXSTOP 0x20 +-#define TLAN_NET_STS_RXSTOP 0x10 +-#define TLAN_NET_STS_RSRVD 0x0F +-#define TLAN_NET_MASK_MASK7 0x80 +-#define TLAN_NET_MASK_MASK6 0x40 +-#define TLAN_NET_MASK_MASK5 0x20 +-#define TLAN_NET_MASK_MASK4 0x10 +-#define TLAN_NET_MASK_RSRVD 0x0F +-#define TLAN_NET_CFG_RCLK 0x8000 +-#define TLAN_NET_CFG_TCLK 0x4000 +-#define TLAN_NET_CFG_BIT 0x2000 +-#define TLAN_NET_CFG_RXCRC 0x1000 +-#define TLAN_NET_CFG_PEF 0x0800 +-#define TLAN_NET_CFG_1FRAG 0x0400 +-#define TLAN_NET_CFG_1CHAN 0x0200 +-#define TLAN_NET_CFG_MTEST 0x0100 +-#define TLAN_NET_CFG_PHY_EN 0x0080 +-#define TLAN_NET_CFG_MSMASK 0x007F +-#define TLAN_LED_ACT 0x10 +-#define TLAN_LED_LINK 0x01 +-#define TLAN_ID_TX_EOC 0x04 +-#define TLAN_ID_RX_EOF 0x02 +-#define TLAN_ID_RX_EOC 0x01 +- +-#define CIRC_INC( a, b ) if ( ++a >= b ) a = 0 +- +-#ifdef I_LIKE_A_FAST_HASH_FUNCTION +-/* given 6 bytes, view them as 8 6-bit numbers and return the XOR of those */ +-/* the code below is about seven times as fast as the original code */ +-inline u32 TLan_HashFunc( u8 *a ) +-{ +- u8 hash; +- +- hash = (a[0]^a[3]); /* & 077 */ +- hash ^= ((a[0]^a[3])>>6); /* & 003 */ +- hash ^= ((a[1]^a[4])<<2); /* & 074 */ +- hash ^= ((a[1]^a[4])>>4); /* & 017 */ +- hash ^= ((a[2]^a[5])<<4); /* & 060 */ +- hash ^= ((a[2]^a[5])>>2); /* & 077 */ +- +- return (hash & 077); +-} +- +-#else /* original code */ +- +-inline u32 xor( u32 a, u32 b ) +-{ +- return ( ( a && ! b ) || ( ! a && b ) ); +-} +-#define XOR8( a, b, c, d, e, f, g, h ) xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) ) +-#define DA( a, bit ) ( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) ) +- +-inline u32 TLan_HashFunc( u8 *a ) +-{ +- u32 hash; +- +- hash = XOR8( DA(a,0), DA(a, 6), DA(a,12), DA(a,18), DA(a,24), DA(a,30), DA(a,36), DA(a,42) ); +- hash |= XOR8( DA(a,1), DA(a, 7), DA(a,13), DA(a,19), DA(a,25), DA(a,31), DA(a,37), DA(a,43) ) << 1; +- hash |= XOR8( DA(a,2), DA(a, 8), DA(a,14), DA(a,20), DA(a,26), DA(a,32), DA(a,38), DA(a,44) ) << 2; +- hash |= XOR8( DA(a,3), DA(a, 9), DA(a,15), DA(a,21), DA(a,27), DA(a,33), DA(a,39), DA(a,45) ) << 3; +- hash |= XOR8( DA(a,4), DA(a,10), DA(a,16), DA(a,22), DA(a,28), DA(a,34), DA(a,40), DA(a,46) ) << 4; +- hash |= XOR8( DA(a,5), DA(a,11), DA(a,17), DA(a,23), DA(a,29), DA(a,35), DA(a,41), DA(a,47) ) << 5; +- +- return hash; +- +-} +- +-#endif /* I_LIKE_A_FAST_HASH_FUNCTION */ +-#endif +-/******************************************************************************* +- * +- * Linux ThunderLAN Driver +- * +- * tlan.c +- * by James Banks +- * +- * (C) 1997-1998 Caldera, Inc. +- * (C) 1998 James Banks +- * (C) 1999-2001 Torben Mathiasen +- * +- * This software may be used and distributed according to the terms +- * of the GNU General Public License, incorporated herein by reference. +- * +- ** This file is best viewed/edited with columns>=132. +- * +- ** Useful (if not required) reading: +- * +- * Texas Instruments, ThunderLAN Programmer's Guide, +- * TI Literature Number SPWU013A +- * available in PDF format from www.ti.com +- * Level One, LXT901 and LXT970 Data Sheets +- * available in PDF format from www.level1.com +- * National Semiconductor, DP83840A Data Sheet +- * available in PDF format from www.national.com +- * Microchip Technology, 24C01A/02A/04A Data Sheet +- * available in PDF format from www.microchip.com +- * +- * Change History +- * +- * Tigran Aivazian : TLan_PciProbe() now uses +- * new PCI BIOS interface. +- * Alan Cox : Fixed the out of memory +- * handling. +- * +- * Torben Mathiasen New Maintainer! +- * +- * v1.1 Dec 20, 1999 - Removed linux version checking +- * Patch from Tigran Aivazian. +- * - v1.1 includes Alan's SMP updates. +- * - We still have problems on SMP though, +- * but I'm looking into that. +- * +- * v1.2 Jan 02, 2000 - Hopefully fixed the SMP deadlock. +- * - Removed dependency of HZ being 100. +- * - We now allow higher priority timers to +- * overwrite timers like TLAN_TIMER_ACTIVITY +- * Patch from John Cagle . +- * - Fixed a few compiler warnings. +- * +- * v1.3 Feb 04, 2000 - Fixed the remaining HZ issues. +- * - Removed call to pci_present(). +- * - Removed SA_INTERRUPT flag from irq handler. +- * - Added __init and __initdata to reduce resisdent +- * code size. +- * - Driver now uses module_init/module_exit. +- * - Rewrote init_module and tlan_probe to +- * share a lot more code. We now use tlan_probe +- * with builtin and module driver. +- * - Driver ported to new net API. +- * - tlan.txt has been reworked to reflect current +- * driver (almost) +- * - Other minor stuff +- * +- * v1.4 Feb 10, 2000 - Updated with more changes required after Dave's +- * network cleanup in 2.3.43pre7 (Tigran & myself) +- * - Minor stuff. +- * +- * v1.5 March 22, 2000 - Fixed another timer bug that would hang the driver +- * if no cable/link were present. +- * - Cosmetic changes. +- * - TODO: Port completely to new PCI/DMA API +- * Auto-Neg fallback. +- * +- * v1.6 April 04, 2000 - Fixed driver support for kernel-parameters. Haven't +- * tested it though, as the kernel support is currently +- * broken (2.3.99p4p3). +- * - Updated tlan.txt accordingly. +- * - Adjusted minimum/maximum frame length. +- * - There is now a TLAN website up at +- * http://tlan.kernel.dk +- * +- * v1.7 April 07, 2000 - Started to implement custom ioctls. Driver now +- * reports PHY information when used with Donald +- * Beckers userspace MII diagnostics utility. +- * +- * v1.8 April 23, 2000 - Fixed support for forced speed/duplex settings. +- * - Added link information to Auto-Neg and forced +- * modes. When NIC operates with auto-neg the driver +- * will report Link speed & duplex modes as well as +- * link partner abilities. When forced link is used, +- * the driver will report status of the established +- * link. +- * Please read tlan.txt for additional information. +- * - Removed call to check_region(), and used +- * return value of request_region() instead. +- * +- * v1.8a May 28, 2000 - Minor updates. +- * +- * v1.9 July 25, 2000 - Fixed a few remaining Full-Duplex issues. +- * - Updated with timer fixes from Andrew Morton. +- * - Fixed module race in TLan_Open. +- * - Added routine to monitor PHY status. +- * - Added activity led support for Proliant devices. +- * +- * v1.10 Aug 30, 2000 - Added support for EISA based tlan controllers +- * like the Compaq NetFlex3/E. +- * - Rewrote tlan_probe to better handle multiple +- * bus probes. Probing and device setup is now +- * done through TLan_Probe and TLan_init_one. Actual +- * hardware probe is done with kernel API and +- * TLan_EisaProbe. +- * - Adjusted debug information for probing. +- * - Fixed bug that would cause general debug information +- * to be printed after driver removal. +- * - Added transmit timeout handling. +- * - Fixed OOM return values in tlan_probe. +- * - Fixed possible mem leak in tlan_exit +- * (now tlan_remove_one). +- * - Fixed timer bug in TLan_phyMonitor. +- * - This driver version is alpha quality, please +- * send me any bug issues you may encounter. +- * +- * v1.11 Aug 31, 2000 - Do not try to register irq 0 if no irq line was +- * set for EISA cards. +- * - Added support for NetFlex3/E with nibble-rate +- * 10Base-T PHY. This is untestet as I haven't got +- * one of these cards. +- * - Fixed timer being added twice. +- * - Disabled PhyMonitoring by default as this is +- * work in progress. Define MONITOR to enable it. +- * - Now we don't display link info with PHYs that +- * doesn't support it (level1). +- * - Incresed tx_timeout beacuse of auto-neg. +- * - Adjusted timers for forced speeds. +- * +- * v1.12 Oct 12, 2000 - Minor fixes (memleak, init, etc.) +- * +- * v1.13 Nov 28, 2000 - Stop flooding console with auto-neg issues +- * when link can't be established. +- * - Added the bbuf option as a kernel parameter. +- * - Fixed ioaddr probe bug. +- * - Fixed stupid deadlock with MII interrupts. +- * - Added support for speed/duplex selection with +- * multiple nics. +- * - Added partly fix for TX Channel lockup with +- * TLAN v1.0 silicon. This needs to be investigated +- * further. +- * +- * v1.14 Dec 16, 2000 - Added support for servicing multiple frames per. +- * interrupt. Thanks goes to +- * Adam Keys +- * Denis Beaudoin +- * for providing the patch. +- * - Fixed auto-neg output when using multiple +- * adapters. +- * - Converted to use new taskq interface. +- * +- * v1.14a Jan 6, 2001 - Minor adjustments (spinlocks, etc.) +- * +- *******************************************************************************/ +- +- +-#include +- +-#include "tlan.h" +- +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-typedef u32 (TLanIntVectorFunc)( struct net_device *, u16 ); +- +-/* For removing EISA devices */ +-static struct net_device *TLan_Eisa_Devices; +- +-static int TLanDevicesInstalled; +- +-/* Set speed, duplex and aui settings */ +-static int aui[MAX_TLAN_BOARDS]; +-static int duplex[MAX_TLAN_BOARDS]; +-static int speed[MAX_TLAN_BOARDS]; +-static int boards_found; +- +-MODULE_AUTHOR("Maintainer: Torben Mathiasen "); +-MODULE_DESCRIPTION("Driver for TI ThunderLAN based ethernet PCI adapters"); +-MODULE_LICENSE("GPL"); +- +-MODULE_PARM(aui, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); +-MODULE_PARM(duplex, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); +-MODULE_PARM(speed, "1-" __MODULE_STRING(MAX_TLAN_BOARDS) "i"); +-MODULE_PARM(debug, "i"); +-MODULE_PARM(bbuf, "i"); +-MODULE_PARM_DESC(aui, "ThunderLAN use AUI port(s) (0-1)"); +-MODULE_PARM_DESC(duplex, "ThunderLAN duplex setting(s) (0-default, 1-half, 2-full)"); +-MODULE_PARM_DESC(speed, "ThunderLAN port speen setting(s) (0,10,100)"); +-MODULE_PARM_DESC(debug, "ThunderLAN debug mask"); +-MODULE_PARM_DESC(bbuf, "ThunderLAN use big buffer (0-1)"); +-EXPORT_NO_SYMBOLS; +- +-/* Define this to enable Link beat monitoring */ +-#undef MONITOR +- +-/* Turn on debugging. See linux/Documentation/networking/tlan.txt for details */ +-static int debug; +- +-static int bbuf; +-static u8 *TLanPadBuffer; +-static char TLanSignature[] = "TLAN"; +-static const char tlan_banner[] = "ThunderLAN driver v1.14a\n"; +-static int tlan_have_pci; +-static int tlan_have_eisa; +- +-const char *media[] = { +- "10BaseT-HD ", "10BaseT-FD ","100baseTx-HD ", +- "100baseTx-FD", "100baseT4", 0 +-}; +- +-int media_map[] = { 0x0020, 0x0040, 0x0080, 0x0100, 0x0200,}; +- +-static struct board { +- const char *deviceLabel; +- u32 flags; +- u16 addrOfs; +-} board_info[] __devinitdata = { +- { "Compaq Netelligent 10 T PCI UTP", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, +- { "Compaq Netelligent 10/100 TX PCI UTP", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, +- { "Compaq Integrated NetFlex-3/P", TLAN_ADAPTER_NONE, 0x83 }, +- { "Compaq NetFlex-3/P", TLAN_ADAPTER_UNMANAGED_PHY | TLAN_ADAPTER_BIT_RATE_PHY, 0x83 }, +- { "Compaq NetFlex-3/P", TLAN_ADAPTER_NONE, 0x83 }, +- { "Compaq Netelligent Integrated 10/100 TX UTP", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, +- { "Compaq Netelligent Dual 10/100 TX PCI UTP", TLAN_ADAPTER_NONE, 0x83 }, +- { "Compaq Netelligent 10/100 TX Embedded UTP", TLAN_ADAPTER_NONE, 0x83 }, +- { "Olicom OC-2183/2185", TLAN_ADAPTER_USE_INTERN_10, 0x83 }, +- { "Olicom OC-2325", TLAN_ADAPTER_UNMANAGED_PHY, 0xF8 }, +- { "Olicom OC-2326", TLAN_ADAPTER_USE_INTERN_10, 0xF8 }, +- { "Compaq Netelligent 10/100 TX UTP", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, +- { "Compaq Netelligent 10 T/2 PCI UTP/Coax", TLAN_ADAPTER_NONE, 0x83 }, +- { "Compaq NetFlex-3/E", TLAN_ADAPTER_ACTIVITY_LED | /* EISA card */ +- TLAN_ADAPTER_UNMANAGED_PHY | TLAN_ADAPTER_BIT_RATE_PHY, 0x83 }, +- { "Compaq NetFlex-3/E", TLAN_ADAPTER_ACTIVITY_LED, 0x83 }, /* EISA card */ +-}; +- +-static struct pci_device_id tlan_pci_tbl[] __devinitdata = { +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL10, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3I, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_THUNDER, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETFLEX3B, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100PI, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100D, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 6 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_NETEL100I, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7 }, +- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2183, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, +- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2325, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9 }, +- { PCI_VENDOR_ID_OLICOM, PCI_DEVICE_ID_OLICOM_OC2326, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 10 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_100_WS_5100, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 11 }, +- { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_NETELLIGENT_10_T2, +- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 12 }, +- { 0,} +-}; +-MODULE_DEVICE_TABLE(pci, tlan_pci_tbl); +- +-static void TLan_EisaProbe( void ); +-static void TLan_Eisa_Cleanup( void ); +-static int TLan_Init( struct net_device * ); +-static int TLan_Open( struct net_device *dev ); +-static int TLan_StartTx( struct sk_buff *, struct net_device *); +-static void TLan_HandleInterrupt( int, void *, struct pt_regs *); +-static int TLan_Close( struct net_device *); +-static struct net_device_stats *TLan_GetStats( struct net_device *); +-static void TLan_SetMulticastList( struct net_device *); +-static int TLan_ioctl( struct net_device *dev, struct ifreq *rq, int cmd); +-static int TLan_probe1( struct pci_dev *pdev, long ioaddr, int irq, int rev, const struct pci_device_id *ent); +-static void TLan_tx_timeout( struct net_device *dev); +-static int tlan_init_one( struct pci_dev *pdev, const struct pci_device_id *ent); +- +-static u32 TLan_HandleInvalid( struct net_device *, u16 ); +-static u32 TLan_HandleTxEOF( struct net_device *, u16 ); +-static u32 TLan_HandleStatOverflow( struct net_device *, u16 ); +-static u32 TLan_HandleRxEOF( struct net_device *, u16 ); +-static u32 TLan_HandleDummy( struct net_device *, u16 ); +-static u32 TLan_HandleTxEOC( struct net_device *, u16 ); +-static u32 TLan_HandleStatusCheck( struct net_device *, u16 ); +-static u32 TLan_HandleRxEOC( struct net_device *, u16 ); +- +-static void TLan_Timer( unsigned long ); +- +-static void TLan_ResetLists( struct net_device * ); +-static void TLan_FreeLists( struct net_device * ); +-static void TLan_PrintDio( u16 ); +-static void TLan_PrintList( TLanList *, char *, int ); +-static void TLan_ReadAndClearStats( struct net_device *, int ); +-static void TLan_ResetAdapter( struct net_device * ); +-static void TLan_FinishReset( struct net_device * ); +-static void TLan_SetMac( struct net_device *, int areg, char *mac ); +- +-static void TLan_PhyPrint( struct net_device * ); +-static void TLan_PhyDetect( struct net_device * ); +-static void TLan_PhyPowerDown( struct net_device * ); +-static void TLan_PhyPowerUp( struct net_device * ); +-static void TLan_PhyReset( struct net_device * ); +-static void TLan_PhyStartLink( struct net_device * ); +-static void TLan_PhyFinishAutoNeg( struct net_device * ); +-#ifdef MONITOR +-static void TLan_PhyMonitor( struct net_device * ); +-#endif +- +-/* +-static int TLan_PhyNop( struct net_device * ); +-static int TLan_PhyInternalCheck( struct net_device * ); +-static int TLan_PhyInternalService( struct net_device * ); +-static int TLan_PhyDp83840aCheck( struct net_device * ); +-*/ +- +-static int TLan_MiiReadReg( struct net_device *, u16, u16, u16 * ); +-static void TLan_MiiSendData( u16, u32, unsigned ); +-static void TLan_MiiSync( u16 ); +-static void TLan_MiiWriteReg( struct net_device *, u16, u16, u16 ); +- +-static void TLan_EeSendStart( u16 ); +-static int TLan_EeSendByte( u16, u8, int ); +-static void TLan_EeReceiveByte( u16, u8 *, int ); +-static int TLan_EeReadByte( struct net_device *, u8, u8 * ); +- +-static TLanIntVectorFunc *TLanIntVector[TLAN_INT_NUMBER_OF_INTS] = { +- TLan_HandleInvalid, +- TLan_HandleTxEOF, +- TLan_HandleStatOverflow, +- TLan_HandleRxEOF, +- TLan_HandleDummy, +- TLan_HandleTxEOC, +- TLan_HandleStatusCheck, +- TLan_HandleRxEOC +-}; +- +-static inline void +-TLan_SetTimer( struct net_device *dev, u32 ticks, u32 type ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- unsigned long flags = 0; +- +- if (!in_irq()) +- spin_lock_irqsave(&priv->lock, flags); +- if ( priv->timer.function != NULL && +- priv->timerType != TLAN_TIMER_ACTIVITY ) { +- if (!in_irq()) +- spin_unlock_irqrestore(&priv->lock, flags); +- return; +- } +- priv->timer.function = &TLan_Timer; +- if (!in_irq()) +- spin_unlock_irqrestore(&priv->lock, flags); +- +- priv->timer.data = (unsigned long) dev; +- priv->timerSetAt = jiffies; +- priv->timerType = type; +- mod_timer(&priv->timer, jiffies + ticks); +- +-} /* TLan_SetTimer */ +- +-/***************************************************************************** +-****************************************************************************** +- +- ThunderLAN Driver Primary Functions +- +- These functions are more or less common to all Linux network drivers. +- +-****************************************************************************** +-*****************************************************************************/ +- +- /*************************************************************** +- * tlan_remove_one +- * +- * Returns: +- * Nothing +- * Parms: +- * None +- * +- * Goes through the TLanDevices list and frees the device +- * structs and memory associated with each device (lists +- * and buffers). It also ureserves the IO port regions +- * associated with this device. +- * +- **************************************************************/ +- +-static void __devexit tlan_remove_one( struct pci_dev *pdev) +-{ +- struct net_device *dev = pci_get_drvdata( pdev ); +- TLanPrivateInfo *priv = dev->priv; +- +- unregister_netdev( dev ); +- +- if ( priv->dmaStorage ) { +- kfree( priv->dmaStorage ); +- } +- +- release_region( dev->base_addr, 0x10 ); +- +- kfree( dev ); +- +- pci_set_drvdata( pdev, NULL ); +-} +- +-static struct pci_driver tlan_driver = { +- name: "tlan", +- id_table: tlan_pci_tbl, +- probe: tlan_init_one, +- remove: tlan_remove_one, +-}; +- +-static int __init tlan_probe(void) +-{ +- static int pad_allocated; +- +- printk(KERN_INFO "%s", tlan_banner); +- +- TLanPadBuffer = (u8 *) kmalloc(TLAN_MIN_FRAME_SIZE, +- GFP_KERNEL); +- +- if (TLanPadBuffer == NULL) { +- printk(KERN_ERR "TLAN: Could not allocate memory for pad buffer.\n"); +- return -ENOMEM; +- } +- +- memset(TLanPadBuffer, 0, TLAN_MIN_FRAME_SIZE); +- pad_allocated = 1; +- +- TLAN_DBG(TLAN_DEBUG_PROBE, "Starting PCI Probe....\n"); +- +- /* Use new style PCI probing. Now the kernel will +- do most of this for us */ +- pci_register_driver(&tlan_driver); +- +- TLAN_DBG(TLAN_DEBUG_PROBE, "Starting EISA Probe....\n"); +- TLan_EisaProbe(); +- +- printk(KERN_INFO "TLAN: %d device%s installed, PCI: %d EISA: %d\n", +- TLanDevicesInstalled, TLanDevicesInstalled == 1 ? "" : "s", +- tlan_have_pci, tlan_have_eisa); +- +- if (TLanDevicesInstalled == 0) { +- pci_unregister_driver(&tlan_driver); +- kfree(TLanPadBuffer); +- return -ENODEV; +- } +- return 0; +-} +- +- +-static int __devinit tlan_init_one( struct pci_dev *pdev, +- const struct pci_device_id *ent) +-{ +- return TLan_probe1( pdev, -1, -1, 0, ent); +-} +- +-/* +- *************************************************************** +- * tlan_probe1 +- * +- * Returns: +- * 0 on success, error code on error +- * Parms: +- * none +- * +- * The name is lower case to fit in with all the rest of +- * the netcard_probe names. This function looks for +- * another TLan based adapter, setting it up with the +- * allocated device struct if one is found. +- * tlan_probe has been ported to the new net API and +- * now allocates its own device structure. This function +- * is also used by modules. +- * +- **************************************************************/ +- +-static int __devinit TLan_probe1(struct pci_dev *pdev, +- long ioaddr, int irq, int rev, const struct pci_device_id *ent ) +-{ +- +- struct net_device *dev; +- TLanPrivateInfo *priv; +- u8 pci_rev; +- u16 device_id; +- int reg; +- +- if (pdev && pci_enable_device(pdev)) +- return -EIO; +- +- dev = init_etherdev(NULL, sizeof(TLanPrivateInfo)); +- if (dev == NULL) { +- printk(KERN_ERR "TLAN: Could not allocate memory for device.\n"); +- return -ENOMEM; +- } +- SET_MODULE_OWNER(dev); +- +- priv = dev->priv; +- +- /* Is this a PCI device? */ +- if (pdev) { +- u32 pci_io_base = 0; +- +- priv->adapter = &board_info[ent->driver_data]; +- +- pci_read_config_byte ( pdev, PCI_REVISION_ID, &pci_rev); +- +- for ( reg= 0; reg <= 5; reg ++ ) { +- if (pci_resource_flags(pdev, reg) & IORESOURCE_IO) { +- pci_io_base = pci_resource_start(pdev, reg); +- TLAN_DBG( TLAN_DEBUG_GNRL, "IO mapping is available at %x.\n", +- pci_io_base); +- break; +- } +- } +- if (!pci_io_base) { +- printk(KERN_ERR "TLAN: No IO mappings available\n"); +- unregister_netdev(dev); +- kfree(dev); +- return -ENODEV; +- } +- +- dev->base_addr = pci_io_base; +- dev->irq = pdev->irq; +- priv->adapterRev = pci_rev; +- pci_set_master(pdev); +- pci_set_drvdata(pdev, dev); +- +- } else { /* EISA card */ +- /* This is a hack. We need to know which board structure +- * is suited for this adapter */ +- device_id = inw(ioaddr + EISA_ID2); +- priv->is_eisa = 1; +- if (device_id == 0x20F1) { +- priv->adapter = &board_info[13]; /* NetFlex-3/E */ +- priv->adapterRev = 23; /* TLAN 2.3 */ +- } else { +- priv->adapter = &board_info[14]; +- priv->adapterRev = 10; /* TLAN 1.0 */ +- } +- dev->base_addr = ioaddr; +- dev->irq = irq; +- } +- +- /* Kernel parameters */ +- if (dev->mem_start) { +- priv->aui = dev->mem_start & 0x01; +- priv->duplex = ((dev->mem_start & 0x06) == 0x06) ? 0 : (dev->mem_start & 0x06) >> 1; +- priv->speed = ((dev->mem_start & 0x18) == 0x18) ? 0 : (dev->mem_start & 0x18) >> 3; +- +- if (priv->speed == 0x1) { +- priv->speed = TLAN_SPEED_10; +- } else if (priv->speed == 0x2) { +- priv->speed = TLAN_SPEED_100; +- } +- debug = priv->debug = dev->mem_end; +- } else { +- priv->aui = aui[boards_found]; +- priv->speed = speed[boards_found]; +- priv->duplex = duplex[boards_found]; +- priv->debug = debug; +- } +- +- /* This will be used when we get an adapter error from +- * within our irq handler */ +- INIT_LIST_HEAD(&priv->tlan_tqueue.list); +- priv->tlan_tqueue.sync = 0; +- priv->tlan_tqueue.routine = (void *)(void*)TLan_tx_timeout; +- priv->tlan_tqueue.data = dev; +- +- spin_lock_init(&priv->lock); +- +- if (TLan_Init(dev)) { +- printk(KERN_ERR "TLAN: Could not register device.\n"); +- unregister_netdev(dev); +- kfree(dev); +- return -EAGAIN; +- } else { +- +- TLanDevicesInstalled++; +- boards_found++; +- +- /* pdev is NULL if this is an EISA device */ +- if (pdev) +- tlan_have_pci++; +- else { +- priv->nextDevice = TLan_Eisa_Devices; +- TLan_Eisa_Devices = dev; +- tlan_have_eisa++; +- } +- +- printk(KERN_INFO "TLAN: %s irq=%2d, io=%04x, %s, Rev. %d\n", +- dev->name, +- (int) dev->irq, +- (int) dev->base_addr, +- priv->adapter->deviceLabel, +- priv->adapterRev); +- return 0; +- } +- +-} ++} /* TLan_FinishReset */ + +-static void TLan_Eisa_Cleanup(void) +-{ +- struct net_device *dev; +- TLanPrivateInfo *priv; +- +- while( tlan_have_eisa ) { +- dev = TLan_Eisa_Devices; +- priv = dev->priv; +- if (priv->dmaStorage) { +- kfree(priv->dmaStorage); +- } +- release_region( dev->base_addr, 0x10); +- unregister_netdev( dev ); +- TLan_Eisa_Devices = priv->nextDevice; +- kfree( dev ); +- tlan_have_eisa--; +- } +-} +- +- +-static void __exit tlan_exit(void) +-{ +- pci_unregister_driver(&tlan_driver); +- +- if (tlan_have_eisa) +- TLan_Eisa_Cleanup(); +- +- kfree( TLanPadBuffer ); +- +-} +- +-/* Module loading/unloading */ +-module_init(tlan_probe); +-module_exit(tlan_exit); +- +- /************************************************************** +- * TLan_EisaProbe +- * +- * Returns: 0 on success, 1 otherwise +- * +- * Parms: None +- * +- * +- * This functions probes for EISA devices and calls +- * TLan_probe1 when one is found. +- * +- *************************************************************/ +- +-static void __init TLan_EisaProbe (void) ++/************************************************************************** ++POLL - Wait for a frame ++***************************************************************************/ ++static int tlan_poll(struct nic *nic, int retrieve) + { +- long ioaddr; +- int rc = -ENODEV; +- int irq; +- u16 device_id; +- +- if (!EISA_bus) { +- TLAN_DBG(TLAN_DEBUG_PROBE, "No EISA bus present\n"); +- return; +- } +- +- /* Loop through all slots of the EISA bus */ +- for (ioaddr = 0x1000; ioaddr < 0x9000; ioaddr += 0x1000) { +- +- TLAN_DBG(TLAN_DEBUG_PROBE,"EISA_ID 0x%4x: 0x%4x\n", (int) ioaddr + 0xC80, inw(ioaddr + EISA_ID)); +- TLAN_DBG(TLAN_DEBUG_PROBE,"EISA_ID 0x%4x: 0x%4x\n", (int) ioaddr + 0xC82, inw(ioaddr + EISA_ID2)); ++ /* return true if there's an ethernet packet ready to read */ ++ /* nic->packet should contain data on return */ ++ /* nic->packetlen should contain length of data */ ++ u32 framesize; ++ u32 host_cmd = 0; ++ u32 ack = 1; ++ int eoc = 0; ++ int entry = priv->cur_rx % TLAN_NUM_RX_LISTS; ++ u16 tmpCStat = le32_to_cpu(rx_ring[entry].cStat); ++ u16 host_int = inw(BASE + TLAN_HOST_INT); + +- TLAN_DBG(TLAN_DEBUG_PROBE, "Probing for EISA adapter at IO: 0x%4x : ", +- (int) ioaddr); +- if (request_region(ioaddr, 0x10, TLanSignature) == NULL) +- goto out; +- +- if (inw(ioaddr + EISA_ID) != 0x110E) { +- release_region(ioaddr, 0x10); +- goto out; +- } +- +- device_id = inw(ioaddr + EISA_ID2); +- if (device_id != 0x20F1 && device_id != 0x40F1) { +- release_region (ioaddr, 0x10); +- goto out; +- } +- +- if (inb(ioaddr + EISA_CR) != 0x1) { /* Check if adapter is enabled */ +- release_region (ioaddr, 0x10); +- goto out2; +- } +- +- if (debug == 0x10) +- printk("Found one\n"); ++ if ((tmpCStat & TLAN_CSTAT_FRM_CMP) && !retrieve) ++ return 1; + +- /* Get irq from board */ +- switch (inb(ioaddr + 0xCC0)) { +- case(0x10): +- irq=5; +- break; +- case(0x20): +- irq=9; +- break; +- case(0x40): +- irq=10; +- break; +- case(0x80): +- irq=11; +- break; +- default: +- goto out; +- } +- +- +- /* Setup the newly found eisa adapter */ +- rc = TLan_probe1( NULL, ioaddr, irq, +- 12, NULL); +- continue; +- +- out: +- if (debug == 0x10) +- printk("None found\n"); +- continue; +- +- out2: if (debug == 0x10) +- printk("Card found but it is not enabled, skipping\n"); +- continue; +- +- } ++ outw(host_int, BASE + TLAN_HOST_INT); + +-} /* TLan_EisaProbe */ ++ if (!(tmpCStat & TLAN_CSTAT_FRM_CMP)) ++ return 0; + +- ++ /* printf("PI-1: 0x%hX\n", host_int); */ ++ if (tmpCStat & TLAN_CSTAT_EOC) ++ eoc = 1; + +- /*************************************************************** +- * TLan_Init +- * +- * Returns: +- * 0 on success, error code otherwise. +- * Parms: +- * dev The structure of the device to be +- * init'ed. +- * +- * This function completes the initialization of the +- * device structure and driver. It reserves the IO +- * addresses, allocates memory for the lists and bounce +- * buffers, retrieves the MAC address from the eeprom +- * and assignes the device's methods. +- * +- **************************************************************/ ++ framesize = rx_ring[entry].frameSize; + +-static int TLan_Init( struct net_device *dev ) +-{ +- int dma_size; +- int err; +- int i; +- TLanPrivateInfo *priv; ++ nic->packetlen = framesize; + +- priv = dev->priv; +- +- if (!priv->is_eisa) /* EISA devices have already requested IO */ +- if (!request_region( dev->base_addr, 0x10, TLanSignature )) { +- printk(KERN_ERR "TLAN: %s: IO port region 0x%lx size 0x%x in use.\n", +- dev->name, +- dev->base_addr, +- 0x10 ); +- return -EIO; ++#ifdef EBDEBUG ++ printf(".%d.", framesize); ++#endif ++ ++ memcpy(nic->packet, rxb + ++ (priv->cur_rx * TLAN_MAX_FRAME_SIZE), nic->packetlen); ++ ++ rx_ring[entry].cStat = 0; ++#ifdef EBDEBUG ++ //hex_dump(nic->packet, nic->packetlen); ++ printf("%d", entry); ++#endif ++ entry = (entry + 1) % TLAN_NUM_RX_LISTS; ++ priv->cur_rx = entry; ++ if (eoc) { ++ if ((rx_ring[entry].cStat & TLAN_CSTAT_READY) == ++ TLAN_CSTAT_READY) { ++ ack |= TLAN_HC_GO | TLAN_HC_RT; ++ host_cmd = TLAN_HC_ACK | ack | 0x001C0000; ++ outl(host_cmd, BASE + TLAN_HOST_CMD); + } +- +- if ( bbuf ) { +- dma_size = ( TLAN_NUM_RX_LISTS + TLAN_NUM_TX_LISTS ) +- * ( sizeof(TLanList) + TLAN_MAX_FRAME_SIZE ); + } else { +- dma_size = ( TLAN_NUM_RX_LISTS + TLAN_NUM_TX_LISTS ) +- * ( sizeof(TLanList) ); +- } +- priv->dmaStorage = kmalloc(dma_size, GFP_KERNEL | GFP_DMA); +- if ( priv->dmaStorage == NULL ) { +- printk(KERN_ERR "TLAN: Could not allocate lists and buffers for %s.\n", +- dev->name ); +- release_region( dev->base_addr, 0x10 ); +- return -ENOMEM; +- } +- memset( priv->dmaStorage, 0, dma_size ); +- priv->rxList = (TLanList *) +- ( ( ( (u32) priv->dmaStorage ) + 7 ) & 0xFFFFFFF8 ); +- priv->txList = priv->rxList + TLAN_NUM_RX_LISTS; +- if ( bbuf ) { +- priv->rxBuffer = (u8 *) ( priv->txList + TLAN_NUM_TX_LISTS ); +- priv->txBuffer = priv->rxBuffer +- + ( TLAN_NUM_RX_LISTS * TLAN_MAX_FRAME_SIZE ); +- } +- +- err = 0; +- for ( i = 0; i < 6 ; i++ ) +- err |= TLan_EeReadByte( dev, +- (u8) priv->adapter->addrOfs + i, +- (u8 *) &dev->dev_addr[i] ); +- if ( err ) { +- printk(KERN_ERR "TLAN: %s: Error reading MAC from eeprom: %d\n", +- dev->name, +- err ); +- } +- dev->addr_len = 6; +- +- /* Device methods */ +- dev->open = &TLan_Open; +- dev->hard_start_xmit = &TLan_StartTx; +- dev->stop = &TLan_Close; +- dev->get_stats = &TLan_GetStats; +- dev->set_multicast_list = &TLan_SetMulticastList; +- dev->do_ioctl = &TLan_ioctl; +- dev->tx_timeout = &TLan_tx_timeout; +- dev->watchdog_timeo = TX_TIMEOUT; +- +- return 0; +- +-} /* TLan_Init */ +- +- /*************************************************************** +- * TLan_Open +- * +- * Returns: +- * 0 on success, error code otherwise. +- * Parms: +- * dev Structure of device to be opened. +- * +- * This routine puts the driver and TLAN adapter in a +- * state where it is ready to send and receive packets. +- * It allocates the IRQ, resets and brings the adapter +- * out of reset, and allows interrupts. It also delays +- * the startup for autonegotiation or sends a Rx GO +- * command to the adapter, as appropriate. +- * +- **************************************************************/ +- +-static int TLan_Open( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- int err; +- +- priv->tlanRev = TLan_DioRead8( dev->base_addr, TLAN_DEF_REVISION ); +- err = request_irq( dev->irq, TLan_HandleInterrupt, SA_SHIRQ, TLanSignature, dev ); +- +- if ( err ) { +- printk(KERN_ERR "TLAN: Cannot open %s because IRQ %d is already in use.\n", dev->name, dev->irq ); +- return err; ++ host_cmd = TLAN_HC_ACK | ack | (0x000C0000); ++ outl(host_cmd, BASE + TLAN_HOST_CMD); ++#ifdef EBDEBUG ++ printf("AC: 0x%hX\n", inw(BASE + TLAN_CH_PARM)); ++ host_int = inw(BASE + TLAN_HOST_INT); ++ printf("PI-2: 0x%hX\n", host_int); ++#endif + } +- +- init_timer(&priv->timer); +- netif_start_queue(dev); +- +- /* NOTE: It might not be necessary to read the stats before a +- reset if you don't care what the values are. +- */ +- TLan_ResetLists( dev ); +- TLan_ReadAndClearStats( dev, TLAN_IGNORE ); +- TLan_ResetAdapter( dev ); +- +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Opened. TLAN Chip Rev: %x\n", dev->name, priv->tlanRev ); +- +- return 0; +- +-} /* TLan_Open */ +- +- /************************************************************** +- * TLan_ioctl +- * +- * Returns: +- * 0 on success, error code otherwise +- * Params: +- * dev structure of device to receive ioctl. +- * +- * rq ifreq structure to hold userspace data. +- * +- * cmd ioctl command. +- * +- * +- *************************************************************/ ++ refill_rx(nic); ++ return (1); /* initially as this is called to flush the input */ ++} + +-static int TLan_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ++static void refill_rx(struct nic *nic __unused) + { +- TLanPrivateInfo *priv = dev->priv; +- struct mii_ioctl_data *data = (struct mii_ioctl_data *)&rq->ifr_data; +- u32 phy = priv->phy[priv->phyNum]; +- +- if (!priv->phyOnline) +- return -EAGAIN; +- +- switch(cmd) { +- case SIOCGMIIPHY: /* Get address of MII PHY in use. */ +- case SIOCDEVPRIVATE: /* for binary compat, remove in 2.5 */ +- data->phy_id = phy; +- +- case SIOCGMIIREG: /* Read MII PHY register. */ +- case SIOCDEVPRIVATE+1: /* for binary compat, remove in 2.5 */ +- TLan_MiiReadReg(dev, data->phy_id & 0x1f, data->reg_num & 0x1f, &data->val_out); +- return 0; +- ++ int entry = 0; + +- case SIOCSMIIREG: /* Write MII PHY register. */ +- case SIOCDEVPRIVATE+2: /* for binary compat, remove in 2.5 */ +- if (!capable(CAP_NET_ADMIN)) +- return -EPERM; +- TLan_MiiWriteReg(dev, data->phy_id & 0x1f, data->reg_num & 0x1f, data->val_in); +- return 0; +- default: +- return -EOPNOTSUPP; ++ for (; ++ (priv->cur_rx - priv->dirty_rx + ++ TLAN_NUM_RX_LISTS) % TLAN_NUM_RX_LISTS > 0; ++ priv->dirty_rx = (priv->dirty_rx + 1) % TLAN_NUM_RX_LISTS) { ++ entry = priv->dirty_rx % TLAN_NUM_TX_LISTS; ++ rx_ring[entry].frameSize = TLAN_MAX_FRAME_SIZE; ++ rx_ring[entry].cStat = TLAN_CSTAT_READY; + } +-} /* tlan_ioctl */ +- +- /*************************************************************** +- * TLan_tx_timeout +- * +- * Returns: nothing +- * +- * Params: +- * dev structure of device which timed out +- * during transmit. +- * +- **************************************************************/ +- +-static void TLan_tx_timeout(struct net_device *dev) +-{ +- +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Transmit timed out.\n", dev->name); +- +- /* Ok so we timed out, lets see what we can do about it...*/ +- TLan_FreeLists( dev ); +- TLan_ResetLists( dev ); +- TLan_ReadAndClearStats( dev, TLAN_IGNORE ); +- TLan_ResetAdapter( dev ); +- dev->trans_start = jiffies; +- netif_wake_queue( dev ); + + } +- + +- /*************************************************************** +- * TLan_StartTx +- * +- * Returns: +- * 0 on success, non-zero on failure. +- * Parms: +- * skb A pointer to the sk_buff containing the +- * frame to be sent. +- * dev The device to send the data on. +- * +- * This function adds a frame to the Tx list to be sent +- * ASAP. First it verifies that the adapter is ready and +- * there is room in the queue. Then it sets up the next +- * available list, copies the frame to the corresponding +- * buffer. If the adapter Tx channel is idle, it gives +- * the adapter a Tx Go command on the list, otherwise it +- * sets the forward address of the previous list to point +- * to this one. Then it frees the sk_buff. +- * +- **************************************************************/ ++/* #define EBDEBUG */ ++/************************************************************************** ++TRANSMIT - Transmit a frame ++***************************************************************************/ ++static void tlan_transmit(struct nic *nic, const char *d, /* Destination */ ++ unsigned int t, /* Type */ ++ unsigned int s, /* size */ ++ const char *p) ++{ /* Packet */ ++ u16 nstype; ++ u32 to; ++ struct TLanList *tail_list; ++ struct TLanList *head_list; ++ u8 *tail_buffer; ++ u32 ack = 0; ++ u32 host_cmd; ++ int eoc = 0; ++ u16 tmpCStat; ++#ifdef EBDEBUG ++ u16 host_int = inw(BASE + TLAN_HOST_INT); ++#endif ++ int entry = 0; + +-static int TLan_StartTx( struct sk_buff *skb, struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- TLanList *tail_list; +- u8 *tail_buffer; +- int pad; +- unsigned long flags; +- +- if ( ! priv->phyOnline ) { +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: %s PHY is not ready\n", dev->name ); +- dev_kfree_skb_any(skb); +- return 0; ++#ifdef EBDEBUG ++ printf("INT0-0x%hX\n", host_int); ++#endif ++ ++ if (!priv->phyOnline) { ++ printf("TRANSMIT: %s PHY is not ready\n", priv->nic_name); ++ return; + } + + tail_list = priv->txList + priv->txTail; +- +- if ( tail_list->cStat != TLAN_CSTAT_UNUSED ) { +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: %s is busy (Head=%d Tail=%d)\n", dev->name, priv->txHead, priv->txTail ); +- netif_stop_queue(dev); ++ ++ if (tail_list->cStat != TLAN_CSTAT_UNUSED) { ++ printf("TRANSMIT: %s is busy (Head=%d Tail=%d)\n", ++ priv->nic_name, priv->txList, priv->txTail); ++ tx_ring[entry].cStat = TLAN_CSTAT_UNUSED; + priv->txBusyCount++; +- return 1; ++ return; + } + + tail_list->forward = 0; + +- if ( bbuf ) { +- tail_buffer = priv->txBuffer + ( priv->txTail * TLAN_MAX_FRAME_SIZE ); +- memcpy( tail_buffer, skb->data, skb->len ); +- } else { +- tail_list->buffer[0].address = virt_to_bus( skb->data ); +- tail_list->buffer[9].address = (u32) skb; +- } ++ tail_buffer = txb + (priv->txTail * TLAN_MAX_FRAME_SIZE); + +- pad = TLAN_MIN_FRAME_SIZE - skb->len; +- +- if ( pad > 0 ) { +- tail_list->frameSize = (u16) skb->len + pad; +- tail_list->buffer[0].count = (u32) skb->len; +- tail_list->buffer[1].count = TLAN_LAST_BUFFER | (u32) pad; +- tail_list->buffer[1].address = virt_to_bus( TLanPadBuffer ); +- } else { +- tail_list->frameSize = (u16) skb->len; +- tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) skb->len; +- tail_list->buffer[1].count = 0; +- tail_list->buffer[1].address = 0; +- } ++ /* send the packet to destination */ ++ memcpy(tail_buffer, d, ETH_ALEN); ++ memcpy(tail_buffer + ETH_ALEN, nic->node_addr, ETH_ALEN); ++ nstype = htons((u16) t); ++ memcpy(tail_buffer + 2 * ETH_ALEN, (u8 *) & nstype, 2); ++ memcpy(tail_buffer + ETH_HLEN, p, s); ++ ++ s += ETH_HLEN; ++ s &= 0x0FFF; ++ while (s < ETH_ZLEN) ++ tail_buffer[s++] = '\0'; ++ ++ /*=====================================================*/ ++ /* Receive ++ * 0000 0000 0001 1100 ++ * 0000 0000 0000 1100 ++ * 0000 0000 0000 0011 = 0x0003 ++ * ++ * 0000 0000 0000 0000 0000 0000 0000 0011 ++ * 0000 0000 0000 1100 0000 0000 0000 0000 = 0x000C0000 ++ * ++ * Transmit ++ * 0000 0000 0001 1100 ++ * 0000 0000 0000 0100 ++ * 0000 0000 0000 0001 = 0x0001 ++ * ++ * 0000 0000 0000 0000 0000 0000 0000 0001 ++ * 0000 0000 0000 0100 0000 0000 0000 0000 = 0x00040000 ++ * */ ++ ++ /* Setup the transmit descriptor */ ++ tail_list->frameSize = (u16) s; ++ tail_list->buffer[0].count = TLAN_LAST_BUFFER | (u32) s; ++ tail_list->buffer[1].count = 0; ++ tail_list->buffer[1].address = 0; + +- spin_lock_irqsave(&priv->lock, flags); + tail_list->cStat = TLAN_CSTAT_READY; +- if ( ! priv->txInProgress ) { ++ ++#ifdef EBDEBUG ++ host_int = inw(BASE + TLAN_HOST_INT); ++ printf("INT1-0x%hX\n", host_int); ++#endif ++ ++ if (!priv->txInProgress) { + priv->txInProgress = 1; +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Starting TX on buffer %d\n", priv->txTail ); +- outl( virt_to_bus( tail_list ), dev->base_addr + TLAN_CH_PARM ); +- outl( TLAN_HC_GO, dev->base_addr + TLAN_HOST_CMD ); ++ outl(virt_to_le32desc(tail_list), BASE + TLAN_CH_PARM); ++ outl(TLAN_HC_GO, BASE + TLAN_HOST_CMD); + } else { +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Adding buffer %d to TX channel\n", priv->txTail ); +- if ( priv->txTail == 0 ) { +- ( priv->txList + ( TLAN_NUM_TX_LISTS - 1 ) )->forward = virt_to_bus( tail_list ); ++ if (priv->txTail == 0) { ++#ifdef EBDEBUG ++ printf("Out buffer\n"); ++#endif ++ (priv->txList + (TLAN_NUM_TX_LISTS - 1))->forward = ++ virt_to_le32desc(tail_list); + } else { +- ( priv->txList + ( priv->txTail - 1 ) )->forward = virt_to_bus( tail_list ); ++#ifdef EBDEBUG ++ printf("Fix this \n"); ++#endif ++ (priv->txList + (priv->txTail - 1))->forward = ++ virt_to_le32desc(tail_list); + } + } +- spin_unlock_irqrestore(&priv->lock, flags); +- +- CIRC_INC( priv->txTail, TLAN_NUM_TX_LISTS ); +- +- if ( bbuf ) +- dev_kfree_skb_any(skb); +- +- dev->trans_start = jiffies; +- return 0; +- +-} /* TLan_StartTx */ +- +- /*************************************************************** +- * TLan_HandleInterrupt +- * +- * Returns: +- * Nothing +- * Parms: +- * irq The line on which the interrupt +- * occurred. +- * dev_id A pointer to the device assigned to +- * this irq line. +- * regs ??? +- * +- * This function handles an interrupt generated by its +- * assigned TLAN adapter. The function deactivates +- * interrupts on its adapter, records the type of +- * interrupt, executes the appropriate subhandler, and +- * acknowdges the interrupt to the adapter (thus +- * re-enabling adapter interrupts. +- * +- **************************************************************/ +- +-static void TLan_HandleInterrupt(int irq, void *dev_id, struct pt_regs *regs) +-{ +- u32 ack; +- struct net_device *dev; +- u32 host_cmd; +- u16 host_int; +- int type; +- TLanPrivateInfo *priv; +- +- dev = dev_id; +- priv = dev->priv; +- +- spin_lock(&priv->lock); +- +- host_int = inw( dev->base_addr + TLAN_HOST_INT ); +- outw( host_int, dev->base_addr + TLAN_HOST_INT ); ++ ++ CIRC_INC(priv->txTail, TLAN_NUM_TX_LISTS); + +- type = ( host_int & TLAN_HI_IT_MASK ) >> 2; ++#ifdef EBDEBUG ++ host_int = inw(BASE + TLAN_HOST_INT); ++ printf("INT2-0x%hX\n", host_int); ++#endif + +- ack = TLanIntVector[type]( dev, host_int ); ++ to = currticks() + TX_TIME_OUT; ++ while ((tail_list->cStat == TLAN_CSTAT_READY) && currticks() < to); + +- if ( ack ) { +- host_cmd = TLAN_HC_ACK | ack | ( type << 18 ); +- outl( host_cmd, dev->base_addr + TLAN_HOST_CMD ); ++ head_list = priv->txList + priv->txHead; ++ while (((tmpCStat = head_list->cStat) & TLAN_CSTAT_FRM_CMP) ++ && (ack < 255)) { ++ ack++; ++ if(tmpCStat & TLAN_CSTAT_EOC) ++ eoc =1; ++ head_list->cStat = TLAN_CSTAT_UNUSED; ++ CIRC_INC(priv->txHead, TLAN_NUM_TX_LISTS); ++ head_list = priv->txList + priv->txHead; ++ + } ++ if(!ack) ++ printf("Incomplete TX Frame\n"); + +- spin_unlock(&priv->lock); +- +-} /* TLan_HandleInterrupts */ +- +- /*************************************************************** +- * TLan_Close +- * +- * Returns: +- * An error code. +- * Parms: +- * dev The device structure of the device to +- * close. +- * +- * This function shuts down the adapter. It records any +- * stats, puts the adapter into reset state, deactivates +- * its time as needed, and frees the irq it is using. +- * +- **************************************************************/ +- +-static int TLan_Close(struct net_device *dev) +-{ +- TLanPrivateInfo *priv = dev->priv; +- +- netif_stop_queue(dev); +- priv->neg_be_verbose = 0; +- +- TLan_ReadAndClearStats( dev, TLAN_RECORD ); +- outl( TLAN_HC_AD_RST, dev->base_addr + TLAN_HOST_CMD ); +- if ( priv->timer.function != NULL ) { +- del_timer_sync( &priv->timer ); +- priv->timer.function = NULL; ++ if(eoc) { ++ head_list = priv->txList + priv->txHead; ++ if ((head_list->cStat & TLAN_CSTAT_READY) == TLAN_CSTAT_READY) { ++ outl(virt_to_le32desc(head_list), BASE + TLAN_CH_PARM); ++ ack |= TLAN_HC_GO; ++ } else { ++ priv->txInProgress = 0; ++ } + } +- +- free_irq( dev->irq, dev ); +- TLan_FreeLists( dev ); +- TLAN_DBG( TLAN_DEBUG_GNRL, "Device %s closed.\n", dev->name ); +- +- return 0; +- +-} /* TLan_Close */ +- +- /*************************************************************** +- * TLan_GetStats +- * +- * Returns: +- * A pointer to the device's statistics structure. +- * Parms: +- * dev The device structure to return the +- * stats for. +- * +- * This function updates the devices statistics by reading +- * the TLAN chip's onboard registers. Then it returns the +- * address of the statistics structure. +- * +- **************************************************************/ +- +-static struct net_device_stats *TLan_GetStats( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- int i; +- +- /* Should only read stats if open ? */ +- TLan_ReadAndClearStats( dev, TLAN_RECORD ); +- +- TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE: %s EOC count = %d\n", dev->name, priv->rxEocCount ); +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: %s Busy count = %d\n", dev->name, priv->txBusyCount ); +- if ( debug & TLAN_DEBUG_GNRL ) { +- TLan_PrintDio( dev->base_addr ); +- TLan_PhyPrint( dev ); +- } +- if ( debug & TLAN_DEBUG_LIST ) { +- for ( i = 0; i < TLAN_NUM_RX_LISTS; i++ ) +- TLan_PrintList( priv->rxList + i, "RX", i ); +- for ( i = 0; i < TLAN_NUM_TX_LISTS; i++ ) +- TLan_PrintList( priv->txList + i, "TX", i ); ++ if(ack) { ++ host_cmd = TLAN_HC_ACK | ack; ++ outl(host_cmd, BASE + TLAN_HOST_CMD); + } + +- return ( &( (TLanPrivateInfo *) dev->priv )->stats ); +- +-} /* TLan_GetStats */ +- +- /*************************************************************** +- * TLan_SetMulticastList +- * +- * Returns: +- * Nothing +- * Parms: +- * dev The device structure to set the +- * multicast list for. +- * +- * This function sets the TLAN adaptor to various receive +- * modes. If the IFF_PROMISC flag is set, promiscuous +- * mode is acitviated. Otherwise, promiscuous mode is +- * turned off. If the IFF_ALLMULTI flag is set, then +- * the hash table is set to receive all group addresses. +- * Otherwise, the first three multicast addresses are +- * stored in AREG_1-3, and the rest are selected via the +- * hash table, as necessary. +- * +- **************************************************************/ +- +-static void TLan_SetMulticastList( struct net_device *dev ) +-{ +- struct dev_mc_list *dmi = dev->mc_list; +- u32 hash1 = 0; +- u32 hash2 = 0; +- int i; +- u32 offset; +- u8 tmp; +- +- if ( dev->flags & IFF_PROMISC ) { +- tmp = TLan_DioRead8( dev->base_addr, TLAN_NET_CMD ); +- TLan_DioWrite8( dev->base_addr, TLAN_NET_CMD, tmp | TLAN_NET_CMD_CAF ); +- } else { +- tmp = TLan_DioRead8( dev->base_addr, TLAN_NET_CMD ); +- TLan_DioWrite8( dev->base_addr, TLAN_NET_CMD, tmp & ~TLAN_NET_CMD_CAF ); +- if ( dev->flags & IFF_ALLMULTI ) { +- for ( i = 0; i < 3; i++ ) +- TLan_SetMac( dev, i + 1, NULL ); +- TLan_DioWrite32( dev->base_addr, TLAN_HASH_1, 0xFFFFFFFF ); +- TLan_DioWrite32( dev->base_addr, TLAN_HASH_2, 0xFFFFFFFF ); ++ if(priv->tlanRev < 0x30 ) { ++ ack = 1; ++ head_list = priv->txList + priv->txHead; ++ if ((head_list->cStat & TLAN_CSTAT_READY) == TLAN_CSTAT_READY) { ++ outl(virt_to_le32desc(head_list), BASE + TLAN_CH_PARM); ++ ack |= TLAN_HC_GO; + } else { +- for ( i = 0; i < dev->mc_count; i++ ) { +- if ( i < 3 ) { +- TLan_SetMac( dev, i + 1, (char *) &dmi->dmi_addr ); +- } else { +- offset = TLan_HashFunc( (u8 *) &dmi->dmi_addr ); +- if ( offset < 32 ) +- hash1 |= ( 1 << offset ); +- else +- hash2 |= ( 1 << ( offset - 32 ) ); +- } +- dmi = dmi->next; +- } +- for ( ; i < 3; i++ ) +- TLan_SetMac( dev, i + 1, NULL ); +- TLan_DioWrite32( dev->base_addr, TLAN_HASH_1, hash1 ); +- TLan_DioWrite32( dev->base_addr, TLAN_HASH_2, hash2 ); ++ priv->txInProgress = 0; + } ++ host_cmd = TLAN_HC_ACK | ack | 0x00140000; ++ outl(host_cmd, BASE + TLAN_HOST_CMD); ++ + } ++ ++ if (currticks() >= to) { ++ printf("TX Time Out"); ++ } ++} + +-} /* TLan_SetMulticastList */ +- +-/***************************************************************************** +-****************************************************************************** +- +- ThunderLAN Driver Interrupt Vectors and Table +- +- Please see Chap. 4, "Interrupt Handling" of the "ThunderLAN +- Programmer's Guide" for more informations on handling interrupts +- generated by TLAN based adapters. +- +-****************************************************************************** +-*****************************************************************************/ +- +- /*************************************************************** +- * TLan_HandleInvalid +- * +- * Returns: +- * 0 +- * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This function handles invalid interrupts. This should +- * never happen unless some other adapter is trying to use +- * the IRQ line assigned to the device. +- * +- **************************************************************/ +- +-u32 TLan_HandleInvalid( struct net_device *dev, u16 host_int ) ++/************************************************************************** ++DISABLE - Turn off ethernet interface ++***************************************************************************/ ++#ifdef EB51 ++static void tlan_disable(struct dev *dev __unused) ++#else ++static void tlan_disable(struct nic *nic __unused) ++#endif + { +- /* printk( "TLAN: Invalid interrupt on %s.\n", dev->name ); */ +- return 0; +- +-} /* TLan_HandleInvalid */ +- +- /*************************************************************** +- * TLan_HandleTxEOF +- * +- * Returns: +- * 1 +- * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This function handles Tx EOF interrupts which are raised +- * by the adapter when it has completed sending the +- * contents of a buffer. If detemines which list/buffer +- * was completed and resets it. If the buffer was the last +- * in the channel (EOC), then the function checks to see if +- * another buffer is ready to send, and if so, sends a Tx +- * Go command. Finally, the driver activates/continues the +- * activity LED. ++ /* put the card in its initial state */ ++ /* This function serves 3 purposes. ++ * This disables DMA and interrupts so we don't receive ++ * unexpected packets or interrupts from the card after ++ * etherboot has finished. ++ * This frees resources so etherboot may use ++ * this driver on another interface ++ * This allows etherboot to reinitialize the interface ++ * if something is something goes wrong. + * +- **************************************************************/ ++ */ ++ outl(TLAN_HC_AD_RST, BASE + TLAN_HOST_CMD); ++} + +-u32 TLan_HandleTxEOF( struct net_device *dev, u16 host_int ) ++/************************************************************************** ++IRQ - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void tlan_irq(struct nic *nic __unused, irq_action_t action __unused) + { +- TLanPrivateInfo *priv = dev->priv; +- int eoc = 0; +- TLanList *head_list; +- u32 ack = 0; +- u16 tmpCStat; +- +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Handling TX EOF (Head=%d Tail=%d)\n", priv->txHead, priv->txTail ); +- head_list = priv->txList + priv->txHead; ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} + +- while (((tmpCStat = head_list->cStat ) & TLAN_CSTAT_FRM_CMP) && (ack < 255)) { +- ack++; +- if ( ! bbuf ) { +- dev_kfree_skb_any( (struct sk_buff *) head_list->buffer[9].address ); +- head_list->buffer[9].address = 0; +- } +- +- if ( tmpCStat & TLAN_CSTAT_EOC ) +- eoc = 1; +- +- priv->stats.tx_bytes += head_list->frameSize; ++static void TLan_SetMulticastList(struct nic *nic) { ++ int i; ++ u8 tmp; + +- head_list->cStat = TLAN_CSTAT_UNUSED; +- netif_start_queue(dev); +- CIRC_INC( priv->txHead, TLAN_NUM_TX_LISTS ); +- head_list = priv->txList + priv->txHead; +- } ++ /* !IFF_PROMISC */ ++ tmp = TLan_DioRead8(BASE, TLAN_NET_CMD); ++ TLan_DioWrite8(BASE, TLAN_NET_CMD, tmp & ~TLAN_NET_CMD_CAF); ++ ++ /* IFF_ALLMULTI */ ++ for(i = 0; i< 3; i++) ++ TLan_SetMac(nic, i + 1, NULL); ++ TLan_DioWrite32(BASE, TLAN_HASH_1, 0xFFFFFFFF); ++ TLan_DioWrite32(BASE, TLAN_HASH_2, 0xFFFFFFFF); + +- if (!ack) +- printk(KERN_INFO "TLAN: Received interrupt for uncompleted TX frame.\n"); +- +- if ( eoc ) { +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Handling TX EOC (Head=%d Tail=%d)\n", priv->txHead, priv->txTail ); +- head_list = priv->txList + priv->txHead; +- if ( ( head_list->cStat & TLAN_CSTAT_READY ) == TLAN_CSTAT_READY ) { +- outl( virt_to_bus( head_list ), dev->base_addr + TLAN_CH_PARM ); +- ack |= TLAN_HC_GO; +- } else { +- priv->txInProgress = 0; +- } +- } + +- if ( priv->adapter->flags & TLAN_ADAPTER_ACTIVITY_LED ) { +- TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT ); +- if ( priv->timer.function == NULL ) { +- priv->timer.function = &TLan_Timer; +- priv->timer.data = (unsigned long) dev; +- priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; +- priv->timerSetAt = jiffies; +- priv->timerType = TLAN_TIMER_ACTIVITY; +- add_timer(&priv->timer); +- } else if ( priv->timerType == TLAN_TIMER_ACTIVITY ) { +- priv->timerSetAt = jiffies; ++} ++/************************************************************************** ++PROBE - Look for an adapter, this routine's visible to the outside ++***************************************************************************/ ++ ++#define board_found 1 ++#define valid_link 0 ++#ifdef EB51 ++static int tlan_probe(struct dev *dev, struct pci_device *pci) ++{ ++ struct nic *nic = (struct nic *) dev; ++#else ++struct nic *tlan_probe(struct nic *nic, unsigned short *io_addrs, struct pci_device *pci) ++{ ++#endif ++ u16 data = 0; ++ int err; ++ int i; ++ ++ if (pci->ioaddr == 0) ++ return 0; ++ ++ nic->irqno = 0; ++ nic->ioaddr = pci->ioaddr & ~3; ++ ++ BASE = pci->ioaddr; ++ printf("\n"); ++ printf("tlan.c: %s, %s\n", drv_version, drv_date); ++ printf("%s: Probing for Vendor 0x%hX, Device 0x%hX", ++ pci->name, pci->vendor, pci->dev_id); ++ ++ ++ /* I really must find out what this does */ ++ adjust_pci_device(pci); ++ ++ /* Point to private storage */ ++ priv = &TLanPrivateInfo; ++ /* Figure out which chip we're dealing with */ ++ i = 0; ++ chip_idx = -1; ++ ++ while (tlan_pci_tbl[i].name) { ++ if ((((u32) pci->dev_id << 16) | pci->vendor) == ++ (tlan_pci_tbl[i].id.pci & 0xffffffff)) { ++ chip_idx = i; ++ break; + } ++ i++; + } + +- return ack; ++ priv->vendor_id = pci->vendor; ++ priv->dev_id = pci->dev_id; ++ priv->nic_name = pci->name; ++ priv->eoc = 0; + +-} /* TLan_HandleTxEOF */ ++ err = 0; ++ for (i = 0; i < 6; i++) ++ err |= TLan_EeReadByte(BASE, ++ (u8) tlan_pci_tbl[chip_idx]. ++ addrOfs + i, ++ (u8 *) & nic->node_addr[i]); ++ if (err) { ++ printf("TLAN: %s: Error reading MAC from eeprom: %d\n", ++ pci->name, err); ++ } else ++ printf("\nAddress: %!\n", nic->node_addr); + +- /*************************************************************** +- * TLan_HandleStatOverflow +- * +- * Returns: +- * 1 +- * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This function handles the Statistics Overflow interrupt +- * which means that one or more of the TLAN statistics +- * registers has reached 1/2 capacity and needs to be read. +- * +- **************************************************************/ ++ priv->tlanRev = TLan_DioRead8(BASE, TLAN_DEF_REVISION); ++ printf("\nRevision = 0x%hX\n", priv->tlanRev); + +-u32 TLan_HandleStatOverflow( struct net_device *dev, u16 host_int ) +-{ +- TLan_ReadAndClearStats( dev, TLAN_RECORD ); ++ TLan_ResetLists(nic); ++ TLan_ResetAdapter(nic); ++/* ++ data = inl(BASE + TLAN_HOST_CMD); ++ data |= TLAN_HC_EOC; ++ outw(data, BASE + TLAN_HOST_CMD); ++*/ ++ ++ data = inl(BASE + TLAN_HOST_CMD); ++ data |= TLAN_HC_INT_OFF; ++ outw(data, BASE + TLAN_HOST_CMD); + ++ TLan_SetMulticastList(nic); ++ udelay(100); ++ priv->txList = tx_ring; ++ priv->rxList = rx_ring; ++/* if (board_found && valid_link) ++ {*/ ++ /* point to NIC specific routines */ ++#ifdef EB51 ++ dev->disable = tlan_disable; ++ nic->poll = tlan_poll; ++ nic->transmit = tlan_transmit; ++ nic->irq = tlan_irq; + return 1; ++#else ++ nic->disable = tlan_disable; ++ nic->poll = tlan_poll; ++ nic->transmit = tlan_transmit; ++ nic->irq = tlan_irq; ++ return nic; ++#endif ++} ++ ++ ++/***************************************************************************** ++****************************************************************************** ++ ++ ThunderLAN Driver Eeprom routines ++ ++ The Compaq Netelligent 10 and 10/100 cards use a Microchip 24C02A ++ EEPROM. These functions are based on information in Microchip's ++ data sheet. I don't know how well this functions will work with ++ other EEPROMs. ++ ++****************************************************************************** ++*****************************************************************************/ + +-} /* TLan_HandleStatOverflow */ + + /*************************************************************** +- * TLan_HandleRxEOF ++ * TLan_EeSendStart + * + * Returns: +- * 1 ++ * Nothing + * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This function handles the Rx EOF interrupt which +- * indicates a frame has been received by the adapter from +- * the net and the frame has been transferred to memory. +- * The function determines the bounce buffer the frame has +- * been loaded into, creates a new sk_buff big enough to +- * hold the frame, and sends it to protocol stack. It +- * then resets the used buffer and appends it to the end +- * of the list. If the frame was the last in the Rx +- * channel (EOC), the function restarts the receive channel +- * by sending an Rx Go command to the adapter. Then it +- * activates/continues the activity LED. ++ * io_base The IO port base address for the ++ * TLAN device with the EEPROM to ++ * use. ++ * ++ * This function sends a start cycle to an EEPROM attached ++ * to a TLAN chip. + * + **************************************************************/ + +-u32 TLan_HandleRxEOF( struct net_device *dev, u16 host_int ) ++void TLan_EeSendStart(u16 io_base) + { +- TLanPrivateInfo *priv = dev->priv; +- u32 ack = 0; +- int eoc = 0; +- u8 *head_buffer; +- TLanList *head_list; +- struct sk_buff *skb; +- TLanList *tail_list; +- void *t; +- u32 frameSize; +- u16 tmpCStat; +- +- TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE: Handling RX EOF (Head=%d Tail=%d)\n", priv->rxHead, priv->rxTail ); +- head_list = priv->rxList + priv->rxHead; +- +- while (((tmpCStat = head_list->cStat) & TLAN_CSTAT_FRM_CMP) && (ack < 255)) { +- frameSize = head_list->frameSize; +- ack++; +- if (tmpCStat & TLAN_CSTAT_EOC) +- eoc = 1; +- +- if (bbuf) { +- skb = dev_alloc_skb(frameSize + 7); +- if (skb == NULL) +- printk(KERN_INFO "TLAN: Couldn't allocate memory for received data.\n"); +- else { +- head_buffer = priv->rxBuffer + (priv->rxHead * TLAN_MAX_FRAME_SIZE); +- skb->dev = dev; +- skb_reserve(skb, 2); +- t = (void *) skb_put(skb, frameSize); +- +- priv->stats.rx_bytes += head_list->frameSize; +- +- memcpy( t, head_buffer, frameSize ); +- skb->protocol = eth_type_trans( skb, dev ); +- netif_rx( skb ); +- } +- } else { +- struct sk_buff *new_skb; +- +- /* +- * I changed the algorithm here. What we now do +- * is allocate the new frame. If this fails we +- * simply recycle the frame. +- */ +- +- new_skb = dev_alloc_skb( TLAN_MAX_FRAME_SIZE + 7 ); +- +- if ( new_skb != NULL ) { +- /* If this ever happened it would be a problem */ +- /* not any more - ac */ +- skb = (struct sk_buff *) head_list->buffer[9].address; +- skb_trim( skb, frameSize ); +- +- priv->stats.rx_bytes += frameSize; ++ u16 sio; + +- skb->protocol = eth_type_trans( skb, dev ); +- netif_rx( skb ); +- +- new_skb->dev = dev; +- skb_reserve( new_skb, 2 ); +- t = (void *) skb_put( new_skb, TLAN_MAX_FRAME_SIZE ); +- head_list->buffer[0].address = virt_to_bus( t ); +- head_list->buffer[8].address = (u32) t; +- head_list->buffer[9].address = (u32) new_skb; +- } else +- printk(KERN_WARNING "TLAN: Couldn't allocate memory for received data.\n" ); +- } ++ outw(TLAN_NET_SIO, io_base + TLAN_DIO_ADR); ++ sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; + +- head_list->forward = 0; +- head_list->cStat = 0; +- tail_list = priv->rxList + priv->rxTail; +- tail_list->forward = virt_to_bus( head_list ); +- +- CIRC_INC( priv->rxHead, TLAN_NUM_RX_LISTS ); +- CIRC_INC( priv->rxTail, TLAN_NUM_RX_LISTS ); +- head_list = priv->rxList + priv->rxHead; +- } ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); ++ TLan_SetBit(TLAN_NET_SIO_ETXEN, sio); ++ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); ++ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); + +- if (!ack) +- printk(KERN_INFO "TLAN: Received interrupt for uncompleted RX frame.\n"); +- ++} /* TLan_EeSendStart */ + +- if ( eoc ) { +- TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE: Handling RX EOC (Head=%d Tail=%d)\n", priv->rxHead, priv->rxTail ); +- head_list = priv->rxList + priv->rxHead; +- outl( virt_to_bus( head_list ), dev->base_addr + TLAN_CH_PARM ); +- ack |= TLAN_HC_GO | TLAN_HC_RT; +- priv->rxEocCount++; +- } +- +- if ( priv->adapter->flags & TLAN_ADAPTER_ACTIVITY_LED ) { +- TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK | TLAN_LED_ACT ); +- if ( priv->timer.function == NULL ) { +- priv->timer.function = &TLan_Timer; +- priv->timer.data = (unsigned long) dev; +- priv->timer.expires = jiffies + TLAN_TIMER_ACT_DELAY; +- priv->timerSetAt = jiffies; +- priv->timerType = TLAN_TIMER_ACTIVITY; +- add_timer(&priv->timer); +- } else if ( priv->timerType == TLAN_TIMER_ACTIVITY ) { +- priv->timerSetAt = jiffies; +- } +- } + +- dev->last_rx = jiffies; +- +- return ack; + +-} /* TLan_HandleRxEOF */ + + /*************************************************************** +- * TLan_HandleDummy ++ * TLan_EeSendByte + * + * Returns: +- * 1 +- * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This function handles the Dummy interrupt, which is +- * raised whenever a test interrupt is generated by setting +- * the Req_Int bit of HOST_CMD to 1. ++ * If the correct ack was received, 0, otherwise 1 ++ * Parms: io_base The IO port base address for the ++ * TLAN device with the EEPROM to ++ * use. ++ * data The 8 bits of information to ++ * send to the EEPROM. ++ * stop If TLAN_EEPROM_STOP is passed, a ++ * stop cycle is sent after the ++ * byte is sent after the ack is ++ * read. ++ * ++ * This function sends a byte on the serial EEPROM line, ++ * driving the clock to send each bit. The function then ++ * reverses transmission direction and reads an acknowledge ++ * bit. + * + **************************************************************/ + +-u32 TLan_HandleDummy( struct net_device *dev, u16 host_int ) ++int TLan_EeSendByte(u16 io_base, u8 data, int stop) + { +- printk( "TLAN: Test interrupt on %s.\n", dev->name ); +- return 1; ++ int err; ++ u8 place; ++ u16 sio; + +-} /* TLan_HandleDummy */ ++ outw(TLAN_NET_SIO, io_base + TLAN_DIO_ADR); ++ sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; + +- /*************************************************************** +- * TLan_HandleTxEOC +- * +- * Returns: +- * 1 +- * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This driver is structured to determine EOC occurances by +- * reading the CSTAT member of the list structure. Tx EOC +- * interrupts are disabled via the DIO INTDIS register. +- * However, TLAN chips before revision 3.0 didn't have this +- * functionality, so process EOC events if this is the +- * case. +- * +- **************************************************************/ ++ /* Assume clock is low, tx is enabled; */ ++ for (place = 0x80; place != 0; place >>= 1) { ++ if (place & data) ++ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); ++ else ++ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); ++ } ++ TLan_ClearBit(TLAN_NET_SIO_ETXEN, sio); ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ err = TLan_GetBit(TLAN_NET_SIO_EDATA, sio); ++ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_SetBit(TLAN_NET_SIO_ETXEN, sio); + +-u32 TLan_HandleTxEOC( struct net_device *dev, u16 host_int ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- TLanList *head_list; +- u32 ack = 1; +- +- host_int = 0; +- if ( priv->tlanRev < 0x30 ) { +- TLAN_DBG( TLAN_DEBUG_TX, "TRANSMIT: Handling TX EOC (Head=%d Tail=%d) -- IRQ\n", priv->txHead, priv->txTail ); +- head_list = priv->txList + priv->txHead; +- if ( ( head_list->cStat & TLAN_CSTAT_READY ) == TLAN_CSTAT_READY ) { +- netif_stop_queue(dev); +- outl( virt_to_bus( head_list ), dev->base_addr + TLAN_CH_PARM ); +- ack |= TLAN_HC_GO; +- } else { +- priv->txInProgress = 0; +- } ++ if ((!err) && stop) { ++ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); /* STOP, raise data while clock is high */ ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); + } + +- return ack; ++ return (err); ++ ++} /* TLan_EeSendByte */ ++ ++ + +-} /* TLan_HandleTxEOC */ + + /*************************************************************** +- * TLan_HandleStatusCheck ++ * TLan_EeReceiveByte + * + * Returns: +- * 0 if Adapter check, 1 if Network Status check. ++ * Nothing + * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This function handles Adapter Check/Network Status +- * interrupts generated by the adapter. It checks the +- * vector in the HOST_INT register to determine if it is +- * an Adapter Check interrupt. If so, it resets the +- * adapter. Otherwise it clears the status registers +- * and services the PHY. ++ * io_base The IO port base address for the ++ * TLAN device with the EEPROM to ++ * use. ++ * data An address to a char to hold the ++ * data sent from the EEPROM. ++ * stop If TLAN_EEPROM_STOP is passed, a ++ * stop cycle is sent after the ++ * byte is received, and no ack is ++ * sent. ++ * ++ * This function receives 8 bits of data from the EEPROM ++ * over the serial link. It then sends and ack bit, or no ++ * ack and a stop bit. This function is used to retrieve ++ * data after the address of a byte in the EEPROM has been ++ * sent. + * + **************************************************************/ + +-u32 TLan_HandleStatusCheck( struct net_device *dev, u16 host_int ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- u32 ack; +- u32 error; +- u8 net_sts; +- u32 phy; +- u16 tlphy_ctl; +- u16 tlphy_sts; +- +- ack = 1; +- if ( host_int & TLAN_HI_IV_MASK ) { +- netif_stop_queue( dev ); +- error = inl( dev->base_addr + TLAN_CH_PARM ); +- printk( "TLAN: %s: Adaptor Error = 0x%x\n", dev->name, error ); +- TLan_ReadAndClearStats( dev, TLAN_RECORD ); +- outl( TLAN_HC_AD_RST, dev->base_addr + TLAN_HOST_CMD ); +- +- queue_task(&priv->tlan_tqueue, &tq_immediate); +- mark_bh(IMMEDIATE_BH); +- +- netif_wake_queue(dev); +- ack = 0; +- } else { +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Status Check\n", dev->name ); +- phy = priv->phy[priv->phyNum]; ++void TLan_EeReceiveByte(u16 io_base, u8 * data, int stop) ++{ ++ u8 place; ++ u16 sio; + +- net_sts = TLan_DioRead8( dev->base_addr, TLAN_NET_STS ); +- if ( net_sts ) { +- TLan_DioWrite8( dev->base_addr, TLAN_NET_STS, net_sts ); +- TLAN_DBG( TLAN_DEBUG_GNRL, "%s: Net_Sts = %x\n", dev->name, (unsigned) net_sts ); +- } +- if ( ( net_sts & TLAN_NET_STS_MIRQ ) && ( priv->phyNum == 0 ) ) { +- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_STS, &tlphy_sts ); +- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_CTL, &tlphy_ctl ); +- if ( ! ( tlphy_sts & TLAN_TS_POLOK ) && ! ( tlphy_ctl & TLAN_TC_SWAPOL ) ) { +- tlphy_ctl |= TLAN_TC_SWAPOL; +- TLan_MiiWriteReg( dev, phy, TLAN_TLPHY_CTL, tlphy_ctl); +- } else if ( ( tlphy_sts & TLAN_TS_POLOK ) && ( tlphy_ctl & TLAN_TC_SWAPOL ) ) { +- tlphy_ctl &= ~TLAN_TC_SWAPOL; +- TLan_MiiWriteReg( dev, phy, TLAN_TLPHY_CTL, tlphy_ctl); +- } ++ outw(TLAN_NET_SIO, io_base + TLAN_DIO_ADR); ++ sio = io_base + TLAN_DIO_DATA + TLAN_NET_SIO; ++ *data = 0; + +- if (debug) { +- TLan_PhyPrint( dev ); +- } +- } ++ /* Assume clock is low, tx is enabled; */ ++ TLan_ClearBit(TLAN_NET_SIO_ETXEN, sio); ++ for (place = 0x80; place; place >>= 1) { ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ if (TLan_GetBit(TLAN_NET_SIO_EDATA, sio)) ++ *data |= place; ++ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); ++ } ++ ++ TLan_SetBit(TLAN_NET_SIO_ETXEN, sio); ++ if (!stop) { ++ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); /* Ack = 0 */ ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); ++ } else { ++ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); /* No ack = 1 (?) */ ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_ClearBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_ClearBit(TLAN_NET_SIO_EDATA, sio); /* STOP, raise data while clock is high */ ++ TLan_SetBit(TLAN_NET_SIO_ECLOK, sio); ++ TLan_SetBit(TLAN_NET_SIO_EDATA, sio); + } + +- return ack; ++} /* TLan_EeReceiveByte */ ++ + +-} /* TLan_HandleStatusCheck */ + + /*************************************************************** +- * TLan_HandleRxEOC ++ * TLan_EeReadByte + * + * Returns: +- * 1 ++ * No error = 0, else, the stage at which the error ++ * occurred. + * Parms: +- * dev Device assigned the IRQ that was +- * raised. +- * host_int The contents of the HOST_INT +- * port. +- * +- * This driver is structured to determine EOC occurances by +- * reading the CSTAT member of the list structure. Rx EOC +- * interrupts are disabled via the DIO INTDIS register. +- * However, TLAN chips before revision 3.0 didn't have this +- * CSTAT member or a INTDIS register, so if this chip is +- * pre-3.0, process EOC interrupts normally. ++ * io_base The IO port base address for the ++ * TLAN device with the EEPROM to ++ * use. ++ * ee_addr The address of the byte in the ++ * EEPROM whose contents are to be ++ * retrieved. ++ * data An address to a char to hold the ++ * data obtained from the EEPROM. ++ * ++ * This function reads a byte of information from an byte ++ * cell in the EEPROM. + * + **************************************************************/ + +-u32 TLan_HandleRxEOC( struct net_device *dev, u16 host_int ) ++int TLan_EeReadByte(u16 io_base, u8 ee_addr, u8 * data) + { +- TLanPrivateInfo *priv = dev->priv; +- TLanList *head_list; +- u32 ack = 1; ++ int err; ++ int ret = 0; + +- if ( priv->tlanRev < 0x30 ) { +- TLAN_DBG( TLAN_DEBUG_RX, "RECEIVE: Handling RX EOC (Head=%d Tail=%d) -- IRQ\n", priv->rxHead, priv->rxTail ); +- head_list = priv->rxList + priv->rxHead; +- outl( virt_to_bus( head_list ), dev->base_addr + TLAN_CH_PARM ); +- ack |= TLAN_HC_GO | TLAN_HC_RT; +- priv->rxEocCount++; ++ ++ TLan_EeSendStart(io_base); ++ err = TLan_EeSendByte(io_base, 0xA0, TLAN_EEPROM_ACK); ++ if (err) { ++ ret = 1; ++ goto fail; ++ } ++ err = TLan_EeSendByte(io_base, ee_addr, TLAN_EEPROM_ACK); ++ if (err) { ++ ret = 2; ++ goto fail; ++ } ++ TLan_EeSendStart(io_base); ++ err = TLan_EeSendByte(io_base, 0xA1, TLAN_EEPROM_ACK); ++ if (err) { ++ ret = 3; ++ goto fail; + } ++ TLan_EeReceiveByte(io_base, data, TLAN_EEPROM_STOP); ++ fail: + +- return ack; ++ return ret; ++ ++} /* TLan_EeReadByte */ + +-} /* TLan_HandleRxEOC */ + + /***************************************************************************** + ****************************************************************************** + +- ThunderLAN Driver Timer Function ++ ThunderLAN Driver MII Routines ++ ++ These routines are based on the information in Chap. 2 of the ++ "ThunderLAN Programmer's Guide", pp. 15-24. + + ****************************************************************************** + *****************************************************************************/ + ++ + /*************************************************************** +- * TLan_Timer ++ * TLan_MiiReadReg + * + * Returns: +- * Nothing ++ * 0 if ack received ok ++ * 1 otherwise. ++ * + * Parms: +- * data A value given to add timer when +- * add_timer was called. ++ * dev The device structure containing ++ * The io address and interrupt count ++ * for this device. ++ * phy The address of the PHY to be queried. ++ * reg The register whose contents are to be ++ * retreived. ++ * val A pointer to a variable to store the ++ * retrieved value. + * +- * This function handles timed functionality for the +- * TLAN driver. The two current timer uses are for +- * delaying for autonegotionation and driving the ACT LED. +- * - Autonegotiation requires being allowed about +- * 2 1/2 seconds before attempting to transmit a +- * packet. It would be a very bad thing to hang +- * the kernel this long, so the driver doesn't +- * allow transmission 'til after this time, for +- * certain PHYs. It would be much nicer if all +- * PHYs were interrupt-capable like the internal +- * PHY. +- * - The ACT LED, which shows adapter activity, is +- * driven by the driver, and so must be left on +- * for a short period to power up the LED so it +- * can be seen. This delay can be changed by +- * changing the TLAN_TIMER_ACT_DELAY in tlan.h, +- * if desired. 100 ms produces a slightly +- * sluggish response. ++ * This function uses the TLAN's MII bus to retreive the contents ++ * of a given register on a PHY. It sends the appropriate info ++ * and then reads the 16-bit register value from the MII bus via ++ * the TLAN SIO register. + * + **************************************************************/ + +-void TLan_Timer( unsigned long data ) ++int TLan_MiiReadReg(struct nic *nic __unused, u16 phy, u16 reg, u16 * val) + { +- struct net_device *dev = (struct net_device *) data; +- TLanPrivateInfo *priv = dev->priv; +- u32 elapsed; +- unsigned long flags = 0; +- +- priv->timer.function = NULL; +- +- switch ( priv->timerType ) { +-#ifdef MONITOR +- case TLAN_TIMER_LINK_BEAT: +- TLan_PhyMonitor( dev ); +- break; +-#endif +- case TLAN_TIMER_PHY_PDOWN: +- TLan_PhyPowerDown( dev ); +- break; +- case TLAN_TIMER_PHY_PUP: +- TLan_PhyPowerUp( dev ); +- break; +- case TLAN_TIMER_PHY_RESET: +- TLan_PhyReset( dev ); +- break; +- case TLAN_TIMER_PHY_START_LINK: +- TLan_PhyStartLink( dev ); +- break; +- case TLAN_TIMER_PHY_FINISH_AN: +- TLan_PhyFinishAutoNeg( dev ); +- break; +- case TLAN_TIMER_FINISH_RESET: +- TLan_FinishReset( dev ); +- break; +- case TLAN_TIMER_ACTIVITY: +- spin_lock_irqsave(&priv->lock, flags); +- if ( priv->timer.function == NULL ) { +- elapsed = jiffies - priv->timerSetAt; +- if ( elapsed >= TLAN_TIMER_ACT_DELAY ) { +- TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK ); +- } else { +- priv->timer.function = &TLan_Timer; +- priv->timer.expires = priv->timerSetAt + TLAN_TIMER_ACT_DELAY; +- spin_unlock_irqrestore(&priv->lock, flags); +- add_timer( &priv->timer ); +- break; +- } +- } +- spin_unlock_irqrestore(&priv->lock, flags); +- break; +- default: +- break; ++ u8 nack; ++ u16 sio, tmp; ++ u32 i; ++ int err; ++ int minten; ++ ++ err = FALSE; ++ outw(TLAN_NET_SIO, BASE + TLAN_DIO_ADR); ++ sio = BASE + TLAN_DIO_DATA + TLAN_NET_SIO; ++ ++ TLan_MiiSync(BASE); ++ ++ minten = TLan_GetBit(TLAN_NET_SIO_MINTEN, sio); ++ if (minten) ++ TLan_ClearBit(TLAN_NET_SIO_MINTEN, sio); ++ ++ TLan_MiiSendData(BASE, 0x1, 2); /* Start ( 01b ) */ ++ TLan_MiiSendData(BASE, 0x2, 2); /* Read ( 10b ) */ ++ TLan_MiiSendData(BASE, phy, 5); /* Device # */ ++ TLan_MiiSendData(BASE, reg, 5); /* Register # */ ++ ++ ++ TLan_ClearBit(TLAN_NET_SIO_MTXEN, sio); /* Change direction */ ++ ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Clock Idle bit */ ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Wait 300ns */ ++ ++ nack = TLan_GetBit(TLAN_NET_SIO_MDATA, sio); /* Check for ACK */ ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); /* Finish ACK */ ++ if (nack) { /* No ACK, so fake it */ ++ for (i = 0; i < 16; i++) { ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); ++ } ++ tmp = 0xffff; ++ err = TRUE; ++ } else { /* ACK, so read data */ ++ for (tmp = 0, i = 0x8000; i; i >>= 1) { ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); ++ if (TLan_GetBit(TLAN_NET_SIO_MDATA, sio)) ++ tmp |= i; ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); ++ } + } + +-} /* TLan_Timer */ + +-/***************************************************************************** +-****************************************************************************** ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Idle cycle */ ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); + +- ThunderLAN Driver Adapter Related Routines ++ if (minten) ++ TLan_SetBit(TLAN_NET_SIO_MINTEN, sio); + +-****************************************************************************** +-*****************************************************************************/ ++ *val = tmp; ++ ++ return err; ++ ++} /* TLan_MiiReadReg */ + + /*************************************************************** +- * TLan_ResetLists +- * ++ * TLan_MiiSendData ++ * + * Returns: + * Nothing + * Parms: +- * dev The device structure with the list +- * stuctures to be reset. ++ * base_port The base IO port of the adapter in ++ * question. ++ * dev The address of the PHY to be queried. ++ * data The value to be placed on the MII bus. ++ * num_bits The number of bits in data that are to ++ * be placed on the MII bus. + * +- * This routine sets the variables associated with managing +- * the TLAN lists to their initial values. ++ * This function sends on sequence of bits on the MII ++ * configuration bus. + * + **************************************************************/ + +-void TLan_ResetLists( struct net_device *dev ) ++void TLan_MiiSendData(u16 base_port, u32 data, unsigned num_bits) + { +- TLanPrivateInfo *priv = dev->priv; +- int i; +- TLanList *list; +- struct sk_buff *skb; +- void *t = NULL; ++ u16 sio; ++ u32 i; + +- priv->txHead = 0; +- priv->txTail = 0; +- for ( i = 0; i < TLAN_NUM_TX_LISTS; i++ ) { +- list = priv->txList + i; +- list->cStat = TLAN_CSTAT_UNUSED; +- if ( bbuf ) { +- list->buffer[0].address = virt_to_bus( priv->txBuffer + ( i * TLAN_MAX_FRAME_SIZE ) ); +- } else { +- list->buffer[0].address = 0; +- } +- list->buffer[2].count = 0; +- list->buffer[2].address = 0; +- list->buffer[9].address = 0; +- } ++ if (num_bits == 0) ++ return; ++ ++ outw(TLAN_NET_SIO, base_port + TLAN_DIO_ADR); ++ sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO; ++ TLan_SetBit(TLAN_NET_SIO_MTXEN, sio); + +- priv->rxHead = 0; +- priv->rxTail = TLAN_NUM_RX_LISTS - 1; +- for ( i = 0; i < TLAN_NUM_RX_LISTS; i++ ) { +- list = priv->rxList + i; +- list->cStat = TLAN_CSTAT_READY; +- list->frameSize = TLAN_MAX_FRAME_SIZE; +- list->buffer[0].count = TLAN_MAX_FRAME_SIZE | TLAN_LAST_BUFFER; +- if ( bbuf ) { +- list->buffer[0].address = virt_to_bus( priv->rxBuffer + ( i * TLAN_MAX_FRAME_SIZE ) ); +- } else { +- skb = dev_alloc_skb( TLAN_MAX_FRAME_SIZE + 7 ); +- if ( skb == NULL ) { +- printk( "TLAN: Couldn't allocate memory for received data.\n" ); +- /* If this ever happened it would be a problem */ +- } else { +- skb->dev = dev; +- skb_reserve( skb, 2 ); +- t = (void *) skb_put( skb, TLAN_MAX_FRAME_SIZE ); +- } +- list->buffer[0].address = virt_to_bus( t ); +- list->buffer[8].address = (u32) t; +- list->buffer[9].address = (u32) skb; +- } +- list->buffer[1].count = 0; +- list->buffer[1].address = 0; +- if ( i < TLAN_NUM_RX_LISTS - 1 ) +- list->forward = virt_to_bus( list + 1 ); ++ for (i = (0x1 << (num_bits - 1)); i; i >>= 1) { ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); ++ (void) TLan_GetBit(TLAN_NET_SIO_MCLK, sio); ++ if (data & i) ++ TLan_SetBit(TLAN_NET_SIO_MDATA, sio); + else +- list->forward = 0; ++ TLan_ClearBit(TLAN_NET_SIO_MDATA, sio); ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); ++ (void) TLan_GetBit(TLAN_NET_SIO_MCLK, sio); + } + +-} /* TLan_ResetLists */ ++} /* TLan_MiiSendData */ + +-void TLan_FreeLists( struct net_device *dev ) +-{ +- TLanPrivateInfo *priv = dev->priv; +- int i; +- TLanList *list; +- struct sk_buff *skb; +- +- if ( ! bbuf ) { +- for ( i = 0; i < TLAN_NUM_TX_LISTS; i++ ) { +- list = priv->txList + i; +- skb = (struct sk_buff *) list->buffer[9].address; +- if ( skb ) { +- dev_kfree_skb_any( skb ); +- list->buffer[9].address = 0; +- } +- } + +- for ( i = 0; i < TLAN_NUM_RX_LISTS; i++ ) { +- list = priv->rxList + i; +- skb = (struct sk_buff *) list->buffer[9].address; +- if ( skb ) { +- dev_kfree_skb_any( skb ); +- list->buffer[9].address = 0; +- } +- } +- } + +-} /* TLan_FreeLists */ + + /*************************************************************** +- * TLan_PrintDio +- * ++ * TLan_MiiSync ++ * + * Returns: + * Nothing + * Parms: +- * io_base Base IO port of the device of +- * which to print DIO registers. ++ * base_port The base IO port of the adapter in ++ * question. + * +- * This function prints out all the internal (DIO) +- * registers of a TLAN chip. ++ * This functions syncs all PHYs in terms of the MII configuration ++ * bus. + * + **************************************************************/ + +-void TLan_PrintDio( u16 io_base ) ++void TLan_MiiSync(u16 base_port) + { +- u32 data0, data1; +- int i; ++ int i; ++ u16 sio; + +- printk( "TLAN: Contents of internal registers for io base 0x%04hx.\n", io_base ); +- printk( "TLAN: Off. +0 +4\n" ); +- for ( i = 0; i < 0x4C; i+= 8 ) { +- data0 = TLan_DioRead32( io_base, i ); +- data1 = TLan_DioRead32( io_base, i + 0x4 ); +- printk( "TLAN: 0x%02x 0x%08x 0x%08x\n", i, data0, data1 ); ++ outw(TLAN_NET_SIO, base_port + TLAN_DIO_ADR); ++ sio = base_port + TLAN_DIO_DATA + TLAN_NET_SIO; ++ ++ TLan_ClearBit(TLAN_NET_SIO_MTXEN, sio); ++ for (i = 0; i < 32; i++) { ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); + } + +-} /* TLan_PrintDio */ ++} /* TLan_MiiSync */ ++ ++ ++ + + /*************************************************************** +- * TLan_PrintList +- * ++ * TLan_MiiWriteReg ++ * + * Returns: + * Nothing + * Parms: +- * list A pointer to the TLanList structure to +- * be printed. +- * type A string to designate type of list, +- * "Rx" or "Tx". +- * num The index of the list. ++ * dev The device structure for the device ++ * to write to. ++ * phy The address of the PHY to be written to. ++ * reg The register whose contents are to be ++ * written. ++ * val The value to be written to the register. + * +- * This function prints out the contents of the list +- * pointed to by the list parameter. ++ * This function uses the TLAN's MII bus to write the contents of a ++ * given register on a PHY. It sends the appropriate info and then ++ * writes the 16-bit register value from the MII configuration bus ++ * via the TLAN SIO register. + * + **************************************************************/ + +-void TLan_PrintList( TLanList *list, char *type, int num) ++void TLan_MiiWriteReg(struct nic *nic __unused, u16 phy, u16 reg, u16 val) + { +- int i; ++ u16 sio; ++ int minten; ++ ++ outw(TLAN_NET_SIO, BASE + TLAN_DIO_ADR); ++ sio = BASE + TLAN_DIO_DATA + TLAN_NET_SIO; ++ ++ TLan_MiiSync(BASE); ++ ++ minten = TLan_GetBit(TLAN_NET_SIO_MINTEN, sio); ++ if (minten) ++ TLan_ClearBit(TLAN_NET_SIO_MINTEN, sio); ++ ++ TLan_MiiSendData(BASE, 0x1, 2); /* Start ( 01b ) */ ++ TLan_MiiSendData(BASE, 0x1, 2); /* Write ( 01b ) */ ++ TLan_MiiSendData(BASE, phy, 5); /* Device # */ ++ TLan_MiiSendData(BASE, reg, 5); /* Register # */ ++ ++ TLan_MiiSendData(BASE, 0x2, 2); /* Send ACK */ ++ TLan_MiiSendData(BASE, val, 16); /* Send Data */ ++ ++ TLan_ClearBit(TLAN_NET_SIO_MCLK, sio); /* Idle cycle */ ++ TLan_SetBit(TLAN_NET_SIO_MCLK, sio); ++ ++ if (minten) ++ TLan_SetBit(TLAN_NET_SIO_MINTEN, sio); + +- printk( "TLAN: %s List %d at 0x%08x\n", type, num, (u32) list ); +- printk( "TLAN: Forward = 0x%08x\n", list->forward ); +- printk( "TLAN: CSTAT = 0x%04hx\n", list->cStat ); +- printk( "TLAN: Frame Size = 0x%04hx\n", list->frameSize ); +- /* for ( i = 0; i < 10; i++ ) { */ +- for ( i = 0; i < 2; i++ ) { +- printk( "TLAN: Buffer[%d].count, addr = 0x%08x, 0x%08x\n", i, list->buffer[i].count, list->buffer[i].address ); +- } + +-} /* TLan_PrintList */ ++} /* TLan_MiiWriteReg */ + + /*************************************************************** +- * TLan_ReadAndClearStats ++ * TLan_SetMac + * + * Returns: + * Nothing + * Parms: + * dev Pointer to device structure of adapter +- * to which to read stats. +- * record Flag indicating whether to add ++ * on which to change the AREG. ++ * areg The AREG to set the address in (0 - 3). ++ * mac A pointer to an array of chars. Each ++ * element stores one byte of the address. ++ * IE, it isn't in ascii. + * +- * This functions reads all the internal status registers +- * of the TLAN chip, which clears them as a side effect. +- * It then either adds the values to the device's status +- * struct, or discards them, depending on whether record +- * is TLAN_RECORD (!=0) or TLAN_IGNORE (==0). ++ * This function transfers a MAC address to one of the ++ * TLAN AREGs (address registers). The TLAN chip locks ++ * the register on writing to offset 0 and unlocks the ++ * register after writing to offset 5. If NULL is passed ++ * in mac, then the AREG is filled with 0's. + * + **************************************************************/ + +-void TLan_ReadAndClearStats( struct net_device *dev, int record ) ++void TLan_SetMac(struct nic *nic __unused, int areg, char *mac) + { +- TLanPrivateInfo *priv = dev->priv; +- u32 tx_good, tx_under; +- u32 rx_good, rx_over; +- u32 def_tx, crc, code; +- u32 multi_col, single_col; +- u32 excess_col, late_col, loss; +- +- outw( TLAN_GOOD_TX_FRMS, dev->base_addr + TLAN_DIO_ADR ); +- tx_good = inb( dev->base_addr + TLAN_DIO_DATA ); +- tx_good += inb( dev->base_addr + TLAN_DIO_DATA + 1 ) << 8; +- tx_good += inb( dev->base_addr + TLAN_DIO_DATA + 2 ) << 16; +- tx_under = inb( dev->base_addr + TLAN_DIO_DATA + 3 ); +- +- outw( TLAN_GOOD_RX_FRMS, dev->base_addr + TLAN_DIO_ADR ); +- rx_good = inb( dev->base_addr + TLAN_DIO_DATA ); +- rx_good += inb( dev->base_addr + TLAN_DIO_DATA + 1 ) << 8; +- rx_good += inb( dev->base_addr + TLAN_DIO_DATA + 2 ) << 16; +- rx_over = inb( dev->base_addr + TLAN_DIO_DATA + 3 ); +- +- outw( TLAN_DEFERRED_TX, dev->base_addr + TLAN_DIO_ADR ); +- def_tx = inb( dev->base_addr + TLAN_DIO_DATA ); +- def_tx += inb( dev->base_addr + TLAN_DIO_DATA + 1 ) << 8; +- crc = inb( dev->base_addr + TLAN_DIO_DATA + 2 ); +- code = inb( dev->base_addr + TLAN_DIO_DATA + 3 ); +- +- outw( TLAN_MULTICOL_FRMS, dev->base_addr + TLAN_DIO_ADR ); +- multi_col = inb( dev->base_addr + TLAN_DIO_DATA ); +- multi_col += inb( dev->base_addr + TLAN_DIO_DATA + 1 ) << 8; +- single_col = inb( dev->base_addr + TLAN_DIO_DATA + 2 ); +- single_col += inb( dev->base_addr + TLAN_DIO_DATA + 3 ) << 8; +- +- outw( TLAN_EXCESSCOL_FRMS, dev->base_addr + TLAN_DIO_ADR ); +- excess_col = inb( dev->base_addr + TLAN_DIO_DATA ); +- late_col = inb( dev->base_addr + TLAN_DIO_DATA + 1 ); +- loss = inb( dev->base_addr + TLAN_DIO_DATA + 2 ); +- +- if ( record ) { +- priv->stats.rx_packets += rx_good; +- priv->stats.rx_errors += rx_over + crc + code; +- priv->stats.tx_packets += tx_good; +- priv->stats.tx_errors += tx_under + loss; +- priv->stats.collisions += multi_col + single_col + excess_col + late_col; +- +- priv->stats.rx_over_errors += rx_over; +- priv->stats.rx_crc_errors += crc; +- priv->stats.rx_frame_errors += code; ++ int i; + +- priv->stats.tx_aborted_errors += tx_under; +- priv->stats.tx_carrier_errors += loss; ++ areg *= 6; ++ ++ if (mac != NULL) { ++ for (i = 0; i < 6; i++) ++ TLan_DioWrite8(BASE, TLAN_AREG_0 + areg + i, ++ mac[i]); ++ } else { ++ for (i = 0; i < 6; i++) ++ TLan_DioWrite8(BASE, TLAN_AREG_0 + areg + i, 0); + } +- +-} /* TLan_ReadAndClearStats */ + +- /*************************************************************** +- * TLan_Reset ++} /* TLan_SetMac */ ++ ++ /********************************************************************* ++ * TLan_PhyDetect + * + * Returns: +- * 0 ++ * Nothing + * Parms: +- * dev Pointer to device structure of adapter +- * to be reset. ++ * dev A pointer to the device structure of the adapter ++ * for which the PHY needs determined. + * +- * This function resets the adapter and it's physical +- * device. See Chap. 3, pp. 9-10 of the "ThunderLAN +- * Programmer's Guide" for details. The routine tries to +- * implement what is detailed there, though adjustments +- * have been made. ++ * So far I've found that adapters which have external PHYs ++ * may also use the internal PHY for part of the functionality. ++ * (eg, AUI/Thinnet). This function finds out if this TLAN ++ * chip has an internal PHY, and then finds the first external ++ * PHY (starting from address 0) if it exists). + * +- **************************************************************/ ++ ********************************************************************/ + +-void +-TLan_ResetAdapter( struct net_device *dev ) ++void TLan_PhyDetect(struct nic *nic) + { +- TLanPrivateInfo *priv = dev->priv; +- int i; +- u32 addr; +- u32 data; +- u8 data8; ++ u16 control; ++ u16 hi; ++ u16 lo; ++ u32 phy; + +- priv->tlanFullDuplex = FALSE; +- priv->phyOnline=0; +-/* 1. Assert reset bit. */ ++ if (tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_UNMANAGED_PHY) { ++ priv->phyNum = 0xFFFF; ++ return; ++ } + +- data = inl(dev->base_addr + TLAN_HOST_CMD); +- data |= TLAN_HC_AD_RST; +- outl(data, dev->base_addr + TLAN_HOST_CMD); +- +- udelay(1000); ++ TLan_MiiReadReg(nic, TLAN_PHY_MAX_ADDR, MII_GEN_ID_HI, &hi); + +-/* 2. Turn off interrupts. ( Probably isn't necessary ) */ ++ if (hi != 0xFFFF) { ++ priv->phy[0] = TLAN_PHY_MAX_ADDR; ++ } else { ++ priv->phy[0] = TLAN_PHY_NONE; ++ } + +- data = inl(dev->base_addr + TLAN_HOST_CMD); +- data |= TLAN_HC_INT_OFF; +- outl(data, dev->base_addr + TLAN_HOST_CMD); ++ priv->phy[1] = TLAN_PHY_NONE; ++ for (phy = 0; phy <= TLAN_PHY_MAX_ADDR; phy++) { ++ TLan_MiiReadReg(nic, phy, MII_GEN_CTL, &control); ++ TLan_MiiReadReg(nic, phy, MII_GEN_ID_HI, &hi); ++ TLan_MiiReadReg(nic, phy, MII_GEN_ID_LO, &lo); ++ if ((control != 0xFFFF) || (hi != 0xFFFF) ++ || (lo != 0xFFFF)) { ++ printf("PHY found at %hX %hX %hX %hX\n", phy, ++ control, hi, lo); ++ if ((priv->phy[1] == TLAN_PHY_NONE) ++ && (phy != TLAN_PHY_MAX_ADDR)) { ++ priv->phy[1] = phy; ++ } ++ } ++ } + +-/* 3. Clear AREGs and HASHs. */ ++ if (priv->phy[1] != TLAN_PHY_NONE) { ++ priv->phyNum = 1; ++ } else if (priv->phy[0] != TLAN_PHY_NONE) { ++ priv->phyNum = 0; ++ } else { ++ printf ++ ("TLAN: Cannot initialize device, no PHY was found!\n"); ++ } ++ ++} /* TLan_PhyDetect */ + +- for ( i = TLAN_AREG_0; i <= TLAN_HASH_2; i += 4 ) { +- TLan_DioWrite32( dev->base_addr, (u16) i, 0 ); ++void TLan_PhyPowerDown(struct nic *nic) ++{ ++ ++ u16 value; ++ printf("%s: Powering down PHY(s).\n", priv->nic_name); ++ value = MII_GC_PDOWN | MII_GC_LOOPBK | MII_GC_ISOLATE; ++ TLan_MiiSync(BASE); ++ TLan_MiiWriteReg(nic, priv->phy[priv->phyNum], MII_GEN_CTL, value); ++ if ((priv->phyNum == 0) && (priv->phy[1] != TLAN_PHY_NONE) ++ && ++ (!(tlan_pci_tbl[chip_idx]. ++ flags & TLAN_ADAPTER_USE_INTERN_10))) { ++ TLan_MiiSync(BASE); ++ TLan_MiiWriteReg(nic, priv->phy[1], MII_GEN_CTL, value); + } + +-/* 4. Setup NetConfig register. */ ++ /* Wait for 50 ms and powerup ++ * This is abitrary. It is intended to make sure the ++ * tranceiver settles. ++ */ ++ /* TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_PUP ); */ ++ mdelay(50); ++ TLan_PhyPowerUp(nic); + +- data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | TLAN_NET_CFG_PHY_EN; +- TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, (u16) data ); ++} /* TLan_PhyPowerDown */ + +-/* 5. Load Ld_Tmr and Ld_Thr in HOST_CMD. */ + +- outl( TLAN_HC_LD_TMR | 0x3f, dev->base_addr + TLAN_HOST_CMD ); +- outl( TLAN_HC_LD_THR | 0x9, dev->base_addr + TLAN_HOST_CMD ); ++void TLan_PhyPowerUp(struct nic *nic) ++{ ++ u16 value; + +-/* 6. Unreset the MII by setting NMRST (in NetSio) to 1. */ ++ printf("%s: Powering up PHY.\n", priv->nic_name); ++ TLan_MiiSync(BASE); ++ value = MII_GC_LOOPBK; ++ TLan_MiiWriteReg(nic, priv->phy[priv->phyNum], MII_GEN_CTL, value); ++ TLan_MiiSync(BASE); ++ /* Wait for 500 ms and reset the ++ * tranceiver. The TLAN docs say both 50 ms and ++ * 500 ms, so do the longer, just in case. ++ */ ++ mdelay(500); ++ TLan_PhyReset(nic); ++ /* TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_RESET ); */ + +- outw( TLAN_NET_SIO, dev->base_addr + TLAN_DIO_ADR ); +- addr = dev->base_addr + TLAN_DIO_DATA + TLAN_NET_SIO; +- TLan_SetBit( TLAN_NET_SIO_NMRST, addr ); ++} /* TLan_PhyPowerUp */ + +-/* 7. Setup the remaining registers. */ ++void TLan_PhyReset(struct nic *nic) ++{ ++ u16 phy; ++ u16 value; + +- if ( priv->tlanRev >= 0x30 ) { +- data8 = TLAN_ID_TX_EOC | TLAN_ID_RX_EOC; +- TLan_DioWrite8( dev->base_addr, TLAN_INT_DIS, data8 ); ++ phy = priv->phy[priv->phyNum]; ++ ++ printf("%s: Reseting PHY.\n", priv->nic_name); ++ TLan_MiiSync(BASE); ++ value = MII_GC_LOOPBK | MII_GC_RESET; ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, value); ++ TLan_MiiReadReg(nic, phy, MII_GEN_CTL, &value); ++ while (value & MII_GC_RESET) { ++ TLan_MiiReadReg(nic, phy, MII_GEN_CTL, &value); + } +- TLan_PhyDetect( dev ); +- data = TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN; +- +- if ( priv->adapter->flags & TLAN_ADAPTER_BIT_RATE_PHY ) { +- data |= TLAN_NET_CFG_BIT; +- if ( priv->aui == 1 ) { +- TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x0a ); +- } else if ( priv->duplex == TLAN_DUPLEX_FULL ) { +- TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x00 ); ++ ++ /* Wait for 500 ms and initialize. ++ * I don't remember why I wait this long. ++ * I've changed this to 50ms, as it seems long enough. ++ */ ++ /* TLan_SetTimer( dev, (HZ/20), TLAN_TIMER_PHY_START_LINK ); */ ++ mdelay(50); ++ TLan_PhyStartLink(nic); ++ ++} /* TLan_PhyReset */ ++ ++ ++void TLan_PhyStartLink(struct nic *nic) ++{ ++ ++ u16 ability; ++ u16 control; ++ u16 data; ++ u16 phy; ++ u16 status; ++ u16 tctl; ++ ++ phy = priv->phy[priv->phyNum]; ++ printf("%s: Trying to activate link.\n", priv->nic_name); ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &ability); ++ ++ if ((status & MII_GS_AUTONEG) && (!priv->aui)) { ++ ability = status >> 11; ++ if (priv->speed == TLAN_SPEED_10 && ++ priv->duplex == TLAN_DUPLEX_HALF) { ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x0000); ++ } else if (priv->speed == TLAN_SPEED_10 && ++ priv->duplex == TLAN_DUPLEX_FULL) { ++ priv->tlanFullDuplex = TRUE; ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x0100); ++ } else if (priv->speed == TLAN_SPEED_100 && ++ priv->duplex == TLAN_DUPLEX_HALF) { ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x2000); ++ } else if (priv->speed == TLAN_SPEED_100 && ++ priv->duplex == TLAN_DUPLEX_FULL) { + priv->tlanFullDuplex = TRUE; ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x2100); + } else { +- TLan_DioWrite8( dev->base_addr, TLAN_ACOMMIT, 0x08 ); ++ ++ /* Set Auto-Neg advertisement */ ++ TLan_MiiWriteReg(nic, phy, MII_AN_ADV, ++ (ability << 5) | 1); ++ /* Enablee Auto-Neg */ ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x1000); ++ /* Restart Auto-Neg */ ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, 0x1200); ++ /* Wait for 4 sec for autonegotiation ++ * to complete. The max spec time is less than this ++ * but the card need additional time to start AN. ++ * .5 sec should be plenty extra. ++ */ ++ printf("TLAN: %s: Starting autonegotiation.\n", ++ priv->nic_name); ++ mdelay(4000); ++ TLan_PhyFinishAutoNeg(nic); ++ /* TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_PHY_FINISH_AN ); */ ++ return; + } +- } + +- if ( priv->phyNum == 0 ) { +- data |= TLAN_NET_CFG_PHY_EN; + } +- TLan_DioWrite16( dev->base_addr, TLAN_NET_CONFIG, (u16) data ); + +- if ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) { +- TLan_FinishReset( dev ); +- } else { +- TLan_PhyPowerDown( dev ); ++ if ((priv->aui) && (priv->phyNum != 0)) { ++ priv->phyNum = 0; ++ data = ++ TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | ++ TLAN_NET_CFG_PHY_EN; ++ TLan_DioWrite16(BASE, TLAN_NET_CONFIG, data); ++ mdelay(50); ++ /* TLan_SetTimer( dev, (40*HZ/1000), TLAN_TIMER_PHY_PDOWN ); */ ++ TLan_PhyPowerDown(nic); ++ return; ++ } else if (priv->phyNum == 0) { ++ control = 0; ++ TLan_MiiReadReg(nic, phy, TLAN_TLPHY_CTL, &tctl); ++ if (priv->aui) { ++ tctl |= TLAN_TC_AUISEL; ++ } else { ++ tctl &= ~TLAN_TC_AUISEL; ++ if (priv->duplex == TLAN_DUPLEX_FULL) { ++ control |= MII_GC_DUPLEX; ++ priv->tlanFullDuplex = TRUE; ++ } ++ if (priv->speed == TLAN_SPEED_100) { ++ control |= MII_GC_SPEEDSEL; ++ } ++ } ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, control); ++ TLan_MiiWriteReg(nic, phy, TLAN_TLPHY_CTL, tctl); + } + +-} /* TLan_ResetAdapter */ ++ /* Wait for 2 sec to give the tranceiver time ++ * to establish link. ++ */ ++ /* TLan_SetTimer( dev, (4*HZ), TLAN_TIMER_FINISH_RESET ); */ ++ mdelay(2000); ++ TLan_FinishReset(nic); ++ ++} /* TLan_PhyStartLink */ + +-void +-TLan_FinishReset( struct net_device *dev ) ++void TLan_PhyFinishAutoNeg(struct nic *nic) + { +- TLanPrivateInfo *priv = dev->priv; +- u8 data; +- u32 phy; +- u8 sio; +- u16 status; +- u16 partner; +- u16 tlphy_ctl; +- u16 tlphy_par; +- u16 tlphy_id1, tlphy_id2; +- int i; ++ ++ u16 an_adv; ++ u16 an_lpa; ++ u16 data; ++ u16 mode; ++ u16 phy; ++ u16 status; + + phy = priv->phy[priv->phyNum]; + +- data = TLAN_NET_CMD_NRESET | TLAN_NET_CMD_NWRAP; +- if ( priv->tlanFullDuplex ) { +- data |= TLAN_NET_CMD_DUPLEX; ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); ++ udelay(1000); ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &status); ++ ++ if (!(status & MII_GS_AUTOCMPLT)) { ++ /* Wait for 8 sec to give the process ++ * more time. Perhaps we should fail after a while. ++ */ ++ if (!priv->neg_be_verbose++) { ++ printf ++ ("TLAN: Giving autonegotiation more time.\n"); ++ printf ++ ("TLAN: Please check that your adapter has\n"); ++ printf ++ ("TLAN: been properly connected to a HUB or Switch.\n"); ++ printf ++ ("TLAN: Trying to establish link in the background...\n"); ++ } ++ mdelay(8000); ++ TLan_PhyFinishAutoNeg(nic); ++ /* TLan_SetTimer( dev, (8*HZ), TLAN_TIMER_PHY_FINISH_AN ); */ ++ return; + } +- TLan_DioWrite8( dev->base_addr, TLAN_NET_CMD, data ); +- data = TLAN_NET_MASK_MASK4 | TLAN_NET_MASK_MASK5; +- if ( priv->phyNum == 0 ) { +- data |= TLAN_NET_MASK_MASK7; +- } +- TLan_DioWrite8( dev->base_addr, TLAN_NET_MASK, data ); +- TLan_DioWrite16( dev->base_addr, TLAN_MAX_RX, ((1536)+7)&~7 ); +- TLan_MiiReadReg( dev, phy, MII_GEN_ID_HI, &tlphy_id1 ); +- TLan_MiiReadReg( dev, phy, MII_GEN_ID_LO, &tlphy_id2 ); +- +- if ( ( priv->adapter->flags & TLAN_ADAPTER_UNMANAGED_PHY ) || ( priv->aui ) ) { +- status = MII_GS_LINK; +- printk( "TLAN: %s: Link forced.\n", dev->name ); +- } else { +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); +- udelay( 1000 ); +- TLan_MiiReadReg( dev, phy, MII_GEN_STS, &status ); +- if ( (status & MII_GS_LINK) && /* We only support link info on Nat.Sem. PHY's */ +- (tlphy_id1 == NAT_SEM_ID1) && +- (tlphy_id2 == NAT_SEM_ID2) ) { +- TLan_MiiReadReg( dev, phy, MII_AN_LPA, &partner ); +- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_PAR, &tlphy_par ); +- +- printk( "TLAN: %s: Link active with ", dev->name ); +- if (!(tlphy_par & TLAN_PHY_AN_EN_STAT)) { +- printk( "forced 10%sMbps %s-Duplex\n", +- tlphy_par & TLAN_PHY_SPEED_100 ? "" : "0", +- tlphy_par & TLAN_PHY_DUPLEX_FULL ? "Full" : "Half"); +- } else { +- printk( "AutoNegotiation enabled, at 10%sMbps %s-Duplex\n", +- tlphy_par & TLAN_PHY_SPEED_100 ? "" : "0", +- tlphy_par & TLAN_PHY_DUPLEX_FULL ? "Full" : "Half"); +- printk("TLAN: Partner capability: "); +- for (i = 5; i <= 10; i++) +- if (partner & (1<base_addr, TLAN_LED_REG, TLAN_LED_LINK ); +-#ifdef MONITOR +- /* We have link beat..for now anyway */ +- priv->link = 1; +- /*Enabling link beat monitoring */ +- TLan_SetTimer( dev, (10*HZ), TLAN_TIMER_LINK_BEAT ); +-#endif +- } else if (status & MII_GS_LINK) { +- printk( "TLAN: %s: Link active\n", dev->name ); +- TLan_DioWrite8( dev->base_addr, TLAN_LED_REG, TLAN_LED_LINK ); +- } ++ printf("TLAN: %s: Autonegotiation complete.\n", priv->nic_name); ++ TLan_MiiReadReg(nic, phy, MII_AN_ADV, &an_adv); ++ TLan_MiiReadReg(nic, phy, MII_AN_LPA, &an_lpa); ++ mode = an_adv & an_lpa & 0x03E0; ++ if (mode & 0x0100) { ++ printf("Full Duplex\n"); ++ priv->tlanFullDuplex = TRUE; ++ } else if (!(mode & 0x0080) && (mode & 0x0040)) { ++ priv->tlanFullDuplex = TRUE; ++ printf("Full Duplex\n"); + } + +- if ( priv->phyNum == 0 ) { +- TLan_MiiReadReg( dev, phy, TLAN_TLPHY_CTL, &tlphy_ctl ); +- tlphy_ctl |= TLAN_TC_INTEN; +- TLan_MiiWriteReg( dev, phy, TLAN_TLPHY_CTL, tlphy_ctl ); +- sio = TLan_DioRead8( dev->base_addr, TLAN_NET_SIO ); +- sio |= TLAN_NET_SIO_MINTEN; +- TLan_DioWrite8( dev->base_addr, TLAN_NET_SIO, sio ); ++ if ((!(mode & 0x0180)) ++ && (tlan_pci_tbl[chip_idx].flags & TLAN_ADAPTER_USE_INTERN_10) ++ && (priv->phyNum != 0)) { ++ priv->phyNum = 0; ++ data = ++ TLAN_NET_CFG_1FRAG | TLAN_NET_CFG_1CHAN | ++ TLAN_NET_CFG_PHY_EN; ++ TLan_DioWrite16(BASE, TLAN_NET_CONFIG, data); ++ /* TLan_SetTimer( nic, (400*HZ/1000), TLAN_TIMER_PHY_PDOWN ); */ ++ mdelay(400); ++ TLan_PhyPowerDown(nic); ++ return; + } + +- if ( status & MII_GS_LINK ) { +- TLan_SetMac( dev, 0, dev->dev_addr ); +- priv->phyOnline = 1; +- outb( ( TLAN_HC_INT_ON >> 8 ), dev->base_addr + TLAN_HOST_CMD + 1 ); +- if ( debug >= 1 && debug != TLAN_DEBUG_PROBE ) { +- outb( ( TLAN_HC_REQ_INT >> 8 ), dev->base_addr + TLAN_HOST_CMD + 1 ); ++ if (priv->phyNum == 0) { ++ if ((priv->duplex == TLAN_DUPLEX_FULL) ++ || (an_adv & an_lpa & 0x0040)) { ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, ++ MII_GC_AUTOENB | MII_GC_DUPLEX); ++ printf ++ ("TLAN: Starting internal PHY with FULL-DUPLEX\n"); ++ } else { ++ TLan_MiiWriteReg(nic, phy, MII_GEN_CTL, ++ MII_GC_AUTOENB); ++ printf ++ ("TLAN: Starting internal PHY with HALF-DUPLEX\n"); + } +- outl( virt_to_bus( priv->rxList ), dev->base_addr + TLAN_CH_PARM ); +- outl( TLAN_HC_GO | TLAN_HC_RT, dev->base_addr + TLAN_HOST_CMD ); +- } else { +- printk( "TLAN: %s: Link inactive, will retry in 10 secs...\n", dev->name ); +- TLan_SetTimer( dev, (10*HZ), TLAN_TIMER_FINISH_RESET ); +- return; + } + +-} /* TLan_FinishReset */ ++ /* Wait for 100 ms. No reason in partiticular. ++ */ ++ /* TLan_SetTimer( dev, (HZ/10), TLAN_TIMER_FINISH_RESET ); */ ++ mdelay(100); ++ TLan_FinishReset(nic); + +- /*************************************************************** +- * TLan_SetMac +- * +- * Returns: +- * Nothing +- * Parms: +- * dev Pointer to device structure of adapter +- * on which to change the AREG. +- * areg The AREG to set the address in (0 - 3). +- * mac A pointer to an array of chars. Each +- * element stores one byte of the address. +- * IE, it isn't in ascii. +- * +- * This function transfers a MAC address to one of the +- * TLAN AREGs (address registers). The TLAN chip locks +- * the register on writing to offset 0 and unlocks the +- * register after writing to offset 5. If NULL is passed +- * in mac, then the AREG is filled with 0's. +- * +- **************************************************************/ ++} /* TLan_PhyFinishAutoNeg */ ++ ++#ifdef MONITOR ++ ++ /********************************************************************* ++ * ++ * TLan_phyMonitor ++ * ++ * Returns: ++ * None ++ * ++ * Params: ++ * dev The device structure of this device. ++ * ++ * ++ * This function monitors PHY condition by reading the status ++ * register via the MII bus. This can be used to give info ++ * about link changes (up/down), and possible switch to alternate ++ * media. ++ * ++ * ******************************************************************/ + +-void TLan_SetMac( struct net_device *dev, int areg, char *mac ) ++void TLan_PhyMonitor(struct net_device *dev) + { +- int i; +- +- areg *= 6; ++ TLanPrivateInfo *priv = dev->priv; ++ u16 phy; ++ u16 phy_status; + +- if ( mac != NULL ) { +- for ( i = 0; i < 6; i++ ) +- TLan_DioWrite8( dev->base_addr, TLAN_AREG_0 + areg + i, mac[i] ); +- } else { +- for ( i = 0; i < 6; i++ ) +- TLan_DioWrite8( dev->base_addr, TLAN_AREG_0 + areg + i, 0 ); ++ phy = priv->phy[priv->phyNum]; ++ ++ /* Get PHY status register */ ++ TLan_MiiReadReg(nic, phy, MII_GEN_STS, &phy_status); ++ ++ /* Check if link has been lost */ ++ if (!(phy_status & MII_GS_LINK)) { ++ if (priv->link) { ++ priv->link = 0; ++ printf("TLAN: %s has lost link\n", priv->nic_name); ++ priv->flags &= ~IFF_RUNNING; ++ mdelay(2000); ++ TLan_PhyMonitor(nic); ++ /* TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); */ ++ return; ++ } + } + +-} /* TLan_SetMac */ ++ /* Link restablished? */ ++ if ((phy_status & MII_GS_LINK) && !priv->link) { ++ priv->link = 1; ++ printf("TLAN: %s has reestablished link\n", ++ priv->nic_name); ++ priv->flags |= IFF_RUNNING; ++ } ++ ++ /* Setup a new monitor */ ++ /* TLan_SetTimer( dev, (2*HZ), TLAN_TIMER_LINK_BEAT ); */ ++ mdelay(2000); ++ TLan_PhyMonitor(nic); ++} + ++#endif /* MONITOR */ ++ ++#ifdef EB51 ++static struct pci_id tlan_nics[] = { ++ PCI_ROM(0x0e11, 0xae34, "netel10", "Compaq Netelligent 10 T PCI UTP"), ++ PCI_ROM(0x0e11, 0xae32, "netel100","Compaq Netelligent 10/100 TX PCI UTP"), ++ PCI_ROM(0x0e11, 0xae35, "netflex3i", "Compaq Integrated NetFlex-3/P"), ++ PCI_ROM(0x0e11, 0xf130, "thunder", "Compaq NetFlex-3/P"), ++ PCI_ROM(0x0e11, 0xf150, "netflex3b", "Compaq NetFlex-3/P"), ++ PCI_ROM(0x0e11, 0xae43, "netel100pi", "Compaq Netelligent Integrated 10/100 TX UTP"), ++ PCI_ROM(0x0e11, 0xae40, "netel100d", "Compaq Netelligent Dual 10/100 TX PCI UTP"), ++ PCI_ROM(0x0e11, 0xb011, "netel100i", "Compaq Netelligent 10/100 TX Embedded UTP"), ++ PCI_ROM(0x108d, 0x0013, "oc2183", "Olicom OC-2183/2185"), ++ PCI_ROM(0x108d, 0x0012, "oc2325", "Olicom OC-2325"), ++ PCI_ROM(0x108d, 0x0014, "oc2326", "Olicom OC-2326"), ++ PCI_ROM(0x0e11, 0xb030, "netelligent_10_100_ws_5100", "Compaq Netelligent 10/100 TX UTP"), ++ PCI_ROM(0x0e11, 0xb012, "netelligent_10_t2", "Compaq Netelligent 10 T/2 PCI UTP/Coax"), ++}; ++ ++struct pci_driver tlan_driver = { ++ .type = NIC_DRIVER, ++ .name = "TLAN/PCI", ++ .probe = tlan_probe, ++ .ids = tlan_nics, ++ .id_count = sizeof(tlan_nics) / sizeof(tlan_nics[0]), ++ .class = 0, ++}; + #endif +Index: b/netboot/tlan.h +=================================================================== +--- /dev/null ++++ b/netboot/tlan.h +@@ -0,0 +1,536 @@ ++/************************************************************************** ++* ++* tlan.c -- Etherboot device driver for the Texas Instruments ThunderLAN ++* Written 2003-2003 by Timothy Legge ++* ++* 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., 675 Mass Ave, Cambridge, MA 02139, USA. ++* ++* Portions of this code (almost all) based on: ++* tlan.c: Linux ThunderLan Driver: ++* ++* by James Banks ++* ++* (C) 1997-1998 Caldera, Inc. ++* (C) 1998 James Banks ++* (C) 1999-2001 Torben Mathiasen ++* (C) 2002 Samuel Chessman ++* ++* REVISION HISTORY: ++* ================ ++* v1.0 07-08-2003 timlegge Initial not quite working version ++* ++* Indent Style: indent -kr -i8 ++***************************************************************************/ ++ ++/* ++#include ++#include ++#include ++*/ ++ ++typedef unsigned char u8; ++typedef signed char s8; ++typedef unsigned short u16; ++typedef signed short s16; ++typedef unsigned int u32; ++typedef signed int s32; ++ /***************************************************************** ++ * TLan Definitions ++ * ++ ****************************************************************/ ++ ++#define FALSE 0 ++#define TRUE 1 ++ ++#define TLAN_MIN_FRAME_SIZE 64 ++#define TLAN_MAX_FRAME_SIZE 1600 ++ ++#define TLAN_NUM_RX_LISTS 4 ++#define TLAN_NUM_TX_LISTS 2 ++ ++#define TLAN_IGNORE 0 ++#define TLAN_RECORD 1 ++/* ++#define TLAN_DBG(lvl, format, args...) if (debug&lvl) printf("TLAN: " format, ##args ); ++*/ ++#define TLAN_DEBUG_GNRL 0x0001 ++#define TLAN_DEBUG_TX 0x0002 ++#define TLAN_DEBUG_RX 0x0004 ++#define TLAN_DEBUG_LIST 0x0008 ++#define TLAN_DEBUG_PROBE 0x0010 ++ ++#define TX_TIMEOUT (10*HZ) /* We need time for auto-neg */ ++#define MAX_TLAN_BOARDS 8 /* Max number of boards installed at a time */ ++ ++ ++ /***************************************************************** ++ * Device Identification Definitions ++ * ++ ****************************************************************/ ++ ++#define PCI_DEVICE_ID_NETELLIGENT_10_T2 0xB012 ++#define PCI_DEVICE_ID_NETELLIGENT_10_100_WS_5100 0xB030 ++#ifndef PCI_DEVICE_ID_OLICOM_OC2183 ++#define PCI_DEVICE_ID_OLICOM_OC2183 0x0013 ++#endif ++#ifndef PCI_DEVICE_ID_OLICOM_OC2325 ++#define PCI_DEVICE_ID_OLICOM_OC2325 0x0012 ++#endif ++#ifndef PCI_DEVICE_ID_OLICOM_OC2326 ++#define PCI_DEVICE_ID_OLICOM_OC2326 0x0014 ++#endif ++ ++typedef struct tlan_adapter_entry { ++ u16 vendorId; ++ u16 deviceId; ++ char *deviceLabel; ++ u32 flags; ++ u16 addrOfs; ++} TLanAdapterEntry; ++ ++#define TLAN_ADAPTER_NONE 0x00000000 ++#define TLAN_ADAPTER_UNMANAGED_PHY 0x00000001 ++#define TLAN_ADAPTER_BIT_RATE_PHY 0x00000002 ++#define TLAN_ADAPTER_USE_INTERN_10 0x00000004 ++#define TLAN_ADAPTER_ACTIVITY_LED 0x00000008 ++ ++#define TLAN_SPEED_DEFAULT 0 ++#define TLAN_SPEED_10 10 ++#define TLAN_SPEED_100 100 ++ ++#define TLAN_DUPLEX_DEFAULT 0 ++#define TLAN_DUPLEX_HALF 1 ++#define TLAN_DUPLEX_FULL 2 ++ ++ ++ ++ /***************************************************************** ++ * EISA Definitions ++ * ++ ****************************************************************/ ++ ++#define EISA_ID 0xc80 /* EISA ID Registers */ ++#define EISA_ID0 0xc80 /* EISA ID Register 0 */ ++#define EISA_ID1 0xc81 /* EISA ID Register 1 */ ++#define EISA_ID2 0xc82 /* EISA ID Register 2 */ ++#define EISA_ID3 0xc83 /* EISA ID Register 3 */ ++#define EISA_CR 0xc84 /* EISA Control Register */ ++#define EISA_REG0 0xc88 /* EISA Configuration Register 0 */ ++#define EISA_REG1 0xc89 /* EISA Configuration Register 1 */ ++#define EISA_REG2 0xc8a /* EISA Configuration Register 2 */ ++#define EISA_REG3 0xc8f /* EISA Configuration Register 3 */ ++#define EISA_APROM 0xc90 /* Ethernet Address PROM */ ++ ++ ++ ++ /***************************************************************** ++ * Rx/Tx List Definitions ++ * ++ ****************************************************************/ ++ ++#define TLAN_BUFFERS_PER_LIST 10 ++#define TLAN_LAST_BUFFER 0x80000000 ++#define TLAN_CSTAT_UNUSED 0x8000 ++#define TLAN_CSTAT_FRM_CMP 0x4000 ++#define TLAN_CSTAT_READY 0x3000 ++#define TLAN_CSTAT_EOC 0x0800 ++#define TLAN_CSTAT_RX_ERROR 0x0400 ++#define TLAN_CSTAT_PASS_CRC 0x0200 ++#define TLAN_CSTAT_DP_PR 0x0100 ++ ++ ++ ++ ++ ++ ++ /***************************************************************** ++ * PHY definitions ++ * ++ ****************************************************************/ ++ ++#define TLAN_PHY_MAX_ADDR 0x1F ++#define TLAN_PHY_NONE 0x20 ++ ++ ++ ++ /***************************************************************** ++ * TLan Driver Timer Definitions ++ * ++ ****************************************************************/ ++ ++#define TLAN_TIMER_LINK_BEAT 1 ++#define TLAN_TIMER_ACTIVITY 2 ++#define TLAN_TIMER_PHY_PDOWN 3 ++#define TLAN_TIMER_PHY_PUP 4 ++#define TLAN_TIMER_PHY_RESET 5 ++#define TLAN_TIMER_PHY_START_LINK 6 ++#define TLAN_TIMER_PHY_FINISH_AN 7 ++#define TLAN_TIMER_FINISH_RESET 8 ++ ++#define TLAN_TIMER_ACT_DELAY (HZ/10) ++ ++ ++ ++ ++ /***************************************************************** ++ * TLan Driver Eeprom Definitions ++ * ++ ****************************************************************/ ++ ++#define TLAN_EEPROM_ACK 0 ++#define TLAN_EEPROM_STOP 1 ++ ++ ++ ++ ++ /***************************************************************** ++ * Host Register Offsets and Contents ++ * ++ ****************************************************************/ ++ ++#define TLAN_HOST_CMD 0x00 ++#define TLAN_HC_GO 0x80000000 ++#define TLAN_HC_STOP 0x40000000 ++#define TLAN_HC_ACK 0x20000000 ++#define TLAN_HC_CS_MASK 0x1FE00000 ++#define TLAN_HC_EOC 0x00100000 ++#define TLAN_HC_RT 0x00080000 ++#define TLAN_HC_NES 0x00040000 ++#define TLAN_HC_AD_RST 0x00008000 ++#define TLAN_HC_LD_TMR 0x00004000 ++#define TLAN_HC_LD_THR 0x00002000 ++#define TLAN_HC_REQ_INT 0x00001000 ++#define TLAN_HC_INT_OFF 0x00000800 ++#define TLAN_HC_INT_ON 0x00000400 ++#define TLAN_HC_AC_MASK 0x000000FF ++#define TLAN_CH_PARM 0x04 ++#define TLAN_DIO_ADR 0x08 ++#define TLAN_DA_ADR_INC 0x8000 ++#define TLAN_DA_RAM_ADR 0x4000 ++#define TLAN_HOST_INT 0x0A ++#define TLAN_HI_IV_MASK 0x1FE0 ++#define TLAN_HI_IT_MASK 0x001C ++#define TLAN_DIO_DATA 0x0C ++ ++ ++/* ThunderLAN Internal Register DIO Offsets */ ++ ++#define TLAN_NET_CMD 0x00 ++#define TLAN_NET_CMD_NRESET 0x80 ++#define TLAN_NET_CMD_NWRAP 0x40 ++#define TLAN_NET_CMD_CSF 0x20 ++#define TLAN_NET_CMD_CAF 0x10 ++#define TLAN_NET_CMD_NOBRX 0x08 ++#define TLAN_NET_CMD_DUPLEX 0x04 ++#define TLAN_NET_CMD_TRFRAM 0x02 ++#define TLAN_NET_CMD_TXPACE 0x01 ++#define TLAN_NET_SIO 0x01 ++#define TLAN_NET_SIO_MINTEN 0x80 ++#define TLAN_NET_SIO_ECLOK 0x40 ++#define TLAN_NET_SIO_ETXEN 0x20 ++#define TLAN_NET_SIO_EDATA 0x10 ++#define TLAN_NET_SIO_NMRST 0x08 ++#define TLAN_NET_SIO_MCLK 0x04 ++#define TLAN_NET_SIO_MTXEN 0x02 ++#define TLAN_NET_SIO_MDATA 0x01 ++#define TLAN_NET_STS 0x02 ++#define TLAN_NET_STS_MIRQ 0x80 ++#define TLAN_NET_STS_HBEAT 0x40 ++#define TLAN_NET_STS_TXSTOP 0x20 ++#define TLAN_NET_STS_RXSTOP 0x10 ++#define TLAN_NET_STS_RSRVD 0x0F ++#define TLAN_NET_MASK 0x03 ++#define TLAN_NET_MASK_MASK7 0x80 ++#define TLAN_NET_MASK_MASK6 0x40 ++#define TLAN_NET_MASK_MASK5 0x20 ++#define TLAN_NET_MASK_MASK4 0x10 ++#define TLAN_NET_MASK_RSRVD 0x0F ++#define TLAN_NET_CONFIG 0x04 ++#define TLAN_NET_CFG_RCLK 0x8000 ++#define TLAN_NET_CFG_TCLK 0x4000 ++#define TLAN_NET_CFG_BIT 0x2000 ++#define TLAN_NET_CFG_RXCRC 0x1000 ++#define TLAN_NET_CFG_PEF 0x0800 ++#define TLAN_NET_CFG_1FRAG 0x0400 ++#define TLAN_NET_CFG_1CHAN 0x0200 ++#define TLAN_NET_CFG_MTEST 0x0100 ++#define TLAN_NET_CFG_PHY_EN 0x0080 ++#define TLAN_NET_CFG_MSMASK 0x007F ++#define TLAN_MAN_TEST 0x06 ++#define TLAN_DEF_VENDOR_ID 0x08 ++#define TLAN_DEF_DEVICE_ID 0x0A ++#define TLAN_DEF_REVISION 0x0C ++#define TLAN_DEF_SUBCLASS 0x0D ++#define TLAN_DEF_MIN_LAT 0x0E ++#define TLAN_DEF_MAX_LAT 0x0F ++#define TLAN_AREG_0 0x10 ++#define TLAN_AREG_1 0x16 ++#define TLAN_AREG_2 0x1C ++#define TLAN_AREG_3 0x22 ++#define TLAN_HASH_1 0x28 ++#define TLAN_HASH_2 0x2C ++#define TLAN_GOOD_TX_FRMS 0x30 ++#define TLAN_TX_UNDERUNS 0x33 ++#define TLAN_GOOD_RX_FRMS 0x34 ++#define TLAN_RX_OVERRUNS 0x37 ++#define TLAN_DEFERRED_TX 0x38 ++#define TLAN_CRC_ERRORS 0x3A ++#define TLAN_CODE_ERRORS 0x3B ++#define TLAN_MULTICOL_FRMS 0x3C ++#define TLAN_SINGLECOL_FRMS 0x3E ++#define TLAN_EXCESSCOL_FRMS 0x40 ++#define TLAN_LATE_COLS 0x41 ++#define TLAN_CARRIER_LOSS 0x42 ++#define TLAN_ACOMMIT 0x43 ++#define TLAN_LED_REG 0x44 ++#define TLAN_LED_ACT 0x10 ++#define TLAN_LED_LINK 0x01 ++#define TLAN_BSIZE_REG 0x45 ++#define TLAN_MAX_RX 0x46 ++#define TLAN_INT_DIS 0x48 ++#define TLAN_ID_TX_EOC 0x04 ++#define TLAN_ID_RX_EOF 0x02 ++#define TLAN_ID_RX_EOC 0x01 ++ ++ ++ ++/* ThunderLAN Interrupt Codes */ ++ ++#define TLAN_INT_NUMBER_OF_INTS 8 ++ ++#define TLAN_INT_NONE 0x0000 ++#define TLAN_INT_TX_EOF 0x0001 ++#define TLAN_INT_STAT_OVERFLOW 0x0002 ++#define TLAN_INT_RX_EOF 0x0003 ++#define TLAN_INT_DUMMY 0x0004 ++#define TLAN_INT_TX_EOC 0x0005 ++#define TLAN_INT_STATUS_CHECK 0x0006 ++#define TLAN_INT_RX_EOC 0x0007 ++ ++ ++ ++/* ThunderLAN MII Registers */ ++ ++/* Generic MII/PHY Registers */ ++ ++#define MII_GEN_CTL 0x00 ++#define MII_GC_RESET 0x8000 ++#define MII_GC_LOOPBK 0x4000 ++#define MII_GC_SPEEDSEL 0x2000 ++#define MII_GC_AUTOENB 0x1000 ++#define MII_GC_PDOWN 0x0800 ++#define MII_GC_ISOLATE 0x0400 ++#define MII_GC_AUTORSRT 0x0200 ++#define MII_GC_DUPLEX 0x0100 ++#define MII_GC_COLTEST 0x0080 ++#define MII_GC_RESERVED 0x007F ++#define MII_GEN_STS 0x01 ++#define MII_GS_100BT4 0x8000 ++#define MII_GS_100BTXFD 0x4000 ++#define MII_GS_100BTXHD 0x2000 ++#define MII_GS_10BTFD 0x1000 ++#define MII_GS_10BTHD 0x0800 ++#define MII_GS_RESERVED 0x07C0 ++#define MII_GS_AUTOCMPLT 0x0020 ++#define MII_GS_RFLT 0x0010 ++#define MII_GS_AUTONEG 0x0008 ++#define MII_GS_LINK 0x0004 ++#define MII_GS_JABBER 0x0002 ++#define MII_GS_EXTCAP 0x0001 ++#define MII_GEN_ID_HI 0x02 ++#define MII_GEN_ID_LO 0x03 ++#define MII_GIL_OUI 0xFC00 ++#define MII_GIL_MODEL 0x03F0 ++#define MII_GIL_REVISION 0x000F ++#define MII_AN_ADV 0x04 ++#define MII_AN_LPA 0x05 ++#define MII_AN_EXP 0x06 ++ ++/* ThunderLAN Specific MII/PHY Registers */ ++ ++#define TLAN_TLPHY_ID 0x10 ++#define TLAN_TLPHY_CTL 0x11 ++#define TLAN_TC_IGLINK 0x8000 ++#define TLAN_TC_SWAPOL 0x4000 ++#define TLAN_TC_AUISEL 0x2000 ++#define TLAN_TC_SQEEN 0x1000 ++#define TLAN_TC_MTEST 0x0800 ++#define TLAN_TC_RESERVED 0x07F8 ++#define TLAN_TC_NFEW 0x0004 ++#define TLAN_TC_INTEN 0x0002 ++#define TLAN_TC_TINT 0x0001 ++#define TLAN_TLPHY_STS 0x12 ++#define TLAN_TS_MINT 0x8000 ++#define TLAN_TS_PHOK 0x4000 ++#define TLAN_TS_POLOK 0x2000 ++#define TLAN_TS_TPENERGY 0x1000 ++#define TLAN_TS_RESERVED 0x0FFF ++#define TLAN_TLPHY_PAR 0x19 ++#define TLAN_PHY_CIM_STAT 0x0020 ++#define TLAN_PHY_SPEED_100 0x0040 ++#define TLAN_PHY_DUPLEX_FULL 0x0080 ++#define TLAN_PHY_AN_EN_STAT 0x0400 ++ ++/* National Sem. & Level1 PHY id's */ ++#define NAT_SEM_ID1 0x2000 ++#define NAT_SEM_ID2 0x5C01 ++#define LEVEL1_ID1 0x7810 ++#define LEVEL1_ID2 0x0000 ++ ++#define CIRC_INC( a, b ) if ( ++a >= b ) a = 0 ++ ++/* Routines to access internal registers. */ ++ ++inline u8 TLan_DioRead8(u16 base_addr, u16 internal_addr) ++{ ++ outw(internal_addr, base_addr + TLAN_DIO_ADR); ++ return (inb((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x3))); ++ ++} /* TLan_DioRead8 */ ++ ++ ++ ++ ++inline u16 TLan_DioRead16(u16 base_addr, u16 internal_addr) ++{ ++ outw(internal_addr, base_addr + TLAN_DIO_ADR); ++ return (inw((base_addr + TLAN_DIO_DATA) + (internal_addr & 0x2))); ++ ++} /* TLan_DioRead16 */ ++ ++ ++ ++ ++inline u32 TLan_DioRead32(u16 base_addr, u16 internal_addr) ++{ ++ outw(internal_addr, base_addr + TLAN_DIO_ADR); ++ return (inl(base_addr + TLAN_DIO_DATA)); ++ ++} /* TLan_DioRead32 */ ++ ++ ++ ++ ++inline void TLan_DioWrite8(u16 base_addr, u16 internal_addr, u8 data) ++{ ++ outw(internal_addr, base_addr + TLAN_DIO_ADR); ++ outb(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x3)); ++ ++} ++ ++ ++ ++ ++inline void TLan_DioWrite16(u16 base_addr, u16 internal_addr, u16 data) ++{ ++ outw(internal_addr, base_addr + TLAN_DIO_ADR); ++ outw(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); ++ ++} ++ ++ ++ ++ ++inline void TLan_DioWrite32(u16 base_addr, u16 internal_addr, u32 data) ++{ ++ outw(internal_addr, base_addr + TLAN_DIO_ADR); ++ outl(data, base_addr + TLAN_DIO_DATA + (internal_addr & 0x2)); ++ ++} ++ ++ ++ ++#if 0 ++inline void TLan_ClearBit(u8 bit, u16 port) ++{ ++ outb_p(inb_p(port) & ~bit, port); ++} ++ ++ ++ ++ ++inline int TLan_GetBit(u8 bit, u16 port) ++{ ++ return ((int) (inb_p(port) & bit)); ++} ++ ++ ++ ++ ++inline void TLan_SetBit(u8 bit, u16 port) ++{ ++ outb_p(inb_p(port) | bit, port); ++} ++#endif ++ ++#define TLan_ClearBit( bit, port ) outb_p(inb_p(port) & ~bit, port) ++#define TLan_GetBit( bit, port ) ((int) (inb_p(port) & bit)) ++#define TLan_SetBit( bit, port ) outb_p(inb_p(port) | bit, port) ++ ++#ifdef I_LIKE_A_FAST_HASH_FUNCTION ++/* given 6 bytes, view them as 8 6-bit numbers and return the XOR of those */ ++/* the code below is about seven times as fast as the original code */ ++inline u32 TLan_HashFunc(u8 * a) ++{ ++ u8 hash; ++ ++ hash = (a[0] ^ a[3]); /* & 077 */ ++ hash ^= ((a[0] ^ a[3]) >> 6); /* & 003 */ ++ hash ^= ((a[1] ^ a[4]) << 2); /* & 074 */ ++ hash ^= ((a[1] ^ a[4]) >> 4); /* & 017 */ ++ hash ^= ((a[2] ^ a[5]) << 4); /* & 060 */ ++ hash ^= ((a[2] ^ a[5]) >> 2); /* & 077 */ ++ ++ return (hash & 077); ++} ++ ++#else /* original code */ ++ ++inline u32 xor(u32 a, u32 b) ++{ ++ return ((a && !b) || (!a && b)); ++} ++ ++#define XOR8( a, b, c, d, e, f, g, h ) xor( a, xor( b, xor( c, xor( d, xor( e, xor( f, xor( g, h ) ) ) ) ) ) ) ++#define DA( a, bit ) ( ( (u8) a[bit/8] ) & ( (u8) ( 1 << bit%8 ) ) ) ++ ++inline u32 TLan_HashFunc(u8 * a) ++{ ++ u32 hash; ++ ++ hash = ++ XOR8(DA(a, 0), DA(a, 6), DA(a, 12), DA(a, 18), DA(a, 24), ++ DA(a, 30), DA(a, 36), DA(a, 42)); ++ hash |= ++ XOR8(DA(a, 1), DA(a, 7), DA(a, 13), DA(a, 19), DA(a, 25), ++ DA(a, 31), DA(a, 37), DA(a, 43)) << 1; ++ hash |= ++ XOR8(DA(a, 2), DA(a, 8), DA(a, 14), DA(a, 20), DA(a, 26), ++ DA(a, 32), DA(a, 38), DA(a, 44)) << 2; ++ hash |= ++ XOR8(DA(a, 3), DA(a, 9), DA(a, 15), DA(a, 21), DA(a, 27), ++ DA(a, 33), DA(a, 39), DA(a, 45)) << 3; ++ hash |= ++ XOR8(DA(a, 4), DA(a, 10), DA(a, 16), DA(a, 22), DA(a, 28), ++ DA(a, 34), DA(a, 40), DA(a, 46)) << 4; ++ hash |= ++ XOR8(DA(a, 5), DA(a, 11), DA(a, 17), DA(a, 23), DA(a, 29), ++ DA(a, 35), DA(a, 41), DA(a, 47)) << 5; ++ ++ return hash; ++ ++} ++ ++#endif /* I_LIKE_A_FAST_HASH_FUNCTION */ +Index: b/netboot/tulip.c +=================================================================== +--- a/netboot/tulip.c ++++ b/netboot/tulip.c +@@ -48,6 +48,7 @@ + /*********************************************************************/ + + /* ++ 07 Sep 2003 timlegge Multicast Support Added + 11 Apr 2001 mdc [patch to etherboot 4.7.24] + Major rewrite to include Linux tulip driver media detection + code. This driver should support a lot more cards now. +@@ -98,7 +99,6 @@ + and thinguin mailing lists. + */ + +- + /*********************************************************************/ + /* Declarations */ + /*********************************************************************/ +@@ -106,31 +106,29 @@ + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + + /* User settable parameters */ + +-#undef TULIP_DEBUG +-#undef TULIP_DEBUG_WHERE ++#undef TULIP_DEBUG ++#undef TULIP_DEBUG_WHERE ++#ifdef TULIP_DEBUG + static int tulip_debug = 2; /* 1 normal messages, 0 quiet .. 7 verbose. */ ++#endif + + #define TX_TIME_OUT 2*TICKS_PER_SEC + +-typedef unsigned char u8; +-typedef signed char s8; +-typedef unsigned short u16; +-typedef signed short s16; +-typedef unsigned int u32; +-typedef signed int s32; ++typedef uint8_t u8; ++typedef int8_t s8; ++typedef uint16_t u16; ++typedef int16_t s16; ++typedef uint32_t u32; ++typedef int32_t s32; + + /* helpful macros if on a big_endian machine for changing byte order. + not strictly needed on Intel */ +-#define le16_to_cpu(val) (val) +-#define cpu_to_le32(val) (val) + #define get_unaligned(ptr) (*(ptr)) + #define put_unaligned(val, ptr) ((void)( *(ptr) = (val) )) + #define get_u16(ptr) (*(u16 *)(ptr)) +-#define virt_to_bus(x) ((unsigned long)x) + #define virt_to_le32desc(addr) virt_to_bus(addr) + + #define TULIP_IOTYPE PCI_USES_MASTER | PCI_USES_IO | PCI_ADDR0 +@@ -212,6 +210,8 @@ + TULIP_IOTYPE, 256, PNIC2 }, + { "ADMtek AN981 Comet", { 0x09811317, 0xffffffff, 0, 0, 0, 0 }, + TULIP_IOTYPE, 256, COMET }, ++ { "ADMTek AN983 Comet", { 0x12161113, 0xffffffff, 0, 0, 0, 0 }, ++ TULIP_IOTYPE, 256, COMET }, + { "ADMtek Centaur-P", { 0x09851317, 0xffffffff, 0, 0, 0, 0 }, + TULIP_IOTYPE, 256, COMET }, + { "ADMtek Centaur-C", { 0x19851317, 0xffffffff, 0, 0, 0, 0 }, +@@ -280,9 +280,13 @@ + static u16 t21041_csr14[] = { 0xFFFF, 0xF7FD, 0xF7FD, 0x7F3F, 0x7F3D, }; + static u16 t21041_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; + ++/* not used + static u16 t21142_csr13[] = { 0x0001, 0x0009, 0x0009, 0x0000, 0x0001, }; ++*/ + static u16 t21142_csr14[] = { 0xFFFF, 0x0705, 0x0705, 0x0000, 0x7F3D, }; ++/* not used + static u16 t21142_csr15[] = { 0x0008, 0x0006, 0x000E, 0x0008, 0x0008, }; ++*/ + + /* Offsets to the Command and Status Registers, "CSRs". All accesses + must be longword instructions and quadword aligned. */ +@@ -300,6 +304,14 @@ + TxFIFOUnderflow=0x20, TxJabber=0x08, TxNoBuf=0x04, TxDied=0x02, TxIntr=0x01, + }; + ++/* The configuration bits in CSR6. */ ++enum csr6_mode_bits { ++ TxOn=0x2000, RxOn=0x0002, FullDuplex=0x0200, ++ AcceptBroadcast=0x0100, AcceptAllMulticast=0x0080, ++ AcceptAllPhys=0x0040, AcceptRunt=0x0008, ++}; ++ ++ + enum desc_status_bits { + DescOwnded=0x80000000, RxDescFatalErr=0x8000, RxWholePkt=0x0300, + }; +@@ -384,21 +396,11 @@ + + #define TX_RING_SIZE 2 + static struct tulip_tx_desc tx_ring[TX_RING_SIZE] __attribute__ ((aligned(4))); +- +-#ifdef USE_LOWMEM_BUFFER +-#define txb ((char *)0x10000 - BUFLEN) +-#else + static unsigned char txb[BUFLEN] __attribute__ ((aligned(4))); +-#endif + + #define RX_RING_SIZE 4 + static struct tulip_rx_desc rx_ring[RX_RING_SIZE] __attribute__ ((aligned(4))); +- +-#ifdef USE_LOWMEM_BUFFER +-#define rxb ((char *)0x10000 - RX_RING_SIZE * BUFLEN - BUFLEN) +-#else + static unsigned char rxb[RX_RING_SIZE * BUFLEN] __attribute__ ((aligned(4))); +-#endif + + static struct tulip_private { + int cur_rx; +@@ -471,7 +473,6 @@ + static const char * block_name[] = {"21140 non-MII", "21140 MII PHY", + "21142 Serial PHY", "21142 MII PHY", "21143 SYM PHY", "21143 reset method"}; + +- + /*********************************************************************/ + /* Function Prototypes */ + /*********************************************************************/ +@@ -479,14 +480,13 @@ + static void mdio_write(struct nic *nic, int phy_id, int location, int value); + static int read_eeprom(unsigned long ioaddr, int location, int addr_len); + static void parse_eeprom(struct nic *nic); +-struct nic *tulip_probe(struct nic *nic, unsigned short *io_addrs, +- struct pci_device *pci); ++static int tulip_probe(struct dev *dev, struct pci_device *pci); + static void tulip_init_ring(struct nic *nic); + static void tulip_reset(struct nic *nic); + static void tulip_transmit(struct nic *nic, const char *d, unsigned int t, + unsigned int s, const char *p); +-static int tulip_poll(struct nic *nic); +-static void tulip_disable(struct nic *nic); ++static int tulip_poll(struct nic *nic, int retrieve); ++static void tulip_disable(struct dev *dev); + static void nway_start(struct nic *nic); + static void pnic_do_nway(struct nic *nic); + static void select_media(struct nic *nic, int startup); +@@ -504,7 +504,6 @@ + static void tulip_more(void); + #endif + +- + /*********************************************************************/ + /* Utility Routines */ + /*********************************************************************/ +@@ -535,7 +534,6 @@ + /* wait */ ; + } + +- + /*********************************************************************/ + /* Media Descriptor Code */ + /*********************************************************************/ +@@ -565,7 +563,7 @@ + MDIO protocol. See the MII specifications or DP83840A data sheet + for details. */ + +-int mdio_read(struct nic *nic, int phy_id, int location) ++int mdio_read(struct nic *nic __unused, int phy_id, int location) + { + int i; + int read_cmd = (0xf6 << 10) | (phy_id << 5) | location; +@@ -626,7 +624,7 @@ + return (retval>>1) & 0xffff; + } + +-void mdio_write(struct nic *nic, int phy_id, int location, int value) ++void mdio_write(struct nic *nic __unused, int phy_id, int location, int value) + { + int i; + int cmd = (0x5002 << 16) | (phy_id << 23) | (location<<18) | value; +@@ -682,7 +680,6 @@ + } + } + +- + /*********************************************************************/ + /* EEPROM Reading Code */ + /*********************************************************************/ +@@ -727,7 +724,6 @@ + return retval; + } + +- + /*********************************************************************/ + /* EEPROM Parsing Code */ + /*********************************************************************/ +@@ -895,11 +891,10 @@ + } + } + +- + /*********************************************************************/ + /* tulip_init_ring - setup the tx and rx descriptors */ + /*********************************************************************/ +-static void tulip_init_ring(struct nic *nic) ++static void tulip_init_ring(struct nic *nic __unused) + { + int i; + +@@ -935,7 +930,22 @@ + /* Mark the last entry as wrapping the ring, though this should never happen */ + tx_ring[1].length = cpu_to_le32(DESC_RING_WRAP | BUFLEN); + } +- ++ ++static void set_rx_mode(struct nic *nic __unused) { ++ int csr6 = inl(ioaddr + CSR6) & ~0x00D5; ++ ++ tp->csr6 &= ~0x00D5; ++ ++ /* !IFF_PROMISC */ ++ tp->csr6 |= AcceptAllMulticast; ++ csr6 |= AcceptAllMulticast; ++ ++ outl(csr6, ioaddr + CSR6); ++ ++ ++ ++} ++ + /*********************************************************************/ + /* eth_reset - Reset adapter */ + /*********************************************************************/ +@@ -943,7 +953,6 @@ + { + int i; + unsigned long to; +- u32 addr_low, addr_high; + + #ifdef TULIP_DEBUG_WHERE + whereami("tulip_reset\n"); +@@ -956,7 +965,7 @@ + if (tp->mii_cnt || (tp->mtable && tp->mtable->has_mii)) { + outl(0x814C0000, ioaddr + CSR6); + } +- ++ + /* Reset the chip, holding bit 0 set at least 50 PCI cycles. */ + outl(0x00000001, ioaddr + CSR0); + tulip_wait(1); +@@ -1022,8 +1031,8 @@ + } + + /* Point to rx and tx descriptors */ +- outl((unsigned long)&rx_ring[0], ioaddr + CSR3); +- outl((unsigned long)&tx_ring[0], ioaddr + CSR4); ++ outl(virt_to_le32desc(&rx_ring[0]), ioaddr + CSR3); ++ outl(virt_to_le32desc(&tx_ring[0]), ioaddr + CSR4); + + init_media(nic); + +@@ -1049,11 +1058,12 @@ + if (tp->chip_id == LC82C168) + tulip_check_duplex(nic); + ++ set_rx_mode(nic); ++ + /* enable transmit and receive */ + outl(tp->csr6 | 0x00002002, ioaddr + CSR6); + } + +- + /*********************************************************************/ + /* eth_transmit - Transmit a frame */ + /*********************************************************************/ +@@ -1095,7 +1105,7 @@ + tx_ring[0].status = cpu_to_le32(0x80000000); + + /* Point to transmit descriptor */ +- outl((u32)&tx_ring[0], ioaddr + CSR4); ++ outl(virt_to_le32desc(&tx_ring[0]), ioaddr + CSR4); + + /* Enable Tx */ + outl(csr6 | 0x00002000, ioaddr + CSR6); +@@ -1113,11 +1123,11 @@ + /* Disable Tx */ + outl(csr6 & ~0x00002000, ioaddr + CSR6); + } +- ++ + /*********************************************************************/ + /* eth_poll - Wait for a frame */ + /*********************************************************************/ +-static int tulip_poll(struct nic *nic) ++static int tulip_poll(struct nic *nic, int retrieve) + { + + #ifdef TULIP_DEBUG_WHERE +@@ -1128,6 +1138,8 @@ + if (rx_ring[tp->cur_rx].status & 0x80000000) + return 0; + ++ if ( ! retrieve ) return 1; ++ + #ifdef TULIP_DEBUG_WHERE + whereami("tulip_poll got one\n"); + #endif +@@ -1151,17 +1163,20 @@ + + return 1; + } +- ++ + /*********************************************************************/ + /* eth_disable - Disable the interface */ + /*********************************************************************/ +-static void tulip_disable(struct nic *nic) ++static void tulip_disable(struct dev *dev) + { +- ++ struct nic *nic = (struct nic *)dev; + #ifdef TULIP_DEBUG_WHERE + whereami("tulip_disable\n"); + #endif + ++ /* merge reset and disable */ ++ tulip_reset(nic); ++ + /* disable interrupts */ + outl(0x00000000, ioaddr + CSR7); + +@@ -1171,24 +1186,41 @@ + /* Clear the missed-packet counter. */ + (volatile unsigned long)inl(ioaddr + CSR8); + } +- ++ ++/*********************************************************************/ ++/*IRQ - Enable, Disable, or Force interrupts */ ++/*********************************************************************/ ++static void tulip_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ + /*********************************************************************/ + /* eth_probe - Look for an adapter */ + /*********************************************************************/ +-struct nic *tulip_probe(struct nic *nic, unsigned short *io_addrs, +- struct pci_device *pci) ++static int tulip_probe(struct dev *dev, struct pci_device *pci) + { +- u32 i, l1, l2; ++ struct nic *nic = (struct nic *)dev; ++ u32 i; + u8 chip_rev; + u8 ee_data[EEPROM_SIZE]; + unsigned short sum; + int chip_idx; + static unsigned char last_phys_addr[ETH_ALEN] = {0x00, 'L', 'i', 'n', 'u', 'x'}; + +- if (io_addrs == 0 || *io_addrs == 0) ++ if (pci->ioaddr == 0) + return 0; + +- ioaddr = *io_addrs; ++ ioaddr = pci->ioaddr; ++ nic->ioaddr = pci->ioaddr & ~3; ++ nic->irqno = 0; + + /* point to private storage */ + tp = &tpx; +@@ -1378,15 +1410,15 @@ + /* reset the device and make ready for tx and rx of packets */ + tulip_reset(nic); + +- nic->reset = tulip_reset; ++ dev->disable = tulip_disable; + nic->poll = tulip_poll; + nic->transmit = tulip_transmit; +- nic->disable = tulip_disable; ++ nic->irq = tulip_irq; + + /* give the board a chance to reset before returning */ + tulip_wait(4*TICKS_PER_SEC); + +- return nic; ++ return 1; + } + + static void start_link(struct nic *nic) +@@ -1508,7 +1540,7 @@ + } + } + +-static void nway_start(struct nic *nic) ++static void nway_start(struct nic *nic __unused) + { + int csr14 = ((tp->sym_advertise & 0x0780) << 9) | + ((tp->sym_advertise&0x0020)<<1) | 0xffbf; +@@ -1662,7 +1694,7 @@ + } + } + +-static void pnic_do_nway(struct nic *nic) ++static void pnic_do_nway(struct nic *nic __unused) + { + u32 phy_reg = inl(ioaddr + 0xB8); + u32 new_csr6 = tp->csr6 & ~0x40C40200; +@@ -1886,8 +1918,8 @@ + } + } else if (tp->chip_id == DC21040) { /* 21040 */ + /* Turn on the xcvr interface. */ +- int csr12 = inl(ioaddr + CSR12); + #ifdef TULIP_DEBUG ++ int csr12 = inl(ioaddr + CSR12); + if (tulip_debug > 1) + printf("%s: 21040 media type is %s, CSR12 is %hhX.\n", + tp->nic_name, medianame[tp->if_port], csr12); +@@ -1987,3 +2019,51 @@ + + return 0; + } ++ ++static struct pci_id tulip_nics[] = { ++PCI_ROM(0x1011, 0x0002, "dc21040", "Digital Tulip"), ++PCI_ROM(0x1011, 0x0009, "ds21140", "Digital Tulip Fast"), ++PCI_ROM(0x1011, 0x0014, "dc21041", "Digital Tulip+"), ++PCI_ROM(0x1011, 0x0019, "ds21142", "Digital Tulip 21142"), ++PCI_ROM(0x10b7, 0x9300, "3csoho100b-tx","3ComSOHO100B-TX"), ++PCI_ROM(0x10b9, 0x5261, "ali1563", "ALi 1563 integrated ethernet"), ++PCI_ROM(0x10d9, 0x0512, "mx98713", "Macronix MX987x3"), ++PCI_ROM(0x10d9, 0x0531, "mx98715", "Macronix MX987x5"), ++PCI_ROM(0x1113, 0x1217, "mxic-98715", "Macronix MX987x5"), ++PCI_ROM(0x11ad, 0xc115, "lc82c115", "LinkSys LNE100TX"), ++PCI_ROM(0x11ad, 0x0002, "82c168", "Netgear FA310TX"), ++PCI_ROM(0x1282, 0x9100, "dm9100", "Davicom 9100"), ++PCI_ROM(0x1282, 0x9102, "dm9102", "Davicom 9102"), ++PCI_ROM(0x1282, 0x9009, "dm9009", "Davicom 9009"), ++PCI_ROM(0x1282, 0x9132, "dm9132", "Davicom 9132"), ++PCI_ROM(0x1317, 0x0985, "centaur-p", "ADMtek Centaur-P"), ++PCI_ROM(0x1317, 0x0981, "an981", "ADMtek AN981 Comet"), /* ADMTek Centaur-P (stmicro) */ ++PCI_ROM(0x1113, 0x1216, "an983", "ADMTek AN983 Comet"), ++PCI_ROM(0x1317, 0x9511, "an983b", "ADMTek Comet 983b"), ++PCI_ROM(0x1317, 0x1985, "centaur-c", "ADMTek Centaur-C"), ++PCI_ROM(0x8086, 0x0039, "intel21145", "Intel Tulip"), ++PCI_ROM(0x125b, 0x1400, "ax88140", "ASIX AX88140"), ++PCI_ROM(0x11f6, 0x9881, "rl100tx", "Compex RL100-TX"), ++PCI_ROM(0x115d, 0x0003, "xircomtulip", "Xircom Tulip"), ++PCI_ROM(0x104a, 0x0981, "tulip-0981", "Tulip 0x104a 0x0981"), ++PCI_ROM(0x104a, 0x2774, "tulip-2774", "Tulip 0x104a 0x2774"), ++PCI_ROM(0x1113, 0x9511, "tulip-9511", "Tulip 0x1113 0x9511"), ++PCI_ROM(0x1186, 0x1561, "tulip-1561", "Tulip 0x1186 0x1561"), ++PCI_ROM(0x1259, 0xa120, "tulip-a120", "Tulip 0x1259 0xa120"), ++PCI_ROM(0x13d1, 0xab02, "tulip-ab02", "Tulip 0x13d1 0xab02"), ++PCI_ROM(0x13d1, 0xab03, "tulip-ab03", "Tulip 0x13d1 0xab03"), ++PCI_ROM(0x13d1, 0xab08, "tulip-ab08", "Tulip 0x13d1 0xab08"), ++PCI_ROM(0x14f1, 0x1803, "lanfinity", "Conexant LANfinity"), ++PCI_ROM(0x1626, 0x8410, "tulip-8410", "Tulip 0x1626 0x8410"), ++PCI_ROM(0x1737, 0xab08, "tulip-1737-ab08","Tulip 0x1737 0xab08"), ++PCI_ROM(0x1737, 0xab09, "tulip-ab09", "Tulip 0x1737 0xab09"), ++}; ++ ++struct pci_driver tulip_driver = { ++ .type = NIC_DRIVER, ++ .name = "Tulip", ++ .probe = tulip_probe, ++ .ids = tulip_nics, ++ .id_count = sizeof(tulip_nics)/sizeof(tulip_nics[0]), ++ .class = 0, ++}; +Index: b/netboot/tulip.txt +=================================================================== +--- a/netboot/tulip.txt ++++ /dev/null +@@ -1,53 +0,0 @@ +-This software may be used and distributed according to the terms of +-the GNU Public License, incorporated herein by reference. +- +-This is a tulip and clone driver for Etherboot. See the revision +-history in the tulip.c file for information on changes. This version +-of the driver incorporates changes from Bob Edwards and Paul Mackerras +-who cantributed changes to support the TRENDnet TE100-PCIA NIC which +-uses a genuine Intel 21143-PD chipset. There are also various code +-cleanups to make time-based activities more reliable. +- +-Of course you have to have all the usual Etherboot environment +-(bootp/dhcp/NFS) set up, and you need a Linux kernel with v0.91g +-(7.16.99) or later of the tulip.c driver compiled in to support some +-MX98715 based cards. That file is available at: +- +- http://cesdis.gsfc.nasa.gov/linux/drivers/test/tulip.c +- +-NOTES +- +-I've tested this driver with a SOHOware Fast 10/100 Model SDA110A, +-a Linksys LNE100TX v2.0, and a Netgear FA310TX card, and it worked at +-both 10 and 100 mbits. Other cards based on the tulip family may work as +-well. +- +-These cards are about 20$US, are supported by Linux and now Etherboot, +-and being PCI, they auto-configure IRQ and IOADDR and auto-negotiate +-10/100 half/full duplex. It seems like a pretty good value compared to +-some of the pricier cards, and can lower the cost of building/adapting +-thin client workstations substantially while giving a considerable +-performance increase. +- +-On some PCI tulip clone chipsets (MX987x5, LC82C115, LC82C168) this driver +-lets the card choose the fastest speed it can negotiate with the peer +-device. On other cards, it chooses 10mbit half-duplex. +- +-I burned an AM27C256 (32KByte) EPROM with mx987x5.lzrom and it worked. +-According to the data sheet the MX98715A supports up to 64K (27C512) +-EPROMs, +- +-I've liberally commented the code and header files in the hope that it +-will help the next person who hacks the code or needs to support some +-tulip clone card, or wishes to add functionality. +- +-Anyway, please test this if you can on your tulip based card, and let +-me (mdc@thinguin.org) and the netboot list (netboot@baghira.han.de) +-know how things go. I also would appreciate code review by people who +-program. I'm a strong believer in "another set of eyes". +- +-Regards, +- +-Marty Connor +-mdc@thinguin.org +-http://www.thinguin.org/ +Index: b/netboot/types.h +=================================================================== +--- /dev/null ++++ b/netboot/types.h +@@ -0,0 +1,44 @@ ++#ifndef _TYPES_H ++#define _TYPES_H ++ ++/* I'm architecture independed :-) */ ++ ++/* ++ * It's architecture depended headers for common integer types ++ */ ++#include "stdint.h" ++ ++/* ++ * Here are some RPC types define from linux /usr/include/rpc/types.h ++ */ ++typedef int bool_t; ++typedef int enum_t; ++typedef uint32_t rpcprog_t; ++typedef uint32_t rpcvers_t; ++typedef uint32_t rpcproc_t; ++typedef uint32_t rpcprot_t; ++typedef uint32_t rpcport_t; ++ ++/* For bool_t */ ++/* typedef enum { */ ++/* FALSE = 0, */ ++/* TRUE = 1 */ ++/* } boolean_t; */ ++ ++ ++ ++/* Some BSD or RPC style types */ ++typedef unsigned char u_char; ++typedef unsigned short u_short; ++typedef unsigned int u_int; ++typedef unsigned long u_long; ++typedef long long quad_t; ++typedef unsigned long long u_quad_t; ++typedef struct { ++ int __val[2]; ++}fsid_t; /* Type of file system IDs, from bits/types.h */ ++ ++typedef int daddr_t; /* The type of a disk address, from bits/types.h */ ++typedef char * caddr_t; ++ ++#endif /* _TYPES_H */ +Index: b/netboot/udp.h +=================================================================== +--- /dev/null ++++ b/netboot/udp.h +@@ -0,0 +1,30 @@ ++#ifndef _UDP_H ++#define _UDP_H ++ ++/* We need 'uint16_t' and 'uint8_t' */ ++#include "types.h" ++/* We need 'in_addr' */ ++#include "in.h" ++ ++struct udp_pseudo_hdr { ++ in_addr src; ++ in_addr dest; ++ uint8_t unused; ++ uint8_t protocol; ++ uint16_t len; ++}; ++struct udphdr { ++ uint16_t src; ++ uint16_t dest; ++ uint16_t len; ++ uint16_t chksum; ++}; ++ ++extern void build_udp_hdr(unsigned long __destip, unsigned int __srcsock, ++ unsigned int __destsock, int __ttl, int __len, ++ const void * __buf); ++ ++extern int udp_transmit(unsigned long __destip, unsigned int __srcsock, ++ unsigned int __destsock, int __len, const void * __buf); ++ ++#endif /* _UDP_H */ +Index: b/netboot/via-rhine.c +=================================================================== +--- a/netboot/via-rhine.c ++++ b/netboot/via-rhine.c +@@ -18,7 +18,7 @@ + + */ + +-static const char *version = "rhine.c v1.0.0 2000-01-07\n"; ++static const char *version = "rhine.c v1.0.1 2003-02-06\n"; + + /* A few user-configurable values. */ + +@@ -46,7 +46,6 @@ + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + + /* define all ioaddr */ + +@@ -103,6 +102,11 @@ + #define byCFGD ioaddr + 0x7b + #define wTallyCntMPA ioaddr + 0x7c + #define wTallyCntCRC ioaddr + 0x7d ++#define bySTICKHW ioaddr + 0x83 ++#define byWOLcrClr ioaddr + 0xA4 ++#define byWOLcgClr ioaddr + 0xA7 ++#define byPwrcsrClr ioaddr + 0xAC ++ + /*--------------------- Exioaddr Definitions -------------------------*/ + + /* +@@ -617,9 +621,6 @@ + + */ + +-#define PCI_VENDOR_ID_FET 0x1106 +-#define PCI_DEVICE_ID_FET_3043 0x3043 +- + /* The rest of these values should never change. */ + #define NUM_TX_DESC 2 /* Number of Tx descriptor registers. */ + +@@ -652,23 +653,19 @@ + } + rhine; + +-static struct nic *rhine_probe1 (struct nic *dev, int ioaddr, ++static void rhine_probe1 (struct nic *nic, int ioaddr, + int chip_id, int options); + static int QueryAuto (int); + static int ReadMII (int byMIIIndex, int); + static void WriteMII (char, char, char, int); + static void MIIDelay (void); + static void rhine_init_ring (struct nic *dev); +-static void rhine_disable (struct nic *nic); ++static void rhine_disable (struct dev *dev); + static void rhine_reset (struct nic *nic); +-static int rhine_poll (struct nic *nic); ++static int rhine_poll (struct nic *nic, int retreive); + static void rhine_transmit (struct nic *nic, const char *d, unsigned int t, + unsigned int s, const char *p); + +-/* Linux support functions */ +-#define virt_to_bus(x) ((unsigned long)x) +-#define bus_to_virt(x) ((void *)x) +- + /* Initialize the Rx and Tx rings, along with various 'dev' bits. */ + static void + rhine_init_ring (struct nic *nic) +@@ -854,26 +851,99 @@ + } + } + +-struct nic * +-rhine_probe (struct nic *nic, unsigned short *probeaddrs, +- struct pci_device *pci) ++/* Offsets to the device registers. */ ++enum register_offsets { ++ StationAddr=0x00, RxConfig=0x06, TxConfig=0x07, ChipCmd=0x08, ++ IntrStatus=0x0C, IntrEnable=0x0E, ++ MulticastFilter0=0x10, MulticastFilter1=0x14, ++ RxRingPtr=0x18, TxRingPtr=0x1C, GFIFOTest=0x54, ++ MIIPhyAddr=0x6C, MIIStatus=0x6D, PCIBusConfig=0x6E, ++ MIICmd=0x70, MIIRegAddr=0x71, MIIData=0x72, MACRegEEcsr=0x74, ++ ConfigA=0x78, ConfigB=0x79, ConfigC=0x7A, ConfigD=0x7B, ++ RxMissed=0x7C, RxCRCErrs=0x7E, MiscCmd=0x81, ++ StickyHW=0x83, IntrStatus2=0x84, WOLcrClr=0xA4, WOLcgClr=0xA7, ++ PwrcsrClr=0xAC, ++}; ++ ++/* Bits in the interrupt status/mask registers. */ ++enum intr_status_bits { ++ IntrRxDone=0x0001, IntrRxErr=0x0004, IntrRxEmpty=0x0020, ++ IntrTxDone=0x0002, IntrTxError=0x0008, IntrTxUnderrun=0x0210, ++ IntrPCIErr=0x0040, ++ IntrStatsMax=0x0080, IntrRxEarly=0x0100, ++ IntrRxOverflow=0x0400, IntrRxDropped=0x0800, IntrRxNoBuf=0x1000, ++ IntrTxAborted=0x2000, IntrLinkChange=0x4000, ++ IntrRxWakeUp=0x8000, ++ IntrNormalSummary=0x0003, IntrAbnormalSummary=0xC260, ++ IntrTxDescRace=0x080000, /* mapped from IntrStatus2 */ ++ IntrTxErrSummary=0x082218, ++}; ++#define DEFAULT_INTR (IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow | \ ++ IntrRxDropped | IntrRxNoBuf) ++ ++/*************************************************************************** ++ IRQ - PXE IRQ Handler ++***************************************************************************/ ++void rhine_irq ( struct nic *nic, irq_action_t action ) { ++ struct rhine_private *tp = (struct rhine_private *) nic->priv_data; ++ /* Enable interrupts by setting the interrupt mask. */ ++ unsigned int intr_status; ++ ++ switch ( action ) { ++ case DISABLE : ++ case ENABLE : ++ intr_status = inw(nic->ioaddr + IntrStatus); ++ /* On Rhine-II, Bit 3 indicates Tx descriptor write-back race. */ ++ if (tp->chip_id == 0x3065) ++ intr_status |= inb(nic->ioaddr + IntrStatus2) << 16; ++ intr_status = (intr_status & ~DEFAULT_INTR); ++ if ( action == ENABLE ) ++ intr_status = intr_status | DEFAULT_INTR; ++ outw(intr_status, nic->ioaddr + IntrEnable); ++ break; ++ case FORCE : ++ outw(0x0010, nic->ioaddr + 0x84); ++ break; ++ } ++} ++ ++static int ++rhine_probe (struct dev *dev, struct pci_device *pci) + { ++ struct nic *nic = (struct nic *)dev; ++ struct rhine_private *tp = &rhine; + if (!pci->ioaddr) +- return NULL; +- nic = rhine_probe1 (nic, pci->ioaddr, 0, -1); ++ return 0; ++ rhine_probe1 (nic, pci->ioaddr, pci->dev_id, -1); + +- if (nic) +- adjust_pci_device(pci); +- nic->poll = rhine_poll; +- nic->transmit = rhine_transmit; +- nic->reset = rhine_reset; +- nic->disable = rhine_disable; ++ adjust_pci_device(pci); + rhine_reset (nic); + +- return nic; ++ dev->disable = rhine_disable; ++ nic->poll = rhine_poll; ++ nic->transmit = rhine_transmit; ++ nic->irqno = pci->irq; ++ nic->irq = rhine_irq; ++ nic->ioaddr = tp->ioaddr; ++ ++ ++ return 1; ++} ++ ++static void set_rx_mode(struct nic *nic __unused) { ++ struct rhine_private *tp = (struct rhine_private *) nic->priv_data; ++ unsigned char rx_mode; ++ int ioaddr = tp->ioaddr; ++ ++ /* ! IFF_PROMISC */ ++ outl(0xffffffff, byMAR0); ++ outl(0xffffffff, byMAR4); ++ rx_mode = 0x0C; ++ ++ outb(0x60 /* thresh */ | rx_mode, byRCR ); + } + +-static struct nic * ++static void + rhine_probe1 (struct nic *nic, int ioaddr, int chip_id, int options) + { + struct rhine_private *tp; +@@ -885,6 +955,29 @@ + + if (rhine_debug > 0 && did_version++ == 0) + printf (version); ++ ++ /* D-Link provided reset code (with comment additions) */ ++ if((chip_id != 0x3043) && (chip_id != 0x6100)) { ++ unsigned char byOrgValue; ++ ++ if(rhine_debug > 0) ++ printf("Enabling Sticky Bit Workaround for Chip_id: 0x%hX\n" ++ , chip_id); ++ /* clear sticky bit before reset & read ethernet address */ ++ byOrgValue = inb(bySTICKHW); ++ byOrgValue = byOrgValue & 0xFC; ++ outb(byOrgValue, bySTICKHW); ++ ++ /* (bits written are cleared?) */ ++ /* disable force PME-enable */ ++ outb(0x80, byWOLcgClr); ++ /* disable power-event config bit */ ++ outb(0xFF, byWOLcrClr); ++ /* clear power status (undocumented in vt6102 docs?) */ ++ outb(0xFF, byPwrcsrClr); ++ ++ } ++ + /* Perhaps this should be read from the EEPROM? */ + for (i = 0; i < ETH_ALEN; i++) + nic->node_addr[i] = inb (byPAR0 + i); +@@ -920,6 +1013,7 @@ + } + #endif + ++ + /* query MII to know LineSpeed,duplex mode */ + byMIIvalue = inb (ioaddr + 0x6d); + LineSpeed = byMIIvalue & MIISR_SPEED; +@@ -971,15 +1065,19 @@ + if (tp->default_port) + tp->medialock = 1; + } +- return nic; ++ return; + } + +-static void +-rhine_disable (struct nic *nic) ++static void ++rhine_disable (struct dev *dev) + { ++ struct nic *nic = (struct nic *)dev; + struct rhine_private *tp = (struct rhine_private *) nic->priv_data; + int ioaddr = tp->ioaddr; + ++ /* merge reset and disable */ ++ rhine_reset(nic); ++ + printf ("rhine disable\n"); + /* Switch to loopback mode to avoid hardware races. */ + writeb(0x60 | 0x01, byTCR); +@@ -1002,17 +1100,10 @@ + int rx_bufs_tmp, rx_bufs_tmp1; + int tx_bufs_tmp, tx_bufs_tmp1; + +-#ifdef USE_LOWMEM_BUFFER +-#define buf1 (0x10000 - (RX_RING_SIZE * PKT_BUF_SZ + 32)) +-#define buf2 (buf1 - (RX_RING_SIZE * PKT_BUF_SZ + 32)) +-#define desc1 (buf2 - (TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32)) +-#define desc2 (desc1 - (TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32)) +-#else + static char buf1[RX_RING_SIZE * PKT_BUF_SZ + 32]; + static char buf2[RX_RING_SIZE * PKT_BUF_SZ + 32]; + static char desc1[TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32]; + static char desc2[TX_RING_SIZE * sizeof (struct rhine_tx_desc) + 32]; +-#endif + + /* printf ("rhine_reset\n"); */ + /* Soft reset the chip. */ +@@ -1069,6 +1160,9 @@ + outl (virt_to_bus (tp->rx_ring), dwCurrentRxDescAddr); + outl (virt_to_bus (tp->tx_ring), dwCurrentTxDescAddr); + ++ /* Setup Multicast */ ++ set_rx_mode(nic); ++ + /* close IMR */ + outw (0x0000, byIMR0); + +@@ -1093,15 +1187,34 @@ + /*set IMR to work */ + outw (IMRShadow, byIMR0); + } ++/* Beware of PCI posted writes */ ++#define IOSYNC do { readb(nic->ioaddr + StationAddr); } while (0) + + static int +-rhine_poll (struct nic *nic) ++rhine_poll (struct nic *nic, int retreive) + { + struct rhine_private *tp = (struct rhine_private *) nic->priv_data; + int rxstatus, good = 0;; + + if (tp->rx_ring[tp->cur_rx].rx_status.bits.own_bit == 0) + { ++ unsigned int intr_status; ++ /* There is a packet ready */ ++ if(!retreive) ++ return 1; ++ ++ intr_status = inw(nic->ioaddr + IntrStatus); ++ /* On Rhine-II, Bit 3 indicates Tx descriptor write-back race. */ ++#if 0 ++ if (tp->chip_id == 0x3065) ++ intr_status |= inb(nic->ioaddr + IntrStatus2) << 16; ++#endif ++ /* Acknowledge all of the current interrupt sources ASAP. */ ++ if (intr_status & IntrTxDescRace) ++ outb(0x08, nic->ioaddr + IntrStatus2); ++ outw(intr_status & 0xffff, nic->ioaddr + IntrStatus); ++ IOSYNC; ++ + rxstatus = tp->rx_ring[tp->cur_rx].rx_status.lw; + if ((rxstatus & 0x0300) != 0x0300) + { +@@ -1124,6 +1237,11 @@ + tp->cur_rx++; + tp->cur_rx = tp->cur_rx % RX_RING_SIZE; + } ++ /* Acknowledge all of the current interrupt sources ASAP. */ ++ outw(DEFAULT_INTR & ~IntrRxDone, nic->ioaddr + IntrStatus); ++ ++ IOSYNC; ++ + return good; + } + +@@ -1152,7 +1270,7 @@ + while (s < ETH_ZLEN) + *((char *) tp->tx_buffs[entry] + ETH_HLEN + (s++)) = 0; + +- tp->tx_ring[entry].tx_ctrl.bits.tx_buf_size = ETH_HLEN + s; ++ tp->tx_ring[entry].tx_ctrl.bits.tx_buf_size = s; + + tp->tx_ring[entry].tx_status.bits.own_bit = 1; + +@@ -1170,6 +1288,9 @@ + /*printf("td4=[%X]",inl(dwCurrentTDSE3)); */ + + outb (CR1bak, byCR1); ++ /* Wait until transmit is finished */ ++ while (tp->tx_ring[entry].tx_status.bits.own_bit != 0) ++ ; + tp->cur_tx++; + + /*outw(IMRShadow,byIMR0); */ +@@ -1177,4 +1298,21 @@ + /*tp->tx_skbuff[entry] = 0; */ + } + ++static struct pci_id rhine_nics[] = { ++PCI_ROM(0x1106, 0x3065, "dlink-530tx", "VIA 6102"), ++PCI_ROM(0x1106, 0x3106, "via-rhine-6105", "VIA 6105"), ++PCI_ROM(0x1106, 0x3043, "dlink-530tx-old", "VIA 3043"), /* Rhine-I 86c100a */ ++PCI_ROM(0x1106, 0x3053, "via6105m", "VIA 6105M"), ++PCI_ROM(0x1106, 0x6100, "via-rhine-old", "VIA 86C100A"), /* Rhine-II */ ++}; ++ ++struct pci_driver rhine_driver = { ++ .type = NIC_DRIVER, ++ .name = "VIA 86C100", ++ .probe = rhine_probe, ++ .ids = rhine_nics, ++ .id_count = sizeof(rhine_nics)/sizeof(rhine_nics[0]), ++ .class = 0, ++}; ++ + /* EOF via-rhine.c */ +Index: b/netboot/w89c840.c +=================================================================== +--- a/netboot/w89c840.c ++++ b/netboot/w89c840.c +@@ -43,6 +43,9 @@ + * using timer2 routines. Proposed + * by Ken Yap to eliminate CPU speed + * dependency. ++ * Dec 12 2003 V0.94 timlegge Fixed issues in 5.2, removed ++ * interrupt usage, enabled ++ * multicast support + * + * This is the etherboot driver for cards based on Winbond W89c840F chip. + * +@@ -77,10 +80,9 @@ + #include "etherboot.h" + #include "nic.h" + #include "pci.h" +-#include "cards.h" + #include "timer.h" + +-static const char *w89c840_version = "diver Version 0.92 - August 27, 2000"; ++static const char *w89c840_version = "driver Version 0.94 - December 12, 2003"; + + typedef unsigned char u8; + typedef signed char s8; +@@ -90,9 +92,6 @@ + typedef signed int s32; + + /* Linux support functions */ +-#define virt_to_bus(x) ((unsigned long)x) +-#define bus_to_virt(x) ((void *)x) +- + #define virt_to_le32desc(addr) virt_to_bus(addr) + #define le32desc_to_virt(addr) bus_to_virt(addr) + +@@ -109,7 +108,6 @@ + bonding and packet priority. + There are no ill effects from too-large receive rings. */ + #define TX_RING_SIZE 2 +- + #define RX_RING_SIZE 2 + + /* The presumed FIFO size for working around the Tx-FIFO-overflow bug. +@@ -260,32 +258,20 @@ + + static int ioaddr; + static unsigned short eeprom [0x40]; +- +-#ifdef USE_LOWMEM_BUFFER +-#define rx_packet ((char *)0x10000 - PKT_BUF_SZ * RX_RING_SIZE) +-#define tx_packet ((char *)0x10000 - PKT_BUF_SZ * RX_RING_SIZE - PKT_BUF_SZ * TX_RING_SIZE) +-#else + static char rx_packet[PKT_BUF_SZ * RX_RING_SIZE]; + static char tx_packet[PKT_BUF_SZ * TX_RING_SIZE]; +-#endif + + static int eeprom_read(long ioaddr, int location); + static int mdio_read(int base_address, int phy_id, int location); ++#if 0 + static void mdio_write(int base_address, int phy_id, int location, int value); ++#endif + + static void check_duplex(void); + static void set_rx_mode(void); + static void init_ring(void); + +-/* +-static void wait_long_time(void) +-{ +- printf("Paused - please read output above this line\n"); +- sleep(3); +-} +-*/ +- +-#if defined W89C840_DEBUG ++#if defined(W89C840_DEBUG) + static void decode_interrupt(u32 intr_status) + { + printf("Interrupt status: "); +@@ -349,15 +335,17 @@ + check_duplex(); + set_rx_mode(); + +- /* Clear and Enable interrupts by setting the interrupt mask. */ ++ /* Do not enable the interrupts Etherboot doesn't need them */ ++/* + writel(0x1A0F5, ioaddr + IntrStatus); + writel(0x1A0F5, ioaddr + IntrEnable); +- ++*/ + #if defined(W89C840_DEBUG) + printf("winbond-840 : Done reset.\n"); + #endif + } + ++#if 0 + static void handle_intr(u32 intr_stat) + { + if ((intr_stat & (NormalIntr|AbnormalIntr)) == 0) { +@@ -372,7 +360,7 @@ + /* There was an abnormal interrupt */ + printf("\n-=- Abnormal interrupt.\n"); + +-#if defined (W89C840_DEBUG) ++#if defined(W89C840_DEBUG) + decode_interrupt(intr_stat); + #endif + +@@ -383,19 +371,21 @@ + } + } + } ++#endif + + /************************************************************************** + w89c840_poll - Wait for a frame + ***************************************************************************/ +-static int w89c840_poll(struct nic *nic) ++static int w89c840_poll(struct nic *nic, int retrieve) + { + /* return true if there's an ethernet packet ready to read */ + /* nic->packet should contain data on return */ + /* nic->packetlen should contain length of data */ + int packet_received = 0; + ++#if defined(W89C840_DEBUG) + u32 intr_status = readl(ioaddr + IntrStatus); +- /* handle_intr(intr_status); */ /* -- handled later */ ++#endif + + do { + /* Code from netdev_rx(dev) */ +@@ -411,6 +401,11 @@ + break; + } + ++ if ( !retrieve ) { ++ packet_received = 1; ++ break; ++ } ++ + if ((status & 0x38008300) != 0x0300) { + if ((status & 0x38000300) != 0x0300) { + /* Ingore earlier buffers. */ +@@ -478,11 +473,7 @@ + entry = (++w840private.cur_rx) % RX_RING_SIZE; + w840private.rx_head_desc = &w840private.rx_ring[entry]; + } while (0); +- +- if (intr_status & (AbnormalIntr | TxFIFOUnderflow | IntrPCIErr |TimerInt | IntrTxStopped)) { +- handle_intr(intr_status); +- } +- ++ + return packet_received; + } + +@@ -521,13 +512,13 @@ + + w840private.tx_ring[entry].buffer1 = virt_to_le32desc(tx_packet); + +- w840private.tx_ring[entry].length = (DescWholePkt | s); ++ w840private.tx_ring[entry].length = (DescWholePkt | (u32) s); + if (entry >= TX_RING_SIZE-1) /* Wrap ring */ + w840private.tx_ring[entry].length |= (DescIntr | DescEndRing); + w840private.tx_ring[entry].status = (DescOwn); + w840private.cur_tx++; + +- w840private.tx_q_bytes += s; ++ w840private.tx_q_bytes = (u16) s; + writel(0, ioaddr + TxStartDemand); + + /* Work around horrible bug in the chip by marking the queue as full +@@ -550,33 +541,29 @@ + load_timer2(TX_TIMEOUT); + + { ++#if defined W89C840_DEBUG + u32 intr_stat = 0; +- ++#endif + while (1) { + +- intr_stat = readl(ioaddr + IntrStatus); + #if defined(W89C840_DEBUG) +- decode_interrupt(intr_stat); ++ decode_interrupt(intr_stat); + #endif + +- if (intr_stat & (NormalIntr | IntrTxDone)) { +- + while ( (transmit_status & DescOwn) && timer2_running()) { + + transmit_status = w840private.tx_ring[entry].status; + } + +- writel(intr_stat & 0x0001ffff, ioaddr + IntrStatus); + break; +- } + } + } + + if ((transmit_status & DescOwn) == 0) { + + #if defined(W89C840_DEBUG) +- printf("winbond-840 : transmission complete after %d wait loop iterations, status %X\n", +- TX_LOOP_COUNT - transmit_loop_counter, w840private.tx_ring[entry].status); ++ printf("winbond-840 : transmission complete after wait loop iterations, status %X\n", ++ w840private.tx_ring[entry].status); + #endif + + return; +@@ -592,8 +579,12 @@ + /************************************************************************** + w89c840_disable - Turn off ethernet interface + ***************************************************************************/ +-static void w89c840_disable(struct nic *nic) ++static void w89c840_disable(struct dev *dev) + { ++ struct nic *nic = (struct nic *)dev; ++ /* merge reset and disable */ ++ w89c840_reset(nic); ++ + /* Don't know what to do to disable the board. Is this needed at all? */ + /* Yes, a live NIC can corrupt the loaded memory later [Ken] */ + /* Stop the chip's Tx and Rx processes. */ +@@ -601,20 +592,37 @@ + } + + /************************************************************************** ++w89c840_irq - Enable, Disable, or Force interrupts ++***************************************************************************/ ++static void w89c840_irq(struct nic *nic __unused, irq_action_t action __unused) ++{ ++ switch ( action ) { ++ case DISABLE : ++ break; ++ case ENABLE : ++ break; ++ case FORCE : ++ break; ++ } ++} ++ ++/************************************************************************** + w89c840_probe - Look for an adapter, this routine's visible to the outside + ***************************************************************************/ +-struct nic *w89c840_probe(struct nic *nic, unsigned short *probe_addrs, struct pci_device *p) ++static int w89c840_probe(struct dev *dev, struct pci_device *p) + { ++ struct nic *nic = (struct nic *)dev; + u16 sum = 0; +- int i, j, to; ++ int i, j; + unsigned short value; +- int options; +- int promisc; + +- if (probe_addrs == 0 || probe_addrs[0] == 0) ++ if (p->ioaddr == 0) + return 0; + +- ioaddr = probe_addrs[0]; /* Mask the bit that says "this is an io addr" */ ++ ioaddr = p->ioaddr; ++ nic->ioaddr = p->ioaddr & ~3; ++ nic->irqno = 0; ++ + + #if defined(W89C840_DEBUG) + printf("winbond-840: PCI bus %hhX device function %hhX: I/O address: %hX\n", p->bus, p->devfn, ioaddr); +@@ -622,8 +630,6 @@ + + ioaddr = ioaddr & ~3; /* Mask the bit that says "this is an io addr" */ + +- /* if probe_addrs is 0, then routine can use a hardwired default */ +- + /* From Matt Hortman */ + if (p->vendor == PCI_VENDOR_ID_WINBOND2 + && p->dev_id == PCI_DEVICE_ID_WINBOND2_89C840) { +@@ -689,14 +695,14 @@ + } + + /* point to NIC specific routines */ +- nic->reset = w89c840_reset; +- nic->poll = w89c840_poll; ++ dev->disable = w89c840_disable; ++ nic->poll = w89c840_poll; + nic->transmit = w89c840_transmit; +- nic->disable = w89c840_disable; ++ nic->irq = w89c840_irq; + + w89c840_reset(nic); + +- return nic; ++ return 1; + } + + /* Read the EEPROM and MII Management Data I/O (MDIO) interfaces. These are +@@ -814,6 +820,7 @@ + return (retval>>1) & 0xffff; + } + ++#if 0 + static void mdio_write(int base_address, int phy_id, int location, int value) + { + long mdio_addr = base_address + MIICtrl; +@@ -844,6 +851,7 @@ + } + return; + } ++#endif + + static void check_duplex(void) + { +@@ -877,12 +885,10 @@ + memset(mc_filter, 0xff, sizeof(mc_filter)); + + /* +- * Actually, should work OK with multicast enabled. -- iko +- */ +-/* +- * rx_mode = AcceptBroadcast | AcceptMyPhys | AcceptMulticast; ++ * works OK with multicast enabled. + */ +- rx_mode = AcceptBroadcast | AcceptMyPhys; ++ ++ rx_mode = AcceptBroadcast | AcceptMyPhys | AcceptMulticast; + + writel(mc_filter[0], ioaddr + MulticastFilter0); + writel(mc_filter[1], ioaddr + MulticastFilter1); +@@ -932,3 +938,18 @@ + } + return; + } ++ ++ ++static struct pci_id w89c840_nics[] = { ++PCI_ROM(0x1050, 0x0840, "winbond840", "Winbond W89C840F"), ++PCI_ROM(0x11f6, 0x2011, "compexrl100atx", "Compex RL100ATX"), ++}; ++ ++struct pci_driver w89c840_driver = { ++ .type = NIC_DRIVER, ++ .name = "W89C840F", ++ .probe = w89c840_probe, ++ .ids = w89c840_nics, ++ .id_count = sizeof(w89c840_nics)/sizeof(w89c840_nics[0]), ++ .class = 0, ++}; +Index: b/stage2/disk_io.c +=================================================================== +--- a/stage2/disk_io.c ++++ b/stage2/disk_io.c +@@ -25,6 +25,7 @@ + #ifdef SUPPORT_NETBOOT + # define GRUB 1 + # include ++# include + #endif + + #ifdef GRUB_UTIL diff --git a/boot/grub/grub.hash b/boot/grub/grub.hash new file mode 100644 index 0000000000..566dec8c39 --- /dev/null +++ b/boot/grub/grub.hash @@ -0,0 +1,3 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/g/grub/grub_0.97-68.dsc +sha256 4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b grub_0.97.orig.tar.gz +sha256 a453489cf1fec5d311a0b76dea8c8b2ff67eee1a3eba6c06ab80864494d9773c grub_0.97-68.diff.gz diff --git a/boot/grub/grub.mk b/boot/grub/grub.mk new file mode 100644 index 0000000000..ae687d6b18 --- /dev/null +++ b/boot/grub/grub.mk @@ -0,0 +1,109 @@ +################################################################################ +# +# grub +# +################################################################################ + +GRUB_VERSION = 0.97 +GRUB_SOURCE = grub_$(GRUB_VERSION).orig.tar.gz +GRUB_PATCH = grub_$(GRUB_VERSION)-68.diff.gz +GRUB_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/g/grub + +GRUB_LICENSE = GPLv2+ +GRUB_LICENSE_FILES = COPYING + +# Passing -O0 since the default -O2 passed by Buildroot generates +# non-working stage2. Passing --build-id=none to the linker, because +# the ".note.gnu.build-id" ELF sections generated by default confuse +# objcopy when generating raw binaries. Passing -fno-stack-protector +# to avoid undefined references to __stack_chk_fail. +GRUB_CFLAGS = \ + -DSUPPORT_LOOPDEV \ + -O0 -Wl,--build-id=none \ + -fno-stack-protector + +GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_SPLASH),--enable-graphics,--disable-graphics) + +GRUB_CONFIG-$(BR2_TARGET_GRUB_DISKLESS) += --enable-diskless +GRUB_CONFIG-$(BR2_TARGET_GRUB_3c595) += --enable-3c595 +GRUB_CONFIG-$(BR2_TARGET_GRUB_3c90x) += --enable-3c90x +GRUB_CONFIG-$(BR2_TARGET_GRUB_davicom) += --enable-davicom +GRUB_CONFIG-$(BR2_TARGET_GRUB_e1000) += --enable-e1000 +GRUB_CONFIG-$(BR2_TARGET_GRUB_eepro100) += --enable-eepro100 +GRUB_CONFIG-$(BR2_TARGET_GRUB_epic100) += --enable-epic100 +GRUB_CONFIG-$(BR2_TARGET_GRUB_forcedeth) += --enable-forcedeth +GRUB_CONFIG-$(BR2_TARGET_GRUB_natsemi) += --enable-natsemi +GRUB_CONFIG-$(BR2_TARGET_GRUB_ns83820) += --enable-ns83820 +GRUB_CONFIG-$(BR2_TARGET_GRUB_ns8390) += --enable-ns8390 +GRUB_CONFIG-$(BR2_TARGET_GRUB_pcnet32) += --enable-pcnet32 +GRUB_CONFIG-$(BR2_TARGET_GRUB_pnic) += --enable-pnic +GRUB_CONFIG-$(BR2_TARGET_GRUB_rtl8139) += --enable-rtl8139 +GRUB_CONFIG-$(BR2_TARGET_GRUB_r8169) += --enable-r8169 +GRUB_CONFIG-$(BR2_TARGET_GRUB_sis900) += --enable-sis900 +GRUB_CONFIG-$(BR2_TARGET_GRUB_tg3) += --enable-tg3 +GRUB_CONFIG-$(BR2_TARGET_GRUB_tulip) += --enable-tulip +GRUB_CONFIG-$(BR2_TARGET_GRUB_tlan) += --enable-tlan +GRUB_CONFIG-$(BR2_TARGET_GRUB_undi) += --enable-undi +GRUB_CONFIG-$(BR2_TARGET_GRUB_via_rhine) += --enable-via-rhine +GRUB_CONFIG-$(BR2_TARGET_GRUB_w89c840) += --enable-w89c840 + +GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_FS_EXT2),--enable-ext2fs,--disable-ext2fs) +GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_FS_FAT),--enable-fat,--disable-fat) +GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_FS_ISO9660),--enable-iso9660,--disable-iso9660) +GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_FS_JFS),--enable-jfs,--disable-jfs) +GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_FS_REISERFS),--enable-reiserfs,--disable-reiserfs) +GRUB_CONFIG-y += $(if $(BR2_TARGET_GRUB_FS_XFS),--enable-xfs,--disable-xfs) +GRUB_CONFIG-y += --disable-ffs --disable-ufs2 --disable-minix --disable-vstafs + +GRUB_STAGE_1_5_TO_INSTALL += $(if $(BR2_TARGET_GRUB_FS_EXT2),e2fs) +GRUB_STAGE_1_5_TO_INSTALL += $(if $(BR2_TARGET_GRUB_FS_FAT),fat) +GRUB_STAGE_1_5_TO_INSTALL += $(if $(BR2_TARGET_GRUB_FS_ISO9660),iso9660) +GRUB_STAGE_1_5_TO_INSTALL += $(if $(BR2_TARGET_GRUB_FS_JFS),jfs) +GRUB_STAGE_1_5_TO_INSTALL += $(if $(BR2_TARGET_GRUB_FS_REISERFS),reiserfs) +GRUB_STAGE_1_5_TO_INSTALL += $(if $(BR2_TARGET_GRUB_FS_XFS),xfs) + +define GRUB_DEBIAN_PATCHES + # Apply the patches from the Debian patch + (cd $(@D) ; for f in `cat debian/patches/series | grep -v ^#` ; do \ + cat debian/patches/$$f | patch -g0 -p1 ; \ + done) +endef + +GRUB_POST_PATCH_HOOKS += GRUB_DEBIAN_PATCHES + +GRUB_CONF_ENV = \ + $(HOST_CONFIGURE_OPTS) \ + CFLAGS="$(HOST_CFLAGS) $(GRUB_CFLAGS) -m32" + +GRUB_CONF_OPTS = \ + --disable-auto-linux-mem-opt \ + $(GRUB_CONFIG-y) + +ifeq ($(BR2_TARGET_GRUB_SPLASH),y) +define GRUB_INSTALL_SPLASH + $(INSTALL) -D -m 0644 boot/grub/splash.xpm.gz $(TARGET_DIR)/boot/grub/splash.xpm.gz +endef +else +define GRUB_INSTALL_SPLASH + $(SED) '/^splashimage/d' $(TARGET_DIR)/boot/grub/menu.lst +endef +endif + +# We're cheating here as we're installing the grub binary not in the +# target directory (where it is useless), but in the host +# directory. This grub binary can be used to install grub into the MBR +# of a disk or disk image. + +define GRUB_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/grub/grub $(HOST_DIR)/sbin/grub + $(INSTALL) -D -m 0755 $(@D)/stage1/stage1 $(TARGET_DIR)/boot/grub/stage1 + for f in $(GRUB_STAGE_1_5_TO_INSTALL) ; do \ + $(INSTALL) -D -m 0755 $(@D)/stage2/$${f}_stage1_5 \ + $(TARGET_DIR)/boot/grub/$${f}_stage1_5 ; \ + done + $(INSTALL) -D -m 0644 $(@D)/stage2/stage2 $(TARGET_DIR)/boot/grub/stage2 + $(INSTALL) -D -m 0644 boot/grub/menu.lst $(TARGET_DIR)/boot/grub/menu.lst + $(GRUB_INSTALL_SPLASH) +endef + +$(eval $(autotools-package)) diff --git a/boot/grub/menu.lst b/boot/grub/menu.lst new file mode 100644 index 0000000000..9f14da7ddd --- /dev/null +++ b/boot/grub/menu.lst @@ -0,0 +1,16 @@ +default 0 +timeout 10 + +# Used when no splashimage is used +color cyan/blue white/blue + +# Gets enabled/disabled depending on Grub support for splashimage +splashimage (hd0,0)/boot/grub/splash.xpm.gz + +# Used when a splashimage is enabled +foreground 000000 +background cccccc + +title Buildroot + root (hd0,0) + kernel /boot/bzImage rw root=/dev/sda1 rootwait diff --git a/boot/grub/splash.xpm.gz b/boot/grub/splash.xpm.gz new file mode 100644 index 0000000000..6b30d3de00 Binary files /dev/null and b/boot/grub/splash.xpm.gz differ diff --git a/boot/grub2/Config.in b/boot/grub2/Config.in new file mode 100644 index 0000000000..7dc5cae218 --- /dev/null +++ b/boot/grub2/Config.in @@ -0,0 +1,169 @@ +config BR2_TARGET_GRUB2 + bool "grub2" + depends on BR2_i386 || BR2_x86_64 + help + GNU GRUB is a Multiboot boot loader. It was derived from + GRUB, the GRand Unified Bootloader, which was originally + designed and implemented by Erich Stefan Boleyn. GRUB 2 has + replaced what was formerly known as GRUB (i.e. version + 0.9x), which has, in turn, become GRUB Legacy. + + Amongst others, GRUB2 offers EFI support, which GRUB Legacy + doesn't provide. + + Notes on using Grub2 for BIOS-based platforms + ============================================= + + 1. Create a disk image + dd if=/dev/zero of=disk.img bs=1M count=32 + 2. Partition it (either legacy or GPT style partitions work) + cfdisk disk.img + - Create one partition, type Linux, for the root + filesystem. The only constraint is to make sure there + is enough free space *before* the first partition to + store Grub2. Leaving 1 MB of free space is safe. + 3. Setup loop device and loop partitions + sudo losetup -f disk.img + sudo partx -a /dev/loop0 + 4. Prepare the root partition + sudo mkfs.ext3 -L root /dev/loop0p1 + sudo mount /dev/loop0p1 /mnt + sudo tar -C /mnt -xf output/images/rootfs.tar + sudo umount /mnt + 5. Install Grub2 + sudo ./output/host/usr/sbin/grub-bios-setup \ + -b ./output/host/usr/lib/grub/i386-pc/boot.img \ + -c ./output/images/grub.img -d . /dev/loop0 + 6. Cleanup loop device + sudo partx -d /dev/loop0 + sudo losetup -d /dev/loop0 + 7. Your disk.img is ready! + + Using genimage + -------------- + + If you use genimage to generate your complete image, + installing Grub can be tricky. Here is how to achieve Grub's + installation with genimage: + + partition boot { + in-partition-table = "no" + image = "path_to_boot.img" + offset = 0 + size = 512 + } + partition grub { + in-partition-table = "no" + image = "path_to_grub.img" + offset = 512 + } + + The result is not byte to byte identical to what + grub-bios-setup does but it works anyway. + + To test your BIOS image in Qemu + ------------------------------- + + qemu-system-{i386,x86-64} -hda disk.img + + Notes on using Grub2 for EFI-based platforms + ============================================ + + 1. Create a disk image + dd if=/dev/zero of=disk.img bs=1M count=32 + 2. Partition it with GPT partitions + cgdisk disk.img + - Create a first partition, type EF00, for the + bootloader and kernel image + - Create a second partition, type 8300, for the root + filesystem. + 3. Setup loop device and loop partitions + sudo losetup -f disk.img + sudo partx -a /dev/loop0 + 4. Prepare the boot partition + sudo mkfs.vfat -n boot /dev/loop0p1 + sudo mount /dev/loop0p1 /mnt + sudo cp -a output/images/efi-part/* /mnt/ + sudo cp output/images/bzImage /mnt/ + sudo umount /mnt + 5. Prepare the root partition + sudo mkfs.ext3 -L root /dev/loop0p2 + sudo mount /dev/loop0p2 /mnt + sudo tar -C /mnt -xf output/images/rootfs.tar + sudo umount /mnt + 6 Cleanup loop device + sudo partx -d /dev/loop0 + sudo losetup -d /dev/loop0 + 7. Your disk.img is ready! + + To test your EFI image in Qemu + ------------------------------ + + 1. Download the EFI BIOS for Qemu + Version IA32 or X64 depending on the chosen Grub2 + platform (i386-efi vs. x86-64-efi) + http://sourceforge.net/projects/edk2/files/OVMF/ + 2. Extract, and rename OVMF.fd to bios.bin and + CirrusLogic5446.rom to vgabios-cirrus.bin. + 3. qemu-system-{i386,x86-64} -L ovmf-dir/ -hda disk.img + 4. Make sure to pass pci=nocrs to the kernel command line, + to workaround a bug in the EFI BIOS regarding the + EFI framebuffer. + + http://www.gnu.org/software/grub/ + +if BR2_TARGET_GRUB2 + +choice + prompt "Platform" + +config BR2_TARGET_GRUB2_I386_PC + bool "i386-pc" + help + Select this option if the platform you're targetting is a + x86 or x86-64 legacy BIOS based platform. + +config BR2_TARGET_GRUB2_I386_EFI + bool "i386-efi" + help + Select this option if the platform you're targetting has a + 32 bits EFI BIOS. Note that some x86-64 platforms use a 32 + bits EFI BIOS, and this option should be used in this case. + +config BR2_TARGET_GRUB2_X86_64_EFI + bool "x86-64-efi" + depends on BR2_ARCH_IS_64 + help + Select this option if the platform you're targetting has a + 64 bits EFI BIOS. + +endchoice + +if BR2_TARGET_GRUB2_I386_PC + +config BR2_TARGET_GRUB2_BOOT_PARTITION + string "boot partition" + default "hd0,msdos1" + help + Specify the partition where the /boot/grub/grub.cfg file is + located. Use 'hd0,msdos1' for the first partition of the + first disk if using a legacy partition table, or 'hd0,gpt1' + if using GPT partition table. + +endif # BR2_TARGET_GRUB2_I386_PC + +config BR2_TARGET_GRUB2_BUILTIN_MODULES + string "builtin modules" + default "boot linux ext2 fat squash4 part_msdos part_gpt normal biosdisk" if BR2_TARGET_GRUB2_I386_PC + default "boot linux ext2 fat squash4 part_msdos part_gpt normal efi_gop" \ + if BR2_TARGET_GRUB2_I386_EFI || BR2_TARGET_GRUB2_X86_64_EFI + +config BR2_TARGET_GRUB2_BUILTIN_CONFIG + string "builtin config" + help + Path to a Grub 2 configuration file that will be embedded + into the Grub image itself. This allows to set the root + device and other configuration parameters, but however menu + entries cannot be described in this embedded configuration. + +endif # BR2_TARGET_GRUB2 diff --git a/boot/grub2/grub.cfg b/boot/grub2/grub.cfg new file mode 100644 index 0000000000..bd3e3f0006 --- /dev/null +++ b/boot/grub2/grub.cfg @@ -0,0 +1,6 @@ +set default="0" +set timeout="5" + +menuentry "Buildroot" { + linux /boot/bzImage root=/dev/sda1 rootwait console=tty1 +} diff --git a/boot/grub2/grub2-remove-gets.patch b/boot/grub2/grub2-remove-gets.patch new file mode 100644 index 0000000000..0da71b3292 --- /dev/null +++ b/boot/grub2/grub2-remove-gets.patch @@ -0,0 +1,21 @@ +ISO C11 removes the specification of gets() from the C language, eglibc 2.16+ removed it + +Signed-off-by: Khem Raj +Signed-off-by: Thomas Petazzoni + +Upstream-Status: Pending +Index: grub-1.99/grub-core/gnulib/stdio.in.h +=================================================================== +--- grub-1.99.orig/grub-core/gnulib/stdio.in.h 2010-12-01 06:45:43.000000000 -0800 ++++ grub-1.99/grub-core/gnulib/stdio.in.h 2012-07-04 12:25:02.057099107 -0700 +@@ -140,8 +140,10 @@ + /* It is very rare that the developer ever has full control of stdin, + so any use of gets warrants an unconditional warning. Assume it is + always declared, since it is required by C89. */ ++#if defined gets + #undef gets + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); ++#endif + + #if @GNULIB_FOPEN@ + # if @REPLACE_FOPEN@ diff --git a/boot/grub2/grub2.hash b/boot/grub2/grub2.hash new file mode 100644 index 0000000000..88839056fb --- /dev/null +++ b/boot/grub2/grub2.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 784ec38e7edc32239ad75b8e66df04dc8bfb26d88681bc9f627133a6eb85c458 grub-2.00.tar.xz diff --git a/boot/grub2/grub2.mk b/boot/grub2/grub2.mk new file mode 100644 index 0000000000..88a46f4cee --- /dev/null +++ b/boot/grub2/grub2.mk @@ -0,0 +1,107 @@ +################################################################################ +# +# grub2 +# +################################################################################ + +GRUB2_VERSION = 2.00 +GRUB2_SITE = $(BR2_GNU_MIRROR)/grub +GRUB2_SOURCE = grub-$(GRUB2_VERSION).tar.xz +GRUB2_LICENSE = GPLv3+ +GRUB2_LICENSE_FILES = COPYING +GRUB2_DEPENDENCIES = host-bison host-flex + +GRUB2_BUILTIN_MODULES = $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_MODULES)) +GRUB2_BUILTIN_CONFIG = $(call qstrip,$(BR2_TARGET_GRUB2_BUILTIN_CONFIG)) +GRUB2_BOOT_PARTITION = $(call qstrip,$(BR2_TARGET_GRUB2_BOOT_PARTITION)) + +ifeq ($(BR2_TARGET_GRUB2_I386_PC),y) +GRUB2_IMAGE = $(BINARIES_DIR)/grub.img +GRUB2_CFG = $(TARGET_DIR)/boot/grub/grub.cfg +GRUB2_PREFIX = ($(GRUB2_BOOT_PARTITION))/boot/grub +GRUB2_TUPLE = i386-pc +GRUB2_TARGET = i386 +GRUB2_PLATFORM = pc +else ifeq ($(BR2_TARGET_GRUB2_I386_EFI),y) +GRUB2_IMAGE = $(BINARIES_DIR)/efi-part/EFI/BOOT/bootia32.efi +GRUB2_CFG = $(BINARIES_DIR)/efi-part/EFI/BOOT/grub.cfg +GRUB2_PREFIX = /EFI/BOOT +GRUB2_TUPLE = i386-efi +GRUB2_TARGET = i386 +GRUB2_PLATFORM = efi +else ifeq ($(BR2_TARGET_GRUB2_X86_64_EFI),y) +GRUB2_IMAGE = $(BINARIES_DIR)/efi-part/EFI/BOOT/bootx64.efi +GRUB2_CFG = $(BINARIES_DIR)/efi-part/EFI/BOOT/grub.cfg +GRUB2_PREFIX = /EFI/BOOT +GRUB2_TUPLE = x86_64-efi +GRUB2_TARGET = x86_64 +GRUB2_PLATFORM = efi +endif + +# Grub2 is kind of special: it considers CC, LD and so on to be the +# tools to build the native tools (i.e to be executed on the build +# machine), and uses TARGET_CC, TARGET_CFLAGS, TARGET_CPPFLAGS, +# TARGET_LDFLAGS to build the bootloader itself. However, to add to +# the confusion, it also uses NM, OBJCOPY and STRIP to build the +# bootloader itself; none of these are used to build the native +# tools. + +GRUB2_CONF_ENV = \ + $(HOST_CONFIGURE_OPTS) \ + CPP="$(HOSTCC) -E" \ + TARGET_CC="$(TARGET_CC)" \ + TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \ + NM="$(TARGET_NM)" \ + OBJCOPY="$(TARGET_OBJCOPY)" \ + STRIP="$(TARGET_STRIP)" + +GRUB2_CONF_OPTS = \ + --target=$(GRUB2_TARGET) \ + --with-platform=$(GRUB2_PLATFORM) \ + --disable-grub-mkfont \ + --enable-efiemu=no \ + --enable-liblzma=no \ + --enable-device-mapper=no \ + --enable-libzfs=no \ + --disable-werror + +# We don't want all the native tools and Grub2 modules to be installed +# in the target. So we in fact install everything into the host +# directory, and the image generation process (below) will use the +# grub-mkimage tool and Grub2 modules from the host directory. + +GRUB2_INSTALL_TARGET_OPTS = DESTDIR=$(HOST_DIR) install + +ifeq ($(BR2_TARGET_GRUB2_I386_PC),y) +define GRUB2_IMAGE_INSTALL_ELTORITO + cat $(HOST_DIR)/usr/lib/grub/$(GRUB2_TUPLE)/cdboot.img $(GRUB2_IMAGE) > \ + $(BINARIES_DIR)/grub-eltorito.img +endef +endif + +define GRUB2_IMAGE_INSTALLATION + mkdir -p $(dir $(GRUB2_IMAGE)) + $(HOST_DIR)/usr/bin/grub-mkimage \ + -d $(HOST_DIR)/usr/lib/grub/$(GRUB2_TUPLE) \ + -O $(GRUB2_TUPLE) \ + -o $(GRUB2_IMAGE) \ + -p "$(GRUB2_PREFIX)" \ + $(if $(GRUB2_BUILTIN_CONFIG),-c $(GRUB2_BUILTIN_CONFIG)) \ + $(GRUB2_BUILTIN_MODULES) + mkdir -p $(dir $(GRUB2_CFG)) + $(INSTALL) -D -m 0644 boot/grub2/grub.cfg $(GRUB2_CFG) + $(GRUB2_IMAGE_INSTALL_ELTORITO) +endef +GRUB2_POST_INSTALL_TARGET_HOOKS += GRUB2_IMAGE_INSTALLATION + +ifeq ($(GRUB2_PLATFORM),efi) +define GRUB2_EFI_STARTUP_NSH + echo $(notdir $(GRUB2_IMAGE)) > \ + $(BINARIES_DIR)/efi-part/startup.nsh +endef +GRUB2_POST_INSTALL_TARGET_HOOKS += GRUB2_EFI_STARTUP_NSH +endif + +$(eval $(autotools-package)) diff --git a/boot/syslinux/0001-Fix-gcc-5-ALIGN-causing-Boot-error.patch b/boot/syslinux/0001-Fix-gcc-5-ALIGN-causing-Boot-error.patch new file mode 100644 index 0000000000..2df6766557 --- /dev/null +++ b/boot/syslinux/0001-Fix-gcc-5-ALIGN-causing-Boot-error.patch @@ -0,0 +1,76 @@ +commit e5f2b577ded109291c9632dacb6eaa621d8a59fe +Author: Sylvain Gault +Date: Tue Sep 29 02:38:25 2015 +0200 + + bios: Fix alignment change with gcc 5 + + The section aligment specified in the ld scripts have to be greater or + equal to those in the .o files generated by gcc. + + Signed-off-by: Sylvain Gault + Tested-by: poma + Signed-off-by: Paulo Alcantara + Signed-off-by: Frank Hunleth + +diff --git a/core/i386/syslinux.ld b/core/i386/syslinux.ld +index 7b4e012..7390451 100644 +--- a/core/i386/syslinux.ld ++++ b/core/i386/syslinux.ld +@@ -266,7 +266,7 @@ SECTIONS + __text_end = .; + } + +- . = ALIGN(16); ++ . = ALIGN(32); + + __rodata_vma = .; + __rodata_lma = __rodata_vma + __text_lma - __text_vma; +@@ -361,7 +361,7 @@ SECTIONS + __dynamic_end = .; + } + +- . = ALIGN(16); ++ . = ALIGN(32); + + __data_vma = .; + __data_lma = __data_vma + __text_lma - __text_vma; +@@ -377,7 +377,7 @@ SECTIONS + __pm_code_dwords = (__pm_code_len + 3) >> 2; + + . = ALIGN(128); +- ++ + __bss_vma = .; + __bss_lma = .; /* Dummy */ + .bss (NOLOAD) : AT (__bss_lma) { +diff --git a/core/x86_64/syslinux.ld b/core/x86_64/syslinux.ld +index 1057112..bf815c4 100644 +--- a/core/x86_64/syslinux.ld ++++ b/core/x86_64/syslinux.ld +@@ -266,7 +266,7 @@ SECTIONS + __text_end = .; + } + +- . = ALIGN(16); ++ . = ALIGN(32); + + __rodata_vma = .; + __rodata_lma = __rodata_vma + __text_lma - __text_vma; +@@ -361,7 +361,7 @@ SECTIONS + __dynamic_end = .; + } + +- . = ALIGN(16); ++ . = ALIGN(32); + + __data_vma = .; + __data_lma = __data_vma + __text_lma - __text_vma; +@@ -377,7 +377,7 @@ SECTIONS + __pm_code_dwords = (__pm_code_len + 3) >> 2; + + . = ALIGN(128); +- ++ + __bss_vma = .; + __bss_lma = .; /* Dummy */ + .bss (NOLOAD) : AT (__bss_lma) { diff --git a/boot/syslinux/Config.in b/boot/syslinux/Config.in new file mode 100644 index 0000000000..6067e9ceb3 --- /dev/null +++ b/boot/syslinux/Config.in @@ -0,0 +1,60 @@ +config BR2_TARGET_SYSLINUX + bool "syslinux" + depends on BR2_i386 || BR2_x86_64 + select BR2_HOSTARCH_NEEDS_IA32_COMPILER + # Make sure at least one of the flavors is installed + select BR2_TARGET_SYSLINUX_ISOLINUX \ + if !BR2_TARGET_SYSLINUX_PXELINUX && \ + !BR2_TARGET_SYSLINUX_MBR && \ + !BR2_TARGET_SYSLINUX_EFI + help + The syslinux bootloader for x86 systems. + This includes: syslinux, pxelinux, extlinux. + + http://syslinux.org + +if BR2_TARGET_SYSLINUX + +config BR2_TARGET_SYSLINUX_LEGACY_BIOS + bool + +config BR2_TARGET_SYSLINUX_ISOLINUX + bool "install isolinux" + select BR2_TARGET_SYSLINUX_LEGACY_BIOS + help + Install the legacy-BIOS 'isolinux' image, to boot off + optical media (CDROM, DVD.) + +config BR2_TARGET_SYSLINUX_PXELINUX + bool "install pxelinux" + select BR2_TARGET_SYSLINUX_LEGACY_BIOS + help + Install the legacy-BIOS 'pxelinux' image, to boot off + the network using PXE. + +config BR2_TARGET_SYSLINUX_MBR + bool "install mbr" + select BR2_TARGET_SYSLINUX_LEGACY_BIOS + help + Install the legacy-BIOS 'mbr' image, to boot off a + local MBR-partition (e.g. prepared with 'extlinux' + or 'syslinux'). + +config BR2_TARGET_SYSLINUX_EFI + bool "install efi" + select BR2_PACKAGE_GNU_EFI + help + Install the 'efi' image, to boot from an EFI environment. + + +if BR2_TARGET_SYSLINUX_LEGACY_BIOS + +config BR2_TARGET_SYSLINUX_C32 + string "modules to install" + help + Enter a space-separated list of .c32 modules to install. + Leave empty to install no module. + +endif # BR2_TARGET_SYSLINUX_LEGACY_BIOS + +endif # BR2_TARGET_SYSLINUX diff --git a/boot/syslinux/syslinux.hash b/boot/syslinux/syslinux.hash new file mode 100644 index 0000000000..5303f4df0b --- /dev/null +++ b/boot/syslinux/syslinux.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/boot/syslinux/sha256sums.asc +sha256 26d3986d2bea109d5dc0e4f8c4822a459276cf021125e8c9f23c3cca5d8c850e syslinux-6.03.tar.xz diff --git a/boot/syslinux/syslinux.mk b/boot/syslinux/syslinux.mk new file mode 100644 index 0000000000..82890c5dc9 --- /dev/null +++ b/boot/syslinux/syslinux.mk @@ -0,0 +1,89 @@ +################################################################################ +# +# syslinux to make target msdos/iso9660 filesystems bootable +# +################################################################################ + +SYSLINUX_VERSION = 6.03 +SYSLINUX_SOURCE = syslinux-$(SYSLINUX_VERSION).tar.xz +SYSLINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/boot/syslinux + +SYSLINUX_LICENSE = GPLv2+ +SYSLINUX_LICENSE_FILES = COPYING + +SYSLINUX_INSTALL_IMAGES = YES + +SYSLINUX_DEPENDENCIES = host-nasm host-util-linux host-upx + +ifeq ($(BR2_TARGET_SYSLINUX_LEGACY_BIOS),y) +SYSLINUX_TARGET += bios +endif + +# The syslinux build system must be forced to use Buildroot's gnu-efi +# package by setting EFIINC, LIBDIR and LIBEFI. Otherwise, it uses its +# own copy of gnu-efi included in syslinux's sources since 6.03 +# release. +ifeq ($(BR2_TARGET_SYSLINUX_EFI),y) +ifeq ($(BR2_ARCH_IS_64),y) +SYSLINUX_EFI_BITS = efi64 +else +SYSLINUX_EFI_BITS = efi32 +endif # 64-bit +SYSLINUX_DEPENDENCIES += gnu-efi +SYSLINUX_TARGET += $(SYSLINUX_EFI_BITS) +SYSLINUX_EFI_ARGS = \ + EFIINC=$(STAGING_DIR)/usr/include/efi \ + LIBDIR=$(STAGING_DIR)/usr/lib \ + LIBEFI=$(STAGING_DIR)/usr/lib/libefi.a +endif # EFI + +# The syslinux tarball comes with pre-compiled binaries. +# Since timestamps might not be in the correct order, a rebuild is +# not always triggered for all the different images. +# Cleanup the mess even before we attempt a build, so we indeed +# build everything from source. +define SYSLINUX_CLEANUP + rm -rf $(@D)/bios $(@D)/efi32 $(@D)/efi64 +endef +SYSLINUX_POST_PATCH_HOOKS += SYSLINUX_CLEANUP + +# syslinux build system has no convenient way to pass CFLAGS, +# and the internal zlib should take precedence so -I shouldn't +# be used. +define SYSLINUX_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \ + AR="$(HOSTAR)" $(SYSLINUX_EFI_ARGS) -C $(@D) $(SYSLINUX_TARGET) +endef + +# While the actual bootloader is compiled for the target, several +# utilities for installing the bootloader are meant for the host. +# Repeat the target, otherwise syslinux will try to build everything +# Repeat CC and AR, since syslinux really wants to check them at +# install time +define SYSLINUX_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) CC="$(HOSTCC) -idirafter $(HOST_DIR)/usr/include $(HOST_LDFLAGS)" \ + AR="$(HOSTAR)" $(SYSLINUX_EFI_ARGS) INSTALLROOT=$(HOST_DIR) \ + -C $(@D) $(SYSLINUX_TARGET) install +endef + +SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_ISOLINUX) += bios/core/isolinux.bin +SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_PXELINUX) += bios/core/pxelinux.bin +SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_MBR) += bios/mbr/mbr.bin +SYSLINUX_IMAGES-$(BR2_TARGET_SYSLINUX_EFI) += $(SYSLINUX_EFI_BITS)/efi/syslinux.efi + +SYSLINUX_C32 = $(call qstrip,$(BR2_TARGET_SYSLINUX_C32)) + +# We install the c32 modules from the host-installed tree, where they +# are all neatly installed in a single location, while they are +# scattered around everywhere in the build tree. +define SYSLINUX_INSTALL_IMAGES_CMDS + for i in $(SYSLINUX_IMAGES-y); do \ + $(INSTALL) -D -m 0755 $(@D)/$$i $(BINARIES_DIR)/syslinux/$${i##*/}; \ + done + for i in $(SYSLINUX_C32); do \ + $(INSTALL) -D -m 0755 $(HOST_DIR)/usr/share/syslinux/$${i} \ + $(BINARIES_DIR)/syslinux/$${i}; \ + done +endef + +$(eval $(generic-package)) diff --git a/boot/uboot/2015.07/0001-Revert-arch-Make-board-selection-choices-optional.patch b/boot/uboot/2015.07/0001-Revert-arch-Make-board-selection-choices-optional.patch new file mode 100644 index 0000000000..8b814f2d69 --- /dev/null +++ b/boot/uboot/2015.07/0001-Revert-arch-Make-board-selection-choices-optional.patch @@ -0,0 +1,742 @@ +From ee11fed43e2bd029f71af1e72ab9bb5652f5fc54 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Wed, 29 Jul 2015 20:32:59 +0300 +Subject: [PATCH] Revert "arch: Make board selection choices optional" + +This reverts commit a26cd04920dc069fd6e91abb785426cf6c29f45f. + +Reverted commit caused an issue with "make oldconfig" - default prompt +for target selection was set as No that lead to missing platform +selection by automated scripts like that: +------------------>8------------------ +"yes "" | make oldconfig" on defconfig +------------------>8------------------ + +And that lead to build failure: +------------------>8------------------ +$ make +scripts/kconfig/conf --silentoldconfig Kconfig + CHK include/config.h + UPD include/config.h + GEN include/autoconf.mk +In file included from ./include/common.h:18:0: +include/config.h:5:22: fatal error: configs/.h: No such file or directory + #include + ^ +compilation terminated. +scripts/Makefile.autoconf:72: recipe for target 'include/autoconf.mk' failed +make[1]: *** [include/autoconf.mk] Error 1 +------------------>8------------------ + +Signed-off-by: Alexey Brodkin +--- + arch/arc/Kconfig | 1 - + arch/arm/Kconfig | 1 - + arch/arm/cpu/armv7/exynos/Kconfig | 1 - + arch/arm/cpu/armv7/mx5/Kconfig | 1 - + arch/arm/cpu/armv7/mx6/Kconfig | 1 - + arch/arm/cpu/armv7/omap3/Kconfig | 1 - + arch/arm/cpu/armv7/omap4/Kconfig | 1 - + arch/arm/cpu/armv7/omap5/Kconfig | 1 - + arch/arm/cpu/armv7/rmobile/Kconfig | 1 - + arch/arm/cpu/armv7/s5pc1xx/Kconfig | 1 - + arch/arm/mach-at91/Kconfig | 1 - + arch/arm/mach-bcm283x/Kconfig | 1 - + arch/arm/mach-davinci/Kconfig | 1 - + arch/arm/mach-integrator/Kconfig | 2 -- + arch/arm/mach-keystone/Kconfig | 1 - + arch/arm/mach-kirkwood/Kconfig | 1 - + arch/arm/mach-nomadik/Kconfig | 1 - + arch/arm/mach-orion5x/Kconfig | 1 - + arch/arm/mach-socfpga/Kconfig | 1 - + arch/arm/mach-tegra/Kconfig | 1 - + arch/arm/mach-tegra/tegra114/Kconfig | 1 - + arch/arm/mach-tegra/tegra124/Kconfig | 1 - + arch/arm/mach-tegra/tegra20/Kconfig | 1 - + arch/arm/mach-tegra/tegra30/Kconfig | 1 - + arch/arm/mach-zynq/Kconfig | 1 - + arch/avr32/Kconfig | 1 - + arch/blackfin/Kconfig | 1 - + arch/m68k/Kconfig | 1 - + arch/microblaze/Kconfig | 1 - + arch/mips/Kconfig | 1 - + arch/nds32/Kconfig | 1 - + arch/nios2/Kconfig | 1 - + arch/openrisc/Kconfig | 1 - + arch/powerpc/Kconfig | 1 - + arch/powerpc/cpu/mpc512x/Kconfig | 1 - + arch/powerpc/cpu/mpc5xx/Kconfig | 1 - + arch/powerpc/cpu/mpc5xxx/Kconfig | 1 - + arch/powerpc/cpu/mpc8260/Kconfig | 1 - + arch/powerpc/cpu/mpc83xx/Kconfig | 1 - + arch/powerpc/cpu/mpc85xx/Kconfig | 1 - + arch/powerpc/cpu/mpc86xx/Kconfig | 1 - + arch/powerpc/cpu/mpc8xx/Kconfig | 1 - + arch/powerpc/cpu/ppc4xx/Kconfig | 1 - + arch/sh/Kconfig | 1 - + arch/sparc/Kconfig | 1 - + board/amcc/canyonlands/Kconfig | 1 - + board/coreboot/Kconfig | 1 - + board/dbau1x00/Kconfig | 1 - + board/google/Kconfig | 1 - + board/intel/Kconfig | 1 - + board/micronas/vct/Kconfig | 1 - + board/seco/Kconfig | 2 -- + board/sunxi/Kconfig | 1 - + 53 files changed, 55 deletions(-) + +diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig +index 925e312..640cda8 100644 +--- a/arch/arc/Kconfig ++++ b/arch/arc/Kconfig +@@ -129,7 +129,6 @@ config ARC_CACHE_LINE_SHIFT + + choice + prompt "Target select" +- optional + + config TARGET_TB100 + bool "Support tb100" +diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig +index 9908b43..8eeb46c 100644 +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -64,7 +64,6 @@ config SEMIHOSTING + + choice + prompt "Target select" +- optional + + config ARCH_AT91 + bool "Atmel AT91" +diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig +index 4a7d82f..f2fe748 100644 +--- a/arch/arm/cpu/armv7/exynos/Kconfig ++++ b/arch/arm/cpu/armv7/exynos/Kconfig +@@ -2,7 +2,6 @@ if ARCH_EXYNOS + + choice + prompt "EXYNOS board select" +- optional + + config TARGET_SMDKV310 + select SUPPORT_SPL +diff --git a/arch/arm/cpu/armv7/mx5/Kconfig b/arch/arm/cpu/armv7/mx5/Kconfig +index 9f250c6..2d6c0ce 100644 +--- a/arch/arm/cpu/armv7/mx5/Kconfig ++++ b/arch/arm/cpu/armv7/mx5/Kconfig +@@ -12,7 +12,6 @@ config MX53 + + choice + prompt "MX5 board select" +- optional + + config TARGET_USBARMORY + bool "Support USB armory" +diff --git a/arch/arm/cpu/armv7/mx6/Kconfig b/arch/arm/cpu/armv7/mx6/Kconfig +index 10908c4..662596f 100644 +--- a/arch/arm/cpu/armv7/mx6/Kconfig ++++ b/arch/arm/cpu/armv7/mx6/Kconfig +@@ -27,7 +27,6 @@ config MX6SX + + choice + prompt "MX6 board select" +- optional + + config TARGET_SECOMX6 + bool "Support secomx6 boards" +diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig +index b32a6b0..cc82c50 100644 +--- a/arch/arm/cpu/armv7/omap3/Kconfig ++++ b/arch/arm/cpu/armv7/omap3/Kconfig +@@ -2,7 +2,6 @@ if OMAP34XX + + choice + prompt "OMAP3 board select" +- optional + + config TARGET_AM3517_EVM + bool "AM3517 EVM" +diff --git a/arch/arm/cpu/armv7/omap4/Kconfig b/arch/arm/cpu/armv7/omap4/Kconfig +index df27ea1..eccf897 100644 +--- a/arch/arm/cpu/armv7/omap4/Kconfig ++++ b/arch/arm/cpu/armv7/omap4/Kconfig +@@ -2,7 +2,6 @@ if OMAP44XX + + choice + prompt "OMAP4 board select" +- optional + + config TARGET_DUOVERO + bool "OMAP4430 Gumstix Duovero" +diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig +index 20c3bd9..aca862d 100644 +--- a/arch/arm/cpu/armv7/omap5/Kconfig ++++ b/arch/arm/cpu/armv7/omap5/Kconfig +@@ -2,7 +2,6 @@ if OMAP54XX + + choice + prompt "OMAP5 board select" +- optional + + config TARGET_CM_T54 + bool "CompuLab CM-T54" +diff --git a/arch/arm/cpu/armv7/rmobile/Kconfig b/arch/arm/cpu/armv7/rmobile/Kconfig +index ef56286..638b63d 100644 +--- a/arch/arm/cpu/armv7/rmobile/Kconfig ++++ b/arch/arm/cpu/armv7/rmobile/Kconfig +@@ -2,7 +2,6 @@ if RMOBILE + + choice + prompt "Renesus ARM SoCs board select" +- optional + + config TARGET_ARMADILLO_800EVA + bool "armadillo 800 eva board" +diff --git a/arch/arm/cpu/armv7/s5pc1xx/Kconfig b/arch/arm/cpu/armv7/s5pc1xx/Kconfig +index 792ef59..65cc9eb 100644 +--- a/arch/arm/cpu/armv7/s5pc1xx/Kconfig ++++ b/arch/arm/cpu/armv7/s5pc1xx/Kconfig +@@ -2,7 +2,6 @@ if ARCH_S5PC1XX + + choice + prompt "S5PC1XX board select" +- optional + + config TARGET_S5P_GONI + bool "S5P Goni board" +diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig +index bbf4228..5dc2cb2 100644 +--- a/arch/arm/mach-at91/Kconfig ++++ b/arch/arm/mach-at91/Kconfig +@@ -2,7 +2,6 @@ if ARCH_AT91 + + choice + prompt "Atmel AT91 board select" +- optional + + config TARGET_AT91RM9200EK + bool "Atmel AT91RM9200 evaluation kit" +diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig +index 2315a13..d40f505 100644 +--- a/arch/arm/mach-bcm283x/Kconfig ++++ b/arch/arm/mach-bcm283x/Kconfig +@@ -3,7 +3,6 @@ menu "Broadcom BCM283X family" + + choice + prompt "Broadcom BCM283X board select" +- optional + + config TARGET_RPI + bool "Raspberry Pi" +diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig +index e6cb390..3ef55d3 100644 +--- a/arch/arm/mach-davinci/Kconfig ++++ b/arch/arm/mach-davinci/Kconfig +@@ -2,7 +2,6 @@ if ARCH_DAVINCI + + choice + prompt "DaVinci board select" +- optional + + config TARGET_ENBW_CMC + bool "EnBW CMC board" +diff --git a/arch/arm/mach-integrator/Kconfig b/arch/arm/mach-integrator/Kconfig +index c54d69d..8ffc544 100644 +--- a/arch/arm/mach-integrator/Kconfig ++++ b/arch/arm/mach-integrator/Kconfig +@@ -3,7 +3,6 @@ menu "Integrator Options" + + choice + prompt "Integrator platform select" +- optional + + config ARCH_INTEGRATOR_AP + bool "Support Integrator/AP platform" +@@ -19,7 +18,6 @@ config ARCH_CINTEGRATOR + + choice + prompt "Integrator core module select" +- optional + + config CM720T + bool "Core Module for ARM720T" +diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig +index 67f1a33..134ae87 100644 +--- a/arch/arm/mach-keystone/Kconfig ++++ b/arch/arm/mach-keystone/Kconfig +@@ -2,7 +2,6 @@ if ARCH_KEYSTONE + + choice + prompt "TI Keystone board select" +- optional + + config TARGET_K2HK_EVM + bool "TI Keystone 2 Kepler/Hawking EVM" +diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig +index 1261885..45c6687 100644 +--- a/arch/arm/mach-kirkwood/Kconfig ++++ b/arch/arm/mach-kirkwood/Kconfig +@@ -2,7 +2,6 @@ if KIRKWOOD + + choice + prompt "Marvell Kirkwood board select" +- optional + + config TARGET_OPENRD + bool "Marvell OpenRD Board" +diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig +index ba72a41..265f336 100644 +--- a/arch/arm/mach-nomadik/Kconfig ++++ b/arch/arm/mach-nomadik/Kconfig +@@ -2,7 +2,6 @@ if ARCH_NOMADIK + + choice + prompt "Nomadik board select" +- optional + + config NOMADIK_NHK8815 + bool "ST 8815 Nomadik Hardware Kit" +diff --git a/arch/arm/mach-orion5x/Kconfig b/arch/arm/mach-orion5x/Kconfig +index 7644b8d..291c511 100644 +--- a/arch/arm/mach-orion5x/Kconfig ++++ b/arch/arm/mach-orion5x/Kconfig +@@ -2,7 +2,6 @@ if ORION5X + + choice + prompt "Marvell Orion board select" +- optional + + config TARGET_EDMINIV2 + bool "LaCie Ethernet Disk mini V2" +diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig +index e46c348..204efca 100644 +--- a/arch/arm/mach-socfpga/Kconfig ++++ b/arch/arm/mach-socfpga/Kconfig +@@ -2,7 +2,6 @@ if ARCH_SOCFPGA + + choice + prompt "Altera SOCFPGA board select" +- optional + + config TARGET_SOCFPGA_ARRIA5 + bool "Altera SOCFPGA Arria V" +diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig +index 54bd648..ef77c84 100644 +--- a/arch/arm/mach-tegra/Kconfig ++++ b/arch/arm/mach-tegra/Kconfig +@@ -2,7 +2,6 @@ if TEGRA + + choice + prompt "Tegra SoC select" +- optional + + config TEGRA20 + bool "Tegra20 family" +diff --git a/arch/arm/mach-tegra/tegra114/Kconfig b/arch/arm/mach-tegra/tegra114/Kconfig +index 1047b92..31012bc 100644 +--- a/arch/arm/mach-tegra/tegra114/Kconfig ++++ b/arch/arm/mach-tegra/tegra114/Kconfig +@@ -2,7 +2,6 @@ if TEGRA114 + + choice + prompt "Tegra114 board select" +- optional + + config TARGET_DALMORE + bool "NVIDIA Tegra114 Dalmore evaluation board" +diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig +index f3324ff..86c1301 100644 +--- a/arch/arm/mach-tegra/tegra124/Kconfig ++++ b/arch/arm/mach-tegra/tegra124/Kconfig +@@ -2,7 +2,6 @@ if TEGRA124 + + choice + prompt "Tegra124 board select" +- optional + + config TARGET_JETSON_TK1 + bool "NVIDIA Tegra124 Jetson TK1 board" +diff --git a/arch/arm/mach-tegra/tegra20/Kconfig b/arch/arm/mach-tegra/tegra20/Kconfig +index 1bb8dff..7f09f81 100644 +--- a/arch/arm/mach-tegra/tegra20/Kconfig ++++ b/arch/arm/mach-tegra/tegra20/Kconfig +@@ -2,7 +2,6 @@ if TEGRA20 + + choice + prompt "Tegra20 board select" +- optional + + config TARGET_HARMONY + bool "NVIDIA Tegra20 Harmony evaluation board" +diff --git a/arch/arm/mach-tegra/tegra30/Kconfig b/arch/arm/mach-tegra/tegra30/Kconfig +index e78331e..3abdc7b 100644 +--- a/arch/arm/mach-tegra/tegra30/Kconfig ++++ b/arch/arm/mach-tegra/tegra30/Kconfig +@@ -2,7 +2,6 @@ if TEGRA30 + + choice + prompt "Tegra30 board select" +- optional + + config TARGET_APALIS_T30 + bool "Toradex Apalis T30 board" +diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig +index 1de5b07..6b0e295 100644 +--- a/arch/arm/mach-zynq/Kconfig ++++ b/arch/arm/mach-zynq/Kconfig +@@ -10,7 +10,6 @@ config ZYNQ_CUSTOM_INIT + + choice + prompt "Xilinx Zynq board select" +- optional + + config TARGET_ZYNQ_ZED + bool "Zynq ZedBoard" +diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig +index eb33774..801b9cc 100644 +--- a/arch/avr32/Kconfig ++++ b/arch/avr32/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "Target select" +- optional + + config TARGET_ATNGW100 + bool "Support atngw100" +diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig +index 0a2fb4d..31913fe 100644 +--- a/arch/blackfin/Kconfig ++++ b/arch/blackfin/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "Target select" +- optional + + config TARGET_BCT_BRETTL2 + bool "Support bct-brettl2" +diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig +index 26509b7..69cb0f7 100644 +--- a/arch/m68k/Kconfig ++++ b/arch/m68k/Kconfig +@@ -114,7 +114,6 @@ config M548x + + choice + prompt "Target select" +- optional + + config TARGET_M52277EVB + bool "Support M52277EVB" +diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig +index 077b2a7..6f419f0 100644 +--- a/arch/microblaze/Kconfig ++++ b/arch/microblaze/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "Target select" +- optional + + config TARGET_MICROBLAZE_GENERIC + bool "Support microblaze-generic" +diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig +index 7f7e258..87b94ac 100644 +--- a/arch/mips/Kconfig ++++ b/arch/mips/Kconfig +@@ -10,7 +10,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_QEMU_MIPS + bool "Support qemu-mips" +diff --git a/arch/nds32/Kconfig b/arch/nds32/Kconfig +index 98b0282..81b0a01 100644 +--- a/arch/nds32/Kconfig ++++ b/arch/nds32/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "Target select" +- optional + + config TARGET_ADP_AG101 + bool "Support adp-ag101" +diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig +index 8ae7f6e..b3be7b5 100644 +--- a/arch/nios2/Kconfig ++++ b/arch/nios2/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "Target select" +- optional + + config TARGET_NIOS2_GENERIC + bool "Support nios2-generic" +diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig +index 11014d1..4d62b4c 100644 +--- a/arch/openrisc/Kconfig ++++ b/arch/openrisc/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "Target select" +- optional + + config TARGET_OPENRISC_GENERIC + bool "Support openrisc-generic" +diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig +index 3b3f446..8e5a3e2 100644 +--- a/arch/powerpc/Kconfig ++++ b/arch/powerpc/Kconfig +@@ -6,7 +6,6 @@ config SYS_ARCH + + choice + prompt "CPU select" +- optional + + config MPC512X + bool "MPC512X" +diff --git a/arch/powerpc/cpu/mpc512x/Kconfig b/arch/powerpc/cpu/mpc512x/Kconfig +index 53450ae..a0f0ede 100644 +--- a/arch/powerpc/cpu/mpc512x/Kconfig ++++ b/arch/powerpc/cpu/mpc512x/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_PDM360NG + bool "Support pdm360ng" +diff --git a/arch/powerpc/cpu/mpc5xx/Kconfig b/arch/powerpc/cpu/mpc5xx/Kconfig +index 5275447..aad4a7c 100644 +--- a/arch/powerpc/cpu/mpc5xx/Kconfig ++++ b/arch/powerpc/cpu/mpc5xx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_CMI_MPC5XX + bool "Support cmi_mpc5xx" +diff --git a/arch/powerpc/cpu/mpc5xxx/Kconfig b/arch/powerpc/cpu/mpc5xxx/Kconfig +index 5d49228..eec9d7d 100644 +--- a/arch/powerpc/cpu/mpc5xxx/Kconfig ++++ b/arch/powerpc/cpu/mpc5xxx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_A3M071 + bool "Support a3m071" +diff --git a/arch/powerpc/cpu/mpc8260/Kconfig b/arch/powerpc/cpu/mpc8260/Kconfig +index e93732d..55941c8 100644 +--- a/arch/powerpc/cpu/mpc8260/Kconfig ++++ b/arch/powerpc/cpu/mpc8260/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_KM82XX + bool "Support km82xx" +diff --git a/arch/powerpc/cpu/mpc83xx/Kconfig b/arch/powerpc/cpu/mpc83xx/Kconfig +index 3fb901f..88a3bd6 100644 +--- a/arch/powerpc/cpu/mpc83xx/Kconfig ++++ b/arch/powerpc/cpu/mpc83xx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_MPC8308_P1M + bool "Support mpc8308_p1m" +diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig +index 3e8d0b1..aff5fdb 100644 +--- a/arch/powerpc/cpu/mpc85xx/Kconfig ++++ b/arch/powerpc/cpu/mpc85xx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_SBC8548 + bool "Support sbc8548" +diff --git a/arch/powerpc/cpu/mpc86xx/Kconfig b/arch/powerpc/cpu/mpc86xx/Kconfig +index fe1859d..14e8b1a 100644 +--- a/arch/powerpc/cpu/mpc86xx/Kconfig ++++ b/arch/powerpc/cpu/mpc86xx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_SBC8641D + bool "Support sbc8641d" +diff --git a/arch/powerpc/cpu/mpc8xx/Kconfig b/arch/powerpc/cpu/mpc8xx/Kconfig +index 79cee35..e8bcbe9 100644 +--- a/arch/powerpc/cpu/mpc8xx/Kconfig ++++ b/arch/powerpc/cpu/mpc8xx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_TQM823L + bool "Support TQM823L" +diff --git a/arch/powerpc/cpu/ppc4xx/Kconfig b/arch/powerpc/cpu/ppc4xx/Kconfig +index 10b86e0..4d5954a 100644 +--- a/arch/powerpc/cpu/ppc4xx/Kconfig ++++ b/arch/powerpc/cpu/ppc4xx/Kconfig +@@ -6,7 +6,6 @@ config SYS_CPU + + choice + prompt "Target select" +- optional + + config TARGET_CSB272 + bool "Support csb272" +diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig +index 6ac22af..ff8f5b5 100644 +--- a/arch/sh/Kconfig ++++ b/arch/sh/Kconfig +@@ -29,7 +29,6 @@ config SH_32BIT + + choice + prompt "Target select" +- optional + + config TARGET_RSK7203 + bool "RSK+ 7203" +diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig +index 04dc08f..2df09b2 100644 +--- a/arch/sparc/Kconfig ++++ b/arch/sparc/Kconfig +@@ -14,7 +14,6 @@ config LEON3 + + choice + prompt "Board select" +- optional + + config TARGET_GRSIM_LEON2 + bool "GRSIM simulating a LEON2 board" +diff --git a/board/amcc/canyonlands/Kconfig b/board/amcc/canyonlands/Kconfig +index a655dbc..ef66ad4 100644 +--- a/board/amcc/canyonlands/Kconfig ++++ b/board/amcc/canyonlands/Kconfig +@@ -11,7 +11,6 @@ config SYS_CONFIG_NAME + + choice BOARD_TYPE + prompt "Select which board to build for" +- optional + + config CANYONLANDS + bool "Glacier" +diff --git a/board/coreboot/Kconfig b/board/coreboot/Kconfig +index ede6065..dc9b70f 100644 +--- a/board/coreboot/Kconfig ++++ b/board/coreboot/Kconfig +@@ -8,7 +8,6 @@ if VENDOR_COREBOOT + + choice + prompt "Mainboard model" +- optional + + config TARGET_COREBOOT + bool "coreboot" +diff --git a/board/dbau1x00/Kconfig b/board/dbau1x00/Kconfig +index b813adb..1286e45 100644 +--- a/board/dbau1x00/Kconfig ++++ b/board/dbau1x00/Kconfig +@@ -13,7 +13,6 @@ menu "dbau1x00 board options" + + choice + prompt "Select au1x00 SoC type" +- optional + + config DBAU1100 + bool "Select AU1100" +diff --git a/board/google/Kconfig b/board/google/Kconfig +index e9559c9..302f68e 100644 +--- a/board/google/Kconfig ++++ b/board/google/Kconfig +@@ -8,7 +8,6 @@ if VENDOR_GOOGLE + + choice + prompt "Mainboard model" +- optional + + config TARGET_CHROMEBOOK_LINK + bool "Chromebook link" +diff --git a/board/intel/Kconfig b/board/intel/Kconfig +index 3d9ecf0..7fe21b9 100644 +--- a/board/intel/Kconfig ++++ b/board/intel/Kconfig +@@ -8,7 +8,6 @@ if VENDOR_INTEL + + choice + prompt "Mainboard model" +- optional + + config TARGET_CROWNBAY + bool "Crown Bay" +diff --git a/board/micronas/vct/Kconfig b/board/micronas/vct/Kconfig +index c518079..288a1ae 100644 +--- a/board/micronas/vct/Kconfig ++++ b/board/micronas/vct/Kconfig +@@ -13,7 +13,6 @@ menu "vct board options" + + choice + prompt "Board variant" +- optional + + config VCT_PLATINUM + bool "Enable VCT_PLATINUM" +diff --git a/board/seco/Kconfig b/board/seco/Kconfig +index af16697..dcb1ac8 100644 +--- a/board/seco/Kconfig ++++ b/board/seco/Kconfig +@@ -2,7 +2,6 @@ if TARGET_SECOMX6 + + choice + prompt "SECO i.MX6 Board variant" +- optional + + config SECOMX6_Q7 + bool "Q7" +@@ -17,7 +16,6 @@ endchoice + + choice + prompt "SECO i.MX6 SoC variant" +- optional + + config SECOMX6Q + bool "i.MX6Q" +diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig +index 2a1cd3c..808de26 100644 +--- a/board/sunxi/Kconfig ++++ b/board/sunxi/Kconfig +@@ -18,7 +18,6 @@ config SUNXI_GEN_SUN6I + + choice + prompt "Sunxi SoC Variant" +- optional + + config MACH_SUN4I + bool "sun4i (Allwinner A10)" +-- +2.4.3 + diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in new file mode 100644 index 0000000000..4613dd3c95 --- /dev/null +++ b/boot/uboot/Config.in @@ -0,0 +1,377 @@ +config BR2_TARGET_UBOOT + bool "U-Boot" + help + Build "Das U-Boot" Boot Monitor + +if BR2_TARGET_UBOOT +choice + prompt "Build system" + default BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY + +config BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY + bool "Legacy" + help + Select this option if you use an old U-Boot (older than 2015.04), + so that we use the old build system. + +config BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG + bool "Kconfig" + help + Select this option if you use a recent U-Boot version (2015.04 or + newer), so that we use the Kconfig build system. + +endchoice + +if BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY +config BR2_TARGET_UBOOT_BOARDNAME + string "U-Boot board name" + help + One of U-Boot supported boards to be built. + This will be suffixed with _config to meet U-Boot standard naming. + See boards.cfg in U-Boot source code for the list of available + configurations. +endif + +choice + prompt "U-Boot Version" + help + Select the specific U-Boot version you want to use + +config BR2_TARGET_UBOOT_LATEST_VERSION + bool "2016.03" + +config BR2_TARGET_UBOOT_CUSTOM_VERSION + bool "Custom version" + help + This option allows to use a specific official versions + +config BR2_TARGET_UBOOT_CUSTOM_TARBALL + bool "Custom tarball" + +config BR2_TARGET_UBOOT_CUSTOM_GIT + bool "Custom Git repository" + +config BR2_TARGET_UBOOT_CUSTOM_HG + bool "Custom Mercurial repository" + +config BR2_TARGET_UBOOT_CUSTOM_SVN + bool "Custom Subversion repository" + +endchoice + +config BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE + string "U-Boot version" + depends on BR2_TARGET_UBOOT_CUSTOM_VERSION + +config BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION + string "URL of custom U-Boot tarball" + depends on BR2_TARGET_UBOOT_CUSTOM_TARBALL + +if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG || BR2_TARGET_UBOOT_CUSTOM_SVN + +config BR2_TARGET_UBOOT_CUSTOM_REPO_URL + string "URL of custom repository" + default BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL \ + if BR2_TARGET_UBOOT_CUSTOM_GIT_REPO_URL != "" # legacy + +config BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION + string "Custom repository version" + default BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION \ + if BR2_TARGET_UBOOT_CUSTOM_GIT_VERSION != "" # legacy + help + Revision to use in the typical format used by Git/Mercurial/Subversion + E.G. a sha id, a tag, branch, .. + +endif + +config BR2_TARGET_UBOOT_VERSION + string + default "2016.03" if BR2_TARGET_UBOOT_LATEST_VERSION + default BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE \ + if BR2_TARGET_UBOOT_CUSTOM_VERSION + default "custom" if BR2_TARGET_UBOOT_CUSTOM_TARBALL + default BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION \ + if BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG || BR2_TARGET_UBOOT_CUSTOM_SVN + +config BR2_TARGET_UBOOT_PATCH + string "Custom U-Boot patches" + help + A space-separated list of patches to apply to U-Boot. + Each patch can be described as an URL, a local file path, + or a directory. In the case of a directory, all files + matching *.patch in the directory will be applied. + + Most users may leave this empty + +if BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG +choice + prompt "U-Boot configuration" + default BR2_TARGET_UBOOT_USE_DEFCONFIG + +config BR2_TARGET_UBOOT_USE_DEFCONFIG + bool "Using an in-tree board defconfig file" + +config BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG + bool "Using a custom board (def)config file" + +endchoice + +config BR2_TARGET_UBOOT_BOARD_DEFCONFIG + string "Board defconfig" + depends on BR2_TARGET_UBOOT_USE_DEFCONFIG + help + Name of the board for which U-Boot should be built, without + the _defconfig suffix. + +config BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE + string "Configuration file path" + depends on BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG + help + Path to the U-Boot configuration file. +endif + +config BR2_TARGET_UBOOT_NEEDS_DTC + bool "U-Boot needs dtc" + select BR2_PACKAGE_HOST_DTC + help + Select this option if your U-Boot board configuration + requires the Device Tree compiler to be available. + +choice + prompt "U-Boot binary format" + default BR2_TARGET_UBOOT_FORMAT_BIN + +config BR2_TARGET_UBOOT_FORMAT_AIS + bool "u-boot.ais" + help + AIS (Application Image Script) is a format defined by TI. + It is required to load code/data on OMAP-L1 processors. + u-boot.ais contains U-Boot with the SPL support. + +config BR2_TARGET_UBOOT_FORMAT_BIN + bool "u-boot.bin" + +config BR2_TARGET_UBOOT_FORMAT_DTB_IMG + bool "u-boot-dtb.img" + +config BR2_TARGET_UBOOT_FORMAT_IMG + bool "u-boot.img" + +config BR2_TARGET_UBOOT_FORMAT_IMX + bool "u-boot.imx" + +config BR2_TARGET_UBOOT_FORMAT_NAND_BIN + bool "u-boot-nand.bin" + +config BR2_TARGET_UBOOT_FORMAT_KWB + depends on BR2_arm + bool "u-boot.kwb (Marvell)" + +config BR2_TARGET_UBOOT_FORMAT_LDR + depends on BR2_bfin + bool "u-boot.ldr" + +config BR2_TARGET_UBOOT_FORMAT_ELF + bool "u-boot.elf" + +config BR2_TARGET_UBOOT_FORMAT_SB + depends on BR2_arm + bool "u-boot.sb (Freescale i.MX28)" + +config BR2_TARGET_UBOOT_FORMAT_SD + depends on BR2_arm + bool "u-boot.sd (Freescale i.MX28)" + help + This is Freescale i.MX28 SB format, with a header for booting + from an SD card. + + U-boot includes an mxsboot tool to generate this format, + starting from 2011.12. + + See doc/README.mxs (or doc/README.mx28_common before 2013.07) + +config BR2_TARGET_UBOOT_FORMAT_NAND + depends on BR2_arm + bool "u-boot.nand (Freescale i.MX28)" + help + This is Freescale i.MX28 BootStream format (.sb), with a header + for booting from a NAND flash. + + U-boot includes an mxsboot tool to generate this format, + starting from 2011.12. + + There are two possibilities when preparing an image writable to + NAND flash: + 1) The NAND was not written at all yet or the BCB (Boot Control + Blocks) is broken. In this case, the NAND image 'u-boot.nand' + needs to written. + 2) The NAND flash was already written with a good BCB. This + applies after 'u-boot.nand' was correctly written. There is no + need to write the BCB again. In this case, the bootloader can be + upgraded by writing 'u-boot.sb'. + + To satisfy both cases, the 'u-boot.nand' image obtained from + mxsboot as well as the U-Boot make target 'u-boot.sb' are copied + to the binaries directory. + + See doc/README.mxs (or doc/README.mx28_common before 2013.07) + +if BR2_TARGET_UBOOT_FORMAT_NAND + +config BR2_TARGET_UBOOT_FORMAT_NAND_PAGE_SIZE + int "NAND page size" + default 2048 + help + The NAND page size of the targets NAND flash in bytes as a + decimal integer value. + + The value provided here is passed to the -w option of mxsboot. + +config BR2_TARGET_UBOOT_FORMAT_NAND_OOB_SIZE + int "NAND OOB size" + default 64 + help + The NAND OOB size of the targets NAND flash in bytes as a + decimal integer value. + + The value provided here is passed to the -o option of mxsboot. + +config BR2_TARGET_UBOOT_FORMAT_NAND_ERASE_SIZE + int "NAND erase size" + default 131072 + help + The NAND eraseblock size of the targets NAND flash in bytes as + a decimal integer value. + + The value provided here is passed to the -e option of mxsboot. + +endif + +config BR2_TARGET_UBOOT_FORMAT_CUSTOM + bool "Custom (specify below)" + help + On some platforms, the standard U-Boot binary is not called + u-boot.bin, but u-boot.bin. If this is your case, + you should select this option and specify the correct name + in BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME. + +endchoice + +config BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME + string "U-Boot binary format: custom name" + depends on BR2_TARGET_UBOOT_FORMAT_CUSTOM + help + Specify the correct name of the output binary created by + U-Boot, if it is not one of the default names. For example: + u-boot_magic.bin + +config BR2_TARGET_UBOOT_OMAP_IFT + depends on BR2_TARGET_UBOOT_FORMAT_BIN + depends on BR2_arm || BR2_armeb + select BR2_PACKAGE_HOST_OMAP_U_BOOT_UTILS + bool "produce a .ift signed image (OMAP)" + help + Use gpsign to produce an image of u-boot.bin signed with + a Configuration Header for booting on OMAP processors. + This allows U-Boot to boot without the need for an + intermediate bootloader (e.g. x-loader) if it is written + on the first sector of the boot medium. + This only works for some media, such as NAND. Check your + chip documentation for details. You might also want to + read the documentation of gpsign, the tool that generates + the .ift image, at: + https://github.com/nmenon/omap-u-boot-utils/blob/master/README + +if BR2_TARGET_UBOOT_OMAP_IFT + +config BR2_TARGET_UBOOT_OMAP_IFT_CONFIG + string "gpsign Configuration Header config file" + help + The Configuration Header (CH) config file defines the + desired content of the CH for the signed image. + It usually contains external RAM settings and + possibly other external devices initialization. + The omap-u-boot-utils software contains example + configuration files for some boards: + https://github.com/nmenon/omap-u-boot-utils/tree/master/configs + +endif + +config BR2_TARGET_UBOOT_SPL + bool "Install U-Boot SPL binary image" + depends on !BR2_TARGET_XLOADER + help + Install the U-Boot SPL binary image to the images + directory. + SPL is a first stage bootloader loaded into internal + memory in charge of enabling and configuring the + external memory (DDR), and load the u-boot program + into DDR. + +config BR2_TARGET_UBOOT_SPL_NAME + string "U-Boot SPL binary image name" + default "spl/u-boot-spl.bin" + depends on BR2_TARGET_UBOOT_SPL + help + This is the name of the SPL binary, generated during + u-boot build. For most platform it is spl/u-boot-spl.bin + but not always. It is MLO on OMAP for example. + +config BR2_TARGET_UBOOT_ZYNQ_IMAGE + bool "Generate image for Xilinx Zynq" + depends on BR2_arm + depends on BR2_TARGET_UBOOT_SPL + depends on BR2_TARGET_UBOOT_FORMAT_DTB_IMG + help + Generate the BOOT.BIN file from U-Boot's SPL. The image + boots the Xilinx Zynq chip without any FPGA bitstream. + A bitstream can be loaded by the U-Boot. The SPL searchs + for u-boot-dtb.img file so this U-Boot format is required + to be set. + +config BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC + bool "CRC SPL image for Altera SoC FPGA" + depends on BR2_arm + depends on BR2_TARGET_UBOOT_SPL + help + Generate SPL image fixed by the mkpimage tool to enable + booting on the Altera SoC FPGA based platforms. + +menuconfig BR2_TARGET_UBOOT_ENVIMAGE + bool "Environment image" + help + Generate a valid binary environment image from a text file + describing the key=value pairs of the environment. + + The environment image will be called uboot-env.bin. + +if BR2_TARGET_UBOOT_ENVIMAGE + +config BR2_TARGET_UBOOT_ENVIMAGE_SOURCE + string "Source file for environment" + help + Text file describing the environment. + +config BR2_TARGET_UBOOT_ENVIMAGE_SIZE + string "Size of environment" + help + Size of envronment, can be prefixed with 0x for hexadecimal + values. + +config BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT + bool "Environment has two copies" + help + Some platforms define in their U-Boot configuration that the + U-Boot environment should be duplicated in two locations (for + extra safety). Check your U-Boot configuration for the + CONFIG_ENV_ADDR_REDUND and CONFIG_ENV_SIZE_REDUND settings to + see if this is the case for your platform. + + If it is the case, then you should enable this option to + ensure that the U-Boot environment image generated by + Buildroot is compatible with the "redundant environment" + mechanism of U-Boot. + +endif # BR2_TARGET_UBOOT_ENVIMAGE + +endif # BR2_TARGET_UBOOT diff --git a/boot/uboot/uboot.hash b/boot/uboot/uboot.hash new file mode 100644 index 0000000000..747d133dfc --- /dev/null +++ b/boot/uboot/uboot.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb u-boot-2016.03.tar.bz2 diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk new file mode 100644 index 0000000000..e73963853c --- /dev/null +++ b/boot/uboot/uboot.mk @@ -0,0 +1,284 @@ +################################################################################ +# +# uboot +# +################################################################################ + +UBOOT_VERSION = $(call qstrip,$(BR2_TARGET_UBOOT_VERSION)) +UBOOT_BOARD_NAME = $(call qstrip,$(BR2_TARGET_UBOOT_BOARDNAME)) + +UBOOT_LICENSE = GPLv2+ +UBOOT_LICENSE_FILES = Licenses/gpl-2.0.txt + +UBOOT_INSTALL_IMAGES = YES + +ifeq ($(UBOOT_VERSION),custom) +# Handle custom U-Boot tarballs as specified by the configuration +UBOOT_TARBALL = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION)) +UBOOT_SITE = $(patsubst %/,%,$(dir $(UBOOT_TARBALL))) +UBOOT_SOURCE = $(notdir $(UBOOT_TARBALL)) +BR_NO_CHECK_HASH_FOR += $(UBOOT_SOURCE) +else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT),y) +UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) +UBOOT_SITE_METHOD = git +else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_HG),y) +UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) +UBOOT_SITE_METHOD = hg +else ifeq ($(BR2_TARGET_UBOOT_CUSTOM_SVN),y) +UBOOT_SITE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)) +UBOOT_SITE_METHOD = svn +else +# Handle stable official U-Boot versions +UBOOT_SITE = ftp://ftp.denx.de/pub/u-boot +UBOOT_SOURCE = u-boot-$(UBOOT_VERSION).tar.bz2 +ifeq ($(BR2_TARGET_UBOOT_CUSTOM_VERSION),y) +BR_NO_CHECK_HASH_FOR += $(UBOOT_SOURCE) +endif +endif + +ifeq ($(BR2_TARGET_UBOOT_FORMAT_ELF),y) +UBOOT_BIN = u-boot +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_KWB),y) +UBOOT_BIN = u-boot.kwb +UBOOT_MAKE_TARGET = $(UBOOT_BIN) +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_AIS),y) +UBOOT_BIN = u-boot.ais +UBOOT_MAKE_TARGET = $(UBOOT_BIN) +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_LDR),y) +UBOOT_BIN = u-boot.ldr +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND_BIN),y) +UBOOT_BIN = u-boot-nand.bin +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_DTB_IMG),y) +UBOOT_BIN = u-boot-dtb.img +UBOOT_MAKE_TARGET = all $(UBOOT_BIN) +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMG),y) +UBOOT_BIN = u-boot.img +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMX),y) +UBOOT_BIN = u-boot.imx +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_SB),y) +UBOOT_BIN = u-boot.sb +UBOOT_MAKE_TARGET = $(UBOOT_BIN) +# mxsimage needs OpenSSL +UBOOT_DEPENDENCIES += host-elftosb host-openssl +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_SD),y) +# BootStream (.sb) is generated by U-Boot, we convert it to SD format +UBOOT_BIN = u-boot.sd +UBOOT_MAKE_TARGET = u-boot.sb +UBOOT_DEPENDENCIES += host-elftosb host-openssl +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_NAND),y) +UBOOT_BIN = u-boot.nand +UBOOT_MAKE_TARGET = u-boot.sb +UBOOT_DEPENDENCIES += host-elftosb host-openssl +else ifeq ($(BR2_TARGET_UBOOT_FORMAT_CUSTOM),y) +UBOOT_BIN = $(call qstrip,$(BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME)) +else +UBOOT_BIN = u-boot.bin +UBOOT_BIN_IFT = $(UBOOT_BIN).ift +endif + +# The kernel calls AArch64 'arm64', but U-Boot calls it just 'arm', so +# we have to special case it. Similar for i386/x86_64 -> x86 +ifeq ($(KERNEL_ARCH),arm64) +UBOOT_ARCH = arm +else ifneq ($(filter $(KERNEL_ARCH),i386 x86_64),) +UBOOT_ARCH = x86 +else +UBOOT_ARCH = $(KERNEL_ARCH) +endif + +UBOOT_MAKE_OPTS += \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + ARCH=$(UBOOT_ARCH) \ + HOSTCFLAGS="$(HOST_CFLAGS)" \ + HOSTLDFLAGS="$(HOST_LDFLAGS)" + +ifeq ($(BR2_TARGET_UBOOT_NEEDS_DTC),y) +UBOOT_DEPENDENCIES += host-dtc +endif + +# prior to u-boot 2013.10 the license info was in COPYING. Copy it so +# legal-info finds it +define UBOOT_COPY_OLD_LICENSE_FILE + if [ -f $(@D)/COPYING ]; then \ + $(INSTALL) -m 0644 -D $(@D)/COPYING $(@D)/Licenses/gpl-2.0.txt; \ + fi +endef + +UBOOT_POST_EXTRACT_HOOKS += UBOOT_COPY_OLD_LICENSE_FILE +UBOOT_POST_RSYNC_HOOKS += UBOOT_COPY_OLD_LICENSE_FILE + +# Analogous code exists in linux/linux.mk. Basically, the generic +# package infrastructure handles downloading and applying remote +# patches. Local patches are handled depending on whether they are +# directories or files. +UBOOT_PATCHES = $(call qstrip,$(BR2_TARGET_UBOOT_PATCH)) +UBOOT_PATCH = $(filter ftp://% http://% https://%,$(UBOOT_PATCHES)) + +define UBOOT_APPLY_LOCAL_PATCHES + for p in $(filter-out ftp://% http://% https://%,$(UBOOT_PATCHES)) ; do \ + if test -d $$p ; then \ + $(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \ + else \ + $(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \ + fi \ + done +endef +UBOOT_POST_PATCH_HOOKS += UBOOT_APPLY_LOCAL_PATCHES + +ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y) +define UBOOT_CONFIGURE_CMDS + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \ + $(UBOOT_BOARD_NAME)_config +endef +else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y) +ifeq ($(BR2_TARGET_UBOOT_USE_DEFCONFIG),y) +UBOOT_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_UBOOT_BOARD_DEFCONFIG))_defconfig +else ifeq ($(BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG),y) +UBOOT_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE)) +endif # BR2_TARGET_UBOOT_USE_DEFCONFIG + +UBOOT_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig +UBOOT_KCONFIG_OPTS = $(UBOOT_MAKE_OPTS) +endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY + +define UBOOT_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) $(UBOOT_MAKE_OPTS) \ + $(UBOOT_MAKE_TARGET) + $(if $(BR2_TARGET_UBOOT_FORMAT_SD), + $(@D)/tools/mxsboot sd $(@D)/u-boot.sb $(@D)/u-boot.sd) + $(if $(BR2_TARGET_UBOOT_FORMAT_NAND), + $(@D)/tools/mxsboot \ + -w $(BR2_TARGET_UBOOT_FORMAT_NAND_PAGE_SIZE) \ + -o $(BR2_TARGET_UBOOT_FORMAT_NAND_OOB_SIZE) \ + -e $(BR2_TARGET_UBOOT_FORMAT_NAND_ERASE_SIZE) \ + nand $(@D)/u-boot.sb $(@D)/u-boot.nand) +endef + +define UBOOT_BUILD_OMAP_IFT + $(HOST_DIR)/usr/bin/gpsign -f $(@D)/u-boot.bin \ + -c $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG)) +endef + +define UBOOT_INSTALL_IMAGES_CMDS + cp -dpf $(@D)/$(UBOOT_BIN) $(BINARIES_DIR)/ + $(if $(BR2_TARGET_UBOOT_FORMAT_NAND), + cp -dpf $(@D)/$(UBOOT_MAKE_TARGET) $(BINARIES_DIR)) + $(if $(BR2_TARGET_UBOOT_SPL), + cp -dpf $(@D)/$(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)) $(BINARIES_DIR)/) + $(if $(BR2_TARGET_UBOOT_ENVIMAGE), + $(HOST_DIR)/usr/bin/mkenvimage -s $(BR2_TARGET_UBOOT_ENVIMAGE_SIZE) \ + $(if $(BR2_TARGET_UBOOT_ENVIMAGE_REDUNDANT),-r) \ + -o $(BINARIES_DIR)/uboot-env.bin $(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)) +endef + +define UBOOT_INSTALL_OMAP_IFT_IMAGE + cp -dpf $(@D)/$(UBOOT_BIN_IFT) $(BINARIES_DIR)/ +endef + +ifeq ($(BR2_TARGET_UBOOT_OMAP_IFT),y) +ifeq ($(BR_BUILDING),y) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG)),) +$(error No gpsign config file. Check your BR2_TARGET_UBOOT_OMAP_IFT_CONFIG setting) +endif +ifeq ($(wildcard $(call qstrip,$(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG))),) +$(error gpsign config file $(BR2_TARGET_UBOOT_OMAP_IFT_CONFIG) not found. Check your BR2_TARGET_UBOOT_OMAP_IFT_CONFIG setting) +endif +endif +UBOOT_DEPENDENCIES += host-omap-u-boot-utils +UBOOT_POST_BUILD_HOOKS += UBOOT_BUILD_OMAP_IFT +UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_INSTALL_OMAP_IFT_IMAGE +endif + +ifeq ($(BR2_TARGET_UBOOT_ZYNQ_IMAGE),y) +define UBOOT_GENERATE_ZYNQ_IMAGE + $(HOST_DIR)/usr/bin/python2 $(HOST_DIR)/usr/bin/zynq-boot-bin.py \ + -u $(@D)/$(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)) \ + -o $(BINARIES_DIR)/BOOT.BIN +endef +UBOOT_DEPENDENCIES += host-zynq-boot-bin +UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_GENERATE_ZYNQ_IMAGE +endif + +ifeq ($(BR2_TARGET_UBOOT_ALTERA_SOCFPGA_IMAGE_CRC),y) +define UBOOT_CRC_ALTERA_SOCFPGA_IMAGE + $(HOST_DIR)/usr/bin/mkpimage -o $(BINARIES_DIR)/$(notdir $(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME))).crc \ + $(@D)/$(call qstrip,$(BR2_TARGET_UBOOT_SPL_NAME)) +endef +UBOOT_DEPENDENCIES += host-mkpimage +UBOOT_POST_INSTALL_IMAGES_HOOKS += UBOOT_CRC_ALTERA_SOCFPGA_IMAGE +endif + +ifeq ($(BR2_TARGET_UBOOT_ENVIMAGE),y) +ifeq ($(BR_BUILDING),y) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SOURCE)),) +$(error Please define a source file for Uboot environment (BR2_TARGET_UBOOT_ENVIMAGE_SOURCE setting)) +endif +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_ENVIMAGE_SIZE)),) +$(error Please provide Uboot environment size (BR2_TARGET_UBOOT_ENVIMAGE_SIZE setting)) +endif +endif +UBOOT_DEPENDENCIES += host-uboot-tools +endif + +ifeq ($(BR2_TARGET_UBOOT)$(BR_BUILDING),yy) + +# +# Check U-Boot board name (for legacy) or the defconfig/custom config +# file options (for kconfig) +# +ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y) +ifeq ($(UBOOT_BOARD_NAME),) +$(error No U-Boot board name set. Check your BR2_TARGET_UBOOT_BOARDNAME setting) +endif # UBOOT_BOARD_NAME +else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y) +ifeq ($(BR2_TARGET_UBOOT_USE_DEFCONFIG),y) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_BOARD_DEFCONFIG)),) +$(error No board defconfig name specified, check your BR2_TARGET_UBOOT_DEFCONFIG setting) +endif # qstrip BR2_TARGET_UBOOT_BOARD_DEFCONFIG +endif # BR2_TARGET_UBOOT_USE_DEFCONFIG +ifeq ($(BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG),y) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE)),) +$(error No board configuration file specified, check your BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE setting) +endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE +endif # BR2_TARGET_UBOOT_USE_CUSTOM_CONFIG +endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY + +# +# Check custom version option +# +ifeq ($(BR2_TARGET_UBOOT_CUSTOM_VERSION),y) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE)),) +$(error No custom U-Boot version specified. Check your BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE setting) +endif # qstrip BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE +endif # BR2_TARGET_UBOOT_CUSTOM_VERSION + +# +# Check custom tarball option +# +ifeq ($(BR2_TARGET_UBOOT_CUSTOM_TARBALL),y) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION)),) +$(error No custom U-Boot tarball specified. Check your BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION setting) +endif # qstrip BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION +endif # BR2_TARGET_UBOOT_CUSTOM_TARBALL + +# +# Check Git/Mercurial repo options +# +ifeq ($(BR2_TARGET_UBOOT_CUSTOM_GIT)$(BR2_TARGET_UBOOT_CUSTOM_HG),y) +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_URL)),) +$(error No custom U-Boot repository URL specified. Check your BR2_TARGET_UBOOT_CUSTOM_REPO_URL setting) +endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CUSTOM_REPO_URL +ifeq ($(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION)),) +$(error No custom U-Boot repository URL specified. Check your BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION setting) +endif # qstrip BR2_TARGET_UBOOT_CUSTOM_CUSTOM_REPO_VERSION +endif # BR2_TARGET_UBOOT_CUSTOM_GIT || BR2_TARGET_UBOOT_CUSTOM_HG + +endif # BR2_TARGET_UBOOT && BR_BUILDING + +ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY),y) +$(eval $(generic-package)) +else ifeq ($(BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG),y) +$(eval $(kconfig-package)) +endif # BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY diff --git a/build.sh b/build.sh new file mode 100755 index 0000000000..7d00b3b57b --- /dev/null +++ b/build.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +if [ -z "$1" ]; then + echo "Usage: $0 [mkimage|mkrelease|make_targets...]" + exit 1 +fi + +set -e # exit at first error + +board=$1 +target=${*:2} +cd $(dirname $0) +basedir=$(pwd) +gzip=$(which pigz || which gzip) + +if [ "$board" == "all" ]; then + boards=$(ls $basedir/configs/*_defconfig | grep -oE '\w+_defconfig$' | cut -d '_' -f 1) + for b in $boards; do + if ! $0 $b $target; then + exit 1 + fi + done + + exit 0 +fi + +outputdir=$basedir/output/$board +boarddir=$basedir/board/$board + +if ! [ -f $basedir/configs/${board}_defconfig ]; then + echo "unknown board: $board" + exit 1 +fi + +mkdir -p $outputdir + +if ! [ -f $outputdir/.config ]; then + make O=$outputdir ${board}_defconfig +fi + +if [ "$target" == "mkimage" ]; then + $boarddir/mkimage.sh +elif [ "$target" == "mkrelease" ]; then + $boarddir/mkimage.sh + cp $outputdir/images/motioneyeos-$board.img $basedir + date=$(date +%Y%m%d) + mv $basedir/motioneyeos-$board.img $basedir/motioneyeos-$board-$date.img + rm -f $basedir/motioneyeos-$board-$date.img.gz + $gzip $basedir/motioneyeos-$board-$date.img +elif [ -n "$target" ]; then + make O=$outputdir $target +else + make O=$outputdir + test -x $boarddir/mkimage.sh && $boarddir/mkimage.sh +fi + diff --git a/configs/bananapi_defconfig b/configs/bananapi_defconfig new file mode 100644 index 0000000000..c5d7fde6af --- /dev/null +++ b/configs/bananapi_defconfig @@ -0,0 +1,100 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y +BR2_DL_DIR="$(TOPDIR)/.download" +BR2_CCACHE=y +BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-bananapi" +BR2_OPTIMIZE_2=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TARGET_OPTIMIZATION="-pipe" +BR2_TARGET_GENERIC_HOSTNAME="" +BR2_TARGET_GENERIC_ISSUE="" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_SKELETON_CUSTOM=y +BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton" +BR2_ROOTFS_OVERLAY="board/common/overlay board/bananapi/overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.1.27" +BR2_LINUX_KERNEL_PATCH="board/bananapi/linux-rtl8192cu.patch.gz board/bananapi/linux-clk-dmesg-flood.patch.gz" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/bananapi/kernel.config" +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x40008000" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-bananapi" +BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_JQ=y +BR2_PACKAGE_E2FSPROGS=y +# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set +# BR2_PACKAGE_E2FSPROGS_CHATTR is not set +# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set +# BR2_PACKAGE_E2FSPROGS_E2FREEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_E2LABEL is not set +# BR2_PACKAGE_E2FSPROGS_E2UNDO is not set +# BR2_PACKAGE_E2FSPROGS_FILEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_LOGSAVE is not set +# BR2_PACKAGE_E2FSPROGS_LSATTR is not set +# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set +# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set +# BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set +BR2_PACKAGE_NTFS_3G=y +BR2_PACKAGE_B43_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8797=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8897=y +BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y +BR2_PACKAGE_SUNXI_BOARDS=y +BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE="a20/Bananapi.fex" +BR2_PACKAGE_USB_MODESWITCH_DATA=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NETTLE=y +BR2_PACKAGE_LIBFUSE=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBCAP=y +BR2_PACKAGE_PCRE=y +BR2_PACKAGE_AUTOSSH=y +BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_NETCAT=y +BR2_PACKAGE_NET_TOOLS=y +BR2_PACKAGE_NTP=y +BR2_PACKAGE_NTP_NTPDATE=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_PPPD=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_EAP=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_LOGROTATE=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_UTIL_LINUX_BINARIES=y +BR2_PACKAGE_UTIL_LINUX_PARTX=y +BR2_PACKAGE_NANO=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="Bananapi" +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" +BR2_PACKAGE_HOST_DTC=y +BR2_PACKAGE_HOST_UBOOT_TOOLS=y diff --git a/configs/odroidc1_defconfig b/configs/odroidc1_defconfig new file mode 100644 index 0000000000..76c9d38c7d --- /dev/null +++ b/configs/odroidc1_defconfig @@ -0,0 +1,99 @@ +BR2_arm=y +BR2_cortex_a5=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_NEON_VFPV4=y +BR2_DL_DIR="$(TOPDIR)/.download" +BR2_CCACHE=y +BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-odroidc1" +BR2_OPTIMIZE_2=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y +BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y +BR2_TOOLCHAIN_EXTERNAL_URL="http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz" +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="$(ARCH)-linux-gnueabihf" +BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y +BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_1=y +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y +BR2_TOOLCHAIN_EXTERNAL_CXX=y +BR2_TARGET_OPTIMIZATION="-pipe" +BR2_TARGET_GENERIC_HOSTNAME="" +BR2_TARGET_GENERIC_ISSUE="" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_SKELETON_CUSTOM=y +BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton" +BR2_ROOTFS_OVERLAY="board/common/overlay board/odroidc1/overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/hardkernel/linux/archive/647316d8199babad4cd22309849842e035494f2b.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="odroidc" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="meson8b_odroidc" +BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_JQ=y +BR2_PACKAGE_E2FSPROGS=y +# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set +# BR2_PACKAGE_E2FSPROGS_CHATTR is not set +# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set +# BR2_PACKAGE_E2FSPROGS_E2FREEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_E2LABEL is not set +# BR2_PACKAGE_E2FSPROGS_E2UNDO is not set +# BR2_PACKAGE_E2FSPROGS_FILEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_LOGSAVE is not set +# BR2_PACKAGE_E2FSPROGS_LSATTR is not set +# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set +# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set +# BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set +BR2_PACKAGE_NTFS_3G=y +BR2_PACKAGE_B43_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8797=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8897=y +BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y +BR2_PACKAGE_USB_MODESWITCH_DATA=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NETTLE=y +BR2_PACKAGE_LIBFUSE=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBCAP=y +BR2_PACKAGE_PCRE=y +BR2_PACKAGE_AUTOSSH=y +BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_NETCAT=y +BR2_PACKAGE_NET_TOOLS=y +BR2_PACKAGE_NTP=y +BR2_PACKAGE_NTP_NTPDATE=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_PPPD=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_EAP=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_LOGROTATE=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_UTIL_LINUX_BINARIES=y +BR2_PACKAGE_UTIL_LINUX_PARTX=y +BR2_PACKAGE_NANO=y diff --git a/configs/odroidc2_defconfig b/configs/odroidc2_defconfig new file mode 100644 index 0000000000..d329491e9a --- /dev/null +++ b/configs/odroidc2_defconfig @@ -0,0 +1,88 @@ +BR2_aarch64=y +BR2_DL_DIR="$(TOPDIR)/.download" +BR2_CCACHE=y +BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-odroidc2" +BR2_OPTIMIZE_2=y +BR2_KERNEL_HEADERS_3_14=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_TARGET_OPTIMIZATION="-pipe" +BR2_TARGET_GENERIC_HOSTNAME="" +BR2_TARGET_GENERIC_ISSUE="" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_SKELETON_CUSTOM=y +BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton" +BR2_ROOTFS_OVERLAY="board/common/overlay board/odroidc2/overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/hardkernel/linux/archive/1b4fefdf20a84b17d5b666c0686a12a29adcb848.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="odroidc2" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="meson64_odroidc2" +BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_JQ=y +BR2_PACKAGE_E2FSPROGS=y +# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set +# BR2_PACKAGE_E2FSPROGS_CHATTR is not set +# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set +# BR2_PACKAGE_E2FSPROGS_E2FREEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_E2LABEL is not set +# BR2_PACKAGE_E2FSPROGS_E2UNDO is not set +# BR2_PACKAGE_E2FSPROGS_FILEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_LOGSAVE is not set +# BR2_PACKAGE_E2FSPROGS_LSATTR is not set +# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set +# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set +# BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set +BR2_PACKAGE_NTFS_3G=y +BR2_PACKAGE_B43_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8797=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8897=y +BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y +BR2_PACKAGE_USB_MODESWITCH_DATA=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NETTLE=y +BR2_PACKAGE_LIBFUSE=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBCAP=y +BR2_PACKAGE_PCRE=y +BR2_PACKAGE_AUTOSSH=y +BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_NETCAT=y +BR2_PACKAGE_NET_TOOLS=y +BR2_PACKAGE_NTP=y +BR2_PACKAGE_NTP_NTPDATE=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_PPPD=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_EAP=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_LOGROTATE=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_UTIL_LINUX_BINARIES=y +BR2_PACKAGE_UTIL_LINUX_PARTX=y +BR2_PACKAGE_NANO=y diff --git a/configs/odroidxu4_defconfig b/configs/odroidxu4_defconfig new file mode 100644 index 0000000000..e478f8d505 --- /dev/null +++ b/configs/odroidxu4_defconfig @@ -0,0 +1,90 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y +BR2_DL_DIR="$(TOPDIR)/.download" +BR2_CCACHE=y +BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-odroidxu4" +BR2_OPTIMIZE_2=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TARGET_OPTIMIZATION="-pipe" +BR2_TARGET_GENERIC_HOSTNAME="" +BR2_TARGET_GENERIC_ISSUE="" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_SKELETON_CUSTOM=y +BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton" +BR2_ROOTFS_OVERLAY="board/common/overlay board/odroidxu4/overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/hardkernel/linux/archive/e337a208d84d60456e3ad1c1ad77b2801a94a90a.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="odroidxu3" +BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="exynos5422-odroidxu3" +BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_JQ=y +BR2_PACKAGE_E2FSPROGS=y +# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set +# BR2_PACKAGE_E2FSPROGS_CHATTR is not set +# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set +# BR2_PACKAGE_E2FSPROGS_E2FREEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_E2LABEL is not set +# BR2_PACKAGE_E2FSPROGS_E2UNDO is not set +# BR2_PACKAGE_E2FSPROGS_FILEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_LOGSAVE is not set +# BR2_PACKAGE_E2FSPROGS_LSATTR is not set +# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set +# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set +# BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set +BR2_PACKAGE_NTFS_3G=y +BR2_PACKAGE_B43_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8797=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8897=y +BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y +BR2_PACKAGE_USB_MODESWITCH_DATA=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NETTLE=y +BR2_PACKAGE_LIBFUSE=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBCAP=y +BR2_PACKAGE_PCRE=y +BR2_PACKAGE_AUTOSSH=y +BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_NETCAT=y +BR2_PACKAGE_NET_TOOLS=y +BR2_PACKAGE_NTP=y +BR2_PACKAGE_NTP_NTPDATE=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_PPPD=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_EAP=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_LOGROTATE=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_UTIL_LINUX_BINARIES=y +BR2_PACKAGE_UTIL_LINUX_PARTX=y +BR2_PACKAGE_NANO=y diff --git a/configs/raspberrypi2_defconfig b/configs/raspberrypi2_defconfig new file mode 100644 index 0000000000..53d286b279 --- /dev/null +++ b/configs/raspberrypi2_defconfig @@ -0,0 +1,93 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y +BR2_DL_DIR="$(TOPDIR)/.download" +BR2_CCACHE=y +BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-raspberrypi2" +BR2_OPTIMIZE_2=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TARGET_OPTIMIZATION="-pipe" +BR2_TARGET_GENERIC_HOSTNAME="" +BR2_TARGET_GENERIC_ISSUE="" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_SKELETON_CUSTOM=y +BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton" +BR2_ROOTFS_OVERLAY="board/common/overlay board/raspberrypi2/overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/03f35fe498e5516091e4fd66d1700e8d0b0f4915.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" +BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2709-rpi-2-b" +BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_JQ=y +BR2_PACKAGE_E2FSPROGS=y +# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set +# BR2_PACKAGE_E2FSPROGS_CHATTR is not set +# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set +# BR2_PACKAGE_E2FSPROGS_E2FREEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_E2LABEL is not set +# BR2_PACKAGE_E2FSPROGS_E2UNDO is not set +# BR2_PACKAGE_E2FSPROGS_FILEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_LOGSAVE is not set +# BR2_PACKAGE_E2FSPROGS_LSATTR is not set +# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set +# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set +# BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set +BR2_PACKAGE_NTFS_3G=y +BR2_PACKAGE_B43_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8797=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8897=y +BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y +BR2_PACKAGE_RPI_FIRMWARE=y +BR2_PACKAGE_RPI_FIRMWARE_X=y +BR2_PACKAGE_RPI_USERLAND=y +BR2_PACKAGE_USB_MODESWITCH_DATA=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NETTLE=y +BR2_PACKAGE_LIBFUSE=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBCAP=y +BR2_PACKAGE_PCRE=y +BR2_PACKAGE_AUTOSSH=y +BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_NETCAT=y +BR2_PACKAGE_NET_TOOLS=y +BR2_PACKAGE_NTP=y +BR2_PACKAGE_NTP_NTPDATE=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_PPPD=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_EAP=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_LOGROTATE=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_UTIL_LINUX_BINARIES=y +BR2_PACKAGE_UTIL_LINUX_PARTX=y +BR2_PACKAGE_NANO=y diff --git a/configs/raspberrypi3_defconfig b/configs/raspberrypi3_defconfig new file mode 100644 index 0000000000..da79d13f44 --- /dev/null +++ b/configs/raspberrypi3_defconfig @@ -0,0 +1,93 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_ARM_FPU_NEON_VFPV4=y +BR2_DL_DIR="$(TOPDIR)/.download" +BR2_CCACHE=y +BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-raspberrypi3" +BR2_OPTIMIZE_2=y +BR2_TOOLCHAIN_EXTERNAL=y +BR2_TARGET_OPTIMIZATION="-pipe" +BR2_TARGET_GENERIC_HOSTNAME="" +BR2_TARGET_GENERIC_ISSUE="" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_SKELETON_CUSTOM=y +BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton" +BR2_ROOTFS_OVERLAY="board/common/overlay board/raspberrypi3/overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/03f35fe498e5516091e4fd66d1700e8d0b0f4915.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bcm2709" +BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2710-rpi-3-b" +BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_JQ=y +BR2_PACKAGE_E2FSPROGS=y +# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set +# BR2_PACKAGE_E2FSPROGS_CHATTR is not set +# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set +# BR2_PACKAGE_E2FSPROGS_E2FREEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_E2LABEL is not set +# BR2_PACKAGE_E2FSPROGS_E2UNDO is not set +# BR2_PACKAGE_E2FSPROGS_FILEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_LOGSAVE is not set +# BR2_PACKAGE_E2FSPROGS_LSATTR is not set +# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set +# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set +# BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set +BR2_PACKAGE_NTFS_3G=y +BR2_PACKAGE_B43_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8797=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8897=y +BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y +BR2_PACKAGE_RPI_FIRMWARE=y +BR2_PACKAGE_RPI_FIRMWARE_X=y +BR2_PACKAGE_RPI_USERLAND=y +BR2_PACKAGE_USB_MODESWITCH_DATA=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NETTLE=y +BR2_PACKAGE_LIBFUSE=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBCAP=y +BR2_PACKAGE_PCRE=y +BR2_PACKAGE_AUTOSSH=y +BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_NETCAT=y +BR2_PACKAGE_NET_TOOLS=y +BR2_PACKAGE_NTP=y +BR2_PACKAGE_NTP_NTPDATE=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_PPPD=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_EAP=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_LOGROTATE=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_UTIL_LINUX_BINARIES=y +BR2_PACKAGE_UTIL_LINUX_PARTX=y +BR2_PACKAGE_NANO=y diff --git a/configs/raspberrypi_defconfig b/configs/raspberrypi_defconfig new file mode 100644 index 0000000000..22e1a5e103 --- /dev/null +++ b/configs/raspberrypi_defconfig @@ -0,0 +1,98 @@ +BR2_arm=y +BR2_arm1176jzf_s=y +BR2_DL_DIR="$(TOPDIR)/.download" +BR2_CCACHE=y +BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-raspberrypi" +BR2_OPTIMIZE_2=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y +BR2_GLIBC_VERSION_2_23=y +BR2_BINUTILS_VERSION_2_26_X=y +BR2_GCC_VERSION_5_X=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_TARGET_OPTIMIZATION="-pipe" +BR2_TARGET_GENERIC_HOSTNAME="" +BR2_TARGET_GENERIC_ISSUE="" +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y +BR2_ROOTFS_SKELETON_CUSTOM=y +BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton" +BR2_ROOTFS_OVERLAY="board/common/overlay board/raspberrypi/overlay" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/common/postscript.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL=y +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/raspberrypi/linux/archive/830c04fea80e48ecf1de1fc64c703b495713af17.tar.gz" +BR2_LINUX_KERNEL_DEFCONFIG="bcmrpi" +BR2_LINUX_KERNEL_ZIMAGE=y +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="bcm2708-rpi-b bcm2708-rpi-b-plus bcm2708-rpi-cm" +BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox.config" +BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y +BR2_PACKAGE_ALSA_UTILS=y +BR2_PACKAGE_ALSA_UTILS_APLAY=y +BR2_PACKAGE_GZIP=y +BR2_PACKAGE_JQ=y +BR2_PACKAGE_E2FSPROGS=y +# BR2_PACKAGE_E2FSPROGS_BADBLOCKS is not set +# BR2_PACKAGE_E2FSPROGS_CHATTR is not set +# BR2_PACKAGE_E2FSPROGS_DUMPE2FS is not set +# BR2_PACKAGE_E2FSPROGS_E2FREEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_E2LABEL is not set +# BR2_PACKAGE_E2FSPROGS_E2UNDO is not set +# BR2_PACKAGE_E2FSPROGS_FILEFRAG is not set +# BR2_PACKAGE_E2FSPROGS_LOGSAVE is not set +# BR2_PACKAGE_E2FSPROGS_LSATTR is not set +# BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND is not set +# BR2_PACKAGE_E2FSPROGS_TUNE2FS is not set +# BR2_PACKAGE_E2FSPROGS_UUIDGEN is not set +BR2_PACKAGE_NTFS_3G=y +BR2_PACKAGE_B43_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170=y +BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX=y +BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8797=y +BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8897=y +BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y +BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX=y +BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX=y +BR2_PACKAGE_RPI_FIRMWARE=y +BR2_PACKAGE_RPI_FIRMWARE_X=y +BR2_PACKAGE_RPI_ARMMEM=y +BR2_PACKAGE_RPI_USERLAND=y +BR2_PACKAGE_USB_MODESWITCH_DATA=y +BR2_PACKAGE_CA_CERTIFICATES=y +BR2_PACKAGE_NETTLE=y +BR2_PACKAGE_LIBFUSE=y +BR2_PACKAGE_LIBCURL=y +BR2_PACKAGE_CURL=y +BR2_PACKAGE_LIBCAP=y +BR2_PACKAGE_PCRE=y +BR2_PACKAGE_AUTOSSH=y +BR2_PACKAGE_CRDA=y +BR2_PACKAGE_DHCP=y +BR2_PACKAGE_DHCP_CLIENT=y +BR2_PACKAGE_IPTABLES=y +BR2_PACKAGE_IW=y +BR2_PACKAGE_NETCAT=y +BR2_PACKAGE_NET_TOOLS=y +BR2_PACKAGE_NTP=y +BR2_PACKAGE_NTP_NTPDATE=y +BR2_PACKAGE_OPENSSH=y +BR2_PACKAGE_PPPD=y +BR2_PACKAGE_WGET=y +BR2_PACKAGE_WIRELESS_TOOLS=y +BR2_PACKAGE_WPA_SUPPLICANT=y +BR2_PACKAGE_WPA_SUPPLICANT_EAP=y +BR2_PACKAGE_WPA_SUPPLICANT_CLI=y +BR2_PACKAGE_BASH=y +BR2_PACKAGE_LOGROTATE=y +BR2_PACKAGE_TAR=y +BR2_PACKAGE_UTIL_LINUX_BINARIES=y +BR2_PACKAGE_UTIL_LINUX_PARTX=y +BR2_PACKAGE_NANO=y diff --git a/configs/raspberrypi_initramfs_defconfig b/configs/raspberrypi_initramfs_defconfig new file mode 100644 index 0000000000..7dbd03dbe5 --- /dev/null +++ b/configs/raspberrypi_initramfs_defconfig @@ -0,0 +1,22 @@ +BR2_arm=y +BR2_arm1176jzf_s=y +BR2_DL_DIR="$(TOPDIR)/.download" +BR2_CCACHE=y +BR2_CCACHE_DIR="$(TOPDIR)/.buildroot-ccache-raspberrypi-initramfs" +BR2_OPTIMIZE_2=y +BR2_STATIC_LIBS=y +BR2_KERNEL_HEADERS_4_4=y +# BR2_UCLIBC_INSTALL_UTILS is not set +BR2_BINUTILS_VERSION_2_26_X=y +BR2_GCC_VERSION_5_X=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_TARGET_OPTIMIZATION="-pipe" +BR2_TARGET_GENERIC_HOSTNAME="" +BR2_TARGET_GENERIC_ISSUE="" +BR2_ROOTFS_SKELETON_CUSTOM=y +BR2_ROOTFS_SKELETON_CUSTOM_PATH="board/common/skeleton-initramfs" +BR2_ROOTFS_OVERLAY="board/common/overlay-initramfs board/raspberrypi/overlay-initramfs" +BR2_PACKAGE_BUSYBOX_CONFIG="board/common/busybox_initramfs.config" +BR2_TARGET_ROOTFS_CPIO=y +BR2_TARGET_ROOTFS_CPIO_GZIP=y +# BR2_TARGET_ROOTFS_TAR is not set diff --git a/fs/Config.in b/fs/Config.in new file mode 100644 index 0000000000..51ccf28169 --- /dev/null +++ b/fs/Config.in @@ -0,0 +1,17 @@ +menu "Filesystem images" + +source "fs/axfs/Config.in" +source "fs/cloop/Config.in" +source "fs/cpio/Config.in" +source "fs/cramfs/Config.in" +source "fs/ext2/Config.in" +source "fs/initramfs/Config.in" +source "fs/iso9660/Config.in" +source "fs/jffs2/Config.in" +source "fs/romfs/Config.in" +source "fs/squashfs/Config.in" +source "fs/tar/Config.in" +source "fs/ubifs/Config.in" +source "fs/yaffs2/Config.in" + +endmenu diff --git a/fs/axfs/Config.in b/fs/axfs/Config.in new file mode 100644 index 0000000000..8dfaffab74 --- /dev/null +++ b/fs/axfs/Config.in @@ -0,0 +1,17 @@ +config BR2_TARGET_ROOTFS_AXFS + bool "axfs root filesystem" + help + The Advanced XIP File System is a Linux kernel filesystem + driver that enables files to be executed directly from flash + or ROM memory rather than being copied into RAM. It has the + ability to store individual *pages* in a file + uncompressed/XIP or compressed/Demand Paged. + + So far, the only supported mode is 'XIP all', so all the + files that have the execute attribute set will be XIP'ed. + + At the moment, the FS is not supported in Linux mainline + (v4.3-rc5), so the kernel has to be built with the axfs + patches to be able to read it. Patches can be found at: + + https://github.com/jaredeh/axfs diff --git a/fs/axfs/axfs.mk b/fs/axfs/axfs.mk new file mode 100644 index 0000000000..05d6e5d395 --- /dev/null +++ b/fs/axfs/axfs.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# Build the axfs root filesystem image +# +################################################################################ + +ROOTFS_AXFS_DEPENDENCIES = host-axfsutils + +define ROOTFS_AXFS_CMD + $(HOST_DIR)/usr/bin/mkfs.axfs -s -a $(TARGET_DIR) $@ +endef + +$(eval $(call ROOTFS_TARGET,axfs)) diff --git a/fs/cloop/Config.in b/fs/cloop/Config.in new file mode 100644 index 0000000000..3e01067a1d --- /dev/null +++ b/fs/cloop/Config.in @@ -0,0 +1,10 @@ +config BR2_TARGET_ROOTFS_CLOOP + bool "cloop root filesystem for the target device" + help + Build a cloop root filesystem + + cloop is a Linux kernel module that enables compressed + loopback filesystem support. With it you can mount a + compressed filesystem like a block device and seamlessly + decompress its data while accessing it. The majority of the + software on an LNX-BBC is accessed in this fashion. diff --git a/fs/cloop/cloop.mk b/fs/cloop/cloop.mk new file mode 100644 index 0000000000..f783adeb00 --- /dev/null +++ b/fs/cloop/cloop.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# Build the compressed loop root filesystem image +# +################################################################################ + +ROOTFS_CLOOP_DEPENDENCIES = host-cloop host-cdrkit + +define ROOTFS_CLOOP_CMD + $(HOST_DIR)/usr/bin/genisoimage -r $(TARGET_DIR) | $(HOST_DIR)/usr/bin/create_compressed_fs - 65536 > $@ +endef + +$(eval $(call ROOTFS_TARGET,cloop)) \ No newline at end of file diff --git a/fs/common.mk b/fs/common.mk new file mode 100644 index 0000000000..68e3a0f2d0 --- /dev/null +++ b/fs/common.mk @@ -0,0 +1,121 @@ +# +# Macro that builds the needed Makefile target to create a root +# filesystem image. +# +# The following variable must be defined before calling this macro +# +# ROOTFS_$(FSTYPE)_CMD, the command that generates the root +# filesystem image. A single command is allowed. The filename of the +# filesystem image that it must generate is $$@. +# +# The following variables can optionaly be defined +# +# ROOTFS_$(FSTYPE)_DEPENDENCIES, the list of dependencies needed to +# build the root filesystem (usually host tools) +# +# ROOTFS_$(FSTYPE)_PRE_GEN_HOOKS, a list of hooks to call before +# generating the filesystem image +# +# ROOTFS_$(FSTYPE)_POST_GEN_HOOKS, a list of hooks to call after +# generating the filesystem image +# +# ROOTFS_$(FSTYPE)_POST_TARGETS, the list of targets that should be +# run after running the main filesystem target. This is useful for +# initramfs, to rebuild the kernel once the initramfs is generated. +# +# In terms of configuration option, this macro assumes that the +# BR2_TARGET_ROOTFS_$(FSTYPE) config option allows to enable/disable +# the generation of a filesystem image of a particular type. If +# the configuration options BR2_TARGET_ROOTFS_$(FSTYPE)_GZIP, +# BR2_TARGET_ROOTFS_$(FSTYPE)_BZIP2 or +# BR2_TARGET_ROOTFS_$(FSTYPE)_LZMA exist and are enabled, then the +# macro will automatically generate a compressed filesystem image. + +FAKEROOT_SCRIPT = $(BUILD_DIR)/_fakeroot.fs +FULL_DEVICE_TABLE = $(BUILD_DIR)/_device_table.txt +ROOTFS_DEVICE_TABLES = $(call qstrip,$(BR2_ROOTFS_DEVICE_TABLE) \ + $(BR2_ROOTFS_STATIC_DEVICE_TABLE)) +USERS_TABLE = $(BUILD_DIR)/_users_table.txt +ROOTFS_USERS_TABLES = $(call qstrip,$(BR2_ROOTFS_USERS_TABLES)) + +# Since this function will be called from within an $(eval ...) +# all variable references except the arguments must be $$-quoted. +define ROOTFS_TARGET_INTERNAL + +# extra deps +ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs \ + $$(if $$(PACKAGES_USERS)$$(ROOTFS_USERS_TABLES),host-mkpasswd) + +ifeq ($$(BR2_TARGET_ROOTFS_$(2)_GZIP),y) +ROOTFS_$(2)_COMPRESS_EXT = .gz +ROOTFS_$(2)_COMPRESS_CMD = gzip -9 -c +endif +ifeq ($$(BR2_TARGET_ROOTFS_$(2)_BZIP2),y) +ROOTFS_$(2)_COMPRESS_EXT = .bz2 +ROOTFS_$(2)_COMPRESS_CMD = bzip2 -9 -c +endif +ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZMA),y) +ROOTFS_$(2)_DEPENDENCIES += host-lzma +ROOTFS_$(2)_COMPRESS_EXT = .lzma +ROOTFS_$(2)_COMPRESS_CMD = $$(LZMA) -9 -c +endif +ifeq ($$(BR2_TARGET_ROOTFS_$(2)_LZO),y) +ROOTFS_$(2)_DEPENDENCIES += host-lzop +ROOTFS_$(2)_COMPRESS_EXT = .lzo +ROOTFS_$(2)_COMPRESS_CMD = $$(LZOP) -9 -c +endif +ifeq ($$(BR2_TARGET_ROOTFS_$(2)_XZ),y) +ROOTFS_$(2)_DEPENDENCIES += host-xz +ROOTFS_$(2)_COMPRESS_EXT = .xz +ROOTFS_$(2)_COMPRESS_CMD = xz -9 -C crc32 -c +endif + +$$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES) + @$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)") + $$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep)) + rm -f $$(FAKEROOT_SCRIPT) + rm -f $$(TARGET_DIR_WARNING_FILE) + rm -f $$(USERS_TABLE) + echo "set -e" >> $$(FAKEROOT_SCRIPT) + echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT) +ifneq ($$(ROOTFS_USERS_TABLES),) + cat $$(ROOTFS_USERS_TABLES) >> $$(USERS_TABLE) +endif + printf '$$(subst $$(sep),\n,$$(PACKAGES_USERS))' >> $$(USERS_TABLE) + #PATH=$$(BR_PATH) $$(TOPDIR)/support/scripts/mkusers $$(USERS_TABLE) $$(TARGET_DIR) >> $$(FAKEROOT_SCRIPT) +ifneq ($$(ROOTFS_DEVICE_TABLES),) + cat $$(ROOTFS_DEVICE_TABLES) > $$(FULL_DEVICE_TABLE) +ifeq ($$(BR2_ROOTFS_DEVICE_CREATION_STATIC),y) + printf '$$(subst $$(sep),\n,$$(PACKAGES_DEVICES_TABLE))' >> $$(FULL_DEVICE_TABLE) +endif + printf '$$(subst $$(sep),\n,$$(PACKAGES_PERMISSIONS_TABLE))' >> $$(FULL_DEVICE_TABLE) + #echo "$$(HOST_DIR)/usr/bin/makedevs -d $$(FULL_DEVICE_TABLE) $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT) +endif + echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT) + chmod a+x $$(FAKEROOT_SCRIPT) + PATH=$$(BR_PATH) $$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT) + $$(INSTALL) -m 0644 support/misc/target-dir-warning.txt $$(TARGET_DIR_WARNING_FILE) + -@rm -f $$(FAKEROOT_SCRIPT) $$(FULL_DEVICE_TABLE) +ifneq ($$(ROOTFS_$(2)_COMPRESS_CMD),) + PATH=$$(BR_PATH) $$(ROOTFS_$(2)_COMPRESS_CMD) $$@ > $$@$$(ROOTFS_$(2)_COMPRESS_EXT) +endif + $$(foreach hook,$$(ROOTFS_$(2)_POST_GEN_HOOKS),$$(call $$(hook))$$(sep)) + +rootfs-$(1)-show-depends: + @echo $$(ROOTFS_$(2)_DEPENDENCIES) + +rootfs-$(1): $$(BINARIES_DIR)/rootfs.$(1) $$(ROOTFS_$(2)_POST_TARGETS) + +.PHONY: rootfs-$(1) rootfs-$(1)-show-depends + +ifeq ($$(BR2_TARGET_ROOTFS_$(2)),y) +TARGETS_ROOTFS += rootfs-$(1) +PACKAGES += $$(filter-out rootfs-%,$$(ROOTFS_$(2)_DEPENDENCIES)) +endif +endef + +define ROOTFS_TARGET + $(call ROOTFS_TARGET_INTERNAL,$(1),$(call UPPERCASE,$(1))) +endef + +include $(sort $(wildcard fs/*/*.mk)) diff --git a/fs/cpio/Config.in b/fs/cpio/Config.in new file mode 100644 index 0000000000..206baca677 --- /dev/null +++ b/fs/cpio/Config.in @@ -0,0 +1,60 @@ +config BR2_TARGET_ROOTFS_CPIO + bool "cpio the root filesystem (for use as an initial RAM filesystem)" + help + Build a cpio archive of the root filesystem. This is typically + used for an initial RAM filesystem that is passed to the kernel + by the bootloader. + +if BR2_TARGET_ROOTFS_CPIO + +choice + prompt "Compression method" + default BR2_TARGET_ROOTFS_CPIO_NONE + help + Select compressor for cpio filesystem of the root filesystem. + If you use the cpio archive as an initial RAM filesystem, make + sure the kernel contains the decompression algorithm selected + here. + +config BR2_TARGET_ROOTFS_CPIO_NONE + bool "no compression" + help + Do not compress the cpio filesystem. + +config BR2_TARGET_ROOTFS_CPIO_GZIP + bool "gzip" + help + Do compress the cpio filesystem with gzip. + +config BR2_TARGET_ROOTFS_CPIO_BZIP2 + bool "bzip2" + help + Do compress the cpio filesystem with bzip2. + +config BR2_TARGET_ROOTFS_CPIO_LZMA + bool "lzma" + help + Do compress the cpio filesystem with lzma. + +config BR2_TARGET_ROOTFS_CPIO_LZO + bool "lzo" + help + Do compress the cpio filesystem with lzop. + +config BR2_TARGET_ROOTFS_CPIO_XZ + bool "xz" + help + Do compress the cpio filesystem with xz. + +endchoice + +config BR2_TARGET_ROOTFS_CPIO_UIMAGE + bool "Create U-Boot image of the root filesystem" + select BR2_PACKAGE_HOST_UBOOT_TOOLS + help + Add a U-Boot header to the cpio root filesystem. This allows + the initramfs to be loaded with the bootm command in U-Boot. + + The U-Boot image will be called rootfs.cpio.uboot + +endif # BR2_TARGET_ROOTFS_CPIO diff --git a/fs/cpio/cpio.mk b/fs/cpio/cpio.mk new file mode 100644 index 0000000000..e82167e512 --- /dev/null +++ b/fs/cpio/cpio.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# cpio to archive target filesystem +# +################################################################################ + +ifeq ($(BR2_ROOTFS_DEVICE_CREATION_STATIC),y) + +define ROOTFS_CPIO_ADD_INIT + if [ ! -e $(TARGET_DIR)/init ]; then \ + ln -sf sbin/init $(TARGET_DIR)/init; \ + fi +endef + +else +# devtmpfs does not get automounted when initramfs is used. +# Add a pre-init script to mount it before running init +define ROOTFS_CPIO_ADD_INIT + if [ ! -e $(TARGET_DIR)/init ]; then \ + $(INSTALL) -m 0755 fs/cpio/init $(TARGET_DIR)/init; \ + fi +endef + +PACKAGES_PERMISSIONS_TABLE += /dev/console c 622 0 0 5 1 - - -$(sep) + +endif # BR2_ROOTFS_DEVICE_CREATION_STATIC + +ROOTFS_CPIO_PRE_GEN_HOOKS += ROOTFS_CPIO_ADD_INIT + +define ROOTFS_CPIO_CMD + cd $(TARGET_DIR) && find . | cpio --quiet -o -H newc > $@ +endef + +$(BINARIES_DIR)/rootfs.cpio.uboot: $(BINARIES_DIR)/rootfs.cpio host-uboot-tools + $(MKIMAGE) -A $(MKIMAGE_ARCH) -T ramdisk \ + -C none -d $<$(ROOTFS_CPIO_COMPRESS_EXT) $@ + +ifeq ($(BR2_TARGET_ROOTFS_CPIO_UIMAGE),y) +ROOTFS_CPIO_POST_TARGETS += $(BINARIES_DIR)/rootfs.cpio.uboot +endif + +$(eval $(call ROOTFS_TARGET,cpio)) diff --git a/fs/cpio/init b/fs/cpio/init new file mode 100755 index 0000000000..a275482177 --- /dev/null +++ b/fs/cpio/init @@ -0,0 +1,7 @@ +#!/bin/sh +# devtmpfs does not get automounted for initramfs +/bin/mount -t devtmpfs devtmpfs /dev +exec 0/dev/console +exec 2>/dev/console +exec /sbin/init $* diff --git a/fs/cramfs/Config.in b/fs/cramfs/Config.in new file mode 100644 index 0000000000..1a4e326472 --- /dev/null +++ b/fs/cramfs/Config.in @@ -0,0 +1,6 @@ +config BR2_TARGET_ROOTFS_CRAMFS + bool "cramfs root filesystem" + help + Build a cramfs root filesystem + + http://sourceforge.net/projects/cramfs/ diff --git a/fs/cramfs/cramfs.mk b/fs/cramfs/cramfs.mk new file mode 100644 index 0000000000..747237290f --- /dev/null +++ b/fs/cramfs/cramfs.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# Build the cramfs root filesystem image +# +################################################################################ + +ifeq ($(BR2_ENDIAN),"BIG") +CRAMFS_OPTS = -b +else +CRAMFS_OPTS = -l +endif + +define ROOTFS_CRAMFS_CMD + $(HOST_DIR)/usr/bin/mkcramfs $(CRAMFS_OPTS) $(TARGET_DIR) $@ +endef + +ROOTFS_CRAMFS_DEPENDENCIES = host-cramfs + +$(eval $(call ROOTFS_TARGET,cramfs)) diff --git a/fs/ext2/Config.in b/fs/ext2/Config.in new file mode 100644 index 0000000000..1e7f719a8d --- /dev/null +++ b/fs/ext2/Config.in @@ -0,0 +1,113 @@ +config BR2_TARGET_ROOTFS_EXT2 + bool "ext2/3/4 root filesystem" + select BR2_PACKAGE_HOST_MKE2IMG + help + Build an ext2/3/4 root filesystem + +if BR2_TARGET_ROOTFS_EXT2 + +config BR2_TARGET_ROOTFS_EXT2_2 + bool + +choice + bool "ext2/3/4 variant" + default BR2_TARGET_ROOTFS_EXT2_2r0 + +config BR2_TARGET_ROOTFS_EXT2_2r0 + bool "ext2 (rev0)" + select BR2_TARGET_ROOTFS_EXT2_2 + +config BR2_TARGET_ROOTFS_EXT2_2r1 + bool "ext2 (rev1)" + select BR2_TARGET_ROOTFS_EXT2_2 + +config BR2_TARGET_ROOTFS_EXT2_3 + bool "ext3" + +config BR2_TARGET_ROOTFS_EXT2_4 + bool "ext4" + +endchoice + +config BR2_TARGET_ROOTFS_EXT2_GEN + int + default 2 if BR2_TARGET_ROOTFS_EXT2_2 + default 3 if BR2_TARGET_ROOTFS_EXT2_3 + default 4 if BR2_TARGET_ROOTFS_EXT2_4 + +# All ext generations are revision 1, except ext2r0, which is revision 0 +config BR2_TARGET_ROOTFS_EXT2_REV + int + default 0 if BR2_TARGET_ROOTFS_EXT2_2r0 + default 1 if !BR2_TARGET_ROOTFS_EXT2_2r0 + +config BR2_TARGET_ROOTFS_EXT2_LABEL + string "filesystem label" + +config BR2_TARGET_ROOTFS_EXT2_BLOCKS + int "exact size in blocks (leave at 0 for auto calculation)" + default 0 + +config BR2_TARGET_ROOTFS_EXT2_INODES + int "exact number of inodes (leave at 0 for auto calculation)" + default 0 + +config BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS + int "extra size in blocks" if BR2_TARGET_ROOTFS_EXT2_BLOCKS = 0 + default 0 + help + Enter here the number of extra blocks of free space you + want on your filesystem. By default, Buildroot will not + leave much space free. + +config BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES + int "extra inodes" if BR2_TARGET_ROOTFS_EXT2_INODES = 0 + default 0 + help + Enter here the number of extra free inodes you want on + your filesystem. By default, Buildroot will not leave + many free inodes. + +config BR2_TARGET_ROOTFS_EXT2_RESBLKS + int "reserved blocks percentage" + default 0 + +choice + prompt "Compression method" + default BR2_TARGET_ROOTFS_EXT2_NONE + help + Select compressor for ext2/3/4 filesystem of the root filesystem + +config BR2_TARGET_ROOTFS_EXT2_NONE + bool "no compression" + help + Do not compress the ext2/3/4 filesystem. + +config BR2_TARGET_ROOTFS_EXT2_GZIP + bool "gzip" + help + Do compress the ext2/3/4 filesystem with gzip. + +config BR2_TARGET_ROOTFS_EXT2_BZIP2 + bool "bzip2" + help + Do compress the ext2/3/4 filesystem with bzip2. + +config BR2_TARGET_ROOTFS_EXT2_LZMA + bool "lzma" + help + Do compress the ext2/3/4 filesystem with lzma. + +config BR2_TARGET_ROOTFS_EXT2_LZO + bool "lzo" + help + Do compress the ext2 filesystem with lzop. + +config BR2_TARGET_ROOTFS_EXT2_XZ + bool "xz" + help + Do compress the ext2 filesystem with xz. + +endchoice + +endif # BR2_TARGET_ROOTFS_EXT2 diff --git a/fs/ext2/ext2.mk b/fs/ext2/ext2.mk new file mode 100644 index 0000000000..7417f81cf0 --- /dev/null +++ b/fs/ext2/ext2.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# Build the ext2 root filesystem image +# +################################################################################ + +EXT2_OPTS = -G $(BR2_TARGET_ROOTFS_EXT2_GEN) -R $(BR2_TARGET_ROOTFS_EXT2_REV) + +ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_BLOCKS)),0) +EXT2_OPTS += -b $(BR2_TARGET_ROOTFS_EXT2_BLOCKS) +endif +EXT2_OPTS += -B $(BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS) + +ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_INODES)),0) +EXT2_OPTS += -i $(BR2_TARGET_ROOTFS_EXT2_INODES) +endif +EXT2_OPTS += -I $(BR2_TARGET_ROOTFS_EXT2_EXTRA_INODES) + +ifneq ($(strip $(BR2_TARGET_ROOTFS_EXT2_RESBLKS)),0) +EXT2_OPTS += -r $(BR2_TARGET_ROOTFS_EXT2_RESBLKS) +endif + +# Not qstrip-ing the variable, because it may contain spaces, but we must +# qstrip it when checking. Furthermore, we need to further quote it, so +# that the quotes do not get eaten by the echo statement when creating the +# fakeroot script +ifneq ($(call qstrip,$(BR2_TARGET_ROOTFS_EXT2_LABEL)),) +EXT2_OPTS += -l '$(BR2_TARGET_ROOTFS_EXT2_LABEL)' +endif + +ROOTFS_EXT2_DEPENDENCIES = host-mke2img + +define ROOTFS_EXT2_CMD + PATH=$(BR_PATH) mke2img -d $(TARGET_DIR) $(EXT2_OPTS) -o $@ +endef + +rootfs-ext2-symlink: + ln -sf rootfs.ext2$(ROOTFS_EXT2_COMPRESS_EXT) $(BINARIES_DIR)/rootfs.ext$(BR2_TARGET_ROOTFS_EXT2_GEN)$(ROOTFS_EXT2_COMPRESS_EXT) + +.PHONY: rootfs-ext2-symlink + +ifneq ($(BR2_TARGET_ROOTFS_EXT2_GEN),2) +ROOTFS_EXT2_POST_TARGETS += rootfs-ext2-symlink +endif + +$(eval $(call ROOTFS_TARGET,ext2)) diff --git a/fs/initramfs/Config.in b/fs/initramfs/Config.in new file mode 100644 index 0000000000..8ed9f7ebb5 --- /dev/null +++ b/fs/initramfs/Config.in @@ -0,0 +1,21 @@ +config BR2_TARGET_ROOTFS_INITRAMFS + bool "initial RAM filesystem linked into linux kernel" + depends on BR2_LINUX_KERNEL + select BR2_TARGET_ROOTFS_CPIO + help + Integrate the root filesystem generated by Buildroot as an + initramfs inside the kernel image. This integration will + take place automatically. + + A rootfs.cpio file will be generated in the images/ directory. + This is the archive that will be included in the kernel image. + The default rootfs compression set in the kernel configuration + is used, regardless of how buildroot's cpio archive is configured. + + Note that enabling initramfs together with another filesystem + formats doesn't make sense: you would end up having two + identical root filesystems, one embedded inside the kernel + image, and one separately. + +comment "initramfs needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL diff --git a/fs/initramfs/initramfs.mk b/fs/initramfs/initramfs.mk new file mode 100644 index 0000000000..db5081224c --- /dev/null +++ b/fs/initramfs/initramfs.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# Build a kernel with an integrated initial ramdisk +# filesystem based on cpio. +# +################################################################################ + +ROOTFS_INITRAMFS_DEPENDENCIES += rootfs-cpio + +ROOTFS_INITRAMFS_POST_TARGETS += linux-rebuild-with-initramfs + + +# The generic fs infrastructure isn't very useful here. + +rootfs-initramfs: $(ROOTFS_INITRAMFS_DEPENDENCIES) $(ROOTFS_INITRAMFS_POST_TARGETS) + +rootfs-initramfs-show-depends: + @echo $(ROOTFS_INITRAMFS_DEPENDENCIES) + +.PHONY: rootfs-initramfs rootfs-initramfs-show-depends + +ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) +TARGETS_ROOTFS += rootfs-initramfs +endif diff --git a/fs/iso9660/Config.in b/fs/iso9660/Config.in new file mode 100644 index 0000000000..2482e44e31 --- /dev/null +++ b/fs/iso9660/Config.in @@ -0,0 +1,88 @@ +config BR2_TARGET_ROOTFS_ISO9660 + bool "iso image" + depends on (BR2_i386 || BR2_x86_64) + depends on BR2_LINUX_KERNEL + depends on BR2_TARGET_GRUB || \ + BR2_TARGET_GRUB2 || \ + BR2_TARGET_SYSLINUX_ISOLINUX + select BR2_LINUX_KERNEL_INSTALL_TARGET \ + if (!BR2_TARGET_ROOTFS_ISO9660_INITRD && !BR2_TARGET_ROOTFS_INITRAMFS) + help + Build a bootable ISO9660 image. By default, the root + filesystem is directly packed as the ISO9660 filesystem, + which means the root filesystem will be read-only. It + requires ISO9660 filesystem support and CDROM support in the + kernel. + + However, if BR2_TARGET_ROOTFS_INITRAMFS or + BR2_TARGET_ROOTFS_ISO9660_INITRD have been enabled, the + ISO9660 filesystem will only contain a kernel image and + optionally an external initrd image. In this case, the + filesystem being in RAM, it will be read/write. No ISO9660 + or CDROM support is needed in the kernel. + +if BR2_TARGET_ROOTFS_ISO9660 + +choice + prompt "Bootloader" + +config BR2_TARGET_ROOTFS_ISO9660_GRUB + bool "grub" + depends on BR2_TARGET_GRUB + select BR2_TARGET_GRUB_FS_ISO9660 + +config BR2_TARGET_ROOTFS_ISO9660_GRUB2 + bool "grub2" + depends on BR2_TARGET_GRUB2 + help + Use Grub 2 as the bootloader for the ISO9660 image. Make + sure to enable the 'iso9660' module in + BR2_TARGET_GRUB2_BUILTIN_MODULES and to use 'cd' as the boot + partition in BR2_TARGET_GRUB2_BOOT_PARTITION=. + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + bool "isolinux" + depends on BR2_TARGET_SYSLINUX_ISOLINUX + +endchoice + +config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU + string "Boot menu config file" + default "fs/iso9660/menu.lst" if BR2_TARGET_ROOTFS_ISO9660_GRUB + default "fs/iso9660/grub.cfg" if BR2_TARGET_ROOTFS_ISO9660_GRUB2 + default "fs/iso9660/isolinux.cfg" if BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + help + Use this option to provide a custom bootloader configuration + file (menu.lst for Grub, grub.cfg for Grub 2, isolinux.cfg for + isolinux). + + Note that the strings __KERNEL_PATH__ and __INITRD_PATH__ + will automatically be replaced by the path to the kernel and + initrd images respectively. + +config BR2_TARGET_ROOTFS_ISO9660_INITRD + bool "Use initrd" + default y + select BR2_TARGET_ROOTFS_CPIO + help + Enable this option to have the root filesystem bundled as an + initrd/initramfs rather than directly as the ISO9660 + filesystem. With this option enabled, the ISO9660 will only + contain a kernel image, an initrd image (unless an initramfs + linked into the kernel is used) and the bootloader. + +config BR2_TARGET_ROOTFS_ISO9660_HYBRID + bool "Build hybrid image" + depends on BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + help + Enable this option to build an hybrid image, i.e an image + which can either be booted from a CD-ROM or from a device + which BIOS considers a hard disk or ZIP disk, e.g. a USB key + or similar. + +endif + +comment "iso image needs a Linux kernel and one of grub, grub2 or isolinux to be built" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_LINUX_KERNEL || \ + !(BR2_TARGET_GRUB || BR2_TARGET_GRUB2 || BR2_TARGET_SYSLINUX_ISOLINUX) diff --git a/fs/iso9660/grub.cfg b/fs/iso9660/grub.cfg new file mode 100644 index 0000000000..5a74b2354a --- /dev/null +++ b/fs/iso9660/grub.cfg @@ -0,0 +1,7 @@ +set default="0" +set timeout="10" + +menuentry "Buildroot" { + linux __KERNEL_PATH__ root=/dev/sr0 + initrd __INITRD_PATH__ +} diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk new file mode 100644 index 0000000000..32d79d77d8 --- /dev/null +++ b/fs/iso9660/iso9660.mk @@ -0,0 +1,160 @@ +################################################################################ +# +# Build the iso96600 root filesystem image +# +################################################################################ + +# +# We need to handle three cases: +# +# 1. The ISO9660 filesystem will really be the real root filesystem +# itself. This is when BR2_TARGET_ROOTFS_ISO9660_INITRD is +# disabled. +# +# 2. The ISO9660 filesystem will be a filesystem with just a kernel +# image, initrd and grub. This is when +# BR2_TARGET_ROOTFS_ISO9660_INITRD is enabled, but +# BR2_TARGET_ROOTFS_INITRAMFS is disabled. +# +# 3. The ISO9660 filesystem will be a filesystem with just a kernel +# image and grub. This is like (2), except that the initrd is +# built into the kernel image. This is when +# BR2_TARGET_ROOTFS_INITRAMFS is enabled (regardless of the value +# of BR2_TARGET_ROOTFS_ISO9660_INITRD). + +ROOTFS_ISO9660_BOOT_MENU = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) + +ROOTFS_ISO9660_DEPENDENCIES = host-cdrkit host-fakeroot linux + +ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) +ROOTFS_ISO9660_USE_INITRD = YES +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_INITRD),y) +ROOTFS_ISO9660_USE_INITRD = YES +endif + +ifeq ($(ROOTFS_ISO9660_USE_INITRD),YES) +ROOTFS_ISO9660_TARGET_DIR = $(BUILD_DIR)/rootfs.iso9660.tmp +define ROOTFS_ISO9660_CREATE_TEMPDIR + $(RM) -rf $(ROOTFS_ISO9660_TARGET_DIR) + mkdir -p $(ROOTFS_ISO9660_TARGET_DIR) +endef +else +ROOTFS_ISO9660_TARGET_DIR = $(TARGET_DIR) +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y) +ROOTFS_ISO9660_DEPENDENCIES += grub +ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH = \ + $(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/menu.lst +ROOTFS_ISO9660_BOOT_IMAGE = boot/grub/stage2_eltorito +define ROOTFS_ISO9660_INSTALL_BOOTLOADER + $(INSTALL) -D -m 0644 $(GRUB_DIR)/stage2/stage2_eltorito \ + $(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/stage2_eltorito +endef +else ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB2),y) +ROOTFS_ISO9660_DEPENDENCIES += grub2 +ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH = \ + $(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/grub.cfg +ROOTFS_ISO9660_BOOT_IMAGE = boot/grub/grub-eltorito.img +define ROOTFS_ISO9660_INSTALL_BOOTLOADER + $(INSTALL) -D -m 0644 $(BINARIES_DIR)/grub-eltorito.img \ + $(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/grub-eltorito.img +endef +else ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y) +ROOTFS_ISO9660_DEPENDENCIES += syslinux +ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH = \ + $(ROOTFS_ISO9660_TARGET_DIR)/isolinux/isolinux.cfg +ROOTFS_ISO9660_BOOT_IMAGE = isolinux/isolinux.bin +define ROOTFS_ISO9660_INSTALL_BOOTLOADER + $(INSTALL) -D -m 0644 $(BINARIES_DIR)/syslinux/* \ + $(ROOTFS_ISO9660_TARGET_DIR)/isolinux/ + $(INSTALL) -D -m 0644 $(HOST_DIR)/usr/share/syslinux/ldlinux.c32 \ + $(ROOTFS_ISO9660_TARGET_DIR)/isolinux/ldlinux.c32 +endef +endif + +define ROOTFS_ISO9660_PREPARATION + $(INSTALL) -D -m 0644 $(ROOTFS_ISO9660_BOOT_MENU) \ + $(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH) + $(SED) "s%__KERNEL_PATH__%/boot/$(LINUX_IMAGE_NAME)%" \ + $(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH) + $(ROOTFS_ISO9660_INSTALL_BOOTLOADER) +endef + +ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_PREPARATION + +# Grub splash screen disabling +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y) +ifeq ($(BR2_TARGET_GRUB_SPLASH),) +define ROOTFS_ISO9660_DISABLE_SPLASHSCREEN + $(SED) '/^splashimage/d' $(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH) +endef +ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_SPLASHSCREEN +endif +endif + +define ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD + $(SED) '/__INITRD_PATH__/d' $(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH) +endef + +ifeq ($(ROOTFS_ISO9660_USE_INITRD),YES) + +# Copy Grub splashscreen to temporary filesystem +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y) +ifeq ($(BR2_TARGET_GRUB_SPLASH),y) +define ROOTFS_ISO9660_INSTALL_SPLASHSCREEN + $(INSTALL) -D -m 0644 $(TARGET_DIR)/boot/grub/splash.xpm.gz \ + $(ROOTFS_ISO9660_TARGET_DIR)/boot/grub/splash.xpm.gz +endef +ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_INSTALL_SPLASHSCREEN +endif +endif + +# Copy the kernel to temporary filesystem +define ROOTFS_ISO9660_COPY_KERNEL + $(INSTALL) -D -m 0644 $(LINUX_IMAGE_PATH) \ + $(ROOTFS_ISO9660_TARGET_DIR)/boot/$(LINUX_IMAGE_NAME) +endef + +ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_COPY_KERNEL + +# If initramfs is used, disable loading the initrd as the rootfs is +# already inside the kernel image. Otherwise, make sure a cpio is +# generated and use it as the initrd. +ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) +ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD +else +ROOTFS_ISO9660_DEPENDENCIES += rootfs-cpio +define ROOTFS_ISO9660_COPY_INITRD + $(INSTALL) -D -m 0644 $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) \ + $(ROOTFS_ISO9660_TARGET_DIR)/boot/initrd + $(SED) "s%__INITRD_PATH__%/boot/initrd%" \ + $(ROOTFS_ISO9660_BOOTLOADER_CONFIG_PATH) +endef +ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_COPY_INITRD +endif + +else # ROOTFS_ISO9660_USE_INITRD + +ROOTFS_ISO9660_PRE_GEN_HOOKS += ROOTFS_ISO9660_DISABLE_EXTERNAL_INITRD + +endif # ROOTFS_ISO9660_USE_INITRD + + +define ROOTFS_ISO9660_CMD + $(HOST_DIR)/usr/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \ + -no-emul-boot -boot-load-size 4 -boot-info-table \ + -o $@ $(ROOTFS_ISO9660_TARGET_DIR) +endef + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_HYBRID),y) +define ROOTFS_ISO9660_GEN_HYBRID + $(HOST_DIR)/usr/bin/isohybrid -t 0x96 $@ +endef + +ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID +endif + +$(eval $(call ROOTFS_TARGET,iso9660)) diff --git a/fs/iso9660/isolinux.cfg b/fs/iso9660/isolinux.cfg new file mode 100644 index 0000000000..28be4fa05a --- /dev/null +++ b/fs/iso9660/isolinux.cfg @@ -0,0 +1,5 @@ +default 1 +label 1 + kernel __KERNEL_PATH__ + initrd __INITRD_PATH__ + append root=/dev/sr0 diff --git a/fs/iso9660/menu.lst b/fs/iso9660/menu.lst new file mode 100644 index 0000000000..eb1ecef531 --- /dev/null +++ b/fs/iso9660/menu.lst @@ -0,0 +1,20 @@ +default 0 +timeout 10 + +# Used when no splashimage is used +color cyan/blue white/blue + +# Gets enabled/disabled depending on Grub support for splashimage +splashimage /boot/grub/splash.xpm.gz + +# Used when a splashimage is enabled +foreground 000000 +background cccccc + +title Buildroot ISO9660 image +kernel __KERNEL_PATH__ root=/dev/sr0 +initrd __INITRD_PATH__ + +title Hard Drive (first partition) +rootnoverify (hd0) +chainloader +1 diff --git a/fs/jffs2/Config.in b/fs/jffs2/Config.in new file mode 100644 index 0000000000..1010216bd1 --- /dev/null +++ b/fs/jffs2/Config.in @@ -0,0 +1,112 @@ +config BR2_TARGET_ROOTFS_JFFS2 + bool "jffs2 root filesystem" + help + Build a jffs2 root filesystem + +if BR2_TARGET_ROOTFS_JFFS2 + +choice + prompt "Flash Type" + default BR2_TARGET_ROOTFS_JFFS2_FLASH_128 + +config BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056 + bool "AT45 dataflash with 1056 byte pagesize" + select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER + +config BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528 + bool "AT45 dataflash with 528 byte pagesize" + select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER + +config BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_16K + bool "NAND flash with 16 kB erasesize" + select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER + +config BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_128K + bool "NAND flash with 128 kB erasesize" + select BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER + +config BR2_TARGET_ROOTFS_JFFS2_FLASH_128 + bool "Parallel flash with 128 kB erase size" + +config BR2_TARGET_ROOTFS_JFFS2_FLASH_64 + bool "Parallel flash with 64 kB erase size" + +config BR2_TARGET_ROOTFS_JFFS2_CUSTOM + bool "Select custom erase size" + +endchoice + +config BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE + hex "Erase block size" + depends on BR2_TARGET_ROOTFS_JFFS2_CUSTOM + default 0x20000 + help + Set to erase size of memory + +config BR2_TARGET_ROOTFS_JFFS2_EBSIZE + hex + default 0x2100 if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056 + default 0x1080 if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528 + default 0x4000 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_16K + default 0x20000 if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_128K + default 0x20000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_128 + default 0x10000 if BR2_TARGET_ROOTFS_JFFS2_FLASH_64 + default BR2_TARGET_ROOTFS_JFFS2_CUSTOM_EBSIZE if BR2_TARGET_ROOTFS_JFFS2_CUSTOM + +config BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER + bool "Do not use Cleanmarker" + default y if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_1056 + default y if BR2_TARGET_ROOTFS_JFFS2_DATAFLASH_528 + default y if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_16K + default y if BR2_TARGET_ROOTFS_JFFS2_NANDFLASH_128K + help + Do not use cleanmarkers if using NAND flash or Dataflash where + the pagesize is not a power of 2 + +config BR2_TARGET_ROOTFS_JFFS2_PAD + bool "Pad output" + +config BR2_TARGET_ROOTFS_JFFS2_PADSIZE + hex "Pad output size (0x0 = to end of EB)" + depends on BR2_TARGET_ROOTFS_JFFS2_PAD + default 0x0 + help + Set to 0x0 to pad to end of erase block. + +choice + prompt "Endianess" + default BR2_TARGET_ROOTFS_JFFS2_BE if BR2_ENDIAN = "BIG" + +config BR2_TARGET_ROOTFS_JFFS2_LE + bool "little-endian" + +config BR2_TARGET_ROOTFS_JFFS2_BE + bool "big-endian" + +endchoice + +config BR2_TARGET_ROOTFS_JFFS2_SUMMARY + bool "Produce a summarized JFFS2 image" + help + A summarised image can be mounted faster if support is + enabled in the kernel (CONFIG_JFFS2_SUMMARY) + +config BR2_TARGET_ROOTFS_JFFS2_USE_CUSTOM_PAGESIZE + bool "Select custom virtual memory page size" + help + Use a custom virtual memory page size. Note that this is not related to + the flash memory page size. Using this option is only needed if Linux is + configured to use a page size different than 4kB. + + +config BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE + hex "Virtual memory page size" + depends on BR2_TARGET_ROOTFS_JFFS2_USE_CUSTOM_PAGESIZE + default 0x1000 + help + Set to virtual memory page size of target system (in bytes). This value + should match the virtual page size in Linux (i.e. this should have the + same value as the value of the PAGE_SIZE macro in Linux). It is not + related to the flash memory page size. + +endif diff --git a/fs/jffs2/jffs2.mk b/fs/jffs2/jffs2.mk new file mode 100644 index 0000000000..a9cd4146ee --- /dev/null +++ b/fs/jffs2/jffs2.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# Build the jffs2 root filesystem image +# +################################################################################ + +JFFS2_OPTS := -e $(BR2_TARGET_ROOTFS_JFFS2_EBSIZE) +SUMTOOL_OPTS := $(JFFS2_OPTS) + +ifeq ($(BR2_TARGET_ROOTFS_JFFS2_PAD),y) +ifneq ($(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)),0x0) +JFFS2_OPTS += --pad=$(strip $(BR2_TARGET_ROOTFS_JFFS2_PADSIZE)) +else +JFFS2_OPTS += -p +endif +SUMTOOL_OPTS += -p +endif + +ifeq ($(BR2_TARGET_ROOTFS_JFFS2_LE),y) +JFFS2_OPTS += -l +SUMTOOL_OPTS += -l +endif + +ifeq ($(BR2_TARGET_ROOTFS_JFFS2_BE),y) +JFFS2_OPTS += -b +SUMTOOL_OPTS += -b +endif + +ifeq ($(BR2_TARGET_ROOTFS_JFFS2_USE_CUSTOM_PAGESIZE),y) +JFFS2_OPTS += -s $(BR2_TARGET_ROOTFS_JFFS2_CUSTOM_PAGESIZE) +endif + +ifeq ($(BR2_TARGET_ROOTFS_JFFS2_NOCLEANMARKER),y) +JFFS2_OPTS += -n +SUMTOOL_OPTS += -n +endif + +ROOTFS_JFFS2_DEPENDENCIES = host-mtd + +ifneq ($(BR2_TARGET_ROOTFS_JFFS2_SUMMARY),) +define ROOTFS_JFFS2_CMD + $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@.nosummary && \ + $(SUMTOOL) $(SUMTOOL_OPTS) -i $@.nosummary -o $@ && \ + rm $@.nosummary +endef +else +define ROOTFS_JFFS2_CMD + $(MKFS_JFFS2) $(JFFS2_OPTS) -d $(TARGET_DIR) -o $@ +endef +endif + +$(eval $(call ROOTFS_TARGET,jffs2)) diff --git a/fs/romfs/Config.in b/fs/romfs/Config.in new file mode 100644 index 0000000000..84944a0fc0 --- /dev/null +++ b/fs/romfs/Config.in @@ -0,0 +1,4 @@ +config BR2_TARGET_ROOTFS_ROMFS + bool "romfs root filesystem" + help + Build a romfs image of the root filesystem. diff --git a/fs/romfs/romfs.mk b/fs/romfs/romfs.mk new file mode 100644 index 0000000000..2738b6b292 --- /dev/null +++ b/fs/romfs/romfs.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# Build the romfs root filesystem image +# +################################################################################ + +ROOTFS_ROMFS_DEPENDENCIES = host-genromfs + +define ROOTFS_ROMFS_CMD + $(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $@ +endef + +$(eval $(call ROOTFS_TARGET,romfs)) diff --git a/fs/squashfs/Config.in b/fs/squashfs/Config.in new file mode 100644 index 0000000000..ca9ddb2218 --- /dev/null +++ b/fs/squashfs/Config.in @@ -0,0 +1,31 @@ +config BR2_TARGET_ROOTFS_SQUASHFS + bool "squashfs root filesystem" + help + Build a squashfs root filesystem + +if BR2_TARGET_ROOTFS_SQUASHFS + +choice + prompt "Compression algorithm" + default BR2_TARGET_ROOTFS_SQUASHFS4_GZIP + help + Select the squashfs compression algorithm to use when + generating the filesystem. + +config BR2_TARGET_ROOTFS_SQUASHFS4_GZIP + bool "gzip" + +config BR2_TARGET_ROOTFS_SQUASHFS4_LZ4 + bool "lz4" + +config BR2_TARGET_ROOTFS_SQUASHFS4_LZMA + bool "lzma" + +config BR2_TARGET_ROOTFS_SQUASHFS4_LZO + bool "lzo" + +config BR2_TARGET_ROOTFS_SQUASHFS4_XZ + bool "xz" + +endchoice +endif diff --git a/fs/squashfs/squashfs.mk b/fs/squashfs/squashfs.mk new file mode 100644 index 0000000000..a71d9cc57b --- /dev/null +++ b/fs/squashfs/squashfs.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# Build the squashfs root filesystem image +# +################################################################################ + +ROOTFS_SQUASHFS_DEPENDENCIES = host-squashfs + +ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZ4),y) +ROOTFS_SQUASHFS_ARGS += -comp lz4 -Xhc +else +ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZO),y) +ROOTFS_SQUASHFS_ARGS += -comp lzo +else +ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_LZMA),y) +ROOTFS_SQUASHFS_ARGS += -comp lzma +else +ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS4_XZ),y) +ROOTFS_SQUASHFS_ARGS += -comp xz +else +ROOTFS_SQUASHFS_ARGS += -comp gzip +endif +endif +endif +endif + +define ROOTFS_SQUASHFS_CMD + $(HOST_DIR)/usr/bin/mksquashfs $(TARGET_DIR) $@ -noappend \ + $(ROOTFS_SQUASHFS_ARGS) && \ + chmod 0644 $@ +endef + +$(eval $(call ROOTFS_TARGET,squashfs)) diff --git a/fs/tar/Config.in b/fs/tar/Config.in new file mode 100644 index 0000000000..63663ecd6f --- /dev/null +++ b/fs/tar/Config.in @@ -0,0 +1,52 @@ +config BR2_TARGET_ROOTFS_TAR + bool "tar the root filesystem" + default y + help + Build a tar archive of the root filesystem + +choice + prompt "Compression method" + default BR2_TARGET_ROOTFS_TAR_NONE + depends on BR2_TARGET_ROOTFS_TAR + help + Select compressor for tar archive of the root filesystem + +config BR2_TARGET_ROOTFS_TAR_NONE + bool "no compression" + help + Do not compress the tarball. + +config BR2_TARGET_ROOTFS_TAR_GZIP + bool "gzip" + help + Do compress the tarball with gzip. + +config BR2_TARGET_ROOTFS_TAR_BZIP2 + bool "bzip2" + help + Do compress the tarball with bzip2. + +config BR2_TARGET_ROOTFS_TAR_LZMA + bool "lzma" + help + Do compress the tarball with lzma. + +config BR2_TARGET_ROOTFS_TAR_LZO + bool "lzo" + help + Do compress the tarball with lzop. + +config BR2_TARGET_ROOTFS_TAR_XZ + bool "xz" + help + Do compress the tarball with xz. + +endchoice + +config BR2_TARGET_ROOTFS_TAR_OPTIONS + string "other random options to pass to tar" + depends on BR2_TARGET_ROOTFS_TAR + default "" + help + Any other flags you want to pass to tar + Refer to tar --help for details diff --git a/fs/tar/tar.mk b/fs/tar/tar.mk new file mode 100644 index 0000000000..28219cf052 --- /dev/null +++ b/fs/tar/tar.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# tar to archive target filesystem +# +################################################################################ + +TAR_OPTS := $(call qstrip,$(BR2_TARGET_ROOTFS_TAR_OPTIONS)) + +define ROOTFS_TAR_CMD + tar -c$(TAR_OPTS)f $@ --numeric-owner -C $(TARGET_DIR) . +endef + +$(eval $(call ROOTFS_TARGET,tar)) diff --git a/fs/ubifs/Config.in b/fs/ubifs/Config.in new file mode 100644 index 0000000000..ff604c5c38 --- /dev/null +++ b/fs/ubifs/Config.in @@ -0,0 +1,149 @@ +config BR2_TARGET_ROOTFS_UBIFS + bool "ubifs root filesystem" + help + Build a ubifs root filesystem + +if BR2_TARGET_ROOTFS_UBIFS + +config BR2_TARGET_ROOTFS_UBIFS_LEBSIZE + hex "logical eraseblock size" + default 0x1f800 + help + Logical eraseblock (LEB) size. The value provided here is + passed to the -e/--leb-size option of mkfs.ubifs. + +config BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE + hex "minimum I/O unit size" + default 0x800 + help + Minimum I/O unit size. The value provided here is passed + to the -m/--min-io-size option of mkfs.ubifs/ubinize. + +config BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT + int "maximum logical eraseblock count" + default 2048 + help + Maximum logical eraseblock (LEB) count. The value provided + here is passed to the -c/--max-leb-cnt option of mkfs.ubifs. + +choice + prompt "ubifs runtime compression" + default BR2_TARGET_ROOTFS_UBIFS_RT_LZO + help + Select which compression format to use at run-time within + the ubifs file system. The choice made here is passed to + the -x/--compr option of mkfs.ubifs + +config BR2_TARGET_ROOTFS_UBIFS_RT_NONE + bool "no compression" + help + Don't use run-time compression. + +config BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB + bool "gzip" + help + Use zlib compression at run-time. + +config BR2_TARGET_ROOTFS_UBIFS_RT_LZO + bool "lzo" + help + Use lzo compression at run-time. + +endchoice + +choice + prompt "Compression method" + default BR2_TARGET_ROOTFS_UBIFS_NONE + help + Select which compression format to compress the final image + into. + +config BR2_TARGET_ROOTFS_UBIFS_NONE + bool "no compression" + help + Do not compress the ubifs filesystem. + +config BR2_TARGET_ROOTFS_UBIFS_GZIP + bool "gzip" + help + Do compress the ubifs filesystem with gzip. + +config BR2_TARGET_ROOTFS_UBIFS_BZIP2 + bool "bzip2" + help + Do compress the ubifs filesystem with bzip2. + +config BR2_TARGET_ROOTFS_UBIFS_LZMA + bool "lzma" + help + Do compress the ubifs filesystem with lzma. + +config BR2_TARGET_ROOTFS_UBIFS_LZO + bool "lzo" + help + Do compress the ubifs filesystem with lzop. + +config BR2_TARGET_ROOTFS_UBIFS_XZ + bool "xz" + help + Do compress the ubifs filesystem with xz. + +endchoice + +config BR2_TARGET_ROOTFS_UBIFS_OPTS + string "Additional mkfs.ubifs options" + help + Any additional mkfs.ubifs options you may want to include. + +config BR2_TARGET_ROOTFS_UBI + bool "Embed into an UBI image" + help + Build an ubi image from the ubifs one (with ubinize). + +if BR2_TARGET_ROOTFS_UBI + +config BR2_TARGET_ROOTFS_UBI_PEBSIZE + hex "physical eraseblock size" + default 0x20000 + help + Tells ubinize the physical eraseblock (PEB) size of the + flash chip the ubi image is created for. The value provided + here is passed to the -p/--peb-size option of ubinize. + +config BR2_TARGET_ROOTFS_UBI_SUBSIZE + int "sub-page size" + default 512 + help + Tells ubinize that the flash supports sub-pages and the sub-page + size. Use 0 if sub-pages are not supported on flash chip. + The value provided here is passed to the -s/--sub-page-size + option of ubinize. + +config BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG + bool "Use custom config file" + help + Select this option to use a custom ubinize configuration file, + rather than the default configuration used by Buildroot (which + defines a single dynamic volume marked as auto-resize). Passing + a custom ubinize configuration file allows you to create several + volumes, specify volume types, etc. + + As a convenience, buildroot replaces the string + "BR2_ROOTFS_UBIFS_PATH" with the path to the built ubifs file. + So the volume defined for the root filesystem can specify the + image path as: image=BR2_ROOTFS_UBIFS_PATH + +config BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE + string "Configuration file path" + depends on BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG + help + Path to the ubinize configuration file. + +config BR2_TARGET_ROOTFS_UBI_OPTS + string "Additional ubinize options" + help + Any additional ubinize options you may want to include. + +endif # BR2_TARGET_ROOTFS_UBI + +endif # BR2_TARGET_ROOTFS_UBIFS diff --git a/fs/ubifs/ubi.mk b/fs/ubifs/ubi.mk new file mode 100644 index 0000000000..aba3bea83b --- /dev/null +++ b/fs/ubifs/ubi.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# Embed the ubifs image into an ubi image +# +################################################################################ + +UBI_UBINIZE_OPTS := -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE) +UBI_UBINIZE_OPTS += -p $(BR2_TARGET_ROOTFS_UBI_PEBSIZE) +ifneq ($(BR2_TARGET_ROOTFS_UBI_SUBSIZE),0) +UBI_UBINIZE_OPTS += -s $(BR2_TARGET_ROOTFS_UBI_SUBSIZE) +endif + +UBI_UBINIZE_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_OPTS)) + +ROOTFS_UBI_DEPENDENCIES = rootfs-ubifs + +ifeq ($(BR2_TARGET_ROOTFS_UBI_USE_CUSTOM_CONFIG),y) +UBINIZE_CONFIG_FILE_PATH = $(call qstrip,$(BR2_TARGET_ROOTFS_UBI_CUSTOM_CONFIG_FILE)) +else +UBINIZE_CONFIG_FILE_PATH = fs/ubifs/ubinize.cfg +endif + +define ROOTFS_UBI_CMD + $(INSTALL) -m 0644 $(UBINIZE_CONFIG_FILE_PATH) $(BUILD_DIR)/ubinize.cfg ;\ + $(SED) 's;BR2_ROOTFS_UBIFS_PATH;$@fs;' $(BUILD_DIR)/ubinize.cfg ;\ + $(HOST_DIR)/usr/sbin/ubinize -o $@ $(UBI_UBINIZE_OPTS) $(BUILD_DIR)/ubinize.cfg ;\ + rm $(BUILD_DIR)/ubinize.cfg +endef + +$(eval $(call ROOTFS_TARGET,ubi)) diff --git a/fs/ubifs/ubifs.mk b/fs/ubifs/ubifs.mk new file mode 100644 index 0000000000..f1e4126e86 --- /dev/null +++ b/fs/ubifs/ubifs.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# Build the ubifs root filesystem image +# +################################################################################ + +UBIFS_OPTS := -e $(BR2_TARGET_ROOTFS_UBIFS_LEBSIZE) -c $(BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT) -m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE) + +ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB),y) +UBIFS_OPTS += -x zlib +endif +ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_LZO),y) +UBIFS_OPTS += -x lzo +endif +ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_NONE),y) +UBIFS_OPTS += -x none +endif + +UBIFS_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBIFS_OPTS)) + +ROOTFS_UBIFS_DEPENDENCIES = host-mtd + +define ROOTFS_UBIFS_CMD + $(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@ +endef + +$(eval $(call ROOTFS_TARGET,ubifs)) diff --git a/fs/ubifs/ubinize.cfg b/fs/ubifs/ubinize.cfg new file mode 100644 index 0000000000..b0aace7b9f --- /dev/null +++ b/fs/ubifs/ubinize.cfg @@ -0,0 +1,8 @@ +[ubifs] +mode=ubi +vol_id=0 +vol_type=dynamic +vol_name=rootfs +vol_alignment=1 +vol_flags=autoresize +image=BR2_ROOTFS_UBIFS_PATH diff --git a/fs/yaffs2/Config.in b/fs/yaffs2/Config.in new file mode 100644 index 0000000000..27da4ba638 --- /dev/null +++ b/fs/yaffs2/Config.in @@ -0,0 +1,4 @@ +config BR2_TARGET_ROOTFS_YAFFS2 + bool "yaffs2 root filesystem" + help + Build a yaffs2 root filesystem diff --git a/fs/yaffs2/yaffs.mk b/fs/yaffs2/yaffs.mk new file mode 100644 index 0000000000..19bdbe842e --- /dev/null +++ b/fs/yaffs2/yaffs.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# Build the yaffs2 root filesystem image +# +################################################################################ + +ROOTFS_YAFFS2_DEPENDENCIES = host-yaffs2utils + +define ROOTFS_YAFFS2_CMD + $(HOST_DIR)/usr/bin/mkyaffs2 --all-root $(TARGET_DIR) $@ +endef + +$(eval $(call ROOTFS_TARGET,yaffs2)) diff --git a/linux/0001-timeconst.pl-Eliminate-Perl-warning.patch.conditional b/linux/0001-timeconst.pl-Eliminate-Perl-warning.patch.conditional new file mode 100644 index 0000000000..02abadd38c --- /dev/null +++ b/linux/0001-timeconst.pl-Eliminate-Perl-warning.patch.conditional @@ -0,0 +1,45 @@ +From 63a3f603413ffe82ad775f2d62a5afff87fd94a0 Mon Sep 17 00:00:00 2001 +From: "H. Peter Anvin" +Date: Thu, 7 Feb 2013 17:14:08 -0800 +Subject: [PATCH] timeconst.pl: Eliminate Perl warning + +defined(@array) is deprecated in Perl and gives off a warning. +Restructure the code to remove that warning. + +[ hpa: it would be interesting to revert to the timeconst.bc script. + It appears that the failures reported by akpm during testing of + that script was due to a known broken version of make, not a problem + with bc. The Makefile rules could probably be restructured to avoid + the make bug, or it is probably old enough that it doesn't matter. ] + +Reported-by: Andi Kleen +Signed-off-by: H. Peter Anvin +Cc: Andrew Morton +Cc: +Signed-off-by: Gustavo Zacarias +--- +Patch status: upstream + + kernel/timeconst.pl | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/kernel/timeconst.pl b/kernel/timeconst.pl +index eb51d76..3f42652 100644 +--- a/kernel/timeconst.pl ++++ b/kernel/timeconst.pl +@@ -369,10 +369,8 @@ if ($hz eq '--can') { + die "Usage: $0 HZ\n"; + } + +- @val = @{$canned_values{$hz}}; +- if (!defined(@val)) { +- @val = compute_values($hz); +- } ++ $cv = $canned_values{$hz}; ++ @val = defined($cv) ? @$cv : compute_values($hz); + output($hz, @val); + } + exit 0; +-- +2.4.10 + diff --git a/linux/Config.ext.in b/linux/Config.ext.in new file mode 100644 index 0000000000..755c23b70f --- /dev/null +++ b/linux/Config.ext.in @@ -0,0 +1,67 @@ +menu "Linux Kernel Extensions" + +# Xenomai +config BR2_LINUX_KERNEL_EXT_XENOMAI + bool "Adeos/Xenomai Real-time patch" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_i386 || BR2_x86_64 || BR2_arm || \ + BR2_bfin || BR2_powerpc || BR2_sh4 + select BR2_PACKAGE_XENOMAI + help + Xenomai is split in two parts: a kernel part and a userspace + part. Enabling this option automatically selects the Xenomai + package and helps in patching the Linux kernel built by + Buildroot with the Xenomai kernel part (ie Adeos/Ipipe). + + You can find the currently supported kernel versions by + looking at the available patches in the Xenomai sources + tree: ksrc/arch/$(ARCH)/patches + + However, it is recommended to use the latest version of the + Adeos/Ipipe patch available at + http://download.gna.org/adeos/patches + + Xenomai is know to support Blackfin, SH4, x86, ARM, NIOS2 + and PowerPC architectures. + +comment "xenomai needs a toolchain w/ threads" + depends on BR2_i386 || BR2_x86_64 || BR2_arm || \ + BR2_bfin || BR2_powerpc || BR2_sh4 + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH + depends on BR2_LINUX_KERNEL_EXT_XENOMAI + string "Path for Adeos patch file" + help + Optionally, explicitly specify the Adeos patch to use. + Download it at http://download.gna.org/adeos/patches + and verify that your kernel version in buildroot matches. + +# RTAI +config BR2_LINUX_KERNEL_EXT_RTAI + bool "RTAI Real-time patch" + select BR2_PACKAGE_RTAI + help + RTAI Kernel part. + +# fbtft +config BR2_LINUX_KERNEL_EXT_FBTFT + bool "FB TFT drivers" + select BR2_PACKAGE_FBTFT + help + Linux Framebuffer drivers for small TFT LCD display modules, + e.g. Adafruit PiTFT displays for Raspberry Pi (this extra + package is only needed for linux kernels until v3.19, since + v4.0 the drivers are included in the staging area). + + To enable fbtft, e.g. for Adafruit 2.8 PiTFT, enable the + following kernel configurations: + - CONFIG_SPI + - CONFIG_GPIOLIB + - CONFIG_FB + - CONFIG_FB_TFT + - CONFIG_FB_TFT_ILI9341 + + https://github.com/notro/fbtft + +endmenu diff --git a/linux/Config.in b/linux/Config.in new file mode 100644 index 0000000000..4d0090520c --- /dev/null +++ b/linux/Config.in @@ -0,0 +1,406 @@ +menu "Kernel" + +config BR2_LINUX_KERNEL + bool "Linux Kernel" + help + Enable this option if you want to build a Linux kernel for + your embedded device + +if BR2_LINUX_KERNEL + +# Packages that need to have a kernel with support for loadable modules, +# but do not use the kernel-modules infrastructure, should select that +# option. +config BR2_LINUX_NEEDS_MODULES + bool + +# +# Version selection. We provide the choice between: +# +# 1. A single fairly recent stable kernel version +# 2. In case an internal toolchain has been built, the same kernel +# version as the kernel headers +# 3. A custom stable version +# 4. A custom tarball +# +choice + prompt "Kernel version" + +config BR2_LINUX_KERNEL_LATEST_VERSION + bool "4.4.3" + +config BR2_LINUX_KERNEL_CUSTOM_VERSION + bool "Custom version" + help + This option allows to use a specific official version from + kernel.org, like 2.6.x, 2.6.x.y, 3.x.y, ... + + Note: you cannot use this option to select a _longterm_ 2.6 + kernel, because these kernels are not located at the standard + URL at kernel.org. Instead, select "Custom tarball" and + specify the right URL directly. + +config BR2_LINUX_KERNEL_CUSTOM_TARBALL + bool "Custom tarball" + help + This option allows to specify a URL pointing to a kernel source + tarball. This URL can use any protocol recognized by Buildroot, + like http://, ftp://, file:// or scp://. + + When pointing to a local tarball using file://, you may want to + use a make variable like $(TOPDIR) to reference the root of the + Buildroot tree. + +config BR2_LINUX_KERNEL_CUSTOM_GIT + bool "Custom Git repository" + help + This option allows Buildroot to get the Linux kernel source + code from a Git repository. + +config BR2_LINUX_KERNEL_CUSTOM_HG + bool "Custom Mercurial repository" + help + This option allows Buildroot to get the Linux kernel source + code from a Mercurial repository. + +config BR2_LINUX_KERNEL_CUSTOM_LOCAL + bool "Local directory" + help + This option allows Buildroot to get the Linux kernel source + code from a local directory. + +endchoice + +config BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE + string "Kernel version" + depends on BR2_LINUX_KERNEL_CUSTOM_VERSION + +config BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION + string "URL of custom kernel tarball" + depends on BR2_LINUX_KERNEL_CUSTOM_TARBALL + +if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG + +config BR2_LINUX_KERNEL_CUSTOM_REPO_URL + string "URL of custom repository" + default BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL \ + if BR2_LINUX_KERNEL_CUSTOM_GIT_REPO_URL != "" # legacy + +config BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION + string "Custom repository version" + default BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION \ + if BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION != "" # legacy + help + Revision to use in the typical format used by Git/Mercurial + E.G. a sha id, a tag, branch, .. + +endif + +config BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH + string "Path to the local directory" + depends on BR2_LINUX_KERNEL_CUSTOM_LOCAL + help + Path to the local directory with the Linux kernel source code. + +config BR2_LINUX_KERNEL_VERSION + string + default "4.4.3" if BR2_LINUX_KERNEL_LATEST_VERSION + default BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE \ + if BR2_LINUX_KERNEL_CUSTOM_VERSION + default "custom" if BR2_LINUX_KERNEL_CUSTOM_TARBALL + default BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION \ + if BR2_LINUX_KERNEL_CUSTOM_GIT || BR2_LINUX_KERNEL_CUSTOM_HG + default "custom" if BR2_LINUX_KERNEL_CUSTOM_LOCAL + +# +# Patch selection +# + +config BR2_LINUX_KERNEL_PATCH + string "Custom kernel patches" + depends on !BR2_LINUX_KERNEL_CUSTOM_LOCAL + help + A space-separated list of patches to apply to the + kernel. Each patch can be described as an URL, a local file + path, or a directory. In the case of a directory, all files + matching *.patch in the directory will be applied. + +# +# Configuration selection +# + +choice + prompt "Kernel configuration" + default BR2_LINUX_KERNEL_USE_DEFCONFIG + +config BR2_LINUX_KERNEL_USE_DEFCONFIG + bool "Using an in-tree defconfig file" + +config BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG + bool "Using a custom (def)config file" + +endchoice + +config BR2_LINUX_KERNEL_DEFCONFIG + string "Defconfig name" + depends on BR2_LINUX_KERNEL_USE_DEFCONFIG + help + Name of the kernel defconfig file to use, without the + trailing _defconfig. The defconfig is located in + arch//configs in the kernel tree. + +config BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE + string "Configuration file path" + depends on BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG + help + Path to the kernel configuration file + + Note: this can be a defconfig file or a complete .config file, + which can later be saved back with make linux-update-(def)config. + +config BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES + string "Additional configuration fragment files" + help + A space-separated list of kernel configuration fragment files, + that will be merged to the main kernel configuration file. + +# +# Binary format +# + +config BR2_LINUX_KERNEL_UBOOT_IMAGE + bool + +choice + prompt "Kernel binary format" + +config BR2_LINUX_KERNEL_UIMAGE + bool "uImage" + depends on BR2_arc || BR2_arm || BR2_armeb || BR2_bfin || \ + BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \ + BR2_sh || BR2_sh64 || BR2_mips || BR2_mipsel || \ + BR2_mips64 || BR2_mips64el + select BR2_LINUX_KERNEL_UBOOT_IMAGE + +config BR2_LINUX_KERNEL_APPENDED_UIMAGE + bool "uImage with appended DT" + depends on BR2_arm || BR2_armeb + select BR2_LINUX_KERNEL_DTS_SUPPORT + select BR2_LINUX_KERNEL_APPENDED_DTB + select BR2_LINUX_KERNEL_UBOOT_IMAGE + +config BR2_LINUX_KERNEL_BZIMAGE + bool "bzImage" + depends on BR2_i386 || BR2_x86_64 + +config BR2_LINUX_KERNEL_ZIMAGE + bool "zImage" + depends on BR2_arm || BR2_armeb || BR2_powerpc || \ + BR2_powerpc64 || BR2_powerpc64le || BR2_sparc || \ + BR2_sh || BR2_sh64 || BR2_xtensa + +config BR2_LINUX_KERNEL_ZIMAGE_EPAPR + bool "zImage.epapr" + depends on BR2_powerpc64 || BR2_powerpc64le + +config BR2_LINUX_KERNEL_APPENDED_ZIMAGE + bool "zImage with appended DT" + depends on BR2_arm || BR2_armeb + select BR2_LINUX_KERNEL_DTS_SUPPORT + select BR2_LINUX_KERNEL_APPENDED_DTB + +config BR2_LINUX_KERNEL_CUIMAGE + bool "cuImage" + depends on BR2_powerpc + select BR2_LINUX_KERNEL_UBOOT_IMAGE + select BR2_LINUX_KERNEL_DTS_SUPPORT + select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT + +config BR2_LINUX_KERNEL_SIMPLEIMAGE + bool "simpleImage" + depends on BR2_microblaze + select BR2_LINUX_KERNEL_UBOOT_IMAGE + select BR2_LINUX_KERNEL_DTS_SUPPORT + select BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT + +config BR2_LINUX_KERNEL_IMAGE + bool "Image" + depends on BR2_aarch64 + +config BR2_LINUX_KERNEL_LINUX_BIN + bool "linux.bin" + depends on BR2_microblaze + select BR2_LINUX_KERNEL_UBOOT_IMAGE + +config BR2_LINUX_KERNEL_VMLINUX_BIN + bool "vmlinux.bin" + depends on BR2_mips || BR2_mipsel || BR2_sh || BR2_sh64 + +config BR2_LINUX_KERNEL_VMLINUX + bool "vmlinux" + +config BR2_LINUX_KERNEL_VMLINUZ + bool "vmlinuz" + depends on BR2_mips || BR2_mipsel + +config BR2_LINUX_KERNEL_VMLINUZ_BIN + bool "vmlinuz.bin" + depends on BR2_mips || BR2_mipsel + +config BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM + bool "custom target" + help + For certain cases a board-specific target image must be + used. For example, on powerPC where the OpenFirmware + description is attached in a board-specific kernel image + target like 'cuImage.mpc8379_rdb'. + + Select this option and specify the make target in "Kernel + image target name". + +endchoice + +# +# Kernel compression format +# + +choice + prompt "Kernel compression format" + help + This selection will just ensure that the correct host tools are build. + The actual compression for the kernel should be selected in the + kernel configuration menu. + +config BR2_LINUX_KERNEL_GZIP + bool "gzip compression" + +config BR2_LINUX_KERNEL_LZ4 + bool "lz4 compression" + +config BR2_LINUX_KERNEL_LZMA + bool "lzma compression" + +config BR2_LINUX_KERNEL_LZO + bool "lzo compression" + +config BR2_LINUX_KERNEL_XZ + bool "xz compression" + +endchoice + +config BR2_LINUX_KERNEL_IMAGE_TARGET_NAME + string "Kernel image target name" + depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM + help + Specify the kernel make target to build the kernel that you + need. + +config BR2_LINUX_KERNEL_IMAGE_NAME + string "Kernel image name" + depends on BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM + help + The filename of the kernel image, if it is different from the + make target (above). Only Xtensa uses a filename different from + the make target. Defaults to BR2_LINUX_KERNEL_IMAGE_TARGET_NAME. + + If unsure, leave it empty. + +config BR2_LINUX_KERNEL_UIMAGE_LOADADDR + string "load address (for 3.7+ multi-platform image)" + depends on BR2_arm || BR2_armeb + depends on BR2_LINUX_KERNEL_UIMAGE || BR2_LINUX_KERNEL_APPENDED_UIMAGE + help + If your ARM system's Linux kernel is configured with the new (3.7+) + multi-architecture support (CONFIG_ARCH_MULTIPLATFORM=y in your + kernel config), then it is necessary to specify a kernel load address + when building the uImage. This should be a hexadecimal string + beginning with 0x, for example: 0x00008000. + + If unsure, let this option empty. + +config BR2_LINUX_KERNEL_DTS_SUPPORT + bool "Build a Device Tree Blob (DTB)" + help + Compile one or more device tree sources into device tree blobs. + Select the dts files to compile in the options below. + +if BR2_LINUX_KERNEL_DTS_SUPPORT + +# We have mainly three cases when it comes to device tree support: +# 1) We don't want any support at all. Then the ..DTS_SUPPORT +# variable won't be set +# 2) We want device tree support, so we need the user to enter the +# device tree name or the path to the custom device he uses, but +# the kernel abstracts this from us and only build an image that +# looks like a regular kernel image. In this case, we only need +# to derive the kernel image name from the given device tree +# name, and all the rest is as usual +# 3) We want device tree support, but the kernel requires us to +# build the device tree blob separately. In this case, some +# more logic will be needed. +# The variable below address the second case, were you only want +# limited actions from buildroot. +config BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT + bool + +config BR2_LINUX_KERNEL_APPENDED_DTB + bool + +choice + prompt "Device tree source" + default BR2_LINUX_KERNEL_USE_INTREE_DTS + +config BR2_LINUX_KERNEL_USE_INTREE_DTS + bool "Use a device tree present in the kernel." + help + Use a device tree source distributed with + the kernel sources. The dts files are located + in the arch//boot/dts folder. + +config BR2_LINUX_KERNEL_USE_CUSTOM_DTS + bool "Use a custom device tree file" + help + Use a custom device tree file, i.e, a device + tree file that does not belong to the kernel + source tree. +endchoice + +config BR2_LINUX_KERNEL_INTREE_DTS_NAME + string "Device Tree Source file names" + depends on BR2_LINUX_KERNEL_USE_INTREE_DTS + help + Name of the device tree source file, without + the trailing .dts. You can provide a list of + dts files to build, separated by spaces. + +config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH + string "Device Tree Source file paths" + depends on BR2_LINUX_KERNEL_USE_CUSTOM_DTS + help + Path to the device tree source files. You can + provide a list of dts paths to copy and build, + separated by spaces. + +endif + +config BR2_LINUX_KERNEL_INSTALL_TARGET + bool "Install kernel image to /boot in target" + depends on !BR2_TARGET_ROOTFS_INITRAMFS + help + Select this option to have the kernel image installed to + /boot in the target root filesystem, as is typically done on + x86/x86_64 systems. + + Note that this option also installs the Device Tree Blobs to + /boot if DTBs have been generated by the kernel build + process. + +# Linux extensions +source "linux/Config.ext.in" + +# Linux tools +source "linux/Config.tools.in" + +endif # BR2_LINUX_KERNEL + +endmenu diff --git a/linux/Config.tools.in b/linux/Config.tools.in new file mode 100644 index 0000000000..24ef8cd743 --- /dev/null +++ b/linux/Config.tools.in @@ -0,0 +1,29 @@ +menu "Linux Kernel Tools" + +config BR2_LINUX_KERNEL_TOOL_CPUPOWER + bool "cpupower" + depends on !BR2_bfin # pciutils + select BR2_PACKAGE_PCIUTILS + help + cpupower is a collection of tools to examine and tune power + saving related features of your processor. + +config BR2_LINUX_KERNEL_TOOL_PERF + bool "perf" + help + perf (sometimes "Perf Events" or perf tools, originally + "Performance Counters for Linux") - is a performance + analyzing tool in Linux, available from kernel version + 2.6.31. User-space controlling utility, called 'perf' has + git-like interface with subcommands. It is capable of + statistical profiling of entire system (both kernel and user + code), single CPU or severals threads. + + This will build and install the userspace 'perf' + command. It is up to the user to ensure that the kernel + configuration has all the suitable options enabled to allow a + proper operation of 'perf'. + + https://perf.wiki.kernel.org/ + +endmenu diff --git a/linux/linux-ext-fbtft.mk b/linux/linux-ext-fbtft.mk new file mode 100644 index 0000000000..5eb3d944e8 --- /dev/null +++ b/linux/linux-ext-fbtft.mk @@ -0,0 +1,22 @@ +################################################################################ +# Linux fbtft extensions +# +# Patch the linux kernel with fbtft extension +################################################################################ + +LINUX_EXTENSIONS += fbtft + +# for linux >= 3.15 install to drivers/video/fbdev/fbtft +# for linux < 3.15 install to drivers/video/fbtft +define FBTFT_PREPARE_KERNEL + if [ -e $(LINUX_DIR)/drivers/video/fbdev ]; then \ + dest=drivers/video/fbdev ; \ + else \ + dest=drivers/video ; \ + fi ; \ + mkdir -p $(LINUX_DIR)/$${dest}/fbtft; \ + cp -dpfr $(FBTFT_DIR)/* $(LINUX_DIR)/$${dest}/fbtft/ ; \ + echo "source \"$${dest}/fbtft/Kconfig\"" \ + >> $(LINUX_DIR)/$${dest}/Kconfig ; \ + echo 'obj-y += fbtft/' >> $(LINUX_DIR)/$${dest}/Makefile +endef diff --git a/linux/linux-ext-rtai.mk b/linux/linux-ext-rtai.mk new file mode 100644 index 0000000000..0cc1232b96 --- /dev/null +++ b/linux/linux-ext-rtai.mk @@ -0,0 +1,30 @@ +################################################################################ +# Linux RTAI extensions +# +# Patch the linux kernel with RTAI extension +################################################################################ + +LINUX_EXTENSIONS += rtai + +ifeq ($(KERNEL_ARCH),i386) +RTAI_ARCH = x86 +else ifeq ($(KERNEL_ARCH),x86_64) +RTAI_ARCH = x86 +else ifeq ($(KERNEL_ARCH),powerpc) +RTAI_ARCH = ppc +else +RTAI_ARCH = $(KERNEL_ARCH) +endif + +# Prepare kernel patch +define RTAI_PREPARE_KERNEL + kver=`$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelversion` ; \ + if test -f $(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/hal-linux-$${kver}-*patch ; then \ + $(APPLY_PATCHES) $(LINUX_DIR) \ + $(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/ \ + hal-linux-$${kver}-*patch ; \ + else \ + echo "No RTAI patch for your kernel version" ; \ + exit 1 ; \ + fi +endef diff --git a/linux/linux-ext-xenomai.mk b/linux/linux-ext-xenomai.mk new file mode 100644 index 0000000000..76a9786e4d --- /dev/null +++ b/linux/linux-ext-xenomai.mk @@ -0,0 +1,24 @@ +################################################################################ +# Linux Adeos/Xenomai extensions +# +# Patch the linux kernel with xenomai extension +################################################################################ + +LINUX_EXTENSIONS += xenomai + +# Adeos patch version +XENOMAI_ADEOS_PATCH = $(call qstrip,$(BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH)) +ifeq ($(XENOMAI_ADEOS_PATCH),) +XENOMAI_ADEOS_OPTS = --default +else +XENOMAI_ADEOS_OPTS = --adeos=$(XENOMAI_ADEOS_PATCH) +endif + +# Prepare kernel patch +define XENOMAI_PREPARE_KERNEL + $(XENOMAI_DIR)/scripts/prepare-kernel.sh \ + --linux=$(LINUX_DIR) \ + --arch=$(KERNEL_ARCH) \ + $(XENOMAI_ADEOS_OPTS) \ + --verbose +endef diff --git a/linux/linux-tool-cpupower.mk b/linux/linux-tool-cpupower.mk new file mode 100644 index 0000000000..4551cda1f1 --- /dev/null +++ b/linux/linux-tool-cpupower.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# cpupower +# +################################################################################ + +LINUX_TOOLS += cpupower + +CPUPOWER_DEPENDENCIES = pciutils + +CPUPOWER_MAKE_OPTS = CROSS=$(TARGET_CROSS) \ + CPUFREQ_BENCH=false \ + DEBUG=false + +define CPUPOWER_BUILD_CMDS + $(Q)if test ! -f $(@D)/tools/power/cpupower/Makefile ; then \ + echo "Your kernel version is too old and does not have the cpupower tool." ; \ + echo "At least kernel 3.4 must be used." ; \ + exit 1 ; \ + fi + + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tools \ + $(CPUPOWER_MAKE_OPTS) \ + cpupower +endef + +define CPUPOWER_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tools \ + $(CPUPOWER_MAKE_OPTS) \ + DESTDIR=$(STAGING_DIR) \ + cpupower_install +endef + +define CPUPOWER_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/tools \ + $(CPUPOWER_MAKE_OPTS) \ + DESTDIR=$(TARGET_DIR) \ + cpupower_install +endef diff --git a/linux/linux-tool-perf.mk b/linux/linux-tool-perf.mk new file mode 100644 index 0000000000..1070a1c098 --- /dev/null +++ b/linux/linux-tool-perf.mk @@ -0,0 +1,101 @@ +################################################################################ +# +# perf +# +################################################################################ + +LINUX_TOOLS += perf + +PERF_DEPENDENCIES = host-flex host-bison + +ifeq ($(KERNEL_ARCH),x86_64) +PERF_ARCH=x86 +else +PERF_ARCH=$(KERNEL_ARCH) +endif + +PERF_MAKE_FLAGS = \ + $(LINUX_MAKE_FLAGS) \ + ARCH=$(PERF_ARCH) \ + NO_LIBAUDIT=1 \ + NO_NEWT=1 \ + NO_GTK2=1 \ + NO_LIBPERL=1 \ + NO_LIBPYTHON=1 \ + DESTDIR=$(TARGET_DIR) \ + prefix=/usr \ + WERROR=0 \ + ASCIIDOC= + +# We need to pass an argument to ld for setting the endianness when +# building it for MIPS architecture, otherwise the default one will +# always be used (which is big endian) and the compilation for little +# endian will always fail showing an error like this one: +# LD foo.o +# mips-linux-gnu-ld: foo.o: compiled for a little endian system and +# target is big endian +ifeq ($(BR2_mips)$(BR2_mips64),y) +PERF_MAKE_FLAGS += LD="$(TARGET_LD) -EB" +else ifeq ($(BR2_mipsel)$(BR2_mips64el),y) +PERF_MAKE_FLAGS += LD="$(TARGET_LD) -EL" +endif + +# The call to backtrace() function fails for ARC, because for some +# reason the unwinder from libgcc returns early. Thus the usage of +# backtrace() should be disabled in perf explicitly: at build time +# backtrace() appears to be available, but it fails at runtime: the +# backtrace will contain only several functions from the top of stack, +# instead of the complete backtrace. +ifeq ($(BR2_arc),y) +PERF_MAKE_FLAGS += NO_BACKTRACE=1 +endif + +ifeq ($(BR2_PACKAGE_SLANG),y) +PERF_DEPENDENCIES += slang +endif + +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) +PERF_DEPENDENCIES += libunwind +endif + +ifeq ($(BR2_PACKAGE_NUMACTL),y) +PERF_DEPENDENCIES += numactl +endif + +ifeq ($(BR2_PACKAGE_ELFUTILS),y) +PERF_DEPENDENCIES += elfutils +else +PERF_MAKE_FLAGS += NO_LIBELF=1 NO_DWARF=1 +endif + +# O must be redefined here to overwrite the one used by Buildroot for +# out of tree build. We build perf in $(@D)/tools/perf/ and not just +# $(@D) so that it isn't built in the root directory of the kernel +# sources. +define PERF_BUILD_CMDS + $(Q)if test ! -f $(@D)/tools/perf/Makefile ; then \ + echo "Your kernel version is too old and does not have the perf tool." ; \ + echo "At least kernel 2.6.31 must be used." ; \ + exit 1 ; \ + fi + $(Q)if test "$(BR2_PACKAGE_ELFUTILS)" = "" ; then \ + if ! grep -q NO_LIBELF $(@D)/tools/perf/Makefile* ; then \ + if ! test -r $(@D)/tools/perf/config/Makefile ; then \ + echo "The perf tool in your kernel cannot be built without libelf." ; \ + echo "Either upgrade your kernel to >= 3.7, or enable the elfutils package." ; \ + exit 1 ; \ + fi \ + fi \ + fi + $(TARGET_MAKE_ENV) $(MAKE1) $(PERF_MAKE_FLAGS) \ + -C $(@D)/tools/perf O=$(@D)/tools/perf/ +endef + +# After installation, we remove the Perl and Python scripts from the +# target. +define PERF_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) $(PERF_MAKE_FLAGS) \ + -C $(@D)/tools/perf O=$(@D)/tools/perf/ install + $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/scripts/ + $(RM) -rf $(TARGET_DIR)/usr/libexec/perf-core/tests/ +endef diff --git a/linux/linux.mk b/linux/linux.mk new file mode 100644 index 0000000000..7e20255956 --- /dev/null +++ b/linux/linux.mk @@ -0,0 +1,455 @@ +################################################################################ +# +# Linux kernel target +# +################################################################################ + +LINUX_VERSION = $(call qstrip,$(BR2_LINUX_KERNEL_VERSION)) +LINUX_LICENSE = GPLv2 +LINUX_LICENSE_FILES = COPYING + +# Compute LINUX_SOURCE and LINUX_SITE from the configuration +ifeq ($(BR2_LINUX_KERNEL_CUSTOM_TARBALL),y) +LINUX_TARBALL = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION)) +LINUX_SITE = $(patsubst %/,%,$(dir $(LINUX_TARBALL))) +LINUX_SOURCE = $(notdir $(LINUX_TARBALL)) +BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE) +else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_LOCAL),y) +LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_LOCAL_PATH)) +LINUX_SITE_METHOD = local +else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y) +LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)) +LINUX_SITE_METHOD = git +else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_HG),y) +LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)) +LINUX_SITE_METHOD = hg +else +LINUX_SOURCE = linux-$(LINUX_VERSION).tar.xz +ifeq ($(BR2_LINUX_KERNEL_CUSTOM_VERSION),y) +BR_NO_CHECK_HASH_FOR += $(LINUX_SOURCE) +endif +# In X.Y.Z, get X and Y. We replace dots and dashes by spaces in order +# to use the $(word) function. We support versions such as 4.0, 3.1, +# 2.6.32, 2.6.32-rc1, 3.0-rc6, etc. +ifeq ($(findstring x2.6.,x$(LINUX_VERSION)),x2.6.) +LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v2.6 +else ifeq ($(findstring x3.,x$(LINUX_VERSION)),x3.) +LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v3.x +else ifeq ($(findstring x4.,x$(LINUX_VERSION)),x4.) +LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/v4.x +endif +# release candidates are in testing/ subdir +ifneq ($(findstring -rc,$(LINUX_VERSION)),) +LINUX_SITE := $(LINUX_SITE)/testing +endif # -rc +endif + +LINUX_PATCHES = $(call qstrip,$(BR2_LINUX_KERNEL_PATCH)) + +# We rely on the generic package infrastructure to download and apply +# remote patches (downloaded from ftp, http or https). For local +# patches, we can't rely on that infrastructure, because there might +# be directories in the patch list (unlike for other packages). +LINUX_PATCH = $(filter ftp://% http://% https://%,$(LINUX_PATCHES)) + +LINUX_INSTALL_IMAGES = YES +LINUX_DEPENDENCIES += host-kmod + +# host tools needed for kernel compression +ifeq ($(BR2_LINUX_KERNEL_LZ4),y) +LINUX_DEPENDENCIES += host-lz4 +else ifeq ($(BR2_LINUX_KERNEL_LZMA),y) +LINUX_DEPENDENCIES += host-lzma +else ifeq ($(BR2_LINUX_KERNEL_LZO),y) +LINUX_DEPENDENCIES += host-lzop +else ifeq ($(BR2_LINUX_KERNEL_XZ),y) +LINUX_DEPENDENCIES += host-xz +endif +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_GZIP) = CONFIG_KERNEL_GZIP +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZ4) = CONFIG_KERNEL_LZ4 +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZMA) = CONFIG_KERNEL_LZMA +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_LZO) = CONFIG_KERNEL_LZO +LINUX_COMPRESSION_OPT_$(BR2_LINUX_KERNEL_XZ) = CONFIG_KERNEL_XZ + +ifeq ($(BR2_LINUX_KERNEL_UBOOT_IMAGE),y) +LINUX_DEPENDENCIES += host-uboot-tools +endif + +LINUX_MAKE_FLAGS = \ + HOSTCC="$(HOSTCC)" \ + HOSTCFLAGS="$(HOSTCFLAGS)" \ + ARCH=$(KERNEL_ARCH) \ + INSTALL_MOD_PATH=$(TARGET_DIR) \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + DEPMOD=$(HOST_DIR)/sbin/depmod + +LINUX_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + BR_BINARIES_DIR=$(BINARIES_DIR) + +# Get the real Linux version, which tells us where kernel modules are +# going to be installed in the target filesystem. +LINUX_VERSION_PROBED = `$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelrelease 2>/dev/null` + +ifeq ($(BR2_LINUX_KERNEL_USE_INTREE_DTS),y) +KERNEL_DTS_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME)) +else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),y) +# We keep only the .dts files, so that the user can specify both .dts +# and .dtsi files in BR2_LINUX_KERNEL_CUSTOM_DTS_PATH. Both will be +# copied to arch//boot/dts, but only the .dts files will +# actually be generated as .dtb. +KERNEL_DTS_NAME = $(basename $(filter %.dts,$(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))))) +endif + +KERNEL_DTBS = $(addsuffix .dtb,$(KERNEL_DTS_NAME)) + +ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y) +LINUX_IMAGE_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_NAME)) +LINUX_TARGET_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_TARGET_NAME)) +ifeq ($(LINUX_IMAGE_NAME),) +LINUX_IMAGE_NAME = $(LINUX_TARGET_NAME) +endif +else +ifeq ($(BR2_LINUX_KERNEL_UIMAGE),y) +LINUX_IMAGE_NAME = uImage +else ifeq ($(BR2_LINUX_KERNEL_APPENDED_UIMAGE),y) +LINUX_IMAGE_NAME = uImage +else ifeq ($(BR2_LINUX_KERNEL_BZIMAGE),y) +LINUX_IMAGE_NAME = bzImage +else ifeq ($(BR2_LINUX_KERNEL_ZIMAGE),y) +LINUX_IMAGE_NAME = zImage +else ifeq ($(BR2_LINUX_KERNEL_ZIMAGE_EPAPR),y) +LINUX_IMAGE_NAME = zImage.epapr +else ifeq ($(BR2_LINUX_KERNEL_APPENDED_ZIMAGE),y) +LINUX_IMAGE_NAME = zImage +else ifeq ($(BR2_LINUX_KERNEL_CUIMAGE),y) +LINUX_IMAGE_NAME = cuImage.$(KERNEL_DTS_NAME) +else ifeq ($(BR2_LINUX_KERNEL_SIMPLEIMAGE),y) +LINUX_IMAGE_NAME = simpleImage.$(KERNEL_DTS_NAME) +else ifeq ($(BR2_LINUX_KERNEL_IMAGE),y) +LINUX_IMAGE_NAME = Image +else ifeq ($(BR2_LINUX_KERNEL_LINUX_BIN),y) +LINUX_IMAGE_NAME = linux.bin +else ifeq ($(BR2_LINUX_KERNEL_VMLINUX_BIN),y) +LINUX_IMAGE_NAME = vmlinux.bin +else ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y) +LINUX_IMAGE_NAME = vmlinux +else ifeq ($(BR2_LINUX_KERNEL_VMLINUZ),y) +LINUX_IMAGE_NAME = vmlinuz +else ifeq ($(BR2_LINUX_KERNEL_VMLINUZ_BIN),y) +LINUX_IMAGE_NAME = vmlinuz.bin +endif +# The if-else blocks above are all the image types we know of, and all +# come from a Kconfig choice, so we know we have LINUX_IMAGE_NAME set +# to something +LINUX_TARGET_NAME = $(LINUX_IMAGE_NAME) +endif + +LINUX_KERNEL_UIMAGE_LOADADDR = $(call qstrip,$(BR2_LINUX_KERNEL_UIMAGE_LOADADDR)) +ifneq ($(LINUX_KERNEL_UIMAGE_LOADADDR),) +LINUX_MAKE_FLAGS += LOADADDR="$(LINUX_KERNEL_UIMAGE_LOADADDR)" +endif + +# Compute the arch path, since i386 and x86_64 are in arch/x86 and not +# in arch/$(KERNEL_ARCH). Even if the kernel creates symbolic links +# for bzImage, arch/i386 and arch/x86_64 do not exist when copying the +# defconfig file. +ifeq ($(KERNEL_ARCH),i386) +KERNEL_ARCH_PATH = $(LINUX_DIR)/arch/x86 +else ifeq ($(KERNEL_ARCH),x86_64) +KERNEL_ARCH_PATH = $(LINUX_DIR)/arch/x86 +else +KERNEL_ARCH_PATH = $(LINUX_DIR)/arch/$(KERNEL_ARCH) +endif + +ifeq ($(BR2_LINUX_KERNEL_VMLINUX),y) +LINUX_IMAGE_PATH = $(LINUX_DIR)/$(LINUX_IMAGE_NAME) +else ifeq ($(BR2_LINUX_KERNEL_VMLINUZ),y) +LINUX_IMAGE_PATH = $(LINUX_DIR)/$(LINUX_IMAGE_NAME) +else ifeq ($(BR2_LINUX_KERNEL_VMLINUZ_BIN),y) +LINUX_IMAGE_PATH = $(LINUX_DIR)/$(LINUX_IMAGE_NAME) +else +LINUX_IMAGE_PATH = $(KERNEL_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME) +endif # BR2_LINUX_KERNEL_VMLINUX + +define LINUX_APPLY_LOCAL_PATCHES + for p in $(filter-out ftp://% http://% https://%,$(LINUX_PATCHES)) ; do \ + if test -d $$p ; then \ + $(APPLY_PATCHES) $(@D) $$p \*.patch || exit 1 ; \ + else \ + $(APPLY_PATCHES) $(@D) `dirname $$p` `basename $$p` || exit 1; \ + fi \ + done +endef + +LINUX_POST_PATCH_HOOKS += LINUX_APPLY_LOCAL_PATCHES + +# Older linux kernels use deprecated perl constructs in timeconst.pl +# that were removed for perl 5.22+ so it breaks on newer distributions +# Try a dry-run patch to see if this applies, if it does go ahead +define LINUX_TRY_PATCH_TIMECONST + @if patch -p1 --dry-run -f -s -d $(@D) <$(LINUX_PKGDIR)/0001-timeconst.pl-Eliminate-Perl-warning.patch.conditional >/dev/null ; then \ + $(APPLY_PATCHES) $(@D) $(LINUX_PKGDIR) 0001-timeconst.pl-Eliminate-Perl-warning.patch.conditional ; \ + fi +endef +LINUX_POST_PATCH_HOOKS += LINUX_TRY_PATCH_TIMECONST + +ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y) +LINUX_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG))_defconfig +else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y) +LINUX_KCONFIG_FILE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE)) +endif +LINUX_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES)) +LINUX_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig +LINUX_KCONFIG_OPTS = $(LINUX_MAKE_FLAGS) + +# If no package has yet set it, set it from the Kconfig option +LINUX_NEEDS_MODULES ?= $(BR2_LINUX_NEEDS_MODULES) + +define LINUX_KCONFIG_FIXUP_CMDS + $(if $(LINUX_NEEDS_MODULES), + $(call KCONFIG_ENABLE_OPT,CONFIG_MODULES,$(@D)/.config)) + $(call KCONFIG_ENABLE_OPT,$(LINUX_COMPRESSION_OPT_y),$(@D)/.config) + $(foreach opt, $(LINUX_COMPRESSION_OPT_), + $(call KCONFIG_DISABLE_OPT,$(opt),$(@D)/.config) + ) + $(if $(BR2_arm)$(BR2_armeb), + $(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config)) + $(if $(BR2_TARGET_ROOTFS_CPIO), + $(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config)) + # As the kernel gets compiled before root filesystems are + # built, we create a fake cpio file. It'll be + # replaced later by the real cpio archive, and the kernel will be + # rebuilt using the linux-rebuild-with-initramfs target. + $(if $(BR2_TARGET_ROOTFS_INITRAMFS), + touch $(BINARIES_DIR)/rootfs.cpio + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,"$${BR_BINARIES_DIR}/rootfs.cpio",$(@D)/.config) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config) + $(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config)) + $(if $(BR2_ROOTFS_DEVICE_CREATION_STATIC),, + $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config)) + $(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV), + $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config)) + $(if $(BR2_PACKAGE_KTAP), + $(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_ENABLE_DEFAULT_TRACERS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER,$(@D)/.config)) + $(if $(BR2_PACKAGE_SYSTEMD), + $(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_XATTR,$(@D)/.config)) + $(if $(BR2_PACKAGE_SMACK), + $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_SMACK,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_SECURITY_NETWORK,$(@D)/.config)) + $(if $(BR2_PACKAGE_IPTABLES), + $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_IPTABLES,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_IP_NF_FILTER,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_XTABLES,$(@D)/.config)) + $(if $(BR2_PACKAGE_XTABLES_ADDONS), + $(call KCONFIG_ENABLE_OPT,CONFIG_NETFILTER_ADVANCED,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_NF_CONNTRACK_MARK,$(@D)/.config)) + $(if $(BR2_LINUX_KERNEL_APPENDED_DTB), + $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config)) + $(if $(BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV), + $(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV,$(@D)/.config)) +endef + +ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y) +ifeq ($(BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT),) +define LINUX_BUILD_DTB + $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(KERNEL_DTBS) +endef +ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),) +define LINUX_INSTALL_DTB + # dtbs moved from arch//boot to arch//boot/dts since 3.8-rc1 + cp $(addprefix \ + $(KERNEL_ARCH_PATH)/boot/$(if $(wildcard \ + $(addprefix $(KERNEL_ARCH_PATH)/boot/dts/,$(KERNEL_DTBS))),dts/),$(KERNEL_DTBS)) \ + $(1) +endef +endif # BR2_LINUX_KERNEL_APPENDED_DTB +endif # BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT +endif # BR2_LINUX_KERNEL_DTS_SUPPORT + +ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),y) +# dtbs moved from arch/$ARCH/boot to arch/$ARCH/boot/dts since 3.8-rc1 +define LINUX_APPEND_DTB + (cd $(KERNEL_ARCH_PATH)/boot; \ + for dtb in $(KERNEL_DTS_NAME); do \ + if test -e $${dtb}.dtb ; then \ + dtbpath=$${dtb}.dtb ; \ + else \ + dtbpath=dts/$${dtb}.dtb ; \ + fi ; \ + cat zImage $${dtbpath} > zImage.$${dtb} || exit 1; \ + done) +endef +ifeq ($(BR2_LINUX_KERNEL_APPENDED_UIMAGE),y) +# We need to generate a new u-boot image that takes into +# account the extra-size added by the device tree at the end +# of the image. To do so, we first need to retrieve both load +# address and entry point for the kernel from the already +# generate uboot image before using mkimage -l. +LINUX_APPEND_DTB += ; \ + MKIMAGE_ARGS=`$(MKIMAGE) -l $(LINUX_IMAGE_PATH) |\ + sed -n -e 's/Image Name:[ ]*\(.*\)/-n \1/p' -e 's/Load Address:/-a/p' -e 's/Entry Point:/-e/p'`; \ + for dtb in $(KERNEL_DTS_NAME); do \ + $(MKIMAGE) -A $(MKIMAGE_ARCH) -O linux \ + -T kernel -C none $${MKIMAGE_ARGS} \ + -d $(KERNEL_ARCH_PATH)/boot/zImage.$${dtb} $(LINUX_IMAGE_PATH).$${dtb}; \ + done +endif +endif + +# Compilation. We make sure the kernel gets rebuilt when the +# configuration has changed. +define LINUX_BUILD_CMDS + $(if $(BR2_LINUX_KERNEL_USE_CUSTOM_DTS), + cp -f $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)) $(KERNEL_ARCH_PATH)/boot/dts/) + $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME) + @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ + $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) modules ; \ + fi + $(LINUX_BUILD_DTB) + $(LINUX_APPEND_DTB) +endef + +ifeq ($(BR2_LINUX_KERNEL_APPENDED_DTB),y) +# When a DTB was appended, install the potential several images with +# appended DTBs. +define LINUX_INSTALL_IMAGE + mkdir -p $(1) + cp $(KERNEL_ARCH_PATH)/boot/$(LINUX_IMAGE_NAME).* $(1) +endef +else +# Otherwise, just install the unique image generated by the kernel +# build process. +define LINUX_INSTALL_IMAGE + $(INSTALL) -m 0644 -D $(LINUX_IMAGE_PATH) $(1)/$(LINUX_IMAGE_NAME) +endef +endif + +ifeq ($(BR2_LINUX_KERNEL_INSTALL_TARGET),y) +define LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET + $(call LINUX_INSTALL_IMAGE,$(TARGET_DIR)/boot) + $(call LINUX_INSTALL_DTB,$(TARGET_DIR)/boot) +endef +endif + +define LINUX_INSTALL_HOST_TOOLS + # Installing dtc (device tree compiler) as host tool, if selected + if grep -q "CONFIG_DTC=y" $(@D)/.config; then \ + $(INSTALL) -D -m 0755 $(@D)/scripts/dtc/dtc $(HOST_DIR)/usr/bin/linux-dtc ; \ + fi +endef + + +define LINUX_INSTALL_IMAGES_CMDS + $(call LINUX_INSTALL_IMAGE,$(BINARIES_DIR)) + $(call LINUX_INSTALL_DTB,$(BINARIES_DIR)) +endef + +define LINUX_INSTALL_TARGET_CMDS + $(LINUX_INSTALL_KERNEL_IMAGE_TO_TARGET) + # Install modules and remove symbolic links pointing to build + # directories, not relevant on the target + @if grep -q "CONFIG_MODULES=y" $(@D)/.config; then \ + $(LINUX_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) modules_install; \ + rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/build ; \ + rm -f $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/source ; \ + fi + $(LINUX_INSTALL_HOST_TOOLS) +endef + +# Include all our extensions and tools definitions. +# +# Note: our package infrastructure uses the full-path of the last-scanned +# Makefile to determine what package we're currently defining, using the +# last directory component in the path. As such, including other Makefile, +# like below, before we call one of the *-package macro is usally not +# working. +# However, since the files we include here are in the same directory as +# the current Makefile, we are OK. But this is a hard requirement: files +# included here *must* be in the same directory! +include $(sort $(wildcard linux/linux-ext-*.mk)) +include $(sort $(wildcard linux/linux-tool-*.mk)) + +LINUX_PATCH_DEPENDENCIES += $(foreach ext,$(LINUX_EXTENSIONS),\ + $(if $(BR2_LINUX_KERNEL_EXT_$(call UPPERCASE,$(ext))),$(ext))) + +LINUX_PRE_PATCH_HOOKS += $(foreach ext,$(LINUX_EXTENSIONS),\ + $(if $(BR2_LINUX_KERNEL_EXT_$(call UPPERCASE,$(ext))),\ + $(call UPPERCASE,$(ext))_PREPARE_KERNEL)) + +# Install Linux kernel tools in the staging directory since some tools +# may install shared libraries and headers (e.g. cpupower). The kernel +# image is NOT installed in the staging directory. +LINUX_INSTALL_STAGING = YES + +LINUX_DEPENDENCIES += $(foreach tool,$(LINUX_TOOLS),\ + $(if $(BR2_LINUX_KERNEL_TOOL_$(call UPPERCASE,$(tool))),\ + $($(call UPPERCASE,$(tool))_DEPENDENCIES))) + +LINUX_POST_BUILD_HOOKS += $(foreach tool,$(LINUX_TOOLS),\ + $(if $(BR2_LINUX_KERNEL_TOOL_$(call UPPERCASE,$(tool))),\ + $(call UPPERCASE,$(tool))_BUILD_CMDS)) + +LINUX_POST_INSTALL_STAGING_HOOKS += $(foreach tool,$(LINUX_TOOLS),\ + $(if $(BR2_LINUX_KERNEL_TOOL_$(call UPPERCASE,$(tool))),\ + $(call UPPERCASE,$(tool))_INSTALL_STAGING_CMDS)) + +LINUX_POST_INSTALL_TARGET_HOOKS += $(foreach tool,$(LINUX_TOOLS),\ + $(if $(BR2_LINUX_KERNEL_TOOL_$(call UPPERCASE,$(tool))),\ + $(call UPPERCASE,$(tool))_INSTALL_TARGET_CMDS)) + +# Checks to give errors that the user can understand +ifeq ($(BR_BUILDING),y) + +ifeq ($(BR2_LINUX_KERNEL_USE_DEFCONFIG),y) +# We must use the user-supplied kconfig value, because +# LINUX_KCONFIG_DEFCONFIG will at least contain the +# trailing _defconfig +ifeq ($(call qstrip,$(BR2_LINUX_KERNEL_DEFCONFIG)),) +$(error No kernel defconfig name specified, check your BR2_LINUX_KERNEL_DEFCONFIG setting) +endif +endif + +ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG),y) +ifeq ($(LINUX_KCONFIG_FILE),) +$(error No kernel configuration file specified, check your BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE setting) +endif +endif + +ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT)$(KERNEL_DTS_NAME),y) +$(error No kernel device tree source specified, check your \ +BR2_LINUX_KERNEL_USE_INTREE_DTS / BR2_LINUX_KERNEL_USE_CUSTOM_DTS settings) +endif + +endif # BR_BUILDING + +$(eval $(kconfig-package)) + +# Support for rebuilding the kernel after the cpio archive has +# been generated in $(BINARIES_DIR)/rootfs.cpio. +$(LINUX_DIR)/.stamp_initramfs_rebuilt: $(LINUX_DIR)/.stamp_target_installed $(LINUX_DIR)/.stamp_images_installed $(BINARIES_DIR)/rootfs.cpio + @$(call MESSAGE,"Rebuilding kernel with initramfs") + # Build the kernel. + $(LINUX_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME) + $(LINUX_APPEND_DTB) + # Copy the kernel image to its final destination + cp $(LINUX_IMAGE_PATH) $(BINARIES_DIR) + # If there is a .ub file copy it to the final destination + test ! -f $(LINUX_IMAGE_PATH).ub || cp $(LINUX_IMAGE_PATH).ub $(BINARIES_DIR) + $(Q)touch $@ + +# The initramfs building code must make sure this target gets called +# after it generated the initramfs list of files. +linux-rebuild-with-initramfs: $(LINUX_DIR)/.stamp_initramfs_rebuilt diff --git a/package/Config.in b/package/Config.in new file mode 100644 index 0000000000..177a67cf0c --- /dev/null +++ b/package/Config.in @@ -0,0 +1,1708 @@ +menu "Target packages" + + source "package/busybox/Config.in" + source "package/skeleton/Config.in" + +menu "Audio and video applications" + source "package/alsa-utils/Config.in" + source "package/aumix/Config.in" + source "package/bellagio/Config.in" + source "package/dvblast/Config.in" + source "package/dvdauthor/Config.in" + source "package/dvdrw-tools/Config.in" + source "package/espeak/Config.in" + source "package/faad2/Config.in" + source "package/ffmpeg/Config.in" + source "package/flac/Config.in" + source "package/flite/Config.in" + source "package/gmrender-resurrect/Config.in" + source "package/gstreamer/Config.in" + source "package/gstreamer1/Config.in" + source "package/jack2/Config.in" + source "package/kodi/Config.in" + source "package/lame/Config.in" + source "package/madplay/Config.in" + source "package/miraclecast/Config.in" + source "package/mjpegtools/Config.in" + source "package/modplugtools/Config.in" + source "package/mpd/Config.in" + source "package/mpd-mpc/Config.in" + source "package/mpg123/Config.in" + source "package/mplayer/Config.in" + source "package/mpv/Config.in" + source "package/multicat/Config.in" + source "package/musepack/Config.in" + source "package/ncmpc/Config.in" + source "package/on2-8170-libs/Config.in" + source "package/opus-tools/Config.in" + source "package/pulseaudio/Config.in" + source "package/sox/Config.in" + source "package/squeezelite/Config.in" + source "package/tidsp-binaries/Config.in" + source "package/tovid/Config.in" + source "package/tstools/Config.in" + source "package/twolame/Config.in" + source "package/upmpdcli/Config.in" + source "package/v4l2grab/Config.in" + source "package/vlc/Config.in" + source "package/vorbis-tools/Config.in" + source "package/wavpack/Config.in" + source "package/yavta/Config.in" + source "package/ympd/Config.in" +endmenu + +menu "Compressors and decompressors" + source "package/bzip2/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/gzip/Config.in" +endif + source "package/lz4/Config.in" + source "package/lzip/Config.in" + source "package/lzop/Config.in" + source "package/unrar/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/unzip/Config.in" +endif + source "package/xz/Config.in" + source "package/zip/Config.in" +endmenu + +menu "Debugging, profiling and benchmark" + source "package/blktrace/Config.in" + source "package/bonnie/Config.in" + source "package/cache-calibrator/Config.in" + source "package/dhrystone/Config.in" + source "package/dmalloc/Config.in" + source "package/dropwatch/Config.in" + source "package/dstat/Config.in" + source "package/dt/Config.in" + source "package/duma/Config.in" + source "package/fio/Config.in" + source "package/gdb/Config.in" + source "package/google-breakpad/Config.in" + source "package/iozone/Config.in" + source "package/kexec/Config.in" + source "package/kexec-lite/Config.in" + source "package/ktap/Config.in" + source "package/kyua/Config.in" + source "package/latencytop/Config.in" + source "package/lmbench/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/lsof/Config.in" +endif + source "package/ltp-testsuite/Config.in" + source "package/ltrace/Config.in" + source "package/lttng-babeltrace/Config.in" + source "package/lttng-modules/Config.in" + source "package/lttng-tools/Config.in" + source "package/mcelog/Config.in" + source "package/memstat/Config.in" + source "package/netperf/Config.in" + source "package/netsniff-ng/Config.in" + source "package/oprofile/Config.in" + source "package/pax-utils/Config.in" + source "package/pv/Config.in" + source "package/racehound/Config.in" + source "package/ramsmp/Config.in" + source "package/ramspeed/Config.in" + source "package/rt-tests/Config.in" + source "package/spidev_test/Config.in" + source "package/strace/Config.in" + source "package/stress/Config.in" + source "package/stress-ng/Config.in" + source "package/sysdig/Config.in" + source "package/sysprof/Config.in" + source "package/tinymembench/Config.in" + source "package/trace-cmd/Config.in" + source "package/trinity/Config.in" + source "package/valgrind/Config.in" + source "package/whetstone/Config.in" +endmenu + +menu "Development tools" + source "package/binutils/Config.in" + source "package/bsdiff/Config.in" + source "package/bustle/Config.in" + source "package/check/Config.in" + source "package/cmake/Config.in" + source "package/cppunit/Config.in" + source "package/cvs/Config.in" + source "package/cxxtest/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/diffutils/Config.in" + source "package/dos2unix/Config.in" + source "package/findutils/Config.in" +endif + source "package/flex/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/gawk/Config.in" +endif + source "package/gettext/Config.in" + source "package/git/Config.in" + source "package/gperf/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/grep/Config.in" +endif + source "package/intltool/Config.in" + source "package/jq/Config.in" + source "package/libtool/Config.in" + source "package/make/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/patch/Config.in" +endif + source "package/pkgconf/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/sed/Config.in" +endif + source "package/sstrip/Config.in" + source "package/subversion/Config.in" + source "package/tree/Config.in" + source "package/yasm/Config.in" +endmenu + +menu "Filesystem and flash utilities" + source "package/autofs/Config.in" + source "package/btrfs-progs/Config.in" + source "package/cifs-utils/Config.in" + source "package/cpio/Config.in" + source "package/cramfs/Config.in" + source "package/curlftpfs/Config.in" + source "package/dosfstools/Config.in" + source "package/e2fsprogs/Config.in" + source "package/e2tools/Config.in" + source "package/ecryptfs-utils/Config.in" + source "package/exfat/Config.in" + source "package/exfat-utils/Config.in" + source "package/f2fs-tools/Config.in" + source "package/flashbench/Config.in" + source "package/genext2fs/Config.in" + source "package/genpart/Config.in" + source "package/genromfs/Config.in" + source "package/makedevs/Config.in" + source "package/mmc-utils/Config.in" + source "package/mtd/Config.in" + source "package/mtools/Config.in" + source "package/nfs-utils/Config.in" + source "package/ntfs-3g/Config.in" + source "package/simicsfs/Config.in" + source "package/sp-oops-extract/Config.in" + source "package/squashfs/Config.in" + source "package/sshfs/Config.in" + source "package/sunxi-tools/Config.in" + source "package/unionfs/Config.in" + source "package/xfsprogs/Config.in" +endmenu + +menu "Fonts, cursors, icons, sounds and themes" + +comment "Cursors" + source "package/comix-cursors/Config.in" + source "package/obsidian-cursors/Config.in" + +comment "Fonts" + source "package/bitstream-vera/Config.in" + source "package/cantarell/Config.in" + source "package/dejavu/Config.in" + source "package/font-awesome/Config.in" + source "package/ghostscript-fonts/Config.in" + source "package/inconsolata/Config.in" + source "package/liberation/Config.in" + +comment "Icons" + source "package/adwaita-icon-theme/Config.in" + source "package/google-material-design-icons/Config.in" + source "package/hicolor-icon-theme/Config.in" + +comment "Sounds" + source "package/sound-theme-borealis/Config.in" + source "package/sound-theme-freedesktop/Config.in" + +comment "Themes" + source "package/gtk2-engines/Config.in" + +endmenu + +menu "Games" + source "package/chocolate-doom/Config.in" + source "package/doom-wad/Config.in" + source "package/gnuchess/Config.in" + source "package/lbreakout2/Config.in" + source "package/ltris/Config.in" + source "package/opentyrian/Config.in" + source "package/opentyrian-data/Config.in" + source "package/prboom/Config.in" + source "package/rubix/Config.in" + source "package/sl/Config.in" +endmenu + +menu "Graphic libraries and applications (graphic/text)" + +comment "Graphic applications" + source "package/expedite/Config.in" + source "package/fswebcam/Config.in" + source "package/glmark2/Config.in" + source "package/gnuplot/Config.in" + source "package/jhead/Config.in" + source "package/mesa3d-demos/Config.in" + source "package/qt5cinex/Config.in" + source "package/rrdtool/Config.in" + +comment "Graphic libraries" + source "package/cegui06/Config.in" + source "package/directfb/Config.in" + source "package/directfb-examples/Config.in" + source "package/efl/Config.in" + source "package/elementary/Config.in" + source "package/fbdump/Config.in" + source "package/fbgrab/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/fbset/Config.in" +endif + source "package/fb-test-app/Config.in" + source "package/fbterm/Config.in" + source "package/fbv/Config.in" + source "package/freerdp/Config.in" + source "package/imagemagick/Config.in" + source "package/linux-fusion/Config.in" + source "package/lite/Config.in" + source "package/mesa3d/Config.in" + source "package/mesa3d-headers/Config.in" + source "package/ocrad/Config.in" + source "package/psplash/Config.in" + source "package/sdl/Config.in" + source "package/sdl_gfx/Config.in" + source "package/sdl_image/Config.in" + source "package/sdl_mixer/Config.in" + source "package/sdl_net/Config.in" + source "package/sdl_sound/Config.in" + source "package/sdl_ttf/Config.in" + source "package/sdl2/Config.in" + +comment "Other GUIs" + source "package/qt/Config.in" + source "package/qt5/Config.in" +if BR2_PACKAGE_QT || BR2_PACKAGE_QT5 +comment "QT libraries and helper libraries" + source "package/grantlee/Config.in" + source "package/qextserialport/Config.in" + source "package/qjson/Config.in" + source "package/qtuio/Config.in" + source "package/quazip/Config.in" + source "package/qwt/Config.in" +endif + source "package/weston/Config.in" + source "package/x11r7/Config.in" + +comment "X applications" + source "package/alsamixergui/Config.in" + source "package/apitrace/Config.in" + source "package/dillo/Config.in" + source "package/docker/Config.in" + source "package/feh/Config.in" + source "package/gmpc/Config.in" + source "package/gqview/Config.in" + source "package/gtkperf/Config.in" + source "package/leafpad/Config.in" + source "package/midori/Config.in" + source "package/pcmanfm/Config.in" + source "package/qt-webkit-kiosk/Config.in" + source "package/rdesktop/Config.in" + source "package/synergy/Config.in" + source "package/torsmo/Config.in" + source "package/wmctrl/Config.in" + source "package/x11vnc/Config.in" + source "package/xdotool/Config.in" + source "package/xscreensaver/Config.in" + source "package/xterm/Config.in" + source "package/xvkbd/Config.in" + source "package/yad/Config.in" + +comment "X libraries and helper libraries" + source "package/libsexy/Config.in" + source "package/x11r7/xkeyboard-config/Config.in" + +comment "X window managers" + source "package/enlightenment/Config.in" + source "package/fluxbox/Config.in" + source "package/matchbox/Config.in" + source "package/metacity/Config.in" + source "package/openbox/Config.in" +endmenu + +menu "Hardware handling" +menu "Firmware" + source "package/am33x-cm3/Config.in" + source "package/b43-firmware/Config.in" + source "package/linux-firmware/Config.in" + source "package/rpi-firmware/Config.in" + source "package/sunxi-boards/Config.in" + source "package/ux500-firmware/Config.in" + source "package/wilc1000-firmware/Config.in" + source "package/zd1211-firmware/Config.in" +endmenu + source "package/a10disp/Config.in" + source "package/acpid/Config.in" + source "package/aer-inject/Config.in" + source "package/am335x-pru-package/Config.in" + source "package/avrdude/Config.in" + source "package/bcache-tools/Config.in" + source "package/biosdevname/Config.in" + source "package/cc-tool/Config.in" + source "package/cdrkit/Config.in" + source "package/cryptsetup/Config.in" + source "package/cwiid/Config.in" + source "package/dbus/Config.in" + source "package/dbus-cpp/Config.in" + source "package/dbus-glib/Config.in" + source "package/dbus-python/Config.in" + source "package/dbus-triggerd/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/devmem2/Config.in" +endif + source "package/dmidecode/Config.in" + source "package/dmraid/Config.in" + source "package/dtv-scan-tables/Config.in" + source "package/dvb-apps/Config.in" + source "package/dvbsnoop/Config.in" + source "package/edid-decode/Config.in" + source "package/eeprog/Config.in" + source "package/eudev/Config.in" + source "package/evemu/Config.in" + source "package/evtest/Config.in" + source "package/fan-ctrl/Config.in" + source "package/fbtft/Config.in" + source "package/fconfig/Config.in" + source "package/fis/Config.in" + source "package/flashrom/Config.in" + source "package/fmtools/Config.in" + source "package/freescale-imx/Config.in" + source "package/fxload/Config.in" + source "package/gadgetfs-test/Config.in" + source "package/gpm/Config.in" + source "package/gpsd/Config.in" + source "package/gptfdisk/Config.in" + source "package/gvfs/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/hdparm/Config.in" +endif + source "package/hwdata/Config.in" + source "package/hwloc/Config.in" + source "package/i2c-tools/Config.in" + source "package/i7z/Config.in" + source "package/input-event-daemon/Config.in" + source "package/input-tools/Config.in" + source "package/intel-microcode/Config.in" + source "package/iostat/Config.in" + source "package/ipmitool/Config.in" + source "package/ipmiutil/Config.in" + source "package/iqvlinux/Config.in" + source "package/irda-utils/Config.in" + source "package/iucode-tool/Config.in" + source "package/kbd/Config.in" + source "package/lcdproc/Config.in" + source "package/libump/Config.in" + source "package/linux-backports/Config.in" + source "package/lirc-tools/Config.in" + source "package/lm-sensors/Config.in" + source "package/lshw/Config.in" + source "package/lsuio/Config.in" + source "package/lvm2/Config.in" + source "package/mali-t76x/Config.in" + source "package/mdadm/Config.in" + source "package/memtest86/Config.in" + source "package/memtester/Config.in" + source "package/minicom/Config.in" + source "package/msr-tools/Config.in" + source "package/nanocom/Config.in" + source "package/neard/Config.in" + source "package/nvidia-driver/Config.in" + source "package/nvidia-tegra23/Config.in" + source "package/nvme/Config.in" + source "package/ofono/Config.in" + source "package/ola/Config.in" + source "package/on2-8170-modules/Config.in" + source "package/open2300/Config.in" + source "package/openipmi/Config.in" + source "package/openocd/Config.in" + source "package/openpowerlink/Config.in" + source "package/owl-linux/Config.in" + source "package/parted/Config.in" + source "package/pciutils/Config.in" + source "package/picocom/Config.in" + source "package/pifmrds/Config.in" + source "package/powertop/Config.in" + source "package/pps-tools/Config.in" + source "package/pulseview/Config.in" + source "package/read-edid/Config.in" + source "package/rfkill/Config.in" + source "package/rng-tools/Config.in" + source "package/rpi-armmem/Config.in" + source "package/rpi-userland/Config.in" + source "package/rtl8188eu/Config.in" + source "package/rtl8821au/Config.in" + source "package/sane-backends/Config.in" + source "package/sdparm/Config.in" + source "package/setserial/Config.in" + source "package/sg3_utils/Config.in" + source "package/sigrok-cli/Config.in" + source "package/sispmctl/Config.in" + source "package/smartmontools/Config.in" + source "package/smstools3/Config.in" + source "package/snowball-hdmiservice/Config.in" + source "package/spi-tools/Config.in" + source "package/sredird/Config.in" + source "package/statserial/Config.in" + source "package/stm32flash/Config.in" + source "package/sunxi-cedarx/Config.in" + source "package/sunxi-mali/Config.in" + source "package/sunxi-mali-prop/Config.in" + source "package/sysstat/Config.in" + source "package/targetcli-fb/Config.in" + source "package/ti-gfx/Config.in" + source "package/ti-uim/Config.in" + source "package/ti-utils/Config.in" + source "package/triggerhappy/Config.in" + source "package/uboot-tools/Config.in" + source "package/ubus/Config.in" + source "package/udev/Config.in" + source "package/udisks/Config.in" + source "package/usb_modeswitch/Config.in" + source "package/usb_modeswitch_data/Config.in" + source "package/usbmount/Config.in" + source "package/usbutils/Config.in" + source "package/w_scan/Config.in" + source "package/wf111/Config.in" + source "package/wipe/Config.in" + source "package/xorriso/Config.in" +endmenu + +menu "Interpreter languages and scripting" + source "package/enscript/Config.in" + source "package/erlang/Config.in" +if BR2_PACKAGE_ERLANG +menu "Erlang libraries/modules" + source "package/erlang-goldrush/Config.in" + source "package/erlang-lager/Config.in" + source "package/erlang-p1-cache-tab/Config.in" + source "package/erlang-p1-iconv/Config.in" + source "package/erlang-p1-sip/Config.in" + source "package/erlang-p1-stringprep/Config.in" + source "package/erlang-p1-stun/Config.in" + source "package/erlang-p1-tls/Config.in" + source "package/erlang-p1-utils/Config.in" + source "package/erlang-p1-xml/Config.in" + source "package/erlang-p1-yaml/Config.in" + source "package/erlang-p1-zlib/Config.in" +endmenu +endif + source "package/gauche/Config.in" + source "package/guile/Config.in" + source "package/haserl/Config.in" + source "package/jamvm/Config.in" + source "package/jimtcl/Config.in" + source "package/lua/Config.in" + source "package/luainterpreter/Config.in" + source "package/luajit/Config.in" +if BR2_PACKAGE_HAS_LUAINTERPRETER && !BR2_STATIC_LIBS +# lua modules are dynamically loaded, so not available on static builds +menu "Lua libraries/modules" + source "package/cgilua/Config.in" + source "package/copas/Config.in" + source "package/cosmo/Config.in" + source "package/coxpcall/Config.in" + source "package/dado/Config.in" + source "package/lbase64/Config.in" + source "package/ljlinenoise/Config.in" + source "package/ljsyscall/Config.in" + source "package/lpeg/Config.in" + source "package/lpty/Config.in" + source "package/lrandom/Config.in" + source "package/lsqlite3/Config.in" + source "package/lua-cjson/Config.in" + source "package/lua-coat/Config.in" + source "package/lua-coatpersistent/Config.in" + source "package/lua-csnappy/Config.in" + source "package/lua-ev/Config.in" + source "package/lua-iconv/Config.in" + source "package/lua-messagepack/Config.in" + source "package/lua-msgpack-native/Config.in" + source "package/lua-periphery/Config.in" + source "package/lua-testmore/Config.in" + source "package/luabitop/Config.in" + source "package/luacrypto/Config.in" + source "package/luaexpat/Config.in" + source "package/luaexpatutils/Config.in" + source "package/luafilesystem/Config.in" + source "package/luajson/Config.in" + source "package/lualogging/Config.in" + source "package/luaposix/Config.in" + source "package/luasec/Config.in" + source "package/luasocket/Config.in" + source "package/luasql-sqlite3/Config.in" + source "package/lunit/Config.in" + source "package/luv/Config.in" + source "package/luvi/Config.in" + source "package/lzlib/Config.in" + source "package/orbit/Config.in" + source "package/rings/Config.in" + source "package/turbolua/Config.in" + source "package/wsapi/Config.in" + source "package/xavante/Config.in" +endmenu +endif + source "package/lutok/Config.in" + source "package/micropython/Config.in" + source "package/micropython-lib/Config.in" + source "package/moarvm/Config.in" + source "package/mono/Config.in" +if BR2_PACKAGE_MONO +menu "Mono libraries/modules" + source "package/mono-gtksharp3/Config.in" +endmenu +endif + source "package/nodejs/Config.in" + source "package/perl/Config.in" +if BR2_PACKAGE_PERL +menu "Perl libraries/modules" + source "package/perl-crypt-openssl-random/Config.in" + source "package/perl-crypt-openssl-rsa/Config.in" + source "package/perl-datetime-tiny/Config.in" + source "package/perl-db-file/Config.in" + source "package/perl-digest-hmac/Config.in" + source "package/perl-digest-sha1/Config.in" + source "package/perl-encode-detect/Config.in" + source "package/perl-encode-locale/Config.in" + source "package/perl-file-listing/Config.in" + source "package/perl-file-util/Config.in" + source "package/perl-gd/Config.in" + source "package/perl-gdgraph/Config.in" + source "package/perl-gdtextutil/Config.in" + source "package/perl-html-parser/Config.in" + source "package/perl-html-tagset/Config.in" + source "package/perl-http-cookies/Config.in" + source "package/perl-http-daemon/Config.in" + source "package/perl-http-date/Config.in" + source "package/perl-http-message/Config.in" + source "package/perl-http-negotiate/Config.in" + source "package/perl-io-html/Config.in" + source "package/perl-io-socket-ssl/Config.in" + source "package/perl-json-tiny/Config.in" + source "package/perl-libwww-perl/Config.in" + source "package/perl-lwp-mediatypes/Config.in" + source "package/perl-mail-dkim/Config.in" + source "package/perl-mailtools/Config.in" + source "package/perl-mime-base64/Config.in" + source "package/perl-mojolicious/Config.in" + source "package/perl-net-dns/Config.in" + source "package/perl-net-http/Config.in" + source "package/perl-net-ssleay/Config.in" + source "package/perl-netaddr-ip/Config.in" + source "package/perl-path-tiny/Config.in" + source "package/perl-time-hires/Config.in" + source "package/perl-timedate/Config.in" + source "package/perl-try-tiny/Config.in" + source "package/perl-uri/Config.in" + source "package/perl-www-robotrules/Config.in" + source "package/perl-xml-libxml/Config.in" + source "package/perl-xml-namespacesupport/Config.in" + source "package/perl-xml-sax/Config.in" + source "package/perl-xml-sax-base/Config.in" +endmenu +endif + source "package/php/Config.in" +if BR2_PACKAGE_PHP +if !BR2_STATIC_LIBS +menu "External php extensions" + source "package/php-geoip/Config.in" + source "package/php-gnupg/Config.in" + source "package/php-imagick/Config.in" + source "package/php-memcached/Config.in" + source "package/php-ssh2/Config.in" + source "package/php-yaml/Config.in" + source "package/php-zmq/Config.in" +endmenu +endif +if BR2_STATIC_LIBS +comment "External PHP extensions need a toolchain w/ dynamic library" +endif +endif + source "package/python/Config.in" + source "package/python3/Config.in" +if BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 +menu "External python modules" + source "package/python-alsaaudio/Config.in" + source "package/python-autobahn/Config.in" + source "package/python-backports-abc/Config.in" + source "package/python-beautifulsoup4/Config.in" + source "package/python-bottle/Config.in" + source "package/python-can/Config.in" + source "package/python-cbor/Config.in" + source "package/python-certifi/Config.in" + source "package/python-cffi/Config.in" + source "package/python-characteristic/Config.in" + source "package/python-cheetah/Config.in" + source "package/python-cherrypy/Config.in" + source "package/python-click/Config.in" + source "package/python-coherence/Config.in" + source "package/python-configobj/Config.in" + source "package/python-configshell-fb/Config.in" + source "package/python-crc16/Config.in" + source "package/python-crossbar/Config.in" + source "package/python-cryptography/Config.in" + source "package/python-cssselect/Config.in" + source "package/python-daemon/Config.in" + source "package/python-dialog/Config.in" + source "package/python-django/Config.in" + source "package/python-docopt/Config.in" + source "package/python-dpkt/Config.in" + source "package/python-ecdsa/Config.in" + source "package/python-enum/Config.in" + source "package/python-enum34/Config.in" + source "package/python-flask/Config.in" + source "package/python-flup/Config.in" + source "package/python-gobject/Config.in" + source "package/python-html5lib/Config.in" + source "package/python-httplib2/Config.in" + source "package/python-id3/Config.in" + source "package/python-idna/Config.in" + source "package/python-iniparse/Config.in" + source "package/python-iowait/Config.in" + source "package/python-ipaddr/Config.in" + source "package/python-ipaddress/Config.in" + source "package/python-ipy/Config.in" + source "package/python-ipython/Config.in" + source "package/python-itsdangerous/Config.in" + source "package/python-jinja2/Config.in" + source "package/python-json-schema-validator/Config.in" + source "package/python-keyring/Config.in" + source "package/python-libconfig/Config.in" + source "package/python-lmdb/Config.in" + source "package/python-lxml/Config.in" + source "package/python-mad/Config.in" + source "package/python-mako/Config.in" + source "package/python-markdown/Config.in" + source "package/python-markupsafe/Config.in" + source "package/python-meld3/Config.in" + source "package/python-mistune/Config.in" + source "package/python-msgpack/Config.in" + source "package/python-netaddr/Config.in" + source "package/python-netifaces/Config.in" + source "package/python-networkmanager/Config.in" + source "package/python-nfc/Config.in" + source "package/python-numpy/Config.in" + source "package/python-paho-mqtt/Config.in" + source "package/python-pam/Config.in" + source "package/python-paramiko/Config.in" + source "package/python-pexpect/Config.in" + source "package/python-picamera/Config.in" + source "package/python-pillow/Config.in" + source "package/python-posix-ipc/Config.in" + source "package/python-protobuf/Config.in" + source "package/python-psutil/Config.in" + source "package/python-ptyprocess/Config.in" + source "package/python-pyasn/Config.in" + source "package/python-pyasn-modules/Config.in" + source "package/python-pycli/Config.in" + source "package/python-pycparser/Config.in" + source "package/python-pycrypto/Config.in" + source "package/python-pycurl/Config.in" + source "package/python-pydal/Config.in" + source "package/python-pyftpdlib/Config.in" + source "package/python-pygame/Config.in" + source "package/python-pygments/Config.in" + source "package/python-pyinotify/Config.in" + source "package/python-pymysql/Config.in" + source "package/python-pynacl/Config.in" + source "package/python-pyopenssl/Config.in" + source "package/python-pyparsing/Config.in" + source "package/python-pyparted/Config.in" + source "package/python-pypcap/Config.in" + source "package/python-pyqt/Config.in" + source "package/python-pyratemp/Config.in" + source "package/python-pyro/Config.in" + source "package/python-pyroute2/Config.in" + source "package/python-pysendfile/Config.in" + source "package/python-pysmb/Config.in" + source "package/python-pysnmp/Config.in" + source "package/python-pysnmp-apps/Config.in" + source "package/python-pysnmp-mibs/Config.in" + source "package/python-pysocks/Config.in" + source "package/python-pytrie/Config.in" + source "package/python-pytz/Config.in" + source "package/python-pyudev/Config.in" + source "package/python-pyusb/Config.in" + source "package/python-pyxb/Config.in" + source "package/python-pyyaml/Config.in" + source "package/python-pyzmq/Config.in" + source "package/python-requests/Config.in" + source "package/python-rpi-gpio/Config.in" + source "package/python-rtslib-fb/Config.in" + source "package/python-serial/Config.in" + source "package/python-service-identity/Config.in" + source "package/python-setproctitle/Config.in" + source "package/python-setuptools/Config.in" + source "package/python-shutilwhich/Config.in" + source "package/python-simplejson/Config.in" + source "package/python-singledispatch/Config.in" + source "package/python-sip/Config.in" + source "package/python-six/Config.in" + source "package/python-smbus-cffi/Config.in" + source "package/python-spidev/Config.in" + source "package/python-thrift/Config.in" + source "package/python-tornado/Config.in" + source "package/python-treq/Config.in" + source "package/python-twisted/Config.in" + source "package/python-txaio/Config.in" + source "package/python-ujson/Config.in" + source "package/python-urllib3/Config.in" + source "package/python-urwid/Config.in" + source "package/python-versiontools/Config.in" + source "package/python-web2py/Config.in" + source "package/python-webpy/Config.in" + source "package/python-werkzeug/Config.in" + source "package/python-ws4py/Config.in" + source "package/python-wsaccel/Config.in" + source "package/python-zope-interface/Config.in" +endmenu +endif + source "package/ruby/Config.in" + source "package/tcl/Config.in" +if BR2_PACKAGE_TCL +menu "Tcl libraries/modules" + source "package/expect/Config.in" + source "package/tcllib/Config.in" +endmenu +endif +endmenu + +menu "Libraries" + +menu "Audio/Sound" + source "package/alsa-lib/Config.in" + source "package/audiofile/Config.in" + source "package/celt051/Config.in" + source "package/fdk-aac/Config.in" + source "package/libao/Config.in" + source "package/libasplib/Config.in" + source "package/libbroadvoice/Config.in" + source "package/libcdaudio/Config.in" + source "package/libcddb/Config.in" + source "package/libcdio/Config.in" + source "package/libcodec2/Config.in" + source "package/libcue/Config.in" + source "package/libcuefile/Config.in" + source "package/libg7221/Config.in" + source "package/libid3tag/Config.in" + source "package/libilbc/Config.in" + source "package/liblo/Config.in" + source "package/libmad/Config.in" + source "package/libmodplug/Config.in" + source "package/libmpd/Config.in" + source "package/libmpdclient/Config.in" + source "package/libreplaygain/Config.in" + source "package/libsamplerate/Config.in" + source "package/libsidplay2/Config.in" + source "package/libsilk/Config.in" + source "package/libsndfile/Config.in" + source "package/libsoundtouch/Config.in" + source "package/libsoxr/Config.in" + source "package/libvorbis/Config.in" + source "package/mp4v2/Config.in" + source "package/openal/Config.in" + source "package/opencore-amr/Config.in" + source "package/opus/Config.in" + source "package/opusfile/Config.in" + source "package/portaudio/Config.in" + source "package/sbc/Config.in" + source "package/speex/Config.in" + source "package/taglib/Config.in" + source "package/tinyalsa/Config.in" + source "package/tremor/Config.in" + source "package/vo-aacenc/Config.in" + source "package/webrtc-audio-processing/Config.in" +endmenu + +menu "Compression and decompression" + source "package/libarchive/Config.in" + source "package/libsquish/Config.in" + source "package/libzip/Config.in" + source "package/lzo/Config.in" + source "package/minizip/Config.in" + source "package/snappy/Config.in" + source "package/szip/Config.in" + source "package/zlib/Config.in" +endmenu + +menu "Crypto" + source "package/beecrypt/Config.in" + source "package/botan/Config.in" + source "package/ca-certificates/Config.in" + source "package/cryptodev/Config.in" + source "package/gcr/Config.in" + source "package/gnutls/Config.in" + source "package/libassuan/Config.in" + source "package/libgcrypt/Config.in" + source "package/libgpg-error/Config.in" + source "package/libgpgme/Config.in" + source "package/libksba/Config.in" + source "package/libmcrypt/Config.in" + source "package/libmhash/Config.in" + source "package/libnss/Config.in" + source "package/libsecret/Config.in" + source "package/libsha1/Config.in" + source "package/libsodium/Config.in" + source "package/libssh/Config.in" + source "package/libssh2/Config.in" + source "package/libtomcrypt/Config.in" + source "package/libuecc/Config.in" + source "package/mbedtls/Config.in" + source "package/nettle/Config.in" + source "package/openssl/Config.in" + source "package/polarssl/Config.in" + source "package/trousers/Config.in" +endmenu + +menu "Database" + source "package/berkeleydb/Config.in" + source "package/cppdb/Config.in" + source "package/gdbm/Config.in" + source "package/kompexsqlite/Config.in" + source "package/leveldb/Config.in" + source "package/mongodb/Config.in" + source "package/mysql/Config.in" + source "package/postgresql/Config.in" + source "package/redis/Config.in" + source "package/sqlcipher/Config.in" + source "package/sqlite/Config.in" + source "package/unixodbc/Config.in" +endmenu + +menu "Filesystem" + source "package/gamin/Config.in" + source "package/libconfig/Config.in" + source "package/libconfuse/Config.in" + source "package/libfuse/Config.in" + source "package/liblockfile/Config.in" + source "package/libnfs/Config.in" + source "package/libsysfs/Config.in" + source "package/lockdev/Config.in" +endmenu + +menu "Graphics" + source "package/assimp/Config.in" + source "package/atk/Config.in" + source "package/atkmm/Config.in" + source "package/bullet/Config.in" + source "package/cairo/Config.in" + source "package/cairomm/Config.in" + source "package/exiv2/Config.in" + source "package/fltk/Config.in" + source "package/fontconfig/Config.in" + source "package/freetype/Config.in" + source "package/gd/Config.in" + source "package/gdk-pixbuf/Config.in" + source "package/giblib/Config.in" + source "package/giflib/Config.in" + source "package/granite/Config.in" + source "package/graphite2/Config.in" + source "package/gtkmm3/Config.in" + source "package/harfbuzz/Config.in" + source "package/ijs/Config.in" + source "package/imlib2/Config.in" + source "package/jasper/Config.in" + source "package/jpeg/Config.in" + source "package/lcms2/Config.in" + source "package/lesstif/Config.in" + source "package/libart/Config.in" + source "package/libdmtx/Config.in" + source "package/libdri2/Config.in" + source "package/libdrm/Config.in" + source "package/libepoxy/Config.in" + source "package/libevas-generic-loaders/Config.in" + source "package/libexif/Config.in" + source "package/libfm/Config.in" + source "package/libfm-extra/Config.in" + source "package/libfreeglut/Config.in" + source "package/libfreeimage/Config.in" + source "package/libgail/Config.in" + source "package/libgdiplus/Config.in" + source "package/libgeotiff/Config.in" + source "package/libglade/Config.in" + source "package/libglew/Config.in" + source "package/libglfw/Config.in" + source "package/libglu/Config.in" + source "package/libgtk2/Config.in" + source "package/libgtk3/Config.in" + source "package/libmng/Config.in" + source "package/libpng/Config.in" + source "package/libqrencode/Config.in" + source "package/libraw/Config.in" + source "package/librsvg/Config.in" + source "package/libsoil/Config.in" + source "package/libsvg/Config.in" + source "package/libsvg-cairo/Config.in" + source "package/libsvgtiny/Config.in" + source "package/libva/Config.in" + source "package/libva-intel-driver/Config.in" + source "package/libvips/Config.in" + source "package/menu-cache/Config.in" + source "package/opencv/Config.in" + source "package/opencv3/Config.in" + source "package/opengl/Config.in" + source "package/openjpeg/Config.in" + source "package/pango/Config.in" + source "package/pangomm/Config.in" + source "package/pixman/Config.in" + source "package/poppler/Config.in" + source "package/powervr/Config.in" + source "package/tiff/Config.in" + source "package/wayland/Config.in" + source "package/wayland-protocols/Config.in" + source "package/webkit/Config.in" + source "package/webkitgtk/Config.in" + source "package/webkitgtk24/Config.in" + source "package/webp/Config.in" + source "package/zbar/Config.in" + source "package/zxing-cpp/Config.in" +endmenu + +menu "Hardware handling" + source "package/acsccid/Config.in" + source "package/bcm2835/Config.in" + source "package/c-periphery/Config.in" + source "package/ccid/Config.in" + source "package/dtc/Config.in" + source "package/gnu-efi/Config.in" + source "package/hidapi/Config.in" + source "package/lcdapi/Config.in" + source "package/libaio/Config.in" + source "package/libatasmart/Config.in" + source "package/libcec/Config.in" + source "package/libfreefare/Config.in" + source "package/libftdi/Config.in" + source "package/libftdi1/Config.in" + source "package/libgudev/Config.in" + source "package/libhid/Config.in" + source "package/libiio/Config.in" + source "package/libinput/Config.in" + source "package/libiqrf/Config.in" + source "package/libllcp/Config.in" + source "package/libmbim/Config.in" + source "package/libnfc/Config.in" + source "package/libpciaccess/Config.in" + source "package/libphidget/Config.in" + source "package/libqmi/Config.in" + source "package/libraw1394/Config.in" + source "package/librtas/Config.in" + source "package/librtlsdr/Config.in" + source "package/libserial/Config.in" + source "package/libserialport/Config.in" + source "package/libsigrok/Config.in" + source "package/libsigrokdecode/Config.in" + source "package/libsoc/Config.in" + source "package/libusb/Config.in" + source "package/libusb-compat/Config.in" + source "package/libusbgx/Config.in" + source "package/libv4l/Config.in" + source "package/libxkbcommon/Config.in" + source "package/mraa/Config.in" + source "package/mtdev/Config.in" + source "package/ne10/Config.in" + source "package/neardal/Config.in" + source "package/owfs/Config.in" + source "package/pcsc-lite/Config.in" + source "package/tslib/Config.in" + source "package/urg/Config.in" +endmenu + +menu "Javascript" + source "package/angularjs/Config.in" + source "package/bootstrap/Config.in" + source "package/explorercanvas/Config.in" + source "package/flot/Config.in" + source "package/jquery/Config.in" +if BR2_PACKAGE_JQUERY +menu "External jQuery plugins" + source "package/jquery-datetimepicker/Config.in" + source "package/jquery-keyboard/Config.in" + source "package/jquery-mobile/Config.in" + source "package/jquery-sidebar/Config.in" + source "package/jquery-sparkline/Config.in" + source "package/jquery-ui/Config.in" + source "package/jquery-ui-themes/Config.in" + source "package/jquery-validation/Config.in" +endmenu +endif + source "package/jsmin/Config.in" + source "package/json-javascript/Config.in" +endmenu + +menu "JSON/XML" + source "package/benejson/Config.in" + source "package/cjson/Config.in" + source "package/expat/Config.in" + source "package/ezxml/Config.in" + source "package/jansson/Config.in" + source "package/json-c/Config.in" + source "package/json-glib/Config.in" + source "package/jsoncpp/Config.in" + source "package/libjson/Config.in" + source "package/libroxml/Config.in" + source "package/libucl/Config.in" + source "package/libxml2/Config.in" + source "package/libxmlpp/Config.in" + source "package/libxmlrpc/Config.in" + source "package/libxslt/Config.in" + source "package/libyaml/Config.in" + source "package/mxml/Config.in" + source "package/rapidjson/Config.in" + source "package/rapidxml/Config.in" + source "package/raptor/Config.in" + source "package/tinyxml/Config.in" + source "package/tinyxml2/Config.in" + source "package/valijson/Config.in" + source "package/xerces/Config.in" + source "package/yajl/Config.in" + source "package/yaml-cpp/Config.in" +endmenu + +menu "Logging" + source "package/eventlog/Config.in" + source "package/glog/Config.in" + source "package/liblog4c-localtime/Config.in" + source "package/liblogging/Config.in" + source "package/log4cplus/Config.in" + source "package/log4cxx/Config.in" + source "package/zlog/Config.in" +endmenu + +menu "Multimedia" + source "package/bitstream/Config.in" + source "package/libass/Config.in" + source "package/libbluray/Config.in" + source "package/libdcadec/Config.in" + source "package/libdvbcsa/Config.in" + source "package/libdvbpsi/Config.in" + source "package/libdvbsi/Config.in" + source "package/libdvdnav/Config.in" + source "package/libdvdread/Config.in" + source "package/libebml/Config.in" + source "package/libfslcodec/Config.in" + source "package/libfslparser/Config.in" + source "package/libfslvpuwrap/Config.in" + source "package/libhdhomerun/Config.in" + source "package/libimxvpuapi/Config.in" + source "package/libmatroska/Config.in" + source "package/libmms/Config.in" + source "package/libmpeg2/Config.in" + source "package/libogg/Config.in" + source "package/libopenh264/Config.in" + source "package/libplayer/Config.in" + source "package/libtheora/Config.in" + source "package/libvpx/Config.in" + source "package/libyuv/Config.in" + source "package/live555/Config.in" + source "package/mediastreamer/Config.in" + source "package/x264/Config.in" + source "package/x265/Config.in" +endmenu + +menu "Networking" + source "package/agentpp/Config.in" + source "package/c-ares/Config.in" + source "package/canfestival/Config.in" + source "package/cgic/Config.in" + source "package/cppzmq/Config.in" + source "package/czmq/Config.in" + source "package/filemq/Config.in" + source "package/flickcurl/Config.in" + source "package/fmlib/Config.in" + source "package/freeradius-client/Config.in" + source "package/geoip/Config.in" + source "package/glib-networking/Config.in" + source "package/gssdp/Config.in" + source "package/gupnp/Config.in" + source "package/gupnp-av/Config.in" + source "package/ibrcommon/Config.in" + source "package/ibrdtn/Config.in" + source "package/libcgi/Config.in" + source "package/libcgicc/Config.in" + source "package/libcurl/Config.in" + source "package/libdnet/Config.in" + source "package/libeXosip2/Config.in" + source "package/libfcgi/Config.in" + source "package/libgsasl/Config.in" + source "package/libhttpparser/Config.in" + source "package/libidn/Config.in" + source "package/libiscsi/Config.in" + source "package/libldns/Config.in" + source "package/libmbus/Config.in" + source "package/libmemcached/Config.in" + source "package/libmicrohttpd/Config.in" + source "package/libmnl/Config.in" + source "package/libmodbus/Config.in" + source "package/libndp/Config.in" + source "package/libnet/Config.in" + source "package/libnetfilter_acct/Config.in" + source "package/libnetfilter_conntrack/Config.in" + source "package/libnetfilter_cthelper/Config.in" + source "package/libnetfilter_cttimeout/Config.in" + source "package/libnetfilter_log/Config.in" + source "package/libnetfilter_queue/Config.in" + source "package/libnfnetlink/Config.in" + source "package/libnftnl/Config.in" + source "package/libnice/Config.in" + source "package/libnl/Config.in" + source "package/liboauth/Config.in" + source "package/liboping/Config.in" + source "package/libosip2/Config.in" + source "package/libpcap/Config.in" + source "package/libpjsip/Config.in" + source "package/librsync/Config.in" + source "package/libshairplay/Config.in" + source "package/libshout/Config.in" + source "package/libsocketcan/Config.in" + source "package/libsoup/Config.in" + source "package/libsrtp/Config.in" + source "package/libstrophe/Config.in" + source "package/libtirpc/Config.in" + source "package/libtorrent/Config.in" + source "package/libupnp/Config.in" + source "package/libupnpp/Config.in" + source "package/liburiparser/Config.in" + source "package/libvncserver/Config.in" + source "package/libwebsock/Config.in" + source "package/libwebsockets/Config.in" + source "package/lksctp-tools/Config.in" + source "package/mongoose/Config.in" + source "package/neon/Config.in" + source "package/norm/Config.in" + source "package/nss-mdns/Config.in" + source "package/nss-pam-ldapd/Config.in" + source "package/omniorb/Config.in" + source "package/openldap/Config.in" + source "package/openpgm/Config.in" + source "package/ortp/Config.in" + source "package/qdecoder/Config.in" + source "package/qpid-proton/Config.in" + source "package/rabbitmq-c/Config.in" + source "package/rtmpdump/Config.in" + source "package/slirp/Config.in" + source "package/snmppp/Config.in" + source "package/sofia-sip/Config.in" + source "package/thrift/Config.in" + source "package/usbredir/Config.in" + source "package/wvstreams/Config.in" + source "package/zeromq/Config.in" + source "package/zmqpp/Config.in" + source "package/zyre/Config.in" +endmenu + +menu "Other" + source "package/apr/Config.in" + source "package/apr-util/Config.in" + source "package/argp-standalone/Config.in" + source "package/armadillo/Config.in" + source "package/atf/Config.in" + source "package/bdwgc/Config.in" + source "package/boost/Config.in" + source "package/clapack/Config.in" + source "package/classpath/Config.in" + source "package/cppcms/Config.in" + source "package/dawgdic/Config.in" + source "package/ding-libs/Config.in" + source "package/eigen/Config.in" + source "package/elfutils/Config.in" + source "package/fftw/Config.in" + source "package/flann/Config.in" + source "package/gflags/Config.in" + source "package/glibmm/Config.in" + source "package/glm/Config.in" + source "package/gmock/Config.in" + source "package/gmp/Config.in" + source "package/gsl/Config.in" + source "package/gtest/Config.in" + source "package/libargtable2/Config.in" + source "package/libatomic_ops/Config.in" + source "package/libbsd/Config.in" + source "package/libcap/Config.in" + source "package/libcap-ng/Config.in" + source "package/libcgroup/Config.in" + source "package/libcofi/Config.in" + source "package/libcroco/Config.in" + source "package/libcrossguid/Config.in" + source "package/libdaemon/Config.in" + source "package/libee/Config.in" + source "package/libev/Config.in" + source "package/libevdev/Config.in" + source "package/libevent/Config.in" + source "package/libffi/Config.in" + source "package/libgee/Config.in" + source "package/libglib2/Config.in" + source "package/libical/Config.in" + source "package/liblinear/Config.in" + source "package/libnspr/Config.in" + source "package/libpfm4/Config.in" + source "package/libplatform/Config.in" + source "package/libplist/Config.in" + source "package/libpthread-stubs/Config.in" + source "package/libpthsem/Config.in" + source "package/libseccomp/Config.in" + source "package/libsigc/Config.in" + source "package/libsigsegv/Config.in" + source "package/libtasn1/Config.in" + source "package/libtommath/Config.in" + source "package/libtpl/Config.in" + source "package/libubox/Config.in" + source "package/libuci/Config.in" + source "package/libunwind/Config.in" + source "package/liburcu/Config.in" + source "package/libuv/Config.in" + source "package/lightning/Config.in" + source "package/linux-pam/Config.in" +if BR2_PACKAGE_LINUX_PAM +comment "linux-pam plugins" + source "package/libpam-radius-auth/Config.in" + source "package/libpam-tacplus/Config.in" +endif + source "package/liquid-dsp/Config.in" + source "package/lttng-libust/Config.in" + source "package/mpc/Config.in" + source "package/mpdecimal/Config.in" + source "package/mpfr/Config.in" + source "package/msgpack/Config.in" + source "package/mtdev2tuio/Config.in" + source "package/netbsd-queue/Config.in" + source "package/orc/Config.in" + source "package/p11-kit/Config.in" + source "package/poco/Config.in" + source "package/protobuf/Config.in" + source "package/protobuf-c/Config.in" + source "package/qhull/Config.in" + source "package/qlibc/Config.in" + source "package/startup-notification/Config.in" + source "package/tz/Config.in" + source "package/tzdata/Config.in" +endmenu + +menu "Security" + source "package/libselinux/Config.in" + source "package/libsemanage/Config.in" + source "package/libsepol/Config.in" +endmenu + +menu "Text and terminal handling" + source "package/enchant/Config.in" + source "package/icu/Config.in" + source "package/libcli/Config.in" + source "package/libedit/Config.in" + source "package/libenca/Config.in" + source "package/libestr/Config.in" + source "package/libfribidi/Config.in" + source "package/libiconv/Config.in" + source "package/libunistring/Config.in" + source "package/linenoise/Config.in" + source "package/ncurses/Config.in" + source "package/newt/Config.in" + source "package/pcre/Config.in" + source "package/popt/Config.in" + source "package/readline/Config.in" + source "package/slang/Config.in" + source "package/tclap/Config.in" + source "package/ustr/Config.in" +endmenu + +endmenu + +menu "Mail" + source "package/dovecot/Config.in" + source "package/exim/Config.in" + source "package/fetchmail/Config.in" + source "package/heirloom-mailx/Config.in" + source "package/libesmtp/Config.in" + source "package/msmtp/Config.in" + source "package/mutt/Config.in" + source "package/sylpheed/Config.in" +endmenu + +menu "Miscellaneous" + source "package/aespipe/Config.in" + source "package/bc/Config.in" + source "package/clamav/Config.in" + source "package/collectd/Config.in" + source "package/empty/Config.in" + source "package/gnuradio/Config.in" + source "package/googlefontdirectory/Config.in" + source "package/gr-osmosdr/Config.in" + source "package/haveged/Config.in" + source "package/mcrypt/Config.in" + source "package/mobile-broadband-provider-info/Config.in" + source "package/qemu/Config.in" + source "package/qpdf/Config.in" + source "package/shared-mime-info/Config.in" + source "package/snowball-init/Config.in" + source "package/taskd/Config.in" + source "package/wine/Config.in" + source "package/xutil_util-macros/Config.in" +endmenu + +menu "Networking applications" + source "package/aiccu/Config.in" + source "package/aircrack-ng/Config.in" + source "package/apache/Config.in" + source "package/argus/Config.in" + source "package/arptables/Config.in" + source "package/atftp/Config.in" + source "package/autossh/Config.in" + source "package/avahi/Config.in" + source "package/axel/Config.in" + source "package/bandwidthd/Config.in" + source "package/batctl/Config.in" + source "package/bcusdk/Config.in" + source "package/bind/Config.in" + source "package/bluez_utils/Config.in" + source "package/bluez5_utils/Config.in" + source "package/bmon/Config.in" + source "package/boa/Config.in" + source "package/bridge-utils/Config.in" + source "package/bwm-ng/Config.in" + source "package/c-icap/Config.in" + source "package/c-icap-modules/Config.in" + source "package/cannelloni/Config.in" + source "package/can-utils/Config.in" + source "package/chrony/Config.in" + source "package/civetweb/Config.in" + source "package/connman/Config.in" + source "package/connman-gtk/Config.in" + source "package/conntrack-tools/Config.in" + source "package/crda/Config.in" + source "package/ctorrent/Config.in" + source "package/cups/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/dhcp/Config.in" +endif + source "package/dhcpcd/Config.in" + source "package/dhcpdump/Config.in" + source "package/dnsmasq/Config.in" + source "package/drbd-utils/Config.in" + source "package/dropbear/Config.in" + source "package/ebtables/Config.in" + source "package/ejabberd/Config.in" + source "package/ethtool/Config.in" + source "package/faifa/Config.in" + source "package/fastd/Config.in" + source "package/fcgiwrap/Config.in" + source "package/flannel/Config.in" + source "package/fmc/Config.in" + source "package/fping/Config.in" + source "package/freeswitch/Config.in" + source "package/gesftpserver/Config.in" + source "package/gutenprint/Config.in" + source "package/hans/Config.in" + source "package/hiawatha/Config.in" + source "package/hostapd/Config.in" + source "package/hplip/Config.in" + source "package/httping/Config.in" + source "package/ibrdtn-tools/Config.in" + source "package/ibrdtnd/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/ifplugd/Config.in" +endif + source "package/iftop/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/ifupdown/Config.in" +endif + source "package/igh-ethercat/Config.in" + source "package/igmpproxy/Config.in" + source "package/inadyn/Config.in" + source "package/iodine/Config.in" + source "package/iperf/Config.in" + source "package/iperf3/Config.in" + source "package/iproute2/Config.in" + source "package/ipsec-tools/Config.in" + source "package/ipset/Config.in" + source "package/iptables/Config.in" + source "package/iptraf-ng/Config.in" + source "package/iputils/Config.in" + source "package/irssi/Config.in" + source "package/iw/Config.in" + source "package/janus-gateway/Config.in" + source "package/kismet/Config.in" + source "package/knock/Config.in" + source "package/leafnode2/Config.in" + source "package/lftp/Config.in" + source "package/lighttpd/Config.in" + source "package/linknx/Config.in" + source "package/links/Config.in" + source "package/linphone/Config.in" + source "package/linux-zigbee/Config.in" + source "package/lldpd/Config.in" + source "package/lrzsz/Config.in" + source "package/macchanger/Config.in" + source "package/memcached/Config.in" + source "package/mii-diag/Config.in" + source "package/minidlna/Config.in" + source "package/mjpg-streamer/Config.in" + source "package/modem-manager/Config.in" + source "package/mongrel2/Config.in" + source "package/monkey/Config.in" + source "package/mosh/Config.in" + source "package/mosquitto/Config.in" + source "package/mrouted/Config.in" + source "package/mtr/Config.in" + source "package/nbd/Config.in" + source "package/ncftp/Config.in" + source "package/ndisc6/Config.in" + source "package/netatalk/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/netcat/Config.in" + source "package/netcat-openbsd/Config.in" +endif + source "package/netplug/Config.in" + source "package/netsnmp/Config.in" + source "package/netstat-nat/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/net-tools/Config.in" +endif + source "package/network-manager/Config.in" + source "package/nfacct/Config.in" + source "package/nftables/Config.in" + source "package/nginx/Config.in" + source "package/ngircd/Config.in" + source "package/ngrep/Config.in" + source "package/nload/Config.in" + source "package/nmap/Config.in" + source "package/noip/Config.in" + source "package/ntp/Config.in" + source "package/nuttcp/Config.in" + source "package/odhcp6c/Config.in" + source "package/odhcploc/Config.in" + source "package/olsr/Config.in" + source "package/open-plc-utils/Config.in" + source "package/openntpd/Config.in" + source "package/openobex/Config.in" + source "package/openssh/Config.in" + source "package/openswan/Config.in" + source "package/openvpn/Config.in" + source "package/p910nd/Config.in" + source "package/phidgetwebservice/Config.in" + source "package/portmap/Config.in" + source "package/pound/Config.in" + source "package/pppd/Config.in" + source "package/pptp-linux/Config.in" + source "package/privoxy/Config.in" + source "package/proftpd/Config.in" + source "package/proxychains-ng/Config.in" + source "package/ptpd/Config.in" + source "package/ptpd2/Config.in" + source "package/pure-ftpd/Config.in" + source "package/putty/Config.in" + source "package/quagga/Config.in" + source "package/radvd/Config.in" + source "package/rp-pppoe/Config.in" + source "package/rpcbind/Config.in" + source "package/rsh-redone/Config.in" + source "package/rsync/Config.in" + source "package/rtorrent/Config.in" + source "package/rtptools/Config.in" + source "package/samba4/Config.in" + source "package/sconeserver/Config.in" + source "package/ser2net/Config.in" + source "package/shairport-sync/Config.in" + source "package/smcroute/Config.in" + source "package/socat/Config.in" + source "package/socketcand/Config.in" + source "package/softether/Config.in" + source "package/spawn-fcgi/Config.in" + source "package/spice/Config.in" + source "package/spice-protocol/Config.in" + source "package/squid/Config.in" + source "package/sshpass/Config.in" + source "package/strongswan/Config.in" + source "package/stunnel/Config.in" + source "package/tcpdump/Config.in" + source "package/tcping/Config.in" + source "package/tcpreplay/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/tftpd/Config.in" +endif + source "package/thttpd/Config.in" + source "package/tinc/Config.in" + source "package/tinyhttpd/Config.in" + source "package/tn5250/Config.in" + source "package/tor/Config.in" + source "package/transmission/Config.in" + source "package/tvheadend/Config.in" + source "package/udpcast/Config.in" + source "package/ulogd/Config.in" + source "package/ushare/Config.in" + source "package/ussp-push/Config.in" + source "package/vde2/Config.in" + source "package/vnstat/Config.in" + source "package/vpnc/Config.in" + source "package/vsftpd/Config.in" + source "package/vtun/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/wget/Config.in" + source "package/whois/Config.in" +endif + source "package/wireless-regdb/Config.in" + source "package/wireless_tools/Config.in" + source "package/wireshark/Config.in" + source "package/wpa_supplicant/Config.in" + source "package/wpan-tools/Config.in" + source "package/wvdial/Config.in" + source "package/xinetd/Config.in" + source "package/xl2tp/Config.in" + source "package/xtables-addons/Config.in" + source "package/znc/Config.in" + +endmenu + +menu "Package managers" +comment "-------------------------------------------------------" +comment "Please note: " +comment "- Buildroot does *not* generate binary packages, " +comment "- Buildroot does *not* install any package database. " +comment "* " +comment "It is up to you to provide those by yourself if you " +comment "want to use any of those package managers. " +comment "* " +comment "See the manual: " +comment "http://buildroot.org/manual.html#faq-no-binary-packages" +comment "-------------------------------------------------------" + source "package/ipkg/Config.in" + source "package/opkg/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/rpm/Config.in" +endif +endmenu + +menu "Real-Time" + source "package/rtai/Config.in" + source "package/xenomai/Config.in" +endmenu + +menu "Security" + source "package/setools/Config.in" +endmenu + +menu "Shell and utilities" +comment "Shells" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/bash/Config.in" + source "package/dash/Config.in" + source "package/zsh/Config.in" +endif +comment "Utilities" + source "package/at/Config.in" + source "package/ccrypt/Config.in" + source "package/crudini/Config.in" + source "package/dialog/Config.in" + source "package/dtach/Config.in" + source "package/file/Config.in" + source "package/gnupg/Config.in" + source "package/gnupg2/Config.in" + source "package/inotify-tools/Config.in" + source "package/lockfile-progs/Config.in" + source "package/logrotate/Config.in" + source "package/logsurfer/Config.in" + source "package/pinentry/Config.in" + source "package/ranger/Config.in" + source "package/screen/Config.in" + source "package/sudo/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/time/Config.in" +endif + source "package/tmux/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/which/Config.in" +endif + source "package/xmlstarlet/Config.in" + source "package/xxhash/Config.in" +endmenu + +menu "System tools" + source "package/acl/Config.in" + source "package/android-tools/Config.in" + source "package/attr/Config.in" + source "package/audit/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/bootutils/Config.in" + source "package/coreutils/Config.in" +endif + source "package/cpuload/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/dcron/Config.in" + source "package/debianutils/Config.in" +endif + source "package/cgroupfs-mount/Config.in" + source "package/dsp-tools/Config.in" + source "package/emlog/Config.in" + source "package/ftop/Config.in" + source "package/getent/Config.in" + source "package/htop/Config.in" + source "package/initscripts/Config.in" + source "package/iotop/Config.in" + source "package/iprutils/Config.in" + source "package/irqbalance/Config.in" + source "package/keyutils/Config.in" + source "package/kmod/Config.in" + source "package/kvmtool/Config.in" + source "package/lxc/Config.in" + source "package/monit/Config.in" + source "package/ncdu/Config.in" + source "package/numactl/Config.in" + source "package/nut/Config.in" + source "package/openvmtools/Config.in" + source "package/polkit/Config.in" + source "package/powerpc-utils/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/procps-ng/Config.in" +endif + source "package/procrank_linux/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/psmisc/Config.in" +endif + source "package/pwgen/Config.in" + source "package/quota/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/rsyslog/Config.in" +endif + source "package/scrub/Config.in" + source "package/scrypt/Config.in" + source "package/smack/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/start-stop-daemon/Config.in" +endif + source "package/supervisor/Config.in" + source "package/swupdate/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/sysklogd/Config.in" + source "package/syslog-ng/Config.in" +endif + source "package/systemd/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/sysvinit/Config.in" + source "package/tar/Config.in" +endif + source "package/tpm-tools/Config.in" + source "package/unscd/Config.in" + source "package/util-linux/Config.in" +endmenu + +menu "Text editors and viewers" + source "package/ed/Config.in" + source "package/joe/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/less/Config.in" +endif + source "package/mc/Config.in" + source "package/nano/Config.in" + source "package/uemacs/Config.in" +if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + source "package/vim/Config.in" +endif +endmenu + +endmenu diff --git a/package/Config.in.host b/package/Config.in.host new file mode 100644 index 0000000000..13acb22ee6 --- /dev/null +++ b/package/Config.in.host @@ -0,0 +1,42 @@ +menu "Host utilities" + + source "package/aespipe/Config.in.host" + source "package/android-tools/Config.in.host" + source "package/cbootimage/Config.in.host" + source "package/checkpolicy/Config.in.host" + source "package/cramfs/Config.in.host" + source "package/dfu-util/Config.in.host" + source "package/dos2unix/Config.in.host" + source "package/dosfstools/Config.in.host" + source "package/dtc/Config.in.host" + source "package/e2fsprogs/Config.in.host" + source "package/e2tools/Config.in.host" + source "package/faketime/Config.in.host" + source "package/genext2fs/Config.in.host" + source "package/genimage/Config.in.host" + source "package/genpart/Config.in.host" + source "package/go/Config.in.host" + source "package/gptfdisk/Config.in.host" + source "package/imx-usb-loader/Config.in.host" + source "package/jq/Config.in.host" + source "package/lpc3250loader/Config.in.host" + source "package/mke2img/Config.in.host" + source "package/mtd/Config.in.host" + source "package/mtools/Config.in.host" + source "package/omap-u-boot-utils/Config.in.host" + source "package/openocd/Config.in.host" + source "package/parted/Config.in.host" + source "package/patchelf/Config.in.host" + source "package/pwgen/Config.in.host" + source "package/qemu/Config.in.host" + source "package/sam-ba/Config.in.host" + source "package/squashfs/Config.in.host" + source "package/sunxi-tools/Config.in.host" + source "package/tegrarcm/Config.in.host" + source "package/uboot-tools/Config.in.host" + source "package/util-linux/Config.in.host" + source "package/vboot-utils/Config.in.host" + source "package/xorriso/Config.in.host" + source "package/zip/Config.in.host" + +endmenu diff --git a/package/Makefile.in b/package/Makefile.in new file mode 100644 index 0000000000..616bdd056b --- /dev/null +++ b/package/Makefile.in @@ -0,0 +1,402 @@ +ifndef MAKE +MAKE := make +endif +ifndef HOSTMAKE +HOSTMAKE = $(MAKE) +endif +HOSTMAKE := $(shell which $(HOSTMAKE) || type -p $(HOSTMAKE) || echo make) + +# If BR2_JLEVEL is 0, scale the maximum concurrency with the number of +# CPUs. An additional job is used in order to keep processors busy +# while waiting on I/O. +# If the number of processors is not available, assume one. +ifeq ($(BR2_JLEVEL),0) +PARALLEL_JOBS := $(shell echo \ + $$((1 + `getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1`))) +else +PARALLEL_JOBS := $(BR2_JLEVEL) +endif + +MAKE1 := $(HOSTMAKE) -j1 +override MAKE = $(HOSTMAKE) \ + $(if $(findstring j,$(filter-out --%,$(MAKEFLAGS))),,-j$(PARALLEL_JOBS)) + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) +TARGET_VENDOR = $(call qstrip,$(BR2_TOOLCHAIN_BUILDROOT_VENDOR)) +else +TARGET_VENDOR = buildroot +endif + +# Sanity checks +ifeq ($(TARGET_VENDOR),) +$(error BR2_TOOLCHAIN_BUILDROOT_VENDOR is not allowed to be empty) +endif +ifeq ($(TARGET_VENDOR),unknown) +$(error BR2_TOOLCHAIN_BUILDROOT_VENDOR cannot be 'unknown'. \ + It might be confused with the native toolchain) +endif + +# Compute GNU_TARGET_NAME +GNU_TARGET_NAME = $(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI) + +# FLAT binary format needs uclinux +ifeq ($(BR2_BINFMT_FLAT),y) +TARGET_OS = uclinux +else +TARGET_OS = linux +endif + +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +LIBC = uclibc +else ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +LIBC = musl +else +LIBC = gnu +endif + +# The ABI suffix is a bit special on ARM, as it needs to be +# -uclibcgnueabi for uClibc EABI, and -gnueabi for glibc EABI. +# This means that the LIBC and ABI aren't strictly orthogonal, +# which explains why we need the test on LIBC below. +ifeq ($(BR2_arm)$(BR2_armeb),y) +ifeq ($(LIBC),uclibc) +ABI = gnueabi +else +ABI = eabi +endif + +ifeq ($(BR2_ARM_EABIHF),y) +ABI := $(ABI)hf +endif +endif + +# For FSL PowerPC there's SPE +ifeq ($(BR2_powerpc_SPE),y) +ABI = spe +# MPC8540s are e500v1 with single precision FP +ifeq ($(BR2_powerpc_8540),y) +TARGET_ABI += -mabi=spe -mfloat-gprs=single -Wa,-me500 +endif +ifeq ($(BR2_powerpc_8548),y) +TARGET_ABI += -mabi=spe -mfloat-gprs=double -Wa,-me500x2 +endif +ifeq ($(BR2_powerpc_e500mc),y) +TARGET_ABI += -mabi=spe -mfloat-gprs=double -Wa,-me500mc +endif +endif + +# Use longcalls option for Xtensa globally. +# The 'longcalls' option allows calls across a greater range of addresses, +# and is required for some packages. While this option can degrade both +# code size and performance, the linker can usually optimize away the +# overhead when a call ends up within a certain range. +# +# Use auto-litpools for Xtensa globally. +# Collecting literals into separate section can be advantageous if that +# section is placed into DTCM at link time. This is applicable for code +# running on bare metal, but makes no sense under linux, where userspace +# is isolated from the physical memory details. OTOH placing literals into +# separate section breaks build of huge source files, because l32r +# instruction can only access literals in 256 KBytes range. +# +ifeq ($(BR2_xtensa),y) +TARGET_ABI += -mlongcalls -mauto-litpools +endif + +ifeq ($(BR2_arc)$(BR2_ARC_ATOMIC_EXT),yy) +TARGET_ABI += -matomic +endif + +STAGING_SUBDIR = usr/$(GNU_TARGET_NAME)/sysroot +STAGING_DIR = $(HOST_DIR)/$(STAGING_SUBDIR) + +ifeq ($(BR2_OPTIMIZE_0),y) +TARGET_OPTIMIZATION = -O0 +endif +ifeq ($(BR2_OPTIMIZE_1),y) +TARGET_OPTIMIZATION = -O1 +endif +ifeq ($(BR2_OPTIMIZE_2),y) +TARGET_OPTIMIZATION = -O2 +endif +ifeq ($(BR2_OPTIMIZE_3),y) +TARGET_OPTIMIZATION = -O3 +endif +ifeq ($(BR2_OPTIMIZE_S),y) +TARGET_OPTIMIZATION = -Os +endif +ifeq ($(BR2_DEBUG_1),y) +TARGET_DEBUGGING = -g1 +endif +ifeq ($(BR2_DEBUG_2),y) +TARGET_DEBUGGING = -g2 +endif +ifeq ($(BR2_DEBUG_3),y) +TARGET_DEBUGGING = -g3 +endif + +TARGET_CPPFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +TARGET_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) +TARGET_CXXFLAGS = $(TARGET_CFLAGS) +TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS)) + +ifeq ($(BR2_BINFMT_FLAT),y) +TARGET_CFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\ + -Wl$(comma)-elf2flt) +TARGET_CXXFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),\ + -Wl$(comma)-elf2flt) +TARGET_LDFLAGS += $(if $($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt=-s$($(PKG)_FLAT_STACKSIZE),-Wl$(comma)-elf2flt) +endif + +ifeq ($(BR2_BINFMT_FLAT_SHARED),y) +TARGET_LDFLAGS += -mid-shared-library -mshared-library-id=0 +TARGET_CFLAGS += -mid-shared-library -mshared-library-id=0 +TARGET_CXXFLAGS += -mid-shared-library -mshared-library-id=0 +endif +ifeq ($(BR2_BINFMT_FLAT_SEP_DATA),y) +TARGET_LDFLAGS += -msep-data +TARGET_CFLAGS += -msep-data +TARGET_CXXFLAGS += -msep-data +endif + +ifeq ($(BR2_SSP_REGULAR),y) +TARGET_CFLAGS += -fstack-protector +TARGET_CXXFLAGS += -fstack-protector +else ifeq ($(BR2_SSP_STRONG),y) +TARGET_CFLAGS += -fstack-protector-strong +TARGET_CXXFLAGS += -fstack-protector-strong +else ifeq ($(BR2_SSP_ALL),y) +TARGET_CFLAGS += -fstack-protector-all +TARGET_CXXFLAGS += -fstack-protector-all +endif + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) +TARGET_CROSS = $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)- +else +TARGET_CROSS = $(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))- +endif + +# Define TARGET_xx variables for all common binutils/gcc +TARGET_AR = $(TARGET_CROSS)ar +TARGET_AS = $(TARGET_CROSS)as +TARGET_CC = $(TARGET_CROSS)gcc +TARGET_CPP = $(TARGET_CROSS)cpp +TARGET_CXX = $(TARGET_CROSS)g++ +TARGET_FC = $(TARGET_CROSS)gfortran +TARGET_LD = $(TARGET_CROSS)ld +TARGET_NM = $(TARGET_CROSS)nm +TARGET_RANLIB = $(TARGET_CROSS)ranlib +TARGET_READELF = $(TARGET_CROSS)readelf +TARGET_OBJCOPY = $(TARGET_CROSS)objcopy +TARGET_OBJDUMP = $(TARGET_CROSS)objdump + +ifeq ($(BR2_STRIP_strip),y) +STRIP_STRIP_DEBUG := --strip-debug +STRIP_STRIP_UNNEEDED := --strip-unneeded +STRIP_STRIP_ALL := --strip-all +TARGET_STRIP = $(TARGET_CROSS)strip +STRIPCMD = $(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note +KSTRIPCMD = $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) +endif +ifeq ($(BR2_STRIP_sstrip),y) +STRIP_STRIP_DEBUG := +STRIP_STRIP_UNNEEDED := +STRIP_STRIP_ALL := +TARGET_STRIP = $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-sstrip +STRIPCMD = $(TARGET_STRIP) +KSTRIPCMD = $(TARGET_CROSS)strip --remove-section=.comment --remove-section=.note --strip-unneeded +endif +ifeq ($(BR2_STRIP_none),y) +TARGET_STRIP = true +STRIPCMD = $(TARGET_STRIP) +KSTRIPCMD = $(TARGET_STRIP) +endif +INSTALL := $(shell which install || type -p install) +FLEX := $(shell which flex || type -p flex) +BISON := $(shell which bison || type -p bison) +SED := $(shell which sed || type -p sed) -i -e +UNZIP := $(shell which unzip || type -p unzip) -q + +APPLY_PATCHES = support/scripts/apply-patches.sh $(if $(QUIET),-s) + +HOST_CPPFLAGS = -I$(HOST_DIR)/usr/include +HOST_CFLAGS ?= -O2 +HOST_CFLAGS += $(HOST_CPPFLAGS) +HOST_CXXFLAGS += $(HOST_CFLAGS) +HOST_LDFLAGS += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib + +# host-intltool should be executed with the system perl, so we save +# the path to the system perl, before a host-perl built by Buildroot +# might get installed into $(HOST_DIR)/usr/bin and therefore appears +# in our PATH. This system perl will be used as INTLTOOL_PERL. +export PERL=$(shell which perl) + +# host-intltool needs libxml-parser-perl, which Buildroot installs in +# $(HOST_DIR)/usr/lib/perl, so we must make sure that the system perl +# finds this perl module by exporting the proper value for PERL5LIB. +export PERL5LIB=$(HOST_DIR)/usr/lib/perl + +TARGET_CONFIGURE_OPTS = \ + PATH=$(BR_PATH) \ + AR="$(TARGET_AR)" \ + AS="$(TARGET_AS)" \ + LD="$(TARGET_LD)" \ + NM="$(TARGET_NM)" \ + CC="$(TARGET_CC)" \ + GCC="$(TARGET_CC)" \ + CPP="$(TARGET_CPP)" \ + CXX="$(TARGET_CXX)" \ + FC="$(TARGET_FC)" \ + RANLIB="$(TARGET_RANLIB)" \ + READELF="$(TARGET_READELF)" \ + STRIP="$(TARGET_STRIP)" \ + OBJCOPY="$(TARGET_OBJCOPY)" \ + OBJDUMP="$(TARGET_OBJDUMP)" \ + AR_FOR_BUILD="$(HOSTAR)" \ + AS_FOR_BUILD="$(HOSTAS)" \ + CC_FOR_BUILD="$(HOSTCC)" \ + GCC_FOR_BUILD="$(HOSTCC)" \ + CXX_FOR_BUILD="$(HOSTCXX)" \ + LD_FOR_BUILD="$(HOSTLD)" \ + CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \ + CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \ + CXXFLAGS_FOR_BUILD="$(HOST_CXXFLAGS)" \ + LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \ + FCFLAGS_FOR_BUILD="$(HOST_FCFLAGS)" \ + DEFAULT_ASSEMBLER="$(TARGET_AS)" \ + DEFAULT_LINKER="$(TARGET_LD)" \ + CPPFLAGS="$(TARGET_CPPFLAGS)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + CXXFLAGS="$(TARGET_CXXFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + FCFLAGS="$(TARGET_FCFLAGS)" \ + PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + STAGING_DIR="$(STAGING_DIR)" \ + INTLTOOL_PERL=$(PERL) + +TARGET_MAKE_ENV = PATH=$(BR_PATH) + + +HOST_CONFIGURE_OPTS = \ + PATH=$(BR_PATH) \ + AR="$(HOSTAR)" \ + AS="$(HOSTAS)" \ + LD="$(HOSTLD)" \ + NM="$(HOSTNM)" \ + CC="$(HOSTCC)" \ + GCC="$(HOSTCC)" \ + CXX="$(HOSTCXX)" \ + CPP="$(HOSTCPP)" \ + OBJCOPY="$(HOSTOBJCOPY)" \ + RANLIB="$(HOSTRANLIB)" \ + CPPFLAGS="$(HOST_CPPFLAGS)" \ + CFLAGS="$(HOST_CFLAGS)" \ + CXXFLAGS="$(HOST_CXXFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" \ + PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \ + PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \ + PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + PKG_CONFIG_SYSROOT_DIR="/" \ + PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig" \ + INTLTOOL_PERL=$(PERL) + +HOST_MAKE_ENV = \ + PATH=$(BR_PATH) \ + PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + PKG_CONFIG_SYSROOT_DIR="/" \ + PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig" + +# This is extra environment we can not export ourselves (eg. because some +# packages use that variable internally, eg. uboot), so we have to +# explicitly pass it to user-supplied external hooks (eg. post-build, +# post-images) +EXTRA_ENV = \ + PATH=$(BR_PATH) \ + BR2_DL_DIR=$(BR2_DL_DIR) \ + BUILD_DIR=$(BUILD_DIR) \ + BR2_EXTERNAL=$(BR2_EXTERNAL) + +################################################################################ +# settings we need to pass to configure + +# does unaligned access trap? +BR2_AC_CV_TRAP_CHECK = ac_cv_lbl_unaligned_fail=yes +ifeq ($(BR2_i386),y) +BR2_AC_CV_TRAP_CHECK = ac_cv_lbl_unaligned_fail=no +endif +ifeq ($(BR2_x86_64),y) +BR2_AC_CV_TRAP_CHECK = ac_cv_lbl_unaligned_fail=no +endif +ifeq ($(BR2_m68k),y) +BR2_AC_CV_TRAP_CHECK = ac_cv_lbl_unaligned_fail=no +endif +ifeq ($(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpc64le),y) +BR2_AC_CV_TRAP_CHECK = ac_cv_lbl_unaligned_fail=no +endif + +ifeq ($(BR2_ENDIAN),"BIG") +BR2_AC_CV_C_BIGENDIAN = ac_cv_c_bigendian=yes +else +BR2_AC_CV_C_BIGENDIAN = ac_cv_c_bigendian=no +endif + +# AM_GNU_GETTEXT misdetects musl gettext support. +# musl currently implements api level 1 and 2 (basic + ngettext) +# http://www.openwall.com/lists/musl/2015/04/16/3 +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +BR2_GT_CV_FUNC_GNUGETTEXT_LIBC = \ + gt_cv_func_gnugettext1_libc=yes \ + gt_cv_func_gnugettext2_libc=yes +endif + +TARGET_CONFIGURE_ARGS = \ + $(BR2_AC_CV_TRAP_CHECK) \ + ac_cv_func_mmap_fixed_mapped=yes \ + ac_cv_func_memcmp_working=yes \ + ac_cv_have_decl_malloc=yes \ + gl_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_calloc_0_nonnull=yes \ + ac_cv_func_realloc_0_nonnull=yes \ + lt_cv_sys_lib_search_path_spec="" \ + $(BR2_AC_CV_C_BIGENDIAN) \ + $(BR2_GT_CV_FUNC_GNUGETTEXT_LIBC) + +################################################################################ + +ifeq ($(BR2_ENABLE_LOCALE),y) +DISABLE_NLS := +else +DISABLE_NLS :=--disable-nls +endif + +ifneq ($(BR2_INSTALL_LIBSTDCPP),y) +TARGET_CONFIGURE_OPTS += CXX=false +endif + +ifeq ($(BR2_STATIC_LIBS),y) +SHARED_STATIC_LIBS_OPTS = --enable-static --disable-shared +TARGET_CFLAGS += -static +TARGET_CXXFLAGS += -static +TARGET_LDFLAGS += -static +else ifeq ($(BR2_SHARED_LIBS),y) +SHARED_STATIC_LIBS_OPTS = --disable-static --enable-shared +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +SHARED_STATIC_LIBS_OPTS = --enable-static --enable-shared +endif + +ifeq ($(BR2_COMPILER_PARANOID_UNSAFE_PATH),y) +export BR_COMPILER_PARANOID_UNSAFE_PATH=enabled +endif + +include package/pkg-download.mk +include package/pkg-autotools.mk +include package/pkg-cmake.mk +include package/pkg-luarocks.mk +include package/pkg-perl.mk +include package/pkg-python.mk +include package/pkg-virtual.mk +include package/pkg-generic.mk +include package/pkg-kconfig.mk +include package/pkg-rebar.mk +include package/pkg-kernel-module.mk diff --git a/package/a10disp/Config.in b/package/a10disp/Config.in new file mode 100644 index 0000000000..18e2d8fcf0 --- /dev/null +++ b/package/a10disp/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_A10DISP + bool "a10disp" + depends on BR2_arm + depends on BR2_LINUX_KERNEL + help + Program to change the display mode of Allwinner ARM SOCs running + the linux-sunxi kernel (and not the mainline kernel.) + + http://github.com/hglm/a10disp + +comment "a10disp needs a Linux kernel to be built" + depends on BR2_arm + depends on !BR2_LINUX_KERNEL diff --git a/package/a10disp/a10disp.hash b/package/a10disp/a10disp.hash new file mode 100644 index 0000000000..a1ec11c759 --- /dev/null +++ b/package/a10disp/a10disp.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 5077405030e8f97a1edd4b86d469466abbc4d32b4a4609e58459347fcd1ba35b a10disp-v0.6.1.tar.gz diff --git a/package/a10disp/a10disp.mk b/package/a10disp/a10disp.mk new file mode 100644 index 0000000000..7353edea62 --- /dev/null +++ b/package/a10disp/a10disp.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# a10disp +# +################################################################################ + +A10DISP_VERSION = v0.6.1 +A10DISP_SITE = $(call github,hglm,a10disp,$(A10DISP_VERSION)) +A10DISP_LICENSE = MIT + +A10DISP_DEPENDENCIES = linux + +define A10DISP_BUILD_CMDS + cp -f $(LINUX_DIR)/include/video/sunxi_disp_ioctl.h $(@D)/ + $(TARGET_CC) $(TARGET_CFLAGS) $(@D)/a10disp.c -o $(@D)/a10disp +endef + +define A10DISP_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/a10disp $(TARGET_DIR)/usr/bin/a10disp +endef + +$(eval $(generic-package)) diff --git a/package/acl/0001-support-static-installation.patch b/package/acl/0001-support-static-installation.patch new file mode 100644 index 0000000000..4cb473ffc2 --- /dev/null +++ b/package/acl/0001-support-static-installation.patch @@ -0,0 +1,29 @@ +Support installation of .a file when doing static linking + +When doing static linking (i.e ENABLE_SHARED != yes), the acl build +logic wasn't installing any library at all, not even the .a file which +is needed for static linking. This patch fixes that. + +Signed-off-by: Thomas Petazzoni + +Index: b/include/buildmacros +=================================================================== +--- a/include/buildmacros ++++ b/include/buildmacros +@@ -97,7 +97,15 @@ + + INSTALL_LTLIB_STATIC = \ + cd $(TOPDIR)/$(LIBNAME)/.libs; \ +- ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); ++ ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \ ++ ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).la $(PKG_DEVLIB_DIR); \ ++ ../$(INSTALL) -m 644 $(LIBNAME).la $(PKG_DEVLIB_DIR)/$(LIBNAME).la ; \ ++ ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ ++ ../$(INSTALL) -T so_base $(LIBNAME).la $(PKG_LIB_DIR); \ ++ if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \ ++ ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \ ++ ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \ ++ fi + + INSTALL_MAN = \ + @for d in $(MAN_PAGES); do \ diff --git a/package/acl/Config.in b/package/acl/Config.in new file mode 100644 index 0000000000..92f2251878 --- /dev/null +++ b/package/acl/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_ACL + bool "acl" + select BR2_PACKAGE_ATTR + help + POSIX Access Control Lists, which are used to define more + fine-grained discretionary access rights for files and + directories. + This package also provides libacl. + + http://savannah.nongnu.org/projects/acl diff --git a/package/acl/acl.hash b/package/acl/acl.hash new file mode 100644 index 0000000000..3f9d7900d3 --- /dev/null +++ b/package/acl/acl.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 179074bb0580c06c4b4137be4c5a92a701583277967acdb5546043c7874e0d23 acl-2.2.52.src.tar.gz diff --git a/package/acl/acl.mk b/package/acl/acl.mk new file mode 100644 index 0000000000..cbe5e93961 --- /dev/null +++ b/package/acl/acl.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# acl +# +################################################################################ + +ACL_VERSION = 2.2.52 +ACL_SOURCE = acl-$(ACL_VERSION).src.tar.gz +ACL_SITE = http://download.savannah.gnu.org/releases/acl +ACL_INSTALL_STAGING = YES +ACL_DEPENDENCIES = attr +ACL_CONF_OPTS = --enable-gettext=no +ACL_LICENSE = GPLv2+ (programs), LGPLv2.1+ (libraries) +ACL_LICENSE_FILES = doc/COPYING doc/COPYING.LGPL + +# While the configuration system uses autoconf, the Makefiles are +# hand-written and do not use automake. Therefore, we have to hack +# around their deficiencies by passing installation paths. +ACL_INSTALL_STAGING_OPTS = \ + prefix=$(STAGING_DIR)/usr \ + exec_prefix=$(STAGING_DIR)/usr \ + PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib \ + install-dev install-lib + +ACL_INSTALL_TARGET_OPTS = \ + prefix=$(TARGET_DIR)/usr \ + exec_prefix=$(TARGET_DIR)/usr \ + install install-lib + +# The libdir variable in libacl.la is empty, so let's fix it. This is +# probably due to acl not using automake, and not doing fully the +# right thing with libtool. +define ACL_FIX_LIBTOOL_LA_LIBDIR + $(SED) "s,libdir=.*,libdir='$(STAGING_DIR)'," \ + $(STAGING_DIR)/usr/lib/libacl.la +endef + +ACL_POST_INSTALL_STAGING_HOOKS += ACL_FIX_LIBTOOL_LA_LIBDIR + +$(eval $(autotools-package)) diff --git a/package/acpid/0001-dont-use-isfdtype.patch b/package/acpid/0001-dont-use-isfdtype.patch new file mode 100644 index 0000000000..2fe6c2183b --- /dev/null +++ b/package/acpid/0001-dont-use-isfdtype.patch @@ -0,0 +1,20 @@ +Partially roll back upstream commit 4711119089e1ad08dad206f4fded68f1972fdeed +since released versions of uClibc don't support isfdtype(). + +Signed-off-by: Gustavo Zaarias + +diff -Nura acpid-2.0.22.orig/sock.c acpid-2.0.22/sock.c +--- acpid-2.0.22.orig/sock.c 2014-04-22 18:04:19.706841764 -0300 ++++ acpid-2.0.22/sock.c 2014-04-22 18:05:08.285479625 -0300 +@@ -53,7 +53,10 @@ + int + is_socket(int fd) + { +- return (isfdtype(fd, S_IFSOCK) == 1); ++ int v; ++ socklen_t l = sizeof(int); ++ ++ return (getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0); + } + + /* accept a new client connection */ diff --git a/package/acpid/0002-add-missing-defines.patch b/package/acpid/0002-add-missing-defines.patch new file mode 100644 index 0000000000..a85315911f --- /dev/null +++ b/package/acpid/0002-add-missing-defines.patch @@ -0,0 +1,40 @@ +Add missing MSG_CMSG_CLOEXEC + +Unpatched uClibc toolchains, even using the latest 0.9.33.2, do not +have the MSG_CMSG_CLOEXEC definition. Even though the Buildroot +internal toolchain backend has a uClibc patch to provide it, it +doesn't apply to external toolchains. This patch provides the +definition of MSG_CMSG_CLOEXEC. + +Signed-off-by: Thomas Petazzoni + +Index: b/libnetlink.h +=================================================================== +--- a/libnetlink.h ++++ b/libnetlink.h +@@ -7,6 +7,10 @@ + #include + #include + ++#ifndef MSG_CMSG_CLOEXEC ++#define MSG_CMSG_CLOEXEC 0x40000000 ++#endif ++ + struct rtnl_handle + { + int fd; +Index: b/kacpimon/libnetlink.h +=================================================================== +--- a/kacpimon/libnetlink.h ++++ b/kacpimon/libnetlink.h +@@ -7,6 +7,10 @@ + #include + #include + ++#ifndef MSG_CMSG_CLOEXEC ++#define MSG_CMSG_CLOEXEC 0x40000000 ++#endif ++ + struct rtnl_handle + { + int fd; diff --git a/package/acpid/Config.in b/package/acpid/Config.in new file mode 100644 index 0000000000..5aec7f13c8 --- /dev/null +++ b/package/acpid/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_ACPID + bool "acpid" + depends on BR2_x86_64 || BR2_i386 + help + Advanced Configuration and Power Interface event daemon. + + Acpid is designed to notify user-space programs of ACPI events, + and allows you to configure specific actions for specific events. + + http://sourceforge.net/projects/acpid2/ diff --git a/package/acpid/S02acpid b/package/acpid/S02acpid new file mode 100755 index 0000000000..e8d3661674 --- /dev/null +++ b/package/acpid/S02acpid @@ -0,0 +1,22 @@ +#!/bin/sh + +case "$1" in + start) + printf "Starting acpid: " + start-stop-daemon -S -q -m -b -p /var/run/acpid.pid --exec /usr/sbin/acpid -- -n + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping acpid: " + start-stop-daemon -K -q -p /var/run/acpid.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart) + "$0" stop + sleep 1 + "$0" start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + ;; +esac diff --git a/package/acpid/acpid.hash b/package/acpid/acpid.hash new file mode 100644 index 0000000000..91990fd108 --- /dev/null +++ b/package/acpid/acpid.hash @@ -0,0 +1,3 @@ +# From https://sourceforge.net/projects/acpid2/files/ +md5 e41bdf628e122edb4342fca432ea7db9 acpid-2.0.27.tar.xz +sha1 aabf129499f99b3c14e7a9f5b5ec717b0913e9c8 acpid-2.0.27.tar.xz diff --git a/package/acpid/acpid.mk b/package/acpid/acpid.mk new file mode 100644 index 0000000000..510282bb48 --- /dev/null +++ b/package/acpid/acpid.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# acpid +# +################################################################################ + +ACPID_VERSION = 2.0.27 +ACPID_SOURCE = acpid-$(ACPID_VERSION).tar.xz +ACPID_SITE = http://downloads.sourceforge.net/project/acpid2 +ACPID_LICENSE = GPLv2+ +ACPID_LICENSE_FILES = COPYING + +define ACPID_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/acpid/S02acpid \ + $(TARGET_DIR)/etc/init.d/S02acpid +endef + +define ACPID_SET_EVENTS + mkdir -p $(TARGET_DIR)/etc/acpi/events + printf "event=button[ /]power\naction=/sbin/poweroff\n" \ + >$(TARGET_DIR)/etc/acpi/events/powerbtn +endef + +ACPID_POST_INSTALL_TARGET_HOOKS += ACPID_SET_EVENTS + +$(eval $(autotools-package)) diff --git a/package/acsccid/Config.in b/package/acsccid/Config.in new file mode 100644 index 0000000000..90624ee797 --- /dev/null +++ b/package/acsccid/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_ACSCCID + bool "acsccid" + depends on BR2_TOOLCHAIN_HAS_THREADS # pcsc-lite, libusb + depends on BR2_USE_MMU # pcsc-lite + depends on !BR2_STATIC_LIBS # pcsc-lite + select BR2_PACKAGE_PCSC_LITE + # Even though there is a --disable-libusb option, it has in + # fact no effect, and acsccid really requires libusb. + select BR2_PACKAGE_LIBUSB + help + acsccid is a PC/SC driver for Linux/Mac OS X and it supports + ACS CCID smart card readers. + + http://acsccid.sourceforge.net/ + +comment "acsccid needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/acsccid/acsccid.hash b/package/acsccid/acsccid.hash new file mode 100644 index 0000000000..1bfe9e4b59 --- /dev/null +++ b/package/acsccid/acsccid.hash @@ -0,0 +1,3 @@ +# From https://sourceforge.net/projects/acsccid/files/acsccid/1.1.1/ +sha1 ae340256bbba36032a903c9f89883297a31ca340 acsccid-1.1.1.tar.bz2 +md5 26dc34141188e64fa2b3545032060357 acsccid-1.1.1.tar.bz2 diff --git a/package/acsccid/acsccid.mk b/package/acsccid/acsccid.mk new file mode 100644 index 0000000000..c2e7d2157e --- /dev/null +++ b/package/acsccid/acsccid.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# acsccid +# +################################################################################ + +ACSCCID_VERSION = 1.1.1 +ACSCCID_SOURCE = acsccid-$(ACSCCID_VERSION).tar.bz2 +ACSCCID_SITE = http://downloads.sourceforge.net/acsccid +ACSCCID_LICENSE = LGPLv2.1+ +ACSCCID_LICENSE_FILES = COPYING +ACSCCID_INSTALL_STAGING = YES +ACSCCID_DEPENDENCIES = pcsc-lite host-flex host-pkgconf libusb + +$(eval $(autotools-package)) diff --git a/package/adwaita-icon-theme/Config.in b/package/adwaita-icon-theme/Config.in new file mode 100644 index 0000000000..d200570e76 --- /dev/null +++ b/package/adwaita-icon-theme/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_ADWAITA_ICON_THEME + bool "adwaita icon theme" + depends on BR2_PACKAGE_LIBGTK2 || BR2_PACKAGE_LIBGTK3 + help + Adwaita icon theme diff --git a/package/adwaita-icon-theme/adwaita-icon-theme.hash b/package/adwaita-icon-theme/adwaita-icon-theme.hash new file mode 100644 index 0000000000..a416e235fa --- /dev/null +++ b/package/adwaita-icon-theme/adwaita-icon-theme.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/adwaita-icon-theme/3.20/adwaita-icon-theme-3.20.sha256sum +sha256 7a0a887349f340dd644032f89d81264b694c4b006bd51af1c2c368d431e7ae35 adwaita-icon-theme-3.20.tar.xz diff --git a/package/adwaita-icon-theme/adwaita-icon-theme.mk b/package/adwaita-icon-theme/adwaita-icon-theme.mk new file mode 100644 index 0000000000..24ce3504f3 --- /dev/null +++ b/package/adwaita-icon-theme/adwaita-icon-theme.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# adwaita-icon-theme +# +################################################################################ + +ADWAITA_ICON_THEME_VERSION = 3.20 +ADWAITA_ICON_THEME_SITE = http://ftp.gnome.org/pub/gnome/sources/adwaita-icon-theme/$(ADWAITA_ICON_THEME_VERSION) +ADWAITA_ICON_THEME_SOURCE = adwaita-icon-theme-$(ADWAITA_ICON_THEME_VERSION).tar.xz +ADWAITA_ICON_THEME_LICENSE = LGPLv3 or CC-BY-SA-3.0 +ADWAITA_ICON_THEME_LICENSE_FILES = COPYING COPYING_LGPL COPYING_CCBYSA3 +ADWAITA_ICON_THEME_DEPENDENCIES = host-intltool host-libgtk3 + +$(eval $(autotools-package)) diff --git a/package/aer-inject/Config.in b/package/aer-inject/Config.in new file mode 100644 index 0000000000..7c737d4280 --- /dev/null +++ b/package/aer-inject/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_AER_INJECT + bool "aer-inject" + help + aer-inject allows to inject PCIE AER errors on the software + level into a running Linux kernel. This is intended for + validation of the PCIE driver error recovery handler and + PCIE AER core handler. + + Requires a new Linux kernel with PCIE AER error injection + patches. + + https://git.kernel.org/cgit/linux/kernel/git/gong.chen/aer-inject.git/ diff --git a/package/aer-inject/aer-inject.mk b/package/aer-inject/aer-inject.mk new file mode 100644 index 0000000000..69189b1668 --- /dev/null +++ b/package/aer-inject/aer-inject.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# aer-inject +# +################################################################################ + +AER_INJECT_VERSION = 9bd5e2c7886fca72f139cd8402488a2235957d41 +AER_INJECT_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/gong.chen/aer-inject.git +AER_INJECT_SITE_METHOD = git +AER_INJECT_LICENSE = GPLv2 +AER_INJECT_LICENSE_FILES = README +AER_INJECT_DEPENDENCIES = host-flex host-bison + +define AER_INJECT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define AER_INJECT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + DESTDIR=$(TARGET_DIR) PREFIX=/usr/bin install +endef + +$(eval $(generic-package)) diff --git a/package/aespipe/Config.in b/package/aespipe/Config.in new file mode 100644 index 0000000000..df99523be2 --- /dev/null +++ b/package/aespipe/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_AESPIPE + bool "aespipe" + depends on BR2_USE_MMU # fork() + help + aespipe program is AES encrypting or decrypting pipe. It reads from + standard input and writes to standard output. It can be used to + create and restore encrypted tar or cpio archives. It can be used to + encrypt and decrypt loop-AES compatible encrypted disk images. + + http://koti.tnnet.fi/jari.ruusu/linux/ diff --git a/package/aespipe/Config.in.host b/package/aespipe/Config.in.host new file mode 100644 index 0000000000..b64868ce74 --- /dev/null +++ b/package/aespipe/Config.in.host @@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_AESPIPE + bool "host aespipe" + help + aespipe program is AES encrypting or decrypting pipe. It + reads from standard input and writes to standard output. It + can be used to create and restore encrypted tar or cpio + archives. It can be used to encrypt and decrypt loop-AES + compatible encrypted disk images. + + http://koti.tnnet.fi/jari.ruusu/linux/ diff --git a/package/aespipe/aespipe.hash b/package/aespipe/aespipe.hash new file mode 100644 index 0000000000..fa66b97d55 --- /dev/null +++ b/package/aespipe/aespipe.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 260190beea911190a839e711f610ec3454a9b13985d35479775b7e26ad4c845e aespipe-v2.4c.tar.bz2 diff --git a/package/aespipe/aespipe.mk b/package/aespipe/aespipe.mk new file mode 100644 index 0000000000..c567092ae8 --- /dev/null +++ b/package/aespipe/aespipe.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# aespipe +# +################################################################################ + +AESPIPE_VERSION = 2.4c +AESPIPE_SOURCE = aespipe-v$(AESPIPE_VERSION).tar.bz2 +AESPIPE_SITE = http://loop-aes.sourceforge.net/aespipe +AESPIPE_LICENSE = GPL + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/agentpp/Config.in b/package/agentpp/Config.in new file mode 100644 index 0000000000..4b70a1a738 --- /dev/null +++ b/package/agentpp/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_AGENTPP + bool "agent++" + select BR2_PACKAGE_SNMPPP + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # snmp++ + depends on !BR2_STATIC_LIBS # snmp++ + help + AGENT++ is a set of C++ classes which provides a complete protocol + engine and dispatch table for the development of SNMP agents. + AGENT++ is a multilingual API which supports SNMPv1, SNMPv2c, and + SNMPv3. It provides various C++ classes implementing prototypes for + scalar and table SNMP managed objects that can be customized by + derivation. Additional classes support the development of proxy + agents as well as sending notifications. + + SNMPv3 support is enabled if SNMP++ enables it. + + http://www.agentpp.com/agentpp3_5/agentpp3_5.html + +comment "agent++ needs a toolchain w/ threads, C++, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/agentpp/agentpp.hash b/package/agentpp/agentpp.hash new file mode 100644 index 0000000000..6b992f9769 --- /dev/null +++ b/package/agentpp/agentpp.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 d473b98d5f08e572b474c375c11ff1c4c5323824eb721c3979b6c5258b72949d agent++-4.0.4.tar.gz diff --git a/package/agentpp/agentpp.mk b/package/agentpp/agentpp.mk new file mode 100644 index 0000000000..7b1edec719 --- /dev/null +++ b/package/agentpp/agentpp.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# agentpp +# +################################################################################ + +AGENTPP_VERSION = 4.0.4 +AGENTPP_SOURCE = agent++-$(AGENTPP_VERSION).tar.gz +AGENTPP_SITE = http://www.agentpp.com/download +AGENTPP_LICENSE = Apache-2.0 +AGENTPP_LICENSE_FILES = LICENSE-2_0.txt +AGENTPP_INSTALL_STAGING = YES +AGENTPP_DEPENDENCIES = host-pkgconf snmppp +AGENTPP_CONF_OPTS += \ + --disable-proxy \ + --disable-forwarder \ + --disable-rpath + +$(eval $(autotools-package)) diff --git a/package/aiccu/0001-gnutls.patch b/package/aiccu/0001-gnutls.patch new file mode 100644 index 0000000000..462179ee6b --- /dev/null +++ b/package/aiccu/0001-gnutls.patch @@ -0,0 +1,73 @@ +aiccu.h, common.c, common.h: fixes for deprecated GNUTLS functions and types + +Signed-off-by: Michael Rommel + +diff -purN aiccu_20070115.orig/common/aiccu.h aiccu_20070115/common/aiccu.h +--- aiccu_20070115.orig/common/aiccu.h 2007-01-15 13:01:43.000000000 +0100 ++++ aiccu_20070115/common/aiccu.h 2013-08-31 23:50:53.651936146 +0200 +@@ -111,7 +111,7 @@ struct AICCU_conf + #endif + + #ifdef AICCU_GNUTLS +- gnutls_certificate_credentials tls_cred; /* GNUTLS credentials */ ++ gnutls_certificate_credentials_t tls_cred; /* GNUTLS credentials */ + #endif + + bool daemonize; /* Daemonize? */ +diff -purN aiccu_20070115.orig/common/common.c aiccu_20070115/common/common.c +--- aiccu_20070115.orig/common/common.c 2006-12-21 15:08:50.000000000 +0100 ++++ aiccu_20070115/common/common.c 2013-09-01 01:21:36.031396740 +0200 +@@ -271,9 +271,8 @@ TLSSOCKET sock_alloc(void); + TLSSOCKET sock_alloc(void) + { + #ifdef AICCU_GNUTLS +- /* Allow connections to servers that have OpenPGP keys as well */ +- const int cert_type_priority[3] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 }; + int ret; ++ const char *err; + #endif /* AICCU_GNUTLS*/ + + TLSSOCKET sock; +@@ -297,11 +296,16 @@ TLSSOCKET sock_alloc(void) + } + + /* Use default priorities */ +- gnutls_set_default_priority(sock->session); +- /* XXX: Return value is not documented in GNUTLS documentation! */ +- +- gnutls_certificate_type_set_priority(sock->session, cert_type_priority); +- /* XXX: Return value is not documented in GNUTLS documentation! */ ++ ret = gnutls_priority_set_direct(sock->session, "NORMAL", &err); ++ if (ret < 0) ++ { ++ if (ret == GNUTLS_E_INVALID_REQUEST) ++ { ++ dolog( LOG_ERR, "TLS set priority failed, syntax error at: %s\n", err); ++ } ++ free(sock); ++ return NULL; ++ } + + /* Configure the x509 credentials for the current session */ + gnutls_credentials_set(sock->session, GNUTLS_CRD_CERTIFICATE, g_aiccu->tls_cred); +@@ -474,7 +478,7 @@ bool sock_gotls(TLSSOCKET sock) + } + + /* Set the transport */ +- gnutls_transport_set_ptr(sock->session, (gnutls_transport_ptr)sock->socket); ++ gnutls_transport_set_ptr(sock->session, (gnutls_transport_ptr_t) sock->socket); + + /* Perform the TLS handshake */ + ret = gnutls_handshake(sock->session); +diff -purN aiccu_20070115.orig/common/common.h aiccu_20070115/common/common.h +--- aiccu_20070115.orig/common/common.h 2007-01-11 15:50:51.000000000 +0100 ++++ aiccu_20070115/common/common.h 2013-08-31 23:26:13.683659455 +0200 +@@ -381,7 +381,7 @@ struct tlssocket + SOCKET socket; + #ifdef AICCU_GNUTLS + bool tls_active; /* TLS active? */ +- gnutls_session session; /* The GnuTLS sesision */ ++ gnutls_session_t session; /* The GnuTLS sesision */ + #endif + }; + diff --git a/package/aiccu/0002-makefile-reorder-linked-libraries.patch b/package/aiccu/0002-makefile-reorder-linked-libraries.patch new file mode 100644 index 0000000000..22f04a91a4 --- /dev/null +++ b/package/aiccu/0002-makefile-reorder-linked-libraries.patch @@ -0,0 +1,15 @@ +Makefile: change LDFLAGS order on the compile line for --static + +Signed-off-by: Michael Rommel + +--- aiccu_20070115.orig/unix-console/Makefile 2007-01-15 12:04:27.000000000 +0100 ++++ aiccu_20070115/unix-console/Makefile 2013-09-29 22:54:42.742963861 +0200 +@@ -144,7 +144,7 @@ endif + all: aiccu + + aiccu: $(OBJS) ${SRCS} ${INCS} +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS) ++ $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) + ifeq ($(shell echo $(CFLAGS) | grep -c "DEBUG"),0) + ifeq ($(shell echo "$(RPM_OPT_FLAGS)" | wc -c),1) + strip $@ diff --git a/package/aiccu/0003-clock-suite-functions-fix.patch b/package/aiccu/0003-clock-suite-functions-fix.patch new file mode 100644 index 0000000000..365e72a227 --- /dev/null +++ b/package/aiccu/0003-clock-suite-functions-fix.patch @@ -0,0 +1,18 @@ +aiccu: fix undefined reference to clock_* functions + +Since glibc 2.17 the clock_* suite functions are available directly in +the main C library. For previous versions we still need -lrt to link. + +Signed-off-by: Vicente Olivert Riera + +--- aiccu/unix-console/Makefile.orig 2014-01-14 10:17:20.204602513 +0000 ++++ aiccu/unix-console/Makefile 2014-01-14 10:17:31.435777359 +0000 +@@ -42,7 +42,7 @@ CFLAGS += -D AICCU_CONSOLE + # Currently defaultly builds only on Linux, but other platforms might easily also support it + ifeq ($(shell uname | grep -c "Linux"),1) + CFLAGS += -D AICCU_GNUTLS +-LDFLAGS += -lgnutls ++LDFLAGS += -lgnutls -lrt + endif + + # Linux diff --git a/package/aiccu/0004-if-ether-header.patch b/package/aiccu/0004-if-ether-header.patch new file mode 100644 index 0000000000..48e8ceb6b1 --- /dev/null +++ b/package/aiccu/0004-if-ether-header.patch @@ -0,0 +1,23 @@ +musl does not allow using together with headers. +Since there are both netinet/if_ether.h and linux/if_ether.h providing +the same definitions, use linux/if_ether.h whenever other linux/* +headers are included. + +Signed-off-by: Alex Suykov + +--- aiccu/common/common.h ++++ aiccu/common/common.h +@@ -91,11 +91,12 @@ + #include + + #include +- #include + #ifdef linux + #include ++ #include + #include + #else ++ #include + #ifdef _DFBSD + #include + #else diff --git a/package/aiccu/0005-res-ninit.patch b/package/aiccu/0005-res-ninit.patch new file mode 100644 index 0000000000..faf38df08d --- /dev/null +++ b/package/aiccu/0005-res-ninit.patch @@ -0,0 +1,33 @@ +res_ninit is available in glibc but not in uclibc or musl. + +Signed-off-by: Alex Suykov + +--- aiccu/common/resolver.c ++++ aiccu/common/resolver.c +@@ -26,7 +26,7 @@ + + int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record)) + { +-#ifdef _LINUX ++#if defined(__GLIBC__) && !defined(__UCLIBC__) + struct __res_state res; + #endif + unsigned char answer[8192]; +@@ -38,7 +38,7 @@ int getrrs(const char *label, int rrtype + uint16_t type = 0, class = 0; + uint32_t ttl = 0; + +-#ifdef _LINUX ++#if defined(__GLIBC__) && !defined(__UCLIBC__) + memset(&res, 0, sizeof(res)); + res.options = RES_DEBUG; + res_ninit(&res); +@@ -47,7 +47,7 @@ int getrrs(const char *label, int rrtype + #endif + + memset(answer, 0, sizeof(answer)); +-#ifdef _LINUX ++#if defined(__GLIBC__) && !defined(__UCLIBC__) + ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer)); + #else + ret = res_query(label, C_IN, rrtype, answer, sizeof(answer)); diff --git a/package/aiccu/Config.in b/package/aiccu/Config.in new file mode 100644 index 0000000000..b346328dcc --- /dev/null +++ b/package/aiccu/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_AICCU + bool "aiccu" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_GNUTLS + help + SixXS Automatic IPv6 Connectivity Client Utility + + AICCU (Automatic IPv6 Connectivity Client Utility) makes it + easy for users to get IPv6 connectivity. After having + requested an account, tunnel and optionally a subnet, AICCU + can be used to automatically configure the tunnel. AICCU + supports TIC (Tunnel Information & Control protocol), which it + uses for retrieving the tunnel configuration information, + AYIYA, which allows tunnels to be created even behind + firewalls and NAT's. + + http://www.sixxs.net/tools/aiccu/ + +comment "aiccu needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !(BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/aiccu/aiccu.hash b/package/aiccu/aiccu.hash new file mode 100644 index 0000000000..26c4081fe4 --- /dev/null +++ b/package/aiccu/aiccu.hash @@ -0,0 +1,2 @@ +# From https://www.sixxs.net/archive/sixxs/aiccu/unix/ +md5 c9bcc83644ed788e22a7c3f3d4021350 aiccu_20070115.tar.gz diff --git a/package/aiccu/aiccu.mk b/package/aiccu/aiccu.mk new file mode 100644 index 0000000000..60d65dd014 --- /dev/null +++ b/package/aiccu/aiccu.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# aiccu +# +################################################################################ + +AICCU_VERSION = 20070115 +AICCU_SOURCE = aiccu_$(AICCU_VERSION).tar.gz +AICCU_SITE = http://www.sixxs.net/archive/sixxs/aiccu/unix +AICCU_LICENSE = SixXS License, concise redistribution license +AICCU_LICENSE_FILES = doc/LICENSE +AICCU_DEPENDENCIES = gnutls + +AICCU_LFDLAGS = $(TARGET_LDFLAGS) + +# aiccu forgets to link with gnutls' dependencies breaking the build when +# linking statically +ifeq ($(BR2_STATIC_LIBS),y) +AICCU_LDFLAGS += `$(PKG_CONFIG_HOST_BINARY) --libs gnutls` +endif + +# dummy RPM_OPT_FLAGS to disable stripping +define AICCU_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) LDFLAGS="$(AICCU_LDFLAGS)" $(MAKE) \ + CC="$(TARGET_CC)" RPM_OPT_FLAGS=1 -C $(@D)/unix-console all +endef + +define AICCU_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/unix-console/aiccu \ + $(TARGET_DIR)/usr/sbin/aiccu + $(INSTALL) -D -m 0644 $(@D)/doc/aiccu.conf \ + $(TARGET_DIR)/etc/aiccu.conf +endef + +define AICCU_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 $(@D)/doc/aiccu.init \ + $(TARGET_DIR)/etc/init.d/S50aiccu +endef + +$(eval $(generic-package)) diff --git a/package/aircrack-ng/0001-Makefile-use-pkg-config-to-find-libpcre-it-s-more-cros.patch b/package/aircrack-ng/0001-Makefile-use-pkg-config-to-find-libpcre-it-s-more-cros.patch new file mode 100644 index 0000000000..733e0c06d2 --- /dev/null +++ b/package/aircrack-ng/0001-Makefile-use-pkg-config-to-find-libpcre-it-s-more-cros.patch @@ -0,0 +1,39 @@ +From 98149c7664e99cc8ce9c9b1abf2fa90d9cd68e0d Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Wed, 5 Nov 2014 09:38:12 -0300 +Subject: [PATCH] Makefile: use pkg-config to find libpcre, it's more + cross-compile friendly + +Signed-off-by: Gustavo Zacarias +--- +Status: Upstream http://trac.aircrack-ng.org/ticket/1526 + +diff --git a/common.mak b/common.mak +index 6e5694b..d875708 100644 +--- a/common.mak ++++ b/common.mak +@@ -39,7 +39,7 @@ PCRE = true + endif + + ifeq ($(PCRE), true) +-COMMON_CFLAGS += $(shell pcre-config --cflags) -DHAVE_PCRE ++COMMON_CFLAGS += $(shell $(PKG_CONFIG) --cflags libpcre) -DHAVE_PCRE + endif + + ifeq ($(OSNAME), cygwin) +diff --git a/src/Makefile b/src/Makefile +index f9217f9..14350b6 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -16,7 +16,7 @@ BINFILES = aircrack-ng$(EXE) airdecap-ng$(EXE) packetforge-ng$(EXE) \ + + LIBPCRE = + ifeq ($(PCRE), true) +- LIBPCRE = $(shell pcre-config --libs) ++ LIBPCRE = $(shell $(PKG_CONFIG) --libs libpcre) + endif + + ifneq ($(OSNAME), cygwin) #There is yet no libpcap support for windows, so we skip the crawler +-- +2.0.4 + diff --git a/package/aircrack-ng/0002-Optionally-use-LIBPCAP-for-required-libpcap-libraries.patch b/package/aircrack-ng/0002-Optionally-use-LIBPCAP-for-required-libpcap-libraries.patch new file mode 100644 index 0000000000..c92bb8df89 --- /dev/null +++ b/package/aircrack-ng/0002-Optionally-use-LIBPCAP-for-required-libpcap-libraries.patch @@ -0,0 +1,33 @@ +From 1abf7a6aad3d7931de2c01b578f62986b75de2f5 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 11 Nov 2014 16:23:42 -0300 +Subject: [PATCH] Optionally use LIBPCAP for required libpcap libraries + +Signed-off-by: Gustavo Zacarias +--- +Status: Reported http://trac.aircrack-ng.org/ticket/1528 + +diff --git a/src/Makefile b/src/Makefile +index 14350b6..7bd4271 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -23,6 +23,7 @@ ifneq ($(OSNAME), cygwin) #There is yet no libpcap support for windows, so we sk + HAVE_PCAP = $(shell ld -lpcap 2> /dev/null && echo yes) + ifeq ($(HAVE_PCAP), yes) #cannot link with -lpcap, skip crawler + BINFILES += besside-ng-crawler$(EXE) ++ LIBPCAP = -lpcap + endif + endif + +@@ -168,7 +169,7 @@ besside-ng$(EXE): $(OBJS_BS) $(LIBOSD) + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_BS) -o $(@) $(LIBS) $(LIBSSL) -lz $(LIBPCRE) + + besside-ng-crawler$(EXE): $(OBJS_BC) +- $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_BC) -o $(@) -lpcap ++ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_BC) -o $(@) $(LIBPCAP) + + makeivs-ng$(EXE): $(OBJS_MI) + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_MI) -o $(@) $(LDFLAGS) +-- +2.0.4 + diff --git a/package/aircrack-ng/0003-Wesside-ng-Use-termios-instead-of-sys-termios.patch b/package/aircrack-ng/0003-Wesside-ng-Use-termios-instead-of-sys-termios.patch new file mode 100644 index 0000000000..a10ee4543b --- /dev/null +++ b/package/aircrack-ng/0003-Wesside-ng-Use-termios-instead-of-sys-termios.patch @@ -0,0 +1,27 @@ +From 42de9f800056601443ac12edbba7bd5802740db2 Mon Sep 17 00:00:00 2001 +From: Thomas d'Otreppe +Date: Wed, 8 Apr 2015 01:25:07 +0000 +Subject: [PATCH] Wesside-ng: Use termios instead of sys/termios. + +git-svn-id: http://svn.aircrack-ng.org/trunk@2533 28c6078b-6c39-48e3-add9-af49d547ecab +Signed-off-by: Romain Naour +--- + src/wesside-ng.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/wesside-ng.c b/src/wesside-ng.c +index 711d8b7..f44438a 100644 +--- a/src/wesside-ng.c ++++ b/src/wesside-ng.c +@@ -33,7 +33,7 @@ + + #include + #include +-#include ++#include + #include + #include + #include +-- +2.4.3 + diff --git a/package/aircrack-ng/0004-fix-musl-build.patch b/package/aircrack-ng/0004-fix-musl-build.patch new file mode 100644 index 0000000000..cc093d38df --- /dev/null +++ b/package/aircrack-ng/0004-fix-musl-build.patch @@ -0,0 +1,53 @@ +From da6e87670ad4639371da056f9e36201a9236dfa2 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Wed, 29 Jul 2015 19:38:46 +0200 +Subject: [PATCH] fix musl build + +aircrack-ng doesn't build with a musl toolchain due to +cdefs.h internal glibc header being used in internal +ethernet.h [1]. + +[1] http://wiki.musl-libc.org/wiki/FAQ + +Signed-off-by: Romain Naour +--- + src/include/ethernet.h | 20 +++++++++++--------- + 1 file changed, 11 insertions(+), 9 deletions(-) + +diff --git a/src/include/ethernet.h b/src/include/ethernet.h +index 72d5e81..e9d9236 100644 +--- a/src/include/ethernet.h ++++ b/src/include/ethernet.h +@@ -389,18 +389,20 @@ void ether_vlan_mtap(struct bpf_if *, struct mbuf *, + + #else /* _KERNEL */ + +-#include +- + /* + * Ethernet address conversion/parsing routines. + */ +-__BEGIN_DECLS +-struct ether_addr *ether_aton(const char *); +-int ether_hostton(const char *, struct ether_addr *); +-int ether_line(const char *, struct ether_addr *, char *); +-char *ether_ntoa(const struct ether_addr *); +-int ether_ntohost(char *, const struct ether_addr *); +-__END_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif ++ struct ether_addr *ether_aton(const char *); ++ int ether_hostton(const char *, struct ether_addr *); ++ int ether_line(const char *, struct ether_addr *, char *); ++ char *ether_ntoa(const struct ether_addr *); ++ int ether_ntohost(char *, const struct ether_addr *); ++#ifdef __cplusplus ++} ++#endif + + #endif /* !_KERNEL */ + +-- +2.4.3 + diff --git a/package/aircrack-ng/Config.in b/package/aircrack-ng/Config.in new file mode 100644 index 0000000000..00ce4e48b7 --- /dev/null +++ b/package/aircrack-ng/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_AIRCRACK_NG + bool "aircrack-ng" + depends on BR2_USE_MMU # uses fork() + # libnl has issues when linking statically + # they need fixing in libnl itself + select BR2_PACKAGE_LIBNL if !BR2_STATIC_LIBS + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + depends on BR2_TOOLCHAIN_HAS_THREADS + help + A set of tools for auditing wireless networks + + For complete functionality, also select ethtool, iw, rfkill, + util-linux utilities, and wireless_tools. + + http://www.aircrack-ng.org/ + +comment "aircrack-ng needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/aircrack-ng/aircrack-ng.hash b/package/aircrack-ng/aircrack-ng.hash new file mode 100644 index 0000000000..1ed27fc4ee --- /dev/null +++ b/package/aircrack-ng/aircrack-ng.hash @@ -0,0 +1,3 @@ +# From http://www.aircrack-ng.org/downloads.html +sha1 b5ff7d0fffb72095311bbe8824ab98aaac62db8f aircrack-ng-1.2-rc1.tar.gz +md5 c2f8648c92f7e46051c86c618d4fb0d5 aircrack-ng-1.2-rc1.tar.gz diff --git a/package/aircrack-ng/aircrack-ng.mk b/package/aircrack-ng/aircrack-ng.mk new file mode 100644 index 0000000000..7e5464d382 --- /dev/null +++ b/package/aircrack-ng/aircrack-ng.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# aircrack-ng +# +################################################################################ + +AIRCRACK_NG_VERSION = 1.2-rc1 +AIRCRACK_NG_SITE = http://download.aircrack-ng.org +AIRCRACK_NG_LICENSE = GPLv2+ +AIRCRACK_NG_LICENSE_FILES = LICENSE +AIRCRACK_NG_DEPENDENCIES = openssl zlib host-pkgconf +# Enable buddy-ng, easside-ng, tkiptun-ng, wesside-ng +AIRCRACK_NG_MAKE_OPTS = unstable=true + +# Account for libpthread in static +AIRCRACK_NG_LDFLAGS = $(TARGET_LDFLAGS) \ + $(if $(BR2_STATIC_LIBS),-lpthread -lz) + +# libnl support has issues when building static +ifeq ($(BR2_STATIC_LIBS),y) +AIRCRACK_NG_MAKE_OPTS += libnl=false +else +AIRCRACK_NG_MAKE_OPTS += libnl=true +AIRCRACK_NG_DEPENDENCIES += libnl +endif + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +AIRCRACK_NG_DEPENDENCIES += libpcap +AIRCRACK_NG_MAKE_OPTS += HAVE_PCAP=yes \ + $(if $(BR2_STATIC_LIBS),LIBPCAP="-lpcap `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`") +else +AIRCRACK_NG_MAKE_OPTS += HAVE_PCAP=no +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +AIRCRACK_NG_DEPENDENCIES += pcre +AIRCRACK_NG_MAKE_OPTS += pcre=true +else +AIRCRACK_NG_MAKE_OPTS += pcre=false +endif + +# Duplicate -lpthread, because it is also needed by sqlite +ifeq ($(BR2_PACKAGE_SQLITE),y) +AIRCRACK_NG_DEPENDENCIES += sqlite +AIRCRACK_NG_MAKE_OPTS += sqlite=true LIBSQL="-lsqlite3 $(if $(BR2_STATIC_LIBS),-lpthread)" +else +AIRCRACK_NG_MAKE_OPTS += sqlite=false +endif + +define AIRCRACK_NG_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) LDFLAGS="$(AIRCRACK_NG_LDFLAGS)" \ + $(MAKE) -C $(@D) $(AIRCRACK_NG_MAKE_OPTS) +endef + +define AIRCRACK_NG_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \ + prefix=/usr $(AIRCRACK_NG_MAKE_OPTS) install +endef + +$(eval $(generic-package)) diff --git a/package/alsa-lib/0001-musl-pcm-h.patch b/package/alsa-lib/0001-musl-pcm-h.patch new file mode 100644 index 0000000000..ce1528c572 --- /dev/null +++ b/package/alsa-lib/0001-musl-pcm-h.patch @@ -0,0 +1,33 @@ +Fix musl-related build errors in packages depending on alsa, in our case +this fixes openal. + +Downloaded from +http://git.alpinelinux.org/cgit/aports/tree/main/alsa-lib/alsa-lib_pcm_h.patch + +Signed-off-by: Bernd Kuhls + +--- alsa-lib-1.0.25/include/pcm.h ++++ alsa-lib-1.0.25.patched/include/pcm.h +@@ -33,6 +33,7 @@ + extern "C" { + #endif + ++#include + /** + * \defgroup PCM PCM Interface + * See the \ref pcm page for more details. +@@ -941,10 +942,10 @@ + int snd_pcm_format_physical_width(snd_pcm_format_t format); /* in bits */ + snd_pcm_format_t snd_pcm_build_linear_format(int width, int pwidth, int unsignd, int big_endian); + ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples); +-u_int8_t snd_pcm_format_silence(snd_pcm_format_t format); +-u_int16_t snd_pcm_format_silence_16(snd_pcm_format_t format); +-u_int32_t snd_pcm_format_silence_32(snd_pcm_format_t format); +-u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format); ++uint8_t snd_pcm_format_silence(snd_pcm_format_t format); ++uint16_t snd_pcm_format_silence_16(snd_pcm_format_t format); ++uint32_t snd_pcm_format_silence_32(snd_pcm_format_t format); ++uint64_t snd_pcm_format_silence_64(snd_pcm_format_t format); + int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int samples); + + snd_pcm_sframes_t snd_pcm_bytes_to_frames(snd_pcm_t *pcm, ssize_t bytes); diff --git a/package/alsa-lib/0002-no-mmu.patch b/package/alsa-lib/0002-no-mmu.patch new file mode 100644 index 0000000000..2ae0f67158 --- /dev/null +++ b/package/alsa-lib/0002-no-mmu.patch @@ -0,0 +1,45 @@ +Don't use fork() on noMMU platforms + +[Gustavo: update patch for 1.0.28] +Signed-off-by: Thomas Petazzoni + +Index: alsa-lib-1.0.26/configure.ac +=================================================================== +--- alsa-lib-1.0.26.orig/configure.ac 2012-09-06 10:55:14.000000000 +0200 ++++ alsa-lib-1.0.26/configure.ac 2013-03-09 16:22:08.000000000 +0100 +@@ -66,6 +66,8 @@ + AM_CONDITIONAL(ALSA_HSEARCH_R, [test "x$HAVE_HSEARCH_R" != xyes]) + AC_CHECK_FUNCS([uselocale]) + ++AC_CHECK_FUNC([fork]) ++ + SAVE_LIBRARY_VERSION + AC_SUBST(LIBTOOL_VERSION_INFO) + +Index: alsa-lib-1.0.26/src/pcm/pcm_direct.c +=================================================================== +--- alsa-lib-1.0.26.orig/src/pcm/pcm_direct.c 2012-09-06 10:55:14.000000000 +0200 ++++ alsa-lib-1.0.26/src/pcm/pcm_direct.c 2013-03-09 16:22:51.000000000 +0100 +@@ -424,13 +424,21 @@ + close(dmix->server_fd); + return ret; + } +- ++ ++#ifdef HAVE_FORK + ret = fork(); ++#else ++ ret = vfork(); ++#endif + if (ret < 0) { + close(dmix->server_fd); + return ret; + } else if (ret == 0) { ++#ifdef HAVE_FORK + ret = fork(); ++#else ++ ret = vfork(); ++#endif + if (ret == 0) + server_job(dmix); + _exit(EXIT_SUCCESS); diff --git a/package/alsa-lib/0003-dlmisc.patch b/package/alsa-lib/0003-dlmisc.patch new file mode 100644 index 0000000000..05dc70ee7e --- /dev/null +++ b/package/alsa-lib/0003-dlmisc.patch @@ -0,0 +1,57 @@ +alsa-lib: provide dummy definitions of RTLD_* if necessary + +The FLAT GNU toolchain (e.g. blackfin) doesn't include the dlfcn.h header +file, so we need to guard that include. Additionally, provide dummy +definitions for parameters RTLD_GLOBAL / RTLD_NOW which are normally +provided by dlfcn.h. + +Signed-off-by: Sonic Zhang +[Thomas: don't add separate dlmisc.h, move dummy defs to global.h] +Signed-off-by: Thomas De Schampheleire + +diff --git a/include/global.h b/include/global.h +--- a/include/global.h ++++ b/include/global.h +@@ -97,6 +97,16 @@ extern struct snd_dlsym_link *snd_dlsym_ + /** \brief Returns the version of a dynamic symbol as a string. */ + #define SND_DLSYM_VERSION(version) __STRING(version) + ++/* RTLD_NOW and RTLD_GLOBAL (used for 'mode' in snd_dlopen) are not defined ++ * on all arches (e.g. blackfin), so provide a dummy definition here. */ ++#ifndef RTLD_NOW ++#define RTLD_NOW 0 ++#endif ++ ++#ifndef RTLD_GLOBAL ++#define RTLD_GLOBAL 0 ++#endif ++ + void *snd_dlopen(const char *file, int mode); + void *snd_dlsym(void *handle, const char *name, const char *version); + int snd_dlclose(void *handle); +diff --git a/modules/mixer/simple/sbasedl.c b/modules/mixer/simple/sbasedl.c +--- a/modules/mixer/simple/sbasedl.c ++++ b/modules/mixer/simple/sbasedl.c +@@ -27,7 +27,9 @@ + #include + #include + #include ++#ifdef HAVE_LIBDL + #include ++#endif + #include "config.h" + #include "asoundlib.h" + #include "mixer_abst.h" +diff --git a/src/mixer/simple_abst.c b/src/mixer/simple_abst.c +--- a/src/mixer/simple_abst.c ++++ b/src/mixer/simple_abst.c +@@ -34,7 +34,9 @@ + #include + #include + #include ++#ifdef HAVE_LIBDL + #include ++#endif + #include "config.h" + #include "asoundlib.h" + #include "mixer_simple.h" diff --git a/package/alsa-lib/0004-conditional-enabling-of-libdl-in-m4.patch b/package/alsa-lib/0004-conditional-enabling-of-libdl-in-m4.patch new file mode 100644 index 0000000000..c533419baa --- /dev/null +++ b/package/alsa-lib/0004-conditional-enabling-of-libdl-in-m4.patch @@ -0,0 +1,35 @@ +alsa-lib: conditionally enable libdl in AM_PATH_ALSA m4 macro + +The AM_PATH_ALSA macro in utils/alsa.m4 unconditionally uses -ldl. This +breaks compilation of alsa-utils (and probably other packages using this +macro) for targets that do not support dynamic loading, such as for +Blackfin FLAT binaries. + +This patch updates the macro to check if dlopen is available, and use that +result to conditionally add -ldl to the list of libraries. + +Signed-off-by: Thomas De Schampheleire + +--- + +diff --git a/utils/alsa.m4 b/utils/alsa.m4 +--- a/utils/alsa.m4 ++++ b/utils/alsa.m4 +@@ -44,6 +44,8 @@ if test "$alsa_inc_prefix" != "" ; then + fi + AC_MSG_RESULT($ALSA_CFLAGS) + ++AC_CHECK_LIB(c, dlopen, LIBDL="", [AC_CHECK_LIB(dl, dlopen, LIBDL="-ldl")]) ++ + dnl add any special lib dirs + AC_MSG_CHECKING(for ALSA LDFLAGS) + if test "$alsa_prefix" != "" ; then +@@ -52,7 +54,7 @@ if test "$alsa_prefix" != "" ; then + fi + + dnl add the alsa library +-ALSA_LIBS="$ALSA_LIBS -lasound -lm -ldl -lpthread" ++ALSA_LIBS="$ALSA_LIBS -lasound -lm $LIBDL -lpthread" + LIBS="$ALSA_LIBS $LIBS" + AC_MSG_RESULT($ALSA_LIBS) + diff --git a/package/alsa-lib/Config.in b/package/alsa-lib/Config.in new file mode 100644 index 0000000000..97e848978c --- /dev/null +++ b/package/alsa-lib/Config.in @@ -0,0 +1,78 @@ +comment "alsa-lib needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +menuconfig BR2_PACKAGE_ALSA_LIB + bool "alsa-lib" + # Temporary until + # https://bugtrack.alsa-project.org/alsa-bug/view.php?id=4913 + # is fixed + select BR2_PACKAGE_ALSA_LIB_PCM + # Even though some parts of alsa-lib use threads only when + # available, some PCM plugins use them unconditionally. Since + # the usage of alsa-lib on no-thread systems is pretty + # unlikely, just require thread support globally for alsa-lib. + depends on BR2_TOOLCHAIN_HAS_THREADS + help + The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI + functionality to the Linux operating system. + + http://www.alsa-project.org/ + +if BR2_PACKAGE_ALSA_LIB + +config BR2_PACKAGE_ALSA_LIB_PYTHON + bool "Python support for alsa-lib" + depends on BR2_PACKAGE_PYTHON + help + Add python support for alsa-lib. + Python will be built and libpython will be installed + in the target directory + http://www.alsa-project.org/ + +config BR2_PACKAGE_ALSA_LIB_DEVDIR + string "directory with ALSA device files" + default "/dev/snd" + +config BR2_PACKAGE_ALSA_LIB_PCM_PLUGINS + string "built PCM plugins" + default "all" if BR2_USE_MMU + default "copy linear route mulaw alaw adpcm rate plug multi file null empty share meter hooks lfloat ladspa dmix dshare dsnoop asym iec958 softvol extplug ioplug mmap_emul" if !BR2_USE_MMU + +config BR2_PACKAGE_ALSA_LIB_CTL_PLUGINS + string "built control plugins" + default "all" + +config BR2_PACKAGE_ALSA_LIB_ALOAD + bool "aload" + default y + +config BR2_PACKAGE_ALSA_LIB_MIXER + bool "mixer" + default y + +config BR2_PACKAGE_ALSA_LIB_PCM + bool "pcm" + default y + +config BR2_PACKAGE_ALSA_LIB_RAWMIDI + bool "rawmidi" + default y + +config BR2_PACKAGE_ALSA_LIB_HWDEP + bool "hwdep" + default y + +config BR2_PACKAGE_ALSA_LIB_SEQ + bool "seq" + default y + +config BR2_PACKAGE_ALSA_LIB_ALISP + bool "alisp" + depends on BR2_USE_MMU + default y + +config BR2_PACKAGE_ALSA_LIB_OLD_SYMBOLS + bool "old-symbols" + default y + +endif diff --git a/package/alsa-lib/alsa-lib.hash b/package/alsa-lib/alsa-lib.hash new file mode 100644 index 0000000000..49be64392d --- /dev/null +++ b/package/alsa-lib/alsa-lib.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 8ac76c3144ed2ed49da7622ab65ac5415205913ccbedde877972383cbc234269 alsa-lib-1.1.1.tar.bz2 diff --git a/package/alsa-lib/alsa-lib.mk b/package/alsa-lib/alsa-lib.mk new file mode 100644 index 0000000000..ae0377db3e --- /dev/null +++ b/package/alsa-lib/alsa-lib.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# alsa-lib +# +################################################################################ + +ALSA_LIB_VERSION = 1.1.1 +ALSA_LIB_SOURCE = alsa-lib-$(ALSA_LIB_VERSION).tar.bz2 +ALSA_LIB_SITE = ftp://ftp.alsa-project.org/pub/lib +ALSA_LIB_LICENSE = LGPLv2.1+ +ALSA_LIB_LICENSE_FILES = COPYING +ALSA_LIB_INSTALL_STAGING = YES +ALSA_LIB_CFLAGS = $(TARGET_CFLAGS) +ALSA_LIB_AUTORECONF = YES +ALSA_LIB_CONF_OPTS = \ + --with-alsa-devdir=$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_DEVDIR)) \ + --with-pcm-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_PCM_PLUGINS))" \ + --with-ctl-plugins="$(call qstrip,$(BR2_PACKAGE_ALSA_LIB_CTL_PLUGINS))" \ + --without-versioned + +# Can't build with static & shared at the same time (1.0.25+) +ifeq ($(BR2_STATIC_LIBS),y) +ALSA_LIB_CONF_OPTS += \ + --enable-shared=no \ + --without-libdl +else +ALSA_LIB_CONF_OPTS += --enable-static=no +endif + +ifneq ($(BR2_PACKAGE_ALSA_LIB_ALOAD),y) +ALSA_LIB_CONF_OPTS += --disable-aload +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_MIXER),y) +ALSA_LIB_CONF_OPTS += --disable-mixer +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_PCM),y) +ALSA_LIB_CONF_OPTS += --disable-pcm +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_RAWMIDI),y) +ALSA_LIB_CONF_OPTS += --disable-rawmidi +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_HWDEP),y) +ALSA_LIB_CONF_OPTS += --disable-hwdep +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_SEQ),y) +ALSA_LIB_CONF_OPTS += --disable-seq +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_ALISP),y) +ALSA_LIB_CONF_OPTS += --disable-alisp +endif +ifneq ($(BR2_PACKAGE_ALSA_LIB_OLD_SYMBOLS),y) +ALSA_LIB_CONF_OPTS += --disable-old-symbols +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB_PYTHON),y) +ALSA_LIB_CONF_OPTS += \ + --with-pythonlibs=-lpython$(PYTHON_VERSION_MAJOR) \ + --with-pythonincludes=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) +ALSA_LIB_CFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) +ALSA_LIB_DEPENDENCIES = python +else +ALSA_LIB_CONF_OPTS += --disable-python +endif + +ifeq ($(BR2_SOFT_FLOAT),y) +ALSA_LIB_CONF_OPTS += --with-softfloat +endif + +ifeq ($(BR2_bfin),y) +# blackfin external toolchains don't have versionsort. Fake it using alphasort +# instead +ALSA_LIB_CFLAGS += -Dversionsort=alphasort +endif + +ALSA_LIB_CONF_ENV = \ + CFLAGS="$(ALSA_LIB_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lm" + +$(eval $(autotools-package)) diff --git a/package/alsa-utils/Config.in b/package/alsa-utils/Config.in new file mode 100644 index 0000000000..b58e6583c3 --- /dev/null +++ b/package/alsa-utils/Config.in @@ -0,0 +1,94 @@ +comment "alsa-utils needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU # fork + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +menuconfig BR2_PACKAGE_ALSA_UTILS + bool "alsa-utils" + depends on BR2_USE_MMU # fork + depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib + depends on !BR2_STATIC_LIBS # uses dlfcn.h + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + This package contains the command line utilities for the ALSA + project. + + http://www.alsa-project.org/ + +if BR2_PACKAGE_ALSA_UTILS + +config BR2_PACKAGE_ALSA_UTILS_ALSACONF + bool "alsaconf" + +config BR2_PACKAGE_ALSA_UTILS_ACONNECT + bool "aconnect" + select BR2_PACKAGE_ALSA_LIB_SEQ + +config BR2_PACKAGE_ALSA_UTILS_ALSACTL + bool "alsactl" + default y + +config BR2_PACKAGE_ALSA_UTILS_ALSALOOP + bool "alsaloop" + +config BR2_PACKAGE_ALSA_UTILS_ALSAMIXER + bool "alsamixer" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_NCURSES_TARGET_PANEL + select BR2_PACKAGE_NCURSES_TARGET_FORM + select BR2_PACKAGE_NCURSES_TARGET_MENU + select BR2_PACKAGE_ALSA_LIB_MIXER + depends on BR2_USE_WCHAR + default y + +comment "alsamixer needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_ALSA_UTILS_ALSAUCM + bool "alsaucm" + +config BR2_PACKAGE_ALSA_UTILS_ALSATPLG + bool "alsatplg" + +config BR2_PACKAGE_ALSA_UTILS_AMIDI + bool "amidi" + select BR2_PACKAGE_ALSA_LIB_RAWMIDI + select BR2_PACKAGE_ALSA_LIB_SEQ + +config BR2_PACKAGE_ALSA_UTILS_AMIXER + bool "amixer" + select BR2_PACKAGE_ALSA_LIB_MIXER + +config BR2_PACKAGE_ALSA_UTILS_APLAY + bool "aplay/arecord" + select BR2_PACKAGE_ALSA_LIB_PCM + +config BR2_PACKAGE_ALSA_UTILS_APLAYMIDI + bool "aplaymidi" + select BR2_PACKAGE_ALSA_LIB_SEQ + +config BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI + bool "arecordmidi" + select BR2_PACKAGE_ALSA_LIB_SEQ + +config BR2_PACKAGE_ALSA_UTILS_ASEQDUMP + bool "aseqdump" + select BR2_PACKAGE_ALSA_LIB_SEQ + +config BR2_PACKAGE_ALSA_UTILS_ASEQNET + bool "aseqnet" + select BR2_PACKAGE_ALSA_LIB_SEQ + +config BR2_PACKAGE_ALSA_UTILS_BAT + bool "bat" + select BR2_PACKAGE_FFTW + +config BR2_PACKAGE_ALSA_UTILS_IECSET + bool "iecset" + select BR2_PACKAGE_ALSA_LIB_PCM + +config BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST + bool "speaker-test" + select BR2_PACKAGE_ALSA_LIB_PCM + +endif diff --git a/package/alsa-utils/alsa-utils.hash b/package/alsa-utils/alsa-utils.hash new file mode 100644 index 0000000000..89eb51018c --- /dev/null +++ b/package/alsa-utils/alsa-utils.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 89757c9abaf420831b088fce354d492acc170bd02bb50eb7392c175f594b8041 alsa-utils-1.1.1.tar.bz2 diff --git a/package/alsa-utils/alsa-utils.mk b/package/alsa-utils/alsa-utils.mk new file mode 100644 index 0000000000..a04d2cb862 --- /dev/null +++ b/package/alsa-utils/alsa-utils.mk @@ -0,0 +1,86 @@ +################################################################################ +# +# alsa-utils +# +################################################################################ + +ALSA_UTILS_VERSION = 1.1.1 +ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2 +ALSA_UTILS_SITE = ftp://ftp.alsa-project.org/pub/utils +ALSA_UTILS_LICENSE = GPLv2 +ALSA_UTILS_LICENSE_FILES = COPYING +ALSA_UTILS_INSTALL_STAGING = YES +ALSA_UTILS_DEPENDENCIES = host-gettext host-pkgconf alsa-lib \ + $(if $(BR2_PACKAGE_NCURSES),ncurses) \ + $(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) +# Regenerate aclocal.m4 to pick the patched +# version of alsa.m4 from alsa-lib +ALSA_UTILS_AUTORECONF = YES +ALSA_UTILS_GETTEXTIZE = YES + +ALSA_UTILS_CONF_ENV = \ + ac_cv_prog_ncurses5_config=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) + +ALSA_UTILS_CONF_OPTS = \ + --disable-xmlto \ + --with-curses=$(if $(BR2_PACKAGE_NCURSES_WCHAR),ncursesw,ncurses) + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +ALSA_UTILS_DEPENDENCIES += gettext +ALSA_UTILS_CONF_ENV += LIBS=-lintl +endif + +ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSALOOP),y) +ALSA_UTILS_CONF_OPTS += --enable-alsaloop +else +ALSA_UTILS_CONF_OPTS += --disable-alsaloop +endif + +ifneq ($(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER),y) +ALSA_UTILS_CONF_OPTS += --disable-alsamixer --disable-alsatest +endif + +ifeq ($(BR2_PACKAGE_ALSA_UTILS_BAT),y) +ALSA_UTILS_CONF_OPTS += --enable-bat +ALSA_UTILS_DEPENDENCIES += fftw +else +ALSA_UTILS_CONF_OPTS += --disable-bat +endif + +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACONF) += usr/sbin/alsaconf +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACTL) += usr/sbin/alsactl +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSALOOP) += usr/bin/alsaloop +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER) += usr/bin/alsamixer +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSATPLG) += usr/bin/alsatplg +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_AMIDI) += usr/bin/amidi +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_AMIXER) += usr/bin/amixer +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAY) += usr/bin/aplay usr/bin/arecord +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_BAT) += usr/bin/alsabat +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_IECSET) += usr/bin/iecset +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ACONNECT) += usr/bin/aconnect +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSAUCM) += usr/bin/alsaucm +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAYMIDI) += usr/bin/aplaymidi +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI) += usr/bin/arecordmidi +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQDUMP) += usr/bin/aseqdump +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQNET) += usr/bin/aseqnet +ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST) += usr/bin/speaker-test + +define ALSA_UTILS_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/var/lib/alsa + for i in $(ALSA_UTILS_TARGETS_y); do \ + $(INSTALL) -D -m 755 $(STAGING_DIR)/$$i $(TARGET_DIR)/$$i || exit 1; \ + done + if [ -x "$(TARGET_DIR)/usr/bin/speaker-test" ]; then \ + mkdir -p $(TARGET_DIR)/usr/share/alsa/speaker-test; \ + mkdir -p $(TARGET_DIR)/usr/share/sounds/alsa; \ + cp -rdpf $(STAGING_DIR)/usr/share/alsa/speaker-test/* $(TARGET_DIR)/usr/share/alsa/speaker-test/; \ + cp -rdpf $(STAGING_DIR)/usr/share/sounds/alsa/* $(TARGET_DIR)/usr/share/sounds/alsa/; \ + fi + if [ -x "$(TARGET_DIR)/usr/sbin/alsactl" ]; then \ + mkdir -p $(TARGET_DIR)/usr/share/; \ + rm -rf $(TARGET_DIR)/usr/share/alsa/; \ + cp -rdpf $(STAGING_DIR)/usr/share/alsa/ $(TARGET_DIR)/usr/share/alsa/; \ + fi +endef + +$(eval $(autotools-package)) diff --git a/package/alsamixergui/0001-misc-fixes.patch b/package/alsamixergui/0001-misc-fixes.patch new file mode 100644 index 0000000000..6b498dadf9 --- /dev/null +++ b/package/alsamixergui/0001-misc-fixes.patch @@ -0,0 +1,40 @@ +--- a/configure.in ++++ b/configure.in +@@ -11,7 +11,10 @@ + AC_PROG_LN_S + + dnl Checks for libraries. +-AC_CHECK_LIB(fltk,numericsort,,AC_MSG_ERROR("missing fltk")) ++AC_CHECK_LIB(fltk,numericsort,, ++AC_CHECK_LIB(fltk,fl_numericsort,, ++AC_MSG_ERROR("missing fltk")) ++) + AM_PATH_ALSA(0.9.0) + + dnl Checks for header files. +--- a/src/alsamixer.cxx 2007-10-21 12:39:11.000000000 -0400 ++++ b/src/alsamixer.cxx 2007-10-21 12:49:10.000000000 -0400 +@@ -2081,8 +2081,8 @@ static void + mixer_signal_handler (int signal) + { + if (signal != SIGSEGV) +- mixer_abort (ERR_SIGNAL, sys_siglist[signal], 0); +- else ++ // mixer_abort (ERR_SIGNAL, sys_siglist[signal], 0); ++ //else + { + fprintf (stderr, "\nSegmentation fault.\n"); + _exit (11); +--- a/src/alsamixer.cxx 2006-01-16 12:41:54.000000000 -0600 ++++ b/src/alsamixer.cxx 2006-01-16 12:45:44.000000000 -0600 +@@ -653,8 +653,8 @@ + if (vleft >= 0 && vright >= 0) { + if (joined) { + #ifdef ALSAMIXER_GUI +- for (chn = snd_mixer_selem_channel_id_t(0); chn < SND_MIXER_SCHN_LAST; +- snd_mixer_selem_channel_id_t(int(chn)++)) ++ for (chn = snd_mixer_selem_channel_id_t(0); chn < SND_MIXER_SCHN_LAST; ++ snd_mixer_selem_channel_id_t(int(chn)+1)) + #else + for (chn = 0; chn < SND_MIXER_SCHN_LAST; chn++) + #endif diff --git a/package/alsamixergui/Config.in b/package/alsamixergui/Config.in new file mode 100644 index 0000000000..5b61f3861d --- /dev/null +++ b/package/alsamixergui/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_ALSAMIXERGUI + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fltk fork() + select BR2_PACKAGE_FLTK + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_ALSA_LIB_PCM + select BR2_PACKAGE_ALSA_LIB_MIXER + depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib + bool "alsamixergui" + help + A nice GUI mixer for Alsa using fltk + + http://www.iua.upf.es/~mdeboer/projects/alsamixergui/ + +comment "alsamixergui needs a toolchain w/ C++, threads" + depends on BR2_PACKAGE_XORG7 && BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/alsamixergui/alsamixergui.hash b/package/alsamixergui/alsamixergui.hash new file mode 100644 index 0000000000..5cea490a49 --- /dev/null +++ b/package/alsamixergui/alsamixergui.hash @@ -0,0 +1,2 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/a/alsamixergui/alsamixergui_0.9.0rc2-1-9.dsc +md5 af942a41b81ba27e2e4d0a1e1ab0decb alsamixergui_0.9.0rc2-1.orig.tar.gz diff --git a/package/alsamixergui/alsamixergui.mk b/package/alsamixergui/alsamixergui.mk new file mode 100644 index 0000000000..dba3ddd0c0 --- /dev/null +++ b/package/alsamixergui/alsamixergui.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# alsamixergui +# +################################################################################ + +ALSAMIXERGUI_VERSION = 0.9.0rc2-1 +ALSAMIXERGUI_SOURCE = alsamixergui_$(ALSAMIXERGUI_VERSION).orig.tar.gz +ALSAMIXERGUI_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/a/alsamixergui +ALSAMIXERGUI_AUTORECONF = YES + +ALSAMIXERGUI_CONF_ENV = \ + ac_cv_lib_fltk_numericsort=yes \ + ac_cv_lib_fltk_fl_numericsort=yes \ + ac_cv_lib_asound_snd_ctl_open=yes + +ALSAMIXERGUI_DEPENDENCIES = fltk alsa-lib + +$(eval $(autotools-package)) diff --git a/package/am335x-pru-package/0001-install-does-not-build.patch b/package/am335x-pru-package/0001-install-does-not-build.patch new file mode 100644 index 0000000000..e2f2928441 --- /dev/null +++ b/package/am335x-pru-package/0001-install-does-not-build.patch @@ -0,0 +1,23 @@ +Makefile: do not force the release build on install + +If we did build any of the other targets, and are just interested +in those and not the release one, we still want to use the 'install' +rule, but not build (and install) the release libraries. + +So, remove the dependency on the 'release' target from the 'install' +rule. + +Signed-off-by: "Yann E. MORIN" + +diff -durN am335x-pru-package-506e074859891a2b350eb4f5fcb451c4961410ea.orig/pru_sw/app_loader/interface/Makefile am335x-pru-package-506e074859891a2b350eb4f5fcb451c4961410ea/pru_sw/app_loader/interface/Makefile +--- am335x-pru-package-506e074859891a2b350eb4f5fcb451c4961410ea.orig/pru_sw/app_loader/interface/Makefile 2014-08-18 00:24:36.000000000 +0200 ++++ am335x-pru-package-506e074859891a2b350eb4f5fcb451c4961410ea/pru_sw/app_loader/interface/Makefile 2014-10-12 11:39:17.144682697 +0200 +@@ -38,7 +38,7 @@ + + all: debug release sodebug sorelease + +-install: release ++install: + install -m 0755 -d $(DESTDIR)$(PREFIX)/lib + install -m 0755 -d $(DESTDIR)$(PREFIX)/include + install -m 0644 $(LIBDIR)/* $(DESTDIR)$(PREFIX)/lib diff --git a/package/am335x-pru-package/Config.in b/package/am335x-pru-package/Config.in new file mode 100644 index 0000000000..66d777338e --- /dev/null +++ b/package/am335x-pru-package/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_AM335X_PRU_PACKAGE + bool "am335x-pru-package" + depends on BR2_arm # only relevant for TI am335x + help + TI AM335X PRU program loader + + https://github.com/beagleboard/am335x_pru_package diff --git a/package/am335x-pru-package/am335x-pru-package.mk b/package/am335x-pru-package/am335x-pru-package.mk new file mode 100644 index 0000000000..a4ff201c21 --- /dev/null +++ b/package/am335x-pru-package/am335x-pru-package.mk @@ -0,0 +1,74 @@ +################################################################################ +# +# am335x-pru-package +# +################################################################################ + +AM335X_PRU_PACKAGE_VERSION = 506e074859891a2b350eb4f5fcb451c4961410ea +AM335X_PRU_PACKAGE_SITE = $(call github,beagleboard,am335x_pru_package,$(AM335X_PRU_PACKAGE_VERSION)) +AM335X_PRU_PACKAGE_LICENSE = BSD-3c +AM335X_PRU_PACKAGE_LICENSE_FILES = pru_sw/utils/LICENCE.txt +AM335X_PRU_PACKAGE_DEPENDENCIES = host-am335x-pru-package +AM335X_PRU_PACKAGE_INSTALL_STAGING = YES + +# The default 'all' rule builds everything, when we just need the library +ifeq ($(BR2_ENABLE_DEBUG),y) +AM335X_MAKE_TARGET = debug $(if $(BR2_STATIC_LIBS),,sodebug) +else +AM335X_MAKE_TARGET = release $(if $(BR2_STATIC_LIBS),,sorelease) +endif + +define AM335X_PRU_PACKAGE_BUILD_CMDS + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" \ + -C $(@D)/pru_sw/app_loader/interface $(AM335X_MAKE_TARGET) +endef + +# 'install' installs whatever was built, and our patch removes the dependency +# on the release build, so we can use it to install whatever we built above. +define AM335X_PRU_PACKAGE_INSTALL_STAGING_CMDS + $(MAKE1) DESTDIR="$(STAGING_DIR)" PREFIX="/usr" \ + -C $(@D)/pru_sw/app_loader/interface install +endef + +define AM335X_PRU_PACKAGE_INSTALL_TARGET_CMDS + $(MAKE1) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" \ + -C $(@D)/pru_sw/app_loader/interface install +endef + +# The debug libraries are named differently than the release ones, +# so we must provide a symlink to still be able to link with them. +ifeq ($(BR2_ENABLE_DEBUG),y) + +define AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_STATIC + ln -sf libprussdrvd.a $(STAGING_DIR)/usr/lib/libprussdrv.a +endef +AM335X_PRU_PACKAGE_POST_INSTALL_STAGING_HOOKS += AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_STATIC + +ifeq ($(BR2_STATIC_LIBS),) + +define AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_SHARED + ln -sf libprussdrvd.so $(STAGING_DIR)/usr/lib/libprussdrv.so +endef +AM335X_PRU_PACKAGE_POST_INSTALL_STAGING_HOOKS += AM335X_PRU_PACKAGE_LN_DEBUG_STAGING_SHARED + +define AM335X_PRU_PACKAGE_LN_DEBUG_TARGET + ln -sf libprussdrvd.so $(TARGET_DIR)/usr/lib/libprussdrv.so +endef +AM335X_PRU_PACKAGE_POST_INSTALL_TARGET_HOOKS += AM335X_PRU_PACKAGE_LN_DEBUG_TARGET + +endif # !STATIC + +endif # DEBUG + +define HOST_AM335X_PRU_PACKAGE_BUILD_CMDS + cd $(@D)/pru_sw/utils/pasm_source; \ + $(HOSTCC) -Wall -D_UNIX_ pasm.c pasmpp.c pasmexp.c pasmop.c \ + pasmdot.c pasmstruct.c pasmmacro.c path_utils.c -o ../pasm +endef + +define HOST_AM335X_PRU_PACKAGE_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/pru_sw/utils/pasm $(HOST_DIR)/usr/bin/pasm +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/am33x-cm3/0001-fix-makefile.patch b/package/am33x-cm3/0001-fix-makefile.patch new file mode 100644 index 0000000000..f3cdb5e2b9 --- /dev/null +++ b/package/am33x-cm3/0001-fix-makefile.patch @@ -0,0 +1,30 @@ +Enforce correct -march option + +Buildroot uses a normal ARM compiler to build the AM33X CM3 firmware +(which runs on a Cortex-M3 processor), but Buildroot will have a +default -march value that doesn't necessarily match the one needed for +Cortex-M3, leading to build failures (gcc complains that the +-mcpu=cortex-m3 option being passed is not compatible with the +selected -march). + +Fix this by explicitly indicating -march=armv7-m. + +Signed-off-by: Thomas Petazzoni + +Updated the patch to the latest version of the Makefile + +Signed-off-by: Anders Darander + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -13,7 +13,7 @@ SRCDIR = src + BINDIR = bin + + INCLUDES = $(SRCDIR)/include +-CFLAGS =-mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \ ++CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -Wall -Wundef \ + -Werror-implicit-function-declaration -Wstrict-prototypes \ + -Wdeclaration-after-statement -fno-delete-null-pointer-checks \ + -Wempty-body -fno-strict-overflow -g -I$(INCLUDES) -O2 diff --git a/package/am33x-cm3/Config.in b/package/am33x-cm3/Config.in new file mode 100644 index 0000000000..060d0efc8d --- /dev/null +++ b/package/am33x-cm3/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_AM33X_CM3 + bool "am33x-cm3" + depends on BR2_arm # only relevant for TI am335x + help + Cortex-M3 binary blob for suspend-resume on am335x + + http://arago-project.org/git/projects/am33x-cm3.git diff --git a/package/am33x-cm3/S93-am335x-pm-firmware-load b/package/am33x-cm3/S93-am335x-pm-firmware-load new file mode 100755 index 0000000000..56c17b334d --- /dev/null +++ b/package/am33x-cm3/S93-am335x-pm-firmware-load @@ -0,0 +1,6 @@ +#!/bin/sh + +# Load the PM CM3 firmware +echo 1 > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/loading +cat /lib/firmware/am335x-pm-firmware.bin > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/data +echo 0 > /sys/devices/ocp.2/44d00000.wkup_m3/firmware/am335x-pm-firmware.bin/loading diff --git a/package/am33x-cm3/am33x-cm3.mk b/package/am33x-cm3/am33x-cm3.mk new file mode 100644 index 0000000000..01cb9a02ca --- /dev/null +++ b/package/am33x-cm3/am33x-cm3.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# am33x-cm3 +# +################################################################################ + +# This should correpsond to v05.00.00.02 +AM33X_CM3_VERSION = 11107db2f1e9e58ee75d4fe9cc38423c9a6e4365 +AM33X_CM3_SITE = http://arago-project.org/git/projects/am33x-cm3.git +AM33X_CM3_SITE_METHOD = git +AM33X_CM3_LICENSE = TI Publicly Available Software License +AM33X_CM3_LICENSE_FILES = License.txt + +# The build command below will use the standard cross-compiler (normally +# build for Cortex-A8, to build the FW for the Cortex-M3. +define AM33X_CM3_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) all +endef + +# Not all of the firmware files are used +define AM33X_CM3_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/bin/am335x-pm-firmware.bin \ + $(TARGET_DIR)/lib/firmware/am335x-pm-firmware.bin +endef + +define AM33X_CM3_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/am33x-cm3/S93-am335x-pm-firmware-load \ + $(TARGET_DIR)/etc/init.d/S93-am335x-pm-firmware-load +endef + +$(eval $(generic-package)) diff --git a/package/android-tools/0001-Fix-makefiles-for-out-of-tree-build.patch b/package/android-tools/0001-Fix-makefiles-for-out-of-tree-build.patch new file mode 100644 index 0000000000..af0723620f --- /dev/null +++ b/package/android-tools/0001-Fix-makefiles-for-out-of-tree-build.patch @@ -0,0 +1,162 @@ +[PATCH] Fix makefiles for out-of-tree build + +Signed-off-by: Gary Bisson +--- + debian/makefiles/adb.mk | 10 +++++----- + debian/makefiles/adbd.mk | 33 ++++++++++++++++----------------- + debian/makefiles/fastboot.mk | 17 +++++++++-------- + 3 files changed, 30 insertions(+), 30 deletions(-) + +diff --git a/debian/makefiles/adb.mk b/debian/makefiles/adb.mk +index d9d4feb..654b9f1 100644 +--- a/debian/makefiles/adb.mk ++++ b/debian/makefiles/adb.mk +@@ -1,5 +1,6 @@ + # Makefile for adb; from https://heiher.info/2227.html + ++VPATH+= $(SRCDIR)/core/adb + SRCS+= adb.c + SRCS+= adb_client.c + SRCS+= adb_auth_host.c +@@ -17,7 +18,7 @@ SRCS+= usb_linux.c + SRCS+= usb_vendors.c + SRCS+= utils.c + +-VPATH+= ../libcutils ++VPATH+= $(SRCDIR)/core/libcutils + SRCS+= abort_socket.c + SRCS+= socket_inaddr_any_server.c + SRCS+= socket_local_client.c +@@ -28,7 +29,7 @@ SRCS+= socket_network_client.c + SRCS+= list.c + SRCS+= load_file.c + +-VPATH+= ../libzipfile ++VPATH+= $(SRCDIR)/core/libzipfile + SRCS+= centraldir.c + SRCS+= zipfile.c + +@@ -37,9 +38,8 @@ CPPFLAGS+= -DADB_HOST=1 + CPPFLAGS+= -DHAVE_FORKEXEC=1 + CPPFLAGS+= -DHAVE_SYMLINKS + CPPFLAGS+= -DHAVE_TERMIO_H +-CPPFLAGS+= -I. +-CPPFLAGS+= -I../include +-CPPFLAGS+= -I../../../external/zlib ++CPPFLAGS+= -I$(SRCDIR)/core/adb ++CPPFLAGS+= -I$(SRCDIR)/core/include + + LIBS+= -lc -lpthread -lz -lcrypto + +diff --git a/debian/makefiles/adbd.mk b/debian/makefiles/adbd.mk +index 94d3a90..49dab8c 100644 +--- a/debian/makefiles/adbd.mk ++++ b/debian/makefiles/adbd.mk +@@ -1,18 +1,6 @@ + # Makefile for adbd + +-VPATH+= ../libcutils +-SRCS+= abort_socket.c +-SRCS+= socket_inaddr_any_server.c +-SRCS+= socket_local_client.c +-SRCS+= socket_local_server.c +-SRCS+= socket_loopback_client.c +-SRCS+= socket_loopback_server.c +-SRCS+= socket_network_client.c +-SRCS+= list.c +-SRCS+= load_file.c +-SRCS+= android_reboot.c +- +-#VPATH+= ../adb ++VPATH+= $(SRCDIR)/core/adbd + SRCS+= adb.c + SRCS+= backup_service.c + SRCS+= fdevent.c +@@ -31,7 +19,19 @@ SRCS+= log_service.c + SRCS+= utils.c + SRCS+= base64.c + +-VPATH+= ../libzipfile ++VPATH+= $(SRCDIR)/core/libcutils ++SRCS+= abort_socket.c ++SRCS+= socket_inaddr_any_server.c ++SRCS+= socket_local_client.c ++SRCS+= socket_local_server.c ++SRCS+= socket_loopback_client.c ++SRCS+= socket_loopback_server.c ++SRCS+= socket_network_client.c ++SRCS+= list.c ++SRCS+= load_file.c ++SRCS+= android_reboot.c ++ ++VPATH+= $(SRCDIR)/core/libzipfile + SRCS+= centraldir.c + SRCS+= zipfile.c + +@@ -40,10 +40,9 @@ CPPFLAGS+= -O2 -g -Wall -Wno-unused-parameter + CPPFLAGS+= -DADB_HOST=0 -DHAVE_FORKEXEC=1 -D_XOPEN_SOURCE -D_GNU_SOURCE -DALLOW_ADBD_ROOT=1 + CPPFLAGS+= -DHAVE_SYMLINKS -DBOARD_ALWAYS_INSECURE + CPPFLAGS+= -DHAVE_TERMIO_H +-CPPFLAGS+= -I. +-CPPFLAGS+= -I../include +-CPPFLAGS+= -I../../../external/zlib + CPPFLAGS+= `pkg-config --cflags glib-2.0 gio-2.0` ++CPPFLAGS+= -I$(SRCDIR)/core/adbd ++CPPFLAGS+= -I$(SRCDIR)/core/include + + LIBS+= -lc -lpthread -lz -lcrypto -lcrypt `pkg-config --libs glib-2.0 gio-2.0` + +diff --git a/debian/makefiles/fastboot.mk b/debian/makefiles/fastboot.mk +index 9e8b751..94a069b 100644 +--- a/debian/makefiles/fastboot.mk ++++ b/debian/makefiles/fastboot.mk +@@ -1,5 +1,6 @@ + # Makefile for fastboot; from https://heiher.info/2227.html + ++VPATH+= $(SRCDIR)/core/fastboot + SRCS+= bootimg.c + SRCS+= engine.c + SRCS+= fastboot.c +@@ -7,11 +8,11 @@ SRCS+= protocol.c + SRCS+= usb_linux.c + SRCS+= util_linux.c + +-VPATH+= ../libzipfile ++VPATH+= $(SRCDIR)/core/libzipfile + SRCS+= centraldir.c + SRCS+= zipfile.c + +-VPATH+= ../libsparse ++VPATH+= $(SRCDIR)/core/libsparse + SRCS+= backed_block.c + SRCS+= sparse_crc32.c + SRCS+= sparse.c +@@ -19,7 +20,7 @@ SRCS+= sparse_read.c + SRCS+= sparse_err.c + SRCS+= output_file.c + +-VPATH+= ../../extras/ext4_utils/ ++VPATH+= $(SRCDIR)/extras/ext4_utils/ + SRCS+= make_ext4fs.c + SRCS+= crc16.c + SRCS+= ext4_utils.c +@@ -31,11 +32,11 @@ SRCS+= extent.c + SRCS+= wipe.c + SRCS+= sha1.c + +-CPPFLAGS+= -I. +-CPPFLAGS+= -I../include +-CPPFLAGS+= -I../mkbootimg +-CPPFLAGS+= -I../../extras/ext4_utils/ +-CPPFLAGS+= -I../libsparse/include/ ++CPPFLAGS+= -I$(SRCDIR)/core/fastboot ++CPPFLAGS+= -I$(SRCDIR)/core/include ++CPPFLAGS+= -I$(SRCDIR)/core/mkbootimg ++CPPFLAGS+= -I$(SRCDIR)/extras/ext4_utils/ ++CPPFLAGS+= -I$(SRCDIR)/core/libsparse/include/ + + LIBS+= -lz -lselinux + +-- +2.5.1 + diff --git a/package/android-tools/0002-Fix-adbd-for-non-Ubuntu-systems.patch b/package/android-tools/0002-Fix-adbd-for-non-Ubuntu-systems.patch new file mode 100644 index 0000000000..35f6c8a3be --- /dev/null +++ b/package/android-tools/0002-Fix-adbd-for-non-Ubuntu-systems.patch @@ -0,0 +1,264 @@ +[PATCH] Fix adbd for non-Ubuntu systems + +Remove glib/dbus dependencies and partially restore services.c to be +closer to the original source code in order to run on systems without +sudo. + +Signed-off-by: Gary Bisson +--- + core/adbd/adb.c | 1 - + core/adbd/services.c | 160 ++++------------------------------------------- + debian/makefiles/adbd.mk | 4 +- + 3 files changed, 14 insertions(+), 151 deletions(-) + +diff --git a/core/adbd/adb.c b/core/adbd/adb.c +index d90e6b8..7fe6445 100644 +--- a/core/adbd/adb.c ++++ b/core/adbd/adb.c +@@ -1165,7 +1165,6 @@ void build_local_name(char* target_str, size_t target_size, int server_port) + + #if !ADB_HOST + static int should_drop_privileges() { +- return 1; + #ifndef ALLOW_ADBD_ROOT + return 1; + #else /* ALLOW_ADBD_ROOT */ +diff --git a/core/adbd/services.c b/core/adbd/services.c +index 05bd0d0..5adcefe 100644 +--- a/core/adbd/services.c ++++ b/core/adbd/services.c +@@ -20,15 +20,6 @@ + #include + #include + #include +-#include +-#include +- +-#define UNITY_SERVICE "com.canonical.UnityGreeter" +-#define GREETER_OBJ "/" +-#define GREETER_INTERFACE "com.canonical.UnityGreeter" +-#define PROPERTIES_INTERFACE "org.freedesktop.DBus.Properties" +-#define ACTIVE_PROPERTY "IsActive" +-#define UNLOCK_PATH "/userdata/.adb_onlock" + + #include "sysdeps.h" + +@@ -268,11 +259,11 @@ static int create_service_thread(void (*func)(int, void *), void *cookie) + } + + #if !ADB_HOST +-static int create_subprocess(const char *cmd, const char *arg0, const char *arg1, const char *arg2, const char *arg3, const char *arg4, pid_t *pid) ++static int create_subprocess(const char *cmd, const char *arg0, const char *arg1, pid_t *pid) + { + #ifdef HAVE_WIN32_PROC +- D("create_subprocess(cmd=%s, arg0=%s, arg1=%s, arg2=%s, arg3=%, arg4=%ss)\n", cmd, arg0, arg1, arg2, arg3, arg4); +- fprintf(stderr, "error: create_subprocess not implemented on Win32 (%s %s %s %s %s %s)\n", cmd, arg0, arg1, arg2, arg3, arg4); ++ D("create_subprocess(cmd=%s, arg0=%s, arg1=%s)\n", cmd, arg0, arg1); ++ fprintf(stderr, "error: create_subprocess not implemented on Win32 (%s %s %s)\n", cmd, arg0, arg1); + return -1; + #else /* !HAVE_WIN32_PROC */ + char *devname; +@@ -327,7 +318,7 @@ static int create_subprocess(const char *cmd, const char *arg0, const char *arg1 + } else { + D("adb: unable to open %s\n", text); + } +- execl(cmd, cmd, arg0, arg1, arg2, arg3, arg4, NULL); ++ execl(cmd, cmd, arg0, arg1, NULL); + fprintf(stderr, "- exec '%s' failed: %s (%d) -\n", + cmd, strerror(errno), errno); + exit(-1); +@@ -342,7 +333,7 @@ static int create_subprocess(const char *cmd, const char *arg0, const char *arg1 + } + #endif /* !ABD_HOST */ + +-#if ADB_HOST ++#if ADB_HOST || ADBD_NON_ANDROID + #define SHELL_COMMAND "/bin/sh" + #else + #define SHELL_COMMAND "/system/bin/sh" +@@ -380,139 +371,16 @@ static void subproc_waiter_service(int fd, void *cookie) + } + } + +-int is_phone_locked() { +- GError *error = NULL; +- GVariant *variant = NULL; +- GDBusConnection *connection = NULL; +- +- if (g_file_test(UNLOCK_PATH, G_FILE_TEST_EXISTS)) { +- D("unlock path present."); +- return 0; +- } +- +- // check if the environment variable is present, if not we grab it from +- // the phablet user +- if (g_getenv("DBUS_SESSION_BUS_ADDRESS") == NULL) { +- D("DBUS_SESSION_BUS_ADDRESS missing.\n"); +- struct passwd *pw = getpwuid(AID_SHELL); +- char user_id[15]; +- gchar *path = NULL; +- gchar *contents = NULL; +- gchar *session_path = NULL; +- +- snprintf(user_id, sizeof user_id, "%d", pw->pw_uid); +- +- path = g_build_filename("/run", "user", user_id, "dbus-session", NULL); +- +- g_file_get_contents(path, &contents, NULL, &error); +- session_path = g_strstrip(g_strsplit(contents, "DBUS_SESSION_BUS_ADDRESS=", -1)[1]); +- D("Session bus is %s\n", session_path); +- +- // path is not longer used +- g_free(path); +- +- if (error != NULL) { +- g_clear_error(&error); +- D("Couldn't set session bus\n"); +- return 1; +- } +- +- g_setenv("DBUS_SESSION_BUS_ADDRESS", session_path, TRUE); +- g_free(contents); +- } +- +- // set the uid to be able to connect to the phablet user session bus +- setuid(AID_SHELL); +- connection = g_dbus_connection_new_for_address_sync(g_getenv("DBUS_SESSION_BUS_ADDRESS"), +- G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT | G_DBUS_CONNECTION_FLAGS_MESSAGE_BUS_CONNECTION, +- NULL, +- NULL, +- &error); +- if (connection == NULL) { +- D("session bus not available: %s", error->message); +- g_error_free (error); +- return 1; +- } +- +- variant = g_dbus_connection_call_sync(connection, +- UNITY_SERVICE, +- GREETER_OBJ, +- PROPERTIES_INTERFACE, +- "Get", +- g_variant_new("(ss)", GREETER_INTERFACE, ACTIVE_PROPERTY), +- g_variant_type_new("(v)"), +- G_DBUS_CALL_FLAGS_NONE, +- -1, +- NULL, +- &error); +- +- if (error != NULL) { +- D("Could not get property: %s", error->message); +- g_object_unref(connection); +- g_error_free(error); +- return 1; +- } +- +- if (variant == NULL) { +- D("Failed to get property '%s': %s", "IsActive", error->message); +- g_object_unref(connection); +- g_error_free(error); +- return 1; +- } +- +- variant = g_variant_get_variant(g_variant_get_child_value(variant, 0)); +- +- int active = 1; +- if (!g_variant_get_boolean(variant)) { +- active = 0; +- } +- +- // get back to be root and return the value +- g_object_unref(connection); +- g_variant_unref(variant); +- setuid(0); +- return active; +-} +- + static int create_subproc_thread(const char *name) + { +- if (is_phone_locked() ) { +- fprintf(stderr, "device is locked\n"); +- return -1; +- } +- + stinfo *sti; + adb_thread_t t; + int ret_fd; + pid_t pid; +- +- struct passwd *user = getpwuid(getuid()); +- char *shell; +- char *shellopts = "-c"; +- char *home; +- char *sudo = "/usr/bin/sudo"; +- char useropt[256] = "-u"; +- +- if (user->pw_name) +- strcat(useropt, user->pw_name); +- +- if (user && user->pw_shell) { +- shell = user->pw_shell; +- shellopts = "-cl"; +- } else { +- shell = SHELL_COMMAND; +- } +- +- if (user->pw_dir) +- home = user->pw_dir; +- if(chdir(home) < 0 ) +- return 1; +- + if(name) { +- ret_fd = create_subprocess(sudo, useropt, "-i", shell, shellopts, name, &pid); ++ ret_fd = create_subprocess(SHELL_COMMAND, "-c", name, &pid); + } else { +- shellopts = "-l"; +- ret_fd = create_subprocess(sudo, useropt, "-i", shell, shellopts, 0, &pid); ++ ret_fd = create_subprocess(SHELL_COMMAND, "-", 0, &pid); + } + D("create_subprocess() ret_fd=%d pid=%d\n", ret_fd, pid); + +@@ -585,17 +453,13 @@ int service_to_fd(const char *name) + } else if (!strncmp(name, "log:", 4)) { + ret = create_service_thread(log_service, get_log_file_path(name + 4)); + } else if(!HOST && !strncmp(name, "shell:", 6)) { +- if (!is_phone_locked() ) { +- if(name[6]) { +- ret = create_subproc_thread(name + 6); +- } else { +- ret = create_subproc_thread(0); +- } ++ if(name[6]) { ++ ret = create_subproc_thread(name + 6); ++ } else { ++ ret = create_subproc_thread(0); + } + } else if(!strncmp(name, "sync:", 5)) { +- if (!is_phone_locked() ) { +- ret = create_service_thread(file_sync_service, NULL); +- } ++ ret = create_service_thread(file_sync_service, NULL); + } else if(!strncmp(name, "remount:", 8)) { + ret = create_service_thread(remount_service, NULL); + } else if(!strncmp(name, "reboot:", 7)) { +diff --git a/debian/makefiles/adbd.mk b/debian/makefiles/adbd.mk +index 49dab8c..22c1816 100644 +--- a/debian/makefiles/adbd.mk ++++ b/debian/makefiles/adbd.mk +@@ -40,11 +40,11 @@ CPPFLAGS+= -O2 -g -Wall -Wno-unused-parameter + CPPFLAGS+= -DADB_HOST=0 -DHAVE_FORKEXEC=1 -D_XOPEN_SOURCE -D_GNU_SOURCE -DALLOW_ADBD_ROOT=1 + CPPFLAGS+= -DHAVE_SYMLINKS -DBOARD_ALWAYS_INSECURE + CPPFLAGS+= -DHAVE_TERMIO_H +-CPPFLAGS+= `pkg-config --cflags glib-2.0 gio-2.0` ++CPPFLAGS+= -DADBD_NON_ANDROID + CPPFLAGS+= -I$(SRCDIR)/core/adbd + CPPFLAGS+= -I$(SRCDIR)/core/include + +-LIBS+= -lc -lpthread -lz -lcrypto -lcrypt `pkg-config --libs glib-2.0 gio-2.0` ++LIBS+= -lc -lpthread -lz -lcrypto -lcrypt + + OBJS= $(patsubst %, %.o, $(basename $(SRCS))) + +-- +2.5.1 + diff --git a/package/android-tools/0003-Fix-build-issue-with-uclibc.patch b/package/android-tools/0003-Fix-build-issue-with-uclibc.patch new file mode 100644 index 0000000000..95517c307b --- /dev/null +++ b/package/android-tools/0003-Fix-build-issue-with-uclibc.patch @@ -0,0 +1,36 @@ +[PATCH] Fix build issue with uclibc + +Signed-off-by: Gary Bisson +--- + core/adbd/adb_auth_client.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/core/adb/adb_auth_client.c b/core/adb/adb_auth_client.c +index 0b4913e..068d837 100644 +--- a/core/adb/adb_auth_client.c ++++ b/core/adb/adb_auth_client.c +@@ -72,7 +72,7 @@ static void read_keys(const char *file, struct listnode *list) + if (sep) + *sep = '\0'; + +- ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4); ++ ret = b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4); + if (ret != sizeof(key->key)) { + D("%s: Invalid base64 data ret=%d\n", file, ret); + free(key); +diff --git a/core/adbd/adb_auth_client.c b/core/adbd/adb_auth_client.c +index 0b4913e..068d837 100644 +--- a/core/adbd/adb_auth_client.c ++++ b/core/adbd/adb_auth_client.c +@@ -72,7 +72,7 @@ static void read_keys(const char *file, struct listnode *list) + if (sep) + *sep = '\0'; + +- ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4); ++ ret = b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4); + if (ret != sizeof(key->key)) { + D("%s: Invalid base64 data ret=%d\n", file, ret); + free(key); +-- +2.6.1 + diff --git a/package/android-tools/0004-Fix-build-issue-with-musl.patch b/package/android-tools/0004-Fix-build-issue-with-musl.patch new file mode 100644 index 0000000000..e5ba0e6ec4 --- /dev/null +++ b/package/android-tools/0004-Fix-build-issue-with-musl.patch @@ -0,0 +1,231 @@ +[PATCH] Fix build issue with musl + +cdefs.h header doesn't exist in musl toolchains: +http://wiki.musl-libc.org/wiki/FAQ + +Also arpa/nameser.h doesn't use the same macro name to avoid several +inclusions. + +Finally had an issue with framebuffer_service.c since it was missing the +TEMP_FAILURE_RETRY macro. + +Signed-off-by: Gary Bisson +--- + core/adbd/arpa_nameser.h | 12 +++++++++--- + core/adbd/base64.c | 1 - + core/adbd/framebuffer_service.c | 1 + + core/adbd/qemu_pipe.h | 1 - + core/include/cutils/android_reboot.h | 8 ++++++-- + core/include/cutils/bitops.h | 10 ++++++---- + core/include/cutils/partition_utils.h | 8 ++++++-- + extras/ext4_utils/sha1.c | 3 --- + extras/ext4_utils/sha1.h | 13 ++++++------- + 9 files changed, 34 insertions(+), 23 deletions(-) + +diff --git a/core/adbd/arpa_nameser.h b/core/adbd/arpa_nameser.h +index 438dc04..b2a28d6 100644 +--- a/core/adbd/arpa_nameser.h ++++ b/core/adbd/arpa_nameser.h +@@ -52,11 +52,12 @@ + + #ifndef _ARPA_NAMESER_H_ + #define _ARPA_NAMESER_H_ ++#ifndef _ARPA_NAMESER_H ++#define _ARPA_NAMESER_H + + #define BIND_4_COMPAT + + #include +-#include + + /* + * Revision information. This is the release date in YYYYMMDD format. +@@ -505,7 +506,9 @@ typedef enum __ns_cert_types { + #define ns_makecanon __ns_makecanon + #define ns_samename __ns_samename + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + int ns_msg_getflag(ns_msg, int); + uint16_t ns_get16(const u_char *); + uint32_t ns_get32(const u_char *); +@@ -560,7 +563,9 @@ int ns_samedomain(const char *, const char *); + int ns_subdomain(const char *, const char *); + int ns_makecanon(const char *, char *, size_t); + int ns_samename(const char *, const char *); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #ifdef BIND_4_COMPAT + #include "arpa_nameser_compat.h" +@@ -574,4 +579,5 @@ __END_DECLS + #define XLOG(...) do {} while (0) + #endif + ++#endif /* !_ARPA_NAMESER_H */ + #endif /* !_ARPA_NAMESER_H_ */ +diff --git a/core/adbd/base64.c b/core/adbd/base64.c +index 7270703..73725f5 100644 +--- a/core/adbd/base64.c ++++ b/core/adbd/base64.c +@@ -42,7 +42,6 @@ + * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES. + */ + +-#include + #if defined(LIBC_SCCS) && !defined(lint) + __RCSID("$NetBSD: base64.c,v 1.8 2002/11/11 01:15:17 thorpej Exp $"); + #endif /* LIBC_SCCS and not lint */ +diff --git a/core/adbd/framebuffer_service.c b/core/adbd/framebuffer_service.c +index 20c08d2..48e0241 100644 +--- a/core/adbd/framebuffer_service.c ++++ b/core/adbd/framebuffer_service.c +@@ -26,6 +26,7 @@ + #include "fdevent.h" + #include "adb.h" + ++#include + #include + #include + #include +diff --git a/core/adbd/qemu_pipe.h b/core/adbd/qemu_pipe.h +index 1a67022..572a242 100644 +--- a/core/adbd/qemu_pipe.h ++++ b/core/adbd/qemu_pipe.h +@@ -16,7 +16,6 @@ + #ifndef ANDROID_INCLUDE_HARDWARE_QEMU_PIPE_H + #define ANDROID_INCLUDE_HARDWARE_QEMU_PIPE_H + +-#include + #include + #include + #include +diff --git a/core/include/cutils/android_reboot.h b/core/include/cutils/android_reboot.h +index 0c79be7..2ebe1cf 100644 +--- a/core/include/cutils/android_reboot.h ++++ b/core/include/cutils/android_reboot.h +@@ -17,7 +17,9 @@ + #ifndef __CUTILS_ANDROID_REBOOT_H__ + #define __CUTILS_ANDROID_REBOOT_H__ + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /* Commands */ + #define ANDROID_RB_RESTART 0xDEAD0001 +@@ -30,6 +32,8 @@ __BEGIN_DECLS + + int android_reboot(int cmd, int flags, char *arg); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __CUTILS_ANDROID_REBOOT_H__ */ +diff --git a/core/include/cutils/bitops.h b/core/include/cutils/bitops.h +index 1b3b762..a7c8cab 100644 +--- a/core/include/cutils/bitops.h ++++ b/core/include/cutils/bitops.h +@@ -17,9 +17,9 @@ + #ifndef __CUTILS_BITOPS_H + #define __CUTILS_BITOPS_H + +-#include +- +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + static inline int popcount(unsigned int x) + { +@@ -36,6 +36,8 @@ static inline int popcountll(unsigned long long x) + return __builtin_popcountll(x); + } + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __CUTILS_BITOPS_H */ +diff --git a/core/include/cutils/partition_utils.h b/core/include/cutils/partition_utils.h +index 597df92..0da9d5b 100644 +--- a/core/include/cutils/partition_utils.h ++++ b/core/include/cutils/partition_utils.h +@@ -17,11 +17,15 @@ + #ifndef __CUTILS_PARTITION_WIPED_H__ + #define __CUTILS_PARTITION_WIPED_H__ + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + int partition_wiped(char *source); + void erase_footer(const char *dev_path, long long size); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __CUTILS_PARTITION_WIPED_H__ */ +diff --git a/extras/ext4_utils/sha1.c b/extras/ext4_utils/sha1.c +index 463ec38..e2e29cf 100644 +--- a/extras/ext4_utils/sha1.c ++++ b/extras/ext4_utils/sha1.c +@@ -17,9 +17,6 @@ + + #define SHA1HANDSOFF /* Copies data before messing with it. */ + +-#ifndef USE_MINGW +-#include +-#endif + #include + #include + #include +diff --git a/extras/ext4_utils/sha1.h b/extras/ext4_utils/sha1.h +index 9a8f7e3..fe3217e 100644 +--- a/extras/ext4_utils/sha1.h ++++ b/extras/ext4_utils/sha1.h +@@ -17,11 +17,6 @@ typedef unsigned char u_char; + typedef unsigned int uint32_t; + typedef unsigned int u_int32_t; + typedef unsigned int u_int; +- +-#define __BEGIN_DECLS +-#define __END_DECLS +-#else +-#include + #endif + + #define SHA1_DIGEST_LENGTH 20 +@@ -33,11 +28,15 @@ typedef struct { + u_char buffer[64]; + } SHA1_CTX; + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + void SHA1Transform(uint32_t[5], const u_char[64]); + void SHA1Init(SHA1_CTX *); + void SHA1Update(SHA1_CTX *, const u_char *, u_int); + void SHA1Final(u_char[SHA1_DIGEST_LENGTH], SHA1_CTX *); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* _SYS_SHA1_H_ */ +-- +2.6.1 + diff --git a/package/android-tools/0005-fix-big-endian-build.patch b/package/android-tools/0005-fix-big-endian-build.patch new file mode 100644 index 0000000000..c35fdcb8c4 --- /dev/null +++ b/package/android-tools/0005-fix-big-endian-build.patch @@ -0,0 +1,61 @@ +Fix build on big endian systems + +The usb_linux_client.c file defines cpu_to_le16/32 by using the C +library htole16/32 function calls. However, cpu_to_le16/32 are used +when initializing structures, i.e in a context where a function call +is not allowed. + +It works fine on little endian systems because htole16/32 are defined +by the C library as no-ops. But on big-endian systems, they are +actually doing something, which might involve calling a function, +causing build failures. + +To solve this, we simply open-code cpu_to_le16/32 in a way that allows +them to be used when initializing structures. + +Signed-off-by: Thomas Petazzoni + +Index: b/core/adb/usb_linux_client.c +=================================================================== +--- a/core/adb/usb_linux_client.c ++++ b/core/adb/usb_linux_client.c +@@ -34,8 +34,15 @@ + #define MAX_PACKET_SIZE_FS 64 + #define MAX_PACKET_SIZE_HS 512 + +-#define cpu_to_le16(x) htole16(x) +-#define cpu_to_le32(x) htole32(x) ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++# define cpu_to_le16(x) (x) ++# define cpu_to_le32(x) (x) ++#else ++# define cpu_to_le16(x) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8)) ++# define cpu_to_le32(x) \ ++ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \ ++ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) ++#endif + + struct usb_handle + { +Index: b/core/adbd/usb_linux_client.c +=================================================================== +--- a/core/adbd/usb_linux_client.c ++++ b/core/adbd/usb_linux_client.c +@@ -34,8 +34,15 @@ + #define MAX_PACKET_SIZE_FS 64 + #define MAX_PACKET_SIZE_HS 512 + +-#define cpu_to_le16(x) htole16(x) +-#define cpu_to_le32(x) htole32(x) ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++# define cpu_to_le16(x) (x) ++# define cpu_to_le32(x) (x) ++#else ++# define cpu_to_le16(x) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8)) ++# define cpu_to_le32(x) \ ++ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \ ++ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) ++#endif + + struct usb_handle + { diff --git a/package/android-tools/0005-fix-static-link-zlib.patch b/package/android-tools/0005-fix-static-link-zlib.patch new file mode 100644 index 0000000000..dff4df6e79 --- /dev/null +++ b/package/android-tools/0005-fix-static-link-zlib.patch @@ -0,0 +1,36 @@ +Fix static linking of adb/adbd + +Both adb and adbd use OpenSSL, which indirectly uses zlib. Since +adb/adbd also use zlib directly -lz is included in the linker flags, +but not at the right position to ensure that static linking works: to +make it possible for OpenSSL symbols to see zlib symbols, -lz must +appear after -lcrypto. + +Signed-off-by: Thomas Petazzoni + +Index: b/debian/makefiles/adb.mk +=================================================================== +--- a/debian/makefiles/adb.mk ++++ b/debian/makefiles/adb.mk +@@ -41,7 +41,7 @@ + CPPFLAGS+= -I$(SRCDIR)/core/adb + CPPFLAGS+= -I$(SRCDIR)/core/include + +-LIBS+= -lc -lpthread -lz -lcrypto ++LIBS+= -lc -lpthread -lcrypto -lz + + OBJS= $(SRCS:.c=.o) + +Index: b/debian/makefiles/adbd.mk +=================================================================== +--- a/debian/makefiles/adbd.mk ++++ b/debian/makefiles/adbd.mk +@@ -44,7 +44,7 @@ + CPPFLAGS+= -I$(SRCDIR)/core/adbd + CPPFLAGS+= -I$(SRCDIR)/core/include + +-LIBS+= -lc -lpthread -lz -lcrypto -lcrypt ++LIBS+= -lc -lpthread -lcrypto -lz -lcrypt + + OBJS= $(patsubst %, %.o, $(basename $(SRCS))) + diff --git a/package/android-tools/Config.in b/package/android-tools/Config.in new file mode 100644 index 0000000000..35bb8af6ef --- /dev/null +++ b/package/android-tools/Config.in @@ -0,0 +1,60 @@ +config BR2_PACKAGE_ANDROID_TOOLS + bool "android-tools" + # Technically, fastboot could build on noMMU systems. But + # since we need at least one of the three sub-options enabled, + # and adb/adbd can't be built on noMMU systems, and fastboot + # has some complicated dependencies, we simply make the whole + # package not available on noMMU platforms. + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_ANDROID_TOOLS_ADBD if \ + !BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT && \ + !BR2_PACKAGE_ANDROID_TOOLS_ADB + help + This package contains the fastboot and adb utilities, that + can be used to interact with target devices using of these + protocols. + +if BR2_PACKAGE_ANDROID_TOOLS + +config BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT + bool "fastboot" + select BR2_PACKAGE_LIBSELINUX + select BR2_PACKAGE_ZLIB + depends on BR2_TOOLCHAIN_HAS_THREADS # libselinux + depends on !BR2_STATIC_LIBS # libselinux + depends on !BR2_arc # libselinux + help + This option will build and install the fastboot utility for + the target, which can be used to reflash other target devices + implementing the fastboot protocol. + +comment "fastboot needs a toolchain w/ threads, dynamic library" + depends on !BR2_arc + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_ANDROID_TOOLS_ADB + bool "adb" + depends on BR2_USE_MMU # uses fork() + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + This option will build and install the adb utility for the + target, which can be used to interact with other target + devices implementing the ADB protocol. + +config BR2_PACKAGE_ANDROID_TOOLS_ADBD + bool "adbd" + depends on BR2_USE_MMU # uses fork() + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + This option will build and install the adbd utility for the + target, which can be used to interact with a host machine + implementing the ADB protocol. + +endif + +comment "android-tools needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/android-tools/Config.in.host b/package/android-tools/Config.in.host new file mode 100644 index 0000000000..993c4c9fdc --- /dev/null +++ b/package/android-tools/Config.in.host @@ -0,0 +1,26 @@ +config BR2_PACKAGE_HOST_ANDROID_TOOLS + bool "host android-tools" + select BR2_PACKAGE_HOST_ANDROID_TOOLS_ADB if \ + !BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT + help + This package contains the fastboot and adb utilities, that + can be used to interact with target devices using of these + protocols. + +if BR2_PACKAGE_HOST_ANDROID_TOOLS + +config BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT + bool "fastboot" + help + This option will build and install the fastboot utility for + the host, which can be used to reflash target devices + implementing the fastboot protocol. + +config BR2_PACKAGE_HOST_ANDROID_TOOLS_ADB + bool "adb" + help + This option will build and install the adb utility for the + host, which can be used to interact with target devices + implementing the ADB protocol. + +endif diff --git a/package/android-tools/android-tools.hash b/package/android-tools/android-tools.hash new file mode 100644 index 0000000000..7afa04430b --- /dev/null +++ b/package/android-tools/android-tools.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 9bfba987e1351b12aa983787b9ae4424ab752e9e646d8e93771538dc1e5d932f android-tools_4.2.2+git20130218.orig.tar.xz +sha256 73c3078de3e44d8a3cadf7a360863c63155d9d558c2f0933cf38ad901a3f5998 android-tools_4.2.2+git20130218-3ubuntu41.debian.tar.gz diff --git a/package/android-tools/android-tools.mk b/package/android-tools/android-tools.mk new file mode 100644 index 0000000000..45103923eb --- /dev/null +++ b/package/android-tools/android-tools.mk @@ -0,0 +1,85 @@ +################################################################################ +# +# android-tools +# +################################################################################ + +ANDROID_TOOLS_SITE = https://launchpad.net/ubuntu/+archive/primary/+files +ANDROID_TOOLS_VERSION = 4.2.2+git20130218 +ANDROID_TOOLS_SOURCE = android-tools_$(ANDROID_TOOLS_VERSION).orig.tar.xz +ANDROID_TOOLS_EXTRA_DOWNLOADS = android-tools_$(ANDROID_TOOLS_VERSION)-3ubuntu41.debian.tar.gz +HOST_ANDROID_TOOLS_EXTRA_DOWNLOADS = $(ANDROID_TOOLS_EXTRA_DOWNLOADS) +ANDROID_TOOLS_LICENSE = Apache-2.0 +ANDROID_TOOLS_LICENSE_FILES = debian/copyright + +# Extract the Debian tarball inside the sources +define ANDROID_TOOLS_DEBIAN_EXTRACT + $(call suitable-extractor,$(notdir $(ANDROID_TOOLS_EXTRA_DOWNLOADS))) \ + $(DL_DIR)/$(notdir $(ANDROID_TOOLS_EXTRA_DOWNLOADS)) | \ + $(TAR) -C $(@D) $(TAR_OPTIONS) - +endef + +HOST_ANDROID_TOOLS_POST_EXTRACT_HOOKS += ANDROID_TOOLS_DEBIAN_EXTRACT +ANDROID_TOOLS_POST_EXTRACT_HOOKS += ANDROID_TOOLS_DEBIAN_EXTRACT + +# Apply the Debian patches before applying the Buildroot patches +define ANDROID_TOOLS_DEBIAN_PATCH + $(APPLY_PATCHES) $(@D) $(@D)/debian/patches \* +endef + +HOST_ANDROID_TOOLS_PRE_PATCH_HOOKS += ANDROID_TOOLS_DEBIAN_PATCH +ANDROID_TOOLS_PRE_PATCH_HOOKS += ANDROID_TOOLS_DEBIAN_PATCH + +ifeq ($(BR2_PACKAGE_HOST_ANDROID_TOOLS_FASTBOOT),y) +HOST_ANDROID_TOOLS_TARGETS += fastboot +HOST_ANDROID_TOOLS_DEPENDENCIES += host-zlib host-libselinux +endif + +ifeq ($(BR2_PACKAGE_HOST_ANDROID_TOOLS_ADB),y) +HOST_ANDROID_TOOLS_TARGETS += adb +HOST_ANDROID_TOOLS_DEPENDENCIES += host-zlib host-openssl +endif + +ifeq ($(BR2_PACKAGE_ANDROID_TOOLS_FASTBOOT),y) +ANDROID_TOOLS_TARGETS += fastboot +ANDROID_TOOLS_DEPENDENCIES += zlib libselinux +endif + +ifeq ($(BR2_PACKAGE_ANDROID_TOOLS_ADB),y) +ANDROID_TOOLS_TARGETS += adb +ANDROID_TOOLS_DEPENDENCIES += zlib openssl +endif + +ifeq ($(BR2_PACKAGE_ANDROID_TOOLS_ADBD),y) +ANDROID_TOOLS_TARGETS += adbd +ANDROID_TOOLS_DEPENDENCIES += zlib openssl +endif + +# Build each tool in its own directory not to share object files + +define HOST_ANDROID_TOOLS_BUILD_CMDS + $(foreach t,$(HOST_ANDROID_TOOLS_TARGETS),\ + mkdir -p $(@D)/build-$(t) && \ + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) SRCDIR=$(@D) \ + -C $(@D)/build-$(t) -f $(@D)/debian/makefiles/$(t).mk$(sep)) +endef + +define ANDROID_TOOLS_BUILD_CMDS + $(foreach t,$(ANDROID_TOOLS_TARGETS),\ + mkdir -p $(@D)/build-$(t) && \ + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) SRCDIR=$(@D) \ + -C $(@D)/build-$(t) -f $(@D)/debian/makefiles/$(t).mk$(sep)) +endef + +define HOST_ANDROID_TOOLS_INSTALL_CMDS + $(foreach t,$(HOST_ANDROID_TOOLS_TARGETS),\ + $(INSTALL) -D -m 0755 $(@D)/build-$(t)/$(t) $(HOST_DIR)/usr/bin/$(t)$(sep)) +endef + +define ANDROID_TOOLS_INSTALL_TARGET_CMDS + $(foreach t,$(ANDROID_TOOLS_TARGETS),\ + $(INSTALL) -D -m 0755 $(@D)/build-$(t)/$(t) $(TARGET_DIR)/usr/bin/$(t)$(sep)) +endef + +$(eval $(host-generic-package)) +$(eval $(generic-package)) diff --git a/package/angularjs/Config.in b/package/angularjs/Config.in new file mode 100644 index 0000000000..206b3d8499 --- /dev/null +++ b/package/angularjs/Config.in @@ -0,0 +1,79 @@ +menuconfig BR2_PACKAGE_ANGULARJS + bool "angularjs" + help + AngularJS web application framework. + + http://angularjs.org + +if BR2_PACKAGE_ANGULARJS + +config BR2_ANGULARJS_MODULES + bool "angularjs modules" + help + Select which modules to install. If disabled, all modules + will be installed. + +if BR2_ANGULARJS_MODULES + +config BR2_ANGULARJS_MODULE_ANIMATE + bool "animate" + help + The ngAnimate module provides support for CSS-based animations + (keyframes and transitions) as well as JavaScript-based animations + via callback hooks. Animations are not enabled by default, however, + by including ngAnimate then the animation hooks are enabled for an + Angular app. + +config BR2_ANGULARJS_MODULE_ARIA + bool "aria" + help + The ngAria module provides support for common ARIA attributes that + convey state or semantic information about the application for users + of assistive technologies, such as screen readers. + +config BR2_ANGULARJS_MODULE_COOKIES + bool "cookies" + help + The ngCookies module provides a convenient wrapper for reading and + writing browser cookies. + +config BR2_ANGULARJS_MODULE_MESSAGE_FORMAT + bool "message-format" + help + The ngMessageFormat module is used recognize MessageFormat extensions + in interpolation expressions. + +config BR2_ANGULARJS_MODULE_MESSAGES + bool "messages" + help + The ngMessages module provides enhanced support for displaying + messages within templates (typically within forms or when rendering + message objects that return key/value data). + +config BR2_ANGULARJS_MODULE_RESOURCE + bool "resource" + help + The ngResource module provides interaction support with RESTful + services via the $resource service. + +config BR2_ANGULARJS_MODULE_ROUTE + bool "route" + help + The ngRoute module provides routing and deeplinking services and + directives for angular apps. + +config BR2_ANGULARJS_MODULE_SANITIZE + bool "sanitize" + help + The ngSanitize module provides functionality to sanitize HTML. + +config BR2_ANGULARJS_MODULE_TOUCH + bool "touch" + help + The ngTouch module provides touch events and other helpers for + touch-enabled devices. The implementation is based on jQuery Mobile + touch event handling (jquerymobile.com). + +endif + +endif diff --git a/package/angularjs/angularjs.hash b/package/angularjs/angularjs.hash new file mode 100644 index 0000000000..100b6dc667 --- /dev/null +++ b/package/angularjs/angularjs.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 a99e3c22b54178b7646856efd95e825650d32d3125904a28216aeba52e221bad angular-1.4.3.zip diff --git a/package/angularjs/angularjs.mk b/package/angularjs/angularjs.mk new file mode 100644 index 0000000000..60dbdb6d30 --- /dev/null +++ b/package/angularjs/angularjs.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# angularjs +# +################################################################################ + +ANGULARJS_VERSION = 1.4.3 +ANGULARJS_SOURCE = angular-$(ANGULARJS_VERSION).zip +ANGULARJS_SITE = https://code.angularjs.org/$(ANGULARJS_VERSION) +ANGULARJS_LICENSE = MIT +# There's no separate license file in the archive, so use angular.js instead. +ANGULARJS_LICENSE_FILES = angular.js + +define ANGULARJS_EXTRACT_CMDS + unzip $(DL_DIR)/$(ANGULARJS_SOURCE) -d $(@D) + mv $(@D)/angular-$(ANGULARJS_VERSION)/* $(@D) + rmdir $(@D)/angular-$(ANGULARJS_VERSION) +endef + +ANGULARJS_FILES = angular + +ANGULARJS_MODULES = animate aria cookies message-format messages resource \ + route sanitize touch + +ifeq ($(BR2_ANGULARJS_MODULES),y) +ANGULARJS_FILES += $(foreach mod,$(ANGULARJS_MODULES),\ + $(if $(BR2_ANGULARJS_MODULE_$(call UPPERCASE,$(mod))),\ + angular-$(mod))) +else +ANGULARJS_FILES += $(foreach mod,$(ANGULARJS_MODULES),angular-$(mod)) +endif + +define ANGULARJS_INSTALL_TARGET_CMDS + $(foreach f,$(ANGULARJS_FILES),\ + $(INSTALL) -m 0644 -D $(@D)/$(f).min.js \ + $(TARGET_DIR)/var/www/$(f).js$(sep)) +endef + +$(eval $(generic-package)) diff --git a/package/apache/0001-cross-compile.patch b/package/apache/0001-cross-compile.patch new file mode 100644 index 0000000000..790b7a0490 --- /dev/null +++ b/package/apache/0001-cross-compile.patch @@ -0,0 +1,63 @@ +Fix cross-compilation + +Fetched httpd-2.4.x-cross_compile.diff from upstream bugtracker: +https://issues.apache.org/bugzilla/show_bug.cgi?id=51257#c6 + +which is a bundle of upstream revisions: + http://svn.apache.org/viewvc?view=revision&revision=1327907 + http://svn.apache.org/viewvc?view=revision&revision=1328390 + http://svn.apache.org/viewvc?view=revision&revision=1328714 + +Signed-off-by: Bernd Kuhls + +Index: server/Makefile.in +=================================================================== +--- a/server/Makefile.in (revision 1328714) ++++ b/server/Makefile.in (working copy) +@@ -22,9 +22,14 @@ + include $(top_builddir)/build/rules.mk + include $(top_srcdir)/build/library.mk + ++ifdef CC_FOR_BUILD ++gen_test_char: gen_test_char.c ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $< ++else + gen_test_char_OBJECTS = gen_test_char.lo + gen_test_char: $(gen_test_char_OBJECTS) + $(LINK) $(EXTRA_LDFLAGS) $(gen_test_char_OBJECTS) $(EXTRA_LIBS) ++endif + + test_char.h: gen_test_char + ./gen_test_char > test_char.h +Index: configure.in +=================================================================== +--- a/configure.in (revision 1328714) ++++ b/configure.in (working copy) +@@ -193,6 +193,14 @@ + dnl Try to get c99 support for variadic macros + ifdef([AC_PROG_CC_C99], [AC_PROG_CC_C99]) + ++dnl In case of cross compilation we set CC_FOR_BUILD to cc unless ++dnl we got already CC_FOR_BUILD from environment. ++if test "x${build_alias}" != "x${host_alias}"; then ++ if test "x${CC_FOR_BUILD}" = "x"; then ++ CC_FOR_BUILD=cc ++ fi ++fi ++ + if test "x${cache_file}" = "x/dev/null"; then + # Likewise, ensure that CC and CPP are passed through to the pcre + # configure script iff caching is disabled (the autoconf 2.5x default). +Index: acinclude.m4 +=================================================================== +--- a/acinclude.m4 (revision 1328714) ++++ ab/cinclude.m4 (working copy) +@@ -53,6 +53,8 @@ + APACHE_SUBST(CPPFLAGS) + APACHE_SUBST(CFLAGS) + APACHE_SUBST(CXXFLAGS) ++ APACHE_SUBST(CC_FOR_BUILD) ++ APACHE_SUBST(CFLAGS_FOR_BUILD) + APACHE_SUBST(LTFLAGS) + APACHE_SUBST(LDFLAGS) + APACHE_SUBST(LT_LDFLAGS) diff --git a/package/apache/0002-nios2_is_not_os2.patch b/package/apache/0002-nios2_is_not_os2.patch new file mode 100644 index 0000000000..9da8ccac02 --- /dev/null +++ b/package/apache/0002-nios2_is_not_os2.patch @@ -0,0 +1,18 @@ +Fix nios2 detection. + +Apache treats nios2 as OS/2. + +Signed-off-by: Bernd Kuhls + +diff -uNr httpd-2.4.12.org/configure.in httpd-2.4.12/configure.in +--- httpd-2.4.12.org/configure.in 2015-01-22 18:33:07.000000000 +0100 ++++ httpd-2.4.12/configure.in 2015-04-02 22:01:32.851102219 +0200 +@@ -268,7 +268,7 @@ + AC_MSG_NOTICE([]) + + case $host in +- *os2*) ++ *-os2*) + # Use a custom made libtool replacement + echo "using aplibtool" + LIBTOOL="$abs_srcdir/srclib/apr/build/aplibtool" diff --git a/package/apache/Config.in b/package/apache/Config.in new file mode 100644 index 0000000000..0814a17f7e --- /dev/null +++ b/package/apache/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_APACHE + bool "apache" + select BR2_PACKAGE_APR_UTIL + select BR2_PACKAGE_PCRE + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # apr + help + The Apache HTTP Server Project is an effort to develop and maintain an + open-source HTTP server for modern operating systems including UNIX + and Windows NT. The goal of this project is to provide a secure, + efficient and extensible server that provides HTTP services in sync + with the current HTTP standards. + + http://httpd.apache.org + +comment "apache needs a toolchain w/ dynamic library, threads" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/apache/apache.hash b/package/apache/apache.hash new file mode 100644 index 0000000000..062a54990d --- /dev/null +++ b/package/apache/apache.hash @@ -0,0 +1,2 @@ +# From http://www.apache.org/dist/httpd/httpd-2.4.20.tar.bz2.sha1 +sha1 cefe8ea4a3f81c7a08e36c80ebbd792c67ab361b httpd-2.4.20.tar.bz2 diff --git a/package/apache/apache.mk b/package/apache/apache.mk new file mode 100644 index 0000000000..6d9a324b9f --- /dev/null +++ b/package/apache/apache.mk @@ -0,0 +1,81 @@ +################################################################################ +# +# apache +# +################################################################################ + +APACHE_VERSION = 2.4.20 +APACHE_SOURCE = httpd-$(APACHE_VERSION).tar.bz2 +APACHE_SITE = http://archive.apache.org/dist/httpd +APACHE_LICENSE = Apache-2.0 +APACHE_LICENSE_FILES = LICENSE +# Needed for mod_php +APACHE_INSTALL_STAGING = YES +# We have a patch touching configure.in and Makefile.in, +# so we need to autoreconf: +APACHE_AUTORECONF = YES +APACHE_DEPENDENCIES = apr apr-util pcre + +APACHE_CONF_ENV= \ + ap_cv_void_ptr_lt_long=no \ + PCRE_CONFIG=$(STAGING_DIR)/usr/bin/pcre-config + +APACHE_CONF_OPTS = \ + --sysconfdir=/etc/apache2 \ + --with-apr=$(STAGING_DIR)/usr \ + --with-apr-util=$(STAGING_DIR)/usr \ + --with-pcre=$(STAGING_DIR)/usr/bin/pcre-config \ + --enable-http \ + --enable-dbd \ + --enable-proxy \ + --enable-mime-magic \ + --without-suexec-bin \ + --enable-mods-shared=all \ + --with-mpm=worker \ + --disable-lua \ + --disable-luajit + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +APACHE_DEPENDENCIES += libxml2 +# Apache wants the path to the header file, where it can find +# . +APACHE_CONF_OPTS += \ + --enable-xml2enc \ + --enable-proxy-html \ + --with-libxml2=$(STAGING_DIR)/usr/include/libxml2 +else +APACHE_CONF_OPTS += \ + --disable-xml2enc \ + --disable-proxy-html +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +APACHE_DEPENDENCIES += openssl +APACHE_CONF_OPTS += \ + --enable-ssl \ + --with-ssl=$(STAGING_DIR)/usr +else +APACHE_CONF_OPTS += --disable-ssl +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +APACHE_DEPENDENCIES += zlib +APACHE_CONF_OPTS += \ + --enable-deflate \ + --with-z=$(STAGING_DIR)/usr +else +APACHE_CONF_OPTS += --disable-deflate +endif + +define APACHE_FIX_STAGING_APACHE_CONFIG + $(SED) 's%/usr/build%$(STAGING_DIR)/usr/build%' $(STAGING_DIR)/usr/bin/apxs + $(SED) 's%^prefix =.*%prefix = $(STAGING_DIR)/usr%' $(STAGING_DIR)/usr/build/config_vars.mk +endef +APACHE_POST_INSTALL_STAGING_HOOKS += APACHE_FIX_STAGING_APACHE_CONFIG + +define APACHE_CLEANUP_TARGET + $(RM) -rf $(TARGET_DIR)/usr/manual $(TARGET_DIR)/usr/build +endef +APACHE_POST_INSTALL_TARGET_HOOKS += APACHE_CLEANUP_TARGET + +$(eval $(autotools-package)) diff --git a/package/apitrace/Config.in b/package/apitrace/Config.in new file mode 100644 index 0000000000..a977712818 --- /dev/null +++ b/package/apitrace/Config.in @@ -0,0 +1,19 @@ +comment "apitrace needs a (e)glibc toolchain w/ C++, gcc >= 4.6" + depends on BR2_PACKAGE_XORG7 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + +config BR2_PACKAGE_APITRACE + bool "apitrace" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_USES_GLIBC # uses glibc specific __libc_dlsym + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_LIBPNG + help + Trace and replay OpenGL and OpenGL ES APIs calls to/from a + file. You may install apitrace GUI from your distribution to + inspect generated traces. + + http://apitrace.github.io/ diff --git a/package/apitrace/apitrace.mk b/package/apitrace/apitrace.mk new file mode 100644 index 0000000000..fbd957c617 --- /dev/null +++ b/package/apitrace/apitrace.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# apitrace +# +################################################################################ + +APITRACE_VERSION = 7.0 +APITRACE_SITE = $(call github,apitrace,apitrace,$(APITRACE_VERSION)) +APITRACE_LICENSE = MIT +APITRACE_LICENSE_FILES = LICENSE + +APITRACE_DEPENDENCIES = xlib_libX11 host-python libpng + +# Gui was never tested, so we prefer to explicitly disable it +APITRACE_CONF_OPTS += -DENABLE_GUI=false + +$(eval $(cmake-package)) diff --git a/package/apr-util/0001-remove-checkapr.patch b/package/apr-util/0001-remove-checkapr.patch new file mode 100644 index 0000000000..42ad12fcbe --- /dev/null +++ b/package/apr-util/0001-remove-checkapr.patch @@ -0,0 +1,21 @@ +remove check apr + +this patch removes the check of apr which fails the build + +Signed-off-by: Rico Bachmann +--- +v1: disable the check for APU_FIND_APR because the check only looks into folders +named apr, and our source-tree is called apr-versionnumber (e.g. apr-1.4.6) + +diff -rupN apr-util-1.4.1/configure.in apr-util-1.4.1-fix/configure.in +--- apr-util-1.4.1/configure.in 2009-12-17 20:15:19.000000000 +0100 ++++ apr-util-1.4.1-fix/configure.in 2012-04-24 10:10:32.000000000 +0200 +@@ -99,7 +99,7 @@ fi + dnl + dnl Find the APR includes directory and (possibly) the source (base) dir. + dnl +-APU_FIND_APR ++dnl APU_FIND_APR + + dnl + dnl even though we use apr_rules.mk for building apr-util, we need diff --git a/package/apr-util/Config.in b/package/apr-util/Config.in new file mode 100644 index 0000000000..1d7db2bd77 --- /dev/null +++ b/package/apr-util/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_APR_UTIL + bool "apr-util" + select BR2_PACKAGE_APR + select BR2_PACKAGE_EXPAT + # apr really needs shared library support + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # apr + help + The utility library for the apache runtime project + + http://apr.apache.org/ + +comment "apr-util needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/apr-util/apr-util.hash b/package/apr-util/apr-util.hash new file mode 100644 index 0000000000..3db4396058 --- /dev/null +++ b/package/apr-util/apr-util.hash @@ -0,0 +1,2 @@ +# From http://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz.sha1 +sha1 72cc3ac693b52fb831063d5c0de18723bc8e0095 apr-util-1.5.4.tar.gz diff --git a/package/apr-util/apr-util.mk b/package/apr-util/apr-util.mk new file mode 100644 index 0000000000..bc0572e110 --- /dev/null +++ b/package/apr-util/apr-util.mk @@ -0,0 +1,65 @@ +################################################################################ +# +# apr-util +# +################################################################################ + +APR_UTIL_VERSION = 1.5.4 +APR_UTIL_SITE = http://archive.apache.org/dist/apr +APR_UTIL_LICENSE = Apache-2.0 +APR_UTIL_LICENSE_FILES = LICENSE +APR_UTIL_INSTALL_STAGING = YES +APR_UTIL_DEPENDENCIES = apr expat +APR_UTIL_CONF_OPTS = \ + --with-apr=$(STAGING_DIR)/usr/bin/apr-1-config +APR_UTIL_CONFIG_SCRIPTS = apu-1-config + +# When iconv is available, then use it to provide charset conversion +# features. +APR_UTIL_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +ifeq ($(BR2_PACKAGE_BERKELEYDB),y) +APR_UTIL_CONF_OPTS += --with-dbm=db53 --with-berkeley-db="$(STAGING_DIR)/usr" +APR_UTIL_DEPENDENCIES += berkeleydb +else +APR_UTIL_CONF_OPTS += --without-berkeley-db +endif + +ifeq ($(BR2_PACKAGE_GDBM),y) +APR_UTIL_CONF_OPTS += --with-gdbm="$(STAGING_DIR)/usr" +APR_UTIL_DEPENDENCIES += gdbm +else +APR_UTIL_CONF_OPTS += --without-gdbm +endif + +ifeq ($(BR2_PACKAGE_MYSQL),y) +APR_UTIL_CONF_OPTS += --with-mysql="$(STAGING_DIR)/usr" +APR_UTIL_DEPENDENCIES += mysql +else +APR_UTIL_CONF_OPTS += --without-mysql +endif + +ifeq ($(BR2_PACKAGE_SQLITE),y) +APR_UTIL_CONF_OPTS += --with-sqlite3="$(STAGING_DIR)/usr" +APR_UTIL_DEPENDENCIES += sqlite +else +APR_UTIL_CONF_OPTS += --without-sqlite3 +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +APR_UTIL_CONF_OPTS += --with-crypto --with-openssl="$(STAGING_DIR)/usr" +APR_UTIL_DEPENDENCIES += openssl +else +APR_UTIL_CONF_OPTS += --without-crypto +endif + +ifeq ($(BR2_PACKAGE_UNIXODBC),y) +APR_UTIL_CONF_OPTS += --with-odbc="$(STAGING_DIR)/usr" +# avoid using target binary $(STAGING_DIR)/usr/bin/odbc_config +APR_UTIL_CONF_ENV += ac_cv_path_ODBC_CONFIG="" +APR_UTIL_DEPENDENCIES += unixodbc +else +APR_UTIL_CONF_OPTS += --without-odbc +endif + +$(eval $(autotools-package)) diff --git a/package/apr/0001-cross-compile.patch b/package/apr/0001-cross-compile.patch new file mode 100644 index 0000000000..5b596fb20f --- /dev/null +++ b/package/apr/0001-cross-compile.patch @@ -0,0 +1,58 @@ +Fix cross-compilation + +Patch was backported from Apache httpd: +http://svn.apache.org/viewvc?view=revision&revision=1327907 +http://svn.apache.org/viewvc?view=revision&revision=1328390 +http://svn.apache.org/viewvc?view=revision&revision=1328714 + +Patch submitted upstream: +https://issues.apache.org/bugzilla/show_bug.cgi?id=57058 + +Signed-off-by: Bernd Kuhls + +diff -uNr apr-1.5.1.org/configure.in apr-1.5.1/configure.in +--- apr-1.5.1.org/configure.in 2014-01-25 16:17:29.000000000 +0100 ++++ apr-1.5.1/configure.in 2014-10-05 11:20:40.080746760 +0200 +@@ -118,6 +118,16 @@ + echo "Configuring APR library" + echo "Platform: $host" + ++dnl In case of cross compilation we set CC_FOR_BUILD to cc unless ++dnl we got already CC_FOR_BUILD from environment. ++if test "x${build_alias}" != "x${host_alias}"; then ++ if test "x${CC_FOR_BUILD}" = "x"; then ++ CC_FOR_BUILD=cc ++ fi ++fi ++AC_SUBST(CC_FOR_BUILD) ++AC_SUBST(CFLAGS_FOR_BUILD) ++ + dnl Some initial steps for configuration. We setup the default directory + dnl and which files are to be configured. + +diff -uNr apr-1.5.1.org/Makefile.in apr-1.5.1/Makefile.in +--- apr-1.5.1.org/Makefile.in 2014-03-17 16:10:26.000000000 +0100 ++++ apr-1.5.1/Makefile.in 2014-10-05 11:22:53.031070519 +0200 +@@ -8,6 +8,8 @@ + # APR (Apache Portable Runtime) library Makefile. + # + CPP = @CPP@ ++CC_FOR_BUILD = @CC_FOR_BUILD@ ++CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ + + # get substituted into some targets + APR_MAJOR_VERSION=@APR_MAJOR_VERSION@ +@@ -134,8 +136,13 @@ + + OBJECTS_gen_test_char = tools/gen_test_char.lo $(LOCAL_LIBS) + tools/gen_test_char.lo: make_tools_dir ++ifdef CC_FOR_BUILD ++tools/gen_test_char@EXEEXT@: tools/gen_test_char.c $(LOCAL_LIBS) ++ $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) -DCROSS_COMPILE -o $@ $< ++else + tools/gen_test_char@EXEEXT@: $(OBJECTS_gen_test_char) + $(LINK_PROG) $(OBJECTS_gen_test_char) $(ALL_LIBS) ++endif + + include/private/apr_escape_test_char.h: tools/gen_test_char@EXEEXT@ + $(APR_MKDIR) include/private diff --git a/package/apr/Config.in b/package/apr/Config.in new file mode 100644 index 0000000000..5757272450 --- /dev/null +++ b/package/apr/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_APR + bool "apr" + # apr really needs shared library support + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # fork() in apr_proc_fork() + help + The mission of the Apache Portable Runtime (APR) project is to create + and maintain software libraries that provide a predictable and + consistent interface to underlying platform-specific implementations + + http://apr.apache.org/ + +comment "apr needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/apr/apr.hash b/package/apr/apr.hash new file mode 100644 index 0000000000..50d657a8cb --- /dev/null +++ b/package/apr/apr.hash @@ -0,0 +1,2 @@ +# From http://archive.apache.org/dist/apr/apr-1.5.1.tar.gz.sha1 +sha1 9caa83e3f50f3abc9fab7c4a3f2739a12b14c3a3 apr-1.5.1.tar.gz diff --git a/package/apr/apr.mk b/package/apr/apr.mk new file mode 100644 index 0000000000..361a79f99b --- /dev/null +++ b/package/apr/apr.mk @@ -0,0 +1,74 @@ +################################################################################ +# +# apr +# +################################################################################ + +APR_VERSION = 1.5.1 +APR_SITE = http://archive.apache.org/dist/apr +APR_LICENSE = Apache-2.0 +APR_LICENSE_FILES = LICENSE +APR_INSTALL_STAGING = YES +# We have a patch touching configure.in and Makefile.in, +# so we need to autoreconf: +APR_AUTORECONF = YES + +APR_CONF_ENV = \ + CC_FOR_BUILD="$(HOSTCC)" \ + CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \ + ac_cv_file__dev_zero=yes \ + ac_cv_func_setpgrp_void=yes \ + apr_cv_process_shared_works=yes \ + apr_cv_mutex_robust_shared=no \ + apr_cv_tcp_nodelay_with_cork=yes \ + ac_cv_sizeof_struct_iovec=8 \ + ac_cv_struct_rlimit=yes \ + ac_cv_o_nonblock_inherited=no \ + apr_cv_mutex_recursive=yes +APR_CONFIG_SCRIPTS = apr-1-config + +# Doesn't even try to guess when cross compiling +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +APR_CONF_ENV += apr_cv_pthreads_lib="-lpthread" +endif + +# Fix lfs detection when cross compiling +APR_CONF_ENV += apr_cv_use_lfs64=yes + +# Use non-portable atomics when available: 8 bytes atomics are used on +# 64-bits architectures, 4 bytes atomics on 32-bits architectures. We +# have to override ap_cv_atomic_builtins because the test used to +# check for atomic builtins uses AC_TRY_RUN, which doesn't work when +# cross-compiling. +ifeq ($(BR2_ARCH_IS_64):$(BR2_TOOLCHAIN_HAS_SYNC_8),y:y) +APR_CONF_OPTS += --enable-nonportable-atomics +APR_CONF_ENV += ap_cv_atomic_builtins=yes +else ifeq ($(BR2_ARCH_IS_64):$(BR2_TOOLCHAIN_HAS_SYNC_4),:y) +APR_CONF_OPTS += --enable-nonportable-atomics +APR_CONF_ENV += ap_cv_atomic_builtins=yes +else +APR_CONF_OPTS += --disable-nonportable-atomics +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +APR_DEPENDENCIES += util-linux +endif + +define APR_CLEANUP_UNNEEDED_FILES + $(RM) -rf $(TARGET_DIR)/usr/build-1/ +endef + +APR_POST_INSTALL_TARGET_HOOKS += APR_CLEANUP_UNNEEDED_FILES + +define APR_FIXUP_RULES_MK + $(SED) 's%apr_builddir=%apr_builddir=$(STAGING_DIR)%' \ + $(STAGING_DIR)/usr/build-1/apr_rules.mk + $(SED) 's%apr_builders=%apr_builders=$(STAGING_DIR)%' \ + $(STAGING_DIR)/usr/build-1/apr_rules.mk + $(SED) 's%top_builddir=%top_builddir=$(STAGING_DIR)%' \ + $(STAGING_DIR)/usr/build-1/apr_rules.mk +endef + +APR_POST_INSTALL_STAGING_HOOKS += APR_FIXUP_RULES_MK + +$(eval $(autotools-package)) diff --git a/package/argp-standalone/0001-throw-in-funcdef.patch b/package/argp-standalone/0001-throw-in-funcdef.patch new file mode 100644 index 0000000000..4a90751e1e --- /dev/null +++ b/package/argp-standalone/0001-throw-in-funcdef.patch @@ -0,0 +1,79 @@ +# --- T2-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# T2 SDE: package/.../rng-tools/throw-in-funcdef.patch.argp-standalone +# Copyright (C) 2006 The T2 SDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or 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. +# --- T2-COPYRIGHT-NOTE-END --- + + +No __THROW in function implementation. + --jsaw + +--- argp-standalone-1.4-test2/argp.h.orig 2006-01-06 02:29:59.000000000 +0100 ++++ argp-standalone-1.4-test2/argp.h 2006-01-06 02:41:10.000000000 +0100 +@@ -560,17 +560,17 @@ + # endif + + # ifndef ARGP_EI +-# define ARGP_EI extern __inline__ ++# define ARGP_EI extern inline + # endif + + ARGP_EI void +-__argp_usage (__const struct argp_state *__state) __THROW ++__argp_usage (__const struct argp_state *__state) + { + __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); + } + + ARGP_EI int +-__option_is_short (__const struct argp_option *__opt) __THROW ++__option_is_short (__const struct argp_option *__opt) + { + if (__opt->flags & OPTION_DOC) + return 0; +@@ -582,7 +582,7 @@ + } + + ARGP_EI int +-__option_is_end (__const struct argp_option *__opt) __THROW ++__option_is_end (__const struct argp_option *__opt) + { + return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; + } +--- argp-standalone-1.4-test2/argp-parse.c.orig 2006-01-06 02:47:48.000000000 +0100 ++++ argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.000000000 +0100 +@@ -1290,13 +1290,13 @@ + /* Defined here, in case a user is not inlining the definitions in + * argp.h */ + void +-__argp_usage (__const struct argp_state *__state) __THROW ++__argp_usage (__const struct argp_state *__state) + { + __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); + } + + int +-__option_is_short (__const struct argp_option *__opt) __THROW ++__option_is_short (__const struct argp_option *__opt) + { + if (__opt->flags & OPTION_DOC) + return 0; +@@ -1310,7 +1310,7 @@ + } + + int +-__option_is_end (__const struct argp_option *__opt) __THROW ++__option_is_end (__const struct argp_option *__opt) + { + return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; + } diff --git a/package/argp-standalone/0002-isprint.patch b/package/argp-standalone/0002-isprint.patch new file mode 100644 index 0000000000..9c08366f68 --- /dev/null +++ b/package/argp-standalone/0002-isprint.patch @@ -0,0 +1,45 @@ +Subject: restrict value range passed to isprint function + +According to C standards isprint argument shall be representable as an +unsigned char or be equal to EOF, otherwise the behaviour is undefined. + +Passing arbitrary ints leads to segfault in nm program from elfutils. + +Restrict isprint argument range to values representable by unsigned char. + +Signed-off-by: Max Filippov +--- +Index: b/argp.h +=================================================================== +--- a/argp.h ++++ b/argp.h +@@ -23,6 +23,7 @@ + + #include + #include ++#include + + #define __need_error_t + #include +@@ -577,7 +578,7 @@ + else + { + int __key = __opt->key; +- return __key > 0 && isprint (__key); ++ return __key > 0 && __key <= UCHAR_MAX && isprint (__key); + } + } + +Index: b/argp-parse.c +=================================================================== +--- a/argp-parse.c ++++ b/argp-parse.c +@@ -1292,7 +1292,7 @@ + int __key = __opt->key; + /* FIXME: whether or not a particular key implies a short option + * ought not to be locale dependent. */ +- return __key > 0 && isprint (__key); ++ return __key > 0 && __key <= UCHAR_MAX && isprint (__key); + } + } + diff --git a/package/argp-standalone/0003-fix_build_with_c99_compilers.patch b/package/argp-standalone/0003-fix_build_with_c99_compilers.patch new file mode 100644 index 0000000000..bfa0bb53e1 --- /dev/null +++ b/package/argp-standalone/0003-fix_build_with_c99_compilers.patch @@ -0,0 +1,80 @@ +From b2dfa011a3fdcb7d22764d143517d0fbd1c2a201 Mon Sep 17 00:00:00 2001 +From: Emmanuel Dreyfus +Date: Wed, 22 Jan 2014 14:47:23 +0100 +Subject: [PATCH] Fix build with c99 compilers + +BUG: 764655 +Change-Id: If5dfdc9c7427bd3d39d8da8f79e33ae2da6a3137 +Signed-off-by: Emmanuel Dreyfus +Reviewed-on: http://review.gluster.org/6034 +Reviewed-by: Harshavardhana +Tested-by: Gluster Build System +--- + +diff --git a/argp-fmtstream.c b/argp-fmtstream.c +index 7f79285..494b6b3 100644 +--- a/argp-fmtstream.c ++++ b/argp-fmtstream.c +@@ -389,6 +389,7 @@ + weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf) + #endif + ++#if __STDC_VERSION__ - 199900L < 1 + /* Duplicate the inline definitions in argp-fmtstream.h, for compilers + * that don't do inlining. */ + size_t +@@ -471,5 +472,6 @@ + __argp_fmtstream_update (__fs); + return __fs->point_col >= 0 ? __fs->point_col : 0; + } ++#endif /* __STDC_VERSION__ - 199900L < 1 */ + + #endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */ +diff --git a/argp-fmtstream.h b/argp-fmtstream.h +index e797b11..828f435 100644 +--- a/argp-fmtstream.h ++++ b/argp-fmtstream.h +@@ -153,6 +153,7 @@ + __const char *__fmt, ...) + PRINTF_STYLE(2,3); + ++#if __STDC_VERSION__ - 199900L < 1 + extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); + extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); + +@@ -163,6 +164,7 @@ + __const char *__str, size_t __len); + extern size_t argp_fmtstream_write (argp_fmtstream_t __fs, + __const char *__str, size_t __len); ++#endif /* __STDC_VERSION__ - 199900L < 1 */ + + /* Access macros for various bits of state. */ + #define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin) +@@ -172,6 +174,7 @@ + #define __argp_fmtstream_rmargin argp_fmtstream_rmargin + #define __argp_fmtstream_wmargin argp_fmtstream_wmargin + ++#if __STDC_VERSION__ - 199900L < 1 + /* Set __FS's left margin to LMARGIN and return the old value. */ + extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, + size_t __lmargin); +@@ -193,6 +196,7 @@ + /* Return the column number of the current output point in __FS. */ + extern size_t argp_fmtstream_point (argp_fmtstream_t __fs); + extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs); ++#endif /* __STDC_VERSION__ - 199900L < 1 */ + + /* Internal routines. */ + extern void _argp_fmtstream_update (argp_fmtstream_t __fs); +@@ -216,7 +220,11 @@ + #endif + + #ifndef ARGP_FS_EI ++#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__) + #define ARGP_FS_EI extern inline ++#else ++#define ARGP_FS_EI inline ++#endif + #endif + + ARGP_FS_EI size_t diff --git a/package/argp-standalone/Config.in b/package/argp-standalone/Config.in new file mode 100644 index 0000000000..3319dd945c --- /dev/null +++ b/package/argp-standalone/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_ARGP_STANDALONE + bool "argp-standalone" + # glibc provides its own argp implementation. + depends on !BR2_TOOLCHAIN_USES_GLIBC + help + Glibc hierarchical argument parsing standalone library. + + http://www.lysator.liu.se/~nisse/misc/ diff --git a/package/argp-standalone/argp-standalone.hash b/package/argp-standalone/argp-standalone.hash new file mode 100644 index 0000000000..5798214406 --- /dev/null +++ b/package/argp-standalone/argp-standalone.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be argp-standalone-1.3.tar.gz diff --git a/package/argp-standalone/argp-standalone.mk b/package/argp-standalone/argp-standalone.mk new file mode 100644 index 0000000000..b87b923f49 --- /dev/null +++ b/package/argp-standalone/argp-standalone.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# argp-standalone +# +################################################################################ + +ARGP_STANDALONE_VERSION = 1.3 +ARGP_STANDALONE_SITE = http://www.lysator.liu.se/~nisse/archive +ARGP_STANDALONE_INSTALL_STAGING = YES +ARGP_STANDALONE_LICENSE = LGPLv2+ + +ARGP_STANDALONE_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) -fPIC" + +define ARGP_STANDALONE_INSTALL_STAGING_CMDS + $(INSTALL) -D $(@D)/libargp.a $(STAGING_DIR)/usr/lib/libargp.a + $(INSTALL) -D $(@D)/argp.h $(STAGING_DIR)/usr/include/argp.h +endef + +define ARGP_STANDALONE_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/libargp.a $(TARGET_DIR)/usr/lib/libargp.a + $(INSTALL) -D $(@D)/argp.h $(TARGET_DIR)/usr/include/argp.h +endef + +$(eval $(autotools-package)) diff --git a/package/argus/Config.in b/package/argus/Config.in new file mode 100644 index 0000000000..7a7d2b650f --- /dev/null +++ b/package/argus/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_ARGUS + bool "argus" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + A Real Time Flow Monitor-based audit engine. + + http://qosient.com/argus/ + +comment "argus needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/argus/argus.hash b/package/argus/argus.hash new file mode 100644 index 0000000000..84edce61ec --- /dev/null +++ b/package/argus/argus.hash @@ -0,0 +1,2 @@ +# From http://qosient.com/argus/src/argus-3.0.8.tar.gz.md5 +md5 84daae71a502e4f6d088c279de3aa36b argus-3.0.8.tar.gz diff --git a/package/argus/argus.mk b/package/argus/argus.mk new file mode 100644 index 0000000000..bd1c55904a --- /dev/null +++ b/package/argus/argus.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# argus +# +################################################################################ + +ARGUS_VERSION = 3.0.8 +ARGUS_SITE = http://qosient.com/argus/src +ARGUS_DEPENDENCIES = libpcap +ARGUS_CONF_ENV = arg_cv_sys_errlist=yes +# Code is really v2+ though COPYING is v3 so ship README to avoid confusion +ARGUS_LICENSE = GPLv2+ +ARGUS_LICENSE_FILES = README + +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +ARGUS_DEPENDENCIES += libtirpc host-pkgconf +ARGUS_CONF_ENV += \ + CFLAGS="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" \ + LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`" +endif + +$(eval $(autotools-package)) diff --git a/package/armadillo/Config.in b/package/armadillo/Config.in new file mode 100644 index 0000000000..18bf750ebd --- /dev/null +++ b/package/armadillo/Config.in @@ -0,0 +1,22 @@ +comment "armadillo needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on !(BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) + depends on !BR2_powerpc + depends on !BR2_bfin + +comment "armadillo needs an (e)glibc toolchain w/ C++" + depends on BR2_powerpc + depends on !BR2_INSTALL_LIBSTDCPP || BR2_TOOLCHAIN_USES_UCLIBC + +config BR2_PACKAGE_ARMADILLO + bool "armadillo" + depends on BR2_INSTALL_LIBSTDCPP + depends on !(BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) # clapack + depends on !BR2_powerpc || BR2_TOOLCHAIN_USES_GLIBC # clapack + depends on !BR2_bfin # clapack + select BR2_PACKAGE_CLAPACK + help + Armadillo: An Open Source C++ Linear Algebra Library for + Fast Prototyping and Computationally Intensive Experiments. + + http://arma.sourceforge.net/ diff --git a/package/armadillo/armadillo.hash b/package/armadillo/armadillo.hash new file mode 100644 index 0000000000..4149a777de --- /dev/null +++ b/package/armadillo/armadillo.hash @@ -0,0 +1,5 @@ +# From http://sourceforge.net/projects/arma/files/?source=navbar +md5 a39f27197d24b3d25437fab6bb1d118f armadillo-6.500.4.tar.gz +sha1 68166e67521a720c72917d196b0807bc6cab8b2e armadillo-6.500.4.tar.gz +# Locally computed: +sha256 813de85fa61ba5077ed871d801ba7070d369e7e9742002e4c11474c75ff6d1c6 armadillo-6.500.4.tar.gz diff --git a/package/armadillo/armadillo.mk b/package/armadillo/armadillo.mk new file mode 100644 index 0000000000..813a41bdc7 --- /dev/null +++ b/package/armadillo/armadillo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# armadillo +# +################################################################################ + +ARMADILLO_VERSION = 6.500.4 +ARMADILLO_SITE = http://downloads.sourceforge.net/project/arma +ARMADILLO_DEPENDENCIES = clapack +ARMADILLO_INSTALL_STAGING = YES +ARMADILLO_LICENSE = MPLv2.0 +ARMADILLO_LICENSE_FILES = LICENSE.txt + +$(eval $(cmake-package)) diff --git a/package/arptables/0001-arptables-disable-dlfcn.h-include.patch b/package/arptables/0001-arptables-disable-dlfcn.h-include.patch new file mode 100644 index 0000000000..a5d56d22a6 --- /dev/null +++ b/package/arptables/0001-arptables-disable-dlfcn.h-include.patch @@ -0,0 +1,32 @@ +From 948a96d710f377fb0ed8d78c7fb85b299c80ef13 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Sat, 8 Nov 2014 10:12:54 -0300 +Subject: [PATCH] arptables: disable dlfcn.h include + +The relevant code is disabled in libarptc_incl.c so it's not required +and breaks the ability to build it in a pure-static toolchain. + +Status: sent upstream. + +Signed-off-by: Gustavo Zacarias +--- + arptables.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arptables.c b/arptables.c +index 64ac3aa..fe270bc 100644 +--- a/arptables.c ++++ b/arptables.c +@@ -35,7 +35,9 @@ + #include + #include + #include ++#if 0 + #include ++#endif + #include + #include + #include +-- +2.0.4 + diff --git a/package/arptables/0002-src-Use-stdint-types.patch b/package/arptables/0002-src-Use-stdint-types.patch new file mode 100644 index 0000000000..8a85e705d1 --- /dev/null +++ b/package/arptables/0002-src-Use-stdint-types.patch @@ -0,0 +1,134 @@ +From 24957c135eaacd718f3c788285de33d64316b32e Mon Sep 17 00:00:00 2001 +From: Felix Janda +Date: Sat, 16 May 2015 10:31:24 +0200 +Subject: [PATCH 1/2] src: Use stdint types + +Backport of upstream commit 047f37b1d5d865084a435fd7594b8c5c332ccb8d + +Please note that the backported patch does not include two changes +to arptables.h from the upstream - these modified lines added in commit +dbbe9f7de36aa3c7dd61dc89092c03f7902e474e which was committed after +the 0.0.4 release. + +Upstream-status: backport +Signed-off-by: Felix Janda +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Brendan Heading +--- + arptables.c | 8 ++++---- + include/arptables.h | 3 ++- + include/libarptc/libarptc.h | 7 ++++--- + libarptc/libarptc.c | 4 ++-- + libarptc/libarptc_incl.c | 2 +- + 5 files changed, 13 insertions(+), 11 deletions(-) + +diff --git a/arptables.c b/arptables.c +index 5535ab2..6d1377f 100644 +--- a/arptables.c ++++ b/arptables.c +@@ -230,7 +230,7 @@ extern void dump_entries(const arptc_handle_t handle); + /etc/protocols */ + struct pprot { + char *name; +- u_int8_t num; ++ uint8_t num; + }; + + /* Primitive headers... */ +@@ -925,7 +925,7 @@ mask_to_dotted(const struct in_addr *mask) + { + int i; + static char buf[20]; +- u_int32_t maskaddr, bits; ++ uint32_t maskaddr, bits; + + maskaddr = ntohl(mask->s_addr); + +@@ -967,7 +967,7 @@ string_to_number(const char *s, unsigned int min, unsigned int max, + } + + static void +-set_option(unsigned int *options, unsigned int option, u_int16_t *invflg, ++set_option(unsigned int *options, unsigned int option, uint16_t *invflg, + int invert) + { + if (*options & option) +@@ -1107,7 +1107,7 @@ register_target(struct arptables_target *me) + } + + static void +-print_num(u_int64_t number, unsigned int format) ++print_num(uint64_t number, unsigned int format) + { + if (format & FMT_KILOMEGAGIGA) { + if (number > 99999) { +diff --git a/include/arptables.h b/include/arptables.h +index 820b664..e6a6ba6 100644 +--- a/include/arptables.h ++++ b/include/arptables.h +@@ -1,6 +1,7 @@ + #ifndef _ARPTABLES_USER_H + #define _ARPTABLES_USER_H + ++#include + #include "arptables_common.h" + #include "libarptc/libarptc.h" + +@@ -126,7 +127,7 @@ extern char *mask_to_dotted(const struct in_addr *mask); + + extern void parse_hostnetworkmask(const char *name, struct in_addr **addrpp, + struct in_addr *maskp, unsigned int *naddrs); +-extern u_int16_t parse_protocol(const char *s); ++extern uint16_t parse_protocol(const char *s); + + extern int do_command(int argc, char *argv[], char **table, + arptc_handle_t *handle); +diff --git a/include/libarptc/libarptc.h b/include/libarptc/libarptc.h +index e4f1175..76fbfab 100644 +--- a/include/libarptc/libarptc.h ++++ b/include/libarptc/libarptc.h +@@ -6,9 +6,10 @@ + #include + + #ifndef ARPT_MIN_ALIGN +-/* arpt_entry has pointers and u_int64_t's in it, so if you align to +- it, you'll also align to any crazy matches and targets someone +- might write */ ++/* arpt_entry has pointers and uint64_t's in it, so if you align to ++ * it, you'll also align to any crazy matches and targets someone ++ * might write. ++ */ + #define ARPT_MIN_ALIGN (__alignof__(struct arpt_entry)) + #endif + +diff --git a/libarptc/libarptc.c b/libarptc/libarptc.c +index 2dcaaef..701bae0 100644 +--- a/libarptc/libarptc.c ++++ b/libarptc/libarptc.c +@@ -256,8 +256,8 @@ unconditional(const struct arpt_arp *arp) + { + unsigned int i; + +- for (i = 0; i < sizeof(*arp)/sizeof(u_int32_t); i++) +- if (((u_int32_t *)arp)[i]) ++ for (i = 0; i < sizeof(*arp) / sizeof(uint32_t); i++) ++ if (((uint32_t *)arp)[i]) + return 0; + + return 1; +diff --git a/libarptc/libarptc_incl.c b/libarptc/libarptc_incl.c +index 2fa3d43..b41fcb2 100644 +--- a/libarptc/libarptc_incl.c ++++ b/libarptc/libarptc_incl.c +@@ -1706,7 +1706,7 @@ TC_COMMIT(TC_HANDLE_T *handle) + /* Kernel will think that pointer should be 64-bits, and get + padding. So we accomodate here (assumption: alignment of + `counters' is on 64-bit boundary). */ +- u_int64_t *kernptr = (u_int64_t *)&newcounters->counters; ++ uint64_t *kernptr = (uint64_t *)&newcounters->counters; + if ((unsigned long)&newcounters->counters % 8 != 0) { + fprintf(stderr, + "counters alignment incorrect! Mail rusty!\n"); +-- +2.4.3 + diff --git a/package/arptables/0003-src-Remove-support-for-libc5.patch b/package/arptables/0003-src-Remove-support-for-libc5.patch new file mode 100644 index 0000000000..15e893dd0c --- /dev/null +++ b/package/arptables/0003-src-Remove-support-for-libc5.patch @@ -0,0 +1,64 @@ +From 5f1379ff68bfedb56309527bee266a591b27a19e Mon Sep 17 00:00:00 2001 +From: Felix Janda +Date: Sat, 16 May 2015 10:31:41 +0200 +Subject: [PATCH 2/2] src: Remove support for libc5 + +Fixes compilation with musl libc + +Backport of upstream commit f4ab8f63f11a72f14687a6646d04ae1bae3fa45f +Upstream status: backport +Signed-off-by: Felix Janda +Signed-off-by: Pablo Neira Ayuso +Signed-off-by: Brendan Heading +--- + include/libarptc/arpt_kernel_headers.h | 12 ------------ + libarptc/libarptc.c | 4 ---- + 2 files changed, 16 deletions(-) + +diff --git a/include/libarptc/arpt_kernel_headers.h b/include/libarptc/arpt_kernel_headers.h +index 442cc54..140e999 100644 +--- a/include/libarptc/arpt_kernel_headers.h ++++ b/include/libarptc/arpt_kernel_headers.h +@@ -5,7 +5,6 @@ + + #include + +-#if defined(__GLIBC__) && __GLIBC__ == 2 + #include + #include + #include +@@ -14,16 +13,5 @@ + #include + #include + #include +-#else +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#endif + + #endif +diff --git a/libarptc/libarptc.c b/libarptc/libarptc.c +index 701bae0..9c5a5b0 100644 +--- a/libarptc/libarptc.c ++++ b/libarptc/libarptc.c +@@ -23,10 +23,6 @@ + #define inline + #endif + +-#if !defined(__GLIBC__) || (__GLIBC__ < 2) +-typedef unsigned int socklen_t; +-#endif +- + #include "libarptc/libarptc.h" + + #define IP_VERSION 4 +-- +2.4.3 + diff --git a/package/arptables/0004-Fix-musl-build-issue.patch b/package/arptables/0004-Fix-musl-build-issue.patch new file mode 100644 index 0000000000..e9419b0a96 --- /dev/null +++ b/package/arptables/0004-Fix-musl-build-issue.patch @@ -0,0 +1,71 @@ +From cbf84a0bc377c6a368d30571f37ebfab27784697 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Wed, 2 Dec 2015 04:57:33 +0100 +Subject: [PATCH 4/4] Fix musl build issue +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Due to clashes in the namespace between the Linux Kernel headers and the +netinet headers building arptables with the musl C library fails. + +Best advice from the musl developers is to not include both headers in a +userspace tool (see the thread on the musl mailing list [1], especially [2]). + +Since arptables only requires a few definitions from the Linux Kernel headers +we opt-out the clashing header files and define the needed definitions. + +[1] http://www.openwall.com/lists/musl/2012/10/09/1 +[2] http://www.openwall.com/lists/musl/2012/10/11/1 + +Signed-off-by: Jörg Krause +--- + extensions/arpt_CLASSIFY.c | 7 +++++++ + include/linux/netfilter_arp.h | 11 +++++++++++ + 2 files changed, 18 insertions(+) + +diff --git a/extensions/arpt_CLASSIFY.c b/extensions/arpt_CLASSIFY.c +index cb5770b..c58129f 100644 +--- a/extensions/arpt_CLASSIFY.c ++++ b/extensions/arpt_CLASSIFY.c +@@ -21,7 +21,14 @@ + #include + #include + #include ++ ++#ifdef __KERNEL__ + #include ++#else ++struct xt_classify_target_info { ++ uint32_t priority; ++}; ++#endif + + #define TC_H_MAJ_MASK (0xFFFF0000U) + #define TC_H_MIN_MASK (0x0000FFFFU) +diff --git a/include/linux/netfilter_arp.h b/include/linux/netfilter_arp.h +index 92bc6dd..2a63e82 100644 +--- a/include/linux/netfilter_arp.h ++++ b/include/linux/netfilter_arp.h +@@ -5,7 +5,18 @@ + * (C)2002 Rusty Russell IBM -- This code is GPL. + */ + ++#ifdef __KERNEL__ + #include ++#else ++/* Responses from hook functions. */ ++#define NF_DROP 0 ++#define NF_ACCEPT 1 ++#define NF_STOLEN 2 ++#define NF_QUEUE 3 ++#define NF_REPEAT 4 ++#define NF_STOP 5 ++#define NF_MAX_VERDICT NF_STOP ++#endif + + /* There is no PF_ARP. */ + #define NF_ARP 0 +-- +2.6.2 + diff --git a/package/arptables/Config.in b/package/arptables/Config.in new file mode 100644 index 0000000000..873e791e81 --- /dev/null +++ b/package/arptables/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_ARPTABLES + bool "arptables" + depends on BR2_USE_MMU # needs fork() + help + Tool to set up, maintain, and inspect the tables of ARP rules. + + http://ebtables.sourceforge.net diff --git a/package/arptables/arptables.hash b/package/arptables/arptables.hash new file mode 100644 index 0000000000..95b9997569 --- /dev/null +++ b/package/arptables/arptables.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 277985e29ecd93bd759a58242cad0e02ba9d4a6e1b7795235e3b507661bc0049 arptables-v0.0.4.tar.gz diff --git a/package/arptables/arptables.mk b/package/arptables/arptables.mk new file mode 100644 index 0000000000..4f101c7b12 --- /dev/null +++ b/package/arptables/arptables.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# arptables +# +################################################################################ + +ARPTABLES_VERSION = 0.0.4 +ARPTABLES_SOURCE = arptables-v$(ARPTABLES_VERSION).tar.gz +ARPTABLES_SITE = http://downloads.sourceforge.net/project/ebtables/arptables/arptables-v$(ARPTABLES_VERSION) +ARPTABLES_LICENSE = GPLv2+ + +define ARPTABLES_BUILD_CMDS + $(MAKE) -C $(@D) \ + CC="$(TARGET_CC)" COPT_FLAGS="$(TARGET_CFLAGS)" +endef + +define ARPTABLES_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/arptables $(TARGET_DIR)/usr/sbin/arptables +endef + +$(eval $(generic-package)) diff --git a/package/assimp/0001-Fix-FBXConverter-use-proper-64-bit-constant.patch b/package/assimp/0001-Fix-FBXConverter-use-proper-64-bit-constant.patch new file mode 100644 index 0000000000..bfcbeb55e3 --- /dev/null +++ b/package/assimp/0001-Fix-FBXConverter-use-proper-64-bit-constant.patch @@ -0,0 +1,35 @@ +From 30a2ecc7939449f235282eb6de42e367fc5b1867 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 14 Jan 2016 22:13:15 +0100 +Subject: [PATCH] Fix FBXConverter: use proper 64-bit constant + +Use proper 64-bit constant for CONVERT_FBX_TIME(time) conversion, fixes: + + code/FBXConverter.cpp:2025: error: integer constant is too large for 'long' type + code/FBXConverter.cpp:2026: error: integer constant is too large for 'long' type + code/FBXConverter.cpp:2794: error: integer constant is too large for 'long' type + code/FBXConverter.cpp:2868: error: integer constant is too large for 'long' type + code/FBXConverter.cpp:2878: error: integer constant is too large for 'long' type + code/FBXConverter.cpp:2888: error: integer constant is too large for 'long' type + +Signed-off-by: Peter Seiderer +--- + code/FBXConverter.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp +index e0c6b9c..b1e9a71 100644 +--- a/code/FBXConverter.cpp ++++ b/code/FBXConverter.cpp +@@ -67,7 +67,7 @@ namespace FBX { + + #define MAGIC_NODE_TAG "_$AssimpFbx$" + +-#define CONVERT_FBX_TIME(time) static_cast(time) / 46186158000L ++#define CONVERT_FBX_TIME(time) static_cast(time) / 46186158000LL + + // XXX vc9's debugger won't step into anonymous namespaces + //namespace { +-- +2.1.4 + diff --git a/package/assimp/0002-fix-compilation-on-BigEndian.patch b/package/assimp/0002-fix-compilation-on-BigEndian.patch new file mode 100644 index 0000000000..93cba5d120 --- /dev/null +++ b/package/assimp/0002-fix-compilation-on-BigEndian.patch @@ -0,0 +1,40 @@ +From 8457f3eff89dae35d43f679a66842ceedfd08808 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= + +Date: Fri, 13 Nov 2015 22:33:20 +0100 +Subject: [PATCH] fix compilation on BigEndian + +cannot pass a function by reference where an lvalue is expected +(only applies to bigendian, where a macro expands to a byteswap function) + +Closes https://github.com/assimp/assimp/issues/613 + +Taken from [1] for buildroot assimp package compile fix. + +[1] https://github.com/assimp/assimp/commit/756cfd4f74b866e3183caede69daa8c105b73bab.patch + +Signed-off-by: Peter Seiderer +--- + code/Bitmap.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/code/Bitmap.cpp b/code/Bitmap.cpp +index 13ec372..829fd02 100644 +--- a/code/Bitmap.cpp ++++ b/code/Bitmap.cpp +@@ -84,7 +84,12 @@ namespace Assimp { + + template + inline std::size_t Copy(uint8_t* data, T& field) { ++#ifdef AI_BUILD_BIG_ENDIAN ++ T field_swapped=AI_BE(field); ++ std::memcpy(data, &field_swapped, sizeof(field)); return sizeof(field); ++#else + std::memcpy(data, &AI_BE(field), sizeof(field)); return sizeof(field); ++#endif + } + + void Bitmap::WriteHeader(Header& header, IOStream* file) { +-- +2.1.4 + diff --git a/package/assimp/Config.in b/package/assimp/Config.in new file mode 100644 index 0000000000..93020f7238 --- /dev/null +++ b/package/assimp/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_ASSIMP + bool "assimp" + # All gcc versions affected by + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71124, that + # cause an infinite loop in gcc when building this package. + depends on !BR2_microblaze + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_ZLIB + help + Open Asset Import Library (assimp) is a portable Open Source + library to import various well-known 3D model formats in a uniform + manner. The most recent version also knows how to export 3d files + and is therefore suitable as a general-purpose 3D model converter. + + http://www.assimp.org + +comment "assimp needs a toolchain w/ C++" + depends on !BR2_microblaze + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/assimp/assimp.mk b/package/assimp/assimp.mk new file mode 100644 index 0000000000..fd556e5962 --- /dev/null +++ b/package/assimp/assimp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# assimp +# +################################################################################ + +ASSIMP_VERSION = v3.2 +ASSIMP_SITE = $(call github,assimp,assimp,$(ASSIMP_VERSION)) +ASSIMP_LICENSE = BSD-3c +ASSIMP_LICENSE_FILES = LICENSE +ASSIMP_DEPENDENCIES = zlib +ASSIMP_INSTALL_STAGING = YES + +ASSIMP_CONF_OPTS += -DASSIMP_BUILD_TESTS=OFF + +$(eval $(cmake-package)) diff --git a/package/at/0001-configure.ac-convert-AC_TRY_COMPILE-AC_COMPILE_IFELS.patch b/package/at/0001-configure.ac-convert-AC_TRY_COMPILE-AC_COMPILE_IFELS.patch new file mode 100644 index 0000000000..e4276ac208 --- /dev/null +++ b/package/at/0001-configure.ac-convert-AC_TRY_COMPILE-AC_COMPILE_IFELS.patch @@ -0,0 +1,34 @@ +From e12c96cccab550eda31cf7bb1dedddd3670ffe69 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Tue, 1 Dec 2009 17:22:22 +0100 +Subject: [PATCH 2/5] configure.ac: convert AC_TRY_COMPILE -> AC_COMPILE_IFELSE + +Signed-off-by: Marc Kleine-Budde +--- + configure.ac | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 997a37f..cab80ed 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -40,11 +40,11 @@ case "$host" in + esac + + AC_MSG_CHECKING(__attribute__((noreturn))) +-AC_TRY_COMPILE([], [void __attribute__((noreturn)) panic(void);], +- AC_MSG_RESULT(yes) +- AC_DEFINE(HAVE_ATTRIBUTE_NORETURN, 1, +- [Define to 1 if compiler supports __attribute__((noreturn))]), +- AC_MSG_RESULT(no) ++AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM([[]], [[void __attribute__((noreturn)) panic(void);]])], ++ [AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_ATTRIBUTE_NORETURN, 1, Define to 1 if compiler supports __attribute__((noreturn)))], ++ [AC_MSG_RESULT(no)] + ) + dnl Checks for libraries. + +-- +1.6.5.3 + diff --git a/package/at/0002-Makefile.in-replace-IROOT-by-DESTDIR.patch b/package/at/0002-Makefile.in-replace-IROOT-by-DESTDIR.patch new file mode 100644 index 0000000000..856b6c8d08 --- /dev/null +++ b/package/at/0002-Makefile.in-replace-IROOT-by-DESTDIR.patch @@ -0,0 +1,108 @@ +From 195d30e2e01fe2f91ed3bdaeec3982aa66b309dd Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Tue, 1 Dec 2009 20:57:45 +0100 +Subject: [PATCH 5/5] Makefile.in: replace IROOT by DESTDIR + +This patch replaces IROOT by DESTDIR, which is the autotools standard +variable. For backwards compatibilty IROOT overwrites the DESTDIR. + +[Vincent: tweak the patch for the new version] + +Signed-off-by: Marc Kleine-Budde +Signed-off-by: Vicente Olivert Riera +--- + Makefile.in | 68 ++++++++++++++++++++++++++++++++----------------------------- + 1 file changed, 36 insertions(+), 32 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 06544f9..1f699d9 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -17,6 +17,10 @@ atdocdir = $(docdir)/at + etcdir = @ETCDIR@ + systemdsystemunitdir = @systemdsystemunitdir@ + ++ifdef IROOT ++DESTDIR = $(DESTDIR) ++endif ++ + DAEMON_USERNAME = @DAEMON_USERNAME@ + DAEMON_GROUPNAME= @DAEMON_GROUPNAME@ + LOADAVG_MX = @LOADAVG_MX@ +@@ -91,41 +95,41 @@ atrun: atrun.in + $(CC) -c $(CFLAGS) $(DEFS) $*.c + + install: all +- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(etcdir) +- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(bindir) +- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(sbindir) +- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(docdir) +- $(INSTALL) -g root -o root -m 755 -d $(IROOT)$(atdocdir) +- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR) +- chmod 1770 $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR) +- touch $(IROOT)$(LFILE) +- chmod 600 $(IROOT)$(LFILE) +- chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(IROOT)$(LFILE) +- test -f $(IROOT)$(etcdir)/at.allow || test -f $(IROOT)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(IROOT)$(etcdir)/ +- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 at $(IROOT)$(bindir) +- $(LN_S) -f at $(IROOT)$(bindir)/atq +- $(LN_S) -f at $(IROOT)$(bindir)/atrm +- $(INSTALL) -g root -o root -m 755 batch $(IROOT)$(bindir) +- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man1dir) +- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man5dir) +- $(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man8dir) +- $(INSTALL) -g root -o root -m 755 atd $(IROOT)$(sbindir) +- $(INSTALL) -g root -o root -m 755 atrun $(IROOT)$(sbindir) +- $(INSTALL) -g root -o root -m 644 at.1 $(IROOT)$(man1dir)/ +- cd $(IROOT)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1 +- $(INSTALL) -g root -o root -m 644 atd.8 $(IROOT)$(man8dir)/ ++ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(etcdir) ++ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(bindir) ++ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(sbindir) ++ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(docdir) ++ $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(atdocdir) ++ $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) ++ chmod 1770 $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) ++ touch $(DESTDIR)$(LFILE) ++ chmod 600 $(DESTDIR)$(LFILE) ++ chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(DESTDIR)$(LFILE) ++ test -f $(DESTDIR)$(etcdir)/at.allow || test -f $(DESTDIR)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(DESTDIR)$(etcdir)/ ++ $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 at $(DESTDIR)$(bindir) ++ $(LN_S) -f at $(DESTDIR)$(bindir)/atq ++ $(LN_S) -f at $(DESTDIR)$(bindir)/atrm ++ $(INSTALL) -g root -o root -m 755 batch $(DESTDIR)$(bindir) ++ $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man1dir) ++ $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man5dir) ++ $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man8dir) ++ $(INSTALL) -g root -o root -m 755 atd $(DESTDIR)$(sbindir) ++ $(INSTALL) -g root -o root -m 755 atrun $(DESTDIR)$(sbindir) ++ $(INSTALL) -g root -o root -m 644 at.1 $(DESTDIR)$(man1dir)/ ++ cd $(DESTDIR)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1 ++ $(INSTALL) -g root -o root -m 644 atd.8 $(DESTDIR)$(man8dir)/ + sed "s,\$${exec_prefix},$(exec_prefix),g" tmpman +- $(INSTALL) -g root -o root -m 644 tmpman $(IROOT)$(man8dir)/atrun.8 ++ $(INSTALL) -g root -o root -m 644 tmpman $(DESTDIR)$(man8dir)/atrun.8 + rm -f tmpman +- $(INSTALL) -g root -o root -m 644 at.allow.5 $(IROOT)$(man5dir)/ +- cd $(IROOT)$(man5dir) && $(LN_S) -f at.allow.5 at.deny.5 +- $(INSTALL) -g root -o root -m 644 $(DOCS) $(IROOT)$(atdocdir) +- rm -f $(IROOT)$(mandir)/cat1/at.1* $(IROOT)$(mandir)/cat1/batch.1* \ +- $(IROOT)$(mandir)/cat1/atq.1* +- rm -f $(IROOT)$(mandir)/cat1/atd.8* ++ $(INSTALL) -g root -o root -m 644 at.allow.5 $(DESTDIR)$(man5dir)/ ++ cd $(DESTDIR)$(man5dir) && $(LN_S) -f at.allow.5 at.deny.5 ++ $(INSTALL) -g root -o root -m 644 $(DOCS) $(DESTDIR)$(atdocdir) ++ rm -f $(DESTDIR)$(mandir)/cat1/at.1* $(DESTDIR)$(mandir)/cat1/batch.1* \ ++ $(DESTDIR)$(mandir)/cat1/atq.1* ++ rm -f $(DESTDIR)$(mandir)/cat1/atd.8* + if test x"$(systemdsystemunitdir)" != xno; then \ +- $(INSTALL) -o root -g root -m 755 -d $(IROOT)$(systemdsystemunitdir); \ +- $(INSTALL) -o root -g root -m 644 atd.service $(IROOT)$(systemdsystemunitdir); \ ++ $(INSTALL) -o root -g root -m 755 -d $(DESTDIR)$(systemdsystemunitdir); \ ++ $(INSTALL) -o root -g root -m 644 atd.service $(DESTDIR)$(systemdsystemunitdir); \ + fi + + dist: checkin $(DIST) $(LIST) Filelist.asc +-- +2.4.10 + diff --git a/package/at/0003-Makefile.in-make-install-fix.patch b/package/at/0003-Makefile.in-make-install-fix.patch new file mode 100644 index 0000000000..831ea1a3a9 --- /dev/null +++ b/package/at/0003-Makefile.in-make-install-fix.patch @@ -0,0 +1,83 @@ +[PATCH]: Makefile.in: fix make install for non-root, don't strip + +Buildroot will ensure all files are owned by root and stripped anyway +(if needed) before the rootfs is created. + +[Vincent: tweak the patch for the new version] + +Signed-off-by: Peter Korsgaard +Signed-off-by: Vicente Olivert Riera +--- + Makefile.in | 43 +++++++++++++++++++++---------------------- + 1 file changed, 21 insertions(+), 22 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 1f699d9..f313f9b 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -95,41 +95,40 @@ atrun: atrun.in + $(CC) -c $(CFLAGS) $(DEFS) $*.c + + install: all +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(etcdir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(bindir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(sbindir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(docdir) +- $(INSTALL) -g root -o root -m 755 -d $(DESTDIR)$(atdocdir) +- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(etcdir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(sbindir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(docdir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(atdocdir) ++ $(INSTALL) -m 755 -d $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) + chmod 1770 $(DESTDIR)$(ATSPOOL_DIR) $(DESTDIR)$(ATJOB_DIR) + touch $(DESTDIR)$(LFILE) + chmod 600 $(DESTDIR)$(LFILE) +- chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(DESTDIR)$(LFILE) +- test -f $(DESTDIR)$(etcdir)/at.allow || test -f $(DESTDIR)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(DESTDIR)$(etcdir)/ +- $(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 at $(DESTDIR)$(bindir) ++ test -f $(DESTDIR)$(etcdir)/at.allow || test -f $(DESTDIR)$(etcdir)/at.deny || $(INSTALL) -m 640 at.deny $(DESTDIR)$(etcdir)/ ++ $(INSTALL) -m 6755 at $(DESTDIR)$(bindir) + $(LN_S) -f at $(DESTDIR)$(bindir)/atq + $(LN_S) -f at $(DESTDIR)$(bindir)/atrm +- $(INSTALL) -g root -o root -m 755 batch $(DESTDIR)$(bindir) +- $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man1dir) +- $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man5dir) +- $(INSTALL) -d -o root -g root -m 755 $(DESTDIR)$(man8dir) +- $(INSTALL) -g root -o root -m 755 atd $(DESTDIR)$(sbindir) +- $(INSTALL) -g root -o root -m 755 atrun $(DESTDIR)$(sbindir) +- $(INSTALL) -g root -o root -m 644 at.1 $(DESTDIR)$(man1dir)/ ++ $(INSTALL) -m 755 batch $(DESTDIR)$(bindir) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(man1dir) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(man5dir) ++ $(INSTALL) -d -m 755 $(DESTDIR)$(man8dir) ++ $(INSTALL) -m 755 atd $(DESTDIR)$(sbindir) ++ $(INSTALL) -m 755 atrun $(DESTDIR)$(sbindir) ++ $(INSTALL) -m 644 at.1 $(DESTDIR)$(man1dir)/ + cd $(DESTDIR)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1 +- $(INSTALL) -g root -o root -m 644 atd.8 $(DESTDIR)$(man8dir)/ ++ $(INSTALL) -m 644 atd.8 $(DESTDIR)$(man8dir)/ + sed "s,\$${exec_prefix},$(exec_prefix),g" tmpman +- $(INSTALL) -g root -o root -m 644 tmpman $(DESTDIR)$(man8dir)/atrun.8 ++ $(INSTALL) -m 644 tmpman $(DESTDIR)$(man8dir)/atrun.8 + rm -f tmpman +- $(INSTALL) -g root -o root -m 644 at.allow.5 $(DESTDIR)$(man5dir)/ ++ $(INSTALL) -m 644 at.allow.5 $(DESTDIR)$(man5dir)/ + cd $(DESTDIR)$(man5dir) && $(LN_S) -f at.allow.5 at.deny.5 +- $(INSTALL) -g root -o root -m 644 $(DOCS) $(DESTDIR)$(atdocdir) ++ $(INSTALL) -m 644 $(DOCS) $(DESTDIR)$(atdocdir) + rm -f $(DESTDIR)$(mandir)/cat1/at.1* $(DESTDIR)$(mandir)/cat1/batch.1* \ + $(DESTDIR)$(mandir)/cat1/atq.1* + rm -f $(DESTDIR)$(mandir)/cat1/atd.8* + if test x"$(systemdsystemunitdir)" != xno; then \ +- $(INSTALL) -o root -g root -m 755 -d $(DESTDIR)$(systemdsystemunitdir); \ +- $(INSTALL) -o root -g root -m 644 atd.service $(DESTDIR)$(systemdsystemunitdir); \ ++ $(INSTALL) -m 755 -d $(DESTDIR)$(systemdsystemunitdir); \ ++ $(INSTALL) -m 644 atd.service $(DESTDIR)$(systemdsystemunitdir); \ + fi + + dist: checkin $(DIST) $(LIST) Filelist.asc +-- +2.4.10 + diff --git a/package/at/0004-getloadavg.c-fix.patch b/package/at/0004-getloadavg.c-fix.patch new file mode 100644 index 0000000000..e0739271ef --- /dev/null +++ b/package/at/0004-getloadavg.c-fix.patch @@ -0,0 +1,30 @@ +[PATCH]: fix getloadavg.c compilation, revert to 3.1.10 version + +getloadavg.c shipped with 3.1.13 doesn't compile because it references +headers not shipped. Fix it by simply reverting to the 3.1.10 version. + +Signed-off-by: Peter Korsgaard +--- + getloadavg.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +Index: at-3.1.13/getloadavg.c +=================================================================== +--- at-3.1.13.orig/getloadavg.c ++++ at-3.1.13/getloadavg.c +@@ -66,11 +66,12 @@ Boston, MA 02110-1301 USA */ + + /* This should always be first. */ + #ifdef HAVE_CONFIG_H +-#include ++#include "config.h" + #endif + +-#include "lisp.h" +-#include "sysfile.h" /* for encapsulated open, close, read, write */ ++#include ++#include ++#include + + #ifndef HAVE_GETLOADAVG + diff --git a/package/at/0005-parsetime.l-include-config-h.patch b/package/at/0005-parsetime.l-include-config-h.patch new file mode 100644 index 0000000000..f4111ebf67 --- /dev/null +++ b/package/at/0005-parsetime.l-include-config-h.patch @@ -0,0 +1,16 @@ +Make sure to include config.h so that NEEDS_* macros are properly +taken into account. This was a problem for NEEDS_YYWRAP, which was set +to 1 in config.h, but the corresponding code wasn't compiled in. + +Index: at-3.1.13/parsetime.l +=================================================================== +--- at-3.1.13.orig/parsetime.l ++++ at-3.1.13/parsetime.l +@@ -4,6 +4,7 @@ + #include + #include "y.tab.h" + #include "parsetime.h" ++#include "config.h" + + char *last_token = NULL; + char **my_argv; diff --git a/package/at/0006-remove-glibc-__isleap-assumption.patch b/package/at/0006-remove-glibc-__isleap-assumption.patch new file mode 100644 index 0000000000..21522492c8 --- /dev/null +++ b/package/at/0006-remove-glibc-__isleap-assumption.patch @@ -0,0 +1,59 @@ +From 7f811d9c4ebc9444e613e251c31d6bf537a24dc1 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 13 Apr 2015 16:35:30 -0700 +Subject: [PATCH] remove glibc assumption + +glibc time.h header has an undocumented __isleap macro +that we are using anf musl is missing it. +Since it is undocumented & does not appear +on any other libc, stop using it and just define the macro in +locally instead. + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +[patch from: http://patchwork.openembedded.org/patch/91893/ ] +Signed-off-by: "Yann E. MORIN" + +--- + parsetime.y | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/parsetime.y b/parsetime.y +index 7005e88..324e6d3 100644 +--- a/parsetime.y ++++ b/parsetime.y +@@ -8,6 +8,9 @@ + + #define YYDEBUG 1 + ++#define is_leap_year(y) \ ++ ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0)) ++ + struct tm exectm; + static int isgmt; + static int yearspec; +@@ -217,8 +220,8 @@ date : month_name day_number + mnum == 12) && dnum > 31) + || ((mnum == 4 || mnum == 6 || mnum == 9 || + mnum == 11) && dnum > 30) +- || (mnum == 2 && dnum > 29 && __isleap(ynum+1900)) +- || (mnum == 2 && dnum > 28 && !__isleap(ynum+1900)) ++ || (mnum == 2 && dnum > 29 && is_leap_year(ynum+1900)) ++ || (mnum == 2 && dnum > 28 && !is_leap_year(ynum+1900)) + ) + { + yyerror("Error in day of month"); +@@ -261,8 +264,8 @@ date : month_name day_number + mnum == 12) && dnum > 31) + || ((mnum == 4 || mnum == 6 || mnum == 9 || + mnum == 11) && dnum > 30) +- || (mnum == 2 && dnum > 29 && __isleap(ynum+1900)) +- || (mnum == 2 && dnum > 28 && !__isleap(ynum+1900)) ++ || (mnum == 2 && dnum > 29 && is_leap_year(ynum+1900)) ++ || (mnum == 2 && dnum > 28 && !is_leap_year(ynum+1900)) + ) + { + yyerror("Error in day of month"); +-- +2.1.4 diff --git a/package/at/Config.in b/package/at/Config.in new file mode 100644 index 0000000000..17fabf7f6b --- /dev/null +++ b/package/at/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_AT + bool "at" + depends on BR2_USE_MMU + help + At and batch read shell commands from standard input and + store them as jobs to be scheduled for execution in the + future. + + at - run the job at a specified time + batch - run the job when system load levels permit diff --git a/package/at/S99at b/package/at/S99at new file mode 100755 index 0000000000..666d39b546 --- /dev/null +++ b/package/at/S99at @@ -0,0 +1,38 @@ +#!/bin/sh +# +# Starts at daemon +# + +umask 077 + +start() { + printf "Starting atd: " + start-stop-daemon --start --quiet --make-pidfile --pidfile /var/run/atd.pid --background --exec /usr/sbin/atd -- -f + echo "OK" +} +stop() { + printf "Stopping atd: " + start-stop-daemon --stop --quiet --pidfile /var/run/atd.pid + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/at/at.hash b/package/at/at.hash new file mode 100644 index 0000000000..22c732cc7e --- /dev/null +++ b/package/at/at.hash @@ -0,0 +1,2 @@ +# From: http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/a/at/at_3.1.16-1.dsc +sha256 cb9af59c6a54edce9536ba629841055409d1f89d8ae26494727a97141fb4d5c1 at_3.1.16.orig.tar.gz diff --git a/package/at/at.mk b/package/at/at.mk new file mode 100644 index 0000000000..8865360427 --- /dev/null +++ b/package/at/at.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# at +# +################################################################################ + +AT_VERSION = 3.1.16 +AT_SOURCE = at_$(AT_VERSION).orig.tar.gz +AT_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/a/at +# missing deps for parsetime.l +AT_MAKE = $(MAKE1) +AT_AUTORECONF = YES +AT_DEPENDENCIES = $(if $(BR2_PACKAGE_FLEX),flex) host-bison host-flex +AT_LICENSE = GPLv2+, GPLv3+, ISC +AT_LICENSE_FILES = Copyright COPYING + +AT_CONF_OPTS = \ + --with-jobdir=/var/spool/cron/atjobs \ + --with-atspool=/var/spool/cron/atspool \ + --with-daemon_username=root \ + --with-daemon_groupname=root \ + SENDMAIL=/usr/sbin/sendmail + +define AT_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/at/S99at $(TARGET_DIR)/etc/init.d/S99at +endef + +$(eval $(autotools-package)) diff --git a/package/atf/Config.in b/package/atf/Config.in new file mode 100644 index 0000000000..43a5d4f2c9 --- /dev/null +++ b/package/atf/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_ATF + bool "atf" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + help + ATF, or Automated Testing Framework, is a collection of + libraries to write test programs in C, C++ and POSIX shell. + + https://github.com/jmmv/atf + +comment "atf needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU diff --git a/package/atf/atf.hash b/package/atf/atf.hash new file mode 100644 index 0000000000..78cd3c6828 --- /dev/null +++ b/package/atf/atf.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 92bc64180135eea8fe84c91c9f894e678767764f6dbc8482021d4dde09857505 atf-0.21.tar.gz diff --git a/package/atf/atf.mk b/package/atf/atf.mk new file mode 100644 index 0000000000..ed2080e225 --- /dev/null +++ b/package/atf/atf.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# atf +# +################################################################################ + +ATF_VERSION = 0.21 +ATF_SITE = https://github.com/jmmv/atf/releases/download/atf-$(ATF_VERSION) +ATF_INSTALL_STAGING = YES +ATF_LICENSE = BSD-2c, BSD-3c +ATF_LICENSE_FILES = COPYING +# Ships a beta libtool version hence our patch doesn't apply. +ATF_AUTORECONF = YES +# Do not install precompiled tests. +ATF_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-exec + +# ATF_SHELL defaults to the host's bash +ATF_CONF_ENV = \ + kyua_cv_getopt_plus=yes \ + kyua_cv_attribute_noreturn=yes \ + kyua_cv_getcwd_works=yes \ + ATF_SHELL=/bin/sh + +$(eval $(autotools-package)) diff --git a/package/atftp/0001-Makefile.am-link-against-libpthread-for-atftp.patch b/package/atftp/0001-Makefile.am-link-against-libpthread-for-atftp.patch new file mode 100644 index 0000000000..e879df5b3b --- /dev/null +++ b/package/atftp/0001-Makefile.am-link-against-libpthread-for-atftp.patch @@ -0,0 +1,26 @@ +Makefile.am: link against libpthread for atftp + +atftp client needs to link against libpthread as static builds do not +work otherwise. + +Signed-off-by: Ryan Barnett +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index e59592f..200829a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -28,7 +28,7 @@ noinst_HEADERS = argz.h logger.h options.h stats.h tftp.h tftp_def.h tftp_io.h + tftpd.h tftpd_pcre.h tftpd_mtftp.h + + bin_PROGRAMS = atftp +-atftp_LDADD = $(LIBTERMCAP) $(LIBREADLINE) ++atftp_LDADD = $(LIBTERMCAP) $(LIBREADLINE) $(LIBPTHREAD) + atftp_SOURCES = tftp.c tftp_io.c logger.c options.c tftp_def.c tftp_file.c \ + argz.c tftp_mtftp.c + +-- +1.9.1 + diff --git a/package/atftp/0002-argz.h-fix-musl-compile-add-missing-defines.patch b/package/atftp/0002-argz.h-fix-musl-compile-add-missing-defines.patch new file mode 100644 index 0000000000..0679ef3b44 --- /dev/null +++ b/package/atftp/0002-argz.h-fix-musl-compile-add-missing-defines.patch @@ -0,0 +1,42 @@ +From 543e67919f5cacf309ac88ab091331e41af4224b Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 16 Apr 2015 22:41:57 +0200 +Subject: [PATCH] argz.h: fix musl compile (add missing defines) + +Add __THROW, __BEGIN_DECLS, __END_DECLS and __attribute_pure__ defines. + +Signed-off-by: Peter Seiderer +--- + argz.h | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/argz.h b/argz.h +index 582be55..bdf9f62 100644 +--- a/argz.h ++++ b/argz.h +@@ -48,6 +48,22 @@ + # define __const const + #endif + ++#ifndef __THROW ++# define __THROW ++#endif ++ ++#ifndef __BEGIN_DECLS ++# define __BEGIN_DECLS ++#endif ++ ++#ifndef __END_DECLS ++# define __END_DECLS ++#endif ++ ++#ifndef __attribute_pure__ ++# define __attribute_pure__ ++#endif ++ + #ifndef __error_t_defined + typedef int error_t; + #endif +-- +2.1.4 + diff --git a/package/atftp/0003-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch b/package/atftp/0003-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch new file mode 100644 index 0000000000..485e71a84b --- /dev/null +++ b/package/atftp/0003-tftp.h-tftpd.h-fix-musl-compile-missing-include.patch @@ -0,0 +1,40 @@ +From 77e399899d9d7297d23c321811b628febdf0fd92 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 16 Apr 2015 22:43:49 +0200 +Subject: [PATCH] tftp.h/tftpd.h: fix musl compile (missing include) + +Add sys/types.h include for u_char typedef. + +Signed-off-by: Peter Seiderer +--- + tftp.h | 1 + + tftpd.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/tftp.h b/tftp.h +index 12bd6aa..32a3f63 100644 +--- a/tftp.h ++++ b/tftp.h +@@ -19,6 +19,7 @@ + + #include + #include ++#include + #include "tftp_def.h" + #include "config.h" + +diff --git a/tftpd.h b/tftpd.h +index 945065e..60d3a49 100644 +--- a/tftpd.h ++++ b/tftpd.h +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include "tftp_io.h" + + /* +-- +2.1.4 + diff --git a/package/atftp/Config.in b/package/atftp/Config.in new file mode 100644 index 0000000000..7074716370 --- /dev/null +++ b/package/atftp/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_ATFTP + bool "atftp" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + atftp is a client/server implementation of the TFTP + protocol that implements RFCs 1350, 2090, 2347, 2348, + and 2349. The server is multi-threaded and the client + presents a friendly interface using libreadline + (if enabled). + + http://sourceforge.net/projects/atftp/ + +comment "atftp needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/atftp/atftp.hash b/package/atftp/atftp.hash new file mode 100644 index 0000000000..b7860c7681 --- /dev/null +++ b/package/atftp/atftp.hash @@ -0,0 +1,2 @@ +# Locally computed +sha1 fc9e9f821dfd2f257b4a5c32b948ed60b4e31fd1 atftp-0.7.1.tar.gz diff --git a/package/atftp/atftp.mk b/package/atftp/atftp.mk new file mode 100644 index 0000000000..615b6eadbb --- /dev/null +++ b/package/atftp/atftp.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# atftp +# +################################################################################ + +ATFTP_VERSION = 0.7.1 +ATFTP_SITE = http://sourceforge.net/projects/atftp/files +ATFTP_LICENSE = GPLv2+ +ATFTP_LICENSE_FILES = LICENSE +ATFTP_CONF_OPTS = --disable-libwrap --disable-mtftp +# For static we need to explicitly link against libpthread +ATFTP_LIBS = -lpthread +# We use CPPFLAGS for -fgnu89-inline even though it's a compiler flag +# because atftp discards configure environment CFLAGS. -fgnu89-inline +# is needed to avoid multiple definition error with gcc 5. See +# https://gcc.gnu.org/gcc-5/porting_to.html. +ATFTP_CONF_ENV = LIBS="$(ATFTP_LIBS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS) -fgnu89-inline" + +ifeq ($(BR2_PACKAGE_READLINE),y) +ATFTP_DEPENDENCIES += readline +ATFTP_CONF_OPTS += --enable-libreadline +# For static, readline links with ncurses +ATFTP_LIBS += -lncurses +else +ATFTP_CONF_OPTS += --disable-libreadline +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +ATFTP_DEPENDENCIES += pcre +ATFTP_CONF_OPTS += --enable-libpcre +else +ATFTP_CONF_OPTS += --disable-libpcre +endif + +$(eval $(autotools-package)) diff --git a/package/atk/Config.in b/package/atk/Config.in new file mode 100644 index 0000000000..1120a94dd0 --- /dev/null +++ b/package/atk/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_ATK + bool "atk" + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + help + The ATK accessibility toolkit, needed to build GTK+-2.x. + +comment "atk needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/atk/atk.hash b/package/atk/atk.hash new file mode 100644 index 0000000000..7178ccc81c --- /dev/null +++ b/package/atk/atk.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/atk/2.20/atk-2.20.0.sha256sum +sha256 493a50f6c4a025f588d380a551ec277e070b28a82e63ef8e3c06b3ee7c1238f0 atk-2.20.0.tar.xz diff --git a/package/atk/atk.mk b/package/atk/atk.mk new file mode 100644 index 0000000000..663d13ae5f --- /dev/null +++ b/package/atk/atk.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# atk +# +################################################################################ + +ATK_VERSION_MAJOR = 2.20 +ATK_VERSION = $(ATK_VERSION_MAJOR).0 +ATK_SOURCE = atk-$(ATK_VERSION).tar.xz +ATK_SITE = http://ftp.gnome.org/pub/gnome/sources/atk/$(ATK_VERSION_MAJOR) +ATK_LICENSE = LGPLv2+ +ATK_LICENSE_FILES = COPYING +ATK_INSTALL_STAGING = YES +ATK_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install +ATK_CONF_OPTS = --disable-glibtest --enable-explicit-deps=no +ATK_DEPENDENCIES = libglib2 host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/atkmm/Config.in b/package/atkmm/Config.in new file mode 100644 index 0000000000..2091eabeb4 --- /dev/null +++ b/package/atkmm/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_ATKMM + bool "atkmm" + select BR2_PACKAGE_ATK + select BR2_PACKAGE_GLIBMM + select BR2_PACKAGE_LIBSIGC + depends on BR2_INSTALL_LIBSTDCPP # glibmm + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on BR2_TOOLCHAIN_HAS_THREADS # atk/glibmm -> libglib2 + depends on BR2_USE_MMU # atk/glibmm -> libglib2 + depends on BR2_USE_WCHAR # atk/glibmm -> libglib2 + + help + The atkmm package is a set of C++ bindings for Atk. + + http://www.gtkmm.org/ + +comment "atkmm needs a toolchain w/ C++, wchar, threads, gcc >= 4.8" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR \ + || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/atkmm/atkmm.hash b/package/atkmm/atkmm.hash new file mode 100644 index 0000000000..4b3577c88d --- /dev/null +++ b/package/atkmm/atkmm.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/atkmm/2.24/atkmm-2.24.2.sha256sum +sha256 ff95385759e2af23828d4056356f25376cfabc41e690ac1df055371537e458bd atkmm-2.24.2.tar.xz diff --git a/package/atkmm/atkmm.mk b/package/atkmm/atkmm.mk new file mode 100644 index 0000000000..2c070f250e --- /dev/null +++ b/package/atkmm/atkmm.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# atkmm +# +################################################################################ + +ATKMM_VERSION_MAJOR = 2.24 +ATKMM_VERSION = $(ATKMM_VERSION_MAJOR).2 +ATKMM_SOURCE = atkmm-$(ATKMM_VERSION).tar.xz +ATKMM_SITE = http://ftp.gnome.org/pub/gnome/sources/atkmm/$(ATKMM_VERSION_MAJOR) +ATKMM_LICENSE = LGPLv2.1+ (library), GPLv2+ (tools) +ATKMM_LICENSE_FILES = COPYING COPYING.tools +ATKMM_INSTALL_STAGING = YES +ATKMM_DEPENDENCIES = atk glibmm libsigc host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/attr/0001-support-static-installation.patch b/package/attr/0001-support-static-installation.patch new file mode 100644 index 0000000000..87858ac75e --- /dev/null +++ b/package/attr/0001-support-static-installation.patch @@ -0,0 +1,29 @@ +Support installation of .a file when doing static linking + +When doing static linking (i.e ENABLE_SHARED != yes), the attr build +logic wasn't installing any library at all, not even the .a file which +is needed for static linking. This patch fixes that. + +Signed-off-by: Thomas Petazzoni + +Index: b/include/buildmacros +=================================================================== +--- a/include/buildmacros ++++ b/include/buildmacros +@@ -97,7 +97,15 @@ + + INSTALL_LTLIB_STATIC = \ + cd $(TOPDIR)/$(LIBNAME)/.libs; \ +- ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); ++ ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \ ++ ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).la $(PKG_DEVLIB_DIR); \ ++ ../$(INSTALL) -m 644 $(LIBNAME).la $(PKG_DEVLIB_DIR)/$(LIBNAME).la ; \ ++ ../$(INSTALL) -m 755 -d $(PKG_LIB_DIR); \ ++ ../$(INSTALL) -T so_base $(LIBNAME).la $(PKG_LIB_DIR); \ ++ if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \ ++ ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).a $(PKG_LIB_DIR)/$(LIBNAME).a; \ ++ ../$(INSTALL) -S $(PKG_DEVLIB_DIR)/$(LIBNAME).la $(PKG_LIB_DIR)/$(LIBNAME).la; \ ++ fi + + INSTALL_MAN = \ + @for d in $(MAN_PAGES); do \ diff --git a/package/attr/0002-avoid-glibc-specific-decls-defines.patch b/package/attr/0002-avoid-glibc-specific-decls-defines.patch new file mode 100644 index 0000000000..8c71678cf4 --- /dev/null +++ b/package/attr/0002-avoid-glibc-specific-decls-defines.patch @@ -0,0 +1,37 @@ +From 667137acaffb8d0cc62b47821a67a52ba0637d5c Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 10 Jan 2014 13:56:37 +0000 +Subject: avoid glibc-specific DECLS defines + +This matches what we do in all the other headers. + +Signed-off-by: Thomas Petazzoni +--- +diff --git a/include/xattr.h b/include/xattr.h +index 70a84be..070d7c5 100644 +--- a/include/xattr.h ++++ b/include/xattr.h +@@ -30,8 +30,9 @@ + #define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ + #define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ + +- +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + extern int setxattr (const char *__path, const char *__name, + const void *__value, size_t __size, int __flags) __THROW; +@@ -58,6 +59,8 @@ extern int removexattr (const char *__path, const char *__name) __THROW; + extern int lremovexattr (const char *__path, const char *__name) __THROW; + extern int fremovexattr (int __filedes, const char *__name) __THROW; + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __XATTR_H__ */ +-- +cgit v0.9.0.2 diff --git a/package/attr/0003-portability-fixes.patch b/package/attr/0003-portability-fixes.patch new file mode 100644 index 0000000000..c5dc8c865b --- /dev/null +++ b/package/attr/0003-portability-fixes.patch @@ -0,0 +1,37 @@ +From 92247401984dd9a80d9d0c8c030692323f980678 Mon Sep 17 00:00:00 2001 +From: Emmanuel Dreyfus +Date: Mon, 30 Jun 2014 13:06:05 +0000 +Subject: Portability fixes + +- is Linux specific +- Define __THROW for non glibc based systems + +Signed-off-by: Thomas Petazzoni +--- +(limited to 'include/xattr.h') + +diff --git a/include/xattr.h b/include/xattr.h +index 070d7c5..fd1f268 100644 +--- a/include/xattr.h ++++ b/include/xattr.h +@@ -20,7 +20,18 @@ + #ifndef __XATTR_H__ + #define __XATTR_H__ + ++#if defined(linux) + #include ++#endif ++ ++/* Portability non glibc c++ build systems */ ++#ifndef __THROW ++# if defined __cplusplus ++# define __THROW throw () ++# else ++# define __THROW ++# endif ++#endif + + #include + #ifndef ENOATTR +-- +cgit v0.9.0.2 diff --git a/package/attr/Config.in b/package/attr/Config.in new file mode 100644 index 0000000000..554772b75d --- /dev/null +++ b/package/attr/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_ATTR + bool "attr" + help + Commands for Manipulating Filesystem Extended Attributes. + This package also provides libattr. + + http://savannah.nongnu.org/projects/attr diff --git a/package/attr/attr.hash b/package/attr/attr.hash new file mode 100644 index 0000000000..d2d1c2ed50 --- /dev/null +++ b/package/attr/attr.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 25772f653ac5b2e3ceeb89df50e4688891e21f723c460636548971652af0a859 attr-2.4.47.src.tar.gz diff --git a/package/attr/attr.mk b/package/attr/attr.mk new file mode 100644 index 0000000000..4d5a07df0b --- /dev/null +++ b/package/attr/attr.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# attr +# +################################################################################ + +ATTR_VERSION = 2.4.47 +ATTR_SOURCE = attr-$(ATTR_VERSION).src.tar.gz +ATTR_SITE = http://download.savannah.gnu.org/releases/attr +ATTR_INSTALL_STAGING = YES +ATTR_CONF_OPTS = --enable-gettext=no +HOST_ATTR_CONF_OPTS = --enable-gettext=no +ATTR_LICENSE = GPLv2+ (programs), LGPLv2.1+ (libraries) +ATTR_LICENSE_FILES = doc/COPYING doc/COPYING.LGPL + +# While the configuration system uses autoconf, the Makefiles are +# hand-written and do not use automake. Therefore, we have to hack +# around their deficiencies by passing installation paths. +ATTR_INSTALL_STAGING_OPTS = \ + prefix=$(STAGING_DIR)/usr \ + exec_prefix=$(STAGING_DIR)/usr \ + PKG_DEVLIB_DIR=$(STAGING_DIR)/usr/lib \ + install-dev install-lib + +ATTR_INSTALL_TARGET_OPTS = \ + prefix=$(TARGET_DIR)/usr \ + exec_prefix=$(TARGET_DIR)/usr \ + install install-lib + +HOST_ATTR_INSTALL_OPTS = \ + prefix=$(HOST_DIR)/usr \ + exec_prefix=$(HOST_DIR)/usr \ + install-dev install-lib + +# The libdir variable in libattr.la is empty, so let's fix it. This is +# probably due to attr not using automake, and not doing fully the +# right thing with libtool. +define ATTR_FIX_LIBTOOL_LA_LIBDIR + $(SED) "s,libdir=.*,libdir='$(STAGING_DIR)'," \ + $(STAGING_DIR)/usr/lib/libattr.la +endef + +ATTR_POST_INSTALL_STAGING_HOOKS += ATTR_FIX_LIBTOOL_LA_LIBDIR + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/audiofile/0001-Fix-pkg-config-for-static-linking.patch b/package/audiofile/0001-Fix-pkg-config-for-static-linking.patch new file mode 100644 index 0000000000..54757abbd5 --- /dev/null +++ b/package/audiofile/0001-Fix-pkg-config-for-static-linking.patch @@ -0,0 +1,56 @@ +From 2abf7d2e5c533bf4d7407c2c8057a329cd49a3cd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Tue, 24 Nov 2015 21:57:27 +0100 +Subject: [PATCH 1/1] Fix pkg-config for static linking +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Static linking userspace programs such as MPD against libaudiofile fails if +FLAC is available, because libaudiofile is linked against FLAC, but this isn't +expressed in the pkg-config file: + +[..] +arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACDecoder::reset2()': +FLAC.cpp:(.text+0x58): undefined reference to `FLAC__stream_decoder_seek_absolute' +/home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACEncoder::sync2()': +FLAC.cpp:(.text+0x88): undefined reference to `FLAC__stream_encoder_finish' +/home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACDecoder::~FLACDecoder()': +FLAC.cpp:(.text+0xc4): undefined reference to `FLAC__stream_decoder_delete' +/home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACEncoder::~FLACEncoder()': +FLAC.cpp:(.text+0x164): undefined reference to `FLAC__stream_encoder_delete' +/home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libaudiofile.a(FLAC.o): In function `FLACDecoder::runPull()': +[..] + +The Libs.private field is specifically designed for such usage: + +From pkg-config documentation: + + Libs.private: + + This line should list any private libraries in use. Private + libraries are libraries which are not exposed through your + library, but are needed in the case of static linking. + +Therefore, this patch adds a reference to FLAC as well as to lcov in the +Libs.private field of the pkg-config file. + +Signed-off-by: Jörg Krause +--- + audiofile.pc.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/audiofile.pc.in b/audiofile.pc.in +index ad5956a..d6055ef 100644 +--- a/audiofile.pc.in ++++ b/audiofile.pc.in +@@ -8,5 +8,5 @@ Description: audiofile + Requires: + Version: @VERSION@ + Libs: -L${libdir} -laudiofile +-Libs.private: -lm ++Libs.private: @FLAC_LIBS@ @COVERAGE_LIBS@ -lm + Cflags: -I${includedir} +-- +2.6.2 + diff --git a/package/audiofile/Config.in b/package/audiofile/Config.in new file mode 100644 index 0000000000..4aa8d69c87 --- /dev/null +++ b/package/audiofile/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_AUDIOFILE + bool "audiofile" + depends on BR2_INSTALL_LIBSTDCPP + help + The Audio File Library handles reading and writing audio files + in many common formats. + + http://www.68k.org/~michael/audiofile/ + +comment "audiofile needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/audiofile/audiofile.hash b/package/audiofile/audiofile.hash new file mode 100644 index 0000000000..3b9cba64f1 --- /dev/null +++ b/package/audiofile/audiofile.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 cdc60df19ab08bfe55344395739bb08f50fc15c92da3962fac334d3bff116965 audiofile-0.3.6.tar.gz diff --git a/package/audiofile/audiofile.mk b/package/audiofile/audiofile.mk new file mode 100644 index 0000000000..ee3f833a4d --- /dev/null +++ b/package/audiofile/audiofile.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# audiofile +# +################################################################################ + +AUDIOFILE_VERSION = 0.3.6 +AUDIOFILE_SITE = http://audiofile.68k.org +AUDIOFILE_INSTALL_STAGING = YES +AUDIOFILE_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' +AUDIOFILE_CONF_OPTS = --disable-examples +AUDIOFILE_DEPENDENCIES = host-pkgconf +# configure is outdated and has old bugs because of it +AUDIOFILE_AUTORECONF = YES +AUDIOFILE_LICENSE = GPLv2+, LGPLv2.1+ +AUDIOFILE_LICENSE_FILES = COPYING COPYING.GPL + +ifeq ($(BR2_PACKAGE_FLAC),y) +AUDIOFILE_DEPENDENCIES += flac +AUDIOFILE_CONF_OPTS += --enable-flac +else +AUDIOFILE_CONF_OPTS += --disable-flac +endif + +$(eval $(autotools-package)) diff --git a/package/audit/Config.in b/package/audit/Config.in new file mode 100644 index 0000000000..717c364fd5 --- /dev/null +++ b/package/audit/Config.in @@ -0,0 +1,25 @@ +# audit has some builtin per-architecture system call tables +config BR2_PACKAGE_AUDIT_ARCH_SUPPORTS + bool + default y if BR2_aarch64 || BR2_arm || BR2_armeb || \ + BR2_i386 || BR2_powerpc || BR2_x86_64 + +config BR2_PACKAGE_AUDIT + bool "audit" + depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL + help + The audit package contains the user space utilities for + storing and searching the audit records generated by + the audit subsystem in the Linux 2.6 kernel + + Note: The z/OS remote plugin is disabled in this package + + http://people.redhat.com/sgrubb/audit/ + +comment "audit needs a uClibc or (e)glibc toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \ + || BR2_TOOLCHAIN_USES_MUSL + depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS diff --git a/package/audit/S01auditd b/package/audit/S01auditd new file mode 100644 index 0000000000..2ecf0f1df9 --- /dev/null +++ b/package/audit/S01auditd @@ -0,0 +1,80 @@ +#!/bin/sh +# +# auditd This starts and stops auditd +# +# description: This starts the Linux Auditing System Daemon, +# which collects security related events in a dedicated +# audit log. If this daemon is turned off, audit events +# will be sent to syslog. +# + +NAME=auditd +DAEMON=/usr/sbin/${NAME} +CONFIG=/etc/audit/auditd.conf +PIDFILE=/var/run/${NAME}.pid + +start(){ + printf "Starting ${NAME}: " + + # Create dir to store log files in if one doesn't exist. Create + # the directory with SELinux permissions if possible + command -v matchpathcon >/dev/null 2>&1 + if [ $? = 0 ]; then + mkdir -p /var/log/audit -Z `matchpathcon -n /var/log/audit` + else + mkdir -p /var/log/audit + fi + + # Run audit daemon executable + start-stop-daemon -S -q -p ${PIDFILE} --exec ${DAEMON} + + if [ $? = 0 ]; then + # Load the default rules + test -f /etc/audit/rules.d/audit.rules && /usr/sbin/auditctl -R /etc/audit/rules.d/audit.rules >/dev/null + echo "OK" + else + echo "FAIL" + fi +} + +stop(){ + printf "Stopping ${NAME}: " + + start-stop-daemon -K -q -p ${PIDFILE} + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +reload(){ + printf "Reloading ${NAME} configuration: " + start-stop-daemon --stop -s 1 -p ${PIDFILE} 1>/dev/null + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +rotate(){ + printf "Rotating ${NAME} logs: " + start-stop-daemon --stop -s 10 -p ${PIDFILE} 1>/dev/null + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + ;; + reload) + reload + ;; + rotate) + rotate + ;; + *) + echo "Usage: $0 {start|stop|restart|reload|rotate}" + exit 1 + ;; +esac diff --git a/package/audit/audit.hash b/package/audit/audit.hash new file mode 100644 index 0000000000..f234fdb206 --- /dev/null +++ b/package/audit/audit.hash @@ -0,0 +1,2 @@ +#Locally computed +sha256 25f57f465f3230d7b1166b615ffd6748818a3dc225d0e8b396c5b2e951674e23 audit-2.4.4.tar.gz diff --git a/package/audit/audit.mk b/package/audit/audit.mk new file mode 100644 index 0000000000..329f8c5aca --- /dev/null +++ b/package/audit/audit.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# audit +# +################################################################################ + +AUDIT_VERSION = 2.4.4 +AUDIT_SITE = http://people.redhat.com/sgrubb/audit +AUDIT_LICENSE = GPLv2 +AUDIT_LICENSE_FILES = COPYING + +AUDIT_INSTALL_STAGING = YES + +AUDIT_CONF_OPTS = --without-python --without-python3 --disable-zos-remote + +ifeq ($(BR2_PACKAGE_LIBCAP_NG),y) +AUDIT_DEPENDENCIES += libcap-ng +AUDIT_CONF_OPTS += --with-libcap-ng=yes +else +AUDIT_CONF_OPTS += --with-libcap-ng=no +endif + +# For i386, x86-64 and PowerPC, the system call tables are +# unconditionally included. However, for ARM(eb) and AArch64, then +# need to be explicitly enabled. + +ifeq ($(BR2_arm)$(BR2_armeb),y) +AUDIT_CONF_OPTS += --with-arm +endif +ifeq ($(BR2_aarch64),y) +AUDIT_CONF_OPTS += --with-aarch64 +endif + +ifeq ($(BR2_INIT_SYSTEMD),y) +AUDIT_CONF_OPTS += --enable-systemd +else +AUDIT_CONF_OPTS += --disable-systemd +endif + +define AUDIT_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/audit/S01auditd $(TARGET_DIR)/etc/init.d/S01auditd +endef + +define AUDIT_INSTALL_INIT_SYSTEMD + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/auditd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/auditd.service + + mkdir -p $(TARGET_DIR)/usr/lib/tmpfiles.d + $(INSTALL) -D -m 644 package/audit/audit_tmpfiles.conf \ + $(TARGET_DIR)/usr/lib/tmpfiles.d/audit.conf +endef + +define AUDIT_INSTALL_CLEANUP + $(RM) -rf $(TARGET_DIR)/etc/rc.d + $(RM) -rf $(TARGET_DIR)/etc/sysconfig +endef +AUDIT_POST_INSTALL_TARGET_HOOKS += AUDIT_INSTALL_CLEANUP + +$(eval $(autotools-package)) diff --git a/package/audit/audit_tmpfiles.conf b/package/audit/audit_tmpfiles.conf new file mode 100644 index 0000000000..6b8325b595 --- /dev/null +++ b/package/audit/audit_tmpfiles.conf @@ -0,0 +1 @@ +d /var/log/audit 0755 - - diff --git a/package/aumix/0001-fix-incorrect-makefile-am.patch b/package/aumix/0001-fix-incorrect-makefile-am.patch new file mode 100644 index 0000000000..143174deec --- /dev/null +++ b/package/aumix/0001-fix-incorrect-makefile-am.patch @@ -0,0 +1,28 @@ +Aumix's src/Makefile.am incorrect adds @includedir@ to the list of +include paths and @libdir@ to the list of libraries paths. This is +incorrect, as @includedir@ and @libdir@ are respectively /usr/include +and /usr/lib, even in cross-compilation mode. + +At the same time, use AM_CFLAGS instead of CFLAGS, as is done on the +similar patch found in OpenEmbedded. + +Signed-off-by: Thomas Petazzoni +--- + src/Makefile.am | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +Index: aumix-2.8/src/Makefile.am +=================================================================== +--- aumix-2.8.orig/src/Makefile.am ++++ aumix-2.8/src/Makefile.am +@@ -9,9 +9,8 @@ + mouse.c common.h curses.h gpm-xterm.h gtk.h interactive.h \ + mouse.h play.xpm record.xpm + localedir = $(datadir)/locale +-INCLUDES = -I../intl -DLOCALEDIR=\"$(localedir)\" -I@includedir@ ++INCLUDES = -I../intl -DLOCALEDIR=\"$(localedir)\" + AM_CFLAGS = @CFLAGS@ @GLIB_CFLAGS@ @GTK_CFLAGS@ +-LDADD = -L@libdir@ + LIBS = @LIBS@ @GTK_LIBS@ @LIBINTL@ + DEFS = @DEFS@ + diff --git a/package/aumix/Config.in b/package/aumix/Config.in new file mode 100644 index 0000000000..3d3208250c --- /dev/null +++ b/package/aumix/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_AUMIX + bool "aumix" + select BR2_PACKAGE_NCURSES + help + aumix is a small, easy-to-use program to control the mixer + of your sound card. It runs in text mode using the ncurses + library, or from the command line (non-interactively). + It can read default settings from a file, and it can also + automatically save and restore the mixer settings at shutdown + and boot. + + http://jpj.net/~trevor/aumix.html diff --git a/package/aumix/aumix.hash b/package/aumix/aumix.hash new file mode 100644 index 0000000000..0463ea01a6 --- /dev/null +++ b/package/aumix/aumix.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d2ce43d532ef75072c8d4e7922e3bc06be6d97765a508d9ceb0d1766bbe70e29 aumix-2.9.1.tar.bz2 diff --git a/package/aumix/aumix.mk b/package/aumix/aumix.mk new file mode 100644 index 0000000000..eae34d0fbc --- /dev/null +++ b/package/aumix/aumix.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# aumix +# +################################################################################ + +AUMIX_VERSION = 2.9.1 +AUMIX_SOURCE = aumix-$(AUMIX_VERSION).tar.bz2 +AUMIX_SITE = http://jpj.net/~trevor/aumix/releases +AUMIX_AUTORECONF = YES +AUMIX_GETTEXTIZE = YES +AUMIX_LICENSE = GPLv2+ +AUMIX_LICENSE_FILES = COPYING + +AUMIX_CONF_OPTS = \ + --without-gtk \ + --without-gtk1 \ + --without-alsa \ + --without-gpm \ + --without-sysmouse + +AUMIX_DEPENDENCIES = host-gettext ncurses + +$(eval $(autotools-package)) diff --git a/package/autoconf-archive/0001-AX_TLS-fix-syntax-error.patch b/package/autoconf-archive/0001-AX_TLS-fix-syntax-error.patch new file mode 100644 index 0000000000..6d345d3468 --- /dev/null +++ b/package/autoconf-archive/0001-AX_TLS-fix-syntax-error.patch @@ -0,0 +1,46 @@ +From 1870301013d79be781ead2b0e62fc08f91715ca9 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 3 May 2015 23:02:34 +0200 +Subject: [PATCH] AX_TLS: fix syntax error + +The commit e012eb17b3d67f31dee477592328207437206c33 introduce +a syntax error due to an empty "else" statement. + +confifure: +if test "$ac_cv_tls" != "none"; then : +cat >>confdefs.h <<_ACEOF +_ACEOF +else + +fi + +Remove the [] on the third part of AS_IF. + +Signed-off-by: Romain Naour +--- + m4/ax_tls.m4 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/m4/ax_tls.m4 b/m4/ax_tls.m4 +index 809b761..2135dd2 100644 +--- a/m4/ax_tls.m4 ++++ b/m4/ax_tls.m4 +@@ -44,7 +44,7 @@ + # modified version of the Autoconf Macro, you may extend this special + # exception to the GPL to apply to your modified version as well. + +-#serial 11 ++#serial 12 + + AC_DEFUN([AX_TLS], [ + AC_MSG_CHECKING([for thread local storage (TLS) class]) +@@ -70,5 +70,5 @@ AC_DEFUN([AX_TLS], [ + AS_IF([test "$ac_cv_tls" != "none"], + [AC_DEFINE_UNQUOTED([TLS],[$ac_cv_tls],[If the compiler supports a TLS storage class define it to that here]) + m4_ifnblank([$1],[$1])], +- [m4_ifnblank([$2],[$2])]) ++ m4_ifnblank([$2],[$2])) + ]) +-- +1.9.3 + diff --git a/package/autoconf-archive/autoconf-archive.hash b/package/autoconf-archive/autoconf-archive.hash new file mode 100644 index 0000000000..5576566870 --- /dev/null +++ b/package/autoconf-archive/autoconf-archive.hash @@ -0,0 +1,2 @@ +# Computed locally +sha256 7c0467a5dbd2340153bca5a477bd92fbc951d9ee3cbed92f16f6bf08ac0c350a autoconf-archive-2015.09.25.tar.xz diff --git a/package/autoconf-archive/autoconf-archive.mk b/package/autoconf-archive/autoconf-archive.mk new file mode 100644 index 0000000000..98acba3e41 --- /dev/null +++ b/package/autoconf-archive/autoconf-archive.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# autoconf-archive +# +################################################################################ + +AUTOCONF_ARCHIVE_VERSION = 2015.09.25 +AUTOCONF_ARCHIVE_SOURCE = autoconf-archive-$(AUTOCONF_ARCHIVE_VERSION).tar.xz +AUTOCONF_ARCHIVE_SITE = $(BR2_GNU_MIRROR)/autoconf-archive +AUTOCONF_ARCHIVE_LICENSE = GPLv3+ with exception +AUTOCONF_ARCHIVE_LICENSE_FILES = COPYING COPYING.EXCEPTION +HOST_AUTOCONF_ARCHIVE_INSTALL_OPTS = aclocaldir=$(HOST_DIR)/usr/share/autoconf-archive install + +$(eval $(host-autotools-package)) diff --git a/package/autoconf/0001-dont-add-dirty-to-version.patch b/package/autoconf/0001-dont-add-dirty-to-version.patch new file mode 100644 index 0000000000..e8d9f6a29d --- /dev/null +++ b/package/autoconf/0001-dont-add-dirty-to-version.patch @@ -0,0 +1,28 @@ +autoconf: don't append -dirty to version + +Don't append -dirty to autoconf version number if the buildroot git tree +has uncommited changes. + +This script is meant for the autoconf developers, but it also activates +if you build autoconf in a subdirectory of a git tree (E.G. like how it's +commonly done in buildroot). + +The affect is that autoconf gets built as being version 2.65-dirty, which +breaks programs (like Python) which explicitly checks for autoconf-2.65. + +[Gustavo: update for autoconf 2.69] +Signed-off-by: Peter Korsgaard +Signed-off-by: Gustavo Zacarias + +diff -Nura autoconf-2.69.orig/build-aux/git-version-gen autoconf-2.69/build-aux/git-version-gen +--- autoconf-2.69.orig/build-aux/git-version-gen 2013-06-27 11:31:02.340200154 -0300 ++++ autoconf-2.69/build-aux/git-version-gen 2013-06-27 11:31:13.734577033 -0300 +@@ -203,7 +203,7 @@ + *) # Append the suffix only if there isn't one already. + case $v in + *-dirty) ;; +- *) v="$v-dirty" ;; ++ #*) v="$v-dirty" ;; + esac ;; + esac + fi diff --git a/package/autoconf/autoconf.hash b/package/autoconf/autoconf.hash new file mode 100644 index 0000000000..f35f6f8d0a --- /dev/null +++ b/package/autoconf/autoconf.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 64ebcec9f8ac5b2487125a86a7760d2591ac9e1d3dbd59489633f9de62a57684 autoconf-2.69.tar.xz diff --git a/package/autoconf/autoconf.mk b/package/autoconf/autoconf.mk new file mode 100644 index 0000000000..fd91961e85 --- /dev/null +++ b/package/autoconf/autoconf.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# autoconf +# +################################################################################ + +AUTOCONF_VERSION = 2.69 +AUTOCONF_SOURCE = autoconf-$(AUTOCONF_VERSION).tar.xz +AUTOCONF_SITE = $(BR2_GNU_MIRROR)/autoconf + +AUTOCONF_LICENSE = GPLv3+ with exceptions +AUTOCONF_LICENSE_FILES = COPYINGv3 COPYING.EXCEPTION + +HOST_AUTOCONF_CONF_ENV = \ + EMACS="no" \ + ac_cv_path_M4=$(HOST_DIR)/usr/bin/m4 \ + ac_cv_prog_gnu_m4_gnu=no + +HOST_AUTOCONF_DEPENDENCIES = host-m4 host-libtool + +$(eval $(host-autotools-package)) + +# variables used by other packages +AUTOCONF = $(HOST_DIR)/usr/bin/autoconf +AUTOHEADER = $(HOST_DIR)/usr/bin/autoheader +AUTORECONF = $(HOST_CONFIGURE_OPTS) ACLOCAL="$(ACLOCAL)" AUTOCONF="$(AUTOCONF)" AUTOHEADER="$(AUTOHEADER)" AUTOMAKE="$(AUTOMAKE)" AUTOPOINT=/bin/true $(HOST_DIR)/usr/bin/autoreconf -f -i -I "$(ACLOCAL_DIR)" -I "$(ACLOCAL_HOST_DIR)" diff --git a/package/autofs/0001-include-linux-nfs.h-directly-in-rpc_sub.patch b/package/autofs/0001-include-linux-nfs.h-directly-in-rpc_sub.patch new file mode 100644 index 0000000000..26e86c325f --- /dev/null +++ b/package/autofs/0001-include-linux-nfs.h-directly-in-rpc_sub.patch @@ -0,0 +1,33 @@ +Upstream-Status: Pending + +From 44bdce8c6ed9b30c1643e5981172a4f9025f013c Mon Sep 17 00:00:00 2001 +From: Andreas Oberritter +Date: Wed, 13 Mar 2013 16:17:08 +0100 +Subject: [PATCH] autofs-5.0.7: include linux/nfs.h directly in rpc_subs.h + +Fixes compile error with uclibc. Glibc's nfs/nfs.h contains +nothing but "#include linux/nfs.h". rpc_subs.h already includes +other linux/nfs*.h files directly. + +Signed-off-by: Andreas Oberritter +Signed-off-by: Thomas Petazzoni +--- + include/rpc_subs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/rpc_subs.h b/include/rpc_subs.h +index b6d59f9..a2d9648 100644 +--- a/include/rpc_subs.h ++++ b/include/rpc_subs.h +@@ -18,7 +18,7 @@ + + #include + #include +-#include ++#include + #include + #include + +-- +1.7.10.4 + diff --git a/package/autofs/Config.in b/package/autofs/Config.in new file mode 100644 index 0000000000..dbe667442f --- /dev/null +++ b/package/autofs/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_AUTOFS + bool "autofs" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + depends on !BR2_STATIC_LIBS # dlfcn + help + Autofs controls the operation of the automount daemons. The + automount daemons automatically mount filesystems when they + are used and unmount them after a period of inactivity based + on a set of pre-configured maps defined by default in + /etc/auto.master. The kernel automounter implements SunOS + style automounter under Linux and requires a kernel version + of at least 2.6.17 and the autofs4 kernel module. + + http://www.linuxfromscratch.org/blfs/view/svn/general/autofs.html + +comment "autofs needs a toolchain w/ threads, RPC, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_NATIVE_RPC diff --git a/package/autofs/autofs.hash b/package/autofs/autofs.hash new file mode 100644 index 0000000000..2d98375a7b --- /dev/null +++ b/package/autofs/autofs.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/daemons/autofs/v5/sha256sums.asc +sha256 e08ff0ef9ff365d87b6c33dca136d20e4e07675197a324f2816894cb437021c3 autofs-5.1.1.tar.xz diff --git a/package/autofs/autofs.mk b/package/autofs/autofs.mk new file mode 100644 index 0000000000..a98e5eb685 --- /dev/null +++ b/package/autofs/autofs.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# autofs +# +################################################################################ + +AUTOFS_VERSION = 5.1.1 +AUTOFS_SOURCE = autofs-$(AUTOFS_VERSION).tar.xz +AUTOFS_SITE = $(BR2_KERNEL_MIRROR)/linux/daemons/autofs/v5 +AUTOFS_LICENSE = GPLv2+ +AUTOFS_LICENSE_FILES = COPYING COPYRIGHT +AUTOFS_DEPENDENCIES = host-flex host-bison + +# autofs looks on the build machine for the path of modprobe, so tell +# it explicitly where it will be located on the target. +AUTOFS_CONF_ENV = \ + ac_cv_path_MODPROBE=/sbin/modprobe + +# instead of looking in the PATH like any reasonable package, autofs +# configure looks only in an hardcoded search path for host tools, +# which we have to override with --with-path. +AUTOFS_CONF_OPTS = \ + --disable-mount-locking \ + --enable-ignore-busy \ + --without-openldap \ + --without-sasl \ + --with-path="$(BR_PATH)" + +AUTOFS_MAKE_ENV = DONTSTRIP=1 + +$(eval $(autotools-package)) diff --git a/package/automake/0001-noman.patch b/package/automake/0001-noman.patch new file mode 100644 index 0000000000..a4ad16ddfb --- /dev/null +++ b/package/automake/0001-noman.patch @@ -0,0 +1,27 @@ +Disable manpages build and installation, seems the bundled version of +help2man is somewhat old and breaks on modern distributions such as +Fedora 20, as reported by Kanibal on IRC. + +Signed-off-by: Gustavo Zacarias + +diff -Nura automake-1.14.1.orig/Makefile.in automake-1.14.1/Makefile.in +--- automake-1.14.1.orig/Makefile.in 2014-09-10 18:40:57.554164448 -0300 ++++ automake-1.14.1/Makefile.in 2014-09-10 18:42:01.050348068 -0300 +@@ -3387,7 +3387,7 @@ + check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local + check: check-am +-all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(MANS) $(DATA) ++all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(DATA) + installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(amdir)" "$(DESTDIR)$(automake_acdir)" "$(DESTDIR)$(automake_internal_acdir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(perllibdir)" "$(DESTDIR)$(pkgvdatadir)" "$(DESTDIR)$(scriptdir)" "$(DESTDIR)$(system_acdir)" "$(DESTDIR)$(perllibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ +@@ -3454,7 +3454,7 @@ + install-dist_automake_internal_acDATA install-dist_docDATA \ + install-dist_perllibDATA install-dist_pkgvdataDATA \ + install-dist_scriptDATA install-dist_system_acDATA \ +- install-info-am install-man install-nodist_perllibDATA ++ install-info-am install-nodist_perllibDATA + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook + install-dvi: install-dvi-am diff --git a/package/automake/automake.hash b/package/automake/automake.hash new file mode 100644 index 0000000000..83aca90549 --- /dev/null +++ b/package/automake/automake.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9908c75aabd49d13661d6dcb1bc382252d22cc77bf733a2d55e87f2aa2db8636 automake-1.15.tar.xz diff --git a/package/automake/automake.mk b/package/automake/automake.mk new file mode 100644 index 0000000000..84f05dce39 --- /dev/null +++ b/package/automake/automake.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# automake +# +################################################################################ + +AUTOMAKE_VERSION = 1.15 +AUTOMAKE_SOURCE = automake-$(AUTOMAKE_VERSION).tar.xz +AUTOMAKE_SITE = $(BR2_GNU_MIRROR)/automake +AUTOMAKE_LICENSE = GPLv2+ +AUTOMAKE_LICENSE_FILES = COPYING + +HOST_AUTOMAKE_DEPENDENCIES = host-autoconf + +ACLOCAL_HOST_DIR = $(HOST_DIR)/usr/share/aclocal + +define GTK_DOC_M4_INSTALL + $(INSTALL) -D -m 0644 package/automake/gtk-doc.m4 \ + $(ACLOCAL_HOST_DIR)/gtk-doc.m4 +endef + +# ensure staging aclocal dir exists +define HOST_AUTOMAKE_MAKE_ACLOCAL + mkdir -p $(ACLOCAL_DIR) +endef + +HOST_AUTOMAKE_POST_INSTALL_HOOKS += GTK_DOC_M4_INSTALL +HOST_AUTOMAKE_POST_INSTALL_HOOKS += HOST_AUTOMAKE_MAKE_ACLOCAL + +$(eval $(host-autotools-package)) + +# variables used by other packages +AUTOMAKE = $(HOST_DIR)/usr/bin/automake +ACLOCAL_DIR = $(STAGING_DIR)/usr/share/aclocal +ACLOCAL = $(HOST_DIR)/usr/bin/aclocal -I $(ACLOCAL_DIR) diff --git a/package/automake/gtk-doc.m4 b/package/automake/gtk-doc.m4 new file mode 100644 index 0000000000..36755432b5 --- /dev/null +++ b/package/automake/gtk-doc.m4 @@ -0,0 +1,88 @@ +dnl -*- mode: autoconf -*- + +# serial 2 + +dnl Usage: +dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) +AC_DEFUN([GTK_DOC_CHECK], +[ + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + + ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"]) + AC_MSG_CHECKING([for gtk-doc]) + PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no]) + AC_MSG_RESULT($have_gtk_doc) + + if test "$have_gtk_doc" = "no"; then + AC_MSG_WARN([ + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found.]) + fi + + dnl check for tools we added during development + dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that + dnl may not be writable by the user. Currently, automake requires that the + dnl test name must end in '.test'. + dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638 + AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test]) + AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check]) + AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) + AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) + + dnl for overriding the documentation installation directory + AC_ARG_WITH([html-dir], + AS_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, + [with_html_dir='${datadir}/gtk-doc/html']) + HTML_DIR="$with_html_dir" + AC_SUBST([HTML_DIR]) + + dnl enable/disable documentation building + AC_ARG_ENABLE([gtk-doc], + AS_HELP_STRING([--enable-gtk-doc], + [use gtk-doc to build documentation [[default=no]]]),, + [enable_gtk_doc=no]) + + AC_MSG_CHECKING([whether to build gtk-doc documentation]) + AC_MSG_RESULT($enable_gtk_doc) + + if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then + AC_MSG_ERROR([ + You must have $gtk_doc_requires installed to build documentation for + $PACKAGE_NAME. Please install gtk-doc or disable building the + documentation by adding '--disable-gtk-doc' to '[$]0'.]) + fi + + dnl don't check for glib if we build glib + if test "x$PACKAGE_NAME" != "xglib"; then + dnl don't fail if someone does not have glib + PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) + fi + + dnl enable/disable output formats + AC_ARG_ENABLE([gtk-doc-html], + AS_HELP_STRING([--enable-gtk-doc-html], + [build documentation in html format [[default=yes]]]),, + [enable_gtk_doc_html=yes]) + AC_ARG_ENABLE([gtk-doc-pdf], + AS_HELP_STRING([--enable-gtk-doc-pdf], + [build documentation in pdf format [[default=no]]]),, + [enable_gtk_doc_pdf=no]) + + if test -z "$GTKDOC_MKPDF"; then + enable_gtk_doc_pdf=no + fi + + if test -z "$AM_DEFAULT_VERBOSITY"; then + AM_DEFAULT_VERBOSITY=1 + fi + AC_SUBST([AM_DEFAULT_VERBOSITY]) + + AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes]) + AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) + AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) + AM_CONDITIONAL([GTK_DOC_USE_LIBTOOL], [test -n "$LIBTOOL"]) + AM_CONDITIONAL([GTK_DOC_USE_REBASE], [test -n "$GTKDOC_REBASE"]) +]) diff --git a/package/autossh/Config.in b/package/autossh/Config.in new file mode 100644 index 0000000000..6d1a0853ed --- /dev/null +++ b/package/autossh/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_AUTOSSH + bool "autossh" + depends on BR2_USE_MMU # fork() + depends on BR2_PACKAGE_DROPBEAR || BR2_PACKAGE_OPENSSH + help + autossh is a program to start a copy of ssh and monitor it, + restarting it as necessary should it die or stop passing traffic. + + http://www.harding.motd.ca/autossh/ diff --git a/package/autossh/autossh.hash b/package/autossh/autossh.hash new file mode 100644 index 0000000000..4f3de137a5 --- /dev/null +++ b/package/autossh/autossh.hash @@ -0,0 +1,2 @@ +# From http://www.harding.motd.ca/autossh/autossh-1.4e.cksums +sha256 9e8e10a59d7619176f4b986e256f776097a364d1be012781ea52e08d04679156 autossh-1.4e.tgz diff --git a/package/autossh/autossh.mk b/package/autossh/autossh.mk new file mode 100644 index 0000000000..d52b4e9666 --- /dev/null +++ b/package/autossh/autossh.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# autossh +# +################################################################################ + +AUTOSSH_VERSION = 1.4e +AUTOSSH_SITE = http://www.harding.motd.ca/autossh +AUTOSSH_SOURCE = autossh-$(AUTOSSH_VERSION).tgz +AUTOSSH_LICENSE = Modified BSD +AUTOSSH_LICENSE_FILES = autossh.c + +# Bundled ./configure is not up-to-date with what is in configure.ac +AUTOSSH_AUTORECONF = YES + +AUTOSSH_CONF_OPTS = --with-ssh=/usr/bin/ssh + +define AUTOSSH_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/autossh $(TARGET_DIR)/usr/bin/autossh +endef + +$(eval $(autotools-package)) diff --git a/package/avahi/Config.in b/package/avahi/Config.in new file mode 100644 index 0000000000..a6b4ac83f1 --- /dev/null +++ b/package/avahi/Config.in @@ -0,0 +1,50 @@ +config BR2_PACKAGE_AVAHI + bool "avahi" + # libdaemon uses fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + Avahi is a system which facilitates service + discovery on a local network. + + http://www.avahi.org/ + +if BR2_PACKAGE_AVAHI + +config BR2_PACKAGE_AVAHI_AUTOIPD + bool "IPv4LL network address configuration daemon" + default y + select BR2_PACKAGE_LIBDAEMON + help + Avahi-autoipd implements IPv4LL, "Dynamic Configuration of + IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for + automatic IP address configuration from the link-local + 169.254.0.0/16 range without the need for a central server. + It is primarily intended to be used in ad-hoc networks which + lack a DHCP server. + +config BR2_PACKAGE_AVAHI_DAEMON + bool "mDNS/DNS-SD daemon" + select BR2_PACKAGE_LIBDAEMON + select BR2_PACKAGE_EXPAT + help + The Avahi mDNS/DNS-SD daemon implementing Apple's ZeroConf + architecture (also known as "Rendezvous" or "Bonjour"). + The daemon registers local IP addresses and services using + mDNS/DNS-SD. + +config BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY + bool "libdns_sd compatibility (Bonjour)" + depends on BR2_PACKAGE_AVAHI_DAEMON + select BR2_PACKAGE_DBUS + help + Enable the libdns_sd (Bonjour) compatibility library support + for legacy applications. + +endif + +comment "avahi needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/avahi/S05avahi-setup.sh b/package/avahi/S05avahi-setup.sh new file mode 100755 index 0000000000..90ccbceacc --- /dev/null +++ b/package/avahi/S05avahi-setup.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +case "$1" in + start|"") + if [ ! -d /tmp/avahi-autoipd ]; then + rm -rf /tmp/avahi-autoipd + mkdir /tmp/avahi-autoipd + chown avahi.avahi /tmp/avahi-autoipd + fi + ;; + stop) ;; + *) + echo "Usage: S05avahi-setup.sh {start|stop}" >&2 + exit 1 + ;; +esac diff --git a/package/avahi/S50avahi-daemon b/package/avahi/S50avahi-daemon new file mode 100755 index 0000000000..81ac51316e --- /dev/null +++ b/package/avahi/S50avahi-daemon @@ -0,0 +1,20 @@ +#!/bin/sh +# +# avahi-daemon init script + +DAEMON=/usr/sbin/avahi-daemon +case "$1" in + start) + $DAEMON -c || $DAEMON -D + ;; + stop) + $DAEMON -c && $DAEMON -k + ;; + reload) + $DAEMON -c && $DAEMON -r + ;; + *) + echo "Usage: S50avahi-daemon {start|stop|reload}" >&2 + exit 1 + ;; +esac diff --git a/package/avahi/avahi.hash b/package/avahi/avahi.hash new file mode 100644 index 0000000000..09c5d42433 --- /dev/null +++ b/package/avahi/avahi.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d54991185d514a0aba54ebeb408d7575b60f5818a772e28fa0e18b98bc1db454 avahi-0.6.32.tar.gz diff --git a/package/avahi/avahi.mk b/package/avahi/avahi.mk new file mode 100644 index 0000000000..069b45a96d --- /dev/null +++ b/package/avahi/avahi.mk @@ -0,0 +1,233 @@ +################################################################################ +# +# avahi +# +################################################################################ + +# +# This program is free software; you can redistribute it +# and/or modify it under the terms of the GNU Lesser General +# Public License as published by the Free Software Foundation +# either version 2.1 of the License, or (at your option) any +# later version. + +AVAHI_VERSION = 0.6.32 +AVAHI_SITE = https://github.com/lathiat/avahi/releases/download/v$(AVAHI_VERSION) +AVAHI_LICENSE = LGPLv2.1+ +AVAHI_LICENSE_FILES = LICENSE +AVAHI_INSTALL_STAGING = YES + +AVAHI_CONF_ENV = \ + ac_cv_func_strtod=yes \ + ac_fsusage_space=yes \ + fu_cv_sys_stat_statfs2_bsize=yes \ + ac_cv_func_closedir_void=no \ + ac_cv_func_getloadavg=no \ + ac_cv_lib_util_getloadavg=no \ + ac_cv_lib_getloadavg_getloadavg=no \ + ac_cv_func_getgroups=yes \ + ac_cv_func_getgroups_works=yes \ + ac_cv_func_chown_works=yes \ + ac_cv_have_decl_euidaccess=no \ + ac_cv_func_euidaccess=no \ + ac_cv_have_decl_strnlen=yes \ + ac_cv_func_strnlen_working=yes \ + ac_cv_func_lstat_dereferences_slashed_symlink=yes \ + ac_cv_func_lstat_empty_string_bug=no \ + ac_cv_func_stat_empty_string_bug=no \ + vb_cv_func_rename_trailing_slash_bug=no \ + ac_cv_have_decl_nanosleep=yes \ + jm_cv_func_nanosleep_works=yes \ + gl_cv_func_working_utimes=yes \ + ac_cv_func_utime_null=yes \ + ac_cv_have_decl_strerror_r=yes \ + ac_cv_func_strerror_r_char_p=no \ + jm_cv_func_svid_putenv=yes \ + ac_cv_func_getcwd_null=yes \ + ac_cv_func_getdelim=yes \ + ac_cv_func_mkstemp=yes \ + utils_cv_func_mkstemp_limitations=no \ + utils_cv_func_mkdir_trailing_slash_bug=no \ + jm_cv_func_gettimeofday_clobber=no \ + am_cv_func_working_getline=yes \ + gl_cv_func_working_readdir=yes \ + jm_ac_cv_func_link_follows_symlink=no \ + utils_cv_localtime_cache=no \ + ac_cv_struct_st_mtim_nsec=no \ + gl_cv_func_tzset_clobber=no \ + gl_cv_func_getcwd_null=yes \ + gl_cv_func_getcwd_path_max=yes \ + ac_cv_func_fnmatch_gnu=yes \ + am_getline_needs_run_time_check=no \ + am_cv_func_working_getline=yes \ + gl_cv_func_mkdir_trailing_slash_bug=no \ + gl_cv_func_mkstemp_limitations=no \ + ac_cv_func_working_mktime=yes \ + jm_cv_func_working_re_compile_pattern=yes \ + ac_use_included_regex=no \ + avahi_cv_sys_cxx_works=yes \ + DATADIRNAME=share + +# Note: even if we have Gtk2 and Gtk3 support in Buildroot, we +# explicitly disable support for them, in order to avoid the following +# circular dependencies: +# +# avahi -> libglade -> libgtk2 -> cups -> avahi +# avahi -> libgtk3 -> cups -> avahi +# +# Since Gtk2 and Gtk3 in Avahi are only used for some example/demo +# programs, we decided to disable their support to solve the circular +# dependency. +AVAHI_CONF_OPTS = \ + --disable-qt3 \ + --disable-qt4 \ + --disable-gtk \ + --disable-gtk3 \ + --disable-gdbm \ + --disable-pygtk \ + --disable-mono \ + --disable-monodoc \ + --disable-stack-protector \ + --with-distro=none \ + --disable-manpages \ + $(if $(BR2_PACKAGE_AVAHI_AUTOIPD),--enable,--disable)-autoipd \ + --with-avahi-user=avahi \ + --with-avahi-group=avahi \ + --with-autoipd-user=avahi \ + --with-autoipd-group=avahi + +AVAHI_DEPENDENCIES = \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-intltool \ + host-pkgconf host-gettext + +AVAHI_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +AVAHI_CONF_OPTS += --with-systemdsystemunitdir=/usr/lib/systemd/system +else +AVAHI_CONF_OPTS += --with-systemdsystemunitdir=no +AVAHI_CFLAGS += -DDISABLE_SYSTEMD +endif + +ifneq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_AVAHI_AUTOIPD),) +AVAHI_DEPENDENCIES += libdaemon +else +AVAHI_CONF_OPTS += --disable-libdaemon +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +AVAHI_DEPENDENCIES += libcap +endif + +ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) +AVAHI_DEPENDENCIES += expat +AVAHI_CONF_OPTS += --with-xml=expat +else +AVAHI_CONF_OPTS += --with-xml=none +endif + +ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y) +AVAHI_CONF_OPTS += --enable-compat-libdns_sd +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +AVAHI_DEPENDENCIES += dbus +else +AVAHI_CONF_OPTS += --disable-dbus +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +AVAHI_DEPENDENCIES += libglib2 +else +AVAHI_CONF_OPTS += --disable-glib --disable-gobject +endif + +ifeq ($(BR2_PACKAGE_PYTHON),y) +AVAHI_CONF_ENV += \ + am_cv_pathless_PYTHON=python \ + am_cv_path_PYTHON=$(PYTHON_TARGET_BINARY) \ + am_cv_python_version=$(PYTHON_VERSION) \ + am_cv_python_platform=linux2 \ + am_cv_python_pythondir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + am_cv_python_pyexecdir=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + py_cv_mod_socket_=yes + +AVAHI_DEPENDENCIES += python +AVAHI_CONF_OPTS += --enable-python +else +AVAHI_CONF_OPTS += --disable-python +endif + +ifeq ($(BR2_PACKAGE_DBUS_PYTHON),y) +AVAHI_CONF_OPTS += --enable-python-dbus +AVAHI_CONF_ENV += py_cv_mod_dbus_=yes +AVAHI_DEPENDENCIES += dbus-python +else +AVAHI_CONF_OPTS += --disable-python-dbus +endif + +AVAHI_CONF_ENV += CFLAGS="$(AVAHI_CFLAGS)" + +AVAHI_MAKE_OPTS += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl) + +define AVAHI_USERS + avahi -1 avahi -1 * - - - +endef + +define AVAHI_REMOVE_INITSCRIPT + rm -rf $(TARGET_DIR)/etc/init.d/avahi-* +endef + +AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_REMOVE_INITSCRIPT + +ifeq ($(BR2_PACKAGE_AVAHI_AUTOIPD),y) +define AVAHI_INSTALL_AUTOIPD + rm -f $(TARGET_DIR)/var/lib/avahi-autoipd + $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/lib + ln -sf /tmp/avahi-autoipd $(TARGET_DIR)/var/lib/avahi-autoipd +endef + +define AVAHI_INSTALL_AUTOIPD_INIT_SYSV + $(INSTALL) -D -m 0755 package/avahi/S05avahi-setup.sh $(TARGET_DIR)/etc/init.d/S05avahi-setup.sh +endef + +AVAHI_POST_INSTALL_TARGET_HOOKS += AVAHI_INSTALL_AUTOIPD +endif + +ifeq ($(BR2_PACKAGE_AVAHI_DAEMON),y) + +define AVAHI_INSTALL_INIT_SYSTEMD + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + + ln -fs ../../../../usr/lib/systemd/system/avahi-daemon.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-daemon.service + + ln -fs ../../../../usr/lib/systemd/system/avahi-dnsconfd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/avahi-dnsconfd.service + + $(INSTALL) -D -m 644 package/avahi/avahi_tmpfiles.conf \ + $(TARGET_DIR)/usr/lib/tmpfiles.d/avahi.conf +endef + +define AVAHI_INSTALL_DAEMON_INIT_SYSV + $(INSTALL) -D -m 0755 package/avahi/S50avahi-daemon $(TARGET_DIR)/etc/init.d/S50avahi-daemon +endef + +endif + +define AVAHI_INSTALL_INIT_SYSV + $(AVAHI_INSTALL_AUTOIPD_INIT_SYSV) + $(AVAHI_INSTALL_DAEMON_INIT_SYSV) +endef + +ifeq ($(BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY),y) +# applications expects to be able to #include +define AVAHI_STAGING_INSTALL_LIBDNSSD_LINK + ln -sf avahi-compat-libdns_sd/dns_sd.h \ + $(STAGING_DIR)/usr/include/dns_sd.h +endef + +AVAHI_POST_INSTALL_STAGING_HOOKS += AVAHI_STAGING_INSTALL_LIBDNSSD_LINK +endif + +$(eval $(autotools-package)) diff --git a/package/avahi/avahi_tmpfiles.conf b/package/avahi/avahi_tmpfiles.conf new file mode 100644 index 0000000000..f9aebdfd0d --- /dev/null +++ b/package/avahi/avahi_tmpfiles.conf @@ -0,0 +1 @@ +d /tmp/avahi-autopid 0755 avahi avahi diff --git a/package/avrdude/Config.in b/package/avrdude/Config.in new file mode 100644 index 0000000000..460f155086 --- /dev/null +++ b/package/avrdude/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_AVRDUDE + bool "avrdude" + select BR2_PACKAGE_ELFUTILS + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + select BR2_PACKAGE_NCURSES + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR # elfutils + depends on !BR2_STATIC_LIBS # elfutils + depends on !BR2_bfin # elfutils + depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils + help + avrdude is a programmer for Atmel AVR microcontrollers + this package provides a version with new linuxspi driver + + https://github.com/kcuzner/avrdude + +comment "avrdude needs a uclibc or (e)glibc toolchain w/ threads, wchar, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || BR2_STATIC_LIBS \ + || !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) + depends on !BR2_bfin diff --git a/package/avrdude/avrdude.mk b/package/avrdude/avrdude.mk new file mode 100644 index 0000000000..181189345c --- /dev/null +++ b/package/avrdude/avrdude.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# avrdude +# +################################################################################ + +AVRDUDE_VERSION = eabe067c4527bc2eedc5db9288ef5cf1818ec720 +AVRDUDE_SITE = $(call github,kcuzner,avrdude,$(AVRDUDE_VERSION)) +AVRDUDE_LICENSE = GPLv2+ +AVRDUDR_LICENSE_FILES = avrdude/COPYING +AVRDUDE_SUBDIR = avrdude +# Sources coming from git, without generated configure and Makefile.in +# files. +AVRDUDE_AUTORECONF = YES +AVRDUDE_DEPENDENCIES = elfutils libusb libusb-compat ncurses \ + host-flex host-bison +AVRDUDE_LICENSE = GPLv2+ +AVRDUDE_LICENSE_FILES = avrdude/COPYING + +ifeq ($(BR2_PACKAGE_LIBFTDI1),y) +AVRDUDE_DEPENDENCIES += libftdi1 +else ifeq ($(BR2_PACKAGE_LIBFTDI),y) +AVRDUDE_DEPENDENCIES += libftdi +endif + +# if /etc/avrdude.conf exists, the installation process creates a +# backup file, which we do not want in the context of Buildroot. +define AVRDUDE_REMOVE_BACKUP_FILE + $(RM) -f $(TARGET_DIR)/etc/avrdude.conf.bak +endef + +AVRDUDE_POST_INSTALL_TARGET_HOOKS += AVRDUDE_REMOVE_BACKUP_FILE + +$(eval $(autotools-package)) diff --git a/package/axel/Config.in b/package/axel/Config.in new file mode 100644 index 0000000000..aa93f2a11f --- /dev/null +++ b/package/axel/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_AXEL + bool "axel" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + depends on BR2_TOOLCHAIN_HAS_THREADS + help + HTTP/FTP download accelerator. + + http://axel.alioth.debian.org/ + +comment "axel needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/axel/axel.hash b/package/axel/axel.hash new file mode 100644 index 0000000000..8957670118 --- /dev/null +++ b/package/axel/axel.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 359a57ab4e354bcb6075430d977c59d33eb3e2f1415a811948fa8ae657ca8036 axel-2.4.tar.gz diff --git a/package/axel/axel.mk b/package/axel/axel.mk new file mode 100644 index 0000000000..6328d997e1 --- /dev/null +++ b/package/axel/axel.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# axel +# +################################################################################ + +AXEL_VERSION = 2.4 +AXEL_SITE = http://sources.buildroot.net +AXEL_LICENSE = GPLv2+ +AXEL_LICENSE_FILES = COPYING + +AXEL_LDFLAGS = -lpthread + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +AXEL_DEPENDENCIES += gettext +AXEL_LDFLAGS += -lintl +endif + +ifneq ($(BR2_ENABLE_LOCALE),y) +AXEL_DISABLE_I18N = --i18n=0 +endif + +define AXEL_CONFIGURE_CMDS + (cd $(@D); \ + ./configure \ + --prefix=/usr \ + --debug=1 \ + $(AXEL_DISABLE_I18N) \ + ) +endef + +define AXEL_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + LFLAGS="$(TARGET_LDFLAGS) $(AXEL_LDFLAGS)" -C $(@D) +endef + +define AXEL_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/axfsutils/0001-fix-cflags.patch b/package/axfsutils/0001-fix-cflags.patch new file mode 100644 index 0000000000..0415d82f45 --- /dev/null +++ b/package/axfsutils/0001-fix-cflags.patch @@ -0,0 +1,19 @@ +Makefile: complement CFLAGS provided by the user + +In some circumstances, the user may want to pass its own CFLAGS, +like for when the zlib headers are not located in the standard gcc +search paths. + +Signed-off-by: "Yann E. MORIN" + +diff -durN a/mkfs.axfs-legacy/Makefile b/mkfs.axfs-legacy/Makefile +--- a/mkfs.axfs-legacy/Makefile ++++ b/mkfs.axfs-legacy/Makefile +@@ -1,5 +1,5 @@ +-INC = -I./ +-CFLAGS = -g $(INC) -O0 ++INC += -I./ ++CFLAGS += -g $(INC) -O0 + + MKFSOBJS = mkfs.axfs.o + diff --git a/package/axfsutils/0002-use-ldflags.patch b/package/axfsutils/0002-use-ldflags.patch new file mode 100644 index 0000000000..20e03a9bb5 --- /dev/null +++ b/package/axfsutils/0002-use-ldflags.patch @@ -0,0 +1,20 @@ +Makefile: use LDFLAGS as provided by the user + +In some circumstances, the user may want to pass some LDFLAGS, like +-L flags to point to the zlib location if it was not installed in a +standard location. + +Signed-off-by: "Yann E. MORIN" + +diff -durN a/mkfs.axfs-legacy/Makefile b/mkfs.axfs-legacy/Makefile +--- a/mkfs.axfs-legacy/Makefile ++++ b/mkfs.axfs-legacy/Makefile +@@ -6,7 +6,7 @@ + all: mkfs.axfs + + mkfs.axfs: $(MKFSOBJS) +- $(CC) $(CFLAGS) -o mkfs.axfs $(MKFSOBJS) -lz ++ $(CC) $(CFLAGS) $(LDFLAGS) -o mkfs.axfs $(MKFSOBJS) -lz + + clean_mkfs.axfs: + rm -rf $(MKFSOBJS) mkfs.axfs diff --git a/package/axfsutils/axfsutils.hash b/package/axfsutils/axfsutils.hash new file mode 100644 index 0000000000..4a3b3fb34d --- /dev/null +++ b/package/axfsutils/axfsutils.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9c041393131bdfebefa89cfaba7788b514b56ffc51bda8f130fd49b39fe89dc0 axfsutils-f26ae785e33df76f658b71ef2cfbc7f511ff875d.tar.gz diff --git a/package/axfsutils/axfsutils.mk b/package/axfsutils/axfsutils.mk new file mode 100644 index 0000000000..4dd60efcde --- /dev/null +++ b/package/axfsutils/axfsutils.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# axfsutils +# +################################################################################ + +AXFSUTILS_VERSION = f26ae785e33df76f658b71ef2cfbc7f511ff875d +AXFSUTILS_SITE = $(call github,jaredeh,axfs,$(AXFSUTILS_VERSION)) +AXFSUTILS_LICENSE = GPLv2 +AXFSUTILS_LICENSE_FILES = mkfs.axfs-legacy/COPYING +AXFSUTILS_DEPENDENCIES = host-zlib + +# The 'new' mkfs.axfs version requires GNUstep which is not a buildroot +# prerequisite. The 'legacy' one works just as well without that requirement. +define HOST_AXFSUTILS_BUILD_CMDS + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)/mkfs.axfs-legacy +endef + +define HOST_AXFSUTILS_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/mkfs.axfs-legacy/mkfs.axfs \ + $(HOST_DIR)/usr/bin/mkfs.axfs +endef + +$(eval $(host-generic-package)) diff --git a/package/b43-firmware/Config.in b/package/b43-firmware/Config.in new file mode 100644 index 0000000000..bc69bbcbed --- /dev/null +++ b/package/b43-firmware/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_B43_FIRMWARE + bool "b43-firmware" + help + Firmware for the Broadcom Wifi devices supported by the b43 + kernel driver. + +if BR2_PACKAGE_B43_FIRMWARE + +choice + prompt "Kernel version" + default BR2_PACKAGE_B43_FIRMWARE_KERNEL_AFTER_3_2 + help + Select the kernel version you're using. The b43 driver in + kernel >= 3.2 need a different firmware than the b43 drivers + from kernel < 3.2. + + config BR2_PACKAGE_B43_FIRMWARE_KERNEL_AFTER_3_2 + bool ">= 3.2" + + config BR2_PACKAGE_B43_FIRMWARE_KERNEL_BEFORE_3_2 + bool "< 3.2" + +endchoice + +endif diff --git a/package/b43-firmware/b43-firmware.hash b/package/b43-firmware/b43-firmware.hash new file mode 100644 index 0000000000..efc1a6cf0f --- /dev/null +++ b/package/b43-firmware/b43-firmware.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 f1e7067aac5b62b67b8b6e4c517990277804339ac16065eb13c731ff909ae46f broadcom-wl-5.100.138.tar.bz2 +sha256 26a8c370f48fc129d0731cfd751c36cae1419b0bc8ca35781126744e60eae009 broadcom-wl-5.10.56.27.3_mipsel.tar.bz2 diff --git a/package/b43-firmware/b43-firmware.mk b/package/b43-firmware/b43-firmware.mk new file mode 100644 index 0000000000..601ab6661c --- /dev/null +++ b/package/b43-firmware/b43-firmware.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# b43-firmware +# +################################################################################ + +ifeq ($(BR2_PACKAGE_B43_FIRMWARE_KERNEL_AFTER_3_2),y) +B43_FIRMWARE_VERSION = 5.100.138 +B43_FIRMWARE_SITE = http://www.lwfinger.com/b43-firmware +B43_FIRMWARE_SOURCE = broadcom-wl-$(B43_FIRMWARE_VERSION).tar.bz2 +B43_FIRMWARE_DRIVER_FILE = linux/wl_apsta.o +else ifeq ($(BR2_PACKAGE_B43_FIRMWARE_KERNEL_BEFORE_3_2),y) +B43_FIRMWARE_VERSION = 5.10.56.27.3 +B43_FIRMWARE_SITE = http://mirror2.openwrt.org/sources +B43_FIRMWARE_SOURCE = broadcom-wl-$(B43_FIRMWARE_VERSION)_mipsel.tar.bz2 +B43_FIRMWARE_DRIVER_FILE = driver/wl_apsta/wl_prebuilt.o +endif + +B43_FIRMWARE_LICENSE = PROPRIETARY +B43_FIRMWARE_REDISTRIBUTE = NO + +B43_FIRMWARE_DEPENDENCIES = host-b43-fwcutter + +define B43_FIRMWARE_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 0755 $(TARGET_DIR)/lib/firmware/ + $(HOST_DIR)/usr/bin/b43-fwcutter -w $(TARGET_DIR)/lib/firmware/ $(@D)/$(B43_FIRMWARE_DRIVER_FILE) +endef + +$(eval $(generic-package)) diff --git a/package/b43-fwcutter/b43-fwcutter.hash b/package/b43-fwcutter/b43-fwcutter.hash new file mode 100644 index 0000000000..3181c76960 --- /dev/null +++ b/package/b43-fwcutter/b43-fwcutter.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 4c6a53d1f5d76b8aa224d294bee47726b1477f35327f4e23e8cb799865e0f6eb b43-fwcutter-015.tar.bz2 diff --git a/package/b43-fwcutter/b43-fwcutter.mk b/package/b43-fwcutter/b43-fwcutter.mk new file mode 100644 index 0000000000..d264b64940 --- /dev/null +++ b/package/b43-fwcutter/b43-fwcutter.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# b43-fwcutter +# +################################################################################ + +B43_FWCUTTER_VERSION = 015 +B43_FWCUTTER_SITE = http://bues.ch/b43/fwcutter +B43_FWCUTTER_SOURCE = b43-fwcutter-$(B43_FWCUTTER_VERSION).tar.bz2 +B43_FWCUTTER_LICENSE = BSD-2c +B43_FWCUTTER_LICENSE_FILES = COPYING + +define HOST_B43_FWCUTTER_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define HOST_B43_FWCUTTER_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/b43-fwcutter $(HOST_DIR)/usr/bin/b43-fwcutter +endef + +$(eval $(host-generic-package)) diff --git a/package/bandwidthd/Config.in b/package/bandwidthd/Config.in new file mode 100644 index 0000000000..b4a47f2ec6 --- /dev/null +++ b/package/bandwidthd/Config.in @@ -0,0 +1,53 @@ +config BR2_PACKAGE_BANDWIDTHD + bool "bandwidthd" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_GD + help + BandwidthD - Bandwidth monitoring + + Provides a method to measure the bandwidth that travels + through the machine, grouped by subnet and IP. This + information can be stored locally in /var/lib/bandwidthd and + can be configured to generate static HTML pages which can be + hosted by a web server. + + It is highly recommended that the target has some way of + retaining the time between reboots. (e.g. NTP on boot or an + RTC) + + It is suggested to use sqlite for logfile storage but works + fine without, and can be completely ignored if the + postgresql portion is used. + + As upstream is no longer actively maintained, a fork is + available on github that works on making BandwidthD's build + process more compatible with buildroot's. + + Upstream: http://bandwidthd.sourceforge.net/ + Github fork: http://github.com/nroach44/bandwidthd + +if BR2_PACKAGE_BANDWIDTHD + +config BR2_PACKAGE_BANDWIDTHD_POSTGRESQL + bool "enable postgresql log target support" + select BR2_PACKAGE_POSTGRESQL + depends on !BR2_STATIC_LIBS + help + Enable support for logging the bandwidthd data to a remote + (or local) postgresql server. This data can then be viewed + through a php site. See README in the source code + (github.com/nroach44/bandwidthd) for more information. + +comment "postgresql support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_BANDWIDTHD_SQLITE3 + bool "enable sqlite3 log storage" + select BR2_PACKAGE_SQLITE + help + Enable support for storing the aggregated data in an sqlite + db instead of a plain text file. + +endif diff --git a/package/bandwidthd/bandwidthd.mk b/package/bandwidthd/bandwidthd.mk new file mode 100644 index 0000000000..2773490428 --- /dev/null +++ b/package/bandwidthd/bandwidthd.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# bandwidthd +# +################################################################################ + +BANDWIDTHD_VERSION = v2.0.1-auto-r11 +BANDWIDTHD_SITE = $(call github,nroach44,bandwidthd,$(BANDWIDTHD_VERSION)) + +# Specified as "any version of the GPL that is current as of your +# download" by upstream. +BANDWIDTHD_LICENSE = GPL + +BANDWIDTHD_DEPENDENCIES = gd libpng libpcap host-pkgconf + +BANDWIDTHD_AUTORECONF = YES + +BANDWIDTHD_CONF_OPTS += --with-pcap-config=$(STAGING_DIR)/usr/bin/pcap-config + +ifeq ($(BR2_PACKAGE_BANDWIDTHD_POSTGRESQL),y) +BANDWIDTHD_DEPENDENCIES += postgresql +BANDWIDTHD_CONF_OPTS += --with-postgresql-logging=true +else +BANDWIDTHD_CONF_OPTS += --with-postgresql-logging=false +endif + +ifeq ($(BR2_PACKAGE_BANDWIDTHD_SQLITE3),y) +BANDWIDTHD_DEPENDENCIES += sqlite +BANDWIDTHD_CONF_OPTS += --with-sqlite-storage=true +else +BANDWIDTHD_CONF_OPTS += --with-sqlite-storage=false +endif + +define BANDWIDTHD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/bandwidthd/bandwidthd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/bandwidthd.service + + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + + ln -sf /usr/lib/systemd/system/bandwidthd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/bandwidthd.service +endef + +$(eval $(autotools-package)) diff --git a/package/bandwidthd/bandwidthd.service b/package/bandwidthd/bandwidthd.service new file mode 100644 index 0000000000..9c03d42946 --- /dev/null +++ b/package/bandwidthd/bandwidthd.service @@ -0,0 +1,11 @@ +[Unit] +Description=Bandwidth usage monitor and reporter +After=network.target + +[Service] +Type=forking +ExecStart=/usr/bin/bandwidthd +PIDFile=/var/run/bandwidthd.pid + +[Install] +WantedBy=multi-user.target diff --git a/package/bash/0031-patchlevel-31.patch b/package/bash/0031-patchlevel-31.patch new file mode 100644 index 0000000000..d285a1f882 --- /dev/null +++ b/package/bash/0031-patchlevel-31.patch @@ -0,0 +1,116 @@ +From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-031 + +Signed-off-by: Gustavo Zacarias + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-031 + +Bug-Reported-by: lolilolicon +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-08/msg00139.html + +Bug-Description: + +The new nameref assignment functionality introduced in bash-4.3 did not perform +enough validation on the variable value and would create variables with +invalid names. + +Patch (apply with `patch -p0'): + +*** a/bash-4.3-patched/subst.h 2014-01-11 21:02:27.000000000 -0500 +--- b/subst.h 2014-09-01 12:16:56.000000000 -0400 +*************** +*** 48,51 **** +--- 48,52 ---- + #define ASS_MKGLOBAL 0x0008 /* force global assignment */ + #define ASS_NAMEREF 0x0010 /* assigning to nameref variable */ ++ #define ASS_FROMREF 0x0020 /* assigning from value of nameref variable */ + + /* Flags for the string extraction functions. */ +*** a/bash-4.3-patched/variables.c 2014-05-15 08:26:50.000000000 -0400 +--- b/variables.c 2014-09-01 14:37:44.000000000 -0400 +*************** +*** 2504,2511 **** + int hflags, aflags; + { +! char *newval; + SHELL_VAR *entry; + + entry = (hflags & HASH_NOSRCH) ? (SHELL_VAR *)NULL : hash_lookup (name, table); + /* Follow the nameref chain here if this is the global variables table */ + if (entry && nameref_p (entry) && (invisible_p (entry) == 0) && table == global_variables->table) +--- 2566,2590 ---- + int hflags, aflags; + { +! char *newname, *newval; + SHELL_VAR *entry; ++ #if defined (ARRAY_VARS) ++ arrayind_t ind; ++ char *subp; ++ int sublen; ++ #endif + ++ newname = 0; ++ #if defined (ARRAY_VARS) ++ if ((aflags & ASS_FROMREF) && (hflags & HASH_NOSRCH) == 0 && valid_array_reference (name)) ++ { ++ newname = array_variable_name (name, &subp, &sublen); ++ if (newname == 0) ++ return (SHELL_VAR *)NULL; /* XXX */ ++ entry = hash_lookup (newname, table); ++ } ++ else ++ #endif + entry = (hflags & HASH_NOSRCH) ? (SHELL_VAR *)NULL : hash_lookup (name, table); ++ + /* Follow the nameref chain here if this is the global variables table */ + if (entry && nameref_p (entry) && (invisible_p (entry) == 0) && table == global_variables->table) +*************** +*** 2538,2541 **** +--- 2617,2630 ---- + } + } ++ #if defined (ARRAY_VARS) ++ else if (entry == 0 && newname) ++ { ++ entry = make_new_array_variable (newname); /* indexed array by default */ ++ if (entry == 0) ++ return entry; ++ ind = array_expand_index (name, subp, sublen); ++ bind_array_element (entry, ind, value, aflags); ++ } ++ #endif + else if (entry == 0) + { +*************** +*** 2658,2662 **** + if (nameref_cell (nv) == 0) + return (bind_variable_internal (nv->name, value, nvc->table, 0, flags)); +! return (bind_variable_internal (nameref_cell (nv), value, nvc->table, 0, flags)); + } + else +--- 2747,2752 ---- + if (nameref_cell (nv) == 0) + return (bind_variable_internal (nv->name, value, nvc->table, 0, flags)); +! /* XXX - bug here with ref=array[index] */ +! return (bind_variable_internal (nameref_cell (nv), value, nvc->table, 0, flags|ASS_FROMREF)); + } + else +*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 30 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 31 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0032-patchlevel-32.patch b/package/bash/0032-patchlevel-32.patch new file mode 100644 index 0000000000..6cdc0f1e81 --- /dev/null +++ b/package/bash/0032-patchlevel-32.patch @@ -0,0 +1,55 @@ +From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-032 + +Signed-off-by: Gustavo Zacarias + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-032 + +Bug-Reported-by: crispusfairbairn@gmail.com +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-09/msg00013.html + +Bug-Description: + +When bash is running in Posix mode, it allows signals -- including SIGCHLD -- +to interrupt the `wait' builtin, as Posix requires. However, the interrupt +causes bash to not run a SIGCHLD trap for all exited children. This patch +fixes the issue and restores the documented behavior in Posix mode. + +Patch (apply with `patch -p0'): + +*** a/bash-4.3-patched/jobs.c 2014-05-14 09:20:15.000000000 -0400 +--- b/jobs.c 2014-09-09 11:50:38.000000000 -0400 +*************** +*** 3340,3344 **** + { + interrupt_immediately = 0; +! trap_handler (SIGCHLD); /* set pending_traps[SIGCHLD] */ + wait_signal_received = SIGCHLD; + /* If we're in a signal handler, let CHECK_WAIT_INTR pick it up; +--- 3346,3352 ---- + { + interrupt_immediately = 0; +! /* This was trap_handler (SIGCHLD) but that can lose traps if +! children_exited > 1 */ +! queue_sigchld_trap (children_exited); + wait_signal_received = SIGCHLD; + /* If we're in a signal handler, let CHECK_WAIT_INTR pick it up; +*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 31 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 32 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0033-patchlevel-33.patch b/package/bash/0033-patchlevel-33.patch new file mode 100644 index 0000000000..45fb686e33 --- /dev/null +++ b/package/bash/0033-patchlevel-33.patch @@ -0,0 +1,229 @@ +From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-033 + +Signed-off-by: Gustavo Zacarias + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-033 + +Bug-Reported-by: mickael9@gmail.com, Jan Rome +Bug-Reference-ID: <20140907224046.382ED3610CC@mickael-laptop.localdomain>, + <540D661D.50908@gmail.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-09/msg00029.html + http://lists.gnu.org/archive/html/bug-bash/2014-09/msg00030.html + +Bug-Description: + +Bash does not clean up the terminal state in all cases where bash or +readline modifies it and bash is subsequently terminated by a fatal signal. +This happens when the `read' builtin modifies the terminal settings, both +when readline is active and when it is not. It occurs most often when a script +installs a trap that exits on a signal without re-sending the signal to itself. + +Patch (apply with `patch -p0'): + +*** a/bash-4.3-patched/shell.c 2014-01-14 08:04:32.000000000 -0500 +--- b/shell.c 2014-12-22 10:27:50.000000000 -0500 +*************** +*** 74,77 **** +--- 74,78 ---- + + #if defined (READLINE) ++ # include + # include "bashline.h" + #endif +*************** +*** 910,913 **** +--- 912,923 ---- + fflush (stderr); + ++ /* Clean up the terminal if we are in a state where it's been modified. */ ++ #if defined (READLINE) ++ if (RL_ISSTATE (RL_STATE_TERMPREPPED) && rl_deprep_term_function) ++ (*rl_deprep_term_function) (); ++ #endif ++ if (read_tty_modified ()) ++ read_tty_cleanup (); ++ + /* Do trap[0] if defined. Allow it to override the exit status + passed to us. */ +*** a/bash-4.3-patched/builtins/read.def 2014-10-01 12:57:38.000000000 -0400 +--- b/builtins/read.def 2014-12-22 10:48:54.000000000 -0500 +*************** +*** 141,148 **** + int sigalrm_seen; + +! static int reading; + static SigHandler *old_alrm; + static unsigned char delim; + + /* In all cases, SIGALRM just sets a flag that we check periodically. This + avoids problems with the semi-tricky stuff we do with the xfree of +--- 141,150 ---- + int sigalrm_seen; + +! static int reading, tty_modified; + static SigHandler *old_alrm; + static unsigned char delim; + ++ static struct ttsave termsave; ++ + /* In all cases, SIGALRM just sets a flag that we check periodically. This + avoids problems with the semi-tricky stuff we do with the xfree of +*************** +*** 189,193 **** + SHELL_VAR *var; + TTYSTRUCT ttattrs, ttset; +- struct ttsave termsave; + #if defined (ARRAY_VARS) + WORD_LIST *alist; +--- 191,194 ---- +*************** +*** 222,226 **** + USE_VAR(lastsig); + +! sigalrm_seen = reading = 0; + + i = 0; /* Index into the string that we are reading. */ +--- 223,227 ---- + USE_VAR(lastsig); + +! sigalrm_seen = reading = tty_modified = 0; + + i = 0; /* Index into the string that we are reading. */ +*************** +*** 439,442 **** +--- 440,445 ---- + goto assign_vars; + } ++ if (interactive_shell == 0) ++ initialize_terminating_signals (); + old_alrm = set_signal_handler (SIGALRM, sigalrm); + add_unwind_protect (reset_alarm, (char *)NULL); +*************** +*** 483,487 **** +--- 486,493 ---- + if (i < 0) + sh_ttyerror (1); ++ tty_modified = 1; + add_unwind_protect ((Function *)ttyrestore, (char *)&termsave); ++ if (interactive_shell == 0) ++ initialize_terminating_signals (); + } + } +*************** +*** 498,502 **** +--- 504,511 ---- + sh_ttyerror (1); + ++ tty_modified = 1; + add_unwind_protect ((Function *)ttyrestore, (char *)&termsave); ++ if (interactive_shell == 0) ++ initialize_terminating_signals (); + } + +*************** +*** 589,592 **** +--- 598,603 ---- + else + lastsig = 0; ++ if (terminating_signal && tty_modified) ++ ttyrestore (&termsave); /* fix terminal before exiting */ + CHECK_TERMSIG; + eof = 1; +*************** +*** 979,982 **** +--- 990,1007 ---- + { + ttsetattr (ttp->fd, ttp->attrs); ++ tty_modified = 0; ++ } ++ ++ void ++ read_tty_cleanup () ++ { ++ if (tty_modified) ++ ttyrestore (&termsave); ++ } ++ ++ int ++ read_tty_modified () ++ { ++ return (tty_modified); + } + +*** ./bash-4.3-patched/builtins/common.h 2014-10-01 12:57:47.000000000 -0400 +--- b/builtins/common.h 2014-12-22 10:10:14.000000000 -0500 +*************** +*** 123,126 **** +--- 141,148 ---- + extern void getopts_reset __P((int)); + ++ /* Functions from read.def */ ++ extern void read_tty_cleanup __P((void)); ++ extern int read_tty_modified __P((void)); ++ + /* Functions from set.def */ + extern int minus_o_option_value __P((char *)); +*** a/bash-4.3-patched/bashline.c 2014-05-14 09:22:39.000000000 -0400 +--- b/bashline.c 2014-09-08 11:28:56.000000000 -0400 +*************** +*** 203,206 **** +--- 203,207 ---- + extern int array_needs_making; + extern int posixly_correct, no_symbolic_links; ++ extern int sigalrm_seen; + extern char *current_prompt_string, *ps1_prompt; + extern STRING_INT_ALIST word_token_alist[]; +*************** +*** 4209,4214 **** + /* If we're going to longjmp to top_level, make sure we clean up readline. + check_signals will call QUIT, which will eventually longjmp to top_level, +! calling run_interrupt_trap along the way. */ +! if (interrupt_state) + rl_cleanup_after_signal (); + bashline_reset_event_hook (); +--- 4262,4268 ---- + /* If we're going to longjmp to top_level, make sure we clean up readline. + check_signals will call QUIT, which will eventually longjmp to top_level, +! calling run_interrupt_trap along the way. The check for sigalrm_seen is +! to clean up the read builtin's state. */ +! if (terminating_signal || interrupt_state || sigalrm_seen) + rl_cleanup_after_signal (); + bashline_reset_event_hook (); +*** a/bash-4.3-patched/sig.c 2014-01-10 15:06:06.000000000 -0500 +--- b/sig.c 2014-09-08 11:26:33.000000000 -0400 +*************** +*** 533,538 **** + /* Set the event hook so readline will call it after the signal handlers + finish executing, so if this interrupted character input we can get +! quick response. */ +! if (interactive_shell && interactive && no_line_editing == 0) + bashline_set_event_hook (); + #endif +--- 533,540 ---- + /* Set the event hook so readline will call it after the signal handlers + finish executing, so if this interrupted character input we can get +! quick response. If readline is active or has modified the terminal we +! need to set this no matter what the signal is, though the check for +! RL_STATE_TERMPREPPED is possibly redundant. */ +! if (RL_ISSTATE (RL_STATE_SIGHANDLER) || RL_ISSTATE (RL_STATE_TERMPREPPED)) + bashline_set_event_hook (); + #endif +*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 32 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 33 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0034-patchlevel-34.patch b/package/bash/0034-patchlevel-34.patch new file mode 100644 index 0000000000..79c8945c5c --- /dev/null +++ b/package/bash/0034-patchlevel-34.patch @@ -0,0 +1,94 @@ +From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-034 + +Signed-off-by: Gustavo Zacarias + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-034 + +Bug-Reported-by: Dreamcat4 +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-05/msg00001.html + +Bug-Description: + +If neither the -f nor -v options is supplied to unset, and a name argument is +found to be a function and unset, subsequent name arguments are not treated as +variables before attempting to unset a function by that name. + +Patch (apply with `patch -p0'): + +*** a/bash-4.3-patched/builtins/set.def 2013-04-19 07:20:34.000000000 -0400 +--- b/builtins/set.def 2015-05-05 13:25:36.000000000 -0400 +*************** +*** 752,758 **** +--- 797,805 ---- + { + int unset_function, unset_variable, unset_array, opt, nameref, any_failed; ++ int global_unset_func, global_unset_var; + char *name; + + unset_function = unset_variable = unset_array = nameref = any_failed = 0; ++ global_unset_func = global_unset_var = 0; + + reset_internal_getopt (); +*************** +*** 762,769 **** + { + case 'f': +! unset_function = 1; + break; + case 'v': +! unset_variable = 1; + break; + case 'n': +--- 809,816 ---- + { + case 'f': +! global_unset_func = 1; + break; + case 'v': +! global_unset_var = 1; + break; + case 'n': +*************** +*** 778,782 **** + list = loptend; + +! if (unset_function && unset_variable) + { + builtin_error (_("cannot simultaneously unset a function and a variable")); +--- 825,829 ---- + list = loptend; + +! if (global_unset_func && global_unset_var) + { + builtin_error (_("cannot simultaneously unset a function and a variable")); +*************** +*** 796,799 **** +--- 843,849 ---- + name = list->word->word; + ++ unset_function = global_unset_func; ++ unset_variable = global_unset_var; ++ + #if defined (ARRAY_VARS) + unset_array = 0; + +*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 33 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 34 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0035-patchlevel-35.patch b/package/bash/0035-patchlevel-35.patch new file mode 100644 index 0000000000..c18b60dc56 --- /dev/null +++ b/package/bash/0035-patchlevel-35.patch @@ -0,0 +1,67 @@ +From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-035 + +Signed-off-by: Gustavo Zacarias + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-035 + +Bug-Reported-by: +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-08/msg00045.html + +Bug-Description: + +A locale with a long name can trigger a buffer overflow and core dump. This +applies on systems that do not have locale_charset in libc, are not using +GNU libiconv, and are not using the libintl that ships with bash in lib/intl. + +Patch (apply with `patch -p0'): + +*** a/bash-4.3-patched/lib/sh/unicode.c 2014-01-30 16:47:19.000000000 -0500 +--- b/lib/sh/unicode.c 2015-05-01 08:58:30.000000000 -0400 +*************** +*** 79,83 **** + if (s) + { +! strcpy (charsetbuf, s+1); + t = strchr (charsetbuf, '@'); + if (t) +--- 79,84 ---- + if (s) + { +! strncpy (charsetbuf, s+1, sizeof (charsetbuf) - 1); +! charsetbuf[sizeof (charsetbuf) - 1] = '\0'; + t = strchr (charsetbuf, '@'); + if (t) +*************** +*** 85,89 **** + return charsetbuf; + } +! strcpy (charsetbuf, locale); + return charsetbuf; + } +--- 86,91 ---- + return charsetbuf; + } +! strncpy (charsetbuf, locale, sizeof (charsetbuf) - 1); +! charsetbuf[sizeof (charsetbuf) - 1] = '\0'; + return charsetbuf; + } +*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 34 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 35 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0036-patchlevel-36.patch b/package/bash/0036-patchlevel-36.patch new file mode 100644 index 0000000000..f35b29b5bd --- /dev/null +++ b/package/bash/0036-patchlevel-36.patch @@ -0,0 +1,61 @@ +From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-036 + +Signed-off-by: Gustavo Zacarias + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-036 + +Bug-Reported-by: emanuelczirai@cryptolab.net +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00071.html + +Bug-Description: + +When evaluating and setting integer variables, and the assignment fails to +create a variable (for example, when performing an operation on an array +variable with an invalid subscript), bash attempts to dereference a null +pointer, causing a segmentation violation. + +Patch (apply with `patch -p0'): + +*** a/bash-20150206/variables.c 2015-01-23 20:39:27.000000000 -0500 +--- b/variables.c 2015-02-19 13:56:12.000000000 -0500 +*************** +*** 2834,2841 **** + v = bind_variable (lhs, rhs, 0); + +! if (v && isint) +! VSETATTR (v, att_integer); +! +! VUNSETATTR (v, att_invisible); + + return (v); +--- 2834,2843 ---- + v = bind_variable (lhs, rhs, 0); + +! if (v) +! { +! if (isint) +! VSETATTR (v, att_integer); +! VUNSETATTR (v, att_invisible); +! } + + return (v); +*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 35 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 36 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0037-patchlevel-37.patch b/package/bash/0037-patchlevel-37.patch new file mode 100644 index 0000000000..5f8aff356c --- /dev/null +++ b/package/bash/0037-patchlevel-37.patch @@ -0,0 +1,47 @@ +From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-037 + +Signed-off-by: Gustavo Zacarias + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-037 + +Bug-Reported-by: Greg Wooledge +Bug-Reference-ID: <20150204144240.GN13956@eeg.ccf.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00007.html + +Bug-Description: + +If an associative array uses `@' or `*' as a subscript, `declare -p' produces +output that cannot be reused as input. + +Patch (apply with `patch -p0'): + +*** a/bash-4.3-patched/assoc.c 2011-11-05 16:39:05.000000000 -0400 +--- b/assoc.c 2015-02-04 15:28:25.000000000 -0500 +*************** +*** 437,440 **** +--- 440,445 ---- + if (sh_contains_shell_metas (tlist->key)) + istr = sh_double_quote (tlist->key); ++ else if (ALL_ELEMENT_SUB (tlist->key[0]) && tlist->key[1] == '\0') ++ istr = sh_double_quote (tlist->key); + else + istr = tlist->key; +*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 36 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 37 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0038-patchlevel-38.patch b/package/bash/0038-patchlevel-38.patch new file mode 100644 index 0000000000..09fd9c2ec0 --- /dev/null +++ b/package/bash/0038-patchlevel-38.patch @@ -0,0 +1,92 @@ +From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-038 + +Signed-off-by: Gustavo Zacarias + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-038 + +Bug-Reported-by: worley@alum.mit.edu (Dale R. Worley) +Bug-Reference-ID: <201406100051.s5A0pCeB014978@hobgoblin.ariadne.com> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00028.html + +Bug-Description: + +There are a number of instances where `time' is not recognized as a reserved +word when the shell grammar says it should be. + +Patch (apply with `patch -p0'): + +*** a/bash-4.3-patched/parse.y 2014-04-07 11:56:12.000000000 -0400 +--- b/parse.y 2014-06-11 10:25:53.000000000 -0400 +*************** +*** 2819,2827 **** + case OR_OR: + case '&': + case DO: + case THEN: + case ELSE: + case '{': /* } */ +! case '(': /* ) */ + case BANG: /* ! time pipeline */ + case TIME: /* time time pipeline */ +--- 2819,2832 ---- + case OR_OR: + case '&': ++ case WHILE: + case DO: ++ case UNTIL: ++ case IF: + case THEN: ++ case ELIF: + case ELSE: + case '{': /* } */ +! case '(': /* )( */ +! case ')': /* only valid in case statement */ + case BANG: /* ! time pipeline */ + case TIME: /* time time pipeline */ +*** a/bash-4.3-patched/y.tab.c 2014-10-05 13:52:50.000000000 -0400 +--- b/y.tab.c 2015-05-19 15:08:43.000000000 -0400 +*************** +*** 5131,5139 **** + case OR_OR: + case '&': + case DO: + case THEN: + case ELSE: + case '{': /* } */ +! case '(': /* ) */ + case BANG: /* ! time pipeline */ + case TIME: /* time time pipeline */ +--- 5131,5144 ---- + case OR_OR: + case '&': ++ case WHILE: + case DO: ++ case UNTIL: ++ case IF: + case THEN: ++ case ELIF: + case ELSE: + case '{': /* } */ +! case '(': /* )( */ +! case ')': /* only valid in case statement */ + case BANG: /* ! time pipeline */ + case TIME: /* time time pipeline */ +*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 37 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 38 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0039-patchlevel-39.patch b/package/bash/0039-patchlevel-39.patch new file mode 100644 index 0000000000..2a555b96c1 --- /dev/null +++ b/package/bash/0039-patchlevel-39.patch @@ -0,0 +1,61 @@ +From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-039 + +Signed-off-by: Gustavo Zacarias + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-039 + +Bug-Reported-by: SN +Bug-Reference-ID: <54E2554C.205@gazeta.pl> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-02/msg00060.html + +Bug-Description: + +Using the output of `declare -p' when run in a function can result in variables +that are invisible to `declare -p'. This problem occurs when an assignment +builtin such as `declare' receives a quoted compound array assignment as one of +its arguments. + +Patch (apply with `patch -p0'): + +*** a/bash-4.3-patched/arrayfunc.c 2014-10-01 13:08:48.000000000 -0400 +--- b/arrayfunc.c 2015-02-19 14:33:05.000000000 -0500 +*************** +*** 405,408 **** +--- 405,411 ---- + else + array_insert (a, i, l->word->word); ++ ++ VUNSETATTR (var, att_invisible); /* no longer invisible */ ++ + return var; + } +*************** +*** 635,638 **** +--- 638,645 ---- + if (nlist) + dispose_words (nlist); ++ ++ if (var) ++ VUNSETATTR (var, att_invisible); /* no longer invisible */ ++ + return (var); + } +*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 38 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 39 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0040-patchlevel-40.patch b/package/bash/0040-patchlevel-40.patch new file mode 100644 index 0000000000..2a03c45a92 --- /dev/null +++ b/package/bash/0040-patchlevel-40.patch @@ -0,0 +1,51 @@ +From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-040 + +Signed-off-by: Gustavo Zacarias + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-040 + +Bug-Reported-by: Jean Delvare +Bug-Reference-ID: <20150609180231.5f463695@endymion.delvare> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00033.html + +Bug-Description: + +There is a memory leak that occurs when bash expands an array reference on +the rhs of an assignment statement. + +Patch (apply with `patch -p0'): + +*** a/bash-4.3-patched/subst.c 2014-10-01 12:57:47.000000000 -0400 +--- b/subst.c 2015-06-22 09:16:53.000000000 -0400 +*************** +*** 5783,5787 **** + if (pflags & PF_ASSIGNRHS) + { +! temp = array_variable_name (name, &tt, (int *)0); + if (ALL_ELEMENT_SUB (tt[0]) && tt[1] == ']') + temp = array_value (name, quoted|Q_DOUBLE_QUOTES, 0, &atype, &ind); +--- 5783,5787 ---- + if (pflags & PF_ASSIGNRHS) + { +! var = array_variable_part (name, &tt, (int *)0); + if (ALL_ELEMENT_SUB (tt[0]) && tt[1] == ']') + temp = array_value (name, quoted|Q_DOUBLE_QUOTES, 0, &atype, &ind); +*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 39 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 40 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0041-patchlevel-41.patch b/package/bash/0041-patchlevel-41.patch new file mode 100644 index 0000000000..c8ba4b1081 --- /dev/null +++ b/package/bash/0041-patchlevel-41.patch @@ -0,0 +1,76 @@ +From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-041 + +Signed-off-by: Gustavo Zacarias + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-041 + +Bug-Reported-by: Hanno Böck +Bug-Reference-ID: <20150623131106.6f111da9@pc1>, <20150707004640.0e61d2f9@pc1> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00089.html, + http://lists.gnu.org/archive/html/bug-bash/2015-07/msg00018.html + +Bug-Description: + +There are several out-of-bounds read errors that occur when completing command +lines where assignment statements appear before the command name. The first +two appear only when programmable completion is enabled; the last one only +happens when listing possible completions. + +Patch (apply with `patch -p0'): + +*** a/bash-4.3.40/bashline.c 2014-12-29 14:39:43.000000000 -0500 +--- b/bashline.c 2015-08-12 10:21:58.000000000 -0400 +*************** +*** 1469,1476 **** +--- 1469,1489 ---- + os = start; + n = 0; ++ was_assignment = 0; + s = find_cmd_start (os); + e = find_cmd_end (end); + do + { ++ /* Don't read past the end of rl_line_buffer */ ++ if (s > rl_end) ++ { ++ s1 = s = e1; ++ break; ++ } ++ /* Or past point if point is within an assignment statement */ ++ else if (was_assignment && s > rl_point) ++ { ++ s1 = s = e1; ++ break; ++ } + /* Skip over assignment statements preceding a command name. If we + don't find a command name at all, we can perform command name +*** a/bash-4.3.40/lib/readline/complete.c 2013-10-14 09:27:10.000000000 -0400 +--- b/lib/readline/complete.c 2015-07-31 09:34:39.000000000 -0400 +*************** +*** 690,693 **** +--- 690,695 ---- + if (temp == 0 || *temp == '\0') + return (pathname); ++ else if (temp[1] == 0 && temp == pathname) ++ return (pathname); + /* If the basename is NULL, we might have a pathname like '/usr/src/'. + Look for a previous slash and, if one is found, return the portion +*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 40 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 41 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/0042-patchlevel-42.patch b/package/bash/0042-patchlevel-42.patch new file mode 100644 index 0000000000..bb3471c63f --- /dev/null +++ b/package/bash/0042-patchlevel-42.patch @@ -0,0 +1,59 @@ +From http://ftp.gnu.org/pub/gnu/bash/bash-4.3-patches/bash43-042 + +Signed-off-by: Gustavo Zacarias + + BASH PATCH REPORT + ================= + +Bash-Release: 4.3 +Patch-ID: bash43-042 + +Bug-Reported-by: Nathan Neulinger +Bug-Reference-ID: <558EFDF2.7060402@neulinger.org> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2015-06/msg00096.html + +Bug-Description: + +There is a problem when parsing command substitutions containing `case' +commands within pipelines that causes the parser to not correctly identify +the end of the command substitution. + +Patch (apply with `patch -p0'): + +*** a/bash-4.3-patched/parse.y 2015-05-18 19:27:05.000000000 -0400 +--- b/parse.y 2015-06-29 10:59:27.000000000 -0400 +*************** +*** 3709,3712 **** +--- 3709,3714 ---- + tflags |= LEX_INWORD; + lex_wlen = 0; ++ if (tflags & LEX_RESWDOK) ++ lex_rwlen = 0; + } + } +*** a/bash-4.3-patched/y.tab.c 2015-05-18 19:27:05.000000000 -0400 +--- b/y.tab.c 2015-06-29 10:59:27.000000000 -0400 +*************** +*** 6021,6024 **** +--- 6021,6026 ---- + tflags |= LEX_INWORD; + lex_wlen = 0; ++ if (tflags & LEX_RESWDOK) ++ lex_rwlen = 0; + } + } +*** a/bash-4.3/patchlevel.h 2012-12-29 10:47:57.000000000 -0500 +--- b/patchlevel.h 2014-03-20 20:01:28.000000000 -0400 +*************** +*** 26,30 **** + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 41 + + #endif /* _PATCHLEVEL_H_ */ +--- 26,30 ---- + looks for to find the patch level (for the sccs version string). */ + +! #define PATCHLEVEL 42 + + #endif /* _PATCHLEVEL_H_ */ diff --git a/package/bash/Config.in b/package/bash/Config.in new file mode 100644 index 0000000000..2f823dcc7f --- /dev/null +++ b/package/bash/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_BASH + bool "bash" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + # uses fork() + depends on BR2_USE_MMU + help + The standard GNU Bourne again shell. + + http://tiswww.case.edu/php/chet/bash/bashtop.html diff --git a/package/bash/bash.hash b/package/bash/bash.hash new file mode 100644 index 0000000000..faf2364588 --- /dev/null +++ b/package/bash/bash.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 317881019bbf2262fb814b7dd8e40632d13c3608d2f237800a8828fbb8a640dd bash-4.3.30.tar.gz diff --git a/package/bash/bash.mk b/package/bash/bash.mk new file mode 100644 index 0000000000..3cd8d8273c --- /dev/null +++ b/package/bash/bash.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# bash +# +################################################################################ + +BASH_VERSION = 4.3.30 +BASH_SITE = $(BR2_GNU_MIRROR)/bash +# Build after since bash is better than busybox shells +BASH_DEPENDENCIES = ncurses readline host-bison \ + $(if $(BR2_PACKAGE_BUSYBOX),busybox) +BASH_CONF_OPTS = --with-installed-readline +BASH_LICENSE = GPLv3+ +BASH_LICENSE_FILES = COPYING + +BASH_CONF_ENV += \ + ac_cv_rl_prefix="$(STAGING_DIR)" \ + ac_cv_rl_version="$(READLINE_VERSION)" \ + bash_cv_getcwd_malloc=yes \ + bash_cv_job_control_missing=present \ + bash_cv_sys_named_pipes=present \ + bash_cv_func_sigsetjmp=present \ + bash_cv_printf_a_format=yes + +# The static build needs some trickery +ifeq ($(BR2_STATIC_LIBS),y) +BASH_CONF_OPTS += --enable-static-link --without-bash-malloc +# bash wants to redefine the getenv() function. To check whether this is +# possible, AC_TRY_RUN is used which is not possible in +# cross-compilation. +# On uClibc, redefining getenv is not possible; on glibc and musl it is. +# Related: +# http://lists.gnu.org/archive/html/bug-bash/2012-03/msg00052.html +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +BASH_CONF_ENV += bash_cv_getenv_redef=no +else +BASH_CONF_ENV += bash_cv_getenv_redef=yes +endif +endif + +# Make /bin/sh -> bash (no other shell, better than busybox shells) +define BASH_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + DESTDIR=$(TARGET_DIR) exec_prefix=/ install + rm -f $(TARGET_DIR)/bin/bashbug +endef + +$(eval $(autotools-package)) diff --git a/package/batctl/Config.in b/package/batctl/Config.in new file mode 100644 index 0000000000..2557418928 --- /dev/null +++ b/package/batctl/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_BATCTL + bool "batctl" + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + select BR2_PACKAGE_LIBNL + help + Batctl is the configuration and debugging tool for batman-adv. + + http://www.open-mesh.org/projects/batman-adv/wiki/Using-batctl + +comment "batctl needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/batctl/batctl.hash b/package/batctl/batctl.hash new file mode 100644 index 0000000000..1a045f43ed --- /dev/null +++ b/package/batctl/batctl.hash @@ -0,0 +1,4 @@ +# http://downloads.open-mesh.org/batman/releases/batman-adv-2015.1/batctl-2015.1.tar.gz.sha1 +sha1 ae086f334ff912ab2a8116caedf0a2a1816acf1a batctl-2015.1.tar.gz +# Locally calculated +sha256 ea67ee22785e6fcd5149472bdf2df4e9f21716968e025e7dd41556a010a8d14a batctl-2015.1.tar.gz diff --git a/package/batctl/batctl.mk b/package/batctl/batctl.mk new file mode 100644 index 0000000000..e91dff99dc --- /dev/null +++ b/package/batctl/batctl.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# batctl +# +################################################################################ + +BATCTL_VERSION = 2015.1 +BATCTL_SITE = http://downloads.open-mesh.org/batman/releases/batman-adv-$(BATCTL_VERSION) +BATCTL_LICENSE = GPLv2 +BATCTL_DEPENDENCIES = libnl host-pkgconf + +define BATCTL_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) all +endef + +define BATCTL_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + PREFIX=/usr DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/bc/01_array_initialize.patch b/package/bc/01_array_initialize.patch new file mode 100644 index 0000000000..9520d824af --- /dev/null +++ b/package/bc/01_array_initialize.patch @@ -0,0 +1,20 @@ +Description: Fix array initialization bug +Author: Phil Nelson +Origin: upstream +Bug-Debian: http://bugs.debian.org/586969 +Bug-Debian: http://bugs.debian.org/671513 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +Index: bc/bc/storage.c +=================================================================== +--- bc.orig/bc/storage.c 2013-06-02 20:34:09.401273864 -0400 ++++ bc/bc/storage.c 2013-06-02 20:34:11.000000000 -0400 +@@ -179,7 +179,7 @@ + + + /* Initialize the new elements. */ +- for (; indx < v_count; indx++) ++ for (; indx < a_count; indx++) + arrays[indx] = NULL; + + /* Free the old elements. */ diff --git a/package/bc/02_notice_read_write_errors.patch b/package/bc/02_notice_read_write_errors.patch new file mode 100644 index 0000000000..73e6ec91ca --- /dev/null +++ b/package/bc/02_notice_read_write_errors.patch @@ -0,0 +1,708 @@ +Description: notice read and write errors on input and output + Quoting from the bug report: + +bc (1.06-19ubuntu1) dapper; urgency=low + + + + * Make dc notice read and write errors on its input and output. + + I grepped for mentions of the strings `putc', `print', `getc', `FILE', + + `stdin', `stdout' and `stderr' and added calls to new error-checking + + functions unless it was clear from the immediately-surrounding code + + that the program was exiting nonzero, or would exit nonzero if the + + call failed. I ignored hits in lib/getopt*, which seems to + + pervasively ignore write errors when printing usage messages, in the + + hope that these were correct. I _think_ I got them all. -iwj. + + + + -- Ian Jackson Tue, 4 Apr 2006 17:21:02 +0100 +Author: Ian Jackson +Origin: other +Bug-Debian: http://bugs.debian.org/488735 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +diff --git a/bc/execute.c b/bc/execute.c +index e4e8ef7..8787048 100644 +--- a/bc/execute.c ++++ b/bc/execute.c +@@ -108,6 +108,7 @@ execute () + } + out_char ('\n'); + } ++ checkferror_output(stdout); + } + #endif + +@@ -222,6 +223,7 @@ execute () + } + } + fflush (stdout); ++ checkferror_output(stdout); + break; + + case 'R' : /* Return from function */ +@@ -257,6 +259,7 @@ execute () + if (inst == 'W') out_char ('\n'); + store_var (4); /* Special variable "last". */ + fflush (stdout); ++ checkferror_output(stdout); + pop (); + break; + +@@ -338,6 +341,7 @@ execute () + case 'w' : /* Write a string to the output. */ + while ((ch = byte(&pc)) != '"') out_schar (ch); + fflush (stdout); ++ checkferror_output(stdout); + break; + + case 'x' : /* Exchange Top of Stack with the one under the tos. */ +@@ -545,7 +549,10 @@ execute () + { + signal (SIGINT, use_quit); + if (had_sigint) +- printf ("\ninterrupted execution.\n"); ++ { ++ printf ("\ninterrupted execution.\n"); ++ checkferror_output(stdout); ++ } + } + } + +@@ -580,6 +587,7 @@ input_char () + out_col = 0; /* Saw a new line */ + } + } ++ checkferror_input(stdin); + + /* Classify and preprocess the input character. */ + if (isdigit(in_ch)) +diff --git a/bc/load.c b/bc/load.c +index 1035198..4039e86 100644 +--- a/bc/load.c ++++ b/bc/load.c +@@ -217,6 +217,7 @@ load_code (code) + if (label_no > 65535L) + { /* Better message? */ + fprintf (stderr,"Program too big.\n"); ++ checkferror_output(stderr); + exit(1); + } + addbyte ( (char) (label_no & 0xFF)); +diff --git a/bc/main.c b/bc/main.c +index 9a2461e..3ae427d 100644 +--- a/bc/main.c ++++ b/bc/main.c +@@ -358,6 +358,9 @@ use_quit (sig) + errno = save; + #else + write (1, "\n(interrupt) Exiting bc.\n", 26); ++#ifdef READLINE ++ rl_initialize (); /* Clear readline buffer */ ++#endif + #if defined(LIBEDIT) + if (edit != NULL) + el_end(edit); +diff --git a/bc/sbc.y b/bc/sbc.y +index 0ded29e..6fcc1fa 100644 +--- a/bc/sbc.y ++++ b/bc/sbc.y +@@ -86,7 +86,9 @@ program : /* empty */ + if (interactive && !quiet) + { + show_bc_version (); ++ checkferror_output(stdout); + welcome (); ++ checkferror_output(stdout); + } + } + | program input_item +diff --git a/bc/scan.c b/bc/scan.c +index 1f78ec2..2b5eeb4 100644 +--- a/bc/scan.c ++++ b/bc/scan.c +@@ -799,6 +799,7 @@ bcel_input (buf, result, max) + if (bcel_len != 0) + history (hist, &histev, H_ENTER, bcel_line); + fflush (stdout); ++ checkferror_output(stdout); + } + + if (bcel_len <= max) +@@ -874,6 +875,7 @@ rl_input (buf, result, max) + add_history (rl_line); + rl_line[rl_len-1] = '\n'; + fflush (stdout); ++ checkferror_output(stdout); + } + + if (rl_len <= max) +diff --git a/bc/scan.l b/bc/scan.l +index 841c3df..16cd62e 100644 +--- a/bc/scan.l ++++ b/bc/scan.l +@@ -111,6 +111,7 @@ bcel_input (buf, result, max) + if (bcel_len != 0) + history (hist, &histev, H_ENTER, bcel_line); + fflush (stdout); ++ checkferror_output(stdout); + } + + if (bcel_len <= max) +@@ -186,6 +187,7 @@ rl_input (buf, result, max) + add_history (rl_line); + rl_line[rl_len-1] = '\n'; + fflush (stdout); ++ checkferror_output(stdout); + } + + if (rl_len <= max) +@@ -310,6 +312,7 @@ limits return(Limits); + if (c == EOF) + { + fprintf (stderr,"EOF encountered in a comment.\n"); ++ checkferror_output(stderr); + break; + } + } +diff --git a/bc/storage.c b/bc/storage.c +index 699729a..37b4c6c 100644 +--- a/bc/storage.c ++++ b/bc/storage.c +@@ -99,6 +99,7 @@ more_functions (VOID) + { + f = &functions[indx]; + f->f_defined = FALSE; ++ f->f_void = FALSE; + f->f_body = (char *) bc_malloc (BC_START_SIZE); + f->f_body_size = BC_START_SIZE; + f->f_code_size = 0; +diff --git a/bc/util.c b/bc/util.c +index 30beaf9..669235f 100644 +--- a/bc/util.c ++++ b/bc/util.c +@@ -260,9 +260,10 @@ init_gen () + continue_label = 0; + next_label = 1; + out_count = 2; +- if (compile_only) ++ if (compile_only) { + printf ("@i"); +- else ++ checkferror_output(stdout); ++ } else + init_load (); + had_error = FALSE; + did_gen = FALSE; +@@ -286,6 +287,7 @@ generate (str) + printf ("\n"); + out_count = 0; + } ++ checkferror_output(stdout); + } + else + load_code (str); +@@ -303,6 +305,7 @@ run_code() + if (compile_only) + { + printf ("@r\n"); ++ checkferror_output(stdout); + out_count = 0; + } + else +@@ -341,6 +344,7 @@ out_char (ch) + } + putchar (ch); + } ++ checkferror_output(stdout); + } + + /* Output routines: Write a character CH to the standard output. +@@ -371,6 +375,7 @@ out_schar (ch) + } + putchar (ch); + } ++ checkferror_output(stdout); + } + + +@@ -657,6 +662,7 @@ limits() + #ifdef OLD_EQ_OP + printf ("Old assignment operatiors are valid. (=-, =+, ...)\n"); + #endif ++ checkferror_output(stdout); + } + + /* bc_malloc will check the return value so all other places do not +@@ -721,6 +727,7 @@ yyerror (str, va_alist) + fprintf (stderr,"%s %d: ",name,line_no); + vfprintf (stderr, str, args); + fprintf (stderr, "\n"); ++ checkferror_output(stderr); + had_error = TRUE; + va_end (args); + } +@@ -761,6 +768,7 @@ warn (mesg, va_alist) + fprintf (stderr,"%s %d: Error: ",name,line_no); + vfprintf (stderr, mesg, args); + fprintf (stderr, "\n"); ++ checkferror_output(stderr); + had_error = TRUE; + } + else +@@ -773,6 +781,7 @@ warn (mesg, va_alist) + fprintf (stderr,"%s %d: (Warning) ",name,line_no); + vfprintf (stderr, mesg, args); + fprintf (stderr, "\n"); ++ checkferror_output(stderr); + } + va_end (args); + } +@@ -807,6 +816,7 @@ rt_error (mesg, va_alist) + va_end (args); + + fprintf (stderr, "\n"); ++ checkferror_output(stderr); + runtime_error = TRUE; + } + +@@ -843,4 +853,5 @@ rt_warn (mesg, va_alist) + va_end (args); + + fprintf (stderr, "\n"); ++ checkferror_output(stderr); + } +diff --git a/dc/dc.c b/dc/dc.c +index e03f094..0faf03a 100644 +--- a/dc/dc.c ++++ b/dc/dc.c +@@ -61,6 +61,7 @@ static void + bug_report_info DC_DECLVOID() + { + printf("Email bug reports to: bug-dc@gnu.org .\n"); ++ checkferror_output(stdout); + } + + static void +@@ -71,6 +72,7 @@ show_version DC_DECLVOID() + This is free software; see the source for copying conditions. There is NO\n\ + warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\n\ + to the extent permitted by law.\n", DC_COPYRIGHT); ++ checkferror_output(stdout); + } + + /* your generic usage function */ +@@ -87,6 +89,7 @@ Usage: %s [OPTION] [file ...]\n\ + \n\ + ", progname); + bug_report_info(); ++ checkferror_output(f); + } + + /* returns a pointer to one past the last occurance of c in s, +diff --git a/dc/eval.c b/dc/eval.c +index 4af7200..153d331 100644 +--- a/dc/eval.c ++++ b/dc/eval.c +@@ -94,12 +94,15 @@ static int input_pushback; + static int + input_fil DC_DECLVOID() + { ++ int c; + if (input_pushback != EOF){ +- int c = input_pushback; ++ c = input_pushback; + input_pushback = EOF; + return c; + } +- return getc(input_fil_fp); ++ c = getc(input_fil_fp); ++ checkferror_input(input_fil_fp); ++ return c; + } + + /* passed as an argument to dc_getnum */ +@@ -298,11 +301,13 @@ dc_func DC_DECLARG((c, peekc, negcmp)) + tmpint = dc_num2int(datum.v.number, DC_TOSS); + if (2 <= tmpint && tmpint <= DC_IBASE_MAX) + dc_ibase = tmpint; +- else ++ else { + fprintf(stderr, + "%s: input base must be a number \ + between 2 and %d (inclusive)\n", + progname, DC_IBASE_MAX); ++ checkferror_output(stderr); ++ } + } + break; + case 'k': /* set scale to value on top of stack */ +@@ -310,11 +315,12 @@ between 2 and %d (inclusive)\n", + tmpint = -1; + if (datum.dc_type == DC_NUMBER) + tmpint = dc_num2int(datum.v.number, DC_TOSS); +- if ( ! (tmpint >= 0) ) ++ if ( ! (tmpint >= 0) ) { + fprintf(stderr, + "%s: scale must be a nonnegative number\n", + progname); +- else ++ checkferror_output(stderr); ++ } else + dc_scale = tmpint; + } + break; +@@ -338,11 +344,12 @@ between 2 and %d (inclusive)\n", + tmpint = 0; + if (datum.dc_type == DC_NUMBER) + tmpint = dc_num2int(datum.v.number, DC_TOSS); +- if ( ! (tmpint > 1) ) ++ if ( ! (tmpint > 1) ) { + fprintf(stderr, + "%s: output base must be a number greater than 1\n", + progname); +- else ++ checkferror_output(stderr); ++ } else + dc_obase = tmpint; + } + break; +@@ -383,6 +390,7 @@ between 2 and %d (inclusive)\n", + fprintf(stderr, + "%s: square root of nonnumeric attempted\n", + progname); ++ checkferror_output(stderr); + }else if (dc_sqrt(datum.v.number, dc_scale, &tmpnum) == DC_SUCCESS){ + dc_free_num(&datum.v.number); + datum.v.number = tmpnum; +@@ -444,6 +452,7 @@ between 2 and %d (inclusive)\n", + fprintf(stderr, + "%s: Q command requires a number >= 1\n", + progname); ++ checkferror_output(stderr); + } + break; + #if 0 +@@ -489,11 +498,12 @@ between 2 and %d (inclusive)\n", + if (datum.dc_type == DC_NUMBER) + tmpint = dc_num2int(datum.v.number, DC_TOSS); + if (dc_pop(&datum) == DC_SUCCESS){ +- if (tmpint < 0) ++ if (tmpint < 0) { + fprintf(stderr, + "%s: array index must be a nonnegative integer\n", + progname); +- else ++ checkferror_output(stderr); ++ } else + dc_array_set(peekc, tmpint, datum); + } + } +@@ -505,17 +515,19 @@ between 2 and %d (inclusive)\n", + tmpint = -1; + if (datum.dc_type == DC_NUMBER) + tmpint = dc_num2int(datum.v.number, DC_TOSS); +- if (tmpint < 0) ++ if (tmpint < 0) { + fprintf(stderr, + "%s: array index must be a nonnegative integer\n", + progname); +- else ++ checkferror_output(stderr); ++ } else + dc_push(dc_array_get(peekc, tmpint)); + } + return DC_EATONE; + + default: /* What did that user mean? */ + fprintf(stderr, "%s: ", progname); ++ checkferror_output(stderr); + dc_show_id(stdout, c, " unimplemented\n"); + break; + } +@@ -544,6 +556,7 @@ dc_evalstr DC_DECLARG((string)) + fprintf(stderr, + "%s: eval called with non-string argument\n", + progname); ++ checkferror_output(stderr); + return DC_OKAY; + } + interrupt_seen = 0; +@@ -640,6 +653,7 @@ dc_evalstr DC_DECLARG((string)) + return DC_FAIL; + } + fprintf(stderr, "%s: unexpected EOS\n", progname); ++ checkferror_output(stderr); + return DC_OKAY; + } + } +@@ -665,6 +679,7 @@ dc_evalfile DC_DECLARG((fp)) + stdin_lookahead = EOF; + for (c=getc(fp); c!=EOF; c=peekc){ + peekc = getc(fp); ++ checkferror_input(stdin); + /* + * The following if() is the only place where ``stdin_lookahead'' + * might be set to other than EOF: +@@ -716,6 +731,7 @@ dc_evalfile DC_DECLARG((fp)) + return DC_SUCCESS; + fprintf(stderr, "%s: Q command argument exceeded \ + string execution depth\n", progname); ++ checkferror_output(stderr); + } + }else{ + dc_garbage("at top of stack", -1); +@@ -728,8 +744,11 @@ string execution depth\n", progname); + fprintf(stderr, + "%s: Q command argument exceeded string execution depth\n", + progname); +- if (stdin_lookahead != peekc && fp == stdin) ++ checkferror_output(stderr); ++ if (stdin_lookahead != peekc && fp == stdin) { + peekc = getc(fp); ++ checkferror_input(stdin); ++ } + break; + + case DC_INT: +@@ -771,6 +790,7 @@ string execution depth\n", progname); + if (ferror(fp)) + goto error_fail; + fprintf(stderr, "%s: unexpected EOF\n", progname); ++ checkferror_output(stderr); + return DC_FAIL; + } + } +diff --git a/dc/misc.c b/dc/misc.c +index f2388b0..1be56fe 100644 +--- a/dc/misc.c ++++ b/dc/misc.c +@@ -91,6 +91,7 @@ dc_show_id DC_DECLARG((fp, id, suffix)) + fprintf(fp, "'%c' (%#o)%s", (unsigned int) id, id, suffix); + else + fprintf(fp, "%#o%s", (unsigned int) id, suffix); ++ checkferror_output(fp); + } + + +diff --git a/dc/numeric.c b/dc/numeric.c +index 8e5e70f..c875eba 100644 +--- a/dc/numeric.c ++++ b/dc/numeric.c +@@ -134,6 +134,7 @@ dc_div DC_DECLARG((a, b, kscale, result)) + bc_init_num(CastNumPtr(result)); + if (bc_divide(CastNum(a), CastNum(b), CastNumPtr(result), kscale)){ + fprintf(stderr, "%s: divide by zero\n", progname); ++ checkferror_output(stderr); + return DC_DOMAIN_ERROR; + } + return DC_SUCCESS; +@@ -156,6 +157,7 @@ dc_divrem DC_DECLARG((a, b, kscale, quotient, remainder)) + if (bc_divmod(CastNum(a), CastNum(b), + CastNumPtr(quotient), CastNumPtr(remainder), kscale)){ + fprintf(stderr, "%s: divide by zero\n", progname); ++ checkferror_output(stderr); + return DC_DOMAIN_ERROR; + } + return DC_SUCCESS; +@@ -174,6 +176,7 @@ dc_rem DC_DECLARG((a, b, kscale, result)) + bc_init_num(CastNumPtr(result)); + if (bc_modulo(CastNum(a), CastNum(b), CastNumPtr(result), kscale)){ + fprintf(stderr, "%s: remainder by zero\n", progname); ++ checkferror_output(stderr); + return DC_DOMAIN_ERROR; + } + return DC_SUCCESS; +@@ -226,6 +229,7 @@ dc_sqrt DC_DECLARG((value, kscale, result)) + tmp = bc_copy_num(CastNum(value)); + if (!bc_sqrt(&tmp, kscale)){ + fprintf(stderr, "%s: square root of negative number\n", progname); ++ checkferror_output(stderr); + bc_free_num(&tmp); + return DC_DOMAIN_ERROR; + } +@@ -429,8 +433,10 @@ dc_out_num DC_DECLARG((value, obase, newline_p, discard_p)) + { + out_char('\0'); /* clear the column counter */ + bc_out_num(CastNum(value), obase, out_char, 0); +- if (newline_p == DC_WITHNL) ++ if (newline_p == DC_WITHNL) { + putchar ('\n'); ++ checkferror_output(stdout); ++ } + if (discard_p == DC_TOSS) + dc_free_num(&value); + } +@@ -475,6 +481,7 @@ dc_dump_num DC_DECLARG((dcvalue, discard_p)) + + for (cur=top_of_stack; cur; cur=next) { + putchar(cur->digit); ++ checkferror_output(stdout); + next = cur->link; + free(cur); + } +@@ -592,6 +599,7 @@ out_char (ch) + out_col = 1; + } + putchar(ch); ++ checkferror_output(stderr); + } + } + +@@ -631,6 +639,7 @@ rt_error (mesg, va_alist) + vfprintf (stderr, mesg, args); + va_end (args); + fprintf (stderr, "\n"); ++ checkferror_output(stderr); + } + + +@@ -664,6 +673,7 @@ rt_warn (mesg, va_alist) + vfprintf (stderr, mesg, args); + va_end (args); + fprintf (stderr, "\n"); ++ checkferror_output(stderr); + } + + +diff --git a/dc/stack.c b/dc/stack.c +index 0730e9c..5db3975 100644 +--- a/dc/stack.c ++++ b/dc/stack.c +@@ -38,7 +38,10 @@ + #include "dc-regdef.h" + + /* an oft-used error message: */ +-#define Empty_Stack fprintf(stderr, "%s: stack empty\n", progname) ++#define Empty_Stack do{ \ ++ fprintf(stderr, "%s: stack empty\n", progname); \ ++ checkferror_output(stderr); \ ++ }while(0) + + + /* simple linked-list implementation suffices: */ +@@ -94,6 +97,7 @@ dc_binop DC_DECLARG((op, kscale)) + if (dc_stack->value.dc_type!=DC_NUMBER + || dc_stack->link->value.dc_type!=DC_NUMBER){ + fprintf(stderr, "%s: non-numeric value\n", progname); ++ checkferror_output(stderr); + return; + } + (void)dc_pop(&b); +@@ -134,6 +138,7 @@ dc_binop2 DC_DECLARG((op, kscale)) + if (dc_stack->value.dc_type!=DC_NUMBER + || dc_stack->link->value.dc_type!=DC_NUMBER){ + fprintf(stderr, "%s: non-numeric value\n", progname); ++ checkferror_output(stderr); + return; + } + (void)dc_pop(&b); +@@ -172,6 +177,7 @@ dc_cmpop DC_DECLVOID() + if (dc_stack->value.dc_type!=DC_NUMBER + || dc_stack->link->value.dc_type!=DC_NUMBER){ + fprintf(stderr, "%s: non-numeric value\n", progname); ++ checkferror_output(stderr); + return 0; + } + (void)dc_pop(&b); +@@ -209,6 +215,7 @@ dc_triop DC_DECLARG((op, kscale)) + || dc_stack->link->value.dc_type!=DC_NUMBER + || dc_stack->link->link->value.dc_type!=DC_NUMBER){ + fprintf(stderr, "%s: non-numeric value\n", progname); ++ checkferror_output(stderr); + return; + } + (void)dc_pop(&c); +@@ -327,6 +334,7 @@ dc_register_get DC_DECLARG((regid, result)) + r = dc_register[regid]; + if (r==NULL || r->value.dc_type==DC_UNINITIALIZED){ + fprintf(stderr, "%s: register ", progname); ++ checkferror_output(stderr); + dc_show_id(stderr, regid, " is empty\n"); + return DC_FAIL; + } +@@ -401,6 +409,7 @@ dc_register_pop DC_DECLARG((stackid, result)) + r = dc_register[stackid]; + if (r == NULL){ + fprintf(stderr, "%s: stack register ", progname); ++ checkferror_output(stderr); + dc_show_id(stderr, stackid, " is empty\n"); + return DC_FAIL; + } +diff --git a/dc/string.c b/dc/string.c +index ff1e7f1..e24092d 100644 +--- a/dc/string.c ++++ b/dc/string.c +@@ -101,6 +101,7 @@ dc_out_str DC_DECLARG((value, newline, discard_flag)) + fwrite(value->s_ptr, value->s_len, sizeof *value->s_ptr, stdout); + if (newline == DC_WITHNL) + putchar('\n'); ++ checkferror_output(stdout); + if (discard_flag == DC_TOSS) + dc_free_str(&value); + } +@@ -176,6 +177,7 @@ dc_readstring DC_DECLARG((fp, ldelim, rdelim)) + } + *p++ = c; + } ++ checkferror_input(fp); + return dc_makestring(line_buf, (size_t)(p-line_buf)); + } + +diff --git a/h/number.h b/h/number.h +index 9b034b6..3a00a92 100644 +--- a/h/number.h ++++ b/h/number.h +@@ -150,4 +150,7 @@ _PROTOTYPE(int bc_sqrt, (bc_num *num, int scale)); + _PROTOTYPE(void bc_out_num, (bc_num num, int o_base, void (* out_char)(int), + int leading_zero)); + ++_PROTOTYPE(void checkferror_input, (FILE*)); ++_PROTOTYPE(void checkferror_output, (FILE*)); ++ + #endif +diff --git a/lib/number.c b/lib/number.c +index e211840..4d3ce46 100644 +--- a/lib/number.c ++++ b/lib/number.c +@@ -1776,6 +1776,7 @@ static void + out_char (int c) + { + putchar(c); ++ checkferror_output(stdout); + } + + +@@ -1785,6 +1786,7 @@ pn (num) + { + bc_out_num (num, 10, out_char, 0); + out_char ('\n'); ++ checkferror_output(stdout); + } + + +@@ -1799,6 +1801,28 @@ pv (name, num, len) + printf ("%s=", name); + for (i=0; i + +diff -Nura bc-1.06.95.orig/doc/Makefile.in bc-1.06.95/doc/Makefile.in +--- bc-1.06.95.orig/doc/Makefile.in 2015-06-13 09:39:46.946620294 -0300 ++++ bc-1.06.95/doc/Makefile.in 2015-06-13 09:40:10.019407630 -0300 +@@ -96,7 +96,7 @@ + LIBOBJS = @LIBOBJS@ + LIBS = @LIBS@ + LTLIBOBJS = @LTLIBOBJS@ +-MAKEINFO = makeinfo --no-split ++MAKEINFO = @MAKEINFO@ --no-split + OBJEXT = @OBJEXT@ + PACKAGE = @PACKAGE@ + PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ diff --git a/package/bc/Config.in b/package/bc/Config.in new file mode 100644 index 0000000000..a28978d2e5 --- /dev/null +++ b/package/bc/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_BC + bool "bc" + help + 'bc' is an arbitrary precision numeric processing language + Its syntax is similar to C, but differs in many substantial + areas. It supports interactive execution of statements. 'Bc' + is a utility included in the POSIX P1003.2/D11 draft standard. + This version does not use the historical method of having bc + be a compiler for the dc calculator (the POSIX document doesn't + specify how bc must be implemented). This version has a single + executable that both compiles the language and runs the resulting + 'byte code.' The byte code is not the dc language. + + http://www.gnu.org/software/bc diff --git a/package/bc/bc.hash b/package/bc/bc.hash new file mode 100644 index 0000000000..5f1ed63536 --- /dev/null +++ b/package/bc/bc.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7ee4abbcfac03d8a6e1a8a3440558a3d239d6b858585063e745c760957725ecc bc-1.06.95.tar.bz2 diff --git a/package/bc/bc.mk b/package/bc/bc.mk new file mode 100644 index 0000000000..8f3e08dda6 --- /dev/null +++ b/package/bc/bc.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# bc +# +################################################################################ + +BC_VERSION = 1.06.95 +BC_SOURCE = bc-$(BC_VERSION).tar.bz2 +BC_SITE = http://alpha.gnu.org/gnu/bc +BC_DEPENDENCIES = host-flex +BC_LICENSE = GPLv2+, LGPLv2.1+ +BC_LICENSE_FILES = COPYING COPYING.LIB + +# Build after busybox so target ends up with bc's "dc" version +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +BC_DEPENDENCIES += busybox +endif + +$(eval $(autotools-package)) diff --git a/package/bcache-tools/0001-Don-t-inline-crc64-for-gcc-5-compatability.patch b/package/bcache-tools/0001-Don-t-inline-crc64-for-gcc-5-compatability.patch new file mode 100644 index 0000000000..1a437a84fb --- /dev/null +++ b/package/bcache-tools/0001-Don-t-inline-crc64-for-gcc-5-compatability.patch @@ -0,0 +1,35 @@ +Don't inline crc64 for gcc-5 compatability + +This patch is backported from Debian and it fixes the following error: + +bcache.c:125:9: warning: 'crc_table' is static but used in inline +function 'crc64' which is not static +... +make-bcache.c:277: undefined reference to `crc64' + +Signed-off-by: Vicente Olivert Riera + +From: David Mohr +Date: Tue, 26 May 2015 20:34:31 -0600 +Subject: Don't inline crc64 for gcc-5 compatability + +Forwarded: http://article.gmane.org/gmane.linux.kernel.bcache.devel/2919 + +By James Cowgill, see Debian bug #777798 +--- + bcache.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bcache.c b/bcache.c +index 8f37445..8b4b986 100644 +--- a/bcache.c ++++ b/bcache.c +@@ -115,7 +115,7 @@ static const uint64_t crc_table[256] = { + 0x9AFCE626CE85B507ULL + }; + +-inline uint64_t crc64(const void *_data, size_t len) ++uint64_t crc64(const void *_data, size_t len) + { + uint64_t crc = 0xFFFFFFFFFFFFFFFFULL; + const unsigned char *data = _data; diff --git a/package/bcache-tools/Config.in b/package/bcache-tools/Config.in new file mode 100644 index 0000000000..ee5f1f273a --- /dev/null +++ b/package/bcache-tools/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_BCACHE_TOOLS + bool "bcache tools" + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_USE_WCHAR # util-linux + depends on BR2_USE_MMU # util-linux (libblkid) + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + help + Bcache is a Linux kernel block layer cache. It allows one or + more fast disk drives such as flash-based solid state drives (SSDs) + to act as a cache for one or more slower hard disk drives. + + http://bcache.evilpiepirate.org/ + + This is the user space bcache tools, required to setup the linux + bcache feature of the Linux kernel. + +comment "bcache-tools needs udev /dev management and a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_PACKAGE_HAS_UDEV || !BR2_USE_WCHAR diff --git a/package/bcache-tools/bcache-tools.hash b/package/bcache-tools/bcache-tools.hash new file mode 100644 index 0000000000..6d3502fc29 --- /dev/null +++ b/package/bcache-tools/bcache-tools.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d56923936f37287efc57a46315679102ef2c86cd0be5874590320acd48c1201c bcache-tools-v1.0.8.tar.gz diff --git a/package/bcache-tools/bcache-tools.mk b/package/bcache-tools/bcache-tools.mk new file mode 100644 index 0000000000..09604f6bf5 --- /dev/null +++ b/package/bcache-tools/bcache-tools.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# bcache-tools +# +################################################################################ + +BCACHE_TOOLS_VERSION = v1.0.8 +BCACHE_TOOLS_SITE = $(call github,g2p,bcache-tools,$(BCACHE_TOOLS_VERSION)) +BCACHE_TOOLS_LICENSE = GPLv2 +BCACHE_TOOLS_LICENSE_FILES = COPYING +BCACHE_TOOLS_DEPENDENCIES = host-pkgconf util-linux + +# We pass $(TARGET_CONFIGURE_OPTS) as environment variable to allow +# the bcache-tools Makefile to alter CFLAGS +define BCACHE_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +# The bcache-tools Makefile expects the man8 directory to exist +# expects the /lib/udev/rules.d directory to exist. +define BCACHE_TOOLS_CREATE_MISSING_DIRS + $(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/share/man/man8 + $(INSTALL) -m 0755 -d $(TARGET_DIR)/lib/udev/rules.d +endef + +BCACHE_TOOLS_PRE_INSTALL_TARGET_HOOKS += BCACHE_TOOLS_CREATE_MISSING_DIRS + +define BCACHE_TOOLS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/bcm2835/Config.in b/package/bcm2835/Config.in new file mode 100644 index 0000000000..4c3eb2cbfc --- /dev/null +++ b/package/bcm2835/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_BCM2835 + bool "bcm2835" + depends on BR2_arm + help + C library for Broadcom BCM 2835 as used in Raspberry Pi. + It provides access to GPIO and other IO functions on the + Broadcom BCM 2835 chip, allowing access to the GPIO pins + on the 26 pin IDE plug on the RPi board so you can control + and interface with various external devices. + + WARNING: the opinion of the Buildroot developers is that + such library is a complete abomination as it entirely works + around the standard Linux interfaces to access GPIOs, I2C, + SPI busses or other IOs. The library directly remaps the + hardware registers in user-space, completely bypassing what + the kernel drivers are doing, and potentially conflicting + with them. + + http://www.airspayce.com/mikem/bcm2835 diff --git a/package/bcm2835/bcm2835.hash b/package/bcm2835/bcm2835.hash new file mode 100644 index 0000000000..1aea3ae3dd --- /dev/null +++ b/package/bcm2835/bcm2835.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 295f66dab533592ce41db8e07befe985645a2e661bbf75dce9c383e61e24cb5f bcm2835-1.48.tar.gz diff --git a/package/bcm2835/bcm2835.mk b/package/bcm2835/bcm2835.mk new file mode 100644 index 0000000000..c111a0ad5d --- /dev/null +++ b/package/bcm2835/bcm2835.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# bcm2835 +# +################################################################################ + +BCM2835_VERSION = 1.48 +BCM2835_SITE = http://www.airspayce.com/mikem/bcm2835 +BCM2835_LICENSE = GPLv2 +BCM2835_LICENSE_FILES = COPYING +BCM2835_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/bcusdk/0001-Do-not-use-the-non-standard-sys-cdefs.h-header.patch b/package/bcusdk/0001-Do-not-use-the-non-standard-sys-cdefs.h-header.patch new file mode 100644 index 0000000000..fc64386ca6 --- /dev/null +++ b/package/bcusdk/0001-Do-not-use-the-non-standard-sys-cdefs.h-header.patch @@ -0,0 +1,48 @@ +From c36db3f798bf576f42d81a0c51198b17d7112e8c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 8 Aug 2015 17:43:28 +0200 +Subject: [PATCH] Do not use the non-standard header + + is glibc-specific, and should be used only internally by +glibc, not by external libraries/programs. It is not available in all +standard C libraries. + +Submitted upstream: https://sourceforge.net/p/bcusdk/patches/3/ + +Signed-off-by: Thomas Petazzoni +--- + eibd/include/eibclient.h | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/eibd/include/eibclient.h b/eibd/include/eibclient.h +index 2781878..b095a1c 100644 +--- a/eibd/include/eibclient.h ++++ b/eibd/include/eibclient.h +@@ -27,10 +27,11 @@ + #ifndef EIBCLIENT_H + #define EIBCLIENT_H + +-#include + #include + +-__BEGIN_DECLS; ++#ifdef __cplusplus ++extern "C" { ++#endif + + #include "eibloadresult.h" + +@@ -889,5 +890,9 @@ int EIB_Cache_LastUpdates_async (EIBConnection * con, uint16_t start, + uint16_t * end); + + +-__END_DECLS ++ ++#ifdef __cplusplus ++} ++#endif ++ + #endif +-- +2.5.0 + diff --git a/package/bcusdk/0002-fd_set-requires-inclusion-of-sys-select.h.patch b/package/bcusdk/0002-fd_set-requires-inclusion-of-sys-select.h.patch new file mode 100644 index 0000000000..723de5c1a2 --- /dev/null +++ b/package/bcusdk/0002-fd_set-requires-inclusion-of-sys-select.h.patch @@ -0,0 +1,31 @@ +From 2541ee3d709803096b17e45610ccc1404e2e5eee Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 8 Aug 2015 17:46:34 +0200 +Subject: [PATCH] fd_set requires inclusion of + +According to POSIX.1-2001, the definition fd_set and related macros is +in , so it should be included in files using fd_set to +make the code compatible with all standard C libraries. + +Submitted upstream: https://sourceforge.net/p/bcusdk/patches/3/ + +Signed-off-by: Thomas Petazzoni +--- + eibd/examples/common.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/eibd/examples/common.h b/eibd/examples/common.h +index 51fc514..f038da1 100644 +--- a/eibd/examples/common.h ++++ b/eibd/examples/common.h +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include "eibclient.h" + + /** unsigned char*/ +-- +2.5.0 + diff --git a/package/bcusdk/Config.in b/package/bcusdk/Config.in new file mode 100644 index 0000000000..8f9330e0d1 --- /dev/null +++ b/package/bcusdk/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_BCUSDK + bool "bcusdk" + depends on BR2_USE_MMU # libpthsem + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_LIBPTHSEM + select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL + help + A free development environment for the Bus Coupling Units of + the European Installation Bus. + + The European Installation Bus EIB is a home and building + automation bus system. It is optimized for low-speed control + applications like lighting and blinds control. + + BCUs (Bus Coupling Units) are standardized, generic + platforms for embedded EIB devices. They include the entire + physical layer network interface, power supply and a + microcontroller with an implementation of the EIB protocol + stack stored in the ROM. + + http://www.auto.tuwien.ac.at/~mkoegler/eib/ + +comment "bcusdk needs a toolchain w/ C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/bcusdk/bcusdk.hash b/package/bcusdk/bcusdk.hash new file mode 100644 index 0000000000..219498bcbb --- /dev/null +++ b/package/bcusdk/bcusdk.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 014cdaafc36f223c584b39ae5d698dd037a8e15aba4e78a2e531b51ff1331304 bcusdk_0.0.5.tar.gz diff --git a/package/bcusdk/bcusdk.mk b/package/bcusdk/bcusdk.mk new file mode 100644 index 0000000000..697b5ce237 --- /dev/null +++ b/package/bcusdk/bcusdk.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# bcusdk +# +################################################################################ + +BCUSDK_VERSION = 0.0.5 +BCUSDK_SOURCE = bcusdk_$(BCUSDK_VERSION).tar.gz +BCUSDK_SITE = http://www.auto.tuwien.ac.at/~mkoegler/eib +BCUSDK_LICENSE = GPLv2+ +BCUSDK_LICENSE_FILES = COPYING +BCUSDK_INSTALL_STAGING = YES +BCUSDK_CONF_OPTS = \ + --enable-onlyeibd \ + --enable-ft12 \ + --enable-pei16 \ + --enable-eibnetip \ + --enable-eibnetipserver \ + --enable-eibnetiptunnel \ + --without-pth-test \ + --with-pth=$(STAGING_DIR)/usr + +BCUSDK_DEPENDENCIES = \ + libpthsem \ + $(if $(BR2_PACKAGE_ARGP_STANDALONE),argp-standalone) + + +define BCUSDK_REMOVE_EXAMPLES + $(RM) -rf $(TARGET_DIR)/usr/share/bcusdk +endef + +BCUSDK_POST_INSTALL_TARGET_HOOKS += BCUSDK_REMOVE_EXAMPLES + +$(eval $(autotools-package)) diff --git a/package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch b/package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch new file mode 100644 index 0000000000..393ad9039a --- /dev/null +++ b/package/bdwgc/0001-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch @@ -0,0 +1,28 @@ +configure.ac: add check for NO_GETCONTEXT definition + +Signed-off-by: Samuel Martin +[yann.morin.1998@free.fr: add a comment, change variable name, use + AS_IF, remove debug traces, use AC_CHECK_FUNCS (as suggested by + Thomas)] +Signed-off-by: "Yann E. MORIN" +Cc: Thomas Petazzoni + +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +--- bdwgc-7.2f.orig/configure.ac 2014-06-01 19:00:47.000000000 +0200 ++++ bdwgc-7.2f/configure.ac 2014-12-23 14:13:11.585716713 +0100 +@@ -365,6 +365,12 @@ + AC_MSG_RESULT($ac_cv_fno_strict_aliasing) + fi + ++# Check for getcontext (uClibc can be configured without it, for example) ++AC_CHECK_FUNCS([getcontext]) ++AS_IF([test "$ac_cv_func_getcontext" = "no"], ++ [CFLAGS="$CFLAGS -DNO_GETCONTEXT" ++ CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"]) ++ + case "$host" in + # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64 + # and unnecessary everywhere. diff --git a/package/bdwgc/0002-Do-not-include-sigcontext.h-and-asm-sigcontext.h.patch b/package/bdwgc/0002-Do-not-include-sigcontext.h-and-asm-sigcontext.h.patch new file mode 100644 index 0000000000..40c9063103 --- /dev/null +++ b/package/bdwgc/0002-Do-not-include-sigcontext.h-and-asm-sigcontext.h.patch @@ -0,0 +1,61 @@ +From c887470e0e3310c81ecdb7e736bc5d2ead45db2a Mon Sep 17 00:00:00 2001 +From: Ivan Maidanski +Date: Mon, 6 Apr 2015 20:06:47 +0300 +Subject: [PATCH 1/1] Do not include sigcontext.h and asm/sigcontext.h (these + Linux headers define sigcontext which is no longer used as replaced with + ucontext_t in GC 7.0alpha1) + +* os_dep.c: Do not include linux/version.h (do not test +LINUX_VERSION_CODE), asm/signal.h, sigcontext.h, asm/sigcontext.h +since struct sigcontext not used in GC v7+. + +Signed-off-by: Brendan Heading +Upstream-status: backport +--- + os_dep.c | 30 ------------------------------ + 1 file changed, 30 deletions(-) + +diff --git a/os_dep.c b/os_dep.c +index f62d4ed..a1bafbd 100644 +--- a/os_dep.c ++++ b/os_dep.c +@@ -16,36 +16,6 @@ + + #include "private/gc_priv.h" + +-#if defined(LINUX) && !defined(POWERPC) && !defined(NO_SIGCONTEXT_H) +-# include +-# if (LINUX_VERSION_CODE <= 0x10400) +- /* Ugly hack to get struct sigcontext_struct definition. Required */ +- /* for some early 1.3.X releases. Will hopefully go away soon. */ +- /* in some later Linux releases, asm/sigcontext.h may have to */ +- /* be included instead. */ +-# define __KERNEL__ +-# include +-# undef __KERNEL__ +-# else +- /* Kernels prior to 2.1.1 defined struct sigcontext_struct instead of */ +- /* struct sigcontext. libc6 (glibc2) uses "struct sigcontext" in */ +- /* prototypes, so we have to include the top-level sigcontext.h to */ +- /* make sure the former gets defined to be the latter if appropriate. */ +-# include +-# if 2 <= __GLIBC__ +-# if 2 == __GLIBC__ && 0 == __GLIBC_MINOR__ +- /* glibc 2.1 no longer has sigcontext.h. But signal.h */ +- /* has the right declaration for glibc 2.1. */ +-# include +-# endif /* 0 == __GLIBC_MINOR__ */ +-# else /* __GLIBC__ < 2 */ +- /* libc5 doesn't have : go directly with the kernel */ +- /* one. Check LINUX_VERSION_CODE to see which we should reference. */ +-# include +-# endif /* __GLIBC__ < 2 */ +-# endif +-#endif /* LINUX && !POWERPC */ +- + #if !defined(OS2) && !defined(PCR) && !defined(AMIGA) && !defined(MACOS) \ + && !defined(MSWINCE) && !defined(__CC_ARM) + # include +-- +2.4.3 + diff --git a/package/bdwgc/0003-Revert-Move-asm-machine-dependent-files-to-src-folde.patch b/package/bdwgc/0003-Revert-Move-asm-machine-dependent-files-to-src-folde.patch new file mode 100644 index 0000000000..03af6a3990 --- /dev/null +++ b/package/bdwgc/0003-Revert-Move-asm-machine-dependent-files-to-src-folde.patch @@ -0,0 +1,424 @@ +Signed-off-by: Waldemar Brodkorb + +From 5e756d4d8df2949cb3b6e51532d3016cbb276fd7 Mon Sep 17 00:00:00 2001 +From: Ivan Maidanski +Date: Fri, 27 Feb 2015 21:32:22 +0300 +Subject: [PATCH 004/135] Revert "Move asm machine-dependent files to 'src' + folder" (partly) + +Asm files moved back to base folder to avoid build issues (reported +for NetBSD and Solaris on Sparc). Alternative way is to adjust +configure.ac and Makefile.am properly but it requires more efforts +(including testing). + +* Makefile.am (EXTRA_libgc_la_SOURCES): Remove "src/" prefix. +* Makefile.direct (SRCS, mach_dep.o): Likewise. +* src/ia64_save_regs_in_stack.s: Move to base folder. +* src/sparc_mach_dep.S: Likewise. +* src/sparc_netbsd_mach_dep.s: Likewise. +* src/sparc_sunos4_mach_dep.s: Likewise. + +--- + Makefile.am | 4 +-- + Makefile.direct | 20 +++++++------- + ia64_save_regs_in_stack.s | 11 ++++++++ + sparc_mach_dep.S | 61 +++++++++++++++++++++++++++++++++++++++++ + sparc_netbsd_mach_dep.s | 34 +++++++++++++++++++++++ + sparc_sunos4_mach_dep.s | 32 +++++++++++++++++++++ + src/ia64_save_regs_in_stack.s | 11 -------- + src/sparc_mach_dep.S | 61 ----------------------------------------- + src/sparc_netbsd_mach_dep.s | 34 ----------------------- + src/sparc_sunos4_mach_dep.s | 32 --------------------- + 11 files changed, 151 insertions(+), 151 deletions(-) + create mode 100644 ia64_save_regs_in_stack.s + create mode 100644 sparc_mach_dep.S + create mode 100644 sparc_netbsd_mach_dep.s + create mode 100644 sparc_sunos4_mach_dep.s + delete mode 100644 src/ia64_save_regs_in_stack.s + delete mode 100644 src/sparc_mach_dep.S + delete mode 100644 src/sparc_netbsd_mach_dep.s + delete mode 100644 src/sparc_sunos4_mach_dep.s + +diff --git a/Makefile.am b/Makefile.am +index f8057db..1688be2 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -100,8 +100,8 @@ libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS) $(ATOMIC_OPS_LIBS) + libgc_la_DEPENDENCIES = @addobjs@ + libgc_la_LDFLAGS = $(extra_ldflags_libgc) -version-info 1:3:0 -no-undefined + +-EXTRA_libgc_la_SOURCES = src/ia64_save_regs_in_stack.s src/sparc_mach_dep.S \ +- src/sparc_netbsd_mach_dep.s src/sparc_sunos4_mach_dep.s ++EXTRA_libgc_la_SOURCES = ia64_save_regs_in_stack.s sparc_mach_dep.S \ ++ sparc_netbsd_mach_dep.s sparc_sunos4_mach_dep.s + + + # C++ Interface +diff --git a/Makefile.direct b/Makefile.direct +index d64598b..8ab80e8 100644 +--- a/Makefile.direct ++++ b/Makefile.direct +@@ -108,8 +108,8 @@ SRCS= $(CSRCS) \ + include/gc_config_macros.h include/private/pthread_support.h \ + include/private/pthread_stop_world.h include/private/darwin_semaphore.h \ + include/private/darwin_stop_world.h include/private/thread_local_alloc.h \ +- src/ia64_save_regs_in_stack.s src/sparc_mach_dep.S \ +- src/sparc_netbsd_mach_dep.s src/sparc_sunos4_mach_dep.s $(CORD_SRCS) ++ ia64_save_regs_in_stack.s sparc_mach_dep.S \ ++ sparc_netbsd_mach_dep.s sparc_sunos4_mach_dep.s $(CORD_SRCS) + + DOC_FILES= README.QUICK TODO doc/README.Mac doc/README.OS2 \ + doc/README.amiga doc/README.cords doc/debugging.html \ +@@ -309,17 +309,17 @@ dyn_test: + # gcc -shared -Wl,-soname=libgc.so.0 -o libgc.so.0 $(LIBOBJS) dyn_load.lo + # touch liblinuxgc.so + +-mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/src/sparc_mach_dep.S \ +- $(srcdir)/src/sparc_sunos4_mach_dep.s \ +- $(srcdir)/src/ia64_save_regs_in_stack.s \ +- $(srcdir)/src/sparc_netbsd_mach_dep.s $(UTILS) ++mach_dep.o: $(srcdir)/mach_dep.c $(srcdir)/sparc_mach_dep.S \ ++ $(srcdir)/sparc_sunos4_mach_dep.s \ ++ $(srcdir)/ia64_save_regs_in_stack.s \ ++ $(srcdir)/sparc_netbsd_mach_dep.s $(UTILS) + rm -f mach_dep.o +- ./if_mach SPARC SOLARIS $(CC) -c -o mach_dep2.o $(srcdir)/src/sparc_mach_dep.S +- ./if_mach SPARC OPENBSD $(AS) -o mach_dep2.o $(srcdir)/src/sparc_sunos4_mach_dep.s +- ./if_mach SPARC NETBSD $(AS) -o mach_dep2.o $(srcdir)/src/sparc_netbsd_mach_dep.s ++ ./if_mach SPARC SOLARIS $(CC) -c -o mach_dep2.o $(srcdir)/sparc_mach_dep.S ++ ./if_mach SPARC OPENBSD $(AS) -o mach_dep2.o $(srcdir)/sparc_sunos4_mach_dep.s ++ ./if_mach SPARC NETBSD $(AS) -o mach_dep2.o $(srcdir)/sparc_netbsd_mach_dep.s + ./if_mach SPARC "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c + ./if_mach SPARC "" ld -r -o mach_dep.o mach_dep1.o mach_dep2.o +- ./if_mach IA64 "" as $(AS_ABI_FLAG) -o ia64_save_regs_in_stack.o $(srcdir)/src/ia64_save_regs_in_stack.s ++ ./if_mach IA64 "" as $(AS_ABI_FLAG) -o ia64_save_regs_in_stack.o $(srcdir)/ia64_save_regs_in_stack.s + ./if_mach IA64 "" $(CC) -c -o mach_dep1.o $(SPECIALCFLAGS) $(srcdir)/mach_dep.c + ./if_mach IA64 "" ld -r -o mach_dep.o mach_dep1.o ia64_save_regs_in_stack.o + ./if_not_there mach_dep.o $(CC) -c $(SPECIALCFLAGS) $(srcdir)/mach_dep.c +diff --git a/ia64_save_regs_in_stack.s b/ia64_save_regs_in_stack.s +new file mode 100644 +index 0000000..2b81edf +--- /dev/null ++++ b/ia64_save_regs_in_stack.s +@@ -0,0 +1,11 @@ ++ .text ++ .align 16 ++ .global GC_save_regs_in_stack ++ .proc GC_save_regs_in_stack ++GC_save_regs_in_stack: ++ .body ++ flushrs ++ ;; ++ mov r8=ar.bsp ++ br.ret.sptk.few rp ++ .endp GC_save_regs_in_stack +diff --git a/sparc_mach_dep.S b/sparc_mach_dep.S +new file mode 100644 +index 0000000..d204dc4 +--- /dev/null ++++ b/sparc_mach_dep.S +@@ -0,0 +1,61 @@ ++! SPARCompiler 3.0 and later apparently no longer handles ++! asm outside functions. So we need a separate .s file ++! This is only set up for SunOS 5, not SunOS 4. ++! Assumes this is called before the stack contents are ++! examined. ++ ++ .seg "text" ++ .globl GC_save_regs_in_stack ++GC_save_regs_in_stack: ++#if defined(__arch64__) || defined(__sparcv9) ++ save %sp,-128,%sp ++ flushw ++ ret ++ restore %sp,2047+128,%o0 ++#else /* 32 bit SPARC */ ++ ta 0x3 ! ST_FLUSH_WINDOWS ++ mov %sp,%o0 ++ retl ++ nop ++#endif /* 32 bit SPARC */ ++.GC_save_regs_in_stack_end: ++ .size GC_save_regs_in_stack,.GC_save_regs_in_stack_end-GC_save_regs_in_stack ++ ++! GC_clear_stack_inner(arg, limit) clears stack area up to limit and ++! returns arg. Stack clearing is crucial on SPARC, so we supply ++! an assembly version that s more careful. Assumes limit is hotter ++! than sp, and limit is 8 byte aligned. ++ .globl GC_clear_stack_inner ++GC_clear_stack_inner: ++#if defined(__arch64__) || defined(__sparcv9) ++ mov %sp,%o2 ! Save sp ++ add %sp,2047-8,%o3 ! p = sp+bias-8 ++ add %o1,-2047-192,%sp ! Move sp out of the way, ++ ! so that traps still work. ++ ! Includes some extra words ++ ! so we can be sloppy below. ++loop: ++ stx %g0,[%o3] ! *(long *)p = 0 ++ cmp %o3,%o1 ++ bgu,pt %xcc, loop ! if (p > limit) goto loop ++ add %o3,-8,%o3 ! p -= 8 (delay slot) ++ retl ++ mov %o2,%sp ! Restore sp., delay slot ++#else /* 32 bit SPARC */ ++ mov %sp,%o2 ! Save sp ++ add %sp,-8,%o3 ! p = sp-8 ++ clr %g1 ! [g0,g1] = 0 ++ add %o1,-0x60,%sp ! Move sp out of the way, ++ ! so that traps still work. ++ ! Includes some extra words ++ ! so we can be sloppy below. ++loop: ++ std %g0,[%o3] ! *(long long *)p = 0 ++ cmp %o3,%o1 ++ bgu loop ! if (p > limit) goto loop ++ add %o3,-8,%o3 ! p -= 8 (delay slot) ++ retl ++ mov %o2,%sp ! Restore sp., delay slot ++#endif /* 32 bit SPARC */ ++.GC_clear_stack_inner_end: ++ .size GC_clear_stack_inner,.GC_clear_stack_inner_end-GC_clear_stack_inner +diff --git a/sparc_netbsd_mach_dep.s b/sparc_netbsd_mach_dep.s +new file mode 100644 +index 0000000..14feb15 +--- /dev/null ++++ b/sparc_netbsd_mach_dep.s +@@ -0,0 +1,34 @@ ++! SPARCompiler 3.0 and later apparently no longer handles ++! asm outside functions. So we need a separate .s file ++! This is only set up for SunOS 4. ++! Assumes this is called before the stack contents are ++! examined. ++ ++#include "machine/asm.h" ++ ++ .seg "text" ++ .globl _C_LABEL(GC_save_regs_in_stack) ++ .globl _C_LABEL(GC_push_regs) ++_C_LABEL(GC_save_regs_in_stack): ++_C_LABEL(GC_push_regs): ++ ta 0x3 ! ST_FLUSH_WINDOWS ++ mov %sp,%o0 ++ retl ++ nop ++ ++ .globl _C_LABEL(GC_clear_stack_inner) ++_C_LABEL(GC_clear_stack_inner): ++ mov %sp,%o2 ! Save sp ++ add %sp,-8,%o3 ! p = sp-8 ++ clr %g1 ! [g0,g1] = 0 ++ add %o1,-0x60,%sp ! Move sp out of the way, ++ ! so that traps still work. ++ ! Includes some extra words ++ ! so we can be sloppy below. ++loop: ++ std %g0,[%o3] ! *(long long *)p = 0 ++ cmp %o3,%o1 ++ bgu loop ! if (p > limit) goto loop ++ add %o3,-8,%o3 ! p -= 8 (delay slot) ++ retl ++ mov %o2,%sp ! Restore sp., delay slot +diff --git a/sparc_sunos4_mach_dep.s b/sparc_sunos4_mach_dep.s +new file mode 100644 +index 0000000..923f5ea +--- /dev/null ++++ b/sparc_sunos4_mach_dep.s +@@ -0,0 +1,32 @@ ++! SPARCompiler 3.0 and later apparently no longer handles ++! asm outside functions. So we need a separate .s file ++! This is only set up for SunOS 4. ++! Assumes this is called before the stack contents are ++! examined. ++ ++ .seg "text" ++ .globl _GC_save_regs_in_stack ++ .globl _GC_push_regs ++_GC_save_regs_in_stack: ++_GC_push_regs: ++ ta 0x3 ! ST_FLUSH_WINDOWS ++ mov %sp,%o0 ++ retl ++ nop ++ ++ .globl _GC_clear_stack_inner ++_GC_clear_stack_inner: ++ mov %sp,%o2 ! Save sp ++ add %sp,-8,%o3 ! p = sp-8 ++ clr %g1 ! [g0,g1] = 0 ++ add %o1,-0x60,%sp ! Move sp out of the way, ++ ! so that traps still work. ++ ! Includes some extra words ++ ! so we can be sloppy below. ++loop: ++ std %g0,[%o3] ! *(long long *)p = 0 ++ cmp %o3,%o1 ++ bgu loop ! if (p > limit) goto loop ++ add %o3,-8,%o3 ! p -= 8 (delay slot) ++ retl ++ mov %o2,%sp ! Restore sp., delay slot +diff --git a/src/ia64_save_regs_in_stack.s b/src/ia64_save_regs_in_stack.s +deleted file mode 100644 +index 2b81edf..0000000 +--- a/src/ia64_save_regs_in_stack.s ++++ /dev/null +@@ -1,11 +0,0 @@ +- .text +- .align 16 +- .global GC_save_regs_in_stack +- .proc GC_save_regs_in_stack +-GC_save_regs_in_stack: +- .body +- flushrs +- ;; +- mov r8=ar.bsp +- br.ret.sptk.few rp +- .endp GC_save_regs_in_stack +diff --git a/src/sparc_mach_dep.S b/src/sparc_mach_dep.S +deleted file mode 100644 +index d204dc4..0000000 +--- a/src/sparc_mach_dep.S ++++ /dev/null +@@ -1,61 +0,0 @@ +-! SPARCompiler 3.0 and later apparently no longer handles +-! asm outside functions. So we need a separate .s file +-! This is only set up for SunOS 5, not SunOS 4. +-! Assumes this is called before the stack contents are +-! examined. +- +- .seg "text" +- .globl GC_save_regs_in_stack +-GC_save_regs_in_stack: +-#if defined(__arch64__) || defined(__sparcv9) +- save %sp,-128,%sp +- flushw +- ret +- restore %sp,2047+128,%o0 +-#else /* 32 bit SPARC */ +- ta 0x3 ! ST_FLUSH_WINDOWS +- mov %sp,%o0 +- retl +- nop +-#endif /* 32 bit SPARC */ +-.GC_save_regs_in_stack_end: +- .size GC_save_regs_in_stack,.GC_save_regs_in_stack_end-GC_save_regs_in_stack +- +-! GC_clear_stack_inner(arg, limit) clears stack area up to limit and +-! returns arg. Stack clearing is crucial on SPARC, so we supply +-! an assembly version that s more careful. Assumes limit is hotter +-! than sp, and limit is 8 byte aligned. +- .globl GC_clear_stack_inner +-GC_clear_stack_inner: +-#if defined(__arch64__) || defined(__sparcv9) +- mov %sp,%o2 ! Save sp +- add %sp,2047-8,%o3 ! p = sp+bias-8 +- add %o1,-2047-192,%sp ! Move sp out of the way, +- ! so that traps still work. +- ! Includes some extra words +- ! so we can be sloppy below. +-loop: +- stx %g0,[%o3] ! *(long *)p = 0 +- cmp %o3,%o1 +- bgu,pt %xcc, loop ! if (p > limit) goto loop +- add %o3,-8,%o3 ! p -= 8 (delay slot) +- retl +- mov %o2,%sp ! Restore sp., delay slot +-#else /* 32 bit SPARC */ +- mov %sp,%o2 ! Save sp +- add %sp,-8,%o3 ! p = sp-8 +- clr %g1 ! [g0,g1] = 0 +- add %o1,-0x60,%sp ! Move sp out of the way, +- ! so that traps still work. +- ! Includes some extra words +- ! so we can be sloppy below. +-loop: +- std %g0,[%o3] ! *(long long *)p = 0 +- cmp %o3,%o1 +- bgu loop ! if (p > limit) goto loop +- add %o3,-8,%o3 ! p -= 8 (delay slot) +- retl +- mov %o2,%sp ! Restore sp., delay slot +-#endif /* 32 bit SPARC */ +-.GC_clear_stack_inner_end: +- .size GC_clear_stack_inner,.GC_clear_stack_inner_end-GC_clear_stack_inner +diff --git a/src/sparc_netbsd_mach_dep.s b/src/sparc_netbsd_mach_dep.s +deleted file mode 100644 +index 14feb15..0000000 +--- a/src/sparc_netbsd_mach_dep.s ++++ /dev/null +@@ -1,34 +0,0 @@ +-! SPARCompiler 3.0 and later apparently no longer handles +-! asm outside functions. So we need a separate .s file +-! This is only set up for SunOS 4. +-! Assumes this is called before the stack contents are +-! examined. +- +-#include "machine/asm.h" +- +- .seg "text" +- .globl _C_LABEL(GC_save_regs_in_stack) +- .globl _C_LABEL(GC_push_regs) +-_C_LABEL(GC_save_regs_in_stack): +-_C_LABEL(GC_push_regs): +- ta 0x3 ! ST_FLUSH_WINDOWS +- mov %sp,%o0 +- retl +- nop +- +- .globl _C_LABEL(GC_clear_stack_inner) +-_C_LABEL(GC_clear_stack_inner): +- mov %sp,%o2 ! Save sp +- add %sp,-8,%o3 ! p = sp-8 +- clr %g1 ! [g0,g1] = 0 +- add %o1,-0x60,%sp ! Move sp out of the way, +- ! so that traps still work. +- ! Includes some extra words +- ! so we can be sloppy below. +-loop: +- std %g0,[%o3] ! *(long long *)p = 0 +- cmp %o3,%o1 +- bgu loop ! if (p > limit) goto loop +- add %o3,-8,%o3 ! p -= 8 (delay slot) +- retl +- mov %o2,%sp ! Restore sp., delay slot +diff --git a/src/sparc_sunos4_mach_dep.s b/src/sparc_sunos4_mach_dep.s +deleted file mode 100644 +index 923f5ea..0000000 +--- a/src/sparc_sunos4_mach_dep.s ++++ /dev/null +@@ -1,32 +0,0 @@ +-! SPARCompiler 3.0 and later apparently no longer handles +-! asm outside functions. So we need a separate .s file +-! This is only set up for SunOS 4. +-! Assumes this is called before the stack contents are +-! examined. +- +- .seg "text" +- .globl _GC_save_regs_in_stack +- .globl _GC_push_regs +-_GC_save_regs_in_stack: +-_GC_push_regs: +- ta 0x3 ! ST_FLUSH_WINDOWS +- mov %sp,%o0 +- retl +- nop +- +- .globl _GC_clear_stack_inner +-_GC_clear_stack_inner: +- mov %sp,%o2 ! Save sp +- add %sp,-8,%o3 ! p = sp-8 +- clr %g1 ! [g0,g1] = 0 +- add %o1,-0x60,%sp ! Move sp out of the way, +- ! so that traps still work. +- ! Includes some extra words +- ! so we can be sloppy below. +-loop: +- std %g0,[%o3] ! *(long long *)p = 0 +- cmp %o3,%o1 +- bgu loop ! if (p > limit) goto loop +- add %o3,-8,%o3 ! p -= 8 (delay slot) +- retl +- mov %o2,%sp ! Restore sp., delay slot +-- +1.7.10.4 + diff --git a/package/bdwgc/Config.in b/package/bdwgc/Config.in new file mode 100644 index 0000000000..95139efb93 --- /dev/null +++ b/package/bdwgc/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_BDWGC + bool "bdwgc" + depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS + select BR2_PACKAGE_LIBATOMIC_OPS + help + The Boehm-Demers-Weiser conservative garbage collector can + be used as a garbage collecting replacement for C 'malloc' + or C++ 'new'. + + http://www.hboehm.info/gc/ diff --git a/package/bdwgc/bdwgc.hash b/package/bdwgc/bdwgc.hash new file mode 100644 index 0000000000..44414e4efa --- /dev/null +++ b/package/bdwgc/bdwgc.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 63320ad7c45460e4a40e03f5aa4c6893783f21a16416c3282b994f933312afa2 gc-7.4.2.tar.gz diff --git a/package/bdwgc/bdwgc.mk b/package/bdwgc/bdwgc.mk new file mode 100644 index 0000000000..4603151166 --- /dev/null +++ b/package/bdwgc/bdwgc.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# bdwgc +# +################################################################################ + +BDWGC_VERSION = 7.4.2 +BDWGC_SOURCE = gc-$(BDWGC_VERSION).tar.gz +BDWGC_SITE = http://www.hboehm.info/gc/gc_source +BDWGC_INSTALL_STAGING = YES +BDWGC_LICENSE = bdwgc license +BDWGC_LICENSE_FILES = README.QUICK +BDWGC_DEPENDENCIES = libatomic_ops host-pkgconf + +# The libtool shipped with the package is bogus and generates some +# -L/usr/lib flags. It uses a version not supported by Buildroot +# libtool patches, so autoreconfiguring the packages is the easiest +# solution. +BDWGC_AUTORECONF = YES + +BDWGC_CFLAGS = $(TARGET_CFLAGS) +ifeq ($(BR2_sparc),y) +BDWGC_CFLAGS += -DAO_NO_SPARC_V9 +endif +ifeq ($(BR2_STATIC_LIBS),y) +BDWGC_CFLAGS += -DGC_NO_DLOPEN +endif + +# Ensure we use the system libatomic_ops, and not the internal one. +BDWGC_CONF_OPTS = --with-libatomic-ops=yes CFLAGS="$(BDWGC_CFLAGS)" +HOST_BDWGC_CONF_OPTS = --with-libatomic-ops=yes + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/beecrypt/0001-cppglue.cxx-cplusplus-only.patch b/package/beecrypt/0001-cppglue.cxx-cplusplus-only.patch new file mode 100644 index 0000000000..298e3eba93 --- /dev/null +++ b/package/beecrypt/0001-cppglue.cxx-cplusplus-only.patch @@ -0,0 +1,28 @@ +Makefile.am: Only compile/link cppglue.cxx if --with-cplusplus is used + +Bloats libbeecrypt for no use and breaks build on systems without a C++ +compiler. + +Signed-off-by: Peter Korsgaard +--- + Makefile.am | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +Index: beecrypt-4.2.1/Makefile.am +=================================================================== +--- beecrypt-4.2.1.orig/Makefile.am ++++ beecrypt-4.2.1/Makefile.am +@@ -62,7 +62,12 @@ + + lib_LTLIBRARIES = libbeecrypt.la + +-libbeecrypt_la_SOURCES = aes.c base64.c beecrypt.c blockmode.c blockpad.c blowfish.c dhies.c dldp.c dlkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha1.c hmacsha224.c hmacsha256.c md4.c md5.c hmacsha384.c hmacsha512.c memchunk.c mp.c mpbarrett.c mpnumber.c mpprime.c mtprng.c pkcs1.c pkcs12.c ripemd128.c ripemd160.c ripemd256.c ripemd320.c rsa.c rsakp.c rsapk.c sha1.c sha224.c sha256.c sha384.c sha512.c sha2k32.c sha2k64.c timestamp.c cppglue.cxx ++libbeecrypt_la_SOURCES = aes.c base64.c beecrypt.c blockmode.c blockpad.c blowfish.c dhies.c dldp.c dlkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha1.c hmacsha224.c hmacsha256.c md4.c md5.c hmacsha384.c hmacsha512.c memchunk.c mp.c mpbarrett.c mpnumber.c mpprime.c mtprng.c pkcs1.c pkcs12.c ripemd128.c ripemd160.c ripemd256.c ripemd320.c rsa.c rsakp.c rsapk.c sha1.c sha224.c sha256.c sha384.c sha512.c sha2k32.c sha2k64.c timestamp.c ++ ++if WITH_CPLUSPLUS ++libbeecrypt_la_SOURCES += cppglue.cxx ++endif ++ + libbeecrypt_la_DEPENDENCIES = $(BEECRYPT_OBJECTS) + libbeecrypt_la_LIBADD = blowfishopt.lo mpopt.lo sha1opt.lo $(OPENMP_LIBS) + libbeecrypt_la_LDFLAGS = -no-undefined -version-info $(LIBBEECRYPT_LT_CURRENT):$(LIBBEECRYPT_LT_REVISION):$(LIBBEECRYPT_LT_AGE) diff --git a/package/beecrypt/0002-icu-check-cross-compile.patch b/package/beecrypt/0002-icu-check-cross-compile.patch new file mode 100644 index 0000000000..cc02116506 --- /dev/null +++ b/package/beecrypt/0002-icu-check-cross-compile.patch @@ -0,0 +1,31 @@ +configure: Use AC_COMPILE_IFELSE for ICU check for cross compilation compat + +AC_RUN_IFELSE doesn't work when cross compiling, but we can do the +check in the preprocessor instead, so use AC_COMPILE_IFELSE instead. + +Signed-off-by: Peter Korsgaard +--- + configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +Index: beecrypt-4.2.1/configure.ac +=================================================================== +--- beecrypt-4.2.1.orig/configure.ac ++++ beecrypt-4.2.1/configure.ac +@@ -295,13 +295,13 @@ + if test "$ac_with_cplusplus" = yes; then + AC_MSG_CHECKING([for IBM's ICU library version >= 2.8]) + AC_LANG_PUSH(C) +- AC_RUN_IFELSE([ ++ AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([[#include ]],[[ + #if U_ICU_VERSION_MAJOR_NUM < 2 +- exit(1); ++ #error too old + #elif U_ICU_VERSION_MAJOR_NUM == 2 + # if U_ICU_VERSION_MINOR_NUM < 8 +- exit(1); ++ #error too old + # else + exit(0); + # endif diff --git a/package/beecrypt/0003-build-system.patch b/package/beecrypt/0003-build-system.patch new file mode 100644 index 0000000000..05746899ef --- /dev/null +++ b/package/beecrypt/0003-build-system.patch @@ -0,0 +1,173 @@ +Fix build with BR2_ENABLE_DEBUG=yes, no need for expert mode anymore + +Otherwise configure issues this error message: +configure: error: --enable-debug cannot be used in conjunction with --enable-expert-mode + +Downloaded from Gentoo: +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/beecrypt/files/beecrypt-4.2.1-build-system.patch?revision=1.2&view=markup + +This patch also removes the hard-coded CFLAGS provided by beecrypt in favour +of the CFLAGS provided by buildroot. + +Signed-off-by: Bernd Kuhls + +--- beecrypt-4.2.1/configure.ac ++++ beecrypt-4.2.1/configure.ac +@@ -11,7 +11,7 @@ + + # Checks for package options + AC_ARG_ENABLE(expert-mode, [ --enable-expert-mode follow user-defined CFLAGS settings [[default=no]]],[ +- ac_enable_expert_mode=yes ++ ac_enable_expert_mode=$enableval + ],[ + if test "X$CFLAGS" != "X"; then + echo "enabling expert mode" +@@ -25,7 +25,7 @@ + if test "$ac_enable_expert_mode" = yes; then + AC_MSG_ERROR([--enable-debug cannot be used in conjunction with --enable-expert-mode]) + fi +- ac_enable_debug=yes ++ ac_enable_debug=$enableval + ],[ + ac_enable_debug=no + ]) +@@ -456,7 +456,7 @@ + ac_cv_python_include="-I`$PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_inc()'`" + ]) + AC_CACHE_CHECK([where to install python libraries], ac_cv_python_libdir, [ +- ac_cv_python_libdir=`$PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()'` ++ ac_cv_python_libdir=`$PYTHON -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib(1, 0)'` + ]) + fi + fi +--- beecrypt-4.2.1/acinclude.m4 ++++ beecrypt-4.2.1/acinclude.m4 +@@ -498,15 +498,6 @@ AC_DEFUN([BEE_GNU_CC],[ + AC_SUBST(OPENMP_LIBS,"-lgomp") + fi + case $bc_target_arch in +- x86_64 | athlon64 | athlon-fx | k8 | opteron | em64t | nocona) +- CC="$CC -m64" +- ;; +- i[[3456]]86 | \ +- pentium* | \ +- athlon*) +- CC="$CC -m32" +- CCAS="$CCAS -m32" +- ;; + ia64) + case $target_os in + # HP/UX on Itanium needs to be told that a long is 64-bit! +@@ -525,17 +516,8 @@ AC_DEFUN([BEE_GNU_CC],[ + aix*) + CC="$CC -maix64" + ;; +- linux*) +- CC="$CC -m64" +- ;; + esac + ;; +- sparc | sparcv8*) +- CC="$CC -m32" +- ;; +- sparc64 | sparcv9*) +- CC="$CC -m64" +- ;; + esac + # Certain platforms needs special flags for multi-threaded code + if test "$ac_enable_threads" = yes; then +@@ -646,14 +646,6 @@ dnl BEE_GNU_CXX + AC_DEFUN([BEE_GNU_CXX],[ + AC_REQUIRE([AC_PROG_CXX]) + case $bc_target_arch in +- x86_64 | athlon64 | athlon-fx | k8 | opteron | em64t | nocona | core2) +- CXX="$CXX -m64" +- ;; +- i[[3456]]86 | \ +- pentium* | \ +- athlon*) +- CXX="$CXX -m32" +- ;; + ia64) + case $target_os in + # HP/UX on Itanium needs to be told that a long is 64-bit! +@@ -672,17 +664,8 @@ AC_DEFUN([BEE_GNU_CXX],[ + aix*) + CXX="$CXX -maix64" + ;; +- linux*) +- CXX="$CXX -m64" +- ;; + esac + ;; +- sparc | sparcv8*) +- CXX="$CXX -m32" +- ;; +- sparc64 | sparcv9*) +- CXX="$CXX -m64" +- ;; + esac + # Certain platforms needs special flags for multi-threaded code + if test "$ac_enable_threads" = yes; then +--- beecrypt-4.2.1/java/Makefile.am ++++ beecrypt-4.2.1/java/Makefile.am +@@ -26,7 +26,7 @@ + + INCLUDES = -I$(top_srcdir)/include + +-libaltdir=$(prefix)/lib@LIBALT@ ++libaltdir=$(libdir) + + libalt_LTLIBRARIES = libbeecrypt_java.la + +--- beecrypt-4.2.1/acinclude.m4 ++++ beecrypt-4.2.1/acinclude.m4 +@@ -1589,20 +1589,5 @@ + AC_SUBST(TYPEDEF_BC_THREADID_T,$bc_typedef_bc_threadid_t) + ]) +- +-AH_BOTTOM([ +-#if ENABLE_THREADS +-# ifndef _REENTRANT +-# define _REENTRANT +-# endif +-# if LINUX +-# define _LIBC_REENTRANT +-# endif +-#else +-# ifdef _REENTRANT +-# undef _REENTRANT +-# endif +-#endif +-]) + + + dnl BEE_THREAD_LOCAL_STORAGE +@@ -1623,7 +1609,5 @@ + ]) + + AH_BOTTOM([ +-#if !ENABLE_THREAD_LOCAL_STORAGE +-# define __thread +-#endif ++#include "config.threads.h" + ]) +--- beecrypt-4.2.1/config.threads.h ++++ beecrypt-4.2.1/config.threads.h +@@ -0,0 +1,16 @@ ++#if ENABLE_THREADS ++# ifndef _REENTRANT ++# define _REENTRANT ++# endif ++# if LINUX ++# define _LIBC_REENTRANT ++# endif ++#else ++# ifdef _REENTRANT ++# undef _REENTRANT ++# endif ++#endif ++ ++#if !ENABLE_THREAD_LOCAL_STORAGE ++# define __thread ++#endif diff --git a/package/beecrypt/0004-gcc-4.7.patch b/package/beecrypt/0004-gcc-4.7.patch new file mode 100644 index 0000000000..767f789069 --- /dev/null +++ b/package/beecrypt/0004-gcc-4.7.patch @@ -0,0 +1,19 @@ +Really fixes gcc-4.7 related compile error: +../../include/beecrypt/c++/util/AbstractSet.h:59:27: error: 'containsAll' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive] + +Downloaded from upstream bugtracker: +http://sourceforge.net/p/beecrypt/patches/10/ + +Signed-off-by: Bernd Kuhls + +--- a/include/beecrypt/c++/util/AbstractSet.h ++++ b/include/beecrypt/c++/util/AbstractSet.h +@@ -56,7 +56,7 @@ + if (c->size() != size()) + return false; + +- return containsAll(*c); ++ return this->containsAll(*c); + } + return false; + } diff --git a/package/beecrypt/Config.in b/package/beecrypt/Config.in new file mode 100644 index 0000000000..069f3d5cfd --- /dev/null +++ b/package/beecrypt/Config.in @@ -0,0 +1,29 @@ +comment "beecrypt needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_BEECRYPT + bool "beecrypt" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Beecrypt is a general-purpose cryptography library. + + http://beecrypt.sf.net + +if BR2_PACKAGE_BEECRYPT + +config BR2_PACKAGE_BEECRYPT_CPP + bool "C++ support" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # icu + depends on !BR2_BINFMT_FLAT # icu + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_ICU + help + Enable C++ support. This pulls in the (large) icu package. + +comment "C++ support needs a toolchain w/ C++, wchar, dynamic libraries" + depends on !BR2_BINFMT_FLAT + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \ + || BR2_STATIC_LIBS + +endif # BR2_PACKAGE_BEECRYPT diff --git a/package/beecrypt/beecrypt.hash b/package/beecrypt/beecrypt.hash new file mode 100644 index 0000000000..e697c26f08 --- /dev/null +++ b/package/beecrypt/beecrypt.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 286f1f56080d1a6b1d024003a5fa2158f4ff82cae0c6829d3c476a4b5898c55d beecrypt-4.2.1.tar.gz diff --git a/package/beecrypt/beecrypt.mk b/package/beecrypt/beecrypt.mk new file mode 100644 index 0000000000..e66cec10d6 --- /dev/null +++ b/package/beecrypt/beecrypt.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# beecrypt +# +################################################################################ + +BEECRYPT_VERSION = 4.2.1 +BEECRYPT_SITE = http://downloads.sourceforge.net/project/beecrypt/beecrypt/$(BEECRYPT_VERSION) +BEECRYPT_AUTORECONF = YES +BEECRYPT_INSTALL_STAGING = YES +BEECRYPT_LICENSE = LGPLv2.1+ +BEECRYPT_LICENSE_FILES = COPYING.LIB + +BEECRYPT_CONF_OPTS = \ + --disable-expert-mode \ + --without-java \ + --without-python \ + --disable-openmp + +ifeq ($(BR2_PACKAGE_BEECRYPT_CPP),y) +BEECRYPT_DEPENDENCIES += icu +BEECRYPT_CONF_OPTS += --with-cplusplus +else +BEECRYPT_CONF_OPTS += --without-cplusplus + +# automake/libtool uses the C++ compiler to link libbeecrypt because of +# (the optional) cppglue.cxx. Force it to use the C compiler instead. +define BEECRYPT_LINK_WITH_CC + $(SED) 's/--tag=CXX/--tag=CC/g' $(@D)/Makefile +endef + +BEECRYPT_POST_CONFIGURE_HOOKS += BEECRYPT_LINK_WITH_CC +endif + +$(eval $(autotools-package)) diff --git a/package/bellagio/0001-drop-werror.patch b/package/bellagio/0001-drop-werror.patch new file mode 100644 index 0000000000..39baf421bb --- /dev/null +++ b/package/bellagio/0001-drop-werror.patch @@ -0,0 +1,22 @@ +[PATCH] don't force -Werror in CFLAGS + +Released software shouldn't get built with -Werror. + +Signed-of-by: Peter Korsgaard +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: libomxil-bellagio-0.9.3/configure.ac +=================================================================== +--- libomxil-bellagio-0.9.3.orig/configure.ac ++++ libomxil-bellagio-0.9.3/configure.ac +@@ -5,7 +5,7 @@ + AC_PREREQ([2.59]) + + AC_CONFIG_HEADERS([config.h]) +-CFLAGS="${CFLAGS} -Wall -Werror" ++CFLAGS="${CFLAGS} -Wall" + + ################################################################################ + # Set the shared versioning info, according to section 6.3 of the libtool info # diff --git a/package/bellagio/0002-dynamicloader-linking.patch b/package/bellagio/0002-dynamicloader-linking.patch new file mode 100644 index 0000000000..5e4243d5e1 --- /dev/null +++ b/package/bellagio/0002-dynamicloader-linking.patch @@ -0,0 +1,16 @@ +When libomxdynamicloader.so is loaded, it complains that RM_Deinit can't be resolved. +Link explicitly against omxil-bellagio so that ld.so can find the reference. + +Signed-off-by: Qais Yousef + +--- bellagio-0.9.3/src/dynamic_loader/Makefile.am.old 2012-03-23 15:07:47.379021034 +0000 ++++ bellagio-0.9.3/src/dynamic_loader/Makefile.am 2012-03-23 15:08:47.563034818 +0000 +@@ -3,7 +3,7 @@ + omxdynamicloader_LTLIBRARIES = libomxdynamicloader.la + libomxdynamicloader_la_SOURCES = ste_dynamic_component_loader.c ste_dynamic_component_loader.h + +-libomxdynamicloader_la_LDFLAGS = ++libomxdynamicloader_la_LDFLAGS = -lomxil-bellagio -L$(abs_top_srcdir)/src/.libs + libomxdynamicloader_la_CFLAGS = -I$(top_srcdir)/include \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/base \ diff --git a/package/bellagio/0003-parallel-build.patch b/package/bellagio/0003-parallel-build.patch new file mode 100644 index 0000000000..767bbeb2aa --- /dev/null +++ b/package/bellagio/0003-parallel-build.patch @@ -0,0 +1,16 @@ +Fix dependency issue to allow parallel build + +Signed-off-by: Qais Yousef + +Index: bellagio-0.9.3/src/Makefile.am +=================================================================== +--- bellagio-0.9.3.orig/src/Makefile.am ++++ bellagio-0.9.3/src/Makefile.am +@@ -8,6 +8,7 @@ omxregister_bellagio_SOURCES = omxregist + omxregister_bellagio_CFLAGS = -DOMXILCOMPONENTSPATH=\"$(plugindir)/\" \ + -I$(top_srcdir)/include + omxregister_bellagio_LDFLAGS = -lomxil-bellagio -L$(builddir) ++omxregister_bellagio_DEPENDENCIES = libomxil-bellagio.la + + lib_LTLIBRARIES = libomxil-bellagio.la + libomxil_bellagio_la_SOURCES = component_loader.h \ diff --git a/package/bellagio/0004-segfault-on-removeFromWaitResource.patch b/package/bellagio/0004-segfault-on-removeFromWaitResource.patch new file mode 100644 index 0000000000..f52a2c33f4 --- /dev/null +++ b/package/bellagio/0004-segfault-on-removeFromWaitResource.patch @@ -0,0 +1,37 @@ +We always access globalComponentList[] at indexComponent=-1 which causes a +segfault. Use i as the index instead. + +Signed-off-by: Qais Yousef + +--- bellagio-0.9.3/src/omx_reference_resource_manager.c.old 2012-03-13 10:15:25.743940980 +0000 ++++ bellagio-0.9.3/src/omx_reference_resource_manager.c 2012-03-13 10:18:02.201971009 +0000 +@@ -485,7 +485,6 @@ + OMX_ERRORTYPE RM_removeFromWaitForResource(OMX_COMPONENTTYPE *openmaxStandComp) { + omx_base_component_PrivateType* omx_base_component_Private; + int i = 0; +- int indexComponent = -1; + + DEBUG(DEB_LEV_FUNCTION_NAME, "In %s\n", __func__); + omx_base_component_Private = (omx_base_component_PrivateType*)openmaxStandComp->pComponentPrivate; +@@ -493,16 +492,13 @@ + while(listOfcomponentRegistered[i].component_name != NULL ) { + if (!strcmp(listOfcomponentRegistered[i].component_name, omx_base_component_Private->name)) { + // found component in the list of the resource manager +- removeElemFromList(&globalComponentList[indexComponent], openmaxStandComp); +- break; ++ removeElemFromList(&globalComponentList[i], openmaxStandComp); ++ DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__); ++ return OMX_ErrorNone; + } + i++; + } +- if (indexComponent <0) { +- // No resource to be handled +- DEBUG(DEB_LEV_ERR, "In %s No resource to be handled\n", __func__); +- return OMX_ErrorNone; +- } +- DEBUG(DEB_LEV_FUNCTION_NAME, "Out of %s\n", __func__); ++ // No resource to be handled ++ DEBUG(DEB_LEV_ERR, "In %s No resource to be handled\n", __func__); + return OMX_ErrorNone; + } diff --git a/package/bellagio/Config.in b/package/bellagio/Config.in new file mode 100644 index 0000000000..8ad1867399 --- /dev/null +++ b/package/bellagio/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_BELLAGIO + bool "bellagio" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_HAS_LIBOPENMAX + help + Bellagio is an opensource implementation of the + OpenMAX IL API. + + OpenMAX Integration Layer (IL) is a standard API + to access Multimedia Components on mobile platforms. + It has been defined by the Khronos group. + By means of the OpenMAX IL API, multimedia frameworks + can access hardware accelerators on platforms that + provide it. + + http://omxil.sourceforge.net/ + +if BR2_PACKAGE_BELLAGIO + +config BR2_PACKAGE_PROVIDES_LIBOPENMAX + default "bellagio" + +endif + +comment "bellagio needs a toolchain w/ C++, threads, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/bellagio/bellagio.hash b/package/bellagio/bellagio.hash new file mode 100644 index 0000000000..914dd7c369 --- /dev/null +++ b/package/bellagio/bellagio.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 593c0729c8ef8c1467b3bfefcf355ec19a46dd92e31bfc280e17d96b0934d74c libomxil-bellagio-0.9.3.tar.gz diff --git a/package/bellagio/bellagio.mk b/package/bellagio/bellagio.mk new file mode 100644 index 0000000000..6db753d504 --- /dev/null +++ b/package/bellagio/bellagio.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# bellagio +# +################################################################################ + +BELLAGIO_VERSION = 0.9.3 +BELLAGIO_SOURCE = libomxil-bellagio-$(BELLAGIO_VERSION).tar.gz +BELLAGIO_SITE = http://downloads.sourceforge.net/project/omxil/omxil/Bellagio%20$(BELLAGIO_VERSION) +BELLAGIO_AUTORECONF = YES +BELLAGIO_INSTALL_STAGING = YES +BELLAGIO_LICENSE = LGPLv2.1+ +BELLAGIO_LICENSE_FILES = COPYING +BELLAGIO_PROVIDES = libopenmax + +$(eval $(autotools-package)) diff --git a/package/benejson/0001-c-std.patch b/package/benejson/0001-c-std.patch new file mode 100644 index 0000000000..2330b7905f --- /dev/null +++ b/package/benejson/0001-c-std.patch @@ -0,0 +1,22 @@ +Some older toolchains do not recognize c11 as a valid standard. +Since the code actually builds well with c99, use that instead. + +The only two non-standard features used are // comments +and for(int i ...) declarations in C. + +Signed-off-by: Alex Suykov + +--- a/SConstruct ++++ b/SConstruct +@@ -9,9 +9,8 @@ mydir = os.getcwd() + #Set default C++ building flags for both libraries and executables + default_env = Environment(ENV = os.environ) + default_env.Append(CPPPATH = [mydir + '/include']) +-default_env.Append(CCFLAGS = ' -Wall -pedantic') +-default_env.Append(CFLAGS = ' -std=c11') +-default_env.Append(CXXFLAGS = ' -std=c++11') ++default_env.Append(CFLAGS = ' -Wall') ++default_env.Append(CFLAGS = ' -std=c99') + #default_env.Append(CCFLAGS = ' -O2 -fomit-frame-pointer') + default_env.Append(CCFLAGS = ' -O0 -g') + diff --git a/package/benejson/Config.in b/package/benejson/Config.in new file mode 100644 index 0000000000..cb86d672d4 --- /dev/null +++ b/package/benejson/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_BENEJSON + bool "benejson" + depends on BR2_INSTALL_LIBSTDCPP + help + benejson is a buffering SAX-style JSON parser library. + The library package contains 3 major components: + + - benejson.js: SAX-style parser written in Javascript + - PullParser: A C++ class for JSON pull parsing + - Core: The parsing core with minimal dependencies + + https://codehero.github.io/benejson/ + +comment "benejson needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/benejson/benejson.hash b/package/benejson/benejson.hash new file mode 100644 index 0000000000..1dfda90d3f --- /dev/null +++ b/package/benejson/benejson.hash @@ -0,0 +1,2 @@ +# Localy computed +sha256 2ce5f3c2323500bdf651e7fcaecbd1011997141e6067567b8d2caa4cf7182f4a benejson-0.9.7.tar.gz diff --git a/package/benejson/benejson.mk b/package/benejson/benejson.mk new file mode 100644 index 0000000000..680e5b5bda --- /dev/null +++ b/package/benejson/benejson.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# benejson +# +################################################################################ + +BENEJSON_VERSION = 0.9.7 +BENEJSON_SITE = $(call github,codehero,benejson,$(BENEJSON_VERSION)) +BENEJSON_LICENSE = MIT +BENEJSON_LICENSE_FILES = LICENSE +BENEJSON_INSTALL_STAGING = YES +BENEJSON_DEPENDENCIES = host-scons + +# wchar support needs to be manually disabled +ifeq ($(BR2_USE_WCHAR),) +define BENEJSON_DISABLE_WCHAR + $(SED) 's,^#define BNJ_WCHAR_SUPPORT,#undef BNJ_WCHAR_SUPPORT,' \ + $(@D)/benejson/benejson.h +endef +BENEJSON_POST_PATCH_HOOKS += BENEJSON_DISABLE_WCHAR +endif + +BENEJSON_SCONS_TARGETS = include + +ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +BENEJSON_SCONS_TARGETS += lib/libbenejson.a +define BENEJSON_INSTALL_STATIC_LIB + $(INSTALL) -D -m 0644 $(@D)/lib/libbenejson.a \ + $(1)/usr/lib/libbenejson.a +endef +endif # Static enabled + +ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +BENEJSON_SCONS_TARGETS += lib/libbenejson.so +define BENEJSON_INSTALL_SHARED_LIB + $(INSTALL) -D -m 0644 $(@D)/lib/libbenejson.so \ + $(1)/usr/lib/libbenejson.so +endef +endif # Shared enabled + +define BENEJSON_BUILD_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) CROSS=$(TARGET_CROSS) \ + $(SCONS) $(BENEJSON_SCONS_TARGETS)) +endef + +define BENEJSON_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0644 $(@D)/include/benejson/benejson.h \ + $(STAGING_DIR)/usr/include/benejson/benejson.h; \ + $(INSTALL) -D -m 0644 $(@D)/include/benejson/pull.hh \ + $(STAGING_DIR)/usr/include/benejson/pull.hh + $(call BENEJSON_INSTALL_STATIC_LIB,$(STAGING_DIR)) + $(call BENEJSON_INSTALL_SHARED_LIB,$(STAGING_DIR)) +endef + +define BENEJSON_INSTALL_TARGET_CMDS + $(call BENEJSON_INSTALL_SHARED_LIB,$(TARGET_DIR)) +endef + +$(eval $(generic-package)) diff --git a/package/berkeleydb/Config.in b/package/berkeleydb/Config.in new file mode 100644 index 0000000000..5531b04463 --- /dev/null +++ b/package/berkeleydb/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_BERKELEYDB + bool "berkeleydb" + help + The Berkeley database. A very common library for database + applications. + + http://www.sleepycat.com/products/db.shtml + +if BR2_PACKAGE_BERKELEYDB + +config BR2_PACKAGE_BERKELEYDB_COMPAT185 + bool "DB 1.85 compatibility" + help + Build and install DB 1.85 compatibility API. + +config BR2_PACKAGE_BERKELEYDB_TOOLS + bool "install tools" + help + Install berkeleydb tools, mostly useful for debugging purposes. + +endif diff --git a/package/berkeleydb/berkeleydb.hash b/package/berkeleydb/berkeleydb.hash new file mode 100644 index 0000000000..e47c578cbe --- /dev/null +++ b/package/berkeleydb/berkeleydb.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 76a25560d9e52a198d37a31440fd07632b5f1f8f9f2b6d5438f4bc3e7c9013ef db-5.3.28.NC.tar.gz diff --git a/package/berkeleydb/berkeleydb.mk b/package/berkeleydb/berkeleydb.mk new file mode 100644 index 0000000000..e5c11bddcf --- /dev/null +++ b/package/berkeleydb/berkeleydb.mk @@ -0,0 +1,63 @@ +################################################################################ +# +# berkeleydb +# +################################################################################ + +# Since BerkeleyDB version 6 and above are licensed under the Affero +# GPL (AGPL), we want to keep this 'bdb' package at version 5.x to +# avoid licensing issues. +# BerkeleyDB version 6 or above should be provided by a dedicated +# package instead. +BERKELEYDB_VERSION = 5.3.28 +BERKELEYDB_SITE = http://download.oracle.com/berkeley-db +BERKELEYDB_SOURCE = db-$(BERKELEYDB_VERSION).NC.tar.gz +BERKELEYDB_SUBDIR = build_unix +BERKELEYDB_LICENSE = BerkeleyDB License +BERKELEYDB_LICENSE_FILES = LICENSE +BERKELEYDB_INSTALL_STAGING = YES +BERKELEYDB_BINARIES = db_archive db_checkpoint db_deadlock db_dump \ + db_hotbackup db_load db_log_verify db_printlog db_recover db_replicate \ + db_stat db_tuner db_upgrade db_verify + +# build directory can't be the directory where configure are there, so.. +define BERKELEYDB_CONFIGURE_CMDS + (cd $(@D)/build_unix; rm -rf config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + ../dist/configure $(QUIET) \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --sysconfdir=/etc \ + --with-gnu-ld \ + $(if $(BR2_INSTALL_LIBSTDCPP),--enable-cxx,--disable-cxx) \ + --disable-java \ + --disable-tcl \ + $(if $(BR2_PACKAGE_BERKELEYDB_COMPAT185),--enable-compat185,--disable-compat185) \ + $(SHARED_STATIC_LIBS_OPTS) \ + --with-pic \ + --enable-o_direct \ + $(if $(BR2_TOOLCHAIN_HAS_THREADS),--enable-mutexsupport,--disable-mutexsupport) \ + ) +endef + +ifneq ($(BR2_PACKAGE_BERKELEYDB_TOOLS),y) + +define BERKELEYDB_REMOVE_TOOLS + rm -f $(addprefix $(TARGET_DIR)/usr/bin/, $(BERKELEYDB_BINARIES)) +endef + +BERKELEYDB_POST_INSTALL_TARGET_HOOKS += BERKELEYDB_REMOVE_TOOLS + +endif + +define BERKELEYDB_REMOVE_DOCS + rm -rf $(TARGET_DIR)/usr/docs +endef + +BERKELEYDB_POST_INSTALL_TARGET_HOOKS += BERKELEYDB_REMOVE_DOCS + +$(eval $(autotools-package)) diff --git a/package/bind/0002-cross.patch b/package/bind/0002-cross.patch new file mode 100644 index 0000000000..5b4b1cd836 --- /dev/null +++ b/package/bind/0002-cross.patch @@ -0,0 +1,18 @@ +Use host compiler to build 'gen' since it's run when building. + +Signed-off-by: Gustavo Zacarias + +diff -Nura bind-9.5.1-P1/lib/dns/Makefile.in bind-9.5.1-P1.gencross/lib/dns/Makefile.in +--- bind-9.5.1-P1/lib/dns/Makefile.in 2007-09-11 22:09:08.000000000 -0300 ++++ bind-9.5.1-P1.gencross/lib/dns/Makefile.in 2009-03-04 16:35:23.000000000 -0200 +@@ -160,8 +160,8 @@ + ./gen -s ${srcdir} > code.h + + gen: gen.c +- ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \ +- ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_LIBS} ++ ${HOSTCC} ${HOST_CFLAGS} -I${top_srcdir}/lib/isc/include \ ++ ${HOST_LDFLAGS} -o $@ ${srcdir}/gen.c + + rbtdb64.@O@: rbtdb.c + diff --git a/package/bind/0003-Rename-ptrsize-to-ptr_size.patch b/package/bind/0003-Rename-ptrsize-to-ptr_size.patch new file mode 100644 index 0000000000..e3b58e202d --- /dev/null +++ b/package/bind/0003-Rename-ptrsize-to-ptr_size.patch @@ -0,0 +1,74 @@ +From 254dc19788ba2a03504fc6d1036fef477a60035f Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Fri, 22 Jan 2016 08:31:02 -0300 +Subject: [PATCH] Rename ptrsize to ptr_size + +This is to compensate for a uClibc mess caused by commit +70a04a287a2875c82e6822c36e071afba5b63a62 where ptrsize is defined for +mips, hence causing build breakage under certain conditions for programs +that use this variable name. + +Status: definitely not upstreamable. + +Signed-off-by: Gustavo Zacarias +--- + lib/dns/rbt.c | 6 +++--- + lib/dns/rbtdb.c | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/lib/dns/rbt.c b/lib/dns/rbt.c +index 86b5183..5fd55de 100644 +--- a/lib/dns/rbt.c ++++ b/lib/dns/rbt.c +@@ -113,7 +113,7 @@ struct file_header { + * information about the system on which the map file was generated + * will be used to tell if we can load the map file or not + */ +- isc_uint32_t ptrsize; ++ isc_uint32_t ptr_size; + unsigned int bigendian:1; /* big or little endian system */ + unsigned int rdataset_fixed:1; /* compiled with --enable-rrset-fixed */ + unsigned int nodecount; /* shadow from rbt structure */ +@@ -517,7 +517,7 @@ write_header(FILE *file, dns_rbt_t *rbt, isc_uint64_t first_node_offset, + memmove(header.version1, FILE_VERSION, sizeof(header.version1)); + memmove(header.version2, FILE_VERSION, sizeof(header.version2)); + header.first_node_offset = first_node_offset; +- header.ptrsize = (isc_uint32_t) sizeof(void *); ++ header.ptr_size = (isc_uint32_t) sizeof(void *); + header.bigendian = (1 == htonl(1)) ? 1 : 0; + + #ifdef DNS_RDATASET_FIXED +@@ -902,7 +902,7 @@ dns_rbt_deserialize_tree(void *base_address, size_t filesize, + } + #endif + +- if (header->ptrsize != (isc_uint32_t) sizeof(void *)) { ++ if (header->ptr_size != (isc_uint32_t) sizeof(void *)) { + result = ISC_R_INVALIDFILE; + goto cleanup; + } +diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c +index c7168cb..dbcf944 100644 +--- a/lib/dns/rbtdb.c ++++ b/lib/dns/rbtdb.c +@@ -114,7 +114,7 @@ typedef struct rbtdb_file_header rbtdb_file_header_t; + + struct rbtdb_file_header { + char version1[32]; +- isc_uint32_t ptrsize; ++ isc_uint32_t ptr_size; + unsigned int bigendian:1; + isc_uint64_t tree; + isc_uint64_t nsec; +@@ -7593,7 +7593,7 @@ rbtdb_write_header(FILE *rbtfile, off_t tree_location, off_t nsec_location, + memset(&header, 0, sizeof(rbtdb_file_header_t)); + memmove(header.version1, FILE_VERSION, sizeof(header.version1)); + memmove(header.version2, FILE_VERSION, sizeof(header.version2)); +- header.ptrsize = (isc_uint32_t) sizeof(void *); ++ header.ptr_size = (isc_uint32_t) sizeof(void *); + header.bigendian = (1 == htonl(1)) ? 1 : 0; + header.tree = (isc_uint64_t) tree_location; + header.nsec = (isc_uint64_t) nsec_location; +-- +2.4.10 + diff --git a/package/bind/Config.in b/package/bind/Config.in new file mode 100644 index 0000000000..a580f0ee66 --- /dev/null +++ b/package/bind/Config.in @@ -0,0 +1,43 @@ +config BR2_PACKAGE_BIND + bool "bind" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + BIND (Berkeley Internet Name Domain) is an implementation of + the Domain Name System (DNS) protocols and provides an openly + redistributable reference implementation of the major + components of the Domain Name System, including: + + * a Domain Name System server (named) + * a Domain Name System resolver library + * tools for verifying the proper operation of the DNS server + + The BIND DNS Server is used on the vast majority of name + serving machines on the Internet, providing a robust and + stable architecture on top of which an organization's naming + architecture can be built. The resolver library included in + the BIND distribution provides the standard APIs for + translation between domain names and Internet addresses and is + intended to be linked with applications requiring name service. + + http://www.isc.org/sw/bind/ + +if BR2_PACKAGE_BIND + +config BR2_PACKAGE_BIND_SERVER + bool "Install server components" + default y + help + Install server components (named, lwresd) + +config BR2_PACKAGE_BIND_TOOLS + bool "Install tools" + help + Install tools (dig, host, nslookup, nsupdate) + +endif + +comment "bind needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/bind/S81named b/package/bind/S81named new file mode 100644 index 0000000000..bc4bb0f246 --- /dev/null +++ b/package/bind/S81named @@ -0,0 +1,39 @@ +#!/bin/sh + +CONFIG=/etc/bind/named.conf +DAEMON=/usr/sbin/named + +[ -x $DAEMON ] || exit 0 +[ -f $CONFIG ] || exit 0 + +case "$1" in + start) + if [ ! -f /etc/rndc.key ]; then + printf "Initializing bind control key: " + # if rndc.key is a symlink, the target must exist + touch /etc/rndc.key + rndc-confgen -a -r /dev/urandom 2>/dev/null && echo "OK" || echo "FAIL" + fi + printf "Starting domain name daemon: " + start-stop-daemon -S -x $DAEMON -- -c $CONFIG -u named + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping domain name daemon: " + rndc stop || start-stop-daemon -K -x $DAEMON + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart) + $0 stop || true + sleep 1 + $0 start + ;; + reload|force-reload) + rndc reload || $0 restart + ;; + *) + echo "Usage: $0 {start|stop|restart|reload|force-reload}" + exit 1 +esac + +exit 0 diff --git a/package/bind/bind.hash b/package/bind/bind.hash new file mode 100644 index 0000000000..1f8b8b7720 --- /dev/null +++ b/package/bind/bind.hash @@ -0,0 +1,2 @@ +# Verified from ftp://ftp.isc.org/isc/bind9/9.10.4/bind-9.10.4.tar.gz.sha256.asc +sha256 f8d412b38d5ac390275b943bde69f4608f67862a45487ec854b30e4448fcb056 bind-9.10.4.tar.gz diff --git a/package/bind/bind.mk b/package/bind/bind.mk new file mode 100644 index 0000000000..8cfcf7f3cc --- /dev/null +++ b/package/bind/bind.mk @@ -0,0 +1,113 @@ +################################################################################ +# +# bind +# +################################################################################ + +BIND_VERSION = 9.10.4 +BIND_SITE = ftp://ftp.isc.org/isc/bind9/$(BIND_VERSION) +# bind does not support parallel builds. +BIND_MAKE = $(MAKE1) +BIND_INSTALL_STAGING = YES +BIND_CONFIG_SCRIPTS = bind9-config isc-config.sh +BIND_LICENSE = ISC +BIND_LICENSE_FILES = COPYRIGHT +BIND_TARGET_SERVER_SBIN = arpaname ddns-confgen dnssec-checkds dnssec-coverage +BIND_TARGET_SERVER_SBIN += dnssec-importkey dnssec-keygen dnssec-revoke +BIND_TARGET_SERVER_SBIN += dnssec-settime dnssec-verify genrandom +BIND_TARGET_SERVER_SBIN += isc-hmac-fixup named-journalprint nsec3hash +BIND_TARGET_SERVER_SBIN += lwresd named named-checkconf named-checkzone +BIND_TARGET_SERVER_SBIN += named-compilezone rndc rndc-confgen dnssec-dsfromkey +BIND_TARGET_SERVER_SBIN += dnssec-keyfromlabel dnssec-signzone +BIND_TARGET_TOOLS_BIN = dig host nslookup nsupdate +BIND_CONF_ENV = \ + BUILD_CC="$(TARGET_CC)" \ + BUILD_CFLAGS="$(TARGET_CFLAGS)" +BIND_CONF_OPTS = \ + --with-libjson=no \ + --with-randomdev=/dev/urandom \ + --enable-epoll \ + --with-libtool \ + --with-gssapi=no \ + --enable-rrl \ + --enable-filter-aaaa + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +BIND_CONF_OPTS += --enable-linux-caps +BIND_DEPENDENCIES += libcap +else +BIND_CONF_OPTS += --disable-linux-caps +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +BIND_CONF_OPTS += --with-libxml2=$(STAGING_DIR)/usr --enable-newstats +BIND_DEPENDENCIES += libxml2 +else +BIND_CONF_OPTS += --with-libxml2=no +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +BIND_DEPENDENCIES += openssl +BIND_CONF_ENV += \ + ac_cv_func_EVP_sha256=yes \ + ac_cv_func_EVP_sha384=yes \ + ac_cv_func_EVP_sha512=yes +BIND_CONF_OPTS += \ + --with-openssl=$(STAGING_DIR)/usr LIBS="-lz" \ + --with-ecdsa=yes +# GOST cipher support requires openssl extra engines +ifeq ($(BR2_PACKAGE_OPENSSL_ENGINES),y) +BIND_CONF_OPTS += --with-gost=yes +else +BIND_CONF_OPTS += --with-gost=no +endif +else +BIND_CONF_OPTS += --with-openssl=no +endif + +# Used by dnssec-checkds and dnssec-coverage +ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),) +BIND_CONF_OPTS += --with-python=no +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +BIND_DEPENDENCIES += readline +else +BIND_CONF_OPTS += --with-readline=no +endif + +define BIND_TARGET_REMOVE_SERVER + rm -rf $(addprefix $(TARGET_DIR)/usr/sbin/, $(BIND_TARGET_SERVER_SBIN)) +endef + +define BIND_TARGET_REMOVE_TOOLS + rm -rf $(addprefix $(TARGET_DIR)/usr/bin/, $(BIND_TARGET_TOOLS_BIN)) +endef + +ifeq ($(BR2_PACKAGE_BIND_SERVER),y) +define BIND_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/bind/S81named \ + $(TARGET_DIR)/etc/init.d/S81named +endef +define BIND_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/bind/named.service \ + $(TARGET_DIR)/usr/lib/systemd/system/named.service + + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + + ln -sf /usr/lib/systemd/system/named.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/named.service +endef +else +BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_SERVER +endif + +ifeq ($(BR2_PACKAGE_BIND_TOOLS),) +BIND_POST_INSTALL_TARGET_HOOKS += BIND_TARGET_REMOVE_TOOLS +endif + +define BIND_USERS + named -1 named -1 * /etc/bind - - BIND daemon +endef + +$(eval $(autotools-package)) diff --git a/package/bind/named.service b/package/bind/named.service new file mode 100644 index 0000000000..be0158b234 --- /dev/null +++ b/package/bind/named.service @@ -0,0 +1,12 @@ +[Unit] +Description=BIND Domain Name Server +Documentation=man:named(8) +After=network.target + +[Service] +ExecStart=/usr/sbin/named -f -u named +ExecReload=/usr/sbin/rndc reload +ExecStop=/usr/sbin/rndc stop + +[Install] +WantedBy=multi-user.target diff --git a/package/binutils/2.23.2/120-sh-conf.patch b/package/binutils/2.23.2/120-sh-conf.patch new file mode 100644 index 0000000000..ea3d1b6068 --- /dev/null +++ b/package/binutils/2.23.2/120-sh-conf.patch @@ -0,0 +1,29 @@ +r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines + +Likewise, binutils has no idea about any of these new targets either, so we +fix that up too.. now we're able to actually build a real toolchain for +sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more +inept targets than that one, really. Go look, I promise). + +--- a/configure ++++ b/configure +@@ -1495,7 +1495,7 @@ + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +--- a/configure.ac ++++ b/configure.ac +@@ -712,7 +712,7 @@ + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; diff --git a/package/binutils/2.23.2/300-001_ld_makefile_patch.patch b/package/binutils/2.23.2/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..5cb0f614d8 --- /dev/null +++ b/package/binutils/2.23.2/300-001_ld_makefile_patch.patch @@ -0,0 +1,24 @@ +diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.am binutils-2.17.50.0.17/ld/Makefile.am +--- binutils-2.17.50.0.17.oorig/ld/Makefile.am 2007-06-18 19:29:29.000000000 +0200 ++++ binutils-2.17.50.0.17/ld/Makefile.am 2007-06-25 10:00:36.000000000 +0200 +@@ -18,7 +18,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.in binutils-2.17.50.0.17/ld/Makefile.in +--- binutils-2.17.50.0.17.oorig/ld/Makefile.in 2007-06-18 19:29:29.000000000 +0200 ++++ binutils-2.17.50.0.17/ld/Makefile.in 2007-06-25 10:00:36.000000000 +0200 +@@ -287,7 +287,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include diff --git a/package/binutils/2.23.2/300-012_check_ldrunpath_length.patch b/package/binutils/2.23.2/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..df783109bb --- /dev/null +++ b/package/binutils/2.23.2/300-012_check_ldrunpath_length.patch @@ -0,0 +1,21 @@ +diff -Nura binutils-2.21.orig/ld/emultempl/elf32.em binutils-2.21/ld/emultempl/elf32.em +--- binutils-2.21.orig/ld/emultempl/elf32.em 2010-10-29 09:10:36.000000000 -0300 ++++ binutils-2.21/ld/emultempl/elf32.em 2010-12-10 09:26:56.746102724 -0300 +@@ -1270,6 +1270,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, &n, + force)) + break; +@@ -1497,6 +1499,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + + for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/package/binutils/2.23.2/500-sysroot.patch b/package/binutils/2.23.2/500-sysroot.patch new file mode 100644 index 0000000000..e49c795332 --- /dev/null +++ b/package/binutils/2.23.2/500-sysroot.patch @@ -0,0 +1,37 @@ +Signed-off-by: Sven Rebhan + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -308,18 +308,25 @@ + directory first. */ + if (! entry->flags.maybe_archive) + { +- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename); ++ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename) ++ && ld_sysroot) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->flags.sysrooted = TRUE; + return TRUE; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + return TRUE; + + if (IS_ABSOLUTE_PATH (entry->filename)) diff --git a/package/binutils/2.23.2/600-poison-system-directories.patch b/package/binutils/2.23.2/600-poison-system-directories.patch new file mode 100644 index 0000000000..780e48e801 --- /dev/null +++ b/package/binutils/2.23.2/600-poison-system-directories.patch @@ -0,0 +1,279 @@ +Patch adapted to binutils 2.23.2 and extended to use +BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni. + +Signed-off-by: Thomas Petazzoni + +Upstream-Status: Inappropriate [distribution: codesourcery] + +Patch originally created by Mark Hatle, forward-ported to +binutils 2.21 by Scott Garman. + +purpose: warn for uses of system directories when cross linking + +Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 + +2008-07-02 Joseph Myers + + ld/ + * ld.h (args_type): Add error_poison_system_directories. + * ld.texinfo (--error-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.error_poison_system_directories. + * ldmain.c (main): Initialize + command_line.error_poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --error-poison-system-directories. + (parse_args): Handle new option. + +2007-06-13 Joseph Myers + + ld/ + * config.in: Regenerate. + * ld.h (args_type): Add poison_system_directories. + * ld.texinfo (--no-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.poison_system_directories. + * ldmain.c (main): Initialize + command_line.poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_NO_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --no-poison-system-directories. + (parse_args): Handle new option. + +2007-04-20 Joseph Myers + + Merge from Sourcery G++ binutils 2.17: + + 2007-03-20 Joseph Myers + Based on patch by Mark Hatle . + ld/ + * configure.in (--enable-poison-system-directories): New option. + * configure, config.in: Regenerate. + * ldfile.c (ldfile_add_library_path): If + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, + /usr/lib, /usr/local/lib or /usr/X11R6/lib. + +Signed-off-by: Mark Hatle +Signed-off-by: Scott Garman + +Index: b/ld/config.in +=================================================================== +--- a/ld/config.in ++++ b/ld/config.in +@@ -11,6 +11,9 @@ + language is requested. */ + #undef ENABLE_NLS + ++/* Define to warn for use of native system library directories */ ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++ + /* Additional extension a shared object might have. */ + #undef EXTRA_SHLIB_EXTENSION + +Index: b/ld/configure +=================================================================== +--- a/ld/configure ++++ b/ld/configure +@@ -773,6 +773,7 @@ + enable_targets + enable_64_bit_bfd + with_sysroot ++enable_poison_system_directories + enable_gold + enable_got + enable_werror +@@ -1428,6 +1429,8 @@ + (and sometimes confusing) to the casual installer + --enable-targets alternative target configurations + --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) ++ --enable-poison-system-directories ++ warn for use of native system library directories + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-got= GOT handling scheme (target, single, negative, + multigot) +@@ -4338,7 +4341,18 @@ + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then + ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi + + # Check whether --enable-got was given. + if test "${enable_got+set}" = set; then : +Index: b/ld/configure.in +=================================================================== +--- a/ld/configure.in ++++ b/ld/configure.in +@@ -70,6 +70,16 @@ + AC_SUBST(TARGET_SYSTEM_ROOT) + AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system library directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system library directories]) ++fi ++ + dnl Use --enable-gold to decide if this linker should be the default. + dnl "install_as_default" is set to false if gold is the default linker. + dnl "installed_linker" is the installed BFD linker name. +Index: b/ld/ldfile.c +=================================================================== +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -116,6 +116,23 @@ + new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL); + else + new_dirs->name = xstrdup (name); ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (command_line.poison_system_directories ++ && ((!strncmp (name, "/lib", 4)) ++ || (!strncmp (name, "/usr/lib", 8)) ++ || (!strncmp (name, "/usr/local/lib", 14)) ++ || (!strncmp (name, "/usr/X11R6/lib", 14)))) ++ { ++ if (command_line.error_poison_system_directories) ++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ else ++ einfo (_("%P: warning: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ } ++#endif ++ + } + + /* Try to open a BFD for a lang_input_statement. */ +Index: b/ld/ld.h +=================================================================== +--- a/ld/ld.h ++++ b/ld/ld.h +@@ -203,6 +203,14 @@ + /* If TRUE we'll just print the default output on stdout. */ + bfd_boolean print_output_format; + ++ /* If TRUE (the default) warn for uses of system directories when ++ cross linking. */ ++ bfd_boolean poison_system_directories; ++ ++ /* If TRUE (default FALSE) give an error for uses of system ++ directories when cross linking instead of a warning. */ ++ bfd_boolean error_poison_system_directories; ++ + /* Big or little endian as set on command line. */ + enum endian_enum endian; + +Index: b/ld/ldmain.c +=================================================================== +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -265,6 +265,8 @@ + command_line.warn_search_mismatch = TRUE; + command_line.check_section_addresses = -1; + command_line.disable_target_specific_optimizations = -1; ++ command_line.poison_system_directories = TRUE; ++ command_line.error_poison_system_directories = FALSE; + + /* We initialize DEMANGLING based on the environment variable + COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the +Index: b/ld/ld.texinfo +=================================================================== +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo +@@ -2154,6 +2154,18 @@ + + Passing @code{none} for @var{style} disables the setting from any + @code{--build-id} options earlier on the command line. ++ ++@kindex --no-poison-system-directories ++@item --no-poison-system-directories ++Do not warn for @option{-L} options using system directories such as ++@file{/usr/lib} when cross linking. This option is intended for use ++in chroot environments when such directories contain the correct ++libraries for the target system rather than the host. ++ ++@kindex --error-poison-system-directories ++@item --error-poison-system-directories ++Give an error instead of a warning for @option{-L} options using ++system directories when cross linking. + @end table + + @c man end +Index: b/ld/lexsup.c +=================================================================== +--- a/ld/lexsup.c ++++ b/ld/lexsup.c +@@ -498,6 +498,14 @@ + TWO_DASHES }, + { {"wrap", required_argument, NULL, OPTION_WRAP}, + '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES }, ++ { {"no-poison-system-directories", no_argument, NULL, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Do not warn for -L options using system directories"), ++ TWO_DASHES }, ++ { {"error-poison-system-directories", no_argument, NULL, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Give an error for -L options using system directories"), ++ TWO_DASHES }, + }; + + #define OPTION_COUNT ARRAY_SIZE (ld_options) +@@ -510,6 +518,7 @@ + int ingroup = 0; + char *default_dirlist = NULL; + char *shortopts; ++ char *BR_paranoid_env; + struct option *longopts; + struct option *really_longopts; + int last_optind; +@@ -1427,9 +1436,21 @@ + einfo (_("%P%X: --hash-size needs a numeric argument\n")); + } + break; ++ ++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: ++ command_line.poison_system_directories = FALSE; ++ break; ++ ++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: ++ command_line.error_poison_system_directories = TRUE; ++ break; + } + } + ++ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0) ++ command_line.error_poison_system_directories = TRUE; ++ + while (ingroup) + { + lang_leave_group (); +Index: b/ld/ldlex.h +=================================================================== +--- a/ld/ldlex.h ++++ b/ld/ldlex.h +@@ -136,6 +136,8 @@ + #endif /* ENABLE_PLUGINS */ + OPTION_DEFAULT_SCRIPT, + OPTION_PRINT_OUTPUT_FORMAT, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, + }; + + /* The initial parser states. */ diff --git a/package/binutils/2.23.2/900-xtensa-trampolines.patch b/package/binutils/2.23.2/900-xtensa-trampolines.patch new file mode 100644 index 0000000000..b5b934fcab --- /dev/null +++ b/package/binutils/2.23.2/900-xtensa-trampolines.patch @@ -0,0 +1,846 @@ +From a82c7d9030b67a6a76a5403d0e1641f9e42141ac Mon Sep 17 00:00:00 2001 +From: David Weatherford +Date: Fri, 21 Mar 2014 11:53:42 +0000 +Subject: [PATCH] Add support to the Xtensa target for creating trampolines for + out-of-range branches. + + * tc-xtensa.c (xtensa_check_frag_count, xtensa_create_trampoline_frag) + (xtensa_maybe_create_trampoline_frag, init_trampoline_frag) + (find_trampoline_seg, search_trampolines, get_best_trampoline) + (check_and_update_trampolines, add_jump_to_trampoline) + (dump_trampolines): New function. + (md_parse_option): Add cases for --[no-]trampolines options. + (md_assemble, finish_vinsn, xtensa_end): Add call to + xtensa_check_frag_count. + (xg_assemble_vliw_tokens): Add call to + xtensa_maybe_create_trampoline_frag. + (xtensa_relax_frag): Relax fragments with RELAX_TRAMPOLINE state. + (relax_frag_immed): Relax jump instructions that cannot reach its + target. + * tc-xtensa.h (xtensa_relax_statesE::RELAX_TRAMPOLINE): New relax + state. + + * as.texinfo: Document --[no-]trampolines command-line options. + * c-xtensa.texi: Document trampolines relaxation and command line + options. + + * frags.c (get_frag_count, clear_frag_count): New function. + (frag_alloc): Increment totalfrags counter. + * frags.h (get_frag_count, clear_frag_count): New function. + + * all.exp: Add test for trampoline relaxation. + * trampoline.d: Trampoline relaxation expected dump. + * trampoline.s: Trampoline relaxation test source. +--- +Backported from: a82c7d9030b67a6a76a5403d0e1641f9e42141ac +Changes to Changelog files are dropped. + + gas/config/tc-xtensa.c | 558 +++++++++++++++++++++++++++++++++- + gas/config/tc-xtensa.h | 5 + + gas/frags.c | 15 + + gas/frags.h | 3 + + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/trampoline.d | 26 ++ + gas/testsuite/gas/xtensa/trampoline.s | 21 ++ + 11 files changed, 753 insertions(+), 2 deletions(-) + create mode 100644 gas/testsuite/gas/xtensa/trampoline.d + create mode 100644 gas/testsuite/gas/xtensa/trampoline.s + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index fe8ec0f..ea23c96 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -468,6 +468,12 @@ static void xtensa_set_frag_assembly_state (fragS *); + static void finish_vinsn (vliw_insn *); + static bfd_boolean emit_single_op (TInsn *); + static int total_frag_text_expansion (fragS *); ++static bfd_boolean use_trampolines = TRUE; ++static void xtensa_check_frag_count (void); ++static void xtensa_create_trampoline_frag (bfd_boolean); ++static void xtensa_maybe_create_trampoline_frag (void); ++struct trampoline_frag; ++static int init_trampoline_frag (struct trampoline_frag *); + + /* Alignment Functions. */ + +@@ -520,6 +526,7 @@ static void tinsn_from_chars (TInsn *, char *, int); + static void tinsn_immed_from_frag (TInsn *, fragS *, int); + static int get_num_stack_text_bytes (IStack *); + static int get_num_stack_literal_bytes (IStack *); ++static bfd_boolean tinsn_to_slotbuf (xtensa_format, int, TInsn *, xtensa_insnbuf); + + /* vliw_insn functions. */ + +@@ -687,7 +694,10 @@ enum + option_prefer_l32r, + option_prefer_const16, + +- option_target_hardware ++ option_target_hardware, ++ ++ option_trampolines, ++ option_no_trampolines, + }; + + const char *md_shortopts = ""; +@@ -760,6 +770,9 @@ struct option md_longopts[] = + + { "target-hardware", required_argument, NULL, option_target_hardware }, + ++ { "trampolines", no_argument, NULL, option_trampolines }, ++ { "no-trampolines", no_argument, NULL, option_no_trampolines }, ++ + { NULL, no_argument, NULL, 0 } + }; + +@@ -940,6 +953,14 @@ md_parse_option (int c, char *arg) + directive_state[directive_transform] = FALSE; + return 1; + ++ case option_trampolines: ++ use_trampolines = TRUE; ++ return 1; ++ ++ case option_no_trampolines: ++ use_trampolines = FALSE; ++ return 1; ++ + default: + return 0; + } +@@ -963,7 +984,9 @@ Xtensa options:\n\ + flix bundles\n\ + --no-allow-flix neither allow hand-written nor generate\n\ + flix bundles\n\ +- --rename-section old=new Rename section 'old' to 'new'\n", stream); ++ --rename-section old=new Rename section 'old' to 'new'\n\ ++ --[no-]trampolines [Do not] generate trampolines (jumps to jumps)\n\ ++ when jumps do not reach their targets\n", stream); + } + + +@@ -5568,6 +5591,8 @@ md_assemble (char *str) + + /* We've just emitted a new instruction so clear the list of labels. */ + xtensa_clear_insn_labels (); ++ ++ xtensa_check_frag_count (); + } + + +@@ -6372,6 +6397,8 @@ finish_vinsn (vliw_insn *vinsn) + xg_assemble_vliw_tokens (vinsn); + + xg_clear_vinsn (vinsn); ++ ++ xtensa_check_frag_count (); + } + + +@@ -7140,6 +7167,7 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn) + RELAX_UNREACHABLE, + frag_now->fr_symbol, frag_now->fr_offset, NULL); + xtensa_set_frag_assembly_state (frag_now); ++ xtensa_maybe_create_trampoline_frag (); + } + else if (is_branch && do_align_targets ()) + { +@@ -7222,9 +7250,164 @@ xtensa_end (void) + xtensa_sanity_check (); + + xtensa_add_config_info (); ++ ++ xtensa_check_frag_count (); ++} ++ ++ ++struct trampoline_frag ++{ ++ struct trampoline_frag *next; ++ bfd_boolean needs_jump_around; ++ fragS *fragP; ++ fixS *fixP; ++}; ++ ++struct trampoline_seg ++{ ++ struct trampoline_seg *next; ++ asection *seg; ++ struct trampoline_frag trampoline_list; ++}; ++ ++static struct trampoline_seg trampoline_seg_list; ++#define J_RANGE (128 * 1024) ++ ++static int unreachable_count = 0; ++ ++ ++static void ++xtensa_maybe_create_trampoline_frag (void) ++{ ++ if (!use_trampolines) ++ return; ++ ++ /* We create an area for possible trampolines every 10 unreachable frags. ++ These are preferred over the ones not preceded by an unreachable frag, ++ because we don't have to jump around them. This function is called after ++ each RELAX_UNREACHABLE frag is created. */ ++ ++ if (++unreachable_count > 10) ++ { ++ xtensa_create_trampoline_frag (FALSE); ++ clear_frag_count (); ++ unreachable_count = 0; ++ } ++} ++ ++static void ++xtensa_check_frag_count (void) ++{ ++ if (!use_trampolines || frag_now->tc_frag_data.is_no_transform) ++ return; ++ ++ /* We create an area for possible trampolines every 8000 frags or so. This ++ is an estimate based on the max range of a "j" insn (+/-128K) divided ++ by a typical frag byte count (16), minus a few for safety. This function ++ is called after each source line is processed. */ ++ ++ if (get_frag_count () > 8000) ++ { ++ xtensa_create_trampoline_frag (TRUE); ++ clear_frag_count (); ++ unreachable_count = 0; ++ } ++} ++ ++static xtensa_insnbuf trampoline_buf = NULL; ++static xtensa_insnbuf trampoline_slotbuf = NULL; ++ ++#define TRAMPOLINE_FRAG_SIZE 3000 ++ ++static void ++xtensa_create_trampoline_frag (bfd_boolean needs_jump_around) ++{ ++ /* Emit a frag where we can place intermediate jump instructions, ++ in case we need to jump farther than 128K bytes. ++ Each jump instruction takes three bytes. ++ We allocate enough for 1000 trampolines in each frag. ++ If that's not enough, oh well. */ ++ ++ struct trampoline_seg *ts = trampoline_seg_list.next; ++ struct trampoline_frag *tf; ++ char *varP; ++ fragS *fragP; ++ int size = TRAMPOLINE_FRAG_SIZE; ++ ++ for ( ; ts; ts = ts->next) ++ { ++ if (ts->seg == now_seg) ++ break; ++ } ++ ++ if (ts == NULL) ++ { ++ ts = (struct trampoline_seg *)xcalloc(sizeof (struct trampoline_seg), 1); ++ ts->next = trampoline_seg_list.next; ++ trampoline_seg_list.next = ts; ++ ts->seg = now_seg; ++ } ++ ++ frag_wane (frag_now); ++ frag_new (0); ++ xtensa_set_frag_assembly_state (frag_now); ++ varP = frag_var (rs_machine_dependent, size, size, RELAX_TRAMPOLINE, NULL, 0, NULL); ++ fragP = (fragS *)(varP - SIZEOF_STRUCT_FRAG); ++ if (trampoline_buf == NULL) ++ { ++ trampoline_buf = xtensa_insnbuf_alloc (xtensa_default_isa); ++ trampoline_slotbuf = xtensa_insnbuf_alloc (xtensa_default_isa); ++ } ++ tf = (struct trampoline_frag *)xmalloc(sizeof (struct trampoline_frag)); ++ tf->next = ts->trampoline_list.next; ++ ts->trampoline_list.next = tf; ++ tf->needs_jump_around = needs_jump_around; ++ tf->fragP = fragP; ++ tf->fixP = NULL; ++} ++ ++ ++static struct trampoline_seg * ++find_trampoline_seg (asection *seg) ++{ ++ struct trampoline_seg *ts = trampoline_seg_list.next; ++ ++ for ( ; ts; ts = ts->next) ++ { ++ if (ts->seg == seg) ++ return ts; ++ } ++ ++ return NULL; + } + + ++void dump_trampolines (void); ++ ++void ++dump_trampolines (void) ++{ ++ struct trampoline_seg *ts = trampoline_seg_list.next; ++ ++ for ( ; ts; ts = ts->next) ++ { ++ asection *seg = ts->seg; ++ ++ if (seg == NULL) ++ continue; ++ fprintf(stderr, "SECTION %s\n", seg->name); ++ struct trampoline_frag *tf = ts->trampoline_list.next; ++ for ( ; tf; tf = tf->next) ++ { ++ if (tf->fragP == NULL) ++ continue; ++ fprintf(stderr, " 0x%08x: fix=%d, jump_around=%s\n", ++ (int)tf->fragP->fr_address, (int)tf->fragP->fr_fix, ++ tf->needs_jump_around ? "T" : "F"); ++ } ++ } ++} ++ + static void + xtensa_cleanup_align_frags (void) + { +@@ -8708,6 +8891,149 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) + new_stretch += relax_frag_for_align (fragP, stretch); + break; + ++ case RELAX_TRAMPOLINE: ++ if (fragP->tc_frag_data.relax_seen) ++ { ++ segment_info_type *seginfo = seg_info (now_seg); ++ fragS *fP; /* The out-of-range jump. */ ++ fixS *fixP; ++ ++ /* Scan for jumps that will not reach. */ ++ for (fixP = seginfo->fix_root; fixP ; fixP = fixP->fx_next) ++ { ++ symbolS *s = fixP->fx_addsy; ++ xtensa_opcode opcode; ++ int target; ++ int addr; ++ int delta; ++ ++ if (fixP->fx_r_type < BFD_RELOC_XTENSA_SLOT0_OP || ++ fixP->fx_r_type > BFD_RELOC_XTENSA_SLOT14_OP) ++ continue; ++ xtensa_insnbuf_from_chars (isa, trampoline_buf, ++ (unsigned char *) fixP->fx_frag->fr_literal + fixP->fx_where, ++ 0); ++ fmt = xtensa_format_decode (isa, trampoline_buf); ++ gas_assert (fmt != XTENSA_UNDEFINED); ++ slot = fixP->tc_fix_data.slot; ++ xtensa_format_get_slot (isa, fmt, slot, trampoline_buf, trampoline_slotbuf); ++ opcode = xtensa_opcode_decode (isa, fmt, slot, trampoline_slotbuf); ++ if (opcode != xtensa_j_opcode) ++ continue; ++ target = S_GET_VALUE (s); ++ addr = fixP->fx_frag->fr_address; ++ delta = target - addr + stretch; ++ if (delta > J_RANGE || delta < -1 * J_RANGE) ++ { /* Found an out-of-range jump; scan the list of trampolines for the best match. */ ++ struct trampoline_seg *ts = find_trampoline_seg (now_seg); ++ struct trampoline_frag *tf = ts->trampoline_list.next; ++ struct trampoline_frag *prev = &ts->trampoline_list; ++ int lower = (target < addr) ? target : addr; ++ int upper = (target > addr) ? target : addr; ++ int midpoint = lower + (upper - lower) / 2; ++ ++ if ((upper - lower) > 2 * J_RANGE) ++ { ++ /* One trampoline won't suffice; we need multiple jumps. ++ Jump to the trampoline that's farthest, but still in ++ range relative to the original "j" instruction. */ ++ for ( ; tf; prev = tf, tf = tf->next ) ++ { ++ int this_addr = tf->fragP->fr_address + tf->fragP->fr_fix; ++ int next_addr = (tf->next) ? tf->next->fragP->fr_address + tf->next->fragP->fr_fix : 0 ; ++ ++ if (addr == lower) ++ { ++ /* Forward jump. */ ++ if (this_addr - addr < J_RANGE) ++ break; ++ } ++ else ++ { ++ /* Backward jump. */ ++ if (next_addr == 0 || addr - next_addr > J_RANGE) ++ break; ++ } ++ } ++ } ++ else ++ { ++ struct trampoline_frag *best_tf = NULL; ++ int best_delta = 0; ++ ++ for ( ; tf; prev = tf, tf = tf->next ) ++ { ++ int this_addr = tf->fragP->fr_address + tf->fragP->fr_fix; ++ int this_delta = abs (this_addr - midpoint); ++ ++ if (!best_tf || this_delta < best_delta) ++ { ++ best_tf = tf; ++ best_delta = this_delta; ++ } ++ } ++ tf = best_tf; ++ } ++ if (tf->fragP == fragP) ++ { ++ int trampaddr = fragP->fr_address + fragP->fr_fix; ++ ++ if (abs (addr - trampaddr) < J_RANGE) ++ { /* The trampoline is in range of original; fix it! */ ++ fixS *newfixP; ++ int offset; ++ TInsn insn; ++ symbolS *lsym; ++ ++ new_stretch += init_trampoline_frag (tf); ++ offset = fragP->fr_fix; /* Where to assemble the j insn. */ ++ lsym = fragP->fr_symbol; ++ fP = fixP->fx_frag; ++ /* Assemble a jump to the target label here. */ ++ tinsn_init (&insn); ++ insn.insn_type = ITYPE_INSN; ++ insn.opcode = xtensa_j_opcode; ++ insn.ntok = 1; ++ set_expr_symbol_offset (&insn.tok[0], lsym, offset); ++ fmt = xg_get_single_format (xtensa_j_opcode); ++ tinsn_to_slotbuf (fmt, 0, &insn, trampoline_slotbuf); ++ xtensa_format_set_slot (isa, fmt, 0, trampoline_buf, trampoline_slotbuf); ++ xtensa_insnbuf_to_chars (isa, trampoline_buf, (unsigned char *)fragP->fr_literal + offset, 3); ++ fragP->fr_fix += 3; ++ fragP->fr_var -= 3; ++ /* Add a fix-up for the original j insn. */ ++ newfixP = fix_new (fP, fixP->fx_where, fixP->fx_size, lsym, fragP->fr_fix - 3, TRUE, fixP->fx_r_type); ++ newfixP->fx_no_overflow = 1; ++ newfixP->tc_fix_data.X_add_symbol = lsym; ++ newfixP->tc_fix_data.X_add_number = offset; ++ newfixP->tc_fix_data.slot = slot; ++ /* Move the fix-up from the original j insn to this one. */ ++ fixP->fx_frag = fragP; ++ fixP->fx_where = fragP->fr_fix - 3; ++ fixP->tc_fix_data.slot = 0; ++ /* Adjust the jump around this trampoline (if present). */ ++ if (tf->fixP != NULL) ++ { ++ tf->fixP->fx_offset += 3; ++ } ++ new_stretch += 3; ++ fragP->tc_frag_data.relax_seen = FALSE; /* Need another pass. */ ++ /* Do we have room for more? */ ++ if (fragP->fr_var < 3) ++ { /* No, convert to fill. */ ++ frag_wane (fragP); ++ fragP->fr_subtype = 0; ++ /* Remove from the trampoline_list. */ ++ prev->next = tf->next; ++ break; ++ } ++ } ++ } ++ } ++ } ++ } ++ break; ++ + default: + as_bad (_("bad relaxation state")); + } +@@ -9146,6 +9472,200 @@ bytes_to_stretch (fragS *this_frag, + } + + ++static struct trampoline_frag * ++search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only) ++{ ++ struct trampoline_seg *ts = find_trampoline_seg (now_seg); ++ struct trampoline_frag *tf = (ts) ? ts->trampoline_list.next : NULL; ++ struct trampoline_frag *best_tf = NULL; ++ int best_delta = 0; ++ int best_addr = 0; ++ symbolS *sym = tinsn->tok[0].X_add_symbol; ++ offsetT target = S_GET_VALUE (sym) + tinsn->tok[0].X_add_number; ++ offsetT addr = fragP->fr_address; ++ offsetT lower = (addr < target) ? addr : target; ++ offsetT upper = (addr > target) ? addr : target; ++ int delta = upper - lower; ++ offsetT midpoint = lower + delta / 2; ++ int this_delta = -1; ++ int this_addr = -1; ++ ++ if (delta > 2 * J_RANGE) ++ { ++ /* One trampoline won't do; we need multiple. ++ Choose the farthest trampoline that's still in range of the original ++ and let a later pass finish the job. */ ++ for ( ; tf; tf = tf->next) ++ { ++ int next_addr = (tf->next) ? tf->next->fragP->fr_address + tf->next->fragP->fr_fix : 0; ++ ++ this_addr = tf->fragP->fr_address + tf->fragP->fr_fix; ++ if (lower == addr) ++ { ++ /* Forward jump. */ ++ if (this_addr - addr < J_RANGE) ++ break; ++ } ++ else ++ { ++ /* Backward jump. */ ++ if (next_addr == 0 || addr - next_addr > J_RANGE) ++ break; ++ } ++ if (abs (addr - this_addr) < J_RANGE) ++ return tf; ++ ++ return NULL; ++ } ++ } ++ for ( ; tf; tf = tf->next) ++ { ++ this_addr = tf->fragP->fr_address + tf->fragP->fr_fix; ++ this_delta = abs (this_addr - midpoint); ++ if (unreachable_only && tf->needs_jump_around) ++ continue; ++ if (!best_tf || this_delta < best_delta) ++ { ++ best_tf = tf; ++ best_delta = this_delta; ++ best_addr = this_addr; ++ } ++ } ++ ++ if (best_tf && ++ best_delta < J_RANGE && ++ abs(best_addr - lower) < J_RANGE && ++ abs(best_addr - upper) < J_RANGE) ++ return best_tf; ++ ++ return NULL; /* No suitable trampoline found. */ ++} ++ ++ ++static struct trampoline_frag * ++get_best_trampoline (TInsn *tinsn, fragS *fragP) ++{ ++ struct trampoline_frag *tf = NULL; ++ ++ tf = search_trampolines (tinsn, fragP, TRUE); /* Try unreachable first. */ ++ ++ if (tf == NULL) ++ tf = search_trampolines (tinsn, fragP, FALSE); /* Try ones needing a jump-around, too. */ ++ ++ return tf; ++} ++ ++ ++static void ++check_and_update_trampolines (void) ++{ ++ struct trampoline_seg *ts = find_trampoline_seg (now_seg); ++ struct trampoline_frag *tf = ts->trampoline_list.next; ++ struct trampoline_frag *prev = &ts->trampoline_list; ++ ++ for ( ; tf; prev = tf, tf = tf->next) ++ { ++ if (tf->fragP->fr_var < 3) ++ { ++ frag_wane (tf->fragP); ++ prev->next = tf->next; ++ tf->fragP = NULL; ++ } ++ } ++} ++ ++ ++static int ++init_trampoline_frag (struct trampoline_frag *trampP) ++{ ++ fragS *fp = trampP->fragP; ++ int growth = 0; ++ ++ if (fp->fr_fix == 0) ++ { ++ symbolS *lsym; ++ char label[10 + 2 * sizeof(fp)]; ++ sprintf (label, ".L0_TR_%p", fp); ++ ++ lsym = (symbolS *)local_symbol_make (label, now_seg, 0, fp); ++ fp->fr_symbol = lsym; ++ if (trampP->needs_jump_around) ++ { ++ /* Add a jump around this block of jumps, in case ++ control flows into this block. */ ++ fixS *fixP; ++ TInsn insn; ++ xtensa_format fmt; ++ xtensa_isa isa = xtensa_default_isa; ++ ++ fp->tc_frag_data.is_insn = 1; ++ /* Assemble a jump insn. */ ++ tinsn_init (&insn); ++ insn.insn_type = ITYPE_INSN; ++ insn.opcode = xtensa_j_opcode; ++ insn.ntok = 1; ++ set_expr_symbol_offset (&insn.tok[0], lsym, 3); ++ fmt = xg_get_single_format (xtensa_j_opcode); ++ tinsn_to_slotbuf (fmt, 0, &insn, trampoline_slotbuf); ++ xtensa_format_set_slot (isa, fmt, 0, trampoline_buf, trampoline_slotbuf); ++ xtensa_insnbuf_to_chars (isa, trampoline_buf, (unsigned char *)fp->fr_literal, 3); ++ fp->fr_fix += 3; ++ fp->fr_var -= 3; ++ growth = 3; ++ fixP = fix_new (fp, 0, 3, lsym, 3, TRUE, BFD_RELOC_XTENSA_SLOT0_OP); ++ trampP->fixP = fixP; ++ } ++ } ++ return growth; ++} ++ ++ ++static int ++add_jump_to_trampoline (struct trampoline_frag *trampP, fragS *origfrag) ++{ ++ fragS *tramp = trampP->fragP; ++ fixS *fixP; ++ int offset = tramp->fr_fix; /* Where to assemble the j insn. */ ++ TInsn insn; ++ symbolS *lsym; ++ symbolS *tsym; ++ int toffset; ++ xtensa_format fmt; ++ xtensa_isa isa = xtensa_default_isa; ++ int growth = 0; ++ ++ lsym = tramp->fr_symbol; ++ /* Assemble a jump to the target label in the trampoline frag. */ ++ tsym = origfrag->tc_frag_data.slot_symbols[0]; ++ toffset = origfrag-> tc_frag_data.slot_offsets[0]; ++ tinsn_init (&insn); ++ insn.insn_type = ITYPE_INSN; ++ insn.opcode = xtensa_j_opcode; ++ insn.ntok = 1; ++ set_expr_symbol_offset (&insn.tok[0], tsym, toffset); ++ fmt = xg_get_single_format (xtensa_j_opcode); ++ tinsn_to_slotbuf (fmt, 0, &insn, trampoline_slotbuf); ++ xtensa_format_set_slot (isa, fmt, 0, trampoline_buf, trampoline_slotbuf); ++ xtensa_insnbuf_to_chars (isa, trampoline_buf, (unsigned char *)tramp->fr_literal + offset, 3); ++ tramp->fr_fix += 3; ++ tramp->fr_var -= 3; ++ growth = 3; ++ /* add a fix-up for the trampoline jump. */ ++ fixP = fix_new (tramp, tramp->fr_fix - 3, 3, tsym, toffset, TRUE, BFD_RELOC_XTENSA_SLOT0_OP); ++ /* Modify the jump at the start of this trampoline to point past the newly-added jump. */ ++ fixP = trampP->fixP; ++ if (fixP) ++ fixP->fx_offset += 3; ++ /* Modify the original j to point here. */ ++ origfrag->tc_frag_data.slot_symbols[0] = lsym; ++ origfrag->tc_frag_data.slot_offsets[0] = tramp->fr_fix - 3; ++ /* If trampoline is full, remove it from the list. */ ++ check_and_update_trampolines (); ++ ++ return growth; ++} ++ ++ + static long + relax_frag_immed (segT segP, + fragS *fragP, +@@ -9284,6 +9804,37 @@ relax_frag_immed (segT segP, + if (negatable_branch && istack.ninsn > 1) + update_next_frag_state (fragP); + ++ /* If last insn is a jump, and it cannot reach its target, try to find a trampoline. */ ++ if (istack.ninsn > 2 && ++ istack.insn[istack.ninsn - 1].insn_type == ITYPE_LABEL && ++ istack.insn[istack.ninsn - 2].insn_type == ITYPE_INSN && ++ istack.insn[istack.ninsn - 2].opcode == xtensa_j_opcode) ++ { ++ TInsn *jinsn = &istack.insn[istack.ninsn - 2]; ++ ++ if (!xg_symbolic_immeds_fit (jinsn, segP, fragP, fragP->fr_offset, total_text_diff)) ++ { ++ struct trampoline_frag *tf = get_best_trampoline (jinsn, fragP); ++ ++ if (tf) ++ { ++ this_text_diff += init_trampoline_frag (tf); ++ this_text_diff += add_jump_to_trampoline (tf, fragP); ++ } ++ else ++ { ++ /* If target symbol is undefined, assume it will reach once linked. */ ++ expressionS *exp = &istack.insn[istack.ninsn - 2].tok[0]; ++ ++ if (exp->X_op == O_symbol && S_IS_DEFINED (exp->X_add_symbol)) ++ { ++ as_bad_where (fragP->fr_file, fragP->fr_line, ++ _("jump target out of range; no usable trampoline found")); ++ } ++ } ++ } ++ } ++ + return this_text_diff; + } + +@@ -9404,6 +9955,9 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT sec, fragS *fragp) + else + as_bad (_("invalid relaxation fragment result")); + break; ++ ++ case RELAX_TRAMPOLINE: ++ break; + } + + fragp->fr_var = 0; +diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h +index 0bf1240..4672bc6 100644 +--- a/gas/config/tc-xtensa.h ++++ b/gas/config/tc-xtensa.h +@@ -180,6 +180,11 @@ enum xtensa_relax_statesE + prevent the linker from changing the size of any frag between the + section start and the org frag. */ + ++ RELAX_TRAMPOLINE, ++ /* Every few thousand frags, we insert one of these, just in case we may ++ need some space for a trampoline (jump to a jump) because the function ++ has gotten too big. If not needed, it disappears. */ ++ + RELAX_NONE + }; + +diff --git a/gas/frags.c b/gas/frags.c +index 5f68480..e14099d 100644 +--- a/gas/frags.c ++++ b/gas/frags.c +@@ -24,6 +24,20 @@ + + extern fragS zero_address_frag; + extern fragS predefined_address_frag; ++ ++static int totalfrags; ++ ++int ++get_frag_count (void) ++{ ++ return totalfrags; ++} ++ ++void ++clear_frag_count (void) ++{ ++ totalfrags = 0; ++} + + /* Initialization for frag routines. */ + +@@ -70,6 +84,7 @@ frag_alloc (struct obstack *ob) + ptr = (fragS *) obstack_alloc (ob, SIZEOF_STRUCT_FRAG); + obstack_alignment_mask (ob) = oalign; + memset (ptr, 0, SIZEOF_STRUCT_FRAG); ++ totalfrags++; + return ptr; + } + +diff --git a/gas/frags.h b/gas/frags.h +index 319898f..2f9e1b5 100644 +--- a/gas/frags.h ++++ b/gas/frags.h +@@ -155,4 +155,7 @@ char *frag_var (relax_stateT type, + + bfd_boolean frag_offset_fixed_p (const fragS *, const fragS *, offsetT *); + ++int get_frag_count (void); ++void clear_frag_count (void); ++ + #endif /* FRAGS_H */ +diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp +index 2b2c294..3683b78 100644 +--- a/gas/testsuite/gas/xtensa/all.exp ++++ b/gas/testsuite/gas/xtensa/all.exp +@@ -98,6 +98,7 @@ if [istarget xtensa*-*-*] then { + run_dump_test "pcrel" + run_dump_test "weak-call" + run_dump_test "jlong" ++ run_dump_test "trampoline" + } + + if [info exists errorInfo] then { +diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d +new file mode 100644 +index 0000000..b4f65dc +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/trampoline.d +@@ -0,0 +1,26 @@ ++#as: ++#objdump: -d ++#name: trampolines relaxation ++ ++.*: +file format .*xtensa.* ++#... ++.*0:.*j.0x1194c ++.*3:.*j.0x1194f ++.*6:.*j.0x11952 ++.*9:.*j.0x1d4e4 ++#... ++.*11949:.*j.0x11955 ++.*1194c:.*j.0x24a0e ++.*1194f:.*j.0x24a0e ++.*11952:.*j.0x24a11 ++#... ++.*1d4e1:.*j.0x1d4e7 ++.*1d4e4:.*j.0x33462 ++#... ++.*24a0e:.*j.0x24a0e ++.*24a11:.*j.0x24a11 ++#... ++.*3345f:.*ret ++.*33462:.*j.0x49407 ++#... ++.*49407:.*j.0x49407 +diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s +new file mode 100644 +index 0000000..259a3bb +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/trampoline.s +@@ -0,0 +1,21 @@ ++ .text ++ j 1f ++ j 1f ++ j 2f ++ j 3f ++ .rep 25000 ++99: ++ and a2, a2, a3 ++ bne a2, a3, 99b ++ .endr ++1: ++ j 1b ++2: ++ j 2b ++ ++ .rep 25000 ++ and a2, a2, a3 ++ _ret ++ .endr ++3: ++ j 3b +-- +1.8.1.4 + diff --git a/package/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch b/package/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch new file mode 100644 index 0000000000..e1c2d85aa8 --- /dev/null +++ b/package/binutils/2.23.2/901-xtensa-gas-first-frag-alignment.patch @@ -0,0 +1,51 @@ +From a35d5e823fdfe8a6e7e05ca8e3fb8bb5697335b1 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 15 Apr 2014 19:12:46 +0400 +Subject: [PATCH] Fix alignment for the first section frag on xtensa + +Linking object files produced by partial linking with link-time +relaxation enabled sometimes fails with the following error message: + +dangerous relocation: call8: misaligned call target: (.text.unlikely+0x63) + +This happens because no basic block with an XTENSA_PROP_ALIGN flag in the +property table is generated for the first basic block, even if the +.align directive is present. +It was believed that the first frag alignment could be derived from the +section alignment, but this was not implemented for the partial linking +case: after partial linking first frag of a section may become not +first, but no additional alignment frag is inserted before it. +Basic block for such frag may be merged with previous basic block into +extended basic block during relaxation pass losing its alignment +restrictions. + +Fix this by always recording alignment for the first section frag. + +2014-04-22 Max Filippov + +gas/ + * config/tc-xtensa.c (xtensa_handle_align): record alignment for the + first section frag. + +--- +Backported from: a35d5e823fdfe8a6e7e05ca8e3fb8bb5697335b1 +Changes to Changelog files and tests are dropped. + + gas/config/tc-xtensa.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index ea23c96..58ace38 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -5609,7 +5609,6 @@ xtensa_handle_align (fragS *fragP) + && ! fragP->tc_frag_data.is_literal + && (fragP->fr_type == rs_align + || fragP->fr_type == rs_align_code) +- && fragP->fr_address + fragP->fr_fix > 0 + && fragP->fr_offset > 0 + && now_seg != bss_section) + { +-- +1.8.1.4 + diff --git a/package/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch b/package/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch new file mode 100644 index 0000000000..ba24f4e4b0 --- /dev/null +++ b/package/binutils/2.23.2/902-xtensa-gas-ld-diff-relocation-signed.patch @@ -0,0 +1,133 @@ +From 6a17eba5358549d0d6d195bb22b34cdbc068def2 Mon Sep 17 00:00:00 2001 +From: Volodymyr Arbatov +Date: Mon, 6 May 2013 09:43:21 -0800 +Subject: [PATCH] Use signed data type for R_XTENSA_DIFF* relocation offsets. + +R_XTENSA_DIFF relocation offsets are in fact signed. Treat them as such. +Add testcase that examines ld behaviour on R_XTENSA_DIFF relocation +changing sign during relaxation. + +2014-05-02 Volodymyr Arbatov + David Weatherford + Max Filippov + +bfd/ + * elf32-xtensa.c (relax_section): treat R_XTENSA_DIFF* relocations as + signed. + +gas/ + * config/tc-xtensa.c (md_apply_fix): mark BFD_RELOC_XTENSA_DIFF* + fixups as signed. +--- +Backported from: 1058c7532d0b012ac329219264ddad59049fb6e6 +Changes to Changelog files and tests are dropped. + + bfd/elf32-xtensa.c | 32 ++++++++++++----------- + gas/config/tc-xtensa.c | 3 +++ + 2 files changed, 20 insertions(+), 15 deletions(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index edb04b4..8818d67 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -222,11 +222,11 @@ static reloc_howto_type elf_howto_table[] = + FALSE, 0, 0, FALSE), + + /* Relocations for supporting difference of symbols. */ +- HOWTO (R_XTENSA_DIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, ++ HOWTO (R_XTENSA_DIFF8, 0, 0, 8, FALSE, 0, complain_overflow_signed, + bfd_elf_xtensa_reloc, "R_XTENSA_DIFF8", FALSE, 0, 0xff, FALSE), +- HOWTO (R_XTENSA_DIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, ++ HOWTO (R_XTENSA_DIFF16, 0, 1, 16, FALSE, 0, complain_overflow_signed, + bfd_elf_xtensa_reloc, "R_XTENSA_DIFF16", FALSE, 0, 0xffff, FALSE), +- HOWTO (R_XTENSA_DIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, ++ HOWTO (R_XTENSA_DIFF32, 0, 2, 32, FALSE, 0, complain_overflow_signed, + bfd_elf_xtensa_reloc, "R_XTENSA_DIFF32", FALSE, 0, 0xffffffff, FALSE), + + /* General immediate operand relocations. */ +@@ -9013,7 +9013,8 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + || r_type == R_XTENSA_DIFF16 + || r_type == R_XTENSA_DIFF32) + { +- bfd_vma diff_value = 0, new_end_offset, diff_mask = 0; ++ bfd_signed_vma diff_value = 0; ++ bfd_vma new_end_offset, diff_mask = 0; + + if (bfd_get_section_limit (abfd, sec) < old_source_offset) + { +@@ -9027,15 +9028,15 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + { + case R_XTENSA_DIFF8: + diff_value = +- bfd_get_8 (abfd, &contents[old_source_offset]); ++ bfd_get_signed_8 (abfd, &contents[old_source_offset]); + break; + case R_XTENSA_DIFF16: + diff_value = +- bfd_get_16 (abfd, &contents[old_source_offset]); ++ bfd_get_signed_16 (abfd, &contents[old_source_offset]); + break; + case R_XTENSA_DIFF32: + diff_value = +- bfd_get_32 (abfd, &contents[old_source_offset]); ++ bfd_get_signed_32 (abfd, &contents[old_source_offset]); + break; + } + +@@ -9047,24 +9048,25 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + switch (r_type) + { + case R_XTENSA_DIFF8: +- diff_mask = 0xff; +- bfd_put_8 (abfd, diff_value, ++ diff_mask = 0x7f; ++ bfd_put_signed_8 (abfd, diff_value, + &contents[old_source_offset]); + break; + case R_XTENSA_DIFF16: +- diff_mask = 0xffff; +- bfd_put_16 (abfd, diff_value, ++ diff_mask = 0x7fff; ++ bfd_put_signed_16 (abfd, diff_value, + &contents[old_source_offset]); + break; + case R_XTENSA_DIFF32: +- diff_mask = 0xffffffff; +- bfd_put_32 (abfd, diff_value, ++ diff_mask = 0x7fffffff; ++ bfd_put_signed_32 (abfd, diff_value, + &contents[old_source_offset]); + break; + } + +- /* Check for overflow. */ +- if ((diff_value & ~diff_mask) != 0) ++ /* Check for overflow. Sign bits must be all zeroes or all ones */ ++ if ((diff_value & ~diff_mask) != 0 && ++ (diff_value & ~diff_mask) != (-1 & ~diff_mask)) + { + (*link_info->callbacks->reloc_dangerous) + (link_info, _("overflow after relaxation"), +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 58ace38..7547c0a0 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -5867,12 +5867,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) + { + case BFD_RELOC_8: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8; ++ fixP->fx_signed = 1; + break; + case BFD_RELOC_16: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16; ++ fixP->fx_signed = 1; + break; + case BFD_RELOC_32: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32; ++ fixP->fx_signed = 1; + break; + default: + break; +-- +1.8.1.4 + diff --git a/package/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch b/package/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch new file mode 100644 index 0000000000..6a0846ef8e --- /dev/null +++ b/package/binutils/2.23.2/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch @@ -0,0 +1,47 @@ +From e7d17e71cdc10a2e81e454ce3b9637f1b2a587f2 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 10 Jul 2014 01:47:33 +0400 +Subject: [PATCH] Fix xtensa ld segfault when linking linux modules + +is_inconsistent_linkonce_section makes an assumption that section name +that starts with ".gnu.linkonce.prop." has one more dot in its suffix. +However gas generates such section name by insertion of "prop." right +after ".gnu.linkonce." part of the name of the original section. So, for +section named ".gnu.linkonce.this_module" corresponding property section +name does not satisfy the assumption. Such section names are common in +linux modules. This bug was exposed by the patch "a35d5e8 Fix alignment +for the first section frag on xtensa", that makes gas produce property +section for each section that has ".align" directive in it. + +Use suffix that immediately follows ".gnu.linkonce.prop." when there are +no more dots following it. + +2014-07-10 Max Filippov + +ld/ + * emultempl/xtensaelf.em (is_inconsistent_linkonce_section): + correctly handle missing dot in section name after + ".gnu.linkonce.prop.". +--- +Backported from: e7d17e71cdc10a2e81e454ce3b9637f1b2a587f2 +Changes to ld/ChangeLog file are dropped. + + ld/emultempl/xtensaelf.em | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em +index 151eea4..948d18d 100644 +--- a/ld/emultempl/xtensaelf.em ++++ b/ld/emultempl/xtensaelf.em +@@ -1310,7 +1310,7 @@ is_inconsistent_linkonce_section (asection *sec) + for Tensilica's XCC compiler. */ + name = sec_name + linkonce_len; + if (CONST_STRNEQ (name, "prop.")) +- name = strchr (name + 5, '.') + 1; ++ name = strchr (name + 5, '.') ? strchr (name + 5, '.') + 1 : name + 5; + else if (name[1] == '.' + && (name[0] == 'p' || name[0] == 'e' || name[0] == 'h')) + name += 2; +-- +1.8.1.4 + diff --git a/package/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch b/package/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch new file mode 100644 index 0000000000..dba7620b7e --- /dev/null +++ b/package/binutils/2.23.2/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch @@ -0,0 +1,79 @@ +From 7fc39194f8fb48914c995f8ec3826d50086f1ec0 Mon Sep 17 00:00:00 2001 +From: Sterling Augustine +Date: Tue, 25 Jan 2011 13:59:13 -0800 +Subject: [PATCH] Fix 'call8: call target out of range' xtensa ld relaxation + bug + +During link-time relaxation distance between cross-section call site and +its target may grow, producing 'call target out of range' error for +relaxed calls. Be more conservative when calculating whether or not a +callx can be converted to a straight call. + +2014-09-23 Sterling Augustine + +bfd/ + * elf32-xtensa.c (is_resolvable_asm_expansion): for cross-section + call relaxation use furthermost addresses where call source and + destination can be to check whether it's in the range of a direct + call. + +Signed-off-by: Max Filippov +--- + bfd/elf32-xtensa.c | 41 +++++++++++++++++++++++++++++++++++++---- + 1 file changed, 37 insertions(+), 4 deletions(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 09862e3..e32496a 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -7124,10 +7124,43 @@ is_resolvable_asm_expansion (bfd *abfd, + || is_reloc_sym_weak (abfd, irel))) + return FALSE; + +- self_address = (sec->output_section->vma +- + sec->output_offset + irel->r_offset + 3); +- dest_address = (target_sec->output_section->vma +- + target_sec->output_offset + target_offset); ++ if (target_sec->output_section != sec->output_section) ++ { ++ /* If the two sections are sufficiently far away that relaxation ++ might take the call out of range, we can't simplify. For ++ example, a positive displacement call into another memory ++ could get moved to a lower address due to literal removal, ++ but the destination won't move, and so the displacment might ++ get larger. ++ ++ If the displacement is negative, assume the destination could ++ move as far back as the start of the output section. The ++ self_address will be at least as far into the output section ++ as it is prior to relaxation. ++ ++ If the displacement is postive, assume the destination will be in ++ it's pre-relaxed location (because relaxation only makes sections ++ smaller). The self_address could go all the way to the beginning ++ of the output section. */ ++ ++ dest_address = target_sec->output_section->vma; ++ self_address = sec->output_section->vma; ++ ++ if (sec->output_section->vma > target_sec->output_section->vma) ++ self_address += sec->output_offset + irel->r_offset + 3; ++ else ++ dest_address += bfd_get_section_limit (abfd, target_sec->output_section); ++ /* Call targets should be four-byte aligned. */ ++ dest_address = (dest_address + 3) & ~3; ++ } ++ else ++ { ++ ++ self_address = (sec->output_section->vma ++ + sec->output_offset + irel->r_offset + 3); ++ dest_address = (target_sec->output_section->vma ++ + target_sec->output_offset + target_offset); ++ } + + *is_reachable_p = pcrel_reloc_fits (direct_call_opcode, 0, + self_address, dest_address); +-- +1.8.1.4 + diff --git a/package/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch b/package/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch new file mode 100644 index 0000000000..8aeb06428a --- /dev/null +++ b/package/binutils/2.23.2/905-Fix-trampolines-search-code-for-conditional-branches.patch @@ -0,0 +1,90 @@ +From 415480d6471e67aef97c0241d451ef2423a1da9d Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 25 Nov 2014 21:33:21 +0300 +Subject: [PATCH] Fix trampolines search code for conditional branches + +For conditional branches that need more than one trampoline to reach its +target assembler couldn't always find suitable trampoline because +post-loop condition check was placed inside the loop, resulting in +premature loop termination. Move check outside the loop. + +This fixes the following build errors seen when assembling huge files +produced by gcc: + Error: jump target out of range; no usable trampoline found + Error: operand 1 of 'j' has out of range value '307307' + +2014-11-25 Max Filippov + +gas/ + * config/tc-xtensa.c (search_trampolines): Move post-loop + condition check outside the search loop. + +gas/testsuite/ + * gas/xtensa/trampoline.d: Add expected output for branches. + * gas/xtensa/trampoline.s: Add test case for branches. + +Signed-off-by: Max Filippov +--- +Backported from: d92b6eece424f0ad35d96fdd85bf207295e8c4c3 +Changes to ChangeLogs are dropped. + + gas/config/tc-xtensa.c | 8 ++++---- + gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++ + gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++ + 3 files changed, 20 insertions(+), 4 deletions(-) + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index d11b0c7..f23ccf8 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -9514,11 +9514,11 @@ search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only) + if (next_addr == 0 || addr - next_addr > J_RANGE) + break; + } +- if (abs (addr - this_addr) < J_RANGE) +- return tf; +- +- return NULL; + } ++ if (abs (addr - this_addr) < J_RANGE) ++ return tf; ++ ++ return NULL; + } + for ( ; tf; tf = tf->next) + { +diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d +index b4f65dc..5ae32a6 100644 +--- a/gas/testsuite/gas/xtensa/trampoline.d ++++ b/gas/testsuite/gas/xtensa/trampoline.d +@@ -24,3 +24,12 @@ + .*33462:.*j.0x49407 + #... + .*49407:.*j.0x49407 ++.*4940a:.*beqz.n.a2,.0x4940f ++.*4940c:.*j.0x693d1 ++#... ++.*693d1:.*j.0x7ddd4 ++#... ++.*7ddd4:.*j.0x927f5 ++#... ++.*927f5:.*j.0x927f5 ++#... +diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s +index 259a3bb..4465786 100644 +--- a/gas/testsuite/gas/xtensa/trampoline.s ++++ b/gas/testsuite/gas/xtensa/trampoline.s +@@ -19,3 +19,10 @@ + .endr + 3: + j 3b ++ bnez a2, 4f ++ .rep 50000 ++ and a2, a2, a3 ++ _ret ++ .endr ++4: ++ j 4b +-- +1.8.1.4 + diff --git a/package/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch b/package/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch new file mode 100644 index 0000000000..9ad6b3be05 --- /dev/null +++ b/package/binutils/2.23.2/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch @@ -0,0 +1,57 @@ +From 8ec76b16f62d1bf386fb2c39af5f66c3afddc5cb Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 14 May 2015 05:22:55 +0300 +Subject: [PATCH] xtensa: fix localized symbol refcounting with --gc-sections + +elf_xtensa_gc_sweep_hook doesn't correctly unreference symbols that were +made local, that results in link failure with the following message: + + BFD (GNU Binutils) 2.24 internal error, aborting at elf32-xtensa.c line + 3372 in elf_xtensa_finish_dynamic_sections + +elf_xtensa_gc_sweep_hook determines symbol reference type (PLT or GOT) by +relocation type. Relocation types are not changed when symbol becomes +local, but its PLT references are added to GOT references and +plt.refcount is set to 0. Such symbol cannot be unreferences in the +elf_xtensa_gc_sweep_hook and its extra references make calculated GOT +relocations section size not match number of GOT relocations. + +Fix it by treating PLT reference as GOT reference when plt.refcount is +not positive. + +2015-05-14 Max Filippov +bfd/ + * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference + as GOT reference when plt.refcount is not positive. + +Signed-off-by: Max Filippov +--- +Backported from: e6c9a083ec5ae7a45bd71682b26aae1939849388 +Changes to ChangeLog are dropped. + + bfd/elf32-xtensa.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 53af1c6..2523670 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -1360,10 +1360,14 @@ elf_xtensa_gc_sweep_hook (bfd *abfd, + { + if (is_plt) + { ++ /* If the symbol has been localized its plt.refcount got moved ++ to got.refcount. Handle it as GOT. */ + if (h->plt.refcount > 0) + h->plt.refcount--; ++ else ++ is_got = TRUE; + } +- else if (is_got) ++ if (is_got) + { + if (h->got.refcount > 0) + h->got.refcount--; +-- +1.8.1.4 + diff --git a/package/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch b/package/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch new file mode 100644 index 0000000000..4a3de2c839 --- /dev/null +++ b/package/binutils/2.23.2/912-xtensa-fix-gas-segfault-with-text-section-literals.patch @@ -0,0 +1,56 @@ +From 2d0522e76e4afeeb2e104e0a4332d94fa0d2fbf6 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sun, 17 May 2015 06:46:15 +0300 +Subject: [PATCH] xtensa: fix gas segfault with --text-section-literals + +When --text-section-literals is used and code in the .init or .fini +emits literal in the absence of .literal_position, xtensa_move_literals +segfaults. + +Check that search_frag is non-NULL in the xtensa_move_literals and +report error otherwise. + +2015-05-26 Max Filippov +gas/ + * config/tc-xtensa.c (xtensa_move_literals): Check that + search_frag is non-NULL. Report error if literal frag is not + found. + +Signed-off-by: Max Filippov +--- +Backported from: 4de0562a4c69fef4952aa7e19d7bda359f02e8b4 +Changes to ChangeLog are dropped. + + gas/config/tc-xtensa.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 31c0b6b..18307c1 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -10808,13 +10808,21 @@ xtensa_move_literals (void) + frchain_to = NULL; + frag_splice = &(frchain_from->frch_root); + +- while (!search_frag->tc_frag_data.literal_frag) ++ while (search_frag && !search_frag->tc_frag_data.literal_frag) + { + gas_assert (search_frag->fr_fix == 0 + || search_frag->fr_type == rs_align); + search_frag = search_frag->fr_next; + } + ++ if (!search_frag) ++ { ++ search_frag = frchain_from->frch_root; ++ as_bad_where (search_frag->fr_file, search_frag->fr_line, ++ _("literal pool location required for text-section-literals; specify with .literal_position")); ++ continue; ++ } ++ + gas_assert (search_frag->tc_frag_data.literal_frag->fr_subtype + == RELAX_LITERAL_POOL_BEGIN); + xtensa_switch_section_emit_state (&state, segment->seg, 0); +-- +1.8.1.4 + diff --git a/package/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch b/package/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch new file mode 100644 index 0000000000..2955e114e2 --- /dev/null +++ b/package/binutils/2.23.2/914-xtensa-fix-signedness-of-gas-relocations.patch @@ -0,0 +1,47 @@ +From 6c7c5c477ef9ccf2d2548cf2ac3cec9bd3c9c5b6 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 2 Feb 2016 17:11:38 +0300 +Subject: [PATCH] xtensa: fix signedness of gas relocations + +Change 1058c7532d0b "Use signed data type for R_XTENSA_DIFF* relocation +offsets." changed signedness of BFD_RELOC_XTENSA_DIFF* relocations +substituted for BFD_RELOC_*. This made it impossible to encode arbitrary +8-, 16- and 32-bit values, which broke e.g. debug info encoding by .loc +directive. Revert this part and add test. + +gas/ +2016-02-03 Max Filippov + * config/tc-xtensa.c (md_apply_fix): Mark BFD_RELOC_XTENSA_DIFF* + substitutions for BFD_RELOC_* as unsigned. + +Signed-off-by: Max Filippov +--- + gas/config/tc-xtensa.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index a119871..36a06cc 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) + { + case BFD_RELOC_8: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + case BFD_RELOC_16: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + case BFD_RELOC_32: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + default: + break; +-- +2.1.4 + diff --git a/package/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch b/package/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch new file mode 100644 index 0000000000..4bdd8a0277 --- /dev/null +++ b/package/binutils/2.23.2/915-xtensa-fix-.init-.fini-literals-moving.patch @@ -0,0 +1,70 @@ +From 7db2accc3fdea0aaa0c3a76a413d8e8030e022c3 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 16 Feb 2016 02:23:28 +0300 +Subject: [PATCH] xtensa: fix .init/.fini literals moving + +Despite the documentation and the comment in xtensa_move_literals, in +the presence of --text-section-literals and --auto-litpools literals are +moved from the separate literal sections into .init and .fini, because +the check in the xtensa_move_literals is incorrect. + +This moving was broken with introduction of auto litpools: some literals +now may be lost. This happens because literal frags emitted from .init +and .fini are not closed when new .literal_position marks new literal +pool. Then frag_align(2, 0, 0) changes type of the last literal frag to +rs_align. rs_align frags are skipped in the xtensa_move_literals. As a +result fixups against such literals are not moved out of .init.literal/ +.fini.literal sections producing the following assembler error: + + test.S: Warning: fixes not all moved from .init.literal + test.S: Internal error! + +Fix check for .init.literal/.fini.literal in the xtensa_move_literals +and don't let it move literals from there in the presence of +--text-section-literals or --auto-litpools. + +2016-02-17 Max Filippov +gas/ + * config/tc-xtensa.c (xtensa_move_literals): Fix check for + .init.literal/.fini.literal section name. + +Signed-off-by: Max Filippov +--- +Backported from: 4111950f363221c4641dc2f33bea61cc94f34906 + + gas/config/tc-xtensa.c | 12 ++++++++++-- + 1 file changed, 19 insertions(+), 2 deletions(-) + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 36a06cc..5773634 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -10625,5 +10625,9 @@ xtensa_move_literals (void) + fixS *fix, *next_fix, **fix_splice; + sym_list *lit; ++ const char *init_name = INIT_SECTION_NAME; ++ const char *fini_name = FINI_SECTION_NAME; ++ int init_name_len = strlen(init_name); ++ int fini_name_len = strlen(fini_name); + + mark_literal_frags (literal_head->next); + +@@ -10632,9 +10636,13 @@ xtensa_move_literals (void) + + for (segment = literal_head->next; segment; segment = segment->next) + { ++ const char *seg_name = segment_name (segment->seg); ++ + /* Keep the literals for .init and .fini in separate sections. */ +- if (!strcmp (segment_name (segment->seg), INIT_SECTION_NAME) +- || !strcmp (segment_name (segment->seg), FINI_SECTION_NAME)) ++ if ((!memcmp (seg_name, init_name, init_name_len) && ++ !strcmp (seg_name + init_name_len, ".literal")) || ++ (!memcmp (seg_name, fini_name, fini_name_len) && ++ !strcmp (seg_name + fini_name_len, ".literal"))) + continue; + + frchain_from = seg_info (segment->seg)->frchainP; +-- +2.1.4 + diff --git a/package/binutils/2.24/001-fix-enable-install-libiberty-flag.patch b/package/binutils/2.24/001-fix-enable-install-libiberty-flag.patch new file mode 100644 index 0000000000..e40840194d --- /dev/null +++ b/package/binutils/2.24/001-fix-enable-install-libiberty-flag.patch @@ -0,0 +1,46 @@ +From 369be6981b26787b2685e3b8c6da779dae8ce35f Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Mon, 6 Jan 2014 18:15:31 +0000 +Subject: [PATCH] libiberty: fix --enable-install-libiberty flag [PR 56780] + +Commit 199570 fixed the --disable-install-libiberty behavior, but it also +added a bug where the enable path never works because the initial clear +of target_header_dir wasn't deleted. So we end up initializing properly +at the top only to reset it at the end all the time. + +[Arnout: adapt to match 2.24 tarball] +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + libiberty/configure | 1 - + libiberty/configure.ac | 1 - + 3 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/libiberty/configure b/libiberty/configure +index 8ea54da..7bde9b3 100755 +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -5507,7 +5507,6 @@ fi + + setobjs= + CHECK= +-target_header_dir= + if test -n "${with_target_subdir}"; then + + # We are being configured as a target library. AC_REPLACE_FUNCS +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index 4ad88a9..d6180bc 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -405,7 +405,6 @@ fi + + setobjs= + CHECK= +-target_header_dir= + if test -n "${with_target_subdir}"; then + + # We are being configured as a target library. AC_REPLACE_FUNCS +-- +1.7.1 + diff --git a/package/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch b/package/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch new file mode 100644 index 0000000000..7881646981 --- /dev/null +++ b/package/binutils/2.24/002-dont-segv-on-initial-instructions-overflow.patch @@ -0,0 +1,66 @@ +From: Alan Modra +Date: Fri, 20 Dec 2013 13:27:52 +0000 (+1030) +Subject: Don't segv on cie.initial_instructions[] overflow. +X-Git-Tag: gdb-7.7-release~148 +X-Git-Url: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff_plain;h=99d190fac4d2aab238cfc798dc5c28ab41456882 + +Don't segv on cie.initial_instructions[] overflow. + +Don't attempt to merge CIEs with a larger number of insns than will +fit in the buffer. + + * elf-eh-frame.c (cie_eq): Return false when initial_insn_length + is too large. + (cie_compute_hash): Don't exceed bounds of initial_instructions. + (_bfd_elf_parse_eh_frame): Always set initial_insn_length, and + save as much of insns to initial_instructions[] as will fit. +--- + +diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c +index 832a991..4b6e8ea 100644 +--- a/bfd/elf-eh-frame.c ++++ b/bfd/elf-eh-frame.c +@@ -235,6 +235,7 @@ cie_eq (const void *e1, const void *e2) + && c1->lsda_encoding == c2->lsda_encoding + && c1->fde_encoding == c2->fde_encoding + && c1->initial_insn_length == c2->initial_insn_length ++ && c1->initial_insn_length <= sizeof (c1->initial_instructions) + && memcmp (c1->initial_instructions, + c2->initial_instructions, + c1->initial_insn_length) == 0) +@@ -254,6 +255,7 @@ static hashval_t + cie_compute_hash (struct cie *c) + { + hashval_t h = 0; ++ size_t len; + h = iterative_hash_object (c->length, h); + h = iterative_hash_object (c->version, h); + h = iterative_hash (c->augmentation, strlen (c->augmentation) + 1, h); +@@ -267,7 +269,10 @@ cie_compute_hash (struct cie *c) + h = iterative_hash_object (c->lsda_encoding, h); + h = iterative_hash_object (c->fde_encoding, h); + h = iterative_hash_object (c->initial_insn_length, h); +- h = iterative_hash (c->initial_instructions, c->initial_insn_length, h); ++ len = c->initial_insn_length; ++ if (len > sizeof (c->initial_instructions)) ++ len = sizeof (c->initial_instructions); ++ h = iterative_hash (c->initial_instructions, len, h); + c->hash = h; + return h; + } +@@ -762,11 +767,10 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, + cie->fde_encoding = DW_EH_PE_absptr; + + initial_insn_length = end - buf; +- if (initial_insn_length <= sizeof (cie->initial_instructions)) +- { +- cie->initial_insn_length = initial_insn_length; +- memcpy (cie->initial_instructions, buf, initial_insn_length); +- } ++ cie->initial_insn_length = initial_insn_length; ++ memcpy (cie->initial_instructions, buf, ++ initial_insn_length <= sizeof (cie->initial_instructions) ++ ? initial_insn_length : sizeof (cie->initial_instructions)); + insns = buf; + buf += initial_insn_length; + ENSURE_NO_RELOCS (buf); diff --git a/package/binutils/2.24/120-sh-conf.patch b/package/binutils/2.24/120-sh-conf.patch new file mode 100644 index 0000000000..ea3d1b6068 --- /dev/null +++ b/package/binutils/2.24/120-sh-conf.patch @@ -0,0 +1,29 @@ +r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines + +Likewise, binutils has no idea about any of these new targets either, so we +fix that up too.. now we're able to actually build a real toolchain for +sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more +inept targets than that one, really. Go look, I promise). + +--- a/configure ++++ b/configure +@@ -1495,7 +1495,7 @@ + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +--- a/configure.ac ++++ b/configure.ac +@@ -712,7 +712,7 @@ + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; diff --git a/package/binutils/2.24/300-001_ld_makefile_patch.patch b/package/binutils/2.24/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..5cb0f614d8 --- /dev/null +++ b/package/binutils/2.24/300-001_ld_makefile_patch.patch @@ -0,0 +1,24 @@ +diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.am binutils-2.17.50.0.17/ld/Makefile.am +--- binutils-2.17.50.0.17.oorig/ld/Makefile.am 2007-06-18 19:29:29.000000000 +0200 ++++ binutils-2.17.50.0.17/ld/Makefile.am 2007-06-25 10:00:36.000000000 +0200 +@@ -18,7 +18,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.in binutils-2.17.50.0.17/ld/Makefile.in +--- binutils-2.17.50.0.17.oorig/ld/Makefile.in 2007-06-18 19:29:29.000000000 +0200 ++++ binutils-2.17.50.0.17/ld/Makefile.in 2007-06-25 10:00:36.000000000 +0200 +@@ -287,7 +287,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include diff --git a/package/binutils/2.24/300-012_check_ldrunpath_length.patch b/package/binutils/2.24/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..df783109bb --- /dev/null +++ b/package/binutils/2.24/300-012_check_ldrunpath_length.patch @@ -0,0 +1,21 @@ +diff -Nura binutils-2.21.orig/ld/emultempl/elf32.em binutils-2.21/ld/emultempl/elf32.em +--- binutils-2.21.orig/ld/emultempl/elf32.em 2010-10-29 09:10:36.000000000 -0300 ++++ binutils-2.21/ld/emultempl/elf32.em 2010-12-10 09:26:56.746102724 -0300 +@@ -1270,6 +1270,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, &n, + force)) + break; +@@ -1497,6 +1499,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + + for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/package/binutils/2.24/500-sysroot.patch b/package/binutils/2.24/500-sysroot.patch new file mode 100644 index 0000000000..e49c795332 --- /dev/null +++ b/package/binutils/2.24/500-sysroot.patch @@ -0,0 +1,37 @@ +Signed-off-by: Sven Rebhan + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -308,18 +308,25 @@ + directory first. */ + if (! entry->flags.maybe_archive) + { +- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename); ++ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename) ++ && ld_sysroot) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->flags.sysrooted = TRUE; + return TRUE; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + return TRUE; + + if (IS_ABSOLUTE_PATH (entry->filename)) diff --git a/package/binutils/2.24/600-poison-system-directories.patch b/package/binutils/2.24/600-poison-system-directories.patch new file mode 100644 index 0000000000..6a3bf6be87 --- /dev/null +++ b/package/binutils/2.24/600-poison-system-directories.patch @@ -0,0 +1,279 @@ +Patch adapted to binutils 2.23.2 and extended to use +BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni. + +Signed-off-by: Thomas Petazzoni + +Upstream-Status: Inappropriate [distribution: codesourcery] + +Patch originally created by Mark Hatle, forward-ported to +binutils 2.21 by Scott Garman. + +purpose: warn for uses of system directories when cross linking + +Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 + +2008-07-02 Joseph Myers + + ld/ + * ld.h (args_type): Add error_poison_system_directories. + * ld.texinfo (--error-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.error_poison_system_directories. + * ldmain.c (main): Initialize + command_line.error_poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --error-poison-system-directories. + (parse_args): Handle new option. + +2007-06-13 Joseph Myers + + ld/ + * config.in: Regenerate. + * ld.h (args_type): Add poison_system_directories. + * ld.texinfo (--no-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.poison_system_directories. + * ldmain.c (main): Initialize + command_line.poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_NO_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --no-poison-system-directories. + (parse_args): Handle new option. + +2007-04-20 Joseph Myers + + Merge from Sourcery G++ binutils 2.17: + + 2007-03-20 Joseph Myers + Based on patch by Mark Hatle . + ld/ + * configure.in (--enable-poison-system-directories): New option. + * configure, config.in: Regenerate. + * ldfile.c (ldfile_add_library_path): If + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, + /usr/lib, /usr/local/lib or /usr/X11R6/lib. + +Signed-off-by: Mark Hatle +Signed-off-by: Scott Garman + +Index: b/ld/config.in +=================================================================== +--- a/ld/config.in ++++ b/ld/config.in +@@ -11,6 +11,9 @@ + language is requested. */ + #undef ENABLE_NLS + ++/* Define to warn for use of native system library directories */ ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++ + /* Additional extension a shared object might have. */ + #undef EXTRA_SHLIB_EXTENSION + +Index: b/ld/configure +=================================================================== +--- a/ld/configure ++++ b/ld/configure +@@ -774,6 +774,7 @@ + enable_targets + enable_64_bit_bfd + with_sysroot ++enable_poison_system_directories + enable_gold + enable_got + enable_werror +@@ -1429,6 +1430,8 @@ + (and sometimes confusing) to the casual installer + --enable-targets alternative target configurations + --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) ++ --enable-poison-system-directories ++ warn for use of native system library directories + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-got= GOT handling scheme (target, single, negative, + multigot) +@@ -4339,7 +4342,18 @@ + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then + ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi + + # Check whether --enable-got was given. + if test "${enable_got+set}" = set; then : +Index: b/ld/configure.in +=================================================================== +--- a/ld/configure.in ++++ b/ld/configure.in +@@ -87,6 +87,16 @@ + AC_SUBST(TARGET_SYSTEM_ROOT) + AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system library directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system library directories]) ++fi ++ + dnl Use --enable-gold to decide if this linker should be the default. + dnl "install_as_default" is set to false if gold is the default linker. + dnl "installed_linker" is the installed BFD linker name. +Index: b/ld/ldfile.c +=================================================================== +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -116,6 +116,23 @@ + new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL); + else + new_dirs->name = xstrdup (name); ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (command_line.poison_system_directories ++ && ((!strncmp (name, "/lib", 4)) ++ || (!strncmp (name, "/usr/lib", 8)) ++ || (!strncmp (name, "/usr/local/lib", 14)) ++ || (!strncmp (name, "/usr/X11R6/lib", 14)))) ++ { ++ if (command_line.error_poison_system_directories) ++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ else ++ einfo (_("%P: warning: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ } ++#endif ++ + } + + /* Try to open a BFD for a lang_input_statement. */ +Index: b/ld/ld.h +=================================================================== +--- a/ld/ld.h ++++ b/ld/ld.h +@@ -180,6 +180,14 @@ + /* If TRUE we'll just print the default output on stdout. */ + bfd_boolean print_output_format; + ++ /* If TRUE (the default) warn for uses of system directories when ++ cross linking. */ ++ bfd_boolean poison_system_directories; ++ ++ /* If TRUE (default FALSE) give an error for uses of system ++ directories when cross linking instead of a warning. */ ++ bfd_boolean error_poison_system_directories; ++ + /* Big or little endian as set on command line. */ + enum endian_enum endian; + +Index: b/ld/ldmain.c +=================================================================== +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -266,6 +266,8 @@ + command_line.warn_mismatch = TRUE; + command_line.warn_search_mismatch = TRUE; + command_line.check_section_addresses = -1; ++ command_line.poison_system_directories = TRUE; ++ command_line.error_poison_system_directories = FALSE; + + /* We initialize DEMANGLING based on the environment variable + COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the +Index: b/ld/ld.texinfo +=================================================================== +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo +@@ -2175,6 +2175,18 @@ + + Passing @code{none} for @var{style} disables the setting from any + @code{--build-id} options earlier on the command line. ++ ++@kindex --no-poison-system-directories ++@item --no-poison-system-directories ++Do not warn for @option{-L} options using system directories such as ++@file{/usr/lib} when cross linking. This option is intended for use ++in chroot environments when such directories contain the correct ++libraries for the target system rather than the host. ++ ++@kindex --error-poison-system-directories ++@item --error-poison-system-directories ++Give an error instead of a warning for @option{-L} options using ++system directories when cross linking. + @end table + + @c man end +Index: b/ld/lexsup.c +=================================================================== +--- a/ld/lexsup.c ++++ b/ld/lexsup.c +@@ -507,6 +507,14 @@ + OPTION_IGNORE_UNRESOLVED_SYMBOL}, + '\0', N_("SYMBOL"), + N_("Unresolved SYMBOL will not cause an error or warning"), TWO_DASHES }, ++ { {"no-poison-system-directories", no_argument, NULL, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Do not warn for -L options using system directories"), ++ TWO_DASHES }, ++ { {"error-poison-system-directories", no_argument, NULL, ++ + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Give an error for -L options using system directories"), ++ TWO_DASHES }, + }; + + #define OPTION_COUNT ARRAY_SIZE (ld_options) +@@ -519,6 +527,7 @@ + int ingroup = 0; + char *default_dirlist = NULL; + char *shortopts; ++ char *BR_paranoid_env; + struct option *longopts; + struct option *really_longopts; + int last_optind; +@@ -1442,9 +1451,21 @@ + einfo (_("%P%X: --hash-size needs a numeric argument\n")); + } + break; ++ ++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: ++ command_line.poison_system_directories = FALSE; ++ break; ++ ++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: ++ command_line.error_poison_system_directories = TRUE; ++ break; + } + } + ++ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0) ++ command_line.error_poison_system_directories = TRUE; ++ + while (ingroup) + { + lang_leave_group (); +Index: b/ld/ldlex.h +=================================================================== +--- a/ld/ldlex.h ++++ b/ld/ldlex.h +@@ -138,6 +138,8 @@ + OPTION_DEFAULT_SCRIPT, + OPTION_PRINT_OUTPUT_FORMAT, + OPTION_IGNORE_UNRESOLVED_SYMBOL, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, + }; + + /* The initial parser states. */ diff --git a/package/binutils/2.24/900-xtensa-trampolines.patch b/package/binutils/2.24/900-xtensa-trampolines.patch new file mode 100644 index 0000000000..b5b934fcab --- /dev/null +++ b/package/binutils/2.24/900-xtensa-trampolines.patch @@ -0,0 +1,846 @@ +From a82c7d9030b67a6a76a5403d0e1641f9e42141ac Mon Sep 17 00:00:00 2001 +From: David Weatherford +Date: Fri, 21 Mar 2014 11:53:42 +0000 +Subject: [PATCH] Add support to the Xtensa target for creating trampolines for + out-of-range branches. + + * tc-xtensa.c (xtensa_check_frag_count, xtensa_create_trampoline_frag) + (xtensa_maybe_create_trampoline_frag, init_trampoline_frag) + (find_trampoline_seg, search_trampolines, get_best_trampoline) + (check_and_update_trampolines, add_jump_to_trampoline) + (dump_trampolines): New function. + (md_parse_option): Add cases for --[no-]trampolines options. + (md_assemble, finish_vinsn, xtensa_end): Add call to + xtensa_check_frag_count. + (xg_assemble_vliw_tokens): Add call to + xtensa_maybe_create_trampoline_frag. + (xtensa_relax_frag): Relax fragments with RELAX_TRAMPOLINE state. + (relax_frag_immed): Relax jump instructions that cannot reach its + target. + * tc-xtensa.h (xtensa_relax_statesE::RELAX_TRAMPOLINE): New relax + state. + + * as.texinfo: Document --[no-]trampolines command-line options. + * c-xtensa.texi: Document trampolines relaxation and command line + options. + + * frags.c (get_frag_count, clear_frag_count): New function. + (frag_alloc): Increment totalfrags counter. + * frags.h (get_frag_count, clear_frag_count): New function. + + * all.exp: Add test for trampoline relaxation. + * trampoline.d: Trampoline relaxation expected dump. + * trampoline.s: Trampoline relaxation test source. +--- +Backported from: a82c7d9030b67a6a76a5403d0e1641f9e42141ac +Changes to Changelog files are dropped. + + gas/config/tc-xtensa.c | 558 +++++++++++++++++++++++++++++++++- + gas/config/tc-xtensa.h | 5 + + gas/frags.c | 15 + + gas/frags.h | 3 + + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/trampoline.d | 26 ++ + gas/testsuite/gas/xtensa/trampoline.s | 21 ++ + 11 files changed, 753 insertions(+), 2 deletions(-) + create mode 100644 gas/testsuite/gas/xtensa/trampoline.d + create mode 100644 gas/testsuite/gas/xtensa/trampoline.s + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index fe8ec0f..ea23c96 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -468,6 +468,12 @@ static void xtensa_set_frag_assembly_state (fragS *); + static void finish_vinsn (vliw_insn *); + static bfd_boolean emit_single_op (TInsn *); + static int total_frag_text_expansion (fragS *); ++static bfd_boolean use_trampolines = TRUE; ++static void xtensa_check_frag_count (void); ++static void xtensa_create_trampoline_frag (bfd_boolean); ++static void xtensa_maybe_create_trampoline_frag (void); ++struct trampoline_frag; ++static int init_trampoline_frag (struct trampoline_frag *); + + /* Alignment Functions. */ + +@@ -520,6 +526,7 @@ static void tinsn_from_chars (TInsn *, char *, int); + static void tinsn_immed_from_frag (TInsn *, fragS *, int); + static int get_num_stack_text_bytes (IStack *); + static int get_num_stack_literal_bytes (IStack *); ++static bfd_boolean tinsn_to_slotbuf (xtensa_format, int, TInsn *, xtensa_insnbuf); + + /* vliw_insn functions. */ + +@@ -687,7 +694,10 @@ enum + option_prefer_l32r, + option_prefer_const16, + +- option_target_hardware ++ option_target_hardware, ++ ++ option_trampolines, ++ option_no_trampolines, + }; + + const char *md_shortopts = ""; +@@ -760,6 +770,9 @@ struct option md_longopts[] = + + { "target-hardware", required_argument, NULL, option_target_hardware }, + ++ { "trampolines", no_argument, NULL, option_trampolines }, ++ { "no-trampolines", no_argument, NULL, option_no_trampolines }, ++ + { NULL, no_argument, NULL, 0 } + }; + +@@ -940,6 +953,14 @@ md_parse_option (int c, char *arg) + directive_state[directive_transform] = FALSE; + return 1; + ++ case option_trampolines: ++ use_trampolines = TRUE; ++ return 1; ++ ++ case option_no_trampolines: ++ use_trampolines = FALSE; ++ return 1; ++ + default: + return 0; + } +@@ -963,7 +984,9 @@ Xtensa options:\n\ + flix bundles\n\ + --no-allow-flix neither allow hand-written nor generate\n\ + flix bundles\n\ +- --rename-section old=new Rename section 'old' to 'new'\n", stream); ++ --rename-section old=new Rename section 'old' to 'new'\n\ ++ --[no-]trampolines [Do not] generate trampolines (jumps to jumps)\n\ ++ when jumps do not reach their targets\n", stream); + } + + +@@ -5568,6 +5591,8 @@ md_assemble (char *str) + + /* We've just emitted a new instruction so clear the list of labels. */ + xtensa_clear_insn_labels (); ++ ++ xtensa_check_frag_count (); + } + + +@@ -6372,6 +6397,8 @@ finish_vinsn (vliw_insn *vinsn) + xg_assemble_vliw_tokens (vinsn); + + xg_clear_vinsn (vinsn); ++ ++ xtensa_check_frag_count (); + } + + +@@ -7140,6 +7167,7 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn) + RELAX_UNREACHABLE, + frag_now->fr_symbol, frag_now->fr_offset, NULL); + xtensa_set_frag_assembly_state (frag_now); ++ xtensa_maybe_create_trampoline_frag (); + } + else if (is_branch && do_align_targets ()) + { +@@ -7222,9 +7250,164 @@ xtensa_end (void) + xtensa_sanity_check (); + + xtensa_add_config_info (); ++ ++ xtensa_check_frag_count (); ++} ++ ++ ++struct trampoline_frag ++{ ++ struct trampoline_frag *next; ++ bfd_boolean needs_jump_around; ++ fragS *fragP; ++ fixS *fixP; ++}; ++ ++struct trampoline_seg ++{ ++ struct trampoline_seg *next; ++ asection *seg; ++ struct trampoline_frag trampoline_list; ++}; ++ ++static struct trampoline_seg trampoline_seg_list; ++#define J_RANGE (128 * 1024) ++ ++static int unreachable_count = 0; ++ ++ ++static void ++xtensa_maybe_create_trampoline_frag (void) ++{ ++ if (!use_trampolines) ++ return; ++ ++ /* We create an area for possible trampolines every 10 unreachable frags. ++ These are preferred over the ones not preceded by an unreachable frag, ++ because we don't have to jump around them. This function is called after ++ each RELAX_UNREACHABLE frag is created. */ ++ ++ if (++unreachable_count > 10) ++ { ++ xtensa_create_trampoline_frag (FALSE); ++ clear_frag_count (); ++ unreachable_count = 0; ++ } ++} ++ ++static void ++xtensa_check_frag_count (void) ++{ ++ if (!use_trampolines || frag_now->tc_frag_data.is_no_transform) ++ return; ++ ++ /* We create an area for possible trampolines every 8000 frags or so. This ++ is an estimate based on the max range of a "j" insn (+/-128K) divided ++ by a typical frag byte count (16), minus a few for safety. This function ++ is called after each source line is processed. */ ++ ++ if (get_frag_count () > 8000) ++ { ++ xtensa_create_trampoline_frag (TRUE); ++ clear_frag_count (); ++ unreachable_count = 0; ++ } ++} ++ ++static xtensa_insnbuf trampoline_buf = NULL; ++static xtensa_insnbuf trampoline_slotbuf = NULL; ++ ++#define TRAMPOLINE_FRAG_SIZE 3000 ++ ++static void ++xtensa_create_trampoline_frag (bfd_boolean needs_jump_around) ++{ ++ /* Emit a frag where we can place intermediate jump instructions, ++ in case we need to jump farther than 128K bytes. ++ Each jump instruction takes three bytes. ++ We allocate enough for 1000 trampolines in each frag. ++ If that's not enough, oh well. */ ++ ++ struct trampoline_seg *ts = trampoline_seg_list.next; ++ struct trampoline_frag *tf; ++ char *varP; ++ fragS *fragP; ++ int size = TRAMPOLINE_FRAG_SIZE; ++ ++ for ( ; ts; ts = ts->next) ++ { ++ if (ts->seg == now_seg) ++ break; ++ } ++ ++ if (ts == NULL) ++ { ++ ts = (struct trampoline_seg *)xcalloc(sizeof (struct trampoline_seg), 1); ++ ts->next = trampoline_seg_list.next; ++ trampoline_seg_list.next = ts; ++ ts->seg = now_seg; ++ } ++ ++ frag_wane (frag_now); ++ frag_new (0); ++ xtensa_set_frag_assembly_state (frag_now); ++ varP = frag_var (rs_machine_dependent, size, size, RELAX_TRAMPOLINE, NULL, 0, NULL); ++ fragP = (fragS *)(varP - SIZEOF_STRUCT_FRAG); ++ if (trampoline_buf == NULL) ++ { ++ trampoline_buf = xtensa_insnbuf_alloc (xtensa_default_isa); ++ trampoline_slotbuf = xtensa_insnbuf_alloc (xtensa_default_isa); ++ } ++ tf = (struct trampoline_frag *)xmalloc(sizeof (struct trampoline_frag)); ++ tf->next = ts->trampoline_list.next; ++ ts->trampoline_list.next = tf; ++ tf->needs_jump_around = needs_jump_around; ++ tf->fragP = fragP; ++ tf->fixP = NULL; ++} ++ ++ ++static struct trampoline_seg * ++find_trampoline_seg (asection *seg) ++{ ++ struct trampoline_seg *ts = trampoline_seg_list.next; ++ ++ for ( ; ts; ts = ts->next) ++ { ++ if (ts->seg == seg) ++ return ts; ++ } ++ ++ return NULL; + } + + ++void dump_trampolines (void); ++ ++void ++dump_trampolines (void) ++{ ++ struct trampoline_seg *ts = trampoline_seg_list.next; ++ ++ for ( ; ts; ts = ts->next) ++ { ++ asection *seg = ts->seg; ++ ++ if (seg == NULL) ++ continue; ++ fprintf(stderr, "SECTION %s\n", seg->name); ++ struct trampoline_frag *tf = ts->trampoline_list.next; ++ for ( ; tf; tf = tf->next) ++ { ++ if (tf->fragP == NULL) ++ continue; ++ fprintf(stderr, " 0x%08x: fix=%d, jump_around=%s\n", ++ (int)tf->fragP->fr_address, (int)tf->fragP->fr_fix, ++ tf->needs_jump_around ? "T" : "F"); ++ } ++ } ++} ++ + static void + xtensa_cleanup_align_frags (void) + { +@@ -8708,6 +8891,149 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) + new_stretch += relax_frag_for_align (fragP, stretch); + break; + ++ case RELAX_TRAMPOLINE: ++ if (fragP->tc_frag_data.relax_seen) ++ { ++ segment_info_type *seginfo = seg_info (now_seg); ++ fragS *fP; /* The out-of-range jump. */ ++ fixS *fixP; ++ ++ /* Scan for jumps that will not reach. */ ++ for (fixP = seginfo->fix_root; fixP ; fixP = fixP->fx_next) ++ { ++ symbolS *s = fixP->fx_addsy; ++ xtensa_opcode opcode; ++ int target; ++ int addr; ++ int delta; ++ ++ if (fixP->fx_r_type < BFD_RELOC_XTENSA_SLOT0_OP || ++ fixP->fx_r_type > BFD_RELOC_XTENSA_SLOT14_OP) ++ continue; ++ xtensa_insnbuf_from_chars (isa, trampoline_buf, ++ (unsigned char *) fixP->fx_frag->fr_literal + fixP->fx_where, ++ 0); ++ fmt = xtensa_format_decode (isa, trampoline_buf); ++ gas_assert (fmt != XTENSA_UNDEFINED); ++ slot = fixP->tc_fix_data.slot; ++ xtensa_format_get_slot (isa, fmt, slot, trampoline_buf, trampoline_slotbuf); ++ opcode = xtensa_opcode_decode (isa, fmt, slot, trampoline_slotbuf); ++ if (opcode != xtensa_j_opcode) ++ continue; ++ target = S_GET_VALUE (s); ++ addr = fixP->fx_frag->fr_address; ++ delta = target - addr + stretch; ++ if (delta > J_RANGE || delta < -1 * J_RANGE) ++ { /* Found an out-of-range jump; scan the list of trampolines for the best match. */ ++ struct trampoline_seg *ts = find_trampoline_seg (now_seg); ++ struct trampoline_frag *tf = ts->trampoline_list.next; ++ struct trampoline_frag *prev = &ts->trampoline_list; ++ int lower = (target < addr) ? target : addr; ++ int upper = (target > addr) ? target : addr; ++ int midpoint = lower + (upper - lower) / 2; ++ ++ if ((upper - lower) > 2 * J_RANGE) ++ { ++ /* One trampoline won't suffice; we need multiple jumps. ++ Jump to the trampoline that's farthest, but still in ++ range relative to the original "j" instruction. */ ++ for ( ; tf; prev = tf, tf = tf->next ) ++ { ++ int this_addr = tf->fragP->fr_address + tf->fragP->fr_fix; ++ int next_addr = (tf->next) ? tf->next->fragP->fr_address + tf->next->fragP->fr_fix : 0 ; ++ ++ if (addr == lower) ++ { ++ /* Forward jump. */ ++ if (this_addr - addr < J_RANGE) ++ break; ++ } ++ else ++ { ++ /* Backward jump. */ ++ if (next_addr == 0 || addr - next_addr > J_RANGE) ++ break; ++ } ++ } ++ } ++ else ++ { ++ struct trampoline_frag *best_tf = NULL; ++ int best_delta = 0; ++ ++ for ( ; tf; prev = tf, tf = tf->next ) ++ { ++ int this_addr = tf->fragP->fr_address + tf->fragP->fr_fix; ++ int this_delta = abs (this_addr - midpoint); ++ ++ if (!best_tf || this_delta < best_delta) ++ { ++ best_tf = tf; ++ best_delta = this_delta; ++ } ++ } ++ tf = best_tf; ++ } ++ if (tf->fragP == fragP) ++ { ++ int trampaddr = fragP->fr_address + fragP->fr_fix; ++ ++ if (abs (addr - trampaddr) < J_RANGE) ++ { /* The trampoline is in range of original; fix it! */ ++ fixS *newfixP; ++ int offset; ++ TInsn insn; ++ symbolS *lsym; ++ ++ new_stretch += init_trampoline_frag (tf); ++ offset = fragP->fr_fix; /* Where to assemble the j insn. */ ++ lsym = fragP->fr_symbol; ++ fP = fixP->fx_frag; ++ /* Assemble a jump to the target label here. */ ++ tinsn_init (&insn); ++ insn.insn_type = ITYPE_INSN; ++ insn.opcode = xtensa_j_opcode; ++ insn.ntok = 1; ++ set_expr_symbol_offset (&insn.tok[0], lsym, offset); ++ fmt = xg_get_single_format (xtensa_j_opcode); ++ tinsn_to_slotbuf (fmt, 0, &insn, trampoline_slotbuf); ++ xtensa_format_set_slot (isa, fmt, 0, trampoline_buf, trampoline_slotbuf); ++ xtensa_insnbuf_to_chars (isa, trampoline_buf, (unsigned char *)fragP->fr_literal + offset, 3); ++ fragP->fr_fix += 3; ++ fragP->fr_var -= 3; ++ /* Add a fix-up for the original j insn. */ ++ newfixP = fix_new (fP, fixP->fx_where, fixP->fx_size, lsym, fragP->fr_fix - 3, TRUE, fixP->fx_r_type); ++ newfixP->fx_no_overflow = 1; ++ newfixP->tc_fix_data.X_add_symbol = lsym; ++ newfixP->tc_fix_data.X_add_number = offset; ++ newfixP->tc_fix_data.slot = slot; ++ /* Move the fix-up from the original j insn to this one. */ ++ fixP->fx_frag = fragP; ++ fixP->fx_where = fragP->fr_fix - 3; ++ fixP->tc_fix_data.slot = 0; ++ /* Adjust the jump around this trampoline (if present). */ ++ if (tf->fixP != NULL) ++ { ++ tf->fixP->fx_offset += 3; ++ } ++ new_stretch += 3; ++ fragP->tc_frag_data.relax_seen = FALSE; /* Need another pass. */ ++ /* Do we have room for more? */ ++ if (fragP->fr_var < 3) ++ { /* No, convert to fill. */ ++ frag_wane (fragP); ++ fragP->fr_subtype = 0; ++ /* Remove from the trampoline_list. */ ++ prev->next = tf->next; ++ break; ++ } ++ } ++ } ++ } ++ } ++ } ++ break; ++ + default: + as_bad (_("bad relaxation state")); + } +@@ -9146,6 +9472,200 @@ bytes_to_stretch (fragS *this_frag, + } + + ++static struct trampoline_frag * ++search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only) ++{ ++ struct trampoline_seg *ts = find_trampoline_seg (now_seg); ++ struct trampoline_frag *tf = (ts) ? ts->trampoline_list.next : NULL; ++ struct trampoline_frag *best_tf = NULL; ++ int best_delta = 0; ++ int best_addr = 0; ++ symbolS *sym = tinsn->tok[0].X_add_symbol; ++ offsetT target = S_GET_VALUE (sym) + tinsn->tok[0].X_add_number; ++ offsetT addr = fragP->fr_address; ++ offsetT lower = (addr < target) ? addr : target; ++ offsetT upper = (addr > target) ? addr : target; ++ int delta = upper - lower; ++ offsetT midpoint = lower + delta / 2; ++ int this_delta = -1; ++ int this_addr = -1; ++ ++ if (delta > 2 * J_RANGE) ++ { ++ /* One trampoline won't do; we need multiple. ++ Choose the farthest trampoline that's still in range of the original ++ and let a later pass finish the job. */ ++ for ( ; tf; tf = tf->next) ++ { ++ int next_addr = (tf->next) ? tf->next->fragP->fr_address + tf->next->fragP->fr_fix : 0; ++ ++ this_addr = tf->fragP->fr_address + tf->fragP->fr_fix; ++ if (lower == addr) ++ { ++ /* Forward jump. */ ++ if (this_addr - addr < J_RANGE) ++ break; ++ } ++ else ++ { ++ /* Backward jump. */ ++ if (next_addr == 0 || addr - next_addr > J_RANGE) ++ break; ++ } ++ if (abs (addr - this_addr) < J_RANGE) ++ return tf; ++ ++ return NULL; ++ } ++ } ++ for ( ; tf; tf = tf->next) ++ { ++ this_addr = tf->fragP->fr_address + tf->fragP->fr_fix; ++ this_delta = abs (this_addr - midpoint); ++ if (unreachable_only && tf->needs_jump_around) ++ continue; ++ if (!best_tf || this_delta < best_delta) ++ { ++ best_tf = tf; ++ best_delta = this_delta; ++ best_addr = this_addr; ++ } ++ } ++ ++ if (best_tf && ++ best_delta < J_RANGE && ++ abs(best_addr - lower) < J_RANGE && ++ abs(best_addr - upper) < J_RANGE) ++ return best_tf; ++ ++ return NULL; /* No suitable trampoline found. */ ++} ++ ++ ++static struct trampoline_frag * ++get_best_trampoline (TInsn *tinsn, fragS *fragP) ++{ ++ struct trampoline_frag *tf = NULL; ++ ++ tf = search_trampolines (tinsn, fragP, TRUE); /* Try unreachable first. */ ++ ++ if (tf == NULL) ++ tf = search_trampolines (tinsn, fragP, FALSE); /* Try ones needing a jump-around, too. */ ++ ++ return tf; ++} ++ ++ ++static void ++check_and_update_trampolines (void) ++{ ++ struct trampoline_seg *ts = find_trampoline_seg (now_seg); ++ struct trampoline_frag *tf = ts->trampoline_list.next; ++ struct trampoline_frag *prev = &ts->trampoline_list; ++ ++ for ( ; tf; prev = tf, tf = tf->next) ++ { ++ if (tf->fragP->fr_var < 3) ++ { ++ frag_wane (tf->fragP); ++ prev->next = tf->next; ++ tf->fragP = NULL; ++ } ++ } ++} ++ ++ ++static int ++init_trampoline_frag (struct trampoline_frag *trampP) ++{ ++ fragS *fp = trampP->fragP; ++ int growth = 0; ++ ++ if (fp->fr_fix == 0) ++ { ++ symbolS *lsym; ++ char label[10 + 2 * sizeof(fp)]; ++ sprintf (label, ".L0_TR_%p", fp); ++ ++ lsym = (symbolS *)local_symbol_make (label, now_seg, 0, fp); ++ fp->fr_symbol = lsym; ++ if (trampP->needs_jump_around) ++ { ++ /* Add a jump around this block of jumps, in case ++ control flows into this block. */ ++ fixS *fixP; ++ TInsn insn; ++ xtensa_format fmt; ++ xtensa_isa isa = xtensa_default_isa; ++ ++ fp->tc_frag_data.is_insn = 1; ++ /* Assemble a jump insn. */ ++ tinsn_init (&insn); ++ insn.insn_type = ITYPE_INSN; ++ insn.opcode = xtensa_j_opcode; ++ insn.ntok = 1; ++ set_expr_symbol_offset (&insn.tok[0], lsym, 3); ++ fmt = xg_get_single_format (xtensa_j_opcode); ++ tinsn_to_slotbuf (fmt, 0, &insn, trampoline_slotbuf); ++ xtensa_format_set_slot (isa, fmt, 0, trampoline_buf, trampoline_slotbuf); ++ xtensa_insnbuf_to_chars (isa, trampoline_buf, (unsigned char *)fp->fr_literal, 3); ++ fp->fr_fix += 3; ++ fp->fr_var -= 3; ++ growth = 3; ++ fixP = fix_new (fp, 0, 3, lsym, 3, TRUE, BFD_RELOC_XTENSA_SLOT0_OP); ++ trampP->fixP = fixP; ++ } ++ } ++ return growth; ++} ++ ++ ++static int ++add_jump_to_trampoline (struct trampoline_frag *trampP, fragS *origfrag) ++{ ++ fragS *tramp = trampP->fragP; ++ fixS *fixP; ++ int offset = tramp->fr_fix; /* Where to assemble the j insn. */ ++ TInsn insn; ++ symbolS *lsym; ++ symbolS *tsym; ++ int toffset; ++ xtensa_format fmt; ++ xtensa_isa isa = xtensa_default_isa; ++ int growth = 0; ++ ++ lsym = tramp->fr_symbol; ++ /* Assemble a jump to the target label in the trampoline frag. */ ++ tsym = origfrag->tc_frag_data.slot_symbols[0]; ++ toffset = origfrag-> tc_frag_data.slot_offsets[0]; ++ tinsn_init (&insn); ++ insn.insn_type = ITYPE_INSN; ++ insn.opcode = xtensa_j_opcode; ++ insn.ntok = 1; ++ set_expr_symbol_offset (&insn.tok[0], tsym, toffset); ++ fmt = xg_get_single_format (xtensa_j_opcode); ++ tinsn_to_slotbuf (fmt, 0, &insn, trampoline_slotbuf); ++ xtensa_format_set_slot (isa, fmt, 0, trampoline_buf, trampoline_slotbuf); ++ xtensa_insnbuf_to_chars (isa, trampoline_buf, (unsigned char *)tramp->fr_literal + offset, 3); ++ tramp->fr_fix += 3; ++ tramp->fr_var -= 3; ++ growth = 3; ++ /* add a fix-up for the trampoline jump. */ ++ fixP = fix_new (tramp, tramp->fr_fix - 3, 3, tsym, toffset, TRUE, BFD_RELOC_XTENSA_SLOT0_OP); ++ /* Modify the jump at the start of this trampoline to point past the newly-added jump. */ ++ fixP = trampP->fixP; ++ if (fixP) ++ fixP->fx_offset += 3; ++ /* Modify the original j to point here. */ ++ origfrag->tc_frag_data.slot_symbols[0] = lsym; ++ origfrag->tc_frag_data.slot_offsets[0] = tramp->fr_fix - 3; ++ /* If trampoline is full, remove it from the list. */ ++ check_and_update_trampolines (); ++ ++ return growth; ++} ++ ++ + static long + relax_frag_immed (segT segP, + fragS *fragP, +@@ -9284,6 +9804,37 @@ relax_frag_immed (segT segP, + if (negatable_branch && istack.ninsn > 1) + update_next_frag_state (fragP); + ++ /* If last insn is a jump, and it cannot reach its target, try to find a trampoline. */ ++ if (istack.ninsn > 2 && ++ istack.insn[istack.ninsn - 1].insn_type == ITYPE_LABEL && ++ istack.insn[istack.ninsn - 2].insn_type == ITYPE_INSN && ++ istack.insn[istack.ninsn - 2].opcode == xtensa_j_opcode) ++ { ++ TInsn *jinsn = &istack.insn[istack.ninsn - 2]; ++ ++ if (!xg_symbolic_immeds_fit (jinsn, segP, fragP, fragP->fr_offset, total_text_diff)) ++ { ++ struct trampoline_frag *tf = get_best_trampoline (jinsn, fragP); ++ ++ if (tf) ++ { ++ this_text_diff += init_trampoline_frag (tf); ++ this_text_diff += add_jump_to_trampoline (tf, fragP); ++ } ++ else ++ { ++ /* If target symbol is undefined, assume it will reach once linked. */ ++ expressionS *exp = &istack.insn[istack.ninsn - 2].tok[0]; ++ ++ if (exp->X_op == O_symbol && S_IS_DEFINED (exp->X_add_symbol)) ++ { ++ as_bad_where (fragP->fr_file, fragP->fr_line, ++ _("jump target out of range; no usable trampoline found")); ++ } ++ } ++ } ++ } ++ + return this_text_diff; + } + +@@ -9404,6 +9955,9 @@ md_convert_frag (bfd *abfd ATTRIBUTE_UNUSED, segT sec, fragS *fragp) + else + as_bad (_("invalid relaxation fragment result")); + break; ++ ++ case RELAX_TRAMPOLINE: ++ break; + } + + fragp->fr_var = 0; +diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h +index 0bf1240..4672bc6 100644 +--- a/gas/config/tc-xtensa.h ++++ b/gas/config/tc-xtensa.h +@@ -180,6 +180,11 @@ enum xtensa_relax_statesE + prevent the linker from changing the size of any frag between the + section start and the org frag. */ + ++ RELAX_TRAMPOLINE, ++ /* Every few thousand frags, we insert one of these, just in case we may ++ need some space for a trampoline (jump to a jump) because the function ++ has gotten too big. If not needed, it disappears. */ ++ + RELAX_NONE + }; + +diff --git a/gas/frags.c b/gas/frags.c +index 5f68480..e14099d 100644 +--- a/gas/frags.c ++++ b/gas/frags.c +@@ -24,6 +24,20 @@ + + extern fragS zero_address_frag; + extern fragS predefined_address_frag; ++ ++static int totalfrags; ++ ++int ++get_frag_count (void) ++{ ++ return totalfrags; ++} ++ ++void ++clear_frag_count (void) ++{ ++ totalfrags = 0; ++} + + /* Initialization for frag routines. */ + +@@ -70,6 +84,7 @@ frag_alloc (struct obstack *ob) + ptr = (fragS *) obstack_alloc (ob, SIZEOF_STRUCT_FRAG); + obstack_alignment_mask (ob) = oalign; + memset (ptr, 0, SIZEOF_STRUCT_FRAG); ++ totalfrags++; + return ptr; + } + +diff --git a/gas/frags.h b/gas/frags.h +index 319898f..2f9e1b5 100644 +--- a/gas/frags.h ++++ b/gas/frags.h +@@ -155,4 +155,7 @@ char *frag_var (relax_stateT type, + + bfd_boolean frag_offset_fixed_p (const fragS *, const fragS *, offsetT *); + ++int get_frag_count (void); ++void clear_frag_count (void); ++ + #endif /* FRAGS_H */ +diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp +index 2b2c294..3683b78 100644 +--- a/gas/testsuite/gas/xtensa/all.exp ++++ b/gas/testsuite/gas/xtensa/all.exp +@@ -98,6 +98,7 @@ if [istarget xtensa*-*-*] then { + run_dump_test "pcrel" + run_dump_test "weak-call" + run_dump_test "jlong" ++ run_dump_test "trampoline" + } + + if [info exists errorInfo] then { +diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d +new file mode 100644 +index 0000000..b4f65dc +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/trampoline.d +@@ -0,0 +1,26 @@ ++#as: ++#objdump: -d ++#name: trampolines relaxation ++ ++.*: +file format .*xtensa.* ++#... ++.*0:.*j.0x1194c ++.*3:.*j.0x1194f ++.*6:.*j.0x11952 ++.*9:.*j.0x1d4e4 ++#... ++.*11949:.*j.0x11955 ++.*1194c:.*j.0x24a0e ++.*1194f:.*j.0x24a0e ++.*11952:.*j.0x24a11 ++#... ++.*1d4e1:.*j.0x1d4e7 ++.*1d4e4:.*j.0x33462 ++#... ++.*24a0e:.*j.0x24a0e ++.*24a11:.*j.0x24a11 ++#... ++.*3345f:.*ret ++.*33462:.*j.0x49407 ++#... ++.*49407:.*j.0x49407 +diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s +new file mode 100644 +index 0000000..259a3bb +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/trampoline.s +@@ -0,0 +1,21 @@ ++ .text ++ j 1f ++ j 1f ++ j 2f ++ j 3f ++ .rep 25000 ++99: ++ and a2, a2, a3 ++ bne a2, a3, 99b ++ .endr ++1: ++ j 1b ++2: ++ j 2b ++ ++ .rep 25000 ++ and a2, a2, a3 ++ _ret ++ .endr ++3: ++ j 3b +-- +1.8.1.4 + diff --git a/package/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch b/package/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch new file mode 100644 index 0000000000..e1c2d85aa8 --- /dev/null +++ b/package/binutils/2.24/901-xtensa-gas-first-frag-alignment.patch @@ -0,0 +1,51 @@ +From a35d5e823fdfe8a6e7e05ca8e3fb8bb5697335b1 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 15 Apr 2014 19:12:46 +0400 +Subject: [PATCH] Fix alignment for the first section frag on xtensa + +Linking object files produced by partial linking with link-time +relaxation enabled sometimes fails with the following error message: + +dangerous relocation: call8: misaligned call target: (.text.unlikely+0x63) + +This happens because no basic block with an XTENSA_PROP_ALIGN flag in the +property table is generated for the first basic block, even if the +.align directive is present. +It was believed that the first frag alignment could be derived from the +section alignment, but this was not implemented for the partial linking +case: after partial linking first frag of a section may become not +first, but no additional alignment frag is inserted before it. +Basic block for such frag may be merged with previous basic block into +extended basic block during relaxation pass losing its alignment +restrictions. + +Fix this by always recording alignment for the first section frag. + +2014-04-22 Max Filippov + +gas/ + * config/tc-xtensa.c (xtensa_handle_align): record alignment for the + first section frag. + +--- +Backported from: a35d5e823fdfe8a6e7e05ca8e3fb8bb5697335b1 +Changes to Changelog files and tests are dropped. + + gas/config/tc-xtensa.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index ea23c96..58ace38 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -5609,7 +5609,6 @@ xtensa_handle_align (fragS *fragP) + && ! fragP->tc_frag_data.is_literal + && (fragP->fr_type == rs_align + || fragP->fr_type == rs_align_code) +- && fragP->fr_address + fragP->fr_fix > 0 + && fragP->fr_offset > 0 + && now_seg != bss_section) + { +-- +1.8.1.4 + diff --git a/package/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch b/package/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch new file mode 100644 index 0000000000..ba24f4e4b0 --- /dev/null +++ b/package/binutils/2.24/902-xtensa-gas-ld-diff-relocation-signed.patch @@ -0,0 +1,133 @@ +From 6a17eba5358549d0d6d195bb22b34cdbc068def2 Mon Sep 17 00:00:00 2001 +From: Volodymyr Arbatov +Date: Mon, 6 May 2013 09:43:21 -0800 +Subject: [PATCH] Use signed data type for R_XTENSA_DIFF* relocation offsets. + +R_XTENSA_DIFF relocation offsets are in fact signed. Treat them as such. +Add testcase that examines ld behaviour on R_XTENSA_DIFF relocation +changing sign during relaxation. + +2014-05-02 Volodymyr Arbatov + David Weatherford + Max Filippov + +bfd/ + * elf32-xtensa.c (relax_section): treat R_XTENSA_DIFF* relocations as + signed. + +gas/ + * config/tc-xtensa.c (md_apply_fix): mark BFD_RELOC_XTENSA_DIFF* + fixups as signed. +--- +Backported from: 1058c7532d0b012ac329219264ddad59049fb6e6 +Changes to Changelog files and tests are dropped. + + bfd/elf32-xtensa.c | 32 ++++++++++++----------- + gas/config/tc-xtensa.c | 3 +++ + 2 files changed, 20 insertions(+), 15 deletions(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index edb04b4..8818d67 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -222,11 +222,11 @@ static reloc_howto_type elf_howto_table[] = + FALSE, 0, 0, FALSE), + + /* Relocations for supporting difference of symbols. */ +- HOWTO (R_XTENSA_DIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, ++ HOWTO (R_XTENSA_DIFF8, 0, 0, 8, FALSE, 0, complain_overflow_signed, + bfd_elf_xtensa_reloc, "R_XTENSA_DIFF8", FALSE, 0, 0xff, FALSE), +- HOWTO (R_XTENSA_DIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, ++ HOWTO (R_XTENSA_DIFF16, 0, 1, 16, FALSE, 0, complain_overflow_signed, + bfd_elf_xtensa_reloc, "R_XTENSA_DIFF16", FALSE, 0, 0xffff, FALSE), +- HOWTO (R_XTENSA_DIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, ++ HOWTO (R_XTENSA_DIFF32, 0, 2, 32, FALSE, 0, complain_overflow_signed, + bfd_elf_xtensa_reloc, "R_XTENSA_DIFF32", FALSE, 0, 0xffffffff, FALSE), + + /* General immediate operand relocations. */ +@@ -9013,7 +9013,8 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + || r_type == R_XTENSA_DIFF16 + || r_type == R_XTENSA_DIFF32) + { +- bfd_vma diff_value = 0, new_end_offset, diff_mask = 0; ++ bfd_signed_vma diff_value = 0; ++ bfd_vma new_end_offset, diff_mask = 0; + + if (bfd_get_section_limit (abfd, sec) < old_source_offset) + { +@@ -9027,15 +9028,15 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + { + case R_XTENSA_DIFF8: + diff_value = +- bfd_get_8 (abfd, &contents[old_source_offset]); ++ bfd_get_signed_8 (abfd, &contents[old_source_offset]); + break; + case R_XTENSA_DIFF16: + diff_value = +- bfd_get_16 (abfd, &contents[old_source_offset]); ++ bfd_get_signed_16 (abfd, &contents[old_source_offset]); + break; + case R_XTENSA_DIFF32: + diff_value = +- bfd_get_32 (abfd, &contents[old_source_offset]); ++ bfd_get_signed_32 (abfd, &contents[old_source_offset]); + break; + } + +@@ -9047,24 +9048,25 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + switch (r_type) + { + case R_XTENSA_DIFF8: +- diff_mask = 0xff; +- bfd_put_8 (abfd, diff_value, ++ diff_mask = 0x7f; ++ bfd_put_signed_8 (abfd, diff_value, + &contents[old_source_offset]); + break; + case R_XTENSA_DIFF16: +- diff_mask = 0xffff; +- bfd_put_16 (abfd, diff_value, ++ diff_mask = 0x7fff; ++ bfd_put_signed_16 (abfd, diff_value, + &contents[old_source_offset]); + break; + case R_XTENSA_DIFF32: +- diff_mask = 0xffffffff; +- bfd_put_32 (abfd, diff_value, ++ diff_mask = 0x7fffffff; ++ bfd_put_signed_32 (abfd, diff_value, + &contents[old_source_offset]); + break; + } + +- /* Check for overflow. */ +- if ((diff_value & ~diff_mask) != 0) ++ /* Check for overflow. Sign bits must be all zeroes or all ones */ ++ if ((diff_value & ~diff_mask) != 0 && ++ (diff_value & ~diff_mask) != (-1 & ~diff_mask)) + { + (*link_info->callbacks->reloc_dangerous) + (link_info, _("overflow after relaxation"), +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 58ace38..7547c0a0 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -5867,12 +5867,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) + { + case BFD_RELOC_8: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8; ++ fixP->fx_signed = 1; + break; + case BFD_RELOC_16: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16; ++ fixP->fx_signed = 1; + break; + case BFD_RELOC_32: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32; ++ fixP->fx_signed = 1; + break; + default: + break; +-- +1.8.1.4 + diff --git a/package/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch b/package/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch new file mode 100644 index 0000000000..6a0846ef8e --- /dev/null +++ b/package/binutils/2.24/903-xtensa-fix-ld-segfault-when-linking-linux-modules.patch @@ -0,0 +1,47 @@ +From e7d17e71cdc10a2e81e454ce3b9637f1b2a587f2 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 10 Jul 2014 01:47:33 +0400 +Subject: [PATCH] Fix xtensa ld segfault when linking linux modules + +is_inconsistent_linkonce_section makes an assumption that section name +that starts with ".gnu.linkonce.prop." has one more dot in its suffix. +However gas generates such section name by insertion of "prop." right +after ".gnu.linkonce." part of the name of the original section. So, for +section named ".gnu.linkonce.this_module" corresponding property section +name does not satisfy the assumption. Such section names are common in +linux modules. This bug was exposed by the patch "a35d5e8 Fix alignment +for the first section frag on xtensa", that makes gas produce property +section for each section that has ".align" directive in it. + +Use suffix that immediately follows ".gnu.linkonce.prop." when there are +no more dots following it. + +2014-07-10 Max Filippov + +ld/ + * emultempl/xtensaelf.em (is_inconsistent_linkonce_section): + correctly handle missing dot in section name after + ".gnu.linkonce.prop.". +--- +Backported from: e7d17e71cdc10a2e81e454ce3b9637f1b2a587f2 +Changes to ld/ChangeLog file are dropped. + + ld/emultempl/xtensaelf.em | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ld/emultempl/xtensaelf.em b/ld/emultempl/xtensaelf.em +index 151eea4..948d18d 100644 +--- a/ld/emultempl/xtensaelf.em ++++ b/ld/emultempl/xtensaelf.em +@@ -1310,7 +1310,7 @@ is_inconsistent_linkonce_section (asection *sec) + for Tensilica's XCC compiler. */ + name = sec_name + linkonce_len; + if (CONST_STRNEQ (name, "prop.")) +- name = strchr (name + 5, '.') + 1; ++ name = strchr (name + 5, '.') ? strchr (name + 5, '.') + 1 : name + 5; + else if (name[1] == '.' + && (name[0] == 'p' || name[0] == 'e' || name[0] == 'h')) + name += 2; +-- +1.8.1.4 + diff --git a/package/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch b/package/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch new file mode 100644 index 0000000000..e4c600e542 --- /dev/null +++ b/package/binutils/2.24/904-Fix-call8-call-target-out-of-range-xtensa-ld-relaxation.patch @@ -0,0 +1,79 @@ +From 7fc39194f8fb48914c995f8ec3826d50086f1ec0 Mon Sep 17 00:00:00 2001 +From: Sterling Augustine +Date: Tue, 25 Jan 2011 13:59:13 -0800 +Subject: [PATCH] Fix 'call8: call target out of range' xtensa ld relaxation + bug + +During link-time relaxation distance between cross-section call site and +its target may grow, producing 'call target out of range' error for +relaxed calls. Be more conservative when calculating whether or not a +callx can be converted to a straight call. + +2014-09-23 Sterling Augustine + +bfd/ + * elf32-xtensa.c (is_resolvable_asm_expansion): for cross-section + call relaxation use furthermost addresses where call source and + destination can be to check whether it's in the range of a direct + call. + +Signed-off-by: Max Filippov +--- + bfd/elf32-xtensa.c | 41 +++++++++++++++++++++++++++++++++++++---- + 1 file changed, 37 insertions(+), 4 deletions(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 09862e3..e32496a 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -7124,10 +7124,43 @@ is_resolvable_asm_expansion (bfd *abfd, + || is_reloc_sym_weak (abfd, irel))) + return FALSE; + +- self_address = (sec->output_section->vma +- + sec->output_offset + irel->r_offset + 3); +- dest_address = (target_sec->output_section->vma +- + target_sec->output_offset + target_offset); ++ if (target_sec->output_section != sec->output_section) ++ { ++ /* If the two sections are sufficiently far away that relaxation ++ might take the call out of range, we can't simplify. For ++ example, a positive displacement call into another memory ++ could get moved to a lower address due to literal removal, ++ but the destination won't move, and so the displacment might ++ get larger. ++ ++ If the displacement is negative, assume the destination could ++ move as far back as the start of the output section. The ++ self_address will be at least as far into the output section ++ as it is prior to relaxation. ++ ++ If the displacement is postive, assume the destination will be in ++ it's pre-relaxed location (because relaxation only makes sections ++ smaller). The self_address could go all the way to the beginning ++ of the output section. */ ++ ++ dest_address = target_sec->output_section->vma; ++ self_address = sec->output_section->vma; ++ ++ if (sec->output_section->vma > target_sec->output_section->vma) ++ self_address += sec->output_offset + irel->r_offset + 3; ++ else ++ dest_address += bfd_get_section_limit (abfd, target_sec->output_section); ++ /* Call targets should be four-byte aligned. */ ++ dest_address = (dest_address + 3) & ~3; ++ } ++ else ++ { ++ ++ self_address = (sec->output_section->vma ++ + sec->output_offset + irel->r_offset + 3); ++ dest_address = (target_sec->output_section->vma ++ + target_sec->output_offset + target_offset); ++ } + + *is_reachable_p = pcrel_reloc_fits (direct_call_opcode, 0, + self_address, dest_address); +-- +1.8.1.4 + diff --git a/package/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch b/package/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch new file mode 100644 index 0000000000..8aeb06428a --- /dev/null +++ b/package/binutils/2.24/905-Fix-trampolines-search-code-for-conditional-branches.patch @@ -0,0 +1,90 @@ +From 415480d6471e67aef97c0241d451ef2423a1da9d Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 25 Nov 2014 21:33:21 +0300 +Subject: [PATCH] Fix trampolines search code for conditional branches + +For conditional branches that need more than one trampoline to reach its +target assembler couldn't always find suitable trampoline because +post-loop condition check was placed inside the loop, resulting in +premature loop termination. Move check outside the loop. + +This fixes the following build errors seen when assembling huge files +produced by gcc: + Error: jump target out of range; no usable trampoline found + Error: operand 1 of 'j' has out of range value '307307' + +2014-11-25 Max Filippov + +gas/ + * config/tc-xtensa.c (search_trampolines): Move post-loop + condition check outside the search loop. + +gas/testsuite/ + * gas/xtensa/trampoline.d: Add expected output for branches. + * gas/xtensa/trampoline.s: Add test case for branches. + +Signed-off-by: Max Filippov +--- +Backported from: d92b6eece424f0ad35d96fdd85bf207295e8c4c3 +Changes to ChangeLogs are dropped. + + gas/config/tc-xtensa.c | 8 ++++---- + gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++ + gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++ + 3 files changed, 20 insertions(+), 4 deletions(-) + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index d11b0c7..f23ccf8 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -9514,11 +9514,11 @@ search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only) + if (next_addr == 0 || addr - next_addr > J_RANGE) + break; + } +- if (abs (addr - this_addr) < J_RANGE) +- return tf; +- +- return NULL; + } ++ if (abs (addr - this_addr) < J_RANGE) ++ return tf; ++ ++ return NULL; + } + for ( ; tf; tf = tf->next) + { +diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d +index b4f65dc..5ae32a6 100644 +--- a/gas/testsuite/gas/xtensa/trampoline.d ++++ b/gas/testsuite/gas/xtensa/trampoline.d +@@ -24,3 +24,12 @@ + .*33462:.*j.0x49407 + #... + .*49407:.*j.0x49407 ++.*4940a:.*beqz.n.a2,.0x4940f ++.*4940c:.*j.0x693d1 ++#... ++.*693d1:.*j.0x7ddd4 ++#... ++.*7ddd4:.*j.0x927f5 ++#... ++.*927f5:.*j.0x927f5 ++#... +diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s +index 259a3bb..4465786 100644 +--- a/gas/testsuite/gas/xtensa/trampoline.s ++++ b/gas/testsuite/gas/xtensa/trampoline.s +@@ -19,3 +19,10 @@ + .endr + 3: + j 3b ++ bnez a2, 4f ++ .rep 50000 ++ and a2, a2, a3 ++ _ret ++ .endr ++4: ++ j 4b +-- +1.8.1.4 + diff --git a/package/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch b/package/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch new file mode 100644 index 0000000000..8a211004f3 --- /dev/null +++ b/package/binutils/2.24/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch @@ -0,0 +1,502 @@ +From 20c79baf82273a0b368587f761f152c4d3a593a4 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 27 Mar 2015 07:13:55 +0300 +Subject: [PATCH 1/4] xtensa: optimize check_section_ebb_pcrels_fit + +The original check_section_ebb_pcrels_fit algorithm checks that text +actions proposed for current EBB are OK for every relocation in a +section. There's no need to check every relocation, because text actions +for EBB can only change size of that EBB, thus only affecting +relocations that in any way cross that EBB. In addition EBBs are +iterated in ascending order of their VMA, making it easier to track +relevant relocations. + +Introduce a structure that can track relocations that cross the range of +VMAs of EBB and use it to only check relocations relevant to current EBB +in check_section_ebb_pcrels_fit. +It takes O(N log N) operations to build it and O(N) operations to move +current EBB VMA window through its entire range, where N is the number +of relocations in a section. The resulting complexity of +compute_text_actions is thus reduced from O(N^2) to O(N log N + N * M), +where M is the average number of relocations crossing each EBB. + +Original profile: + +% time self children called name +----------------------------------------- + 44.26 71.53 6429/6429 compute_text_actions + 50.2 44.26 71.53 6429 check_section_ebb_pcrels_fit + 1.16 20.12 347506666/347576152 pcrel_reloc_fits + 2.95 16.52 347506666/348104944 get_relocation_opnd + 2.01 9.74 347575100/361252208 r_reloc_init + 0.55 7.53 347575100/363381467 r_reloc_get_section + 5.76 0.02 695013332/695013332 xlate_offset_with_removed_text + 0.68 3.89 347575100/363483827 bfd_octets_per_byte + 0.32 0.00 347506666/349910253 is_alt_relocation + 0.18 0.11 6391/6391 build_xlate_map + 0.00 0.00 6429/19417168 get_xtensa_relax_info + 0.00 0.00 6391/6391 free_xlate_map +----------------------------------------- + +Same data, after optimization: + +% time self children called name +----------------------------------------- + 2.56 3.08 6429/6429 compute_text_actions + 8.2 2.56 3.08 6429 check_section_ebb_pcrels_fit + 0.08 0.91 17721075/17790561 pcrel_reloc_fits + 0.17 0.47 17721075/31685977 r_reloc_init + 0.43 0.00 35442150/35442150 xlate_offset_with_removed_text + 0.02 0.37 17721075/33815236 r_reloc_get_section + 0.22 0.11 6391/6391 build_xlate_map + 0.05 0.22 17721075/33917596 bfd_octets_per_byte + 0.03 0.00 17721075/20405299 is_alt_relocation + 0.01 0.00 6429/6429 reloc_range_list_update_range + 0.00 0.00 6429/19417168 get_xtensa_relax_info + 0.00 0.00 6391/6391 free_xlate_map +----------------------------------------- + +2015-04-01 Max Filippov +bfd/ + * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry, + reloc_range): new typedef. + (reloc_range_list_struct, reloc_range_list_entry_struct, + reloc_range_struct): new structures. + (reloc_range_compare, build_reloc_ranges, + reloc_range_list_append, reloc_range_list_remove, + reloc_range_list_update_range, free_reloc_range_list): new + functions. + (compute_text_actions): precompute relocation opcodes before the + loop. Add relevant_relocs variable, initialize it before the + loop, pass it to the check_section_ebb_pcrels_fit. + (check_section_ebb_pcrels_fit): add new parameter: + relevant_relocs. Update address range in the relevant_relocs if + it's non-NULL and iterate only over relevant relocations. + +Backported from: b2b326d246f839ee218192ac88da2384d929a072 +Signed-off-by: Max Filippov +--- + bfd/elf32-xtensa.c | 321 +++++++++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 298 insertions(+), 23 deletions(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 0b6f584..872370b 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -6619,8 +6619,10 @@ static bfd_boolean compute_text_actions + (bfd *, asection *, struct bfd_link_info *); + static bfd_boolean compute_ebb_proposed_actions (ebb_constraint *); + static bfd_boolean compute_ebb_actions (ebb_constraint *); ++typedef struct reloc_range_list_struct reloc_range_list; + static bfd_boolean check_section_ebb_pcrels_fit +- (bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, const ebb_constraint *, ++ (bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, ++ reloc_range_list *, const ebb_constraint *, + const xtensa_opcode *); + static bfd_boolean check_section_ebb_reduces (const ebb_constraint *); + static void text_action_add_proposed +@@ -7219,6 +7221,221 @@ build_reloc_opcodes (bfd *abfd, + return reloc_opcodes; + } + ++struct reloc_range_struct ++{ ++ bfd_vma addr; ++ bfd_boolean add; /* TRUE if start of a range, FALSE otherwise. */ ++ /* Original irel index in the array of relocations for a section. */ ++ unsigned irel_index; ++}; ++typedef struct reloc_range_struct reloc_range; ++ ++typedef struct reloc_range_list_entry_struct reloc_range_list_entry; ++struct reloc_range_list_entry_struct ++{ ++ reloc_range_list_entry *next; ++ reloc_range_list_entry *prev; ++ Elf_Internal_Rela *irel; ++ xtensa_opcode opcode; ++ int opnum; ++}; ++ ++struct reloc_range_list_struct ++{ ++ /* The rest of the structure is only meaningful when ok is TRUE. */ ++ bfd_boolean ok; ++ ++ unsigned n_range; /* Number of range markers. */ ++ reloc_range *range; /* Sorted range markers. */ ++ ++ unsigned first; /* Index of a first range element in the list. */ ++ unsigned last; /* One past index of a last range element in the list. */ ++ ++ unsigned n_list; /* Number of list elements. */ ++ reloc_range_list_entry *reloc; /* */ ++ reloc_range_list_entry list_root; ++}; ++ ++static int ++reloc_range_compare (const void *a, const void *b) ++{ ++ const reloc_range *ra = a; ++ const reloc_range *rb = b; ++ ++ if (ra->addr != rb->addr) ++ return ra->addr < rb->addr ? -1 : 1; ++ if (ra->add != rb->add) ++ return ra->add ? -1 : 1; ++ return 0; ++} ++ ++static void ++build_reloc_ranges (bfd *abfd, asection *sec, ++ bfd_byte *contents, ++ Elf_Internal_Rela *internal_relocs, ++ xtensa_opcode *reloc_opcodes, ++ reloc_range_list *list) ++{ ++ unsigned i; ++ size_t n = 0; ++ size_t max_n = 0; ++ reloc_range *ranges = NULL; ++ reloc_range_list_entry *reloc = ++ bfd_malloc (sec->reloc_count * sizeof (*reloc)); ++ ++ memset (list, 0, sizeof (*list)); ++ list->ok = TRUE; ++ ++ for (i = 0; i < sec->reloc_count; i++) ++ { ++ Elf_Internal_Rela *irel = &internal_relocs[i]; ++ int r_type = ELF32_R_TYPE (irel->r_info); ++ reloc_howto_type *howto = &elf_howto_table[r_type]; ++ r_reloc r_rel; ++ ++ if (r_type == R_XTENSA_ASM_SIMPLIFY ++ || r_type == R_XTENSA_32_PCREL ++ || !howto->pc_relative) ++ continue; ++ ++ r_reloc_init (&r_rel, abfd, irel, contents, ++ bfd_get_section_limit (abfd, sec)); ++ ++ if (r_reloc_get_section (&r_rel) != sec) ++ continue; ++ ++ if (n + 2 > max_n) ++ { ++ max_n = (max_n + 2) * 2; ++ ranges = bfd_realloc (ranges, max_n * sizeof (*ranges)); ++ } ++ ++ ranges[n].addr = irel->r_offset; ++ ranges[n + 1].addr = r_rel.target_offset; ++ ++ ranges[n].add = ranges[n].addr < ranges[n + 1].addr; ++ ranges[n + 1].add = !ranges[n].add; ++ ++ ranges[n].irel_index = i; ++ ranges[n + 1].irel_index = i; ++ ++ n += 2; ++ ++ reloc[i].irel = irel; ++ ++ /* Every relocation won't possibly be checked in the optimized version of ++ check_section_ebb_pcrels_fit, so this needs to be done here. */ ++ if (is_alt_relocation (ELF32_R_TYPE (irel->r_info))) ++ { ++ /* None of the current alternate relocs are PC-relative, ++ and only PC-relative relocs matter here. */ ++ } ++ else ++ { ++ xtensa_opcode opcode; ++ int opnum; ++ ++ if (reloc_opcodes) ++ opcode = reloc_opcodes[i]; ++ else ++ opcode = get_relocation_opcode (abfd, sec, contents, irel); ++ ++ if (opcode == XTENSA_UNDEFINED) ++ { ++ list->ok = FALSE; ++ break; ++ } ++ ++ opnum = get_relocation_opnd (opcode, ELF32_R_TYPE (irel->r_info)); ++ if (opnum == XTENSA_UNDEFINED) ++ { ++ list->ok = FALSE; ++ break; ++ } ++ ++ /* Record relocation opcode and opnum as we've calculated them ++ anyway and they won't change. */ ++ reloc[i].opcode = opcode; ++ reloc[i].opnum = opnum; ++ } ++ } ++ ++ if (list->ok) ++ { ++ ranges = bfd_realloc (ranges, n * sizeof (*ranges)); ++ qsort (ranges, n, sizeof (*ranges), reloc_range_compare); ++ ++ list->n_range = n; ++ list->range = ranges; ++ list->reloc = reloc; ++ list->list_root.prev = &list->list_root; ++ list->list_root.next = &list->list_root; ++ } ++ else ++ { ++ free (ranges); ++ free (reloc); ++ } ++} ++ ++static void reloc_range_list_append (reloc_range_list *list, ++ unsigned irel_index) ++{ ++ reloc_range_list_entry *entry = list->reloc + irel_index; ++ ++ entry->prev = list->list_root.prev; ++ entry->next = &list->list_root; ++ entry->prev->next = entry; ++ entry->next->prev = entry; ++ ++list->n_list; ++} ++ ++static void reloc_range_list_remove (reloc_range_list *list, ++ unsigned irel_index) ++{ ++ reloc_range_list_entry *entry = list->reloc + irel_index; ++ ++ entry->next->prev = entry->prev; ++ entry->prev->next = entry->next; ++ --list->n_list; ++} ++ ++/* Update relocation list object so that it lists all relocations that cross ++ [first; last] range. Range bounds should not decrease with successive ++ invocations. */ ++static void reloc_range_list_update_range (reloc_range_list *list, ++ bfd_vma first, bfd_vma last) ++{ ++ /* This should not happen: EBBs are iterated from lower addresses to higher. ++ But even if that happens there's no need to break: just flush current list ++ and start from scratch. */ ++ if ((list->last > 0 && list->range[list->last - 1].addr > last) || ++ (list->first > 0 && list->range[list->first - 1].addr >= first)) ++ { ++ list->first = 0; ++ list->last = 0; ++ list->n_list = 0; ++ list->list_root.next = &list->list_root; ++ list->list_root.prev = &list->list_root; ++ fprintf (stderr, "%s: move backwards requested\n", __func__); ++ } ++ ++ for (; list->last < list->n_range && ++ list->range[list->last].addr <= last; ++list->last) ++ if (list->range[list->last].add) ++ reloc_range_list_append (list, list->range[list->last].irel_index); ++ ++ for (; list->first < list->n_range && ++ list->range[list->first].addr < first; ++list->first) ++ if (!list->range[list->first].add) ++ reloc_range_list_remove (list, list->range[list->first].irel_index); ++} ++ ++static void free_reloc_range_list (reloc_range_list *list) ++{ ++ free (list->range); ++ free (list->reloc); ++} + + /* The compute_text_actions function will build a list of potential + transformation actions for code in the extended basic block of each +@@ -7245,6 +7462,7 @@ compute_text_actions (bfd *abfd, + property_table_entry *prop_table = 0; + int ptblsize = 0; + bfd_size_type sec_size; ++ reloc_range_list relevant_relocs; + + relax_info = get_xtensa_relax_info (sec); + BFD_ASSERT (relax_info); +@@ -7277,6 +7495,12 @@ compute_text_actions (bfd *abfd, + goto error_return; + } + ++ /* Precompute the opcode for each relocation. */ ++ reloc_opcodes = build_reloc_opcodes (abfd, sec, contents, internal_relocs); ++ ++ build_reloc_ranges (abfd, sec, contents, internal_relocs, reloc_opcodes, ++ &relevant_relocs); ++ + for (i = 0; i < sec->reloc_count; i++) + { + Elf_Internal_Rela *irel = &internal_relocs[i]; +@@ -7340,17 +7564,13 @@ compute_text_actions (bfd *abfd, + ebb->start_reloc_idx = i; + ebb->end_reloc_idx = i; + +- /* Precompute the opcode for each relocation. */ +- if (reloc_opcodes == NULL) +- reloc_opcodes = build_reloc_opcodes (abfd, sec, contents, +- internal_relocs); +- + if (!extend_ebb_bounds (ebb) + || !compute_ebb_proposed_actions (&ebb_table) + || !compute_ebb_actions (&ebb_table) + || !check_section_ebb_pcrels_fit (abfd, sec, contents, +- internal_relocs, &ebb_table, +- reloc_opcodes) ++ internal_relocs, ++ &relevant_relocs, ++ &ebb_table, reloc_opcodes) + || !check_section_ebb_reduces (&ebb_table)) + { + /* If anything goes wrong or we get unlucky and something does +@@ -7372,6 +7592,8 @@ compute_text_actions (bfd *abfd, + free_ebb_constraint (&ebb_table); + } + ++ free_reloc_range_list (&relevant_relocs); ++ + #if DEBUG + if (relax_info->action_list.head) + print_action_list (stderr, &relax_info->action_list); +@@ -7974,14 +8196,17 @@ check_section_ebb_pcrels_fit (bfd *abfd, + asection *sec, + bfd_byte *contents, + Elf_Internal_Rela *internal_relocs, ++ reloc_range_list *relevant_relocs, + const ebb_constraint *constraint, + const xtensa_opcode *reloc_opcodes) + { + unsigned i, j; ++ unsigned n = sec->reloc_count; + Elf_Internal_Rela *irel; + xlate_map_t *xmap = NULL; + bfd_boolean ok = TRUE; + xtensa_relax_info *relax_info; ++ reloc_range_list_entry *entry = NULL; + + relax_info = get_xtensa_relax_info (sec); + +@@ -7992,7 +8217,40 @@ check_section_ebb_pcrels_fit (bfd *abfd, + can still be used. */ + } + +- for (i = 0; i < sec->reloc_count; i++) ++ if (relevant_relocs && constraint->action_count) ++ { ++ if (!relevant_relocs->ok) ++ { ++ ok = FALSE; ++ n = 0; ++ } ++ else ++ { ++ bfd_vma min_offset, max_offset; ++ min_offset = max_offset = constraint->actions[0].offset; ++ ++ for (i = 1; i < constraint->action_count; ++i) ++ { ++ proposed_action *action = &constraint->actions[i]; ++ bfd_vma offset = action->offset; ++ ++ if (offset < min_offset) ++ min_offset = offset; ++ if (offset > max_offset) ++ max_offset = offset; ++ } ++ reloc_range_list_update_range (relevant_relocs, min_offset, ++ max_offset); ++ n = relevant_relocs->n_list; ++ entry = &relevant_relocs->list_root; ++ } ++ } ++ else ++ { ++ relevant_relocs = NULL; ++ } ++ ++ for (i = 0; i < n; i++) + { + r_reloc r_rel; + bfd_vma orig_self_offset, orig_target_offset; +@@ -8001,7 +8259,15 @@ check_section_ebb_pcrels_fit (bfd *abfd, + reloc_howto_type *howto; + int self_removed_bytes, target_removed_bytes; + +- irel = &internal_relocs[i]; ++ if (relevant_relocs) ++ { ++ entry = entry->next; ++ irel = entry->irel; ++ } ++ else ++ { ++ irel = internal_relocs + i; ++ } + r_type = ELF32_R_TYPE (irel->r_info); + + howto = &elf_howto_table[r_type]; +@@ -8067,21 +8333,30 @@ check_section_ebb_pcrels_fit (bfd *abfd, + xtensa_opcode opcode; + int opnum; + +- if (reloc_opcodes) +- opcode = reloc_opcodes[i]; +- else +- opcode = get_relocation_opcode (abfd, sec, contents, irel); +- if (opcode == XTENSA_UNDEFINED) ++ if (relevant_relocs) + { +- ok = FALSE; +- break; ++ opcode = entry->opcode; ++ opnum = entry->opnum; + } +- +- opnum = get_relocation_opnd (opcode, ELF32_R_TYPE (irel->r_info)); +- if (opnum == XTENSA_UNDEFINED) ++ else + { +- ok = FALSE; +- break; ++ if (reloc_opcodes) ++ opcode = reloc_opcodes[relevant_relocs ? ++ (unsigned)(entry - relevant_relocs->reloc) : i]; ++ else ++ opcode = get_relocation_opcode (abfd, sec, contents, irel); ++ if (opcode == XTENSA_UNDEFINED) ++ { ++ ok = FALSE; ++ break; ++ } ++ ++ opnum = get_relocation_opnd (opcode, ELF32_R_TYPE (irel->r_info)); ++ if (opnum == XTENSA_UNDEFINED) ++ { ++ ok = FALSE; ++ break; ++ } + } + + if (!pcrel_reloc_fits (opcode, opnum, self_offset, target_offset)) +@@ -8778,7 +9053,7 @@ move_shared_literal (asection *sec, + /* Check all of the PC-relative relocations to make sure they still fit. */ + relocs_fit = check_section_ebb_pcrels_fit (target_sec->owner, target_sec, + target_sec_cache->contents, +- target_sec_cache->relocs, ++ target_sec_cache->relocs, NULL, + &ebb_table, NULL); + + if (!relocs_fit) +-- +1.8.1.4 + diff --git a/package/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch b/package/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch new file mode 100644 index 0000000000..9df8065307 --- /dev/null +++ b/package/binutils/2.24/907-xtensa-optimize-removed_by_actions.patch @@ -0,0 +1,356 @@ +From 3e3f60207399ab29dd55af109e5ae9facc7d8e83 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 28 Mar 2015 08:46:28 +0300 +Subject: [PATCH 2/4] xtensa: optimize removed_by_actions + +The function removed_by_actions iterates through text actions to +calculate an offset applied by text actions to a given VMA. Although it +has a parameter p_start_action that allows for incremental offset +calculation, in many places it's used with p_start_action explicitly set +to the first action. After the first relaxation pass when the list of +text actions is finalized, an array of offsets sorted by VMA may be used +to speed up this function. + +Original profile: + +% time self children called name +----------------------------------------- + 0.35 0.00 33872/4808961 relax_section_symbols + 3.32 0.00 326022/4808961 relax_property_section + 12.83 0.00 1259379/4808961 offset_with_removed_text + 32.50 0.00 3189688/4808961 translate_reloc + 71.5 49.00 0.00 4808961 removed_by_actions +----------------------------------------- + +Same data, after optimization: + +% time self children called name +----------------------------------------- + 0.00 0.00 33872/4808537 relax_section_symbols + 0.01 0.00 326022/4808537 relax_property_section + 0.05 0.00 1258955/4808537 offset_with_removed_text_map + 0.13 0.00 3189688/4808537 translate_reloc + 1.0 0.20 0.00 4808537 removed_by_actions_map + 0.00 0.00 120/120 map_removal_by_action +----------------------------------------- + +2015-04-01 Max Filippov +bfd/ + * elf32-xtensa.c (removal_by_action_entry_struct, + removal_by_action_map_struct): new structures. + (removal_by_action_entry, removal_by_action_map): new typedefs. + (text_action_list_struct): add new field: map. + (map_removal_by_action, removed_by_actions_map, + offset_with_removed_text_map): new functions. + (relax_section): replace offset_with_removed_text with + offset_with_removed_text_map. + (translate_reloc, relax_property_section, relax_section_symbols): + replace removed_by_actions with removed_by_actions_map. + +Backported from: 071aa5c98a31c966f5fbfc573fcee61350fd1936 +Signed-off-by: Max Filippov +--- + bfd/elf32-xtensa.c | 181 +++++++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 156 insertions(+), 25 deletions(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 872370b..21b2871 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -5420,11 +5420,28 @@ struct text_action_struct + text_action *next; + }; + ++struct removal_by_action_entry_struct ++{ ++ bfd_vma offset; ++ int removed; ++ int eq_removed; ++ int eq_removed_before_fill; ++}; ++typedef struct removal_by_action_entry_struct removal_by_action_entry; ++ ++struct removal_by_action_map_struct ++{ ++ unsigned n_entries; ++ removal_by_action_entry *entry; ++}; ++typedef struct removal_by_action_map_struct removal_by_action_map; ++ + + /* List of all of the actions taken on a text section. */ + struct text_action_list_struct + { + text_action *head; ++ removal_by_action_map map; + }; + + +@@ -5636,6 +5653,101 @@ action_list_count (text_action_list *action_list) + return count; + } + ++static void ++map_removal_by_action (text_action_list *action_list) ++{ ++ text_action *r; ++ int removed = 0; ++ removal_by_action_map map; ++ bfd_boolean eq_complete; ++ ++ map.n_entries = 0; ++ map.entry = bfd_malloc (action_list_count (action_list) * ++ sizeof (removal_by_action_entry)); ++ eq_complete = FALSE; ++ ++ for (r = action_list->head; r;) ++ { ++ removal_by_action_entry *ientry = map.entry + map.n_entries; ++ ++ if (map.n_entries && (ientry - 1)->offset == r->offset) ++ { ++ --ientry; ++ } ++ else ++ { ++ ++map.n_entries; ++ eq_complete = FALSE; ++ ientry->offset = r->offset; ++ ientry->eq_removed_before_fill = removed; ++ } ++ ++ if (!eq_complete) ++ { ++ if (r->action != ta_fill || r->removed_bytes >= 0) ++ { ++ ientry->eq_removed = removed; ++ eq_complete = TRUE; ++ } ++ else ++ ientry->eq_removed = removed + r->removed_bytes; ++ } ++ ++ removed += r->removed_bytes; ++ ientry->removed = removed; ++ r = r->next; ++ } ++ action_list->map = map; ++} ++ ++static int ++removed_by_actions_map (text_action_list *action_list, bfd_vma offset, ++ bfd_boolean before_fill) ++{ ++ unsigned a, b; ++ ++ if (!action_list->map.entry) ++ map_removal_by_action (action_list); ++ ++ if (!action_list->map.n_entries) ++ return 0; ++ ++ a = 0; ++ b = action_list->map.n_entries; ++ ++ while (b - a > 1) ++ { ++ unsigned c = (a + b) / 2; ++ ++ if (action_list->map.entry[c].offset <= offset) ++ a = c; ++ else ++ b = c; ++ } ++ ++ if (action_list->map.entry[a].offset < offset) ++ { ++ return action_list->map.entry[a].removed; ++ } ++ else if (action_list->map.entry[a].offset == offset) ++ { ++ return before_fill ? ++ action_list->map.entry[a].eq_removed_before_fill : ++ action_list->map.entry[a].eq_removed; ++ } ++ else ++ { ++ return 0; ++ } ++} ++ ++static bfd_vma ++offset_with_removed_text_map (text_action_list *action_list, bfd_vma offset) ++{ ++ int removed = removed_by_actions_map (action_list, offset, FALSE); ++ return offset - removed; ++} ++ + + /* The find_insn_action routine will only find non-fill actions. */ + +@@ -5909,6 +6021,9 @@ init_xtensa_relax_info (asection *sec) + + relax_info->action_list.head = NULL; + ++ relax_info->action_list.map.n_entries = 0; ++ relax_info->action_list.map.entry = NULL; ++ + relax_info->fix_list = NULL; + relax_info->fix_array = NULL; + relax_info->fix_array_count = 0; +@@ -9218,7 +9333,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + if (elf_hash_table (link_info)->dynamic_sections_created) + shrink_dynamic_reloc_sections (link_info, abfd, sec, irel); + irel->r_info = ELF32_R_INFO (0, R_XTENSA_NONE); +- irel->r_offset = offset_with_removed_text ++ irel->r_offset = offset_with_removed_text_map + (&relax_info->action_list, irel->r_offset); + continue; + } +@@ -9255,7 +9370,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + } + } + +- source_offset = offset_with_removed_text ++ source_offset = offset_with_removed_text_map + (&relax_info->action_list, irel->r_offset); + irel->r_offset = source_offset; + } +@@ -9352,7 +9467,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + break; + } + +- new_end_offset = offset_with_removed_text ++ new_end_offset = offset_with_removed_text_map + (&target_relax_info->action_list, + r_rel.target_offset + diff_value); + diff_value = new_end_offset - new_reloc.target_offset; +@@ -9750,7 +9865,6 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec) + xtensa_relax_info *relax_info; + removed_literal *removed; + bfd_vma target_offset, base_offset; +- text_action *act; + + *new_rel = *orig_rel; + +@@ -9803,19 +9917,26 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec) + offset. */ + + base_offset = r_reloc_get_target_offset (new_rel) - new_rel->rela.r_addend; +- act = relax_info->action_list.head; + if (base_offset <= target_offset) + { +- int base_removed = removed_by_actions (&act, base_offset, FALSE); +- int addend_removed = removed_by_actions (&act, target_offset, FALSE); ++ int base_removed = removed_by_actions_map (&relax_info->action_list, ++ base_offset, FALSE); ++ int addend_removed = removed_by_actions_map (&relax_info->action_list, ++ target_offset, FALSE) - ++ base_removed; ++ + new_rel->target_offset = target_offset - base_removed - addend_removed; + new_rel->rela.r_addend -= addend_removed; + } + else + { + /* Handle a negative addend. The base offset comes first. */ +- int tgt_removed = removed_by_actions (&act, target_offset, FALSE); +- int addend_removed = removed_by_actions (&act, base_offset, FALSE); ++ int tgt_removed = removed_by_actions_map (&relax_info->action_list, ++ target_offset, FALSE); ++ int addend_removed = removed_by_actions_map (&relax_info->action_list, ++ base_offset, FALSE) - ++ tgt_removed; ++ + new_rel->target_offset = target_offset - tgt_removed; + new_rel->rela.r_addend += addend_removed; + } +@@ -10138,9 +10259,10 @@ relax_property_section (bfd *abfd, + bfd_vma old_offset = val.r_rel.target_offset; + bfd_vma new_offset; + long old_size, new_size; +- text_action *act = target_relax_info->action_list.head; +- new_offset = old_offset - +- removed_by_actions (&act, old_offset, FALSE); ++ int removed_by_old_offset = ++ removed_by_actions_map (&target_relax_info->action_list, ++ old_offset, FALSE); ++ new_offset = old_offset - removed_by_old_offset; + + /* Assert that we are not out of bounds. */ + old_size = bfd_get_32 (abfd, size_p); +@@ -10164,9 +10286,10 @@ relax_property_section (bfd *abfd, + + /* Recompute the new_offset, but this time don't + include any fill inserted by relaxation. */ +- act = target_relax_info->action_list.head; +- new_offset = old_offset - +- removed_by_actions (&act, old_offset, TRUE); ++ removed_by_old_offset = ++ removed_by_actions_map (&target_relax_info->action_list, ++ old_offset, TRUE); ++ new_offset = old_offset - removed_by_old_offset; + + /* If it is not unreachable and we have not yet + seen an unreachable at this address, place it +@@ -10182,8 +10305,12 @@ relax_property_section (bfd *abfd, + } + } + else +- new_size -= +- removed_by_actions (&act, old_offset + old_size, TRUE); ++ { ++ int removed_by_old_offset_size = ++ removed_by_actions_map (&target_relax_info->action_list, ++ old_offset + old_size, TRUE); ++ new_size -= removed_by_old_offset_size - removed_by_old_offset; ++ } + + if (new_size != old_size) + { +@@ -10441,14 +10568,16 @@ relax_section_symbols (bfd *abfd, asection *sec) + + if (isym->st_shndx == sec_shndx) + { +- text_action *act = relax_info->action_list.head; + bfd_vma orig_addr = isym->st_value; ++ int removed = removed_by_actions_map (&relax_info->action_list, ++ orig_addr, FALSE); + +- isym->st_value -= removed_by_actions (&act, orig_addr, FALSE); +- ++ isym->st_value -= removed; + if (ELF32_ST_TYPE (isym->st_info) == STT_FUNC) + isym->st_size -= +- removed_by_actions (&act, orig_addr + isym->st_size, FALSE); ++ removed_by_actions_map (&relax_info->action_list, ++ orig_addr + isym->st_size, FALSE) - ++ removed; + } + } + +@@ -10466,15 +10595,17 @@ relax_section_symbols (bfd *abfd, asection *sec) + || sym_hash->root.type == bfd_link_hash_defweak) + && sym_hash->root.u.def.section == sec) + { +- text_action *act = relax_info->action_list.head; + bfd_vma orig_addr = sym_hash->root.u.def.value; ++ int removed = removed_by_actions_map (&relax_info->action_list, ++ orig_addr, FALSE); + +- sym_hash->root.u.def.value -= +- removed_by_actions (&act, orig_addr, FALSE); ++ sym_hash->root.u.def.value -= removed; + + if (sym_hash->type == STT_FUNC) + sym_hash->size -= +- removed_by_actions (&act, orig_addr + sym_hash->size, FALSE); ++ removed_by_actions_map (&relax_info->action_list, ++ orig_addr + sym_hash->size, FALSE) - ++ removed; + } + } + +-- +1.8.1.4 + diff --git a/package/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch b/package/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch new file mode 100644 index 0000000000..96d526fe30 --- /dev/null +++ b/package/binutils/2.24/908-xtensa-optimize-find_removed_literal.patch @@ -0,0 +1,146 @@ +From 288c2b709e5e6841484e1a129eaccd299db36877 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 4 Apr 2015 14:49:42 +0300 +Subject: [PATCH 3/4] xtensa: optimize find_removed_literal + +find_removed_literal uses linear search to find removed literal by its +VMA. The list of literals is fixed at that point, build an ordered index +array and use binary search instead. + +Original profile: + +% time self children called name +----------------------------------------- + 56.72 0.00 297578/669392 translate_reloc + 70.86 0.00 371814/669392 relax_section + 67.9 127.58 0.00 669392 find_removed_literal +----------------------------------------- + +Same data, after optimization: + +% time self children called name +----------------------------------------- + 0.00 0.00 297578/669392 translate_reloc + 0.00 0.00 371814/669392 relax_section + 0.0 0.00 0.00 669392 find_removed_literal + 0.00 0.00 23838/23838 map_removed_literal +----------------------------------------- + +2015-04-03 Max Filippov +bfd/ + * elf32-xtensa.c (removed_literal_map_entry): new typedef. + (removed_literal_map_entry_struct): new structure. + (removed_literal_list_struct): add new fields: n_map and map. + (map_removed_literal, removed_literal_compare): new functions. + (find_removed_literal): build index array for literals ordered + by VMA, use binary search to find removed literal. + +Backported from: 3439c466273378021821473d3fc84990e089ae34 +Signed-off-by: Max Filippov +--- + bfd/elf32-xtensa.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 58 insertions(+), 6 deletions(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 21b2871..51733ad 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -5832,6 +5832,7 @@ print_action_list (FILE *fp, text_action_list *action_list) + by the "from" offset field. */ + + typedef struct removed_literal_struct removed_literal; ++typedef struct removed_literal_map_entry_struct removed_literal_map_entry; + typedef struct removed_literal_list_struct removed_literal_list; + + struct removed_literal_struct +@@ -5841,10 +5842,19 @@ struct removed_literal_struct + removed_literal *next; + }; + ++struct removed_literal_map_entry_struct ++{ ++ bfd_vma addr; ++ removed_literal *literal; ++}; ++ + struct removed_literal_list_struct + { + removed_literal *head; + removed_literal *tail; ++ ++ unsigned n_map; ++ removed_literal_map_entry *map; + }; + + +@@ -5893,6 +5903,39 @@ add_removed_literal (removed_literal_list *removed_list, + } + } + ++static void ++map_removed_literal (removed_literal_list *removed_list) ++{ ++ unsigned n_map = 0; ++ unsigned i; ++ removed_literal_map_entry *map = NULL; ++ removed_literal *r = removed_list->head; ++ ++ for (i = 0; r; ++i, r = r->next) ++ { ++ if (i == n_map) ++ { ++ n_map = (n_map * 2) + 2; ++ map = bfd_realloc (map, n_map * sizeof (*map)); ++ } ++ map[i].addr = r->from.target_offset; ++ map[i].literal = r; ++ } ++ removed_list->map = map; ++ removed_list->n_map = i; ++} ++ ++static int ++removed_literal_compare (const void *a, const void *b) ++{ ++ const removed_literal_map_entry *pa = a; ++ const removed_literal_map_entry *pb = b; ++ ++ if (pa->addr == pb->addr) ++ return 0; ++ else ++ return pa->addr < pb->addr ? -1 : 1; ++} + + /* Check if the list of removed literals contains an entry for the + given address. Return the entry if found. */ +@@ -5900,12 +5943,21 @@ add_removed_literal (removed_literal_list *removed_list, + static removed_literal * + find_removed_literal (removed_literal_list *removed_list, bfd_vma addr) + { +- removed_literal *r = removed_list->head; +- while (r && r->from.target_offset < addr) +- r = r->next; +- if (r && r->from.target_offset == addr) +- return r; +- return NULL; ++ removed_literal_map_entry *p; ++ removed_literal *r = NULL; ++ ++ if (removed_list->map == NULL) ++ map_removed_literal (removed_list); ++ ++ p = bsearch (&addr, removed_list->map, removed_list->n_map, ++ sizeof (*removed_list->map), removed_literal_compare); ++ if (p) ++ { ++ while (p != removed_list->map && (p - 1)->addr == addr) ++ --p; ++ r = p->literal; ++ } ++ return r; + } + + +-- +1.8.1.4 + diff --git a/package/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch b/package/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch new file mode 100644 index 0000000000..3090cc21e5 --- /dev/null +++ b/package/binutils/2.24/909-xtensa-replace-action-list-with-splay-tree.patch @@ -0,0 +1,826 @@ +From e5409aedd3ee2192855018a564650ffb75c26e60 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sun, 5 Apr 2015 17:04:22 +0300 +Subject: [PATCH 4/4] xtensa: replace action list with splay tree + +text_action_add uses linear list search to order text actions list by +action VMA. The list is used at the first relaxation pass, when it's not +fixed yet. +Replace the list with splay tree from libiberty. + +Original profile: + +% time self children called name +----------------------------------------- + 0.00 0.00 14/158225 compute_text_actions + 3.62 0.00 25211/158225 remove_dead_literal + 8.42 0.00 58645/158225 coalesce_shared_literal + 10.68 0.00 74355/158225 text_action_add_proposed + 38.8 22.73 0.00 158225 text_action_add + 0.00 0.00 144527/293246 bfd_zmalloc +----------------------------------------- + +Same data, after optimization: + +% time self children called name +----------------------------------------- + 0.00 0.00 14/158225 compute_text_actions + 0.00 0.00 25211/158225 remove_dead_literal + 0.00 0.01 58645/158225 coalesce_shared_literal + 0.00 0.01 74355/158225 text_action_add_proposed + 0.1 0.00 0.02 158225 text_action_add + 0.01 0.00 144527/144527 splay_tree_insert + 0.00 0.00 144527/195130 splay_tree_lookup + 0.00 0.00 144527/293246 bfd_zmalloc +----------------------------------------- + +2015-04-03 Max Filippov +bfd/ + * elf32-xtensa.c (splay-tree.h): include header. + (text_action_struct): drop next pointer. + (text_action_list_struct): drop head pointer, add count and + tree fields. + (find_fill_action): instead of linear search in text_action_list + search in the tree. + (text_action_compare, action_first, action_next): new functions. + (text_action_add, text_action_add_literal): instead of linear + search and insertion insert new node into the tree. + (removed_by_actions): pass additional parameter: action_list, + use it to traverse the tree. + (offset_with_removed_text): pass additional action_list parameter + to removed_by_actions. + (map_action_fn_context): new typedef. + (map_action_fn_context_struct): new structure. + (map_action_fn): new function. + (map_removal_by_action): use splay_tree_foreach to build map. + (find_insn_action): replace linear search in text_action_list + with series of splay_tree_lookups. + (print_action, print_action_list_fn): new functions. + (print_action_list): use splay_tree_foreach. + (init_xtensa_relax_info): drop action_list.head initialization. + Initialize the tree. + (compute_text_actions): use non-zero action_list_count instead of + non-NULL action list. + (xlate_map_context): new typedef. + (xlate_map_context_struct): new structure. + (xlate_map_fn): new function. + (build_xlate_map): use splay_tree_foreach to build map. + (action_remove_bytes_fn): new function. + (relax_section): use zero action_list_count instead of NULL + action list. Use splay_tree_foreach to count final section size. + Drop unused variable 'removed'. + +Backported from: 4c2af04fe8b4452bf51d2debf1bb467fafcd0f08 +Signed-off-by: Max Filippov +--- + bfd/elf32-xtensa.c | 488 +++++++++++++++++++++++++++++++---------------------- + 1 file changed, 282 insertions(+), 206 deletions(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 51733ad..53af1c6 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -28,6 +28,7 @@ + #include "libbfd.h" + #include "elf-bfd.h" + #include "elf/xtensa.h" ++#include "splay-tree.h" + #include "xtensa-isa.h" + #include "xtensa-config.h" + +@@ -5416,8 +5417,6 @@ struct text_action_struct + bfd_vma virtual_offset; /* Zero except for adding literals. */ + int removed_bytes; + literal_value value; /* Only valid when adding literals. */ +- +- text_action *next; + }; + + struct removal_by_action_entry_struct +@@ -5440,7 +5439,8 @@ typedef struct removal_by_action_map_struct removal_by_action_map; + /* List of all of the actions taken on a text section. */ + struct text_action_list_struct + { +- text_action *head; ++ unsigned count; ++ splay_tree tree; + removal_by_action_map map; + }; + +@@ -5448,20 +5448,18 @@ struct text_action_list_struct + static text_action * + find_fill_action (text_action_list *l, asection *sec, bfd_vma offset) + { +- text_action **m_p; ++ text_action a; + + /* It is not necessary to fill at the end of a section. */ + if (sec->size == offset) + return NULL; + +- for (m_p = &l->head; *m_p && (*m_p)->offset <= offset; m_p = &(*m_p)->next) +- { +- text_action *t = *m_p; +- /* When the action is another fill at the same address, +- just increase the size. */ +- if (t->offset == offset && t->action == ta_fill) +- return t; +- } ++ a.offset = offset; ++ a.action = ta_fill; ++ ++ splay_tree_node node = splay_tree_lookup (l->tree, (splay_tree_key)&a); ++ if (node) ++ return (text_action *)node->value; + return NULL; + } + +@@ -5509,6 +5507,49 @@ adjust_fill_action (text_action *ta, int fill_diff) + } + + ++static int ++text_action_compare (splay_tree_key a, splay_tree_key b) ++{ ++ text_action *pa = (text_action *)a; ++ text_action *pb = (text_action *)b; ++ static const int action_priority[] = ++ { ++ [ta_fill] = 0, ++ [ta_none] = 1, ++ [ta_convert_longcall] = 2, ++ [ta_narrow_insn] = 3, ++ [ta_remove_insn] = 4, ++ [ta_remove_longcall] = 5, ++ [ta_remove_literal] = 6, ++ [ta_widen_insn] = 7, ++ [ta_add_literal] = 8, ++ }; ++ ++ if (pa->offset == pb->offset) ++ { ++ if (pa->action == pb->action) ++ return 0; ++ return action_priority[pa->action] - action_priority[pb->action]; ++ } ++ else ++ return pa->offset < pb->offset ? -1 : 1; ++} ++ ++static text_action * ++action_first (text_action_list *action_list) ++{ ++ splay_tree_node node = splay_tree_min (action_list->tree); ++ return node ? (text_action *)node->value : NULL; ++} ++ ++static text_action * ++action_next (text_action_list *action_list, text_action *action) ++{ ++ splay_tree_node node = splay_tree_successor (action_list->tree, ++ (splay_tree_key)action); ++ return node ? (text_action *)node->value : NULL; ++} ++ + /* Add a modification action to the text. For the case of adding or + removing space, modify any current fill and assume that + "unreachable_space" bytes can be freely contracted. Note that a +@@ -5521,8 +5562,8 @@ text_action_add (text_action_list *l, + bfd_vma offset, + int removed) + { +- text_action **m_p; + text_action *ta; ++ text_action a; + + /* It is not necessary to fill at the end of a section. */ + if (action == ta_fill && sec->size == offset) +@@ -5532,34 +5573,30 @@ text_action_add (text_action_list *l, + if (action == ta_fill && removed == 0) + return; + +- for (m_p = &l->head; *m_p && (*m_p)->offset <= offset; m_p = &(*m_p)->next) ++ a.action = action; ++ a.offset = offset; ++ ++ if (action == ta_fill) + { +- text_action *t = *m_p; ++ splay_tree_node node = splay_tree_lookup (l->tree, (splay_tree_key)&a); + +- if (action == ta_fill) ++ if (node) + { +- /* When the action is another fill at the same address, +- just increase the size. */ +- if (t->offset == offset && t->action == ta_fill) +- { +- t->removed_bytes += removed; +- return; +- } +- /* Fills need to happen before widens so that we don't +- insert fill bytes into the instruction stream. */ +- if (t->offset == offset && t->action == ta_widen_insn) +- break; ++ ta = (text_action *)node->value; ++ ta->removed_bytes += removed; ++ return; + } + } ++ else ++ BFD_ASSERT (splay_tree_lookup (l->tree, (splay_tree_key)&a) == NULL); + +- /* Create a new record and fill it up. */ + ta = (text_action *) bfd_zmalloc (sizeof (text_action)); + ta->action = action; + ta->sec = sec; + ta->offset = offset; + ta->removed_bytes = removed; +- ta->next = (*m_p); +- *m_p = ta; ++ splay_tree_insert (l->tree, (splay_tree_key)ta, (splay_tree_value)ta); ++ ++l->count; + } + + +@@ -5570,7 +5607,6 @@ text_action_add_literal (text_action_list *l, + const literal_value *value, + int removed) + { +- text_action **m_p; + text_action *ta; + asection *sec = r_reloc_get_section (loc); + bfd_vma offset = loc->target_offset; +@@ -5578,14 +5614,6 @@ text_action_add_literal (text_action_list *l, + + BFD_ASSERT (action == ta_add_literal); + +- for (m_p = &l->head; *m_p != NULL; m_p = &(*m_p)->next) +- { +- if ((*m_p)->offset > offset +- && ((*m_p)->offset != offset +- || (*m_p)->virtual_offset > virtual_offset)) +- break; +- } +- + /* Create a new record and fill it up. */ + ta = (text_action *) bfd_zmalloc (sizeof (text_action)); + ta->action = action; +@@ -5594,8 +5622,10 @@ text_action_add_literal (text_action_list *l, + ta->virtual_offset = virtual_offset; + ta->value = *value; + ta->removed_bytes = removed; +- ta->next = (*m_p); +- *m_p = ta; ++ ++ BFD_ASSERT (splay_tree_lookup (l->tree, (splay_tree_key)ta) == NULL); ++ splay_tree_insert (l->tree, (splay_tree_key)ta, (splay_tree_value)ta); ++ ++l->count; + } + + +@@ -5606,7 +5636,8 @@ text_action_add_literal (text_action_list *l, + so that each search may begin where the previous one left off. */ + + static int +-removed_by_actions (text_action **p_start_action, ++removed_by_actions (text_action_list *action_list, ++ text_action **p_start_action, + bfd_vma offset, + bfd_boolean before_fill) + { +@@ -5614,6 +5645,13 @@ removed_by_actions (text_action **p_start_action, + int removed = 0; + + r = *p_start_action; ++ if (r) ++ { ++ splay_tree_node node = splay_tree_lookup (action_list->tree, ++ (splay_tree_key)r); ++ BFD_ASSERT (node != NULL && r == (text_action *)node->value); ++ } ++ + while (r) + { + if (r->offset > offset) +@@ -5625,7 +5663,7 @@ removed_by_actions (text_action **p_start_action, + + removed += r->removed_bytes; + +- r = r->next; ++ r = action_next (action_list, r); + } + + *p_start_action = r; +@@ -5636,68 +5674,74 @@ removed_by_actions (text_action **p_start_action, + static bfd_vma + offset_with_removed_text (text_action_list *action_list, bfd_vma offset) + { +- text_action *r = action_list->head; +- return offset - removed_by_actions (&r, offset, FALSE); ++ text_action *r = action_first (action_list); ++ ++ return offset - removed_by_actions (action_list, &r, offset, FALSE); + } + + + static unsigned + action_list_count (text_action_list *action_list) + { +- text_action *r = action_list->head; +- unsigned count = 0; +- for (r = action_list->head; r != NULL; r = r->next) +- { +- count++; +- } +- return count; ++ return action_list->count; + } + +-static void +-map_removal_by_action (text_action_list *action_list) ++typedef struct map_action_fn_context_struct map_action_fn_context; ++struct map_action_fn_context_struct + { +- text_action *r; +- int removed = 0; ++ int removed; + removal_by_action_map map; + bfd_boolean eq_complete; ++}; + +- map.n_entries = 0; +- map.entry = bfd_malloc (action_list_count (action_list) * +- sizeof (removal_by_action_entry)); +- eq_complete = FALSE; ++static int ++map_action_fn (splay_tree_node node, void *p) ++{ ++ map_action_fn_context *ctx = p; ++ text_action *r = (text_action *)node->value; ++ removal_by_action_entry *ientry = ctx->map.entry + ctx->map.n_entries; + +- for (r = action_list->head; r;) ++ if (ctx->map.n_entries && (ientry - 1)->offset == r->offset) + { +- removal_by_action_entry *ientry = map.entry + map.n_entries; ++ --ientry; ++ } ++ else ++ { ++ ++ctx->map.n_entries; ++ ctx->eq_complete = FALSE; ++ ientry->offset = r->offset; ++ ientry->eq_removed_before_fill = ctx->removed; ++ } + +- if (map.n_entries && (ientry - 1)->offset == r->offset) ++ if (!ctx->eq_complete) ++ { ++ if (r->action != ta_fill || r->removed_bytes >= 0) + { +- --ientry; ++ ientry->eq_removed = ctx->removed; ++ ctx->eq_complete = TRUE; + } + else +- { +- ++map.n_entries; +- eq_complete = FALSE; +- ientry->offset = r->offset; +- ientry->eq_removed_before_fill = removed; +- } ++ ientry->eq_removed = ctx->removed + r->removed_bytes; ++ } + +- if (!eq_complete) +- { +- if (r->action != ta_fill || r->removed_bytes >= 0) +- { +- ientry->eq_removed = removed; +- eq_complete = TRUE; +- } +- else +- ientry->eq_removed = removed + r->removed_bytes; +- } ++ ctx->removed += r->removed_bytes; ++ ientry->removed = ctx->removed; ++ return 0; ++} + +- removed += r->removed_bytes; +- ientry->removed = removed; +- r = r->next; +- } +- action_list->map = map; ++static void ++map_removal_by_action (text_action_list *action_list) ++{ ++ map_action_fn_context ctx; ++ ++ ctx.removed = 0; ++ ctx.map.n_entries = 0; ++ ctx.map.entry = bfd_malloc (action_list_count (action_list) * ++ sizeof (removal_by_action_entry)); ++ ctx.eq_complete = FALSE; ++ ++ splay_tree_foreach (action_list->tree, map_action_fn, &ctx); ++ action_list->map = ctx.map; + } + + static int +@@ -5754,28 +5798,26 @@ offset_with_removed_text_map (text_action_list *action_list, bfd_vma offset) + static text_action * + find_insn_action (text_action_list *action_list, bfd_vma offset) + { +- text_action *t; +- for (t = action_list->head; t; t = t->next) ++ static const text_action_t action[] = + { +- if (t->offset == offset) +- { +- switch (t->action) +- { +- case ta_none: +- case ta_fill: +- break; +- case ta_remove_insn: +- case ta_remove_longcall: +- case ta_convert_longcall: +- case ta_narrow_insn: +- case ta_widen_insn: +- return t; +- case ta_remove_literal: +- case ta_add_literal: +- BFD_ASSERT (0); +- break; +- } +- } ++ ta_convert_longcall, ++ ta_remove_longcall, ++ ta_widen_insn, ++ ta_narrow_insn, ++ ta_remove_insn, ++ }; ++ text_action a; ++ unsigned i; ++ ++ a.offset = offset; ++ for (i = 0; i < sizeof (action) / sizeof (*action); ++i) ++ { ++ splay_tree_node node; ++ ++ a.action = action[i]; ++ node = splay_tree_lookup (action_list->tree, (splay_tree_key)&a); ++ if (node) ++ return (text_action *)node->value; + } + return NULL; + } +@@ -5784,40 +5826,50 @@ find_insn_action (text_action_list *action_list, bfd_vma offset) + #if DEBUG + + static void +-print_action_list (FILE *fp, text_action_list *action_list) ++print_action (FILE *fp, text_action *r) ++{ ++ const char *t = "unknown"; ++ switch (r->action) ++ { ++ case ta_remove_insn: ++ t = "remove_insn"; break; ++ case ta_remove_longcall: ++ t = "remove_longcall"; break; ++ case ta_convert_longcall: ++ t = "convert_longcall"; break; ++ case ta_narrow_insn: ++ t = "narrow_insn"; break; ++ case ta_widen_insn: ++ t = "widen_insn"; break; ++ case ta_fill: ++ t = "fill"; break; ++ case ta_none: ++ t = "none"; break; ++ case ta_remove_literal: ++ t = "remove_literal"; break; ++ case ta_add_literal: ++ t = "add_literal"; break; ++ } ++ ++ fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n", ++ r->sec->owner->filename, ++ r->sec->name, (unsigned long) r->offset, t, r->removed_bytes); ++} ++ ++static int ++print_action_list_fn (splay_tree_node node, void *p) + { +- text_action *r; ++ text_action *r = (text_action *)node->value; + +- fprintf (fp, "Text Action\n"); +- for (r = action_list->head; r != NULL; r = r->next) +- { +- const char *t = "unknown"; +- switch (r->action) +- { +- case ta_remove_insn: +- t = "remove_insn"; break; +- case ta_remove_longcall: +- t = "remove_longcall"; break; +- case ta_convert_longcall: +- t = "convert_longcall"; break; +- case ta_narrow_insn: +- t = "narrow_insn"; break; +- case ta_widen_insn: +- t = "widen_insn"; break; +- case ta_fill: +- t = "fill"; break; +- case ta_none: +- t = "none"; break; +- case ta_remove_literal: +- t = "remove_literal"; break; +- case ta_add_literal: +- t = "add_literal"; break; +- } ++ print_action (p, r); ++ return 0; ++} + +- fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n", +- r->sec->owner->filename, +- r->sec->name, (unsigned long) r->offset, t, r->removed_bytes); +- } ++static void ++print_action_list (FILE *fp, text_action_list *action_list) ++{ ++ fprintf (fp, "Text Action\n"); ++ splay_tree_foreach (action_list->tree, print_action_list_fn, fp); + } + + #endif /* DEBUG */ +@@ -6071,8 +6123,8 @@ init_xtensa_relax_info (asection *sec) + relax_info->removed_list.head = NULL; + relax_info->removed_list.tail = NULL; + +- relax_info->action_list.head = NULL; +- ++ relax_info->action_list.tree = splay_tree_new (text_action_compare, ++ NULL, NULL); + relax_info->action_list.map.n_entries = 0; + relax_info->action_list.map.entry = NULL; + +@@ -7762,7 +7814,7 @@ compute_text_actions (bfd *abfd, + free_reloc_range_list (&relevant_relocs); + + #if DEBUG +- if (relax_info->action_list.head) ++ if (action_list_count (&relax_info->action_list)) + print_action_list (stderr, &relax_info->action_list); + #endif + +@@ -8263,6 +8315,54 @@ xlate_offset_with_removed_text (const xlate_map_t *map, + return e->new_address - e->orig_address + offset; + } + ++typedef struct xlate_map_context_struct xlate_map_context; ++struct xlate_map_context_struct ++{ ++ xlate_map_t *map; ++ xlate_map_entry_t *current_entry; ++ int removed; ++}; ++ ++static int ++xlate_map_fn (splay_tree_node node, void *p) ++{ ++ text_action *r = (text_action *)node->value; ++ xlate_map_context *ctx = p; ++ unsigned orig_size = 0; ++ ++ switch (r->action) ++ { ++ case ta_none: ++ case ta_remove_insn: ++ case ta_convert_longcall: ++ case ta_remove_literal: ++ case ta_add_literal: ++ break; ++ case ta_remove_longcall: ++ orig_size = 6; ++ break; ++ case ta_narrow_insn: ++ orig_size = 3; ++ break; ++ case ta_widen_insn: ++ orig_size = 2; ++ break; ++ case ta_fill: ++ break; ++ } ++ ctx->current_entry->size = ++ r->offset + orig_size - ctx->current_entry->orig_address; ++ if (ctx->current_entry->size != 0) ++ { ++ ctx->current_entry++; ++ ctx->map->entry_count++; ++ } ++ ctx->current_entry->orig_address = r->offset + orig_size; ++ ctx->removed += r->removed_bytes; ++ ctx->current_entry->new_address = r->offset + orig_size - ctx->removed; ++ ctx->current_entry->size = 0; ++ return 0; ++} + + /* Build a binary searchable offset translation map from a section's + action list. */ +@@ -8270,75 +8370,40 @@ xlate_offset_with_removed_text (const xlate_map_t *map, + static xlate_map_t * + build_xlate_map (asection *sec, xtensa_relax_info *relax_info) + { +- xlate_map_t *map = (xlate_map_t *) bfd_malloc (sizeof (xlate_map_t)); + text_action_list *action_list = &relax_info->action_list; + unsigned num_actions = 0; +- text_action *r; +- int removed; +- xlate_map_entry_t *current_entry; ++ xlate_map_context ctx; + +- if (map == NULL) ++ ctx.map = (xlate_map_t *) bfd_malloc (sizeof (xlate_map_t)); ++ ++ if (ctx.map == NULL) + return NULL; + + num_actions = action_list_count (action_list); +- map->entry = (xlate_map_entry_t *) ++ ctx.map->entry = (xlate_map_entry_t *) + bfd_malloc (sizeof (xlate_map_entry_t) * (num_actions + 1)); +- if (map->entry == NULL) ++ if (ctx.map->entry == NULL) + { +- free (map); ++ free (ctx.map); + return NULL; + } +- map->entry_count = 0; ++ ctx.map->entry_count = 0; + +- removed = 0; +- current_entry = &map->entry[0]; ++ ctx.removed = 0; ++ ctx.current_entry = &ctx.map->entry[0]; + +- current_entry->orig_address = 0; +- current_entry->new_address = 0; +- current_entry->size = 0; ++ ctx.current_entry->orig_address = 0; ++ ctx.current_entry->new_address = 0; ++ ctx.current_entry->size = 0; + +- for (r = action_list->head; r != NULL; r = r->next) +- { +- unsigned orig_size = 0; +- switch (r->action) +- { +- case ta_none: +- case ta_remove_insn: +- case ta_convert_longcall: +- case ta_remove_literal: +- case ta_add_literal: +- break; +- case ta_remove_longcall: +- orig_size = 6; +- break; +- case ta_narrow_insn: +- orig_size = 3; +- break; +- case ta_widen_insn: +- orig_size = 2; +- break; +- case ta_fill: +- break; +- } +- current_entry->size = +- r->offset + orig_size - current_entry->orig_address; +- if (current_entry->size != 0) +- { +- current_entry++; +- map->entry_count++; +- } +- current_entry->orig_address = r->offset + orig_size; +- removed += r->removed_bytes; +- current_entry->new_address = r->offset + orig_size - removed; +- current_entry->size = 0; +- } ++ splay_tree_foreach (action_list->tree, xlate_map_fn, &ctx); + +- current_entry->size = (bfd_get_section_limit (sec->owner, sec) +- - current_entry->orig_address); +- if (current_entry->size != 0) +- map->entry_count++; ++ ctx.current_entry->size = (bfd_get_section_limit (sec->owner, sec) ++ - ctx.current_entry->orig_address); ++ if (ctx.current_entry->size != 0) ++ ctx.map->entry_count++; + +- return map; ++ return ctx.map; + } + + +@@ -9302,6 +9367,16 @@ move_shared_literal (asection *sec, + + /* Second relaxation pass. */ + ++static int ++action_remove_bytes_fn (splay_tree_node node, void *p) ++{ ++ bfd_size_type *final_size = p; ++ text_action *action = (text_action *)node->value; ++ ++ *final_size -= action->removed_bytes; ++ return 0; ++} ++ + /* Modify all of the relocations to point to the right spot, and if this + is a relaxable section, delete the unwanted literals and fix the + section size. */ +@@ -9334,7 +9409,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + + internal_relocs = retrieve_internal_relocs (abfd, sec, + link_info->keep_memory); +- if (!internal_relocs && !relax_info->action_list.head) ++ if (!internal_relocs && !action_list_count (&relax_info->action_list)) + return TRUE; + + contents = retrieve_contents (abfd, sec, link_info->keep_memory); +@@ -9412,6 +9487,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + } + /* Update the action so that the code that moves + the contents will do the right thing. */ ++ /* ta_remove_longcall and ta_remove_insn actions are ++ grouped together in the tree as well as ++ ta_convert_longcall and ta_none, so that changes below ++ can be done w/o removing and reinserting action into ++ the tree. */ ++ + if (action->action == ta_remove_longcall) + action->action = ta_remove_insn; + else +@@ -9584,13 +9665,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + + if ((relax_info->is_relaxable_literal_section + || relax_info->is_relaxable_asm_section) +- && relax_info->action_list.head) ++ && action_list_count (&relax_info->action_list)) + { + /* Walk through the planned actions and build up a table + of move, copy and fill records. Use the move, copy and + fill records to perform the actions once. */ + +- int removed = 0; + bfd_size_type final_size, copy_size, orig_insn_size; + bfd_byte *scratch = NULL; + bfd_byte *dup_contents = NULL; +@@ -9601,15 +9681,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + bfd_vma orig_dot_vo = 0; /* Virtual offset from orig_dot. */ + bfd_vma dup_dot = 0; + +- text_action *action = relax_info->action_list.head; ++ text_action *action; + + final_size = sec->size; +- for (action = relax_info->action_list.head; action; +- action = action->next) +- { +- final_size -= action->removed_bytes; +- } + ++ splay_tree_foreach (relax_info->action_list.tree, ++ action_remove_bytes_fn, &final_size); + scratch = (bfd_byte *) bfd_zmalloc (final_size); + dup_contents = (bfd_byte *) bfd_zmalloc (final_size); + +@@ -9618,8 +9695,8 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + print_action_list (stderr, &relax_info->action_list); + #endif + +- for (action = relax_info->action_list.head; action; +- action = action->next) ++ for (action = action_first (&relax_info->action_list); action; ++ action = action_next (&relax_info->action_list, action)) + { + virtual_action = FALSE; + if (action->offset > orig_dot) +@@ -9748,7 +9825,6 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + break; + } + +- removed += action->removed_bytes; + BFD_ASSERT (dup_dot <= final_size); + BFD_ASSERT (orig_dot <= orig_size); + } +-- +1.8.1.4 + diff --git a/package/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch b/package/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch new file mode 100644 index 0000000000..043ff4df1e --- /dev/null +++ b/package/binutils/2.24/910-xtensa-optimize-trampolines-relaxation.patch @@ -0,0 +1,345 @@ +From cbe53e134d4c3a656880a906738ce19fdcd38e8b Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 1 May 2015 11:39:12 +0300 +Subject: [PATCH] xtensa: optimize trampolines relaxation + +Currently every fixup in the current segment is checked when relaxing +trampoline frag. This is very expensive. Make a searchable array of +fixups pointing at potentially oversized jumps at the beginning of every +relaxation pass and only check subset of this cache in the reach of +single jump from the trampoline frag currently being relaxed. + +Original profile: + +% time self children called name +----------------------------------------- + 370.16 593.38 12283048/12283048 relax_segment + 98.4 370.16 593.38 12283048 xtensa_relax_frag + 58.91 269.26 2691463834/2699602236 xtensa_insnbuf_from_chars + 68.35 68.17 811266668/813338977 S_GET_VALUE + 36.85 29.51 2684369246/2685538060 xtensa_opcode_decode + 28.34 8.84 2684369246/2685538060 xtensa_format_get_slot + 12.39 5.94 2691463834/2699775044 xtensa_format_decode + 0.03 4.60 4101109/4101109 relax_frag_for_align + 0.18 1.76 994617/994617 relax_frag_immed + 0.07 0.09 24556277/24851220 new_logical_line + 0.06 0.00 12283048/14067410 as_where + 0.04 0.00 7094588/15460506 xtensa_format_num_slots + 0.00 0.00 1/712477 xtensa_insnbuf_alloc +----------------------------------------- + +Same data, after optimization: + +% time self children called name +----------------------------------------- + 0.51 7.47 12283048/12283048 relax_segment + 58.0 0.51 7.47 12283048 xtensa_relax_frag + 0.02 4.08 4101109/4101109 relax_frag_for_align + 0.18 1.39 994617/994617 relax_frag_immed + 0.01 0.98 555/555 xtensa_cache_relaxable_fixups + 0.21 0.25 7094588/16693271 xtensa_insnbuf_from_chars + 0.06 0.12 24556277/24851220 new_logical_line + 0.06 0.00 7094588/15460506 xtensa_format_num_slots + 0.02 0.04 7094588/16866079 xtensa_format_decode + 0.05 0.00 12283048/14067410 as_where + 0.00 0.00 1/712477 xtensa_insnbuf_alloc + 0.00 0.00 93808/93808 xtensa_find_first_cached_fixup +----------------------------------------- + +2015-05-02 Max Filippov +gas/ + * config/tc-xtensa.c (cached_fixupS, fixup_cacheS): New typedefs. + (struct cached_fixup, struct fixup_cache): New structures. + (fixup_order, xtensa_make_cached_fixup), + (xtensa_realloc_fixup_cache, xtensa_cache_relaxable_fixups), + (xtensa_find_first_cached_fixup, xtensa_delete_cached_fixup), + (xtensa_add_cached_fixup): New functions. + (xtensa_relax_frag): Cache fixups pointing at potentially + oversized jumps at the beginning of every relaxation pass. Only + check subset of this cache in the reach of single jump from the + trampoline frag currently being relaxed. + +Signed-off-by: Max Filippov +--- +Backported from: b76f99d702c3501ac320396ea06bc7f9237173c3 +Changes to ChangeLog are dropped. + + gas/config/tc-xtensa.c | 220 +++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 194 insertions(+), 26 deletions(-) + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 3e85b69..31c0b6b 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -8785,6 +8785,154 @@ static long relax_frag_for_align (fragS *, long); + static long relax_frag_immed + (segT, fragS *, long, int, xtensa_format, int, int *, bfd_boolean); + ++typedef struct cached_fixup cached_fixupS; ++struct cached_fixup ++{ ++ int addr; ++ int target; ++ int delta; ++ fixS *fixP; ++}; ++ ++typedef struct fixup_cache fixup_cacheS; ++struct fixup_cache ++{ ++ cached_fixupS *fixups; ++ unsigned n_fixups; ++ unsigned n_max; ++ ++ segT seg; ++ fragS *first_frag; ++}; ++ ++static int fixup_order (const void *a, const void *b) ++{ ++ const cached_fixupS *pa = a; ++ const cached_fixupS *pb = b; ++ ++ if (pa->addr == pb->addr) ++ { ++ if (pa->target == pb->target) ++ { ++ if (pa->fixP->fx_r_type == pb->fixP->fx_r_type) ++ return 0; ++ return pa->fixP->fx_r_type < pb->fixP->fx_r_type ? -1 : 1; ++ } ++ return pa->target - pb->target; ++ } ++ return pa->addr - pb->addr; ++} ++ ++static bfd_boolean xtensa_make_cached_fixup (cached_fixupS *o, fixS *fixP) ++{ ++ xtensa_isa isa = xtensa_default_isa; ++ int addr = fixP->fx_frag->fr_address; ++ int target; ++ int delta; ++ symbolS *s = fixP->fx_addsy; ++ int slot; ++ xtensa_format fmt; ++ xtensa_opcode opcode; ++ ++ if (fixP->fx_r_type < BFD_RELOC_XTENSA_SLOT0_OP || ++ fixP->fx_r_type > BFD_RELOC_XTENSA_SLOT14_OP) ++ return FALSE; ++ target = S_GET_VALUE (s); ++ delta = target - addr; ++ ++ if (abs(delta) < J_RANGE / 2) ++ return FALSE; ++ ++ xtensa_insnbuf_from_chars (isa, trampoline_buf, ++ (unsigned char *) fixP->fx_frag->fr_literal + ++ fixP->fx_where, 0); ++ fmt = xtensa_format_decode (isa, trampoline_buf); ++ gas_assert (fmt != XTENSA_UNDEFINED); ++ slot = fixP->tc_fix_data.slot; ++ xtensa_format_get_slot (isa, fmt, slot, trampoline_buf, trampoline_slotbuf); ++ opcode = xtensa_opcode_decode (isa, fmt, slot, trampoline_slotbuf); ++ if (opcode != xtensa_j_opcode) ++ return FALSE; ++ ++ o->addr = addr; ++ o->target = target; ++ o->delta = delta; ++ o->fixP = fixP; ++ ++ return TRUE; ++} ++ ++static void xtensa_realloc_fixup_cache (fixup_cacheS *cache, unsigned add) ++{ ++ if (cache->n_fixups + add > cache->n_max) ++ { ++ cache->n_max = (cache->n_fixups + add) * 2; ++ cache->fixups = xrealloc (cache->fixups, ++ sizeof (*cache->fixups) * cache->n_max); ++ } ++} ++ ++static void xtensa_cache_relaxable_fixups (fixup_cacheS *cache, ++ segment_info_type *seginfo) ++{ ++ fixS *fixP; ++ ++ cache->n_fixups = 0; ++ ++ for (fixP = seginfo->fix_root; fixP ; fixP = fixP->fx_next) ++ { ++ xtensa_realloc_fixup_cache (cache, 1); ++ ++ if (xtensa_make_cached_fixup (cache->fixups + cache->n_fixups, fixP)) ++ ++cache->n_fixups; ++ } ++ qsort (cache->fixups, cache->n_fixups, sizeof (*cache->fixups), fixup_order); ++} ++ ++static unsigned xtensa_find_first_cached_fixup (const fixup_cacheS *cache, ++ int addr) ++{ ++ unsigned a = 0; ++ unsigned b = cache->n_fixups; ++ ++ while (b - a > 1) ++ { ++ unsigned c = (a + b) / 2; ++ ++ if (cache->fixups[c].addr < addr) ++ a = c; ++ else ++ b = c; ++ } ++ return a; ++} ++ ++static void xtensa_delete_cached_fixup (fixup_cacheS *cache, unsigned i) ++{ ++ memmove (cache->fixups + i, cache->fixups + i + 1, ++ (cache->n_fixups - i - 1) * sizeof (*cache->fixups)); ++ --cache->n_fixups; ++} ++ ++static bfd_boolean xtensa_add_cached_fixup (fixup_cacheS *cache, fixS *fixP) ++{ ++ cached_fixupS o; ++ unsigned i; ++ ++ if (!xtensa_make_cached_fixup (&o, fixP)) ++ return FALSE; ++ xtensa_realloc_fixup_cache (cache, 1); ++ i = xtensa_find_first_cached_fixup (cache, o.addr); ++ if (i < cache->n_fixups) ++ { ++ ++i; ++ memmove (cache->fixups + i + 1, cache->fixups + i, ++ (cache->n_fixups - i) * sizeof (*cache->fixups)); ++ } ++ cache->fixups[i] = o; ++ ++cache->n_fixups; ++ return TRUE; ++} + + /* Return the number of bytes added to this fragment, given that the + input has been stretched already by "stretch". */ +@@ -8896,35 +9044,42 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) + case RELAX_TRAMPOLINE: + if (fragP->tc_frag_data.relax_seen) + { +- segment_info_type *seginfo = seg_info (now_seg); +- fragS *fP; /* The out-of-range jump. */ +- fixS *fixP; ++ static fixup_cacheS fixup_cache; ++ segment_info_type *seginfo = seg_info (now_seg); ++ int trampaddr = fragP->fr_address + fragP->fr_fix; ++ int searchaddr = trampaddr < J_RANGE ? 0 : trampaddr - J_RANGE; ++ unsigned i; ++ ++ if (now_seg != fixup_cache.seg || ++ fragP == fixup_cache.first_frag || ++ fixup_cache.first_frag == NULL) ++ { ++ xtensa_cache_relaxable_fixups (&fixup_cache, seginfo); ++ fixup_cache.seg = now_seg; ++ fixup_cache.first_frag = fragP; ++ } + + /* Scan for jumps that will not reach. */ +- for (fixP = seginfo->fix_root; fixP ; fixP = fixP->fx_next) ++ for (i = xtensa_find_first_cached_fixup (&fixup_cache, searchaddr); ++ i < fixup_cache.n_fixups; ++i) ++ + { +- symbolS *s = fixP->fx_addsy; +- xtensa_opcode opcode; +- int target; +- int addr; +- int delta; +- +- if (fixP->fx_r_type < BFD_RELOC_XTENSA_SLOT0_OP || +- fixP->fx_r_type > BFD_RELOC_XTENSA_SLOT14_OP) +- continue; +- xtensa_insnbuf_from_chars (isa, trampoline_buf, +- (unsigned char *) fixP->fx_frag->fr_literal + fixP->fx_where, +- 0); +- fmt = xtensa_format_decode (isa, trampoline_buf); +- gas_assert (fmt != XTENSA_UNDEFINED); +- slot = fixP->tc_fix_data.slot; +- xtensa_format_get_slot (isa, fmt, slot, trampoline_buf, trampoline_slotbuf); +- opcode = xtensa_opcode_decode (isa, fmt, slot, trampoline_slotbuf); +- if (opcode != xtensa_j_opcode) ++ fixS *fixP = fixup_cache.fixups[i].fixP; ++ int target = fixup_cache.fixups[i].target; ++ int addr = fixup_cache.fixups[i].addr; ++ int delta = fixup_cache.fixups[i].delta + stretch; ++ ++ trampaddr = fragP->fr_address + fragP->fr_fix; ++ ++ if (addr + J_RANGE < trampaddr) + continue; +- target = S_GET_VALUE (s); +- addr = fixP->fx_frag->fr_address; +- delta = target - addr + stretch; ++ if (addr > trampaddr + J_RANGE) ++ break; ++ if (abs (delta) < J_RANGE) ++ continue; ++ ++ slot = fixP->tc_fix_data.slot; ++ + if (delta > J_RANGE || delta < -1 * J_RANGE) + { /* Found an out-of-range jump; scan the list of trampolines for the best match. */ + struct trampoline_seg *ts = find_trampoline_seg (now_seg); +@@ -8978,14 +9133,13 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) + } + if (tf->fragP == fragP) + { +- int trampaddr = fragP->fr_address + fragP->fr_fix; +- + if (abs (addr - trampaddr) < J_RANGE) + { /* The trampoline is in range of original; fix it! */ + fixS *newfixP; + int offset; + TInsn insn; + symbolS *lsym; ++ fragS *fP; /* The out-of-range jump. */ + + new_stretch += init_trampoline_frag (tf); + offset = fragP->fr_fix; /* Where to assemble the j insn. */ +@@ -9009,10 +9163,20 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) + newfixP->tc_fix_data.X_add_symbol = lsym; + newfixP->tc_fix_data.X_add_number = offset; + newfixP->tc_fix_data.slot = slot; ++ ++ xtensa_delete_cached_fixup (&fixup_cache, i); ++ xtensa_add_cached_fixup (&fixup_cache, newfixP); ++ + /* Move the fix-up from the original j insn to this one. */ + fixP->fx_frag = fragP; + fixP->fx_where = fragP->fr_fix - 3; + fixP->tc_fix_data.slot = 0; ++ ++ xtensa_add_cached_fixup (&fixup_cache, fixP); ++ ++ /* re-do current fixup */ ++ --i; ++ + /* Adjust the jump around this trampoline (if present). */ + if (tf->fixP != NULL) + { +@@ -9027,6 +9191,8 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) + fragP->fr_subtype = 0; + /* Remove from the trampoline_list. */ + prev->next = tf->next; ++ if (fragP == fixup_cache.first_frag) ++ fixup_cache.first_frag = NULL; + break; + } + } +-- +1.8.1.4 + diff --git a/package/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch b/package/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch new file mode 100644 index 0000000000..9ad6b3be05 --- /dev/null +++ b/package/binutils/2.24/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch @@ -0,0 +1,57 @@ +From 8ec76b16f62d1bf386fb2c39af5f66c3afddc5cb Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 14 May 2015 05:22:55 +0300 +Subject: [PATCH] xtensa: fix localized symbol refcounting with --gc-sections + +elf_xtensa_gc_sweep_hook doesn't correctly unreference symbols that were +made local, that results in link failure with the following message: + + BFD (GNU Binutils) 2.24 internal error, aborting at elf32-xtensa.c line + 3372 in elf_xtensa_finish_dynamic_sections + +elf_xtensa_gc_sweep_hook determines symbol reference type (PLT or GOT) by +relocation type. Relocation types are not changed when symbol becomes +local, but its PLT references are added to GOT references and +plt.refcount is set to 0. Such symbol cannot be unreferences in the +elf_xtensa_gc_sweep_hook and its extra references make calculated GOT +relocations section size not match number of GOT relocations. + +Fix it by treating PLT reference as GOT reference when plt.refcount is +not positive. + +2015-05-14 Max Filippov +bfd/ + * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference + as GOT reference when plt.refcount is not positive. + +Signed-off-by: Max Filippov +--- +Backported from: e6c9a083ec5ae7a45bd71682b26aae1939849388 +Changes to ChangeLog are dropped. + + bfd/elf32-xtensa.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 53af1c6..2523670 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -1360,10 +1360,14 @@ elf_xtensa_gc_sweep_hook (bfd *abfd, + { + if (is_plt) + { ++ /* If the symbol has been localized its plt.refcount got moved ++ to got.refcount. Handle it as GOT. */ + if (h->plt.refcount > 0) + h->plt.refcount--; ++ else ++ is_got = TRUE; + } +- else if (is_got) ++ if (is_got) + { + if (h->got.refcount > 0) + h->got.refcount--; +-- +1.8.1.4 + diff --git a/package/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch b/package/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch new file mode 100644 index 0000000000..4a3de2c839 --- /dev/null +++ b/package/binutils/2.24/912-xtensa-fix-gas-segfault-with-text-section-literals.patch @@ -0,0 +1,56 @@ +From 2d0522e76e4afeeb2e104e0a4332d94fa0d2fbf6 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sun, 17 May 2015 06:46:15 +0300 +Subject: [PATCH] xtensa: fix gas segfault with --text-section-literals + +When --text-section-literals is used and code in the .init or .fini +emits literal in the absence of .literal_position, xtensa_move_literals +segfaults. + +Check that search_frag is non-NULL in the xtensa_move_literals and +report error otherwise. + +2015-05-26 Max Filippov +gas/ + * config/tc-xtensa.c (xtensa_move_literals): Check that + search_frag is non-NULL. Report error if literal frag is not + found. + +Signed-off-by: Max Filippov +--- +Backported from: 4de0562a4c69fef4952aa7e19d7bda359f02e8b4 +Changes to ChangeLog are dropped. + + gas/config/tc-xtensa.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 31c0b6b..18307c1 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -10808,13 +10808,21 @@ xtensa_move_literals (void) + frchain_to = NULL; + frag_splice = &(frchain_from->frch_root); + +- while (!search_frag->tc_frag_data.literal_frag) ++ while (search_frag && !search_frag->tc_frag_data.literal_frag) + { + gas_assert (search_frag->fr_fix == 0 + || search_frag->fr_type == rs_align); + search_frag = search_frag->fr_next; + } + ++ if (!search_frag) ++ { ++ search_frag = frchain_from->frch_root; ++ as_bad_where (search_frag->fr_file, search_frag->fr_line, ++ _("literal pool location required for text-section-literals; specify with .literal_position")); ++ continue; ++ } ++ + gas_assert (search_frag->tc_frag_data.literal_frag->fr_subtype + == RELAX_LITERAL_POOL_BEGIN); + xtensa_switch_section_emit_state (&state, segment->seg, 0); +-- +1.8.1.4 + diff --git a/package/binutils/2.24/913-xtensa-add-auto-litpools-option.patch b/package/binutils/2.24/913-xtensa-add-auto-litpools-option.patch new file mode 100644 index 0000000000..f0199e1e2a --- /dev/null +++ b/package/binutils/2.24/913-xtensa-add-auto-litpools-option.patch @@ -0,0 +1,698 @@ +From 978adaaa4cd3921842e2be8a31c05f081fb17fcf Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Wed, 29 Jul 2015 17:42:54 +0300 +Subject: [PATCH] xtensa: add --auto-litpools option + +Auto-litpools is the automated version of text-section-literals: literal +pool candidate frags are planted every N frags and during relaxation +they are turned into actual literal pools where literals are moved to +become reachable for their first reference by L32R instruction. + +2015-08-12 David Weatherford +gas/ + * config/tc-xtensa.c (struct litpool_frag, struct litpool_seg): + New structures. + (xtensa_maybe_create_literal_pool_frag): New function. + (litpool_seg_list, auto_litpools, auto_litpool_limit) + (litpool_buf, litpool_slotbuf): New static variables. + (option_auto_litpools, option_no_auto_litpools) + (option_auto_litpool_limit): New enum identifiers. + (md_longopts): Add entries for auto-litpools, no-auto-litpools + and auto-litpool-limit. + (md_parse_option): Handle option_auto_litpools, + option_no_auto_litpools and option_auto_litpool_limit. + (md_show_usage): Add help for --[no-]auto-litpools and + --auto-litpool-limit. + (xtensa_mark_literal_pool_location): Record a place for literal + pool with a call to xtensa_maybe_create_literal_pool_frag. + (get_literal_pool_location): Find highest priority literal pool + or convert candidate to literal pool when auto-litpools are used. + (xg_assemble_vliw_tokens): Create literal pool after jump + instruction. + (xtensa_check_frag_count): Create candidate literal pool every + auto_litpool_limit frags. + (xtensa_relax_frag): Add jump around literals to non-empty + literal pool. + (xtensa_move_literals): Estimate literal pool addresses and move + unreachable literals closer to their users, converting candidate + to literal pool if needed. + (xtensa_switch_to_non_abs_literal_fragment): Only emit error + about missing .literal_position in case auto-litpools are not + used. + * config/tc-xtensa.h (xtensa_relax_statesE): New relaxation + state: RELAX_LITERAL_POOL_CANDIDATE_BEGIN. + +2015-08-12 Max Filippov +gas/testsuite/ + * gas/xtensa/all.exp: Add auto-litpools to the list of xtensa + tests. + * gas/xtensa/auto-litpools.s: New file: auto-litpools test. + * gas/xtensa/auto-litpools.s: New file: auto-litpools test + result pattern. + +Signed-off-by: Max Filippov +--- +Backported from: b46824bd49648c575372e6d9bc6a6defeabd6ed5 +Changes to ChangeLogs and documentation are dropped. + + gas/config/tc-xtensa.c | 432 ++++++++++++++++++++++++++++++- + gas/config/tc-xtensa.h | 1 + + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/auto-litpools.d | 12 + + gas/testsuite/gas/xtensa/auto-litpools.s | 13 + + 5 files changed, 454 insertions(+), 5 deletions(-) + create mode 100644 gas/testsuite/gas/xtensa/auto-litpools.d + create mode 100644 gas/testsuite/gas/xtensa/auto-litpools.s + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 7311a05..b8b1e7d 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -440,6 +440,29 @@ bfd_boolean directive_state[] = + #endif + }; + ++/* A circular list of all potential and actual literal pool locations ++ in a segment. */ ++struct litpool_frag ++{ ++ struct litpool_frag *next; ++ struct litpool_frag *prev; ++ fragS *fragP; ++ addressT addr; ++ short priority; /* 1, 2, or 3 -- 1 is highest */ ++ short original_priority; ++}; ++ ++/* Map a segment to its litpool_frag list. */ ++struct litpool_seg ++{ ++ struct litpool_seg *next; ++ asection *seg; ++ struct litpool_frag frag_list; ++ int frag_count; /* since last litpool location */ ++}; ++ ++static struct litpool_seg litpool_seg_list; ++ + + /* Directive functions. */ + +@@ -474,6 +497,9 @@ static void xtensa_create_trampoline_frag (bfd_boolean); + static void xtensa_maybe_create_trampoline_frag (void); + struct trampoline_frag; + static int init_trampoline_frag (struct trampoline_frag *); ++static void xtensa_maybe_create_literal_pool_frag (bfd_boolean, bfd_boolean); ++static bfd_boolean auto_litpools = FALSE; ++static int auto_litpool_limit = 10000; + + /* Alignment Functions. */ + +@@ -698,6 +724,10 @@ enum + + option_trampolines, + option_no_trampolines, ++ ++ option_auto_litpools, ++ option_no_auto_litpools, ++ option_auto_litpool_limit, + }; + + const char *md_shortopts = ""; +@@ -773,6 +803,10 @@ struct option md_longopts[] = + { "trampolines", no_argument, NULL, option_trampolines }, + { "no-trampolines", no_argument, NULL, option_no_trampolines }, + ++ { "auto-litpools", no_argument, NULL, option_auto_litpools }, ++ { "no-auto-litpools", no_argument, NULL, option_no_auto_litpools }, ++ { "auto-litpool-limit", required_argument, NULL, option_auto_litpool_limit }, ++ + { NULL, no_argument, NULL, 0 } + }; + +@@ -961,6 +995,34 @@ md_parse_option (int c, char *arg) + use_trampolines = FALSE; + return 1; + ++ case option_auto_litpools: ++ auto_litpools = TRUE; ++ use_literal_section = FALSE; ++ return 1; ++ ++ case option_no_auto_litpools: ++ auto_litpools = FALSE; ++ auto_litpool_limit = -1; ++ return 1; ++ ++ case option_auto_litpool_limit: ++ { ++ int value = 0; ++ if (auto_litpool_limit < 0) ++ as_fatal (_("no-auto-litpools is incompatible with auto-litpool-limit")); ++ if (*arg == 0 || *arg == '-') ++ as_fatal (_("invalid auto-litpool-limit argument")); ++ value = strtol (arg, &arg, 10); ++ if (*arg != 0) ++ as_fatal (_("invalid auto-litpool-limit argument")); ++ if (value < 100 || value > 10000) ++ as_fatal (_("invalid auto-litpool-limit argument (range is 100-10000)")); ++ auto_litpool_limit = value; ++ auto_litpools = TRUE; ++ use_literal_section = FALSE; ++ return 1; ++ } ++ + default: + return 0; + } +@@ -986,7 +1048,12 @@ Xtensa options:\n\ + flix bundles\n\ + --rename-section old=new Rename section 'old' to 'new'\n\ + --[no-]trampolines [Do not] generate trampolines (jumps to jumps)\n\ +- when jumps do not reach their targets\n", stream); ++ when jumps do not reach their targets\n\ ++ --[no-]auto-litpools [Do not] automatically create literal pools\n\ ++ --auto-litpool-limit=\n\ ++ (range 100-10000) Maximum number of blocks of\n\ ++ instructions to emit between literal pool\n\ ++ locations; implies --auto-litpools flag\n", stream); + } + + +@@ -4728,6 +4795,8 @@ xtensa_mark_literal_pool_location (void) + pool_location = frag_now; + frag_now->tc_frag_data.lit_frchain = frchain_now; + frag_now->tc_frag_data.literal_frag = frag_now; ++ /* Just record this frag. */ ++ xtensa_maybe_create_literal_pool_frag (FALSE, FALSE); + frag_variant (rs_machine_dependent, 0, 0, + RELAX_LITERAL_POOL_BEGIN, NULL, 0, NULL); + xtensa_set_frag_assembly_state (frag_now); +@@ -4832,6 +4901,31 @@ get_expanded_loop_offset (xtensa_opcode opcode) + static fragS * + get_literal_pool_location (segT seg) + { ++ struct litpool_seg *lps = litpool_seg_list.next; ++ struct litpool_frag *lpf; ++ for ( ; lps && lps->seg->id != seg->id; lps = lps->next) ++ ; ++ if (lps) ++ { ++ for (lpf = lps->frag_list.prev; lpf->fragP; lpf = lpf->prev) ++ { /* Skip "candidates" for now. */ ++ if (lpf->fragP->fr_subtype == RELAX_LITERAL_POOL_BEGIN && ++ lpf->priority == 1) ++ return lpf->fragP; ++ } ++ /* Must convert a lower-priority pool. */ ++ for (lpf = lps->frag_list.prev; lpf->fragP; lpf = lpf->prev) ++ { ++ if (lpf->fragP->fr_subtype == RELAX_LITERAL_POOL_BEGIN) ++ return lpf->fragP; ++ } ++ /* Still no match -- try for a low priority pool. */ ++ for (lpf = lps->frag_list.prev; lpf->fragP; lpf = lpf->prev) ++ { ++ if (lpf->fragP->fr_subtype == RELAX_LITERAL_POOL_CANDIDATE_BEGIN) ++ return lpf->fragP; ++ } ++ } + return seg_info (seg)->tc_segment_info_data.literal_pool_loc; + } + +@@ -7098,6 +7192,11 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn) + frag_now->tc_frag_data.slot_symbols[slot] = tinsn->symbol; + frag_now->tc_frag_data.slot_offsets[slot] = tinsn->offset; + frag_now->tc_frag_data.literal_frags[slot] = tinsn->literal_frag; ++ if (tinsn->opcode == xtensa_l32r_opcode) ++ { ++ frag_now->tc_frag_data.literal_frags[slot] = ++ tinsn->tok[1].X_add_symbol->sy_frag; ++ } + if (tinsn->literal_space != 0) + xg_assemble_literal_space (tinsn->literal_space, slot); + frag_now->tc_frag_data.free_reg[slot] = tinsn->extra_arg; +@@ -7170,6 +7269,8 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn) + frag_now->fr_symbol, frag_now->fr_offset, NULL); + xtensa_set_frag_assembly_state (frag_now); + xtensa_maybe_create_trampoline_frag (); ++ /* Always create one here. */ ++ xtensa_maybe_create_literal_pool_frag (TRUE, FALSE); + } + else if (is_branch && do_align_targets ()) + { +@@ -7314,11 +7415,18 @@ xtensa_check_frag_count (void) + clear_frag_count (); + unreachable_count = 0; + } ++ ++ /* We create an area for a possible literal pool every N (default 5000) ++ frags or so. */ ++ xtensa_maybe_create_literal_pool_frag (TRUE, TRUE); + } + + static xtensa_insnbuf trampoline_buf = NULL; + static xtensa_insnbuf trampoline_slotbuf = NULL; + ++static xtensa_insnbuf litpool_buf = NULL; ++static xtensa_insnbuf litpool_slotbuf = NULL; ++ + #define TRAMPOLINE_FRAG_SIZE 3000 + + static void +@@ -7410,6 +7518,135 @@ dump_trampolines (void) + } + } + ++static void dump_litpools (void) __attribute__ ((unused)); ++ ++static void ++dump_litpools (void) ++{ ++ struct litpool_seg *lps = litpool_seg_list.next; ++ struct litpool_frag *lpf; ++ ++ for ( ; lps ; lps = lps->next ) ++ { ++ printf("litpool seg %s\n", lps->seg->name); ++ for ( lpf = lps->frag_list.next; lpf->fragP; lpf = lpf->next ) ++ { ++ fragS *litfrag = lpf->fragP->fr_next; ++ int count = 0; ++ while (litfrag && litfrag->fr_subtype != RELAX_LITERAL_POOL_END) ++ { ++ if (litfrag->fr_fix == 4) ++ count++; ++ litfrag = litfrag->fr_next; ++ } ++ printf(" %ld <%d:%d> (%d) [%d]: ", ++ lpf->addr, lpf->priority, lpf->original_priority, ++ lpf->fragP->fr_line, count); ++ //dump_frag(lpf->fragP); ++ } ++ } ++} ++ ++static void ++xtensa_maybe_create_literal_pool_frag (bfd_boolean create, ++ bfd_boolean only_if_needed) ++{ ++ struct litpool_seg *lps = litpool_seg_list.next; ++ fragS *fragP; ++ struct litpool_frag *lpf; ++ bfd_boolean needed = FALSE; ++ ++ if (use_literal_section || !auto_litpools) ++ return; ++ ++ for ( ; lps ; lps = lps->next ) ++ { ++ if (lps->seg == now_seg) ++ break; ++ } ++ ++ if (lps == NULL) ++ { ++ lps = (struct litpool_seg *)xcalloc (sizeof (struct litpool_seg), 1); ++ lps->next = litpool_seg_list.next; ++ litpool_seg_list.next = lps; ++ lps->seg = now_seg; ++ lps->frag_list.next = &lps->frag_list; ++ lps->frag_list.prev = &lps->frag_list; ++ } ++ ++ lps->frag_count++; ++ ++ if (create) ++ { ++ if (only_if_needed) ++ { ++ if (past_xtensa_end || !use_transform() || ++ frag_now->tc_frag_data.is_no_transform) ++ { ++ return; ++ } ++ if (auto_litpool_limit <= 0) ++ { ++ /* Don't create a litpool based only on frag count. */ ++ return; ++ } ++ else if (lps->frag_count > auto_litpool_limit) ++ { ++ needed = TRUE; ++ } ++ else ++ { ++ return; ++ } ++ } ++ else ++ { ++ needed = TRUE; ++ } ++ } ++ ++ if (needed) ++ { ++ int size = (only_if_needed) ? 3 : 0; /* Space for a "j" insn. */ ++ /* Create a potential site for a literal pool. */ ++ frag_wane (frag_now); ++ frag_new (0); ++ xtensa_set_frag_assembly_state (frag_now); ++ fragP = frag_now; ++ fragP->tc_frag_data.lit_frchain = frchain_now; ++ fragP->tc_frag_data.literal_frag = fragP; ++ frag_var (rs_machine_dependent, size, size, ++ (only_if_needed) ? ++ RELAX_LITERAL_POOL_CANDIDATE_BEGIN : ++ RELAX_LITERAL_POOL_BEGIN, ++ NULL, 0, NULL); ++ frag_now->tc_frag_data.lit_seg = now_seg; ++ frag_variant (rs_machine_dependent, 0, 0, ++ RELAX_LITERAL_POOL_END, NULL, 0, NULL); ++ xtensa_set_frag_assembly_state (frag_now); ++ } ++ else ++ { ++ /* RELAX_LITERAL_POOL_BEGIN frag is being created; ++ just record it here. */ ++ fragP = frag_now; ++ } ++ ++ lpf = (struct litpool_frag *)xmalloc(sizeof (struct litpool_frag)); ++ /* Insert at tail of circular list. */ ++ lpf->addr = 0; ++ lps->frag_list.prev->next = lpf; ++ lpf->next = &lps->frag_list; ++ lpf->prev = lps->frag_list.prev; ++ lps->frag_list.prev = lpf; ++ lpf->fragP = fragP; ++ lpf->priority = (needed) ? (only_if_needed) ? 3 : 2 : 1; ++ lpf->original_priority = lpf->priority; ++ ++ lps->frag_count = 0; ++} ++ + static void + xtensa_cleanup_align_frags (void) + { +@@ -9029,7 +9266,41 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) + break; + + case RELAX_LITERAL_POOL_BEGIN: ++ if (fragP->fr_var != 0) ++ { ++ /* We have a converted "candidate" literal pool; ++ assemble a jump around it. */ ++ TInsn insn; ++ if (!litpool_slotbuf) ++ { ++ litpool_buf = xtensa_insnbuf_alloc (isa); ++ litpool_slotbuf = xtensa_insnbuf_alloc (isa); ++ } ++ new_stretch += 3; ++ fragP->tc_frag_data.relax_seen = FALSE; /* Need another pass. */ ++ fragP->tc_frag_data.is_insn = TRUE; ++ tinsn_init (&insn); ++ insn.insn_type = ITYPE_INSN; ++ insn.opcode = xtensa_j_opcode; ++ insn.ntok = 1; ++ set_expr_symbol_offset (&insn.tok[0], fragP->fr_symbol, ++ fragP->fr_fix); ++ fmt = xg_get_single_format (xtensa_j_opcode); ++ tinsn_to_slotbuf (fmt, 0, &insn, litpool_slotbuf); ++ xtensa_format_set_slot (isa, fmt, 0, litpool_buf, litpool_slotbuf); ++ xtensa_insnbuf_to_chars (isa, litpool_buf, ++ (unsigned char *)fragP->fr_literal + ++ fragP->fr_fix, 3); ++ fragP->fr_fix += 3; ++ fragP->fr_var -= 3; ++ /* Add a fix-up. */ ++ fix_new (fragP, 0, 3, fragP->fr_symbol, 0, TRUE, ++ BFD_RELOC_XTENSA_SLOT0_OP); ++ } ++ break; ++ + case RELAX_LITERAL_POOL_END: ++ case RELAX_LITERAL_POOL_CANDIDATE_BEGIN: + case RELAX_MAYBE_UNREACHABLE: + case RELAX_MAYBE_DESIRE_ALIGN: + /* No relaxation required. */ +@@ -10789,12 +11060,115 @@ xtensa_move_literals (void) + segT dest_seg; + fixS *fix, *next_fix, **fix_splice; + sym_list *lit; ++ struct litpool_seg *lps; + + mark_literal_frags (literal_head->next); + + if (use_literal_section) + return; + ++ /* Assign addresses (rough estimates) to the potential literal pool locations ++ and create new ones if the gaps are too large. */ ++ ++ for (lps = litpool_seg_list.next; lps; lps = lps->next) ++ { ++ frchainS *frchP = seg_info (lps->seg)->frchainP; ++ struct litpool_frag *lpf = lps->frag_list.next; ++ addressT addr = 0; ++ ++ for ( ; frchP; frchP = frchP->frch_next) ++ { ++ fragS *fragP; ++ for (fragP = frchP->frch_root; fragP; fragP = fragP->fr_next) ++ { ++ if (lpf && fragP == lpf->fragP) ++ { ++ gas_assert(fragP->fr_type == rs_machine_dependent && ++ (fragP->fr_subtype == RELAX_LITERAL_POOL_BEGIN || ++ fragP->fr_subtype == RELAX_LITERAL_POOL_CANDIDATE_BEGIN)); ++ /* Found a litpool location. */ ++ lpf->addr = addr; ++ lpf = lpf->next; ++ } ++ if (fragP->fr_type == rs_machine_dependent && ++ fragP->fr_subtype == RELAX_SLOTS) ++ { ++ int slot; ++ for (slot = 0; slot < MAX_SLOTS; slot++) ++ { ++ if (fragP->tc_frag_data.literal_frags[slot]) ++ { ++ /* L32R; point its literal to the nearest litpool ++ preferring non-"candidate" positions to avoid ++ the jump-around. */ ++ fragS *litfrag = fragP->tc_frag_data.literal_frags[slot]; ++ struct litpool_frag *lp = lpf->prev; ++ if (!lp->fragP) ++ { ++ break; ++ } ++ while (lp->fragP->fr_subtype == ++ RELAX_LITERAL_POOL_CANDIDATE_BEGIN) ++ { ++ lp = lp->prev; ++ if (lp->fragP == NULL) ++ { ++ /* End of list; have to bite the bullet. ++ Take the nearest. */ ++ lp = lpf->prev; ++ break; ++ } ++ /* Does it (conservatively) reach? */ ++ if (addr - lp->addr <= 128 * 1024) ++ { ++ if (lp->fragP->fr_subtype == RELAX_LITERAL_POOL_BEGIN) ++ { ++ /* Found a good one. */ ++ break; ++ } ++ else if (lp->prev->fragP && ++ addr - lp->prev->addr > 128 * 1024) ++ { ++ /* This is still a "candidate" but the next one ++ will be too far away, so revert to the nearest ++ one, convert it and add the jump around. */ ++ fragS *poolbeg; ++ fragS *poolend; ++ symbolS *lsym; ++ char label[10 + 2 * sizeof (fragS *)]; ++ lp = lpf->prev; ++ poolbeg = lp->fragP; ++ lp->priority = 1; ++ poolbeg->fr_subtype = RELAX_LITERAL_POOL_BEGIN; ++ poolend = poolbeg->fr_next; ++ gas_assert (poolend->fr_type == rs_machine_dependent && ++ poolend->fr_subtype == RELAX_LITERAL_POOL_END); ++ /* Create a local symbol pointing to the ++ end of the pool. */ ++ sprintf (label, ".L0_LT_%p", poolbeg); ++ lsym = (symbolS *)local_symbol_make (label, lps->seg, ++ 0, poolend); ++ poolbeg->fr_symbol = lsym; ++ /* Rest is done in xtensa_relax_frag. */ ++ } ++ } ++ } ++ if (! litfrag->tc_frag_data.literal_frag) ++ { ++ /* Take earliest use of this literal to avoid ++ forward refs. */ ++ litfrag->tc_frag_data.literal_frag = lp->fragP; ++ } ++ } ++ } ++ } ++ addr += fragP->fr_fix; ++ if (fragP->fr_type == rs_fill) ++ addr += fragP->fr_offset; ++ } ++ } ++ } ++ + for (segment = literal_head->next; segment; segment = segment->next) + { + /* Keep the literals for .init and .fini in separate sections. */ +@@ -10839,9 +11213,6 @@ xtensa_move_literals (void) + while (search_frag != frag_now) + { + next_frag = search_frag->fr_next; +- +- /* First, move the frag out of the literal section and +- to the appropriate place. */ + if (search_frag->tc_frag_data.literal_frag) + { + literal_pool = search_frag->tc_frag_data.literal_frag; +@@ -10849,8 +11220,56 @@ xtensa_move_literals (void) + frchain_to = literal_pool->tc_frag_data.lit_frchain; + gas_assert (frchain_to); + } ++ ++ if (search_frag->fr_type == rs_fill && search_frag->fr_fix == 0) ++ { ++ /* Skip empty fill frags. */ ++ *frag_splice = next_frag; ++ search_frag = next_frag; ++ continue; ++ } ++ ++ if (search_frag->fr_type == rs_align) ++ { ++ /* Skip alignment frags, because the pool as a whole will be ++ aligned if used, and we don't want to force alignment if the ++ pool is unused. */ ++ *frag_splice = next_frag; ++ search_frag = next_frag; ++ continue; ++ } ++ ++ /* First, move the frag out of the literal section and ++ to the appropriate place. */ ++ ++ /* Insert an aligmnent frag at start of pool. */ ++ if (literal_pool->fr_next->fr_type == rs_machine_dependent && ++ literal_pool->fr_next->fr_subtype == RELAX_LITERAL_POOL_END) ++ { ++ segT pool_seg = literal_pool->fr_next->tc_frag_data.lit_seg; ++ emit_state prev_state; ++ fragS *prev_frag; ++ fragS *align_frag; ++ xtensa_switch_section_emit_state (&prev_state, pool_seg, 0); ++ prev_frag = frag_now; ++ frag_variant (rs_fill, 0, 0, 0, NULL, 0, NULL); ++ align_frag = frag_now; ++ frag_align (2, 0, 0); ++ /* Splice it into the right place. */ ++ prev_frag->fr_next = align_frag->fr_next; ++ align_frag->fr_next = literal_pool->fr_next; ++ literal_pool->fr_next = align_frag; ++ /* Insert after this one. */ ++ literal_pool->tc_frag_data.literal_frag = align_frag; ++ xtensa_restore_emit_state (&prev_state); ++ } + insert_after = literal_pool->tc_frag_data.literal_frag; + dest_seg = insert_after->fr_next->tc_frag_data.lit_seg; ++ /* Skip align frag. */ ++ if (insert_after->fr_next->fr_type == rs_align) ++ { ++ insert_after = insert_after->fr_next; ++ } + + *frag_splice = next_frag; + search_frag->fr_next = insert_after->fr_next; +@@ -11014,7 +11433,10 @@ xtensa_switch_to_non_abs_literal_fragment (emit_state *result) + && !recursive + && !is_init && ! is_fini) + { +- as_bad (_("literal pool location required for text-section-literals; specify with .literal_position")); ++ if (!auto_litpools) ++ { ++ as_bad (_("literal pool location required for text-section-literals; specify with .literal_position")); ++ } + + /* When we mark a literal pool location, we want to put a frag in + the literal pool that points to it. But to do that, we want to +diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h +index b2e43fa..290d902 100644 +--- a/gas/config/tc-xtensa.h ++++ b/gas/config/tc-xtensa.h +@@ -124,6 +124,7 @@ enum xtensa_relax_statesE + + RELAX_LITERAL_POOL_BEGIN, + RELAX_LITERAL_POOL_END, ++ RELAX_LITERAL_POOL_CANDIDATE_BEGIN, + /* Technically these are not relaxations at all but mark a location + to store literals later. Note that fr_var stores the frchain for + BEGIN frags and fr_var stores now_seg for END frags. */ +diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp +index d197ec8..db39629 100644 +--- a/gas/testsuite/gas/xtensa/all.exp ++++ b/gas/testsuite/gas/xtensa/all.exp +@@ -100,5 +100,6 @@ if [istarget xtensa*-*-*] then { + run_dump_test "jlong" + run_dump_test "trampoline" ++ run_dump_test "auto-litpools" + } + + if [info exists errorInfo] then { +diff --git a/gas/testsuite/gas/xtensa/auto-litpools.d b/gas/testsuite/gas/xtensa/auto-litpools.d +new file mode 100644 +index 0000000..4d1a690 +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/auto-litpools.d +@@ -0,0 +1,12 @@ ++#as: --auto-litpools ++#objdump: -d ++#name: auto literal pool placement ++ ++.*: +file format .*xtensa.* ++#... ++.*4:.*l32r.a2, 0 .* ++#... ++.*3e437:.*j.3e440 .* ++#... ++.*40750:.*l32r.a2, 3e43c .* ++#... +diff --git a/gas/testsuite/gas/xtensa/auto-litpools.s b/gas/testsuite/gas/xtensa/auto-litpools.s +new file mode 100644 +index 0000000..9a5b26b +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/auto-litpools.s +@@ -0,0 +1,13 @@ ++ .text ++ .align 4 ++ .literal .L0, 0x12345 ++ .literal .L1, 0x12345 ++ ++f: ++ l32r a2, .L0 ++ .rep 44000 ++ _nop ++ _nop ++ .endr ++ l32r a2, .L1 ++ ret +-- +1.8.1.4 + diff --git a/package/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch b/package/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch new file mode 100644 index 0000000000..bd751661b8 --- /dev/null +++ b/package/binutils/2.24/914-xtensa-fix-signedness-of-gas-relocations.patch @@ -0,0 +1,99 @@ +From 6c7c5c477ef9ccf2d2548cf2ac3cec9bd3c9c5b6 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 2 Feb 2016 17:11:38 +0300 +Subject: [PATCH] xtensa: fix signedness of gas relocations + +Change 1058c7532d0b "Use signed data type for R_XTENSA_DIFF* relocation +offsets." changed signedness of BFD_RELOC_XTENSA_DIFF* relocations +substituted for BFD_RELOC_*. This made it impossible to encode arbitrary +8-, 16- and 32-bit values, which broke e.g. debug info encoding by .loc +directive. Revert this part and add test. + +gas/ +2016-02-03 Max Filippov + * config/tc-xtensa.c (md_apply_fix): Mark BFD_RELOC_XTENSA_DIFF* + substitutions for BFD_RELOC_* as unsigned. + +gas/testsuite/ +2016-02-03 Max Filippov + * gas/xtensa/all.exp: Add loc to list of xtensa tests. + * gas/xtensa/loc.d: New file: loc test result patterns. + * gas/xtensa/loc.s: New file: loc test. + +Signed-off-by: Max Filippov +--- + gas/config/tc-xtensa.c | 6 +++--- + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/loc.d | 10 ++++++++++ + gas/testsuite/gas/xtensa/loc.s | 7 +++++++ + 4 files changed, 21 insertions(+), 3 deletions(-) + create mode 100644 gas/testsuite/gas/xtensa/loc.d + create mode 100644 gas/testsuite/gas/xtensa/loc.s + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index a119871..36a06cc 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) + { + case BFD_RELOC_8: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + case BFD_RELOC_16: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + case BFD_RELOC_32: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + default: + break; +diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp +index 31b725b..7ff7bd7 100644 +--- a/gas/testsuite/gas/xtensa/all.exp ++++ b/gas/testsuite/gas/xtensa/all.exp +@@ -101,6 +101,7 @@ if [istarget xtensa*-*-*] then { + run_dump_test "trampoline" + run_dump_test "first_frag_align" + run_dump_test "auto-litpools" ++ run_dump_test "loc" + } + + if [info exists errorInfo] then { +diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d +new file mode 100644 +index 0000000..71983cc +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/loc.d +@@ -0,0 +1,10 @@ ++#as: ++#objdump: -r ++#name: .loc directive relocs ++ ++.*: +file format .*xtensa.* ++ ++RELOCATION RECORDS FOR \[\.debug_line\]: ++#... ++.*R_XTENSA_DIFF16.*\.text\+0x00009c42 ++#... +diff --git a/gas/testsuite/gas/xtensa/loc.s b/gas/testsuite/gas/xtensa/loc.s +new file mode 100644 +index 0000000..029e14e +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/loc.s +@@ -0,0 +1,7 @@ ++ .text ++ .file 1 "loc.s" ++ .loc 1 3 ++ nop ++ .space 40000 ++ .loc 1 5 ++ nop +-- +2.1.4 + diff --git a/package/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch b/package/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch new file mode 100644 index 0000000000..ead3e42b75 --- /dev/null +++ b/package/binutils/2.24/915-xtensa-fix-.init-.fini-literals-moving.patch @@ -0,0 +1,149 @@ +From 7db2accc3fdea0aaa0c3a76a413d8e8030e022c3 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 16 Feb 2016 02:23:28 +0300 +Subject: [PATCH] xtensa: fix .init/.fini literals moving + +Despite the documentation and the comment in xtensa_move_literals, in +the presence of --text-section-literals and --auto-litpools literals are +moved from the separate literal sections into .init and .fini, because +the check in the xtensa_move_literals is incorrect. + +This moving was broken with introduction of auto litpools: some literals +now may be lost. This happens because literal frags emitted from .init +and .fini are not closed when new .literal_position marks new literal +pool. Then frag_align(2, 0, 0) changes type of the last literal frag to +rs_align. rs_align frags are skipped in the xtensa_move_literals. As a +result fixups against such literals are not moved out of .init.literal/ +.fini.literal sections producing the following assembler error: + + test.S: Warning: fixes not all moved from .init.literal + test.S: Internal error! + +Fix check for .init.literal/.fini.literal in the xtensa_move_literals +and don't let it move literals from there in the presence of +--text-section-literals or --auto-litpools. + +2016-02-17 Max Filippov +gas/ + * config/tc-xtensa.c (xtensa_move_literals): Fix check for + .init.literal/.fini.literal section name. + * testsuite/gas/xtensa/all.exp: Add init-fini-literals to the + list of xtensa tests. + * testsuite/gas/xtensa/init-fini-literals.d: New file: + init-fini-literals test result patterns. + * testsuite/gas/xtensa/init-fini-literals.s: New file: + init-fini-literals test. + +Signed-off-by: Max Filippov +--- +Backported from: 4111950f363221c4641dc2f33bea61cc94f34906 + + gas/config/tc-xtensa.c | 12 ++++++++++-- + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/init-fini-literals.d | 24 ++++++++++++++++++++++++ + gas/testsuite/gas/xtensa/init-fini-literals.s | 19 +++++++++++++++++++ + 4 files changed, 54 insertions(+), 2 deletions(-) + create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.d + create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.s + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 36a06cc..5773634 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -11061,6 +11061,10 @@ xtensa_move_literals (void) + fixS *fix, *next_fix, **fix_splice; + sym_list *lit; + struct litpool_seg *lps; ++ const char *init_name = INIT_SECTION_NAME; ++ const char *fini_name = FINI_SECTION_NAME; ++ int init_name_len = strlen(init_name); ++ int fini_name_len = strlen(fini_name); + + mark_literal_frags (literal_head->next); + +@@ -11171,9 +11175,13 @@ xtensa_move_literals (void) + + for (segment = literal_head->next; segment; segment = segment->next) + { ++ const char *seg_name = segment_name (segment->seg); ++ + /* Keep the literals for .init and .fini in separate sections. */ +- if (!strcmp (segment_name (segment->seg), INIT_SECTION_NAME) +- || !strcmp (segment_name (segment->seg), FINI_SECTION_NAME)) ++ if ((!memcmp (seg_name, init_name, init_name_len) && ++ !strcmp (seg_name + init_name_len, ".literal")) || ++ (!memcmp (seg_name, fini_name, fini_name_len) && ++ !strcmp (seg_name + fini_name_len, ".literal"))) + continue; + + frchain_from = seg_info (segment->seg)->frchainP; +diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp +index 7ff7bd7..6b67320 100644 +--- a/gas/testsuite/gas/xtensa/all.exp ++++ b/gas/testsuite/gas/xtensa/all.exp +@@ -102,6 +102,7 @@ if [istarget xtensa*-*-*] then { + run_dump_test "first_frag_align" + run_dump_test "auto-litpools" + run_dump_test "loc" ++ run_dump_test "init-fini-literals" + } + + if [info exists errorInfo] then { +diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.d b/gas/testsuite/gas/xtensa/init-fini-literals.d +new file mode 100644 +index 0000000..19ed121 +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/init-fini-literals.d +@@ -0,0 +1,24 @@ ++#as: --text-section-literals ++#objdump: -r ++#name: check that literals for .init and .fini always go to separate sections ++ ++.*: +file format .*xtensa.* ++#... ++RELOCATION RECORDS FOR \[\.init\.literal\]: ++#... ++00000000 R_XTENSA_PLT init ++#... ++RELOCATION RECORDS FOR \[\.fini\.literal\]: ++#... ++00000000 R_XTENSA_PLT fini ++#... ++RELOCATION RECORDS FOR \[\.init\]: ++#... ++.* R_XTENSA_SLOT0_OP \.init\.literal ++.* R_XTENSA_SLOT0_OP \.init\.literal\+0x00000004 ++#... ++RELOCATION RECORDS FOR \[\.fini\]: ++#... ++.* R_XTENSA_SLOT0_OP \.fini\.literal ++.* R_XTENSA_SLOT0_OP \.fini\.literal\+0x00000004 ++#... +diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.s b/gas/testsuite/gas/xtensa/init-fini-literals.s +new file mode 100644 +index 0000000..7c9ec17 +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/init-fini-literals.s +@@ -0,0 +1,19 @@ ++ .section .init,"ax",@progbits ++ .literal_position ++ .literal .LC0, init@PLT ++ .literal_position ++ .literal .LC1, 1 ++ .align 4 ++ ++ l32r a2, .LC0 ++ l32r a2, .LC1 ++ ++ .section .fini,"ax",@progbits ++ .literal_position ++ .literal .LC2, fini@PLT ++ .literal_position ++ .literal .LC3, 1 ++ .align 4 ++ ++ l32r a2, .LC2 ++ l32r a2, .LC3 +-- +2.1.4 + diff --git a/package/binutils/2.25.1/120-sh-conf.patch b/package/binutils/2.25.1/120-sh-conf.patch new file mode 100644 index 0000000000..ea3d1b6068 --- /dev/null +++ b/package/binutils/2.25.1/120-sh-conf.patch @@ -0,0 +1,29 @@ +r10231 | lethal | 2005-05-02 09:58:00 -0400 (Mon, 02 May 2005) | 13 lines + +Likewise, binutils has no idea about any of these new targets either, so we +fix that up too.. now we're able to actually build a real toolchain for +sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more +inept targets than that one, really. Go look, I promise). + +--- a/configure ++++ b/configure +@@ -1495,7 +1495,7 @@ + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +--- a/configure.ac ++++ b/configure.ac +@@ -712,7 +712,7 @@ + mips*-*-*) + noconfigdirs="$noconfigdirs gprof" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; diff --git a/package/binutils/2.25.1/300-001_ld_makefile_patch.patch b/package/binutils/2.25.1/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..5cb0f614d8 --- /dev/null +++ b/package/binutils/2.25.1/300-001_ld_makefile_patch.patch @@ -0,0 +1,24 @@ +diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.am binutils-2.17.50.0.17/ld/Makefile.am +--- binutils-2.17.50.0.17.oorig/ld/Makefile.am 2007-06-18 19:29:29.000000000 +0200 ++++ binutils-2.17.50.0.17/ld/Makefile.am 2007-06-25 10:00:36.000000000 +0200 +@@ -18,7 +18,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff -u binutils-2.17.50.0.17.oorig/ld/Makefile.in binutils-2.17.50.0.17/ld/Makefile.in +--- binutils-2.17.50.0.17.oorig/ld/Makefile.in 2007-06-18 19:29:29.000000000 +0200 ++++ binutils-2.17.50.0.17/ld/Makefile.in 2007-06-25 10:00:36.000000000 +0200 +@@ -287,7 +287,7 @@ + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include diff --git a/package/binutils/2.25.1/300-012_check_ldrunpath_length.patch b/package/binutils/2.25.1/300-012_check_ldrunpath_length.patch new file mode 100644 index 0000000000..df783109bb --- /dev/null +++ b/package/binutils/2.25.1/300-012_check_ldrunpath_length.patch @@ -0,0 +1,21 @@ +diff -Nura binutils-2.21.orig/ld/emultempl/elf32.em binutils-2.21/ld/emultempl/elf32.em +--- binutils-2.21.orig/ld/emultempl/elf32.em 2010-10-29 09:10:36.000000000 -0300 ++++ binutils-2.21/ld/emultempl/elf32.em 2010-12-10 09:26:56.746102724 -0300 +@@ -1270,6 +1270,8 @@ + && command_line.rpath == NULL) + { + lib_path = (const char *) getenv ("LD_RUN_PATH"); ++ if ((lib_path) && (strlen (lib_path) == 0)) ++ lib_path = NULL; + if (gld${EMULATION_NAME}_search_needed (lib_path, &n, + force)) + break; +@@ -1497,6 +1499,8 @@ + rpath = command_line.rpath; + if (rpath == NULL) + rpath = (const char *) getenv ("LD_RUN_PATH"); ++ if ((rpath) && (strlen (rpath) == 0)) ++ rpath = NULL; + + for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/package/binutils/2.25.1/500-sysroot.patch b/package/binutils/2.25.1/500-sysroot.patch new file mode 100644 index 0000000000..e49c795332 --- /dev/null +++ b/package/binutils/2.25.1/500-sysroot.patch @@ -0,0 +1,37 @@ +Signed-off-by: Sven Rebhan + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -308,18 +308,25 @@ + directory first. */ + if (! entry->flags.maybe_archive) + { +- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename); ++ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename) ++ && ld_sysroot) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->flags.sysrooted = TRUE; + return TRUE; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + return TRUE; + + if (IS_ABSOLUTE_PATH (entry->filename)) diff --git a/package/binutils/2.25.1/600-poison-system-directories.patch b/package/binutils/2.25.1/600-poison-system-directories.patch new file mode 100644 index 0000000000..ec3622bcea --- /dev/null +++ b/package/binutils/2.25.1/600-poison-system-directories.patch @@ -0,0 +1,276 @@ +Patch adapted to binutils 2.23.2 and extended to use +BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni. + +[Gustavo: adapt to binutils 2.25] +Signed-off-by: Thomas Petazzoni +Signed-off-by: Gustavo Zacarias + +Upstream-Status: Inappropriate [distribution: codesourcery] + +Patch originally created by Mark Hatle, forward-ported to +binutils 2.21 by Scott Garman. + +purpose: warn for uses of system directories when cross linking + +Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 + +2008-07-02 Joseph Myers + + ld/ + * ld.h (args_type): Add error_poison_system_directories. + * ld.texinfo (--error-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.error_poison_system_directories. + * ldmain.c (main): Initialize + command_line.error_poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --error-poison-system-directories. + (parse_args): Handle new option. + +2007-06-13 Joseph Myers + + ld/ + * config.in: Regenerate. + * ld.h (args_type): Add poison_system_directories. + * ld.texinfo (--no-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.poison_system_directories. + * ldmain.c (main): Initialize + command_line.poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_NO_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --no-poison-system-directories. + (parse_args): Handle new option. + +2007-04-20 Joseph Myers + + Merge from Sourcery G++ binutils 2.17: + + 2007-03-20 Joseph Myers + Based on patch by Mark Hatle . + ld/ + * configure.ac (--enable-poison-system-directories): New option. + * configure, config.in: Regenerate. + * ldfile.c (ldfile_add_library_path): If + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, + /usr/lib, /usr/local/lib or /usr/X11R6/lib. + +Signed-off-by: Mark Hatle +Signed-off-by: Scott Garman + +diff -Nura a/ld/config.in b/ld/config.in +--- a/ld/config.in 2014-10-14 04:32:04.000000000 -0300 ++++ b/ld/config.in 2014-12-24 08:07:28.997918918 -0300 +@@ -11,6 +11,9 @@ + language is requested. */ + #undef ENABLE_NLS + ++/* Define to warn for use of native system library directories */ ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++ + /* Additional extension a shared object might have. */ + #undef EXTRA_SHLIB_EXTENSION + +diff -Nura a/ld/configure b/ld/configure +--- a/ld/configure 2014-12-23 11:22:07.000000000 -0300 ++++ b/ld/configure 2014-12-24 08:07:29.002919088 -0300 +@@ -783,6 +783,7 @@ + enable_targets + enable_64_bit_bfd + with_sysroot ++enable_poison_system_directories + enable_gold + enable_got + enable_werror +@@ -1439,6 +1440,8 @@ + --disable-largefile omit support for large files + --enable-targets alternative target configurations + --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) ++ --enable-poison-system-directories ++ warn for use of native system library directories + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-got= GOT handling scheme (target, single, negative, + multigot) +@@ -15487,7 +15490,18 @@ + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then + ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi + + # Check whether --enable-got was given. + if test "${enable_got+set}" = set; then : +diff -Nura a/ld/configure.ac b/ld/configure.ac +--- a/ld/configure.ac 2014-10-14 04:32:04.000000000 -0300 ++++ b/ld/configure.ac 2014-12-24 08:07:29.002919088 -0300 +@@ -94,6 +94,16 @@ + AC_SUBST(TARGET_SYSTEM_ROOT) + AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system library directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system library directories]) ++fi ++ + dnl Use --enable-gold to decide if this linker should be the default. + dnl "install_as_default" is set to false if gold is the default linker. + dnl "installed_linker" is the installed BFD linker name. +diff -Nura a/ld/ldfile.c b/ld/ldfile.c +--- a/ld/ldfile.c 2014-10-14 04:32:04.000000000 -0300 ++++ b/ld/ldfile.c 2014-12-24 08:07:29.002919088 -0300 +@@ -114,6 +114,23 @@ + new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL); + else + new_dirs->name = xstrdup (name); ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (command_line.poison_system_directories ++ && ((!strncmp (name, "/lib", 4)) ++ || (!strncmp (name, "/usr/lib", 8)) ++ || (!strncmp (name, "/usr/local/lib", 14)) ++ || (!strncmp (name, "/usr/X11R6/lib", 14)))) ++ { ++ if (command_line.error_poison_system_directories) ++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ else ++ einfo (_("%P: warning: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ } ++#endif ++ + } + + /* Try to open a BFD for a lang_input_statement. */ +diff -Nura a/ld/ld.h b/ld/ld.h +--- a/ld/ld.h 2014-10-14 04:32:04.000000000 -0300 ++++ b/ld/ld.h 2014-12-24 08:07:29.003919122 -0300 +@@ -161,6 +161,14 @@ + /* If TRUE we'll just print the default output on stdout. */ + bfd_boolean print_output_format; + ++ /* If TRUE (the default) warn for uses of system directories when ++ cross linking. */ ++ bfd_boolean poison_system_directories; ++ ++ /* If TRUE (default FALSE) give an error for uses of system ++ directories when cross linking instead of a warning. */ ++ bfd_boolean error_poison_system_directories; ++ + /* Big or little endian as set on command line. */ + enum endian_enum endian; + +diff -Nura a/ld/ldlex.h b/ld/ldlex.h +--- a/ld/ldlex.h 2014-11-04 06:54:41.000000000 -0300 ++++ b/ld/ldlex.h 2014-12-24 08:09:47.477644294 -0300 +@@ -140,6 +140,8 @@ + OPTION_IGNORE_UNRESOLVED_SYMBOL, + OPTION_PUSH_STATE, + OPTION_POP_STATE, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, + }; + + /* The initial parser states. */ +diff -Nura a/ld/ldmain.c b/ld/ldmain.c +--- a/ld/ldmain.c 2014-10-14 04:32:04.000000000 -0300 ++++ b/ld/ldmain.c 2014-12-24 08:07:29.003919122 -0300 +@@ -266,6 +266,8 @@ + command_line.warn_mismatch = TRUE; + command_line.warn_search_mismatch = TRUE; + command_line.check_section_addresses = -1; ++ command_line.poison_system_directories = TRUE; ++ command_line.error_poison_system_directories = FALSE; + + /* We initialize DEMANGLING based on the environment variable + COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the +diff -Nura a/ld/ld.texinfo b/ld/ld.texinfo +--- a/ld/ld.texinfo 2014-12-23 05:47:10.000000000 -0300 ++++ b/ld/ld.texinfo 2014-12-24 08:07:29.005919191 -0300 +@@ -2212,6 +2212,18 @@ + + Passing @code{none} for @var{style} disables the setting from any + @code{--build-id} options earlier on the command line. ++ ++@kindex --no-poison-system-directories ++@item --no-poison-system-directories ++Do not warn for @option{-L} options using system directories such as ++@file{/usr/lib} when cross linking. This option is intended for use ++in chroot environments when such directories contain the correct ++libraries for the target system rather than the host. ++ ++@kindex --error-poison-system-directories ++@item --error-poison-system-directories ++Give an error instead of a warning for @option{-L} options using ++system directories when cross linking. + @end table + + @c man end +diff -Nura a/ld/lexsup.c b/ld/lexsup.c +--- a/ld/lexsup.c 2014-11-04 06:54:41.000000000 -0300 ++++ b/ld/lexsup.c 2014-12-24 08:48:50.136583414 -0300 +@@ -513,6 +513,14 @@ + { {"pop-state", no_argument, NULL, OPTION_POP_STATE}, + '\0', NULL, N_("Pop state of flags governing input file handling"), + TWO_DASHES }, ++ { {"no-poison-system-directories", no_argument, NULL, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Do not warn for -L options using system directories"), ++ TWO_DASHES }, ++ { {"error-poison-system-directories", no_argument, NULL, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Give an error for -L options using system directories"), ++ TWO_DASHES }, + }; + + #define OPTION_COUNT ARRAY_SIZE (ld_options) +@@ -525,6 +533,7 @@ + int ingroup = 0; + char *default_dirlist = NULL; + char *shortopts; ++ char *BR_paranoid_env; + struct option *longopts; + struct option *really_longopts; + int last_optind; +@@ -1458,6 +1467,14 @@ + } + break; + ++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: ++ command_line.poison_system_directories = FALSE; ++ break; ++ ++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: ++ command_line.error_poison_system_directories = TRUE; ++ break; ++ + case OPTION_PUSH_STATE: + input_flags.pushed = xmemdup (&input_flags, + sizeof (input_flags), +@@ -1483,6 +1500,10 @@ + command_line.soname = NULL; + } + ++ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0) ++ command_line.error_poison_system_directories = TRUE; ++ + while (ingroup) + { + lang_leave_group (); diff --git a/package/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch b/package/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch new file mode 100644 index 0000000000..8aeb06428a --- /dev/null +++ b/package/binutils/2.25.1/905-Fix-trampolines-search-code-for-conditional-branches.patch @@ -0,0 +1,90 @@ +From 415480d6471e67aef97c0241d451ef2423a1da9d Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 25 Nov 2014 21:33:21 +0300 +Subject: [PATCH] Fix trampolines search code for conditional branches + +For conditional branches that need more than one trampoline to reach its +target assembler couldn't always find suitable trampoline because +post-loop condition check was placed inside the loop, resulting in +premature loop termination. Move check outside the loop. + +This fixes the following build errors seen when assembling huge files +produced by gcc: + Error: jump target out of range; no usable trampoline found + Error: operand 1 of 'j' has out of range value '307307' + +2014-11-25 Max Filippov + +gas/ + * config/tc-xtensa.c (search_trampolines): Move post-loop + condition check outside the search loop. + +gas/testsuite/ + * gas/xtensa/trampoline.d: Add expected output for branches. + * gas/xtensa/trampoline.s: Add test case for branches. + +Signed-off-by: Max Filippov +--- +Backported from: d92b6eece424f0ad35d96fdd85bf207295e8c4c3 +Changes to ChangeLogs are dropped. + + gas/config/tc-xtensa.c | 8 ++++---- + gas/testsuite/gas/xtensa/trampoline.d | 9 +++++++++ + gas/testsuite/gas/xtensa/trampoline.s | 7 +++++++ + 3 files changed, 20 insertions(+), 4 deletions(-) + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index d11b0c7..f23ccf8 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -9514,11 +9514,11 @@ search_trampolines (TInsn *tinsn, fragS *fragP, bfd_boolean unreachable_only) + if (next_addr == 0 || addr - next_addr > J_RANGE) + break; + } +- if (abs (addr - this_addr) < J_RANGE) +- return tf; +- +- return NULL; + } ++ if (abs (addr - this_addr) < J_RANGE) ++ return tf; ++ ++ return NULL; + } + for ( ; tf; tf = tf->next) + { +diff --git a/gas/testsuite/gas/xtensa/trampoline.d b/gas/testsuite/gas/xtensa/trampoline.d +index b4f65dc..5ae32a6 100644 +--- a/gas/testsuite/gas/xtensa/trampoline.d ++++ b/gas/testsuite/gas/xtensa/trampoline.d +@@ -24,3 +24,12 @@ + .*33462:.*j.0x49407 + #... + .*49407:.*j.0x49407 ++.*4940a:.*beqz.n.a2,.0x4940f ++.*4940c:.*j.0x693d1 ++#... ++.*693d1:.*j.0x7ddd4 ++#... ++.*7ddd4:.*j.0x927f5 ++#... ++.*927f5:.*j.0x927f5 ++#... +diff --git a/gas/testsuite/gas/xtensa/trampoline.s b/gas/testsuite/gas/xtensa/trampoline.s +index 259a3bb..4465786 100644 +--- a/gas/testsuite/gas/xtensa/trampoline.s ++++ b/gas/testsuite/gas/xtensa/trampoline.s +@@ -19,3 +19,10 @@ + .endr + 3: + j 3b ++ bnez a2, 4f ++ .rep 50000 ++ and a2, a2, a3 ++ _ret ++ .endr ++4: ++ j 4b +-- +1.8.1.4 + diff --git a/package/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch b/package/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch new file mode 100644 index 0000000000..8a211004f3 --- /dev/null +++ b/package/binutils/2.25.1/906-xtensa-optimize-check_section_ebb_pcrels_fit.patch @@ -0,0 +1,502 @@ +From 20c79baf82273a0b368587f761f152c4d3a593a4 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 27 Mar 2015 07:13:55 +0300 +Subject: [PATCH 1/4] xtensa: optimize check_section_ebb_pcrels_fit + +The original check_section_ebb_pcrels_fit algorithm checks that text +actions proposed for current EBB are OK for every relocation in a +section. There's no need to check every relocation, because text actions +for EBB can only change size of that EBB, thus only affecting +relocations that in any way cross that EBB. In addition EBBs are +iterated in ascending order of their VMA, making it easier to track +relevant relocations. + +Introduce a structure that can track relocations that cross the range of +VMAs of EBB and use it to only check relocations relevant to current EBB +in check_section_ebb_pcrels_fit. +It takes O(N log N) operations to build it and O(N) operations to move +current EBB VMA window through its entire range, where N is the number +of relocations in a section. The resulting complexity of +compute_text_actions is thus reduced from O(N^2) to O(N log N + N * M), +where M is the average number of relocations crossing each EBB. + +Original profile: + +% time self children called name +----------------------------------------- + 44.26 71.53 6429/6429 compute_text_actions + 50.2 44.26 71.53 6429 check_section_ebb_pcrels_fit + 1.16 20.12 347506666/347576152 pcrel_reloc_fits + 2.95 16.52 347506666/348104944 get_relocation_opnd + 2.01 9.74 347575100/361252208 r_reloc_init + 0.55 7.53 347575100/363381467 r_reloc_get_section + 5.76 0.02 695013332/695013332 xlate_offset_with_removed_text + 0.68 3.89 347575100/363483827 bfd_octets_per_byte + 0.32 0.00 347506666/349910253 is_alt_relocation + 0.18 0.11 6391/6391 build_xlate_map + 0.00 0.00 6429/19417168 get_xtensa_relax_info + 0.00 0.00 6391/6391 free_xlate_map +----------------------------------------- + +Same data, after optimization: + +% time self children called name +----------------------------------------- + 2.56 3.08 6429/6429 compute_text_actions + 8.2 2.56 3.08 6429 check_section_ebb_pcrels_fit + 0.08 0.91 17721075/17790561 pcrel_reloc_fits + 0.17 0.47 17721075/31685977 r_reloc_init + 0.43 0.00 35442150/35442150 xlate_offset_with_removed_text + 0.02 0.37 17721075/33815236 r_reloc_get_section + 0.22 0.11 6391/6391 build_xlate_map + 0.05 0.22 17721075/33917596 bfd_octets_per_byte + 0.03 0.00 17721075/20405299 is_alt_relocation + 0.01 0.00 6429/6429 reloc_range_list_update_range + 0.00 0.00 6429/19417168 get_xtensa_relax_info + 0.00 0.00 6391/6391 free_xlate_map +----------------------------------------- + +2015-04-01 Max Filippov +bfd/ + * elf32-xtensa.c (reloc_range_list, reloc_range_list_entry, + reloc_range): new typedef. + (reloc_range_list_struct, reloc_range_list_entry_struct, + reloc_range_struct): new structures. + (reloc_range_compare, build_reloc_ranges, + reloc_range_list_append, reloc_range_list_remove, + reloc_range_list_update_range, free_reloc_range_list): new + functions. + (compute_text_actions): precompute relocation opcodes before the + loop. Add relevant_relocs variable, initialize it before the + loop, pass it to the check_section_ebb_pcrels_fit. + (check_section_ebb_pcrels_fit): add new parameter: + relevant_relocs. Update address range in the relevant_relocs if + it's non-NULL and iterate only over relevant relocations. + +Backported from: b2b326d246f839ee218192ac88da2384d929a072 +Signed-off-by: Max Filippov +--- + bfd/elf32-xtensa.c | 321 +++++++++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 298 insertions(+), 23 deletions(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 0b6f584..872370b 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -6619,8 +6619,10 @@ static bfd_boolean compute_text_actions + (bfd *, asection *, struct bfd_link_info *); + static bfd_boolean compute_ebb_proposed_actions (ebb_constraint *); + static bfd_boolean compute_ebb_actions (ebb_constraint *); ++typedef struct reloc_range_list_struct reloc_range_list; + static bfd_boolean check_section_ebb_pcrels_fit +- (bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, const ebb_constraint *, ++ (bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, ++ reloc_range_list *, const ebb_constraint *, + const xtensa_opcode *); + static bfd_boolean check_section_ebb_reduces (const ebb_constraint *); + static void text_action_add_proposed +@@ -7219,6 +7221,221 @@ build_reloc_opcodes (bfd *abfd, + return reloc_opcodes; + } + ++struct reloc_range_struct ++{ ++ bfd_vma addr; ++ bfd_boolean add; /* TRUE if start of a range, FALSE otherwise. */ ++ /* Original irel index in the array of relocations for a section. */ ++ unsigned irel_index; ++}; ++typedef struct reloc_range_struct reloc_range; ++ ++typedef struct reloc_range_list_entry_struct reloc_range_list_entry; ++struct reloc_range_list_entry_struct ++{ ++ reloc_range_list_entry *next; ++ reloc_range_list_entry *prev; ++ Elf_Internal_Rela *irel; ++ xtensa_opcode opcode; ++ int opnum; ++}; ++ ++struct reloc_range_list_struct ++{ ++ /* The rest of the structure is only meaningful when ok is TRUE. */ ++ bfd_boolean ok; ++ ++ unsigned n_range; /* Number of range markers. */ ++ reloc_range *range; /* Sorted range markers. */ ++ ++ unsigned first; /* Index of a first range element in the list. */ ++ unsigned last; /* One past index of a last range element in the list. */ ++ ++ unsigned n_list; /* Number of list elements. */ ++ reloc_range_list_entry *reloc; /* */ ++ reloc_range_list_entry list_root; ++}; ++ ++static int ++reloc_range_compare (const void *a, const void *b) ++{ ++ const reloc_range *ra = a; ++ const reloc_range *rb = b; ++ ++ if (ra->addr != rb->addr) ++ return ra->addr < rb->addr ? -1 : 1; ++ if (ra->add != rb->add) ++ return ra->add ? -1 : 1; ++ return 0; ++} ++ ++static void ++build_reloc_ranges (bfd *abfd, asection *sec, ++ bfd_byte *contents, ++ Elf_Internal_Rela *internal_relocs, ++ xtensa_opcode *reloc_opcodes, ++ reloc_range_list *list) ++{ ++ unsigned i; ++ size_t n = 0; ++ size_t max_n = 0; ++ reloc_range *ranges = NULL; ++ reloc_range_list_entry *reloc = ++ bfd_malloc (sec->reloc_count * sizeof (*reloc)); ++ ++ memset (list, 0, sizeof (*list)); ++ list->ok = TRUE; ++ ++ for (i = 0; i < sec->reloc_count; i++) ++ { ++ Elf_Internal_Rela *irel = &internal_relocs[i]; ++ int r_type = ELF32_R_TYPE (irel->r_info); ++ reloc_howto_type *howto = &elf_howto_table[r_type]; ++ r_reloc r_rel; ++ ++ if (r_type == R_XTENSA_ASM_SIMPLIFY ++ || r_type == R_XTENSA_32_PCREL ++ || !howto->pc_relative) ++ continue; ++ ++ r_reloc_init (&r_rel, abfd, irel, contents, ++ bfd_get_section_limit (abfd, sec)); ++ ++ if (r_reloc_get_section (&r_rel) != sec) ++ continue; ++ ++ if (n + 2 > max_n) ++ { ++ max_n = (max_n + 2) * 2; ++ ranges = bfd_realloc (ranges, max_n * sizeof (*ranges)); ++ } ++ ++ ranges[n].addr = irel->r_offset; ++ ranges[n + 1].addr = r_rel.target_offset; ++ ++ ranges[n].add = ranges[n].addr < ranges[n + 1].addr; ++ ranges[n + 1].add = !ranges[n].add; ++ ++ ranges[n].irel_index = i; ++ ranges[n + 1].irel_index = i; ++ ++ n += 2; ++ ++ reloc[i].irel = irel; ++ ++ /* Every relocation won't possibly be checked in the optimized version of ++ check_section_ebb_pcrels_fit, so this needs to be done here. */ ++ if (is_alt_relocation (ELF32_R_TYPE (irel->r_info))) ++ { ++ /* None of the current alternate relocs are PC-relative, ++ and only PC-relative relocs matter here. */ ++ } ++ else ++ { ++ xtensa_opcode opcode; ++ int opnum; ++ ++ if (reloc_opcodes) ++ opcode = reloc_opcodes[i]; ++ else ++ opcode = get_relocation_opcode (abfd, sec, contents, irel); ++ ++ if (opcode == XTENSA_UNDEFINED) ++ { ++ list->ok = FALSE; ++ break; ++ } ++ ++ opnum = get_relocation_opnd (opcode, ELF32_R_TYPE (irel->r_info)); ++ if (opnum == XTENSA_UNDEFINED) ++ { ++ list->ok = FALSE; ++ break; ++ } ++ ++ /* Record relocation opcode and opnum as we've calculated them ++ anyway and they won't change. */ ++ reloc[i].opcode = opcode; ++ reloc[i].opnum = opnum; ++ } ++ } ++ ++ if (list->ok) ++ { ++ ranges = bfd_realloc (ranges, n * sizeof (*ranges)); ++ qsort (ranges, n, sizeof (*ranges), reloc_range_compare); ++ ++ list->n_range = n; ++ list->range = ranges; ++ list->reloc = reloc; ++ list->list_root.prev = &list->list_root; ++ list->list_root.next = &list->list_root; ++ } ++ else ++ { ++ free (ranges); ++ free (reloc); ++ } ++} ++ ++static void reloc_range_list_append (reloc_range_list *list, ++ unsigned irel_index) ++{ ++ reloc_range_list_entry *entry = list->reloc + irel_index; ++ ++ entry->prev = list->list_root.prev; ++ entry->next = &list->list_root; ++ entry->prev->next = entry; ++ entry->next->prev = entry; ++ ++list->n_list; ++} ++ ++static void reloc_range_list_remove (reloc_range_list *list, ++ unsigned irel_index) ++{ ++ reloc_range_list_entry *entry = list->reloc + irel_index; ++ ++ entry->next->prev = entry->prev; ++ entry->prev->next = entry->next; ++ --list->n_list; ++} ++ ++/* Update relocation list object so that it lists all relocations that cross ++ [first; last] range. Range bounds should not decrease with successive ++ invocations. */ ++static void reloc_range_list_update_range (reloc_range_list *list, ++ bfd_vma first, bfd_vma last) ++{ ++ /* This should not happen: EBBs are iterated from lower addresses to higher. ++ But even if that happens there's no need to break: just flush current list ++ and start from scratch. */ ++ if ((list->last > 0 && list->range[list->last - 1].addr > last) || ++ (list->first > 0 && list->range[list->first - 1].addr >= first)) ++ { ++ list->first = 0; ++ list->last = 0; ++ list->n_list = 0; ++ list->list_root.next = &list->list_root; ++ list->list_root.prev = &list->list_root; ++ fprintf (stderr, "%s: move backwards requested\n", __func__); ++ } ++ ++ for (; list->last < list->n_range && ++ list->range[list->last].addr <= last; ++list->last) ++ if (list->range[list->last].add) ++ reloc_range_list_append (list, list->range[list->last].irel_index); ++ ++ for (; list->first < list->n_range && ++ list->range[list->first].addr < first; ++list->first) ++ if (!list->range[list->first].add) ++ reloc_range_list_remove (list, list->range[list->first].irel_index); ++} ++ ++static void free_reloc_range_list (reloc_range_list *list) ++{ ++ free (list->range); ++ free (list->reloc); ++} + + /* The compute_text_actions function will build a list of potential + transformation actions for code in the extended basic block of each +@@ -7245,6 +7462,7 @@ compute_text_actions (bfd *abfd, + property_table_entry *prop_table = 0; + int ptblsize = 0; + bfd_size_type sec_size; ++ reloc_range_list relevant_relocs; + + relax_info = get_xtensa_relax_info (sec); + BFD_ASSERT (relax_info); +@@ -7277,6 +7495,12 @@ compute_text_actions (bfd *abfd, + goto error_return; + } + ++ /* Precompute the opcode for each relocation. */ ++ reloc_opcodes = build_reloc_opcodes (abfd, sec, contents, internal_relocs); ++ ++ build_reloc_ranges (abfd, sec, contents, internal_relocs, reloc_opcodes, ++ &relevant_relocs); ++ + for (i = 0; i < sec->reloc_count; i++) + { + Elf_Internal_Rela *irel = &internal_relocs[i]; +@@ -7340,17 +7564,13 @@ compute_text_actions (bfd *abfd, + ebb->start_reloc_idx = i; + ebb->end_reloc_idx = i; + +- /* Precompute the opcode for each relocation. */ +- if (reloc_opcodes == NULL) +- reloc_opcodes = build_reloc_opcodes (abfd, sec, contents, +- internal_relocs); +- + if (!extend_ebb_bounds (ebb) + || !compute_ebb_proposed_actions (&ebb_table) + || !compute_ebb_actions (&ebb_table) + || !check_section_ebb_pcrels_fit (abfd, sec, contents, +- internal_relocs, &ebb_table, +- reloc_opcodes) ++ internal_relocs, ++ &relevant_relocs, ++ &ebb_table, reloc_opcodes) + || !check_section_ebb_reduces (&ebb_table)) + { + /* If anything goes wrong or we get unlucky and something does +@@ -7372,6 +7592,8 @@ compute_text_actions (bfd *abfd, + free_ebb_constraint (&ebb_table); + } + ++ free_reloc_range_list (&relevant_relocs); ++ + #if DEBUG + if (relax_info->action_list.head) + print_action_list (stderr, &relax_info->action_list); +@@ -7974,14 +8196,17 @@ check_section_ebb_pcrels_fit (bfd *abfd, + asection *sec, + bfd_byte *contents, + Elf_Internal_Rela *internal_relocs, ++ reloc_range_list *relevant_relocs, + const ebb_constraint *constraint, + const xtensa_opcode *reloc_opcodes) + { + unsigned i, j; ++ unsigned n = sec->reloc_count; + Elf_Internal_Rela *irel; + xlate_map_t *xmap = NULL; + bfd_boolean ok = TRUE; + xtensa_relax_info *relax_info; ++ reloc_range_list_entry *entry = NULL; + + relax_info = get_xtensa_relax_info (sec); + +@@ -7992,7 +8217,40 @@ check_section_ebb_pcrels_fit (bfd *abfd, + can still be used. */ + } + +- for (i = 0; i < sec->reloc_count; i++) ++ if (relevant_relocs && constraint->action_count) ++ { ++ if (!relevant_relocs->ok) ++ { ++ ok = FALSE; ++ n = 0; ++ } ++ else ++ { ++ bfd_vma min_offset, max_offset; ++ min_offset = max_offset = constraint->actions[0].offset; ++ ++ for (i = 1; i < constraint->action_count; ++i) ++ { ++ proposed_action *action = &constraint->actions[i]; ++ bfd_vma offset = action->offset; ++ ++ if (offset < min_offset) ++ min_offset = offset; ++ if (offset > max_offset) ++ max_offset = offset; ++ } ++ reloc_range_list_update_range (relevant_relocs, min_offset, ++ max_offset); ++ n = relevant_relocs->n_list; ++ entry = &relevant_relocs->list_root; ++ } ++ } ++ else ++ { ++ relevant_relocs = NULL; ++ } ++ ++ for (i = 0; i < n; i++) + { + r_reloc r_rel; + bfd_vma orig_self_offset, orig_target_offset; +@@ -8001,7 +8259,15 @@ check_section_ebb_pcrels_fit (bfd *abfd, + reloc_howto_type *howto; + int self_removed_bytes, target_removed_bytes; + +- irel = &internal_relocs[i]; ++ if (relevant_relocs) ++ { ++ entry = entry->next; ++ irel = entry->irel; ++ } ++ else ++ { ++ irel = internal_relocs + i; ++ } + r_type = ELF32_R_TYPE (irel->r_info); + + howto = &elf_howto_table[r_type]; +@@ -8067,21 +8333,30 @@ check_section_ebb_pcrels_fit (bfd *abfd, + xtensa_opcode opcode; + int opnum; + +- if (reloc_opcodes) +- opcode = reloc_opcodes[i]; +- else +- opcode = get_relocation_opcode (abfd, sec, contents, irel); +- if (opcode == XTENSA_UNDEFINED) ++ if (relevant_relocs) + { +- ok = FALSE; +- break; ++ opcode = entry->opcode; ++ opnum = entry->opnum; + } +- +- opnum = get_relocation_opnd (opcode, ELF32_R_TYPE (irel->r_info)); +- if (opnum == XTENSA_UNDEFINED) ++ else + { +- ok = FALSE; +- break; ++ if (reloc_opcodes) ++ opcode = reloc_opcodes[relevant_relocs ? ++ (unsigned)(entry - relevant_relocs->reloc) : i]; ++ else ++ opcode = get_relocation_opcode (abfd, sec, contents, irel); ++ if (opcode == XTENSA_UNDEFINED) ++ { ++ ok = FALSE; ++ break; ++ } ++ ++ opnum = get_relocation_opnd (opcode, ELF32_R_TYPE (irel->r_info)); ++ if (opnum == XTENSA_UNDEFINED) ++ { ++ ok = FALSE; ++ break; ++ } + } + + if (!pcrel_reloc_fits (opcode, opnum, self_offset, target_offset)) +@@ -8778,7 +9053,7 @@ move_shared_literal (asection *sec, + /* Check all of the PC-relative relocations to make sure they still fit. */ + relocs_fit = check_section_ebb_pcrels_fit (target_sec->owner, target_sec, + target_sec_cache->contents, +- target_sec_cache->relocs, ++ target_sec_cache->relocs, NULL, + &ebb_table, NULL); + + if (!relocs_fit) +-- +1.8.1.4 + diff --git a/package/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch b/package/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch new file mode 100644 index 0000000000..9df8065307 --- /dev/null +++ b/package/binutils/2.25.1/907-xtensa-optimize-removed_by_actions.patch @@ -0,0 +1,356 @@ +From 3e3f60207399ab29dd55af109e5ae9facc7d8e83 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 28 Mar 2015 08:46:28 +0300 +Subject: [PATCH 2/4] xtensa: optimize removed_by_actions + +The function removed_by_actions iterates through text actions to +calculate an offset applied by text actions to a given VMA. Although it +has a parameter p_start_action that allows for incremental offset +calculation, in many places it's used with p_start_action explicitly set +to the first action. After the first relaxation pass when the list of +text actions is finalized, an array of offsets sorted by VMA may be used +to speed up this function. + +Original profile: + +% time self children called name +----------------------------------------- + 0.35 0.00 33872/4808961 relax_section_symbols + 3.32 0.00 326022/4808961 relax_property_section + 12.83 0.00 1259379/4808961 offset_with_removed_text + 32.50 0.00 3189688/4808961 translate_reloc + 71.5 49.00 0.00 4808961 removed_by_actions +----------------------------------------- + +Same data, after optimization: + +% time self children called name +----------------------------------------- + 0.00 0.00 33872/4808537 relax_section_symbols + 0.01 0.00 326022/4808537 relax_property_section + 0.05 0.00 1258955/4808537 offset_with_removed_text_map + 0.13 0.00 3189688/4808537 translate_reloc + 1.0 0.20 0.00 4808537 removed_by_actions_map + 0.00 0.00 120/120 map_removal_by_action +----------------------------------------- + +2015-04-01 Max Filippov +bfd/ + * elf32-xtensa.c (removal_by_action_entry_struct, + removal_by_action_map_struct): new structures. + (removal_by_action_entry, removal_by_action_map): new typedefs. + (text_action_list_struct): add new field: map. + (map_removal_by_action, removed_by_actions_map, + offset_with_removed_text_map): new functions. + (relax_section): replace offset_with_removed_text with + offset_with_removed_text_map. + (translate_reloc, relax_property_section, relax_section_symbols): + replace removed_by_actions with removed_by_actions_map. + +Backported from: 071aa5c98a31c966f5fbfc573fcee61350fd1936 +Signed-off-by: Max Filippov +--- + bfd/elf32-xtensa.c | 181 +++++++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 156 insertions(+), 25 deletions(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 872370b..21b2871 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -5420,11 +5420,28 @@ struct text_action_struct + text_action *next; + }; + ++struct removal_by_action_entry_struct ++{ ++ bfd_vma offset; ++ int removed; ++ int eq_removed; ++ int eq_removed_before_fill; ++}; ++typedef struct removal_by_action_entry_struct removal_by_action_entry; ++ ++struct removal_by_action_map_struct ++{ ++ unsigned n_entries; ++ removal_by_action_entry *entry; ++}; ++typedef struct removal_by_action_map_struct removal_by_action_map; ++ + + /* List of all of the actions taken on a text section. */ + struct text_action_list_struct + { + text_action *head; ++ removal_by_action_map map; + }; + + +@@ -5636,6 +5653,101 @@ action_list_count (text_action_list *action_list) + return count; + } + ++static void ++map_removal_by_action (text_action_list *action_list) ++{ ++ text_action *r; ++ int removed = 0; ++ removal_by_action_map map; ++ bfd_boolean eq_complete; ++ ++ map.n_entries = 0; ++ map.entry = bfd_malloc (action_list_count (action_list) * ++ sizeof (removal_by_action_entry)); ++ eq_complete = FALSE; ++ ++ for (r = action_list->head; r;) ++ { ++ removal_by_action_entry *ientry = map.entry + map.n_entries; ++ ++ if (map.n_entries && (ientry - 1)->offset == r->offset) ++ { ++ --ientry; ++ } ++ else ++ { ++ ++map.n_entries; ++ eq_complete = FALSE; ++ ientry->offset = r->offset; ++ ientry->eq_removed_before_fill = removed; ++ } ++ ++ if (!eq_complete) ++ { ++ if (r->action != ta_fill || r->removed_bytes >= 0) ++ { ++ ientry->eq_removed = removed; ++ eq_complete = TRUE; ++ } ++ else ++ ientry->eq_removed = removed + r->removed_bytes; ++ } ++ ++ removed += r->removed_bytes; ++ ientry->removed = removed; ++ r = r->next; ++ } ++ action_list->map = map; ++} ++ ++static int ++removed_by_actions_map (text_action_list *action_list, bfd_vma offset, ++ bfd_boolean before_fill) ++{ ++ unsigned a, b; ++ ++ if (!action_list->map.entry) ++ map_removal_by_action (action_list); ++ ++ if (!action_list->map.n_entries) ++ return 0; ++ ++ a = 0; ++ b = action_list->map.n_entries; ++ ++ while (b - a > 1) ++ { ++ unsigned c = (a + b) / 2; ++ ++ if (action_list->map.entry[c].offset <= offset) ++ a = c; ++ else ++ b = c; ++ } ++ ++ if (action_list->map.entry[a].offset < offset) ++ { ++ return action_list->map.entry[a].removed; ++ } ++ else if (action_list->map.entry[a].offset == offset) ++ { ++ return before_fill ? ++ action_list->map.entry[a].eq_removed_before_fill : ++ action_list->map.entry[a].eq_removed; ++ } ++ else ++ { ++ return 0; ++ } ++} ++ ++static bfd_vma ++offset_with_removed_text_map (text_action_list *action_list, bfd_vma offset) ++{ ++ int removed = removed_by_actions_map (action_list, offset, FALSE); ++ return offset - removed; ++} ++ + + /* The find_insn_action routine will only find non-fill actions. */ + +@@ -5909,6 +6021,9 @@ init_xtensa_relax_info (asection *sec) + + relax_info->action_list.head = NULL; + ++ relax_info->action_list.map.n_entries = 0; ++ relax_info->action_list.map.entry = NULL; ++ + relax_info->fix_list = NULL; + relax_info->fix_array = NULL; + relax_info->fix_array_count = 0; +@@ -9218,7 +9333,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + if (elf_hash_table (link_info)->dynamic_sections_created) + shrink_dynamic_reloc_sections (link_info, abfd, sec, irel); + irel->r_info = ELF32_R_INFO (0, R_XTENSA_NONE); +- irel->r_offset = offset_with_removed_text ++ irel->r_offset = offset_with_removed_text_map + (&relax_info->action_list, irel->r_offset); + continue; + } +@@ -9255,7 +9370,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + } + } + +- source_offset = offset_with_removed_text ++ source_offset = offset_with_removed_text_map + (&relax_info->action_list, irel->r_offset); + irel->r_offset = source_offset; + } +@@ -9352,7 +9467,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + break; + } + +- new_end_offset = offset_with_removed_text ++ new_end_offset = offset_with_removed_text_map + (&target_relax_info->action_list, + r_rel.target_offset + diff_value); + diff_value = new_end_offset - new_reloc.target_offset; +@@ -9750,7 +9865,6 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec) + xtensa_relax_info *relax_info; + removed_literal *removed; + bfd_vma target_offset, base_offset; +- text_action *act; + + *new_rel = *orig_rel; + +@@ -9803,19 +9917,26 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec) + offset. */ + + base_offset = r_reloc_get_target_offset (new_rel) - new_rel->rela.r_addend; +- act = relax_info->action_list.head; + if (base_offset <= target_offset) + { +- int base_removed = removed_by_actions (&act, base_offset, FALSE); +- int addend_removed = removed_by_actions (&act, target_offset, FALSE); ++ int base_removed = removed_by_actions_map (&relax_info->action_list, ++ base_offset, FALSE); ++ int addend_removed = removed_by_actions_map (&relax_info->action_list, ++ target_offset, FALSE) - ++ base_removed; ++ + new_rel->target_offset = target_offset - base_removed - addend_removed; + new_rel->rela.r_addend -= addend_removed; + } + else + { + /* Handle a negative addend. The base offset comes first. */ +- int tgt_removed = removed_by_actions (&act, target_offset, FALSE); +- int addend_removed = removed_by_actions (&act, base_offset, FALSE); ++ int tgt_removed = removed_by_actions_map (&relax_info->action_list, ++ target_offset, FALSE); ++ int addend_removed = removed_by_actions_map (&relax_info->action_list, ++ base_offset, FALSE) - ++ tgt_removed; ++ + new_rel->target_offset = target_offset - tgt_removed; + new_rel->rela.r_addend += addend_removed; + } +@@ -10138,9 +10259,10 @@ relax_property_section (bfd *abfd, + bfd_vma old_offset = val.r_rel.target_offset; + bfd_vma new_offset; + long old_size, new_size; +- text_action *act = target_relax_info->action_list.head; +- new_offset = old_offset - +- removed_by_actions (&act, old_offset, FALSE); ++ int removed_by_old_offset = ++ removed_by_actions_map (&target_relax_info->action_list, ++ old_offset, FALSE); ++ new_offset = old_offset - removed_by_old_offset; + + /* Assert that we are not out of bounds. */ + old_size = bfd_get_32 (abfd, size_p); +@@ -10164,9 +10286,10 @@ relax_property_section (bfd *abfd, + + /* Recompute the new_offset, but this time don't + include any fill inserted by relaxation. */ +- act = target_relax_info->action_list.head; +- new_offset = old_offset - +- removed_by_actions (&act, old_offset, TRUE); ++ removed_by_old_offset = ++ removed_by_actions_map (&target_relax_info->action_list, ++ old_offset, TRUE); ++ new_offset = old_offset - removed_by_old_offset; + + /* If it is not unreachable and we have not yet + seen an unreachable at this address, place it +@@ -10182,8 +10305,12 @@ relax_property_section (bfd *abfd, + } + } + else +- new_size -= +- removed_by_actions (&act, old_offset + old_size, TRUE); ++ { ++ int removed_by_old_offset_size = ++ removed_by_actions_map (&target_relax_info->action_list, ++ old_offset + old_size, TRUE); ++ new_size -= removed_by_old_offset_size - removed_by_old_offset; ++ } + + if (new_size != old_size) + { +@@ -10441,14 +10568,16 @@ relax_section_symbols (bfd *abfd, asection *sec) + + if (isym->st_shndx == sec_shndx) + { +- text_action *act = relax_info->action_list.head; + bfd_vma orig_addr = isym->st_value; ++ int removed = removed_by_actions_map (&relax_info->action_list, ++ orig_addr, FALSE); + +- isym->st_value -= removed_by_actions (&act, orig_addr, FALSE); +- ++ isym->st_value -= removed; + if (ELF32_ST_TYPE (isym->st_info) == STT_FUNC) + isym->st_size -= +- removed_by_actions (&act, orig_addr + isym->st_size, FALSE); ++ removed_by_actions_map (&relax_info->action_list, ++ orig_addr + isym->st_size, FALSE) - ++ removed; + } + } + +@@ -10466,15 +10595,17 @@ relax_section_symbols (bfd *abfd, asection *sec) + || sym_hash->root.type == bfd_link_hash_defweak) + && sym_hash->root.u.def.section == sec) + { +- text_action *act = relax_info->action_list.head; + bfd_vma orig_addr = sym_hash->root.u.def.value; ++ int removed = removed_by_actions_map (&relax_info->action_list, ++ orig_addr, FALSE); + +- sym_hash->root.u.def.value -= +- removed_by_actions (&act, orig_addr, FALSE); ++ sym_hash->root.u.def.value -= removed; + + if (sym_hash->type == STT_FUNC) + sym_hash->size -= +- removed_by_actions (&act, orig_addr + sym_hash->size, FALSE); ++ removed_by_actions_map (&relax_info->action_list, ++ orig_addr + sym_hash->size, FALSE) - ++ removed; + } + } + +-- +1.8.1.4 + diff --git a/package/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch b/package/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch new file mode 100644 index 0000000000..96d526fe30 --- /dev/null +++ b/package/binutils/2.25.1/908-xtensa-optimize-find_removed_literal.patch @@ -0,0 +1,146 @@ +From 288c2b709e5e6841484e1a129eaccd299db36877 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 4 Apr 2015 14:49:42 +0300 +Subject: [PATCH 3/4] xtensa: optimize find_removed_literal + +find_removed_literal uses linear search to find removed literal by its +VMA. The list of literals is fixed at that point, build an ordered index +array and use binary search instead. + +Original profile: + +% time self children called name +----------------------------------------- + 56.72 0.00 297578/669392 translate_reloc + 70.86 0.00 371814/669392 relax_section + 67.9 127.58 0.00 669392 find_removed_literal +----------------------------------------- + +Same data, after optimization: + +% time self children called name +----------------------------------------- + 0.00 0.00 297578/669392 translate_reloc + 0.00 0.00 371814/669392 relax_section + 0.0 0.00 0.00 669392 find_removed_literal + 0.00 0.00 23838/23838 map_removed_literal +----------------------------------------- + +2015-04-03 Max Filippov +bfd/ + * elf32-xtensa.c (removed_literal_map_entry): new typedef. + (removed_literal_map_entry_struct): new structure. + (removed_literal_list_struct): add new fields: n_map and map. + (map_removed_literal, removed_literal_compare): new functions. + (find_removed_literal): build index array for literals ordered + by VMA, use binary search to find removed literal. + +Backported from: 3439c466273378021821473d3fc84990e089ae34 +Signed-off-by: Max Filippov +--- + bfd/elf32-xtensa.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 58 insertions(+), 6 deletions(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 21b2871..51733ad 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -5832,6 +5832,7 @@ print_action_list (FILE *fp, text_action_list *action_list) + by the "from" offset field. */ + + typedef struct removed_literal_struct removed_literal; ++typedef struct removed_literal_map_entry_struct removed_literal_map_entry; + typedef struct removed_literal_list_struct removed_literal_list; + + struct removed_literal_struct +@@ -5841,10 +5842,19 @@ struct removed_literal_struct + removed_literal *next; + }; + ++struct removed_literal_map_entry_struct ++{ ++ bfd_vma addr; ++ removed_literal *literal; ++}; ++ + struct removed_literal_list_struct + { + removed_literal *head; + removed_literal *tail; ++ ++ unsigned n_map; ++ removed_literal_map_entry *map; + }; + + +@@ -5893,6 +5903,39 @@ add_removed_literal (removed_literal_list *removed_list, + } + } + ++static void ++map_removed_literal (removed_literal_list *removed_list) ++{ ++ unsigned n_map = 0; ++ unsigned i; ++ removed_literal_map_entry *map = NULL; ++ removed_literal *r = removed_list->head; ++ ++ for (i = 0; r; ++i, r = r->next) ++ { ++ if (i == n_map) ++ { ++ n_map = (n_map * 2) + 2; ++ map = bfd_realloc (map, n_map * sizeof (*map)); ++ } ++ map[i].addr = r->from.target_offset; ++ map[i].literal = r; ++ } ++ removed_list->map = map; ++ removed_list->n_map = i; ++} ++ ++static int ++removed_literal_compare (const void *a, const void *b) ++{ ++ const removed_literal_map_entry *pa = a; ++ const removed_literal_map_entry *pb = b; ++ ++ if (pa->addr == pb->addr) ++ return 0; ++ else ++ return pa->addr < pb->addr ? -1 : 1; ++} + + /* Check if the list of removed literals contains an entry for the + given address. Return the entry if found. */ +@@ -5900,12 +5943,21 @@ add_removed_literal (removed_literal_list *removed_list, + static removed_literal * + find_removed_literal (removed_literal_list *removed_list, bfd_vma addr) + { +- removed_literal *r = removed_list->head; +- while (r && r->from.target_offset < addr) +- r = r->next; +- if (r && r->from.target_offset == addr) +- return r; +- return NULL; ++ removed_literal_map_entry *p; ++ removed_literal *r = NULL; ++ ++ if (removed_list->map == NULL) ++ map_removed_literal (removed_list); ++ ++ p = bsearch (&addr, removed_list->map, removed_list->n_map, ++ sizeof (*removed_list->map), removed_literal_compare); ++ if (p) ++ { ++ while (p != removed_list->map && (p - 1)->addr == addr) ++ --p; ++ r = p->literal; ++ } ++ return r; + } + + +-- +1.8.1.4 + diff --git a/package/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch b/package/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch new file mode 100644 index 0000000000..3090cc21e5 --- /dev/null +++ b/package/binutils/2.25.1/909-xtensa-replace-action-list-with-splay-tree.patch @@ -0,0 +1,826 @@ +From e5409aedd3ee2192855018a564650ffb75c26e60 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sun, 5 Apr 2015 17:04:22 +0300 +Subject: [PATCH 4/4] xtensa: replace action list with splay tree + +text_action_add uses linear list search to order text actions list by +action VMA. The list is used at the first relaxation pass, when it's not +fixed yet. +Replace the list with splay tree from libiberty. + +Original profile: + +% time self children called name +----------------------------------------- + 0.00 0.00 14/158225 compute_text_actions + 3.62 0.00 25211/158225 remove_dead_literal + 8.42 0.00 58645/158225 coalesce_shared_literal + 10.68 0.00 74355/158225 text_action_add_proposed + 38.8 22.73 0.00 158225 text_action_add + 0.00 0.00 144527/293246 bfd_zmalloc +----------------------------------------- + +Same data, after optimization: + +% time self children called name +----------------------------------------- + 0.00 0.00 14/158225 compute_text_actions + 0.00 0.00 25211/158225 remove_dead_literal + 0.00 0.01 58645/158225 coalesce_shared_literal + 0.00 0.01 74355/158225 text_action_add_proposed + 0.1 0.00 0.02 158225 text_action_add + 0.01 0.00 144527/144527 splay_tree_insert + 0.00 0.00 144527/195130 splay_tree_lookup + 0.00 0.00 144527/293246 bfd_zmalloc +----------------------------------------- + +2015-04-03 Max Filippov +bfd/ + * elf32-xtensa.c (splay-tree.h): include header. + (text_action_struct): drop next pointer. + (text_action_list_struct): drop head pointer, add count and + tree fields. + (find_fill_action): instead of linear search in text_action_list + search in the tree. + (text_action_compare, action_first, action_next): new functions. + (text_action_add, text_action_add_literal): instead of linear + search and insertion insert new node into the tree. + (removed_by_actions): pass additional parameter: action_list, + use it to traverse the tree. + (offset_with_removed_text): pass additional action_list parameter + to removed_by_actions. + (map_action_fn_context): new typedef. + (map_action_fn_context_struct): new structure. + (map_action_fn): new function. + (map_removal_by_action): use splay_tree_foreach to build map. + (find_insn_action): replace linear search in text_action_list + with series of splay_tree_lookups. + (print_action, print_action_list_fn): new functions. + (print_action_list): use splay_tree_foreach. + (init_xtensa_relax_info): drop action_list.head initialization. + Initialize the tree. + (compute_text_actions): use non-zero action_list_count instead of + non-NULL action list. + (xlate_map_context): new typedef. + (xlate_map_context_struct): new structure. + (xlate_map_fn): new function. + (build_xlate_map): use splay_tree_foreach to build map. + (action_remove_bytes_fn): new function. + (relax_section): use zero action_list_count instead of NULL + action list. Use splay_tree_foreach to count final section size. + Drop unused variable 'removed'. + +Backported from: 4c2af04fe8b4452bf51d2debf1bb467fafcd0f08 +Signed-off-by: Max Filippov +--- + bfd/elf32-xtensa.c | 488 +++++++++++++++++++++++++++++++---------------------- + 1 file changed, 282 insertions(+), 206 deletions(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 51733ad..53af1c6 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -28,6 +28,7 @@ + #include "libbfd.h" + #include "elf-bfd.h" + #include "elf/xtensa.h" ++#include "splay-tree.h" + #include "xtensa-isa.h" + #include "xtensa-config.h" + +@@ -5416,8 +5417,6 @@ struct text_action_struct + bfd_vma virtual_offset; /* Zero except for adding literals. */ + int removed_bytes; + literal_value value; /* Only valid when adding literals. */ +- +- text_action *next; + }; + + struct removal_by_action_entry_struct +@@ -5440,7 +5439,8 @@ typedef struct removal_by_action_map_struct removal_by_action_map; + /* List of all of the actions taken on a text section. */ + struct text_action_list_struct + { +- text_action *head; ++ unsigned count; ++ splay_tree tree; + removal_by_action_map map; + }; + +@@ -5448,20 +5448,18 @@ struct text_action_list_struct + static text_action * + find_fill_action (text_action_list *l, asection *sec, bfd_vma offset) + { +- text_action **m_p; ++ text_action a; + + /* It is not necessary to fill at the end of a section. */ + if (sec->size == offset) + return NULL; + +- for (m_p = &l->head; *m_p && (*m_p)->offset <= offset; m_p = &(*m_p)->next) +- { +- text_action *t = *m_p; +- /* When the action is another fill at the same address, +- just increase the size. */ +- if (t->offset == offset && t->action == ta_fill) +- return t; +- } ++ a.offset = offset; ++ a.action = ta_fill; ++ ++ splay_tree_node node = splay_tree_lookup (l->tree, (splay_tree_key)&a); ++ if (node) ++ return (text_action *)node->value; + return NULL; + } + +@@ -5509,6 +5507,49 @@ adjust_fill_action (text_action *ta, int fill_diff) + } + + ++static int ++text_action_compare (splay_tree_key a, splay_tree_key b) ++{ ++ text_action *pa = (text_action *)a; ++ text_action *pb = (text_action *)b; ++ static const int action_priority[] = ++ { ++ [ta_fill] = 0, ++ [ta_none] = 1, ++ [ta_convert_longcall] = 2, ++ [ta_narrow_insn] = 3, ++ [ta_remove_insn] = 4, ++ [ta_remove_longcall] = 5, ++ [ta_remove_literal] = 6, ++ [ta_widen_insn] = 7, ++ [ta_add_literal] = 8, ++ }; ++ ++ if (pa->offset == pb->offset) ++ { ++ if (pa->action == pb->action) ++ return 0; ++ return action_priority[pa->action] - action_priority[pb->action]; ++ } ++ else ++ return pa->offset < pb->offset ? -1 : 1; ++} ++ ++static text_action * ++action_first (text_action_list *action_list) ++{ ++ splay_tree_node node = splay_tree_min (action_list->tree); ++ return node ? (text_action *)node->value : NULL; ++} ++ ++static text_action * ++action_next (text_action_list *action_list, text_action *action) ++{ ++ splay_tree_node node = splay_tree_successor (action_list->tree, ++ (splay_tree_key)action); ++ return node ? (text_action *)node->value : NULL; ++} ++ + /* Add a modification action to the text. For the case of adding or + removing space, modify any current fill and assume that + "unreachable_space" bytes can be freely contracted. Note that a +@@ -5521,8 +5562,8 @@ text_action_add (text_action_list *l, + bfd_vma offset, + int removed) + { +- text_action **m_p; + text_action *ta; ++ text_action a; + + /* It is not necessary to fill at the end of a section. */ + if (action == ta_fill && sec->size == offset) +@@ -5532,34 +5573,30 @@ text_action_add (text_action_list *l, + if (action == ta_fill && removed == 0) + return; + +- for (m_p = &l->head; *m_p && (*m_p)->offset <= offset; m_p = &(*m_p)->next) ++ a.action = action; ++ a.offset = offset; ++ ++ if (action == ta_fill) + { +- text_action *t = *m_p; ++ splay_tree_node node = splay_tree_lookup (l->tree, (splay_tree_key)&a); + +- if (action == ta_fill) ++ if (node) + { +- /* When the action is another fill at the same address, +- just increase the size. */ +- if (t->offset == offset && t->action == ta_fill) +- { +- t->removed_bytes += removed; +- return; +- } +- /* Fills need to happen before widens so that we don't +- insert fill bytes into the instruction stream. */ +- if (t->offset == offset && t->action == ta_widen_insn) +- break; ++ ta = (text_action *)node->value; ++ ta->removed_bytes += removed; ++ return; + } + } ++ else ++ BFD_ASSERT (splay_tree_lookup (l->tree, (splay_tree_key)&a) == NULL); + +- /* Create a new record and fill it up. */ + ta = (text_action *) bfd_zmalloc (sizeof (text_action)); + ta->action = action; + ta->sec = sec; + ta->offset = offset; + ta->removed_bytes = removed; +- ta->next = (*m_p); +- *m_p = ta; ++ splay_tree_insert (l->tree, (splay_tree_key)ta, (splay_tree_value)ta); ++ ++l->count; + } + + +@@ -5570,7 +5607,6 @@ text_action_add_literal (text_action_list *l, + const literal_value *value, + int removed) + { +- text_action **m_p; + text_action *ta; + asection *sec = r_reloc_get_section (loc); + bfd_vma offset = loc->target_offset; +@@ -5578,14 +5614,6 @@ text_action_add_literal (text_action_list *l, + + BFD_ASSERT (action == ta_add_literal); + +- for (m_p = &l->head; *m_p != NULL; m_p = &(*m_p)->next) +- { +- if ((*m_p)->offset > offset +- && ((*m_p)->offset != offset +- || (*m_p)->virtual_offset > virtual_offset)) +- break; +- } +- + /* Create a new record and fill it up. */ + ta = (text_action *) bfd_zmalloc (sizeof (text_action)); + ta->action = action; +@@ -5594,8 +5622,10 @@ text_action_add_literal (text_action_list *l, + ta->virtual_offset = virtual_offset; + ta->value = *value; + ta->removed_bytes = removed; +- ta->next = (*m_p); +- *m_p = ta; ++ ++ BFD_ASSERT (splay_tree_lookup (l->tree, (splay_tree_key)ta) == NULL); ++ splay_tree_insert (l->tree, (splay_tree_key)ta, (splay_tree_value)ta); ++ ++l->count; + } + + +@@ -5606,7 +5636,8 @@ text_action_add_literal (text_action_list *l, + so that each search may begin where the previous one left off. */ + + static int +-removed_by_actions (text_action **p_start_action, ++removed_by_actions (text_action_list *action_list, ++ text_action **p_start_action, + bfd_vma offset, + bfd_boolean before_fill) + { +@@ -5614,6 +5645,13 @@ removed_by_actions (text_action **p_start_action, + int removed = 0; + + r = *p_start_action; ++ if (r) ++ { ++ splay_tree_node node = splay_tree_lookup (action_list->tree, ++ (splay_tree_key)r); ++ BFD_ASSERT (node != NULL && r == (text_action *)node->value); ++ } ++ + while (r) + { + if (r->offset > offset) +@@ -5625,7 +5663,7 @@ removed_by_actions (text_action **p_start_action, + + removed += r->removed_bytes; + +- r = r->next; ++ r = action_next (action_list, r); + } + + *p_start_action = r; +@@ -5636,68 +5674,74 @@ removed_by_actions (text_action **p_start_action, + static bfd_vma + offset_with_removed_text (text_action_list *action_list, bfd_vma offset) + { +- text_action *r = action_list->head; +- return offset - removed_by_actions (&r, offset, FALSE); ++ text_action *r = action_first (action_list); ++ ++ return offset - removed_by_actions (action_list, &r, offset, FALSE); + } + + + static unsigned + action_list_count (text_action_list *action_list) + { +- text_action *r = action_list->head; +- unsigned count = 0; +- for (r = action_list->head; r != NULL; r = r->next) +- { +- count++; +- } +- return count; ++ return action_list->count; + } + +-static void +-map_removal_by_action (text_action_list *action_list) ++typedef struct map_action_fn_context_struct map_action_fn_context; ++struct map_action_fn_context_struct + { +- text_action *r; +- int removed = 0; ++ int removed; + removal_by_action_map map; + bfd_boolean eq_complete; ++}; + +- map.n_entries = 0; +- map.entry = bfd_malloc (action_list_count (action_list) * +- sizeof (removal_by_action_entry)); +- eq_complete = FALSE; ++static int ++map_action_fn (splay_tree_node node, void *p) ++{ ++ map_action_fn_context *ctx = p; ++ text_action *r = (text_action *)node->value; ++ removal_by_action_entry *ientry = ctx->map.entry + ctx->map.n_entries; + +- for (r = action_list->head; r;) ++ if (ctx->map.n_entries && (ientry - 1)->offset == r->offset) + { +- removal_by_action_entry *ientry = map.entry + map.n_entries; ++ --ientry; ++ } ++ else ++ { ++ ++ctx->map.n_entries; ++ ctx->eq_complete = FALSE; ++ ientry->offset = r->offset; ++ ientry->eq_removed_before_fill = ctx->removed; ++ } + +- if (map.n_entries && (ientry - 1)->offset == r->offset) ++ if (!ctx->eq_complete) ++ { ++ if (r->action != ta_fill || r->removed_bytes >= 0) + { +- --ientry; ++ ientry->eq_removed = ctx->removed; ++ ctx->eq_complete = TRUE; + } + else +- { +- ++map.n_entries; +- eq_complete = FALSE; +- ientry->offset = r->offset; +- ientry->eq_removed_before_fill = removed; +- } ++ ientry->eq_removed = ctx->removed + r->removed_bytes; ++ } + +- if (!eq_complete) +- { +- if (r->action != ta_fill || r->removed_bytes >= 0) +- { +- ientry->eq_removed = removed; +- eq_complete = TRUE; +- } +- else +- ientry->eq_removed = removed + r->removed_bytes; +- } ++ ctx->removed += r->removed_bytes; ++ ientry->removed = ctx->removed; ++ return 0; ++} + +- removed += r->removed_bytes; +- ientry->removed = removed; +- r = r->next; +- } +- action_list->map = map; ++static void ++map_removal_by_action (text_action_list *action_list) ++{ ++ map_action_fn_context ctx; ++ ++ ctx.removed = 0; ++ ctx.map.n_entries = 0; ++ ctx.map.entry = bfd_malloc (action_list_count (action_list) * ++ sizeof (removal_by_action_entry)); ++ ctx.eq_complete = FALSE; ++ ++ splay_tree_foreach (action_list->tree, map_action_fn, &ctx); ++ action_list->map = ctx.map; + } + + static int +@@ -5754,28 +5798,26 @@ offset_with_removed_text_map (text_action_list *action_list, bfd_vma offset) + static text_action * + find_insn_action (text_action_list *action_list, bfd_vma offset) + { +- text_action *t; +- for (t = action_list->head; t; t = t->next) ++ static const text_action_t action[] = + { +- if (t->offset == offset) +- { +- switch (t->action) +- { +- case ta_none: +- case ta_fill: +- break; +- case ta_remove_insn: +- case ta_remove_longcall: +- case ta_convert_longcall: +- case ta_narrow_insn: +- case ta_widen_insn: +- return t; +- case ta_remove_literal: +- case ta_add_literal: +- BFD_ASSERT (0); +- break; +- } +- } ++ ta_convert_longcall, ++ ta_remove_longcall, ++ ta_widen_insn, ++ ta_narrow_insn, ++ ta_remove_insn, ++ }; ++ text_action a; ++ unsigned i; ++ ++ a.offset = offset; ++ for (i = 0; i < sizeof (action) / sizeof (*action); ++i) ++ { ++ splay_tree_node node; ++ ++ a.action = action[i]; ++ node = splay_tree_lookup (action_list->tree, (splay_tree_key)&a); ++ if (node) ++ return (text_action *)node->value; + } + return NULL; + } +@@ -5784,40 +5826,50 @@ find_insn_action (text_action_list *action_list, bfd_vma offset) + #if DEBUG + + static void +-print_action_list (FILE *fp, text_action_list *action_list) ++print_action (FILE *fp, text_action *r) ++{ ++ const char *t = "unknown"; ++ switch (r->action) ++ { ++ case ta_remove_insn: ++ t = "remove_insn"; break; ++ case ta_remove_longcall: ++ t = "remove_longcall"; break; ++ case ta_convert_longcall: ++ t = "convert_longcall"; break; ++ case ta_narrow_insn: ++ t = "narrow_insn"; break; ++ case ta_widen_insn: ++ t = "widen_insn"; break; ++ case ta_fill: ++ t = "fill"; break; ++ case ta_none: ++ t = "none"; break; ++ case ta_remove_literal: ++ t = "remove_literal"; break; ++ case ta_add_literal: ++ t = "add_literal"; break; ++ } ++ ++ fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n", ++ r->sec->owner->filename, ++ r->sec->name, (unsigned long) r->offset, t, r->removed_bytes); ++} ++ ++static int ++print_action_list_fn (splay_tree_node node, void *p) + { +- text_action *r; ++ text_action *r = (text_action *)node->value; + +- fprintf (fp, "Text Action\n"); +- for (r = action_list->head; r != NULL; r = r->next) +- { +- const char *t = "unknown"; +- switch (r->action) +- { +- case ta_remove_insn: +- t = "remove_insn"; break; +- case ta_remove_longcall: +- t = "remove_longcall"; break; +- case ta_convert_longcall: +- t = "convert_longcall"; break; +- case ta_narrow_insn: +- t = "narrow_insn"; break; +- case ta_widen_insn: +- t = "widen_insn"; break; +- case ta_fill: +- t = "fill"; break; +- case ta_none: +- t = "none"; break; +- case ta_remove_literal: +- t = "remove_literal"; break; +- case ta_add_literal: +- t = "add_literal"; break; +- } ++ print_action (p, r); ++ return 0; ++} + +- fprintf (fp, "%s: %s[0x%lx] \"%s\" %d\n", +- r->sec->owner->filename, +- r->sec->name, (unsigned long) r->offset, t, r->removed_bytes); +- } ++static void ++print_action_list (FILE *fp, text_action_list *action_list) ++{ ++ fprintf (fp, "Text Action\n"); ++ splay_tree_foreach (action_list->tree, print_action_list_fn, fp); + } + + #endif /* DEBUG */ +@@ -6071,8 +6123,8 @@ init_xtensa_relax_info (asection *sec) + relax_info->removed_list.head = NULL; + relax_info->removed_list.tail = NULL; + +- relax_info->action_list.head = NULL; +- ++ relax_info->action_list.tree = splay_tree_new (text_action_compare, ++ NULL, NULL); + relax_info->action_list.map.n_entries = 0; + relax_info->action_list.map.entry = NULL; + +@@ -7762,7 +7814,7 @@ compute_text_actions (bfd *abfd, + free_reloc_range_list (&relevant_relocs); + + #if DEBUG +- if (relax_info->action_list.head) ++ if (action_list_count (&relax_info->action_list)) + print_action_list (stderr, &relax_info->action_list); + #endif + +@@ -8263,6 +8315,54 @@ xlate_offset_with_removed_text (const xlate_map_t *map, + return e->new_address - e->orig_address + offset; + } + ++typedef struct xlate_map_context_struct xlate_map_context; ++struct xlate_map_context_struct ++{ ++ xlate_map_t *map; ++ xlate_map_entry_t *current_entry; ++ int removed; ++}; ++ ++static int ++xlate_map_fn (splay_tree_node node, void *p) ++{ ++ text_action *r = (text_action *)node->value; ++ xlate_map_context *ctx = p; ++ unsigned orig_size = 0; ++ ++ switch (r->action) ++ { ++ case ta_none: ++ case ta_remove_insn: ++ case ta_convert_longcall: ++ case ta_remove_literal: ++ case ta_add_literal: ++ break; ++ case ta_remove_longcall: ++ orig_size = 6; ++ break; ++ case ta_narrow_insn: ++ orig_size = 3; ++ break; ++ case ta_widen_insn: ++ orig_size = 2; ++ break; ++ case ta_fill: ++ break; ++ } ++ ctx->current_entry->size = ++ r->offset + orig_size - ctx->current_entry->orig_address; ++ if (ctx->current_entry->size != 0) ++ { ++ ctx->current_entry++; ++ ctx->map->entry_count++; ++ } ++ ctx->current_entry->orig_address = r->offset + orig_size; ++ ctx->removed += r->removed_bytes; ++ ctx->current_entry->new_address = r->offset + orig_size - ctx->removed; ++ ctx->current_entry->size = 0; ++ return 0; ++} + + /* Build a binary searchable offset translation map from a section's + action list. */ +@@ -8270,75 +8370,40 @@ xlate_offset_with_removed_text (const xlate_map_t *map, + static xlate_map_t * + build_xlate_map (asection *sec, xtensa_relax_info *relax_info) + { +- xlate_map_t *map = (xlate_map_t *) bfd_malloc (sizeof (xlate_map_t)); + text_action_list *action_list = &relax_info->action_list; + unsigned num_actions = 0; +- text_action *r; +- int removed; +- xlate_map_entry_t *current_entry; ++ xlate_map_context ctx; + +- if (map == NULL) ++ ctx.map = (xlate_map_t *) bfd_malloc (sizeof (xlate_map_t)); ++ ++ if (ctx.map == NULL) + return NULL; + + num_actions = action_list_count (action_list); +- map->entry = (xlate_map_entry_t *) ++ ctx.map->entry = (xlate_map_entry_t *) + bfd_malloc (sizeof (xlate_map_entry_t) * (num_actions + 1)); +- if (map->entry == NULL) ++ if (ctx.map->entry == NULL) + { +- free (map); ++ free (ctx.map); + return NULL; + } +- map->entry_count = 0; ++ ctx.map->entry_count = 0; + +- removed = 0; +- current_entry = &map->entry[0]; ++ ctx.removed = 0; ++ ctx.current_entry = &ctx.map->entry[0]; + +- current_entry->orig_address = 0; +- current_entry->new_address = 0; +- current_entry->size = 0; ++ ctx.current_entry->orig_address = 0; ++ ctx.current_entry->new_address = 0; ++ ctx.current_entry->size = 0; + +- for (r = action_list->head; r != NULL; r = r->next) +- { +- unsigned orig_size = 0; +- switch (r->action) +- { +- case ta_none: +- case ta_remove_insn: +- case ta_convert_longcall: +- case ta_remove_literal: +- case ta_add_literal: +- break; +- case ta_remove_longcall: +- orig_size = 6; +- break; +- case ta_narrow_insn: +- orig_size = 3; +- break; +- case ta_widen_insn: +- orig_size = 2; +- break; +- case ta_fill: +- break; +- } +- current_entry->size = +- r->offset + orig_size - current_entry->orig_address; +- if (current_entry->size != 0) +- { +- current_entry++; +- map->entry_count++; +- } +- current_entry->orig_address = r->offset + orig_size; +- removed += r->removed_bytes; +- current_entry->new_address = r->offset + orig_size - removed; +- current_entry->size = 0; +- } ++ splay_tree_foreach (action_list->tree, xlate_map_fn, &ctx); + +- current_entry->size = (bfd_get_section_limit (sec->owner, sec) +- - current_entry->orig_address); +- if (current_entry->size != 0) +- map->entry_count++; ++ ctx.current_entry->size = (bfd_get_section_limit (sec->owner, sec) ++ - ctx.current_entry->orig_address); ++ if (ctx.current_entry->size != 0) ++ ctx.map->entry_count++; + +- return map; ++ return ctx.map; + } + + +@@ -9302,6 +9367,16 @@ move_shared_literal (asection *sec, + + /* Second relaxation pass. */ + ++static int ++action_remove_bytes_fn (splay_tree_node node, void *p) ++{ ++ bfd_size_type *final_size = p; ++ text_action *action = (text_action *)node->value; ++ ++ *final_size -= action->removed_bytes; ++ return 0; ++} ++ + /* Modify all of the relocations to point to the right spot, and if this + is a relaxable section, delete the unwanted literals and fix the + section size. */ +@@ -9334,7 +9409,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + + internal_relocs = retrieve_internal_relocs (abfd, sec, + link_info->keep_memory); +- if (!internal_relocs && !relax_info->action_list.head) ++ if (!internal_relocs && !action_list_count (&relax_info->action_list)) + return TRUE; + + contents = retrieve_contents (abfd, sec, link_info->keep_memory); +@@ -9412,6 +9487,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + } + /* Update the action so that the code that moves + the contents will do the right thing. */ ++ /* ta_remove_longcall and ta_remove_insn actions are ++ grouped together in the tree as well as ++ ta_convert_longcall and ta_none, so that changes below ++ can be done w/o removing and reinserting action into ++ the tree. */ ++ + if (action->action == ta_remove_longcall) + action->action = ta_remove_insn; + else +@@ -9584,13 +9665,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + + if ((relax_info->is_relaxable_literal_section + || relax_info->is_relaxable_asm_section) +- && relax_info->action_list.head) ++ && action_list_count (&relax_info->action_list)) + { + /* Walk through the planned actions and build up a table + of move, copy and fill records. Use the move, copy and + fill records to perform the actions once. */ + +- int removed = 0; + bfd_size_type final_size, copy_size, orig_insn_size; + bfd_byte *scratch = NULL; + bfd_byte *dup_contents = NULL; +@@ -9601,15 +9681,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + bfd_vma orig_dot_vo = 0; /* Virtual offset from orig_dot. */ + bfd_vma dup_dot = 0; + +- text_action *action = relax_info->action_list.head; ++ text_action *action; + + final_size = sec->size; +- for (action = relax_info->action_list.head; action; +- action = action->next) +- { +- final_size -= action->removed_bytes; +- } + ++ splay_tree_foreach (relax_info->action_list.tree, ++ action_remove_bytes_fn, &final_size); + scratch = (bfd_byte *) bfd_zmalloc (final_size); + dup_contents = (bfd_byte *) bfd_zmalloc (final_size); + +@@ -9618,8 +9695,8 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + print_action_list (stderr, &relax_info->action_list); + #endif + +- for (action = relax_info->action_list.head; action; +- action = action->next) ++ for (action = action_first (&relax_info->action_list); action; ++ action = action_next (&relax_info->action_list, action)) + { + virtual_action = FALSE; + if (action->offset > orig_dot) +@@ -9748,7 +9825,6 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) + break; + } + +- removed += action->removed_bytes; + BFD_ASSERT (dup_dot <= final_size); + BFD_ASSERT (orig_dot <= orig_size); + } +-- +1.8.1.4 + diff --git a/package/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch b/package/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch new file mode 100644 index 0000000000..043ff4df1e --- /dev/null +++ b/package/binutils/2.25.1/910-xtensa-optimize-trampolines-relaxation.patch @@ -0,0 +1,345 @@ +From cbe53e134d4c3a656880a906738ce19fdcd38e8b Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 1 May 2015 11:39:12 +0300 +Subject: [PATCH] xtensa: optimize trampolines relaxation + +Currently every fixup in the current segment is checked when relaxing +trampoline frag. This is very expensive. Make a searchable array of +fixups pointing at potentially oversized jumps at the beginning of every +relaxation pass and only check subset of this cache in the reach of +single jump from the trampoline frag currently being relaxed. + +Original profile: + +% time self children called name +----------------------------------------- + 370.16 593.38 12283048/12283048 relax_segment + 98.4 370.16 593.38 12283048 xtensa_relax_frag + 58.91 269.26 2691463834/2699602236 xtensa_insnbuf_from_chars + 68.35 68.17 811266668/813338977 S_GET_VALUE + 36.85 29.51 2684369246/2685538060 xtensa_opcode_decode + 28.34 8.84 2684369246/2685538060 xtensa_format_get_slot + 12.39 5.94 2691463834/2699775044 xtensa_format_decode + 0.03 4.60 4101109/4101109 relax_frag_for_align + 0.18 1.76 994617/994617 relax_frag_immed + 0.07 0.09 24556277/24851220 new_logical_line + 0.06 0.00 12283048/14067410 as_where + 0.04 0.00 7094588/15460506 xtensa_format_num_slots + 0.00 0.00 1/712477 xtensa_insnbuf_alloc +----------------------------------------- + +Same data, after optimization: + +% time self children called name +----------------------------------------- + 0.51 7.47 12283048/12283048 relax_segment + 58.0 0.51 7.47 12283048 xtensa_relax_frag + 0.02 4.08 4101109/4101109 relax_frag_for_align + 0.18 1.39 994617/994617 relax_frag_immed + 0.01 0.98 555/555 xtensa_cache_relaxable_fixups + 0.21 0.25 7094588/16693271 xtensa_insnbuf_from_chars + 0.06 0.12 24556277/24851220 new_logical_line + 0.06 0.00 7094588/15460506 xtensa_format_num_slots + 0.02 0.04 7094588/16866079 xtensa_format_decode + 0.05 0.00 12283048/14067410 as_where + 0.00 0.00 1/712477 xtensa_insnbuf_alloc + 0.00 0.00 93808/93808 xtensa_find_first_cached_fixup +----------------------------------------- + +2015-05-02 Max Filippov +gas/ + * config/tc-xtensa.c (cached_fixupS, fixup_cacheS): New typedefs. + (struct cached_fixup, struct fixup_cache): New structures. + (fixup_order, xtensa_make_cached_fixup), + (xtensa_realloc_fixup_cache, xtensa_cache_relaxable_fixups), + (xtensa_find_first_cached_fixup, xtensa_delete_cached_fixup), + (xtensa_add_cached_fixup): New functions. + (xtensa_relax_frag): Cache fixups pointing at potentially + oversized jumps at the beginning of every relaxation pass. Only + check subset of this cache in the reach of single jump from the + trampoline frag currently being relaxed. + +Signed-off-by: Max Filippov +--- +Backported from: b76f99d702c3501ac320396ea06bc7f9237173c3 +Changes to ChangeLog are dropped. + + gas/config/tc-xtensa.c | 220 +++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 194 insertions(+), 26 deletions(-) + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 3e85b69..31c0b6b 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -8785,6 +8785,154 @@ static long relax_frag_for_align (fragS *, long); + static long relax_frag_immed + (segT, fragS *, long, int, xtensa_format, int, int *, bfd_boolean); + ++typedef struct cached_fixup cached_fixupS; ++struct cached_fixup ++{ ++ int addr; ++ int target; ++ int delta; ++ fixS *fixP; ++}; ++ ++typedef struct fixup_cache fixup_cacheS; ++struct fixup_cache ++{ ++ cached_fixupS *fixups; ++ unsigned n_fixups; ++ unsigned n_max; ++ ++ segT seg; ++ fragS *first_frag; ++}; ++ ++static int fixup_order (const void *a, const void *b) ++{ ++ const cached_fixupS *pa = a; ++ const cached_fixupS *pb = b; ++ ++ if (pa->addr == pb->addr) ++ { ++ if (pa->target == pb->target) ++ { ++ if (pa->fixP->fx_r_type == pb->fixP->fx_r_type) ++ return 0; ++ return pa->fixP->fx_r_type < pb->fixP->fx_r_type ? -1 : 1; ++ } ++ return pa->target - pb->target; ++ } ++ return pa->addr - pb->addr; ++} ++ ++static bfd_boolean xtensa_make_cached_fixup (cached_fixupS *o, fixS *fixP) ++{ ++ xtensa_isa isa = xtensa_default_isa; ++ int addr = fixP->fx_frag->fr_address; ++ int target; ++ int delta; ++ symbolS *s = fixP->fx_addsy; ++ int slot; ++ xtensa_format fmt; ++ xtensa_opcode opcode; ++ ++ if (fixP->fx_r_type < BFD_RELOC_XTENSA_SLOT0_OP || ++ fixP->fx_r_type > BFD_RELOC_XTENSA_SLOT14_OP) ++ return FALSE; ++ target = S_GET_VALUE (s); ++ delta = target - addr; ++ ++ if (abs(delta) < J_RANGE / 2) ++ return FALSE; ++ ++ xtensa_insnbuf_from_chars (isa, trampoline_buf, ++ (unsigned char *) fixP->fx_frag->fr_literal + ++ fixP->fx_where, 0); ++ fmt = xtensa_format_decode (isa, trampoline_buf); ++ gas_assert (fmt != XTENSA_UNDEFINED); ++ slot = fixP->tc_fix_data.slot; ++ xtensa_format_get_slot (isa, fmt, slot, trampoline_buf, trampoline_slotbuf); ++ opcode = xtensa_opcode_decode (isa, fmt, slot, trampoline_slotbuf); ++ if (opcode != xtensa_j_opcode) ++ return FALSE; ++ ++ o->addr = addr; ++ o->target = target; ++ o->delta = delta; ++ o->fixP = fixP; ++ ++ return TRUE; ++} ++ ++static void xtensa_realloc_fixup_cache (fixup_cacheS *cache, unsigned add) ++{ ++ if (cache->n_fixups + add > cache->n_max) ++ { ++ cache->n_max = (cache->n_fixups + add) * 2; ++ cache->fixups = xrealloc (cache->fixups, ++ sizeof (*cache->fixups) * cache->n_max); ++ } ++} ++ ++static void xtensa_cache_relaxable_fixups (fixup_cacheS *cache, ++ segment_info_type *seginfo) ++{ ++ fixS *fixP; ++ ++ cache->n_fixups = 0; ++ ++ for (fixP = seginfo->fix_root; fixP ; fixP = fixP->fx_next) ++ { ++ xtensa_realloc_fixup_cache (cache, 1); ++ ++ if (xtensa_make_cached_fixup (cache->fixups + cache->n_fixups, fixP)) ++ ++cache->n_fixups; ++ } ++ qsort (cache->fixups, cache->n_fixups, sizeof (*cache->fixups), fixup_order); ++} ++ ++static unsigned xtensa_find_first_cached_fixup (const fixup_cacheS *cache, ++ int addr) ++{ ++ unsigned a = 0; ++ unsigned b = cache->n_fixups; ++ ++ while (b - a > 1) ++ { ++ unsigned c = (a + b) / 2; ++ ++ if (cache->fixups[c].addr < addr) ++ a = c; ++ else ++ b = c; ++ } ++ return a; ++} ++ ++static void xtensa_delete_cached_fixup (fixup_cacheS *cache, unsigned i) ++{ ++ memmove (cache->fixups + i, cache->fixups + i + 1, ++ (cache->n_fixups - i - 1) * sizeof (*cache->fixups)); ++ --cache->n_fixups; ++} ++ ++static bfd_boolean xtensa_add_cached_fixup (fixup_cacheS *cache, fixS *fixP) ++{ ++ cached_fixupS o; ++ unsigned i; ++ ++ if (!xtensa_make_cached_fixup (&o, fixP)) ++ return FALSE; ++ xtensa_realloc_fixup_cache (cache, 1); ++ i = xtensa_find_first_cached_fixup (cache, o.addr); ++ if (i < cache->n_fixups) ++ { ++ ++i; ++ memmove (cache->fixups + i + 1, cache->fixups + i, ++ (cache->n_fixups - i) * sizeof (*cache->fixups)); ++ } ++ cache->fixups[i] = o; ++ ++cache->n_fixups; ++ return TRUE; ++} + + /* Return the number of bytes added to this fragment, given that the + input has been stretched already by "stretch". */ +@@ -8896,35 +9044,42 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) + case RELAX_TRAMPOLINE: + if (fragP->tc_frag_data.relax_seen) + { +- segment_info_type *seginfo = seg_info (now_seg); +- fragS *fP; /* The out-of-range jump. */ +- fixS *fixP; ++ static fixup_cacheS fixup_cache; ++ segment_info_type *seginfo = seg_info (now_seg); ++ int trampaddr = fragP->fr_address + fragP->fr_fix; ++ int searchaddr = trampaddr < J_RANGE ? 0 : trampaddr - J_RANGE; ++ unsigned i; ++ ++ if (now_seg != fixup_cache.seg || ++ fragP == fixup_cache.first_frag || ++ fixup_cache.first_frag == NULL) ++ { ++ xtensa_cache_relaxable_fixups (&fixup_cache, seginfo); ++ fixup_cache.seg = now_seg; ++ fixup_cache.first_frag = fragP; ++ } + + /* Scan for jumps that will not reach. */ +- for (fixP = seginfo->fix_root; fixP ; fixP = fixP->fx_next) ++ for (i = xtensa_find_first_cached_fixup (&fixup_cache, searchaddr); ++ i < fixup_cache.n_fixups; ++i) ++ + { +- symbolS *s = fixP->fx_addsy; +- xtensa_opcode opcode; +- int target; +- int addr; +- int delta; +- +- if (fixP->fx_r_type < BFD_RELOC_XTENSA_SLOT0_OP || +- fixP->fx_r_type > BFD_RELOC_XTENSA_SLOT14_OP) +- continue; +- xtensa_insnbuf_from_chars (isa, trampoline_buf, +- (unsigned char *) fixP->fx_frag->fr_literal + fixP->fx_where, +- 0); +- fmt = xtensa_format_decode (isa, trampoline_buf); +- gas_assert (fmt != XTENSA_UNDEFINED); +- slot = fixP->tc_fix_data.slot; +- xtensa_format_get_slot (isa, fmt, slot, trampoline_buf, trampoline_slotbuf); +- opcode = xtensa_opcode_decode (isa, fmt, slot, trampoline_slotbuf); +- if (opcode != xtensa_j_opcode) ++ fixS *fixP = fixup_cache.fixups[i].fixP; ++ int target = fixup_cache.fixups[i].target; ++ int addr = fixup_cache.fixups[i].addr; ++ int delta = fixup_cache.fixups[i].delta + stretch; ++ ++ trampaddr = fragP->fr_address + fragP->fr_fix; ++ ++ if (addr + J_RANGE < trampaddr) + continue; +- target = S_GET_VALUE (s); +- addr = fixP->fx_frag->fr_address; +- delta = target - addr + stretch; ++ if (addr > trampaddr + J_RANGE) ++ break; ++ if (abs (delta) < J_RANGE) ++ continue; ++ ++ slot = fixP->tc_fix_data.slot; ++ + if (delta > J_RANGE || delta < -1 * J_RANGE) + { /* Found an out-of-range jump; scan the list of trampolines for the best match. */ + struct trampoline_seg *ts = find_trampoline_seg (now_seg); +@@ -8978,14 +9133,13 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) + } + if (tf->fragP == fragP) + { +- int trampaddr = fragP->fr_address + fragP->fr_fix; +- + if (abs (addr - trampaddr) < J_RANGE) + { /* The trampoline is in range of original; fix it! */ + fixS *newfixP; + int offset; + TInsn insn; + symbolS *lsym; ++ fragS *fP; /* The out-of-range jump. */ + + new_stretch += init_trampoline_frag (tf); + offset = fragP->fr_fix; /* Where to assemble the j insn. */ +@@ -9009,10 +9163,20 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) + newfixP->tc_fix_data.X_add_symbol = lsym; + newfixP->tc_fix_data.X_add_number = offset; + newfixP->tc_fix_data.slot = slot; ++ ++ xtensa_delete_cached_fixup (&fixup_cache, i); ++ xtensa_add_cached_fixup (&fixup_cache, newfixP); ++ + /* Move the fix-up from the original j insn to this one. */ + fixP->fx_frag = fragP; + fixP->fx_where = fragP->fr_fix - 3; + fixP->tc_fix_data.slot = 0; ++ ++ xtensa_add_cached_fixup (&fixup_cache, fixP); ++ ++ /* re-do current fixup */ ++ --i; ++ + /* Adjust the jump around this trampoline (if present). */ + if (tf->fixP != NULL) + { +@@ -9027,6 +9191,8 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) + fragP->fr_subtype = 0; + /* Remove from the trampoline_list. */ + prev->next = tf->next; ++ if (fragP == fixup_cache.first_frag) ++ fixup_cache.first_frag = NULL; + break; + } + } +-- +1.8.1.4 + diff --git a/package/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch b/package/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch new file mode 100644 index 0000000000..9ad6b3be05 --- /dev/null +++ b/package/binutils/2.25.1/911-xtensa-fix-localized-symbol-refcounting-with-gc-sect.patch @@ -0,0 +1,57 @@ +From 8ec76b16f62d1bf386fb2c39af5f66c3afddc5cb Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 14 May 2015 05:22:55 +0300 +Subject: [PATCH] xtensa: fix localized symbol refcounting with --gc-sections + +elf_xtensa_gc_sweep_hook doesn't correctly unreference symbols that were +made local, that results in link failure with the following message: + + BFD (GNU Binutils) 2.24 internal error, aborting at elf32-xtensa.c line + 3372 in elf_xtensa_finish_dynamic_sections + +elf_xtensa_gc_sweep_hook determines symbol reference type (PLT or GOT) by +relocation type. Relocation types are not changed when symbol becomes +local, but its PLT references are added to GOT references and +plt.refcount is set to 0. Such symbol cannot be unreferences in the +elf_xtensa_gc_sweep_hook and its extra references make calculated GOT +relocations section size not match number of GOT relocations. + +Fix it by treating PLT reference as GOT reference when plt.refcount is +not positive. + +2015-05-14 Max Filippov +bfd/ + * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Treat PLT reference + as GOT reference when plt.refcount is not positive. + +Signed-off-by: Max Filippov +--- +Backported from: e6c9a083ec5ae7a45bd71682b26aae1939849388 +Changes to ChangeLog are dropped. + + bfd/elf32-xtensa.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c +index 53af1c6..2523670 100644 +--- a/bfd/elf32-xtensa.c ++++ b/bfd/elf32-xtensa.c +@@ -1360,10 +1360,14 @@ elf_xtensa_gc_sweep_hook (bfd *abfd, + { + if (is_plt) + { ++ /* If the symbol has been localized its plt.refcount got moved ++ to got.refcount. Handle it as GOT. */ + if (h->plt.refcount > 0) + h->plt.refcount--; ++ else ++ is_got = TRUE; + } +- else if (is_got) ++ if (is_got) + { + if (h->got.refcount > 0) + h->got.refcount--; +-- +1.8.1.4 + diff --git a/package/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch b/package/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch new file mode 100644 index 0000000000..4a3de2c839 --- /dev/null +++ b/package/binutils/2.25.1/912-xtensa-fix-gas-segfault-with-text-section-literals.patch @@ -0,0 +1,56 @@ +From 2d0522e76e4afeeb2e104e0a4332d94fa0d2fbf6 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sun, 17 May 2015 06:46:15 +0300 +Subject: [PATCH] xtensa: fix gas segfault with --text-section-literals + +When --text-section-literals is used and code in the .init or .fini +emits literal in the absence of .literal_position, xtensa_move_literals +segfaults. + +Check that search_frag is non-NULL in the xtensa_move_literals and +report error otherwise. + +2015-05-26 Max Filippov +gas/ + * config/tc-xtensa.c (xtensa_move_literals): Check that + search_frag is non-NULL. Report error if literal frag is not + found. + +Signed-off-by: Max Filippov +--- +Backported from: 4de0562a4c69fef4952aa7e19d7bda359f02e8b4 +Changes to ChangeLog are dropped. + + gas/config/tc-xtensa.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 31c0b6b..18307c1 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -10808,13 +10808,21 @@ xtensa_move_literals (void) + frchain_to = NULL; + frag_splice = &(frchain_from->frch_root); + +- while (!search_frag->tc_frag_data.literal_frag) ++ while (search_frag && !search_frag->tc_frag_data.literal_frag) + { + gas_assert (search_frag->fr_fix == 0 + || search_frag->fr_type == rs_align); + search_frag = search_frag->fr_next; + } + ++ if (!search_frag) ++ { ++ search_frag = frchain_from->frch_root; ++ as_bad_where (search_frag->fr_file, search_frag->fr_line, ++ _("literal pool location required for text-section-literals; specify with .literal_position")); ++ continue; ++ } ++ + gas_assert (search_frag->tc_frag_data.literal_frag->fr_subtype + == RELAX_LITERAL_POOL_BEGIN); + xtensa_switch_section_emit_state (&state, segment->seg, 0); +-- +1.8.1.4 + diff --git a/package/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch b/package/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch new file mode 100644 index 0000000000..3ed9af1283 --- /dev/null +++ b/package/binutils/2.25.1/913-xtensa-add-auto-litpools-option.patch @@ -0,0 +1,699 @@ +From 978adaaa4cd3921842e2be8a31c05f081fb17fcf Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Wed, 29 Jul 2015 17:42:54 +0300 +Subject: [PATCH] xtensa: add --auto-litpools option + +Auto-litpools is the automated version of text-section-literals: literal +pool candidate frags are planted every N frags and during relaxation +they are turned into actual literal pools where literals are moved to +become reachable for their first reference by L32R instruction. + +2015-08-12 David Weatherford +gas/ + * config/tc-xtensa.c (struct litpool_frag, struct litpool_seg): + New structures. + (xtensa_maybe_create_literal_pool_frag): New function. + (litpool_seg_list, auto_litpools, auto_litpool_limit) + (litpool_buf, litpool_slotbuf): New static variables. + (option_auto_litpools, option_no_auto_litpools) + (option_auto_litpool_limit): New enum identifiers. + (md_longopts): Add entries for auto-litpools, no-auto-litpools + and auto-litpool-limit. + (md_parse_option): Handle option_auto_litpools, + option_no_auto_litpools and option_auto_litpool_limit. + (md_show_usage): Add help for --[no-]auto-litpools and + --auto-litpool-limit. + (xtensa_mark_literal_pool_location): Record a place for literal + pool with a call to xtensa_maybe_create_literal_pool_frag. + (get_literal_pool_location): Find highest priority literal pool + or convert candidate to literal pool when auto-litpools are used. + (xg_assemble_vliw_tokens): Create literal pool after jump + instruction. + (xtensa_check_frag_count): Create candidate literal pool every + auto_litpool_limit frags. + (xtensa_relax_frag): Add jump around literals to non-empty + literal pool. + (xtensa_move_literals): Estimate literal pool addresses and move + unreachable literals closer to their users, converting candidate + to literal pool if needed. + (xtensa_switch_to_non_abs_literal_fragment): Only emit error + about missing .literal_position in case auto-litpools are not + used. + * config/tc-xtensa.h (xtensa_relax_statesE): New relaxation + state: RELAX_LITERAL_POOL_CANDIDATE_BEGIN. + +2015-08-12 Max Filippov +gas/testsuite/ + * gas/xtensa/all.exp: Add auto-litpools to the list of xtensa + tests. + * gas/xtensa/auto-litpools.s: New file: auto-litpools test. + * gas/xtensa/auto-litpools.s: New file: auto-litpools test + result pattern. + +Signed-off-by: Max Filippov +--- +Backported from: b46824bd49648c575372e6d9bc6a6defeabd6ed5 +Changes to ChangeLogs and documentation are dropped. + + gas/config/tc-xtensa.c | 432 ++++++++++++++++++++++++++++++- + gas/config/tc-xtensa.h | 1 + + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/auto-litpools.d | 12 + + gas/testsuite/gas/xtensa/auto-litpools.s | 13 + + 5 files changed, 454 insertions(+), 5 deletions(-) + create mode 100644 gas/testsuite/gas/xtensa/auto-litpools.d + create mode 100644 gas/testsuite/gas/xtensa/auto-litpools.s + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 7311a05..b8b1e7d 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -440,6 +440,29 @@ bfd_boolean directive_state[] = + #endif + }; + ++/* A circular list of all potential and actual literal pool locations ++ in a segment. */ ++struct litpool_frag ++{ ++ struct litpool_frag *next; ++ struct litpool_frag *prev; ++ fragS *fragP; ++ addressT addr; ++ short priority; /* 1, 2, or 3 -- 1 is highest */ ++ short original_priority; ++}; ++ ++/* Map a segment to its litpool_frag list. */ ++struct litpool_seg ++{ ++ struct litpool_seg *next; ++ asection *seg; ++ struct litpool_frag frag_list; ++ int frag_count; /* since last litpool location */ ++}; ++ ++static struct litpool_seg litpool_seg_list; ++ + + /* Directive functions. */ + +@@ -474,6 +497,9 @@ static void xtensa_create_trampoline_frag (bfd_boolean); + static void xtensa_maybe_create_trampoline_frag (void); + struct trampoline_frag; + static int init_trampoline_frag (struct trampoline_frag *); ++static void xtensa_maybe_create_literal_pool_frag (bfd_boolean, bfd_boolean); ++static bfd_boolean auto_litpools = FALSE; ++static int auto_litpool_limit = 10000; + + /* Alignment Functions. */ + +@@ -698,6 +724,10 @@ enum + + option_trampolines, + option_no_trampolines, ++ ++ option_auto_litpools, ++ option_no_auto_litpools, ++ option_auto_litpool_limit, + }; + + const char *md_shortopts = ""; +@@ -773,6 +803,10 @@ struct option md_longopts[] = + { "trampolines", no_argument, NULL, option_trampolines }, + { "no-trampolines", no_argument, NULL, option_no_trampolines }, + ++ { "auto-litpools", no_argument, NULL, option_auto_litpools }, ++ { "no-auto-litpools", no_argument, NULL, option_no_auto_litpools }, ++ { "auto-litpool-limit", required_argument, NULL, option_auto_litpool_limit }, ++ + { NULL, no_argument, NULL, 0 } + }; + +@@ -961,6 +995,34 @@ md_parse_option (int c, char *arg) + use_trampolines = FALSE; + return 1; + ++ case option_auto_litpools: ++ auto_litpools = TRUE; ++ use_literal_section = FALSE; ++ return 1; ++ ++ case option_no_auto_litpools: ++ auto_litpools = FALSE; ++ auto_litpool_limit = -1; ++ return 1; ++ ++ case option_auto_litpool_limit: ++ { ++ int value = 0; ++ if (auto_litpool_limit < 0) ++ as_fatal (_("no-auto-litpools is incompatible with auto-litpool-limit")); ++ if (*arg == 0 || *arg == '-') ++ as_fatal (_("invalid auto-litpool-limit argument")); ++ value = strtol (arg, &arg, 10); ++ if (*arg != 0) ++ as_fatal (_("invalid auto-litpool-limit argument")); ++ if (value < 100 || value > 10000) ++ as_fatal (_("invalid auto-litpool-limit argument (range is 100-10000)")); ++ auto_litpool_limit = value; ++ auto_litpools = TRUE; ++ use_literal_section = FALSE; ++ return 1; ++ } ++ + default: + return 0; + } +@@ -986,7 +1048,12 @@ Xtensa options:\n\ + flix bundles\n\ + --rename-section old=new Rename section 'old' to 'new'\n\ + --[no-]trampolines [Do not] generate trampolines (jumps to jumps)\n\ +- when jumps do not reach their targets\n", stream); ++ when jumps do not reach their targets\n\ ++ --[no-]auto-litpools [Do not] automatically create literal pools\n\ ++ --auto-litpool-limit=\n\ ++ (range 100-10000) Maximum number of blocks of\n\ ++ instructions to emit between literal pool\n\ ++ locations; implies --auto-litpools flag\n", stream); + } + + +@@ -4728,6 +4795,8 @@ xtensa_mark_literal_pool_location (void) + pool_location = frag_now; + frag_now->tc_frag_data.lit_frchain = frchain_now; + frag_now->tc_frag_data.literal_frag = frag_now; ++ /* Just record this frag. */ ++ xtensa_maybe_create_literal_pool_frag (FALSE, FALSE); + frag_variant (rs_machine_dependent, 0, 0, + RELAX_LITERAL_POOL_BEGIN, NULL, 0, NULL); + xtensa_set_frag_assembly_state (frag_now); +@@ -4832,6 +4901,31 @@ get_expanded_loop_offset (xtensa_opcode opcode) + static fragS * + get_literal_pool_location (segT seg) + { ++ struct litpool_seg *lps = litpool_seg_list.next; ++ struct litpool_frag *lpf; ++ for ( ; lps && lps->seg->id != seg->id; lps = lps->next) ++ ; ++ if (lps) ++ { ++ for (lpf = lps->frag_list.prev; lpf->fragP; lpf = lpf->prev) ++ { /* Skip "candidates" for now. */ ++ if (lpf->fragP->fr_subtype == RELAX_LITERAL_POOL_BEGIN && ++ lpf->priority == 1) ++ return lpf->fragP; ++ } ++ /* Must convert a lower-priority pool. */ ++ for (lpf = lps->frag_list.prev; lpf->fragP; lpf = lpf->prev) ++ { ++ if (lpf->fragP->fr_subtype == RELAX_LITERAL_POOL_BEGIN) ++ return lpf->fragP; ++ } ++ /* Still no match -- try for a low priority pool. */ ++ for (lpf = lps->frag_list.prev; lpf->fragP; lpf = lpf->prev) ++ { ++ if (lpf->fragP->fr_subtype == RELAX_LITERAL_POOL_CANDIDATE_BEGIN) ++ return lpf->fragP; ++ } ++ } + return seg_info (seg)->tc_segment_info_data.literal_pool_loc; + } + +@@ -7098,6 +7192,11 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn) + frag_now->tc_frag_data.slot_symbols[slot] = tinsn->symbol; + frag_now->tc_frag_data.slot_offsets[slot] = tinsn->offset; + frag_now->tc_frag_data.literal_frags[slot] = tinsn->literal_frag; ++ if (tinsn->opcode == xtensa_l32r_opcode) ++ { ++ frag_now->tc_frag_data.literal_frags[slot] = ++ tinsn->tok[1].X_add_symbol->sy_frag; ++ } + if (tinsn->literal_space != 0) + xg_assemble_literal_space (tinsn->literal_space, slot); + frag_now->tc_frag_data.free_reg[slot] = tinsn->extra_arg; +@@ -7170,6 +7269,8 @@ xg_assemble_vliw_tokens (vliw_insn *vinsn) + frag_now->fr_symbol, frag_now->fr_offset, NULL); + xtensa_set_frag_assembly_state (frag_now); + xtensa_maybe_create_trampoline_frag (); ++ /* Always create one here. */ ++ xtensa_maybe_create_literal_pool_frag (TRUE, FALSE); + } + else if (is_branch && do_align_targets ()) + { +@@ -7314,11 +7415,18 @@ xtensa_check_frag_count (void) + clear_frag_count (); + unreachable_count = 0; + } ++ ++ /* We create an area for a possible literal pool every N (default 5000) ++ frags or so. */ ++ xtensa_maybe_create_literal_pool_frag (TRUE, TRUE); + } + + static xtensa_insnbuf trampoline_buf = NULL; + static xtensa_insnbuf trampoline_slotbuf = NULL; + ++static xtensa_insnbuf litpool_buf = NULL; ++static xtensa_insnbuf litpool_slotbuf = NULL; ++ + #define TRAMPOLINE_FRAG_SIZE 3000 + + static void +@@ -7410,6 +7518,135 @@ dump_trampolines (void) + } + } + ++static void dump_litpools (void) __attribute__ ((unused)); ++ ++static void ++dump_litpools (void) ++{ ++ struct litpool_seg *lps = litpool_seg_list.next; ++ struct litpool_frag *lpf; ++ ++ for ( ; lps ; lps = lps->next ) ++ { ++ printf("litpool seg %s\n", lps->seg->name); ++ for ( lpf = lps->frag_list.next; lpf->fragP; lpf = lpf->next ) ++ { ++ fragS *litfrag = lpf->fragP->fr_next; ++ int count = 0; ++ while (litfrag && litfrag->fr_subtype != RELAX_LITERAL_POOL_END) ++ { ++ if (litfrag->fr_fix == 4) ++ count++; ++ litfrag = litfrag->fr_next; ++ } ++ printf(" %ld <%d:%d> (%d) [%d]: ", ++ lpf->addr, lpf->priority, lpf->original_priority, ++ lpf->fragP->fr_line, count); ++ //dump_frag(lpf->fragP); ++ } ++ } ++} ++ ++static void ++xtensa_maybe_create_literal_pool_frag (bfd_boolean create, ++ bfd_boolean only_if_needed) ++{ ++ struct litpool_seg *lps = litpool_seg_list.next; ++ fragS *fragP; ++ struct litpool_frag *lpf; ++ bfd_boolean needed = FALSE; ++ ++ if (use_literal_section || !auto_litpools) ++ return; ++ ++ for ( ; lps ; lps = lps->next ) ++ { ++ if (lps->seg == now_seg) ++ break; ++ } ++ ++ if (lps == NULL) ++ { ++ lps = (struct litpool_seg *)xcalloc (sizeof (struct litpool_seg), 1); ++ lps->next = litpool_seg_list.next; ++ litpool_seg_list.next = lps; ++ lps->seg = now_seg; ++ lps->frag_list.next = &lps->frag_list; ++ lps->frag_list.prev = &lps->frag_list; ++ } ++ ++ lps->frag_count++; ++ ++ if (create) ++ { ++ if (only_if_needed) ++ { ++ if (past_xtensa_end || !use_transform() || ++ frag_now->tc_frag_data.is_no_transform) ++ { ++ return; ++ } ++ if (auto_litpool_limit <= 0) ++ { ++ /* Don't create a litpool based only on frag count. */ ++ return; ++ } ++ else if (lps->frag_count > auto_litpool_limit) ++ { ++ needed = TRUE; ++ } ++ else ++ { ++ return; ++ } ++ } ++ else ++ { ++ needed = TRUE; ++ } ++ } ++ ++ if (needed) ++ { ++ int size = (only_if_needed) ? 3 : 0; /* Space for a "j" insn. */ ++ /* Create a potential site for a literal pool. */ ++ frag_wane (frag_now); ++ frag_new (0); ++ xtensa_set_frag_assembly_state (frag_now); ++ fragP = frag_now; ++ fragP->tc_frag_data.lit_frchain = frchain_now; ++ fragP->tc_frag_data.literal_frag = fragP; ++ frag_var (rs_machine_dependent, size, size, ++ (only_if_needed) ? ++ RELAX_LITERAL_POOL_CANDIDATE_BEGIN : ++ RELAX_LITERAL_POOL_BEGIN, ++ NULL, 0, NULL); ++ frag_now->tc_frag_data.lit_seg = now_seg; ++ frag_variant (rs_machine_dependent, 0, 0, ++ RELAX_LITERAL_POOL_END, NULL, 0, NULL); ++ xtensa_set_frag_assembly_state (frag_now); ++ } ++ else ++ { ++ /* RELAX_LITERAL_POOL_BEGIN frag is being created; ++ just record it here. */ ++ fragP = frag_now; ++ } ++ ++ lpf = (struct litpool_frag *)xmalloc(sizeof (struct litpool_frag)); ++ /* Insert at tail of circular list. */ ++ lpf->addr = 0; ++ lps->frag_list.prev->next = lpf; ++ lpf->next = &lps->frag_list; ++ lpf->prev = lps->frag_list.prev; ++ lps->frag_list.prev = lpf; ++ lpf->fragP = fragP; ++ lpf->priority = (needed) ? (only_if_needed) ? 3 : 2 : 1; ++ lpf->original_priority = lpf->priority; ++ ++ lps->frag_count = 0; ++} ++ + static void + xtensa_cleanup_align_frags (void) + { +@@ -9029,7 +9266,41 @@ xtensa_relax_frag (fragS *fragP, long stretch, int *stretched_p) + break; + + case RELAX_LITERAL_POOL_BEGIN: ++ if (fragP->fr_var != 0) ++ { ++ /* We have a converted "candidate" literal pool; ++ assemble a jump around it. */ ++ TInsn insn; ++ if (!litpool_slotbuf) ++ { ++ litpool_buf = xtensa_insnbuf_alloc (isa); ++ litpool_slotbuf = xtensa_insnbuf_alloc (isa); ++ } ++ new_stretch += 3; ++ fragP->tc_frag_data.relax_seen = FALSE; /* Need another pass. */ ++ fragP->tc_frag_data.is_insn = TRUE; ++ tinsn_init (&insn); ++ insn.insn_type = ITYPE_INSN; ++ insn.opcode = xtensa_j_opcode; ++ insn.ntok = 1; ++ set_expr_symbol_offset (&insn.tok[0], fragP->fr_symbol, ++ fragP->fr_fix); ++ fmt = xg_get_single_format (xtensa_j_opcode); ++ tinsn_to_slotbuf (fmt, 0, &insn, litpool_slotbuf); ++ xtensa_format_set_slot (isa, fmt, 0, litpool_buf, litpool_slotbuf); ++ xtensa_insnbuf_to_chars (isa, litpool_buf, ++ (unsigned char *)fragP->fr_literal + ++ fragP->fr_fix, 3); ++ fragP->fr_fix += 3; ++ fragP->fr_var -= 3; ++ /* Add a fix-up. */ ++ fix_new (fragP, 0, 3, fragP->fr_symbol, 0, TRUE, ++ BFD_RELOC_XTENSA_SLOT0_OP); ++ } ++ break; ++ + case RELAX_LITERAL_POOL_END: ++ case RELAX_LITERAL_POOL_CANDIDATE_BEGIN: + case RELAX_MAYBE_UNREACHABLE: + case RELAX_MAYBE_DESIRE_ALIGN: + /* No relaxation required. */ +@@ -10789,12 +11060,115 @@ xtensa_move_literals (void) + segT dest_seg; + fixS *fix, *next_fix, **fix_splice; + sym_list *lit; ++ struct litpool_seg *lps; + + mark_literal_frags (literal_head->next); + + if (use_literal_section) + return; + ++ /* Assign addresses (rough estimates) to the potential literal pool locations ++ and create new ones if the gaps are too large. */ ++ ++ for (lps = litpool_seg_list.next; lps; lps = lps->next) ++ { ++ frchainS *frchP = seg_info (lps->seg)->frchainP; ++ struct litpool_frag *lpf = lps->frag_list.next; ++ addressT addr = 0; ++ ++ for ( ; frchP; frchP = frchP->frch_next) ++ { ++ fragS *fragP; ++ for (fragP = frchP->frch_root; fragP; fragP = fragP->fr_next) ++ { ++ if (lpf && fragP == lpf->fragP) ++ { ++ gas_assert(fragP->fr_type == rs_machine_dependent && ++ (fragP->fr_subtype == RELAX_LITERAL_POOL_BEGIN || ++ fragP->fr_subtype == RELAX_LITERAL_POOL_CANDIDATE_BEGIN)); ++ /* Found a litpool location. */ ++ lpf->addr = addr; ++ lpf = lpf->next; ++ } ++ if (fragP->fr_type == rs_machine_dependent && ++ fragP->fr_subtype == RELAX_SLOTS) ++ { ++ int slot; ++ for (slot = 0; slot < MAX_SLOTS; slot++) ++ { ++ if (fragP->tc_frag_data.literal_frags[slot]) ++ { ++ /* L32R; point its literal to the nearest litpool ++ preferring non-"candidate" positions to avoid ++ the jump-around. */ ++ fragS *litfrag = fragP->tc_frag_data.literal_frags[slot]; ++ struct litpool_frag *lp = lpf->prev; ++ if (!lp->fragP) ++ { ++ break; ++ } ++ while (lp->fragP->fr_subtype == ++ RELAX_LITERAL_POOL_CANDIDATE_BEGIN) ++ { ++ lp = lp->prev; ++ if (lp->fragP == NULL) ++ { ++ /* End of list; have to bite the bullet. ++ Take the nearest. */ ++ lp = lpf->prev; ++ break; ++ } ++ /* Does it (conservatively) reach? */ ++ if (addr - lp->addr <= 128 * 1024) ++ { ++ if (lp->fragP->fr_subtype == RELAX_LITERAL_POOL_BEGIN) ++ { ++ /* Found a good one. */ ++ break; ++ } ++ else if (lp->prev->fragP && ++ addr - lp->prev->addr > 128 * 1024) ++ { ++ /* This is still a "candidate" but the next one ++ will be too far away, so revert to the nearest ++ one, convert it and add the jump around. */ ++ fragS *poolbeg; ++ fragS *poolend; ++ symbolS *lsym; ++ char label[10 + 2 * sizeof (fragS *)]; ++ lp = lpf->prev; ++ poolbeg = lp->fragP; ++ lp->priority = 1; ++ poolbeg->fr_subtype = RELAX_LITERAL_POOL_BEGIN; ++ poolend = poolbeg->fr_next; ++ gas_assert (poolend->fr_type == rs_machine_dependent && ++ poolend->fr_subtype == RELAX_LITERAL_POOL_END); ++ /* Create a local symbol pointing to the ++ end of the pool. */ ++ sprintf (label, ".L0_LT_%p", poolbeg); ++ lsym = (symbolS *)local_symbol_make (label, lps->seg, ++ 0, poolend); ++ poolbeg->fr_symbol = lsym; ++ /* Rest is done in xtensa_relax_frag. */ ++ } ++ } ++ } ++ if (! litfrag->tc_frag_data.literal_frag) ++ { ++ /* Take earliest use of this literal to avoid ++ forward refs. */ ++ litfrag->tc_frag_data.literal_frag = lp->fragP; ++ } ++ } ++ } ++ } ++ addr += fragP->fr_fix; ++ if (fragP->fr_type == rs_fill) ++ addr += fragP->fr_offset; ++ } ++ } ++ } ++ + for (segment = literal_head->next; segment; segment = segment->next) + { + /* Keep the literals for .init and .fini in separate sections. */ +@@ -10839,9 +11213,6 @@ xtensa_move_literals (void) + while (search_frag != frag_now) + { + next_frag = search_frag->fr_next; +- +- /* First, move the frag out of the literal section and +- to the appropriate place. */ + if (search_frag->tc_frag_data.literal_frag) + { + literal_pool = search_frag->tc_frag_data.literal_frag; +@@ -10849,8 +11220,56 @@ xtensa_move_literals (void) + frchain_to = literal_pool->tc_frag_data.lit_frchain; + gas_assert (frchain_to); + } ++ ++ if (search_frag->fr_type == rs_fill && search_frag->fr_fix == 0) ++ { ++ /* Skip empty fill frags. */ ++ *frag_splice = next_frag; ++ search_frag = next_frag; ++ continue; ++ } ++ ++ if (search_frag->fr_type == rs_align) ++ { ++ /* Skip alignment frags, because the pool as a whole will be ++ aligned if used, and we don't want to force alignment if the ++ pool is unused. */ ++ *frag_splice = next_frag; ++ search_frag = next_frag; ++ continue; ++ } ++ ++ /* First, move the frag out of the literal section and ++ to the appropriate place. */ ++ ++ /* Insert an aligmnent frag at start of pool. */ ++ if (literal_pool->fr_next->fr_type == rs_machine_dependent && ++ literal_pool->fr_next->fr_subtype == RELAX_LITERAL_POOL_END) ++ { ++ segT pool_seg = literal_pool->fr_next->tc_frag_data.lit_seg; ++ emit_state prev_state; ++ fragS *prev_frag; ++ fragS *align_frag; ++ xtensa_switch_section_emit_state (&prev_state, pool_seg, 0); ++ prev_frag = frag_now; ++ frag_variant (rs_fill, 0, 0, 0, NULL, 0, NULL); ++ align_frag = frag_now; ++ frag_align (2, 0, 0); ++ /* Splice it into the right place. */ ++ prev_frag->fr_next = align_frag->fr_next; ++ align_frag->fr_next = literal_pool->fr_next; ++ literal_pool->fr_next = align_frag; ++ /* Insert after this one. */ ++ literal_pool->tc_frag_data.literal_frag = align_frag; ++ xtensa_restore_emit_state (&prev_state); ++ } + insert_after = literal_pool->tc_frag_data.literal_frag; + dest_seg = insert_after->fr_next->tc_frag_data.lit_seg; ++ /* Skip align frag. */ ++ if (insert_after->fr_next->fr_type == rs_align) ++ { ++ insert_after = insert_after->fr_next; ++ } + + *frag_splice = next_frag; + search_frag->fr_next = insert_after->fr_next; +@@ -11014,7 +11433,10 @@ xtensa_switch_to_non_abs_literal_fragment (emit_state *result) + && !recursive + && !is_init && ! is_fini) + { +- as_bad (_("literal pool location required for text-section-literals; specify with .literal_position")); ++ if (!auto_litpools) ++ { ++ as_bad (_("literal pool location required for text-section-literals; specify with .literal_position")); ++ } + + /* When we mark a literal pool location, we want to put a frag in + the literal pool that points to it. But to do that, we want to +diff --git a/gas/config/tc-xtensa.h b/gas/config/tc-xtensa.h +index b2e43fa..290d902 100644 +--- a/gas/config/tc-xtensa.h ++++ b/gas/config/tc-xtensa.h +@@ -124,6 +124,7 @@ enum xtensa_relax_statesE + + RELAX_LITERAL_POOL_BEGIN, + RELAX_LITERAL_POOL_END, ++ RELAX_LITERAL_POOL_CANDIDATE_BEGIN, + /* Technically these are not relaxations at all but mark a location + to store literals later. Note that fr_var stores the frchain for + BEGIN frags and fr_var stores now_seg for END frags. */ +diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp +index d197ec8..db39629 100644 +--- a/gas/testsuite/gas/xtensa/all.exp ++++ b/gas/testsuite/gas/xtensa/all.exp +@@ -100,6 +100,7 @@ if [istarget xtensa*-*-*] then { + run_dump_test "jlong" + run_dump_test "trampoline" + run_dump_test "first_frag_align" ++ run_dump_test "auto-litpools" + } + + if [info exists errorInfo] then { +diff --git a/gas/testsuite/gas/xtensa/auto-litpools.d b/gas/testsuite/gas/xtensa/auto-litpools.d +new file mode 100644 +index 0000000..4d1a690 +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/auto-litpools.d +@@ -0,0 +1,12 @@ ++#as: --auto-litpools ++#objdump: -d ++#name: auto literal pool placement ++ ++.*: +file format .*xtensa.* ++#... ++.*4:.*l32r.a2, 0 .* ++#... ++.*3e437:.*j.3e440 .* ++#... ++.*40750:.*l32r.a2, 3e43c .* ++#... +diff --git a/gas/testsuite/gas/xtensa/auto-litpools.s b/gas/testsuite/gas/xtensa/auto-litpools.s +new file mode 100644 +index 0000000..9a5b26b +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/auto-litpools.s +@@ -0,0 +1,13 @@ ++ .text ++ .align 4 ++ .literal .L0, 0x12345 ++ .literal .L1, 0x12345 ++ ++f: ++ l32r a2, .L0 ++ .rep 44000 ++ _nop ++ _nop ++ .endr ++ l32r a2, .L1 ++ ret +-- +1.8.1.4 + diff --git a/package/binutils/2.25.1/914-xtensa-fix-signedness-of-gas-relocations.patch b/package/binutils/2.25.1/914-xtensa-fix-signedness-of-gas-relocations.patch new file mode 100644 index 0000000000..bd751661b8 --- /dev/null +++ b/package/binutils/2.25.1/914-xtensa-fix-signedness-of-gas-relocations.patch @@ -0,0 +1,99 @@ +From 6c7c5c477ef9ccf2d2548cf2ac3cec9bd3c9c5b6 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 2 Feb 2016 17:11:38 +0300 +Subject: [PATCH] xtensa: fix signedness of gas relocations + +Change 1058c7532d0b "Use signed data type for R_XTENSA_DIFF* relocation +offsets." changed signedness of BFD_RELOC_XTENSA_DIFF* relocations +substituted for BFD_RELOC_*. This made it impossible to encode arbitrary +8-, 16- and 32-bit values, which broke e.g. debug info encoding by .loc +directive. Revert this part and add test. + +gas/ +2016-02-03 Max Filippov + * config/tc-xtensa.c (md_apply_fix): Mark BFD_RELOC_XTENSA_DIFF* + substitutions for BFD_RELOC_* as unsigned. + +gas/testsuite/ +2016-02-03 Max Filippov + * gas/xtensa/all.exp: Add loc to list of xtensa tests. + * gas/xtensa/loc.d: New file: loc test result patterns. + * gas/xtensa/loc.s: New file: loc test. + +Signed-off-by: Max Filippov +--- + gas/config/tc-xtensa.c | 6 +++--- + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/loc.d | 10 ++++++++++ + gas/testsuite/gas/xtensa/loc.s | 7 +++++++ + 4 files changed, 21 insertions(+), 3 deletions(-) + create mode 100644 gas/testsuite/gas/xtensa/loc.d + create mode 100644 gas/testsuite/gas/xtensa/loc.s + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index a119871..36a06cc 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) + { + case BFD_RELOC_8: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + case BFD_RELOC_16: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + case BFD_RELOC_32: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + default: + break; +diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp +index 31b725b..7ff7bd7 100644 +--- a/gas/testsuite/gas/xtensa/all.exp ++++ b/gas/testsuite/gas/xtensa/all.exp +@@ -101,6 +101,7 @@ if [istarget xtensa*-*-*] then { + run_dump_test "trampoline" + run_dump_test "first_frag_align" + run_dump_test "auto-litpools" ++ run_dump_test "loc" + } + + if [info exists errorInfo] then { +diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d +new file mode 100644 +index 0000000..71983cc +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/loc.d +@@ -0,0 +1,10 @@ ++#as: ++#objdump: -r ++#name: .loc directive relocs ++ ++.*: +file format .*xtensa.* ++ ++RELOCATION RECORDS FOR \[\.debug_line\]: ++#... ++.*R_XTENSA_DIFF16.*\.text\+0x00009c42 ++#... +diff --git a/gas/testsuite/gas/xtensa/loc.s b/gas/testsuite/gas/xtensa/loc.s +new file mode 100644 +index 0000000..029e14e +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/loc.s +@@ -0,0 +1,7 @@ ++ .text ++ .file 1 "loc.s" ++ .loc 1 3 ++ nop ++ .space 40000 ++ .loc 1 5 ++ nop +-- +2.1.4 + diff --git a/package/binutils/2.25.1/915-Correct-assertion-in-NIOS2-linker-to-allow-signed-16.patch b/package/binutils/2.25.1/915-Correct-assertion-in-NIOS2-linker-to-allow-signed-16.patch new file mode 100644 index 0000000000..6ae9d9afc4 --- /dev/null +++ b/package/binutils/2.25.1/915-Correct-assertion-in-NIOS2-linker-to-allow-signed-16.patch @@ -0,0 +1,70 @@ +From d07f38875f37f4608e8ecb761619d84716896f14 Mon Sep 17 00:00:00 2001 +From: Nick Clifton +Date: Wed, 10 Feb 2016 11:25:59 +0000 +Subject: [PATCH] Correct assertion in NIOS2 linker to allow signed 16-buit + immediate values. + + PR 19405 + * elf32-nios2.c (nios2_elf32_install_imm16): Allow for signed + immediate values. + * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Limit the + number of messages about FDE encoding preventing .eh_frame_hdr + generation. + +[Romain: rebase on 2.25.1] +Signed-off-by: Romain Naour +--- + bfd/elf-eh-frame.c | 18 +++++++++++++++--- + bfd/elf32-nios2.c | 2 +- + 2 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c +index 002932d..22430f9 100644 +--- a/bfd/elf-eh-frame.c ++++ b/bfd/elf-eh-frame.c +@@ -1181,14 +1181,26 @@ _bfd_elf_discard_section_eh_frame + && ent->make_relative == 0) + || (ent->fde_encoding & 0x70) == DW_EH_PE_aligned)) + { ++ static int num_warnings_issued = 0; ++ + /* If a shared library uses absolute pointers + which we cannot turn into PC relative, + don't create the binary search table, + since it is affected by runtime relocations. */ + hdr_info->table = FALSE; +- (*info->callbacks->einfo) +- (_("%P: FDE encoding in %B(%A) prevents .eh_frame_hdr" +- " table being created.\n"), abfd, sec); ++ if (num_warnings_issued < 10) ++ { ++ (*info->callbacks->einfo) ++ (_("%P: FDE encoding in %B(%A) prevents .eh_frame_hdr" ++ " table being created.\n"), abfd, sec); ++ num_warnings_issued ++; ++ } ++ else if (num_warnings_issued == 10) ++ { ++ (*info->callbacks->einfo) ++ (_("%P: Further warnings about FDE encoding preventing .eh_frame_hdr generation dropped.\n")); ++ num_warnings_issued ++; ++ } + } + ent->removed = 0; + hdr_info->fde_count++; +diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c +index 0105b70..726647d 100644 +--- a/bfd/elf32-nios2.c ++++ b/bfd/elf32-nios2.c +@@ -1035,7 +1035,7 @@ nios2_elf32_install_imm16 (asection *sec, bfd_vma offset, bfd_vma value) + { + bfd_vma word = bfd_get_32 (sec->owner, sec->contents + offset); + +- BFD_ASSERT(value <= 0xffff); ++ BFD_ASSERT (value <= 0xffff || ((bfd_signed_vma) value) >= -0xffff); + + bfd_put_32 (sec->owner, word | ((value & 0xffff) << 6), + sec->contents + offset); +-- +2.4.3 + diff --git a/package/binutils/2.25.1/915-xtensa-fix-.init-.fini-literals-moving.patch b/package/binutils/2.25.1/915-xtensa-fix-.init-.fini-literals-moving.patch new file mode 100644 index 0000000000..ead3e42b75 --- /dev/null +++ b/package/binutils/2.25.1/915-xtensa-fix-.init-.fini-literals-moving.patch @@ -0,0 +1,149 @@ +From 7db2accc3fdea0aaa0c3a76a413d8e8030e022c3 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 16 Feb 2016 02:23:28 +0300 +Subject: [PATCH] xtensa: fix .init/.fini literals moving + +Despite the documentation and the comment in xtensa_move_literals, in +the presence of --text-section-literals and --auto-litpools literals are +moved from the separate literal sections into .init and .fini, because +the check in the xtensa_move_literals is incorrect. + +This moving was broken with introduction of auto litpools: some literals +now may be lost. This happens because literal frags emitted from .init +and .fini are not closed when new .literal_position marks new literal +pool. Then frag_align(2, 0, 0) changes type of the last literal frag to +rs_align. rs_align frags are skipped in the xtensa_move_literals. As a +result fixups against such literals are not moved out of .init.literal/ +.fini.literal sections producing the following assembler error: + + test.S: Warning: fixes not all moved from .init.literal + test.S: Internal error! + +Fix check for .init.literal/.fini.literal in the xtensa_move_literals +and don't let it move literals from there in the presence of +--text-section-literals or --auto-litpools. + +2016-02-17 Max Filippov +gas/ + * config/tc-xtensa.c (xtensa_move_literals): Fix check for + .init.literal/.fini.literal section name. + * testsuite/gas/xtensa/all.exp: Add init-fini-literals to the + list of xtensa tests. + * testsuite/gas/xtensa/init-fini-literals.d: New file: + init-fini-literals test result patterns. + * testsuite/gas/xtensa/init-fini-literals.s: New file: + init-fini-literals test. + +Signed-off-by: Max Filippov +--- +Backported from: 4111950f363221c4641dc2f33bea61cc94f34906 + + gas/config/tc-xtensa.c | 12 ++++++++++-- + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/init-fini-literals.d | 24 ++++++++++++++++++++++++ + gas/testsuite/gas/xtensa/init-fini-literals.s | 19 +++++++++++++++++++ + 4 files changed, 54 insertions(+), 2 deletions(-) + create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.d + create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.s + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 36a06cc..5773634 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -11061,6 +11061,10 @@ xtensa_move_literals (void) + fixS *fix, *next_fix, **fix_splice; + sym_list *lit; + struct litpool_seg *lps; ++ const char *init_name = INIT_SECTION_NAME; ++ const char *fini_name = FINI_SECTION_NAME; ++ int init_name_len = strlen(init_name); ++ int fini_name_len = strlen(fini_name); + + mark_literal_frags (literal_head->next); + +@@ -11171,9 +11175,13 @@ xtensa_move_literals (void) + + for (segment = literal_head->next; segment; segment = segment->next) + { ++ const char *seg_name = segment_name (segment->seg); ++ + /* Keep the literals for .init and .fini in separate sections. */ +- if (!strcmp (segment_name (segment->seg), INIT_SECTION_NAME) +- || !strcmp (segment_name (segment->seg), FINI_SECTION_NAME)) ++ if ((!memcmp (seg_name, init_name, init_name_len) && ++ !strcmp (seg_name + init_name_len, ".literal")) || ++ (!memcmp (seg_name, fini_name, fini_name_len) && ++ !strcmp (seg_name + fini_name_len, ".literal"))) + continue; + + frchain_from = seg_info (segment->seg)->frchainP; +diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp +index 7ff7bd7..6b67320 100644 +--- a/gas/testsuite/gas/xtensa/all.exp ++++ b/gas/testsuite/gas/xtensa/all.exp +@@ -102,6 +102,7 @@ if [istarget xtensa*-*-*] then { + run_dump_test "first_frag_align" + run_dump_test "auto-litpools" + run_dump_test "loc" ++ run_dump_test "init-fini-literals" + } + + if [info exists errorInfo] then { +diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.d b/gas/testsuite/gas/xtensa/init-fini-literals.d +new file mode 100644 +index 0000000..19ed121 +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/init-fini-literals.d +@@ -0,0 +1,24 @@ ++#as: --text-section-literals ++#objdump: -r ++#name: check that literals for .init and .fini always go to separate sections ++ ++.*: +file format .*xtensa.* ++#... ++RELOCATION RECORDS FOR \[\.init\.literal\]: ++#... ++00000000 R_XTENSA_PLT init ++#... ++RELOCATION RECORDS FOR \[\.fini\.literal\]: ++#... ++00000000 R_XTENSA_PLT fini ++#... ++RELOCATION RECORDS FOR \[\.init\]: ++#... ++.* R_XTENSA_SLOT0_OP \.init\.literal ++.* R_XTENSA_SLOT0_OP \.init\.literal\+0x00000004 ++#... ++RELOCATION RECORDS FOR \[\.fini\]: ++#... ++.* R_XTENSA_SLOT0_OP \.fini\.literal ++.* R_XTENSA_SLOT0_OP \.fini\.literal\+0x00000004 ++#... +diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.s b/gas/testsuite/gas/xtensa/init-fini-literals.s +new file mode 100644 +index 0000000..7c9ec17 +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/init-fini-literals.s +@@ -0,0 +1,19 @@ ++ .section .init,"ax",@progbits ++ .literal_position ++ .literal .LC0, init@PLT ++ .literal_position ++ .literal .LC1, 1 ++ .align 4 ++ ++ l32r a2, .LC0 ++ l32r a2, .LC1 ++ ++ .section .fini,"ax",@progbits ++ .literal_position ++ .literal .LC2, fini@PLT ++ .literal_position ++ .literal .LC3, 1 ++ .align 4 ++ ++ l32r a2, .LC2 ++ l32r a2, .LC3 +-- +2.1.4 + diff --git a/package/binutils/2.26/0120-sh-conf.patch b/package/binutils/2.26/0120-sh-conf.patch new file mode 100644 index 0000000000..cc14ef4029 --- /dev/null +++ b/package/binutils/2.26/0120-sh-conf.patch @@ -0,0 +1,46 @@ +From 1ceee199e9a32034c6def7700fdbb26335ca76a3 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 25 Dec 2015 11:38:13 +0100 +Subject: [PATCH] sh-conf + +Likewise, binutils has no idea about any of these new targets either, so we +fix that up too.. now we're able to actually build a real toolchain for +sh2a_nofpu- and other more ineptly named toolchains (and yes, there are more +inept targets than that one, really. Go look, I promise). + +[Romain: rebase on top of 2.26] +Signed-off-by: Romain Naour +--- + configure | 2 +- + configure.ac | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 34b66f7..905bc7b 100755 +--- a/configure ++++ b/configure +@@ -3939,7 +3939,7 @@ case "${target}" in + or1k*-*-*) + noconfigdirs="$noconfigdirs gdb" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +diff --git a/configure.ac b/configure.ac +index 4977d97..1e69ee2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1276,7 +1276,7 @@ case "${target}" in + or1k*-*-*) + noconfigdirs="$noconfigdirs gdb" + ;; +- sh-*-* | sh64-*-*) ++ sh*-*-* | sh64-*-*) + case "${target}" in + sh*-*-elf) + ;; +-- +2.4.3 + diff --git a/package/binutils/2.26/0300-ld-makefile.patch b/package/binutils/2.26/0300-ld-makefile.patch new file mode 100644 index 0000000000..73cc098024 --- /dev/null +++ b/package/binutils/2.26/0300-ld-makefile.patch @@ -0,0 +1,41 @@ +From d76a7549b43974fe8564971a3f40459bc495a8a7 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 25 Dec 2015 11:40:53 +0100 +Subject: [PATCH] ld-makefile + +[Romain: rebase on top of 2.26] +Signed-off-by: Romain Naour +--- + ld/Makefile.am | 2 +- + ld/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ld/Makefile.am b/ld/Makefile.am +index 0b3b049..3871c74 100644 +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -57,7 +57,7 @@ endif + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +diff --git a/ld/Makefile.in b/ld/Makefile.in +index ed98f87..530e4c9 100644 +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -413,7 +413,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include +-- +2.4.3 + diff --git a/package/binutils/2.26/0301-check-ldrunpath-length.patch b/package/binutils/2.26/0301-check-ldrunpath-length.patch new file mode 100644 index 0000000000..3b4c204c7f --- /dev/null +++ b/package/binutils/2.26/0301-check-ldrunpath-length.patch @@ -0,0 +1,36 @@ +From ebe1cba46df52d7bf86def3d681271fd05fb453b Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 25 Dec 2015 11:41:47 +0100 +Subject: [PATCH] check-ldrunpath-length + +[Romain: rebase on top of 2.26] +Signed-off-by: Romain Naour +--- + ld/emultempl/elf32.em | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em +index 0405d4f..efd3300 100644 +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -1242,6 +1242,8 @@ fragment <link.next) + if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) +-- +2.4.3 + diff --git a/package/binutils/2.26/0500-add-sysroot-fix-from-bug-3049.patch b/package/binutils/2.26/0500-add-sysroot-fix-from-bug-3049.patch new file mode 100644 index 0000000000..f67a43efdf --- /dev/null +++ b/package/binutils/2.26/0500-add-sysroot-fix-from-bug-3049.patch @@ -0,0 +1,52 @@ +From 30628870e583375f8927c04398c7219c6e9f703c Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 25 Dec 2015 11:42:48 +0100 +Subject: [PATCH] add sysroot fix from bug #3049 + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +Signed-off-by: Sven Rebhan +[Romain: rebase on top of 2.26] +Signed-off-by: Romain Naour +--- + ld/ldfile.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/ld/ldfile.c b/ld/ldfile.c +index 96f9ecc..1439309 100644 +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -335,18 +335,25 @@ ldfile_open_file_search (const char *arch, + directory first. */ + if (! entry->flags.maybe_archive) + { +- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename); ++ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename) ++ && ld_sysroot) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->flags.sysrooted = TRUE; + return TRUE; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + return TRUE; + + if (IS_ABSOLUTE_PATH (entry->filename)) +-- +2.4.3 + diff --git a/package/binutils/2.26/0600-poison-system-directories.patch b/package/binutils/2.26/0600-poison-system-directories.patch new file mode 100644 index 0000000000..d16994ec0c --- /dev/null +++ b/package/binutils/2.26/0600-poison-system-directories.patch @@ -0,0 +1,306 @@ +From be366461dd49e760440fb28eaee5164eb281adcc Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 25 Dec 2015 11:45:38 +0100 +Subject: [PATCH] poison-system-directories + +Patch adapted to binutils 2.23.2 and extended to use +BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni. + +[Romain: rebase on top of 2.26] +Signed-off-by: Romain Naour +[Gustavo: adapt to binutils 2.25] +Signed-off-by: Thomas Petazzoni +Signed-off-by: Gustavo Zacarias + +Upstream-Status: Inappropriate [distribution: codesourcery] + +Patch originally created by Mark Hatle, forward-ported to +binutils 2.21 by Scott Garman. + +purpose: warn for uses of system directories when cross linking + +Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 + +2008-07-02 Joseph Myers + + ld/ + * ld.h (args_type): Add error_poison_system_directories. + * ld.texinfo (--error-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.error_poison_system_directories. + * ldmain.c (main): Initialize + command_line.error_poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --error-poison-system-directories. + (parse_args): Handle new option. + +2007-06-13 Joseph Myers + + ld/ + * config.in: Regenerate. + * ld.h (args_type): Add poison_system_directories. + * ld.texinfo (--no-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.poison_system_directories. + * ldmain.c (main): Initialize + command_line.poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_NO_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --no-poison-system-directories. + (parse_args): Handle new option. + +2007-04-20 Joseph Myers + + Merge from Sourcery G++ binutils 2.17: + + 2007-03-20 Joseph Myers + Based on patch by Mark Hatle . + ld/ + * configure.ac (--enable-poison-system-directories): New option. + * configure, config.in: Regenerate. + * ldfile.c (ldfile_add_library_path): If + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, + /usr/lib, /usr/local/lib or /usr/X11R6/lib. + +Signed-off-by: Mark Hatle +Signed-off-by: Scott Garman +--- + ld/config.in | 3 +++ + ld/configure | 14 ++++++++++++++ + ld/configure.ac | 10 ++++++++++ + ld/ld.h | 8 ++++++++ + ld/ld.texinfo | 12 ++++++++++++ + ld/ldfile.c | 17 +++++++++++++++++ + ld/ldlex.h | 2 ++ + ld/ldmain.c | 2 ++ + ld/lexsup.c | 21 +++++++++++++++++++++ + 9 files changed, 89 insertions(+) + +diff --git a/ld/config.in b/ld/config.in +index 276fb77..35c58eb 100644 +--- a/ld/config.in ++++ b/ld/config.in +@@ -14,6 +14,9 @@ + language is requested. */ + #undef ENABLE_NLS + ++/* Define to warn for use of native system library directories */ ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++ + /* Additional extension a shared object might have. */ + #undef EXTRA_SHLIB_EXTENSION + +diff --git a/ld/configure b/ld/configure +index a446283..d1f9504 100755 +--- a/ld/configure ++++ b/ld/configure +@@ -786,6 +786,7 @@ with_lib_path + enable_targets + enable_64_bit_bfd + with_sysroot ++enable_poison_system_directories + enable_gold + enable_got + enable_compressed_debug_sections +@@ -1442,6 +1443,8 @@ Optional Features: + --disable-largefile omit support for large files + --enable-targets alternative target configurations + --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) ++ --enable-poison-system-directories ++ warn for use of native system library directories + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-got= GOT handling scheme (target, single, negative, + multigot) +@@ -15491,7 +15494,18 @@ else + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then + ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi + + # Check whether --enable-got was given. + if test "${enable_got+set}" = set; then : +diff --git a/ld/configure.ac b/ld/configure.ac +index 188172d..2cd8443 100644 +--- a/ld/configure.ac ++++ b/ld/configure.ac +@@ -95,6 +95,16 @@ AC_SUBST(use_sysroot) + AC_SUBST(TARGET_SYSTEM_ROOT) + AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system library directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system library directories]) ++fi ++ + dnl Use --enable-gold to decide if this linker should be the default. + dnl "install_as_default" is set to false if gold is the default linker. + dnl "installed_linker" is the installed BFD linker name. +diff --git a/ld/ld.h b/ld/ld.h +index d84ec4e..3476b26 100644 +--- a/ld/ld.h ++++ b/ld/ld.h +@@ -164,6 +164,14 @@ typedef struct { + /* If set, display the target memory usage (per memory region). */ + bfd_boolean print_memory_usage; + ++ /* If TRUE (the default) warn for uses of system directories when ++ cross linking. */ ++ bfd_boolean poison_system_directories; ++ ++ /* If TRUE (default FALSE) give an error for uses of system ++ directories when cross linking instead of a warning. */ ++ bfd_boolean error_poison_system_directories; ++ + /* Big or little endian as set on command line. */ + enum endian_enum endian; + +diff --git a/ld/ld.texinfo b/ld/ld.texinfo +index 1dd7492..fb1438e 100644 +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo +@@ -2332,6 +2332,18 @@ string identifying the original linked file does not change. + + Passing @code{none} for @var{style} disables the setting from any + @code{--build-id} options earlier on the command line. ++ ++@kindex --no-poison-system-directories ++@item --no-poison-system-directories ++Do not warn for @option{-L} options using system directories such as ++@file{/usr/lib} when cross linking. This option is intended for use ++in chroot environments when such directories contain the correct ++libraries for the target system rather than the host. ++ ++@kindex --error-poison-system-directories ++@item --error-poison-system-directories ++Give an error instead of a warning for @option{-L} options using ++system directories when cross linking. + @end table + + @c man end +diff --git a/ld/ldfile.c b/ld/ldfile.c +index 1439309..086b354 100644 +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -114,6 +114,23 @@ ldfile_add_library_path (const char *name, bfd_boolean cmdline) + new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL); + else + new_dirs->name = xstrdup (name); ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (command_line.poison_system_directories ++ && ((!strncmp (name, "/lib", 4)) ++ || (!strncmp (name, "/usr/lib", 8)) ++ || (!strncmp (name, "/usr/local/lib", 14)) ++ || (!strncmp (name, "/usr/X11R6/lib", 14)))) ++ { ++ if (command_line.error_poison_system_directories) ++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ else ++ einfo (_("%P: warning: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ } ++#endif ++ + } + + /* Try to open a BFD for a lang_input_statement. */ +diff --git a/ld/ldlex.h b/ld/ldlex.h +index 6f11e7b..0ca3110 100644 +--- a/ld/ldlex.h ++++ b/ld/ldlex.h +@@ -144,6 +144,8 @@ enum option_values + OPTION_PRINT_MEMORY_USAGE, + OPTION_REQUIRE_DEFINED_SYMBOL, + OPTION_ORPHAN_HANDLING, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, + }; + + /* The initial parser states. */ +diff --git a/ld/ldmain.c b/ld/ldmain.c +index bb0b9cc..a23c56c 100644 +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -257,6 +257,8 @@ main (int argc, char **argv) + command_line.warn_mismatch = TRUE; + command_line.warn_search_mismatch = TRUE; + command_line.check_section_addresses = -1; ++ command_line.poison_system_directories = TRUE; ++ command_line.error_poison_system_directories = FALSE; + + /* We initialize DEMANGLING based on the environment variable + COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the +diff --git a/ld/lexsup.c b/ld/lexsup.c +index 4cad209..be7d584 100644 +--- a/ld/lexsup.c ++++ b/ld/lexsup.c +@@ -530,6 +530,14 @@ static const struct ld_option ld_options[] = + { {"orphan-handling", required_argument, NULL, OPTION_ORPHAN_HANDLING}, + '\0', N_("=MODE"), N_("Control how orphan sections are handled."), + TWO_DASHES }, ++ { {"no-poison-system-directories", no_argument, NULL, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Do not warn for -L options using system directories"), ++ TWO_DASHES }, ++ { {"error-poison-system-directories", no_argument, NULL, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Give an error for -L options using system directories"), ++ TWO_DASHES }, + }; + + #define OPTION_COUNT ARRAY_SIZE (ld_options) +@@ -542,6 +550,7 @@ parse_args (unsigned argc, char **argv) + int ingroup = 0; + char *default_dirlist = NULL; + char *shortopts; ++ char *BR_paranoid_env; + struct option *longopts; + struct option *really_longopts; + int last_optind; +@@ -1516,6 +1525,14 @@ parse_args (unsigned argc, char **argv) + } + break; + ++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: ++ command_line.poison_system_directories = FALSE; ++ break; ++ ++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: ++ command_line.error_poison_system_directories = TRUE; ++ break; ++ + case OPTION_PUSH_STATE: + input_flags.pushed = xmemdup (&input_flags, + sizeof (input_flags), +@@ -1559,6 +1576,10 @@ parse_args (unsigned argc, char **argv) + command_line.soname = NULL; + } + ++ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0) ++ command_line.error_poison_system_directories = TRUE; ++ + while (ingroup) + { + lang_leave_group (); +-- +2.4.3 + diff --git a/package/binutils/2.26/0900-Correct-nios2-_gp-address-computation.patch b/package/binutils/2.26/0900-Correct-nios2-_gp-address-computation.patch new file mode 100644 index 0000000000..81986f51b9 --- /dev/null +++ b/package/binutils/2.26/0900-Correct-nios2-_gp-address-computation.patch @@ -0,0 +1,108 @@ +From 5eeb7401eed2f26d5fc255de816ca70a2cb9374e Mon Sep 17 00:00:00 2001 +From: Sandra Loosemore +Date: Sun, 27 Dec 2015 12:30:26 -0800 +Subject: [PATCH 900/901] Correct nios2 _gp address computation. + +2015-12-27 Sandra Loosemore + + bfd/ + * elf32-nios2.c (nios2_elf_assign_gp): Correct computation of _gp + address. + (nios2_elf32_relocate_section): Tidy code for R_NIOS2_GPREL error + messages. + +[Romain: + - backport upstream patch on 2.26 + - drop bfd/ChangeLog entry] +Signed-off-by: Romain Naour +--- + bfd/elf32-nios2.c | 31 +++++++++++++++++++++---------- + 1 file changed, 21 insertions(+), 10 deletions(-) + +diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c +index 6b29d8b..01ebd6e 100644 +--- a/bfd/elf32-nios2.c ++++ b/bfd/elf32-nios2.c +@@ -3086,7 +3086,15 @@ lookup: + case bfd_link_hash_defined: + case bfd_link_hash_defweak: + gp_found = TRUE; +- *pgp = lh->u.def.value; ++ { ++ asection *sym_sec = lh->u.def.section; ++ bfd_vma sym_value = lh->u.def.value; ++ ++ if (sym_sec->output_section) ++ sym_value = (sym_value + sym_sec->output_offset ++ + sym_sec->output_section->vma); ++ *pgp = sym_value; ++ } + break; + case bfd_link_hash_indirect: + case bfd_link_hash_warning: +@@ -3719,7 +3727,6 @@ nios2_elf32_relocate_section (bfd *output_bfd, + struct elf32_nios2_link_hash_entry *eh; + bfd_vma relocation; + bfd_vma gp; +- bfd_vma reloc_address; + bfd_reloc_status_type r = bfd_reloc_ok; + const char *name = NULL; + int r_type; +@@ -3762,12 +3769,6 @@ nios2_elf32_relocate_section (bfd *output_bfd, + if (bfd_link_relocatable (info)) + continue; + +- if (sec && sec->output_section) +- reloc_address = (sec->output_section->vma + sec->output_offset +- + rel->r_offset); +- else +- reloc_address = 0; +- + if (howto) + { + switch (howto->type) +@@ -3816,6 +3817,15 @@ nios2_elf32_relocate_section (bfd *output_bfd, + /* Turns an absolute address into a gp-relative address. */ + if (!nios2_elf_assign_gp (output_bfd, &gp, info)) + { ++ bfd_vma reloc_address; ++ ++ if (sec && sec->output_section) ++ reloc_address = (sec->output_section->vma ++ + sec->output_offset ++ + rel->r_offset); ++ else ++ reloc_address = 0; ++ + format = _("global pointer relative relocation at address " + "0x%08x when _gp not defined\n"); + sprintf (msgbuf, format, reloc_address); +@@ -3825,7 +3835,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, + else + { + bfd_vma symbol_address = rel->r_addend + relocation; +- relocation = relocation + rel->r_addend - gp; ++ relocation = symbol_address - gp; + rel->r_addend = 0; + if (((signed) relocation < -32768 + || (signed) relocation > 32767) +@@ -3833,6 +3843,8 @@ nios2_elf32_relocate_section (bfd *output_bfd, + || h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak)) + { ++ if (h) ++ name = h->root.root.string; + format = _("Unable to reach %s (at 0x%08x) from the " + "global pointer (at 0x%08x) because the " + "offset (%d) is out of the allowed range, " +@@ -3848,7 +3860,6 @@ nios2_elf32_relocate_section (bfd *output_bfd, + rel->r_offset, relocation, + rel->r_addend); + } +- + break; + case R_NIOS2_UJMP: + r = nios2_elf32_do_ujmp_relocate (input_bfd, howto, +-- +2.4.3 + diff --git a/package/binutils/2.26/0901-Fix-assertion-reduce-number-of-messages-about-FDE-en.patch b/package/binutils/2.26/0901-Fix-assertion-reduce-number-of-messages-about-FDE-en.patch new file mode 100644 index 0000000000..a490780f7e --- /dev/null +++ b/package/binutils/2.26/0901-Fix-assertion-reduce-number-of-messages-about-FDE-en.patch @@ -0,0 +1,67 @@ +From 39c481c2fb0e7fb127a15facf70b55d517462809 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 6 Feb 2016 00:35:31 +0100 +Subject: [PATCH 901/901] Fix assertion, reduce number of messages about FDE + encoding + +Patch by Nick Clifton [1] + +[1] https://sourceware.org/bugzilla/show_bug.cgi?id=19405 + +Signed-off-by: Romain Naour +--- + bfd/elf-eh-frame.c | 17 ++++++++++++++--- + bfd/elf32-nios2.c | 4 ++-- + 2 files changed, 16 insertions(+), 5 deletions(-) + +diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c +index e303189..e79bff0 100644 +--- a/bfd/elf-eh-frame.c ++++ b/bfd/elf-eh-frame.c +@@ -1369,14 +1369,25 @@ _bfd_elf_discard_section_eh_frame + && ent->make_relative == 0) + || (ent->fde_encoding & 0x70) == DW_EH_PE_aligned)) + { ++ static int num_warnings_issued = 0; + /* If a shared library uses absolute pointers + which we cannot turn into PC relative, + don't create the binary search table, + since it is affected by runtime relocations. */ + hdr_info->u.dwarf.table = FALSE; +- (*info->callbacks->einfo) +- (_("%P: FDE encoding in %B(%A) prevents .eh_frame_hdr" +- " table being created.\n"), abfd, sec); ++ if (num_warnings_issued < 10) ++ { ++ (*info->callbacks->einfo) ++ (_("%P: FDE encoding in %B(%A) prevents .eh_frame_hdr" ++ " table being created.\n"), abfd, sec); ++ num_warnings_issued ++; ++ } ++ else if (num_warnings_issued == 10) ++ { ++ (*info->callbacks->einfo) ++ (_("%P: Further warnings about FDE encoding preventing .eh_frame_hdr generation dropped.\n")); ++ num_warnings_issued ++; ++ } + } + ent->removed = 0; + hdr_info->u.dwarf.fde_count++; +diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c +index 01ebd6e..d1b7f83 100644 +--- a/bfd/elf32-nios2.c ++++ b/bfd/elf32-nios2.c +@@ -1905,8 +1905,8 @@ nios2_elf32_install_imm16 (asection *sec, bfd_vma offset, bfd_vma value) + { + bfd_vma word = bfd_get_32 (sec->owner, sec->contents + offset); + +- BFD_ASSERT(value <= 0xffff); +- ++ BFD_ASSERT (value <= 0xffff || ((bfd_signed_vma) value) >= -0xffff); ++ + bfd_put_32 (sec->owner, word | ((value & 0xffff) << 6), + sec->contents + offset); + } +-- +2.4.3 + diff --git a/package/binutils/2.26/0902-xtensa-fix-signedness-of-gas-relocations.patch b/package/binutils/2.26/0902-xtensa-fix-signedness-of-gas-relocations.patch new file mode 100644 index 0000000000..4ba2f75cc8 --- /dev/null +++ b/package/binutils/2.26/0902-xtensa-fix-signedness-of-gas-relocations.patch @@ -0,0 +1,101 @@ +From eb3e02b484ff75f4a2f54192422a88baa275bdfc Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 2 Feb 2016 17:11:38 +0300 +Subject: [PATCH] xtensa: fix signedness of gas relocations + +Change 1058c7532d0b "Use signed data type for R_XTENSA_DIFF* relocation +offsets." changed signedness of BFD_RELOC_XTENSA_DIFF* relocations +substituted for BFD_RELOC_*. This made it impossible to encode arbitrary +8-, 16- and 32-bit values, which broke e.g. debug info encoding by .loc +directive. Revert this part and add test. + +gas/ +2016-02-03 Max Filippov + * config/tc-xtensa.c (md_apply_fix): Mark BFD_RELOC_XTENSA_DIFF* + substitutions for BFD_RELOC_* as unsigned. + +gas/testsuite/ +2016-02-03 Max Filippov + * gas/xtensa/all.exp: Add loc to list of xtensa tests. + * gas/xtensa/loc.d: New file: loc test result patterns. + * gas/xtensa/loc.s: New file: loc test. + +Signed-off-by: Max Filippov +[Rebase on 2.26] +Signed-off-by: Romain Naour +--- + gas/config/tc-xtensa.c | 6 +++--- + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/loc.d | 10 ++++++++++ + gas/testsuite/gas/xtensa/loc.s | 7 +++++++ + 4 files changed, 21 insertions(+), 3 deletions(-) + create mode 100644 gas/testsuite/gas/xtensa/loc.d + create mode 100644 gas/testsuite/gas/xtensa/loc.s + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index d707da8..f623add 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -5961,15 +5961,15 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg) + { + case BFD_RELOC_8: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF8; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + case BFD_RELOC_16: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF16; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + case BFD_RELOC_32: + fixP->fx_r_type = BFD_RELOC_XTENSA_DIFF32; +- fixP->fx_signed = 1; ++ fixP->fx_signed = 0; + break; + default: + break; +diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp +index db39629..4daeff2 100644 +--- a/gas/testsuite/gas/xtensa/all.exp ++++ b/gas/testsuite/gas/xtensa/all.exp +@@ -101,6 +101,7 @@ if [istarget xtensa*-*-*] then { + run_dump_test "trampoline" + run_dump_test "first_frag_align" + run_dump_test "auto-litpools" ++ run_dump_test "loc" + } + + if [info exists errorInfo] then { +diff --git a/gas/testsuite/gas/xtensa/loc.d b/gas/testsuite/gas/xtensa/loc.d +new file mode 100644 +index 0000000..71983cc +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/loc.d +@@ -0,0 +1,10 @@ ++#as: ++#objdump: -r ++#name: .loc directive relocs ++ ++.*: +file format .*xtensa.* ++ ++RELOCATION RECORDS FOR \[\.debug_line\]: ++#... ++.*R_XTENSA_DIFF16.*\.text\+0x00009c42 ++#... +diff --git a/gas/testsuite/gas/xtensa/loc.s b/gas/testsuite/gas/xtensa/loc.s +new file mode 100644 +index 0000000..029e14e +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/loc.s +@@ -0,0 +1,7 @@ ++ .text ++ .file 1 "loc.s" ++ .loc 1 3 ++ nop ++ .space 40000 ++ .loc 1 5 ++ nop +-- +2.4.3 + diff --git a/package/binutils/2.26/0903-xtensa-fix-.init-.fini-literals-moving.patch b/package/binutils/2.26/0903-xtensa-fix-.init-.fini-literals-moving.patch new file mode 100644 index 0000000000..ead3e42b75 --- /dev/null +++ b/package/binutils/2.26/0903-xtensa-fix-.init-.fini-literals-moving.patch @@ -0,0 +1,149 @@ +From 7db2accc3fdea0aaa0c3a76a413d8e8030e022c3 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Tue, 16 Feb 2016 02:23:28 +0300 +Subject: [PATCH] xtensa: fix .init/.fini literals moving + +Despite the documentation and the comment in xtensa_move_literals, in +the presence of --text-section-literals and --auto-litpools literals are +moved from the separate literal sections into .init and .fini, because +the check in the xtensa_move_literals is incorrect. + +This moving was broken with introduction of auto litpools: some literals +now may be lost. This happens because literal frags emitted from .init +and .fini are not closed when new .literal_position marks new literal +pool. Then frag_align(2, 0, 0) changes type of the last literal frag to +rs_align. rs_align frags are skipped in the xtensa_move_literals. As a +result fixups against such literals are not moved out of .init.literal/ +.fini.literal sections producing the following assembler error: + + test.S: Warning: fixes not all moved from .init.literal + test.S: Internal error! + +Fix check for .init.literal/.fini.literal in the xtensa_move_literals +and don't let it move literals from there in the presence of +--text-section-literals or --auto-litpools. + +2016-02-17 Max Filippov +gas/ + * config/tc-xtensa.c (xtensa_move_literals): Fix check for + .init.literal/.fini.literal section name. + * testsuite/gas/xtensa/all.exp: Add init-fini-literals to the + list of xtensa tests. + * testsuite/gas/xtensa/init-fini-literals.d: New file: + init-fini-literals test result patterns. + * testsuite/gas/xtensa/init-fini-literals.s: New file: + init-fini-literals test. + +Signed-off-by: Max Filippov +--- +Backported from: 4111950f363221c4641dc2f33bea61cc94f34906 + + gas/config/tc-xtensa.c | 12 ++++++++++-- + gas/testsuite/gas/xtensa/all.exp | 1 + + gas/testsuite/gas/xtensa/init-fini-literals.d | 24 ++++++++++++++++++++++++ + gas/testsuite/gas/xtensa/init-fini-literals.s | 19 +++++++++++++++++++ + 4 files changed, 54 insertions(+), 2 deletions(-) + create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.d + create mode 100644 gas/testsuite/gas/xtensa/init-fini-literals.s + +diff --git a/gas/config/tc-xtensa.c b/gas/config/tc-xtensa.c +index 36a06cc..5773634 100644 +--- a/gas/config/tc-xtensa.c ++++ b/gas/config/tc-xtensa.c +@@ -11061,6 +11061,10 @@ xtensa_move_literals (void) + fixS *fix, *next_fix, **fix_splice; + sym_list *lit; + struct litpool_seg *lps; ++ const char *init_name = INIT_SECTION_NAME; ++ const char *fini_name = FINI_SECTION_NAME; ++ int init_name_len = strlen(init_name); ++ int fini_name_len = strlen(fini_name); + + mark_literal_frags (literal_head->next); + +@@ -11171,9 +11175,13 @@ xtensa_move_literals (void) + + for (segment = literal_head->next; segment; segment = segment->next) + { ++ const char *seg_name = segment_name (segment->seg); ++ + /* Keep the literals for .init and .fini in separate sections. */ +- if (!strcmp (segment_name (segment->seg), INIT_SECTION_NAME) +- || !strcmp (segment_name (segment->seg), FINI_SECTION_NAME)) ++ if ((!memcmp (seg_name, init_name, init_name_len) && ++ !strcmp (seg_name + init_name_len, ".literal")) || ++ (!memcmp (seg_name, fini_name, fini_name_len) && ++ !strcmp (seg_name + fini_name_len, ".literal"))) + continue; + + frchain_from = seg_info (segment->seg)->frchainP; +diff --git a/gas/testsuite/gas/xtensa/all.exp b/gas/testsuite/gas/xtensa/all.exp +index 7ff7bd7..6b67320 100644 +--- a/gas/testsuite/gas/xtensa/all.exp ++++ b/gas/testsuite/gas/xtensa/all.exp +@@ -102,6 +102,7 @@ if [istarget xtensa*-*-*] then { + run_dump_test "first_frag_align" + run_dump_test "auto-litpools" + run_dump_test "loc" ++ run_dump_test "init-fini-literals" + } + + if [info exists errorInfo] then { +diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.d b/gas/testsuite/gas/xtensa/init-fini-literals.d +new file mode 100644 +index 0000000..19ed121 +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/init-fini-literals.d +@@ -0,0 +1,24 @@ ++#as: --text-section-literals ++#objdump: -r ++#name: check that literals for .init and .fini always go to separate sections ++ ++.*: +file format .*xtensa.* ++#... ++RELOCATION RECORDS FOR \[\.init\.literal\]: ++#... ++00000000 R_XTENSA_PLT init ++#... ++RELOCATION RECORDS FOR \[\.fini\.literal\]: ++#... ++00000000 R_XTENSA_PLT fini ++#... ++RELOCATION RECORDS FOR \[\.init\]: ++#... ++.* R_XTENSA_SLOT0_OP \.init\.literal ++.* R_XTENSA_SLOT0_OP \.init\.literal\+0x00000004 ++#... ++RELOCATION RECORDS FOR \[\.fini\]: ++#... ++.* R_XTENSA_SLOT0_OP \.fini\.literal ++.* R_XTENSA_SLOT0_OP \.fini\.literal\+0x00000004 ++#... +diff --git a/gas/testsuite/gas/xtensa/init-fini-literals.s b/gas/testsuite/gas/xtensa/init-fini-literals.s +new file mode 100644 +index 0000000..7c9ec17 +--- /dev/null ++++ b/gas/testsuite/gas/xtensa/init-fini-literals.s +@@ -0,0 +1,19 @@ ++ .section .init,"ax",@progbits ++ .literal_position ++ .literal .LC0, init@PLT ++ .literal_position ++ .literal .LC1, 1 ++ .align 4 ++ ++ l32r a2, .LC0 ++ l32r a2, .LC1 ++ ++ .section .fini,"ax",@progbits ++ .literal_position ++ .literal .LC2, fini@PLT ++ .literal_position ++ .literal .LC3, 1 ++ .align 4 ++ ++ l32r a2, .LC2 ++ l32r a2, .LC3 +-- +2.1.4 + diff --git a/package/binutils/Config.in b/package/binutils/Config.in new file mode 100644 index 0000000000..64d0a09c10 --- /dev/null +++ b/package/binutils/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_BINUTILS + bool "binutils" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + depends on !BR2_aarch64 && !BR2_nios2 + depends on BR2_USE_WCHAR + help + Install binutils on the target + +if BR2_PACKAGE_BINUTILS + +config BR2_PACKAGE_BINUTILS_TARGET + bool "binutils binaries" + help + The GNU Binutils are a collection of binary tools: + + ld - the GNU linker. + as - the GNU assembler. + and others... + + http://www.gnu.org/software/binutils/ + +endif + +comment "binutils needs a toolchain w/ wchar" + depends on !BR2_aarch64 && !BR2_nios2 + depends on !BR2_USE_WCHAR diff --git a/package/binutils/Config.in.host b/package/binutils/Config.in.host new file mode 100644 index 0000000000..e42918e9fa --- /dev/null +++ b/package/binutils/Config.in.host @@ -0,0 +1,51 @@ +comment "Binutils Options" + +choice + prompt "Binutils Version" + depends on !BR2_arc + default BR2_BINUTILS_VERSION_2_25_X + help + Select the version of binutils you wish to use. + + config BR2_BINUTILS_VERSION_2_23_X + depends on !BR2_aarch64 && !BR2_microblaze && \ + !BR2_powerpc64le && !BR2_nios2 + # Unsupported for MIPS R6 + depends on !BR2_mips_32r6 && !BR2_mips_64r6 + # Unsupported ARM cores + depends on !BR2_cortex_a17 + bool "binutils 2.23.2" + + config BR2_BINUTILS_VERSION_2_24_X + # supported, but broken on Nios-II and powerpc64le + depends on !BR2_nios2 && !BR2_powerpc64le + # Unsupported for MIPS R6 + depends on !BR2_mips_32r6 && !BR2_mips_64r6 + # Unsupported ARM cores + depends on !BR2_cortex_a17 + bool "binutils 2.24" + + config BR2_BINUTILS_VERSION_2_25_X + bool "binutils 2.25.1" + + config BR2_BINUTILS_VERSION_2_26_X + bool "binutils 2.26" + +endchoice + +config BR2_BINUTILS_VERSION + string + default "arc-2015.12" if BR2_arc + default "2.23.2" if BR2_BINUTILS_VERSION_2_23_X + default "2.24" if BR2_BINUTILS_VERSION_2_24_X + default "2.25.1" if BR2_BINUTILS_VERSION_2_25_X + default "2.26" if BR2_BINUTILS_VERSION_2_26_X + +config BR2_BINUTILS_ENABLE_LTO + bool + +config BR2_BINUTILS_EXTRA_CONFIG_OPTIONS + string "Additional binutils options" + default "" + help + Any additional binutils options you may want to include. diff --git a/package/binutils/arc-2015.12/0001-PR-other-56780.patch b/package/binutils/arc-2015.12/0001-PR-other-56780.patch new file mode 100644 index 0000000000..b418a2f4a9 --- /dev/null +++ b/package/binutils/arc-2015.12/0001-PR-other-56780.patch @@ -0,0 +1,236 @@ +From 7827cdf59a1894abe18aa20043a63c8c875c3fce Mon Sep 17 00:00:00 2001 +From: DJ Delorie +Date: Sat, 1 Jun 2013 01:01:44 +0000 +Subject: [PATCH] PR other/56780 merge from gcc + +binutils-gdb upstream a4818a052efb4cea976a03a2f7cb0b38b23d12d0 + +libiberty: fix --enable-install-libiberty flag [PR 56780] + +Commit 199570 fixed the --disable-install-libiberty behavior, but it also +added a bug where the enable path never works because the initial clear +of target_header_dir wasn't deleted. So we end up initializing properly +at the top only to reset it at the end all the time. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-82ee72b054a4 + +[Romain + rename patch name + squash the two upstream commits + Remove the ChangeLog] +Signed-off-by: Romain Naour +--- + libiberty/Makefile.in | 24 ++++++++++----------- + libiberty/configure | 57 +++++++++++++++++++++++++++----------------------- + libiberty/configure.ac | 47 ++++++++++++++++++++++------------------- + 3 files changed, 68 insertions(+), 60 deletions(-) + +diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in +index 0a5da31..4f40c72 100644 +--- a/libiberty/Makefile.in ++++ b/libiberty/Makefile.in +@@ -354,19 +354,19 @@ install-strip: install + # since it will be passed the multilib flags. + MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` + install_to_libdir: all +- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR) +- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n +- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ) +- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB) + if test -n "${target_header_dir}"; then \ +- case "${target_header_dir}" in \ +- /*) thd=${target_header_dir};; \ +- *) thd=${includedir}/${target_header_dir};; \ +- esac; \ +- ${mkinstalldirs} $(DESTDIR)$${thd}; \ +- for h in ${INSTALLED_HEADERS}; do \ +- ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ +- done; \ ++ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ ++ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \ ++ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \ ++ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \ ++ case "${target_header_dir}" in \ ++ /*) thd=${target_header_dir};; \ ++ *) thd=${includedir}/${target_header_dir};; \ ++ esac; \ ++ ${mkinstalldirs} $(DESTDIR)$${thd}; \ ++ for h in ${INSTALLED_HEADERS}; do \ ++ ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ ++ done; \ + fi + @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install + +diff --git a/libiberty/configure b/libiberty/configure +index 6e98352..44d1f78 100755 +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -675,8 +675,8 @@ with_cross_host + with_newlib + enable_maintainer_mode + enable_multilib +-enable_largefile + enable_install_libiberty ++enable_largefile + ' + ac_precious_vars='build_alias + host_alias +@@ -1303,8 +1303,8 @@ Optional Features: + enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-multilib build many library versions (default) ++ --enable-install-libiberty Install headers and library for end users + --disable-largefile omit support for large files +- --enable-install-libiberty Install headers for end users + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -2784,6 +2784,35 @@ if test $cross_compiling = no && test $multilib = yes \ + cross_compiling=maybe + fi + ++# We may wish to install the target headers somewhere. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libiberty headers and static library" >&5 ++$as_echo_n "checking whether to install libiberty headers and static library... " >&6; } ++ ++# Check whether --enable-install-libiberty was given. ++if test "${enable_install_libiberty+set}" = set; then : ++ enableval=$enable_install_libiberty; enable_install_libiberty=$enableval ++else ++ enable_install_libiberty=no ++fi ++ ++# Option parsed, now set things appropriately. ++case x"$enable_install_libiberty" in ++ xyes|x) ++ target_header_dir=libiberty ++ ;; ++ xno) ++ target_header_dir= ++ ;; ++ *) ++ # This could be sanity-checked in various ways... ++ target_header_dir="${enable_install_libiberty}" ++ ;; ++esac ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_install_libiberty" >&5 ++$as_echo "$enable_install_libiberty" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: target_header_dir = $target_header_dir" >&5 ++$as_echo "$as_me: target_header_dir = $target_header_dir" >&6;} ++ + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -5475,7 +5504,6 @@ fi + + setobjs= + CHECK= +-target_header_dir= + if test -n "${with_target_subdir}"; then + + # We are being configured as a target library. AC_REPLACE_FUNCS +@@ -5752,29 +5780,6 @@ _ACEOF + + esac + +- # We may wish to install the target headers somewhere. +- # Check whether --enable-install-libiberty was given. +-if test "${enable_install_libiberty+set}" = set; then : +- enableval=$enable_install_libiberty; enable_install_libiberty=$enableval +-else +- enable_install_libiberty=no +-fi +- +- # Option parsed, now set things appropriately. +- case x"$enable_install_libiberty" in +- xyes|x) +- target_header_dir=libiberty +- ;; +- xno) +- target_header_dir= +- ;; +- *) +- # This could be sanity-checked in various ways... +- target_header_dir="${enable_install_libiberty}" +- ;; +- esac +- +- + else + + # Not a target library, so we set things up to run the test suite. +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index 754b66a..04260ec 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -128,6 +128,31 @@ if test $cross_compiling = no && test $multilib = yes \ + cross_compiling=maybe + fi + ++# We may wish to install the target headers somewhere. ++AC_MSG_CHECKING([whether to install libiberty headers and static library]) ++dnl install-libiberty is disabled by default ++ ++AC_ARG_ENABLE(install-libiberty, ++[ --enable-install-libiberty Install headers and library for end users], ++enable_install_libiberty=$enableval, ++enable_install_libiberty=no)dnl ++ ++# Option parsed, now set things appropriately. ++case x"$enable_install_libiberty" in ++ xyes|x) ++ target_header_dir=libiberty ++ ;; ++ xno) ++ target_header_dir= ++ ;; ++ *) ++ # This could be sanity-checked in various ways... ++ target_header_dir="${enable_install_libiberty}" ++ ;; ++esac ++AC_MSG_RESULT($enable_install_libiberty) ++AC_MSG_NOTICE([target_header_dir = $target_header_dir]) ++ + GCC_NO_EXECUTABLES + AC_PROG_CC + AC_SYS_LARGEFILE +@@ -379,7 +404,6 @@ fi + + setobjs= + CHECK= +-target_header_dir= + if test -n "${with_target_subdir}"; then + + # We are being configured as a target library. AC_REPLACE_FUNCS +@@ -490,27 +514,6 @@ if test -n "${with_target_subdir}"; then + + esac + +- # We may wish to install the target headers somewhere. +- AC_ARG_ENABLE(install-libiberty, +- [ --enable-install-libiberty Install headers for end users], +- enable_install_libiberty=$enableval, +- enable_install_libiberty=no)dnl +- +- # Option parsed, now set things appropriately. +- case x"$enable_install_libiberty" in +- xyes|x) +- target_header_dir=libiberty +- ;; +- xno) +- target_header_dir= +- ;; +- *) +- # This could be sanity-checked in various ways... +- target_header_dir="${enable_install_libiberty}" +- ;; +- esac +- +- + else + + # Not a target library, so we set things up to run the test suite. +-- +1.9.3 + diff --git a/package/binutils/arc-2015.12/600-poison-system-directories.patch b/package/binutils/arc-2015.12/600-poison-system-directories.patch new file mode 100644 index 0000000000..8a3bdc647c --- /dev/null +++ b/package/binutils/arc-2015.12/600-poison-system-directories.patch @@ -0,0 +1,279 @@ +Patch adapted to binutils arc-4.8-R3 and extended to use +BR_COMPILER_PARANOID_UNSAFE_PATH by Thomas Petazzoni. + +Signed-off-by: Thomas Petazzoni + +Upstream-Status: Inappropriate [distribution: codesourcery] + +Patch originally created by Mark Hatle, forward-ported to +binutils 2.21 by Scott Garman. + +purpose: warn for uses of system directories when cross linking + +Code Merged from Sourcery G++ binutils 2.19 - 4.4-277 + +2008-07-02 Joseph Myers + + ld/ + * ld.h (args_type): Add error_poison_system_directories. + * ld.texinfo (--error-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.error_poison_system_directories. + * ldmain.c (main): Initialize + command_line.error_poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_ERROR_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --error-poison-system-directories. + (parse_args): Handle new option. + +2007-06-13 Joseph Myers + + ld/ + * config.in: Regenerate. + * ld.h (args_type): Add poison_system_directories. + * ld.texinfo (--no-poison-system-directories): Document. + * ldfile.c (ldfile_add_library_path): Check + command_line.poison_system_directories. + * ldmain.c (main): Initialize + command_line.poison_system_directories. + * lexsup.c (enum option_values): Add + OPTION_NO_POISON_SYSTEM_DIRECTORIES. + (ld_options): Add --no-poison-system-directories. + (parse_args): Handle new option. + +2007-04-20 Joseph Myers + + Merge from Sourcery G++ binutils 2.17: + + 2007-03-20 Joseph Myers + Based on patch by Mark Hatle . + ld/ + * configure.in (--enable-poison-system-directories): New option. + * configure, config.in: Regenerate. + * ldfile.c (ldfile_add_library_path): If + ENABLE_POISON_SYSTEM_DIRECTORIES defined, warn for use of /lib, + /usr/lib, /usr/local/lib or /usr/X11R6/lib. + +Signed-off-by: Mark Hatle +Signed-off-by: Scott Garman + +Index: b/ld/config.in +=================================================================== +--- a/ld/config.in ++++ b/ld/config.in +@@ -11,6 +11,9 @@ + language is requested. */ + #undef ENABLE_NLS + ++/* Define to warn for use of native system library directories */ ++#undef ENABLE_POISON_SYSTEM_DIRECTORIES ++ + /* Additional extension a shared object might have. */ + #undef EXTRA_SHLIB_EXTENSION + +Index: b/ld/configure +=================================================================== +--- a/ld/configure ++++ b/ld/configure +@@ -773,6 +773,7 @@ + enable_targets + enable_64_bit_bfd + with_sysroot ++enable_poison_system_directories + enable_gold + enable_got + enable_werror +@@ -1428,6 +1429,8 @@ + (and sometimes confusing) to the casual installer + --enable-targets alternative target configurations + --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) ++ --enable-poison-system-directories ++ warn for use of native system library directories + --enable-gold[=ARG] build gold [ARG={default,yes,no}] + --enable-got= GOT handling scheme (target, single, negative, + multigot) +@@ -4338,7 +4341,18 @@ + fi + + ++# Check whether --enable-poison-system-directories was given. ++if test "${enable_poison_system_directories+set}" = set; then : ++ enableval=$enable_poison_system_directories; ++else ++ enable_poison_system_directories=no ++fi ++ ++if test "x${enable_poison_system_directories}" = "xyes"; then + ++$as_echo "#define ENABLE_POISON_SYSTEM_DIRECTORIES 1" >>confdefs.h ++ ++fi + + # Check whether --enable-got was given. + if test "${enable_got+set}" = set; then : +Index: b/ld/configure.in +=================================================================== +--- a/ld/configure.in ++++ b/ld/configure.in +@@ -70,6 +70,16 @@ + AC_SUBST(TARGET_SYSTEM_ROOT) + AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE) + ++AC_ARG_ENABLE([poison-system-directories], ++ AS_HELP_STRING([--enable-poison-system-directories], ++ [warn for use of native system library directories]),, ++ [enable_poison_system_directories=no]) ++if test "x${enable_poison_system_directories}" = "xyes"; then ++ AC_DEFINE([ENABLE_POISON_SYSTEM_DIRECTORIES], ++ [1], ++ [Define to warn for use of native system library directories]) ++fi ++ + dnl Use --enable-gold to decide if this linker should be the default. + dnl "install_as_default" is set to false if gold is the default linker. + dnl "installed_linker" is the installed BFD linker name. +Index: b/ld/ldfile.c +=================================================================== +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -116,6 +116,23 @@ + new_dirs->name = concat (ld_sysroot, name + 1, (const char *) NULL); + else + new_dirs->name = xstrdup (name); ++ ++#ifdef ENABLE_POISON_SYSTEM_DIRECTORIES ++ if (command_line.poison_system_directories ++ && ((!strncmp (name, "/lib", 4)) ++ || (!strncmp (name, "/usr/lib", 8)) ++ || (!strncmp (name, "/usr/local/lib", 14)) ++ || (!strncmp (name, "/usr/X11R6/lib", 14)))) ++ { ++ if (command_line.error_poison_system_directories) ++ einfo (_("%X%P: error: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ else ++ einfo (_("%P: warning: library search path \"%s\" is unsafe for " ++ "cross-compilation\n"), name); ++ } ++#endif ++ + } + + /* Try to open a BFD for a lang_input_statement. */ +Index: b/ld/ld.h +=================================================================== +--- a/ld/ld.h ++++ b/ld/ld.h +@@ -203,6 +203,14 @@ + /* If TRUE we'll just print the default output on stdout. */ + bfd_boolean print_output_format; + ++ /* If TRUE (the default) warn for uses of system directories when ++ cross linking. */ ++ bfd_boolean poison_system_directories; ++ ++ /* If TRUE (default FALSE) give an error for uses of system ++ directories when cross linking instead of a warning. */ ++ bfd_boolean error_poison_system_directories; ++ + /* Big or little endian as set on command line. */ + enum endian_enum endian; + +Index: b/ld/ldmain.c +=================================================================== +--- a/ld/ldmain.c ++++ b/ld/ldmain.c +@@ -265,6 +265,8 @@ + command_line.warn_search_mismatch = TRUE; + command_line.check_section_addresses = -1; + command_line.disable_target_specific_optimizations = -1; ++ command_line.poison_system_directories = TRUE; ++ command_line.error_poison_system_directories = FALSE; + + /* We initialize DEMANGLING based on the environment variable + COLLECT_NO_DEMANGLE. The gcc collect2 program will demangle the +Index: b/ld/ld.texinfo +=================================================================== +--- a/ld/ld.texinfo ++++ b/ld/ld.texinfo +@@ -2156,6 +2156,18 @@ + + Passing @code{none} for @var{style} disables the setting from any + @code{--build-id} options earlier on the command line. ++ ++@kindex --no-poison-system-directories ++@item --no-poison-system-directories ++Do not warn for @option{-L} options using system directories such as ++@file{/usr/lib} when cross linking. This option is intended for use ++in chroot environments when such directories contain the correct ++libraries for the target system rather than the host. ++ ++@kindex --error-poison-system-directories ++@item --error-poison-system-directories ++Give an error instead of a warning for @option{-L} options using ++system directories when cross linking. + @end table + + @c man end +Index: b/ld/lexsup.c +=================================================================== +--- a/ld/lexsup.c ++++ b/ld/lexsup.c +@@ -498,6 +498,14 @@ + TWO_DASHES }, + { {"wrap", required_argument, NULL, OPTION_WRAP}, + '\0', N_("SYMBOL"), N_("Use wrapper functions for SYMBOL"), TWO_DASHES }, ++ { {"no-poison-system-directories", no_argument, NULL, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Do not warn for -L options using system directories"), ++ TWO_DASHES }, ++ { {"error-poison-system-directories", no_argument, NULL, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES}, ++ '\0', NULL, N_("Give an error for -L options using system directories"), ++ TWO_DASHES }, + }; + + #define OPTION_COUNT ARRAY_SIZE (ld_options) +@@ -510,6 +518,7 @@ + int ingroup = 0; + char *default_dirlist = NULL; + char *shortopts; ++ char *BR_paranoid_env; + struct option *longopts; + struct option *really_longopts; + int last_optind; +@@ -1427,9 +1436,21 @@ + einfo (_("%P%X: --hash-size needs a numeric argument\n")); + } + break; ++ ++ case OPTION_NO_POISON_SYSTEM_DIRECTORIES: ++ command_line.poison_system_directories = FALSE; ++ break; ++ ++ case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES: ++ command_line.error_poison_system_directories = TRUE; ++ break; + } + } + ++ BR_paranoid_env = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); ++ if (BR_paranoid_env && strlen(BR_paranoid_env) > 0) ++ command_line.error_poison_system_directories = TRUE; ++ + while (ingroup) + { + lang_leave_group (); +Index: b/ld/ldlex.h +=================================================================== +--- a/ld/ldlex.h ++++ b/ld/ldlex.h +@@ -136,6 +136,8 @@ + #endif /* ENABLE_PLUGINS */ + OPTION_DEFAULT_SCRIPT, + OPTION_PRINT_OUTPUT_FORMAT, ++ OPTION_NO_POISON_SYSTEM_DIRECTORIES, ++ OPTION_ERROR_POISON_SYSTEM_DIRECTORIES, + }; + + /* The initial parser states. */ diff --git a/package/binutils/binutils.hash b/package/binutils/binutils.hash new file mode 100644 index 0000000000..916b68c1c1 --- /dev/null +++ b/package/binutils/binutils.hash @@ -0,0 +1,7 @@ +# From ftp://gcc.gnu.org/pub/binutils/releases/sha512.sum +sha512 dec753bbba008f1526b89cf1bd85feba78f362f5333ffdf93953fd131eb755976dec82a0a4ba38c43d2434da007137780cfe674de5414be5cf7ce7fbc6af6d16 binutils-2.23.2.tar.bz2 +sha512 5ec95ad47d49b12c4558a8db0ca2109d3ee1955e3776057f3330c4506f8f4d1cf5e505fbf8a16b98403a0fcdeaaf986fe0a22be6456247dbdace63ce1f776b12 binutils-2.24.tar.bz2 +sha512 0b36dda0e6d32cd25613c0e64b56b28312515c54d6a159efd3db9a86717f114ab0a0a1f69d08975084d55713ebaeab64e4085c9b3d1c3fa86712869f80eb954d binutils-2.25.1.tar.bz2 +sha512 e77e1b8dbbcbaf9ac2fae95c4403615808af3be03b2e1d32448cd3a7d32c43273f8bcace3f2de84ec120a982879295673029da306e2885dbf5f990584932cfc7 binutils-2.26.tar.bz2 +# No hash for the ARC variant, comes from the github-helper: +none xxx binutils-arc-2015.12.tar.gz diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk new file mode 100644 index 0000000000..ca39f0b146 --- /dev/null +++ b/package/binutils/binutils.mk @@ -0,0 +1,122 @@ +################################################################################ +# +# binutils +# +################################################################################ + +# Version is set when using buildroot toolchain. +# If not, we do like other packages +BINUTILS_VERSION = $(call qstrip,$(BR2_BINUTILS_VERSION)) +ifeq ($(BINUTILS_VERSION),) +ifeq ($(BR2_arc),y) +BINUTILS_VERSION = arc-2015.12 +else +BINUTILS_VERSION = 2.25.1 +endif +endif # BINUTILS_VERSION + +ifeq ($(BR2_arc),y) +BINUTILS_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(BINUTILS_VERSION)) +BINUTILS_SOURCE = binutils-$(BINUTILS_VERSION).tar.gz +BINUTILS_FROM_GIT = y +endif +BINUTILS_SITE ?= $(BR2_GNU_MIRROR)/binutils +BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.bz2 +BINUTILS_EXTRA_CONFIG_OPTIONS = $(call qstrip,$(BR2_BINUTILS_EXTRA_CONFIG_OPTIONS)) +BINUTILS_INSTALL_STAGING = YES +BINUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +HOST_BINUTILS_DEPENDENCIES = +BINUTILS_LICENSE = GPLv3+, libiberty LGPLv2.1+ +BINUTILS_LICENSE_FILES = COPYING3 COPYING.LIB + +ifeq ($(BINUTILS_FROM_GIT),y) +BINUTILS_DEPENDENCIES += host-flex host-bison +HOST_BINUTILS_DEPENDENCIES += host-flex host-bison +endif + +# When binutils sources are fetched from the binutils-gdb repository, +# they also contain the gdb sources, but gdb shouldn't be built, so we +# disable it. +BINUTILS_DISABLE_GDB_CONF_OPTS = \ + --disable-sim \ + --disable-gdb + +# We need to specify host & target to avoid breaking ARM EABI +BINUTILS_CONF_OPTS = \ + --disable-multilib \ + --disable-werror \ + --host=$(GNU_TARGET_NAME) \ + --target=$(GNU_TARGET_NAME) \ + --enable-install-libiberty \ + $(BINUTILS_DISABLE_GDB_CONF_OPTS) \ + $(BINUTILS_EXTRA_CONFIG_OPTIONS) + +ifeq ($(BR2_STATIC_LIBS),y) +BINUTILS_CONF_OPTS += --disable-plugins +endif + +# Don't build documentation. It takes up extra space / build time, +# and sometimes needs specific makeinfo versions to work +BINUTILS_CONF_ENV += ac_cv_prog_MAKEINFO=missing +HOST_BINUTILS_CONF_ENV += ac_cv_prog_MAKEINFO=missing + +# Install binutils after busybox to prefer full-blown utilities +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +BINUTILS_DEPENDENCIES += busybox +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +BINUTILS_DEPENDENCIES += zlib +endif + +# "host" binutils should actually be "cross" +# We just keep the convention of "host utility" for now +HOST_BINUTILS_CONF_OPTS = \ + --disable-multilib \ + --disable-werror \ + --target=$(GNU_TARGET_NAME) \ + --disable-shared \ + --enable-static \ + --with-sysroot=$(STAGING_DIR) \ + --enable-poison-system-directories \ + $(BINUTILS_DISABLE_GDB_CONF_OPTS) \ + $(BINUTILS_EXTRA_CONFIG_OPTIONS) + +# binutils run configure script of subdirs at make time, so ensure +# our TARGET_CONFIGURE_ARGS are taken into consideration for those +define BINUTILS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_ARGS) $(MAKE) -C $(@D) +endef + +# We just want libbfd, libiberty and libopcodes, +# not the full-blown binutils in staging +define BINUTILS_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D)/bfd DESTDIR=$(STAGING_DIR) install + $(MAKE) -C $(@D)/opcodes DESTDIR=$(STAGING_DIR) install + $(MAKE) -C $(@D)/libiberty DESTDIR=$(STAGING_DIR) install +endef + +# If we don't want full binutils on target +ifneq ($(BR2_PACKAGE_BINUTILS_TARGET),y) +define BINUTILS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/bfd DESTDIR=$(TARGET_DIR) install + $(MAKE) -C $(@D)/libiberty DESTDIR=$(STAGING_DIR) install +endef +endif + +XTENSA_CORE_NAME = $(call qstrip, $(BR2_XTENSA_CORE_NAME)) +ifneq ($(XTENSA_CORE_NAME),) +define BINUTILS_XTENSA_PRE_PATCH + tar xf $(BR2_XTENSA_OVERLAY_DIR)/xtensa_$(XTENSA_CORE_NAME).tar \ + -C $(@D) --strip-components=1 binutils +endef +BINUTILS_PRE_PATCH_HOOKS += BINUTILS_XTENSA_PRE_PATCH +HOST_BINUTILS_PRE_PATCH_HOOKS += BINUTILS_XTENSA_PRE_PATCH +endif + +ifeq ($(BR2_BINUTILS_ENABLE_LTO),y) +HOST_BINUTILS_CONF_OPTS += --enable-plugins --enable-lto +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/biosdevname/Config.in b/package/biosdevname/Config.in new file mode 100644 index 0000000000..f9202ac4b8 --- /dev/null +++ b/package/biosdevname/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_BIOSDEVNAME + bool "biosdevname" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_PCIUTILS + select BR2_PACKAGE_ZLIB + help + Biosdevname is a udev helper that looks at various BIOS tables to + figure out what the actual hardware names are for Ethernet ports + and renames the ports accordingly. This has the advantage of + always referring to the same port regardless of system or + hardware changes that might otherwise alter the typical ethX + naming. + + http://linux.dell.com/biosdevname/ diff --git a/package/biosdevname/biosdevname.hash b/package/biosdevname/biosdevname.hash new file mode 100644 index 0000000000..a00077711e --- /dev/null +++ b/package/biosdevname/biosdevname.hash @@ -0,0 +1,3 @@ +# Locally computed hashes, not provided by upstream +sha1 a926961d6adb673aed062683ab8b80e6418523ea biosdevname-0.6.0.tar.gz +sha256 c75bf92d3184f7dd1973af002de152498145021efdd5de46d6bf796acef43914 biosdevname-0.6.0.tar.gz diff --git a/package/biosdevname/biosdevname.mk b/package/biosdevname/biosdevname.mk new file mode 100644 index 0000000000..82f3338a95 --- /dev/null +++ b/package/biosdevname/biosdevname.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# biosdevname +# +################################################################################ + +BIOSDEVNAME_VERSION = 0.6.0 +BIOSDEVNAME_SITE = http://linux.dell.com/biosdevname/biosdevname-$(BIOSDEVNAME_VERSION) +BIOSDEVNAME_LICENSE = GPL +BIOSDEVNAME_LICENSE_FILES = COPYING +BIOSDEVNAME_CONF_OPTS = --exec-prefix=/ +BIOSDEVNAME_DEPENDENCIES = pciutils udev zlib + +$(eval $(autotools-package)) diff --git a/package/bison/bison.hash b/package/bison/bison.hash new file mode 100644 index 0000000000..16913f28b0 --- /dev/null +++ b/package/bison/bison.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1 bison-3.0.4.tar.xz diff --git a/package/bison/bison.mk b/package/bison/bison.mk new file mode 100644 index 0000000000..5779673e12 --- /dev/null +++ b/package/bison/bison.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# bison +# +################################################################################ + +BISON_VERSION = 3.0.4 +BISON_SOURCE = bison-$(BISON_VERSION).tar.xz +BISON_SITE = $(BR2_GNU_MIRROR)/bison +BISON_LICENSE = GPLv3+ +BISON_LICENSE_FILES = COPYING +HOST_BISON_DEPENDENCIES = host-m4 + +$(eval $(host-autotools-package)) diff --git a/package/bitstream-vera/Config.in b/package/bitstream-vera/Config.in new file mode 100644 index 0000000000..034f115b4b --- /dev/null +++ b/package/bitstream-vera/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_BITSTREAM_VERA + bool "Bitstream Vera" + help + Bitstream Vera font family. + + https://www.gnome.org/fonts/ diff --git a/package/bitstream-vera/bitstream-vera.hash b/package/bitstream-vera/bitstream-vera.hash new file mode 100644 index 0000000000..e18b38bb65 --- /dev/null +++ b/package/bitstream-vera/bitstream-vera.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-vera/1.10/ttf-bitstream-vera-1.10.tar.bz2.sha256sum +sha256 db5b27df7bbb318036ebdb75acd3e98f1bd6eb6608fb70a67d478cd243d178dc ttf-bitstream-vera-1.10.tar.bz2 diff --git a/package/bitstream-vera/bitstream-vera.mk b/package/bitstream-vera/bitstream-vera.mk new file mode 100644 index 0000000000..f487d637c2 --- /dev/null +++ b/package/bitstream-vera/bitstream-vera.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# bitstream-vera +# +################################################################################ + +BITSTREAM_VERA_VERSION = 1.10 +BITSTREAM_VERA_SITE = http://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-vera/$(BITSTREAM_VERA_VERSION) +BITSTREAM_VERA_SOURCE = ttf-bitstream-vera-$(BITSTREAM_VERA_VERSION).tar.bz2 +BITSTREAM_VERA_TARGET_DIR = $(TARGET_DIR)/usr/share/fonts/ttf-bitstream-vera +BITSTREAM_VERA_LICENSE = BitstreamVera +BITSTREAM_VERA_LICENSE_FILES = COPYRIGHT.TXT + +define BITSTREAM_VERA_INSTALL_TARGET_CMDS + mkdir -p $(BITSTREAM_VERA_TARGET_DIR) + $(INSTALL) -m 644 $(@D)/*.ttf $(BITSTREAM_VERA_TARGET_DIR) +endef + +$(eval $(generic-package)) diff --git a/package/bitstream/Config.in b/package/bitstream/Config.in new file mode 100644 index 0000000000..9d967a0f58 --- /dev/null +++ b/package/bitstream/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_BITSTREAM + bool "bitstream" + help + biTStream is a set of C headers allowing a simpler access to + binary structures such as specified by MPEG, DVB, IETF, + SMPTE, IEEE, SCTE, etc. + + http://www.videolan.org/developers/bitstream.html diff --git a/package/bitstream/bitstream.hash b/package/bitstream/bitstream.hash new file mode 100644 index 0000000000..7a3b7f8633 --- /dev/null +++ b/package/bitstream/bitstream.hash @@ -0,0 +1,4 @@ +# from https://get.videolan.org/bitstream/1.1/bitstream-1.1.tar.bz2.md5 +md5 88e6e786242196b4d73a5b6075aeb1a2 bitstream-1.1.tar.bz2 +# locally calculated +sha256 90b65f619895d31e652386d5d7d2d2d62cccd44383c1fac9145d659013a2de9e bitstream-1.1.tar.bz2 diff --git a/package/bitstream/bitstream.mk b/package/bitstream/bitstream.mk new file mode 100644 index 0000000000..a76c3c44b5 --- /dev/null +++ b/package/bitstream/bitstream.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# bitstream +# +################################################################################ + +BITSTREAM_VERSION = 1.1 +BITSTREAM_SOURCE = bitstream-$(BITSTREAM_VERSION).tar.bz2 +BITSTREAM_SITE = https://get.videolan.org/bitstream/$(BITSTREAM_VERSION) +BITSTREAM_LICENSE = MIT +BITSTREAM_LICENSE_FILES = COPYING + +# package consists of header files only +BITSTREAM_INSTALL_STAGING = YES +BITSTREAM_INSTALL_TARGET = NO + +define BITSTREAM_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr install +endef + +$(eval $(generic-package)) diff --git a/package/blktrace/Config.in b/package/blktrace/Config.in new file mode 100644 index 0000000000..ed5d78a542 --- /dev/null +++ b/package/blktrace/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_BLKTRACE + bool "blktrace" + # Uses posix_spawn() + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + depends on BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS + select BR2_PACKAGE_LIBAIO + help + blktrace is a block layer IO tracing mechanism which provides + detailed information about request queue operations + up to user space. + + http://git.kernel.dk/?p=blktrace.git;a=summary + +comment "blktrace needs a (e)glibc or musl toolchain" + depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) diff --git a/package/blktrace/blktrace.hash b/package/blktrace/blktrace.hash new file mode 100644 index 0000000000..acd42fb199 --- /dev/null +++ b/package/blktrace/blktrace.hash @@ -0,0 +1,2 @@ +# From http://brick.kernel.dk/snaps/MD5SUMS +md5 9a6ca62330c8adb0b6a4ea6cf8a55694 blktrace-1.1.0.tar.gz diff --git a/package/blktrace/blktrace.mk b/package/blktrace/blktrace.mk new file mode 100644 index 0000000000..c193375bf8 --- /dev/null +++ b/package/blktrace/blktrace.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# blktrace +# +################################################################################ + +BLKTRACE_VERSION = 1.1.0 +BLKTRACE_SITE = http://brick.kernel.dk/snaps +BLKTRACE_DEPENDENCIES = libaio +BLKTRACE_LICENSE = GPLv2+ +BLKTRACE_LICENSE_FILES = COPYING + +define BLKTRACE_BUILD_CMDS + $(MAKE1) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define BLKTRACE_INSTALL_TARGET_CMDS + $(MAKE1) -C $(@D) $(TARGET_CONFIGURE_OPTS) install \ + DESTDIR=$(TARGET_DIR) prefix=/usr +endef + +$(eval $(generic-package)) diff --git a/package/bluez5_utils/0001-tools-bneptest.c-Remove-include-linux-if_bridge.h-to.patch b/package/bluez5_utils/0001-tools-bneptest.c-Remove-include-linux-if_bridge.h-to.patch new file mode 100644 index 0000000000..e8a3ff47bf --- /dev/null +++ b/package/bluez5_utils/0001-tools-bneptest.c-Remove-include-linux-if_bridge.h-to.patch @@ -0,0 +1,45 @@ +From 7c136b4f1941e5bb2a6c8d93985c5734c6aefb29 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sun, 22 May 2016 09:48:57 +0200 +Subject: [PATCH 1/1] tools/bneptest.c: Remove include linux/if_bridge.h to fix + musl build + +Inspired by busybox commit: +https://git.busybox.net/busybox/commit/networking/brctl.c?id=5fa6d1a632505789409a2ba6cf8e112529f9db18 + +The build error was found by the autobuilders of the buildroot project: +http://autobuild.buildroot.net/results/eba/ebaa0bcb9c325aa6ed0bbd6c7ec75d44befa7645/build-end.log + +Signed-off-by: Bernd Kuhls +(Patch sent upstream: + http://article.gmane.org/gmane.linux.bluez.kernel/67621) +--- + tools/bneptest.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/tools/bneptest.c b/tools/bneptest.c +index 1404252..b832d72 100644 +--- a/tools/bneptest.c ++++ b/tools/bneptest.c +@@ -36,7 +36,17 @@ + #include + #include + #include +-#include ++/* #include ++ * breaks on musl: we already included netinet/in.h, ++ * if we also include here, we get this: ++ * In file included from /usr/include/linux/if_bridge.h:18, ++ * from networking/brctl.c:67: ++ * /usr/include/linux/in6.h:32: error: redefinition of 'struct in6_addr' ++ * /usr/include/linux/in6.h:49: error: redefinition of 'struct sockaddr_in6' ++ * /usr/include/linux/in6.h:59: error: redefinition of 'struct ipv6_mreq' ++ */ ++/* From */ ++#define BRCTL_SET_BRIDGE_FORWARD_DELAY 8 + + #include + +-- +2.8.1 + diff --git a/package/bluez5_utils/Config.in b/package/bluez5_utils/Config.in new file mode 100644 index 0000000000..18b7bbf0e0 --- /dev/null +++ b/package/bluez5_utils/Config.in @@ -0,0 +1,88 @@ +config BR2_PACKAGE_BLUEZ5_UTILS + bool "bluez-utils 5.x" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2 + depends on BR2_USE_MMU # dbus + depends on !BR2_STATIC_LIBS # uses dlfcn + depends on !BR2_PACKAGE_BLUEZ_UTILS # conflicts with 4.x version + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + # wordexp support not in our uClibc configuration + depends on !BR2_TOOLCHAIN_USES_UCLIBC + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_LIBGLIB2 + help + bluez utils version 5.x + + With this release BlueZ only supports the new Bluetooth + Management kernel interface (introduced in Linux 3.4). + + For Low Energy support at least kernel version 3.5 is + needed. + + The API is not backward compatible with BlueZ 4. + + Bluez utils will use systemd and/or udev if enabled. + + http://www.bluez.org + http://www.kernel.org/pub/linux/bluetooth + +if BR2_PACKAGE_BLUEZ5_UTILS + +config BR2_PACKAGE_BLUEZ5_UTILS_OBEX + bool "build OBEX support" + select BR2_PACKAGE_LIBICAL + depends on BR2_INSTALL_LIBSTDCPP + help + Enable the OBEX support in Bluez 5.x. + +comment "OBEX support needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_BLUEZ5_UTILS_CLIENT + bool "build CLI client" + select BR2_PACKAGE_READLINE + help + Enable the Bluez 5.x command line client. + +config BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL + bool "install GATT tool" + depends on BR2_PACKAGE_BLUEZ5_UTILS_CLIENT + help + Generic Attribute Profile (GATT) support. This provides + profile discovery and description services for Bluetooth Low + Energy. This will install the gatttool utility. + + It is always built with BlueZ 5.x, but upstream choose not + to install it by default. + +config BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL + bool "build experimental plugins" + help + Build BlueZ 5.x experimental plugins (SAP, NFC, ...). + +config BR2_PACKAGE_BLUEZ5_PLUGINS_SIXAXIS + bool "build sixaxis plugin" + depends on BR2_PACKAGE_HAS_UDEV + help + Build BlueZ 5.x sixaxis plugin (support Sony Dualshock controller) + +comment "sixaxis plugin needs udev /dev management" + depends on !BR2_PACKAGE_HAS_UDEV + +config BR2_PACKAGE_BLUEZ5_UTILS_TEST + bool "build tests" + help + Build BlueZ 5.x tests + +endif + +comment "bluez5-utils needs a glibc or musl toolchain w/ wchar, threads, headers >= 3.4, dynamic library" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 || BR2_STATIC_LIBS || \ + !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_USE_MMU + +comment "bluez5-utils conflicts with older bluez-utils version" + depends on BR2_PACKAGE_BLUEZ_UTILS diff --git a/package/bluez5_utils/bluez5_utils.hash b/package/bluez5_utils/bluez5_utils.hash new file mode 100644 index 0000000000..cbb3aa3cad --- /dev/null +++ b/package/bluez5_utils/bluez5_utils.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc: +sha256 21d1bc9150d3576296595217efb98a746b592389d25d5637e8bee5da7272593b bluez-5.39.tar.xz diff --git a/package/bluez5_utils/bluez5_utils.mk b/package/bluez5_utils/bluez5_utils.mk new file mode 100644 index 0000000000..ddc8c452ee --- /dev/null +++ b/package/bluez5_utils/bluez5_utils.mk @@ -0,0 +1,85 @@ +################################################################################ +# +# bluez5_utils +# +################################################################################ + +BLUEZ5_UTILS_VERSION = 5.39 +BLUEZ5_UTILS_SOURCE = bluez-$(BLUEZ5_UTILS_VERSION).tar.xz +BLUEZ5_UTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth +BLUEZ5_UTILS_INSTALL_STAGING = YES +BLUEZ5_UTILS_DEPENDENCIES = dbus libglib2 +BLUEZ5_UTILS_LICENSE = GPLv2+, LGPLv2.1+ +BLUEZ5_UTILS_LICENSE_FILES = COPYING COPYING.LIB + +BLUEZ5_UTILS_CONF_OPTS = \ + --enable-tools \ + --enable-library \ + --disable-cups + +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_OBEX),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-obex +BLUEZ5_UTILS_DEPENDENCIES += libical +else +BLUEZ5_UTILS_CONF_OPTS += --disable-obex +endif + +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_CLIENT),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-client +BLUEZ5_UTILS_DEPENDENCIES += readline +else +BLUEZ5_UTILS_CONF_OPTS += --disable-client +endif + +# experimental plugins +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_EXPERIMENTAL),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-experimental +else +BLUEZ5_UTILS_CONF_OPTS += --disable-experimental +endif + +# enable sixaxis plugin +ifeq ($(BR2_PACKAGE_BLUEZ5_PLUGINS_SIXAXIS),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-sixaxis +else +BLUEZ5_UTILS_CONF_OPTS += --disable-sixaxis +endif + +# install gatttool (For some reason upstream choose not to do it by default) +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_GATTTOOL),y) +define BLUEZ5_UTILS_INSTALL_GATTTOOL + $(INSTALL) -D -m 0755 $(@D)/attrib/gatttool $(TARGET_DIR)/usr/bin/gatttool +endef +BLUEZ5_UTILS_POST_INSTALL_TARGET_HOOKS += BLUEZ5_UTILS_INSTALL_GATTTOOL +endif + +# enable test +ifeq ($(BR2_PACKAGE_BLUEZ5_UTILS_TEST),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-test +else +BLUEZ5_UTILS_CONF_OPTS += --disable-test +endif + +# use udev if available +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-udev +BLUEZ5_UTILS_DEPENDENCIES += udev +else +BLUEZ5_UTILS_CONF_OPTS += --disable-udev +endif + +# integrate with systemd if available +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +BLUEZ5_UTILS_CONF_OPTS += --enable-systemd +BLUEZ5_UTILS_DEPENDENCIES += systemd +else +BLUEZ5_UTILS_CONF_OPTS += --disable-systemd +endif + +define BLUEZ5_UTILS_INSTALL_INIT_SYSTEMD + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ + ln -fs ../../../../usr/lib/systemd/system/bluetooth.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/bluetooth.service +endef + +$(eval $(autotools-package)) diff --git a/package/bluez_utils/0001-enable_cg2900_on_upstream_4.91.patch b/package/bluez_utils/0001-enable_cg2900_on_upstream_4.91.patch new file mode 100644 index 0000000000..e80af5fd90 --- /dev/null +++ b/package/bluez_utils/0001-enable_cg2900_on_upstream_4.91.patch @@ -0,0 +1,106 @@ +From ac7992081abba87627c9e91735b3309584b48585 Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Wed, 14 Nov 2012 14:27:02 +0100 +Subject: [PATCH] add support for the ST-Ericsson CG2900 GPS FM Bluetooth + combo controller + + +Signed-off-by: Gregory Hermant +--- + tools/hciattach.c | 22 +++++++++++++++------- + tools/hciattach.h | 1 + + 2 files changed, 16 insertions(+), 7 deletions(-) + +diff --git a/tools/hciattach.c b/tools/hciattach.c +index e4d5aa1..7f08243 100644 +--- a/tools/hciattach.c ++++ b/tools/hciattach.c +@@ -1066,6 +1066,11 @@ struct uart_t uart[] = { + { "texasalt", 0x0000, 0x0000, HCI_UART_LL, 115200, 115200, + FLOW_CTL, DISABLE_PM, NULL, texasalt, NULL }, + ++ /* ST-Ericsson CG2900 GPS FM Bluetooth combo controller */ ++ { "cg2900", 0x0000, 0x0000, HCI_UART_STE, 115200, 115200, ++ FLOW_CTL, DISABLE_PM, NULL, NULL }, ++ ++ + /* ST Microelectronics minikits based on STLC2410/STLC2415 */ + { "st", 0x0000, 0x0000, HCI_UART_H4, 57600, 115200, + FLOW_CTL, DISABLE_PM, NULL, st }, +@@ -1157,10 +1162,10 @@ static struct uart_t * get_by_type(char *type) + } + + /* Initialize UART driver */ +-static int init_uart(char *dev, struct uart_t *u, int send_break, int raw) ++static int init_uart(char *dev, struct uart_t *u, int send_break, int raw, int line_disc) + { + struct termios ti; +- int fd, i; ++ int fd; + unsigned long flags = 0; + + if (raw) +@@ -1217,8 +1222,7 @@ static int init_uart(char *dev, struct uart_t *u, int send_break, int raw) + } + + /* Set TTY to N_HCI line discipline */ +- i = N_HCI; +- if (ioctl(fd, TIOCSETD, &i) < 0) { ++ if (ioctl(fd, TIOCSETD, &line_disc) < 0) { + perror("Can't set line discipline"); + return -1; + } +@@ -1243,7 +1247,7 @@ static void usage(void) + { + printf("hciattach - HCI UART driver initialization utility\n"); + printf("Usage:\n"); +- printf("\thciattach [-n] [-p] [-b] [-r] [-t timeout] [-s initial_speed] [speed] [flow|noflow] [bdaddr]\n"); ++ printf("\thciattach [-n] [-p] [-a line_disc_nr] [-b] [-r] [-t timeout] [-s initial_speed] [speed] [flow|noflow] [bdaddr]\n"); + printf("\thciattach -l\n"); + } + +@@ -1252,6 +1256,7 @@ int main(int argc, char *argv[]) + struct uart_t *u = NULL; + int detach, printpid, raw, opt, i, n, ld, err; + int to = 10; ++ int line_disc = N_HCI; + int init_speed = 0; + int send_break = 0; + pid_t pid; +@@ -1264,8 +1269,11 @@ int main(int argc, char *argv[]) + printpid = 0; + raw = 0; + +- while ((opt=getopt(argc, argv, "bnpt:s:lr")) != EOF) { ++ while ((opt=getopt(argc, argv, "bnpt:s:lra:")) != EOF) { + switch(opt) { ++ case 'a': ++ line_disc = atoi(optarg); ++ break; + case 'b': + send_break = 1; + break; +@@ -1381,7 +1389,7 @@ int main(int argc, char *argv[]) + alarm(to); + bcsp_max_retries = to; + +- n = init_uart(dev, u, send_break, raw); ++ n = init_uart(dev, u, send_break, raw, line_disc); + if (n < 0) { + perror("Can't initialize device"); + exit(1); +diff --git a/tools/hciattach.h b/tools/hciattach.h +index fed0d11..09b534d 100644 +--- a/tools/hciattach.h ++++ b/tools/hciattach.h +@@ -39,6 +39,7 @@ + #define HCI_UART_H4DS 3 + #define HCI_UART_LL 4 + #define HCI_UART_ATH3K 5 ++#define HCI_UART_STE 6 + + #define HCI_UART_RAW_DEVICE 0 + +-- +1.7.9.5 + diff --git a/package/bluez_utils/0002-tools-hciconfig-include-fcntl.h.patch b/package/bluez_utils/0002-tools-hciconfig-include-fcntl.h.patch new file mode 100644 index 0000000000..7d0763ff03 --- /dev/null +++ b/package/bluez_utils/0002-tools-hciconfig-include-fcntl.h.patch @@ -0,0 +1,27 @@ +From ae607756a5f2a09bce1fc3a52e74b5f471245e33 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 6 Apr 2015 23:54:19 +0200 +Subject: [PATCH] tools/hciconfig: include + +Needed to get the definition of mode_t in musl. + +Signed-off-by: Thomas Petazzoni +--- + tools/hciconfig.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/hciconfig.c b/tools/hciconfig.c +index f1458b9..6776d62 100644 +--- a/tools/hciconfig.c ++++ b/tools/hciconfig.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.1.0 + diff --git a/package/bluez_utils/0003-fix-compilation-issues-with-musl.patch b/package/bluez_utils/0003-fix-compilation-issues-with-musl.patch new file mode 100644 index 0000000000..d8b48eaad2 --- /dev/null +++ b/package/bluez_utils/0003-fix-compilation-issues-with-musl.patch @@ -0,0 +1,61 @@ +From 8aa6aa4ba2d9d00c91e36e146895af20cbc00d17 Mon Sep 17 00:00:00 2001 +From: Brendan Heading +Date: Wed, 2 Sep 2015 12:10:58 +0100 +Subject: [PATCH 1/1] fix compilation issues with musl. + +- sys/time.h needed for struct timeval +- unistd.h should not be included due to clash with encrypt(3) +- sys/types.h needed for mode_t + +Note that this version of bluez is 3 years old. Recent fixes have gone +into the upstream to address musl compatibility issues, but the upstream +has changed so much that it makes little sense to try to backport these. +This patch is really a stopgap until we move to the latest upstream. + +Upstream-Status: not needed +Signed-off-by: Brendan Heading +--- + compat/bnep.c | 1 + + compat/dund.c | 1 - + src/textfile.h | 1 + + 3 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/compat/bnep.c b/compat/bnep.c +index 281350b..49226c1 100644 +--- a/compat/bnep.c ++++ b/compat/bnep.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #include + #include +diff --git a/compat/dund.c b/compat/dund.c +index af1b536..c2f085f 100644 +--- a/compat/dund.c ++++ b/compat/dund.c +@@ -29,7 +29,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff --git a/src/textfile.h b/src/textfile.h +index dc5fc2b..0148b30 100644 +--- a/src/textfile.h ++++ b/src/textfile.h +@@ -24,6 +24,7 @@ + #ifndef __TEXTFILE_H + #define __TEXTFILE_H + ++#include + int create_dirs(const char *filename, const mode_t mode); + int create_file(const char *filename, const mode_t mode); + int create_name(char *buf, size_t size, const char *path, +-- +2.4.3 + diff --git a/package/bluez_utils/Config.in b/package/bluez_utils/Config.in new file mode 100644 index 0000000000..3848162697 --- /dev/null +++ b/package/bluez_utils/Config.in @@ -0,0 +1,46 @@ +config BR2_PACKAGE_BLUEZ_UTILS + bool "bluez-utils" + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib, libglib2 + depends on BR2_USE_MMU # dbus, libglib2 + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_LIBGLIB2 + help + bluez utils + + http://www.kernel.org/pub/linux/bluetooth + +if BR2_PACKAGE_BLUEZ_UTILS + +config BR2_PACKAGE_BLUEZ_UTILS_COMPAT + bool "BlueZ 3.x compatibility binaries" + help + BlueZ 3.x compatibility binaries like pand, hidd, sdp + +config BR2_PACKAGE_BLUEZ_UTILS_AUDIO + bool "audio support" + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_LIBSNDFILE + help + Audio support + +config BR2_PACKAGE_BLUEZ_UTILS_USB + bool "USB support" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + help + USB support + +config BR2_PACKAGE_BLUEZ_UTILS_GATT + bool "GATT support" + select BR2_PACKAGE_READLINE + help + Generic Attribute Profile (GATT) support. This provides profile + discovery and description services for Bluetooth Low Energy. + This will install the gatttool utility. +endif + +comment "bluez-utils needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/bluez_utils/bluez_utils.hash b/package/bluez_utils/bluez_utils.hash new file mode 100644 index 0000000000..09b7b21d82 --- /dev/null +++ b/package/bluez_utils/bluez_utils.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc: +sha256 41f9578bef39b8c94a2d6ddeaa556afd22d136936d0f03100e422fe970a45a7d bluez-4.101.tar.xz diff --git a/package/bluez_utils/bluez_utils.mk b/package/bluez_utils/bluez_utils.mk new file mode 100644 index 0000000000..c2e8295154 --- /dev/null +++ b/package/bluez_utils/bluez_utils.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# bluez_utils +# +################################################################################ + +BLUEZ_UTILS_VERSION = 4.101 +BLUEZ_UTILS_SOURCE = bluez-$(BLUEZ_UTILS_VERSION).tar.xz +BLUEZ_UTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth +BLUEZ_UTILS_INSTALL_STAGING = YES +BLUEZ_UTILS_DEPENDENCIES = dbus libglib2 +BLUEZ_UTILS_CONF_OPTS = --enable-test --enable-tools +BLUEZ_UTILS_AUTORECONF = YES +BLUEZ_UTILS_LICENSE = GPLv2+, LGPLv2.1+ +BLUEZ_UTILS_LICENSE_FILES = COPYING COPYING.LIB + +# BlueZ 3.x compatibility +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_COMPAT),y) +BLUEZ_UTILS_CONF_OPTS += \ + --enable-hidd \ + --enable-pand \ + --enable-sdp \ + --enable-dund +endif + +# audio support +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_AUDIO),y) +BLUEZ_UTILS_DEPENDENCIES += \ + alsa-lib \ + libsndfile +BLUEZ_UTILS_CONF_OPTS += \ + --enable-alsa \ + --enable-audio +else +BLUEZ_UTILS_CONF_OPTS += \ + --disable-alsa \ + --disable-audio +endif + +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_GATT),y) +BLUEZ_UTILS_DEPENDENCIES += readline +BLUEZ_UTILS_CONF_OPTS += --enable-gatt +else +BLUEZ_UTILS_CONF_OPTS += --disable-gatt +endif + +# USB support +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS_USB),y) +BLUEZ_UTILS_DEPENDENCIES += libusb +BLUEZ_UTILS_CONF_OPTS += \ + --enable-usb +else +BLUEZ_UTILS_CONF_OPTS += \ + --disable-usb +endif + +$(eval $(autotools-package)) diff --git a/package/bmon/Config.in b/package/bmon/Config.in new file mode 100644 index 0000000000..09ae9cb993 --- /dev/null +++ b/package/bmon/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_BMON + bool "bmon" + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + select BR2_PACKAGE_LIBCONFUSE + select BR2_PACKAGE_LIBNL + select BR2_PACKAGE_NCURSES + help + bmon is a bandwidth monitor capable of retrieving statistics from + various input modules. It provides various output methods + including a curses based interface. + + http://www.infradead.org/~tgr/bmon/ + +comment "bmon needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/bmon/bmon.hash b/package/bmon/bmon.hash new file mode 100644 index 0000000000..810a0b9b64 --- /dev/null +++ b/package/bmon/bmon.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 a9f3d7010074a3190038a8d95df5d47aaf2046b47d872590336b5f93be084685 bmon-3.7.tar.gz diff --git a/package/bmon/bmon.mk b/package/bmon/bmon.mk new file mode 100644 index 0000000000..0939609317 --- /dev/null +++ b/package/bmon/bmon.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# bmon +# +################################################################################ + +BMON_VERSION = 3.7 +BMON_SITE = https://github.com/tgraf/bmon/releases/download/v$(BMON_VERSION) +BMON_DEPENDENCIES = host-pkgconf libconfuse libnl ncurses +BMON_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' +BMON_LICENSE = BSD-2c, MIT +BMON_LICENSE_FILES = LICENSE.BSD LICENSE.MIT + +# link dynamically unless explicitly requested otherwise +ifeq ($(BR2_STATIC_LIBS),) +BMON_CONF_OPTS += --disable-static +else +# forgets to explicitly link with pthread for libnl +BMON_CONF_OPTS += LIBS=-lpthread +endif + +$(eval $(autotools-package)) diff --git a/package/boa/0001-use-name-max.patch b/package/boa/0001-use-name-max.patch new file mode 100644 index 0000000000..055e56c3e1 --- /dev/null +++ b/package/boa/0001-use-name-max.patch @@ -0,0 +1,21 @@ +Use NAME_MAX instead of MAXNAMLEN + +NAME_MAX is POSIX, and available in all C libraries, generally in +, while MAXNAMLEN is BSD-specific, and only available in +musl in . So let's use NAME_MAX instead of MAXNAMLEN. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/index_dir.c +=================================================================== +--- a/src/index_dir.c ++++ b/src/index_dir.c +@@ -29,7 +29,7 @@ + #include + #include "compat.h" + +-#define MAX_FILE_LENGTH MAXNAMLEN ++#define MAX_FILE_LENGTH NAME_MAX + #define MAX_PATH_LENGTH PATH_MAX + + #define INT_TO_HEX(x) \ diff --git a/package/boa/Config.in b/package/boa/Config.in new file mode 100644 index 0000000000..cb085a2494 --- /dev/null +++ b/package/boa/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_BOA + bool "boa" + depends on BR2_USE_MMU # uses fork() + help + A very small and very fast http daemon. Not intended as + a feature-packed server. + + http://www.boa.org/ diff --git a/package/boa/boa.conf b/package/boa/boa.conf new file mode 100644 index 0000000000..f51c237316 --- /dev/null +++ b/package/boa/boa.conf @@ -0,0 +1,187 @@ +# Boa v0.94 configuration file +# File format has not changed from 0.93 +# File format has changed little from 0.92 +# version changes are noted in the comments +# +# The Boa configuration file is parsed with a lex/yacc or flex/bison +# generated parser. If it reports an error, the line number will be +# provided; it should be easy to spot. The syntax of each of these +# rules is very simple, and they can occur in any order. Where possible +# these directives mimic those of NCSA httpd 1.3; I saw no reason to +# introduce gratuitous differences. + +# $Id: boa.conf,v 1.1 2004/10/09 02:48:37 andersen Exp $ + +# The "ServerRoot" is not in this configuration file. It can be compiled +# into the server (see defines.h) or specified on the command line with +# the -c option, for example: +# +# boa -c /usr/local/boa + + +# Port: The port Boa runs on. The default port for http servers is 80. +# If it is less than 1024, the server must be started as root. + +Port 80 + +# Listen: the Internet address to bind(2) to. If you leave it out, +# it takes the behavior before 0.93.17.2, which is to bind to all +# addresses (INADDR_ANY). You only get one "Listen" directive, +# if you want service on multiple IP addresses, you have three choices: +# 1. Run boa without a "Listen" directive +# a. All addresses are treated the same; makes sense if the addresses +# are localhost, ppp, and eth0. +# b. Use the VirtualHost directive below to point requests to different +# files. Should be good for a very large number of addresses (web +# hosting clients). +# 2. Run one copy of boa per IP address, each has its own configuration +# with a "Listen" directive. No big deal up to a few tens of addresses. +# Nice separation between clients. +# The name you provide gets run through inet_aton(3), so you have to use dotted +# quad notation. This configuration is too important to trust some DNS. + +#Listen 192.68.0.5 + +# User: The name or UID the server should run as. +# Group: The group name or GID the server should run as. + +User nobody +Group nobody + +# ServerAdmin: The email address where server problems should be sent. +# Note: this is not currently used, except as an environment variable +# for CGIs. + +#ServerAdmin root@localhost + +# ErrorLog: The location of the error log file. If this does not start +# with /, it is considered relative to the server root. +# Set to /dev/null if you don't want errors logged. +# If unset, defaults to /dev/stderr + +ErrorLog /var/log/boa/error_log +# Please NOTE: Sending the logs to a pipe ('|'), as shown below, +# is somewhat experimental and might fail under heavy load. +# "Usual libc implementations of printf will stall the whole +# process if the receiving end of a pipe stops reading." +#ErrorLog "|/usr/sbin/cronolog --symlink=/var/log/boa/error_log /var/log/boa/error-%Y%m%d.log" + +# AccessLog: The location of the access log file. If this does not +# start with /, it is considered relative to the server root. +# Comment out or set to /dev/null (less effective) to disable +# Access logging. + +AccessLog /var/log/boa/access_log +# Please NOTE: Sending the logs to a pipe ('|'), as shown below, +# is somewhat experimental and might fail under heavy load. +# "Usual libc implementations of printf will stall the whole +# process if the receiving end of a pipe stops reading." +#AccessLog "|/usr/sbin/cronolog --symlink=/var/log/boa/access_log /var/log/boa/access-%Y%m%d.log" + +# UseLocaltime: Logical switch. Uncomment to use localtime +# instead of UTC time +#UseLocaltime + +# VerboseCGILogs: this is just a logical switch. +# It simply notes the start and stop times of cgis in the error log +# Comment out to disable. + +#VerboseCGILogs + +# ServerName: the name of this server that should be sent back to +# clients if different than that returned by gethostname + gethostbyname + +#ServerName www.your.org.here + +# VirtualHost: a logical switch. +# Comment out to disable. +# Given DocumentRoot /var/www, requests on interface 'A' or IP 'IP-A' +# become /var/www/IP-A. +# Example: http://localhost/ becomes /var/www/127.0.0.1 +# +# Not used until version 0.93.17.2. This "feature" also breaks commonlog +# output rules, it prepends the interface number to each access_log line. +# You are expected to fix that problem with a postprocessing script. + +#VirtualHost + +# DocumentRoot: The root directory of the HTML documents. +# Comment out to disable server non user files. + +DocumentRoot /var/www + +# UserDir: The name of the directory which is appended onto a user's home +# directory if a ~user request is recieved. + +UserDir public_html + +# DirectoryIndex: Name of the file to use as a pre-written HTML +# directory index. Please MAKE AND USE THESE FILES. On the +# fly creation of directory indexes can be _slow_. +# Comment out to always use DirectoryMaker + +DirectoryIndex index.html + +# DirectoryMaker: Name of program used to create a directory listing. +# Comment out to disable directory listings. If both this and +# DirectoryIndex are commented out, accessing a directory will give +# an error (though accessing files in the directory are still ok). + +DirectoryMaker /usr/lib/boa/boa_indexer + +# DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker +# has been commented out, the the on-the-fly indexing of Boa can be used +# to generate indexes of directories. Be warned that the output is +# extremely minimal and can cause delays when slow disks are used. +# Note: The DirectoryCache must be writable by the same user/group that +# Boa runs as. + +# DirectoryCache /var/spool/boa/dircache + +# KeepAliveMax: Number of KeepAlive requests to allow per connection +# Comment out, or set to 0 to disable keepalive processing + +KeepAliveMax 1000 + +# KeepAliveTimeout: seconds to wait before keepalive connection times out + +KeepAliveTimeout 10 + +# MimeTypes: This is the file that is used to generate mime type pairs +# and Content-Type fields for boa. +# Set to /dev/null if you do not want to load a mime types file. +# Do *not* comment out (better use AddType!) + +MimeTypes /etc/mime.types + +# DefaultType: MIME type used if the file extension is unknown, or there +# is no file extension. + +DefaultType text/plain + +# AddType: adds types without editing mime.types +# Example: AddType type extension [extension ...] + +# Uncomment the next line if you want .cgi files to execute from anywhere +#AddType application/x-httpd-cgi cgi + +# Redirect, Alias, and ScriptAlias all have the same semantics -- they +# match the beginning of a request and take appropriate action. Use +# Redirect for other servers, Alias for the same server, and ScriptAlias +# to enable directories for script execution. + +# Redirect allows you to tell clients about documents which used to exist in +# your server's namespace, but do not anymore. This allows you to tell the +# clients where to look for the relocated document. +# Example: Redirect /bar http://elsewhere/feh/bar + +# Aliases: Aliases one path to another. +# Example: Alias /path1/bar /path2/foo + +# Alias /doc /usr/doc + +# ScriptAlias: Maps a virtual path to a directory for serving scripts +# Example: ScriptAlias /htbin/ /www/htbin/ + +ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ + diff --git a/package/boa/boa.hash b/package/boa/boa.hash new file mode 100644 index 0000000000..37760fd51d --- /dev/null +++ b/package/boa/boa.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 02c51bf25f29d56e641b662f0767759654c28d88ec31f55c5a73d57edfe13cf6 boa-0.94.14rc21.tar.gz diff --git a/package/boa/boa.mk b/package/boa/boa.mk new file mode 100644 index 0000000000..ab23d901cc --- /dev/null +++ b/package/boa/boa.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# boa +# +################################################################################ + +BOA_VERSION = 0.94.14rc21 +BOA_SITE = http://www.boa.org +BOA_LICENSE = GPLv2+ +BOA_LICENSE_FILES = COPYING + +define BOA_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/src/boa $(TARGET_DIR)/usr/sbin/boa + $(INSTALL) -D -m 755 $(@D)/src/boa_indexer $(TARGET_DIR)/usr/lib/boa/boa_indexer + $(INSTALL) -D -m 644 package/boa/boa.conf $(TARGET_DIR)/etc/boa/boa.conf + $(INSTALL) -D -m 644 package/boa/mime.types $(TARGET_DIR)/etc/mime.types +endef + +$(eval $(autotools-package)) diff --git a/package/boa/mime.types b/package/boa/mime.types new file mode 100644 index 0000000000..53f6ea1011 --- /dev/null +++ b/package/boa/mime.types @@ -0,0 +1,205 @@ +############################################################################### +# +# MIME-TYPES and the extensions that represent them +# +# This file is part of the "mime-support" package. Please send email (not a +# bug report) to mime-support@packages.debian.org if you would like new types +# and/or extensions to be added. +# +# Note: Compression schemes like "gzip", "bzip", and "compress" are not +# actually "mime-types". They are "encodings" and hence must _not_ have +# entries in this file to map their extensions. The "mime-type" of an +# encoded file refers to the type of data that has been encoded, not the +# type of the encoding. +# +############################################################################### + + +application/activemessage +application/andrew-inset +application/applefile +application/atomicmail +application/cu-seeme csm cu +application/dca-rft +application/dec-dx +application/dsptype tsp +application/futuresplash spl +application/ghostview +application/mac-binhex40 hqx +application/macwriteii +application/msaccess mdb +application/msword doc dot +application/news-message-id +application/news-transmission +application/octet-stream bin +application/oda oda +application/pdf pdf +application/pgp-signature pgp +application/postscript ps ai eps +application/remote-printing +application/rtf rtf +application/slate +application/vnd.ms-excel xls xlb +application/vnd.ms-powerpoint ppt pps pot +application/vnd.wap.wmlc wmlc +application/vnd.wap.wmlscriptc wmlsc +application/wita +application/wordperfect5.1 wp5 +application/zip zip +application/x-123 wk +application/x-bcpio bcpio +application/x-chess-pgn pgn +application/x-core +application/x-cpio cpio +application/x-csh +application/x-debian-package deb +application/x-director dcr dir dxr +application/x-dms dms +application/x-dvi dvi +application/x-executable +application/x-font pfa pfb gsf pcf pcf.Z +application/x-gnumeric gnumeric +application/x-gtar gtar tgz +application/x-hdf hdf +application/x-httpd-php phtml pht php +application/x-httpd-php3 php3 +application/x-httpd-php3-source phps +application/x-httpd-php3-preprocessed php3p +application/x-httpd-php4 php4 +application/x-ica ica +application/x-java class +application/x-javascript js +application/x-kdelnk +application/x-kchart chrt +application/x-killustrator kil +application/x-kpresenter kpr kpt +application/x-kspread ksp +application/x-kword kwd kwt +application/x-latex latex +application/x-lha lha +application/x-lzh lzh +application/x-lzx lzx +application/x-maker frm maker frame fm fb book fbdoc +application/x-mif mif +application/x-msdos-program com exe bat dll +application/x-msi msi +application/x-netcdf nc cdf +application/x-ns-proxy-autoconfig pac +application/x-object o +application/x-ogg ogg +application/x-oz-application oza +application/x-perl pl pm +application/x-redhat-package-manager rpm +application/x-rx +application/x-sh +application/x-shar shar +application/x-shellscript +application/x-shockwave-flash swf swfl +application/x-stuffit sit +application/x-sv4cpio sv4cpio +application/x-sv4crc sv4crc +application/x-tar tar +application/x-tcl +application/x-tex +application/x-tex-gf gf +application/x-tex-pk pk PK +application/x-texinfo texinfo texi +application/x-trash ~ % bak old sik +application/x-troff t tr roff +application/x-troff-man man +application/x-troff-me me +application/x-troff-ms ms +application/x-ustar ustar +application/x-wais-source src +application/x-wingz wz + +audio/basic au snd +audio/midi mid midi +audio/mpeg mpga mpega mp2 mp3 +audio/mpegurl m3u +audio/prs.sid sid +audio/x-aiff aif aiff aifc +audio/x-gsm gsm +audio/x-pn-realaudio ra rm ram +audio/x-wav wav + +image/bitmap bmp +image/gif gif +image/ief ief +image/jpeg jpeg jpg jpe +image/pcx pcx +image/png png +image/tiff tiff tif +image/vnd.wap.wbmp wbmp +image/x-cmu-raster ras +image/x-coreldraw cdr +image/x-coreldrawpattern pat +image/x-coreldrawtemplate cdt +image/x-corelphotopaint cpt +image/x-jng jng +image/x-portable-anymap pnm +image/x-portable-bitmap pbm +image/x-portable-graymap pgm +image/x-portable-pixmap ppm +image/x-rgb rgb +image/x-xbitmap xbm +image/x-xpixmap xpm +image/x-xwindowdump xwd + +inode/chardevice +inode/blockdevice +inode/directory-locked +inode/directory +inode/fifo +inode/socket + +message/external-body +message/news +message/partial +message/rfc822 + +multipart/alternative +multipart/appledouble +multipart/digest +multipart/mixed +multipart/parallel + +text/comma-separated-values csv +text/css css +text/english +text/html htm html xhtml +text/mathml mml +text/plain txt text diff +text/richtext rtx +text/tab-separated-values tsv +text/vnd.wap.wml wml +text/vnd.wap.wmlscript wmls +text/xml xml +text/x-c++hdr h++ hpp hxx hh +text/x-c++src c++ cpp cxx cc +text/x-chdr h +text/x-crontab +text/x-csh csh +text/x-csrc c +text/x-java java +text/x-makefile +text/x-moc moc +text/x-pascal p pas +text/x-setext etx +text/x-sh sh +text/x-tcl tcl tk +text/x-tex tex ltx sty cls +text/x-vcalendar vcs +text/x-vcard vcf + +video/dl dl +video/fli fli +video/gl gl +video/mpeg mpeg mpg mpe +video/quicktime qt mov +video/x-mng mng +video/x-ms-asf asf asx +video/x-msvideo avi +video/x-sgi-movie movie + +x-world/x-vrml vrm vrml wrl diff --git a/package/bonnie/Config.in b/package/bonnie/Config.in new file mode 100644 index 0000000000..4b0adda0d0 --- /dev/null +++ b/package/bonnie/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_BONNIE + bool "bonnie++" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + help + A benchmark suite that is aimed at performing a number of + simple tests of hard drive and file system performance. + + http://www.coker.com.au/bonnie++/ + +comment "bonnie++ needs a toolchain w/ C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/bonnie/bonnie.hash b/package/bonnie/bonnie.hash new file mode 100644 index 0000000000..acf00fdbe9 --- /dev/null +++ b/package/bonnie/bonnie.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 cb3866116634bf65760b6806be4afa7e24a1cad6f145c876df8721f01ba2e2cb bonnie++-1.03e.tgz diff --git a/package/bonnie/bonnie.mk b/package/bonnie/bonnie.mk new file mode 100644 index 0000000000..787d1804fa --- /dev/null +++ b/package/bonnie/bonnie.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# bonnie +# +################################################################################ + +BONNIE_VERSION = 1.03e +BONNIE_SOURCE = bonnie++-$(BONNIE_VERSION).tgz +BONNIE_SITE = http://www.coker.com.au/bonnie++ +BONNIE_LICENSE = GPLv2 +BONNIE_LICENSE_FILES = copyright.txt + +define BONNIE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/bonnie++ $(TARGET_DIR)/usr/sbin/bonnie++ + $(INSTALL) -D -m 755 $(@D)/zcav $(TARGET_DIR)/usr/sbin/zcav +endef + +$(eval $(autotools-package)) diff --git a/package/boost/0001-fix-ambiguous-format-call-on-64bit-builds.patch b/package/boost/0001-fix-ambiguous-format-call-on-64bit-builds.patch new file mode 100644 index 0000000000..e8972fd726 --- /dev/null +++ b/package/boost/0001-fix-ambiguous-format-call-on-64bit-builds.patch @@ -0,0 +1,27 @@ +boost: fix ambiguous format call on 64-bit builds + +Fixes problem: + +libs/locale/src/icu/formatter.cpp: In member function +'virtual std::basic_string<_CharT, std::char_traits<_CharT>, std::allocator<_CharT> > boost::locale::impl_icu::number_format::format(boost::int64_t, size_t&) const': +libs/locale/src/icu/formatter.cpp:61: error: call of overloaded 'format(boost::int64_t&, icu_49::UnicodeString&)' is ambiguous +/ec/include/unicode/numfmt.h:317: note: candidates are: icu_49::UnicodeString& icu_49::NumberFormat::format(double, icu_49::UnicodeString&) const +/ec/include/unicode/numfmt.h:330: note: icu_49::UnicodeString& icu_49::NumberFormat::format(int32_t, icu_49::UnicodeString&) const +/ec/include/unicode/numfmt.h:343: note: icu_49::UnicodeString& icu_49::NumberFormat::format(int64_t, icu_49::UnicodeString&) const + +Signed-off-by: Thomas De Schampheleire +Backported-from: https://svn.boost.org/trac/boost/ticket/6851 + + +diff -ruN boost_1_49_0.orig/libs/locale/src/icu/formatter.cpp boost_1_49_0/libs/locale/src/icu/formatter.cpp +--- boost_1_49_0.orig/libs/locale/src/icu/formatter.cpp 2011-07-12 14:57:36.000000000 +0100 ++++ boost_1_49_0/libs/locale/src/icu/formatter.cpp 2012-05-01 14:27:54.000000000 +0100 +@@ -58,7 +58,7 @@ + virtual string_type format(int64_t value,size_t &code_points) const + { + icu::UnicodeString tmp; +- icu_fmt_->format(value,tmp); ++ icu_fmt_->format(::int64_t(value),tmp); + code_points=tmp.countChar32(); + return cvt_.std(tmp); + } diff --git a/package/boost/0002-fix-uclibc-eventfd.patch b/package/boost/0002-fix-uclibc-eventfd.patch new file mode 100644 index 0000000000..1b7eb8723c --- /dev/null +++ b/package/boost/0002-fix-uclibc-eventfd.patch @@ -0,0 +1,38 @@ +Use eventfd() function with uClibc + +The Boost eventfd code either directly makes the eventfd system call +using __NR_eventfd (when __GLIBC_MINOR is less than 8), or otherwise +uses the eventfd() function provided by the C library. + +However, since uClibc pretends to be glibc 2.2, the Boost eventfd code +directly uses the system call. While it works fine on most +architectures, it doesn't on ARC since __NR_eventfd is not defined on +this architecture. However, eventfd() is properly implemented. + +So, this patch adjusts the logic used by Boost to consider uClibc as a +C library providing the eventfd() function. + +Signed-off-by: Thomas Petazzoni + +Index: b/boost/asio/detail/impl/eventfd_select_interrupter.ipp +=================================================================== +--- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp ++++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp +@@ -23,7 +23,7 @@ + #include + #include + #include +-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 ++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__) + # include + #else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 + # include +@@ -46,7 +46,7 @@ + + void eventfd_select_interrupter::open_descriptors() + { +-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 ++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__) + write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0); + if (read_descriptor_ != -1) + { diff --git a/package/boost/0003-fix-libquadmath-issue.patch b/package/boost/0003-fix-libquadmath-issue.patch new file mode 100644 index 0000000000..49772e828e --- /dev/null +++ b/package/boost/0003-fix-libquadmath-issue.patch @@ -0,0 +1,91 @@ +From 74ff2db959c5fa75bec770c41ed2951a740fe936 Mon Sep 17 00:00:00 2001 +From: jzmaddock +Date: Fri, 1 Jan 2016 16:49:48 +0000 +Subject: [PATCH] Change config to not use it at all if we don't + have __has_include as GCC may be configured with --disable-libquadmath but + still signal that it supports __float128 + +Backported from: 74ff2db959c5fa75bec770c41ed2951a740fe936 + +[Jörg Krause: adjust pathes to match sourceforge release tarball] +Signed-off-by: Jörg Krause + +--- + boost/math/special_functions/fpclassify.hpp | 16 +++++++++++++--- + boost/math/tools/config.hpp | 12 ------------ + 2 files changed, 13 insertions(+), 15 deletions(-) + +diff --git a/boost/math/special_functions/fpclassify.hpp b/boost/math/special_functions/fpclassify.hpp +index 0a4e1ac..58fad13 100644 +--- a/boost/math/special_functions/fpclassify.hpp ++++ b/boost/math/special_functions/fpclassify.hpp +@@ -81,7 +81,12 @@ is used. + #include + #endif + #ifdef BOOST_MATH_USE_FLOAT128 ++#ifdef __has_include ++#if __has_include("quadmath.h") + #include "quadmath.h" ++#define BOOST_MATH_HAS_QUADMATH_H ++#endif ++#endif + #endif + + #ifdef BOOST_NO_STDC_NAMESPACE +@@ -124,9 +129,14 @@ inline bool is_nan_helper(T, const boost::false_type&) + { + return false; + } +-#ifdef BOOST_MATH_USE_FLOAT128 ++#if defined(BOOST_MATH_USE_FLOAT128) ++#if defined(BOOST_MATH_HAS_QUADMATH_H) + inline bool is_nan_helper(__float128 f, const boost::true_type&) { return ::isnanq(f); } + inline bool is_nan_helper(__float128 f, const boost::false_type&) { return ::isnanq(f); } ++#else ++inline bool is_nan_helper(__float128 f, const boost::true_type&) { return ::isnan(static_cast(f)); } ++inline bool is_nan_helper(__float128 f, const boost::false_type&) { return ::isnan(static_cast(f)); } ++#endif + #endif + } + +@@ -519,7 +529,7 @@ inline bool (isinf)(long double x) + return detail::isinf_impl(static_cast(x), method()); + } + #endif +-#ifdef BOOST_MATH_USE_FLOAT128 ++#if defined(BOOST_MATH_USE_FLOAT128) && defined(BOOST_MATH_HAS_QUADMATH_H) + template<> + inline bool (isinf)(__float128 x) + { +@@ -611,7 +621,7 @@ inline bool (isnan)(long double x) + return detail::isnan_impl(x, method()); + } + #endif +-#ifdef BOOST_MATH_USE_FLOAT128 ++#if defined(BOOST_MATH_USE_FLOAT128) && defined(BOOST_MATH_HAS_QUADMATH_H) + template<> + inline bool (isnan)(__float128 x) + { +diff --git a/boost/math/tools/config.hpp b/boost/math/tools/config.hpp +index ffd0ab4..75d29b6 100644 +--- a/boost/math/tools/config.hpp ++++ b/boost/math/tools/config.hpp +@@ -265,18 +265,6 @@ + # define BOOST_MATH_INT_VALUE_SUFFIX(RV, SUF) RV##SUF + #endif + // +-// Test whether to support __float128, if we don't have quadmath.h then this can't currently work: +-// +-#ifndef BOOST_MATH_USE_FLOAT128 +-#ifdef __has_include +-#if ! __has_include("quadmath.h") +-#define BOOST_MATH_DISABLE_FLOAT128 +-#endif +-#elif !defined(BOOST_ARCH_X86) +-#define BOOST_MATH_DISABLE_FLOAT128 +-#endif +-#endif +-// + // And then the actual configuration: + // + #if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__) \ diff --git a/package/boost/0004-fix-declaration-error-with-gcc-4-4.patch b/package/boost/0004-fix-declaration-error-with-gcc-4-4.patch new file mode 100644 index 0000000000..073ec041dc --- /dev/null +++ b/package/boost/0004-fix-declaration-error-with-gcc-4-4.patch @@ -0,0 +1,50 @@ +From a4e9686f8a0258bc30f9da2abab65673d6b9bd50 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jupp=20M=C3=BCller?= +Date: Wed, 23 Dec 2015 09:18:51 +0100 +Subject: [PATCH] Fix declaration changes meaning error with GCC 4.4.7 (#11856) + +Backported from a4e9686f8a0258bc30f9da2abab65673d6b9bd50 + +[Jörg Krause: adjust pathes to match sourceforge release tarball] +Signed-off-by: Jörg Krause + +--- + libs/container/src/pool_resource.cpp | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libs/container/src/pool_resource.cpp b/libs/container/src/pool_resource.cpp +index 4df7ee2..45f1564 100644 +--- a/libs/container/src/pool_resource.cpp ++++ b/libs/container/src/pool_resource.cpp +@@ -32,11 +32,11 @@ namespace pmr { + class pool_data_t + : public block_slist_base<> + { +- typedef block_slist_base<> block_slist_base; ++ typedef block_slist_base<> block_slist_base_t; + + public: + explicit pool_data_t(std::size_t initial_blocks_per_chunk) +- : block_slist_base(), next_blocks_per_chunk(initial_blocks_per_chunk) ++ : block_slist_base_t(), next_blocks_per_chunk(initial_blocks_per_chunk) + { slist_algo::init_header(&free_slist); } + + void *allocate_block() BOOST_NOEXCEPT +@@ -59,7 +59,7 @@ class pool_data_t + void release(memory_resource &upstream) + { + slist_algo::init_header(&free_slist); +- this->block_slist_base::release(upstream); ++ this->block_slist_base_t::release(upstream); + next_blocks_per_chunk = pool_options_minimum_max_blocks_per_chunk; + } + +@@ -72,7 +72,7 @@ class pool_data_t + + //Minimum block size is at least max_align, so all pools allocate sizes that are multiple of max_align, + //meaning that all blocks are max_align-aligned. +- char *p = static_cast(block_slist_base::allocate(blocks_per_chunk*pool_block, mr)); ++ char *p = static_cast(block_slist_base_t::allocate(blocks_per_chunk*pool_block, mr)); + + //Create header types. This is no-throw + for(std::size_t i = 0, max = blocks_per_chunk; i != max; ++i){ diff --git a/package/boost/0005-fix-undeclared-isnan.patch b/package/boost/0005-fix-undeclared-isnan.patch new file mode 100644 index 0000000000..95d8fedc78 --- /dev/null +++ b/package/boost/0005-fix-undeclared-isnan.patch @@ -0,0 +1,32 @@ +From fbd1393858719c7bda7d251f742950c1bc691ea8 Mon Sep 17 00:00:00 2001 +From: Kohei Takahashi +Date: Wed, 6 Jan 2016 19:39:55 +0900 +Subject: [PATCH] Qualify std:: for isnan in some situation. + +Because isnan is implemented as a macro and libstdc++ undef it within + (at least FreeBSD 10). + +Backported from fbd1393858719c7bda7d251f742950c1bc691ea8 + +[Jörg Krause: adjust pathes to match sourceforge release tarball] +Signed-off-by: Jörg Krause + +--- + boost/math/special_functions/fpclassify.hpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/boost/math/special_functions/fpclassify.hpp b/boost/math/special_functions/fpclassify.hpp +index 58fad13..d83e111 100644 +--- a/boost/math/special_functions/fpclassify.hpp ++++ b/boost/math/special_functions/fpclassify.hpp +@@ -133,6 +133,10 @@ inline bool is_nan_helper(T, const boost::false_type&) + #if defined(BOOST_MATH_HAS_QUADMATH_H) + inline bool is_nan_helper(__float128 f, const boost::true_type&) { return ::isnanq(f); } + inline bool is_nan_helper(__float128 f, const boost::false_type&) { return ::isnanq(f); } ++#elif defined(BOOST_GNU_STDLIB) && BOOST_GNU_STDLIB && \ ++ _GLIBCXX_USE_C99_MATH && !_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC ++inline bool is_nan_helper(__float128 f, const boost::true_type&) { return std::isnan(static_cast(f)); } ++inline bool is_nan_helper(__float128 f, const boost::false_type&) { return std::isnan(static_cast(f)); } + #else + inline bool is_nan_helper(__float128 f, const boost::true_type&) { return ::isnan(static_cast(f)); } + inline bool is_nan_helper(__float128 f, const boost::false_type&) { return ::isnan(static_cast(f)); } diff --git a/package/boost/0006-fenv.patch b/package/boost/0006-fenv.patch new file mode 100644 index 0000000000..95c769aea2 --- /dev/null +++ b/package/boost/0006-fenv.patch @@ -0,0 +1,37 @@ +Disable fenv.h in certain configurations + +The boost build system does not properly test whether fenv.h is +available, and if it is, if it supports all the features used by +Boost. This causes build failures with uClibc (reported upstream at +https://svn.boost.org/trac/boost/ticket/11756) but also with glibc on +specific architectures that don't have a full fenv implementation, +such as NIOSII or Microblaze. + +To address this, we forcefully disable the use of fenv support in the +affected configurations. + +Signed-off-by: Bernd Kuhls +[Thomas: add Microblaze/NIOSII exclusions.] +Signed-off-by: Thomas Petazzoni + +Index: b/boost/config/platform/linux.hpp +=================================================================== +--- a/boost/config/platform/linux.hpp ++++ b/boost/config/platform/linux.hpp +@@ -47,6 +47,16 @@ + #endif + + // ++// uClibc has no support for fenv.h, and also a few architectures ++// don't have fenv.h support at all (or incomplete support) even with ++// glibc. ++ ++// ++#if defined(__UCLIBC__) || defined(__nios2__) || defined(__microblaze__) ++# define BOOST_NO_FENV_H ++#endif ++ ++// + // If glibc is past version 2 then we definitely have + // gettimeofday, earlier versions may or may not have it: + // diff --git a/package/boost/0007-fix-getchar-with-uclibc-and-gcc-bug-58952.patch b/package/boost/0007-fix-getchar-with-uclibc-and-gcc-bug-58952.patch new file mode 100644 index 0000000000..960f0ea2f9 --- /dev/null +++ b/package/boost/0007-fix-getchar-with-uclibc-and-gcc-bug-58952.patch @@ -0,0 +1,45 @@ +From 4f1c6784b37a11c78fe84bb238fb7cc377ce0d36 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Wed, 30 Mar 2016 23:28:33 +0200 +Subject: [PATCH] Fix for uClibc and gcc <= 4.8.2 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +getchar() is defined as a macro in uClibc. This hits gcc bug 58952 [1] for all +gcc version <= 4.8.2 and building boost/test fails: + +./boost/test/impl/unit_test_main.ipp: In function 'int boost::unit_test::unit_test_main(boost::unit_test::init_unit_test_func, int, char**)': +./boost/test/impl/unit_test_main.ipp:194:18: error: expected unqualified-id before '(' token + +To allow building boost/test with uClibc based toolchains with gcc <= 4.8.2 use +parenthesis for std::getchar. + +[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58952 + +Upstream status: Pending +https://github.com/boostorg/test/pull/97 + +Signed-off-by: Jörg Krause +--- + include/boost/test/impl/unit_test_main.ipp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/boost/test/impl/unit_test_main.ipp b/boost/test/impl/unit_test_main.ipp +index 1f30c02..db61930 100644 +--- a/boost/test/impl/unit_test_main.ipp ++++ b/boost/test/impl/unit_test_main.ipp +@@ -191,7 +191,9 @@ unit_test_main( init_unit_test_func init_func, int argc, char* argv[] ) + if( runtime_config::get( runtime_config::WAIT_FOR_DEBUGGER ) ) { + results_reporter::get_stream() << "Press any key to continue..." << std::endl; + +- std::getchar(); ++ // getchar is defined as a macro in uClibc. Use parenthesis to fix ++ // gcc bug 58952 for gcc <= 4.8.2. ++ (std::getchar)(); + results_reporter::get_stream() << "Continuing..." << std::endl; + } + +-- +2.7.4 + diff --git a/package/boost/Config.in b/package/boost/Config.in new file mode 100644 index 0000000000..ed67285a58 --- /dev/null +++ b/package/boost/Config.in @@ -0,0 +1,160 @@ +comment "boost needs a toolchain w/ C++, threads, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + +config BR2_PACKAGE_BOOST_ARCH_SUPPORTS + bool + default y if !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII + +config BR2_PACKAGE_BOOST + bool "boost" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + # Boost could theorically be built with threading=single, but + # that unfortunately doesn't work. Until someone fixes that, + # let's depend on threads. + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR + help + A general purpose C++ library + + http://www.boost.org/ + +if BR2_PACKAGE_BOOST + +choice + prompt "Layout" + default BR2_PACKAGE_BOOST_LAYOUT_SYSTEM + help + Selects the layout of Boost binary names + +config BR2_PACKAGE_BOOST_LAYOUT_SYSTEM + bool "system" + help + Boost binary names do not include the Boost version number + or the name and version number of the compiler. + +config BR2_PACKAGE_BOOST_LAYOUT_TAGGED + bool "tagged" + help + Boost binary names include the encoded build properties such + as variant and threading, but do not include compiler name + and version, or Boost version. This option is useful if you + build several variants of Boost, using the same compiler. + +config BR2_PACKAGE_BOOST_LAYOUT_VERSIONED + bool "versioned" + help + Boost binary names include the Boost version number, name + and version of the compiler and encoded build properties. + +endchoice + +config BR2_PACKAGE_BOOST_LAYOUT + string + default "system" if BR2_PACKAGE_BOOST_LAYOUT_SYSTEM + default "tagged" if BR2_PACKAGE_BOOST_LAYOUT_TAGGED + default "versioned" if BR2_PACKAGE_BOOST_LAYOUT_VERSIONED + +config BR2_PACKAGE_BOOST_ATOMIC + bool "boost-atomic" + +config BR2_PACKAGE_BOOST_CHRONO + bool "boost-chrono" + +config BR2_PACKAGE_BOOST_CONTAINER + bool "boost-container" + +# see +# http://www.boost.org/doc/libs/1_59_0/libs/context/doc/html/context/architectures.html +# for the list of supported architectures. Sparc pretends to be +# supported, but it doesn't build. +config BR2_PACKAGE_BOOST_CONTEXT + bool "boost-context" + depends on (BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || BR2_mipsel \ + || BR2_powerpc || BR2_x86_64) + +config BR2_PACKAGE_BOOST_COROUTINE + bool "boost-coroutine" + depends on BR2_PACKAGE_BOOST_CONTEXT + +config BR2_PACKAGE_BOOST_COROUTINE2 + bool "boost-coroutine2" + depends on BR2_PACKAGE_BOOST_CONTEXT + +config BR2_PACKAGE_BOOST_DATE_TIME + bool "boost-date_time" + +config BR2_PACKAGE_BOOST_EXCEPTION + bool "boost-exception" + +config BR2_PACKAGE_BOOST_FILESYSTEM + bool "boost-filesystem" + +config BR2_PACKAGE_BOOST_GRAPH + bool "boost-graph" + +config BR2_PACKAGE_BOOST_GRAPH_PARALLEL + bool "boost-graph_parallel" + +config BR2_PACKAGE_BOOST_IOSTREAMS + bool "boost-iostreams" + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_ZLIB + +config BR2_PACKAGE_BOOST_LOCALE + bool "boost-locale" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + +config BR2_PACKAGE_BOOST_LOG + bool "boost-log" + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + # for some reason, uClibc on PowerPC fails to build the boost + # log module + depends on !(BR2_powerpc && BR2_TOOLCHAIN_USES_UCLIBC) + +comment "boost-log needs a toolchain w/ NPTL" + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on !(BR2_powerpc && BR2_TOOLCHAIN_USES_UCLIBC) + +config BR2_PACKAGE_BOOST_MATH + bool "boost-math" + +config BR2_PACKAGE_BOOST_MPI + bool "boost-mpi" + +config BR2_PACKAGE_BOOST_PROGRAM_OPTIONS + bool "boost-program_options" + +config BR2_PACKAGE_BOOST_PYTHON + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + bool "boost-python" + +config BR2_PACKAGE_BOOST_RANDOM + bool "boost-random" + +config BR2_PACKAGE_BOOST_REGEX + bool "boost-regex" + +config BR2_PACKAGE_BOOST_SERIALIZATION + bool "boost-serialization" + +config BR2_PACKAGE_BOOST_SIGNALS + bool "boost-signals" + +config BR2_PACKAGE_BOOST_SYSTEM + bool "boost-system" + +config BR2_PACKAGE_BOOST_TEST + bool "boost-test" + depends on BR2_USE_MMU # fork() + +config BR2_PACKAGE_BOOST_THREAD + bool "boost-thread" + +config BR2_PACKAGE_BOOST_TIMER + bool "boost-timer" + +config BR2_PACKAGE_BOOST_WAVE + bool "boost-wave" + +endif diff --git a/package/boost/boost.hash b/package/boost/boost.hash new file mode 100644 index 0000000000..294282a6fd --- /dev/null +++ b/package/boost/boost.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/boost/files/boost/1.60.0/ +md5 65a840e1a0b13a558ff19eeb2c4f0cbe boost_1_60_0.tar.bz2 +sha1 7f56ab507d3258610391b47fef6b11635861175a boost_1_60_0.tar.bz2 diff --git a/package/boost/boost.mk b/package/boost/boost.mk new file mode 100644 index 0000000000..15f0b77a94 --- /dev/null +++ b/package/boost/boost.mk @@ -0,0 +1,182 @@ +################################################################################ +# +# boost +# +################################################################################ + +BOOST_VERSION = 1.60.0 +BOOST_SOURCE = boost_$(subst .,_,$(BOOST_VERSION)).tar.bz2 +BOOST_SITE = http://downloads.sourceforge.net/project/boost/boost/$(BOOST_VERSION) +BOOST_INSTALL_STAGING = YES +BOOST_LICENSE = Boost Software License 1.0 +BOOST_LICENSE_FILES = LICENSE_1_0.txt + +HOST_BOOST_DEPENDENCIES = + +# keep host variant as minimal as possible +HOST_BOOST_FLAGS = --without-icu \ + --without-libraries=$(subst $(space),$(comma),atomic chrono context \ + coroutine coroutine2 date_time exception filesystem graph \ + graph_parallel iostreams locale log math mpi program_options python \ + random regex serialization signals system test thread timer wave) + +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_ATOMIC),,atomic) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CHRONO),,chrono) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CONTAINER),,container) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_CONTEXT),,context) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_COROUTINE),,coroutine) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_COROUTINE2),,coroutine2) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_DATE_TIME),,date_time) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_EXCEPTION),,exception) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_FILESYSTEM),,filesystem) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_GRAPH),,graph) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_GRAPH_PARALLEL),,graph_parallel) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_IOSTREAMS),,iostreams) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_LOCALE),,locale) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_LOG),,log) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_MATH),,math) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_MPI),,mpi) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_PROGRAM_OPTIONS),,program_options) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_PYTHON),,python) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_RANDOM),,random) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_REGEX),,regex) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_SERIALIZATION),,serialization) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_SIGNALS),,signals) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_SYSTEM),,system) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_TEST),,test) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_THREAD),,thread) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_TIMER),,timer) +BOOST_WITHOUT_FLAGS += $(if $(BR2_PACKAGE_BOOST_WAVE),,wave) + +BOOST_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS) + +ifeq ($(BR2_PACKAGE_ICU),y) +BOOST_FLAGS += --with-icu=$(STAGING_DIR)/usr +BOOST_DEPENDENCIES += icu +else +BOOST_FLAGS += --without-icu +endif + +ifeq ($(BR2_PACKAGE_BOOST_IOSTREAMS),y) +BOOST_DEPENDENCIES += bzip2 zlib +endif + +ifeq ($(BR2_PACKAGE_BOOST_PYTHON),y) +BOOST_FLAGS += --with-python-root=$(HOST_DIR) +ifeq ($(BR2_PACKAGE_PYTHON3),y) +BOOST_FLAGS += --with-python=$(HOST_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR) +BOOST_TARGET_CXXFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)m +BOOST_DEPENDENCIES += python3 +else +BOOST_FLAGS += --with-python=$(HOST_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR) +BOOST_TARGET_CXXFLAGS += -I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) +BOOST_DEPENDENCIES += python +endif +endif + +HOST_BOOST_OPTS += toolset=gcc threading=multi variant=release link=shared \ + runtime-link=shared + +ifeq ($(BR2_MIPS_OABI32),y) +BOOST_ABI = o32 +else ifeq ($(BR2_arm),y) +BOOST_ABI = aapcs +else +BOOST_ABI = sysv +endif + +BOOST_OPTS += toolset=gcc \ + threading=multi \ + abi=$(BOOST_ABI) \ + variant=$(if $(BR2_ENABLE_DEBUG),debug,release) + +ifeq ($(BR2_sparc64),y) +BOOST_OPTS += architecture=sparc instruction-set=ultrasparc +endif + +ifeq ($(BR2_sparc),y) +BOOST_OPTS += architecture=sparc instruction-set=v8 +endif + +# By default, Boost build and installs both the shared and static +# variants. Override that if we want static only or shared only. +ifeq ($(BR2_STATIC_LIBS),y) +BOOST_OPTS += link=static runtime-link=static +else ifeq ($(BR2_SHARED_LIBS),y) +BOOST_OPTS += link=shared runtime-link=shared +endif + +ifeq ($(BR2_PACKAGE_BOOST_LOCALE),y) +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +# posix backend needs monetary.h which isn't available on uClibc +BOOST_OPTS += boost.locale.posix=off +endif + +BOOST_DEPENDENCIES += $(if $(BR2_ENABLE_LOCALE),,libiconv) +endif + +BOOST_WITHOUT_FLAGS_COMMASEPARATED += $(subst $(space),$(comma),$(strip $(BOOST_WITHOUT_FLAGS))) +BOOST_FLAGS += $(if $(BOOST_WITHOUT_FLAGS_COMMASEPARATED), --without-libraries=$(BOOST_WITHOUT_FLAGS_COMMASEPARATED)) +BOOST_LAYOUT = $(call qstrip, $(BR2_PACKAGE_BOOST_LAYOUT)) + +# how verbose should the build be? +BOOST_OPTS += $(if $(QUIET),-d,-d+1) +HOST_BOOST_OPTS += $(if $(QUIET),-d,-d+1) + +define BOOST_CONFIGURE_CMDS + (cd $(@D) && ./bootstrap.sh $(BOOST_FLAGS)) + echo "using gcc : `$(TARGET_CC) -dumpversion` : $(TARGET_CXX) : \"$(BOOST_TARGET_CXXFLAGS)\" \"$(TARGET_LDFLAGS)\" ;" > $(@D)/user-config.jam + echo "" >> $(@D)/user-config.jam +endef + +define BOOST_BUILD_CMDS + (cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -q \ + --user-config=$(@D)/user-config.jam \ + $(BOOST_OPTS) \ + --ignore-site-config \ + --layout=$(BOOST_LAYOUT)) +endef + +define BOOST_INSTALL_TARGET_CMDS + (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q \ + --user-config=$(@D)/user-config.jam \ + $(BOOST_OPTS) \ + --prefix=$(TARGET_DIR)/usr \ + --ignore-site-config \ + --layout=$(BOOST_LAYOUT) install ) +endef + +define BOOST_INSTALL_STAGING_CMDS + (cd $(@D) && ./bjam -j$(PARALLEL_JOBS) -q \ + --user-config=$(@D)/user-config.jam \ + $(BOOST_OPTS) \ + --prefix=$(STAGING_DIR)/usr \ + --ignore-site-config \ + --layout=$(BOOST_LAYOUT) install) +endef + +define HOST_BOOST_CONFIGURE_CMDS + (cd $(@D) && ./bootstrap.sh $(HOST_BOOST_FLAGS)) + echo "using gcc : `$(HOST_CC) -dumpversion` : $(HOSTCXX) : \"$(HOST_CXXFLAGS)\" \"$(HOST_LDFLAGS)\" ;" > $(@D)/user-config.jam + echo "" >> $(@D)/user-config.jam +endef + +define HOST_BOOST_BUILD_CMDS + (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q \ + --user-config=$(@D)/user-config.jam \ + $(HOST_BOOST_OPTS) \ + --ignore-site-config \ + --prefix=$(HOST_DIR)/usr ) +endef + +define HOST_BOOST_INSTALL_CMDS + (cd $(@D) && ./b2 -j$(PARALLEL_JOBS) -q \ + --user-config=$(@D)/user-config.jam \ + $(HOST_BOOST_OPTS) \ + --prefix=$(HOST_DIR)/usr \ + --ignore-site-config \ + --layout=$(BOOST_LAYOUT) install ) +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/bootstrap/Config.in b/package/bootstrap/Config.in new file mode 100644 index 0000000000..743d8a324a --- /dev/null +++ b/package/bootstrap/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_BOOTSTRAP + bool "bootstrap" + help + Bootstrap is the most popular HTML, CSS, and JS framework + for developing responsive, mobile first projects on the web. + + http://getbootstrap.com diff --git a/package/bootstrap/bootstrap.hash b/package/bootstrap/bootstrap.hash new file mode 100644 index 0000000000..acb06b4246 --- /dev/null +++ b/package/bootstrap/bootstrap.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 95ca4a02aff37570660c81a87065b53ebc281c33fa86b91a6a7a650eee10678f bootstrap-3.3.1-dist.zip diff --git a/package/bootstrap/bootstrap.mk b/package/bootstrap/bootstrap.mk new file mode 100644 index 0000000000..17752ce068 --- /dev/null +++ b/package/bootstrap/bootstrap.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# bootstrap +# +################################################################################ + +BOOTSTRAP_VERSION = 3.3.1 +BOOTSTRAP_SITE = https://github.com/twbs/bootstrap/releases/download/v$(BOOTSTRAP_VERSION) +BOOTSTRAP_SOURCE = bootstrap-$(BOOTSTRAP_VERSION)-dist.zip +BOOTSTRAP_LICENSE = MIT + +define BOOTSTRAP_EXTRACT_CMDS + $(UNZIP) $(DL_DIR)/$(BOOTSTRAP_SOURCE) -d $(@D) +endef + +define BOOTSTRAP_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/dist/css/bootstrap-theme.min.css \ + $(TARGET_DIR)/var/www/bootstrap/css/bootstrap-theme.min.css + $(INSTALL) -m 0644 -D $(@D)/dist/css/bootstrap.min.css \ + $(TARGET_DIR)/var/www/bootstrap/css/bootstrap.min.css + $(INSTALL) -m 0644 -D $(@D)/dist/js/bootstrap.min.js \ + $(TARGET_DIR)/var/www/bootstrap/js/bootstrap.min.js + cp -r $(@D)/dist/fonts $(TARGET_DIR)/var/www/bootstrap/ +endef + +$(eval $(generic-package)) diff --git a/package/bootutils/0001-fix-musl-compilation-issue.patch b/package/bootutils/0001-fix-musl-compilation-issue.patch new file mode 100644 index 0000000000..ccb6ef61ec --- /dev/null +++ b/package/bootutils/0001-fix-musl-compilation-issue.patch @@ -0,0 +1,31 @@ +From e4c2c18b9d1d7a6dc17d8f7705b26fc2e2efc5a9 Mon Sep 17 00:00:00 2001 +From: Brendan Heading +Date: Sun, 30 Aug 2015 20:12:40 +0100 +Subject: [PATCH 1/1] fix musl compilation issue + +makedev(3) requires sys/types.h to be included. + +Note upstream has not issued releases since 2009. No mailing list activity +since January 2010, and even before then it seems to be mostly spam. + +Upstream-Status: dormant +Signed-off-by: Brendan Heading +--- + raidscan.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/raidscan.c b/raidscan.c +index fab3b02..3cb1a0d 100644 +--- a/raidscan.c ++++ b/raidscan.c +@@ -22,6 +22,7 @@ + #include "config.h" + + #include ++#include + #include + #include + #include +-- +2.4.3 + diff --git a/package/bootutils/Config.in b/package/bootutils/Config.in new file mode 100644 index 0000000000..370da0d1eb --- /dev/null +++ b/package/bootutils/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_BOOTUTILS + bool "bootutils" + help + BootUtils is a collection of utilities to facilitate booting of + Linux 2.6-based systems. The process of finding the root volume + either by label or explicit label= on the kernel command line, + mounting it, and 'switchroot'ing is automated. + + http://bootutils.sourceforge.net/ diff --git a/package/bootutils/bootutils.hash b/package/bootutils/bootutils.hash new file mode 100644 index 0000000000..576c324c0f --- /dev/null +++ b/package/bootutils/bootutils.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 78549714e7c7fa246a4019c245f4da044aee6cfe48ad6887c4013ac4c749c7b9 bootutils-1.0.0.tar.gz diff --git a/package/bootutils/bootutils.mk b/package/bootutils/bootutils.mk new file mode 100644 index 0000000000..eb3cb4f4b4 --- /dev/null +++ b/package/bootutils/bootutils.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# bootutils +# +################################################################################ + +BOOTUTILS_VERSION = 1.0.0 +BOOTUTILS_SITE = http://downloads.sourceforge.net/project/bootutils/Stable/v$(BOOTUTILS_VERSION) +BOOTUTILS_CONF_OPTS = --prefix=/ --exec-prefix=/ +BOOTUTILS_LICENSE = GPLv2+ +BOOTUTILS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/botan/0001-remove-mips64-explicit-mabi.patch b/package/botan/0001-remove-mips64-explicit-mabi.patch new file mode 100644 index 0000000000..3fddd54e9a --- /dev/null +++ b/package/botan/0001-remove-mips64-explicit-mabi.patch @@ -0,0 +1,18 @@ +Remove explicit mips64 -mabi parameter + +This breaks when building for n32 ABI on mips64. + +Signed-off-by: Baruch Siach +--- + +diff -Nuar Botan-1.10.8-orig/src/build-data/cc/gcc.txt Botan-1.10.8/src/build-data/cc/gcc.txt +--- Botan-1.10.8-orig/src/build-data/cc/gcc.txt 2014-04-10 17:11:44.000000000 +0300 ++++ Botan-1.10.8/src/build-data/cc/gcc.txt 2014-10-23 09:20:34.506722323 +0300 +@@ -92,7 +92,6 @@ + # The 'linking' bit means "use this for both compiling *and* linking" + + x86_64 -> "-m64" +-mips64 -> "-mabi=64" + s390 -> "-m31" + s390x -> "-m64" + sparc32 -> "-m32 -mno-app-regs" diff --git a/package/botan/Config.in b/package/botan/Config.in new file mode 100644 index 0000000000..733dc8965a --- /dev/null +++ b/package/botan/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_BOTAN_ARCH_SUPPORTS + bool + default y if BR2_arm || BR2_armeb || BR2_i386 || BR2_m68k || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_powerpc || BR2_powerpc64 || BR2_sparc || BR2_sh || \ + BR2_x86_64 + +config BR2_PACKAGE_BOTAN + bool "botan" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_BOTAN_ARCH_SUPPORTS + help + Botan is a crypto library for C++ + + http://botan.randombit.net + +comment "botan needs a toolchain w/ C++, threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_BOTAN_ARCH_SUPPORTS diff --git a/package/botan/botan.hash b/package/botan/botan.hash new file mode 100644 index 0000000000..ab8788eb32 --- /dev/null +++ b/package/botan/botan.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 c2cdb47a8b1ac2368de5b9c51a8fab2a72a5641fbc1afd1abe81d5c6e4197420 Botan-1.10.8.tgz diff --git a/package/botan/botan.mk b/package/botan/botan.mk new file mode 100644 index 0000000000..6ac3ce7ee4 --- /dev/null +++ b/package/botan/botan.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# botan +# +################################################################################ + +BOTAN_VERSION = 1.10.8 +BOTAN_SOURCE = Botan-$(BOTAN_VERSION).tgz +BOTAN_SITE = http://files.randombit.net/botan +BOTAN_LICENSE = BSD-2c +BOTAN_LICENSE_FILES = doc/license.txt + +BOTAN_INSTALL_STAGING = YES + +BOTAN_CONF_OPTS = \ + --cpu=$(BR2_ARCH) \ + --os=linux \ + --cc=gcc \ + --cc-bin="$(TARGET_CXX)" \ + --prefix=/usr + +ifeq ($(BR2_STATIC_LIBS),y) +BOTAN_CONF_OPTS += --disable-shared --no-autoload +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +BOTAN_DEPENDENCIES += bzip2 +BOTAN_CONF_OPTS += --with-bzip2 +endif + +ifeq ($(BR2_PACKAGE_GMP),y) +BOTAN_DEPENDENCIES += gmp +BOTAN_CONF_OPTS += --with-gnump +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +BOTAN_DEPENDENCIES += openssl +BOTAN_CONF_OPTS += --with-openssl +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +BOTAN_DEPENDENCIES += zlib +BOTAN_CONF_OPTS += --with-zlib +endif + +define BOTAN_CONFIGURE_CMDS + (cd $(@D); ./configure.py $(BOTAN_CONF_OPTS)) +endef + +define BOTAN_BUILD_CMDS + $(MAKE) -C $(@D) AR="$(TARGET_AR) crs" +endef + +define BOTAN_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)/usr" install +endef + +define BOTAN_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)/usr" install +endef + +$(eval $(generic-package)) diff --git a/package/bridge-utils/0001-build-system.patch b/package/bridge-utils/0001-build-system.patch new file mode 100644 index 0000000000..f44737750b --- /dev/null +++ b/package/bridge-utils/0001-build-system.patch @@ -0,0 +1,11 @@ +--- bridge-utils-0.9.6/libbridge/Makefile.in.dist 2004-03-01 20:55:52.000000000 -0600 ++++ bridge-utils-0.9.6/libbridge/Makefile.in 2004-03-01 20:56:23.000000000 -0600 +@@ -5,7 +5,7 @@ + RANLIB=@RANLIB@ + + CC=@CC@ +-CFLAGS = -Wall -g $(KERNEL_HEADERS) ++CFLAGS = -Wall -g @CFLAGS@ $(KERNEL_HEADERS) + + prefix=@prefix@ + exec_prefix=@exec_prefix@ diff --git a/package/bridge-utils/0002-fix-for-kernel-headers-3.8+.patch b/package/bridge-utils/0002-fix-for-kernel-headers-3.8+.patch new file mode 100644 index 0000000000..0455a9085c --- /dev/null +++ b/package/bridge-utils/0002-fix-for-kernel-headers-3.8+.patch @@ -0,0 +1,30 @@ +commit 5eebb7f9288b7881ffb929b1fd494fe3ac3be27d +Author: Russell Senior +Date: Wed Mar 6 12:49:42 2013 -0800 + + bridge-utils: Fix compile against linux-3.8.x + + Linux 3.8 has a header, include/uapi/linux/if_bridge.h that uses a + struct in6_addr but doesn't define it. The trivial seeming fix of + including the header that does define it causes more problems. The + problem was discussed on mailing lists in January 2013. The final + suggestion I found was here: + + http://www.redhat.com/archives/libvir-list/2013-January/msg01253.html + + This is intended to implement that suggestion. + + Signed-off-by: Russell Senior + +diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h +index 39964f2..dd14bae 100644 +--- a/libbridge/libbridge.h ++++ b/libbridge/libbridge.h +@@ -20,6 +20,7 @@ + #define _LIBBRIDGE_H + + #include ++#include + #include + #include + diff --git a/package/bridge-utils/0003-sysfs-write-fixes.patch b/package/bridge-utils/0003-sysfs-write-fixes.patch new file mode 100644 index 0000000000..a7ff1979f5 --- /dev/null +++ b/package/bridge-utils/0003-sysfs-write-fixes.patch @@ -0,0 +1,81 @@ +commit bb9970a9df95837e39d680021b1f73d231e85406 +Author: Stephen Hemminger +Date: Tue May 3 09:52:43 2011 -0700 + + Check error returns from write to sysfs + + Add helper function to check write to sysfs files. + + Fix incorrect sysfs path in br_set. + +[Thomas De Schampheleire: update commit message only] +Signed-off-by: Thomas De Schampheleire + +diff --git a/libbridge/libbridge_devif.c b/libbridge/libbridge_devif.c +index aa8bc36..1e83925 100644 +--- a/libbridge/libbridge_devif.c ++++ b/libbridge/libbridge_devif.c +@@ -280,25 +280,38 @@ fallback: + return old_get_port_info(brname, port, info); + } + ++static int set_sysfs(const char *path, unsigned long value) ++{ ++ int fd, ret = 0, cc; ++ char buf[32]; ++ ++ fd = open(path, O_WRONLY); ++ if (fd < 0) ++ return -1; ++ ++ cc = snprintf(buf, sizeof(buf), "%lu\n", value); ++ if (write(fd, buf, cc) < 0) ++ ret = -1; ++ close(fd); ++ ++ return ret; ++} ++ + + static int br_set(const char *bridge, const char *name, + unsigned long value, unsigned long oldcode) + { + int ret; + char path[SYSFS_PATH_MAX]; +- FILE *f; + +- snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/%s", bridge, name); ++ snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/bridge/%s", ++ bridge, name); + +- f = fopen(path, "w"); +- if (f) { +- ret = fprintf(f, "%ld\n", value); +- fclose(f); +- } else { ++ if ((ret = set_sysfs(path, value)) < 0) { + /* fallback to old ioctl */ + struct ifreq ifr; + unsigned long args[4] = { oldcode, value, 0, 0 }; +- ++ + strncpy(ifr.ifr_name, bridge, IFNAMSIZ); + ifr.ifr_data = (char *) &args; + ret = ioctl(br_socket_fd, SIOCDEVPRIVATE, &ifr); +@@ -348,14 +361,10 @@ static int port_set(const char *bridge, const char *ifname, + { + int ret; + char path[SYSFS_PATH_MAX]; +- FILE *f; + + snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/brport/%s", ifname, name); +- f = fopen(path, "w"); +- if (f) { +- ret = fprintf(f, "%ld\n", value); +- fclose(f); +- } else { ++ ++ if ((ret = set_sysfs(path, value)) < 0) { + int index = get_portno(bridge, ifname); + + if (index < 0) diff --git a/package/bridge-utils/Config.in b/package/bridge-utils/Config.in new file mode 100644 index 0000000000..537eb1f59f --- /dev/null +++ b/package/bridge-utils/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_BRIDGE_UTILS + bool "bridge-utils" + help + Manage ethernet bridging; a way to connect networks together to + form a larger network. + + http://linux-net.osdl.org/index.php/Bridge diff --git a/package/bridge-utils/bridge-utils.hash b/package/bridge-utils/bridge-utils.hash new file mode 100644 index 0000000000..c85fd04154 --- /dev/null +++ b/package/bridge-utils/bridge-utils.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/bridge/files/bridge/ +md5 ec7b381160b340648dede58c31bb2238 bridge-utils-1.5.tar.gz +sha1 19d2a58cd3a70f971aa931b40256174a847e60d6 bridge-utils-1.5.tar.gz diff --git a/package/bridge-utils/bridge-utils.mk b/package/bridge-utils/bridge-utils.mk new file mode 100644 index 0000000000..ae4c4197c7 --- /dev/null +++ b/package/bridge-utils/bridge-utils.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# bridge-utils +# +################################################################################ + +BRIDGE_UTILS_VERSION = 1.5 +BRIDGE_UTILS_SITE = http://downloads.sourceforge.net/project/bridge/bridge +BRIDGE_UTILS_AUTORECONF = YES +BRIDGE_UTILS_CONF_OPTS = --with-linux-headers=$(LINUX_HEADERS_DIR) +BRIDGE_UTILS_LICENSE = GPLv2+ +BRIDGE_UTILS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/bsdiff/0001-Add-missing-header-for-u_char.patch b/package/bsdiff/0001-Add-missing-header-for-u_char.patch new file mode 100644 index 0000000000..56affb4102 --- /dev/null +++ b/package/bsdiff/0001-Add-missing-header-for-u_char.patch @@ -0,0 +1,17 @@ +bspatch: Fix missing header for u_char + +Fixes http://autobuild.buildroot.net/results/31a/31a837cf6e34b02dce498f2b12e40d6d16a5a8e6/ + +Signed-off-by: Jörg Krause + +diff -purN bsdiff-4.3.orig/bspatch.c bsdiff-4.3/bspatch.c +--- bsdiff-4.3.orig/bspatch.c 2015-04-30 13:47:26.485903359 +0200 ++++ bsdiff-4.3/bspatch.c 2015-04-30 13:48:14.808908672 +0200 +@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD: src/usr.bin/bsdiff/b + #include + #include + #include ++#include + + static off_t offtin(u_char *buf) + { diff --git a/package/bsdiff/Config.in b/package/bsdiff/Config.in new file mode 100644 index 0000000000..11fd8b9d35 --- /dev/null +++ b/package/bsdiff/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_BSDIFF + bool "bsdiff" + select BR2_PACKAGE_BZIP2 + help + Binary patch/diff like xdelta but creates smaller diffs. + Needs bzip2 support. + + http://www.daemonology.net/bsdiff/ diff --git a/package/bsdiff/bsdiff.hash b/package/bsdiff/bsdiff.hash new file mode 100644 index 0000000000..989fcf1f12 --- /dev/null +++ b/package/bsdiff/bsdiff.hash @@ -0,0 +1,2 @@ +# From http://www.daemonology.net/bsdiff/: +md5 e6d812394f0e0ecc8d5df255aa1db22a bsdiff-4.3.tar.gz diff --git a/package/bsdiff/bsdiff.mk b/package/bsdiff/bsdiff.mk new file mode 100644 index 0000000000..7d2b2969db --- /dev/null +++ b/package/bsdiff/bsdiff.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# bsdiff +# +################################################################################ + +BSDIFF_VERSION = 4.3 +BSDIFF_SITE = http://www.daemonology.net/bsdiff +BSDIFF_DEPENDENCIES = bzip2 +BSDIFF_LICENSE = BSD-2c +BSDIFF_LICENSE_FILES = bsdiff.c + +define BSDIFF_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + $(@D)/bsdiff.c -lbz2 -o $(@D)/bsdiff + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + $(@D)/bspatch.c -lbz2 -o $(@D)/bspatch +endef + +define BSDIFF_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/bsdiff $(TARGET_DIR)/usr/bin/bsdiff + $(INSTALL) -D -m 755 $(@D)/bspatch $(TARGET_DIR)/usr/bin/bspatch +endef + +$(eval $(generic-package)) diff --git a/package/btrfs-progs/0001-configure-refactor-backtrace-detection.patch b/package/btrfs-progs/0001-configure-refactor-backtrace-detection.patch new file mode 100644 index 0000000000..0f834ded94 --- /dev/null +++ b/package/btrfs-progs/0001-configure-refactor-backtrace-detection.patch @@ -0,0 +1,132 @@ +From 9bef473d17ec01efe760462271791dfaaea280c0 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 29 Jul 2015 22:35:19 +0200 +Subject: [PATCH 1/3] configure: refactor backtrace() detection + +The current code assumes that if __GLIBC__ is not defined, backtrace +support is not available, and defines BTRFS_DISABLE_BACKTRACE. + +However, this macro is already defined by the configure.ac script when +--disable-backtrace is passed. This means that if you are using a C +library like musl which does not define __GLIBC__, and you pass +--disable-backtrace, you get a macro redefinition. + +Instead of relying on __GLIBC__, this commit implements a proper +configure.ac based detection of backtrace support: + + * If the user passes --enable-backtrace, we check if the backtrace() + function is available. If not, we abort the configure process with + an error. Otherwise we enable backtrace support by defining + HAVE_BACKTRACE. + + * If the user passes --disable-backtrace, then we don't enable + backtrace support. + + * If the user passes nothing special, we auto-detect: if backtrace() + is available, we use it, otherwise we simply warn at configure time + but not fail. + +Upstream-status: pending +Signed-off-by: Thomas Petazzoni +Signed-off-by: Brendan Heading +--- + configure.ac | 32 ++++++++++++++++++++++---------- + kerncompat.h | 9 ++++----- + 2 files changed, 26 insertions(+), 15 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c3a22d1..e936a10 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -63,22 +63,34 @@ AC_DEFUN([PKG_STATIC], [ + fi + ]) + +- ++# Provide a --{enable,disable}-backtrace option. If not passed, set ++# enable_backtrace to 'auto' so that we try to enable backtrace ++# support if available, but if not available, we gracefully fallback ++# without backtrace support. + AC_ARG_ENABLE([backtrace], + AS_HELP_STRING([--disable-backtrace], [disable btrfs backtrace]), +- [], [enable_backtrace=yes] ++ [enable_backtrace=${enableval}], [enable_backtrace=auto] + ) + +-AS_IF([test "x$enable_backtrace" = xno], [ +- AC_DEFINE([BTRFS_DISABLE_BACKTRACE], [1], [disable backtrace stuff in kerncompat.h ]) +-]) +- +-if test "x$enable_backtrace" = xyes; then +- AC_CHECK_HEADERS([execinfo.h]) +- AC_CHECK_FUNCS([backtrace backtrace_symbols_fd], [], +- AC_MSG_ERROR([standard library does not have backtrace support])) ++# Backtrace support requested (enable_backtrace is either 'yes' or ++# 'auto'), so check for needed headers and functions. ++if test "x$enable_backtrace" != xno; then ++ AC_CHECK_HEADERS([execinfo.h]) ++ AC_CHECK_FUNCS([backtrace backtrace_symbols_fd]) + fi + ++if test "x$ac_cv_func_backtrace" = xno; then ++ # If backtrace support was requested but not available, we fail if ++ # --enable-backtrace was passed, or we simply warn if we're ++ # auto-detecting. ++ if test "x$enable_backtrace" = xyes ; then ++ AC_MSG_ERROR([standard library does not have backtrace support]) ++ elif test "x$enable_backtrace" = xauto ; then ++ AC_MSG_WARN([standard library does not have backtrace support, disabled]) ++ fi ++else ++ AC_DEFINE([HAVE_BACKTRACE], [1], [Enable backtrace support]) ++fi + + AC_ARG_ENABLE([documentation], + AS_HELP_STRING([--disable-documentation], [do not build domumentation]), +diff --git a/kerncompat.h b/kerncompat.h +index 5d92856..8318665 100644 +--- a/kerncompat.h ++++ b/kerncompat.h +@@ -33,11 +33,10 @@ + #include + + #ifndef __GLIBC__ +-#define BTRFS_DISABLE_BACKTRACE + #define __always_inline __inline __attribute__ ((__always_inline__)) + #endif + +-#ifndef BTRFS_DISABLE_BACKTRACE ++#ifdef HAVE_BACKTRACE + #include + #endif + +@@ -65,7 +64,7 @@ + #define ULONG_MAX (~0UL) + #endif + +-#ifndef BTRFS_DISABLE_BACKTRACE ++#ifdef HAVE_BACKTRACE + #define MAX_BACKTRACE 16 + static inline void print_trace(void) + { +@@ -285,7 +284,7 @@ static inline long IS_ERR(const void *ptr) + #define vmalloc(x) malloc(x) + #define vfree(x) free(x) + +-#ifndef BTRFS_DISABLE_BACKTRACE ++#ifdef HAVE_BACKTRACE + #define BUG_ON(c) assert_trace(#c, __FILE__, __func__, __LINE__, !(c)) + #else + #define BUG_ON(c) assert(!(c)) +@@ -293,7 +292,7 @@ static inline long IS_ERR(const void *ptr) + + #define WARN_ON(c) BUG_ON(c) + +-#ifndef BTRFS_DISABLE_BACKTRACE ++#ifdef HAVE_BACKTRACE + #define ASSERT(c) assert_trace(#c, __FILE__, __func__, __LINE__, (c)) + #else + #define ASSERT(c) assert(c) +-- +2.4.3 + diff --git a/package/btrfs-progs/0002-configure-refactor-always_inline-detection.patch b/package/btrfs-progs/0002-configure-refactor-always_inline-detection.patch new file mode 100644 index 0000000000..f54d2501a2 --- /dev/null +++ b/package/btrfs-progs/0002-configure-refactor-always_inline-detection.patch @@ -0,0 +1,42 @@ +From 1d99ae25bb1bd4879c6f20f607faf3040018ee84 Mon Sep 17 00:00:00 2001 +From: Brendan Heading +Date: Thu, 30 Jul 2015 15:44:52 +0100 +Subject: [PATCH 2/3] configure: refactor always_inline detection + +Use configure.ac to detect the availability of the always_inline glibc +macro, and define it only if it does not exist. + +Signed-off-by: Brendan Heading +--- + configure.ac | 1 + + kerncompat.h | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index e936a10..d3d81a1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -41,6 +41,7 @@ AC_PATH_PROG([RMDIR], [rmdir], [rmdir]) + + AC_CHECK_FUNCS([openat], [], + [AC_MSG_ERROR([cannot find openat() function])]) ++AC_CHECK_DECLS([__always_inline]) + + m4_ifndef([PKG_PROG_PKG_CONFIG], + [m4_fatal([Could not locate the pkg-config autoconf +diff --git a/kerncompat.h b/kerncompat.h +index 8318665..757b9b4 100644 +--- a/kerncompat.h ++++ b/kerncompat.h +@@ -32,7 +32,7 @@ + + #include + +-#ifndef __GLIBC__ ++#ifndef HAVE_DECL___ALWAYS_INLINE + #define __always_inline __inline __attribute__ ((__always_inline__)) + #endif + +-- +2.4.3 + diff --git a/package/btrfs-progs/0003-compile-fix-undefined-PATH_MAX-under-musl.patch b/package/btrfs-progs/0003-compile-fix-undefined-PATH_MAX-under-musl.patch new file mode 100644 index 0000000000..35260148b2 --- /dev/null +++ b/package/btrfs-progs/0003-compile-fix-undefined-PATH_MAX-under-musl.patch @@ -0,0 +1,67 @@ +From 3197a4b058615d81aa4623fb5a52e57d7fbc3af2 Mon Sep 17 00:00:00 2001 +From: Brendan Heading +Date: Thu, 30 Jul 2015 15:47:16 +0100 +Subject: [PATCH 3/3] compile: fix undefined PATH_MAX under musl + +musl's strict implementation requires #include for PATH_MAX. + +Upstream-status: submitted +Signed-off-by: Brendan Heading +--- + cmds-inspect.c | 1 + + cmds-receive.c | 1 + + cmds-scrub.c | 1 + + cmds-send.c | 1 + + 4 files changed, 4 insertions(+) + +diff --git a/cmds-inspect.c b/cmds-inspect.c +index 71451fe..9712581 100644 +--- a/cmds-inspect.c ++++ b/cmds-inspect.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include "kerncompat.h" + #include "ioctl.h" +diff --git a/cmds-receive.c b/cmds-receive.c +index 071bea9..d4b3103 100644 +--- a/cmds-receive.c ++++ b/cmds-receive.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + #include +diff --git a/cmds-scrub.c b/cmds-scrub.c +index b7aa809..5a85dc4 100644 +--- a/cmds-scrub.c ++++ b/cmds-scrub.c +@@ -34,6 +34,7 @@ + #include + #include + #include ++#include + + #include "ctree.h" + #include "ioctl.h" +diff --git a/cmds-send.c b/cmds-send.c +index 20bba18..a0b7f95 100644 +--- a/cmds-send.c ++++ b/cmds-send.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include "ctree.h" + #include "ioctl.h" +-- +2.4.3 + diff --git a/package/btrfs-progs/Config.in b/package/btrfs-progs/Config.in new file mode 100644 index 0000000000..dc0fa811b1 --- /dev/null +++ b/package/btrfs-progs/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_BTRFS_PROGS + bool "btrfs-progs" + depends on BR2_USE_WCHAR # util-linux + depends on BR2_USE_MMU # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_E2FSPROGS + select BR2_PACKAGE_LZO + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_ZLIB + help + Btrfs filesystem utilities + + https://btrfs.wiki.kernel.org/index.php/Main_Page + +comment "btrfs-progs needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/btrfs-progs/btrfs-progs.hash b/package/btrfs-progs/btrfs-progs.hash new file mode 100644 index 0000000000..799c878f0c --- /dev/null +++ b/package/btrfs-progs/btrfs-progs.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/kernel/people/kdave/btrfs-progs/sha256sums.asc +sha256 62db60c6a0868afb6302112cea54c756873bc30b826696b167ec03ecd61b2f12 btrfs-progs-v4.1.2.tar.xz diff --git a/package/btrfs-progs/btrfs-progs.mk b/package/btrfs-progs/btrfs-progs.mk new file mode 100644 index 0000000000..2c3dc50d45 --- /dev/null +++ b/package/btrfs-progs/btrfs-progs.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# btrfs-progs +# +################################################################################ + +BTRFS_PROGS_VERSION = 4.1.2 +BTRFS_PROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/kdave/btrfs-progs +BTRFS_PROGS_SOURCE = btrfs-progs-v$(BTRFS_PROGS_VERSION).tar.xz +BTRFS_PROGS_DEPENDENCIES = host-pkgconf e2fsprogs lzo util-linux zlib +BTRFS_PROGS_CONF_OPTS = --disable-backtrace +BTRFS_PROGS_LICENSE = GPLv2 +BTRFS_PROGS_LICENSE_FILES = COPYING + +# Doesn't autodetect static-only and tries to build both +ifeq ($(BR2_STATIC_LIBS),y) +BTRFS_PROGS_MAKE_OPTS = static +BTRFS_PROGS_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-static +endif + +$(eval $(autotools-package)) diff --git a/package/bullet/Config.in b/package/bullet/Config.in new file mode 100644 index 0000000000..d4d69d2c9e --- /dev/null +++ b/package/bullet/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_BULLET + bool "bullet" + depends on BR2_INSTALL_LIBSTDCPP + # Affected by + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68476 + depends on !BR2_microblaze + help + Bullet is a Collision Detection and Rigid Body Dynamics + Library. + + http://bulletphysics.org + +comment "bullet needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on !BR2_microblaze diff --git a/package/bullet/bullet.mk b/package/bullet/bullet.mk new file mode 100644 index 0000000000..3ec97b4326 --- /dev/null +++ b/package/bullet/bullet.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# bullet +# +################################################################################ + +# This is the git id of the 2.82 release. +BULLET_VERSION = 19f999ac087e68ffc2551ffb73e35e60271a0d27 +BULLET_SITE = $(call github,bulletphysics,bullet3,$(BULLET_VERSION)) +BULLET_INSTALL_STAGING = YES +BULLET_LICENSE = zlib license +BULLET_LICENSE_FILES = BulletLicense.txt COPYING + +# Disable GLUT support since there is no freeglut or OpenGLUT package and we +# don't build the demos apps. +BULLET_CONF_OPTS = -DUSE_GLUT=OFF -DBUILD_DEMOS=OFF + +$(eval $(cmake-package)) diff --git a/package/bustle/Config.in b/package/bustle/Config.in new file mode 100644 index 0000000000..f213da503e --- /dev/null +++ b/package/bustle/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_BUSTLE + bool "bustle" + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + depends on BR2_PACKAGE_DBUS # runtime + help + Bustle is a better dbus-monitor! It records and draws + sequence diagrams of D-Bus activity, showing signal + emissions, method calls and their corresponding returns, + with timestamps for each individual event and the duration + of each method call. This can help you check for unwanted + D-Bus traffic, and pinpoint why your D-Bus-based application + isn't performing as well as you like. + + This only installs the command line bustle-pcap tool, not + the graphical viewer. + + http://www.willthompson.co.uk/bustle/ + +comment "bustle needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_DBUS + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/bustle/bustle.hash b/package/bustle/bustle.hash new file mode 100644 index 0000000000..9c6df56718 --- /dev/null +++ b/package/bustle/bustle.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 6c76cb5182c20b8ce7d6911f8aebc4fae43f919e747a003f1a66698628b27682 bustle-0.4.3.tar.gz diff --git a/package/bustle/bustle.mk b/package/bustle/bustle.mk new file mode 100644 index 0000000000..0b85536ea9 --- /dev/null +++ b/package/bustle/bustle.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# bustle +# +################################################################################ + +BUSTLE_VERSION = 0.4.3 +BUSTLE_SITE = http://www.willthompson.co.uk/bustle/releases/$(BUSTLE_VERSION) +BUSTLE_LICENSE = LGPLv2.1+ +BUSTLE_LICENSE_FILES = LICENSE +BUSTLE_DEPENDENCIES = libglib2 libpcap host-pkgconf + +BUSTLE_PCAP_FLAGS = "-lpcap" +ifeq ($(BR2_STATIC_LIBS),y) +BUSTLE_PCAP_FLAGS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs` +endif + +define BUSTLE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + PCAP_FLAGS="$(BUSTLE_PCAP_FLAGS)" -C $(@D) dist/build/bustle-pcap +endef + +define BUSTLE_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/dist/build/bustle-pcap \ + $(TARGET_DIR)/usr/bin/bustle-pcap +endef + +$(eval $(generic-package)) diff --git a/package/busybox/0001-networking-libiproute-use-linux-if_packet.h-instead-.patch b/package/busybox/0001-networking-libiproute-use-linux-if_packet.h-instead-.patch new file mode 100644 index 0000000000..3aabc96053 --- /dev/null +++ b/package/busybox/0001-networking-libiproute-use-linux-if_packet.h-instead-.patch @@ -0,0 +1,29 @@ +From d4fec31889ad660a58dab633c511221feb66e817 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 5 Oct 2013 15:55:06 +0200 +Subject: [PATCH] networking/libiproute: use instead of + + +The musl C library doesn't provide the since the +corresponding kernel headers already provides the +necessary definitions. Replacing by + also removes the need to include + + +This commit fixes the build of iplink with the musl C library. + +Signed-off-by: Thomas Petazzoni +[Gustavo: update for busybox 1.22.0] + +diff -Nura busybox-1.22.0.orig/networking/libiproute/iplink.c busybox-1.22.0/networking/libiproute/iplink.c +--- busybox-1.22.0.orig/networking/libiproute/iplink.c 2014-01-01 09:42:40.301137882 -0300 ++++ busybox-1.22.0/networking/libiproute/iplink.c 2014-01-01 09:43:01.282827700 -0300 +@@ -7,7 +7,7 @@ + */ + #include + /*#include - not needed? */ +-#include ++#include + #include + + #include diff --git a/package/busybox/0002-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch b/package/busybox/0002-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch new file mode 100644 index 0000000000..105626cbe2 --- /dev/null +++ b/package/busybox/0002-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch @@ -0,0 +1,28 @@ +From 67eb23d2be8aba3c474dac81a15b0fa11e5847b7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 25 Nov 2013 22:51:53 +0100 +Subject: [PATCH] Makefile.flags: strip non -l arguments returned by pkg-config + +Signed-off-by: Thomas Petazzoni +--- + Makefile.flags | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/Makefile.flags b/Makefile.flags +index 307afa7..885e323 100644 +--- a/Makefile.flags ++++ b/Makefile.flags +@@ -141,7 +141,9 @@ ifeq ($(CONFIG_SELINUX),y) + SELINUX_PC_MODULES = libselinux libsepol + $(eval $(call pkg_check_modules,SELINUX,$(SELINUX_PC_MODULES))) + CPPFLAGS += $(SELINUX_CFLAGS) +-LDLIBS += $(if $(SELINUX_LIBS),$(SELINUX_LIBS:-l%=%),$(SELINUX_PC_MODULES:lib%=%)) ++LDLIBS += $(if $(SELINUX_LIBS),\ ++ $(patsubst -l%,%,$(filter -l%,$(SELINUX_LIBS))),\ ++ $(SELINUX_PC_MODULES:lib%=%)) + endif + + ifeq ($(CONFIG_EFENCE),y) +-- +1.8.1.2 + diff --git a/package/busybox/0003-ash-recursive-heredocs.patch b/package/busybox/0003-ash-recursive-heredocs.patch new file mode 100644 index 0000000000..f054a90375 --- /dev/null +++ b/package/busybox/0003-ash-recursive-heredocs.patch @@ -0,0 +1,84 @@ +From 4194c2875310c13ee3ca2bb0e1aea6a2ae67c55a Mon Sep 17 00:00:00 2001 +From: Ron Yorston +Date: Thu, 29 Oct 2015 16:44:56 +0000 +Subject: [PATCH] ash: fix error during recursive processing of here document + +Save the value of the checkkwd flag to prevent it being clobbered +during recursion. + +Based on commit ec2c84d from git://git.kernel.org/pub/scm/utils/dash/dash.git +by Herbert Xu. + +function old new delta +readtoken 190 203 +13 +------------------------------------------------------------------------------ +(add/remove: 0/0 grow/shrink: 1/0 up/down: 13/0) Total: 13 bytes + +Signed-off-by: Ron Yorston +Signed-off-by: Denys Vlasenko +Signed-off-by: Mike Frysinger +(cherry picked from commit 713f07d906d9171953be0c12e2369869855b6ca6) +Signed-off-by: Gustavo Zacarias +--- + shell/ash.c | 5 +++-- + shell/ash_test/ash-heredoc/heredoc3.right | 1 + + shell/ash_test/ash-heredoc/heredoc3.tests | 9 +++++++++ + 3 files changed, 13 insertions(+), 2 deletions(-) + create mode 100644 shell/ash_test/ash-heredoc/heredoc3.right + create mode 100755 shell/ash_test/ash-heredoc/heredoc3.tests + +diff --git a/shell/ash.c b/shell/ash.c +index 8a1628e..256e933 100644 +--- a/shell/ash.c ++++ b/shell/ash.c +@@ -11893,6 +11893,7 @@ static int + readtoken(void) + { + int t; ++ int kwd = checkkwd; + #if DEBUG + smallint alreadyseen = tokpushback; + #endif +@@ -11906,7 +11907,7 @@ readtoken(void) + /* + * eat newlines + */ +- if (checkkwd & CHKNL) { ++ if (kwd & CHKNL) { + while (t == TNL) { + parseheredoc(); + t = xxreadtoken(); +@@ -11920,7 +11921,7 @@ readtoken(void) + /* + * check for keywords + */ +- if (checkkwd & CHKKWD) { ++ if (kwd & CHKKWD) { + const char *const *pp; + + pp = findkwd(wordtext); +diff --git a/shell/ash_test/ash-heredoc/heredoc3.right b/shell/ash_test/ash-heredoc/heredoc3.right +new file mode 100644 +index 0000000..ce01362 +--- /dev/null ++++ b/shell/ash_test/ash-heredoc/heredoc3.right +@@ -0,0 +1 @@ ++hello +diff --git a/shell/ash_test/ash-heredoc/heredoc3.tests b/shell/ash_test/ash-heredoc/heredoc3.tests +new file mode 100755 +index 0000000..96c227c +--- /dev/null ++++ b/shell/ash_test/ash-heredoc/heredoc3.tests +@@ -0,0 +1,9 @@ ++echo hello >greeting ++cat </dev/null ++rm greeting +-- +2.7.4 + diff --git a/package/busybox/0004-fix-CVE-2016-2147.patch b/package/busybox/0004-fix-CVE-2016-2147.patch new file mode 100644 index 0000000000..bd1e47ecf4 --- /dev/null +++ b/package/busybox/0004-fix-CVE-2016-2147.patch @@ -0,0 +1,73 @@ +From 3c4de6e36c4d387a648622e7b828a05f2b1b47e6 Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Fri, 26 Feb 2016 15:54:56 +0100 +Subject: [PATCH] udhcpc: fix OPTION_6RD parsing (could overflow its malloced + buffer) + +Signed-off-by: Denys Vlasenko +Signed-off-by: Mike Frysinger +(cherry picked from commit 352f79acbd759c14399e39baef21fc4ffe180ac2) +Signed-off-by: Gustavo Zacarias +--- + networking/udhcp/common.c | 15 +++++++++++++-- + networking/udhcp/dhcpc.c | 4 ++-- + 2 files changed, 15 insertions(+), 4 deletions(-) + +diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c +index bc41c8d..680852c 100644 +--- a/networking/udhcp/common.c ++++ b/networking/udhcp/common.c +@@ -142,7 +142,7 @@ const char dhcp_option_strings[] ALIGN1 = + * udhcp_str2optset: to determine how many bytes to allocate. + * xmalloc_optname_optval: to estimate string length + * from binary option length: (option[LEN] / dhcp_option_lengths[opt_type]) +- * is the number of elements, multiply in by one element's string width ++ * is the number of elements, multiply it by one element's string width + * (len_of_option_as_string[opt_type]) and you know how wide string you need. + */ + const uint8_t dhcp_option_lengths[] ALIGN1 = { +@@ -162,7 +162,18 @@ const uint8_t dhcp_option_lengths[] ALIGN1 = { + [OPTION_S32] = 4, + /* Just like OPTION_STRING, we use minimum length here */ + [OPTION_STATIC_ROUTES] = 5, +- [OPTION_6RD] = 22, /* ignored by udhcp_str2optset */ ++ [OPTION_6RD] = 12, /* ignored by udhcp_str2optset */ ++ /* The above value was chosen as follows: ++ * len_of_option_as_string[] for this option is >60: it's a string of the form ++ * "32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 ". ++ * Each additional ipv4 address takes 4 bytes in binary option and appends ++ * another "255.255.255.255 " 16-byte string. We can set [OPTION_6RD] = 4 ++ * but this severely overestimates string length: instead of 16 bytes, ++ * it adds >60 for every 4 bytes in binary option. ++ * We cheat and declare here that option is in units of 12 bytes. ++ * This adds more than 60 bytes for every three ipv4 addresses - more than enough. ++ * (Even 16 instead of 12 should work, but let's be paranoid). ++ */ + }; + + +diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c +index 915f659..2332b57 100644 +--- a/networking/udhcp/dhcpc.c ++++ b/networking/udhcp/dhcpc.c +@@ -113,7 +113,7 @@ static const uint8_t len_of_option_as_string[] = { + [OPTION_IP ] = sizeof("255.255.255.255 "), + [OPTION_IP_PAIR ] = sizeof("255.255.255.255 ") * 2, + [OPTION_STATIC_ROUTES ] = sizeof("255.255.255.255/32 255.255.255.255 "), +- [OPTION_6RD ] = sizeof("32 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "), ++ [OPTION_6RD ] = sizeof("132 128 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 255.255.255.255 "), + [OPTION_STRING ] = 1, + [OPTION_STRING_HOST ] = 1, + #if ENABLE_FEATURE_UDHCP_RFC3397 +@@ -220,7 +220,7 @@ static NOINLINE char *xmalloc_optname_optval(uint8_t *option, const struct dhcp_ + type = optflag->flags & OPTION_TYPE_MASK; + optlen = dhcp_option_lengths[type]; + upper_length = len_of_option_as_string[type] +- * ((unsigned)(len + optlen - 1) / (unsigned)optlen); ++ * ((unsigned)(len + optlen) / (unsigned)optlen); + + dest = ret = xmalloc(upper_length + strlen(opt_name) + 2); + dest += sprintf(ret, "%s=", opt_name); +-- +2.7.4 + diff --git a/package/busybox/0005-fix-CVE-2016-2148.patch b/package/busybox/0005-fix-CVE-2016-2148.patch new file mode 100644 index 0000000000..93eff484d4 --- /dev/null +++ b/package/busybox/0005-fix-CVE-2016-2148.patch @@ -0,0 +1,56 @@ +From 3a76bb5136d05f94ee62e377aa723e63444912c7 Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Thu, 10 Mar 2016 11:47:58 +0100 +Subject: [PATCH] udhcp: fix a SEGV on malformed RFC1035-encoded domain name + +Signed-off-by: Denys Vlasenko +Signed-off-by: Mike Frysinger +(cherry picked from commit d474ffc68290e0a83651c4432eeabfa62cd51e87) +Signed-off-by: Gustavo Zacarias +--- + networking/udhcp/domain_codec.c | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/networking/udhcp/domain_codec.c b/networking/udhcp/domain_codec.c +index c1325d8..8429367 100644 +--- a/networking/udhcp/domain_codec.c ++++ b/networking/udhcp/domain_codec.c +@@ -63,11 +63,10 @@ char* FAST_FUNC dname_dec(const uint8_t *cstr, int clen, const char *pre) + if (crtpos + *c + 1 > clen) /* label too long? abort */ + return NULL; + if (dst) +- memcpy(dst + len, c + 1, *c); ++ /* \3com ---> "com." */ ++ ((char*)mempcpy(dst + len, c + 1, *c))[0] = '.'; + len += *c + 1; + crtpos += *c + 1; +- if (dst) +- dst[len - 1] = '.'; + } else { + /* NUL: end of current domain name */ + if (retpos == 0) { +@@ -78,7 +77,10 @@ char* FAST_FUNC dname_dec(const uint8_t *cstr, int clen, const char *pre) + crtpos = retpos; + retpos = depth = 0; + } +- if (dst) ++ if (dst && len != 0) ++ /* \4host\3com\0\4host and we are at \0: ++ * \3com was converted to "com.", change dot to space. ++ */ + dst[len - 1] = ' '; + } + +@@ -228,6 +230,9 @@ int main(int argc, char **argv) + int len; + uint8_t *encoded; + ++ uint8_t str[6] = { 0x00, 0x00, 0x02, 0x65, 0x65, 0x00 }; ++ printf("NUL:'%s'\n", dname_dec(str, 6, "")); ++ + #define DNAME_DEC(encoded,pre) dname_dec((uint8_t*)(encoded), sizeof(encoded), (pre)) + printf("'%s'\n", DNAME_DEC("\4host\3com\0", "test1:")); + printf("test2:'%s'\n", DNAME_DEC("\4host\3com\0\4host\3com\0", "")); +-- +2.7.4 + diff --git a/package/busybox/Config.in b/package/busybox/Config.in new file mode 100644 index 0000000000..a3a328d484 --- /dev/null +++ b/package/busybox/Config.in @@ -0,0 +1,81 @@ +config BR2_PACKAGE_BUSYBOX + bool "BusyBox" + default y + help + The Swiss Army Knife of embedded Linux. It slices, it dices, it + makes Julian Fries. + + http://busybox.net/ + + Most people will answer Y. + +if BR2_PACKAGE_BUSYBOX + +config BR2_PACKAGE_BUSYBOX_CONFIG + string "BusyBox configuration file to use?" + default "package/busybox/busybox.config" + help + Some people may wish to use their own modified BusyBox configuration + file, and will specify their config file location with this option. + + Most people will just use the default BusyBox configuration file. + +config BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES + string "Additional BusyBox configuration fragment files" + help + A space-separated list of configuration fragment files, + that will be merged to the main BusyBox configuration file. + +config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + bool "Show packages that are also provided by busybox" + help + Show packages in menuconfig that are potentially also provided + by busybox. + +config BR2_PACKAGE_BUSYBOX_SELINUX + select BR2_PACKAGE_LIBSELINUX + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + depends on !BR2_arc + bool "Enable SELinux support" + help + Enable SELinux support in BusyBox. Please note that + depending on your BusyBox configuration and the SELinux + policy implementation, you may want to also enable + BR2_PACKAGE_BUSYBOX_INDIVIDUAL_BINARIES. + + For instance, if your BusyBox configuration only uses a + couple of minor BusyBox features, such as simple command + line utilities, the symlinked version of BusyBox can be used + to save space. If BusyBox provides more features, such as + crond, then individual binaries have to be enabled for the + SELinux type transitions to occur properly. + +config BR2_PACKAGE_BUSYBOX_WATCHDOG + bool "Install the watchdog daemon startup script" + help + Install the watchdog daemon startup script, + that just start at the boot the busybox watchdog daemon. + +if BR2_PACKAGE_BUSYBOX_WATCHDOG + +config BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD + string "Delay between reset" + default "5" + help + Select the number of seconds between each + reset of the watchdog (default 5) + + Use ms suffix to specify milliseconds (e.g. 500ms) + +endif + +endif + +if !BR2_PACKAGE_BUSYBOX # kconfig doesn't support else + +# add dummy config so the stuff with busybox alternatives are shown +# when busybox is disabled +config BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + default y +endif diff --git a/package/busybox/S01logging b/package/busybox/S01logging new file mode 100644 index 0000000000..4632a4cc99 --- /dev/null +++ b/package/busybox/S01logging @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Start logging +# + +SYSLOGD_ARGS=-n +KLOGD_ARGS=-n +[ -r /etc/default/logging ] && . /etc/default/logging + +start() { + printf "Starting logging: " + start-stop-daemon -b -S -q -m -p /var/run/syslogd.pid --exec /sbin/syslogd -- $SYSLOGD_ARGS + start-stop-daemon -b -S -q -m -p /var/run/klogd.pid --exec /sbin/klogd -- $KLOGD_ARGS + echo "OK" +} + +stop() { + printf "Stopping logging: " + start-stop-daemon -K -q -p /var/run/syslogd.pid + start-stop-daemon -K -q -p /var/run/klogd.pid + echo "OK" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/busybox/S10mdev b/package/busybox/S10mdev new file mode 100644 index 0000000000..4cb31de42d --- /dev/null +++ b/package/busybox/S10mdev @@ -0,0 +1,23 @@ +#!/bin/sh +# +# Start mdev.... +# + +case "$1" in + start) + echo "Starting mdev..." + echo /sbin/mdev >/proc/sys/kernel/hotplug + /sbin/mdev -s + # coldplug modules + find /sys/ -name modalias | xargs sort -u | xargs modprobe -abq + ;; + stop) + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/busybox/S15watchdog b/package/busybox/S15watchdog new file mode 100644 index 0000000000..470c6d7301 --- /dev/null +++ b/package/busybox/S15watchdog @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Start watchdog +# + +case "$1" in + start) + echo "Starting watchdog..." + watchdog -t PERIOD /dev/watchdog + ;; + stop) + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/busybox/S50telnet b/package/busybox/S50telnet new file mode 100755 index 0000000000..47e2b63e19 --- /dev/null +++ b/package/busybox/S50telnet @@ -0,0 +1,36 @@ +#!/bin/sh +# +# Start telnet.... +# + +start() { + printf "Starting telnetd: " + start-stop-daemon -S -q -m -b -p /var/run/telnetd.pid \ + -x /usr/sbin/telnetd -- -F + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping telnetd: " + start-stop-daemon -K -q -p /var/run/telnetd.pid \ + -x /usr/sbin/telnetd + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/busybox/busybox-minimal.config b/package/busybox/busybox-minimal.config new file mode 100644 index 0000000000..368ce8ed69 --- /dev/null +++ b/package/busybox/busybox-minimal.config @@ -0,0 +1,1057 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.24.2 +# Mon May 9 18:42:38 2016 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +# CONFIG_DESKTOP is not set +# CONFIG_EXTRA_COMPAT is not set +CONFIG_INCLUDE_SUSv2=y +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +# CONFIG_SHOW_USAGE is not set +# CONFIG_FEATURE_VERBOSE_USAGE is not set +# CONFIG_FEATURE_COMPRESS_USAGE is not set +CONFIG_FEATURE_INSTALLER=y +# CONFIG_INSTALL_NO_USR is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +# CONFIG_PAM is not set +CONFIG_FEATURE_USE_SENDFILE=y +CONFIG_LONG_OPTS=y +CONFIG_FEATURE_DEVPTS=y +CONFIG_FEATURE_CLEAN_UP=y +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_WTMP=y +# CONFIG_FEATURE_PIDFILE is not set +CONFIG_PID_FILE_PATH="" +CONFIG_FEATURE_SUID=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +CONFIG_FEATURE_SYSLOG=y +# CONFIG_FEATURE_HAVE_RPC is not set + +# +# Build Options +# +CONFIG_STATIC=y +# CONFIG_PIE is not set +CONFIG_NOMMU=y +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_UNIT_TEST is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +# CONFIG_FEATURE_SYSTEMD is not set +CONFIG_FEATURE_RTMINMAX=y +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SMALL=1 +CONFIG_SHA3_SMALL=1 +# CONFIG_FEATURE_FAST_TOP is not set +# CONFIG_FEATURE_ETC_NETWORKS is not set +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +CONFIG_FEATURE_EDITING_VI=y +CONFIG_FEATURE_EDITING_HISTORY=999 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set +CONFIG_FEATURE_REVERSE_SEARCH=y +CONFIG_FEATURE_TAB_COMPLETION=y +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_FEATURE_SKIP_ROOTFS=y +CONFIG_MONOTONIC_SYSCALL=y +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_FEATURE_SEAMLESS_XZ is not set +# CONFIG_FEATURE_SEAMLESS_LZMA is not set +# CONFIG_FEATURE_SEAMLESS_BZ2 is not set +# CONFIG_FEATURE_SEAMLESS_GZ is not set +# CONFIG_FEATURE_SEAMLESS_Z is not set +# CONFIG_AR is not set +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +# CONFIG_FEATURE_AR_CREATE is not set +# CONFIG_UNCOMPRESS is not set +# CONFIG_GUNZIP is not set +# CONFIG_BUNZIP2 is not set +# CONFIG_UNLZMA is not set +# CONFIG_FEATURE_LZMA_FAST is not set +# CONFIG_LZMA is not set +# CONFIG_UNXZ is not set +# CONFIG_XZ is not set +# CONFIG_BZIP2 is not set +# CONFIG_CPIO is not set +# CONFIG_FEATURE_CPIO_O is not set +# CONFIG_FEATURE_CPIO_P is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +# CONFIG_GZIP is not set +# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set +CONFIG_GZIP_FAST=0 +# CONFIG_FEATURE_GZIP_LEVELS is not set +# CONFIG_LZOP is not set +# CONFIG_LZOP_COMPR_HIGH is not set +# CONFIG_RPM is not set +# CONFIG_RPM2CPIO is not set +# CONFIG_TAR is not set +# CONFIG_FEATURE_TAR_CREATE is not set +# CONFIG_FEATURE_TAR_AUTODETECT is not set +# CONFIG_FEATURE_TAR_FROM is not set +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_GNU_EXTENSIONS is not set +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_FEATURE_TAR_TO_COMMAND is not set +# CONFIG_FEATURE_TAR_UNAME_GNAME is not set +# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set +# CONFIG_FEATURE_TAR_SELINUX is not set +# CONFIG_UNZIP is not set + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +# CONFIG_FEATURE_DATE_NANO is not set +CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_FEATURE_DD_STATUS=y +CONFIG_HOSTID=y +CONFIG_ID=y +# CONFIG_GROUPS is not set +# CONFIG_SHUF is not set +CONFIG_SYNC=y +# CONFIG_FEATURE_SYNC_FANCY is not set +CONFIG_TEST=y +CONFIG_FEATURE_TEST_64=y +CONFIG_TOUCH=y +# CONFIG_FEATURE_TOUCH_NODEREF is not set +CONFIG_FEATURE_TOUCH_SUSV3=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +CONFIG_TRUNCATE=y +CONFIG_UNLINK=y +# CONFIG_BASE64 is not set +CONFIG_WHO=y +# CONFIG_USERS is not set +# CONFIG_CAL is not set +CONFIG_CATV=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set +CONFIG_CHROOT=y +CONFIG_CKSUM=y +# CONFIG_COMM is not set +CONFIG_CP=y +# CONFIG_FEATURE_CP_LONG_OPTIONS is not set +CONFIG_CUT=y +CONFIG_DF=y +# CONFIG_FEATURE_DF_FANCY is not set +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set +# CONFIG_EXPAND is not set +# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set +CONFIG_EXPR=y +CONFIG_EXPR_MATH_SUPPORT_64=y +CONFIG_FALSE=y +CONFIG_FOLD=y +# CONFIG_FSYNC is not set +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_INSTALL=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_FEATURE_MV_LONG_OPTIONS=y +CONFIG_NICE=y +CONFIG_NOHUP=y +CONFIG_OD=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y +CONFIG_SHA3SUM=y +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_FEATURE_FLOAT_SLEEP=y +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +# CONFIG_SPLIT is not set +# CONFIG_FEATURE_SPLIT_FANCY is not set +# CONFIG_STAT is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +CONFIG_STTY=y +# CONFIG_SUM is not set +# CONFIG_TAC is not set +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +CONFIG_UNAME_OSNAME="GNU/Linux" +# CONFIG_UNEXPAND is not set +# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set +CONFIG_UNIQ=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +CONFIG_UUENCODE=y +CONFIG_WC=y +# CONFIG_FEATURE_WC_LARGE is not set +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options +# +CONFIG_FEATURE_VERBOSE=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +# CONFIG_CHVT is not set +# CONFIG_FGCONSOLE is not set +# CONFIG_CLEAR is not set +# CONFIG_DEALLOCVT is not set +# CONFIG_DUMPKMAP is not set +# CONFIG_KBD_MODE is not set +# CONFIG_LOADFONT is not set +# CONFIG_LOADKMAP is not set +# CONFIG_OPENVT is not set +# CONFIG_RESET is not set +# CONFIG_RESIZE is not set +# CONFIG_FEATURE_RESIZE_PRINT is not set +# CONFIG_SETCONSOLE is not set +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_SETFONT is not set +# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set +CONFIG_DEFAULT_SETFONT_DIR="" +# CONFIG_SETKEYCODES is not set +# CONFIG_SETLOGCONS is not set +# CONFIG_SHOWKEY is not set +# CONFIG_FEATURE_LOADFONT_PSF2 is not set +# CONFIG_FEATURE_LOADFONT_RAW is not set + +# +# Debian Utilities +# +# CONFIG_MKTEMP is not set +# CONFIG_PIPE_PROGRESS is not set +CONFIG_RUN_PARTS=y +CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y +CONFIG_FEATURE_RUN_PARTS_FANCY=y +CONFIG_START_STOP_DAEMON=y +CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_WHICH=y + +# +# Editors +# +# CONFIG_AWK is not set +# CONFIG_FEATURE_AWK_LIBM is not set +# CONFIG_FEATURE_AWK_GNU_EXTENSIONS is not set +# CONFIG_CMP is not set +# CONFIG_DIFF is not set +# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set +# CONFIG_FEATURE_DIFF_DIR is not set +# CONFIG_ED is not set +# CONFIG_PATCH is not set +CONFIG_SED=y +# CONFIG_VI is not set +CONFIG_FEATURE_VI_MAX_LEN=0 +# CONFIG_FEATURE_VI_8BIT is not set +# CONFIG_FEATURE_VI_COLON is not set +# CONFIG_FEATURE_VI_YANKMARK is not set +# CONFIG_FEATURE_VI_SEARCH is not set +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +# CONFIG_FEATURE_VI_USE_SIGNALS is not set +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +# CONFIG_FEATURE_VI_WIN_RESIZE is not set +# CONFIG_FEATURE_VI_ASK_TERMINAL is not set +# CONFIG_FEATURE_VI_UNDO is not set +# CONFIG_FEATURE_VI_UNDO_QUEUE is not set +CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=0 +# CONFIG_FEATURE_ALLOW_EXEC is not set + +# +# Finding Utilities +# +# CONFIG_FIND is not set +# CONFIG_FEATURE_FIND_PRINT0 is not set +# CONFIG_FEATURE_FIND_MTIME is not set +# CONFIG_FEATURE_FIND_MMIN is not set +# CONFIG_FEATURE_FIND_PERM is not set +# CONFIG_FEATURE_FIND_TYPE is not set +# CONFIG_FEATURE_FIND_XDEV is not set +# CONFIG_FEATURE_FIND_MAXDEPTH is not set +# CONFIG_FEATURE_FIND_NEWER is not set +# CONFIG_FEATURE_FIND_INUM is not set +# CONFIG_FEATURE_FIND_EXEC is not set +# CONFIG_FEATURE_FIND_EXEC_PLUS is not set +# CONFIG_FEATURE_FIND_USER is not set +# CONFIG_FEATURE_FIND_GROUP is not set +# CONFIG_FEATURE_FIND_NOT is not set +# CONFIG_FEATURE_FIND_DEPTH is not set +# CONFIG_FEATURE_FIND_PAREN is not set +# CONFIG_FEATURE_FIND_SIZE is not set +# CONFIG_FEATURE_FIND_PRUNE is not set +# CONFIG_FEATURE_FIND_DELETE is not set +# CONFIG_FEATURE_FIND_PATH is not set +# CONFIG_FEATURE_FIND_REGEX is not set +# CONFIG_FEATURE_FIND_CONTEXT is not set +# CONFIG_FEATURE_FIND_LINKS is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y +CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +CONFIG_FEATURE_KILL_REMOVED=y +CONFIG_FEATURE_KILL_DELAY=0 +CONFIG_FEATURE_INIT_SCTTY=y +CONFIG_FEATURE_INIT_SYSLOG=y +CONFIG_FEATURE_EXTRA_QUIET=y +# CONFIG_FEATURE_INIT_COREDUMPS is not set +CONFIG_FEATURE_INITRD=y +CONFIG_INIT_TERMINAL_TYPE="linux" +CONFIG_MESG=y +CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y + +# +# Login/Password Management Utilities +# +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set +CONFIG_FEATURE_SHADOWPASSWDS=y +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_USE_BB_SHADOW is not set +CONFIG_USE_BB_CRYPT=y +# CONFIG_USE_BB_CRYPT_SHA is not set +CONFIG_ADDUSER=y +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_LAST_ID=60000 +CONFIG_FIRST_SYSTEM_ID=100 +CONFIG_LAST_SYSTEM_ID=999 +# CONFIG_ADDGROUP is not set +# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +# CONFIG_DELUSER is not set +# CONFIG_DELGROUP is not set +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +CONFIG_GETTY=y +CONFIG_LOGIN=y +# CONFIG_LOGIN_SESSION_AS_CHILD is not set +# CONFIG_LOGIN_SCRIPTS is not set +CONFIG_FEATURE_NOLOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +# CONFIG_CRYPTPW is not set +# CONFIG_CHPASSWD is not set +CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des" +# CONFIG_SU is not set +# CONFIG_FEATURE_SU_SYSLOG is not set +# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Linux Ext2 FS Progs +# +# CONFIG_CHATTR is not set +# CONFIG_FSCK is not set +# CONFIG_LSATTR is not set +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +# CONFIG_INSMOD is not set +# CONFIG_RMMOD is not set +# CONFIG_LSMOD is not set +# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +# CONFIG_MODPROBE is not set +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_DEPMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set +# CONFIG_FEATURE_MODUTILS_ALIAS is not set +# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set +CONFIG_DEFAULT_MODULES_DIR="" +CONFIG_DEFAULT_DEPMOD_FILE="" + +# +# Linux System Utilities +# +# CONFIG_BLOCKDEV is not set +# CONFIG_FATATTR is not set +# CONFIG_FSTRIM is not set +# CONFIG_MDEV is not set +# CONFIG_FEATURE_MDEV_CONF is not set +# CONFIG_FEATURE_MDEV_RENAME is not set +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +# CONFIG_FEATURE_MDEV_EXEC is not set +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +CONFIG_MOUNT=y +# CONFIG_FEATURE_MOUNT_FAKE is not set +# CONFIG_FEATURE_MOUNT_VERBOSE is not set +# CONFIG_FEATURE_MOUNT_HELPERS is not set +# CONFIG_FEATURE_MOUNT_LABEL is not set +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_FEATURE_MOUNT_OTHERTAB=y +# CONFIG_REV is not set +# CONFIG_UEVENT is not set +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +# CONFIG_BLKID is not set +# CONFIG_FEATURE_BLKID_TYPE is not set +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +# CONFIG_FBSET is not set +# CONFIG_FEATURE_FBSET_FANCY is not set +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FDFORMAT is not set +# CONFIG_FDISK is not set +# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set +# CONFIG_FEATURE_FDISK_WRITABLE is not set +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FINDFS is not set +# CONFIG_FLOCK is not set +CONFIG_FREERAMDISK=y +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_EXT2 is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_MKFS_REISER is not set +# CONFIG_MKFS_VFAT is not set +CONFIG_GETOPT=y +CONFIG_FEATURE_GETOPT_LONG=y +# CONFIG_HEXDUMP is not set +# CONFIG_FEATURE_HEXDUMP_REVERSE is not set +# CONFIG_HD is not set +# CONFIG_HWCLOCK is not set +# CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS is not set +# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set +# CONFIG_IPCRM is not set +# CONFIG_IPCS is not set +# CONFIG_LOSETUP is not set +# CONFIG_LSPCI is not set +# CONFIG_LSUSB is not set +# CONFIG_MKSWAP is not set +# CONFIG_FEATURE_MKSWAP_UUID is not set +CONFIG_MORE=y +# CONFIG_PIVOT_ROOT is not set +# CONFIG_RDATE is not set +# CONFIG_RDEV is not set +# CONFIG_READPROFILE is not set +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +# CONFIG_SETARCH is not set +# CONFIG_SWAPONOFF is not set +# CONFIG_FEATURE_SWAPON_DISCARD is not set +# CONFIG_FEATURE_SWAPON_PRI is not set +# CONFIG_SWITCH_ROOT is not set +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set +# CONFIG_VOLUMEID is not set +# CONFIG_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set +# CONFIG_FEATURE_VOLUMEID_EXFAT is not set +# CONFIG_FEATURE_VOLUMEID_EXT is not set +# CONFIG_FEATURE_VOLUMEID_F2FS is not set +# CONFIG_FEATURE_VOLUMEID_FAT is not set +# CONFIG_FEATURE_VOLUMEID_HFS is not set +# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set +# CONFIG_FEATURE_VOLUMEID_JFS is not set +# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set +# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set +# CONFIG_FEATURE_VOLUMEID_LUKS is not set +# CONFIG_FEATURE_VOLUMEID_NILFS is not set +# CONFIG_FEATURE_VOLUMEID_NTFS is not set +# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set +# CONFIG_FEATURE_VOLUMEID_REISERFS is not set +# CONFIG_FEATURE_VOLUMEID_ROMFS is not set +# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set +# CONFIG_FEATURE_VOLUMEID_SYSV is not set +# CONFIG_FEATURE_VOLUMEID_UDF is not set +# CONFIG_FEATURE_VOLUMEID_XFS is not set + +# +# Miscellaneous Utilities +# +# CONFIG_CONSPY is not set +# CONFIG_CROND is not set +# CONFIG_FEATURE_CROND_D is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_FEATURE_CROND_DIR="" +# CONFIG_I2CGET is not set +# CONFIG_I2CSET is not set +# CONFIG_I2CDUMP is not set +# CONFIG_I2CDETECT is not set +# CONFIG_LESS is not set +CONFIG_FEATURE_LESS_MAXLINES=0 +# CONFIG_FEATURE_LESS_BRACKETS is not set +# CONFIG_FEATURE_LESS_FLAGS is not set +# CONFIG_FEATURE_LESS_TRUNCATE is not set +# CONFIG_FEATURE_LESS_MARKS is not set +# CONFIG_FEATURE_LESS_REGEXP is not set +# CONFIG_FEATURE_LESS_WINCH is not set +# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set +# CONFIG_FEATURE_LESS_DASHCMD is not set +# CONFIG_FEATURE_LESS_LINENUMS is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +# CONFIG_RFKILL is not set +CONFIG_SETSERIAL=y +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set +# CONFIG_WALL is not set +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +# CONFIG_BEEP is not set +CONFIG_FEATURE_BEEP_FREQ=0 +CONFIG_FEATURE_BEEP_LENGTH_MS=0 +# CONFIG_CHAT is not set +# CONFIG_FEATURE_CHAT_NOFAIL is not set +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set +# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set +# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set +# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set +# CONFIG_FEATURE_CHAT_CLR_ABORT is not set +# CONFIG_CHRT is not set +# CONFIG_CRONTAB is not set +# CONFIG_DC is not set +# CONFIG_FEATURE_DC_LIBM is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +# CONFIG_DEVMEM is not set +# CONFIG_EJECT is not set +# CONFIG_FEATURE_EJECT_SCSI is not set +# CONFIG_FBSPLASH is not set +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +# CONFIG_FLASH_ERASEALL is not set +# CONFIG_IONICE is not set +# CONFIG_INOTIFYD is not set +# CONFIG_LAST is not set +# CONFIG_FEATURE_LAST_SMALL is not set +# CONFIG_FEATURE_LAST_FANCY is not set +# CONFIG_HDPARM is not set +# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +# CONFIG_FEATURE_MAKEDEVS_TABLE is not set +# CONFIG_MAN is not set +# CONFIG_MICROCOM is not set +# CONFIG_MOUNTPOINT is not set +# CONFIG_MT is not set +# CONFIG_RAIDAUTORUN is not set +# CONFIG_READAHEAD is not set +# CONFIG_RUNLEVEL is not set +# CONFIG_RX is not set +# CONFIG_SETSID is not set +# CONFIG_STRINGS is not set +# CONFIG_TIME is not set +# CONFIG_TIMEOUT is not set +# CONFIG_TTYSIZE is not set +# CONFIG_VOLNAME is not set +# CONFIG_WATCHDOG is not set + +# +# Networking Utilities +# +# CONFIG_NAMEIF is not set +# CONFIG_FEATURE_NAMEIF_EXTENDED is not set +# CONFIG_NBDCLIENT is not set +CONFIG_NC=y +CONFIG_NC_SERVER=y +# CONFIG_NC_EXTRA is not set +# CONFIG_NC_110_COMPAT is not set +CONFIG_PING=y +# CONFIG_PING6 is not set +# CONFIG_FEATURE_FANCY_PING is not set +CONFIG_WGET=y +# CONFIG_FEATURE_WGET_STATUSBAR is not set +# CONFIG_FEATURE_WGET_AUTHENTICATION is not set +# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set +# CONFIG_FEATURE_WGET_TIMEOUT is not set +# CONFIG_FEATURE_WGET_OPENSSL is not set +# CONFIG_FEATURE_WGET_SSL_HELPER is not set +# CONFIG_WHOIS is not set +# CONFIG_FEATURE_IPV6 is not set +# CONFIG_FEATURE_UNIX_LOCAL is not set +# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +# CONFIG_ARP is not set +# CONFIG_ARPING is not set +# CONFIG_BRCTL is not set +# CONFIG_FEATURE_BRCTL_FANCY is not set +# CONFIG_FEATURE_BRCTL_SHOW is not set +# CONFIG_DNSD is not set +# CONFIG_ETHER_WAKE is not set +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPD is not set +# CONFIG_FEATURE_FTP_WRITE is not set +# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +# CONFIG_FEATURE_FTP_AUTHENTICATION is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RANGES is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +CONFIG_FEATURE_IFCONFIG_HW=y +CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y +# CONFIG_IFENSLAVE is not set +# CONFIG_IFPLUGD is not set +CONFIG_IFUPDOWN=y +CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" +CONFIG_FEATURE_IFUPDOWN_IP=y +CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y +# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set +CONFIG_FEATURE_IFUPDOWN_IPV4=y +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y +# CONFIG_INETD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set +# CONFIG_FEATURE_INETD_RPC is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2" +# CONFIG_FEATURE_IP_TUNNEL is not set +# CONFIG_FEATURE_IP_RULE is not set +CONFIG_FEATURE_IP_SHORT_FORMS=y +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +# CONFIG_IPTUNNEL is not set +# CONFIG_IPRULE is not set +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +CONFIG_NETSTAT=y +# CONFIG_FEATURE_NETSTAT_WIDE is not set +CONFIG_FEATURE_NETSTAT_PRG=y +# CONFIG_NSLOOKUP is not set +# CONFIG_NTPD is not set +# CONFIG_FEATURE_NTPD_SERVER is not set +# CONFIG_FEATURE_NTPD_CONF is not set +# CONFIG_PSCAN is not set +CONFIG_ROUTE=y +# CONFIG_SLATTACH is not set +# CONFIG_TCPSVD is not set +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_STANDALONE is not set +# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set +# CONFIG_TFTP is not set +# CONFIG_TFTPD is not set +# CONFIG_FEATURE_TFTP_GET is not set +# CONFIG_FEATURE_TFTP_PUT is not set +# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set +# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_TFTP_DEBUG is not set +# CONFIG_TRACEROUTE is not set +# CONFIG_TRACEROUTE6 is not set +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_TUNCTL is not set +# CONFIG_FEATURE_TUNCTL_UG is not set +# CONFIG_UDHCPC6 is not set +# CONFIG_UDHCPD is not set +# CONFIG_DHCPRELAY is not set +# CONFIG_DUMPLEASES is not set +# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set +# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +CONFIG_DHCPD_LEASES_FILE="" +CONFIG_UDHCPC=y +# CONFIG_FEATURE_UDHCPC_ARPING is not set +CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=9 +# CONFIG_FEATURE_UDHCP_RFC3397 is not set +# CONFIG_FEATURE_UDHCP_8021Q is not set +CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" +# CONFIG_UDPSVD is not set +# CONFIG_VCONFIG is not set +# CONFIG_ZCIP is not set + +# +# Print Utilities +# +# CONFIG_LPD is not set +# CONFIG_LPR is not set +# CONFIG_LPQ is not set + +# +# Mail Utilities +# +# CONFIG_MAKEMIME is not set +CONFIG_FEATURE_MIME_CHARSET="" +# CONFIG_POPMAILDIR is not set +# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set +# CONFIG_REFORMIME is not set +# CONFIG_FEATURE_REFORMIME_COMPAT is not set +# CONFIG_SENDMAIL is not set + +# +# Process Utilities +# +# CONFIG_IOSTAT is not set +# CONFIG_LSOF is not set +# CONFIG_MPSTAT is not set +# CONFIG_NMETER is not set +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set +# CONFIG_PSTREE is not set +# CONFIG_PWDX is not set +# CONFIG_SMEMCAP is not set +# CONFIG_TOP is not set +# CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE is not set +# CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS is not set +# CONFIG_FEATURE_TOP_SMP_CPU is not set +# CONFIG_FEATURE_TOP_DECIMALS is not set +# CONFIG_FEATURE_TOP_SMP_PROCESS is not set +# CONFIG_FEATURE_TOPMEM is not set +# CONFIG_UPTIME is not set +# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set +# CONFIG_FREE is not set +# CONFIG_FUSER is not set +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +# CONFIG_PGREP is not set +# CONFIG_PIDOF is not set +# CONFIG_FEATURE_PIDOF_SINGLE is not set +# CONFIG_FEATURE_PIDOF_OMIT is not set +# CONFIG_PKILL is not set +CONFIG_PS=y +CONFIG_FEATURE_PS_WIDE=y +CONFIG_FEATURE_PS_LONG=y +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +# CONFIG_RENICE is not set +# CONFIG_BB_SYSCTL is not set +# CONFIG_FEATURE_SHOW_THREADS is not set +# CONFIG_WATCH is not set + +# +# Runit Utilities +# +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_SV is not set +CONFIG_SV_DEFAULT_SERVICE_DIR="" +# CONFIG_SVLOGD is not set +# CONFIG_CHPST is not set +# CONFIG_SETUIDGID is not set +# CONFIG_ENVUIDGID is not set +# CONFIG_ENVDIR is not set +# CONFIG_SOFTLIMIT is not set +# CONFIG_CHCON is not set +# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RESTORECON is not set +# CONFIG_RUNCON is not set +# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_SETSEBOOL is not set +# CONFIG_SESTATUS is not set + +# +# Shells +# +# CONFIG_ASH is not set +# CONFIG_ASH_BASH_COMPAT is not set +# CONFIG_ASH_IDLE_TIMEOUT is not set +# CONFIG_ASH_JOB_CONTROL is not set +# CONFIG_ASH_ALIAS is not set +# CONFIG_ASH_GETOPTS is not set +# CONFIG_ASH_BUILTIN_ECHO is not set +# CONFIG_ASH_BUILTIN_PRINTF is not set +# CONFIG_ASH_BUILTIN_TEST is not set +# CONFIG_ASH_HELP is not set +# CONFIG_ASH_CMDCMD is not set +# CONFIG_ASH_MAIL is not set +# CONFIG_ASH_OPTIMIZE_FOR_SIZE is not set +# CONFIG_ASH_RANDOM_SUPPORT is not set +# CONFIG_ASH_EXPAND_PRMT is not set +# CONFIG_CTTYHACK is not set +CONFIG_HUSH=y +CONFIG_HUSH_BASH_COMPAT=y +CONFIG_HUSH_BRACE_EXPANSION=y +CONFIG_HUSH_HELP=y +CONFIG_HUSH_INTERACTIVE=y +CONFIG_HUSH_SAVEHISTORY=y +CONFIG_HUSH_JOB=y +CONFIG_HUSH_TICK=y +CONFIG_HUSH_IF=y +CONFIG_HUSH_LOOPS=y +CONFIG_HUSH_CASE=y +CONFIG_HUSH_FUNCTIONS=y +CONFIG_HUSH_LOCAL=y +CONFIG_HUSH_RANDOM_SUPPORT=y +CONFIG_HUSH_EXPORT_N=y +CONFIG_HUSH_MODE_X=y +# CONFIG_MSH is not set +# CONFIG_FEATURE_SH_IS_ASH is not set +CONFIG_FEATURE_SH_IS_HUSH=y +# CONFIG_FEATURE_SH_IS_NONE is not set +# CONFIG_FEATURE_BASH_IS_ASH is not set +# CONFIG_FEATURE_BASH_IS_HUSH is not set +CONFIG_FEATURE_BASH_IS_NONE=y +CONFIG_SH_MATH_SUPPORT=y +# CONFIG_SH_MATH_SUPPORT_64 is not set +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +# CONFIG_FEATURE_SH_HISTFILESIZE is not set + +# +# System Logging Utilities +# +# CONFIG_SYSLOGD is not set +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +# CONFIG_FEATURE_REMOTE_LOG is not set +# CONFIG_FEATURE_SYSLOGD_DUP is not set +# CONFIG_FEATURE_SYSLOGD_CFG is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +# CONFIG_FEATURE_KMSG_SYSLOG is not set +# CONFIG_KLOGD is not set +# CONFIG_FEATURE_KLOGD_KLOGCTL is not set +# CONFIG_LOGGER is not set diff --git a/package/busybox/busybox.config b/package/busybox/busybox.config new file mode 100644 index 0000000000..693b9d24ff --- /dev/null +++ b/package/busybox/busybox.config @@ -0,0 +1,1055 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.23.0 +# Sun Dec 28 21:14:57 2014 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Busybox Settings +# + +# +# General Configuration +# +CONFIG_DESKTOP=y +# CONFIG_EXTRA_COMPAT is not set +CONFIG_INCLUDE_SUSv2=y +# CONFIG_USE_PORTABLE_CODE is not set +CONFIG_PLATFORM_LINUX=y +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_SHOW_USAGE=y +CONFIG_FEATURE_VERBOSE_USAGE=y +# CONFIG_FEATURE_COMPRESS_USAGE is not set +CONFIG_FEATURE_INSTALLER=y +# CONFIG_INSTALL_NO_USR is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +# CONFIG_PAM is not set +CONFIG_FEATURE_USE_SENDFILE=y +CONFIG_LONG_OPTS=y +CONFIG_FEATURE_DEVPTS=y +CONFIG_FEATURE_CLEAN_UP=y +CONFIG_FEATURE_UTMP=y +CONFIG_FEATURE_WTMP=y +# CONFIG_FEATURE_PIDFILE is not set +CONFIG_PID_FILE_PATH="" +CONFIG_FEATURE_SUID=y +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +CONFIG_FEATURE_SYSLOG=y +# CONFIG_FEATURE_HAVE_RPC is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_LFS=y +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_UNIT_TEST is not set +# CONFIG_WERROR is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Busybox Library Tuning +# +# CONFIG_FEATURE_SYSTEMD is not set +CONFIG_FEATURE_RTMINMAX=y +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SMALL=1 +CONFIG_SHA3_SMALL=1 +# CONFIG_FEATURE_FAST_TOP is not set +# CONFIG_FEATURE_ETC_NETWORKS is not set +CONFIG_FEATURE_USE_TERMIOS=y +CONFIG_FEATURE_EDITING=y +CONFIG_FEATURE_EDITING_MAX_LEN=1024 +CONFIG_FEATURE_EDITING_VI=y +CONFIG_FEATURE_EDITING_HISTORY=999 +CONFIG_FEATURE_EDITING_SAVEHISTORY=y +# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set +CONFIG_FEATURE_REVERSE_SEARCH=y +CONFIG_FEATURE_TAB_COMPLETION=y +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +CONFIG_FEATURE_EDITING_FANCY_PROMPT=y +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +CONFIG_FEATURE_NON_POSIX_CP=y +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +CONFIG_FEATURE_SKIP_ROOTFS=y +CONFIG_MONOTONIC_SYSCALL=y +CONFIG_IOCTL_HEX2STR_ERROR=y +CONFIG_FEATURE_HWIB=y + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_FEATURE_SEAMLESS_XZ is not set +# CONFIG_FEATURE_SEAMLESS_LZMA is not set +# CONFIG_FEATURE_SEAMLESS_BZ2 is not set +# CONFIG_FEATURE_SEAMLESS_GZ is not set +# CONFIG_FEATURE_SEAMLESS_Z is not set +CONFIG_AR=y +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +CONFIG_FEATURE_AR_CREATE=y +# CONFIG_UNCOMPRESS is not set +CONFIG_GUNZIP=y +CONFIG_BUNZIP2=y +CONFIG_UNLZMA=y +# CONFIG_FEATURE_LZMA_FAST is not set +CONFIG_LZMA=y +CONFIG_UNXZ=y +CONFIG_XZ=y +# CONFIG_BZIP2 is not set +CONFIG_CPIO=y +# CONFIG_FEATURE_CPIO_O is not set +# CONFIG_FEATURE_CPIO_P is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set +CONFIG_GZIP=y +# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set +CONFIG_GZIP_FAST=0 +# CONFIG_LZOP is not set +# CONFIG_LZOP_COMPR_HIGH is not set +# CONFIG_RPM2CPIO is not set +# CONFIG_RPM is not set +CONFIG_TAR=y +CONFIG_FEATURE_TAR_CREATE=y +# CONFIG_FEATURE_TAR_AUTODETECT is not set +CONFIG_FEATURE_TAR_FROM=y +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y +CONFIG_FEATURE_TAR_LONG_OPTIONS=y +CONFIG_FEATURE_TAR_TO_COMMAND=y +# CONFIG_FEATURE_TAR_UNAME_GNAME is not set +# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set +# CONFIG_FEATURE_TAR_SELINUX is not set +CONFIG_UNZIP=y + +# +# Coreutils +# +CONFIG_BASENAME=y +CONFIG_CAT=y +CONFIG_DATE=y +CONFIG_FEATURE_DATE_ISOFMT=y +# CONFIG_FEATURE_DATE_NANO is not set +CONFIG_FEATURE_DATE_COMPAT=y +CONFIG_HOSTID=y +CONFIG_ID=y +# CONFIG_GROUPS is not set +# CONFIG_SHUF is not set +CONFIG_TEST=y +CONFIG_FEATURE_TEST_64=y +CONFIG_TOUCH=y +# CONFIG_FEATURE_TOUCH_NODEREF is not set +CONFIG_FEATURE_TOUCH_SUSV3=y +CONFIG_TR=y +CONFIG_FEATURE_TR_CLASSES=y +CONFIG_FEATURE_TR_EQUIV=y +CONFIG_UNLINK=y +# CONFIG_BASE64 is not set +CONFIG_WHO=y +# CONFIG_USERS is not set +# CONFIG_CAL is not set +CONFIG_CATV=y +CONFIG_CHGRP=y +CONFIG_CHMOD=y +CONFIG_CHOWN=y +# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set +CONFIG_CHROOT=y +CONFIG_CKSUM=y +# CONFIG_COMM is not set +CONFIG_CP=y +# CONFIG_FEATURE_CP_LONG_OPTIONS is not set +CONFIG_CUT=y +CONFIG_DD=y +CONFIG_FEATURE_DD_SIGNAL_HANDLING=y +# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set +CONFIG_FEATURE_DD_IBS_OBS=y +CONFIG_DF=y +# CONFIG_FEATURE_DF_FANCY is not set +CONFIG_DIRNAME=y +CONFIG_DOS2UNIX=y +CONFIG_UNIX2DOS=y +CONFIG_DU=y +CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y +CONFIG_ECHO=y +CONFIG_FEATURE_FANCY_ECHO=y +CONFIG_ENV=y +# CONFIG_FEATURE_ENV_LONG_OPTIONS is not set +# CONFIG_EXPAND is not set +# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set +CONFIG_EXPR=y +CONFIG_EXPR_MATH_SUPPORT_64=y +CONFIG_FALSE=y +CONFIG_FOLD=y +# CONFIG_FSYNC is not set +CONFIG_HEAD=y +CONFIG_FEATURE_FANCY_HEAD=y +CONFIG_INSTALL=y +CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y +CONFIG_LN=y +CONFIG_LOGNAME=y +CONFIG_LS=y +CONFIG_FEATURE_LS_FILETYPES=y +CONFIG_FEATURE_LS_FOLLOWLINKS=y +CONFIG_FEATURE_LS_RECURSIVE=y +CONFIG_FEATURE_LS_SORTFILES=y +CONFIG_FEATURE_LS_TIMESTAMPS=y +CONFIG_FEATURE_LS_USERNAME=y +CONFIG_FEATURE_LS_COLOR=y +CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y +CONFIG_MD5SUM=y +CONFIG_MKDIR=y +CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y +CONFIG_MKFIFO=y +CONFIG_MKNOD=y +CONFIG_MV=y +CONFIG_FEATURE_MV_LONG_OPTIONS=y +CONFIG_NICE=y +CONFIG_NOHUP=y +CONFIG_OD=y +CONFIG_PRINTENV=y +CONFIG_PRINTF=y +CONFIG_PWD=y +CONFIG_READLINK=y +CONFIG_FEATURE_READLINK_FOLLOW=y +CONFIG_REALPATH=y +CONFIG_RM=y +CONFIG_RMDIR=y +# CONFIG_FEATURE_RMDIR_LONG_OPTIONS is not set +CONFIG_SEQ=y +CONFIG_SHA1SUM=y +CONFIG_SHA256SUM=y +CONFIG_SHA512SUM=y +CONFIG_SHA3SUM=y +CONFIG_SLEEP=y +CONFIG_FEATURE_FANCY_SLEEP=y +CONFIG_FEATURE_FLOAT_SLEEP=y +CONFIG_SORT=y +CONFIG_FEATURE_SORT_BIG=y +# CONFIG_SPLIT is not set +# CONFIG_FEATURE_SPLIT_FANCY is not set +# CONFIG_STAT is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +CONFIG_STTY=y +# CONFIG_SUM is not set +CONFIG_SYNC=y +# CONFIG_FEATURE_SYNC_FANCY is not set +# CONFIG_TAC is not set +CONFIG_TAIL=y +CONFIG_FEATURE_FANCY_TAIL=y +CONFIG_TEE=y +CONFIG_FEATURE_TEE_USE_BLOCK_IO=y +CONFIG_TRUE=y +CONFIG_TTY=y +CONFIG_UNAME=y +# CONFIG_UNEXPAND is not set +# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set +CONFIG_UNIQ=y +CONFIG_USLEEP=y +CONFIG_UUDECODE=y +CONFIG_UUENCODE=y +CONFIG_WC=y +# CONFIG_FEATURE_WC_LARGE is not set +CONFIG_WHOAMI=y +CONFIG_YES=y + +# +# Common options +# +CONFIG_FEATURE_VERBOSE=y + +# +# Common options for cp and mv +# +CONFIG_FEATURE_PRESERVE_HARDLINKS=y + +# +# Common options for ls, more and telnet +# +CONFIG_FEATURE_AUTOWIDTH=y + +# +# Common options for df, du, ls +# +CONFIG_FEATURE_HUMAN_READABLE=y + +# +# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum +# +CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y + +# +# Console Utilities +# +CONFIG_CHVT=y +# CONFIG_FGCONSOLE is not set +CONFIG_CLEAR=y +CONFIG_DEALLOCVT=y +CONFIG_DUMPKMAP=y +# CONFIG_KBD_MODE is not set +CONFIG_LOADFONT=y +CONFIG_LOADKMAP=y +CONFIG_OPENVT=y +CONFIG_RESET=y +CONFIG_RESIZE=y +CONFIG_FEATURE_RESIZE_PRINT=y +CONFIG_SETCONSOLE=y +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_SETFONT is not set +# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set +CONFIG_DEFAULT_SETFONT_DIR="" +CONFIG_SETKEYCODES=y +CONFIG_SETLOGCONS=y +# CONFIG_SHOWKEY is not set + +# +# Common options for loadfont and setfont +# +CONFIG_FEATURE_LOADFONT_PSF2=y +CONFIG_FEATURE_LOADFONT_RAW=y + +# +# Debian Utilities +# +CONFIG_MKTEMP=y +CONFIG_PIPE_PROGRESS=y +CONFIG_RUN_PARTS=y +CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y +# CONFIG_FEATURE_RUN_PARTS_FANCY is not set +CONFIG_START_STOP_DAEMON=y +CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y +CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y +CONFIG_WHICH=y + +# +# Editors +# +CONFIG_AWK=y +# CONFIG_FEATURE_AWK_LIBM is not set +CONFIG_FEATURE_AWK_GNU_EXTENSIONS=y +CONFIG_CMP=y +CONFIG_DIFF=y +# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set +CONFIG_FEATURE_DIFF_DIR=y +# CONFIG_ED is not set +CONFIG_PATCH=y +CONFIG_SED=y +CONFIG_VI=y +CONFIG_FEATURE_VI_MAX_LEN=4096 +CONFIG_FEATURE_VI_8BIT=y +CONFIG_FEATURE_VI_COLON=y +CONFIG_FEATURE_VI_YANKMARK=y +CONFIG_FEATURE_VI_SEARCH=y +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +CONFIG_FEATURE_VI_USE_SIGNALS=y +CONFIG_FEATURE_VI_DOT_CMD=y +CONFIG_FEATURE_VI_READONLY=y +CONFIG_FEATURE_VI_SETOPTS=y +CONFIG_FEATURE_VI_SET=y +CONFIG_FEATURE_VI_WIN_RESIZE=y +CONFIG_FEATURE_VI_ASK_TERMINAL=y +CONFIG_FEATURE_VI_UNDO=y +CONFIG_FEATURE_VI_UNDO_QUEUE=y +CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=256 +CONFIG_FEATURE_ALLOW_EXEC=y + +# +# Finding Utilities +# +CONFIG_FIND=y +CONFIG_FEATURE_FIND_PRINT0=y +CONFIG_FEATURE_FIND_MTIME=y +CONFIG_FEATURE_FIND_MMIN=y +CONFIG_FEATURE_FIND_PERM=y +CONFIG_FEATURE_FIND_TYPE=y +CONFIG_FEATURE_FIND_XDEV=y +CONFIG_FEATURE_FIND_MAXDEPTH=y +CONFIG_FEATURE_FIND_NEWER=y +# CONFIG_FEATURE_FIND_INUM is not set +CONFIG_FEATURE_FIND_EXEC=y +CONFIG_FEATURE_FIND_EXEC_PLUS=y +CONFIG_FEATURE_FIND_USER=y +CONFIG_FEATURE_FIND_GROUP=y +CONFIG_FEATURE_FIND_NOT=y +CONFIG_FEATURE_FIND_DEPTH=y +CONFIG_FEATURE_FIND_PAREN=y +CONFIG_FEATURE_FIND_SIZE=y +CONFIG_FEATURE_FIND_PRUNE=y +# CONFIG_FEATURE_FIND_DELETE is not set +CONFIG_FEATURE_FIND_PATH=y +CONFIG_FEATURE_FIND_REGEX=y +# CONFIG_FEATURE_FIND_CONTEXT is not set +# CONFIG_FEATURE_FIND_LINKS is not set +CONFIG_GREP=y +CONFIG_FEATURE_GREP_EGREP_ALIAS=y +CONFIG_FEATURE_GREP_FGREP_ALIAS=y +CONFIG_FEATURE_GREP_CONTEXT=y +CONFIG_XARGS=y +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y +CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y +CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y +CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +CONFIG_HALT=y +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +CONFIG_INIT=y +CONFIG_FEATURE_USE_INITTAB=y +CONFIG_FEATURE_KILL_REMOVED=y +CONFIG_FEATURE_KILL_DELAY=0 +CONFIG_FEATURE_INIT_SCTTY=y +CONFIG_FEATURE_INIT_SYSLOG=y +CONFIG_FEATURE_EXTRA_QUIET=y +# CONFIG_FEATURE_INIT_COREDUMPS is not set +CONFIG_FEATURE_INITRD=y +CONFIG_INIT_TERMINAL_TYPE="linux" +CONFIG_MESG=y +CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP=y + +# +# Login/Password Management Utilities +# +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set +CONFIG_FEATURE_SHADOWPASSWDS=y +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_USE_BB_SHADOW is not set +CONFIG_USE_BB_CRYPT=y +# CONFIG_USE_BB_CRYPT_SHA is not set +CONFIG_ADDUSER=y +# CONFIG_FEATURE_ADDUSER_LONG_OPTIONS is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_LAST_ID=60000 +CONFIG_FIRST_SYSTEM_ID=100 +CONFIG_LAST_SYSTEM_ID=999 +CONFIG_ADDGROUP=y +# CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS is not set +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +CONFIG_DELUSER=y +CONFIG_DELGROUP=y +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +CONFIG_GETTY=y +CONFIG_LOGIN=y +# CONFIG_LOGIN_SESSION_AS_CHILD is not set +# CONFIG_LOGIN_SCRIPTS is not set +CONFIG_FEATURE_NOLOGIN=y +CONFIG_FEATURE_SECURETTY=y +CONFIG_PASSWD=y +CONFIG_FEATURE_PASSWD_WEAK_CHECK=y +# CONFIG_CRYPTPW is not set +# CONFIG_CHPASSWD is not set +CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="md5" +CONFIG_SU=y +CONFIG_FEATURE_SU_SYSLOG=y +CONFIG_FEATURE_SU_CHECKS_SHELLS=y +CONFIG_SULOGIN=y +CONFIG_VLOCK=y + +# +# Linux Ext2 FS Progs +# +CONFIG_CHATTR=y +CONFIG_FSCK=y +CONFIG_LSATTR=y +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +CONFIG_INSMOD=y +CONFIG_RMMOD=y +CONFIG_LSMOD=y +CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y +CONFIG_MODPROBE=y +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_DEPMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +CONFIG_FEATURE_CHECK_TAINTED_MODULE=y +CONFIG_FEATURE_MODUTILS_ALIAS=y +CONFIG_FEATURE_MODUTILS_SYMBOLS=y +CONFIG_DEFAULT_MODULES_DIR="/lib/modules" +CONFIG_DEFAULT_DEPMOD_FILE="modules.dep" + +# +# Linux System Utilities +# +# CONFIG_BLOCKDEV is not set +# CONFIG_FATATTR is not set +CONFIG_FSTRIM=y +CONFIG_MDEV=y +CONFIG_FEATURE_MDEV_CONF=y +CONFIG_FEATURE_MDEV_RENAME=y +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +CONFIG_FEATURE_MDEV_EXEC=y +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +# CONFIG_REV is not set +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +CONFIG_BLKID=y +# CONFIG_FEATURE_BLKID_TYPE is not set +CONFIG_DMESG=y +CONFIG_FEATURE_DMESG_PRETTY=y +CONFIG_FBSET=y +CONFIG_FEATURE_FBSET_FANCY=y +CONFIG_FEATURE_FBSET_READMODE=y +CONFIG_FDFLUSH=y +CONFIG_FDFORMAT=y +CONFIG_FDISK=y +CONFIG_FDISK_SUPPORT_LARGE_DISKS=y +CONFIG_FEATURE_FDISK_WRITABLE=y +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +CONFIG_FEATURE_GPT_LABEL=y +CONFIG_FEATURE_FDISK_ADVANCED=y +# CONFIG_FINDFS is not set +CONFIG_FLOCK=y +CONFIG_FREERAMDISK=y +# CONFIG_FSCK_MINIX is not set +# CONFIG_MKFS_EXT2 is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_MKFS_REISER is not set +# CONFIG_MKFS_VFAT is not set +CONFIG_GETOPT=y +CONFIG_FEATURE_GETOPT_LONG=y +CONFIG_HEXDUMP=y +# CONFIG_FEATURE_HEXDUMP_REVERSE is not set +# CONFIG_HD is not set +CONFIG_HWCLOCK=y +CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y +CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y +CONFIG_IPCRM=y +CONFIG_IPCS=y +CONFIG_LOSETUP=y +CONFIG_LSPCI=y +CONFIG_LSUSB=y +CONFIG_MKSWAP=y +# CONFIG_FEATURE_MKSWAP_UUID is not set +CONFIG_MORE=y +CONFIG_MOUNT=y +# CONFIG_FEATURE_MOUNT_FAKE is not set +# CONFIG_FEATURE_MOUNT_VERBOSE is not set +# CONFIG_FEATURE_MOUNT_HELPERS is not set +# CONFIG_FEATURE_MOUNT_LABEL is not set +# CONFIG_FEATURE_MOUNT_NFS is not set +CONFIG_FEATURE_MOUNT_CIFS=y +CONFIG_FEATURE_MOUNT_FLAGS=y +CONFIG_FEATURE_MOUNT_FSTAB=y +CONFIG_PIVOT_ROOT=y +CONFIG_RDATE=y +# CONFIG_RDEV is not set +CONFIG_READPROFILE=y +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +CONFIG_SETARCH=y +CONFIG_SWAPONOFF=y +# CONFIG_FEATURE_SWAPON_DISCARD is not set +# CONFIG_FEATURE_SWAPON_PRI is not set +CONFIG_SWITCH_ROOT=y +CONFIG_UMOUNT=y +CONFIG_FEATURE_UMOUNT_ALL=y + +# +# Common options for mount/umount +# +CONFIG_FEATURE_MOUNT_LOOP=y +CONFIG_FEATURE_MOUNT_LOOP_CREATE=y +# CONFIG_FEATURE_MTAB_SUPPORT is not set +CONFIG_VOLUMEID=y + +# +# Filesystem/Volume identification +# +# CONFIG_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set +CONFIG_FEATURE_VOLUMEID_EXFAT=y +CONFIG_FEATURE_VOLUMEID_EXT=y +CONFIG_FEATURE_VOLUMEID_F2FS=y +CONFIG_FEATURE_VOLUMEID_FAT=y +# CONFIG_FEATURE_VOLUMEID_HFS is not set +# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set +# CONFIG_FEATURE_VOLUMEID_JFS is not set +# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set +# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set +# CONFIG_FEATURE_VOLUMEID_LUKS is not set +# CONFIG_FEATURE_VOLUMEID_NILFS is not set +# CONFIG_FEATURE_VOLUMEID_NTFS is not set +# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set +# CONFIG_FEATURE_VOLUMEID_REISERFS is not set +# CONFIG_FEATURE_VOLUMEID_ROMFS is not set +# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set +# CONFIG_FEATURE_VOLUMEID_SYSV is not set +# CONFIG_FEATURE_VOLUMEID_UDF is not set +# CONFIG_FEATURE_VOLUMEID_XFS is not set + +# +# Miscellaneous Utilities +# +# CONFIG_CONSPY is not set +CONFIG_CROND=y +# CONFIG_FEATURE_CROND_D is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +CONFIG_FEATURE_CROND_DIR="/var/spool/cron" +CONFIG_LESS=y +CONFIG_FEATURE_LESS_MAXLINES=9999999 +CONFIG_FEATURE_LESS_BRACKETS=y +CONFIG_FEATURE_LESS_FLAGS=y +# CONFIG_FEATURE_LESS_MARKS is not set +CONFIG_FEATURE_LESS_REGEXP=y +# CONFIG_FEATURE_LESS_WINCH is not set +# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set +# CONFIG_FEATURE_LESS_DASHCMD is not set +# CONFIG_FEATURE_LESS_LINENUMS is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +# CONFIG_RFKILL is not set +CONFIG_SETSERIAL=y +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set +# CONFIG_WALL is not set +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +# CONFIG_BEEP is not set +CONFIG_FEATURE_BEEP_FREQ=0 +CONFIG_FEATURE_BEEP_LENGTH_MS=0 +# CONFIG_CHAT is not set +# CONFIG_FEATURE_CHAT_NOFAIL is not set +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set +# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set +# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set +# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set +# CONFIG_FEATURE_CHAT_CLR_ABORT is not set +CONFIG_CHRT=y +CONFIG_CRONTAB=y +CONFIG_DC=y +# CONFIG_FEATURE_DC_LIBM is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +CONFIG_DEVMEM=y +CONFIG_EJECT=y +# CONFIG_FEATURE_EJECT_SCSI is not set +# CONFIG_FBSPLASH is not set +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +# CONFIG_FLASH_ERASEALL is not set +# CONFIG_IONICE is not set +# CONFIG_INOTIFYD is not set +CONFIG_LAST=y +CONFIG_FEATURE_LAST_SMALL=y +# CONFIG_FEATURE_LAST_FANCY is not set +CONFIG_HDPARM=y +CONFIG_FEATURE_HDPARM_GET_IDENTITY=y +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +CONFIG_MAKEDEVS=y +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +CONFIG_FEATURE_MAKEDEVS_TABLE=y +# CONFIG_MAN is not set +CONFIG_MICROCOM=y +CONFIG_MOUNTPOINT=y +CONFIG_MT=y +# CONFIG_RAIDAUTORUN is not set +# CONFIG_READAHEAD is not set +CONFIG_RUNLEVEL=y +# CONFIG_RX is not set +CONFIG_SETSID=y +CONFIG_STRINGS=y +CONFIG_TIME=y +# CONFIG_TIMEOUT is not set +# CONFIG_TTYSIZE is not set +# CONFIG_VOLNAME is not set +CONFIG_WATCHDOG=y + +# +# Networking Utilities +# +CONFIG_NAMEIF=y +# CONFIG_FEATURE_NAMEIF_EXTENDED is not set +# CONFIG_NBDCLIENT is not set +# CONFIG_NC is not set +# CONFIG_NC_SERVER is not set +# CONFIG_NC_EXTRA is not set +# CONFIG_NC_110_COMPAT is not set +CONFIG_PING=y +# CONFIG_PING6 is not set +CONFIG_FEATURE_FANCY_PING=y +# CONFIG_WHOIS is not set +CONFIG_FEATURE_IPV6=y +# CONFIG_FEATURE_UNIX_LOCAL is not set +CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +CONFIG_ARP=y +CONFIG_ARPING=y +# CONFIG_BRCTL is not set +# CONFIG_FEATURE_BRCTL_FANCY is not set +# CONFIG_FEATURE_BRCTL_SHOW is not set +CONFIG_DNSD=y +CONFIG_ETHER_WAKE=y +# CONFIG_FAKEIDENTD is not set +# CONFIG_FTPD is not set +# CONFIG_FEATURE_FTP_WRITE is not set +# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +# CONFIG_FEATURE_FTP_AUTHENTICATION is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +CONFIG_HOSTNAME=y +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RANGES is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set +CONFIG_IFCONFIG=y +CONFIG_FEATURE_IFCONFIG_STATUS=y +CONFIG_FEATURE_IFCONFIG_SLIP=y +CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y +CONFIG_FEATURE_IFCONFIG_HW=y +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +# CONFIG_IFENSLAVE is not set +# CONFIG_IFPLUGD is not set +CONFIG_IFUPDOWN=y +CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate" +CONFIG_FEATURE_IFUPDOWN_IP=y +# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set +# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set +CONFIG_FEATURE_IFUPDOWN_IPV4=y +CONFIG_FEATURE_IFUPDOWN_IPV6=y +CONFIG_FEATURE_IFUPDOWN_MAPPING=y +# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +CONFIG_INETD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME=y +CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN=y +# CONFIG_FEATURE_INETD_RPC is not set +CONFIG_IP=y +CONFIG_FEATURE_IP_ADDRESS=y +CONFIG_FEATURE_IP_LINK=y +CONFIG_FEATURE_IP_ROUTE=y +CONFIG_FEATURE_IP_TUNNEL=y +CONFIG_FEATURE_IP_RULE=y +CONFIG_FEATURE_IP_SHORT_FORMS=y +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +CONFIG_IPADDR=y +CONFIG_IPLINK=y +CONFIG_IPROUTE=y +CONFIG_IPTUNNEL=y +CONFIG_IPRULE=y +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +CONFIG_NETSTAT=y +# CONFIG_FEATURE_NETSTAT_WIDE is not set +# CONFIG_FEATURE_NETSTAT_PRG is not set +CONFIG_NSLOOKUP=y +# CONFIG_NTPD is not set +# CONFIG_FEATURE_NTPD_SERVER is not set +# CONFIG_FEATURE_NTPD_CONF is not set +# CONFIG_PSCAN is not set +CONFIG_ROUTE=y +# CONFIG_SLATTACH is not set +# CONFIG_TCPSVD is not set +CONFIG_TELNET=y +CONFIG_FEATURE_TELNET_TTYPE=y +CONFIG_FEATURE_TELNET_AUTOLOGIN=y +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_STANDALONE is not set +# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set +CONFIG_TFTP=y +# CONFIG_TFTPD is not set + +# +# Common options for tftp/tftpd +# +CONFIG_FEATURE_TFTP_GET=y +CONFIG_FEATURE_TFTP_PUT=y +CONFIG_FEATURE_TFTP_BLOCKSIZE=y +# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_TFTP_DEBUG is not set +CONFIG_TRACEROUTE=y +# CONFIG_TRACEROUTE6 is not set +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_TUNCTL is not set +# CONFIG_FEATURE_TUNCTL_UG is not set +# CONFIG_UDHCPC6 is not set +# CONFIG_UDHCPD is not set +# CONFIG_DHCPRELAY is not set +# CONFIG_DUMPLEASES is not set +# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set +# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +CONFIG_DHCPD_LEASES_FILE="" +CONFIG_UDHCPC=y +CONFIG_FEATURE_UDHCPC_ARPING=y +CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=0 +# CONFIG_FEATURE_UDHCP_RFC3397 is not set +CONFIG_FEATURE_UDHCP_8021Q=y +CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script" +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80 +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n" +# CONFIG_UDPSVD is not set +CONFIG_VCONFIG=y +CONFIG_WGET=y +CONFIG_FEATURE_WGET_STATUSBAR=y +CONFIG_FEATURE_WGET_AUTHENTICATION=y +CONFIG_FEATURE_WGET_LONG_OPTIONS=y +CONFIG_FEATURE_WGET_TIMEOUT=y +# CONFIG_ZCIP is not set + +# +# Print Utilities +# +# CONFIG_LPD is not set +# CONFIG_LPR is not set +# CONFIG_LPQ is not set + +# +# Mail Utilities +# +# CONFIG_MAKEMIME is not set +CONFIG_FEATURE_MIME_CHARSET="" +# CONFIG_POPMAILDIR is not set +# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set +# CONFIG_REFORMIME is not set +# CONFIG_FEATURE_REFORMIME_COMPAT is not set +# CONFIG_SENDMAIL is not set + +# +# Process Utilities +# +# CONFIG_IOSTAT is not set +CONFIG_LSOF=y +# CONFIG_MPSTAT is not set +# CONFIG_NMETER is not set +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set +# CONFIG_PSTREE is not set +# CONFIG_PWDX is not set +# CONFIG_SMEMCAP is not set +CONFIG_TOP=y +CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y +CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y +# CONFIG_FEATURE_TOP_SMP_CPU is not set +# CONFIG_FEATURE_TOP_DECIMALS is not set +# CONFIG_FEATURE_TOP_SMP_PROCESS is not set +# CONFIG_FEATURE_TOPMEM is not set +CONFIG_UPTIME=y +# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set +CONFIG_FREE=y +CONFIG_FUSER=y +CONFIG_KILL=y +CONFIG_KILLALL=y +CONFIG_KILLALL5=y +# CONFIG_PGREP is not set +CONFIG_PIDOF=y +CONFIG_FEATURE_PIDOF_SINGLE=y +CONFIG_FEATURE_PIDOF_OMIT=y +# CONFIG_PKILL is not set +CONFIG_PS=y +# CONFIG_FEATURE_PS_WIDE is not set +# CONFIG_FEATURE_PS_LONG is not set +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +CONFIG_RENICE=y +CONFIG_BB_SYSCTL=y +# CONFIG_FEATURE_SHOW_THREADS is not set +CONFIG_WATCH=y + +# +# Runit Utilities +# +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_SV is not set +CONFIG_SV_DEFAULT_SERVICE_DIR="" +# CONFIG_SVLOGD is not set +# CONFIG_CHPST is not set +# CONFIG_SETUIDGID is not set +# CONFIG_ENVUIDGID is not set +# CONFIG_ENVDIR is not set +# CONFIG_SOFTLIMIT is not set +# CONFIG_CHCON is not set +# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RESTORECON is not set +# CONFIG_RUNCON is not set +# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_SETSEBOOL is not set +# CONFIG_SESTATUS is not set + +# +# Shells +# +CONFIG_ASH=y +CONFIG_ASH_BASH_COMPAT=y +CONFIG_ASH_IDLE_TIMEOUT=y +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_GETOPTS=y +CONFIG_ASH_BUILTIN_ECHO=y +CONFIG_ASH_BUILTIN_PRINTF=y +CONFIG_ASH_BUILTIN_TEST=y +CONFIG_ASH_HELP=y +CONFIG_ASH_CMDCMD=y +# CONFIG_ASH_MAIL is not set +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +CONFIG_ASH_RANDOM_SUPPORT=y +CONFIG_ASH_EXPAND_PRMT=y +# CONFIG_CTTYHACK is not set +# CONFIG_HUSH is not set +# CONFIG_HUSH_BASH_COMPAT is not set +# CONFIG_HUSH_BRACE_EXPANSION is not set +# CONFIG_HUSH_HELP is not set +# CONFIG_HUSH_INTERACTIVE is not set +# CONFIG_HUSH_SAVEHISTORY is not set +# CONFIG_HUSH_JOB is not set +# CONFIG_HUSH_TICK is not set +# CONFIG_HUSH_IF is not set +# CONFIG_HUSH_LOOPS is not set +# CONFIG_HUSH_CASE is not set +# CONFIG_HUSH_FUNCTIONS is not set +# CONFIG_HUSH_LOCAL is not set +# CONFIG_HUSH_RANDOM_SUPPORT is not set +# CONFIG_HUSH_EXPORT_N is not set +# CONFIG_HUSH_MODE_X is not set +# CONFIG_MSH is not set +CONFIG_FEATURE_SH_IS_ASH=y +# CONFIG_FEATURE_SH_IS_HUSH is not set +# CONFIG_FEATURE_SH_IS_NONE is not set +# CONFIG_FEATURE_BASH_IS_ASH is not set +# CONFIG_FEATURE_BASH_IS_HUSH is not set +CONFIG_FEATURE_BASH_IS_NONE=y +CONFIG_SH_MATH_SUPPORT=y +# CONFIG_SH_MATH_SUPPORT_64 is not set +CONFIG_FEATURE_SH_EXTRA_QUIET=y +# CONFIG_FEATURE_SH_STANDALONE is not set +# CONFIG_FEATURE_SH_NOFORK is not set +# CONFIG_FEATURE_SH_HISTFILESIZE is not set + +# +# System Logging Utilities +# +CONFIG_SYSLOGD=y +CONFIG_FEATURE_ROTATE_LOGFILE=y +CONFIG_FEATURE_REMOTE_LOG=y +# CONFIG_FEATURE_SYSLOGD_DUP is not set +# CONFIG_FEATURE_SYSLOGD_CFG is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +# CONFIG_FEATURE_KMSG_SYSLOG is not set +CONFIG_KLOGD=y +CONFIG_FEATURE_KLOGD_KLOGCTL=y +CONFIG_LOGGER=y diff --git a/package/busybox/busybox.hash b/package/busybox/busybox.hash new file mode 100644 index 0000000000..7486aeb94b --- /dev/null +++ b/package/busybox/busybox.hash @@ -0,0 +1,3 @@ +# From http://busybox.net/downloads/busybox-1.24.2.tar.bz2.sign +md5 2eaae519cac1143bcf583636a745381f busybox-1.24.2.tar.bz2 +sha1 03e6cfc8ddb2f709f308719a9b9f4818bc0a28d0 busybox-1.24.2.tar.bz2 diff --git a/package/busybox/busybox.mk b/package/busybox/busybox.mk new file mode 100644 index 0000000000..c7fb8b41e6 --- /dev/null +++ b/package/busybox/busybox.mk @@ -0,0 +1,253 @@ +################################################################################ +# +# busybox +# +################################################################################ + +BUSYBOX_VERSION = 1.24.2 +BUSYBOX_SITE = http://www.busybox.net/downloads +BUSYBOX_SOURCE = busybox-$(BUSYBOX_VERSION).tar.bz2 +BUSYBOX_LICENSE = GPLv2 +BUSYBOX_LICENSE_FILES = LICENSE + +BUSYBOX_CFLAGS = \ + $(TARGET_CFLAGS) + +BUSYBOX_LDFLAGS = \ + $(TARGET_LDFLAGS) + +# Link against libtirpc if available so that we can leverage its RPC +# support for NFS mounting with BusyBox +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +BUSYBOX_DEPENDENCIES += libtirpc host-pkgconf +BUSYBOX_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" +# Don't use LDFLAGS for -ltirpc, because LDFLAGS is used for +# the non-final link of modules as well. +BUSYBOX_CFLAGS_busybox += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`" +endif + +BUSYBOX_BUILD_CONFIG = $(BUSYBOX_DIR)/.config +# Allows the build system to tweak CFLAGS +BUSYBOX_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + CFLAGS="$(BUSYBOX_CFLAGS)" \ + CFLAGS_busybox="$(BUSYBOX_CFLAGS_busybox)" +BUSYBOX_MAKE_OPTS = \ + CC="$(TARGET_CC)" \ + ARCH=$(KERNEL_ARCH) \ + PREFIX="$(TARGET_DIR)" \ + EXTRA_LDFLAGS="$(BUSYBOX_LDFLAGS)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + CONFIG_PREFIX="$(TARGET_DIR)" \ + SKIP_STRIP=y + +ifndef BUSYBOX_CONFIG_FILE + BUSYBOX_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG)) +endif + +BUSYBOX_KCONFIG_FILE = $(BUSYBOX_CONFIG_FILE) +BUSYBOX_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG_FRAGMENT_FILES)) +BUSYBOX_KCONFIG_EDITORS = menuconfig xconfig gconfig +BUSYBOX_KCONFIG_OPTS = $(BUSYBOX_MAKE_OPTS) + +define BUSYBOX_PERMISSIONS + /bin/busybox f 4755 0 0 - - - - - +endef + +# If mdev will be used for device creation enable it and copy S10mdev to /etc/init.d +ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),y) +define BUSYBOX_INSTALL_MDEV_SCRIPT + $(INSTALL) -D -m 0755 package/busybox/S10mdev \ + $(TARGET_DIR)/etc/init.d/S10mdev +endef +define BUSYBOX_INSTALL_MDEV_CONF + $(INSTALL) -D -m 0644 package/busybox/mdev.conf \ + $(TARGET_DIR)/etc/mdev.conf +endef +define BUSYBOX_SET_MDEV + $(call KCONFIG_ENABLE_OPT,CONFIG_MDEV,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_CONF,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_EXEC,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_FEATURE_MDEV_LOAD_FIRMWARE,$(BUSYBOX_BUILD_CONFIG)) +endef +endif + +# sha passwords need USE_BB_CRYPT_SHA +ifeq ($(BR2_TARGET_GENERIC_PASSWD_SHA256)$(BR2_TARGET_GENERIC_PASSWD_SHA512),y) +define BUSYBOX_SET_CRYPT_SHA + $(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_CRYPT_SHA,$(BUSYBOX_BUILD_CONFIG)) +endef +endif + +ifeq ($(BR2_USE_MMU),y) +define BUSYBOX_SET_MMU + $(call KCONFIG_DISABLE_OPT,CONFIG_NOMMU,$(BUSYBOX_BUILD_CONFIG)) +endef +else +define BUSYBOX_SET_MMU + $(call KCONFIG_ENABLE_OPT,CONFIG_NOMMU,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_DISABLE_OPT,CONFIG_SWAPONOFF,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_DISABLE_OPT,CONFIG_ASH,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_BASH_COMPAT,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_BRACE_EXPANSION,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_HELP,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_INTERACTIVE,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_SAVEHISTORY,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_JOB,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_TICK,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_IF,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_LOOPS,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_CASE,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_FUNCTIONS,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_LOCAL,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_RANDOM_SUPPORT,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_EXPORT_N,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_HUSH_MODE_X,$(BUSYBOX_BUILD_CONFIG)) +endef +endif + +# If we're using static libs do the same for busybox +ifeq ($(BR2_STATIC_LIBS),y) +define BUSYBOX_PREFER_STATIC + $(call KCONFIG_ENABLE_OPT,CONFIG_STATIC,$(BUSYBOX_BUILD_CONFIG)) +endef +endif + +# Disable shadow passwords support if unsupported by the C library +ifeq ($(BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS),) +define BUSYBOX_INTERNAL_SHADOW_PASSWORDS + $(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_PWD_GRP,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_SHADOW,$(BUSYBOX_BUILD_CONFIG)) +endef +endif + +# We also need to use internal shadow password functions when using +# the musl C library, since some of them are not yet implemented by +# musl. +# +# Do not use utmp/wmtp support. wmtp support is not available in musl, +# and utmp support is not sufficient for Busybox. +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +define BUSYBOX_MUSL_TWEAKS + $(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_PWD_GRP,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_USE_BB_SHADOW,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_DISABLE_OPT,CONFIG_FEATURE_UTMP,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_DISABLE_OPT,CONFIG_FEATURE_WTMP,$(BUSYBOX_BUILD_CONFIG)) +endef +endif + +define BUSYBOX_INSTALL_UDHCPC_SCRIPT + if grep -q CONFIG_UDHCPC=y $(@D)/.config; then \ + $(INSTALL) -m 0755 -D package/busybox/udhcpc.script \ + $(TARGET_DIR)/usr/share/udhcpc/default.script; \ + $(INSTALL) -m 0755 -d \ + $(TARGET_DIR)/usr/share/udhcpc/default.script.d; \ + fi +endef + +ifeq ($(BR2_INIT_BUSYBOX),y) +define BUSYBOX_SET_INIT + $(call KCONFIG_ENABLE_OPT,CONFIG_INIT,$(BUSYBOX_BUILD_CONFIG)) +endef +endif + +ifeq ($(BR2_PACKAGE_BUSYBOX_SELINUX),y) +BUSYBOX_DEPENDENCIES += host-pkgconf libselinux libsepol +define BUSYBOX_SET_SELINUX + $(call KCONFIG_ENABLE_OPT,CONFIG_SELINUX,$(BUSYBOX_BUILD_CONFIG)) + $(call KCONFIG_ENABLE_OPT,CONFIG_SELINUXENABLED,$(BUSYBOX_BUILD_CONFIG)) +endef +endif + +define BUSYBOX_INSTALL_LOGGING_SCRIPT + if grep -q CONFIG_SYSLOGD=y $(@D)/.config; then \ + $(INSTALL) -m 0755 -D package/busybox/S01logging \ + $(TARGET_DIR)/etc/init.d/S01logging; \ + else rm -f $(TARGET_DIR)/etc/init.d/S01logging; fi +endef + +ifeq ($(BR2_INIT_BUSYBOX),y) +define BUSYBOX_INSTALL_INITTAB + $(INSTALL) -D -m 0644 package/busybox/inittab $(TARGET_DIR)/etc/inittab +endef +endif + +ifeq ($(BR2_PACKAGE_BUSYBOX_WATCHDOG),y) +define BUSYBOX_SET_WATCHDOG + $(call KCONFIG_ENABLE_OPT,CONFIG_WATCHDOG,$(BUSYBOX_BUILD_CONFIG)) +endef +define BUSYBOX_INSTALL_WATCHDOG_SCRIPT + $(INSTALL) -D -m 0755 package/busybox/S15watchdog \ + $(TARGET_DIR)/etc/init.d/S15watchdog + $(SED) s/PERIOD/$(call qstrip,$(BR2_PACKAGE_BUSYBOX_WATCHDOG_PERIOD))/ \ + $(TARGET_DIR)/etc/init.d/S15watchdog +endef +endif + +# PAM support requires thread support in the toolchain +ifeq ($(BR2_PACKAGE_LINUX_PAM)$(BR2_TOOLCHAIN_HAS_THREADS),yy) +define BUSYBOX_LINUX_PAM + $(call KCONFIG_ENABLE_OPT,CONFIG_PAM,$(BUSYBOX_BUILD_CONFIG)) +endef +BUSYBOX_DEPENDENCIES += linux-pam +endif + +# Telnet support +define BUSYBOX_INSTALL_TELNET_SCRIPT + if grep -q CONFIG_FEATURE_TELNETD_STANDALONE=y $(@D)/.config; then \ + $(INSTALL) -m 0755 -D package/busybox/S50telnet \ + $(TARGET_DIR)/etc/init.d/S50telnet ; \ + fi +endef + +# Enable "noclobber" in install.sh, to prevent BusyBox from overwriting any +# full-blown versions of apps installed by other packages with sym/hard links. +define BUSYBOX_NOCLOBBER_INSTALL + $(SED) 's/^noclobber="0"$$/noclobber="1"/' $(@D)/applets/install.sh +endef + +define BUSYBOX_KCONFIG_FIXUP_CMDS + $(BUSYBOX_SET_MMU) + $(BUSYBOX_PREFER_STATIC) + $(BUSYBOX_SET_MDEV) + $(BUSYBOX_SET_CRYPT_SHA) + $(BUSYBOX_LINUX_PAM) + $(BUSYBOX_INTERNAL_SHADOW_PASSWORDS) + $(BUSYBOX_SET_INIT) + $(BUSYBOX_SET_WATCHDOG) + $(BUSYBOX_SET_SELINUX) + $(BUSYBOX_MUSL_TWEAKS) +endef + +define BUSYBOX_CONFIGURE_CMDS + $(BUSYBOX_NOCLOBBER_INSTALL) +endef + +define BUSYBOX_BUILD_CMDS + $(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) +endef + +define BUSYBOX_INSTALL_TARGET_CMDS + $(BUSYBOX_MAKE_ENV) $(MAKE) $(BUSYBOX_MAKE_OPTS) -C $(@D) install + $(BUSYBOX_INSTALL_INITTAB) + $(BUSYBOX_INSTALL_UDHCPC_SCRIPT) + $(BUSYBOX_INSTALL_MDEV_CONF) +endef + +define BUSYBOX_INSTALL_INIT_SYSV + $(BUSYBOX_INSTALL_MDEV_SCRIPT) + $(BUSYBOX_INSTALL_LOGGING_SCRIPT) + $(BUSYBOX_INSTALL_WATCHDOG_SCRIPT) + $(BUSYBOX_INSTALL_TELNET_SCRIPT) +endef + +# Checks to give errors that the user can understand +# Must be before we call to kconfig-package +ifeq ($(BR2_PACKAGE_BUSYBOX)$(BR_BUILDING),yy) +ifeq ($(call qstrip,$(BR2_PACKAGE_BUSYBOX_CONFIG)),) +$(error No BusyBox configuration file specified, check your BR2_PACKAGE_BUSYBOX_CONFIG setting) +endif +endif + +$(eval $(kconfig-package)) diff --git a/package/busybox/inittab b/package/busybox/inittab new file mode 100644 index 0000000000..3f49f6bd7a --- /dev/null +++ b/package/busybox/inittab @@ -0,0 +1,35 @@ +# /etc/inittab +# +# Copyright (C) 2001 Erik Andersen +# +# 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 == 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 +::sysinit:/bin/mount -t proc proc /proc +::sysinit:/bin/mount -o remount,rw / +::sysinit:/bin/mkdir -p /dev/pts +::sysinit:/bin/mkdir -p /dev/shm +::sysinit:/bin/mount -a +::sysinit:/bin/hostname -F /etc/hostname +# now run any rc scripts +::sysinit:/etc/init.d/rcS + +# Put a getty on the serial port +#ttyS0::respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL + +# Stuff to do for the 3-finger salute +#::ctrlaltdel:/sbin/reboot + +# Stuff to do before rebooting +::shutdown:/etc/init.d/rcK +::shutdown:/sbin/swapoff -a +::shutdown:/bin/umount -a -r diff --git a/package/busybox/mdev.conf b/package/busybox/mdev.conf new file mode 100644 index 0000000000..4fafe63f0c --- /dev/null +++ b/package/busybox/mdev.conf @@ -0,0 +1,38 @@ +# null may already exist; therefore ownership has to be changed with command +null root:root 666 @chmod 666 $MDEV +zero root:root 666 +full root:root 666 +random root:root 444 +urandom root:root 444 +hwrandom root:root 444 +grsec root:root 660 + +kmem root:root 640 +mem root:root 640 +port root:root 640 +# console may already exist; therefore ownership has to be changed with command +console root:tty 600 @chmod 600 $MDEV +ptmx root:tty 666 +pty.* root:tty 660 + +# Typical devices +tty root:tty 666 +tty[0-9]* root:tty 660 +vcsa*[0-9]* root:tty 660 +ttyS[0-9]* root:root 660 + +# alsa sound devices +pcm.* root:audio 660 =snd/ +control.* root:audio 660 =snd/ +midi.* root:audio 660 =snd/ +seq root:audio 660 =snd/ +timer root:audio 660 =snd/ + +# input stuff +event[0-9]+ root:root 640 =input/ +mice root:root 640 =input/ +mouse[0-9] root:root 640 =input/ +ts[0-9] root:root 600 =input/ + +# load modules +$MODALIAS=.* root:root 660 @modprobe "$MODALIAS" diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script new file mode 100755 index 0000000000..ad110d3a7f --- /dev/null +++ b/package/busybox/udhcpc.script @@ -0,0 +1,82 @@ +#!/bin/sh + +# udhcpc script edited by Tim Riker + +[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1 + +RESOLV_CONF="/etc/resolv.conf" +[ -e $RESOLV_CONF ] || touch $RESOLV_CONF +[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast" +[ -n "$subnet" ] && NETMASK="netmask $subnet" + +case "$1" in + deconfig) + /sbin/ifconfig $interface up + /sbin/ifconfig $interface 0.0.0.0 + + # drop info from this interface + # resolv.conf may be a symlink to /tmp/, so take care + TMPFILE=$(mktemp) + grep -vE "# $interface\$" $RESOLV_CONF > $TMPFILE + cat $TMPFILE > $RESOLV_CONF + rm -f $TMPFILE + + if [ -x /usr/sbin/avahi-autoipd ]; then + /usr/sbin/avahi-autoipd -k $interface + fi + ;; + + leasefail|nak) + if [ -x /usr/sbin/avahi-autoipd ]; then + /usr/sbin/avahi-autoipd -wD $interface --no-chroot + fi + ;; + + renew|bound) + if [ -x /usr/sbin/avahi-autoipd ]; then + /usr/sbin/avahi-autoipd -k $interface + fi + /sbin/ifconfig $interface $ip $BROADCAST $NETMASK + + if [ -n "$router" ] ; then + echo "deleting routers" + while route del default gw 0.0.0.0 dev $interface 2> /dev/null; do + : + done + + for i in $router ; do + route add default gw $i dev $interface + done + fi + + # drop info from this interface + # resolv.conf may be a symlink to /tmp/, so take care + TMPFILE=$(mktemp) + grep -vE "# $interface\$" $RESOLV_CONF > $TMPFILE + cat $TMPFILE > $RESOLV_CONF + rm -f $TMPFILE + + # prefer rfc3359 domain search list (option 119) if available + if [ -n "$search" ]; then + search_list=$search + elif [ -n "$domain" ]; then + search_list=$domain + fi + + [ -n "$search_list" ] && + echo "search $search_list # $interface" >> $RESOLV_CONF + + for i in $dns ; do + echo adding dns $i + echo "nameserver $i # $interface" >> $RESOLV_CONF + done + ;; +esac + +HOOK_DIR="$0.d" +for hook in "${HOOK_DIR}/"*; do + [ -f "${hook}" -a -x "${hook}" ] || continue + "${hook}" "${@}" +done + +exit 0 diff --git a/package/bwm-ng/Config.in b/package/bwm-ng/Config.in new file mode 100644 index 0000000000..f93dd9358b --- /dev/null +++ b/package/bwm-ng/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_BWM_NG + bool "bwm-ng" + help + Bandwidth Monitor NG is a small and console-based live + network and disk-io bandwidth monitor for Linux, BSD, + Solaris, Mac OS X and others. + + http://www.gropp.org/?id=projects&sub=bwm-ng diff --git a/package/bwm-ng/bwm-ng.hash b/package/bwm-ng/bwm-ng.hash new file mode 100644 index 0000000000..1d3a240a26 --- /dev/null +++ b/package/bwm-ng/bwm-ng.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 027cf3c960cd96fc9ffacdf7713df62d0fc55eeef4a1388289f8a62ae5e50df0 bwm-ng-0.6.1.tar.gz diff --git a/package/bwm-ng/bwm-ng.mk b/package/bwm-ng/bwm-ng.mk new file mode 100644 index 0000000000..e285422b92 --- /dev/null +++ b/package/bwm-ng/bwm-ng.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# bwm-ng +# +################################################################################ + +BWM_NG_VERSION = 0.6.1 +BWM_NG_SITE = http://www.gropp.org/bwm-ng +BWM_NG_CONF_OPTS = --with-procnetdev --with-diskstats +BWM_NG_LICENSE = GPLv2 +BWM_NG_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_NCURSES),y) +BWM_NG_CONF_OPTS += --with-ncurses +BWM_NG_DEPENDENCIES += ncurses +endif + +$(eval $(autotools-package)) diff --git a/package/bzip2/0001-build-objects-twice.patch b/package/bzip2/0001-build-objects-twice.patch new file mode 100644 index 0000000000..9bde0f6488 --- /dev/null +++ b/package/bzip2/0001-build-objects-twice.patch @@ -0,0 +1,56 @@ +Build objects twice for shared and static libraries + +The existing Makefile causes problems on MIPS because the same object +files (not compiled with -fPIC) are used in static and shared libraries. +MIPS will refuce to link non-pic objects in shared libraries. +We fix this problems by creating a new rule for the shared library +and build the shared objects as *.sho instead of *.o. +Then, we use these objects to create the shared library. + +Signed-off-by: Markos Chandras + +Index: bzip2-1.0.6/Makefile-libbz2_so +=================================================================== +--- bzip2-1.0.6.orig/Makefile-libbz2_so ++++ bzip2-1.0.6/Makefile-libbz2_so +@@ -25,13 +25,13 @@ SHELL=/bin/sh + CC=gcc + override CFLAGS += -fpic -fPIC -Wall + +-OBJS= blocksort.o \ +- huffman.o \ +- crctable.o \ +- randtable.o \ +- compress.o \ +- decompress.o \ +- bzlib.o ++OBJS= blocksort.sho \ ++ huffman.sho \ ++ crctable.sho \ ++ randtable.sho \ ++ compress.sho \ ++ decompress.sho \ ++ bzlib.sho + + all: $(OBJS) + $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) +@@ -45,17 +45,5 @@ install: + clean: + rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared + +-blocksort.o: blocksort.c +- $(CC) $(CFLAGS) -c blocksort.c +-huffman.o: huffman.c +- $(CC) $(CFLAGS) -c huffman.c +-crctable.o: crctable.c +- $(CC) $(CFLAGS) -c crctable.c +-randtable.o: randtable.c +- $(CC) $(CFLAGS) -c randtable.c +-compress.o: compress.c +- $(CC) $(CFLAGS) -c compress.c +-decompress.o: decompress.c +- $(CC) $(CFLAGS) -c decompress.c +-bzlib.o: bzlib.c +- $(CC) $(CFLAGS) -c bzlib.c ++%.sho: %.c ++ $(CC) $(CFLAGS) -o $@ -c $< diff --git a/package/bzip2/0002-improve-build-system.patch b/package/bzip2/0002-improve-build-system.patch new file mode 100644 index 0000000000..90099aa288 --- /dev/null +++ b/package/bzip2/0002-improve-build-system.patch @@ -0,0 +1,84 @@ +Improve bzip2 build system + +This patch makes a number of improvements to the bzip2 build system: + + * Remove the BIGFILE variable that was used to force largefile + support. Now, the user of the Makefile is supposed to pass + -D_FILE_OFFSET_BITS=64 when largefile support is desired. + + * Use override CFLAGS += so that additional CFLAGS can be passed on + the command line. + + * Removed "forced" CFLAGS -O2, -g and -Winline. We don't want them by + default, and want the build system to use its own ones. + + * When creating the symbolic links bzegrep, bzfgrep, bzless and + bzcmp, don't link them to an absolute path, or they'll point to + some path on the build machine. + + * Provide an install target for the shared library, which creates the + appropriate symbolic links. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -20,8 +20,7 @@ + RANLIB=ranlib + LDFLAGS= + +-BIGFILES=-D_FILE_OFFSET_BITS=64 +-CFLAGS=-Wall -Winline -O2 -g $(BIGFILES) ++override CFLAGS += -Wall + + # Where you want it installed when you do 'make install' + PREFIX=/usr/local +@@ -90,14 +89,14 @@ + cp -f libbz2.a $(PREFIX)/lib + chmod a+r $(PREFIX)/lib/libbz2.a + cp -f bzgrep $(PREFIX)/bin/bzgrep +- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep +- ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep ++ ln -s -f bzgrep $(PREFIX)/bin/bzegrep ++ ln -s -f bzgrep $(PREFIX)/bin/bzfgrep + chmod a+x $(PREFIX)/bin/bzgrep + cp -f bzmore $(PREFIX)/bin/bzmore +- ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless ++ ln -s -f bzmore $(PREFIX)/bin/bzless + chmod a+x $(PREFIX)/bin/bzmore + cp -f bzdiff $(PREFIX)/bin/bzdiff +- ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp ++ ln -s -f bzdiff $(PREFIX)/bin/bzcmp + chmod a+x $(PREFIX)/bin/bzdiff + cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1 + chmod a+r $(PREFIX)/man/man1/bzgrep.1 +Index: b/Makefile-libbz2_so +=================================================================== +--- a/Makefile-libbz2_so ++++ b/Makefile-libbz2_so +@@ -23,8 +23,7 @@ + + SHELL=/bin/sh + CC=gcc +-BIGFILES=-D_FILE_OFFSET_BITS=64 +-CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES) ++override CFLAGS += -fpic -fPIC -Wall + + OBJS= blocksort.o \ + huffman.o \ +@@ -37,8 +36,11 @@ + all: $(OBJS) + $(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.6 $(OBJS) + $(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.6 +- rm -f libbz2.so.1.0 +- ln -s libbz2.so.1.0.6 libbz2.so.1.0 ++ ++install: ++ install -m 0755 -D libbz2.so.1.0.6 $(PREFIX)/lib/libbz2.so.1.0.6 ++ ln -sf libbz2.so.1.0.6 $(PREFIX)/lib/libbz2.so ++ ln -sf libbz2.so.1.0.6 $(PREFIX)/lib/libbz2.so.1.0 + + clean: + rm -f $(OBJS) bzip2.o libbz2.so.1.0.6 libbz2.so.1.0 bzip2-shared diff --git a/package/bzip2/Config.in b/package/bzip2/Config.in new file mode 100644 index 0000000000..e8e03cf08e --- /dev/null +++ b/package/bzip2/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_BZIP2 + bool "bzip2" + help + Freely available, patent free, high-quality data compressor. + It typically compresses files to within 10% to 15% of the best + available techniques, while being around twice as fast at + compression and six times faster at decompression. + + http://sources.redhat.com/bzip2/ diff --git a/package/bzip2/bzip2.hash b/package/bzip2/bzip2.hash new file mode 100644 index 0000000000..60b0a191ef --- /dev/null +++ b/package/bzip2/bzip2.hash @@ -0,0 +1,2 @@ +# From http://www.bzip.org/downloads.html +md5 00b516f4704d4a7cb50a1d97e6e8e15b bzip2-1.0.6.tar.gz diff --git a/package/bzip2/bzip2.mk b/package/bzip2/bzip2.mk new file mode 100644 index 0000000000..0597ab97d6 --- /dev/null +++ b/package/bzip2/bzip2.mk @@ -0,0 +1,69 @@ +################################################################################ +# +# bzip2 +# +################################################################################ + +BZIP2_VERSION = 1.0.6 +BZIP2_SITE = http://www.bzip.org/$(BZIP2_VERSION) +BZIP2_INSTALL_STAGING = YES +BZIP2_LICENSE = bzip2 license +BZIP2_LICENSE_FILES = LICENSE + +ifeq ($(BR2_STATIC_LIBS),) +define BZIP2_BUILD_SHARED_CMDS + $(TARGET_MAKE_ENV) + $(MAKE) -C $(@D) -f Makefile-libbz2_so $(TARGET_CONFIGURE_OPTS) +endef +endif + +define BZIP2_BUILD_CMDS + $(TARGET_MAKE_ENV) + $(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover $(TARGET_CONFIGURE_OPTS) + $(BZIP2_BUILD_SHARED_CMDS) +endef + +ifeq ($(BR2_STATIC_LIBS),) +define BZIP2_INSTALL_STAGING_SHARED_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + -f Makefile-libbz2_so PREFIX=$(STAGING_DIR)/usr -C $(@D) install +endef +endif + +define BZIP2_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + PREFIX=$(STAGING_DIR)/usr -C $(@D) install + $(BZIP2_INSTALL_STAGING_SHARED_CMDS) +endef + +ifeq ($(BR2_STATIC_LIBS),) +define BZIP2_INSTALL_TARGET_SHARED_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + -f Makefile-libbz2_so PREFIX=$(TARGET_DIR)/usr -C $(@D) install +endef +endif + +# make sure busybox doesn't get overwritten by make install +define BZIP2_INSTALL_TARGET_CMDS + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,bzip2 bunzip2 bzcat) + $(TARGET_MAKE_ENV) $(MAKE) \ + PREFIX=$(TARGET_DIR)/usr -C $(@D) install + $(BZIP2_INSTALL_TARGET_SHARED_CMDS) +endef + +define HOST_BZIP2_BUILD_CMDS + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) -f Makefile-libbz2_so + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) libbz2.a bzip2 bzip2recover +endef + +define HOST_BZIP2_INSTALL_CMDS + $(HOST_MAKE_ENV) \ + $(MAKE) PREFIX=$(HOST_DIR)/usr -C $(@D) install + $(HOST_MAKE_ENV) \ + $(MAKE) -f Makefile-libbz2_so PREFIX=$(HOST_DIR)/usr -C $(@D) install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/c-ares/0001-use_check_build_instead_of_check_user.patch b/package/c-ares/0001-use_check_build_instead_of_check_user.patch new file mode 100644 index 0000000000..8210ed673b --- /dev/null +++ b/package/c-ares/0001-use_check_build_instead_of_check_user.patch @@ -0,0 +1,17 @@ +Use XC_CHECK_BUILD_FLAGS instead of XC_CHECK_USER_FLAGS. +Otherwise it complains of CPPFLAGS in CFLAGS. + +Signed-off-by: Gustavo Zacarias + +diff -Nura c-ares-1.10.0.orig/m4/xc-cc-check.m4 c-ares-1.10.0/m4/xc-cc-check.m4 +--- c-ares-1.10.0.orig/m4/xc-cc-check.m4 2013-12-26 19:40:46.354195974 -0300 ++++ c-ares-1.10.0/m4/xc-cc-check.m4 2013-12-26 19:41:01.850718535 -0300 +@@ -59,7 +59,7 @@ + + AC_DEFUN([_XC_PROG_CC], [ + AC_REQUIRE([_XC_PROG_CC_PREAMBLE])dnl +- AC_REQUIRE([XC_CHECK_USER_FLAGS])dnl ++ AC_REQUIRE([XC_CHECK_BUILD_FLAGS])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AM_PROG_CC_C_O])dnl diff --git a/package/c-ares/Config.in b/package/c-ares/Config.in new file mode 100644 index 0000000000..be17b166a5 --- /dev/null +++ b/package/c-ares/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_C_ARES + bool "c-ares" + help + C library for asynchronous DNS requests. + + http://c-ares.haxx.se/ diff --git a/package/c-ares/c-ares.hash b/package/c-ares/c-ares.hash new file mode 100644 index 0000000000..f24cc3624a --- /dev/null +++ b/package/c-ares/c-ares.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 b3612e6617d9682928a1d50c1040de4db6519f977f0b25d40cf1b632900b3efd c-ares-1.11.0.tar.gz diff --git a/package/c-ares/c-ares.mk b/package/c-ares/c-ares.mk new file mode 100644 index 0000000000..298fe41671 --- /dev/null +++ b/package/c-ares/c-ares.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# c-ares +# +################################################################################ + +C_ARES_VERSION = 1.11.0 +C_ARES_SITE = http://c-ares.haxx.se/download +C_ARES_INSTALL_STAGING = YES +C_ARES_CONF_OPTS = --with-random=/dev/urandom +# Rebuild configure to avoid XC_CHECK_USER_CFLAGS +C_ARES_AUTORECONF = YES +C_ARES_LICENSE = MIT +# No standalone, use some source file +C_ARES_LICENSE_FILES = ares_mkquery.c + +$(eval $(autotools-package)) diff --git a/package/c-icap-modules/Config.in b/package/c-icap-modules/Config.in new file mode 100644 index 0000000000..616456b4dc --- /dev/null +++ b/package/c-icap-modules/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_C_ICAP_MODULES + bool "c-icap-modules" + depends on BR2_PACKAGE_C_ICAP + help + Additionals modules for c-icap server. + + http://c-icap.sourceforge.net/ diff --git a/package/c-icap-modules/c-icap-modules.hash b/package/c-icap-modules/c-icap-modules.hash new file mode 100644 index 0000000000..5df1449871 --- /dev/null +++ b/package/c-icap-modules/c-icap-modules.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/c-icap/files/c-icap-modules/0.4.x/ +md5 5acd9487679ed47fbee00270d436718d c_icap_modules-0.4.2.tar.gz +sha1 e5f4203980b732b9de165c1e83c4703734c3e0e2 c_icap_modules-0.4.2.tar.gz diff --git a/package/c-icap-modules/c-icap-modules.mk b/package/c-icap-modules/c-icap-modules.mk new file mode 100644 index 0000000000..cf388aaabc --- /dev/null +++ b/package/c-icap-modules/c-icap-modules.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# c-icap-modules +# +################################################################################ + +C_ICAP_MODULES_VERSION = 0.4.2 +C_ICAP_MODULES_SOURCE = c_icap_modules-$(C_ICAP_MODULES_VERSION).tar.gz +C_ICAP_MODULES_SITE = http://downloads.sourceforge.net/c-icap +C_ICAP_MODULES_LICENSE = GPLv2+ +C_ICAP_MODULES_LICENSE_FILES = COPYING +C_ICAP_MODULES_DEPENDENCIES = c-icap + +C_ICAP_MODULES_CONF_OPTS = \ + --with-c-icap=$(STAGING_DIR)/usr/ \ + --without-clamav + +ifeq ($(BR2_PACKAGE_ZLIB),y) +C_ICAP_MODULES_CONF_OPTS += --with-zlib +C_ICAP_MODULES_DEPENDENCIES += zlib +else +C_ICAP_MODULES_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_BERKELEYDB),y) +C_ICAP_MODULES_CONF_OPTS += --with-bdb +C_ICAP_MODULES_DEPENDENCIES += berkeleydb +else +C_ICAP_MODULES_CONF_OPTS += --without-bdb +endif + +$(eval $(autotools-package)) diff --git a/package/c-icap/Config.in b/package/c-icap/Config.in new file mode 100644 index 0000000000..8f7963c26a --- /dev/null +++ b/package/c-icap/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_C_ICAP + bool "c-icap" + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + c-icap is an implementation of an ICAP server. It can be + used with HTTP proxies that support the ICAP protocol to + implement content adaptation and filtering services. Most + of the commercial HTTP proxies must support the ICAP + protocol. The open source Squid 3.x proxy server supports + it. + + http://c-icap.sourceforge.net/ + +comment "c-icap needs a toolchain w/ threads and dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/c-icap/S96cicap b/package/c-icap/S96cicap new file mode 100644 index 0000000000..7b95f86009 --- /dev/null +++ b/package/c-icap/S96cicap @@ -0,0 +1,27 @@ +#!/bin/sh + +# (Re)create directories +mkdir -p /var/run/c-icap +mkdir -p /var/log/c-icap + +case "$1" in + start) + printf "Starting c-icap server: " + start-stop-daemon -S -q -b -m -p /var/run/c-icap.pid \ + -x /usr/bin/c-icap -- -N + [ $? == 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping c-icap server: " + start-stop-daemon -K -q -p /var/run/c-icap.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart|reload) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: /etc/init.d/S96cicap {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/c-icap/c-icap.hash b/package/c-icap/c-icap.hash new file mode 100644 index 0000000000..2b083ef659 --- /dev/null +++ b/package/c-icap/c-icap.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 b138c7d7d9828d54c3307bcfe7b4917911266593832ffc26a60df9a0dfd2511e c_icap-0.4.2.tar.gz diff --git a/package/c-icap/c-icap.mk b/package/c-icap/c-icap.mk new file mode 100644 index 0000000000..3078721bce --- /dev/null +++ b/package/c-icap/c-icap.mk @@ -0,0 +1,75 @@ +################################################################################ +# +# c-icap +# +################################################################################ + +C_ICAP_VERSION = 0.4.2 +C_ICAP_SOURCE = c_icap-$(C_ICAP_VERSION).tar.gz +C_ICAP_SITE = http://downloads.sourceforge.net/c-icap +C_ICAP_LICENSE = LGPLv2.1+ +C_ICAP_LICENSE_FILES = COPYING +C_ICAP_INSTALL_STAGING = YES +C_ICAP_CONFIG_SCRIPTS = c-icap-config c-icap-libicapapi-config +C_ICAP_CONF_OPTS = \ + --with-process-mutexes=posix \ + --without-ldap \ + --without-perl \ + --enable-large-files \ + --enable-ipv6 +# Pre-seed cache variables for tests done with AC_TRY_RUN that are not +# cross-compile friendly +C_ICAP_CONF_ENV = ac_cv_10031b_ipc_sem=yes ac_cv_fcntl=yes +# c-icap adds '-Wl,-rpath -Wl,/usr/lib' to the link command line. This +# causes the linker to search for libraries that are listed as NEEDED +# in the libicapapi.so ELF header in host libraries, which breaks the +# build. The affected library is libz. Forcing AUTORECONF adds -lz to +# the link command line, and that makes the linker look first in +# sysroot, thus avoiding the build breakage. +C_ICAP_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_BERKELEYDB),y) +C_ICAP_CONF_OPTS += --with-berkeleydb +C_ICAP_DEPENDENCIES += berkeleydb +else +C_ICAP_CONF_OPTS += --without-berkeleydb +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +C_ICAP_CONF_OPTS += --with-bzip2 +C_ICAP_DEPENDENCIES += bzip2 +else +C_ICAP_CONF_OPTS += --without-bzip2 +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +C_ICAP_CONF_OPTS += --with-zlib +C_ICAP_DEPENDENCIES += zlib +else +C_ICAP_CONF_OPTS += --without-zlib +endif + +define C_ICAP_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/c-icap/S96cicap $(TARGET_DIR)/etc/init.d/S96cicap +endef + +# Tweak the installation: +# - Removed unneeded sample configuration files (c-icap.*.default), +# since some real ones are also installed +# - Tweak some paths in the c-icap.conf configuration file +# - Tweak the -config scripts, because the generic +# _CONFIG_SCRIPTS logic doesn't tweak them enough +define C_ICAP_TUNE_INSTALLATION + $(RM) -f $(TARGET_DIR)/etc/c-icap.*.default + $(SED) 's%/usr/etc/%/etc/%' $(TARGET_DIR)/etc/c-icap.conf + $(SED) 's%/usr/var/%/var/%' $(TARGET_DIR)/etc/c-icap.conf + $(SED) 's%INCDIR=.*%INCDIR=$(STAGING_DIR)/usr/include%' \ + $(STAGING_DIR)/usr/bin/{c-icap,c-icap-libicapapi}-config + $(SED) 's%INCDIR2=.*%INCDIR2=$(STAGING_DIR)/usr/include/c_icap%' \ + $(STAGING_DIR)/usr/bin/{c-icap,c-icap-libicapapi}-config + $(SED) 's%-L$$LIBDIR %%' $(STAGING_DIR)/usr/bin/c-icap-libicapapi-config +endef + +C_ICAP_POST_INSTALL_TARGET_HOOKS += C_ICAP_TUNE_INSTALLATION + +$(eval $(autotools-package)) diff --git a/package/c-periphery/0001-Add-missing-header-for-musl-compatibility.patch b/package/c-periphery/0001-Add-missing-header-for-musl-compatibility.patch new file mode 100644 index 0000000000..108297c9c2 --- /dev/null +++ b/package/c-periphery/0001-Add-missing-header-for-musl-compatibility.patch @@ -0,0 +1,32 @@ +From 1d8cb0ad54099c3d7261aaa19a2c0786f16736d0 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 8 Aug 2015 22:42:39 +0200 +Subject: [PATCH] Add missing header for musl compatibility + + is needed to get the definition of _IOC_SIZEBITS and +solve the following build failure: + +src/spi.c: In function 'spi_transfer': +src/spi.c:100:24: error: '_IOC_SIZEBITS' undeclared (first use in this function) + if (ioctl(spi->fd, SPI_IOC_MESSAGE(1), &spi_xfer) < 1) + +Signed-off-by: Thomas Petazzoni +--- + src/spi.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/spi.c b/src/spi.c +index 52a8d3d..1a6b17c 100644 +--- a/src/spi.c ++++ b/src/spi.c +@@ -16,6 +16,7 @@ + #include + + #include ++#include + #include + + #include "spi.h" +-- +2.5.0 + diff --git a/package/c-periphery/0002-Fix-build-on-SPARC.patch b/package/c-periphery/0002-Fix-build-on-SPARC.patch new file mode 100644 index 0000000000..e491f6f728 --- /dev/null +++ b/package/c-periphery/0002-Fix-build-on-SPARC.patch @@ -0,0 +1,70 @@ +From 295316c3f44c3e779e85d7453424496a3bb4bc48 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 8 Aug 2015 22:56:09 +0200 +Subject: [PATCH] Fix build on SPARC + +On SPARC, the definitions of B2500000, B3000000, B3500000 and B4000000 +are not necessarily available, so use those values only if defined in +the kernel headers. + +It fixes SPARC build failures such as: + +src/serial.c: In function '_serial_baudrate_to_bits': +src/serial.c:73:30: error: 'B2500000' undeclared (first use in this function) + case 2500000: return B2500000; + ^ +src/serial.c:73:30: note: each undeclared identifier is reported only once for each function it appears in +src/serial.c:74:30: error: 'B3000000' undeclared (first use in this function) + case 3000000: return B3000000; + ^ + +Signed-off-by: Thomas Petazzoni +--- + src/serial.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/src/serial.c b/src/serial.c +index e385309..efd425e 100644 +--- a/src/serial.c ++++ b/src/serial.c +@@ -70,10 +70,18 @@ static int _serial_baudrate_to_bits(uint32_t baudrate) { + case 1152000: return B1152000; + case 1500000: return B1500000; + case 2000000: return B2000000; ++#ifdef B2500000 + case 2500000: return B2500000; ++#endif ++#ifdef B3000000 + case 3000000: return B3000000; ++#endif ++#ifdef B3500000 + case 3500000: return B3500000; ++#endif ++#ifdef B4000000 + case 4000000: return B4000000; ++#endif + default: return -1; + } + } +@@ -107,10 +115,18 @@ static int _serial_bits_to_baudrate(uint32_t bits) { + case B1152000: return 1152000; + case B1500000: return 1500000; + case B2000000: return 2000000; ++#ifdef B2500000 + case B2500000: return 2500000; ++#endif ++#ifdef B3000000 + case B3000000: return 3000000; ++#endif ++#ifdef B3500000 + case B3500000: return 3500000; ++#endif ++#ifdef B4000000 + case B4000000: return 4000000; ++#endif + default: return -1; + } + } +-- +2.5.0 + diff --git a/package/c-periphery/Config.in b/package/c-periphery/Config.in new file mode 100644 index 0000000000..0bfb4b1f11 --- /dev/null +++ b/package/c-periphery/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_C_PERIPHERY + bool "c-periphery" + help + c-periphery is a set of C wrapper functions for GPIO, SPI, + I2C, MMIO, and Serial peripheral I/O interface access in + userspace Linux. The c-periphery wrappers simplify and + consolidate the native Linux APIs to these + interfaces. c-periphery is useful in embedded Linux + environments (including BeagleBone, Raspberry Pi, + etc. platforms) for interfacing with external + peripherals. c-periphery is re-entrant, uses static + allocations, has no dependencies outside the standard C + library and Linux, compiles into a static library for easy + integration with other projects, and is MIT licensed. + + https://github.com/vsergeev/c-periphery diff --git a/package/c-periphery/c-periphery.mk b/package/c-periphery/c-periphery.mk new file mode 100644 index 0000000000..730b3bc30b --- /dev/null +++ b/package/c-periphery/c-periphery.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# c-periphery +# +################################################################################ + +C_PERIPHERY_VERSION = v1.0.3 +C_PERIPHERY_SITE = $(call github,vsergeev,c-periphery,$(C_PERIPHERY_VERSION)) +C_PERIPHERY_INSTALL_STAGING = YES +# only a static library +C_PERIPHERY_INSTALL_TARGET = NO +C_PERIPHERY_LICENSE = MIT +C_PERIPHERY_LICENSE_FILES = LICENSE + +define C_PERIPHERY_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +# There is no 'install' rule in the Makefile, so we handle things +# manually. +define C_PERIPHERY_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0644 $(@D)/periphery.a $(STAGING_DIR)/usr/lib/libc-periphery.a + mkdir -p $(STAGING_DIR)/usr/include/c-periphery/ + cp -dpfr $(@D)/src/*.h $(STAGING_DIR)/usr/include/c-periphery/ +endef + +$(eval $(generic-package)) diff --git a/package/ca-certificates/Config.in b/package/ca-certificates/Config.in new file mode 100644 index 0000000000..a278a620c7 --- /dev/null +++ b/package/ca-certificates/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_CA_CERTIFICATES + bool "CA Certificates" + help + This package includes PEM files of CA certificates to allow + SSL-based applications to check for the authenticity of SSL + connections. + + It includes, among others, certificate authorities used by the + Debian infrastructure and those shipped with Mozilla's browsers. + + http://anonscm.debian.org/gitweb/?p=collab-maint/ca-certificates.git diff --git a/package/ca-certificates/ca-certificates.hash b/package/ca-certificates/ca-certificates.hash new file mode 100644 index 0000000000..b467316872 --- /dev/null +++ b/package/ca-certificates/ca-certificates.hash @@ -0,0 +1,3 @@ +# hashes from: $(CA_CERTIFICATES_SITE)/ca-certificates_$(CA_CERTIFICATES_VERSION).dsc : +sha1 4525a194736c6691dbd59fa87281b722837b4768 ca-certificates_20160104.tar.xz +sha256 09eb770122e23260316120c0cbbddc8a1d33e7147210ce44e146084d5d5abcdd ca-certificates_20160104.tar.xz diff --git a/package/ca-certificates/ca-certificates.mk b/package/ca-certificates/ca-certificates.mk new file mode 100644 index 0000000000..393c8cdd83 --- /dev/null +++ b/package/ca-certificates/ca-certificates.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# ca-certificates +# +################################################################################ + +CA_CERTIFICATES_VERSION = 20160104 +CA_CERTIFICATES_SOURCE = ca-certificates_$(CA_CERTIFICATES_VERSION).tar.xz +CA_CERTIFICATES_SITE = http://snapshot.debian.org/archive/debian/20160104T220912Z/pool/main/c/ca-certificates +CA_CERTIFICATES_DEPENDENCIES = host-openssl +# ca-certificates can be built with either python 2 or python 3 +# but it must be at least python 2.7 +CA_CERTIFICATES_DEPENDENCIES += \ + $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python) +CA_CERTIFICATES_LICENSE = GPLv2+ (script), MPLv2.0 (data) +CA_CERTIFICATES_LICENSE_FILES = debian/copyright + +define CA_CERTIFICATES_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) all +endef + +define CA_CERTIFICATES_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/ca-certificates + $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/ssl/certs + $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR) + rm -f $(TARGET_DIR)/usr/sbin/update-ca-certificates + + # Remove any existing certificates under /etc/ssl/certs + rm -f $(TARGET_DIR)/etc/ssl/certs/* + + # Create symlinks to certificates under /etc/ssl/certs + # and generate the bundle + cd $(TARGET_DIR) ;\ + for i in `find usr/share/ca-certificates -name "*.crt"` ; do \ + ln -sf ../../../$$i etc/ssl/certs/`basename $${i} .crt`.pem ;\ + cat $$i >>etc/ssl/certs/ca-certificates.crt ;\ + done + + # Create symlinks to the certificates by their hash values + $(HOST_DIR)/usr/bin/c_rehash $(TARGET_DIR)/etc/ssl/certs +endef + +$(eval $(generic-package)) diff --git a/package/cache-calibrator/0001-Fix-conflicting-round-function.patch b/package/cache-calibrator/0001-Fix-conflicting-round-function.patch new file mode 100644 index 0000000000..71181a6387 --- /dev/null +++ b/package/cache-calibrator/0001-Fix-conflicting-round-function.patch @@ -0,0 +1,108 @@ +From 39ac7268c4350040976005da98daf10edf676d3e Mon Sep 17 00:00:00 2001 +From: Stephan Hoffmann +Date: Mon, 28 Jan 2013 17:32:10 +0100 +Subject: [PATCH] Fix conflicting round() function + +calibrator.c defines a local round() function that conflicts +with the one from the standard library. + +This is fixed by renaming the local function. + +Signed-off-by: Stephan Hoffmann +--- + calibrator.c | 30 +++++++++++++++--------------- + 1 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/calibrator.c b/calibrator.c +index e045dfd..8471c04 100644 +--- a/calibrator.c ++++ b/calibrator.c +@@ -128,7 +128,7 @@ void ErrXit(char *format, ...) { + exit(1); + } + +-lng round(dbl x) ++lng lng_round(dbl x) + { + return (lng)(x + 0.5); + } +@@ -890,16 +890,16 @@ void plotCache(cacheInfo *cache, lng **result, lng MHz, char *fn, FILE *fp, lng + fprintf(fp, ")\n"); + fprintf(fp, "set y2tics"); + for (l = 0, s = " ("; l <= cache->levels; l++, s = ", ") { +- if (!delay) fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(cache->latency1[l] - delay)), NSperIt(cache->latency1[l] - delay)); +- else fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(cache->latency2[l] - delay)), NSperIt(cache->latency2[l] - delay)); ++ if (!delay) fprintf(fp, "%s'(%ld)' %f", s, lng_round(CYperIt(cache->latency1[l] - delay)), NSperIt(cache->latency1[l] - delay)); ++ else fprintf(fp, "%s'(%ld)' %f", s, lng_round(CYperIt(cache->latency2[l] - delay)), NSperIt(cache->latency2[l] - delay)); + } + for (y = 1; y <= yh; y *= 10) { + fprintf(fp, "%s'%1.3g' %ld", s, (dbl)(y * MHz) / 1000.0, y); + } + fprintf(fp, ")\n"); + for (l = 0; l <= cache->levels; l++) { +- if (!delay) z = (dbl)round(CYperIt(cache->latency1[l] - delay)) * 1000.0 / (dbl)MHz; +- else z = (dbl)round(CYperIt(cache->latency2[l] - delay)) * 1000.0 / (dbl)MHz; ++ if (!delay) z = (dbl)lng_round(CYperIt(cache->latency1[l] - delay)) * 1000.0 / (dbl)MHz; ++ else z = (dbl)lng_round(CYperIt(cache->latency2[l] - delay)) * 1000.0 / (dbl)MHz; + fprintf(fp, "set label %ld '(%1.3g) ' at %f,%f right\n", l + 1, z, xl, z); + fprintf(fp, "set arrow %ld from %f,%f to %f,%f nohead lt 0\n", l + 1, xl, z, xh, z); + } +@@ -986,16 +986,16 @@ void plotTLB(TLBinfo *TLB, lng **result, lng MHz, char *fn, FILE *fp, lng delay) + fprintf(fp, "%s'' %ld)\n", s, TLB->mincachelines); + fprintf(fp, "set y2tics"); + for (l = 0, s = " ("; l <= TLB->levels; l++, s = ", ") { +- if (!delay) fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(TLB->latency1[l] - delay)), NSperIt(TLB->latency1[l] - delay)); +- else fprintf(fp, "%s'(%ld)' %f", s, round(CYperIt(TLB->latency2[l] - delay)), NSperIt(TLB->latency2[l] - delay)); ++ if (!delay) fprintf(fp, "%s'(%ld)' %f", s, lng_round(CYperIt(TLB->latency1[l] - delay)), NSperIt(TLB->latency1[l] - delay)); ++ else fprintf(fp, "%s'(%ld)' %f", s, lng_round(CYperIt(TLB->latency2[l] - delay)), NSperIt(TLB->latency2[l] - delay)); + } + for (y = 1; y <= yh; y *= 10) { + fprintf(fp, "%s'%1.3g' %ld", s, (dbl)(y * MHz) / 1000.0, y); + } + fprintf(fp, ")\n"); + for (l = 0; l <= TLB->levels; l++) { +- if (!delay) z = (dbl)round(CYperIt(TLB->latency1[l] - delay)) * 1000.0 / (dbl)MHz; +- else z = (dbl)round(CYperIt(TLB->latency2[l] - delay)) * 1000.0 / (dbl)MHz; ++ if (!delay) z = (dbl)lng_round(CYperIt(TLB->latency1[l] - delay)) * 1000.0 / (dbl)MHz; ++ else z = (dbl)lng_round(CYperIt(TLB->latency2[l] - delay)) * 1000.0 / (dbl)MHz; + fprintf(fp, "set label %ld '(%1.3g) ' at %f,%f right\n", l + 1, z, xl, z); + fprintf(fp, "set arrow %ld from %f,%f to %f,%f nohead lt 0\n", l + 1, xl, z, xh, z); + } +@@ -1023,9 +1023,9 @@ void printCPU(cacheInfo *cache, lng MHz, lng delay) + FILE *fp = stdout; + + fprintf(fp, "CPU loop + L1 access: "); +- fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[0]), round(CYperIt(cache->latency1[0]))); ++ fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[0]), lng_round(CYperIt(cache->latency1[0]))); + fprintf(fp, " ( delay: "); +- fprintf(fp, " %6.2f ns = %3ld cy )\n", NSperIt(delay), round(CYperIt(delay))); ++ fprintf(fp, " %6.2f ns = %3ld cy )\n", NSperIt(delay), lng_round(CYperIt(delay))); + fprintf(fp, "\n"); + fflush(fp); + } +@@ -1047,8 +1047,8 @@ void printCache(cacheInfo *cache, lng MHz) + fprintf(fp, " %3ld KB ", cache->size[l] / 1024); + } + fprintf(fp, " %3ld bytes ", cache->linesize[l + 1]); +- fprintf(fp, " %6.2f ns = %3ld cy " , NSperIt(cache->latency2[l + 1] - cache->latency2[l]), round(CYperIt(cache->latency2[l + 1] - cache->latency2[l]))); +- fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[l + 1] - cache->latency1[l]), round(CYperIt(cache->latency1[l + 1] - cache->latency1[l]))); ++ fprintf(fp, " %6.2f ns = %3ld cy " , NSperIt(cache->latency2[l + 1] - cache->latency2[l]), lng_round(CYperIt(cache->latency2[l + 1] - cache->latency2[l]))); ++ fprintf(fp, " %6.2f ns = %3ld cy\n", NSperIt(cache->latency1[l + 1] - cache->latency1[l]), lng_round(CYperIt(cache->latency1[l + 1] - cache->latency1[l]))); + } + fprintf(fp, "\n"); + fflush(fp); +@@ -1075,9 +1075,9 @@ void printTLB(TLBinfo *TLB, lng MHz) + } else { + fprintf(fp, " %3ld KB ", TLB->pagesize[l + 1] / 1024); + } +- fprintf(fp, " %6.2f ns = %3ld cy ", NSperIt(TLB->latency2[l + 1] - TLB->latency2[l]), round(CYperIt(TLB->latency2[l + 1] - TLB->latency2[l]))); ++ fprintf(fp, " %6.2f ns = %3ld cy ", NSperIt(TLB->latency2[l + 1] - TLB->latency2[l]), lng_round(CYperIt(TLB->latency2[l + 1] - TLB->latency2[l]))); + /* +- fprintf(fp, " %6.2f ns = %3ld cy" , NSperIt(TLB->latency1[l + 1] - TLB->latency1[l]), round(CYperIt(TLB->latency1[l + 1] - TLB->latency1[l]))); ++ fprintf(fp, " %6.2f ns = %3ld cy" , NSperIt(TLB->latency1[l + 1] - TLB->latency1[l]), lng_round(CYperIt(TLB->latency1[l + 1] - TLB->latency1[l]))); + */ + fprintf(fp, "\n"); + } +-- +1.7.0.4 + diff --git a/package/cache-calibrator/Config.in b/package/cache-calibrator/Config.in new file mode 100644 index 0000000000..db780e9fcd --- /dev/null +++ b/package/cache-calibrator/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_CACHE_CALIBRATOR + bool "cache-calibrator" + help + Cache calibrator is a small C program that is supposed to + analyze a computers (cache-) memory system and extract + useful information + + http://homepages.cwi.nl/~manegold/Calibrator/ + + It is also recommended as a load generator for realtime + testing in: + + https://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO diff --git a/package/cache-calibrator/cache-calibrator.hash b/package/cache-calibrator/cache-calibrator.hash new file mode 100644 index 0000000000..df61d17e10 --- /dev/null +++ b/package/cache-calibrator/cache-calibrator.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 2018ed8fa733155d44ceb1c0066c5cf8df7771cdf7cfca0a07b8dd9bebd9c221 calibrator.c diff --git a/package/cache-calibrator/cache-calibrator.mk b/package/cache-calibrator/cache-calibrator.mk new file mode 100644 index 0000000000..d0620655c7 --- /dev/null +++ b/package/cache-calibrator/cache-calibrator.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# cache-calibrator +# +################################################################################ + +CACHE_CALIBRATOR_SOURCE = calibrator.c +CACHE_CALIBRATOR_SITE = http://homepages.cwi.nl/~manegold/Calibrator/src +CACHE_CALIBRATOR_LICENSE = Cache calibrator license +CACHE_CALIBRATOR_LICENSE_FILES = calibrator.c + +define CACHE_CALIBRATOR_EXTRACT_CMDS + cp $(DL_DIR)/$(CACHE_CALIBRATOR_SOURCE) $(@D) +endef + +define CACHE_CALIBRATOR_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) $(@D)/calibrator.c -o $(@D)/cache_calibrator -lm +endef + +define CACHE_CALIBRATOR_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/cache_calibrator $(TARGET_DIR)/usr/bin/cache_calibrator +endef + +$(eval $(generic-package)) diff --git a/package/cairo/0001-blackfin-build-fix.patch b/package/cairo/0001-blackfin-build-fix.patch new file mode 100644 index 0000000000..0e8dd3ad65 --- /dev/null +++ b/package/cairo/0001-blackfin-build-fix.patch @@ -0,0 +1,55 @@ +Fix build on platforms where __USER_LABEL_PREFIX__ is not empty + +On most platforms, a C language symbol and its assembly equivalent are +identical. However, on the Blackfin architecture, this isn't the case, +the corresponding C language symbol in assembly is prepended with a +"_". Blackfin therefore has __USER_LABEL_PREFIX__ defined to "_". + +Cairo already has some code to cope with __USER_LABEL_PREFIX__, but +this code isn't completely correct: it prepends both assembly symbols +and C symbols with __USER_LABEL_PREFIX__, which cannot work. + +This patch fixes that by using the existing slim_hidden_asmname() to +define assembly symbols, and introduce a new slim_hidden_realname() +for C symbols. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/cairo-compiler-private.h +=================================================================== +--- a/src/cairo-compiler-private.h ++++ b/src/cairo-compiler-private.h +@@ -93,12 +93,13 @@ + __asm__ (slim_hidden_asmname (internal)) + # define slim_hidden_def1(name, internal) \ + extern __typeof (name) EXT_##name __asm__(slim_hidden_asmname(name)) \ +- __attribute__((__alias__(slim_hidden_asmname(internal)))) ++ __attribute__((__alias__(slim_hidden_realname(internal)))) + # define slim_hidden_ulp slim_hidden_ulp1(__USER_LABEL_PREFIX__) + # define slim_hidden_ulp1(x) slim_hidden_ulp2(x) + # define slim_hidden_ulp2(x) #x + # define slim_hidden_asmname(name) slim_hidden_asmname1(name) + # define slim_hidden_asmname1(name) slim_hidden_ulp #name ++# define slim_hidden_realname(name) #name + #else + # define slim_hidden_proto(name) int _cairo_dummy_prototype(void) + # define slim_hidden_proto_no_warn(name) int _cairo_dummy_prototype(void) +Index: b/util/cairo-script/cairo-script-private.h +=================================================================== +--- a/util/cairo-script/cairo-script-private.h ++++ b/util/cairo-script/cairo-script-private.h +@@ -109,12 +109,13 @@ + __asm__ (slim_hidden_asmname (internal)) + # define slim_hidden_def1(name, internal) \ + extern __typeof (name) EXT_##name __asm__(slim_hidden_asmname(name)) \ +- __attribute__((__alias__(slim_hidden_asmname(internal)))) ++ __attribute__((__alias__(slim_hidden_realname(internal)))) + # define slim_hidden_ulp slim_hidden_ulp1(__USER_LABEL_PREFIX__) + # define slim_hidden_ulp1(x) slim_hidden_ulp2(x) + # define slim_hidden_ulp2(x) #x + # define slim_hidden_asmname(name) slim_hidden_asmname1(name) + # define slim_hidden_asmname1(name) slim_hidden_ulp #name ++# define slim_hidden_realname(name) #name + #else + # define slim_hidden_proto(name) int _csi_dummy_prototype(void) + # define slim_hidden_proto_no_warn(name) int _csi_dummy_prototype(void) diff --git a/package/cairo/0003-fix-nofork-build.patch b/package/cairo/0003-fix-nofork-build.patch new file mode 100644 index 0000000000..702e9910a5 --- /dev/null +++ b/package/cairo/0003-fix-nofork-build.patch @@ -0,0 +1,29 @@ +test: fix build when SHOULD_FORK is false + +The code in test/cairo-test-runner.c properly takes into account +platforms that do have fork() support, and uses the SHOULD_FORK define +to know whether fork is available or not. + +However, this SHOULD_FORK macro is used to guard the inclusion of +, which is needed to get the prototype of other functions +(namely readlink and getppid), that are used in portions of this file +not guarded by SHOULD_FORK. + +Signed-off-by: Thomas Petazzoni + +Index: b/test/cairo-test-runner.c +=================================================================== +--- a/test/cairo-test-runner.c ++++ b/test/cairo-test-runner.c +@@ -36,10 +36,10 @@ + #include /* for version information */ + + #define SHOULD_FORK HAVE_FORK && HAVE_WAITPID +-#if SHOULD_FORK + #if HAVE_UNISTD_H + #include + #endif ++#if SHOULD_FORK + #if HAVE_SIGNAL_H + #include + #endif diff --git a/package/cairo/0005-fix-gcc-49-build.patch b/package/cairo/0005-fix-gcc-49-build.patch new file mode 100644 index 0000000000..112c9ea053 --- /dev/null +++ b/package/cairo/0005-fix-gcc-49-build.patch @@ -0,0 +1,38 @@ +Fix build with gcc 4.9 + +cairo fails to build with gcc 4.9 due to a bad interaction of cairo +modules with the LTO mechanism. The suggested workaround is to pass +-ffat-lto-objects. See +https://bugs.freedesktop.org/show_bug.cgi?id=77060 for the upstream +bug report, and +https://bugs.archlinux.org/task/40313?project=1&openedfrom=-1+week for +the ArchLinux bug report. + +This patch passes -ffat-lto-objects when gcc understands this option, +in order to provide compatibility with gcc versions older than 4.8, +which did not provide this option, but are anyway unaffected by the +issue. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -37,6 +37,16 @@ + m4_include(build/configure.ac.pthread) dnl checks for pthreads + AC_CACHE_SAVE + ++old_cflags=$CFLAGS ++CFLAGS=-ffat-lto-objects ++AC_MSG_CHECKING([whether CC supports -ffat-lto-objects]) ++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], ++ [AC_MSG_RESULT([yes])] ++ [LTO_CFLAGS=-ffat-lto-objects], ++ [AC_MSG_RESULT([no])] ++) ++CFLAGS="${old_CFLAGS} ${LTO_CFLAGS}" ++ + dnl =========================================================================== + + AC_CHECK_LIB(z, compress, diff --git a/package/cairo/Config.in b/package/cairo/Config.in new file mode 100644 index 0000000000..0c87a2904b --- /dev/null +++ b/package/cairo/Config.in @@ -0,0 +1,48 @@ +config BR2_PACKAGE_CAIRO + bool "cairo" + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + help + Cairo is a 2D graphics library with support for multiple + output devices. Currently supported output targets include + the X Window System, Win32, image buffers, and PostScript, + PDF, and SVG file output. Experimental backends include + OpenGL (through glitz), Quartz, and XCB. + + http://cairographics.org/ + +if BR2_PACKAGE_CAIRO + +config BR2_PACKAGE_CAIRO_PS + bool "postscript support" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_CAIRO_PDF + +config BR2_PACKAGE_CAIRO_PDF + bool "pdf support" + select BR2_PACKAGE_ZLIB + +config BR2_PACKAGE_CAIRO_PNG + bool "png support" + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_ZLIB + +config BR2_PACKAGE_CAIRO_SCRIPT + bool "script support" + select BR2_PACKAGE_CAIRO_PNG + +config BR2_PACKAGE_CAIRO_SVG + bool "svg support" + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_CAIRO_PDF + +config BR2_PACKAGE_CAIRO_TEE + bool "tee support" + +config BR2_PACKAGE_CAIRO_XML + bool "xml support" + select BR2_PACKAGE_CAIRO_PNG + +endif diff --git a/package/cairo/cairo.hash b/package/cairo/cairo.hash new file mode 100644 index 0000000000..225850f359 --- /dev/null +++ b/package/cairo/cairo.hash @@ -0,0 +1,4 @@ +# From http://cairographics.org/releases/cairo-1.14.6.tar.xz.sha1 +sha1 0a59324e6cbe031b5b898ff8b9e2ffceb9d114f5 cairo-1.14.6.tar.xz +# Calculated based on the hash above +sha256 613cb38447b76a93ff7235e17acd55a78b52ea84a9df128c3f2257f8eaa7b252 cairo-1.14.6.tar.xz diff --git a/package/cairo/cairo.mk b/package/cairo/cairo.mk new file mode 100644 index 0000000000..b79899565b --- /dev/null +++ b/package/cairo/cairo.mk @@ -0,0 +1,166 @@ +################################################################################ +# +# cairo +# +################################################################################ + +CAIRO_VERSION = 1.14.6 +CAIRO_SOURCE = cairo-$(CAIRO_VERSION).tar.xz +CAIRO_LICENSE = LGPLv2.1+ +CAIRO_LICENSE_FILES = COPYING +CAIRO_SITE = http://cairographics.org/releases +CAIRO_INSTALL_STAGING = YES +CAIRO_AUTORECONF = YES + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +CAIRO_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -DCAIRO_NO_MUTEX=1" +endif + +# cairo can use C++11 atomics when available, so we need to link with +# libatomic for the architectures who need libatomic. +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +CAIRO_CONF_ENV += LIBS="-latomic" +endif + +CAIRO_CONF_OPTS = \ + --enable-trace=no \ + --enable-interpreter=no + +CAIRO_DEPENDENCIES = host-pkgconf fontconfig pixman + +# Just the bare minimum to make other host-* packages happy +HOST_CAIRO_CONF_OPTS = \ + --enable-trace=no \ + --enable-interpreter=no \ + --disable-directfb \ + --enable-ft \ + --disable-gobject \ + --disable-glesv2 \ + --disable-vg \ + --disable-xlib \ + --disable-xcb \ + --without-x \ + --disable-xlib-xrender \ + --disable-ps \ + --disable-pdf \ + --enable-png \ + --disable-script \ + --disable-svg \ + --disable-tee \ + --disable-xml +HOST_CAIRO_DEPENDENCIES = \ + host-freetype \ + host-fontconfig \ + host-libpng \ + host-pixman \ + host-pkgconf + +# DirectFB svg support rely on Cairo and Cairo DirectFB support depends on +# DirectFB. Break circular dependency by disabling DirectFB support in Cairo +# (which is experimental) +ifeq ($(BR2_PACKAGE_DIRECTFB)x$(BR2_PACKAGE_DIRECTFB_SVG),yx) +CAIRO_CONF_OPTS += --enable-directfb +CAIRO_DEPENDENCIES += directfb +else +CAIRO_CONF_OPTS += --disable-directfb +endif + +ifeq ($(BR2_PACKAGE_FREETYPE),y) +CAIRO_CONF_OPTS += --enable-ft +CAIRO_DEPENDENCIES += freetype +else +CAIRO_CONF_OPTS += --disable-ft +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +CAIRO_CONF_OPTS += --enable-gobject +CAIRO_DEPENDENCIES += libglib2 +else +CAIRO_CONF_OPTS += --disable-gobject +endif + +# Can use GL or GLESv2 but not both +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) +CAIRO_CONF_OPTS += --enable-gl --disable-glesv2 +CAIRO_DEPENDENCIES += libgl +else +ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +CAIRO_CONF_OPTS += --disable-gl --enable-glesv2 +CAIRO_DEPENDENCIES += libgles +else +CAIRO_CONF_OPTS += --disable-gl --disable-glesv2 +endif +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y) +CAIRO_CONF_OPTS += --enable-vg +CAIRO_DEPENDENCIES += libopenvg +else +CAIRO_CONF_OPTS += --disable-vg +endif + +ifeq ($(BR2_PACKAGE_LZO),y) +CAIRO_DEPENDENCIES += lzo +endif + +ifeq ($(BR2_PACKAGE_XORG7),y) +CAIRO_CONF_OPTS += --enable-xlib --enable-xcb --with-x +CAIRO_DEPENDENCIES += xlib_libX11 xlib_libXext +else +CAIRO_CONF_OPTS += --disable-xlib --disable-xcb --without-x +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y) +CAIRO_CONF_OPTS += --enable-xlib-xrender +CAIRO_DEPENDENCIES += xlib_libXrender +else +CAIRO_CONF_OPTS += --disable-xlib-xrender +endif + +ifeq ($(BR2_PACKAGE_CAIRO_PS),y) +CAIRO_CONF_OPTS += --enable-ps +CAIRO_DEPENDENCIES += zlib +else +CAIRO_CONF_OPTS += --disable-ps +endif + +ifeq ($(BR2_PACKAGE_CAIRO_PDF),y) +CAIRO_CONF_OPTS += --enable-pdf +CAIRO_DEPENDENCIES += zlib +else +CAIRO_CONF_OPTS += --disable-pdf +endif + +ifeq ($(BR2_PACKAGE_CAIRO_PNG),y) +CAIRO_CONF_OPTS += --enable-png +CAIRO_DEPENDENCIES += libpng +else +CAIRO_CONF_OPTS += --disable-png +endif + +ifeq ($(BR2_PACKAGE_CAIRO_SCRIPT),y) +CAIRO_CONF_OPTS += --enable-script +else +CAIRO_CONF_OPTS += --disable-script +endif + +ifeq ($(BR2_PACKAGE_CAIRO_SVG),y) +CAIRO_CONF_OPTS += --enable-svg +else +CAIRO_CONF_OPTS += --disable-svg +endif + +ifeq ($(BR2_PACKAGE_CAIRO_TEE),y) +CAIRO_CONF_OPTS += --enable-tee +else +CAIRO_CONF_OPTS += --disable-tee +endif + +ifeq ($(BR2_PACKAGE_CAIRO_XML),y) +CAIRO_CONF_OPTS += --enable-xml +else +CAIRO_CONF_OPTS += --disable-xml +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/cairomm/Config.in b/package/cairomm/Config.in new file mode 100644 index 0000000000..c0d5ccd1df --- /dev/null +++ b/package/cairomm/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_CAIROMM + bool "cairomm" + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBSIGC + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_USE_MMU # libglib2 + depends on BR2_INSTALL_LIBSTDCPP + help + The cairomm package is a set of C++ bindings for Cairo. + + http://www.gtkmm.org/ + +comment "cairomm needs a toolchain w/ C++, wchar, threads, gcc >= 4.8" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR \ + || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/cairomm/cairomm.hash b/package/cairomm/cairomm.hash new file mode 100644 index 0000000000..bebd474b12 --- /dev/null +++ b/package/cairomm/cairomm.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/cairomm/1.12/cairomm-1.12.0.sha256sum +sha256 a54ada8394a86182525c0762e6f50db6b9212a2109280d13ec6a0b29bfd1afe6 cairomm-1.12.0.tar.xz diff --git a/package/cairomm/cairomm.mk b/package/cairomm/cairomm.mk new file mode 100644 index 0000000000..7a56a6822a --- /dev/null +++ b/package/cairomm/cairomm.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# cairomm +# +################################################################################ + +CAIROMM_VERSION_MAJOR = 1.12 +CAIROMM_VERSION = $(CAIROMM_VERSION_MAJOR).0 +CAIROMM_LICENSE = LGPLv2+ +CAIROMM_LICENSE_FILES = COPYING +CAIROMM_SOURCE = cairomm-$(CAIROMM_VERSION).tar.xz +CAIROMM_SITE = http://ftp.gnome.org/pub/gnome/sources/cairomm/$(CAIROMM_VERSION_MAJOR) +CAIROMM_INSTALL_STAGING = YES +CAIROMM_DEPENDENCIES = cairo libglib2 libsigc host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/can-utils/Config.in b/package/can-utils/Config.in new file mode 100644 index 0000000000..307f069ddf --- /dev/null +++ b/package/can-utils/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_CAN_UTILS + bool "can-utils" + depends on BR2_USE_MMU # fork() + help + SocketCAN is a set of open source CAN drivers and a + networking stack. + This package provides various tools for this stack. + + http://elinux.org/Can-utils diff --git a/package/can-utils/can-utils.mk b/package/can-utils/can-utils.mk new file mode 100644 index 0000000000..8e8ed4e51a --- /dev/null +++ b/package/can-utils/can-utils.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# can-utils +# +################################################################################ + +CAN_UTILS_VERSION = f0abaaacb0a3f620f73dd6fd716d7daa3c36a8e3 +CAN_UTILS_SITE = $(call github,linux-can,can-utils,$(CAN_UTILS_VERSION)) +CAN_UTILS_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/canfestival/0001-install-pkgconfig-module-for-canfestival.patch b/package/canfestival/0001-install-pkgconfig-module-for-canfestival.patch new file mode 100644 index 0000000000..23f3d899f1 --- /dev/null +++ b/package/canfestival/0001-install-pkgconfig-module-for-canfestival.patch @@ -0,0 +1,74 @@ +From s.martin49@gmail.com Sun Sep 28 14:59:53 2014 +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH] Install pkgconfig module for canfestival +X-Mercurial-Node: c408fdc77aa18fcda81db4f0d038e8a69ba84bb2 +X-Mercurial-Series-Index: 1 +X-Mercurial-Series-Total: 1 +Message-Id: +X-Mercurial-Series-Id: +User-Agent: Mercurial-patchbomb/3.1.1 +Date: Sun, 28 Sep 2014 14:59:53 +0200 +From: Samuel Martin +To: canfestival-devel@lists.sourceforge.net +Cc: Samuel Martin + +# HG changeset patch +# User "Samuel Martin" +# Date 1411906817 -7200 +# Sun Sep 28 14:20:17 2014 +0200 +# Node ID c408fdc77aa18fcda81db4f0d038e8a69ba84bb2 +# Parent 7740ac6fdedc23e1ed6908d3d7db54833c88572b +Install pkgconfig module for canfestival. + +Signed-off-by: Samuel Martin +Cc: Cluadio Laurita + +diff -r 7740ac6fdedc -r c408fdc77aa1 canfestival.pc.in +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/canfestival.pc.in Sun Sep 28 14:20:17 2014 +0200 +@@ -0,0 +1,12 @@ ++PREFIX = SUB_PREFIX ++TARGET = SUB_TARGET ++ ++prefix=${PREFIX} ++libdir=${prefix}/lib ++includedir=${prefix}/include/canfestival ++ ++Name: Canfestival ++Description: Canfestival CANOpen library ++Version: 1 ++Libs: -L${libdir} -lcanfestival -lcanfestival_${TARGET} -lrt -ldl -lpthread ++Cflags: -I${includedir} +diff -r 7740ac6fdedc -r c408fdc77aa1 configure +--- a/configure Thu Jun 12 14:07:16 2014 +0200 ++++ b/configure Sun Sep 28 14:20:17 2014 +0200 +@@ -813,6 +813,10 @@ + MAKEFILES=$MAKEFILES\ drivers/$SUB_TARGET/Makefile.in + fi + ++if [ "$SUB_TARGET" = "unix" ]; then ++ MAKEFILES=$MAKEFILES\ canfestival.pc.in ++fi ++ + if [ "$SUB_TARGET" = "unix" -a "$SUB_TIMERS_DRIVER" = "kernel" ]; then + MAKEFILES=$MAKEFILES\ + \ examples/kerneltest/Makefile.in\ +diff -r 7740ac6fdedc -r c408fdc77aa1 src/Makefile.in +--- a/src/Makefile.in Thu Jun 12 14:07:16 2014 +0200 ++++ b/src/Makefile.in Sun Sep 28 14:20:17 2014 +0200 +@@ -132,9 +132,10 @@ + $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< + + install: libcanfestival.a +- mkdir -p $(DESTDIR)$(PREFIX)/lib/ ++ mkdir -p $(DESTDIR)$(PREFIX)/lib/pkgconfig + mkdir -p $(DESTDIR)$(PREFIX)/include/canfestival + cp libcanfestival.a $(DESTDIR)$(PREFIX)/lib/ ++ cp ../canfestival.pc $(DESTDIR)$(PREFIX)/lib/pkgconfig/ + cp ../include/*.h $(DESTDIR)$(PREFIX)/include/canfestival + + uninstall: + + diff --git a/package/canfestival/0002-allow-to-set-python-interpreter.patch b/package/canfestival/0002-allow-to-set-python-interpreter.patch new file mode 100644 index 0000000000..bb6031658c --- /dev/null +++ b/package/canfestival/0002-allow-to-set-python-interpreter.patch @@ -0,0 +1,176 @@ +From s.martin49@gmail.com Fri Oct 10 23:43:32 2014 +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [PATCH] allow to set python interpreter +X-Mercurial-Node: 4805f636c2317d989a5f704ba691369f41be6595 +X-Mercurial-Series-Index: 1 +X-Mercurial-Series-Total: 1 +Message-Id: <4805f636c2317d989a5f.1412977412@bobook> +X-Mercurial-Series-Id: <4805f636c2317d989a5f.1412977412@bobook> +User-Agent: Mercurial-patchbomb/3.1.2 +Date: Fri, 10 Oct 2014 23:43:32 +0200 +From: Samuel Martin +To: canfestival-devel@lists.sourceforge.net +Cc: Samuel Martin + +# HG changeset patch +# User "Samuel Martin" +# Date 1412977082 -7200 +# Fri Oct 10 23:38:02 2014 +0200 +# Node ID 4805f636c2317d989a5f704ba691369f41be6595 +# Parent c408fdc77aa18fcda81db4f0d038e8a69ba84bb2 +allow to set python interpreter + +Canfestival python modules and scripts are not python3 compliant. + +Allow to pass the python interperter to be used to make. + +Signed-off-by: Samuel Martin + +diff --git a/Makefile.in b/Makefile.in +--- a/Makefile.in ++++ b/Makefile.in +@@ -21,6 +21,9 @@ + # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + # + ++PYTHON ?= python ++export PYTHON ++ + all: objdictedit canfestival examples + + examples: canfestival driver +diff --git a/doc/manual/en/manual.tex b/doc/manual/en/manual.tex +--- a/doc/manual/en/manual.tex ++++ b/doc/manual/en/manual.tex +@@ -1134,6 +1134,7 @@ + python objdictedit.py [od files...] + \end{verbatim} + ++Note that Gnosis modules only run with python2 as interpreter. + + \subsubsection{Installation and usage on Windows} + +diff --git a/examples/CANOpenShell/Makefile.in b/examples/CANOpenShell/Makefile.in +--- a/examples/CANOpenShell/Makefile.in ++++ b/examples/CANOpenShell/Makefile.in +@@ -69,11 +69,11 @@ + + CANOpenShellMasterOD.c: CANOpenShellMasterOD.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py CANOpenShellMasterOD.od CANOpenShellMasterOD.c ++ $(PYTHON) ../../objdictgen/objdictgen.py CANOpenShellMasterOD.od CANOpenShellMasterOD.c + + CANOpenShellSlaveOD.c: CANOpenShellSlaveOD.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py CANOpenShellSlaveOD.od CANOpenShellSlaveOD.c ++ $(PYTHON) ../../objdictgen/objdictgen.py CANOpenShellSlaveOD.od CANOpenShellSlaveOD.c + + %.o: %.c + $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< +diff --git a/examples/DS401_Master/Makefile.in b/examples/DS401_Master/Makefile.in +--- a/examples/DS401_Master/Makefile.in ++++ b/examples/DS401_Master/Makefile.in +@@ -53,7 +53,7 @@ + + TestMaster.c: TestMaster.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c ++ $(PYTHON) ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c + + %.o: %.c + $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< +diff --git a/examples/DS401_Slave_Gui/Makefile.in b/examples/DS401_Slave_Gui/Makefile.in +--- a/examples/DS401_Slave_Gui/Makefile.in ++++ b/examples/DS401_Slave_Gui/Makefile.in +@@ -59,7 +59,7 @@ + + ObjDict.c: ObjDict.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py ObjDict.od ObjDict.c ++ $(PYTHON) ../../objdictgen/objdictgen.py ObjDict.od ObjDict.c + + .cpp.o: + $(CXX) -c $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) `wx-config --cxxflags` $< -o $@ +diff --git a/examples/SillySlave/Makefile.in b/examples/SillySlave/Makefile.in +--- a/examples/SillySlave/Makefile.in ++++ b/examples/SillySlave/Makefile.in +@@ -53,7 +53,7 @@ + + SillySlave.c: SillySlave.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py SillySlave.od SillySlave.c ++ $(PYTHON) ../../objdictgen/objdictgen.py SillySlave.od SillySlave.c + + %.o: %.c + $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< +diff --git a/examples/TestMasterMicroMod/Makefile.in b/examples/TestMasterMicroMod/Makefile.in +--- a/examples/TestMasterMicroMod/Makefile.in ++++ b/examples/TestMasterMicroMod/Makefile.in +@@ -61,7 +61,7 @@ + + TestMaster.c: TestMaster.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c ++ $(PYTHON) ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c + + %.o: %.c + $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< +diff --git a/examples/TestMasterSlave/Makefile.in b/examples/TestMasterSlave/Makefile.in +--- a/examples/TestMasterSlave/Makefile.in ++++ b/examples/TestMasterSlave/Makefile.in +@@ -69,11 +69,11 @@ + + TestSlave.c: TestSlave.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py TestSlave.od TestSlave.c ++ $(PYTHON) ../../objdictgen/objdictgen.py TestSlave.od TestSlave.c + + TestMaster.c: TestMaster.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c ++ $(PYTHON) ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c + + %.o: %.c + $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< +diff --git a/examples/TestMasterSlaveLSS/Makefile.in b/examples/TestMasterSlaveLSS/Makefile.in +--- a/examples/TestMasterSlaveLSS/Makefile.in ++++ b/examples/TestMasterSlaveLSS/Makefile.in +@@ -64,15 +64,15 @@ + + TestSlaveA.c: TestSlaveA.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py TestSlaveA.od TestSlaveA.c ++ $(PYTHON) ../../objdictgen/objdictgen.py TestSlaveA.od TestSlaveA.c + + TestSlaveB.c: TestSlaveB.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py TestSlaveB.od TestSlaveB.c ++ $(PYTHON) ../../objdictgen/objdictgen.py TestSlaveB.od TestSlaveB.c + + TestMaster.c: TestMaster.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c ++ $(PYTHON) ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c + + %.o: %.c + $(CC) $(CFLAGS) $(PROG_CFLAGS) ${PROGDEFINES} $(INCLUDES) -o $@ -c $< +diff --git a/examples/kerneltest/Makefile.in b/examples/kerneltest/Makefile.in +--- a/examples/kerneltest/Makefile.in ++++ b/examples/kerneltest/Makefile.in +@@ -79,10 +79,10 @@ + + TestSlave.c: TestSlave.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py TestSlave.od TestSlave.c ++ $(PYTHON) ../../objdictgen/objdictgen.py TestSlave.od TestSlave.c + + TestMaster.c: TestMaster.od + $(MAKE) -C ../../objdictgen gnosis +- python ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c ++ $(PYTHON) ../../objdictgen/objdictgen.py TestMaster.od TestMaster.c + + #endif + + diff --git a/package/canfestival/Config.in b/package/canfestival/Config.in new file mode 100644 index 0000000000..4e734964aa --- /dev/null +++ b/package/canfestival/Config.in @@ -0,0 +1,90 @@ +config BR2_PACKAGE_CANFESTIVAL_ARCH_SUPPORTS + bool + default y if BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_arm + +comment "canfestival needs a (e)glibc or uClibc toolchain w/ threads and dynamic library" + depends on BR2_PACKAGE_CANFESTIVAL_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_USES_MUSL || \ + !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS + +config BR2_PACKAGE_CANFESTIVAL + bool "canfestival" + depends on BR2_PACKAGE_CANFESTIVAL_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_USES_MUSL + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + CanFestival is an OpenSource CANOpen framework, licensed under + LGPLv2.1 and GPLv2 for some drivers (virtual_kernel, lincan and + copcican_comedi). + + http://www.canfestival.org + +if BR2_PACKAGE_CANFESTIVAL + +choice + prompt "driver" + default BR2_PACKAGE_CANFESTIVAL_SOCKET + +# - The AnaGate CAN(duo) [1], PeakSystem CAN [2] and CO-PCICAN [3] +# drivers are not available (not packaged in Buildroot), so their +# support are disabled. +# - The virtual_kernel driver is disabled because it uses very old +# kernel APIs, that have been renamed, or marked as deprecated or +# removed for a long while. The question has been raised on the +# canfestival mailing list [4]. +# +# [1] http://www.anagate.de/en/index.html +# [2] http://www.peak-system.com/linux/ +# [3] http://www.cosateq.com/ +# [4] http://sourceforge.net/p/canfestival/mailman/message/32519648/ + +config BR2_PACKAGE_CANFESTIVAL_VIRTUAL + bool "virtual" + help + Unix pipe based virtual CAN driver. + +config BR2_PACKAGE_CANFESTIVAL_SOCKET + bool "socket" + help + SocketCAN (the standard mainline CAN bus interface). + + http://developer.berlios.de/projects/socketcan/ + +config BR2_PACKAGE_CANFESTIVAL_LINCAN + bool "lincan" + help + Lincan driver. + + http://www.ocera.org/download/components/WP7/lincan-0.3.3.html + +config BR2_PACKAGE_CANFESTIVAL_CAN4LINUX + bool "can4linux" + help + Can4linux driver. + + http://www.port.de/engl/canprod/hw_can4linux.html + +endchoice + +config BR2_PACKAGE_CANFESTIVAL_DRIVER + string + default "virtual" if BR2_PACKAGE_CANFESTIVAL_VIRTUAL + default "socket" if BR2_PACKAGE_CANFESTIVAL_SOCKET + default "lincan" if BR2_PACKAGE_CANFESTIVAL_LINCAN + default "can4linux" if BR2_PACKAGE_CANFESTIVAL_CAN4LINUX + +config BR2_PACKAGE_CANFESTIVAL_ADDITIONAL_OPTIONS + string "additional configure options" + help + Additional options can be passed directly to the configure script + (e.g.: --MAX_CAN_BUS_ID=..., --SDO_MAX_LENGTH_TRANSFER=..., + --SDO_BLOCK_SIZE=...). + +config BR2_PACKAGE_CANFESTIVAL_INSTALL_EXAMPLES + bool "install examples" + help + Install binary application examples. + +endif diff --git a/package/canfestival/canfestival.mk b/package/canfestival/canfestival.mk new file mode 100644 index 0000000000..61578d3162 --- /dev/null +++ b/package/canfestival/canfestival.mk @@ -0,0 +1,59 @@ +################################################################################ +# +# canfestival +# +################################################################################ + +CANFESTIVAL_VERSION = 7740ac6fdedc23e1ed6908d3d7db54833c88572b +CANFESTIVAL_SITE = http://dev.automforge.net/CanFestival-3 +CANFESTIVAL_SITE_METHOD = hg +CANFESTIVAL_LICENSE = LGPLv2.1+ +CANFESTIVAL_LICENSE_FILES = COPYING LICENCE +CANFESTIVAL_INSTALL_STAGING = YES +CANFESTIVAL_INSTALLED-y = src drivers +CANFESTIVAL_INSTALLED-$(BR2_PACKAGE_CANFESTIVAL_INSTALL_EXAMPLES) += examples + +# Canfestival provides and used some python modules and scripts only compliant +# with python2. +CANFESTIVAL_DEPENDENCIES = host-python + +# canfestival uses its own hand-written build-system. Though there is +# a configure script, it does not use the autotools, so, we use the +# generic-package infrastructure. +define CANFESTIVAL_CONFIGURE_CMDS + cd $(@D) && \ + $(TARGET_CONFIGURE_OPTS) ./configure \ + --target=unix \ + --arch=$(BR2_ARCH) \ + --timers=unix \ + --binutils=$(TARGET_CROSS) \ + --cc="$(TARGET_CC)" \ + --cxx="$(TARGET_CC)" \ + --ld="$(TARGET_CC)" \ + --prefix=/usr \ + --can=$(BR2_PACKAGE_CANFESTIVAL_DRIVER) \ + $(call qstrip,$(BR2_PACKAGE_CANFESTIVAL_ADDITIONAL_OPTIONS)) +endef + +define CANFESTIVAL_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) all \ + PYTHON=$(HOST_DIR)/usr/bin/python2 +endef + +define CANFESTIVAL_INSTALL_TARGET_CMDS + for d in $(CANFESTIVAL_INSTALLED-y) ; do \ + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)/$$d install \ + PYTHON=$(HOST_DIR)/usr/bin/python2 \ + DESTDIR=$(TARGET_DIR) || exit 1 ; \ + done +endef + +define CANFESTIVAL_INSTALL_STAGING_CMDS + for d in $(CANFESTIVAL_INSTALLED-y) ; do \ + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D)/$$d install \ + PYTHON=$(HOST_DIR)/usr/bin/python2 \ + DESTDIR=$(STAGING_DIR) || exit 1 ; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/cannelloni/Config.in b/package/cannelloni/Config.in new file mode 100644 index 0000000000..e137e60c60 --- /dev/null +++ b/package/cannelloni/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_CANNELLONI + bool "cannelloni" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # lksctp-tools + depends on BR2_TOOLCHAIN_HAS_THREADS # lksctp-tools + depends on !BR2_STATIC_LIBS # lksctp-tools + help + A SocketCAN over Ethernet tunnel. The tunnel supports both + UDP and SCTP protocols. + + https://github.com/mguentner/cannelloni + +comment "cannelloni needs a toolchain w/ C++, threads, dynamic library, gcc >= 4.8" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/cannelloni/cannelloni.hash b/package/cannelloni/cannelloni.hash new file mode 100644 index 0000000000..c14dceb794 --- /dev/null +++ b/package/cannelloni/cannelloni.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 fe5abb1c9e523049c48dd906603bc762cc55ccd20c16dbec7dc64163b9eefccf cannelloni-20160414.tar.gz diff --git a/package/cannelloni/cannelloni.mk b/package/cannelloni/cannelloni.mk new file mode 100644 index 0000000000..fffdb4ba9a --- /dev/null +++ b/package/cannelloni/cannelloni.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# cannelloni +# +################################################################################ + +CANNELLONI_VERSION = 20160414 +CANNELLONI_SITE = $(call github,mguentner,cannelloni,$(CANNELLONI_VERSION)) +CANNELLONI_LICENSE = GPLv2 +CANNELLONI_LICENSE_FILES = gpl-2.0.txt + +ifeq ($(BR2_PACKAGE_LKSCTP_TOOLS),y) +CANNELLONI_CONF_OPTS += -DSCTP_SUPPORT=ON +CANNELLONI_DEPENDENCIES += lksctp-tools +else +CANNELLONI_CONF_OPTS += -DSCTP_SUPPORT=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/cantarell/Config.in b/package/cantarell/Config.in new file mode 100644 index 0000000000..78af96d595 --- /dev/null +++ b/package/cantarell/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_CANTARELL + bool "cantarell" + help + The Cantarell font family is a contemporary Humanist + sans serif designed for on-screen reading. + + https://wiki.gnome.org/Projects/CantarellFonts diff --git a/package/cantarell/cantarell.hash b/package/cantarell/cantarell.hash new file mode 100644 index 0000000000..e2cc00eda4 --- /dev/null +++ b/package/cantarell/cantarell.hash @@ -0,0 +1,2 @@ +# From http://ftp.acc.umu.se/pub/gnome/sources/cantarell-fonts/0.0/cantarell-fonts-0.0.24.sha256sum +sha256 9cad649ae84f7e4ca1be637c27e2fa19e1fbf00d4bf6480171ccfad405b39264 cantarell-fonts-0.0.24.tar.xz diff --git a/package/cantarell/cantarell.mk b/package/cantarell/cantarell.mk new file mode 100644 index 0000000000..b4133ecdbd --- /dev/null +++ b/package/cantarell/cantarell.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# cantarell +# +################################################################################ + +CANTARELL_VERSION_MAJOR = 0.0 +CANTARELL_VERSION = $(CANTARELL_VERSION_MAJOR).24 +CANTARELL_SITE = http://ftp.gnome.org/pub/gnome/sources/cantarell-fonts/$(CANTARELL_VERSION_MAJOR) +CANTARELL_SOURCE = cantarell-fonts-$(CANTARELL_VERSION).tar.xz +CANTARELL_DEPENDENCIES = host-pkgconf +CANTARELL_LICENSE = OFLv1.1 +CANTARELL_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/cbootimage/Config.in.host b/package/cbootimage/Config.in.host new file mode 100644 index 0000000000..1913afa28f --- /dev/null +++ b/package/cbootimage/Config.in.host @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_CBOOTIMAGE + bool "host cbootimage" + depends on BR2_arm || BR2_armeb + help + This project provides a tool which compiles BCT (Boot + Configuration Table) images to place into the boot flash of + a Tegra-based device. + + https://github.com/NVIDIA/cbootimage diff --git a/package/cbootimage/cbootimage.hash b/package/cbootimage/cbootimage.hash new file mode 100644 index 0000000000..96cf172e39 --- /dev/null +++ b/package/cbootimage/cbootimage.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 373c108d7b6778c62a33e59ad0cd5ea9ebb379319a0c8b4cf469eaa8bec5521b cbootimage-v1.7.tar.gz diff --git a/package/cbootimage/cbootimage.mk b/package/cbootimage/cbootimage.mk new file mode 100644 index 0000000000..20b17dde59 --- /dev/null +++ b/package/cbootimage/cbootimage.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# cbootimage +# +################################################################################ + +CBOOTIMAGE_VERSION = v1.7 +CBOOTIMAGE_SITE = $(call github,NVIDIA,cbootimage,$(CBOOTIMAGE_VERSION)) +CBOOTIMAGE_LICENSE = GPLv2 +CBOOTIMAGE_LICENSE_FILES = COPYING +CBOOTIMAGE_AUTORECONF = YES + +$(eval $(host-autotools-package)) diff --git a/package/cc-tool/0001-add-missing-stdarg-include.patch b/package/cc-tool/0001-add-missing-stdarg-include.patch new file mode 100644 index 0000000000..c4f47fd30c --- /dev/null +++ b/package/cc-tool/0001-add-missing-stdarg-include.patch @@ -0,0 +1,18 @@ +Add missing include for va_list + +Fixes the build on uClibc. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/common/log.h +=================================================================== +--- a/src/common/log.h ++++ b/src/common/log.h +@@ -13,6 +13,7 @@ + + #include + #include ++#include + #include "common.h" + + class Log diff --git a/package/cc-tool/0002-boost-m4.patch b/package/cc-tool/0002-boost-m4.patch new file mode 100644 index 0000000000..dc07701de0 --- /dev/null +++ b/package/cc-tool/0002-boost-m4.patch @@ -0,0 +1,883 @@ +The version of boost.m4 initially included in cc-tool has an issue +with gcc5 (one of its tests fails due to the first change described in [1] +"Preprocessor issues"). + +This was fixed upstream (boost.m4 project) in Nov 2014 [2]. + +We add the latest commit [3] of upstream boost.m4 plus a patch from github PR +[4] to add detection for gcc 5.1. + +[1] +https://gcc.gnu.org/gcc-5/porting_to.html + +[2] +https://github.com/tsuna/boost.m4/commit/32553aaf4d5090da19aa0ec33b936982c685009f + +[3] +https://github.com/tsuna/boost.m4/commit/d9ff75b6af66360d76f46f469a26ab18e24e1030 + +[4] +https://github.com/rubenk/boost.m4/commit/b879eb85f112cf054643d2e7f9544c230299c0b2 + +Signed-off-by: Jörg Krause + +diff -purN cc-tool.original/m4/boost.m4 cc-tool/m4/boost.m4 +--- cc-tool.original/m4/boost.m4 2015-07-28 15:43:25.458840000 +0200 ++++ cc-tool/m4/boost.m4 2015-07-28 16:12:02.532791424 +0200 +@@ -1,5 +1,5 @@ + # boost.m4: Locate Boost headers and libraries for autoconf-based projects. +-# Copyright (C) 2007, 2008, 2009, 2010, 2011 Benoit Sigoure ++# Copyright (C) 2007-2011, 2014 Benoit Sigoure + # + # 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 +@@ -22,7 +22,7 @@ + # along with this program. If not, see . + + m4_define([_BOOST_SERIAL], [m4_translit([ +-# serial 16 ++# serial 25 + ], [# + ], [])]) + +@@ -59,7 +59,8 @@ m4_pattern_forbid([^_?(BOOST|Boost)_]) + # It could be useful to turn this into a macro which extracts the + # value of any macro. + m4_define([_BOOST_SED_CPP], +-[AC_LANG_PREPROC_REQUIRE()dnl ++[AC_LANG_PUSH([C++])dnl ++AC_LANG_PREPROC_REQUIRE()dnl + AC_REQUIRE([AC_PROG_SED])dnl + AC_LANG_CONFTEST([AC_LANG_SOURCE([[$2]])]) + AS_IF([dnl eval is necessary to expand ac_cpp. +@@ -71,13 +72,31 @@ dnl strip `\n' with backquotes, not the + dnl boost_cv_lib_version='1_37\r' for instance, which breaks + dnl everything else. + dnl Cannot use 'dnl' after [$4] because a trailing dnl may break AC_CACHE_CHECK ++dnl ++dnl Beware that GCC 5, when expanding macros, may embed # line directives ++dnl a within single line: ++dnl ++dnl # 1 "conftest.cc" ++dnl # 1 "" ++dnl # 1 "" ++dnl # 1 "conftest.cc" ++dnl # 1 "/opt/local/include/boost/version.hpp" 1 3 ++dnl # 2 "conftest.cc" 2 ++dnl boost-lib-version = ++dnl # 2 "conftest.cc" 3 ++dnl "1_56" ++dnl ++dnl So get rid of the # lines, and glue the remaining ones together. + (eval "$ac_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | ++ grep -v '#' | + tr -d '\r' | ++ tr -s '\n' ' ' | + $SED -n -e "$1" >conftest.i 2>&1], + [$3], + [$4]) + rm -rf conftest* +-])# AC_EGREP_CPP ++AC_LANG_POP([C++])dnl ++])# _BOOST_SED_CPP + + + +@@ -206,7 +225,7 @@ AC_LANG_POP([C++])dnl + AC_CACHE_CHECK([for Boost's header version], + [boost_cv_lib_version], + [m4_pattern_allow([^BOOST_LIB_VERSION$])dnl +- _BOOST_SED_CPP([/^boost-lib-version = /{s///;s/\"//g;p;q;}], ++ _BOOST_SED_CPP([[/^boost-lib-version = /{s///;s/[\" ]//g;p;q;}]], + [#include + boost-lib-version = BOOST_LIB_VERSION], + [boost_cv_lib_version=`cat conftest.i`])]) +@@ -214,13 +233,14 @@ boost-lib-version = BOOST_LIB_VERSION], + boost_major_version=`echo "$boost_cv_lib_version" | sed 's/_//;s/_.*//'` + case $boost_major_version in #( + '' | *[[!0-9]]*) +- AC_MSG_ERROR([invalid value: boost_major_version=$boost_major_version]) ++ AC_MSG_ERROR([invalid value: boost_major_version='$boost_major_version']) + ;; + esac + fi + CPPFLAGS=$boost_save_CPPFLAGS + ])# BOOST_REQUIRE + ++ + # BOOST_STATIC() + # -------------- + # Add the "--enable-static-boost" configure argument. If this argument is given +@@ -232,6 +252,7 @@ AC_DEFUN([BOOST_STATIC], + [enable_static_boost=yes], + [enable_static_boost=no])])# BOOST_STATIC + ++ + # BOOST_FIND_HEADER([HEADER-NAME], [ACTION-IF-NOT-FOUND], [ACTION-IF-FOUND]) + # -------------------------------------------------------------------------- + # Wrapper around AC_CHECK_HEADER for Boost headers. Useful to check for +@@ -264,14 +285,16 @@ fi + ])# BOOST_FIND_HEADER + + +-# BOOST_FIND_LIB([LIB-NAME], [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], +-# [CXX-PROLOGUE]) +-# ------------------------------------------------------------------------- +-# Look for the Boost library LIB-NAME (e.g., LIB-NAME = `thread', for +-# libboost_thread). Check that HEADER-NAME works and check that +-# libboost_LIB-NAME can link with the code CXX-TEST. The optional argument +-# CXX-PROLOGUE can be used to include some C++ code before the `main' +-# function. ++# BOOST_FIND_LIBS([COMPONENT-NAME], [CANDIDATE-LIB-NAMES], ++# [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], ++# [CXX-PROLOGUE]) ++# -------------------------------------------------------------- ++# Look for the Boost library COMPONENT-NAME (e.g., `thread', for ++# libboost_thread) under the possible CANDIDATE-LIB-NAMES (e.g., ++# "thread_win32 thread"). Check that HEADER-NAME works and check that ++# libboost_LIB-NAME can link with the code CXX-TEST. The optional ++# argument CXX-PROLOGUE can be used to include some C++ code before ++# the `main' function. + # + # Invokes BOOST_FIND_HEADER([HEADER-NAME]) (see above). + # +@@ -285,7 +308,7 @@ fi + # builds. Some sample values for PREFERRED-RT-OPT: (nothing), mt, d, mt-d, gdp + # ... If you want to make sure you have a specific version of Boost + # (eg, >= 1.33) you *must* invoke BOOST_REQUIRE before this macro. +-AC_DEFUN([BOOST_FIND_LIB], ++AC_DEFUN([BOOST_FIND_LIBS], + [AC_REQUIRE([BOOST_REQUIRE])dnl + AC_REQUIRE([_BOOST_FIND_COMPILER_TAG])dnl + AC_REQUIRE([BOOST_STATIC])dnl +@@ -299,32 +322,69 @@ AS_VAR_PUSHDEF([Boost_lib], [boost_cv_li + AS_VAR_PUSHDEF([Boost_lib_LDFLAGS], [boost_cv_lib_$1_LDFLAGS])dnl + AS_VAR_PUSHDEF([Boost_lib_LDPATH], [boost_cv_lib_$1_LDPATH])dnl + AS_VAR_PUSHDEF([Boost_lib_LIBS], [boost_cv_lib_$1_LIBS])dnl +-BOOST_FIND_HEADER([$3]) ++BOOST_FIND_HEADER([$4]) + boost_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" +-# Now let's try to find the library. The algorithm is as follows: first look +-# for a given library name according to the user's PREFERRED-RT-OPT. For each +-# library name, we prefer to use the ones that carry the tag (toolset name). +-# Each library is searched through the various standard paths were Boost is +-# usually installed. If we can't find the standard variants, we try to +-# enforce -mt (for instance on MacOSX, libboost_threads.dylib doesn't exist +-# but there's -obviously- libboost_threads-mt.dylib). + AC_CACHE_CHECK([for the Boost $1 library], [Boost_lib], +- [Boost_lib=no +- case "$2" in #( +- mt | mt-) boost_mt=-mt; boost_rtopt=;; #( +- mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$2" : 'Xmt-*\(.*\)'`;; #( +- *) boost_mt=; boost_rtopt=$2;; ++ [_BOOST_FIND_LIBS($@)]) ++case $Boost_lib in #( ++ (no) _AC_MSG_LOG_CONFTEST ++ AC_MSG_ERROR([cannot find the flags to link with Boost $1]) ++ ;; ++esac ++AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl ++AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl ++AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl ++AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl ++CPPFLAGS=$boost_save_CPPFLAGS ++AS_VAR_POPDEF([Boost_lib])dnl ++AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl ++AS_VAR_POPDEF([Boost_lib_LDPATH])dnl ++AS_VAR_POPDEF([Boost_lib_LIBS])dnl ++AC_LANG_POP([C++])dnl ++fi ++]) ++ ++ ++# BOOST_FIND_LIB([LIB-NAME], ++# [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], ++# [CXX-PROLOGUE]) ++# -------------------------------------------------------------- ++# Backward compatibility wrapper for BOOST_FIND_LIBS. ++AC_DEFUN([BOOST_FIND_LIB], ++[BOOST_FIND_LIBS([$1], $@)]) ++ ++ ++# _BOOST_FIND_LIBS([LIB-NAME], [CANDIDATE-LIB-NAMES], ++# [PREFERRED-RT-OPT], [HEADER-NAME], [CXX-TEST], ++# [CXX-PROLOGUE]) ++# -------------------------------------------------------------- ++# Real implementation of BOOST_FIND_LIBS: rely on these local macros: ++# Boost_lib, Boost_lib_LDFLAGS, Boost_lib_LDPATH, Boost_lib_LIBS ++# ++# The algorithm is as follows: first look for a given library name ++# according to the user's PREFERRED-RT-OPT. For each library name, we ++# prefer to use the ones that carry the tag (toolset name). Each ++# library is searched through the various standard paths were Boost is ++# usually installed. If we can't find the standard variants, we try ++# to enforce -mt (for instance on MacOSX, libboost_thread.dylib ++# doesn't exist but there's -obviously- libboost_thread-mt.dylib). ++AC_DEFUN([_BOOST_FIND_LIBS], ++[Boost_lib=no ++ case "$3" in #( ++ (mt | mt-) boost_mt=-mt; boost_rtopt=;; #( ++ (mt* | mt-*) boost_mt=-mt; boost_rtopt=`expr "X$3" : 'Xmt-*\(.*\)'`;; #( ++ (*) boost_mt=; boost_rtopt=$3;; + esac + if test $enable_static_boost = yes; then + boost_rtopt="s$boost_rtopt" + fi + # Find the proper debug variant depending on what we've been asked to find. + case $boost_rtopt in #( +- *d*) boost_rt_d=$boost_rtopt;; #( +- *[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn') ++ (*d*) boost_rt_d=$boost_rtopt;; #( ++ (*[[sgpn]]*) # Insert the `d' at the right place (in between `sg' and `pn') + boost_rt_d=`echo "$boost_rtopt" | sed 's/\(s*g*\)\(p*n*\)/\1\2/'`;; #( +- *) boost_rt_d='-d';; ++ (*) boost_rt_d='-d';; + esac + # If the PREFERRED-RT-OPT are not empty, prepend a `-'. + test -n "$boost_rtopt" && boost_rtopt="-$boost_rtopt" +@@ -335,8 +395,8 @@ AC_CACHE_CHECK([for the Boost $1 library + AC_MSG_ERROR([the libext variable is empty, did you invoke Libtool?]) + boost_save_ac_objext=$ac_objext + # Generate the test file. +- AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$3> +-$5], [$4])]) ++ AC_LANG_CONFTEST([AC_LANG_PROGRAM([#include <$4> ++$6], [$5])]) + dnl Optimization hacks: compiling C++ is slow, especially with Boost. What + dnl we're trying to do here is guess the right combination of link flags + dnl (LIBS / LDFLAGS) to use a given library. This can take several +@@ -358,21 +418,22 @@ dnl start the for loops). + [AC_MSG_ERROR([cannot compile a test that uses Boost $1])]) + ac_objext=$boost_save_ac_objext + boost_failed_libs= +-# Don't bother to ident the 6 nested for loops, only the 2 innermost ones +-# matter. ++# Don't bother to ident the following nested for loops, only the 2 ++# innermost ones matter. ++for boost_lib_ in $2; do + for boost_tag_ in -$boost_cv_lib_tag ''; do + for boost_ver_ in -$boost_cv_lib_version ''; do + for boost_mt_ in $boost_mt -mt ''; do + for boost_rtopt_ in $boost_rtopt '' -d; do + for boost_lib in \ +- boost_$1$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ +- boost_$1$boost_tag_$boost_rtopt_$boost_ver_ \ +- boost_$1$boost_tag_$boost_mt_$boost_ver_ \ +- boost_$1$boost_tag_$boost_ver_ ++ boost_$boost_lib_$boost_tag_$boost_mt_$boost_rtopt_$boost_ver_ \ ++ boost_$boost_lib_$boost_tag_$boost_rtopt_$boost_ver_ \ ++ boost_$boost_lib_$boost_tag_$boost_mt_$boost_ver_ \ ++ boost_$boost_lib_$boost_tag_$boost_ver_ + do + # Avoid testing twice the same lib + case $boost_failed_libs in #( +- *@$boost_lib@*) continue;; ++ (*@$boost_lib@*) continue;; + esac + # If with_boost is empty, we'll search in /lib first, which is not quite + # right so instead we'll try to a location based on where the headers are. +@@ -382,14 +443,17 @@ for boost_rtopt_ in $boost_rtopt '' -d; + /opt/local/lib* /usr/local/lib* /opt/lib* /usr/lib* \ + "$with_boost" C:/Boost/lib /lib* + do +- test -e "$boost_ldpath" || continue ++ # Don't waste time with directories that don't exist. ++ if test x"$boost_ldpath" != x && test ! -e "$boost_ldpath"; then ++ continue ++ fi + boost_save_LDFLAGS=$LDFLAGS + # Are we looking for a static library? + case $boost_ldpath:$boost_rtopt_ in #( +- *?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) ++ (*?*:*s*) # Yes (Non empty boost_ldpath + s in rt opt) + Boost_lib_LIBS="$boost_ldpath/lib$boost_lib.$libext" + test -e "$Boost_lib_LIBS" || continue;; #( +- *) # No: use -lboost_foo to find the shared library. ++ (*) # No: use -lboost_foo to find the shared library. + Boost_lib_LIBS="-l$boost_lib";; + esac + boost_save_LIBS=$LIBS +@@ -403,9 +467,35 @@ dnl generated only once above (before we + LDFLAGS=$boost_save_LDFLAGS + LIBS=$boost_save_LIBS + if test x"$Boost_lib" = xyes; then +- Boost_lib_LDFLAGS="-L$boost_ldpath -Wl,-rpath,$boost_ldpath" ++ # Check or used cached result of whether or not using -R or ++ # -rpath makes sense. Some implementations of ld, such as for ++ # Mac OSX, require -rpath but -R is the flag known to work on ++ # other systems. https://github.com/tsuna/boost.m4/issues/19 ++ AC_CACHE_VAL([boost_cv_rpath_link_ldflag], ++ [case $boost_ldpath in ++ '') # Nothing to do. ++ boost_cv_rpath_link_ldflag= ++ boost_rpath_link_ldflag_found=yes;; ++ *) ++ for boost_cv_rpath_link_ldflag in -Wl,-R, -Wl,-rpath,; do ++ LDFLAGS="$boost_save_LDFLAGS -L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" ++ LIBS="$boost_save_LIBS $Boost_lib_LIBS" ++ _BOOST_AC_LINK_IFELSE([], ++ [boost_rpath_link_ldflag_found=yes ++ break], ++ [boost_rpath_link_ldflag_found=no]) ++ done ++ ;; ++ esac ++ AS_IF([test "x$boost_rpath_link_ldflag_found" != "xyes"], ++ [AC_MSG_ERROR([Unable to determine whether to use -R or -rpath])]) ++ LDFLAGS=$boost_save_LDFLAGS ++ LIBS=$boost_save_LIBS ++ ]) ++ test x"$boost_ldpath" != x && ++ Boost_lib_LDFLAGS="-L$boost_ldpath $boost_cv_rpath_link_ldflag$boost_ldpath" + Boost_lib_LDPATH="$boost_ldpath" +- break 6 ++ break 7 + else + boost_failed_libs="$boost_failed_libs@$boost_lib@" + fi +@@ -415,25 +505,10 @@ done + done + done + done ++done # boost_lib_ + rm -f conftest.$ac_objext + ]) +-case $Boost_lib in #( +- no) _AC_MSG_LOG_CONFTEST +- AC_MSG_ERROR([cannot find the flags to link with Boost $1]) +- ;; +-esac +-AC_SUBST(AS_TR_CPP([BOOST_$1_LDFLAGS]), [$Boost_lib_LDFLAGS])dnl +-AC_SUBST(AS_TR_CPP([BOOST_$1_LDPATH]), [$Boost_lib_LDPATH])dnl +-AC_SUBST([BOOST_LDPATH], [$Boost_lib_LDPATH])dnl +-AC_SUBST(AS_TR_CPP([BOOST_$1_LIBS]), [$Boost_lib_LIBS])dnl +-CPPFLAGS=$boost_save_CPPFLAGS +-AS_VAR_POPDEF([Boost_lib])dnl +-AS_VAR_POPDEF([Boost_lib_LDFLAGS])dnl +-AS_VAR_POPDEF([Boost_lib_LDPATH])dnl +-AS_VAR_POPDEF([Boost_lib_LIBS])dnl +-AC_LANG_POP([C++])dnl +-fi +-])# BOOST_FIND_LIB ++ + + + # --------------------------------------- # +@@ -475,20 +550,20 @@ BOOST_FIND_HEADER([boost/asio.hpp])]) + + # BOOST_BIND() + # ------------ +-# Look for Boost.Bind ++# Look for Boost.Bind. + BOOST_DEFUN([Bind], + [BOOST_FIND_HEADER([boost/bind.hpp])]) + + + # BOOST_CHRONO() +-# ------------------ +-# Look for Boost.Chrono ++# -------------- ++# Look for Boost.Chrono. + BOOST_DEFUN([Chrono], + [# Do we have to check for Boost.System? This link-time dependency was + # added as of 1.35.0. If we have a version <1.35, we must not attempt to + # find Boost.System as it didn't exist by then. + if test $boost_major_version -ge 135; then +-BOOST_SYSTEM([$1]) ++ BOOST_SYSTEM([$1]) + fi # end of the Boost.System check. + boost_filesystem_save_LIBS=$LIBS + boost_filesystem_save_LDFLAGS=$LDFLAGS +@@ -499,14 +574,40 @@ BOOST_FIND_LIB([chrono], [$1], + [boost/chrono.hpp], + [boost::chrono::thread_clock d;]) + if test $enable_static_boost = yes && test $boost_major_version -ge 135; then +- AC_SUBST([BOOST_FILESYSTEM_LIBS], ["$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"]) ++ BOOST_CHRONO_LIBS="$BOOST_CHRONO_LIBS $BOOST_SYSTEM_LIBS" + fi + LIBS=$boost_filesystem_save_LIBS + LDFLAGS=$boost_filesystem_save_LDFLAGS +- + ])# BOOST_CHRONO + + ++# BOOST_CONTEXT([PREFERRED-RT-OPT]) ++# ----------------------------------- ++# Look for Boost.Context. For the documentation of PREFERRED-RT-OPT, see the ++# documentation of BOOST_FIND_LIB above. This library was introduced in Boost ++# 1.51.0 ++BOOST_DEFUN([Context], ++[BOOST_FIND_LIB([context], [$1], ++ [boost/context/all.hpp],[[ ++// creates a stack ++void * stack_pointer = new void*[4096]; ++std::size_t const size = sizeof(void*[4096]); ++ ++// context fc uses f() as context function ++// fcontext_t is placed on top of context stack ++// a pointer to fcontext_t is returned ++fc = ctx::make_fcontext(stack_pointer, size, f); ++return ctx::jump_fcontext(&fcm, fc, 3) == 6;]],[dnl ++namespace ctx = boost::context; ++// context ++static ctx::fcontext_t fcm, *fc; ++// context-function ++static void f(intptr_t i) { ++ ctx::jump_fcontext(fc, &fcm, i * 2); ++}]) ++])# BOOST_CONTEXT ++ ++ + # BOOST_CONVERSION() + # ------------------ + # Look for Boost.Conversion (cast / lexical_cast) +@@ -516,6 +617,52 @@ BOOST_FIND_HEADER([boost/lexical_cast.hp + ])# BOOST_CONVERSION + + ++# BOOST_COROUTINE([PREFERRED-RT-OPT]) ++# ----------------------------------- ++# Look for Boost.Coroutine. For the documentation of PREFERRED-RT-OPT, see the ++# documentation of BOOST_FIND_LIB above. This library was introduced in Boost ++# 1.53.0 ++BOOST_DEFUN([Coroutine], ++[ ++boost_coroutine_save_LIBS=$LIBS ++boost_coroutine_save_LDFLAGS=$LDFLAGS ++# Link-time dependency from coroutine to context ++BOOST_CONTEXT([$1]) ++# Starting from Boost 1.55 a dependency on Boost.System is added ++if test $boost_major_version -ge 155; then ++ BOOST_SYSTEM([$1]) ++fi ++m4_pattern_allow([^BOOST_(CONTEXT|SYSTEM)_(LIBS|LDFLAGS)]) ++LIBS="$LIBS $BOOST_CONTEXT_LIBS $BOOST_SYSTEM_LIBS" ++LDFLAGS="$LDFLAGS $BOOST_CONTEXT_LDFLAGS" ++ ++BOOST_FIND_LIB([coroutine], [$1], ++ [boost/coroutine/coroutine.hpp], ++ [boost::coroutines::coroutine< int(int) > coro; coro.empty();]) ++ ++# Link-time dependency from coroutine to context, existed only in 1.53, in 1.54 ++# coroutine doesn't use context from its headers but from its library. ++if test $boost_major_version -eq 153 || test $enable_static_boost = yes && test $boost_major_version -ge 154; then ++ BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_CONTEXT_LIBS" ++ BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_CONTEXT_LDFLAGS" ++fi ++if test $enable_static_boost = yes && test $boost_major_version -ge 155; then ++ BOOST_COROUTINE_LIBS="$BOOST_COROUTINE_LIBS $BOOST_SYSTEM_LIBS" ++ BOOST_COROUTINE_LDFLAGS="$BOOST_COROUTINE_LDFLAGS $BOOST_SYSTEM_LDFLAGS" ++fi ++LIBS=$boost_coroutine_save_LIBS ++LDFLAGS=$boost_coroutine_save_LDFLAGS ++])# BOOST_COROUTINE ++ ++ ++# BOOST_CRC() ++# ----------- ++# Look for Boost.CRC ++BOOST_DEFUN([CRC], ++[BOOST_FIND_HEADER([boost/crc.hpp]) ++])# BOOST_CRC ++ ++ + # BOOST_DATE_TIME([PREFERRED-RT-OPT]) + # ----------------------------------- + # Look for Boost.Date_Time. For the documentation of PREFERRED-RT-OPT, see the +@@ -538,7 +685,7 @@ BOOST_DEFUN([Filesystem], + # added as of 1.35.0. If we have a version <1.35, we must not attempt to + # find Boost.System as it didn't exist by then. + if test $boost_major_version -ge 135; then +-BOOST_SYSTEM([$1]) ++ BOOST_SYSTEM([$1]) + fi # end of the Boost.System check. + boost_filesystem_save_LIBS=$LIBS + boost_filesystem_save_LDFLAGS=$LDFLAGS +@@ -548,23 +695,34 @@ LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" + BOOST_FIND_LIB([filesystem], [$1], + [boost/filesystem/path.hpp], [boost::filesystem::path p;]) + if test $enable_static_boost = yes && test $boost_major_version -ge 135; then +- AC_SUBST([BOOST_FILESYSTEM_LIBS], ["$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS"]) ++ BOOST_FILESYSTEM_LIBS="$BOOST_FILESYSTEM_LIBS $BOOST_SYSTEM_LIBS" + fi + LIBS=$boost_filesystem_save_LIBS + LDFLAGS=$boost_filesystem_save_LDFLAGS + ])# BOOST_FILESYSTEM + + ++# BOOST_FLYWEIGHT() ++# ----------------- ++# Look for Boost.Flyweight. ++BOOST_DEFUN([Flyweight], ++[dnl There's a hidden dependency on pthreads. ++AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl ++BOOST_FIND_HEADER([boost/flyweight.hpp]) ++AC_SUBST([BOOST_FLYWEIGHT_LIBS], [$boost_cv_pthread_flag]) ++]) ++ ++ + # BOOST_FOREACH() + # --------------- +-# Look for Boost.Foreach ++# Look for Boost.Foreach. + BOOST_DEFUN([Foreach], + [BOOST_FIND_HEADER([boost/foreach.hpp])]) + + + # BOOST_FORMAT() + # -------------- +-# Look for Boost.Format ++# Look for Boost.Format. + # Note: we can't check for boost/format/format_fwd.hpp because the header isn't + # standalone. It can't be compiled because it triggers the following error: + # boost/format/detail/config_macros.hpp:88: error: 'locale' in namespace 'std' +@@ -580,6 +738,14 @@ BOOST_DEFUN([Function], + [BOOST_FIND_HEADER([boost/function.hpp])]) + + ++# BOOST_GEOMETRY() ++# ---------------- ++# Look for Boost.Geometry (new since 1.47.0). ++BOOST_DEFUN([Geometry], ++[BOOST_FIND_HEADER([boost/geometry.hpp]) ++])# BOOST_GEOMETRY ++ ++ + # BOOST_GRAPH([PREFERRED-RT-OPT]) + # ------------------------------- + # Look for Boost.Graphs. For the documentation of PREFERRED-RT-OPT, see the +@@ -615,9 +781,18 @@ BOOST_DEFUN([Lambda], + [BOOST_FIND_HEADER([boost/lambda/lambda.hpp])]) + + ++# BOOST_LOCALE() ++# -------------- ++# Look for Boost.Locale ++BOOST_DEFUN([Locale], ++[BOOST_FIND_LIB([locale], [$1], ++ [boost/locale.hpp], ++ [[boost::locale::generator gen; std::locale::global(gen(""));]]) ++])# BOOST_LOCALE ++ + # BOOST_LOG([PREFERRED-RT-OPT]) + # ----------------------------- +-# Look for Boost.Log For the documentation of PREFERRED-RT-OPT, see the ++# Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the + # documentation of BOOST_FIND_LIB above. + BOOST_DEFUN([Log], + [BOOST_FIND_LIB([log], [$1], +@@ -628,12 +803,12 @@ BOOST_DEFUN([Log], + + # BOOST_LOG_SETUP([PREFERRED-RT-OPT]) + # ----------------------------------- +-# Look for Boost.Log For the documentation of PREFERRED-RT-OPT, see the ++# Look for Boost.Log. For the documentation of PREFERRED-RT-OPT, see the + # documentation of BOOST_FIND_LIB above. + BOOST_DEFUN([Log_Setup], + [AC_REQUIRE([BOOST_LOG])dnl + BOOST_FIND_LIB([log_setup], [$1], +- [boost/log/utility/init/from_settings.hpp], ++ [boost/log/utility/setup/from_settings.hpp], + [boost::log::basic_settings bs; bs.empty();]) + ])# BOOST_LOG_SETUP + +@@ -650,6 +825,29 @@ BOOST_DEFUN([Math], + [BOOST_FIND_HEADER([boost/math/special_functions.hpp])]) + + ++# BOOST_MPI([PREFERRED-RT-OPT]) ++# ------------------------------- ++# Look for Boost MPI. For the documentation of PREFERRED-RT-OPT, see the ++# documentation of BOOST_FIND_LIB above. Uses MPICXX variable if it is ++# set, otherwise tries CXX ++# ++BOOST_DEFUN([MPI], ++[boost_save_CXX=${CXX} ++boost_save_CXXCPP=${CXXCPP} ++if test x"${MPICXX}" != x; then ++ CXX=${MPICXX} ++ CXXCPP="${MPICXX} -E" ++fi ++BOOST_FIND_LIB([mpi], [$1], ++ [boost/mpi.hpp], ++ [int argc = 0; ++ char **argv = 0; ++ boost::mpi::environment env(argc,argv);]) ++CXX=${boost_save_CXX} ++CXXCPP=${boost_save_CXXCPP} ++])# BOOST_MPI ++ ++ + # BOOST_MULTIARRAY() + # ------------------ + # Look for Boost.MultiArray +@@ -657,6 +855,14 @@ BOOST_DEFUN([MultiArray], + [BOOST_FIND_HEADER([boost/multi_array.hpp])]) + + ++# BOOST_NUMERIC_UBLAS() ++# -------------------------- ++# Look for Boost.NumericUblas (Basic Linear Algebra) ++BOOST_DEFUN([Numeric_Ublas], ++[BOOST_FIND_HEADER([boost/numeric/ublas/vector.hpp]) ++])# BOOST_NUMERIC_UBLAS ++ ++ + # BOOST_NUMERIC_CONVERSION() + # -------------------------- + # Look for Boost.NumericConversion (policy-based numeric conversion) +@@ -679,6 +885,12 @@ BOOST_DEFUN([Preprocessor], + [BOOST_FIND_HEADER([boost/preprocessor/repeat.hpp])]) + + ++# BOOST_RANGE() ++# -------------------- ++# Look for Boost.Range ++BOOST_DEFUN([Range], ++[BOOST_FIND_HEADER([boost/range/adaptors.hpp])]) ++ + # BOOST_UNORDERED() + # ----------------- + # Look for Boost.Unordered +@@ -725,9 +937,9 @@ BOOST_DEFUN([Python], + _BOOST_PYTHON_CONFIG([LDFLAGS], [ldflags]) + _BOOST_PYTHON_CONFIG([LIBS], [libs]) + m4_pattern_allow([^BOOST_PYTHON_MODULE$])dnl +-BOOST_FIND_LIB([python], [$1], +- [boost/python.hpp], +- [], [BOOST_PYTHON_MODULE(empty) {}]) ++BOOST_FIND_LIBS([python], [python python3], [$1], ++ [boost/python.hpp], ++ [], [BOOST_PYTHON_MODULE(empty) {}]) + CPPFLAGS=$boost_python_save_CPPFLAGS + LDFLAGS=$boost_python_save_LDFLAGS + LIBS=$boost_python_save_LIBS +@@ -774,17 +986,13 @@ BOOST_DEFUN([Signals], + [boost::signal s;]) + ])# BOOST_SIGNALS + ++ + # BOOST_SIGNALS2() +-# ----------------- +-# Look for Boost.Signals2 ++# ---------------- ++# Look for Boost.Signals2 (new since 1.39.0). + BOOST_DEFUN([Signals2], +-[BOOST_FIND_HEADER([boost/signals2.hpp])]) +- +-# BOOST_CRC() +-# ----------------- +-# Look for Boost.CRC +-BOOST_DEFUN([CRC], +-[BOOST_FIND_HEADER([boost/crc.hpp])]) ++[BOOST_FIND_HEADER([boost/signals2.hpp]) ++])# BOOST_SIGNALS2 + + + # BOOST_SMART_PTR() +@@ -837,19 +1045,18 @@ BOOST_FIND_LIB([unit_test_framework], [$ + ])# BOOST_TEST + + +-# BOOST_THREADS([PREFERRED-RT-OPT]) ++# BOOST_THREAD([PREFERRED-RT-OPT]) + # --------------------------------- + # Look for Boost.Thread. For the documentation of PREFERRED-RT-OPT, see the + # documentation of BOOST_FIND_LIB above. +-# FIXME: Provide an alias "BOOST_THREAD". +-BOOST_DEFUN([Threads], ++BOOST_DEFUN([Thread], + [dnl Having the pthread flag is required at least on GCC3 where + dnl boost/thread.hpp would complain if we try to compile without + dnl -pthread on GNU/Linux. + AC_REQUIRE([_BOOST_PTHREAD_FLAG])dnl +-boost_threads_save_LIBS=$LIBS +-boost_threads_save_LDFLAGS=$LDFLAGS +-boost_threads_save_CPPFLAGS=$CPPFLAGS ++boost_thread_save_LIBS=$LIBS ++boost_thread_save_LDFLAGS=$LDFLAGS ++boost_thread_save_CPPFLAGS=$CPPFLAGS + # Link-time dependency from thread to system was added as of 1.49.0. + if test $boost_major_version -ge 149; then + BOOST_SYSTEM([$1]) +@@ -857,36 +1064,26 @@ fi # end of the Boost.System check. + m4_pattern_allow([^BOOST_SYSTEM_(LIBS|LDFLAGS)$])dnl + LIBS="$LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag" + LDFLAGS="$LDFLAGS $BOOST_SYSTEM_LDFLAGS" +-# Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3, +-# boost/thread.hpp will trigger a #error if -pthread isn't used: +-# boost/config/requires_threads.hpp:47:5: #error "Compiler threading support +-# is not turned on. Please set the correct command line options for +-# threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" + CPPFLAGS="$CPPFLAGS $boost_cv_pthread_flag" + + # When compiling for the Windows platform, the threads library is named + # differently. + case $host_os in +- (*mingw*) +- BOOST_FIND_LIB([thread_win32], [$1], +- [boost/thread.hpp], [boost::thread t; boost::mutex m;]) +- BOOST_THREAD_LDFLAGS=$BOOST_THREAD_WIN32_LDFLAGS +- BOOST_THREAD_LDPATH=$BOOST_THREAD_WIN32_LDPATH +- BOOST_THREAD_LIBS=$BOOST_THREAD_WIN32_LIBS +- ;; +- (*) +- BOOST_FIND_LIB([thread], [$1], +- [boost/thread.hpp], [boost::thread t; boost::mutex m;]) +- ;; ++ (*mingw*) boost_thread_lib_ext=_win32;; + esac ++BOOST_FIND_LIBS([thread], [thread$boost_thread_lib_ext], ++ [$1], ++ [boost/thread.hpp], [boost::thread t; boost::mutex m;]) + + BOOST_THREAD_LIBS="$BOOST_THREAD_LIBS $BOOST_SYSTEM_LIBS $boost_cv_pthread_flag" + BOOST_THREAD_LDFLAGS="$BOOST_SYSTEM_LDFLAGS" + BOOST_CPPFLAGS="$BOOST_CPPFLAGS $boost_cv_pthread_flag" +-LIBS=$boost_threads_save_LIBS +-LDFLAGS=$boost_threads_save_LDFLAGS +-CPPFLAGS=$boost_threads_save_CPPFLAGS +-])# BOOST_THREADS ++LIBS=$boost_thread_save_LIBS ++LDFLAGS=$boost_thread_save_LDFLAGS ++CPPFLAGS=$boost_thread_save_CPPFLAGS ++])# BOOST_THREAD ++ ++AU_ALIAS([BOOST_THREADS], [BOOST_THREAD]) + + + # BOOST_TOKENIZER() +@@ -935,10 +1132,23 @@ BOOST_DEFUN([Variant], + BOOST_FIND_HEADER([boost/variant.hpp])]) + + ++# BOOST_POINTER_CONTAINER() ++# ------------------------ ++# Look for Boost.PointerContainer ++BOOST_DEFUN([Pointer_Container], ++[BOOST_FIND_HEADER([boost/ptr_container/ptr_deque.hpp]) ++BOOST_FIND_HEADER([boost/ptr_container/ptr_list.hpp]) ++BOOST_FIND_HEADER([boost/ptr_container/ptr_vector.hpp]) ++BOOST_FIND_HEADER([boost/ptr_container/ptr_array.hpp]) ++BOOST_FIND_HEADER([boost/ptr_container/ptr_set.hpp]) ++BOOST_FIND_HEADER([boost/ptr_container/ptr_map.hpp]) ++])# BOOST_POINTER_CONTAINER ++ ++ + # BOOST_WAVE([PREFERRED-RT-OPT]) + # ------------------------------ + # NOTE: If you intend to use Wave/Spirit with thread support, make sure you +-# call BOOST_THREADS first. ++# call BOOST_THREAD first. + # Look for Boost.Wave. For the documentation of PREFERRED-RT-OPT, see the + # documentation of BOOST_FIND_LIB above. + BOOST_DEFUN([Wave], +@@ -973,8 +1183,16 @@ BOOST_DEFUN([Xpressive], + + # _BOOST_PTHREAD_FLAG() + # --------------------- +-# Internal helper for BOOST_THREADS. Based on ACX_PTHREAD: +-# http://autoconf-archive.cryp.to/acx_pthread.html ++# Internal helper for BOOST_THREAD. Computes boost_cv_pthread_flag ++# which must be used in CPPFLAGS and LIBS. ++# ++# Yes, we *need* to put the -pthread thing in CPPFLAGS because with GCC3, ++# boost/thread.hpp will trigger a #error if -pthread isn't used: ++# boost/config/requires_threads.hpp:47:5: #error "Compiler threading support ++# is not turned on. Please set the correct command line options for ++# threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" ++# ++# Based on ACX_PTHREAD: http://autoconf-archive.cryp.to/acx_pthread.html + AC_DEFUN([_BOOST_PTHREAD_FLAG], + [AC_REQUIRE([AC_PROG_CXX])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl +@@ -1042,6 +1260,14 @@ AC_LANG_POP([C++])dnl + m4_define([_BOOST_gcc_test], + ["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC @ gcc$1$2"])dnl + ++# _BOOST_mingw_test(MAJOR, MINOR) ++# ----------------------------- ++# Internal helper for _BOOST_FIND_COMPILER_TAG. ++m4_define([_BOOST_mingw_test], ++["defined __GNUC__ && __GNUC__ == $1 && __GNUC_MINOR__ == $2 && !defined __ICC && \ ++ (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ ++ || defined __WIN32__ || defined __WINNT || defined __WINNT__) @ mgw$1$2"])dnl ++ + + # _BOOST_FIND_COMPILER_TAG() + # -------------------------- +@@ -1051,7 +1277,8 @@ m4_define([_BOOST_gcc_test], + AC_DEFUN([_BOOST_FIND_COMPILER_TAG], + [AC_REQUIRE([AC_PROG_CXX])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl +-AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], [boost_cv_lib_tag], ++AC_CACHE_CHECK([for the toolset name used by Boost for $CXX], ++ [boost_cv_lib_tag], + [boost_cv_lib_tag=unknown + if test x$boost_cv_inc_path != xno; then + AC_LANG_PUSH([C++])dnl +@@ -1069,14 +1296,31 @@ if test x$boost_cv_inc_path != xno; then + # I'm not sure about my test for `il' (be careful: Intel's ICC pre-defines + # the same defines as GCC's). + for i in \ ++ _BOOST_mingw_test(5, 1) \ ++ _BOOST_gcc_test(5, 1) \ ++ _BOOST_mingw_test(5, 0) \ ++ _BOOST_gcc_test(5, 0) \ ++ _BOOST_mingw_test(4, 10) \ ++ _BOOST_gcc_test(4, 10) \ ++ _BOOST_mingw_test(4, 9) \ ++ _BOOST_gcc_test(4, 9) \ ++ _BOOST_mingw_test(4, 8) \ + _BOOST_gcc_test(4, 8) \ ++ _BOOST_mingw_test(4, 7) \ + _BOOST_gcc_test(4, 7) \ ++ _BOOST_mingw_test(4, 6) \ + _BOOST_gcc_test(4, 6) \ ++ _BOOST_mingw_test(4, 5) \ + _BOOST_gcc_test(4, 5) \ ++ _BOOST_mingw_test(4, 4) \ + _BOOST_gcc_test(4, 4) \ ++ _BOOST_mingw_test(4, 3) \ + _BOOST_gcc_test(4, 3) \ ++ _BOOST_mingw_test(4, 2) \ + _BOOST_gcc_test(4, 2) \ ++ _BOOST_mingw_test(4, 1) \ + _BOOST_gcc_test(4, 1) \ ++ _BOOST_mingw_test(4, 0) \ + _BOOST_gcc_test(4, 0) \ + "defined __GNUC__ && __GNUC__ == 3 && !defined __ICC \ + && (defined WIN32 || defined WINNT || defined _WIN32 || defined __WIN32 \ +@@ -1142,6 +1386,7 @@ fi])dnl end of AC_CACHE_CHECK + # Thread) flavors of Boost. Sets boost_guess_use_mt accordingly. + AC_DEFUN([_BOOST_GUESS_WHETHER_TO_USE_MT], + [# Check whether we do better use `mt' even though we weren't ask to. ++AC_LANG_PUSH([C++])dnl + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + #if defined _REENTRANT || defined _MT || defined __MT__ + /* use -mt */ +@@ -1149,6 +1394,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + # error MT not needed + #endif + ]])], [boost_guess_use_mt=:], [boost_guess_use_mt=false]) ++AC_LANG_POP([C++])dnl + ]) + + # _BOOST_AC_LINK_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +@@ -1172,11 +1418,11 @@ boost_use_source=: + test -f conftest.$ac_objext && ac_ext=$ac_objext && boost_use_source=false && + _AS_ECHO_LOG([re-using the existing conftest.$ac_objext]) + AS_IF([_AC_DO_STDERR($ac_link) && { +- test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || +- test ! -s conftest.err ++ test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || ++ test ! -s conftest.err + } && test -s conftest$ac_exeext && { +- test "$cross_compiling" = yes || +- $as_executable_p conftest$ac_exeext ++ test "$cross_compiling" = yes || ++ $as_executable_p conftest$ac_exeext + dnl FIXME: use AS_TEST_X instead when 2.61 is widespread enough. + }], + [$2], diff --git a/package/cc-tool/Config.in b/package/cc-tool/Config.in new file mode 100644 index 0000000000..f8e4531e26 --- /dev/null +++ b/package/cc-tool/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_CC_TOOL + bool "cc-tool" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on BR2_USE_WCHAR # boost-filesystem + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS + select BR2_PACKAGE_BOOST_SYSTEM + select BR2_PACKAGE_BOOST_REGEX + select BR2_PACKAGE_BOOST_FILESYSTEM + select BR2_PACKAGE_BOOST_SIGNALS + help + cc-tool provides support for Texas Instruments CC Debugger + for Linux OS in order to program 8051-based System-On-Chip + devices: CC254x CC253x CC243x CC251x CC111x + + http://sourceforge.net/projects/cctool/ + +comment "cc-tool needs a toolchain w/ C++, threads, wchar" + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/cc-tool/cc-tool.hash b/package/cc-tool/cc-tool.hash new file mode 100644 index 0000000000..81844eec82 --- /dev/null +++ b/package/cc-tool/cc-tool.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/cctool/files/ +sha1 f313e55f019ea5338438633f5b5e689b699343e1 cc-tool-0.26-src.tgz +md5 26960676f3e6264e612c299fbf8ec5ea cc-tool-0.26-src.tgz diff --git a/package/cc-tool/cc-tool.mk b/package/cc-tool/cc-tool.mk new file mode 100644 index 0000000000..d8df0415c0 --- /dev/null +++ b/package/cc-tool/cc-tool.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# cc-tool +# +################################################################################ + +CC_TOOL_VERSION = 0.26 +CC_TOOL_SITE = http://downloads.sourceforge.net/project/cctool +CC_TOOL_SOURCE = cc-tool-$(CC_TOOL_VERSION)-src.tgz +CC_TOOL_LICENSE = GPLv2 +CC_TOOL_LICENSE_FILES = COPYING +CC_TOOL_DEPENDENCIES = boost libusb + +# we're patching boost.m4 +CC_TOOL_AUTORECONF = YES + +# Configure script "discovers" boost in /usr/local if not given explicitly +CC_TOOL_CONF_OPTS = --with-boost=$(STAGING_DIR)/usr + +# Help boost.m4 find the Boost Regex library, which needs the pthread +# library, but isn't detected using a modern (pkg-config) mechanism. +ifeq ($(BR2_STATIC_LIBS),y) +CC_TOOL_CONF_ENV += LIBS="-lpthread" +endif + +$(eval $(autotools-package)) diff --git a/package/ccache/ccache.hash b/package/ccache/ccache.hash new file mode 100644 index 0000000000..7e616cece7 --- /dev/null +++ b/package/ccache/ccache.hash @@ -0,0 +1,2 @@ +# Verified key https://samba.org/ftp/ccache/ccache-3.2.5.tar.xz.asc - sha256 computed locally +sha256 117011534b199dbe290b08acae1591c81525536a1e140da22e0fbc04c20bab85 ccache-3.2.5.tar.xz diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk new file mode 100644 index 0000000000..c4f0310486 --- /dev/null +++ b/package/ccache/ccache.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# ccache +# +################################################################################ + +CCACHE_VERSION = 3.2.5 +CCACHE_SITE = https://samba.org/ftp/ccache +CCACHE_SOURCE = ccache-$(CCACHE_VERSION).tar.xz +CCACHE_LICENSE = GPLv3+, others +CCACHE_LICENSE_FILES = LICENSE.txt GPL-3.0.txt + +# Force ccache to use its internal zlib. The problem is that without +# this, ccache would link against the zlib of the build system, but we +# might build and install a different version of zlib in $(O)/host +# afterwards, which ccache will pick up. This might break if there is +# a version mismatch. A solution would be to add host-zlib has a +# dependency of ccache, but it would require tuning the zlib .mk file +# to use HOSTCC_NOCCACHE as the compiler. Instead, we take the easy +# path: tell ccache to use its internal copy of zlib, so that ccache +# has zero dependency besides the C library. +HOST_CCACHE_CONF_OPTS += --with-bundled-zlib + +# Patch host-ccache as follows: +# - Use BR_CACHE_DIR instead of CCACHE_DIR, because CCACHE_DIR +# is already used by autotargets for the ccache package. +# BR_CACHE_DIR is exported by Makefile based on config option +# BR2_CCACHE_DIR. +# - Change hard-coded last-ditch default to match path in .config, to avoid +# the need to specify BR_CACHE_DIR when invoking ccache directly. +define HOST_CCACHE_PATCH_CONFIGURATION + sed -i 's,getenv("CCACHE_DIR"),getenv("BR_CACHE_DIR"),' $(@D)/ccache.c + sed -i 's,"%s/.ccache","$(BR_CACHE_DIR)",' $(@D)/conf.c +endef + +HOST_CCACHE_POST_PATCH_HOOKS += HOST_CCACHE_PATCH_CONFIGURATION + +define HOST_CCACHE_MAKE_CACHE_DIR + mkdir -p $(BR_CACHE_DIR) +endef + +HOST_CCACHE_POST_INSTALL_HOOKS += HOST_CCACHE_MAKE_CACHE_DIR + +# Provide capability to do initial ccache setup (e.g. increase default size) +BR_CCACHE_INITIAL_SETUP = $(call qstrip,$(BR2_CCACHE_INITIAL_SETUP)) +ifneq ($(BR_CCACHE_INITIAL_SETUP),) +define HOST_CCACHE_DO_INITIAL_SETUP + @$(call MESSAGE,"Applying initial settings") + $(CCACHE) $(BR_CCACHE_INITIAL_SETUP) + $(CCACHE) -s +endef + +HOST_CCACHE_POST_INSTALL_HOOKS += HOST_CCACHE_DO_INITIAL_SETUP +endif + +$(eval $(host-autotools-package)) + +ifeq ($(BR2_CCACHE),y) +ccache-stats: host-ccache + $(Q)$(CCACHE) -s + +ccache-options: host-ccache +ifeq ($(CCACHE_OPTIONS),) + $(Q)echo "Usage: make ccache-options CCACHE_OPTIONS=\"opts\"" + $(Q)echo "where 'opts' corresponds to one or more valid ccache options" \ + "(see ccache help text below)" + $(Q)echo +endif + $(Q)$(CCACHE) $(CCACHE_OPTIONS) +endif diff --git a/package/ccid/Config.in b/package/ccid/Config.in new file mode 100644 index 0000000000..f5bb5830bb --- /dev/null +++ b/package/ccid/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_CCID + bool "ccid" + select BR2_PACKAGE_PCSC_LITE + select BR2_PACKAGE_LIBUSB + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + depends on BR2_USE_MMU # pcsc-lite + depends on !BR2_STATIC_LIBS # pcsc-lite + help + PC/SC driver for USB CCID smart card readers + + http://pcsclite.alioth.debian.org/ccid.html + +comment "ccid needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/ccid/ccid.hash b/package/ccid/ccid.hash new file mode 100644 index 0000000000..a0e91da46d --- /dev/null +++ b/package/ccid/ccid.hash @@ -0,0 +1,2 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/ccid/ccid_1.4.18-1.dsc +sha256 5fdba97a2d2eb1c652b7dd4aa0bb8cee4814bab0cf61aecb84b32b57272541aa ccid_1.4.18.orig.tar.bz2 diff --git a/package/ccid/ccid.mk b/package/ccid/ccid.mk new file mode 100644 index 0000000000..18653d3518 --- /dev/null +++ b/package/ccid/ccid.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# ccid +# +################################################################################ + +CCID_VERSION = 1.4.18 +CCID_SOURCE = ccid_$(CCID_VERSION).orig.tar.bz2 +CCID_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/ccid +CCID_LICENSE = LGPLv2.1+ +CCID_LICENSE_FILES = COPYING +CCID_INSTALL_STAGING = YES +CCID_DEPENDENCIES = pcsc-lite host-pkgconf libusb + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +define CCID_INSTALL_UDEV_RULES + if test -d $(TARGET_DIR)/etc/udev/rules.d ; then \ + cp $(@D)/src/92_pcscd_ccid.rules $(TARGET_DIR)/etc/udev/rules.d/ ; \ + fi; +endef + +CCID_POST_INSTALL_TARGET_HOOKS += CCID_INSTALL_UDEV_RULES +endif + +$(eval $(autotools-package)) diff --git a/package/ccrypt/Config.in b/package/ccrypt/Config.in new file mode 100644 index 0000000000..ef5a7eef65 --- /dev/null +++ b/package/ccrypt/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_CCRYPT + bool "ccrypt" + help + ccrypt is a utility for encrypting and decrypting files and streams. + + http://ccrypt.sourceforge.net/ diff --git a/package/ccrypt/ccrypt.hash b/package/ccrypt/ccrypt.hash new file mode 100644 index 0000000000..a93fcb9afa --- /dev/null +++ b/package/ccrypt/ccrypt.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 87d66da2170facabf6f2fc073586ae2c7320d4689980cfca415c74688e499ba0 ccrypt-1.10.tar.gz diff --git a/package/ccrypt/ccrypt.mk b/package/ccrypt/ccrypt.mk new file mode 100644 index 0000000000..3beff4084b --- /dev/null +++ b/package/ccrypt/ccrypt.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# ccrypt +# +################################################################################ + +CCRYPT_VERSION = 1.10 +CCRYPT_SITE = http://ccrypt.sourceforge.net/download + +CCRYPT_LICENSE = GPLv2+ +CCRYPT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/cdrkit/0001-no-rcmd.patch b/package/cdrkit/0001-no-rcmd.patch new file mode 100644 index 0000000000..294779f7a5 --- /dev/null +++ b/package/cdrkit/0001-no-rcmd.patch @@ -0,0 +1,22 @@ +[PATCH] fix build with uClibc + +cdrkit unconditionally enables code using rcmd(3), which isn't available +on uClibc. + +Signed-off-by: Peter Korsgaard +--- + include/xconfig.h.in | 1 - + 1 file changed, 1 deletion(-) + +Index: cdrkit-1.1.10/include/xconfig.h.in +=================================================================== +--- cdrkit-1.1.10.orig/include/xconfig.h.in ++++ cdrkit-1.1.10/include/xconfig.h.in +@@ -187,7 +187,6 @@ + * they are placed before the large file tests. + */ + +-#define HAVE_RCMD 1 /* rcmd() is present in libc/libsocket */ + #define HAVE_SOCKET 1 /* socket() is present in libc/libsocket */ + #define HAVE_SOCKETPAIR 1 /* socketpair() is present in libc/libsocket */ + #define HAVE_GETSERVBYNAME 1 /* getservbyname() is present in libc/libsocket */ diff --git a/package/cdrkit/0002-define-__THROW-to-avoid-build-issue-with-musl.patch b/package/cdrkit/0002-define-__THROW-to-avoid-build-issue-with-musl.patch new file mode 100644 index 0000000000..2e0f6d52e3 --- /dev/null +++ b/package/cdrkit/0002-define-__THROW-to-avoid-build-issue-with-musl.patch @@ -0,0 +1,47 @@ +From 9454ef47db30caa4359766c8730d9d92f65c64f7 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 8 Aug 2015 22:58:57 +0200 +Subject: [PATCH] define __THROW to avoid build issue with musl + +Fixes: +http://autobuild.buildroot.net/results/d27/d2781e70b04a207e2e9397d888032294c7285034/build-end.log + +Signed-off-by: Romain Naour +--- + genisoimage/sha256.h | 4 ++++ + genisoimage/sha512.h | 4 ++++ + 2 files changed, 8 insertions(+) + +diff --git a/genisoimage/sha256.h b/genisoimage/sha256.h +index e7f4cb9..bcae7ef 100644 +--- a/genisoimage/sha256.h ++++ b/genisoimage/sha256.h +@@ -29,6 +29,10 @@ + #include + #include + ++/* define __THROW to avoid build issue when it's not available from the libc */ ++#ifndef __THROW ++# define __THROW ++#endif + + /* Structure to save state of computation between the single steps. */ + struct sha256_ctx +diff --git a/genisoimage/sha512.h b/genisoimage/sha512.h +index 7298355..8cee8b0 100644 +--- a/genisoimage/sha512.h ++++ b/genisoimage/sha512.h +@@ -29,6 +29,10 @@ + #include + #include + ++/* define __THROW to avoid build issue when it's not available from the libc */ ++#ifndef __THROW ++# define __THROW ++#endif + + /* Structure to save state of computation between the single steps. */ + struct sha512_ctx +-- +2.4.3 + diff --git a/package/cdrkit/Config.in b/package/cdrkit/Config.in new file mode 100644 index 0000000000..af18ba9302 --- /dev/null +++ b/package/cdrkit/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_CDRKIT + # Needed for libbz + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_LIBCAP + select BR2_PACKAGE_ZLIB + depends on BR2_USE_MMU # fork + bool "cdrkit" + help + cdrkit is a suite of programs for recording CDs and DVDs, + blanking CD-RW media, creating ISO-9660 filesystem images, + extracting audio CD data, and more. + + http://www.cdrkit.org/ diff --git a/package/cdrkit/cdrkit.hash b/package/cdrkit/cdrkit.hash new file mode 100644 index 0000000000..6ecb922df6 --- /dev/null +++ b/package/cdrkit/cdrkit.hash @@ -0,0 +1,2 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/cdrkit/cdrkit_1.1.11-3.dsc +sha256 d1c030756ecc182defee9fe885638c1785d35a2c2a297b4604c0e0dcc78e47da cdrkit_1.1.11.orig.tar.gz diff --git a/package/cdrkit/cdrkit.mk b/package/cdrkit/cdrkit.mk new file mode 100644 index 0000000000..2e4bb1fafe --- /dev/null +++ b/package/cdrkit/cdrkit.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# cdrkit +# +################################################################################ + +CDRKIT_VERSION = 1.1.11 +CDRKIT_SOURCE = cdrkit_$(CDRKIT_VERSION).orig.tar.gz +CDRKIT_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/cdrkit +CDRKIT_DEPENDENCIES = libcap bzip2 zlib +CDRKIT_LICENSE = GPLv2 +CDRKIT_LICENSE_FILES = COPYING + +ifeq ($(BR2_ENDIAN),"BIG") +CDRKIT_CONF_OPTS += -DBITFIELDS_HTOL=1 +else +CDRKIT_CONF_OPTS += -DBITFIELDS_HTOL=0 +endif + +$(eval $(cmake-package)) +$(eval $(host-cmake-package)) diff --git a/package/cegui06/0001-stddef.h.patch b/package/cegui06/0001-stddef.h.patch new file mode 100644 index 0000000000..cc16effc25 --- /dev/null +++ b/package/cegui06/0001-stddef.h.patch @@ -0,0 +1,26 @@ +includes: ptrdiff_t is defined in stddef.h + +ptrdiff_t is defined in the stddef.h header, so this +header must be included. + +Do the #include in a common header to avoid doing it +all over the place. + +Signed-off-by: "Yann E. MORIN" + +--- +Patch not sent upstream, it's a no-longer-maintained branch. +To be noted, however, is that the current devel branch is +still missing that include. + +diff -durN cegui06-0.6.2.orig/include/CEGUIBase.h cegui06-0.6.2/include/CEGUIBase.h +--- cegui06-0.6.2.orig//include/CEGUIBase.h 2008-02-11 15:38:27.000000000 +0100 ++++ cegui06-0.6.2/include/CEGUIBase.h 2012-08-19 22:51:50.260385978 +0200 +@@ -34,6 +34,7 @@ + #define _CEGUIBase_h_ + + #include ++#include + + // bring in configuration options + #include "CEGUIConfig.h" diff --git a/package/cegui06/Config.in b/package/cegui06/Config.in new file mode 100644 index 0000000000..e6a024a399 --- /dev/null +++ b/package/cegui06/Config.in @@ -0,0 +1,20 @@ +comment "cegui06 needs a toolchain w/ C++, threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS + +config BR2_PACKAGE_CEGUI06 + bool "cegui06" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_PCRE + help + Crazy Eddie's GUI System is a free library providing windowing and + widgets for graphics APIs / engines where such functionality is not + natively available, or severely lacking. The library is object + orientated, written in C++, and targeted at games developers who + should be spending their time creating great games, not building + GUI sub-systems! + + http://www.cegui.org.uk/ diff --git a/package/cegui06/cegui06.hash b/package/cegui06/cegui06.hash new file mode 100644 index 0000000000..21df3ca09f --- /dev/null +++ b/package/cegui06/cegui06.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 eb77741cd9fcc927a876e8116b98691212e973d2264e2071406423f6ca3e305f CEGUI-0.6.2b.tar.gz diff --git a/package/cegui06/cegui06.mk b/package/cegui06/cegui06.mk new file mode 100644 index 0000000000..43d3b09dd7 --- /dev/null +++ b/package/cegui06/cegui06.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# cegui06 +# +################################################################################ + +# Do not update the version, we need exactly that one for Spice. +CEGUI06_VERSION_MAJOR = 0.6.2 +CEGUI06_VERSION = $(CEGUI06_VERSION_MAJOR)b +CEGUI06_SOURCE = CEGUI-$(CEGUI06_VERSION).tar.gz +CEGUI06_SITE = http://downloads.sourceforge.net/project/crayzedsgui/CEGUI%20Mk-2/$(CEGUI06_VERSION_MAJOR) +CEGUI06_LICENSE = MIT +CEGUI06_LICENSE_FILES = COPYING +CEGUI06_INSTALL_STAGING = YES + +CEGUI06_DEPENDENCIES = \ + expat \ + freetype \ + pcre \ + +CEGUI06_CONF_OPTS = \ + --enable-expat \ + --disable-external-tinyxml \ + --disable-xerces-c \ + --disable-libxml \ + --disable-tinyxml \ + --disable-opengl-renderer \ + --disable-external-glew \ + --disable-irrlicht-renderer \ + --disable-directfb-renderer \ + --disable-samples \ + --disable-lua-module \ + --disable-toluacegui \ + --disable-external-toluapp \ + +$(eval $(autotools-package)) diff --git a/package/celt051/0001-fix-gnuc-prereq.patch b/package/celt051/0001-fix-gnuc-prereq.patch new file mode 100644 index 0000000000..8efd518d97 --- /dev/null +++ b/package/celt051/0001-fix-gnuc-prereq.patch @@ -0,0 +1,29 @@ +Fix musl build + +musl does not define __GNUC_PREREQ. Use patch from Alpine Linux +(http://git.alpinelinux.org/cgit/aports/plain/main/celt051/fix-gnuc-prereq.patch). + +Fixes http://autobuild.buildroot.net/results/223/223ba6003bdd7e0c896455c21fa8fee943b4e716/ + +Signed-off-by: Jörg Krause + +--- celt-0.5.1.3.orig/libcelt/ecintrin.h ++++ celt-0.5.1.3/libcelt/ecintrin.h +@@ -52,8 +52,7 @@ + /*Count leading zeros. + This macro should only be used for implementing ec_ilog(), if it is defined. + All other code should use EC_ILOG() instead.*/ +-#ifdef __GNUC_PREREQ +-#if __GNUC_PREREQ(3,4) ++#if defined(__GNUC__) && ((__GNUC__<<16)+__GNUC_MINOR__) >= 0x304 + # if INT_MAX>=2147483647 + # define EC_CLZ0 sizeof(unsigned)*CHAR_BIT + # define EC_CLZ(_x) (__builtin_clz(_x)) +@@ -61,7 +60,6 @@ + # define EC_CLZ0 sizeof(unsigned long)*CHAR_BIT + # define EC_CLZ(_x) (__builtin_clzl(_x)) + # endif +-#endif + #endif + + #if defined(EC_CLZ) diff --git a/package/celt051/Config.in b/package/celt051/Config.in new file mode 100644 index 0000000000..035e262d74 --- /dev/null +++ b/package/celt051/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_CELT051 + bool "celt051" + select BR2_PACKAGE_LIBOGG + help + The CELT ultra-low delay audio codec + + The CELT codec is a compression algorithm for audio. Like MP3, + Vorbis, and AAC it is suitable for transmitting music with high + quality. Unlike these formats CELT imposes very little delay on + the signal, even less than is typical for speech centric formats + like Speex, GSM, or G.729. + + Note: this is version 0.5.1.3 of celt. + + http://www.celt-codec.org/ diff --git a/package/celt051/celt051.hash b/package/celt051/celt051.hash new file mode 100644 index 0000000000..4ad212b2d3 --- /dev/null +++ b/package/celt051/celt051.hash @@ -0,0 +1,2 @@ +# From http://downloads.xiph.org/releases/celt/SHA1SUMS +sha1 eb05030108c36cb063c3f026c349f16d78e0a497 celt-0.5.1.3.tar.gz diff --git a/package/celt051/celt051.mk b/package/celt051/celt051.mk new file mode 100644 index 0000000000..9e25781873 --- /dev/null +++ b/package/celt051/celt051.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# celt +# +################################################################################ + +# Although version newer than 0.5.1.3 exists, we're +# stuck with 0.5.1.3 for use by Spice (coming later) +CELT051_VERSION = 0.5.1.3 +CELT051_SOURCE = celt-$(CELT051_VERSION).tar.gz +CELT051_SITE = http://downloads.xiph.org/releases/celt +CELT051_LICENSE = BSD-2c +CELT051_LICENSE_FILES = COPYING +CELT051_INSTALL_STAGING = YES +CELT051_DEPENDENCIES = libogg + +# Need to specify --with-ogg, otherwise /usr/lib may be searched for +# if target is the same kind as host (ie. same arch, same bitness, +# same endianness, so that /usr/lib contains libraries linkable by +# our cross-compiler) +CELT051_CONF_OPTS = \ + --enable-fixed-point \ + --disable-fixed-point-debug \ + --disable-experimental-postfilter \ + --disable-static-modes \ + --disable-assertions \ + --disable-oggtest \ + --with-ogg=$(STAGING_DIR)/usr \ + +$(eval $(autotools-package)) diff --git a/package/cgic/0001-prepare_makefile.patch b/package/cgic/0001-prepare_makefile.patch new file mode 100644 index 0000000000..15adc4cda2 --- /dev/null +++ b/package/cgic/0001-prepare_makefile.patch @@ -0,0 +1,44 @@ +Makefile: fix for cross-compilation + +Probably-Signed-off-by: Dave Bender +[yann.morin.1998@free.fr: patch was made by Dave, but he + forgot his SoB line, so I added it] +Signed-off-by: "Yann E. MORIN" +diff -rupN cgic206/Makefile cgic206-br/Makefile +--- cgic206/Makefile 2014-03-16 18:17:11.000000000 -0400 ++++ cgic206-br/Makefile 2015-01-16 11:18:03.714874000 -0500 +@@ -1,15 +1,14 @@ +-CFLAGS=-g -Wall +-CC=gcc +-AR=ar +-RANLIB=ranlib + LIBS=-L./ -lcgic + + all: libcgic.a cgictest.cgi capture + + install: libcgic.a +- cp libcgic.a /usr/local/lib +- cp cgic.h /usr/local/include +- @echo libcgic.a is in /usr/local/lib. cgic.h is in /usr/local/include. ++ cp libcgic.a $(PREFIX)/usr/lib ++ cp cgic.h $(PREFIX)/usr/include ++ @echo libcgic.a is in $(PREFIX)/usr/lib. cgic.h is in $(PREFIX)/usr/include. ++ ++cgi.o: cgic.c cgic.h ++ $(CC) $(CFLAGS) cgic.c -o cgic.o + + libcgic.a: cgic.o cgic.h + rm -f libcgic.a +@@ -19,10 +18,10 @@ libcgic.a: cgic.o cgic.h + #mingw32 and cygwin users: replace .cgi with .exe + + cgictest.cgi: cgictest.o libcgic.a +- gcc cgictest.o -o cgictest.cgi ${LIBS} ++ $(CC) cgictest.o -o cgictest.cgi ${LIBS} + + capture: capture.o libcgic.a +- gcc capture.o -o capture ${LIBS} ++ $(CC) capture.o -o capture ${LIBS} + + clean: + rm -f *.o *.a cgictest.cgi capture diff --git a/package/cgic/0002-file_enhancements.patch b/package/cgic/0002-file_enhancements.patch new file mode 100644 index 0000000000..a6f82fce33 --- /dev/null +++ b/package/cgic/0002-file_enhancements.patch @@ -0,0 +1,56 @@ +Create better temporary files. + +Probably-Signed-off-by: Dave Bender +[yann.morin.1998@free.fr: patch was made by Dave, but he + forgot his SoB line, so I added it; split the patch in two + independent fixes] +Signed-off-by: "Yann E. MORIN" + +diff -rupN cgic206/cgic.c cgic206_tempfile/cgic.c +--- cgic206/cgic.c 2014-03-16 18:17:11.000000000 -0400 ++++ cgic206_tempfile/cgic.c 2015-01-21 11:58:45.436384908 -0500 +@@ -22,6 +22,8 @@ + #define CGICDEBUGEND + #endif /* CGICDEBUG */ + ++#define _GNU_SOURCE ++ + #include + #include + #include +@@ -34,11 +36,11 @@ + #include + + /* cgic 2.01 */ +-#include + + #else + #include + #endif /* WIN32 */ ++#include + #include "cgic.h" + + #define cgiStrEq(a, b) (!strcmp((a), (b))) +@@ -636,16 +638,17 @@ static cgiParseResultType getTempFileNam + window between the file's creation and the + chmod call (glibc 2.0.6 and lower might + otherwise have allowed this). */ ++ mode_t umode; + int outfd; ++ umode = umask(0600); + strcpy(tfileName, cgicTempDir "/cgicXXXXXX"); +- outfd = mkstemp(tfileName); ++ outfd = mkostemp(tfileName, O_CLOEXEC | O_NOATIME); ++ umask(umode); + if (outfd == -1) { + return cgiParseIO; + } +- close(outfd); +- /* Fix the permissions */ +- if (chmod(tfileName, 0600) != 0) { +- unlink(tfileName); ++ ++ if (close(outfd)) { + return cgiParseIO; + } + #else diff --git a/package/cgic/0003-restore-cgiFormFileGetTempfileName.patch b/package/cgic/0003-restore-cgiFormFileGetTempfileName.patch new file mode 100644 index 0000000000..f66227b6a6 --- /dev/null +++ b/package/cgic/0003-restore-cgiFormFileGetTempfileName.patch @@ -0,0 +1,43 @@ +Restore lost functionality + +Probably-Signed-off-by: Dave Bender +[yann.morin.1998@free.fr: patch was made by Dave, but he + forgot his SoB line, so I added it] +Signed-off-by: "Yann E. MORIN" + +diff -rupN cgic206/cgic.c cgic206_tempfile/cgic.c +--- cgic206/cgic.c 2014-03-16 18:17:11.000000000 -0400 ++++ cgic206_tempfile/cgic.c 2015-01-21 11:58:45.436384908 -0500 +@@ -1278,6 +1278,20 @@ cgiFormResultType cgiFormFileContentType + } + } + ++const char* cgiFormFileGetTempfileName( ++ char* name) ++{ ++ cgiFormEntry *e; ++ e = cgiFormEntryFindFirst(name); ++ if (!e) { ++ return NULL; ++ } else if (!strlen(e->tfileName)) { ++ return NULL; ++ } else { ++ return e->tfileName; ++ } ++} ++ + cgiFormResultType cgiFormFileSize( + char *name, int *sizeP) + { +diff -rupN cgic206/cgic.h cgic206_tempfile/cgic.h +--- cgic206/cgic.h 2014-03-16 18:17:11.000000000 -0400 ++++ cgic206_tempfile/cgic.h 2015-01-21 11:53:02.915148026 -0500 +@@ -141,6 +141,8 @@ extern cgiFormResultType cgiFormRadio( + char *name, char **valuesText, int valuesTotal, + int *result, int defaultV); + ++extern const char* cgiFormFileGetTempfileName(char* name); ++ + /* The paths returned by this function are the original names of files + as reported by the uploading web browser and shoult NOT be + blindly assumed to be "safe" names for server-side use! */ diff --git a/package/cgic/Config.in b/package/cgic/Config.in new file mode 100644 index 0000000000..402460d039 --- /dev/null +++ b/package/cgic/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_CGIC + bool "cgic" + help + C CGI library + + http://www.boutell.com/cgic/ diff --git a/package/cgic/cgic.hash b/package/cgic/cgic.hash new file mode 100644 index 0000000000..6c0fee6124 --- /dev/null +++ b/package/cgic/cgic.hash @@ -0,0 +1,2 @@ +# Localy computed +sha256 9562e0b6af59ebc2090107eab5946ce0788a1de36146ad181970cf53e9be7a33 cgic206.tar.gz diff --git a/package/cgic/cgic.mk b/package/cgic/cgic.mk new file mode 100644 index 0000000000..f07c62e97e --- /dev/null +++ b/package/cgic/cgic.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# cgic +# +################################################################################ + +CGIC_VERSION = 2.06 +CGIC_SOURCE = cgic206.tar.gz +CGIC_SITE = http://boutell.com/cgic +CGIC_LICENSE = Custom +CGIC_LICENSE_FILES = license.txt + +# Installs only a static library and a header file +CGIC_INSTALL_STAGING = YES +CGIC_INSTALL_TARGET = NO + +define CGIC_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) libcgic.a +endef + +define CGIC_INSTALL_STAGING_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) PREFIX=$(STAGING_DIR) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/cgilua/Config.in b/package/cgilua/Config.in new file mode 100644 index 0000000000..d1e7fbf0e8 --- /dev/null +++ b/package/cgilua/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_CGILUA + bool "cgilua" + # Runtime dependency only + select BR2_PACKAGE_LUAFILESYSTEM + help + CGILua is a tool for creating dynamic HTML pages + and manipulating input data from Web forms. + + http://keplerproject.github.com/cgilua diff --git a/package/cgilua/cgilua.hash b/package/cgilua/cgilua.hash new file mode 100644 index 0000000000..786791d302 --- /dev/null +++ b/package/cgilua/cgilua.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 8e9ef583f8e1c5b600ebc6bb04924a61f72320130410191a9c56d7295fb02be1 cgilua-5.1.4-2.src.rock diff --git a/package/cgilua/cgilua.mk b/package/cgilua/cgilua.mk new file mode 100644 index 0000000000..5934ffda6f --- /dev/null +++ b/package/cgilua/cgilua.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# cgilua +# +################################################################################ + +CGILUA_VERSION = 5.1.4-2 +CGILUA_LICENSE = MIT + +$(eval $(luarocks-package)) diff --git a/package/cgroupfs-mount/Config.in b/package/cgroupfs-mount/Config.in new file mode 100644 index 0000000000..0b2e4ba1e7 --- /dev/null +++ b/package/cgroupfs-mount/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_CGROUPFS_MOUNT + bool "cgroupfs-mount" + depends on !BR2_INIT_SYSTEMD + help + cgroupfs mount and umount scripts. + + requires a Linux kernel >= 3.0 with the following options + enabled: + + - CONFIG_BLK_CGROUP + - CONFIG_CGROUPS + - CONFIG_CGROUP_CPUACCT + - CONFIG_CGROUP_DEVICE + - CONFIG_CGROUP_FREEZER + - CONFIG_CGROUP_WRITEBACK + - CONFIG_CGROUP_SCHED + - CONFIG_CGROUP_PIDS + + https://github.com/tianon/cgroupfs-mount diff --git a/package/cgroupfs-mount/S30cgroupfs b/package/cgroupfs-mount/S30cgroupfs new file mode 100644 index 0000000000..aa0a29b120 --- /dev/null +++ b/package/cgroupfs-mount/S30cgroupfs @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Set up cgroupfs mounts. +# + +start() { + printf "Mounting cgroupfs hierarchy: " + /usr/bin/cgroupfs-mount + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +stop() { + printf "Unmounting cgroupfs hierarchy: " + /usr/bin/cgroupfs-umount + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/cgroupfs-mount/cgroupfs-mount.hash b/package/cgroupfs-mount/cgroupfs-mount.hash new file mode 100644 index 0000000000..34f516764c --- /dev/null +++ b/package/cgroupfs-mount/cgroupfs-mount.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 fb32a8d9de491358d28f56ab76a56e1a611b90d5b6326910d3a69395fa539027 cgroupfs-mount-7285bf44402029394808339f69f4f293730fc2c6.tar.gz diff --git a/package/cgroupfs-mount/cgroupfs-mount.mk b/package/cgroupfs-mount/cgroupfs-mount.mk new file mode 100644 index 0000000000..b37560509b --- /dev/null +++ b/package/cgroupfs-mount/cgroupfs-mount.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# cgroupfs-mount +# +################################################################################ + +CGROUPFS_MOUNT_VERSION = 7285bf44402029394808339f69f4f293730fc2c6 +CGROUPFS_MOUNT_SITE = $(call github,tianon,cgroupfs-mount,$(CGROUPFS_MOUNT_VERSION)) +CGROUPFS_MOUNT_LICENSE = GPLv3+ +CGROUPFS_MOUNT_LICENSE_FILES = debian/copyright + +define CGROUPFS_MOUNT_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/cgroupfs-mount $(TARGET_DIR)/usr/bin/cgroupfs-mount + $(INSTALL) -D -m 0755 $(@D)/cgroupfs-umount $(TARGET_DIR)/usr/bin/cgroupfs-umount +endef + +define CGROUPFS_MOUNT_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D $(CGROUPFS_MOUNT_PKGDIR)/S30cgroupfs \ + $(TARGET_DIR)/etc/init.d/S30cgroupfs + +endef + +$(eval $(generic-package)) diff --git a/package/check/Config.in b/package/check/Config.in new file mode 100644 index 0000000000..04682e1481 --- /dev/null +++ b/package/check/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_CHECK + bool "check" + help + Check is a unit testing framework for C. + + http://check.sourceforge.net/ diff --git a/package/check/check.hash b/package/check/check.hash new file mode 100644 index 0000000000..0c3a924b57 --- /dev/null +++ b/package/check/check.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/check/files/check/0.10.0/ +md5 53c5e5c77d090e103a17f3ed7fd7d8b8 check-0.10.0.tar.gz +sha1 35d3a53446aea7b21a770faedb358d0fc7cba76d check-0.10.0.tar.gz diff --git a/package/check/check.mk b/package/check/check.mk new file mode 100644 index 0000000000..92dd033651 --- /dev/null +++ b/package/check/check.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# check +# +################################################################################ + +CHECK_VERSION = 0.10.0 +CHECK_SITE = http://downloads.sourceforge.net/project/check/check/$(CHECK_VERSION) +CHECK_INSTALL_STAGING = YES +CHECK_DEPENDENCIES = host-pkgconf +CHECK_LICENSE = LGPLv2.1+ +CHECK_LICENSE_FILES = COPYING.LESSER + +# Having checkmk in the target makes no sense +define CHECK_REMOVE_CHECKMK + rm -f $(TARGET_DIR)/usr/bin/checkmk +endef +CHECK_POST_INSTALL_TARGET_HOOKS += CHECK_REMOVE_CHECKMK + +$(eval $(autotools-package)) diff --git a/package/checkpolicy/Config.in.host b/package/checkpolicy/Config.in.host new file mode 100644 index 0000000000..240a5b6dc4 --- /dev/null +++ b/package/checkpolicy/Config.in.host @@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_CHECKPOLICY + bool "host checkpolicy" + help + checkpolicy is the SELinux policy compiler. It uses libsepol + to generate the binary policy. checkpolicy uses the static + libsepol since it deals with low level details of the policy + that have not been encapsulated/abstracted by a proper + shared library interface. + + http://selinuxproject.org/page/Main_Page diff --git a/package/checkpolicy/checkpolicy.hash b/package/checkpolicy/checkpolicy.hash new file mode 100644 index 0000000000..32b5ff620c --- /dev/null +++ b/package/checkpolicy/checkpolicy.hash @@ -0,0 +1,2 @@ +# https://github.com/SELinuxProject/selinux/wiki/Releases +sha256 e6a0ac539b74859b4262b317eb90d9914deb15e7aa509659f47724d50fe2ecc6 checkpolicy-2.1.12.tar.gz diff --git a/package/checkpolicy/checkpolicy.mk b/package/checkpolicy/checkpolicy.mk new file mode 100644 index 0000000000..4b7b2f3424 --- /dev/null +++ b/package/checkpolicy/checkpolicy.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# checkpolicy +# +################################################################################ + +CHECKPOLICY_VERSION = 2.1.12 +CHECKPOLICY_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20130423 +CHECKPOLICY_LICENSE = GPLv2 +CHECKPOLICY_LICENSE_FILES = COPYING + +HOST_CHECKPOLICY_DEPENDENCIES = host-libselinux host-flex host-bison + +HOST_CHECKPOLICY_MAKE_OPTS = $(HOST_CONFIGURE_OPTS) \ + LEX="$(HOST_DIR)/usr/bin/flex" \ + YACC="$(HOST_DIR)/usr/bin/bison -y" + +# DESTDIR is used at build time to find host-libselinux +define HOST_CHECKPOLICY_BUILD_CMDS + $(MAKE) -C $(@D) $(HOST_CHECKPOLICY_MAKE_OPTS) DESTDIR=$(HOST_DIR) +endef + +define HOST_CHECKPOLICY_INSTALL_CMDS + $(MAKE) -C $(@D) $(HOST_CHECKPOLICY_MAKE_OPTS) DESTDIR=$(HOST_DIR) install +endef + +$(eval $(host-generic-package)) diff --git a/package/chocolate-doom/0001-Fix-gcc_struct-attribute-directive-ignored-warnings.patch b/package/chocolate-doom/0001-Fix-gcc_struct-attribute-directive-ignored-warnings.patch new file mode 100644 index 0000000000..bff8e3ec1b --- /dev/null +++ b/package/chocolate-doom/0001-Fix-gcc_struct-attribute-directive-ignored-warnings.patch @@ -0,0 +1,49 @@ +From d9c517d9a4e168c1f7ed28ad0eb9365d69f5ceb2 Mon Sep 17 00:00:00 2001 +From: Rodrigo Rebello +Date: Thu, 22 Oct 2015 11:29:55 -0200 +Subject: [PATCH] Fix "`gcc_struct' attribute directive ignored" warnings +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Compilation for target architectures other than i386, x86_64 or PowerPC +(e.g. ARM) caused multiple warnings like the following to appear: + + doomdata.h:75:1: warning: ‘gcc_struct’ attribute directive ignored + } PACKEDATTR mapsidedef_t; + ^ + +This was due to 'gcc_struct' being undefined for these architectures. +Since that attribute was actually introduced by commit 87db726b9a9ae61ca +to address the fact that -mms-bitfields became the default for GCC on +Windows, limit it to that case. + +Upstream-status: accepted, not yet released. +https://github.com/chocolate-doom/chocolate-doom/pull/629 + +Signed-off-by: Rodrigo Rebello +--- + src/doomtype.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/doomtype.h b/src/doomtype.h +index bf0a40e..77c026c 100644 +--- a/src/doomtype.h ++++ b/src/doomtype.h +@@ -52,10 +52,10 @@ + + #ifdef __GNUC__ + +-#ifdef __clang__ +-#define PACKEDATTR __attribute__((packed)) +-#else ++#if defined(_WIN32) && !defined(__clang__) + #define PACKEDATTR __attribute__((packed,gcc_struct)) ++#else ++#define PACKEDATTR __attribute__((packed)) + #endif + + #else +-- +2.1.4 + diff --git a/package/chocolate-doom/0002-configure-fix-with-PACKAGE-option-checks.patch b/package/chocolate-doom/0002-configure-fix-with-PACKAGE-option-checks.patch new file mode 100644 index 0000000000..f4d09f558f --- /dev/null +++ b/package/chocolate-doom/0002-configure-fix-with-PACKAGE-option-checks.patch @@ -0,0 +1,67 @@ +From fd12fa91aa8e35dbd3ffa5bfe055baf6bde0cd63 Mon Sep 17 00:00:00 2001 +From: Rodrigo Rebello +Date: Thu, 22 Oct 2015 15:28:11 -0200 +Subject: [PATCH] configure: fix --with-PACKAGE option checks + +Options of the form --with-PACKAGE[=yes] (e.g. --with-libpng), when +passed to configure, were being treated as though --without-PACKAGE had +been given. + +Although the intention is to have configure check and use PACKAGE by +default if it's available, thus requiring the user to pass an option +only if PACKAGE must NOT be used, there are times when the opposite +might be desired (i.e. the user wants to indicate PACKAGE MUST be used). +Moreover, allowing --with-PACKAGE and behaving as if --without-PACKAGE +had been specified is in itself quite confusing. + +Fix that by testing the result of 'with_PACKAGE' in configure.ac and +acting accordingly instead of blindly assuming a 'no'. + +Upstream-status: accepted, not yet released. +https://github.com/chocolate-doom/chocolate-doom/pull/630 + +Signed-off-by: Rodrigo Rebello +--- + configure.ac | 18 ++++++++++++++++-- + 1 file changed, 16 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ee97fe2..7b03485 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -80,7 +80,14 @@ AC_SDL_MAIN_WORKAROUND([ + [Build without libsamplerate @<:@default=check@:>@]), + [], + [ +- AC_CHECK_LIB(samplerate, src_new) ++ [with_libsamplerate=check] ++ ]) ++ AS_IF([test "x$with_libsamplerate" != xno], [ ++ AC_CHECK_LIB(samplerate, src_new, [], [ ++ AS_IF([test "x$with_libsamplerate" != xcheck], [AC_MSG_FAILURE( ++ [--with-libsamplerate was given, but test for libsamplerate failed]) ++ ]) ++ ]) + ]) + # Check for libpng. + AC_ARG_WITH([libpng], +@@ -88,8 +95,15 @@ AC_SDL_MAIN_WORKAROUND([ + [Build without libpng @<:@default=check@:>@]), + [], + [ ++ [with_libpng=check] ++ ]) ++ AS_IF([test "x$with_libpng" != xno], [ + AC_CHECK_LIB(z, zlibVersion) +- AC_CHECK_LIB(png, png_get_io_ptr) ++ AC_CHECK_LIB(png, png_get_io_ptr, [], [ ++ AS_IF([test "x$with_libpng" != xcheck], [AC_MSG_FAILURE( ++ [--with-libpng was given, but test for libpng failed]) ++ ]) ++ ]) + ]) + AC_CHECK_LIB(m, log) + +-- +2.1.4 + diff --git a/package/chocolate-doom/0003-opl-limit-use-of-ioperm-inb-outb-to-x86-architecture.patch b/package/chocolate-doom/0003-opl-limit-use-of-ioperm-inb-outb-to-x86-architecture.patch new file mode 100644 index 0000000000..860f563d76 --- /dev/null +++ b/package/chocolate-doom/0003-opl-limit-use-of-ioperm-inb-outb-to-x86-architecture.patch @@ -0,0 +1,80 @@ +From 87c7399305b30045a856d737bbfd8f59b8f52392 Mon Sep 17 00:00:00 2001 +From: Rodrigo Rebello +Date: Fri, 6 Nov 2015 12:14:01 -0200 +Subject: [PATCH] opl: limit use of ioperm/inb/outb to x86 architecture + +The use of I/O ports in the Linux driver to directly control OPL chips +is x86 specific and only really makes sense for x86-based PC's with +compatible hardware. + +For some architectures (e.g. ARM), ioperm, inb and outb do exist and are +detected by the configure script (via AC_CHECK_FUNCS(ioperm)), but their +use is inappropriate in these cases and should be avoided. + +In some other scenarios, like when using a GNU toolchain + uClibc for +PowerPC, the build even fails with the following error: + + opl_linux.c:26:20: fatal error: sys/io.h: No such file or directory + +That is so because ioperm() is exported by uClibc and gets detected by +configure, which enables the "Linux" driver via definition of +HAVE_IOPERM, but in practice 'sys/io.h' is missing for ppc (inb/outb is +not implemented, and the call to ioperm() would return EIO anyway). + +So, besides testing for HAVE_IOPERM, also test if either __i386__ or +__x86_64__ are defined before enabling this OPL driver. + +Upstream-status: accepted, not yet released. +https://github.com/chocolate-doom/chocolate-doom/pull/638 + +Signed-off-by: Rodrigo Rebello +--- + opl/opl.c | 4 ++-- + opl/opl_linux.c | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/opl/opl.c b/opl/opl.c +index 60f027d..0d25689 100644 +--- a/opl/opl.c ++++ b/opl/opl.c +@@ -27,7 +27,7 @@ + + //#define OPL_DEBUG_TRACE + +-#ifdef HAVE_IOPERM ++#if (defined(__i386__) || defined(__x86_64__)) && defined(HAVE_IOPERM) + extern opl_driver_t opl_linux_driver; + #endif + #if defined(HAVE_LIBI386) || defined(HAVE_LIBAMD64) +@@ -40,7 +40,7 @@ extern opl_driver_t opl_sdl_driver; + + static opl_driver_t *drivers[] = + { +-#ifdef HAVE_IOPERM ++#if (defined(__i386__) || defined(__x86_64__)) && defined(HAVE_IOPERM) + &opl_linux_driver, + #endif + #if defined(HAVE_LIBI386) || defined(HAVE_LIBAMD64) +diff --git a/opl/opl_linux.c b/opl/opl_linux.c +index 5df5d46..19e4c3e 100644 +--- a/opl/opl_linux.c ++++ b/opl/opl_linux.c +@@ -17,7 +17,7 @@ + + #include "config.h" + +-#ifdef HAVE_IOPERM ++#if (defined(__i386__) || defined(__x86_64__)) && defined(HAVE_IOPERM) + + #include + #include +@@ -99,5 +99,5 @@ opl_driver_t opl_linux_driver = + OPL_Timer_AdjustCallbacks, + }; + +-#endif /* #ifdef HAVE_IOPERM */ ++#endif /* #if (defined(__i386__) || defined(__x86_64__)) && defined(HAVE_IOPERM) */ + +-- +2.1.4 + diff --git a/package/chocolate-doom/0004-configure-Switch-to-pkg-config-macros.patch b/package/chocolate-doom/0004-configure-Switch-to-pkg-config-macros.patch new file mode 100644 index 0000000000..2618396b56 --- /dev/null +++ b/package/chocolate-doom/0004-configure-Switch-to-pkg-config-macros.patch @@ -0,0 +1,217 @@ +From 3163bf87d7b955d08dedd5ebaccb1b2a86ffdcb9 Mon Sep 17 00:00:00 2001 +From: Simon Howard +Date: Thu, 25 Feb 2016 22:55:04 -0500 +Subject: [PATCH] configure: Switch to pkg-config macros. + +All dependency libraries install pkg-config .pc files nowadays, which +makes the process of looking them up a lot simpler. Get rid of the SDL +workaround macro as it's not needed. + +[Backported from upstream commit 3163bf87d7b955d08dedd5ebaccb1b2a86ffdcb9. +Fixes static linking issues with SDL_mixer.] + +Signed-off-by: Rodrigo Rebello +--- + configure.ac | 117 ++++++++++++++-------------------------- + opl/examples/Makefile.am | 2 +- + src/Makefile.am | 7 ++- + textscreen/Makefile.am | 2 +- + textscreen/examples/Makefile.am | 2 +- + 5 files changed, 49 insertions(+), 81 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 7b03485..48f83ef 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -33,89 +33,54 @@ then + CFLAGS="-O$OPT_LEVEL -g $WARNINGS $orig_CFLAGS" + fi + +-dnl Search for SDL ... +- +-AM_PATH_SDL(1.1.3) +- +-# Add the SDL compiler flags to the default compiler flag variables. +-# It is important to do this now, before checking for headers and +-# library functions. The reason being that on Windows, sdl-config +-# sets the -mno-cygwin compiler option in order to generate MinGW +-# executables. If we don't do this now, we might end up discovering +-# header files that are not actually available to us when we come +-# to compile. +- +-CFLAGS="$CFLAGS $SDL_CFLAGS" +-LDFLAGS="$LDFLAGS $SDL_LIBS" +- +-# On some platforms, SDL renames main() to SDL_main() using a #define, +-# so that its own main, stored in the SDLmain library, can be run first. +-# Unfortunately, this causes problems for autoconf, which builds +-# test programs to probe the system. All library/header/symbol checks +-# must be run in this block, that performs a workaround for the problem. +- +-AC_SDL_MAIN_WORKAROUND([ +- +- # Check for SDL_mixer. +- +- AC_CHECK_LIB(SDL_mixer,Mix_LoadMUS,[ +- SDLMIXER_LIBS="$SDLMIXER_LIBS -lSDL_mixer" +- ],[ +- echo "*** Could not find SDL_mixer. Please install it." +- exit -1 +- ]) +- +- # Check for SDL_net. +- +- AC_CHECK_LIB(SDL_net,SDLNet_UDP_Send,[ +- SDLNET_LIBS="$SDLNET_LIBS -lSDL_net" +- ],[ +- echo "*** Could not find SDL_net. Please install it." +- exit -1 +- ]) +- +- # Check for libsamplerate. +- AC_ARG_WITH([libsamplerate], +- AS_HELP_STRING([--without-libsamplerate], +- [Build without libsamplerate @<:@default=check@:>@]), +- [], +- [ +- [with_libsamplerate=check] +- ]) +- AS_IF([test "x$with_libsamplerate" != xno], [ +- AC_CHECK_LIB(samplerate, src_new, [], [ +- AS_IF([test "x$with_libsamplerate" != xcheck], [AC_MSG_FAILURE( +- [--with-libsamplerate was given, but test for libsamplerate failed]) +- ]) ++PKG_CHECK_MODULES([SDL], [sdl]) ++PKG_CHECK_MODULES([SDLMIXER], [SDL_mixer]) ++PKG_CHECK_MODULES([SDLNET], [SDL_net]) ++ ++# Check for libsamplerate. ++AC_ARG_WITH([libsamplerate], ++AS_HELP_STRING([--without-libsamplerate], ++ [Build without libsamplerate @<:@default=check@:>@]), ++[], ++[ ++ [with_libsamplerate=check] ++]) ++AS_IF([test "x$with_libsamplerate" != xno], [ ++ PKG_CHECK_MODULES([SAMPLERATE], [samplerate >= 0.1.8], [ ++ AC_DEFINE([HAVE_LIBSAMPLERATE], [1], [libsamplerate installed]) ++ ], [ ++ AS_IF([test "x$with_libsamplerate" != xcheck], [AC_MSG_FAILURE( ++ [--with-libsamplerate was given, but test for libsamplerate failed]) + ]) + ]) +- # Check for libpng. +- AC_ARG_WITH([libpng], +- AS_HELP_STRING([--without-libpng], +- [Build without libpng @<:@default=check@:>@]), +- [], +- [ +- [with_libpng=check] +- ]) +- AS_IF([test "x$with_libpng" != xno], [ +- AC_CHECK_LIB(z, zlibVersion) +- AC_CHECK_LIB(png, png_get_io_ptr, [], [ +- AS_IF([test "x$with_libpng" != xcheck], [AC_MSG_FAILURE( +- [--with-libpng was given, but test for libpng failed]) +- ]) ++]) ++# Check for libpng. ++AC_ARG_WITH([libpng], ++AS_HELP_STRING([--without-libpng], ++ [Build without libpng @<:@default=check@:>@]), ++[], ++[ ++ [with_libpng=check] ++]) ++AS_IF([test "x$with_libpng" != xno], [ ++ PKG_CHECK_MODULES([PNG], [libpng >= 1.6.10], [ ++ AC_DEFINE([HAVE_LIBPNG], [1], [libpng installed]) ++ ], [ ++ AS_IF([test "x$with_libpng" != xcheck], [AC_MSG_FAILURE( ++ [--with-libpng was given, but test for libpng failed]) + ]) + ]) +- AC_CHECK_LIB(m, log) ++]) ++AC_CHECK_LIB(m, log) + +- AC_CHECK_HEADERS([linux/kd.h dev/isa/spkrio.h dev/speaker/speaker.h]) +- AC_CHECK_FUNCS(mmap ioperm) ++AC_CHECK_HEADERS([linux/kd.h dev/isa/spkrio.h dev/speaker/speaker.h]) ++AC_CHECK_FUNCS(mmap ioperm) + +- # OpenBSD I/O i386 library for I/O port access. +- # (64 bit has the same thing with a different name!) ++# OpenBSD I/O i386 library for I/O port access. ++# (64 bit has the same thing with a different name!) + +- AC_CHECK_LIB(i386, i386_iopl) +- AC_CHECK_LIB(amd64, amd64_iopl) +-]) ++AC_CHECK_LIB(i386, i386_iopl) ++AC_CHECK_LIB(amd64, amd64_iopl) + + case $host in + *cygwin* | *mingw* ) +diff --git a/opl/examples/Makefile.am b/opl/examples/Makefile.am +index 9afcd51..54c37f8 100644 +--- a/opl/examples/Makefile.am ++++ b/opl/examples/Makefile.am +@@ -1,5 +1,5 @@ + +-AM_CFLAGS = -I$(top_srcdir)/opl ++AM_CFLAGS = -I$(top_srcdir)/opl @SDL_CFLAGS@ + + noinst_PROGRAMS=droplay + +diff --git a/src/Makefile.am b/src/Makefile.am +index 78ee3ba..9624e01 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -21,7 +21,8 @@ execgames_SCRIPTS = $(SETUP_BINARIES) + AM_CFLAGS = -I$(top_srcdir)/textscreen \ + -I$(top_srcdir)/opl \ + -I$(top_srcdir)/pcsound \ +- @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@ ++ @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@ \ ++ @SAMPLERATE_CFLAGS@ @PNG_CFLAGS@ + + # Common source files used by absolutely everything: + +@@ -150,7 +151,9 @@ EXTRA_LIBS = \ + @LDFLAGS@ \ + @SDL_LIBS@ \ + @SDLMIXER_LIBS@ \ +- @SDLNET_LIBS@ ++ @SDLNET_LIBS@ \ ++ @SAMPLERATE_LIBS@ \ ++ @PNG_LIBS@ + + if HAVE_WINDRES + @PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES_WITH_DEH) resource.rc +diff --git a/textscreen/Makefile.am b/textscreen/Makefile.am +index 628d4ff..427ed40 100644 +--- a/textscreen/Makefile.am ++++ b/textscreen/Makefile.am +@@ -1,5 +1,5 @@ + +-AM_CFLAGS = -I$(top_srcdir)/src ++AM_CFLAGS = -I$(top_srcdir)/src @SDL_CFLAGS@ + + CTAGS_ARGS=-I TXT_UNCAST_ARG+ + +diff --git a/textscreen/examples/Makefile.am b/textscreen/examples/Makefile.am +index 4632d92..b857748 100644 +--- a/textscreen/examples/Makefile.am ++++ b/textscreen/examples/Makefile.am +@@ -1,5 +1,5 @@ + +-AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/textscreen ++AM_CFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/textscreen @SDL_CFLAGS@ + + noinst_PROGRAMS=guitest calculator + +-- +2.1.4 + diff --git a/package/chocolate-doom/Config.in b/package/chocolate-doom/Config.in new file mode 100644 index 0000000000..5e0d9c11ea --- /dev/null +++ b/package/chocolate-doom/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_CHOCOLATE_DOOM + bool "chocolate-doom" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_SDL + select BR2_PACKAGE_SDL_MIXER + select BR2_PACKAGE_SDL_NET + help + Chocolate Doom is a set of conservative source ports for Doom, + Heretic, Hexen and Strife, with a philosophy of preserving the + look, feel, and bugs of the vanilla versions of each. + + http://www.chocolate-doom.org diff --git a/package/chocolate-doom/chocolate-doom.hash b/package/chocolate-doom/chocolate-doom.hash new file mode 100644 index 0000000000..bdf56982e2 --- /dev/null +++ b/package/chocolate-doom/chocolate-doom.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 ad11e2871667c6fa0658abf2dcba0cd9b26fbd651ee8df55adfdc18ad8fd674a chocolate-doom-2.2.1.tar.gz diff --git a/package/chocolate-doom/chocolate-doom.mk b/package/chocolate-doom/chocolate-doom.mk new file mode 100644 index 0000000000..dad73528e3 --- /dev/null +++ b/package/chocolate-doom/chocolate-doom.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# chocolate-doom +# +################################################################################ + +CHOCOLATE_DOOM_VERSION = 2.2.1 +CHOCOLATE_DOOM_SITE = http://www.chocolate-doom.org/downloads/$(CHOCOLATE_DOOM_VERSION) +CHOCOLATE_DOOM_LICENSE = GPLv2+ +CHOCOLATE_DOOM_LICENSE_FILES = COPYING +CHOCOLATE_DOOM_DEPENDENCIES = host-pkgconf sdl sdl_mixer sdl_net + +# We're patching configure.ac, so we need to autoreconf +CHOCOLATE_DOOM_AUTORECONF = YES + +# Avoid installing desktop entries, icons, etc. +CHOCOLATE_DOOM_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-exec + +CHOCOLATE_DOOM_CONF_OPTS = \ + --disable-sdltest \ + --with-sdl-prefix=$(STAGING_DIR)/usr \ + --with-sdl-exec-prefix=$(STAGING_DIR)/usr + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +CHOCOLATE_DOOM_DEPENDENCIES += libpng +CHOCOLATE_DOOM_CONF_OPTS += --with-libpng +else +CHOCOLATE_DOOM_CONF_OPTS += --without-libpng +endif + +ifeq ($(BR2_PACKAGE_LIBSAMPLERATE),y) +CHOCOLATE_DOOM_DEPENDENCIES += libsamplerate +CHOCOLATE_DOOM_CONF_OPTS += --with-libsamplerate +else +CHOCOLATE_DOOM_CONF_OPTS += --without-libsamplerate +endif + +$(eval $(autotools-package)) diff --git a/package/chrony/Config.in b/package/chrony/Config.in new file mode 100644 index 0000000000..05d6fc1a25 --- /dev/null +++ b/package/chrony/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_CHRONY + bool "chrony" + depends on BR2_USE_MMU # fork() + help + Chrony is a pair of programs which are used to maintain the + accuracy of the system clock. + + http://chrony.tuxfamily.org/ diff --git a/package/chrony/S49chrony b/package/chrony/S49chrony new file mode 100755 index 0000000000..6215acc4aa --- /dev/null +++ b/package/chrony/S49chrony @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Start chrony + +[ -f /etc/chrony.conf ] || exit 0 + +case "$1" in + start) + printf "Starting chrony: " + chronyd && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping chrony: " + killall chronyd && echo "OK" || echo "FAIL" + ;; + restart|reload) + "$0" stop + sleep 1 + "$0" start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/chrony/chrony.hash b/package/chrony/chrony.hash new file mode 100644 index 0000000000..f39d31631e --- /dev/null +++ b/package/chrony/chrony.hash @@ -0,0 +1,3 @@ +# From https://listengine.tuxfamily.org/chrony.tuxfamily.org/chrony-announce/2016/02/msg00001.html +md5 db6d46afea66f75dcc362f44623c1af4 chrony-2.3.tar.gz +sha1 c5e2aac4e4ad904bf73663ed63964bec91482a8a chrony-2.3.tar.gz diff --git a/package/chrony/chrony.mk b/package/chrony/chrony.mk new file mode 100644 index 0000000000..6416b83c4b --- /dev/null +++ b/package/chrony/chrony.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# chrony +# +################################################################################ + +CHRONY_VERSION = 2.3 +CHRONY_SITE = http://download.tuxfamily.org/chrony +CHRONY_LICENSE = GPLv2 +CHRONY_LICENSE_FILES = COPYING + +CHRONY_CONF_OPTS = \ + --host-system=Linux \ + --host-machine=$(BR2_ARCH) \ + --prefix=/usr \ + --without-seccomp \ + --without-tomcrypt + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +CHRONY_DEPENDENCIES += libcap +else +CHRONY_CONF_OPTS += --without-libcap +endif + +ifeq ($(BR2_PACKAGE_LIBNSS),y) +CHRONY_DEPENDENCIES += host-pkgconf libnss +else +CHRONY_CONF_OPTS += --without-nss +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +CHRONY_DEPENDENCIES += readline +else +CHRONY_CONF_OPTS += --disable-readline +endif + +define CHRONY_CONFIGURE_CMDS + cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure $(CHRONY_CONF_OPTS) +endef + +define CHRONY_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define CHRONY_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install +endef + +define CHRONY_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/chrony/S49chrony $(TARGET_DIR)/etc/init.d/S49chrony +endef + +define CHRONY_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/chrony/chrony.service \ + $(TARGET_DIR)/usr/lib/systemd/system/chrony.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/chrony.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/chrony.service +endef + +$(eval $(generic-package)) diff --git a/package/chrony/chrony.service b/package/chrony/chrony.service new file mode 100644 index 0000000000..6000fce40c --- /dev/null +++ b/package/chrony/chrony.service @@ -0,0 +1,11 @@ +[Unit] +Description=Chrony Network Time Daemon +After=syslog.target network.target +Conflicts=systemd-timesyncd.service + +[Service] +ExecStart=/usr/bin/chronyd -n +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/cifs-utils/Config.in b/package/cifs-utils/Config.in new file mode 100644 index 0000000000..b433850a18 --- /dev/null +++ b/package/cifs-utils/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_CIFS_UTILS + bool "cifs-utils" + # uses fork() + depends on BR2_USE_MMU + help + The in-kernel CIFS filesystem is generally the preferred + method for mounting SMB/CIFS shares on Linux. The in-kernel + CIFS filesystem relies on a set of user-space tools. That + package of tools is called cifs-utils. Although not really + part of Samba proper, these tools were originally part of + the Samba package. For several reasons, shipping these tools + as part of Samba was problematic and it was deemed better to + split them off into their own package. + + http://wiki.samba.org/index.php/LinuxCIFS_utils diff --git a/package/cifs-utils/cifs-utils.hash b/package/cifs-utils/cifs-utils.hash new file mode 100644 index 0000000000..c49ced4428 --- /dev/null +++ b/package/cifs-utils/cifs-utils.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 e2776578b8267c6dc0862897f5e10f87f10f8337fca9ca6a9118f5eb30cf49f7 cifs-utils-6.5.tar.bz2 diff --git a/package/cifs-utils/cifs-utils.mk b/package/cifs-utils/cifs-utils.mk new file mode 100644 index 0000000000..9d4e22374b --- /dev/null +++ b/package/cifs-utils/cifs-utils.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# cifs-utils +# +################################################################################ + +CIFS_UTILS_VERSION = 6.5 +CIFS_UTILS_SOURCE = cifs-utils-$(CIFS_UTILS_VERSION).tar.bz2 +CIFS_UTILS_SITE = http://ftp.samba.org/pub/linux-cifs/cifs-utils +CIFS_UTILS_LICENSE = GPLv3+ +CIFS_UTILS_LICENSE_FILES = COPYING + +ifeq ($(BR2_STATIC_LIBS),y) +CIFS_UTILS_CONF_OPTS += --disable-pie +endif + +ifeq ($(BR2_PACKAGE_KEYUTILS),y) +CIFS_UTILS_DEPENDENCIES += keyutils +endif + +define CIFS_UTILS_NO_WERROR + $(SED) 's/-Werror//' $(@D)/Makefile.in +endef + +CIFS_UTILS_POST_PATCH_HOOKS += CIFS_UTILS_NO_WERROR + +$(eval $(autotools-package)) diff --git a/package/civetweb/0001-Lua-fix-a-typo-changing-LFS_DIR-to-LFS_DIR.patch b/package/civetweb/0001-Lua-fix-a-typo-changing-LFS_DIR-to-LFS_DIR.patch new file mode 100644 index 0000000000..aee3cfcbff --- /dev/null +++ b/package/civetweb/0001-Lua-fix-a-typo-changing-LFS_DIR-to-LFS_DIR.patch @@ -0,0 +1,27 @@ +From 0821066f9adf8410891cd07684ecac50a9bc36a4 Mon Sep 17 00:00:00 2001 +From: Fabio Porcedda +Date: Wed, 25 Feb 2015 18:40:24 +0100 +Subject: [PATCH] Lua: fix a typo changing %(LFS_DIR) to $(LFS_DIR) + +Also this fix a error on GNU Make v4.0: + Makefile:203: *** mixed implicit and normal rules. Stop. + +Signed-off-by: Fabio Porcedda +--- + resources/Makefile.in-lua | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/resources/Makefile.in-lua b/resources/Makefile.in-lua +index 0902f11..f3d95fd 100644 +--- a/resources/Makefile.in-lua ++++ b/resources/Makefile.in-lua +@@ -57,5 +57,5 @@ LFS_CFLAGS = -I$(LFS_DIR) + + OBJECTS += $(LUA_OBJECTS) $(SQLITE_OBJECTS) $(LFS_OBJECTS) + CFLAGS += $(LUA_CFLAGS) $(SQLITE_CFLAGS) $(LFS_CFLAGS) -DUSE_LUA -DUSE_LUA_SQLITE3 -DUSE_LUA_FILE_SYSTEM +-SOURCE_DIRS = $(LUA_DIR) $(SQLITE_DIR) %(LFS_DIR) ++SOURCE_DIRS = $(LUA_DIR) $(SQLITE_DIR) $(LFS_DIR) + +-- +2.3.0 + diff --git a/package/civetweb/Config.in b/package/civetweb/Config.in new file mode 100644 index 0000000000..d68a1ffd53 --- /dev/null +++ b/package/civetweb/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_CIVETWEB + bool "civetweb" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Full featured embedded web server with Lua support. + + https://sourceforge.net/projects/civetweb + +if BR2_PACKAGE_CIVETWEB + +config BR2_PACKAGE_CIVETWEB_WITH_LUA + bool "enable Lua support" + # required by the bundled Sqlite3 and Lua code + depends on !BR2_STATIC_LIBS + help + Enable Lua support in Civetweb. Note that this will use a + version of Lua and Sqlite bundled within the Civetweb + sources, and not the packages from Buildroot. + +comment "lua support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +endif + +comment "civetweb needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/civetweb/civetweb.mk b/package/civetweb/civetweb.mk new file mode 100644 index 0000000000..d29765b87d --- /dev/null +++ b/package/civetweb/civetweb.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# civetweb +# +################################################################################ + +CIVETWEB_VERSION = v1.5 +CIVETWEB_SITE = $(call github,sunsetbrew,civetweb,$(CIVETWEB_VERSION)) +CIVETWEB_LICENSE = MIT +CIVETWEB_LICENSE_FILES = LICENSE.md + +CIVETWEB_CONF_OPTS = TARGET_OS=LINUX WITH_IPV6=1 +CIVETWEB_COPT = -DHAVE_POSIX_FALLOCATE=0 +CIVETWEB_LIBS = -lpthread -lm +CIVETWEB_SYSCONFDIR = /etc +CIVETWEB_HTMLDIR = /var/www + +ifeq ($(BR2_PACKAGE_CIVETWEB_WITH_LUA),y) +CIVETWEB_CONF_OPTS += WITH_LUA=1 +CIVETWEB_LIBS += -ldl +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +CIVETWEB_COPT += -DNO_SSL_DL +CIVETWEB_LIBS += -lssl -lcrypto -lz +CIVETWEB_DEPENDENCIES += openssl +else +CIVETWEB_COPT += -DNO_SSL +endif + +define CIVETWEB_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) build \ + $(CIVETWEB_CONF_OPTS) \ + COPT="$(CIVETWEB_COPT)" LIBS="$(CIVETWEB_LIBS)" +endef + +define CIVETWEB_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) install \ + DOCUMENT_ROOT="$(CIVETWEB_HTMLDIR)" \ + CONFIG_FILE2="$(CIVETWEB_SYSCONFDIR)/civetweb.conf" \ + HTMLDIR="$(TARGET_DIR)$(CIVETWEB_HTMLDIR)" \ + SYSCONFDIR="$(TARGET_DIR)$(CIVETWEB_SYSCONFDIR)" \ + PREFIX="$(TARGET_DIR)/usr" \ + $(CIVETWEB_CONF_OPTS) \ + COPT='$(CIVETWEB_COPT)' +endef + +$(eval $(generic-package)) diff --git a/package/cjson/Config.in b/package/cjson/Config.in new file mode 100644 index 0000000000..bbe4c4a968 --- /dev/null +++ b/package/cjson/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_CJSON + bool "cJSON" + # For static build with cJSON.c directly see README + depends on !BR2_STATIC_LIBS + help + An ultra-lightweight, portable, single-file, simple-as-can-be ANSI-C + compliant JSON parser, under MIT license. + + http://cjson.sourceforge.net/ diff --git a/package/cjson/cjson.mk b/package/cjson/cjson.mk new file mode 100644 index 0000000000..8f21ef8a10 --- /dev/null +++ b/package/cjson/cjson.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# cjson +# +################################################################################ + +CJSON_VERSION = 58 +CJSON_SITE_METHOD = svn +CJSON_SITE = http://svn.code.sf.net/p/cjson/code +CJSON_INSTALL_STAGING = YES +CJSON_LICENSE = MIT +CJSON_LICENSE_FILES = LICENSE + +define CJSON_BUILD_CMDS + cd $(@D) && $(TARGET_CC) $(TARGET_CFLAGS) -shared -fPIC -lm \ + cJSON.c -o libcJSON.so +endef + +define CJSON_INSTALL_STAGING_CMDS + $(INSTALL) -D $(@D)/cJSON.h $(STAGING_DIR)/usr/include/cJSON.h + $(INSTALL) -D $(@D)/libcJSON.so $(STAGING_DIR)/usr/lib/libcJSON.so +endef + +define CJSON_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/cJSON.h $(TARGET_DIR)/usr/include/cJSON.h + $(INSTALL) -D $(@D)/libcJSON.so $(TARGET_DIR)/usr/lib/libcJSON.so +endef + +$(eval $(generic-package)) diff --git a/package/clamav/0001-clamdscan.patch b/package/clamav/0001-clamdscan.patch new file mode 100644 index 0000000000..c395ae1600 --- /dev/null +++ b/package/clamav/0001-clamdscan.patch @@ -0,0 +1,21 @@ +Fixes build error + +proto.c: In function ‘dconnect’: +proto.c:86:67: error: invalid application of ‘sizeof’ to incomplete type ‘struct sockaddr_un’ + if (connect(sockd, (struct sockaddr *)&nixsock, sizeof(nixsock)) == 0) + +Patch sent upstream: http://lurker.clamav.net/message/20140928.130829.5494fd68.en.html + +Signed-off-by: Bernd Kuhls + +diff -uNr clamav-0.98.3.org/clamdscan/proto.c clamav-0.98.3/clamdscan/proto.c +--- clamav-0.98.3.org/clamdscan/proto.c 2014-05-06 20:39:56.000000000 +0200 ++++ clamav-0.98.3/clamdscan/proto.c 2014-05-10 10:41:44.000000000 +0200 +@@ -35,6 +35,7 @@ + #include + #include + #include ++#include + #ifdef HAVE_SYS_SELECT_H + #include + #endif diff --git a/package/clamav/0003-backtrace-uClibc.patch b/package/clamav/0003-backtrace-uClibc.patch new file mode 100644 index 0000000000..82ad67307d --- /dev/null +++ b/package/clamav/0003-backtrace-uClibc.patch @@ -0,0 +1,22 @@ +mbox: do not use backtrace if using uClibc without backtrace support + +Since uClibc can be configured without support for backtrace, disable +the backtrace if we are building with a uClibc that was built without +backtrace. + +This is a bit hacky, and would greatly benefit from a test in ./configure +instead, but does nicely as a quick fix for now. + +Signed-off-by: "Yann E. MORIN" +diff -durN clamav-0.98.4.orig/libclamav/mbox.c clamav-0.98.4/libclamav/mbox.c +--- clamav-0.98.4.orig/libclamav/mbox.c 2014-05-21 17:25:05.000000000 +0200 ++++ clamav-0.98.4/libclamav/mbox.c 2014-11-16 17:21:04.885383286 +0100 +@@ -83,7 +83,7 @@ + #include + #endif + +-#if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 ++#if __GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 && !defined(__UCLIBC__) || defined(__UCLIBC_HAS_BACKTRACE__) + #define HAVE_BACKTRACE + #endif + #endif diff --git a/package/clamav/Config.in b/package/clamav/Config.in new file mode 100644 index 0000000000..7ec402d9de --- /dev/null +++ b/package/clamav/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_CLAMAV + bool "clamav" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + ClamAV is an open source antivirus engine for detecting trojans, + viruses, malware & other malicious threats. + + http://www.clamav.net + +comment "clamav needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/clamav/clamav.hash b/package/clamav/clamav.hash new file mode 100644 index 0000000000..d2a1a1299e --- /dev/null +++ b/package/clamav/clamav.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 167bd6a13e05ece326b968fdb539b05c2ffcfef6018a274a10aeda85c2c0027a clamav-0.99.2.tar.gz diff --git a/package/clamav/clamav.mk b/package/clamav/clamav.mk new file mode 100644 index 0000000000..6a82d66ca9 --- /dev/null +++ b/package/clamav/clamav.mk @@ -0,0 +1,75 @@ +################################################################################ +# +# clamav +# +################################################################################ + +CLAMAV_VERSION = 0.99.2 +CLAMAV_SITE = https://www.clamav.net/downloads/production +CLAMAV_LICENSE = GPLv2 +CLAMAV_LICENSE_FILES = COPYING COPYING.bzip2 COPYING.file COPYING.getopt \ + COPYING.LGPL COPYING.llvm COPYING.lzma COPYING.pcre COPYING.regex \ + COPYING.unrar COPYING.zlib +CLAMAV_DEPENDENCIES = \ + host-pkgconf \ + openssl \ + zlib \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +# mmap cannot be detected when cross-compiling, needed for mempool support +CLAMAV_CONF_ENV = \ + ac_cv_c_mmap_private=yes \ + have_cv_ipv6=yes + +# UCLIBC_HAS_FTS is disabled, therefore disable fanotify (missing fts.h) +CLAMAV_CONF_OPTS = \ + --with-dbdir=/var/lib/clamav \ + --with-openssl=$(STAGING_DIR)/usr \ + --with-zlib=$(STAGING_DIR)/usr \ + --disable-rpath \ + --disable-clamav \ + --disable-fanotify \ + --disable-milter \ + --disable-llvm \ + --disable-clamdtop \ + --enable-mempool + +ifeq ($(BR2_PACKAGE_BZIP2),y) +CLAMAV_DEPENDENCIES += bzip2 +# autodetection gets confused if host has bzip2, so force it +CLAMAV_CONF_ENV += \ + ac_cv_libbz2_libs=-lbz2 \ + ac_cv_libbz2_ltlibs=-lbz2 +else +CLAMAV_CONF_OPTS += --disable-bzip2 +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +CLAMAV_CONF_OPTS += --with-xml=$(STAGING_DIR)/usr +CLAMAV_DEPENDENCIES += libxml2 +else +CLAMAV_CONF_OPTS += --disable-xml +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +CLAMAV_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr +CLAMAV_DEPENDENCIES += libcurl +else +CLAMAV_CONF_OPTS += --without-libcurl +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +CLAMAV_CONF_OPTS += --with-iconv +CLAMAV_DEPENDENCIES += libiconv +else +CLAMAV_CONF_OPTS += --without-iconv +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +CLAMAV_CONF_OPTS += --with-pcre=$(STAGING_DIR)/usr +CLAMAV_DEPENDENCIES += pcre +else +CLAMAV_CONF_OPTS += --without-pcre +endif + +$(eval $(autotools-package)) diff --git a/package/clapack/0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch b/package/clapack/0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch new file mode 100644 index 0000000000..8fede9da91 --- /dev/null +++ b/package/clapack/0001-cmake-force-libf2c-to-be-built-as-a-static-library.patch @@ -0,0 +1,32 @@ +From 4fe2f454e454d9e6b1e83b2ea67581990461ed36 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sat, 11 Jan 2014 22:05:25 +0100 +Subject: [PATCH 1/6] cmake: force libf2c to be built as a static library + +As stated in INSTALL/LAPACK_version.c, liblapack requires to be linked +against the static library of libf2c. + +Signed-off-by: Samuel Martin +--- + F2CLIBS/libf2c/CMakeLists.txt | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt +index 43d7b3f..f98d66a 100644 +--- a/F2CLIBS/libf2c/CMakeLists.txt ++++ b/F2CLIBS/libf2c/CMakeLists.txt +@@ -58,5 +58,10 @@ if(WIN32) + endif() + include_directories(${CLAPACK_SOURCE_DIR}/F2CLIBS/libf2c) + include_directories(${CLAPACK_BINARY_DIR}/F2CLIBS/libf2c) +-add_library(f2c ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h) ++add_library(f2c STATIC ${OFILES} ${CMAKE_CURRENT_BINARY_DIR}/arith.h) + set_property(TARGET f2c PROPERTY PREFIX lib) ++# Set fPIC on the library when build shared libraries is enabled, because ++# libf2c.a will most likely be included by some shared libraries in such cases. ++if(UNIX AND BUILD_SHARED_LIBS) ++ set_target_properties(f2c PROPERTIES COMPILE_FLAGS "-fPIC") ++endif() +-- +1.8.5.3 + diff --git a/package/clapack/0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch b/package/clapack/0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch new file mode 100644 index 0000000000..eac4164f5d --- /dev/null +++ b/package/clapack/0002-cmake-make-test-build-sensitive-to-BUILD_TESTING.patch @@ -0,0 +1,80 @@ +From 834c221936d9c460b44e3a65b6fedfb3193f491b Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sat, 11 Jan 2014 21:33:12 +0100 +Subject: [PATCH 2/6] cmake: make test build sensitive to BUILD_TESTING + +This patch prevent from wasting time building the tests if it's our +wish. + +The test build takes a significant amount of time, and the binaries +are not installed. + +Signed-off-by: Samuel Martin +--- + BLAS/TESTING/CMakeLists.txt | 3 +++ + CMakeLists.txt | 9 ++++++--- + TESTING/CMakeLists.txt | 4 ++++ + 3 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/BLAS/TESTING/CMakeLists.txt b/BLAS/TESTING/CMakeLists.txt +index ec2c587..e7dc0b7 100644 +--- a/BLAS/TESTING/CMakeLists.txt ++++ b/BLAS/TESTING/CMakeLists.txt +@@ -25,6 +25,9 @@ + # make single FRC=FRC + # + ####################################################################### ++if(NOT BUILD_TESTING) ++ return() ++endif() + + macro(add_blas_test name src) + get_filename_component(baseNAME ${src} NAME_WE) +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 320ccc6..0a362c0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,5 @@ + cmake_minimum_required(VERSION 2.6) + project(CLAPACK C) +-enable_testing() + include(CTest) + + if(WIN32 AND NOT CYGWIN) +@@ -11,7 +10,9 @@ else() + set(SECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/second.c) + set(DSECOND_SRC ${CLAPACK_SOURCE_DIR}/INSTALL/dsecnd.c) + endif() +-enable_testing() ++if(NOT BUILD_TESTING) ++ enable_testing() ++endif() + option(USE_BLAS_WRAP "pre-pend f2c_ to each function in blas" OFF) + if(NOT USE_BLAS_WRAP) + # _zrotg_ seems to be missing in the wrap header +@@ -21,7 +22,9 @@ include_directories(${CLAPACK_SOURCE_DIR}/INCLUDE) + add_subdirectory(F2CLIBS) + add_subdirectory(BLAS) + add_subdirectory(SRC) +-add_subdirectory(TESTING) ++if(NOT BUILD_TESTING) ++ add_subdirectory(TESTING) ++endif() + set(CLAPACK_VERSION 3.2.1) + set(CPACK_PACKAGE_VERSION_MAJOR 3) + set(CPACK_PACKAGE_VERSION_MINOR 2) +diff --git a/TESTING/CMakeLists.txt b/TESTING/CMakeLists.txt +index d59359d..f6b083a 100644 +--- a/TESTING/CMakeLists.txt ++++ b/TESTING/CMakeLists.txt +@@ -1,3 +1,7 @@ ++if(NOT BUILD_TESTING) ++ return() ++endif() ++ + if(MSVC_VERSION) + # string(REPLACE "/STACK:10000000" "/STACK:900000000000000000" + # CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}") +-- +1.8.5.3 + diff --git a/package/clapack/0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch b/package/clapack/0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch new file mode 100644 index 0000000000..cd9828ff38 --- /dev/null +++ b/package/clapack/0003-cmake-do-not-try-to-run-arithchk-when-cross-compilin.patch @@ -0,0 +1,70 @@ +From a2f0669fac1f8e7183b15cf7d14f0e99a2d8b012 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sat, 11 Jan 2014 21:47:39 +0100 +Subject: [PATCH 3/6] cmake: do not try to run arithchk when cross-compiling to + generate sources + +Instead, use a predefined arith.h if provided, or generate a default one. + +The arithchk binary is still built (but not installed) to allow the user to +run it on its target and use it; so then allowing to build an optimized +blas library. + +Signed-off-by: Samuel Martin +--- + F2CLIBS/libf2c/CMakeLists.txt | 38 ++++++++++++++++++++++++++++---------- + 1 file changed, 28 insertions(+), 10 deletions(-) + +diff --git a/F2CLIBS/libf2c/CMakeLists.txt b/F2CLIBS/libf2c/CMakeLists.txt +index f98d66a..45a0804 100644 +--- a/F2CLIBS/libf2c/CMakeLists.txt ++++ b/F2CLIBS/libf2c/CMakeLists.txt +@@ -38,17 +38,35 @@ set(TIME dtime_.c etime_.c) + + # For INTEGER*8 support (which requires system-dependent adjustments to + # f2c.h), add ${QINT} to the OFILES assignment below... +-add_executable(arithchk arithchk.c) +-if(UNIX) +- target_link_libraries(arithchk m) ++if(CMAKE_CROSSCOMPILING) ++ if(ARITH_H) ++ message(STATUS "Using the user-defined '${ARITH_H}' as arith.h header.") ++ configure_file("${ARITH_H}" "${CMAKE_CURRENT_BINARY_DIR}/arith.h" COPYONLY) ++ else() ++ message(STATUS "No user-defined arith.h header.") ++ if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/arith.h") ++ message(WARNING "Generating the default non-optimized 'arith.h' header. ++ ++To generate and provide a custom arith.h header: ++run the cross-compiled arithchk binary on your target, ++and use its output to fill your custom arith.h header.") ++ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/arith.h" ++ "/* default, not optimized arith.h */") ++ endif() ++ endif() ++else() ++ add_executable(arithchk arithchk.c) ++ if(UNIX) ++ target_link_libraries(arithchk m) ++ endif() ++ set_target_properties(arithchk PROPERTIES COMPILE_DEFINITIONS ++ "NO_FPINIT;NO_LONG_LONG") ++ ADD_CUSTOM_COMMAND( ++ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h ++ COMMAND arithchk > ${CMAKE_CURRENT_BINARY_DIR}/arith.h ++ DEPENDS arithchk ++ ) + endif() +-set_target_properties(arithchk PROPERTIES COMPILE_DEFINITIONS +- "NO_FPINIT;NO_LONG_LONG") +-ADD_CUSTOM_COMMAND( +- OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h +- COMMAND arithchk > ${CMAKE_CURRENT_BINARY_DIR}/arith.h +- DEPENDS arithchk +- ) + + + set(OFILES ${MISC} ${POW} ${CX} ${DCX} ${REAL} ${DBL} ${INT} +-- +1.8.5.3 + diff --git a/package/clapack/0004-cmake-blas-add-library-and-header-install-rules.patch b/package/clapack/0004-cmake-blas-add-library-and-header-install-rules.patch new file mode 100644 index 0000000000..e83b066dac --- /dev/null +++ b/package/clapack/0004-cmake-blas-add-library-and-header-install-rules.patch @@ -0,0 +1,23 @@ +From 675111e8ffc179276a7e4950fe4a4eda4d38a703 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sat, 11 Jan 2014 21:48:32 +0100 +Subject: [PATCH 4/6] cmake: blas: add library and header install rules + +Signed-off-by: Samuel Martin +--- + BLAS/SRC/CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/BLAS/SRC/CMakeLists.txt b/BLAS/SRC/CMakeLists.txt +index d1caff8..a5de5a1 100644 +--- a/BLAS/SRC/CMakeLists.txt ++++ b/BLAS/SRC/CMakeLists.txt +@@ -141,3 +141,5 @@ if(UNIX) + target_link_libraries(blas m) + endif() + target_link_libraries(blas f2c) ++install(TARGETS blas LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++install(FILES "${CLAPACK_SOURCE_DIR}/INCLUDE/blaswrap.h" DESTINATION include) +-- +1.8.5.3 + diff --git a/package/clapack/0005-cmake-lapack-add-library-and-header-install-rules.patch b/package/clapack/0005-cmake-lapack-add-library-and-header-install-rules.patch new file mode 100644 index 0000000000..abba460b6c --- /dev/null +++ b/package/clapack/0005-cmake-lapack-add-library-and-header-install-rules.patch @@ -0,0 +1,24 @@ +From 9dfac0d55a31be59a856bad9d3a5071d65176597 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sat, 11 Jan 2014 21:49:22 +0100 +Subject: [PATCH 5/6] cmake: lapack: add library and header install rules + +Signed-off-by: Samuel Martin +--- + SRC/CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/SRC/CMakeLists.txt b/SRC/CMakeLists.txt +index ac4cce3..aa60555 100644 +--- a/SRC/CMakeLists.txt ++++ b/SRC/CMakeLists.txt +@@ -377,4 +377,5 @@ if(BUILD_COMPLEX16) + endif() + add_library(lapack ${ALLOBJ} ${ALLXOBJ}) + target_link_libraries(lapack blas) +- ++install(TARGETS lapack LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ++install(FILES "${CLAPACK_SOURCE_DIR}/INCLUDE/clapack.h" DESTINATION include) +-- +1.8.5.3 + diff --git a/package/clapack/0006-remove-uninit-f2c.patch b/package/clapack/0006-remove-uninit-f2c.patch new file mode 100644 index 0000000000..83c2c5c75f --- /dev/null +++ b/package/clapack/0006-remove-uninit-f2c.patch @@ -0,0 +1,24 @@ +uninit.c includes glibc-specific not provided by musl. +Somewhat portable replacement is , which is available in musl +but requires non-trivial changes to uninit.c. + +f2c uses _uninit_f2c() from uninit.c to implement its -trapuv option, +pre-initializiing floating-point variables to NaN and asking FPU to send +SIGFPE whenever NaN value is encountered. + +clapack source has already been run through f2c without -trapuv, +so uninit.c code is not used anywhere and can be safely excluded. + +Signed-off-by: Alex Suykov + +--- a/F2CLIBS/libf2c/CMakeLists.txt ++++ b/F2CLIBS/libf2c/CMakeLists.txt +@@ -1,7 +1,7 @@ + set(MISC + f77vers.c i77vers.c main.c s_rnge.c abort_.c exit_.c getarg_.c iargc_.c + getenv_.c signal_.c s_stop.c s_paus.c system_.c cabs.c ctype.c +- derf_.c derfc_.c erf_.c erfc_.c sig_die.c uninit.c) ++ derf_.c derfc_.c erf_.c erfc_.c sig_die.c) + set(POW pow_ci.c pow_dd.c pow_di.c pow_hh.c pow_ii.c pow_ri.c pow_zi.c pow_zz.c) + set(CX c_abs.c c_cos.c c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c) + set(DCX z_abs.c z_cos.c z_div.c z_exp.c z_log.c z_sin.c z_sqrt.c) diff --git a/package/clapack/0007-off64-t.patch b/package/clapack/0007-off64-t.patch new file mode 100644 index 0000000000..bf66d3c95f --- /dev/null +++ b/package/clapack/0007-off64-t.patch @@ -0,0 +1,16 @@ +musl only provides off64_t, not __off64_t. +glibc and uclibc have both defined. + +Signed-off-by: Alex Suykov + +--- a/F2CLIBS/libf2c/sysdep1.h ++++ b/F2CLIBS/libf2c/sysdep1.h +@@ -10,7 +10,7 @@ + + #ifdef __linux__ + #define USE_LARGEFILE +-#define OFF_T __off64_t ++#define OFF_T off64_t + #endif + + #ifdef _AIX43 diff --git a/package/clapack/Config.in b/package/clapack/Config.in new file mode 100644 index 0000000000..2257524ecd --- /dev/null +++ b/package/clapack/Config.in @@ -0,0 +1,30 @@ +comment "clapack needs an (e)glibc toolchain" + depends on BR2_powerpc + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_CLAPACK + bool "cblas/clapack" + depends on !(BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) + # _fpu_control is used on PowerPC, but not available with + # uClibc or musl + depends on !BR2_powerpc || BR2_TOOLCHAIN_USES_GLIBC + # disable clapack on blackfin, it triggers "undefined symbol" failure + # because of the "_" symbol prefix: + # http://autobuild.buildroot.net/results/a28df0ba10803e6e54c2f8160bbd8190cba4d690/ + depends on !BR2_bfin + help + BLAS and LAPACK C implementation (f2c'ed version of). + + http://www.netlib.org/clapack/ + +config BR2_PACKAGE_CLAPACK_ARITH_H + string "Custom BLAS arith.h" + depends on BR2_PACKAGE_CLAPACK + help + To optimize BLAS library for the hardware, an 'arith.h' header should + be provided. + + If empty, the library will not be optimized by the compiler. + + In any case an 'arithchk' program is built (but not installed), to be run + on the target to generate this arith.h header. diff --git a/package/clapack/clapack.hash b/package/clapack/clapack.hash new file mode 100644 index 0000000000..08657fc594 --- /dev/null +++ b/package/clapack/clapack.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 0b3f782bc24845d85f36bafbff0f2f1384dc72df730fda4e7924ec1a70baca5a clapack-3.2.1-CMAKE.tgz diff --git a/package/clapack/clapack.mk b/package/clapack/clapack.mk new file mode 100644 index 0000000000..c3841f2d24 --- /dev/null +++ b/package/clapack/clapack.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# clapack +# +################################################################################ + +CLAPACK_VERSION = 3.2.1 +CLAPACK_SOURCE = clapack-$(CLAPACK_VERSION)-CMAKE.tgz +# This package provides 3 libraries: +# - libf2c.a (not installed) +# - libblas (statically linked with libf2c.a) +# - liblapack (statically linked with libf2c.a) +CLAPACK_LICENSE = HPND (libf2c), BSD-3c (libblas and liblapack) +CLAPACK_LICENSE_FILES = F2CLIBS/libf2c/Notice COPYING +CLAPACK_SITE = http://www.netlib.org/clapack +CLAPACK_INSTALL_STAGING = YES + +ifneq ($(BR2_PACKAGE_CLAPACK_ARITH_H),) +CLAPACK_CONF_OPTS += -DARITH_H=$(BR2_PACKAGE_CLAPACK_ARITH_H) +endif + +$(eval $(cmake-package)) diff --git a/package/classpath/0001-fix-gmp-include.patch b/package/classpath/0001-fix-gmp-include.patch new file mode 100644 index 0000000000..f7a392093f --- /dev/null +++ b/package/classpath/0001-fix-gmp-include.patch @@ -0,0 +1,46 @@ +The GMP include is hardcoded to /usr/include causing obvious problems. + +From classpath CVS: +http://cvs.savannah.gnu.org/viewvc/classpath/configure.ac?root=classpath&r1=1.245&r2=1.246 + +[Gustavo: ditch -L or libtool complains loudly] + +Signed-off-by: Gustavo Zacarias + +--- a/configure.ac 2010/01/30 01:33:50 1.245 ++++ b/configure.ac 2010/05/04 12:29:23 1.246 +@@ -752,10 +752,32 @@ + dnl __gmpz_mul_si for earlier versions (>= 3.1). + dnl IMPORTANT: if you decide to look for __gmpz_combit, don't forget to + dnl change the name of the corresponding ac_ variable on lines 860... ++ AC_ARG_WITH(gmp, [ --with-gmp=PATH specify prefix directory for the installed GMP package. ++ Equivalent to --with-gmp-include=PATH/include ++ plus --with-gmp-lib=PATH/lib]) ++ AC_ARG_WITH(gmp_include, [ --with-gmp-include=PATH specify directory for installed GMP include files]) ++ AC_ARG_WITH(gmp_lib, [ --with-gmp-lib=PATH specify directory for the installed GMP library]) ++ + if test "x${COMPILE_GMP}" = xyes; then ++ AC_MSG_CHECKING([for GMP directories]) ++ if test "x$with_gmp" != x; then ++ gmplibs="-lgmp" ++ gmpinc="-I$with_gmp/include" ++ if test "x$with_gmp_include" != x; then ++ gmpinc="-I$with_gmp_include $gmpinc" ++ fi ++ if test "x$with_gmp_lib" != x; then ++ gmplibs="$gmplibs" ++ fi ++ else ++ with_gmp="/usr" ++ gmplibs="-lgmp" ++ gmpinc="-I/usr/include" ++ fi ++ AC_MSG_RESULT([prefix=$with_gmp, libs=$gmplibs, inc=$gmpinc]) + AC_CHECK_LIB(gmp, __gmpz_mul_si, +- [GMP_CFLAGS=-I/usr/include +- GMP_LIBS=-lgmp ], ++ [GMP_CFLAGS="$gmpinc" ++ GMP_LIBS="$gmplibs" ], + [GMP_CFLAGS= + GMP_LIBS= ]) + AC_SUBST(GMP_CFLAGS) diff --git a/package/classpath/0002-add-config-rpath.patch b/package/classpath/0002-add-config-rpath.patch new file mode 100644 index 0000000000..3a8a7d0952 --- /dev/null +++ b/package/classpath/0002-add-config-rpath.patch @@ -0,0 +1,680 @@ +Add config.rpath from upstream CVS to avoid (re)autoconfiguring errors. + +Signed-off-by: Gustavo Zacarias + +diff -Nura classpath-0.98.orig/config.rpath classpath-0.98/config.rpath +--- classpath-0.98.orig/config.rpath 1969-12-31 21:00:00.000000000 -0300 ++++ classpath-0.98/config.rpath 2013-07-10 09:36:51.894281025 -0300 +@@ -0,0 +1,672 @@ ++#! /bin/sh ++# Output a system dependent set of variables, describing how to set the ++# run time search path of shared libraries in an executable. ++# ++# Copyright 1996-2010 Free Software Foundation, Inc. ++# Taken from GNU libtool, 2001 ++# Originally by Gordon Matzigkeit , 1996 ++# ++# This file is free software; the Free Software Foundation gives ++# unlimited permission to copy and/or distribute it, with or without ++# modifications, as long as this notice is preserved. ++# ++# The first argument passed to this file is the canonical host specification, ++# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM ++# or ++# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM ++# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld ++# should be set by the caller. ++# ++# The set of defined variables is at the end of this script. ++ ++# Known limitations: ++# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer ++# than 256 bytes, otherwise the compiler driver will dump core. The only ++# known workaround is to choose shorter directory names for the build ++# directory and/or the installation directory. ++ ++# All known linkers require a `.a' archive for static linking (except MSVC, ++# which needs '.lib'). ++libext=a ++shrext=.so ++ ++host="$1" ++host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` ++host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` ++host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` ++ ++# Code taken from libtool.m4's _LT_CC_BASENAME. ++ ++for cc_temp in $CC""; do ++ case $cc_temp in ++ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; ++ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; ++ \-*) ;; ++ *) break;; ++ esac ++done ++cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` ++ ++# Code taken from libtool.m4's _LT_COMPILER_PIC. ++ ++wl= ++if test "$GCC" = yes; then ++ wl='-Wl,' ++else ++ case "$host_os" in ++ aix*) ++ wl='-Wl,' ++ ;; ++ darwin*) ++ case $cc_basename in ++ xlc*) ++ wl='-Wl,' ++ ;; ++ esac ++ ;; ++ mingw* | cygwin* | pw32* | os2* | cegcc*) ++ ;; ++ hpux9* | hpux10* | hpux11*) ++ wl='-Wl,' ++ ;; ++ irix5* | irix6* | nonstopux*) ++ wl='-Wl,' ++ ;; ++ newsos6) ++ ;; ++ linux* | k*bsd*-gnu) ++ case $cc_basename in ++ ecc*) ++ wl='-Wl,' ++ ;; ++ icc* | ifort*) ++ wl='-Wl,' ++ ;; ++ lf95*) ++ wl='-Wl,' ++ ;; ++ pgcc | pgf77 | pgf90) ++ wl='-Wl,' ++ ;; ++ ccc*) ++ wl='-Wl,' ++ ;; ++ como) ++ wl='-lopt=' ++ ;; ++ *) ++ case `$CC -V 2>&1 | sed 5q` in ++ *Sun\ C*) ++ wl='-Wl,' ++ ;; ++ esac ++ ;; ++ esac ++ ;; ++ osf3* | osf4* | osf5*) ++ wl='-Wl,' ++ ;; ++ rdos*) ++ ;; ++ solaris*) ++ wl='-Wl,' ++ ;; ++ sunos4*) ++ wl='-Qoption ld ' ++ ;; ++ sysv4 | sysv4.2uw2* | sysv4.3*) ++ wl='-Wl,' ++ ;; ++ sysv4*MP*) ++ ;; ++ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) ++ wl='-Wl,' ++ ;; ++ unicos*) ++ wl='-Wl,' ++ ;; ++ uts4*) ++ ;; ++ esac ++fi ++ ++# Code taken from libtool.m4's _LT_LINKER_SHLIBS. ++ ++hardcode_libdir_flag_spec= ++hardcode_libdir_separator= ++hardcode_direct=no ++hardcode_minus_L=no ++ ++case "$host_os" in ++ cygwin* | mingw* | pw32* | cegcc*) ++ # FIXME: the MSVC++ port hasn't been tested in a loooong time ++ # When not using gcc, we currently assume that we are using ++ # Microsoft Visual C++. ++ if test "$GCC" != yes; then ++ with_gnu_ld=no ++ fi ++ ;; ++ interix*) ++ # we just hope/assume this is gcc and not c89 (= MSVC++) ++ with_gnu_ld=yes ++ ;; ++ openbsd*) ++ with_gnu_ld=no ++ ;; ++esac ++ ++ld_shlibs=yes ++if test "$with_gnu_ld" = yes; then ++ # Set some defaults for GNU ld with shared library support. These ++ # are reset later if shared libraries are not supported. Putting them ++ # here allows them to be overridden if necessary. ++ # Unlike libtool, we use -rpath here, not --rpath, since the documented ++ # option of GNU ld is called -rpath, not --rpath. ++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ case "$host_os" in ++ aix[3-9]*) ++ # On AIX/PPC, the GNU linker is very broken ++ if test "$host_cpu" != ia64; then ++ ld_shlibs=no ++ fi ++ ;; ++ amigaos*) ++ hardcode_libdir_flag_spec='-L$libdir' ++ hardcode_minus_L=yes ++ # Samuel A. Falvo II reports ++ # that the semantics of dynamic libraries on AmigaOS, at least up ++ # to version 4, is to share data among multiple programs linked ++ # with the same dynamic library. Since this doesn't match the ++ # behavior of shared libraries on other platforms, we cannot use ++ # them. ++ ld_shlibs=no ++ ;; ++ beos*) ++ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ++ : ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ cygwin* | mingw* | pw32* | cegcc*) ++ # hardcode_libdir_flag_spec is actually meaningless, as there is ++ # no search path for DLLs. ++ hardcode_libdir_flag_spec='-L$libdir' ++ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then ++ : ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ interix[3-9]*) ++ hardcode_direct=no ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ ;; ++ gnu* | linux* | k*bsd*-gnu) ++ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ++ : ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ netbsd*) ++ ;; ++ solaris*) ++ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ++ ld_shlibs=no ++ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ++ : ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) ++ case `$LD -v 2>&1` in ++ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ++ ld_shlibs=no ++ ;; ++ *) ++ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ++ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ esac ++ ;; ++ sunos4*) ++ hardcode_direct=yes ++ ;; ++ *) ++ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then ++ : ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ esac ++ if test "$ld_shlibs" = no; then ++ hardcode_libdir_flag_spec= ++ fi ++else ++ case "$host_os" in ++ aix3*) ++ # Note: this linker hardcodes the directories in LIBPATH if there ++ # are no directories specified by -L. ++ hardcode_minus_L=yes ++ if test "$GCC" = yes; then ++ # Neither direct hardcoding nor static linking is supported with a ++ # broken collect2. ++ hardcode_direct=unsupported ++ fi ++ ;; ++ aix[4-9]*) ++ if test "$host_cpu" = ia64; then ++ # On IA64, the linker does run time linking by default, so we don't ++ # have to do anything special. ++ aix_use_runtimelinking=no ++ else ++ aix_use_runtimelinking=no ++ # Test if we are trying to use run time linking or normal ++ # AIX style linking. If -brtl is somewhere in LDFLAGS, we ++ # need to do runtime linking. ++ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) ++ for ld_flag in $LDFLAGS; do ++ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then ++ aix_use_runtimelinking=yes ++ break ++ fi ++ done ++ ;; ++ esac ++ fi ++ hardcode_direct=yes ++ hardcode_libdir_separator=':' ++ if test "$GCC" = yes; then ++ case $host_os in aix4.[012]|aix4.[012].*) ++ collect2name=`${CC} -print-prog-name=collect2` ++ if test -f "$collect2name" && \ ++ strings "$collect2name" | grep resolve_lib_name >/dev/null ++ then ++ # We have reworked collect2 ++ : ++ else ++ # We have old collect2 ++ hardcode_direct=unsupported ++ hardcode_minus_L=yes ++ hardcode_libdir_flag_spec='-L$libdir' ++ hardcode_libdir_separator= ++ fi ++ ;; ++ esac ++ fi ++ # Begin _LT_AC_SYS_LIBPATH_AIX. ++ echo 'int main () { return 0; }' > conftest.c ++ ${CC} ${LDFLAGS} conftest.c -o conftest ++ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ++}'` ++ if test -z "$aix_libpath"; then ++ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } ++}'` ++ fi ++ if test -z "$aix_libpath"; then ++ aix_libpath="/usr/lib:/lib" ++ fi ++ rm -f conftest.c conftest ++ # End _LT_AC_SYS_LIBPATH_AIX. ++ if test "$aix_use_runtimelinking" = yes; then ++ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" ++ else ++ if test "$host_cpu" = ia64; then ++ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' ++ else ++ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" ++ fi ++ fi ++ ;; ++ amigaos*) ++ hardcode_libdir_flag_spec='-L$libdir' ++ hardcode_minus_L=yes ++ # see comment about different semantics on the GNU ld section ++ ld_shlibs=no ++ ;; ++ bsdi[45]*) ++ ;; ++ cygwin* | mingw* | pw32* | cegcc*) ++ # When not using gcc, we currently assume that we are using ++ # Microsoft Visual C++. ++ # hardcode_libdir_flag_spec is actually meaningless, as there is ++ # no search path for DLLs. ++ hardcode_libdir_flag_spec=' ' ++ libext=lib ++ ;; ++ darwin* | rhapsody*) ++ hardcode_direct=no ++ if test "$GCC" = yes ; then ++ : ++ else ++ case $cc_basename in ++ xlc*) ++ ;; ++ *) ++ ld_shlibs=no ++ ;; ++ esac ++ fi ++ ;; ++ dgux*) ++ hardcode_libdir_flag_spec='-L$libdir' ++ ;; ++ freebsd1*) ++ ld_shlibs=no ++ ;; ++ freebsd2.2*) ++ hardcode_libdir_flag_spec='-R$libdir' ++ hardcode_direct=yes ++ ;; ++ freebsd2*) ++ hardcode_direct=yes ++ hardcode_minus_L=yes ++ ;; ++ freebsd* | dragonfly*) ++ hardcode_libdir_flag_spec='-R$libdir' ++ hardcode_direct=yes ++ ;; ++ hpux9*) ++ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ++ hardcode_libdir_separator=: ++ hardcode_direct=yes ++ # hardcode_minus_L: Not really in the search PATH, ++ # but as the default location of the library. ++ hardcode_minus_L=yes ++ ;; ++ hpux10*) ++ if test "$with_gnu_ld" = no; then ++ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ++ hardcode_libdir_separator=: ++ hardcode_direct=yes ++ # hardcode_minus_L: Not really in the search PATH, ++ # but as the default location of the library. ++ hardcode_minus_L=yes ++ fi ++ ;; ++ hpux11*) ++ if test "$with_gnu_ld" = no; then ++ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' ++ hardcode_libdir_separator=: ++ case $host_cpu in ++ hppa*64*|ia64*) ++ hardcode_direct=no ++ ;; ++ *) ++ hardcode_direct=yes ++ # hardcode_minus_L: Not really in the search PATH, ++ # but as the default location of the library. ++ hardcode_minus_L=yes ++ ;; ++ esac ++ fi ++ ;; ++ irix5* | irix6* | nonstopux*) ++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ hardcode_libdir_separator=: ++ ;; ++ netbsd*) ++ hardcode_libdir_flag_spec='-R$libdir' ++ hardcode_direct=yes ++ ;; ++ newsos6) ++ hardcode_direct=yes ++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ hardcode_libdir_separator=: ++ ;; ++ openbsd*) ++ if test -f /usr/libexec/ld.so; then ++ hardcode_direct=yes ++ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ else ++ case "$host_os" in ++ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) ++ hardcode_libdir_flag_spec='-R$libdir' ++ ;; ++ *) ++ hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ++ ;; ++ esac ++ fi ++ else ++ ld_shlibs=no ++ fi ++ ;; ++ os2*) ++ hardcode_libdir_flag_spec='-L$libdir' ++ hardcode_minus_L=yes ++ ;; ++ osf3*) ++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ hardcode_libdir_separator=: ++ ;; ++ osf4* | osf5*) ++ if test "$GCC" = yes; then ++ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ else ++ # Both cc and cxx compiler support -rpath directly ++ hardcode_libdir_flag_spec='-rpath $libdir' ++ fi ++ hardcode_libdir_separator=: ++ ;; ++ solaris*) ++ hardcode_libdir_flag_spec='-R$libdir' ++ ;; ++ sunos4*) ++ hardcode_libdir_flag_spec='-L$libdir' ++ hardcode_direct=yes ++ hardcode_minus_L=yes ++ ;; ++ sysv4) ++ case $host_vendor in ++ sni) ++ hardcode_direct=yes # is this really true??? ++ ;; ++ siemens) ++ hardcode_direct=no ++ ;; ++ motorola) ++ hardcode_direct=no #Motorola manual says yes, but my tests say they lie ++ ;; ++ esac ++ ;; ++ sysv4.3*) ++ ;; ++ sysv4*MP*) ++ if test -d /usr/nec; then ++ ld_shlibs=yes ++ fi ++ ;; ++ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) ++ ;; ++ sysv5* | sco3.2v5* | sco5v6*) ++ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' ++ hardcode_libdir_separator=':' ++ ;; ++ uts4*) ++ hardcode_libdir_flag_spec='-L$libdir' ++ ;; ++ *) ++ ld_shlibs=no ++ ;; ++ esac ++fi ++ ++# Check dynamic linker characteristics ++# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. ++# Unlike libtool.m4, here we don't care about _all_ names of the library, but ++# only about the one the linker finds when passed -lNAME. This is the last ++# element of library_names_spec in libtool.m4, or possibly two of them if the ++# linker has special search rules. ++library_names_spec= # the last element of library_names_spec in libtool.m4 ++libname_spec='lib$name' ++case "$host_os" in ++ aix3*) ++ library_names_spec='$libname.a' ++ ;; ++ aix[4-9]*) ++ library_names_spec='$libname$shrext' ++ ;; ++ amigaos*) ++ library_names_spec='$libname.a' ++ ;; ++ beos*) ++ library_names_spec='$libname$shrext' ++ ;; ++ bsdi[45]*) ++ library_names_spec='$libname$shrext' ++ ;; ++ cygwin* | mingw* | pw32* | cegcc*) ++ shrext=.dll ++ library_names_spec='$libname.dll.a $libname.lib' ++ ;; ++ darwin* | rhapsody*) ++ shrext=.dylib ++ library_names_spec='$libname$shrext' ++ ;; ++ dgux*) ++ library_names_spec='$libname$shrext' ++ ;; ++ freebsd1*) ++ ;; ++ freebsd* | dragonfly*) ++ case "$host_os" in ++ freebsd[123]*) ++ library_names_spec='$libname$shrext$versuffix' ;; ++ *) ++ library_names_spec='$libname$shrext' ;; ++ esac ++ ;; ++ gnu*) ++ library_names_spec='$libname$shrext' ++ ;; ++ hpux9* | hpux10* | hpux11*) ++ case $host_cpu in ++ ia64*) ++ shrext=.so ++ ;; ++ hppa*64*) ++ shrext=.sl ++ ;; ++ *) ++ shrext=.sl ++ ;; ++ esac ++ library_names_spec='$libname$shrext' ++ ;; ++ interix[3-9]*) ++ library_names_spec='$libname$shrext' ++ ;; ++ irix5* | irix6* | nonstopux*) ++ library_names_spec='$libname$shrext' ++ case "$host_os" in ++ irix5* | nonstopux*) ++ libsuff= shlibsuff= ++ ;; ++ *) ++ case $LD in ++ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; ++ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; ++ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; ++ *) libsuff= shlibsuff= ;; ++ esac ++ ;; ++ esac ++ ;; ++ linux*oldld* | linux*aout* | linux*coff*) ++ ;; ++ linux* | k*bsd*-gnu) ++ library_names_spec='$libname$shrext' ++ ;; ++ knetbsd*-gnu) ++ library_names_spec='$libname$shrext' ++ ;; ++ netbsd*) ++ library_names_spec='$libname$shrext' ++ ;; ++ newsos6) ++ library_names_spec='$libname$shrext' ++ ;; ++ nto-qnx*) ++ library_names_spec='$libname$shrext' ++ ;; ++ openbsd*) ++ library_names_spec='$libname$shrext$versuffix' ++ ;; ++ os2*) ++ libname_spec='$name' ++ shrext=.dll ++ library_names_spec='$libname.a' ++ ;; ++ osf3* | osf4* | osf5*) ++ library_names_spec='$libname$shrext' ++ ;; ++ rdos*) ++ ;; ++ solaris*) ++ library_names_spec='$libname$shrext' ++ ;; ++ sunos4*) ++ library_names_spec='$libname$shrext$versuffix' ++ ;; ++ sysv4 | sysv4.3*) ++ library_names_spec='$libname$shrext' ++ ;; ++ sysv4*MP*) ++ library_names_spec='$libname$shrext' ++ ;; ++ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) ++ library_names_spec='$libname$shrext' ++ ;; ++ uts4*) ++ library_names_spec='$libname$shrext' ++ ;; ++esac ++ ++sed_quote_subst='s/\(["`$\\]\)/\\\1/g' ++escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` ++shlibext=`echo "$shrext" | sed -e 's,^\.,,'` ++escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` ++escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` ++escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` ++ ++LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < + +Index: host-cloop-2.634-1/Makefile +=================================================================== +--- host-cloop-2.634-1.orig/Makefile 2010-12-16 09:17:52.826555645 +0100 ++++ host-cloop-2.634-1/Makefile 2010-12-16 09:18:57.208713338 +0100 +@@ -15,7 +15,7 @@ + endif + + ifdef APPSONLY +-CFLAGS:=-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -s -I. -fno-strict-aliasing -fno-common -fomit-frame-pointer ++CLOOP_CFLAGS:=-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -s -I. -fno-strict-aliasing -fno-common -fomit-frame-pointer + endif + + KERNOBJ:=compressed_loop.o +@@ -53,10 +53,10 @@ + ( cd advancecomp-1.15 ; ./configure && $(MAKE) advfs ) + + extract_compressed_fs: extract_compressed_fs.c +- $(CC) -Wall -O2 -s -o $@ $< -lz ++ $(CC) $(CFLAGS) $(CLOOP_CFLAGS) $(LDFLAGS) -Wall -O2 -s -o $@ $< -lz + + cloop_suspend: cloop_suspend.o +- $(CC) -o $@ $< ++ $(CC) $(CFLAGS) $(CLOOP_CFLAGS) $(LDFLAGS) -o $@ $< + + clean: + rm -rf create_compressed_fs extract_compressed_fs zoom *.o *.ko Module.symvers .cloop* .compressed_loop.* .tmp* diff --git a/package/cloop/cloop.hash b/package/cloop/cloop.hash new file mode 100644 index 0000000000..9acbceb05d --- /dev/null +++ b/package/cloop/cloop.hash @@ -0,0 +1,2 @@ +# From http://debian-knoppix.alioth.debian.org/packages/sources/cloop/cloop_2.634-1.dsc +sha256 d6d03e2368e19f9c6c3a313e9c34cf0620d129ce26132a8805580d953769dbbd cloop_2.634-1.tar.gz diff --git a/package/cloop/cloop.mk b/package/cloop/cloop.mk new file mode 100644 index 0000000000..caed3f49a3 --- /dev/null +++ b/package/cloop/cloop.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# cloop +# +################################################################################ + +CLOOP_VERSION = 2.634-1 +CLOOP_SOURCE = cloop_$(CLOOP_VERSION).tar.gz +CLOOP_SITE = http://debian-knoppix.alioth.debian.org/packages/sources/cloop +CLOOP_LICENSE = GPLv2 (module), GPLv2+ (advancecomp) +CLOOP_LICENSE_FILES = README advancecomp-1.15/COPYING + +HOST_CLOOP_DEPENDENCIES = host-zlib + +define HOST_CLOOP_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE1) -C $(@D) APPSONLY=yes +endef + +define HOST_CLOOP_INSTALL_CMDS + $(INSTALL) -m 0755 -d $(HOST_DIR)/usr/bin + $(INSTALL) -m 755 $(@D)/create_compressed_fs $(HOST_DIR)/usr/bin + $(INSTALL) -m 755 $(@D)/extract_compressed_fs $(HOST_DIR)/usr/bin +endef + +$(eval $(host-generic-package)) diff --git a/package/cmake/0001-rename_cmake_rootfile.patch b/package/cmake/0001-rename_cmake_rootfile.patch new file mode 100644 index 0000000000..915b7e32bb --- /dev/null +++ b/package/cmake/0001-rename_cmake_rootfile.patch @@ -0,0 +1,23 @@ +ctest fails on the target, because it cannot find CMake.cmake inside +CMAKE_DATA_DIR (typically set to "/usr/share/cmake-3.0"): all *.cmake +files are removed at build time via the target-finalize rule. + +This buildroot-specific patch makes sure ctest looks also for +"Modules/CMake.cmake.ctest" before complaining + +Signed-off-by: Davide Viti + +--- cmake-3.0.2/Source/cmake.cxx~ 2014-09-11 15:24:01.000000000 +0200 ++++ cmake-3.0.2/Source/cmake.cxx 2014-11-25 15:48:04.461033690 +0100 +@@ -957,7 +957,10 @@ + "Path to cpack program executable.", cmCacheManager::INTERNAL); + #endif + if(!cmSystemTools::FileExists( +- (cmSystemTools::GetCMakeRoot()+"/Modules/CMake.cmake").c_str())) ++ (cmSystemTools::GetCMakeRoot()+"/Modules/CMake.cmake").c_str()) && ++ !cmSystemTools::FileExists( ++ (cmSystemTools::GetCMakeRoot()+"/Modules/CMake.cmake.ctest").c_str()) ++ ) + { + // couldn't find modules + cmSystemTools::Error("Could not find CMAKE_ROOT !!!\n" diff --git a/package/cmake/Config.in b/package/cmake/Config.in new file mode 100644 index 0000000000..6f04a4ad39 --- /dev/null +++ b/package/cmake/Config.in @@ -0,0 +1,40 @@ +config BR2_PACKAGE_CMAKE_ARCH_SUPPORTS + bool + default y + depends on BR2_arm || BR2_armeb || BR2_aarch64 || \ + BR2_m68k || BR2_mips || BR2_mips64 || \ + BR2_mipsel || BR2_mips64el || BR2_powerpc || \ + BR2_powerpc64 || BR2_powerpc64le || BR2_sparc || \ + BR2_i386 || BR2_x86_64 || BR2_xtensa + +config BR2_PACKAGE_CMAKE + bool + +config BR2_PACKAGE_CMAKE_CTEST + bool "ctest" + select BR2_PACKAGE_CMAKE + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_JSONCPP + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBARCHIVE + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_XZ + depends on BR2_PACKAGE_CMAKE_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # from jsoncpp + depends on BR2_USE_WCHAR # libarchive + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + help + CTest is a testing tool distributed as a part of CMake. It + can be used to automate updating (using CVS for example), + configuring, building, testing, performing memory checking, + performing coverage, and submitting results to a CDash or + Dart dashboard system. + + http://www.cmake.org/ + +comment "ctest needs a toolchain w/ C++, wchar, dynamic library, gcc >= 4.7" + depends on BR2_PACKAGE_CMAKE_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 diff --git a/package/cmake/cmake.hash b/package/cmake/cmake.hash new file mode 100644 index 0000000000..e40d4ea39a --- /dev/null +++ b/package/cmake/cmake.hash @@ -0,0 +1,2 @@ +# From http://www.cmake.org/files/v3.5/cmake-3.5.2-SHA-256.txt +sha256 92d8410d3d981bb881dfff2aed466da55a58d34c7390d50449aa59b32bb5e62a cmake-3.5.2.tar.gz diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk new file mode 100644 index 0000000000..a776b147e0 --- /dev/null +++ b/package/cmake/cmake.mk @@ -0,0 +1,72 @@ +################################################################################ +# +# cmake +# +################################################################################ + +CMAKE_VERSION_MAJOR = 3.5 +CMAKE_VERSION = $(CMAKE_VERSION_MAJOR).2 +CMAKE_SITE = https://cmake.org/files/v$(CMAKE_VERSION_MAJOR) +CMAKE_LICENSE = BSD-3c +CMAKE_LICENSE_FILES = Copyright.txt + +HOST_CMAKE_DEPENDENCIES = host-pkgconf +CMAKE_DEPENDENCIES = zlib jsoncpp libcurl libarchive expat bzip2 xz + +CMAKE_CONF_OPTS = \ + -DKWSYS_LFS_WORKS=TRUE \ + -DKWSYS_CHAR_IS_SIGNED=TRUE \ + -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ + -DCTEST_USE_XMLRPC=OFF \ + -DBUILD_CursesDialog=OFF + +# Get rid of -I* options from $(HOST_CPPFLAGS) to prevent that a +# header available in $(HOST_DIR)/usr/include is used instead of a +# CMake internal header, e.g. lzma* headers of the xz package +HOST_CMAKE_CFLAGS = $(shell echo $(HOST_CFLAGS) | sed -r "s%$(HOST_CPPFLAGS)%%") +HOST_CMAKE_CXXFLAGS = $(shell echo $(HOST_CXXFLAGS) | sed -r "s%$(HOST_CPPFLAGS)%%") + +define HOST_CMAKE_CONFIGURE_CMDS + (cd $(@D); \ + LDFLAGS="$(HOST_LDFLAGS)" \ + CFLAGS="$(HOST_CMAKE_CFLAGS)" \ + ./bootstrap --prefix=$(HOST_DIR)/usr \ + --parallel=$(PARALLEL_JOBS) -- \ + -DCMAKE_C_FLAGS="$(HOST_CMAKE_CFLAGS)" \ + -DCMAKE_CXX_FLAGS="$(HOST_CMAKE_CXXFLAGS)" \ + -DCMAKE_EXE_LINKER_FLAGS="$(HOST_LDFLAGS)" \ + -DBUILD_CursesDialog=OFF \ + ) +endef + +define HOST_CMAKE_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define HOST_CMAKE_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install/fast +endef + +define CMAKE_REMOVE_EXTRA_DATA + rm $(TARGET_DIR)/usr/bin/{cmake,cpack} + rm -fr $(TARGET_DIR)/usr/share/cmake-$(CMAKE_VERSION_MAJOR)/{completions,editors} + rm -fr $(TARGET_DIR)/usr/share/cmake-$(CMAKE_VERSION_MAJOR)/{Help,include} +endef + +define CMAKE_INSTALL_CTEST_CFG_FILE + $(INSTALL) -m 0644 -D $(@D)/Modules/CMake.cmake \ + $(TARGET_DIR)/usr/share/cmake-$(CMAKE_VERSION_MAJOR)/Modules/CMake.cmake.ctest +endef + +CMAKE_POST_INSTALL_TARGET_HOOKS += CMAKE_REMOVE_EXTRA_DATA +CMAKE_POST_INSTALL_TARGET_HOOKS += CMAKE_INSTALL_CTEST_CFG_FILE + +define CMAKE_INSTALL_TARGET_CMDS + (cd $(@D); \ + $(HOST_MAKE_ENV) DESTDIR=$(TARGET_DIR) \ + cmake -P cmake_install.cmake \ + ) +endef + +$(eval $(cmake-package)) +$(eval $(host-generic-package)) diff --git a/package/collectd/Config.in b/package/collectd/Config.in new file mode 100644 index 0000000000..71301ec18b --- /dev/null +++ b/package/collectd/Config.in @@ -0,0 +1,559 @@ +config BR2_PACKAGE_COLLECTD + bool "collectd" + # Uses fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + collectd is a daemon which collects system performance + statistics periodically and provides mechanisms to store + the values in a variety of ways, for example in RRD files. + + http://collectd.org/ + +if BR2_PACKAGE_COLLECTD + +menu "match plugins" + +config BR2_PACKAGE_COLLECTD_EMPTY_COUNTER + bool "empty counter" + help + Match counter values which are currently zero. + +config BR2_PACKAGE_COLLECTD_HASHED + bool "hashed" + help + Match values using a hash function of the hostname. + +config BR2_PACKAGE_COLLECTD_REGEX + bool "regex" + help + Match values by their identifier based on regular expressions. + +config BR2_PACKAGE_COLLECTD_TIMEDIFF + bool "timediff" + help + Match values with an invalid timestamp. + +config BR2_PACKAGE_COLLECTD_VALUE + bool "value" + help + Select values by their data sources' values. +endmenu + +menu "misc plugins" + +config BR2_PACKAGE_COLLECTD_AGGREGATION + bool "aggregation" + help + The Aggregate plugin allows to aggregate multiple values into + a single value using one or several consolidation functions, + e.g. summation and average. + +config BR2_PACKAGE_COLLECTD_LOGFILE + bool "logfile" + default y + help + Writes log messages to a file or STDOUT/STDERR. + +config BR2_PACKAGE_COLLECTD_LOGSTASH + bool "logstash" + select BR2_PACKAGE_YAJL + help + Writes log messages formatted as logstash JSON events. + +config BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL + bool "notify_email" + depends on !BR2_STATIC_LIBS # libesmtp + select BR2_PACKAGE_LIBESMTP + select BR2_PACKAGE_OPENSSL + help + Send an E-mail with the notification message to the + configured recipients. + +comment "notify_email needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_COLLECTD_SYSLOG + bool "syslog" + default y + help + Logs to the standard UNIX logging mechanism. + +config BR2_PACKAGE_COLLECTD_THRESHOLD + bool "threshold" + help + Checks values against configured thresholds and creates notifications + if values are out of bounds. + +endmenu + +menu "read plugins" + +comment "Select at least one for collectd to be useful" + +config BR2_PACKAGE_COLLECTD_APACHE + bool "apache" + select BR2_PACKAGE_LIBCURL + help + Collects Apache's mod_status information. + +config BR2_PACKAGE_COLLECTD_APCUPS + bool "apcups" + help + Collects UPS statistics from apcupsd. + +config BR2_PACKAGE_COLLECTD_BATTERY + bool "battery" + help + Collects the battery's charge, the drawn current and voltage. + +config BR2_PACKAGE_COLLECTD_BIND + bool "bind" + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBXML2 + help + Collects BIND DNS statistics. + +config BR2_PACKAGE_COLLECTD_CEPH + bool "ceph" + select BR2_PACKAGE_YAJL + help + Statistics from the Ceph distributed storage system. + +config BR2_PACKAGE_COLLECTD_CGROUPS + bool "cgroups" + help + Collects CGroups CPU usage accounting. + +config BR2_PACKAGE_COLLECTD_CONNTRACK + bool "conntrack" + help + Collects the number of entries in Linux's connection tracking table. + +config BR2_PACKAGE_COLLECTD_CONTEXTSWITCH + bool "contextswitch" + help + Collects the number of context switches done by the operating system. + +config BR2_PACKAGE_COLLECTD_CPU + bool "cpu" + help + Collects the amount of time spent by the CPU in various states. + +config BR2_PACKAGE_COLLECTD_CPUFREQ + bool "cpufreq" + help + Collects the current CPU's frequency. + +config BR2_PACKAGE_COLLECTD_CURL + bool "curl" + select BR2_PACKAGE_LIBCURL + help + Uses libcurl to read files and then parses them according + to the configuration. + +config BR2_PACKAGE_COLLECTD_CURL_JSON + bool "curl-json" + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_YAJL + help + Queries JSON data using the cURL library and parses it + according to the user's configuration using YAJL. + +config BR2_PACKAGE_COLLECTD_CURL_XML + bool "curl-xml" + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBXML2 + help + Reads files using libcurl and parses it as XML. + +config BR2_PACKAGE_COLLECTD_DF + bool "df" + help + Collects file system usage information. + +config BR2_PACKAGE_COLLECTD_DISK + bool "disk" + help + Collects performance statistics of hard-disks and partitions. + +config BR2_PACKAGE_COLLECTD_DNS + bool "dns" + select BR2_PACKAGE_LIBPCAP + help + Collects statistics of DNS traffic using libpcap. + +config BR2_PACKAGE_COLLECTD_DRBD + bool "drbd" + help + Collect individual drbd resource statistics. + +config BR2_PACKAGE_COLLECTD_ENTROPY + bool "entropy" + help + Collects the available entropy on a system. + +config BR2_PACKAGE_COLLECTD_ETHSTAT + bool "ethstat" + help + Collects network interface card statistics. + +config BR2_PACKAGE_COLLECTD_EXEC + bool "exec" + help + Executes scripts and reads values back that are printed + to STDOUT by that program. + +config BR2_PACKAGE_COLLECTD_FHCOUNT + bool "fhcount" + help + File handles statistics. + +config BR2_PACKAGE_COLLECTD_FILECOUNT + bool "filecount" + help + Counts the number of files in a directory and all its subdirectories. + +config BR2_PACKAGE_COLLECTD_FSCACHE + bool "fscache" + help + Collects information about the file-system based caching + infrastructure for network file-systems and other slow media. + +config BR2_PACKAGE_COLLECTD_INTERFACE + bool "interface" + help + Collects information about the traffic of network interfaces. + +config BR2_PACKAGE_COLLECTD_IPC + bool "ipc" + help + IPC counters: semaphores used, number of allocated segments + in shared memory and more. + +config BR2_PACKAGE_COLLECTD_IPTABLES + bool "iptables" + select BR2_PACKAGE_IPTABLES + help + Gather statistics from iptables packet filter. + +config BR2_PACKAGE_COLLECTD_IPVS + bool "ipvs" + help + Extracts statistics from IP Virtual Server (IPVS), the + transport-layer load-balancer of the LVS project. + It stores traffic and connections history for each of the + Real Servers (RS) behind a local Virtual Server (VS). + Collectd must be run on Directors (in LVS jargon). + +config BR2_PACKAGE_COLLECTD_IRQ + bool "irq" + help + Collects the number of interrupts. + +config BR2_PACKAGE_COLLECTD_LOAD + bool "load" + help + Collects the system load. + +config BR2_PACKAGE_COLLECTD_MD + bool "md" + help + Collects software-RAID device information. + +config BR2_PACKAGE_COLLECTD_MEMCACHEC + bool "memcachec" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_LIBMEMCACHED + help + Query and parse data from a memcache daemon. + +comment "memcachec needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_COLLECTD_MEMCACHED + bool "memcached" + help + Collects statistics from a memcached daemon. + +config BR2_PACKAGE_COLLECTD_MEMORY + bool "memory" + help + Collects physical memory utilization. + +config BR2_PACKAGE_COLLECTD_MODBUS + bool "modbus" + select BR2_PACKAGE_LIBMODBUS + help + Reads register values from a modbus "slave" via Modbus/TCP. + +config BR2_PACKAGE_COLLECTD_MYSQL + bool "mysql" + depends on BR2_INSTALL_LIBSTDCPP # mysql + depends on BR2_USE_MMU # mysql + depends on BR2_TOOLCHAIN_HAS_THREADS # mysql + select BR2_PACKAGE_MYSQL + help + Connects to a MySQL database and issues a "show status" command. + +config BR2_PACKAGE_COLLECTD_NETLINK + bool "netlink" + select BR2_PACKAGE_LIBMNL + help + Get statistics for interfaces, qdiscs, classes, and filters. + +config BR2_PACKAGE_COLLECTD_NFS + bool "nfs" + help + Collects information about the usage of the Network File System. + +config BR2_PACKAGE_COLLECTD_NGINX + bool "nginx" + select BR2_PACKAGE_LIBCURL + help + Collects the number of requests handled by the nginx daemon + since startup and the number of current connections by state. + +config BR2_PACKAGE_COLLECTD_NTPD + bool "ntpd" + help + Queries an NTP server and extracts parameters. + +config BR2_PACKAGE_COLLECTD_OLSRD + bool "olsrd" + help + Reads information about meshed networks from olsrd. + +config BR2_PACKAGE_COLLECTD_OPENLDAP + bool "openldap" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_OPENLDAP + help + Read monitoring information from OpenLDAP's cn=Monitor subtree. + +comment "openldap support needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_COLLECTD_OPENVPN + bool "openvpn" + help + Reads the status file of OpenVPN to collect statistics. + +config BR2_PACKAGE_COLLECTD_PING + bool "ping" + select BR2_PACKAGE_LIBOPING + help + Mesures network latency using ICMP "echo requests". + +config BR2_PACKAGE_COLLECTD_POSTGRESQL + bool "postgresql" + select BR2_PACKAGE_POSTGRESQL + help + Connects to and executes SQL statements on a PostgreSQL + database. It then reads back the results and, depending on the + configuration, the returned values are then converted into + collectd “value listsâ€. + +config BR2_PACKAGE_COLLECTD_PROCESSES + bool "processes" + help + Collects the number of processes gruped by state. + +config BR2_PACKAGE_COLLECTD_PROTOCOLS + bool "protocols" + help + Collects information about the network protocols. + +config BR2_PACKAGE_COLLECTD_SENSORS + bool "sensors" + select BR2_PACKAGE_LM_SENSORS + help + Collects data from lm-sensors. + +config BR2_PACKAGE_COLLECTD_SERIAL + bool "serial" + help + Collects the traffic on serial interfaces. + +config BR2_PACKAGE_COLLECTD_SMART + bool "SMART" + depends on BR2_PACKAGE_HAS_UDEV # libatasmart + select BR2_PACKAGE_LIBATASMART + help + Collect SMART statistics, notably load cycle count, temperature + and bad sectors. + +comment "SMART requires udev to be enabled" + depends on !BR2_PACKAGE_HAS_UDEV + +config BR2_PACKAGE_COLLECTD_STATSD + bool "StatsD" + help + StatsD network protocol to allow clients to report "events". + +config BR2_PACKAGE_COLLECTD_SNMP + bool "snmp" + select BR2_PACKAGE_NETSNMP + help + Reads values from SNMP devices. + +config BR2_PACKAGE_COLLECTD_SWAP + bool "swap" + help + Collects the amount of memory currently written to disk. + +config BR2_PACKAGE_COLLECTD_TABLE + bool "table" + help + Parses table-like structured plain-text files. + +config BR2_PACKAGE_COLLECTD_TAIL + bool "tail" + help + Tails log files and each line is given to one or more matches + which test if the line is relevant for any statistics. + +config BR2_PACKAGE_COLLECTD_TAIL_CSV + bool "tail csv" + help + Follows (tails) files in CSV format, parses each line and submits + extracted values. + +config BR2_PACKAGE_COLLECTD_TCPCONNS + bool "tcpconns" + help + Counts the number of TCP connections to/from a specified port. + +config BR2_PACKAGE_COLLECTD_THERMAL + bool "thermal" + help + Reads ACPI thermal zone information. + +config BR2_PACKAGE_COLLECTD_UPTIME + bool "uptime" + help + Keeps track of the system uptime. + +config BR2_PACKAGE_COLLECTD_USERS + bool "users" + help + Counts the number of users currently logged in. + +config BR2_PACKAGE_COLLECTD_VMEM + bool "vmem" + help + Collects information about the virtual memory subsystem. + +config BR2_PACKAGE_COLLECTD_WIRELESS + bool "wireless" + help + Collects signal quality, power and noise ratio for WLAN cards. + +config BR2_PACKAGE_COLLECTD_ZOOKEEPER + bool "zookeeper" + help + Read data from Zookeeper's MNTR command. + +endmenu + +menu "target plugins" + +config BR2_PACKAGE_COLLECTD_NOTIFICATION + bool "notification" + help + Create and dispatch a notification. + +config BR2_PACKAGE_COLLECTD_REPLACE + bool "replace" + help + Replace parts of an identifier using regular expressions. + +config BR2_PACKAGE_COLLECTD_SCALE + bool "scale" + help + Scale (multiply) values by an arbitrary number. + +config BR2_PACKAGE_COLLECTD_SET + bool "set" + help + Set (overwrite) entire parts of an identifier. + +endmenu + +menu "write plugins" + +comment "Select at least one for collectd to be useful" + +config BR2_PACKAGE_COLLECTD_CSV + bool "csv" + help + Writes values to a plain-text file in Comma Separated Values format. + +config BR2_PACKAGE_COLLECTD_GRAPHITE + bool "graphite" + help + Writes data collected to Carbon (Graphite's) storage API. + http://graphite.wikidot.com/start + +config BR2_PACKAGE_COLLECTD_NETWORK + bool "network" + help + Send/receive values from other instances of collectd. + +config BR2_PACKAGE_COLLECTD_RRDTOOL + bool "rrdtool" + depends on BR2_USE_WCHAR # rrdtool + select BR2_PACKAGE_RRDTOOL + help + Writes values to RRD-files. + +comment "rrdtool support needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_COLLECTD_RIEMANN + bool "riemann" + depends on BR2_INSTALL_LIBSTDCPP # protobuf + # protobuf-c -> host-protobuf + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_PACKAGE_PROTOBUF_C + select BR2_PACKAGE_LIBTOOL + help + Sends data to Riemann, a stream processing and monitoring system. + +config BR2_PACKAGE_COLLECTD_UNIXSOCK + bool "unixsock" + help + Opens a UNIX domain socket and accepts connections. + One can send commands to the daemon and receive information. + +config BR2_PACKAGE_COLLECTD_WRITEHTTP + bool "write_http" + select BR2_PACKAGE_LIBCURL + help + Sends values collected to a web-server using HTTP POST and PUTVAL. + +config BR2_PACKAGE_COLLECTD_WRITELOG + bool "write_log" + help + Writes data to the log. + +config BR2_PACKAGE_COLLECTD_WRITESENSU + bool "write_sensu" + help + Sends data to Sensu, a stream processing and monitoring system, + via the Sensu client local TCP socket. + +config BR2_PACKAGE_COLLECTD_WRITETSDB + bool "write_tsdb" + help + Sends data OpenTSDB, a scalable no master, no shared state time + series database. + +endmenu + +endif + +comment "collectd needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on BR2_USE_MMU diff --git a/package/collectd/collectd.hash b/package/collectd/collectd.hash new file mode 100644 index 0000000000..3d982fec8b --- /dev/null +++ b/package/collectd/collectd.hash @@ -0,0 +1,2 @@ +# From https://collectd.org/files/SHA256SUM +sha256 f9c5d526e1f0429a7db1ccd90bdf9e23923a2fd43b7285cfda8f0341e5c0bc3f collectd-5.5.1.tar.bz2 diff --git a/package/collectd/collectd.mk b/package/collectd/collectd.mk new file mode 100644 index 0000000000..78e24b8a0f --- /dev/null +++ b/package/collectd/collectd.mk @@ -0,0 +1,196 @@ +################################################################################ +# +# collectd +# +################################################################################ + +COLLECTD_VERSION = 5.5.1 +COLLECTD_SITE = http://collectd.org/files +COLLECTD_SOURCE = collectd-$(COLLECTD_VERSION).tar.bz2 +COLLECTD_CONF_ENV = ac_cv_lib_yajl_yajl_alloc=yes +COLLECTD_INSTALL_STAGING = YES +COLLECTD_LICENSE = GPLv2, LGPLv2.1 +COLLECTD_LICENSE_FILES = COPYING + +# These require unmet dependencies, are fringe, pointless or deprecated +COLLECTD_PLUGINS_DISABLE = \ + amqp apple_sensors aquaero ascent barometer dbi email \ + gmond hddtemp ipmi java libvirt lpar lvm madwifi mbmon \ + mic multimeter netapp notify_desktop notify_email numa \ + nut onewire oracle perl pf pinba powerdns python redis routeros \ + rrdcached sigrok tape target_v5upgrade teamspeak2 ted \ + tokyotyrant turbostat uuid varnish virt vserver write_kafka \ + write_mongodb write_redis xmms zfs_arc + +COLLECTD_CONF_ENV += LIBS="-lm" + +COLLECTD_CONF_OPTS += \ + --with-nan-emulation \ + --with-fp-layout=nothing \ + --with-perl-bindings=no \ + $(foreach p, $(COLLECTD_PLUGINS_DISABLE), --disable-$(p)) \ + $(if $(BR2_PACKAGE_COLLECTD_AGGREGATION),--enable-aggregation,--disable-aggregation) \ + $(if $(BR2_PACKAGE_COLLECTD_APACHE),--enable-apache,--disable-apache) \ + $(if $(BR2_PACKAGE_COLLECTD_APCUPS),--enable-apcups,--disable-apcups) \ + $(if $(BR2_PACKAGE_COLLECTD_BATTERY),--enable-battery,--disable-battery) \ + $(if $(BR2_PACKAGE_COLLECTD_BIND),--enable-bind,--disable-bind) \ + $(if $(BR2_PACKAGE_COLLECTD_CEPH),--enable-ceph,--disable-ceph) \ + $(if $(BR2_PACKAGE_COLLECTD_CGROUPS),--enable-cgroups,--disable-cgroups) \ + $(if $(BR2_PACKAGE_COLLECTD_CONNTRACK),--enable-conntrack,--disable-conntrack) \ + $(if $(BR2_PACKAGE_COLLECTD_CONTEXTSWITCH),--enable-contextswitch,--disable-contextswitch) \ + $(if $(BR2_PACKAGE_COLLECTD_CPU),--enable-cpu,--disable-cpu) \ + $(if $(BR2_PACKAGE_COLLECTD_CPUFREQ),--enable-cpufreq,--disable-cpufreq) \ + $(if $(BR2_PACKAGE_COLLECTD_CSV),--enable-csv,--disable-csv) \ + $(if $(BR2_PACKAGE_COLLECTD_CURL),--enable-curl,--disable-curl) \ + $(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),--enable-curl_json,--disable-curl_json) \ + $(if $(BR2_PACKAGE_COLLECTD_CURL_XML),--enable-curl_xml,--disable-curl_xml) \ + $(if $(BR2_PACKAGE_COLLECTD_DF),--enable-df,--disable-df) \ + $(if $(BR2_PACKAGE_COLLECTD_DISK),--enable-disk,--disable-disk) \ + $(if $(BR2_PACKAGE_COLLECTD_DNS),--enable-dns,--disable-dns) \ + $(if $(BR2_PACKAGE_COLLECTD_DRBD),--enable-drbd,--disable-drbd) \ + $(if $(BR2_PACKAGE_COLLECTD_EMPTY_COUNTER),--enable-match_empty_counter,--disable-match_empty_counter) \ + $(if $(BR2_PACKAGE_COLLECTD_ENTROPY),--enable-entropy,--disable-entropy) \ + $(if $(BR2_PACKAGE_COLLECTD_ETHSTAT),--enable-ethstat,--disable-ethstat) \ + $(if $(BR2_PACKAGE_COLLECTD_EXEC),--enable-exec,--disable-exec) \ + $(if $(BR2_PACKAGE_COLLECTD_FHCOUNT),--enable-fhcount,--disable-fhcount) \ + $(if $(BR2_PACKAGE_COLLECTD_FILECOUNT),--enable-filecount,--disable-filecount) \ + $(if $(BR2_PACKAGE_COLLECTD_FSCACHE),--enable-fscache,--disable-fscache) \ + $(if $(BR2_PACKAGE_COLLECTD_GRAPHITE),--enable-write_graphite,--disable-write_graphite) \ + $(if $(BR2_PACKAGE_COLLECTD_HASHED),--enable-match_hashed,--disable-match_hashed) \ + $(if $(BR2_PACKAGE_COLLECTD_INTERFACE),--enable-interface,--disable-interface) \ + $(if $(BR2_PACKAGE_COLLECTD_IPC),--enable-ipc,--disable-ipc) \ + $(if $(BR2_PACKAGE_COLLECTD_IPTABLES),--enable-iptables,--disable-iptables) \ + $(if $(BR2_PACKAGE_COLLECTD_IPVS),--enable-ipvs,--disable-ipvs) \ + $(if $(BR2_PACKAGE_COLLECTD_IRQ),--enable-irq,--disable-irq) \ + $(if $(BR2_PACKAGE_COLLECTD_LOAD),--enable-load,--disable-load) \ + $(if $(BR2_PACKAGE_COLLECTD_LOGFILE),--enable-logfile,--disable-logfile) \ + $(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),--enable-log_logstash,--disable-log_logstash) \ + $(if $(BR2_PACKAGE_COLLECTD_MD),--enable-md,--disable-md) \ + $(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),--enable-memcachec,--disable-memcachec) \ + $(if $(BR2_PACKAGE_COLLECTD_MEMCACHED),--enable-memcached,--disable-memcached) \ + $(if $(BR2_PACKAGE_COLLECTD_MEMORY),--enable-memory,--disable-memory) \ + $(if $(BR2_PACKAGE_COLLECTD_MODBUS),--enable-modbus,--disable-modbus) \ + $(if $(BR2_PACKAGE_COLLECTD_MYSQL),--enable-mysql,--disable-mysql) \ + $(if $(BR2_PACKAGE_COLLECTD_NETLINK),--enable-netlink,--disable-netlink) \ + $(if $(BR2_PACKAGE_COLLECTD_NETWORK),--enable-network,--disable-network) \ + $(if $(BR2_PACKAGE_COLLECTD_NFS),--enable-nfs,--disable-nfs) \ + $(if $(BR2_PACKAGE_COLLECTD_NGINX),--enable-nginx,--disable-nginx) \ + $(if $(BR2_PACKAGE_COLLECTD_NOTIFICATION),--enable-target_notification,--disable-target_notification) \ + $(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),--enable-notify_email,--disable-notify_email) \ + $(if $(BR2_PACKAGE_COLLECTD_NTPD),--enable-ntpd,--disable-ntpd) \ + $(if $(BR2_PACKAGE_COLLECTD_OLSRD),--enable-olsrd,--disable-olsrd) \ + $(if $(BR2_PACKAGE_COLLECTD_OPENLDAP),--enable-openldap,--disable-openldap) \ + $(if $(BR2_PACKAGE_COLLECTD_OPENVPN),--enable-openvpn,--disable-openvpn) \ + $(if $(BR2_PACKAGE_COLLECTD_PING),--enable-ping,--disable-ping) \ + $(if $(BR2_PACKAGE_COLLECTD_POSTGRESQL),--enable-postgresql,--disable-postgresql) \ + $(if $(BR2_PACKAGE_COLLECTD_PROCESSES),--enable-processes,--disable-processes) \ + $(if $(BR2_PACKAGE_COLLECTD_PROTOCOLS),--enable-protocols,--disable-protocols) \ + $(if $(BR2_PACKAGE_COLLECTD_REGEX),--enable-match_regex,--disable-match-regex) \ + $(if $(BR2_PACKAGE_COLLECTD_REPLACE),--enable-target_replace,--disable-target_replace) \ + $(if $(BR2_PACKAGE_COLLECTD_RIEMANN),--enable-write_riemann,--disable-write_riemann) \ + $(if $(BR2_PACKAGE_COLLECTD_RRDTOOL),--enable-rrdtool,--disable-rrdtool) \ + $(if $(BR2_PACKAGE_COLLECTD_SCALE),--enable-target_scale,--disable-target_scale) \ + $(if $(BR2_PACKAGE_COLLECTD_SENSORS),--enable-sensors,--disable-sensors) \ + $(if $(BR2_PACKAGE_COLLECTD_SERIAL),--enable-serial,--disable-serial) \ + $(if $(BR2_PACKAGE_COLLECTD_STATSD),--enable-statsd,--disable-statsd) \ + $(if $(BR2_PACKAGE_COLLECTD_SET),--enable-target_set,--disable-target_set) \ + $(if $(BR2_PACKAGE_COLLECTD_SMART),--enable-smart,--disable-smart) \ + $(if $(BR2_PACKAGE_COLLECTD_SNMP),--enable-snmp,--disable-snmp) \ + $(if $(BR2_PACKAGE_COLLECTD_SWAP),--enable-swap,--disable-swap) \ + $(if $(BR2_PACKAGE_COLLECTD_SYSLOG),--enable-syslog,--disable-syslog) \ + $(if $(BR2_PACKAGE_COLLECTD_TABLE),--enable-table,--disable-table) \ + $(if $(BR2_PACKAGE_COLLECTD_TAIL),--enable-tail,--disable-tail) \ + $(if $(BR2_PACKAGE_COLLECTD_TAIL_CSV),--enable-tail_csv,--disable-tail_csv) \ + $(if $(BR2_PACKAGE_COLLECTD_TCPCONNS),--enable-tcpconns,--disable-tcpconns) \ + $(if $(BR2_PACKAGE_COLLECTD_THERMAL),--enable-thermal,--disable-thermal) \ + $(if $(BR2_PACKAGE_COLLECTD_THRESHOLD),--enable-threshold,--disable-threshold) \ + $(if $(BR2_PACKAGE_COLLECTD_TIMEDIFF),--enable-match_timediff,--disable-match_timediff) \ + $(if $(BR2_PACKAGE_COLLECTD_UNIXSOCK),--enable-unixsock,--disable-unixsock) \ + $(if $(BR2_PACKAGE_COLLECTD_UPTIME),--enable-uptime,--disable-uptime) \ + $(if $(BR2_PACKAGE_COLLECTD_USERS),--enable-users,--disable-users) \ + $(if $(BR2_PACKAGE_COLLECTD_VALUE),--enable-match_value,--disable-match_value) \ + $(if $(BR2_PACKAGE_COLLECTD_VMEM),--enable-vmem,--disable-vmem) \ + $(if $(BR2_PACKAGE_COLLECTD_WIRELESS),--enable-wireless,--disable-wireless) \ + $(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),--enable-write_http,--disable-write_http) \ + $(if $(BR2_PACKAGE_COLLECTD_WRITELOG),--enable-write_log,--disable-write_log) \ + $(if $(BR2_PACKAGE_COLLECTD_WRITESENSU),--enable-write_sensu,--disable-write_sensu) \ + $(if $(BR2_PACKAGE_COLLECTD_WRITETSDB),--enable-write_tsdb,--disable-write_tsdb) \ + $(if $(BR2_PACKAGE_COLLECTD_ZOOKEEPER),--enable-zookeeper,--disable-zookeeper) + +COLLECTD_DEPENDENCIES = \ + host-pkgconf \ + $(if $(BR2_PACKAGE_COLLECTD_APACHE),libcurl) \ + $(if $(BR2_PACKAGE_COLLECTD_BIND),libcurl libxml2) \ + $(if $(BR2_PACKAGE_COLLECTD_CEPH),yajl) \ + $(if $(BR2_PACKAGE_COLLECTD_CURL),libcurl) \ + $(if $(BR2_PACKAGE_COLLECTD_CURL_JSON),libcurl yajl) \ + $(if $(BR2_PACKAGE_COLLECTD_CURL_XML),libcurl libxml2) \ + $(if $(BR2_PACKAGE_COLLECTD_DNS),libpcap) \ + $(if $(BR2_PACKAGE_COLLECTD_IPTABLES),iptables) \ + $(if $(BR2_PACKAGE_COLLECTD_LOGSTASH),yajl) \ + $(if $(BR2_PACKAGE_COLLECTD_MEMCACHEC),libmemcached) \ + $(if $(BR2_PACKAGE_COLLECTD_MODBUS),libmodbus) \ + $(if $(BR2_PACKAGE_COLLECTD_MYSQL),mysql) \ + $(if $(BR2_PACKAGE_COLLECTD_NETLINK),libmnl) \ + $(if $(BR2_PACKAGE_COLLECTD_NGINX),libcurl) \ + $(if $(BR2_PACKAGE_COLLECTD_NOTIFY_EMAIL),libesmtp) \ + $(if $(BR2_PACKAGE_COLLECTD_OPENLDAP),openldap) \ + $(if $(BR2_PACKAGE_COLLECTD_PING),liboping) \ + $(if $(BR2_PACKAGE_COLLECTD_POSTGRESQL),postgresql) \ + $(if $(BR2_PACKAGE_COLLECTD_RIEMANN),libtool protobuf-c) \ + $(if $(BR2_PACKAGE_COLLECTD_RRDTOOL),rrdtool) \ + $(if $(BR2_PACKAGE_COLLECTD_SENSORS),lm-sensors) \ + $(if $(BR2_PACKAGE_COLLECTD_SMART),libatasmart) \ + $(if $(BR2_PACKAGE_COLLECTD_SNMP),netsnmp) \ + $(if $(BR2_PACKAGE_COLLECTD_WRITEHTTP),libcurl) + +# include/library fixups +ifeq ($(BR2_PACKAGE_LIBCURL),y) +COLLECTD_CONF_OPTS += --with-libcurl=$(STAGING_DIR)/usr +endif +ifeq ($(BR2_PACKAGE_MYSQL),y) +COLLECTD_CONF_OPTS += --with-libmysql=$(STAGING_DIR)/usr +endif +ifeq ($(BR2_PACKAGE_NETSNMP),y) +COLLECTD_CONF_OPTS += --with-libnetsnmp=$(STAGING_DIR)/usr/bin/net-snmp-config +endif +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) +COLLECTD_CONF_OPTS += --with-libpq=$(STAGING_DIR)/usr/bin/pg_config +COLLECTD_CONF_ENV += LIBS="-lpthread -lm" +endif +ifeq ($(BR2_PACKAGE_YAJL),y) +COLLECTD_CONF_OPTS += --with-yajl=$(STAGING_DIR)/usr +endif + +# network can use libgcrypt +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +COLLECTD_DEPENDENCIES += libgcrypt +COLLECTD_CONF_OPTS += --with-libgcrypt=$(STAGING_DIR)/usr +COLLECTD_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +else +COLLECTD_CONF_OPTS += --with-libgcrypt=no +endif + +# released software should not break on minor warnings +define COLLECTD_DROP_WERROR + $(SED) 's/-Werror//' \ + $(@D)/src/Makefile.in $(@D)/src/libcollectdclient/Makefile.in +endef + +COLLECTD_POST_PATCH_HOOKS += COLLECTD_DROP_WERROR + +define COLLECTD_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install + rm -f $(TARGET_DIR)/usr/bin/collectd-nagios + rm -f $(TARGET_DIR)/usr/share/collectd/postgresql_default.conf +endef + +define COLLECTD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/collectd/collectd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/collectd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/collectd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/collectd.service +endef + +$(eval $(autotools-package)) diff --git a/package/collectd/collectd.service b/package/collectd/collectd.service new file mode 100644 index 0000000000..e203806f59 --- /dev/null +++ b/package/collectd/collectd.service @@ -0,0 +1,17 @@ +[Unit] +Description=Statistics collection and monitoring daemon +After=local-fs.target network.target +Requires=local-fs.target network.target +ConditionPathExists=/etc/collectd.conf + +[Service] +Type=notify +NotifyAccess=main +EnvironmentFile=-/etc/default/collectd +ExecStartPre=/usr/sbin/collectd -t +ExecStart=/usr/sbin/collectd +Restart=always +RestartSec=10 + +[Install] +WantedBy=multi-user.target diff --git a/package/comix-cursors/Config.in b/package/comix-cursors/Config.in new file mode 100644 index 0000000000..ac7a089c36 --- /dev/null +++ b/package/comix-cursors/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_COMIX_CURSORS + bool "comix-cursors" + help + X11 mouse theme with a comics feeling. + + http://kde-look.org/content/show.php/ComixCursors?content=32627 diff --git a/package/comix-cursors/comix-cursors.hash b/package/comix-cursors/comix-cursors.hash new file mode 100644 index 0000000000..d7f33ca078 --- /dev/null +++ b/package/comix-cursors/comix-cursors.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3109e4d19d930a6a2a5c3422ebaaa2002640169118f9b12c042bb64995f3ec31 ComixCursors-0.8.2.tar.bz2 diff --git a/package/comix-cursors/comix-cursors.mk b/package/comix-cursors/comix-cursors.mk new file mode 100644 index 0000000000..f8e8284055 --- /dev/null +++ b/package/comix-cursors/comix-cursors.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# comix-cursors +# +################################################################################ + +COMIX_CURSORS_VERSION = 0.8.2 +COMIX_CURSORS_SITE = http://limitland.de/downloads/comixcursors +COMIX_CURSORS_SOURCE = ComixCursors-$(COMIX_CURSORS_VERSION).tar.bz2 +COMIX_CURSORS_LICENSE = GPLv3 +COMIX_CURSORS_STRIP_COMPONENTS = 0 + +define COMIX_CURSORS_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/share/cursors/xorg-x11 + cp -a $(@D)/* \ + $(TARGET_DIR)/usr/share/cursors/xorg-x11 +endef + +$(eval $(generic-package)) diff --git a/package/connman-gtk/Config.in b/package/connman-gtk/Config.in new file mode 100644 index 0000000000..c7857d0efa --- /dev/null +++ b/package/connman-gtk/Config.in @@ -0,0 +1,20 @@ +comment "connman-gtk needs libgtk3 and a toolchain w/ wchar, threads, resolver, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS || !BR2_PACKAGE_LIBGTK3 + +config BR2_PACKAGE_CONNMAN_GTK + bool "connman-gtk" + depends on BR2_USE_WCHAR # libglib2, connman + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2, connman + depends on BR2_USE_MMU # libglib2 + depends on !BR2_STATIC_LIBS # connman + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # connman + depends on BR2_PACKAGE_LIBGTK3 + select BR2_PACKAGE_CONNMAN + select BR2_PACKAGE_LIBGLIB2 + help + GTK GUI for ConnMan. + + https://github.com/jgke/connman-gtk diff --git a/package/connman-gtk/connman-gtk.hash b/package/connman-gtk/connman-gtk.hash new file mode 100644 index 0000000000..d71e77d2c1 --- /dev/null +++ b/package/connman-gtk/connman-gtk.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 49bdc4769a7c508b0130e4705eef21aec9df1ea4f5c29fee48a0cae8db828fca connman-gtk-1.1.1.tar.bz2 diff --git a/package/connman-gtk/connman-gtk.mk b/package/connman-gtk/connman-gtk.mk new file mode 100644 index 0000000000..2c9c131477 --- /dev/null +++ b/package/connman-gtk/connman-gtk.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# connman-gtk +# +################################################################################ + +CONNMAN_GTK_VERSION = 1.1.1 +CONNMAN_GTK_SITE = https://github.com/jgke/connman-gtk/releases/download/v$(CONNMAN_GTK_VERSION) +CONNMAN_GTK_SOURCE = connman-gtk-$(CONNMAN_GTK_VERSION).tar.bz2 +CONNMAN_GTK_INSTALL_STAGING = YES +CONNMAN_GTK_DEPENDENCIES = host-intltool connman libglib2 libgtk3 +CONNMAN_GTK_LICENSE = GPLv2+ +CONNMAN_GTK_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/connman/0002-nat-build-failure.patch b/package/connman/0002-nat-build-failure.patch new file mode 100644 index 0000000000..0ab58501d0 --- /dev/null +++ b/package/connman/0002-nat-build-failure.patch @@ -0,0 +1,30 @@ +From 68f4b4f5b220f256b17ad2f084d61fe89f3632ae Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 19 Apr 2016 08:38:38 -0300 +Subject: [PATCH] nat: fix build failure + +_GNU_SOURCE needs to be defined so that O_CLOEXEC symbols can be found in +system header files. + +Signed-off-by: Gustavo Zacarias +--- +Status: submitted upstream + + src/nat.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/nat.c b/src/nat.c +index 33ae6df..62e21d4 100644 +--- a/src/nat.c ++++ b/src/nat.c +@@ -24,6 +24,7 @@ + #include + #endif + ++#define _GNU_SOURCE + #include + #include + #include +-- +2.7.3 + diff --git a/package/connman/Config.in b/package/connman/Config.in new file mode 100644 index 0000000000..f723a31aa8 --- /dev/null +++ b/package/connman/Config.in @@ -0,0 +1,72 @@ +config BR2_PACKAGE_CONNMAN + bool "connman" + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_IPTABLES + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2 + depends on BR2_USE_MMU # dbus, libglib2 + depends on !BR2_STATIC_LIBS # needs dlopen() + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + help + The Connection Manager (ConnMan) project provides a daemon + for managing internet connections within embedded devices + running the Linux operating system. + + For more information, see https://01.org/connman + +if BR2_PACKAGE_CONNMAN + +config BR2_PACKAGE_CONNMAN_ETHERNET + bool "enable Ethernet support" + default y + +config BR2_PACKAGE_CONNMAN_WIFI + bool "enable WiFi support" + select BR2_PACKAGE_WPA_SUPPLICANT # runtime + select BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW # runtime + help + Enable WiFi support (scan and static/dhcp interface + setup). ConnMan detects the start of wpa_supplicant + automatically. + +config BR2_PACKAGE_CONNMAN_WISPR + bool "enable WISPr support" + select BR2_PACKAGE_GNUTLS + help + Enable support for Wireless Internet Service Provider + roaming (WISPr). A RADIUS server is used to authenticate the + subscriber's credentials. + +config BR2_PACKAGE_CONNMAN_BLUETOOTH + bool "enable Bluetooth support" + help + Enable Bluetooth support. The start of bluetoothd is + automatically detected and only a runtime dependency. + +config BR2_PACKAGE_CONNMAN_LOOPBACK + bool "enable loopback support" + +config BR2_PACKAGE_CONNMAN_NEARD + bool "enable neard support" + select BR2_PACKAGE_NEARD + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # neard + +config BR2_PACKAGE_CONNMAN_OFONO + bool "enable ofono support" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # ofono + select BR2_PACKAGE_OFONO + +config BR2_PACKAGE_CONNMAN_DEBUG + bool "enable compiling with debugging information" + +config BR2_PACKAGE_CONNMAN_CLIENT + bool "enable command line client" + select BR2_PACKAGE_READLINE + +endif # BR2_PACKAGE_CONNMAN + +comment "connman needs a toolchain w/ wchar, threads, resolver, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/connman/S45connman b/package/connman/S45connman new file mode 100755 index 0000000000..d3d4bd5df4 --- /dev/null +++ b/package/connman/S45connman @@ -0,0 +1,22 @@ +#!/bin/sh + +case "$1" in + start) + printf "Starting connman ... " + start-stop-daemon -S -q -m -b -p /var/run/connmand.pid --exec /usr/sbin/connmand -- -n + echo "done." + ;; + stop) + printf "Stopping connman ..." + start-stop-daemon -K -q -p /var/run/connmand.pid + echo "done." + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" + ;; +esac diff --git a/package/connman/connman.hash b/package/connman/connman.hash new file mode 100644 index 0000000000..e0bb483d27 --- /dev/null +++ b/package/connman/connman.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/network/connman/sha256sums.asc +sha256 3185864c73206a6033d12e9f583689dcd03f714a40a58333709d3f74a4e0934c connman-1.32.tar.xz diff --git a/package/connman/connman.mk b/package/connman/connman.mk new file mode 100644 index 0000000000..d21284b479 --- /dev/null +++ b/package/connman/connman.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# connman +# +################################################################################ + +CONNMAN_VERSION = 1.32 +CONNMAN_SOURCE = connman-$(CONNMAN_VERSION).tar.xz +CONNMAN_SITE = $(BR2_KERNEL_MIRROR)/linux/network/connman +CONNMAN_DEPENDENCIES = libglib2 dbus iptables +CONNMAN_INSTALL_STAGING = YES +CONNMAN_LICENSE = GPLv2 +CONNMAN_LICENSE_FILES = COPYING +CONNMAN_CONF_OPTS += \ + --with-dbusconfdir=/etc \ + $(if $(BR2_PACKAGE_CONNMAN_DEBUG),--enable-debug,--disable-debug) \ + $(if $(BR2_PACKAGE_CONNMAN_ETHERNET),--enable-ethernet,--disable-ethernet) \ + $(if $(BR2_PACKAGE_CONNMAN_WIFI),--enable-wifi,--disable-wifi) \ + $(if $(BR2_PACKAGE_CONNMAN_WISPR),--enable-wispr,--disable-wispr) \ + $(if $(BR2_PACKAGE_CONNMAN_BLUETOOTH),--enable-bluetooth,--disable-bluetooth) \ + $(if $(BR2_PACKAGE_CONNMAN_LOOPBACK),--enable-loopback,--disable-loopback) \ + $(if $(BR2_PACKAGE_CONNMAN_NEARD),--enable-neard,--disable-neard) \ + $(if $(BR2_PACKAGE_CONNMAN_OFONO),--enable-ofono,--disable-ofono) \ + $(if $(BR2_INIT_SYSTEMD),--with-systemdunitdir=/usr/lib/systemd/system) + +CONNMAN_DEPENDENCIES += \ + $(if $(BR2_PACKAGE_CONNMAN_NEARD),neard) \ + $(if $(BR2_PACKAGE_CONNMAN_OFONO),ofono) \ + $(if $(BR2_PACKAGE_CONNMAN_WISPR),gnutls) + +define CONNMAN_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/connman/S45connman $(TARGET_DIR)/etc/init.d/S45connman +endef + +define CONNMAN_INSTALL_INIT_SYSTEMD + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/connman.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/connman.service +endef + +ifeq ($(BR2_PACKAGE_CONNMAN_CLIENT),y) +CONNMAN_CONF_OPTS += --enable-client +CONNMAN_DEPENDENCIES += readline + +define CONNMAN_INSTALL_CM + $(INSTALL) -m 0755 -D $(@D)/client/connmanctl $(TARGET_DIR)/usr/bin/connmanctl +endef + +CONNMAN_POST_INSTALL_TARGET_HOOKS += CONNMAN_INSTALL_CM +else +CONNMAN_CONF_OPTS += --disable-client +endif + +$(eval $(autotools-package)) diff --git a/package/conntrack-tools/0001-src-fix-build-with-musl-libc.patch b/package/conntrack-tools/0001-src-fix-build-with-musl-libc.patch new file mode 100644 index 0000000000..5881f98721 --- /dev/null +++ b/package/conntrack-tools/0001-src-fix-build-with-musl-libc.patch @@ -0,0 +1,37 @@ +From d7b20d9bbed23a7a7e40af2f5e78f37ff67e8d93 Mon Sep 17 00:00:00 2001 +From: Rodrigo Rebello +Date: Mon, 23 Nov 2015 02:12:48 -0200 +Subject: [PATCH] src: fix build with musl libc + +The GNU version of 'struct tcphdr' is not exposed by musl libc headers +unless _GNU_SOURCE is defined. Without this definition, the build fails +with: + + rpc.c: In function 'rpc_helper_cb': + rpc.c:351:15: error: 'struct tcphdr' has no member named 'doff' + offset += th->doff * 4; + ^ + +Upstream status: sent +http://patchwork.ozlabs.org/patch/547376/ + +Signed-off-by: Rodrigo Rebello +--- + src/helpers/rpc.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/helpers/rpc.c b/src/helpers/rpc.c +index 82493c2..3a7b337 100644 +--- a/src/helpers/rpc.c ++++ b/src/helpers/rpc.c +@@ -28,6 +28,7 @@ + + #include + #include ++#define _GNU_SOURCE + #include + #include + +-- +2.1.4 + diff --git a/package/conntrack-tools/Config.in b/package/conntrack-tools/Config.in new file mode 100644 index 0000000000..87bf2d0c50 --- /dev/null +++ b/package/conntrack-tools/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_CONNTRACK_TOOLS + bool "conntrack-tools" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS # libtirpc + depends on !BR2_STATIC_LIBS # dlopen() + select BR2_PACKAGE_LIBNETFILTER_CONNTRACK + select BR2_PACKAGE_LIBNETFILTER_CTHELPER + select BR2_PACKAGE_LIBNETFILTER_CTTIMEOUT + select BR2_PACKAGE_LIBNETFILTER_QUEUE + select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + The conntrack-tools are a set of tools targeted at + system administrators. + They are conntrack, the userspace command line interface, + and conntrackd, the userspace daemon. + + http://www.netfilter.org/projects/conntrack-tools/ + +comment "conntrack-tools needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC) || \ + BR2_STATIC_LIBS diff --git a/package/conntrack-tools/conntrack-tools.hash b/package/conntrack-tools/conntrack-tools.hash new file mode 100644 index 0000000000..7ff1cf7a4b --- /dev/null +++ b/package/conntrack-tools/conntrack-tools.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/conntrack-tools/conntrack-tools-1.4.3.tar.bz2.{md5sum,sha1sum} +md5 966a5d8f846ddf5304bcd12685c0707f conntrack-tools-1.4.3.tar.bz2 +sha1 509db30f34b283f4a74a7e638ba0ca713d3fe98c conntrack-tools-1.4.3.tar.bz2 diff --git a/package/conntrack-tools/conntrack-tools.mk b/package/conntrack-tools/conntrack-tools.mk new file mode 100644 index 0000000000..728758789c --- /dev/null +++ b/package/conntrack-tools/conntrack-tools.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# conntrack-tools +# +################################################################################ + +CONNTRACK_TOOLS_VERSION = 1.4.3 +CONNTRACK_TOOLS_SOURCE = conntrack-tools-$(CONNTRACK_TOOLS_VERSION).tar.bz2 +CONNTRACK_TOOLS_SITE = http://www.netfilter.org/projects/conntrack-tools/files +CONNTRACK_TOOLS_DEPENDENCIES = host-pkgconf \ + libnetfilter_conntrack libnetfilter_cthelper libnetfilter_cttimeout \ + libnetfilter_queue host-bison host-flex +CONNTRACK_TOOLS_LICENSE = GPLv2+ +CONNTRACK_TOOLS_LICENSE_FILES = COPYING + +CONNTRACK_TOOLS_CFLAGS = $(TARGET_CFLAGS) + +# Some of conntrack-tools source files include both linux/in.h (via +# linux/netfilter.h for kernel headers >= 4.2) and netinet/in.h, which +# causes some symbol conflicts when musl is used. Defining __GLIBC__ +# works around that issue since the kernel headers are prepared to +# avoid redefinition of certain symbols when they see __GLIBC__. +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +CONNTRACK_TOOLS_CFLAGS += -D__GLIBC__ +endif + +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +CONNTRACK_TOOLS_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc` +CONNTRACK_TOOLS_DEPENDENCIES += libtirpc host-pkgconf +endif + +CONNTRACK_TOOLS_CONF_ENV = CFLAGS="$(CONNTRACK_TOOLS_CFLAGS)" + +$(eval $(autotools-package)) diff --git a/package/copas/Config.in b/package/copas/Config.in new file mode 100644 index 0000000000..21dd0eb883 --- /dev/null +++ b/package/copas/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_COPAS + bool "copas" + # Runtime dependency only + select BR2_PACKAGE_COXPCALL + select BR2_PACKAGE_LUASOCKET + help + Copas is a dispatcher based on coroutines that + can be used by TCP/IP servers. + + http://keplerproject.github.com/copas/ diff --git a/package/copas/copas.hash b/package/copas/copas.hash new file mode 100644 index 0000000000..27e33166c8 --- /dev/null +++ b/package/copas/copas.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c94890bdc8899d05163ca963dadf4b74b2ad7a5795ea3923a792b6e928ec142a copas-2.0.1-1.src.rock diff --git a/package/copas/copas.mk b/package/copas/copas.mk new file mode 100644 index 0000000000..132b5d9678 --- /dev/null +++ b/package/copas/copas.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# copas +# +################################################################################ + +COPAS_VERSION = 2.0.1-1 +COPAS_SUBDIR = copas-2_0_1 +COPAS_LICENSE = MIT + +$(eval $(luarocks-package)) diff --git a/package/coreutils/0001-fix-for-dummy-man-usage.patch b/package/coreutils/0001-fix-for-dummy-man-usage.patch new file mode 100644 index 0000000000..4c5a088257 --- /dev/null +++ b/package/coreutils/0001-fix-for-dummy-man-usage.patch @@ -0,0 +1,25 @@ +Upstream-Status: Pending + +coreutils: fix for dummy-man usage + +The options should be before the final argument, otherwise, the following error +would appear when compiling. + +"dummy-man: too many non-option arguments" + +Signed-off-by: Chen Qi +[Gustavo: update for 8.24] + +diff -Nura coreutils-8.24.orig/man/local.mk coreutils-8.24/man/local.mk +--- coreutils-8.24.orig/man/local.mk 2015-07-04 11:23:47.190503631 -0300 ++++ coreutils-8.24/man/local.mk 2015-07-04 11:24:25.046741090 -0300 +@@ -186,8 +186,8 @@ + && $(run_help2man) \ + --source='$(PACKAGE_STRING)' \ + --include=$(srcdir)/man/$$name.x \ +- --output=$$t/$$name.1 \ + --info-page='\(aq(coreutils) '$$name' invocation\(aq' \ ++ --output=$$t/$$name.1 \ + $$t/$$argv$(EXEEXT) \ + && sed \ + -e 's|$*\.td/||g' \ diff --git a/package/coreutils/Config.in b/package/coreutils/Config.in new file mode 100644 index 0000000000..d9f614a004 --- /dev/null +++ b/package/coreutils/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_COREUTILS + bool "coreutils" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + help + All of the basic file/text/shell utilities. These are the + core utilities which are expected to exist on every system. + BusyBox implements many of the most common. + + Things like: + - chmod, cp, dd, dir, ls, etc... + - sort, tr, head, tail, wc, etc... + - whoami, who, etc... + + http://www.gnu.org/software/coreutils/ + +comment "coreutils needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/coreutils/coreutils.hash b/package/coreutils/coreutils.hash new file mode 100644 index 0000000000..38d3bb1eeb --- /dev/null +++ b/package/coreutils/coreutils.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 31e67c057a5b32a582f26408c789e11c2e8d676593324849dcf5779296cdce87 coreutils-8.25.tar.xz diff --git a/package/coreutils/coreutils.mk b/package/coreutils/coreutils.mk new file mode 100644 index 0000000000..0d7b7821a2 --- /dev/null +++ b/package/coreutils/coreutils.mk @@ -0,0 +1,128 @@ +################################################################################ +# +# coreutils +# +################################################################################ + +COREUTILS_VERSION = 8.25 +COREUTILS_SITE = $(BR2_GNU_MIRROR)/coreutils +COREUTILS_SOURCE = coreutils-$(COREUTILS_VERSION).tar.xz +COREUTILS_LICENSE = GPLv3+ +COREUTILS_LICENSE_FILES = COPYING + +# coreutils-01-fix-for-dummy-man-usage.patch triggers autoreconf on build +COREUTILS_AUTORECONF = YES +COREUTILS_GETTEXTIZE = YES + +COREUTILS_CONF_OPTS = --disable-rpath --enable-single-binary=shebangs \ + $(if $(BR2_TOOLCHAIN_USES_MUSL),--with-included-regex) +COREUTILS_CONF_ENV = ac_cv_c_restrict=no \ + ac_cv_func_chown_works=yes \ + ac_cv_func_euidaccess=no \ + ac_cv_func_fstatat=yes \ + ac_cv_func_getdelim=yes \ + ac_cv_func_getgroups=yes \ + ac_cv_func_getgroups_works=yes \ + ac_cv_func_getloadavg=no \ + ac_cv_func_lstat_dereferences_slashed_symlink=yes \ + ac_cv_func_lstat_empty_string_bug=no \ + ac_cv_func_strerror_r_char_p=no \ + ac_cv_func_strnlen_working=yes \ + ac_cv_func_strtod=yes \ + ac_cv_func_working_mktime=yes \ + ac_cv_have_decl_strerror_r=yes \ + ac_cv_have_decl_strnlen=yes \ + ac_cv_lib_getloadavg_getloadavg=no \ + ac_cv_lib_util_getloadavg=no \ + ac_fsusage_space=yes \ + ac_use_included_regex=no \ + am_cv_func_working_getline=yes \ + fu_cv_sys_stat_statfs2_bsize=yes \ + gl_cv_func_getcwd_null=yes \ + gl_cv_func_getcwd_path_max=yes \ + gl_cv_func_gettimeofday_clobber=no \ + gl_cv_func_fstatat_zero_flag=no \ + gl_cv_func_link_follows_symlink=no \ + gl_cv_func_re_compile_pattern_working=yes \ + gl_cv_func_svid_putenv=yes \ + gl_cv_func_tzset_clobber=no \ + gl_cv_func_working_mkstemp=yes \ + gl_cv_func_working_utimes=yes \ + gl_getline_needs_run_time_check=no \ + gl_cv_have_proc_uptime=yes \ + utils_cv_localtime_cache=no \ + PERL=missing \ + MAKEINFO=true + +COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false \ + ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true \ + uname join + +# If both coreutils and busybox are selected, make certain coreutils +# wins the fight over who gets to have their utils actually installed. +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +COREUTILS_DEPENDENCIES = busybox +endif + +ifeq ($(BR2_PACKAGE_ACL),y) +COREUTILS_DEPENDENCIES += acl +else +COREUTILS_CONF_OPTS += --disable-acl +endif + +ifeq ($(BR2_PACKAGE_ATTR),y) +COREUTILS_DEPENDENCIES += attr +else +COREUTILS_CONF_OPTS += --disable-xattr +endif + +# It otherwise fails to link properly, not mandatory though +ifeq ($(BR2_PACKAGE_GETTEXT),y) +COREUTILS_CONF_OPTS += --with-libintl-prefix=$(STAGING_DIR)/usr +COREUTILS_DEPENDENCIES += gettext +endif + +ifeq ($(BR2_PACKAGE_GMP),y) +COREUTILS_DEPENDENCIES += gmp +else +COREUTILS_CONF_OPTS += --without-gmp +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +COREUTILS_DEPENDENCIES += libcap +else +COREUTILS_CONF_OPTS += --disable-libcap +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +COREUTILS_CONF_OPTS += --with-openssl=yes +COREUTILS_DEPENDENCIES += openssl +endif + +ifeq ($(BR2_ROOTFS_MERGED_USR),) +define COREUTILS_CLEANUP_BIN + # some things go in root rather than usr + for f in $(COREUTILS_BIN_PROGS); do \ + mv -f $(TARGET_DIR)/usr/bin/$$f $(TARGET_DIR)/bin/$$f || exit 1; \ + done +endef +COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP_BIN +endif + +ifeq ($(BR2_STATIC_LIBS),y) +COREUTILS_CONF_OPTS += --enable-no-install-program=stdbuf +endif + +define COREUTILS_CLEANUP + # link for archaic shells + ln -fs test $(TARGET_DIR)/usr/bin/[ + # gnu thinks chroot is in bin, debian thinks it's in sbin + mv -f $(TARGET_DIR)/usr/bin/chroot $(TARGET_DIR)/usr/sbin/chroot +endef + +COREUTILS_POST_INSTALL_TARGET_HOOKS += COREUTILS_CLEANUP + +# If both coreutils and busybox are selected, the corresponding applets +# may need to be reinstated by the clean targets. + +$(eval $(autotools-package)) diff --git a/package/cosmo/Config.in b/package/cosmo/Config.in new file mode 100644 index 0000000000..869a1072ed --- /dev/null +++ b/package/cosmo/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_COSMO + bool "cosmo" + # run-time dependency + select BR2_PACKAGE_LPEG + # upstream site does not provide a valid archive + depends on BROKEN + help + Cosmo is a "safe templates" engine for Lua. + + http://mascarenhas.github.io/cosmo/ diff --git a/package/cosmo/cosmo.mk b/package/cosmo/cosmo.mk new file mode 100644 index 0000000000..0ab5324569 --- /dev/null +++ b/package/cosmo/cosmo.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# cosmo +# +################################################################################ + +COSMO_VERSION = 14.03.04-1 +COSMO_LICENSE = MIT + +$(eval $(luarocks-package)) diff --git a/package/coxpcall/Config.in b/package/coxpcall/Config.in new file mode 100644 index 0000000000..1237482ffa --- /dev/null +++ b/package/coxpcall/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_COXPCALL + bool "coxpcall" + help + Coxpcall encapsulates the protected calls with a coroutine + based loop, so errors can be dealed without the usual + pcall/xpcall issues with coroutines. + + http://coxpcall.luaforge.net/ diff --git a/package/coxpcall/coxpcall.hash b/package/coxpcall/coxpcall.hash new file mode 100644 index 0000000000..d7a02c2010 --- /dev/null +++ b/package/coxpcall/coxpcall.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 ff93d30e0a6cd64bb4e66739757e7eda9f226187829a075747b2ca5d3cfd1075 coxpcall-1.15.0-1.src.rock diff --git a/package/coxpcall/coxpcall.mk b/package/coxpcall/coxpcall.mk new file mode 100644 index 0000000000..9c21143796 --- /dev/null +++ b/package/coxpcall/coxpcall.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# coxpcall +# +################################################################################ + +COXPCALL_VERSION = 1.15.0-1 +COXPCALL_SUBDIR = coxpcall +COXPCALL_LICENSE = MIT + +$(eval $(luarocks-package)) diff --git a/package/cpio/0001-fix-CVE-2016-2037.patch b/package/cpio/0001-fix-CVE-2016-2037.patch new file mode 100644 index 0000000000..aec2ccb8e5 --- /dev/null +++ b/package/cpio/0001-fix-CVE-2016-2037.patch @@ -0,0 +1,51 @@ +From: Pavel Raiskup +Subject: [Bug-cpio] [PATCH] fix 1-byte out-of-bounds write +Date: Tue, 26 Jan 2016 23:17:54 +0100 + +Other calls to cpio_safer_name_suffix seem to be safe. + +* src/copyin.c (process_copy_in): Make sure that file_hdr.c_name +has at least two bytes allocated. +* src/util.c (cpio_safer_name_suffix): Document that use of this +function requires to be careful. + +Signed-off-by: Gustavo Zacarias +--- +Patch status: fetched/submitted +URL: https://lists.gnu.org/archive/html/bug-cpio/2016-01/msg00005.html + + src/copyin.c | 2 ++ + src/util.c | 5 ++++- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/src/copyin.c b/src/copyin.c +index cde911e..032d35f 100644 +--- a/src/copyin.c ++++ b/src/copyin.c +@@ -1385,6 +1385,8 @@ process_copy_in () + break; + } + ++ if (file_hdr.c_namesize <= 1) ++ file_hdr.c_name = xrealloc(file_hdr.c_name, 2); + cpio_safer_name_suffix (file_hdr.c_name, false, !no_abs_paths_flag, + false); + +diff --git a/src/util.c b/src/util.c +index 6ff6032..2763ac1 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -1411,7 +1411,10 @@ set_file_times (int fd, + } + + /* Do we have to ignore absolute paths, and if so, does the filename +- have an absolute path? */ ++ have an absolute path? ++ Before calling this function make sure that the allocated NAME buffer has ++ capacity at least 2 bytes to allow us to store the "." string inside. */ ++ + void + cpio_safer_name_suffix (char *name, bool link_target, bool absolute_names, + bool strip_leading_dots) +-- +2.5.0 diff --git a/package/cpio/Config.in b/package/cpio/Config.in new file mode 100644 index 0000000000..1210a0bde1 --- /dev/null +++ b/package/cpio/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_CPIO + bool "cpio" + # Need argp.h support + select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL + depends on BR2_USE_WCHAR + help + cpio archive utility for creation and extraction. + + https://www.gnu.org/software/cpio/ + +comment "cpio needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/cpio/cpio.hash b/package/cpio/cpio.hash new file mode 100644 index 0000000000..962a100cc4 --- /dev/null +++ b/package/cpio/cpio.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 08a35e92deb3c85d269a0059a27d4140a9667a6369459299d08c17f713a92e73 cpio-2.12.tar.gz diff --git a/package/cpio/cpio.mk b/package/cpio/cpio.mk new file mode 100644 index 0000000000..1576127968 --- /dev/null +++ b/package/cpio/cpio.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# cpio +# +################################################################################ + +CPIO_VERSION = 2.12 +CPIO_SITE = http://ftp.gnu.org/gnu/cpio +CPIO_CONF_OPTS = --bindir=/bin +CPIO_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox) +CPIO_LICENSE = GPLv3+ +CPIO_LICENSE_FILES = COPYING + +# cpio uses argp.h which is not provided by uclibc or musl by default. +# Use the argp-standalone package to provide this. +ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y) +CPIO_DEPENDENCIES += argp-standalone +endif + +$(eval $(autotools-package)) diff --git a/package/cppcms/Config.in b/package/cppcms/Config.in new file mode 100644 index 0000000000..79f54741ba --- /dev/null +++ b/package/cppcms/Config.in @@ -0,0 +1,38 @@ +config BR2_PACKAGE_CPPCMS + bool "cppcms" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_LIBGCRYPT + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on !BR2_STATIC_LIBS # dlopen() + depends on BR2_USE_WCHAR + help + CppCMS is a Free High Performance Web Development Framework + (not a CMS) aimed for Rapid Web Application Development. It + differs from most of other web development frameworks like: + Python Django or Java Servlets on the following aspects: + + - It is designed and tuned to handle extremely high loads. + - It uses modern C++ as primary development language in + order to achieve the above goal. + - It is aimed on development of both Web Sites and Web + Services. + + http://cppcms.com + +if BR2_PACKAGE_CPPCMS + +config BR2_PACKAGE_CPPCMS_ICU + bool "enable icu support" + depends on !BR2_BINFMT_FLAT # icu + select BR2_PACKAGE_ICU + help + Using ICU allows advanced localization features into CppCMS, + in another hand ICU is heavier than iconv. + +endif + +comment "cppcms needs a toolchain w/ C++, NPTL, wchar, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + !BR2_USE_WCHAR || BR2_STATIC_LIBS diff --git a/package/cppcms/cppcms.hash b/package/cppcms/cppcms.hash new file mode 100644 index 0000000000..28e998c6c1 --- /dev/null +++ b/package/cppcms/cppcms.hash @@ -0,0 +1,5 @@ +# From http://sourceforge.net/projects/cppcms/files/cppcms/1.0.5/ +sha1 15f21897c14acfd4b0c74622e49d95857f2fe939 cppcms-1.0.5.tar.bz2 +md5 d668c201dd31fff8090380ebdc0bcc2b cppcms-1.0.5.tar.bz2 +# Locally computed: +sha256 84b685977bca97c3e997497f227bd5906adb80555066d811a7046b01c2f51865 cppcms-1.0.5.tar.bz2 diff --git a/package/cppcms/cppcms.mk b/package/cppcms/cppcms.mk new file mode 100644 index 0000000000..611020c588 --- /dev/null +++ b/package/cppcms/cppcms.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# cppcms +# +################################################################################ + +CPPCMS_VERSION = 1.0.5 +CPPCMS_SOURCE = cppcms-$(CPPCMS_VERSION).tar.bz2 +CPPCMS_LICENSE = LGPLv3 +CPPCMS_LICENSE_FILES = COPYING.TXT +CPPCMS_SITE = http://downloads.sourceforge.net/project/cppcms/cppcms/$(CPPCMS_VERSION) +CPPCMS_INSTALL_STAGING = YES + +CPPCMS_DEPENDENCIES = zlib pcre libgcrypt + +ifeq ($(BR2_PACKAGE_CPPCMS_ICU),y) +CPPCMS_CONF_OPTS += -DDISABLE_ICONV=ON +CPPCMS_DEPENDENCIES += icu +endif + +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +# posix backend needs monetary.h which isn't available on uClibc +CPPCMS_CONF_OPTS += -DDISABLE_POSIX_LOCALE=on +endif + +# We copy cppcms_tmpl_cc from staging to host because this file can be +# needed for compiling packages using cppcms. And it is not worth +# creating a host package just for a python script. +define CPPCMS_INSTALL_HOST_TOOLS + cp $(STAGING_DIR)/usr/bin/cppcms_tmpl_cc $(HOST_DIR)/usr/bin/cppcms_tmpl_cc +endef +CPPCMS_POST_INSTALL_STAGING_HOOKS += CPPCMS_INSTALL_HOST_TOOLS + +$(eval $(cmake-package)) diff --git a/package/cppdb/0001-mysql-library-suffix.patch b/package/cppdb/0001-mysql-library-suffix.patch new file mode 100644 index 0000000000..e65e3e26b6 --- /dev/null +++ b/package/cppdb/0001-mysql-library-suffix.patch @@ -0,0 +1,23 @@ +Add mysql/ to PATH_SUFFIXES for the library search for mysql. + +On common distros libmysqlclient* is installed and/or symlinked +into /usr/lib. +Since we install the libraries into /usr/lib/mysql alone cppdb +fails to properly link to it giving runtime errors. + +Status: https://sourceforge.net/p/cppcms/bugs/135/ + +Signed-off-by: Gustavo Zacarias + +diff -Nura cppdb-0.3.1.orig/CMakeLists.txt cppdb-0.3.1/CMakeLists.txt +--- cppdb-0.3.1.orig/CMakeLists.txt 2014-10-17 11:05:57.875429748 -0300 ++++ cppdb-0.3.1/CMakeLists.txt 2014-10-17 11:12:57.486775484 -0300 +@@ -196,7 +196,7 @@ + endif() + + if(NOT DISABLE_MYSQL) +- find_library(MYSQL_LIB mysqlclient) ++ find_library(MYSQL_LIB mysqlclient PATH_SUFFIXES mysql) + find_path(MYSQL_PATH mysql.h PATH_SUFFIXES mysql) + if(MYSQL_LIB AND MYSQL_PATH) + include_directories(${MYSQL_PATH}) diff --git a/package/cppdb/Config.in b/package/cppdb/Config.in new file mode 100644 index 0000000000..9037a7a0c6 --- /dev/null +++ b/package/cppdb/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_CPPDB + bool "cppdb" + # dlfcn.h + depends on !BR2_STATIC_LIBS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + # Can be built without them but it's useless + depends on BR2_PACKAGE_MYSQL || BR2_PACKAGE_POSTGRESQL || BR2_PACKAGE_SQLITE + help + CppDB is an SQL connectivity library that is designed to provide + platform and Database independent connectivity API similarly + to what JDBC, ODBC and other connectivity libraries do. + + http://cppcms.com/sql/cppdb/ + +comment "cppdb needs a toolchain w/ C++, threads, dynamic library" + depends on BR2_PACKAGE_MYSQL || BR2_PACKAGE_POSTGRESQL || BR2_PACKAGE_SQLITE + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/cppdb/cppdb.hash b/package/cppdb/cppdb.hash new file mode 100644 index 0000000000..efc0eac0df --- /dev/null +++ b/package/cppdb/cppdb.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/cppcms/files/cppdb/0.3.1/ +md5 129f1d75f46114b79160b93807d5223f cppdb-0.3.1.tar.bz2 +sha1 c0410dcc482d71696ac9206044b3a3ac03d31f96 cppdb-0.3.1.tar.bz2 diff --git a/package/cppdb/cppdb.mk b/package/cppdb/cppdb.mk new file mode 100644 index 0000000000..2c26c90939 --- /dev/null +++ b/package/cppdb/cppdb.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# cppdb +# +################################################################################ + +CPPDB_VERSION = 0.3.1 +CPPDB_SOURCE = cppdb-$(CPPDB_VERSION).tar.bz2 +CPPDB_SITE = http://downloads.sourceforge.net/project/cppcms/cppdb/$(CPPDB_VERSION) +CPPDB_INSTALL_STAGING = YES +CPPDB_DEPENDENCIES = $(if $(BR2_PACKAGE_SQLITE),sqlite) +CPPDB_LICENSE = Boost-v1.0 or MIT +CPPDB_LICENSE_FILES = LICENSE_1_0.txt MIT.txt + +ifeq ($(BR2_PACKAGE_MYSQL),y) +CPPDB_DEPENDENCIES += mysql +else +CPPDB_CONF_OPTS += -DDISABLE_MYSQL=ON +endif + +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) +CPPDB_DEPENDENCIES += postgresql +else +CPPDB_CONF_OPTS += -DDISABLE_PQ=ON +endif + +ifeq ($(BR2_PACKAGE_SQLITE),) +CPPDB_CONF_OPTS += -DDISABLE_SQLITE=ON +endif + +$(eval $(cmake-package)) diff --git a/package/cppunit/Config.in b/package/cppunit/Config.in new file mode 100644 index 0000000000..efcdcf01a2 --- /dev/null +++ b/package/cppunit/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_CPPUNIT + bool "cppunit" + depends on BR2_INSTALL_LIBSTDCPP + # currently the static situation is not correctly detected. + depends on !BR2_STATIC_LIBS + help + CppUnit is the C++ port of the famous JUnit framework for + unit testing. Test output is in XML or text format for + automatic testing and GUI based for supervised tests. + + http://www.freedesktop.org/wiki/Software/cppunit/ + +comment "cppunit needs a toolchain w/ C++, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS diff --git a/package/cppunit/cppunit.hash b/package/cppunit/cppunit.hash new file mode 100644 index 0000000000..a097e3256d --- /dev/null +++ b/package/cppunit/cppunit.hash @@ -0,0 +1,5 @@ +# hash from: http://www.freedesktop.org/wiki/Software/cppunit/: +md5 d1c6bdd5a76c66d2c38331e2d287bc01 cppunit-1.13.2.tar.gz + +# Locally calculated: +sha512 8f4be569f321d577cec31931f49f4df143bc94e283605509b6ea50c60690aa91a2aed940e7eebd4b2413a4218f9a6c3978d312d8e587eab040283c6563846ecd cppunit-1.13.2.tar.gz diff --git a/package/cppunit/cppunit.mk b/package/cppunit/cppunit.mk new file mode 100644 index 0000000000..b8251c297a --- /dev/null +++ b/package/cppunit/cppunit.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# cppunit +# +################################################################################ + +CPPUNIT_VERSION = 1.13.2 +CPPUNIT_SITE = http://dev-www.libreoffice.org/src +CPPUNIT_INSTALL_STAGING = YES +CPPUNIT_LICENSE = LGPLv2.1 +CPPUNIT_LICENSE_FILES = COPYING +CPPUNIT_CONF_OPTS = --disable-doxygen + +$(eval $(autotools-package)) diff --git a/package/cppzmq/Config.in b/package/cppzmq/Config.in new file mode 100644 index 0000000000..788fd0b59d --- /dev/null +++ b/package/cppzmq/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_CPPZMQ + bool "cppzmq" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + select BR2_PACKAGE_ZEROMQ + help + C++ binding for zeromq (ZeroMQ, 0MQ, zmq). + + http://github.com/zeromq/cppzmq + +comment "cppzmq needs a toolchain w/ C++, wchar, threads" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && \ + BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/cppzmq/cppzmq.mk b/package/cppzmq/cppzmq.mk new file mode 100644 index 0000000000..113b9a070e --- /dev/null +++ b/package/cppzmq/cppzmq.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# cppzmq +# +################################################################################ + +CPPZMQ_VERSION = 68a7b09cfce01c4c279fba2cf91686fcfc566848 +CPPZMQ_SITE = $(call github,zeromq,cppzmq,$(CPPZMQ_VERSION)) +CPPZMQ_INSTALL_STAGING = YES +CPPZMQ_DEPENDENCIES = zeromq +CPPZMQ_LICENSE = MIT +CPPZMQ_LICENSE_FILES = LICENSE + +define CPPZMQ_INSTALL_STAGING_CMDS + $(INSTALL) -m 0644 -D $(@D)/zmq.hpp $(STAGING_DIR)/usr/include/zmq.hpp +endef + +$(eval $(generic-package)) diff --git a/package/cpuload/Config.in b/package/cpuload/Config.in new file mode 100644 index 0000000000..82bc450afa --- /dev/null +++ b/package/cpuload/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_CPULOAD + bool "cpuload" + help + cpuload is a simple tool to obtain intuitive vision of CPU load + (including total, user, system, irq and softirq) within a certain + time, which is especially useful for embedded system without GUI. + + https://github.com/kelvincheung/cpuload diff --git a/package/cpuload/cpuload.mk b/package/cpuload/cpuload.mk new file mode 100644 index 0000000000..30c3db6a53 --- /dev/null +++ b/package/cpuload/cpuload.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# cpuload +# +################################################################################ + +CPULOAD_VERSION = v0.3 +CPULOAD_SITE = $(call github,kelvincheung,cpuload,$(CPULOAD_VERSION)) +CPULOAD_LICENSE = GPLv2 +CPULOAD_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/cramfs/0001-endian.patch b/package/cramfs/0001-endian.patch new file mode 100644 index 0000000000..b2eda5a1db --- /dev/null +++ b/package/cramfs/0001-endian.patch @@ -0,0 +1,288 @@ +Index: cramfs-1.1/mkcramfs.c +=================================================================== +--- cramfs-1.1.orig/mkcramfs.c 2002-02-20 09:03:32.000000000 +0100 ++++ cramfs-1.1/mkcramfs.c 2011-09-09 15:11:00.980895119 +0200 +@@ -93,6 +93,7 @@ + static int opt_verbose = 0; + static char *opt_image = NULL; + static char *opt_name = NULL; ++static int swap_endian = 0; + + static int warn_dev, warn_gid, warn_namelen, warn_skip, warn_size, warn_uid; + +@@ -130,6 +131,8 @@ + " -i file insert a file image into the filesystem (requires >= 2.4.0)\n" + " -n name set name of cramfs filesystem\n" + " -p pad by %d bytes for boot code\n" ++ " -l litte endian filesystem\n" ++ " -b big endian filesystem\n" + " -s sort directory entries (old option, ignored)\n" + " -v be more verbose\n" + " -z make explicit holes (requires >= 2.3.39)\n" +@@ -372,6 +375,50 @@ + return totalsize; + } + ++/* routines to swap endianness/bitfields in inode/superblock block data */ ++static void fix_inode(struct cramfs_inode *inode) ++{ ++#define wswap(x) (((x)>>24) | (((x)>>8)&0xff00) | (((x)&0xff00)<<8) | (((x)&0xff)<<24)) ++ /* attempt #2 */ ++ inode->mode = (inode->mode >> 8) | ((inode->mode&0xff)<<8); ++ inode->uid = (inode->uid >> 8) | ((inode->uid&0xff)<<8); ++ inode->size = (inode->size >> 16) | (inode->size&0xff00) | ++ ((inode->size&0xff)<<16); ++ ((u32*)inode)[2] = wswap(inode->offset | (inode->namelen<<26)); ++} ++ ++static void fix_offset(struct cramfs_inode *inode, u32 offset) ++{ ++ u32 tmp = wswap(((u32*)inode)[2]); ++ ((u32*)inode)[2] = wswap((offset >> 2) | (tmp&0xfc000000)); ++} ++ ++static void fix_block_pointer(u32 *p) ++{ ++ *p = wswap(*p); ++} ++ ++static void fix_super(struct cramfs_super *super) ++{ ++ u32 *p = (u32*)super; ++ ++ /* fix superblock fields */ ++ p[0] = wswap(p[0]); /* magic */ ++ p[1] = wswap(p[1]); /* size */ ++ p[2] = wswap(p[2]); /* flags */ ++ p[3] = wswap(p[3]); /* future */ ++ ++ /* fix filesystem info fields */ ++ p = (u32*)&super->fsid; ++ p[0] = wswap(p[0]); /* crc */ ++ p[1] = wswap(p[1]); /* edition */ ++ p[2] = wswap(p[2]); /* blocks */ ++ p[3] = wswap(p[3]); /* files */ ++ ++ fix_inode(&super->root); ++#undef wswap ++} ++ + /* Returns sizeof(struct cramfs_super), which includes the root inode. */ + static unsigned int write_superblock(struct entry *root, char *base, int size) + { +@@ -405,6 +452,7 @@ + super->root.gid = root->gid; + super->root.size = root->size; + super->root.offset = offset >> 2; ++ if (swap_endian) fix_super(super); + + return offset; + } +@@ -419,7 +467,10 @@ + if (offset >= (1 << (2 + CRAMFS_OFFSET_WIDTH))) { + die(MKFS_ERROR, 0, "filesystem too big"); + } +- inode->offset = (offset >> 2); ++ if (swap_endian) ++ fix_offset(inode, offset); ++ else ++ inode->offset = (offset >> 2); + } + + /* +@@ -515,6 +566,7 @@ + stack_entries++; + } + entry = entry->next; ++ if (swap_endian) fix_inode(inode); + } + + /* +@@ -609,6 +661,7 @@ + } + + *(u32 *) (base + offset) = curr; ++ if (swap_endian) fix_block_pointer((u32*)(base + offset)); + offset += 4; + } while (size); + +@@ -699,7 +752,7 @@ + progname = argv[0]; + + /* command line options */ +- while ((c = getopt(argc, argv, "hEe:i:n:psvz")) != EOF) { ++ while ((c = getopt(argc, argv, "hEe:i:n:psvzlb")) != EOF) { + switch (c) { + case 'h': + usage(MKFS_OK); +@@ -727,6 +780,18 @@ + opt_pad = PAD_SIZE; + fslen_ub += PAD_SIZE; + break; ++ case 'b': ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++ swap_endian = 1; ++ printf("Swapping filesystem endian-ness\n"); ++#endif ++ break; ++ case 'l': ++#if __BYTE_ORDER == __BIG_ENDIAN ++ swap_endian = 1; ++ printf("Swapping filesystem endian-ness\n"); ++#endif ++ break; + case 's': + /* old option, ignored */ + break; +Index: cramfs-1.1/cramfsck.c +=================================================================== +--- cramfs-1.1.orig/cramfsck.c 2002-02-23 01:00:42.000000000 +0100 ++++ cramfs-1.1/cramfsck.c 2011-09-09 15:10:06.810894275 +0200 +@@ -30,6 +30,7 @@ + * 2000/07/15: Daniel Quinlan (initial support for block devices) + * 2002/01/10: Daniel Quinlan (additional checks, test more return codes, + * use read if mmap fails, standardize messages) ++ * 2004/09/01: Alfonso Acosta (Add swapping support) + */ + + /* compile-time options */ +@@ -53,6 +54,7 @@ + #define _LINUX_STRING_H_ + #include + #include ++#include + #include + + /* Exit codes used by fsck-type programs */ +@@ -73,6 +75,7 @@ + static char *filename; /* ROM image filename */ + struct cramfs_super super; /* just find the cramfs superblock once */ + static int opt_verbose = 0; /* 1 = verbose (-v), 2+ = very verbose (-vv) */ ++static int need_swapping = 0; /* fs and host dont have the same endianness */ + #ifdef INCLUDE_FS_TESTS + static int opt_extract = 0; /* extract cramfs (-x) */ + static char *extract_dir = "root"; /* extraction directory (-x) */ +@@ -84,6 +87,9 @@ + static unsigned long start_data = ~0UL; /* start of the data (256 MB = max) */ + static unsigned long end_data = 0; /* end of the data */ + ++/* access 32 byte variables */ ++#define CRAMFS_32(x) (need_swapping ? bswap_32(x) : x) ++ + /* Guarantee access to at least 8kB at a time */ + #define ROMBUFFER_BITS 13 + #define ROMBUFFERSIZE (1 << ROMBUFFER_BITS) +@@ -165,20 +171,34 @@ + if (super.magic == CRAMFS_MAGIC) { + *start = 0; + } ++ else if (super.magic == bswap_32(CRAMFS_MAGIC)) { ++ *start = 0; ++ need_swapping = 1; ++ } ++ + else if (*length >= (PAD_SIZE + sizeof(super))) { + lseek(fd, PAD_SIZE, SEEK_SET); + if (read(fd, &super, sizeof(super)) != sizeof(super)) { + die(FSCK_ERROR, 1, "read failed: %s", filename); + } +- if (super.magic == CRAMFS_MAGIC) { ++ if (super.magic == CRAMFS_32(CRAMFS_MAGIC)) { + *start = PAD_SIZE; + } + } + + /* superblock tests */ +- if (super.magic != CRAMFS_MAGIC) { ++ if (super.magic != CRAMFS_32(CRAMFS_MAGIC)) { + die(FSCK_UNCORRECTED, 0, "superblock magic not found"); + } ++ if (need_swapping){ ++ super.size = bswap_32(super.size); ++ super.flags = bswap_32(super.flags); ++ super.future = bswap_32(super.future); ++ super.fsid.crc = bswap_32(super.fsid.crc); ++ super.fsid.edition = bswap_32(super.fsid.edition); ++ super.fsid.blocks = bswap_32(super.fsid.blocks); ++ super.fsid.files = bswap_32(super.fsid.files); ++ } + if (super.flags & ~CRAMFS_SUPPORTED_FLAGS) { + die(FSCK_ERROR, 0, "unsupported filesystem features"); + } +@@ -213,7 +233,10 @@ + die(FSCK_USAGE, 0, "unable to test CRC: old cramfs format"); + #endif /* not INCLUDE_FS_TESTS */ + } +- ++ else if (need_swapping) { ++ /* crc checking in this case would mean translating the whole file */ ++ return; ++ } + crc = crc32(0L, Z_NULL, 0); + + buf = mmap(NULL, super.size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); +@@ -298,12 +321,23 @@ + + static struct cramfs_inode *cramfs_iget(struct cramfs_inode * i) + { ++#define wswap(x) (((x)>>24) | (((x)>>8)&0xff00) | (((x)&0xff00)<<8) | (((x)&0xff)<<24)) + struct cramfs_inode *inode = malloc(sizeof(struct cramfs_inode)); + + if (!inode) { + die(FSCK_ERROR, 1, "malloc failed"); + } +- *inode = *i; ++ if(!need_swapping) { ++ *inode = *i; ++ } ++ else { ++ inode->mode=bswap_16(i->mode); ++ inode->uid=bswap_16(i->uid); ++ inode->size=bswap_32(i->size << 8); ++ inode->gid=i->gid; ++ inode->namelen = bswap_32(((u32*)i)[2]) >> 26; ++ inode->offset = bswap_32(((u32*)i)[2]) & 0x3FFFFFFF; ++ } + return inode; + } + +@@ -322,9 +356,9 @@ + */ + static struct cramfs_inode *read_super(void) + { +- unsigned long offset = super.root.offset << 2; +- +- if (!S_ISDIR(super.root.mode)) ++ struct cramfs_inode *root = cramfs_iget(&super.root); ++ unsigned long offset = root->offset << 2; ++ if (!S_ISDIR(root->mode)) + die(FSCK_UNCORRECTED, 0, "root inode is not directory"); + if (!(super.flags & CRAMFS_FLAG_SHIFTED_ROOT_OFFSET) && + ((offset != sizeof(struct cramfs_super)) && +@@ -332,7 +366,7 @@ + { + die(FSCK_UNCORRECTED, 0, "bad root offset (%lu)", offset); + } +- return cramfs_iget(&super.root); ++ return root; + } + + static int uncompress_block(void *src, int len) +@@ -364,7 +398,7 @@ + + do { + unsigned long out = PAGE_CACHE_SIZE; +- unsigned long next = *(u32 *) romfs_read(offset); ++ unsigned long next = CRAMFS_32(*(u32 *) romfs_read(offset)); + + if (next > end_data) { + end_data = next; +@@ -525,7 +559,7 @@ + { + unsigned long offset = i->offset << 2; + unsigned long curr = offset + 4; +- unsigned long next = *(u32 *) romfs_read(offset); ++ unsigned long next = CRAMFS_32(*(u32 *) romfs_read(offset)); + unsigned long size; + + if (offset == 0) { diff --git a/package/cramfs/0002-cygwin_IO.patch b/package/cramfs/0002-cygwin_IO.patch new file mode 100644 index 0000000000..8be333f01b --- /dev/null +++ b/package/cramfs/0002-cygwin_IO.patch @@ -0,0 +1,15 @@ +Index: cramfs-1.1/cramfsck.c +=================================================================== +--- cramfs-1.1.orig/cramfsck.c 2011-09-09 15:10:06.000000000 +0200 ++++ cramfs-1.1/cramfsck.c 2011-09-09 15:13:49.950897747 +0200 +@@ -57,6 +57,10 @@ + #include + #include + ++#ifdef __CYGWIN__ ++#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0) ++#endif /* __CYGWIN__ */ ++ + /* Exit codes used by fsck-type programs */ + #define FSCK_OK 0 /* No errors */ + #define FSCK_NONDESTRUCT 1 /* File system errors corrected */ diff --git a/package/cramfs/0003-fix-missing-types.patch b/package/cramfs/0003-fix-missing-types.patch new file mode 100644 index 0000000000..896110011e --- /dev/null +++ b/package/cramfs/0003-fix-missing-types.patch @@ -0,0 +1,17 @@ +mkcramfs; loff_t is guarded by _GNU_SOURCE + +Although already properly done in cramfsck, it was missing in mkcramfs. + +Signed-off-by: "Yann E. MORIN" + +diff -durN cramfs-1.1.orig/mkcramfs.c cramfs-1.1/mkcramfs.c +--- cramfs-1.1.orig/mkcramfs.c 2015-08-05 22:31:16.830543096 +0200 ++++ cramfs-1.1/mkcramfs.c 2015-08-05 22:33:33.136289744 +0200 +@@ -22,6 +22,7 @@ + * If you change the disk format of cramfs, please update fs/cramfs/README. + */ + ++#define _GNU_SOURCE + #include + #include + #include diff --git a/package/cramfs/Config.in b/package/cramfs/Config.in new file mode 100644 index 0000000000..b2a0c6c516 --- /dev/null +++ b/package/cramfs/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_CRAMFS + bool "cramfs" + select BR2_PACKAGE_ZLIB + help + cramfs is a compressed read-only filesystem. This package + contains the tools to generate and check a cramfs filesystem. + + http://sourceforge.net/projects/cramfs/ diff --git a/package/cramfs/Config.in.host b/package/cramfs/Config.in.host new file mode 100644 index 0000000000..53b43d4420 --- /dev/null +++ b/package/cramfs/Config.in.host @@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_CRAMFS + bool "host cramfs" + help + cramfs is a compressed read-only filesystem. This package + contains the tools to generate and check a cramfs filesystem. + + http://sourceforge.net/projects/cramfs/ diff --git a/package/cramfs/cramfs.hash b/package/cramfs/cramfs.hash new file mode 100644 index 0000000000..b8c5f5fbcb --- /dev/null +++ b/package/cramfs/cramfs.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 133caca2c4e7c64106555154ee0ff693f5cf5beb9421ce2eb86baee997d22368 cramfs-1.1.tar.gz diff --git a/package/cramfs/cramfs.mk b/package/cramfs/cramfs.mk new file mode 100644 index 0000000000..72860b6b7a --- /dev/null +++ b/package/cramfs/cramfs.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# cramfs +# +################################################################################ + +CRAMFS_VERSION = 1.1 +CRAMFS_SITE = http://downloads.sourceforge.net/project/cramfs/cramfs/$(CRAMFS_VERSION) +CRAMFS_LICENSE = GPLv2+ +CRAMFS_LICENSE_FILES = COPYING + +CRAMFS_DEPENDENCIES = zlib + +define CRAMFS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) +endef + +define CRAMFS_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/mkcramfs $(TARGET_DIR)/usr/bin/mkcramfs + $(INSTALL) -D -m 755 $(@D)/cramfsck $(TARGET_DIR)/usr/bin/cramfsck +endef + +define HOST_CRAMFS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) CFLAGS="$(HOST_CFLAGS) -Wall -O2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" LDFLAGS="$(HOST_LDFLAGS)" -C $(@D) +endef + +define HOST_CRAMFS_INSTALL_CMDS + $(INSTALL) -D -m 755 $(@D)/mkcramfs $(HOST_DIR)/usr/bin/mkcramfs + $(INSTALL) -D -m 755 $(@D)/cramfsck $(HOST_DIR)/usr/bin/cramfsck +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/crda/0001-crda-support-python-3-in-utils-key2pub.py.patch b/package/crda/0001-crda-support-python-3-in-utils-key2pub.py.patch new file mode 100644 index 0000000000..99eb11cba7 --- /dev/null +++ b/package/crda/0001-crda-support-python-3-in-utils-key2pub.py.patch @@ -0,0 +1,271 @@ +From 797f2836c48f9ba2446629ae4b6867ca1a5ea512 Mon Sep 17 00:00:00 2001 +From: Taahir Ahmed +Date: Wed, 30 Mar 2016 11:23:54 -0300 +Subject: [PATCH 1/2] crda: support python 3 in utils/key2pub.py + +utils/key2pub.py can now be run under either python 2.7 or python 3.x. +This required some minor syntactical changes as well as switching from +M2Crypto to pycrypto, since M2Crypto doesn't support python 3.x. + +In addition, some errors in the generated source file keys-ssl.h are +fixed: + + * The correct OpenSSL header for BN_ULONG is included. + + * The generated constants are given the 'ull' suffix to prevent + warnings about constants that are too large. + +[Gustavo: don't call /utils/key2pub.py since that doesn't compute] + +Signed-off-by: Gustavo Zacarias +--- +Status: submitted upstream by author but not (yet) accepted +URL: http://www.spinics.net/lists/linux-wireless/msg138936.html + + Makefile | 2 +- + utils/key2pub.py | 146 ++++++++++++++++++++++++++++--------------------------- + 2 files changed, 75 insertions(+), 73 deletions(-) + +diff --git a/Makefile b/Makefile +index 1f25509..523a96e 100644 +--- a/Makefile ++++ b/Makefile +@@ -112,7 +112,7 @@ $(REG_BIN): + keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) + $(NQ) ' GEN ' $@ + $(NQ) ' Trusted pubkeys:' $(wildcard $(PUBKEY_DIR)/*.pem) +- $(Q)./utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@ ++ $(Q) python utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@ + + $(LIBREG): regdb.h reglib.h reglib.c + $(NQ) ' CC ' $@ +diff --git a/utils/key2pub.py b/utils/key2pub.py +index 3e84cd2..c76cbbb 100755 +--- a/utils/key2pub.py ++++ b/utils/key2pub.py +@@ -1,126 +1,128 @@ + #!/usr/bin/env python + ++import io + import sys + try: +- from M2Crypto import RSA +-except ImportError, e: +- sys.stderr.write('ERROR: Failed to import the "M2Crypto" module: %s\n' % e.message) +- sys.stderr.write('Please install the "M2Crypto" Python module.\n') +- sys.stderr.write('On Debian GNU/Linux the package is called "python-m2crypto".\n') +- sys.exit(1) ++ from Crypto.PublicKey import RSA ++except ImportError as e: ++ sys.stderr.write('ERROR: Failed to import the "Crypto.PublicKey" module: %s\n' % e.message) ++ sys.stderr.write('Please install the "Crypto.PublicKey" Python module.\n') ++ sys.stderr.write('On Debian GNU/Linux the package is called "python-crypto".\n') ++ sys.exit(1) ++ ++def bitwise_collect(value, radix_bits): ++ words = [] ++ radix_mask = (1 << radix_bits) - 1 ++ while value != 0: ++ words.append(value & radix_mask) ++ value >>= radix_bits ++ return words + + def print_ssl_64(output, name, val): +- while val[0] == '\0': +- val = val[1:] +- while len(val) % 8: +- val = '\0' + val +- vnew = [] +- while len(val): +- vnew.append((val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7])) +- val = val[8:] +- vnew.reverse() +- output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew))) ++ # OpenSSL expects 64-bit words given least-significant-word first. ++ vwords = bitwise_collect(val, 64) ++ ++ output.write(u'static BN_ULONG {}[] = {{\n'.format(name)) + idx = 0 +- for v1, v2, v3, v4, v5, v6, v7, v8 in vnew: ++ for vword in vwords: + if not idx: +- output.write('\t') +- output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8))) ++ output.write(u'\t') ++ output.write(u'0x{:016x}ULL, '.format(vword)) + idx += 1 + if idx == 2: + idx = 0 +- output.write('\n') ++ output.write(u'\n') + if idx: +- output.write('\n') +- output.write('};\n\n') ++ output.write(u'\n') ++ output.write(u'};\n\n') + + def print_ssl_32(output, name, val): +- while val[0] == '\0': +- val = val[1:] +- while len(val) % 4: +- val = '\0' + val +- vnew = [] +- while len(val): +- vnew.append((val[0], val[1], val[2], val[3], )) +- val = val[4:] +- vnew.reverse() +- output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew))) ++ # OpenSSL expects 32-bit words given least-significant-word first. ++ vwords = bitwise_collect(val, 32) ++ ++ output.write(u'static BN_ULONG {}[] = {{\n'.format(name)) + idx = 0 +- for v1, v2, v3, v4 in vnew: ++ for vword in vwords: + if not idx: +- output.write('\t') +- output.write('0x%.2x%.2x%.2x%.2x, ' % (ord(v1), ord(v2), ord(v3), ord(v4))) ++ output.write(u'\t') ++ output.write(u'0x{:08x}, '.format(vword)) + idx += 1 + if idx == 4: + idx = 0 +- output.write('\n') ++ output.write(u'\n') + if idx: +- output.write('\n') +- output.write('};\n\n') ++ output.write(u'\n') ++ output.write(u'};\n\n') + + def print_ssl(output, name, val): ++ ++ output.write(u'#include \n') ++ output.write(u'#include \n') ++ + import struct +- output.write('#include \n') + if len(struct.pack('@L', 0)) == 8: + return print_ssl_64(output, name, val) + else: + return print_ssl_32(output, name, val) + + def print_ssl_keys(output, n): +- output.write(r''' ++ output.write(u''' + struct pubkey { + struct bignum_st e, n; + }; + +-#define KEY(data) { \ +- .d = data, \ +- .top = sizeof(data)/sizeof(data[0]), \ ++#define KEY(data) { \\ ++ .d = data, \\ ++ .top = sizeof(data)/sizeof(data[0]), \\ + } + +-#define KEYS(e,n) { KEY(e), KEY(n), } ++#define KEYS(e,n) { KEY(e), KEY(n), } + + static struct pubkey keys[] = { + ''') + for n in xrange(n + 1): +- output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) +- output.write('};\n') ++ output.write(u' KEYS(e_{0}, n_{0}),\n'.format(n)) ++ output.write(u'};\n') + pass + + def print_gcrypt(output, name, val): +- output.write('#include \n') +- while val[0] == '\0': +- val = val[1:] +- output.write('static const uint8_t %s[%d] = {\n' % (name, len(val))) ++ # gcrypt expects 8-bit words most-significant-word first ++ vwords = bitwise_collect(val, 8) ++ vwords.reverse() ++ ++ output.write(u'#include \n') ++ output.write(u'static const uint8_t %s[%d] = {\n' % (name, len(vwords))) + idx = 0 +- for v in val: ++ for vword in vwords: + if not idx: +- output.write('\t') +- output.write('0x%.2x, ' % ord(v)) ++ output.write(u'\t') ++ output.write(u'0x{:02x}, '.format(vword)) + idx += 1 + if idx == 8: + idx = 0 +- output.write('\n') ++ output.write(u'\n') + if idx: +- output.write('\n') +- output.write('};\n\n') ++ output.write(u'\n') ++ output.write(u'};\n\n') + + def print_gcrypt_keys(output, n): +- output.write(r''' ++ output.write(u''' + struct key_params { + const uint8_t *e, *n; + uint32_t len_e, len_n; + }; + +-#define KEYS(_e, _n) { \ +- .e = _e, .len_e = sizeof(_e), \ +- .n = _n, .len_n = sizeof(_n), \ ++#define KEYS(_e, _n) { \\ ++ .e = _e, .len_e = sizeof(_e), \\ ++ .n = _n, .len_n = sizeof(_n), \\ + } + + static const struct key_params keys[] = { + ''') +- for n in xrange(n + 1): +- output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) +- output.write('};\n') +- ++ for n in range(n + 1): ++ output.write(u' KEYS(e_{0}, n_{0}),\n'.format(n)) ++ output.write(u'};\n') ++ + + modes = { + '--ssl': (print_ssl, print_ssl_keys), +@@ -135,21 +137,21 @@ except IndexError: + mode = None + + if not mode in modes: +- print 'Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys())) ++ print('Usage: {} [{}] input-file... output-file'.format(sys.argv[0], '|'.join(modes.keys()))) + sys.exit(2) + +-output = open(outfile, 'w') ++output = io.open(outfile, 'w') + + # load key + idx = 0 + for f in files: +- try: +- key = RSA.load_pub_key(f) +- except RSA.RSAError: +- key = RSA.load_key(f) + +- modes[mode][0](output, 'e_%d' % idx, key.e[4:]) +- modes[mode][0](output, 'n_%d' % idx, key.n[4:]) ++ key_contents = io.open(f, 'rb').read() ++ key = RSA.importKey(key_contents) ++ ++ modes[mode][0](output, 'e_{}'.format(idx), key.e) ++ modes[mode][0](output, 'n_{}'.format(idx), key.n) ++ + idx += 1 + + modes[mode][1](output, idx - 1) +-- +2.7.3 + diff --git a/package/crda/0002-drop-ldconfig-call.patch b/package/crda/0002-drop-ldconfig-call.patch new file mode 100644 index 0000000000..f09e258adb --- /dev/null +++ b/package/crda/0002-drop-ldconfig-call.patch @@ -0,0 +1,15 @@ +Drop ldconfig call, it's useless for cross-compiling. + +Signed-off-by: Gustavo Zacarias + +diff -Nura crda-3.18.orig/Makefile crda-3.18/Makefile +--- crda-3.18.orig/Makefile 2015-02-18 10:34:23.841259401 -0300 ++++ crda-3.18/Makefile 2015-02-18 10:35:10.524201452 -0300 +@@ -127,7 +127,6 @@ + $(NQ) ' INSTALL libreg' + $(Q)mkdir -p $(DESTDIR)/$(LIBDIR) + $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/ +- $(Q)ldconfig + + %.o: %.c regdb.h $(LIBREG) + $(NQ) ' CC ' $@ diff --git a/package/crda/0003-drop-werror.patch b/package/crda/0003-drop-werror.patch new file mode 100644 index 0000000000..072e3fc46e --- /dev/null +++ b/package/crda/0003-drop-werror.patch @@ -0,0 +1,37 @@ +From f38253e066dee96b148be1b79a6b4a696ee0ae0b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sun, 1 May 2016 10:05:48 +0200 +Subject: [PATCH] drop werror +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Building crda with GCC 6 fails because of all compiler warnings are treated as +errors. Disable the compiler option '-Werror': + +keys-gcrypt.c:94:32: error: ‘keys’ defined but not used [-Werror=unused-const-variable=] + static const struct key_params keys[] = { + ^~~~ +cc1: all warnings being treated as errors + +Signed-off-by: Jörg Krause +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 74f1172..e9b417f 100644 +--- a/Makefile ++++ b/Makefile +@@ -26,7 +26,7 @@ PUBKEY_DIR?=pubkeys + RUNTIME_PUBKEY_DIR?=/etc/wireless-regdb/pubkeys + + CFLAGS += -O2 -fpic +-CFLAGS += -std=gnu99 -Wall -Werror -pedantic ++CFLAGS += -std=gnu99 -Wall -pedantic + CFLAGS += -Wall -g + LDLIBREG += -lreg + LDLIBS += $(LDLIBREG) +-- +2.8.2 + diff --git a/package/crda/Config.in b/package/crda/Config.in new file mode 100644 index 0000000000..2b9332fc07 --- /dev/null +++ b/package/crda/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_CRDA + bool "crda" + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBNL + # regdb is a runtime dependency + select BR2_PACKAGE_WIRELESS_REGDB + help + Central Regulatory Domain Agent. + + This package provides a Central Regulatory Domain Agent (CRDA) + to be used by the Linux kernel cf80211 wireless subsystem to + query and apply the regulatory domain settings wireless devices + may operate within for a given location. + + http://linuxwireless.org/en/developers/Regulatory/CRDA + +comment "crda needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/crda/crda.hash b/package/crda/crda.hash new file mode 100644 index 0000000000..45b9d20407 --- /dev/null +++ b/package/crda/crda.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/software/network/crda/sha256sums.asc +sha256 43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf crda-3.18.tar.xz diff --git a/package/crda/crda.mk b/package/crda/crda.mk new file mode 100644 index 0000000000..df879f68bb --- /dev/null +++ b/package/crda/crda.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# crda +# +################################################################################ + +CRDA_VERSION = 3.18 +CRDA_SOURCE = crda-$(CRDA_VERSION).tar.xz +CRDA_SITE = $(BR2_KERNEL_MIRROR)/software/network/crda +CRDA_DEPENDENCIES = host-pkgconf host-python-pycrypto libnl libgcrypt +CRDA_LICENSE = ISC +CRDA_LICENSE_FILES = LICENSE + +define CRDA_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) all_noverify -C $(@D) +endef + +define CRDA_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) install -C $(@D) DESTDIR=$(TARGET_DIR) +endef + +$(eval $(generic-package)) diff --git a/package/crudini/Config.in b/package/crudini/Config.in new file mode 100644 index 0000000000..e4e26e52da --- /dev/null +++ b/package/crudini/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_CRUDINI + bool "crudini" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_INIPARSE # runtime + help + A utility for handling ini files from the command line and + shell scripts + + https://pypi.python.org/pypi/crudini diff --git a/package/crudini/crudini.hash b/package/crudini/crudini.hash new file mode 100644 index 0000000000..b9aaecf7b8 --- /dev/null +++ b/package/crudini/crudini.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=7d1313f1bb9800db9cbceaa518bcf212, sha256 locally computed +md5 7d1313f1bb9800db9cbceaa518bcf212 crudini-0.7.tar.gz +sha256 5d493ae6600e54f9e0296b12d3adba99b88a439d8c4b2ebf9bc6f9c0613a03d7 crudini-0.7.tar.gz diff --git a/package/crudini/crudini.mk b/package/crudini/crudini.mk new file mode 100644 index 0000000000..d797efcdc0 --- /dev/null +++ b/package/crudini/crudini.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# crudini +# +################################################################################ + +CRUDINI_VERSION = 0.7 +CRUDINI_SOURCE = crudini-$(CRUDINI_VERSION).tar.gz +CRUDINI_SITE = https://pypi.python.org/packages/source/c/crudini +CRUDINI_SETUP_TYPE = setuptools +CRUDINI_LICENSE = GPLv2 +CRUDINI_LICENSE_FILES = COPYING + +$(eval $(python-package)) diff --git a/package/cryptodev-linux/cryptodev-linux.hash b/package/cryptodev-linux/cryptodev-linux.hash new file mode 100644 index 0000000000..d7195ac6f8 --- /dev/null +++ b/package/cryptodev-linux/cryptodev-linux.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking php signature +sha256 67fabde9fb67b286a96c4f45b594b0eccd0f761b495705c18f2ae9461b831376 cryptodev-linux-1.8.tar.gz diff --git a/package/cryptodev-linux/cryptodev-linux.mk b/package/cryptodev-linux/cryptodev-linux.mk new file mode 100644 index 0000000000..c3f5355345 --- /dev/null +++ b/package/cryptodev-linux/cryptodev-linux.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# cryptodev-linux +# +################################################################################ + +CRYPTODEV_LINUX_VERSION = 1.8 +CRYPTODEV_LINUX_SITE = http://download.gna.org/cryptodev-linux +CRYPTODEV_LINUX_INSTALL_STAGING = YES +CRYPTODEV_LINUX_LICENSE = GPLv2+ +CRYPTODEV_LINUX_LICENSE_FILES = COPYING + +define CRYPTODEV_LINUX_MODULE_GEN_VERSION_H + $(MAKE) -C $(@D) version.h +endef +CRYPTODEV_LINUX_PRE_BUILD_HOOKS += CRYPTODEV_LINUX_MODULE_GEN_VERSION_H + +define CRYPTODEV_LINUX_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 644 $(@D)/crypto/cryptodev.h \ + $(STAGING_DIR)/usr/include/crypto/cryptodev.h +endef + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/cryptodev/Config.in b/package/cryptodev/Config.in new file mode 100644 index 0000000000..9f9df02fc3 --- /dev/null +++ b/package/cryptodev/Config.in @@ -0,0 +1,50 @@ +comment "cryptodev needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_CRYPTODEV + bool "cryptodev" + depends on BR2_LINUX_KERNEL + help + Select the desired cryptodev implementation. + +if BR2_PACKAGE_CRYPTODEV + +choice + prompt "cryptodev variant" + default BR2_PACKAGE_CRYPTODEV_LINUX if !BR2_microblaze + help + Select the cryptodev implementation. + +config BR2_PACKAGE_CRYPTODEV_LINUX + bool "cryptodev-linux" + depends on !BR2_microblaze + select BR2_PACKAGE_HAS_CRYPTODEV + help + Cryptodev-linux is a device that allows access to Linux kernel + cryptographic drivers; thus allowing userspace applications + to take advantage of hardware accelerators. + + http://cryptodev-linux.org/index.html + +config BR2_PACKAGE_OCF_LINUX + bool "ocf-linux" + select BR2_PACKAGE_HAS_CRYPTODEV + help + OCF-Linux is a Linux port of the OpenBSD/FreeBSD Cryptographic + Framework (OCF). This port aims to bring full asynchronous HW/SW + crypto acceleration to the Linux kernel and applications + running under Linux. + + http://ocf-linux.sourceforge.net/ + +endchoice + +config BR2_PACKAGE_HAS_CRYPTODEV + bool + +config BR2_PACKAGE_PROVIDES_CRYPTODEV + string + default "cryptodev-linux" if BR2_PACKAGE_CRYPTODEV_LINUX + default "ocf-linux" if BR2_PACKAGE_OCF_LINUX + +endif diff --git a/package/cryptodev/cryptodev.mk b/package/cryptodev/cryptodev.mk new file mode 100644 index 0000000000..969d1bd17a --- /dev/null +++ b/package/cryptodev/cryptodev.mk @@ -0,0 +1,7 @@ +################################################################################ +# +# cryptodev +# +################################################################################ + +$(eval $(virtual-package)) diff --git a/package/cryptopp/cryptopp.hash b/package/cryptopp/cryptopp.hash new file mode 100644 index 0000000000..bf59c0451d --- /dev/null +++ b/package/cryptopp/cryptopp.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 9390670a14170dd0f48a6b6b06f74269ef4b056d4718a1a329f6f6069dc957c9 cryptopp563.zip +sha256 74b88c2caf7cf843bdc74d3331adaf83e516167cc8eebe66a79612189549cfa4 f707b9ef1688d4429ca6239cf2dc236440974681.patch diff --git a/package/cryptopp/cryptopp.mk b/package/cryptopp/cryptopp.mk new file mode 100644 index 0000000000..df07cf607f --- /dev/null +++ b/package/cryptopp/cryptopp.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# cryptopp +# +################################################################################ + +CRYPTOPP_VERSION = 5.6.3 +CRYPTOPP_SOURCE = cryptopp$(subst .,,$(CRYPTOPP_VERSION)).zip +CRYPTOPP_SITE = http://cryptopp.com/ +# Upstream patch needed to fix the build with gcc < 4.5 +CRYPTOPP_PATCH = https://github.com/weidai11/cryptopp/commit/f707b9ef1688d4429ca6239cf2dc236440974681.patch +CRYPTOPP_LICENSE = Boost-v1.0 +CRYPTOPP_LICENSE_FILES = License.txt +CRYPTOPP_INSTALL_STAGING = YES + +define HOST_CRYPTOPP_EXTRACT_CMDS + $(UNZIP) $(DL_DIR)/$(CRYPTOPP_SOURCE) -d $(@D) +endef + +HOST_CRYPTOPP_MAKE_OPTS = \ + $(HOST_CONFIGURE_OPTS) \ + CXXFLAGS="$(HOST_CXXFLAGS) -fPIC" + +define HOST_CRYPTOPP_BUILD_CMDS + $(MAKE) -C $(@D) $(HOST_CRYPTOPP_MAKE_OPTS) shared +endef + +define HOST_CRYPTOPP_INSTALL_CMDS + $(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr install +endef + +$(eval $(host-generic-package)) diff --git a/package/cryptsetup/0001-mkdir.patch b/package/cryptsetup/0001-mkdir.patch new file mode 100644 index 0000000000..d4d70521ad --- /dev/null +++ b/package/cryptsetup/0001-mkdir.patch @@ -0,0 +1,18 @@ +$(mkdir_p) is obsolete for newer automake, use $(MKDIR_P) instead. +Upstream should really gettextize with a newer version before packing up. + +[base on a similar patch from Gustavo Zacarias for Linux-PAM-1.1.7] +Signed-off-by: Axel Lin + +diff -Nura cryptsetup-1.6.3.ori/po/Makefile.in.in cryptsetup-1.6.3/po/Makefile.in.in +--- cryptsetup-1.6.3.ori/po/Makefile.in.in 2013-12-30 11:53:22.731942516 +0800 ++++ cryptsetup-1.6.3/po/Makefile.in.in 2014-01-09 09:46:13.594071188 +0800 +@@ -31,7 +31,7 @@ + INSTALL = @INSTALL@ + INSTALL_DATA = @INSTALL_DATA@ + mkinstalldirs = $(SHELL) @install_sh@ -d +-mkdir_p = @mkdir_p@ ++mkdir_p = @MKDIR_P@ + + GMSGFMT_ = @GMSGFMT@ + GMSGFMT_no = @GMSGFMT@ diff --git a/package/cryptsetup/Config.in b/package/cryptsetup/Config.in new file mode 100644 index 0000000000..80671ee8ca --- /dev/null +++ b/package/cryptsetup/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_CRYPTSETUP + bool "cryptsetup" + select BR2_PACKAGE_POPT + select BR2_PACKAGE_LVM2 + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + depends on BR2_TOOLCHAIN_HAS_THREADS # lvm2 + depends on BR2_USE_MMU # lvm2 + depends on !BR2_STATIC_LIBS # lvm2 + depends on BR2_USE_WCHAR # util-linux + help + This tool helps manipulate dm-crypt and luks partitions for + on-disk encryption. + + https://gitlab.com/cryptsetup/cryptsetup + +comment "cryptsetup needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/cryptsetup/cryptsetup.hash b/package/cryptsetup/cryptsetup.hash new file mode 100644 index 0000000000..0928627ad9 --- /dev/null +++ b/package/cryptsetup/cryptsetup.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/cryptsetup/v1.7/sha256sums.asc +sha256 73dc8a63cc984b56aa6a3c99f355262471bcfe78b3240b8b9d0caa8002911fec cryptsetup-1.7.1.tar.xz diff --git a/package/cryptsetup/cryptsetup.mk b/package/cryptsetup/cryptsetup.mk new file mode 100644 index 0000000000..4d377099c3 --- /dev/null +++ b/package/cryptsetup/cryptsetup.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# cryptsetup +# +################################################################################ + +CRYPTSETUP_VERSION_MAJOR = 1.7 +CRYPTSETUP_VERSION = $(CRYPTSETUP_VERSION_MAJOR).1 +CRYPTSETUP_SOURCE = cryptsetup-$(CRYPTSETUP_VERSION).tar.xz +CRYPTSETUP_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/cryptsetup/v$(CRYPTSETUP_VERSION_MAJOR) +CRYPTSETUP_DEPENDENCIES = lvm2 popt util-linux host-pkgconf \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +CRYPTSETUP_LICENSE = GPLv2+ (programs), LGPLv2.1+ (library) +CRYPTSETUP_LICENSE_FILES = COPYING COPYING.LGPL + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +CRYPTSETUP_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lintl" +endif + +# cryptsetup uses libgcrypt by default, but can be configured to use OpenSSL +# or kernel crypto modules instead +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +CRYPTSETUP_DEPENDENCIES += libgcrypt +CRYPTSETUP_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +CRYPTSETUP_CONF_OPTS += --with-crypto_backend=gcrypt +else ifeq ($(BR2_PACKAGE_OPENSSL),y) +CRYPTSETUP_DEPENDENCIES += openssl +CRYPTSETUP_CONF_OPTS += --with-crypto_backend=openssl +else +CRYPTSETUP_CONF_OPTS += --with-crypto_backend=kernel +endif + +$(eval $(autotools-package)) diff --git a/package/ctorrent/0001-fix-musl-build.patch b/package/ctorrent/0001-fix-musl-build.patch new file mode 100644 index 0000000000..3ba80be31e --- /dev/null +++ b/package/ctorrent/0001-fix-musl-build.patch @@ -0,0 +1,20 @@ +[PATCH] Fix compilation on musl + +Using the ssize_t typedef requires including . + +See : https://sourceforge.net/p/dtorrent/patches/3/ + +Signed-off-by: Brendan Heading +Upstream-status: submitted +--- +diff -Nur a/compat.c b/compat.c +--- a/compat.c 2015-07-29 18:22:24.658415171 +0100 ++++ b/compat.c 2015-07-29 18:36:21.752576311 +0100 +@@ -63,6 +63,7 @@ + + #ifndef HAVE_STRNSTR + #include ++#include + /* FUNCTION PROGRAMER: Siberiaic Sang */ + char *strnstr(const char *haystack, const char *needle, size_t haystacklen) + { diff --git a/package/ctorrent/Config.in b/package/ctorrent/Config.in new file mode 100644 index 0000000000..97552e7841 --- /dev/null +++ b/package/ctorrent/Config.in @@ -0,0 +1,13 @@ +comment "ctorrent needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_CTORRENT + bool "ctorrent" + depends on BR2_INSTALL_LIBSTDCPP + help + CTorrent is a BitTorrent client implemented in C++ + to be lightweight and quick. + http://ctorrent.sourceforge.net/ + + This is the enhanced version from + http://www.rahul.net/dholmes/ctorrent/ diff --git a/package/ctorrent/ctorrent.hash b/package/ctorrent/ctorrent.hash new file mode 100644 index 0000000000..6dcb590b95 --- /dev/null +++ b/package/ctorrent/ctorrent.hash @@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/dtorrent/files/dtorrent/3.3.2/ +sha1 d4e221f0292268f80e2430ce9d451dd64cf1ffaa ctorrent-dnh3.3.2.tar.gz diff --git a/package/ctorrent/ctorrent.mk b/package/ctorrent/ctorrent.mk new file mode 100644 index 0000000000..55fc95e703 --- /dev/null +++ b/package/ctorrent/ctorrent.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# ctorrent +# +################################################################################ + +CTORRENT_VERSION = dnh3.3.2 +CTORRENT_SITE = http://www.rahul.net/dholmes/ctorrent +CTORRENT_LICENSE = GPLv2 +CTORRENT_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +CTORRENT_CONF_OPTS += --with-ssl=yes +CTORRENT_DEPENDENCIES += openssl +else +CTORRENT_CONF_OPTS += --with-ssl=no +endif + +$(eval $(autotools-package)) diff --git a/package/cups/0001-Remove-man-from-BUILDDIRS-in-configure.patch b/package/cups/0001-Remove-man-from-BUILDDIRS-in-configure.patch new file mode 100644 index 0000000000..c0e87a4e5c --- /dev/null +++ b/package/cups/0001-Remove-man-from-BUILDDIRS-in-configure.patch @@ -0,0 +1,29 @@ +From a77bb18a5584bb23687ed3c522dbd91a9987d5a7 Mon Sep 17 00:00:00 2001 +From: Olivier Schonken +Date: Wed, 20 Jan 2016 22:13:11 +0200 +Subject: [PATCH] Remove man from BUILDDIRS in configure + +Since cups doesn't autoreconf properly, we directly patch the +configure script. + +Signed-off-by: Olivier Schonken +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure b/configure +index 4170ff3..3879a75 100755 +--- a/configure ++++ b/configure +@@ -5921,7 +5921,7 @@ fi + + case "$COMPONENTS" in + all) +- BUILDDIRS="filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale man doc examples templates" ++ BUILDDIRS="filter backend berkeley cgi-bin monitor notifier ppdc scheduler systemv conf data desktop locale doc examples templates" + ;; + + core) +-- +2.5.0 + diff --git a/package/cups/0002-Do-not-use-genstrings.patch b/package/cups/0002-Do-not-use-genstrings.patch new file mode 100644 index 0000000000..325483ea8f --- /dev/null +++ b/package/cups/0002-Do-not-use-genstrings.patch @@ -0,0 +1,36 @@ +From 193c8d8c55a3478ca5c9e161ce581e5794098c6d Mon Sep 17 00:00:00 2001 +From: Olivier Schonken +Date: Thu, 21 Jan 2016 23:04:49 +0100 +Subject: [PATCH] Do not use genstrings + +Using cross compiled genstrings while cross-compiling will break +compilation. Genstrings is still compiled because some power users +might want to do ppd compilation on their target machine, and for that +they would need to use the native compiled genstrings binary, to +generate a sample.c file for their target + +Signed-off-by: Olivier Schonken +[Thomas: completely remove call to genstrings rather than commenting +it, remove useless and potentially confusing 'echo' before the +genstrings call.] +Signed-off-by: Thomas Petazzoni +--- + ppdc/Makefile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/ppdc/Makefile b/ppdc/Makefile +index 68bf6b2..d57a0c9 100644 +--- a/ppdc/Makefile ++++ b/ppdc/Makefile +@@ -242,8 +242,6 @@ genstrings: genstrings.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) \ + $(CXX) $(ARCHFLAGS) $(LDFLAGS) -o genstrings genstrings.o \ + libcupsppdc.a ../cups/$(LIBCUPSSTATIC) $(LIBGSSAPI) $(SSLLIBS) \ + $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) +- echo Generating localization strings... +- ./genstrings >sample.c + + + # +-- +2.6.4 + diff --git a/package/cups/0003-Sanitize-the-installation-process.patch b/package/cups/0003-Sanitize-the-installation-process.patch new file mode 100644 index 0000000000..25bfa42a30 --- /dev/null +++ b/package/cups/0003-Sanitize-the-installation-process.patch @@ -0,0 +1,131 @@ +From e35f809c435c224954a5c7bff3f5729c5b3bc0ba Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 21 Jan 2016 23:21:06 +0100 +Subject: [PATCH] Sanitize the installation process + +The installation process does two things that are not convenient when +cross-compiling: + + - It uses install's -s option to strip binaries, but this option uses + the host strip and not the cross strip, which fails at stripping + binaries. In addition, we do not necessarily want cups to strip its + binaries, we may want to keep the debugging symbols. + + - It enforces ownership (user, group) which isn't possible since + "make install" isn't executed as root when cross-compiling. + + - It installs many files and directories with permissions that + prevent overwriting those files/directories, which meant calling + "make install" twice was failing. + +Signed-off-by: Thomas Petazzoni +--- + Makedefs.in | 12 ++++++------ + conf/Makefile | 6 +++--- + notifier/Makefile | 2 +- + scheduler/Makefile | 17 ++++++++--------- + 4 files changed, 18 insertions(+), 19 deletions(-) + +diff --git a/Makedefs.in b/Makedefs.in +index 3afef0a..3e4f1bd 100644 +--- a/Makedefs.in ++++ b/Makedefs.in +@@ -40,14 +40,14 @@ SHELL = /bin/sh + # Installation programs... + # + +-INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@ +-INSTALL_COMPDATA = $(INSTALL) -c -m 444 @INSTALL_GZIP@ ++INSTALL_BIN = $(LIBTOOL) $(INSTALL) -c -m 755 ++INSTALL_COMPDATA = $(INSTALL) -c -m 644 @INSTALL_GZIP@ + INSTALL_CONFIG = $(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@ +-INSTALL_DATA = $(INSTALL) -c -m 444 ++INSTALL_DATA = $(INSTALL) -c -m 644 + INSTALL_DIR = $(INSTALL) -d +-INSTALL_LIB = $(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@ +-INSTALL_MAN = $(INSTALL) -c -m 444 +-INSTALL_SCRIPT = $(INSTALL) -c -m 555 ++INSTALL_LIB = $(LIBTOOL) $(INSTALL) -c -m 755 ++INSTALL_MAN = $(INSTALL) -c -m 644 ++INSTALL_SCRIPT = $(INSTALL) -c -m 755 + + # + # Default user, group, and system groups for the scheduler... +diff --git a/conf/Makefile b/conf/Makefile +index 933d7d9..6ac5e19 100644 +--- a/conf/Makefile ++++ b/conf/Makefile +@@ -72,11 +72,11 @@ install: all install-data install-headers install-libs install-exec + install-data: + for file in $(KEEP); do \ + if test -r $(SERVERROOT)/$$file ; then \ +- $(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT)/$$file.N ; \ ++ $(INSTALL_CONFIG) $$file $(SERVERROOT)/$$file.N ; \ + else \ +- $(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT) ; \ ++ $(INSTALL_CONFIG) $$file $(SERVERROOT) ; \ + fi ; \ +- $(INSTALL_CONFIG) -g $(CUPS_GROUP) $$file $(SERVERROOT)/$$file.default; \ ++ $(INSTALL_CONFIG) $$file $(SERVERROOT)/$$file.default; \ + done + $(INSTALL_DIR) -m 755 $(DATADIR)/mime + for file in $(REPLACE); do \ +diff --git a/notifier/Makefile b/notifier/Makefile +index 3206dd0..c34a4d7 100644 +--- a/notifier/Makefile ++++ b/notifier/Makefile +@@ -62,7 +62,7 @@ install: all install-data install-headers install-libs install-exec + # + + install-data: +- $(INSTALL_DIR) -m 775 -g $(CUPS_GROUP) $(CACHEDIR)/rss ++ $(INSTALL_DIR) -m 775 $(CACHEDIR)/rss + + + # +diff --git a/scheduler/Makefile b/scheduler/Makefile +index c7d244d..a96a528 100644 +--- a/scheduler/Makefile ++++ b/scheduler/Makefile +@@ -148,30 +148,29 @@ install-data: + echo Creating $(SERVERBIN)/driver... + $(INSTALL_DIR) -m 755 $(SERVERBIN)/driver + echo Creating $(SERVERROOT)... +- $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT) ++ $(INSTALL_DIR) -m 755 $(SERVERROOT) + echo Creating $(SERVERROOT)/interfaces... +- $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT)/interfaces ++ $(INSTALL_DIR) -m 755 $(SERVERROOT)/interfaces + echo Creating $(SERVERROOT)/ppd... +- $(INSTALL_DIR) -m 755 -g $(CUPS_GROUP) $(SERVERROOT)/ppd ++ $(INSTALL_DIR) -m 755 $(SERVERROOT)/ppd + if test "x`uname`" != xDarwin; then \ + echo Creating $(SERVERROOT)/ssl...; \ +- $(INSTALL_DIR) -m 700 -g $(CUPS_GROUP) $(SERVERROOT)/ssl; \ ++ $(INSTALL_DIR) -m 700 $(SERVERROOT)/ssl; \ + fi + if test "$(STATEDIR)" != "$(SERVERROOT)"; then \ + echo Creating $(STATEDIR)...; \ + $(INSTALL_DIR) -m 755 $(STATEDIR); \ + fi + echo Creating $(STATEDIR)/certs... +- $(INSTALL_DIR) -m 511 -o $(CUPS_USER) -g $(CUPS_PRIMARY_SYSTEM_GROUP) \ +- $(STATEDIR)/certs ++ $(INSTALL_DIR) -m 711 $(STATEDIR)/certs + echo Creating $(LOGDIR)... + $(INSTALL_DIR) -m 755 $(LOGDIR) + echo Creating $(REQUESTS)... +- $(INSTALL_DIR) -m 710 -g $(CUPS_GROUP) $(REQUESTS) ++ $(INSTALL_DIR) -m 710 $(REQUESTS) + echo Creating $(REQUESTS)/tmp... +- $(INSTALL_DIR) -m 1770 -g $(CUPS_GROUP) $(REQUESTS)/tmp ++ $(INSTALL_DIR) -m 1770 $(REQUESTS)/tmp + echo Creating $(CACHEDIR)... +- $(INSTALL_DIR) -m 770 -g $(CUPS_GROUP) $(CACHEDIR) ++ $(INSTALL_DIR) -m 770 $(CACHEDIR) + if test "x$(INITDIR)" != x; then \ + echo Installing init scripts...; \ + $(INSTALL_DIR) -m 755 $(BUILDROOT)$(INITDIR)/init.d; \ +-- +2.6.4 + diff --git a/package/cups/0004-remove-pie.patch b/package/cups/0004-remove-pie.patch new file mode 100644 index 0000000000..3d81941ef4 --- /dev/null +++ b/package/cups/0004-remove-pie.patch @@ -0,0 +1,21 @@ +Remove PIE flags from the build + +Generating a statically linked binary built with PIE requires the +Scrt1.o file, which isn't part of Buildroot uClibc toolchains. To +solve this, we simply disable the PIE flags. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makedefs.in +=================================================================== +--- a/Makedefs.in ++++ b/Makedefs.in +@@ -142,7 +142,7 @@ + IPPFIND_MAN = @IPPFIND_MAN@ + LDFLAGS = -L../cgi-bin -L../cups -L../filter -L../ppdc \ + -L../scheduler @LDARCHFLAGS@ \ +- @LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM) ++ @LDFLAGS@ @RELROFLAGS@ $(OPTIM) + LINKCUPS = @LINKCUPS@ $(LIBGSSAPI) $(DNSSDLIBS) $(LIBZ) + LINKCUPSIMAGE = @LINKCUPSIMAGE@ + LIBS = $(LINKCUPS) $(COMMONLIBS) diff --git a/package/cups/Config.in b/package/cups/Config.in new file mode 100644 index 0000000000..3f5460c11b --- /dev/null +++ b/package/cups/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_CUPS + bool "cups" + # needs libstdcpp for ppdc + depends on BR2_INSTALL_LIBSTDCPP + # needs fork() + depends on BR2_USE_MMU + help + The Common Unix Printing System + + http://www.cups.org + +comment "cups needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/cups/cups.hash b/package/cups/cups.hash new file mode 100644 index 0000000000..f38399f0e7 --- /dev/null +++ b/package/cups/cups.hash @@ -0,0 +1,2 @@ +# Locally calculated: +sha256 bab0ca3ba80eae48319b3a6b19a5b14fad5ce230f30151a0cfa4c0271df281ad cups-2.1.2-source.tar.bz2 diff --git a/package/cups/cups.mk b/package/cups/cups.mk new file mode 100644 index 0000000000..c07dcb4640 --- /dev/null +++ b/package/cups/cups.mk @@ -0,0 +1,76 @@ +################################################################################ +# +# cups +# +################################################################################ + +CUPS_VERSION = 2.1.2 +CUPS_SOURCE = cups-$(CUPS_VERSION)-source.tar.bz2 +CUPS_SITE = http://www.cups.org/software/$(CUPS_VERSION) +CUPS_LICENSE = GPLv2 LGPLv2 +CUPS_LICENSE_FILES = LICENSE.txt +CUPS_INSTALL_STAGING = YES +CUPS_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) DSTROOT=$(STAGING_DIR) install +CUPS_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) DSTROOT=$(TARGET_DIR) install + +CUPS_CONF_OPTS = \ + --without-perl \ + --without-java \ + --without-php \ + --disable-gssapi \ + --libdir=/usr/lib +CUPS_CONFIG_SCRIPTS = cups-config +CUPS_DEPENDENCIES = \ + $(if $(BR2_PACKAGE_ZLIB),zlib) + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +CUPS_CONF_OPTS += --with-systemd=/usr/lib/systemd/system \ + --enable-systemd +CUPS_DEPENDENCIES += systemd +else +CUPS_CONF_OPTS += --disable-systemd +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +CUPS_CONF_OPTS += --enable-dbus +CUPS_DEPENDENCIES += dbus +else +CUPS_CONF_OPTS += --disable-dbus +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +CUPS_CONF_OPTS += --enable-gnutls +CUPS_DEPENDENCIES += gnutls +else +CUPS_CONF_OPTS += --disable-gnutls +endif + +ifeq ($(BR2_PACKAGE_PYTHON),y) +CUPS_CONF_OPTS += --with-python +CUPS_DEPENDENCIES += python +else +CUPS_CONF_OPTS += --without-python +endif + +ifeq ($(BR2_PACKAGE_LIBUSB),y) +CUPS_CONF_OPTS += --enable-libusb +CUPS_DEPENDENCIES += libusb +else +CUPS_CONF_OPTS += --disable-libusb +endif + +ifeq ($(BR2_PACKAGE_LIBPAPER),y) +CUPS_CONF_OPTS += --enable-libpaper +CUPS_DEPENDENCIES += libpaper +else +CUPS_CONF_OPTS += --disable-libpaper +endif + +ifeq ($(BR2_PACKAGE_AVAHI),y) +CUPS_DEPENDENCIES += avahi +CUPS_CONF_OPTS += --enable-avahi +else +CUPS_CONF_OPTS += --disable-avahi +endif + +$(eval $(autotools-package)) diff --git a/package/curlftpfs/0001-fix-CURLOPT_INFILESIZE.patch b/package/curlftpfs/0001-fix-CURLOPT_INFILESIZE.patch new file mode 100644 index 0000000000..dc83af010b --- /dev/null +++ b/package/curlftpfs/0001-fix-CURLOPT_INFILESIZE.patch @@ -0,0 +1,13 @@ +Borrowed from the curlftpfs_0.9.2-5 Debian package. + +CURLOPT_INFILESIZE does not support -1 arg. This fix bug #556012. +--- curlftpfs-0.9.2/ftpfs.c.old 2009-12-13 14:12:25.000000000 +0100 ++++ curlftpfs-0.9.2/ftpfs.c 2009-12-13 14:12:32.000000000 +0100 +@@ -503,7 +503,6 @@ + + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_URL, fh->full_path); + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_UPLOAD, 1); +- curl_easy_setopt_or_die(fh->write_conn, CURLOPT_INFILESIZE, -1); + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READFUNCTION, write_data_bg); + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_READDATA, fh); + curl_easy_setopt_or_die(fh->write_conn, CURLOPT_LOW_SPEED_LIMIT, 1); diff --git a/package/curlftpfs/0002-free_ftpfs_file-memleak-fix.patch b/package/curlftpfs/0002-free_ftpfs_file-memleak-fix.patch new file mode 100644 index 0000000000..4966c9dcfb --- /dev/null +++ b/package/curlftpfs/0002-free_ftpfs_file-memleak-fix.patch @@ -0,0 +1,14 @@ +Borrowed from the curlftpfs_0.9.2-5 Debian package. + +Fix a memory leak. See Bug #587250. +--- a/ftpfs.c 2008-04-30 01:05:47.000000000 +0200 ++++ a/ftpfs.c.slesimple 2010-01-01 22:12:10.000000000 +0100 +@@ -615,6 +615,8 @@ static void free_ftpfs_file(struct ftpfs + sem_destroy(&fh->data_need); + sem_destroy(&fh->data_written); + sem_destroy(&fh->ready); ++ if (fh->buf.size) { buf_free(&fh->buf); } ++ if (fh->stream_buf.size) { buf_free(&fh->stream_buf); } + free(fh); + } + diff --git a/package/curlftpfs/0003-nocache-memleak-fix.patch b/package/curlftpfs/0003-nocache-memleak-fix.patch new file mode 100644 index 0000000000..00a4dd64fd --- /dev/null +++ b/package/curlftpfs/0003-nocache-memleak-fix.patch @@ -0,0 +1,59 @@ +Borrowed from the curlftpfs_0.9.2-5 Debian package. + +Fix a memory leak when cache is disabled. Closes: #614347. +diff -ur curlftpfs-0.9.2/cache.c curlftpfs-0.9.2-olexat/cache.c +--- curlftpfs-0.9.2/cache.c 2008-04-30 01:03:09.000000000 +0200 ++++ curlftpfs-0.9.2-olexat/cache.c 2011-02-04 16:43:05.000000000 +0100 +@@ -25,7 +25,7 @@ + time_t last_cleaned; + }; + +-static struct cache cache; ++struct cache cache; + + struct node { + struct stat stat; +diff -ur curlftpfs-0.9.2/ftpfs-ls.c curlftpfs-0.9.2-olexat/ftpfs-ls.c +--- curlftpfs-0.9.2/ftpfs-ls.c 2008-04-23 12:55:41.000000000 +0200 ++++ curlftpfs-0.9.2-olexat/ftpfs-ls.c 2011-02-07 17:23:37.000000000 +0100 +@@ -25,6 +25,13 @@ + #include "charset_utils.h" + #include "ftpfs-ls.h" + ++struct cache { ++ int on; ++ char incomplete[]; ++}; ++ ++extern struct cache cache; ++ + static int parse_dir_unix(const char *line, + struct stat *sbuf, + char *file, +@@ -243,8 +256,10 @@ + reallink = g_strdup(link); + } + int linksize = strlen(reallink); +- cache_add_link(full_path, reallink, linksize+1); +- DEBUG(1, "cache_add_link: %s %s\n", full_path, reallink); ++ if (cache.on) { ++ cache_add_link(full_path, reallink, linksize+1); ++ DEBUG(1, "cache_add_link: %s %s\n", full_path, reallink); ++ } + if (linkbuf && linklen) { + if (linksize > linklen) linksize = linklen - 1; + strncpy(linkbuf, reallink, linksize); +@@ -257,8 +272,10 @@ + DEBUG(1, "filler: %s\n", file); + filler(h, file, &stat_buf); + } else { +- DEBUG(1, "cache_add_attr: %s\n", full_path); +- cache_add_attr(full_path, &stat_buf); ++ if (cache.on) { ++ DEBUG(1, "cache_add_attr: %s\n", full_path); ++ cache_add_attr(full_path, &stat_buf); ++ } + } + + DEBUG(2, "comparing %s %s\n", name, file); + diff --git a/package/curlftpfs/0004-fix-musl-build-off-t.patch b/package/curlftpfs/0004-fix-musl-build-off-t.patch new file mode 100644 index 0000000000..9335230520 --- /dev/null +++ b/package/curlftpfs/0004-fix-musl-build-off-t.patch @@ -0,0 +1,39 @@ +Use off_t instead of __off_t + +__off_t is an internal C library type, which shouldn't be used by +applications. It is not defined by the musl C library, so use the +public off_t type instead. + +Signed-off-by: Thomas Petazzoni + +Index: b/ftpfs.c +=================================================================== +--- a/ftpfs.c ++++ b/ftpfs.c +@@ -687,7 +687,7 @@ + return ftpfs_getattr(path, &sbuf); + } + +-static __off_t test_size(const char* path) ++static off_t test_size(const char* path) + { + struct stat sbuf; + int err = ftpfs_getattr(path, &sbuf); +@@ -950,7 +950,7 @@ + + /* fix openoffice problem, truncating exactly to file length */ + +- __off_t size = (long long int)test_size(path); ++ off_t size = (long long int)test_size(path); + DEBUG(1, "ftpfs_truncate: %s check filesize=%lld\n", path, (long long int)size); + + if (offset == size) +@@ -978,7 +978,7 @@ + } + /* fix openoffice problem, truncating exactly to file length */ + +- __off_t size = test_size(path); ++ off_t size = test_size(path); + DEBUG(1, "ftpfs_ftruncate: %s check filesize=%lld\n", path, (long long int)size); + + if (offset == size) diff --git a/package/curlftpfs/Config.in b/package/curlftpfs/Config.in new file mode 100644 index 0000000000..ad3ac241fa --- /dev/null +++ b/package/curlftpfs/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_CURLFTPFS + bool "curlftpfs (FUSE)" + select BR2_PACKAGE_LIBFUSE + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBCURL + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse, glib2 + depends on BR2_USE_MMU # libfuse, glib2 + depends on !BR2_STATIC_LIBS # libfuse + help + CurlFtpFS is a filesystem for accessing FTP hosts based on FUSE + and libcurl. + + http://curlftpfs.sourceforge.net/ + +comment "curlftpfs needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/curlftpfs/curlftpfs.hash b/package/curlftpfs/curlftpfs.hash new file mode 100644 index 0000000000..a94fab1239 --- /dev/null +++ b/package/curlftpfs/curlftpfs.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 4eb44739c7078ba0edde177bdd266c4cfb7c621075f47f64c85a06b12b3c6958 curlftpfs-0.9.2.tar.gz diff --git a/package/curlftpfs/curlftpfs.mk b/package/curlftpfs/curlftpfs.mk new file mode 100644 index 0000000000..8ec3e4c536 --- /dev/null +++ b/package/curlftpfs/curlftpfs.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# curlftpfs +# +################################################################################ + +CURLFTPFS_VERSION = 0.9.2 +CURLFTPFS_SITE = http://downloads.sourceforge.net/project/curlftpfs/curlftpfs/$(CURLFTPFS_VERSION) +CURLFTPFS_CONF_ENV = ac_cv_path__libcurl_config=$(STAGING_DIR)/usr/bin/curl-config +CURLFTPFS_LICENSE = GPLv2 +CURLFTPFS_LICENSE_FILES = COPYING +CURLFTPFS_DEPENDENCIES = \ + libglib2 libfuse openssl libcurl \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + $(if $(BR2_ENABLE_LOCALE),,libiconv) + +$(eval $(autotools-package)) diff --git a/package/cvs/Config.in b/package/cvs/Config.in new file mode 100644 index 0000000000..0036961601 --- /dev/null +++ b/package/cvs/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_CVS + bool "cvs" + depends on BR2_USE_WCHAR + # needs fork() + depends on BR2_USE_MMU + select BR2_PACKAGE_NCURSES + help + Concurrent Versions System - source code revision control tools. + + http://www.nongnu.org/cvs/ + +if BR2_PACKAGE_CVS + +config BR2_PACKAGE_CVS_SERVER + bool "server support" + help + Enable cvs server code + +endif + +comment "cvs needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/cvs/cvs.hash b/package/cvs/cvs.hash new file mode 100644 index 0000000000..b386d887b7 --- /dev/null +++ b/package/cvs/cvs.hash @@ -0,0 +1,3 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/cvs/cvs_1.12.13-12%2Bsqueeze1.dsc +sha256 b5961c2476b996e5758fa5e22b60af085adca41164cac0d8f68a1d3b49d4e4f1 cvs_1.12.13.orig.tar.gz +sha256 d52a9232d9cf36302a150d782fc7e5b6f92f8115505ae8a7dc6acfc83e809d2f cvs_1.12.13-12+squeeze1.diff.gz diff --git a/package/cvs/cvs.mk b/package/cvs/cvs.mk new file mode 100644 index 0000000000..6f28b4dbec --- /dev/null +++ b/package/cvs/cvs.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# cvs +# +################################################################################ + +CVS_VERSION = 1.12.13 +CVS_SOURCE = cvs_$(CVS_VERSION).orig.tar.gz +CVS_PATCH = cvs_$(CVS_VERSION)-12+squeeze1.diff.gz +CVS_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/c/cvs +CVS_DEPENDENCIES = ncurses + +CVS_CONF_ENV = cvs_cv_func_printf_ptr=yes + +CVS_CONFIGURE_ARGS = --disable-old-info-format-support +ifeq ($(BR2_PACKAGE_CVS_SERVER),y) +CVS_CONFIGURE_ARGS += --enable-server +else +CVS_CONFIGURE_ARGS += --disable-server +endif +ifeq ($(BR2_PACKAGE_ZLIB),y) +CVS_CONFIGURE_ARGS += --with-external-zlib +endif + +CVS_CONF_OPTS = $(CVS_CONFIGURE_ARGS) + +define CVS_BZIP_UNPACK + $(BZCAT) $(@D)/cvs-$(CVS_VERSION).tar.bz2 | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + rm -f $(@D)/cvs-$(CVS_VERSION).tar.bz2 +endef + +CVS_POST_PATCH_HOOKS += CVS_BZIP_UNPACK + +ifneq ($(CVS_PATCH),) +define CVS_DEBIAN_PATCHES + if [ -d $(@D)/debian/patches ]; then \ + (cd $(@D)/debian/patches && for i in *; \ + do $(SED) 's,^\+\+\+ .*cvs-$(CVS_VERSION)/,+++ cvs-$(CVS_VERSION)/,' $$i; \ + done; \ + ); \ + $(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*; \ + fi +endef +endif + +CVS_POST_PATCH_HOOKS += CVS_DEBIAN_PATCHES + +define CVS_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/src/cvs $(TARGET_DIR)/usr/bin/cvs +endef + +$(eval $(autotools-package)) diff --git a/package/cwiid/0001-fix-link-options-for-as-needed-90.patch b/package/cwiid/0001-fix-link-options-for-as-needed-90.patch new file mode 100644 index 0000000000..806ddaa3fc --- /dev/null +++ b/package/cwiid/0001-fix-link-options-for-as-needed-90.patch @@ -0,0 +1,166 @@ +From 6af678616531eb1f3d3d0a052313ef9d8125bac7 Mon Sep 17 00:00:00 2001 +From: "L. Donnie Smith" +Date: Thu, 4 Feb 2010 22:53:41 -0500 +Subject: [PATCH] fix link options for --as-needed (#90) + +also fix a couple of includes +--- + common/include/app.mak | 2 +- + common/include/lib.mak.in | 4 ++-- + common/include/plugin.mak | 2 +- + lswm/Makefile.in | 2 +- + python/Makefile.in | 2 +- + python/Wiimote.c | 2 +- + python/cwiidmodule.c | 2 +- + wmdemo/wmdemo.c | 1 + + wmgui/Makefile.in | 2 +- + wminput/Makefile.in | 2 +- + wminput/main.c | 1 + + 11 files changed, 12 insertions(+), 10 deletions(-) + +diff --git a/common/include/app.mak b/common/include/app.mak +index f00cf12..c26d0ff 100644 +--- a/common/include/app.mak ++++ b/common/include/app.mak +@@ -10,7 +10,7 @@ DEST_INST_DIR = $(ROOTDIR)$(INST_DIR) + all: $(APP_NAME) + + $(APP_NAME): $(OBJECTS) +- $(CC) -o $@ $(OBJECTS) $(LDFLAGS) $(LDLIBS) ++ $(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS) + + install: $(APP_NAME) + install -D $(APP_NAME) $(DEST_INST_DIR)/$(APP_NAME) +diff --git a/common/include/lib.mak.in b/common/include/lib.mak.in +index 5e81ff3..3afbb14 100644 +--- a/common/include/lib.mak.in ++++ b/common/include/lib.mak.in +@@ -25,8 +25,8 @@ $(STATIC_LIB): $(OBJECTS) + ar rcs $(STATIC_LIB) $(OBJECTS) + + $(SHARED_LIB): $(OBJECTS) +- $(CC) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) $(LDLIBS) \ +- -o $(SHARED_LIB) $(OBJECTS) ++ $(CC) -shared -Wl,-soname,$(SO_NAME) $(LDFLAGS) -o $(SHARED_LIB) \ ++ $(OBJECTS) $(LDLIBS) + + install: install_header install_static install_shared + +diff --git a/common/include/plugin.mak b/common/include/plugin.mak +index 0f61502..a2d5c85 100644 +--- a/common/include/plugin.mak ++++ b/common/include/plugin.mak +@@ -16,7 +16,7 @@ DEST_INST_DIR = $(INST_DIR) + all: $(LIB_NAME) + + $(LIB_NAME): $(OBJECTS) +- $(CC) -shared $(LDFLAGS) $(LDLIBS) -o $(LIB_NAME) $(OBJECTS) ++ $(CC) -shared $(LDFLAGS) -o $(LIB_NAME) $(OBJECTS) $(LDLIBS) + + install: $(LIB_NAME) + install -D $(LIB_NAME) $(DEST_INST_DIR)/$(LIB_NAME) +diff --git a/lswm/Makefile.in b/lswm/Makefile.in +index 79e8b5b..017104f 100644 +--- a/lswm/Makefile.in ++++ b/lswm/Makefile.in +@@ -8,7 +8,7 @@ SOURCES = lswm.c + + CFLAGS += -I@top_builddir@/libcwiid + LDFLAGS += -L@top_builddir@/libcwiid +-LDLIBS += -lcwiid ++LDLIBS += -lcwiid -lbluetooth + INST_DIR = @bindir@ + + include $(COMMON)/include/app.mak +diff --git a/python/Makefile.in b/python/Makefile.in +index 0d7efdf..0ca57ca 100644 +--- a/python/Makefile.in ++++ b/python/Makefile.in +@@ -7,7 +7,7 @@ ifdef ROOTDIR + endif + + all: +- $(PYTHON) setup.py build_ext $(DEBUGFLAGS) -I@top_builddir@/libcwiid -L@top_builddir@/libcwiid -lcwiid ++ $(PYTHON) setup.py build_ext $(DEBUGFLAGS) -I@top_builddir@/libcwiid -L@top_builddir@/libcwiid -lcwiid -lbluetooth + + install: + $(PYTHON) setup.py install --install-lib=${libdir}/python@PYTHON_VERSION@/site-packages $(SET_ROOT_DIR) +diff --git a/python/Wiimote.c b/python/Wiimote.c +index 794e7e2..523185e 100644 +--- a/python/Wiimote.c ++++ b/python/Wiimote.c +@@ -24,7 +24,7 @@ + #include "structmember.h" + #include + #include +-#include "cwiid.h" ++#include + + #if (PY_VERSION_HEX < 0x02050000) + #ifndef PY_SSIZE_T_MIN +diff --git a/python/cwiidmodule.c b/python/cwiidmodule.c +index f6a8f33..a01ed82 100644 +--- a/python/cwiidmodule.c ++++ b/python/cwiidmodule.c +@@ -24,7 +24,7 @@ + + #include + +-#include "cwiid.h" ++#include + #include "structmember.h" + + /* externally defined types */ +diff --git a/wmdemo/wmdemo.c b/wmdemo/wmdemo.c +index 70a25a1..b7aaa7f 100644 +--- a/wmdemo/wmdemo.c ++++ b/wmdemo/wmdemo.c +@@ -2,6 +2,7 @@ + #include + #include + ++#include + #include + + /* This is a sample program written to demonstrate basic CWiid libwiimote +diff --git a/wmgui/Makefile.in b/wmgui/Makefile.in +index 41b205e..14d1c1e 100644 +--- a/wmgui/Makefile.in ++++ b/wmgui/Makefile.in +@@ -8,7 +8,7 @@ SOURCES = main.c interface.c support.c + + CFLAGS += @GTK_CFLAGS@ -I@top_builddir@/libcwiid + LDFLAGS += -L@top_builddir@/libcwiid +-LDLIBS += @GTK_LIBS@ -lm -lcwiid ++LDLIBS += @GTK_LIBS@ -lcwiid -lbluetooth -lm + INST_DIR = @bindir@ + + include $(COMMON)/include/app.mak +diff --git a/wminput/Makefile.in b/wminput/Makefile.in +index 009d4d5..d3c3679 100644 +--- a/wminput/Makefile.in ++++ b/wminput/Makefile.in +@@ -14,7 +14,7 @@ CFLAGS += -I@top_builddir@/libcwiid \ + -DWMINPUT_CONFIG_DIR=\"$(WMINPUT_CONFIG_DIR)\" \ + -DCWIID_PLUGINS_DIR=\"$(CWIID_PLUGINS_DIR)\" + +-LDLIBS += -lcwiid -ldl ++LDLIBS += -lcwiid -lbluetooth -ldl -lpthread + LDFLAGS += -L@top_builddir@/libcwiid -rdynamic + INST_DIR = @bindir@ + +diff --git a/wminput/main.c b/wminput/main.c +index c3a7445..bbc98d9 100644 +--- a/wminput/main.c ++++ b/wminput/main.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include + +-- +1.8.5.2 + diff --git a/package/cwiid/0002-Update-for-BlueZ-changes.patch b/package/cwiid/0002-Update-for-BlueZ-changes.patch new file mode 100644 index 0000000000..c0d78a8ac6 --- /dev/null +++ b/package/cwiid/0002-Update-for-BlueZ-changes.patch @@ -0,0 +1,28 @@ +From c5dd7d4a9af5a7d8ead8ad26d9e5e0f8f8292d29 Mon Sep 17 00:00:00 2001 +From: "L. Donnie Smith" +Date: Sun, 30 Nov 2008 22:34:08 +0000 +Subject: [PATCH] Update for BlueZ changes. + +git-svn-id: http://abstrakraft.org/cwiid/svn/trunk@183 918edb2d-ff29-0410-9de2-eb38e7f22bc7 +--- + libcwiid/bluetooth.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libcwiid/bluetooth.c b/libcwiid/bluetooth.c +index 63284a8..e986f75 100644 +--- a/libcwiid/bluetooth.c ++++ b/libcwiid/bluetooth.c +@@ -122,8 +122,8 @@ int cwiid_get_bdinfo_array(int dev_id, unsigned int timeout, int max_bdinfo, + } + + /* timeout (10000) in milliseconds */ +- if (hci_remote_name(sock, &dev_list[i].bdaddr, BT_NAME_LEN, +- (*bdinfo)[bdinfo_count].name, 10000)) { ++ if (hci_read_remote_name(sock, &dev_list[i].bdaddr, BT_NAME_LEN, ++ (*bdinfo)[bdinfo_count].name, 10000)) { + cwiid_err(NULL, "Bluetooth name read error"); + err = 1; + goto CODA; +-- +1.8.5.2 + diff --git a/package/cwiid/0003-wmdemo-fix-linking-by-adding-the-missing-lbluetooth-.patch b/package/cwiid/0003-wmdemo-fix-linking-by-adding-the-missing-lbluetooth-.patch new file mode 100644 index 0000000000..e1e4ec485e --- /dev/null +++ b/package/cwiid/0003-wmdemo-fix-linking-by-adding-the-missing-lbluetooth-.patch @@ -0,0 +1,27 @@ +From af6bffb5b8b71e99e0f9bbbd2cf1fbd695a643c2 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sat, 8 Dec 2012 13:32:40 +0100 +Subject: [PATCH 1/2] wmdemo: fix linking by adding the missing -lbluetooth to + LDLIBS + +Signed-off-by: Samuel Martin +--- + wmdemo/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wmdemo/Makefile.in b/wmdemo/Makefile.in +index 56aed58..1eccc02 100644 +--- a/wmdemo/Makefile.in ++++ b/wmdemo/Makefile.in +@@ -8,7 +8,7 @@ SOURCES = wmdemo.c + + CFLAGS += -I@top_builddir@/libcwiid + LDFLAGS += -L@top_builddir@/libcwiid +-LDLIBS += -lcwiid ++LDLIBS += -lcwiid -lbluetooth + INST_DIR = @bindir@ + + include $(COMMON)/include/app.mak +-- +1.8.5.2 + diff --git a/package/cwiid/0004-configure-make-wmgui-build-optional.patch b/package/cwiid/0004-configure-make-wmgui-build-optional.patch new file mode 100644 index 0000000000..f5eff33acb --- /dev/null +++ b/package/cwiid/0004-configure-make-wmgui-build-optional.patch @@ -0,0 +1,64 @@ +From dbb578450974db5decc24560da4aeaed838849a1 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Thu, 2 Jan 2014 14:03:07 +0100 +Subject: [PATCH 2/2] configure: make wmgui build optional + +So, make gtk-2 and glib2 dependencies optional (only needed by wmgui) + +Signed-off-by: Samuel Martin +--- + Makefile.in | 2 +- + configure.ac | 17 +++++++++++++---- + 2 files changed, 14 insertions(+), 5 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 6d3ac98..3d2fb45 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -3,7 +3,7 @@ + include @top_builddir@/defs.mak + + LIB_DIRS = libcwiid +-BIN_DIRS = wmgui wminput lswm ++BIN_DIRS = @WMGUI@ wminput lswm + DOC_DIRS = man doc + ifdef PYTHON + BIND_DIRS = python +diff --git a/configure.ac b/configure.ac +index 82ca3e1..d146cb6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -15,6 +15,11 @@ if test "$YACC" != "bison -y"; then + AC_MSG_ERROR([bison not found]) + fi + ++AC_ARG_ENABLE( ++ [wmgui], ++ [AS_HELP_STRING([--disable-wmgui],[Do not build wmgui binary (also drop the gtk-2/glib2 dependency)])], ++ [ENABLE_WMGUI="$enableval"],[ENABLE_WMGUI=yes]) ++ + AC_ARG_WITH( + [python], + [AS_HELP_STRING([--without-python],[compile without python support])], +@@ -98,10 +103,14 @@ else + fi + AC_SUBST(LDCONFIG) + +-pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0" +-PKG_CHECK_MODULES([GTK], [$pkg_modules]) +-AC_SUBST(GTK_CFLAGS) +-AC_SUBST(GTK_LIBS) ++AS_IF( ++ [test "x$ENABLE_WMGUI" = xyes], ++ [pkg_modules="gtk+-2.0 >= 2.0.0 gthread-2.0" ; ++ PKG_CHECK_MODULES([GTK], [$pkg_modules]) ++ AC_SUBST(GTK_CFLAGS) ++ AC_SUBST(GTK_LIBS) ++ AC_SUBST(WMGUI, wmgui)] ++) + + AC_OUTPUT( + [Makefile] +-- +1.8.5.2 + diff --git a/package/cwiid/Config.in b/package/cwiid/Config.in new file mode 100644 index 0000000000..03b7dbbcdb --- /dev/null +++ b/package/cwiid/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_CWIID + bool "cwiid" + depends on !BR2_STATIC_LIBS # bluez_utils + depends on BR2_USE_WCHAR # bluez_utils -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # bluez_utils -> dbus, alsa-lib, libglib2 + depends on BR2_USE_MMU # bluez_utils -> dbus, libglib2 + select BR2_PACKAGE_BLUEZ_UTILS + help + A collection of Linux tools written in C for interfacing to the + Nintendo Wiimote. + + http://abstrakraft.org/cwiid/ + +if BR2_PACKAGE_CWIID +config BR2_PACKAGE_CWIID_WMGUI + bool "wmgui" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk3 -> pango -> harfbuzz + depends on BR2_PACKAGE_XORG7 # libgtk2 + depends on BR2_USE_WCHAR # libgtk2 -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2 + depends on BR2_USE_MMU # libgtk2 -> libglib2 + depends on BR2_INSTALL_LIBSTDCPP # libgtk2 -> pango + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBGTK2 +endif + +comment "cwiid needs a toolchain w/ dynamic lib, threads, wchar" + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_USE_MMU diff --git a/package/cwiid/cwiid.hash b/package/cwiid/cwiid.hash new file mode 100644 index 0000000000..749c9c3cfc --- /dev/null +++ b/package/cwiid/cwiid.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 8880378303d872ea65b037184ad6c96bc68f87764b503c152032f56344b5e81d cwiid-0.6.00.tgz diff --git a/package/cwiid/cwiid.mk b/package/cwiid/cwiid.mk new file mode 100644 index 0000000000..0cfc77479e --- /dev/null +++ b/package/cwiid/cwiid.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# cwiid +# +################################################################################ + +CWIID_VERSION = 0.6.00 +CWIID_SOURCE = cwiid-$(CWIID_VERSION).tgz +CWIID_SITE = http://abstrakraft.org/cwiid/downloads +CWIID_LICENSE = GPLv2+ +CWIID_LICENSE_FILES = COPYING + +CWIID_AUTORECONF = YES +CWIID_INSTALL_STAGING = YES + +CWIID_DEPENDENCIES = host-pkgconf host-bison host-flex bluez_utils + +# Disable python support. This disables the 2 following things: +# - wminput Python plugin support +# - cwiid Python module +CWIID_CONF_OPTS = --without-python --disable-ldconfig + +ifeq ($(BR2_PACKAGE_CWIID_WMGUI),y) +CWIID_DEPENDENCIES += libgtk2 libglib2 +CWIID_CONF_OPTS += --enable-wmgui +else +CWIID_CONF_OPTS += --disable-wmgui +endif + +$(eval $(autotools-package)) diff --git a/package/cxxtest/Config.in b/package/cxxtest/Config.in new file mode 100644 index 0000000000..207adab127 --- /dev/null +++ b/package/cxxtest/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_CXXTEST + bool "cxxtest" + depends on BR2_INSTALL_LIBSTDCPP + help + CxxTest is a unit testing framework for C++ + + http://cxxtest.com/ + +comment "cxxtest needs a toolchain w/ C++ support" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/cxxtest/cxxtest.hash b/package/cxxtest/cxxtest.hash new file mode 100644 index 0000000000..f552e803fa --- /dev/null +++ b/package/cxxtest/cxxtest.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 1c154fef91c65dbf1cd4519af7ade70a61d85a923b6e0c0b007dc7f4895cf7d8 cxxtest-4.4.tar.gz diff --git a/package/cxxtest/cxxtest.mk b/package/cxxtest/cxxtest.mk new file mode 100644 index 0000000000..93bdd8b8d8 --- /dev/null +++ b/package/cxxtest/cxxtest.mk @@ -0,0 +1,30 @@ +####################################################################################### +# +# cxxtest +# +####################################################################################### + +CXXTEST_VERSION = 4.4 +CXXTEST_SITE = https://github.com/CxxTest/cxxtest/releases/download/$(CXXTEST_VERSION) +CXXTEST_LICENSE = LGPLv3 +CXXTEST_LICENSE_FILES = COPYING +CXXTEST_INSTALL_STAGING = YES +CXXTEST_INSTALL_TARGET = NO +CXXTEST_DEPENDENCIES = host-cxxtest +HOST_CXXTEST_SETUP_TYPE = setuptools +HOST_CXXTEST_SUBDIR = python + +# Copy CxxTest header files to staging directory +define CXXTEST_INSTALL_STAGING_CMDS + $(INSTALL) -m 755 -d $(STAGING_DIR)/usr/include/cxxtest + $(INSTALL) -m 644 -t $(STAGING_DIR)/usr/include/cxxtest $(@D)/cxxtest/* +endef + +# CxxTest uses python infrastructure as the build system. It consists of two parts: +# 1. cxxtestgen tool to process tests defined in header files to generate C++ source +# files. cxxtestgen is built as a host package, so that it can be used natively. +# 2. A set of header files which are installed in staging directory. This will be +# used in cross-compiling test harness to generate executable which will run on target. + +$(eval $(generic-package)) +$(eval $(host-python-package)) diff --git a/package/czmq/Config.in b/package/czmq/Config.in new file mode 100644 index 0000000000..6a99336b3b --- /dev/null +++ b/package/czmq/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_CZMQ + bool "czmq" + select BR2_PACKAGE_ZEROMQ + depends on BR2_USE_MMU # fork() + depends on BR2_INSTALL_LIBSTDCPP # zeromq + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + help + High-level C Binding for 0MQ + + http://czmq.zeromq.org/ + +comment "czmq needs a toolchain w/ C++, wchar, threads" + depends on BR2_USE_MMU + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && \ + BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/czmq/czmq.hash b/package/czmq/czmq.hash new file mode 100644 index 0000000000..20ed7b611d --- /dev/null +++ b/package/czmq/czmq.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 e56f8498daf70310b31c42669b2f9b753c5e747eafaff6d4fdac26d72a474b27 czmq-v3.0.2.tar.gz +sha256 74e003c05ab1391502dff2eaad96a5361b19583cd1ee0ad681c929721c8e1e3a bcf583633e8b27a9bfbed1e4a717b9373f7446be.patch diff --git a/package/czmq/czmq.mk b/package/czmq/czmq.mk new file mode 100644 index 0000000000..2b73b6135a --- /dev/null +++ b/package/czmq/czmq.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# czmq +# +################################################################################ + +CZMQ_VERSION = v3.0.2 +CZMQ_SITE = $(call github,zeromq,czmq,$(CZMQ_VERSION)) +CZMQ_PATCH = https://github.com/zeromq/czmq/commit/bcf583633e8b27a9bfbed1e4a717b9373f7446be.patch + +# Autoreconf required as we use the git tree +CZMQ_AUTORECONF = YES +CZMQ_INSTALL_STAGING = YES +CZMQ_DEPENDENCIES = zeromq host-pkgconf +CZMQ_LICENSE = MPLv2.0 +CZMQ_LICENSE_FILES = LICENSE + +# asciidoc is a python script that imports unicodedata, which is not in +# host-python, so disable asciidoc entirely. +CZMQ_CONF_ENV = ac_cv_prog_czmq_have_asciidoc=no + +define CZMQ_CREATE_CONFIG_DIR + mkdir -p $(@D)/config +endef + +CZMQ_POST_PATCH_HOOKS += CZMQ_CREATE_CONFIG_DIR + +$(eval $(autotools-package)) diff --git a/package/dado/Config.in b/package/dado/Config.in new file mode 100644 index 0000000000..fb469f40e1 --- /dev/null +++ b/package/dado/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_DADO + bool "dado" + help + Database Facilities for LuaSQL. + + http://www.ccpa.puc-rio.br/software/dado/ diff --git a/package/dado/dado.hash b/package/dado/dado.hash new file mode 100644 index 0000000000..3f17f083d3 --- /dev/null +++ b/package/dado/dado.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 b7a68583c36643ad9040937d7e2b99230af7da83c7cbd13c9923881f1eb7490f dado-1.6.0-1.src.rock diff --git a/package/dado/dado.mk b/package/dado/dado.mk new file mode 100644 index 0000000000..a09dd6da51 --- /dev/null +++ b/package/dado/dado.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# dado +# +################################################################################ + +DADO_VERSION = 1.6.0-1 +DADO_LICENSE = MIT + +$(eval $(luarocks-package)) diff --git a/package/dash/0001-no-config.h-for-helpers.patch b/package/dash/0001-no-config.h-for-helpers.patch new file mode 100644 index 0000000000..9fd449c414 --- /dev/null +++ b/package/dash/0001-no-config.h-for-helpers.patch @@ -0,0 +1,35 @@ +[PATCH] Don't include config.h when building helpers using the native compiler + +config.h contains settings for the cross compiler (most importantly +32/64bit versions of functions), so don't include it when calling the +native compiler to build the helpers. + +Otherwise we get build errors like: + +/usr/bin/gcc -include ../config.h -DBSD=1 -DSHELL -DIFS_BROKEN -g -O2 -Wall -o mkinit mkinit.c +In file included from /usr/include/sys/stat.h:107, + from /usr/include/fcntl.h:38, + from mkinit.c:50: +/usr/include/bits/stat.h:117: error: redefinition of ‘struct stat’ +In file included from /usr/include/fcntl.h:38, + from mkinit.c:50: +/usr/include/sys/stat.h:504: error: redefinition of ‘stat’ +/usr/include/sys/stat.h:455: note: previous definition of ‘stat’ was here + +Signed-off-by: Peter Korsgaard +--- + src/Makefile.in | 1 - + 1 file changed, 1 deletion(-) + +Index: dash-0.5.5.1/src/Makefile.in +=================================================================== +--- dash-0.5.5.1.orig/src/Makefile.in ++++ dash-0.5.5.1/src/Makefile.in +@@ -165,7 +165,6 @@ COMMON_CPPFLAGS = \ + AM_CFLAGS = $(COMMON_CFLAGS) + AM_CPPFLAGS = $(COMMON_CPPFLAGS) + AM_CFLAGS_FOR_BUILD = -g -O2 $(COMMON_CFLAGS) +-AM_CPPFLAGS_FOR_BUILD = $(COMMON_CPPFLAGS) + COMPILE_FOR_BUILD = \ + $(CC_FOR_BUILD) $(AM_CPPFLAGS_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) \ + $(AM_CFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) diff --git a/package/dash/Config.in b/package/dash/Config.in new file mode 100644 index 0000000000..e06087e117 --- /dev/null +++ b/package/dash/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_DASH + bool "dash" + depends on BR2_USE_MMU # fork() + help + The Debian/Linux port of the NetBSD version of + ash (the Almquist SHell). + + http://gondor.apana.org.au/~herbert/dash diff --git a/package/dash/dash.hash b/package/dash/dash.hash new file mode 100644 index 0000000000..0198cd8345 --- /dev/null +++ b/package/dash/dash.hash @@ -0,0 +1,3 @@ +# From http://ftp.debian.org/debian/pool/main/d/dash/dash_0.5.8-1.dsc +sha256 c6db3a237747b02d20382a761397563d813b306c020ae28ce25a1c3915fac60f dash_0.5.8.orig.tar.gz +sha256 d751769cc1ef8b825a177e782f1cd3e35bde7c268107fa4febf8d235e12c64d9 dash_0.5.8-1.diff.gz diff --git a/package/dash/dash.mk b/package/dash/dash.mk new file mode 100644 index 0000000000..ed8525ce69 --- /dev/null +++ b/package/dash/dash.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# dash +# +################################################################################ + +DASH_VERSION = 0.5.8 +DASH_SOURCE = dash_$(DASH_VERSION).orig.tar.gz +DASH_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/d/dash +DASH_PATCH = dash_$(DASH_VERSION)-1.diff.gz +DASH_LICENSE = BSD-3c, GPLv2+ (mksignames.c) +DASH_LICENSE_FILES = COPYING + +define DASH_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/src/dash $(TARGET_DIR)/bin/dash +endef + +$(eval $(autotools-package)) diff --git a/package/dawgdic/Config.in b/package/dawgdic/Config.in new file mode 100644 index 0000000000..b67342b194 --- /dev/null +++ b/package/dawgdic/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_DAWGDIC + bool "dawgdic" + depends on BR2_INSTALL_LIBSTDCPP + # needs std::strtoll + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + help + dawgdic provides a library for building and accessing + dictionaries implemented with directed acyclic word graphs + (DAWG). A dawg is constructed by minimizing a trie as a + deterministic finite automaton (DFA), and thus the dawg has + an advantage in memory usage. In addition, dawgdic uses a + double-array as a base data structure, so its retrieval + speed is as fast as that of Darts, a library for building + and accessing double-array tries. + + https://github.com/stil/dawgdic + +comment "dawgdic needs a toolchain w/ C++, gcc >= 4.6" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 diff --git a/package/dawgdic/dawgdic.mk b/package/dawgdic/dawgdic.mk new file mode 100644 index 0000000000..2f0a53b16e --- /dev/null +++ b/package/dawgdic/dawgdic.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# dawgdic +# +################################################################################ + +DAWGDIC_VERSION = 16ac537ba9883ff01b63b6d1fdc3072150c68fee +DAWGDIC_SITE = $(call github,stil,dawgdic,$(DAWGDIC_VERSION)) +DAWGDIC_LICENSE = BSD-3c +DAWGDIC_LICENSE_FILES = COPYING +DAWGDIC_AUTORECONF = YES +DAWGDIC_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/dbus-cpp/0001-gcc4.7.patch b/package/dbus-cpp/0001-gcc4.7.patch new file mode 100644 index 0000000000..ad3046c829 --- /dev/null +++ b/package/dbus-cpp/0001-gcc4.7.patch @@ -0,0 +1,17 @@ +Fix build failure with gcc 4.7+ +From bugtracker: http://sourceforge.net/p/dbus-cplusplus/patches/13/ + +Signed-off-by: Gustavo Zacarias + +diff --git a/include/dbus-c++/eventloop-integration.h b/include/dbus-c++/eventloop-integration.h +index 1b0302e..3e44304 100644 +--- a/include/dbus-c++/eventloop-integration.h ++++ b/include/dbus-c++/eventloop-integration.h +@@ -26,6 +26,7 @@ + #define __DBUSXX_EVENTLOOP_INTEGRATION_H + + #include ++#include + #include "api.h" + #include "dispatcher.h" + #include "util.h" diff --git a/package/dbus-cpp/0002-cxxflags-ldflags-for-build.patch b/package/dbus-cpp/0002-cxxflags-ldflags-for-build.patch new file mode 100644 index 0000000000..fefb9690d3 --- /dev/null +++ b/package/dbus-cpp/0002-cxxflags-ldflags-for-build.patch @@ -0,0 +1,32 @@ +Use CXXFLAGS_FOR_BUILD and LDFLAGS_FOR_BUILD for the tools since expat +may not be living in the default include & library path. + +Signed-off-by: Gustavo Zacarias + +diff -Nura libdbus-c++-0.9.0.orig/configure.ac libdbus-c++-0.9.0/configure.ac +--- libdbus-c++-0.9.0.orig/configure.ac 2014-01-05 15:28:03.653886567 -0300 ++++ libdbus-c++-0.9.0/configure.ac 2014-01-05 15:44:32.571172225 -0300 +@@ -65,7 +65,11 @@ + AC_PROG_CXX + + CXX_FOR_BUILD=${CXX_FOR_BUILD-${CXX}} ++CXXFLAGS_FOR_BUILD=${CXXFLAGS_FOR_BUILD-${CXXFLAGS}} ++LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-${LDFLAGS}} + AC_SUBST(CXX_FOR_BUILD) ++AC_SUBST(CXXFLAGS_FOR_BUILD) ++AC_SUBST(LDFLAGS_FOR_BUILD) + + AM_PROG_LIBTOOL + +diff -Nura libdbus-c++-0.9.0.orig/tools/Makefile.am libdbus-c++-0.9.0/tools/Makefile.am +--- libdbus-c++-0.9.0.orig/tools/Makefile.am 2014-01-05 15:28:03.652886535 -0300 ++++ libdbus-c++-0.9.0/tools/Makefile.am 2014-01-05 15:44:42.071482390 -0300 +@@ -1,6 +1,8 @@ + # hacky, but ... + + CXX = $(CXX_FOR_BUILD) ++CXXFLAGS = $(CXXFLAGS_FOR_BUILD) ++LDFLAGS = $(LDFLAGS_FOR_BUILD) + + AM_CPPFLAGS = \ + $(dbus_CFLAGS) \ diff --git a/package/dbus-cpp/Config.in b/package/dbus-cpp/Config.in new file mode 100644 index 0000000000..8e9ed662a5 --- /dev/null +++ b/package/dbus-cpp/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_DBUS_CPP + bool "dbus-c++" + depends on BR2_PACKAGE_DBUS + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus + depends on BR2_USE_MMU # dbus + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_TOOLCHAIN_USES_MUSL # no PTHREAD_RECURSIVE_MUTEX_* + select BR2_PACKAGE_EXPAT + help + dbus-c++ attempts to provide a C++ API for D-BUS. + The library has a glib/gtk and an Ecore mainloop integration. + It also offers an optional own main loop. + + http://sourceforge.net/projects/dbus-cplusplus/ + +comment "dbus-c++ needs a uClibc or (e)glibc toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_DBUS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \ + || BR2_TOOLCHAIN_USES_MUSL diff --git a/package/dbus-cpp/dbus-cpp.hash b/package/dbus-cpp/dbus-cpp.hash new file mode 100644 index 0000000000..b3fc3efd33 --- /dev/null +++ b/package/dbus-cpp/dbus-cpp.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 bc11ac297b3cb010be904c72789695543ee3fdf3d75cdc8225fd371385af4e61 libdbus-c++-0.9.0.tar.gz diff --git a/package/dbus-cpp/dbus-cpp.mk b/package/dbus-cpp/dbus-cpp.mk new file mode 100644 index 0000000000..0b51967061 --- /dev/null +++ b/package/dbus-cpp/dbus-cpp.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# dbus-cpp +# +################################################################################ + +DBUS_CPP_VERSION = 0.9.0 +DBUS_CPP_SITE = http://downloads.sourceforge.net/project/dbus-cplusplus/dbus-c++/$(DBUS_CPP_VERSION) +DBUS_CPP_SOURCE = libdbus-c++-$(DBUS_CPP_VERSION).tar.gz +DBUS_CPP_INSTALL_STAGING = YES +# expat is required for the tools irrespective of dbus xml backend +DBUS_CPP_DEPENDENCIES = host-dbus-cpp host-pkgconf dbus expat +HOST_DBUS_CPP_DEPENDENCIES = host-pkgconf host-dbus host-expat +DBUS_CPP_CONF_OPTS = \ + --disable-examples \ + --disable-tests \ + --disable-doxygen-docs \ + --with-build-libdbus-cxx=$(HOST_DBUS_CPP_BUILDDIR) +HOST_DBUS_CPP_CONF_OPTS = \ + --disable-examples \ + --disable-tests \ + --disable-doxygen-docs \ + --disable-ecore \ + --disable-glib +DBUS_CPP_AUTORECONF = YES +DBUS_CPP_LICENSE = LGPLv2.1+ +DBUS_CPP_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_EFL),y) +DBUS_CPP_CONF_OPTS += --enable-ecore +DBUS_CPP_DEPENDENCIES += efl +else +DBUS_CPP_CONF_OPTS += --disable-ecore +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +DBUS_CPP_CONF_OPTS += --enable-glib +DBUS_CPP_DEPENDENCIES += libglib2 +else +DBUS_CPP_CONF_OPTS += --disable-glib +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/dbus-glib/Config.in b/package/dbus-glib/Config.in new file mode 100644 index 0000000000..7fe0ac6606 --- /dev/null +++ b/package/dbus-glib/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_DBUS_GLIB + bool "dbus-glib" + depends on BR2_PACKAGE_DBUS + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + help + GLib bindings for D-Bus. + + http://www.freedesktop.org/software/dbus + +comment "dbus-glib needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_DBUS + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/dbus-glib/dbus-glib.hash b/package/dbus-glib/dbus-glib.hash new file mode 100644 index 0000000000..e5a2ebc309 --- /dev/null +++ b/package/dbus-glib/dbus-glib.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 b38952706dcf68bad9c302999ef0f420b8cf1a2428227123f0ac4764b689c046 dbus-glib-0.106.tar.gz diff --git a/package/dbus-glib/dbus-glib.mk b/package/dbus-glib/dbus-glib.mk new file mode 100644 index 0000000000..e191507c63 --- /dev/null +++ b/package/dbus-glib/dbus-glib.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# dbus-glib +# +################################################################################ + +DBUS_GLIB_VERSION = 0.106 +DBUS_GLIB_SITE = http://dbus.freedesktop.org/releases/dbus-glib +DBUS_GLIB_INSTALL_STAGING = YES +DBUS_GLIB_LICENSE = AFLv2.1, GPLv2+ +DBUS_GLIB_LICENSE_FILES = COPYING + +DBUS_GLIB_CONF_ENV = \ + ac_cv_have_abstract_sockets=yes \ + ac_cv_func_posix_getpwnam_r=yes \ + have_abstract_sockets=yes + +DBUS_GLIB_CONF_OPTS = \ + --disable-tests \ + --disable-xml-docs \ + --with-introspect-xml=$(DBUS_HOST_INTROSPECT) \ + --with-dbus-binding-tool=$(DBUS_GLIB_HOST_BINARY) \ + --disable-bash-completion \ + --disable-doxygen-docs \ + --enable-asserts=yes + +DBUS_GLIB_DEPENDENCIES = host-pkgconf dbus host-dbus host-dbus-glib libglib2 expat + +HOST_DBUS_GLIB_DEPENDENCIES = host-dbus host-expat host-libglib2 + +HOST_DBUS_GLIB_CONF_OPTS = \ + --disable-tests \ + --disable-xml-docs \ + --disable-bash-completion \ + --disable-doxygen-docs \ + --enable-asserts=yes + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +# dbus-glib for the host +DBUS_GLIB_HOST_BINARY = $(HOST_DIR)/usr/bin/dbus-binding-tool diff --git a/package/dbus-python/Config.in b/package/dbus-python/Config.in new file mode 100644 index 0000000000..332726348d --- /dev/null +++ b/package/dbus-python/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_DBUS_PYTHON + bool "dbus-python" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_PACKAGE_DBUS + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_DBUS_GLIB + # pyexpat: runtime dependency only + select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 + help + Python bindings for D-Bus + + http://dbus.freedesktop.org/doc/dbus-python/ + +comment "dbus-python needs a toolchain w/ wchar, threads" + depends on BR2_PACKAGE_DBUS && (BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3) + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/dbus-python/dbus-python.hash b/package/dbus-python/dbus-python.hash new file mode 100644 index 0000000000..94af72e234 --- /dev/null +++ b/package/dbus-python/dbus-python.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 e12c6c8b2bf3a9302f75166952cbe41d6b38c3441bbc6767dbd498942316c6df dbus-python-1.2.0.tar.gz diff --git a/package/dbus-python/dbus-python.mk b/package/dbus-python/dbus-python.mk new file mode 100644 index 0000000000..40799678f8 --- /dev/null +++ b/package/dbus-python/dbus-python.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# dbus-python +# +################################################################################ + +DBUS_PYTHON_VERSION = 1.2.0 +DBUS_PYTHON_SITE = http://dbus.freedesktop.org/releases/dbus-python +DBUS_PYTHON_INSTALL_STAGING = YES +DBUS_PYTHON_LICENSE = MIT +DBUS_PYTHON_LICENSE_FILES = COPYING +DBUS_PYTHON_DEPENDENCIES = dbus-glib +DBUS_PYTHON_CONF_OPTS = --disable-html-docs --disable-api-docs + +ifeq ($(BR2_PACKAGE_PYTHON),y) +DBUS_PYTHON_DEPENDENCIES += python host-python + +DBUS_PYTHON_CONF_ENV += \ + PYTHON=$(HOST_DIR)/usr/bin/python2 \ + PYTHON_INCLUDES="`$(STAGING_DIR)/usr/bin/python2-config --includes`" \ + PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python2-config --ldflags`" +else +DBUS_PYTHON_DEPENDENCIES += python3 host-python3 + +DBUS_PYTHON_CONF_ENV += \ + PYTHON=$(HOST_DIR)/usr/bin/python3 \ + PYTHON_INCLUDES="`$(STAGING_DIR)/usr/bin/python3-config --includes`" \ + PYTHON_LIBS="`$(STAGING_DIR)/usr/bin/python3-config --ldflags`" +endif + +$(eval $(autotools-package)) diff --git a/package/dbus-triggerd/Config.in b/package/dbus-triggerd/Config.in new file mode 100644 index 0000000000..a39f911fdb --- /dev/null +++ b/package/dbus-triggerd/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_DBUS_TRIGGERD + bool "dbus-triggerd" + depends on BR2_USE_MMU # fork(), dbus + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus + depends on BR2_PACKAGE_DBUS + help + dbus-triggerd is a tool to trigger shell-commands upon receiving + a given dbus-signal. + + http://gareus.org/oss/dbustriggerd/start + +comment "dbus-triggerd needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_DBUS + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/dbus-triggerd/dbus-triggerd.mk b/package/dbus-triggerd/dbus-triggerd.mk new file mode 100644 index 0000000000..48d5fb29fe --- /dev/null +++ b/package/dbus-triggerd/dbus-triggerd.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# dbus-triggerd +# +################################################################################ + +DBUS_TRIGGERD_VERSION = ba3dbec805cb707c94c54de21666bf18b79bcc09 +DBUS_TRIGGERD_SITE = git://rg42.org/dbustriggerd.git +DBUS_TRIGGERD_LICENSE = GPLv2+ +DBUS_TRIGGERD_DEPENDENCIES = host-pkgconf dbus + +define DBUS_TRIGGERD_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) all +endef + +define DBUS_TRIGGERD_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/dbus/Config.in b/package/dbus/Config.in new file mode 100644 index 0000000000..7d49ce5047 --- /dev/null +++ b/package/dbus/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_DBUS + bool "dbus" + depends on BR2_TOOLCHAIN_HAS_THREADS + # uses fork() + depends on BR2_USE_MMU + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_SYSTEMD_COMPAT if BR2_INIT_SYSTEMD + help + The D-Bus message bus system. + + http://www.freedesktop.org/wiki/Software/dbus + +comment "dbus needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/dbus/S30dbus b/package/dbus/S30dbus new file mode 100644 index 0000000000..4427b5c72c --- /dev/null +++ b/package/dbus/S30dbus @@ -0,0 +1,78 @@ +#!/bin/sh +# +# messagebus: The D-BUS systemwide message bus +# +# chkconfig: 345 97 03 +# description: This is a daemon which broadcasts notifications of system events \ +# and other messages. See http://www.freedesktop.org/software/dbus/ +# +# processname: dbus-daemon +# pidfile: /var/run/messagebus.pid +# + +# Sanity checks. +[ -x /usr/bin/dbus-daemon ] || exit 0 + +# Create needed directories. +[ -d /var/run/dbus ] || mkdir -p /var/run/dbus +[ -d /var/lock/subsys ] || mkdir -p /var/lock/subsys +[ -d /tmp/dbus ] || mkdir -p /tmp/dbus + +RETVAL=0 + +start() { + printf "Starting system message bus: " + + dbus-uuidgen --ensure + dbus-daemon --system + RETVAL=$? + echo "done" + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dbus-daemon +} + +stop() { + printf "Stopping system message bus: " + + ## we don't want to kill all the per-user $processname, we want + ## to use the pid file *only*; because we use the fake nonexistent + ## program name "$servicename" that should be safe-ish + killall dbus-daemon + RETVAL=$? + echo "done" + if [ $RETVAL -eq 0 ]; then + rm -f /var/lock/subsys/dbus-daemon + rm -f /var/run/messagebus.pid + fi +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status $processname + RETVAL=$? + ;; + restart) + stop + start + ;; + condrestart) + if [ -f /var/lock/subsys/$servicename ]; then + stop + start + fi + ;; + reload) + echo "Message bus can't reload its configuration, you have to restart it" + RETVAL=$? + ;; + *) + echo "Usage: $0 {start|stop|status|restart|condrestart|reload}" + ;; +esac +exit $RETVAL diff --git a/package/dbus/dbus.hash b/package/dbus/dbus.hash new file mode 100644 index 0000000000..d38b298067 --- /dev/null +++ b/package/dbus/dbus.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 baf3d22baa26d3bdd9edc587736cd5562196ce67996d65b82103bedbe1f0c014 dbus-1.10.8.tar.gz diff --git a/package/dbus/dbus.mk b/package/dbus/dbus.mk new file mode 100644 index 0000000000..fbdceb3c2d --- /dev/null +++ b/package/dbus/dbus.mk @@ -0,0 +1,128 @@ +################################################################################ +# +# dbus +# +################################################################################ + +DBUS_VERSION = 1.10.8 +DBUS_SITE = http://dbus.freedesktop.org/releases/dbus +DBUS_LICENSE = AFLv2.1, GPLv2+ +DBUS_LICENSE_FILES = COPYING +DBUS_INSTALL_STAGING = YES + +define DBUS_PERMISSIONS + /usr/libexec/dbus-daemon-launch-helper f 4755 0 0 - - - - - +endef + +define DBUS_USERS + dbus -1 dbus -1 * /var/run/dbus - dbus DBus messagebus user +endef + +DBUS_DEPENDENCIES = host-pkgconf expat + +DBUS_CONF_ENV = ac_cv_have_abstract_sockets=yes +DBUS_CONF_OPTS = \ + --with-dbus-user=dbus \ + --disable-tests \ + --disable-asserts \ + --enable-abstract-sockets \ + --disable-selinux \ + --disable-xml-docs \ + --disable-doxygen-docs \ + --disable-dnotify \ + --with-xml=expat \ + --with-system-socket=/var/run/dbus/system_bus_socket \ + --with-system-pid-file=/var/run/messagebus.pid + +ifeq ($(BR2_STATIC_LIBS),y) +DBUS_CONF_OPTS += LIBS='-pthread' +endif + +ifeq ($(BR2_microblaze),y) +# microblaze toolchain doesn't provide inotify_rm_* but does have sys/inotify.h +DBUS_CONF_OPTS += --disable-inotify +endif + +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +DBUS_CONF_OPTS += --enable-selinux +DBUS_DEPENDENCIES += libselinux +else +DBUS_CONF_OPTS += --disable-selinux +endif + +ifeq ($(BR2_PACKAGE_AUDIT)$(BR2_PACKAGE_LIBCAP_NG),yy) +DBUS_CONF_OPTS += --enable-libaudit +DBUS_DEPENDENCIES += audit libcap-ng +else +DBUS_CONF_OPTS += --disable-libaudit +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +DBUS_CONF_OPTS += --with-x +DBUS_DEPENDENCIES += xlib_libX11 +ifeq ($(BR2_PACKAGE_XLIB_LIBSM),y) +DBUS_DEPENDENCIES += xlib_libSM +endif +else +DBUS_CONF_OPTS += --without-x +endif + +ifeq ($(BR2_INIT_SYSTEMD),y) +DBUS_CONF_OPTS += \ + --enable-systemd \ + --with-systemdsystemunitdir=/usr/lib/systemd/system +DBUS_DEPENDENCIES += systemd +else +DBUS_CONF_OPTS += --disable-systemd +endif + +# fix rebuild (dbus makefile errors out if /var/lib/dbus is a symlink) +define DBUS_REMOVE_VAR_LIB_DBUS + rm -rf $(TARGET_DIR)/var/lib/dbus +endef + +DBUS_POST_BUILD_HOOKS += DBUS_REMOVE_VAR_LIB_DBUS + +define DBUS_REMOVE_DEVFILES + rm -rf $(TARGET_DIR)/usr/lib/dbus-1.0 +endef + +DBUS_POST_INSTALL_TARGET_HOOKS += DBUS_REMOVE_DEVFILES + +define DBUS_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/dbus/S30dbus \ + $(TARGET_DIR)/etc/init.d/S30dbus + + mkdir -p $(TARGET_DIR)/var/lib + rm -rf $(TARGET_DIR)/var/lib/dbus + ln -sf /tmp/dbus $(TARGET_DIR)/var/lib/dbus +endef + +define DBUS_INSTALL_INIT_SYSTEMD + mkdir -p $(TARGET_DIR)/var/lib/dbus + ln -sf /etc/machine-id $(TARGET_DIR)/var/lib/dbus/machine-id +endef + +HOST_DBUS_DEPENDENCIES = host-pkgconf host-expat +HOST_DBUS_CONF_OPTS = \ + --with-dbus-user=dbus \ + --disable-tests \ + --disable-asserts \ + --enable-abstract-sockets \ + --disable-selinux \ + --disable-xml-docs \ + --disable-doxygen-docs \ + --enable-dnotify \ + --without-x \ + --with-xml=expat + +# dbus for the host +DBUS_HOST_INTROSPECT = $(HOST_DBUS_DIR)/introspect.xml + +HOST_DBUS_GEN_INTROSPECT = \ + $(HOST_DIR)/usr/bin/dbus-daemon --introspect > $(DBUS_HOST_INTROSPECT) + +HOST_DBUS_POST_INSTALL_HOOKS += HOST_DBUS_GEN_INTROSPECT + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/dcron/Config.in b/package/dcron/Config.in new file mode 100644 index 0000000000..0f4ffc9af8 --- /dev/null +++ b/package/dcron/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_DCRON + bool "dcron" + depends on BR2_USE_MMU # fork() + help + dcron is a time-based job scheduler with anacron-like + features. It works as a background daemon that parses + individual crontab files and executes commands on behalf of + the users in question. + + Upon installation, this package will enable a system level + cron daemon with hourly, daily, weekly and monthly crontabs. + + However, it doesn't allow non root users to create their own + crontab file. This is because /var/spool/cron/crontabs is + non user writable. + + Typically, a crontab group is created on the system and + users allowed to create crontab entries are added into this + group, while crontab executable is owned by root:crontab + with sgid bit enabled. + + http://www.jimpryor.net/linux/dcron.html diff --git a/package/dcron/S90dcron b/package/dcron/S90dcron new file mode 100644 index 0000000000..de21d2ca13 --- /dev/null +++ b/package/dcron/S90dcron @@ -0,0 +1,22 @@ +#!/bin/sh + +case "$1" in + start) + printf "Starting cron ... " + start-stop-daemon -S -q -m -b -p /var/run/dcron.pid --exec /usr/sbin/crond -- -f + echo "done." + ;; + stop) + printf "Stopping cron ..." + start-stop-daemon -K -q -p /var/run/dcron.pid + echo "done." + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" + ;; +esac diff --git a/package/dcron/dcron.hash b/package/dcron/dcron.hash new file mode 100644 index 0000000000..3e53ddc25f --- /dev/null +++ b/package/dcron/dcron.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9e50edb6f5bd8153b16bad05087d985e5153ce45cc01ae77e7f842213fb4a824 dcron-4.5.tar.gz diff --git a/package/dcron/dcron.mk b/package/dcron/dcron.mk new file mode 100644 index 0000000000..7e81b63803 --- /dev/null +++ b/package/dcron/dcron.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# dcron +# +################################################################################ + +DCRON_VERSION = 4.5 +DCRON_SITE = http://www.jimpryor.net/linux/releases +# The source code does not specify the version of the GPL that is used. +DCRON_LICENSE = GPL + +# Overwrite cron-related Busybox commands if available +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +DCRON_DEPENDENCIES = busybox +endif + +define DCRON_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define DCRON_INSTALL_TARGET_CMDS + $(INSTALL) -D -m0700 $(@D)/crond $(TARGET_DIR)/usr/sbin/crond + $(INSTALL) -D -m4755 $(@D)/crontab $(TARGET_DIR)/usr/bin/crontab + $(INSTALL) -D -m0644 $(@D)/extra/root.crontab $(TARGET_DIR)/etc/cron.d/system + # Busybox provides run-parts, so there is no need to use nor install provided run-cron + $(SED) 's#/usr/sbin/run-cron#/bin/run-parts#g' $(TARGET_DIR)/etc/cron.d/system + $(INSTALL) -d -m0755 $(TARGET_DIR)/var/spool/cron/crontabs \ + $(TARGET_DIR)/etc/cron.daily $(TARGET_DIR)/etc/cron.hourly \ + $(TARGET_DIR)/etc/cron.monthly $(TARGET_DIR)/etc/cron.weekly +endef + +define DCRON_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/dcron/S90dcron $(TARGET_DIR)/etc/init.d/S90dcron +endef + +define DCRON_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/dcron/dcron.service \ + $(TARGET_DIR)/usr/lib/systemd/system/dcron.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/dcron.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dcron.service +endef + +$(eval $(generic-package)) diff --git a/package/dcron/dcron.service b/package/dcron/dcron.service new file mode 100644 index 0000000000..924ed72205 --- /dev/null +++ b/package/dcron/dcron.service @@ -0,0 +1,10 @@ +[Unit] +Description=Task scheduler daemon +After=syslog.target + +[Service] +ExecStart=/usr/sbin/crond -S +Type=forking + +[Install] +WantedBy=multi-user.target diff --git a/package/debianutils/Config.in b/package/debianutils/Config.in new file mode 100644 index 0000000000..c4f2fcf2b3 --- /dev/null +++ b/package/debianutils/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_DEBIANUTILS + bool "debianutils" + depends on BR2_USE_MMU # fork() + help + Miscellaneous utilities specific to Debian. + + The specific utilities included are: add-shell installkernel + ischroot remove-shell run-parts savelog tempfile which. + + https://tracker.debian.org/pkg/debianutils diff --git a/package/debianutils/debianutils.hash b/package/debianutils/debianutils.hash new file mode 100644 index 0000000000..4d1b57403f --- /dev/null +++ b/package/debianutils/debianutils.hash @@ -0,0 +1,2 @@ +# From http://ftp.de.debian.org/debian/pool/main/d/debianutils/debianutils_4.7.dsc +sha256 a269cacd40f52f2fa5d5636357714a49e8538459c16d77772efaa23711fe53d9 debianutils_4.7.tar.xz diff --git a/package/debianutils/debianutils.mk b/package/debianutils/debianutils.mk new file mode 100644 index 0000000000..17f0240e84 --- /dev/null +++ b/package/debianutils/debianutils.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# debianutils +# +################################################################################ + +DEBIANUTILS_VERSION = 4.7 +DEBIANUTILS_SOURCE = debianutils_$(DEBIANUTILS_VERSION).tar.xz +DEBIANUTILS_SITE = http://snapshot.debian.org/archive/debian/20160126T220153Z/pool/main/d/debianutils +DEBIANUTILS_CONF_OPTS = --exec-prefix=/ +# Make sure we override the busybox tools, such as which +DEBIANUTILS_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox) +DEBIANUTILS_LICENSE = GPLv2+, SMAIL (savelog) +DEBIANUTILS_LICENSE_FILES = debian/copyright + +$(eval $(autotools-package)) diff --git a/package/dejavu/Config.in b/package/dejavu/Config.in new file mode 100644 index 0000000000..5d21e56088 --- /dev/null +++ b/package/dejavu/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_DEJAVU + bool "DejaVu fonts" + help + The DejaVu fonts are a font family based on the Vera Fonts. + Its purpose is to provide a wider range of characters while + maintaining the original look and feel through the process + of collaborative development, under a Free license. + + http://dejavu-fonts.org + +if BR2_PACKAGE_DEJAVU + +config BR2_PACKAGE_DEJAVU_MONO + bool "mono fonts" + default y + +config BR2_PACKAGE_DEJAVU_SANS + bool "sans fonts" + default y + +config BR2_PACKAGE_DEJAVU_SERIF + bool "serif fonts" + default y + +config BR2_PACKAGE_DEJAVU_SANS_CONDENSED + bool "sans condensed fonts" + default y + +config BR2_PACKAGE_DEJAVU_SERIF_CONDENSED + bool "serif condensed fonts" + default y + +endif diff --git a/package/dejavu/dejavu.hash b/package/dejavu/dejavu.hash new file mode 100644 index 0000000000..37868c13d8 --- /dev/null +++ b/package/dejavu/dejavu.hash @@ -0,0 +1,2 @@ +# From http://dejavu-fonts.org/wiki/Download +sha256 f6d7965586101ff3a8a5c3ec503e082bb6a9604ff53413e10702e5917c194d88 dejavu-fonts-ttf-2.35.tar.bz2 diff --git a/package/dejavu/dejavu.mk b/package/dejavu/dejavu.mk new file mode 100644 index 0000000000..3dbcc94e16 --- /dev/null +++ b/package/dejavu/dejavu.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# dejavu +# +################################################################################ + +DEJAVU_VERSION = 2.35 +DEJAVU_SITE = http://sourceforge.net/projects/dejavu/files/dejavu/$(DEJAVU_VERSION) +DEJAVU_SOURCE = dejavu-fonts-ttf-$(DEJAVU_VERSION).tar.bz2 +DEJAVU_LICENSE_FILES = LICENSE + +DEJAVU_FONTS_INSTALL = +DEJAVU_FONTCONFIG_CONF_INSTALL = + +ifeq ($(BR2_PACKAGE_DEJAVU_MONO),y) +DEJAVU_FONTS_INSTALL += DejaVuSansMono*.ttf +DEJAVU_FONTCONFIG_CONF_INSTALL += \ + 20-unhint-small-dejavu-sans-mono.conf \ + 57-dejavu-sans-mono.conf +endif + +ifeq ($(BR2_PACKAGE_DEJAVU_SANS),y) +DEJAVU_FONTS_INSTALL += DejaVuSans.ttf DejaVuSans-*.ttf +DEJAVU_FONTCONFIG_CONF_INSTALL += \ + 20-unhint-small-dejavu-sans.conf \ + 57-dejavu-sans.conf +endif + +ifeq ($(BR2_PACKAGE_DEJAVU_SERIF),y) +DEJAVU_FONTS_INSTALL += DejaVuSerif.ttf DejaVuSerif-*.ttf +DEJAVU_FONTCONFIG_CONF_INSTALL += \ + 20-unhint-small-dejavu-serif.conf \ + 57-dejavu-serif.conf +endif + +ifeq ($(BR2_PACKAGE_DEJAVU_SANS_CONDENSED),y) +DEJAVU_FONTS_INSTALL += DejaVuSansCondensed*.ttf +endif + +ifeq ($(BR2_PACKAGE_DEJAVU_SERIF_CONDENSED),y) +DEJAVU_FONTS_INSTALL += DejaVuSerifCondensed*.ttf +endif + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +define DEJAVU_FONTCONFIG_CONF_INSTALL_CMDS + for i in $(DEJAVU_FONTCONFIG_CONF_INSTALL) ; do \ + $(INSTALL) -D -m 0644 $(@D)/fontconfig/$$i \ + $(TARGET_DIR)/usr/share/fontconfig/conf.avail/$$i || exit 1 ; \ + done +endef +endif + +define DEJAVU_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/share/fonts/dejavu/ + for i in $(DEJAVU_FONTS_INSTALL) ; do \ + $(INSTALL) -m 0644 $(@D)/ttf/$$i \ + $(TARGET_DIR)/usr/share/fonts/dejavu/ || exit 1 ; \ + done + $(DEJAVU_FONTCONFIG_CONF_INSTALL_CMDS) +endef + +$(eval $(generic-package)) diff --git a/package/devmem2/0001-be-coherent-in-type-usage.patch b/package/devmem2/0001-be-coherent-in-type-usage.patch new file mode 100644 index 0000000000..1777387734 --- /dev/null +++ b/package/devmem2/0001-be-coherent-in-type-usage.patch @@ -0,0 +1,52 @@ +From 6570e7afe1eebd64022b871b9ebd9a76be267f57 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 29 Jun 2014 16:27:49 +0200 +Subject: [PATCH] Be coherent in type usage + +- no need to use off_t because it is read from strtoul() +- print unsigned int type correctly + +When built with _FILE_OFFSET_BITS=64, off_t becomes an long long int +and was printed as an unsigned int which lead to a garbled output. + +Signed-off-by: Colin Didier +Signed-off-by: Thomas Petazzoni +--- + devmem2.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/devmem2.c b/devmem2.c +index 7732ecb..7aa5c79 100644 +--- a/devmem2.c ++++ b/devmem2.c +@@ -58,8 +58,7 @@ + int main(int argc, char **argv) { + int fd; + void *map_base, *virt_addr; +- unsigned long read_result, writeval; +- off_t target; ++ unsigned long target, read_result, writeval; + int access_type = 'w'; + + if(argc < 2) { +@@ -101,7 +100,7 @@ int main(int argc, char **argv) { + fprintf(stderr, "Illegal data type '%c'.\n", access_type); + exit(2); + } +- printf("Value at address 0x%X (%p): 0x%X\n", target, virt_addr, read_result); ++ printf("Value at address 0x%lX (%p): 0x%X\n", target, virt_addr, read_result); + fflush(stdout); + + if(argc > 3) { +@@ -120,7 +119,7 @@ int main(int argc, char **argv) { + read_result = *((unsigned long *) virt_addr); + break; + } +- printf("Written 0x%X; readback 0x%X\n", writeval, read_result); ++ printf("Written 0x%lX; readback 0x%X\n", writeval, read_result); + fflush(stdout); + } + +-- +2.0.0 + diff --git a/package/devmem2/Config.in b/package/devmem2/Config.in new file mode 100644 index 0000000000..cb00a51632 --- /dev/null +++ b/package/devmem2/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_DEVMEM2 + bool "devmem2" + help + Simple program to read/write from/to any location in memory. + + http://free-electrons.com/pub/mirror/devmem2.c diff --git a/package/devmem2/devmem2.hash b/package/devmem2/devmem2.hash new file mode 100644 index 0000000000..fff5306b7e --- /dev/null +++ b/package/devmem2/devmem2.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3b15515693bae1ebd14d914e46d388edfec2175829ea1576a7a0c8606ebbe639 devmem2.c diff --git a/package/devmem2/devmem2.mk b/package/devmem2/devmem2.mk new file mode 100644 index 0000000000..7f0594e21c --- /dev/null +++ b/package/devmem2/devmem2.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# devmem2 +# +################################################################################ + +DEVMEM2_SITE = http://free-electrons.com/pub/mirror +DEVMEM2_SOURCE = devmem2.c +DEVMEM2_VERSION = 1 +DEVMEM2_LICENSE = GPLv2+ +DEVMEM2_LICENSE_FILES = devmem2.c + +define DEVMEM2_EXTRACT_CMDS + cp $(DL_DIR)/$($(PKG)_SOURCE) $(@D)/ +endef + +define DEVMEM2_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) devmem2 +endef + +define DEVMEM2_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/devmem2 $(TARGET_DIR)/sbin/devmem2 +endef + +$(eval $(generic-package)) diff --git a/package/dfu-util/Config.in.host b/package/dfu-util/Config.in.host new file mode 100644 index 0000000000..ea47a36c7b --- /dev/null +++ b/package/dfu-util/Config.in.host @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_DFU_UTIL + bool "host dfu-util" + help + Dfu-util is the host side implementation of the DFU 1.0 + specification of the USB forum. DFU is intended to download + and upload firmware to devices connected over USB. + + http://dfu-util.sourceforge.net/ diff --git a/package/dfu-util/dfu-util.hash b/package/dfu-util/dfu-util.hash new file mode 100644 index 0000000000..bf618d1ae8 --- /dev/null +++ b/package/dfu-util/dfu-util.hash @@ -0,0 +1,5 @@ +# From http://dfu-util.sourceforge.net/releases/dfu-util-0.9.tar.gz.md5 +md5 233bb1e08ef4b405062445d84e28fde6 dfu-util-0.9.tar.gz + +# Locally computed +sha256 36428c6a6cb3088cad5a3592933385253da5f29f2effa61518ee5991ea38f833 dfu-util-0.9.tar.gz diff --git a/package/dfu-util/dfu-util.mk b/package/dfu-util/dfu-util.mk new file mode 100644 index 0000000000..079f875930 --- /dev/null +++ b/package/dfu-util/dfu-util.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# dfu-util +# +################################################################################ + +DFU_UTIL_VERSION = 0.9 +DFU_UTIL_SITE = http://dfu-util.sourceforge.net/releases +DFU_UTIL_LICENSE = GPLv2+ +DFU_UTIL_LICENSE_FILES = COPYING + +HOST_DFU_UTIL_DEPENDENCIES = host-libusb + +$(eval $(host-autotools-package)) diff --git a/package/dhcp/0001-dhcp-cross-compile.patch b/package/dhcp/0001-dhcp-cross-compile.patch new file mode 100644 index 0000000000..95b468915f --- /dev/null +++ b/package/dhcp/0001-dhcp-cross-compile.patch @@ -0,0 +1,34 @@ +dhcp cross compile support integration + +Allow BINDCONFIG to be initialized in environment passed to configure. + +Allow archiver to be determined during configure. + +This patch is submitted upstream as part of a cross compiling enhancement +suggestion to dhcp-suggest@isc.org. Reference ISC-Bugs #41502. + +Signed-off-by: Doug Kehn + +Index: dhcp-4.3.3-P1/configure.ac +=================================================================== +--- dhcp-4.3.3-P1.orig/configure.ac ++++ dhcp-4.3.3-P1/configure.ac +@@ -33,7 +33,7 @@ if test "$GCC" = "yes"; then + fi + + # We can have some flags to pass to bind configure +-BINDCONFIG= ++BINDCONFIG="$BINDCONFIG" + AC_SUBST(BINDCONFIG) + + # POSIX doesn't include the IPv6 Advanced Socket API and glibc hides +@@ -43,6 +43,9 @@ AC_SUBST(BINDCONFIG) + # Use this to define _GNU_SOURCE to pull in the IPv6 Advanced Socket API. + AC_USE_SYSTEM_EXTENSIONS + ++AC_CHECK_TOOL(AR,ar) ++AC_SUBST(AR) ++ + AC_PROG_RANLIB + AC_CONFIG_HEADERS([includes/config.h]) + diff --git a/package/dhcp/0002-bind-cross-compile.patch b/package/dhcp/0002-bind-cross-compile.patch new file mode 100644 index 0000000000..f7c42c6ce2 --- /dev/null +++ b/package/dhcp/0002-bind-cross-compile.patch @@ -0,0 +1,24 @@ +bind cross compile support integration + +Pass system types from dhcp configure to bind configure. + +This patch is submitted upstream as part of a cross compiling enhancement +suggestion to dhcp-suggest@isc.org. Reference ISC-Bugs #41502. + +Signed-off-by: Doug Kehn + +Index: dhcp-4.3.3-P1/bind/Makefile.in +=================================================================== +--- dhcp-4.3.3-P1.orig/bind/Makefile.in ++++ dhcp-4.3.3-P1/bind/Makefile.in +@@ -30,7 +30,9 @@ bindconfig = --disable-kqueue --disable- + --without-openssl --without-libxml2 --enable-exportlib \ + --with-gssapi=no --enable-threads=no @BINDCONFIG@ \ + --with-export-includedir=${binddir}/include \ +- --with-export-libdir=${binddir}/lib ++ --with-export-libdir=${binddir}/lib \ ++ --target=@target_alias@ --host=@host_alias@ \ ++ --build=@build_alias@ + + @BIND_ATF_FALSE@cleandirs = ./lib ./include + @BIND_ATF_TRUE@cleandirs = ./lib ./include ./atf diff --git a/package/dhcp/0003-bind-host-cc.patch b/package/dhcp/0003-bind-host-cc.patch new file mode 100644 index 0000000000..96c144fffb --- /dev/null +++ b/package/dhcp/0003-bind-host-cc.patch @@ -0,0 +1,40 @@ +ensure host compiler is used + +dns/Makefile.in patch is derived from: +http://wiki.beyondlogic.org/patches/dhcp-4.3.0b1.bind_arm-linux-gnueabi.patch + +This patch is already accepted upstream and will be included in the next +release: +--[snip]-- +From Francis Dupont via RT +To rdkehn@yahoo.com + +Message body +It was fixed on the master branch sometimes ago. +Quoting master RELNOTES: + +- Made the embedded bind libraries able to be cross compiled + (please refer to the bind9 documentation to learn how to cross + compile DHCP and its bind library dependency). + [ISC-Bugs #38836] + +This is in the Changes since 4.3.3 so for the next release. +--[snip]-- + +Signed-off-by: Doug Kehn + +Index: dhcp-4.3.3-P1/bind/bind-9.9.7-P3/lib/export/dns/Makefile.in +=================================================================== +--- dhcp-4.3.3-P1.orig/bind/bind-9.9.7-P3/lib/export/dns/Makefile.in ++++ dhcp-4.3.3-P1/bind/bind-9.9.7-P3/lib/export/dns/Makefile.in +@@ -168,7 +168,9 @@ code.h: gen + ./gen -s ${srcdir} > code.h + + gen: ${srcdir}/gen.c +- ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o $@ ${srcdir}/gen.c ${LIBS} ++ ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \ ++ ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c \ ++ ${BUILD_LIBS} + + #We don't need rbtdb64 for this library + #rbtdb64.@O@: rbtdb.c diff --git a/package/dhcp/Config.in b/package/dhcp/Config.in new file mode 100644 index 0000000000..99b4eec331 --- /dev/null +++ b/package/dhcp/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_DHCP + bool "dhcp (ISC)" + # fork() + depends on BR2_USE_MMU + help + DHCP relay agent from the ISC DHCP distribution. + + http://www.isc.org/products/DHCP + +if BR2_PACKAGE_DHCP + +config BR2_PACKAGE_DHCP_SERVER + bool "dhcp server" + help + DHCP server from the ISC DHCP distribution. + +config BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK + bool "Enable delayed ACK feature" + depends on BR2_PACKAGE_DHCP_SERVER + help + Enable delayed ACK feature in the ISC DHCP server. + +config BR2_PACKAGE_DHCP_RELAY + bool "dhcp relay" + help + DHCP relay agent from the ISC DHCP distribution. + + +config BR2_PACKAGE_DHCP_CLIENT + bool "dhcp client" + help + DHCP client from the ISC DHCP distribution. + +endif diff --git a/package/dhcp/S80dhcp-relay b/package/dhcp/S80dhcp-relay new file mode 100755 index 0000000000..211431bfff --- /dev/null +++ b/package/dhcp/S80dhcp-relay @@ -0,0 +1,53 @@ +#!/bin/sh +# +# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $ +# + +# What servers should the DHCP relay forward requests to? +# e.g: SERVERS="192.168.0.1" +SERVERS="" + +# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests? +INTERFACES="" + +# Additional options that are passed to the DHCP relay daemon? +OPTIONS="" + +# Read configuration variable file if it is present +CFG_FILE="/etc/default/dhcrelay" +[ -r "${CFG_FILE}" ] && . "${CFG_FILE}" + +# Sanity checks +test -f /usr/sbin/dhcrelay || exit 0 +test -n "$INTERFACES" || exit 0 +test -n "$SERVERS" || exit 0 + +# Build command line for interfaces (will be passed to dhrelay below.) +IFCMD="" +for I in $INTERFACES; do + IFCMD=${IFCMD}"-i "${I}" " +done + +DHCRELAYPID=/var/run/dhcrelay.pid + +case "$1" in + start) + printf "Starting DHCP relay: " + start-stop-daemon -S -q -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping DHCP relay: " + start-stop-daemon -K -q -x /usr/sbin/dhcrelay + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart | force-reload) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" + exit 1 +esac + +exit 0 diff --git a/package/dhcp/S80dhcp-server b/package/dhcp/S80dhcp-server new file mode 100755 index 0000000000..21092bab9f --- /dev/null +++ b/package/dhcp/S80dhcp-server @@ -0,0 +1,49 @@ +#!/bin/sh +# +# $Id: dhcp3-server.init.d,v 1.4 2003/07/13 19:12:41 mdz Exp $ +# + +# On what interfaces should the DHCP server (dhcpd) serve DHCP requests? +# Separate multiple interfaces with spaces, e.g. "eth0 eth1". +INTERFACES="" + +# Additional options that are passed to the DHCP server daemon? +OPTIONS="" + +NAME="dhcpd" +DAEMON="/usr/sbin/${NAME}" +CFG_FILE="/etc/default/${NAME}" + +# Read configuration variable file if it is present +[ -r "${CFG_FILE}" ] && . "${CFG_FILE}" + +# Sanity checks +test -f /usr/sbin/dhcpd || exit 0 +test -f /etc/dhcp/dhcpd.conf || exit 0 + +case "$1" in + start) + printf "Starting DHCP server: " + test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/ + test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases + start-stop-daemon -S -q -x ${DAEMON} -- -q $OPTIONS $INTERFACES + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping DHCP server: " + start-stop-daemon -K -q -x ${DAEMON} + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart | force-reload) + $0 stop + $0 start + if [ "$?" != "0" ]; then + exit 1 + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" + exit 1 +esac + +exit 0 diff --git a/package/dhcp/dhclient-script b/package/dhcp/dhclient-script new file mode 100755 index 0000000000..cb292b6fbd --- /dev/null +++ b/package/dhcp/dhclient-script @@ -0,0 +1,284 @@ +#!/bin/sh + +# dhclient-script from OpenWRT project +# http://git.openwrt.org/?p=packages.git;a=blob;f=net/isc-dhcp/files/dhclient-script;h=4afebc0ad20ebac51c5baae5ed01c6713e3a0fd0;hb=HEAD + +make_resolv_conf() { + if [ x"$new_domain_name_servers" != x ]; then + cat /dev/null > /etc/resolv.conf.dhclient + chmod 644 /etc/resolv.conf.dhclient + if [ x"$new_domain_search" != x ]; then + echo search $new_domain_search >> /etc/resolv.conf.dhclient + elif [ x"$new_domain_name" != x ]; then + # Note that the DHCP 'Domain Name Option' is really just a domain + # name, and that this practice of using the domain name option as + # a search path is both nonstandard and deprecated. + echo search $new_domain_name >> /etc/resolv.conf.dhclient + fi + for nameserver in $new_domain_name_servers; do + echo nameserver $nameserver >>/etc/resolv.conf.dhclient + done + + elif [ "x${new_dhcp6_name_servers}" != x ] ; then + cat /dev/null > /etc/resolv.conf.dhclient6 + chmod 644 /etc/resolv.conf.dhclient6 + + if [ "x${new_dhcp6_domain_search}" != x ] ; then + echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 + fi + for nameserver in ${new_dhcp6_name_servers} ; do + echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 + done + fi + + # if both v4 and v6 clients are running, concatenate results + cat /etc/resolv.conf.* > /etc/resolv.conf +} + +# 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 +# probably should do something with exit status of the local script + exit $exit_status +} + +# Invoke the local dhcp client enter hooks, if they exist. +if [ -f /etc/dhclient-enter-hooks ]; then + exit_status=0 + . /etc/dhclient-enter-hooks + # allow the local script to abort processing of this state + # local script must set exit_status variable to nonzero. + if [ $exit_status -ne 0 ]; then + exit $exit_status + fi +fi + +### +### DHCPv4 Handlers +### + +if [ x$new_broadcast_address != x ]; then + new_broadcast_arg="broadcast $new_broadcast_address" +fi +if [ x$new_subnet_mask != x ]; then + new_subnet_arg="netmask $new_subnet_mask" +fi +if [ x$alias_subnet_mask != x ]; then + alias_subnet_arg="netmask $alias_subnet_mask" +fi + +if [ x$reason = xMEDIUM ]; then + # Linux doesn't do mediums (ok, ok, media). + exit_with_hooks 0 +fi + +if [ x$reason = xPREINIT ]; then + if [ x$alias_ip_address != x ]; then + # Bring down alias interface. Its routes will disappear too. + ifconfig $interface:0- 0.0.0.0 + fi + ifconfig $interface 0.0.0.0 up + + # We need to give the kernel some time to get the interface up. + sleep 1 + + exit_with_hooks 0 +fi + +if [ x$reason = xARPCHECK ] || [ x$reason = xARPSEND ]; then + exit_with_hooks 0 +fi + +if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \ + [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then + current_hostname=`hostname` + if [ x$current_hostname = x ] || \ + [ x$current_hostname = x$old_host_name ]; then + if [ x$current_hostname = x ] || \ + [ x$new_host_name != x$old_host_name ]; then + hostname $new_host_name + fi + fi + + if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \ + [ x$alias_ip_address != x$old_ip_address ]; then + # Possible new alias. Remove old alias. + ifconfig $interface:0- 0.0.0.0 + fi + if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then + # IP address changed. Bringing down the interface will delete all routes, + # and clear the ARP cache. + ifconfig $interface 0.0.0.0 down + + fi + if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \ + [ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then + + ifconfig $interface $new_ip_address $new_subnet_arg \ + $new_broadcast_arg + for router in $new_routers; do + if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then + route add -host $router dev $interface + fi + route add default gw $router + done + fi + if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ]; + then + ifconfig $interface:0- 0.0.0.0 + ifconfig $interface:0 $alias_ip_address $alias_subnet_arg + route add -host $alias_ip_address $interface:0 + fi + make_resolv_conf + exit_with_hooks 0 +fi + +if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \ + || [ x$reason = xSTOP ]; then + if [ x$alias_ip_address != x ]; then + # Turn off alias interface. + ifconfig $interface:0- 0.0.0.0 + fi + if [ x$old_ip_address != x ]; then + # Shut down interface, which will delete routes and clear arp cache. + ifconfig $interface 0.0.0.0 down + fi + if [ x$alias_ip_address != x ]; then + ifconfig $interface:0 $alias_ip_address $alias_subnet_arg + route add -host $alias_ip_address $interface:0 + fi + + # remove v4 dns configuration for this interface + rm /etc/resolv.conf.dhclient + cat /etc/resolv.conf.* > /etc/resolv.conf + + exit_with_hooks 0 +fi + +if [ x$reason = xTIMEOUT ]; then + if [ x$alias_ip_address != x ]; then + ifconfig $interface:0- 0.0.0.0 + fi + ifconfig $interface $new_ip_address $new_subnet_arg \ + $new_broadcast_arg + set $new_routers + if ping -q -c 1 $1; then + if [ x$new_ip_address != x$alias_ip_address ] && \ + [ x$alias_ip_address != x ]; then + ifconfig $interface:0 $alias_ip_address $alias_subnet_arg + route add -host $alias_ip_address dev $interface:0 + fi + for router in $new_routers; do + if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then + route add -host $router dev $interface + fi + route add default gw $router + done + make_resolv_conf + exit_with_hooks 0 + fi + ifconfig $interface 0.0.0.0 down + exit_with_hooks 1 +fi + +### +### DHCPv6 Handlers +### + +if [ x$reason = xPREINIT6 ]; then + # Ensure interface is up. + ifconfig ${interface} up + + # Remove any stale addresses from aborted clients. + ip -f inet6 addr flush dev ${interface} scope global + + exit_with_hooks 0 +fi + +if [ x${old_ip6_prefix} != x ] || [ x${new_ip6_prefix} != x ] ; then + echo Prefix ${reason} old=${old_ip6_prefix} new=${new_ip6_prefix} + + exit_with_hooks 0 +fi + +if [ x$reason = xBOUND6 ]; then + if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then + exit_with_hooks 2; + fi + + ifconfig ${interface} add ${new_ip6_address}/${new_ip6_prefixlen} + + # Check for nameserver options. + make_resolv_conf + +### << + # Set up softwire tunnel + if [ x${new_dhcp6_softwire} != x ] ; then + /etc/init.d/dhclient stop + ifconfig ${interface} 0.0.0.0 + ip -6 tunnel add tun0 mode ipip6 \ + remote ${new_dhcp6_softwire} \ + local ${new_ip6_address} \ + dev ${interface} encaplimit none + ip link set tun0 up + ip route add default dev tun0 + fi +### >> + + exit_with_hooks 0 +fi + +if [ x$reason = xRENEW6 ] || [ x$reason = xREBIND6 ]; then + if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then + exit_with_hooks 2; + fi + + ifconfig ${interface} add ${new_ip6_address}/${new_ip6_prefixlen} + + # Make sure nothing has moved around on us. + + # Nameservers/domains/etc. + if [ "x${new_dhcp6_name_servers}" != "x${old_dhcp6_name_servers}" ] || + [ "x${new_dhcp6_domain_search}" != "x${old_dhcp6_domain_search}" ] ; then + make_resolv_conf + fi + + exit_with_hooks 0 +fi + +if [ x$reason = xDEPREF6 ]; then + if [ x${new_ip6_address} = x ] ; then + exit_with_hooks 2; + fi + + # Busybox ifconfig has no way to communicate this to the kernel, so ignore it + + exit_with_hooks 0 +fi + +if [ x$reason = xEXPIRE6 -o x$reason = xRELEASE6 -o x$reason = xSTOP6 ]; then + if [ x${old_ip6_address} = x ] || [ x${old_ip6_prefixlen} = x ] ; then + exit_with_hooks 2; + fi + + ifconfig ${interface} del ${old_ip6_address}/${old_ip6_prefixlen} + + # remove v6 dns configuration for this interface + rm /etc/resolv.conf.dhclient6 + cat /etc/resolv.conf.* > /etc/resolv.conf + +### << + # Tear down softwire tunnel + if [ x${old_dhcp6_softwire} != x ] ; then + ip link set tun0 down + ip tunnel del tun0 + fi +### >> + + exit_with_hooks 0 +fi + +exit_with_hooks 0 diff --git a/package/dhcp/dhclient.conf b/package/dhcp/dhclient.conf new file mode 100644 index 0000000000..0e6dcf96c2 --- /dev/null +++ b/package/dhcp/dhclient.conf @@ -0,0 +1,50 @@ +# Configuration file for /sbin/dhclient, which is included in Debian's +# dhcp3-client package. +# +# This is a sample configuration file for dhclient. See dhclient.conf's +# man page for more information about the syntax of this file +# and a more comprehensive list of the parameters understood by +# dhclient. +# +# Normally, if the DHCP server provides reasonable information and does +# not leave anything out (like the domain name, for example), then +# few changes must be made to this file, if any. +# + +#send host-name "andare.fugue.com"; +#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c; +#send dhcp-lease-time 3600; +#supersede domain-name "fugue.com home.vix.com"; +#prepend domain-name-servers 127.0.0.1; +request subnet-mask, broadcast-address, time-offset, routers, + domain-name, domain-name-servers, host-name, + netbios-name-servers, netbios-scope; +#require subnet-mask, domain-name-servers; +#timeout 60; +#retry 60; +#reboot 10; +#select-timeout 5; +#initial-interval 2; +#script "/etc/dhcp3/dhclient-script"; +#media "-link0 -link1 -link2", "link0 link1"; +#reject 192.33.137.209; + +#alias { +# interface "eth0"; +# fixed-address 192.5.5.213; +# option subnet-mask 255.255.255.255; +#} + +#lease { +# interface "eth0"; +# fixed-address 192.33.137.200; +# medium "link0 link1"; +# option host-name "andare.swiftmedia.com"; +# option subnet-mask 255.255.255.0; +# option broadcast-address 192.33.137.255; +# option routers 192.33.137.250; +# option domain-name-servers 127.0.0.1; +# renew 2 2000/1/12 00:00:01; +# rebind 2 2000/1/12 00:00:01; +# expire 2 2000/1/12 00:00:01; +#} diff --git a/package/dhcp/dhcp.hash b/package/dhcp/dhcp.hash new file mode 100644 index 0000000000..fd9b24ad6d --- /dev/null +++ b/package/dhcp/dhcp.hash @@ -0,0 +1,2 @@ +# Verified from https://ftp.isc.org/isc/dhcp/4.3.3-P1/dhcp-4.3.3-P1.tar.gz.sha256.asc +sha256 c11e896dffa1bfbc49462965d3f6dec45534e34068603546d9a236f2aa669921 dhcp-4.3.3-P1.tar.gz diff --git a/package/dhcp/dhcp.mk b/package/dhcp/dhcp.mk new file mode 100644 index 0000000000..5cb6043e7b --- /dev/null +++ b/package/dhcp/dhcp.mk @@ -0,0 +1,119 @@ +################################################################################ +# +# dhcp +# +################################################################################ + +DHCP_VERSION = 4.3.3-P1 +DHCP_SITE = http://ftp.isc.org/isc/dhcp/$(DHCP_VERSION) +DHCP_INSTALL_STAGING = YES +DHCP_LICENSE = ISC +DHCP_LICENSE_FILES = LICENSE +DHCP_CONF_ENV = \ + CPPFLAGS='-D_PATH_DHCPD_CONF=\"/etc/dhcp/dhcpd.conf\" \ + -D_PATH_DHCLIENT_CONF=\"/etc/dhcp/dhclient.conf\"' \ + ac_cv_file__dev_random=yes \ + BINDCONFIG='--with-randomdev=/dev/random' +DHCP_CONF_OPTS = \ + --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \ + --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases \ + --with-cli-lease-file=/var/lib/dhcp/dhclient.leases \ + --with-cli6-lease-file=/var/lib/dhcp/dhclient6.leases \ + --with-srv-pid-file=/var/run/dhcpd.pid \ + --with-srv6-pid-file=/var/run/dhcpd6.pid \ + --with-cli-pid-file=/var/run/dhclient.pid \ + --with-cli6-pid-file=/var/run/dhclient6.pid \ + --with-relay-pid-file=/var/run/dhcrelay.pid \ + --with-relay6-pid-file=/var/run/dhcrelay6.pid + +# The source for the bind libraries used by dhcp are embedded in the dhcp source +# as a tar-ball. Extract the bind source to allow any patches to be applied +# during the patch phase. +define DHCP_EXTRACT_BIND + cd $(@D)/bind; tar -xvf bind.tar.gz +endef +DHCP_POST_EXTRACT_HOOKS += DHCP_EXTRACT_BIND + +# The patchset requires configure et.al. to be regenerated. +DHCP_AUTORECONF = YES + +# bind does not support parallel builds. +DHCP_MAKE = $(MAKE1) + +# bind configure is called via dhcp make instead of dhcp configure. The make env +# needs extra values for bind configure. +DHCP_MAKE_ENV = \ + $(TARGET_CONFIGURE_OPTS) \ + BUILD_CC="$(HOSTCC)" \ + BUILD_CFLAGS="$(HOST_CFLAGS)" \ + BUILD_CPPFLAGS="$(HOST_CPPFLAGS)" \ + BUILD_LDFLAGS="$(HOST_LDFLAGS)" + +ifeq ($(BR2_PACKAGE_DHCP_SERVER_DELAYED_ACK),y) +DHCP_CONF_OPTS += --enable-delayed-ack +endif + +ifeq ($(BR2_PACKAGE_DHCP_SERVER),y) +define DHCP_INSTALL_SERVER + mkdir -p $(TARGET_DIR)/var/lib + (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp) + $(INSTALL) -m 0755 -D $(@D)/server/dhcpd $(TARGET_DIR)/usr/sbin/dhcpd + $(INSTALL) -m 0644 -D package/dhcp/dhcpd.conf \ + $(TARGET_DIR)/etc/dhcp/dhcpd.conf +endef +endif + +ifeq ($(BR2_PACKAGE_DHCP_RELAY),y) +define DHCP_INSTALL_RELAY + mkdir -p $(TARGET_DIR)/var/lib + (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp) + $(INSTALL) -m 0755 -D $(DHCP_DIR)/relay/dhcrelay \ + $(TARGET_DIR)/usr/sbin/dhcrelay +endef +endif + +ifeq ($(BR2_PACKAGE_DHCP_CLIENT),y) +define DHCP_INSTALL_CLIENT + mkdir -p $(TARGET_DIR)/var/lib + (cd $(TARGET_DIR)/var/lib; ln -snf /tmp dhcp) + $(INSTALL) -m 0755 -D $(DHCP_DIR)/client/dhclient \ + $(TARGET_DIR)/sbin/dhclient + $(INSTALL) -m 0644 -D package/dhcp/dhclient.conf \ + $(TARGET_DIR)/etc/dhcp/dhclient.conf + $(INSTALL) -m 0755 -D package/dhcp/dhclient-script \ + $(TARGET_DIR)/sbin/dhclient-script +endef +endif + +# Options don't matter, scripts won't start if binaries aren't there +define DHCP_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/dhcp/S80dhcp-server \ + $(TARGET_DIR)/etc/init.d/S80dhcp-server + $(INSTALL) -m 0755 -D package/dhcp/S80dhcp-relay \ + $(TARGET_DIR)/etc/init.d/S80dhcp-relay +endef + +ifeq ($(BR2_PACKAGE_DHCP_SERVER),y) +define DHCP_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/dhcp/dhcpd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/dhcpd.service + + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + + ln -sf ../../../../usr/lib/systemd/system/dhcpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dhcpd.service + + echo "d /var/lib/dhcp 0755 - - - -" > \ + $(TARGET_DIR)/usr/lib/tmpfiles.d/dhcpd.conf + echo "f /var/lib/dhcp/dhcpd.leases - - - - -" >> \ + $(TARGET_DIR)/usr/lib/tmpfiles.d/dhcpd.conf +endef +endif + +define DHCP_INSTALL_TARGET_CMDS + $(DHCP_INSTALL_RELAY) + $(DHCP_INSTALL_SERVER) + $(DHCP_INSTALL_CLIENT) +endef + +$(eval $(autotools-package)) diff --git a/package/dhcp/dhcpd.conf b/package/dhcp/dhcpd.conf new file mode 100644 index 0000000000..0001c0f00e --- /dev/null +++ b/package/dhcp/dhcpd.conf @@ -0,0 +1,108 @@ +# +# Sample configuration file for ISC dhcpd for Debian +# +# $Id: dhcpd.conf,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $ +# + +# The ddns-updates-style parameter controls whether or not the server will +# attempt to do a DNS update when a lease is confirmed. We default to the +# behavior of the version 2 packages ('none', since DHCP v2 didn't +# have support for DDNS.) +ddns-update-style none; + +# option definitions common to all supported networks... +option domain-name "example.org"; +option domain-name-servers ns1.example.org, ns2.example.org; + +default-lease-time 600; +max-lease-time 7200; + +# If this DHCP server is the official DHCP server for the local +# network, the authoritative directive should be uncommented. +#authoritative; + +# Use this to send dhcp log messages to a different log file (you also +# have to hack syslog.conf to complete the redirection). +log-facility local7; + +# No service will be given on this subnet, but declaring it helps the +# DHCP server to understand the network topology. + +#subnet 10.152.187.0 netmask 255.255.255.0 { +#} + +# This is a very basic subnet declaration. + +#subnet 10.254.239.0 netmask 255.255.255.224 { +# range 10.254.239.10 10.254.239.20; +# option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org; +#} + +# This declaration allows BOOTP clients to get dynamic addresses, +# which we don't really recommend. + +#subnet 10.254.239.32 netmask 255.255.255.224 { +# range dynamic-bootp 10.254.239.40 10.254.239.60; +# option broadcast-address 10.254.239.31; +# option routers rtr-239-32-1.example.org; +#} + +# A slightly different configuration for an internal subnet. +#subnet 10.5.5.0 netmask 255.255.255.224 { +# range 10.5.5.26 10.5.5.30; +# option domain-name-servers ns1.internal.example.org; +# option domain-name "internal.example.org"; +# option routers 10.5.5.1; +# option broadcast-address 10.5.5.31; +# default-lease-time 600; +# max-lease-time 7200; +#} + +# Hosts which require special configuration options can be listed in +# host statements. If no address is specified, the address will be +# allocated dynamically (if possible), but the host-specific information +# will still come from the host declaration. + +#host passacaglia { +# hardware ethernet 0:0:c0:5d:bd:95; +# filename "vmunix.passacaglia"; +# server-name "toccata.fugue.com"; +#} + +# Fixed IP addresses can also be specified for hosts. These addresses +# should not also be listed as being available for dynamic assignment. +# Hosts for which fixed IP addresses have been specified can boot using +# BOOTP or DHCP. Hosts for which no fixed address is specified can only +# be booted with DHCP, unless there is an address range on the subnet +# to which a BOOTP client is connected which has the dynamic-bootp flag +# set. +#host fantasia { +# hardware ethernet 08:00:07:26:c0:a5; +# fixed-address fantasia.fugue.com; +#} + +# You can declare a class of clients and then do address allocation +# based on that. The example below shows a case where all clients +# in a certain class get addresses on the 10.17.224/24 subnet, and all +# other clients get addresses on the 10.0.29/24 subnet. + +#class "foo" { +# match if substring (option vendor-class-identifier, 0, 4) = "SUNW"; +#} + +#shared-network 224-29 { +# subnet 10.17.224.0 netmask 255.255.255.0 { +# option routers rtr-224.example.org; +# } +# subnet 10.0.29.0 netmask 255.255.255.0 { +# option routers rtr-29.example.org; +# } +# pool { +# allow members of "foo"; +# range 10.17.224.10 10.17.224.250; +# } +# pool { +# deny members of "foo"; +# range 10.0.29.10 10.0.29.230; +# } +#} diff --git a/package/dhcp/dhcpd.service b/package/dhcp/dhcpd.service new file mode 100644 index 0000000000..98cc54b05b --- /dev/null +++ b/package/dhcp/dhcpd.service @@ -0,0 +1,13 @@ +[Unit] +Description=DHCP server +After=network.target + +[Service] +Type=forking +PIDFile=/run/dhcpd.pid +ExecStart=/usr/sbin/dhcpd -q -pf /run/dhcpd.pid $OPTIONS $INTERFACES +KillSignal=SIGINT +EnvironmentFile=-/etc/default/dhcpd + +[Install] +WantedBy=multi-user.target diff --git a/package/dhcpcd/Config.in b/package/dhcpcd/Config.in new file mode 100644 index 0000000000..ece08d2c96 --- /dev/null +++ b/package/dhcpcd/Config.in @@ -0,0 +1,10 @@ +comment "dhcpcd needs a toolchain w/ headers >= 3.1" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + +config BR2_PACKAGE_DHCPCD + bool "dhcpcd" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 # sa_family_t in linux/socket.h + help + An RFC2131 compliant DHCP client + + http://roy.marples.name/projects/dhcpcd/ diff --git a/package/dhcpcd/dhcpcd.hash b/package/dhcpcd/dhcpcd.hash new file mode 100644 index 0000000000..ea05f86812 --- /dev/null +++ b/package/dhcpcd/dhcpcd.hash @@ -0,0 +1,2 @@ +# Locally calculated from download (no sig, hash) +sha256 284abf8c3be0580bbac5eaca95359346ab0d78d4072317b6ce87cc68f2e8ae7b dhcpcd-6.10.1.tar.xz diff --git a/package/dhcpcd/dhcpcd.mk b/package/dhcpcd/dhcpcd.mk new file mode 100644 index 0000000000..5d1388d5a7 --- /dev/null +++ b/package/dhcpcd/dhcpcd.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# dhcpcd +# +################################################################################ + +DHCPCD_VERSION = 6.10.1 +DHCPCD_SOURCE = dhcpcd-$(DHCPCD_VERSION).tar.xz +DHCPCD_SITE = http://roy.marples.name/downloads/dhcpcd +DHCPCD_DEPENDENCIES = host-pkgconf +DHCPCD_LICENSE = BSD-2c +DHCPCD_LICENSE_FILES = dhcpcd.c + +ifeq ($(BR2_STATIC_LIBS),y) +DHCPCD_CONFIG_OPTS += --enable-static +endif + +ifeq ($(BR2_USE_MMU),) +DHCPCD_CONFIG_OPTS += --disable-fork +endif + +define DHCPCD_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) ./configure \ + --os=linux \ + --libexecdir=/lib/dhcpcd \ + $(DHCPCD_CONFIG_OPTS) ) +endef + +define DHCPCD_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + -C $(@D) all +endef + +define DHCPCD_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install DESTDIR=$(TARGET_DIR) +endef + +# NOTE: Even though this package has a configure script, it is not generated +# using the autotools, so we have to use the generic package infrastructure. + +$(eval $(generic-package)) diff --git a/package/dhcpdump/0001-use-non-bsd-structures.patch b/package/dhcpdump/0001-use-non-bsd-structures.patch new file mode 100644 index 0000000000..40115fb640 --- /dev/null +++ b/package/dhcpdump/0001-use-non-bsd-structures.patch @@ -0,0 +1,23 @@ +The udphdr structure has uh_* fields when _FAVOR_BSD is +defined. Otherwise, the fields are just named source, dest, len and +check. See . + +Signed-off-by: Thomas Petazzoni + +Index: dhcpdump-1.8/dhcpdump.c +=================================================================== +--- dhcpdump-1.8.orig/dhcpdump.c 2011-05-17 20:20:46.506980003 +0200 ++++ dhcpdump-1.8/dhcpdump.c 2011-05-17 20:20:59.338979999 +0200 +@@ -163,10 +163,10 @@ + strcpy(ip_origin, (u_char *)inet_ntoa(ip->ip_src)); + strcpy(ip_destination, (u_char *)inet_ntoa(ip->ip_dst)); + +- if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->uh_ulen))) ++ if (hmask && check_ch((u_char *)(sp + offset), ntohs(udp->len))) + return; + +- printdata((u_char *)(sp + offset), ntohs(udp->uh_ulen)); ++ printdata((u_char *)(sp + offset), ntohs(udp->len)); + } + + // check for matching CHADDR (Peter Apian-Bennewitz ) diff --git a/package/dhcpdump/0002-fix-strsep-feature-test.patch b/package/dhcpdump/0002-fix-strsep-feature-test.patch new file mode 100644 index 0000000000..06bab947c0 --- /dev/null +++ b/package/dhcpdump/0002-fix-strsep-feature-test.patch @@ -0,0 +1,27 @@ +Use the official _BSD_SOURCE feature test macro instead of the meaningless +HAVE_STRSEP macro in order to detect the availability of strsep(). + +This allows toolchains supporting strsep() to use it instead of the custom +implementation from dhcpdump, which also avoids the following error with some +toolchains: + + In file included from dhcpdump.c:30:0: + dhcpdump.c: At top level: + strsep.c:65:23: error: register name not specified for ‘delim’ + register const char *delim; + ^ + +Signed-off-by: Benoît Thébaudeau + +diff -Nrdup dhcpdump-1.8.orig/dhcpdump.c dhcpdump-1.8/dhcpdump.c +--- dhcpdump-1.8.orig/dhcpdump.c 2008-06-24 05:26:52.000000000 +0200 ++++ dhcpdump-1.8/dhcpdump.c 2011-05-31 19:22:15.987388498 +0200 +@@ -26,7 +26,7 @@ + #include + #include "dhcp_options.h" + +-#ifndef HAVE_STRSEP ++#ifndef _BSD_SOURCE + #include "strsep.c" + #endif + diff --git a/package/dhcpdump/Config.in b/package/dhcpdump/Config.in new file mode 100644 index 0000000000..e0abe040fc --- /dev/null +++ b/package/dhcpdump/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_DHCPDUMP + bool "dhcpdump" + select BR2_PACKAGE_LIBPCAP + help + A tool for monitoring dhcp requests using tcpdump. + + http://www.mavetju.org/unix/general.php diff --git a/package/dhcpdump/dhcpdump.hash b/package/dhcpdump/dhcpdump.hash new file mode 100644 index 0000000000..36040c8a5d --- /dev/null +++ b/package/dhcpdump/dhcpdump.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 6d5eb9418162fb738bc56e4c1682ce7f7392dd96e568cc996e44c28de7f77190 dhcpdump-1.8.tar.gz diff --git a/package/dhcpdump/dhcpdump.mk b/package/dhcpdump/dhcpdump.mk new file mode 100644 index 0000000000..3584f4f22d --- /dev/null +++ b/package/dhcpdump/dhcpdump.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# dhcpdump +# +################################################################################ + +DHCPDUMP_VERSION = 1.8 +DHCPDUMP_SITE = http://www.mavetju.org/download +DHCPDUMP_DEPENDENCIES = libpcap +DHCPDUMP_LICENSE = BSD-2c +DHCPDUMP_LICENSE_FILES = LICENSE + +DHCPDUMP_LIBS = -lpcap +ifeq ($(BR2_STATIC_LIBS),y) +DHCPDUMP_LIBS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs` +endif + +define DHCPDUMP_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS) \ + -D_GNU_SOURCE" LIBS="$(DHCPDUMP_LIBS)" +endef + +define DHCPDUMP_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/dhcpdump $(TARGET_DIR)/usr/bin/dhcpdump +endef + +$(eval $(generic-package)) diff --git a/package/dhrystone/0001-cmdline-nruns.patch b/package/dhrystone/0001-cmdline-nruns.patch new file mode 100644 index 0000000000..1164610cca --- /dev/null +++ b/package/dhrystone/0001-cmdline-nruns.patch @@ -0,0 +1,53 @@ +let people specify the number of runs on the command line + +Patch by Vivi Li + +--- a/dhry_1.c ++++ b/dhry_1.c +@@ -66,7 +70,7 @@ + /* end of variables for time measurement */ + + +-main () ++main(int argc, char *argv[]) + /*****/ + + /* main program, corresponds to procedures */ +@@ -101,6 +105,13 @@ + /* Warning: With 16-Bit processors and Number_Of_Runs > 32000, */ + /* overflow may occur for this array element. */ + ++ Number_Of_Runs = 0; ++ if ( argc == 2 ) { ++ if (atoi(argv[1]) > 0) { ++ Number_Of_Runs = atoi(argv[1]); ++ } ++ } ++ + printf ("\n"); + printf ("Dhrystone Benchmark, Version 2.1 (Language: C)\n"); + printf ("\n"); +@@ -114,13 +125,17 @@ + printf ("Program compiled without 'register' attribute\n"); + printf ("\n"); + } +- printf ("Please give the number of runs through the benchmark: "); +- { +- int n; +- scanf ("%d", &n); +- Number_Of_Runs = n; ++ ++ if (!Number_Of_Runs) { ++ printf ("Please give the number of runs through the benchmark: "); ++ fflush (stdout); ++ { ++ int n; ++ scanf ("%d", &n); ++ Number_Of_Runs = n; ++ } ++ printf ("\n"); + } +- printf ("\n"); + + printf ("Execution starts, %d runs through Dhrystone\n", Number_Of_Runs); + diff --git a/package/dhrystone/0002-HZ.patch b/package/dhrystone/0002-HZ.patch new file mode 100644 index 0000000000..e3b8a0e05d --- /dev/null +++ b/package/dhrystone/0002-HZ.patch @@ -0,0 +1,17 @@ +Get HZ value from system rather than requiring via CPPFLAGS + +Patch by Robin Getz + +--- a/dhry.h ++++ b/dhry.h +@@ -359,6 +359,10 @@ + /* for "times" */ + #endif + ++#ifndef HZ ++#include ++#endif ++ + #define Mic_secs_Per_Second 1000000.0 + /* Berkeley UNIX C returns process times in seconds/HZ */ + diff --git a/package/dhrystone/0003-exit.patch b/package/dhrystone/0003-exit.patch new file mode 100644 index 0000000000..8d99f4e5d7 --- /dev/null +++ b/package/dhrystone/0003-exit.patch @@ -0,0 +1,14 @@ +trust the exit status of the program + +Patch by Robin Getz + +--- a/dhry_1.c ++++ b/dhry_1.c +@@ -274,6 +289,7 @@ + printf ("\n"); + } + ++ exit(0); + } + + diff --git a/package/dhrystone/0004-headers.patch b/package/dhrystone/0004-headers.patch new file mode 100644 index 0000000000..82bb60d92d --- /dev/null +++ b/package/dhrystone/0004-headers.patch @@ -0,0 +1,15 @@ +get prototypes for malloc/exit/strcpy + +Patch by Mike Frysinger + +--- a/dhry.h ++++ b/dhry.h +@@ -388,6 +388,8 @@ + /* General definitions: */ + + #include ++#include ++#include + /* for strcpy, strcmp */ + + #define Null 0 diff --git a/package/dhrystone/0005-prototypes.patch b/package/dhrystone/0005-prototypes.patch new file mode 100644 index 0000000000..7fdcf94ee9 --- /dev/null +++ b/package/dhrystone/0005-prototypes.patch @@ -0,0 +1,35 @@ +Avoid collision with C library using NO_PROTOTYPES found in code already + +Patch by Robin Getz + +--- a/dhry_1.c ++++ b/dhry_1.c +@@ -28,7 +28,9 @@ + int Arr_1_Glob [50]; + int Arr_2_Glob [50] [50]; + ++#ifndef NO_PROTOTYPES + extern char *malloc (); ++#endif + Enumeration Func_1 (); + /* forward declaration necessary since Enumeration may not simply be int */ + +@@ -45,14 +45,18 @@ + + #ifdef TIMES + struct tms time_info; ++#ifndef NO_PROTOTYPES + extern int times (); + /* see library function "times" */ ++#endif + #define Too_Small_Time 120 + /* Measurements should last at least about 2 seconds */ + #endif + #ifdef TIME ++#ifndef NO_PROTOTYPES + extern long time(); + /* see library function "time" */ ++#endif + #define Too_Small_Time 2 + /* Measurements should last at least 2 seconds */ + #endif diff --git a/package/dhrystone/Config.in b/package/dhrystone/Config.in new file mode 100644 index 0000000000..d6fb7a75c7 --- /dev/null +++ b/package/dhrystone/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_DHRYSTONE + bool "dhrystone" + help + easy-to-use integer benchmark + + http://www.netlib.org/benchmark/dhry-c diff --git a/package/dhrystone/Makefile b/package/dhrystone/Makefile new file mode 100644 index 0000000000..f7a212b2fe --- /dev/null +++ b/package/dhrystone/Makefile @@ -0,0 +1,12 @@ +CPPFLAGS += -DNO_PROTOTYPES=1 -DHZ=100 +LDLIBS += -lm + +all: dhrystone + +dhrystone: dhry_1.o dhry_2.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS) + +clean: + rm -f *.o dhrystone + +.PHONY: all clean diff --git a/package/dhrystone/dhrystone.hash b/package/dhrystone/dhrystone.hash new file mode 100644 index 0000000000..9ea22a360a --- /dev/null +++ b/package/dhrystone/dhrystone.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 038a7e9169787125c3451a6c941f3aca5db2d2f3863871afcdce154ef17f4e3e dhry-c diff --git a/package/dhrystone/dhrystone.mk b/package/dhrystone/dhrystone.mk new file mode 100644 index 0000000000..c0bca9895d --- /dev/null +++ b/package/dhrystone/dhrystone.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# dhrystone +# +################################################################################ + +DHRYSTONE_VERSION = 2 +DHRYSTONE_SOURCE = dhry-c +DHRYSTONE_SITE = http://www.netlib.org/benchmark + +define DHRYSTONE_EXTRACT_CMDS + (cd $(@D) && $(SHELL) $(DL_DIR)/$($(PKG)_SOURCE)) + $(Q)cp package/dhrystone/Makefile $(@D)/ +endef + +define DHRYSTONE_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define DHRYSTONE_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/dhrystone $(TARGET_DIR)/usr/bin/dhrystone +endef + +$(eval $(generic-package)) diff --git a/package/dialog/Config.in b/package/dialog/Config.in new file mode 100644 index 0000000000..73b71766e7 --- /dev/null +++ b/package/dialog/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_DIALOG + bool "dialog" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + dialog - display dialog boxes from shell scripts + + This application provides a method of displaying several different + types of dialog boxes from shell scripts. This allows a developer + of a script to interact with the user in a much friendlier manner. + + http://invisible-island.net/dialog/dialog.html diff --git a/package/dialog/dialog.hash b/package/dialog/dialog.hash new file mode 100644 index 0000000000..75a79189c8 --- /dev/null +++ b/package/dialog/dialog.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 1d98ec7cc81f11f9019fa0b90f1afdaa86579cae1ce8869a6fd61deb9d4b887a dialog-1.2-20150125.tgz diff --git a/package/dialog/dialog.mk b/package/dialog/dialog.mk new file mode 100644 index 0000000000..f207f75704 --- /dev/null +++ b/package/dialog/dialog.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# dialog +# +################################################################################ + +DIALOG_VERSION = 1.2-20150125 +DIALOG_SOURCE = dialog-$(DIALOG_VERSION).tgz +DIALOG_SITE = ftp://invisible-island.net/dialog +DIALOG_CONF_OPTS = --with-ncurses --with-curses-dir=$(STAGING_DIR)/usr \ + --disable-rpath-hack +DIALOG_DEPENDENCIES = host-pkgconf ncurses +DIALOG_LICENSE = LGPLv2.1 +DIALOG_LICENSE_FILES = COPYING + +ifneq ($(BR2_ENABLE_LOCALE),y) +DIALOG_DEPENDENCIES += libiconv +endif + +DIALOG_CONF_OPTS += NCURSES_CONFIG=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) + +$(eval $(autotools-package)) diff --git a/package/diffutils/Config.in b/package/diffutils/Config.in new file mode 100644 index 0000000000..f483c75417 --- /dev/null +++ b/package/diffutils/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_DIFFUTILS + bool "diffutils" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + GNU diff. Compare files per line. + + http://www.gnu.org/software/diffutils/diffutils.html + +comment "diffutils needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/diffutils/diffutils.hash b/package/diffutils/diffutils.hash new file mode 100644 index 0000000000..27eace2844 --- /dev/null +++ b/package/diffutils/diffutils.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 a25e89a8ab65fded1731e4186be1bb25cda967834b6df973599cdcd5abdfc19c diffutils-3.3.tar.xz diff --git a/package/diffutils/diffutils.mk b/package/diffutils/diffutils.mk new file mode 100644 index 0000000000..191fd2e172 --- /dev/null +++ b/package/diffutils/diffutils.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# diffutils +# +################################################################################ + +DIFFUTILS_VERSION = 3.3 +DIFFUTILS_SOURCE = diffutils-$(DIFFUTILS_VERSION).tar.xz +DIFFUTILS_SITE = $(BR2_GNU_MIRROR)/diffutils +DIFFUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +DIFFUTILS_LICENSE = GPLv3+ +DIFFUTILS_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +DIFFUTILS_DEPENDENCIES += busybox +endif + +$(eval $(autotools-package)) diff --git a/package/dillo/0002-usr-local-include.patch b/package/dillo/0002-usr-local-include.patch new file mode 100644 index 0000000000..0c3fed2bfa --- /dev/null +++ b/package/dillo/0002-usr-local-include.patch @@ -0,0 +1,27 @@ +Do not add (possibly poisoned) /usr/local/include and /usr/local/lib +to gcc and ld search paths in configure. + +With BR2_COMPILER_PARANOID_UNSAFE_PATH enabled, poisoned paths result +in hard errors, failing affected configure tests. + +Signed-off-by: Alex Suykov + +--- a/configure.ac ++++ b/configure.ac +@@ -57,16 +57,6 @@ + AC_TYPE_INT32_T + AC_TYPE_UINT32_T + +-dnl -------------------------------------- +-dnl Check whether to add /usr/local or not +-dnl (this is somewhat a religious problem) +-dnl -------------------------------------- +-dnl +-if test "`$CPP -v < /dev/null 2>&1 | grep '/usr/local/include' 2>&1`" = ""; then +- CPPFLAGS="$CPPFLAGS -I/usr/local/include" +- LDFLAGS="$LDFLAGS -L/usr/local/lib" +-fi +- + dnl ------------------------------------ + dnl Check for socket libs (AIX, Solaris) + dnl ------------------------------------ diff --git a/package/dillo/Config.in b/package/dillo/Config.in new file mode 100644 index 0000000000..d06f2d1f51 --- /dev/null +++ b/package/dillo/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_DILLO + bool "dillo" + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fltk fork() + select BR2_PACKAGE_FLTK + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_ZLIB + help + Dillo is a multi-platform graphical web browser known + for its speed and small footprint. + + Enable openssl package to gain https support. + + http://www.dillo.org + +comment "dillo needs a toolchain w/ C++" + depends on BR2_PACKAGE_XORG7 && BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/dillo/dillo.hash b/package/dillo/dillo.hash new file mode 100644 index 0000000000..cab0b14abd --- /dev/null +++ b/package/dillo/dillo.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 db1be16c1c5842ebe07b419aa7c6ef11a45603a75df2877f99635f4f8345148b dillo-3.0.5.tar.bz2 diff --git a/package/dillo/dillo.mk b/package/dillo/dillo.mk new file mode 100644 index 0000000000..01ab4f5c8f --- /dev/null +++ b/package/dillo/dillo.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# dillo +# +################################################################################ + +DILLO_VERSION = 3.0.5 +DILLO_SOURCE = dillo-$(DILLO_VERSION).tar.bz2 +DILLO_SITE = http://www.dillo.org/download +DILLO_LICENSE = GPLv3+ +DILLO_LICENSE_FILES = COPYING +# configure.ac gets patched, so autoreconf is necessary +DILLO_AUTORECONF = YES +DILLO_DEPENDENCIES = fltk zlib \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) +DILLO_CONF_ENV = ac_cv_path_FLTK_CONFIG=$(STAGING_DIR)/usr/bin/fltk-config + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +DILLO_CONF_OPTS += --enable-ssl +DILLO_DEPENDENCIES += openssl +else +DILLO_CONF_OPTS += --disable-ssl +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +DILLO_CONF_OPTS += --enable-png +DILLO_DEPENDENCIES += libpng +DILLO_CONF_ENV += PNG_CONFIG=$(STAGING_DIR)/usr/bin/libpng-config +else +DILLO_CONF_OPTS += --disable-png +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +DILLO_CONF_OPTS += --enable-jpeg +DILLO_DEPENDENCIES += jpeg +else +DILLO_CONF_OPTS += --disable-jpeg +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +DILLO_CONF_OPTS += --enable-threaded-dns +else +DILLO_CONF_OPTS += --disable-threaded-dns +endif + +$(eval $(autotools-package)) diff --git a/package/ding-libs/Config.in b/package/ding-libs/Config.in new file mode 100644 index 0000000000..7af75b7b94 --- /dev/null +++ b/package/ding-libs/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_DING_LIBS + bool "ding-libs" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on BR2_USE_WCHAR || !BR2_NEEDS_GETTEXT + help + The ding-libs packages contain a set of libraries used by + the System Security Services Daemon (SSSD) and other + projects and provide functions to manipulate filesystem + pathnames (libpath_utils), a hash table to manage storage + and access time properties (libdhash), a data type to + collect data in a hierarchical structure (libcollection), a + dynamically growing, reference-counted array (libref_array), + and a library to process configuration files in + initialization format (INI) into a library collection data + structure (libini_config). + + https://git.fedorahosted.org/git/ding-libs.git + +comment "ding-libs needs a toolchain w/ wchar" + depends on BR2_NEEDS_GETTEXT + depends on !BR2_USE_WCHAR diff --git a/package/ding-libs/ding-libs.hash b/package/ding-libs/ding-libs.hash new file mode 100644 index 0000000000..6e35697692 --- /dev/null +++ b/package/ding-libs/ding-libs.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 639984a57d6f936a6551c842712619692febaebf4515033fc929620a241ffa6a ding_libs-0_4_0.tar.xz diff --git a/package/ding-libs/ding-libs.mk b/package/ding-libs/ding-libs.mk new file mode 100644 index 0000000000..5b842ffa0e --- /dev/null +++ b/package/ding-libs/ding-libs.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# ding-libs +# +################################################################################ + +DING_LIBS_VERSION = 0_4_0 +DING_LIBS_SOURCE = ding_libs-$(DING_LIBS_VERSION).tar.xz +DING_LIBS_SITE = https://git.fedorahosted.org/cgit/ding-libs.git/snapshot +DING_LIBS_DEPENDENCIES = host-pkgconf \ + $(if $(BR2_PACKAGE_GETTEXT),gettext) \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) +DING_LIBS_INSTALL_STAGING = YES +DING_LIBS_LICENSE = LGPLv3+ (library),GPLv3+ (test programs) +DING_LIBS_LICENSE_FILES = COPYING COPYING.LESSER + +# autoconf/automake generated files not present in tarball +DING_LIBS_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/directfb-examples/0001-remove-bzero.patch b/package/directfb-examples/0001-remove-bzero.patch new file mode 100644 index 0000000000..41616b5c31 --- /dev/null +++ b/package/directfb-examples/0001-remove-bzero.patch @@ -0,0 +1,17 @@ +--- + src/df_knuckles/matrix.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: directfb-examples-1.2.0/src/df_knuckles/matrix.c +=================================================================== +--- directfb-examples-1.2.0.orig/src/df_knuckles/matrix.c ++++ directfb-examples-1.2.0/src/df_knuckles/matrix.c +@@ -19,7 +19,7 @@ + static float Cosine[3600]; + static float Sine[3600]; + +-#define M_CLEAR(m) bzero(m, MATRIX_SIZE) ++#define M_CLEAR(m) memset(m, 0, MATRIX_SIZE) + #define M_IDENTITY(m) memcpy(m, IdentityMatrix, MATRIX_SIZE) + + static void MultiplyMatrix(float *A, float *B) diff --git a/package/directfb-examples/Config.in b/package/directfb-examples/Config.in new file mode 100644 index 0000000000..eef9f5c041 --- /dev/null +++ b/package/directfb-examples/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_DIRECTFB_EXAMPLES + bool "directfb examples" + depends on BR2_PACKAGE_DIRECTFB + help + The DirectFB-examples package contains a set of simple DirectFB + applications that can be used to test and demonstrate various + DirectFB features. + + http://directfb.org/downloads/Extras/README.DirectFB-examples diff --git a/package/directfb-examples/directfb-examples.hash b/package/directfb-examples/directfb-examples.hash new file mode 100644 index 0000000000..9d59cfef78 --- /dev/null +++ b/package/directfb-examples/directfb-examples.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 9a2104cc4da8123c8371813551b66b943198979f745cbebc034bb5e10844122a DirectFB-examples-1.7.0.tar.gz diff --git a/package/directfb-examples/directfb-examples.mk b/package/directfb-examples/directfb-examples.mk new file mode 100644 index 0000000000..46263da733 --- /dev/null +++ b/package/directfb-examples/directfb-examples.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# directfb-examples +# +################################################################################ + +DIRECTFB_EXAMPLES_VERSION = 1.7.0 +DIRECTFB_EXAMPLES_SITE = http://www.directfb.org/downloads/Extras +DIRECTFB_EXAMPLES_SOURCE = DirectFB-examples-$(DIRECTFB_EXAMPLES_VERSION).tar.gz +DIRECTFB_EXAMPLES_LICENSE = MIT +DIRECTFB_EXAMPLES_LICENSE_FILES = COPYING +DIRECTFB_EXAMPLES_DEPENDENCIES = directfb + +ifeq ($(BR2_STATIC_LIBS),y) +DIRECTFB_EXAMPLES_CONF_OPTS += LIBS=-lstdc++ +endif + +$(eval $(autotools-package)) diff --git a/package/directfb/0001-fix-missing-davinci-voodoo-header.patch b/package/directfb/0001-fix-missing-davinci-voodoo-header.patch new file mode 100644 index 0000000000..6ad4958f84 --- /dev/null +++ b/package/directfb/0001-fix-missing-davinci-voodoo-header.patch @@ -0,0 +1,1726 @@ +The archive of directfb-1.6.3 is still missing some header files against +the tagged git tree of directfb. The following files are missing. + +gfxdrivers/davinci/davinci_c64x.h +gfxdrivers/davinci/davincifb.h +gfxdrivers/davinci/davinci_gfxdriver.h +tests/voodoo/voodoo_test.h + +The headers of course are needed to be able to build every module of +directfb. The headers are taken from the git tree of directfb +http://git.directfb.org/?p=core/DirectFB.git;a=commit;h=38b784549bc59bb07c58bb29667cb658695d39a7, +tag DIRECTFB_1_6_3, SHA1ID 38b784549bc59bb07c58bb29667cb658695d39a7. + +Signed-off-by: Carsten Schoenert + +diff -puNr -Naur directfb-1.6.3-orig/gfxdrivers/davinci/davinci_c64x.h directfb-1.6.3/gfxdrivers/davinci/davinci_c64x.h +--- directfb-1.6.3-orig/gfxdrivers/davinci/davinci_c64x.h 1970-01-01 01:00:00.000000000 +0100 ++++ directfb-1.6.3/gfxdrivers/davinci/davinci_c64x.h 2013-04-07 21:33:25.928530187 +0200 +@@ -0,0 +1,935 @@ ++/* ++ TI Davinci driver - C64X+ DSP Library ++ ++ (c) Copyright 2008 directfb.org ++ (c) Copyright 2007 Telio AG ++ ++ Written by Denis Oliver Kropp and ++ Olaf Dreesen . ++ ++ All rights reserved. ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License ++ version 2 as published by the Free Software Foundation. ++ ++ This library 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 library; if not, write to the ++ Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. ++*/ ++ ++#ifndef __DAVINCI_C64X_H__ ++#define __DAVINCI_C64X_H__ ++ ++#include ++ ++#include ++ ++#include ++#include ++ ++#include ++ ++#define mb() __asm__ __volatile__ ("" : : : "memory") ++ ++/**********************************************************************************************************************/ ++ ++typedef struct { ++ int magic; ++ ++ int fd; ++ c64xTaskControl *ctl; ++ void *mem; ++ ++ c64xTask *QueueL; ++} DavinciC64x; ++ ++typedef struct { ++ int magic; ++ unsigned int max_tasks; ++ unsigned int num_tasks; ++ c64xTask *tasks; ++} DavinciC64xTasks; ++ ++typedef enum { ++ C64X_TEF_NONE = 0x0000, ++ C64X_TEF_RESET = 0x0001 ++} DavinciC64xEmitFlags; ++ ++/**********************************************************************************************************************/ ++ ++DFBResult davinci_c64x_open ( DavinciC64x *c64x ); ++ ++DFBResult davinci_c64x_close ( DavinciC64x *c64x ); ++ ++DFBResult davinci_c64x_wait_low( DavinciC64x *c64x ); ++ ++/**********************************************************************************************************************/ ++ ++DFBResult davinci_c64x_tasks_init ( DavinciC64xTasks *tasks, ++ unsigned int size ); ++ ++DFBResult davinci_c64x_tasks_destroy( DavinciC64xTasks *tasks ); ++ ++/**********************************************************************************************************************/ ++ ++DFBResult davinci_c64x_emit_tasks( DavinciC64x *c64x, ++ DavinciC64xTasks *tasks, ++ DavinciC64xEmitFlags flags ); ++ ++/**********************************************************************************************************************/ ++ ++static const char *state_names[] = { "DONE", "ERROR", "TODO", "RUNNING" }; ++ ++static inline c64xTask * ++c64x_get_task( DavinciC64x *c64x ) ++{ ++ c64xTaskControl *ctl = c64x->ctl; ++ uint32_t idx = ctl->QL_arm; ++ uint32_t next = (idx + 1) & C64X_QUEUE_MASK; ++ c64xTask *task = &c64x->QueueL[idx]; ++ int loops = 0; ++ uint32_t idle = 0; ++ ++ /* Wait for the entry (and next) to be processed by the DSP (rare case). */ ++ while (task->c64x_flags & C64X_FLAG_TODO || ctl->QL_dsp == next) { ++ if (loops > 666 || (idle && ctl->idlecounter - idle > 666)) { ++ c64xTask *dsp_task = &c64x->QueueL[ctl->QL_dsp]; ++ ++ D_PERROR( "Davinci/C64X+: Blocked! [DSP %d / %d (%s), ARM %d / %d (%s)]\n", ++ ctl->QL_dsp, ++ (dsp_task->c64x_function >> 2) & 0x3fff, ++ state_names[dsp_task->c64x_function & 3], ++ ctl->QL_arm, ++ (task->c64x_function >> 2) & 0x3fff, ++ state_names[task->c64x_function & 3] ); ++ ++ break; ++ } ++ ++ idle = ctl->idlecounter; ++ ++ /* Queue is full, waiting 10-20ms should not be too bad. */ ++ if (loops++ > 10) ++ usleep( 5000 ); ++ } ++ ++ return task; ++} ++ ++static inline void ++c64x_submit_task( DavinciC64x *c64x, c64xTask *task ) ++{ ++ c64xTaskControl *ctl = c64x->ctl; ++ uint32_t idx = ctl->QL_arm; ++ uint32_t next = (idx + 1) & C64X_QUEUE_MASK; ++ ++ mb(); ++ ++ ctl->QL_arm = next; ++ ++ mb(); ++} ++ ++/**********************************************************************************************************************/ ++ ++static inline void ++davinci_c64x_wb_inv_range( DavinciC64x *c64x, ++ unsigned long start, ++ u32 length, ++ u32 func ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = start; ++ task->c64x_arg[1] = length; ++ task->c64x_arg[2] = func; ++ ++ task->c64x_function = C64X_WB_INV_RANGE | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_write_back_all( DavinciC64x *c64x ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_function = C64X_WRITE_BACK_ALL | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++/**********************************************************************************************************************/ ++ ++static inline void ++davinci_c64x_load_block__L( DavinciC64xTasks *tasks, ++ unsigned long words, ++ u32 num, ++ u32 flags ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = words; ++ task->c64x_arg[1] = num; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_LOAD_BLOCK | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_load_block( DavinciC64x *c64x, ++ unsigned long words, ++ u32 num, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = words; ++ task->c64x_arg[1] = num; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_LOAD_BLOCK | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_fetch_uyvy( DavinciC64x *c64x, ++ unsigned long dest, ++ unsigned long source, ++ u32 pitch, ++ u32 height, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = source; ++ task->c64x_arg[2] = pitch; ++ task->c64x_arg[3] = height; ++ task->c64x_arg[4] = flags; ++ ++ task->c64x_function = C64X_FETCH_UYVY | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_mc( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long source0, ++ unsigned long source1, ++ u32 spitch, ++ u32 height, ++ int func ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = source0; ++ task->c64x_arg[3] = source1; ++ task->c64x_arg[4] = spitch; ++ task->c64x_arg[5] = height; ++ ++ task->c64x_function = func | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_put_idct_uyvy_16x16__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 pitch, ++ u32 flags ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_PUT_IDCT_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_put_idct_uyvy_16x16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_PUT_IDCT_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_put_mc_uyvy_16x16__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 pitch, ++ u32 flags ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_PUT_MC_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_put_mc_uyvy_16x16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_PUT_MC_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_put_sum_uyvy_16x16__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 pitch, ++ u32 flags ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_PUT_SUM_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_put_sum_uyvy_16x16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = flags; ++ ++ task->c64x_function = C64X_PUT_SUM_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_dva_begin_frame__L( DavinciC64xTasks *tasks, ++ u32 pitch, ++ unsigned long current, ++ unsigned long past, ++ unsigned long future, ++ u32 flags ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = pitch; ++ task->c64x_arg[1] = current; ++ task->c64x_arg[2] = past; ++ task->c64x_arg[3] = future; ++ task->c64x_arg[4] = flags; ++ ++ task->c64x_function = C64X_DVA_BEGIN_FRAME | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_dva_begin_frame( DavinciC64x *c64x, ++ u32 pitch, ++ unsigned long current, ++ unsigned long past, ++ unsigned long future, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = pitch; ++ task->c64x_arg[1] = current; ++ task->c64x_arg[2] = past; ++ task->c64x_arg[3] = future; ++ task->c64x_arg[4] = flags; ++ ++ task->c64x_function = C64X_DVA_BEGIN_FRAME | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_dva_motion_block__L( DavinciC64xTasks *tasks, ++ unsigned long macroblock ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = macroblock; ++ ++ task->c64x_function = C64X_DVA_MOTION_BLOCK | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_dva_motion_block( DavinciC64x *c64x, ++ unsigned long macroblock ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = macroblock; ++ ++ task->c64x_function = C64X_DVA_MOTION_BLOCK | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++/**********************************************************************************************************************/ ++ ++static inline void ++davinci_c64x_dva_idct( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ unsigned long source ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = source; ++ ++ task->c64x_function = C64X_DVA_IDCT | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++/**********************************************************************************************************************/ ++ ++static inline void ++davinci_c64x_put_uyvy_16x16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ unsigned long source, ++ u32 flags ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = source; ++ task->c64x_arg[3] = flags; ++ ++ task->c64x_function = C64X_PUT_UYVY_16x16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_dither_argb__L( DavinciC64xTasks *tasks, ++ unsigned long dst_rgb, ++ unsigned long dst_alpha, ++ u32 dst_pitch, ++ unsigned long source, ++ u32 src_pitch, ++ u32 width, ++ u32 height ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dst_rgb; ++ task->c64x_arg[1] = dst_alpha; ++ task->c64x_arg[2] = dst_pitch; ++ task->c64x_arg[3] = source; ++ task->c64x_arg[4] = src_pitch; ++ task->c64x_arg[5] = width; ++ task->c64x_arg[6] = height; ++ ++ task->c64x_function = C64X_DITHER_ARGB | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_dither_argb( DavinciC64x *c64x, ++ unsigned long dst_rgb, ++ unsigned long dst_alpha, ++ u32 dst_pitch, ++ unsigned long source, ++ u32 src_pitch, ++ u32 width, ++ u32 height ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dst_rgb; ++ task->c64x_arg[1] = dst_alpha; ++ task->c64x_arg[2] = dst_pitch; ++ task->c64x_arg[3] = source; ++ task->c64x_arg[4] = src_pitch; ++ task->c64x_arg[5] = width; ++ task->c64x_arg[6] = height; ++ ++ task->c64x_function = C64X_DITHER_ARGB | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_fill_16__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 pitch, ++ u32 width, ++ u32 height, ++ u32 value ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = width; ++ task->c64x_arg[3] = height; ++ task->c64x_arg[4] = value; ++ ++ task->c64x_function = C64X_FILL_16 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_fill_16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ u32 width, ++ u32 height, ++ u32 value ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = width; ++ task->c64x_arg[3] = height; ++ task->c64x_arg[4] = value; ++ ++ task->c64x_function = C64X_FILL_16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_fill_32__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 pitch, ++ u32 width, ++ u32 height, ++ u32 value ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = width; ++ task->c64x_arg[3] = height; ++ task->c64x_arg[4] = value; ++ ++ task->c64x_function = C64X_FILL_32 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_fill_32( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 pitch, ++ u32 width, ++ u32 height, ++ u32 value ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = pitch; ++ task->c64x_arg[2] = width; ++ task->c64x_arg[3] = height; ++ task->c64x_arg[4] = value; ++ ++ task->c64x_function = C64X_FILL_32 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_blit_16__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = spitch; ++ task->c64x_arg[4] = width; ++ task->c64x_arg[5] = height; ++ ++ task->c64x_function = C64X_COPY_16 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_blit_16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = spitch; ++ task->c64x_arg[4] = width; ++ task->c64x_arg[5] = height; ++ ++ task->c64x_function = C64X_COPY_16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_blit_32__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = spitch; ++ task->c64x_arg[4] = width; ++ task->c64x_arg[5] = height; ++ ++ task->c64x_function = C64X_COPY_32 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_blit_32( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = spitch; ++ task->c64x_arg[4] = width; ++ task->c64x_arg[5] = height; ++ ++ task->c64x_function = C64X_COPY_32 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_stretch_32__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 dw, ++ u32 dh, ++ u32 sw, ++ u32 sh, ++ const DFBRegion *clip ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = src; ++ task->c64x_arg[2] = dpitch | (spitch << 16); ++ task->c64x_arg[3] = dh | (dw << 16); ++ task->c64x_arg[4] = sh | (sw << 16); ++ task->c64x_arg[5] = clip->x2 | (clip->y2 << 16); ++ task->c64x_arg[6] = clip->x1 | (clip->y1 << 16); ++ ++ if (sw > dw && sh > dh) ++ task->c64x_function = C64X_STRETCH_32_down | C64X_FLAG_TODO; ++ else ++ task->c64x_function = C64X_STRETCH_32_up | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_stretch_32( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 dw, ++ u32 dh, ++ u32 sw, ++ u32 sh, ++ const DFBRegion *clip ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = src; ++ task->c64x_arg[2] = dpitch | (spitch << 16); ++ task->c64x_arg[3] = dh | (dw << 16); ++ task->c64x_arg[4] = sh | (sw << 16); ++ task->c64x_arg[5] = clip->x2 | (clip->y2 << 16); ++ task->c64x_arg[6] = clip->x1 | (clip->y1 << 16); ++ ++ if (sw > dw && sh > dh) ++ task->c64x_function = C64X_STRETCH_32_down | C64X_FLAG_TODO; ++ else ++ task->c64x_function = C64X_STRETCH_32_up | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_blit_blend_32__L( DavinciC64xTasks *tasks, ++ u32 sub_func, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height, ++ u32 argb, ++ u8 alpha ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = spitch; ++ task->c64x_arg[4] = width | (height << 16); ++ task->c64x_arg[5] = argb; ++ task->c64x_arg[6] = alpha; ++ ++ task->c64x_function = (sub_func << 16) | C64X_BLEND_32 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_blit_blend_32( DavinciC64x *c64x, ++ u32 sub_func, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height, ++ u32 argb, ++ u8 alpha ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = dpitch; ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = spitch; ++ task->c64x_arg[4] = width | (height << 16); ++ task->c64x_arg[5] = argb; ++ task->c64x_arg[6] = alpha; ++ ++ task->c64x_function = (sub_func << 16) | C64X_BLEND_32 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_blit_keyed_16__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height, ++ u32 key, ++ u32 mask ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = (dpitch << 16) | (spitch & 0xffff); ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = width; ++ task->c64x_arg[4] = height; ++ task->c64x_arg[5] = key; ++ task->c64x_arg[6] = mask; ++ ++ task->c64x_function = C64X_COPY_KEYED_16 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_blit_keyed_16( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height, ++ u32 key, ++ u32 mask ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = (dpitch << 16) | (spitch & 0xffff); ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = width; ++ task->c64x_arg[4] = height; ++ task->c64x_arg[5] = key; ++ task->c64x_arg[6] = mask; ++ ++ task->c64x_function = C64X_COPY_KEYED_16 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++static inline void ++davinci_c64x_blit_keyed_32__L( DavinciC64xTasks *tasks, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height, ++ u32 key, ++ u32 mask ) ++{ ++ c64xTask *task = &tasks->tasks[tasks->num_tasks]; ++ ++ D_ASSERT( tasks->num_tasks < tasks->max_tasks ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = (dpitch << 16) | (spitch & 0xffff); ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = width; ++ task->c64x_arg[4] = height; ++ task->c64x_arg[5] = key; ++ task->c64x_arg[6] = mask; ++ ++ task->c64x_function = C64X_COPY_KEYED_32 | C64X_FLAG_TODO; ++ ++ tasks->num_tasks++; ++} ++ ++static inline void ++davinci_c64x_blit_keyed_32( DavinciC64x *c64x, ++ unsigned long dest, ++ u32 dpitch, ++ unsigned long src, ++ u32 spitch, ++ u32 width, ++ u32 height, ++ u32 key, ++ u32 mask ) ++{ ++ c64xTask *task = c64x_get_task( c64x ); ++ ++ task->c64x_arg[0] = dest; ++ task->c64x_arg[1] = (dpitch << 16) | (spitch & 0xffff); ++ task->c64x_arg[2] = src; ++ task->c64x_arg[3] = width; ++ task->c64x_arg[4] = height; ++ task->c64x_arg[5] = key; ++ task->c64x_arg[6] = mask; ++ ++ task->c64x_function = C64X_COPY_KEYED_32 | C64X_FLAG_TODO; ++ ++ c64x_submit_task( c64x, task ); ++} ++ ++#endif ++ +diff -puNr -Naur directfb-1.6.3-orig/gfxdrivers/davinci/davincifb.h directfb-1.6.3/gfxdrivers/davinci/davincifb.h +--- directfb-1.6.3-orig/gfxdrivers/davinci/davincifb.h 1970-01-01 01:00:00.000000000 +0100 ++++ directfb-1.6.3/gfxdrivers/davinci/davincifb.h 2013-04-07 21:33:21.488622184 +0200 +@@ -0,0 +1,581 @@ ++/* ++ * Copyright (C) 2006 Texas Instruments Inc ++ * ++ * 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 ++ * ++ * File: davincifb.h ++ */ ++ ++#ifndef DAVINVI_VPBE_H ++#define DAVINVI_VPBE_H ++ ++/* include Linux files */ ++#include ++ ++/* define the custom FBIO_WAITFORVSYNC ioctl */ ++#define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t) ++#define FBIO_SETATTRIBUTE _IOW('F', 0x21, struct fb_fillrect) ++ ++/* Backported IOCTLS. */ ++#define FBIO_SETPOSX _IOW('F', 0x22, u_int32_t) ++#define FBIO_SETPOSY _IOW('F', 0x23, u_int32_t) ++#define FBIO_SETZOOM _IOW('F', 0x24, struct zoom_params) ++#define FBIO_GETSTD _IOR('F', 0x25, u_int32_t) ++#define FBIO_RESIZER _IOW('F', 0x26, struct vpfe_resizer_params) ++#define FBIO_SYNC _IOW('F', 0x27, u_int32_t) ++ ++typedef struct zoom_params { ++ u_int32_t window_id; ++ u_int32_t zoom_h; ++ u_int32_t zoom_v; ++} zoom_params_t; ++ ++typedef struct vpfe_resizer_params ++{ ++ u_int32_t rsz_cnt; //busy-lock ++ u_int32_t out_size; //busy-lock ++ u_int32_t in_start; //busy-lock ++ u_int32_t in_size; //busy-lock ++ u_int32_t sdr_inadd; //shadowed ++ u_int32_t sdr_inoff; //shadowed ++ u_int32_t sdr_outadd; //shadowed ++ u_int32_t sdr_outoff; //shadowed ++ u_int32_t hfilt[16]; //busy-lock ++ u_int32_t vfilt[16]; //busy-lock ++ u_int32_t yenh; //busy-lock ++} vpfe_resizer_params_t; ++ ++typedef struct fb_set_start { ++ int offset; /* offset from smem_start */ ++ unsigned long physical; /* absolute physical address when offset < 0 */ ++ ++ u_int64_t sync; /* input: target sync counter for change or 0 for no sync at all, ++ output: sync counter of actual change or 0 if still pending */ ++} fb_set_start_t; ++ ++ ++#ifdef _IOC_TYPECHECK ++#undef _IOC_TYPECHECK ++#define _IOC_TYPECHECK(x) (sizeof(x)) ++#endif ++ ++#define RAM_CLUT_SIZE 256*3 ++#define FBIO_ENABLE_DISABLE_WIN \ ++ _IOW('F', 0x30, unsigned char) ++#define FBIO_SET_BITMAP_BLEND_FACTOR \ ++ _IOW('F', 0x31, vpbe_bitmap_blend_params_t) ++#define FBIO_SET_BITMAP_WIN_RAM_CLUT \ ++ _IOW('F', 0x32, unsigned char)*RAM_CLUT_SIZE) ++#define FBIO_ENABLE_DISABLE_ATTRIBUTE_WIN \ ++ _IOW('F', 0x33, unsigned int) ++#define FBIO_GET_BLINK_INTERVAL \ ++ _IOR('F', 0x34, vpbe_blink_option_t) ++#define FBIO_SET_BLINK_INTERVAL \ ++ _IOW('F', 0x35, vpbe_blink_option_t) ++#define FBIO_GET_VIDEO_CONFIG_PARAMS \ ++ _IOR('F', 0x36, vpbe_video_config_params_t) ++#define FBIO_SET_VIDEO_CONFIG_PARAMS \ ++ _IOW('F', 0x37, vpbe_video_config_params_t) ++#define FBIO_GET_BITMAP_CONFIG_PARAMS \ ++ _IOR('F', 0x38, vpbe_bitmap_config_params_t) ++#define FBIO_SET_BITMAP_CONFIG_PARAMS \ ++ _IOW('F', 0x39, vpbe_bitmap_config_params_t) ++#define FBIO_SET_DCLK \ ++ _IOW('F', 0x40, vpbe_dclk_t) ++#define FBIO_SET_INTERFACE \ ++ _IOW('F', 0x41, unsigned char) ++#define FBIO_GET_INTERFACE \ ++ _IOR('F', 0x42, unsigned char) ++#define FBIO_QUERY_TIMING \ ++ _IOWR('F', 0x43, struct vpbe_mode_info) ++#define FBIO_SET_TIMING \ ++ _IOW('F', 0x44, struct vpbe_fb_videomode) ++#define FBIO_GET_TIMING \ ++ _IOR('F', 0x45, struct vpbe_fb_videomode) ++#define FBIO_SET_VENC_CLK_SOURCE \ ++ _IOW('F', 0x46, unsigned char) ++#define FBIO_SET_BACKG_COLOR \ ++ _IOW('F', 0x47, vpbe_backg_color_t) ++#define FBIO_ENABLE_DISPLAY \ ++ _IOW('F', 0x48, unsigned char) ++#define FBIO_SETPOS \ ++ _IOW('F', 0x49, u_int32_t) ++#define FBIO_SET_CURSOR \ ++ _IOW('F', 0x50, struct fb_cursor) ++#define FBIO_SET_START \ ++ _IOW('F', 0x66, struct fb_set_start) ++ ++/* ++ * Defines and Constants ++ */ ++#ifdef __KERNEL__ ++#define DAVINCIFB_DEVICE "davincifb" ++#define DAVINCIFB_DRIVER "davincifb" ++ ++#define MULTIPLE_BUFFERING 1 ++ ++#ifdef MULTIPLE_BUFFERING ++#define DOUBLE_BUF 2 ++#define TRIPLE_BUF 3 ++#else ++#define DOUBLE_BUF 1 ++#define TRIPLE_BUF 1 ++#endif ++ ++/* usage: if (is_win(info->fix.id, OSD0)) ... */ ++#define is_win(name, x) ((strcmp(name, x ## _FBNAME) == 0) ? 1 : 0) ++ ++/* ++ * display controller register I/O routines ++ */ ++u32 dispc_reg_in(u32 offset); ++u32 dispc_reg_out(u32 offset, u32 val); ++u32 dispc_reg_merge(u32 offset, u32 val, u32 mask); ++ ++#endif /*__KERNEL__*/ ++ ++/* Error return codes */ ++#define VPBE_INVALID_PARA_VALUE 700 ++#define VPBE_WRONG_WINDOW_ID 701 ++#define VPBE_CURRENTLY_IN_REQUIRED_MODE 702 ++#define VPBE_INSUFFICIENT_CLUT_VALUES 703 ++#define VPBE_CLUT_WRITE_TIMEOUT 704 ++#define VPBE_VID0_BUF_ADR_NULL 705 ++#define VPBE_WINDOW_NOT_DISABLED 706 ++#define VPBE_WINDOW_NOT_ENABLED 707 ++ ++#ifndef __KERNEL__ ++/* Window ID definations */ ++#define OSD0 0 ++#define VID0 1 ++#define OSD1 2 ++#define VID1 3 ++#endif ++ ++/* There are 4 framebuffers, each represented by an fb_info and ++ * a dm_win_info structure */ ++#define OSD0_FBNAME "dm_osd0_fb" ++#define OSD1_FBNAME "dm_osd1_fb" ++#define VID0_FBNAME "dm_vid0_fb" ++#define VID1_FBNAME "dm_vid1_fb" ++ ++/* FIXME: Digital LCD RGB matrix coefficients */ ++#define DLCD_DGY_VAL 0 ++#define DLCD_DRV_VAL 0 ++#define DLCD_DGU_VAL 0 ++#define DLCD_DBU_VAL 0 ++ ++/* Defines for bitmap format */ ++#define VPBE_BITMAP_BIT_1 1 ++#define VPBE_BITMAP_BIT_2 2 ++#define VPBE_BITMAP_BIT_4 4 ++#define VPBE_BITMAP_BIT_8 8 ++#define VPBE_BITMAP_RGB565 16 ++#define VPBE_VIDEO_YUV422 16 ++#define VPBE_VIDEO_RGB888 24 ++ ++/* Defines foe cursor parameter validation*/ ++#define MAX_CURSOR_WIDTH 0x3FF ++#define MAX_CURSOR_HEIGHT 0x1FF ++#define MAX_CURSOR_LINEWIDTH 7 ++ ++#define BASEX 0x80 ++#define BASEY 0x12 ++#define BASEX_DLCD 0x59 ++#define BASEY_DLCD 0x22 ++ ++/* ++ * Enumerations ++ */ ++/* Enum for blending factor */ ++typedef enum vpbe_blend_factor { ++ OSD_CONTRIBUTION_ZERO = 0, ++ OSD_CONTRIBUTION_1_BY_8 = 1, ++ OSD_CONTRIBUTION_2_BY_8 = 2, ++ OSD_CONTRIBUTION_3_BY_8 = 3, ++ OSD_CONTRIBUTION_4_BY_8 = 4, ++ OSD_CONTRIBUTION_5_BY_8 = 5, ++ OSD_CONTRIBUTION_6_BY_8 = 6, ++ OSD_CONTRIBUTION_ONE = 7 ++} vpbe_blend_factor_t; ++ ++/* Enum for Boolean variables */ ++typedef enum { ++ SET_0 = 0, ++ SET_1 = 1 ++} CB_CR_ORDER, ATTRIBUTE, ROM_RAM_CLUT; ++ ++/* Defines for Display Interface */ ++#define PRGB 0 ++#define COMPOSITE 1 ++#define SVIDEO 2 ++#define COMPONENT 3 ++#define RGB 4 ++#define YCC16 5 ++#define YCC8 6 ++#define SRGB 7 ++#define EPSON 8 ++#define CASIO1G 9 ++#define UDISP 10 ++#define STN 11 ++#define VPBE_MAX_INTERFACES 12 ++ ++/* Defines for Display Mode */ ++#define LCD 0 ++#define NTSC 1 ++#define PAL 2 ++#define P525 3 ++#define P625 4 ++ ++#define DEFAULT_MODE 0 ++#define P480 0 ++#define P400 1 ++#define P350 2 ++#define NON_EXISTING_MODE 255 ++/* Enable/Disable enum */ ++typedef enum { ++ VPBE_DISABLE = 0, ++ VPBE_ENABLE = 1 ++} ATTENUATION, TRANSPARENCY, EXPANSION, BLINKING; ++ ++typedef enum clk_source { ++ CLK_SOURCE_CLK27 = 0, ++ CLK_SOURCE_CLK54 = 1, ++ CLK_SOURCE_VPBECLK = 2 ++} CLK_SOURCE; ++ ++/* ++ * Structures and Union Definitions ++ */ ++ ++/* Structure for transparency and the blending factor for the bitmap window */ ++typedef struct vpbe_bitmap_blend_params { ++ unsigned int colorkey; /* color key to be blend */ ++ unsigned int enable_colorkeying; /* enable color keying */ ++ unsigned int bf; /* valid range from 0 to 7 only. */ ++} vpbe_bitmap_blend_params_t; ++ ++/* Structure for window expansion */ ++typedef struct vpbe_win_expansion { ++ EXPANSION horizontal; ++ EXPANSION vertical; /* 1: Enable 0:disable */ ++} vpbe_win_expansion_t; ++ ++/* Structure for OSD window blinking options */ ++typedef struct vpbe_blink_option { ++ BLINKING blinking; /* 1: Enable blinking 0: Disable */ ++ unsigned int interval; /* Valid only if blinking is 1 */ ++} vpbe_blink_option_t; ++ ++/* Structure for DCLK parameters */ ++typedef struct vpbe_dclk { ++ unsigned char dclk_pattern_width; ++ unsigned int dclk_pattern0; ++ unsigned int dclk_pattern1; ++ unsigned int dclk_pattern2; ++ unsigned int dclk_pattern3; ++} vpbe_dclk_t; ++ ++/* Structure for display format */ ++typedef struct vpbe_display_format { ++ unsigned char interface; /* Output interface type */ ++ unsigned char mode; /* output mode */ ++} vpbe_display_format_t; ++ ++/* Structure for background color */ ++typedef struct vpbe_backg_color { ++ unsigned char clut_select; /* 2: RAM CLUT 1:ROM1 CLUT 0:ROM0 CLUT */ ++ unsigned char color_offset; /* index of color */ ++} vpbe_backg_color_t; ++ ++/* Structure for Video window configurable parameters */ ++typedef struct vpbe_video_config_params { ++ CB_CR_ORDER cb_cr_order; /*Cb/Cr order in input data for a pixel. */ ++ /* 0: cb cr 1: cr cb */ ++ vpbe_win_expansion_t exp_info; /* HZ/VT Expansion enable disable */ ++} vpbe_video_config_params_t; ++ ++/*Union of structures giving the CLUT index for the 1, 2, 4 bit bitmap values.*/ ++typedef union vpbe_clut_idx { ++ struct _for_4bit_bimap { ++ unsigned char bitmap_val_0; ++ unsigned char bitmap_val_1; ++ unsigned char bitmap_val_2; ++ unsigned char bitmap_val_3; ++ unsigned char bitmap_val_4; ++ unsigned char bitmap_val_5; ++ unsigned char bitmap_val_6; ++ unsigned char bitmap_val_7; ++ unsigned char bitmap_val_8; ++ unsigned char bitmap_val_9; ++ unsigned char bitmap_val_10; ++ unsigned char bitmap_val_11; ++ unsigned char bitmap_val_12; ++ unsigned char bitmap_val_13; ++ unsigned char bitmap_val_14; ++ unsigned char bitmap_val_15; ++ } for_4bit_bimap; ++ struct _for_2bit_bimap { ++ unsigned char bitmap_val_0; ++ unsigned char dummy0[4]; ++ unsigned char bitmap_val_1; ++ unsigned char dummy1[4]; ++ unsigned char bitmap_val_2; ++ unsigned char dummy2[4]; ++ unsigned char bitmap_val_3; ++ } for_2bit_bimap; ++ struct _for_1bit_bimap { ++ unsigned char bitmap_val_0; ++ unsigned char dummy0[14]; ++ unsigned char bitmap_val_1; ++ } for_1bit_bimap; ++} vpbe_clut_idx_t; ++ ++/* Structure for bitmap window configurable parameters */ ++typedef struct vpbe_bitmap_config_params { ++ /* Only for bitmap width = 1,2,4 bits */ ++ vpbe_clut_idx_t clut_idx; ++ /* Attenuation value for YUV o/p for bitmap window */ ++ unsigned char attenuation_enable; ++ /* 0: ROM DM270, 1:ROM DM320, 2:RAM CLUT */ ++ unsigned char clut_select; ++} vpbe_bitmap_config_params_t; ++ ++/* Unioun for video/OSD configuration parameters */ ++typedef union vpbe_conf_params { ++ ++ struct vpbe_video_params { ++ CB_CR_ORDER cb_cr_order; ++ /* HZ/VT Expansion enable disable */ ++ vpbe_win_expansion_t exp_info; ++ } video_params; ++ ++ struct vpbe_bitmap_params { ++ /* Attenuation value for YUV o/p */ ++ ATTENUATION attenuation_enable; ++ /* 0: ROM DM270, 1: ROM DM320, 2:RAM CLUT */ ++ unsigned char clut_select; ++ /* Only for bitmap width = 1,2,4 bits */ ++ vpbe_clut_idx_t clut_idx; ++ /* 0: OSD window is bitmap window */ ++ /* 1: OSD window is attribute window */ ++ ATTRIBUTE enable_attribute; ++ /* To hold bps value. ++ Used to switch back from attribute to bitmap. */ ++ unsigned int stored_bits_per_pixel; ++ /* Blending information */ ++ vpbe_bitmap_blend_params_t blend_info; ++ /* OSD Blinking information */ ++ vpbe_blink_option_t blink_info; ++ } bitmap_params; ++ ++} vpbe_conf_params_t; ++ ++typedef struct vpbe_video_params vpbe_video_params_t; ++typedef struct vpbe_bitmap_params vpbe_bitmap_params_t; ++ ++/* Structure to hold window position */ ++typedef struct vpbe_window_position { ++ unsigned int xpos; /* X position of the window */ ++ unsigned int ypos; /* Y position of the window */ ++} vpbe_window_position_t; ++ ++#ifdef __KERNEL__ ++/* Structure for each window */ ++typedef struct vpbe_dm_win_info { ++ struct fb_info info; ++ vpbe_window_position_t win_pos; /* X,Y position of window */ ++ /* Size of window is already there in var_info structure. */ ++ ++ dma_addr_t fb_base_phys; /*framebuffer area */ ++ unsigned int fb_base; /*window memory pointer */ ++ unsigned int fb_size; /*memory size */ ++ unsigned int pseudo_palette[17]; ++ int alloc_fb_mem; ++ /*flag to identify if framebuffer area is fixed or not */ ++ unsigned long sdram_address; ++ struct vpbe_dm_info *dm; ++ unsigned char window_enable; /*Additions for all windows */ ++ zoom_params_t zoom; /*Zooming parameters */ ++ unsigned char field_frame_select; /*To select Field or frame */ ++ unsigned char numbufs; /*Number of buffers valid 2 or 3 */ ++ vpbe_conf_params_t conf_params; ++ /*window configuration parameter union pointer */ ++} vpbe_dm_win_info_t; ++#endif /*__KERNEL__*/ ++ ++/* ++ * Videmode structure for display interface and mode settings ++ */ ++typedef struct vpbe_fb_videomode { ++ unsigned char name[10]; /* Mode name ( NTSC , PAL) */ ++ unsigned int vmode; /* FB_MODE_INTERLACED or FB_MODE_NON_INTERLACED */ ++ unsigned int xres; /* X Resolution of the display */ ++ unsigned int yres; /* Y Resolution of the display */ ++ unsigned int fps; /* frames per second */ ++ /* Timing Parameters applicable for std = 0 only */ ++ unsigned int left_margin; ++ unsigned int right_margin; ++ unsigned int upper_margin; ++ unsigned int lower_margin; ++ unsigned int hsync_len; ++ unsigned int vsync_len; ++ unsigned int sync; /* 0: hsync -ve/vsync -ve */ ++ /*1: hsync -ve/vsync +ve */ ++ /*2: hsync +ve/vsync -ve */ ++ /*3: hsync +ve/vsync +ve */ ++ unsigned int basepx; /* Display x,y start position */ ++ unsigned int basepy; ++/* 1= Mode s available in modelist 0=Mode is not available in modelist */ ++ unsigned int std; ++} vpbe_fb_videomode_t; ++ ++/* Structure to interface videomode to application*/ ++typedef struct vpbe_mode_info { ++ vpbe_fb_videomode_t vid_mode; ++ unsigned char interface; ++ unsigned char mode_idx; ++} vpbe_mode_info_t; ++ ++#ifdef __KERNEL__ ++/* ++ * Structure for the driver holding information of windows, ++ * memory base addresses etc. ++ */ ++typedef struct vpbe_dm_info { ++ vpbe_dm_win_info_t *osd0; ++ vpbe_dm_win_info_t *osd1; ++ vpbe_dm_win_info_t *vid0; ++ vpbe_dm_win_info_t *vid1; ++ ++/* to map the registers */ ++ dma_addr_t mmio_base_phys; ++ unsigned int mmio_base; ++ unsigned int mmio_size; ++ ++ wait_queue_head_t vsync_wait; ++ unsigned int vsync_cnt; ++ int timeout; ++ ++ /* this is the function that configures the output device (NTSC/PAL/LCD) ++ * for the required output format (composite/s-video/component/rgb) ++ */ ++ void (*output_device_config) (void); ++ ++ struct device *dev; ++ ++ vpbe_backg_color_t backg; /* background color */ ++ vpbe_dclk_t dclk; /*DCLK parameters */ ++ vpbe_display_format_t display; /*Display interface and mode */ ++ vpbe_fb_videomode_t videomode; /*Cuurent videomode */ ++ char ram_clut[256][3]; /*RAM CLUT array */ ++ struct fb_cursor cursor; /* cursor config params from fb.h */ ++/*Flag that indicates whether any of the display is enabled or not*/ ++ int display_enable; ++} vpbe_dm_info_t; ++ ++/* ++ * Functions Definitions for 'davincifb' module ++ */ ++int vpbe_mem_alloc_window_buf(vpbe_dm_win_info_t *); ++int vpbe_mem_release_window_buf(vpbe_dm_win_info_t *); ++void init_display_function(vpbe_display_format_t *); ++int vpbe_mem_alloc_struct(vpbe_dm_win_info_t **); ++void set_vid0_default_conf(void); ++void set_vid1_default_conf(void); ++void set_osd0_default_conf(void); ++void set_osd1_default_conf(void); ++void set_cursor_default_conf(void); ++void set_dm_default_conf(void); ++void set_win_enable(char *, unsigned int); ++int within_vid0_limits(u32, u32, u32, u32); ++void vpbe_set_display_default(void); ++#ifdef __KERNEL__ ++void set_win_position(char *, u32, u32, u32, u32); ++void change_win_param(int); ++void set_interlaced(char *, unsigned int); ++#endif /* __KERNEL__ */ ++ ++/* ++ * Function definations for 'osd' module ++ */ ++ ++int vpbe_enable_window(vpbe_dm_win_info_t *); ++int vpbe_disable_window(vpbe_dm_win_info_t *); ++int vpbe_vid_osd_select_field_frame(u8 *, u8); ++int vpbe_bitmap_set_blend_factor(u8 *, vpbe_bitmap_blend_params_t *); ++int vpbe_bitmap_set_ram_clut(void); ++int vpbe_enable_disable_attribute_window(u32); ++int vpbe_get_blinking(u8 *, vpbe_blink_option_t *); ++int vpbe_set_blinking(u8 *, vpbe_blink_option_t *); ++int vpbe_set_vid_params(u8 *, vpbe_video_config_params_t *); ++int vpbe_get_vid_params(u8 *, vpbe_video_config_params_t *); ++int vpbe_bitmap_get_params(u8 *, vpbe_bitmap_config_params_t *); ++int vpbe_bitmap_set_params(u8 *, vpbe_bitmap_config_params_t *); ++int vpbe_set_cursor_params(struct fb_cursor *); ++int vpbe_set_vid_expansion(vpbe_win_expansion_t *); ++int vpbe_set_dclk(vpbe_dclk_t *); ++int vpbe_set_display_format(vpbe_display_format_t *); ++int vpbe_set_backg_color(vpbe_backg_color_t *); ++int vpbe_set_interface(u8); ++int vpbe_query_mode(vpbe_mode_info_t *); ++int vpbe_set_mode(struct vpbe_fb_videomode *); ++int vpbe_set_venc_clk_source(u8); ++void set_vid0_default_conf(void); ++void set_osd0_default_conf(void); ++void set_vid1_default_conf(void); ++void set_osd1_default_conf(void); ++void set_cursor_default_conf(void); ++void set_dm_default_conf(void); ++/* ++ * Function definations for 'venc' module ++ */ ++ ++void davincifb_ntsc_composite_config(void); ++void davincifb_ntsc_svideo_config(void); ++void davincifb_ntsc_component_config(void); ++void davincifb_pal_composite_config(void); ++void davincifb_pal_svideo_config(void); ++void davincifb_pal_component_config(void); ++ ++void vpbe_davincifb_ntsc_rgb_config(void); ++void vpbe_davincifb_pal_rgb_config(void); ++void vpbe_davincifb_525p_component_config(void); ++void vpbe_davincifb_625p_component_config(void); ++ ++void vpbe_enable_venc(int); ++void vpbe_enable_dacs(int); ++/* ++ * Function definations for 'dlcd' module ++ */ ++void vpbe_davincifb_480p_prgb_config(void); ++void vpbe_davincifb_400p_prgb_config(void); ++void vpbe_davincifb_350p_prgb_config(void); ++void vpbe_set_display_timing(struct vpbe_fb_videomode *); ++ ++void vpbe_enable_lcd(int); ++/* ++ * Following functions are not implemented ++ */ ++void vpbe_davincifb_default_ycc16_config(void); ++void vpbe_davincifb_default_ycc8_config(void); ++void vpbe_davincifb_default_srgb_config(void); ++void vpbe_davincifb_default_epson_config(void); ++void vpbe_davincifb_default_casio_config(void); ++void vpbe_davincifb_default_UDISP_config(void); ++void vpbe_davincifb_default_STN_config(void); ++#endif /*__KERNEL__*/ ++ ++#endif /* End of #ifndef DAVINCI_VPBE_H */ +diff -puNr -Naur directfb-1.6.3-orig/gfxdrivers/davinci/davinci_gfxdriver.h directfb-1.6.3/gfxdrivers/davinci/davinci_gfxdriver.h +--- directfb-1.6.3-orig/gfxdrivers/davinci/davinci_gfxdriver.h 1970-01-01 01:00:00.000000000 +0100 ++++ directfb-1.6.3/gfxdrivers/davinci/davinci_gfxdriver.h 2013-04-07 21:33:19.560662133 +0200 +@@ -0,0 +1,169 @@ ++/* ++ TI Davinci driver - Graphics Driver ++ ++ (c) Copyright 2007 Telio AG ++ ++ Written by Denis Oliver Kropp ++ ++ Code is derived from VMWare driver. ++ ++ (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) ++ (c) Copyright 2000-2004 Convergence (integrated media) GmbH ++ ++ All rights reserved. ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2 of the License, or (at your option) any later version. ++ ++ This library 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 ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the ++ Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. ++*/ ++ ++#ifndef __DAVINCI_GFXDRIVER_H__ ++#define __DAVINCI_GFXDRIVER_H__ ++ ++#include ++#include ++ ++#include ++ ++#include "davincifb.h" ++ ++#include "davinci_c64x.h" ++ ++ ++typedef struct { ++ /* validation flags */ ++ int v_flags; ++ ++ /* cached/computed values */ ++ void *dst_addr; ++ unsigned long dst_phys; ++ unsigned int dst_size; ++ unsigned long dst_pitch; ++ DFBSurfacePixelFormat dst_format; ++ unsigned long dst_bpp; ++ ++ void *src_addr; ++ unsigned long src_phys; ++ unsigned long src_pitch; ++ DFBSurfacePixelFormat src_format; ++ unsigned long src_bpp; ++ ++ unsigned long source_mult; ++ ++ unsigned long fillcolor; ++ ++ int blit_blend_sub_function; ++ int draw_blend_sub_function; ++ ++ DFBColor color; ++ unsigned long color_argb; ++ unsigned long colorkey; ++ ++ DFBSurfaceBlittingFlags blitting_flags; ++ ++ DFBRegion clip; ++ ++ /** Add shared data here... **/ ++ struct fb_fix_screeninfo fix[4]; ++ ++ CoreSurfacePool *osd_pool; ++ CoreSurfacePool *video_pool; ++ ++ bool synced; ++} DavinciDeviceData; ++ ++ ++typedef struct { ++ int num; ++ int fd; ++ void *mem; ++ int size; ++} DavinciFB; ++ ++typedef struct { ++ DavinciDeviceData *ddev; ++ ++ CoreDFB *core; ++ ++ CoreScreen *screen; ++ CoreLayer *osd; ++ CoreLayer *video; ++ ++ DavinciFB fb[4]; ++ ++ DavinciC64x c64x; ++ bool c64x_present; ++ ++ DavinciC64xTasks tasks; ++} DavinciDriverData; ++ ++ ++static inline DFBResult ++davincifb_pan_display( const DavinciFB *fb, ++ struct fb_var_screeninfo *var, ++ const CoreSurfaceBufferLock *lock, ++ DFBSurfaceFlipFlags flags, ++ int x, ++ int y ) ++{ ++ int ret; ++ ++ if (lock) { ++#ifdef FBIO_SET_START ++ CoreSurfaceBuffer *buffer = lock->buffer; ++ struct fb_set_start set_start; ++ ++ /* physical mode */ ++ set_start.offset = -1; ++ set_start.sync = (flags & DSFLIP_ONSYNC) ? 1 : 0; ++ ++ /* life's so easy */ ++ set_start.physical = lock->phys + DFB_BYTES_PER_LINE( buffer->format, x ) + y * lock->pitch; ++ ++ ret = ioctl( fb->fd, FBIO_SET_START, &set_start ); ++ if (ret < 0) ++ D_DEBUG( "FBIO_SET_START (0x%08lx, sync %llu) failed!\n", ++ set_start.physical, set_start.sync ); ++ ++ if (ret == 0) { ++ if (flags & DSFLIP_WAIT) ++ ioctl( fb->fd, FBIO_WAITFORVSYNC ); ++ ++ return DFB_OK; ++ } ++ ++ /* fallback */ ++#endif ++ var->xoffset = x; /* poor version */ ++ var->yoffset = y + lock->offset / lock->pitch; ++ } ++ else { ++ var->xoffset = x; ++ var->yoffset = y; ++ } ++ ++ var->activate = /*(flags & DSFLIP_ONSYNC) ? FB_ACTIVATE_VBL :*/ FB_ACTIVATE_NOW; ++ ++ ret = ioctl( fb->fd, FBIOPAN_DISPLAY, var ); ++ if (ret) ++ D_PERROR( "Davinci/FB: FBIOPAN_DISPLAY (fb%d - %d,%d) failed!\n", ++ fb->num, var->xoffset, var->yoffset ); ++ ++ if (flags & DSFLIP_WAIT) ++ ioctl( fb->fd, FBIO_WAITFORVSYNC ); ++ ++ return DFB_OK; ++} ++ ++#endif +diff -puNr -Naur directfb-1.6.3-orig/tests/voodoo/voodoo_test.h directfb-1.6.3/tests/voodoo/voodoo_test.h +--- directfb-1.6.3-orig/tests/voodoo/voodoo_test.h 1970-01-01 01:00:00.000000000 +0100 ++++ directfb-1.6.3/tests/voodoo/voodoo_test.h 2013-04-07 21:33:31.824408024 +0200 +@@ -0,0 +1,10 @@ ++#ifndef __VOODOO_TEST_H__ ++#define __VOODOO_TEST_H__ ++ ++typedef enum { ++ VOODOO_TEST_INCREASE, ++ VOODOO_TEST_QUERY ++} VoodooTestCall; ++ ++#endif ++ diff --git a/package/directfb/0002-imlib2-config.patch b/package/directfb/0002-imlib2-config.patch new file mode 100644 index 0000000000..ea2bf82049 --- /dev/null +++ b/package/directfb/0002-imlib2-config.patch @@ -0,0 +1,36 @@ +From 8352c434e515f19dd1ba36256bfcc3ec9480838d Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 5 Mar 2015 22:38:52 +0100 +Subject: [PATCH] imlib2 config + +Call the imlib2-conf variable that are set by ac_cv_path_IMLIB2_CONFIG +with the absolute path because the imlib2-config file is not covered +by the PATH variable. +This is important for cross compiler that need to get the staging settings +instead of the host settings. + +Signed-off-by: Carsten Schoenert +[ patch configure.in instead of configure to survive autoreconf ] +Signed-off-by: Peter Seiderer +--- + configure.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.in b/configure.in +index 38d7e78..fa5e87f 100644 +--- a/configure.in ++++ b/configure.in +@@ -1094,8 +1094,8 @@ if test "x$enable_imlib2" = "xyes"; then + AC_MSG_WARN([*** Imlib2 library not found, building without Imlib2 support ***]) + imlib2="no" + else +- IMLIB2_CFLAGS=`imlib2-config --cflags` +- IMLIB2_LIBS=`imlib2-config --libs` ++ IMLIB2_CFLAGS=`$IMLIB2_CONFIG --cflags` ++ IMLIB2_LIBS=`$IMLIB2_CONFIG --libs` + imlib2="yes" + fi + fi +-- +2.1.4 + diff --git a/package/directfb/0003-setregion-lock.patch b/package/directfb/0003-setregion-lock.patch new file mode 100644 index 0000000000..bec4234645 --- /dev/null +++ b/package/directfb/0003-setregion-lock.patch @@ -0,0 +1,99 @@ +This patch fixes builderrors while using '--with-gfxdrivers' and +'--with-inputdrivers' with the current DirectFB version 1.6.3. + +Patch is taken from +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/DirectFB/files/DirectFB-1.6.3-setregion.patch + +Signed-off-by: Carsten Schoenert + +Index: b/gfxdrivers/cyber5k/cyber5k.c +=================================================================== +--- a/gfxdrivers/cyber5k/cyber5k.c ++++ b/gfxdrivers/cyber5k/cyber5k.c +@@ -640,7 +640,8 @@ + CoreLayerRegionConfigFlags updated, + CoreSurface *surface, + CorePalette *palette, +- CoreSurfaceBufferLock *lock ) ++ CoreSurfaceBufferLock *left_lock, ++ CoreSurfaceBufferLock *right_lock ) + { + DFBResult ret; + +@@ -648,7 +649,7 @@ + ret = oldPrimaryFuncs.SetRegion( layer, oldPrimaryDriverData, + layer_data, region_data, + config, updated, surface, +- palette, lock ); ++ palette, left_lock, right_lock ); + if (ret) + return ret; + +Index: b/gfxdrivers/radeon/radeon_crtc1.c +=================================================================== +--- a/gfxdrivers/radeon/radeon_crtc1.c ++++ b/gfxdrivers/radeon/radeon_crtc1.c +@@ -147,14 +147,15 @@ + CoreLayerRegionConfigFlags updated, + CoreSurface *surface, + CorePalette *palette, +- CoreSurfaceBufferLock *lock ) ++ CoreSurfaceBufferLock *left_lock, ++ CoreSurfaceBufferLock *right_lock ) + { + + if (updated & ~CLRCF_OPTIONS) { + return OldPrimaryLayerFuncs.SetRegion( layer, + OldPrimaryLayerDriverData, + layer_data, region_data, +- config, updated, surface, palette, lock ); ++ config, updated, surface, palette, left_lock, right_lock ); + } + + return DFB_OK; +Index: b/gfxdrivers/cle266/uc_primary.c +=================================================================== +--- a/gfxdrivers/cle266/uc_primary.c ++++ b/gfxdrivers/cle266/uc_primary.c +@@ -142,7 +142,8 @@ + CoreLayerRegionConfigFlags updated, + CoreSurface *surface, + CorePalette *palette, +- CoreSurfaceBufferLock *lock ) ++ CoreSurfaceBufferLock *left_lock, ++ CoreSurfaceBufferLock *right_lock ) + { + DFBResult ret; + UcDriverData *ucdrv = (UcDriverData*) driver_data; +@@ -151,7 +152,7 @@ + ret = ucOldPrimaryFuncs.SetRegion( layer, ucOldPrimaryDriverData, + layer_data, region_data, + config, updated, surface, +- palette, lock ); ++ palette, left_lock, right_lock ); + if (ret) + return ret; + +Index: b/gfxdrivers/unichrome/uc_primary.c +=================================================================== +--- a/gfxdrivers/unichrome/uc_primary.c ++++ b/gfxdrivers/unichrome/uc_primary.c +@@ -139,7 +139,8 @@ + CoreLayerRegionConfigFlags updated, + CoreSurface *surface, + CorePalette *palette, +- CoreSurfaceBufferLock *lock ) ++ CoreSurfaceBufferLock *left_lock, ++ CoreSurfaceBufferLock *right_lock ) + { + DFBResult ret; + UcDriverData *ucdrv = (UcDriverData*) driver_data; +@@ -148,7 +149,7 @@ + ret = ucOldPrimaryFuncs.SetRegion( layer, ucOldPrimaryDriverData, + layer_data, region_data, + config, updated, surface, +- palette, lock ); ++ palette, left_lock, right_lock ); + if (ret) + return ret; + diff --git a/package/directfb/0004-use-gcc-link.patch b/package/directfb/0004-use-gcc-link.patch new file mode 100644 index 0000000000..ec6c0ea501 --- /dev/null +++ b/package/directfb/0004-use-gcc-link.patch @@ -0,0 +1,35 @@ +Add patch to use 'gcc' instead of 'ld' for linking + +The patch has been sent upstream but it has not been merged yet + +Signed-off-by: Markos Chandras + +From 176ce06b40897a357fe76a558af517197325f188 Mon Sep 17 00:00:00 2001 +From: Markos Chandras +Date: Wed, 28 Aug 2013 10:56:32 +0100 +Subject: [PATCH] rules/libobject.make: Use gcc for linking + +Invoking 'ld' directly may miss some necessary linker flags which +are usually passed by gcc. Therefore, use gcc for linking. + +Signed-off-by: Markos Chandras +--- + rules/libobject.make | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rules/libobject.make b/rules/libobject.make +index bc670da..2cba658 100644 +--- a/rules/libobject.make ++++ b/rules/libobject.make +@@ -3,7 +3,7 @@ + if test -d $<.tmp; then rmdir $<.tmp; fi + mkdir $<.tmp + (cd $<.tmp && $(AR) x ../../$<) +- $(LD) -o $@ -r $<.tmp/*.o ++ $(CC) -nostdlib -o $@ -r $<.tmp/*.o + rm -f $<.tmp/*.o && rmdir $<.tmp + + .PHONY: $(LTLIBRARIES:%.la=.libs/%.a) +-- +1.8.3.2 + diff --git a/package/directfb/0005-add-missing-idivine-header.patch b/package/directfb/0005-add-missing-idivine-header.patch new file mode 100644 index 0000000000..7823eb76e7 --- /dev/null +++ b/package/directfb/0005-add-missing-idivine-header.patch @@ -0,0 +1,65 @@ +Add idivine.h, which is missing from DirectFB tarballs + +The idivine.h file was taken from the DirectFB Git repository. + +Signed-off-by: Thomas Petazzoni + +Index: b/lib/divine/idivine.h +=================================================================== +--- /dev/null ++++ b/lib/divine/idivine.h +@@ -0,0 +1,54 @@ ++/* ++ (c) Copyright 2012-2013 DirectFB integrated media GmbH ++ (c) Copyright 2001-2013 The world wide DirectFB Open Source Community (directfb.org) ++ (c) Copyright 2000-2004 Convergence (integrated media) GmbH ++ ++ All rights reserved. ++ ++ Written by Denis Oliver Kropp , ++ Andreas Shimokawa , ++ Marek Pikarski , ++ Sven Neumann , ++ Ville Syrjälä and ++ Claudio Ciccani . ++ ++ This library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2 of the License, or (at your option) any later version. ++ ++ This library 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 ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with this library; if not, write to the ++ Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. ++*/ ++ ++ ++ ++#ifndef __IDIVINE_H__ ++#define __IDIVINE_H__ ++ ++#include ++ ++/* ++ * private data struct of IDiVine ++ */ ++typedef struct { ++ int ref; /* reference counter */ ++ ++ DiVine *divine; ++} IDiVine_data; ++ ++/* ++ * IDiVine constructor/destructor ++ */ ++DFBResult IDiVine_Construct( IDiVine *thiz ); ++ ++void IDiVine_Destruct ( IDiVine *thiz ); ++ ++#endif diff --git a/package/directfb/Config.in b/package/directfb/Config.in new file mode 100644 index 0000000000..2aed63f1e8 --- /dev/null +++ b/package/directfb/Config.in @@ -0,0 +1,167 @@ +config BR2_PACKAGE_DIRECTFB + bool "directfb" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + depends on !BR2_TOOLCHAIN_USES_MUSL # sigval_t issue + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_ZLIB + help + DirectFB (Direct Frame Buffer) is a set of graphics APIs implemented + on top of the Linux Frame Buffer (fbdev) abstraction layer. It is an + alternative to X11 with a smaller memory footprint that still has an + integrated windowing system. As of 4 October 2015, DirectFB's website + http://www.directfb.org/ is down. See alternative site listed below. + + http://elinux.org/DirectFB + +if BR2_PACKAGE_DIRECTFB + +config BR2_PACKAGE_DIRECTFB_MULTI + bool "directfb multi application" + select BR2_PACKAGE_LINUX_FUSION + depends on BR2_USE_MMU # madvise() + depends on BR2_LINUX_KERNEL + help + Enable use of multiple concurrent DirectFB applications + +comment "directfb multi application needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_DIRECTFB_DEBUG_SUPPORT + bool "directfb debugging support" + default y + help + Compile DirectFB with debugging support. It provides + functions to print debug information, for DirectFB as well as + external DirectFB drivers. + + When disabled, DirectFB does not print any debug information. + The drivers will be installed to and loaded from + /usr/lib/directfb--pure instead of + /usr/lib/directfb-. + +config BR2_PACKAGE_DIRECTFB_DEBUG + bool "directfb debugging" + depends on BR2_PACKAGE_DIRECTFB_DEBUG_SUPPORT + help + Compile DirectFB with lots of debug output + +config BR2_PACKAGE_DIRECTFB_TRACE + bool "directfb call trace support" + help + Enable call tracing for DirectFB applications + +config BR2_PACKAGE_DIRECTFB_DIVINE + bool "divine" + help + Enable the DiVine feature (virtual input) + +config BR2_PACKAGE_DIRECTFB_SAWMAN + bool "sawman" + help + Enable the SawMan feature (window manager) + +config BR2_PACKAGE_DIRECTFB_ATI128 + bool "compile ati128 graphics driver" + depends on BR2_i386 || BR2_x86_64 + +config BR2_PACKAGE_DIRECTFB_MATROX + bool "compile matrox graphics driver" + depends on BR2_i386 || BR2_x86_64 + +config BR2_PACKAGE_DIRECTFB_PXA3XX + bool "compile pxa3xx graphics driver" + depends on BR2_arm + help + The Marvell PXA3xx Processor Family is a system-on-chip based + on XScale® microarchitecture. This option enables the graphic + driver support for the PXA3xx processor family. + + http://www.marvell.com/application-processors/pxa-family/ + +config BR2_PACKAGE_DIRECTFB_EP9X + bool "compile ep9x graphics driver" + depends on BR2_arm + help + Enable the graphic driver support for the EP93xx ARMv9 based + processors from Cirrus Logic. + + http://cirrus.com/en/products/arm9.html + +config BR2_PACKAGE_DIRECTFB_I830 + bool "compile i830 graphics driver" + depends on BR2_i386 || BR2_x86_64 + +config BR2_PACKAGE_DIRECTFB_LINUXINPUT + bool "compile /dev/input/eventX input driver" + default y + +config BR2_PACKAGE_DIRECTFB_KEYBOARD + bool "compile keyboard input driver" + default y + +config BR2_PACKAGE_DIRECTFB_PS2MOUSE + bool "compile PS2 mouse input driver" + default y + +config BR2_PACKAGE_DIRECTFB_SERIALMOUSE + bool "compile serial mouse input driver" + default y + +config BR2_PACKAGE_DIRECTFB_TSLIB + bool "enable touchscreen support" + depends on !BR2_STATIC_LIBS # tslib + default y + select BR2_PACKAGE_TSLIB + +comment "touchscreen support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_DIRECTFB_GIF + bool "enable GIF support" + default y + +config BR2_PACKAGE_DIRECTFB_TIFF + bool "enable TIFF support" + select BR2_PACKAGE_TIFF + +config BR2_PACKAGE_DIRECTFB_IMLIB2 + bool "enable IMLIB2 support" + select BR2_PACKAGE_IMLIB2 + depends on !BR2_STATIC_LIBS + +comment "imlib2 support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_DIRECTFB_JPEG + bool "enable JPEG support" + default y + select BR2_PACKAGE_JPEG + +config BR2_PACKAGE_DIRECTFB_PNG + bool "enable PNG support" + default y + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_DIRECTFB_SVG + bool "enable SVG support" + default y + select BR2_PACKAGE_LIBSVG_CAIRO + +config BR2_PACKAGE_DIRECTFB_DITHER_RGB16 + bool "enable advanced dithering of RGB16 surfaces" + help + Enable dithering when loading images to RGB16 surfaces. + This increases the data section by 64 KBytes. + +config BR2_PACKAGE_DIRECTFB_TESTS + bool "build directfb tests" + +endif # BR2_PACKAGE_DIRECTFB + +comment "directfb needs a (e)glibc or uClibc toolchain w/ C++, threads, gcc >= 4.5" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 || BR2_TOOLCHAIN_USES_MUSL diff --git a/package/directfb/directfb.hash b/package/directfb/directfb.hash new file mode 100644 index 0000000000..069d8c3f1d --- /dev/null +++ b/package/directfb/directfb.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 b785c638dc31b8fe3a7c81be1475c89b2255ab3d67b777c747d3fbc52f8027a3 DirectFB-1.7.7.tar.gz diff --git a/package/directfb/directfb.mk b/package/directfb/directfb.mk new file mode 100644 index 0000000000..d51094f850 --- /dev/null +++ b/package/directfb/directfb.mk @@ -0,0 +1,173 @@ +################################################################################ +# +# directfb +# +################################################################################ + +DIRECTFB_VERSION_MAJOR = 1.7 +DIRECTFB_VERSION = $(DIRECTFB_VERSION_MAJOR).7 +DIRECTFB_SITE = http://www.directfb.org/downloads/Core/DirectFB-$(DIRECTFB_VERSION_MAJOR) +DIRECTFB_SOURCE = DirectFB-$(DIRECTFB_VERSION).tar.gz +DIRECTFB_LICENSE = LGPLv2.1+ +DIRECTFB_LICENSE_FILES = COPYING +DIRECTFB_INSTALL_STAGING = YES +DIRECTFB_AUTORECONF = YES + +DIRECTFB_CONF_OPTS = \ + --enable-zlib \ + --enable-freetype \ + --enable-fbdev \ + --disable-sdl \ + --disable-vnc \ + --disable-osx \ + --disable-video4linux \ + --disable-video4linux2 \ + --without-tools \ + --disable-x11 + +ifeq ($(BR2_STATIC_LIBS),y) +DIRECTFB_CONF_OPTS += --disable-dynload +endif + +DIRECTFB_CONFIG_SCRIPTS = directfb-config + +DIRECTFB_DEPENDENCIES = freetype zlib + +ifeq ($(BR2_PACKAGE_DIRECTFB_MULTI),y) +DIRECTFB_CONF_OPTS += --enable-multi --enable-multi-kernel +DIRECTFB_DEPENDENCIES += linux-fusion +else +DIRECTFB_CONF_OPTS += --disable-multi --disable-multi-kernel +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_DEBUG_SUPPORT),y) +DIRECTFB_CONF_OPTS += --enable-debug-support +ifeq ($(BR2_PACKAGE_DIRECTFB_DEBUG),y) +DIRECTFB_CONF_OPTS += --enable-debug +endif +else +DIRECTFB_CONF_OPTS += --disable-debug-support +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_TRACE),y) +DIRECTFB_CONF_OPTS += --enable-trace +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_DIVINE),y) +DIRECTFB_CONF_OPTS += --enable-divine +else +DIRECTFB_CONF_OPTS += --disable-divine +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_SAWMAN),y) +DIRECTFB_CONF_OPTS += --enable-sawman +else +DIRECTFB_CONF_OPTS += --disable-sawman +endif + +DIRECTFB_GFX = \ + $(if $(BR2_PACKAGE_DIRECTFB_ATI128),ati128) \ + $(if $(BR2_PACKAGE_DIRECTFB_CYBER5K),cyber5k) \ + $(if $(BR2_PACKAGE_DIRECTFB_MATROX),matrox) \ + $(if $(BR2_PACKAGE_DIRECTFB_PXA3XX),pxa3xx) \ + $(if $(BR2_PACKAGE_DIRECTFB_I830),i830) \ + $(if $(BR2_PACKAGE_DIRECTFB_EP9X),ep9x) + +ifeq ($(strip $(DIRECTFB_GFX)),) +DIRECTFB_CONF_OPTS += --with-gfxdrivers=none +else +DIRECTFB_CONF_OPTS += \ + --with-gfxdrivers=$(subst $(space),$(comma),$(strip $(DIRECTFB_GFX))) +endif + +DIRECTFB_INPUT = \ + $(if $(BR2_PACKAGE_DIRECTFB_LINUXINPUT),linuxinput) \ + $(if $(BR2_PACKAGE_DIRECTFB_KEYBOARD),keyboard) \ + $(if $(BR2_PACKAGE_DIRECTFB_PS2MOUSE),ps2mouse) \ + $(if $(BR2_PACKAGE_DIRECTFB_SERIALMOUSE),serialmouse) \ + $(if $(BR2_PACKAGE_DIRECTFB_TSLIB),tslib) + +ifeq ($(BR2_PACKAGE_DIRECTFB_TSLIB),y) +DIRECTFB_DEPENDENCIES += tslib +endif + +ifeq ($(strip $(DIRECTFB_INPUT)),) +DIRECTFB_CONF_OPTS += --with-inputdrivers=none +else +DIRECTFB_CONF_OPTS += \ + --with-inputdrivers=$(subst $(space),$(comma),$(strip $(DIRECTFB_INPUT))) +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_GIF),y) +DIRECTFB_CONF_OPTS += --enable-gif +else +DIRECTFB_CONF_OPTS += --disable-gif +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_TIFF),y) +DIRECTFB_CONF_OPTS += --enable-tiff +DIRECTFB_DEPENDENCIES += tiff +else +DIRECTFB_CONF_OPTS += --disable-tiff +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_PNG),y) +DIRECTFB_CONF_OPTS += --enable-png +DIRECTFB_DEPENDENCIES += libpng +DIRECTFB_CONF_ENV += ac_cv_path_LIBPNG_CONFIG=$(STAGING_DIR)/usr/bin/libpng-config +else +DIRECTFB_CONF_OPTS += --disable-png +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_JPEG),y) +DIRECTFB_CONF_OPTS += --enable-jpeg +DIRECTFB_DEPENDENCIES += jpeg +else +DIRECTFB_CONF_OPTS += --disable-jpeg +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_SVG),y) +DIRECTFB_CONF_OPTS += --enable-svg +# needs some help to find cairo includes +DIRECTFB_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -I$(STAGING_DIR)/usr/include/cairo" +DIRECTFB_DEPENDENCIES += libsvg-cairo +else +DIRECTFB_CONF_OPTS += --disable-svg +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_IMLIB2),y) +DIRECTFB_CONF_OPTS += --enable-imlib2 +DIRECTFB_DEPENDENCIES += imlib2 +DIRECTFB_CONF_ENV += ac_cv_path_IMLIB2_CONFIG=$(STAGING_DIR)/usr/bin/imlib2-config +else +DIRECTFB_CONF_OPTS += --disable-imlib2 +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_DITHER_RGB16),y) +DIRECTFB_CONF_OPTS += --with-dither-rgb16=advanced +else +DIRECTFB_CONF_OPTS += --with-dither-rgb16=none +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB_TESTS),y) +DIRECTFB_CONF_OPTS += --with-tests +endif + +HOST_DIRECTFB_DEPENDENCIES = host-pkgconf host-libpng +HOST_DIRECTFB_CONF_OPTS = \ + --disable-multi \ + --enable-png \ + --with-gfxdrivers=none \ + --with-inputdrivers=none + +HOST_DIRECTFB_BUILD_CMDS = \ + $(MAKE) -C $(@D)/tools directfb-csource + +HOST_DIRECTFB_INSTALL_CMDS = \ + $(INSTALL) -m 0755 $(@D)/tools/directfb-csource $(HOST_DIR)/usr/bin + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +# directfb-csource for the host +DIRECTFB_HOST_BINARY = $(HOST_DIR)/usr/bin/directfb-csource diff --git a/package/dmalloc/0001-add-fpic.patch b/package/dmalloc/0001-add-fpic.patch new file mode 100644 index 0000000000..230a9e15f1 --- /dev/null +++ b/package/dmalloc/0001-add-fpic.patch @@ -0,0 +1,58 @@ +Without -fPIC, dmalloc does not build with: + +/home/test/mips-4.4/bin/mips-linux-gnu-ld --sysroot=/home/test/outputs/test-35/staging -shared --whole-archive -soname libdmallocxx.so -o libdmallocxx.so.t libdmallocxx.a +/home/test/mips-4.4/bin/mips-linux-gnu-ld: libdmalloc.a(arg_check.o): relocation R_MIPS_HI16 against `_dmalloc_flags' can not be used when making a shared object; recompile with -fPIC +libdmalloc.a(arg_check.o): could not read symbols: Bad value + +This patch, taken from +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/dmalloc/files/dmalloc-5.2.4-fpic.patch?hideattic=0&view=markup, +fixes the problem by passing the -fPIC flag. It isn't passed through +the ./configure environment in order to not clutter the configuration +cache with incorrect values. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.in | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +--- a/Makefile.in ++++ b/Makefile.in +@@ -318,17 +318,17 @@ + # special _th versions of objects with the LOCK_THREADS variable defined to 1 + chunk_th.o : $(srcdir)/chunk.c + rm -f $@ +- $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -DLOCK_THREADS=1 \ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -DLOCK_THREADS=1 \ + -c $(srcdir)/chunk.c -o ./$@ + + error_th.o : $(srcdir)/error.c + rm -f $@ +- $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -DLOCK_THREADS=1 \ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -DLOCK_THREADS=1 \ + -c $(srcdir)/error.c -o ./$@ + + malloc_th.o : $(srcdir)/malloc.c + rm -f $@ +- $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -DLOCK_THREADS=1 \ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -DLOCK_THREADS=1 \ + -c $(srcdir)/malloc.c -o ./$@ + + tests : $(TEST) $(TEST_FC) +@@ -360,7 +360,7 @@ + + .c.o : + rm -f $@ +- $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ ++ $(CC) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $< -o ./$@ + + # + # .cc.o auto-target doesn't work on some systems. +@@ -368,7 +368,7 @@ + # + dmallocc.o : $(srcdir)/dmallocc.cc + rm -f $@ +- $(CXX) $(CFLAGS) $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \ ++ $(CXX) $(CFLAGS) -fPIC $(CPPFLAGS) $(DEFS) $(INCS) -c $(srcdir)/dmallocc.cc \ + -o ./$@ + + # diff --git a/package/dmalloc/0002-mips.patch b/package/dmalloc/0002-mips.patch new file mode 100644 index 0000000000..3e6b00e361 --- /dev/null +++ b/package/dmalloc/0002-mips.patch @@ -0,0 +1,43 @@ +--- a/configure ++++ b/configure +@@ -7107,7 +7107,7 @@ + echo $ECHO_N "checking return.h macros work... $ECHO_C" >&6 + if test "$cross_compiling" = yes; then + cat >>confdefs.h <<\_ACEOF +-#define RETURN_MACROS_WORK 0 ++#define RETURN_MACROS_WORK 1 + _ACEOF + echo "$as_me:$LINENO: result: no" >&5 + echo "${ECHO_T}no" >&6 +--- a/return.h ++++ b/return.h +@@ -106,26 +106,16 @@ + /*************************************/ + + /* +- * For DEC Mips machines running Ultrix ++ * For Mips machines running Linux + */ + #if __mips + + /* +- * I have no idea how to get inline assembly with the default cc. +- * Anyone know how? +- */ +- +-#if 0 +- +-/* + * NOTE: we assume here that file is global. + * +- * $31 is the frame pointer. $2 looks to be the return address but maybe +- * not consistently. ++ * $31 is the return address. + */ +-#define GET_RET_ADDR(file) asm("sw $2, file") +- +-#endif ++#define GET_RET_ADDR(file) asm("sw $31, %0" : "=m" (file)) + + #endif /* __mips */ + diff --git a/package/dmalloc/0003-fix-parallel-build.patch b/package/dmalloc/0003-fix-parallel-build.patch new file mode 100644 index 0000000000..c521a114bb --- /dev/null +++ b/package/dmalloc/0003-fix-parallel-build.patch @@ -0,0 +1,18 @@ +Fix parallel build issue + +Missing dmallocc.o <- dmalloc.h dependency may break parallel builds. +dmalloc.h is generated,and may not be around by the time gcc starts +parsing dmallocc.cc. + +Signed-off-by: Alex Suykov + +--- a/Makefile.in ++++ b/Makefile.in +@@ -401,6 +401,7 @@ + compat.o: compat.c conf.h settings.h dmalloc.h compat.h dmalloc_loc.h + dmalloc.o: dmalloc.c conf.h settings.h dmalloc_argv.h dmalloc.h compat.h \ + debug_tok.h dmalloc_loc.h env.h error_val.h version.h ++dmallocc.o: dmallocc.cc dmalloc.h return.h conf.h settings.h + dmalloc_argv.o: dmalloc_argv.c conf.h settings.h dmalloc_argv.h \ + dmalloc_argv_loc.h compat.h + dmalloc_fc_t.o: dmalloc_fc_t.c conf.h settings.h dmalloc.h dmalloc_argv.h \ diff --git a/package/dmalloc/0004-fix-shlibs.patch b/package/dmalloc/0004-fix-shlibs.patch new file mode 100644 index 0000000000..a99d926daf --- /dev/null +++ b/package/dmalloc/0004-fix-shlibs.patch @@ -0,0 +1,46 @@ +Fix shared library rules + +dmalloc uses ld -shared --whole-archive -o lib.so lib.a, +but for some reason lists regular objects in addition +to the archive, ending up with two copies of each symbol. + +Signed-off-by: Alex Suykov + +--- a/Makefile.in ++++ b/Makefile.in +@@ -257,7 +257,7 @@ shlib : $(BUILD_SL) + # via: http://256.com/gray/email.html + $(LIB_SL) : $(LIBRARY) + rm -f $@ $@.t +- @shlinkargs@ $(LIBRARY) $(OBJS) $(NORMAL_OBJS) ++ @shlinkargs@ $(LIBRARY) + mv $@.t $@ + + $(LIBRARY) : $(OBJS) $(NORMAL_OBJS) +@@ -270,7 +270,7 @@ $(LIB_TH) : $(OBJS) $(THREAD_OBJS) + + $(LIB_TH_SL) : $(LIB_TH) + rm -f $@ $@.t +- @shlinkargs@ $(LIB_TH) $(OBJS) $(THREAD_OBJS) ++ @shlinkargs@ $(LIB_TH) + mv $@.t $@ + + $(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS) +@@ -279,7 +279,7 @@ $(LIB_CXX) : $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS) + + $(LIB_CXX_SL) : $(LIB_CXX) + rm -f $@ $@.t +- @shlinkargs@ $(LIB_CXX) $(OBJS) $(NORMAL_OBJS) $(CXX_OBJS) ++ @shlinkargs@ $(LIB_CXX) + mv $@.t $@ + + $(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS) +@@ -288,7 +288,7 @@ $(LIB_TH_CXX) : $(OBJS) $(THREAD_OBJS) $(CXX_OBJS) + + $(LIB_TH_CXX_SL) : $(LIB_TH_CXX) + rm -f $@ $@.t +- @shlinkargs@ $(LIB_TH_CXX) $(OBJS) $(THREAD_OBJS) $(CXX_OBJS) ++ @shlinkargs@ $(LIB_TH_CXX) + mv $@.t $@ + + threadssl : $(LIB_TH_SL) diff --git a/package/dmalloc/Config.in b/package/dmalloc/Config.in new file mode 100644 index 0000000000..03d9f975f3 --- /dev/null +++ b/package/dmalloc/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_DMALLOC + bool "dmalloc" + # On some packages, Microblaze gcc has issues when debugging + # symbols are enabled: "Error: operation combines symbols in + # different segments". + depends on !(BR2_microblaze && BR2_ENABLE_DEBUG) + help + A debug memory allocation library which is a drop in replacement for + the system's malloc, realloc, calloc, free and other memory management + routines while providing powerful debugging facilities configurable at + runtime. + + http://dmalloc.com/ diff --git a/package/dmalloc/dmalloc.hash b/package/dmalloc/dmalloc.hash new file mode 100644 index 0000000000..e74ef741b9 --- /dev/null +++ b/package/dmalloc/dmalloc.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 d3be5c6eec24950cb3bd67dbfbcdf036f1278fae5fd78655ef8cdf9e911e428a dmalloc-5.5.2.tgz diff --git a/package/dmalloc/dmalloc.mk b/package/dmalloc/dmalloc.mk new file mode 100644 index 0000000000..f87ae1709a --- /dev/null +++ b/package/dmalloc/dmalloc.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# dmalloc +# +################################################################################ + +DMALLOC_VERSION = 5.5.2 +DMALLOC_SOURCE = dmalloc-$(DMALLOC_VERSION).tgz +DMALLOC_SITE = http://dmalloc.com/releases + +DMALLOC_LICENSE = MIT-like +# license is in each file, dmalloc.h.1 is the smallest one +DMALLOC_LICENSE_FILES = dmalloc.h.1 + +DMALLOC_INSTALL_STAGING = YES +DMALLOC_CONF_OPTS = --enable-shlib +DMALLOC_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +DMALLOC_CONF_OPTS += --enable-cxx +else +DMALLOC_CONF_OPTS += --disable-cxx +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +DMALLOC_CONF_OPTS += --enable-threads +else +DMALLOC_CONF_OPTS += --disable-threads +endif + +# dmalloc has some assembly function that are not present in thumb1 mode: +# Error: lo register required -- `str lr,[sp,#4]' +# so, we desactivate thumb mode +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) +DMALLOC_CFLAGS += -marm +endif + +DMALLOC_CONF_ENV = CFLAGS="$(DMALLOC_CFLAGS)" + +define DMALLOC_POST_PATCH + $(SED) 's/^ac_cv_page_size=0$$/ac_cv_page_size=12/' $(@D)/configure + $(SED) 's/(ld -/($${LD-ld} -/' $(@D)/configure + $(SED) 's/'\''ld -/"$${LD-ld}"'\'' -/' $(@D)/configure + $(SED) 's/ar cr/$$(AR) cr/' $(@D)/Makefile.in +endef + +DMALLOC_POST_PATCH_HOOKS += DMALLOC_POST_PATCH + +# both DESTDIR and PREFIX are ignored.. +define DMALLOC_INSTALL_STAGING_CMDS + $(MAKE) includedir="$(STAGING_DIR)/usr/include" \ + bindir="$(STAGING_DIR)/usr/bin" \ + libdir="$(STAGING_DIR)/usr/lib" \ + shlibdir="$(STAGING_DIR)/usr/lib" \ + infodir="$(STAGING_DIR)/usr/share/info/" \ + -C $(@D) install +endef + +define DMALLOC_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libdmalloc*.so $(TARGET_DIR)/usr/lib + cp -dpf $(STAGING_DIR)/usr/bin/dmalloc $(TARGET_DIR)/usr/bin/dmalloc +endef + +$(eval $(autotools-package)) diff --git a/package/dmidecode/0001-build-system-fixes.patch b/package/dmidecode/0001-build-system-fixes.patch new file mode 100644 index 0000000000..275f9df7f1 --- /dev/null +++ b/package/dmidecode/0001-build-system-fixes.patch @@ -0,0 +1,35 @@ +Minor build system fixes + +Usual build system fixes to allow CC/CFLAGS/LDFLAGS to be overriden +from the command line, and completed by additional flags from the +Makefile. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -12,9 +12,10 @@ + # (at your option) any later version. + # + +-CC = gcc +-CFLAGS = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \ +- -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef ++CC ?= gcc ++override CFLAGS += \ ++ -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \ ++ -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef + #CFLAGS += -DBIGENDIAN + #CFLAGS += -DALIGNMENT_WORKAROUND + +@@ -23,7 +24,7 @@ + #CFLAGS += -g + + # Pass linker flags here +-LDFLAGS = ++override LDFLAGS += + + DESTDIR = + prefix = /usr/local diff --git a/package/dmidecode/Config.in b/package/dmidecode/Config.in new file mode 100644 index 0000000000..22272ed294 --- /dev/null +++ b/package/dmidecode/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_DMIDECODE + bool "dmidecode" + depends on BR2_i386 || BR2_x86_64 + help + Dmidecode reports information about your system's hardware + as described in your system BIOS according to the SMBIOS/DMI + standard. + + http://www.nongnu.org/dmidecode/ diff --git a/package/dmidecode/dmidecode.hash b/package/dmidecode/dmidecode.hash new file mode 100644 index 0000000000..7098ed0ace --- /dev/null +++ b/package/dmidecode/dmidecode.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 5a8214b99c1762f4510bd92baa279336e5fed6e5cd2e418d46d95a4ecc783922 dmidecode-2.12.tar.gz diff --git a/package/dmidecode/dmidecode.mk b/package/dmidecode/dmidecode.mk new file mode 100644 index 0000000000..06ac19bda2 --- /dev/null +++ b/package/dmidecode/dmidecode.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# dmidecode +# +################################################################################ + +DMIDECODE_VERSION = 2.12 +DMIDECODE_SITE = http://download.savannah.gnu.org/releases/dmidecode +DMIDECODE_LICENSE = GPLv2+ +DMIDECODE_LICENSE_FILES = LICENSE + +define DMIDECODE_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define DMIDECODE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) prefix=/usr DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/dmraid/0001-fix-compilation-under-musl.patch b/package/dmraid/0001-fix-compilation-under-musl.patch new file mode 100644 index 0000000000..7cf8792862 --- /dev/null +++ b/package/dmraid/0001-fix-compilation-under-musl.patch @@ -0,0 +1,47 @@ +From 89c7fc15e064dd407e6d5ccefe78985b86b8a036 Mon Sep 17 00:00:00 2001 +From: Brendan Heading +Date: Tue, 1 Sep 2015 12:26:36 +0100 +Subject: [PATCH 1/1] fix compilation under musl + +Patch borrowed from Void Linux : + +https://github.com/voidlinux/void-packages/blob/master/srcpkgs/dmraid/patches/25_musl-libc.patch + +Upstream package appears dormant, no mailing list and no +maintainence releases since Nov 2010. + +Upstream-Status: dormant +Signed-off-by: Brendan Heading + +--- + 1.0.0.rc16-3/dmraid/include/dmraid/misc.h | 1 + + 1.0.0.rc16-3/dmraid/lib/device/scan.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/1.0.0.rc16-3/dmraid/include/dmraid/misc.h b/1.0.0.rc16-3/dmraid/include/dmraid/misc.h +index 247a68e..1b1dfdf 100644 +--- a/1.0.0.rc16-3/dmraid/include/dmraid/misc.h ++++ b/1.0.0.rc16-3/dmraid/include/dmraid/misc.h +@@ -10,6 +10,7 @@ + + #ifndef _MISC_H_ + #define _MISC_H_ ++#include + + #define DM_ASSERT(__cond) do { if (!(__cond)) { printf("ASSERT file:%s line:%d fuction:%s cond: %s\n", __FILE__, __LINE__, __FUNCTION__, #__cond); } } while(0); + +diff --git a/1.0.0.rc16-3/dmraid/lib/device/scan.c b/1.0.0.rc16-3/dmraid/lib/device/scan.c +index a040d53..6897146 100644 +--- a/1.0.0.rc16-3/dmraid/lib/device/scan.c ++++ b/1.0.0.rc16-3/dmraid/lib/device/scan.c +@@ -10,6 +10,7 @@ + # include + # include + #else ++# include + # include + # include + #endif +-- +2.4.3 + diff --git a/package/dmraid/Config.in b/package/dmraid/Config.in new file mode 100644 index 0000000000..4a8cf61686 --- /dev/null +++ b/package/dmraid/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_DMRAID + bool "dmraid" + depends on BR2_TOOLCHAIN_HAS_THREADS # lvm2 + depends on BR2_USE_MMU # lvm2 + depends on !BR2_STATIC_LIBS # lvm2 + select BR2_PACKAGE_LVM2 + help + dmraid discovers, activates, deactivates and displays properties + of software RAID sets (eg, ATARAID) and contained DOS partitions. + + dmraid uses the Linux device-mapper to create devices with + respective mappings for the ATARAID sets discovered. + +comment "dmraid needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/dmraid/S20dmraid b/package/dmraid/S20dmraid new file mode 100644 index 0000000000..fd2ad9e845 --- /dev/null +++ b/package/dmraid/S20dmraid @@ -0,0 +1,31 @@ +#!/bin/sh + +set -e + +[ -x /usr/sbin/dmraid ] || exit 0 + +# try to load module in case that hasn't been done yet +modprobe dm-mod >/dev/null 2>&1 + +case "$1" in + start|"") + echo "Setting up DMRAID devices..." + /usr/sbin/dmraid --activate yes --ignorelocking --verbose + ;; + + stop) + echo "Shutting down DMRAID devices... " + /usr/sbin/dmraid --activate no --ignorelocking --verbose + ;; + + restart|force-reload) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "Usage: dmraid {start|stop|restart|force-reload}" + exit 1 + ;; +esac diff --git a/package/dmraid/dmraid.hash b/package/dmraid/dmraid.hash new file mode 100644 index 0000000000..31669218e8 --- /dev/null +++ b/package/dmraid/dmraid.hash @@ -0,0 +1,2 @@ +# From http://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-1.0.0.rc16-3.tar.bz2.md5.sum +md5 819338fcef98e8e25819f0516722beeb dmraid-1.0.0.rc16-3.tar.bz2 diff --git a/package/dmraid/dmraid.mk b/package/dmraid/dmraid.mk new file mode 100644 index 0000000000..fbb23871fc --- /dev/null +++ b/package/dmraid/dmraid.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# dmraid +# +################################################################################ + +DMRAID_VERSION = 1.0.0.rc16-3 +DMRAID_SOURCE = dmraid-$(DMRAID_VERSION).tar.bz2 +DMRAID_SITE = http://people.redhat.com/~heinzm/sw/dmraid/src +DMRAID_SUBDIR = $(DMRAID_VERSION)/dmraid +# lib and tools race with parallel make +DMRAID_MAKE = $(MAKE1) +DMRAID_INSTALL_STAGING = YES +DMRAID_LICENSE = GPLv2 +DMRAID_LICENSE_FILES = $(DMRAID_SUBDIR)/LICENSE_GPL $(DMRAID_SUBDIR)/LICENSE + +DMRAID_DEPENDENCIES = lvm2 + +define DMRAID_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/dmraid/S20dmraid \ + $(TARGET_DIR)/etc/init.d/S20dmraid +endef + +$(eval $(autotools-package)) diff --git a/package/dnsmasq/Config.in b/package/dnsmasq/Config.in new file mode 100644 index 0000000000..b4f34b8d2b --- /dev/null +++ b/package/dnsmasq/Config.in @@ -0,0 +1,51 @@ +config BR2_PACKAGE_DNSMASQ + bool "dnsmasq" + help + A lightweight DNS and DHCP server. It is intended to provide + coupled DNS and DHCP service to a LAN. + + http://www.thekelleys.org.uk/dnsmasq/ + +if BR2_PACKAGE_DNSMASQ + +config BR2_PACKAGE_DNSMASQ_TFTP + bool "tftp support" + default y + help + Enable TFTP support in dnsmasq. + +config BR2_PACKAGE_DNSMASQ_DHCP + bool "dhcp support" + default y + help + Enable DHCP server support in dnsmasq. + +config BR2_PACKAGE_DNSMASQ_DNSSEC + bool "DNSSEC support" + select BR2_PACKAGE_GMP + select BR2_PACKAGE_NETTLE + help + Enable DNSSEC validation and caching support. + +config BR2_PACKAGE_DNSMASQ_IDN + bool "IDN support" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_LIBIDN + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + Enable IDN support in dnsmasq. + This option is a big space taker since it pulls in many libraries. + +config BR2_PACKAGE_DNSMASQ_LUA + bool "Lua scripting support" + depends on BR2_PACKAGE_LUA + help + Enable Lua scripting for dnsmasq + +config BR2_PACKAGE_DNSMASQ_CONNTRACK + bool "conntrack marking support" + select BR2_PACKAGE_LIBNETFILTER_CONNTRACK + help + Enable DNS query connection marking in netfilter. + +endif diff --git a/package/dnsmasq/S80dnsmasq b/package/dnsmasq/S80dnsmasq new file mode 100755 index 0000000000..d2f8b0f6b4 --- /dev/null +++ b/package/dnsmasq/S80dnsmasq @@ -0,0 +1,26 @@ +#!/bin/sh + +[ -x /usr/sbin/dnsmasq ] || exit 0 +[ -f /etc/dnsmasq.conf ] || exit 0 + +case "$1" in + start) + printf "Starting dnsmasq: " + start-stop-daemon -S -x /usr/sbin/dnsmasq + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping dnsmasq: " + start-stop-daemon -K -q -x /usr/sbin/dnsmasq + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart|reload) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit 0 diff --git a/package/dnsmasq/dnsmasq.hash b/package/dnsmasq/dnsmasq.hash new file mode 100644 index 0000000000..57dc4b175c --- /dev/null +++ b/package/dnsmasq/dnsmasq.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 640c4e1d4c298e42458419cd78cfc26acc549401b1a34d271cd3e0e4226941f1 dnsmasq-2.75.tar.xz diff --git a/package/dnsmasq/dnsmasq.mk b/package/dnsmasq/dnsmasq.mk new file mode 100644 index 0000000000..7fb120003c --- /dev/null +++ b/package/dnsmasq/dnsmasq.mk @@ -0,0 +1,114 @@ +################################################################################ +# +# dnsmasq +# +################################################################################ + +DNSMASQ_VERSION = 2.75 +DNSMASQ_SOURCE = dnsmasq-$(DNSMASQ_VERSION).tar.xz +DNSMASQ_SITE = http://thekelleys.org.uk/dnsmasq +DNSMASQ_MAKE_ENV = $(TARGET_MAKE_ENV) CC="$(TARGET_CC)" +DNSMASQ_MAKE_OPTS = COPTS="$(DNSMASQ_COPTS)" PREFIX=/usr CFLAGS="$(TARGET_CFLAGS)" +DNSMASQ_MAKE_OPTS += DESTDIR=$(TARGET_DIR) LDFLAGS="$(TARGET_LDFLAGS)" +DNSMASQ_DEPENDENCIES = host-pkgconf +DNSMASQ_LICENSE = GPLv2 or GPLv3 +DNSMASQ_LICENSE_FILES = COPYING COPYING-v3 + +ifneq ($(BR2_PACKAGE_DNSMASQ_DHCP),y) +DNSMASQ_COPTS += -DNO_DHCP +endif + +ifeq ($(BR2_PACKAGE_DNSMASQ_DNSSEC),y) +DNSMASQ_DEPENDENCIES += gmp nettle +DNSMASQ_COPTS += -DHAVE_DNSSEC +ifeq ($(BR2_STATIC_LIBS),y) +DNSMASQ_COPTS += -DHAVE_DNSSEC_STATIC +endif +endif + +ifneq ($(BR2_PACKAGE_DNSMASQ_TFTP),y) +DNSMASQ_COPTS += -DNO_TFTP +endif + +# NLS requires IDN so only enable it (i18n) when IDN is true +ifeq ($(BR2_PACKAGE_DNSMASQ_IDN),y) +DNSMASQ_DEPENDENCIES += libidn $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-gettext +DNSMASQ_MAKE_OPTS += LIBS+="$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)" +DNSMASQ_COPTS += -DHAVE_IDN +DNSMASQ_I18N = $(if $(BR2_ENABLE_LOCALE),-i18n) +endif + +ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y) +DNSMASQ_DEPENDENCIES += libnetfilter_conntrack +endif + +ifeq ($(BR2_PACKAGE_DNSMASQ_CONNTRACK),y) +define DNSMASQ_ENABLE_CONNTRACK + $(SED) 's^.*#define HAVE_CONNTRACK.*^#define HAVE_CONNTRACK^' \ + $(DNSMASQ_DIR)/src/config.h +endef +endif + +ifeq ($(BR2_PACKAGE_DNSMASQ_LUA),y) +DNSMASQ_DEPENDENCIES += lua + +# liblua uses dlopen when dynamically linked +ifneq ($(BR2_STATIC_LIBS),y) +DNSMASQ_MAKE_OPTS += LIBS+="-ldl" +endif + +define DNSMASQ_ENABLE_LUA + $(SED) 's/lua5.1/lua/g' $(DNSMASQ_DIR)/Makefile + $(SED) 's^.*#define HAVE_LUASCRIPT.*^#define HAVE_LUASCRIPT^' \ + $(DNSMASQ_DIR)/src/config.h +endef +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +DNSMASQ_DEPENDENCIES += dbus +endif + +define DNSMASQ_FIX_PKGCONFIG + $(SED) 's^PKG_CONFIG = pkg-config^PKG_CONFIG = $(PKG_CONFIG_HOST_BINARY)^' \ + $(DNSMASQ_DIR)/Makefile +endef + +ifeq ($(BR2_PACKAGE_DBUS),y) +define DNSMASQ_ENABLE_DBUS + $(SED) 's^.*#define HAVE_DBUS.*^#define HAVE_DBUS^' \ + $(DNSMASQ_DIR)/src/config.h +endef +else +define DNSMASQ_ENABLE_DBUS + $(SED) 's^.*#define HAVE_DBUS.*^/* #define HAVE_DBUS */^' \ + $(DNSMASQ_DIR)/src/config.h +endef +endif + +define DNSMASQ_BUILD_CMDS + $(DNSMASQ_FIX_PKGCONFIG) + $(DNSMASQ_ENABLE_DBUS) + $(DNSMASQ_ENABLE_LUA) + $(DNSMASQ_ENABLE_CONNTRACK) + $(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPTS) all$(DNSMASQ_I18N) +endef + +ifeq ($(BR2_PACKAGE_DBUS),y) +define DNSMASQ_INSTALL_DBUS + $(INSTALL) -m 0644 -D $(@D)/dbus/dnsmasq.conf \ + $(TARGET_DIR)/etc/dbus-1/system.d/dnsmasq.conf +endef +endif + +define DNSMASQ_INSTALL_TARGET_CMDS + $(DNSMASQ_MAKE_ENV) $(MAKE) -C $(@D) $(DNSMASQ_MAKE_OPTS) install$(DNSMASQ_I18N) + mkdir -p $(TARGET_DIR)/var/lib/misc/ + $(DNSMASQ_INSTALL_DBUS) +endef + +define DNSMASQ_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/dnsmasq/S80dnsmasq \ + $(TARGET_DIR)/etc/init.d/S80dnsmasq +endef + +$(eval $(generic-package)) diff --git a/package/doc-asciidoc.mk b/package/doc-asciidoc.mk new file mode 100644 index 0000000000..6ab5ad27e4 --- /dev/null +++ b/package/doc-asciidoc.mk @@ -0,0 +1,185 @@ +# we can't use suitable-host-package here because that's not available in +# the context of 'make release' +asciidoc-check-dependencies: + $(Q)if [ -z "$(shell support/dependencies/check-host-asciidoc.sh)" ]; then \ + echo "You need a sufficiently recent asciidoc on your host" \ + "to generate documents"; \ + exit 1; \ + fi + $(Q)if [ -z "`which w3m 2>/dev/null`" ]; then \ + echo "You need w3m on your host to generate documents"; \ + exit 1; \ + fi + +asciidoc-check-dependencies-pdf: + $(Q)if [ -z "`which dblatex 2>/dev/null`" ]; then \ + echo "You need dblatex on your host to generate PDF documents"; \ + exit 1; \ + fi + +# PDF generation is broken because of a bug in xsltproc program provided +# by libxslt <=1.1.28, which does not honor an option we need to set. +# Fortunately, this bug is already fixed upstream: +# https://gitorious.org/libxslt/libxslt/commit/5af7ad745323004984287e48b42712e7305de35c +# +# So, bail out when trying to build a PDF using a buggy version of the +# xsltproc program. +# +# So, to overcome this issue and being able to build a PDF, you can +# build xsltproc from its source repository, then run: +# $ PATH=/path/to/custom-xsltproc/bin:${PATH} make manual +GENDOC_XSLTPROC_IS_BROKEN = \ + $(shell xsltproc --maxvars 0 >/dev/null 2>/dev/null || echo y) + +# Apply this configuration to all documents +BR_ASCIIDOC_CONF = docs/conf/asciidoc.conf + +################################################################################ +# ASCIIDOC_INNER -- generates the make targets needed to build a specific type of +# asciidoc documentation. +# +# argument 1 is the name of the document and the top-level asciidoc file must +# have the same name +# argument 2 is the uppercase name of the document +# argument 3 is the directory containing the document +# argument 4 is the type of document to generate (-f argument of a2x) +# argument 5 is the document type as used in the make target +# argument 6 is the output file extension for the document type +# argument 7 is the human text for the document type +# argument 8 (optional) are extra arguments for a2x +# +# The variable _SOURCES defines the dependencies. +# +# Since this function will be called from within an $(eval ...) +# all variable references except the arguments must be $$-quoted. +################################################################################ +define ASCIIDOC_INNER +$(1): $(1)-$(5) +.PHONY: $(1)-$(5) +$(1)-$(5): $$(O)/docs/$(1)/$(1).$(6) + +# Single line, because splitting a foreach is not easy... +asciidoc-check-dependencies-$(5): +$(1)-check-dependencies-$(5): asciidoc-check-dependencies-$(5) + $$(Q)$$(foreach hook,$$($(2)_CHECK_DEPENDENCIES_$$(call UPPERCASE,$(5))_HOOKS),$$(call $$(hook))$$(sep)) + +# Include Buildroot's AsciiDoc configuration first: +# - generic configuration, +# - then output-specific configuration +ifneq ($$(wildcard $$(BR_ASCIIDOC_CONF)),) +$(2)_$(4)_ASCIIDOC_OPTS += -f $$(BR_ASCIIDOC_CONF) +endif +BR_$(4)_ASCIIDOC_CONF = docs/conf/asciidoc-$(4).conf +ifneq ($$(wildcard $$(BR_$(4)_ASCIIDOC_CONF)),) +$(2)_$(4)_ASCIIDOC_OPTS += -f $$(BR_$(4)_ASCIIDOC_CONF) +endif + +# Then include the document's AsciiDoc configuration: +# - generic configuration, +# - then output-specific configuration +ifneq ($$(wildcard $$($(2)_ASCIIDOC_CONF)),) +$(2)_$(4)_ASCIIDOC_OPTS += -f $$($(2)_ASCIIDOC_CONF) +endif +$(2)_$(4)_ASCIIDOC_CONF = $(3)/asciidoc-$(4).conf +ifneq ($$(wildcard $$($(2)_$(4)_ASCIIDOC_CONF)),) +$(2)_$(4)_ASCIIDOC_OPTS += -f $$($(2)_$(4)_ASCIIDOC_CONF) +endif + +# Handle a2x warning about --destination-dir option only applicable to HTML +# based outputs. So: +# - use the --destination-dir option if possible (html and split-html), +# - otherwise copy the generated document to the output directory +$(2)_$(4)_A2X_OPTS = +ifneq ($$(filter $(5),html split-html),) +$(2)_$(4)_A2X_OPTS += --destination-dir="$$(@D)" +else +define $(2)_$(4)_INSTALL_CMDS + $$(Q)cp -f $$(BUILD_DIR)/docs/$(1)/$(1).$(6) $$(@D) +endef +endif + +$$(O)/docs/$(1)/$(1).$(6): export TZ=UTC + +ifeq ($(6)-$$(GENDOC_XSLTPROC_IS_BROKEN),pdf-y) +$$(O)/docs/$(1)/$(1).$(6): + $$(warning PDF generation is disabled because of a bug in \ + xsltproc. To be able to generate a PDF, you should \ + build xsltproc from the libxslt sources >=1.1.29 and pass it \ + to make through the command line: \ + 'PATH=/path/to/custom-xsltproc/bin:$$$${PATH} make $(1)-pdf') +else +# -r $(@D) is there for documents that use external filters; those filters +# generate code at the same location it finds the document's source files. +$$(O)/docs/$(1)/$(1).$(6): $$($(2)_SOURCES) \ + $(1)-check-dependencies \ + $(1)-check-dependencies-$(5) \ + $(1)-prepare-sources + $$(Q)$$(call MESSAGE,"Generating $(7) $(1)...") + $$(Q)mkdir -p $$(@D) + $$(Q)a2x $(8) -f $(4) -d book -L \ + $$(foreach r,$$($(2)_RESOURCES),-r $$(r)) -r $$(@D) \ + $$($(2)_$(4)_A2X_OPTS) \ + --asciidoc-opts="$$($(2)_$(4)_ASCIIDOC_OPTS)" \ + $$(BUILD_DIR)/docs/$(1)/$(1).txt +# install the generated document + $$($(2)_$(4)_INSTALL_CMDS) +endif +endef + +################################################################################ +# ASCIIDOC -- generates the make targets needed to build asciidoc documentation. +# +# argument 1 is the lowercase name of the document; the document's main file +# must have the same name, with the .txt extension +# argument 2 is the uppercase name of the document +# argument 3 is the directory containing the document's sources +# +# The variable _SOURCES defines the dependencies. +# The variable _RESOURCES defines where the document's +# resources, such as images, are located; must be an absolute path. +################################################################################ +define ASCIIDOC +# Single line, because splitting a foreach is not easy... +$(1)-check-dependencies: asciidoc-check-dependencies + $$(Q)$$(foreach hook,$$($(2)_CHECK_DEPENDENCIES_HOOKS),$$(call $$(hook))$$(sep)) + +# Single line, because splitting a foreach is not easy... +# Do not touch the stamp file, so we get to rsync again every time we build +# the document. +$$(BUILD_DIR)/docs/$(1)/.stamp_doc_rsynced: + $$(Q)$$(call MESSAGE,"Preparing the $(1) sources...") + $$(Q)mkdir -p $$(@D) + $$(Q)rsync -a $(3) $$(@D) + $$(Q)$$(foreach hook,$$($(2)_POST_RSYNC_HOOKS),$$(call $$(hook))$$(sep)) + +$(1)-prepare-sources: $$(BUILD_DIR)/docs/$(1)/.stamp_doc_rsynced + +$(2)_ASCIIDOC_CONF = $(3)/asciidoc.conf + +$(call ASCIIDOC_INNER,$(1),$(2),$(3),xhtml,html,html,HTML,\ + --xsltproc-opts "--stringparam toc.section.depth 1") + +$(call ASCIIDOC_INNER,$(1),$(2),$(3),chunked,split-html,chunked,split HTML,\ + --xsltproc-opts "--stringparam toc.section.depth 1") + +# dblatex needs to pass the '--maxvars ...' option to xsltproc to prevent it +# from reaching the template recursion limit when processing the (long) target +# package table and bailing out. +$(call ASCIIDOC_INNER,$(1),$(2),$(3),pdf,pdf,pdf,PDF,\ + --dblatex-opts "-P latex.output.revhistory=0 -x '--maxvars 100000'") + +$(call ASCIIDOC_INNER,$(1),$(2),$(3),text,text,text,text) + +$(call ASCIIDOC_INNER,$(1),$(2),$(3),epub,epub,epub,ePUB) + +clean: $(1)-clean +$(1)-clean: + $$(Q)$$(RM) -rf $$(BUILD_DIR)/docs/$(1) +.PHONY: $(1) $(1)-clean +endef + +################################################################################ +# asciidoc-document -- the target generator macro for asciidoc documents +################################################################################ + +asciidoc-document = $(call ASCIIDOC,$(pkgname),$(call UPPERCASE,$(pkgname)),$(pkgdir)) diff --git a/package/docker/Config.in b/package/docker/Config.in new file mode 100644 index 0000000000..12f8432bc1 --- /dev/null +++ b/package/docker/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_DOCKER + bool "docker" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_XLIB_LIBX11 + help + a system tray dock for X + + http://icculus.org/openbox/2/docker + +comment "docker needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_XORG7 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/docker/docker.hash b/package/docker/docker.hash new file mode 100644 index 0000000000..710a0eb57c --- /dev/null +++ b/package/docker/docker.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 47629578e89d96d1541c91d040aec4316f03ad6d01dc3eecb8f82a33445c1e4e docker-1.5.tar.gz diff --git a/package/docker/docker.mk b/package/docker/docker.mk new file mode 100644 index 0000000000..9a9d26bb85 --- /dev/null +++ b/package/docker/docker.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# docker +# +################################################################################ + +DOCKER_VERSION = 1.5 +DOCKER_SITE = http://icculus.org/openbox/2/docker +DOCKER_DEPENDENCIES = host-pkgconf libglib2 xlib_libX11 + +DOCKER_LICENSE = GPLv2+ +# The 'or later' is specified at the end of the README, so include that one too. +DOCKER_LICENSE_FILES = COPYING README + +define DOCKER_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + XLIBPATH=$(STAGING_DIR)/usr/lib +endef + +define DOCKER_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + XLIBPATH=$(STAGING_DIR)/usr/lib PREFIX=$(TARGET_DIR)/usr install +endef + +$(eval $(generic-package)) diff --git a/package/doom-wad/Config.in b/package/doom-wad/Config.in new file mode 100644 index 0000000000..edd299b5e8 --- /dev/null +++ b/package/doom-wad/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_DOOM_WAD + bool "shareware Doom WAD file" + depends on BR2_PACKAGE_CHOCOLATE_DOOM || BR2_PACKAGE_PRBOOM + help + This will install the shareware wad data file for the doom game. + + The wad file will be placed in the /usr/share/games/doom directory. diff --git a/package/doom-wad/doom-wad.hash b/package/doom-wad/doom-wad.hash new file mode 100644 index 0000000000..fa069c1b77 --- /dev/null +++ b/package/doom-wad/doom-wad.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 cacf0142b31ca1af00796b4a0339e07992ac5f21bc3f81e7532fe1b5e1b486e6 doom19s.zip diff --git a/package/doom-wad/doom-wad.mk b/package/doom-wad/doom-wad.mk new file mode 100644 index 0000000000..d3ac731bd5 --- /dev/null +++ b/package/doom-wad/doom-wad.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# doom-wad +# +################################################################################ + +DOOM_WAD_VERSION = 1.9 +DOOM_WAD_SOURCE = doom$(subst .,,$(DOOM_WAD_VERSION))s.zip +# Official server currently unavailable +# DOOM_WAD_SITE = ftp://ftp.idsoftware.com/idstuff/doom +DOOM_WAD_SITE = http://www.jbserver.com/downloads/games/doom/misc/shareware + +define DOOM_WAD_EXTRACT_CMDS + $(UNZIP) -p $(DL_DIR)/$($(PKG)_SOURCE) 'DOOMS_19.[12]' > \ + $(@D)/doom-$(DOOM_WAD_VERSION).zip + $(UNZIP) -d $(@D) $(@D)/doom-$(DOOM_WAD_VERSION).zip DOOM1.WAD +endef + +define DOOM_WAD_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/DOOM1.WAD \ + $(TARGET_DIR)/usr/share/games/doom/doom1.wad +endef + +$(eval $(generic-package)) diff --git a/package/dos2unix/Config.in b/package/dos2unix/Config.in new file mode 100644 index 0000000000..ead1a8ffac --- /dev/null +++ b/package/dos2unix/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_DOS2UNIX + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + bool "dos2unix" + help + dos2unix converts text file line endings between CRLF and LF + + http://waterlan.home.xs4all.nl/dos2unix.html diff --git a/package/dos2unix/Config.in.host b/package/dos2unix/Config.in.host new file mode 100644 index 0000000000..5ec6033a8e --- /dev/null +++ b/package/dos2unix/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_DOS2UNIX + bool "host dos2unix" + help + dos2unix converts text file line endings between CRLF and LF + + http://waterlan.home.xs4all.nl/dos2unix.html diff --git a/package/dos2unix/dos2unix.hash b/package/dos2unix/dos2unix.hash new file mode 100644 index 0000000000..7e1a120028 --- /dev/null +++ b/package/dos2unix/dos2unix.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 f4d5df24d181c2efecf7631aab6e894489012396092cf206829f1f9a98556b94 dos2unix-7.3.1.tar.gz diff --git a/package/dos2unix/dos2unix.mk b/package/dos2unix/dos2unix.mk new file mode 100644 index 0000000000..21e03aecb0 --- /dev/null +++ b/package/dos2unix/dos2unix.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# dos2unix +# +################################################################################ + +DOS2UNIX_VERSION = 7.3.1 +DOS2UNIX_SITE = http://waterlan.home.xs4all.nl/dos2unix +DOS2UNIX_LICENSE = BSD-2c +DOS2UNIX_LICENSE_FILES = COPYING.txt +DOS2UNIX_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox) +HOST_DOS2UNIX_DEPENDENCIES = + +ifeq ($(BR2_ENABLE_LOCALE),y) +DOS2UNIX_DEPENDENCIES += host-gettext +else +DOS2UNIX_MAKE_OPTS += ENABLE_NLS= +endif + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +DOS2UNIX_DEPENDENCIES += gettext +DOS2UNIX_MAKE_OPTS += LIBS_EXTRA=-lintl +endif + +ifeq ($(BR2_USE_WCHAR),) +DOS2UNIX_MAKE_OPTS += UCS= +endif + +define DOS2UNIX_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(DOS2UNIX_MAKE_OPTS) +endef + +define DOS2UNIX_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \ + $(DOS2UNIX_MAKE_OPTS) install +endef + +define HOST_DOS2UNIX_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) ENABLE_NLS= +endef + +define HOST_DOS2UNIX_INSTALL_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) ENABLE_NLS= \ + install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch b/package/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch new file mode 100644 index 0000000000..34ebc240b5 --- /dev/null +++ b/package/dosfstools/0001-mkfs.fat-fix-incorrect-int-type.patch @@ -0,0 +1,45 @@ +From 7a589ef6dab52ad32a296939f0ed2acb4d76b2a7 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sun, 16 Aug 2015 15:55:43 +0200 +Subject: [PATCH] mkfs.fat: fix incorrect int type + +u_int32_t is not a stanard type, while uint32_t is. This fixes builds +with the musl C library, which only defines so-called "clean" headers; +build failures are like (back-quotes and elision manually added for +readability): + + http://autobuild.buildroot.org/results/a09/a0923d7f6d4dbae02eba4c5024bbdae3a52aa85a/build-end.log + + /home/peko/autobuild/instance-1/output/host/usr/bin/x86_64-linux-gcc -D_LARGEFILE_SOURCE \ + -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -D_GNU_SOURCE -D_LARGEFILE_SOURCE \ + -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o mkfs.fat.o src/mkfs.fat.c + src/mkfs.fat.c: In function 'main': + src/mkfs.fat.c:1415:18: error: 'u_int32_t' undeclared (first use in this function) + volume_id = (u_int32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); [...] + ^ + src/mkfs.fat.c:1415:18: note: each undeclared identifier is reported only once for each + function it appears in + +Signed-off-by: "Yann E. MORIN" +--- +Upstream status: applied: https://github.com/dosfstools/dosfstools/pull/9 +--- + src/mkfs.fat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/mkfs.fat.c b/src/mkfs.fat.c +index b38d116..dddbe24 100644 +--- a/src/mkfs.fat.c ++++ b/src/mkfs.fat.c +@@ -1412,7 +1412,7 @@ int main(int argc, char **argv) + + gettimeofday(&create_timeval, NULL); + create_time = create_timeval.tv_sec; +- volume_id = (u_int32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); /* Default volume ID = creation time, fudged for more uniqueness */ ++ volume_id = (uint32_t) ((create_timeval.tv_sec << 20) | create_timeval.tv_usec); /* Default volume ID = creation time, fudged for more uniqueness */ + check_atari(); + + printf("mkfs.fat " VERSION " (" VERSION_DATE ")\n"); +-- +1.9.1 + diff --git a/package/dosfstools/Config.in b/package/dosfstools/Config.in new file mode 100644 index 0000000000..33c64b34a2 --- /dev/null +++ b/package/dosfstools/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_DOSFSTOOLS + bool "dosfstools" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Tools for creating and checking DOS FAT filesystems. + + https://github.com/dosfstools/dosfstools + +if BR2_PACKAGE_DOSFSTOOLS + +config BR2_PACKAGE_DOSFSTOOLS_FATLABEL + bool "fatlabel" + help + Get or set the DOS FAT filesystem label. + +config BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT + bool "fsck.fat" + help + Check a DOS FAT filesystem. + +config BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT + bool "mkfs.fat" + help + Creates a DOS FAT filesystem on a device. + +endif + +comment "dosfstools needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/dosfstools/Config.in.host b/package/dosfstools/Config.in.host new file mode 100644 index 0000000000..6156c5a3cf --- /dev/null +++ b/package/dosfstools/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_DOSFSTOOLS + bool "host dosfstools" + help + Tools for creating and checking DOS FAT filesystems. + + http://www.daniel-baumann.ch/software/dosfstools/ diff --git a/package/dosfstools/dosfstools.hash b/package/dosfstools/dosfstools.hash new file mode 100644 index 0000000000..f852195868 --- /dev/null +++ b/package/dosfstools/dosfstools.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 ee95913044ecf2719b63ea11212917649709a6e53209a72d622135aaa8517ee2 dosfstools-3.0.28.tar.xz diff --git a/package/dosfstools/dosfstools.mk b/package/dosfstools/dosfstools.mk new file mode 100644 index 0000000000..b7f7d96b85 --- /dev/null +++ b/package/dosfstools/dosfstools.mk @@ -0,0 +1,68 @@ +################################################################################ +# +# dosfstools +# +################################################################################ + +DOSFSTOOLS_VERSION = 3.0.28 +DOSFSTOOLS_SOURCE = dosfstools-$(DOSFSTOOLS_VERSION).tar.xz +DOSFSTOOLS_SITE = https://github.com/dosfstools/dosfstools/releases/download/v$(DOSFSTOOLS_VERSION) +DOSFSTOOLS_LICENSE = GPLv3+ +DOSFSTOOLS_LICENSE_FILES = COPYING + +# Avoid target dosfstools dependencies, no host-libiconv +HOST_DOSFSTOOLS_DEPENDENCIES = + +DOSFSTOOLS_CFLAGS = $(TARGET_CFLAGS) -D_GNU_SOURCE + +ifneq ($(BR2_ENABLE_LOCALE),y) +DOSFSTOOLS_DEPENDENCIES += libiconv +DOSFSTOOLS_LDLIBS += -liconv +endif + +define DOSFSTOOLS_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(DOSFSTOOLS_CFLAGS)" LDLIBS="$(DOSFSTOOLS_LDLIBS)" -C $(@D) +endef + +ifeq ($(BR2_PACKAGE_DOSFSTOOLS_FATLABEL),y) +define DOSFSTOOLS_INSTALL_FATLABEL + $(INSTALL) -D -m 755 $(@D)/fatlabel $(TARGET_DIR)/sbin/fatlabel + ln -sf fatlabel $(TARGET_DIR)/sbin/dosfslabel +endef +endif + +ifeq ($(BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT),y) +define DOSFSTOOLS_INSTALL_FSCK_FAT + $(INSTALL) -D -m 755 $(@D)/fsck.fat $(TARGET_DIR)/sbin/fsck.fat + ln -fs fsck.fat $(TARGET_DIR)/sbin/dosfsck + ln -fs fsck.fat $(TARGET_DIR)/sbin/fsck.msdos + ln -fs fsck.fat $(TARGET_DIR)/sbin/fsck.vfat +endef +endif + +ifeq ($(BR2_PACKAGE_DOSFSTOOLS_MKFS_FAT),y) +define DOSFSTOOLS_INSTALL_MKFS_FAT + $(INSTALL) -D -m 755 $(@D)/mkfs.fat $(TARGET_DIR)/sbin/mkfs.fat + ln -fs mkfs.fat $(TARGET_DIR)/sbin/mkdosfs + ln -fs mkfs.fat $(TARGET_DIR)/sbin/mkfs.msdos + ln -fs mkfs.fat $(TARGET_DIR)/sbin/mkfs.vfat +endef +endif + +define DOSFSTOOLS_INSTALL_TARGET_CMDS + $(DOSFSTOOLS_INSTALL_FATLABEL) + $(DOSFSTOOLS_INSTALL_FSCK_FAT) + $(DOSFSTOOLS_INSTALL_MKFS_FAT) +endef + +define HOST_DOSFSTOOLS_BUILD_CMDS + $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) +endef + +define HOST_DOSFSTOOLS_INSTALL_CMDS + $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) PREFIX=$(HOST_DIR)/usr install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/dovecot-pigeonhole/Config.in b/package/dovecot-pigeonhole/Config.in new file mode 100644 index 0000000000..83f528766a --- /dev/null +++ b/package/dovecot-pigeonhole/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_DOVECOT_PIGEONHOLE + bool "dovecot-pigeonhole" + help + Pigeonhole is the name of the project that adds support for the Sieve + language (RFC 5228) and the ManageSieve protocol (RFC 5804) to the + Dovecot Secure IMAP Server. + + http://pigeonhole.dovecot.org diff --git a/package/dovecot-pigeonhole/dovecot-pigeonhole.hash b/package/dovecot-pigeonhole/dovecot-pigeonhole.hash new file mode 100644 index 0000000000..2ef063ec29 --- /dev/null +++ b/package/dovecot-pigeonhole/dovecot-pigeonhole.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 dff30a636c1516158f3e159c669a254569c9dabaa6ecfa3669379101ea5b3300 dovecot-2.2-pigeonhole-0.4.14.tar.gz diff --git a/package/dovecot-pigeonhole/dovecot-pigeonhole.mk b/package/dovecot-pigeonhole/dovecot-pigeonhole.mk new file mode 100644 index 0000000000..132bef4997 --- /dev/null +++ b/package/dovecot-pigeonhole/dovecot-pigeonhole.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# dovecot-pigeonhole +# +################################################################################ + +DOVECOT_PIGEONHOLE_VERSION = 0.4.14 +DOVECOT_PIGEONHOLE_SOURCE = dovecot-2.2-pigeonhole-$(DOVECOT_PIGEONHOLE_VERSION).tar.gz +DOVECOT_PIGEONHOLE_SITE = http://pigeonhole.dovecot.org/releases/2.2 +DOVECOT_PIGEONHOLE_LICENSE = LGPLv2.1 +DOVECOT_PIGEONHOLE_LICENSE_FILES = COPYING +DOVECOT_PIGEONHOLE_DEPENDENCIES = dovecot + +DOVECOT_PIGEONHOLE_CONF_OPTS = --with-dovecot=$(STAGING_DIR)/usr/lib + +$(eval $(autotools-package)) diff --git a/package/dovecot/Config.in b/package/dovecot/Config.in new file mode 100644 index 0000000000..194efb6bc3 --- /dev/null +++ b/package/dovecot/Config.in @@ -0,0 +1,46 @@ +config BR2_PACKAGE_DOVECOT + bool "dovecot" + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # fork() + help + Dovecot is an open source IMAP and POP3 email server for Linux/UNIX- + like systems, written with security primarily in mind. Dovecot is an + excellent choice for both small and large installations. It's fast, + simple to set up, requires no special administration and it uses very + little memory. + + http://www.dovecot.org + +if BR2_PACKAGE_DOVECOT + +config BR2_PACKAGE_DOVECOT_MYSQL + bool "mysql support" + select BR2_PACKAGE_MYSQL + depends on BR2_INSTALL_LIBSTDCPP # mysql + depends on BR2_TOOLCHAIN_HAS_THREADS # mysql + help + Enable MySQL support. + +comment "mysql support needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_DOVECOT_OPENSSL + bool "openssl support" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + Enable OpenSSL support. + +config BR2_PACKAGE_DOVECOT_SQLITE + bool "sqlite support" + select BR2_PACKAGE_SQLITE + help + Enable SQLite support. + +source package/dovecot-pigeonhole/Config.in + +endif # BR2_PACKAGE_DOVECOT + +comment "dovecot needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/dovecot/dovecot.hash b/package/dovecot/dovecot.hash new file mode 100644 index 0000000000..33de82dfe4 --- /dev/null +++ b/package/dovecot/dovecot.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 71c86891ea8deb5703d3dbbc3ea31ce2cbf7638f1aa395d9e8794d3ff7aebeb7 dovecot-2.2.24.tar.gz diff --git a/package/dovecot/dovecot.mk b/package/dovecot/dovecot.mk new file mode 100644 index 0000000000..a9c0769cdb --- /dev/null +++ b/package/dovecot/dovecot.mk @@ -0,0 +1,119 @@ +################################################################################ +# +# dovecot +# +################################################################################ + +DOVECOT_VERSION_MAJOR = 2.2 +DOVECOT_VERSION = $(DOVECOT_VERSION_MAJOR).24 +DOVECOT_SITE = http://www.dovecot.org/releases/$(DOVECOT_VERSION_MAJOR) +DOVECOT_INSTALL_STAGING = YES +DOVECOT_LICENSE = LGPLv2.1 +DOVECOT_LICENSE_FILES = COPYING COPYING.LGPL COPYING.MIT +DOVECOT_DEPENDENCIES = host-pkgconf $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +DOVECOT_CONF_ENV = \ + RPCGEN=__disable_RPCGEN_rquota \ + i_cv_epoll_works=yes \ + i_cv_inotify_works=yes \ + i_cv_posix_fallocate_works=no \ + i_cv_signed_size_t=no \ + i_cv_gmtime_max_time_t=32 \ + i_cv_signed_time_t=yes \ + i_cv_mmap_plays_with_write=yes \ + i_cv_fd_passing=yes \ + i_cv_c99_vsnprintf=yes \ + lib_cv_va_copy=yes \ + lib_cv___va_copy=yes \ + lib_cv_va_val_copy=yes + +DOVECOT_CONF_OPTS = --without-docs + +ifeq ($(BR2_PACKAGE_DOVECOT_MYSQL)$(BR2_PACKAGE_DOVECOT_SQLITE),) +DOVECOT_CONF_OPTS += --without-sql +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +DOVECOT_CONF_OPTS += --with-bzlib +DOVECOT_DEPENDENCIES += bzip2 +else +DOVECOT_CONF_OPTS += --without-bzlib +endif + +ifeq ($(BR2_PACKAGE_ICU),y) +DOVECOT_CONF_OPTS += --with-icu +DOVECOT_DEPENDENCIES += icu +else +DOVECOT_CONF_OPTS += --without-icu +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +DOVECOT_CONF_OPTS += --with-libcap +DOVECOT_DEPENDENCIES += libcap +else +DOVECOT_CONF_OPTS += --without-libcap +endif + +ifeq ($(BR2_PACKAGE_DOVECOT_MYSQL),y) +DOVECOT_CONF_ENV += MYSQL_CONFIG="$(STAGING_DIR)/usr/bin/mysql_config" +DOVECOT_CONF_OPTS += --with-mysql +DOVECOT_DEPENDENCIES += mysql +else +DOVECOT_CONF_OPTS += --without-mysql +endif + +ifeq ($(BR2_PACKAGE_DOVECOT_OPENSSL),y) +DOVECOT_CONF_OPTS += --with-ssl=openssl +DOVECOT_DEPENDENCIES += openssl +else +DOVECOT_CONF_OPTS += --with-ssl=no +endif + +ifeq ($(BR2_PACKAGE_DOVECOT_SQLITE),y) +DOVECOT_CONF_OPTS += --with-sqlite +DOVECOT_DEPENDENCIES += sqlite +else +DOVECOT_CONF_OPTS += --without-sqlite +endif + +ifeq ($(BR2_PACKAGE_LZ4),y) +DOVECOT_CONF_OPTS += --with-lz4 +DOVECOT_DEPENDENCIES += lz4 +else +DOVECOT_CONF_OPTS += --without-lz4 +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +DOVECOT_CONF_OPTS += --with-lzma +DOVECOT_DEPENDENCIES += xz +else +DOVECOT_CONF_OPTS += --without-lzma +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +DOVECOT_CONF_OPTS += --with-zlib +DOVECOT_DEPENDENCIES += zlib +else +DOVECOT_CONF_OPTS += --without-zlib +endif + +# fix paths to avoid using /usr/lib/dovecot +define DOVECOT_POST_CONFIGURE + for i in $$(find $(@D) -name "Makefile"); do \ + $(SED) 's%^pkglibdir =.*%pkglibdir = \$$(libdir)%' $$i; \ + $(SED) 's%^pkglibexecdir =.*%pkglibexecdir = \$$(libexecdir)%' $$i; \ + done +endef + +DOVECOT_POST_CONFIGURE_HOOKS += DOVECOT_POST_CONFIGURE + +# dovecot installs dovecot-config in usr/lib/, therefore +# DOVECOT_CONFIG_SCRIPTS can not be used to rewrite paths +define DOVECOT_FIX_STAGING_DOVECOT_CONFIG + $(SED) 's,^LIBDOVECOT_INCLUDE=.*$$,LIBDOVECOT_INCLUDE=\"-I$(STAGING_DIR)/usr/include/dovecot\",' $(STAGING_DIR)/usr/lib/dovecot-config + $(SED) 's,^LIBDOVECOT=.*$$,LIBDOVECOT=\"-L$(STAGING_DIR)/usr/lib -ldovecot\",' $(STAGING_DIR)/usr/lib/dovecot-config +endef + +DOVECOT_POST_INSTALL_STAGING_HOOKS += DOVECOT_FIX_STAGING_DOVECOT_CONFIG + +$(eval $(autotools-package)) diff --git a/package/doxygen/doxygen.hash b/package/doxygen/doxygen.hash new file mode 100644 index 0000000000..40cfe16a17 --- /dev/null +++ b/package/doxygen/doxygen.hash @@ -0,0 +1,2 @@ +# Computed locally +sha256 d4ab6e28d4d45d8956cad17470aade3fbe2356e8f64b92167e738c1887feccec doxygen-1.8.9.1.src.tar.gz diff --git a/package/doxygen/doxygen.mk b/package/doxygen/doxygen.mk new file mode 100644 index 0000000000..14dd090596 --- /dev/null +++ b/package/doxygen/doxygen.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# doxygen +# +################################################################################ + +DOXYGEN_VERSION = 1.8.9.1 +DOXYGEN_SOURCE = doxygen-$(DOXYGEN_VERSION).src.tar.gz +DOXYGEN_SITE = http://ftp.stack.nl/pub/users/dimitri +DOXYGEN_LICENSE = GPLv2 +DOXYGEN_LICENSE_FILES = LICENSE +DOXYGEN_DEPENDENCIES = host-flex host-bison + +define HOST_DOXYGEN_CONFIGURE_CMDS + (cd $(@D); $(HOST_MAKE_ENV) ./configure --shared --prefix=$(HOST_DIR)/usr) +endef + +define HOST_DOXYGEN_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define HOST_DOXYGEN_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +# Doxygen's configure is a handwritten script, not an autotools-generated one. +# It doesn't accept host-autotools-package default arguments, so we have to +# call host-generic-package here. +$(eval $(host-generic-package)) diff --git a/package/drbd-utils/Config.in b/package/drbd-utils/Config.in new file mode 100644 index 0000000000..be6861988f --- /dev/null +++ b/package/drbd-utils/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_DRBD_UTILS + bool "drbd-utils" + depends on BR2_USE_MMU # needs fork() + help + DRBD utilities to manage the DRBD kernel module. + + http://oss.linbit.com/drbd/ diff --git a/package/drbd-utils/drbd-utils.hash b/package/drbd-utils/drbd-utils.hash new file mode 100644 index 0000000000..ebd13ef09e --- /dev/null +++ b/package/drbd-utils/drbd-utils.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 38929279d1bf549fd1ade4ce6773a6fe209db51bbb0efe7bf6d2b7871ba0afbc drbd-utils-8.9.4.tar.gz diff --git a/package/drbd-utils/drbd-utils.mk b/package/drbd-utils/drbd-utils.mk new file mode 100644 index 0000000000..88d272952e --- /dev/null +++ b/package/drbd-utils/drbd-utils.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# drbd-utils +# +################################################################################ + +DRBD_UTILS_VERSION = 8.9.4 +DRBD_UTILS_SITE = http://oss.linbit.com/drbd +DRBD_UTILS_LICENSE = GPLv2+ +DRBD_UTILS_LICENSE_FILES = COPYING +DRBD_UTILS_DEPENDENCIES = host-flex + +DRBD_UTILS_CONF_OPTS = --with-distro=generic --without-manual + +ifeq ($(BR2_INIT_SYSTEMD),y) +DRBD_UTILS_CONF_OPTS += --with-initscripttype=systemd +DRDB_UTILS_DEPENDENCIES += systemd +else +DRBD_UTILS_CONF_OPTS += --with-initscripttype=sysv +endif + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +DRBD_UTILS_CONF_OPTS += --with-udev=yes +DRDB_UTILS_DEPENDENCIES += udev +else +DRBD_UTILS_CONF_OPTS += --with-udev=no +endif + +$(eval $(autotools-package)) diff --git a/package/dropbear/Config.in b/package/dropbear/Config.in new file mode 100644 index 0000000000..d92361fa39 --- /dev/null +++ b/package/dropbear/Config.in @@ -0,0 +1,58 @@ +config BR2_PACKAGE_DROPBEAR + bool "dropbear" + select BR2_PACKAGE_ZLIB if !BR2_PACKAGE_DROPBEAR_SMALL + help + A small SSH 2 server designed for small memory environments. + + Note that dropbear requires a per-device unique host key. The + key will be generated when dropbear starts, but it is not + persistent over reboot (if you have a read-only rootfs) or + upgrade (if you have a read-write rootfs). To make the key + persistent, replace /etc/dropbear with a symlink to a + directory on a persistent, writeable filesystem. + Alternatively, mount a persistent unionfs over your root + filesystem. + + http://matt.ucc.asn.au/dropbear/dropbear.html + +if BR2_PACKAGE_DROPBEAR + +config BR2_PACKAGE_DROPBEAR_CLIENT + bool "client programs" + default y + help + Provides the programs: dbclient, ssh + + Note that the following programs are also used server-side + and are therefore always build regardless this setting: + dropbear, dropbearkey, dropbearconvert, scp + +config BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS + bool "disable reverse DNS lookups" + help + Disable reverse DNS lookups on connection. This can be handy + on systems without working DNS, as connections otherwise + stall until DNS times out. + +config BR2_PACKAGE_DROPBEAR_SMALL + bool "optimize for size" + default y + help + Compile dropbear for the smallest possible binary size. + + Tradeoffs are slower hashes and ciphers, and disabling of the + blowfish cipher and zlib. + +config BR2_PACKAGE_DROPBEAR_WTMP + bool "log dropbear access to wtmp" + help + Enable logging of dropbear access to wtmp. Notice that + Buildroot does not generate wtmp by default. + +config BR2_PACKAGE_DROPBEAR_LASTLOG + bool "log dropbear access to lastlog" + help + Enable logging of dropbear access to lastlog. Notice that + Buildroot does not generate lastlog by default. + +endif diff --git a/package/dropbear/S50dropbear b/package/dropbear/S50dropbear new file mode 100644 index 0000000000..9474eaafaa --- /dev/null +++ b/package/dropbear/S50dropbear @@ -0,0 +1,61 @@ +#!/bin/sh +# +# Starts dropbear sshd. +# + +# Allow a few customizations from a config file +test -r /etc/default/dropbear && . /etc/default/dropbear + +start() { + DROPBEAR_ARGS="$DROPBEAR_ARGS -R" + + # If /etc/dropbear is a symlink to /var/run/dropbear, and + # - the filesystem is RO (i.e. we can not rm the symlink), + # create the directory pointed to by the symlink. + # - the filesystem is RW (i.e. we can rm the symlink), + # replace the symlink with an actual directory + if [ -L /etc/dropbear \ + -a "$(readlink /etc/dropbear)" = "/var/run/dropbear" ] + then + if rm -f /etc/dropbear >/dev/null 2>&1; then + mkdir -p /etc/dropbear + else + echo "No persistent location to store SSH host keys. New keys will be" + echo "generated at each boot. Are you sure this is what you want to do?" + mkdir -p "$(readlink /etc/dropbear)" + fi + fi + + printf "Starting dropbear sshd: " + umask 077 + + start-stop-daemon -S -q -p /var/run/dropbear.pid \ + --exec /usr/sbin/dropbear -- $DROPBEAR_ARGS + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +stop() { + printf "Stopping dropbear sshd: " + start-stop-daemon -K -q -p /var/run/dropbear.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/dropbear/dropbear.hash b/package/dropbear/dropbear.hash new file mode 100644 index 0000000000..2692889327 --- /dev/null +++ b/package/dropbear/dropbear.hash @@ -0,0 +1,2 @@ +# From https://matt.ucc.asn.au/dropbear/releases/SHA256SUM.asc +sha256 5c61a4f69b093b688629cd365be38701485ff63cfb23642dab7a05ad250aefd7 dropbear-2016.73.tar.bz2 diff --git a/package/dropbear/dropbear.mk b/package/dropbear/dropbear.mk new file mode 100644 index 0000000000..32e2167771 --- /dev/null +++ b/package/dropbear/dropbear.mk @@ -0,0 +1,99 @@ +################################################################################ +# +# dropbear +# +################################################################################ + +DROPBEAR_VERSION = 2016.73 +DROPBEAR_SITE = http://matt.ucc.asn.au/dropbear/releases +DROPBEAR_SOURCE = dropbear-$(DROPBEAR_VERSION).tar.bz2 +DROPBEAR_LICENSE = MIT, BSD-2c-like, BSD-2c +DROPBEAR_LICENSE_FILES = LICENSE +DROPBEAR_TARGET_BINS = dropbearkey dropbearconvert scp +DROPBEAR_PROGRAMS = dropbear $(DROPBEAR_TARGET_BINS) + +ifeq ($(BR2_PACKAGE_DROPBEAR_CLIENT),y) +# Build dbclient, and create a convenience symlink named ssh +DROPBEAR_PROGRAMS += dbclient +DROPBEAR_TARGET_BINS += dbclient ssh +endif + +DROPBEAR_MAKE = \ + $(MAKE) MULTI=1 SCPPROGRESS=1 \ + PROGRAMS="$(DROPBEAR_PROGRAMS)" + +ifeq ($(BR2_STATIC_LIBS),y) +DROPBEAR_MAKE += STATIC=1 +endif + +define DROPBEAR_FIX_XAUTH + $(SED) 's,^#define XAUTH_COMMAND.*/xauth,#define XAUTH_COMMAND "/usr/bin/xauth,g' $(@D)/options.h +endef + +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_FIX_XAUTH + +define DROPBEAR_ENABLE_REVERSE_DNS + $(SED) 's:.*\(#define DO_HOST_LOOKUP\).*:\1:' $(@D)/options.h +endef + +define DROPBEAR_BUILD_SMALL + $(SED) 's:.*\(#define NO_FAST_EXPTMOD\).*:\1:' $(@D)/options.h +endef + +define DROPBEAR_BUILD_FEATURED + $(SED) 's:^#define DROPBEAR_SMALL_CODE::' $(@D)/options.h + $(SED) 's:.*\(#define DROPBEAR_BLOWFISH\).*:\1:' $(@D)/options.h + $(SED) 's:.*\(#define DROPBEAR_TWOFISH128\).*:\1:' $(@D)/options.h + $(SED) 's:.*\(#define DROPBEAR_TWOFISH256\).*:\1:' $(@D)/options.h +endef + +define DROPBEAR_DISABLE_STANDALONE + $(SED) 's:\(#define NON_INETD_MODE\):/*\1 */:' $(@D)/options.h +endef + +define DROPBEAR_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/dropbear/dropbear.service \ + $(TARGET_DIR)/usr/lib/systemd/system/dropbear.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/dropbear.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/dropbear.service +endef + +ifeq ($(BR2_USE_MMU),y) +define DROPBEAR_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/dropbear/S50dropbear \ + $(TARGET_DIR)/etc/init.d/S50dropbear +endef +else +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_DISABLE_STANDALONE +endif + +ifeq ($(BR2_PACKAGE_DROPBEAR_DISABLE_REVERSEDNS),) +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_ENABLE_REVERSE_DNS +endif + +ifeq ($(BR2_PACKAGE_DROPBEAR_SMALL),y) +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_BUILD_SMALL +DROPBEAR_CONF_OPTS += --disable-zlib +else +DROPBEAR_POST_EXTRACT_HOOKS += DROPBEAR_BUILD_FEATURED +DROPBEAR_DEPENDENCIES += zlib +endif + +ifneq ($(BR2_PACKAGE_DROPBEAR_WTMP),y) +DROPBEAR_CONF_OPTS += --disable-wtmp +endif + +ifneq ($(BR2_PACKAGE_DROPBEAR_LASTLOG),y) +DROPBEAR_CONF_OPTS += --disable-lastlog +endif + +define DROPBEAR_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 $(@D)/dropbearmulti $(TARGET_DIR)/usr/sbin/dropbear + for f in $(DROPBEAR_TARGET_BINS); do \ + ln -snf ../sbin/dropbear $(TARGET_DIR)/usr/bin/$$f ; \ + done + ln -snf /var/run/dropbear $(TARGET_DIR)/etc/dropbear +endef + +$(eval $(autotools-package)) diff --git a/package/dropbear/dropbear.service b/package/dropbear/dropbear.service new file mode 100644 index 0000000000..620cdd7a50 --- /dev/null +++ b/package/dropbear/dropbear.service @@ -0,0 +1,27 @@ +[Unit] +Description=Dropbear SSH daemon +After=syslog.target network.target auditd.service + +[Service] +# If /etc/dropbear is a symlink to /var/run/dropbear, and +# - the filesystem is RO (i.e. we can not rm the symlink), +# create the directory pointed to by the symlink. +# - the filesystem is RW (i.e. we can rm the symlink), +# replace the symlink with an actual directory +ExecStartPre=/bin/sh -c '\ +if [ -L /etc/dropbear \ + -a "$(readlink /etc/dropbear)" = "/var/run/dropbear" ]; then \ + if rm -f /etc/dropbear >/dev/null 2>&1; then \ + mkdir -p /etc/dropbear; \ + else \ + echo "No persistent location to store SSH host keys. New keys will be"; \ + echo "generated at each boot. Are you sure this is what you want to do?"; \ + mkdir -p "$(readlink /etc/dropbear)"; \ + fi; \ +fi' +EnvironmentFile=-/etc/default/dropbear +ExecStart=/usr/sbin/dropbear -F -R $DROPBEAR_ARGS +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/package/dropwatch/0001-build.patch b/package/dropwatch/0001-build.patch new file mode 100644 index 0000000000..eed43e8dd7 --- /dev/null +++ b/package/dropwatch/0001-build.patch @@ -0,0 +1,27 @@ +From 03bab84ca3f102274837e83ee6da4c997a9da018 Mon Sep 17 00:00:00 2001 +From: Tzu-Jung Lee +Date: Fri, 12 Jul 2013 20:00:57 +0800 +Subject: [PATCH] build: modify hardcoded gcc to support buildroot + +Signed-off-by: Tzu-Jung Lee + +diff --git a/src/Makefile b/src/Makefile +index 026b6ba..b87ae9f 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -5,10 +5,10 @@ OBJFILES := main.o lookup.o\ + lookup_bfd.o lookup_kas.o + + dropwatch: $(OBJFILES) +- gcc -g -o dropwatch $(OBJFILES) $(LDFLAGS) ++ $(CC) -g -o dropwatch $(OBJFILES) $(LDFLAGS) + + %.o: %.c +- gcc $(CFLAGS) $< ++ $(CC) $(CFLAGS) $< + clean: + rm -f dropwatch *.o + +-- +1.8.3.2 + diff --git a/package/dropwatch/0002-binutils-2.23.1.patch b/package/dropwatch/0002-binutils-2.23.1.patch new file mode 100644 index 0000000000..4d43356a6a --- /dev/null +++ b/package/dropwatch/0002-binutils-2.23.1.patch @@ -0,0 +1,74 @@ +libbfd from binutils 2.23.1+ requires PACKAGE* definitions from autoconf. +Patch from https://fedorahosted.org/dropwatch/ticket/5 +Upstream status: new. + +Signed-off-by: Gustavo Zacarias + +diff -aurd src.orig/lookup.c src/lookup.c +--- a/src/lookup.c 2011-10-03 22:51:38.000000000 +0400 ++++ b/src/lookup.c 2013-02-18 09:13:56.683214438 +0400 +@@ -27,13 +27,13 @@ + #include + #include + #include +-#include + #include + #include + #include + #include + + #include "lookup.h" ++#include + + extern struct lookup_methods bfd_methods; + extern struct lookup_methods kallsym_methods; +diff -aurd src.orig/lookup.h src/lookup.h +--- a/src/lookup.h 2011-10-03 22:51:38.000000000 +0400 ++++ b/src/lookup.h 2013-02-18 09:11:00.506895026 +0400 +@@ -28,6 +28,9 @@ + #include + #include + ++// satisfy PR 14072 in bfd.h ++#define PACKAGE 1 ++#define PACKAGE_VERSION 1 + + /* + * Initalization routine +diff -aurd src.orig/lookup_bfd.c src/lookup_bfd.c +--- a/src/lookup_bfd.c 2012-01-16 22:34:11.000000000 +0400 ++++ b/src/lookup_bfd.c 2013-02-18 09:14:02.472984310 +0400 +@@ -25,13 +25,13 @@ + #include + #include + #include +-#include + #include + #include + #include + #include + + #include "lookup.h" ++#include + + + static int lookup_bfd_init(void) +diff -aurd src.orig/lookup_kas.c src/lookup_kas.c +--- a/src/lookup_kas.c 2012-05-31 02:43:23.000000000 +0400 ++++ b/src/lookup_kas.c 2013-02-18 09:14:07.906101713 +0400 +@@ -25,7 +25,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -33,6 +32,7 @@ + #include + + #include "lookup.h" ++#include + + struct symbol_entry { + char *sym_name; diff --git a/package/dropwatch/0003-remove-werror.patch b/package/dropwatch/0003-remove-werror.patch new file mode 100644 index 0000000000..97b26b74c4 --- /dev/null +++ b/package/dropwatch/0003-remove-werror.patch @@ -0,0 +1,18 @@ +-Werror shouldn't be used in released code since it can +cause random build failures on moderate warnings. It also +depends on the used toolchain since different toolchains may +or may not print the same warnings. + +Signed-off-by: Markos Chandras + +Index: dropwatch-1.4/src/Makefile +=================================================================== +--- dropwatch-1.4.orig/src/Makefile ++++ dropwatch-1.4/src/Makefile +@@ -1,5 +1,5 @@ + all: dropwatch +-CFLAGS+=-c -g -D_GNU_SOURCE -Wall -Werror `pkg-config --cflags libnl-3.0` ++CFLAGS+=-c -g -D_GNU_SOURCE -Wall `pkg-config --cflags libnl-3.0` + LDFLAGS=-lbfd -lreadline -lnl-3 -lnl-genl-3 + OBJFILES := main.o lookup.o\ + lookup_bfd.o lookup_kas.o diff --git a/package/dropwatch/Config.in b/package/dropwatch/Config.in new file mode 100644 index 0000000000..d331e5e816 --- /dev/null +++ b/package/dropwatch/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_DROPWATCH + bool "dropwatch" + select BR2_PACKAGE_BINUTILS + depends on !BR2_aarch64 && !BR2_nios2 # binutils + depends on BR2_USE_WCHAR # binutils + select BR2_PACKAGE_READLINE + select BR2_PACKAGE_LIBNL + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + help + Dropwatch is an interactive utility for monitoring and + recording packets that are dropped by the kernel + + https://fedorahosted.org/dropwatch/ + +comment "dropwatch needs a toolchain w/ threads, wchar" + depends on !BR2_aarch64 && !BR2_nios2 + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/dropwatch/dropwatch.hash b/package/dropwatch/dropwatch.hash new file mode 100644 index 0000000000..3f15c84ec1 --- /dev/null +++ b/package/dropwatch/dropwatch.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c2348b8d72781ab0f3ca52b8415d78ea98808280e14e7d68e76605f196bb5c4a dropwatch-1.4.tar.xz diff --git a/package/dropwatch/dropwatch.mk b/package/dropwatch/dropwatch.mk new file mode 100644 index 0000000000..3565927e29 --- /dev/null +++ b/package/dropwatch/dropwatch.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# dropwatch +# +################################################################################ + +DROPWATCH_VERSION = 1.4 +DROPWATCH_SOURCE = dropwatch-$(DROPWATCH_VERSION).tar.xz +DROPWATCH_SITE = https://git.fedorahosted.org/cgit/dropwatch.git/snapshot +DROPWATCH_DEPENDENCIES = binutils libnl readline host-pkgconf +DROPWATCH_LICENSE = GPLv2 +DROPWATCH_LICENSE_FILES = COPYING + +# libbfd may be linked to libintl +# Ugly... but LDFLAGS are hardcoded anyway +DROPWATCH_LDFLAGS = \ + $(TARGET_LDFLAGS) -lbfd -lreadline -lnl-3 -lnl-genl-3 \ + -lpthread -lncurses -lm + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +DROPWATCH_LDFLAGS += -lintl +endif + +define DROPWATCH_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + LDFLAGS="$(DROPWATCH_LDFLAGS)" build +endef + +define DROPWATCH_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/src/dropwatch \ + $(TARGET_DIR)/usr/bin/dropwatch +endef + +$(eval $(generic-package)) diff --git a/package/dsp-tools/Config.in b/package/dsp-tools/Config.in new file mode 100644 index 0000000000..0267454be9 --- /dev/null +++ b/package/dsp-tools/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_DSP_TOOLS + bool "dsp-tools" + depends on BR2_cortex_a8 + select BR2_PACKAGE_TIDSP_BINARIES + help + Utilities for TI OMAP3 DSP. + + http://github.com/felipec/dsp-tools diff --git a/package/dsp-tools/dsp-tools.hash b/package/dsp-tools/dsp-tools.hash new file mode 100644 index 0000000000..cfcf06c8d6 --- /dev/null +++ b/package/dsp-tools/dsp-tools.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 734a1d5f21fb388bdbe64f7b599fef52357c3c72ff860f38456a352e7c1c3e78 dsp-tools-v2.0.tar.gz diff --git a/package/dsp-tools/dsp-tools.mk b/package/dsp-tools/dsp-tools.mk new file mode 100644 index 0000000000..c91ed20629 --- /dev/null +++ b/package/dsp-tools/dsp-tools.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# dsp-tools +# +################################################################################ + +DSP_TOOLS_VERSION = v2.0 +DSP_TOOLS_SITE = $(call github,felipec,dsp-tools,$(DSP_TOOLS_VERSION)) +DSP_TOOLS_DEPENDENCIES = tidsp-binaries +DSP_TOOLS_LICENSE = LGPLv2.1 +DSP_TOOLS_LICENSE_FILES = LICENSE + +define DSP_TOOLS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e +endef + +define DSP_TOOLS_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/dstat/Config.in b/package/dstat/Config.in new file mode 100644 index 0000000000..6536a5e544 --- /dev/null +++ b/package/dstat/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_DSTAT + bool "dstat" + depends on BR2_USE_WCHAR # python + depends on BR2_USE_MMU # python + depends on BR2_TOOLCHAIN_HAS_THREADS # python + depends on !BR2_STATIC_LIBS # python + select BR2_PACKAGE_PYTHON + help + Dstat, written in Python, is a versatile replacement for vmstat, + iostat, netstat and ifstat. Dstat overcomes some of their limitations + and adds some extra features, more counters and flexibility. Dstat is + handy for monitoring systems during performance tuning tests, + benchmarks or troubleshooting. + Dstat allows you to view all of your system resources in real-time, + you can e.g. compare disk utilization in combination with interrupts + from your IDE controller, or compare the network bandwidth numbers + directly with the disk throughput (in the same interval). + + Note that to get proper output, your terminal size should be known by + the termios subsystem. This can be done by running the 'resize' + utility of busybox. + + http://dag.wieers.com/home-made/dstat/ + +comment "dstat needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/dstat/dstat.hash b/package/dstat/dstat.hash new file mode 100644 index 0000000000..f701561747 --- /dev/null +++ b/package/dstat/dstat.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 34a986d9d7c028bd9dcb6b2ef1c740f7220de5c9cf976870a2b62aca23b33bae dstat-0.7.2.tar.bz2 diff --git a/package/dstat/dstat.mk b/package/dstat/dstat.mk new file mode 100644 index 0000000000..f02e908123 --- /dev/null +++ b/package/dstat/dstat.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# dstat +# +################################################################################ + +DSTAT_VERSION = 0.7.2 +DSTAT_SOURCE = dstat-$(DSTAT_VERSION).tar.bz2 +DSTAT_SITE = http://dag.wieers.com/home-made/dstat +DSTAT_LICENSE = GPLv2 +DSTAT_LICENSE_FILES = COPYING + +define DSTAT_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/dt/0001-adjust-os-symlink.patch b/package/dt/0001-adjust-os-symlink.patch new file mode 100644 index 0000000000..1af9d64d67 --- /dev/null +++ b/package/dt/0001-adjust-os-symlink.patch @@ -0,0 +1,19 @@ +Don't force build-dir-in-build-dir logic, symlink the os-specific SCSI +support file in place. + +Status: not suitable for upstream. + +Signed-off-by: Gustavo Zacarias + +diff -Nura Makefile.linux Makefile.linux +--- a/Makefile.linux 2016-01-26 09:10:03.939963780 -0300 ++++ b/Makefile.linux 2016-01-26 09:10:27.140763863 -0300 +@@ -129,7 +129,7 @@ + echo "Please specify OS={aix,linux,hpux,solaris,windows}"; \ + exit 1; \ + fi; \ +- ln -sf ../scsilib-$(OS).c scsilib.c ++ ln -sf scsilib-$(OS).c scsilib.c + + print:; + @$(PRINTER) $(PRINTFLAGS) $(ALL_CFILES) diff --git a/package/dt/0002-dt-default-source-define.patch b/package/dt/0002-dt-default-source-define.patch new file mode 100644 index 0000000000..8c9daaeaef --- /dev/null +++ b/package/dt/0002-dt-default-source-define.patch @@ -0,0 +1,20 @@ +Patch taken from Fedora: +http://pkgs.fedoraproject.org/cgit/rpms/dt.git/commit/dt-default-source-define.patch?id=a3107b34a3efc6af66a5f892514f233bb66eb6b5 + +_BSD_SOURCE was deprecated, hence switch to use _DEFAULT_SOURCE as well +to avoid the build from breaking on newer toolchains. + +Signed-off-by: Gustavo Zacarias + +diff -rupN dt.v18.32.old/common.h dt.v18.32/common.h +--- dt.v18.32.old/common.h 2013-03-01 23:52:30.000000000 +0100 ++++ dt.v18.32/common.h 2014-09-24 17:41:40.777604710 +0200 +@@ -127,7 +127,7 @@ typedef volatile slarge_t v_slarge; + + #endif /* defined(_WIN64) */ + +-#elif defined(__GNUC__) && defined(_BSD_SOURCE) || defined(SCO) || defined(__QNXNTO__) || defined(SOLARIS) || defined(HP_UX) || defined(AIX) || defined(_NT_SOURCE) ++#elif defined(__GNUC__) && defined(_BSD_SOURCE) || defined (_DEFAULT_SOURCE) || defined(SCO) || defined(__QNXNTO__) || defined(SOLARIS) || defined(HP_UX) || defined(AIX) || defined(_NT_SOURCE) + + #define QuadIsLongLong + typedef unsigned long long int large_t; diff --git a/package/dt/Config.in b/package/dt/Config.in new file mode 100644 index 0000000000..848e251b60 --- /dev/null +++ b/package/dt/Config.in @@ -0,0 +1,21 @@ +comment "dt needs a (e)glibc or uclibc toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_DT + bool "dt" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + # Build fails because of several BSDisms + depends on !BR2_TOOLCHAIN_USES_MUSL + help + dt is a generic data test program used to verify proper + operation of peripherals, file systems, device drivers, + or any data stream supported by the operating system. + In its' simplest mode of operation, dt writes and then + verifys its' default data pattern, then displays + performance statisics and other test parameters + before exiting. Since verification of data is performed, + dt can be thought of as a generic diagnostic tool. + + http://www.scsifaq.org/RMiller_Tools/dt.html diff --git a/package/dt/dt.hash b/package/dt/dt.hash new file mode 100644 index 0000000000..7cd8c643e1 --- /dev/null +++ b/package/dt/dt.hash @@ -0,0 +1,5 @@ +# From http://pkgs.fedoraproject.org/repo/pkgs/dt/dt-source-v18.32.tar.gz +# (directory name is md5 hash) +md5 3054aeaaba047a1dbe90c2132a382ee2 dt-source-v18.32.tar.gz +# Calculated based on the hash above +sha256 10d164676e918a4d07f233bcd11e4cb6bfd1052c996182cd1827ccd0c063fcc6 dt-source-v18.32.tar.gz diff --git a/package/dt/dt.mk b/package/dt/dt.mk new file mode 100644 index 0000000000..8ec7788883 --- /dev/null +++ b/package/dt/dt.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# dt +# +################################################################################ + +DT_VERSION = v18.32 +DT_SITE = http://pkgs.fedoraproject.org/repo/pkgs/dt/$(DT_SOURCE)/3054aeaaba047a1dbe90c2132a382ee2 +DT_SOURCE = dt-source-$(DT_VERSION).tar.gz +DT_STRIP_COMPONENTS = 2 +DT_LICENSE = ISC-like +DT_LICENSE_FILES = LICENSE + +DT_CFLAGS = \ + -std=c99 \ + -DMMAP \ + -D__linux__ \ + -D_GNU_SOURCE \ + -D_FILE_OFFSET_BITS=64 \ + -DTHREADS \ + -DSCSI + +# uClibc doesn't provide POSIX AIO +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),) +DT_CFLAGS += -DAIO +endif + +define DT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) -f Makefile.linux \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) $(DT_CFLAGS)" \ + OS=linux +endef + +define DT_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/dt $(TARGET_DIR)/usr/bin/dt +endef + +$(eval $(generic-package)) diff --git a/package/dtach/Config.in b/package/dtach/Config.in new file mode 100644 index 0000000000..bea112b36d --- /dev/null +++ b/package/dtach/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_DTACH + bool "dtach" + depends on BR2_USE_MMU # fork() + help + dtach is a tiny program that emulates the detach feature of screen, + allowing you to run a program in an environment that is protected + from the controlling terminal and attach to it later. + + http://dtach.sourceforge.net/ diff --git a/package/dtach/dtach.hash b/package/dtach/dtach.hash new file mode 100644 index 0000000000..c9b7a4c5a8 --- /dev/null +++ b/package/dtach/dtach.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 16614ebddf8ab2811d3dc0e7f329c7de88929ac6a9632d4cb4aef7fe11b8f2a9 dtach-0.8.tar.gz diff --git a/package/dtach/dtach.mk b/package/dtach/dtach.mk new file mode 100644 index 0000000000..5f5a90321e --- /dev/null +++ b/package/dtach/dtach.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# dtach +# +################################################################################ + +DTACH_VERSION = 0.8 +DTACH_SITE = http://downloads.sourceforge.net/project/dtach/dtach/$(DTACH_VERSION) +DTACH_LICENSE = GPLv2+ +DTACH_LICENSE_FILES = COPYING + +# The Makefile does not have an install target. +define DTACH_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/dtach $(TARGET_DIR)/usr/bin/dtach +endef + +$(eval $(autotools-package)) diff --git a/package/dtc/0002-extra-cflags.patch b/package/dtc/0002-extra-cflags.patch new file mode 100644 index 0000000000..f070692c0f --- /dev/null +++ b/package/dtc/0002-extra-cflags.patch @@ -0,0 +1,32 @@ +Makefile: append the CFLAGS to existing ones + +Allow the user to pass custom CFLAGS (eg. optimisation flags). + +Do not use EXTRA_CFLAGS, append to existing CFLAGS with += (Arnout) + +Signed-off-by: "Yann E. MORIN" +Cc: Arnout Vandecappelle + +--- +Patch not sent upstream. + +Although not specific to buildroot, I am not sure this is the best +way to handle user-supplied CFLAGS. + +diff --git a/Makefile b/Makefile +index 962f94eba661..bf6b317158cf 100644 +--- a/Makefile ++++ b/Makefile +@@ -16,9 +16,10 @@ LOCAL_VERSION = + CONFIG_LOCALVERSION = + + CPPFLAGS = -I libfdt -I . +-WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ ++WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \ + -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow +-CFLAGS = -g -Os -fPIC -Werror $(WARNINGS) ++CFLAGS ?= -g -Os ++CFLAGS += -fPIC $(WARNINGS) + + BISON = bison + LEX = flex diff --git a/package/dtc/Config.in b/package/dtc/Config.in new file mode 100644 index 0000000000..39223f7226 --- /dev/null +++ b/package/dtc/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_DTC + bool "dtc (libfdt)" + depends on !BR2_STATIC_LIBS + help + The Device Tree Compiler, dtc, takes as input a device-tree in + a given format and outputs a device-tree in another format. + + Note that only the library is installed. + If you want the programs, say 'y' here, and to "dtc programs", below. + + https://git.kernel.org/cgit/utils/dtc/dtc.git + +if BR2_PACKAGE_DTC + +config BR2_PACKAGE_DTC_PROGRAMS + bool "dtc programs" + help + Say 'y' here if you also want the programs on the target: + - convert-dtsv0 convert from version 0 to version 1 + - dtc the device tree compiler + - dtdiff compare two device trees (needs bash) + - fdtdump print a readable version of a flat device tree + - fdtget read values from device tree + - fdtput write a property value to a device tree + + Note: dtdiff requires bash, so if bash is not selected, dtdiff will + be removed from the target file system. Enable bash if you + need dtdiff on the target. + +comment "dtdiff will not be installed: it requires bash" + depends on BR2_PACKAGE_DTC_PROGRAMS + depends on !BR2_PACKAGE_BASH + +endif + +comment "dtc needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/dtc/Config.in.host b/package/dtc/Config.in.host new file mode 100644 index 0000000000..cbabf0a240 --- /dev/null +++ b/package/dtc/Config.in.host @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_DTC + bool "host dtc" + help + The Device Tree Compiler, dtc, takes as input a device-tree in + a given format and outputs a device-tree in another format. + + Install host tools: dtc, convert-dtsv0, fdtdump, fdtget and fdtput. + + https://git.kernel.org/cgit/utils/dtc/dtc.git diff --git a/package/dtc/dtc.hash b/package/dtc/dtc.hash new file mode 100644 index 0000000000..8b3af331fd --- /dev/null +++ b/package/dtc/dtc.hash @@ -0,0 +1,2 @@ +# from https://www.kernel.org/pub/software/utils/dtc/sha256sums.asc +sha256 77992ad8eac7b68f553d0ba58e5b51604ac803d126196c99e3ae38aaae28bb94 dtc-1.4.1.tar.xz diff --git a/package/dtc/dtc.mk b/package/dtc/dtc.mk new file mode 100644 index 0000000000..f3b6f3b543 --- /dev/null +++ b/package/dtc/dtc.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# dtc +# +################################################################################ + +DTC_VERSION = 1.4.1 +DTC_SOURCE = dtc-$(DTC_VERSION).tar.xz +DTC_SITE = https://www.kernel.org/pub/software/utils/dtc +DTC_LICENSE = GPLv2+/BSD-2c +DTC_LICENSE_FILES = README.license GPL +DTC_INSTALL_STAGING = YES +DTC_DEPENDENCIES = host-bison host-flex + +define DTC_POST_INSTALL_TARGET_RM_DTDIFF + rm -f $(TARGET_DIR)/usr/bin/dtdiff +endef + +ifeq ($(BR2_PACKAGE_DTC_PROGRAMS),y) + +DTC_LICENSE += (for the library), GPLv2+ (for the executables) +DTC_INSTALL_GOAL = install +ifeq ($(BR2_PACKAGE_BASH),) +DTC_POST_INSTALL_TARGET_HOOKS += DTC_POST_INSTALL_TARGET_RM_DTDIFF +endif + +else # $(BR2_PACKAGE_DTC_PROGRAMS) != y + +DTC_INSTALL_GOAL = install-lib + +endif # $(BR2_PACKAGE_DTC_PROGRAMS) != y + +define DTC_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=/usr +endef + +# For staging, only the library is needed +define DTC_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) PREFIX=/usr install-lib \ + install-includes +endef + +define DTC_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr $(DTC_INSTALL_GOAL) +endef + +# host build +define HOST_DTC_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr +endef + +define HOST_DTC_INSTALL_CMDS + $(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr install-bin +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/dtv-scan-tables/Config.in b/package/dtv-scan-tables/Config.in new file mode 100644 index 0000000000..e102ca730c --- /dev/null +++ b/package/dtv-scan-tables/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_DTV_SCAN_TABLES + bool "dtv-scan-tables" + help + The Digital TV scan tables. + + http://git.linuxtv.org/dtv-scan-tables.git diff --git a/package/dtv-scan-tables/dtv-scan-tables.mk b/package/dtv-scan-tables/dtv-scan-tables.mk new file mode 100644 index 0000000000..d78dd82cfb --- /dev/null +++ b/package/dtv-scan-tables/dtv-scan-tables.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# dtv-scan-tables +# +################################################################################ + +DTV_SCAN_TABLES_VERSION = 61c8339d686b2d98d5604c26a777cb3c1f3d84a1 +DTV_SCAN_TABLES_SITE = http://git.linuxtv.org/cgit.cgi/dtv-scan-tables.git +DTV_SCAN_TABLES_SITE_METHOD = git + +# This package only contains the transponders data. This is not a 'work' +# as per traditional copyright, but just a collection of 'facts', so there's +# probably no license to apply to these data files. +# However, the package prominently contains the COPYING and COPYING.LIB +# license files (respectively for the GPLv2 and the LGPLv2.1), so we use +# that as the licensing information. +DTV_SCAN_TABLES_LICENSE = GPLv2, LGPLv2.1 +DTV_SCAN_TABLES_LICENSE_FILES = COPYING COPYING.LGPL + +define DTV_SCAN_TABLES_INSTALL_TARGET_CMDS + for f in atsc dvb-c dvb-s dvb-t; do \ + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/dvb/$$f; \ + $(INSTALL) $(@D)/$$f/* $(TARGET_DIR)/usr/share/dvb/$$f; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/duma/0001-fix-cross-compilation.patch b/package/duma/0001-fix-cross-compilation.patch new file mode 100644 index 0000000000..eceaf06bec --- /dev/null +++ b/package/duma/0001-fix-cross-compilation.patch @@ -0,0 +1,37 @@ +Allow cross compilation. Adapted from crosstool-ng. + +Signed-off-by: Baruch Siach + +Index: b/GNUmakefile +=================================================================== +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -93,10 +93,6 @@ + # also define 'WIN32' + + # some defaults: +-CC=gcc +-CXX=g++ +-AR=ar +-RANLIB=ranlib + INSTALL=install + RM=rm + RMFORCE=rm -f +@@ -471,7 +467,7 @@ + + createconf$(EXEPOSTFIX): createconf.o + - $(RMFORCE) createconf$(EXEPOSTFIX) +- $(CC) $(CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX) ++ $(CC_FOR_BUILD) $(HOST_CFLAGS) $(DUMA_OPTIONS) createconf.o -o createconf$(EXEPOSTFIX) + + tstheap$(EXEPOSTFIX): libduma.a tstheap.o + - $(RMFORCE) tstheap$(EXEPOSTFIX) +@@ -532,7 +528,7 @@ + # define rules how to build objects for createconf + # + createconf.o: +- $(CC) $(CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@ ++ $(CC_FOR_BUILD) $(HOST_CFLAGS) $(DUMA_OPTIONS) -c createconf.c -o $@ + + + # diff --git a/package/duma/0002-no-tests.patch b/package/duma/0002-no-tests.patch new file mode 100644 index 0000000000..6fe76f725f --- /dev/null +++ b/package/duma/0002-no-tests.patch @@ -0,0 +1,19 @@ +Do not build test programs + +Biulding test programs does not work when we want to do a static link, +because duma.a redefines memcpy and strcpy, so the link fails. + +Signed-off-by: "Yann E. MORIN" + +diff -durN duma-2.5.15.orig/GNUmakefile duma-2.5.15/GNUmakefile +--- duma-2.5.15.orig/GNUmakefile 2014-11-16 14:47:05.874448560 +0100 ++++ duma-2.5.15/GNUmakefile 2014-11-16 14:54:50.792048921 +0100 +@@ -294,7 +294,7 @@ + SO_OBJECTS=dumapp_so.o duma_so.o sem_inc_so.o print_so.o + + # Make all the top-level targets the makefile knows about. +-all: libduma.a tstheap$(EXEPOSTFIX) dumatest$(EXEPOSTFIX) thread-test$(EXEPOSTFIX) testmt$(EXEPOSTFIX) dumatestpp$(EXEPOSTFIX) testoperators$(EXEPOSTFIX) $(DUMA_DYN_DEPS) ++all: libduma.a $(DUMA_DYN_DEPS) + + # Perform self tests on the program this makefile builds. + check test: diff --git a/package/duma/Config.in b/package/duma/Config.in new file mode 100644 index 0000000000..b1f55faa73 --- /dev/null +++ b/package/duma/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_DUMA + bool "duma" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + # By design, duma uses page mapping to isolate + # allocations. Non-MMU platforms cannot perform such + # things. + depends on BR2_USE_MMU + # duma works using LD_PRELOAD, so it always needs to build a + # shared library + depends on !BR2_STATIC_LIBS + help + D.U.M.A. - Detect Unintended Memory Access. A fork of the + Electric Fence library. Detects buffer overflow and + underflow, and also memory leaks. + + http://duma.sourceforge.net + +if BR2_PACKAGE_DUMA + +config BR2_PACKAGE_DUMA_NO_LEAKDETECTION + bool "disable memory leak detection" + +endif # BR2_PACKAGE_DUMA + +comment "duma needs a toolchain w/ C++, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/duma/duma.hash b/package/duma/duma.hash new file mode 100644 index 0000000000..f664d4033b --- /dev/null +++ b/package/duma/duma.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 baaf794854e3093ad1bddadbfb8ad4b220a7117d70359ee216bd59e353734e17 duma_2_5_15.tar.gz diff --git a/package/duma/duma.mk b/package/duma/duma.mk new file mode 100644 index 0000000000..5e862ab25e --- /dev/null +++ b/package/duma/duma.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# duma +# +################################################################################ + +DUMA_VERSION = 2.5.15 +DUMA_SOURCE = duma_$(subst .,_,$(DUMA_VERSION)).tar.gz +DUMA_SITE = http://downloads.sourceforge.net/project/duma/duma/$(DUMA_VERSION) +DUMA_LICENSE = GPLv2+ LGPLv2.1+ +DUMA_LICENSE_FILES = COPYING-GPL COPYING-LGPL + +DUMA_INSTALL_STAGING = YES + +DUMA_OPTIONS = \ + $(if $(BR2_PACKAGE_DUMA_NO_LEAKDETECTION),-DDUMA_LIB_NO_LEAKDETECTION) + +# The dependency of some source files in duma_config.h, which is generated at +# build time, is not specified in the Makefile. Force non-parallel build. +define DUMA_BUILD_CMDS + $(MAKE1) $(TARGET_CONFIGURE_OPTS) \ + OS=linux \ + DUMA_OPTIONS="$(DUMA_OPTIONS)" \ + $(DUMA_CPP) -C $(@D) +endef + +define DUMA_INSTALL_STAGING_CMDS + $(MAKE) OS=linux prefix=$(STAGING_DIR)/usr install -C $(@D) +endef + +define DUMA_INSTALL_TARGET_CMDS + $(MAKE) OS=linux prefix=$(TARGET_DIR)/usr install -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/dvb-apps/0001-Fix-generate-keynames.patch b/package/dvb-apps/0001-Fix-generate-keynames.patch new file mode 100644 index 0000000000..498607d97d --- /dev/null +++ b/package/dvb-apps/0001-Fix-generate-keynames.patch @@ -0,0 +1,30 @@ +Fix generate-keynames.sh script for cross-compilation + +generate-keynames.sh reads /usr/include/linux to find the keyname +symbols. However, when cross-compiling, the include path points +somewhere else. Allow the user to pass CROSS_ROOT to point to the +root of the cross-compilation environment. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- +diff -rup dvb-apps-83c746462ccb.orig/util/av7110_loadkeys/generate-keynames.sh dvb-apps-83c746462ccb/util/av7110_loadkeys/generate-keynames.sh +--- dvb-apps-83c746462ccb.orig/util/av7110_loadkeys/generate-keynames.sh 2012-12-06 10:38:07.000000000 +0100 ++++ dvb-apps-83c746462ccb/util/av7110_loadkeys/generate-keynames.sh 2013-08-29 21:47:09.717991439 +0200 +@@ -18,7 +18,7 @@ echo "};" >> $1 + echo >> $1 + echo >> $1 + echo "static struct input_key_name key_name [] = {" >> $1 +-for x in $(cat /usr/include/linux/input.h input_fake.h | \ ++for x in $(cat ${CROSS_ROOT}/usr/include/linux/input.h input_fake.h | \ + egrep "#define[ \t]+KEY_" | grep -v KEY_MAX | \ + cut -f 1 | cut -f 2 -d " " | sort -u) ; do + echo " { \"$(echo $x | cut -b 5-)\", $x }," >> $1 +@@ -26,7 +26,7 @@ done + echo "};" >> $1 + echo >> $1 + echo "static struct input_key_name btn_name [] = {" >> $1 +-for x in $(cat /usr/include/linux/input.h input_fake.h | \ ++for x in $(cat ${CROSS_ROOT}/usr/include/linux/input.h input_fake.h | \ + egrep "#define[ \t]+BTN_" | \ + cut -f 1 | cut -f 2 -d " " | sort -u) ; do + echo " { \"$(echo $x | cut -b 5-)\", $x }," >> $1 diff --git a/package/dvb-apps/0002-Fix-compiler-warning-flags.patch b/package/dvb-apps/0002-Fix-compiler-warning-flags.patch new file mode 100644 index 0000000000..9c6276beb7 --- /dev/null +++ b/package/dvb-apps/0002-Fix-compiler-warning-flags.patch @@ -0,0 +1,44 @@ +From 9b8f1df41f7579da63c27763ff184d351e4c7fef Mon Sep 17 00:00:00 2001 +From: Simon Dawson +Date: Sun, 4 Jan 2015 12:06:18 +0100 +Subject: [PATCH] Fix compiler warning flags + + When building for bfin, the build fails as follows. + + cc1: error: unrecognized command line option "-Wno-packed-bitfield-compat" + +An example of an autobuild failure arising from this is the following. + + http://autobuild.buildroot.net/results/92e/92e472004812a3616f62d766a9ea07a997a66e89/ + http://autobuild.buildroot.net/results/6e7/6e7b48ad9768349d983985c3067c4267cde80541/ + +Clearly, not all toolchains provide a gcc that understands +the -Wno-packed-bitfield-compat flag; remove usage of this flag. + +Wno-packed-bitfield-compat option was added in gcc 4.4. + +[Romain: + - This patch is also needed for bfin toolchains which use gcc 4.3.5 + - Add a link to bfin build failure] +Signed-off-by: Simon Dawson +Signed-off-by: Romain Naour +--- + util/scan/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/util/scan/Makefile b/util/scan/Makefile +index d48c478..88667c5 100644 +--- a/util/scan/Makefile ++++ b/util/scan/Makefile +@@ -14,7 +14,7 @@ inst_bin = $(binaries) + + removing = atsc_psip_section.c atsc_psip_section.h + +-CPPFLAGS += -Wno-packed-bitfield-compat -D__KERNEL_STRICT_NAMES ++CPPFLAGS += -D__KERNEL_STRICT_NAMES + + .PHONY: all + +-- +1.9.3 + diff --git a/package/dvb-apps/0003-handle-static-shared-only-build.patch b/package/dvb-apps/0003-handle-static-shared-only-build.patch new file mode 100644 index 0000000000..4dc7c68ac2 --- /dev/null +++ b/package/dvb-apps/0003-handle-static-shared-only-build.patch @@ -0,0 +1,44 @@ +From a826c7c722db40bfedf00e51ce38411550ae8216 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Thu, 25 Dec 2014 19:22:16 +0100 +Subject: [PATCH] Make.rules: Handle static/shared only build + +Do not build .a library when enable_static is set to "no" +Do not build .so library when enable_shared is set to "no" + +Signed-off-by: Romain Naour +--- + Make.rules | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/Make.rules b/Make.rules +index 3410d7b..d274e16 100644 +--- a/Make.rules ++++ b/Make.rules +@@ -9,7 +9,13 @@ ifneq ($(lib_name),) + CFLAGS_LIB ?= -fPIC + CFLAGS += $(CFLAGS_LIB) + +-libraries = $(lib_name).so $(lib_name).a ++ifneq ($(enable_static),no) ++libraries += $(lib_name).a ++endif ++ ++ifneq ($(enable_shared),no) ++libraries += $(lib_name).so ++endif + + .PHONY: library + +@@ -23,7 +29,7 @@ prerequisites = $(subst .o,.d,$(objects)) $(addsuffix .d,$(binaries)) + + .PHONY: clean install + +-ifeq ($(static),1) ++ifneq ($(enable_static),no) + LDFLAGS += -static + endif + +-- +1.9.3 + diff --git a/package/dvb-apps/0004-Makefile-remove-test.patch b/package/dvb-apps/0004-Makefile-remove-test.patch new file mode 100644 index 0000000000..45bfad914c --- /dev/null +++ b/package/dvb-apps/0004-Makefile-remove-test.patch @@ -0,0 +1,27 @@ +From c578772d6abc5fdf3ec83f632c371373e5baf9f1 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 26 Dec 2014 01:04:58 +0100 +Subject: [PATCH] Makefile: remove test + +Tests needs static libraries, remove them for shared only build. + +Signed-off-by: Romain Naour +--- + Makefile | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 65a2273..105c460 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,7 +10,6 @@ DVB_API_MINOR := $(word 3, $(shell grep -m1 "DVB_API_VERSION_MINOR" $(VERSION_FI + + all clean install: + $(MAKE) -C lib $@ +- $(MAKE) -C test $@ + $(MAKE) -C util $@ + + update: +-- +1.9.3 + diff --git a/package/dvb-apps/Config.in b/package/dvb-apps/Config.in new file mode 100644 index 0000000000..75cc14eb9b --- /dev/null +++ b/package/dvb-apps/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_DVB_APPS + bool "dvb-apps" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Install a small number of DVB test and utility programs, + including szap and dvbscan. + + http://linuxtv.org/projects.php + http://linuxtv.org/hg/dvb-apps + +comment "dvb-apps utils needs a toolchain w/ threads, headers >= 3.3" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 diff --git a/package/dvb-apps/dvb-apps.mk b/package/dvb-apps/dvb-apps.mk new file mode 100644 index 0000000000..b5b8a1f09c --- /dev/null +++ b/package/dvb-apps/dvb-apps.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# dvb-apps +# +################################################################################ + +DVB_APPS_VERSION = 3d43b280298c39a67d1d889e01e173f52c12da35 +DVB_APPS_SITE = http://linuxtv.org/hg/dvb-apps +DVB_APPS_SITE_METHOD = hg +DVB_APPS_LICENSE = GPLv2, GPLv2+, LGPLv2.1+ +DVB_APPS_LICENSE_FILES = COPYING COPYING.LGPL + +ifeq ($(BR2_ENABLE_LOCALE),) +DVB_APPS_DEPENDENCIES = libiconv +DVB_APPS_LDLIBS += -liconv +endif + +ifeq ($(BR2_STATIC_LIBS),y) +DVB_APPS_MAKE_OPTS += enable_shared=no +else ifeq ($(BR2_SHARED_LIBS),y) +DVB_APPS_MAKE_OPTS += enable_static=no +endif + +DVB_APPS_INSTALL_STAGING = YES + +define DVB_APPS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) LDLIBS="$(DVB_APPS_LDLIBS)" \ + $(MAKE) -C $(@D) CROSS_ROOT=$(STAGING_DIR) \ + $(DVB_APPS_MAKE_OPTS) +endef + +define DVB_APPS_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) $(DVB_APPS_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install +endef + +define DVB_APPS_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) $(DVB_APPS_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/dvblast/0001-missing-lm.patch b/package/dvblast/0001-missing-lm.patch new file mode 100644 index 0000000000..2efbec4648 --- /dev/null +++ b/package/dvblast/0001-missing-lm.patch @@ -0,0 +1,29 @@ +dvblast: fix static linking + +dvblast links to -lev, wihch uses functions from the maths library, +like floor(). + +When linking to a shared libev.so, that dependency is automatically +pulled in because libev as a DT_NEEDED ELF tag on libm.so. + +But when lnking to the static libev.a, since there is no way to express +such dependencies in static libraries, libm is not pulled in, which +leads to build failures such as; + http://autobuild.buildroot.org/results/1f0/1f02f84fb926839a1adbe3af457bb909fdc44433/build-end.log + +Fix that by always linking to -lm (which must come *after* -lev). + +Signed-off-by: "Yann E. MORIN" + +diff -durN dvblast-3.0.orig/Makefile dvblast-3.0/Makefile +--- dvblast-3.0.orig/Makefile 2015-10-05 17:51:14.000000000 +0200 ++++ dvblast-3.0/Makefile 2015-10-30 15:57:19.547123894 +0100 +@@ -28,7 +28,7 @@ + LDLIBS += -lstreammaster + endif + +-LDLIBS_DVBLAST += -lpthread -lev ++LDLIBS_DVBLAST += -lpthread -lev -lm + + OBJ_DVBLAST = dvblast.o util.o dvb.o udp.o asi.o demux.o output.o en50221.o comm.o mrtg-cnt.o asi-deltacast.o + OBJ_DVBLASTCTL = util.o dvblastctl.o diff --git a/package/dvblast/0002-fix-int-types.patch b/package/dvblast/0002-fix-int-types.patch new file mode 100644 index 0000000000..d741cc6cb6 --- /dev/null +++ b/package/dvblast/0002-fix-int-types.patch @@ -0,0 +1,24 @@ +Standard integer types are uintXX_t not u_intXX_t + +This fixes the build with the musl C library. + +Signed-off-by: "Yann E. MORIN" + +diff -durN dvblast-3.0.orig/dvblast.h dvblast-3.0/dvblast.h +--- dvblast-3.0.orig/dvblast.h 2015-10-05 17:51:14.000000000 +0200 ++++ dvblast-3.0/dvblast.h 2015-10-30 16:29:25.586125193 +0100 +@@ -49,10 +49,10 @@ + * Raw udp packet structure with flexible-array payload + *****************************************************************************/ + struct udpheader { // FAVOR_BSD hell ... +- u_int16_t source; +- u_int16_t dest; +- u_int16_t len; +- u_int16_t check; ++ uint16_t source; ++ uint16_t dest; ++ uint16_t len; ++ uint16_t check; + }; + + #if defined(__FreeBSD__) || defined(__APPLE__) diff --git a/package/dvblast/Config.in b/package/dvblast/Config.in new file mode 100644 index 0000000000..1ea8f93416 --- /dev/null +++ b/package/dvblast/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_DVBLAST + bool "dvblast" + select BR2_PACKAGE_BITSTREAM + select BR2_PACKAGE_LIBEV + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on !BR2_bfin # libev + depends on BR2_TOOLCHAIN_HAS_THREADS + help + DVBlast is a simple and powerful MPEG-2/TS demux and + streaming application. + + http://www.videolan.org/projects/dvblast.html + +comment 'dvblast needs a toolchain w/ threads' + depends on !BR2_bfin # libev + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/dvblast/dvblast.hash b/package/dvblast/dvblast.hash new file mode 100644 index 0000000000..198549f4c0 --- /dev/null +++ b/package/dvblast/dvblast.hash @@ -0,0 +1,4 @@ +# from https://get.videolan.org/dvblast/3.0/dvblast-3.0.tar.bz2.md5 +md5 89ea9ffb16476d47b8853e52a8a3ee63 dvblast-3.0.tar.bz2 +# locally calculated +sha256 4fc3eb2a3d3545cb76a5c515a16671d1c34fe2f5dad57b71e89bd54c14c3045e dvblast-3.0.tar.bz2 diff --git a/package/dvblast/dvblast.mk b/package/dvblast/dvblast.mk new file mode 100644 index 0000000000..ef9a6669e3 --- /dev/null +++ b/package/dvblast/dvblast.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# dvblast +# +################################################################################ + +DVBLAST_VERSION = 3.0 +DVBLAST_SOURCE = dvblast-$(DVBLAST_VERSION).tar.bz2 +DVBLAST_SITE = https://get.videolan.org/dvblast/$(DVBLAST_VERSION) +DVBLAST_LICENSE = GPLv2+, WTFPL +DVBLAST_LICENSE_FILES = COPYING COPYING.WTFPL +DVBLAST_DEPENDENCIES = bitstream libev + +DVBLAST_MAKE_ENV = $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +DVBLAST_DEPENDENCIES += libiconv +DVBLAST_MAKE_ENV += LDLIBS=-liconv +endif + +define DVBLAST_BUILD_CMDS + $(DVBLAST_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define DVBLAST_INSTALL_TARGET_CMDS + $(DVBLAST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr install +endef + +$(eval $(generic-package)) diff --git a/package/dvbsnoop/0001-musl-types-h.patch b/package/dvbsnoop/0001-musl-types-h.patch new file mode 100644 index 0000000000..1149df0d07 --- /dev/null +++ b/package/dvbsnoop/0001-musl-types-h.patch @@ -0,0 +1,15 @@ +Fix musl build + +Signed-off-by: Bernd Kuhls + +diff -uNr dvbsnoop-1.4.50.org/src/misc/helper.h dvbsnoop-1.4.50/src/misc/helper.h +--- dvbsnoop-1.4.50.org/src/misc/helper.h 2006-01-02 20:04:56.000000000 +0100 ++++ dvbsnoop-1.4.50/src/misc/helper.h 2016-01-24 14:35:02.000000000 +0100 +@@ -16,6 +16,7 @@ + #ifndef __HELPER_H + #define __HELPER_H + ++#include + + u_long outBit_Sx (int verbosity, const char *text, u_char *buf, int startbit, int bitlen); + u_long outBit_Sx_NL (int verbosity, const char *text, u_char *buf, int startbit, int bitlen); diff --git a/package/dvbsnoop/Config.in b/package/dvbsnoop/Config.in new file mode 100644 index 0000000000..fc34c349f1 --- /dev/null +++ b/package/dvbsnoop/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_DVBSNOOP + bool "dvbsnoop" + help + Dvbsnoop is just a simple tool to analyze, view or debug a transport + stream (TS), program elementary stream (PES) or even a program stream + (PS). Dvbsnoop is trying to get input mostly direct from a frontend + (satellite or cable tuner inside a set-top box for example) via DVB + APIv3 to view into a TS, or a demux to view PES or PS (also mostly + inside the set-top box or even PCI Card or USB Plug) but also from a + file (recorded TS). + Dvbsnoop is working well on SD transport streams but may have some + limited functionality on HD transport streams (DVB-{C,S,T}2 because + of missing knowledge how to handle it. + + Dvbsnoop itself doesn't do the tuning on the frontend, this has to be + done by external helpers or manually driver call. + The dvbsnoop tool was written while developing the software Neutrino + on the set-top box DBox2. + + http://dvbsnoop.sourceforge.net + http://en.wikipedia.org/wiki/DBox2 diff --git a/package/dvbsnoop/dvbsnoop.hash b/package/dvbsnoop/dvbsnoop.hash new file mode 100644 index 0000000000..05939f9e31 --- /dev/null +++ b/package/dvbsnoop/dvbsnoop.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 7658498b26a5d2a0242e81f0cfafa0e43a2bec56f8674e7ac197dfc310866ec6 dvbsnoop-1.4.50.tar.gz diff --git a/package/dvbsnoop/dvbsnoop.mk b/package/dvbsnoop/dvbsnoop.mk new file mode 100644 index 0000000000..3bd8f8191d --- /dev/null +++ b/package/dvbsnoop/dvbsnoop.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# dvbsnoop +# +################################################################################ + +DVBSNOOP_VERSION = 1.4.50 +DVBSNOOP_SITE = http://downloads.sourceforge.net/project/dvbsnoop/dvbsnoop/dvbsnoop-$(DVBSNOOP_VERSION) +DVBSNOOP_LICENSE = GPLv2 +DVBSNOOP_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/dvdauthor/0001-configure.ac-fix-static-build.patch b/package/dvdauthor/0001-configure.ac-fix-static-build.patch new file mode 100644 index 0000000000..0e016b8cb4 --- /dev/null +++ b/package/dvdauthor/0001-configure.ac-fix-static-build.patch @@ -0,0 +1,55 @@ +From da77704c575f0583fa871ff02bd52906a7979576 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 15 Feb 2015 11:05:43 +0100 +Subject: [PATCH] configure.ac: fix static build + +Add LT_INIT macro to handle --enable-shared option. + +If enable-shared=no then add --static flag to resolve FREETYPE_LIBS. + +Otherwise, dvdauthor forget to link witk -lbz2 when linking with freetype2. + +Fixes: +http://autobuild.buildroot.net/results/1d8/1d83390a3dd9f6bb595e9fc7b321500b4dc533a8/ + +Signed-off-by: Romain Naour +--- + configure.ac | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index c43df92..d78d56a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4,6 +4,7 @@ AM_CONFIG_HEADER(src/config.h) + AC_CONFIG_AUX_DIR(autotools) + + AM_INIT_AUTOMAKE ++LT_INIT + + AC_PROG_INSTALL + +@@ -39,6 +40,11 @@ PKG_CHECK_MODULES(LIBPNG, [libpng]) + AC_SUBST(LIBPNG_CFLAGS) + AC_SUBST(LIBPNG_LIBS) + ++config_static='' ++if test "$enable_shared" = 'no'; then ++ config_static='--static' ++fi ++ + usemagick=0 + + AC_CHECK_PROGS(MAGICKCONFIG, [Magick-config]) +@@ -95,7 +101,7 @@ AC_SUBST(FRIBIDI_LIBS) + AC_CHECK_PROGS(FREETYPECONFIG, [freetype-config]) + if test -n "$FREETYPECONFIG"; then + FREETYPE_CPPFLAGS="`$FREETYPECONFIG --cflags`" +- FREETYPE_LIBS="`$FREETYPECONFIG --libs`" ++ FREETYPE_LIBS="`$FREETYPECONFIG --libs $config_static`" + AC_DEFINE(HAVE_FREETYPE, 1, [Whether FreeType is available]) + + ac_save_CPPFLAGS="$CPPFLAGS" +-- +1.9.3 + diff --git a/package/dvdauthor/Config.in b/package/dvdauthor/Config.in new file mode 100644 index 0000000000..6f8e2e4380 --- /dev/null +++ b/package/dvdauthor/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_DVDAUTHOR + bool "dvdauthor" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_LIBPNG + help + DVDAuthor is a set of tools to help you author the file and directory + structure of a DVD-Video disc, including programmatic commands for + implementing interactive behaviour. It is driven by command lines and + XML control files, though there are other programs that provide + GUI-based front ends if you prefer + + http://dvdauthor.sourceforge.net + +if BR2_PACKAGE_DVDAUTHOR + +config BR2_PACKAGE_DVDAUTHOR_DVDUNAUTHOR + bool "dvdunauthor" + select BR2_PACKAGE_LIBDVDREAD + depends on !BR2_STATIC_LIBS # libdvdread + help + This option enables the dvdunauthor program, which requires + libdvdread. + +comment "dvdunauthor needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +endif + diff --git a/package/dvdauthor/dvdauthor.hash b/package/dvdauthor/dvdauthor.hash new file mode 100644 index 0000000000..fe92b29c55 --- /dev/null +++ b/package/dvdauthor/dvdauthor.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 501fb11b09c6eb9c5a229dcb400bd81e408cc78d34eab6749970685023c51fe9 dvdauthor-0.7.1.tar.gz diff --git a/package/dvdauthor/dvdauthor.mk b/package/dvdauthor/dvdauthor.mk new file mode 100644 index 0000000000..6b90c43c3e --- /dev/null +++ b/package/dvdauthor/dvdauthor.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# dvdauthor +# +################################################################################ + +DVDAUTHOR_VERSION = 0.7.1 +DVDAUTHOR_SITE = http://sourceforge.net/projects/dvdauthor/files/dvdauthor/$(DVDAUTHOR_VERSION) +DVDAUTHOR_DEPENDENCIES = host-pkgconf libxml2 freetype libpng +DVDAUTHOR_LICENSE = GPLv2+ +DVDAUTHOR_LICENSE_FILES = COPYING +DVDAUTHOR_CONF_ENV = \ + ac_cv_prog_FREETYPECONFIG=$(STAGING_DIR)/usr/bin/freetype-config \ + ac_cv_path_XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config \ + ac_cv_prog_GMAGICKCONFIG= + +# configure.ac patched by 0001-configure.ac-fix-static-build.patch +DVDAUTHOR_AUTORECONF = YES +# add host-gettext for AM_ICONV macro +DVDAUTHOR_DEPENDENCIES += host-gettext + +ifeq ($(BR2_PACKAGE_IMAGEMAGICK),y) +DVDAUTHOR_DEPENDENCIES += imagemagick +DVDAUTHOR_CONF_ENV += \ + ac_cv_prog_MAGICKCONFIG=$(STAGING_DIR)/usr/bin/Magick-config +else +DVDAUTHOR_CONF_ENV += \ + ac_cv_prog_MAGICKCONFIG= +endif + +# Automatically detected by dvdauthor configure script, no way to +# disable. +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +DVDAUTHOR_DEPENDENCIES += fontconfig +endif + +ifeq ($(BR2_PACKAGE_LIBFRIBIDI),y) +DVDAUTHOR_DEPENDENCIES += libfribidi +endif + +ifeq ($(BR2_PACKAGE_DVDAUTHOR_DVDUNAUTHOR),y) +DVDAUTHOR_DEPENDENCIES += libdvdread +DVDAUTHOR_CONF_OPTS += --enable-dvdunauthor +else +DVDAUTHOR_CONF_OPTS += --disable-dvdunauthor +endif + +$(eval $(autotools-package)) diff --git a/package/dvdrw-tools/0001-limits.h.patch b/package/dvdrw-tools/0001-limits.h.patch new file mode 100644 index 0000000000..ccda8eeb72 --- /dev/null +++ b/package/dvdrw-tools/0001-limits.h.patch @@ -0,0 +1,23 @@ +transport.hxx: add limits.h include now needed because of kernel changes + +Signed-off-by: Steve Kenton + +diff -pruN dvd+rw-tools-7.1.ori/transport.hxx dvd+rw-tools-7.1/transport.hxx +--- dvd+rw-tools-7.1.ori/transport.hxx 2008-03-01 04:34:43.000000000 -0600 ++++ dvd+rw-tools-7.1/transport.hxx 2015-01-18 15:47:24.245863631 -0600 +@@ -9,6 +9,7 @@ + #if defined(__unix) || defined(__unix__) + #include + #include ++#include + #include + #include + #include +@@ -40,6 +41,7 @@ inline long getmsecs() + #include + #include + #include ++#include + #define ssize_t LONG_PTR + #define off64_t __int64 + diff --git a/package/dvdrw-tools/Config.in b/package/dvdrw-tools/Config.in new file mode 100644 index 0000000000..d4d6bd2cd3 --- /dev/null +++ b/package/dvdrw-tools/Config.in @@ -0,0 +1,53 @@ +comment "dvdrw-tools needs a toolchain w/ threads, C++, wchar" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_USE_WCHAR + +config BR2_PACKAGE_DVDRW_TOOLS + bool "dvdrw-tools" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + help + The dvd+rw-tools are used to master Blu-ray Disc + and DVD Disc media, both +RW/+R and -RW/-R. Note: + The +RW in the name is a historical artifact. This + package contains the widely used growisofs program. + + Buildroot does not support packages with a '+' sign + in their name, which explains why it is named + dvdrw-tools and not dvd+rw-tools. + + Because dvd+rw-tools does not directly interact with + disc media it uses a separate media backend program. + The usual backend is mkisofs from the cdrtools package. + However, cdrtools is not currently part of buildroot. + + The Linux From Scratch project uses uses xorriso for the + media backend and Ubuntu uses cdrkit for the backend. + Choose the one which seems most appropriate for your use. + NOTE: xorriso does not currently support UDF. + + http://fy.chalmers.se/~appro/linux/DVD+RW/tools + +if BR2_PACKAGE_DVDRW_TOOLS +choice + prompt "Media Backend" + help + Choose which media backend program to use. + +config BR2_PACKAGE_DVDRW_TOOLS_CDRKIT_BACKEND + bool "cdrkit" + select BR2_PACKAGE_CDRKIT + help + Symlink mkisofs to genisoimage from the cdrkit package. + +config BR2_PACKAGE_DVDRW_TOOLS_XORRISO_BACKEND + bool "xorriso" + select BR2_PACKAGE_XORRISO + help + Symlink mkisofs to xorrisofs from the xorriso package. + +endchoice +endif diff --git a/package/dvdrw-tools/dvdrw-tools.hash b/package/dvdrw-tools/dvdrw-tools.hash new file mode 100644 index 0000000000..17d48f1d1f --- /dev/null +++ b/package/dvdrw-tools/dvdrw-tools.hash @@ -0,0 +1,2 @@ +# Locally computed using sha256sum +sha256 f8d60f822e914128bcbc5f64fbe3ed131cbff9045dca7e12c5b77b26edde72ca dvd+rw-tools-7.1.tar.gz diff --git a/package/dvdrw-tools/dvdrw-tools.mk b/package/dvdrw-tools/dvdrw-tools.mk new file mode 100644 index 0000000000..24daac1bd0 --- /dev/null +++ b/package/dvdrw-tools/dvdrw-tools.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# dvdrw-tools +# +################################################################################ + +DVDRW_TOOLS_VERSION = 7.1 +DVDRW_TOOLS_SOURCE = dvd+rw-tools-$(DVDRW_TOOLS_VERSION).tar.gz +DVDRW_TOOLS_SITE = http://fy.chalmers.se/~appro/linux/DVD+RW/tools +DVDRW_TOOLS_LICENSE = GPLv2 +DVDRW_TOOLS_LICENSE_FILES = LICENSE +DVDRW_TOOLS_DEPENDENCIES = host-m4 + +define DVDRW_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +ifeq ($(BR2_PACKAGE_DVDRW_TOOLS_CDRKIT_BACKEND),y) +DVDRW_TOOLS_BACKEND = genisoimage +DVDRW_TOOLS_DEPENDENCIES += cdrkit +else ifeq ($(BR2_PACKAGE_DVDRW_TOOLS_XORRISO_BACKEND),y) +DVDRW_TOOLS_BACKEND = xorrisofs +DVDRW_TOOLS_DEPENDENCIES += xorriso +endif + +define DVDRW_TOOLS_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/dvd-ram-control $(TARGET_DIR)/usr/bin/dvd-ram-control + $(INSTALL) -m 0755 -D $(@D)/dvd+rw-booktype $(TARGET_DIR)/usr/bin/dvd+rw-booktype + $(INSTALL) -m 0755 -D $(@D)/dvd+rw-format $(TARGET_DIR)/usr/bin/dvd+rw-format + $(INSTALL) -m 0755 -D $(@D)/dvd+rw-mediainfo $(TARGET_DIR)/usr/bin/dvd+rw-mediainfo + $(INSTALL) -m 0755 -D $(@D)/growisofs $(TARGET_DIR)/usr/bin/growisofs + ln -s -f $(DVDRW_TOOLS_BACKEND) $(TARGET_DIR)/usr/bin/mkisofs +endef + +$(eval $(generic-package)) diff --git a/package/e2fsprogs/0001-sem-init-libs.patch b/package/e2fsprogs/0001-sem-init-libs.patch new file mode 100644 index 0000000000..56f1cc2c15 --- /dev/null +++ b/package/e2fsprogs/0001-sem-init-libs.patch @@ -0,0 +1,11 @@ +--- e2fsprogs-1.41.9/MCONFIG.in.orig 2009-10-07 20:25:07.000000000 +0800 ++++ e2fsprogs-1.41.9/MCONFIG.in 2009-10-07 20:21:41.000000000 +0800 +@@ -85,7 +85,7 @@ + # + LIB = $(top_builddir)/lib + LIBSS = $(LIB)/libss@LIB_EXT@ @PRIVATE_LIBS_CMT@ @DLOPEN_LIB@ +-LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ @PRIVATE_LIBS_CMT@ @SEM_INIT_LIB@ ++LIBCOM_ERR = $(LIB)/libcom_err@LIB_EXT@ @SEM_INIT_LIB@ + LIBE2P = $(LIB)/libe2p@LIB_EXT@ + LIBEXT2FS = $(LIB)/libext2fs@LIB_EXT@ + LIBUUID = @LIBUUID@ @SOCKET_LIB@ diff --git a/package/e2fsprogs/Config.in b/package/e2fsprogs/Config.in new file mode 100644 index 0000000000..e540337d7f --- /dev/null +++ b/package/e2fsprogs/Config.in @@ -0,0 +1,97 @@ +config BR2_PACKAGE_E2FSPROGS + bool "e2fsprogs" + depends on BR2_USE_WCHAR # util-linux + depends on BR2_USE_MMU # util-linux/libblkid + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + The EXT2 file system utilities. + + http://e2fsprogs.sf.net + +if BR2_PACKAGE_E2FSPROGS + +config BR2_PACKAGE_E2FSPROGS_BADBLOCKS + bool "badblocks" + default y + +config BR2_PACKAGE_E2FSPROGS_CHATTR + bool "chattr" + default y + +config BR2_PACKAGE_E2FSPROGS_DEBUGFS + bool "debugfs" + +config BR2_PACKAGE_E2FSPROGS_DUMPE2FS + bool "dumpe2fs" + default y + +config BR2_PACKAGE_E2FSPROGS_E2FREEFRAG + bool "e2freefrag" + default y + +config BR2_PACKAGE_E2FSPROGS_E2FSCK + bool "e2fsck" + default y + +config BR2_PACKAGE_E2FSPROGS_E2IMAGE + bool "e2image" + +config BR2_PACKAGE_E2FSPROGS_E2LABEL + bool "e2label" + default y + +config BR2_PACKAGE_E2FSPROGS_E2UNDO + bool "e2undo" + default y + +config BR2_PACKAGE_E2FSPROGS_E4DEFRAG + bool "e4defrag" + depends on !BR2_nios2 # fallocate not implemented + depends on !BR2_TOOLCHAIN_USES_UCLIBC # sync_file_range not impl + +comment "e4defrag needs an (e)glibc or musl toolchain" + depends on BR2_TOOLCHAIN_USES_UCLIBC + +config BR2_PACKAGE_E2FSPROGS_FILEFRAG + bool "filefrag" + default y + +config BR2_PACKAGE_E2FSPROGS_FSCK + bool "fsck" + default y + +config BR2_PACKAGE_E2FSPROGS_LOGSAVE + bool "logsave" + default y + +config BR2_PACKAGE_E2FSPROGS_LSATTR + bool "lsattr" + default y + +config BR2_PACKAGE_E2FSPROGS_MKE2FS + bool "mke2fs" + default y + +config BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND + bool "mklost+found" + default y + +config BR2_PACKAGE_E2FSPROGS_RESIZE2FS + bool "resize2fs" + +config BR2_PACKAGE_E2FSPROGS_TUNE2FS + bool "tune2fs" + default y + select BR2_PACKAGE_E2FSPROGS_E2LABEL + +config BR2_PACKAGE_E2FSPROGS_UUIDGEN + bool "uuidgen" + default y + +endif + +comment "e2fsprogs needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/e2fsprogs/Config.in.host b/package/e2fsprogs/Config.in.host new file mode 100644 index 0000000000..de9148e31d --- /dev/null +++ b/package/e2fsprogs/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_E2FSPROGS + bool "host e2fsprogs" + help + The EXT2/3/4 file system utilities. + + http://e2fsprogs.sourceforge.net diff --git a/package/e2fsprogs/e2fsprogs.hash b/package/e2fsprogs/e2fsprogs.hash new file mode 100644 index 0000000000..1585037750 --- /dev/null +++ b/package/e2fsprogs/e2fsprogs.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.42.13/sha256sums.asc +sha256 e16474b5a3a30f9197160c4b91bd48d5a463583049c0fcc405b6f0f7075aa0c7 e2fsprogs-1.42.13.tar.xz diff --git a/package/e2fsprogs/e2fsprogs.mk b/package/e2fsprogs/e2fsprogs.mk new file mode 100644 index 0000000000..3de4cd4872 --- /dev/null +++ b/package/e2fsprogs/e2fsprogs.mk @@ -0,0 +1,149 @@ +################################################################################ +# +# e2fsprogs +# +################################################################################ + +E2FSPROGS_VERSION = 1.42.13 +E2FSPROGS_SOURCE = e2fsprogs-$(E2FSPROGS_VERSION).tar.xz +E2FSPROGS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/people/tytso/e2fsprogs/v$(E2FSPROGS_VERSION) +E2FSPROGS_LICENSE = GPLv2, libuuid BSD-3c, libss and libet MIT-like with advertising clause +E2FSPROGS_LICENSE_FILES = COPYING lib/uuid/COPYING lib/ss/mit-sipb-copyright.h lib/et/internal.h +E2FSPROGS_INSTALL_STAGING = YES +E2FSPROGS_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-libs + +# e4defrag doesn't build on older systems like RHEL5.x, and we don't +# need it on the host anyway. +HOST_E2FSPROGS_CONF_OPTS += --disable-defrag + +E2FSPROGS_CONF_OPTS = \ + $(if $(BR2_STATIC_LIBS),,--enable-elf-shlibs) \ + $(if $(BR2_PACKAGE_E2FSPROGS_DEBUGFS),,--disable-debugfs) \ + $(if $(BR2_PACKAGE_E2FSPROGS_E2IMAGE),,--disable-imager) \ + $(if $(BR2_PACKAGE_E2FSPROGS_E4DEFRAG),,--disable-defrag) \ + $(if $(BR2_PACKAGE_E2FSPROGS_RESIZE2FS),,--disable-resizer) \ + --disable-uuidd \ + --disable-libblkid \ + --disable-libuuid \ + --enable-fsck \ + --disable-e2initrd-helper \ + --disable-testio-debug \ + --disable-rpath + +ifeq ($(BR2_nios2),y) +E2FSPROGS_CONF_ENV += ac_cv_func_fallocate=no +endif + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +# util-linux libuuid pulls in libintl if needed, so ensure we also +# link against it, otherwise static linking fails +E2FSPROGS_CONF_ENV += LIBS=-lintl +endif + +E2FSPROGS_DEPENDENCIES = host-pkgconf util-linux + +E2FSPROGS_MAKE_OPTS = \ + LDCONFIG=true + +define HOST_E2FSPROGS_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install install-libs +endef +# we don't have a host-util-linux +HOST_E2FSPROGS_DEPENDENCIES = host-pkgconf + +# binaries to keep or remove +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_BADBLOCKS) += usr/sbin/badblocks +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_CHATTR) += usr/bin/chattr +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_DUMPE2FS) += usr/sbin/dumpe2fs +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2FREEFRAG) += usr/sbin/e2freefrag +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2FSCK) += usr/sbin/e2fsck +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2LABEL) += usr/sbin/e2label +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E2UNDO) += usr/sbin/e2undo +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_E4DEFRAG) += usr/sbin/e4defrag +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_FILEFRAG) += usr/sbin/filefrag +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_FSCK) += usr/sbin/fsck +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LOGSAVE) += usr/sbin/logsave +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_LSATTR) += usr/bin/lsattr +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_MKE2FS) += usr/sbin/mke2fs +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_MKLOSTFOUND) += usr/sbin/mklost+found +E2FSPROGS_BINTARGETS_$(BR2_PACKAGE_E2FSPROGS_UUIDGEN) += usr/bin/uuidgen + +# files to remove +E2FSPROGS_TXTTARGETS_ = \ + usr/sbin/mkfs.ext[234] \ + usr/sbin/mkfs.ext4dev \ + usr/sbin/fsck.ext[234] \ + usr/sbin/fsck.ext4dev \ + usr/sbin/tune2fs + +define E2FSPROGS_TARGET_REMOVE_UNNEEDED + rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_BINTARGETS_)) + rm -f $(addprefix $(TARGET_DIR)/, $(E2FSPROGS_TXTTARGETS_)) +endef + +E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_REMOVE_UNNEEDED + +define E2FSPROGS_TARGET_MKE2FS_SYMLINKS + ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext2 + ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext3 + ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4 + ln -sf mke2fs $(TARGET_DIR)/usr/sbin/mkfs.ext4dev +endef + +ifeq ($(BR2_PACKAGE_E2FSPROGS_MKE2FS),y) +E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_MKE2FS_SYMLINKS +endif + +define E2FSPROGS_TARGET_E2FSCK_SYMLINKS + ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext2 + ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext3 + ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4 + ln -sf e2fsck $(TARGET_DIR)/usr/sbin/fsck.ext4dev +endef + +ifeq ($(BR2_PACKAGE_E2FSPROGS_E2FSCK),y) +E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_E2FSCK_SYMLINKS +endif + +# If BusyBox is included, its configuration may supply its own variant +# of ext2-related tools. Since Buildroot desires having full blown +# variants take precedence (in this case, e2fsprogs), we want to remove +# BusyBox's variant of e2fsprogs provided binaries. e2fsprogs targets +# /usr/{bin,sbin} where BusyBox targets /{bin,sbin}. We will attempt to +# remove BusyBox-generated ext2-related tools from /{bin,sbin}. We need +# to do this in the pre-install stage to ensure we do not accidentally +# remove e2fsprogs's binaries in usr-merged environments (ie. if they +# are removed, they would be re-installed in this package's install +# stage). +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +E2FSPROGS_DEPENDENCIES += busybox + +define E2FSPROGS_REMOVE_BUSYBOX_APPLETS + $(RM) -f $(TARGET_DIR)/bin/chattr + $(RM) -f $(TARGET_DIR)/bin/lsattr + $(RM) -f $(TARGET_DIR)/sbin/fsck + $(RM) -f $(TARGET_DIR)/sbin/tune2fs + $(RM) -f $(TARGET_DIR)/sbin/e2label +endef +E2FSPROGS_PRE_INSTALL_TARGET_HOOKS += E2FSPROGS_REMOVE_BUSYBOX_APPLETS +endif + +define E2FSPROGS_TARGET_TUNE2FS_SYMLINK + ln -sf e2label $(TARGET_DIR)/usr/sbin/tune2fs +endef + +ifeq ($(BR2_PACKAGE_E2FSPROGS_TUNE2FS),y) +E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_TUNE2FS_SYMLINK +endif + +# systemd really wants to have fsck in /sbin +define E2FSPROGS_TARGET_FSCK_SYMLINK + ln -sf ../usr/sbin/fsck $(TARGET_DIR)/sbin/fsck +endef + +ifeq ($(BR2_PACKAGE_E2FSPROGS_FSCK),y) +E2FSPROGS_POST_INSTALL_TARGET_HOOKS += E2FSPROGS_TARGET_FSCK_SYMLINK +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/e2tools/Config.in b/package/e2tools/Config.in new file mode 100644 index 0000000000..5fc55a686e --- /dev/null +++ b/package/e2tools/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_E2TOOLS + bool "e2tools" + select BR2_PACKAGE_E2FSPROGS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR # e2fsprogs + depends on BR2_USE_MMU # e2fsprogs + help + E2tools is a simple set of GPL'ed utilities to read, write, + and manipulate files in an ext2/ext3 filesystem. These + utilities access a filesystem directly using the ext2fs + library. + + https://github.com/ndim/e2tools + +comment "e2tools needs a toolchain w/ threads, wchar" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + depends on BR2_USE_MMU diff --git a/package/e2tools/Config.in.host b/package/e2tools/Config.in.host new file mode 100644 index 0000000000..859c47bdc5 --- /dev/null +++ b/package/e2tools/Config.in.host @@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_E2TOOLS + bool "host e2tools" + select BR2_PACKAGE_HOST_E2FSPROGS + help + E2tools is a simple set of GPL'ed utilities to read, write, + and manipulate files in an ext2/ext3 filesystem. These + utilities access a filesystem directly using the ext2fs + library. + + https://github.com/ndim/e2tools diff --git a/package/e2tools/e2tools.mk b/package/e2tools/e2tools.mk new file mode 100644 index 0000000000..789519fe8d --- /dev/null +++ b/package/e2tools/e2tools.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# e2tools +# +################################################################################ + +E2TOOLS_VERSION = 3158ef18a903ca4a98b8fa220c9fc5c133d8bdf6 +E2TOOLS_SITE = $(call github,ndim,e2tools,$(E2TOOLS_VERSION)) + +# Source coming from GitHub, no configure included. +E2TOOLS_AUTORECONF = YES +E2TOOLS_LICENSE = GPLv2 +E2TOOLS_LICENSE_FILES = COPYING +E2TOOLS_DEPENDENCIES = e2fsprogs +E2TOOLS_CONF_ENV = LIBS="-lpthread" +HOST_E2TOOLS_CONF_ENV = LIBS="-lpthread" + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/ebtables/Config.in b/package/ebtables/Config.in new file mode 100644 index 0000000000..fa123b196e --- /dev/null +++ b/package/ebtables/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_EBTABLES + bool "ebtables" + depends on !BR2_TOOLCHAIN_USES_MUSL # mixes userspace and kernel headers + depends on BR2_USE_MMU # fork() + help + Ethernet bridge frame table administration + + http://ebtables.netfilter.org/ + +comment "ebtables needs a glibc or uClibc toolchain" + depends on BR2_TOOLCHAIN_USES_MUSL + depends on BR2_USE_MMU diff --git a/package/ebtables/ebtables.hash b/package/ebtables/ebtables.hash new file mode 100644 index 0000000000..45262765c2 --- /dev/null +++ b/package/ebtables/ebtables.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 dc6f7b484f207dc712bfca81645f45120cb6aee3380e77a1771e9c34a9a4455d ebtables-v2.0.10-4.tar.gz diff --git a/package/ebtables/ebtables.mk b/package/ebtables/ebtables.mk new file mode 100644 index 0000000000..639593070a --- /dev/null +++ b/package/ebtables/ebtables.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# ebtables +# +################################################################################ + +EBTABLES_VERSION = 2.0.10-4 +EBTABLES_SOURCE = ebtables-v$(EBTABLES_VERSION).tar.gz +EBTABLES_SITE = http://ftp.netfilter.org/pub/ebtables +EBTABLES_LICENSE = GPLv2+ +EBTABLES_LICENSE_FILES = COPYING +EBTABLES_STATIC = $(if $(BR2_STATIC_LIBS),static) +EBTABLES_K64U32 = $(if $(BR2_KERNEL_64_USERLAND_32),-DKERNEL_64_USERSPACE_32) + +define EBTABLES_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) LIBDIR=/lib/ebtables $(EBTABLES_STATIC) \ + CFLAGS="$(TARGET_CFLAGS) $(EBTABLES_K64U32)" -C $(@D) +endef + +ifeq ($(BR2_STATIC_LIBS),y) +define EBTABLES_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/static \ + $(TARGET_DIR)/sbin/ebtables +endef +else +define EBTABLES_INSTALL_TARGET_CMDS + for so in $(@D)/$(EBTABLES_SUBDIR)/*.so \ + $(@D)/$(EBTABLES_SUBDIR)/extensions/*.so; \ + do \ + $(INSTALL) -m 0755 -D $${so} \ + $(TARGET_DIR)/lib/ebtables/`basename $${so}` || exit 1; \ + done + $(INSTALL) -m 0755 -D $(@D)/$(EBTABLES_SUBDIR)/ebtables \ + $(TARGET_DIR)/sbin/ebtables + $(INSTALL) -m 0644 -D $(@D)/ethertypes $(TARGET_DIR)/etc/ethertypes +endef +endif + +$(eval $(generic-package)) diff --git a/package/ecryptfs-utils/0001-musl.patch b/package/ecryptfs-utils/0001-musl.patch new file mode 100644 index 0000000000..4a3b8a707e --- /dev/null +++ b/package/ecryptfs-utils/0001-musl.patch @@ -0,0 +1,35 @@ +fix musl build + +Patch inspired by +https://github.com/kraj/meta-musl/blob/master/recipes-core/util-linux/util-linux-2.25/0001-switch_root-use-typeof-instead-of-__SWORD_TYPE-for-s.patch + +Signed-off-by: Bernd Kuhls + +diff -uNr ecryptfs-utils-109.org/src/utils/mount.ecryptfs_private.c ecryptfs-utils-109/src/utils/mount.ecryptfs_private.c +--- ecryptfs-utils-109.org/src/utils/mount.ecryptfs_private.c 2016-01-22 17:04:52.000000000 +0100 ++++ ecryptfs-utils-109/src/utils/mount.ecryptfs_private.c 2016-01-24 16:52:37.000000000 +0100 +@@ -224,6 +224,7 @@ + + static int check_cwd_f_type() + { ++ struct statfs buf; + /** + * This is *not* a list of compatible lower filesystems list for + * eCryptfs. This is a list of filesystems that we reasonably expect to +@@ -235,7 +236,7 @@ + * deceive other programs with a crafted /proc/self/*. See + * https://launchpad.net/bugs/1530566 for more details. + */ +- __SWORD_TYPE f_type_whitelist[] = { ++ typeof(buf.f_type) f_type_whitelist[] = { + 0x61756673 /* AUFS_SUPER_MAGIC */, + 0x9123683E /* BTRFS_SUPER_MAGIC */, + 0x00C36400 /* CEPH_SUPER_MAGIC */, +@@ -259,7 +260,6 @@ + 0x58465342 /* XFS_SB_MAGIC */, + 0x2FC12FC1 /* ZFS_SUPER_MAGIC */, + }; +- struct statfs buf; + size_t i, whitelist_len; + + if (statfs(".", &buf) != 0) { diff --git a/package/ecryptfs-utils/Config.in b/package/ecryptfs-utils/Config.in new file mode 100644 index 0000000000..cb70e000ae --- /dev/null +++ b/package/ecryptfs-utils/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_ECRYPTFS_UTILS + bool "ecryptfs-utils" + select BR2_PACKAGE_KEYUTILS + select BR2_PACKAGE_LIBNSS + # runtime dependency only, some scripts are using the + # 'gettext' program to get translations + select BR2_PACKAGE_GETTEXT + # runtime dependency only + select BR2_PACKAGE_GETENT + depends on BR2_USE_WCHAR # gettext + depends on BR2_USE_MMU # keyutils + depends on !BR2_microblaze # keyutils + depends on BR2_TOOLCHAIN_HAS_THREADS # libnss -> libnspr + depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnss -> libnspr + depends on !BR2_MIPS_NABI32 # libnss + depends on !BR2_STATIC_LIBS # libnss, keyutils + help + eCryptfs is a POSIX-compliant enterprise cryptographic + filesystem for Linux. It is stacked on top of any other + Linux filesystem, it stores cryptographic metadata in the header + of each file written. + + The eCryptfs kernel module is available in all Linux kernels + since version 2.6.19. This package provides userspace utilities + needed to mount eCryptfs. + + Files are encrypted using a passphrase. Consider building openssl + for another method. + + http://ecryptfs.org + +comment "ecryptfs-utils needs a toolchain w/ threads, wchar, dynamic library" + depends on !BR2_microblaze + depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \ + BR2_STATIC_LIBS diff --git a/package/ecryptfs-utils/ecryptfs-utils.hash b/package/ecryptfs-utils/ecryptfs-utils.hash new file mode 100644 index 0000000000..40cc17cdd6 --- /dev/null +++ b/package/ecryptfs-utils/ecryptfs-utils.hash @@ -0,0 +1,2 @@ +# From https://launchpad.net/ecryptfs/trunk/109/+download/ecryptfs-utils_109.orig.tar.gz/+md5 +md5 8e33f096c8cb8288f9c29a9936cd0d28 ecryptfs-utils_109.orig.tar.gz diff --git a/package/ecryptfs-utils/ecryptfs-utils.mk b/package/ecryptfs-utils/ecryptfs-utils.mk new file mode 100644 index 0000000000..81a4b4bd7d --- /dev/null +++ b/package/ecryptfs-utils/ecryptfs-utils.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# ecryptfs-utils +# +################################################################################ + +ECRYPTFS_UTILS_VERSION = 109 +ECRYPTFS_UTILS_SOURCE = ecryptfs-utils_$(ECRYPTFS_UTILS_VERSION).orig.tar.gz +ECRYPTFS_UTILS_SITE = https://launchpad.net/ecryptfs/trunk/$(ECRYPTFS_UTILS_VERSION)/+download +ECRYPTFS_UTILS_LICENSE = GPLv2+ +ECRYPTFS_UTILS_LICENSE_FILES = COPYING + +ECRYPTFS_UTILS_DEPENDENCIES = keyutils libnss host-intltool +ECRYPTFS_UTILS_CONF_OPTS = --disable-pywrap --disable-pam + +#Needed for build system to find pk11func.h and libnss3.so +ECRYPTFS_UTILS_CONF_ENV = \ + NSS_CFLAGS="-I$(STAGING_DIR)/usr/include/nss -I$(STAGING_DIR)/usr/include/nspr" \ + NSS_LIBS="-lnss3" + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +ECRYPTFS_UTILS_CONF_OPTS += --enable-openssl +ECRYPTFS_UTILS_DEPENDENCIES += openssl +else +ECRYPTFS_UTILS_CONF_OPTS += --disable-openssl +endif + +$(eval $(autotools-package)) diff --git a/package/ed/Config.in b/package/ed/Config.in new file mode 100644 index 0000000000..21ba79e158 --- /dev/null +++ b/package/ed/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_ED + bool "ed" + help + A line-oriented text editor. Used to create, display, modify, + and otherwise manipulate text files. Often used in scripts + rather than invoked directly. + + http://www.gnu.org/software/ed/ diff --git a/package/ed/ed.hash b/package/ed/ed.hash new file mode 100644 index 0000000000..7871fb11bf --- /dev/null +++ b/package/ed/ed.hash @@ -0,0 +1,2 @@ +# From http://lists.gnu.org/archive/html/bug-ed/2013-06/msg00001.html +md5 565b6d1d5a9a8816b9b304fc4ed9405d ed-1.9.tar.gz diff --git a/package/ed/ed.mk b/package/ed/ed.mk new file mode 100644 index 0000000000..f3bcb749b6 --- /dev/null +++ b/package/ed/ed.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# ed +# +################################################################################ + +ED_VERSION = 1.9 +ED_SITE = $(BR2_GNU_MIRROR)/ed +ED_CONF_OPTS = \ + CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" +ED_LICENSE = GPLv3+ +ED_LICENSE_FILES = COPYING + +define ED_CONFIGURE_CMDS + (cd $(@D); \ + ./configure \ + --prefix=/usr \ + $(TARGET_CONFIGURE_OPTS) \ + ) +endef + +define ED_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define ED_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install +endef + +$(eval $(generic-package)) diff --git a/package/edid-decode/Config.in b/package/edid-decode/Config.in new file mode 100644 index 0000000000..64297b494d --- /dev/null +++ b/package/edid-decode/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_EDID_DECODE + bool "edid-decode" + help + Decode EDID data in human-readable format. + + http://cgit.freedesktop.org/xorg/app/edid-decode/ diff --git a/package/edid-decode/edid-decode.mk b/package/edid-decode/edid-decode.mk new file mode 100644 index 0000000000..243ccfbea6 --- /dev/null +++ b/package/edid-decode/edid-decode.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# edid-decode +# +################################################################################ + +EDID_DECODE_VERSION = 681153145d5e05ee15032ea792e967cda06e7622 +EDID_DECODE_SITE = git://anongit.freedesktop.org/git/xorg/app/edid-decode.git +EDID_DECODE_LICENSE = MIT +EDID_DECODE_LICENSE_FILES = edid-decode.c + +define EDID_DECODE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" +endef + +define EDID_DECODE_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install +endef + +$(eval $(generic-package)) diff --git a/package/eeprog/Config.in b/package/eeprog/Config.in new file mode 100644 index 0000000000..ff313bdbae --- /dev/null +++ b/package/eeprog/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_EEPROG + bool "eeprog" + help + Simple tool to read/write i2c eeprom chips. + + http://codesink.org/eeprog.html diff --git a/package/eeprog/eeprog.hash b/package/eeprog/eeprog.hash new file mode 100644 index 0000000000..c91be72332 --- /dev/null +++ b/package/eeprog/eeprog.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 35155cc3844d2c3ae8ed6935fda72768c7f24fddc4a0fca89e4ffbb34880d9ef eeprog-0.7.6.tar.gz diff --git a/package/eeprog/eeprog.mk b/package/eeprog/eeprog.mk new file mode 100644 index 0000000000..93aeb5e372 --- /dev/null +++ b/package/eeprog/eeprog.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# eeprog +# +################################################################################ + +EEPROG_VERSION = 0.7.6 +EEPROG_SITE = http://www.codesink.org/download +EEPROG_LICENSE = GPLv2+ +EEPROG_LICENSE_FILES = eeprog.c + +define EEPROG_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define EEPROG_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/eeprog $(TARGET_DIR)/usr/bin/eeprog +endef + +$(eval $(generic-package)) diff --git a/package/efl/Config.in b/package/efl/Config.in new file mode 100644 index 0000000000..88e2c360f7 --- /dev/null +++ b/package/efl/Config.in @@ -0,0 +1,191 @@ +config BR2_PACKAGE_EFL + bool "efl" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_HAS_UDEV # libudev + # https://phab.enlightenment.org/T2728 + depends on BR2_PACKAGE_LUA_5_1 # needs lua 5.1, broken with 5.2+ + depends on BR2_TOOLCHAIN_HAS_THREADS # untested without threads + depends on BR2_USE_MMU + depends on BR2_USE_WCHAR # use wchar_t + depends on !BR2_STATIC_LIBS # dlfcn.h + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_JPEG # Emile needs libjpeg + select BR2_PACKAGE_LIBCURL # Ecore_con_url, runtime dependency + select BR2_PACKAGE_LIBXKBCOMMON if BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_UTIL_LINUX + # libblkid is part of required tools, see EFL's README. + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + help + Enlightenment Foundation Libraries + + https://enlightenment.org + +if BR2_PACKAGE_EFL + +config BR2_PACKAGE_EFL_BULLET + bool "Enable bullet support (recommended)" + select BR2_PACKAGE_BULLET + default y + help + If you have chosen to disable physics support, this disables + lots of core functionality and is effectively never + tested. You are going to find features that suddenly don't + work and as a result cause a series of breakages. This is + simply not tested so you are on your own in terms of + ensuring everything works if you do this. + +config BR2_PACKAGE_EFL_FONTCONFIG + bool "Enable fontconfig support (recommended)" + select BR2_PACKAGE_FONTCONFIG + default y + help + If fontconfig is disabled, this is going to make general + font searching not work, and only some very direct 'load + /path/file.ttf' will work alongside some old-school ttf file + path searching. This is very likely not what you want, so + highly reconsider turning fontconfig off. Having it off will + lead to visual problems like missing text in many UI areas + etc... + +config BR2_PACKAGE_EFL_GSTREAMER1 + bool "Enable gstreamer1 support (recommended)" + select BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BASE + default y + help + If Gstreamer 1.x support is disabled, it will heavily limit + your media support options and render some functionality as + useless, leading to visible application bugs. + +config BR2_PACKAGE_EFL_LIBFRIBIDI + bool "Enable libfribidi support (recommended)" + select BR2_PACKAGE_LIBFRIBIDI + default y + help + Fribidi is used for handling right-to-left text (like + Arabic, Hebrew, Farsi, Persian etc.) and is very likely not + a feature you want to disable unless you know for absolute + certain you will never encounter and have to display such + scripts. Also note that we don't test with fribidi disabled + so you may also trigger code paths with bugs that are never + normally used. + +config BR2_PACKAGE_EFL_LIBSNDFILE + bool "Enable libsndfile support (recommended)" + select BR2_PACKAGE_LIBSNDFILE + default y + help + If you disabled audio support in Ecore, this is not tested + and may create bugs for you due to it creating untested code + paths. Reconsider disabling audio. + +config BR2_PACKAGE_EFL_PULSEAUDIO + bool "Enable pulseaudio support (recommended)" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pulseaudio -> json-c + select BR2_PACKAGE_PULSEAUDIO + default y + help + The only audio output method supported by Ecore right now is + via Pulseaudio. You have disabled that and likely have + broken a whole bunch of things in the process. Reconsider + your configure options. + + NOTE: multisense support is automatically enabled with + pulseaudio. + +config BR2_PACKAGE_EFL_UTIL_LINUX_LIBMOUNT + bool "Enable libmount support (recommended)" + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + default y + help + Libmount is used heavily inside Eeze for support of removable + devices etc... and disabling this will hurt support for + Enlightenment and its filemanager. + +config BR2_PACKAGE_EFL_HAS_RECOMMENDED_CONFIG + bool + default y if BR2_PACKAGE_EFL_BULLET && \ + BR2_PACKAGE_EFL_FONTCONFIG && \ + BR2_PACKAGE_EFL_GSTREAMER1 && \ + BR2_PACKAGE_EFL_LIBFRIBIDI && \ + BR2_PACKAGE_EFL_LIBSNDFILE && \ + BR2_PACKAGE_EFL_PULSEAUDIO && \ + BR2_PACKAGE_EFL_UTIL_LINUX_LIBMOUNT + + +comment "Warning: one of the recommended option for EFL is not enabled" + depends on !BR2_PACKAGE_EFL_HAS_RECOMMENDED_CONFIG + +comment "libecore video support" + +config BR2_PACKAGE_EFL_FB + bool "FB support" + +config BR2_PACKAGE_EFL_X_XLIB + bool "X11 support (xlib)" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE + select BR2_PACKAGE_XLIB_LIBXCURSOR + select BR2_PACKAGE_XLIB_LIBXDAMAGE + select BR2_PACKAGE_XLIB_LIBXINERAMA + select BR2_PACKAGE_XLIB_LIBXP + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXSCRNSAVER + select BR2_PACKAGE_XLIB_LIBXTST + select BR2_PACKAGE_XPROTO_GLPROTO + +comment "libevas loaders" + +config BR2_PACKAGE_EFL_PNG + bool "libevas png loader" + select BR2_PACKAGE_LIBPNG + help + This enables the loader code that loads png files using + libpng. + +config BR2_PACKAGE_EFL_JP2K + bool "libevas jp2k loader" + select BR2_PACKAGE_OPENJPEG + help + This enables the loader code that loads jp2k files using + openjpeg. + +config BR2_PACKAGE_EFL_JPEG + bool "libevas jpeg loader" + help + This enables the loader code that loads jpeg files using + libjpeg. + +config BR2_PACKAGE_EFL_GIF + bool "libevas gif loader" + select BR2_PACKAGE_GIFLIB + help + This enables the loader code that loads gif files using + giflib. + +config BR2_PACKAGE_EFL_TIFF + bool "libevas tiff loader" + select BR2_PACKAGE_TIFF + help + This enables the loader code that loads tiff files. + +config BR2_PACKAGE_EFL_WEBP + bool "libevas webp image loader" + select BR2_PACKAGE_WEBP + help + This enables the loader code that loads images using WebP. + +endif # BR2_PACKAGE_EFL + +comment "efl needs udev /dev management and a toolchain w/ C++, dynamic library, threads, wchar" + depends on !BR2_PACKAGE_HAS_UDEV || !BR2_INSTALL_LIBSTDCPP \ + || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + depends on BR2_USE_MMU + +comment "efl needs lua 5.1" + depends on !BR2_PACKAGE_LUA_5_1 + depends on BR2_USE_MMU diff --git a/package/efl/efl.hash b/package/efl/efl.hash new file mode 100644 index 0000000000..6673bb51d6 --- /dev/null +++ b/package/efl/efl.hash @@ -0,0 +1,2 @@ +# From https://download.enlightenment.org/rel/libs/efl/efl-1.15.3.tar.xz.sha256 +sha256 3bac40e6294288034bd7f8902088bf1169cf376f6fd25b7a49854ab561630642 efl-1.15.3.tar.xz diff --git a/package/efl/efl.mk b/package/efl/efl.mk new file mode 100644 index 0000000000..2ea2592115 --- /dev/null +++ b/package/efl/efl.mk @@ -0,0 +1,277 @@ +################################################################################ +# +# efl +# +################################################################################ + +EFL_VERSION = 1.15.3 +EFL_SOURCE = efl-$(EFL_VERSION).tar.xz +EFL_SITE = http://download.enlightenment.org/rel/libs/efl +EFL_LICENSE = BSD-2c, LGPLv2.1+, GPLv2+ +EFL_LICENSE_FILES = \ + COMPLIANCE \ + COPYING \ + licenses/COPYING.BSD \ + licenses/COPYING.FTL \ + licenses/COPYING.GPL \ + licenses/COPYING.LGPL \ + licenses/COPYING.SMALL + +EFL_INSTALL_STAGING = YES + +EFL_DEPENDENCIES = host-pkgconf host-efl dbus freetype jpeg lua udev \ + util-linux zlib + +# Regenerate the autotools: +# - to fix an issue in eldbus-codegen: https://phab.enlightenment.org/T2718 +EFL_AUTORECONF = YES +EFL_GETTEXTIZE = YES + +# Configure options: +# --disable-cxx-bindings: disable C++11 bindings. +# --disable-sdl: disable sdl2 support. +# --disable-systemd: disable systemd support. +# --disable-xinput22: disable X11 XInput v2.2+ support. +# --enable-lua-old: disable Elua and remove luajit dependency. +# --with-opengl=none: disable opengl support. +EFL_CONF_OPTS = \ + --with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc \ + --with-eolian-gen=$(HOST_DIR)/usr/bin/eolian_gen \ + --disable-cxx-bindings \ + --disable-sdl \ + --disable-systemd \ + --disable-xinput22 \ + --enable-lua-old \ + --with-opengl=none + +# Disable untested configuration warning. +ifeq ($(BR2_PACKAGE_EFL_HAS_RECOMMENDED_CONFIG),) +EFL_CONF_OPTS += --enable-i-really-know-what-i-am-doing-and-that-this-will-probably-break-things-and-i-will-fix-them-myself-and-send-patches-aba +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y) +EFL_DEPENDENCIES += util-linux +EFL_CONF_OPTS += --enable-libmount +else +EFL_CONF_OPTS += --disable-libmount +endif + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +EFL_CONF_OPTS += --enable-fontconfig +EFL_DEPENDENCIES += fontconfig +else +EFL_CONF_OPTS += --disable-fontconfig +endif + +ifeq ($(BR2_PACKAGE_LIBFRIBIDI),y) +EFL_CONF_OPTS += --enable-fribidi +EFL_DEPENDENCIES += libfribidi +else +EFL_CONF_OPTS += --disable-fribidi +endif + +ifeq ($(BR2_PACKAGE_GSTREAMER1)$(BR2_PACKAGE_GST1_PLUGINS_BASE),yy) +EFL_CONF_OPTS += --enable-gstreamer1 +EFL_DEPENDENCIES += gstreamer1 gst1-plugins-base +else +EFL_CONF_OPTS += --disable-gstreamer1 +endif + +ifeq ($(BR2_PACKAGE_BULLET),y) +EFL_CONF_OPTS += --enable-physics +EFL_DEPENDENCIES += bullet +else +EFL_CONF_OPTS += --disable-physics +endif + +ifeq ($(BR2_PACKAGE_LIBSNDFILE),y) +EFL_CONF_OPTS += --enable-audio +EFL_DEPENDENCIES += libsndfile +else +EFL_CONF_OPTS += --disable-audio +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +EFL_CONF_OPTS += --enable-pulseaudio +EFL_DEPENDENCIES += pulseaudio +else +EFL_CONF_OPTS += --disable-pulseaudio +endif + +ifeq ($(BR2_PACKAGE_HARFBUZZ),y) +EFL_DEPENDENCIES += harfbuzz +EFL_CONF_OPTS += --enable-harfbuzz +else +EFL_CONF_OPTS += --disable-harfbuzz +endif + +ifeq ($(BR2_PACKAGE_TSLIB),y) +EFL_DEPENDENCIES += tslib +EFL_CONF_OPTS += --enable-tslib +else +EFL_CONF_OPTS += --disable-tslib +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +EFL_DEPENDENCIES += libglib2 +EFL_CONF_OPTS += --with-glib=yes +else +EFL_CONF_OPTS += --with-glib=no +endif + +# Prefer openssl (the default) over gnutls. +ifeq ($(BR2_PACKAGE_OPENSSL),y) +EFL_DEPENDENCIES += openssl +EFL_CONF_OPTS += --with-crypto=openssl +else ifeq ($(BR2_PACKAGE_GNUTLS)$(BR2_PACKAGE_LIBGCRYPT),yy) +EFL_DEPENDENCIES += gnutls libgcrypt +EFL_CONF_OPTS += --with-crypto=gnutls \ + --with-libgcrypt-prefix=$(STAGING_DIR)/usr +else +EFL_CONF_OPTS += --with-crypto=none +endif # BR2_PACKAGE_OPENSSL + +ifeq ($(BR2_PACKAGE_WAYLAND),y) +EFL_DEPENDENCIES += wayland libxkbcommon +EFL_CONF_OPTS += --enable-wayland +else +EFL_CONF_OPTS += --disable-wayland +endif + +ifeq ($(BR2_PACKAGE_EFL_FB),y) +EFL_CONF_OPTS += --enable-fb +else +EFL_CONF_OPTS += --disable-fb +endif + +ifeq ($(BR2_PACKAGE_EFL_X_XLIB),y) +EFL_CONF_OPTS += \ + --with-x11=xlib \ + --with-x=$(STAGING_DIR) \ + --x-includes=$(STAGING_DIR)/usr/include \ + --x-libraries=$(STAGING_DIR)/usr/lib + +EFL_DEPENDENCIES += \ + xlib_libX11 \ + xlib_libXcomposite \ + xlib_libXcursor \ + xlib_libXdamage \ + xlib_libXext \ + xlib_libXinerama \ + xlib_libXrandr \ + xlib_libXrender \ + xlib_libXScrnSaver \ + xlib_libXtst +else +EFL_CONF_OPTS += --with-x11=none +endif + +# Loaders that need external dependencies needs to be --enable-XXX=yes +# otherwise the default is '=static'. +# All other loaders are statically built-in +ifeq ($(BR2_PACKAGE_EFL_PNG),y) +EFL_CONF_OPTS += --enable-image-loader-png=yes +EFL_DEPENDENCIES += libpng +else +EFL_CONF_OPTS += --disable-image-loader-png +endif + +ifeq ($(BR2_PACKAGE_EFL_JPEG),y) +EFL_CONF_OPTS += --enable-image-loader-jpeg=yes +# efl already depends on jpeg. +else +EFL_CONF_OPTS += --disable-image-loader-jpeg +endif + +ifeq ($(BR2_PACKAGE_EFL_GIF),y) +EFL_CONF_OPTS += --enable-image-loader-gif=yes +EFL_DEPENDENCIES += giflib +else +EFL_CONF_OPTS += --disable-image-loader-gif +endif + +ifeq ($(BR2_PACKAGE_EFL_TIFF),y) +EFL_CONF_OPTS += --enable-image-loader-tiff=yes +EFL_DEPENDENCIES += tiff +else +EFL_CONF_OPTS += --disable-image-loader-tiff +endif + +ifeq ($(BR2_PACKAGE_EFL_JP2K),y) +EFL_CONF_OPTS += --enable-image-loader-jp2k=yes +EFL_DEPENDENCIES += openjpeg +else +EFL_CONF_OPTS += --disable-image-loader-jp2k +endif + +ifeq ($(BR2_PACKAGE_EFL_WEBP),y) +EFL_CONF_OPTS += --enable-image-loader-webp=yes +EFL_DEPENDENCIES += webp +else +EFL_CONF_OPTS += --disable-image-loader-webp +endif + +$(eval $(autotools-package)) + +################################################################################ +# +# host-efl +# +################################################################################ + +# We want to build only some host tools used later in the build. +# Actually we want: edje_cc, embryo_cc and eet. + +# Host dependencies: +# * host-dbus: for Eldbus +# * host-freetype: for libevas +# * host-libglib2: for libecore +# * host-libjpeg, host-libpng: for libevas image loader +# * host-lua: disable luajit dependency +HOST_EFL_DEPENDENCIES = \ + host-pkgconf \ + host-dbus \ + host-freetype \ + host-libglib2 \ + host-libjpeg \ + host-libpng \ + host-lua \ + host-zlib + +# Configure options: +# --disable-audio, --disable-multisense remove libsndfile dependency. +# --disable-cxx-bindings: disable C++11 bindings. +# --disable-fontconfig: remove dependency on fontconfig. +# --disable-fribidi: remove dependency on libfribidi. +# --disable-gstreamer1: remove dependency on gtreamer 1.0. +# --disable-libeeze: remove libudev dependency. +# --disable-libmount: remove dependency on host-util-linux libmount. +# --disable-physics: remove Bullet dependency. +# --enable-image-loader-gif=no: disable Gif dependency. +# --enable-image-loader-tiff=no: disable Tiff dependency. +# --enable-lua-old: disable Elua and remove luajit dependency. +# --with-crypto=none: remove dependencies on openssl or gnutls. +# --with-x11=none: remove dependency on X.org. +# Yes I really know what I am doing. +HOST_EFL_CONF_OPTS += \ + --disable-audio \ + --disable-cxx-bindings \ + --disable-fontconfig \ + --disable-fribidi \ + --disable-gstreamer1 \ + --disable-libeeze \ + --disable-libmount \ + --disable-multisense \ + --disable-physics \ + --enable-image-loader-gif=no \ + --enable-image-loader-jpeg=yes \ + --enable-image-loader-png=yes \ + --enable-image-loader-tiff=no \ + --enable-lua-old \ + --with-crypto=none \ + --with-glib=yes \ + --with-opengl=none \ + --with-x11=none \ + --enable-i-really-know-what-i-am-doing-and-that-this-will-probably-break-things-and-i-will-fix-them-myself-and-send-patches-aba + +$(eval $(host-autotools-package)) diff --git a/package/eigen/Config.in b/package/eigen/Config.in new file mode 100644 index 0000000000..03d65b19d1 --- /dev/null +++ b/package/eigen/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_EIGEN + bool "eigen" + depends on BR2_INSTALL_LIBSTDCPP + help + Eigen is a C++ template library for linear algebra: vectors, + matrices, and related algorithms. It is versatile, fast, elegant + and works on many platforms (OS/Compilers). + + This package only installs header files to the include path. + If you just want to use Eigen, you can use the header files + right away. There is no binary to link to. Eigen is a pure + template library defined in the headers. + + http://eigen.tuxfamily.org/ + +if BR2_PACKAGE_EIGEN + +config BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES + bool "unsupported modules" + help + Install eigen unsupported modules +endif + +comment "eigen needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/eigen/eigen.mk b/package/eigen/eigen.mk new file mode 100644 index 0000000000..730bb5ffd2 --- /dev/null +++ b/package/eigen/eigen.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# eigen +# +################################################################################ + +EIGEN_VERSION = 3.2.5 +EIGEN_SITE = https://bitbucket.org/eigen/eigen +EIGEN_SITE_METHOD = hg +EIGEN_LICENSE = MPL2, BSD-3c, LGPLv2.1 +EIGEN_LICENSE_FILES = COPYING.MPL2 COPYING.BSD COPYING.LGPL COPYING.README +EIGEN_INSTALL_STAGING = YES +EIGEN_INSTALL_TARGET = NO +EIGEN_DEST_DIR = $(STAGING_DIR)/usr/include/eigen3 + +ifeq ($(BR2_PACKAGE_EIGEN_UNSUPPORTED_MODULES),y) +define EIGEN_INSTALL_UNSUPPORTED_MODULES_CMDS + mkdir -p $(EIGEN_DEST_DIR)/unsupported + cp -a $(@D)/unsupported/Eigen $(EIGEN_DEST_DIR)/unsupported +endef +endif + +# Generate the .pc file at build time +define EIGEN_BUILD_CMDS + sed -r -e 's,^Version: .*,Version: $(EIGEN_VERSION),' \ + -e 's,^Cflags: .*,Cflags: -I$(EIGEN_DEST_DIR),' \ + $(@D)/eigen3.pc.in >$(@D)/eigen3.pc +endef + +# This package only consists of headers that need to be +# copied over to the sysroot for compile time use +define EIGEN_INSTALL_STAGING_CMDS + $(RM) -r $(EIGEN_DEST_DIR) + mkdir -p $(EIGEN_DEST_DIR) + cp -a $(@D)/Eigen $(EIGEN_DEST_DIR) + $(EIGEN_INSTALL_UNSUPPORTED_MODULES_CMDS) + $(INSTALL) -D -m 0644 $(@D)/eigen3.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/eigen3.pc +endef + +$(eval $(generic-package)) diff --git a/package/ejabberd/0001-remove-make-targets-for-deps.patch b/package/ejabberd/0001-remove-make-targets-for-deps.patch new file mode 100644 index 0000000000..6917f71f31 --- /dev/null +++ b/package/ejabberd/0001-remove-make-targets-for-deps.patch @@ -0,0 +1,76 @@ +From 21d1f05a8882657c151397d0e4723535402f1757 Mon Sep 17 00:00:00 2001 +From: Philipp Huebner +Date: Wed, 20 Jan 2016 10:22:57 -0500 +Subject: [PATCH] remove make targets for deps + +Without this patch, dependencies would be downloaded and compiled +using rebar at build time. + +Signed-off-by: Frank Hunleth +--- + Makefile.in | 26 +++----------------------- + 1 file changed, 3 insertions(+), 23 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 08cd837..2a6457c 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -77,26 +77,11 @@ else + INIT_USER=$(INSTALLUSER) + endif + +-all: deps src ++all: src + +-deps: deps/.got +- +-deps/.got: +- rm -rf deps/.got +- rm -rf deps/.built +- $(REBAR) get-deps && :> deps/.got +- +-deps/.built: deps/.got +- $(REBAR) compile && :> deps/.built +- +-src: deps/.built ++src: + $(REBAR) skip_deps=true compile + +-update: +- rm -rf deps/.got +- rm -rf deps/.built +- $(REBAR) update-deps && :> deps/.got +- + xref: all + $(REBAR) skip_deps=true xref + +@@ -152,16 +137,13 @@ $(foreach file,$(DEPS_FILES_FILTERED) $(MAIN_FILES),$(eval $(call COPY_template, + $(sort $(call TO_DEST,$(MAIN_DIRS) $(DEPS_DIRS))): + $(INSTALL) -d $@ + +-$(call TO_DEST,deps/p1_pam/priv/bin/epam): $(LIBDIR)/%: deps/p1_pam/priv/bin/epam $(call TO_DEST,deps/p1_pam/priv/bin/) +- $(INSTALL) -m 750 $(O_USER) $< $@ +- + $(call TO_DEST,priv/sql/lite.sql): sql/lite.sql $(call TO_DEST,priv/sql) + $(INSTALL) -m 644 $< $@ + + $(call TO_DEST,priv/bin/captcha.sh): tools/captcha.sh $(call TO_DEST,priv/bin) + $(INSTALL) -m 750 $(O_USER) $< $@ + +-copy-files-sub2: $(call TO_DEST,$(DEPS_FILES) $(MAIN_FILES) priv/bin/captcha.sh priv/sql/lite.sql) ++copy-files-sub2: $(call TO_DEST,$(MAIN_FILES) priv/bin/captcha.sh priv/sql/lite.sql) + + endif + +@@ -287,8 +269,6 @@ TAGS: + + Makefile: Makefile.in + +-deps := $(wildcard deps/*/ebin) +- + dialyzer/erlang.plt: + @mkdir -p dialyzer + @dialyzer --build_plt --output_plt dialyzer/erlang.plt \ +-- +2.5.0 + diff --git a/package/ejabberd/0002-remove-dependencies-from-rebar-config.patch b/package/ejabberd/0002-remove-dependencies-from-rebar-config.patch new file mode 100644 index 0000000000..9dcea1c320 --- /dev/null +++ b/package/ejabberd/0002-remove-dependencies-from-rebar-config.patch @@ -0,0 +1,85 @@ +From d399ecdd99e62b5554210a3b5c733e738e4d54be Mon Sep 17 00:00:00 2001 +From: Philipp Huebner +Date: Wed, 20 Jan 2016 08:08:42 -0500 +Subject: [PATCH] remove dependencies from rebar config + +Without this patch, dependencies would be downloaded and compiled +by rebar at build time. + +Signed-off-by: Frank Hunleth +--- + rebar.config | 51 --------------------------------------------------- + 1 file changed, 51 deletions(-) + +diff --git a/rebar.config b/rebar.config +index 30c0360..d6a5b4d 100644 +--- a/rebar.config ++++ b/rebar.config +@@ -7,48 +7,6 @@ + %%% Created : 1 May 2013 by Evgeniy Khramtsov + %%%------------------------------------------------------------------- + +-{deps, [{if_var_true, lager, {lager, ".*", {git, "https://github.com/basho/lager", {tag, "3.0.2"}}}}, +- {if_var_false, lager, {p1_logger, ".*", {git, "https://github.com/processone/p1_logger", {tag, "1.0.0"}}}}, +- {p1_utils, ".*", {git, "https://github.com/processone/p1_utils", {tag, "1.0.2"}}}, +- {cache_tab, ".*", {git, "https://github.com/processone/cache_tab", {tag, "1.0.1"}}}, +- {p1_tls, ".*", {git, "https://github.com/processone/tls", {tag, "1.0.0"}}}, +- {p1_stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.0"}}}, +- {p1_xml, ".*", {git, "https://github.com/processone/xml", {tag, "1.1.1"}}}, +- {p1_stun, ".*", {git, "https://github.com/processone/stun", "0.9.0"}}, +- {esip, ".*", {git, "https://github.com/processone/p1_sip", "1.0.0"}}, +- {p1_yaml, ".*", {git, "https://github.com/processone/p1_yaml", {tag, "1.0.0"}}}, +- {jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.5"}}}, +- {oauth2, ".*", {git, "https://github.com/kivra/oauth2", "8d129fbf8866930b4ffa6dd84e65bd2b32b9acb8"}}, +- {xmlrpc, ".*", {git, "https://github.com/rds13/xmlrpc", {tag, "1.15"}}}, +- {if_var_true, mysql, {p1_mysql, ".*", {git, "https://github.com/processone/mysql", {tag, "1.0.0"}}}}, +- {if_var_true, pgsql, {p1_pgsql, ".*", {git, "https://github.com/processone/pgsql", {tag, "1.0.0"}}}}, +- {if_var_true, sqlite, {sqlite3, ".*", {git, "https://github.com/alexeyr/erlang-sqlite3", "cbc3505f7a131254265d3ef56191b2581b8cc172"}}}, +- {if_var_true, pam, {p1_pam, ".*", {git, "https://github.com/processone/epam", {tag, "1.0.0"}}}}, +- {if_var_true, zlib, {p1_zlib, ".*", {git, "https://github.com/processone/zlib", {tag, "1.0.0"}}}}, +- {if_var_true, riak, {hamcrest, ".*", {git, "https://github.com/hyperthunk/hamcrest-erlang", "908a24fda4a46776a5135db60ca071e3d783f9f6"}}}, % for riak_pb-2.1.0.7 +- {if_var_true, riak, {riakc, ".*", {git, "https://github.com/basho/riak-erlang-client", "527722d12d0433b837cdb92a60900c2cb5df8942"}}}, +- {if_var_true, elixir, {elixir, ".*", {git, "https://github.com/elixir-lang/elixir", {tag, "v1.1.0"}}}}, +- {if_var_true, elixir, {rebar_elixir_plugin, ".*", {git, "https://github.com/processone/rebar_elixir_plugin", "0.1.0"}}}, +- {if_var_true, iconv, {p1_iconv, ".*", {git, "https://github.com/processone/eiconv", {tag, "0.9.0"}}}}, +- {if_var_true, tools, {meck, "0.8.2", {git, "https://github.com/eproxus/meck", {tag, "0.8.2"}}}}, +- {if_var_true, redis, {eredis, ".*", {git, "https://github.com/wooga/eredis", {tag, "v1.0.8"}}}}]}. +- +-{if_var_true, latest_deps, +- {floating_deps, [p1_logger, +- cache_tab, +- p1_tls, +- p1_stringprep, +- p1_xml, +- esip, +- p1_stun, +- p1_yaml, +- p1_utils, +- p1_mysql, +- p1_pgsql, +- p1_pam, +- p1_zlib, +- p1_iconv]}}. +- + {erl_opts, [nowarn_deprecated_function, + {if_var_true, roster_gateway_workaround, {d, 'ROSTER_GATWAY_WORKAROUND'}}, + {if_var_match, db_type, mssql, {d, 'mssql'}}, +@@ -92,15 +50,6 @@ + + {eunit_compile_opts, [{i, "tools"}]}. + +-{post_hook_configure, [{"p1_tls", []}, +- {"p1_stringprep", []}, +- {"p1_yaml", []}, +- {"esip", []}, +- {"p1_xml", [{if_var_true, full_xml, "--enable-full-xml"}]}, +- {if_var_true, pam, {"p1_pam", []}}, +- {if_var_true, zlib, {"p1_zlib", []}}, +- {if_var_true, iconv, {"p1_iconv", []}}]}. +- + {port_env, [{"CFLAGS", "-g -O2 -Wall"}]}. + + {port_specs, [{"priv/lib/jid.so", ["c_src/jid.c"]}]}. +-- +2.5.0 + diff --git a/package/ejabberd/0003-remove-checking-erlang-version.patch b/package/ejabberd/0003-remove-checking-erlang-version.patch new file mode 100644 index 0000000000..ebcdd54645 --- /dev/null +++ b/package/ejabberd/0003-remove-checking-erlang-version.patch @@ -0,0 +1,30 @@ +From f384518dedec4ad657ad69d55754076c13c22d96 Mon Sep 17 00:00:00 2001 +From: Johan Oudinet +Date: Wed, 20 Jan 2016 08:11:32 -0500 +Subject: [PATCH] remove checking erlang version + +Without this patch, the configure will try to run erlang to simply check +if the version is supported by ejabberd. Instead, we do this test +statically. +--- + configure.ac | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 97e89a2..cd1ab08 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -39,10 +39,8 @@ AC_ARG_ENABLE(erlang-version-check, + [Check Erlang/OTP version @<:@default=yes@:>@])]) + case "$enable_erlang_version_check" in + yes|'') +- ERLANG_VERSION_CHECK([$REQUIRE_ERLANG_MIN],[$REQUIRE_ERLANG_MAX]) + ;; + no) +- ERLANG_VERSION_CHECK([$REQUIRE_ERLANG_MIN],[$REQUIRE_ERLANG_MAX],[warn]) + ;; + esac + +-- +2.5.0 + diff --git a/package/ejabberd/0004-correct-include.patch b/package/ejabberd/0004-correct-include.patch new file mode 100644 index 0000000000..fd1dee2850 --- /dev/null +++ b/package/ejabberd/0004-correct-include.patch @@ -0,0 +1,56 @@ +From 705a9ad229de49cd9cce226a2025716902455663 Mon Sep 17 00:00:00 2001 +From: Philipp Huebner +Date: Wed, 20 Jan 2016 08:13:21 -0500 +Subject: [PATCH] correct include + +This part of the code was moved into it's own project and was packaged +separately by me. To make the build process work, this small fix is +necessary. +--- + src/mod_sip.erl | 2 +- + src/mod_sip_proxy.erl | 2 +- + src/mod_sip_registrar.erl | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/mod_sip.erl b/src/mod_sip.erl +index c8c9533..7f188a0 100644 +--- a/src/mod_sip.erl ++++ b/src/mod_sip.erl +@@ -38,7 +38,7 @@ + + -include("ejabberd.hrl"). + -include("logger.hrl"). +--include_lib("esip/include/esip.hrl"). ++-include_lib("p1_sip/include/esip.hrl"). + + %%%=================================================================== + %%% API +diff --git a/src/mod_sip_proxy.erl b/src/mod_sip_proxy.erl +index bf297bc..d8b65cd 100644 +--- a/src/mod_sip_proxy.erl ++++ b/src/mod_sip_proxy.erl +@@ -40,7 +40,7 @@ + + -include("ejabberd.hrl"). + -include("logger.hrl"). +--include_lib("esip/include/esip.hrl"). ++-include_lib("p1_sip/include/esip.hrl"). + + -define(SIGN_LIFETIME, 300). %% in seconds. + +diff --git a/src/mod_sip_registrar.erl b/src/mod_sip_registrar.erl +index 44091ed..4d2ec82 100644 +--- a/src/mod_sip_registrar.erl ++++ b/src/mod_sip_registrar.erl +@@ -37,7 +37,7 @@ + + -include("ejabberd.hrl"). + -include("logger.hrl"). +--include_lib("esip/include/esip.hrl"). ++-include_lib("p1_sip/include/esip.hrl"). + + -define(CALL_TIMEOUT, timer:seconds(30)). + -define(DEFAULT_EXPIRES, 3600). +-- +2.5.0 + diff --git a/package/ejabberd/0005-disable-ERLANG_DEPRECATED_CHECK.patch b/package/ejabberd/0005-disable-ERLANG_DEPRECATED_CHECK.patch new file mode 100644 index 0000000000..4b68f5ff85 --- /dev/null +++ b/package/ejabberd/0005-disable-ERLANG_DEPRECATED_CHECK.patch @@ -0,0 +1,27 @@ +From d43a65b112ec995a5ee52aca2a16e5cf9699d7c1 Mon Sep 17 00:00:00 2001 +From: Johan Oudinet +Date: Wed, 20 Jan 2016 08:16:26 -0500 +Subject: [PATCH] disable ERLANG_DEPRECATED_CHECK + +Without this patch, the configure will try to execute erlang to check +if it uses deprecated types. Assume the answer is false. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index cd1ab08..a4f1533 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -235,7 +235,7 @@ if test "$ENABLEUSER" != ""; then + AC_SUBST([INSTALLUSER], [$ENABLEUSER]) + fi + +-ERLANG_DEPRECATED_TYPES_CHECK ++AC_SUBST(erlang_deprecated_types, false) + + if test "$sqlite" = "true"; then + AX_LIB_SQLITE3([3.6.19]) +-- +2.5.0 + diff --git a/package/ejabberd/0006-fix-install-permissions.patch b/package/ejabberd/0006-fix-install-permissions.patch new file mode 100644 index 0000000000..4d77044902 --- /dev/null +++ b/package/ejabberd/0006-fix-install-permissions.patch @@ -0,0 +1,82 @@ +From ef847479778cc58818e066b87aa1789ba1c4148b Mon Sep 17 00:00:00 2001 +From: Johan Oudinet +Date: Wed, 20 Jan 2016 09:34:07 -0500 +Subject: [PATCH] fix install permissions + +Without this patch, the makefile will try to install directories and +files with incompatible permissions for ejabberd, which run as an +ejabberd user. + +Signed-off-by: Frank Hunleth +--- + Makefile.in | 38 +++++--------------------------------- + 1 file changed, 5 insertions(+), 33 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 2a6457c..0be4c50 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -155,10 +155,8 @@ copy-files-sub: copy-files-sub2 + install: all copy-files + # + # Configuration files +- $(INSTALL) -d -m 750 $(G_USER) $(ETCDIR) +- [ -f $(ETCDIR)/ejabberd.yml ] \ +- && $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml-new \ +- || $(INSTALL) -b -m 640 $(G_USER) ejabberd.yml.example $(ETCDIR)/ejabberd.yml ++ $(INSTALL) -d $(ETCDIR) ++ $(INSTALL) -b -m 644 ejabberd.yml.example $(ETCDIR)/ejabberd.yml + $(SED) -e "s*{{rootdir}}*@prefix@*" \ + -e "s*{{installuser}}*@INSTALLUSER@*" \ + -e "s*{{bindir}}*@bindir@*" \ +@@ -168,14 +166,11 @@ install: all copy-files + -e "s*{{docdir}}*@docdir@*" \ + -e "s*{{erl}}*@ERL@*" ejabberdctl.template \ + > ejabberdctl.example +- [ -f $(ETCDIR)/ejabberdctl.cfg ] \ +- && $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg-new \ +- || $(INSTALL) -b -m 640 $(G_USER) ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg +- $(INSTALL) -b -m 644 $(G_USER) inetrc $(ETCDIR)/inetrc ++ $(INSTALL) -b -m 644 ejabberdctl.cfg.example $(ETCDIR)/ejabberdctl.cfg ++ $(INSTALL) -b -m 644 inetrc $(ETCDIR)/inetrc + # + # Administration script +- [ -d $(SBINDIR) ] || $(INSTALL) -d -m 755 $(SBINDIR) +- $(INSTALL) -m 550 $(G_USER) ejabberdctl.example $(SBINDIR)/ejabberdctl ++ $(INSTALL) -D ejabberdctl.example $(SBINDIR)/ejabberdctl + # Elixir binaries + [ -d $(BINDIR) ] || $(INSTALL) -d -m 755 $(BINDIR) + [ -f deps/elixir/bin/iex ] && $(INSTALL) -m 550 $(G_USER) deps/elixir/bin/iex $(BINDIR)/iex || true +@@ -187,29 +182,6 @@ install: all copy-files + -e "s*@installuser@*$(INIT_USER)*" ejabberd.init.template \ + > ejabberd.init + chmod 755 ejabberd.init +- # +- # Spool directory +- $(INSTALL) -d -m 750 $(O_USER) $(SPOOLDIR) +- $(CHOWN_COMMAND) -R @INSTALLUSER@ $(SPOOLDIR) >$(CHOWN_OUTPUT) +- chmod -R 750 $(SPOOLDIR) +- [ ! -f $(COOKIEFILE) ] || { $(CHOWN_COMMAND) @INSTALLUSER@ $(COOKIEFILE) >$(CHOWN_OUTPUT) ; chmod 400 $(COOKIEFILE) ; } +- # +- # ejabberdctl lock directory +- $(INSTALL) -d -m 750 $(O_USER) $(CTLLOCKDIR) +- $(CHOWN_COMMAND) -R @INSTALLUSER@ $(CTLLOCKDIR) >$(CHOWN_OUTPUT) +- chmod -R 750 $(CTLLOCKDIR) +- # +- # Log directory +- $(INSTALL) -d -m 750 $(O_USER) $(LOGDIR) +- $(CHOWN_COMMAND) -R @INSTALLUSER@ $(LOGDIR) >$(CHOWN_OUTPUT) +- chmod -R 750 $(LOGDIR) +- # +- # Documentation +- $(INSTALL) -d $(DOCDIR) +- [ -f doc/guide.html ] \ +- && $(INSTALL) -m 644 doc/guide.html $(DOCDIR) \ +- || echo "Documentation not included in sources" +- $(INSTALL) -m 644 COPYING $(DOCDIR) + + uninstall: uninstall-binary + +-- +2.5.0 + diff --git a/package/ejabberd/0007-fix-ejabberdctl.patch b/package/ejabberd/0007-fix-ejabberdctl.patch new file mode 100644 index 0000000000..36aa3a707f --- /dev/null +++ b/package/ejabberd/0007-fix-ejabberdctl.patch @@ -0,0 +1,34 @@ +From 53d7d654026afa163a55b860e33c6901129e8dc1 Mon Sep 17 00:00:00 2001 +From: Johan Oudinet +Date: Wed, 20 Jan 2016 09:35:07 -0500 +Subject: [PATCH] fix ejabberdctl + +Change default values so ejabberdctl run commands as ejabberd user +Also add a way for the user to change default values. + +Signed-off-by: Johan Oudinet +--- + ejabberdctl.template | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/ejabberdctl.template b/ejabberdctl.template +index f65c21f..ff9225f 100755 +--- a/ejabberdctl.template ++++ b/ejabberdctl.template +@@ -14,9 +14,12 @@ SCRIPT_DIR=`cd ${0%/*} && pwd` + ERL={{erl}} + IEX={{bindir}}/iex + EPMD={{bindir}}/epmd +-INSTALLUSER={{installuser}} ++INSTALLUSER=ejabberd + ERL_LIBS={{libdir}} + ++# Read default configuration file if present ++[ ! -r /etc/default/ejabberd ] || . /etc/default/ejabberd ++ + # check the proper system user is used if defined + if [ "$INSTALLUSER" != "" ] ; then + EXEC_CMD="false" +-- +2.5.0 + diff --git a/package/ejabberd/Config.in b/package/ejabberd/Config.in new file mode 100644 index 0000000000..5d176c3af6 --- /dev/null +++ b/package/ejabberd/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_EJABBERD + bool "ejabberd" + depends on BR2_PACKAGE_ERLANG + depends on BR2_INSTALL_LIBSTDCPP # stringprep + select BR2_PACKAGE_ERLANG_LAGER + select BR2_PACKAGE_ERLANG_P1_CACHE_TAB + select BR2_PACKAGE_ERLANG_P1_ICONV + select BR2_PACKAGE_ERLANG_P1_SIP + select BR2_PACKAGE_ERLANG_P1_STRINGPREP + select BR2_PACKAGE_ERLANG_P1_XML + select BR2_PACKAGE_ERLANG_P1_YAML + select BR2_PACKAGE_ERLANG_P1_ZLIB + select BR2_PACKAGE_GETENT + select BR2_PACKAGE_OPENSSL + help + Ejabberd is a Jabber/XMPP instant messaging server, written + in Erlang/OTP. Among other features, ejabberd is + cross-platform, fault-tolerant, clusterable and modular. + + http://www.ejabberd.im + +comment "ejabberd needs erlang, toolchain w/ C++" + depends on !BR2_PACKAGE_ERLANG || !BR2_INSTALL_LIBSTDCPP diff --git a/package/ejabberd/S50ejabberd b/package/ejabberd/S50ejabberd new file mode 100644 index 0000000000..830fcb85a7 --- /dev/null +++ b/package/ejabberd/S50ejabberd @@ -0,0 +1,54 @@ +#!/bin/sh +# +# Start/stop ejabberd +# + +CTL=/usr/sbin/ejabberdctl +DEFAULT=/etc/default/ejabberd +INSTALLUSER=ejabberd +RUNDIR=/var/run/ejabberd + +# Read default configuration file if present. +[ -r "$DEFAULT" ] && . "$DEFAULT" + +# Create RUNDIR. +mkrundir() { + install -d -o "$INSTALLUSER" -g "$INSTALLUSER" "$RUNDIR" +} + +case "$1" in + start) + mkrundir || exit 1 + printf "Starting ejabberd... " + "$CTL" start + # Wait until ejabberd is up and running. + if "$CTL" started; then + echo "done" + else + echo "failed" + fi + ;; + stop) + printf "Stopping ejabberd... " + "$CTL" stop > /dev/null + if [ $? -eq 3 ] || "$CTL" stopped; then + echo "OK" + else + echo "failed" + fi + ;; + status) + "$CTL" status + ;; + restart|force-reload) + "$0" stop || true + "$0" start + ;; + live) + mkrundir || exit 1 + "$CTL" live + ;; + *) + echo "Usage: $0 {start|stop|status|restart|force-reload|live}" + exit 1 +esac diff --git a/package/ejabberd/check-erlang-lib b/package/ejabberd/check-erlang-lib new file mode 100755 index 0000000000..63f8bf1926 --- /dev/null +++ b/package/ejabberd/check-erlang-lib @@ -0,0 +1,55 @@ +#!/bin/sh -e +# Helper to bypass AC_ERLANG_CHECK_LIB +# +# Ejabberd releases do not download specific versions of its erlang +# dependencies. Instead, it clones the master branch of a git +# repository and asks erl to provide the library version. However, +# the target erl program cannot be called from the host. So, this +# script aims at finding the library version installed on the target, +# without calling erlang. + +usage() { + cat <&2 + exit 1 +} + +if [ $# -ne 1 ]; then + usage + exit 0 +else + library="$1" +fi + +target_dir="${TARGET_DIR:-output/target}" + +[ -d "$target_dir" ] || die "TARGET_DIR is not a directory. Please \ +specify the TARGET_DIR environment variable." + +case "$(ls -1d -- "$target_dir/usr/lib/erlang/lib/$library-"* | wc -l)" in + 0) + echo "not found" + ;; + 1) + echo "$target_dir/usr/lib/erlang/lib/$library-"* \ + | sed -e "s,^$target_dir,," + ;; + *) + die "Several versions of $library have been found. Please \ + remove the unused ones." + ;; +esac diff --git a/package/ejabberd/ejabberd.hash b/package/ejabberd/ejabberd.hash new file mode 100644 index 0000000000..ea85d1cf4a --- /dev/null +++ b/package/ejabberd/ejabberd.hash @@ -0,0 +1,4 @@ +# From https://www.process-one.net/downloads/ejabberd/15.11/ejabberd-16.01.tgz.md5 +md5 5e525c25c8f04287217b8a9522d7c942 ejabberd-16.01.tgz +# Locally computed +sha256 e2cc479d5870539b2e6756690b227969c88a541d464d1fc6e1cbf7270ad7d681 ejabberd-16.01.tgz diff --git a/package/ejabberd/ejabberd.mk b/package/ejabberd/ejabberd.mk new file mode 100644 index 0000000000..1140eb1741 --- /dev/null +++ b/package/ejabberd/ejabberd.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# ejabberd +# +################################################################################ + +EJABBERD_VERSION = 16.01 +EJABBERD_SOURCE = ejabberd-$(EJABBERD_VERSION).tgz +EJABBERD_SITE = https://www.process-one.net/downloads/ejabberd/$(EJABBERD_VERSION) +EJABBERD_LICENSE = GPLv2+ with OpenSSL exception +EJABBERD_LICENSE_FILES = COPYING +EJABBERD_DEPENDENCIES = getent openssl host-erlang-lager erlang-lager \ + erlang-p1-cache-tab erlang-p1-iconv erlang-p1-sip \ + erlang-p1-stringprep erlang-p1-xml erlang-p1-yaml erlang-p1-zlib + +# 0001-remove-make-targets-for-deps.patch updates Makefile.in +EJABBERD_USE_AUTOCONF = YES +EJABBERD_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +EJABBERD_DEPENDENCIES += linux-pam +endif + +EJABBERD_ERLANG_LIBS = sasl crypto public_key ssl mnesia inets compiler + +# Guess answers for these tests, configure will bail out otherwise +# saying error: cannot run test program while cross compiling. +EJABBERD_CONF_ENV = \ + ac_cv_erlang_root_dir="$(HOST_DIR)/usr/lib/erlang" \ + $(foreach lib,$(EJABBERD_ERLANG_LIBS), \ + ac_cv_erlang_lib_dir_$(lib)="`package/ejabberd/check-erlang-lib $(lib)`") + +define EJABBERD_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) install -C $(@D) +endef + +# Delete HOST_DIR prefix from ERL path in ejabberctl script. +define EJABBERD_FIX_EJABBERDCTL + $(SED) 's,ERL=$(HOST_DIR),ERL=,' '$(TARGET_DIR)/usr/sbin/ejabberdctl' +endef + +EJABBERD_POST_INSTALL_TARGET_HOOKS += EJABBERD_FIX_EJABBERDCTL + +define EJABBERD_USERS + ejabberd -1 ejabberd -1 * /var/lib/ejabberd /bin/sh - ejabberd daemon +endef + +define EJABBERD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/ejabberd/S50ejabberd \ + $(TARGET_DIR)/etc/init.d/S50ejabberd +endef + +$(eval $(rebar-package)) diff --git a/package/elementary/Config.in b/package/elementary/Config.in new file mode 100644 index 0000000000..f356784731 --- /dev/null +++ b/package/elementary/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_ELEMENTARY + bool "elementary" + depends on BR2_PACKAGE_EFL + depends on BR2_TOOLCHAIN_HAS_THREADS # elm_store.c + depends on !BR2_STATIC_LIBS + help + Elementary is a widget toolkit and EFL wrapper and convenience + library to make it easy to build applications and tools with UIs + with less code. + + https://enlightenment.org + +comment "elementary needs a toolchain w/ threads, dynamic library" + depends on BR2_PACKAGE_EFL + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/elementary/elementary.hash b/package/elementary/elementary.hash new file mode 100644 index 0000000000..ecdbc8e5bd --- /dev/null +++ b/package/elementary/elementary.hash @@ -0,0 +1,2 @@ +# From https://download.enlightenment.org/rel/libs/elementary/elementary-1.15.3.tar.xz.sha256 +sha256 474a9175061021ce8cbcfdbde6162316fc0d927b21118d1ab549377ebc802a93 elementary-1.15.3.tar.xz diff --git a/package/elementary/elementary.mk b/package/elementary/elementary.mk new file mode 100644 index 0000000000..7de0c7b343 --- /dev/null +++ b/package/elementary/elementary.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# elementary +# +################################################################################ + +ELEMENTARY_VERSION = 1.15.3 +ELEMENTARY_SOURCE = elementary-$(ELEMENTARY_VERSION).tar.xz +ELEMENTARY_SITE = http://download.enlightenment.org/rel/libs/elementary +ELEMENTARY_LICENSE = LGPLv2.1 +ELEMENTARY_LICENSE_FILES = COPYING + +ELEMENTARY_INSTALL_STAGING = YES + +ELEMENTARY_DEPENDENCIES = host-pkgconf host-efl host-elementary efl + +ELEMENTARY_CONF_OPTS = \ + --with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc \ + --with-eet-eet=$(HOST_DIR)/usr/bin/eet \ + --with-eolian-gen=$(HOST_DIR)/usr/bin/eolian_gen \ + --with-eldbus_codegen=$(HOST_DIR)/usr/bin/eldbus-codegen \ + --with-elm-prefs-cc=$(HOST_DIR)/usr/bin/elm_prefs_cc \ + --with-doxygen=no \ + --disable-elementary-test + +# We need a host package in order to provide elm_prefs_cc and +# elementary_codegen. +HOST_ELEMENTARY_DEPENDENCIES = host-pkgconf host-efl +HOST_ELEMENTARY_CONF_OPTS = \ + --with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc \ + --with-eet-eet=$(HOST_DIR)/usr/bin/eet \ + --with-eolian-gen=$(HOST_DIR)/usr/bin/eolian_gen \ + --with-doxygen=no \ + --disable-elementary-test + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/elf2flt/Config.in.host b/package/elf2flt/Config.in.host new file mode 100644 index 0000000000..b93795baa4 --- /dev/null +++ b/package/elf2flt/Config.in.host @@ -0,0 +1,11 @@ +config BR2_PACKAGE_HOST_ELF2FLT + bool "Enable elf2flt support?" + depends on BR2_arm || BR2_sh || BR2_sparc || BR2_xtensa + depends on !BR2_USE_MMU + help + uCLinux uses a Binary Flat format commonly known as BFLT. It + is a relatively simple and lightweight executable format + based on the original a.out format. + + This option compiles the required tools and makes the required + modifications on your toolchain (linker). diff --git a/package/elf2flt/elf2flt.hash b/package/elf2flt/elf2flt.hash new file mode 100644 index 0000000000..9c18ba5d3e --- /dev/null +++ b/package/elf2flt/elf2flt.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 6a45a787a08da64f0f3036d3ae1865bc13f8f40d13f07511a2bf1b736acc4808 elf2flt-9dbc458c6122c495bbdec8dc975a15c9d39e5ff2.tar.gz diff --git a/package/elf2flt/elf2flt.mk b/package/elf2flt/elf2flt.mk new file mode 100644 index 0000000000..bd15ea2a15 --- /dev/null +++ b/package/elf2flt/elf2flt.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# elf2flt +# +################################################################################ + +ELF2FLT_VERSION = 9dbc458c6122c495bbdec8dc975a15c9d39e5ff2 +ELF2FLT_SITE = $(call github,uclinux-dev,elf2flt,$(ELF2FLT_VERSION)) +ELF2FLT_LICENSE = GPLv2+ +ELF2FLT_LICENSE_FILES = LICENSE.TXT + +HOST_ELF2FLT_DEPENDENCIES = host-binutils host-zlib + +# It is not exactly a host variant, but more a cross variant, which is +# why we pass a special --target option. +HOST_ELF2FLT_CONF_OPTS = \ + --with-bfd-include-dir=$(HOST_BINUTILS_DIR)/bfd/ \ + --with-binutils-include-dir=$(HOST_BINUTILS_DIR)/include/ \ + --with-libbfd=$(HOST_BINUTILS_DIR)/bfd/libbfd.a \ + --with-libiberty=$(HOST_BINUTILS_DIR)/libiberty/libiberty.a \ + --target=$(GNU_TARGET_NAME) \ + --disable-werror + +HOST_ELF2FLT_LIBS = -lz + +ifeq ($(BR2_GCC_ENABLE_LTO),y) +HOST_ELF2FLT_LIBS += -ldl +endif + +HOST_ELF2FLT_CONF_ENV = LIBS="$(HOST_ELF2FLT_LIBS)" + +$(eval $(host-autotools-package)) diff --git a/package/elftosb/0001-fixes-includes.patch b/package/elftosb/0001-fixes-includes.patch new file mode 100644 index 0000000000..eaf8ebad98 --- /dev/null +++ b/package/elftosb/0001-fixes-includes.patch @@ -0,0 +1,19 @@ +This patch uses system include files instead of a hard coded system path to fixe +potential compilation failure on systems that do not populate system header +files in /usr/include/.. + +Signed-off-by: Eric Jarrige +--- +Index: host-elftosb-10.12.01/common/stdafx.h +=================================================================== +--- host-elftosb-10.12.01.orig/common/stdafx.h 2012-01-30 12:43:35.000000000 +0100 ++++ host-elftosb-10.12.01/common/stdafx.h 2012-01-30 12:43:54.000000000 +0100 +@@ -27,7 +27,7 @@ + // For Linux systems only, types.h only defines the signed + // integer types. This is not professional code. + // Update: They are defined in the header files in the more recent version of redhat enterprise gcc. +-#include "/usr/include/sys/types.h" ++#include + #include + //typedef unsigned long uint32_t; + //typedef unsigned short uint16_t; diff --git a/package/elftosb/0002-force-cxx-compiler.patch b/package/elftosb/0002-force-cxx-compiler.patch new file mode 100644 index 0000000000..14df0dbe46 --- /dev/null +++ b/package/elftosb/0002-force-cxx-compiler.patch @@ -0,0 +1,98 @@ +Subject: [PATCH 1/1] elftosb: force host C++ compiler + +Because Freescale provides *.cpp sources and elftosb links again libstdc++, +force to use the host c++ compiler. + +This patch avoids the following error occurs: + +gcc AESKey.o Blob.o crc.o DataSource.o DataTarget.o ELFSourceFile.o EncoreBootImage.o EvalContext.o GHSSecInfo.o GlobMatcher.o HexValues.o Logging.o Operation.o OptionDictionary.o options.o OutputSection.o Random.o RijndaelCBCMAC.o rijndael.o SHA1.o SourceFile.o SRecordSourceFile.o stdafx.o StELFFile.o StExecutableImage.o StSRecordFile.o Value.o Version.o format_string.o ExcludesListMatcher.o SearchPath.o DataSourceImager.o IVTDataSource.o BootImageGenerator.o ConversionController.o ElftosbAST.o elftosb.o elftosb_lexer.o ElftosbLexer.o elftosb_parser.tab.o EncoreBootImageGenerator.o -lstdc++ -o elftosb +/usr/bin/ld: ElftosbAST.o: undefined reference to symbol 'powf@@GLIBC_2.2.5' +/usr/bin/ld: note: 'powf@@GLIBC_2.2.5' is defined in DSO /lib64/libm.so.6 so try adding it to the linker command line +/lib64/libm.so.6: could not read symbols: Invalid operation +collect2: error: ld returned 1 exit status + +When compiling with gcc and linking against libstdc++, ld uses libc instead of +libstdc++. +However, libc does not provide all functions libstdc++ does. +Indeed, maths functions are provided by libm, not libc. +Thus, elftosb should either: +- use gcc and link against libc and libm; +- or use g++ and link against libstdc++. + +Because elftosb is written in C++, this patch implement the sencond option, using +g++ and linking against libstdc++. + +Signed-off-by: Samuel Martin + +--- +Index: host-elftosb-10.12.01/makefile.rules +=================================================================== +--- host-elftosb-10.12.01.orig/makefile.rules 2012-06-09 21:12:23.557526100 +0200 ++++ host-elftosb-10.12.01/makefile.rules 2012-06-09 21:15:21.659894571 +0200 +@@ -15,6 +15,8 @@ + # UNAMES is going to be set to either "Linux" or "CYGWIN_NT-5.1" + UNAMES = $(shell uname -s) + ++CXX ?= g++ ++ + #******************************************************************************* + # Directories + +@@ -37,9 +39,9 @@ + #******************************************************************************* + # Build flags +-# gcc Compiler flags ++# Compiler flags + # -g : Produce debugging information. + +-CFLAGS = -g $(INC_PATH) -D${UNAMES} ++CXXFLAGS = -g $(INC_PATH) -D${UNAMES} + + #******************************************************************************* + # File lists +@@ -137,13 +139,13 @@ clean: + ${EXEC_FILE_ELFTOSB2} ${EXEC_FILE_SBTOOL} ${EXEC_FILE_KEYGEN} + + elftosb: ${OBJ_FILES_ELFTOSB2} +- gcc ${OBJ_FILES_ELFTOSB2} ${LIBS} -o ${EXEC_FILE_ELFTOSB2} ++ $(CXX) ${OBJ_FILES_ELFTOSB2} ${LIBS} -o ${EXEC_FILE_ELFTOSB2} + + sbtool: ${OBJ_FILES_SBTOOL} +- gcc ${OBJ_FILES_SBTOOL} ${LIBS} -o ${EXEC_FILE_SBTOOL} ++ $(CXX) ${OBJ_FILES_SBTOOL} ${LIBS} -o ${EXEC_FILE_SBTOOL} + + keygen: ${OBJ_FILES_KEYGEN} +- gcc ${OBJ_FILES_KEYGEN} ${LIBS} -o ${EXEC_FILE_KEYGEN} ++ $(CXX) ${OBJ_FILES_KEYGEN} ${LIBS} -o ${EXEC_FILE_KEYGEN} + + + #ifeq ("${UNAMES}", "Linux") +@@ -153,10 +155,10 @@ keygen: ${OBJ_FILES_KEYGEN} + .SUFFIXES : .c .cpp + + .c.o : +- gcc ${CFLAGS} -c $< ++ $(CC) ${CXXFLAGS} -c $< + + .cpp.o : +- gcc ${CFLAGS} -c $< ++ $(CXX) ${CXXFLAGS} -c $< + + #endif + +@@ -165,13 +167,13 @@ keygen: ${OBJ_FILES_KEYGEN} + + %.d: %.c + @set -e; \ +- $(CC) -MM $(CFLAGS) $< | \ ++ $(CC) -MM $(CXXFLAGS) $< | \ + sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \ + [ -s $@ ] || rm -f $@ + + %.d: %.cpp + @set -e; \ +- $(CC) -MM $(CFLAGS) $< | \ ++ $(CXX) -MM $(CXXFLAGS) $< | \ + sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \ + [ -s $@ ] || rm -f $@ + diff --git a/package/elftosb/elftosb.hash b/package/elftosb/elftosb.hash new file mode 100644 index 0000000000..2b9f02b14f --- /dev/null +++ b/package/elftosb/elftosb.hash @@ -0,0 +1,2 @@ +# From http://repository.timesys.com/buildsources/e/elftosb/elftosb-10.12.01/elftosb-10.12.01.tar.gz.md5sum +md5 e8005d606c1e0bb3507c82f6eceb3056 elftosb-10.12.01.tar.gz diff --git a/package/elftosb/elftosb.mk b/package/elftosb/elftosb.mk new file mode 100644 index 0000000000..ac9aa32538 --- /dev/null +++ b/package/elftosb/elftosb.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# elftosb +# +################################################################################ + +ELFTOSB_VERSION = 10.12.01 +ELFTOSB_SITE = http://repository.timesys.com/buildsources/e/elftosb/elftosb-$(ELFTOSB_VERSION) +ELFTOSB_LICENSE = BSD-3c +ELFTOSB_LICENSE_FILES = COPYING + +define HOST_ELFTOSB_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) all +endef + +define HOST_ELFTOSB_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/bld/linux/elftosb $(HOST_DIR)/usr/bin/elftosb + $(INSTALL) -D -m 0755 $(@D)/bld/linux/keygen $(HOST_DIR)/usr/bin/keygen + $(INSTALL) -D -m 0755 $(@D)/bld/linux/sbtool $(HOST_DIR)/usr/bin/sbtool +endef + +$(eval $(host-generic-package)) diff --git a/package/elfutils/0001-argp-support.patch b/package/elfutils/0001-argp-support.patch new file mode 100644 index 0000000000..1a74b35ffd --- /dev/null +++ b/package/elfutils/0001-argp-support.patch @@ -0,0 +1,93 @@ +Allow the usage of an external implementation of the argp functions + +uClibc lack the argp family of functions that glibc has. Therefore, we +add a check in the configure script to see if argp_parse is available +in the C library. If not, we look if it is available in the additional +'argp' library. If so, we link against that library. If not, we error +out. + +This allows to build elfutils against uClibc with an external argp +library. + +Based on the former patch by Thomas Petazzoni. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Vicente Olivert Riera + +diff -rup a/configure.ac b/configure.ac +--- a/configure.ac 2015-01-06 11:30:02.170052875 +0000 ++++ b/configure.ac 2015-01-06 11:31:10.122219826 +0000 +@@ -253,6 +253,13 @@ AC_SUBST([LIBEBL_SUBDIR]) + AC_DEFINE_UNQUOTED(LIBEBL_SUBDIR, "$LIBEBL_SUBDIR") + AH_TEMPLATE([LIBEBL_SUBDIR], [$libdir subdirectory containing libebl modules.]) + ++AC_CHECK_FUNC([argp_parse]) ++if test "$ac_cv_func_argp_parse" != yes; then ++ AC_CHECK_LIB([argp],[argp_parse],ARGP_LIBS=-largp, ++ AC_MSG_ERROR([No argp_parse function available.])) ++fi ++AC_SUBST(ARGP_LIBS) ++ + dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am + dnl conditional and config.h USE_ZLIB/USE_BZLIB #define. + save_LIBS="$LIBS" +diff -rup a/libdw/Makefile.am b/libdw/Makefile.am +--- a/libdw/Makefile.am 2014-12-19 20:43:11.000000000 +0000 ++++ b/libdw/Makefile.am 2015-01-06 11:32:21.075438524 +0000 +@@ -112,7 +112,7 @@ libdw.so$(EXEEXT): $(srcdir)/libdw.map l + -Wl,--enable-new-dtags,-rpath,$(pkglibdir) \ + -Wl,--version-script,$<,--no-undefined \ + -Wl,--whole-archive $(filter-out $<,$^) -Wl,--no-whole-archive\ +- -ldl $(zip_LIBS) ++ -ldl $(zip_LIBS) $(ARGP_LIBS) + @$(textrel_check) + ln -fs $@ $@.$(VERSION) + +diff -rup a/src/Makefile.am b/src/Makefile.am +--- a/src/Makefile.am 2015-01-06 11:30:02.430057339 +0000 ++++ b/src/Makefile.am 2015-01-06 11:34:53.061049752 +0000 +@@ -94,27 +94,29 @@ readelf_no_Werror = yes + strings_no_Werror = yes + addr2line_no_Wformat = yes + +-readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl ++readelf_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl $(ARGP_LIBS) + nm_LDADD = $(libdw) $(libebl) $(libelf) $(libeu) -ldl \ +- $(demanglelib) +-size_LDADD = $(libelf) $(libeu) +-strip_LDADD = $(libebl) $(libelf) $(libeu) -ldl +-ld_LDADD = $(libebl) $(libelf) $(libeu) -ldl ++ $(demanglelib) $(ARGP_LIBS) ++size_LDADD = $(libelf) $(libeu) $(ARGP_LIBS) ++strip_LDADD = $(libebl) $(libelf) $(libeu) -ldl $(ARGP_LIBS) ++ld_LDADD = $(libebl) $(libelf) $(libeu) -ldl $(ARGP_LIBS) + if NATIVE_LD + # -ldl is always needed for libebl. + ld_LDADD += libld_elf.a + endif + ld_LDFLAGS = -rdynamic +-elflint_LDADD = $(libebl) $(libelf) $(libeu) -ldl +-findtextrel_LDADD = $(libdw) $(libelf) +-addr2line_LDADD = $(libdw) $(libelf) +-elfcmp_LDADD = $(libebl) $(libelf) -ldl +-objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) -ldl +-ranlib_LDADD = libar.a $(libelf) $(libeu) +-strings_LDADD = $(libelf) $(libeu) +-ar_LDADD = libar.a $(libelf) $(libeu) +-unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) -ldl +-stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) -ldl $(demanglelib) ++elflint_LDADD = $(libebl) $(libelf) $(libeu) -ldl $(ARGP_LIBS) ++findtextrel_LDADD = $(libdw) $(libelf) $(ARGP_LIBS) ++addr2line_LDADD = $(libdw) $(libelf) $(ARGP_LIBS) ++elfcmp_LDADD = $(libebl) $(libelf) -ldl $(ARGP_LIBS) ++objdump_LDADD = $(libasm) $(libebl) $(libelf) $(libeu) -ldl \ ++ $(ARGP_LIBS) ++ranlib_LDADD = libar.a $(libelf) $(libeu) $(ARGP_LIBS) ++strings_LDADD = $(libelf) $(libeu) $(ARGP_LIBS) ++ar_LDADD = libar.a $(libelf) $(libeu) $(ARGP_LIBS) ++unstrip_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) -ldl $(ARGP_LIBS) ++stack_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) -ldl \ ++ $(demanglelib) $(ARGP_LIBS) + + ldlex.o: ldscript.c + ldlex_no_Werror = yes diff --git a/package/elfutils/0002-disable-progs.patch b/package/elfutils/0002-disable-progs.patch new file mode 100644 index 0000000000..3e37bb82ef --- /dev/null +++ b/package/elfutils/0002-disable-progs.patch @@ -0,0 +1,48 @@ +Add a --{enable,disable}-progs configure option + +Add a --{enable,disable}-progs configuration option to elfutils. This +allows to selectively disable the compilation of the elfutils programs +(in which case only the libraries are built and installed). This is +useful because the programs are often not needed, and also because +building the programs against uClibc causes several issues (lack of +obstack_printf() in uClibc for example). + +Based on the former patch by Thomas Petazzoni. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Vicente Olivert Riera + +diff -rup a/configure.ac b/configure.ac +--- a/configure.ac 2015-01-06 11:31:10.122219826 +0000 ++++ b/configure.ac 2015-01-06 11:37:38.397891424 +0000 +@@ -260,6 +260,12 @@ if test "$ac_cv_func_argp_parse" != yes; + fi + AC_SUBST(ARGP_LIBS) + ++AC_ARG_ENABLE([progs], ++ AS_HELP_STRING([--enable-progs], [enable progs]), ++ enable_progs=$enableval, ++ enable_progs=yes) ++AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes) ++ + dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am + dnl conditional and config.h USE_ZLIB/USE_BZLIB #define. + save_LIBS="$LIBS" +diff -rup a/Makefile.am b/Makefile.am +--- a/Makefile.am 2014-06-17 19:51:09.000000000 +0100 ++++ b/Makefile.am 2015-01-06 11:38:42.846999410 +0000 +@@ -22,9 +22,13 @@ ACLOCAL_AMFLAGS = -I m4 + + pkginclude_HEADERS = version.h + ++if ENABLE_PROGS ++PROGS_SUBDIR = src ++endif ++ + # Add doc back when we have some real content. + SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \ +- backends src po tests ++ backends $(PROGS_SUBDIR) po tests + + EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ + COPYING COPYING-GPLV2 COPYING-LGPLV3 diff --git a/package/elfutils/0003-fts.patch b/package/elfutils/0003-fts.patch new file mode 100644 index 0000000000..99e8794195 --- /dev/null +++ b/package/elfutils/0003-fts.patch @@ -0,0 +1,1305 @@ +Add an implementation of the fts_*() functions + +The fts_*() functions are optional in uClibc, and not compiled in our +default configuration. The best option would be to migrate this +elfutils code to the nftw family of functions, but it requires quite +some work. + +So we have several options here: + + *) Enable fts_*() functions in our default uClibc configuration. Not + nice since only one package needs them (the help text of uClibc + for fts_*() functions explicitly mention that they have been added + to be able to build elfutils). + + *) Use gnulib, but it is quite heavy to setup, requires modifications + to configure.ac, and other things. + + *) Copy the fts function from uClibc into elfutils source code. This + is the solution used below. uClibc is LGPL, and elfutils is + LGPL/GPL, so there should not be any licensing issue. + +Of course, the fts_*() functions are only built if they are not +already provided by the C library. + +Based on the former patch by Thomas Petazzoni. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Vicente Olivert Riera + +diff -Nrup a/configure.ac b/configure.ac +--- a/configure.ac 2015-01-06 11:37:38.397891424 +0000 ++++ b/configure.ac 2015-01-06 11:40:53.568258759 +0000 +@@ -266,6 +266,10 @@ AC_ARG_ENABLE([progs], + enable_progs=yes) + AM_CONDITIONAL(ENABLE_PROGS, test "$enable_progs" = yes) + ++AC_CHECK_HEADER([fts.h], ++ AC_DEFINE([HAVE_FTS_H], [], [Define if is available in C library])) ++AM_CONDITIONAL(HAVE_FTS, test "$ac_cv_header_fts_h" = yes) ++ + dnl Test for zlib and bzlib, gives ZLIB/BZLIB .am + dnl conditional and config.h USE_ZLIB/USE_BZLIB #define. + save_LIBS="$LIBS" +diff -Nrup a/libdwfl/fts.c b/libdwfl/fts.c +--- a/libdwfl/fts.c 1970-01-01 01:00:00.000000000 +0100 ++++ b/libdwfl/fts.c 2015-01-06 11:42:13.481640322 +0000 +@@ -0,0 +1,1095 @@ ++/*- ++ * Copyright (c) 1990, 1993, 1994 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include "fts_.h" ++#include ++#include ++#include ++ ++/* Largest alignment size needed, minus one. ++ Usually long double is the worst case. */ ++#ifndef ALIGNBYTES ++#define ALIGNBYTES (__alignof__ (long double) - 1) ++#endif ++/* Align P to that size. */ ++#ifndef ALIGN ++#define ALIGN(p) (((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES) ++#endif ++ ++ ++static FTSENT *fts_alloc (FTS *, const char *, size_t); ++static FTSENT *fts_build (FTS *, int); ++static void fts_lfree (FTSENT *); ++static void fts_load (FTS *, FTSENT *); ++static size_t fts_maxarglen (char * const *); ++static void fts_padjust (FTS *, FTSENT *); ++static int fts_palloc (FTS *, size_t); ++static FTSENT *fts_sort (FTS *, FTSENT *, int); ++static u_short fts_stat (FTS *, FTSENT *, int); ++static int fts_safe_changedir (FTS *, FTSENT *, int, const char *); ++ ++#ifndef MAX ++#define MAX(a, b) ({ __typeof__ (a) _a = (a); \ ++ __typeof__ (b) _b = (b); \ ++ _a > _b ? _a : _b; }) ++#endif ++ ++#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) ++ ++#define CLR(opt) (sp->fts_options &= ~(opt)) ++#define ISSET(opt) (sp->fts_options & (opt)) ++#define SET(opt) (sp->fts_options |= (opt)) ++ ++#define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && fchdir(fd)) ++ ++/* fts_build flags */ ++#define BCHILD 1 /* fts_children */ ++#define BNAMES 2 /* fts_children, names only */ ++#define BREAD 3 /* fts_read */ ++ ++FTS * ++fts_open( char * const *argv, register int options, ++ int (*compar) (const FTSENT **, const FTSENT **)) ++{ ++ register FTS *sp; ++ register FTSENT *p, *root; ++ register int nitems; ++ FTSENT *parent = NULL; ++ FTSENT *tmp = NULL; ++ ++ /* Options check. */ ++ if (options & ~FTS_OPTIONMASK) { ++ errno = EINVAL; ++ return (NULL); ++ } ++ ++ /* Allocate/initialize the stream */ ++ if ((sp = malloc((u_int)sizeof(FTS))) == NULL) ++ return (NULL); ++ memset(sp, 0, sizeof(FTS)); ++ sp->fts_compar = (int (*) (const void *, const void *)) compar; ++ sp->fts_options = options; ++ ++ /* Logical walks turn on NOCHDIR; symbolic links are too hard. */ ++ if (ISSET(FTS_LOGICAL)) ++ SET(FTS_NOCHDIR); ++ ++ /* ++ * Start out with 1K of path space, and enough, in any case, ++ * to hold the user's paths. ++ */ ++#ifndef MAXPATHLEN ++#define MAXPATHLEN 1024 ++#endif ++ size_t maxarglen = fts_maxarglen(argv); ++ if (fts_palloc(sp, MAX(maxarglen, MAXPATHLEN))) ++ goto mem1; ++ ++ /* Allocate/initialize root's parent. */ ++ if (*argv != NULL) { ++ if ((parent = fts_alloc(sp, "", 0)) == NULL) ++ goto mem2; ++ parent->fts_level = FTS_ROOTPARENTLEVEL; ++ } ++ ++ /* Allocate/initialize root(s). */ ++ for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { ++ /* Don't allow zero-length paths. */ ++ size_t len = strlen(*argv); ++ if (len == 0) { ++ errno = ENOENT; ++ goto mem3; ++ } ++ ++ p = fts_alloc(sp, *argv, len); ++ p->fts_level = FTS_ROOTLEVEL; ++ p->fts_parent = parent; ++ p->fts_accpath = p->fts_name; ++ p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW)); ++ ++ /* Command-line "." and ".." are real directories. */ ++ if (p->fts_info == FTS_DOT) ++ p->fts_info = FTS_D; ++ ++ /* ++ * If comparison routine supplied, traverse in sorted ++ * order; otherwise traverse in the order specified. ++ */ ++ if (compar) { ++ p->fts_link = root; ++ root = p; ++ } else { ++ p->fts_link = NULL; ++ if (root == NULL) ++ tmp = root = p; ++ else { ++ tmp->fts_link = p; ++ tmp = p; ++ } ++ } ++ } ++ if (compar && nitems > 1) ++ root = fts_sort(sp, root, nitems); ++ ++ /* ++ * Allocate a dummy pointer and make fts_read think that we've just ++ * finished the node before the root(s); set p->fts_info to FTS_INIT ++ * so that everything about the "current" node is ignored. ++ */ ++ if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL) ++ goto mem3; ++ sp->fts_cur->fts_link = root; ++ sp->fts_cur->fts_info = FTS_INIT; ++ ++ /* ++ * If using chdir(2), grab a file descriptor pointing to dot to ensure ++ * that we can get back here; this could be avoided for some paths, ++ * but almost certainly not worth the effort. Slashes, symbolic links, ++ * and ".." are all fairly nasty problems. Note, if we can't get the ++ * descriptor we run anyway, just more slowly. ++ */ ++ if (!ISSET(FTS_NOCHDIR) ++ && (sp->fts_rfd = open(".", O_RDONLY, 0)) < 0) ++ SET(FTS_NOCHDIR); ++ ++ return (sp); ++ ++mem3: fts_lfree(root); ++ free(parent); ++mem2: free(sp->fts_path); ++mem1: free(sp); ++ return (NULL); ++} ++ ++static void ++fts_load(FTS *sp, register FTSENT *p) ++{ ++ register int len; ++ register char *cp; ++ ++ /* ++ * Load the stream structure for the next traversal. Since we don't ++ * actually enter the directory until after the preorder visit, set ++ * the fts_accpath field specially so the chdir gets done to the right ++ * place and the user can access the first node. From fts_open it's ++ * known that the path will fit. ++ */ ++ len = p->fts_pathlen = p->fts_namelen; ++ memmove(sp->fts_path, p->fts_name, len + 1); ++ if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) { ++ len = strlen(++cp); ++ memmove(p->fts_name, cp, len + 1); ++ p->fts_namelen = len; ++ } ++ p->fts_accpath = p->fts_path = sp->fts_path; ++ sp->fts_dev = p->fts_dev; ++} ++ ++int ++fts_close(FTS *sp) ++{ ++ register FTSENT *freep, *p; ++ int saved_errno; ++ ++ /* ++ * This still works if we haven't read anything -- the dummy structure ++ * points to the root list, so we step through to the end of the root ++ * list which has a valid parent pointer. ++ */ ++ if (sp->fts_cur) { ++ for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) { ++ freep = p; ++ p = p->fts_link != NULL ? p->fts_link : p->fts_parent; ++ free(freep); ++ } ++ free(p); ++ } ++ ++ /* Free up child linked list, sort array, path buffer. */ ++ if (sp->fts_child) ++ fts_lfree(sp->fts_child); ++ free(sp->fts_array); ++ free(sp->fts_path); ++ ++ /* Return to original directory, save errno if necessary. */ ++ if (!ISSET(FTS_NOCHDIR)) { ++ saved_errno = fchdir(sp->fts_rfd) ? errno : 0; ++ (void)close(sp->fts_rfd); ++ ++ /* Set errno and return. */ ++ if (saved_errno != 0) { ++ /* Free up the stream pointer. */ ++ free(sp); ++ errno = saved_errno; ++ return (-1); ++ } ++ } ++ ++ /* Free up the stream pointer. */ ++ free(sp); ++ return (0); ++} ++ ++/* ++ * Special case of "/" at the end of the path so that slashes aren't ++ * appended which would cause paths to be written as "....//foo". ++ */ ++#define NAPPEND(p) \ ++ (p->fts_path[p->fts_pathlen - 1] == '/' \ ++ ? p->fts_pathlen - 1 : p->fts_pathlen) ++ ++FTSENT * ++fts_read(register FTS *sp) ++{ ++ register FTSENT *p, *tmp; ++ register int instr; ++ register char *t; ++ int saved_errno; ++ ++ /* If finished or unrecoverable error, return NULL. */ ++ if (sp->fts_cur == NULL || ISSET(FTS_STOP)) ++ return (NULL); ++ ++ /* Set current node pointer. */ ++ p = sp->fts_cur; ++ ++ /* Save and zero out user instructions. */ ++ instr = p->fts_instr; ++ p->fts_instr = FTS_NOINSTR; ++ ++ /* Any type of file may be re-visited; re-stat and re-turn. */ ++ if (instr == FTS_AGAIN) { ++ p->fts_info = fts_stat(sp, p, 0); ++ return (p); ++ } ++ ++ /* ++ * Following a symlink -- SLNONE test allows application to see ++ * SLNONE and recover. If indirecting through a symlink, have ++ * keep a pointer to current location. If unable to get that ++ * pointer, follow fails. ++ */ ++ if (instr == FTS_FOLLOW && ++ (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { ++ p->fts_info = fts_stat(sp, p, 1); ++ if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { ++ if ((p->fts_symfd = open(".", O_RDONLY, 0)) < 0) { ++ p->fts_errno = errno; ++ p->fts_info = FTS_ERR; ++ } else ++ p->fts_flags |= FTS_SYMFOLLOW; ++ } ++ return (p); ++ } ++ ++ /* Directory in pre-order. */ ++ if (p->fts_info == FTS_D) { ++ /* If skipped or crossed mount point, do post-order visit. */ ++ if (instr == FTS_SKIP || ++ (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) { ++ if (p->fts_flags & FTS_SYMFOLLOW) ++ (void)close(p->fts_symfd); ++ if (sp->fts_child) { ++ fts_lfree(sp->fts_child); ++ sp->fts_child = NULL; ++ } ++ p->fts_info = FTS_DP; ++ return (p); ++ } ++ ++ /* Rebuild if only read the names and now traversing. */ ++ if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) { ++ CLR(FTS_NAMEONLY); ++ fts_lfree(sp->fts_child); ++ sp->fts_child = NULL; ++ } ++ ++ /* ++ * Cd to the subdirectory. ++ * ++ * If have already read and now fail to chdir, whack the list ++ * to make the names come out right, and set the parent errno ++ * so the application will eventually get an error condition. ++ * Set the FTS_DONTCHDIR flag so that when we logically change ++ * directories back to the parent we don't do a chdir. ++ * ++ * If haven't read do so. If the read fails, fts_build sets ++ * FTS_STOP or the fts_info field of the node. ++ */ ++ if (sp->fts_child != NULL) { ++ if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) { ++ p->fts_errno = errno; ++ p->fts_flags |= FTS_DONTCHDIR; ++ for (p = sp->fts_child; p != NULL; ++ p = p->fts_link) ++ p->fts_accpath = ++ p->fts_parent->fts_accpath; ++ } ++ } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) { ++ if (ISSET(FTS_STOP)) ++ return (NULL); ++ return (p); ++ } ++ p = sp->fts_child; ++ sp->fts_child = NULL; ++ sp->fts_cur = p; ++ goto name; ++ } ++ ++ /* Move to the next node on this level. */ ++next: tmp = p; ++ if ((p = p->fts_link) != NULL) { ++ sp->fts_cur = p; ++ free(tmp); ++ ++ /* ++ * If reached the top, return to the original directory (or ++ * the root of the tree), and load the paths for the next root. ++ */ ++ if (p->fts_level == FTS_ROOTLEVEL) { ++ if (FCHDIR(sp, sp->fts_rfd)) { ++ SET(FTS_STOP); ++ return (NULL); ++ } ++ fts_load(sp, p); ++ return p; ++ } ++ ++ /* ++ * User may have called fts_set on the node. If skipped, ++ * ignore. If followed, get a file descriptor so we can ++ * get back if necessary. ++ */ ++ if (p->fts_instr == FTS_SKIP) ++ goto next; ++ if (p->fts_instr == FTS_FOLLOW) { ++ p->fts_info = fts_stat(sp, p, 1); ++ if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { ++ if ((p->fts_symfd = ++ open(".", O_RDONLY, 0)) < 0) { ++ p->fts_errno = errno; ++ p->fts_info = FTS_ERR; ++ } else ++ p->fts_flags |= FTS_SYMFOLLOW; ++ } ++ p->fts_instr = FTS_NOINSTR; ++ } ++ ++name: t = sp->fts_path + NAPPEND(p->fts_parent); ++ *t++ = '/'; ++ memmove(t, p->fts_name, p->fts_namelen + 1); ++ return p; ++ } ++ ++ /* Move up to the parent node. */ ++ p = tmp->fts_parent; ++ sp->fts_cur = p; ++ free(tmp); ++ ++ if (p->fts_level == FTS_ROOTPARENTLEVEL) { ++ /* ++ * Done; free everything up and set errno to 0 so the user ++ * can distinguish between error and EOF. ++ */ ++ free(p); ++ errno = 0; ++ return (sp->fts_cur = NULL); ++ } ++ ++ /* NUL terminate the pathname. */ ++ sp->fts_path[p->fts_pathlen] = '\0'; ++ ++ /* ++ * Return to the parent directory. If at a root node or came through ++ * a symlink, go back through the file descriptor. Otherwise, cd up ++ * one directory. ++ */ ++ if (p->fts_level == FTS_ROOTLEVEL) { ++ if (FCHDIR(sp, sp->fts_rfd)) { ++ SET(FTS_STOP); ++ return (NULL); ++ } ++ } else if (p->fts_flags & FTS_SYMFOLLOW) { ++ if (FCHDIR(sp, p->fts_symfd)) { ++ saved_errno = errno; ++ (void)close(p->fts_symfd); ++ errno = saved_errno; ++ SET(FTS_STOP); ++ return (NULL); ++ } ++ (void)close(p->fts_symfd); ++ } else if (!(p->fts_flags & FTS_DONTCHDIR) && ++ fts_safe_changedir(sp, p->fts_parent, -1, "..")) { ++ SET(FTS_STOP); ++ return (NULL); ++ } ++ p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; ++ return p; ++} ++ ++/* ++ * Fts_set takes the stream as an argument although it's not used in this ++ * implementation; it would be necessary if anyone wanted to add global ++ * semantics to fts using fts_set. An error return is allowed for similar ++ * reasons. ++ */ ++/* ARGSUSED */ ++int ++fts_set(FTS *sp, FTSENT *p, int instr) ++{ ++ if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && ++ instr != FTS_NOINSTR && instr != FTS_SKIP) { ++ errno = EINVAL; ++ return (1); ++ } ++ p->fts_instr = instr; ++ return (0); ++} ++ ++FTSENT * ++fts_children(register FTS *sp, int instr) ++{ ++ register FTSENT *p; ++ int fd; ++ ++ if (instr != 0 && instr != FTS_NAMEONLY) { ++ errno = EINVAL; ++ return (NULL); ++ } ++ ++ /* Set current node pointer. */ ++ p = sp->fts_cur; ++ ++ /* ++ * Errno set to 0 so user can distinguish empty directory from ++ * an error. ++ */ ++ errno = 0; ++ ++ /* Fatal errors stop here. */ ++ if (ISSET(FTS_STOP)) ++ return (NULL); ++ ++ /* Return logical hierarchy of user's arguments. */ ++ if (p->fts_info == FTS_INIT) ++ return (p->fts_link); ++ ++ /* ++ * If not a directory being visited in pre-order, stop here. Could ++ * allow FTS_DNR, assuming the user has fixed the problem, but the ++ * same effect is available with FTS_AGAIN. ++ */ ++ if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */) ++ return (NULL); ++ ++ /* Free up any previous child list. */ ++ if (sp->fts_child != NULL) ++ fts_lfree(sp->fts_child); ++ ++ if (instr == FTS_NAMEONLY) { ++ SET(FTS_NAMEONLY); ++ instr = BNAMES; ++ } else ++ instr = BCHILD; ++ ++ /* ++ * If using chdir on a relative path and called BEFORE fts_read does ++ * its chdir to the root of a traversal, we can lose -- we need to ++ * chdir into the subdirectory, and we don't know where the current ++ * directory is, so we can't get back so that the upcoming chdir by ++ * fts_read will work. ++ */ ++ if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' || ++ ISSET(FTS_NOCHDIR)) ++ return (sp->fts_child = fts_build(sp, instr)); ++ ++ if ((fd = open(".", O_RDONLY, 0)) < 0) ++ return (NULL); ++ sp->fts_child = fts_build(sp, instr); ++ if (fchdir(fd)) ++ return (NULL); ++ (void)close(fd); ++ return (sp->fts_child); ++} ++ ++/* ++ * This is the tricky part -- do not casually change *anything* in here. The ++ * idea is to build the linked list of entries that are used by fts_children ++ * and fts_read. There are lots of special cases. ++ * ++ * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is ++ * set and it's a physical walk (so that symbolic links can't be directories), ++ * we can do things quickly. First, if it's a 4.4BSD file system, the type ++ * of the file is in the directory entry. Otherwise, we assume that the number ++ * of subdirectories in a node is equal to the number of links to the parent. ++ * The former skips all stat calls. The latter skips stat calls in any leaf ++ * directories and for any files after the subdirectories in the directory have ++ * been found, cutting the stat calls by about 2/3. ++ */ ++static FTSENT * ++fts_build(register FTS *sp, int type) ++{ ++ register struct dirent *dp; ++ register FTSENT *p, *head; ++ register int nitems; ++ FTSENT *cur, *tail; ++ DIR *dirp; ++ void *oldaddr; ++ int cderrno, descend, len, level, nlinks, saved_errno, ++ nostat, doadjust; ++ size_t maxlen; ++ char *cp; ++ ++ /* Set current node pointer. */ ++ cur = sp->fts_cur; ++ ++ /* ++ * Open the directory for reading. If this fails, we're done. ++ * If being called from fts_read, set the fts_info field. ++ */ ++#if defined FTS_WHITEOUT && 0 ++ if (ISSET(FTS_WHITEOUT)) ++ oflag = DTF_NODUP|DTF_REWIND; ++ else ++ oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND; ++#else ++# define opendir2(path, flag) opendir(path) ++#endif ++ if ((dirp = opendir2(cur->fts_accpath, oflag)) == NULL) { ++ if (type == BREAD) { ++ cur->fts_info = FTS_DNR; ++ cur->fts_errno = errno; ++ } ++ return (NULL); ++ } ++ ++ /* ++ * Nlinks is the number of possible entries of type directory in the ++ * directory if we're cheating on stat calls, 0 if we're not doing ++ * any stat calls at all, -1 if we're doing stats on everything. ++ */ ++ if (type == BNAMES) { ++ nlinks = 0; ++ /* Be quiet about nostat, GCC. */ ++ nostat = 0; ++ } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) { ++ nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2); ++ nostat = 1; ++ } else { ++ nlinks = -1; ++ nostat = 0; ++ } ++ ++#ifdef notdef ++ (void)printf("nlinks == %d (cur: %d)\n", nlinks, cur->fts_nlink); ++ (void)printf("NOSTAT %d PHYSICAL %d SEEDOT %d\n", ++ ISSET(FTS_NOSTAT), ISSET(FTS_PHYSICAL), ISSET(FTS_SEEDOT)); ++#endif ++ /* ++ * If we're going to need to stat anything or we want to descend ++ * and stay in the directory, chdir. If this fails we keep going, ++ * but set a flag so we don't chdir after the post-order visit. ++ * We won't be able to stat anything, but we can still return the ++ * names themselves. Note, that since fts_read won't be able to ++ * chdir into the directory, it will have to return different path ++ * names than before, i.e. "a/b" instead of "b". Since the node ++ * has already been visited in pre-order, have to wait until the ++ * post-order visit to return the error. There is a special case ++ * here, if there was nothing to stat then it's not an error to ++ * not be able to stat. This is all fairly nasty. If a program ++ * needed sorted entries or stat information, they had better be ++ * checking FTS_NS on the returned nodes. ++ */ ++ cderrno = 0; ++ if (nlinks || type == BREAD) { ++ if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) { ++ if (nlinks && type == BREAD) ++ cur->fts_errno = errno; ++ cur->fts_flags |= FTS_DONTCHDIR; ++ descend = 0; ++ cderrno = errno; ++ (void)closedir(dirp); ++ dirp = NULL; ++ } else ++ descend = 1; ++ } else ++ descend = 0; ++ ++ /* ++ * Figure out the max file name length that can be stored in the ++ * current path -- the inner loop allocates more path as necessary. ++ * We really wouldn't have to do the maxlen calculations here, we ++ * could do them in fts_read before returning the path, but it's a ++ * lot easier here since the length is part of the dirent structure. ++ * ++ * If not changing directories set a pointer so that can just append ++ * each new name into the path. ++ */ ++ len = NAPPEND(cur); ++ if (ISSET(FTS_NOCHDIR)) { ++ cp = sp->fts_path + len; ++ *cp++ = '/'; ++ } else { ++ /* GCC, you're too verbose. */ ++ cp = NULL; ++ } ++ len++; ++ maxlen = sp->fts_pathlen - len; ++ ++ level = cur->fts_level + 1; ++ ++ /* Read the directory, attaching each entry to the `link' pointer. */ ++ doadjust = 0; ++ for (head = tail = NULL, nitems = 0; dirp && (dp = readdir(dirp));) { ++ if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) ++ continue; ++ ++ if ((p = fts_alloc(sp, dp->d_name, _D_EXACT_NAMLEN (dp))) == NULL) ++ goto mem1; ++ if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */ ++ oldaddr = sp->fts_path; ++ if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) { ++ /* ++ * No more memory for path or structures. Save ++ * errno, free up the current structure and the ++ * structures already allocated. ++ */ ++mem1: saved_errno = errno; ++ free(p); ++ fts_lfree(head); ++ (void)closedir(dirp); ++ cur->fts_info = FTS_ERR; ++ SET(FTS_STOP); ++ errno = saved_errno; ++ return (NULL); ++ } ++ /* Did realloc() change the pointer? */ ++ if (oldaddr != sp->fts_path) { ++ doadjust = 1; ++ if (ISSET(FTS_NOCHDIR)) ++ cp = sp->fts_path + len; ++ } ++ maxlen = sp->fts_pathlen - len; ++ } ++ ++ if (len + _D_EXACT_NAMLEN (dp) >= USHRT_MAX) { ++ /* ++ * In an FTSENT, fts_pathlen is a u_short so it is ++ * possible to wraparound here. If we do, free up ++ * the current structure and the structures already ++ * allocated, then error out with ENAMETOOLONG. ++ */ ++ free(p); ++ fts_lfree(head); ++ (void)closedir(dirp); ++ cur->fts_info = FTS_ERR; ++ SET(FTS_STOP); ++ errno = ENAMETOOLONG; ++ return (NULL); ++ } ++ p->fts_level = level; ++ p->fts_parent = sp->fts_cur; ++ p->fts_pathlen = len + _D_EXACT_NAMLEN (dp); ++ ++#if defined FTS_WHITEOUT && 0 ++ if (dp->d_type == DT_WHT) ++ p->fts_flags |= FTS_ISW; ++#endif ++ ++#if 0 ++ /* Unreachable code. cderrno is only ever set to a nonnull ++ value if dirp is closed at the same time. But then we ++ cannot enter this loop. */ ++ if (cderrno) { ++ if (nlinks) { ++ p->fts_info = FTS_NS; ++ p->fts_errno = cderrno; ++ } else ++ p->fts_info = FTS_NSOK; ++ p->fts_accpath = cur->fts_accpath; ++ } else ++#endif ++ if (nlinks == 0 ++#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE ++ || (nostat && ++ dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN) ++#endif ++ ) { ++ p->fts_accpath = ++ ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name; ++ p->fts_info = FTS_NSOK; ++ } else { ++ /* Build a file name for fts_stat to stat. */ ++ if (ISSET(FTS_NOCHDIR)) { ++ p->fts_accpath = p->fts_path; ++ memmove(cp, p->fts_name, p->fts_namelen + 1); ++ } else ++ p->fts_accpath = p->fts_name; ++ /* Stat it. */ ++ p->fts_info = fts_stat(sp, p, 0); ++ ++ /* Decrement link count if applicable. */ ++ if (nlinks > 0 && (p->fts_info == FTS_D || ++ p->fts_info == FTS_DC || p->fts_info == FTS_DOT)) ++ --nlinks; ++ } ++ ++ /* We walk in directory order so "ls -f" doesn't get upset. */ ++ p->fts_link = NULL; ++ if (head == NULL) ++ head = tail = p; ++ else { ++ tail->fts_link = p; ++ tail = p; ++ } ++ ++nitems; ++ } ++ if (dirp) ++ (void)closedir(dirp); ++ ++ /* ++ * If realloc() changed the address of the path, adjust the ++ * addresses for the rest of the tree and the dir list. ++ */ ++ if (doadjust) ++ fts_padjust(sp, head); ++ ++ /* ++ * If not changing directories, reset the path back to original ++ * state. ++ */ ++ if (ISSET(FTS_NOCHDIR)) { ++ if (len == sp->fts_pathlen || nitems == 0) ++ --cp; ++ *cp = '\0'; ++ } ++ ++ /* ++ * If descended after called from fts_children or after called from ++ * fts_read and nothing found, get back. At the root level we use ++ * the saved fd; if one of fts_open()'s arguments is a relative path ++ * to an empty directory, we wind up here with no other way back. If ++ * can't get back, we're done. ++ */ ++ if (descend && (type == BCHILD || !nitems) && ++ (cur->fts_level == FTS_ROOTLEVEL ? ++ FCHDIR(sp, sp->fts_rfd) : ++ fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) { ++ cur->fts_info = FTS_ERR; ++ SET(FTS_STOP); ++ fts_lfree(head); ++ return (NULL); ++ } ++ ++ /* If didn't find anything, return NULL. */ ++ if (!nitems) { ++ if (type == BREAD) ++ cur->fts_info = FTS_DP; ++ fts_lfree(head); ++ return (NULL); ++ } ++ ++ /* Sort the entries. */ ++ if (sp->fts_compar && nitems > 1) ++ head = fts_sort(sp, head, nitems); ++ return (head); ++} ++ ++static u_short ++fts_stat(FTS *sp, register FTSENT *p, int follow) ++{ ++ register FTSENT *t; ++ register dev_t dev; ++ register ino_t ino; ++ struct stat *sbp, sb; ++ int saved_errno; ++ ++ /* If user needs stat info, stat buffer already allocated. */ ++ sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp; ++ ++#if defined FTS_WHITEOUT && 0 ++ /* check for whiteout */ ++ if (p->fts_flags & FTS_ISW) { ++ if (sbp != &sb) { ++ memset(sbp, '\0', sizeof (*sbp)); ++ sbp->st_mode = S_IFWHT; ++ } ++ return (FTS_W); ++ } ++#endif ++ ++ /* ++ * If doing a logical walk, or application requested FTS_FOLLOW, do ++ * a stat(2). If that fails, check for a non-existent symlink. If ++ * fail, set the errno from the stat call. ++ */ ++ if (ISSET(FTS_LOGICAL) || follow) { ++ if (stat(p->fts_accpath, sbp)) { ++ saved_errno = errno; ++ if (!lstat(p->fts_accpath, sbp)) { ++ errno = 0; ++ return (FTS_SLNONE); ++ } ++ p->fts_errno = saved_errno; ++ goto err; ++ } ++ } else if (lstat(p->fts_accpath, sbp)) { ++ p->fts_errno = errno; ++err: memset(sbp, 0, sizeof(struct stat)); ++ return (FTS_NS); ++ } ++ ++ if (S_ISDIR(sbp->st_mode)) { ++ /* ++ * Set the device/inode. Used to find cycles and check for ++ * crossing mount points. Also remember the link count, used ++ * in fts_build to limit the number of stat calls. It is ++ * understood that these fields are only referenced if fts_info ++ * is set to FTS_D. ++ */ ++ dev = p->fts_dev = sbp->st_dev; ++ ino = p->fts_ino = sbp->st_ino; ++ p->fts_nlink = sbp->st_nlink; ++ ++ if (ISDOT(p->fts_name)) ++ return (FTS_DOT); ++ ++ /* ++ * Cycle detection is done by brute force when the directory ++ * is first encountered. If the tree gets deep enough or the ++ * number of symbolic links to directories is high enough, ++ * something faster might be worthwhile. ++ */ ++ for (t = p->fts_parent; ++ t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent) ++ if (ino == t->fts_ino && dev == t->fts_dev) { ++ p->fts_cycle = t; ++ return (FTS_DC); ++ } ++ return (FTS_D); ++ } ++ if (S_ISLNK(sbp->st_mode)) ++ return (FTS_SL); ++ if (S_ISREG(sbp->st_mode)) ++ return (FTS_F); ++ return (FTS_DEFAULT); ++} ++ ++static FTSENT * ++fts_sort(FTS *sp, FTSENT *head, register int nitems) ++{ ++ register FTSENT **ap, *p; ++ ++ /* ++ * Construct an array of pointers to the structures and call qsort(3). ++ * Reassemble the array in the order returned by qsort. If unable to ++ * sort for memory reasons, return the directory entries in their ++ * current order. Allocate enough space for the current needs plus ++ * 40 so don't realloc one entry at a time. ++ */ ++ if (nitems > sp->fts_nitems) { ++ struct _ftsent **a; ++ ++ sp->fts_nitems = nitems + 40; ++ if ((a = realloc(sp->fts_array, ++ (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) { ++ free(sp->fts_array); ++ sp->fts_array = NULL; ++ sp->fts_nitems = 0; ++ return (head); ++ } ++ sp->fts_array = a; ++ } ++ for (ap = sp->fts_array, p = head; p; p = p->fts_link) ++ *ap++ = p; ++ qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar); ++ for (head = *(ap = sp->fts_array); --nitems; ++ap) ++ ap[0]->fts_link = ap[1]; ++ ap[0]->fts_link = NULL; ++ return (head); ++} ++ ++static FTSENT * ++fts_alloc(FTS *sp, const char *name, size_t namelen) ++{ ++ register FTSENT *p; ++ size_t len; ++ ++ /* ++ * The file name is a variable length array and no stat structure is ++ * necessary if the user has set the nostat bit. Allocate the FTSENT ++ * structure, the file name and the stat structure in one chunk, but ++ * be careful that the stat structure is reasonably aligned. Since the ++ * fts_name field is declared to be of size 1, the fts_name pointer is ++ * namelen + 2 before the first possible address of the stat structure. ++ */ ++ len = sizeof(FTSENT) + namelen; ++ if (!ISSET(FTS_NOSTAT)) ++ len += sizeof(struct stat) + ALIGNBYTES; ++ if ((p = malloc(len)) == NULL) ++ return (NULL); ++ ++ /* Copy the name and guarantee NUL termination. */ ++ memmove(p->fts_name, name, namelen); ++ p->fts_name[namelen] = '\0'; ++ ++ if (!ISSET(FTS_NOSTAT)) ++ p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2); ++ p->fts_namelen = namelen; ++ p->fts_path = sp->fts_path; ++ p->fts_errno = 0; ++ p->fts_flags = 0; ++ p->fts_instr = FTS_NOINSTR; ++ p->fts_number = 0; ++ p->fts_pointer = NULL; ++ return (p); ++} ++ ++static void ++fts_lfree(register FTSENT *head) ++{ ++ register FTSENT *p; ++ ++ /* Free a linked list of structures. */ ++ while ((p = head)) { ++ head = head->fts_link; ++ free(p); ++ } ++} ++ ++/* ++ * Allow essentially unlimited paths; find, rm, ls should all work on any tree. ++ * Most systems will allow creation of paths much longer than MAXPATHLEN, even ++ * though the kernel won't resolve them. Add the size (not just what's needed) ++ * plus 256 bytes so don't realloc the path 2 bytes at a time. ++ */ ++static int ++fts_palloc(FTS *sp, size_t more) ++{ ++ char *p; ++ ++ sp->fts_pathlen += more + 256; ++ /* ++ * Check for possible wraparound. In an FTS, fts_pathlen is ++ * a signed int but in an FTSENT it is an unsigned short. ++ * We limit fts_pathlen to USHRT_MAX to be safe in both cases. ++ */ ++ if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) { ++ free(sp->fts_path); ++ sp->fts_path = NULL; ++ errno = ENAMETOOLONG; ++ return (1); ++ } ++ p = realloc(sp->fts_path, sp->fts_pathlen); ++ if (p == NULL) { ++ free(sp->fts_path); ++ sp->fts_path = NULL; ++ return 1; ++ } ++ sp->fts_path = p; ++ return 0; ++} ++ ++/* ++ * When the path is realloc'd, have to fix all of the pointers in structures ++ * already returned. ++ */ ++static void ++fts_padjust(FTS *sp, FTSENT *head) ++{ ++ FTSENT *p; ++ char *addr = sp->fts_path; ++ ++#define ADJUST(p) do { \ ++ if ((p)->fts_accpath != (p)->fts_name) { \ ++ (p)->fts_accpath = \ ++ (char *)addr + ((p)->fts_accpath - (p)->fts_path); \ ++ } \ ++ (p)->fts_path = addr; \ ++} while (0) ++ /* Adjust the current set of children. */ ++ for (p = sp->fts_child; p; p = p->fts_link) ++ ADJUST(p); ++ ++ /* Adjust the rest of the tree, including the current level. */ ++ for (p = head; p->fts_level >= FTS_ROOTLEVEL;) { ++ ADJUST(p); ++ p = p->fts_link ? p->fts_link : p->fts_parent; ++ } ++} ++ ++static size_t ++fts_maxarglen(char * const *argv) ++{ ++ size_t len, max; ++ ++ for (max = 0; *argv; ++argv) ++ if ((len = strlen(*argv)) > max) ++ max = len; ++ return (max + 1); ++} ++ ++/* ++ * Change to dir specified by fd or p->fts_accpath without getting ++ * tricked by someone changing the world out from underneath us. ++ * Assumes p->fts_dev and p->fts_ino are filled in. ++ */ ++static int ++fts_safe_changedir(FTS *sp, FTSENT *p, int fd, const char *path) ++{ ++ int ret, oerrno, newfd; ++ struct stat64 sb; ++ ++ newfd = fd; ++ if (ISSET(FTS_NOCHDIR)) ++ return (0); ++ if (fd < 0 && (newfd = open(path, O_RDONLY, 0)) < 0) ++ return (-1); ++ if (fstat64(newfd, &sb)) { ++ ret = -1; ++ goto bail; ++ } ++ if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) { ++ errno = ENOENT; /* disinformation */ ++ ret = -1; ++ goto bail; ++ } ++ ret = fchdir(newfd); ++bail: ++ oerrno = errno; ++ if (fd < 0) ++ (void)close(newfd); ++ errno = oerrno; ++ return (ret); ++} +diff -Nrup a/libdwfl/fts_.h b/libdwfl/fts_.h +--- a/libdwfl/fts_.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/libdwfl/fts_.h 2015-01-06 11:42:13.481640322 +0000 +@@ -0,0 +1,131 @@ ++/* ++ * Copyright (c) 1989, 1993 ++ * The Regents of the University of California. All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. ++ * 4. Neither the name of the University nor the names of its contributors ++ * may be used to endorse or promote products derived from this software ++ * without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. ++ * ++ * @(#)fts.h 8.3 (Berkeley) 8/14/94 ++ */ ++ ++#ifndef _FTS_H ++#define _FTS_H 1 ++ ++#include ++#include ++ ++/* The fts interface is incompatible with the LFS interface which ++ transparently uses the 64-bit file access functions. */ ++#ifdef __USE_FILE_OFFSET64 ++# error " cannot be used with -D_FILE_OFFSET_BITS==64" ++#endif ++ ++ ++typedef struct { ++ struct _ftsent *fts_cur; /* current node */ ++ struct _ftsent *fts_child; /* linked list of children */ ++ struct _ftsent **fts_array; /* sort array */ ++ dev_t fts_dev; /* starting device # */ ++ char *fts_path; /* path for this descent */ ++ int fts_rfd; /* fd for root */ ++ int fts_pathlen; /* sizeof(path) */ ++ int fts_nitems; /* elements in the sort array */ ++ int (*fts_compar) (const void *, const void *); /* compare fn */ ++ ++#define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */ ++#define FTS_LOGICAL 0x0002 /* logical walk */ ++#define FTS_NOCHDIR 0x0004 /* don't change directories */ ++#define FTS_NOSTAT 0x0008 /* don't get stat info */ ++#define FTS_PHYSICAL 0x0010 /* physical walk */ ++#define FTS_SEEDOT 0x0020 /* return dot and dot-dot */ ++#define FTS_XDEV 0x0040 /* don't cross devices */ ++#define FTS_WHITEOUT 0x0080 /* return whiteout information */ ++#define FTS_OPTIONMASK 0x00ff /* valid user option mask */ ++ ++#define FTS_NAMEONLY 0x0100 /* (private) child names only */ ++#define FTS_STOP 0x0200 /* (private) unrecoverable error */ ++ int fts_options; /* fts_open options, global flags */ ++} FTS; ++ ++typedef struct _ftsent { ++ struct _ftsent *fts_cycle; /* cycle node */ ++ struct _ftsent *fts_parent; /* parent directory */ ++ struct _ftsent *fts_link; /* next file in directory */ ++ long fts_number; /* local numeric value */ ++ void *fts_pointer; /* local address value */ ++ char *fts_accpath; /* access path */ ++ char *fts_path; /* root path */ ++ int fts_errno; /* errno for this node */ ++ int fts_symfd; /* fd for symlink */ ++ u_short fts_pathlen; /* strlen(fts_path) */ ++ u_short fts_namelen; /* strlen(fts_name) */ ++ ++ ino_t fts_ino; /* inode */ ++ dev_t fts_dev; /* device */ ++ nlink_t fts_nlink; /* link count */ ++ ++#define FTS_ROOTPARENTLEVEL -1 ++#define FTS_ROOTLEVEL 0 ++ short fts_level; /* depth (-1 to N) */ ++ ++#define FTS_D 1 /* preorder directory */ ++#define FTS_DC 2 /* directory that causes cycles */ ++#define FTS_DEFAULT 3 /* none of the above */ ++#define FTS_DNR 4 /* unreadable directory */ ++#define FTS_DOT 5 /* dot or dot-dot */ ++#define FTS_DP 6 /* postorder directory */ ++#define FTS_ERR 7 /* error; errno is set */ ++#define FTS_F 8 /* regular file */ ++#define FTS_INIT 9 /* initialized only */ ++#define FTS_NS 10 /* stat(2) failed */ ++#define FTS_NSOK 11 /* no stat(2) requested */ ++#define FTS_SL 12 /* symbolic link */ ++#define FTS_SLNONE 13 /* symbolic link without target */ ++#define FTS_W 14 /* whiteout object */ ++ u_short fts_info; /* user flags for FTSENT structure */ ++ ++#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ ++#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ ++ u_short fts_flags; /* private flags for FTSENT structure */ ++ ++#define FTS_AGAIN 1 /* read node again */ ++#define FTS_FOLLOW 2 /* follow symbolic link */ ++#define FTS_NOINSTR 3 /* no instructions */ ++#define FTS_SKIP 4 /* discard node */ ++ u_short fts_instr; /* fts_set() instructions */ ++ ++ struct stat *fts_statp; /* stat(2) information */ ++ char fts_name[1]; /* file name */ ++} FTSENT; ++ ++__BEGIN_DECLS ++FTSENT *fts_children (FTS *, int); ++int fts_close (FTS *); ++FTS *fts_open (char * const *, int, ++ int (*)(const FTSENT **, const FTSENT **)); ++FTSENT *fts_read (FTS *); ++int fts_set (FTS *, FTSENT *, int) __THROW; ++__END_DECLS ++ ++#endif /* fts.h */ +diff -Nrup a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c +--- a/libdwfl/linux-kernel-modules.c 2014-11-22 22:43:52.000000000 +0000 ++++ b/libdwfl/linux-kernel-modules.c 2015-01-06 11:44:25.610924805 +0000 +@@ -29,7 +29,11 @@ + /* We include this before config.h because it can't handle _FILE_OFFSET_BITS. + Everything we need here is fine if its declarations just come first. */ + ++#ifdef HAVE_FTS_H + #include ++#else ++#include ++#endif + + #include + +diff -Nrup a/libdwfl/Makefile.am b/libdwfl/Makefile.am +--- a/libdwfl/Makefile.am 2014-06-17 19:51:09.000000000 +0100 ++++ b/libdwfl/Makefile.am 2015-01-06 11:45:25.442959369 +0000 +@@ -79,6 +79,9 @@ endif + if LZMA + libdwfl_a_SOURCES += lzma.c + endif ++if !HAVE_FTS ++libdwfl_a_SOURCES += fts.c ++endif + + libdwfl = $(libdw) + libdw = ../libdw/libdw.so diff --git a/package/elfutils/0004-disable-po.patch b/package/elfutils/0004-disable-po.patch new file mode 100644 index 0000000000..c45c580463 --- /dev/null +++ b/package/elfutils/0004-disable-po.patch @@ -0,0 +1,24 @@ +Disable the build of the po/ directory + +Building the po/ directory complains that the scripts in there have +been generated with gettext 0.17, while we use gettext 0.18 in +Buildroot. Since we don't care that much about po files anyway, just +disable the build of this directory. + +Based on the former patch by Thomas Petazzoni. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Vicente Olivert Riera + +diff -rup a/Makefile.am b/Makefile.am +--- a/Makefile.am 2014-11-07 15:14:39.018060884 +0000 ++++ b/Makefile.am 2014-11-07 15:30:02.864918229 +0000 +@@ -28,7 +28,7 @@ endif + + # Add doc back when we have some real content. + SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \ +- backends $(PROGS_SUBDIR) po tests ++ backends $(PROGS_SUBDIR) tests + + EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \ + COPYING COPYING-GPLV2 COPYING-LGPLV3 diff --git a/package/elfutils/0005-really-make-werror-conditional-to-build-werror.patch b/package/elfutils/0005-really-make-werror-conditional-to-build-werror.patch new file mode 100644 index 0000000000..59aae5e8b6 --- /dev/null +++ b/package/elfutils/0005-really-make-werror-conditional-to-build-werror.patch @@ -0,0 +1,24 @@ +Really make -Werror conditional to BUILD_WERROR + +Otherwise it will fail with an error message like this one: + +elf_getarsym.c:290:9: error: 'n' may be used uninitialized in this +function [-Werror=maybe-uninitialized] + arsym[n].as_name = NULL; + ^ +cc1: all warnings being treated as errors + +Signed-off-by: "Yann E. MORIN" +Signed-off-by: Vicente Olivert Riera + +diff -rup a/config/eu.am b/config/eu.am +--- a/config/eu.am 2014-11-10 16:19:14.356031479 +0000 ++++ b/config/eu.am 2014-11-10 16:21:11.702072011 +0000 +@@ -35,7 +35,6 @@ LD_AS_NEEDED = @LD_AS_NEEDED@ + DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"' + AM_CPPFLAGS = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. + AM_CFLAGS = -std=gnu99 -Wall -Wshadow \ +- $(if $($(*F)_no_Werror),,-Werror) \ + $(if $($(*F)_no_Wunused),,-Wunused $(WEXTRA)) \ + $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \ + $($(*F)_CFLAGS) diff --git a/package/elfutils/0006-memcpy-def.patch b/package/elfutils/0006-memcpy-def.patch new file mode 100644 index 0000000000..509482774c --- /dev/null +++ b/package/elfutils/0006-memcpy-def.patch @@ -0,0 +1,26 @@ +Provide a compatibility alias __memcpy + +For some reason, libelf uses the internal glibc alias __memcpy, which +doesn't exist in uClibc. Add a manual alias so that the build can +proceed with uClibc. + +Based on the former patch by Thomas Petazzoni. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Vicente Olivert Riera + +diff -rup a/libelf/libelf.h b/libelf/libelf.h +--- a/libelf/libelf.h 2014-08-27 10:25:17.000000000 +0100 ++++ b/libelf/libelf.h 2014-11-07 15:13:08.743508221 +0000 +@@ -34,6 +34,11 @@ + /* Get the ELF types. */ + #include + ++#ifndef _LIBC ++#ifndef __mempcpy ++#define __mempcpy mempcpy ++#endif ++#endif + + /* Known translation types. */ + typedef enum diff --git a/package/elfutils/0007-Allow-disabling-symbol-versioning-at-configure-time.patch b/package/elfutils/0007-Allow-disabling-symbol-versioning-at-configure-time.patch new file mode 100644 index 0000000000..7378f26a01 --- /dev/null +++ b/package/elfutils/0007-Allow-disabling-symbol-versioning-at-configure-time.patch @@ -0,0 +1,139 @@ +From bafacacaf7659a4933604662daba26a480b29a8d Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 23 Apr 2015 20:46:59 +0200 +Subject: [PATCH] Allow disabling symbol versioning at configure time + +Due to missing symbol versioning support in uClibc calls to versioned +functions that internally call different version of themselves results +in infinite recursion. + +Introduce macro SYMBOL_VERSIONING and use it instead of plain SHARED to +decide whether symbol versioning is needed. Control this macro +definition with new configure option --disable-symbol-versioning. + +Signed-off-by: Max Filippov +Signed-off-by: Mark Wielaard +--- +Backported from: bafacacaf7659a4933604662daba26a480b29a8d +Changes to ChangeLogs are dropped. + + config/eu.am | 10 ++++++++-- + configure.ac | 7 +++++++ + lib/eu-config.h | 6 +++--- + libdwfl/core-file.c | 2 +- + libdwfl/dwfl_module_build_id.c | 2 +- + libdwfl/dwfl_report_elf.c | 2 +- + +diff --git a/config/eu.am b/config/eu.am +index faf8add..6103a3e 100644 +--- a/config/eu.am ++++ b/config/eu.am +@@ -38,16 +38,22 @@ AM_CFLAGS = -std=gnu99 -Wall -Wshadow -Wformat=2 \ + + COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage, $(COMPILE)) + ++DEFS.os = -DPIC -DSHARED ++if SYMBOL_VERSIONING ++DEFS.os += -DSYMBOL_VERSIONING ++else ++endif ++ + %.os: %.c %.o + if AMDEP +- if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ ++ if $(COMPILE.os) -c -o $@ -fpic $(DEFS.os) -MT $@ -MD -MP \ + -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ + then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ + rm -f "$(DEPDIR)/$*.Tpo"; \ + else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + fi + else +- $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< ++ $(COMPILE.os) -c -o $@ -fpic $(DEFS.os) $< + endif + + CLEANFILES = *.gcno *.gcda +diff --git a/configure.ac b/configure.ac +index ed2c964..be01573 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -241,6 +241,13 @@ AS_HELP_STRING([--disable-textrelcheck], + [Disable textrelcheck being a fatal error])) + AM_CONDITIONAL(FATAL_TEXTREL, [test "x$enable_textrelcheck" != "xno"]) + ++AC_ARG_ENABLE([symbol-versioning], ++AS_HELP_STRING([--disable-symbol-versioning], ++ [Disable symbol versioning in shared objects])) ++AM_CONDITIONAL(SYMBOL_VERSIONING, [test "x$enable_symbol_versioning" != "xno"]) ++AS_IF([test "x$enable_symbol_versioning" = "xno"], ++ [AC_MSG_WARN([Disabling symbol versioning breaks ABI compatibility.])]) ++ + dnl The directories with content. + + dnl Documentation. +diff --git a/lib/eu-config.h b/lib/eu-config.h +index 3afff26..5bb21c1 100644 +--- a/lib/eu-config.h ++++ b/lib/eu-config.h +@@ -163,7 +163,7 @@ asm (".section predict_data, \"aw\"; .previous\n" + #define ELFUTILS_HEADER(name) + + +-#ifdef SHARED ++#ifdef SYMBOL_VERSIONING + # define OLD_VERSION(name, version) \ + asm (".globl _compat." #version "." #name "\n" \ + "_compat." #version "." #name " = " #name "\n" \ +@@ -181,8 +181,8 @@ asm (".section predict_data, \"aw\"; .previous\n" + # define OLD_VERSION(name, version) /* Nothing for static linking. */ + # define NEW_VERSION(name, version) /* Nothing for static linking. */ + # define COMPAT_VERSION_NEWPROTO(name, version, prefix) \ +- error "should use #ifdef SHARED" +-# define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SHARED" ++ error "should use #ifdef SYMBOL_VERSIONING" ++# define COMPAT_VERSION(name, version, prefix) error "should use #ifdef SYMBOL_VERSIONING" + #endif + + +diff --git a/libdwfl/core-file.c b/libdwfl/core-file.c +index 324e9d2..bbe0899 100644 +--- a/libdwfl/core-file.c ++++ b/libdwfl/core-file.c +@@ -588,7 +588,7 @@ dwfl_core_file_report (Dwfl *dwfl, Elf *elf, const char *executable) + INTDEF (dwfl_core_file_report) + NEW_VERSION (dwfl_core_file_report, ELFUTILS_0.158) + +-#ifdef SHARED ++#ifdef SYMBOL_VERSIONING + int _compat_without_executable_dwfl_core_file_report (Dwfl *dwfl, Elf *elf); + COMPAT_VERSION_NEWPROTO (dwfl_core_file_report, ELFUTILS_0.146, + without_executable) +diff --git a/libdwfl/dwfl_module_build_id.c b/libdwfl/dwfl_module_build_id.c +index 350bbf8..c9a42ca 100644 +--- a/libdwfl/dwfl_module_build_id.c ++++ b/libdwfl/dwfl_module_build_id.c +@@ -101,7 +101,7 @@ dwfl_module_build_id (Dwfl_Module *mod, + INTDEF (dwfl_module_build_id) + NEW_VERSION (dwfl_module_build_id, ELFUTILS_0.138) + +-#ifdef SHARED ++#ifdef SYMBOL_VERSIONING + COMPAT_VERSION (dwfl_module_build_id, ELFUTILS_0.130, vaddr_at_end) + + int +diff --git a/libdwfl/dwfl_report_elf.c b/libdwfl/dwfl_report_elf.c +index 3a4ae2e..624284c 100644 +--- a/libdwfl/dwfl_report_elf.c ++++ b/libdwfl/dwfl_report_elf.c +@@ -321,7 +321,7 @@ dwfl_report_elf (Dwfl *dwfl, const char *name, const char *file_name, int fd, + INTDEF (dwfl_report_elf) + NEW_VERSION (dwfl_report_elf, ELFUTILS_0.156) + +-#ifdef SHARED ++#ifdef SYMBOL_VERSIONING + Dwfl_Module * + _compat_without_add_p_vaddr_dwfl_report_elf (Dwfl *dwfl, const char *name, + const char *file_name, int fd, +-- +1.8.1.4 + diff --git a/package/elfutils/Config.in b/package/elfutils/Config.in new file mode 100644 index 0000000000..ca93770bfb --- /dev/null +++ b/package/elfutils/Config.in @@ -0,0 +1,35 @@ +comment "elfutils needs a uClibc or (e)glibc toolchain w/ wchar, dynamic library" + depends on !BR2_bfin + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \ + || !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) + +config BR2_PACKAGE_ELFUTILS + bool "elfutils" + select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + depends on BR2_USE_WCHAR + depends on !BR2_STATIC_LIBS + # Only glibc and uClibc implement the myriad of required GNUisms + depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC + # build issue caused by the _ prefix used on blackfin for + # assembly symbols + depends on !BR2_bfin + help + Libraries/utilities to handle ELF objects (drop in + replacement for libelf). + + Note that this option only installs the libraries, and not + the programs. + + https://fedorahosted.org/elfutils + +if BR2_PACKAGE_ELFUTILS + +config BR2_PACKAGE_ELFUTILS_PROGS + bool "Install programs" + depends on BR2_TOOLCHAIN_USES_GLIBC + help + This option tells elfutils to not only install the libelf + libraries, but also the elfutils programs. + +endif diff --git a/package/elfutils/elfutils.hash b/package/elfutils/elfutils.hash new file mode 100644 index 0000000000..123b7a2728 --- /dev/null +++ b/package/elfutils/elfutils.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 570c91a1783fa5386aaa2dfdd08dda1de777c2b63bf3b9c1437d635ffdd7a070 elfutils-0.161.tar.bz2 +sha256 bf0363d03e1e4668778eb4e7ddd10e405a22f753b3ad813a537fc01164d1e3fe elfutils-portability-0.161.patch diff --git a/package/elfutils/elfutils.mk b/package/elfutils/elfutils.mk new file mode 100644 index 0000000000..cc056182cb --- /dev/null +++ b/package/elfutils/elfutils.mk @@ -0,0 +1,74 @@ +################################################################################ +# +# elfutils +# +################################################################################ + +ELFUTILS_VERSION = 0.161 +ELFUTILS_SOURCE = elfutils-$(ELFUTILS_VERSION).tar.bz2 +ELFUTILS_SITE = https://fedorahosted.org/releases/e/l/elfutils/$(ELFUTILS_VERSION) +ELFUTILS_INSTALL_STAGING = YES +ELFUTILS_LICENSE = GPLv3, GPLv2, LGPLv3 +ELFUTILS_LICENSE_FILES = COPYING COPYING-GPLV2 COPYING-LGPLV3 +ELFUTILS_PATCH = elfutils-portability-0.161.patch + +# The tarball does not have a generated configure script +ELFUTILS_AUTORECONF = YES +ELFUTILS_CONF_OPTS += --disable-werror + +ELFUTILS_CFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) + +# sparc64 needs -fPIC instead of -fpic +ifeq ($(BR2_sparc64),y) +ELFUTILS_CFLAGS += -fPIC +endif + +# elfutils gets confused when lfs mode is forced, so don't +ELFUTILS_CONF_ENV += \ + CFLAGS="$(ELFUTILS_CFLAGS)" \ + CPPFLAGS="$(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" + +ELFUTILS_LDFLAGS = $(TARGET_LDFLAGS) + +# Unconditionnally requires gettext. +ifeq ($(BR2_NEEDS_GETTEXT),y) +ELFUTILS_DEPENDENCIES += gettext +ELFUTILS_LDFLAGS += -lintl +endif + +ELFUTILS_CONF_ENV += \ + LDFLAGS="$(ELFUTILS_LDFLAGS)" + +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +ELFUTILS_DEPENDENCIES += argp-standalone +ELFUTILS_CONF_OPTS += --disable-symbol-versioning +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +ELFUTILS_DEPENDENCIES += zlib +ELFUTILS_CONF_OPTS += --with-zlib +else +ELFUTILS_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +ELFUTILS_DEPENDENCIES += bzip2 +ELFUTILS_CONF_OPTS += --with-bzlib +else +ELFUTILS_CONF_OPTS += --without-bzlib +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +ELFUTILS_DEPENDENCIES += xz +ELFUTILS_CONF_OPTS += --with-lzma +else +ELFUTILS_CONF_OPTS += --without-lzma +endif + +ifeq ($(BR2_PACKAGE_ELFUTILS_PROGS),y) +ELFUTILS_CONF_OPTS += --enable-progs +else +ELFUTILS_CONF_OPTS += --disable-progs +endif + +$(eval $(autotools-package)) diff --git a/package/emlog/0001-Fix-access-to-the-dentry.patch b/package/emlog/0001-Fix-access-to-the-dentry.patch new file mode 100644 index 0000000000..07dd5ec92f --- /dev/null +++ b/package/emlog/0001-Fix-access-to-the-dentry.patch @@ -0,0 +1,57 @@ +From 33d34a10fdc01c5716aebdb93c34fdfd7557adc0 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 22 Dec 2015 17:39:35 +0100 +Subject: [PATCH] Fix access to the dentry + +Since Linux 2.6.20, the dentry pointer is no longer stored in +file->f_dentry, but in file->f_path.dentry. Until Linux 3.19, there +was a compatibility macro which made the change transparent, but this +macro has now been removed. + +Since we probably don't care about compatibility with kernels older +than 2.6.20, this commit takes the simple approach of using +file->f_path.dentry. This will work with any kernel >= 2.6.20. + +Submitted upstream at https://github.com/nicupavel/emlog/pull/3. + +Signed-off-by: Thomas Petazzoni +--- + emlog.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/emlog.c b/emlog.c +index 41a67e2..1ef3d80 100644 +--- a/emlog.c ++++ b/emlog.c +@@ -292,8 +292,8 @@ static ssize_t emlog_read(struct file *file, char __user *buffer, /* The bu + struct emlog_info *einfo; + + /* get the metadata about this emlog */ +- if ((einfo = get_einfo(file->f_dentry->d_inode)) == NULL) { +- pr_err("can not fetch einfo for inode %ld.\n", (long)(file->f_dentry->d_inode->i_ino)); ++ if ((einfo = get_einfo(file->f_path.dentry->d_inode)) == NULL) { ++ pr_err("can not fetch einfo for inode %ld.\n", (long)(file->f_path.dentry->d_inode->i_ino)); + return -EIO; + } + +@@ -368,7 +368,7 @@ static ssize_t emlog_write(struct file *file, + struct emlog_info *einfo; + + /* get the metadata about this emlog */ +- if ((einfo = get_einfo(file->f_dentry->d_inode)) == NULL) ++ if ((einfo = get_einfo(file->f_path.dentry->d_inode)) == NULL) + return -EIO; + + /* if the message is longer than the buffer, just take the beginning +@@ -403,7 +403,7 @@ static unsigned int emlog_poll(struct file *file, struct poll_table_struct * wai + struct emlog_info *einfo; + + /* get the metadata about this emlog */ +- if ((einfo = get_einfo(file->f_dentry->d_inode)) == NULL) ++ if ((einfo = get_einfo(file->f_path.dentry->d_inode)) == NULL) + return -EIO; + + poll_wait(file, EMLOG_READQ(einfo), wait); +-- +2.6.4 + diff --git a/package/emlog/Config.in b/package/emlog/Config.in new file mode 100644 index 0000000000..77d0ca35e5 --- /dev/null +++ b/package/emlog/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_EMLOG + bool "emlog" + depends on BR2_LINUX_KERNEL + help + emlog is a Linux kernel module that makes it easy to access + the most recent (and only the most recent) output from a + process. It works just like "tail -f" on a log file, except + that the storage required never grows. This can be useful in + embedded systems where there isn't enough memory or disk + space for keeping complete log files, but the most recent + debugging messages are sometimes needed (e.g., after an + error is observed). + + https://github.com/nicupavel/emlog + +comment "emlog needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL diff --git a/package/emlog/emlog.hash b/package/emlog/emlog.hash new file mode 100644 index 0000000000..625fb01b90 --- /dev/null +++ b/package/emlog/emlog.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9bab81e75ef2a1b1b7024a397308356a52463d8ac4b42682ed5a134d46387d1f emlog-bd32494ad757c3d37469877aaf99ced3ee6ca3f8.tar.gz diff --git a/package/emlog/emlog.mk b/package/emlog/emlog.mk new file mode 100644 index 0000000000..f79b1cf8f5 --- /dev/null +++ b/package/emlog/emlog.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# emlog +# +################################################################################ + +EMLOG_VERSION = bd32494ad757c3d37469877aaf99ced3ee6ca3f8 +EMLOG_SITE = $(call github,nicupavel,emlog,$(EMLOG_VERSION)) +EMLOG_LICENSE = GPLv2 +EMLOG_LICENSE_FILES = COPYING + +define EMLOG_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) nbcat +endef + +# make install tries to strip, so install manually. +define EMLOG_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/nbcat $(TARGET_DIR)/usr/bin/nbcat +endef + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/empty/0001-respect-LDFLAGS.patch b/package/empty/0001-respect-LDFLAGS.patch new file mode 100644 index 0000000000..b98af07eac --- /dev/null +++ b/package/empty/0001-respect-LDFLAGS.patch @@ -0,0 +1,22 @@ +downloaded from +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/app-misc/empty/files/empty-respect-LDFLAGS.patch?view=markup + +Reported on the Gentoo bug tracker +https://bugs.gentoo.org/show_bug.cgi?id=429664 + +and reported upstream +https://sourceforge.net/tracker/?func=detail&aid=3554236&group_id=136798&atid=736886 + +Signed-off-by: Bernd Kuhls + +--- empty-0.6.18b/Makefile ++++ empty-0.6.18b/Makefile +@@ -16,7 +16,7 @@ + PREFIX = /usr/local + + all: +- ${CC} ${CFLAGS} -Wall ${LIBS} -o empty empty.c ++ ${CC} ${CFLAGS} ${LDFLAGS} empty.c ${LIBS} -o empty + + FreeBSD: all + NetBSD: all diff --git a/package/empty/0002-fix-non-thread-build.patch b/package/empty/0002-fix-non-thread-build.patch new file mode 100644 index 0000000000..a7e8d90a21 --- /dev/null +++ b/package/empty/0002-fix-non-thread-build.patch @@ -0,0 +1,49 @@ +empty uses SysV semaphores, so the ifdef is wrong here. + +Signed-off-by: Waldemar Brodkorb + +--- empty-0.6.19b.orig/empty.c 2012-09-19 13:24:05.000000000 +0200 ++++ empty-0.6.19b/empty.c 2015-07-09 02:00:09.000000000 +0200 +@@ -179,25 +179,23 @@ int main (int argc, char *argv[]) { + 2 - unknown */ + + /* semaphores */ +-#ifdef _POSIX_SEMAPHORES +- #if defined(__linux__) && defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) +- /* union semun is defined by including */ +- #else +- union semun { +- int val; +- struct semid_ds *buf; +- #ifdef __SVR4 +- ushort_t *array; +- #endif +- #ifdef __hpux__ +- ushort *array; +- #endif +- #ifdef __linux__ +- unsigned short *array; +- struct seminfo *__buf; /* buffer for IPC_INFO */ +- #endif +- }; +- #endif ++#if defined(__linux__) && defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED) ++ /* union semun is defined by including */ ++#else ++ union semun { ++ int val; ++ struct semid_ds *buf; ++ #ifdef __SVR4 ++ ushort_t *array; ++ #endif ++ #ifdef __hpux__ ++ ushort *array; ++ #endif ++ #ifdef __linux__ ++ unsigned short *array; ++ struct seminfo *__buf; /* buffer for IPC_INFO */ ++ #endif ++ }; + #endif + union semun semu; + diff --git a/package/empty/Config.in b/package/empty/Config.in new file mode 100644 index 0000000000..7fd0877cbb --- /dev/null +++ b/package/empty/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_EMPTY + bool "empty" + depends on BR2_USE_MMU # uses fork() + help + Run processes and applications under pseudo-terminal (PTY) sessions. + + http://empty.sourceforge.net/ diff --git a/package/empty/empty.hash b/package/empty/empty.hash new file mode 100644 index 0000000000..91402889fa --- /dev/null +++ b/package/empty/empty.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 05b7cb361ef815774abda325c09c573f8c9039ccbb71eedc743439e4637c314a empty-0.6.19b.tgz diff --git a/package/empty/empty.mk b/package/empty/empty.mk new file mode 100644 index 0000000000..3339ff6b9a --- /dev/null +++ b/package/empty/empty.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# empty +# +################################################################################ + +EMPTY_VERSION = 0.6.19b +EMPTY_SOURCE = empty-$(EMPTY_VERSION).tgz +EMPTY_SITE = http://downloads.sourceforge.net/project/empty/empty/empty-$(EMPTY_VERSION) +EMPTY_LICENSE = BSD-3c +EMPTY_LICENSE_FILES = COPYRIGHT + +define EMPTY_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all +endef + +define EMPTY_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/empty $(TARGET_DIR)/usr/bin/empty +endef + +$(eval $(generic-package)) diff --git a/package/enchant/Config.in b/package/enchant/Config.in new file mode 100644 index 0000000000..86b2fade8f --- /dev/null +++ b/package/enchant/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_ENCHANT + bool "enchant" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + help + Enchant is a spell-checking library that provides a consistent + API across a number of spell-checking system backends. + + http://www.abisource.com/projects/enchant/ + +comment "enchant needs a toolchain w/ C++, threads, wchar" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/enchant/enchant.hash b/package/enchant/enchant.hash new file mode 100644 index 0000000000..884a8b59f2 --- /dev/null +++ b/package/enchant/enchant.hash @@ -0,0 +1,2 @@ +# From http://www.abisource.com/downloads/enchant/1.6.0/MD5SUM +md5 de11011aff801dc61042828041fb59c7 enchant-1.6.0.tar.gz diff --git a/package/enchant/enchant.mk b/package/enchant/enchant.mk new file mode 100644 index 0000000000..4a23293873 --- /dev/null +++ b/package/enchant/enchant.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# enchant +# +################################################################################ + +ENCHANT_VERSION = 1.6.0 +ENCHANT_SITE = http://www.abisource.com/downloads/enchant/$(ENCHANT_VERSION) +ENCHANT_INSTALL_STAGING = YES +ENCHANT_DEPENDENCIES = libglib2 host-pkgconf +ENCHANT_LICENSE = LGPLv2.1+ +ENCHANT_LICENSE_FILES = COPYING.LIB + +$(eval $(autotools-package)) diff --git a/package/enlightenment/Config.in b/package/enlightenment/Config.in new file mode 100644 index 0000000000..05ee6fc619 --- /dev/null +++ b/package/enlightenment/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_ENLIGHTENMENT + bool "enlightenment" + # libevas-generic-loaders-svg -> librsvg -> glib2 / pango + depends on BR2_USE_WCHAR + depends on BR2_INSTALL_LIBSTDCPP + # libedbus -> dbus + # libedbus -> glib2, libevas + depends on BR2_TOOLCHAIN_HAS_THREADS + # libedbus -> dbus, efl libraries + depends on BR2_USE_MMU + depends on BR2_PACKAGE_EFL + depends on BR2_PACKAGE_XORG7 + # libevas-generic-loaders-svg -> librsvg -> pango -> harfbuzz + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_EFL_X_XLIB + select BR2_PACKAGE_EFL_JPEG # needed at runtime by enlightenment_start + select BR2_PACKAGE_EFL_PNG # needed at runtime by enlightenment_start + select BR2_PACKAGE_ELEMENTARY + select BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS + select BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_SVG + select BR2_PACKAGE_XCB_UTIL_KEYSYMS + help + Enlightenment, also known simply as E, is a stacking window + manager for the X Window System which can be used alone or + in conjunction with a desktop environment such as GNOME or + KDE. Enlightenment can be used as a substitute for a full + desktop environment. + + http://www.enlightenment.org/ + +comment "enlightenment needs a toolchain w/ wchar, C++, threads" + depends on BR2_PACKAGE_EFL && BR2_PACKAGE_XORG7 && BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_SYNC_4 diff --git a/package/enlightenment/enlightenment.hash b/package/enlightenment/enlightenment.hash new file mode 100644 index 0000000000..66bdb492a4 --- /dev/null +++ b/package/enlightenment/enlightenment.hash @@ -0,0 +1,2 @@ +# From https://phab.enlightenment.org/phame/live/3/post/e19_14_release/ +sha256 8906e762f0d953752bfe002663280a855da9bb74acf613424c517b78a8dde407 enlightenment-0.19.14.tar.xz diff --git a/package/enlightenment/enlightenment.mk b/package/enlightenment/enlightenment.mk new file mode 100644 index 0000000000..a756361342 --- /dev/null +++ b/package/enlightenment/enlightenment.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# enlightenment +# +################################################################################ + +ENLIGHTENMENT_VERSION = 0.19.14 +ENLIGHTENMENT_SOURCE = enlightenment-$(ENLIGHTENMENT_VERSION).tar.xz +ENLIGHTENMENT_SITE = http://download.enlightenment.org/rel/apps/enlightenment +ENLIGHTENMENT_LICENSE = BSD-2c +ENLIGHTENMENT_LICENSE_FILES = COPYING + +ENLIGHTENMENT_DEPENDENCIES = \ + host-pkgconf \ + host-efl \ + efl \ + elementary \ + libevas-generic-loaders \ + xcb-util-keysyms + +ENLIGHTENMENT_CONF_OPTS = \ + --with-edje-cc=$(HOST_DIR)/usr/bin/edje_cc \ + --with-eet-eet=$(HOST_DIR)/usr/bin/eet \ + --disable-pam \ + --disable-rpath \ + --disable-systemd + +# uClibc has an old incomplete sys/ptrace.h for powerpc & sparc +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC)$(BR2_powerpc)$(BR2_sparc),yy) +ENLIGHTENMENT_CONF_ENV += ac_cv_header_sys_ptrace_h=no +endif + +# alsa backend needs mixer support +ifeq ($(BR2_PACKAGE_ALSA_LIB)$(BR2_PACKAGE_ALSA_LIB_MIXER),yy) +ENLIGHTENMENT_DEPENDENCIES += alsa-lib +else +ENLIGHTENMENT_CONF_ENV += enable_alsa=no +endif + +define ENLIGHTENMENT_REMOVE_DOCUMENTATION + rm -rf $(TARGET_DIR)/usr/share/enlightenment/doc/ + rm -f $(TARGET_DIR)/usr/share/enlightenment/COPYING + rm -f $(TARGET_DIR)/usr/share/enlightenment/AUTHORS +endef +ENLIGHTENMENT_POST_INSTALL_TARGET_HOOKS += ENLIGHTENMENT_REMOVE_DOCUMENTATION + +$(eval $(autotools-package)) diff --git a/package/enscript/Config.in b/package/enscript/Config.in new file mode 100644 index 0000000000..26c45e1e2f --- /dev/null +++ b/package/enscript/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_ENSCRIPT + bool "enscript" + help + GNU Enscript is a free replacement for Adobe's enscript program. + + GNU Enscript converts ASCII files to PostScript, HTML, or RTF and + stores generated output to a file or sends it directly to the + printer. It includes features for `pretty-printing' (language- + sensitive code highlighting) in several programming languages. + + http://www.gnu.org/software/enscript diff --git a/package/enscript/enscript.hash b/package/enscript/enscript.hash new file mode 100644 index 0000000000..8b7694d408 --- /dev/null +++ b/package/enscript/enscript.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 6d56bada6934d055b34b6c90399aa85975e66457ac5bf513427ae7fc77f5c0bb enscript-1.6.6.tar.gz diff --git a/package/enscript/enscript.mk b/package/enscript/enscript.mk new file mode 100644 index 0000000000..fc2cd41534 --- /dev/null +++ b/package/enscript/enscript.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# enscript +# +################################################################################ + +ENSCRIPT_VERSION = 1.6.6 +ENSCRIPT_SITE = $(BR2_GNU_MIRROR)/enscript +ENSCRIPT_LICENSE = GPLv3+ +ENSCRIPT_LICENSE_FILES = COPYING + +# Enable pthread threads if toolchain supports threads +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +ENSCRIPT_CONF_OPTS += --enable-threads=pth +else +ENSCRIPT_CONF_OPTS += --disable-threads +endif + +$(eval $(autotools-package)) diff --git a/package/erlang-goldrush/Config.in b/package/erlang-goldrush/Config.in new file mode 100644 index 0000000000..2ee579a7a5 --- /dev/null +++ b/package/erlang-goldrush/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_ERLANG_GOLDRUSH + bool "erlang-goldrush" + help + Goldrush is a small Erlang app that provides fast event + stream processing. + + https://github.com/DeadZen/goldrush diff --git a/package/erlang-goldrush/erlang-goldrush.mk b/package/erlang-goldrush/erlang-goldrush.mk new file mode 100644 index 0000000000..2fa88107e1 --- /dev/null +++ b/package/erlang-goldrush/erlang-goldrush.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# erlang-goldrush +# +################################################################################ + +ERLANG_GOLDRUSH_VERSION = 0.1.8 +ERLANG_GOLDRUSH_SITE = $(call github,DeadZen,goldrush,$(ERLANG_GOLDRUSH_VERSION)) +ERLANG_GOLDRUSH_LICENSE = ISC +ERLANG_GOLDRUSH_LICENSE_FILES = LICENSE +ERLANG_GOLDRUSH_INSTALL_STAGING = YES + +$(eval $(rebar-package)) +$(eval $(host-rebar-package)) diff --git a/package/erlang-lager/Config.in b/package/erlang-lager/Config.in new file mode 100644 index 0000000000..d088821a55 --- /dev/null +++ b/package/erlang-lager/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_ERLANG_LAGER + bool "erlang-lager" + select BR2_PACKAGE_ERLANG_GOLDRUSH + help + Lager (as in the beer) is a logging framework for + Erlang. Its purpose is to provide a more traditional way to + perform logging in an erlang application that plays nicely + with traditional UNIX logging tools like logrotate and + syslog. + + https://github.com/basho/lager diff --git a/package/erlang-lager/erlang-lager.mk b/package/erlang-lager/erlang-lager.mk new file mode 100644 index 0000000000..19940a9751 --- /dev/null +++ b/package/erlang-lager/erlang-lager.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# erlang-lager +# +################################################################################ + +ERLANG_LAGER_VERSION = 2.2.0 +ERLANG_LAGER_SITE = $(call github,basho,lager,$(ERLANG_LAGER_VERSION)) +ERLANG_LAGER_LICENSE = Apache-2.0 +ERLANG_LAGER_LICENSE_FILES = LICENSE +ERLANG_LAGER_DEPENDENCIES = erlang-goldrush + +$(eval $(rebar-package)) +$(eval $(host-rebar-package)) diff --git a/package/erlang-p1-cache-tab/Config.in b/package/erlang-p1-cache-tab/Config.in new file mode 100644 index 0000000000..eed26766c8 --- /dev/null +++ b/package/erlang-p1-cache-tab/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_ERLANG_P1_CACHE_TAB + bool "erlang-p1-cache-tab" + select BR2_PACKAGE_ERLANG_P1_UTILS + help + Erlang library implementing cache tables + + https://github.com/processone/cache_tab diff --git a/package/erlang-p1-cache-tab/erlang-p1-cache-tab.mk b/package/erlang-p1-cache-tab/erlang-p1-cache-tab.mk new file mode 100644 index 0000000000..8f131237c6 --- /dev/null +++ b/package/erlang-p1-cache-tab/erlang-p1-cache-tab.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# erlang-p1-cache-tab +# +################################################################################ + +ERLANG_P1_CACHE_TAB_VERSION = 1.0.1 +ERLANG_P1_CACHE_TAB_SITE = $(call github,processone,cache_tab,$(ERLANG_P1_CACHE_TAB_VERSION)) +ERLANG_P1_CACHE_TAB_LICENSE = Apache-2.0 +ERLANG_P1_CACHE_TAB_LICENSE_FILES = LICENSE.txt +ERLANG_P1_CACHE_TAB_DEPENDENCIES = erlang-p1-utils + +$(eval $(rebar-package)) diff --git a/package/erlang-p1-iconv/Config.in b/package/erlang-p1-iconv/Config.in new file mode 100644 index 0000000000..98efb217d4 --- /dev/null +++ b/package/erlang-p1-iconv/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_ERLANG_P1_ICONV + bool "erlang-p1-iconv" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Erlang interface to libiconv + + https://github.com/processone/eiconv diff --git a/package/erlang-p1-iconv/erlang-p1-iconv.mk b/package/erlang-p1-iconv/erlang-p1-iconv.mk new file mode 100644 index 0000000000..d2d2626d20 --- /dev/null +++ b/package/erlang-p1-iconv/erlang-p1-iconv.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# erlang-p1-iconv +# +################################################################################ + +ERLANG_P1_ICONV_VERSION = 0.9.0 +ERLANG_P1_ICONV_SITE = $(call github,processone,eiconv,$(ERLANG_P1_ICONV_VERSION)) +ERLANG_P1_ICONV_LICENSE = GPLv2+ +ERLANG_P1_ICONV_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +ERLANG_P1_ICONV_DEPENDENCIES += libiconv +endif + +ERLANG_P1_ICONV_USE_AUTOCONF = YES + +$(eval $(rebar-package)) diff --git a/package/erlang-p1-sip/0001-fix-includes.patch b/package/erlang-p1-sip/0001-fix-includes.patch new file mode 100644 index 0000000000..80e2ab36c2 --- /dev/null +++ b/package/erlang-p1-sip/0001-fix-includes.patch @@ -0,0 +1,19 @@ +Description: correct include + This part of the code was moved into it's own project and was packaged + separately by me. To make the build process work, this small fix is + necessary. +Author: Philipp Huebner + +Index: erlang-p1-sip/src/esip_socket.erl +=================================================================== +--- erlang-p1-sip.orig/src/esip_socket.erl ++++ erlang-p1-sip/src/esip_socket.erl +@@ -22,7 +22,7 @@ + + -include("esip.hrl"). + -include("esip_lib.hrl"). +--include("stun.hrl"). ++-include_lib("p1_stun/include/stun.hrl"). + + -define(TCP_SEND_TIMEOUT, 15000). + -define(CONNECT_TIMEOUT, 20000). diff --git a/package/erlang-p1-sip/Config.in b/package/erlang-p1-sip/Config.in new file mode 100644 index 0000000000..70cf819a37 --- /dev/null +++ b/package/erlang-p1-sip/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_ERLANG_P1_SIP + bool "erlang-p1-sip" + select BR2_PACKAGE_ERLANG_P1_STUN + select BR2_PACKAGE_ERLANG_P1_TLS + select BR2_PACKAGE_ERLANG_P1_UTILS + help + SIP library for Erlang + + https://github.com/processone/p1_sip diff --git a/package/erlang-p1-sip/erlang-p1-sip.mk b/package/erlang-p1-sip/erlang-p1-sip.mk new file mode 100644 index 0000000000..24075a7ae1 --- /dev/null +++ b/package/erlang-p1-sip/erlang-p1-sip.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# erlang-p1-sip +# +################################################################################ + +ERLANG_P1_SIP_VERSION = 1.0.0 +ERLANG_P1_SIP_SITE = $(call github,processone,p1_sip,$(ERLANG_P1_SIP_VERSION)) +ERLANG_P1_SIP_LICENSE = GPLv2 with OpenSSL exception +ERLANG_P1_SIP_LICENSE_FILES = COPYING +ERLANG_P1_SIP_DEPENDENCIES = erlang-p1-stun erlang-p1-tls erlang-p1-utils +ERLANG_P1_SIP_INSTALL_STAGING = YES + +$(eval $(rebar-package)) diff --git a/package/erlang-p1-stringprep/0001-Stdint-is-required-on-windows.patch b/package/erlang-p1-stringprep/0001-Stdint-is-required-on-windows.patch new file mode 100644 index 0000000000..7385503b71 --- /dev/null +++ b/package/erlang-p1-stringprep/0001-Stdint-is-required-on-windows.patch @@ -0,0 +1,28 @@ +From f5a2b8b78afb253630ee8833f16f131b3b52701e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= +Date: Mon, 29 Feb 2016 10:56:32 +0100 +Subject: [PATCH] Stdint is required on windows + +[Backport from upstream commit +4fc5cae81122540fff983e40dda1fa905c329fd0, which happens to not only +fix the build on Windows, but also with the musl C library.] +Signed-off-by: Thomas Petazzoni +--- + c_src/stringprep.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/c_src/stringprep.cpp b/c_src/stringprep.cpp +index 461cf09..26215cf 100644 +--- a/c_src/stringprep.cpp ++++ b/c_src/stringprep.cpp +@@ -19,6 +19,7 @@ + */ + + #include ++#include + #include + + #include "uni_data.c" +-- +2.7.4 + diff --git a/package/erlang-p1-stringprep/Config.in b/package/erlang-p1-stringprep/Config.in new file mode 100644 index 0000000000..4beac048af --- /dev/null +++ b/package/erlang-p1-stringprep/Config.in @@ -0,0 +1,11 @@ +comment "erlang-p1-stringprep needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_ERLANG_P1_STRINGPREP + bool "erlang-p1-stringprep" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_ERLANG_P1_UTILS + help + Erlang interface to stringprep + + https://github.com/processone/stringprep diff --git a/package/erlang-p1-stringprep/erlang-p1-stringprep.mk b/package/erlang-p1-stringprep/erlang-p1-stringprep.mk new file mode 100644 index 0000000000..3bc8c7290b --- /dev/null +++ b/package/erlang-p1-stringprep/erlang-p1-stringprep.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# erlang-p1-stringprep +# +################################################################################ + +ERLANG_P1_STRINGPREP_VERSION = 1.0.0 +ERLANG_P1_STRINGPREP_SITE = $(call github,processone,stringprep,$(ERLANG_P1_STRINGPREP_VERSION)) +ERLANG_P1_STRINGPREP_LICENSE = TCL (tools/*.tcl), Apache-2.0 (rest) +ERLANG_P1_STRINGPREP_LICENSE_FILES = LICENSE.ALL LICENSE.TCL LICENSE.txt +ERLANG_P1_STRINGPREP_DEPENDENCIES = erlang-p1-utils + +$(eval $(rebar-package)) diff --git a/package/erlang-p1-stun/Config.in b/package/erlang-p1-stun/Config.in new file mode 100644 index 0000000000..70cdd91599 --- /dev/null +++ b/package/erlang-p1-stun/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_ERLANG_P1_STUN + bool "erlang-p1-stun" + select BR2_PACKAGE_ERLANG_P1_TLS + select BR2_PACKAGE_ERLANG_P1_UTILS + help + STUN library for Erlang + + https://github.com/processone/stun diff --git a/package/erlang-p1-stun/erlang-p1-stun.mk b/package/erlang-p1-stun/erlang-p1-stun.mk new file mode 100644 index 0000000000..4d26f917ee --- /dev/null +++ b/package/erlang-p1-stun/erlang-p1-stun.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# erlang-p1-stun +# +################################################################################ + +ERLANG_P1_STUN_VERSION = 0.9.0 +ERLANG_P1_STUN_SITE = $(call github,processone,stun,$(ERLANG_P1_STUN_VERSION)) +ERLANG_P1_STUN_LICENSE = GPLv2+ +ERLANG_P1_STUN_LICENSE_FILES = COPYING +ERLANG_P1_STUN_DEPENDENCIES = erlang-p1-tls erlang-p1-utils +ERLANG_P1_STUN_INSTALL_STAGING = YES + +$(eval $(rebar-package)) diff --git a/package/erlang-p1-tls/Config.in b/package/erlang-p1-tls/Config.in new file mode 100644 index 0000000000..0df334820d --- /dev/null +++ b/package/erlang-p1-tls/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_ERLANG_P1_TLS + bool "erlang-p1-tls" + select BR2_PACKAGE_OPENSSL + help + Erlang interface to OpenSSL + + https://github.com/processone/tls diff --git a/package/erlang-p1-tls/erlang-p1-tls.mk b/package/erlang-p1-tls/erlang-p1-tls.mk new file mode 100644 index 0000000000..77f06e6b4d --- /dev/null +++ b/package/erlang-p1-tls/erlang-p1-tls.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# erlang-p1-tls +# +################################################################################ + +ERLANG_P1_TLS_VERSION = 1.0.0 +ERLANG_P1_TLS_SITE = $(call github,processone,tls,$(ERLANG_P1_TLS_VERSION)) +ERLANG_P1_TLS_LICENSE = GPLv2+ with OpenSSL exception +ERLANG_P1_TLS_LICENSE_FILES = COPYING +ERLANG_P1_TLS_INSTALL_STAGING = YES +ERLANG_P1_TLS_DEPENDENCIES = openssl + +$(eval $(rebar-package)) diff --git a/package/erlang-p1-utils/Config.in b/package/erlang-p1-utils/Config.in new file mode 100644 index 0000000000..a82e5f71b9 --- /dev/null +++ b/package/erlang-p1-utils/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_ERLANG_P1_UTILS + bool "erlang-p1-utils" + help + Set of small Erlang libraries + + https://github.com/processone/p1_utils diff --git a/package/erlang-p1-utils/erlang-p1-utils.mk b/package/erlang-p1-utils/erlang-p1-utils.mk new file mode 100644 index 0000000000..733cf87f36 --- /dev/null +++ b/package/erlang-p1-utils/erlang-p1-utils.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# erlang-p1-utils +# +################################################################################ + +ERLANG_P1_UTILS_VERSION = 1.0.3 +ERLANG_P1_UTILS_SITE = $(call github,processone,p1_utils,$(ERLANG_P1_UTILS_VERSION)) +ERLANG_P1_UTILS_LICENSE = GPLv2+ +ERLANG_P1_UTILS_LICENSE_FILES = LICENSE.txt +ERLANG_P1_UTILS_INSTALL_STAGING = YES + +$(eval $(rebar-package)) diff --git a/package/erlang-p1-xml/Config.in b/package/erlang-p1-xml/Config.in new file mode 100644 index 0000000000..504501d912 --- /dev/null +++ b/package/erlang-p1-xml/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_ERLANG_P1_XML + bool "erlang-p1-xml" + select BR2_PACKAGE_ERLANG_P1_UTILS + select BR2_PACKAGE_EXPAT + help + XML utilities for Erlang + + https://github.com/processone/xml diff --git a/package/erlang-p1-xml/erlang-p1-xml.mk b/package/erlang-p1-xml/erlang-p1-xml.mk new file mode 100644 index 0000000000..31bab2311d --- /dev/null +++ b/package/erlang-p1-xml/erlang-p1-xml.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# erlang-p1-xml +# +################################################################################ + +ERLANG_P1_XML_VERSION = 1.1.1 +ERLANG_P1_XML_SITE = $(call github,processone,xml,$(ERLANG_P1_XML_VERSION)) +ERLANG_P1_XML_LICENSE = Apache-2.0 +ERLANG_P1_XML_LICENSE_FILES = LICENSE.txt +ERLANG_P1_XML_DEPENDENCIES = expat erlang-p1-utils +ERLANG_P1_XML_INSTALL_STAGING = YES + +ERLANG_P1_XML_USE_AUTOCONF = YES + +$(eval $(rebar-package)) diff --git a/package/erlang-p1-yaml/Config.in b/package/erlang-p1-yaml/Config.in new file mode 100644 index 0000000000..2ab78d1296 --- /dev/null +++ b/package/erlang-p1-yaml/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_ERLANG_P1_YAML + bool "erlang-p1-yaml" + select BR2_PACKAGE_ERLANG_P1_UTILS + select BR2_PACKAGE_LIBYAML + help + Erlang wrapper for libyaml C library + + https://github.com/processone/p1_yaml diff --git a/package/erlang-p1-yaml/erlang-p1-yaml.mk b/package/erlang-p1-yaml/erlang-p1-yaml.mk new file mode 100644 index 0000000000..22fcda43f8 --- /dev/null +++ b/package/erlang-p1-yaml/erlang-p1-yaml.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# erlang-p1-yaml +# +################################################################################ + +ERLANG_P1_YAML_VERSION = 1.0.0 +ERLANG_P1_YAML_SITE = $(call github,processone,p1_yaml,$(ERLANG_P1_YAML_VERSION)) +ERLANG_P1_YAML_LICENSE = Apache-2.0 +ERLANG_P1_YAML_LICENSE_FILES = COPYING +ERLANG_P1_YAML_DEPENDENCIES = libyaml erlang-p1-utils + +$(eval $(rebar-package)) diff --git a/package/erlang-p1-zlib/Config.in b/package/erlang-p1-zlib/Config.in new file mode 100644 index 0000000000..b7e48a1496 --- /dev/null +++ b/package/erlang-p1-zlib/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_ERLANG_P1_ZLIB + bool "erlang-p1-zlib" + select BR2_PACKAGE_ZLIB + help + Erlang interface to zlib + + https://github.com/processone/zlib diff --git a/package/erlang-p1-zlib/erlang-p1-zlib.mk b/package/erlang-p1-zlib/erlang-p1-zlib.mk new file mode 100644 index 0000000000..1f8ae0063d --- /dev/null +++ b/package/erlang-p1-zlib/erlang-p1-zlib.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# erlang-p1-zlib +# +################################################################################ + +ERLANG_P1_ZLIB_VERSION = 1.0.0 +ERLANG_P1_ZLIB_SITE = $(call github,processone,zlib,$(ERLANG_P1_ZLIB_VERSION)) +ERLANG_P1_ZLIB_LICENSE = GPLv2+ +ERLANG_P1_ZLIB_LICENSE_FILES = COPYING +ERLANG_P1_ZLIB_DEPENDENCIES = zlib + +$(eval $(rebar-package)) diff --git a/package/erlang-rebar/erlang-rebar.mk b/package/erlang-rebar/erlang-rebar.mk new file mode 100644 index 0000000000..61904cc9e1 --- /dev/null +++ b/package/erlang-rebar/erlang-rebar.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# erlang-rebar +# +################################################################################ + +ERLANG_REBAR_VERSION = 2.6.1 + +# Upstream publishes a release, but we can not use it as it is a release of +# a generated rebar script, when we want the sources. So we have to use the +# gihub helper in this case. +ERLANG_REBAR_SITE = $(call github,rebar,rebar,$(ERLANG_REBAR_VERSION)) + +# Although the file LICENSE state Apache-2.0, a lot (if not all) the files +# in src/ bear the MIT licence. +ERLANG_REBAR_LICENSE = Apache-2.0, MIT +ERLANG_REBAR_LICENSE_FILES = LICENSE + +# We do not have a target variant, so just define the dependencies, +# configure and build commands for the host variant. +HOST_ERLANG_REBAR_DEPENDENCIES = host-erlang + +define HOST_ERLANG_REBAR_BUILD_CMDS + cd $(@D) && $(HOST_MAKE_ENV) $(MAKE) +endef + +define HOST_ERLANG_REBAR_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/rebar $(HOST_DIR)/usr/bin/rebar +endef + +$(eval $(host-generic-package)) diff --git a/package/erlang/0001-build-fix.patch b/package/erlang/0001-build-fix.patch new file mode 100644 index 0000000000..ff821c9fc0 --- /dev/null +++ b/package/erlang/0001-build-fix.patch @@ -0,0 +1,13 @@ +apply-patches.sh deletes this file from the source directory. + +--- erlang-R15B01.old/lib/tools/emacs/Makefile 2012-04-04 ++++ erlang-R15B01/lib/tools/emacs/Makefile 2012-04-04 15:55:16.978957307 +0100 +@@ -51,7 +51,7 @@ + + ELC_FILES = $(EMACS_FILES:%=%.elc) + +-TEST_FILES = test.erl.indented test.erl.orig ++TEST_FILES = test.erl.indented + + # ---------------------------------------------------- + # Targets diff --git a/package/erlang/0002-erts-ethread-instruct-libatomic_ops-we-do-require-CA.patch b/package/erlang/0002-erts-ethread-instruct-libatomic_ops-we-do-require-CA.patch new file mode 100644 index 0000000000..8e401430fe --- /dev/null +++ b/package/erlang/0002-erts-ethread-instruct-libatomic_ops-we-do-require-CA.patch @@ -0,0 +1,70 @@ +From 439fa2eae78a8900bda120072335be19d626498c Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sun, 28 Dec 2014 23:39:40 +0100 +Subject: [PATCH] erts/ethread: instruct libatomic_ops we do require CAS + +We do require compare-and-swap (CAS), so we must instruct libatomic_ops +to provide it, even if the architecture does not have instructions for +it. + +For example, on ARM, LDREX is required for fast CAS. But LDREX is only +available on ARMv6, so by default libatomic_ops will not have CAS for +anything below, like ARMv5. But ARMv5 is always UP, so using an +emulated CAS (that is signal-asyn-safe) is still possible (albeit much +slower). + +Tell libatomic_ops to provide CAS, even if the hardware is not capable +of it, by using emulated CAS, as per libatomic_ops dosc: + https://github.com/ivmai/libatomic_ops/blob/master/doc/README.txt#L28 + + If this is included after defining AO_REQUIRE_CAS, then the package + will make an attempt to emulate compare-and-swap in a way that (at + least on Linux) should still be async-signal-safe. + +Thanks go to Thomas for all this insight! :-) +Thanks go to Frank for reporting the issue! :-) + +Signed-off-by: "Yann E. MORIN" +Cc: Thomas Petazzoni +Cc: Frank Hunleth +--- + erts/include/internal/libatomic_ops/ethread.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/erts/include/internal/libatomic_ops/ethread.h b/erts/include/internal/libatomic_ops/ethread.h +index d65ee19..71d3598 100644 +--- a/erts/include/internal/libatomic_ops/ethread.h ++++ b/erts/include/internal/libatomic_ops/ethread.h +@@ -35,6 +35,7 @@ + + #define ETHR_NATIVE_IMPL__ "libatomic_ops" + ++#define AO_REQUIRE_CAS + #include "atomic_ops.h" + #include "ethr_membar.h" + #include "ethr_atomic.h" +diff --git a/erts/aclocal.m4 b/erts/aclocal.m4 +index d65ee19..71d3598 100644 +--- a/erts/aclocal.m4 ++++ b/erts/aclocal.m4 +@@ -1414,7 +1414,8 @@ + fi;; + esac + ethr_have_libatomic_ops=no +- AC_TRY_LINK([#include "atomic_ops.h"], ++ AC_TRY_LINK([#define AO_REQUIRE_CAS ++ #include "atomic_ops.h"], + [ + volatile AO_t x; + AO_t y; +@@ -1455,6 +1455,7 @@ + AC_CHECK_SIZEOF(AO_t, , + [ + #include ++ #define AO_REQUIRE_CAS + #include "atomic_ops.h" + ]) + AC_DEFINE_UNQUOTED(ETHR_SIZEOF_AO_T, $ac_cv_sizeof_AO_t, [Define to the size of AO_t if libatomic_ops is used]) +-- +1.9.1 + diff --git a/package/erlang/0003-erts-emulator-reorder-inclued-headers-paths.patch b/package/erlang/0003-erts-emulator-reorder-inclued-headers-paths.patch new file mode 100644 index 0000000000..c17eefc2a1 --- /dev/null +++ b/package/erlang/0003-erts-emulator-reorder-inclued-headers-paths.patch @@ -0,0 +1,43 @@ +From 85a3e5b4f65e5284e59dcdd90e92ea7d50ef6907 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 8 Feb 2015 17:23:13 +0100 +Subject: [PATCH] erts/emulator: reorder inclued headers paths + +If the Perl Compatible Regular Expressions is installed on the +host and the path to the headers is added to the CFLAGS, the +pcre.h from the host is used instead of the one provided by +erlang. + +Erlang use an old version of this file which is incompatible +with the upstream one. + +Move INCLUDES before CFLAGS to use pcre.h from erlang. + +http://autobuild.buildroot.net/results/cbd/cbd8b54eef535f19d7d400fd269af1b3571d6143/build-end.log + +Signed-off-by: Romain Naour +--- + erts/emulator/Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in +index 7145824..d079487 100644 +--- a/erts/emulator/Makefile.in ++++ b/erts/emulator/Makefile.in +@@ -678,11 +678,11 @@ else + # Usually the same as the default rule, but certain platforms (e.g. win32) mix + # different compilers + $(OBJDIR)/beam_emu.o: beam/beam_emu.c +- $(V_EMU_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ ++ $(V_EMU_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@ + endif + + $(OBJDIR)/%.o: beam/%.c +- $(V_CC) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) $(INCLUDES) -c $< -o $@ ++ $(V_CC) $(INCLUDES) $(subst -O2, $(GEN_OPT_FLGS), $(CFLAGS)) -c $< -o $@ + + $(OBJDIR)/%.o: $(TARGET)/%.c + $(V_CC) $(CFLAGS) $(INCLUDES) -Idrivers/common -c $< -o $@ +-- +1.9.3 + diff --git a/package/erlang/Config.in b/package/erlang/Config.in new file mode 100644 index 0000000000..5fa20288c2 --- /dev/null +++ b/package/erlang/Config.in @@ -0,0 +1,40 @@ +comment "erlang needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU # fork() + depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_ERLANG + bool "erlang" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS + select BR2_PACKAGE_LIBATOMIC_OPS + help + Erlang is a programming language used to build massively scalable + soft real-time systems with requirements on high availability. + Some of its uses are in telecoms, banking, e-commerce, computer + telephony and instant messaging. Erlang's runtime system has + built-in support for concurrency, distribution and fault tolerance. + + http://www.erlang.org + +if BR2_PACKAGE_ERLANG + +config BR2_PACKAGE_ERLANG_SMP + bool "enable SMP support" + help + Erlang provides both a UP and an SMP emulator. The UP emulator + is always built, and this option enables compilation of the SMP + emulator. The choice of which emulator to use is made at runtime. + If you do not need SMP support, turning this option off reduces + compile time and the size of the Erlang installation. + +config BR2_PACKAGE_ERLANG_MEGACO + bool "install megaco application" + help + The Megaco application is a framework for building applications + on top of the Megaco/H.248 protocol. It is approximately 14MB in + size so if you do not need it then it is recommended not to + enable it. + +endif # BR2_PACKAGE_ERLANG diff --git a/package/erlang/erlang.hash b/package/erlang/erlang.hash new file mode 100644 index 0000000000..c39c26e30a --- /dev/null +++ b/package/erlang/erlang.hash @@ -0,0 +1,3 @@ +# md5 from http://www.erlang.org/download/MD5, sha256 locally computed +md5 7e4ff32f97c36fb3dab736f8d481830b otp_src_18.3.tar.gz +sha256 fdab8129a1cb935db09f1832e3a7d511a4aeb2b9bb3602ca6a7ccb9730d5c9c3 otp_src_18.3.tar.gz diff --git a/package/erlang/erlang.mk b/package/erlang/erlang.mk new file mode 100644 index 0000000000..ff4452f68d --- /dev/null +++ b/package/erlang/erlang.mk @@ -0,0 +1,95 @@ +################################################################################ +# +# erlang +# +################################################################################ + +# See note below when updating Erlang +ERLANG_VERSION = 18.3 +ERLANG_SITE = http://www.erlang.org/download +ERLANG_SOURCE = otp_src_$(ERLANG_VERSION).tar.gz +ERLANG_DEPENDENCIES = host-erlang + +ERLANG_LICENSE = Apache-2.0 +ERLANG_LICENSE_FILES = LICENSE.txt +ERLANG_INSTALL_STAGING = YES + +# Patched erts/aclocal.m4 +ERLANG_AUTORECONF = YES + +# Whenever updating Erlang, this value should be updated as well, to the +# value of EI_VSN in the file lib/erl_interface/vsn.mk +ERLANG_EI_VSN = 3.8.2 + +# The configure checks for these functions fail incorrectly +ERLANG_CONF_ENV = ac_cv_func_isnan=yes ac_cv_func_isinf=yes + +# Set erl_xcomp variables. See xcomp/erl-xcomp.conf.template +# for documentation. +ERLANG_CONF_ENV += erl_xcomp_sysroot=$(STAGING_DIR) + +ERLANG_CONF_OPTS = --without-javac + +ERLANG_DEPENDENCIES += libatomic_ops +ERLANG_CONF_OPTS += --with-libatomic_ops=$(STAGING_DIR)/usr LIBS=-latomic_ops + +# erlang uses openssl for all things crypto. Since the host tools (such as +# rebar) uses crypto, we need to build host-erlang with support for openssl. +HOST_ERLANG_DEPENDENCIES = host-openssl +HOST_ERLANG_CONF_OPTS = --without-javac --with-ssl=$(HOST_DIR)/usr + +HOST_ERLANG_CONF_OPTS += --without-termcap + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +ERLANG_CONF_OPTS += --disable-threads +endif + +ifeq ($(BR2_PACKAGE_NCURSES),y) +ERLANG_CONF_OPTS += --with-termcap +ERLANG_DEPENDENCIES += ncurses +else +ERLANG_CONF_OPTS += --without-termcap +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +ERLANG_CONF_OPTS += --with-ssl +ERLANG_DEPENDENCIES += openssl +else +ERLANG_CONF_OPTS += --without-ssl +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +ERLANG_CONF_OPTS += --enable-shared-zlib +ERLANG_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_ERLANG_SMP),) +ERLANG_CONF_OPTS += --disable-smp-support +endif + +# Remove source, example, gs and wx files from staging and target. +ERLANG_REMOVE_PACKAGES = gs wx + +ifneq ($(BR2_PACKAGE_ERLANG_MEGACO),y) +ERLANG_REMOVE_PACKAGES += megaco +endif + +define ERLANG_REMOVE_STAGING_UNUSED + for package in $(ERLANG_REMOVE_PACKAGES); do \ + rm -rf $(STAGING_DIR)/usr/lib/erlang/lib/$${package}-*; \ + done +endef + +define ERLANG_REMOVE_TARGET_UNUSED + find $(TARGET_DIR)/usr/lib/erlang -type d -name src -prune -exec rm -rf {} \; + find $(TARGET_DIR)/usr/lib/erlang -type d -name examples -prune -exec rm -rf {} \; + for package in $(ERLANG_REMOVE_PACKAGES); do \ + rm -rf $(TARGET_DIR)/usr/lib/erlang/lib/$${package}-*; \ + done +endef + +ERLANG_POST_INSTALL_STAGING_HOOKS += ERLANG_REMOVE_STAGING_UNUSED +ERLANG_POST_INSTALL_TARGET_HOOKS += ERLANG_REMOVE_TARGET_UNUSED + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/espeak/0001-Fix-build-of-shared-library-on-architectures-needing.patch b/package/espeak/0001-Fix-build-of-shared-library-on-architectures-needing.patch new file mode 100644 index 0000000000..2590e15841 --- /dev/null +++ b/package/espeak/0001-Fix-build-of-shared-library-on-architectures-needing.patch @@ -0,0 +1,31 @@ +From 08a464e2b6bd31bb2bf4e258ebfa9b9d65805abf Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Fri, 27 Nov 2015 15:17:02 +0100 +Subject: [PATCH] Fix build of shared library on architectures needing -fPIC + +Certain architectures, like Sparc and Sparc64 require objects to be +built with -fPIC (and not just -fpic) to be usable in shared +libraries. On other architectures, -fPIC is the same as -fpic so this +patch doesn't affect such architectures. + +Signed-off-by: Thomas Petazzoni +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index 95fe549..c293611 100755 +--- a/src/Makefile ++++ b/src/Makefile +@@ -110,7 +110,7 @@ $(BIN2_NAME): $(OBJS3) $(LIB_NAME) + + + x_%.o: %.cpp +- $(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -fpic -fvisibility=hidden -pedantic \ ++ $(CXX) $(CXXFLAGS) $(USE_AUDIO) -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -Wall -fPIC -fvisibility=hidden -pedantic \ + -I. -D LIBRARY -c -fno-exceptions $< -o x_$*.o + + $(LIB_NAME): $(OBJS2) +-- +2.6.3 + diff --git a/package/espeak/Config.in b/package/espeak/Config.in new file mode 100644 index 0000000000..aed627af92 --- /dev/null +++ b/package/espeak/Config.in @@ -0,0 +1,40 @@ +comment "espeak needs a toolchain w/ C++, wchar, threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || BR2_STATIC_LIBS + depends on BR2_USE_MMU + +config BR2_PACKAGE_ESPEAK + bool "espeak" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + # does not properly support building only a static version + depends on !BR2_STATIC_LIBS + help + espeak is a speech synthesizer software for English and + other languages. + + http://espeak.sourceforge.net/ + +if BR2_PACKAGE_ESPEAK + +choice + prompt "choose audio backend" + default BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_NONE + +config BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_NONE + bool "No sound backend, only produce wav files" + +config BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_ALSA + bool "alsa via portaudio" + select BR2_PACKAGE_PORTAUDIO + select BR2_PACKAGE_PORTAUDIO_CXX + +config BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_PULSEAUDIO + bool "pulseaudio" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pulseaudio -> json-c + select BR2_PACKAGE_PULSEAUDIO + +endchoice + +endif # BR2_PACKAGE_ESPEAK diff --git a/package/espeak/espeak.hash b/package/espeak/espeak.hash new file mode 100644 index 0000000000..8f4a1ab95b --- /dev/null +++ b/package/espeak/espeak.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 bf9a17673adffcc28ff7ea18764f06136547e97bbd9edf2ec612f09b207f0659 espeak-1.48.04-source.zip diff --git a/package/espeak/espeak.mk b/package/espeak/espeak.mk new file mode 100644 index 0000000000..0aa049ef07 --- /dev/null +++ b/package/espeak/espeak.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# espeak +# +################################################################################ + +ESPEAK_VERSION_MAJOR = 1.48 +ESPEAK_VERSION = $(ESPEAK_VERSION_MAJOR).04 +ESPEAK_SOURCE = espeak-$(ESPEAK_VERSION)-source.zip +ESPEAK_SITE = http://downloads.sourceforge.net/project/espeak/espeak/espeak-$(ESPEAK_VERSION_MAJOR) +ESPEAK_LICENSE = GPLv3+ +ESPEAK_LICENSE_FILES = License.txt + +ifeq ($(BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_ALSA),y) +ESPEAK_AUDIO_BACKEND = portaudio +ESPEAK_DEPENDENCIES = portaudio +endif +ifeq ($(BR2_PACKAGE_ESPEAK_AUDIO_BACKEND_PULSEAUDIO),y) +ESPEAK_AUDIO_BACKEND = pulseaudio +ESPEAK_DEPENDENCIES = pulseaudio +endif + +define ESPEAK_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(DL_DIR)/$(ESPEAK_SOURCE) + mv $(@D)/espeak-$(ESPEAK_VERSION)-source/* $(@D) + $(RM) -r $(@D)/espeak-$(ESPEAK_VERSION)-source +endef + +define ESPEAK_CONFIGURE_CMDS + # Buildroot provides portaudio V19, see ReadMe file for more details. + cp $(@D)/src/portaudio19.h $(@D)/src/portaudio.h +endef + +define ESPEAK_BUILD_CMDS + $(MAKE) -C $(@D)/src $(TARGET_CONFIGURE_OPTS) \ + AUDIO="$(ESPEAK_AUDIO_BACKEND)" all +endef + +define ESPEAK_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D)/src DESTDIR="$(TARGET_DIR)" install +endef + +$(eval $(generic-package)) diff --git a/package/ethtool/Config.in b/package/ethtool/Config.in new file mode 100644 index 0000000000..48c6062a61 --- /dev/null +++ b/package/ethtool/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_ETHTOOL + bool "ethtool" + help + ethtool is a small utility for examining and tuning your + ethernet-based network interface. + + http://sourceforge.net/projects/gkernel/ diff --git a/package/ethtool/ethtool.hash b/package/ethtool/ethtool.hash new file mode 100644 index 0000000000..04022a5823 --- /dev/null +++ b/package/ethtool/ethtool.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/software/network/ethtool/sha256sums.asc +sha256 bb2834332c5ac7f5bbe1c9f78f4fa851e4a3fe6397b124d58467c9ccee9fca3b ethtool-4.5.tar.xz diff --git a/package/ethtool/ethtool.mk b/package/ethtool/ethtool.mk new file mode 100644 index 0000000000..f6f4263d9b --- /dev/null +++ b/package/ethtool/ethtool.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# ethtool +# +################################################################################ + +ETHTOOL_VERSION = 4.5 +ETHTOOL_SOURCE = ethtool-$(ETHTOOL_VERSION).tar.xz +ETHTOOL_SITE = $(BR2_KERNEL_MIRROR)/software/network/ethtool +ETHTOOL_LICENSE = GPLv2 +ETHTOOL_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/eudev/0001-Only-use-pragma-for-ignoring-diagnostics-if-.patch b/package/eudev/0001-Only-use-pragma-for-ignoring-diagnostics-if-.patch new file mode 100644 index 0000000000..3046ba528b --- /dev/null +++ b/package/eudev/0001-Only-use-pragma-for-ignoring-diagnostics-if-.patch @@ -0,0 +1,39 @@ +From dc8aa43b7b6d0cead7d8a0c1a151d289a5233a10 Mon Sep 17 00:00:00 2001 +From: Eric Le Bihan +Date: Wed, 2 Apr 2014 12:36:52 +0200 +Subject: [PATCH] libudev: Only use #pragma for ignoring diagnostics if GCC + version supports it. + +[Peter: update for 2.1.1, fix shared_assert issue] +Signed-off-by: Eric Le Bihan +--- + src/shared/macro.h | 8 +++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/shared/macro.h b/src/shared/macro.h +--- a/src/shared/macro.h ++++ b/src/shared/macro.h +@@ -38,6 +38,7 @@ + #define _cleanup_(x) __attribute__((cleanup(x))) + + /* Temporarily disable some warnings */ ++#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) + #define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \ + _Pragma("GCC diagnostic push"); \ + _Pragma("GCC diagnostic ignored \"-Wdeclaration-after-statement\"") +@@ -48,6 +49,13 @@ + + #define REENABLE_WARNING \ + _Pragma("GCC diagnostic pop") ++#else ++#define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT ++#define DISABLE_WARNING_FORMAT_NONLITERAL ++#define REENABLE_WARNING ++/* glibc unconditionally defines this, but it needs GCC 4.6+ */ ++#undef static_assert ++#endif + + #define XCONCATENATE(x, y) x ## y + #define CONCATENATE(x, y) XCONCATENATE(x, y) +-- +1.7.9.5 diff --git a/package/eudev/Config.in b/package/eudev/Config.in new file mode 100644 index 0000000000..cda06e7678 --- /dev/null +++ b/package/eudev/Config.in @@ -0,0 +1,44 @@ +config BR2_PACKAGE_EUDEV + bool "eudev" + depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV + depends on BR2_USE_MMU # uses fork() + depends on BR2_USE_WCHAR # util-linux + depends on !BR2_STATIC_LIBS # kmod + select BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_KMOD + help + Userspace device daemon. This is a standalone version, + independent of systemd. It is a fork maintained by Gentoo. + + eudev requires a Linux kernel >= 2.6.34: it relies on devtmpfs + and inotify. + + https://wiki.gentoo.org/wiki/Project:Eudev + +if BR2_PACKAGE_EUDEV + +config BR2_PACKAGE_PROVIDES_UDEV + default "eudev" + +config BR2_PACKAGE_EUDEV_RULES_GEN + bool "enable rules generator" + help + Enable persistent rules generator + +config BR2_PACKAGE_EUDEV_ENABLE_HWDB + bool "enable hwdb installation" + default y + help + Enables hardware database installation to /etc/udev/hwdb.d + +endif + +comment "eudev needs eudev /dev management" + depends on BR2_USE_MMU + depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV + +comment "eudev needs a toolchain w/ wchar, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS diff --git a/package/eudev/S10udev b/package/eudev/S10udev new file mode 100755 index 0000000000..8382bec2bb --- /dev/null +++ b/package/eudev/S10udev @@ -0,0 +1,50 @@ +#!/bin/sh +# +# udev This is a minimal non-LSB version of a UDEV startup script. It +# was derived by stripping down the udev-058 LSB version for use +# with buildroot on embedded hardware using Linux 2.6.34+ kernels. +# +# You may need to customize this for your system's resource limits +# (including startup time!) and administration. For example, if +# your early userspace has a custom initramfs or initrd you might +# need /dev much earlier; or without hotpluggable busses (like USB, +# PCMCIA, MMC/SD, and so on) your /dev might be static after boot. +# +# This script assumes your system boots right into the eventual root +# filesystem, and that init runs this udev script before any programs +# needing more device nodes than the bare-bones set -- /dev/console, +# /dev/zero, /dev/null -- that's needed to boot and run this script. +# + +# Check for missing binaries +UDEV_BIN=/sbin/udevd +test -x $UDEV_BIN || exit 5 + +# Check for config file and read it +UDEV_CONFIG=/etc/udev/udev.conf +test -r $UDEV_CONFIG || exit 6 +. $UDEV_CONFIG + +case "$1" in + start) + printf "Populating ${udev_root:-/dev} using udev: " + printf '\000\000\000\000' > /proc/sys/kernel/hotplug + $UDEV_BIN -d || (echo "FAIL" && exit 1) + udevadm trigger --type=subsystems --action=add + udevadm trigger --type=devices --action=add + udevadm settle --timeout=30 || echo "udevadm settle failed" + echo "done" + ;; + stop) + # Stop execution of events + udevadm control --stop-exec-queue + killall udevd + ;; + *) + echo "Usage: $0 {start|stop}" + exit 1 + ;; +esac + + +exit 0 diff --git a/package/eudev/eudev.hash b/package/eudev/eudev.hash new file mode 100644 index 0000000000..e7c331ca9b --- /dev/null +++ b/package/eudev/eudev.hash @@ -0,0 +1,4 @@ +# From http://dev.gentoo.org/~blueness/eudev/ +md5 c4dace42deecede102b6c01904042acc eudev-3.1.5.tar.gz +# Locally calculated +sha256 f75885a430cd50fe4b31732f808ba7f9b2adf0f26b53b8ba2957b0c1d84b6f2a eudev-3.1.5.tar.gz diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk new file mode 100644 index 0000000000..942770c4d9 --- /dev/null +++ b/package/eudev/eudev.mk @@ -0,0 +1,65 @@ +################################################################################ +# +# eudev +# +################################################################################ + +EUDEV_VERSION = 3.1.5 +EUDEV_SOURCE = eudev-$(EUDEV_VERSION).tar.gz +EUDEV_SITE = http://dev.gentoo.org/~blueness/eudev +EUDEV_LICENSE = GPLv2+ (programs), LGPLv2.1+ (libraries) +EUDEV_LICENSE_FILES = COPYING +EUDEV_INSTALL_STAGING = YES + +# mq_getattr is in librt +EUDEV_CONF_ENV += LIBS=-lrt + +EUDEV_CONF_OPTS = \ + --disable-manpages \ + --sbindir=/sbin \ + --libexecdir=/lib \ + --with-firmware-path=/lib/firmware \ + --disable-introspection \ + --enable-libkmod + +EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod +EUDEV_PROVIDES = udev + +ifeq ($(BR2_ROOTFS_MERGED_USR),) +EUDEV_CONF_OPTS += --with-rootlibdir=/lib --enable-split-usr +endif + +ifeq ($(BR2_PACKAGE_EUDEV_RULES_GEN),y) +EUDEV_CONF_OPTS += --enable-rule-generator +endif + +ifeq ($(BR2_PACKAGE_EUDEV_ENABLE_HWDB),y) +EUDEV_CONF_OPTS += --enable-hwdb +else +EUDEV_CONF_OPTS += --disable-hwdb +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +EUDEV_CONF_OPTS += --enable-gudev +EUDEV_DEPENDENCIES += libglib2 +else +EUDEV_CONF_OPTS += --disable-gudev +endif + +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +EUDEV_CONF_OPTS += --enable-selinux +EUDEV_DEPENDENCIES += libselinux +else +EUDEV_CONF_OPTS += --disable-selinux +endif + +define EUDEV_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/eudev/S10udev $(TARGET_DIR)/etc/init.d/S10udev +endef + +# Required by default rules for input devices +define EUDEV_USERS + - - input -1 * - - - Input device group +endef + +$(eval $(autotools-package)) diff --git a/package/evemu/Config.in b/package/evemu/Config.in new file mode 100644 index 0000000000..07b7174e16 --- /dev/null +++ b/package/evemu/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_EVEMU + bool "evemu" + select BR2_PACKAGE_LIBEVDEV + help + evemu records and replays device descriptions and events + + http://www.freedesktop.org/wiki/Evemu/ diff --git a/package/evemu/evemu.hash b/package/evemu/evemu.hash new file mode 100644 index 0000000000..1264bedcf3 --- /dev/null +++ b/package/evemu/evemu.hash @@ -0,0 +1,2 @@ +# Hash from https://lists.freedesktop.org/archives/input-tools/2016-April/001274.html +sha256 0706ea5a830203f9cdb30c0e10c8c41d2427128ba9041543a5ae157fa3b4a30e evemu-2.4.0.tar.xz diff --git a/package/evemu/evemu.mk b/package/evemu/evemu.mk new file mode 100644 index 0000000000..992a1f72d7 --- /dev/null +++ b/package/evemu/evemu.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# evemu +# +################################################################################ + +EVEMU_VERSION = 2.4.0 +EVEMU_SITE = http://www.freedesktop.org/software/evemu +EVEMU_SOURCE = evemu-$(EVEMU_VERSION).tar.xz +EVEMU_LICENSE = LGPLv3 (library), GPLv3 (tools) +EVEMU_LICENSE_FILES = COPYING + +# asciidoc used to generate manpages, which we don't need, and if it's +# present on the build host, it ends getting called with our host-python +# which doesn't have all the needed modules enabled, breaking the build +EVEMU_CONF_ENV = ac_cv_path_ASCIIDOC="" + +# disable tests generation because of C++ dependency +EVEMU_CONF_OPTS += --disable-tests + +# Uses PKG_CHECK_MODULES() in configure.ac +EVEMU_DEPENDENCIES = host-pkgconf libevdev + +# Check for target python +ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y) +EVEMU_CONF_OPTS += --enable-python-bindings +EVEMU_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON3),python3,python) +else +EVEMU_CONF_OPTS += --disable-python-bindings +endif + +$(eval $(autotools-package)) diff --git a/package/eventlog/Config.in b/package/eventlog/Config.in new file mode 100644 index 0000000000..f9442f6187 --- /dev/null +++ b/package/eventlog/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_EVENTLOG + bool "eventlog" + help + eventlog is a library for creating structured events from + applications, and is the workhorse behind syslog-ng's own + messages. + + https://my.balabit.com/downloads/eventlog/ diff --git a/package/eventlog/eventlog.hash b/package/eventlog/eventlog.hash new file mode 100644 index 0000000000..b8f2ec6141 --- /dev/null +++ b/package/eventlog/eventlog.hash @@ -0,0 +1,2 @@ +# From https://my.balabit.com/downloads/eventlog/0.2/eventlog_0.2.12.dsc +sha256 494dac8e01dc5ce323df2ad554d94874938dab51aa025987677b2bc6906a9c66 eventlog_0.2.12.tar.gz diff --git a/package/eventlog/eventlog.mk b/package/eventlog/eventlog.mk new file mode 100644 index 0000000000..76da002e1a --- /dev/null +++ b/package/eventlog/eventlog.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# eventlog +# +################################################################################ + +EVENTLOG_VERSION_MAJOR = 0.2 +EVENTLOG_VERSION = $(EVENTLOG_VERSION_MAJOR).12 +EVENTLOG_SOURCE = eventlog_$(EVENTLOG_VERSION).tar.gz +EVENTLOG_SITE = https://my.balabit.com/downloads/eventlog/$(EVENTLOG_VERSION_MAJOR) +EVENTLOG_LICENSE = BSD-3c +EVENTLOG_LICENSE_FILES = COPYING +EVENTLOG_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/evtest/Config.in b/package/evtest/Config.in new file mode 100644 index 0000000000..1087217ee4 --- /dev/null +++ b/package/evtest/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_EVTEST + bool "evtest" + help + evtest displays information on the input device specified on + the command line, including all the events supported by the + device. It then monitors the device and displays all the + events layer events generated. + + http://cgit.freedesktop.org/evtest diff --git a/package/evtest/evtest.mk b/package/evtest/evtest.mk new file mode 100644 index 0000000000..3e02f7c87f --- /dev/null +++ b/package/evtest/evtest.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# evtest +# +################################################################################ + +EVTEST_VERSION = 1.33 +EVTEST_SOURCE = evtest-$(EVTEST_VERSION).tar.gz +EVTEST_SITE = http://cgit.freedesktop.org/evtest/snapshot +EVTEST_LICENSE = GPLv2+ +EVTEST_LICENSE_FILES = COPYING +EVTEST_DEPENDENCIES = host-pkgconf +# needed because source package contains no generated files +EVTEST_AUTORECONF = YES + +# asciidoc used to generate manpages, which we don't need, and if it's +# present on the build host, it ends getting called with our host-python +# which doesn't have all the needed modules enabled, breaking the build +EVTEST_CONF_ENV = ac_cv_path_ASCIIDOC="" + +$(eval $(autotools-package)) diff --git a/package/exfat-utils/Config.in b/package/exfat-utils/Config.in new file mode 100644 index 0000000000..9dfbbfcfb8 --- /dev/null +++ b/package/exfat-utils/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_EXFAT_UTILS + bool "exfat-utils" + depends on BR2_USE_WCHAR + help + exFAT filesystem utilities. + + https://github.com/relan/exfat + +comment "exfat-utils needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/exfat-utils/exfat-utils.hash b/package/exfat-utils/exfat-utils.hash new file mode 100644 index 0000000000..7bcaa3315c --- /dev/null +++ b/package/exfat-utils/exfat-utils.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 80d3b3f21242d60d36a38a4ddb05cb7cc3a7d4eef5793e8314814937b938fcea exfat-utils-1.2.3.tar.gz diff --git a/package/exfat-utils/exfat-utils.mk b/package/exfat-utils/exfat-utils.mk new file mode 100644 index 0000000000..e6359bca1f --- /dev/null +++ b/package/exfat-utils/exfat-utils.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# exfat-utils +# +################################################################################ + +EXFAT_UTILS_VERSION = 1.2.3 +EXFAT_UTILS_SITE = https://github.com/relan/exfat/releases/download/v$(EXFAT_UTILS_VERSION) +EXFAT_UTILS_LICENSE = GPLv3+ +EXFAT_UTILS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/exfat/Config.in b/package/exfat/Config.in new file mode 100644 index 0000000000..c0b4eabe11 --- /dev/null +++ b/package/exfat/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_EXFAT + bool "exFAT (FUSE)" + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse + depends on BR2_USE_MMU # libfuse + depends on BR2_USE_WCHAR + depends on !BR2_STATIC_LIBS # libfuse + select BR2_PACKAGE_LIBFUSE + help + A full-featured exFAT file system implementation for GNU/Linux + and other Unix-like systems as a FUSE module. + + https://github.com/relan/exfat + +comment "exfat needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || BR2_STATIC_LIBS diff --git a/package/exfat/exfat.hash b/package/exfat/exfat.hash new file mode 100644 index 0000000000..a6dbdac9d8 --- /dev/null +++ b/package/exfat/exfat.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 f2e06eba5a21c621aac1d6da21b12a5a324fdd1e20f9c8acd357dd463c2355d9 fuse-exfat-1.2.3.tar.gz diff --git a/package/exfat/exfat.mk b/package/exfat/exfat.mk new file mode 100644 index 0000000000..c7904ba23e --- /dev/null +++ b/package/exfat/exfat.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# exfat +# +################################################################################ + +EXFAT_VERSION = 1.2.3 +EXFAT_SITE = https://github.com/relan/exfat/releases/download/v$(EXFAT_VERSION) +EXFAT_SOURCE = fuse-exfat-$(EXFAT_VERSION).tar.gz +EXFAT_DEPENDENCIES = libfuse host-pkgconf +EXFAT_LICENSE = GPLv3+ +EXFAT_LICENSE_FILES = COPYING +EXFAT_CFLAGS = $(TARGET_CFLAGS) -std=c99 + +$(eval $(autotools-package)) diff --git a/package/exim/0001-Build-buildconfig-for-the-host.patch b/package/exim/0001-Build-buildconfig-for-the-host.patch new file mode 100644 index 0000000000..a926fbdab3 --- /dev/null +++ b/package/exim/0001-Build-buildconfig-for-the-host.patch @@ -0,0 +1,23 @@ +buildconfig is meant to be executed on the host, so it has to be compiled +using $(HOSTCC), not $(CC). + +Signed-off-by: Luca Ceresoli +--- + OS/Makefile-Base | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/OS/Makefile-Base b/OS/Makefile-Base +index 29a6ad3..420ba60 100644 +--- a/OS/Makefile-Base ++++ b/OS/Makefile-Base +@@ -114,8 +114,8 @@ allexim: config.h $(EXIM_MONITOR) exicyclog exinext exiwhat \ + + # Targets for special-purpose configuration header builders + buildconfig: buildconfig.c +- @echo "$(CC) buildconfig.c" +- $(FE)$(CC) $(CFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS) ++ @echo "$(HOSTCC) buildconfig.c" ++ $(FE)$(HOSTCC) $(HOSTCFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS) + + + # Target for the exicyclog utility script diff --git a/package/exim/0002-Don-t-make-backup-copies-of-installed-files.patch b/package/exim/0002-Don-t-make-backup-copies-of-installed-files.patch new file mode 100644 index 0000000000..0cdaa744bc --- /dev/null +++ b/package/exim/0002-Don-t-make-backup-copies-of-installed-files.patch @@ -0,0 +1,40 @@ +If exim had already been installed, the install script makes backup +copies of the pre-existing executables with a ".0" suffix. + +This leads to useless duplicated files on the target, so disable this +piece of code. + +Signed-off-by: Luca Ceresoli +--- + scripts/exim_install | 18 +++++++++--------- + 1 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/scripts/exim_install b/scripts/exim_install +index 616ab3c..e68e7d5 100755 +--- a/scripts/exim_install ++++ b/scripts/exim_install +@@ -344,15 +344,15 @@ while [ $# -gt 0 ]; do + + else + if ../scripts/newer ${name} ${BIN_DIRECTORY}/${name}; then +- if [ -f ${BIN_DIRECTORY}/${name} ]; then +- echo ${CP} ${BIN_DIRECTORY}/${name} ${BIN_DIRECTORY}/${name}.O +- ${real} ${CP} ${BIN_DIRECTORY}/${name} ${BIN_DIRECTORY}/${name}.O +- if [ $? -ne 0 ]; then +- echo $com "" +- echo $com "*** Exim installation ${ver}failed ***" +- exit 1 +- fi +- fi ++# if [ -f ${BIN_DIRECTORY}/${name} ]; then ++# echo ${CP} ${BIN_DIRECTORY}/${name} ${BIN_DIRECTORY}/${name}.O ++# ${real} ${CP} ${BIN_DIRECTORY}/${name} ${BIN_DIRECTORY}/${name}.O ++# if [ $? -ne 0 ]; then ++# echo $com "" ++# echo $com "*** Exim installation ${ver}failed ***" ++# exit 1 ++# fi ++# fi + echo ${CP} ${name} ${BIN_DIRECTORY} + ${real} ${CP} ${name} ${BIN_DIRECTORY} + if [ $? -ne 0 ]; then diff --git a/package/exim/0003-Skip-version-check-and-symlink-installation.patch b/package/exim/0003-Skip-version-check-and-symlink-installation.patch new file mode 100644 index 0000000000..94d21ae114 --- /dev/null +++ b/package/exim/0003-Skip-version-check-and-symlink-installation.patch @@ -0,0 +1,40 @@ +The exim install script installs a binary named exim-, plus a symlink +to it named exim. +In order to achieve this "feature" (of dubious usefulness) it runs the +executable (on the host) and then filters its output to grab the version number. +This clearly cannot work if the executable is cross-compiled, so get rid of all +of it and just install an executable file called exim. + +Inspired by: +http://patch-tracker.debian.org/patch/series/view/exim4/4.76-2/35_install.dpatch + +Signed-off-by: Luca Ceresoli +--- + scripts/exim_install | 7 +++++-- + 1 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/scripts/exim_install b/scripts/exim_install +index e68e7d5..487a4e1 100755 +--- a/scripts/exim_install ++++ b/scripts/exim_install +@@ -59,6 +59,8 @@ while [ $# -gt 0 ] ; do + shift + done + ++do_symlink=no ++ + # Get the values of BIN_DIRECTORY, CONFIGURE_FILE, INFO_DIRECTORY, NO_SYMLINK, + # SYSTEM_ALIASES_FILE, and EXE from the global Makefile (in the build + # directory). EXE is empty except in the Cygwin environment. In each case, keep +@@ -218,8 +220,9 @@ while [ $# -gt 0 ]; do + # The exim binary is handled specially + + if [ $name = exim${EXE} ]; then +- version=exim-`./exim -bV -C /dev/null | \ +- awk '/Exim version/ { OFS=""; print $3,"-",substr($4,2,length($4)-1) }'`${EXE} ++ version=exim ++# version=exim-`./exim -bV -C /dev/null | \ ++# awk '/Exim version/ { OFS=""; print $3,"-",substr($4,2,length($4)-1) }'`${EXE} + + if [ "${version}" = "exim-${EXE}" ]; then + echo $com "" diff --git a/package/exim/Config.in b/package/exim/Config.in new file mode 100644 index 0000000000..230ac86f96 --- /dev/null +++ b/package/exim/Config.in @@ -0,0 +1,35 @@ +comment "exim needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_EXIM + bool "exim" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_BERKELEYDB + help + Exim is a message transfer agent (MTA) developed at the University of + Cambridge for use on Unix systems connected to the Internet. + + http://www.exim.org/ + +if BR2_PACKAGE_EXIM + +config BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE + string "Custom configuration file" + help + By default, when this option is left empty, Buildroot + generates a configuration file for exim with reasonable + settings. + + If you want to override the configuration file generated by + Buildroot with a customized file, set here the path to your + configuration file with this option. + + This file shall comply with the syntax defined in the exim + documentation (http://www.exim.org/docs.html). + Buildroot will generate a configuration file composed of the + content of the file you provide plus the toolchain-related + settings needed for cross-compilation. + +endif diff --git a/package/exim/Local-Makefile b/package/exim/Local-Makefile new file mode 100644 index 0000000000..191f0e0da6 --- /dev/null +++ b/package/exim/Local-Makefile @@ -0,0 +1,15 @@ +BIN_DIRECTORY=/usr/sbin +CONFIGURE_FILE=/etc/exim/configure +EXIM_USER=ref:exim +EXIM_GROUP=mail +SPOOL_DIRECTORY=/var/spool/exim +ROUTER_ACCEPT=yes +TRANSPORT_LMTP=yes +LOOKUP_DBM=yes +LOOKUP_LSEARCH=yes +PCRE_LIBS=-lpcre +FIXED_NEVER_USERS=root +HEADERS_CHARSET="ISO-8859-1" +HAVE_ICONV=no +SYSLOG_LOG_PID=yes +TMPDIR="/tmp" diff --git a/package/exim/S86exim b/package/exim/S86exim new file mode 100644 index 0000000000..bec88fc222 --- /dev/null +++ b/package/exim/S86exim @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Start/stop exim +# + +PIDFILE=/var/lock/exim/exim-daemon.pid + +case "$1" in + start) + echo "Starting exim..." + start-stop-daemon -S -x exim -- -bd + ;; + stop) + printf "Stopping exim..." + start-stop-daemon -K -o -p $PIDFILE + ;; + restart|reload) + "$0" stop + "$0" start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/exim/exim.hash b/package/exim/exim.hash new file mode 100644 index 0000000000..83be731988 --- /dev/null +++ b/package/exim/exim.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 74691e0dff4d1b5d387e9c33c86f96a8f6d2adbc781c0dec9d2061a847b07dc9 exim-4.87.tar.bz2 diff --git a/package/exim/exim.mk b/package/exim/exim.mk new file mode 100644 index 0000000000..2cc706c71b --- /dev/null +++ b/package/exim/exim.mk @@ -0,0 +1,154 @@ +################################################################################ +# +# exim +# +################################################################################ + +EXIM_VERSION = 4.87 +EXIM_SOURCE = exim-$(EXIM_VERSION).tar.bz2 +EXIM_SITE = ftp://ftp.exim.org/pub/exim/exim4 +EXIM_LICENSE = GPLv2+ +EXIM_LICENSE_FILES = LICENCE +EXIM_DEPENDENCIES = pcre berkeleydb host-pkgconf + +# Modify a variable value. It must already exist in the file, either +# commented or not. +define exim-config-change # variable-name, variable-value + $(SED) 's,^[#[:space:]]*$1[[:space:]]*=.*$$,$1=$2,' \ + $(@D)/Local/Makefile +endef + +# Comment-out a variable. Has no effect if it does not exits. +define exim-config-unset # variable-name + $(SED) 's,^\([[:space:]]*$1[[:space:]]*=.*$$\),# \1,' \ + $(@D)/Local/Makefile +endef + +# Add a variable definition. It must not already exist in the file, +# otherwise it would be defined twice with potentially different values. +define exim-config-add # variable-name, variable-value + echo "$1=$2" >>$(@D)/Local/Makefile +endef + +define EXIM_USE_CUSTOM_CONFIG_FILE + $(INSTALL) -m 0644 $(BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE) \ + $(@D)/Local/Makefile +endef + +define EXIM_USE_DEFAULT_CONFIG_FILE + $(INSTALL) -m 0644 $(@D)/src/EDITME $(@D)/Local/Makefile + $(call exim-config-change,BIN_DIRECTORY,/usr/sbin) + $(call exim-config-change,CONFIGURE_FILE,/etc/exim/configure) + $(call exim-config-change,EXIM_USER,ref:exim) + $(call exim-config-change,EXIM_GROUP,mail) + $(call exim-config-change,TRANSPORT_LMTP,yes) + $(call exim-config-change,PCRE_LIBS,-lpcre) + $(call exim-config-change,PCRE_CONFIG,no) + $(call exim-config-change,HAVE_ICONV,no) + $(call exim-config-unset,EXIM_MONITOR) + $(call exim-config-change,AUTH_PLAINTEXT,yes) + $(call exim-config-change,AUTH_CRAM_MD5,yes) +endef + +ifeq ($(BR2_PACKAGE_DOVECOT),y) +EXIM_DEPENDENCIES += dovecot +define EXIM_USE_DEFAULT_CONFIG_FILE_DOVECOT + $(call exim-config-change,AUTH_DOVECOT,yes) +endef +endif + +ifeq ($(BR2_PACKAGE_CLAMAV),y) +EXIM_DEPENDENCIES += clamav +define EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV + $(call exim-config-change,WITH_CONTENT_SCAN,yes) +endef +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +EXIM_DEPENDENCIES += openssl +define EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL + $(call exim-config-change,SUPPORT_TLS,yes) + $(call exim-config-change,USE_OPENSSL_PC,openssl) +endef +endif + +# only (e)glibc provides libnsl, remove -lnsl for all other toolchains +# http://bugs.exim.org/show_bug.cgi?id=1564 +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),) +define EXIM_REMOVE_LIBNSL_FROM_MAKEFILE + $(SED) 's/-lnsl//g' $(@D)/OS/Makefile-Linux +endef +endif + +# musl does not provide struct ip_options nor struct ip_opts (but it is +# available with both glibc and uClibc) +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +define EXIM_FIX_IP_OPTIONS_FOR_MUSL + $(SED) 's/#define GLIBC_IP_OPTIONS/#define DARWIN_IP_OPTIONS/' \ + $(@D)/OS/os.h-Linux +endef +endif + +define EXIM_CONFIGURE_TOOLCHAIN + $(call exim-config-add,CC,$(TARGET_CC)) + $(call exim-config-add,CFLAGS,$(TARGET_CFLAGS)) + $(call exim-config-add,AR,$(TARGET_AR) cq) + $(call exim-config-add,RANLIB,$(TARGET_RANLIB)) + $(call exim-config-add,HOSTCC,$(HOSTCC)) + $(call exim-config-add,HOSTCFLAGS,$(HOSTCFLAGS)) + $(EXIM_REMOVE_LIBNSL_FROM_MAKEFILE) + $(EXIM_FIX_IP_OPTIONS_FOR_MUSL) +endef + +ifneq ($(call qstrip,$(BR2_PACKAGE_EXIM_CUSTOM_CONFIG_FILE)),) +define EXIM_CONFIGURE_CMDS + $(EXIM_USE_CUSTOM_CONFIG_FILE) + $(EXIM_CONFIGURE_TOOLCHAIN) +endef +else # CUSTOM_CONFIG +define EXIM_CONFIGURE_CMDS + $(EXIM_USE_DEFAULT_CONFIG_FILE) + $(EXIM_USE_DEFAULT_CONFIG_FILE_DOVECOT) + $(EXIM_USE_DEFAULT_CONFIG_FILE_CLAMAV) + $(EXIM_USE_DEFAULT_CONFIG_FILE_OPENSSL) + $(EXIM_CONFIGURE_TOOLCHAIN) +endef +endif # CUSTOM_CONFIG + +# exim needs a bit of love to build statically +ifeq ($(BR2_STATIC_LIBS),y) +EXIM_STATIC_FLAGS = LFLAGS="-pthread --static" +endif + +# "The -j (parallel) flag must not be used with make" +# (http://www.exim.org/exim-html-current/doc/html/spec_html/ch04.html) +define EXIM_BUILD_CMDS + $(TARGET_MAKE_ENV) build=br $(MAKE1) -C $(@D) $(EXIM_STATIC_FLAGS) +endef + +# Need to replicate the LFLAGS in install, as exim still wants to build +# something when installing... +define EXIM_INSTALL_TARGET_CMDS + DESTDIR=$(TARGET_DIR) INSTALL_ARG="-no_chown -no_symlink" build=br \ + $(MAKE1) -C $(@D) $(EXIM_STATIC_FLAGS) install + chmod u+s $(TARGET_DIR)/usr/sbin/exim +endef + +define EXIM_USERS + exim 88 mail 8 * - - - exim +endef + +define EXIM_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/exim/S86exim \ + $(TARGET_DIR)/etc/init.d/S86exim +endef + +define EXIM_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/exim/exim.service \ + $(TARGET_DIR)/usr/lib/systemd/system/exim.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/exim.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/exim.service +endef + +$(eval $(generic-package)) diff --git a/package/exim/exim.service b/package/exim/exim.service new file mode 100644 index 0000000000..26daabc4c0 --- /dev/null +++ b/package/exim/exim.service @@ -0,0 +1,10 @@ +[Unit] +Description=Exim MTA +After=syslog.target network.target + +[Service] +ExecStart=/usr/bin/exim -bdf +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/exiv2/Config.in b/package/exiv2/Config.in new file mode 100644 index 0000000000..8ca95ebcaf --- /dev/null +++ b/package/exiv2/Config.in @@ -0,0 +1,59 @@ +comment "exiv2 needs a toolchain w/ C++, wchar, dynamic library" + depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_USE_WCHAR + +config BR2_PACKAGE_EXIV2 + bool "exiv2" + depends on !BR2_STATIC_LIBS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + help + Exiv2 is a C++ library and a command line utility to manage + image metadata. It provides fast and easy read and write + access to the Exif, IPTC and XMP metadata of images in + various formats. + + Exiv2 is available under the GPLv2+ or under a commercial + license. + + http://www.exiv2.org/ + +if BR2_PACKAGE_EXIV2 + +config BR2_PACKAGE_EXIV2_COMMERCIAL + bool "Enable commercial" + help + Build the commercial version for closed source project. + + The Nikon lens name database and the NLS support is disabled + for copyright reasons. + + A commercial license request is needed. + http://www.exiv2.org/download.html#license + +config BR2_PACKAGE_EXIV2_PNG + bool "PNG image support" + select BR2_PACKAGE_ZLIB + help + Build with PNG image support + +config BR2_PACKAGE_EXIV2_XMP + bool "XMP support" + select BR2_PACKAGE_EXPAT + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Build with XMP support + +comment "xmp support needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_EXIV2_LENSDATA + bool "Nikon lens name database" + depends on !BR2_PACKAGE_EXIV2_COMMERCIAL + help + Integrate Nikon lens name database. + + This database is integrated but comes from a thirdparty: + http://www.rottmerhusen.com/objektives/lensid/thirdparty.html. + +endif diff --git a/package/exiv2/exiv2.hash b/package/exiv2/exiv2.hash new file mode 100644 index 0000000000..b1e78d2c94 --- /dev/null +++ b/package/exiv2/exiv2.hash @@ -0,0 +1,4 @@ +# From http://www.exiv2.org/download.html +md5 258d4831b30f75a01e0234065c6c2806 exiv2-0.25.tar.gz +# Locally calculated +sha256 c80bfc778a15fdb06f71265db2c3d49d8493c382e516cb99b8c9f9cbde36efa4 exiv2-0.25.tar.gz diff --git a/package/exiv2/exiv2.mk b/package/exiv2/exiv2.mk new file mode 100644 index 0000000000..45f9289199 --- /dev/null +++ b/package/exiv2/exiv2.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# exiv2 +# +################################################################################ + +EXIV2_VERSION = 0.25 +EXIV2_SITE = http://www.exiv2.org +EXIV2_INSTALL_STAGING = YES + +EXIV2_CONF_OPTS += -DEXIV2_ENABLE_BUILD_SAMPLES=OFF + +ifeq ($(BR2_PACKAGE_EXIV2_LENSDATA),) +EXIV2_CONF_OPTS += -DEXIV2_ENABLE_LENSDATA=OFF +endif + +ifeq ($(BR2_PACKAGE_EXIV2_COMMERCIAL),y) +EXIV2_LICENSE = commercial +# NLS support is disabled in commercial version due to the copyright +# of the translated texts. +EXIV2_CONF_OPTS += -DEXIV2_ENABLE_COMMERCIAL=ON -DEXIV2_ENABLE_NLS=OFF +else +EXIV2_LICENSE = GPLv2+ +EXIV2_LICENSE_FILES = COPYING +endif + +ifeq ($(BR2_PACKAGE_EXIV2_PNG),y) +EXIV2_CONF_OPTS += -DEXIV2_ENABLE_PNG=ON +EXIV2_DEPENDENCIES += zlib +else +EXIV2_CONF_OPTS += -DEXIV2_ENABLE_PNG=OFF +endif + +ifeq ($(BR2_PACKAGE_EXIV2_XMP),y) +EXIV2_CONF_OPTS += -DEXIV2_ENABLE_XMP=ON -DEXIV2_ENABLE_LIBXMP=ON +EXIV2_DEPENDENCIES += expat +else +EXIV2_CONF_OPTS += -DEXIV2_ENABLE_XMP=OFF -DEXIV2_ENABLE_LIBXMP=OFF +endif + +ifeq ($(BR2_ENABLE_LOCALE),y) +EXIV2_CONF_OPTS += -DEXIV2_ENABLE_NLS=ON +else +EXIV2_CONF_OPTS += -DEXIV2_ENABLE_NLS=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/expat/0001-fix-CVE-2016-0718.patch b/package/expat/0001-fix-CVE-2016-0718.patch new file mode 100644 index 0000000000..8530a0e5a1 --- /dev/null +++ b/package/expat/0001-fix-CVE-2016-0718.patch @@ -0,0 +1,757 @@ +From cdfcb1b5c95e93b00ae9e9d25708b4a3bee72c15 Mon Sep 17 00:00:00 2001 +From: Sebastian Pipping +Date: Mon, 2 May 2016 00:02:44 +0200 +Subject: [PATCH] Address CVE-2016-0718 (/patch/ version 2.2.1) + +* Out of bounds memory access when doing text conversion on malformed input +* Integer overflow related to memory allocation + +Reported by Gustavo Grieco + +Patch credits go to +* Christian Heimes +* Karl Waclawek +* Gustavo Grieco +* Sebastian Pipping +* Pascal Cuoq + +Signed-off-by: Gustavo Zacarias +--- + lib/xmlparse.c | 34 +++++++++----- + lib/xmltok.c | 115 +++++++++++++++++++++++++++++++++++------------- + lib/xmltok.h | 10 ++++- + lib/xmltok_impl.c | 62 +++++++++++++------------- + 4 files changed, 146 insertions(+), 75 deletions(-) + +diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c +index e308c79..13e080d 100644 +--- a/lib/xmlparse.c ++++ b/lib/xmlparse.c +@@ -2426,11 +2426,11 @@ doContent(XML_Parser parser, + for (;;) { + int bufSize; + int convLen; +- XmlConvert(enc, ++ const enum XML_Convert_Result convert_res = XmlConvert(enc, + &fromPtr, rawNameEnd, + (ICHAR **)&toPtr, (ICHAR *)tag->bufEnd - 1); + convLen = (int)(toPtr - (XML_Char *)tag->buf); +- if (fromPtr == rawNameEnd) { ++ if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) { + tag->name.strLen = convLen; + break; + } +@@ -2651,11 +2651,11 @@ doContent(XML_Parser parser, + if (MUST_CONVERT(enc, s)) { + for (;;) { + ICHAR *dataPtr = (ICHAR *)dataBuf; +- XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd); ++ const enum XML_Convert_Result convert_res = XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd); + *eventEndPP = s; + charDataHandler(handlerArg, dataBuf, + (int)(dataPtr - (ICHAR *)dataBuf)); +- if (s == next) ++ if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) + break; + *eventPP = s; + } +@@ -3261,11 +3261,11 @@ doCdataSection(XML_Parser parser, + if (MUST_CONVERT(enc, s)) { + for (;;) { + ICHAR *dataPtr = (ICHAR *)dataBuf; +- XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd); ++ const enum XML_Convert_Result convert_res = XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd); + *eventEndPP = next; + charDataHandler(handlerArg, dataBuf, + (int)(dataPtr - (ICHAR *)dataBuf)); +- if (s == next) ++ if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) + break; + *eventPP = s; + } +@@ -5342,6 +5342,7 @@ reportDefault(XML_Parser parser, const ENCODING *enc, + const char *s, const char *end) + { + if (MUST_CONVERT(enc, s)) { ++ enum XML_Convert_Result convert_res; + const char **eventPP; + const char **eventEndPP; + if (enc == encoding) { +@@ -5354,11 +5355,11 @@ reportDefault(XML_Parser parser, const ENCODING *enc, + } + do { + ICHAR *dataPtr = (ICHAR *)dataBuf; +- XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd); ++ convert_res = XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd); + *eventEndPP = s; + defaultHandler(handlerArg, dataBuf, (int)(dataPtr - (ICHAR *)dataBuf)); + *eventPP = s; +- } while (s != end); ++ } while ((convert_res != XML_CONVERT_COMPLETED) && (convert_res != XML_CONVERT_INPUT_INCOMPLETE)); + } + else + defaultHandler(handlerArg, (XML_Char *)s, (int)((XML_Char *)end - (XML_Char *)s)); +@@ -6163,8 +6164,8 @@ poolAppend(STRING_POOL *pool, const ENCODING *enc, + if (!pool->ptr && !poolGrow(pool)) + return NULL; + for (;;) { +- XmlConvert(enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end); +- if (ptr == end) ++ const enum XML_Convert_Result convert_res = XmlConvert(enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end); ++ if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) + break; + if (!poolGrow(pool)) + return NULL; +@@ -6248,8 +6249,13 @@ poolGrow(STRING_POOL *pool) + } + } + if (pool->blocks && pool->start == pool->blocks->s) { +- int blockSize = (int)(pool->end - pool->start)*2; +- BLOCK *temp = (BLOCK *) ++ BLOCK *temp; ++ int blockSize = (int)((unsigned)(pool->end - pool->start)*2U); ++ ++ if (blockSize < 0) ++ return XML_FALSE; ++ ++ temp = (BLOCK *) + pool->mem->realloc_fcn(pool->blocks, + (offsetof(BLOCK, s) + + blockSize * sizeof(XML_Char))); +@@ -6264,6 +6270,10 @@ poolGrow(STRING_POOL *pool) + else { + BLOCK *tem; + int blockSize = (int)(pool->end - pool->start); ++ ++ if (blockSize < 0) ++ return XML_FALSE; ++ + if (blockSize < INIT_BLOCK_SIZE) + blockSize = INIT_BLOCK_SIZE; + else +diff --git a/expat/lib/xmltok.c b/expat/lib/xmltok.c +index bf09dfc..cb98ce1 100644 +--- a/lib/xmltok.c ++++ b/lib/xmltok.c +@@ -318,39 +318,55 @@ enum { /* UTF8_cvalN is value of masked first byte of N byte sequence */ + UTF8_cval4 = 0xf0 + }; + +-static void PTRCALL ++static enum XML_Convert_Result PTRCALL + utf8_toUtf8(const ENCODING *enc, + const char **fromP, const char *fromLim, + char **toP, const char *toLim) + { ++ enum XML_Convert_Result res = XML_CONVERT_COMPLETED; + char *to; + const char *from; + if (fromLim - *fromP > toLim - *toP) { + /* Avoid copying partial characters. */ ++ res = XML_CONVERT_OUTPUT_EXHAUSTED; + for (fromLim = *fromP + (toLim - *toP); fromLim > *fromP; fromLim--) + if (((unsigned char)fromLim[-1] & 0xc0) != 0x80) + break; + } +- for (to = *toP, from = *fromP; from != fromLim; from++, to++) ++ for (to = *toP, from = *fromP; (from < fromLim) && (to < toLim); from++, to++) + *to = *from; + *fromP = from; + *toP = to; ++ ++ if ((to == toLim) && (from < fromLim)) ++ return XML_CONVERT_OUTPUT_EXHAUSTED; ++ else ++ return res; + } + +-static void PTRCALL ++static enum XML_Convert_Result PTRCALL + utf8_toUtf16(const ENCODING *enc, + const char **fromP, const char *fromLim, + unsigned short **toP, const unsigned short *toLim) + { ++ enum XML_Convert_Result res = XML_CONVERT_COMPLETED; + unsigned short *to = *toP; + const char *from = *fromP; +- while (from != fromLim && to != toLim) { ++ while (from < fromLim && to < toLim) { + switch (((struct normal_encoding *)enc)->type[(unsigned char)*from]) { + case BT_LEAD2: ++ if (fromLim - from < 2) { ++ res = XML_CONVERT_INPUT_INCOMPLETE; ++ break; ++ } + *to++ = (unsigned short)(((from[0] & 0x1f) << 6) | (from[1] & 0x3f)); + from += 2; + break; + case BT_LEAD3: ++ if (fromLim - from < 3) { ++ res = XML_CONVERT_INPUT_INCOMPLETE; ++ break; ++ } + *to++ = (unsigned short)(((from[0] & 0xf) << 12) + | ((from[1] & 0x3f) << 6) | (from[2] & 0x3f)); + from += 3; +@@ -358,8 +374,14 @@ utf8_toUtf16(const ENCODING *enc, + case BT_LEAD4: + { + unsigned long n; +- if (to + 1 == toLim) ++ if (toLim - to < 2) { ++ res = XML_CONVERT_OUTPUT_EXHAUSTED; + goto after; ++ } ++ if (fromLim - from < 4) { ++ res = XML_CONVERT_INPUT_INCOMPLETE; ++ goto after; ++ } + n = ((from[0] & 0x7) << 18) | ((from[1] & 0x3f) << 12) + | ((from[2] & 0x3f) << 6) | (from[3] & 0x3f); + n -= 0x10000; +@@ -377,6 +399,7 @@ utf8_toUtf16(const ENCODING *enc, + after: + *fromP = from; + *toP = to; ++ return res; + } + + #ifdef XML_NS +@@ -425,7 +448,7 @@ static const struct normal_encoding internal_utf8_encoding = { + STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_) + }; + +-static void PTRCALL ++static enum XML_Convert_Result PTRCALL + latin1_toUtf8(const ENCODING *enc, + const char **fromP, const char *fromLim, + char **toP, const char *toLim) +@@ -433,30 +456,35 @@ latin1_toUtf8(const ENCODING *enc, + for (;;) { + unsigned char c; + if (*fromP == fromLim) +- break; ++ return XML_CONVERT_COMPLETED; + c = (unsigned char)**fromP; + if (c & 0x80) { + if (toLim - *toP < 2) +- break; ++ return XML_CONVERT_OUTPUT_EXHAUSTED; + *(*toP)++ = (char)((c >> 6) | UTF8_cval2); + *(*toP)++ = (char)((c & 0x3f) | 0x80); + (*fromP)++; + } + else { + if (*toP == toLim) +- break; ++ return XML_CONVERT_OUTPUT_EXHAUSTED; + *(*toP)++ = *(*fromP)++; + } + } + } + +-static void PTRCALL ++static enum XML_Convert_Result PTRCALL + latin1_toUtf16(const ENCODING *enc, + const char **fromP, const char *fromLim, + unsigned short **toP, const unsigned short *toLim) + { +- while (*fromP != fromLim && *toP != toLim) ++ while (*fromP < fromLim && *toP < toLim) + *(*toP)++ = (unsigned char)*(*fromP)++; ++ ++ if ((*toP == toLim) && (*fromP < fromLim)) ++ return XML_CONVERT_OUTPUT_EXHAUSTED; ++ else ++ return XML_CONVERT_COMPLETED; + } + + #ifdef XML_NS +@@ -483,13 +511,18 @@ static const struct normal_encoding latin1_encoding = { + STANDARD_VTABLE(sb_) + }; + +-static void PTRCALL ++static enum XML_Convert_Result PTRCALL + ascii_toUtf8(const ENCODING *enc, + const char **fromP, const char *fromLim, + char **toP, const char *toLim) + { +- while (*fromP != fromLim && *toP != toLim) ++ while (*fromP < fromLim && *toP < toLim) + *(*toP)++ = *(*fromP)++; ++ ++ if ((*toP == toLim) && (*fromP < fromLim)) ++ return XML_CONVERT_OUTPUT_EXHAUSTED; ++ else ++ return XML_CONVERT_COMPLETED; + } + + #ifdef XML_NS +@@ -536,13 +569,14 @@ unicode_byte_type(char hi, char lo) + } + + #define DEFINE_UTF16_TO_UTF8(E) \ +-static void PTRCALL \ ++static enum XML_Convert_Result PTRCALL \ + E ## toUtf8(const ENCODING *enc, \ + const char **fromP, const char *fromLim, \ + char **toP, const char *toLim) \ + { \ +- const char *from; \ +- for (from = *fromP; from != fromLim; from += 2) { \ ++ const char *from = *fromP; \ ++ fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */ \ ++ for (; from < fromLim; from += 2) { \ + int plane; \ + unsigned char lo2; \ + unsigned char lo = GET_LO(from); \ +@@ -552,7 +586,7 @@ E ## toUtf8(const ENCODING *enc, \ + if (lo < 0x80) { \ + if (*toP == toLim) { \ + *fromP = from; \ +- return; \ ++ return XML_CONVERT_OUTPUT_EXHAUSTED; \ + } \ + *(*toP)++ = lo; \ + break; \ +@@ -562,7 +596,7 @@ E ## toUtf8(const ENCODING *enc, \ + case 0x4: case 0x5: case 0x6: case 0x7: \ + if (toLim - *toP < 2) { \ + *fromP = from; \ +- return; \ ++ return XML_CONVERT_OUTPUT_EXHAUSTED; \ + } \ + *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2); \ + *(*toP)++ = ((lo & 0x3f) | 0x80); \ +@@ -570,7 +604,7 @@ E ## toUtf8(const ENCODING *enc, \ + default: \ + if (toLim - *toP < 3) { \ + *fromP = from; \ +- return; \ ++ return XML_CONVERT_OUTPUT_EXHAUSTED; \ + } \ + /* 16 bits divided 4, 6, 6 amongst 3 bytes */ \ + *(*toP)++ = ((hi >> 4) | UTF8_cval3); \ +@@ -580,7 +614,11 @@ E ## toUtf8(const ENCODING *enc, \ + case 0xD8: case 0xD9: case 0xDA: case 0xDB: \ + if (toLim - *toP < 4) { \ + *fromP = from; \ +- return; \ ++ return XML_CONVERT_OUTPUT_EXHAUSTED; \ ++ } \ ++ if (fromLim - from < 4) { \ ++ *fromP = from; \ ++ return XML_CONVERT_INPUT_INCOMPLETE; \ + } \ + plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1; \ + *(*toP)++ = ((plane >> 2) | UTF8_cval4); \ +@@ -596,20 +634,32 @@ E ## toUtf8(const ENCODING *enc, \ + } \ + } \ + *fromP = from; \ ++ if (from < fromLim) \ ++ return XML_CONVERT_INPUT_INCOMPLETE; \ ++ else \ ++ return XML_CONVERT_COMPLETED; \ + } + + #define DEFINE_UTF16_TO_UTF16(E) \ +-static void PTRCALL \ ++static enum XML_Convert_Result PTRCALL \ + E ## toUtf16(const ENCODING *enc, \ + const char **fromP, const char *fromLim, \ + unsigned short **toP, const unsigned short *toLim) \ + { \ ++ enum XML_Convert_Result res = XML_CONVERT_COMPLETED; \ ++ fromLim = *fromP + (((fromLim - *fromP) >> 1) << 1); /* shrink to even */ \ + /* Avoid copying first half only of surrogate */ \ + if (fromLim - *fromP > ((toLim - *toP) << 1) \ +- && (GET_HI(fromLim - 2) & 0xF8) == 0xD8) \ ++ && (GET_HI(fromLim - 2) & 0xF8) == 0xD8) { \ + fromLim -= 2; \ +- for (; *fromP != fromLim && *toP != toLim; *fromP += 2) \ ++ res = XML_CONVERT_INPUT_INCOMPLETE; \ ++ } \ ++ for (; *fromP < fromLim && *toP < toLim; *fromP += 2) \ + *(*toP)++ = (GET_HI(*fromP) << 8) | GET_LO(*fromP); \ ++ if ((*toP == toLim) && (*fromP < fromLim)) \ ++ return XML_CONVERT_OUTPUT_EXHAUSTED; \ ++ else \ ++ return res; \ + } + + #define SET2(ptr, ch) \ +@@ -1288,7 +1338,7 @@ unknown_isInvalid(const ENCODING *enc, const char *p) + return (c & ~0xFFFF) || checkCharRefNumber(c) < 0; + } + +-static void PTRCALL ++static enum XML_Convert_Result PTRCALL + unknown_toUtf8(const ENCODING *enc, + const char **fromP, const char *fromLim, + char **toP, const char *toLim) +@@ -1299,21 +1349,21 @@ unknown_toUtf8(const ENCODING *enc, + const char *utf8; + int n; + if (*fromP == fromLim) +- break; ++ return XML_CONVERT_COMPLETED; + utf8 = uenc->utf8[(unsigned char)**fromP]; + n = *utf8++; + if (n == 0) { + int c = uenc->convert(uenc->userData, *fromP); + n = XmlUtf8Encode(c, buf); + if (n > toLim - *toP) +- break; ++ return XML_CONVERT_OUTPUT_EXHAUSTED; + utf8 = buf; + *fromP += (AS_NORMAL_ENCODING(enc)->type[(unsigned char)**fromP] + - (BT_LEAD2 - 2)); + } + else { + if (n > toLim - *toP) +- break; ++ return XML_CONVERT_OUTPUT_EXHAUSTED; + (*fromP)++; + } + do { +@@ -1322,13 +1372,13 @@ unknown_toUtf8(const ENCODING *enc, + } + } + +-static void PTRCALL ++static enum XML_Convert_Result PTRCALL + unknown_toUtf16(const ENCODING *enc, + const char **fromP, const char *fromLim, + unsigned short **toP, const unsigned short *toLim) + { + const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc); +- while (*fromP != fromLim && *toP != toLim) { ++ while (*fromP < fromLim && *toP < toLim) { + unsigned short c = uenc->utf16[(unsigned char)**fromP]; + if (c == 0) { + c = (unsigned short) +@@ -1340,6 +1390,11 @@ unknown_toUtf16(const ENCODING *enc, + (*fromP)++; + *(*toP)++ = c; + } ++ ++ if ((*toP == toLim) && (*fromP < fromLim)) ++ return XML_CONVERT_OUTPUT_EXHAUSTED; ++ else ++ return XML_CONVERT_COMPLETED; + } + + ENCODING * +@@ -1503,7 +1558,7 @@ initScan(const ENCODING * const *encodingTable, + { + const ENCODING **encPtr; + +- if (ptr == end) ++ if (ptr >= end) + return XML_TOK_NONE; + encPtr = enc->encPtr; + if (ptr + 1 == end) { +diff --git a/expat/lib/xmltok.h b/expat/lib/xmltok.h +index ca867aa..752007e 100644 +--- a/lib/xmltok.h ++++ b/lib/xmltok.h +@@ -130,6 +130,12 @@ typedef int (PTRCALL *SCANNER)(const ENCODING *, + const char *, + const char **); + ++enum XML_Convert_Result { ++ XML_CONVERT_COMPLETED = 0, ++ XML_CONVERT_INPUT_INCOMPLETE = 1, ++ XML_CONVERT_OUTPUT_EXHAUSTED = 2 /* and therefore potentially input remaining as well */ ++}; ++ + struct encoding { + SCANNER scanners[XML_N_STATES]; + SCANNER literalScanners[XML_N_LITERAL_TYPES]; +@@ -158,12 +164,12 @@ struct encoding { + const char *ptr, + const char *end, + const char **badPtr); +- void (PTRCALL *utf8Convert)(const ENCODING *enc, ++ enum XML_Convert_Result (PTRCALL *utf8Convert)(const ENCODING *enc, + const char **fromP, + const char *fromLim, + char **toP, + const char *toLim); +- void (PTRCALL *utf16Convert)(const ENCODING *enc, ++ enum XML_Convert_Result (PTRCALL *utf16Convert)(const ENCODING *enc, + const char **fromP, + const char *fromLim, + unsigned short **toP, +diff --git a/expat/lib/xmltok_impl.c b/expat/lib/xmltok_impl.c +index 9c2895b..6c5a3ba 100644 +--- a/lib/xmltok_impl.c ++++ b/lib/xmltok_impl.c +@@ -93,13 +93,13 @@ static int PTRCALL + PREFIX(scanComment)(const ENCODING *enc, const char *ptr, + const char *end, const char **nextTokPtr) + { +- if (ptr != end) { ++ if (ptr < end) { + if (!CHAR_MATCHES(enc, ptr, ASCII_MINUS)) { + *nextTokPtr = ptr; + return XML_TOK_INVALID; + } + ptr += MINBPC(enc); +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + INVALID_CASES(ptr, nextTokPtr) + case BT_MINUS: +@@ -147,7 +147,7 @@ PREFIX(scanDecl)(const ENCODING *enc, const char *ptr, + *nextTokPtr = ptr; + return XML_TOK_INVALID; + } +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + case BT_PERCNT: + if (ptr + MINBPC(enc) == end) +@@ -233,7 +233,7 @@ PREFIX(scanPi)(const ENCODING *enc, const char *ptr, + *nextTokPtr = ptr; + return XML_TOK_INVALID; + } +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) + case BT_S: case BT_CR: case BT_LF: +@@ -242,7 +242,7 @@ PREFIX(scanPi)(const ENCODING *enc, const char *ptr, + return XML_TOK_INVALID; + } + ptr += MINBPC(enc); +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + INVALID_CASES(ptr, nextTokPtr) + case BT_QUEST: +@@ -305,7 +305,7 @@ static int PTRCALL + PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr, + const char *end, const char **nextTokPtr) + { +- if (ptr == end) ++ if (ptr >= end) + return XML_TOK_NONE; + if (MINBPC(enc) > 1) { + size_t n = end - ptr; +@@ -348,7 +348,7 @@ PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr, + ptr += MINBPC(enc); + break; + } +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + #define LEAD_CASE(n) \ + case BT_LEAD ## n: \ +@@ -391,11 +391,11 @@ PREFIX(scanEndTag)(const ENCODING *enc, const char *ptr, + *nextTokPtr = ptr; + return XML_TOK_INVALID; + } +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) + case BT_S: case BT_CR: case BT_LF: +- for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) { ++ for (ptr += MINBPC(enc); ptr < end; ptr += MINBPC(enc)) { + switch (BYTE_TYPE(enc, ptr)) { + case BT_S: case BT_CR: case BT_LF: + break; +@@ -432,7 +432,7 @@ static int PTRCALL + PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr, + const char *end, const char **nextTokPtr) + { +- if (ptr != end) { ++ if (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + case BT_DIGIT: + case BT_HEX: +@@ -441,7 +441,7 @@ PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr, + *nextTokPtr = ptr; + return XML_TOK_INVALID; + } +- for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) { ++ for (ptr += MINBPC(enc); ptr < end; ptr += MINBPC(enc)) { + switch (BYTE_TYPE(enc, ptr)) { + case BT_DIGIT: + case BT_HEX: +@@ -464,7 +464,7 @@ static int PTRCALL + PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr, + const char *end, const char **nextTokPtr) + { +- if (ptr != end) { ++ if (ptr < end) { + if (CHAR_MATCHES(enc, ptr, ASCII_x)) + return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr); + switch (BYTE_TYPE(enc, ptr)) { +@@ -474,7 +474,7 @@ PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr, + *nextTokPtr = ptr; + return XML_TOK_INVALID; + } +- for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) { ++ for (ptr += MINBPC(enc); ptr < end; ptr += MINBPC(enc)) { + switch (BYTE_TYPE(enc, ptr)) { + case BT_DIGIT: + break; +@@ -506,7 +506,7 @@ PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end, + *nextTokPtr = ptr; + return XML_TOK_INVALID; + } +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) + case BT_SEMI: +@@ -529,7 +529,7 @@ PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end, + #ifdef XML_NS + int hadColon = 0; + #endif +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) + #ifdef XML_NS +@@ -716,7 +716,7 @@ PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end, + hadColon = 0; + #endif + /* we have a start-tag */ +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) + #ifdef XML_NS +@@ -740,7 +740,7 @@ PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end, + case BT_S: case BT_CR: case BT_LF: + { + ptr += MINBPC(enc); +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) + case BT_GT: +@@ -785,7 +785,7 @@ static int PTRCALL + PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end, + const char **nextTokPtr) + { +- if (ptr == end) ++ if (ptr >= end) + return XML_TOK_NONE; + if (MINBPC(enc) > 1) { + size_t n = end - ptr; +@@ -832,7 +832,7 @@ PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end, + ptr += MINBPC(enc); + break; + } +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + #define LEAD_CASE(n) \ + case BT_LEAD ## n: \ +@@ -895,7 +895,7 @@ PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end, + *nextTokPtr = ptr; + return XML_TOK_INVALID; + } +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) + case BT_SEMI: +@@ -921,7 +921,7 @@ PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end, + *nextTokPtr = ptr; + return XML_TOK_INVALID; + } +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) + case BT_CR: case BT_LF: case BT_S: +@@ -941,7 +941,7 @@ PREFIX(scanLit)(int open, const ENCODING *enc, + const char *ptr, const char *end, + const char **nextTokPtr) + { +- while (ptr != end) { ++ while (ptr < end) { + int t = BYTE_TYPE(enc, ptr); + switch (t) { + INVALID_CASES(ptr, nextTokPtr) +@@ -973,7 +973,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end, + const char **nextTokPtr) + { + int tok; +- if (ptr == end) ++ if (ptr >= end) + return XML_TOK_NONE; + if (MINBPC(enc) > 1) { + size_t n = end - ptr; +@@ -1141,7 +1141,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end, + *nextTokPtr = ptr; + return XML_TOK_INVALID; + } +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) + case BT_GT: case BT_RPAR: case BT_COMMA: +@@ -1204,10 +1204,10 @@ PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr, + const char *end, const char **nextTokPtr) + { + const char *start; +- if (ptr == end) ++ if (ptr >= end) + return XML_TOK_NONE; + start = ptr; +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + #define LEAD_CASE(n) \ + case BT_LEAD ## n: ptr += n; break; +@@ -1262,10 +1262,10 @@ PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr, + const char *end, const char **nextTokPtr) + { + const char *start; +- if (ptr == end) ++ if (ptr >= end) + return XML_TOK_NONE; + start = ptr; +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + #define LEAD_CASE(n) \ + case BT_LEAD ## n: ptr += n; break; +@@ -1326,7 +1326,7 @@ PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr, + end = ptr + n; + } + } +- while (ptr != end) { ++ while (ptr < end) { + switch (BYTE_TYPE(enc, ptr)) { + INVALID_CASES(ptr, nextTokPtr) + case BT_LT: +@@ -1373,7 +1373,7 @@ PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end, + { + ptr += MINBPC(enc); + end -= MINBPC(enc); +- for (; ptr != end; ptr += MINBPC(enc)) { ++ for (; ptr < end; ptr += MINBPC(enc)) { + switch (BYTE_TYPE(enc, ptr)) { + case BT_DIGIT: + case BT_HEX: +@@ -1760,7 +1760,7 @@ PREFIX(updatePosition)(const ENCODING *enc, + case BT_CR: + pos->lineNumber++; + ptr += MINBPC(enc); +- if (ptr != end && BYTE_TYPE(enc, ptr) == BT_LF) ++ if (ptr < end && BYTE_TYPE(enc, ptr) == BT_LF) + ptr += MINBPC(enc); + pos->columnNumber = (XML_Size)-1; + break; +-- +2.8.2 + diff --git a/package/expat/Config.in b/package/expat/Config.in new file mode 100644 index 0000000000..758fb7d516 --- /dev/null +++ b/package/expat/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_EXPAT + bool "expat" + help + The Expat XML Parser. + + http://expat.sourceforge.net diff --git a/package/expat/expat.hash b/package/expat/expat.hash new file mode 100644 index 0000000000..cfb3a6cad3 --- /dev/null +++ b/package/expat/expat.hash @@ -0,0 +1,5 @@ +# From https://sourceforge.net/projects/expat/files/expat/2.1.1/ +md5 7380a64a8e3a9d66a9887b01d0d7ea81 expat-2.1.1.tar.bz2 +sha1 ff91419882ac52151050dad0ee8190645fbeee08 expat-2.1.1.tar.bz2 +# Calculated based on the hashes above +sha256 aff584e5a2f759dcfc6d48671e9529f6afe1e30b0cd6a4cec200cbe3f793de67 expat-2.1.1.tar.bz2 diff --git a/package/expat/expat.mk b/package/expat/expat.mk new file mode 100644 index 0000000000..f00cbdc874 --- /dev/null +++ b/package/expat/expat.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# expat +# +################################################################################ + +EXPAT_VERSION = 2.1.1 +EXPAT_SITE = http://downloads.sourceforge.net/project/expat/expat/$(EXPAT_VERSION) +EXPAT_SOURCE = expat-$(EXPAT_VERSION).tar.bz2 +EXPAT_INSTALL_STAGING = YES +EXPAT_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) installlib +EXPAT_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) installlib +EXPAT_DEPENDENCIES = host-pkgconf +EXPAT_LICENSE = MIT +EXPAT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/expect/0001-enable-cross-compilation.patch b/package/expect/0001-enable-cross-compilation.patch new file mode 100644 index 0000000000..fd31a01f11 --- /dev/null +++ b/package/expect/0001-enable-cross-compilation.patch @@ -0,0 +1,120 @@ +From: Andrew Ruder +Subject: [PATCH] enable cross compilation for expect + +This patch was created by running ./configure on a modern Linux machine +and inserting the results into the cross compilation section of +each AC_MSG_CHECKING that bombed out with an error. + +Signed-off-by: Andrew Ruder +--- + +Index: expect-5.45/configure.in +=================================================================== +--- expect-5.45.orig/configure.in 2013-11-14 07:59:58.732100595 -0600 ++++ expect-5.45/configure.in 2013-11-14 07:59:58.732100595 -0600 +@@ -481,7 +481,7 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(no) + ) + + AC_MSG_CHECKING([if any value exists for WNOHANG]) +@@ -506,7 +506,8 @@ + AC_MSG_RESULT(no) + AC_DEFINE(WNOHANG_BACKUP_VALUE, 1) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(yes) ++ AC_DEFINE(WNOHANG_BACKUP_VALUE, 1) + ) + + # +@@ -574,7 +575,7 @@ + AC_DEFINE(REARM_SIG) + , + AC_MSG_RESULT(no) +-, AC_MSG_WARN([Expect can't be cross compiled]) ++, AC_MSG_RESULT(no) + ) + + # HPUX7 has trouble with the big cat so split it +@@ -725,7 +726,7 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(no) + ) + + # mach systems have include files for unimplemented features +@@ -749,7 +750,9 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_DEFINE(HAVE_TERMIO) ++ PTY_TYPE=termios ++ AC_MSG_RESULT(yes) + ) + + # now check for the new style ttys (not yet posix) +@@ -771,7 +774,9 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_DEFINE(HAVE_TERMIOS) ++ PTY_TYPE=termios ++ AC_MSG_RESULT(yes) + ) + fi + +@@ -794,7 +799,7 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(no) + ) + + AC_MSG_CHECKING([if TIOCGWINSZ in termios.h]) +@@ -816,7 +821,7 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(no) + ) + + # finally check for Cray style ttys +@@ -837,7 +842,7 @@ + , + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(no) + ) + + # +@@ -869,7 +874,9 @@ + AC_HAVE_FUNCS(getpty) + + # following test sets SETPGRP_VOID if setpgrp takes 0 args, else takes 2 +-AC_FUNC_SETPGRP ++cat >>expect_cf.h <<\_ACEOF ++#define SETPGRP_VOID 1 ++_ACEOF + + # + # check for timezones +@@ -889,7 +896,7 @@ + AC_MSG_RESULT(yes), + AC_MSG_RESULT(no) + , +- AC_MSG_ERROR([Expect can't be cross compiled]) ++ AC_MSG_RESULT(yes) + ) + + diff --git a/package/expect/0002-allow-tcl-build-directory.patch b/package/expect/0002-allow-tcl-build-directory.patch new file mode 100644 index 0000000000..83ede7acb6 --- /dev/null +++ b/package/expect/0002-allow-tcl-build-directory.patch @@ -0,0 +1,34 @@ +From: Andrew Ruder +Subject: [PATCH] Allow tcl build directory for linking + +Some small changes to use TCL_BUILD_LIB_SPEC instead of TCL_LIB_SPEC for +linking against tcl directly out of its build directory. + +Signed-off-by: Andrew Ruder +--- + +Index: expect-5.45/Makefile.in +=================================================================== +--- expect-5.45.orig/Makefile.in 2013-11-14 07:59:58.732100595 -0600 ++++ expect-5.45/Makefile.in 2013-11-14 07:59:58.732100595 -0600 +@@ -393,7 +393,7 @@ + @LDFLAGS_DEFAULT@ \ + -o expect exp_main_exp.o \ + @EXP_BUILD_LIB_SPEC@ \ +- @TCL_LIB_SPEC@ \ ++ @TCL_BUILD_LIB_SPEC@ \ + @TCL_DL_LIBS@ @PKG_LIBS@ @MATH_LIBS@ \ + @TCL_CC_SEARCH_FLAGS@ \ + @EXP_CC_SEARCH_FLAGS@ +Index: expect-5.45/tclconfig/tcl.m4 +=================================================================== +--- expect-5.45.orig/tclconfig/tcl.m4 2010-11-09 13:42:10.000000000 -0600 ++++ expect-5.45/tclconfig/tcl.m4 2013-11-14 08:02:08.424100580 -0600 +@@ -412,6 +412,7 @@ + AC_SUBST(TCL_LIB_FILE) + AC_SUBST(TCL_LIB_FLAG) + AC_SUBST(TCL_LIB_SPEC) ++ AC_SUBST(TCL_BUILD_LIB_SPEC) + + AC_SUBST(TCL_STUB_LIB_FILE) + AC_SUBST(TCL_STUB_LIB_FLAG) diff --git a/package/expect/Config.in b/package/expect/Config.in new file mode 100644 index 0000000000..5557f4aee6 --- /dev/null +++ b/package/expect/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_EXPECT + bool "expect" + help + Expect is a tool for automating interactive applications + such as telnet, ftp, passwd, fsck, rlogin, ssh, tip, etc. + + http://expect.sourceforge.net/ diff --git a/package/expect/expect.mk b/package/expect/expect.mk new file mode 100644 index 0000000000..d78ff6c208 --- /dev/null +++ b/package/expect/expect.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# expect +# +################################################################################ + +# Version 5.45.3 +EXPECT_VERSION = 2014-05-02 +EXPECT_SITE = cvs://expect.cvs.sourceforge.net:/cvsroot/expect +EXPECT_LICENSE = Public domain +EXPECT_LICENSE_FILES = README + +EXPECT_AUTORECONF = YES +EXPECT_DEPENDENCIES = tcl +EXPECT_CONF_OPTS = --with-tcl=$(BUILD_DIR)/tcl-$(TCL_VERSION)/unix + +# Since we don't want examples installed +EXPECT_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-binaries + +$(eval $(autotools-package)) diff --git a/package/expedite/Config.in b/package/expedite/Config.in new file mode 100644 index 0000000000..0bcf34349b --- /dev/null +++ b/package/expedite/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_EXPEDITE + bool "expedite" + depends on BR2_PACKAGE_EFL + depends on BR2_INSTALL_LIBSTDCPP + help + Expedite is the official Evas benchmark tool. It can test different + engines, such as X11, XRender, OpenGL (also ES variant), SDL, + DirectFB and so on. Its tests are quite extensive, trying to + reproduce real world usage cases. + +comment "expedite needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/expedite/expedite.mk b/package/expedite/expedite.mk new file mode 100644 index 0000000000..8754dc0da7 --- /dev/null +++ b/package/expedite/expedite.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# expedite +# +################################################################################ + +# efl-1.15 branch +EXPEDITE_VERSION = 3ce8b3f1451700f9a2da60c2e717c644220e2449 +EXPEDITE_SITE = http://git.enlightenment.org/tools/expedite.git +EXPEDITE_SITE_METHOD = git +EXPEDITE_LICENSE = BSD-2c +EXPEDITE_LICENSE_FILES = COPYING + +EXPEDITE_DEPENDENCIES = host-efl host-pkgconf efl + +# There is no configure script in the git tree. +EXPEDITE_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_EFL_X_XLIB),y) +EXPEDITE_CONF_OPTS += --with-x=$(STAGING_DIR) \ + --x-includes=$(STAGING_DIR)/usr/include \ + --x-libraries=$(STAGING_DIR)/usr/lib +endif + +$(eval $(autotools-package)) diff --git a/package/explorercanvas/Config.in b/package/explorercanvas/Config.in new file mode 100644 index 0000000000..9714a580ce --- /dev/null +++ b/package/explorercanvas/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_EXPLORERCANVAS + bool "explorercanvas" + help + Modern browsers like Firefox, Safari, Chrome and Opera + support the HTML5 canvas tag to allow 2D command-based + drawing. ExplorerCanvas brings the same functionality to + Internet Explorer ( +Date: Tue, 10 Mar 2015 15:10:35 -0300 +Subject: [PATCH] configure: add check for fallocate + +We need to check for fallocate() rather than just linux/falloc.h + +FALLOC_FL_PUNCH_HOLE since in uClibc we've got both but still not +fallocate() itself since it's only implemented in newer unreleased +versions. + +Status: sent upstream. + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 1 + + mkfs/f2fs_format_utils.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index ae451b8..900b84a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -68,6 +68,7 @@ AC_TYPE_SIZE_T + # Checks for library functions. + AC_FUNC_GETMNTENT + AC_CHECK_FUNCS_ONCE([ ++ fallocate + getmntent + memset + ]) +diff --git a/mkfs/f2fs_format_utils.c b/mkfs/f2fs_format_utils.c +index a0f85f5..ddeafeb 100644 +--- a/mkfs/f2fs_format_utils.c ++++ b/mkfs/f2fs_format_utils.c +@@ -46,7 +46,7 @@ int f2fs_trim_device() + #if defined(WITH_BLKDISCARD) && defined(BLKDISCARD) + MSG(0, "Info: Discarding device\n"); + if (S_ISREG(stat_buf.st_mode)) { +-#ifdef FALLOC_FL_PUNCH_HOLE ++#if defined(HAVE_FALLOCATE) && defined(FALLOC_FL_PUNCH_HOLE) + if (fallocate(config.fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, + range[0], range[1]) < 0) { + MSG(0, "Info: fallocate(PUNCH_HOLE|KEEP_SIZE) is failed\n"); +-- +2.0.5 + diff --git a/package/f2fs-tools/Config.in b/package/f2fs-tools/Config.in new file mode 100644 index 0000000000..6a98e79cd7 --- /dev/null +++ b/package/f2fs-tools/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_F2FS_TOOLS + bool "f2fs-tools" + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + depends on BR2_USE_WCHAR # util-linux + help + Tools for Flash-Friendly File System (F2FS) + + http://sourceforge.net/projects/f2fs-tools/ + +comment "f2fs-tools needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/f2fs-tools/f2fs-tools.mk b/package/f2fs-tools/f2fs-tools.mk new file mode 100644 index 0000000000..e5c4a540cb --- /dev/null +++ b/package/f2fs-tools/f2fs-tools.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# f2fs-tools +# +################################################################################ + +F2FS_TOOLS_VERSION = fd32210229d4ad7d1c916c74a0dfc150aae4c89e +F2FS_TOOLS_SITE = http://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git +F2FS_TOOLS_SITE_METHOD = git +F2FS_TOOLS_CONF_ENV = ac_cv_file__git=no +F2FS_TOOLS_DEPENDENCIES = host-pkgconf util-linux +# GIT version, shipped without configure +F2FS_TOOLS_AUTORECONF = YES +F2FS_TOOLS_INSTALL_STAGING = YES +F2FS_TOOLS_LICENSE = GPLv2 +F2FS_TOOLS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/faad2/Config.in b/package/faad2/Config.in new file mode 100644 index 0000000000..5b7fc1ca11 --- /dev/null +++ b/package/faad2/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_FAAD2 + bool "faad2" + help + FAAD2 is an open source MPEG-4 and MPEG-2 AAC decoder, + + http://www.audiocoding.com/faad2.html diff --git a/package/faad2/faad2.hash b/package/faad2/faad2.hash new file mode 100644 index 0000000000..691645b7c0 --- /dev/null +++ b/package/faad2/faad2.hash @@ -0,0 +1,4 @@ +# From http://sourceforge.net/projects/faac/files/faad2-src/faad2-2.7/ (used by upstream): +sha1 80eaaa5cc576c35dd28863767b795c50cbcc0511 faad2-2.7.tar.gz +# Locally computed +sha256 ee26ed1e177c0cd8fa8458a481b14a0b24ca0b51468c8b4c8b676fd3ceccd330 faad2-2.7.tar.gz diff --git a/package/faad2/faad2.mk b/package/faad2/faad2.mk new file mode 100644 index 0000000000..8c4fc1aae2 --- /dev/null +++ b/package/faad2/faad2.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# faad2 +# +################################################################################ + +FAAD2_VERSION = 2.7 +FAAD2_SITE = http://downloads.sourceforge.net/project/faac/faad2-src/faad2-$(FAAD2_VERSION) +FAAD2_LICENSE = GPLv2 +FAAD2_LICENSE_FILES = COPYING +# frontend/faad calls frexp() +FAAD2_CONF_ENV = LIBS=-lm +FAAD2_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/faifa/0001-sha2.c-explicitly-include-endian.h-for-BYTE_ORDER-ma.patch b/package/faifa/0001-sha2.c-explicitly-include-endian.h-for-BYTE_ORDER-ma.patch new file mode 100644 index 0000000000..79da360807 --- /dev/null +++ b/package/faifa/0001-sha2.c-explicitly-include-endian.h-for-BYTE_ORDER-ma.patch @@ -0,0 +1,32 @@ +From bfe43f4b4f249cee8c77059d7c89ebbc521d4d93 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Mon, 14 Sep 2015 22:25:12 +0200 +Subject: [PATCH] sha2.c: explicitly include endian.h for BYTE_ORDER macro + +Fixes a build issue with the musl C library, which doesn't indirectly +include endian.h from any of the included system headers: + +http://autobuild.buildroot.net/results/17b/17bde543db253c008079b04c5e341f804160f59c/build-end.log + +Upstream-Status: submitted (https://github.com/ffainelli/faifa/pull/12) + +Signed-off-by: Peter Korsgaard +--- + sha2.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sha2.c b/sha2.c +index f2f5132..4c8a72d 100644 +--- a/sha2.c ++++ b/sha2.c +@@ -40,6 +40,7 @@ + #include + #include + ++#include "endian.h" + #include "sha2.h" + + /* +-- +2.1.4 + diff --git a/package/faifa/0002-hpav_cfg.c-do-not-include-linux-if_ether.h-for-musl-.patch b/package/faifa/0002-hpav_cfg.c-do-not-include-linux-if_ether.h-for-musl-.patch new file mode 100644 index 0000000000..6f340c3509 --- /dev/null +++ b/package/faifa/0002-hpav_cfg.c-do-not-include-linux-if_ether.h-for-musl-.patch @@ -0,0 +1,32 @@ +From 36eed08a3783df6bb8d92d3c80cd47d0660eeb12 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 30 Jan 2016 16:27:37 +0100 +Subject: [PATCH 1/1] hpav_cfg.c: do not include linux/if_ether.h for musl + compatibility + +Fixes a build issue with the musl C library +http://autobuild.buildroot.net/results/dc6/dc6e4d7327d2031ef921cccd814605dec73a0f9c/build-end.log + +Patch sent upstream: https://github.com/ffainelli/faifa/pull/13 + +Signed-off-by: Bernd Kuhls +--- + hpav_cfg.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/hpav_cfg.c b/hpav_cfg.c +index 7cc53af..45d3f0a 100644 +--- a/hpav_cfg.c ++++ b/hpav_cfg.c +@@ -53,8 +53,6 @@ + #include + #include + +-#include +- + #include "homeplug_av.h" + #include "crypto.h" + +-- +2.7.0.rc3 + diff --git a/package/faifa/Config.in b/package/faifa/Config.in new file mode 100644 index 0000000000..de2cc7979e --- /dev/null +++ b/package/faifa/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_FAIFA + bool "faifa" + select BR2_PACKAGE_LIBPCAP + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Faifa can configure any Intellon-based Power Line + Communication device using Intellon INT5000 and INT6000 + series chips (6000 and 6300 chips). It supports all + Intellon-specific management and control frames as well as + standard management frames. + + https://dev.open-plc.org + +comment "faifa needs a toolchain w/ dynamic library, threads" + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/faifa/faifa.mk b/package/faifa/faifa.mk new file mode 100644 index 0000000000..a56a8c0332 --- /dev/null +++ b/package/faifa/faifa.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# faifa +# +################################################################################ + +FAIFA_VERSION = v0.1 +FAIFA_SITE = $(call github,ffainelli,faifa,$(FAIFA_VERSION)) +FAIFA_INSTALL_STAGING = YES +FAIFA_DEPENDENCIES = libpcap host-autoconf +FAIFA_LICENSE = BSD-3c +FAIFA_LICENSE_FILES = COPYING + +FAIFA_MAKE_OPTS += GIT_REV=$(FAIFA_VERSION) + +# This package uses autoconf, but not automake, so we need to call +# their special autogen.sh script, and have custom target and staging +# installation commands. + +define FAIFA_RUN_AUTOGEN + cd $(@D) && PATH=$(BR_PATH) ./autogen.sh +endef +FAIFA_PRE_CONFIGURE_HOOKS += FAIFA_RUN_AUTOGEN + +define FAIFA_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + PREFIX=/usr \ + STRIP=/bin/true \ + DESTDIR=$(TARGET_DIR) \ + install +endef + +define FAIFA_INSTALL_STAGING_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + PREFIX=/usr \ + STRIP=/bin/true \ + DESTDIR=$(STAGING_DIR) \ + install +endef + +$(eval $(autotools-package)) diff --git a/package/fakeroot/fakeroot.hash b/package/fakeroot/fakeroot.hash new file mode 100644 index 0000000000..f0d436e5c3 --- /dev/null +++ b/package/fakeroot/fakeroot.hash @@ -0,0 +1,4 @@ +# From http://snapshot.debian.org/package/fakeroot/1.20.2-1/ +sha1 367040df07043edb630942b21939e493f3fad888 fakeroot_1.20.2.orig.tar.bz2 +# Calculated based on the hash above +sha256 7c0a164d19db3efa9e802e0fc7cdfeff70ec6d26cdbdc4338c9c2823c5ea230c fakeroot_1.20.2.orig.tar.bz2 diff --git a/package/fakeroot/fakeroot.mk b/package/fakeroot/fakeroot.mk new file mode 100644 index 0000000000..168cd13a48 --- /dev/null +++ b/package/fakeroot/fakeroot.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# fakeroot +# +################################################################################ + +FAKEROOT_VERSION = 1.20.2 +FAKEROOT_SOURCE = fakeroot_$(FAKEROOT_VERSION).orig.tar.bz2 +FAKEROOT_SITE = http://snapshot.debian.org/archive/debian/20141005T221953Z/pool/main/f/fakeroot +# Force capabilities detection off +# For now these are process capabilities (faked) rather than file +# so they're of no real use +HOST_FAKEROOT_CONF_ENV = \ + ac_cv_header_sys_capability_h=no \ + ac_cv_func_capset=no + +FAKEROOT_LICENSE = GPLv3+ +FAKEROOT_LICENSE_FILES = COPYING + +$(eval $(host-autotools-package)) diff --git a/package/faketime/Config.in.host b/package/faketime/Config.in.host new file mode 100644 index 0000000000..0ebb9638cf --- /dev/null +++ b/package/faketime/Config.in.host @@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_FAKETIME + bool "host faketime" + help + Faketime reports faked system time to programs without + having to change the system-wide time. + + https://github.com/wolfcw/libfaketime diff --git a/package/faketime/faketime.mk b/package/faketime/faketime.mk new file mode 100644 index 0000000000..292fe175cb --- /dev/null +++ b/package/faketime/faketime.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libfaketime +# +################################################################################ + +FAKETIME_VERSION = v0.9.6 +FAKETIME_SITE = $(call github,wolfcw,libfaketime,$(FAKETIME_VERSION)) +FAKETIME_LICENSE = GPLv2 +FAKETIME_LICENSE_FILES = COPYING + +define HOST_FAKETIME_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr +endef + +define HOST_FAKETIME_INSTALL_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR)/usr install +endef + +$(eval $(host-generic-package)) diff --git a/package/fan-ctrl/Config.in b/package/fan-ctrl/Config.in new file mode 100644 index 0000000000..869631683b --- /dev/null +++ b/package/fan-ctrl/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_FAN_CTRL + bool "fan-ctrl" + depends on BR2_USE_MMU # fork() + help + Fan-ctrl is a little daemon that controls the speed of one + or more system or CPU fans. It does so by monitoring + temperature inputs and selecting a fan speed from an array + of available speeds based on a set of temperature + thresholds. + + http://fan-ctrl.sourceforge.net/ diff --git a/package/fan-ctrl/fan-ctrl.hash b/package/fan-ctrl/fan-ctrl.hash new file mode 100644 index 0000000000..0bd5d60977 --- /dev/null +++ b/package/fan-ctrl/fan-ctrl.hash @@ -0,0 +1,2 @@ +# Locally computed +sha1 d8ba5bac15e90c36a4e908ca1c98fac83bf702ea fan-ctrl.c?revision=1.3 diff --git a/package/fan-ctrl/fan-ctrl.mk b/package/fan-ctrl/fan-ctrl.mk new file mode 100644 index 0000000000..4232286120 --- /dev/null +++ b/package/fan-ctrl/fan-ctrl.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# fan-ctrl +# +################################################################################ + +# no release, so grab .c file directly from viewvc +FAN_CTRL_VERSION = 1.3 +FAN_CTRL_SOURCE = fan-ctrl.c?revision=$(FAN_CTRL_VERSION) +FAN_CTRL_SITE = http://fan-ctrl.cvs.sourceforge.net/viewvc/fan-ctrl/fan-ctrl +FAN_CTRL_LICENSE = GPLv2+ +FAN_CTRL_LICENSE_FILES = fan-ctrl.c + +define FAN_CTRL_EXTRACT_CMDS + cp $(DL_DIR)/$(FAN_CTRL_SOURCE) $(@D)/fan-ctrl.c +endef + +define FAN_CTRL_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + $(@D)/fan-ctrl.c -o $(@D)/fan-ctrl +endef + +define FAN_CTRL_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/fan-ctrl $(TARGET_DIR)/usr/sbin/fan-ctrl +endef + +$(eval $(generic-package)) diff --git a/package/fastd/0001-cmake-use-INTERPROCEDURAL_OPTIMIZATION-target-proper.patch b/package/fastd/0001-cmake-use-INTERPROCEDURAL_OPTIMIZATION-target-proper.patch new file mode 100644 index 0000000000..489c7269f8 --- /dev/null +++ b/package/fastd/0001-cmake-use-INTERPROCEDURAL_OPTIMIZATION-target-proper.patch @@ -0,0 +1,69 @@ +From: Alexander Dahl +Date: Wed, 28 Oct 2015 16:04:13 +0100 +Subject: [PATCH] cmake: use INTERPROCEDURAL_OPTIMIZATION target property + +Instead of hacking on compiler flags use the cmake way for handling +interprocedural optimization. Tests showed cmake currently ignores this +for gcc and clang, at least on Debian Wheezy and Jessie. This actually +results in no interprocedural optimization for the moment. However it +allows to compile fastd against a toolchain without LTO support, which +was broken because of a hack included here for finding binutils. + +According to the upstream author of fastd the main reason for enabling +LTO was binary size on an OpenWRT target for Freifunk Gluon, where they +have very few space left on devices with only 4 MB flash memory. + +Signed-off-by: Alexander Dahl +--- + cmake/checks.cmake | 14 -------------- + src/CMakeLists.txt | 9 +++++++++ + 2 files changed, 9 insertions(+), 14 deletions(-) + +diff --git a/cmake/checks.cmake b/cmake/checks.cmake +index 27c073f..8a671a1 100644 +--- a/cmake/checks.cmake ++++ b/cmake/checks.cmake +@@ -10,20 +10,6 @@ if(ARCH_X86 OR ARCH_X86_64) + endif(ARCH_X86 OR ARCH_X86_64) + + +- +-if(ENABLE_LTO) +- set(CFLAGS_LTO "-flto") +- set(CFLAGS_NO_LTO "-fno-lto") +- +- check_c_compiler_flag("-fwhole-program" HAVE_FLAG_WHOLE_PROGRAM) +- if(HAVE_FLAG_WHOLE_PROGRAM) +- set(LDFLAGS_LTO "-flto -fwhole-program") +- else(HAVE_FLAG_WHOLE_PROGRAM) +- set(LDFLAGS_LTO "-flto") +- endif(HAVE_FLAG_WHOLE_PROGRAM) +-endif(ENABLE_LTO) +- +- + check_c_source_compiles(" + #include + #include +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 829b3ab..7612b40 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -48,6 +48,15 @@ add_executable(fastd + set_property(TARGET fastd PROPERTY COMPILE_FLAGS "${FASTD_CFLAGS}") + set_property(TARGET fastd PROPERTY LINK_FLAGS "${PTHREAD_LDFLAGS} ${LIBUECC_LDFLAGS_OTHER} ${NACL_LDFLAGS_OTHER} ${JSON_C_LDFLAGS_OTHER} ${LDFLAGS_LTO}") + set_property(TARGET fastd APPEND PROPERTY INCLUDE_DIRECTORIES ${LIBCAP_INCLUDE_DIR} ${NACL_INCLUDE_DIRS} ${JSON_C_INCLUDE_DIR}) ++if(ENABLE_LTO) ++ set_target_properties(fastd PROPERTIES ++ INTERPROCEDURAL_OPTIMIZATION ON ++ ) ++else(ENABLE_LTO) ++ set_target_properties(fastd PROPERTIES ++ INTERPROCEDURAL_OPTIMIZATION OFF ++ ) ++endif(ENABLE_LTO) + target_link_libraries(fastd protocols methods ciphers macs ${RT_LIBRARY} ${LIBCAP_LIBRARY} ${LIBUECC_LIBRARIES} ${NACL_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARY} ${JSON_C_LIBRARIES}) + + add_dependencies(fastd version) +-- +2.1.4 + diff --git a/package/fastd/Config.in b/package/fastd/Config.in new file mode 100644 index 0000000000..546d449471 --- /dev/null +++ b/package/fastd/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_FASTD + bool "fastd" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # libuecc + select BR2_PACKAGE_LIBUECC + select BR2_PACKAGE_LIBSODIUM + select BR2_PACKAGE_LIBCAP + help + Fast and Secure Tunneling Daemon + + https://projects.universe-factory.net/projects/fastd/wiki + +if BR2_PACKAGE_FASTD + +config BR2_PACKAGE_FASTD_STATUS_SOCKET + bool "status socket support" + default y + select BR2_PACKAGE_JSON_C + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c + help + Enable support for a socket to get fastd's status. + +endif + +comment "fastd needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS \ + || BR2_STATIC_LIBS diff --git a/package/fastd/fastd.hash b/package/fastd/fastd.hash new file mode 100644 index 0000000000..3c6a99e986 --- /dev/null +++ b/package/fastd/fastd.hash @@ -0,0 +1,4 @@ +# from https://projects.universe-factory.net/projects/fastd/files +md5 e53236d3049f64f7955ad9556da099eb fastd-18.tar.xz +# computed locally +sha256 714ff09d7bd75f79783f744f6f8c5af2fe456c8cf876feaa704c205a73e043c9 fastd-18.tar.xz diff --git a/package/fastd/fastd.mk b/package/fastd/fastd.mk new file mode 100644 index 0000000000..0e510db879 --- /dev/null +++ b/package/fastd/fastd.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# fastd +# +################################################################################ + +FASTD_VERSION = 18 +FASTD_SITE = https://projects.universe-factory.net/attachments/download/86 +FASTD_SOURCE = fastd-$(FASTD_VERSION).tar.xz +FASTD_LICENSE = BSD-2c +FASTD_LICENSE_FILES = COPYRIGHT +FASTD_CONF_OPTS = -DENABLE_LIBSODIUM=ON +FASTD_DEPENDENCIES = host-bison host-pkgconf libuecc libsodium libcap + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +FASTD_CONF_OPTS += -DENABLE_OPENSSL=ON +FASTD_DEPENDENCIES += openssl +else +FASTD_CONF_OPTS += -DENABLE_OPENSSL=OFF +endif + +ifeq ($(BR2_PACKAGE_FASTD_STATUS_SOCKET),y) +FASTD_CONF_OPTS += -DWITH_STATUS_SOCKET=ON +FASTD_DEPENDENCIES += json-c +else +FASTD_CONF_OPTS += -DWITH_STATUS_SOCKET=OFF +endif + +ifeq ($(BR2_INIT_SYSTEMD),y) +FASTD_CONF_OPTS += -DENABLE_SYSTEMD=ON +else +FASTD_CONF_OPTS += -DENABLE_SYSTEMD=OFF +endif + +ifeq ($(BR2_GCC_ENABLE_LTO),y) +FASTD_CONF_OPTS += -DENABLE_LTO=ON +else +FASTD_CONF_OPTS += -DENABLE_LTO=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/fb-test-app/Config.in b/package/fb-test-app/Config.in new file mode 100644 index 0000000000..23b5568d80 --- /dev/null +++ b/package/fb-test-app/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_FB_TEST_APP + bool "fb-test-app" + help + Test suite for Linux framebuffer. + + https://github.com/prpplague/fb-test-app diff --git a/package/fb-test-app/fb-test-app.mk b/package/fb-test-app/fb-test-app.mk new file mode 100644 index 0000000000..9cd0aece44 --- /dev/null +++ b/package/fb-test-app/fb-test-app.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# fb-test-app +# +################################################################################ + +FB_TEST_APP_VERSION = rosetta-1.1.0 +FB_TEST_APP_SITE = $(call github,prpplague,fb-test-app,$(FB_TEST_APP_VERSION)) +FB_TEST_APP_LICENSE = GPLv2 +FB_TEST_APP_LICENSE_FILES = COPYING + +define FB_TEST_APP_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all +endef + +define FB_TEST_APP_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/perf $(TARGET_DIR)/usr/bin/fb-test-perf + $(INSTALL) -D -m 0755 $(@D)/rect $(TARGET_DIR)/usr/bin/fb-test-rect + $(INSTALL) -D -m 0755 $(@D)/fb-test $(TARGET_DIR)/usr/bin/fb-test + $(INSTALL) -D -m 0755 $(@D)/offset $(TARGET_DIR)/usr/bin/fb-test-offset +endef + +$(eval $(generic-package)) diff --git a/package/fbdump/Config.in b/package/fbdump/Config.in new file mode 100644 index 0000000000..982448dd59 --- /dev/null +++ b/package/fbdump/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_FBDUMP + bool "fbdump (Framebuffer Capture Tool)" + help + fbdump is a simple tool to capture snapshots from the Linux kernel + framebuffer device and write them out as a PPM file. Currently, + most packed-pixel framebuffer formats and the vga16 framebuffer + are supported. + + http://www.rcdrummond.net/fbdump diff --git a/package/fbdump/fbdump.hash b/package/fbdump/fbdump.hash new file mode 100644 index 0000000000..15cc8392d6 --- /dev/null +++ b/package/fbdump/fbdump.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c4d521a86229b3106cf69786008ad94f899da5288a19a067deae84951880722d fbdump-0.4.2.tar.gz diff --git a/package/fbdump/fbdump.mk b/package/fbdump/fbdump.mk new file mode 100644 index 0000000000..9295acd0f5 --- /dev/null +++ b/package/fbdump/fbdump.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# fbdump +# +################################################################################ + +FBDUMP_VERSION = 0.4.2 +FBDUMP_SITE = http://www.rcdrummond.net/fbdump +FBDUMP_LICENSE = GPLv2 +FBDUMP_LICENSE_FILES = COPYING + +# The VGA16 specific feature of fbdump doesn't make much sense outside +# of the x86/x86-64 architectures, and causes build problems on some +# architectures as outw() is not always available. +ifeq ($(BR2_i386)$(BR2_x86_64),y) +FBDUMP_CONF_OPTS += --enable-vga16fb +else +FBDUMP_CONF_OPTS += --disable-vga16fb +endif + +$(eval $(autotools-package)) diff --git a/package/fbgrab/0001-fix-static-build.patch b/package/fbgrab/0001-fix-static-build.patch new file mode 100644 index 0000000000..fe5ae2cab1 --- /dev/null +++ b/package/fbgrab/0001-fix-static-build.patch @@ -0,0 +1,21 @@ +Fix static build + +fbgrab links against libpng, which depends on libm. For shared library +builds, there is nothing special to do about this, but for static +library builds, it is necessary to pass -lm when linking fbgrab. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -12,7 +12,7 @@ + all: fbgrab fbgrab.1.gz + + fbgrab: fbgrab.c +- $(CC) -g -Wall $(CFLAGS) $(LDFLAGS) $< -lpng -lz -o $@ ++ $(CC) -g -Wall $(CFLAGS) $(LDFLAGS) $< -lpng -lz -lm -o $@ + + fbgrab.1.gz: fbgrab.1.man + $(GZIP) $(GZIPFLAGS) $< > $@ diff --git a/package/fbgrab/Config.in b/package/fbgrab/Config.in new file mode 100644 index 0000000000..f3b29d9f99 --- /dev/null +++ b/package/fbgrab/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_FBGRAB + bool "fbgrab" + select BR2_PACKAGE_LIBPNG + help + FBGrab is a framebuffer screenshot program, capturing the linux + frambuffer and converting it to a png-picture. + + http://fbgrab.monells.se/ diff --git a/package/fbgrab/fbgrab.hash b/package/fbgrab/fbgrab.hash new file mode 100644 index 0000000000..de3bc1ffd7 --- /dev/null +++ b/package/fbgrab/fbgrab.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 5fab478cbf8731fbacefaa76236a8f8b38ccff920c53b3a8253bc35509fba8ed fbgrab-1.3.tar.gz diff --git a/package/fbgrab/fbgrab.mk b/package/fbgrab/fbgrab.mk new file mode 100644 index 0000000000..4455423126 --- /dev/null +++ b/package/fbgrab/fbgrab.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# fbgrab +# +################################################################################ + +FBGRAB_VERSION = 1.3 +FBGRAB_SITE = http://fbgrab.monells.se +FBGRAB_DEPENDENCIES = libpng +FBGRAB_LICENSE = GPLv2 +FBGRAB_LICENSE_FILES = COPYING + +define FBGRAB_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define FBGRAB_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/fbgrab $(TARGET_DIR)/usr/bin/fbgrab +endef + +$(eval $(generic-package)) diff --git a/package/fbset/Config.in b/package/fbset/Config.in new file mode 100644 index 0000000000..96d090ecf8 --- /dev/null +++ b/package/fbset/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_FBSET + bool "fbset" + help + Fbset is a system utility to show or change the settings of the frame + buffer device. The frame buffer device provides a simple and unique + interface to access different kinds of graphic displays. + + http://users.telenet.be/geertu/Linux/fbdev/ diff --git a/package/fbset/fbset.hash b/package/fbset/fbset.hash new file mode 100644 index 0000000000..ca8cc6d1f0 --- /dev/null +++ b/package/fbset/fbset.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 40ff4ab0247b75138a0887ed40f81c1a6184f340b77126c16d074b1075b41c20 fbset-2.1.tar.gz diff --git a/package/fbset/fbset.mk b/package/fbset/fbset.mk new file mode 100644 index 0000000000..16581c4183 --- /dev/null +++ b/package/fbset/fbset.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# fbset +# +################################################################################ + +FBSET_VERSION = 2.1 +FBSET_SITE = http://users.telenet.be/geertu/Linux/fbdev +FBSET_DEPENDENCIES = host-bison host-flex +FBSET_LICENSE = GPLv2 + +# Make sure full fbset wins over busybox fbset +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +FBSET_DEPENDENCIES += busybox +endif + +define FBSET_BUILD_CMDS + $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define FBSET_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/fbset $(TARGET_DIR)/usr/sbin/fbset +endef + +$(eval $(generic-package)) diff --git a/package/fbterm/0001-fbio.cpp-improxy.cpp-fbterm.cpp-fix-musl-compile.patch b/package/fbterm/0001-fbio.cpp-improxy.cpp-fbterm.cpp-fix-musl-compile.patch new file mode 100644 index 0000000000..27e1e91068 --- /dev/null +++ b/package/fbterm/0001-fbio.cpp-improxy.cpp-fbterm.cpp-fix-musl-compile.patch @@ -0,0 +1,70 @@ +From 1072d60c6c8f1f51feb740527a8a056bfead9318 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 8 Oct 2015 19:53:47 +0200 +Subject: [PATCH] fbio.cpp, improxy.cpp, fbterm.cpp: fix musl compile +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- add missing include, fixes: + + fbio.cpp:33:8: error: ‘fd_set’ does not name a type + static fd_set fds; + + improxy.cpp:439:3: error: ‘fd_set’ was not declared in this scope + +- add missing WAIT_ANY define, fixes: + + fbterm.cpp: In member function ‘void FbTerm::processSignal(u32)’: + fbterm.cpp:212:22: error: ‘WAIT_ANY’ was not declared in this scope + s32 pid = waitpid(WAIT_ANY, 0, WNOHANG); + +Signed-off-by: Peter Seiderer +--- + src/fbio.cpp | 1 + + src/fbterm.cpp | 4 ++++ + src/improxy.cpp | 1 + + 3 files changed, 6 insertions(+) + +diff --git a/src/fbio.cpp b/src/fbio.cpp +index e5afc44..88c632c 100644 +--- a/src/fbio.cpp ++++ b/src/fbio.cpp +@@ -30,6 +30,7 @@ + #define NR_EPOLL_FDS 10 + s32 epollFd; + #else ++#include + static fd_set fds; + static u32 maxfd = 0; + #endif +diff --git a/src/fbterm.cpp b/src/fbterm.cpp +index 38d4014..60288e4 100644 +--- a/src/fbterm.cpp ++++ b/src/fbterm.cpp +@@ -37,6 +37,10 @@ + #include "input_key.h" + #include "mouse.h" + ++#ifndef WAIT_ANY ++#define WAIT_ANY (-1) ++#endif ++ + #ifdef HAVE_SIGNALFD + // offered by some systems has bug with g++ + #include "signalfd.h" +diff --git a/src/improxy.cpp b/src/improxy.cpp +index 3d03e66..4e046d2 100644 +--- a/src/improxy.cpp ++++ b/src/improxy.cpp +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include "improxy.h" + #include "immessage.h" +-- +2.1.4 + diff --git a/package/fbterm/0002-mouse.cpp-fix-musl-compile.patch b/package/fbterm/0002-mouse.cpp-fix-musl-compile.patch new file mode 100644 index 0000000000..5182d8ba61 --- /dev/null +++ b/package/fbterm/0002-mouse.cpp-fix-musl-compile.patch @@ -0,0 +1,30 @@ +From a34dba99aff2994269ee347da67feb7ede9b1a67 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 18 Feb 2016 22:32:38 +0100 +Subject: [PATCH] mouse.cpp: fix musl compile + +Add missing include, fixes: + + mouse.cpp:58:37: error: 'memset' was not declared in this scope + mouse.cpp:60:64: error: 'strncpy' was not declared in this scope + +Signed-off-by: Peter Seiderer +--- + src/mouse.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/mouse.cpp b/src/mouse.cpp +index 0435dd9..f173137 100644 +--- a/src/mouse.cpp ++++ b/src/mouse.cpp +@@ -27,6 +27,7 @@ DEFINE_INSTANCE(Mouse) + #include + #include + #include ++#include + #include + #include + #include +-- +2.1.4 + diff --git a/package/fbterm/Config.in b/package/fbterm/Config.in new file mode 100644 index 0000000000..2c9d6d4573 --- /dev/null +++ b/package/fbterm/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_FBTERM + bool "fbterm" + depends on (BR2_INSTALL_LIBSTDCPP && BR2_ENABLE_LOCALE && BR2_USE_WCHAR) + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_LIBERATION + help + fbterm is a fast terminal emulator for Linux with frame buffer + device or VESA video card. + + http://code.google.com/p/fbterm/ + +comment "fbterm needs a toolchain w/ C++, wchar, locale" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_ENABLE_LOCALE && BR2_USE_WCHAR) diff --git a/package/fbterm/fbterm.hash b/package/fbterm/fbterm.hash new file mode 100644 index 0000000000..20a3e8f083 --- /dev/null +++ b/package/fbterm/fbterm.hash @@ -0,0 +1,2 @@ +# From http://code.google.com/p/fbterm/downloads/detail?name=fbterm-1.7.0.tar.gz&can=2&q= +sha1 dc7b7ff29212c1551f35bf7a50967454d3b8c67c fbterm-1.7.0.tar.gz diff --git a/package/fbterm/fbterm.mk b/package/fbterm/fbterm.mk new file mode 100644 index 0000000000..7a424a5e9b --- /dev/null +++ b/package/fbterm/fbterm.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# fbterm +# +################################################################################ + +FBTERM_VERSION = 1.7.0 +FBTERM_SITE = http://fbterm.googlecode.com/files +FBTERM_LICENSE = GPLv2+ +FBTERM_LICENSE_FILES = COPYING +FBTERM_DEPENDENCIES = fontconfig liberation + +ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy) +# fontconfig uses pthreads if available, but fbterm forgets to link +# with it breaking static builds +FBTERM_CONF_ENV += LIBS='-lpthread' +endif + +ifeq ($(BR2_PACKAGE_GPM),y) +FBTERM_DEPENDENCIES += gpm +FBTERM_CONF_OPTS += --enable-gpm +else +FBTERM_CONF_OPTS += --disable-gpm +endif + +$(eval $(autotools-package)) diff --git a/package/fbtft/Config.in b/package/fbtft/Config.in new file mode 100644 index 0000000000..0a4de19091 --- /dev/null +++ b/package/fbtft/Config.in @@ -0,0 +1,13 @@ +# Prompt-less option, because this package is not doing anything +# except downloading the FB TFT sources. The real work is done by a +# Linux extension. +config BR2_PACKAGE_FBTFT + bool + depends on BR2_LINUX_KERNEL + help + Linux Framebuffer drivers for small TFT LCD display modules, + e.g. Adafruit PiTFT displays for Raspberry Pi. + + This is only the download helper for the kernel patch. + + https://github.com/notro/fbtft diff --git a/package/fbtft/fbtft.mk b/package/fbtft/fbtft.mk new file mode 100644 index 0000000000..913627dfc9 --- /dev/null +++ b/package/fbtft/fbtft.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# fbtft +# +################################################################################ + +FBTFT_VERSION = 274035404701245e7491c0c6471c5b72ade4d491 +FBTFT_SITE = $(call github,notro,fbtft,$(FBTFT_VERSION)) +FBTFT_LICENSE = GPLv2 + +$(eval $(generic-package)) diff --git a/package/fbv/0002-cross.patch b/package/fbv/0002-cross.patch new file mode 100644 index 0000000000..ab5f0fb48c --- /dev/null +++ b/package/fbv/0002-cross.patch @@ -0,0 +1,44 @@ +diff -urpN fbv-1.0b.orig/configure fbv-1.0b/configure +--- fbv-1.0b.orig/configure 2004-09-07 13:29:27.000000000 +0200 ++++ fbv-1.0b/configure 2008-04-24 10:52:37.000000000 +0200 +@@ -80,6 +80,7 @@ while true ; do + esac + done + ++[ -z "$CC" ] && CC=cc + [ -z "$prefix" ] && prefix="/usr/local" + [ -z "$bindir" ] && bindir="${prefix}/bin" + [ -z "$mandir" ] && mandir="${prefix}/man" +@@ -106,12 +107,12 @@ xdir="/usr/X11R6" + ungif="no" + echo "libungif check" >>./config.log + echo " 1st:" >>./config.log +-cc 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif $libs ++$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif $libs + if [ -e \$\$~test ]; then + libs="-lungif $libs" ; ungif="yes" + else + echo " 2nd: -lX11 -L$xdir/lib" >>./config.log +- cc 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif -lX11 -L$xdir/lib $libs ++ $CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif -lX11 -L$xdir/lib $libs + if [ -e \$\$~test ]; then + libs="-lungif -lX11 -L$xdir/lib $libs" ; ungif="yes" + fi +@@ -124,7 +125,7 @@ echo "libungif: $ungif" >> ./config.log + echo -n "checking for libjpeg presence... " + if [ "$jpeg" != "disabled" ]; then + jpeg="no" +-cc 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -ljpeg $libs ++$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -ljpeg $libs + if [ -e \$\$~test ]; then + libs="-ljpeg $libs" ; jpeg="yes" + fi +@@ -135,7 +136,7 @@ echo "libjpeg: $jpeg" >> ./config.log + echo -n "checking for libpng presence... " + if [ "$png" != "disabled" ]; then + png="no" +-cc 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lpng $libs ++$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lpng $libs + if [ -e \$\$~test ]; then + libs="-lpng $libs" ; png="yes" + fi diff --git a/package/fbv/0003-fix-24bpp-support-on-big-endian.patch b/package/fbv/0003-fix-24bpp-support-on-big-endian.patch new file mode 100644 index 0000000000..23185ac46b --- /dev/null +++ b/package/fbv/0003-fix-24bpp-support-on-big-endian.patch @@ -0,0 +1,32 @@ +diff -upr a/fb_display.c b/fb_display.c +--- a/fb_display.c 2007-06-01 16:52:45.000000000 +0200 ++++ b/fb_display.c 2007-06-01 16:51:43.000000000 +0200 +@@ -307,7 +307,7 @@ void* convertRGB2FB(int fh, unsigned cha + { + unsigned long i; + void *fbbuff = NULL; +- u_int8_t *c_fbbuff; ++ u_int8_t *c_fbbuff; + u_int16_t *s_fbbuff; + u_int32_t *i_fbbuff; + +@@ -335,6 +335,16 @@ void* convertRGB2FB(int fh, unsigned cha + fbbuff = (void *) s_fbbuff; + break; + case 24: ++ *cpp = 3; ++ c_fbbuff = (unsigned char *) malloc(count * 3 * sizeof(unsigned char)); ++ for(i = 0; i < (3 * count); i += 3) { ++ /* Big endian framebuffer. */ ++ c_fbbuff[i] = rgbbuff[i+2]; ++ c_fbbuff[i+1] = rgbbuff[i+1]; ++ c_fbbuff[i+2] = rgbbuff[i]; ++ } ++ fbbuff = (void *) c_fbbuff; ++ break; + case 32: + *cpp = 4; + i_fbbuff = (unsigned int *) malloc(count * sizeof(unsigned int)); +Only in build_avr32/fbv-1.0b-modified: .fb_display.c.swp +Binary files build_avr32/fbv-1.0b/fb_display.o and build_avr32/fbv-1.0b-modified/fb_display.o differ +Binary files build_avr32/fbv-1.0b/fbv and build_avr32/fbv-1.0b-modified/fbv differ diff --git a/package/fbv/0004-fix-bgr555.patch b/package/fbv/0004-fix-bgr555.patch new file mode 100644 index 0000000000..8f185f0a37 --- /dev/null +++ b/package/fbv/0004-fix-bgr555.patch @@ -0,0 +1,64 @@ +[PATCH] fbv: support bgr555 format + +Signed-off-by: Josh.Wu +diff -Naur fbv-1.0b-ori/fb_display.c fbv-1.0b/fb_display.c +--- fbv-1.0b-ori/fb_display.c 2010-04-02 09:38:15.000000000 +0800 ++++ fbv-1.0b/fb_display.c 2010-04-01 18:54:15.000000000 +0800 +@@ -297,6 +297,14 @@ + ((b >> 3) & 31) ); + } + ++inline static unsigned short make15color_bgr(unsigned char r, unsigned char g, unsigned char b) ++{ ++ return ( ++ (((b >> 3) & 31) << 10) | ++ (((g >> 3) & 31) << 5) | ++ ((r >> 3) & 31) ); ++} ++ + inline static unsigned short make16color(unsigned char r, unsigned char g, unsigned char b) + { + return ( +@@ -313,6 +321,14 @@ + u_int16_t *s_fbbuff; + u_int32_t *i_fbbuff; + ++ int is_bgr555 = 0; ++ struct fb_var_screeninfo var; ++ getVarScreenInfo(fh, &var); ++ if(var.red.offset == 0 && ++ var.green.offset == 5 && ++ var.blue.offset == 10) ++ is_bgr555 = 1; ++ + switch(bpp) + { + case 8: +@@ -325,15 +341,23 @@ + case 15: + *cpp = 2; + s_fbbuff = (unsigned short *) malloc(count * sizeof(unsigned short)); +- for(i = 0; i < count ; i++) +- s_fbbuff[i] = make15color(rgbbuff[i*3], rgbbuff[i*3+1], rgbbuff[i*3+2]); ++ if(is_bgr555) ++ for(i = 0; i < count ; i++) ++ s_fbbuff[i] = make15color_bgr(rgbbuff[i*3], rgbbuff[i*3+1], rgbbuff[i*3+2]); ++ else ++ for(i = 0; i < count ; i++) ++ s_fbbuff[i] = make15color(rgbbuff[i*3], rgbbuff[i*3+1], rgbbuff[i*3+2]); + fbbuff = (void *) s_fbbuff; + break; + case 16: + *cpp = 2; + s_fbbuff = (unsigned short *) malloc(count * sizeof(unsigned short)); +- for(i = 0; i < count ; i++) +- s_fbbuff[i] = make16color(rgbbuff[i*3], rgbbuff[i*3+1], rgbbuff[i*3+2]); ++ if(is_bgr555) ++ for(i = 0; i < count ; i++) ++ s_fbbuff[i] = make15color_bgr(rgbbuff[i*3], rgbbuff[i*3+1], rgbbuff[i*3+2]); ++ else ++ for(i = 0; i < count ; i++) ++ s_fbbuff[i] = make16color(rgbbuff[i*3], rgbbuff[i*3+1], rgbbuff[i*3+2]); + fbbuff = (void *) s_fbbuff; + break; + case 24: diff --git a/package/fbv/0005-giflib.patch b/package/fbv/0005-giflib.patch new file mode 100644 index 0000000000..7043353586 --- /dev/null +++ b/package/fbv/0005-giflib.patch @@ -0,0 +1,84 @@ +Adjust source code to work with giflib 5.1x + +Downloaded patch for gif.c from +https://projects.archlinux.org/svntogit/community.git/plain/trunk/giflib-5.1.patch?h=packages/fbv + +Signed-off-by: Bernd Kuhls + +diff -wbBur fbv-1.0b/gif.c fbv-1.0b.my/gif.c +--- fbv-1.0b/gif.c 2003-08-25 00:23:02.000000000 +0400 ++++ fbv-1.0b.my/gif.c 2014-05-29 18:39:41.337332872 +0400 +@@ -31,10 +31,10 @@ + #include + #define min(a,b) ((a) < (b) ? (a) : (b)) + #define gflush return(FH_ERROR_FILE); +-#define grflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); } +-#define mgrflush { free(lb); free(slb); DGifCloseFile(gft); return(FH_ERROR_FORMAT); } ++#define grflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } ++#define mgrflush { free(lb); free(slb); DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } + #define agflush return(FH_ERROR_FORMAT); +-#define agrflush { DGifCloseFile(gft); return(FH_ERROR_FORMAT); } ++#define agrflush { DGifCloseFile(gft, NULL); return(FH_ERROR_FORMAT); } + + + int fh_gif_id(char *name) +@@ -81,7 +81,7 @@ + ColorMapObject *cmap; + int cmaps; + +- gft=DGifOpenFileName(name); ++ gft=DGifOpenFileName(name, NULL); + if(gft==NULL){printf("err5\n"); gflush;} ////////// + do + { +@@ -170,7 +170,7 @@ + } + } + while( rt!= TERMINATE_RECORD_TYPE ); +- DGifCloseFile(gft); ++ DGifCloseFile(gft, NULL); + return(FH_ERROR_OK); + } + +@@ -184,7 +184,7 @@ + int extcode; + GifRecordType rt; + +- gft=DGifOpenFileName(name); ++ gft=DGifOpenFileName(name, NULL); + if(gft==NULL) gflush; + do + { +@@ -197,7 +197,7 @@ + px=gft->Image.Width; + py=gft->Image.Height; + *x=px; *y=py; +- DGifCloseFile(gft); ++ DGifCloseFile(gft, NULL); + return(FH_ERROR_OK); + break; + case EXTENSION_RECORD_TYPE: +@@ -210,7 +210,7 @@ + } + } + while( rt!= TERMINATE_RECORD_TYPE ); +- DGifCloseFile(gft); ++ DGifCloseFile(gft, NULL); + return(FH_ERROR_FORMAT); + } + #endif +diff -uNr fbv-1.0b.org/configure fbv-1.0b/configure +--- fbv-1.0b.org/configure 2004-09-07 13:29:27.000000000 +0200 ++++ fbv-1.0b/configure 2015-01-29 19:58:30.374599874 +0100 +@@ -106,9 +106,9 @@ + ungif="no" + echo "libungif check" >>./config.log + echo " 1st:" >>./config.log +-$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif $libs ++$CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lgif $libs + if [ -e \$\$~test ]; then +- libs="-lungif $libs" ; ungif="yes" ++ libs="-lgif $libs" ; ungif="yes" + else + echo " 2nd: -lX11 -L$xdir/lib" >>./config.log + $CC 2>>./config.log >>./config.log -o \$\$~test \$\$~test.c -lungif -lX11 -L$xdir/lib $libs diff --git a/package/fbv/0006-include.patch b/package/fbv/0006-include.patch new file mode 100644 index 0000000000..3d1cc17f74 --- /dev/null +++ b/package/fbv/0006-include.patch @@ -0,0 +1,20 @@ +diff -urpN fbv-1.0b.orig/fb_display.c fbv-1.0b/fb_display.c +--- fbv-1.0b.orig/fb_display.c 2004-09-07 14:09:43.000000000 +0200 ++++ fbv-1.0b/fb_display.c 2008-04-24 10:48:29.000000000 +0200 +@@ -18,8 +18,6 @@ + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +-#include +- + #include + #include + #include +@@ -31,6 +29,7 @@ + #include + #include + #include ++#include + #include "config.h" + /* Public Use Functions: + * diff --git a/package/fbv/0007-libpng15.patch b/package/fbv/0007-libpng15.patch new file mode 100644 index 0000000000..7872a73cf6 --- /dev/null +++ b/package/fbv/0007-libpng15.patch @@ -0,0 +1,24 @@ +Support for libpng 1.5+ shamelessly taken from Gentoo. + +Signed-off-by: Gustavo Zacarias + +--- a/png.c ++++ b/png.c +@@ -69,7 +69,7 @@ + fclose(fh); return(FH_ERROR_FORMAT); + } + rp=0; +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + if(rp) free(rp); +@@ -161,7 +161,7 @@ + fclose(fh); return(FH_ERROR_FORMAT); + } + rp=0; +- if (setjmp(png_ptr->jmpbuf)) ++ if (setjmp(png_jmpbuf(png_ptr))) + { + png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp)NULL); + if(rp) free(rp); diff --git a/package/fbv/Config.in b/package/fbv/Config.in new file mode 100644 index 0000000000..3160a85552 --- /dev/null +++ b/package/fbv/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_FBV + bool "fbv" + help + fbv is a very simple graphic file viewer for the framebuffer console, + capable of displaying GIF, JPEG, PNG and BMP files using libungif, + libjpeg and libpng. + + http://freshmeat.net/projects/fbv/ + +if BR2_PACKAGE_FBV + +config BR2_PACKAGE_FBV_PNG + bool "PNG support" + default y + select BR2_PACKAGE_LIBPNG + help + Enable support for PNG using libpng. + +config BR2_PACKAGE_FBV_JPEG + bool "JPEG support" + default y + select BR2_PACKAGE_JPEG + help + Enable support for JPEG using IJG's libjpeg. + +config BR2_PACKAGE_FBV_GIF + bool "GIF support" + default y + select BR2_PACKAGE_GIFLIB + help + Enable support for GIF using giflib. + +endif # BR2_PACKAGE_FBV diff --git a/package/fbv/fbv.hash b/package/fbv/fbv.hash new file mode 100644 index 0000000000..892012b3d9 --- /dev/null +++ b/package/fbv/fbv.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9b55b9dafd5eb01562060d860e267e309a1876e8ba5ce4d3303484b94129ab3c fbv-1.0b.tar.gz diff --git a/package/fbv/fbv.mk b/package/fbv/fbv.mk new file mode 100644 index 0000000000..d12b9f455f --- /dev/null +++ b/package/fbv/fbv.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# fbv +# +################################################################################ + +FBV_VERSION = 1.0b +FBV_SITE = http://s-tech.elsat.net.pl/fbv + +FBV_LICENSE = GPLv2 +FBV_LICENSE_FILES = COPYING + +### image format dependencies and configure options +FBV_DEPENDENCIES = # empty +FBV_CONFIGURE_OPTS = # empty +ifeq ($(BR2_PACKAGE_FBV_PNG),y) +FBV_DEPENDENCIES += libpng + +# libpng in turn depends on other libraries +ifeq ($(BR2_STATIC_LIBS),y) +FBV_CONFIGURE_OPTS += "--libs=`$(PKG_CONFIG_HOST_BINARY) --libs libpng`" +endif + +else +FBV_CONFIGURE_OPTS += --without-libpng +endif +ifeq ($(BR2_PACKAGE_FBV_JPEG),y) +FBV_DEPENDENCIES += jpeg +else +FBV_CONFIGURE_OPTS += --without-libjpeg +endif +ifeq ($(BR2_PACKAGE_FBV_GIF),y) +FBV_DEPENDENCIES += giflib +else +FBV_CONFIGURE_OPTS += --without-libungif +endif + +#fbv doesn't support cross-compilation +define FBV_CONFIGURE_CMDS + (cd $(FBV_DIR); rm -f config.cache; \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + ./configure \ + --prefix=/usr \ + $(FBV_CONFIGURE_OPTS) \ + ) +endef + +define FBV_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define FBV_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/fbv $(TARGET_DIR)/usr/bin/fbv +endef + +$(eval $(autotools-package)) diff --git a/package/fcgiwrap/0001-use-LIBS-from-configure.patch b/package/fcgiwrap/0001-use-LIBS-from-configure.patch new file mode 100644 index 0000000000..12563c4275 --- /dev/null +++ b/package/fcgiwrap/0001-use-LIBS-from-configure.patch @@ -0,0 +1,22 @@ +Makefile.in: Use LIBS from configure rather than specifying -lfcgi manually. + +libfcgi needs libm and fcgiwrap does not use libtool or pkgconf to +detect libfcgi, so we need to add -lm explicitely when using static +libs. Buildroot does this by providing LIBS=-lm to configure when +needed. However fcgiwrap does not use Automake and its Makefile.in +ignores LIBS from configure. Fix it with this patch. + +Signed-off-by: Thomas Claveirole + +diff -ur a/Makefile.in b/Makefile.in +--- a/Makefile.in 2013-02-03 14:25:17.000000000 +0100 ++++ b/Makefile.in 2015-05-29 16:33:23.895280138 +0200 +@@ -16,7 +16,7 @@ + install -m 644 systemd/fcgiwrap.service $(DESTDIR)@systemdsystemunitdir@ + endif + +-LDLIBS = -lfcgi @systemd_LIBS@ ++LDLIBS = @LIBS@ @systemd_LIBS@ + CFLAGS = @AM_CFLAGS@ + + fcgiwrap: fcgiwrap.c diff --git a/package/fcgiwrap/Config.in b/package/fcgiwrap/Config.in new file mode 100644 index 0000000000..c3a31fc8db --- /dev/null +++ b/package/fcgiwrap/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_FCGIWRAP + bool "fcgiwrap" + depends on BR2_USE_MMU # libfcgi + select BR2_PACKAGE_LIBFCGI + help + fcgiwrap is a simple server for running CGI applications + over FastCGI. It hopes to provide clean CGI support to Nginx + (and other web servers that may need it). + + https://nginx.localdomain.pl/wiki/FcgiWrap diff --git a/package/fcgiwrap/fcgiwrap.mk b/package/fcgiwrap/fcgiwrap.mk new file mode 100644 index 0000000000..698a1308e1 --- /dev/null +++ b/package/fcgiwrap/fcgiwrap.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# fcgiwrap +# +################################################################################ + +FCGIWRAP_VERSION = 1.1.0 +FCGIWRAP_SITE = $(call github,gnosek,fcgiwrap,$(FCGIWRAP_VERSION)) +FCGIWRAP_DEPENDENCIES = host-pkgconf libfcgi +FCGIWRAP_LICENSE = MIT +FCGIWRAP_LICENSE_FILES = fcgiwrap.c +FCGIWRAP_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +FCGIWRAP_DEPENDENCIES += systemd +FCGIWRAP_CONF_OPTS += --with-systemd +else +FCGIWRAP_CONF_OPTS += --without-systemd +endif + +# libfcgi needs libm and fcgiwrap does not use libtool or pkgconf to +# detect libfcgi, so we need to add -lm explicitely when using static +# libs. +ifeq ($(BR2_STATIC_LIBS),y) +FCGIWRAP_CONF_OPTS += LIBS=-lm +endif + +# fcgiwrap uses Autoconf, but not Automake, so we need to provide +# these to make. +FCGIWRAP_MAKE_ENV = $(TARGET_CONFIGURE_OPTS) + +$(eval $(autotools-package)) diff --git a/package/fconfig/Config.in b/package/fconfig/Config.in new file mode 100644 index 0000000000..e7dd58a84a --- /dev/null +++ b/package/fconfig/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_FCONFIG + bool "fconfig" + help + fconfig - get/set RedBoot configuration parameters from Linux. + + http://andrzejekiert.ovh.org/software.html.en diff --git a/package/fconfig/fconfig.hash b/package/fconfig/fconfig.hash new file mode 100644 index 0000000000..eae26e2b14 --- /dev/null +++ b/package/fconfig/fconfig.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 4ff0e8f07e35e46b705c0dbe9d9544ede01ea092a69e3f7db03e55a3f2bb8eb7 fconfig-20080329.tar.gz diff --git a/package/fconfig/fconfig.mk b/package/fconfig/fconfig.mk new file mode 100644 index 0000000000..509fc2c77d --- /dev/null +++ b/package/fconfig/fconfig.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# fconfig +# +################################################################################ + +FCONFIG_VERSION = 20080329 +# Real upstream location has been disabled +# FCONFIG_SITE = http://andrzejekiert.ovh.org/software/fconfig +FCONFIG_SITE = http://sources.buildroot.net +FCONFIG_LICENSE = GPLv2+ +FCONFIG_LICENSE_FILES = fconfig.c + +define FCONFIG_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define FCONFIG_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/fconfig $(TARGET_DIR)/sbin/fconfig +endef + +$(eval $(generic-package)) diff --git a/package/fdk-aac/Config.in b/package/fdk-aac/Config.in new file mode 100644 index 0000000000..1ec59e1a88 --- /dev/null +++ b/package/fdk-aac/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_FDK_AAC + bool "fdk-aac" + depends on BR2_INSTALL_LIBSTDCPP + # These are the architectures supported by FDK AAC + depends on BR2_i386 || BR2_x86_64 || BR2_arm || BR2_armeb || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_powerpc || BR2_sh || BR2_sh64 + + help + The Fraunhofer FDK AAC Codec Library for Android ("FDK AAC Codec") + is software that implements the MPEG Advanced Audio Coding ("AAC") + encoding and decoding scheme for digital audio + + http://sourceforge.net/projects/opencore-amr/files/fdk-aac/ + +comment "fdk-aac needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_i386 || BR2_x86_64 || BR2_arm || BR2_armeb || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_powerpc || BR2_sh || BR2_sh64 diff --git a/package/fdk-aac/fdk-aac.hash b/package/fdk-aac/fdk-aac.hash new file mode 100644 index 0000000000..28a1eeeb93 --- /dev/null +++ b/package/fdk-aac/fdk-aac.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 5910fe788677ca13532e3f47b7afaa01d72334d46a2d5e1d1f080f1173ff15ab fdk-aac-0.1.4.tar.gz diff --git a/package/fdk-aac/fdk-aac.mk b/package/fdk-aac/fdk-aac.mk new file mode 100644 index 0000000000..45a3cf5e57 --- /dev/null +++ b/package/fdk-aac/fdk-aac.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# fdk-aac +# +################################################################################ + +FDK_AAC_VERSION = 0.1.4 +FDK_AAC_SITE = http://downloads.sourceforge.net/project/opencore-amr/fdk-aac +FDK_AAC_LICENSE = fdk-aac license +FDK_AAC_LICENSE_FILES = NOTICE + +FDK_AAC_INSTALL_STAGING = YES + +# Not compatible with GCC 6 which defaults to GNU++14 +FDK_AAC_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=gnu++98" + +$(eval $(autotools-package)) diff --git a/package/feh/Config.in b/package/feh/Config.in new file mode 100644 index 0000000000..19b4abe0e3 --- /dev/null +++ b/package/feh/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_FEH + bool "feh" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBXINERAMA + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_IMLIB2 + select BR2_PACKAGE_IMLIB2_PNG + select BR2_PACKAGE_IMLIB2_JPEG + select BR2_PACKAGE_IMLIB2_X + select BR2_PACKAGE_LIBCURL + help + feh is an X11 image viewer aimed mostly at console users. + + http://feh.finalrewind.org/ diff --git a/package/feh/feh.hash b/package/feh/feh.hash new file mode 100644 index 0000000000..76d624875d --- /dev/null +++ b/package/feh/feh.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 c80f3d3297b3b6ee4898572d19692f5e19eb3066a9ca078c3099d39004a7e0cf feh-2.14.2.tar.bz2 diff --git a/package/feh/feh.mk b/package/feh/feh.mk new file mode 100644 index 0000000000..f650938d24 --- /dev/null +++ b/package/feh/feh.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# feh +# +################################################################################ + +FEH_VERSION = 2.14.2 +FEH_SOURCE = feh-$(FEH_VERSION).tar.bz2 +FEH_SITE = http://feh.finalrewind.org +FEH_DEPENDENCIES = libcurl imlib2 libpng xlib_libXinerama xlib_libXt +FEH_LICENSE = MIT +FEH_LICENSE_FILES = COPYING + +define FEH_BUILD_CMDS + $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ + -C $(@D) all +endef + +define FEH_INSTALL_TARGET_CMDS + $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) " \ + PREFIX=/usr DESTDIR=$(TARGET_DIR) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/fetchmail/0001-fix-openssl-static-link.patch b/package/fetchmail/0001-fix-openssl-static-link.patch new file mode 100644 index 0000000000..1a5f4d6f71 --- /dev/null +++ b/package/fetchmail/0001-fix-openssl-static-link.patch @@ -0,0 +1,30 @@ +Fix checking for statically build OpenSSL with libz dependency + +Fixes +http://autobuild.buildroot.net/results/48a/48ad6d3659cf1f04581b7e3d115bebf454ff17fd/ + +configure: Enabling OpenSSL support in /home/br/br/output/host/usr/i486-buildroot-linux-uclibc/sysroot/usr. +checking for additional library dependencies of SSL... error +configure: error: cannot link with SSL - check config.log + +In config.log multiple linking errors to libz can be found: + +configure:10099: /home/br/br/output/host/usr/bin/i486-ctng-linux-uclibc-gcc -o + conftest -D_LARGEFILE_SOURCE -D_LARGEFILE64 + /home/br/br/output/host/usr/i486-buildroot-linux-uclibc/sysroot/usr/lib/libcrypto.a(c_zlib.o): + In function `zlib_stateful_c_zlib.c:(.text+0x56): undefined reference to `inflate' + +Signed-off-by: Bernd Kuhls + +diff -uNr fetchmail-6.3.26.org/configure.ac fetchmail-6.3.26/configure.ac +--- fetchmail-6.3.26.org/configure.ac 2013-04-23 22:51:10.000000000 +0200 ++++ fetchmail-6.3.26/configure.ac 2014-07-27 09:20:25.000000000 +0200 +@@ -778,7 +778,7 @@ + AC_MSG_ERROR([SSL support enabled, but OpenSSL not found]) + fi + LDFLAGS="$LDFLAGS -L$with_ssl/lib" +- LIBS="$LIBS -lssl -lcrypto" ++ LIBS="-lssl -lcrypto $LIBS" + dnl check if -ldl is needed + AC_MSG_CHECKING([for additional library dependencies of SSL]) + found=0 diff --git a/package/fetchmail/0002-enable-libressl.patch b/package/fetchmail/0002-enable-libressl.patch new file mode 100644 index 0000000000..a98e19dda4 --- /dev/null +++ b/package/fetchmail/0002-enable-libressl.patch @@ -0,0 +1,67 @@ +Fetched from upstream git and tweaked for the release: +https://gitlab.com/fetchmail/fetchmail/commit/a2ae6f8d15d7caf815d7bdd13df833fd1b2af5cc + +Signed-off-by: Gustavo Zacarias + +diff -Nura fetchmail-6.3.26.orig/config.h.in fetchmail-6.3.26/config.h.in +--- fetchmail-6.3.26.orig/config.h.in 2015-12-30 10:44:33.467746835 -0300 ++++ fetchmail-6.3.26/config.h.in 2015-12-30 10:45:50.271403589 -0300 +@@ -53,6 +53,10 @@ + if you don't. */ + #undef HAVE_DECL_SSLV2_CLIENT_METHOD + ++/* Define to 1 if you have the declaration of `SSLv3_client_method', and to 0 ++ if you don't. */ ++#undef HAVE_DECL_SSLV3_CLIENT_METHOD ++ + /* Define to 1 if you have the declaration of `strerror', and to 0 if you + don't. */ + #undef HAVE_DECL_STRERROR +diff -Nura fetchmail-6.3.26.orig/configure.ac fetchmail-6.3.26/configure.ac +--- fetchmail-6.3.26.orig/configure.ac 2015-12-30 10:44:33.465746766 -0300 ++++ fetchmail-6.3.26/configure.ac 2015-12-30 10:46:03.708868409 -0300 +@@ -803,6 +803,7 @@ + + case "$LIBS" in *-lssl*) + AC_CHECK_DECLS([SSLv2_client_method],,,[#include ]) ++ AC_CHECK_DECLS([SSLv3_client_method],,,[#include ]) + ;; + esac + +diff -Nura fetchmail-6.3.26.orig/fetchmail.c fetchmail-6.3.26/fetchmail.c +--- fetchmail-6.3.26.orig/fetchmail.c 2015-12-30 10:44:33.469746904 -0300 ++++ fetchmail-6.3.26/fetchmail.c 2015-12-30 10:46:03.708868409 -0300 +@@ -263,6 +263,12 @@ + #ifdef SSL_ENABLE + "+SSL" + #endif ++#if HAVE_DECL_SSLV2_CLIENT_METHOD + 0 == 0 ++ "-SSLv2" ++#endif ++#if HAVE_DECL_SSLV3_CLIENT_METHOD + 0 == 0 ++ "-SSLv3" ++#endif + #ifdef OPIE_ENABLE + "+OPIE" + #endif /* OPIE_ENABLE */ +diff -Nura fetchmail-6.3.26.orig/socket.c fetchmail-6.3.26/socket.c +--- fetchmail-6.3.26.orig/socket.c 2015-12-30 10:44:33.464746731 -0300 ++++ fetchmail-6.3.26/socket.c 2015-12-30 10:46:03.709868443 -0300 +@@ -910,11 +910,16 @@ + #if HAVE_DECL_SSLV2_CLIENT_METHOD + 0 > 0 + _ctx[sock] = SSL_CTX_new(SSLv2_client_method()); + #else +- report(stderr, GT_("Your operating system does not support SSLv2.\n")); ++ report(stderr, GT_("Your OpenSSL version does not support SSLv2.\n")); + return -1; + #endif + } else if(!strcasecmp("ssl3",myproto)) { ++#if HAVE_DECL_SSLV3_CLIENT_METHOD + 0 > 0 + _ctx[sock] = SSL_CTX_new(SSLv3_client_method()); ++#else ++ report(stderr, GT_("Your OpenSSL version does not support SSLv3.\n")); ++ return -1; ++#endif + } else if(!strcasecmp("tls1",myproto)) { + _ctx[sock] = SSL_CTX_new(TLSv1_client_method()); + } else if (!strcasecmp("ssl23",myproto)) { diff --git a/package/fetchmail/Config.in b/package/fetchmail/Config.in new file mode 100644 index 0000000000..1eb0359003 --- /dev/null +++ b/package/fetchmail/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_FETCHMAIL + bool "fetchmail" + select BR2_PACKAGE_CA_CERTIFICATES + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + depends on BR2_USE_MMU # fork() + help + Fetchmail - the mail-retrieval daemon + Client daemon to move mail from POP and IMAP to your local computer + + http://www.fetchmail.info/ diff --git a/package/fetchmail/fetchmail.hash b/package/fetchmail/fetchmail.hash new file mode 100644 index 0000000000..c67ee1a4e1 --- /dev/null +++ b/package/fetchmail/fetchmail.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 79b4c54cdbaf02c1a9a691d9948fcb1a77a1591a813e904283a8b614b757e850 fetchmail-6.3.26.tar.xz diff --git a/package/fetchmail/fetchmail.mk b/package/fetchmail/fetchmail.mk new file mode 100644 index 0000000000..a198dc52ef --- /dev/null +++ b/package/fetchmail/fetchmail.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# fetchmail +# +################################################################################ + +FETCHMAIL_VERSION_MAJOR = 6.3 +FETCHMAIL_VERSION = $(FETCHMAIL_VERSION_MAJOR).26 +FETCHMAIL_SOURCE = fetchmail-$(FETCHMAIL_VERSION).tar.xz +FETCHMAIL_SITE = http://downloads.sourceforge.net/project/fetchmail/branch_$(FETCHMAIL_VERSION_MAJOR) +FETCHMAIL_LICENSE = GPLv2; some exceptions are mentioned in COPYING +FETCHMAIL_LICENSE_FILES = COPYING +FETCHMAIL_AUTORECONF = YES +FETCHMAIL_GETTEXTIZE = YES + +FETCHMAIL_CONF_ENV += LIBS="-lz" + +FETCHMAIL_CONF_OPTS = \ + --with-ssl=$(STAGING_DIR)/usr + +FETCHMAIL_DEPENDENCIES = \ + ca-certificates \ + openssl \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +$(eval $(autotools-package)) diff --git a/package/ffmpeg/0001-Support-raw-dvdsub-palette-as-stored-on-normal-dvd-s.patch b/package/ffmpeg/0001-Support-raw-dvdsub-palette-as-stored-on-normal-dvd-s.patch new file mode 100644 index 0000000000..a51a7d3c9c --- /dev/null +++ b/package/ffmpeg/0001-Support-raw-dvdsub-palette-as-stored-on-normal-dvd-s.patch @@ -0,0 +1,63 @@ +From 74f1c9b43b191a9d6b494e90a4a11677fca33c13 Mon Sep 17 00:00:00 2001 +From: Joakim Plate +Date: Sun, 11 Sep 2011 19:04:51 +0200 +Subject: [PATCH 01/13] Support raw dvdsub palette as stored on normal dvd's + +This is how the palette is stored on dvd's. Currently +only xbmc passes the palette information to libavcodec +this way. + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + libavcodec/dvdsubdec.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c +index 39604f3..a711e16 100644 +--- a/libavcodec/dvdsubdec.c ++++ b/libavcodec/dvdsubdec.c +@@ -64,6 +64,24 @@ static void yuv_a_to_rgba(const uint8_t *ycbcr, const uint8_t *alpha, uint32_t * + } + } + ++static void ayvu_to_argb(const uint8_t *ayvu, uint32_t *argb, int num_values) ++{ ++ uint8_t *cm = ff_crop_tab + MAX_NEG_CROP; ++ uint8_t r, g, b; ++ int i, y, cb, cr, a; ++ int r_add, g_add, b_add; ++ ++ for (i = num_values; i > 0; i--) { ++ a = *ayvu++; ++ y = *ayvu++; ++ cr = *ayvu++; ++ cb = *ayvu++; ++ YUV_TO_RGB1_CCIR(cb, cr); ++ YUV_TO_RGB2_CCIR(r, g, b, y); ++ *argb++ = (a << 24) | (r << 16) | (g << 8) | b; ++ } ++} ++ + static int decode_run_2bit(GetBitContext *gb, int *color) + { + unsigned int v, t; +@@ -697,6 +715,12 @@ static av_cold int dvdsub_init(AVCodecContext *avctx) + parse_ifo_palette(ctx, ctx->ifo_str); + if (ctx->palette_str) + parse_palette(ctx, ctx->palette_str); ++ ++ if (!ctx->has_palette && avctx->extradata_size == 64) { ++ ayvu_to_argb((uint8_t*)avctx->extradata, ctx->palette, 16); ++ ctx->has_palette = 1; ++ } ++ + if (ctx->has_palette) { + int i; + av_log(avctx, AV_LOG_DEBUG, "palette:"); +-- +2.1.0 + diff --git a/package/ffmpeg/0003-if-av_read_packet-returns-AVERROR_IO-we-are-done.-ff.patch b/package/ffmpeg/0003-if-av_read_packet-returns-AVERROR_IO-we-are-done.-ff.patch new file mode 100644 index 0000000000..034413405f --- /dev/null +++ b/package/ffmpeg/0003-if-av_read_packet-returns-AVERROR_IO-we-are-done.-ff.patch @@ -0,0 +1,32 @@ +From 54200b3e6009c6870e33c02c8bbcf023fcd92cac Mon Sep 17 00:00:00 2001 +From: Cory Fields +Date: Mon, 28 Jun 2010 01:55:31 -0400 +Subject: [PATCH 03/13] if av_read_packet returns AVERROR_IO, we are done. + ffmpeg's codecs might or might not handle returning any completed demuxed + packets correctly + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + libavformat/utils.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/libavformat/utils.c b/libavformat/utils.c +index ae6347a..3e8af50 100644 +--- a/libavformat/utils.c ++++ b/libavformat/utils.c +@@ -1304,6 +1304,8 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) + if (ret < 0) { + if (ret == AVERROR(EAGAIN)) + return ret; ++ if (ret == AVERROR(EIO)) ++ return ret; + /* flush the parsers */ + for (i = 0; i < s->nb_streams; i++) { + st = s->streams[i]; +-- +2.1.0 + diff --git a/package/ffmpeg/0004-added-Ticket-7187-TV-Teletext-support-for-DVB-EBU-Te.patch b/package/ffmpeg/0004-added-Ticket-7187-TV-Teletext-support-for-DVB-EBU-Te.patch new file mode 100644 index 0000000000..bc6a2d456d --- /dev/null +++ b/package/ffmpeg/0004-added-Ticket-7187-TV-Teletext-support-for-DVB-EBU-Te.patch @@ -0,0 +1,47 @@ +From e9236f6fe3fae1ad4a3a2b6b63db493b083f0b21 Mon Sep 17 00:00:00 2001 +From: Cory Fields +Date: Mon, 28 Jun 2010 02:10:50 -0400 +Subject: [PATCH 04/13] added: Ticket #7187, TV Teletext support for DVB EBU + Teletext streams + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + libavcodec/avcodec.h | 4 ++++ + libavformat/mpegts.c | 2 ++ + 2 files changed, 6 insertions(+) + +diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h +index dabae1b..dd6ef3f 100644 +--- a/libavcodec/avcodec.h ++++ b/libavcodec/avcodec.h +@@ -520,6 +520,10 @@ enum AVCodecID { + AV_CODEC_ID_PJS = MKBETAG('P','h','J','S'), + AV_CODEC_ID_ASS = MKBETAG('A','S','S',' '), ///< ASS as defined in Matroska + ++ /* data codecs */ ++ AV_CODEC_ID_VBI_DATA= 0x17500, ++ AV_CODEC_ID_VBI_TELETEXT, ++ + /* other specific kind of codecs (generally used for attachments) */ + AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs. + AV_CODEC_ID_TTF = 0x18000, +diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c +index 97da0a3..5dd28f1 100644 +--- a/libavformat/mpegts.c ++++ b/libavformat/mpegts.c +@@ -729,6 +729,8 @@ static const StreamType DESC_types[] = { + { 0x7b, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, + { 0x56, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_TELETEXT }, + { 0x59, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */ ++ { 0x45, AVMEDIA_TYPE_DATA, AV_CODEC_ID_VBI_DATA }, /* VBI Data descriptor */ ++ { 0x46, AVMEDIA_TYPE_DATA, AV_CODEC_ID_VBI_TELETEXT }, /* VBI Teletext descriptor */ + { 0 }, + }; + +-- +2.1.0 + diff --git a/package/ffmpeg/0005-Don-t-accept-mpegts-PMT-that-isn-t-current.patch b/package/ffmpeg/0005-Don-t-accept-mpegts-PMT-that-isn-t-current.patch new file mode 100644 index 0000000000..feb58f7b25 --- /dev/null +++ b/package/ffmpeg/0005-Don-t-accept-mpegts-PMT-that-isn-t-current.patch @@ -0,0 +1,46 @@ +From 1f48ee2290e9041b0371eb9a9cb742e9568930a1 Mon Sep 17 00:00:00 2001 +From: Joakim Plate +Date: Sun, 18 Sep 2011 19:16:34 +0200 +Subject: [PATCH 05/13] Don't accept mpegts PMT that isn't current + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + libavformat/mpegts.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c +index 5dd28f1..9f85aed 100644 +--- a/libavformat/mpegts.c ++++ b/libavformat/mpegts.c +@@ -572,6 +572,7 @@ typedef struct SectionHeader { + uint8_t tid; + uint16_t id; + uint8_t version; ++ uint8_t current; + uint8_t sec_num; + uint8_t last_sec_num; + } SectionHeader; +@@ -643,6 +644,7 @@ static int parse_section_header(SectionHeader *h, + val = get8(pp, p_end); + if (val < 0) + return val; ++ h->current = val & 0x1; + h->version = (val >> 1) & 0x1f; + val = get8(pp, p_end); + if (val < 0) +@@ -1968,6 +1970,8 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len + return; + if (ts->skip_changes) + return; ++ if (!h->current) ++ return; + + ts->stream->ts_id = h->id; + +-- +2.1.0 + diff --git a/package/ffmpeg/0006-Don-t-reparse-PMT-unless-it-s-version-has-changed.patch b/package/ffmpeg/0006-Don-t-reparse-PMT-unless-it-s-version-has-changed.patch new file mode 100644 index 0000000000..0418f25eb1 --- /dev/null +++ b/package/ffmpeg/0006-Don-t-reparse-PMT-unless-it-s-version-has-changed.patch @@ -0,0 +1,48 @@ +From db98fbe37f2f7175ff03b8d582e940518ddf3642 Mon Sep 17 00:00:00 2001 +From: Joakim Plate +Date: Sun, 18 Sep 2011 19:17:23 +0200 +Subject: [PATCH 06/13] Don't reparse PMT unless it's version has changed + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + libavformat/mpegts.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c +index 9f85aed..25007a6 100644 +--- a/libavformat/mpegts.c ++++ b/libavformat/mpegts.c +@@ -88,6 +88,7 @@ struct MpegTSFilter { + int es_id; + int last_cc; /* last cc code (-1 if first packet) */ + int64_t last_pcr; ++ int last_version; /* last version of data on this pid */ + enum MpegTSFilterType type; + union { + MpegTSPESFilter pes_filter; +@@ -450,6 +451,7 @@ static MpegTSFilter *mpegts_open_filter(MpegTSContext *ts, unsigned int pid, + filter->es_id = -1; + filter->last_cc = -1; + filter->last_pcr= -1; ++ filter->last_version = -1; + + return filter; + } +@@ -1972,6 +1974,10 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len + return; + if (!h->current) + return; ++ if (h->version == filter->last_version) ++ return; ++ filter->last_version = h->version; ++ av_dlog(ts->stream, "version=%d\n", filter->last_version); + + ts->stream->ts_id = h->id; + +-- +2.1.0 + diff --git a/package/ffmpeg/0007-Read-PID-timestamps-as-well-as-PCR-timestamps-to-fin.patch b/package/ffmpeg/0007-Read-PID-timestamps-as-well-as-PCR-timestamps-to-fin.patch new file mode 100644 index 0000000000..259b35939e --- /dev/null +++ b/package/ffmpeg/0007-Read-PID-timestamps-as-well-as-PCR-timestamps-to-fin.patch @@ -0,0 +1,105 @@ +From fdd8caea6535434a877587f5325e914ba50ed17f Mon Sep 17 00:00:00 2001 +From: Cory Fields +Date: Fri, 9 Jul 2010 16:43:31 -0400 +Subject: [PATCH 07/13] Read PID timestamps as well as PCR timestamps to find + location in mpegts stream + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + libavformat/mpegts.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 46 insertions(+), 2 deletions(-) + +diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c +index 25007a6..d5a8a45 100644 +--- a/libavformat/mpegts.c ++++ b/libavformat/mpegts.c +@@ -2459,6 +2459,44 @@ static void seek_back(AVFormatContext *s, AVIOContext *pb, int64_t pos) { + av_log(s, pb->seekable ? AV_LOG_ERROR : AV_LOG_INFO, "Unable to seek back to the start\n"); + } + ++static int parse_timestamp(int64_t *ts, const uint8_t *buf) ++{ ++ int afc, flags; ++ const uint8_t *p; ++ ++ if(!(buf[1] & 0x40)) /* must be a start packet */ ++ return -1; ++ ++ afc = (buf[3] >> 4) & 3; ++ p = buf + 4; ++ if (afc == 0 || afc == 2) /* invalid or only adaption field */ ++ return -1; ++ if (afc == 3) ++ p += p[0] + 1; ++ if (p >= buf + TS_PACKET_SIZE) ++ return -1; ++ ++ if (p[0] != 0x00 || p[1] != 0x00 || p[2] != 0x01) /* packet_start_code_prefix */ ++ return -1; ++ ++ flags = p[3] | 0x100; /* stream type */ ++ if (!((flags >= 0x1c0 && flags <= 0x1df) || ++ (flags >= 0x1e0 && flags <= 0x1ef) || ++ (flags == 0x1bd) || (flags == 0x1fd))) ++ return -1; ++ ++ flags = p[7]; ++ if ((flags & 0xc0) == 0x80) { ++ *ts = ff_parse_pes_pts(p+9); ++ return 0; ++ } else if ((flags & 0xc0) == 0xc0) { ++ *ts = ff_parse_pes_pts(p+9+5); ++ return 0; ++ } ++ return -1; ++} ++ ++ + static int mpegts_read_header(AVFormatContext *s) + { + MpegTSContext *ts = s->priv_data; +@@ -2658,6 +2696,7 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index, + uint8_t buf[TS_PACKET_SIZE]; + int pcr_l, pcr_pid = + ((PESContext *)s->streams[stream_index]->priv_data)->pcr_pid; ++ int pid = ((PESContext*)s->streams[stream_index]->priv_data)->pid; + int pos47 = ts->pos47_full % ts->raw_packet_size; + pos = + ((*ppos + ts->raw_packet_size - 1 - pos47) / ts->raw_packet_size) * +@@ -2679,6 +2718,11 @@ static av_unused int64_t mpegts_get_pcr(AVFormatContext *s, int stream_index, + *ppos = pos; + return timestamp; + } ++ if ((pid < 0 || (AV_RB16(buf + 1) & 0x1fff) == pid) && ++ parse_timestamp(×tamp, buf) == 0) { ++ *ppos = pos; ++ return timestamp; ++ } + pos += ts->raw_packet_size; + } + +@@ -2778,7 +2822,7 @@ AVInputFormat ff_mpegts_demuxer = { + .read_header = mpegts_read_header, + .read_packet = mpegts_read_packet, + .read_close = mpegts_read_close, +- .read_timestamp = mpegts_get_dts, ++ .read_timestamp = mpegts_get_pcr, + .flags = AVFMT_SHOW_IDS | AVFMT_TS_DISCONT, + .priv_class = &mpegts_class, + }; +@@ -2790,7 +2834,7 @@ AVInputFormat ff_mpegtsraw_demuxer = { + .read_header = mpegts_read_header, + .read_packet = mpegts_raw_read_packet, + .read_close = mpegts_read_close, +- .read_timestamp = mpegts_get_dts, ++ .read_timestamp = mpegts_get_pcr, + .flags = AVFMT_SHOW_IDS | AVFMT_TS_DISCONT, + .priv_class = &mpegtsraw_class, + }; +-- +2.1.0 + diff --git a/package/ffmpeg/0008-Get-stream-durations-using-read_timestamp.patch b/package/ffmpeg/0008-Get-stream-durations-using-read_timestamp.patch new file mode 100644 index 0000000000..0b80c113e1 --- /dev/null +++ b/package/ffmpeg/0008-Get-stream-durations-using-read_timestamp.patch @@ -0,0 +1,74 @@ +From c57e5b8154f5fe1457f4c64e04885a2cdfb37f51 Mon Sep 17 00:00:00 2001 +From: Joakim Plate +Date: Sat, 22 Oct 2011 19:01:38 +0200 +Subject: [PATCH 08/13] Get stream durations using read_timestamp + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + libavformat/utils.c | 39 +++++++++++++++++++++++++++++++++++++++ + 1 file changed, 39 insertions(+) + +diff --git a/libavformat/utils.c b/libavformat/utils.c +index 3e8af50..f4fb172 100644 +--- a/libavformat/utils.c ++++ b/libavformat/utils.c +@@ -2356,6 +2356,41 @@ static void estimate_timings_from_bit_rate(AVFormatContext *ic) + #define DURATION_MAX_READ_SIZE 250000LL + #define DURATION_MAX_RETRY 4 + ++static void av_estimate_timings_from_pts2(AVFormatContext *ic, int64_t old_offset) ++{ ++ AVStream *st; ++ int i, step= 1024; ++ int64_t ts, pos; ++ ++ for(i=0;inb_streams;i++) { ++ st = ic->streams[i]; ++ ++ pos = 0; ++ ts = ic->iformat->read_timestamp(ic, i, &pos, DURATION_MAX_READ_SIZE); ++ if (ts == AV_NOPTS_VALUE) ++ continue; ++ if (st->start_time > ts || st->start_time == AV_NOPTS_VALUE) ++ st->start_time = ts; ++ ++ pos = avio_size(ic->pb) - 1; ++ do { ++ pos -= step; ++ ts = ic->iformat->read_timestamp(ic, i, &pos, pos + step); ++ step += step; ++ } while (ts == AV_NOPTS_VALUE && pos >= step && step < DURATION_MAX_READ_SIZE); ++ ++ if (ts == AV_NOPTS_VALUE) ++ continue; ++ ++ if (st->duration < ts - st->start_time || st->duration == AV_NOPTS_VALUE) ++ st->duration = ts - st->start_time; ++ } ++ ++ fill_all_stream_timings(ic); ++ ++ avio_seek(ic->pb, old_offset, SEEK_SET); ++} ++ + /* only usable for MPEG-PS streams */ + static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset) + { +@@ -2506,6 +2541,10 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset) + * the components */ + fill_all_stream_timings(ic); + ic->duration_estimation_method = AVFMT_DURATION_FROM_STREAM; ++ } else if (ic->iformat->read_timestamp && ++ file_size && ic->pb->seekable) { ++ /* get accurate estimate from the PTSes */ ++ av_estimate_timings_from_pts2(ic, old_offset); + } else { + /* less precise: use bitrate info */ + estimate_timings_from_bit_rate(ic); +-- +2.1.0 + diff --git a/package/ffmpeg/0009-changed-allow-4-second-skew-between-streams-in-mov-b.patch b/package/ffmpeg/0009-changed-allow-4-second-skew-between-streams-in-mov-b.patch new file mode 100644 index 0000000000..fb0aad1e13 --- /dev/null +++ b/package/ffmpeg/0009-changed-allow-4-second-skew-between-streams-in-mov-b.patch @@ -0,0 +1,33 @@ +From 4bcec3ef0042244b0ade00d132368d0872f73c72 Mon Sep 17 00:00:00 2001 +From: Joakim Plate +Date: Wed, 8 Dec 2010 14:03:43 +0000 +Subject: [PATCH 09/13] changed: allow 4 second skew between streams in mov + before attempting to seek + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + libavformat/mov.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libavformat/mov.c b/libavformat/mov.c +index 8d66c0a..127ffd9 100644 +--- a/libavformat/mov.c ++++ b/libavformat/mov.c +@@ -4028,8 +4028,8 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st) + if (!sample || (!s->pb->seekable && current_sample->pos < sample->pos) || + (s->pb->seekable && + ((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb && +- ((FFABS(best_dts - dts) <= AV_TIME_BASE && current_sample->pos < sample->pos) || +- (FFABS(best_dts - dts) > AV_TIME_BASE && dts < best_dts)))))) { ++ ((FFABS(best_dts - dts) <= 4*AV_TIME_BASE && current_sample->pos < sample->pos) || ++ (FFABS(best_dts - dts) > 4*AV_TIME_BASE && dts < best_dts)))))) { + sample = current_sample; + best_dts = dts; + *st = avst; +-- +2.1.0 + diff --git a/package/ffmpeg/0010-fixed-memleak-in-mpegts-demuxer-on-some-malformed-mp.patch b/package/ffmpeg/0010-fixed-memleak-in-mpegts-demuxer-on-some-malformed-mp.patch new file mode 100644 index 0000000000..d13d0730b8 --- /dev/null +++ b/package/ffmpeg/0010-fixed-memleak-in-mpegts-demuxer-on-some-malformed-mp.patch @@ -0,0 +1,44 @@ +From cb7c19124165508ae5f38a385a14f9c13b096a27 Mon Sep 17 00:00:00 2001 +From: Joakim Plate +Date: Fri, 26 Nov 2010 20:56:48 +0000 +Subject: [PATCH 10/13] fixed: memleak in mpegts demuxer on some malformed (??) + mpegts files with too large pes packets + +at-visions sample file brokenStream.mpg + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + libavformat/mpegts.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c +index d5a8a45..e070f1f 100644 +--- a/libavformat/mpegts.c ++++ b/libavformat/mpegts.c +@@ -832,6 +832,10 @@ static void reset_pes_packet_state(PESContext *pes) + + static void new_pes_packet(PESContext *pes, AVPacket *pkt) + { ++ if(pkt->data) { ++ av_log(pes->stream, AV_LOG_ERROR, "ignoring previously allocated packet on stream %d\n", pkt->stream_index); ++ av_free_packet(pkt); ++ } + av_init_packet(pkt); + + pkt->buf = pes->buffer; +@@ -2649,6 +2653,8 @@ static int mpegts_read_packet(AVFormatContext *s, AVPacket *pkt) + + pkt->size = -1; + ts->pkt = pkt; ++ ts->pkt->data = NULL; ++ + ret = handle_packets(ts, 0); + if (ret < 0) { + av_free_packet(ts->pkt); +-- +2.1.0 + diff --git a/package/ffmpeg/0011-Speed-up-mpegts-av_find_stream_info.patch b/package/ffmpeg/0011-Speed-up-mpegts-av_find_stream_info.patch new file mode 100644 index 0000000000..7c81f1d5fd --- /dev/null +++ b/package/ffmpeg/0011-Speed-up-mpegts-av_find_stream_info.patch @@ -0,0 +1,30 @@ +From c315a758a292200c22925603682e259849d6d558 Mon Sep 17 00:00:00 2001 +From: Joakim Plate +Date: Mon, 28 Jun 2010 21:26:54 +0000 +Subject: [PATCH 11/13] Speed up mpegts av_find_stream_info + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + libavformat/mpegts.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c +index e070f1f..dd9e129 100644 +--- a/libavformat/mpegts.c ++++ b/libavformat/mpegts.c +@@ -994,7 +994,7 @@ static int mpegts_push_data(MpegTSFilter *filter, + goto skip; + + /* stream not present in PMT */ +- if (!pes->st) { ++ if (ts->auto_guess && !pes->st) { + if (ts->skip_changes) + goto skip; + +-- +2.1.0 + diff --git a/package/ffmpeg/0012-dxva-h264-Fix-dxva-playback-of-streams-that-don-t-st.patch b/package/ffmpeg/0012-dxva-h264-Fix-dxva-playback-of-streams-that-don-t-st.patch new file mode 100644 index 0000000000..f346da131f --- /dev/null +++ b/package/ffmpeg/0012-dxva-h264-Fix-dxva-playback-of-streams-that-don-t-st.patch @@ -0,0 +1,77 @@ +From 939ebbbc46ca9995637415594f1815633587104f Mon Sep 17 00:00:00 2001 +From: marc +Date: Mon, 18 Feb 2013 17:18:18 +0000 +Subject: [PATCH 12/13] dxva-h264 Fix dxva playback of streams that don't start + with an I-Frame. + +Patch part of the XBMC patch set for ffmpeg, downloaded from +https://github.com/xbmc/FFmpeg/. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + libavcodec/dxva2_h264.c | 8 ++++++++ + libavcodec/h264.c | 1 + + libavcodec/h264.h | 2 ++ + libavcodec/h264_slice.c | 1 + + 4 files changed, 12 insertions(+) + +diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c +index 6deccc3..85b25fd 100644 +--- a/libavcodec/dxva2_h264.c ++++ b/libavcodec/dxva2_h264.c +@@ -451,6 +451,14 @@ static int dxva2_h264_end_frame(AVCodecContext *avctx) + + if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0) + return -1; ++ ++ // Wait for an I-frame before start decoding. Workaround for ATI UVD and UVD+ GPUs ++ if (!h->got_first_iframe) { ++ if (!(ctx_pic->pp.wBitFields & (1 << 15))) ++ return -1; ++ h->got_first_iframe = 1; ++ } ++ + ret = ff_dxva2_common_end_frame(avctx, h->cur_pic_ptr->f, + &ctx_pic->pp, sizeof(ctx_pic->pp), + &ctx_pic->qm, sizeof(ctx_pic->qm), +diff --git a/libavcodec/h264.c b/libavcodec/h264.c +index 222bf58..ea2ec17 100644 +--- a/libavcodec/h264.c ++++ b/libavcodec/h264.c +@@ -1085,6 +1085,7 @@ void ff_h264_flush_change(H264Context *h) + h->mmco_reset = 1; + for (i = 0; i < h->nb_slice_ctx; i++) + h->slice_ctx[i].list_count = 0; ++ h->got_first_iframe = 0; + } + + /* forget old pics after a seek */ +diff --git a/libavcodec/h264.h b/libavcodec/h264.h +index b94f06b..bc9458b 100644 +--- a/libavcodec/h264.h ++++ b/libavcodec/h264.h +@@ -741,6 +741,8 @@ typedef struct H264Context { + int luma_weight_flag[2]; ///< 7.4.3.2 luma_weight_lX_flag + int chroma_weight_flag[2]; ///< 7.4.3.2 chroma_weight_lX_flag + ++ int got_first_iframe; ++ + // Timestamp stuff + int sei_buffering_period_present; ///< Buffering period SEI flag + int initial_cpb_removal_delay[32]; ///< Initial timestamps for CPBs +diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c +index 53f61ca..b171d78 100644 +--- a/libavcodec/h264_slice.c ++++ b/libavcodec/h264_slice.c +@@ -1189,6 +1189,7 @@ static int h264_slice_header_init(H264Context *h, int reinit) + ff_h264_free_tables(h, 0); + h->first_field = 0; + h->prev_interlaced_frame = 1; ++ h->got_first_iframe = 0; + + init_scan_tables(h); + ret = ff_h264_alloc_tables(h); +-- +2.1.0 + diff --git a/package/ffmpeg/Config.in b/package/ffmpeg/Config.in new file mode 100644 index 0000000000..096ff95c29 --- /dev/null +++ b/package/ffmpeg/Config.in @@ -0,0 +1,172 @@ +config BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + bool + # fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on nios2 + # ffmpeg's configure script only supports mips64 (r1) variant + default y if !BR2_nios2 && !BR2_mips_64r2 && !BR2_mips_64r6 + +menuconfig BR2_PACKAGE_FFMPEG + bool "ffmpeg" + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + help + FFmpeg is a complete, cross-platform solution to record, convert + and stream audio and video. + + http://www.ffmpeg.org + +if BR2_PACKAGE_FFMPEG + +config BR2_PACKAGE_FFMPEG_GPL + bool "Enable GPL code" + help + allow use of GPL code, the resulting libs and binaries will + be under GPL + +config BR2_PACKAGE_FFMPEG_NONFREE + bool "Enable nonfree code" + help + allow use of nonfree code, the resulting libs and binaries + will be unredistributable + +config BR2_PACKAGE_FFMPEG_FFMPEG + bool "Build ffmpeg (the command line application)" + default y + help + FFmpeg is a very fast video and audio converter. + It can also grab from a live audio/video source. + + It is not needed if you want to link the FFmpeg libraries + to your application. + +config BR2_PACKAGE_FFMPEG_FFPLAY + bool "Build ffplay" + select BR2_PACKAGE_FFMPEG_SWSCALE + select BR2_PACKAGE_SDL + help + FFplay is a very simple and portable media player using the + FFmpeg libraries and the SDL library. + It is mostly used as a testbed for the various FFmpeg APIs. + +config BR2_PACKAGE_FFMPEG_FFSERVER + bool "Build ffserver" + depends on BR2_USE_MMU # fork() + help + FFserver is a streaming server for both audio and video. + +config BR2_PACKAGE_FFMPEG_FFPROBE + bool "Build ffprobe" + help + FFprobe is a utility to determine the audio and video + characteristics of a container file. + +config BR2_PACKAGE_FFMPEG_AVRESAMPLE + bool "Build libavresample" + help + Avresample is a audio conversion library for compatibility. + +config BR2_PACKAGE_FFMPEG_POSTPROC + bool "Build libpostproc" + depends on BR2_PACKAGE_FFMPEG_GPL + help + Postproc is a library of video postprocessing routines. + +config BR2_PACKAGE_FFMPEG_SWSCALE + bool "Build libswscale" + help + Swscale is a library of video scaling routines. + +config BR2_PACKAGE_FFMPEG_ENCODERS + string "Enabled encoders" + default "all" + help + Space-separated list of encoders to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-encoders in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_DECODERS + string "Enabled decoders" + default "all" + help + Space-separated list of decoders to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-decoders in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_MUXERS + string "Enabled muxers" + default "all" + help + Space-separated list of muxers to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-muxers in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_DEMUXERS + string "Enabled demuxers" + default "all" + help + Space-separated list of demuxers to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-demuxers in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_PARSERS + string "Enabled parsers" + default "all" + help + Space-separated list of parsers to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-parsers in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_BSFS + string "Enabled bitstreams" + default "all" + help + Space-separated list of bitstream filters to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-bsfs in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_PROTOCOLS + string "Enabled protocols" + default "all" + help + Space-separated list of protocols to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-protocols in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_FILTERS + string "Enabled filters" + default "all" + help + Space-separated list of filters to build in FFmpeg, + or "all" to build all of them. + + Run ./configure --list-filters in the ffmpeg sources + directory to know the available options. + +config BR2_PACKAGE_FFMPEG_INDEVS + bool "Enable input devices" + default y + +config BR2_PACKAGE_FFMPEG_OUTDEVS + bool "Enable output devices" + default y + +config BR2_PACKAGE_FFMPEG_EXTRACONF + string "Additional parameters for ./configure" + default "" + help + Extra parameters that will be appended to FFmpeg's + ./configure commandline. + +endif diff --git a/package/ffmpeg/ffmpeg.hash b/package/ffmpeg/ffmpeg.hash new file mode 100644 index 0000000000..3120a7aa4c --- /dev/null +++ b/package/ffmpeg/ffmpeg.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 97be8a6c1cab2c52015544f76d40f6fd0babcb1b40cf601b4e57fb818564157c ffmpeg-2.8.7.tar.xz diff --git a/package/ffmpeg/ffmpeg.mk b/package/ffmpeg/ffmpeg.mk new file mode 100644 index 0000000000..a2026dc5b1 --- /dev/null +++ b/package/ffmpeg/ffmpeg.mk @@ -0,0 +1,488 @@ +################################################################################ +# +# ffmpeg +# +################################################################################ + +FFMPEG_VERSION = 2.8.7 +FFMPEG_SOURCE = ffmpeg-$(FFMPEG_VERSION).tar.xz +FFMPEG_SITE = http://ffmpeg.org/releases +FFMPEG_INSTALL_STAGING = YES + +FFMPEG_LICENSE = LGPLv2.1+, libjpeg license +FFMPEG_LICENSE_FILES = LICENSE.md COPYING.LGPLv2.1 +ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y) +FFMPEG_LICENSE += and GPLv2+ +FFMPEG_LICENSE_FILES += COPYING.GPLv2 +endif + +FFMPEG_CONF_OPTS = \ + --prefix=/usr \ + --enable-avfilter \ + --disable-version3 \ + --enable-logging \ + --enable-optimizations \ + --disable-extra-warnings \ + --enable-avdevice \ + --enable-avcodec \ + --enable-avformat \ + --disable-x11grab \ + --enable-network \ + --disable-gray \ + --enable-swscale-alpha \ + --disable-small \ + --enable-dct \ + --enable-fft \ + --enable-mdct \ + --enable-rdft \ + --disable-crystalhd \ + --disable-vdpau \ + --disable-dxva2 \ + --enable-runtime-cpudetect \ + --disable-hardcoded-tables \ + --disable-memalign-hack \ + --disable-mipsdspr1 \ + --disable-mipsdspr2 \ + --disable-msa \ + --enable-hwaccels \ + --disable-avisynth \ + --disable-frei0r \ + --disable-libopencore-amrnb \ + --disable-libopencore-amrwb \ + --disable-libopencv \ + --disable-libcdio \ + --disable-libdc1394 \ + --disable-libfaac \ + --disable-libgsm \ + --disable-libilbc \ + --disable-libnut \ + --disable-libopenjpeg \ + --disable-libschroedinger \ + --disable-libvo-aacenc \ + --disable-libvo-amrwbenc \ + --disable-symver \ + --disable-doc + +FFMPEG_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv) host-pkgconf + +ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y) +FFMPEG_CONF_OPTS += --enable-gpl +else +FFMPEG_CONF_OPTS += --disable-gpl +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_NONFREE),y) +FFMPEG_CONF_OPTS += --enable-nonfree +else +FFMPEG_CONF_OPTS += --disable-nonfree +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_FFMPEG),y) +FFMPEG_CONF_OPTS += --enable-ffmpeg +else +FFMPEG_CONF_OPTS += --disable-ffmpeg +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_FFPLAY),y) +FFMPEG_DEPENDENCIES += sdl +FFMPEG_CONF_OPTS += --enable-ffplay +FFMPEG_CONF_ENV += SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config +else +FFMPEG_CONF_OPTS += --disable-ffplay +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_FFSERVER),y) +FFMPEG_CONF_OPTS += --enable-ffserver +else +FFMPEG_CONF_OPTS += --disable-ffserver +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_AVRESAMPLE),y) +FFMPEG_CONF_OPTS += --enable-avresample +else +FFMPEG_CONF_OPTS += --disable-avresample +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_FFPROBE),y) +FFMPEG_CONF_OPTS += --enable-ffprobe +else +FFMPEG_CONF_OPTS += --disable-ffprobe +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y) +FFMPEG_CONF_OPTS += --enable-postproc +else +FFMPEG_CONF_OPTS += --disable-postproc +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y) +FFMPEG_CONF_OPTS += --enable-swscale +else +FFMPEG_CONF_OPTS += --disable-swscale +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),all) +FFMPEG_CONF_OPTS += --disable-encoders \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_ENCODERS)),--enable-encoder=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),all) +FFMPEG_CONF_OPTS += --disable-decoders \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DECODERS)),--enable-decoder=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),all) +FFMPEG_CONF_OPTS += --disable-muxers \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_MUXERS)),--enable-muxer=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),all) +FFMPEG_CONF_OPTS += --disable-demuxers \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_DEMUXERS)),--enable-demuxer=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),all) +FFMPEG_CONF_OPTS += --disable-parsers \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PARSERS)),--enable-parser=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),all) +FFMPEG_CONF_OPTS += --disable-bsfs \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_BSFS)),--enable-bsfs=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),all) +FFMPEG_CONF_OPTS += --disable-protocols \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_PROTOCOLS)),--enable-protocol=$(x)) +endif + +ifneq ($(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),all) +FFMPEG_CONF_OPTS += --disable-filters \ + $(foreach x,$(call qstrip,$(BR2_PACKAGE_FFMPEG_FILTERS)),--enable-filter=$(x)) +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_INDEVS),y) +FFMPEG_CONF_OPTS += --enable-indevs +else +FFMPEG_CONF_OPTS += --disable-indevs +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_OUTDEVS),y) +FFMPEG_CONF_OPTS += --enable-outdevs +else +FFMPEG_CONF_OPTS += --disable-outdevs +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +FFMPEG_CONF_OPTS += --enable-pthreads +else +FFMPEG_CONF_OPTS += --disable-pthreads +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +FFMPEG_CONF_OPTS += --enable-zlib +FFMPEG_DEPENDENCIES += zlib +else +FFMPEG_CONF_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +FFMPEG_CONF_OPTS += --enable-bzlib +FFMPEG_DEPENDENCIES += bzip2 +else +FFMPEG_CONF_OPTS += --disable-bzlib +endif + +ifeq ($(BR2_PACKAGE_FDK_AAC)$(BR2_PACKAGE_FFMPEG_NONFREE),yy) +FFMPEG_CONF_OPTS += --enable-libfdk-aac +FFMPEG_DEPENDENCIES += fdk-aac +else +FFMPEG_CONF_OPTS += --disable-libfdk-aac +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +FFMPEG_CONF_OPTS += --enable-gnutls --disable-openssl +FFMPEG_DEPENDENCIES += gnutls +else +FFMPEG_CONF_OPTS += --disable-gnutls +ifeq ($(BR2_PACKAGE_OPENSSL),y) +# openssl isn't license compatible with GPL +ifeq ($(BR2_PACKAGE_FFMPEG_GPL)x$(BR2_PACKAGE_FFMPEG_NONFREE),yx) +FFMPEG_CONF_OPTS += --disable-openssl +else +FFMPEG_CONF_OPTS += --enable-openssl +FFMPEG_DEPENDENCIES += openssl +endif +else +FFMPEG_CONF_OPTS += --disable-openssl +endif +endif + +ifeq ($(BR2_PACKAGE_LIBDCADEC),y) +FFMPEG_CONF_OPTS += --enable-libdcadec +FFMPEG_DEPENDENCIES += libdcadec +else +FFMPEG_CONF_OPTS += --disable-libdcadec +endif + +ifeq ($(BR2_PACKAGE_LIBOPENH264),y) +FFMPEG_CONF_OPTS += --enable-libopenh264 +FFMPEG_DEPENDENCIES += libopenh264 +else +FFMPEG_CONF_OPTS += --disable-libopenh264 +endif + +ifeq ($(BR2_PACKAGE_LIBVORBIS),y) +FFMPEG_DEPENDENCIES += libvorbis +FFMPEG_CONF_OPTS += \ + --enable-libvorbis \ + --enable-muxer=ogg \ + --enable-encoder=libvorbis +endif + +ifeq ($(BR2_PACKAGE_LIBVA),y) +FFMPEG_CONF_OPTS += --enable-vaapi +FFMPEG_DEPENDENCIES += libva +else +FFMPEG_CONF_OPTS += --disable-vaapi +endif + +ifeq ($(BR2_PACKAGE_OPUS),y) +FFMPEG_CONF_OPTS += --enable-libopus +FFMPEG_DEPENDENCIES += opus +else +FFMPEG_CONF_OPTS += --disable-libopus +endif + +ifeq ($(BR2_PACKAGE_LIBVPX),y) +FFMPEG_CONF_OPTS += --enable-libvpx +FFMPEG_DEPENDENCIES += libvpx +else +FFMPEG_CONF_OPTS += --disable-libvpx +endif + +ifeq ($(BR2_PACKAGE_LIBASS),y) +FFMPEG_CONF_OPTS += --enable-libass +FFMPEG_DEPENDENCIES += libass +else +FFMPEG_CONF_OPTS += --disable-libass +endif + +ifeq ($(BR2_PACKAGE_LIBBLURAY),y) +FFMPEG_CONF_OPTS += --enable-libbluray +FFMPEG_DEPENDENCIES += libbluray +else +FFMPEG_CONF_OPTS += --disable-libbluray +endif + +ifeq ($(BR2_PACKAGE_RTMPDUMP),y) +FFMPEG_CONF_OPTS += --enable-librtmp +FFMPEG_DEPENDENCIES += rtmpdump +else +FFMPEG_CONF_OPTS += --disable-librtmp +endif + +ifeq ($(BR2_PACKAGE_LAME),y) +FFMPEG_CONF_OPTS += --enable-libmp3lame +FFMPEG_DEPENDENCIES += lame +else +FFMPEG_CONF_OPTS += --disable-libmp3lame +endif + +ifeq ($(BR2_PACKAGE_LIBMODPLUG),y) +FFMPEG_CONF_OPTS += --enable-libmodplug +FFMPEG_DEPENDENCIES += libmodplug +else +FFMPEG_CONF_OPTS += --disable-libmodplug +endif + +ifeq ($(BR2_PACKAGE_SPEEX),y) +FFMPEG_CONF_OPTS += --enable-libspeex +FFMPEG_DEPENDENCIES += speex +else +FFMPEG_CONF_OPTS += --disable-libspeex +endif + +ifeq ($(BR2_PACKAGE_LIBTHEORA),y) +FFMPEG_CONF_OPTS += --enable-libtheora +FFMPEG_DEPENDENCIES += libtheora +else +FFMPEG_CONF_OPTS += --disable-libtheora +endif + +ifeq ($(BR2_PACKAGE_WAVPACK),y) +FFMPEG_CONF_OPTS += --enable-libwavpack +FFMPEG_DEPENDENCIES += wavpack +else +FFMPEG_CONF_OPTS += --disable-libwavpack +endif + +# ffmpeg freetype support require fenv.h which is only +# available/working on glibc. +# The microblaze variant doesn't provide the needed exceptions +ifeq ($(BR2_PACKAGE_FREETYPE)$(BR2_TOOLCHAIN_USES_GLIBC)x$(BR2_microblaze),yyx) +FFMPEG_CONF_OPTS += --enable-libfreetype +FFMPEG_DEPENDENCIES += freetype +else +FFMPEG_CONF_OPTS += --disable-libfreetype +endif + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +FFMPEG_CONF_OPTS += --enable-fontconfig +FFMPEG_DEPENDENCIES += fontconfig +else +FFMPEG_CONF_OPTS += --disable-fontconfig +endif + +ifeq ($(BR2_PACKAGE_X264)$(BR2_PACKAGE_FFMPEG_GPL),yy) +FFMPEG_CONF_OPTS += --enable-libx264 +FFMPEG_DEPENDENCIES += x264 +else +FFMPEG_CONF_OPTS += --disable-libx264 +endif + +ifeq ($(BR2_PACKAGE_X265)$(BR2_PACKAGE_FFMPEG_GPL),yy) +FFMPEG_CONF_OPTS += --enable-libx265 +FFMPEG_DEPENDENCIES += x265 +else +FFMPEG_CONF_OPTS += --disable-libx265 +endif + +ifeq ($(BR2_X86_CPU_HAS_MMX),y) +FFMPEG_CONF_OPTS += --enable-yasm +FFMPEG_DEPENDENCIES += host-yasm +else +ifeq ($(BR2_x86_i586),y) +# Needed to work around a bug with gcc 5.x: +# error: 'asm' operand has impossible constraints +FFMPEG_CONF_OPTS += --disable-inline-asm +endif +FFMPEG_CONF_OPTS += --disable-yasm +FFMPEG_CONF_OPTS += --disable-mmx +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE),y) +FFMPEG_CONF_OPTS += --enable-sse +else +FFMPEG_CONF_OPTS += --disable-sse +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE2),y) +FFMPEG_CONF_OPTS += --enable-sse2 +else +FFMPEG_CONF_OPTS += --disable-sse2 +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE3),y) +FFMPEG_CONF_OPTS += --enable-sse3 +else +FFMPEG_CONF_OPTS += --disable-sse3 +endif + +ifeq ($(BR2_X86_CPU_HAS_SSSE3),y) +FFMPEG_CONF_OPTS += --enable-ssse3 +else +FFMPEG_CONF_OPTS += --disable-ssse3 +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE4),y) +FFMPEG_CONF_OPTS += --enable-sse4 +else +FFMPEG_CONF_OPTS += --disable-sse4 +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE42),y) +FFMPEG_CONF_OPTS += --enable-sse42 +else +FFMPEG_CONF_OPTS += --disable-sse42 +endif + +ifeq ($(BR2_X86_CPU_HAS_AVX),y) +FFMPEG_CONF_OPTS += --enable-avx +else +FFMPEG_CONF_OPTS += --disable-avx +endif + +ifeq ($(BR2_X86_CPU_HAS_AVX2),y) +FFMPEG_CONF_OPTS += --enable-avx2 +else +FFMPEG_CONF_OPTS += --disable-avx2 +endif + +# Explicitly disable everything that doesn't match for ARM +# FFMPEG "autodetects" by compiling an extended instruction via AS +# This works on compilers that aren't built for generic by default +ifeq ($(BR2_ARM_CPU_ARMV4),y) +FFMPEG_CONF_OPTS += --disable-armv5te +endif +ifeq ($(BR2_ARM_CPU_ARMV6)$(BR2_ARM_CPU_ARMV7A),y) +FFMPEG_CONF_OPTS += --enable-armv6 +else +FFMPEG_CONF_OPTS += --disable-armv6 --disable-armv6t2 +endif +ifeq ($(BR2_ARM_CPU_HAS_VFPV2),y) +FFMPEG_CONF_OPTS += --enable-vfp +else +FFMPEG_CONF_OPTS += --disable-vfp +endif +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +FFMPEG_CONF_OPTS += --enable-neon +endif + +ifeq ($(BR2_MIPS_SOFT_FLOAT),y) +FFMPEG_CONF_OPTS += \ + --disable-mipsfpu +else +FFMPEG_CONF_OPTS += \ + --enable-mipsfpu +endif + +ifeq ($(BR2_mips_32r2),y) +FFMPEG_CONF_OPTS += \ + --enable-mips32r2 +else +FFMPEG_CONF_OPTS += \ + --disable-mips32r2 +endif + +ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y) +FFMPEG_CONF_OPTS += --enable-altivec +else +FFMPEG_CONF_OPTS += --disable-altivec +endif + +ifeq ($(BR2_STATIC_LIBS),) +FFMPEG_CONF_OPTS += --enable-pic +else +FFMPEG_CONF_OPTS += --disable-pic +endif + +ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),) +FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_CPU) +else ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) +FFMPEG_CONF_OPTS += --cpu=$(BR2_GCC_TARGET_ARCH) +endif + +FFMPEG_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_FFMPEG_EXTRACONF)) + +# Override FFMPEG_CONFIGURE_CMDS: FFmpeg does not support --target and others +define FFMPEG_CONFIGURE_CMDS + (cd $(FFMPEG_SRCDIR) && rm -rf config.cache && \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + $(FFMPEG_CONF_ENV) \ + ./configure \ + --enable-cross-compile \ + --cross-prefix=$(TARGET_CROSS) \ + --sysroot=$(STAGING_DIR) \ + --host-cc="$(HOSTCC)" \ + --arch=$(BR2_ARCH) \ + --target-os="linux" \ + --disable-stripping \ + --pkg-config="$(PKG_CONFIG_HOST_BINARY)" \ + $(SHARED_STATIC_LIBS_OPTS) \ + $(FFMPEG_CONF_OPTS) \ + ) +endef + +$(eval $(autotools-package)) diff --git a/package/fftw/Config.in b/package/fftw/Config.in new file mode 100644 index 0000000000..ef1138493f --- /dev/null +++ b/package/fftw/Config.in @@ -0,0 +1,78 @@ +config BR2_PACKAGE_FFTW + bool "fftw" + help + Library for computing Fast Fourier Transforms. + + This library computes Fast Fourier Transforms (FFT) in one + or more dimensions. It is extremely fast. This package + contains the shared library version of the fftw libraries in + double precision. + + http://www.fftw.org + +if BR2_PACKAGE_FFTW + +config BR2_PACKAGE_FFTW_USE_SSE + bool + +config BR2_PACKAGE_FFTW_USE_SSE2 + bool + +config BR2_PACKAGE_FFTW_USE_NEON + bool + +choice + prompt "fftw precision" + default BR2_PACKAGE_FFTW_PRECISION_DOUBLE + help + Selects fftw precision + +config BR2_PACKAGE_FFTW_PRECISION_SINGLE + bool "single" + select BR2_PACKAGE_FFTW_USE_SSE if BR2_X86_CPU_HAS_SSE + select BR2_PACKAGE_FFTW_USE_SSE2 if BR2_X86_CPU_HAS_SSE2 + select BR2_PACKAGE_FFTW_USE_NEON if BR2_ARM_CPU_HAS_NEON && !BR2_ARM_SOFT_FLOAT + help + Compile fftw in single precision, i.e. use 'float' for floating + point type. + +config BR2_PACKAGE_FFTW_PRECISION_DOUBLE + bool "double" + select BR2_PACKAGE_FFTW_USE_SSE2 if BR2_X86_CPU_HAS_SSE2 + help + Compile fftw in double precision (the default), i.e. use 'double' + for floating point type. + +config BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE + bool "long double" + # long-double precision require long-double trigonometric routines + depends on !(BR2_TOOLCHAIN_BUILDROOT_UCLIBC && \ + (BR2_arm || BR2_mips || BR2_mipsel)) + help + Compile fftw in long double precision, i.e. use 'long double' + for floating point type. + +config BR2_PACKAGE_FFTW_PRECISION_QUAD + bool "quad" + # quad-precision needs to have a gcc with libquadmath + depends on (BR2_i386 || BR2_x86_64) && BR2_USE_WCHAR + help + Compile fftw in quadruple precision, i.e. use '__float128' for + floating point type. + +endchoice + +config BR2_PACKAGE_FFTW_FAST + bool "optimise for speed over accuracy" + help + Optimise for fast math functions, at the expense of accuracy. + + Say 'y' if you need speed and can live with inaccuracies in + the results. Say 'n' (the default) if accuracy is of utmost + importance. + + This basically uses gcc's -Ofast optimisation level, which in + turn is basically using gcc's -ffast-math. See the gcc manual + for what this means. + +endif diff --git a/package/fftw/fftw.hash b/package/fftw/fftw.hash new file mode 100644 index 0000000000..62b8f0f0d4 --- /dev/null +++ b/package/fftw/fftw.hash @@ -0,0 +1,2 @@ +# From http://www.fftw.org/fftw-3.3.4.tar.gz.md5sum +md5 2edab8c06b24feeb3b82bbb3ebf3e7b3 fftw-3.3.4.tar.gz diff --git a/package/fftw/fftw.mk b/package/fftw/fftw.mk new file mode 100644 index 0000000000..5045ab6fed --- /dev/null +++ b/package/fftw/fftw.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# fftw +# +################################################################################ + +FFTW_VERSION = 3.3.4 +FFTW_SITE = http://www.fftw.org +FFTW_INSTALL_STAGING = YES +FFTW_LICENSE = GPLv2+ +FFTW_LICENSE_FILES = COPYING + +FFTW_CONF_OPTS = --disable-fortran + +FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_SINGLE),--enable,--disable)-single +FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),--enable,--disable)-long-double +FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_PRECISION_QUAD),--enable,--disable)-quad-precision + +FFTW_CFLAGS = $(TARGET_CFLAGS) +ifeq ($(BR2_PACKAGE_FFTW_FAST),y) +FFTW_CFLAGS += -O3 -ffast-math +endif + +# x86 optimisations +FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE),--enable,--disable)-sse +FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_SSE2),--enable,--disable)-sse2 + +# ARM optimisations +FFTW_CONF_OPTS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),--enable,--disable)-neon +FFTW_CFLAGS += $(if $(BR2_PACKAGE_FFTW_USE_NEON),-mfpu=neon) + +# Generic optimisations +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +FFTW_CONF_OPTS += --enable-threads --with-combined-threads +else +FFTW_CONF_OPTS += --disable-threads +endif +FFTW_CONF_OPTS += $(if $(BR2_GCC_ENABLE_OPENMP),--enable,--disable)-openmp + +FFTW_CONF_OPTS += CFLAGS="$(FFTW_CFLAGS)" + +$(eval $(autotools-package)) diff --git a/package/file/Config.in b/package/file/Config.in new file mode 100644 index 0000000000..13934b2239 --- /dev/null +++ b/package/file/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_FILE + bool "file" + select BR2_PACKAGE_ZLIB + help + Program to identify a file's format by scanning binary data + for known patterns. + + http://www.darwinsys.com/file/ diff --git a/package/file/file.hash b/package/file/file.hash new file mode 100644 index 0000000000..2c53af1dce --- /dev/null +++ b/package/file/file.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 2ef32b4ec936b0ff7b59a021dce56086a716663b6df1138c7ea597d396bf50cf file-5.26.tar.gz diff --git a/package/file/file.mk b/package/file/file.mk new file mode 100644 index 0000000000..282b2da080 --- /dev/null +++ b/package/file/file.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# file +# +################################################################################ + +FILE_VERSION = 5.26 +FILE_SITE = ftp://ftp.astron.com/pub/file +FILE_DEPENDENCIES = host-file zlib +FILE_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' +FILE_INSTALL_STAGING = YES +FILE_LICENSE = BSD-2c, one file BSD-4c, one file BSD-3c +FILE_LICENSE_FILES = COPYING src/mygetopt.h src/vasprintf.c + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/filemq/Config.in b/package/filemq/Config.in new file mode 100644 index 0000000000..4460f87cef --- /dev/null +++ b/package/filemq/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_FILEMQ + bool "filemq" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_CZMQ + select BR2_PACKAGE_ZEROMQ + depends on BR2_INSTALL_LIBSTDCPP # zeromq + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + depends on BR2_USE_MMU # czmq + help + FileMQ is a publish-subscribe file service based on 0MQ. + + http://github.com/zeromq/filemq + +comment "filemq needs a toolchain w/ C++, wchar, threads" + depends on BR2_USE_MMU + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && \ + BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/filemq/filemq.mk b/package/filemq/filemq.mk new file mode 100644 index 0000000000..a79e8f4965 --- /dev/null +++ b/package/filemq/filemq.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# filemq +# +################################################################################ + +FILEMQ_VERSION = acf6c0e003fee938994ad803aa7b78245dca57ba +FILEMQ_SITE = $(call github,zeromq,filemq,$(FILEMQ_VERSION)) + +FILEMQ_AUTORECONF = YES +FILEMQ_CONF_ENV = fmq_have_asciidoc=no +FILEMQ_INSTALL_STAGING = YES +FILEMQ_DEPENDENCIES = czmq openssl zeromq +FILEMQ_LICENSE = LGPLv3+ with exceptions +FILEMQ_LICENSE_FILES = COPYING COPYING.LESSER + +define FILEMQ_CREATE_CONFIG_DIR + mkdir -p $(@D)/config +endef + +FILEMQ_POST_PATCH_HOOKS += FILEMQ_CREATE_CONFIG_DIR + +$(eval $(autotools-package)) diff --git a/package/findutils/Config.in b/package/findutils/Config.in new file mode 100644 index 0000000000..c93d9d8c29 --- /dev/null +++ b/package/findutils/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_FINDUTILS + bool "findutils" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + help + Basic directory searching utilities. Provides the + common 'find', 'xargs', 'locate', and 'updatedb' binaries. + + http://www.gnu.org/software/findutils/findutils.html + +comment "findutils needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/findutils/findutils.hash b/package/findutils/findutils.hash new file mode 100644 index 0000000000..d5c5519304 --- /dev/null +++ b/package/findutils/findutils.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 ded4c9f73731cd48fec3b6bdaccce896473b6d8e337e9612e16cf1431bb1169d findutils-4.6.0.tar.gz diff --git a/package/findutils/findutils.mk b/package/findutils/findutils.mk new file mode 100644 index 0000000000..8f6b099065 --- /dev/null +++ b/package/findutils/findutils.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# findutils +# +################################################################################ + +FINDUTILS_VERSION = 4.6.0 +FINDUTILS_SITE = $(BR2_GNU_MIRROR)/findutils +FINDUTILS_LICENSE = GPLv3+ +FINDUTILS_LICENSE_FILES = COPYING +FINDUTILS_CONF_ENV = \ + gl_cv_func_stdin=yes \ + ac_cv_func_working_mktime=yes \ + gl_cv_func_wcwidth_works=yes + +$(eval $(autotools-package)) diff --git a/package/fio/0001-Fix-compile-of-test-programs-on-archs-that-use-arch_.patch b/package/fio/0001-Fix-compile-of-test-programs-on-archs-that-use-arch_.patch new file mode 100644 index 0000000000..f9f48263a2 --- /dev/null +++ b/package/fio/0001-Fix-compile-of-test-programs-on-archs-that-use-arch_.patch @@ -0,0 +1,126 @@ +From 71471cb1d05f3877c8fb935fbf70a6bae789ac49 Mon Sep 17 00:00:00 2001 +From: Jens Axboe +Date: Thu, 10 Mar 2016 08:09:41 -0700 +Subject: [PATCH] Fix compile of test programs on archs that use arch_flags at + runtime + +SuperH compile currently fails with: + +gettime.o: In function fio_gettime': +/home/thomas/projets/buildroot/output/build/fio-fio-2.7/gettime.c:163: undefined reference to arch_flags' +gettime.o: In function utime_since_now': +/home/thomas/projets/buildroot/output/build/fio-fio-2.7/gettime.c:164: undefined reference to arch_flags' +gettime.o: In function mtime_since_now': +/home/thomas/projets/buildroot/output/build/fio-fio-2.7/gettime.c:164: undefined reference to arch_flags' +gettime.o: In function time_since_now': +/home/thomas/projets/buildroot/output/build/fio-fio-2.7/gettime.c:164: undefined reference to arch_flags' +mutex.o: In function fio_mutex_up': +/home/thomas/projets/buildroot/output/build/fio-fio-2.7/mutex.c:189: undefined reference to arch_flags' +collect2: error: ld returned 1 exit status +Makefile:375: recipe for target 't/stest' failed +make[2]: *** [t/stest] Error 1 +make[2]: *** Waiting for unfinished jobs.... + +Fix that by ensuring we have a stub arch.o with the necessary arch flags +for the standalone test programs. + +Signed-off-by: Jens Axboe +--- + Makefile | 6 +++--- + t/arch.c | 5 +++++ + t/dedupe.c | 1 + + t/lfsr-test.c | 2 ++ + t/stest.c | 2 ++ + 5 files changed, 13 insertions(+), 3 deletions(-) + create mode 100644 t/arch.c + +diff --git a/Makefile b/Makefile +index 6b4c9db..a2502dc 100644 +--- a/Makefile ++++ b/Makefile +@@ -191,7 +191,7 @@ endif + -include $(OBJS:.o=.d) + + T_SMALLOC_OBJS = t/stest.o +-T_SMALLOC_OBJS += gettime.o mutex.o smalloc.o t/log.o t/debug.o ++T_SMALLOC_OBJS += gettime.o mutex.o smalloc.o t/log.o t/debug.o t/arch.o + T_SMALLOC_PROGS = t/stest + + T_IEEE_OBJS = t/ieee754.o +@@ -208,7 +208,7 @@ T_AXMAP_OBJS += lib/lfsr.o lib/axmap.o + T_AXMAP_PROGS = t/axmap + + T_LFSR_TEST_OBJS = t/lfsr-test.o +-T_LFSR_TEST_OBJS += lib/lfsr.o gettime.o t/log.o t/debug.o ++T_LFSR_TEST_OBJS += lib/lfsr.o gettime.o t/log.o t/debug.o t/arch.o + T_LFSR_TEST_PROGS = t/lfsr-test + + T_GEN_RAND_OBJS = t/gen-rand.o +@@ -223,7 +223,7 @@ endif + + T_DEDUPE_OBJS = t/dedupe.o + T_DEDUPE_OBJS += lib/rbtree.o t/log.o mutex.o smalloc.o gettime.o crc/md5.o \ +- lib/memalign.o lib/bloom.o t/debug.o crc/xxhash.o \ ++ lib/memalign.o lib/bloom.o t/debug.o crc/xxhash.o t/arch.o \ + crc/murmur3.o crc/crc32c.o crc/crc32c-intel.o crc/fnv.o + T_DEDUPE_PROGS = t/fio-dedupe + +diff --git a/t/arch.c b/t/arch.c +new file mode 100644 +index 0000000..befb7c7 +--- /dev/null ++++ b/t/arch.c +@@ -0,0 +1,5 @@ ++#include "../arch/arch.h" ++ ++unsigned long arch_flags = 0; ++int tsc_reliable; ++int arch_random; +diff --git a/t/dedupe.c b/t/dedupe.c +index 3a66820..7856da1 100644 +--- a/t/dedupe.c ++++ b/t/dedupe.c +@@ -537,6 +537,7 @@ int main(int argc, char *argv[]) + uint64_t nextents = 0, nchunks = 0; + int c, ret; + ++ arch_init(argv); + debug_init(); + + while ((c = getopt(argc, argv, "b:t:d:o:c:p:B:")) != -1) { +diff --git a/t/lfsr-test.c b/t/lfsr-test.c +index 4352b89..bad5097 100644 +--- a/t/lfsr-test.c ++++ b/t/lfsr-test.c +@@ -38,6 +38,8 @@ int main(int argc, char *argv[]) + void *v = NULL, *v_start; + double total, mean; + ++ arch_init(argv); ++ + /* Read arguments */ + switch (argc) { + case 5: if (strncmp(argv[4], "verify", 7) == 0) +diff --git a/t/stest.c b/t/stest.c +index fb51989..0e0d8b0 100644 +--- a/t/stest.c ++++ b/t/stest.c +@@ -4,6 +4,7 @@ + + #include "../smalloc.h" + #include "../flist.h" ++#include "../arch/arch.h" + #include "debug.h" + + #define MAGIC1 0xa9b1c8d2 +@@ -69,6 +70,7 @@ static int do_specific_alloc(unsigned long size) + + int main(int argc, char *argv[]) + { ++ arch_init(argv); + sinit(); + debug_init(); + +-- +2.6.4 + diff --git a/package/fio/Config.in b/package/fio/Config.in new file mode 100644 index 0000000000..89f54f99a2 --- /dev/null +++ b/package/fio/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_FIO + bool "fio" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_TOOLCHAIN_HAS_THREADS + # fio uses posix_madvise(), which is not part of any official + # release of uClibc, but is part of uClibc Git, and backported + # in Buildroot patch set of uClibc 0.9.33. Therefore, we + # disable the build of fio for external uClibc toolchains + # (which use an unknown uClibc version) + depends on !BR2_TOOLCHAIN_EXTERNAL_UCLIBC + # fio uses fallocate() which becomes fallocate64() while compiling with + # largefile support, but fallocate64() is not available on nios2 + depends on !BR2_nios2 + help + fio is an I/O tool meant to be used both for benchmark + and stress/hardware verification. + + http://git.kernel.dk/?p=fio.git;a=summary + +comment "fio needs a toolchain w/ dynamic library, threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_nios2 + depends on BR2_USE_MMU diff --git a/package/fio/fio.mk b/package/fio/fio.mk new file mode 100644 index 0000000000..6c4ad6c4ca --- /dev/null +++ b/package/fio/fio.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# fio +# +################################################################################ + +FIO_VERSION = fio-2.7 +FIO_SITE = git://git.kernel.dk/fio.git +FIO_LICENSE = GPLv2 + special obligations +FIO_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBAIO),y) +FIO_DEPENDENCIES += libaio +endif + +define FIO_CONFIGURE_CMDS + (cd $(@D); ./configure --cc="$(TARGET_CC)" --extra-cflags="$(TARGET_CFLAGS)") +endef + +define FIO_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define FIO_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/fio $(TARGET_DIR)/usr/bin/fio +endef + +$(eval $(generic-package)) diff --git a/package/fis/0001-checksum.patch b/package/fis/0001-checksum.patch new file mode 100644 index 0000000000..a6325eb01a --- /dev/null +++ b/package/fis/0001-checksum.patch @@ -0,0 +1,274 @@ +diff -uN fis.orig/crc.c fis/crc.c +--- fis.orig/crc.c 1970-01-01 10:00:00.000000000 +1000 ++++ fis/crc.c 2008-04-01 11:39:13.000000000 +1100 +@@ -0,0 +1,88 @@ ++/* ++ * crc.c ++ * ++ * $Id: crc.c,v 1.1 2006/02/13 09:58:08 andrzej Exp $ ++ * ++ * Gary S. Brown's CRC ++ * Code based on Gary S. Brown CRC (1986). ++ * Generation polynomial is: ++ * X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 ++ * ++ * Copyright (C) 2006 Ekiert sp z o.o. ++ * Author: Andrzej Ekiert ++ * ++ * 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. ++ */ ++ ++#include ++ ++#include "crc.h" ++ ++static const uint32_t crc32_tab[] = { ++ 0x00000000L, 0x77073096L, 0xee0e612cL, 0x990951baL, 0x076dc419L, ++ 0x706af48fL, 0xe963a535L, 0x9e6495a3L, 0x0edb8832L, 0x79dcb8a4L, ++ 0xe0d5e91eL, 0x97d2d988L, 0x09b64c2bL, 0x7eb17cbdL, 0xe7b82d07L, ++ 0x90bf1d91L, 0x1db71064L, 0x6ab020f2L, 0xf3b97148L, 0x84be41deL, ++ 0x1adad47dL, 0x6ddde4ebL, 0xf4d4b551L, 0x83d385c7L, 0x136c9856L, ++ 0x646ba8c0L, 0xfd62f97aL, 0x8a65c9ecL, 0x14015c4fL, 0x63066cd9L, ++ 0xfa0f3d63L, 0x8d080df5L, 0x3b6e20c8L, 0x4c69105eL, 0xd56041e4L, ++ 0xa2677172L, 0x3c03e4d1L, 0x4b04d447L, 0xd20d85fdL, 0xa50ab56bL, ++ 0x35b5a8faL, 0x42b2986cL, 0xdbbbc9d6L, 0xacbcf940L, 0x32d86ce3L, ++ 0x45df5c75L, 0xdcd60dcfL, 0xabd13d59L, 0x26d930acL, 0x51de003aL, ++ 0xc8d75180L, 0xbfd06116L, 0x21b4f4b5L, 0x56b3c423L, 0xcfba9599L, ++ 0xb8bda50fL, 0x2802b89eL, 0x5f058808L, 0xc60cd9b2L, 0xb10be924L, ++ 0x2f6f7c87L, 0x58684c11L, 0xc1611dabL, 0xb6662d3dL, 0x76dc4190L, ++ 0x01db7106L, 0x98d220bcL, 0xefd5102aL, 0x71b18589L, 0x06b6b51fL, ++ 0x9fbfe4a5L, 0xe8b8d433L, 0x7807c9a2L, 0x0f00f934L, 0x9609a88eL, ++ 0xe10e9818L, 0x7f6a0dbbL, 0x086d3d2dL, 0x91646c97L, 0xe6635c01L, ++ 0x6b6b51f4L, 0x1c6c6162L, 0x856530d8L, 0xf262004eL, 0x6c0695edL, ++ 0x1b01a57bL, 0x8208f4c1L, 0xf50fc457L, 0x65b0d9c6L, 0x12b7e950L, ++ 0x8bbeb8eaL, 0xfcb9887cL, 0x62dd1ddfL, 0x15da2d49L, 0x8cd37cf3L, ++ 0xfbd44c65L, 0x4db26158L, 0x3ab551ceL, 0xa3bc0074L, 0xd4bb30e2L, ++ 0x4adfa541L, 0x3dd895d7L, 0xa4d1c46dL, 0xd3d6f4fbL, 0x4369e96aL, ++ 0x346ed9fcL, 0xad678846L, 0xda60b8d0L, 0x44042d73L, 0x33031de5L, ++ 0xaa0a4c5fL, 0xdd0d7cc9L, 0x5005713cL, 0x270241aaL, 0xbe0b1010L, ++ 0xc90c2086L, 0x5768b525L, 0x206f85b3L, 0xb966d409L, 0xce61e49fL, ++ 0x5edef90eL, 0x29d9c998L, 0xb0d09822L, 0xc7d7a8b4L, 0x59b33d17L, ++ 0x2eb40d81L, 0xb7bd5c3bL, 0xc0ba6cadL, 0xedb88320L, 0x9abfb3b6L, ++ 0x03b6e20cL, 0x74b1d29aL, 0xead54739L, 0x9dd277afL, 0x04db2615L, ++ 0x73dc1683L, 0xe3630b12L, 0x94643b84L, 0x0d6d6a3eL, 0x7a6a5aa8L, ++ 0xe40ecf0bL, 0x9309ff9dL, 0x0a00ae27L, 0x7d079eb1L, 0xf00f9344L, ++ 0x8708a3d2L, 0x1e01f268L, 0x6906c2feL, 0xf762575dL, 0x806567cbL, ++ 0x196c3671L, 0x6e6b06e7L, 0xfed41b76L, 0x89d32be0L, 0x10da7a5aL, ++ 0x67dd4accL, 0xf9b9df6fL, 0x8ebeeff9L, 0x17b7be43L, 0x60b08ed5L, ++ 0xd6d6a3e8L, 0xa1d1937eL, 0x38d8c2c4L, 0x4fdff252L, 0xd1bb67f1L, ++ 0xa6bc5767L, 0x3fb506ddL, 0x48b2364bL, 0xd80d2bdaL, 0xaf0a1b4cL, ++ 0x36034af6L, 0x41047a60L, 0xdf60efc3L, 0xa867df55L, 0x316e8eefL, ++ 0x4669be79L, 0xcb61b38cL, 0xbc66831aL, 0x256fd2a0L, 0x5268e236L, ++ 0xcc0c7795L, 0xbb0b4703L, 0x220216b9L, 0x5505262fL, 0xc5ba3bbeL, ++ 0xb2bd0b28L, 0x2bb45a92L, 0x5cb36a04L, 0xc2d7ffa7L, 0xb5d0cf31L, ++ 0x2cd99e8bL, 0x5bdeae1dL, 0x9b64c2b0L, 0xec63f226L, 0x756aa39cL, ++ 0x026d930aL, 0x9c0906a9L, 0xeb0e363fL, 0x72076785L, 0x05005713L, ++ 0x95bf4a82L, 0xe2b87a14L, 0x7bb12baeL, 0x0cb61b38L, 0x92d28e9bL, ++ 0xe5d5be0dL, 0x7cdcefb7L, 0x0bdbdf21L, 0x86d3d2d4L, 0xf1d4e242L, ++ 0x68ddb3f8L, 0x1fda836eL, 0x81be16cdL, 0xf6b9265bL, 0x6fb077e1L, ++ 0x18b74777L, 0x88085ae6L, 0xff0f6a70L, 0x66063bcaL, 0x11010b5cL, ++ 0x8f659effL, 0xf862ae69L, 0x616bffd3L, 0x166ccf45L, 0xa00ae278L, ++ 0xd70dd2eeL, 0x4e048354L, 0x3903b3c2L, 0xa7672661L, 0xd06016f7L, ++ 0x4969474dL, 0x3e6e77dbL, 0xaed16a4aL, 0xd9d65adcL, 0x40df0b66L, ++ 0x37d83bf0L, 0xa9bcae53L, 0xdebb9ec5L, 0x47b2cf7fL, 0x30b5ffe9L, ++ 0xbdbdf21cL, 0xcabac28aL, 0x53b39330L, 0x24b4a3a6L, 0xbad03605L, ++ 0xcdd70693L, 0x54de5729L, 0x23d967bfL, 0xb3667a2eL, 0xc4614ab8L, ++ 0x5d681b02L, 0x2a6f2b94L, 0xb40bbe37L, 0xc30c8ea1L, 0x5a05df1bL, ++ 0x2d02ef8dL ++ }; ++ ++uint32_t crc32(uint8_t *s, uint32_t len) ++{ ++ uint32_t i, val = 0; ++ ++ for (i = 0; i < len; i++) { ++ val = crc32_tab[(val^s[i]) & 0xff] ^ (val >> 8); ++ } ++ return val; ++} ++ +diff -uN fis.orig/crc.h fis/crc.h +--- fis.orig/crc.h 1970-01-01 10:00:00.000000000 +1000 ++++ fis/crc.h 2008-04-01 11:39:13.000000000 +1100 +@@ -0,0 +1,25 @@ ++/* ++ * crc.h ++ * ++ * $Id: crc.h,v 1.1 2006/02/13 09:58:08 andrzej Exp $ ++ * ++ * Gary S. Brown's CRC - header. ++ * ++ * Copyright (C) 2006 Ekiert sp z o.o. ++ * Author: Andrzej Ekiert ++ * ++ * 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. ++ */ ++ ++#ifndef CRC_H ++#define CRC_H ++ ++#include ++ ++uint32_t crc32(uint8_t *s, uint32_t len); ++ ++#endif //CRC_H ++ +diff -uN fis.orig/fis.c fis/fis.c +--- fis.orig/fis.c 2007-05-03 06:42:51.000000000 +1000 ++++ fis/fis.c 2008-04-01 11:52:11.000000000 +1100 +@@ -30,6 +30,7 @@ + #include + #include + ++#include "crc.h" + + // Report an error and terminate: + +@@ -141,8 +142,8 @@ + + static void dump_desc(FILE* f, const struct fis_image_desc* d) + { +- fprintf(f,"%16s: addr = 0x%08x, size = 0x%08x\n", +- d->name, d->flash_base, d->size); ++ fprintf(f,"%16s: flash addr = 0x%08x, mem addr = 0x%08x, size = 0x%08x, checksum = 0x%08x\n", ++ d->name, d->flash_base, d->mem_base, d->size, d->file_cksum); + for (unsigned int i=0; i<(sizeof(d->skips)/4); ++i) { + if (d->skips[i]==0x736b6970 || d->skips[i]==0x70696b73) { // "skip" + uint32_t offset = d->skips[i+1]; +@@ -332,6 +333,7 @@ + d->size = swap_end_32(d->size); + d->entry_point = swap_end_32(d->entry_point); + d->data_length = swap_end_32(d->data_length); ++ d->file_cksum = swap_end_32(d->file_cksum); + for (unsigned int i=0; i<(sizeof(d->skips)/4); ++i) { + d->skips[i] = swap_end_32(d->skips[i]); + } +@@ -446,19 +448,25 @@ + char* arg=argv[i]; + if (strcmp(arg,"-l")==0) { + if (i==argc-1) { +- fatal("argumnet missing for -l"); ++ fatal("argument missing for -l"); + } + ++i; + d->size = str_to_int_maybe_hex(argv[i]); + } else if (strcmp(arg,"-f")==0) { + if (i==argc-1) { +- fatal("argumnet missing for -f"); ++ fatal("argument missing for -f"); + } + ++i; + d->flash_base = str_to_int_maybe_hex(argv[i]); ++ } else if (strcmp(arg,"-m")==0) { ++ if (i==argc-1) { ++ fatal("argument missing for -m"); ++ } ++ ++i; ++ d->mem_base = str_to_int_maybe_hex(argv[i]); + } else if (strcmp(arg,"-n")==0) { + if (i==argc-1) { +- fatal("argumnet missing for -n"); ++ fatal("argument missing for -n"); + } + ++i; + char* name = argv[i]; +@@ -499,6 +507,66 @@ + save_dir(fd,offset,size,swap_endianness,dir); + } + ++static void fis_checksum(const char* device, int offset, int size, bool swap_endianness, ++ int argc, char* argv[]) ++{ ++ char* name = NULL; ++ char* filename = NULL; ++ ++ for (int i=0; i=16) { ++ fatal("name too long, max 16 chars including terminating null"); ++ } ++ } else { ++ fputs("Unrecognised option '",stderr); ++ fputs(arg,stderr); ++ fputs("'\n",stderr); ++ exit(1); ++ } ++ } ++ ++ if (name == NULL || filename == NULL) ++ fatal("filename and partition name must be specified"); ++ ++ int fd; ++ char *buf; ++ struct stat stat_buf; ++ uint32_t crc; ++ ++ CHECK(fd=open(filename,O_RDONLY),-1); ++ CHECK(stat(filename, &stat_buf),-1); ++ buf = (char*)chk_malloc(stat_buf.st_size); ++ CHECK(read(fd,buf,stat_buf.st_size),-1); ++ crc = crc32(buf,stat_buf.st_size); ++ close(fd); ++ free(buf); ++ ++ CHECK(fd=open(device,O_RDWR),-1); ++ dir_t dir; ++ load_dir(fd,offset,&size,swap_endianness,&dir); ++ iter_t after = NULL; ++ FOR_EACH_DIR_ENTRY(dir,i) { ++ if (strcmp(get(i)->name, name) == 0) { ++ get(i)->file_cksum = crc; ++ get(i)->data_length = stat_buf.st_size; ++ break; ++ } ++ } ++ save_dir(fd,offset,size,swap_endianness,dir); ++} + + static void fis_delete(const char* device, int offset, int size, bool swap_endianness, + char* name) +@@ -526,8 +594,9 @@ + fputs("Usage:\n" + " fis [options] list\n" + " fis [options] init\n" +- " fis [options] create -f address -l size -n name\n" ++ " fis [options] create -f address -l size -n name [-m memory_address]\n" + " fis [options] delete name\n" ++ " fis [options] checksum -f filename -n name\n" + "Options:\n" + " -d device specify /dev/mtd* device containing directory\n" + " -o offset specify offset into device of start of directory\n" +@@ -597,9 +666,14 @@ + fis_create(device,offset,size,swap_endianness, + argc-i-1,&argv[i+1]); + break; ++ } else if (strcmp(arg,"checksum")==0) { ++ check_dev(device); ++ fis_checksum(device,offset,size,swap_endianness, ++ argc-i-1,&argv[i+1]); ++ break; + } else if (strcmp(arg,"delete")==0) { + if (i!=argc-2) { +- fatal("Exactly one argumnet required after 'delete'"); ++ fatal("Exactly one argument required after 'delete'"); + } + ++i; + char* name = argv[i]; diff --git a/package/fis/0003-list_output.patch b/package/fis/0003-list_output.patch new file mode 100644 index 0000000000..6c1e4eb9dd --- /dev/null +++ b/package/fis/0003-list_output.patch @@ -0,0 +1,21 @@ +--- fis.orig/fis.c 2010-05-12 10:22:10.000000000 -0700 ++++ fis/fis.c 2010-05-12 10:19:24.000000000 -0700 +@@ -142,8 +142,8 @@ + + static void dump_desc(FILE* f, const struct fis_image_desc* d) + { +- fprintf(f,"%16s: flash addr = 0x%08x, mem addr = 0x%08x, size = 0x%08x, checksum = 0x%08x\n", +- d->name, d->flash_base, d->mem_base, d->size, d->file_cksum); ++ fprintf(f,"%-16s 0x%08x 0x%08x 0x%08x 0x%08x 0x%08x\n", ++ d->name, d->flash_base, d->mem_base, d->size, d->entry_point, d->file_cksum); + for (unsigned int i=0; i<(sizeof(d->skips)/4); ++i) { + if (d->skips[i]==0x736b6970 || d->skips[i]==0x70696b73) { // "skip" + uint32_t offset = d->skips[i+1]; +@@ -400,6 +400,7 @@ + CHECK(fd=open(device,O_RDONLY),-1); + dir_t dir; + load_dir(fd,offset,&size,swap_endianness,&dir); ++ fprintf(stdout,"Name FLASH addr Mem addr Length Entry point Checksum\n"); + FOR_EACH_DIR_ENTRY(dir,i) { + dump_desc(stdout,get(i)); + } diff --git a/package/fis/0004-sorted_list.patch b/package/fis/0004-sorted_list.patch new file mode 100644 index 0000000000..6854977ba4 --- /dev/null +++ b/package/fis/0004-sorted_list.patch @@ -0,0 +1,30 @@ +--- fis.orig/fis.c 2010-05-12 11:09:22.000000000 -0700 ++++ fis/fis.c 2010-05-12 11:05:45.000000000 -0700 +@@ -401,9 +401,24 @@ + dir_t dir; + load_dir(fd,offset,&size,swap_endianness,&dir); + fprintf(stdout,"Name FLASH addr Mem addr Length Entry point Checksum\n"); +- FOR_EACH_DIR_ENTRY(dir,i) { +- dump_desc(stdout,get(i)); +- } ++ uint32_t last_addr = 0; ++ bool image_found; ++ do { ++ uint32_t lowest_addr = 0xffffffff; ++ iter_t index; ++ image_found = false; ++ FOR_EACH_DIR_ENTRY(dir,i) { ++ const struct fis_image_desc *d = get(i); ++ if ((d->flash_base >= last_addr) && (d->flash_base < lowest_addr)) { ++ lowest_addr = d->flash_base; ++ image_found = true; ++ index = i; ++ } ++ } ++ if (image_found) ++ dump_desc(stdout,get(index)); ++ last_addr = lowest_addr + 1; ++ } while (image_found == true); + } + + diff --git a/package/fis/Config.in b/package/fis/Config.in new file mode 100644 index 0000000000..c5bfbb82cc --- /dev/null +++ b/package/fis/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_FIS + bool "fis" + help + fis - manipulate RedBoot partition table from Linux. diff --git a/package/fis/fis.mk b/package/fis/fis.mk new file mode 100644 index 0000000000..876b127268 --- /dev/null +++ b/package/fis/fis.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# fis +# +################################################################################ + +FIS_SITE = http://svn.chezphil.org/utils/trunk +FIS_SITE_METHOD = svn +FIS_VERSION = 2892 +FIS_LICENSE = GPLv2+ +FIS_LICENSE_FILES = fis.c + +define FIS_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) -std=c99 -o $(@D)/fis \ + $(@D)/fis.c $(@D)/crc.c $(TARGE_LDFLAGS) +endef + +define FIS_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/fis $(TARGET_DIR)/sbin/fis +endef + +$(eval $(generic-package)) diff --git a/package/flac/0001-configure-don-t-try-to-unset-g-from-CFLAGS.patch b/package/flac/0001-configure-don-t-try-to-unset-g-from-CFLAGS.patch new file mode 100644 index 0000000000..3aff5a8c95 --- /dev/null +++ b/package/flac/0001-configure-don-t-try-to-unset-g-from-CFLAGS.patch @@ -0,0 +1,27 @@ +The sed expression is wrong, any flags with '-g' in any position gets +zapped, for example: + +-mfloat-gprs=double (for powerpc e500) -> -mfloatprs=double. + +Which gives build errors and is perfectly valid in real use scenarios to +switch from e500v1 (single precision) code to e500v2 (double precision) code. + +Signed-off-by: Gustavo Zacarias + +diff -Nura flac-1.3.1.orig/configure flac-1.3.1/configure +--- flac-1.3.1.orig/configure 2014-11-27 20:43:29.921303105 -0300 ++++ flac-1.3.1/configure 2014-11-27 20:45:33.460250179 -0300 +@@ -19870,11 +19870,10 @@ + + if test "x$debug" = xtrue; then + CPPFLAGS="-DDEBUG $CPPFLAGS" +- CFLAGS=$(echo "$CFLAGS" | sed 's/-g//') +- CFLAGS="-g $CFLAGS" ++ CFLAGS=$(echo "-g $CFLAGS") + else + CPPFLAGS="-DNDEBUG $CPPFLAGS" +- CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//;s/-g//') ++ CFLAGS=$(echo "$CFLAGS" | sed 's/-O2//') + CFLAGS="-O3 -funroll-loops $CFLAGS" + fi + diff --git a/package/flac/0002-sigemptyset.patch b/package/flac/0002-sigemptyset.patch new file mode 100644 index 0000000000..9cbc338a67 --- /dev/null +++ b/package/flac/0002-sigemptyset.patch @@ -0,0 +1,18 @@ +Fix musl compile since it does not define __sigemptyset + +Downloaded from +http://git.alpinelinux.org/cgit/aports/commit/main/flac/sigemptyset.patch?id=49fd0f4cebc46e2753d6a60e450078446f7f18a7 + +Signed-off-by: Bernd Kuhls + +--- ./src/libFLAC/cpu.c.orig ++++ ./src/libFLAC/cpu.c +@@ -243,7 +243,7 @@ + struct sigaction sigill_save; + struct sigaction sigill_sse; + sigill_sse.sa_sigaction = sigill_handler_sse_os; +- __sigemptyset(&sigill_sse.sa_mask); ++ sigemptyset(&sigill_sse.sa_mask); + sigill_sse.sa_flags = SA_SIGINFO | SA_RESETHAND; /* SA_RESETHAND just in case our SIGILL return jump breaks, so we don't get stuck in a loop */ + if(0 == sigaction(SIGILL, &sigill_sse, &sigill_save)) + { diff --git a/package/flac/Config.in b/package/flac/Config.in new file mode 100644 index 0000000000..267acb7f34 --- /dev/null +++ b/package/flac/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_FLAC + bool "flac" + depends on BR2_USE_WCHAR + help + FLAC is an Open Source lossless audio codec. + + http://flac.sourceforge.net/ + +comment "flac needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/flac/flac.hash b/package/flac/flac.hash new file mode 100644 index 0000000000..6a0da11627 --- /dev/null +++ b/package/flac/flac.hash @@ -0,0 +1,2 @@ +# From http://downloads.xiph.org/releases/flac/SHA256SUMS.txt +sha256 4773c0099dba767d963fd92143263be338c48702172e8754b9bc5103efe1c56c flac-1.3.1.tar.xz diff --git a/package/flac/flac.mk b/package/flac/flac.mk new file mode 100644 index 0000000000..b819064c23 --- /dev/null +++ b/package/flac/flac.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# flac +# +################################################################################ + +FLAC_VERSION = 1.3.1 +FLAC_SITE = http://downloads.xiph.org/releases/flac +FLAC_SOURCE = flac-$(FLAC_VERSION).tar.xz +FLAC_INSTALL_STAGING = YES +FLAC_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) +FLAC_LICENSE = Xiph BSD-like (libFLAC), GPLv2+ (tools), LGPLv2.1+ (other libraries) +FLAC_LICENSE_FILES = COPYING.Xiph COPYING.GPL COPYING.LGPL +FLAC_CONF_OPTS = \ + --disable-cpplibs \ + --disable-xmms-plugin \ + --disable-altivec + +ifeq ($(BR2_PACKAGE_LIBOGG),y) +FLAC_CONF_OPTS += --with-ogg=$(STAGING_DIR)/usr +FLAC_DEPENDENCIES += libogg +else +FLAC_CONF_OPTS += --disable-ogg +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE),y) +FLAC_DEPENDENCIES += host-nasm +FLAC_CONF_OPTS += --enable-sse +else +FLAC_CONF_OPTS += --disable-sse +endif + +$(eval $(autotools-package)) diff --git a/package/flann/Config.in b/package/flann/Config.in new file mode 100644 index 0000000000..a2cd50c867 --- /dev/null +++ b/package/flann/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_FLANN + bool "flann" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + # all gcc versions fail to build flann on Microblaze due to + # gcc bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69401 + depends on !BR2_microblaze + help + FLANN is a library for performing fast approximate nearest + neighbor searches in high dimensional spaces. It contains a + collection of algorithms we found to work best for nearest + neighbor search and a system for automatically choosing the + best algorithm and optimum parameters depending on the + dataset. + + http://www.cs.ubc.ca/research/flann/ + +if BR2_PACKAGE_FLANN + +config BR2_PACKAGE_FLANN_EXAMPLES + bool "flann examples" + help + Build and install flann example applications. + +endif + +comment "flann needs a toolchain w/ C++, dynamic library" + depends on !BR2_microblaze + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS diff --git a/package/flann/flann.hash b/package/flann/flann.hash new file mode 100644 index 0000000000..08242eb2de --- /dev/null +++ b/package/flann/flann.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3fec86866987c792c3fce7ecc8ba9d09a003f5d2d1a1ad94864550aad73a5c0b flann-3645f0c30a47267e56e5acdecfc7bac2b76bc3d5.tar.gz diff --git a/package/flann/flann.mk b/package/flann/flann.mk new file mode 100644 index 0000000000..af86a02f04 --- /dev/null +++ b/package/flann/flann.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# flann +# +################################################################################ + +FLANN_VERSION = 3645f0c30a47267e56e5acdecfc7bac2b76bc3d5 +FLANN_SITE = $(call github,mariusmuja,flann,$(FLANN_VERSION)) +FLANN_INSTALL_STAGING = YES +FLANN_LICENSE = BSD-3c +FLANN_LICENSE_FILES = COPYING +FLANN_CONF_OPTS = \ + -DBUILD_C_BINDINGS=ON \ + -DBUILD_PYTHON_BINDINGS=OFF \ + -DBUILD_MATLAB_BINDINGS=OFF \ + -DBUILD_EXAMPLES=$(if $(BR2_PACKAGE_FLANN_EXAMPLES),ON,OFF) \ + -DUSE_OPENMP=$(if $(BR2_GCC_ENABLE_OPENMP),ON,OFF) \ + -DPYTHON_EXECUTABLE=OFF + +$(eval $(cmake-package)) diff --git a/package/flannel/Config.in b/package/flannel/Config.in new file mode 100644 index 0000000000..cfdb9095fb --- /dev/null +++ b/package/flannel/Config.in @@ -0,0 +1,13 @@ +comment "flannel needs a toolchain w/ threads" + depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_FLANNEL + bool "flannel" + depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Flannel is a virtual network that gives a subnet to each + host for use with container runtimes. + + https://github.com/coreos/flannel diff --git a/package/flannel/flannel.hash b/package/flannel/flannel.hash new file mode 100644 index 0000000000..3e0b25cb4d --- /dev/null +++ b/package/flannel/flannel.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 dbbcb08c0e70713b0c920387a9967e5b30ef833c8118c847edbbca4f68ff0562 v0.5.5.tar.gz diff --git a/package/flannel/flannel.mk b/package/flannel/flannel.mk new file mode 100644 index 0000000000..b5f61a01b9 --- /dev/null +++ b/package/flannel/flannel.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# flannel +# +################################################################################ + +FLANNEL_VERSION = v0.5.5 +FLANNEL_SITE = https://github.com/coreos/flannel/archive +FLANNEL_SOURCE = $(FLANNEL_VERSION).tar.gz + +FLANNEL_LICENSE = Apache-2.0 +FLANNEL_LICENSE_FILES = LICENSE + +FLANNEL_DEPENDENCIES = host-go + +FLANNEL_MAKE_ENV = \ + $(HOST_GO_TARGET_ENV) \ + GOBIN="$(@D)/bin" \ + GOPATH="$(@D)/gopath" \ + CGO_ENABLED=1 + +FLANNEL_GLDFLAGS = \ + -X github.com/coreos/flannel/version.Version=$(FLANNEL_VERSION) \ + -extldflags '-static' + +define FLANNEL_CONFIGURE_CMDS + # Put sources at prescribed GOPATH location. + mkdir -p $(@D)/gopath/src/github.com/coreos + ln -s $(@D) $(@D)/gopath/src/github.com/coreos/flannel +endef + +define FLANNEL_BUILD_CMDS + cd $(@D) && $(FLANNEL_MAKE_ENV) $(HOST_DIR)/usr/bin/go \ + build -v -o $(@D)/bin/flanneld -ldflags "$(FLANNEL_GLDFLAGS)" . +endef + +define FLANNEL_INSTALL_TARGET_CMDS + # Install flannel to its well known location. + $(INSTALL) -D -m 0755 $(@D)/bin/flanneld $(TARGET_DIR)/opt/bin/flanneld + $(INSTALL) -D -m 0755 $(@D)/dist/mk-docker-opts.sh $(TARGET_DIR)/opt/bin/mk-docker-opts.sh +endef + +$(eval $(generic-package)) diff --git a/package/flashbench/Config.in b/package/flashbench/Config.in new file mode 100644 index 0000000000..7be1ea9bc3 --- /dev/null +++ b/package/flashbench/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_FLASHBENCH + bool "flashbench" + help + Flashbench - Identify characteristics of flash media. + + This is the tool used to identify the properties of + SD cards and other media for the Linaro flash memory + survey. + + https://wiki.linaro.org/WorkingGroups/KernelConsolidation/Projects/FlashCardSurvey diff --git a/package/flashbench/flashbench.mk b/package/flashbench/flashbench.mk new file mode 100644 index 0000000000..6759338a2e --- /dev/null +++ b/package/flashbench/flashbench.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# flashbench +# +################################################################################ + +FLASHBENCH_VERSION = 2e30b1968a66147412f21002ea844122a0d5e2f0 +FLASHBENCH_SITE = git://git.linaro.org/people/arnd/flashbench.git +FLASHBENCH_LICENSE = GPLv2 +FLASHBENCH_LICENSE_FILES = COPYING + +FLASHBENCH_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_microblaze)$(BR2_sh2a),y) +# microblaze and sh2a toolchains only provide LLONG_MAX when used with gnu99 dialect +FLASHBENCH_CFLAGS += -std=gnu99 +endif + +define FLASHBENCH_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(FLASHBENCH_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS) -lrt" +endef + +define FLASHBENCH_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/flashbench $(TARGET_DIR)/usr/bin/flashbench + $(INSTALL) -m 755 -D $(@D)/erase $(TARGET_DIR)/usr/bin/erase +endef + +$(eval $(generic-package)) diff --git a/package/flashrom/0001-spi.patch b/package/flashrom/0001-spi.patch new file mode 100644 index 0000000000..22ffcb54dc --- /dev/null +++ b/package/flashrom/0001-spi.patch @@ -0,0 +1,25 @@ +linux_spi: add missing include + +Some defines (e.g. _IOC_SIZEBITS) are defined in linux/ioctl.h, +so it must be included before it is used, by SPI_IOC_MESSAGE +from linux/spi/spidev.h + +Fixes build errors with the musl C library, as seen in these +Buildroot autobuilder failures: + + http://autobuild.buildroot.org/results/2a3/2a3744007c630c267575a638ebcd83a4b97644f5/build-end.log + http://autobuild.buildroot.org/results/3de/3de936d9be79e151e66af15193084d82a0f2c04a/build-end.log + +Signed-off-by: "Yann E. MORIN" + +diff -durN flashrom-0.9.8.orig/linux_spi.c flashrom-0.9.8/linux_spi.c +--- flashrom-0.9.8.orig/linux_spi.c 2015-10-28 19:42:38.480285847 +0100 ++++ flashrom-0.9.8/linux_spi.c 2015-10-28 19:43:15.492994613 +0100 +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + #include "flash.h" diff --git a/package/flashrom/0002-sys-io.h.patch b/package/flashrom/0002-sys-io.h.patch new file mode 100644 index 0000000000..8d990c6f91 --- /dev/null +++ b/package/flashrom/0002-sys-io.h.patch @@ -0,0 +1,27 @@ +hwaccess: sys/io.h is not specific to glibc + +Under Linux, sys/io.h provides inb and outb, so we really need it. +However, its inclusion is conditional to the _GLIBC_ define. This is +usually OK under Linux, since both glibc and uClibc define it (uclibc +fakes being glibc). + +But the musl C library does not impersonate glibc, so we're missing +including sys/io.h in this case. + +Change the include from checking _GLIBC_ to checking whether this is +Linux, looking for the __linux__ define. + +Signed-off-by: "Yann E. MORIN" + +diff -durN flashrom-0.9.8.orig/hwaccess.h flashrom-0.9.8/hwaccess.h +--- flashrom-0.9.8.orig/hwaccess.h 2015-02-10 09:03:10.000000000 +0100 ++++ flashrom-0.9.8/hwaccess.h 2015-10-28 20:01:54.259202484 +0100 +@@ -27,7 +27,7 @@ + #include "platform.h" + + #if IS_X86 +-#if defined(__GLIBC__) ++#if defined(__linux__) + #include + #endif + #endif diff --git a/package/flashrom/Config.in b/package/flashrom/Config.in new file mode 100644 index 0000000000..adc068cbfa --- /dev/null +++ b/package/flashrom/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_FLASHROM + bool "flashrom" + select BR2_PACKAGE_PCIUTILS + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + select BR2_PACKAGE_LIBFTDI + # dmidecode is only a runtime dependency + select BR2_PACKAGE_DMIDECODE + depends on BR2_i386 || BR2_x86_64 + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + help + flashrom is a utility for identifying, reading, writing, + verifying and erasing flash chips. It is designed to flash + BIOS/EFI/coreboot/firmware/optionROM images on mainboards, + network/graphics/storage controller cards, and various other + programmer devices. + + http://flashrom.org/ + +comment "flashrom needs a toolchain w/ threads" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/flashrom/flashrom.hash b/package/flashrom/flashrom.hash new file mode 100644 index 0000000000..a2168699f3 --- /dev/null +++ b/package/flashrom/flashrom.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 13dc7c895e583111ecca370363a3527d237d178a134a94b20db7df177c05f934 flashrom-0.9.8.tar.bz2 diff --git a/package/flashrom/flashrom.mk b/package/flashrom/flashrom.mk new file mode 100644 index 0000000000..7e0fcf27b3 --- /dev/null +++ b/package/flashrom/flashrom.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# flashrom +# +################################################################################ + +FLASHROM_VERSION = 0.9.8 +FLASHROM_SOURCE = flashrom-$(FLASHROM_VERSION).tar.bz2 +FLASHROM_SITE = http://download.flashrom.org/releases +FLASHROM_DEPENDENCIES = pciutils libusb libusb-compat libftdi host-pkgconf +FLASHROM_LICENSE = GPLv2+ +FLASHROM_LICENSE_FILES = COPYING + +define FLASHROM_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define FLASHROM_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/flashrom $(TARGET_DIR)/usr/sbin/flashrom +endef + +$(eval $(generic-package)) diff --git a/package/flex/0001-prog-ar.patch b/package/flex/0001-prog-ar.patch new file mode 100644 index 0000000000..e0626ff95f --- /dev/null +++ b/package/flex/0001-prog-ar.patch @@ -0,0 +1,11 @@ +diff -rup flex-2.5.33.orig/Makefile.in flex-2.5.33/Makefile.in +--- flex-2.5.33.orig/Makefile.in 2007-01-18 17:29:25.000000000 +0100 ++++ flex-2.5.33/Makefile.in 2007-01-18 18:28:22.000000000 +0100 +@@ -105,7 +105,6 @@ am__installdirs = "$(DESTDIR)$(libdir)" + "$(DESTDIR)$(includedir)" + libLIBRARIES_INSTALL = $(INSTALL_DATA) + LIBRARIES = $(lib_LIBRARIES) +-AR = ar + ARFLAGS = cru + libfl_a_AR = $(AR) $(ARFLAGS) + libfl_a_LIBADD = diff --git a/package/flex/Config.in b/package/flex/Config.in new file mode 100644 index 0000000000..0a70a1c69e --- /dev/null +++ b/package/flex/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_FLEX + bool "flex" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + A fast lexical analyser generator. A tool for generating + programs that perform pattern-matching on text. + + http://flex.sourceforge.net/ diff --git a/package/flex/flex.hash b/package/flex/flex.hash new file mode 100644 index 0000000000..b91ab57d98 --- /dev/null +++ b/package/flex/flex.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 bf693433a3effe6b1f42e44abd787491e4e213984b1859545b92267a86088dd3 flex-2.5.37.tar.gz diff --git a/package/flex/flex.mk b/package/flex/flex.mk new file mode 100644 index 0000000000..9a3f840b11 --- /dev/null +++ b/package/flex/flex.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# flex +# +################################################################################ + +FLEX_VERSION = 2.5.37 +FLEX_SITE = http://download.sourceforge.net/project/flex +FLEX_INSTALL_STAGING = YES +FLEX_LICENSE = FLEX +FLEX_LICENSE_FILES = COPYING +FLEX_DEPENDENCIES = \ + $(if $(BR2_PACKAGE_GETTEXT_IF_LOCALE),gettext) host-m4 +FLEX_CONF_ENV = ac_cv_path_M4=/usr/bin/m4 +# we don't have a host-gettext/libintl +HOST_FLEX_DEPENDENCIES = host-m4 + +define FLEX_DISABLE_PROGRAM + $(SED) 's/^bin_PROGRAMS.*//' $(@D)/Makefile.in +endef +FLEX_POST_PATCH_HOOKS += FLEX_DISABLE_PROGRAM + +# flex++ symlink is broken when flex binary is not installed +define FLEX_REMOVE_BROKEN_SYMLINK + rm -f $(TARGET_DIR)/usr/bin/flex++ +endef +FLEX_POST_INSTALL_TARGET_HOOKS += FLEX_REMOVE_BROKEN_SYMLINK + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/flickcurl/Config.in b/package/flickcurl/Config.in new file mode 100644 index 0000000000..426ceecba1 --- /dev/null +++ b/package/flickcurl/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_FLICKCURL + bool "flickcurl" + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBXML2 + # Ensure that libcurl is built with crypto support, since + # flickcurl must access https:// URLs. + select BR2_PACKAGE_OPENSSL if !(BR2_PACKAGE_GNUTLS || BR2_PACKAGE_LIBNSS) + select BR2_PACKAGE_CA_CERTIFICATES # runtime + help + Flickcurl is a C library for the Flickr API, handling + creating the requests, signing, token management, calling + the API, marshalling request parameters and decoding + responses. + + http://librdf.org/flickcurl/ + +config BR2_PACKAGE_FLICKCURL_UTILS + bool "flickcurl utilities" + depends on BR2_PACKAGE_FLICKCURL + help + Install flickcurl utilites (flickcurl + flickrdf) to target. diff --git a/package/flickcurl/flickcurl.hash b/package/flickcurl/flickcurl.hash new file mode 100644 index 0000000000..fd091ec4a5 --- /dev/null +++ b/package/flickcurl/flickcurl.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 ff42a36c7c1c7d368246f6bc9b7d792ed298348e5f0f5d432e49f6803562f5a3 flickcurl-1.26.tar.gz diff --git a/package/flickcurl/flickcurl.mk b/package/flickcurl/flickcurl.mk new file mode 100644 index 0000000000..ce836f765c --- /dev/null +++ b/package/flickcurl/flickcurl.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# flickcurl +# +################################################################################ + +FLICKCURL_VERSION = 1.26 +FLICKCURL_SITE = http://download.dajobe.org/flickcurl +FLICKCURL_LICENSE = LGPLv2.1+ or GPLv2+ or Apache 2.0+ +FLICKCURL_LICENSE_FILES = COPYING COPYING.LIB LICENSE-2.0.txt LICENSE.html +FLICKCURL_INSTALL_STAGING = YES +FLICKCURL_CONFIG_SCRIPTS = flickcurl-config +FLICKCURL_CONF_OPTS = --without-curl-config --without-xml2-config --without-raptor +FLICKCURL_DEPENDENCIES = libcurl libxml2 host-pkgconf + +ifeq ($(BR2_PACKAGE_FLICKCURL_UTILS),) +define FLICKCURL_REMOVE_UTILS + rm -f $(TARGET_DIR)/usr/bin/flickcurl $(TARGET_DIR)/usr/bin/flickrdf +endef +FLICKCURL_POST_INSTALL_TARGET_HOOKS += FLICKCURL_REMOVE_UTILS +endif + +$(eval $(autotools-package)) diff --git a/package/flite/0001-now-honor-DESTDIR-env.-var.patch b/package/flite/0001-now-honor-DESTDIR-env.-var.patch new file mode 100644 index 0000000000..2d5fb68532 --- /dev/null +++ b/package/flite/0001-now-honor-DESTDIR-env.-var.patch @@ -0,0 +1,30 @@ +From 658f3243238efe951f6242fa384e990d77078afc Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Fri, 27 Dec 2013 17:42:39 +0100 +Subject: [PATCH] now honor DESTDIR env. var. + +Flite used a handwritten a Makefile which doesn't honor DESTDIR environment +variable, though it uses autoconf. + +Signed-off-by: Samuel Martin +--- + config/config.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config/config.in b/config/config.in +index 914d2bf..43f1a56 100644 +--- a/flite-1.4-release/config/config.in ++++ b/flite-1.4-release/config/config.in +@@ -49,6 +49,6 @@ include $(TOP)/config/$(langvox).lv + prefix = @prefix@ + exec_prefix = @exec_prefix@ + EXEEXT = @EXEEXT@ +-INSTALLBINDIR = @bindir@ +-INSTALLLIBDIR = @libdir@ +-INSTALLINCDIR = @includedir@/flite ++INSTALLBINDIR = $(DESTDIR)@bindir@ ++INSTALLLIBDIR = $(DESTDIR)@libdir@ ++INSTALLINCDIR = $(DESTDIR)@includedir@/flite +-- +1.8.5.2 + diff --git a/package/flite/0002-fix-alsa-static.patch b/package/flite/0002-fix-alsa-static.patch new file mode 100644 index 0000000000..12adb9e018 --- /dev/null +++ b/package/flite/0002-fix-alsa-static.patch @@ -0,0 +1,19 @@ +Use pkg-config to determine alsa link flags. This fixes static linking. + +Signed-off-by: Baruch Siach + +diff -Nuar flite-1.4-release.orig/configure.in flite-1.4-release/configure.in +--- flite-1.4-release.orig/flite-1.4-release/configure.in 2009-08-14 23:46:38.000000000 +0300 ++++ flite-1.4-release/flite-1.4-release/configure.in 2014-04-30 18:52:33.253297236 +0300 +@@ -275,7 +275,10 @@ + #endif], + [AUDIODRIVER="alsa" + AUDIODEFS=-DCST_AUDIO_ALSA +- AUDIOLIBS=-lasound]) ++ AUDIOLIBS=`pkg-config --libs alsa` ++ if test "$shared" = false; then ++ AUDIOLIBS=`pkg-config --libs --static alsa` ++ fi]) + AC_CHECK_HEADER(mmsystem.h, + [AUDIODRIVER="wince" + AUDIODEFS=-DCST_AUDIO_WINCE diff --git a/package/flite/0003-fix-alsa-version-check.patch b/package/flite/0003-fix-alsa-version-check.patch new file mode 100644 index 0000000000..8832ac371c --- /dev/null +++ b/package/flite/0003-fix-alsa-version-check.patch @@ -0,0 +1,26 @@ +[PATCH] fix alsa version check + +Check the entire alsa version, and not just the subminor - As this broke +with the recent alsa 1.0.x -> 1.1.0 release. + +It is not clear what major/minor versions the check was supposed to be +against (0.9 or 1.0). I went with 1.0.11 to be on the safe side. + +Signed-off-by: Peter Korsgaard +--- + flite-1.4-release/configure.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: flite-1.4/flite-1.4-release/configure.in +=================================================================== +--- flite-1.4.orig/flite-1.4-release/configure.in ++++ flite-1.4/flite-1.4-release/configure.in +@@ -270,7 +270,7 @@ + # the one I know -- you can still specific --with-audio=alsa + AC_TRY_COMPILE([#include ], + [int j= +- #if SND_LIB_SUBMINOR >= 11 ++ #if SND_LIB_VERSION >= 0x1000b + 3; + #endif], + [AUDIODRIVER="alsa" diff --git a/package/flite/Config.in b/package/flite/Config.in new file mode 100644 index 0000000000..2bbd256f21 --- /dev/null +++ b/package/flite/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_FLITE + bool "flite" + depends on BR2_USE_WCHAR + help + Flite: a small, fast run time synthesis engine. + + Flite (festival-lite) is a small, fast run-time synthesis + engine developed at CMU and primarily designed for small + embedded machines and/or large servers. Flite is designed as + an alternative synthesis engine to Festival for voices built + using the FestVox suite of voice building tools. + + http://www.speech.cs.cmu.edu/flite + +comment "flite needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/flite/flite.hash b/package/flite/flite.hash new file mode 100644 index 0000000000..e4dd0c633b --- /dev/null +++ b/package/flite/flite.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 45c662160aeca6560589f78daf42ab62c6111dd4d244afc28118c4e6f553cd0c flite-1.4-release.tar.bz2 diff --git a/package/flite/flite.mk b/package/flite/flite.mk new file mode 100644 index 0000000000..611e33452a --- /dev/null +++ b/package/flite/flite.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# flite +# +################################################################################ + +FLITE_VERSION = 1.4 +FLITE_SOURCE = flite-$(FLITE_VERSION)-release.tar.bz2 +FLITE_SITE = http://www.speech.cs.cmu.edu/flite/packed/flite-$(FLITE_VERSION) +# $ tar tf flite-1.4-release.tar.bz2 +# ... +# flite-1.4-release//install-sh +# flite-1.4-release//mkinstalldirs +# flite-1.4-release//Exports.def +# flite-1.4-release//flite.sln +# flite-1.4-release//fliteDll.vcproj +# flite-1.4-release/config/Makefile +# flite-1.4-release/config/common_make_rules +# flite-1.4-release/config/project.mak +# flite-1.4-release/config/config.in +# flite-1.4-release/config/system.mak.in +# +# So, we set FLITE_STRIP_COMPONENTS=0 to avoid writing to "/", and then +# build in flite-1.4-release/ +FLITE_STRIP_COMPONENTS = 0 +FLITE_SUBDIR = flite-$(FLITE_VERSION)-release +FLITE_LICENSE = BSD-4c +FLITE_LICENSE_FILES = $(FLITE_SUBDIR)/COPYING + +FLITE_INSTALL_STAGING = YES +# Patching configure.in +FLITE_AUTORECONF = YES +FLITE_DEPENDENCIES = host-pkgconf + +# Sadly, Flite does not support parallel build, especially when building its +# shared libraries. +FLITE_MAKE = $(MAKE1) + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +FLITE_DEPENDENCIES += alsa-lib +FLITE_CONF_OPTS += --with-audio=alsa +else +FLITE_CONF_OPTS += --with-audio=oss +endif + +$(eval $(autotools-package)) diff --git a/package/flot/Config.in b/package/flot/Config.in new file mode 100644 index 0000000000..4c0d3ec334 --- /dev/null +++ b/package/flot/Config.in @@ -0,0 +1,95 @@ +config BR2_PACKAGE_FLOT + bool "flot" + select BR2_PACKAGE_JQUERY + help + Flot is a pure Javascript plotting library for jQuery. It + produces graphical plots of arbitrary datasets on-the-fly + client-side. + + The focus is on simple usage (all settings are optional), + attractive looks and interactive features like zooming and + mouse tracking. + + The plugin works with Internet Explorer 6+, Firefox 2.x+, + Safari 3.0+, Opera 9.5+ and Konqueror 4.x+ with the HTML + canvas tag. + + http://www.flotcharts.org/ + +if BR2_PACKAGE_FLOT + +comment "flot plugins" + +config BR2_PACKAGE_FLOT_CANVAS + bool "canvas" + help + Flot plugin to render axis tick labels directly to the canvas + +config BR2_PACKAGE_FLOT_CATEGORIES + bool "categories" + help + Flot plugin for plotting textual data or categories + +config BR2_PACKAGE_FLOT_CROSSHAIR + bool "crosshair" + help + Flot plugin for showing crosshairs when the mouse hovers + over the plot + +config BR2_PACKAGE_FLOT_ERRORBARS + bool "errorbars" + help + Flot plugin for plotting error bars + +config BR2_PACKAGE_FLOT_FILLBETWEEN + bool "fillbetween" + help + Flot plugin for computing bottoms for filled line and bar charts + +config BR2_PACKAGE_FLOT_IMAGE + bool "image" + help + Flot plugin for plotting images + +config BR2_PACKAGE_FLOT_NAVIGATE + bool "navigate" + help + Flot plugin for adding panning and zooming capabilities to a plot + +config BR2_PACKAGE_FLOT_PIE + bool "pie" + help + Flot plugin for rendering pie charts + +config BR2_PACKAGE_FLOT_RESIZE + bool "resize" + help + Flot plugin for automatically redrawing plots when the + placeholder size changes. + +config BR2_PACKAGE_FLOT_SELECTION + bool "selection" + help + Flot plugin for selecting regions + +config BR2_PACKAGE_FLOT_STACK + bool "stack" + help + Flot plugin for stacking data sets + +config BR2_PACKAGE_FLOT_SYMBOL + bool "symbol" + help + Flot plugin that adds some extra symbols for plotting points + +config BR2_PACKAGE_FLOT_THRESHOLD + bool "threshold" + help + Flot plugin for thresholding data + +config BR2_PACKAGE_FLOT_TIME + bool "time" + help + Flot plugin for handling time axes + +endif diff --git a/package/flot/flot.hash b/package/flot/flot.hash new file mode 100644 index 0000000000..cb9f9ec9d0 --- /dev/null +++ b/package/flot/flot.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 ef9a873befe3ff5ea42ebf1c3657887265a1717744ca8ed0c2bd3dd736d16b21 flot-0.8.3.tar.gz diff --git a/package/flot/flot.mk b/package/flot/flot.mk new file mode 100644 index 0000000000..58e3ff1276 --- /dev/null +++ b/package/flot/flot.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# flot +# +################################################################################ + +FLOT_VERSION = 0.8.3 +FLOT_SITE = http://www.flotcharts.org/downloads +FLOT_LICENSE = MIT +FLOT_LICENSE_FILES = LICENSE.txt +FLOT_FILES = jquery.flot $(addprefix jquery.flot.,\ + $(if $(BR2_PACKAGE_FLOT_CANVAS),canvas) \ + $(if $(BR2_PACKAGE_FLOT_CATEGORIES),categories) \ + $(if $(BR2_PACKAGE_FLOT_CROSSHAIR),crosshair) \ + $(if $(BR2_PACKAGE_FLOT_ERRORBARS),errorbars) \ + $(if $(BR2_PACKAGE_FLOT_FILLBETWEEN),fillbetween) \ + $(if $(BR2_PACKAGE_FLOT_IMAGE),image) \ + $(if $(BR2_PACKAGE_FLOT_NAVIGATE),navigate) \ + $(if $(BR2_PACKAGE_FLOT_PIE),pie) \ + $(if $(BR2_PACKAGE_FLOT_RESIZE),resize) \ + $(if $(BR2_PACKAGE_FLOT_SELECTION),selection) \ + $(if $(BR2_PACKAGE_FLOT_STACK),stack) \ + $(if $(BR2_PACKAGE_FLOT_SYMBOL),symbol) \ + $(if $(BR2_PACKAGE_FLOT_THRESHOLD),threshold) \ + $(if $(BR2_PACKAGE_FLOT_TIME),time) \ + ) + +define FLOT_INSTALL_TARGET_CMDS + for i in $(FLOT_FILES); do \ + $(INSTALL) -m 0644 -D $(@D)/$$i.min.js $(TARGET_DIR)/var/www/$$i.js || exit 1; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/fltk/0001-disable-tests.patch b/package/fltk/0001-disable-tests.patch new file mode 100644 index 0000000000..957145312c --- /dev/null +++ b/package/fltk/0001-disable-tests.patch @@ -0,0 +1,16 @@ +Disable tests, slower to build and would need host-fltk. + +Signed-off-by: Gustavo Zacarias + +diff -Nura fltk-1.3.2.orig/Makefile fltk-1.3.2/Makefile +--- fltk-1.3.2.orig/Makefile 2013-10-27 18:19:39.693208127 -0300 ++++ fltk-1.3.2/Makefile 2013-10-27 18:20:08.032136885 -0300 +@@ -18,7 +18,7 @@ + + include makeinclude + +-DIRS = $(IMAGEDIRS) src $(CAIRODIR) fluid test documentation ++DIRS = $(IMAGEDIRS) src $(CAIRODIR) fluid documentation + + all: makeinclude fltk-config + for dir in $(DIRS); do\ diff --git a/package/fltk/0002-jpeg-9.patch b/package/fltk/0002-jpeg-9.patch new file mode 100644 index 0000000000..11ae85ee28 --- /dev/null +++ b/package/fltk/0002-jpeg-9.patch @@ -0,0 +1,26 @@ +From http://www.fltk.org/str.php?L2920 +However it's not yet applied apparently until bundled jpeg is upgraded. + +Signed-off-by: Gustavo Zacarias + +diff -Nura fltk-1.3.2.orig/src/Fl_JPEG_Image.cxx fltk-1.3.2/src/Fl_JPEG_Image.cxx +--- fltk-1.3.2.orig/src/Fl_JPEG_Image.cxx 2014-07-03 12:56:27.731197463 -0300 ++++ fltk-1.3.2/src/Fl_JPEG_Image.cxx 2014-07-03 12:56:57.907218257 -0300 +@@ -155,7 +155,7 @@ + + jpeg_create_decompress(&dinfo); + jpeg_stdio_src(&dinfo, fp); +- jpeg_read_header(&dinfo, 1); ++ jpeg_read_header(&dinfo, TRUE); + + dinfo.quantize_colors = (boolean)FALSE; + dinfo.out_color_space = JCS_RGB; +@@ -333,7 +333,7 @@ + + jpeg_create_decompress(&dinfo); + jpeg_mem_src(&dinfo, data); +- jpeg_read_header(&dinfo, 1); ++ jpeg_read_header(&dinfo, TRUE); + + dinfo.quantize_colors = (boolean)FALSE; + dinfo.out_color_space = JCS_RGB; diff --git a/package/fltk/Config.in b/package/fltk/Config.in new file mode 100644 index 0000000000..8e9977a154 --- /dev/null +++ b/package/fltk/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_FLTK + bool "fltk" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + help + A cross-platform C++ GUI toolkit for UNIX/Linux (X11), + Microsoft Windows, and MacOS X. + + http://www.fltk.org/ + +comment "fltk needs a toolchain w/ C++" + depends on BR2_USE_MMU && BR2_PACKAGE_XORG7 + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/fltk/fltk.hash b/package/fltk/fltk.hash new file mode 100644 index 0000000000..7b9b67dcfb --- /dev/null +++ b/package/fltk/fltk.hash @@ -0,0 +1,4 @@ +# From http://www.fltk.org/software.php?VERSION=1.3.3 +md5 9ccdb0d19dc104b87179bd9fd10822e3 fltk-1.3.3-source.tar.gz +# Locally generated +sha256 f8398d98d7221d40e77bc7b19e761adaf2f1ef8bb0c30eceb7beb4f2273d0d97 fltk-1.3.3-source.tar.gz diff --git a/package/fltk/fltk.mk b/package/fltk/fltk.mk new file mode 100644 index 0000000000..9b67bd32ae --- /dev/null +++ b/package/fltk/fltk.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# fltk +# +################################################################################ + +FLTK_VERSION = 1.3.3 +FLTK_SOURCE = fltk-$(FLTK_VERSION)-source.tar.gz +FLTK_SITE = http://fltk.org/pub/fltk/$(FLTK_VERSION) +FLTK_INSTALL_STAGING = YES +# We force --libdir=/usr/lib, because by default, it is set to +# ${exec_prefix}/lib, which doesn't match the condition used by the +# fltk build system to decide whether it should pass a -rpath,/usr/lib +# or not. Since this rpath breaks the build, we want the fltk build +# system to not pass it, which requires having --libdir set to +# /usr/lib. +FLTK_CONF_OPTS = --enable-threads --with-x --disable-gl \ + --disable-localjpeg --disable-localpng --disable-localzlib \ + --libdir=/usr/lib +FLTK_DEPENDENCIES = jpeg libpng xlib_libX11 xlib_libXext xlib_libXt +FLTK_CONFIG_SCRIPTS = fltk-config +FLTK_LICENSE = LGPLv2 with exceptions +FLTK_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_CAIRO),y) +FLTK_CONF_OPTS += --enable-cairo +FLTK_DEPENDENCIES += cairo +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +FLTK_DEPENDENCIES += xlib_libXcursor +FLTK_CONF_OPTS += --enable-xcursor +else +FLTK_CONF_OPTS += --disable-xcursor +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y) +FLTK_DEPENDENCIES += xlib_libXfixes +FLTK_CONF_OPTS += --enable-xfixes +else +FLTK_CONF_OPTS += --disable-xfixes +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFT),y) +FLTK_CONF_ENV += ac_cv_path_FTCONFIG=$(STAGING_DIR)/usr/bin/freetype-config +FLTK_DEPENDENCIES += xlib_libXft +else +FLTK_CONF_OPTS += --disable-xft +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +FLTK_DEPENDENCIES += xlib_libXinerama +else +FLTK_CONF_OPTS += --disable-xinerama +endif + +$(eval $(autotools-package)) diff --git a/package/fluxbox/Config.in b/package/fluxbox/Config.in new file mode 100644 index 0000000000..ab479a9f69 --- /dev/null +++ b/package/fluxbox/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_FLUXBOX + bool "fluxbox" + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBX11 + # Runtime dependency, needed by startup script + select BR2_PACKAGE_XAPP_XMODMAP + help + The Fluxbox lightweight window manager for X + + http://fluxbox.org + +comment "fluxbox needs a toolchain w/ C++" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_XORG7 && !BR2_INSTALL_LIBSTDCPP diff --git a/package/fluxbox/fluxbox.hash b/package/fluxbox/fluxbox.hash new file mode 100644 index 0000000000..b18582b6c0 --- /dev/null +++ b/package/fluxbox/fluxbox.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 fc8c75fe94c54ed5a5dd3fd4a752109f8949d6df67a48e5b11a261403c382ec0 fluxbox-1.3.7.tar.xz diff --git a/package/fluxbox/fluxbox.mk b/package/fluxbox/fluxbox.mk new file mode 100644 index 0000000000..305dd9abae --- /dev/null +++ b/package/fluxbox/fluxbox.mk @@ -0,0 +1,88 @@ +################################################################################ +# +# fluxbox +# +################################################################################ + +FLUXBOX_VERSION = 1.3.7 +FLUXBOX_SOURCE = fluxbox-$(FLUXBOX_VERSION).tar.xz +FLUXBOX_SITE = http://downloads.sourceforge.net/project/fluxbox/fluxbox/$(FLUXBOX_VERSION) +FLUXBOX_LICENSE = MIT +FLUXBOX_LICENSE_FILES = COPYING + +FLUXBOX_CONF_OPTS = \ + --x-includes=$(STAGING_DIR)/usr/include/X11 \ + --x-libraries=$(STAGING_DIR)/usr/lib +FLUXBOX_DEPENDENCIES = xlib_libX11 $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +ifeq ($(BR2_PACKAGE_FREETYPE),y) +FLUXBOX_CONF_OPTS += --enable-freetype2 +FLUXBOX_DEPENDENCIES += freetype +else +FLUXBOX_CONF_OPTS += --disable-freetype2 +endif + +ifeq ($(BR2_PACKAGE_IMLIB2_X),y) +FLUXBOX_CONF_OPTS += --enable-imlib2 +FLUXBOX_DEPENDENCIES += imlib2 +else +FLUXBOX_CONF_OPTS += --disable-imlib2 +endif + +ifeq ($(BR2_PACKAGE_LIBFRIBIDI),y) +FLUXBOX_CONF_OPTS += --enable-fribidi +FLUXBOX_DEPENDENCIES += libfribidi +else +FLUXBOX_CONF_OPTS += --disable-fribidi +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFT),y) +FLUXBOX_CONF_OPTS += --enable-xft +FLUXBOX_DEPENDENCIES += xlib_libXft +else +FLUXBOX_CONF_OPTS += --disable-xft +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y) +FLUXBOX_CONF_OPTS += --enable-xrender +FLUXBOX_DEPENDENCIES += xlib_libXrender +else +FLUXBOX_CONF_OPTS += --disable-xrender +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y) +FLUXBOX_CONF_OPTS += --enable-xpm +FLUXBOX_DEPENDENCIES += xlib_libXpm +else +FLUXBOX_CONF_OPTS += --disable-xpm +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +FLUXBOX_CONF_OPTS += --enable-xinerama +FLUXBOX_DEPENDENCIES += xlib_libXinerama +else +FLUXBOX_CONF_OPTS += --disable-xinerama +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y) +FLUXBOX_CONF_OPTS += --enable-xext +FLUXBOX_DEPENDENCIES += xlib_libXext +else +FLUXBOX_CONF_OPTS += --disable-xext +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +FLUXBOX_CONF_OPTS += --enable-xrandr +FLUXBOX_DEPENDENCIES += xlib_libXrandr +else +FLUXBOX_CONF_OPTS += --disable-xrandr +endif + +define FLUXBOX_INSTALL_XSESSION_FILE + $(INSTALL) -m 0755 -D package/fluxbox/xsession \ + $(TARGET_DIR)/root/.xsession +endef + +FLUXBOX_POST_INSTALL_TARGET_HOOKS += FLUXBOX_INSTALL_XSESSION_FILE + +$(eval $(autotools-package)) diff --git a/package/fluxbox/xsession b/package/fluxbox/xsession new file mode 100644 index 0000000000..b51acff48d --- /dev/null +++ b/package/fluxbox/xsession @@ -0,0 +1,2 @@ +#!/bin/sh +exec startfluxbox diff --git a/package/fmc/Config.in b/package/fmc/Config.in new file mode 100644 index 0000000000..a50f80da69 --- /dev/null +++ b/package/fmc/Config.in @@ -0,0 +1,25 @@ +comment "fmc needs a toolchain w/ C++" + depends on BR2_powerpc_e500mc + depends on !BR2_INSTALL_LIBSTDCPP + +comment "fmc needs a Linux kernel to be built" + depends on BR2_powerpc_e500mc + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_FMC + bool "fmc" + depends on BR2_powerpc_e500mc + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_LINUX_KERNEL # fmlib + select BR2_PACKAGE_TCLAP + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_FMLIB + help + The Frame Manager Configuration tool is Freescale PowerPC platform + software package whose primary purpose is converting + Parse-Classify-Police-Distribute (PCD) descriptions of network + packets flow into hardware configuration. The tool provides an + abstraction layer between the end customer's vision of the PCD task + definition and real hardware implementation. + + http://cache.freescale.com/files/32bit/doc/app_note/AN4760.pdf diff --git a/package/fmc/fmc.mk b/package/fmc/fmc.mk new file mode 100644 index 0000000000..49c5fe86ad --- /dev/null +++ b/package/fmc/fmc.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# fmc +# +################################################################################ + +FMC_VERSION = fsl-sdk-v1.5-rc3 +FMC_SITE = git://git.freescale.com/ppc/sdk/fmc.git +FMC_LICENSE = MIT +FMC_LICENSE_FILES = COPYING +FMC_DEPENDENCIES = libxml2 tclap fmlib + +FMC_MAKE_OPTS = \ + CC="$(TARGET_CC)" \ + CXX="$(TARGET_CXX)" \ + FMD_USPACE_HEADER_PATH="$(STAGING_DIR)/usr/include/fmd" \ + FMD_USPACE_LIB_PATH="$(STAGING_DIR)/usr/lib" \ + LIBXML2_HEADER_PATH="$(STAGING_DIR)/usr/include/libxml2" \ + TCLAP_HEADER_PATH="$(STAGING_DIR)/usr/include" + +define FMC_BUILD_CMDS + # The linking step has dependency issues so using MAKE1 + $(TARGET_MAKE_ENV) $(MAKE1) $(FMC_MAKE_OPTS) -C $(@D)/source +endef + +define FMC_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/source/fmc $(TARGET_DIR)/usr/sbin/fmc + cp -dpfr $(@D)/etc/fmc $(TARGET_DIR)/etc/ +endef + +$(eval $(generic-package)) diff --git a/package/fmlib/Config.in b/package/fmlib/Config.in new file mode 100644 index 0000000000..3cc6a2b7af --- /dev/null +++ b/package/fmlib/Config.in @@ -0,0 +1,15 @@ +comment "fmlib needs a Linux kernel to be built" + depends on BR2_powerpc_e500mc + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_FMLIB + bool "fmlib" + depends on BR2_powerpc_e500mc + depends on BR2_LINUX_KERNEL + help + The Frame Manager library provides Freescale PowerPC platforms an + API on top of the Frame Manager driver ioctl calls, that provides + a user space application with a simple way to configure driver + parameters and PCD (parse - classify - distribute) rules. + + http://git.freescale.com/git/cgit.cgi/ppc/sdk/fmlib.git/tree/README diff --git a/package/fmlib/fmlib.mk b/package/fmlib/fmlib.mk new file mode 100644 index 0000000000..978810bad9 --- /dev/null +++ b/package/fmlib/fmlib.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# fmlib +# +################################################################################ + +FMLIB_VERSION = fsl-sdk-v1.5-rc3 +FMLIB_SITE = git://git.freescale.com/ppc/sdk/fmlib.git +FMLIB_LICENSE = BSD-3c, GPLv2+ +FMLIB_LICENSE_FILES = COPYING +FMLIB_DEPENDENCIES = linux +FMLIB_INSTALL_STAGING = YES + +# This package installs a static library only, so there's +# nothing to install to the target +FMLIB_INSTALL_TARGET = NO + +FMLIB_MAKE_OPTS = \ + CC="$(TARGET_CC)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + KERNEL_SRC="$(LINUX_DIR)" \ + PREFIX="$(STAGING_DIR)/usr" + +ifeq ($(BR2_powerpc_e500mc),y) +FMLIB_ARCHTYPE = ppce500mc +endif + +define FMLIB_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(FMLIB_MAKE_OPTS) -C $(@D) libfm-$(FMLIB_ARCHTYPE).a +endef + +define FMLIB_INSTALL_STAGING_CMDS + $(FMLIB_MAKE_ENV) $(MAKE) $(FMLIB_MAKE_OPTS) -C $(@D) install-libfm-$(FMLIB_ARCHTYPE) +endef + +$(eval $(generic-package)) diff --git a/package/fmtools/Config.in b/package/fmtools/Config.in new file mode 100644 index 0000000000..182b5179cf --- /dev/null +++ b/package/fmtools/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_FMTOOLS + bool "fmtools" + help + fmtools is a pair of simple command-line utilities for + "video4linux2" radio tuner cards under Linux. It includes + fm for power control, tuning, and volume and fmscan for + scanning for stations. + + http://benpfaff.org/fmtools/ diff --git a/package/fmtools/fmtools.hash b/package/fmtools/fmtools.hash new file mode 100644 index 0000000000..435cf0adc7 --- /dev/null +++ b/package/fmtools/fmtools.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 75174e07d8cde6d4a8a5d7bbaa3a3b0760a850e7f6840cb7c6246227b18f5a39 fmtools-2.0.7.tar.gz diff --git a/package/fmtools/fmtools.mk b/package/fmtools/fmtools.mk new file mode 100644 index 0000000000..4b1b64fc92 --- /dev/null +++ b/package/fmtools/fmtools.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# fmtools +# +################################################################################ + +FMTOOLS_VERSION = 2.0.7 +FMTOOLS_SITE = http://benpfaff.org/fmtools +FMTOOLS_LICENSE = GPLv2+ +FMTOOLS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/font-awesome/Config.in b/package/font-awesome/Config.in new file mode 100644 index 0000000000..694d74e5a8 --- /dev/null +++ b/package/font-awesome/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_FONT_AWESOME + bool "font-awesome" + help + Font Awesome is a full suite of 605 pictographic icons for + easy scalable vector graphics on websites. + + https://github.com/FortAwesome/Font-Awesome diff --git a/package/font-awesome/font-awesome.hash b/package/font-awesome/font-awesome.hash new file mode 100644 index 0000000000..9f3715e5b6 --- /dev/null +++ b/package/font-awesome/font-awesome.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 7813f416057da622b16229b10fef550e1dc64c5bb59871cd38fa86e76dfdbae8 font-awesome-v4.5.0.tar.gz diff --git a/package/font-awesome/font-awesome.mk b/package/font-awesome/font-awesome.mk new file mode 100644 index 0000000000..3d2cccaefc --- /dev/null +++ b/package/font-awesome/font-awesome.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# font-awesome +# +################################################################################ + +FONT_AWESOME_VERSION = v4.5.0 +FONT_AWESOME_SITE = $(call github,FortAwesome,Font-Awesome,$(FONT_AWESOME_VERSION)) +FONT_AWESOME_LICENSE = OFLv1.1 (font), MIT (CSS, LESS and Sass files) +FONT_AWESOME_DIRECTORIES_LIST = css fonts less scss + +define FONT_AWESOME_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/share/font-awesome/ + $(foreach d,$(FONT_AWESOME_DIRECTORIES_LIST),\ + cp -dpfr $(@D)/$(d) $(TARGET_DIR)/usr/share/font-awesome$(sep)) +endef + +$(eval $(generic-package)) diff --git a/package/fontconfig/Config.in b/package/fontconfig/Config.in new file mode 100644 index 0000000000..1c54a43361 --- /dev/null +++ b/package/fontconfig/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_FONTCONFIG + bool "fontconfig" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_EXPAT + help + Fontconfig is a library for configuring and customizing font access. + + http://www.fontconfig.org/ diff --git a/package/fontconfig/fontconfig.hash b/package/fontconfig/fontconfig.hash new file mode 100644 index 0000000000..e4ec1ac177 --- /dev/null +++ b/package/fontconfig/fontconfig.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/fontconfig/2014-March/005167.html +sha256 b6b066c7dce3f436fdc0dfbae9d36122b38094f4f53bd8dffd45e195b0540d8d fontconfig-2.11.1.tar.gz diff --git a/package/fontconfig/fontconfig.mk b/package/fontconfig/fontconfig.mk new file mode 100644 index 0000000000..caf997bac7 --- /dev/null +++ b/package/fontconfig/fontconfig.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# fontconfig +# +################################################################################ + +FONTCONFIG_VERSION = 2.11.1 +FONTCONFIG_SITE = http://fontconfig.org/release +FONTCONFIG_INSTALL_STAGING = YES +FONTCONFIG_DEPENDENCIES = freetype expat host-pkgconf +FONTCONFIG_LICENSE = fontconfig license +FONTCONFIG_LICENSE_FILES = COPYING + +FONTCONFIG_CONF_OPTS = \ + --with-arch=$(GNU_TARGET_NAME) \ + --with-cache-dir=/var/cache/fontconfig \ + --disable-docs + +HOST_FONTCONFIG_CONF_OPTS = \ + --disable-static + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/fping/Config.in b/package/fping/Config.in new file mode 100644 index 0000000000..686102a45e --- /dev/null +++ b/package/fping/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_FPING + bool "fping" + help + fping is a program to send ICMP echo probes to network hosts, + similar to ping, but much better performing when pinging + multiple hosts. + + http://fping.org/ diff --git a/package/fping/fping.hash b/package/fping/fping.hash new file mode 100644 index 0000000000..99c01cfad0 --- /dev/null +++ b/package/fping/fping.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d86f2281bda4653c7049e6ba8fce24ba67edbf9193b7bb1cf6219b0c8ddce4e6 fping-3.12.tar.gz diff --git a/package/fping/fping.mk b/package/fping/fping.mk new file mode 100644 index 0000000000..c576dd1abd --- /dev/null +++ b/package/fping/fping.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# fping +# +################################################################################ + +FPING_VERSION = 3.12 +FPING_SITE = http://fping.org/dist +FPING_LICENSE = BSD-like +FPING_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/freeradius-client/0001-fix-for-nettle.patch b/package/freeradius-client/0001-fix-for-nettle.patch new file mode 100644 index 0000000000..a862c749ba --- /dev/null +++ b/package/freeradius-client/0001-fix-for-nettle.patch @@ -0,0 +1,20 @@ +lib/rc-md5: fix build when nettle is enabled + +rc-md5 uses size_t, which is defined in string.h. This include is +missing when built against nettle. + +Just add it. + +Signed-off-by: "Yann E. MORIN" + +diff -durN freeradius-client-1.1.7.orig/lib/rc-md5.h freeradius-client-1.1.7/lib/rc-md5.h +--- freeradius-client-1.1.7.orig/lib/rc-md5.h 2015-01-19 17:18:26.000000000 +0100 ++++ freeradius-client-1.1.7/lib/rc-md5.h 2015-01-25 22:56:07.815626476 +0100 +@@ -13,6 +13,7 @@ + + #ifdef HAVE_NETTLE + ++#include /* size_t */ + #include + + #else diff --git a/package/freeradius-client/Config.in b/package/freeradius-client/Config.in new file mode 100644 index 0000000000..773adb8a09 --- /dev/null +++ b/package/freeradius-client/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_FREERADIUS_CLIENT + bool "freeradius-client" + help + FreeRADIUS Client is a framework and library for + writing RADIUS Clients. + + http://wiki.freeradius.org/project/Radiusclient diff --git a/package/freeradius-client/freeradius-client.hash b/package/freeradius-client/freeradius-client.hash new file mode 100644 index 0000000000..5931ac2b00 --- /dev/null +++ b/package/freeradius-client/freeradius-client.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 eada2861b8f4928e3ac6b5bbfe11e92cd6cdcacfce40cae1085e77c1b6add0e9 freeradius-client-1.1.7.tar.gz diff --git a/package/freeradius-client/freeradius-client.mk b/package/freeradius-client/freeradius-client.mk new file mode 100644 index 0000000000..0ed7fbeb8c --- /dev/null +++ b/package/freeradius-client/freeradius-client.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# freeradius-client +# +################################################################################ + +FREERADIUS_CLIENT_VERSION = 1.1.7 +FREERADIUS_CLIENT_SITE = ftp://ftp.freeradius.org/pub/freeradius +FREERADIUS_CLIENT_LICENSE = BSD-2c +FREERADIUS_CLIENT_LICENSE_FILES = COPYRIGHT +FREERADIUS_CLIENT_INSTALL_STAGING = YES + +FREERADIUS_CLIENT_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_NETTLE),y) +FREERADIUS_CLIENT_DEPENDENCIES += nettle +FREERADIUS_CLIENT_CONF_OPTS += --with-nettle=yes +else +FREERADIUS_CLIENT_CONF_OPTS += --with-nettle=no +endif + +$(eval $(autotools-package)) diff --git a/package/freerdp/0001-fix-building-shared-libs.patch b/package/freerdp/0001-fix-building-shared-libs.patch new file mode 100644 index 0000000000..8922cb15b6 --- /dev/null +++ b/package/freerdp/0001-fix-building-shared-libs.patch @@ -0,0 +1,26 @@ +winpr/tools: fix building shared libs + +libwinpr-makecert-tool.a is used to build libxfreerdp-server.so, so even +if we are building a static libwinpr-makecert-tool.a library, we need to +build it with -fPIC. + +Patch and commit log suggested by Samuel MARTIN. + +Signed-off-by: "Yann E. MORIN" +Cc: Samuel Martin + +diff -durN freerdp-440916eae2e07463912d5fe507677e67096eb083.orig/winpr/tools/makecert/CMakeLists.txt freerdp-440916eae2e07463912d5fe507677e67096eb083/winpr/tools/makecert/CMakeLists.txt +--- freerdp-440916eae2e07463912d5fe507677e67096eb083.orig/winpr/tools/makecert/CMakeLists.txt 2014-08-25 06:52:43.000000000 -0700 ++++ freerdp-440916eae2e07463912d5fe507677e67096eb083/winpr/tools/makecert/CMakeLists.txt 2014-10-24 15:39:39.600319523 -0700 +@@ -37,4 +37,11 @@ + add_subdirectory(cli) + + set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "WinPR/Tools") ++ ++if(BUILD_SHARED_LIBS) ++ # build libwinpr-makecert-tool.a with PIC because it is used to build ++ # the shared library libxfreerdp-server.so. ++ set_property(TARGET ${MODULE_NAME} PROPERTY POSITION_INDEPENDENT_CODE TRUE) ++endif() ++ + export_complex_library(LIBNAME ${MODULE_NAME}) diff --git a/package/freerdp/0002-add-support-for-tz-package.patch b/package/freerdp/0002-add-support-for-tz-package.patch new file mode 100644 index 0000000000..93e4afde17 --- /dev/null +++ b/package/freerdp/0002-add-support-for-tz-package.patch @@ -0,0 +1,30 @@ +From 605d0a85183d2f9d5b0da5629cbadf01173bbb2f Mon Sep 17 00:00:00 2001 +From: Scott Fan +Date: Mon, 13 Jul 2015 15:01:17 +0800 +Subject: [PATCH] Add support for tz package + +Fixes error message while freerdp connected the remote desktop: +Unable to detect time zone + +Signed-off-by: Scott Fan +--- + libfreerdp/locale/timezone.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libfreerdp/locale/timezone.c b/libfreerdp/locale/timezone.c +index 3070f1f..4a06786 100644 +--- a/libfreerdp/locale/timezone.c ++++ b/libfreerdp/locale/timezone.c +@@ -1539,7 +1539,8 @@ char* freerdp_get_unix_timezone_identifier() + * America/Montreal for example. + */ + +- if ((len = readlink("/etc/localtime", buf, sizeof(buf) - 1)) != -1) ++ if ((len = readlink("/etc/localtime", buf, sizeof(buf) - 1)) != -1 || ++ (len = readlink("/etc/TZ", buf, sizeof(buf) - 1)) != -1) + { + int num = 0; + int pos = len; +-- +2.4.5 + diff --git a/package/freerdp/0003-add-missing-define.patch b/package/freerdp/0003-add-missing-define.patch new file mode 100644 index 0000000000..a8f669e102 --- /dev/null +++ b/package/freerdp/0003-add-missing-define.patch @@ -0,0 +1,44 @@ +libwinpr/comm_seria: fix missing define + +FreeRDP uses CMSPAR, which is defined by glibc in bits/termios.h . + +glibc has two flavours of bits/termios.h: a genmeric one and an +architecture-specific one. When installing, glibc will install the +architecture-specific file if it exists, otherwise it installs the +generic file. Only Alpha, MIPS, PPC and Sparc have their own +bits/termios.h. + +The generic bits/termios.h, as well as the Alpha, PPC and Sparc flavours +do define CMSPAR. However, the MIPS flavour does not define it. + +Define CMSPAR to the value from the generic value, which is also the +value known to the Linux kernel for MIPS. + +Fixes: + http://autobuild.buildroot.org/results/0b4/0b4793f0bf9f4c57933897f3480054a4e06528ad/ + http://autobuild.buildroot.org/results/7a2/7a2284d0a2987158fa2e78f789b07c8c6fcdb974/ + http://autobuild.buildroot.org/results/387/3874088c3ccd4bbf76ea0c911ca1ef64c7dc9d1c/ + ... + +Signed-off-by: "Yann E. MORIN" +Cc: Peter Korsgaard +Cc: Thomas Petazzoni + +diff -durN freerdp-17834af7bb378f85a3b3cc4dcadaa5125a337e16.orig/winpr/libwinpr/comm/comm_serial_sys.c freerdp-17834af7bb378f85a3b3cc4dcadaa5125a337e16/winpr/libwinpr/comm/comm_serial_sys.c +--- freerdp-17834af7bb378f85a3b3cc4dcadaa5125a337e16.orig/winpr/libwinpr/comm/comm_serial_sys.c 2015-09-04 16:20:17.000000000 +0100 ++++ freerdp-17834af7bb378f85a3b3cc4dcadaa5125a337e16/winpr/libwinpr/comm/comm_serial_sys.c 2015-10-04 11:07:41.868513726 +0100 +@@ -27,6 +27,14 @@ + #include + #include + #include ++ ++/* glibc for MIPS has its own bits/termios.h which does not define ++ * CMSPAR, so we vampirise the value from the generic bits/termios.h ++ */ ++#ifndef CMSPAR ++#define CMSPAR 010000000000 ++#endif ++ + #include + + #include "comm_serial_sys.h" diff --git a/package/freerdp/Config.in b/package/freerdp/Config.in new file mode 100644 index 0000000000..9dd2505a44 --- /dev/null +++ b/package/freerdp/Config.in @@ -0,0 +1,90 @@ +config BR2_PACKAGE_FREERDP + bool "freerdp" + # FreeRDP does not have a single C++ source file, however it + # insists on having a C++ compiler. Removing that requirement + # is a bit too much involving, so we just depend on it... + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on !BR2_STATIC_LIBS # uses dlfcn.h + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # libglib2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LIBGLIB2 + help + FreeRDP is a free implementation of the Remote Desktop + Protocol (RDP), released under the Apache license + + This only installs the freerdp libraries. + + http://www.freerdp.com/ + + Note: this also installs a key and certificate in + /etc/freerdp/keys/ . These are publicly-known, as they + are present in FreeRDP's source tree. It is strongly + suggested that you overwrite them with your own set, + either in an overlay rootfs or in a post-build script. + +if BR2_PACKAGE_FREERDP + +choice + bool "gstreamer support" + depends on BR2_PACKAGE_XORG7 # xlib-libxrandr + depends on BR2_PACKAGE_GSTREAMER || BR2_PACKAGE_GSTREAMER1 + +config BR2_PACKAGE_FREERDP_GSTREAMER1 + bool "gstreamer-1.x" + depends on BR2_PACKAGE_GSTREAMER1 + # gstreamer-1.x dependencies already dependencies of FreeRDP + select BR2_PACKAGE_GST1_PLUGINS_BASE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP + select BR2_PACKAGE_XLIB_LIBXRANDR + +config BR2_PACKAGE_FREERDP_GSTREAMER + bool "gstreamer-0.x" + depends on BR2_PACKAGE_GSTREAMER + # gstreamer-0.x dependencies already dependencies of FreeRDP + select BR2_PACKAGE_GST_PLUGINS_BASE + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_LIBXML2 + +config BR2_PACKAGE_FREERDP_GSTREAMER_NO + bool "none" + +endchoice + +comment "gstreamer support needs X.Org" + depends on !BR2_PACKAGE_XORG7 + depends on BR2_PACKAGE_GSTREAMER || BR2_PACKAGE_GSTREAMER1 + +config BR2_PACKAGE_FREERDP_SERVER + bool "server" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXDAMAGE + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXFIXES + +config BR2_PACKAGE_FREERDP_CLIENT_X11 + bool "X11 client" + default y + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + +comment "server and X11 client need X.Org" + depends on !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_FREERDP_CLIENT_WL + bool "wayland client" + default y + depends on BR2_PACKAGE_WAYLAND + +endif + +comment "freerdp needs a toolchain w/ wchar, dynamic library, threads, C++" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \ + || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/freerdp/freerdp.mk b/package/freerdp/freerdp.mk new file mode 100644 index 0000000000..e8e5be49b1 --- /dev/null +++ b/package/freerdp/freerdp.mk @@ -0,0 +1,257 @@ +################################################################################ +# +# freerdp +# +################################################################################ + +# Changeset on the master branch +FREERDP_VERSION = 17834af7bb378f85a3b3cc4dcadaa5125a337e16 +FREERDP_SITE = $(call github,FreeRDP,FreeRDP,$(FREERDP_VERSION)) +FREERDP_DEPENDENCIES = libglib2 openssl zlib +FREERDP_LICENSE = Apache-2.0 +FREERDP_LICENSE_FILES = LICENSE + +FREERDP_INSTALL_STAGING = YES + +FREERDP_CONF_OPTS = -DWITH_MANPAGES=OFF -Wno-dev + +ifeq ($(BR2_PACKAGE_FREERDP_GSTREAMER),y) +FREERDP_CONF_OPTS += -DWITH_GSTREAMER_0_10=ON +FREERDP_DEPENDENCIES += gstreamer gst-plugins-base libxml2 host-pkgconf +else +FREERDP_CONF_OPTS += -DWITH_GSTREAMER_0_10=OFF +endif + +ifeq ($(BR2_PACKAGE_FREERDP_GSTREAMER1),y) +FREERDP_CONF_OPTS += -DWITH_GSTREAMER_1_0=ON +FREERDP_DEPENDENCIES += gstreamer1 gst1-plugins-base +else +FREERDP_CONF_OPTS += -DWITH_GSTREAMER_1_0=OFF +endif + +ifeq ($(BR2_PACKAGE_CUPS),y) +FREERDP_CONF_OPTS += -DWITH_CUPS=ON +FREERDP_DEPENDENCIES += cups +else +FREERDP_CONF_OPTS += -DWITH_CUPS=OFF +endif + +ifeq ($(BR2_PACKAGE_FFMPEG),y) +FREERDP_CONF_OPTS += -DWITH_FFMPEG=ON +FREERDP_DEPENDENCIES += ffmpeg +else +FREERDP_CONF_OPTS += -DWITH_FFMPEG=OFF +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB_MIXER),y) +FREERDP_CONF_OPTS += -DWITH_ALSA=ON +FREERDP_DEPENDENCIES += alsa-lib +else +FREERDP_CONF_OPTS += -DWITH_ALSA=OFF +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +FREERDP_CONF_OPTS += -DWITH_PULSEAUDIO=ON +FREERDP_DEPENDENCIES += pulseaudio +else +FREERDP_CONF_OPTS += -DWITH_PULSEAUDIO=OFF +endif + +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +FREERDP_CONF_OPTS += -DWITH_NEON=ON +else +FREERDP_CONF_OPTS += -DWITH_NEON=OFF +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE2),y) +FREERDP_CONF_OPTS += -DWITH_SSE2=ON +else +FREERDP_CONF_OPTS += -DWITH_SSE2=OFF +endif + +ifeq ($(BR2_arm)$(BR2_armeb),y) +FREERDP_CONF_OPTS += -DARM_FP_ABI=$(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) +endif + +#--------------------------------------- +# Enabling server and/or client + +# Clients and server interface must always be enabled to build the +# corresponding libraries. +FREERDP_CONF_OPTS += -DWITH_SERVER_INTERFACE=ON +FREERDP_CONF_OPTS += -DWITH_CLIENT_INTERFACE=ON + +ifeq ($(BR2_PACKAGE_FREERDP_SERVER),y) +FREERDP_CONF_OPTS += -DWITH_SERVER=ON +endif + +ifneq ($(BR2_PACKAGE_FREERDP_CLIENT_X11)$(BR2_PACKAGE_FREERDP_CLIENT_WL),) +FREERDP_CONF_OPTS += -DWITH_CLIENT=ON +endif + +#--------------------------------------- +# Libraries for client and/or server + +# The FreeRDP buildsystem uses non-orthogonal options. For example it +# is not possible to build the server and the wayland client without +# also building the X client. That's because the dependencies of the +# server (the X libraries) are a superset of those of the X client. +# So, as soon as FreeRDP is configured for the server and the wayland +# client, it will believe it also has to build the X client, because +# the libraries it needs are enabled. +# +# Furthermore, the shadow server is always built, even if there's nothing +# it can serve (i.e. the X libs are disabled). +# +# So, we do not care whether we build too much; we remove, as +# post-install hooks, whatever we do not want. + +# If Xorg is enabled, and the server or the X client are, then libX11 +# and libXext are forcibly enabled at the Kconfig level. However, if +# Xorg is enabled but neither the server nor the X client are, then +# there's nothing that guarantees those two libs are enabled. So we +# really must check for them. +ifeq ($(BR2_PACKAGE_XLIB_LIBX11)$(BR2_PACKAGE_XLIB_LIBX11),yy) +FREERDP_DEPENDENCIES += xlib_libX11 xlib_libXext +FREERDP_CONF_OPTS += -DWITH_X11=ON +else +FREERDP_CONF_OPTS += -DWITH_X11=OFF +endif + +# The following libs are either optional or mandatory only for either +# the server or the client. A mandatory library for either one is +# selected from Kconfig, so we can make it conditional here +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +FREERDP_CONF_OPTS += -DWITH_XCURSOR=ON +FREERDP_DEPENDENCIES += xlib_libXcursor +else +FREERDP_CONF_OPTS += -DWITH_XCURSOR=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE),y) +FREERDP_CONF_OPTS += -DWITH_XDAMAGE=ON +FREERDP_DEPENDENCIES += xlib_libXdamage +else +FREERDP_CONF_OPTS += -DWITH_XDAMAGE=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y) +FREERDP_CONF_OPTS += -DWITH_XFIXES=ON +FREERDP_DEPENDENCIES += xlib_libXfixes +else +FREERDP_CONF_OPTS += -DWITH_XFIXES=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y) +FREERDP_CONF_OPTS += -DWITH_XI=ON +FREERDP_DEPENDENCIES += xlib_libXi +else +FREERDP_CONF_OPTS += -DWITH_XI=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +FREERDP_CONF_OPTS += -DWITH_XINERAMA=ON +FREERDP_DEPENDENCIES += xlib_libXinerama +else +FREERDP_CONF_OPTS += -DWITH_XINERAMA=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXKBFILE),y) +FREERDP_CONF_OPTS += -DWITH_XKBFILE=ON +FREERDP_DEPENDENCIES += xlib_libxkbfile +else +FREERDP_CONF_OPTS += -DWITH_XKBFILE=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +FREERDP_CONF_OPTS += -DWITH_XRANDR=ON +FREERDP_DEPENDENCIES += xlib_libXrandr +else +FREERDP_CONF_OPTS += -DWITH_XRANDR=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y) +FREERDP_CONF_OPTS += -DWITH_XRENDER=ON +FREERDP_DEPENDENCIES += xlib_libXrender +else +FREERDP_CONF_OPTS += -DWITH_XRENDER=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXTST),y) +FREERDP_CONF_OPTS += -DWITH_XTEST=ON +FREERDP_DEPENDENCIES += xlib_libXtst +else +FREERDP_CONF_OPTS += -DWITH_XTEST=OFF +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXV),y) +FREERDP_CONF_OPTS += -DWITH_XV=ON +FREERDP_DEPENDENCIES += xlib_libXv +else +FREERDP_CONF_OPTS += -DWITH_XV=OFF +endif + +ifeq ($(BR2_PACKAGE_WAYLAND),y) +FREERDP_DEPENDENCIES += wayland +FREERDP_CONF_OPTS += -DWITH_WAYLAND=ON +else +FREERDP_CONF_OPTS += -DWITH_WAYLAND=OFF +endif + +#--------------------------------------- +# Post-install hooks to cleanup and install missing stuff + +# Shadow server is always installed, no matter what, so we manually +# remove it if the user does not want the server. +ifeq ($(BR2_PACKAGE_FREERDP_SERVER),) +define FREERDP_RM_SHADOW_SERVER + rm -f $(TARGET_DIR)/usr/bin/freerdp-shadow +endef +FREERDP_POST_INSTALL_TARGET_HOOKS += FREERDP_RM_SHADOW_SERVER +endif # ! server + +# X client is always built as soon as a client is enabled and the +# necessary libs are enabled (e.g. because of the server), so manually +# remove it if the user does not want it. +ifeq ($(BR2_PACKAGE_FREERDP_CLIENT_X11),) +define FREERDP_RM_CLIENT_X11 + rm -f $(TARGET_DIR)/usr/bin/xfreerdp + rm -f $(TARGET_DIR)/usr/lib/libxfreerdp-client* +endef +FREERDP_POST_INSTALL_TARGET_HOOKS += FREERDP_RM_CLIENT_X11 +define FREERDP_RM_CLIENT_X11_LIB + rm -f $(STAGING_DIR)/usr/lib/libxfreerdp-client* +endef +FREERDP_POST_INSTALL_STAGING_HOOKS += FREERDP_RM_CLIENT_X11_LIB +endif # ! X client + +# Wayland client is always built as soon as wayland is enabled, so +# manually remove it if the user does not want it. +ifeq ($(BR2_PACKAGE_FREERDP_CLIENT_WL),) +define FREERDP_RM_CLIENT_WL + rm -f $(TARGET_DIR)/usr/bin/wlfreerdp +endef +FREERDP_POST_INSTALL_TARGET_HOOKS += FREERDP_RM_CLIENT_WL +endif + +# Remove static libraries in unusual dir +define FREERDP_CLEANUP + rm -rf $(TARGET_DIR)/usr/lib/freerdp +endef +FREERDP_POST_INSTALL_TARGET_HOOKS += FREERDP_CLEANUP + +# Install the server key and certificate, so that a client can connect. +# A user can override them with its own in a post-build script, if needed. +# We install them even if the server is not enabled, since another server +# can be built and linked with libfreerdp (e.g. weston with the RDP +# backend). Key and cert are installed world-readable, so non-root users +# can start a server. +define FREERDP_INSTALL_KEYS + $(INSTALL) -m 0644 -D $(@D)/server/Sample/server.key \ + $(TARGET_DIR)/etc/freerdp/keys/server.key + $(INSTALL) -m 0644 -D $(@D)/server/Sample/server.crt \ + $(TARGET_DIR)/etc/freerdp/keys/server.crt +endef +FREERDP_POST_INSTALL_TARGET_HOOKS += FREERDP_INSTALL_KEYS + +$(eval $(cmake-package)) diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in new file mode 100644 index 0000000000..8c03190c6c --- /dev/null +++ b/package/freescale-imx/Config.in @@ -0,0 +1,66 @@ +menuconfig BR2_PACKAGE_FREESCALE_IMX + bool "Freescale i.MX libraries" + depends on BR2_arm + help + Those packages provide hardware acceleration for GPU or VPU, hardware + optimization or some hardware tools for Freescale i.MX platforms. + +if BR2_PACKAGE_FREESCALE_IMX +choice + prompt "i.MX platform" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX25_3STACK + bool "imx25-3stack" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS + bool "imx27ads" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX37_3STACK + bool "imx37-3stack" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX50 + bool "imx50" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 + bool "imx51" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53 + bool "imx53" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q + bool "imx6q" + +endchoice + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM + string + default "IMX25_3STACK" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX25_3STACK + default "IMX27ADS" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS + default "IMX37_3STACK" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX37_3STACK + default "IMX50" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX50 + default "IMX51" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 + default "IMX53" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53 + default "IMX6Q" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q + +config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU + bool + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q + +source "package/freescale-imx/imx-kobs/Config.in" +source "package/freescale-imx/imx-lib/Config.in" +source "package/freescale-imx/imx-uuc/Config.in" +source "package/freescale-imx/imx-vpu/Config.in" +source "package/freescale-imx/firmware-imx/Config.in" +if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53) +source "package/freescale-imx/gpu-amd-bin-mx51/Config.in" +source "package/freescale-imx/libz160/Config.in" +endif +if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q +source "package/freescale-imx/imx-gpu-viv/Config.in" +source "package/freescale-imx/kernel-module-imx-gpu-viv/Config.in" +endif + +endif diff --git a/package/freescale-imx/firmware-imx/Config.in b/package/freescale-imx/firmware-imx/Config.in new file mode 100644 index 0000000000..fca280a85a --- /dev/null +++ b/package/freescale-imx/firmware-imx/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_FIRMWARE_IMX + bool "firmware-imx" + depends on BR2_arm # Only relevant for i.MX + help + Firmware blobs for the Freescale i.MX SoCs. + + It contains blobs for SDMA and VPU. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/freescale-imx/firmware-imx/firmware-imx.hash b/package/freescale-imx/firmware-imx/firmware-imx.hash new file mode 100644 index 0000000000..a5bc82c7f9 --- /dev/null +++ b/package/freescale-imx/firmware-imx/firmware-imx.hash @@ -0,0 +1 @@ +sha256 fd14c3666eb3c12f4f2665d95caf383bb1d0277bb12e2de28fefc8d1230604f2 firmware-imx-5.3.bin diff --git a/package/freescale-imx/firmware-imx/firmware-imx.mk b/package/freescale-imx/firmware-imx/firmware-imx.mk new file mode 100644 index 0000000000..8f81c579d9 --- /dev/null +++ b/package/freescale-imx/firmware-imx/firmware-imx.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# firmware-imx +# +################################################################################ + +FIRMWARE_IMX_VERSION = 5.3 +FIRMWARE_IMX_SITE = $(FREESCALE_IMX_SITE) +FIRMWARE_IMX_SOURCE = firmware-imx-$(FIRMWARE_IMX_VERSION).bin + +FIRMWARE_IMX_LICENSE = Freescale Semiconductor Software License Agreement, \ + Atheros license (ath6k) +FIRMWARE_IMX_LICENSE_FILES = EULA COPYING +FIRMWARE_IMX_REDISTRIBUTE = NO + +FIRMWARE_IMX_BLOBS = sdma vpu + +define FIRMWARE_IMX_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(FIRMWARE_IMX_SOURCE)) +endef + +define FIRMWARE_IMX_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/lib/firmware/imx + for blobdir in $(FIRMWARE_IMX_BLOBS); do \ + cp -r $(@D)/firmware/$${blobdir} $(TARGET_DIR)/lib/firmware; \ + done + cp -r $(@D)/firmware/epdc $(TARGET_DIR)/lib/firmware/imx + mv $(TARGET_DIR)/lib/firmware/imx/epdc/epdc_ED060XH2C1.fw.nonrestricted \ + $(TARGET_DIR)/lib/firmware/imx/epdc/epdc_ED060XH2C1.fw +endef + +$(eval $(generic-package)) diff --git a/package/freescale-imx/freescale-imx.mk b/package/freescale-imx/freescale-imx.mk new file mode 100644 index 0000000000..e8ca77f17b --- /dev/null +++ b/package/freescale-imx/freescale-imx.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# freescale-imx +# +################################################################################ + +FREESCALE_IMX_SITE = http://www.freescale.com/lgfiles/NMG/MAD/YOCTO + +# Helper for self-extracting binaries distributed by Freescale. +# +# The --force option makes sure it doesn't fail if the source +# directory already exists. The --auto-accept skips the license check, +# as it is not needed in Buildroot because we have legal-info. Since +# there's a EULA in the binary file, we extract it in this macro, and +# it should therefore be added to the LICENSE_FILES variable of +# packages using this macro. Also, remember to set REDISTRIBUTE to +# "NO". Indeed, this is a legal minefield: the EULA specifies that the +# Board Support Package includes software and hardware (sic!) for +# which a separate license is needed... +# +# $(1): full path to the archive file +# +define FREESCALE_IMX_EXTRACT_HELPER + awk 'BEGIN { start = 0; } \ + /^EOEULA/ { start = 0; } \ + { if (start) print; } \ + /< $(@D)/EULA + cd $(@D) && sh $(1) --force --auto-accept + find $(@D)/$(basename $(notdir $(1))) -mindepth 1 -maxdepth 1 -exec mv {} $(@D) \; + rmdir $(@D)/$(basename $(notdir $(1))) +endef + +include $(sort $(wildcard package/freescale-imx/*/*.mk)) diff --git a/package/freescale-imx/gpu-amd-bin-mx51/Config.in b/package/freescale-imx/gpu-amd-bin-mx51/Config.in new file mode 100644 index 0000000000..0ef96828dc --- /dev/null +++ b/package/freescale-imx/gpu-amd-bin-mx51/Config.in @@ -0,0 +1,60 @@ +comment "gpu-amd-bin-mx51 needs an (e)glibc EABI toolchain w/ C++" + depends on BR2_arm + depends on !BR2_ARM_EABI || !BR2_TOOLCHAIN_USES_GLIBC || \ + !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_GPU_AMD_BIN_MX51 + bool "gpu-amd-bin-mx51 (also imx53)" + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + select BR2_PACKAGE_HAS_LIBOPENVG + depends on BR2_ARM_EABI + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_INSTALL_LIBSTDCPP + help + Freescale libraries, headers and executables for the + AMD GPU on i.MX5x, containing OpenGL/ES, OpenVG + and EGL support. + +if BR2_PACKAGE_GPU_AMD_BIN_MX51 + +choice + prompt "Output option" + help + There are two versions of this library: one for + direct framebuffer access, one for X11 rendering. + Choose here which version to install. + +config BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_X11 + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXDMCP + select BR2_PACKAGE_XLIB_LIBXAU + bool "X11" + +comment "X11 backend needs X.org enabled" + depends on !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_FB + bool "Framebuffer" + +endchoice + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "gpu-amd-bin-mx51" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "gpu-amd-bin-mx51" + +config BR2_PACKAGE_PROVIDES_LIBOPENVG + default "gpu-amd-bin-mx51" + +config BR2_PACKAGE_GPU_AMD_BIN_MX51_EXAMPLES + bool "install examples" + help + Copy the examples to the target. + +endif diff --git a/package/freescale-imx/gpu-amd-bin-mx51/egl.pc b/package/freescale-imx/gpu-amd-bin-mx51/egl.pc new file mode 100644 index 0000000000..b0ff229fba --- /dev/null +++ b/package/freescale-imx/gpu-amd-bin-mx51/egl.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: egl +Description: Freescale amd-gpu-bin-mx51 implementation of EGL +Version: 7.11.0 +Libs: -L${libdir} -lEGL +Cflags: -I${includedir} diff --git a/package/freescale-imx/gpu-amd-bin-mx51/glesv2.pc b/package/freescale-imx/gpu-amd-bin-mx51/glesv2.pc new file mode 100644 index 0000000000..6f9b7fc841 --- /dev/null +++ b/package/freescale-imx/gpu-amd-bin-mx51/glesv2.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: glesv2 +Description: Freescale amd-gpu-bin-mx51 implementation of OpenGL ESv2 +Version: 7.11.0 +Libs: -L${libdir} -lGLESv2 +Cflags: -I${includedir} diff --git a/package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk b/package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk new file mode 100644 index 0000000000..44a6b4c7d2 --- /dev/null +++ b/package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# gpu-amd-bin-mx51 +# +################################################################################ + +GPU_AMD_BIN_MX51_SITE = $(FREESCALE_IMX_SITE) +GPU_AMD_BIN_MX51_BASE_VERSION = 11.09.01 +ifeq ($(BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_FB),y) +GPU_AMD_BIN_MX51_VERSION = $(GPU_AMD_BIN_MX51_BASE_VERSION)-fb +GPU_AMD_BIN_MX51_SOURCE = amd-gpu-bin-mx51-$(GPU_AMD_BIN_MX51_BASE_VERSION).bin +else +GPU_AMD_BIN_MX51_VERSION = $(GPU_AMD_BIN_MX51_BASE_VERSION)-x11 +GPU_AMD_BIN_MX51_SOURCE = amd-gpu-x11-bin-mx51-$(GPU_AMD_BIN_MX51_BASE_VERSION).bin +GPU_AMD_BIN_MX51_DEPENDENCIES = libxcb xlib_libX11 xlib_libXext \ + xlib_libXrender xlib_libXau xlib_libXdmcp +endif +GPU_AMD_BIN_MX51_PROVIDES = libegl libgles libopenvg +GPU_AMD_BIN_MX51_INSTALL_STAGING = YES + +GPU_AMD_BIN_MX51_LICENSE = Freescale Semiconductor Software License Agreement +GPU_AMD_BIN_MX51_LICENSE_FILES = EULA +GPU_AMD_BIN_MX51_REDISTRIBUTE = NO + +define GPU_AMD_BIN_MX51_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(GPU_AMD_BIN_MX51_SOURCE)) +endef + +# Upstream headers need to be compiled with -D_LINUX. It is more convenient +# to rely on __linux__ which is defined in compiler itself +define GPU_AMD_BIN_MX51_FIXUP_HEADERS + $(SED) 's/_LINUX/__linux__/g' $(@D)/usr/include/*/*.h +endef +GPU_AMD_BIN_MX51_POST_PATCH_HOOKS += GPU_AMD_BIN_MX51_FIXUP_HEADERS + +# eglplatform_1.4.h contains X11 compatible headers +ifeq ($(BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_X11),y) +define GPU_AMD_BIN_MX51_FIXUP_EGL_HEADERS + mv $(STAGING_DIR)/usr/include/EGL/eglplatform_1.4.h $(STAGING_DIR)/usr/include/EGL/eglplatform.h +endef +endif + +define GPU_AMD_BIN_MX51_INSTALL_STAGING_CMDS + $(INSTALL) -d $(STAGING_DIR)/usr/lib/pkgconfig + $(INSTALL) -m 644 package/freescale-imx/gpu-amd-bin-mx51/*.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(INSTALL) -m 755 $(@D)/usr/lib/lib* $(STAGING_DIR)/usr/lib/ + cp -r $(@D)/usr/include/* $(STAGING_DIR)/usr/include + $(GPU_AMD_BIN_MX51_FIXUP_EGL_HEADERS) +endef + +ifeq ($(BR2_PACKAGE_GPU_AMD_BIN_MX51_EXAMPLES),y) +define GPU_AMD_BIN_MX51_INSTALL_EXAMPLES + $(INSTALL) -d $(TARGET_DIR)/usr/share/examples/gpu_amd_samples + $(INSTALL) -m 755 $(@D)/usr/bin/* $(TARGET_DIR)/usr/share/examples/gpu_amd_samples +endef +endif + +define GPU_AMD_BIN_MX51_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 $(@D)/usr/lib/lib*so* $(TARGET_DIR)/usr/lib/ + $(GPU_AMD_BIN_MX51_INSTALL_EXAMPLES) +endef + +define GPU_AMD_BIN_MX51_DEVICES + /dev/gsl_kmod c 640 0 0 249 0 1 4 +endef + +$(eval $(generic-package)) diff --git a/package/freescale-imx/gpu-amd-bin-mx51/vg.pc b/package/freescale-imx/gpu-amd-bin-mx51/vg.pc new file mode 100644 index 0000000000..8fe956e11e --- /dev/null +++ b/package/freescale-imx/gpu-amd-bin-mx51/vg.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: vg +Description: Freescale amd-gpu-bin-mx51 implementation of OpenVG +Version: 1.1 +Libs: -L${libdir} -lOpenVG +Cflags: -I${includedir}/ diff --git a/package/freescale-imx/imx-gpu-viv/Config.in b/package/freescale-imx/imx-gpu-viv/Config.in new file mode 100644 index 0000000000..20759b1ca0 --- /dev/null +++ b/package/freescale-imx/imx-gpu-viv/Config.in @@ -0,0 +1,91 @@ +comment "imx-gpu-viv needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_IMX_GPU_VIV + bool "imx-gpu-viv" + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + select BR2_PACKAGE_HAS_LIBOPENVG + depends on BR2_arm # Only relevant for i.MX6 + # Library binaries are linked against libc.so.6 + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Userspace libraries for Vivante GPU on i.MX6 platforms + + It contains libraries and headers for GLES, OpenCL, and + OpenVG. It also contains a DRI plugin for X11. It also + contains a plugin for DirectFB-1.4.0, but that doesn't work + together with buildroot's DirectFB version. + + This library is provided by Freescale as-is and doesn't have + an upstream. + +if BR2_PACKAGE_IMX_GPU_VIV + +choice + prompt "Output option" + help + There are two versions of this library: one for + direct framebuffer access, one for X11 rendering. + Choose here which version to install. + +config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11 + bool "X11" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXDAMAGE + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXFIXES + +comment "X11 backend needs Xorg package" + depends on !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB + bool "Framebuffer" + +endchoice + +config BR2_PACKAGE_IMX_GPU_VIV_OUTPUT + string + default "x11" if BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11 + default "fb" if BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_FB + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "imx-gpu-viv" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "imx-gpu-viv" + +config BR2_PACKAGE_PROVIDES_LIBOPENVG + default "imx-gpu-viv" + +config BR2_PACKAGE_IMX_GPU_VIV_APITRACE + bool "install apitrace tools" + select BR2_PACKAGE_IMX_GPU_VIV_G2D + select BR2_PACKAGE_LIBPNG + help + Copy the apitrace tool to the target. Apitrace consists + of a set of tools to trace, replay and/or inspect OpenGL, + OpenGL ES APIs calls + + http://apitrace.github.io/ + +config BR2_PACKAGE_IMX_GPU_VIV_EXAMPLES + bool "install examples" + help + Copy the Vivante examples to the target. + + Warning: examples take approximately 150 MB of disk space. + +config BR2_PACKAGE_IMX_GPU_VIV_G2D + bool "install G2D libraries" + help + Copy the GPU2D libraries to the target. + +config BR2_PACKAGE_IMX_GPU_VIV_GMEM_INFO + bool "install gmem_info tool" + help + Copy the gmem_info tool to the target which provides + information about GPU memory consumption. + +endif diff --git a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash new file mode 100644 index 0000000000..41193888f9 --- /dev/null +++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash @@ -0,0 +1,3 @@ +# locally computed +sha256 3ea201f91ce9b56455e4983ab1055e8175415fbbf2800dc097d47e78ceefba34 imx-gpu-viv-5.0.11.p7.4-sfp.bin +sha256 b80838104f2f2e3b0baf2f1aacdca263c1c92589ce919b3be40aaad23f686b7f imx-gpu-viv-5.0.11.p7.4-hfp.bin diff --git a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk new file mode 100644 index 0000000000..b51a7af9b9 --- /dev/null +++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk @@ -0,0 +1,135 @@ +################################################################################ +# +# imx-gpu-viv +# +################################################################################ + +IMX_GPU_VIV_BASE_VERSION = 5.0.11.p7.4 +ifeq ($(BR2_ARM_EABIHF),y) +IMX_GPU_VIV_VERSION = $(IMX_GPU_VIV_BASE_VERSION)-hfp +else +IMX_GPU_VIV_VERSION = $(IMX_GPU_VIV_BASE_VERSION)-sfp +endif +IMX_GPU_VIV_SITE = $(FREESCALE_IMX_SITE) +IMX_GPU_VIV_SOURCE = imx-gpu-viv-$(IMX_GPU_VIV_VERSION).bin + +IMX_GPU_VIV_INSTALL_STAGING = YES + +IMX_GPU_VIV_LICENSE = Freescale Semiconductor Software License Agreement +IMX_GPU_VIV_LICENSE_FILES = EULA +IMX_GPU_VIV_REDISTRIBUTE = NO + +IMX_GPU_VIV_PROVIDES = libegl libgles libopenvg +IMX_GPU_VIV_LIB_TARGET = $(call qstrip,$(BR2_PACKAGE_IMX_GPU_VIV_OUTPUT)) + +ifeq ($(IMX_GPU_VIV_LIB_TARGET),x11) +# The libGAL.so library provided by imx-gpu-viv uses X functions. Packages +# may want to link against libGAL.so (QT5 Base with OpenGL and X support +# does so). For this to work we need build dependencies to libXdamage, +# libXext and libXfixes so that X functions used in libGAL.so are referenced. +IMX_GPU_VIV_DEPENDENCIES += xlib_libXdamage xlib_libXext xlib_libXfixes +endif + +define IMX_GPU_VIV_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(IMX_GPU_VIV_SOURCE)) +endef + +# Instead of building, we fix up the inconsistencies that exist +# in the upstream archive here. +# Make sure these commands are idempotent. +define IMX_GPU_VIV_BUILD_CMDS + $(SED) 's/defined(LINUX)/defined(__linux__)/g' $(@D)/gpu-core/usr/include/*/*.h + ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so + ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so.1 + ln -sf libGL.so.1.2 $(@D)/gpu-core/usr/lib/libGL.so.1.2.0 + ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libEGL.so + ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libEGL.so.1 + ln -sf libEGL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libEGL.so.1.0 + ln -sf libGLESv2-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGLESv2.so + ln -sf libGLESv2-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGLESv2.so.2 + ln -sf libGLESv2-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGLESv2.so.2.0.0 + ln -sf libVIVANTE-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libVIVANTE.so + ln -sf libGAL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGAL.so +endef + +ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb) +define IMX_GPU_VIV_FIXUP_FB_HEADERS + $(SED) '39i\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) \n\ + #define EGL_API_FB \n\ + #endif' $(STAGING_DIR)/usr/include/EGL/eglvivante.h +endef +endif + +ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_G2D),y) +define IMX_GPU_VIV_INSTALL_G2D_STAGING + cp -dpfr $(@D)/g2d/usr/include/* $(STAGING_DIR)/usr/include/ + cp -dpfr $(@D)/g2d/usr/lib/* $(STAGING_DIR)/usr/lib/ +endef +endif + +define IMX_GPU_VIV_INSTALL_STAGING_CMDS + cp -r $(@D)/gpu-core/usr/* $(STAGING_DIR)/usr + $(IMX_GPU_VIV_FIXUP_FB_HEADERS) + $(IMX_GPU_VIV_INSTALL_G2D_STAGING) + for lib in egl glesv2 vg; do \ + $(INSTALL) -m 0644 -D \ + $(@D)/gpu-core/usr/lib/pkgconfig/$${lib}.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/$${lib}.pc; \ + done +endef + +ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_APITRACE),y) +IMX_GPU_VIV_DEPENDENCIES += libpng +ifeq ($(IMX_GPU_VIV_LIB_TARGET),x11) +define IMX_GPU_VIV_INSTALL_APITRACE + cp -dpfr $(@D)/apitrace/x11/usr/bin/* $(TARGET_DIR)/usr/bin/ + cp -dpfr $(@D)/apitrace/x11/usr/lib/* $(TARGET_DIR)/usr/lib/ +endef +else +define IMX_GPU_VIV_INSTALL_APITRACE + cp -dpfr $(@D)/apitrace/non-x11/usr/bin/* $(TARGET_DIR)/usr/bin/ + cp -dpfr $(@D)/apitrace/non-x11/usr/lib/* $(TARGET_DIR)/usr/lib/ +endef +endif +endif + +ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_EXAMPLES),y) +define IMX_GPU_VIV_INSTALL_EXAMPLES + mkdir -p $(TARGET_DIR)/usr/share/examples/ + cp -r $(@D)/gpu-demos/opt/* $(TARGET_DIR)/usr/share/examples/ +endef +endif + +ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_G2D),y) +define IMX_GPU_VIV_INSTALL_G2D + cp -dpfr $(@D)/g2d/usr/lib/* $(TARGET_DIR)/usr/lib/ +endef +endif + +ifeq ($(BR2_PACKAGE_IMX_GPU_VIV_GMEM_INFO),y) +define IMX_GPU_VIV_INSTALL_GMEM_INFO + cp -dpfr $(@D)/gpu-tools/gmem-info/usr/bin/* $(TARGET_DIR)/usr/bin/ +endef +endif + +# On the target, remove the unused libraries. +# Note that this is _required_, else ldconfig may create symlinks +# to the wrong library +define IMX_GPU_VIV_INSTALL_TARGET_CMDS + $(IMX_GPU_VIV_INSTALL_APITRACE) + $(IMX_GPU_VIV_INSTALL_EXAMPLES) + $(IMX_GPU_VIV_INSTALL_G2D) + $(IMX_GPU_VIV_INSTALL_GMEM_INFO) + cp -a $(@D)/gpu-core/usr/lib $(TARGET_DIR)/usr + for lib in EGL GAL VIVANTE GLESv2; do \ + for f in $(TARGET_DIR)/usr/lib/lib$${lib}-*.so; do \ + case $$f in \ + *-$(IMX_GPU_VIV_LIB_TARGET).so) : ;; \ + *) $(RM) $$f ;; \ + esac; \ + done; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch b/package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch new file mode 100644 index 0000000000..ce123de9cc --- /dev/null +++ b/package/freescale-imx/imx-kobs/0001-Fix-musl-build.patch @@ -0,0 +1,39 @@ +[PATCH] Fix musl build + +Signed-off-by: Gary Bisson +--- + src/mtd.c | 1 + + src/mtd.h | 5 +++++ + 2 files changed, 6 insertions(+) + +diff --git a/src/mtd.c b/src/mtd.c +index 1edc441..6d2264c 100644 +--- a/src/mtd.c ++++ b/src/mtd.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/src/mtd.h b/src/mtd.h +index bd21add..debfc84 100644 +--- a/src/mtd.h ++++ b/src/mtd.h +@@ -31,6 +31,11 @@ + #include "BootControlBlocks.h" + #include "rom_nand_hamming_code_ecc.h" + ++// musl library doesn't define loff_t ++#if !defined(__GLIBC__) && !defined(__UCLIBC__) ++#define loff_t off_t ++#endif ++ + //------------------------------------------------------------------------------ + // Re-definitions of true and false, because the standard ones aren't good + // enough? +-- +2.5.1 + diff --git a/package/freescale-imx/imx-kobs/0002-Fix-build-for-recent-toolchains.patch b/package/freescale-imx/imx-kobs/0002-Fix-build-for-recent-toolchains.patch new file mode 100644 index 0000000000..c5cfb80224 --- /dev/null +++ b/package/freescale-imx/imx-kobs/0002-Fix-build-for-recent-toolchains.patch @@ -0,0 +1,26 @@ +[PATCH] Fix build for recent toolchains + +Starting with Linux 4.4 headers, mtd-user.h isn't including stdint.h +anymore which breaks the build. + +Signed-off-by: Gary Bisson +--- + src/BootControlBlocks.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/BootControlBlocks.h b/src/BootControlBlocks.h +index 192eb61..aacdb64 100644 +--- a/src/BootControlBlocks.h ++++ b/src/BootControlBlocks.h +@@ -20,6 +20,8 @@ + #ifndef BOOTCONTROLBLOCKS_H_ + #define BOOTCONTROLBLOCKS_H_ + ++#include ++ + #define NCB_FINGERPRINT1 0x504d5453 //!< 'STMP' + #define NCB_FINGERPRINT2 0x2042434e //!< 'NCB' - NAND Control Block + #define NCB_FINGERPRINT3 0x4e494252 //!< 'RBIN' - ROM Boot Image Block - N +-- +2.6.4 + diff --git a/package/freescale-imx/imx-kobs/Config.in b/package/freescale-imx/imx-kobs/Config.in new file mode 100644 index 0000000000..fc2344ed0d --- /dev/null +++ b/package/freescale-imx/imx-kobs/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_IMX_KOBS + bool "imx-kobs" + depends on BR2_arm # Only relevant for i.MX + help + The imx-kobs tool is used for writing images to NAND on i.MX + platforms. + + This library is provided by Freescale as-is and doesn't have + an upstream. + diff --git a/package/freescale-imx/imx-kobs/imx-kobs.hash b/package/freescale-imx/imx-kobs/imx-kobs.hash new file mode 100644 index 0000000000..09d42edadc --- /dev/null +++ b/package/freescale-imx/imx-kobs/imx-kobs.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 45f729fc2b49556f1ca9df778f52bf5cc749cfe53664c8206daab29991c5f6c1 imx-kobs-5.3.tar.gz diff --git a/package/freescale-imx/imx-kobs/imx-kobs.mk b/package/freescale-imx/imx-kobs/imx-kobs.mk new file mode 100644 index 0000000000..cc4721f7d1 --- /dev/null +++ b/package/freescale-imx/imx-kobs/imx-kobs.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# imx-kobs +# +################################################################################ + +IMX_KOBS_VERSION = 5.3 +IMX_KOBS_SITE = $(FREESCALE_IMX_SITE) +IMX_KOBS_LICENSE = GPLv2+ +IMX_KOBS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/freescale-imx/imx-lib/Config.in b/package/freescale-imx/imx-lib/Config.in new file mode 100644 index 0000000000..3b0f7a921d --- /dev/null +++ b/package/freescale-imx/imx-lib/Config.in @@ -0,0 +1,16 @@ +comment "imx-lib needs an imx-specific Linux kernel to be built" + depends on BR2_arm && !BR2_LINUX_KERNEL + +config BR2_PACKAGE_IMX_LIB + bool "imx-lib" + depends on BR2_LINUX_KERNEL + depends on BR2_arm # Only relevant for i.MX + help + Library of userspace helpers specific for the Freescale i.MX + platform. It wraps the kernel interfaces for some i.MX platform + specific drivers. It requires a kernel that includes the i.MX + specific headers to be built. + + This library is provided by Freescale as-is and doesn't have + an upstream. + diff --git a/package/freescale-imx/imx-lib/imx-lib.hash b/package/freescale-imx/imx-lib/imx-lib.hash new file mode 100644 index 0000000000..8e4bd73eee --- /dev/null +++ b/package/freescale-imx/imx-lib/imx-lib.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 2b4547ffb1de328cf8997a09a423c6f015d808493efd11a98a5d42c6497e3445 imx-lib-5.1.tar.gz diff --git a/package/freescale-imx/imx-lib/imx-lib.mk b/package/freescale-imx/imx-lib/imx-lib.mk new file mode 100644 index 0000000000..b49357bd98 --- /dev/null +++ b/package/freescale-imx/imx-lib/imx-lib.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# imx-lib +# +################################################################################ + +IMX_LIB_VERSION = 5.1 +IMX_LIB_SITE = $(FREESCALE_IMX_SITE) +IMX_LIB_LICENSE = LGPLv2.1+ +IMX_LIB_LICENSE_FILES = COPYING-LGPL-2.1 + +IMX_LIB_INSTALL_STAGING = YES + +# imx-lib needs access to imx-specific kernel headers +IMX_LIB_DEPENDENCIES += linux +IMX_LIB_INCLUDE = \ + -I$(LINUX_DIR)/drivers/mxc/security/rng/include \ + -I$(LINUX_DIR)/drivers/mxc/security/sahara2/include \ + -idirafter $(LINUX_DIR)/include/uapi + +IMX_LIB_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + $(TARGET_CONFIGURE_OPTS) \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + PLATFORM=$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM) \ + INCLUDE="$(IMX_LIB_INCLUDE)" + +define IMX_LIB_BUILD_CMDS + $(IMX_LIB_MAKE_ENV) $(MAKE1) -C $(@D) +endef + +define IMX_LIB_INSTALL_STAGING_CMDS + $(IMX_LIB_MAKE_ENV) $(MAKE1) -C $(@D) DEST_DIR=$(STAGING_DIR) install +endef + +define IMX_LIB_INSTALL_TARGET_CMDS + $(IMX_LIB_MAKE_ENV) $(MAKE1) -C $(@D) DEST_DIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/freescale-imx/imx-uuc/Config.in b/package/freescale-imx/imx-uuc/Config.in new file mode 100644 index 0000000000..d18157540e --- /dev/null +++ b/package/freescale-imx/imx-uuc/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_IMX_UUC + bool "imx-uuc" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_arm # Only relevant for i.MX + select BR2_PACKAGE_HOST_DOSFSTOOLS + help + This package provides the Universal Adapter user-space + utility that is used to receive commands from the + Manufacturing Tool using the Freescale UTP Protocol. + + It requires a Freescale/NXP kernel whose configuration + contains the CONFIG_FSL_UTP option. + + This package is provided by Freescale/NXP as-is and doesn't + have an upstream. + +comment "imx-uuc needs a toolchain w/ threads" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/freescale-imx/imx-uuc/S80imx-uuc b/package/freescale-imx/imx-uuc/S80imx-uuc new file mode 100644 index 0000000000..8a02f88e50 --- /dev/null +++ b/package/freescale-imx/imx-uuc/S80imx-uuc @@ -0,0 +1,27 @@ +#!/bin/sh + +NAME=uuc +DAEMON=/usr/bin/$NAME + +case "$1" in + start) + printf "Starting $NAME: " + start-stop-daemon -S -q -b -p /var/run/${NAME}.pid -x $DAEMON + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping $NAME: " + start-stop-daemon -K -q -p /var/run/${NAME}.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart|reload) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/freescale-imx/imx-uuc/imx-uuc.hash b/package/freescale-imx/imx-uuc/imx-uuc.hash new file mode 100644 index 0000000000..05501c8b7c --- /dev/null +++ b/package/freescale-imx/imx-uuc/imx-uuc.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 95d7f7b075f58fedc07602fbc0e5bf5212d28deea3d09cdbcbd80992dcd18482 imx-uuc-0.5.1.tar.gz diff --git a/package/freescale-imx/imx-uuc/imx-uuc.mk b/package/freescale-imx/imx-uuc/imx-uuc.mk new file mode 100644 index 0000000000..58e749e42d --- /dev/null +++ b/package/freescale-imx/imx-uuc/imx-uuc.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# imx-uuc +# +################################################################################ + +IMX_UUC_VERSION = 0.5.1 +IMX_UUC_SITE = $(FREESCALE_IMX_SITE) +IMX_UUC_LICENSE = GPLv2+ +IMX_UUC_LICENSE_FILES = COPYING + +# mkfs.vfat is needed to create a FAT partition used by g_mass_storage +# so Windows do not offer to format the device when connected to the PC. +IMX_UUC_DEPENDENCIES = host-dosfstools + +define IMX_UUC_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC=$(TARGET_CC) +endef + +define IMX_UUC_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/uuc $(TARGET_DIR)/usr/bin/uuc + $(INSTALL) -D -m 755 $(@D)/sdimage $(TARGET_DIR)/usr/bin/sdimage + dd if=/dev/zero of=$(TARGET_DIR)/fat bs=1M count=1 + $(HOST_DIR)/usr/sbin/mkfs.vfat $(TARGET_DIR)/fat +endef + +define IMX_UUC_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/freescale-imx/imx-uuc/S80imx-uuc \ + $(TARGET_DIR)/etc/init.d/S80imx-uuc +endef + +define IMX_UUC_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/freescale-imx/imx-uuc/imx-uuc.service \ + $(TARGET_DIR)/usr/lib/systemd/system/imx-uuc.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ + ln -fs ../../../../usr/lib/systemd/system/imx-uuc.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/imx-uuc.service +endef + +$(eval $(generic-package)) diff --git a/package/freescale-imx/imx-uuc/imx-uuc.service b/package/freescale-imx/imx-uuc/imx-uuc.service new file mode 100644 index 0000000000..fae7fc64dd --- /dev/null +++ b/package/freescale-imx/imx-uuc/imx-uuc.service @@ -0,0 +1,11 @@ +[Unit] +Description=i.MX Universal UTP Communication Service +After=systemd-modules-load.service + +[Service] +Type=simple +ExecStart=/usr/bin/uuc + +[Install] +WantedBy=multi-user.target + diff --git a/package/freescale-imx/imx-vpu/Config.in b/package/freescale-imx/imx-vpu/Config.in new file mode 100644 index 0000000000..779717f5ed --- /dev/null +++ b/package/freescale-imx/imx-vpu/Config.in @@ -0,0 +1,17 @@ +comment "imx-vpu needs an i.MX platform with VPU support" + depends on BR2_arm + depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_VPU + +config BR2_PACKAGE_IMX_VPU + bool "imx-vpu" + depends on BR2_arm # Only relevant for i.MX + depends on BR2_PACKAGE_FREESCALE_IMX_HAS_VPU + select BR2_PACKAGE_FIRMWARE_IMX + help + Library of userspace helpers specific for the Freescale i.MX + platform. It wraps the kernel interfaces for the i.MX platform + Video Processing Unit (VPU) driver. It requires a kernel that + includes the i.MX specific headers to be built. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/freescale-imx/imx-vpu/imx-vpu.hash b/package/freescale-imx/imx-vpu/imx-vpu.hash new file mode 100644 index 0000000000..c828c2b09b --- /dev/null +++ b/package/freescale-imx/imx-vpu/imx-vpu.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 f11b91dcdb84bfefd3c88f10a9c1c1bc3420e4bbaadc38b9280fb52f7769eca8 imx-vpu-5.4.32.bin diff --git a/package/freescale-imx/imx-vpu/imx-vpu.mk b/package/freescale-imx/imx-vpu/imx-vpu.mk new file mode 100644 index 0000000000..949fefa4e2 --- /dev/null +++ b/package/freescale-imx/imx-vpu/imx-vpu.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# imx-vpu +# +################################################################################ + +IMX_VPU_VERSION = 5.4.32 +IMX_VPU_SITE = $(FREESCALE_IMX_SITE) +IMX_VPU_SOURCE = imx-vpu-$(IMX_VPU_VERSION).bin + +IMX_VPU_INSTALL_STAGING = YES + +IMX_VPU_MAKE_ENV = \ + $(TARGET_MAKE_ENV) \ + $(TARGET_CONFIGURE_OPTS) \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + PLATFORM=$(BR2_PACKAGE_FREESCALE_IMX_PLATFORM) + +IMX_VPU_LICENSE = Freescale Semiconductor Software License Agreement +IMX_VPU_LICENSE_FILES = EULA COPYING +IMX_VPU_REDISTRIBUTE = NO + +define IMX_VPU_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(IMX_VPU_SOURCE)) +endef + +define IMX_VPU_BUILD_CMDS + $(IMX_VPU_MAKE_ENV) $(MAKE1) -C $(@D) +endef + +define IMX_VPU_INSTALL_STAGING_CMDS + $(IMX_VPU_MAKE_ENV) $(MAKE1) -C $(@D) DEST_DIR=$(STAGING_DIR) install +endef + +define IMX_VPU_INSTALL_TARGET_CMDS + $(IMX_VPU_MAKE_ENV) $(MAKE1) -C $(@D) DEST_DIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/freescale-imx/kernel-module-imx-gpu-viv/Config.in b/package/freescale-imx/kernel-module-imx-gpu-viv/Config.in new file mode 100644 index 0000000000..bcc55175bc --- /dev/null +++ b/package/freescale-imx/kernel-module-imx-gpu-viv/Config.in @@ -0,0 +1,14 @@ +comment "kernel-module-imx-gpu-viv needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV + bool "kernel-module-imx-gpu-viv" + depends on BR2_LINUX_KERNEL + help + Kernel loadable module for Vivante GPU. + + This package uses an exact copy of the GPU kernel driver source code + of the same version as base and include fixes and improvements + developed by FSL Community + + https://github.com/Freescale/kernel-module-imx-gpu-viv diff --git a/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.hash b/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.hash new file mode 100644 index 0000000000..0842c7a7d7 --- /dev/null +++ b/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 971254d204f6c8f739d0a2094055cd0b8001dc7d366345f996b14a495f92459e kernel-module-imx-gpu-viv-2b3290d1c1ce383e860a0fd6b53074848a848e65.tar.gz diff --git a/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk b/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk new file mode 100644 index 0000000000..aad8e4080b --- /dev/null +++ b/package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# kernel-module-imx-gpu-viv +# +################################################################################ + +KERNEL_MODULE_IMX_GPU_VIV_VERSION = 2b3290d1c1ce383e860a0fd6b53074848a848e65 +KERNEL_MODULE_IMX_GPU_VIV_SITE = \ + $(call github,Freescale,kernel-module-imx-gpu-viv,$(KERNEL_MODULE_IMX_GPU_VIV_VERSION)) +KERNEL_MODULE_IMX_GPU_VIV_LICENSE = GPLv2 +KERNEL_MODULE_IMX_GPU_VIV_LICENSE_FILES = COPYING + +KERNEL_MODULE_IMX_GPU_VIV_MODULE_MAKE_OPTS = \ + AQROOT=$(@D)/kernel-module-imx-gpu-viv-src \ + KERNEL_DIR=$(LINUX_DIR) + +KERNEL_MODULE_IMX_GPU_VIV_MODULE_SUBDIRS = kernel-module-imx-gpu-viv-src + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/freescale-imx/libz160/Config.in b/package/freescale-imx/libz160/Config.in new file mode 100644 index 0000000000..cfbfb79e9e --- /dev/null +++ b/package/freescale-imx/libz160/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBZ160 + bool "libz160" + depends on BR2_ARM_EABI + depends on BR2_TOOLCHAIN_USES_GLIBC + help + An API for user space programs to perform 2D accelerated graphics + operations on AMD GPU (included for examples in iMX5x chipsets) + +comment "libz160 needs an EABI toolchain w/ (e)glibc" + depends on !BR2_ARM_EABI || !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/freescale-imx/libz160/libz160.mk b/package/freescale-imx/libz160/libz160.mk new file mode 100644 index 0000000000..af43b1859d --- /dev/null +++ b/package/freescale-imx/libz160/libz160.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# libz160 +# +################################################################################ + +LIBZ160_VERSION = 11.09.01 +LIBZ160_SOURCE = libz160-bin-$(LIBZ160_VERSION).bin +LIBZ160_SITE = $(FREESCALE_IMX_SITE) +LIBZ160_INSTALL_STAGING = YES + +# See freescale-imx +LIBZ160_LICENSE = Freescale Semiconductor Software License Agreement +LIBZ160_LICENSE_FILES = EULA +LIBZ160_REDISTRIBUTE = NO + +define LIBZ160_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBZ160_SOURCE)) +endef + +define LIBZ160_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 755 $(@D)/usr/lib/libz160.so $(STAGING_DIR)/usr/lib/libz160.so + $(INSTALL) -D -m 644 $(@D)/usr/include/z160.h $(STAGING_DIR)/usr/include/z160.h +endef + +define LIBZ160_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/usr/lib/libz160.so $(TARGET_DIR)/usr/lib/libz160.so +endef + +$(eval $(generic-package)) diff --git a/package/freeswitch/Config.in b/package/freeswitch/Config.in new file mode 100644 index 0000000000..6049af3a7c --- /dev/null +++ b/package/freeswitch/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_FREESWITCH + bool "freeswitch" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS # apr, included in freeswitch source + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # apr, included in freeswitch source + depends on BR2_USE_WCHAR # libuuid + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_JPEG + # src/mod/applications/mod_cv/mod_cv.cpp includes + # highgui.h, imgproc.hpp & objdetect.hpp + select BR2_PACKAGE_OPENCV_LIB_HIGHGUI if BR2_PACKAGE_OPENCV + select BR2_PACKAGE_OPENCV_LIB_IMGPROC if BR2_PACKAGE_OPENCV + select BR2_PACKAGE_OPENCV_LIB_OBJDETECT if BR2_PACKAGE_OPENCV + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_SPEEX + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_ZLIB + help + FreeSWITCH is a scalable open source cross-platform + telephony platform designed to route and interconnect + popular communication protocols using audio, video, text or + any other form of media. + + https://www.freeswitch.org + +comment "freeswitch needs a toolchain w/ C++, dynamic library, threads, wchar" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS \ + || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/freeswitch/freeswitch.hash b/package/freeswitch/freeswitch.hash new file mode 100644 index 0000000000..36bd75efcc --- /dev/null +++ b/package/freeswitch/freeswitch.hash @@ -0,0 +1,2 @@ +# From http://files.freeswitch.org/freeswitch-releases/freeswitch-1.6.8.tar.xz.sha256 +sha256 a9834667c0afc164631611b4862acd6411e4e6ddb706e4af4b51eab4adbe4fc1 freeswitch-1.6.8.tar.xz diff --git a/package/freeswitch/freeswitch.mk b/package/freeswitch/freeswitch.mk new file mode 100644 index 0000000000..03ef8bc9db --- /dev/null +++ b/package/freeswitch/freeswitch.mk @@ -0,0 +1,287 @@ +################################################################################ +# +# freeswitch +# +################################################################################ + +FREESWITCH_VERSION = 1.6.8 +FREESWITCH_SOURCE = freeswitch-$(FREESWITCH_VERSION).tar.xz +FREESWITCH_SITE = http://files.freeswitch.org/freeswitch-releases +FREESWITCH_LICENSE = MPLv1.1, \ + GPLv3+ with font exception (fonts), \ + Apache-2.0 (apr, apr-util), \ + LGPLv2+ (sofia-sip), \ + LGPLv2.1, GPLv2 (spandsp), \ + BSD-3c (libsrtp), \ + tiff license + +FREESWITCH_LICENSE_FILES = \ + COPYING \ + libs/apr/LICENSE \ + libs/apr-util/LICENSE \ + libs/sofia-sip/COPYING \ + libs/sofia-sip/COPYRIGHTS \ + libs/spandsp/COPYING \ + libs/srtp/LICENSE \ + libs/tiff-4.0.2/COPYRIGHT + +# required dependencies +FREESWITCH_DEPENDENCIES = \ + host-pkgconf \ + jpeg \ + libcurl \ + openssl \ + pcre \ + speex \ + sqlite \ + util-linux \ + zlib + +# we neither need host-perl nor host-php +FREESWITCH_CONF_ENV += \ + ac_cv_prog_PERL=false \ + ac_cv_have_perl=no \ + ac_cv_prog_PHP=false \ + ac_cv_have_php=no \ + ac_cv_prog_PHP_CONFIG=false \ + ac_cv_have_php_config=no + +# copied from freeswitch/configure.ac, line 258+ +FREESWITCH_CONF_ENV += \ + ac_cv_file__dev_ptmx=yes \ + ac_cv_va_copy=yes \ + ac_cv_file__dev_urandom=yes \ + ac_cv_func_realloc_0_nonnull=yes \ + ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_func_setpgrp_void=yes \ + ac_cv_file__dev_zero=yes \ + apr_cv_tcp_nodelay_with_cork=yes \ + ac_cv_file_dbd_apr_dbd_mysql_c=no \ + ac_cv_sizeof_ssize_t=4 \ + apr_cv_mutex_recursive=yes \ + ac_cv_func_pthread_rwlock_init=yes \ + apr_cv_type_rwlock_t=yes \ + apr_cv_process_shared_works=yes \ + apr_cv_mutex_robust_shared=yes + +# build breaks with -Werror enabled +FREESWITCH_CONF_ENV += \ + ac_cv_gcc_supports_w_no_unused_result=no + +FREESWITCH_CONF_OPTS = \ + --disable-libvpx \ + --disable-libyuv \ + --without-erlang \ + --enable-fhs \ + --without-python \ + --disable-system-xmlrpc-c + +# zrtp supports a limited set of archs, sparc support is also broken due +# to a broken ld call by gcc, see libs/libzrtp/include/zrtp_config.h +ifeq ($(BR2_i386)$(BR2_arm)$(BR2_armeb)$(BR2_aarch64)$(BR2_aarch64_be)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_powerpc)$(BR2_powerpc64)$(BR2_powerpcle)$(BR2_x86_64),y) +FREESWITCH_LICENSE_FILES += libs/libzrtp/src/zrtp_legal.c +FREESWITCH_CONF_OPTS += --enable-zrtp +else +FREESWITCH_CONF_OPTS += --disable-zrtp +endif + +# Enable optional modules +FREESWITCH_ENABLED_MODULES += \ + applications/mod_avmd \ + applications/mod_blacklist \ + applications/mod_callcenter \ + applications/mod_commands \ + applications/mod_conference \ + applications/mod_curl \ + applications/mod_db \ + applications/mod_directory \ + applications/mod_dptools \ + applications/mod_easyroute \ + applications/mod_esf \ + applications/mod_esl \ + applications/mod_expr \ + applications/mod_fifo \ + applications/mod_fsk \ + applications/mod_hash \ + applications/mod_httapi \ + applications/mod_lcr \ + applications/mod_sms \ + applications/mod_snom \ + applications/mod_spandsp \ + applications/mod_spy \ + applications/mod_valet_parking \ + applications/mod_voicemail \ + codecs/mod_g723_1 \ + codecs/mod_g729 \ + dialplans/mod_dialplan_asterisk \ + dialplans/mod_dialplan_xml \ + endpoints/mod_loopback \ + endpoints/mod_rtc \ + endpoints/mod_rtmp \ + endpoints/mod_sofia \ + endpoints/mod_verto \ + event_handlers/mod_cdr_csv \ + event_handlers/mod_cdr_sqlite \ + event_handlers/mod_event_socket \ + formats/mod_local_stream \ + formats/mod_native_file \ + formats/mod_tone_stream \ + loggers/mod_console \ + loggers/mod_logfile \ + loggers/mod_syslog \ + say/mod_say_de \ + say/mod_say_en \ + say/mod_say_es \ + say/mod_say_es_ar \ + say/mod_say_fa \ + say/mod_say_fr \ + say/mod_say_he \ + say/mod_say_hr \ + say/mod_say_hu \ + say/mod_say_it \ + say/mod_say_ja \ + say/mod_say_nl \ + say/mod_say_pl \ + say/mod_say_pt \ + say/mod_say_ru \ + say/mod_say_sv \ + say/mod_say_th \ + say/mod_say_zh \ + xml_int/mod_xml_cdr \ + xml_int/mod_xml_rpc \ + xml_int/mod_xml_scgi + +define FREESWITCH_ENABLE_MODULES + $(Q)echo $(FREESWITCH_ENABLED_MODULES) \ + | tr ' ' '\n' \ + > $(@D)/modules.conf +endef +FREESWITCH_PRE_CONFIGURE_HOOKS += FREESWITCH_ENABLE_MODULES + +# mod_isac supports a limited set of archs +# src/mod/codecs/mod_isac/typedefs.h +ifeq ($(BR2_i386)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_x86_64),y) +FREESWITCH_LICENSE := $(FREESWITCH_LICENSE), BSD-3c (mod_isac) +FREESWITCH_LICENSE_FILES += src/mod/codecs/mod_isac/LICENSE +FREESWITCH_ENABLED_MODULES += codecs/mod_isac +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +FREESWITCH_DEPENDENCIES += alsa-lib +FREESWITCH_ENABLED_MODULES += endpoints/mod_alsa +endif + +ifeq ($(BR2_PACKAGE_FREETYPE),y) +FREESWITCH_DEPENDENCIES += freetype +endif + +ifeq ($(BR2_PACKAGE_IMAGEMAGICK),y) +FREESWITCH_DEPENDENCIES += imagemagick +FREESWITCH_ENABLED_MODULES += formats/mod_imagick +endif + +ifeq ($(BR2_PACKAGE_LIBBROADVOICE),y) +FREESWITCH_DEPENDENCIES += libbroadvoice +FREESWITCH_ENABLED_MODULES += codecs/mod_bv +endif + +ifeq ($(BR2_PACKAGE_LIBCODEC2),y) +FREESWITCH_DEPENDENCIES += libcodec2 +FREESWITCH_ENABLED_MODULES += codecs/mod_codec2 +endif + +ifeq ($(BR2_PACKAGE_LIBEDIT),y) +FREESWITCH_DEPENDENCIES += libedit +FREESWITCH_CONF_OPTS += --enable-core-libedit-support +else +FREESWITCH_CONF_OPTS += --disable-core-libedit-support +endif + +ifeq ($(BR2_PACKAGE_LIBG7221),y) +FREESWITCH_DEPENDENCIES += libg7221 +endif + +ifeq ($(BR2_PACKAGE_LIBILBC),y) +FREESWITCH_DEPENDENCIES += libilbc +FREESWITCH_ENABLED_MODULES += codecs/mod_ilbc +endif + +ifeq ($(BR2_PACKAGE_LIBLDNS),y) +FREESWITCH_DEPENDENCIES += libldns +FREESWITCH_ENABLED_MODULES += applications/mod_enum +endif + +ifeq ($(BR2_PACKAGE_LIBMEMCACHED),y) +FREESWITCH_DEPENDENCIES += libmemcached +FREESWITCH_ENABLED_MODULES += applications/mod_memcache +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +FREESWITCH_DEPENDENCIES += libpng +FREESWITCH_ENABLED_MODULES += formats/mod_png +endif + +ifeq ($(BR2_PACKAGE_LIBYAML),y) +FREESWITCH_DEPENDENCIES += libyaml +FREESWITCH_ENABLED_MODULES += languages/mod_yaml +endif + +ifeq ($(BR2_PACKAGE_LUA),y) +FREESWITCH_DEPENDENCIES += lua +FREESWITCH_ENABLED_MODULES += languages/mod_lua +endif + +ifeq ($(BR2_PACKAGE_OPENLDAP),y) +FREESWITCH_DEPENDENCIES += openldap +FREESWITCH_ENABLED_MODULES += directories/mod_ldap xml_int/mod_xml_ldap +endif + +ifeq ($(BR2_PACKAGE_OPUS),y) +FREESWITCH_DEPENDENCIES += opus +FREESWITCH_ENABLED_MODULES += codecs/mod_opus +endif + +ifeq ($(BR2_PACKAGE_PORTAUDIO),y) +FREESWITCH_DEPENDENCIES += portaudio +FREESWITCH_ENABLED_MODULES += endpoints/mod_portaudio +endif + +ifeq ($(BR2_PACKAGE_LAME)$(BR2_PACKAGE_LIBSHOUT)$(BR2_PACKAGE_MPG123),yyy) +FREESWITCH_DEPENDENCIES += lame libshout mpg123 +FREESWITCH_ENABLED_MODULES += formats/mod_shout +endif + +ifeq ($(BR2_PACKAGE_LIBSILK),y) +FREESWITCH_DEPENDENCIES += libsilk +FREESWITCH_ENABLED_MODULES += codecs/mod_silk +endif + +ifeq ($(BR2_PACKAGE_LIBSNDFILE),y) +FREESWITCH_DEPENDENCIES += libsndfile +FREESWITCH_ENABLED_MODULES += formats/mod_sndfile +endif + +ifeq ($(BR2_PACKAGE_LIBSOUNDTOUCH),y) +FREESWITCH_DEPENDENCIES += libsoundtouch +FREESWITCH_ENABLED_MODULES += applications/mod_soundtouch +endif + +ifeq ($(BR2_PACKAGE_OPENCV),y) +FREESWITCH_DEPENDENCIES += opencv +FREESWITCH_ENABLED_MODULES += applications/mod_cv +endif + +ifeq ($(BR2_PACKAGE_UNIXODBC),y) +FREESWITCH_DEPENDENCIES += unixodbc +FREESWITCH_CONF_OPTS += \ + --enable-core-odbc-support \ + --with-odbc=$(STAGING_DIR)/usr +else +FREESWITCH_CONF_OPTS += --disable-core-odbc-support +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +FREESWITCH_DEPENDENCIES += xz +endif + +$(eval $(autotools-package)) diff --git a/package/freetype/Config.in b/package/freetype/Config.in new file mode 100644 index 0000000000..ded87388e8 --- /dev/null +++ b/package/freetype/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_FREETYPE + bool "freetype" + help + a free, high-quality and portable font engine. + + http://www.freetype.org/ diff --git a/package/freetype/freetype.hash b/package/freetype/freetype.hash new file mode 100644 index 0000000000..45f91df558 --- /dev/null +++ b/package/freetype/freetype.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/freetype/files/freetype2/2.6.3/ +md5 0037b25a8c090bc8a1218e867b32beb1 freetype-2.6.3.tar.bz2 +sha1 6c98bd5d0be313207c37ca23d25faf983486aee5 freetype-2.6.3.tar.bz2 diff --git a/package/freetype/freetype.mk b/package/freetype/freetype.mk new file mode 100644 index 0000000000..d95c424fa5 --- /dev/null +++ b/package/freetype/freetype.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# freetype +# +################################################################################ + +FREETYPE_VERSION = 2.6.3 +FREETYPE_SOURCE = freetype-$(FREETYPE_VERSION).tar.bz2 +FREETYPE_SITE = http://downloads.sourceforge.net/project/freetype/freetype2/$(FREETYPE_VERSION) +FREETYPE_INSTALL_STAGING = YES +FREETYPE_MAKE_OPTS = CCexe="$(HOSTCC)" +FREETYPE_LICENSE = Dual FTL/GPLv2+ +FREETYPE_LICENSE_FILES = docs/FTL.TXT docs/GPLv2.TXT +FREETYPE_DEPENDENCIES = host-pkgconf +FREETYPE_CONFIG_SCRIPTS = freetype-config + +HOST_FREETYPE_DEPENDENCIES = host-pkgconf +HOST_FREETYPE_CONF_OPTS = --without-zlib --without-bzip2 --without-png + +# Regen required because the tarball ships with an experimental ltmain.sh +# that can't be patched by our infra. +# autogen.sh is because autotools stuff lives in other directories and +# even AUTORECONF with _OPTS doesn't do it properly. +# POST_PATCH is because we still need to patch libtool after the regen. +define FREETYPE_RUN_AUTOGEN + cd $(@D) && PATH=$(BR_PATH) ./autogen.sh +endef +FREETYPE_POST_PATCH_HOOKS += FREETYPE_RUN_AUTOGEN +HOST_FREETYPE_POST_PATCH_HOOKS += FREETYPE_RUN_AUTOGEN +FREETYPE_DEPENDENCIES += host-automake host-autoconf host-libtool +HOST_FREETYPE_DEPENDENCIES += host-automake host-autoconf host-libtool + +ifeq ($(BR2_PACKAGE_ZLIB),y) +FREETYPE_DEPENDENCIES += zlib +FREETYPE_CONF_OPTS += --with-zlib +else +FREETYPE_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +FREETYPE_DEPENDENCIES += bzip2 +FREETYPE_CONF_OPTS += --with-bzip2 +else +FREETYPE_CONF_OPTS += --without-bzip2 +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +FREETYPE_DEPENDENCIES += libpng +FREETYPE_CONF_OPTS += LIBPNG_CFLAGS="`$(STAGING_DIR)/usr/bin/libpng-config --cflags`" \ + LIBPNG_LDFLAGS="`$(STAGING_DIR)/usr/bin/libpng-config --ldflags`" +FREETYPE_LIBPNG_LIBS = "`$(STAGING_DIR)/usr/bin/libpng-config --libs`" +else +FREETYPE_CONF_OPTS += --without-png +endif + +# Extra fixing since includedir and libdir are expanded from configure values +define FREETYPE_FIX_CONFIG_FILE + $(SED) 's:^includedir=.*:includedir="$${prefix}/include":' \ + -e 's:^libdir=.*:libdir="$${exec_prefix}/lib":' \ + $(STAGING_DIR)/usr/bin/freetype-config +endef +FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_CONFIG_FILE + +# libpng isn't included in freetype-config & freetype2.pc :-/ +define FREETYPE_FIX_CONFIG_FILE_LIBS + $(SED) "s,^Libs.private:,& $(FREETYPE_LIBPNG_LIBS)," \ + $(STAGING_DIR)/usr/lib/pkgconfig/freetype2.pc + $(SED) "s,-lfreetype,& $(FREETYPE_LIBPNG_LIBS)," \ + $(STAGING_DIR)/usr/bin/freetype-config +endef +FREETYPE_POST_INSTALL_STAGING_HOOKS += FREETYPE_FIX_CONFIG_FILE_LIBS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +# freetype-patch and host-freetype-patch use autogen.sh so add +# host-automake as a order-only-prerequisite because it is a phony +# target. +$(FREETYPE_TARGET_PATCH) $(HOST_FREETYPE_TARGET_PATCH): | host-automake diff --git a/package/fswebcam/Config.in b/package/fswebcam/Config.in new file mode 100644 index 0000000000..d268454aae --- /dev/null +++ b/package/fswebcam/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_FSWEBCAM + bool "fswebcam" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_GD + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBPNG + help + fswebcam is a neat and simple webcam app. It captures images + from a V4L1/V4L2 compatible device or file, averages them to + reduce noise and draws a caption using the GD Graphics + Library which also handles compressing the image to PNG or + JPEG. The resulting image is saved to a file or sent to + stdio where it can be piped to something like ncftpput or + scp. + + http://www.firestorm.cx/fswebcam/ + +comment "fswebcam needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/fswebcam/fswebcam.hash b/package/fswebcam/fswebcam.hash new file mode 100644 index 0000000000..3822a27377 --- /dev/null +++ b/package/fswebcam/fswebcam.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3ee389f72a7737700d22e0c954720b1e3bbadc8a0daad6426c25489ba9dc3199 fswebcam-20140113.tar.gz diff --git a/package/fswebcam/fswebcam.mk b/package/fswebcam/fswebcam.mk new file mode 100644 index 0000000000..8cb40d6930 --- /dev/null +++ b/package/fswebcam/fswebcam.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# fswebcam +# +################################################################################ + +FSWEBCAM_VERSION = 20140113 +FSWEBCAM_SITE = http://www.firestorm.cx/fswebcam/files +FSWEBCAM_LICENSE = GPLv2 +FSWEBCAM_LICENSE_FILES = LICENSE + +FSWEBCAM_DEPENDENCIES += freetype jpeg libpng gd + +$(eval $(autotools-package)) diff --git a/package/ftop/0001-overflow.patch b/package/ftop/0001-overflow.patch new file mode 100644 index 0000000000..a3a27c3772 --- /dev/null +++ b/package/ftop/0001-overflow.patch @@ -0,0 +1,17 @@ +Set tmp_buf and rate_buf to something ridiculously high to fix a buffer +overflow when COLUMNS is large. - JeR + +(Taken from gentoo portage) +Signed-off-by: Gustavo Zacarias + +--- a/src/ftop.c 2009-02-16 07:00:00.000000000 +0100 ++++ b/src/ftop.c 2013-09-06 14:42:41.788852952 +0200 +@@ -736,7 +736,7 @@ + { + size_t i, j, bytes, bar_total; + char more_procs_ch, more_files_ch, expanded_ch; +- char tmp_buf[80], rate_buf[80]; ++ char tmp_buf[2048], rate_buf[2048]; + char *tmp_str; + snapshot *s, *s_prev; + file_info *tmp_file; diff --git a/package/ftop/Config.in b/package/ftop/Config.in new file mode 100644 index 0000000000..1f5ebbbbfa --- /dev/null +++ b/package/ftop/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_FTOP + bool "ftop" + select BR2_PACKAGE_NCURSES + help + Ftop is to files what top is to processes. + The progress of all open files and file systems can be monitored. + + https://code.google.com/p/ftop/ diff --git a/package/ftop/ftop.hash b/package/ftop/ftop.hash new file mode 100644 index 0000000000..06f2fb1f40 --- /dev/null +++ b/package/ftop/ftop.hash @@ -0,0 +1,2 @@ +# From https://code.google.com/p/ftop/downloads/detail?name=ftop-1.0.tar.gz&can=2&q= +sha1 a0523862dd63ed3bec14846b6e05afcfdebb15c2 ftop-1.0.tar.gz diff --git a/package/ftop/ftop.mk b/package/ftop/ftop.mk new file mode 100644 index 0000000000..c8d0f93b92 --- /dev/null +++ b/package/ftop/ftop.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# ftop +# +################################################################################ + +FTOP_VERSION = 1.0 +FTOP_SITE = http://ftop.googlecode.com/files +FTOP_DEPENDENCIES = ncurses +FTOP_LICENSE = GPLv3+ +FTOP_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/fxload/Config.in b/package/fxload/Config.in new file mode 100644 index 0000000000..ac190f043e --- /dev/null +++ b/package/fxload/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_FXLOAD + bool "fxload" + help + This program is conveniently able to download firmware into FX, FX2, + and FX2LP EZ-USB devices, as well as the original AnchorChips EZ-USB. + It is intended to be invoked by hotplug scripts when the unprogrammed + device appears on the bus. + + http://sourceforge.net/projects/linux-hotplug/ diff --git a/package/fxload/fxload.hash b/package/fxload/fxload.hash new file mode 100644 index 0000000000..7febbccf1d --- /dev/null +++ b/package/fxload/fxload.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 0cc8bfd2a7cbba2f68e0c5767477634922287943c91dd9fcf029fc8b9d577858 fxload-2008_10_13.tar.gz diff --git a/package/fxload/fxload.mk b/package/fxload/fxload.mk new file mode 100644 index 0000000000..b34dccd7f1 --- /dev/null +++ b/package/fxload/fxload.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# fxload +# +################################################################################ + +FXLOAD_VERSION = 2008_10_13 +FXLOAD_SITE = http://downloads.sourceforge.net/project/linux-hotplug/fxload/$(FXLOAD_VERSION) +FXLOAD_LICENSE = GPLv2+ +FXLOAD_LICENSE_FILES = COPYING + +define FXLOAD_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all +endef + +define FXLOAD_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) prefix=$(TARGET_DIR) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/gadgetfs-test/0001-fix-usb-ch9-include.patch b/package/gadgetfs-test/0001-fix-usb-ch9-include.patch new file mode 100644 index 0000000000..3d7ce82b4f --- /dev/null +++ b/package/gadgetfs-test/0001-fix-usb-ch9-include.patch @@ -0,0 +1,40 @@ +From 8cf5909c6f8e0a892155dea14a07adfad445762d Mon Sep 17 00:00:00 2001 +From: Haavard Skinnemoen +Date: Sat, 23 Jun 2007 18:34:09 +0200 +Subject: [PATCH] Include usb/ch9.h instead of usb_ch9.h + +Signed-off-by: Haavard Skinnemoen +--- + usb.c | 2 +- + usbstring.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/usb.c b/usb.c +index ea6c7de..b161154 100644 +--- a/usb.c ++++ b/usb.c +@@ -35,7 +35,7 @@ + + #include + #include +-#include ++#include + + #ifdef AIO + /* this aio code works with libaio-0.3.106 */ +diff --git a/usbstring.c b/usbstring.c +index 4bf2965..993acc2 100644 +--- a/usbstring.c ++++ b/usbstring.c +@@ -11,7 +11,7 @@ + #include + + #include +-#include ++#include + + #include "usbstring.h" + +-- +1.5.2.2 + diff --git a/package/gadgetfs-test/0002-rename-include-usb_gadgetfs-to-usb-dir.patch b/package/gadgetfs-test/0002-rename-include-usb_gadgetfs-to-usb-dir.patch new file mode 100644 index 0000000000..ffc2da377d --- /dev/null +++ b/package/gadgetfs-test/0002-rename-include-usb_gadgetfs-to-usb-dir.patch @@ -0,0 +1,12 @@ +diff -upr gadgetfs-test-orig/usb.c gadgetfs-test/usb.c +--- gadgetfs-test-orig/usb.c 2007-07-18 14:38:38.000000000 +0200 ++++ gadgetfs-test/usb.c 2007-07-18 15:33:04.000000000 +0200 +@@ -34,7 +34,7 @@ + #include + + #include +-#include ++#include + #include + + #ifdef AIO diff --git a/package/gadgetfs-test/Config.in b/package/gadgetfs-test/Config.in new file mode 100644 index 0000000000..9a603066e7 --- /dev/null +++ b/package/gadgetfs-test/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_GADGETFS_TEST + bool "gadgetfs-test" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Test program for gadgetfs from linux-usb.org + +if BR2_PACKAGE_GADGETFS_TEST + +config BR2_PACKAGE_GADGETFS_TEST_USE_AIO + bool "use asynchronous i/o" + depends on BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS + select BR2_PACKAGE_LIBAIO + help + Select this to have gadgetfs-test do asynchronous I/O using + the libaio library. + +endif + +comment "gadgetfs-test needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gadgetfs-test/gadgetfs-test.hash b/package/gadgetfs-test/gadgetfs-test.hash new file mode 100644 index 0000000000..b96190a574 --- /dev/null +++ b/package/gadgetfs-test/gadgetfs-test.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 bd8ebcf7ce86f4b022a4e7ba6b1cc16ffc4022bb58c1910fe4ac96c88217e7ec gadgetfs-test.tar.bz2 diff --git a/package/gadgetfs-test/gadgetfs-test.mk b/package/gadgetfs-test/gadgetfs-test.mk new file mode 100644 index 0000000000..655f50a564 --- /dev/null +++ b/package/gadgetfs-test/gadgetfs-test.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# gadgetfs-test +# +################################################################################ + +GADGETFS_TEST_SOURCE = gadgetfs-test.tar.bz2 +GADGETFS_TEST_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/GadgetFsTest + +GADGETFS_TEST_MAKEOPTS = CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" + +ifeq ($(BR2_PACKAGE_GADGETFS_TEST_USE_AIO),y) +GADGETFS_TEST_DEPENDENCIES = libaio +GADGETFS_TEST_MAKEOPTS += USE_AIO=y +endif + +define GADGETFS_TEST_BUILD_CMDS + $(MAKE) -C $(@D) $(GADGETFS_TEST_MAKEOPTS) +endef + +define GADGETFS_TEST_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) prefix=/usr install +endef + +$(eval $(generic-package)) diff --git a/package/gamin/0001-no-abstract-sockets.patch b/package/gamin/0001-no-abstract-sockets.patch new file mode 100644 index 0000000000..3d659015ec --- /dev/null +++ b/package/gamin/0001-no-abstract-sockets.patch @@ -0,0 +1,61 @@ +[PATCH]: Remove abstract socket namespace check breaking cross compilation + +Taken from openembedded: + +http://git.openembedded.org/cgit.cgi/openembedded/tree/recipes/gamin/files/no-abstract-sockets.patch + +Signed-off-by: Peter Korsgaard +--- /tmp/configure.in 2007-04-30 13:08:49.000000000 +0200 ++++ gamin-0.1.8/configure.in 2007-04-30 13:10:53.285251000 +0200 +@@ -354,51 +354,6 @@ + AC_DEFINE(HAVE_CMSGCRED,1,[Have cmsgcred structure]) + fi + +-#### Abstract sockets +- +-AC_MSG_CHECKING(abstract socket namespace) +-AC_LANG_PUSH(C) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( +-[[ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-]], +-[[ +- int listen_fd; +- struct sockaddr_un addr; +- +- listen_fd = socket (PF_UNIX, SOCK_STREAM, 0); +- +- if (listen_fd < 0) +- { +- fprintf (stderr, "socket() failed: %s\n", strerror (errno)); +- exit (1); +- } +- +- memset (&addr, '\0', sizeof (addr)); +- addr.sun_family = AF_UNIX; +- strcpy (addr.sun_path, "X/tmp/dbus-fake-socket-path-used-in-configure-test"); +- addr.sun_path[0] = '\0'; /* this is what makes it abstract */ +- +- if (bind (listen_fd, (struct sockaddr*) &addr, SUN_LEN (&addr)) < 0) +- { +- fprintf (stderr, "Abstract socket namespace bind() failed: %s\n", +- strerror (errno)); +- exit (1); +- } +- else +- exit (0); +-]])], +- [have_abstract_sockets=yes], +- [have_abstract_sockets=no]) +-AC_LANG_POP(C) +-AC_MSG_RESULT($have_abstract_sockets) +- + if test x$enable_abstract_sockets = xyes; then + if test x$have_abstract_sockets = xno; then + AC_MSG_ERROR([Abstract sockets explicitly required, and support not detected.]) diff --git a/package/gamin/0002-no-const-return.patch b/package/gamin/0002-no-const-return.patch new file mode 100644 index 0000000000..3e6e905214 --- /dev/null +++ b/package/gamin/0002-no-const-return.patch @@ -0,0 +1,57 @@ +G_CONST_RETURN is deprecated in glib 2.30 so remove to to avoid +build failures. + +Upstream-Status: Pending + +Index: gamin-0.1.10/server/gam_node.c +=================================================================== +--- gamin-0.1.10.orig/server/gam_node.c 2011-10-12 15:25:45.217178314 +0100 ++++ gamin-0.1.10/server/gam_node.c 2011-10-12 15:26:17.807178293 +0100 +@@ -122,7 +122,7 @@ + * it has finished with the string. If it must keep it longer, it + * should makes its own copy. The returned string must not be freed. + */ +-G_CONST_RETURN char * ++const char * + gam_node_get_path(GamNode * node) + { + g_assert(node); +Index: gamin-0.1.10/server/gam_node.h +=================================================================== +--- gamin-0.1.10.orig/server/gam_node.h 2011-10-12 15:25:46.857178269 +0100 ++++ gamin-0.1.10/server/gam_node.h 2011-10-12 15:26:28.637178297 +0100 +@@ -58,7 +58,7 @@ + void gam_node_set_is_dir (GamNode *node, + gboolean is_dir); + +-G_CONST_RETURN char *gam_node_get_path (GamNode *node); ++const char *gam_node_get_path (GamNode *node); + + GList *gam_node_get_subscriptions (GamNode *node); + +Index: gamin-0.1.10/server/gam_subscription.c +=================================================================== +--- gamin-0.1.10.orig/server/gam_subscription.c 2011-10-12 15:25:40.497177525 +0100 ++++ gamin-0.1.10/server/gam_subscription.c 2011-10-12 15:26:39.867178304 +0100 +@@ -141,7 +141,7 @@ + * @param sub the GamSubscription + * @returns The path being monitored. It should not be freed. + */ +-G_CONST_RETURN char * ++const char * + gam_subscription_get_path(GamSubscription * sub) + { + if (sub == NULL) +Index: gamin-0.1.10/server/gam_subscription.h +=================================================================== +--- gamin-0.1.10.orig/server/gam_subscription.h 2011-10-12 15:25:28.507178266 +0100 ++++ gamin-0.1.10/server/gam_subscription.h 2011-10-12 15:25:58.817178285 +0100 +@@ -21,7 +21,7 @@ + + int gam_subscription_get_reqno (GamSubscription *sub); + +-G_CONST_RETURN char *gam_subscription_get_path (GamSubscription *sub); ++const char *gam_subscription_get_path (GamSubscription *sub); + + GamListener *gam_subscription_get_listener (GamSubscription *sub); + diff --git a/package/gamin/0003-fix-missing-PTHREAD_MUTEX_RECURSIVE_NP.patch b/package/gamin/0003-fix-missing-PTHREAD_MUTEX_RECURSIVE_NP.patch new file mode 100644 index 0000000000..429127736c --- /dev/null +++ b/package/gamin/0003-fix-missing-PTHREAD_MUTEX_RECURSIVE_NP.patch @@ -0,0 +1,20 @@ +Fix missing PTHREAD_MUTEX_RECURSIVE_NP + +The musl C library does not provide the non portable +PTHREAD_MUTEX_RECURSIVE_NP. Test for PTHREAD_MUTEX_RECURSIVE_NP only. + +Signed-off-by: Baruch Siach +--- + +diff -Nuar gamin-0.1.10-orig/libgamin/gam_data.c gamin-0.1.10/libgamin/gam_data.c +--- gamin-0.1.10-orig/libgamin/gam_data.c 2007-07-04 16:36:48.000000000 +0300 ++++ gamin-0.1.10/libgamin/gam_data.c 2016-03-01 14:50:18.931696959 +0200 +@@ -470,7 +470,7 @@ + } + if (is_threaded > 0) { + pthread_mutexattr_init(&attr); +-#if defined(linux) || defined(PTHREAD_MUTEX_RECURSIVE_NP) ++#if defined(PTHREAD_MUTEX_RECURSIVE_NP) + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); + #else + pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); diff --git a/package/gamin/Config.in b/package/gamin/Config.in new file mode 100644 index 0000000000..55e037a4a4 --- /dev/null +++ b/package/gamin/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_GAMIN + bool "gamin" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + help + the File Alteration Monitor + + http://www.gnome.org/~veillard/gamin/sources + +comment "gamin needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gamin/gamin.hash b/package/gamin/gamin.hash new file mode 100644 index 0000000000..0a43706193 --- /dev/null +++ b/package/gamin/gamin.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 28085f0ae8be10eab582ff186af4fb0be92cc6c62b5cc19cd09b295c7c2899a1 gamin-0.1.10.tar.gz diff --git a/package/gamin/gamin.mk b/package/gamin/gamin.mk new file mode 100644 index 0000000000..d908b90dcd --- /dev/null +++ b/package/gamin/gamin.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# gamin +# +################################################################################ + +GAMIN_VERSION = 0.1.10 +GAMIN_SITE = http://www.gnome.org/~veillard/gamin/sources +GAMIN_AUTORECONF = YES +GAMIN_INSTALL_STAGING = YES +GAMIN_LICENSE = LGPLv2+ +GAMIN_LICENSE_FILES = COPYING + +# python support broken +GAMIN_CONF_OPTS += --without-python + +GAMIN_CONF_ENV = have_abstract_sockets=no + +GAMIN_DEPENDENCIES = libglib2 + +$(eval $(autotools-package)) diff --git a/package/gauche/0001-fix-so-suffix.patch b/package/gauche/0001-fix-so-suffix.patch new file mode 100644 index 0000000000..b65e269981 --- /dev/null +++ b/package/gauche/0001-fix-so-suffix.patch @@ -0,0 +1,31 @@ +With uclibc or musl configuration, $host does not match to '*-linux-gnu*'. +I touch configure directly instead of configure.ac because autoreconf +failed by version mismatch of autotools. + +Signed-off-by: Hiroshi Kawashima + +diff -ur a/configure b/configure +--- a/configure 2014-07-20 15:15:05.000000000 +0900 ++++ b/configure 2015-10-20 21:52:32.791442291 +0900 +@@ -6843,7 +6843,7 @@ + SHLIB_MAIN_LDFLAGS="" + SHLIB_OK=ok + ;; +- *-linux-gnu*|*-*-gnu*|*freebsd*|*dragonfly*) ++ *-linux-*|*-*-gnu*|*freebsd*|*dragonfly*) + SHLIB_SO_CFLAGS="-fPIC" + SHLIB_SO_LDFLAGS="$rpath -shared -o" + SHLIB_SO_SUFFIX="so" + +diff -ur a/configure.ac b/configure.ac +--- a/configure.ac 2015-10-21 21:33:17.370000200 +0900 ++++ b/configure.ac 2015-10-21 21:33:39.784110527 +0900 +@@ -572,7 +572,7 @@ + SHLIB_MAIN_LDFLAGS="" + SHLIB_OK=ok + ;; +- *-linux-gnu*|*-*-gnu*|*freebsd*|*dragonfly*) ++ *-linux-*|*-*-gnu*|*freebsd*|*dragonfly*) + SHLIB_SO_CFLAGS="-fPIC" + SHLIB_SO_LDFLAGS="$rpath -shared -o" + SHLIB_SO_SUFFIX="so" diff --git a/package/gauche/0002-gc-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch b/package/gauche/0002-gc-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch new file mode 100644 index 0000000000..6cc065693f --- /dev/null +++ b/package/gauche/0002-gc-configure.ac-add-check-for-NO_GETCONTEXT-definition.patch @@ -0,0 +1,62 @@ +gc/configure.ac: add check for NO_GETCONTEXT definition + +This patch is ported from bdwgc package. Since Gauche uses an internal +copy of the boehm gc code, it is affected by the same problem. + +Both configure and configure.ac are modified because autoreconf fails +due to an incompatibility with the version of the autotools used by +Buildroot. + +Signed-off-by: Hiroshi Kawashima + +Original credits of patch in bdwgc package: +Signed-off-by: Samuel Martin +[yann.morin.1998@free.fr: add a comment, change variable name, use + AS_IF, remove debug traces, use AC_CHECK_FUNCS (as suggested by + Thomas)] +Signed-off-by: "Yann E. MORIN" +Cc: Thomas Petazzoni + +diff -ur a/gc/configure b/gc/configure +--- a/gc/configure 2015-11-12 21:41:02.394822056 +0900 ++++ b/gc/configure 2015-11-12 22:04:14.655157423 +0900 +@@ -16153,6 +16153,23 @@ + $as_echo "$ac_cv_fno_strict_aliasing" >&6; } + fi + ++# Check for getcontext (uClibc can be configured without it, for example) ++for ac_func in getcontext ++do : ++ ac_fn_c_check_func "$LINENO" "getcontext" "ac_cv_func_getcontext" ++if test "x$ac_cv_func_getcontext" = xyes; then : ++ cat >>confdefs.h <<_ACEOF ++#define HAVE_GETCONTEXT 1 ++_ACEOF ++ ++fi ++done ++ ++if test "$ac_cv_func_getcontext" = "no"; then : ++ CFLAGS="$CFLAGS -DNO_GETCONTEXT" ++ CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT" ++fi ++ + case "$host" in + # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64 + # and unnecessary everywhere. +diff -ur a/gc/configure.ac b/gc/configure.ac +--- a/gc/configure.ac 2015-11-12 22:31:44.851510997 +0900 ++++ b/gc/configure.ac 2015-11-12 22:33:39.292191227 +0900 +@@ -459,6 +459,12 @@ + AC_MSG_RESULT($ac_cv_fno_strict_aliasing) + fi + ++# Check for getcontext (uClibc can be configured without it, for example) ++AC_CHECK_FUNCS([getcontext]) ++AS_IF([test "$ac_cv_func_getcontext" = "no"], ++ [CFLAGS="$CFLAGS -DNO_GETCONTEXT" ++ CPPFLAGS="$CPPFLAGS -DNO_GETCONTEXT"]) ++ + case "$host" in + # While IRIX 6 has libdl for the O32 and N32 ABIs, it's missing for N64 + # and unnecessary everywhere. diff --git a/package/gauche/Config.in b/package/gauche/Config.in new file mode 100644 index 0000000000..3ca012d3f8 --- /dev/null +++ b/package/gauche/Config.in @@ -0,0 +1,28 @@ +# Architecture dependency from the bundled bdwgc. +config BR2_PACKAGE_GAUCHE_ARCH_SUPPORTS + bool + default y if BR2_arm || BR2_armeb || BR2_i386 || BR2_m68k || \ + BR2_mips || BR2_mipsel || BR2_mips64 || \ + BR2_mips64el || BR2_powerpc || BR2_powerpc64 || \ + BR2_powerpc64le || BR2_sh || BR2_sh64 || BR2_x86_64 + +config BR2_PACKAGE_GAUCHE + bool "gauche" + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_USE_MMU # fork() + depends on BR2_PACKAGE_GAUCHE_ARCH_SUPPORTS + depends on !BR2_STATIC_LIBS + help + Gauche is an R7RS Scheme implementation developed to be a + handy script interpreter, which allows programmers and + system administrators to write small to large scripts for + their daily chores. Quick startup, built-in system + interface, native multilingual support are some of its + goals. + + http://practical-scheme.net/gauche/ + +comment "gauche needs a toolchain w/ NPTL, dynamic library" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_GAUCHE_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS diff --git a/package/gauche/gauche.hash b/package/gauche/gauche.hash new file mode 100644 index 0000000000..975e958a08 --- /dev/null +++ b/package/gauche/gauche.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 7b18bcd70beaced1e004594be46c8cff95795318f6f5830dd2a8a700410fc149 Gauche-0.9.4.tgz +sha256 0ff5986540d8ad89eee595de766810f09e489a6a3363b47a65ce7ad18701ee01 13a196557848f22a1607a300643131345e9f32b3.patch diff --git a/package/gauche/gauche.mk b/package/gauche/gauche.mk new file mode 100644 index 0000000000..85fcc71848 --- /dev/null +++ b/package/gauche/gauche.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# gauche +# +################################################################################ + +GAUCHE_VERSION = 0.9.4 +GAUCHE_SOURCE = Gauche-$(GAUCHE_VERSION).tgz +GAUCHE_SITE = http://downloads.sourceforge.net/project/gauche/Gauche +GAUCHE_LICENSE = BSD-3c, Boehm-gc, SRFI (srfi-11.scm), reload (reload.scm) +GAUCHE_LICENSE_FILES = COPYING +GAUCHE_DEPENDENCIES = host-gauche +GAUCHE_PATCH = https://github.com/shirok/Gauche/commit/13a196557848f22a1607a300643131345e9f32b3.patch + +HOST_GAUCHE_CONF_OPTS = --without-zlib +GAUCHE_CONF_OPTS = --without-libatomic-ops + +ifeq ($(BR2_PACKAGE_ZLIB),y) +GAUCHE_CONF_OPTS += --with-zlib=$(STAGING_DIR) +GAUCHE_DEPENDENCIES += zlib +else +GAUCHE_CONF_OPTS += --without-zlib +endif + +# Detection of c99 support in configure fails without WCHAR. To enable +# automatic detection of c99 support by configure, we need to enable +# WCHAR in toolchain. But actually we do not need WCHAR at gauche +# runtime. So reuesting WCHAR in toolchain just for automatic detection +# will be overkill. To solve this, explicitly -std=gnu99 is specified +# here. +GAUCHE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99" + +$(eval $(host-autotools-package)) +$(eval $(autotools-package)) diff --git a/package/gawk/0001-no-versioned.patch b/package/gawk/0001-no-versioned.patch new file mode 100644 index 0000000000..0c35088e86 --- /dev/null +++ b/package/gawk/0001-no-versioned.patch @@ -0,0 +1,26 @@ +Disabled versioned installation of binaries to save space. +Also use symlinks where it's appropiate. + +Signed-off-by: Gustavo Zacarias +[Gustavo: update for 4.1.2] + +diff -Nura gawk-4.1.2.orig/Makefile.in gawk-4.1.2/Makefile.in +--- gawk-4.1.2.orig/Makefile.in 2015-04-29 16:11:09.367925925 -0300 ++++ gawk-4.1.2/Makefile.in 2015-04-29 16:11:25.308466495 -0300 +@@ -554,7 +554,7 @@ + CLEANFILES = core core.* + + # We want hard links for install-exec-hook, below +-LN = ln ++LN = $(LN_S) + + # For some make's, e.g. OpenBSD, that don't define this + RM = rm -f +@@ -1173,6 +1173,7 @@ + # (This is done universally, which may not always be right, but + # there's no easy way to distinguish GNU from non-GNU systems.) + install-exec-hook: ++foo: + (cd $(DESTDIR)$(bindir); \ + $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ + if [ ! -f awk$(EXEEXT) ]; \ diff --git a/package/gawk/Config.in b/package/gawk/Config.in new file mode 100644 index 0000000000..949f509b85 --- /dev/null +++ b/package/gawk/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_GAWK + bool "gawk" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + help + A special-purpose programming language which is data driven + rather than procedural. Allows for simple data-reformatting jobs + with just a few lines of code. + + http://www.gnu.org/software/gawk/ + +comment "gawk needs a toolchain w/ wchar, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS diff --git a/package/gawk/gawk.hash b/package/gawk/gawk.hash new file mode 100644 index 0000000000..7f746d8814 --- /dev/null +++ b/package/gawk/gawk.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 e3cf55e91e31ea2845f8338bedd91e40671fc30e4d82ea147d220e687abda625 gawk-4.1.3.tar.xz diff --git a/package/gawk/gawk.mk b/package/gawk/gawk.mk new file mode 100644 index 0000000000..da9be95cd0 --- /dev/null +++ b/package/gawk/gawk.mk @@ -0,0 +1,59 @@ +################################################################################ +# +# gawk +# +################################################################################ + +GAWK_VERSION = 4.1.3 +GAWK_SOURCE = gawk-$(GAWK_VERSION).tar.xz +GAWK_SITE = $(BR2_GNU_MIRROR)/gawk +GAWK_DEPENDENCIES = host-gawk +GAWK_LICENSE = GPLv3+ +GAWK_LICENSE_FILES = COPYING + +# Prefer full-blown gawk over busybox awk +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +GAWK_DEPENDENCIES += busybox +endif + +ifeq ($(BR2_PACKAGE_LIBSIGSEGV),y) +GAWK_DEPENDENCIES += libsigsegv +endif + +# --with-mpfr requires an argument so just let +# configure find it automatically +ifeq ($(BR2_PACKAGE_MPFR),y) +GAWK_DEPENDENCIES += mpfr +else +GAWK_CONF_OPTS += --without-mpfr +endif + +# --with-readline requires an argument so just let +# configure find it automatically +ifeq ($(BR2_PACKAGE_READLINE),y) +GAWK_DEPENDENCIES += readline +else +GAWK_CONF_OPTS += --without-readline +endif + +# We don't have a host-busybox, and we don't want to use readline or mpfr +HOST_GAWK_DEPENDENCIES = + +HOST_GAWK_CONF_OPTS = --without-readline --without-mpfr + +define GAWK_CREATE_SYMLINK + ln -sf /usr/bin/gawk $(TARGET_DIR)/usr/bin/awk +endef + +GAWK_POST_INSTALL_TARGET_HOOKS += GAWK_CREATE_SYMLINK + +# Assume we support shared libs +# The check isn't cross-compile friendly and it's mandatory anyway +define GAWK_DISABLE_SHARED_CHECK + $(SED) 's/ check-for-shared-lib-support//' $(@D)/extension/Makefile.in +endef + +GAWK_POST_PATCH_HOOKS += GAWK_DISABLE_SHARED_CHECK + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gcc/4.7.4/100-uclibc-conf.patch b/package/gcc/4.7.4/100-uclibc-conf.patch new file mode 100644 index 0000000000..6bad179e62 --- /dev/null +++ b/package/gcc/4.7.4/100-uclibc-conf.patch @@ -0,0 +1,13 @@ +--- gcc/gcc/config/--- gcc/contrib/regression/objs-gcc.sh ++++ gcc/contrib/regression/objs-gcc.sh +@@ -105,6 +105,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/package/gcc/4.7.4/1000-powerpc-link-with-math-lib.patch.conditional b/package/gcc/4.7.4/1000-powerpc-link-with-math-lib.patch.conditional new file mode 100644 index 0000000000..2554263a00 --- /dev/null +++ b/package/gcc/4.7.4/1000-powerpc-link-with-math-lib.patch.conditional @@ -0,0 +1,127 @@ +http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html + +On glibc the libc.so carries a copy of the math function copysignl() but +on uClibc math functions like copysignl() live in libm. Since libgcc_s +contains unresolved symbols, any attempt to link against libgcc_s +without explicitely specifying -lm fails, resulting in a broken +bootstrap of the compiler. + +Forward ported to gcc 4.7.3 + +Signed-off-by: Gustavo Zacarias + +diff -Nura gcc-4.7.3.orig/libgcc/config/t-slibgcc gcc-4.7.3/libgcc/config/t-slibgcc +--- gcc-4.7.3.orig/libgcc/config/t-slibgcc 2013-04-11 15:23:46.491571116 -0300 ++++ gcc-4.7.3/libgcc/config/t-slibgcc 2013-04-11 15:25:06.241141824 -0300 +@@ -27,7 +27,7 @@ + SHLIB_OBJS = @shlib_objs@ + SHLIB_DIR = @multilib_dir@ + SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ +-SHLIB_LC = -lc ++SHLIB_LC = @libgcc_libm@ -lc + SHLIB_MAKE_SOLINK = $(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK) + SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ + $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) +diff -Nura gcc-4.7.3.orig/libgcc/configure gcc-4.7.3/libgcc/configure +--- gcc-4.7.3.orig/libgcc/configure 2013-04-11 15:23:46.551573051 -0300 ++++ gcc-4.7.3/libgcc/configure 2013-04-11 15:25:06.243141875 -0300 +@@ -563,6 +563,7 @@ + tmake_file + sfp_machine_header + set_use_emutls ++LIBGCC_LIBM + set_have_cc_tls + vis_hide + fixed_point +@@ -4445,6 +4446,37 @@ + fi + fi + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++echo "$as_me:$LINENO: checking for library containing copysignl" >&5 ++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6 ++if test "${libgcc_cv_copysignl_lib+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ++fi ++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5 ++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6 ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac + + # Conditionalize the makefile for this target machine. + tmake_file_= +diff -Nura gcc-4.7.3.orig/libgcc/configure.ac gcc-4.7.3/libgcc/configure.ac +--- gcc-4.7.3.orig/libgcc/configure.ac 2013-04-11 15:23:46.551573051 -0300 ++++ gcc-4.7.3/libgcc/configure.ac 2013-04-11 15:25:06.244141901 -0300 +@@ -324,6 +324,27 @@ + fi + AC_SUBST(set_have_cc_tls) + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++AC_CACHE_CHECK ++ libgcc_cv_copysignl_lib, ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ]) ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac ++AC_SUBST(LIBGCC_LIBM) ++ + # See if we have emulated thread-local storage. + GCC_CHECK_EMUTLS + set_use_emutls= +diff -Nura gcc-4.7.3.orig/libgcc/Makefile.in gcc-4.7.3/libgcc/Makefile.in +--- gcc-4.7.3.orig/libgcc/Makefile.in 2013-04-11 15:23:46.537572599 -0300 ++++ gcc-4.7.3/libgcc/Makefile.in 2013-04-11 15:25:06.241141824 -0300 +@@ -41,6 +41,7 @@ + decimal_float = @decimal_float@ + enable_decimal_float = @enable_decimal_float@ + fixed_point = @fixed_point@ ++LIBGCC_LIBM = @LIBGCC_LIBM@ + + host_noncanonical = @host_noncanonical@ + target_noncanonical = @target_noncanonical@ +@@ -928,9 +929,10 @@ + @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_objs@,$(objects) libgcc.a,$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ ++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \ + @shlib_map_file@,$(mapfile),$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \ +- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))) ++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))) + + libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts) + # @multilib_flags@ is still needed because this may use diff --git a/package/gcc/4.7.4/111-pr65730.patch b/package/gcc/4.7.4/111-pr65730.patch new file mode 100644 index 0000000000..f195e308da --- /dev/null +++ b/package/gcc/4.7.4/111-pr65730.patch @@ -0,0 +1,37 @@ +From b9a7775674d91c7af8043a83211ffeaa576327d7 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 10 Apr 2015 17:46:30 +0300 +Subject: [PATCH] Fix PR target/65730 + +2015-05-20 Max Filippov +gcc/ + * config/xtensa/xtensa.c (init_alignment_context): Replace MULT + by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT). + +Signed-off-by: Max Filippov +--- +Backported from: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223452 +Changes to ChangeLog are dropped. + + gcc/config/xtensa/xtensa.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index eb039ba..7296e36 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -1461,8 +1461,9 @@ init_alignment_context (struct alignment_context *ac, rtx mem) + if (ac->shift != NULL_RTX) + { + /* Shift is the byte count, but we need the bitcount. */ +- ac->shift = expand_simple_binop (SImode, MULT, ac->shift, +- GEN_INT (BITS_PER_UNIT), ++ gcc_assert (exact_log2 (BITS_PER_UNIT) >= 0); ++ ac->shift = expand_simple_binop (SImode, ASHIFT, ac->shift, ++ GEN_INT (exact_log2 (BITS_PER_UNIT)), + NULL_RTX, 1, OPTAB_DIRECT); + ac->modemask = expand_simple_binop (SImode, ASHIFT, + GEN_INT (GET_MODE_MASK (mode)), +-- +1.8.1.4 + diff --git a/package/gcc/4.7.4/130-pr43538.patch b/package/gcc/4.7.4/130-pr43538.patch new file mode 100644 index 0000000000..19e57bb059 --- /dev/null +++ b/package/gcc/4.7.4/130-pr43538.patch @@ -0,0 +1,25 @@ +From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001 +From: glisse +Date: Fri, 25 Apr 2014 08:03:08 +0000 +Subject: [PATCH] 2014-04-25 Marc Glisse + + PR target/43538 + * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + config/mt-gnu | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/mt-gnu b/config/mt-gnu +index 15bf417..5c696f5 100644 +--- a/config/mt-gnu ++++ b/config/mt-gnu +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE +-- +2.1.4 + diff --git a/package/gcc/4.7.4/301-missing-execinfo_h.patch b/package/gcc/4.7.4/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..0e2092f3fb --- /dev/null +++ b/package/gcc/4.7.4/301-missing-execinfo_h.patch @@ -0,0 +1,11 @@ +--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500 ++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500 +@@ -500,7 +500,7 @@ + #ifdef __linux__ + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/package/gcc/4.7.4/305-libmudflap-susv3-legacy.patch b/package/gcc/4.7.4/305-libmudflap-susv3-legacy.patch new file mode 100644 index 0000000000..374b1f8659 --- /dev/null +++ b/package/gcc/4.7.4/305-libmudflap-susv3-legacy.patch @@ -0,0 +1,49 @@ +Index: gcc-4.2/libmudflap/mf-hooks2.c +=================================================================== +--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834) ++++ gcc-4.2/libmudflap/mf-hooks2.c (working copy) +@@ -427,7 +427,7 @@ + { + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); +- bzero (s, n); ++ memset (s, 0, n); + } + + +@@ -437,7 +437,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); +- bcopy (src, dest, n); ++ memmove (dest, src, n); + } + + +@@ -447,7 +447,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); +- return bcmp (s1, s2, n); ++ return n == 0 ? 0 : memcmp (s1, s2, n); + } + + +@@ -456,7 +456,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); +- return index (s, c); ++ return strchr (s, c); + } + + +@@ -465,7 +465,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); +- return rindex (s, c); ++ return strrchr (s, c); + } + + /* XXX: stpcpy, memccpy */ diff --git a/package/gcc/4.7.4/810-arm-softfloat-libgcc.patch b/package/gcc/4.7.4/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000000..a3d7db014d --- /dev/null +++ b/package/gcc/4.7.4/810-arm-softfloat-libgcc.patch @@ -0,0 +1,25 @@ +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -57,7 +57,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + +--- a/libgcc/config/arm/t-linux ++++ b/libgcc/config/arm/t-linux +@@ -1,6 +1,10 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _arm_addsubdf3 _arm_addsubsf3 ++ _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # Just for these, we omit the frame pointer since it makes such a big + # difference. diff --git a/package/gcc/4.7.4/830-arm_unbreak_armv4t.patch b/package/gcc/4.7.4/830-arm_unbreak_armv4t.patch new file mode 100644 index 0000000000..37f8f2a54d --- /dev/null +++ b/package/gcc/4.7.4/830-arm_unbreak_armv4t.patch @@ -0,0 +1,13 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/package/gcc/4.7.4/843-gcc-4.7.3-Fix-PR-target-58595.patch b/package/gcc/4.7.4/843-gcc-4.7.3-Fix-PR-target-58595.patch new file mode 100644 index 0000000000..656952cded --- /dev/null +++ b/package/gcc/4.7.4/843-gcc-4.7.3-Fix-PR-target-58595.patch @@ -0,0 +1,102 @@ +commit 4fa1f8926227d4e79975b674dc4292b9bec4b137 +Author: jakub +Date: Thu Mar 6 12:07:07 2014 +0000 + + PR target/58595 + * config/arm/arm.c (arm_tls_symbol_p): Remove. + (arm_legitimize_address): Call legitimize_tls_address for any + arm_tls_referenced_p expression, handle constant addend. Call it + before testing for !TARGET_ARM. + (thumb_legitimize_address): Don't handle arm_tls_symbol_p here. + + * gcc.dg/tls/pr58595.c: New test. + + + git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208380 138bc75d-0d04-0410-961f-82ee72b054a4 + +diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c +index ce24bfe..af5666b 100644 +--- a/gcc/config/arm/arm.c ++++ b/gcc/config/arm/arm.c +@@ -235,7 +235,6 @@ static tree arm_gimplify_va_arg_expr (tree, tree, gimple_seq *, gimple_seq *); + static void arm_option_override (void); + static unsigned HOST_WIDE_INT arm_shift_truncation_mask (enum machine_mode); + static bool arm_cannot_copy_insn_p (rtx); +-static bool arm_tls_symbol_p (rtx x); + static int arm_issue_rate (void); + static void arm_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; + static bool arm_output_addr_const_extra (FILE *, rtx); +@@ -7336,6 +7335,32 @@ legitimize_tls_address (rtx x, rtx reg) + rtx + arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode) + { ++ if (arm_tls_referenced_p (x)) ++ { ++ rtx addend = NULL; ++ ++ if (GET_CODE (x) == CONST && GET_CODE (XEXP (x, 0)) == PLUS) ++ { ++ addend = XEXP (XEXP (x, 0), 1); ++ x = XEXP (XEXP (x, 0), 0); ++ } ++ ++ if (GET_CODE (x) != SYMBOL_REF) ++ return x; ++ ++ gcc_assert (SYMBOL_REF_TLS_MODEL (x) != 0); ++ ++ x = legitimize_tls_address (x, NULL_RTX); ++ ++ if (addend) ++ { ++ x = gen_rtx_PLUS (SImode, x, addend); ++ orig_x = x; ++ } ++ else ++ return x; ++ } ++ + if (!TARGET_ARM) + { + /* TODO: legitimize_address for Thumb2. */ +@@ -7344,9 +7369,6 @@ arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode) + return thumb_legitimize_address (x, orig_x, mode); + } + +- if (arm_tls_symbol_p (x)) +- return legitimize_tls_address (x, NULL_RTX); +- + if (GET_CODE (x) == PLUS) + { + rtx xop0 = XEXP (x, 0); +@@ -7459,9 +7481,6 @@ arm_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode) + rtx + thumb_legitimize_address (rtx x, rtx orig_x, enum machine_mode mode) + { +- if (arm_tls_symbol_p (x)) +- return legitimize_tls_address (x, NULL_RTX); +- + if (GET_CODE (x) == PLUS + && CONST_INT_P (XEXP (x, 1)) + && (INTVAL (XEXP (x, 1)) >= 32 * GET_MODE_SIZE (mode) +@@ -7756,20 +7775,6 @@ thumb_legitimize_reload_address (rtx *x_p, + + /* Test for various thread-local symbols. */ + +-/* Return TRUE if X is a thread-local symbol. */ +- +-static bool +-arm_tls_symbol_p (rtx x) +-{ +- if (! TARGET_HAVE_TLS) +- return false; +- +- if (GET_CODE (x) != SYMBOL_REF) +- return false; +- +- return SYMBOL_REF_TLS_MODEL (x) != 0; +-} +- + /* Helper for arm_tls_referenced_p. */ + + static int diff --git a/package/gcc/4.7.4/844-gcc-fix-build-with-gcc5.patch b/package/gcc/4.7.4/844-gcc-fix-build-with-gcc5.patch new file mode 100644 index 0000000000..b076e5438e --- /dev/null +++ b/package/gcc/4.7.4/844-gcc-fix-build-with-gcc5.patch @@ -0,0 +1,42 @@ +From 4fb4acf88912dd978bb63ecab79641a5795ce84f Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Mon, 27 Jul 2015 15:05:14 +0200 +Subject: [PATCH] gcc: fix build with gcc5 + +gcc < 4.8 doesn't build with gcc5. + +Patch is from DragonFlyBSD github [1] + +[1] https://github.com/DragonFlyBSD/DPorts/issues/136 + +Signed-off-by: Romain Naour +--- + gcc/cp/cfns.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h +index 62cdfab..4f63cc4 100644 +--- a/gcc/cp/cfns.h ++++ b/gcc/cp/cfns.h +@@ -53,6 +53,9 @@ __inline + static unsigned int hash (const char *, unsigned int); + #ifdef __GNUC__ + __inline ++#ifdef __GNUC_STDC_INLINE__ ++__attribute__ ((__gnu_inline__)) ++#endif + #endif + const char * libc_name_p (const char *, unsigned int); + /* maximum key range = 391, duplicates = 0 */ +@@ -96,7 +99,7 @@ hash (register const char *str, register unsigned int len) + 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, + 400, 400, 400, 400, 400, 400, 400 + }; +- register int hval = len; ++ register int hval = (int)len; + + switch (hval) + { +-- +2.4.3 + diff --git a/package/gcc/4.7.4/850-libstdcxx-uclibc-c99.patch b/package/gcc/4.7.4/850-libstdcxx-uclibc-c99.patch new file mode 100644 index 0000000000..79cd7a932a --- /dev/null +++ b/package/gcc/4.7.4/850-libstdcxx-uclibc-c99.patch @@ -0,0 +1,273 @@ +Allow C99-depending features of libstdc++ with uClibc + +The libstdc++ code is fairly restrictive on how it checks for C99 +compatibility: it requires *complete* C99 support to enable certain +features. For example, uClibc provides a good number of C99 features, +but not C99 complex number support. For this reason, libstdc++ +completely disables many the standard C++ methods that can in fact +work because uClibc provides the necessary functions. + +This patch is similar and highly inspired from +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in +a way that doesn't involve changing the configure.ac script, as +autoreconfiguring gcc is complicated. It simply relies on the fact +that uClibc defines the __UCLIBC__ definition. + +Signed-off-by: Thomas Petazzoni + +Index: b/libstdc++-v3/config/locale/generic/c_locale.h +=================================================================== +--- a/libstdc++-v3/config/locale/generic/c_locale.h ++++ b/libstdc++-v3/config/locale/generic/c_locale.h +@@ -71,7 +71,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +Index: b/libstdc++-v3/config/locale/gnu/c_locale.h +=================================================================== +--- a/libstdc++-v3/config/locale/gnu/c_locale.h ++++ b/libstdc++-v3/config/locale/gnu/c_locale.h +@@ -89,7 +89,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +Index: b/libstdc++-v3/include/bits/basic_string.h +=================================================================== +--- a/libstdc++-v3/include/bits/basic_string.h ++++ b/libstdc++-v3/include/bits/basic_string.h +@@ -2806,7 +2806,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99) \ ++#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) \ + && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) + + #include +Index: b/libstdc++-v3/include/bits/locale_facets.tcc +=================================================================== +--- a/libstdc++-v3/include/bits/locale_facets.tcc ++++ b/libstdc++-v3/include/bits/locale_facets.tcc +@@ -989,7 +989,7 @@ + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough (most probably sufficient + // for non-ios_base::fixed outputs) + int __cs_size = __max_digits * 3; +Index: b/libstdc++-v3/include/bits/locale_facets_nonio.tcc +=================================================================== +--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc ++++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc +@@ -572,7 +572,7 @@ + { + const locale __loc = __io.getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough. + int __cs_size = 64; + char* __cs = static_cast(__builtin_alloca(__cs_size)); +Index: b/libstdc++-v3/include/c_compatibility/math.h +=================================================================== +--- a/libstdc++-v3/include/c_compatibility/math.h ++++ b/libstdc++-v3/include/c_compatibility/math.h +@@ -57,7 +57,7 @@ + using std::floor; + using std::fmod; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::fpclassify; + using std::isfinite; + using std::isinf; +Index: b/libstdc++-v3/include/c_compatibility/wchar.h +=================================================================== +--- a/libstdc++-v3/include/c_compatibility/wchar.h ++++ b/libstdc++-v3/include/c_compatibility/wchar.h +@@ -103,7 +103,7 @@ + using std::wmemset; + using std::wcsftime; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/c_global/cstdlib +=================================================================== +--- a/libstdc++-v3/include/c_global/cstdlib ++++ b/libstdc++-v3/include/c_global/cstdlib +@@ -146,7 +146,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +Index: b/libstdc++-v3/include/c_global/cwchar +=================================================================== +--- a/libstdc++-v3/include/c_global/cwchar ++++ b/libstdc++-v3/include/c_global/cwchar +@@ -234,7 +234,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +@@ -291,7 +291,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/c_std/cstdio +=================================================================== +--- a/libstdc++-v3/include/c_std/cstdio ++++ b/libstdc++-v3/include/c_std/cstdio +@@ -140,7 +140,7 @@ + using ::vsprintf; + } // namespace std + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf +Index: b/libstdc++-v3/include/c_std/cstdlib +=================================================================== +--- a/libstdc++-v3/include/c_std/cstdlib ++++ b/libstdc++-v3/include/c_std/cstdlib +@@ -143,7 +143,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +Index: b/libstdc++-v3/include/c_std/cwchar +=================================================================== +--- a/libstdc++-v3/include/c_std/cwchar ++++ b/libstdc++-v3/include/c_std/cwchar +@@ -230,7 +230,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +Index: b/libstdc++-v3/include/ext/vstring.h +=================================================================== +--- a/libstdc++-v3/include/ext/vstring.h ++++ b/libstdc++-v3/include/ext/vstring.h +@@ -2537,7 +2537,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && defined(_GLIBCXX_USE_C99)) ++#if (defined(__GXX_EXPERIMENTAL_CXX0X__) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))) + + #include + +Index: b/libstdc++-v3/include/tr1/cstdio +=================================================================== +--- a/libstdc++-v3/include/tr1/cstdio ++++ b/libstdc++-v3/include/tr1/cstdio +@@ -33,7 +33,7 @@ + + #include + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +Index: b/libstdc++-v3/include/tr1/cstdlib +=================================================================== +--- a/libstdc++-v3/include/tr1/cstdlib ++++ b/libstdc++-v3/include/tr1/cstdlib +@@ -35,7 +35,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +Index: b/libstdc++-v3/include/tr1/cwchar +=================================================================== +--- a/libstdc++-v3/include/tr1/cwchar ++++ b/libstdc++-v3/include/tr1/cwchar +@@ -52,7 +52,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/tr1/stdlib.h +=================================================================== +--- a/libstdc++-v3/include/tr1/stdlib.h ++++ b/libstdc++-v3/include/tr1/stdlib.h +@@ -33,7 +33,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + using std::tr1::atoll; + using std::tr1::strtoll; +Index: b/libstdc++-v3/src/c++11/debug.cc +=================================================================== +--- a/libstdc++-v3/src/c++11/debug.cc ++++ b/libstdc++-v3/src/c++11/debug.cc +@@ -783,7 +783,7 @@ + int __n __attribute__ ((__unused__)), + const char* __fmt, _Tp __s) const throw () + { +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + std::snprintf(__buf, __n, __fmt, __s); + #else + std::sprintf(__buf, __fmt, __s); +Index: b/libstdc++-v3/include/c_global/cstdio +=================================================================== +--- a/libstdc++-v3/include/c_global/cstdio ++++ b/libstdc++-v3/include/c_global/cstdio +@@ -140,7 +140,7 @@ + using ::vsprintf; + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf diff --git a/package/gcc/4.7.4/851-PR-other-56780.patch b/package/gcc/4.7.4/851-PR-other-56780.patch new file mode 100644 index 0000000000..a4ae830975 --- /dev/null +++ b/package/gcc/4.7.4/851-PR-other-56780.patch @@ -0,0 +1,244 @@ +From 4e318d50b876def5f97e2031926354055e442ca3 Mon Sep 17 00:00:00 2001 +From: ian +Date: Sat, 1 Jun 2013 00:20:49 +0000 +Subject: [PATCH] PR other/56780 + +* libiberty/configure.ac: Move test for --enable-install-libiberty +outside of the 'with_target_subdir' test so that it actually gets +run. Add output messages to show the test result. +* libiberty/configure: Regenerate. +* libiberty/Makefile.in (install_to_libdir): Place the +installation of the libiberty library in the same guard as that +used for the headers to prevent it being installed unless +requested via --enable-install-libiberty. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199570 138bc75d-0d04-0410-961f-82ee72b054a4 + +libiberty: fix --enable-install-libiberty flag [PR 56780] + +Commit 199570 fixed the --disable-install-libiberty behavior, but it also +added a bug where the enable path never works because the initial clear +of target_header_dir wasn't deleted. So we end up initializing properly +at the top only to reset it at the end all the time. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-82ee72b054a4 + +[Romain + squash the two upstream commits + Remove the ChangeLog] +Signed-off-by: Romain Naour +--- + libiberty/Makefile.in | 24 ++++++++++----------- + libiberty/configure | 57 +++++++++++++++++++++++++++----------------------- + libiberty/configure.ac | 47 ++++++++++++++++++++++------------------- + 3 files changed, 68 insertions(+), 60 deletions(-) + +diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in +index 5280bc1..a69c6b6 100644 +--- a/libiberty/Makefile.in ++++ b/libiberty/Makefile.in +@@ -353,19 +353,19 @@ install-strip: install + # since it will be passed the multilib flags. + MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` + install_to_libdir: all +- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR) +- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n +- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ) +- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB) + if test -n "${target_header_dir}"; then \ +- case "${target_header_dir}" in \ +- /*) thd=${target_header_dir};; \ +- *) thd=${includedir}/${target_header_dir};; \ +- esac; \ +- ${mkinstalldirs} $(DESTDIR)$${thd}; \ +- for h in ${INSTALLED_HEADERS}; do \ +- ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ +- done; \ ++ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ ++ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \ ++ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \ ++ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \ ++ case "${target_header_dir}" in \ ++ /*) thd=${target_header_dir};; \ ++ *) thd=${includedir}/${target_header_dir};; \ ++ esac; \ ++ ${mkinstalldirs} $(DESTDIR)$${thd}; \ ++ for h in ${INSTALLED_HEADERS}; do \ ++ ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ ++ done; \ + fi + @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install + +diff --git a/libiberty/configure b/libiberty/configure +index 6e98352..44d1f78 100755 +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -675,8 +675,8 @@ with_cross_host + with_newlib + enable_maintainer_mode + enable_multilib +-enable_largefile + enable_install_libiberty ++enable_largefile + ' + ac_precious_vars='build_alias + host_alias +@@ -1303,8 +1303,8 @@ Optional Features: + enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-multilib build many library versions (default) ++ --enable-install-libiberty Install headers and library for end users + --disable-largefile omit support for large files +- --enable-install-libiberty Install headers for end users + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -2784,6 +2784,35 @@ if test $cross_compiling = no && test $multilib = yes \ + cross_compiling=maybe + fi + ++# We may wish to install the target headers somewhere. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libiberty headers and static library" >&5 ++$as_echo_n "checking whether to install libiberty headers and static library... " >&6; } ++ ++# Check whether --enable-install-libiberty was given. ++if test "${enable_install_libiberty+set}" = set; then : ++ enableval=$enable_install_libiberty; enable_install_libiberty=$enableval ++else ++ enable_install_libiberty=no ++fi ++ ++# Option parsed, now set things appropriately. ++case x"$enable_install_libiberty" in ++ xyes|x) ++ target_header_dir=libiberty ++ ;; ++ xno) ++ target_header_dir= ++ ;; ++ *) ++ # This could be sanity-checked in various ways... ++ target_header_dir="${enable_install_libiberty}" ++ ;; ++esac ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_install_libiberty" >&5 ++$as_echo "$enable_install_libiberty" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: target_header_dir = $target_header_dir" >&5 ++$as_echo "$as_me: target_header_dir = $target_header_dir" >&6;} ++ + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -5475,7 +5504,6 @@ fi + + setobjs= + CHECK= +-target_header_dir= + if test -n "${with_target_subdir}"; then + + # We are being configured as a target library. AC_REPLACE_FUNCS +@@ -5752,29 +5780,6 @@ _ACEOF + + esac + +- # We may wish to install the target headers somewhere. +- # Check whether --enable-install-libiberty was given. +-if test "${enable_install_libiberty+set}" = set; then : +- enableval=$enable_install_libiberty; enable_install_libiberty=$enableval +-else +- enable_install_libiberty=no +-fi +- +- # Option parsed, now set things appropriately. +- case x"$enable_install_libiberty" in +- xyes|x) +- target_header_dir=libiberty +- ;; +- xno) +- target_header_dir= +- ;; +- *) +- # This could be sanity-checked in various ways... +- target_header_dir="${enable_install_libiberty}" +- ;; +- esac +- +- + else + + # Not a target library, so we set things up to run the test suite. +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index 754b66a..04260ec 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -128,6 +128,31 @@ if test $cross_compiling = no && test $multilib = yes \ + cross_compiling=maybe + fi + ++# We may wish to install the target headers somewhere. ++AC_MSG_CHECKING([whether to install libiberty headers and static library]) ++dnl install-libiberty is disabled by default ++ ++AC_ARG_ENABLE(install-libiberty, ++[ --enable-install-libiberty Install headers and library for end users], ++enable_install_libiberty=$enableval, ++enable_install_libiberty=no)dnl ++ ++# Option parsed, now set things appropriately. ++case x"$enable_install_libiberty" in ++ xyes|x) ++ target_header_dir=libiberty ++ ;; ++ xno) ++ target_header_dir= ++ ;; ++ *) ++ # This could be sanity-checked in various ways... ++ target_header_dir="${enable_install_libiberty}" ++ ;; ++esac ++AC_MSG_RESULT($enable_install_libiberty) ++AC_MSG_NOTICE([target_header_dir = $target_header_dir]) ++ + GCC_NO_EXECUTABLES + AC_PROG_CC + AC_SYS_LARGEFILE +@@ -379,7 +404,6 @@ fi + + setobjs= + CHECK= +-target_header_dir= + if test -n "${with_target_subdir}"; then + + # We are being configured as a target library. AC_REPLACE_FUNCS +@@ -490,27 +514,6 @@ if test -n "${with_target_subdir}"; then + + esac + +- # We may wish to install the target headers somewhere. +- AC_ARG_ENABLE(install-libiberty, +- [ --enable-install-libiberty Install headers for end users], +- enable_install_libiberty=$enableval, +- enable_install_libiberty=no)dnl +- +- # Option parsed, now set things appropriately. +- case x"$enable_install_libiberty" in +- xyes|x) +- target_header_dir=libiberty +- ;; +- xno) +- target_header_dir= +- ;; +- *) +- # This could be sanity-checked in various ways... +- target_header_dir="${enable_install_libiberty}" +- ;; +- esac +- +- + else + + # Not a target library, so we set things up to run the test suite. +-- +2.4.3 + diff --git a/package/gcc/4.7.4/900-musl-support.patch b/package/gcc/4.7.4/900-musl-support.patch new file mode 100644 index 0000000000..bf8fbc079a --- /dev/null +++ b/package/gcc/4.7.4/900-musl-support.patch @@ -0,0 +1,587 @@ +Add musl support to gcc + +This patch comes from the musl-cross project at +https://bitbucket.org/GregorR/musl-cross/src. Compared to the upstream version: + + * the config.sub modifications have been removed, because Buildroot + already overwrites all config.sub with a more recent config.sub + that has musl support. + + * change to ensure that a dummy dynamic linker path + MUSL_DYNAMIC_LINKER is defined for all architectures, + otherwise building gcc for architectures not supported by musl was + causing build failure. Bug reported upstream at + https://bitbucket.org/GregorR/musl-gcc-patches/issue/4/musl-gcc-patches-break-the-build-on. + + * change the USE_PT_GNU_EH_FRAME logic to keep the existing gcc logic + and only add the musl one as an addition, not as a replacement. Not + doing this breaks C++ exception handling with glibc, because + USE_PT_GNU_EH_FRAME doesn't get defined due to the configure script + not testing dl_iterate_phdr() on any system except Solaris. + +Signed-off-by: Thomas Petazzoni +--- + +# HG changeset patch +# Parent f50bb54f331f73405131a30b4f353cfda1c70304 +Use the generic implementation of libstdc++ primitives when we're on musl, not the glibc one. + +Index: b/libstdc++-v3/configure.host +=================================================================== +--- a/libstdc++-v3/configure.host ++++ b/libstdc++-v3/configure.host +@@ -243,6 +243,13 @@ + os_include_dir="os/bsd/freebsd" + ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) ++ # check for musl by target ++ case "${host_os}" in ++ *-musl*) ++ os_include_dir="os/generic" ++ ;; ++ *) ++ + if [ "$uclibc" = "yes" ]; then + os_include_dir="os/uclibc" + elif [ "$bionic" = "yes" ]; then +@@ -251,6 +258,9 @@ + os_include_dir="os/gnu-linux" + fi + ;; ++ ++ esac ++ ;; + hpux*) + os_include_dir="os/hpux" + ;; +Index: b/gcc/config.gcc +=================================================================== +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -522,7 +522,7 @@ + esac + + # Common C libraries. +-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" ++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" + + # Common parts for widely ported systems. + case ${target} in +@@ -625,6 +625,9 @@ + *-*-*uclibc*) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" + ;; ++ *-*-*musl*) ++ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" ++ ;; + *) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" + ;; +@@ -2091,6 +2094,10 @@ + powerpc*-*-linux*paired*) + tm_file="${tm_file} rs6000/750cl.h" ;; + esac ++ case ${target} in ++ *-linux*-musl*) ++ enable_secureplt=yes ;; ++ esac + if test x${enable_secureplt} = xyes; then + tm_file="rs6000/secureplt.h ${tm_file}" + fi +Index: b/gcc/config/linux.h +=================================================================== +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -33,10 +33,12 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ +@@ -54,18 +56,21 @@ + uClibc or Bionic is the default C library and whether + -muclibc or -mglibc or -mbionic has been passed to change the default. */ + +-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ +- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" ++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ ++ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" + + #if DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) + #elif DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) + #elif DEFAULT_LIBC == LIBC_BIONIC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) + #else + #error "Unsupported DEFAULT_LIBC" + #endif /* DEFAULT_LIBC */ +@@ -83,23 +88,32 @@ + #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" + #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" + ++/* Musl dynamic linker paths must be defined on a per-architecture ++ basis, for each architecture supported by Musl. However, in order ++ to let other architectures continue to build with other C ++ libraries, we provide a dummy definition of the following defines. */ ++#define MUSL_DYNAMIC_LINKER "invalid" ++#define MUSL_DYNAMIC_LINKER32 "invalid" ++#define MUSL_DYNAMIC_LINKER64 "invalid" ++#define MUSL_DYNAMIC_LINKERX32 "invalid" ++ + #define GNU_USER_DYNAMIC_LINKER \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ +- BIONIC_DYNAMIC_LINKER) ++ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + #define GNU_USER_DYNAMIC_LINKER32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ +- BIONIC_DYNAMIC_LINKER32) ++ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ +- BIONIC_DYNAMIC_LINKER64) ++ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + #define GNU_USER_DYNAMIC_LINKERX32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ +- BIONIC_DYNAMIC_LINKERX32) ++ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) + + /* Determine whether the entire c99 runtime + is present in the runtime library. */ + #undef TARGET_C99_FUNCTIONS +-#define TARGET_C99_FUNCTIONS (OPTION_GLIBC) ++#define TARGET_C99_FUNCTIONS (OPTION_GLIBC || OPTION_MUSL) + + /* Whether we have sincos that follows the GNU extension. */ + #undef TARGET_HAS_SINCOS +@@ -108,3 +122,74 @@ + /* Whether we have Bionic libc runtime */ + #undef TARGET_HAS_BIONIC + #define TARGET_HAS_BIONIC (OPTION_BIONIC) ++ ++/* musl avoids problematic includes by rearranging the include directories. ++ * Unfortunately, this is mostly duplicated from cppdefault.c */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define INCLUDE_DEFAULTS_MUSL_GPP \ ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, ++ ++#ifdef LOCAL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_LOCAL \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_LOCAL ++#endif ++ ++#ifdef PREFIX_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_PREFIX ++#endif ++ ++#ifdef CROSS_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_CROSS \ ++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#ifdef TOOL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_TOOL \ ++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_TOOL ++#endif ++ ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++#define INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_NATIVE ++#endif ++ ++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) ++# undef INCLUDE_DEFAULTS_MUSL_LOCAL ++# define INCLUDE_DEFAULTS_MUSL_LOCAL ++# undef INCLUDE_DEFAULTS_MUSL_NATIVE ++# define INCLUDE_DEFAULTS_MUSL_NATIVE ++#else ++# undef INCLUDE_DEFAULTS_MUSL_CROSS ++# define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#undef INCLUDE_DEFAULTS ++#define INCLUDE_DEFAULTS \ ++ { \ ++ INCLUDE_DEFAULTS_MUSL_GPP \ ++ INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ INCLUDE_DEFAULTS_MUSL_CROSS \ ++ INCLUDE_DEFAULTS_MUSL_TOOL \ ++ INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ ++ { 0, 0, 0, 0, 0, 0 } \ ++ } ++#endif +Index: b/gcc/config/linux.opt +=================================================================== +--- a/gcc/config/linux.opt ++++ b/gcc/config/linux.opt +@@ -30,3 +30,7 @@ + muclibc + Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) + Use uClibc C library ++ ++mmusl ++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc) ++Use musl C library +Index: b/gcc/ginclude/stddef.h +=================================================================== +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -184,6 +184,7 @@ + #ifndef _GCC_SIZE_T + #ifndef _SIZET_ + #ifndef __size_t ++#ifndef __DEFINED_size_t /* musl */ + #define __size_t__ /* BeOS */ + #define __SIZE_T__ /* Cray Unicos/Mk */ + #define _SIZE_T +@@ -200,6 +201,7 @@ + #define ___int_size_t_h + #define _GCC_SIZE_T + #define _SIZET_ ++#define __DEFINED_size_t /* musl */ + #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || defined(__FreeBSD_kernel__) + /* __size_t is a typedef on FreeBSD 5, must not trash it. */ +@@ -215,6 +217,7 @@ + typedef long ssize_t; + #endif /* __BEOS__ */ + #endif /* !(defined (__GNUG__) && defined (size_t)) */ ++#endif /* __DEFINED_size_t */ + #endif /* __size_t */ + #endif /* _SIZET_ */ + #endif /* _GCC_SIZE_T */ +Index: b/libgomp/config/posix/time.c +=================================================================== +--- a/libgomp/config/posix/time.c ++++ b/libgomp/config/posix/time.c +@@ -28,6 +28,8 @@ + The following implementation uses the most simple POSIX routines. + If present, POSIX 4 clocks should be used instead. */ + ++#define _POSIX_C_SOURCE 199309L /* for clocks */ ++ + #include "libgomp.h" + #include + #if TIME_WITH_SYS_TIME +Index: b/libgcc/unwind-dw2-fde-dip.c +=================================================================== +--- a/libgcc/unwind-dw2-fde-dip.c ++++ b/libgcc/unwind-dw2-fde-dip.c +@@ -71,6 +71,13 @@ + # define USE_PT_GNU_EH_FRAME + #endif + ++/* For musl libc, TARGET_DL_ITERATE_PHDR gets defined by the configure ++ script. */ ++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ ++ && defined(TARGET_DL_ITERATE_PHDR) ++# define USE_PT_GNU_EH_FRAME ++#endif ++ + #if defined(USE_PT_GNU_EH_FRAME) + + #include +Index: b/gcc/configure +=================================================================== +--- a/gcc/configure ++++ b/gcc/configure +@@ -26906,6 +26910,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +Index: b/gcc/configure.ac +=================================================================== +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -4767,6 +4771,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +Index: b/fixincludes/mkfixinc.sh +=================================================================== +--- a/fixincludes/mkfixinc.sh ++++ b/fixincludes/mkfixinc.sh +@@ -20,7 +20,8 @@ + powerpc-*-eabi* | \ + powerpc-*-rtems* | \ + powerpcle-*-eabisim* | \ +- powerpcle-*-eabi* ) ++ powerpcle-*-eabi* | \ ++ *-musl* ) + # IF there is no include fixing, + # THEN create a no-op fixer and exit + (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} +Index: b/gcc/config/i386/linux.h +=================================================================== +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -22,3 +22,5 @@ + + #define GNU_USER_LINK_EMULATION "elf_i386" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" +Index: b/gcc/config/i386/linux64.h +=================================================================== +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -31,3 +31,10 @@ + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" + #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++ ++#undef MUSL_DYNAMIC_LINKER32 ++#undef MUSL_DYNAMIC_LINKER64 ++#undef MUSL_DYNAMIC_LINKERX32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" ++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" +Index: b/libitm/config/linux/x86/tls.h +=================================================================== +--- a/libitm/config/linux/x86/tls.h ++++ b/libitm/config/linux/x86/tls.h +@@ -25,16 +25,19 @@ + #ifndef LIBITM_X86_TLS_H + #define LIBITM_X86_TLS_H 1 + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + /* Use slots in the TCB head rather than __thread lookups. + GLIBC has reserved words 10 through 13 for TM. */ + #define HAVE_ARCH_GTM_THREAD 1 + #define HAVE_ARCH_GTM_THREAD_DISP 1 + #endif ++#endif + + #include "config/generic/tls.h" + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + namespace GTM HIDDEN { + + #ifdef __x86_64__ +@@ -101,5 +104,6 @@ + + } // namespace GTM + #endif /* >= GLIBC 2.10 */ ++#endif + + #endif // LIBITM_X86_TLS_H +Index: b/gcc/config/arm/linux-eabi.h +=================================================================== +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -64,6 +64,23 @@ + #undef GLIBC_DYNAMIC_LINKER + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" + ++/* For ARM musl currently supports four dynamic linkers: ++ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI ++ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI ++ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB ++ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB ++ musl does not support the legacy OABI mode. ++ All the dynamic linkers live in /lib. ++ We default to soft-float, EL. */ ++#undef MUSL_DYNAMIC_LINKER ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" ++#endif ++#define MUSL_DYNAMIC_LINKER \ ++ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +Index: b/libitm/config/arm/hwcap.cc +=================================================================== +--- a/libitm/config/arm/hwcap.cc ++++ b/libitm/config/arm/hwcap.cc +@@ -40,7 +40,11 @@ + + #ifdef __linux__ + #include ++#ifdef __GLIBC__ + #include ++#else ++#include ++#endif + #include + + static void __attribute__((constructor)) +Index: b/gcc/config/mips/linux.h +=================================================================== +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -19,3 +19,11 @@ + . */ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" ++ ++#if TARGET_ENDIAN_DEFAULT == 0 /* LE */ ++#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{EL:el}" ++#endif ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" +Index: b/gcc/config/rs6000/linux64.h +=================================================================== +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -362,17 +362,23 @@ + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld64.so.1" + #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" + #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" ++#undef MUSL_DYNAMIC_LINKER32 ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1" ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #elif DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER32 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + + + #define LINK_OS_LINUX_SPEC32 "-m elf32ppclinux %{!shared: %{!static: \ +Index: b/gcc/config/rs6000/secureplt.h +=================================================================== +--- a/gcc/config/rs6000/secureplt.h ++++ b/gcc/config/rs6000/secureplt.h +@@ -18,3 +18,4 @@ + . */ + + #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" ++#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" +Index: b/gcc/config/rs6000/sysv4.h +=================================================================== +--- a/gcc/config/rs6000/sysv4.h ++++ b/gcc/config/rs6000/sysv4.h +@@ -566,6 +566,9 @@ + #ifndef CC1_SECURE_PLT_DEFAULT_SPEC + #define CC1_SECURE_PLT_DEFAULT_SPEC "" + #endif ++#ifndef LINK_SECURE_PLT_DEFAULT_SPEC ++#define LINK_SECURE_PLT_DEFAULT_SPEC "" ++#endif + + /* Pass -G xxx to the compiler and set correct endian mode. */ + #define CC1_SPEC "%{G*} %(cc1_cpu) \ +@@ -626,7 +629,8 @@ + %{mlittle: --oformat elf32-powerpcle } %{mlittle-endian: --oformat elf32-powerpcle } \ + %{!mlittle: %{!mlittle-endian: %{!mbig: %{!mbig-endian: \ + %{mcall-i960-old: --oformat elf32-powerpcle} \ +- }}}}" ++ }}}} \ ++%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" + + /* Any specific OS flags. */ + #define LINK_OS_SPEC "\ +@@ -804,15 +808,19 @@ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + + #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ +@@ -938,6 +946,7 @@ + { "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \ + { "cc1_endian_default", CC1_ENDIAN_DEFAULT_SPEC }, \ + { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ ++ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ + { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ + { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ + { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ +Index: b/gcc/config/mips/linux64.h +=================================================================== +--- a/gcc/config/mips/linux64.h ++++ b/gcc/config/mips/linux64.h +@@ -30,4 +30,4 @@ + #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" + #define GNU_USER_DYNAMIC_LINKERN32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ +- BIONIC_DYNAMIC_LINKERN32) ++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKER) diff --git a/package/gcc/4.8.5/100-uclibc-conf.patch b/package/gcc/4.8.5/100-uclibc-conf.patch new file mode 100644 index 0000000000..d56bf0a194 --- /dev/null +++ b/package/gcc/4.8.5/100-uclibc-conf.patch @@ -0,0 +1,15 @@ +Index: gcc-4.8.0/contrib/regression/objs-gcc.sh +=================================================================== +--- gcc-4.8.0.orig/contrib/regression/objs-gcc.sh 2009-04-09 17:00:19.000000000 +0200 ++++ gcc-4.8.0/contrib/regression/objs-gcc.sh 2013-03-23 17:39:04.000000000 +0100 +@@ -106,6 +106,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/package/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional b/package/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional new file mode 100644 index 0000000000..b7094fe652 --- /dev/null +++ b/package/gcc/4.8.5/1000-powerpc-link-with-math-lib.patch.conditional @@ -0,0 +1,122 @@ +http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html + +On glibc the libc.so carries a copy of the math function copysignl() but +on uClibc math functions like copysignl() live in libm. Since libgcc_s +contains unresolved symbols, any attempt to link against libgcc_s +without explicitely specifying -lm fails, resulting in a broken +bootstrap of the compiler. + +Forward port to gcc 4.5.1 by Gustavo Zacarias + +--- + libgcc/Makefile.in | 4 +++- + libgcc/configure | 32 ++++++++++++++++++++++++++++++++ + libgcc/configure.ac | 21 +++++++++++++++++++++ + 3 files changed, 56 insertions(+), 1 deletion(-) + +Index: gcc-4.8.0/libgcc/Makefile.in +=================================================================== +--- gcc-4.8.0.orig/libgcc/Makefile.in 2013-02-04 20:06:20.000000000 +0100 ++++ gcc-4.8.0/libgcc/Makefile.in 2013-03-24 09:12:43.000000000 +0100 +@@ -41,6 +41,7 @@ + decimal_float = @decimal_float@ + enable_decimal_float = @enable_decimal_float@ + fixed_point = @fixed_point@ ++LIBGCC_LIBM = @LIBGCC_LIBM@ + + host_noncanonical = @host_noncanonical@ + target_noncanonical = @target_noncanonical@ +@@ -927,9 +928,10 @@ + @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_objs@,$(objects) libgcc.a,$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ ++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \ + @shlib_map_file@,$(mapfile),$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \ +- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))) ++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))) + + libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts) + # @multilib_flags@ is still needed because this may use +Index: gcc-4.8.0/libgcc/configure +=================================================================== +--- gcc-4.8.0.orig/libgcc/configure 2012-11-05 00:08:42.000000000 +0100 ++++ gcc-4.8.0/libgcc/configure 2013-03-24 09:12:43.000000000 +0100 +@@ -564,6 +564,7 @@ + tmake_file + sfp_machine_header + set_use_emutls ++LIBGCC_LIBM + set_have_cc_tls + vis_hide + fixed_point +@@ -4481,6 +4482,37 @@ + fi + fi + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++echo "$as_me:$LINENO: checking for library containing copysignl" >&5 ++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6 ++if test "${libgcc_cv_copysignl_lib+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ++fi ++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5 ++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6 ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac + + # Conditionalize the makefile for this target machine. + tmake_file_= +Index: gcc-4.8.0/libgcc/configure.ac +=================================================================== +--- gcc-4.8.0.orig/libgcc/configure.ac 2012-10-15 15:10:30.000000000 +0200 ++++ gcc-4.8.0/libgcc/configure.ac 2013-03-24 09:12:43.000000000 +0100 +@@ -326,6 +326,27 @@ + fi + AC_SUBST(set_have_cc_tls) + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++AC_CACHE_CHECK ++ libgcc_cv_copysignl_lib, ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ]) ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac ++AC_SUBST(LIBGCC_LIBM) ++ + # See if we have emulated thread-local storage. + GCC_CHECK_EMUTLS + set_use_emutls= diff --git a/package/gcc/4.8.5/111-pr65730.patch b/package/gcc/4.8.5/111-pr65730.patch new file mode 100644 index 0000000000..f195e308da --- /dev/null +++ b/package/gcc/4.8.5/111-pr65730.patch @@ -0,0 +1,37 @@ +From b9a7775674d91c7af8043a83211ffeaa576327d7 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 10 Apr 2015 17:46:30 +0300 +Subject: [PATCH] Fix PR target/65730 + +2015-05-20 Max Filippov +gcc/ + * config/xtensa/xtensa.c (init_alignment_context): Replace MULT + by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT). + +Signed-off-by: Max Filippov +--- +Backported from: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223452 +Changes to ChangeLog are dropped. + + gcc/config/xtensa/xtensa.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index eb039ba..7296e36 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -1461,8 +1461,9 @@ init_alignment_context (struct alignment_context *ac, rtx mem) + if (ac->shift != NULL_RTX) + { + /* Shift is the byte count, but we need the bitcount. */ +- ac->shift = expand_simple_binop (SImode, MULT, ac->shift, +- GEN_INT (BITS_PER_UNIT), ++ gcc_assert (exact_log2 (BITS_PER_UNIT) >= 0); ++ ac->shift = expand_simple_binop (SImode, ASHIFT, ac->shift, ++ GEN_INT (exact_log2 (BITS_PER_UNIT)), + NULL_RTX, 1, OPTAB_DIRECT); + ac->modemask = expand_simple_binop (SImode, ASHIFT, + GEN_INT (GET_MODE_MASK (mode)), +-- +1.8.1.4 + diff --git a/package/gcc/4.8.5/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch b/package/gcc/4.8.5/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch new file mode 100644 index 0000000000..c11ad35aac --- /dev/null +++ b/package/gcc/4.8.5/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch @@ -0,0 +1,29 @@ +From 9bf6066d588632dab9f78932df15b5b4140f31f3 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Fri, 6 Nov 2015 14:27:23 +0100 +Subject: [PATCH] gcc/config.gcc: fix typo for powerpc e6500 cpu_is_64bit + +Otherwise it is not recognized as a 64-bit powerpc and gcc will not generate +64-bit binaries by default. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gcc/config.gcc | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 4a7cbd2..9cc765e 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -439,7 +439,7 @@ powerpc*-*-*) + cpu_type=rs6000 + extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h" + case x$with_cpu in +- xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500) ++ xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500) + cpu_is_64bit=yes + ;; + esac +-- +2.6.2 + diff --git a/package/gcc/4.8.5/130-pr43538.patch b/package/gcc/4.8.5/130-pr43538.patch new file mode 100644 index 0000000000..19e57bb059 --- /dev/null +++ b/package/gcc/4.8.5/130-pr43538.patch @@ -0,0 +1,25 @@ +From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001 +From: glisse +Date: Fri, 25 Apr 2014 08:03:08 +0000 +Subject: [PATCH] 2014-04-25 Marc Glisse + + PR target/43538 + * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + config/mt-gnu | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/mt-gnu b/config/mt-gnu +index 15bf417..5c696f5 100644 +--- a/config/mt-gnu ++++ b/config/mt-gnu +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE +-- +2.1.4 + diff --git a/package/gcc/4.8.5/301-missing-execinfo_h.patch b/package/gcc/4.8.5/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..00efda24aa --- /dev/null +++ b/package/gcc/4.8.5/301-missing-execinfo_h.patch @@ -0,0 +1,13 @@ +Index: gcc-4.8.0/boehm-gc/include/gc.h +=================================================================== +--- gcc-4.8.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200 ++++ gcc-4.8.0/boehm-gc/include/gc.h 2013-03-23 17:39:20.000000000 +0100 +@@ -503,7 +503,7 @@ + #if defined(__linux__) || defined(__GLIBC__) + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/package/gcc/4.8.5/305-libmudflap-susv3-legacy.patch b/package/gcc/4.8.5/305-libmudflap-susv3-legacy.patch new file mode 100644 index 0000000000..35d5f50207 --- /dev/null +++ b/package/gcc/4.8.5/305-libmudflap-susv3-legacy.patch @@ -0,0 +1,49 @@ +Index: gcc-4.8.0/libmudflap/mf-hooks2.c +=================================================================== +--- gcc-4.8.0.orig/libmudflap/mf-hooks2.c 2013-02-03 18:48:05.000000000 +0100 ++++ gcc-4.8.0/libmudflap/mf-hooks2.c 2013-03-23 17:39:43.000000000 +0100 +@@ -424,7 +424,7 @@ + { + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); +- bzero (s, n); ++ memset (s, 0, n); + } + + +@@ -434,7 +434,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); + MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); +- bcopy (src, dest, n); ++ memmove (dest, src, n); + } + + +@@ -444,7 +444,7 @@ + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); + MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); +- return bcmp (s1, s2, n); ++ return n == 0 ? 0 : memcmp (s1, s2, n); + } + + +@@ -453,7 +453,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); +- return index (s, c); ++ return strchr (s, c); + } + + +@@ -462,7 +462,7 @@ + size_t n = strlen (s); + TRACE ("%s\n", __PRETTY_FUNCTION__); + MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); +- return rindex (s, c); ++ return strrchr (s, c); + } + + /* XXX: stpcpy, memccpy */ diff --git a/package/gcc/4.8.5/810-arm-softfloat-libgcc.patch b/package/gcc/4.8.5/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000000..c8cb377d55 --- /dev/null +++ b/package/gcc/4.8.5/810-arm-softfloat-libgcc.patch @@ -0,0 +1,30 @@ +Index: gcc-4.8.0/gcc/config/arm/linux-elf.h +=================================================================== +--- gcc-4.8.0.orig/gcc/config/arm/linux-elf.h 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.0/gcc/config/arm/linux-elf.h 2013-03-23 17:40:00.000000000 +0100 +@@ -55,7 +55,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + +Index: gcc-4.8.0/libgcc/config/arm/t-linux +=================================================================== +--- gcc-4.8.0.orig/libgcc/config/arm/t-linux 2012-03-22 16:14:46.000000000 +0100 ++++ gcc-4.8.0/libgcc/config/arm/t-linux 2013-03-23 17:40:54.000000000 +0100 +@@ -1,6 +1,11 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 ++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # Just for these, we omit the frame pointer since it makes such a big + # difference. diff --git a/package/gcc/4.8.5/830-arm_unbreak_armv4t.patch b/package/gcc/4.8.5/830-arm_unbreak_armv4t.patch new file mode 100644 index 0000000000..37f8f2a54d --- /dev/null +++ b/package/gcc/4.8.5/830-arm_unbreak_armv4t.patch @@ -0,0 +1,13 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/package/gcc/4.8.5/841-PR57717-E500v2.patch b/package/gcc/4.8.5/841-PR57717-E500v2.patch new file mode 100644 index 0000000000..a011e24112 --- /dev/null +++ b/package/gcc/4.8.5/841-PR57717-E500v2.patch @@ -0,0 +1,23 @@ +This backports fix from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57717 + +Upstream-Status: Backport +Signed-off-by: Julian Brown +[Gustavo: Update for gcc 4.8.3] + +fix for PR57717 (PowerPC E500v2) +http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00668.html + +diff -Nura gcc-4.8.3/gcc/config/rs6000/rs6000.c gcc-4.8.3-pr57717/gcc/config/rs6000/rs6000.c +--- gcc-4.8.3/gcc/config/rs6000/rs6000.c 2014-05-04 23:18:35.000000000 -0300 ++++ gcc-4.8.3-pr57717/gcc/config/rs6000/rs6000.c 2014-05-22 15:20:12.554270919 -0300 +@@ -7343,9 +7343,7 @@ + && GET_CODE (XEXP (x, 1)) == CONST_INT + && reg_offset_p + && !SPE_VECTOR_MODE (mode) +- && !(TARGET_E500_DOUBLE && (mode == DFmode || mode == TFmode +- || mode == DDmode || mode == TDmode +- || mode == DImode)) ++ && !(TARGET_E500_DOUBLE && GET_MODE_SIZE (mode) > UNITS_PER_WORD) + && (!VECTOR_MODE_P (mode) || VECTOR_MEM_NONE_P (mode))) + { + HOST_WIDE_INT val = INTVAL (XEXP (x, 1)); diff --git a/package/gcc/4.8.5/842-PR60155.patch b/package/gcc/4.8.5/842-PR60155.patch new file mode 100644 index 0000000000..7bc2122fd4 --- /dev/null +++ b/package/gcc/4.8.5/842-PR60155.patch @@ -0,0 +1,111 @@ +From gcc bugzilla https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60155 +Upstream status: in trunk. + +Signed-off-by: Gustavo Zacarias + +--- trunk/gcc/gcse.c 2014/02/12 14:50:06 207726 ++++ trunk/gcc/gcse.c 2014/04/04 22:25:51 209134 +@@ -2502,6 +2502,65 @@ + } + } + ++struct set_data ++{ ++ rtx insn; ++ const_rtx set; ++ int nsets; ++}; ++ ++/* Increment number of sets and record set in DATA. */ ++ ++static void ++record_set_data (rtx dest, const_rtx set, void *data) ++{ ++ struct set_data *s = (struct set_data *)data; ++ ++ if (GET_CODE (set) == SET) ++ { ++ /* We allow insns having multiple sets, where all but one are ++ dead as single set insns. In the common case only a single ++ set is present, so we want to avoid checking for REG_UNUSED ++ notes unless necessary. */ ++ if (s->nsets == 1 ++ && find_reg_note (s->insn, REG_UNUSED, SET_DEST (s->set)) ++ && !side_effects_p (s->set)) ++ s->nsets = 0; ++ ++ if (!s->nsets) ++ { ++ /* Record this set. */ ++ s->nsets += 1; ++ s->set = set; ++ } ++ else if (!find_reg_note (s->insn, REG_UNUSED, dest) ++ || side_effects_p (set)) ++ s->nsets += 1; ++ } ++} ++ ++static const_rtx ++single_set_gcse (rtx insn) ++{ ++ struct set_data s; ++ rtx pattern; ++ ++ gcc_assert (INSN_P (insn)); ++ ++ /* Optimize common case. */ ++ pattern = PATTERN (insn); ++ if (GET_CODE (pattern) == SET) ++ return pattern; ++ ++ s.insn = insn; ++ s.nsets = 0; ++ note_stores (pattern, record_set_data, &s); ++ ++ /* Considered invariant insns have exactly one set. */ ++ gcc_assert (s.nsets == 1); ++ return s.set; ++} ++ + /* Emit move from SRC to DEST noting the equivalence with expression computed + in INSN. */ + +@@ -2509,7 +2568,8 @@ + gcse_emit_move_after (rtx dest, rtx src, rtx insn) + { + rtx new_rtx; +- rtx set = single_set (insn), set2; ++ const_rtx set = single_set_gcse (insn); ++ rtx set2; + rtx note; + rtx eqv = NULL_RTX; + +@@ -3369,13 +3429,12 @@ + FOR_EACH_VEC_ELT (occrs_to_hoist, j, occr) + { + rtx insn; +- rtx set; ++ const_rtx set; + + gcc_assert (!occr->deleted_p); + + insn = occr->insn; +- set = single_set (insn); +- gcc_assert (set); ++ set = single_set_gcse (insn); + + /* Create a pseudo-reg to store the result of reaching + expressions into. Get the mode for the new pseudo +@@ -3456,10 +3515,8 @@ + { + rtx reg; + enum reg_class pressure_class; +- rtx set = single_set (insn); ++ const_rtx set = single_set_gcse (insn); + +- /* Considered invariant insns have only one set. */ +- gcc_assert (set != NULL_RTX); + reg = SET_DEST (set); + if (GET_CODE (reg) == SUBREG) + reg = SUBREG_REG (reg); diff --git a/package/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch b/package/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch new file mode 100644 index 0000000000..afa650c8b9 --- /dev/null +++ b/package/gcc/4.8.5/843-aarch64-vmlaq_lane_s32-typo.patch @@ -0,0 +1,24 @@ +From 845478644ba54a6947e9b224f2e5cd342e8257a9 Mon Sep 17 00:00:00 2001 +From: Andrew Hsieh +Date: Wed, 25 Jun 2014 22:13:48 -0700 +Subject: [PATCH] Fix a typo in vmlaq_lane_s32 + +BUG=15526898 + +Change-Id: I4e35a764d369d378808dab29beefe34d1f93249b +Signed-off-by: Peter Korsgaard +--- + +diff --git a/gcc/config/aarch64/arm_neon.h b/gcc/config/aarch64/arm_neon.h +index 73c7e7d..92b0119 100644 +--- a/gcc/config/aarch64/arm_neon.h ++++ b/gcc/config/aarch64/arm_neon.h +@@ -9984,7 +9984,7 @@ + #define vmlaq_lane_s32(a, b, c, d) \ + __extension__ \ + ({ \ +- int32x4_t c_ = (c); \ ++ int32x2_t c_ = (c); \ + int32x4_t b_ = (b); \ + int32x4_t a_ = (a); \ + int32x4_t result; \ diff --git a/package/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch b/package/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch new file mode 100644 index 0000000000..792976fd51 --- /dev/null +++ b/package/gcc/4.8.5/850-libstdcxx-uclibc-c99.patch @@ -0,0 +1,273 @@ +Allow C99-depending features of libstdc++ with uClibc + +The libstdc++ code is fairly restrictive on how it checks for C99 +compatibility: it requires *complete* C99 support to enable certain +features. For example, uClibc provides a good number of C99 features, +but not C99 complex number support. For this reason, libstdc++ +completely disables many the standard C++ methods that can in fact +work because uClibc provides the necessary functions. + +This patch is similar and highly inspired from +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in +a way that doesn't involve changing the configure.ac script, as +autoreconfiguring gcc is complicated. It simply relies on the fact +that uClibc defines the __UCLIBC__ definition. + +Signed-off-by: Thomas Petazzoni + +Index: b/libstdc++-v3/config/locale/generic/c_locale.h +=================================================================== +--- a/libstdc++-v3/config/locale/generic/c_locale.h ++++ b/libstdc++-v3/config/locale/generic/c_locale.h +@@ -70,7 +70,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +Index: b/libstdc++-v3/config/locale/gnu/c_locale.h +=================================================================== +--- a/libstdc++-v3/config/locale/gnu/c_locale.h ++++ b/libstdc++-v3/config/locale/gnu/c_locale.h +@@ -88,7 +88,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +Index: b/libstdc++-v3/include/bits/basic_string.h +=================================================================== +--- a/libstdc++-v3/include/bits/basic_string.h ++++ b/libstdc++-v3/include/bits/basic_string.h +@@ -2809,7 +2809,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ ++#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) \ + && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) + + #include +Index: b/libstdc++-v3/include/bits/locale_facets.tcc +=================================================================== +--- a/libstdc++-v3/include/bits/locale_facets.tcc ++++ b/libstdc++-v3/include/bits/locale_facets.tcc +@@ -987,7 +987,7 @@ + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough (most probably sufficient + // for non-ios_base::fixed outputs) + int __cs_size = __max_digits * 3; +Index: b/libstdc++-v3/include/bits/locale_facets_nonio.tcc +=================================================================== +--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc ++++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc +@@ -572,7 +572,7 @@ + { + const locale __loc = __io.getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough. + int __cs_size = 64; + char* __cs = static_cast(__builtin_alloca(__cs_size)); +Index: b/libstdc++-v3/include/c_compatibility/math.h +=================================================================== +--- a/libstdc++-v3/include/c_compatibility/math.h ++++ b/libstdc++-v3/include/c_compatibility/math.h +@@ -56,7 +56,7 @@ + using std::floor; + using std::fmod; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::fpclassify; + using std::isfinite; + using std::isinf; +Index: b/libstdc++-v3/include/c_compatibility/wchar.h +=================================================================== +--- a/libstdc++-v3/include/c_compatibility/wchar.h ++++ b/libstdc++-v3/include/c_compatibility/wchar.h +@@ -103,7 +103,7 @@ + using std::wmemset; + using std::wcsftime; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/c_global/cstdlib +=================================================================== +--- a/libstdc++-v3/include/c_global/cstdlib ++++ b/libstdc++-v3/include/c_global/cstdlib +@@ -182,7 +182,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +Index: b/libstdc++-v3/include/c_global/cwchar +=================================================================== +--- a/libstdc++-v3/include/c_global/cwchar ++++ b/libstdc++-v3/include/c_global/cwchar +@@ -232,7 +232,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +@@ -289,7 +289,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/c_std/cstdio +=================================================================== +--- a/libstdc++-v3/include/c_std/cstdio ++++ b/libstdc++-v3/include/c_std/cstdio +@@ -139,7 +139,7 @@ + using ::vsprintf; + } // namespace std + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf +Index: b/libstdc++-v3/include/c_std/cstdlib +=================================================================== +--- a/libstdc++-v3/include/c_std/cstdlib ++++ b/libstdc++-v3/include/c_std/cstdlib +@@ -180,7 +180,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +Index: b/libstdc++-v3/include/c_std/cwchar +=================================================================== +--- a/libstdc++-v3/include/c_std/cwchar ++++ b/libstdc++-v3/include/c_std/cwchar +@@ -228,7 +228,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +Index: b/libstdc++-v3/include/ext/vstring.h +=================================================================== +--- a/libstdc++-v3/include/ext/vstring.h ++++ b/libstdc++-v3/include/ext/vstring.h +@@ -2571,7 +2571,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99)) ++#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))) + + #include + +Index: b/libstdc++-v3/include/tr1/cstdio +=================================================================== +--- a/libstdc++-v3/include/tr1/cstdio ++++ b/libstdc++-v3/include/tr1/cstdio +@@ -33,7 +33,7 @@ + + #include + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +Index: b/libstdc++-v3/include/tr1/cstdlib +=================================================================== +--- a/libstdc++-v3/include/tr1/cstdlib ++++ b/libstdc++-v3/include/tr1/cstdlib +@@ -35,7 +35,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +Index: b/libstdc++-v3/include/tr1/cwchar +=================================================================== +--- a/libstdc++-v3/include/tr1/cwchar ++++ b/libstdc++-v3/include/tr1/cwchar +@@ -52,7 +52,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/tr1/stdlib.h +=================================================================== +--- a/libstdc++-v3/include/tr1/stdlib.h ++++ b/libstdc++-v3/include/tr1/stdlib.h +@@ -33,7 +33,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + using std::tr1::atoll; + using std::tr1::strtoll; +Index: b/libstdc++-v3/src/c++11/debug.cc +=================================================================== +--- a/libstdc++-v3/src/c++11/debug.cc ++++ b/libstdc++-v3/src/c++11/debug.cc +@@ -787,7 +787,7 @@ + int __n __attribute__ ((__unused__)), + const char* __fmt, _Tp __s) const throw () + { +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + std::snprintf(__buf, __n, __fmt, __s); + #else + std::sprintf(__buf, __fmt, __s); +Index: b/libstdc++-v3/include/c_global/cstdio +=================================================================== +--- a/libstdc++-v3/include/c_global/cstdio ++++ b/libstdc++-v3/include/c_global/cstdio +@@ -139,7 +139,7 @@ + using ::vsprintf; + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf diff --git a/package/gcc/4.8.5/851-PR-other-56780.patch b/package/gcc/4.8.5/851-PR-other-56780.patch new file mode 100644 index 0000000000..feb433920d --- /dev/null +++ b/package/gcc/4.8.5/851-PR-other-56780.patch @@ -0,0 +1,244 @@ +From afe990251bd9b3a063f03da31a3b8d139d033bc3 Mon Sep 17 00:00:00 2001 +From: ian +Date: Sat, 1 Jun 2013 00:20:49 +0000 +Subject: [PATCH] PR other/56780 + +* libiberty/configure.ac: Move test for --enable-install-libiberty +outside of the 'with_target_subdir' test so that it actually gets +run. Add output messages to show the test result. +* libiberty/configure: Regenerate. +* libiberty/Makefile.in (install_to_libdir): Place the +installation of the libiberty library in the same guard as that +used for the headers to prevent it being installed unless +requested via --enable-install-libiberty. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199570 138bc75d-0d04-0410-961f-82ee72b054a4 + +libiberty: fix --enable-install-libiberty flag [PR 56780] + +Commit 199570 fixed the --disable-install-libiberty behavior, but it also +added a bug where the enable path never works because the initial clear +of target_header_dir wasn't deleted. So we end up initializing properly +at the top only to reset it at the end all the time. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-82ee72b054a4 + +[Romain + squash the two upstream commits + Remove the ChangeLog] +Signed-off-by: Romain Naour +--- + libiberty/Makefile.in | 24 ++++++++++----------- + libiberty/configure | 57 +++++++++++++++++++++++++++----------------------- + libiberty/configure.ac | 47 ++++++++++++++++++++++------------------- + 3 files changed, 68 insertions(+), 60 deletions(-) + +diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in +index f6a3ebd..75ff82d 100644 +--- a/libiberty/Makefile.in ++++ b/libiberty/Makefile.in +@@ -355,19 +355,19 @@ install-strip: install + # since it will be passed the multilib flags. + MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` + install_to_libdir: all +- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR) +- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n +- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ) +- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB) + if test -n "${target_header_dir}"; then \ +- case "${target_header_dir}" in \ +- /*) thd=${target_header_dir};; \ +- *) thd=${includedir}/${target_header_dir};; \ +- esac; \ +- ${mkinstalldirs} $(DESTDIR)$${thd}; \ +- for h in ${INSTALLED_HEADERS}; do \ +- ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ +- done; \ ++ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ ++ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \ ++ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \ ++ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \ ++ case "${target_header_dir}" in \ ++ /*) thd=${target_header_dir};; \ ++ *) thd=${includedir}/${target_header_dir};; \ ++ esac; \ ++ ${mkinstalldirs} $(DESTDIR)$${thd}; \ ++ for h in ${INSTALLED_HEADERS}; do \ ++ ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ ++ done; \ + fi + @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install + +diff --git a/libiberty/configure b/libiberty/configure +index 5367027..4feb95a 100755 +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -675,8 +675,8 @@ with_cross_host + with_newlib + enable_maintainer_mode + enable_multilib +-enable_largefile + enable_install_libiberty ++enable_largefile + ' + ac_precious_vars='build_alias + host_alias +@@ -1303,8 +1303,8 @@ Optional Features: + enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-multilib build many library versions (default) ++ --enable-install-libiberty Install headers and library for end users + --disable-largefile omit support for large files +- --enable-install-libiberty Install headers for end users + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -2784,6 +2784,35 @@ if test $cross_compiling = no && test $multilib = yes \ + cross_compiling=maybe + fi + ++# We may wish to install the target headers somewhere. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libiberty headers and static library" >&5 ++$as_echo_n "checking whether to install libiberty headers and static library... " >&6; } ++ ++# Check whether --enable-install-libiberty was given. ++if test "${enable_install_libiberty+set}" = set; then : ++ enableval=$enable_install_libiberty; enable_install_libiberty=$enableval ++else ++ enable_install_libiberty=no ++fi ++ ++# Option parsed, now set things appropriately. ++case x"$enable_install_libiberty" in ++ xyes|x) ++ target_header_dir=libiberty ++ ;; ++ xno) ++ target_header_dir= ++ ;; ++ *) ++ # This could be sanity-checked in various ways... ++ target_header_dir="${enable_install_libiberty}" ++ ;; ++esac ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_install_libiberty" >&5 ++$as_echo "$enable_install_libiberty" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: target_header_dir = $target_header_dir" >&5 ++$as_echo "$as_me: target_header_dir = $target_header_dir" >&6;} ++ + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -5476,7 +5505,6 @@ fi + + setobjs= + CHECK= +-target_header_dir= + if test -n "${with_target_subdir}"; then + + # We are being configured as a target library. AC_REPLACE_FUNCS +@@ -5759,29 +5787,6 @@ _ACEOF + + esac + +- # We may wish to install the target headers somewhere. +- # Check whether --enable-install-libiberty was given. +-if test "${enable_install_libiberty+set}" = set; then : +- enableval=$enable_install_libiberty; enable_install_libiberty=$enableval +-else +- enable_install_libiberty=no +-fi +- +- # Option parsed, now set things appropriately. +- case x"$enable_install_libiberty" in +- xyes|x) +- target_header_dir=libiberty +- ;; +- xno) +- target_header_dir= +- ;; +- *) +- # This could be sanity-checked in various ways... +- target_header_dir="${enable_install_libiberty}" +- ;; +- esac +- +- + else + + # Not a target library, so we set things up to run the test suite. +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index c763894..f17e6b6 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -128,6 +128,31 @@ if test $cross_compiling = no && test $multilib = yes \ + cross_compiling=maybe + fi + ++# We may wish to install the target headers somewhere. ++AC_MSG_CHECKING([whether to install libiberty headers and static library]) ++dnl install-libiberty is disabled by default ++ ++AC_ARG_ENABLE(install-libiberty, ++[ --enable-install-libiberty Install headers and library for end users], ++enable_install_libiberty=$enableval, ++enable_install_libiberty=no)dnl ++ ++# Option parsed, now set things appropriately. ++case x"$enable_install_libiberty" in ++ xyes|x) ++ target_header_dir=libiberty ++ ;; ++ xno) ++ target_header_dir= ++ ;; ++ *) ++ # This could be sanity-checked in various ways... ++ target_header_dir="${enable_install_libiberty}" ++ ;; ++esac ++AC_MSG_RESULT($enable_install_libiberty) ++AC_MSG_NOTICE([target_header_dir = $target_header_dir]) ++ + GCC_NO_EXECUTABLES + AC_PROG_CC + AC_SYS_LARGEFILE +@@ -380,7 +405,6 @@ fi + + setobjs= + CHECK= +-target_header_dir= + if test -n "${with_target_subdir}"; then + + # We are being configured as a target library. AC_REPLACE_FUNCS +@@ -492,27 +516,6 @@ if test -n "${with_target_subdir}"; then + + esac + +- # We may wish to install the target headers somewhere. +- AC_ARG_ENABLE(install-libiberty, +- [ --enable-install-libiberty Install headers for end users], +- enable_install_libiberty=$enableval, +- enable_install_libiberty=no)dnl +- +- # Option parsed, now set things appropriately. +- case x"$enable_install_libiberty" in +- xyes|x) +- target_header_dir=libiberty +- ;; +- xno) +- target_header_dir= +- ;; +- *) +- # This could be sanity-checked in various ways... +- target_header_dir="${enable_install_libiberty}" +- ;; +- esac +- +- + else + + # Not a target library, so we set things up to run the test suite. +-- +1.9.3 + diff --git a/package/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch b/package/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch new file mode 100644 index 0000000000..aa1376c44c --- /dev/null +++ b/package/gcc/4.8.5/870-xtensa-add-mauto-litpools-option.patch @@ -0,0 +1,290 @@ +From 6d852ffb43b111a39162135c95249e749c4e285b Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 6 Aug 2015 01:16:02 +0300 +Subject: [PATCH] xtensa: add -mauto-litpools option + +With support from assembler this option allows compiling huge functions, +where single literal pool at the beginning of a function may not be +reachable by L32R instructions at its end. + +Currently assembler --auto-litpools option cannot deal with literals +used from multiple locations separated by more than 256 KBytes of code. +Don't turn constants into literals, instead use MOVI instruction to load +them into registers and let the assembler turn them into literals as +necessary. + +2015-08-12 Max Filippov +gcc/ + * config/xtensa/constraints.md (define_constraint "Y"): New + constraint. + * config/xtensa/elf.h (ASM_SPEC): Add m(no-)auto-litpools. + * config/xtensa/linux.h (ASM_SPEC): Likewise. + * config/xtensa/predicates.md (move_operand): Match constants + and symbols in the presence of TARGET_AUTO_LITPOOLS. + * config/xtensa/xtensa.c (xtensa_valid_move): Don't allow + immediate references to TLS data. + (xtensa_emit_move_sequence): Don't force constants to memory in + the presence of TARGET_AUTO_LITPOOLS. + (print_operand): Add 'y' format, same as default, but capable of + printing SF mode constants as well. + * config/xtensa/xtensa.md (movsi_internal, movhi_internal) + (movsf_internal): Add movi pattern that loads literal. + (movsf, movdf): Don't force constants to memory in the presence + of TARGET_AUTO_LITPOOLS. + (movdf_internal): Add 'Y' constraint. + * config/xtensa/xtensa.opt (mauto-litpools): New option. + +Signed-off-by: Max Filippov +--- +Backported from: r226828 +Changes to ChangeLogs and documentation are dropped. + + gcc/config/xtensa/constraints.md | 5 +++++ + gcc/config/xtensa/elf.h | 4 +++- + gcc/config/xtensa/linux.h | 4 +++- + gcc/config/xtensa/predicates.md | 3 ++- + gcc/config/xtensa/xtensa.c | 19 ++++++++++++++++++- + gcc/config/xtensa/xtensa.md | 35 +++++++++++++++++++---------------- + gcc/config/xtensa/xtensa.opt | 4 ++++ + 7 files changed, 54 insertions(+), 20 deletions(-) + +diff --git a/gcc/config/xtensa/constraints.md b/gcc/config/xtensa/constraints.md +index 30f4c1f..773d4f9 100644 +--- a/gcc/config/xtensa/constraints.md ++++ b/gcc/config/xtensa/constraints.md +@@ -111,6 +111,11 @@ + (and (match_code "const_int") + (match_test "xtensa_mask_immediate (ival)"))) + ++(define_constraint "Y" ++ "A constant that can be used in relaxed MOVI instructions." ++ (and (match_code "const_int,const_double,const,symbol_ref,label_ref") ++ (match_test "TARGET_AUTO_LITPOOLS"))) ++ + ;; Memory constraints. Do not use define_memory_constraint here. Doing so + ;; causes reload to force some constants into the constant pool, but since + ;; the Xtensa constant pool can only be accessed with L32R instructions, it +diff --git a/gcc/config/xtensa/elf.h b/gcc/config/xtensa/elf.h +index e59bede..12056f7 100644 +--- a/gcc/config/xtensa/elf.h ++++ b/gcc/config/xtensa/elf.h +@@ -48,7 +48,9 @@ along with GCC; see the file COPYING3. If not see + %{mtarget-align:--target-align} \ + %{mno-target-align:--no-target-align} \ + %{mlongcalls:--longcalls} \ +- %{mno-longcalls:--no-longcalls}" ++ %{mno-longcalls:--no-longcalls} \ ++ %{mauto-litpools:--auto-litpools} \ ++ %{mno-auto-litpools:--no-auto-litpools}" + + #undef LIB_SPEC + #define LIB_SPEC "-lc -lsim -lc -lhandlers-sim -lhal" +diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h +index 675aacf..5b0243a 100644 +--- a/gcc/config/xtensa/linux.h ++++ b/gcc/config/xtensa/linux.h +@@ -42,7 +42,9 @@ along with GCC; see the file COPYING3. If not see + %{mtarget-align:--target-align} \ + %{mno-target-align:--no-target-align} \ + %{mlongcalls:--longcalls} \ +- %{mno-longcalls:--no-longcalls}" ++ %{mno-longcalls:--no-longcalls} \ ++ %{mauto-litpools:--auto-litpools} \ ++ %{mno-auto-litpools:--no-auto-litpools}" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + +diff --git a/gcc/config/xtensa/predicates.md b/gcc/config/xtensa/predicates.md +index e02209e..d7dfa11 100644 +--- a/gcc/config/xtensa/predicates.md ++++ b/gcc/config/xtensa/predicates.md +@@ -142,7 +142,8 @@ + (match_test "GET_MODE_CLASS (mode) == MODE_INT + && xtensa_simm12b (INTVAL (op))")) + (and (match_code "const_int,const_double,const,symbol_ref,label_ref") +- (match_test "TARGET_CONST16 && CONSTANT_P (op) ++ (match_test "(TARGET_CONST16 || TARGET_AUTO_LITPOOLS) ++ && CONSTANT_P (op) + && GET_MODE_SIZE (mode) % UNITS_PER_WORD == 0"))))) + + ;; Accept the floating point constant 1 in the appropriate mode. +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index eb039ba..206ff80 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -501,6 +501,9 @@ xtensa_valid_move (machine_mode mode, rtx *operands) + { + int dst_regnum = xt_true_regnum (operands[0]); + ++ if (xtensa_tls_referenced_p (operands[1])) ++ return FALSE; ++ + /* The stack pointer can only be assigned with a MOVSP opcode. */ + if (dst_regnum == STACK_POINTER_REGNUM) + return !TARGET_WINDOWED_ABI +@@ -1069,7 +1072,7 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode) + return 1; + } + +- if (! TARGET_CONST16) ++ if (! TARGET_AUTO_LITPOOLS && ! TARGET_CONST16) + { + src = force_const_mem (SImode, src); + operands[1] = src; +@@ -2449,6 +2452,20 @@ print_operand (FILE *file, rtx x, int letter) + } + break; + ++ case 'y': ++ if (GET_CODE (x) == CONST_DOUBLE && ++ GET_MODE (x) == SFmode) ++ { ++ REAL_VALUE_TYPE r; ++ long l; ++ REAL_VALUE_FROM_CONST_DOUBLE (r, x); ++ REAL_VALUE_TO_TARGET_SINGLE (r, l); ++ fprintf (file, "0x%08lx", l); ++ break; ++ } ++ ++ /* fall through */ ++ + default: + if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG) + fprintf (file, "%s", reg_names[xt_true_regnum (x)]); +diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md +index 6d84384..0e673a3 100644 +--- a/gcc/config/xtensa/xtensa.md ++++ b/gcc/config/xtensa/xtensa.md +@@ -761,8 +761,8 @@ + }) + + (define_insn "movsi_internal" +- [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,W,a,a,U,*a,*A") +- (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,i,T,U,r,*A,*r"))] ++ [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,a,W,a,a,U,*a,*A") ++ (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,Y,i,T,U,r,*A,*r"))] + "xtensa_valid_move (SImode, operands)" + "@ + movi.n\t%0, %x1 +@@ -774,15 +774,16 @@ + mov\t%0, %1 + movsp\t%0, %1 + movi\t%0, %x1 ++ movi\t%0, %1 + const16\t%0, %t1\;const16\t%0, %b1 + %v1l32r\t%0, %1 + %v1l32i\t%0, %1 + %v0s32i\t%1, %0 + rsr\t%0, ACCLO + wsr\t%1, ACCLO" +- [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,load,load,store,rsr,wsr") ++ [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,move,load,load,store,rsr,wsr") + (set_attr "mode" "SI") +- (set_attr "length" "2,2,2,2,2,2,3,3,3,6,3,3,3,3,3")]) ++ (set_attr "length" "2,2,2,2,2,2,3,3,3,3,6,3,3,3,3,3")]) + + ;; 16-bit Integer moves + +@@ -796,21 +797,22 @@ + }) + + (define_insn "movhi_internal" +- [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,U,*a,*A") +- (match_operand:HI 1 "move_operand" "M,d,r,I,U,r,*A,*r"))] ++ [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,a,U,*a,*A") ++ (match_operand:HI 1 "move_operand" "M,d,r,I,Y,U,r,*A,*r"))] + "xtensa_valid_move (HImode, operands)" + "@ + movi.n\t%0, %x1 + mov.n\t%0, %1 + mov\t%0, %1 + movi\t%0, %x1 ++ movi\t%0, %1 + %v1l16ui\t%0, %1 + %v0s16i\t%1, %0 + rsr\t%0, ACCLO + wsr\t%1, ACCLO" +- [(set_attr "type" "move,move,move,move,load,store,rsr,wsr") ++ [(set_attr "type" "move,move,move,move,move,load,store,rsr,wsr") + (set_attr "mode" "HI") +- (set_attr "length" "2,2,3,3,3,3,3,3")]) ++ (set_attr "length" "2,2,3,3,3,3,3,3,3")]) + + ;; 8-bit Integer moves + +@@ -881,7 +883,7 @@ + (match_operand:SF 1 "general_operand" ""))] + "" + { +- if (!TARGET_CONST16 && CONSTANT_P (operands[1])) ++ if (!TARGET_CONST16 && !TARGET_AUTO_LITPOOLS && CONSTANT_P (operands[1])) + operands[1] = force_const_mem (SFmode, operands[1]); + + if ((!register_operand (operands[0], SFmode) +@@ -896,8 +898,8 @@ + }) + + (define_insn "movsf_internal" +- [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,W,a,a,U") +- (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,iF,T,U,r"))] ++ [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,a,W,a,a,U") ++ (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,Y,iF,T,U,r"))] + "((register_operand (operands[0], SFmode) + || register_operand (operands[1], SFmode)) + && !(FP_REG_P (xt_true_regnum (operands[0])) +@@ -912,13 +914,14 @@ + mov\t%0, %1 + wfr\t%0, %1 + rfr\t%0, %1 ++ movi\t%0, %y1 + const16\t%0, %t1\;const16\t%0, %b1 + %v1l32r\t%0, %1 + %v1l32i\t%0, %1 + %v0s32i\t%1, %0" +- [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,load,load,store") ++ [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,move,load,load,store") + (set_attr "mode" "SF") +- (set_attr "length" "3,3,3,2,2,2,3,3,3,6,3,3,3")]) ++ (set_attr "length" "3,3,3,2,2,2,3,3,3,3,6,3,3,3")]) + + (define_insn "*lsiu" + [(set (match_operand:SF 0 "register_operand" "=f") +@@ -991,7 +994,7 @@ + (match_operand:DF 1 "general_operand" ""))] + "" + { +- if (CONSTANT_P (operands[1]) && !TARGET_CONST16) ++ if (CONSTANT_P (operands[1]) && !TARGET_CONST16 && !TARGET_AUTO_LITPOOLS) + operands[1] = force_const_mem (DFmode, operands[1]); + + if (!register_operand (operands[0], DFmode) +@@ -1002,8 +1005,8 @@ + }) + + (define_insn_and_split "movdf_internal" +- [(set (match_operand:DF 0 "nonimmed_operand" "=a,W,a,a,U") +- (match_operand:DF 1 "move_operand" "r,iF,T,U,r"))] ++ [(set (match_operand:DF 0 "nonimmed_operand" "=a,a,W,a,a,U") ++ (match_operand:DF 1 "move_operand" "r,Y,iF,T,U,r"))] + "register_operand (operands[0], DFmode) + || register_operand (operands[1], DFmode)" + "#" +diff --git a/gcc/config/xtensa/xtensa.opt b/gcc/config/xtensa/xtensa.opt +index 2fd6cee..21c6e96 100644 +--- a/gcc/config/xtensa/xtensa.opt ++++ b/gcc/config/xtensa/xtensa.opt +@@ -38,6 +38,10 @@ mtext-section-literals + Target + Intersperse literal pools with code in the text section + ++mauto-litpools ++Target Report Mask(AUTO_LITPOOLS) ++Relax literals in assembler and place them automatically in the text section ++ + mserialize-volatile + Target Report Mask(SERIALIZE_VOLATILE) + -mno-serialize-volatile Do not serialize volatile memory references with MEMW instructions +-- +1.8.1.4 + diff --git a/package/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch b/package/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch new file mode 100644 index 0000000000..abc7a08e8d --- /dev/null +++ b/package/gcc/4.8.5/871-xtensa-reimplement-register-spilling.patch @@ -0,0 +1,76 @@ +From 05154174b369505238b759cf80d595d8cfc8c731 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Mon, 10 Aug 2015 21:35:20 +0300 +Subject: [PATCH 1/3] xtensa: reimplement register spilling + +Spilling windowed registers in userspace is much easier, more portable, +less error-prone and equally effective as in kernel. Now that register +spilling syscall is considered obsolete in the xtensa linux kernel +replace it with CALL12 followed by series of ENTRY in libgcc. + +2015-08-18 Max Filippov +libgcc/ + * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use + CALL12 followed by series of ENTRY to spill windowed registers. + (__xtensa_nonlocal_goto): Call __xtensa_libgcc_window_spill + instead of making linux spill syscall. + +Signed-off-by: Max Filippov +--- +Backported from: r226962 + + libgcc/config/xtensa/lib2funcs.S | 30 +++++++++++++++++++++++------- + 1 file changed, 23 insertions(+), 7 deletions(-) + +diff --git a/libgcc/config/xtensa/lib2funcs.S b/libgcc/config/xtensa/lib2funcs.S +index 3ac8c1d..2e678af 100644 +--- a/libgcc/config/xtensa/lib2funcs.S ++++ b/libgcc/config/xtensa/lib2funcs.S +@@ -33,10 +33,29 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + .global __xtensa_libgcc_window_spill + .type __xtensa_libgcc_window_spill,@function + __xtensa_libgcc_window_spill: +- entry sp, 32 +- movi a2, 0 +- syscall ++ entry sp, 48 ++#if XCHAL_NUM_AREGS > 16 ++ call12 1f ++ retw ++ .align 4 ++1: ++ .rept (XCHAL_NUM_AREGS - 24) / 12 ++ _entry sp, 48 ++ mov a12, a0 ++ .endr ++ _entry sp, 16 ++#if XCHAL_NUM_AREGS % 12 == 0 ++ mov a4, a4 ++#elif XCHAL_NUM_AREGS % 12 == 4 ++ mov a8, a8 ++#elif XCHAL_NUM_AREGS % 12 == 8 ++ mov a12, a12 ++#endif ++ retw ++#else ++ mov a8, a8 + retw ++#endif + .size __xtensa_libgcc_window_spill, .-__xtensa_libgcc_window_spill + + +@@ -58,10 +77,7 @@ __xtensa_nonlocal_goto: + entry sp, 32 + + /* Flush registers. */ +- mov a5, a2 +- movi a2, 0 +- syscall +- mov a2, a5 ++ call8 __xtensa_libgcc_window_spill + + /* Because the save area for a0-a3 is stored one frame below + the one identified by a2, the only way to restore those +-- +1.8.1.4 + diff --git a/package/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/package/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch new file mode 100644 index 0000000000..f23a5c0737 --- /dev/null +++ b/package/gcc/4.8.5/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch @@ -0,0 +1,33 @@ +From f66206679a0ad604f13673559f230160cd3d1189 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 14 Aug 2015 02:45:02 +0300 +Subject: [PATCH 2/3] xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde + +This allows having exception cleanup code in binaries that don't +register their unwind tables. + +2015-08-18 Max Filippov +libgcc/ + * config/xtensa/t-xtensa (LIB2ADDEH): Replace unwind-dw2-fde + with unwind-dw2-fde-dip. + +Signed-off-by: Max Filippov +--- +Backported from: r226963 + + libgcc/config/xtensa/t-xtensa | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/xtensa/t-xtensa b/libgcc/config/xtensa/t-xtensa +index 27399e6..66d0eb3 100644 +--- a/libgcc/config/xtensa/t-xtensa ++++ b/libgcc/config/xtensa/t-xtensa +@@ -13,4 +13,4 @@ LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 _udivsi3 _umodsi3 \ + LIB2ADD = $(srcdir)/config/xtensa/lib2funcs.S + + LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \ +- $(srcdir)/unwind-dw2-fde.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c ++ $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c +-- +1.8.1.4 + diff --git a/package/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch b/package/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch new file mode 100644 index 0000000000..dc405132cc --- /dev/null +++ b/package/gcc/4.8.5/873-xtensa-fix-_Unwind_GetCFA.patch @@ -0,0 +1,40 @@ +From 15c7c4d39b317f0d902ef28fd43eca5c3369f891 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 15 Aug 2015 05:12:11 +0300 +Subject: [PATCH 3/3] xtensa: fix _Unwind_GetCFA + +Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame +higher than what was actually used by code at context->ra. This results +in invalid CFA value in signal frames and premature unwinding completion +in forced unwinding used by uClibc NPTL thread cancellation. +Returning context->sp from _Unwind_GetCFA makes all CFA values valid and +matching code that used them. + +2015-08-18 Max Filippov +libgcc/ + * config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return + context->sp instead of context->cfa. + +Signed-off-by: Max Filippov +--- +Backported from: r226964 + + libgcc/config/xtensa/unwind-dw2-xtensa.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/xtensa/unwind-dw2-xtensa.c b/libgcc/config/xtensa/unwind-dw2-xtensa.c +index 35f7797..ef6b900 100644 +--- a/libgcc/config/xtensa/unwind-dw2-xtensa.c ++++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c +@@ -130,7 +130,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index) + _Unwind_Word + _Unwind_GetCFA (struct _Unwind_Context *context) + { +- return (_Unwind_Ptr) context->cfa; ++ return (_Unwind_Ptr) context->sp; + } + + /* Overwrite the saved value for register INDEX in CONTEXT with VAL. */ +-- +1.8.1.4 + diff --git a/package/gcc/4.8.5/874-xtensa-add-uclinux-support.patch b/package/gcc/4.8.5/874-xtensa-add-uclinux-support.patch new file mode 100644 index 0000000000..23db3d863c --- /dev/null +++ b/package/gcc/4.8.5/874-xtensa-add-uclinux-support.patch @@ -0,0 +1,174 @@ +From 70c2cb98fb129b4766b5da0f945dc41fd568c77a Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 22 Aug 2015 08:44:26 +0300 +Subject: [PATCH] xtensa: add uclinux support + +2015-10-03 Max Filippov +gcc/ + * config.gcc (xtensa*-*-uclinux*): New configuration. + * config/xtensa/uclinux.h: New file. + * config/xtensa/uclinux.opt: New file. + +libgcc/ + * config.host (xtensa*-*-uclinux*): New configuration. + +Signed-off-by: Max Filippov +--- +Backported from: r228450 + + gcc/config.gcc | 5 ++++ + gcc/config/xtensa/uclinux.h | 69 +++++++++++++++++++++++++++++++++++++++++++ + gcc/config/xtensa/uclinux.opt | 32 ++++++++++++++++++++ + libgcc/config.host | 5 ++++ + 4 files changed, 111 insertions(+) + create mode 100644 gcc/config/xtensa/uclinux.h + create mode 100644 gcc/config/xtensa/uclinux.opt + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index c52f5a8..56797bd 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2995,6 +2995,11 @@ xtensa*-*-linux*) + tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h" + tmake_file="${tmake_file} xtensa/t-xtensa" + ;; ++xtensa*-*-uclinux*) ++ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h" ++ tmake_file="${tmake_file} xtensa/t-xtensa" ++ extra_options="${extra_options} xtensa/uclinux.opt" ++ ;; + am33_2.0-*-linux*) + tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h" + gas=yes gnu_ld=yes +diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h +new file mode 100644 +index 0000000..4606020 +--- /dev/null ++++ b/gcc/config/xtensa/uclinux.h +@@ -0,0 +1,69 @@ ++/* Xtensa uClinux configuration. ++ Derived from the configuration for GCC for Intel i386 running Linux. ++ Copyright (C) 2001-2015 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC is free software; you can redistribute it and/or modify it under ++the terms of the GNU General Public License as published by the Free ++Software Foundation; either version 3, or (at your option) any later ++version. ++ ++GCC 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 GCC; see the file COPYING3. If not see ++. */ ++ ++#undef TARGET_OS_CPP_BUILTINS ++#define TARGET_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ GNU_USER_TARGET_OS_CPP_BUILTINS (); \ ++ builtin_define ("__uClinux__"); \ ++ } \ ++ while (0) ++ ++#undef SUBTARGET_CPP_SPEC ++#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" ++ ++#undef SIZE_TYPE ++#define SIZE_TYPE "unsigned int" ++ ++#undef PTRDIFF_TYPE ++#define PTRDIFF_TYPE "int" ++ ++#undef WCHAR_TYPE ++#define WCHAR_TYPE "long int" ++ ++#undef WCHAR_TYPE_SIZE ++#define WCHAR_TYPE_SIZE 32 ++ ++#undef ASM_SPEC ++#define ASM_SPEC \ ++ "%{mtext-section-literals:--text-section-literals} \ ++ %{mno-text-section-literals:--no-text-section-literals} \ ++ %{mtarget-align:--target-align} \ ++ %{mno-target-align:--no-target-align} \ ++ %{mlongcalls:--longcalls} \ ++ %{mno-longcalls:--no-longcalls} \ ++ %{mauto-litpools:--auto-litpools} \ ++ %{mno-auto-litpools:--no-auto-litpools}" ++ ++#undef LINK_SPEC ++#define LINK_SPEC "%{!no-elf2flt:%{!elf2flt*:-elf2flt}}" ++ ++#undef LOCAL_LABEL_PREFIX ++#define LOCAL_LABEL_PREFIX "." ++ ++/* Always enable "-fpic" for Xtensa Linux. */ ++#define XTENSA_ALWAYS_PIC 1 ++ ++#undef TARGET_LIBC_HAS_FUNCTION ++#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function ++ ++#undef DBX_REGISTER_NUMBER ++ +diff --git a/gcc/config/xtensa/uclinux.opt b/gcc/config/xtensa/uclinux.opt +new file mode 100644 +index 0000000..95ef777 +--- /dev/null ++++ b/gcc/config/xtensa/uclinux.opt +@@ -0,0 +1,32 @@ ++; Xtensa uClinux options. ++ ++; Copyright (C) 2015 Free Software Foundation, Inc. ++; ++; This file is part of GCC. ++; ++; GCC is free software; you can redistribute it and/or modify it under ++; the terms of the GNU General Public License as published by the Free ++; Software Foundation; either version 3, or (at your option) any later ++; version. ++; ++; GCC 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 GCC; see the file COPYING3. If not see ++; . ++ ++; See the GCC internals manual (options.texi) for a description of ++; this file's format. ++ ++; Please try to keep this file in ASCII collating order. ++ ++elf2flt ++Driver ++ ++elf2flt= ++Driver JoinedOrMissing ++ ++; This comment is to ensure we retain the blank line above. +diff --git a/libgcc/config.host b/libgcc/config.host +index 2c64756..2ee92c1 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -1295,6 +1295,11 @@ xtensa*-*-linux*) + tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc" + md_unwind_header=xtensa/linux-unwind.h + ;; ++xtensa*-*-uclinux*) ++ tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc" ++ md_unwind_header=xtensa/linux-unwind.h ++ extra_parts="$extra_parts crtbeginS.o crtbeginT.o crtendS.o" ++ ;; + am33_2.0-*-linux*) + # Don't need crtbeginT.o from *-*-linux* default. + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" +-- +1.8.1.4 + diff --git a/package/gcc/4.8.5/890-fix-m68k-compile.patch b/package/gcc/4.8.5/890-fix-m68k-compile.patch new file mode 100644 index 0000000000..124e8427f8 --- /dev/null +++ b/package/gcc/4.8.5/890-fix-m68k-compile.patch @@ -0,0 +1,15 @@ +remove unused header, which breaks the toolchain building + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-4.8.5.orig/libgcc/config/m68k/linux-atomic.c gcc-4.8.5/libgcc/config/m68k/linux-atomic.c +--- gcc-4.8.5.orig/libgcc/config/m68k/linux-atomic.c 2013-02-04 20:06:20.000000000 +0100 ++++ gcc-4.8.5/libgcc/config/m68k/linux-atomic.c 2016-03-19 00:18:12.000000000 +0100 +@@ -33,7 +33,6 @@ + using the kernel helper defined below. There is no support for + 64-bit operations yet. */ + +-#include + #include + + #ifndef __NR_atomic_cmpxchg_32 diff --git a/package/gcc/4.8.5/891-fix-m68k-uclinux.patch b/package/gcc/4.8.5/891-fix-m68k-uclinux.patch new file mode 100644 index 0000000000..37c7ac406b --- /dev/null +++ b/package/gcc/4.8.5/891-fix-m68k-uclinux.patch @@ -0,0 +1,18 @@ +avoids internal compiler error while compiling linux-atomic.c +See here: +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833 + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-4.8.5.orig/libgcc/config.host gcc-4.8.5/libgcc/config.host +--- gcc-4.8.5.orig/libgcc/config.host 2014-03-20 17:12:30.000000000 +0100 ++++ gcc-4.8.5/libgcc/config.host 2016-04-27 15:04:01.521171537 +0200 +@@ -689,7 +689,7 @@ + m68k*-*-openbsd*) + ;; + m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc +- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux" ++ tmake_file="$tmake_file m68k/t-floatlib" + md_unwind_header=m68k/linux-unwind.h + ;; + m68k-*-linux*) # Motorola m68k's running GNU/Linux diff --git a/package/gcc/4.8.5/900-musl-support.patch b/package/gcc/4.8.5/900-musl-support.patch new file mode 100644 index 0000000000..6840fccea4 --- /dev/null +++ b/package/gcc/4.8.5/900-musl-support.patch @@ -0,0 +1,648 @@ +Add musl support to gcc + +This patch comes from the musl-cross project at +https://bitbucket.org/GregorR/musl-cross/src. Compared to the upstream version: + + * the config.sub modifications have been removed, because Buildroot + already overwrites all config.sub with a more recent config.sub + that has musl support. + + * change to ensure that a dummy dynamic linker path + MUSL_DYNAMIC_LINKER is defined for all architectures, + otherwise building gcc for architectures not supported by musl was + causing build failure. Bug reported upstream at + https://bitbucket.org/GregorR/musl-gcc-patches/issue/4/musl-gcc-patches-break-the-build-on. + + * change the USE_PT_GNU_EH_FRAME logic to keep the existing gcc logic + and only add the musl one as an addition, not as a replacement. Not + doing this breaks C++ exception handling with glibc, because + USE_PT_GNU_EH_FRAME doesn't get defined due to the configure script + not testing dl_iterate_phdr() on any system except Solaris. + +Signed-off-by: Thomas Petazzoni +[Gustavo: Update for gcc 4.8.3] + +Index: b/fixincludes/mkfixinc.sh +=================================================================== +--- a/fixincludes/mkfixinc.sh ++++ b/fixincludes/mkfixinc.sh +@@ -19,7 +19,8 @@ + powerpc-*-eabi* | \ + powerpc-*-rtems* | \ + powerpcle-*-eabisim* | \ +- powerpcle-*-eabi* ) ++ powerpcle-*-eabi* | \ ++ *-musl* ) + # IF there is no include fixing, + # THEN create a no-op fixer and exit + (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} +Index: b/gcc/config/aarch64/aarch64-linux.h +=================================================================== +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -21,7 +21,12 @@ + #ifndef GCC_AARCH64_LINUX_H + #define GCC_AARCH64_LINUX_H + ++/* The AArch64 port currently supports two dynamic linkers: ++ - ld-linux-aarch64.so.1 - GLIBC dynamic linker ++ - ld-musl-aarch64.so.1 - musl libc dynamic linker */ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64.so.1" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64.so.1" + + #define CPP_SPEC "%{pthread:-D_REENTRANT}" + +Index: b/gcc/config/arm/linux-eabi.h +=================================================================== +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -77,6 +77,23 @@ + %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ + %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" + ++/* For ARM musl currently supports four dynamic linkers: ++ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI ++ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI ++ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB ++ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB ++ musl does not support the legacy OABI mode. ++ All the dynamic linkers live in /lib. ++ We default to soft-float, EL. */ ++#undef MUSL_DYNAMIC_LINKER ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" ++#endif ++#define MUSL_DYNAMIC_LINKER \ ++ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +Index: b/gcc/config/i386/linux64.h +=================================================================== +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -30,3 +30,10 @@ + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" + #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++ ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" ++#undef MUSL_DYNAMIC_LINKERX32 ++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" +Index: b/gcc/config/i386/linux.h +=================================================================== +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -21,3 +21,5 @@ + + #define GNU_USER_LINK_EMULATION "elf_i386" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" +Index: b/gcc/config/linux.h +=================================================================== +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -32,10 +32,12 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ +@@ -53,18 +55,21 @@ + uClibc or Bionic is the default C library and whether + -muclibc or -mglibc or -mbionic has been passed to change the default. */ + +-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ +- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" ++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ ++ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" + + #if DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) + #elif DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) + #elif DEFAULT_LIBC == LIBC_BIONIC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) + #else + #error "Unsupported DEFAULT_LIBC" + #endif /* DEFAULT_LIBC */ +@@ -82,23 +87,32 @@ + #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" + #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" + ++/* Musl dynamic linker paths must be defined on a per-architecture ++ basis, for each architecture supported by Musl. However, in order ++ to let other architectures continue to build with other C ++ libraries, we provide a dummy definition of the following defines. */ ++#define MUSL_DYNAMIC_LINKER "invalid" ++#define MUSL_DYNAMIC_LINKER32 "invalid" ++#define MUSL_DYNAMIC_LINKER64 "invalid" ++#define MUSL_DYNAMIC_LINKERX32 "invalid" ++ + #define GNU_USER_DYNAMIC_LINKER \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ +- BIONIC_DYNAMIC_LINKER) ++ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + #define GNU_USER_DYNAMIC_LINKER32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ +- BIONIC_DYNAMIC_LINKER32) ++ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ +- BIONIC_DYNAMIC_LINKER64) ++ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + #define GNU_USER_DYNAMIC_LINKERX32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ +- BIONIC_DYNAMIC_LINKERX32) ++ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) + + /* Determine whether the entire c99 runtime + is present in the runtime library. */ + #undef TARGET_C99_FUNCTIONS +-#define TARGET_C99_FUNCTIONS (OPTION_GLIBC) ++#define TARGET_C99_FUNCTIONS (OPTION_GLIBC || OPTION_MUSL) + + /* Whether we have sincos that follows the GNU extension. */ + #undef TARGET_HAS_SINCOS +@@ -107,3 +121,74 @@ + /* Whether we have Bionic libc runtime */ + #undef TARGET_HAS_BIONIC + #define TARGET_HAS_BIONIC (OPTION_BIONIC) ++ ++/* musl avoids problematic includes by rearranging the include directories. ++ * Unfortunately, this is mostly duplicated from cppdefault.c */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define INCLUDE_DEFAULTS_MUSL_GPP \ ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, ++ ++#ifdef LOCAL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_LOCAL \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_LOCAL ++#endif ++ ++#ifdef PREFIX_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_PREFIX ++#endif ++ ++#ifdef CROSS_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_CROSS \ ++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#ifdef TOOL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_TOOL \ ++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_TOOL ++#endif ++ ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++#define INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_NATIVE ++#endif ++ ++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) ++# undef INCLUDE_DEFAULTS_MUSL_LOCAL ++# define INCLUDE_DEFAULTS_MUSL_LOCAL ++# undef INCLUDE_DEFAULTS_MUSL_NATIVE ++# define INCLUDE_DEFAULTS_MUSL_NATIVE ++#else ++# undef INCLUDE_DEFAULTS_MUSL_CROSS ++# define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#undef INCLUDE_DEFAULTS ++#define INCLUDE_DEFAULTS \ ++ { \ ++ INCLUDE_DEFAULTS_MUSL_GPP \ ++ INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ INCLUDE_DEFAULTS_MUSL_CROSS \ ++ INCLUDE_DEFAULTS_MUSL_TOOL \ ++ INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ ++ { 0, 0, 0, 0, 0, 0 } \ ++ } ++#endif +Index: b/gcc/config/linux.opt +=================================================================== +--- a/gcc/config/linux.opt ++++ b/gcc/config/linux.opt +@@ -30,3 +30,7 @@ + muclibc + Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) + Use uClibc C library ++ ++mmusl ++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc) ++Use musl C library +Index: b/gcc/config/microblaze/linux.h +=================================================================== +--- a/gcc/config/microblaze/linux.h ++++ b/gcc/config/microblaze/linux.h +@@ -25,7 +25,23 @@ + #undef TLS_NEEDS_GOT + #define TLS_NEEDS_GOT 1 + +-#define DYNAMIC_LINKER "/lib/ld.so.1" ++#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */ ++#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{EL:el}" ++#endif ++ ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1" ++#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" ++ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER ++#else ++#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER ++#endif ++ ++ + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + { "dynamic_linker", DYNAMIC_LINKER } +Index: b/gcc/config/mips/linux64.h +=================================================================== +--- a/gcc/config/mips/linux64.h ++++ b/gcc/config/mips/linux64.h +@@ -29,4 +29,4 @@ + #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" + #define GNU_USER_DYNAMIC_LINKERN32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ +- BIONIC_DYNAMIC_LINKERN32) ++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKER) +Index: b/gcc/config/mips/linux.h +=================================================================== +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -18,3 +18,11 @@ + . */ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" ++ ++#if TARGET_ENDIAN_DEFAULT == 0 /* LE */ ++#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{EL:el}" ++#endif ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" +Index: b/gcc/config/rs6000/linux64.h +=================================================================== +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -374,17 +374,23 @@ + #endif + #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" + #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #elif DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER32 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + + #undef DEFAULT_ASM_ENDIAN + #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) +Index: b/gcc/config/rs6000/secureplt.h +=================================================================== +--- a/gcc/config/rs6000/secureplt.h ++++ b/gcc/config/rs6000/secureplt.h +@@ -18,3 +18,4 @@ + . */ + + #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" ++#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" +Index: b/gcc/config/rs6000/sysv4.h +=================================================================== +--- a/gcc/config/rs6000/sysv4.h ++++ b/gcc/config/rs6000/sysv4.h +@@ -537,6 +537,9 @@ + #ifndef CC1_SECURE_PLT_DEFAULT_SPEC + #define CC1_SECURE_PLT_DEFAULT_SPEC "" + #endif ++#ifndef LINK_SECURE_PLT_DEFAULT_SPEC ++#define LINK_SECURE_PLT_DEFAULT_SPEC "" ++#endif + + /* Pass -G xxx to the compiler. */ + #define CC1_SPEC "%{G*} %(cc1_cpu)" \ +@@ -585,7 +588,8 @@ + + /* Override the default target of the linker. */ + #define LINK_TARGET_SPEC \ +- ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") ++ ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") \ ++ "%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" + + /* Any specific OS flags. */ + #define LINK_OS_SPEC "\ +@@ -763,15 +767,18 @@ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + + #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ +@@ -894,6 +901,7 @@ + { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ + { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ + { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ ++ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ + { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ + { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ + { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ +Index: b/gcc/config/sh/linux.h +=================================================================== +--- a/gcc/config/sh/linux.h ++++ b/gcc/config/sh/linux.h +@@ -43,7 +43,15 @@ + + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack + ++#if TARGET_BIG_ENDIAN_DEFAULT /* BE */ ++#define MUSL_DYNAMIC_LINKER_E "eb" ++#else ++#define MUSL_DYNAMIC_LINKER_E ++#endif ++ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E ".so.1" + + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" +Index: b/gcc/config.gcc +=================================================================== +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -550,7 +550,7 @@ + esac + + # Common C libraries. +-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" ++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" + + # Common parts for widely ported systems. + case ${target} in +@@ -653,6 +653,9 @@ + *-*-*uclibc*) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" + ;; ++ *-*-*musl*) ++ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" ++ ;; + *) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" + ;; +@@ -2135,6 +2138,10 @@ + powerpc*-*-linux*paired*) + tm_file="${tm_file} rs6000/750cl.h" ;; + esac ++ case ${target} in ++ *-linux*-musl*) ++ enable_secureplt=yes ;; ++ esac + if test x${enable_secureplt} = xyes; then + tm_file="rs6000/secureplt.h ${tm_file}" + fi +Index: b/gcc/configure +=================================================================== +--- a/gcc/configure ++++ b/gcc/configure +@@ -26936,6 +26940,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +Index: b/gcc/configure.ac +=================================================================== +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -4848,6 +4852,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +Index: b/gcc/ginclude/stddef.h +=================================================================== +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -181,6 +181,7 @@ + #ifndef _GCC_SIZE_T + #ifndef _SIZET_ + #ifndef __size_t ++#ifndef __DEFINED_size_t /* musl */ + #define __size_t__ /* BeOS */ + #define __SIZE_T__ /* Cray Unicos/Mk */ + #define _SIZE_T +@@ -197,6 +198,7 @@ + #define ___int_size_t_h + #define _GCC_SIZE_T + #define _SIZET_ ++#define __DEFINED_size_t /* musl */ + #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || defined(__FreeBSD_kernel__) + /* __size_t is a typedef on FreeBSD 5, must not trash it. */ +@@ -214,6 +216,7 @@ + typedef long ssize_t; + #endif /* __BEOS__ */ + #endif /* !(defined (__GNUG__) && defined (size_t)) */ ++#endif /* __DEFINED_size_t */ + #endif /* __size_t */ + #endif /* _SIZET_ */ + #endif /* _GCC_SIZE_T */ +Index: b/libgcc/unwind-dw2-fde-dip.c +=================================================================== +--- a/libgcc/unwind-dw2-fde-dip.c ++++ b/libgcc/unwind-dw2-fde-dip.c +@@ -75,6 +75,13 @@ + # define USE_PT_GNU_EH_FRAME + #endif + ++/* For musl libc, TARGET_DL_ITERATE_PHDR gets defined by the configure ++ script. */ ++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ ++ && defined(TARGET_DL_ITERATE_PHDR) ++# define USE_PT_GNU_EH_FRAME ++#endif ++ + #if defined(USE_PT_GNU_EH_FRAME) + + #include +Index: b/libgomp/config/posix/time.c +=================================================================== +--- a/libgomp/config/posix/time.c ++++ b/libgomp/config/posix/time.c +@@ -28,6 +28,8 @@ + The following implementation uses the most simple POSIX routines. + If present, POSIX 4 clocks should be used instead. */ + ++#define _POSIX_C_SOURCE 199309L /* for clocks */ ++ + #include "libgomp.h" + #include + #if TIME_WITH_SYS_TIME +Index: b/libitm/config/arm/hwcap.cc +=================================================================== +--- a/libitm/config/arm/hwcap.cc ++++ b/libitm/config/arm/hwcap.cc +@@ -40,7 +40,11 @@ + + #ifdef __linux__ + #include ++#ifdef __GLIBC__ + #include ++#else ++#include ++#endif + #include + + static void __attribute__((constructor)) +Index: b/libitm/config/linux/x86/tls.h +=================================================================== +--- a/libitm/config/linux/x86/tls.h ++++ b/libitm/config/linux/x86/tls.h +@@ -25,16 +25,19 @@ + #ifndef LIBITM_X86_TLS_H + #define LIBITM_X86_TLS_H 1 + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + /* Use slots in the TCB head rather than __thread lookups. + GLIBC has reserved words 10 through 13 for TM. */ + #define HAVE_ARCH_GTM_THREAD 1 + #define HAVE_ARCH_GTM_THREAD_DISP 1 + #endif ++#endif + + #include "config/generic/tls.h" + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + namespace GTM HIDDEN { + + #ifdef __x86_64__ +@@ -101,5 +104,6 @@ + + } // namespace GTM + #endif /* >= GLIBC 2.10 */ ++#endif + + #endif // LIBITM_X86_TLS_H +Index: b/libstdc++-v3/configure.host +=================================================================== +--- a/libstdc++-v3/configure.host ++++ b/libstdc++-v3/configure.host +@@ -264,6 +264,13 @@ + os_include_dir="os/bsd/freebsd" + ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) ++ # check for musl by target ++ case "${host_os}" in ++ *-musl*) ++ os_include_dir="os/generic" ++ ;; ++ *) ++ + if [ "$uclibc" = "yes" ]; then + os_include_dir="os/uclibc" + elif [ "$bionic" = "yes" ]; then +@@ -272,6 +279,9 @@ + os_include_dir="os/gnu-linux" + fi + ;; ++ ++ esac ++ ;; + hpux*) + os_include_dir="os/hpux" + ;; diff --git a/package/gcc/4.8.5/930-libgcc-disable-split-stack-nothreads.patch b/package/gcc/4.8.5/930-libgcc-disable-split-stack-nothreads.patch new file mode 100644 index 0000000000..7799c1286e --- /dev/null +++ b/package/gcc/4.8.5/930-libgcc-disable-split-stack-nothreads.patch @@ -0,0 +1,14 @@ +disable split-stack for non-thread builds + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-4.8.5.orig/libgcc/config/t-stack gcc-4.8.5/libgcc/config/t-stack +--- gcc-4.8.5.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200 ++++ gcc-4.8.5/libgcc/config/t-stack 2016-03-07 05:28:12.000000000 +0100 +@@ -1,4 +1,6 @@ + # Makefile fragment to provide generic support for -fsplit-stack. + # This should be used in config.host for any host which supports + # -fsplit-stack. ++ifeq ($(enable_threads),yes) + LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c ++endif diff --git a/package/gcc/4.9.3/100-uclibc-conf.patch b/package/gcc/4.9.3/100-uclibc-conf.patch new file mode 100644 index 0000000000..d56bf0a194 --- /dev/null +++ b/package/gcc/4.9.3/100-uclibc-conf.patch @@ -0,0 +1,15 @@ +Index: gcc-4.8.0/contrib/regression/objs-gcc.sh +=================================================================== +--- gcc-4.8.0.orig/contrib/regression/objs-gcc.sh 2009-04-09 17:00:19.000000000 +0200 ++++ gcc-4.8.0/contrib/regression/objs-gcc.sh 2013-03-23 17:39:04.000000000 +0100 +@@ -106,6 +106,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/package/gcc/4.9.3/1000-powerpc-link-with-math-lib.patch.conditional b/package/gcc/4.9.3/1000-powerpc-link-with-math-lib.patch.conditional new file mode 100644 index 0000000000..b7094fe652 --- /dev/null +++ b/package/gcc/4.9.3/1000-powerpc-link-with-math-lib.patch.conditional @@ -0,0 +1,122 @@ +http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html + +On glibc the libc.so carries a copy of the math function copysignl() but +on uClibc math functions like copysignl() live in libm. Since libgcc_s +contains unresolved symbols, any attempt to link against libgcc_s +without explicitely specifying -lm fails, resulting in a broken +bootstrap of the compiler. + +Forward port to gcc 4.5.1 by Gustavo Zacarias + +--- + libgcc/Makefile.in | 4 +++- + libgcc/configure | 32 ++++++++++++++++++++++++++++++++ + libgcc/configure.ac | 21 +++++++++++++++++++++ + 3 files changed, 56 insertions(+), 1 deletion(-) + +Index: gcc-4.8.0/libgcc/Makefile.in +=================================================================== +--- gcc-4.8.0.orig/libgcc/Makefile.in 2013-02-04 20:06:20.000000000 +0100 ++++ gcc-4.8.0/libgcc/Makefile.in 2013-03-24 09:12:43.000000000 +0100 +@@ -41,6 +41,7 @@ + decimal_float = @decimal_float@ + enable_decimal_float = @enable_decimal_float@ + fixed_point = @fixed_point@ ++LIBGCC_LIBM = @LIBGCC_LIBM@ + + host_noncanonical = @host_noncanonical@ + target_noncanonical = @target_noncanonical@ +@@ -927,9 +928,10 @@ + @multilib_dir@,$(MULTIDIR),$(subst \ + @shlib_objs@,$(objects) libgcc.a,$(subst \ + @shlib_base_name@,libgcc_s,$(subst \ ++ @libgcc_libm@,$(LIBGCC_LIBM),$(subst \ + @shlib_map_file@,$(mapfile),$(subst \ + @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \ +- @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))) ++ @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))) + + libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts) + # @multilib_flags@ is still needed because this may use +Index: gcc-4.8.0/libgcc/configure +=================================================================== +--- gcc-4.8.0.orig/libgcc/configure 2012-11-05 00:08:42.000000000 +0100 ++++ gcc-4.8.0/libgcc/configure 2013-03-24 09:12:43.000000000 +0100 +@@ -564,6 +564,7 @@ + tmake_file + sfp_machine_header + set_use_emutls ++LIBGCC_LIBM + set_have_cc_tls + vis_hide + fixed_point +@@ -4481,6 +4482,37 @@ + fi + fi + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++echo "$as_me:$LINENO: checking for library containing copysignl" >&5 ++echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6 ++if test "${libgcc_cv_copysignl_lib+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if { ac_try='${CC-cc} -S conftest.c -o conftest.s 1>&5' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ++fi ++echo "$as_me:$LINENO: result: $libgcc_cv_copysignl_lib" >&5 ++echo "${ECHO_T}$libgcc_cv_copysignl_lib" >&6 ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac + + # Conditionalize the makefile for this target machine. + tmake_file_= +Index: gcc-4.8.0/libgcc/configure.ac +=================================================================== +--- gcc-4.8.0.orig/libgcc/configure.ac 2012-10-15 15:10:30.000000000 +0200 ++++ gcc-4.8.0/libgcc/configure.ac 2013-03-24 09:12:43.000000000 +0100 +@@ -326,6 +326,27 @@ + fi + AC_SUBST(set_have_cc_tls) + ++# On powerpc libgcc_s references copysignl which is a libm function but ++# glibc apparently also provides it via libc as opposed to uClibc where ++# it lives in libm. ++AC_CACHE_CHECK ++ libgcc_cv_copysignl_lib, ++ echo '#include ' > conftest.c ++ echo 'int the_libc = __UCLIBC__ + __powerpc__;' >> conftest.c ++ libgcc_cv_copysignl_lib="-lc" ++ if AC_TRY_COMMAND(${CC-cc} -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD) ++ then ++ libgcc_cv_copysignl_lib="-lm" ++ fi ++ rm -f conftest.* ++ ]) ++ ++case /${libgcc_cv_copysignl_lib}/ in ++ /-lm/) LIBGCC_LIBM="$LIBGCC_LIBM -lm" ;; ++ *) LIBGCC_LIBM= ;; ++esac ++AC_SUBST(LIBGCC_LIBM) ++ + # See if we have emulated thread-local storage. + GCC_CHECK_EMUTLS + set_use_emutls= diff --git a/package/gcc/4.9.3/111-pr65730.patch b/package/gcc/4.9.3/111-pr65730.patch new file mode 100644 index 0000000000..f195e308da --- /dev/null +++ b/package/gcc/4.9.3/111-pr65730.patch @@ -0,0 +1,37 @@ +From b9a7775674d91c7af8043a83211ffeaa576327d7 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 10 Apr 2015 17:46:30 +0300 +Subject: [PATCH] Fix PR target/65730 + +2015-05-20 Max Filippov +gcc/ + * config/xtensa/xtensa.c (init_alignment_context): Replace MULT + by BITS_PER_UNIT with ASHIFT by exact_log2 (BITS_PER_UNIT). + +Signed-off-by: Max Filippov +--- +Backported from: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223452 +Changes to ChangeLog are dropped. + + gcc/config/xtensa/xtensa.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index eb039ba..7296e36 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -1461,8 +1461,9 @@ init_alignment_context (struct alignment_context *ac, rtx mem) + if (ac->shift != NULL_RTX) + { + /* Shift is the byte count, but we need the bitcount. */ +- ac->shift = expand_simple_binop (SImode, MULT, ac->shift, +- GEN_INT (BITS_PER_UNIT), ++ gcc_assert (exact_log2 (BITS_PER_UNIT) >= 0); ++ ac->shift = expand_simple_binop (SImode, ASHIFT, ac->shift, ++ GEN_INT (exact_log2 (BITS_PER_UNIT)), + NULL_RTX, 1, OPTAB_DIRECT); + ac->modemask = expand_simple_binop (SImode, ASHIFT, + GEN_INT (GET_MODE_MASK (mode)), +-- +1.8.1.4 + diff --git a/package/gcc/4.9.3/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch b/package/gcc/4.9.3/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch new file mode 100644 index 0000000000..c11ad35aac --- /dev/null +++ b/package/gcc/4.9.3/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch @@ -0,0 +1,29 @@ +From 9bf6066d588632dab9f78932df15b5b4140f31f3 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Fri, 6 Nov 2015 14:27:23 +0100 +Subject: [PATCH] gcc/config.gcc: fix typo for powerpc e6500 cpu_is_64bit + +Otherwise it is not recognized as a 64-bit powerpc and gcc will not generate +64-bit binaries by default. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gcc/config.gcc | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 4a7cbd2..9cc765e 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -439,7 +439,7 @@ powerpc*-*-*) + cpu_type=rs6000 + extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h" + case x$with_cpu in +- xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500) ++ xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500) + cpu_is_64bit=yes + ;; + esac +-- +2.6.2 + diff --git a/package/gcc/4.9.3/130-pr43538.patch b/package/gcc/4.9.3/130-pr43538.patch new file mode 100644 index 0000000000..19e57bb059 --- /dev/null +++ b/package/gcc/4.9.3/130-pr43538.patch @@ -0,0 +1,25 @@ +From c037df1be41f8daf4d581d7ffa4ec8cfa640bccf Mon Sep 17 00:00:00 2001 +From: glisse +Date: Fri, 25 Apr 2014 08:03:08 +0000 +Subject: [PATCH] 2014-04-25 Marc Glisse + + PR target/43538 + * mt-gnu: Don't reset CXXFLAGS_FOR_TARGET. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209784 138bc75d-0d04-0410-961f-82ee72b054a4 +Signed-off-by: Max Filippov +--- + config/mt-gnu | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config/mt-gnu b/config/mt-gnu +index 15bf417..5c696f5 100644 +--- a/config/mt-gnu ++++ b/config/mt-gnu +@@ -1 +1 @@ +-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) -D_GNU_SOURCE ++CXXFLAGS_FOR_TARGET += -D_GNU_SOURCE +-- +2.1.4 + diff --git a/package/gcc/4.9.3/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch b/package/gcc/4.9.3/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch new file mode 100644 index 0000000000..55f32288f5 --- /dev/null +++ b/package/gcc/4.9.3/140-sanitizer-Fix-build-with-_FILE_OFFSET_BITS-64.patch @@ -0,0 +1,37 @@ +From 3c536954a67a883630f4a7513a27f02a892c3dcb Mon Sep 17 00:00:00 2001 +From: Evgeniy Stepanov +Date: Tue, 21 Oct 2014 21:08:13 +0000 +Subject: [PATCH] [sanitizer] Fix build with _FILE_OFFSET_BITS=64. + +Sanitizer source is not affected by _FILE_OFFSET_BITS in general, +but this one file must be built with 32-bit off_t. More details in the code. + +git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@220328 91177308-0d34-0410-b5e6-96231b3b80d8 +Signed-off-by: Max Filippov +--- + lib/sanitizer_common/sanitizer_platform_limits_posix.cc | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +index bbc1108..fc09522 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -13,7 +13,15 @@ + + #include "sanitizer_platform.h" + #if SANITIZER_LINUX || SANITIZER_MAC ++// Tests in this file assume that off_t-dependent data structures match the ++// libc ABI. For example, struct dirent here is what readdir() function (as ++// exported from libc) returns, and not the user-facing "dirent", which ++// depends on _FILE_OFFSET_BITS setting. ++// To get this "true" dirent definition, we undefine _FILE_OFFSET_BITS below. ++#ifdef _FILE_OFFSET_BITS ++#undef _FILE_OFFSET_BITS ++#endif + + #include "sanitizer_internal_defs.h" + #include "sanitizer_platform_limits_posix.h" + +-- +2.1.4 + diff --git a/package/gcc/4.9.3/301-missing-execinfo_h.patch b/package/gcc/4.9.3/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..00efda24aa --- /dev/null +++ b/package/gcc/4.9.3/301-missing-execinfo_h.patch @@ -0,0 +1,13 @@ +Index: gcc-4.8.0/boehm-gc/include/gc.h +=================================================================== +--- gcc-4.8.0.orig/boehm-gc/include/gc.h 2007-04-23 23:10:09.000000000 +0200 ++++ gcc-4.8.0/boehm-gc/include/gc.h 2013-03-23 17:39:20.000000000 +0100 +@@ -503,7 +503,7 @@ + #if defined(__linux__) || defined(__GLIBC__) + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/package/gcc/4.9.3/810-arm-softfloat-libgcc.patch b/package/gcc/4.9.3/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000000..c8cb377d55 --- /dev/null +++ b/package/gcc/4.9.3/810-arm-softfloat-libgcc.patch @@ -0,0 +1,30 @@ +Index: gcc-4.8.0/gcc/config/arm/linux-elf.h +=================================================================== +--- gcc-4.8.0.orig/gcc/config/arm/linux-elf.h 2013-01-10 21:38:27.000000000 +0100 ++++ gcc-4.8.0/gcc/config/arm/linux-elf.h 2013-03-23 17:40:00.000000000 +0100 +@@ -55,7 +55,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + +Index: gcc-4.8.0/libgcc/config/arm/t-linux +=================================================================== +--- gcc-4.8.0.orig/libgcc/config/arm/t-linux 2012-03-22 16:14:46.000000000 +0100 ++++ gcc-4.8.0/libgcc/config/arm/t-linux 2013-03-23 17:40:54.000000000 +0100 +@@ -1,6 +1,11 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 ++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # Just for these, we omit the frame pointer since it makes such a big + # difference. diff --git a/package/gcc/4.9.3/830-arm_unbreak_armv4t.patch b/package/gcc/4.9.3/830-arm_unbreak_armv4t.patch new file mode 100644 index 0000000000..37f8f2a54d --- /dev/null +++ b/package/gcc/4.9.3/830-arm_unbreak_armv4t.patch @@ -0,0 +1,13 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/package/gcc/4.9.3/840-microblaze-enable-dwarf-eh-support.patch b/package/gcc/4.9.3/840-microblaze-enable-dwarf-eh-support.patch new file mode 100644 index 0000000000..e116e2b24a --- /dev/null +++ b/package/gcc/4.9.3/840-microblaze-enable-dwarf-eh-support.patch @@ -0,0 +1,169 @@ +Fetched from Xilinx gcc git at https://github.com/Xilinx/gcc + +From 23c35173490ac2d6348a668dfc9c1a6eb62171f2 Mon Sep 17 00:00:00 2001 +From: "Edgar E. Iglesias" +Date: Mon, 18 Jun 2012 20:18:13 +0200 +Subject: [PATCH] [Patch, microblaze]: Enable DWARF exception handling support. + +Changelog + +2013-03-18 Edgar E. Iglesias + David Holsgrove + + * common/config/microblaze/microblaze-common.c: Remove + TARGET_EXCEPT_UNWIND_INFO definition. + * config/microblaze/microblaze-protos.h: Add + microblaze_eh_return prototype. + * gcc/config/microblaze/microblaze.c: (microblaze_must_save_register, + microblaze_expand_epilogue, microblaze_return_addr): Handle + calls_eh_return + (microblaze_eh_return): New function. + * gcc/config/microblaze/microblaze.h: Define RETURN_ADDR_OFFSET, + EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM, EH_RETURN_STACKADJ_RTX, + ASM_PREFERRED_EH_DATA_FORMAT + * gcc/config/microblaze/microblaze.md: Define eh_return pattern. + +Signed-off-by: David Holsgrove +Signed-off-by: Edgar E. Iglesias +--- + gcc/common/config/microblaze/microblaze-common.c | 3 --- + gcc/config/microblaze/microblaze-protos.h | 1 + + gcc/config/microblaze/microblaze.c | 29 ++++++++++++++++++++---- + gcc/config/microblaze/microblaze.h | 15 ++++++++++++ + gcc/config/microblaze/microblaze.md | 11 +++++++++ + 5 files changed, 52 insertions(+), 7 deletions(-) + +diff --git a/gcc/common/config/microblaze/microblaze-common.c b/gcc/common/config/microblaze/microblaze-common.c +index 5835acc..85e6a53 100644 +--- a/gcc/common/config/microblaze/microblaze-common.c ++++ b/gcc/common/config/microblaze/microblaze-common.c +@@ -39,7 +39,4 @@ static const struct default_options microblaze_option_optimization_table[] = + #undef TARGET_OPTION_OPTIMIZATION_TABLE + #define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table + +-#undef TARGET_EXCEPT_UNWIND_INFO +-#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info +- + struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; +diff --git a/gcc/config/microblaze/microblaze-protos.h b/gcc/config/microblaze/microblaze-protos.h +index c30ec72..260f4e4 100644 +--- a/gcc/config/microblaze/microblaze-protos.h ++++ b/gcc/config/microblaze/microblaze-protos.h +@@ -56,6 +56,7 @@ extern bool microblaze_tls_referenced_p (rtx); + extern int symbol_mentioned_p (rtx); + extern int label_mentioned_p (rtx); + extern bool microblaze_cannot_force_const_mem (enum machine_mode, rtx); ++extern void microblaze_eh_return (rtx op0); + #endif /* RTX_CODE */ + + /* Declare functions in microblaze-c.c. */ +diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c +index fe61fce..15166d3 100644 +--- a/gcc/config/microblaze/microblaze.c ++++ b/gcc/config/microblaze/microblaze.c +@@ -1999,6 +1999,11 @@ microblaze_must_save_register (int regno) + if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM)) + return 1; + ++ if (crtl->calls_eh_return ++ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) { ++ return 1; ++ } ++ + if (!crtl->is_leaf) + { + if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) +@@ -2026,6 +2031,13 @@ microblaze_must_save_register (int regno) + return 1; + } + ++ if (crtl->calls_eh_return ++ && (regno == EH_RETURN_DATA_REGNO (0) ++ || regno == EH_RETURN_DATA_REGNO (1))) ++ { ++ return 1; ++ } ++ + return 0; + } + +@@ -3131,6 +3143,12 @@ microblaze_expand_epilogue (void) + emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx)); + } + ++ if (crtl->calls_eh_return) ++ emit_insn (gen_addsi3 (stack_pointer_rtx, ++ stack_pointer_rtx, ++ gen_rtx_raw_REG (SImode, ++ MB_EH_STACKADJ_REGNUM))); ++ + emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST + + MB_ABI_SUB_RETURN_ADDR_REGNUM))); + } +@@ -3427,10 +3445,13 @@ microblaze_return_addr (int count, rtx frame ATTRIBUTE_UNUSED) + if (count != 0) + return NULL_RTX; + +- return gen_rtx_PLUS (Pmode, +- get_hard_reg_initial_val (Pmode, +- MB_ABI_SUB_RETURN_ADDR_REGNUM), +- GEN_INT (8)); ++ return get_hard_reg_initial_val (Pmode, ++ MB_ABI_SUB_RETURN_ADDR_REGNUM); ++} ++ ++void microblaze_eh_return (rtx op0) ++{ ++ emit_insn (gen_movsi(gen_rtx_MEM(Pmode, stack_pointer_rtx), op0)); + } + + /* Queue an .ident string in the queue of top-level asm statements. +diff --git a/gcc/config/microblaze/microblaze.h b/gcc/config/microblaze/microblaze.h +index 4072283..5e9f49c 100644 +--- a/gcc/config/microblaze/microblaze.h ++++ b/gcc/config/microblaze/microblaze.h +@@ -184,6 +184,21 @@ extern enum pipeline_type microblaze_pipe; + #define INCOMING_RETURN_ADDR_RTX \ + gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM) + ++/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */ ++#define RETURN_ADDR_OFFSET (8) ++ ++/* Describe how we implement __builtin_eh_return. */ ++#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM) ++ ++#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM ++#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM) ++ ++/* Select a format to encode pointers in exception handling data. CODE ++ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is ++ true if the symbol may be affected by dynamic relocations. */ ++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ ++ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr) ++ + /* Use DWARF 2 debugging information by default. */ + #define DWARF2_DEBUGGING_INFO + #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG +diff --git a/gcc/config/microblaze/microblaze.md b/gcc/config/microblaze/microblaze.md +index ed6131a..dc2405f 100644 +--- a/gcc/config/microblaze/microblaze.md ++++ b/gcc/config/microblaze/microblaze.md +@@ -2327,4 +2327,15 @@ + (set_attr "mode" "SI") + (set_attr "length" "4")]) + ++; This is used in compiling the unwind routines. ++(define_expand "eh_return" ++ [(use (match_operand 0 "general_operand" ""))] ++ "" ++ " ++{ ++ microblaze_eh_return(operands[0]); ++ DONE; ++}") ++ + (include "sync.md") ++ +-- +1.8.3.2 + diff --git a/package/gcc/4.9.3/850-libstdcxx-uclibc-c99.patch b/package/gcc/4.9.3/850-libstdcxx-uclibc-c99.patch new file mode 100644 index 0000000000..d103af1a20 --- /dev/null +++ b/package/gcc/4.9.3/850-libstdcxx-uclibc-c99.patch @@ -0,0 +1,255 @@ +Allow C99-depending features of libstdc++ with uClibc + +The libstdc++ code is fairly restrictive on how it checks for C99 +compatibility: it requires *complete* C99 support to enable certain +features. For example, uClibc provides a good number of C99 features, +but not C99 complex number support. For this reason, libstdc++ +completely disables many the standard C++ methods that can in fact +work because uClibc provides the necessary functions. + +This patch is similar and highly inspired from +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in +a way that doesn't involve changing the configure.ac script, as +autoreconfiguring gcc is complicated. It simply relies on the fact +that uClibc defines the __UCLIBC__ definition. + +Signed-off-by: Thomas Petazzoni +[Gustavo: update for 4.9.3] + +diff -Nura gcc-4.9.3.orig/libstdc++-v3/config/locale/generic/c_locale.h gcc-4.9.3/libstdc++-v3/config/locale/generic/c_locale.h +--- gcc-4.9.3.orig/libstdc++-v3/config/locale/generic/c_locale.h 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/config/locale/generic/c_locale.h 2015-06-27 06:46:04.420022179 -0300 +@@ -70,7 +70,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +diff -Nura gcc-4.9.3.orig/libstdc++-v3/config/locale/gnu/c_locale.h gcc-4.9.3/libstdc++-v3/config/locale/gnu/c_locale.h +--- gcc-4.9.3.orig/libstdc++-v3/config/locale/gnu/c_locale.h 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/config/locale/gnu/c_locale.h 2015-06-27 06:46:04.465023743 -0300 +@@ -88,7 +88,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/bits/basic_string.h gcc-4.9.3/libstdc++-v3/include/bits/basic_string.h +--- gcc-4.9.3.orig/libstdc++-v3/include/bits/basic_string.h 2015-05-28 13:27:46.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/bits/basic_string.h 2015-06-27 06:49:04.741284648 -0300 +@@ -2844,7 +2844,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99) ++#if __cplusplus >= 201103L && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) + + #include + +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/bits/locale_facets_nonio.tcc gcc-4.9.3/libstdc++-v3/include/bits/locale_facets_nonio.tcc +--- gcc-4.9.3.orig/libstdc++-v3/include/bits/locale_facets_nonio.tcc 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/bits/locale_facets_nonio.tcc 2015-06-27 06:46:04.466023777 -0300 +@@ -572,7 +572,7 @@ + { + const locale __loc = __io.getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough. + int __cs_size = 64; + char* __cs = static_cast(__builtin_alloca(__cs_size)); +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/bits/locale_facets.tcc gcc-4.9.3/libstdc++-v3/include/bits/locale_facets.tcc +--- gcc-4.9.3.orig/libstdc++-v3/include/bits/locale_facets.tcc 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/bits/locale_facets.tcc 2015-06-27 06:46:04.466023777 -0300 +@@ -987,7 +987,7 @@ + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough (most probably sufficient + // for non-ios_base::fixed outputs) + int __cs_size = __max_digits * 3; +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_compatibility/math.h gcc-4.9.3/libstdc++-v3/include/c_compatibility/math.h +--- gcc-4.9.3.orig/libstdc++-v3/include/c_compatibility/math.h 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_compatibility/math.h 2015-06-27 06:46:04.466023777 -0300 +@@ -56,7 +56,7 @@ + using std::floor; + using std::fmod; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::fpclassify; + using std::isfinite; + using std::isinf; +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_compatibility/wchar.h gcc-4.9.3/libstdc++-v3/include/c_compatibility/wchar.h +--- gcc-4.9.3.orig/libstdc++-v3/include/c_compatibility/wchar.h 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_compatibility/wchar.h 2015-06-27 06:46:04.466023777 -0300 +@@ -103,7 +103,7 @@ + using std::wmemset; + using std::wcsftime; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_global/cstdio gcc-4.9.3/libstdc++-v3/include/c_global/cstdio +--- gcc-4.9.3.orig/libstdc++-v3/include/c_global/cstdio 2014-01-23 18:17:15.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_global/cstdio 2015-06-27 06:46:04.481024298 -0300 +@@ -146,7 +146,7 @@ + using ::vsprintf; + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_global/cstdlib gcc-4.9.3/libstdc++-v3/include/c_global/cstdlib +--- gcc-4.9.3.orig/libstdc++-v3/include/c_global/cstdlib 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_global/cstdlib 2015-06-27 06:46:04.466023777 -0300 +@@ -182,7 +182,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_global/cwchar gcc-4.9.3/libstdc++-v3/include/c_global/cwchar +--- gcc-4.9.3.orig/libstdc++-v3/include/c_global/cwchar 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_global/cwchar 2015-06-27 06:46:04.466023777 -0300 +@@ -232,7 +232,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +@@ -289,7 +289,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_std/cstdio gcc-4.9.3/libstdc++-v3/include/c_std/cstdio +--- gcc-4.9.3.orig/libstdc++-v3/include/c_std/cstdio 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_std/cstdio 2015-06-27 06:46:04.480024263 -0300 +@@ -144,7 +144,7 @@ + using ::vsprintf; + } // namespace std + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_std/cstdlib gcc-4.9.3/libstdc++-v3/include/c_std/cstdlib +--- gcc-4.9.3.orig/libstdc++-v3/include/c_std/cstdlib 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_std/cstdlib 2015-06-27 06:46:04.480024263 -0300 +@@ -180,7 +180,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/c_std/cwchar gcc-4.9.3/libstdc++-v3/include/c_std/cwchar +--- gcc-4.9.3.orig/libstdc++-v3/include/c_std/cwchar 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/c_std/cwchar 2015-06-27 06:46:04.480024263 -0300 +@@ -228,7 +228,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/ext/vstring.h gcc-4.9.3/libstdc++-v3/include/ext/vstring.h +--- gcc-4.9.3.orig/libstdc++-v3/include/ext/vstring.h 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/ext/vstring.h 2015-06-27 06:46:04.480024263 -0300 +@@ -2680,7 +2680,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99)) ++#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))) + + #include + +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/tr1/cstdio gcc-4.9.3/libstdc++-v3/include/tr1/cstdio +--- gcc-4.9.3.orig/libstdc++-v3/include/tr1/cstdio 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/tr1/cstdio 2015-06-27 06:46:04.480024263 -0300 +@@ -33,7 +33,7 @@ + + #include + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/tr1/cstdlib gcc-4.9.3/libstdc++-v3/include/tr1/cstdlib +--- gcc-4.9.3.orig/libstdc++-v3/include/tr1/cstdlib 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/tr1/cstdlib 2015-06-27 06:46:04.480024263 -0300 +@@ -35,7 +35,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/tr1/cwchar gcc-4.9.3/libstdc++-v3/include/tr1/cwchar +--- gcc-4.9.3.orig/libstdc++-v3/include/tr1/cwchar 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/tr1/cwchar 2015-06-27 06:46:04.480024263 -0300 +@@ -52,7 +52,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +diff -Nura gcc-4.9.3.orig/libstdc++-v3/include/tr1/stdlib.h gcc-4.9.3/libstdc++-v3/include/tr1/stdlib.h +--- gcc-4.9.3.orig/libstdc++-v3/include/tr1/stdlib.h 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/include/tr1/stdlib.h 2015-06-27 06:46:04.481024298 -0300 +@@ -33,7 +33,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + using std::tr1::atoll; + using std::tr1::strtoll; +diff -Nura gcc-4.9.3.orig/libstdc++-v3/src/c++11/debug.cc gcc-4.9.3/libstdc++-v3/src/c++11/debug.cc +--- gcc-4.9.3.orig/libstdc++-v3/src/c++11/debug.cc 2014-01-02 19:30:10.000000000 -0300 ++++ gcc-4.9.3/libstdc++-v3/src/c++11/debug.cc 2015-06-27 06:46:04.481024298 -0300 +@@ -788,7 +788,7 @@ + int __n __attribute__ ((__unused__)), + const char* __fmt, _Tp __s) const throw () + { +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + std::snprintf(__buf, __n, __fmt, __s); + #else + std::sprintf(__buf, __fmt, __s); diff --git a/package/gcc/4.9.3/860-cilk-wchar.patch b/package/gcc/4.9.3/860-cilk-wchar.patch new file mode 100644 index 0000000000..1837405151 --- /dev/null +++ b/package/gcc/4.9.3/860-cilk-wchar.patch @@ -0,0 +1,56 @@ +[PATCH] cilk: fix build without wchar + +When building against uClibc with wchar support disabled, WCHAR_MIN and +WCHAR_MAX are not defined leading to compilation errors. + +Fix it by only including the wchar code if available. + +Signed-off-by: Peter Korsgaard +--- + libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +Index: host-gcc-final-4.9.2/libcilkrts/include/cilk/reducer_min_max.h +=================================================================== +--- host-gcc-final-4.9.2.orig/libcilkrts/include/cilk/reducer_min_max.h ++++ host-gcc-final-4.9.2/libcilkrts/include/cilk/reducer_min_max.h +@@ -3154,7 +3154,9 @@ + CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN) + CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0) + CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN) ++#ifdef WCHAR_MIN + CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) ++#endif + CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN) + CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0) + CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN) +@@ -3306,7 +3308,9 @@ + CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN) ++#ifdef WCHAR_MIN + CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) ++#endif + CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN) +@@ -3432,7 +3436,9 @@ + CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX) + CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX) + CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX) ++#ifdef WCHAR_MAX + CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) ++#endif + CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX) + CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX) + CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX) +@@ -3584,7 +3590,9 @@ + CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX) ++#ifdef WCHAR_MAX + CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) ++#endif + CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX) diff --git a/package/gcc/4.9.3/870-xtensa-add-mauto-litpools-option.patch b/package/gcc/4.9.3/870-xtensa-add-mauto-litpools-option.patch new file mode 100644 index 0000000000..aa1376c44c --- /dev/null +++ b/package/gcc/4.9.3/870-xtensa-add-mauto-litpools-option.patch @@ -0,0 +1,290 @@ +From 6d852ffb43b111a39162135c95249e749c4e285b Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 6 Aug 2015 01:16:02 +0300 +Subject: [PATCH] xtensa: add -mauto-litpools option + +With support from assembler this option allows compiling huge functions, +where single literal pool at the beginning of a function may not be +reachable by L32R instructions at its end. + +Currently assembler --auto-litpools option cannot deal with literals +used from multiple locations separated by more than 256 KBytes of code. +Don't turn constants into literals, instead use MOVI instruction to load +them into registers and let the assembler turn them into literals as +necessary. + +2015-08-12 Max Filippov +gcc/ + * config/xtensa/constraints.md (define_constraint "Y"): New + constraint. + * config/xtensa/elf.h (ASM_SPEC): Add m(no-)auto-litpools. + * config/xtensa/linux.h (ASM_SPEC): Likewise. + * config/xtensa/predicates.md (move_operand): Match constants + and symbols in the presence of TARGET_AUTO_LITPOOLS. + * config/xtensa/xtensa.c (xtensa_valid_move): Don't allow + immediate references to TLS data. + (xtensa_emit_move_sequence): Don't force constants to memory in + the presence of TARGET_AUTO_LITPOOLS. + (print_operand): Add 'y' format, same as default, but capable of + printing SF mode constants as well. + * config/xtensa/xtensa.md (movsi_internal, movhi_internal) + (movsf_internal): Add movi pattern that loads literal. + (movsf, movdf): Don't force constants to memory in the presence + of TARGET_AUTO_LITPOOLS. + (movdf_internal): Add 'Y' constraint. + * config/xtensa/xtensa.opt (mauto-litpools): New option. + +Signed-off-by: Max Filippov +--- +Backported from: r226828 +Changes to ChangeLogs and documentation are dropped. + + gcc/config/xtensa/constraints.md | 5 +++++ + gcc/config/xtensa/elf.h | 4 +++- + gcc/config/xtensa/linux.h | 4 +++- + gcc/config/xtensa/predicates.md | 3 ++- + gcc/config/xtensa/xtensa.c | 19 ++++++++++++++++++- + gcc/config/xtensa/xtensa.md | 35 +++++++++++++++++++---------------- + gcc/config/xtensa/xtensa.opt | 4 ++++ + 7 files changed, 54 insertions(+), 20 deletions(-) + +diff --git a/gcc/config/xtensa/constraints.md b/gcc/config/xtensa/constraints.md +index 30f4c1f..773d4f9 100644 +--- a/gcc/config/xtensa/constraints.md ++++ b/gcc/config/xtensa/constraints.md +@@ -111,6 +111,11 @@ + (and (match_code "const_int") + (match_test "xtensa_mask_immediate (ival)"))) + ++(define_constraint "Y" ++ "A constant that can be used in relaxed MOVI instructions." ++ (and (match_code "const_int,const_double,const,symbol_ref,label_ref") ++ (match_test "TARGET_AUTO_LITPOOLS"))) ++ + ;; Memory constraints. Do not use define_memory_constraint here. Doing so + ;; causes reload to force some constants into the constant pool, but since + ;; the Xtensa constant pool can only be accessed with L32R instructions, it +diff --git a/gcc/config/xtensa/elf.h b/gcc/config/xtensa/elf.h +index e59bede..12056f7 100644 +--- a/gcc/config/xtensa/elf.h ++++ b/gcc/config/xtensa/elf.h +@@ -48,7 +48,9 @@ along with GCC; see the file COPYING3. If not see + %{mtarget-align:--target-align} \ + %{mno-target-align:--no-target-align} \ + %{mlongcalls:--longcalls} \ +- %{mno-longcalls:--no-longcalls}" ++ %{mno-longcalls:--no-longcalls} \ ++ %{mauto-litpools:--auto-litpools} \ ++ %{mno-auto-litpools:--no-auto-litpools}" + + #undef LIB_SPEC + #define LIB_SPEC "-lc -lsim -lc -lhandlers-sim -lhal" +diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h +index 675aacf..5b0243a 100644 +--- a/gcc/config/xtensa/linux.h ++++ b/gcc/config/xtensa/linux.h +@@ -42,7 +42,9 @@ along with GCC; see the file COPYING3. If not see + %{mtarget-align:--target-align} \ + %{mno-target-align:--no-target-align} \ + %{mlongcalls:--longcalls} \ +- %{mno-longcalls:--no-longcalls}" ++ %{mno-longcalls:--no-longcalls} \ ++ %{mauto-litpools:--auto-litpools} \ ++ %{mno-auto-litpools:--no-auto-litpools}" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + +diff --git a/gcc/config/xtensa/predicates.md b/gcc/config/xtensa/predicates.md +index e02209e..d7dfa11 100644 +--- a/gcc/config/xtensa/predicates.md ++++ b/gcc/config/xtensa/predicates.md +@@ -142,7 +142,8 @@ + (match_test "GET_MODE_CLASS (mode) == MODE_INT + && xtensa_simm12b (INTVAL (op))")) + (and (match_code "const_int,const_double,const,symbol_ref,label_ref") +- (match_test "TARGET_CONST16 && CONSTANT_P (op) ++ (match_test "(TARGET_CONST16 || TARGET_AUTO_LITPOOLS) ++ && CONSTANT_P (op) + && GET_MODE_SIZE (mode) % UNITS_PER_WORD == 0"))))) + + ;; Accept the floating point constant 1 in the appropriate mode. +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index eb039ba..206ff80 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -501,6 +501,9 @@ xtensa_valid_move (machine_mode mode, rtx *operands) + { + int dst_regnum = xt_true_regnum (operands[0]); + ++ if (xtensa_tls_referenced_p (operands[1])) ++ return FALSE; ++ + /* The stack pointer can only be assigned with a MOVSP opcode. */ + if (dst_regnum == STACK_POINTER_REGNUM) + return !TARGET_WINDOWED_ABI +@@ -1069,7 +1072,7 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode) + return 1; + } + +- if (! TARGET_CONST16) ++ if (! TARGET_AUTO_LITPOOLS && ! TARGET_CONST16) + { + src = force_const_mem (SImode, src); + operands[1] = src; +@@ -2449,6 +2452,20 @@ print_operand (FILE *file, rtx x, int letter) + } + break; + ++ case 'y': ++ if (GET_CODE (x) == CONST_DOUBLE && ++ GET_MODE (x) == SFmode) ++ { ++ REAL_VALUE_TYPE r; ++ long l; ++ REAL_VALUE_FROM_CONST_DOUBLE (r, x); ++ REAL_VALUE_TO_TARGET_SINGLE (r, l); ++ fprintf (file, "0x%08lx", l); ++ break; ++ } ++ ++ /* fall through */ ++ + default: + if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG) + fprintf (file, "%s", reg_names[xt_true_regnum (x)]); +diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md +index 6d84384..0e673a3 100644 +--- a/gcc/config/xtensa/xtensa.md ++++ b/gcc/config/xtensa/xtensa.md +@@ -761,8 +761,8 @@ + }) + + (define_insn "movsi_internal" +- [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,W,a,a,U,*a,*A") +- (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,i,T,U,r,*A,*r"))] ++ [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,a,W,a,a,U,*a,*A") ++ (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,Y,i,T,U,r,*A,*r"))] + "xtensa_valid_move (SImode, operands)" + "@ + movi.n\t%0, %x1 +@@ -774,15 +774,16 @@ + mov\t%0, %1 + movsp\t%0, %1 + movi\t%0, %x1 ++ movi\t%0, %1 + const16\t%0, %t1\;const16\t%0, %b1 + %v1l32r\t%0, %1 + %v1l32i\t%0, %1 + %v0s32i\t%1, %0 + rsr\t%0, ACCLO + wsr\t%1, ACCLO" +- [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,load,load,store,rsr,wsr") ++ [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,move,load,load,store,rsr,wsr") + (set_attr "mode" "SI") +- (set_attr "length" "2,2,2,2,2,2,3,3,3,6,3,3,3,3,3")]) ++ (set_attr "length" "2,2,2,2,2,2,3,3,3,3,6,3,3,3,3,3")]) + + ;; 16-bit Integer moves + +@@ -796,21 +797,22 @@ + }) + + (define_insn "movhi_internal" +- [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,U,*a,*A") +- (match_operand:HI 1 "move_operand" "M,d,r,I,U,r,*A,*r"))] ++ [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,a,U,*a,*A") ++ (match_operand:HI 1 "move_operand" "M,d,r,I,Y,U,r,*A,*r"))] + "xtensa_valid_move (HImode, operands)" + "@ + movi.n\t%0, %x1 + mov.n\t%0, %1 + mov\t%0, %1 + movi\t%0, %x1 ++ movi\t%0, %1 + %v1l16ui\t%0, %1 + %v0s16i\t%1, %0 + rsr\t%0, ACCLO + wsr\t%1, ACCLO" +- [(set_attr "type" "move,move,move,move,load,store,rsr,wsr") ++ [(set_attr "type" "move,move,move,move,move,load,store,rsr,wsr") + (set_attr "mode" "HI") +- (set_attr "length" "2,2,3,3,3,3,3,3")]) ++ (set_attr "length" "2,2,3,3,3,3,3,3,3")]) + + ;; 8-bit Integer moves + +@@ -881,7 +883,7 @@ + (match_operand:SF 1 "general_operand" ""))] + "" + { +- if (!TARGET_CONST16 && CONSTANT_P (operands[1])) ++ if (!TARGET_CONST16 && !TARGET_AUTO_LITPOOLS && CONSTANT_P (operands[1])) + operands[1] = force_const_mem (SFmode, operands[1]); + + if ((!register_operand (operands[0], SFmode) +@@ -896,8 +898,8 @@ + }) + + (define_insn "movsf_internal" +- [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,W,a,a,U") +- (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,iF,T,U,r"))] ++ [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,a,W,a,a,U") ++ (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,Y,iF,T,U,r"))] + "((register_operand (operands[0], SFmode) + || register_operand (operands[1], SFmode)) + && !(FP_REG_P (xt_true_regnum (operands[0])) +@@ -912,13 +914,14 @@ + mov\t%0, %1 + wfr\t%0, %1 + rfr\t%0, %1 ++ movi\t%0, %y1 + const16\t%0, %t1\;const16\t%0, %b1 + %v1l32r\t%0, %1 + %v1l32i\t%0, %1 + %v0s32i\t%1, %0" +- [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,load,load,store") ++ [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,move,load,load,store") + (set_attr "mode" "SF") +- (set_attr "length" "3,3,3,2,2,2,3,3,3,6,3,3,3")]) ++ (set_attr "length" "3,3,3,2,2,2,3,3,3,3,6,3,3,3")]) + + (define_insn "*lsiu" + [(set (match_operand:SF 0 "register_operand" "=f") +@@ -991,7 +994,7 @@ + (match_operand:DF 1 "general_operand" ""))] + "" + { +- if (CONSTANT_P (operands[1]) && !TARGET_CONST16) ++ if (CONSTANT_P (operands[1]) && !TARGET_CONST16 && !TARGET_AUTO_LITPOOLS) + operands[1] = force_const_mem (DFmode, operands[1]); + + if (!register_operand (operands[0], DFmode) +@@ -1002,8 +1005,8 @@ + }) + + (define_insn_and_split "movdf_internal" +- [(set (match_operand:DF 0 "nonimmed_operand" "=a,W,a,a,U") +- (match_operand:DF 1 "move_operand" "r,iF,T,U,r"))] ++ [(set (match_operand:DF 0 "nonimmed_operand" "=a,a,W,a,a,U") ++ (match_operand:DF 1 "move_operand" "r,Y,iF,T,U,r"))] + "register_operand (operands[0], DFmode) + || register_operand (operands[1], DFmode)" + "#" +diff --git a/gcc/config/xtensa/xtensa.opt b/gcc/config/xtensa/xtensa.opt +index 2fd6cee..21c6e96 100644 +--- a/gcc/config/xtensa/xtensa.opt ++++ b/gcc/config/xtensa/xtensa.opt +@@ -38,6 +38,10 @@ mtext-section-literals + Target + Intersperse literal pools with code in the text section + ++mauto-litpools ++Target Report Mask(AUTO_LITPOOLS) ++Relax literals in assembler and place them automatically in the text section ++ + mserialize-volatile + Target Report Mask(SERIALIZE_VOLATILE) + -mno-serialize-volatile Do not serialize volatile memory references with MEMW instructions +-- +1.8.1.4 + diff --git a/package/gcc/4.9.3/871-xtensa-reimplement-register-spilling.patch b/package/gcc/4.9.3/871-xtensa-reimplement-register-spilling.patch new file mode 100644 index 0000000000..abc7a08e8d --- /dev/null +++ b/package/gcc/4.9.3/871-xtensa-reimplement-register-spilling.patch @@ -0,0 +1,76 @@ +From 05154174b369505238b759cf80d595d8cfc8c731 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Mon, 10 Aug 2015 21:35:20 +0300 +Subject: [PATCH 1/3] xtensa: reimplement register spilling + +Spilling windowed registers in userspace is much easier, more portable, +less error-prone and equally effective as in kernel. Now that register +spilling syscall is considered obsolete in the xtensa linux kernel +replace it with CALL12 followed by series of ENTRY in libgcc. + +2015-08-18 Max Filippov +libgcc/ + * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use + CALL12 followed by series of ENTRY to spill windowed registers. + (__xtensa_nonlocal_goto): Call __xtensa_libgcc_window_spill + instead of making linux spill syscall. + +Signed-off-by: Max Filippov +--- +Backported from: r226962 + + libgcc/config/xtensa/lib2funcs.S | 30 +++++++++++++++++++++++------- + 1 file changed, 23 insertions(+), 7 deletions(-) + +diff --git a/libgcc/config/xtensa/lib2funcs.S b/libgcc/config/xtensa/lib2funcs.S +index 3ac8c1d..2e678af 100644 +--- a/libgcc/config/xtensa/lib2funcs.S ++++ b/libgcc/config/xtensa/lib2funcs.S +@@ -33,10 +33,29 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + .global __xtensa_libgcc_window_spill + .type __xtensa_libgcc_window_spill,@function + __xtensa_libgcc_window_spill: +- entry sp, 32 +- movi a2, 0 +- syscall ++ entry sp, 48 ++#if XCHAL_NUM_AREGS > 16 ++ call12 1f ++ retw ++ .align 4 ++1: ++ .rept (XCHAL_NUM_AREGS - 24) / 12 ++ _entry sp, 48 ++ mov a12, a0 ++ .endr ++ _entry sp, 16 ++#if XCHAL_NUM_AREGS % 12 == 0 ++ mov a4, a4 ++#elif XCHAL_NUM_AREGS % 12 == 4 ++ mov a8, a8 ++#elif XCHAL_NUM_AREGS % 12 == 8 ++ mov a12, a12 ++#endif ++ retw ++#else ++ mov a8, a8 + retw ++#endif + .size __xtensa_libgcc_window_spill, .-__xtensa_libgcc_window_spill + + +@@ -58,10 +77,7 @@ __xtensa_nonlocal_goto: + entry sp, 32 + + /* Flush registers. */ +- mov a5, a2 +- movi a2, 0 +- syscall +- mov a2, a5 ++ call8 __xtensa_libgcc_window_spill + + /* Because the save area for a0-a3 is stored one frame below + the one identified by a2, the only way to restore those +-- +1.8.1.4 + diff --git a/package/gcc/4.9.3/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/package/gcc/4.9.3/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch new file mode 100644 index 0000000000..f23a5c0737 --- /dev/null +++ b/package/gcc/4.9.3/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch @@ -0,0 +1,33 @@ +From f66206679a0ad604f13673559f230160cd3d1189 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 14 Aug 2015 02:45:02 +0300 +Subject: [PATCH 2/3] xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde + +This allows having exception cleanup code in binaries that don't +register their unwind tables. + +2015-08-18 Max Filippov +libgcc/ + * config/xtensa/t-xtensa (LIB2ADDEH): Replace unwind-dw2-fde + with unwind-dw2-fde-dip. + +Signed-off-by: Max Filippov +--- +Backported from: r226963 + + libgcc/config/xtensa/t-xtensa | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/xtensa/t-xtensa b/libgcc/config/xtensa/t-xtensa +index 27399e6..66d0eb3 100644 +--- a/libgcc/config/xtensa/t-xtensa ++++ b/libgcc/config/xtensa/t-xtensa +@@ -13,4 +13,4 @@ LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 _udivsi3 _umodsi3 \ + LIB2ADD = $(srcdir)/config/xtensa/lib2funcs.S + + LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \ +- $(srcdir)/unwind-dw2-fde.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c ++ $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c +-- +1.8.1.4 + diff --git a/package/gcc/4.9.3/873-xtensa-fix-_Unwind_GetCFA.patch b/package/gcc/4.9.3/873-xtensa-fix-_Unwind_GetCFA.patch new file mode 100644 index 0000000000..dc405132cc --- /dev/null +++ b/package/gcc/4.9.3/873-xtensa-fix-_Unwind_GetCFA.patch @@ -0,0 +1,40 @@ +From 15c7c4d39b317f0d902ef28fd43eca5c3369f891 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 15 Aug 2015 05:12:11 +0300 +Subject: [PATCH 3/3] xtensa: fix _Unwind_GetCFA + +Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame +higher than what was actually used by code at context->ra. This results +in invalid CFA value in signal frames and premature unwinding completion +in forced unwinding used by uClibc NPTL thread cancellation. +Returning context->sp from _Unwind_GetCFA makes all CFA values valid and +matching code that used them. + +2015-08-18 Max Filippov +libgcc/ + * config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return + context->sp instead of context->cfa. + +Signed-off-by: Max Filippov +--- +Backported from: r226964 + + libgcc/config/xtensa/unwind-dw2-xtensa.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/xtensa/unwind-dw2-xtensa.c b/libgcc/config/xtensa/unwind-dw2-xtensa.c +index 35f7797..ef6b900 100644 +--- a/libgcc/config/xtensa/unwind-dw2-xtensa.c ++++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c +@@ -130,7 +130,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index) + _Unwind_Word + _Unwind_GetCFA (struct _Unwind_Context *context) + { +- return (_Unwind_Ptr) context->cfa; ++ return (_Unwind_Ptr) context->sp; + } + + /* Overwrite the saved value for register INDEX in CONTEXT with VAL. */ +-- +1.8.1.4 + diff --git a/package/gcc/4.9.3/874-xtensa-add-uclinux-support.patch b/package/gcc/4.9.3/874-xtensa-add-uclinux-support.patch new file mode 100644 index 0000000000..23db3d863c --- /dev/null +++ b/package/gcc/4.9.3/874-xtensa-add-uclinux-support.patch @@ -0,0 +1,174 @@ +From 70c2cb98fb129b4766b5da0f945dc41fd568c77a Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 22 Aug 2015 08:44:26 +0300 +Subject: [PATCH] xtensa: add uclinux support + +2015-10-03 Max Filippov +gcc/ + * config.gcc (xtensa*-*-uclinux*): New configuration. + * config/xtensa/uclinux.h: New file. + * config/xtensa/uclinux.opt: New file. + +libgcc/ + * config.host (xtensa*-*-uclinux*): New configuration. + +Signed-off-by: Max Filippov +--- +Backported from: r228450 + + gcc/config.gcc | 5 ++++ + gcc/config/xtensa/uclinux.h | 69 +++++++++++++++++++++++++++++++++++++++++++ + gcc/config/xtensa/uclinux.opt | 32 ++++++++++++++++++++ + libgcc/config.host | 5 ++++ + 4 files changed, 111 insertions(+) + create mode 100644 gcc/config/xtensa/uclinux.h + create mode 100644 gcc/config/xtensa/uclinux.opt + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index c52f5a8..56797bd 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2995,6 +2995,11 @@ xtensa*-*-linux*) + tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h" + tmake_file="${tmake_file} xtensa/t-xtensa" + ;; ++xtensa*-*-uclinux*) ++ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h" ++ tmake_file="${tmake_file} xtensa/t-xtensa" ++ extra_options="${extra_options} xtensa/uclinux.opt" ++ ;; + am33_2.0-*-linux*) + tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h" + gas=yes gnu_ld=yes +diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h +new file mode 100644 +index 0000000..4606020 +--- /dev/null ++++ b/gcc/config/xtensa/uclinux.h +@@ -0,0 +1,69 @@ ++/* Xtensa uClinux configuration. ++ Derived from the configuration for GCC for Intel i386 running Linux. ++ Copyright (C) 2001-2015 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC is free software; you can redistribute it and/or modify it under ++the terms of the GNU General Public License as published by the Free ++Software Foundation; either version 3, or (at your option) any later ++version. ++ ++GCC 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 GCC; see the file COPYING3. If not see ++. */ ++ ++#undef TARGET_OS_CPP_BUILTINS ++#define TARGET_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ GNU_USER_TARGET_OS_CPP_BUILTINS (); \ ++ builtin_define ("__uClinux__"); \ ++ } \ ++ while (0) ++ ++#undef SUBTARGET_CPP_SPEC ++#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" ++ ++#undef SIZE_TYPE ++#define SIZE_TYPE "unsigned int" ++ ++#undef PTRDIFF_TYPE ++#define PTRDIFF_TYPE "int" ++ ++#undef WCHAR_TYPE ++#define WCHAR_TYPE "long int" ++ ++#undef WCHAR_TYPE_SIZE ++#define WCHAR_TYPE_SIZE 32 ++ ++#undef ASM_SPEC ++#define ASM_SPEC \ ++ "%{mtext-section-literals:--text-section-literals} \ ++ %{mno-text-section-literals:--no-text-section-literals} \ ++ %{mtarget-align:--target-align} \ ++ %{mno-target-align:--no-target-align} \ ++ %{mlongcalls:--longcalls} \ ++ %{mno-longcalls:--no-longcalls} \ ++ %{mauto-litpools:--auto-litpools} \ ++ %{mno-auto-litpools:--no-auto-litpools}" ++ ++#undef LINK_SPEC ++#define LINK_SPEC "%{!no-elf2flt:%{!elf2flt*:-elf2flt}}" ++ ++#undef LOCAL_LABEL_PREFIX ++#define LOCAL_LABEL_PREFIX "." ++ ++/* Always enable "-fpic" for Xtensa Linux. */ ++#define XTENSA_ALWAYS_PIC 1 ++ ++#undef TARGET_LIBC_HAS_FUNCTION ++#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function ++ ++#undef DBX_REGISTER_NUMBER ++ +diff --git a/gcc/config/xtensa/uclinux.opt b/gcc/config/xtensa/uclinux.opt +new file mode 100644 +index 0000000..95ef777 +--- /dev/null ++++ b/gcc/config/xtensa/uclinux.opt +@@ -0,0 +1,32 @@ ++; Xtensa uClinux options. ++ ++; Copyright (C) 2015 Free Software Foundation, Inc. ++; ++; This file is part of GCC. ++; ++; GCC is free software; you can redistribute it and/or modify it under ++; the terms of the GNU General Public License as published by the Free ++; Software Foundation; either version 3, or (at your option) any later ++; version. ++; ++; GCC 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 GCC; see the file COPYING3. If not see ++; . ++ ++; See the GCC internals manual (options.texi) for a description of ++; this file's format. ++ ++; Please try to keep this file in ASCII collating order. ++ ++elf2flt ++Driver ++ ++elf2flt= ++Driver JoinedOrMissing ++ ++; This comment is to ensure we retain the blank line above. +diff --git a/libgcc/config.host b/libgcc/config.host +index 2c64756..2ee92c1 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -1295,6 +1295,11 @@ xtensa*-*-linux*) + tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc" + md_unwind_header=xtensa/linux-unwind.h + ;; ++xtensa*-*-uclinux*) ++ tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc" ++ md_unwind_header=xtensa/linux-unwind.h ++ extra_parts="$extra_parts crtbeginS.o crtbeginT.o crtendS.o" ++ ;; + am33_2.0-*-linux*) + # Don't need crtbeginT.o from *-*-linux* default. + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" +-- +1.8.1.4 + diff --git a/package/gcc/4.9.3/880-nios2_legitimize_address.patch b/package/gcc/4.9.3/880-nios2_legitimize_address.patch new file mode 100644 index 0000000000..4623f295a7 --- /dev/null +++ b/package/gcc/4.9.3/880-nios2_legitimize_address.patch @@ -0,0 +1,49 @@ +From b0ea54f3f995754881e0ea6651133aa7b58eeaa2 Mon Sep 17 00:00:00 2001 +From: cltang +Date: Tue, 22 Sep 2015 12:23:20 +0000 +Subject: [PATCH] nios2_legitimize_address 2015-09-22 Chung-Lin Tang + + + Backport from mainline + 2015-09-22 Chung-Lin Tang + + * config/nios2/nios2.c (nios2_legitimize_address): When handling + 'reg + reloc' cases, allow first operand to be non-REG, and use + force_reg() to enforce address pattern. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@228013 138bc75d-0d04-0410-961f-82ee72b054a4 + +Fixes: +http://autobuild.buildroot.net/results/901/90186d1fe134b804c0101554296b1235dc0ccbb0 + +[backported to 4.9.3] +Signed-off-by: Romain Naour +--- + gcc/config/nios2/nios2.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c +index 047b615..41dd6f9 100644 +--- a/gcc/config/nios2/nios2.c ++++ b/gcc/config/nios2/nios2.c +@@ -1786,15 +1786,15 @@ nios2_legitimize_address (rtx x, rtx oldx ATTRIBUTE_UNUSED, + + Which will be output as '%tls_le(var+48)(r23)' in assembly. */ + if (GET_CODE (x) == PLUS +- && GET_CODE (XEXP (x, 0)) == REG + && GET_CODE (XEXP (x, 1)) == CONST) + { +- rtx unspec, offset, reg = XEXP (x, 0); ++ rtx unspec, offset; + split_const (XEXP (x, 1), &unspec, &offset); + if (GET_CODE (unspec) == UNSPEC + && !nios2_large_offset_p (XINT (unspec, 1)) + && offset != const0_rtx) + { ++ rtx reg = force_reg (Pmode, XEXP (x, 0)); + unspec = copy_rtx (unspec); + XVECEXP (unspec, 0, 0) + = plus_constant (Pmode, XVECEXP (unspec, 0, 0), INTVAL (offset)); +-- +2.5.0 + diff --git a/package/gcc/4.9.3/890-fix-m68k-compile.patch b/package/gcc/4.9.3/890-fix-m68k-compile.patch new file mode 100644 index 0000000000..140977b3cd --- /dev/null +++ b/package/gcc/4.9.3/890-fix-m68k-compile.patch @@ -0,0 +1,15 @@ +remove unused header, which breaks the toolchain building + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-4.9.3.orig/libgcc/config/m68k/linux-atomic.c gcc-4.9.3/libgcc/config/m68k/linux-atomic.c +--- gcc-4.9.3.orig/libgcc/config/m68k/linux-atomic.c 2014-01-02 23:25:22.000000000 +0100 ++++ gcc-4.9.3/libgcc/config/m68k/linux-atomic.c 2016-03-18 22:24:40.000000000 +0100 +@@ -33,7 +33,6 @@ + using the kernel helper defined below. There is no support for + 64-bit operations yet. */ + +-#include + #include + + #ifndef __NR_atomic_cmpxchg_32 diff --git a/package/gcc/4.9.3/891-fix-m68k-uclinux.patch b/package/gcc/4.9.3/891-fix-m68k-uclinux.patch new file mode 100644 index 0000000000..4347642d67 --- /dev/null +++ b/package/gcc/4.9.3/891-fix-m68k-uclinux.patch @@ -0,0 +1,18 @@ +avoids internal compiler error while compiling linux-atomic.c +See here: +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833 + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-4.9.3.orig/libgcc/config.host gcc-4.9.3/libgcc/config.host +--- gcc-4.9.3.orig/libgcc/config.host 2014-03-27 16:40:31.000000000 +0100 ++++ gcc-4.9.3/libgcc/config.host 2016-04-05 16:20:53.422809885 +0200 +@@ -750,7 +750,7 @@ + m68k*-*-openbsd*) + ;; + m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc +- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux" ++ tmake_file="$tmake_file m68k/t-floatlib" + md_unwind_header=m68k/linux-unwind.h + ;; + m68k-*-linux*) # Motorola m68k's running GNU/Linux diff --git a/package/gcc/4.9.3/900-musl-support.patch b/package/gcc/4.9.3/900-musl-support.patch new file mode 100644 index 0000000000..90f64de916 --- /dev/null +++ b/package/gcc/4.9.3/900-musl-support.patch @@ -0,0 +1,640 @@ +Add musl support to gcc + +This patch comes from the musl-cross project at +https://bitbucket.org/GregorR/musl-cross/src. Compared to the upstream version: + + * the config.sub modifications have been removed, because Buildroot + already overwrites all config.sub with a more recent config.sub + that has musl support. + + * change to ensure that a dummy dynamic linker path + MUSL_DYNAMIC_LINKER is defined for all architectures, + otherwise building gcc for architectures not supported by musl was + causing build failure. Bug reported upstream at + https://bitbucket.org/GregorR/musl-gcc-patches/issue/4/musl-gcc-patches-break-the-build-on. + + * change the USE_PT_GNU_EH_FRAME logic to keep the existing gcc logic + and only add the musl one as an addition, not as a replacement. Not + doing this breaks C++ exception handling with glibc, because + USE_PT_GNU_EH_FRAME doesn't get defined due to the configure script + not testing dl_iterate_phdr() on any system except Solaris. + +[Gustavo: remove upstream applied gcc/config/sh/sh.c chunk for 4.9.1] +Signed-off-by: Thomas Petazzoni +--- + +Index: b/fixincludes/mkfixinc.sh +=================================================================== +--- a/fixincludes/mkfixinc.sh ++++ b/fixincludes/mkfixinc.sh +@@ -19,7 +19,8 @@ + powerpc-*-eabi* | \ + powerpc-*-rtems* | \ + powerpcle-*-eabisim* | \ +- powerpcle-*-eabi* ) ++ powerpcle-*-eabi* | \ ++ *-musl* ) + # IF there is no include fixing, + # THEN create a no-op fixer and exit + (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} +Index: b/gcc/config.gcc +=================================================================== +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -594,7 +594,7 @@ + esac + + # Common C libraries. +-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" ++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" + + # 32-bit x86 processors supported by --with-arch=. Each processor + # MUST be separated by exactly one space. +@@ -719,6 +719,9 @@ + *-*-*uclibc*) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" + ;; ++ *-*-*musl*) ++ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" ++ ;; + *) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" + ;; +@@ -2322,6 +2325,10 @@ + powerpc*-*-linux*paired*) + tm_file="${tm_file} rs6000/750cl.h" ;; + esac ++ case ${target} in ++ *-linux*-musl*) ++ enable_secureplt=yes ;; ++ esac + if test x${enable_secureplt} = xyes; then + tm_file="rs6000/secureplt.h ${tm_file}" + fi +Index: b/gcc/config/aarch64/aarch64-linux.h +=================================================================== +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -22,6 +22,8 @@ + #define GCC_AARCH64_LINUX_H + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64.so.1" + + #define CPP_SPEC "%{pthread:-D_REENTRANT}" + +Index: b/gcc/config/arm/linux-eabi.h +=================================================================== +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -77,6 +77,23 @@ + %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ + %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" + ++/* For ARM musl currently supports four dynamic linkers: ++ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI ++ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI ++ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB ++ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB ++ musl does not support the legacy OABI mode. ++ All the dynamic linkers live in /lib. ++ We default to soft-float, EL. */ ++#undef MUSL_DYNAMIC_LINKER ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" ++#endif ++#define MUSL_DYNAMIC_LINKER \ ++ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC +Index: b/gcc/config/i386/linux.h +=================================================================== +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -21,3 +21,5 @@ + + #define GNU_USER_LINK_EMULATION "elf_i386" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" +Index: b/gcc/config/i386/linux64.h +=================================================================== +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -30,3 +30,10 @@ + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" + #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++ ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" ++#undef MUSL_DYNAMIC_LINKERX32 ++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" +Index: b/gcc/config/linux.h +=================================================================== +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -32,10 +32,12 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ +@@ -53,18 +55,21 @@ + uClibc or Bionic is the default C library and whether + -muclibc or -mglibc or -mbionic has been passed to change the default. */ + +-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ +- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" ++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ ++ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" + + #if DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) + #elif DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) + #elif DEFAULT_LIBC == LIBC_BIONIC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) + #else + #error "Unsupported DEFAULT_LIBC" + #endif /* DEFAULT_LIBC */ +@@ -82,23 +87,103 @@ + #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" + #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" + ++/* Musl dynamic linker paths must be defined on a per-architecture ++ basis, for each architecture supported by Musl. However, in order ++ to let other architectures continue to build with other C ++ libraries, we provide a dummy definition of the following defines. */ ++#define MUSL_DYNAMIC_LINKER "invalid" ++#define MUSL_DYNAMIC_LINKER32 "invalid" ++#define MUSL_DYNAMIC_LINKER64 "invalid" ++#define MUSL_DYNAMIC_LINKERX32 "invalid" ++ + #define GNU_USER_DYNAMIC_LINKER \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ +- BIONIC_DYNAMIC_LINKER) ++ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + #define GNU_USER_DYNAMIC_LINKER32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ +- BIONIC_DYNAMIC_LINKER32) ++ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ +- BIONIC_DYNAMIC_LINKER64) ++ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + #define GNU_USER_DYNAMIC_LINKERX32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ +- BIONIC_DYNAMIC_LINKERX32) ++ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKER32) + + /* Whether we have Bionic libc runtime */ + #undef TARGET_HAS_BIONIC + #define TARGET_HAS_BIONIC (OPTION_BIONIC) + ++/* musl avoids problematic includes by rearranging the include directories. ++ * Unfortunately, this is mostly duplicated from cppdefault.c */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define INCLUDE_DEFAULTS_MUSL_GPP \ ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, ++ ++#ifdef LOCAL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_LOCAL \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_LOCAL ++#endif ++ ++#ifdef PREFIX_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_PREFIX ++#endif ++ ++#ifdef CROSS_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_CROSS \ ++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#ifdef TOOL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_TOOL \ ++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_TOOL ++#endif ++ ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++#define INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_NATIVE ++#endif ++ ++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) ++# undef INCLUDE_DEFAULTS_MUSL_LOCAL ++# define INCLUDE_DEFAULTS_MUSL_LOCAL ++# undef INCLUDE_DEFAULTS_MUSL_NATIVE ++# define INCLUDE_DEFAULTS_MUSL_NATIVE ++#else ++# undef INCLUDE_DEFAULTS_MUSL_CROSS ++# define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#undef INCLUDE_DEFAULTS ++#define INCLUDE_DEFAULTS \ ++ { \ ++ INCLUDE_DEFAULTS_MUSL_GPP \ ++ INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ INCLUDE_DEFAULTS_MUSL_CROSS \ ++ INCLUDE_DEFAULTS_MUSL_TOOL \ ++ INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ ++ { 0, 0, 0, 0, 0, 0 } \ ++ } ++#endif ++ + #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ + /* This is a *uclinux* target. We don't define below macros to normal linux + versions, because doing so would require *uclinux* targets to include +Index: b/gcc/config/linux.opt +=================================================================== +--- a/gcc/config/linux.opt ++++ b/gcc/config/linux.opt +@@ -30,3 +30,7 @@ + muclibc + Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) + Use uClibc C library ++ ++mmusl ++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc) ++Use musl C library +Index: b/gcc/config/microblaze/linux.h +=================================================================== +--- a/gcc/config/microblaze/linux.h ++++ b/gcc/config/microblaze/linux.h +@@ -25,7 +25,23 @@ + #undef TLS_NEEDS_GOT + #define TLS_NEEDS_GOT 1 + +-#define DYNAMIC_LINKER "/lib/ld.so.1" ++#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */ ++#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{EL:el}" ++#endif ++ ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1" ++#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" ++ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER ++#else ++#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER ++#endif ++ ++ + #undef SUBTARGET_EXTRA_SPECS + #define SUBTARGET_EXTRA_SPECS \ + { "dynamic_linker", DYNAMIC_LINKER } +Index: b/gcc/config/rs6000/linux64.h +=================================================================== +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -375,17 +375,23 @@ + #endif + #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" + #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" + #elif DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER32 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + + #undef DEFAULT_ASM_ENDIAN + #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) +Index: b/gcc/config/rs6000/secureplt.h +=================================================================== +--- a/gcc/config/rs6000/secureplt.h ++++ b/gcc/config/rs6000/secureplt.h +@@ -18,3 +18,4 @@ + . */ + + #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" ++#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" +Index: b/gcc/config/rs6000/sysv4.h +=================================================================== +--- a/gcc/config/rs6000/sysv4.h ++++ b/gcc/config/rs6000/sysv4.h +@@ -537,6 +537,9 @@ + #ifndef CC1_SECURE_PLT_DEFAULT_SPEC + #define CC1_SECURE_PLT_DEFAULT_SPEC "" + #endif ++#ifndef LINK_SECURE_PLT_DEFAULT_SPEC ++#define LINK_SECURE_PLT_DEFAULT_SPEC "" ++#endif + + /* Pass -G xxx to the compiler. */ + #define CC1_SPEC "%{G*} %(cc1_cpu)" \ +@@ -585,7 +588,8 @@ + + /* Override the default target of the linker. */ + #define LINK_TARGET_SPEC \ +- ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") ++ ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") \ ++ "%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" + + /* Any specific OS flags. */ + #define LINK_OS_SPEC "\ +@@ -763,15 +767,18 @@ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1" + #if DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" + #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" ++#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" + #else + #error "Unsupported DEFAULT_LIBC" + #endif + #define GNU_USER_DYNAMIC_LINKER \ +- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) ++ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + + #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ + %{rdynamic:-export-dynamic} \ +@@ -894,6 +901,7 @@ + { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ + { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ + { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ ++ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ + { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ + { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ + { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ +Index: b/gcc/config/sh/linux.h +=================================================================== +--- a/gcc/config/sh/linux.h ++++ b/gcc/config/sh/linux.h +@@ -43,7 +43,15 @@ + + #define TARGET_ASM_FILE_END file_end_indicate_exec_stack + ++#if TARGET_BIG_ENDIAN_DEFAULT /* BE */ ++#define MUSL_DYNAMIC_LINKER_E "eb" ++#else ++#define MUSL_DYNAMIC_LINKER_E ++#endif ++ + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E ".so.1" + + #undef SUBTARGET_LINK_EMUL_SUFFIX + #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" +Index: b/gcc/configure +=================================================================== +--- a/gcc/configure ++++ b/gcc/configure +@@ -27449,6 +27453,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +Index: b/gcc/configure.ac +=================================================================== +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5108,6 +5112,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +Index: b/gcc/ginclude/stddef.h +=================================================================== +--- a/gcc/ginclude/stddef.h ++++ b/gcc/ginclude/stddef.h +@@ -181,6 +181,7 @@ + #ifndef _GCC_SIZE_T + #ifndef _SIZET_ + #ifndef __size_t ++#ifndef __DEFINED_size_t /* musl */ + #define __size_t__ /* BeOS */ + #define __SIZE_T__ /* Cray Unicos/Mk */ + #define _SIZE_T +@@ -197,6 +198,7 @@ + #define ___int_size_t_h + #define _GCC_SIZE_T + #define _SIZET_ ++#define __DEFINED_size_t /* musl */ + #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ + || defined(__FreeBSD_kernel__) + /* __size_t is a typedef on FreeBSD 5, must not trash it. */ +@@ -214,6 +216,7 @@ + typedef long ssize_t; + #endif /* __BEOS__ */ + #endif /* !(defined (__GNUG__) && defined (size_t)) */ ++#endif /* __DEFINED_size_t */ + #endif /* __size_t */ + #endif /* _SIZET_ */ + #endif /* _GCC_SIZE_T */ +Index: b/libgcc/unwind-dw2-fde-dip.c +=================================================================== +--- a/libgcc/unwind-dw2-fde-dip.c ++++ b/libgcc/unwind-dw2-fde-dip.c +@@ -73,6 +73,13 @@ + && defined(TARGET_DL_ITERATE_PHDR) \ + && defined(__sun__) && defined(__svr4__) + # define USE_PT_GNU_EH_FRAME ++ #endif ++ ++/* For musl libc, TARGET_DL_ITERATE_PHDR gets defined by the configure ++ script. */ ++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ ++ && defined(TARGET_DL_ITERATE_PHDR) ++# define USE_PT_GNU_EH_FRAME + #endif + + #if defined(USE_PT_GNU_EH_FRAME) +Index: b/libgomp/config/posix/time.c +=================================================================== +--- a/libgomp/config/posix/time.c ++++ b/libgomp/config/posix/time.c +@@ -28,6 +28,8 @@ + The following implementation uses the most simple POSIX routines. + If present, POSIX 4 clocks should be used instead. */ + ++#define _POSIX_C_SOURCE 199309L /* for clocks */ ++ + #include "libgomp.h" + #include + #if TIME_WITH_SYS_TIME +Index: b/libitm/config/arm/hwcap.cc +=================================================================== +--- a/libitm/config/arm/hwcap.cc ++++ b/libitm/config/arm/hwcap.cc +@@ -40,7 +40,11 @@ + + #ifdef __linux__ + #include ++#ifdef __GLIBC__ + #include ++#else ++#include ++#endif + #include + + static void __attribute__((constructor)) +Index: b/libitm/config/linux/x86/tls.h +=================================================================== +--- a/libitm/config/linux/x86/tls.h ++++ b/libitm/config/linux/x86/tls.h +@@ -25,16 +25,19 @@ + #ifndef LIBITM_X86_TLS_H + #define LIBITM_X86_TLS_H 1 + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + /* Use slots in the TCB head rather than __thread lookups. + GLIBC has reserved words 10 through 13 for TM. */ + #define HAVE_ARCH_GTM_THREAD 1 + #define HAVE_ARCH_GTM_THREAD_DISP 1 + #endif ++#endif + + #include "config/generic/tls.h" + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + namespace GTM HIDDEN { + + #ifdef __x86_64__ +@@ -101,5 +104,6 @@ + + } // namespace GTM + #endif /* >= GLIBC 2.10 */ ++#endif + + #endif // LIBITM_X86_TLS_H +Index: b/libstdc++-v3/configure.host +=================================================================== +--- a/libstdc++-v3/configure.host ++++ b/libstdc++-v3/configure.host +@@ -264,6 +264,13 @@ + os_include_dir="os/bsd/freebsd" + ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) ++ # check for musl by target ++ case "${host_os}" in ++ *-musl*) ++ os_include_dir="os/generic" ++ ;; ++ *) ++ + if [ "$uclibc" = "yes" ]; then + os_include_dir="os/uclibc" + elif [ "$bionic" = "yes" ]; then +@@ -272,6 +279,9 @@ + os_include_dir="os/gnu-linux" + fi + ;; ++ ++ esac ++ ;; + hpux*) + os_include_dir="os/hpux" + ;; +Index: b/gcc/config/mips/linux64.h +=================================================================== +--- a/gcc/config/mips/linux64.h ++++ b/gcc/config/mips/linux64.h +@@ -41,4 +41,4 @@ + #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" + #define GNU_USER_DYNAMIC_LINKERN32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ +- BIONIC_DYNAMIC_LINKERN32) ++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKER) +Index: b/gcc/config/mips/linux.h +=================================================================== +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -23,3 +23,11 @@ + #undef UCLIBC_DYNAMIC_LINKER + #define UCLIBC_DYNAMIC_LINKER \ + "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" ++ ++#if TARGET_ENDIAN_DEFAULT == 0 /* LE */ ++#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{EL:el}" ++#endif ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-mips" MUSL_DYNAMIC_LINKER_E "%{msoft-float:-sf}.so.1" diff --git a/package/gcc/4.9.3/920-libgcc-remove-unistd-header.patch b/package/gcc/4.9.3/920-libgcc-remove-unistd-header.patch new file mode 100644 index 0000000000..df5372bb5a --- /dev/null +++ b/package/gcc/4.9.3/920-libgcc-remove-unistd-header.patch @@ -0,0 +1,12 @@ +Upstream status: In progress + +--- a/libgcc/config/nios2/linux-atomic.c ++++ b/libgcc/config/nios2/linux-atomic.c +@@ -20,7 +20,6 @@ + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + +-#include + #define EFAULT 14 + #define EBUSY 16 + #define ENOSYS 38 diff --git a/package/gcc/4.9.3/930-libgcc-disable-split-stack-nothreads.patch b/package/gcc/4.9.3/930-libgcc-disable-split-stack-nothreads.patch new file mode 100644 index 0000000000..670cf8dae1 --- /dev/null +++ b/package/gcc/4.9.3/930-libgcc-disable-split-stack-nothreads.patch @@ -0,0 +1,14 @@ +disable split-stack for non-thread builds + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-4.9.3.orig/libgcc/config/t-stack gcc-4.9.3/libgcc/config/t-stack +--- gcc-4.9.3.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200 ++++ gcc-4.9.3/libgcc/config/t-stack 2016-03-07 01:34:32.000000000 +0100 +@@ -1,4 +1,6 @@ + # Makefile fragment to provide generic support for -fsplit-stack. + # This should be used in config.host for any host which supports + # -fsplit-stack. ++ifeq ($(enable_threads),yes) + LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c ++endif diff --git a/package/gcc/5.3.0/100-uclibc-conf.patch b/package/gcc/5.3.0/100-uclibc-conf.patch new file mode 100644 index 0000000000..73d1f0d3a9 --- /dev/null +++ b/package/gcc/5.3.0/100-uclibc-conf.patch @@ -0,0 +1,15 @@ +Index: b/contrib/regression/objs-gcc.sh +=================================================================== +--- a/contrib/regression/objs-gcc.sh ++++ b/contrib/regression/objs-gcc.sh +@@ -106,6 +106,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/package/gcc/5.3.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch b/package/gcc/5.3.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch new file mode 100644 index 0000000000..c11ad35aac --- /dev/null +++ b/package/gcc/5.3.0/120-gcc-config.gcc-fix-typo-for-powerpc-e6500-cpu_is_64b.patch @@ -0,0 +1,29 @@ +From 9bf6066d588632dab9f78932df15b5b4140f31f3 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Fri, 6 Nov 2015 14:27:23 +0100 +Subject: [PATCH] gcc/config.gcc: fix typo for powerpc e6500 cpu_is_64bit + +Otherwise it is not recognized as a 64-bit powerpc and gcc will not generate +64-bit binaries by default. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gcc/config.gcc | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index 4a7cbd2..9cc765e 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -439,7 +439,7 @@ powerpc*-*-*) + cpu_type=rs6000 + extra_headers="ppc-asm.h altivec.h spe.h ppu_intrinsics.h paired.h spu2vmx.h vec_types.h si2vmx.h htmintrin.h htmxlintrin.h" + case x$with_cpu in +- xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|Xe6500) ++ xpowerpc64|xdefault64|x6[23]0|x970|xG5|xpower[345678]|xpower6x|xrs64a|xcell|xa2|xe500mc64|xe5500|xe6500) + cpu_is_64bit=yes + ;; + esac +-- +2.6.2 + diff --git a/package/gcc/5.3.0/301-missing-execinfo_h.patch b/package/gcc/5.3.0/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..2d0e7baa44 --- /dev/null +++ b/package/gcc/5.3.0/301-missing-execinfo_h.patch @@ -0,0 +1,13 @@ +Index: b/boehm-gc/include/gc.h +=================================================================== +--- a/boehm-gc/include/gc.h ++++ b/boehm-gc/include/gc.h +@@ -503,7 +503,7 @@ + #if defined(__linux__) || defined(__GLIBC__) + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/package/gcc/5.3.0/810-arm-softfloat-libgcc.patch b/package/gcc/5.3.0/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000000..5efa7fd1bc --- /dev/null +++ b/package/gcc/5.3.0/810-arm-softfloat-libgcc.patch @@ -0,0 +1,30 @@ +Index: b/gcc/config/arm/linux-elf.h +=================================================================== +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -60,7 +60,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + +Index: b/libgcc/config/arm/t-linux +=================================================================== +--- a/libgcc/config/arm/t-linux ++++ b/libgcc/config/arm/t-linux +@@ -1,6 +1,11 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 ++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # Just for these, we omit the frame pointer since it makes such a big + # difference. diff --git a/package/gcc/5.3.0/830-arm_unbreak_armv4t.patch b/package/gcc/5.3.0/830-arm_unbreak_armv4t.patch new file mode 100644 index 0000000000..b730059183 --- /dev/null +++ b/package/gcc/5.3.0/830-arm_unbreak_armv4t.patch @@ -0,0 +1,15 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +Index: b/gcc/config/arm/linux-eabi.h +=================================================================== +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/package/gcc/5.3.0/840-microblaze-enable-dwarf-eh-support.patch b/package/gcc/5.3.0/840-microblaze-enable-dwarf-eh-support.patch new file mode 100644 index 0000000000..9d29090a2a --- /dev/null +++ b/package/gcc/5.3.0/840-microblaze-enable-dwarf-eh-support.patch @@ -0,0 +1,166 @@ +Fetched from Xilinx gcc git at https://github.com/Xilinx/gcc + +From 23c35173490ac2d6348a668dfc9c1a6eb62171f2 Mon Sep 17 00:00:00 2001 +From: "Edgar E. Iglesias" +Date: Mon, 18 Jun 2012 20:18:13 +0200 +Subject: [PATCH] [Patch, microblaze]: Enable DWARF exception handling support. + +Changelog + +2013-03-18 Edgar E. Iglesias + David Holsgrove + + * common/config/microblaze/microblaze-common.c: Remove + TARGET_EXCEPT_UNWIND_INFO definition. + * config/microblaze/microblaze-protos.h: Add + microblaze_eh_return prototype. + * gcc/config/microblaze/microblaze.c: (microblaze_must_save_register, + microblaze_expand_epilogue, microblaze_return_addr): Handle + calls_eh_return + (microblaze_eh_return): New function. + * gcc/config/microblaze/microblaze.h: Define RETURN_ADDR_OFFSET, + EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM, EH_RETURN_STACKADJ_RTX, + ASM_PREFERRED_EH_DATA_FORMAT + * gcc/config/microblaze/microblaze.md: Define eh_return pattern. + +Signed-off-by: David Holsgrove +Signed-off-by: Edgar E. Iglesias +--- + gcc/common/config/microblaze/microblaze-common.c | 3 --- + gcc/config/microblaze/microblaze-protos.h | 1 + + gcc/config/microblaze/microblaze.c | 29 ++++++++++++++++++++---- + gcc/config/microblaze/microblaze.h | 15 ++++++++++++ + gcc/config/microblaze/microblaze.md | 11 +++++++++ + 5 files changed, 52 insertions(+), 7 deletions(-) + +Index: b/gcc/common/config/microblaze/microblaze-common.c +=================================================================== +--- a/gcc/common/config/microblaze/microblaze-common.c ++++ b/gcc/common/config/microblaze/microblaze-common.c +@@ -37,7 +37,4 @@ + #undef TARGET_OPTION_OPTIMIZATION_TABLE + #define TARGET_OPTION_OPTIMIZATION_TABLE microblaze_option_optimization_table + +-#undef TARGET_EXCEPT_UNWIND_INFO +-#define TARGET_EXCEPT_UNWIND_INFO sjlj_except_unwind_info +- + struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER; +Index: b/gcc/config/microblaze/microblaze-protos.h +=================================================================== +--- a/gcc/config/microblaze/microblaze-protos.h ++++ b/gcc/config/microblaze/microblaze-protos.h +@@ -56,6 +56,7 @@ + extern int symbol_mentioned_p (rtx); + extern int label_mentioned_p (rtx); + extern bool microblaze_cannot_force_const_mem (machine_mode, rtx); ++extern void microblaze_eh_return (rtx op0); + #endif /* RTX_CODE */ + + /* Declare functions in microblaze-c.c. */ +Index: b/gcc/config/microblaze/microblaze.c +=================================================================== +--- a/gcc/config/microblaze/microblaze.c ++++ b/gcc/config/microblaze/microblaze.c +@@ -1959,6 +1959,11 @@ + if (frame_pointer_needed && (regno == HARD_FRAME_POINTER_REGNUM)) + return 1; + ++ if (crtl->calls_eh_return ++ && regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) { ++ return 1; ++ } ++ + if (!crtl->is_leaf) + { + if (regno == MB_ABI_SUB_RETURN_ADDR_REGNUM) +@@ -1986,6 +1991,13 @@ + return 1; + } + ++ if (crtl->calls_eh_return ++ && (regno == EH_RETURN_DATA_REGNO (0) ++ || regno == EH_RETURN_DATA_REGNO (1))) ++ { ++ return 1; ++ } ++ + return 0; + } + +@@ -3067,6 +3079,12 @@ + emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx, fsiz_rtx)); + } + ++ if (crtl->calls_eh_return) ++ emit_insn (gen_addsi3 (stack_pointer_rtx, ++ stack_pointer_rtx, ++ gen_rtx_raw_REG (SImode, ++ MB_EH_STACKADJ_REGNUM))); ++ + emit_jump_insn (gen_return_internal (gen_rtx_REG (Pmode, GP_REG_FIRST + + MB_ABI_SUB_RETURN_ADDR_REGNUM))); + } +@@ -3364,10 +3382,13 @@ + if (count != 0) + return NULL_RTX; + +- return gen_rtx_PLUS (Pmode, +- get_hard_reg_initial_val (Pmode, +- MB_ABI_SUB_RETURN_ADDR_REGNUM), +- GEN_INT (8)); ++ return get_hard_reg_initial_val (Pmode, ++ MB_ABI_SUB_RETURN_ADDR_REGNUM); ++} ++ ++void microblaze_eh_return (rtx op0) ++{ ++ emit_insn (gen_movsi(gen_rtx_MEM(Pmode, stack_pointer_rtx), op0)); + } + + /* Queue an .ident string in the queue of top-level asm statements. +Index: b/gcc/config/microblaze/microblaze.h +=================================================================== +--- a/gcc/config/microblaze/microblaze.h ++++ b/gcc/config/microblaze/microblaze.h +@@ -184,6 +184,21 @@ + #define INCOMING_RETURN_ADDR_RTX \ + gen_rtx_REG (VOIDmode, GP_REG_FIRST + MB_ABI_SUB_RETURN_ADDR_REGNUM) + ++/* Specifies the offset from INCOMING_RETURN_ADDR_RTX and the actual return PC. */ ++#define RETURN_ADDR_OFFSET (8) ++ ++/* Describe how we implement __builtin_eh_return. */ ++#define EH_RETURN_DATA_REGNO(N) (((N) < 2) ? MB_ABI_FIRST_ARG_REGNUM + (N) : INVALID_REGNUM) ++ ++#define MB_EH_STACKADJ_REGNUM MB_ABI_INT_RETURN_VAL2_REGNUM ++#define EH_RETURN_STACKADJ_RTX gen_rtx_REG (Pmode, MB_EH_STACKADJ_REGNUM) ++ ++/* Select a format to encode pointers in exception handling data. CODE ++ is 0 for data, 1 for code labels, 2 for function pointers. GLOBAL is ++ true if the symbol may be affected by dynamic relocations. */ ++#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \ ++ ((flag_pic || GLOBAL) ? DW_EH_PE_aligned : DW_EH_PE_absptr) ++ + /* Use DWARF 2 debugging information by default. */ + #define DWARF2_DEBUGGING_INFO + #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG +Index: b/gcc/config/microblaze/microblaze.md +=================================================================== +--- a/gcc/config/microblaze/microblaze.md ++++ b/gcc/config/microblaze/microblaze.md +@@ -2272,4 +2272,15 @@ + (set_attr "mode" "SI") + (set_attr "length" "4")]) + ++; This is used in compiling the unwind routines. ++(define_expand "eh_return" ++ [(use (match_operand 0 "general_operand" ""))] ++ "" ++ " ++{ ++ microblaze_eh_return(operands[0]); ++ DONE; ++}") ++ + (include "sync.md") ++ diff --git a/package/gcc/5.3.0/850-libstdcxx-uclibc-c99.patch b/package/gcc/5.3.0/850-libstdcxx-uclibc-c99.patch new file mode 100644 index 0000000000..9e97d945d3 --- /dev/null +++ b/package/gcc/5.3.0/850-libstdcxx-uclibc-c99.patch @@ -0,0 +1,273 @@ +Allow C99-depending features of libstdc++ with uClibc + +The libstdc++ code is fairly restrictive on how it checks for C99 +compatibility: it requires *complete* C99 support to enable certain +features. For example, uClibc provides a good number of C99 features, +but not C99 complex number support. For this reason, libstdc++ +completely disables many the standard C++ methods that can in fact +work because uClibc provides the necessary functions. + +This patch is similar and highly inspired from +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in +a way that doesn't involve changing the configure.ac script, as +autoreconfiguring gcc is complicated. It simply relies on the fact +that uClibc defines the __UCLIBC__ definition. + +Signed-off-by: Thomas Petazzoni + +Index: b/libstdc++-v3/config/locale/generic/c_locale.h +=================================================================== +--- a/libstdc++-v3/config/locale/generic/c_locale.h ++++ b/libstdc++-v3/config/locale/generic/c_locale.h +@@ -70,7 +70,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +Index: b/libstdc++-v3/config/locale/gnu/c_locale.h +=================================================================== +--- a/libstdc++-v3/config/locale/gnu/c_locale.h ++++ b/libstdc++-v3/config/locale/gnu/c_locale.h +@@ -88,7 +88,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +Index: b/libstdc++-v3/include/bits/basic_string.h +=================================================================== +--- a/libstdc++-v3/include/bits/basic_string.h ++++ b/libstdc++-v3/include/bits/basic_string.h +@@ -5239,7 +5239,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if __cplusplus >= 201103L && defined(_GLIBCXX_USE_C99) ++#if __cplusplus >= 201103L && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) + + #include + +Index: b/libstdc++-v3/include/bits/locale_facets.tcc +=================================================================== +--- a/libstdc++-v3/include/bits/locale_facets.tcc ++++ b/libstdc++-v3/include/bits/locale_facets.tcc +@@ -992,7 +992,7 @@ + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // Precision is always used except for hexfloat format. + const bool __use_prec = + (__io.flags() & ios_base::floatfield) != ios_base::floatfield; +Index: b/libstdc++-v3/include/bits/locale_facets_nonio.tcc +=================================================================== +--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc ++++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc +@@ -578,7 +578,7 @@ + { + const locale __loc = __io.getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough. + int __cs_size = 64; + char* __cs = static_cast(__builtin_alloca(__cs_size)); +Index: b/libstdc++-v3/include/c_compatibility/math.h +=================================================================== +--- a/libstdc++-v3/include/c_compatibility/math.h ++++ b/libstdc++-v3/include/c_compatibility/math.h +@@ -56,7 +56,7 @@ + using std::floor; + using std::fmod; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::fpclassify; + using std::isfinite; + using std::isinf; +Index: b/libstdc++-v3/include/c_compatibility/wchar.h +=================================================================== +--- a/libstdc++-v3/include/c_compatibility/wchar.h ++++ b/libstdc++-v3/include/c_compatibility/wchar.h +@@ -103,7 +103,7 @@ + using std::wmemset; + using std::wcsftime; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/c_global/cstdlib +=================================================================== +--- a/libstdc++-v3/include/c_global/cstdlib ++++ b/libstdc++-v3/include/c_global/cstdlib +@@ -195,7 +195,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +Index: b/libstdc++-v3/include/c_global/cwchar +=================================================================== +--- a/libstdc++-v3/include/c_global/cwchar ++++ b/libstdc++-v3/include/c_global/cwchar +@@ -232,7 +232,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +@@ -289,7 +289,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/c_std/cstdio +=================================================================== +--- a/libstdc++-v3/include/c_std/cstdio ++++ b/libstdc++-v3/include/c_std/cstdio +@@ -144,7 +144,7 @@ + using ::vsprintf; + } // namespace std + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf +Index: b/libstdc++-v3/include/c_std/cstdlib +=================================================================== +--- a/libstdc++-v3/include/c_std/cstdlib ++++ b/libstdc++-v3/include/c_std/cstdlib +@@ -192,7 +192,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +Index: b/libstdc++-v3/include/c_std/cwchar +=================================================================== +--- a/libstdc++-v3/include/c_std/cwchar ++++ b/libstdc++-v3/include/c_std/cwchar +@@ -228,7 +228,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +Index: b/libstdc++-v3/include/ext/vstring.h +=================================================================== +--- a/libstdc++-v3/include/ext/vstring.h ++++ b/libstdc++-v3/include/ext/vstring.h +@@ -2680,7 +2680,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99)) ++#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))) + + #include + +Index: b/libstdc++-v3/include/tr1/cstdio +=================================================================== +--- a/libstdc++-v3/include/tr1/cstdio ++++ b/libstdc++-v3/include/tr1/cstdio +@@ -33,7 +33,7 @@ + + #include + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +Index: b/libstdc++-v3/include/tr1/cstdlib +=================================================================== +--- a/libstdc++-v3/include/tr1/cstdlib ++++ b/libstdc++-v3/include/tr1/cstdlib +@@ -35,7 +35,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +Index: b/libstdc++-v3/include/tr1/cwchar +=================================================================== +--- a/libstdc++-v3/include/tr1/cwchar ++++ b/libstdc++-v3/include/tr1/cwchar +@@ -52,7 +52,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/tr1/stdlib.h +=================================================================== +--- a/libstdc++-v3/include/tr1/stdlib.h ++++ b/libstdc++-v3/include/tr1/stdlib.h +@@ -33,7 +33,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + using std::tr1::atoll; + using std::tr1::strtoll; +Index: b/libstdc++-v3/src/c++11/debug.cc +=================================================================== +--- a/libstdc++-v3/src/c++11/debug.cc ++++ b/libstdc++-v3/src/c++11/debug.cc +@@ -788,7 +788,7 @@ + int __n __attribute__ ((__unused__)), + const char* __fmt, _Tp __s) const throw () + { +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + std::snprintf(__buf, __n, __fmt, __s); + #else + std::sprintf(__buf, __fmt, __s); +Index: b/libstdc++-v3/include/c_global/cstdio +=================================================================== +--- a/libstdc++-v3/include/c_global/cstdio ++++ b/libstdc++-v3/include/c_global/cstdio +@@ -146,7 +146,7 @@ + using ::vsprintf; + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf diff --git a/package/gcc/5.3.0/860-cilk-wchar.patch b/package/gcc/5.3.0/860-cilk-wchar.patch new file mode 100644 index 0000000000..1d9916f554 --- /dev/null +++ b/package/gcc/5.3.0/860-cilk-wchar.patch @@ -0,0 +1,56 @@ +[PATCH] cilk: fix build without wchar + +When building against uClibc with wchar support disabled, WCHAR_MIN and +WCHAR_MAX are not defined leading to compilation errors. + +Fix it by only including the wchar code if available. + +Signed-off-by: Peter Korsgaard +--- + libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +Index: b/libcilkrts/include/cilk/reducer_min_max.h +=================================================================== +--- a/libcilkrts/include/cilk/reducer_min_max.h ++++ b/libcilkrts/include/cilk/reducer_min_max.h +@@ -3154,7 +3154,9 @@ + CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN) + CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0) + CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN) ++#ifdef WCHAR_MIN + CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) ++#endif + CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN) + CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0) + CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN) +@@ -3306,7 +3308,9 @@ + CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN) ++#ifdef WCHAR_MIN + CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) ++#endif + CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN) +@@ -3432,7 +3436,9 @@ + CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX) + CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX) + CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX) ++#ifdef WCHAR_MAX + CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) ++#endif + CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX) + CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX) + CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX) +@@ -3584,7 +3590,9 @@ + CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX) ++#ifdef WCHAR_MAX + CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) ++#endif + CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX) diff --git a/package/gcc/5.3.0/870-xtensa-add-mauto-litpools-option.patch b/package/gcc/5.3.0/870-xtensa-add-mauto-litpools-option.patch new file mode 100644 index 0000000000..aa1376c44c --- /dev/null +++ b/package/gcc/5.3.0/870-xtensa-add-mauto-litpools-option.patch @@ -0,0 +1,290 @@ +From 6d852ffb43b111a39162135c95249e749c4e285b Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 6 Aug 2015 01:16:02 +0300 +Subject: [PATCH] xtensa: add -mauto-litpools option + +With support from assembler this option allows compiling huge functions, +where single literal pool at the beginning of a function may not be +reachable by L32R instructions at its end. + +Currently assembler --auto-litpools option cannot deal with literals +used from multiple locations separated by more than 256 KBytes of code. +Don't turn constants into literals, instead use MOVI instruction to load +them into registers and let the assembler turn them into literals as +necessary. + +2015-08-12 Max Filippov +gcc/ + * config/xtensa/constraints.md (define_constraint "Y"): New + constraint. + * config/xtensa/elf.h (ASM_SPEC): Add m(no-)auto-litpools. + * config/xtensa/linux.h (ASM_SPEC): Likewise. + * config/xtensa/predicates.md (move_operand): Match constants + and symbols in the presence of TARGET_AUTO_LITPOOLS. + * config/xtensa/xtensa.c (xtensa_valid_move): Don't allow + immediate references to TLS data. + (xtensa_emit_move_sequence): Don't force constants to memory in + the presence of TARGET_AUTO_LITPOOLS. + (print_operand): Add 'y' format, same as default, but capable of + printing SF mode constants as well. + * config/xtensa/xtensa.md (movsi_internal, movhi_internal) + (movsf_internal): Add movi pattern that loads literal. + (movsf, movdf): Don't force constants to memory in the presence + of TARGET_AUTO_LITPOOLS. + (movdf_internal): Add 'Y' constraint. + * config/xtensa/xtensa.opt (mauto-litpools): New option. + +Signed-off-by: Max Filippov +--- +Backported from: r226828 +Changes to ChangeLogs and documentation are dropped. + + gcc/config/xtensa/constraints.md | 5 +++++ + gcc/config/xtensa/elf.h | 4 +++- + gcc/config/xtensa/linux.h | 4 +++- + gcc/config/xtensa/predicates.md | 3 ++- + gcc/config/xtensa/xtensa.c | 19 ++++++++++++++++++- + gcc/config/xtensa/xtensa.md | 35 +++++++++++++++++++---------------- + gcc/config/xtensa/xtensa.opt | 4 ++++ + 7 files changed, 54 insertions(+), 20 deletions(-) + +diff --git a/gcc/config/xtensa/constraints.md b/gcc/config/xtensa/constraints.md +index 30f4c1f..773d4f9 100644 +--- a/gcc/config/xtensa/constraints.md ++++ b/gcc/config/xtensa/constraints.md +@@ -111,6 +111,11 @@ + (and (match_code "const_int") + (match_test "xtensa_mask_immediate (ival)"))) + ++(define_constraint "Y" ++ "A constant that can be used in relaxed MOVI instructions." ++ (and (match_code "const_int,const_double,const,symbol_ref,label_ref") ++ (match_test "TARGET_AUTO_LITPOOLS"))) ++ + ;; Memory constraints. Do not use define_memory_constraint here. Doing so + ;; causes reload to force some constants into the constant pool, but since + ;; the Xtensa constant pool can only be accessed with L32R instructions, it +diff --git a/gcc/config/xtensa/elf.h b/gcc/config/xtensa/elf.h +index e59bede..12056f7 100644 +--- a/gcc/config/xtensa/elf.h ++++ b/gcc/config/xtensa/elf.h +@@ -48,7 +48,9 @@ along with GCC; see the file COPYING3. If not see + %{mtarget-align:--target-align} \ + %{mno-target-align:--no-target-align} \ + %{mlongcalls:--longcalls} \ +- %{mno-longcalls:--no-longcalls}" ++ %{mno-longcalls:--no-longcalls} \ ++ %{mauto-litpools:--auto-litpools} \ ++ %{mno-auto-litpools:--no-auto-litpools}" + + #undef LIB_SPEC + #define LIB_SPEC "-lc -lsim -lc -lhandlers-sim -lhal" +diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h +index 675aacf..5b0243a 100644 +--- a/gcc/config/xtensa/linux.h ++++ b/gcc/config/xtensa/linux.h +@@ -42,7 +42,9 @@ along with GCC; see the file COPYING3. If not see + %{mtarget-align:--target-align} \ + %{mno-target-align:--no-target-align} \ + %{mlongcalls:--longcalls} \ +- %{mno-longcalls:--no-longcalls}" ++ %{mno-longcalls:--no-longcalls} \ ++ %{mauto-litpools:--auto-litpools} \ ++ %{mno-auto-litpools:--no-auto-litpools}" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" + +diff --git a/gcc/config/xtensa/predicates.md b/gcc/config/xtensa/predicates.md +index e02209e..d7dfa11 100644 +--- a/gcc/config/xtensa/predicates.md ++++ b/gcc/config/xtensa/predicates.md +@@ -142,7 +142,8 @@ + (match_test "GET_MODE_CLASS (mode) == MODE_INT + && xtensa_simm12b (INTVAL (op))")) + (and (match_code "const_int,const_double,const,symbol_ref,label_ref") +- (match_test "TARGET_CONST16 && CONSTANT_P (op) ++ (match_test "(TARGET_CONST16 || TARGET_AUTO_LITPOOLS) ++ && CONSTANT_P (op) + && GET_MODE_SIZE (mode) % UNITS_PER_WORD == 0"))))) + + ;; Accept the floating point constant 1 in the appropriate mode. +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index eb039ba..206ff80 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -501,6 +501,9 @@ xtensa_valid_move (machine_mode mode, rtx *operands) + { + int dst_regnum = xt_true_regnum (operands[0]); + ++ if (xtensa_tls_referenced_p (operands[1])) ++ return FALSE; ++ + /* The stack pointer can only be assigned with a MOVSP opcode. */ + if (dst_regnum == STACK_POINTER_REGNUM) + return !TARGET_WINDOWED_ABI +@@ -1069,7 +1072,7 @@ xtensa_emit_move_sequence (rtx *operands, machine_mode mode) + return 1; + } + +- if (! TARGET_CONST16) ++ if (! TARGET_AUTO_LITPOOLS && ! TARGET_CONST16) + { + src = force_const_mem (SImode, src); + operands[1] = src; +@@ -2449,6 +2452,20 @@ print_operand (FILE *file, rtx x, int letter) + } + break; + ++ case 'y': ++ if (GET_CODE (x) == CONST_DOUBLE && ++ GET_MODE (x) == SFmode) ++ { ++ REAL_VALUE_TYPE r; ++ long l; ++ REAL_VALUE_FROM_CONST_DOUBLE (r, x); ++ REAL_VALUE_TO_TARGET_SINGLE (r, l); ++ fprintf (file, "0x%08lx", l); ++ break; ++ } ++ ++ /* fall through */ ++ + default: + if (GET_CODE (x) == REG || GET_CODE (x) == SUBREG) + fprintf (file, "%s", reg_names[xt_true_regnum (x)]); +diff --git a/gcc/config/xtensa/xtensa.md b/gcc/config/xtensa/xtensa.md +index 6d84384..0e673a3 100644 +--- a/gcc/config/xtensa/xtensa.md ++++ b/gcc/config/xtensa/xtensa.md +@@ -761,8 +761,8 @@ + }) + + (define_insn "movsi_internal" +- [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,W,a,a,U,*a,*A") +- (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,i,T,U,r,*A,*r"))] ++ [(set (match_operand:SI 0 "nonimmed_operand" "=D,D,D,D,R,R,a,q,a,a,W,a,a,U,*a,*A") ++ (match_operand:SI 1 "move_operand" "M,D,d,R,D,d,r,r,I,Y,i,T,U,r,*A,*r"))] + "xtensa_valid_move (SImode, operands)" + "@ + movi.n\t%0, %x1 +@@ -774,15 +774,16 @@ + mov\t%0, %1 + movsp\t%0, %1 + movi\t%0, %x1 ++ movi\t%0, %1 + const16\t%0, %t1\;const16\t%0, %b1 + %v1l32r\t%0, %1 + %v1l32i\t%0, %1 + %v0s32i\t%1, %0 + rsr\t%0, ACCLO + wsr\t%1, ACCLO" +- [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,load,load,store,rsr,wsr") ++ [(set_attr "type" "move,move,move,load,store,store,move,move,move,move,move,load,load,store,rsr,wsr") + (set_attr "mode" "SI") +- (set_attr "length" "2,2,2,2,2,2,3,3,3,6,3,3,3,3,3")]) ++ (set_attr "length" "2,2,2,2,2,2,3,3,3,3,6,3,3,3,3,3")]) + + ;; 16-bit Integer moves + +@@ -796,21 +797,22 @@ + }) + + (define_insn "movhi_internal" +- [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,U,*a,*A") +- (match_operand:HI 1 "move_operand" "M,d,r,I,U,r,*A,*r"))] ++ [(set (match_operand:HI 0 "nonimmed_operand" "=D,D,a,a,a,a,U,*a,*A") ++ (match_operand:HI 1 "move_operand" "M,d,r,I,Y,U,r,*A,*r"))] + "xtensa_valid_move (HImode, operands)" + "@ + movi.n\t%0, %x1 + mov.n\t%0, %1 + mov\t%0, %1 + movi\t%0, %x1 ++ movi\t%0, %1 + %v1l16ui\t%0, %1 + %v0s16i\t%1, %0 + rsr\t%0, ACCLO + wsr\t%1, ACCLO" +- [(set_attr "type" "move,move,move,move,load,store,rsr,wsr") ++ [(set_attr "type" "move,move,move,move,move,load,store,rsr,wsr") + (set_attr "mode" "HI") +- (set_attr "length" "2,2,3,3,3,3,3,3")]) ++ (set_attr "length" "2,2,3,3,3,3,3,3,3")]) + + ;; 8-bit Integer moves + +@@ -881,7 +883,7 @@ + (match_operand:SF 1 "general_operand" ""))] + "" + { +- if (!TARGET_CONST16 && CONSTANT_P (operands[1])) ++ if (!TARGET_CONST16 && !TARGET_AUTO_LITPOOLS && CONSTANT_P (operands[1])) + operands[1] = force_const_mem (SFmode, operands[1]); + + if ((!register_operand (operands[0], SFmode) +@@ -896,8 +898,8 @@ + }) + + (define_insn "movsf_internal" +- [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,W,a,a,U") +- (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,iF,T,U,r"))] ++ [(set (match_operand:SF 0 "nonimmed_operand" "=f,f,U,D,D,R,a,f,a,a,W,a,a,U") ++ (match_operand:SF 1 "move_operand" "f,U,f,d,R,d,r,r,f,Y,iF,T,U,r"))] + "((register_operand (operands[0], SFmode) + || register_operand (operands[1], SFmode)) + && !(FP_REG_P (xt_true_regnum (operands[0])) +@@ -912,13 +914,14 @@ + mov\t%0, %1 + wfr\t%0, %1 + rfr\t%0, %1 ++ movi\t%0, %y1 + const16\t%0, %t1\;const16\t%0, %b1 + %v1l32r\t%0, %1 + %v1l32i\t%0, %1 + %v0s32i\t%1, %0" +- [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,load,load,store") ++ [(set_attr "type" "farith,fload,fstore,move,load,store,move,farith,farith,move,move,load,load,store") + (set_attr "mode" "SF") +- (set_attr "length" "3,3,3,2,2,2,3,3,3,6,3,3,3")]) ++ (set_attr "length" "3,3,3,2,2,2,3,3,3,3,6,3,3,3")]) + + (define_insn "*lsiu" + [(set (match_operand:SF 0 "register_operand" "=f") +@@ -991,7 +994,7 @@ + (match_operand:DF 1 "general_operand" ""))] + "" + { +- if (CONSTANT_P (operands[1]) && !TARGET_CONST16) ++ if (CONSTANT_P (operands[1]) && !TARGET_CONST16 && !TARGET_AUTO_LITPOOLS) + operands[1] = force_const_mem (DFmode, operands[1]); + + if (!register_operand (operands[0], DFmode) +@@ -1002,8 +1005,8 @@ + }) + + (define_insn_and_split "movdf_internal" +- [(set (match_operand:DF 0 "nonimmed_operand" "=a,W,a,a,U") +- (match_operand:DF 1 "move_operand" "r,iF,T,U,r"))] ++ [(set (match_operand:DF 0 "nonimmed_operand" "=a,a,W,a,a,U") ++ (match_operand:DF 1 "move_operand" "r,Y,iF,T,U,r"))] + "register_operand (operands[0], DFmode) + || register_operand (operands[1], DFmode)" + "#" +diff --git a/gcc/config/xtensa/xtensa.opt b/gcc/config/xtensa/xtensa.opt +index 2fd6cee..21c6e96 100644 +--- a/gcc/config/xtensa/xtensa.opt ++++ b/gcc/config/xtensa/xtensa.opt +@@ -38,6 +38,10 @@ mtext-section-literals + Target + Intersperse literal pools with code in the text section + ++mauto-litpools ++Target Report Mask(AUTO_LITPOOLS) ++Relax literals in assembler and place them automatically in the text section ++ + mserialize-volatile + Target Report Mask(SERIALIZE_VOLATILE) + -mno-serialize-volatile Do not serialize volatile memory references with MEMW instructions +-- +1.8.1.4 + diff --git a/package/gcc/5.3.0/871-xtensa-reimplement-register-spilling.patch b/package/gcc/5.3.0/871-xtensa-reimplement-register-spilling.patch new file mode 100644 index 0000000000..4056f8b8ed --- /dev/null +++ b/package/gcc/5.3.0/871-xtensa-reimplement-register-spilling.patch @@ -0,0 +1,76 @@ +From 40507bf199440082ed69b777986d50c31efe2520 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Mon, 10 Aug 2015 21:35:20 +0300 +Subject: [PATCH 1/3] xtensa: reimplement register spilling + +Spilling windowed registers in userspace is much easier, more portable, +less error-prone and equally effective as in kernel. Now that register +spilling syscall is considered obsolete in the xtensa linux kernel +replace it with CALL12 followed by series of ENTRY in libgcc. + +2015-08-18 Max Filippov +libgcc/ + * config/xtensa/lib2funcs.S (__xtensa_libgcc_window_spill): Use + CALL12 followed by series of ENTRY to spill windowed registers. + (__xtensa_nonlocal_goto): Call __xtensa_libgcc_window_spill + instead of making linux spill syscall. + +Signed-off-by: Max Filippov +--- +Backported from: r226962 + + libgcc/config/xtensa/lib2funcs.S | 30 +++++++++++++++++++++++------- + 1 file changed, 23 insertions(+), 7 deletions(-) + +diff --git a/libgcc/config/xtensa/lib2funcs.S b/libgcc/config/xtensa/lib2funcs.S +index 4d451c8..ef0703f 100644 +--- a/libgcc/config/xtensa/lib2funcs.S ++++ b/libgcc/config/xtensa/lib2funcs.S +@@ -34,10 +34,29 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + .global __xtensa_libgcc_window_spill + .type __xtensa_libgcc_window_spill,@function + __xtensa_libgcc_window_spill: +- entry sp, 32 +- movi a2, 0 +- syscall ++ entry sp, 48 ++#if XCHAL_NUM_AREGS > 16 ++ call12 1f ++ retw ++ .align 4 ++1: ++ .rept (XCHAL_NUM_AREGS - 24) / 12 ++ _entry sp, 48 ++ mov a12, a0 ++ .endr ++ _entry sp, 16 ++#if XCHAL_NUM_AREGS % 12 == 0 ++ mov a4, a4 ++#elif XCHAL_NUM_AREGS % 12 == 4 ++ mov a8, a8 ++#elif XCHAL_NUM_AREGS % 12 == 8 ++ mov a12, a12 ++#endif + retw ++#else ++ mov a8, a8 ++ retw ++#endif + .size __xtensa_libgcc_window_spill, .-__xtensa_libgcc_window_spill + #endif + +@@ -61,10 +80,7 @@ __xtensa_nonlocal_goto: + entry sp, 32 + + /* Flush registers. */ +- mov a5, a2 +- movi a2, 0 +- syscall +- mov a2, a5 ++ call8 __xtensa_libgcc_window_spill + + /* Because the save area for a0-a3 is stored one frame below + the one identified by a2, the only way to restore those +-- +1.8.1.4 + diff --git a/package/gcc/5.3.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch b/package/gcc/5.3.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch new file mode 100644 index 0000000000..9707f6881c --- /dev/null +++ b/package/gcc/5.3.0/872-xtensa-use-unwind-dw2-fde-dip-instead-of-unwind-dw2-.patch @@ -0,0 +1,31 @@ +From 7d7a85f75ba218df4a4226e95865fc8fa561cb86 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 14 Aug 2015 02:45:02 +0300 +Subject: [PATCH 2/3] xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde + +This allows having exception cleanup code in binaries that don't +register their unwind tables. + +2015-08-18 Max Filippov +libgcc/ + * config/xtensa/t-windowed (LIB2ADDEH): Replace unwind-dw2-fde + with unwind-dw2-fde-dip. + +Signed-off-by: Max Filippov +--- +Backported from: r226963 + + libgcc/config/xtensa/t-windowed | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/xtensa/t-windowed b/libgcc/config/xtensa/t-windowed +index 7d9e9db..a99156c 100644 +--- a/libgcc/config/xtensa/t-windowed ++++ b/libgcc/config/xtensa/t-windowed +@@ -1,2 +1,2 @@ + LIB2ADDEH = $(srcdir)/config/xtensa/unwind-dw2-xtensa.c \ +- $(srcdir)/unwind-dw2-fde.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c ++ $(srcdir)/unwind-dw2-fde-dip.c $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c +-- +1.8.1.4 + diff --git a/package/gcc/5.3.0/873-xtensa-fix-_Unwind_GetCFA.patch b/package/gcc/5.3.0/873-xtensa-fix-_Unwind_GetCFA.patch new file mode 100644 index 0000000000..2d8eb7c778 --- /dev/null +++ b/package/gcc/5.3.0/873-xtensa-fix-_Unwind_GetCFA.patch @@ -0,0 +1,40 @@ +From b33905dc310f475ddbde4c9fb7230724b2068a2b Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 15 Aug 2015 05:12:11 +0300 +Subject: [PATCH 3/3] xtensa: fix _Unwind_GetCFA + +Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame +higher than what was actually used by code at context->ra. This results +in invalid CFA value in signal frames and premature unwinding completion +in forced unwinding used by uClibc NPTL thread cancellation. +Returning context->sp from _Unwind_GetCFA makes all CFA values valid and +matching code that used them. + +2015-08-18 Max Filippov +libgcc/ + * config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return + context->sp instead of context->cfa. + +Signed-off-by: Max Filippov +--- +Backported from: r226964 + + libgcc/config/xtensa/unwind-dw2-xtensa.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/xtensa/unwind-dw2-xtensa.c b/libgcc/config/xtensa/unwind-dw2-xtensa.c +index 82b0e63..8e579c7 100644 +--- a/libgcc/config/xtensa/unwind-dw2-xtensa.c ++++ b/libgcc/config/xtensa/unwind-dw2-xtensa.c +@@ -130,7 +130,7 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index) + _Unwind_Word + _Unwind_GetCFA (struct _Unwind_Context *context) + { +- return (_Unwind_Ptr) context->cfa; ++ return (_Unwind_Ptr) context->sp; + } + + /* Overwrite the saved value for register INDEX in CONTEXT with VAL. */ +-- +1.8.1.4 + diff --git a/package/gcc/5.3.0/874-xtensa-add-uclinux-support.patch b/package/gcc/5.3.0/874-xtensa-add-uclinux-support.patch new file mode 100644 index 0000000000..23db3d863c --- /dev/null +++ b/package/gcc/5.3.0/874-xtensa-add-uclinux-support.patch @@ -0,0 +1,174 @@ +From 70c2cb98fb129b4766b5da0f945dc41fd568c77a Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Sat, 22 Aug 2015 08:44:26 +0300 +Subject: [PATCH] xtensa: add uclinux support + +2015-10-03 Max Filippov +gcc/ + * config.gcc (xtensa*-*-uclinux*): New configuration. + * config/xtensa/uclinux.h: New file. + * config/xtensa/uclinux.opt: New file. + +libgcc/ + * config.host (xtensa*-*-uclinux*): New configuration. + +Signed-off-by: Max Filippov +--- +Backported from: r228450 + + gcc/config.gcc | 5 ++++ + gcc/config/xtensa/uclinux.h | 69 +++++++++++++++++++++++++++++++++++++++++++ + gcc/config/xtensa/uclinux.opt | 32 ++++++++++++++++++++ + libgcc/config.host | 5 ++++ + 4 files changed, 111 insertions(+) + create mode 100644 gcc/config/xtensa/uclinux.h + create mode 100644 gcc/config/xtensa/uclinux.opt + +diff --git a/gcc/config.gcc b/gcc/config.gcc +index c52f5a8..56797bd 100644 +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -2995,6 +2995,11 @@ xtensa*-*-linux*) + tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/linux.h" + tmake_file="${tmake_file} xtensa/t-xtensa" + ;; ++xtensa*-*-uclinux*) ++ tm_file="${tm_file} dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h xtensa/uclinux.h" ++ tmake_file="${tmake_file} xtensa/t-xtensa" ++ extra_options="${extra_options} xtensa/uclinux.opt" ++ ;; + am33_2.0-*-linux*) + tm_file="mn10300/mn10300.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h mn10300/linux.h" + gas=yes gnu_ld=yes +diff --git a/gcc/config/xtensa/uclinux.h b/gcc/config/xtensa/uclinux.h +new file mode 100644 +index 0000000..4606020 +--- /dev/null ++++ b/gcc/config/xtensa/uclinux.h +@@ -0,0 +1,69 @@ ++/* Xtensa uClinux configuration. ++ Derived from the configuration for GCC for Intel i386 running Linux. ++ Copyright (C) 2001-2015 Free Software Foundation, Inc. ++ ++This file is part of GCC. ++ ++GCC is free software; you can redistribute it and/or modify it under ++the terms of the GNU General Public License as published by the Free ++Software Foundation; either version 3, or (at your option) any later ++version. ++ ++GCC 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 GCC; see the file COPYING3. If not see ++. */ ++ ++#undef TARGET_OS_CPP_BUILTINS ++#define TARGET_OS_CPP_BUILTINS() \ ++ do \ ++ { \ ++ GNU_USER_TARGET_OS_CPP_BUILTINS (); \ ++ builtin_define ("__uClinux__"); \ ++ } \ ++ while (0) ++ ++#undef SUBTARGET_CPP_SPEC ++#define SUBTARGET_CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" ++ ++#undef SIZE_TYPE ++#define SIZE_TYPE "unsigned int" ++ ++#undef PTRDIFF_TYPE ++#define PTRDIFF_TYPE "int" ++ ++#undef WCHAR_TYPE ++#define WCHAR_TYPE "long int" ++ ++#undef WCHAR_TYPE_SIZE ++#define WCHAR_TYPE_SIZE 32 ++ ++#undef ASM_SPEC ++#define ASM_SPEC \ ++ "%{mtext-section-literals:--text-section-literals} \ ++ %{mno-text-section-literals:--no-text-section-literals} \ ++ %{mtarget-align:--target-align} \ ++ %{mno-target-align:--no-target-align} \ ++ %{mlongcalls:--longcalls} \ ++ %{mno-longcalls:--no-longcalls} \ ++ %{mauto-litpools:--auto-litpools} \ ++ %{mno-auto-litpools:--no-auto-litpools}" ++ ++#undef LINK_SPEC ++#define LINK_SPEC "%{!no-elf2flt:%{!elf2flt*:-elf2flt}}" ++ ++#undef LOCAL_LABEL_PREFIX ++#define LOCAL_LABEL_PREFIX "." ++ ++/* Always enable "-fpic" for Xtensa Linux. */ ++#define XTENSA_ALWAYS_PIC 1 ++ ++#undef TARGET_LIBC_HAS_FUNCTION ++#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function ++ ++#undef DBX_REGISTER_NUMBER ++ +diff --git a/gcc/config/xtensa/uclinux.opt b/gcc/config/xtensa/uclinux.opt +new file mode 100644 +index 0000000..95ef777 +--- /dev/null ++++ b/gcc/config/xtensa/uclinux.opt +@@ -0,0 +1,32 @@ ++; Xtensa uClinux options. ++ ++; Copyright (C) 2015 Free Software Foundation, Inc. ++; ++; This file is part of GCC. ++; ++; GCC is free software; you can redistribute it and/or modify it under ++; the terms of the GNU General Public License as published by the Free ++; Software Foundation; either version 3, or (at your option) any later ++; version. ++; ++; GCC 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 GCC; see the file COPYING3. If not see ++; . ++ ++; See the GCC internals manual (options.texi) for a description of ++; this file's format. ++ ++; Please try to keep this file in ASCII collating order. ++ ++elf2flt ++Driver ++ ++elf2flt= ++Driver JoinedOrMissing ++ ++; This comment is to ensure we retain the blank line above. +diff --git a/libgcc/config.host b/libgcc/config.host +index 2c64756..2ee92c1 100644 +--- a/libgcc/config.host ++++ b/libgcc/config.host +@@ -1295,6 +1295,11 @@ xtensa*-*-linux*) + tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc" + md_unwind_header=xtensa/linux-unwind.h + ;; ++xtensa*-*-uclinux*) ++ tmake_file="$tmake_file xtensa/t-xtensa xtensa/t-linux t-slibgcc-libgcc" ++ md_unwind_header=xtensa/linux-unwind.h ++ extra_parts="$extra_parts crtbeginS.o crtbeginT.o crtendS.o" ++ ;; + am33_2.0-*-linux*) + # Don't need crtbeginT.o from *-*-linux* default. + extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" +-- +1.8.1.4 + diff --git a/package/gcc/5.3.0/890-fix-m68k-compile.patch b/package/gcc/5.3.0/890-fix-m68k-compile.patch new file mode 100644 index 0000000000..6e63de0cd1 --- /dev/null +++ b/package/gcc/5.3.0/890-fix-m68k-compile.patch @@ -0,0 +1,15 @@ +remove unused header, which breaks the toolchain building + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c gcc-5.3.0/libgcc/config/m68k/linux-atomic.c +--- gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c 2015-01-05 13:33:28.000000000 +0100 ++++ gcc-5.3.0/libgcc/config/m68k/linux-atomic.c 2016-03-19 09:25:07.000000000 +0100 +@@ -33,7 +33,6 @@ + using the kernel helper defined below. There is no support for + 64-bit operations yet. */ + +-#include + #include + + #ifndef __NR_atomic_cmpxchg_32 diff --git a/package/gcc/5.3.0/891-fix-m68k-uclinux.patch b/package/gcc/5.3.0/891-fix-m68k-uclinux.patch new file mode 100644 index 0000000000..4e186bd3d3 --- /dev/null +++ b/package/gcc/5.3.0/891-fix-m68k-uclinux.patch @@ -0,0 +1,18 @@ +avoids internal compiler error while compiling linux-atomic.c +See here: +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833 + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-5.3.0.orig/libgcc/config.host gcc-5.3.0/libgcc/config.host +--- gcc-5.3.0.orig/libgcc/config.host 2015-10-01 14:01:18.000000000 +0200 ++++ gcc-5.3.0/libgcc/config.host 2016-04-26 21:30:25.353691745 +0200 +@@ -794,7 +794,7 @@ + m68k*-*-openbsd*) + ;; + m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc +- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux" ++ tmake_file="$tmake_file m68k/t-floatlib" + md_unwind_header=m68k/linux-unwind.h + ;; + m68k-*-linux*) # Motorola m68k's running GNU/Linux diff --git a/package/gcc/5.3.0/900-libitm-fixes-for-musl-support.patch b/package/gcc/5.3.0/900-libitm-fixes-for-musl-support.patch new file mode 100644 index 0000000000..fdf4ee724d --- /dev/null +++ b/package/gcc/5.3.0/900-libitm-fixes-for-musl-support.patch @@ -0,0 +1,65 @@ +From: ktkachov +Date: Wed, 22 Apr 2015 14:11:25 +0000 (+0000) +Subject: libitm fixes for musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=e53a4d49c3d03ab8eaddb073cf972c1c46d75338 + +libitm fixes for musl support + +On behalf of Szabolcs.Nagy@arm.com + +2015-04-22 Gregor Richards + + * config/arm/hwcap.cc: Use fcntl.h instead of sys/fcntl.h. + * config/linux/x86/tls.h: Only use __GLIBC_PREREQ if defined. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222325 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +Index: b/libitm/config/arm/hwcap.cc +=================================================================== +--- a/libitm/config/arm/hwcap.cc ++++ b/libitm/config/arm/hwcap.cc +@@ -40,7 +40,7 @@ + + #ifdef __linux__ + #include +-#include ++#include + #include + + static void __attribute__((constructor)) +Index: b/libitm/config/linux/x86/tls.h +=================================================================== +--- a/libitm/config/linux/x86/tls.h ++++ b/libitm/config/linux/x86/tls.h +@@ -25,16 +25,19 @@ + #ifndef LIBITM_X86_TLS_H + #define LIBITM_X86_TLS_H 1 + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + /* Use slots in the TCB head rather than __thread lookups. + GLIBC has reserved words 10 through 13 for TM. */ + #define HAVE_ARCH_GTM_THREAD 1 + #define HAVE_ARCH_GTM_THREAD_DISP 1 + #endif ++#endif + + #include "config/generic/tls.h" + +-#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) ++#if defined(__GLIBC_PREREQ) ++#if __GLIBC_PREREQ(2, 10) + namespace GTM HIDDEN { + + #ifdef __x86_64__ +@@ -101,5 +104,6 @@ + + } // namespace GTM + #endif /* >= GLIBC 2.10 */ ++#endif + + #endif // LIBITM_X86_TLS_H diff --git a/package/gcc/5.3.0/901-fixincludes-update-for-musl-support.patch b/package/gcc/5.3.0/901-fixincludes-update-for-musl-support.patch new file mode 100644 index 0000000000..13c08d6b96 --- /dev/null +++ b/package/gcc/5.3.0/901-fixincludes-update-for-musl-support.patch @@ -0,0 +1,32 @@ +From: ktkachov +Date: Wed, 22 Apr 2015 14:18:16 +0000 (+0000) +Subject: fixincludes update for musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2dc727de2e87c2756a514cbb43cea23c99deaa3d + +fixincludes update for musl support + +On behalf of Szabolcs.Nagy@arm.com + +2015-04-22 Gregor Richards + + * mkfixinc.sh: Add *-musl* with no fixes. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222327 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +Index: b/fixincludes/mkfixinc.sh +=================================================================== +--- a/fixincludes/mkfixinc.sh ++++ b/fixincludes/mkfixinc.sh +@@ -19,7 +19,8 @@ + powerpc-*-eabi* | \ + powerpc-*-rtems* | \ + powerpcle-*-eabisim* | \ +- powerpcle-*-eabi* ) ++ powerpcle-*-eabi* | \ ++ *-musl* ) + # IF there is no include fixing, + # THEN create a no-op fixer and exit + (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} diff --git a/package/gcc/5.3.0/902-unwind-fix-for-musl.patch b/package/gcc/5.3.0/902-unwind-fix-for-musl.patch new file mode 100644 index 0000000000..ef470540d9 --- /dev/null +++ b/package/gcc/5.3.0/902-unwind-fix-for-musl.patch @@ -0,0 +1,36 @@ +From: ktkachov +Date: Wed, 22 Apr 2015 14:20:01 +0000 (+0000) +Subject: unwind fix for musl +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a2e31d0681d8a47389b8a3552622fbd9827bcef4 + +unwind fix for musl + +On behalf of szabolcs.nagy@arm.com + +2015-04-22 Gregor Richards + Szabolcs Nagy + + * unwind-dw2-fde-dip.c (USE_PT_GNU_EH_FRAME): Define it on + Linux if target provides dl_iterate_phdr. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222328 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +Index: b/libgcc/unwind-dw2-fde-dip.c +=================================================================== +--- a/libgcc/unwind-dw2-fde-dip.c ++++ b/libgcc/unwind-dw2-fde-dip.c +@@ -59,6 +59,12 @@ + + #if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ + && defined(TARGET_DL_ITERATE_PHDR) \ ++ && defined(__linux__) ++# define USE_PT_GNU_EH_FRAME ++#endif ++ ++#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ ++ && defined(TARGET_DL_ITERATE_PHDR) \ + && (defined(__DragonFly__) || defined(__FreeBSD__)) + # define ElfW __ElfN + # define USE_PT_GNU_EH_FRAME diff --git a/package/gcc/5.3.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch b/package/gcc/5.3.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch new file mode 100644 index 0000000000..c852131258 --- /dev/null +++ b/package/gcc/5.3.0/903-libstdc++-libgfortran-gthr-workaround-for-musl.patch @@ -0,0 +1,80 @@ +From: ktkachov +Date: Wed, 22 Apr 2015 14:24:11 +0000 (+0000) +Subject: libstdc++, libgfortran gthr workaround for musl +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=1e5f711c11cb80ce609db9e9c1d8b2da0f7b5b61 + +libstdc++, libgfortran gthr workaround for musl + +On behalf of szabolcs.nagy@arm.com + +[libstdc++-v3/] +2015-04-22 Szabolcs Nagy + + * config/os/generic/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK): Define. + * configure.host (os_include_dir): Set to "os/generic" for linux-musl*. + +[libgfortran/] +2015-04-22 Szabolcs Nagy + + * acinclude.m4 (GTHREAD_USE_WEAK): Define as 0 for *-*-musl*. + * configure: Regenerate. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222329 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +Index: b/libgfortran/acinclude.m4 +=================================================================== +--- a/libgfortran/acinclude.m4 ++++ b/libgfortran/acinclude.m4 +@@ -100,7 +100,7 @@ + [Define to 1 if the target supports #pragma weak]) + fi + case "$host" in +- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) ++ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) + AC_DEFINE(GTHREAD_USE_WEAK, 0, + [Define to 0 if the target shouldn't use #pragma weak]) + ;; +Index: b/libgfortran/configure +=================================================================== +--- a/libgfortran/configure ++++ b/libgfortran/configure +@@ -26447,7 +26447,7 @@ + + fi + case "$host" in +- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* ) ++ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-musl* ) + + $as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h + +Index: b/libstdc++-v3/config/os/generic/os_defines.h +=================================================================== +--- a/libstdc++-v3/config/os/generic/os_defines.h ++++ b/libstdc++-v3/config/os/generic/os_defines.h +@@ -33,4 +33,9 @@ + // System-specific #define, typedefs, corrections, etc, go here. This + // file will come before all others. + ++// Disable the weak reference logic in gthr.h for os/generic because it ++// is broken on every platform unless there is implementation specific ++// workaround in gthr-posix.h and at link-time for static linking. ++#define _GLIBCXX_GTHREAD_USE_WEAK 0 ++ + #endif +Index: b/libstdc++-v3/configure.host +=================================================================== +--- a/libstdc++-v3/configure.host ++++ b/libstdc++-v3/configure.host +@@ -271,6 +271,9 @@ + freebsd*) + os_include_dir="os/bsd/freebsd" + ;; ++ linux-musl*) ++ os_include_dir="os/generic" ++ ;; + gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) + if [ "$uclibc" = "yes" ]; then + os_include_dir="os/uclibc" diff --git a/package/gcc/5.3.0/904-musl-libc-config.patch b/package/gcc/5.3.0/904-musl-libc-config.patch new file mode 100644 index 0000000000..85491406cf --- /dev/null +++ b/package/gcc/5.3.0/904-musl-libc-config.patch @@ -0,0 +1,285 @@ +From: ktkachov +Date: Fri, 8 May 2015 08:25:47 +0000 (+0000) +Subject: [PATCH 2/13] musl libc config +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=a9173ceabaf29c16f8ef226fbf98af373a4b2ceb + +[PATCH 2/13] musl libc config + +2015-05-08 Gregor Richards + Szabolcs Nagy + + * config.gcc (LIBC_MUSL): New tm_defines macro. + * config/linux.h (OPTION_MUSL): Define. + (MUSL_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER32,) + (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32,) + (INCLUDE_DEFAULTS_MUSL_GPP, INCLUDE_DEFAULTS_MUSL_LOCAL,) + (INCLUDE_DEFAULTS_MUSL_PREFIX, INCLUDE_DEFAULTS_MUSL_CROSS,) + (INCLUDE_DEFAULTS_MUSL_TOOL, INCLUDE_DEFAULTS_MUSL_NATIVE): Define. + * config/linux.opt (mmusl): New option. + * doc/invoke.texi (GNU/Linux Options): Document -mmusl. + * configure.ac (gcc_cv_libc_provides_ssp): Add *-*-musl*. + (gcc_cv_target_dl_iterate_phdr): Add *-linux-musl*. + * configure: Regenerate. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222904 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +Index: b/gcc/config.gcc +=================================================================== +--- a/gcc/config.gcc ++++ b/gcc/config.gcc +@@ -575,7 +575,7 @@ + esac + + # Common C libraries. +-tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" ++tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" + + # 32-bit x86 processors supported by --with-arch=. Each processor + # MUST be separated by exactly one space. +@@ -720,6 +720,9 @@ + *-*-*uclibc*) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" + ;; ++ *-*-*musl*) ++ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" ++ ;; + *) + tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" + ;; +Index: b/gcc/config/linux.h +=================================================================== +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -32,10 +32,12 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ +@@ -50,21 +52,25 @@ + } while (0) + + /* Determine which dynamic linker to use depending on whether GLIBC or +- uClibc or Bionic is the default C library and whether +- -muclibc or -mglibc or -mbionic has been passed to change the default. */ ++ uClibc or Bionic or musl is the default C library and whether ++ -muclibc or -mglibc or -mbionic or -mmusl has been passed to change ++ the default. */ + +-#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ +- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" ++#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ ++ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" + + #if DEFAULT_LIBC == LIBC_GLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) + #elif DEFAULT_LIBC == LIBC_UCLIBC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) + #elif DEFAULT_LIBC == LIBC_BIONIC +-#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ +- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) ++#elif DEFAULT_LIBC == LIBC_MUSL ++#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ ++ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) + #else + #error "Unsupported DEFAULT_LIBC" + #endif /* DEFAULT_LIBC */ +@@ -81,24 +87,100 @@ + #define BIONIC_DYNAMIC_LINKER32 "/system/bin/linker" + #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" + #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" ++/* Should be redefined for each target that supports musl. */ ++#define MUSL_DYNAMIC_LINKER "/dev/null" ++#define MUSL_DYNAMIC_LINKER32 "/dev/null" ++#define MUSL_DYNAMIC_LINKER64 "/dev/null" ++#define MUSL_DYNAMIC_LINKERX32 "/dev/null" + + #define GNU_USER_DYNAMIC_LINKER \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ +- BIONIC_DYNAMIC_LINKER) ++ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) + #define GNU_USER_DYNAMIC_LINKER32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ +- BIONIC_DYNAMIC_LINKER32) ++ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) + #define GNU_USER_DYNAMIC_LINKER64 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ +- BIONIC_DYNAMIC_LINKER64) ++ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) + #define GNU_USER_DYNAMIC_LINKERX32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ +- BIONIC_DYNAMIC_LINKERX32) ++ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKERX32) + + /* Whether we have Bionic libc runtime */ + #undef TARGET_HAS_BIONIC + #define TARGET_HAS_BIONIC (OPTION_BIONIC) + ++/* musl avoids problematic includes by rearranging the include directories. ++ * Unfortunately, this is mostly duplicated from cppdefault.c */ ++#if DEFAULT_LIBC == LIBC_MUSL ++#define INCLUDE_DEFAULTS_MUSL_GPP \ ++ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ ++ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ ++ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ ++ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, ++ ++#ifdef LOCAL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_LOCAL \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ ++ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_LOCAL ++#endif ++ ++#ifdef PREFIX_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_PREFIX ++#endif ++ ++#ifdef CROSS_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_CROSS \ ++ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#ifdef TOOL_INCLUDE_DIR ++#define INCLUDE_DEFAULTS_MUSL_TOOL \ ++ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, ++#else ++#define INCLUDE_DEFAULTS_MUSL_TOOL ++#endif ++ ++#ifdef NATIVE_SYSTEM_HEADER_DIR ++#define INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ ++ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, ++#else ++#define INCLUDE_DEFAULTS_MUSL_NATIVE ++#endif ++ ++#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) ++# undef INCLUDE_DEFAULTS_MUSL_LOCAL ++# define INCLUDE_DEFAULTS_MUSL_LOCAL ++# undef INCLUDE_DEFAULTS_MUSL_NATIVE ++# define INCLUDE_DEFAULTS_MUSL_NATIVE ++#else ++# undef INCLUDE_DEFAULTS_MUSL_CROSS ++# define INCLUDE_DEFAULTS_MUSL_CROSS ++#endif ++ ++#undef INCLUDE_DEFAULTS ++#define INCLUDE_DEFAULTS \ ++ { \ ++ INCLUDE_DEFAULTS_MUSL_GPP \ ++ INCLUDE_DEFAULTS_MUSL_PREFIX \ ++ INCLUDE_DEFAULTS_MUSL_CROSS \ ++ INCLUDE_DEFAULTS_MUSL_TOOL \ ++ INCLUDE_DEFAULTS_MUSL_NATIVE \ ++ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ ++ { 0, 0, 0, 0, 0, 0 } \ ++ } ++#endif ++ + #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ + /* This is a *uclinux* target. We don't define below macros to normal linux + versions, because doing so would require *uclinux* targets to include +Index: b/gcc/config/linux.opt +=================================================================== +--- a/gcc/config/linux.opt ++++ b/gcc/config/linux.opt +@@ -28,5 +28,9 @@ + Use GNU C library + + muclibc +-Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) ++Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mmusl) + Use uClibc C library ++ ++mmusl ++Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mbionic) ++Use musl C library +Index: b/gcc/configure +=================================================================== +--- a/gcc/configure ++++ b/gcc/configure +@@ -27809,6 +27813,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +Index: b/gcc/configure.ac +=================================================================== +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -5298,6 +5302,9 @@ + gcc_cv_target_dl_iterate_phdr=no + fi + ;; ++ *-linux-musl*) ++ gcc_cv_target_dl_iterate_phdr=yes ++ ;; + esac + GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) + if test x$gcc_cv_target_dl_iterate_phdr = xyes; then +Index: b/gcc/doc/invoke.texi +=================================================================== +--- a/gcc/doc/invoke.texi ++++ b/gcc/doc/invoke.texi +@@ -667,7 +667,7 @@ + -mcpu=@var{cpu}} + + @emph{GNU/Linux Options} +-@gccoptlist{-mglibc -muclibc -mbionic -mandroid @gol ++@gccoptlist{-mglibc -muclibc -mmusl -mbionic -mandroid @gol + -tno-android-cc -tno-android-ld} + + @emph{H8/300 Options} +@@ -15324,13 +15324,19 @@ + @item -mglibc + @opindex mglibc + Use the GNU C library. This is the default except +-on @samp{*-*-linux-*uclibc*} and @samp{*-*-linux-*android*} targets. ++on @samp{*-*-linux-*uclibc*}, @samp{*-*-linux-*musl*} and ++@samp{*-*-linux-*android*} targets. + + @item -muclibc + @opindex muclibc + Use uClibc C library. This is the default on + @samp{*-*-linux-*uclibc*} targets. + ++@item -mmusl ++@opindex mmusl ++Use the musl C library. This is the default on ++@samp{*-*-linux-*musl*} targets. ++ + @item -mbionic + @opindex mbionic + Use Bionic C library. This is the default on diff --git a/package/gcc/5.3.0/905-add-musl-support-to-gcc.patch b/package/gcc/5.3.0/905-add-musl-support-to-gcc.patch new file mode 100644 index 0000000000..92e743685b --- /dev/null +++ b/package/gcc/5.3.0/905-add-musl-support-to-gcc.patch @@ -0,0 +1,130 @@ +From: ktkachov +Date: Fri, 8 May 2015 08:30:40 +0000 (+0000) +Subject: [PATCH 0/13] Add musl support to GCC +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=f2d678afa5b8385d763b93772d73d6bf80a9739e + +[PATCH 0/13] Add musl support to GCC + +2015-05-08 Szabolcs Nagy + + * config/glibc-stdint.h (OPTION_MUSL): Define. + (INT_FAST16_TYPE, INT_FAST32_TYPE, UINT_FAST16_TYPE, UINT_FAST32_TYPE): + Change the definition based on OPTION_MUSL for 64 bit targets. + * config/linux.h (OPTION_MUSL): Redefine. + * config/alpha/linux.h (OPTION_MUSL): Redefine. + * config/rs6000/linux.h (OPTION_MUSL): Redefine. + * config/rs6000/linux64.h (OPTION_MUSL): Redefine. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222905 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +Index: b/gcc/config/alpha/linux.h +=================================================================== +--- a/gcc/config/alpha/linux.h ++++ b/gcc/config/alpha/linux.h +@@ -61,10 +61,14 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#undef OPTION_MUSL ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#undef OPTION_MUSL ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + /* Determine what functions are present at the runtime; +Index: b/gcc/config/glibc-stdint.h +=================================================================== +--- a/gcc/config/glibc-stdint.h ++++ b/gcc/config/glibc-stdint.h +@@ -22,6 +22,12 @@ + see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + . */ + ++/* Systems using musl libc should use this header and make sure ++ OPTION_MUSL is defined correctly before using the TYPE macros. */ ++#ifndef OPTION_MUSL ++#define OPTION_MUSL 0 ++#endif ++ + #define SIG_ATOMIC_TYPE "int" + + #define INT8_TYPE "signed char" +@@ -43,12 +49,12 @@ + #define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") + + #define INT_FAST8_TYPE "signed char" +-#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") +-#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") ++#define INT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") ++#define INT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long int" : "int") + #define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int") + #define UINT_FAST8_TYPE "unsigned char" +-#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") +-#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int") ++#define UINT_FAST16_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") ++#define UINT_FAST32_TYPE (LONG_TYPE_SIZE == 64 && !OPTION_MUSL ? "long unsigned int" : "unsigned int") + #define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int") + + #define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int") +Index: b/gcc/config/linux.h +=================================================================== +--- a/gcc/config/linux.h ++++ b/gcc/config/linux.h +@@ -32,11 +32,13 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#undef OPTION_MUSL + #define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#undef OPTION_MUSL + #define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + +Index: b/gcc/config/rs6000/linux.h +=================================================================== +--- a/gcc/config/rs6000/linux.h ++++ b/gcc/config/rs6000/linux.h +@@ -30,10 +30,14 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#undef OPTION_MUSL ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#undef OPTION_MUSL ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + /* Determine what functions are present at the runtime; +Index: b/gcc/config/rs6000/linux64.h +=================================================================== +--- a/gcc/config/rs6000/linux64.h ++++ b/gcc/config/rs6000/linux64.h +@@ -299,10 +299,14 @@ + #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) + #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) + #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) ++#undef OPTION_MUSL ++#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) + #else + #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) + #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) + #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) ++#undef OPTION_MUSL ++#define OPTION_MUSL (linux_libc == LIBC_MUSL) + #endif + + /* Determine what functions are present at the runtime; diff --git a/package/gcc/5.3.0/906-mips-musl-support.patch b/package/gcc/5.3.0/906-mips-musl-support.patch new file mode 100644 index 0000000000..6b473f9898 --- /dev/null +++ b/package/gcc/5.3.0/906-mips-musl-support.patch @@ -0,0 +1,37 @@ +From: ktkachov +Date: Fri, 8 May 2015 15:16:50 +0000 (+0000) +Subject: [PATCH 6/13] mips musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=2550b6a866c887472b587bef87d433c51cf1ebc8 + +[PATCH 6/13] mips musl support + +2015-05-08 Gregor Richards + Szabolcs Nagy + + * config/mips/linux.h (MUSL_DYNAMIC_LINKER32): Define. + (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERN32): Define. + (GNU_USER_DYNAMIC_LINKERN32): Update. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222915 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +Index: b/gcc/config/mips/linux.h +=================================================================== +--- a/gcc/config/mips/linux.h ++++ b/gcc/config/mips/linux.h +@@ -37,7 +37,13 @@ + #define UCLIBC_DYNAMIC_LINKERN32 \ + "%{mnan=2008:/lib32/ld-uClibc-mipsn8.so.0;:/lib32/ld-uClibc.so.0}" + ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-mips%{EL:el}%{msoft-float:-sf}.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-mips64%{EL:el}%{msoft-float:-sf}.so.1" ++#define MUSL_DYNAMIC_LINKERN32 "/lib/ld-musl-mipsn32%{EL:el}%{msoft-float:-sf}.so.1" ++ + #define BIONIC_DYNAMIC_LINKERN32 "/system/bin/linker32" + #define GNU_USER_DYNAMIC_LINKERN32 \ + CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERN32, UCLIBC_DYNAMIC_LINKERN32, \ +- BIONIC_DYNAMIC_LINKERN32) ++ BIONIC_DYNAMIC_LINKERN32, MUSL_DYNAMIC_LINKERN32) diff --git a/package/gcc/5.3.0/907-x86-musl-support.patch b/package/gcc/5.3.0/907-x86-musl-support.patch new file mode 100644 index 0000000000..3f2fe5df77 --- /dev/null +++ b/package/gcc/5.3.0/907-x86-musl-support.patch @@ -0,0 +1,45 @@ +From: ktkachov +Date: Fri, 15 May 2015 13:20:01 +0000 (+0000) +Subject: [PATCH 9/13] x86 musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=5551c8d927c17f60837f15f8dfe46f945ba3fa9c + +[PATCH 9/13] x86 musl support + +On behalf of Szabolcs Nagy. + +2015-05-15 Gregor Richards + + * config/i386/linux.h (MUSL_DYNAMIC_LINKER): Define. + * config/i386/linux64.h (MUSL_DYNAMIC_LINKER32): Define. + (MUSL_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKERX32): Define. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223218 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +Index: b/gcc/config/i386/linux.h +=================================================================== +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -21,3 +21,6 @@ + + #define GNU_USER_LINK_EMULATION "elf_i386" + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" ++ ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" +Index: b/gcc/config/i386/linux64.h +=================================================================== +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -30,3 +30,10 @@ + #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" + #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" + #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" ++ ++#undef MUSL_DYNAMIC_LINKER32 ++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" ++#undef MUSL_DYNAMIC_LINKER64 ++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" ++#undef MUSL_DYNAMIC_LINKERX32 ++#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" diff --git a/package/gcc/5.3.0/908-arm-musl-support.patch b/package/gcc/5.3.0/908-arm-musl-support.patch new file mode 100644 index 0000000000..906355a79a --- /dev/null +++ b/package/gcc/5.3.0/908-arm-musl-support.patch @@ -0,0 +1,45 @@ +From: ktkachov +Date: Wed, 27 May 2015 13:17:11 +0000 (+0000) +Subject: [PATCH 4/13] arm musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=de799bd087ab9a179768fea75bd195a31d3432a4 + +[PATCH 4/13] arm musl support + +On behalf of szabolcs.nagy@arm.com + +2015-05-27 Gregor Richards + + * config/arm/linux-eabi.h (MUSL_DYNAMIC_LINKER): Define. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223749 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +Index: b/gcc/config/arm/linux-eabi.h +=================================================================== +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -77,6 +77,23 @@ + %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ + %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" + ++/* For ARM musl currently supports four dynamic linkers: ++ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI ++ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI ++ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB ++ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB ++ musl does not support the legacy OABI mode. ++ All the dynamic linkers live in /lib. ++ We default to soft-float, EL. */ ++#undef MUSL_DYNAMIC_LINKER ++#if TARGET_BIG_ENDIAN_DEFAULT ++#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" ++#else ++#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" ++#endif ++#define MUSL_DYNAMIC_LINKER \ ++ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" ++ + /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to + use the GNU/Linux version, not the generic BPABI version. */ + #undef LINK_SPEC diff --git a/package/gcc/5.3.0/909-aarch64-musl-support.patch b/package/gcc/5.3.0/909-aarch64-musl-support.patch new file mode 100644 index 0000000000..3d032f51bc --- /dev/null +++ b/package/gcc/5.3.0/909-aarch64-musl-support.patch @@ -0,0 +1,33 @@ +From: jgreenhalgh +Date: Wed, 27 May 2015 16:46:39 +0000 (+0000) +Subject: [PATCH 3/13] aarch64 musl support +X-Git-Url: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff_plain;h=b3ff21cf0531be91bc3fb8200296a7633090ec78 + +[PATCH 3/13] aarch64 musl support + +gcc/Changelog: + +2015-05-27 Gregor Richards + Szabolcs Nagy + + * config/aarch64/aarch64-linux.h (MUSL_DYNAMIC_LINKER): Define. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223766 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + +Index: b/gcc/config/aarch64/aarch64-linux.h +=================================================================== +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -23,6 +23,9 @@ + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + ++#undef MUSL_DYNAMIC_LINKER ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++ + #undef ASAN_CC1_SPEC + #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" + diff --git a/package/gcc/5.3.0/930-libgcc-disable-split-stack-nothreads.patch b/package/gcc/5.3.0/930-libgcc-disable-split-stack-nothreads.patch new file mode 100644 index 0000000000..07f9a7395b --- /dev/null +++ b/package/gcc/5.3.0/930-libgcc-disable-split-stack-nothreads.patch @@ -0,0 +1,14 @@ +disable split-stack for non-thread builds + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-5.3.0.orig/libgcc/config/t-stack gcc-5.3.0/libgcc/config/t-stack +--- gcc-5.3.0.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200 ++++ gcc-5.3.0/libgcc/config/t-stack 2016-03-07 03:25:32.000000000 +0100 +@@ -1,4 +1,6 @@ + # Makefile fragment to provide generic support for -fsplit-stack. + # This should be used in config.host for any host which supports + # -fsplit-stack. ++ifeq ($(enable_threads),yes) + LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c ++endif diff --git a/package/gcc/6.1.0/100-uclibc-conf.patch b/package/gcc/6.1.0/100-uclibc-conf.patch new file mode 100644 index 0000000000..73d1f0d3a9 --- /dev/null +++ b/package/gcc/6.1.0/100-uclibc-conf.patch @@ -0,0 +1,15 @@ +Index: b/contrib/regression/objs-gcc.sh +=================================================================== +--- a/contrib/regression/objs-gcc.sh ++++ b/contrib/regression/objs-gcc.sh +@@ -106,6 +106,10 @@ + then + make all-gdb all-dejagnu all-ld || exit 1 + make install-gdb install-dejagnu install-ld || exit 1 ++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ] ++ then ++ make all-gdb all-dejagnu all-ld || exit 1 ++ make install-gdb install-dejagnu install-ld || exit 1 + elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then + make bootstrap || exit 1 + make install || exit 1 diff --git a/package/gcc/6.1.0/301-missing-execinfo_h.patch b/package/gcc/6.1.0/301-missing-execinfo_h.patch new file mode 100644 index 0000000000..2d0e7baa44 --- /dev/null +++ b/package/gcc/6.1.0/301-missing-execinfo_h.patch @@ -0,0 +1,13 @@ +Index: b/boehm-gc/include/gc.h +=================================================================== +--- a/boehm-gc/include/gc.h ++++ b/boehm-gc/include/gc.h +@@ -503,7 +503,7 @@ + #if defined(__linux__) || defined(__GLIBC__) + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif diff --git a/package/gcc/6.1.0/810-arm-softfloat-libgcc.patch b/package/gcc/6.1.0/810-arm-softfloat-libgcc.patch new file mode 100644 index 0000000000..5efa7fd1bc --- /dev/null +++ b/package/gcc/6.1.0/810-arm-softfloat-libgcc.patch @@ -0,0 +1,30 @@ +Index: b/gcc/config/arm/linux-elf.h +=================================================================== +--- a/gcc/config/arm/linux-elf.h ++++ b/gcc/config/arm/linux-elf.h +@@ -60,7 +60,7 @@ + %{shared:-lc} \ + %{!shared:%{profile:-lc_p}%{!profile:-lc}}" + +-#define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" ++#define LIBGCC_SPEC "-lgcc" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" + +Index: b/libgcc/config/arm/t-linux +=================================================================== +--- a/libgcc/config/arm/t-linux ++++ b/libgcc/config/arm/t-linux +@@ -1,6 +1,11 @@ + LIB1ASMSRC = arm/lib1funcs.S + LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx _clzsi2 _clzdi2 \ +- _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 ++ _ctzsi2 _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_addsubdf3 _arm_addsubsf3 \ ++ _arm_negdf2 _arm_muldivdf3 _arm_cmpdf2 _arm_unorddf2 \ ++ _arm_fixdfsi _arm_fixunsdfsi _arm_truncdfsf2 \ ++ _arm_negsf2 _arm_muldivsf3 _arm_cmpsf2 _arm_unordsf2 \ ++ _arm_fixsfsi _arm_fixunssfsi + + # Just for these, we omit the frame pointer since it makes such a big + # difference. diff --git a/package/gcc/6.1.0/830-arm_unbreak_armv4t.patch b/package/gcc/6.1.0/830-arm_unbreak_armv4t.patch new file mode 100644 index 0000000000..b730059183 --- /dev/null +++ b/package/gcc/6.1.0/830-arm_unbreak_armv4t.patch @@ -0,0 +1,15 @@ +http://sourceware.org/ml/crossgcc/2008-05/msg00009.html + +Index: b/gcc/config/arm/linux-eabi.h +=================================================================== +--- a/gcc/config/arm/linux-eabi.h ++++ b/gcc/config/arm/linux-eabi.h +@@ -45,7 +45,7 @@ + The ARM10TDMI core is the default for armv5t, so set + SUBTARGET_CPU_DEFAULT to achieve this. */ + #undef SUBTARGET_CPU_DEFAULT +-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi ++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi + + /* TARGET_BIG_ENDIAN_DEFAULT is set in + config.gcc for big endian configurations. */ diff --git a/package/gcc/6.1.0/860-cilk-wchar.patch b/package/gcc/6.1.0/860-cilk-wchar.patch new file mode 100644 index 0000000000..1d9916f554 --- /dev/null +++ b/package/gcc/6.1.0/860-cilk-wchar.patch @@ -0,0 +1,56 @@ +[PATCH] cilk: fix build without wchar + +When building against uClibc with wchar support disabled, WCHAR_MIN and +WCHAR_MAX are not defined leading to compilation errors. + +Fix it by only including the wchar code if available. + +Signed-off-by: Peter Korsgaard +--- + libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +Index: b/libcilkrts/include/cilk/reducer_min_max.h +=================================================================== +--- a/libcilkrts/include/cilk/reducer_min_max.h ++++ b/libcilkrts/include/cilk/reducer_min_max.h +@@ -3154,7 +3154,9 @@ + CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN) + CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0) + CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN) ++#ifdef WCHAR_MIN + CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) ++#endif + CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN) + CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0) + CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN) +@@ -3306,7 +3308,9 @@ + CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN) ++#ifdef WCHAR_MIN + CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN) ++#endif + CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0) + CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN) +@@ -3432,7 +3436,9 @@ + CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX) + CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX) + CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX) ++#ifdef WCHAR_MAX + CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) ++#endif + CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX) + CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX) + CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX) +@@ -3584,7 +3590,9 @@ + CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX) ++#ifdef WCHAR_MAX + CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX) ++#endif + CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX) + CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX) diff --git a/package/gcc/6.1.0/890-fix-m68k-compile.patch b/package/gcc/6.1.0/890-fix-m68k-compile.patch new file mode 100644 index 0000000000..6e63de0cd1 --- /dev/null +++ b/package/gcc/6.1.0/890-fix-m68k-compile.patch @@ -0,0 +1,15 @@ +remove unused header, which breaks the toolchain building + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c gcc-5.3.0/libgcc/config/m68k/linux-atomic.c +--- gcc-5.3.0.orig/libgcc/config/m68k/linux-atomic.c 2015-01-05 13:33:28.000000000 +0100 ++++ gcc-5.3.0/libgcc/config/m68k/linux-atomic.c 2016-03-19 09:25:07.000000000 +0100 +@@ -33,7 +33,6 @@ + using the kernel helper defined below. There is no support for + 64-bit operations yet. */ + +-#include + #include + + #ifndef __NR_atomic_cmpxchg_32 diff --git a/package/gcc/6.1.0/891-fix-m68k-uclinux.patch b/package/gcc/6.1.0/891-fix-m68k-uclinux.patch new file mode 100644 index 0000000000..754aa74e88 --- /dev/null +++ b/package/gcc/6.1.0/891-fix-m68k-uclinux.patch @@ -0,0 +1,18 @@ +avoids internal compiler error while compiling linux-atomic.c +See here: +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833 + +Signed-off-by: Waldemar Brodkorb + +diff -Nur gcc-6.1.0.orig/libgcc/config.host gcc-6.1.0/libgcc/config.host +--- gcc-6.1.0.orig/libgcc/config.host 2016-02-26 21:02:28.000000000 +0100 ++++ gcc-6.1.0/libgcc/config.host 2016-04-29 09:18:40.377989160 +0200 +@@ -812,7 +812,7 @@ + m68k*-*-openbsd*) + ;; + m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc +- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux" ++ tmake_file="$tmake_file m68k/t-floatlib" + md_unwind_header=m68k/linux-unwind.h + ;; + m68k-*-linux*) # Motorola m68k's running GNU/Linux diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host new file mode 100644 index 0000000000..ee4d0eb9f4 --- /dev/null +++ b/package/gcc/Config.in.host @@ -0,0 +1,172 @@ +comment "GCC Options" + +config BR2_GCC_NEEDS_MPC + bool + +config BR2_GCC_SUPPORTS_GRAPHITE + bool + +choice + prompt "GCC compiler Version" + default BR2_GCC_VERSION_4_8_ARC if BR2_arc + default BR2_GCC_VERSION_4_9_X + help + Select the version of gcc you wish to use. + + config BR2_GCC_VERSION_4_7_X + bool "gcc 4.7.x" + depends on BR2_DEPRECATED_SINCE_2016_05 + # Broken or unsupported architectures + depends on !BR2_microblaze && !BR2_aarch64 && !BR2_arc \ + && !BR2_powerpc64le && !BR2_nios2 + # Broken or unsupported ARM cores + depends on !BR2_cortex_a12 && !BR2_pj4 && !BR2_cortex_a17 + # Broken or unsupported PPC cores + depends on !BR2_powerpc_e5500 && !BR2_powerpc_e6500 && \ + !BR2_powerpc_power8 + # SPARC -mcpu=leon3 appeared in gcc 4.8.x + depends on !BR2_sparc_leon3 + # Broken or unsupported x86 cores + depends on !BR2_x86_jaguar && !BR2_x86_steamroller + # Unsupported for MIPS R6 + depends on !BR2_mips_32r6 && !BR2_mips_64r6 + select BR2_GCC_NEEDS_MPC + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + + config BR2_GCC_VERSION_4_8_X + bool "gcc 4.8.x" + # Broken or unsupported architectures + depends on !BR2_microblaze && !BR2_arc \ + && !BR2_powerpc64le && !BR2_nios2 + # Broken or unsupported ARM cores + depends on !BR2_cortex_a12 && !BR2_cortex_a17 + # Broken or unsupported PPC cores + depends on !BR2_powerpc_power8 + # gcc-4.8.x + binutils-2.25 is broken for MIPS + depends on !((BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el) && BR2_BINUTILS_VERSION_2_25_X) + # Unsupported for MIPS R6 + depends on !BR2_mips_32r6 && !BR2_mips_64r6 + select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + + config BR2_GCC_VERSION_4_8_ARC + bool "gcc 4.8-arc" + # Only supported architecture + depends on BR2_arc + select BR2_GCC_NEEDS_MPC + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + + + config BR2_GCC_VERSION_4_9_X + bool "gcc 4.9.x" + # Broken or unsupported architectures + depends on !BR2_arc + # Broken or unsupported ARM cores + depends on !BR2_cortex_a17 + # Unsupported for MIPS R6 + depends on !BR2_mips_32r6 && !BR2_mips_64r6 + # PR60102 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60102 + select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + + config BR2_GCC_VERSION_5_X + bool "gcc 5.x" + # Broken or unsupported architectures + depends on !BR2_arc + select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + + config BR2_GCC_VERSION_6_X + bool "gcc 6.x" + # Broken or unsupported architectures + depends on !BR2_arc + select BR2_GCC_NEEDS_MPC + select BR2_GCC_SUPPORTS_GRAPHITE + select BR2_TOOLCHAIN_GCC_AT_LEAST_6 + +endchoice + +config BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE + bool + default y + +config BR2_GCC_VERSION + string + default "4.7.4" if BR2_GCC_VERSION_4_7_X + default "4.8.5" if BR2_GCC_VERSION_4_8_X + default "4.9.3" if BR2_GCC_VERSION_4_9_X + default "5.3.0" if BR2_GCC_VERSION_5_X + default "6.1.0" if BR2_GCC_VERSION_6_X + default "arc-2015.12" if BR2_GCC_VERSION_4_8_ARC + +config BR2_EXTRA_GCC_CONFIG_OPTIONS + string "Additional gcc options" + default "" + help + Any additional gcc configure options you may want to + include. Those options are applied for all of the gcc + initial, gcc intermediate and gcc final passes. + +config BR2_TOOLCHAIN_BUILDROOT_CXX + bool "Enable C++ support" + select BR2_INSTALL_LIBSTDCPP + help + Enable this option if you want your toolchain to support the + C++ language and you want C++ libraries to be installed on + your target system. + +config BR2_TOOLCHAIN_BUILDROOT_FORTRAN + bool "Enable Fortran support" + help + Enable this option if you want your toolchain to support the + Fortran language and you want Fortran libraries to be + installed on your target system. + +config BR2_GCC_ENABLE_TLS + bool "Enable compiler tls support" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC + default y + depends on BR2_PTHREADS_NATIVE || BR2_TOOLCHAIN_BUILDROOT_EGLIBC || BR2_TOOLCHAIN_BUILDROOT_GLIBC + help + Enable the compiler to generate code for accessing + thread local storage variables + +config BR2_GCC_ENABLE_LTO + bool "Enable compiler link-time-optimization support" + select BR2_BINUTILS_ENABLE_LTO + help + This option enables link-time optimization (LTO) support in + gcc. + +config BR2_GCC_ENABLE_OPENMP + bool "Enable compiler OpenMP support" + depends on !BR2_PTHREADS_NONE && !BR2_arc && !BR2_microblaze + help + Enable OpenMP support for the compiler + +config BR2_GCC_ENABLE_LIBMUDFLAP + bool "Enable libmudflap support" + # There are architectures, or specific configurations for + # which mudflap is not supported. + depends on !BR2_ARM_INSTRUCTIONS_THUMB && !BR2_powerpc_SPE + depends on !BR2_GCC_VERSION_4_9_X + depends on !BR2_GCC_VERSION_5_X + depends on !BR2_GCC_VERSION_6_X + help + libmudflap is a gcc library used for the mudflap pointer + debugging functionality. It is only needed if you intend to + use the -fmudflap gcc flag. + + See http://gcc.gnu.org/wiki/Mudflap_Pointer_Debugging and + the help of the gcc -fmudflap option for more details. + + If you're unsure, leave this option disabled. + +config BR2_GCC_ENABLE_GRAPHITE + bool "Enable graphite support" + depends on BR2_GCC_SUPPORTS_GRAPHITE + help + This option enables the graphite optimizations in the + compiler. diff --git a/package/gcc/arc-2015.12/100-libstdcxx-uclibc-c99.patch b/package/gcc/arc-2015.12/100-libstdcxx-uclibc-c99.patch new file mode 100644 index 0000000000..0d02ef0fb6 --- /dev/null +++ b/package/gcc/arc-2015.12/100-libstdcxx-uclibc-c99.patch @@ -0,0 +1,273 @@ +Allow C99-depending features of libstdc++ with uClibc + +The libstdc++ code is fairly restrictive on how it checks for C99 +compatibility: it requires *complete* C99 support to enable certain +features. For example, uClibc provides a good number of C99 features, +but not C99 complex number support. For this reason, libstdc++ +completely disables many the standard C++ methods that can in fact +work because uClibc provides the necessary functions. + +This patch is similar and highly inspired from +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58393, but implemented in +a way that doesn't involve changing the configure.ac script, as +autoreconfiguring gcc is complicated. It simply relies on the fact +that uClibc defines the __UCLIBC__ definition. + +Signed-off-by: Thomas Petazzoni + +Index: b/libstdc++-v3/config/locale/generic/c_locale.h +=================================================================== +--- a/libstdc++-v3/config/locale/generic/c_locale.h ++++ b/libstdc++-v3/config/locale/generic/c_locale.h +@@ -70,7 +70,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +Index: b/libstdc++-v3/config/locale/gnu/c_locale.h +=================================================================== +--- a/libstdc++-v3/config/locale/gnu/c_locale.h ++++ b/libstdc++-v3/config/locale/gnu/c_locale.h +@@ -88,7 +88,7 @@ + __builtin_va_list __args; + __builtin_va_start(__args, __fmt); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + const int __ret = __builtin_vsnprintf(__out, __size, __fmt, __args); + #else + const int __ret = __builtin_vsprintf(__out, __fmt, __args); +Index: b/libstdc++-v3/include/bits/basic_string.h +=================================================================== +--- a/libstdc++-v3/include/bits/basic_string.h ++++ b/libstdc++-v3/include/bits/basic_string.h +@@ -2811,7 +2811,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99) \ ++#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__)) \ + && !defined(_GLIBCXX_HAVE_BROKEN_VSWPRINTF)) + + #include +Index: b/libstdc++-v3/include/bits/locale_facets.tcc +=================================================================== +--- a/libstdc++-v3/include/bits/locale_facets.tcc ++++ b/libstdc++-v3/include/bits/locale_facets.tcc +@@ -987,7 +987,7 @@ + char __fbuf[16]; + __num_base::_S_format_float(__io, __fbuf, __mod); + +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough (most probably sufficient + // for non-ios_base::fixed outputs) + int __cs_size = __max_digits * 3; +Index: b/libstdc++-v3/include/bits/locale_facets_nonio.tcc +=================================================================== +--- a/libstdc++-v3/include/bits/locale_facets_nonio.tcc ++++ b/libstdc++-v3/include/bits/locale_facets_nonio.tcc +@@ -572,7 +572,7 @@ + { + const locale __loc = __io.getloc(); + const ctype<_CharT>& __ctype = use_facet >(__loc); +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + // First try a buffer perhaps big enough. + int __cs_size = 64; + char* __cs = static_cast(__builtin_alloca(__cs_size)); +Index: b/libstdc++-v3/include/c_compatibility/math.h +=================================================================== +--- a/libstdc++-v3/include/c_compatibility/math.h ++++ b/libstdc++-v3/include/c_compatibility/math.h +@@ -56,7 +56,7 @@ + using std::floor; + using std::fmod; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::fpclassify; + using std::isfinite; + using std::isinf; +Index: b/libstdc++-v3/include/c_compatibility/wchar.h +=================================================================== +--- a/libstdc++-v3/include/c_compatibility/wchar.h ++++ b/libstdc++-v3/include/c_compatibility/wchar.h +@@ -103,7 +103,7 @@ + using std::wmemset; + using std::wcsftime; + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/c_global/cstdlib +=================================================================== +--- a/libstdc++-v3/include/c_global/cstdlib ++++ b/libstdc++-v3/include/c_global/cstdlib +@@ -182,7 +182,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +Index: b/libstdc++-v3/include/c_global/cwchar +=================================================================== +--- a/libstdc++-v3/include/c_global/cwchar ++++ b/libstdc++-v3/include/c_global/cwchar +@@ -232,7 +232,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +@@ -289,7 +289,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/c_std/cstdio +=================================================================== +--- a/libstdc++-v3/include/c_std/cstdio ++++ b/libstdc++-v3/include/c_std/cstdio +@@ -139,7 +139,7 @@ + using ::vsprintf; + } // namespace std + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf +Index: b/libstdc++-v3/include/c_std/cstdlib +=================================================================== +--- a/libstdc++-v3/include/c_std/cstdlib ++++ b/libstdc++-v3/include/c_std/cstdlib +@@ -180,7 +180,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef _Exit + #undef llabs +Index: b/libstdc++-v3/include/c_std/cwchar +=================================================================== +--- a/libstdc++-v3/include/c_std/cwchar ++++ b/libstdc++-v3/include/c_std/cwchar +@@ -228,7 +228,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef wcstold + #undef wcstoll +Index: b/libstdc++-v3/include/ext/vstring.h +=================================================================== +--- a/libstdc++-v3/include/ext/vstring.h ++++ b/libstdc++-v3/include/ext/vstring.h +@@ -2571,7 +2571,7 @@ + _GLIBCXX_END_NAMESPACE_VERSION + } // namespace + +-#if ((__cplusplus >= 201103L) && defined(_GLIBCXX_USE_C99)) ++#if ((__cplusplus >= 201103L) && (defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__))) + + #include + +Index: b/libstdc++-v3/include/tr1/cstdio +=================================================================== +--- a/libstdc++-v3/include/tr1/cstdio ++++ b/libstdc++-v3/include/tr1/cstdio +@@ -33,7 +33,7 @@ + + #include + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +Index: b/libstdc++-v3/include/tr1/cstdlib +=================================================================== +--- a/libstdc++-v3/include/tr1/cstdlib ++++ b/libstdc++-v3/include/tr1/cstdlib +@@ -35,7 +35,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + namespace std _GLIBCXX_VISIBILITY(default) + { +Index: b/libstdc++-v3/include/tr1/cwchar +=================================================================== +--- a/libstdc++-v3/include/tr1/cwchar ++++ b/libstdc++-v3/include/tr1/cwchar +@@ -52,7 +52,7 @@ + using std::vwscanf; + #endif + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + using std::wcstold; + using std::wcstoll; + using std::wcstoull; +Index: b/libstdc++-v3/include/tr1/stdlib.h +=================================================================== +--- a/libstdc++-v3/include/tr1/stdlib.h ++++ b/libstdc++-v3/include/tr1/stdlib.h +@@ -33,7 +33,7 @@ + + #if _GLIBCXX_HOSTED + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + using std::tr1::atoll; + using std::tr1::strtoll; +Index: b/libstdc++-v3/src/c++11/debug.cc +=================================================================== +--- a/libstdc++-v3/src/c++11/debug.cc ++++ b/libstdc++-v3/src/c++11/debug.cc +@@ -787,7 +787,7 @@ + int __n __attribute__ ((__unused__)), + const char* __fmt, _Tp __s) const throw () + { +-#ifdef _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + std::snprintf(__buf, __n, __fmt, __s); + #else + std::sprintf(__buf, __fmt, __s); +Index: b/libstdc++-v3/include/c_global/cstdio +=================================================================== +--- a/libstdc++-v3/include/c_global/cstdio ++++ b/libstdc++-v3/include/c_global/cstdio +@@ -138,7 +138,7 @@ + using ::vsprintf; + } // namespace + +-#if _GLIBCXX_USE_C99 ++#if defined(_GLIBCXX_USE_C99) || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf diff --git a/package/gcc/arc-2015.12/851-PR-other-56780.patch b/package/gcc/arc-2015.12/851-PR-other-56780.patch new file mode 100644 index 0000000000..feb433920d --- /dev/null +++ b/package/gcc/arc-2015.12/851-PR-other-56780.patch @@ -0,0 +1,244 @@ +From afe990251bd9b3a063f03da31a3b8d139d033bc3 Mon Sep 17 00:00:00 2001 +From: ian +Date: Sat, 1 Jun 2013 00:20:49 +0000 +Subject: [PATCH] PR other/56780 + +* libiberty/configure.ac: Move test for --enable-install-libiberty +outside of the 'with_target_subdir' test so that it actually gets +run. Add output messages to show the test result. +* libiberty/configure: Regenerate. +* libiberty/Makefile.in (install_to_libdir): Place the +installation of the libiberty library in the same guard as that +used for the headers to prevent it being installed unless +requested via --enable-install-libiberty. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199570 138bc75d-0d04-0410-961f-82ee72b054a4 + +libiberty: fix --enable-install-libiberty flag [PR 56780] + +Commit 199570 fixed the --disable-install-libiberty behavior, but it also +added a bug where the enable path never works because the initial clear +of target_header_dir wasn't deleted. So we end up initializing properly +at the top only to reset it at the end all the time. + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206367 138bc75d-0d04-0410-961f-82ee72b054a4 + +[Romain + squash the two upstream commits + Remove the ChangeLog] +Signed-off-by: Romain Naour +--- + libiberty/Makefile.in | 24 ++++++++++----------- + libiberty/configure | 57 +++++++++++++++++++++++++++----------------------- + libiberty/configure.ac | 47 ++++++++++++++++++++++------------------- + 3 files changed, 68 insertions(+), 60 deletions(-) + +diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in +index f6a3ebd..75ff82d 100644 +--- a/libiberty/Makefile.in ++++ b/libiberty/Makefile.in +@@ -355,19 +355,19 @@ install-strip: install + # since it will be passed the multilib flags. + MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory` + install_to_libdir: all +- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR) +- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n +- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ) +- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB) + if test -n "${target_header_dir}"; then \ +- case "${target_header_dir}" in \ +- /*) thd=${target_header_dir};; \ +- *) thd=${includedir}/${target_header_dir};; \ +- esac; \ +- ${mkinstalldirs} $(DESTDIR)$${thd}; \ +- for h in ${INSTALLED_HEADERS}; do \ +- ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ +- done; \ ++ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \ ++ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \ ++ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \ ++ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \ ++ case "${target_header_dir}" in \ ++ /*) thd=${target_header_dir};; \ ++ *) thd=${includedir}/${target_header_dir};; \ ++ esac; \ ++ ${mkinstalldirs} $(DESTDIR)$${thd}; \ ++ for h in ${INSTALLED_HEADERS}; do \ ++ ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \ ++ done; \ + fi + @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install + +diff --git a/libiberty/configure b/libiberty/configure +index 5367027..4feb95a 100755 +--- a/libiberty/configure ++++ b/libiberty/configure +@@ -675,8 +675,8 @@ with_cross_host + with_newlib + enable_maintainer_mode + enable_multilib +-enable_largefile + enable_install_libiberty ++enable_largefile + ' + ac_precious_vars='build_alias + host_alias +@@ -1303,8 +1303,8 @@ Optional Features: + enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --enable-multilib build many library versions (default) ++ --enable-install-libiberty Install headers and library for end users + --disable-largefile omit support for large files +- --enable-install-libiberty Install headers for end users + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -2784,6 +2784,35 @@ if test $cross_compiling = no && test $multilib = yes \ + cross_compiling=maybe + fi + ++# We may wish to install the target headers somewhere. ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install libiberty headers and static library" >&5 ++$as_echo_n "checking whether to install libiberty headers and static library... " >&6; } ++ ++# Check whether --enable-install-libiberty was given. ++if test "${enable_install_libiberty+set}" = set; then : ++ enableval=$enable_install_libiberty; enable_install_libiberty=$enableval ++else ++ enable_install_libiberty=no ++fi ++ ++# Option parsed, now set things appropriately. ++case x"$enable_install_libiberty" in ++ xyes|x) ++ target_header_dir=libiberty ++ ;; ++ xno) ++ target_header_dir= ++ ;; ++ *) ++ # This could be sanity-checked in various ways... ++ target_header_dir="${enable_install_libiberty}" ++ ;; ++esac ++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_install_libiberty" >&5 ++$as_echo "$enable_install_libiberty" >&6; } ++{ $as_echo "$as_me:${as_lineno-$LINENO}: target_header_dir = $target_header_dir" >&5 ++$as_echo "$as_me: target_header_dir = $target_header_dir" >&6;} ++ + + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' +@@ -5476,7 +5505,6 @@ fi + + setobjs= + CHECK= +-target_header_dir= + if test -n "${with_target_subdir}"; then + + # We are being configured as a target library. AC_REPLACE_FUNCS +@@ -5759,29 +5787,6 @@ _ACEOF + + esac + +- # We may wish to install the target headers somewhere. +- # Check whether --enable-install-libiberty was given. +-if test "${enable_install_libiberty+set}" = set; then : +- enableval=$enable_install_libiberty; enable_install_libiberty=$enableval +-else +- enable_install_libiberty=no +-fi +- +- # Option parsed, now set things appropriately. +- case x"$enable_install_libiberty" in +- xyes|x) +- target_header_dir=libiberty +- ;; +- xno) +- target_header_dir= +- ;; +- *) +- # This could be sanity-checked in various ways... +- target_header_dir="${enable_install_libiberty}" +- ;; +- esac +- +- + else + + # Not a target library, so we set things up to run the test suite. +diff --git a/libiberty/configure.ac b/libiberty/configure.ac +index c763894..f17e6b6 100644 +--- a/libiberty/configure.ac ++++ b/libiberty/configure.ac +@@ -128,6 +128,31 @@ if test $cross_compiling = no && test $multilib = yes \ + cross_compiling=maybe + fi + ++# We may wish to install the target headers somewhere. ++AC_MSG_CHECKING([whether to install libiberty headers and static library]) ++dnl install-libiberty is disabled by default ++ ++AC_ARG_ENABLE(install-libiberty, ++[ --enable-install-libiberty Install headers and library for end users], ++enable_install_libiberty=$enableval, ++enable_install_libiberty=no)dnl ++ ++# Option parsed, now set things appropriately. ++case x"$enable_install_libiberty" in ++ xyes|x) ++ target_header_dir=libiberty ++ ;; ++ xno) ++ target_header_dir= ++ ;; ++ *) ++ # This could be sanity-checked in various ways... ++ target_header_dir="${enable_install_libiberty}" ++ ;; ++esac ++AC_MSG_RESULT($enable_install_libiberty) ++AC_MSG_NOTICE([target_header_dir = $target_header_dir]) ++ + GCC_NO_EXECUTABLES + AC_PROG_CC + AC_SYS_LARGEFILE +@@ -380,7 +405,6 @@ fi + + setobjs= + CHECK= +-target_header_dir= + if test -n "${with_target_subdir}"; then + + # We are being configured as a target library. AC_REPLACE_FUNCS +@@ -492,27 +516,6 @@ if test -n "${with_target_subdir}"; then + + esac + +- # We may wish to install the target headers somewhere. +- AC_ARG_ENABLE(install-libiberty, +- [ --enable-install-libiberty Install headers for end users], +- enable_install_libiberty=$enableval, +- enable_install_libiberty=no)dnl +- +- # Option parsed, now set things appropriately. +- case x"$enable_install_libiberty" in +- xyes|x) +- target_header_dir=libiberty +- ;; +- xno) +- target_header_dir= +- ;; +- *) +- # This could be sanity-checked in various ways... +- target_header_dir="${enable_install_libiberty}" +- ;; +- esac +- +- + else + + # Not a target library, so we set things up to run the test suite. +-- +1.9.3 + diff --git a/package/gcc/arc-2015.12/900-UPDATE-Fix-handling-complex-PIC-moves.patch b/package/gcc/arc-2015.12/900-UPDATE-Fix-handling-complex-PIC-moves.patch new file mode 100644 index 0000000000..48228dcb6f --- /dev/null +++ b/package/gcc/arc-2015.12/900-UPDATE-Fix-handling-complex-PIC-moves.patch @@ -0,0 +1,103 @@ +From b55922d45fd16f5e8fc7c3885da42b2b9b37754d Mon Sep 17 00:00:00 2001 +From: Claudiu Zissulescu +Date: Mon, 18 Jan 2016 16:43:18 +0100 +Subject: [PATCH] UPDATE: Fix handling complex PIC moves. + +fwprop is putting in the REG_EQUIV notes which are involving the +constant pic unspecs. Then, loop may use those notes for +optimizations rezulting in complex patterns that are not supported by +the current implementation. The following piece of code tries to +convert the complex instruction in simpler ones. + +The fix is done in development tree: [arc-4.8-dev b55922d] +and will be a part of the next release of ARC GNU tools. +Once that new release happens this patch must be removed. + + +gcc/ +2016-01-18 Claudiu Zissulescu + + * config/arc/arc.c (arc_legitimize_pic_address): Handle MINUS + operations when doing PIC moves. Make this function static. + (arc_legitimate_pc_offset_p): Use + arc_raw_symbolic_reference_mentioned_p. + * config/arc/arc-protos.h (arc_legitimize_pic_address): Remove. + + gcc/config/arc/arc-protos.h | 1 - + gcc/config/arc/arc.c | 33 +++++++++++++++++++-------------- + 2 files changed, 19 insertions(+), 15 deletions(-) + + * config/arc/arc.c (arc_legitimize_pic_address): Handle complex +diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h +index 464e0ab..5986e06 100644 +--- a/gcc/config/arc/arc-protos.h ++++ b/gcc/config/arc/arc-protos.h +@@ -53,7 +53,6 @@ extern unsigned int arc_compute_frame_size (); + extern bool arc_ccfsm_branch_deleted_p (void); + extern void arc_ccfsm_record_branch_deleted (void); + +-extern rtx arc_legitimize_pic_address (rtx, rtx); + void arc_asm_output_aligned_decl_local (FILE *, tree, const char *, + unsigned HOST_WIDE_INT, + unsigned HOST_WIDE_INT, +diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c +index a89c8ee..f7cae9f 100644 +--- a/gcc/config/arc/arc.c ++++ b/gcc/config/arc/arc.c +@@ -5243,19 +5243,7 @@ arc_legitimate_pc_offset_p (rtx addr) + if (GET_CODE (addr) != CONST) + return false; + addr = XEXP (addr, 0); +- if (GET_CODE (addr) == PLUS) +- { +- if (GET_CODE (XEXP (addr, 1)) != CONST_INT) +- return false; +- addr = XEXP (addr, 0); +- } +- return (GET_CODE (addr) == UNSPEC +- && XVECLEN (addr, 0) == 1 +- && (XINT (addr, 1) == ARC_UNSPEC_GOT +- || XINT (addr, 1) == ARC_UNSPEC_GOTOFFPC +- || XINT (addr, 1) == UNSPEC_TLS_GD +- || XINT (addr, 1) == UNSPEC_TLS_IE) +- && GET_CODE (XVECEXP (addr, 0, 0)) == SYMBOL_REF); ++ return flag_pic && !arc_raw_symbolic_reference_mentioned_p (addr, false); + } + + /* Return true if ADDR is a valid pic address. +@@ -5522,7 +5510,7 @@ arc_legitimize_tls_address (rtx addr, enum tls_model model) + The return value is the legitimated address. + If OLDX is non-zero, it is the target to assign the address to first. */ + +-rtx ++static rtx + arc_legitimize_pic_address (rtx orig, rtx oldx) + { + rtx addr = orig; +@@ -5569,6 +5557,23 @@ arc_legitimize_pic_address (rtx orig, rtx oldx) + /* Check that the unspec is one of the ones we generate? */ + return orig; + } ++ else if (GET_CODE (addr) == MINUS) ++ { ++ /* The same story with fwprop. */ ++ rtx op0 = XEXP (addr, 0); ++ rtx op1 = XEXP (addr, 1); ++ gcc_assert (oldx); ++ gcc_assert (GET_CODE (op1) == UNSPEC); ++ ++ emit_move_insn (oldx, ++ gen_rtx_CONST (SImode, ++ arc_legitimize_pic_address (op1, ++ NULL_RTX))); ++ emit_insn (gen_rtx_SET (VOIDmode, oldx, ++ gen_rtx_MINUS (SImode, op0, oldx))); ++ return oldx; ++ ++ } + else if (GET_CODE (addr) != PLUS) + { + /* fwprop is putting in the REG_EQUIV notes which are +-- +2.5.0 + diff --git a/package/gcc/arc-2015.12/901-UPDATE1-Fix-handling-complex-PIC-moves.patch b/package/gcc/arc-2015.12/901-UPDATE1-Fix-handling-complex-PIC-moves.patch new file mode 100644 index 0000000000..28cb7c1913 --- /dev/null +++ b/package/gcc/arc-2015.12/901-UPDATE1-Fix-handling-complex-PIC-moves.patch @@ -0,0 +1,83 @@ +From f00b0f17d6889d811468c2c77508fbea8bfc377d Mon Sep 17 00:00:00 2001 +From: Claudiu Zissulescu +Date: Tue, 19 Jan 2016 14:40:16 +0100 +Subject: [PATCH] UPDATE1: Fix handling complex PIC moves. + +The arc_legitimate_pc_offset_p condition is too lax. Updated it. + +The fix is done in development tree: [arc-4.8-dev f00b0f1] +and will be a part of the next release of ARC GNU tools. +Once that new release happens this patch must be removed. + +gcc/ +2016-01-18 Claudiu Zissulescu + + * config/arc/arc.c (arc_needs_pcl_p ): New function + (arc_legitimate_pc_offset_p): Use arc_needs_pcl_p. +--- + gcc/config/arc/arc.c | 42 ++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 40 insertions(+), 2 deletions(-) + +diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c +index f7cae9f..18d88a3 100644 +--- a/gcc/config/arc/arc.c ++++ b/gcc/config/arc/arc.c +@@ -5234,6 +5234,45 @@ arc_rtx_costs (rtx x, int code, int outer_code, int opno ATTRIBUTE_UNUSED, + } + } + ++/* Helper used by arc_legitimate_pc_offset_p. */ ++ ++static bool ++arc_needs_pcl_p (rtx x) ++{ ++ register const char *fmt; ++ register int i, j; ++ ++ if ((GET_CODE (x) == UNSPEC) ++ && (XVECLEN (x, 0) == 1) ++ && (GET_CODE (XVECEXP (x, 0, 0)) == SYMBOL_REF)) ++ switch (XINT (x, 1)) ++ { ++ case ARC_UNSPEC_GOT: ++ case ARC_UNSPEC_GOTOFFPC: ++ case UNSPEC_TLS_GD: ++ case UNSPEC_TLS_IE: ++ return true; ++ default: ++ break; ++ } ++ ++ fmt = GET_RTX_FORMAT (GET_CODE (x)); ++ for (i = GET_RTX_LENGTH (GET_CODE (x)) - 1; i >= 0; i--) ++ { ++ if (fmt[i] == 'e') ++ { ++ if (arc_needs_pcl_p (XEXP (x, i))) ++ return true; ++ } ++ else if (fmt[i] == 'E') ++ for (j = XVECLEN (x, i) - 1; j >= 0; j--) ++ if (arc_needs_pcl_p (XVECEXP (x, i, j))) ++ return true; ++ } ++ ++ return false; ++} ++ + /* Return true if ADDR is an address that needs to be expressed as an + explicit sum of pcl + offset. */ + +@@ -5242,8 +5281,7 @@ arc_legitimate_pc_offset_p (rtx addr) + { + if (GET_CODE (addr) != CONST) + return false; +- addr = XEXP (addr, 0); +- return flag_pic && !arc_raw_symbolic_reference_mentioned_p (addr, false); ++ return arc_needs_pcl_p (addr); + } + + /* Return true if ADDR is a valid pic address. +-- +2.5.0 + diff --git a/package/gcc/arc-2015.12/950-Don-t-allow-mcompact-casesi-for-ARCv2.patch b/package/gcc/arc-2015.12/950-Don-t-allow-mcompact-casesi-for-ARCv2.patch new file mode 100644 index 0000000000..dc03a028ed --- /dev/null +++ b/package/gcc/arc-2015.12/950-Don-t-allow-mcompact-casesi-for-ARCv2.patch @@ -0,0 +1,100 @@ +From 09463827001a7b8094f4b9460514370a1876d908 Mon Sep 17 00:00:00 2001 +From: Claudiu Zissulescu +Date: Wed, 20 Jan 2016 16:32:40 +0100 +Subject: [PATCH] Don't allow mcompact-casesi for ARCv2 + +The compact casesi is not working for arcv2 processors family as it +makes use of the add_s rx,rx,pcl instruction which is only valid for +arc6xx and arc700 processors. Also not having this instruction makes +no much sens to change the compact-casesi pattern to use normal add +instructions as it nullifies the advantage of short instruction use. +The default casesi pattern betters suits the arcv2 architecture. + +The fix is done in development tree: [arc-4.8-dev 0946382] +and will be a part of the next release of ARC GNU tools. +Once that new release happens this patch must be removed. + +gcc/ +2016-01-20 Claudiu Zissulescu + + * common/config/arc/arc-common.c (arc_option_optimization_table): + Remove mcompact-casesi option. + * config/arc/arc.c (arc_override_options): Use compact-casesi only + for arcv1. + * config/arc/arc.md (casesi_load): Use short instructions. +--- + gcc/common/config/arc/arc-common.c | 1 - + gcc/config/arc/arc.c | 9 +++++---- + gcc/config/arc/arc.md | 10 ++++++++-- + 3 files changed, 13 insertions(+), 7 deletions(-) + + * config/arc/arc.c (arc_legitimize_pic_address): Handle MINUS +diff --git a/gcc/common/config/arc/arc-common.c b/gcc/common/config/arc/arc-common.c +index e2e36fa..310bc80 100644 +--- a/gcc/common/config/arc/arc-common.c ++++ b/gcc/common/config/arc/arc-common.c +@@ -58,7 +58,6 @@ static const struct default_options arc_option_optimization_table[] = + { OPT_LEVELS_ALL, OPT_mbbit_peephole, NULL, 1 }, + { OPT_LEVELS_SIZE, OPT_mq_class, NULL, 1 }, + { OPT_LEVELS_SIZE, OPT_mcase_vector_pcrel, NULL, 1 }, +- { OPT_LEVELS_SIZE, OPT_mcompact_casesi, NULL, 1 }, + { OPT_LEVELS_NONE, 0, NULL, 0 } + }; + +diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c +index 18d88a3..f828398 100644 +--- a/gcc/config/arc/arc.c ++++ b/gcc/config/arc/arc.c +@@ -1151,6 +1151,11 @@ arc_override_options (void) + if (arc_size_opt_level == 3) + optimize_size = 1; + ++ if (TARGET_V2) ++ TARGET_COMPACT_CASESI = 0; ++ else if (optimize_size == 1) ++ TARGET_COMPACT_CASESI = 1; ++ + if (flag_pic) + target_flags |= MASK_NO_SDATA_SET; + +@@ -1163,10 +1168,6 @@ arc_override_options (void) + if (!TARGET_Q_CLASS) + TARGET_COMPACT_CASESI = 0; + +- /* For the time being don't support COMPACT_CASESI for ARCv2. */ +- if (TARGET_V2) +- TARGET_COMPACT_CASESI = 0; +- + if (TARGET_COMPACT_CASESI) + TARGET_CASE_VECTOR_PC_RELATIVE = 1; + +diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md +index bc4ac38..ba7c8bc 100644 +--- a/gcc/config/arc/arc.md ++++ b/gcc/config/arc/arc.md +@@ -3837,14 +3837,20 @@ + switch (GET_MODE (diff_vec)) + { + case SImode: +- return \"ld.as %0,[%1,%2]%&\"; ++ if ((which_alternative == 0) && TARGET_CODE_DENSITY) ++ return \"ld_s.as %0,[%1,%2]%&\"; ++ else ++ return \"ld.as %0,[%1,%2]%&\"; + case HImode: + if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned) + return \"ldw.as %0,[%1,%2]\"; + return \"ldw.x.as %0,[%1,%2]\"; + case QImode: + if (ADDR_DIFF_VEC_FLAGS (diff_vec).offset_unsigned) +- return \"ldb%? %0,[%1,%2]%&\"; ++ if (which_alternative == 0) ++ return \"ldb_s %0,[%1,%2]%&\"; ++ else ++ return \"ldb %0,[%1,%2]%&\"; + return \"ldb.x %0,[%1,%2]\"; + default: + gcc_unreachable (); +-- +2.5.0 + diff --git a/package/gcc/gcc-final/gcc-final.hash b/package/gcc/gcc-final/gcc-final.hash new file mode 120000 index 0000000000..7ac9361ab2 --- /dev/null +++ b/package/gcc/gcc-final/gcc-final.hash @@ -0,0 +1 @@ +../gcc.hash \ No newline at end of file diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk new file mode 100644 index 0000000000..1d1d72e6e7 --- /dev/null +++ b/package/gcc/gcc-final/gcc-final.mk @@ -0,0 +1,207 @@ +################################################################################ +# +# gcc-final +# +################################################################################ + +GCC_FINAL_VERSION = $(GCC_VERSION) +GCC_FINAL_SITE = $(GCC_SITE) +GCC_FINAL_SOURCE = $(GCC_SOURCE) + +HOST_GCC_FINAL_DEPENDENCIES = \ + $(HOST_GCC_COMMON_DEPENDENCIES) \ + $(BR_LIBC) + +HOST_GCC_FINAL_EXCLUDES = $(HOST_GCC_EXCLUDES) +HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_FAKE_TESTSUITE + +ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),) +HOST_GCC_FINAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACT +endif + +HOST_GCC_FINAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES + +# gcc doesn't support in-tree build, so we create a 'build' +# subdirectory in the gcc sources, and build from there. +HOST_GCC_FINAL_SUBDIR = build + +HOST_GCC_FINAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK + +# We want to always build the static variants of all the gcc libraries, +# of which libstdc++, libgomp, libmudflap... +# To do so, we can not just pass --enable-static to override the generic +# --disable-static flag, otherwise gcc fails to build some of those +# libraries, see; +# http://lists.busybox.net/pipermail/buildroot/2013-October/080412.html +# +# So we must completely override the generic commands and provide our own. +# +define HOST_GCC_FINAL_CONFIGURE_CMDS + (cd $(HOST_GCC_FINAL_SRCDIR) && rm -rf config.cache; \ + $(HOST_CONFIGURE_OPTS) \ + CFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" \ + $(HOST_GCC_FINAL_CONF_ENV) \ + ./configure \ + --prefix="$(HOST_DIR)/usr" \ + --sysconfdir="$(HOST_DIR)/etc" \ + --enable-static \ + $(QUIET) $(HOST_GCC_FINAL_CONF_OPTS) \ + ) +endef + + +# Languages supported by the cross-compiler +GCC_FINAL_CROSS_LANGUAGES-y = c +GCC_FINAL_CROSS_LANGUAGES-$(BR2_INSTALL_LIBSTDCPP) += c++ +GCC_FINAL_CROSS_LANGUAGES-$(BR2_TOOLCHAIN_BUILDROOT_FORTRAN) += fortran +GCC_FINAL_CROSS_LANGUAGES = $(subst $(space),$(comma),$(GCC_FINAL_CROSS_LANGUAGES-y)) + +HOST_GCC_FINAL_CONF_OPTS = \ + $(HOST_GCC_COMMON_CONF_OPTS) \ + --enable-languages=$(GCC_FINAL_CROSS_LANGUAGES) \ + --with-build-time-tools=$(HOST_DIR)/usr/$(GNU_TARGET_NAME)/bin + +HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib* +# The kernel wants to use the -m4-nofpu option to make sure that it +# doesn't use floating point operations. +ifeq ($(BR2_sh4)$(BR2_sh4eb),y) +HOST_GCC_FINAL_CONF_OPTS += "--with-multilib-list=m4,m4-nofpu" +HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib/!m4* +endif +ifeq ($(BR2_sh4a)$(BR2_sh4aeb),y) +HOST_GCC_FINAL_CONF_OPTS += "--with-multilib-list=m4a,m4a-nofpu" +HOST_GCC_FINAL_GCC_LIB_DIR = $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/lib/!m4* +endif + +# Disable shared libs like libstdc++ if we do static since it confuses linking +ifeq ($(BR2_STATIC_LIBS),y) +HOST_GCC_FINAL_CONF_OPTS += --disable-shared +else +HOST_GCC_FINAL_CONF_OPTS += --enable-shared +endif + +ifeq ($(BR2_GCC_ENABLE_OPENMP),y) +HOST_GCC_FINAL_CONF_OPTS += --enable-libgomp +else +HOST_GCC_FINAL_CONF_OPTS += --disable-libgomp +endif + +# End with user-provided options, so that they can override previously +# defined options. +HOST_GCC_FINAL_CONF_OPTS += \ + $(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS)) + +HOST_GCC_FINAL_CONF_ENV = \ + $(HOST_GCC_COMMON_CONF_ENV) + +HOST_GCC_FINAL_MAKE_OPTS += $(HOST_GCC_COMMON_MAKE_OPTS) + +# Make sure we have 'cc' +define HOST_GCC_FINAL_CREATE_CC_SYMLINKS + if [ ! -e $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc ]; then \ + ln -f $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc \ + $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc; \ + fi +endef + +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_CREATE_CC_SYMLINKS + +HOST_GCC_FINAL_TOOLCHAIN_WRAPPER_ARGS += $(HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS) +HOST_GCC_FINAL_POST_BUILD_HOOKS += TOOLCHAIN_BUILD_WRAPPER +# Note: this must be done after CREATE_CC_SYMLINKS, otherwise the +# -cc symlink to the wrapper is not created. +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS + +# In gcc 4.7.x, the ARM EABIhf library loader path for (e)glibc was not +# correct, so we create a symbolic link to make things work +# properly. eglibc installs the library loader as ld-linux-armhf.so.3, +# but gcc creates binaries that reference ld-linux.so.3. +ifeq ($(BR2_arm)$(BR2_ARM_EABIHF)$(BR2_GCC_VERSION_4_7_X)$(BR2_TOOLCHAIN_USES_GLIBC),yyyy) +define HOST_GCC_FINAL_LD_LINUX_LINK + ln -sf ld-linux-armhf.so.3 $(TARGET_DIR)/lib/ld-linux.so.3 + ln -sf ld-linux-armhf.so.3 $(STAGING_DIR)/lib/ld-linux.so.3 +endef +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_LD_LINUX_LINK +endif + +# coldfire is not working without removing these object files from libgcc.a +ifeq ($(BR2_m68k_cf),y) +define HOST_GCC_FINAL_M68K_LIBGCC_FIXUP + find $(STAGING_DIR) -name libgcc.a -print | \ + while read t; do $(GNU_TARGET_NAME)-ar dv "$t" _ctors.o; done +endef +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_M68K_LIBGCC_FIXUP +endif + +# Cannot use the HOST_GCC_FINAL_USR_LIBS mechanism below, because we want +# libgcc_s to be installed in /lib and not /usr/lib. +define HOST_GCC_FINAL_INSTALL_LIBGCC + -cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/libgcc_s* \ + $(STAGING_DIR)/lib/ + -cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/libgcc_s* \ + $(TARGET_DIR)/lib/ +endef + +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_LIBGCC + +define HOST_GCC_FINAL_INSTALL_LIBATOMIC + -cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/libatomic* \ + $(STAGING_DIR)/lib/ + -cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/libatomic* \ + $(TARGET_DIR)/lib/ +endef + +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_LIBATOMIC + +# Handle the installation of libraries in /usr/lib +HOST_GCC_FINAL_USR_LIBS = + +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +HOST_GCC_FINAL_USR_LIBS += libstdc++ +endif + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_FORTRAN),y) +HOST_GCC_FINAL_USR_LIBS += libgfortran +endif + +ifeq ($(BR2_GCC_ENABLE_OPENMP),y) +HOST_GCC_FINAL_USR_LIBS += libgomp +endif + +ifeq ($(BR2_GCC_ENABLE_LIBMUDFLAP),y) +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +HOST_GCC_FINAL_USR_LIBS += libmudflapth +else +HOST_GCC_FINAL_USR_LIBS += libmudflap +endif +endif + +ifneq ($(HOST_GCC_FINAL_USR_LIBS),) +define HOST_GCC_FINAL_INSTALL_STATIC_LIBS + for i in $(HOST_GCC_FINAL_USR_LIBS) ; do \ + cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$${i}.a \ + $(STAGING_DIR)/usr/lib/ ; \ + done +endef + +ifeq ($(BR2_STATIC_LIBS),) +define HOST_GCC_FINAL_INSTALL_SHARED_LIBS + for i in $(HOST_GCC_FINAL_USR_LIBS) ; do \ + cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$${i}.so* \ + $(STAGING_DIR)/usr/lib/ ; \ + cp -dpf $(HOST_GCC_FINAL_GCC_LIB_DIR)/$${i}.so* \ + $(TARGET_DIR)/usr/lib/ ; \ + done +endef +endif + +define HOST_GCC_FINAL_INSTALL_USR_LIBS + mkdir -p $(TARGET_DIR)/usr/lib + $(HOST_GCC_FINAL_INSTALL_STATIC_LIBS) + $(HOST_GCC_FINAL_INSTALL_SHARED_LIBS) +endef +HOST_GCC_FINAL_POST_INSTALL_HOOKS += HOST_GCC_FINAL_INSTALL_USR_LIBS +endif + +$(eval $(host-autotools-package)) diff --git a/package/gcc/gcc-initial/gcc-initial.hash b/package/gcc/gcc-initial/gcc-initial.hash new file mode 120000 index 0000000000..7ac9361ab2 --- /dev/null +++ b/package/gcc/gcc-initial/gcc-initial.hash @@ -0,0 +1 @@ +../gcc.hash \ No newline at end of file diff --git a/package/gcc/gcc-initial/gcc-initial.mk b/package/gcc/gcc-initial/gcc-initial.mk new file mode 100644 index 0000000000..1e58d8b5f7 --- /dev/null +++ b/package/gcc/gcc-initial/gcc-initial.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# gcc-initial +# +################################################################################ + +GCC_INITIAL_VERSION = $(GCC_VERSION) +GCC_INITIAL_SITE = $(GCC_SITE) +GCC_INITIAL_SOURCE = $(GCC_SOURCE) + +HOST_GCC_INITIAL_DEPENDENCIES = $(HOST_GCC_COMMON_DEPENDENCIES) + +HOST_GCC_INITIAL_EXCLUDES = $(HOST_GCC_EXCLUDES) +HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_FAKE_TESTSUITE + +ifneq ($(call qstrip, $(BR2_XTENSA_CORE_NAME)),) +HOST_GCC_INITIAL_POST_EXTRACT_HOOKS += HOST_GCC_XTENSA_OVERLAY_EXTRACT +endif + +HOST_GCC_INITIAL_POST_PATCH_HOOKS += HOST_GCC_APPLY_PATCHES + +# gcc doesn't support in-tree build, so we create a 'build' +# subdirectory in the gcc sources, and build from there. +HOST_GCC_INITIAL_SUBDIR = build + +HOST_GCC_INITIAL_PRE_CONFIGURE_HOOKS += HOST_GCC_CONFIGURE_SYMLINK + +# gcc on ARC has a bug: in its libgcc, even when no C library is +# available (--with-newlib is passed, and therefore inhibit_libc is +# defined), it tries to use the C library for the libgmon +# library. Since it's not needed in gcc-initial, we disabled it here. +ifeq ($(BR2_GCC_VERSION_4_8_ARC),y) +define HOST_GCC_INITIAL_DISABLE_LIBGMON + $(SED) 's/crtbeginS.o libgmon.a crtg.o/crtbeginS.o crtg.o/' \ + $(@D)/libgcc/config.host +endef +HOST_GCC_INITIAL_POST_PATCH_HOOKS += HOST_GCC_INITIAL_DISABLE_LIBGMON +HOST_GCC_INITIAL_POST_RSYNC_HOOKS += HOST_GCC_INITIAL_DISABLE_LIBGMON +endif + +HOST_GCC_INITIAL_CONF_OPTS = \ + $(HOST_GCC_COMMON_CONF_OPTS) \ + --enable-languages=c \ + --disable-shared \ + --without-headers \ + --disable-threads \ + --with-newlib \ + --disable-largefile \ + --disable-nls \ + $(call qstrip,$(BR2_EXTRA_GCC_CONFIG_OPTIONS)) + +HOST_GCC_INITIAL_CONF_ENV = \ + $(HOST_GCC_COMMON_CONF_ENV) + +HOST_GCC_INITIAL_MAKE_OPTS = $(HOST_GCC_COMMON_MAKE_OPTS) all-gcc +HOST_GCC_INITIAL_INSTALL_OPTS = install-gcc + +ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) +HOST_GCC_INITIAL_MAKE_OPTS += all-target-libgcc +HOST_GCC_INITIAL_INSTALL_OPTS += install-target-libgcc +endif + +HOST_GCC_INITIAL_TOOLCHAIN_WRAPPER_ARGS += $(HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS) +HOST_GCC_INITIAL_POST_BUILD_HOOKS += TOOLCHAIN_BUILD_WRAPPER +HOST_GCC_INITIAL_POST_INSTALL_HOOKS += HOST_GCC_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS + +$(eval $(host-autotools-package)) diff --git a/package/gcc/gcc.hash b/package/gcc/gcc.hash new file mode 100644 index 0000000000..8d2feaf1a4 --- /dev/null +++ b/package/gcc/gcc.hash @@ -0,0 +1,14 @@ +# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.5.4/sha512.sum +sha512 78696b287d46aacd6f150920da376ea32f58ad9f0dafd2d3b7fa6dbdd8dd7afe659108d1dfaa5807617fc5248719f50b39c37ade0173ea5b9fec2091f4656115 gcc-4.5.4.tar.bz2 +# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.7.4/sha512.sum +sha512 dfcb737073191e628231031a3571ec77ee760a59377630f4a6e4fdfa66f9ddad39fde47e3f0f227eb43cdf90e0d34cde5abdc9ac892c1e111a911062a66c9189 gcc-4.7.4.tar.bz2 +# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.8.5/sha512.sum +sha512 47fdfeca0c0a624cdec9c4ae47137d056c918d5c386d4b96985bb3c8172aba377cb66cbcc30e80832fd244a7d98f562c20198056915c70cfef0977545073a8ea gcc-4.8.5.tar.bz2 +# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.9.3/sha512.sum +sha512 9ac57377a6975fc7adac704ec81355262b9f537def6955576753b87715470a20ee6a2a3144a79cc8fcba3443f7b44c7337d79d704b522d053f54f79aa6b442df gcc-4.9.3.tar.bz2 +# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-5.3.0/sha512.sum +sha512 d619847383405fd389f5a2d7225f97fedb01f81478dbb8339047ccba7561a5c20045ab500a8744bffd19ea51892ce09fc37f862f2cfcb42de0f0f8cd8f8da37a gcc-5.3.0.tar.bz2 +# From ftp://gcc.gnu.org/pub/gcc/releases/gcc-6.1.0/sha512.sum +sha512 eeed3e2018b8c012aabce419e8d718fde701e5c3c179b4486c61ba46e5736eecc8fccdd18b01fcd973a42c6ad3116dbbe2ee247fe3757d622d373f93ebaf8d2e gcc-6.1.0.tar.bz2 +# No hash for the ARC variant, comes from the github-helper: +none xxx gcc-arc-2015.12.tar.gz diff --git a/package/gcc/gcc.mk b/package/gcc/gcc.mk new file mode 100644 index 0000000000..46f05ff2db --- /dev/null +++ b/package/gcc/gcc.mk @@ -0,0 +1,294 @@ +################################################################################ +# +# Common variables for the gcc-initial and gcc-final packages. +# +################################################################################ + +# +# Version, site and source +# + +GCC_VERSION = $(call qstrip,$(BR2_GCC_VERSION)) + +ifeq ($(BR2_arc),y) +GCC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,gcc,$(GCC_VERSION)) +GCC_SOURCE = gcc-$(GCC_VERSION).tar.gz +else +GCC_SITE = $(BR2_GNU_MIRROR:/=)/gcc/gcc-$(GCC_VERSION) +endif + +GCC_SOURCE ?= gcc-$(GCC_VERSION).tar.bz2 + +# +# Xtensa special hook +# + +HOST_GCC_XTENSA_OVERLAY_TAR = $(BR2_XTENSA_OVERLAY_DIR)/xtensa_$(call qstrip,$(BR2_XTENSA_CORE_NAME)).tar + +define HOST_GCC_XTENSA_OVERLAY_EXTRACT + tar xf $(HOST_GCC_XTENSA_OVERLAY_TAR) -C $(@D) --strip-components=1 gcc +endef + +# +# Apply patches +# + +ifeq ($(ARCH),powerpc) +ifneq ($(BR2_SOFT_FLOAT),) +define HOST_GCC_APPLY_POWERPC_PATCH + $(APPLY_PATCHES) $(@D) package/gcc/$(GCC_VERSION) 1000-powerpc-link-with-math-lib.patch.conditional +endef +endif +endif + +define HOST_GCC_APPLY_PATCHES + if test -d package/gcc/$(GCC_VERSION); then \ + $(APPLY_PATCHES) $(@D) package/gcc/$(GCC_VERSION) \*.patch ; \ + fi; + $(HOST_GCC_APPLY_POWERPC_PATCH) +endef + +HOST_GCC_EXCLUDES = \ + libjava/* libgo/* \ + gcc/testsuite/* libstdc++-v3/testsuite/* + +define HOST_GCC_FAKE_TESTSUITE + mkdir -p $(@D)/libstdc++-v3/testsuite/ + echo "all:" > $(@D)/libstdc++-v3/testsuite/Makefile.in + echo "install:" >> $(@D)/libstdc++-v3/testsuite/Makefile.in +endef + +# +# Create 'build' directory and configure symlink +# + +define HOST_GCC_CONFIGURE_SYMLINK + mkdir -p $(@D)/build + ln -sf ../configure $(@D)/build/configure +endef + +# +# Common configuration options +# + +HOST_GCC_COMMON_DEPENDENCIES = \ + host-binutils \ + host-gmp \ + host-mpfr \ + $(if $(BR2_BINFMT_FLAT),host-elf2flt) + +HOST_GCC_COMMON_CONF_OPTS = \ + --target=$(GNU_TARGET_NAME) \ + --with-sysroot=$(STAGING_DIR) \ + --disable-__cxa_atexit \ + --with-gnu-ld \ + --disable-libssp \ + --disable-multilib \ + --with-gmp=$(HOST_DIR)/usr \ + --with-mpfr=$(HOST_DIR)/usr \ + --with-pkgversion="Buildroot $(BR2_VERSION_FULL)" \ + --with-bugurl="http://bugs.buildroot.net/" + +# Don't build documentation. It takes up extra space / build time, +# and sometimes needs specific makeinfo versions to work +HOST_GCC_COMMON_CONF_ENV = \ + MAKEINFO=missing + +GCC_COMMON_TARGET_CFLAGS = $(TARGET_CFLAGS) +GCC_COMMON_TARGET_CXXFLAGS = $(TARGET_CXXFLAGS) + +# Propagate options used for target software building to GCC target libs +HOST_GCC_COMMON_CONF_ENV += CFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CFLAGS)" +HOST_GCC_COMMON_CONF_ENV += CXXFLAGS_FOR_TARGET="$(GCC_COMMON_TARGET_CXXFLAGS)" + +# libitm needs sparc V9+ +ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y) +HOST_GCC_COMMON_CONF_OPTS += --disable-libitm +endif + +# gcc 4.6.x quadmath requires wchar +ifneq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y) +HOST_GCC_COMMON_CONF_OPTS += --disable-libquadmath +endif + +# libsanitizer requires wordexp, not in default uClibc config. Also +# doesn't build properly with musl. +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_UCLIBC)$(BR2_TOOLCHAIN_BUILDROOT_MUSL),y) +HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer +endif + +# libsanitizer is broken for SPARC +# https://bugs.busybox.net/show_bug.cgi?id=7951 +ifeq ($(BR2_sparc)$(BR2_sparc64),y) +HOST_GCC_COMMON_CONF_OPTS += --disable-libsanitizer +endif + +ifeq ($(BR2_GCC_ENABLE_TLS),y) +HOST_GCC_COMMON_CONF_OPTS += --enable-tls +else +HOST_GCC_COMMON_CONF_OPTS += --disable-tls +endif + +ifeq ($(BR2_GCC_ENABLE_LTO),y) +HOST_GCC_COMMON_CONF_OPTS += --enable-plugins --enable-lto +endif + +ifeq ($(BR2_GCC_ENABLE_LIBMUDFLAP),y) +HOST_GCC_COMMON_CONF_OPTS += --enable-libmudflap +else +HOST_GCC_COMMON_CONF_OPTS += --disable-libmudflap +endif + +ifeq ($(BR2_PTHREADS_NONE),y) +HOST_GCC_COMMON_CONF_OPTS += \ + --disable-threads \ + --disable-libitm \ + --disable-libatomic +else +HOST_GCC_COMMON_CONF_OPTS += --enable-threads +endif + +ifeq ($(BR2_GCC_NEEDS_MPC),y) +HOST_GCC_COMMON_DEPENDENCIES += host-mpc +HOST_GCC_COMMON_CONF_OPTS += --with-mpc=$(HOST_DIR)/usr +endif + +ifeq ($(BR2_GCC_ENABLE_GRAPHITE),y) +HOST_GCC_COMMON_DEPENDENCIES += host-isl +HOST_GCC_COMMON_CONF_OPTS += --with-isl=$(HOST_DIR)/usr +# gcc 5 doesn't need cloog any more, see +# https://gcc.gnu.org/gcc-5/changes.html +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_5),) +HOST_GCC_COMMON_DEPENDENCIES += host-cloog +HOST_GCC_COMMON_CONF_OPTS += --with-cloog=$(HOST_DIR)/usr +endif +else +HOST_GCC_COMMON_CONF_OPTS += --without-isl --without-cloog +endif + +ifeq ($(BR2_arc),y) +HOST_GCC_COMMON_DEPENDENCIES += host-flex host-bison +endif + +ifeq ($(BR2_SOFT_FLOAT),y) +# only mips*-*-*, arm*-*-* and sparc*-*-* accept --with-float +# powerpc seems to be needing it as well +ifeq ($(BR2_arm)$(BR2_armeb)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_powerpc)$(BR2_sparc),y) +HOST_GCC_COMMON_CONF_OPTS += --with-float=soft +endif +endif + +ifeq ($(BR2_GCC_SUPPORTS_FINEGRAINEDMTUNE),y) +HOST_GCC_COMMON_CONF_OPTS += --disable-decimal-float +endif + +# Determine arch/tune/abi/cpu options +ifneq ($(call qstrip,$(BR2_GCC_TARGET_ARCH)),) +HOST_GCC_COMMON_CONF_OPTS += --with-arch=$(BR2_GCC_TARGET_ARCH) +endif +ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),) +HOST_GCC_COMMON_CONF_OPTS += --with-abi=$(BR2_GCC_TARGET_ABI) +endif +ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),) +ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),) +HOST_GCC_COMMON_CONF_OPTS += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION)) +else +HOST_GCC_COMMON_CONF_OPTS += --with-cpu=$(call qstrip,$(BR2_GCC_TARGET_CPU)) +endif +endif + +GCC_TARGET_FPU = $(call qstrip,$(BR2_GCC_TARGET_FPU)) +ifneq ($(GCC_TARGET_FPU),) +HOST_GCC_COMMON_CONF_OPTS += --with-fpu=$(GCC_TARGET_FPU) +endif + +GCC_TARGET_FLOAT_ABI = $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) +ifneq ($(GCC_TARGET_FLOAT_ABI),) +HOST_GCC_COMMON_CONF_OPTS += --with-float=$(GCC_TARGET_FLOAT_ABI) +endif + +GCC_TARGET_MODE = $(call qstrip,$(BR2_GCC_TARGET_MODE)) +ifneq ($(GCC_TARGET_MODE),) +HOST_GCC_COMMON_CONF_OPTS += --with-mode=$(GCC_TARGET_MODE) +endif + +# Enable proper double/long double for SPE ABI +ifeq ($(BR2_powerpc_SPE),y) +HOST_GCC_COMMON_CONF_OPTS += \ + --enable-e500_double \ + --with-long-double-128 +endif + +HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS += -DBR_CROSS_PATH_SUFFIX='".br_real"' + +# For gcc-initial, we need to tell gcc that the C library will be +# providing the ssp support, as it can't guess it since the C library +# hasn't been built yet. +# +# For gcc-final, the gcc logic to detect whether SSP support is +# available or not in the C library is not working properly for +# uClibc, so let's be explicit as well. +HOST_GCC_COMMON_MAKE_OPTS = \ + gcc_cv_libc_provides_ssp=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) + +ifeq ($(BR2_CCACHE),y) +HOST_GCC_COMMON_CCACHE_HASH_FILES += $(DL_DIR)/$(GCC_SOURCE) +# Cfr. PATCH_BASE_DIRS in .stamp_patched, but we catch both versioned and +# unversioned patches unconditionally +HOST_GCC_COMMON_CCACHE_HASH_FILES += \ + $(sort $(wildcard \ + package/gcc/$(GCC_VERSION)/*.patch \ + $(addsuffix /$((PKG)_RAWNAME)/$(GCC_VERSION)/*.patch,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR))) \ + $(addsuffix /$((PKG)_RAWNAME)/*.patch,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR))))) +ifeq ($(BR2_xtensa),y) +HOST_GCC_COMMON_CCACHE_HASH_FILES += $(HOST_GCC_XTENSA_OVERLAY_TAR) +endif +ifeq ($(ARCH),powerpc) +ifneq ($(BR2_SOFT_FLOAT),) +HOST_GCC_COMMON_CCACHE_HASH_FILES += package/gcc/$(GCC_VERSION)/1000-powerpc-link-with-math-lib.patch.conditional +endif +endif + +# _CONF_OPTS contains some references to the absolute path of $(HOST_DIR) +# and a reference to the Buildroot git revision (BR2_VERSION_FULL), +# so substitute those away. +HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_HASH=\"`\ + printf '%s\n' $(subst $(HOST_DIR),@HOST_DIR@,\ + $(subst --with-pkgversion="Buildroot $(BR2_VERSION_FULL)",,$($(PKG)_CONF_OPTS))) \ + | sha256sum - $(HOST_GCC_COMMON_CCACHE_HASH_FILES) \ + | cut -c -64 | tr -d '\n'`\" +endif # BR2_CCACHE + +# The LTO support in gcc creates wrappers for ar, ranlib and nm which load +# the lto plugin. These wrappers are called *-gcc-ar, *-gcc-ranlib, and +# *-gcc-nm and should be used instead of the real programs when -flto is +# used. However, we should not add the toolchain wrapper for them, and they +# match the *cc-* pattern. Therefore, an additional case is added for *-ar, +# *-ranlib and *-nm. +# Avoid that a .br_real is symlinked a second time. +# Also create -linux- symlinks. +define HOST_GCC_INSTALL_WRAPPER_AND_SIMPLE_SYMLINKS + $(Q)cd $(HOST_DIR)/usr/bin; \ + for i in $(GNU_TARGET_NAME)-*; do \ + case "$$i" in \ + *.br_real) \ + ;; \ + *-ar|*-ranlib|*-nm) \ + ln -snf $$i $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \ + ;; \ + *cc|*cc-*|*++|*++-*|*cpp) \ + rm -f $$i.br_real; \ + mv $$i $$i.br_real; \ + ln -sf toolchain-wrapper $$i; \ + ln -sf toolchain-wrapper $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \ + ln -snf $$i.br_real $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}.br_real; \ + ;; \ + *) \ + ln -snf $$i $(ARCH)-linux$${i##$(GNU_TARGET_NAME)}; \ + ;; \ + esac; \ + done + +endef + +include $(sort $(wildcard package/gcc/*/*.mk)) diff --git a/package/gcr/Config.in b/package/gcr/Config.in new file mode 100644 index 0000000000..cd40ca18f6 --- /dev/null +++ b/package/gcr/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_GCR + bool "gcr" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + depends on !BR2_STATIC_LIBS # p11-kit + select BR2_PACKAGE_GNUPG2 # runtime + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_P11_KIT + help + Library for cryptographic UIs and accessing PKCS#11 modules. + + https://developer.gnome.org/gcr/ + +comment "gcr needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/gcr/gcr.hash b/package/gcr/gcr.hash new file mode 100644 index 0000000000..8b8b748b9e --- /dev/null +++ b/package/gcr/gcr.hash @@ -0,0 +1,2 @@ +# From http://ftp.acc.umu.se/pub/gnome/sources/gcr/3.20/gcr-3.20.0.sha256sum +sha256 90572c626d8a708225560c42b4421f7941315247fa1679d4ef569bde7f4bb379 gcr-3.20.0.tar.xz diff --git a/package/gcr/gcr.mk b/package/gcr/gcr.mk new file mode 100644 index 0000000000..d8cb667d15 --- /dev/null +++ b/package/gcr/gcr.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# gcr +# +################################################################################ + +GCR_VERSION_MAJOR = 3.20 +GCR_VERSION = $(GCR_VERSION_MAJOR).0 +GCR_SITE = http://ftp.acc.umu.se/pub/gnome/sources/gcr/$(GCR_VERSION_MAJOR) +GCR_SOURCE = gcr-$(GCR_VERSION).tar.xz +GCR_DEPENDENCIES = host-intltool host-pkgconf libgcrypt libglib2 p11-kit +GCR_INSTALL_STAGING = YES +GCR_CONF_ENV = ac_cv_path_GNUPG=/usr/bin/gpg2 +GCR_CONF_OPTS = \ + --disable-gtk-doc \ + --with-libgcrypt-prefix=$(STAGING_DIR)/usr +# Even though COPYING is v2 the code states v2.1+ +GCR_LICENSE = LGPLv2.1+ +GCR_LICENSE_FILES = COPYING + +# Only the X11 backend is supported for the simple GUI +ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) +GCR_DEPENDENCIES += libgtk3 +GCR_CONF_OPTS += --with-gtk +else +GCR_CONF_OPTS += --without-gtk +endif + +$(eval $(autotools-package)) diff --git a/package/gd/0001-gdlib-config.patch b/package/gd/0001-gdlib-config.patch new file mode 100644 index 0000000000..7756bf1240 --- /dev/null +++ b/package/gd/0001-gdlib-config.patch @@ -0,0 +1,32 @@ +Fix gdlib-config + +Since the @LIBICONV@ macro doesn't get replaced at compile time, we +end up installing an invalid gdlib-config: the gdlib-config --libs +says that one should link against @LIBICONV@ which obviously doesn't +work. + +Use the OpenWRT patch from +https://dev.openwrt.org/browser/packages/libs/gd/patches/101-gdlib-config.patch + +Signed-off-by: Thomas Petazzoni + +--- a/config/gdlib-config.in ++++ b/config/gdlib-config.in +@@ -71,7 +71,7 @@ while test $# -gt 0; do + echo @LDFLAGS@ + ;; + --libs) +- echo -lgd @LIBS@ @LIBICONV@ ++ echo -lgd @LIBS@ + ;; + --cflags|--includes) + echo -I@includedir@ +@@ -84,7 +84,7 @@ while test $# -gt 0; do + echo "includedir: $includedir" + echo "cflags: -I@includedir@" + echo "ldflags: @LDFLAGS@" +- echo "libs: @LIBS@ @LIBICONV@" ++ echo "libs: @LIBS@" + echo "libdir: $libdir" + echo "features: @FEATURES@" + ;; diff --git a/package/gd/0002-no-zlib.patch b/package/gd/0002-no-zlib.patch new file mode 100644 index 0000000000..65cf7f8f19 --- /dev/null +++ b/package/gd/0002-no-zlib.patch @@ -0,0 +1,51 @@ +[PATCH] gd_gd2: provide dummy implementations for all public symbols when !zlib + +gd_gd2.c only provides dummy implementations for some of it's public symbols +when zlib isn't found, causing build failures in several of the tools. + +Fix it by providing dummy implementations for all of them. + +Signed-off-by: Peter Korsgaard +--- + gd_gd2.c | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +Index: gd-2.0.35/gd_gd2.c +=================================================================== +--- gd-2.0.35.orig/src/gd_gd2.c ++++ gd-2.0.35/src/gd_gd2.c +@@ -1068,4 +1068,34 @@ + fprintf (stderr, "GD2 support is not available - no libz\n"); + return NULL; + } ++ ++BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2Part (FILE * inFile, int srcx, int srcy, int w, int h) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++ return NULL; ++} ++ ++BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, int w, ++ int h) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++ return NULL; ++} ++ ++BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartCtx (gdIOCtx * in, int srcx, int srcy, int w, int h) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++ return NULL; ++} ++ ++BGD_DECLARE(void) gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++} ++ ++BGD_DECLARE(void *) gdImageGd2Ptr (gdImagePtr im, int cs, int fmt, int *size) ++{ ++ fprintf (stderr, "GD2 support is not available - no libz\n"); ++ return NULL; ++} + #endif /* HAVE_LIBZ */ diff --git a/package/gd/0003-gd_bmp-fix-build-with-uClibc.patch b/package/gd/0003-gd_bmp-fix-build-with-uClibc.patch new file mode 100644 index 0000000000..89bc39186e --- /dev/null +++ b/package/gd/0003-gd_bmp-fix-build-with-uClibc.patch @@ -0,0 +1,50 @@ +From ea2a03e983acf34a1320b460dcad43b7e0b0b14f Mon Sep 17 00:00:00 2001 +Message-Id: +From: Baruch Siach +Date: Thu, 10 Apr 2014 15:49:13 +0300 +Subject: [PATCH] gd_bmp: fix build with uClibc + +Some architectures (like ARM) don't have the long double variants of math +functions under uClibc. Add a local ceill definition in this case. + +Patch status: reported upstream, +https://bitbucket.org/libgd/gd-libgd/issue/123/build-failure-agains-uclibc-arm + +Signed-off-by: Baruch Siach +--- + src/gd_bmp.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/src/gd_bmp.c b/src/gd_bmp.c +index 0fc021909f1b..11b3ec1baa01 100644 +--- a/src/gd_bmp.c ++++ b/src/gd_bmp.c +@@ -25,6 +25,11 @@ + #include "gdhelpers.h" + #include "bmp.h" + ++#include ++#if defined (__UCLIBC__) && !defined(__UCLIBC_HAS_LONG_DOUBLE_MATH__) ++#define NO_LONG_DOUBLE ++#endif ++ + static int compress_row(unsigned char *uncompressed_row, int length); + static int build_rle_packet(unsigned char *row, int packet_type, int length, unsigned char *data); + +@@ -42,6 +47,13 @@ static int bmp_read_rle(gdImagePtr im, gdIOCtxPtr infile, bmp_info_t *info); + + #define BMP_DEBUG(s) + ++#ifdef NO_LONG_DOUBLE ++long double ceill(long double x) ++{ ++ return (long double) ceil((double) x); ++} ++#endif ++ + static int gdBMPPutWord(gdIOCtx *out, int w) + { + /* Byte order is little-endian */ +-- +1.9.1 + diff --git a/package/gd/0004-webp-pre.patch b/package/gd/0004-webp-pre.patch new file mode 100644 index 0000000000..a4bc068b18 --- /dev/null +++ b/package/gd/0004-webp-pre.patch @@ -0,0 +1,37 @@ +Patch committed upstream +https://bitbucket.org/libgd/gd-libgd/commits/c7e5dc617c7466c44935cdefbe7e79de319f98ca?at=master + +Downloaded from Gentoo +https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/gd/files/gd-2.1.1-webp-pre.patch?revision=1.1&view=markup + +Signed-off-by: Bernd Kuhls + +--- +https://bugs.gentoo.org/545956 + +From c7e5dc617c7466c44935cdefbe7e79de319f98ca Mon Sep 17 00:00:00 2001 +From: Pierre Joye +Date: Sat, 17 Jan 2015 08:20:17 +0100 +Subject: [PATCH] fix #111, invalid default quantization + +--- + src/gd_webp.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/gd_webp.c b/src/gd_webp.c +index fae3861..a3ae1ac 100644 +--- a/src/gd_webp.c ++++ b/src/gd_webp.c +@@ -185,6 +185,9 @@ BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantiza + gd_error("gd-webp error: cannot allocate Y buffer"); + return; + } ++ if (quantization == -1) { ++ quantization = 80; ++ } + vp8_quality = mapQualityToVP8QP(quantization); + + U = Y + width * height; +-- +2.3.5 + diff --git a/package/gd/0005-webp.patch b/package/gd/0005-webp.patch new file mode 100644 index 0000000000..f648a87536 --- /dev/null +++ b/package/gd/0005-webp.patch @@ -0,0 +1,418 @@ +Patch committed upstream +https://bitbucket.org/libgd/gd-libgd/commits/a79232c5fa692c3b6e3f5bc95ecfc455424c3f54?at=master + +Downloaded from Gentoo +https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/gd/files/gd-2.1.1-webp.patch?revision=1.1&view=markup + +Signed-off-by: Bernd Kuhls + +--- +https://bugs.gentoo.org/545956 + +From a79232c5fa692c3b6e3f5bc95ecfc455424c3f54 Mon Sep 17 00:00:00 2001 +From: Pierre Joye +Date: Tue, 20 Jan 2015 04:55:11 +0100 +Subject: [PATCH] fix #129, drop VPX usage in favor of libwebp + +--- + configure.ac | 80 +++++------------ + src/gd_webp.c | 231 +++++++++++++++++++++----------------------------- + tests/Makefile.am | 2 +- + tests/webp/bug00111.c | 2 +- + 4 files changed, 122 insertions(+), 193 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1024a3a..8923186 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -317,63 +317,6 @@ if test "$with_xpm" != no; then + fi + AM_CONDITIONAL([HAVE_LIBXPM], test "$with_xpm" = yes) + +-dnl check for libvpx by default +-AC_ARG_WITH(vpx,dnl +-[ --with-vpx=DIR where to find the vpx library]) +- +-case $with_vpx in +-no) ;; +-yes|"") +- PKG_CHECK_MODULES([LIBVPX], vpx, [with_vpx=yes], +- [ +- PKG_CHECK_MODULES([LIBVPX], libvpx, [with_vpx=yes], +- [ +- if test "$with_vpx" = yes; then +- AC_MSG_ERROR([VPX support requested, but not found]) +- fi +- with_vpx=no +- ]) +- ]) +- ;; +-*) +- save_LIBS="$LIBS" +- save_CPPFLAGS="$CPPFLAGS" +- +- if test -d "$with_vpx"; then +- LIBVPX_CFLAGS="-I$with_vpx/include" +- LIBVPX_LIBS="-L$with_vpx/lib -lvpx" +- fi +- +- CPPFLAGS="$CPPFLAGS $LIBVPX_CFLAGS" +- LIBS="$LIBS $LIBVPX_LIBS" +- +- AC_CHECK_LIB(vpx,vpx_codec_destroy, +- [ +- if test -z "$LIBVPX_LIBS"; then +- LIBVPX_LIBS="-lvpx" +- fi +- with_vpx=yes +- ],[ +- if test "$with_vpx" != ""; then +- AC_MSG_ERROR([vpx support requested, but not found]) +- else +- with_vpx=no +- fi +- ]) +- +- CPPFLAGS="$save_CPPFLAGS" +- LIBS="$save_LIBS" +- ;; +-esac +- +-if test "$with_vpx" != no; then +- CPPFLAGS="$CPPFLAGS $LIBVPX_CFLAGS" +- LIBS="$LIBS $LIBVPX_LIBS" +- FEATURES="GD_VPX $FEATURES" +- AC_DEFINE(HAVE_LIBVPX, 1, [ Define if you have the VPX library. ]) +-fi +-AM_CONDITIONAL([HAVE_LIBVPX], test "$with_vpx" = yes) +- + dnl check for libtiff by default + AC_ARG_WITH(tiff,dnl + [ --with-tiff=DIR where to find the TIFF library]) +@@ -437,6 +380,27 @@ if test "$mingw_cv_win32_host" = yes; then + AC_DEFINE([BGDWIN32], [], [Define is you are building for Win32 API]) + fi + ++ ++dnl check for libwebp by default ++AC_ARG_WITH(webp,dnl ++[ --with-webp=DIR where to find the webp library], ++ [if test -d "$withval"; then ++ LDFLAGS="$LDFLAGS -L$withval/lib" ++ CFLAGS="$CFLAGS -I$withval/include" ++ fi], ++ withval=yes) ++ ++if test "$withval" != no; then ++ AC_CHECK_LIB(webp,WebPGetInfo, ++ [LIBS="-lwebp $LIBS" ++ FEATURES="GD_WEBP $FEATURES" ++ AC_DEFINE(HAVE_LIBWEBP, 1, [ Define if you have the webp library. ])]) ++ with_webp=yes ++else ++ with_webp=no ++fi ++AM_CONDITIONAL([HAVE_LIBWEBP], test "$with_webp" = yes) ++ + dnl report configuration + AC_MSG_RESULT([ + ** Configuration summary for $PACKAGE $VERSION: +@@ -444,7 +408,7 @@ AC_MSG_RESULT([ + Support for Zlib: $with_zlib + Support for PNG library: $with_png + Support for JPEG library: $ac_cv_lib_jpeg_jpeg_set_defaults +- Support for VPX library: $with_vpx ++ Support for WebP library: $with_webp + Support for TIFF library: $with_tiff + Support for Freetype 2.x library: $with_freetype + Support for Fontconfig library: $with_fontconfig +diff --git a/src/gd_webp.c b/src/gd_webp.c +index a3ae1ac..c44bd80 100644 +--- a/src/gd_webp.c ++++ b/src/gd_webp.c +@@ -2,33 +2,21 @@ + #include "config.h" + #endif /* HAVE_CONFIG_H */ + ++ ++#ifdef HAVE_LIBWEBP + #include + #include + #include + #include + #include "gd.h" + #include "gd_errors.h" +- +-#ifdef HAVE_LIBVPX +-#include "webpimg.h" + #include "gdhelpers.h" ++#include "webp/decode.h" ++#include "webp/encode.h" + +-extern void gd_YUV420toRGBA(uint8* Y, +- uint8* U, +- uint8* V, +- gdImagePtr im); +- +-extern void gd_RGBAToYUV420(gdImagePtr im2, +- uint8* Y, +- uint8* U, +- uint8* V); +- +-const char * gdWebpGetVersionString() +-{ +- return "not defined"; +-} ++#define GD_WEBP_ALLOC_STEP (4*1024) + +-BGD_DECLARE(gdImagePtr) gdImageCreateFromWebp (FILE * inFile) ++gdImagePtr gdImageCreateFromWebp (FILE * inFile) + { + gdImagePtr im; + gdIOCtx *in = gdNewFileCtx(inFile); +@@ -38,42 +26,16 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromWebp (FILE * inFile) + return im; + } + +-BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpPtr (int size, void *data) ++gdImagePtr gdImageCreateFromWebpCtx (gdIOCtx * infile) + { +- int width, height, ret; +- unsigned char *Y = NULL; +- unsigned char *U = NULL; +- unsigned char *V = NULL; +- gdImagePtr im; +- +- ret = WebPDecode(data, size, &Y, &U, &V, &width, &height); +- if (ret != webp_success) { +- if (Y) free(Y); +- if (U) free(U); +- if (V) free(V); +- gd_error("WebP decode: fail to decode input data"); +- return NULL; +- } +- im = gdImageCreateTrueColor(width, height); +- if (!im) { +- return NULL; +- } +- gd_YUV420toRGBA(Y, U, V, im); +- return im; +-} +- +-#define GD_WEBP_ALLOC_STEP (4*1024) +- +-BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpCtx (gdIOCtx * infile) +-{ +- int width, height, ret; +- unsigned char *filedata = NULL; ++ int width, height; ++ uint8_t *filedata = NULL; ++ uint8_t *argb = NULL; + unsigned char *read, *temp; +- unsigned char *Y = NULL; +- unsigned char *U = NULL; +- unsigned char *V = NULL; + size_t size = 0, n; + gdImagePtr im; ++ int x, y; ++ uint8_t *p; + + do { + temp = gdRealloc(filedata, size+GD_WEBP_ALLOC_STEP); +@@ -89,23 +51,97 @@ BGD_DECLARE(gdImagePtr) gdImageCreateFromWebpCtx (gdIOCtx * infile) + } + + n = gdGetBuf(read, GD_WEBP_ALLOC_STEP, infile); +- size += n; +- } while (n>0); ++ if (n>0 && n!=EOF) { ++ size += n; ++ } ++ } while (n>0 && n!=EOF); + +- ret = WebPDecode(filedata, size, &Y, &U, &V, &width, &height); +- gdFree(filedata); +- if (ret != webp_success) { +- if (Y) free(Y); +- if (U) free(U); +- if (V) free(V); +- gd_error("WebP decode: fail to decode input data"); ++ if (WebPGetInfo(filedata,size, &width, &height) == 0) { ++ gd_error("gd-webp cannot get webp info"); + return NULL; + } ++ + im = gdImageCreateTrueColor(width, height); +- gd_YUV420toRGBA(Y, U, V, im); ++ if (!im) { ++ return NULL; ++ } ++ argb = WebPDecodeARGB(filedata, size, &width, &height); ++ if (!argb) { ++ gd_error("gd-webp cannot allocate temporary buffer"); ++ gdFree(argb); ++ return NULL; ++ } ++ for (y = 0, p = argb; y < height; y++) { ++ for (x = 0; x < width; x++) { ++ register uint8_t a = gdAlphaMax - (*(p++) >> 1); ++ register uint8_t r = *(p++); ++ register uint8_t g = *(p++); ++ register uint8_t b = *(p++); ++ im->tpixels[y][x] = gdTrueColorAlpha(r, g, b, a); ++ } ++ } ++ gdFree(filedata); ++ free(argb); ++ im->saveAlphaFlag = 1; + return im; + } + ++void gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization) ++{ ++ uint8_t *argb; ++ int x, y; ++ uint8_t *p; ++ uint8_t *out; ++ size_t out_size; ++ ++ if (im == NULL) { ++ return; ++ } ++ ++ if (!gdImageTrueColor(im)) { ++ gd_error("Paletter image not supported by webp"); ++ return; ++ } ++ ++ if (quantization == -1) { ++ quantization = 80; ++ } ++ ++ argb = (uint8_t *)gdMalloc(gdImageSX(im) * 4 * gdImageSY(im)); ++ if (!argb) { ++ return; ++ } ++ p = argb; ++ for (y = 0; y < gdImageSY(im); y++) { ++ for (x = 0; x < gdImageSX(im); x++) { ++ register int c; ++ register char a; ++ c = im->tpixels[y][x]; ++ a = gdTrueColorGetAlpha(c); ++ if (a == 127) { ++ a = 0; ++ } else { ++ a = 255 - ((a << 1) + (a >> 6)); ++ } ++ *(p++) = gdTrueColorGetRed(c); ++ *(p++) = gdTrueColorGetGreen(c); ++ *(p++) = gdTrueColorGetBlue(c); ++ *(p++) = a; ++ } ++ } ++ out_size = WebPEncodeRGBA(argb, gdImageSX(im), gdImageSY(im), gdImageSX(im) * 4, quantization, &out); ++ printf("outsize: %i\n", out_size); ++ if (out_size == 0) { ++ gd_error("gd-webp encoding failed"); ++ goto freeargb; ++ } ++ gdPutBuf(out, out_size, outfile); ++ free(out); ++ ++freeargb: ++ gdFree(argb); ++} ++ + BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization) + { + gdIOCtx *out = gdNewFileCtx(outFile); +@@ -116,7 +152,7 @@ BGD_DECLARE(void) gdImageWebpEx (gdImagePtr im, FILE * outFile, int quantization + BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile) + { + gdIOCtx *out = gdNewFileCtx(outFile); +- gdImageWebpCtx(im, out, -1); ++ gdImageWebpCtx(im, out, -1); + out->gd_free(out); + } + +@@ -140,75 +176,4 @@ BGD_DECLARE(void *) gdImageWebpPtrEx (gdImagePtr im, int *size, int quantization + out->gd_free(out); + return rv; + } +- +-/* +- * Maps normalized QP (quality) to VP8 QP +- */ +-int mapQualityToVP8QP(int quality) { +-#define MIN_QUALITY 0 +-#define MAX_QUALITY 100 +-#define MIN_VP8QP 1 +-#define MAX_VP8QP 63 +- const float scale = MAX_VP8QP - MIN_VP8QP; +- const float vp8qp = +- scale * (MAX_QUALITY - quality) / (MAX_QUALITY - MIN_QUALITY) + MIN_VP8QP; +- if (quality < MIN_QUALITY || quality > MAX_QUALITY) { +- gd_error("Wrong quality value %d.", quality); +- return -1; +- } +- +- return (int)(vp8qp + 0.5); +-} +- +-/* This routine is based in part on code from Dale Lutz (Safe Software Inc.) +- * and in part on demo code from Chapter 15 of "PNG: The Definitive Guide" +- * (http://www.cdrom.com/pub/png/pngbook.html). +- */ +-BGD_DECLARE(void) gdImageWebpCtx (gdImagePtr im, gdIOCtx * outfile, int quantization) +-{ +- int width = im->sx; +- int height = im->sy; +- +- int yuv_width, yuv_height, yuv_nbytes, ret; +- int vp8_quality; +- unsigned char *Y = NULL, +- *U = NULL, +- *V = NULL; +- unsigned char *filedata = NULL; +- +- /* Conversion to Y,U,V buffer */ +- yuv_width = (width + 1) >> 1; +- yuv_height = (height + 1) >> 1; +- yuv_nbytes = width * height + 2 * yuv_width * yuv_height; +- +- if ((Y = (unsigned char *)gdCalloc(yuv_nbytes, sizeof(unsigned char))) == NULL) { +- gd_error("gd-webp error: cannot allocate Y buffer"); +- return; +- } +- if (quantization == -1) { +- quantization = 80; +- } +- vp8_quality = mapQualityToVP8QP(quantization); +- +- U = Y + width * height; +- V = U + yuv_width * yuv_height; +- gd_RGBAToYUV420(im, Y, U, V); +- +- /* Encode Y,U,V and write data to file */ +- ret = WebPEncode(Y, U, V, width, height, width, yuv_width, yuv_height, yuv_width, +- vp8_quality, &filedata, &yuv_nbytes, NULL); +- gdFree(Y); +- +- if (ret != webp_success) { +- if (filedata) { +- free(filedata); +- } +- gd_error("gd-webp error: WebP Encoder failed"); +- return; +- } +- +- gdPutBuf (filedata, yuv_nbytes, outfile); +- free(filedata); +-} +- +-#endif /* HAVE_LIBVPX */ ++#endif /* HAVE_LIBWEBP */ +-- +2.3.5 + diff --git a/package/gd/Config.in b/package/gd/Config.in new file mode 100644 index 0000000000..e83863508b --- /dev/null +++ b/package/gd/Config.in @@ -0,0 +1,62 @@ +config BR2_PACKAGE_GD + bool "gd" + help + GD is a graphics library. It allows your code to quickly + draw images complete with lines, arcs, text, multiple + colours, cut and paste from other images, flood fills, and + write out the result as a PNG file. This is particularly + useful in World Wide Web applications, where PNG is one of + the formats accepted for inline images by most browsers. + + http://libgd.bitbucket.org/ + +if BR2_PACKAGE_GD + +menu "gd tools" + +config BR2_PACKAGE_GD_ANNOTATE + bool "annotate" + +config BR2_PACKAGE_GD_BDFTOGD + bool "bdftogd" + depends on BR2_PACKAGE_PERL + +config BR2_PACKAGE_GD_GD2COPYPAL + bool "gd2copypal" + +config BR2_PACKAGE_GD_GD2TOGIF + bool "gd2togif" + +config BR2_PACKAGE_GD_GD2TOPNG + bool "gd2topng" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_GD_GDCMPGIF + bool "gdcmpgif" + +config BR2_PACKAGE_GD_GDPARTTOPNG + bool "gdparttopng" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_GD_GDTOPNG + bool "gdtopng" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_GD_GIFTOGD2 + bool "giftogd2" + +config BR2_PACKAGE_GD_PNGTOGD + bool "pngtogd" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_GD_PNGTOGD2 + bool "pngtogd2" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_GD_WEBPNG + bool "webpng" + select BR2_PACKAGE_LIBPNG + +endmenu + +endif diff --git a/package/gd/gd.hash b/package/gd/gd.hash new file mode 100644 index 0000000000..8edbb1ad52 --- /dev/null +++ b/package/gd/gd.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9ada1ed45594abc998ebc942cef12b032fbad672e73efc22bc9ff54f5df2b285 libgd-2.1.1.tar.xz diff --git a/package/gd/gd.mk b/package/gd/gd.mk new file mode 100644 index 0000000000..c0562418a8 --- /dev/null +++ b/package/gd/gd.mk @@ -0,0 +1,97 @@ +################################################################################ +# +# gd +# +################################################################################ + +GD_VERSION = 2.1.1 +GD_SOURCE = libgd-$(GD_VERSION).tar.xz +GD_SITE = https://bitbucket.org/libgd/gd-libgd/downloads +GD_AUTORECONF = YES +GD_INSTALL_STAGING = YES +GD_LICENSE = GD license +GD_LICENSE_FILES = COPYING +GD_CONFIG_SCRIPTS = gdlib-config +GD_CONF_OPTS = --without-x --disable-rpath +GD_DEPENDENCIES = host-pkgconf + +# gd forgets to link utilities with -pthread even though it uses +# pthreads, causing linking errors with static linking +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +GD_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -pthread" +endif + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +GD_DEPENDENCIES += fontconfig +GD_CONF_OPTS += --with-fontconfig +endif + +ifeq ($(BR2_PACKAGE_FREETYPE),y) +GD_DEPENDENCIES += freetype +GD_CONF_OPTS += --with-freetype=$(STAGING_DIR)/usr +else +GD_CONF_OPTS += --without-freetype +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +GD_DEPENDENCIES += libiconv +# not strictly needed for gd, but ensures -liconv ends up in +# gdlib-config --libs output +GD_CONF_ENV += LIBS="-liconv" +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +GD_DEPENDENCIES += jpeg +GD_CONF_OPTS += --with-jpeg +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +GD_DEPENDENCIES += libpng +GD_CONF_OPTS += --with-png +else +GD_CONF_OPTS += --without-png +endif + +ifeq ($(BR2_PACKAGE_WEBP),y) +GD_DEPENDENCIES += webp +GD_CONF_OPTS += --with-webp +else +GD_CONF_OPTS += --without-webp +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) +GD_DEPENDENCIES += tiff +GD_CONF_OPTS += --with-tiff +else +GD_CONF_OPTS += --without-tiff +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXPM),y) +GD_DEPENDENCIES += xlib_libXpm +GD_CONF_OPTS += --with-xpm +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +GD_DEPENDENCIES += zlib +endif + +GD_TOOLS_$(BR2_PACKAGE_GD_ANNOTATE) += annotate +GD_TOOLS_$(BR2_PACKAGE_GD_BDFTOGD) += bdftogd +GD_TOOLS_$(BR2_PACKAGE_GD_GD2COPYPAL) += gd2copypal +GD_TOOLS_$(BR2_PACKAGE_GD_GD2TOGIF) += gd2togif +GD_TOOLS_$(BR2_PACKAGE_GD_GD2TOPNG) += gd2topng +GD_TOOLS_$(BR2_PACKAGE_GD_GDCMPGIF) += gdcmpgif +GD_TOOLS_$(BR2_PACKAGE_GD_GDPARTTOPNG) += gdparttopng +GD_TOOLS_$(BR2_PACKAGE_GD_GDTOPNG) += gdtopng +GD_TOOLS_$(BR2_PACKAGE_GD_GIFTOGD2) += giftogd2 +GD_TOOLS_$(BR2_PACKAGE_GD_PNGTOGD) += pngtogd +GD_TOOLS_$(BR2_PACKAGE_GD_PNGTOGD2) += pngtogd2 +GD_TOOLS_$(BR2_PACKAGE_GD_WEBPNG) += webpng + +define GD_REMOVE_TOOLS + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(GD_TOOLS_)) +endef + +GD_POST_INSTALL_TARGET_HOOKS += GD_REMOVE_TOOLS + +$(eval $(autotools-package)) diff --git a/package/gdb/7.10.1/0001-Add-some-casts-for-building-on-musl.patch b/package/gdb/7.10.1/0001-Add-some-casts-for-building-on-musl.patch new file mode 100644 index 0000000000..863e26aac3 --- /dev/null +++ b/package/gdb/7.10.1/0001-Add-some-casts-for-building-on-musl.patch @@ -0,0 +1,90 @@ +From d41401ace01c234f42697e190a2ac95991780626 Mon Sep 17 00:00:00 2001 +From: Doug Evans +Date: Mon, 26 Oct 2015 13:20:12 -0700 +Subject: [PATCH] Add some casts for building on musl. + +gdb/ChangeLog: + + * linux-thread-db.c (find_new_threads_callback): Cast ti.ti_tid to + unsigned long for debug_printf. + (thread_db_pid_to_str): Ditto. + +gdb/gdbserver/ChangeLog: + + * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long + for debug_printf. + (attach_thread, find_new_threads_callback): Ditto. + +[Arnout: removed the parts that don't apply, including ChangeLog] +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gdb/ChangeLog | 5 +++++ + gdb/gdbserver/ChangeLog | 6 ++++++ + gdb/gdbserver/thread-db.c | 9 +++++---- + gdb/linux-thread-db.c | 5 +++-- + 4 files changed, 19 insertions(+), 6 deletions(-) + +diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c +index ffe722d..3df10ff 100644 +--- a/gdb/gdbserver/thread-db.c ++++ b/gdb/gdbserver/thread-db.c +@@ -278,7 +278,7 @@ find_one_thread (ptid_t ptid) + + if (debug_threads) + debug_printf ("Found thread %ld (LWP %d)\n", +- ti.ti_tid, ti.ti_lid); ++ (unsigned long) ti.ti_tid, ti.ti_lid); + + if (lwpid != ti.ti_lid) + { +@@ -319,12 +319,12 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p) + + if (debug_threads) + debug_printf ("Attaching to thread %ld (LWP %d)\n", +- ti_p->ti_tid, ti_p->ti_lid); ++ (unsigned long) ti_p->ti_tid, ti_p->ti_lid); + err = linux_attach_lwp (ptid); + if (err != 0) + { + warning ("Could not attach to thread %ld (LWP %d): %s\n", +- ti_p->ti_tid, ti_p->ti_lid, ++ (unsigned long) ti_p->ti_tid, ti_p->ti_lid, + linux_ptrace_attach_fail_reason_string (ptid, err)); + return 0; + } +@@ -392,7 +392,8 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data) + glibc PR17707. */ + if (debug_threads) + debug_printf ("thread_db: skipping exited and " +- "joined thread (0x%lx)\n", ti.ti_tid); ++ "joined thread (0x%lx)\n", ++ (unsigned long) ti.ti_tid); + return 0; + } + +diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c +index 66e9595..41db29a 100644 +--- a/gdb/linux-thread-db.c ++++ b/gdb/linux-thread-db.c +@@ -1585,7 +1585,8 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data) + if (libthread_db_debug) + fprintf_unfiltered (gdb_stdlog, + "thread_db: skipping exited and " +- "joined thread (0x%lx)\n", ti.ti_tid); ++ "joined thread (0x%lx)\n", ++ (unsigned long) ti.ti_tid); + return 0; + } + +@@ -1816,7 +1817,7 @@ thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid) + + tid = thread_info->priv->tid; + snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)", +- tid, ptid_get_lwp (ptid)); ++ (unsigned long) tid, ptid_get_lwp (ptid)); + + return buf; + } +-- +1.9.4 + diff --git a/package/gdb/7.10.1/0002-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch b/package/gdb/7.10.1/0002-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch new file mode 100644 index 0000000000..60c357cd80 --- /dev/null +++ b/package/gdb/7.10.1/0002-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch @@ -0,0 +1,63 @@ +From 963843d4d07aef6caa296dacf191f8adc9518596 Mon Sep 17 00:00:00 2001 +From: Doug Evans +Date: Mon, 26 Oct 2015 13:24:01 -0700 +Subject: [PATCH] musl: Move W_STOPCODE to common/gdb_wait.h. + +gdb/ChangeLog: + + * common/gdb_wait.h (W_STOPCODE): Define, moved here from + gdbserver/linux-low.c. + (WSETSTOP): Simplify. + +gdb/gdbserver/ChangeLog: + + * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h. + +[Arnout: removed the parts that don't apply, including ChangeLog] +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gdb/ChangeLog | 6 ++++++ + gdb/common/gdb_wait.h | 8 ++++---- + gdb/gdbserver/ChangeLog | 4 ++++ + gdb/gdbserver/linux-low.c | 4 ---- + 4 files changed, 14 insertions(+), 8 deletions(-) + +diff --git a/gdb/common/gdb_wait.h b/gdb/common/gdb_wait.h +index 9b250d2..412f813 100644 +--- a/gdb/common/gdb_wait.h ++++ b/gdb/common/gdb_wait.h +@@ -85,12 +85,12 @@ + # endif + #endif + ++#ifndef W_STOPCODE ++#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) ++#endif ++ + #ifndef WSETSTOP +-# ifdef W_STOPCODE + #define WSETSTOP(w,sig) ((w) = W_STOPCODE(sig)) +-# else +-#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8))) +-# endif + #endif + + /* For native GNU/Linux we may use waitpid and the __WCLONE option. +diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c +index 0c552b8..7ed67c7 100644 +--- a/gdb/gdbserver/linux-low.c ++++ b/gdb/gdbserver/linux-low.c +@@ -70,10 +70,6 @@ + #define O_LARGEFILE 0 + #endif + +-#ifndef W_STOPCODE +-#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) +-#endif +- + /* This is the kernel's hard limit. Not to be confused with + SIGRTMIN. */ + #ifndef __SIGRTMIN +-- +1.9.4 + diff --git a/package/gdb/7.10.1/0003-move-__SIGRTMIN.patch b/package/gdb/7.10.1/0003-move-__SIGRTMIN.patch new file mode 100644 index 0000000000..38ba1f028a --- /dev/null +++ b/package/gdb/7.10.1/0003-move-__SIGRTMIN.patch @@ -0,0 +1,58 @@ +From 682b25469e66ea45b214e95962671373983c118f Mon Sep 17 00:00:00 2001 +From: Doug Evans +Date: Mon, 26 Oct 2015 13:30:57 -0700 +Subject: [PATCH] Move __SIGRTMIN. + +gdb/ChangeLog: + + * nat/linux-nat.h (__SIGRTMIN): Move here from gdbserver/linux-low.c. + +gdb/gdbserver/ChangeLog: + + * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h. + +[Arnout: removed the parts that don't apply, including ChangeLog] +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gdb/ChangeLog | 4 ++++ + gdb/gdbserver/ChangeLog | 4 ++++ + gdb/gdbserver/linux-low.c | 6 ------ + gdb/nat/linux-nat.h | 5 +++++ + 4 files changed, 13 insertions(+), 6 deletions(-) + +diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c +index 7ed67c7..e778c4c 100644 +--- a/gdb/gdbserver/linux-low.c ++++ b/gdb/gdbserver/linux-low.c +@@ -70,12 +70,6 @@ + #define O_LARGEFILE 0 + #endif + +-/* This is the kernel's hard limit. Not to be confused with +- SIGRTMIN. */ +-#ifndef __SIGRTMIN +-#define __SIGRTMIN 32 +-#endif +- + /* Some targets did not define these ptrace constants from the start, + so gdbserver defines them locally here. In the future, these may + be removed after they are added to asm/ptrace.h. */ +diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h +index 0633fa9..70e6274 100644 +--- a/gdb/nat/linux-nat.h ++++ b/gdb/nat/linux-nat.h +@@ -25,6 +25,11 @@ + struct lwp_info; + struct arch_lwp_info; + ++/* This is the kernel's hard limit. Not to be confused with SIGRTMIN. */ ++#ifndef __SIGRTMIN ++#define __SIGRTMIN 32 ++#endif ++ + /* Unlike other extended result codes, WSTOPSIG (status) on + PTRACE_O_TRACESYSGOOD syscall events doesn't return SIGTRAP, but + instead SIGTRAP with bit 7 set. */ +-- +1.9.4 + diff --git a/package/gdb/7.10.1/0004-xtensa-implement-NPTL-helpers.patch b/package/gdb/7.10.1/0004-xtensa-implement-NPTL-helpers.patch new file mode 100644 index 0000000000..e7bc74ea53 --- /dev/null +++ b/package/gdb/7.10.1/0004-xtensa-implement-NPTL-helpers.patch @@ -0,0 +1,267 @@ +From d4eb69fc4b50f9a0babd70b28d0601b40f31bd0f Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 2 Jul 2015 15:10:58 +0300 +Subject: [PATCH] xtensa: implement NPTL helpers + +These changes allow debugging multithreaded NPTL xtensa applications. + +2015-08-20 Max Filippov +gdb/gdbserver/ + * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes. + * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New + #includes. + (ps_get_thread_area): New function. + +2015-08-20 Max Filippov +gdb/ + * arch/xtensa.h: New file. + * xtensa-linux-nat.c (gdb_proc_service.h): New #include. + (ps_get_thread_area): New function. + * xtensa-linux-tdep.c (xtensa_linux_init_abi): Add call to + set_gdbarch_fetch_tls_load_module_address to enable TLS support. + * xtensa-tdep.c (osabi.h): New #include. + (xtensa_gdbarch_init): Call gdbarch_init_osabi to register + xtensa-specific hooks. + * xtensa-tdep.h (struct xtensa_elf_gregset_t): Add threadptr + member and move the structure to arch/xtensa.h. + +Signed-off-by: Max Filippov +--- +Backported from: 40045d91812b25c88c8275b8c08d27c234b68ba8 +Changes to ChangeLog files are dropped. + + gdb/arch/xtensa.h | 46 ++++++++++++++++++++++++++++++++++++++++ + gdb/gdbserver/configure.srv | 1 + + gdb/gdbserver/linux-xtensa-low.c | 21 ++++++++++++++++++ + gdb/xtensa-linux-nat.c | 22 ++++++++++++++++++ + gdb/xtensa-linux-tdep.c | 4 ++++ + gdb/xtensa-tdep.c | 4 ++++ + gdb/xtensa-tdep.h | 24 ++------------------ + 7 files changed, 100 insertions(+), 22 deletions(-) + create mode 100644 gdb/arch/xtensa.h + +diff --git a/gdb/arch/xtensa.h b/gdb/arch/xtensa.h +new file mode 100644 +index 0000000..fe96584 +--- /dev/null ++++ b/gdb/arch/xtensa.h +@@ -0,0 +1,46 @@ ++/* Common Target-dependent code for the Xtensa port of GDB, the GNU debugger. ++ ++ Copyright (C) 2003-2015 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#ifndef XTENSA_H ++#define XTENSA_H ++ ++/* Xtensa ELF core file register set representation ('.reg' section). ++ Copied from target-side ELF header . */ ++ ++typedef uint32_t xtensa_elf_greg_t; ++ ++typedef struct ++{ ++ xtensa_elf_greg_t pc; ++ xtensa_elf_greg_t ps; ++ xtensa_elf_greg_t lbeg; ++ xtensa_elf_greg_t lend; ++ xtensa_elf_greg_t lcount; ++ xtensa_elf_greg_t sar; ++ xtensa_elf_greg_t windowstart; ++ xtensa_elf_greg_t windowbase; ++ xtensa_elf_greg_t threadptr; ++ xtensa_elf_greg_t reserved[7+48]; ++ xtensa_elf_greg_t ar[64]; ++} xtensa_elf_gregset_t; ++ ++#define XTENSA_ELF_NGREG (sizeof (xtensa_elf_gregset_t) \ ++ / sizeof (xtensa_elf_greg_t)) ++ ++#endif +diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv +index 0b18d1d..320c26a 100644 +--- a/gdb/gdbserver/configure.srv ++++ b/gdb/gdbserver/configure.srv +@@ -352,6 +352,7 @@ case "${target}" in + xtensa*-*-linux*) srv_regobj=reg-xtensa.o + srv_tgtobj="$srv_linux_obj linux-xtensa-low.o" + srv_linux_regsets=yes ++ srv_linux_thread_db=yes + ;; + tilegx-*-linux*) srv_regobj=reg-tilegx.o + srv_regobj="${srv_regobj} reg-tilegx32.o" +diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c +index 4daccee..debe467 100644 +--- a/gdb/gdbserver/linux-xtensa-low.c ++++ b/gdb/gdbserver/linux-xtensa-low.c +@@ -26,6 +26,8 @@ extern const struct target_desc *tdesc_xtensa; + + #include + #include ++#include "arch/xtensa.h" ++#include "gdb_proc_service.h" + + #include "xtensa-xtregs.c" + +@@ -179,6 +181,25 @@ xtensa_breakpoint_at (CORE_ADDR where) + xtensa_breakpoint, xtensa_breakpoint_len) == 0; + } + ++/* Called by libthread_db. */ ++ ++ps_err_e ++ps_get_thread_area (const struct ps_prochandle *ph, ++ lwpid_t lwpid, int idx, void **base) ++{ ++ xtensa_elf_gregset_t regs; ++ ++ if (ptrace (PTRACE_GETREGS, lwpid, NULL, ®s) != 0) ++ return PS_ERR; ++ ++ /* IDX is the bias from the thread pointer to the beginning of the ++ thread descriptor. It has to be subtracted due to implementation ++ quirks in libthread_db. */ ++ *base = (void *) ((char *) regs.threadptr - idx); ++ ++ return PS_OK; ++} ++ + static struct regsets_info xtensa_regsets_info = + { + xtensa_regsets, /* regsets */ +diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c +index 77ad3e0..5538d5b 100644 +--- a/gdb/xtensa-linux-nat.c ++++ b/gdb/xtensa-linux-nat.c +@@ -37,6 +37,9 @@ + #include "gregset.h" + #include "xtensa-tdep.h" + ++/* Defines ps_err_e, struct ps_prochandle. */ ++#include "gdb_proc_service.h" ++ + /* Extended register set depends on hardware configs. + Keeping these definitions separately allows to introduce + hardware-specific overlays. */ +@@ -280,6 +283,25 @@ xtensa_linux_store_inferior_registers (struct target_ops *ops, + store_xtregs (regcache, regnum); + } + ++/* Called by libthread_db. */ ++ ++ps_err_e ++ps_get_thread_area (const struct ps_prochandle *ph, ++ lwpid_t lwpid, int idx, void **base) ++{ ++ xtensa_elf_gregset_t regs; ++ ++ if (ptrace (PTRACE_GETREGS, lwpid, NULL, ®s) != 0) ++ return PS_ERR; ++ ++ /* IDX is the bias from the thread pointer to the beginning of the ++ thread descriptor. It has to be subtracted due to implementation ++ quirks in libthread_db. */ ++ *base = (void *) ((char *) regs.threadptr - idx); ++ ++ return PS_OK; ++} ++ + void _initialize_xtensa_linux_nat (void); + + void +diff --git a/gdb/xtensa-linux-tdep.c b/gdb/xtensa-linux-tdep.c +index 61ea9b0..99e0d3e 100644 +--- a/gdb/xtensa-linux-tdep.c ++++ b/gdb/xtensa-linux-tdep.c +@@ -106,6 +106,10 @@ xtensa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) + xtensa_linux_gdb_signal_from_target); + set_gdbarch_gdb_signal_to_target (gdbarch, + xtensa_linux_gdb_signal_to_target); ++ ++ /* Enable TLS support. */ ++ set_gdbarch_fetch_tls_load_module_address (gdbarch, ++ svr4_fetch_objfile_link_map); + } + + /* Provide a prototype to silence -Wmissing-prototypes. */ +diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c +index 55e7d98..4b693ed 100644 +--- a/gdb/xtensa-tdep.c ++++ b/gdb/xtensa-tdep.c +@@ -28,6 +28,7 @@ + #include "value.h" + #include "dis-asm.h" + #include "inferior.h" ++#include "osabi.h" + #include "floatformat.h" + #include "regcache.h" + #include "reggroups.h" +@@ -3273,6 +3274,9 @@ xtensa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) + set_solib_svr4_fetch_link_map_offsets + (gdbarch, svr4_ilp32_fetch_link_map_offsets); + ++ /* Hook in the ABI-specific overrides, if they have been registered. */ ++ gdbarch_init_osabi (info, gdbarch); ++ + return gdbarch; + } + +diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h +index caa2988..5b28cab 100644 +--- a/gdb/xtensa-tdep.h ++++ b/gdb/xtensa-tdep.h +@@ -18,6 +18,8 @@ + along with this program. If not, see . */ + + ++#include "arch/xtensa.h" ++ + /* XTENSA_TDEP_VERSION can/should be changed along with XTENSA_CONFIG_VERSION + whenever the "tdep" structure changes in an incompatible way. */ + +@@ -81,28 +83,6 @@ typedef enum + } xtensa_target_flags_t; + + +-/* Xtensa ELF core file register set representation ('.reg' section). +- Copied from target-side ELF header . */ +- +-typedef uint32_t xtensa_elf_greg_t; +- +-typedef struct +-{ +- xtensa_elf_greg_t pc; +- xtensa_elf_greg_t ps; +- xtensa_elf_greg_t lbeg; +- xtensa_elf_greg_t lend; +- xtensa_elf_greg_t lcount; +- xtensa_elf_greg_t sar; +- xtensa_elf_greg_t windowstart; +- xtensa_elf_greg_t windowbase; +- xtensa_elf_greg_t reserved[8+48]; +- xtensa_elf_greg_t ar[64]; +-} xtensa_elf_gregset_t; +- +-#define XTENSA_ELF_NGREG (sizeof (xtensa_elf_gregset_t) \ +- / sizeof (xtensa_elf_greg_t)) +- + /* Mask. */ + + typedef struct +-- +1.8.1.4 + diff --git a/package/gdb/7.8.2/0001-gdbserver-fix-uClibc-whithout-MMU.patch b/package/gdb/7.8.2/0001-gdbserver-fix-uClibc-whithout-MMU.patch new file mode 100644 index 0000000000..42168df570 --- /dev/null +++ b/package/gdb/7.8.2/0001-gdbserver-fix-uClibc-whithout-MMU.patch @@ -0,0 +1,34 @@ +From 59432cbfe267ad89b7cfc73dcd702b8282ef4e9d Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 10 Apr 2015 22:58:07 +0200 +Subject: [PATCH] gdbserver: fix uClibc whithout MMU. + +Since commit d86d4aafd4fa22fa4cccb83253fb187b03f97f48, the pid +must be retrieved from current_inferior. + +The change has not been made in the function linux_read_offsets(). + +Fixes: +http://autobuild.buildroot.net/results/9e4/9e4df085319e346803c26c65478accb27eb950ae/build-end.log + +Signed-off-by: Romain Naour +--- + gdb/gdbserver/linux-low.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c +index 1a40897..71d078a 100644 +--- a/gdb/gdbserver/linux-low.c ++++ b/gdb/gdbserver/linux-low.c +@@ -4933,7 +4933,7 @@ static int + linux_read_offsets (CORE_ADDR *text_p, CORE_ADDR *data_p) + { + unsigned long text, text_end, data; +- int pid = lwpid_of (get_thread_lwp (current_inferior)); ++ int pid = lwpid_of (current_inferior); + + errno = 0; + +-- +1.9.3 + diff --git a/package/gdb/7.8.2/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch b/package/gdb/7.8.2/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch new file mode 100644 index 0000000000..93fe749ef0 --- /dev/null +++ b/package/gdb/7.8.2/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch @@ -0,0 +1,47 @@ +From deb44829ecc1dd38275af0fcf91acd319e227a89 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 17 Apr 2015 03:07:41 +0300 +Subject: [PATCH 1/2] gdbserver/xtensa: drop xtensa_usrregs_info + +xtensa_usrregs_info refers to undefined variables xtensa_num_regs and +xtensa_regmap. Drop xtensa_usrregs_info and replace pointer to usrregs +in regs_info with NULL since all registers are read/set through regsets. + +2015-04-17 Max Filippov +gdb/gdbserver/ + * linux-xtensa-low.c (xtensa_usrregs_info): Remove. + (regs_info): Replace usrregs pointer with NULL. + +Signed-off-by: Max Filippov +--- +Backported from: deb44829ecc1dd38275af0fcf91acd319e227a89 +Changes to ChangeLog are dropped. + + gdb/gdbserver/linux-xtensa-low.c | 8 +------- + 2 files changed, 6 insertions(+), 7 deletions(-) + +diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c +index f7fafaf..e786da5 100644 +--- a/gdb/gdbserver/linux-xtensa-low.c ++++ b/gdb/gdbserver/linux-xtensa-low.c +@@ -186,16 +186,10 @@ static struct regsets_info xtensa_regsets_info = + NULL, /* disabled_regsets */ + }; + +-static struct usrregs_info xtensa_usrregs_info = +- { +- xtensa_num_regs, +- xtensa_regmap, +- }; +- + static struct regs_info regs_info = + { + NULL, /* regset_bitmap */ +- &xtensa_usrregs_info, ++ NULL, /* usrregs */ + &xtensa_regsets_info + }; + +-- +1.8.1.4 + diff --git a/package/gdb/7.8.2/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch b/package/gdb/7.8.2/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch new file mode 100644 index 0000000000..027f700b09 --- /dev/null +++ b/package/gdb/7.8.2/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch @@ -0,0 +1,46 @@ +From a2d5a9d76f2366ed93095fc5a63eafa06b22f808 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 17 Apr 2015 02:52:50 +0300 +Subject: [PATCH 2/2] gdbserver/xtensa: fix typo in XCHAL_HAVE_LOOPS + +This fixes lbeg/lend/lcount registers handling through gdbserver. + +2015-04-17 Max Filippov +gdb/gdbserver/ + * linux-xtensa-low.c (xtensa_fill_gregset) + (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of + XCHAL_HAVE_LOOP. + +Signed-off-by: Max Filippov +--- +Backported from: a2d5a9d76f2366ed93095fc5a63eafa06b22f808 +Changes to ChangeLog are dropped. + + gdb/gdbserver/linux-xtensa-low.c | 4 ++-- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c +index e786da5..4daccee 100644 +--- a/gdb/gdbserver/linux-xtensa-low.c ++++ b/gdb/gdbserver/linux-xtensa-low.c +@@ -59,7 +59,7 @@ xtensa_fill_gregset (struct regcache *regcache, void *buf) + + /* Loop registers, if hardware has it. */ + +-#if XCHAL_HAVE_LOOP ++#if XCHAL_HAVE_LOOPS + collect_register_by_name (regcache, "lbeg", (char*)&rset[R_LBEG]); + collect_register_by_name (regcache, "lend", (char*)&rset[R_LEND]); + collect_register_by_name (regcache, "lcount", (char*)&rset[R_LCOUNT]); +@@ -94,7 +94,7 @@ xtensa_store_gregset (struct regcache *regcache, const void *buf) + + /* Loop registers, if hardware has it. */ + +-#if XCHAL_HAVE_LOOP ++#if XCHAL_HAVE_LOOPS + supply_register_by_name (regcache, "lbeg", (char*)&rset[R_LBEG]); + supply_register_by_name (regcache, "lend", (char*)&rset[R_LEND]); + supply_register_by_name (regcache, "lcount", (char*)&rset[R_LCOUNT]); +-- +1.8.1.4 + diff --git a/package/gdb/7.8.2/0004-Add-some-casts-for-building-on-musl.patch b/package/gdb/7.8.2/0004-Add-some-casts-for-building-on-musl.patch new file mode 100644 index 0000000000..bf20c03c23 --- /dev/null +++ b/package/gdb/7.8.2/0004-Add-some-casts-for-building-on-musl.patch @@ -0,0 +1,70 @@ +From d41401ace01c234f42697e190a2ac95991780626 Mon Sep 17 00:00:00 2001 +From: Doug Evans +Date: Mon, 26 Oct 2015 13:20:12 -0700 +Subject: [PATCH] Add some casts for building on musl. + +gdb/ChangeLog: + + * linux-thread-db.c (find_new_threads_callback): Cast ti.ti_tid to + unsigned long for debug_printf. + (thread_db_pid_to_str): Ditto. + +gdb/gdbserver/ChangeLog: + + * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long + for debug_printf. + (attach_thread, find_new_threads_callback): Ditto. + +[Arnout: removed the parts that don't apply, including ChangeLog] +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gdb/ChangeLog | 5 +++++ + gdb/gdbserver/ChangeLog | 6 ++++++ + gdb/gdbserver/thread-db.c | 9 +++++---- + gdb/linux-thread-db.c | 5 +++-- + 4 files changed, 19 insertions(+), 6 deletions(-) + +diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c +index ffe722d..3df10ff 100644 +--- a/gdb/gdbserver/thread-db.c ++++ b/gdb/gdbserver/thread-db.c +@@ -278,7 +278,7 @@ find_one_thread (ptid_t ptid) + + if (debug_threads) + debug_printf ("Found thread %ld (LWP %d)\n", +- ti.ti_tid, ti.ti_lid); ++ (unsigned long) ti.ti_tid, ti.ti_lid); + + if (lwpid != ti.ti_lid) + { +@@ -319,12 +319,12 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p) + + if (debug_threads) + debug_printf ("Attaching to thread %ld (LWP %d)\n", +- ti_p->ti_tid, ti_p->ti_lid); ++ (unsigned long) ti_p->ti_tid, ti_p->ti_lid); + err = linux_attach_lwp (ptid); + if (err != 0) + { + warning ("Could not attach to thread %ld (LWP %d): %s\n", +- ti_p->ti_tid, ti_p->ti_lid, ++ (unsigned long) ti_p->ti_tid, ti_p->ti_lid, + linux_attach_fail_reason_string (ptid, err)); + return 0; + } +diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c +index 66e9595..41db29a 100644 +--- a/gdb/linux-thread-db.c ++++ b/gdb/linux-thread-db.c +@@ -1816,7 +1817,7 @@ thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid) + + tid = thread_info->priv->tid; + snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)", +- tid, ptid_get_lwp (ptid)); ++ (unsigned long) tid, ptid_get_lwp (ptid)); + + return buf; + } +-- +1.9.4 + diff --git a/package/gdb/7.8.2/0005-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch b/package/gdb/7.8.2/0005-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch new file mode 100644 index 0000000000..60c357cd80 --- /dev/null +++ b/package/gdb/7.8.2/0005-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch @@ -0,0 +1,63 @@ +From 963843d4d07aef6caa296dacf191f8adc9518596 Mon Sep 17 00:00:00 2001 +From: Doug Evans +Date: Mon, 26 Oct 2015 13:24:01 -0700 +Subject: [PATCH] musl: Move W_STOPCODE to common/gdb_wait.h. + +gdb/ChangeLog: + + * common/gdb_wait.h (W_STOPCODE): Define, moved here from + gdbserver/linux-low.c. + (WSETSTOP): Simplify. + +gdb/gdbserver/ChangeLog: + + * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h. + +[Arnout: removed the parts that don't apply, including ChangeLog] +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gdb/ChangeLog | 6 ++++++ + gdb/common/gdb_wait.h | 8 ++++---- + gdb/gdbserver/ChangeLog | 4 ++++ + gdb/gdbserver/linux-low.c | 4 ---- + 4 files changed, 14 insertions(+), 8 deletions(-) + +diff --git a/gdb/common/gdb_wait.h b/gdb/common/gdb_wait.h +index 9b250d2..412f813 100644 +--- a/gdb/common/gdb_wait.h ++++ b/gdb/common/gdb_wait.h +@@ -85,12 +85,12 @@ + # endif + #endif + ++#ifndef W_STOPCODE ++#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) ++#endif ++ + #ifndef WSETSTOP +-# ifdef W_STOPCODE + #define WSETSTOP(w,sig) ((w) = W_STOPCODE(sig)) +-# else +-#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8))) +-# endif + #endif + + /* For native GNU/Linux we may use waitpid and the __WCLONE option. +diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c +index 0c552b8..7ed67c7 100644 +--- a/gdb/gdbserver/linux-low.c ++++ b/gdb/gdbserver/linux-low.c +@@ -70,10 +70,6 @@ + #define O_LARGEFILE 0 + #endif + +-#ifndef W_STOPCODE +-#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) +-#endif +- + /* This is the kernel's hard limit. Not to be confused with + SIGRTMIN. */ + #ifndef __SIGRTMIN +-- +1.9.4 + diff --git a/package/gdb/7.8.2/0006-move-__SIGRTMIN.patch b/package/gdb/7.8.2/0006-move-__SIGRTMIN.patch new file mode 100644 index 0000000000..38ba1f028a --- /dev/null +++ b/package/gdb/7.8.2/0006-move-__SIGRTMIN.patch @@ -0,0 +1,58 @@ +From 682b25469e66ea45b214e95962671373983c118f Mon Sep 17 00:00:00 2001 +From: Doug Evans +Date: Mon, 26 Oct 2015 13:30:57 -0700 +Subject: [PATCH] Move __SIGRTMIN. + +gdb/ChangeLog: + + * nat/linux-nat.h (__SIGRTMIN): Move here from gdbserver/linux-low.c. + +gdb/gdbserver/ChangeLog: + + * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h. + +[Arnout: removed the parts that don't apply, including ChangeLog] +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gdb/ChangeLog | 4 ++++ + gdb/gdbserver/ChangeLog | 4 ++++ + gdb/gdbserver/linux-low.c | 6 ------ + gdb/nat/linux-nat.h | 5 +++++ + 4 files changed, 13 insertions(+), 6 deletions(-) + +diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c +index 7ed67c7..e778c4c 100644 +--- a/gdb/gdbserver/linux-low.c ++++ b/gdb/gdbserver/linux-low.c +@@ -70,12 +70,6 @@ + #define O_LARGEFILE 0 + #endif + +-/* This is the kernel's hard limit. Not to be confused with +- SIGRTMIN. */ +-#ifndef __SIGRTMIN +-#define __SIGRTMIN 32 +-#endif +- + /* Some targets did not define these ptrace constants from the start, + so gdbserver defines them locally here. In the future, these may + be removed after they are added to asm/ptrace.h. */ +diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h +index 0633fa9..70e6274 100644 +--- a/gdb/nat/linux-nat.h ++++ b/gdb/nat/linux-nat.h +@@ -25,6 +25,11 @@ + struct lwp_info; + struct arch_lwp_info; + ++/* This is the kernel's hard limit. Not to be confused with SIGRTMIN. */ ++#ifndef __SIGRTMIN ++#define __SIGRTMIN 32 ++#endif ++ + /* Unlike other extended result codes, WSTOPSIG (status) on + PTRACE_O_TRACESYSGOOD syscall events doesn't return SIGTRAP, but + instead SIGTRAP with bit 7 set. */ +-- +1.9.4 + diff --git a/package/gdb/7.9.1/0001-gdbserver-fix-uClibc-whithout-MMU.patch b/package/gdb/7.9.1/0001-gdbserver-fix-uClibc-whithout-MMU.patch new file mode 100644 index 0000000000..340db671f8 --- /dev/null +++ b/package/gdb/7.9.1/0001-gdbserver-fix-uClibc-whithout-MMU.patch @@ -0,0 +1,34 @@ +From 570805e96bb8c458795b04f4745700795997ef40 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 10 Apr 2015 22:58:07 +0200 +Subject: [PATCH] gdbserver: fix uClibc whithout MMU. + +Since commit d86d4aafd4fa22fa4cccb83253fb187b03f97f48, the pid +must be retrieved from current_thread. + +The change has not been made in the function linux_read_offsets(). + +Fixes: +http://autobuild.buildroot.net/results/9e4/9e4df085319e346803c26c65478accb27eb950ae/build-end.log + +Signed-off-by: Romain Naour +--- + gdb/gdbserver/linux-low.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c +index 4d19c87..7585b80 100644 +--- a/gdb/gdbserver/linux-low.c ++++ b/gdb/gdbserver/linux-low.c +@@ -4933,7 +4933,7 @@ static int + linux_read_offsets (CORE_ADDR *text_p, CORE_ADDR *data_p) + { + unsigned long text, text_end, data; +- int pid = lwpid_of (get_thread_lwp (current_thread)); ++ int pid = lwpid_of (current_thread); + + errno = 0; + +-- +1.9.3 + diff --git a/package/gdb/7.9.1/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch b/package/gdb/7.9.1/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch new file mode 100644 index 0000000000..93fe749ef0 --- /dev/null +++ b/package/gdb/7.9.1/0002-gdbserver-xtensa-drop-xtensa_usrregs_info.patch @@ -0,0 +1,47 @@ +From deb44829ecc1dd38275af0fcf91acd319e227a89 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 17 Apr 2015 03:07:41 +0300 +Subject: [PATCH 1/2] gdbserver/xtensa: drop xtensa_usrregs_info + +xtensa_usrregs_info refers to undefined variables xtensa_num_regs and +xtensa_regmap. Drop xtensa_usrregs_info and replace pointer to usrregs +in regs_info with NULL since all registers are read/set through regsets. + +2015-04-17 Max Filippov +gdb/gdbserver/ + * linux-xtensa-low.c (xtensa_usrregs_info): Remove. + (regs_info): Replace usrregs pointer with NULL. + +Signed-off-by: Max Filippov +--- +Backported from: deb44829ecc1dd38275af0fcf91acd319e227a89 +Changes to ChangeLog are dropped. + + gdb/gdbserver/linux-xtensa-low.c | 8 +------- + 2 files changed, 6 insertions(+), 7 deletions(-) + +diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c +index f7fafaf..e786da5 100644 +--- a/gdb/gdbserver/linux-xtensa-low.c ++++ b/gdb/gdbserver/linux-xtensa-low.c +@@ -186,16 +186,10 @@ static struct regsets_info xtensa_regsets_info = + NULL, /* disabled_regsets */ + }; + +-static struct usrregs_info xtensa_usrregs_info = +- { +- xtensa_num_regs, +- xtensa_regmap, +- }; +- + static struct regs_info regs_info = + { + NULL, /* regset_bitmap */ +- &xtensa_usrregs_info, ++ NULL, /* usrregs */ + &xtensa_regsets_info + }; + +-- +1.8.1.4 + diff --git a/package/gdb/7.9.1/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch b/package/gdb/7.9.1/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch new file mode 100644 index 0000000000..027f700b09 --- /dev/null +++ b/package/gdb/7.9.1/0003-gdbserver-xtensa-fix-typo-in-XCHAL_HAVE_LOOPS.patch @@ -0,0 +1,46 @@ +From a2d5a9d76f2366ed93095fc5a63eafa06b22f808 Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Fri, 17 Apr 2015 02:52:50 +0300 +Subject: [PATCH 2/2] gdbserver/xtensa: fix typo in XCHAL_HAVE_LOOPS + +This fixes lbeg/lend/lcount registers handling through gdbserver. + +2015-04-17 Max Filippov +gdb/gdbserver/ + * linux-xtensa-low.c (xtensa_fill_gregset) + (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of + XCHAL_HAVE_LOOP. + +Signed-off-by: Max Filippov +--- +Backported from: a2d5a9d76f2366ed93095fc5a63eafa06b22f808 +Changes to ChangeLog are dropped. + + gdb/gdbserver/linux-xtensa-low.c | 4 ++-- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c +index e786da5..4daccee 100644 +--- a/gdb/gdbserver/linux-xtensa-low.c ++++ b/gdb/gdbserver/linux-xtensa-low.c +@@ -59,7 +59,7 @@ xtensa_fill_gregset (struct regcache *regcache, void *buf) + + /* Loop registers, if hardware has it. */ + +-#if XCHAL_HAVE_LOOP ++#if XCHAL_HAVE_LOOPS + collect_register_by_name (regcache, "lbeg", (char*)&rset[R_LBEG]); + collect_register_by_name (regcache, "lend", (char*)&rset[R_LEND]); + collect_register_by_name (regcache, "lcount", (char*)&rset[R_LCOUNT]); +@@ -94,7 +94,7 @@ xtensa_store_gregset (struct regcache *regcache, const void *buf) + + /* Loop registers, if hardware has it. */ + +-#if XCHAL_HAVE_LOOP ++#if XCHAL_HAVE_LOOPS + supply_register_by_name (regcache, "lbeg", (char*)&rset[R_LBEG]); + supply_register_by_name (regcache, "lend", (char*)&rset[R_LEND]); + supply_register_by_name (regcache, "lcount", (char*)&rset[R_LCOUNT]); +-- +1.8.1.4 + diff --git a/package/gdb/7.9.1/0004-xtensa-implement-NPTL-helpers.patch b/package/gdb/7.9.1/0004-xtensa-implement-NPTL-helpers.patch new file mode 100644 index 0000000000..e7bc74ea53 --- /dev/null +++ b/package/gdb/7.9.1/0004-xtensa-implement-NPTL-helpers.patch @@ -0,0 +1,267 @@ +From d4eb69fc4b50f9a0babd70b28d0601b40f31bd0f Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Thu, 2 Jul 2015 15:10:58 +0300 +Subject: [PATCH] xtensa: implement NPTL helpers + +These changes allow debugging multithreaded NPTL xtensa applications. + +2015-08-20 Max Filippov +gdb/gdbserver/ + * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes. + * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New + #includes. + (ps_get_thread_area): New function. + +2015-08-20 Max Filippov +gdb/ + * arch/xtensa.h: New file. + * xtensa-linux-nat.c (gdb_proc_service.h): New #include. + (ps_get_thread_area): New function. + * xtensa-linux-tdep.c (xtensa_linux_init_abi): Add call to + set_gdbarch_fetch_tls_load_module_address to enable TLS support. + * xtensa-tdep.c (osabi.h): New #include. + (xtensa_gdbarch_init): Call gdbarch_init_osabi to register + xtensa-specific hooks. + * xtensa-tdep.h (struct xtensa_elf_gregset_t): Add threadptr + member and move the structure to arch/xtensa.h. + +Signed-off-by: Max Filippov +--- +Backported from: 40045d91812b25c88c8275b8c08d27c234b68ba8 +Changes to ChangeLog files are dropped. + + gdb/arch/xtensa.h | 46 ++++++++++++++++++++++++++++++++++++++++ + gdb/gdbserver/configure.srv | 1 + + gdb/gdbserver/linux-xtensa-low.c | 21 ++++++++++++++++++ + gdb/xtensa-linux-nat.c | 22 ++++++++++++++++++ + gdb/xtensa-linux-tdep.c | 4 ++++ + gdb/xtensa-tdep.c | 4 ++++ + gdb/xtensa-tdep.h | 24 ++------------------ + 7 files changed, 100 insertions(+), 22 deletions(-) + create mode 100644 gdb/arch/xtensa.h + +diff --git a/gdb/arch/xtensa.h b/gdb/arch/xtensa.h +new file mode 100644 +index 0000000..fe96584 +--- /dev/null ++++ b/gdb/arch/xtensa.h +@@ -0,0 +1,46 @@ ++/* Common Target-dependent code for the Xtensa port of GDB, the GNU debugger. ++ ++ Copyright (C) 2003-2015 Free Software Foundation, Inc. ++ ++ This file is part of GDB. ++ ++ This program is free software; you can redistribute it and/or modify ++ it under the terms of the GNU General Public License as published by ++ the Free Software Foundation; either version 3 of the License, or ++ (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ GNU General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program. If not, see . */ ++ ++#ifndef XTENSA_H ++#define XTENSA_H ++ ++/* Xtensa ELF core file register set representation ('.reg' section). ++ Copied from target-side ELF header . */ ++ ++typedef uint32_t xtensa_elf_greg_t; ++ ++typedef struct ++{ ++ xtensa_elf_greg_t pc; ++ xtensa_elf_greg_t ps; ++ xtensa_elf_greg_t lbeg; ++ xtensa_elf_greg_t lend; ++ xtensa_elf_greg_t lcount; ++ xtensa_elf_greg_t sar; ++ xtensa_elf_greg_t windowstart; ++ xtensa_elf_greg_t windowbase; ++ xtensa_elf_greg_t threadptr; ++ xtensa_elf_greg_t reserved[7+48]; ++ xtensa_elf_greg_t ar[64]; ++} xtensa_elf_gregset_t; ++ ++#define XTENSA_ELF_NGREG (sizeof (xtensa_elf_gregset_t) \ ++ / sizeof (xtensa_elf_greg_t)) ++ ++#endif +diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv +index 0b18d1d..320c26a 100644 +--- a/gdb/gdbserver/configure.srv ++++ b/gdb/gdbserver/configure.srv +@@ -352,6 +352,7 @@ case "${target}" in + xtensa*-*-linux*) srv_regobj=reg-xtensa.o + srv_tgtobj="$srv_linux_obj linux-xtensa-low.o" + srv_linux_regsets=yes ++ srv_linux_thread_db=yes + ;; + tilegx-*-linux*) srv_regobj=reg-tilegx.o + srv_regobj="${srv_regobj} reg-tilegx32.o" +diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c +index 4daccee..debe467 100644 +--- a/gdb/gdbserver/linux-xtensa-low.c ++++ b/gdb/gdbserver/linux-xtensa-low.c +@@ -26,6 +26,8 @@ extern const struct target_desc *tdesc_xtensa; + + #include + #include ++#include "arch/xtensa.h" ++#include "gdb_proc_service.h" + + #include "xtensa-xtregs.c" + +@@ -179,6 +181,25 @@ xtensa_breakpoint_at (CORE_ADDR where) + xtensa_breakpoint, xtensa_breakpoint_len) == 0; + } + ++/* Called by libthread_db. */ ++ ++ps_err_e ++ps_get_thread_area (const struct ps_prochandle *ph, ++ lwpid_t lwpid, int idx, void **base) ++{ ++ xtensa_elf_gregset_t regs; ++ ++ if (ptrace (PTRACE_GETREGS, lwpid, NULL, ®s) != 0) ++ return PS_ERR; ++ ++ /* IDX is the bias from the thread pointer to the beginning of the ++ thread descriptor. It has to be subtracted due to implementation ++ quirks in libthread_db. */ ++ *base = (void *) ((char *) regs.threadptr - idx); ++ ++ return PS_OK; ++} ++ + static struct regsets_info xtensa_regsets_info = + { + xtensa_regsets, /* regsets */ +diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c +index 77ad3e0..5538d5b 100644 +--- a/gdb/xtensa-linux-nat.c ++++ b/gdb/xtensa-linux-nat.c +@@ -37,6 +37,9 @@ + #include "gregset.h" + #include "xtensa-tdep.h" + ++/* Defines ps_err_e, struct ps_prochandle. */ ++#include "gdb_proc_service.h" ++ + /* Extended register set depends on hardware configs. + Keeping these definitions separately allows to introduce + hardware-specific overlays. */ +@@ -280,6 +283,25 @@ xtensa_linux_store_inferior_registers (struct target_ops *ops, + store_xtregs (regcache, regnum); + } + ++/* Called by libthread_db. */ ++ ++ps_err_e ++ps_get_thread_area (const struct ps_prochandle *ph, ++ lwpid_t lwpid, int idx, void **base) ++{ ++ xtensa_elf_gregset_t regs; ++ ++ if (ptrace (PTRACE_GETREGS, lwpid, NULL, ®s) != 0) ++ return PS_ERR; ++ ++ /* IDX is the bias from the thread pointer to the beginning of the ++ thread descriptor. It has to be subtracted due to implementation ++ quirks in libthread_db. */ ++ *base = (void *) ((char *) regs.threadptr - idx); ++ ++ return PS_OK; ++} ++ + void _initialize_xtensa_linux_nat (void); + + void +diff --git a/gdb/xtensa-linux-tdep.c b/gdb/xtensa-linux-tdep.c +index 61ea9b0..99e0d3e 100644 +--- a/gdb/xtensa-linux-tdep.c ++++ b/gdb/xtensa-linux-tdep.c +@@ -106,6 +106,10 @@ xtensa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch) + xtensa_linux_gdb_signal_from_target); + set_gdbarch_gdb_signal_to_target (gdbarch, + xtensa_linux_gdb_signal_to_target); ++ ++ /* Enable TLS support. */ ++ set_gdbarch_fetch_tls_load_module_address (gdbarch, ++ svr4_fetch_objfile_link_map); + } + + /* Provide a prototype to silence -Wmissing-prototypes. */ +diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c +index 55e7d98..4b693ed 100644 +--- a/gdb/xtensa-tdep.c ++++ b/gdb/xtensa-tdep.c +@@ -28,6 +28,7 @@ + #include "value.h" + #include "dis-asm.h" + #include "inferior.h" ++#include "osabi.h" + #include "floatformat.h" + #include "regcache.h" + #include "reggroups.h" +@@ -3273,6 +3274,9 @@ xtensa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) + set_solib_svr4_fetch_link_map_offsets + (gdbarch, svr4_ilp32_fetch_link_map_offsets); + ++ /* Hook in the ABI-specific overrides, if they have been registered. */ ++ gdbarch_init_osabi (info, gdbarch); ++ + return gdbarch; + } + +diff --git a/gdb/xtensa-tdep.h b/gdb/xtensa-tdep.h +index caa2988..5b28cab 100644 +--- a/gdb/xtensa-tdep.h ++++ b/gdb/xtensa-tdep.h +@@ -18,6 +18,8 @@ + along with this program. If not, see . */ + + ++#include "arch/xtensa.h" ++ + /* XTENSA_TDEP_VERSION can/should be changed along with XTENSA_CONFIG_VERSION + whenever the "tdep" structure changes in an incompatible way. */ + +@@ -81,28 +83,6 @@ typedef enum + } xtensa_target_flags_t; + + +-/* Xtensa ELF core file register set representation ('.reg' section). +- Copied from target-side ELF header . */ +- +-typedef uint32_t xtensa_elf_greg_t; +- +-typedef struct +-{ +- xtensa_elf_greg_t pc; +- xtensa_elf_greg_t ps; +- xtensa_elf_greg_t lbeg; +- xtensa_elf_greg_t lend; +- xtensa_elf_greg_t lcount; +- xtensa_elf_greg_t sar; +- xtensa_elf_greg_t windowstart; +- xtensa_elf_greg_t windowbase; +- xtensa_elf_greg_t reserved[8+48]; +- xtensa_elf_greg_t ar[64]; +-} xtensa_elf_gregset_t; +- +-#define XTENSA_ELF_NGREG (sizeof (xtensa_elf_gregset_t) \ +- / sizeof (xtensa_elf_greg_t)) +- + /* Mask. */ + + typedef struct +-- +1.8.1.4 + diff --git a/package/gdb/7.9.1/0005-Add-some-casts-for-building-on-musl.patch b/package/gdb/7.9.1/0005-Add-some-casts-for-building-on-musl.patch new file mode 100644 index 0000000000..2469eb79a4 --- /dev/null +++ b/package/gdb/7.9.1/0005-Add-some-casts-for-building-on-musl.patch @@ -0,0 +1,70 @@ +From d41401ace01c234f42697e190a2ac95991780626 Mon Sep 17 00:00:00 2001 +From: Doug Evans +Date: Mon, 26 Oct 2015 13:20:12 -0700 +Subject: [PATCH] Add some casts for building on musl. + +gdb/ChangeLog: + + * linux-thread-db.c (find_new_threads_callback): Cast ti.ti_tid to + unsigned long for debug_printf. + (thread_db_pid_to_str): Ditto. + +gdb/gdbserver/ChangeLog: + + * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long + for debug_printf. + (attach_thread, find_new_threads_callback): Ditto. + +[Arnout: removed the parts that don't apply, including ChangeLog] +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gdb/ChangeLog | 5 +++++ + gdb/gdbserver/ChangeLog | 6 ++++++ + gdb/gdbserver/thread-db.c | 9 +++++---- + gdb/linux-thread-db.c | 5 +++-- + 4 files changed, 19 insertions(+), 6 deletions(-) + +diff --git a/gdb/gdbserver/thread-db.c b/gdb/gdbserver/thread-db.c +index ffe722d..3df10ff 100644 +--- a/gdb/gdbserver/thread-db.c ++++ b/gdb/gdbserver/thread-db.c +@@ -278,7 +278,7 @@ find_one_thread (ptid_t ptid) + + if (debug_threads) + debug_printf ("Found thread %ld (LWP %d)\n", +- ti.ti_tid, ti.ti_lid); ++ (unsigned long) ti.ti_tid, ti.ti_lid); + + if (lwpid != ti.ti_lid) + { +@@ -319,12 +319,12 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p) + + if (debug_threads) + debug_printf ("Attaching to thread %ld (LWP %d)\n", +- ti_p->ti_tid, ti_p->ti_lid); ++ (unsigned long) ti_p->ti_tid, ti_p->ti_lid); + err = linux_attach_lwp (ptid); + if (err != 0) + { + warning ("Could not attach to thread %ld (LWP %d): %s\n", +- ti_p->ti_tid, ti_p->ti_lid, ++ (unsigned long) ti_p->ti_tid, ti_p->ti_lid, + linux_ptrace_attach_fail_reason_string (ptid, err)); + return 0; + } +diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c +index 66e9595..41db29a 100644 +--- a/gdb/linux-thread-db.c ++++ b/gdb/linux-thread-db.c +@@ -1816,7 +1817,7 @@ thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid) + + tid = thread_info->priv->tid; + snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)", +- tid, ptid_get_lwp (ptid)); ++ (unsigned long) tid, ptid_get_lwp (ptid)); + + return buf; + } +-- +1.9.4 + diff --git a/package/gdb/7.9.1/0006-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch b/package/gdb/7.9.1/0006-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch new file mode 100644 index 0000000000..60c357cd80 --- /dev/null +++ b/package/gdb/7.9.1/0006-musl-Move-W_STOPCODE-to-common-gdb_wait-h.patch @@ -0,0 +1,63 @@ +From 963843d4d07aef6caa296dacf191f8adc9518596 Mon Sep 17 00:00:00 2001 +From: Doug Evans +Date: Mon, 26 Oct 2015 13:24:01 -0700 +Subject: [PATCH] musl: Move W_STOPCODE to common/gdb_wait.h. + +gdb/ChangeLog: + + * common/gdb_wait.h (W_STOPCODE): Define, moved here from + gdbserver/linux-low.c. + (WSETSTOP): Simplify. + +gdb/gdbserver/ChangeLog: + + * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h. + +[Arnout: removed the parts that don't apply, including ChangeLog] +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gdb/ChangeLog | 6 ++++++ + gdb/common/gdb_wait.h | 8 ++++---- + gdb/gdbserver/ChangeLog | 4 ++++ + gdb/gdbserver/linux-low.c | 4 ---- + 4 files changed, 14 insertions(+), 8 deletions(-) + +diff --git a/gdb/common/gdb_wait.h b/gdb/common/gdb_wait.h +index 9b250d2..412f813 100644 +--- a/gdb/common/gdb_wait.h ++++ b/gdb/common/gdb_wait.h +@@ -85,12 +85,12 @@ + # endif + #endif + ++#ifndef W_STOPCODE ++#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) ++#endif ++ + #ifndef WSETSTOP +-# ifdef W_STOPCODE + #define WSETSTOP(w,sig) ((w) = W_STOPCODE(sig)) +-# else +-#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8))) +-# endif + #endif + + /* For native GNU/Linux we may use waitpid and the __WCLONE option. +diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c +index 0c552b8..7ed67c7 100644 +--- a/gdb/gdbserver/linux-low.c ++++ b/gdb/gdbserver/linux-low.c +@@ -70,10 +70,6 @@ + #define O_LARGEFILE 0 + #endif + +-#ifndef W_STOPCODE +-#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) +-#endif +- + /* This is the kernel's hard limit. Not to be confused with + SIGRTMIN. */ + #ifndef __SIGRTMIN +-- +1.9.4 + diff --git a/package/gdb/7.9.1/0007-move-__SIGRTMIN.patch b/package/gdb/7.9.1/0007-move-__SIGRTMIN.patch new file mode 100644 index 0000000000..38ba1f028a --- /dev/null +++ b/package/gdb/7.9.1/0007-move-__SIGRTMIN.patch @@ -0,0 +1,58 @@ +From 682b25469e66ea45b214e95962671373983c118f Mon Sep 17 00:00:00 2001 +From: Doug Evans +Date: Mon, 26 Oct 2015 13:30:57 -0700 +Subject: [PATCH] Move __SIGRTMIN. + +gdb/ChangeLog: + + * nat/linux-nat.h (__SIGRTMIN): Move here from gdbserver/linux-low.c. + +gdb/gdbserver/ChangeLog: + + * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h. + +[Arnout: removed the parts that don't apply, including ChangeLog] +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gdb/ChangeLog | 4 ++++ + gdb/gdbserver/ChangeLog | 4 ++++ + gdb/gdbserver/linux-low.c | 6 ------ + gdb/nat/linux-nat.h | 5 +++++ + 4 files changed, 13 insertions(+), 6 deletions(-) + +diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c +index 7ed67c7..e778c4c 100644 +--- a/gdb/gdbserver/linux-low.c ++++ b/gdb/gdbserver/linux-low.c +@@ -70,12 +70,6 @@ + #define O_LARGEFILE 0 + #endif + +-/* This is the kernel's hard limit. Not to be confused with +- SIGRTMIN. */ +-#ifndef __SIGRTMIN +-#define __SIGRTMIN 32 +-#endif +- + /* Some targets did not define these ptrace constants from the start, + so gdbserver defines them locally here. In the future, these may + be removed after they are added to asm/ptrace.h. */ +diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h +index 0633fa9..70e6274 100644 +--- a/gdb/nat/linux-nat.h ++++ b/gdb/nat/linux-nat.h +@@ -25,6 +25,11 @@ + struct lwp_info; + struct arch_lwp_info; + ++/* This is the kernel's hard limit. Not to be confused with SIGRTMIN. */ ++#ifndef __SIGRTMIN ++#define __SIGRTMIN 32 ++#endif ++ + /* Unlike other extended result codes, WSTOPSIG (status) on + PTRACE_O_TRACESYSGOOD syscall events doesn't return SIGTRAP, but + instead SIGTRAP with bit 7 set. */ +-- +1.9.4 + diff --git a/package/gdb/Config.in b/package/gdb/Config.in new file mode 100644 index 0000000000..feab01da9e --- /dev/null +++ b/package/gdb/Config.in @@ -0,0 +1,72 @@ +comment "gdb/gdbserver needs a toolchain w/ threads, threads debug" + depends on !BR2_nios2 && !BR2_bfin + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_THREADS_DEBUG + +config BR2_PACKAGE_GDB + bool "gdb" + # When the external toolchain gdbserver is copied to the + # target, we don't allow building a separate gdbserver. The + # one from the external toolchain should be used. + select BR2_PACKAGE_GDB_SERVER if \ + (!BR2_PACKAGE_GDB_DEBUGGER && !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY) + depends on BR2_TOOLCHAIN_HAS_THREADS && BR2_TOOLCHAIN_HAS_THREADS_DEBUG + depends on !BR2_nios2 && !BR2_bfin + help + GDB, the GNU Project debugger, allows you to see what is + going on `inside' another program while it executes -- or + what another program was doing at the moment it crashed. + + This option allows to build gdbserver and/or the gdb + debugger for the target. + + For embedded development, the most common solution is to + build only 'gdbserver' for the target, and use a cross-gdb + on the host. See BR2_PACKAGE_HOST_GDB in the Toolchain menu + to enable one. Notice that external toolchains often provide + their own pre-built cross-gdb and gdbserver binaries. + + http://www.gnu.org/software/gdb/ + +if BR2_PACKAGE_GDB + +config BR2_PACKAGE_GDB_SERVER + bool "gdbserver" + depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY + help + Build the gdbserver stub to run on the target. + A full gdb is needed to debug the progam. + +config BR2_PACKAGE_GDB_DEBUGGER + bool "full debugger" + select BR2_PACKAGE_NCURSES + depends on BR2_USE_WCHAR + depends on !BR2_sh && !BR2_sh64 && !BR2_microblaze + +comment "full gdb on target needs a toolchain w/ wchar" + depends on !BR2_sh && !BR2_sh64 && !BR2_microblaze + depends on !BR2_USE_WCHAR + +if BR2_PACKAGE_GDB_DEBUGGER + +config BR2_PACKAGE_GDB_TUI + bool "TUI support" + help + This option enables terminal user interface (TUI) for gdb + + "The GDB Text User Interface (TUI) is a terminal interface + which uses the curses library to show the source file, the + assembly output, the program registers and GDB commands in + separate text windows." + + https://sourceware.org/gdb/current/onlinedocs/gdb/TUI.html + +config BR2_PACKAGE_GDB_PYTHON + bool "Python support" + # Only Python 2.x is supported by gdb for now + depends on BR2_PACKAGE_PYTHON + help + This option enables Python support in the target gdb. + +endif + +endif diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host new file mode 100644 index 0000000000..b213901dfb --- /dev/null +++ b/package/gdb/Config.in.host @@ -0,0 +1,55 @@ +config BR2_PACKAGE_HOST_GDB + bool "Build cross gdb for the host" + # When the external toolchain gdbserver is used, we shouldn't + # allow to build a cross-gdb, as the one of the external + # toolchain should be used. + depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY + depends on !BR2_nios2 + help + Build a cross gdb that runs on the host machine and debugs + programs running on the target. It requires 'gdbserver' + installed on the target, see BR2_PACKAGE_GDB_SERVER to + enable it. + +if BR2_PACKAGE_HOST_GDB + +config BR2_PACKAGE_HOST_GDB_TUI + bool "TUI support" + help + This option enables terminal user interface (TUI) for gdb + +config BR2_PACKAGE_HOST_GDB_PYTHON + bool "Python support" + help + This option enables the Python support in the cross gdb. + +choice + prompt "GDB debugger Version" + depends on !BR2_arc + depends on !BR2_microblaze + default BR2_GDB_VERSION_7_9 + help + Select the version of gdb you wish to use. + + config BR2_GDB_VERSION_7_8 + bool "gdb 7.8.x" + + config BR2_GDB_VERSION_7_9 + bool "gdb 7.9.x" + + config BR2_GDB_VERSION_7_10 + bool "gdb 7.10.x" + +endchoice + +endif + +# If cross-gdb is not enabled, the latest working version is chosen. +config BR2_GDB_VERSION + string + depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB + default "arc-2015.12-gdb" if BR2_arc + default "6be65fb56ea6694a9260733a536a023a1e2d4d57" if BR2_microblaze + default "7.8.2" if BR2_GDB_VERSION_7_8 + default "7.9.1" if BR2_GDB_VERSION_7_9 || !BR2_PACKAGE_HOST_GDB + default "7.10.1" if BR2_GDB_VERSION_7_10 diff --git a/package/gdb/gdb-python-config b/package/gdb/gdb-python-config new file mode 100755 index 0000000000..0f002281d7 --- /dev/null +++ b/package/gdb/gdb-python-config @@ -0,0 +1,36 @@ +#!/bin/sh + +# This shell script is used to fake Python. Gdb wants to be passed a +# Python interpreter, to run its own python-config.py program, which +# uses sysconfig. However, when cross-compiling, this doesn't work +# well since we would have to use the host Python, whose sysconfig +# module would return host values. +# +# As recommended at +# https://sourceware.org/gdb/wiki/CrossCompilingWithPythonSupport, +# this wrapper shell script can be used as a replacement. It ignores +# the python-config.py script passed as first arguments, and +# "emulates" its behavior. + +if [ $# -ne 2 ] ; then + echo "Bad # args." >&2 + exit 1 +fi + +# The first argument is the path to python-config.py, ignore it. + +case "$2" in + --includes) + echo "-I${STAGING_DIR}/usr/include/python2.7" + ;; + --ldflags) + echo "-lpthread -ldl -lutil -lm -lpython2.7" + ;; + --exec-prefix) + echo "/usr" + ;; + *) + echo "Bad arg $2." >&2 + exit 1 + ;; +esac diff --git a/package/gdb/gdb.hash b/package/gdb/gdb.hash new file mode 100644 index 0000000000..caf1ef1685 --- /dev/null +++ b/package/gdb/gdb.hash @@ -0,0 +1,7 @@ +# From ftp://gcc.gnu.org/pub/gdb/releases/sha512.sum +sha512 face5bf1b4ce144fc8604fc84620beed956177a11fd632b4e41906fc7f632910b2b43a50e6cfdfd6cbd876ee527c813bddab8df29dc560a6c36694cdb8edc4e4 gdb-7.8.2.tar.xz +sha512 eebdf88b24e52e792b8a4b89ea85790de72b462a7810b44975fdf4232c068f353b15506071f450102a9d4bcecdde8e93dc3748a10699b7f73f3e04fb2d9d8414 gdb-7.9.1.tar.xz +sha512 17a5138277a31685a5c2a841cb47ed9bc4626ea617b8ca77750513b300299f4fbbffe504958b5372de610dcb952c679cf8fa9c1bdadd380294fbf59b6e366010 gdb-7.10.1.tar.xz +# No hash for the ARC & microblaze variants, comes from the github-helper: +none xxx gdb-arc-2015.12-gdb.tar.gz +none xxx gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk new file mode 100644 index 0000000000..0a7af1ef61 --- /dev/null +++ b/package/gdb/gdb.mk @@ -0,0 +1,193 @@ +################################################################################ +# +# gdb +# +################################################################################ + +GDB_VERSION = $(call qstrip,$(BR2_GDB_VERSION)) +GDB_SITE = $(BR2_GNU_MIRROR)/gdb +GDB_SOURCE = gdb-$(GDB_VERSION).tar.xz + +ifeq ($(BR2_arc),y) +GDB_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(GDB_VERSION)) +GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz +endif + +ifeq ($(BR2_microblaze),y) +GDB_SITE = $(call github,Xilinx,gdb,$(GDB_VERSION)) +GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz +endif + +GDB_LICENSE = GPLv2+, LGPLv2+, GPLv3+, LGPLv3+ +GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB + +# We only want gdbserver and not the entire debugger. +ifeq ($(BR2_PACKAGE_GDB_DEBUGGER),) +GDB_SUBDIR = gdb/gdbserver +HOST_GDB_SUBDIR = . +else +GDB_DEPENDENCIES = ncurses \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) +endif + +# For the host variant, we really want to build with XML support, +# which is needed to read XML descriptions of target architectures. We +# also need ncurses. +HOST_GDB_DEPENDENCIES = host-expat host-ncurses + +# Apply the Xtensa specific patches +XTENSA_CORE_NAME = $(call qstrip, $(BR2_XTENSA_CORE_NAME)) +ifneq ($(XTENSA_CORE_NAME),) +define GDB_XTENSA_PRE_PATCH + tar xf $(BR2_XTENSA_OVERLAY_DIR)/xtensa_$(XTENSA_CORE_NAME).tar \ + -C $(@D) --strip-components=1 gdb +endef +GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH +HOST_GDB_PRE_PATCH_HOOKS += GDB_XTENSA_PRE_PATCH +endif + +# Prevent gdb to build the documentation +define GDB_DISABLE_DOC + $(SED) '/^SUBDIRS =/ s/doc//' $(@D)/gdb/Makefile.in + if test -e $(@D)/bfd/doc/Makefile.in ; then \ + $(SED) 's/^INFO_DEPS =.*$$/INFO_DEPS =/' $(@D)/bfd/doc/Makefile.in ; \ + fi + if test -e $(@D)/gprof/Makefile.in ; then \ + $(SED) 's/^INFO_DEPS =.*$$/INFO_DEPS =/' $(@D)/gprof/Makefile.in ; \ + fi +endef +GDB_PRE_CONFIGURE_HOOKS += GDB_DISABLE_DOC +HOST_GDB_PRE_CONFIGURE_HOOKS += GDB_DISABLE_DOC + +# When gdb sources are fetched from the binutils-gdb repository, they +# also contain the binutils sources, but binutils shouldn't be built, +# so we disable it. +GDB_DISABLE_BINUTILS_CONF_OPTS = \ + --disable-binutils \ + --disable-ld \ + --disable-gas + +GDB_CONF_ENV = \ + ac_cv_type_uintptr_t=yes \ + gt_cv_func_gettext_libintl=yes \ + ac_cv_func_dcgettext=yes \ + gdb_cv_func_sigsetjmp=yes \ + bash_cv_func_strcoll_broken=no \ + bash_cv_must_reinstall_sighandlers=no \ + bash_cv_func_sigsetjmp=present \ + bash_cv_have_mbstate_t=yes \ + gdb_cv_func_sigsetjmp=yes + +# The shared only build is not supported by gdb, so enable static build for +# build-in libraries with --enable-static. +GDB_CONF_OPTS = \ + --without-uiout \ + --disable-gdbtk \ + --without-x \ + --disable-sim \ + $(GDB_DISABLE_BINUTILS_CONF_OPTS) \ + $(if $(BR2_PACKAGE_GDB_SERVER),--enable-gdbserver) \ + --with-curses \ + --without-included-gettext \ + --disable-werror \ + --enable-static + +ifeq ($(BR2_PACKAGE_GDB_TUI),y) +GDB_CONF_OPTS += --enable-tui +else +GDB_CONF_OPTS += --disable-tui +endif + +ifeq ($(BR2_PACKAGE_GDB_PYTHON),y) +GDB_CONF_OPTS += --with-python=$(TOPDIR)/package/gdb/gdb-python-config +GDB_DEPENDENCIES += python +else +GDB_CONF_OPTS += --without-python +endif + +ifeq ($(BR2_PACKAGE_EXPAT),y) +GDB_CONF_OPTS += --with-expat +GDB_CONF_OPTS += --with-libexpat-prefix=$(STAGING_DIR)/usr +GDB_DEPENDENCIES += expat +else +GDB_CONF_OPTS += --without-expat +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +GDB_CONF_OPTS += --with-lzma +GDB_CONF_OPTS += --with-liblzma-prefix=$(STAGING_DIR)/usr +GDB_DEPENDENCIES += xz +else +GDB_CONF_OPTS += --without-lzma +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +GDB_CONF_OPTS += --with-zlib +GDB_DEPENDENCIES += zlib +else +GDB_CONF_OPTS += --without-zlib +endif + +# This removes some unneeded Python scripts and XML target description +# files that are not useful for a normal usage of the debugger. +define GDB_REMOVE_UNNEEDED_FILES + $(RM) -rf $(TARGET_DIR)/usr/share/gdb +endef + +GDB_POST_INSTALL_TARGET_HOOKS += GDB_REMOVE_UNNEEDED_FILES + +# This installs the gdbserver somewhere into the $(HOST_DIR) so that +# it becomes an integral part of the SDK, if the toolchain generated +# by Buildroot is later used as an external toolchain. We install it +# in debug-root/usr/bin/gdbserver so that it matches what Crosstool-NG +# does. +define GDB_SDK_INSTALL_GDBSERVER + $(INSTALL) -D -m 0755 $(TARGET_DIR)/usr/bin/gdbserver \ + $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/debug-root/usr/bin/gdbserver +endef + +ifeq ($(BR2_PACKAGE_GDB_SERVER),y) +GDB_POST_INSTALL_TARGET_HOOKS += GDB_SDK_INSTALL_GDBSERVER +endif + +# A few notes: +# * --target, because we're doing a cross build rather than a real +# host build. +# * --enable-static because gdb really wants to use libbfd.a +HOST_GDB_CONF_OPTS = \ + --target=$(GNU_TARGET_NAME) \ + --enable-static \ + --without-uiout \ + --disable-gdbtk \ + --without-x \ + --enable-threads \ + --disable-werror \ + --without-included-gettext \ + $(GDB_DISABLE_BINUTILS_CONF_OPTS) \ + --disable-sim + +ifeq ($(BR2_PACKAGE_HOST_GDB_TUI),y) +HOST_GDB_CONF_OPTS += --enable-tui +else +HOST_GDB_CONF_OPTS += --disable-tui +endif + +ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON),y) +HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/usr/bin/python2 +HOST_GDB_DEPENDENCIES += host-python +else +HOST_GDB_CONF_OPTS += --without-python +endif + +# legacy $arch-linux-gdb symlink +define HOST_GDB_ADD_SYMLINK + cd $(HOST_DIR)/usr/bin && \ + ln -snf $(GNU_TARGET_NAME)-gdb $(ARCH)-linux-gdb +endef + +HOST_GDB_POST_INSTALL_HOOKS += HOST_GDB_ADD_SYMLINK + +HOST_GDB_POST_INSTALL_HOOKS += gen_gdbinit_file + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gdbm/Config.in b/package/gdbm/Config.in new file mode 100644 index 0000000000..8ad0fc6ce0 --- /dev/null +++ b/package/gdbm/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_GDBM + bool "gdbm" + help + GNU dbm is a set of database routines that use extensible hashing. + It works similar to the standard UNIX dbm routines. + + http://www.gnu.org/software/gdbm/gdbm.html diff --git a/package/gdbm/gdbm.hash b/package/gdbm/gdbm.hash new file mode 100644 index 0000000000..e7d3592314 --- /dev/null +++ b/package/gdbm/gdbm.hash @@ -0,0 +1,2 @@ +# From http://lists.gnu.org/archive/html/info-gnu/2013-12/msg00012.html +sha1 ce433d0f192c21d41089458ca5c8294efe9806b4 gdbm-1.11.tar.gz diff --git a/package/gdbm/gdbm.mk b/package/gdbm/gdbm.mk new file mode 100644 index 0000000000..f7a437007c --- /dev/null +++ b/package/gdbm/gdbm.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# gdbm +# +################################################################################ + +GDBM_VERSION = 1.11 +GDBM_SITE = $(BR2_GNU_MIRROR)/gdbm +GDBM_LICENSE = GPLv3+ +GDBM_LICENSE_FILES = COPYING +GDBM_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_GETTEXT),y) +GDBM_DEPENDENCIES += gettext +endif + +$(eval $(autotools-package)) diff --git a/package/gdk-pixbuf/Config.in b/package/gdk-pixbuf/Config.in new file mode 100644 index 0000000000..44942ac4f6 --- /dev/null +++ b/package/gdk-pixbuf/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_GDK_PIXBUF + bool "gdk-pixbuf" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Gdk-Pixbuf is an image loader and scaler. It uses GObject + and the GLib, to integrate well with GNOME applications. + + http://www.gtk.org/ + +comment "gdk-pixbuf needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gdk-pixbuf/gdk-pixbuf.hash b/package/gdk-pixbuf/gdk-pixbuf.hash new file mode 100644 index 0000000000..e73170cfe6 --- /dev/null +++ b/package/gdk-pixbuf/gdk-pixbuf.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/2.34/gdk-pixbuf-2.34.0.sha256sum +sha256 d55e5b383ee219bd0e23bf6ed4427d56a7db5379729a6e3e0a0e0eba9a8d8879 gdk-pixbuf-2.34.0.tar.xz diff --git a/package/gdk-pixbuf/gdk-pixbuf.mk b/package/gdk-pixbuf/gdk-pixbuf.mk new file mode 100644 index 0000000000..36eed60a35 --- /dev/null +++ b/package/gdk-pixbuf/gdk-pixbuf.mk @@ -0,0 +1,77 @@ +################################################################################ +# +# gdk-pixbuf +# +################################################################################ + +GDK_PIXBUF_VERSION_MAJOR = 2.34 +GDK_PIXBUF_VERSION = $(GDK_PIXBUF_VERSION_MAJOR).0 +GDK_PIXBUF_SOURCE = gdk-pixbuf-$(GDK_PIXBUF_VERSION).tar.xz +GDK_PIXBUF_SITE = http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/$(GDK_PIXBUF_VERSION_MAJOR) +GDK_PIXBUF_LICENSE = LGPLv2+ +GDK_PIXBUF_LICENSE_FILES = COPYING +GDK_PIXBUF_INSTALL_STAGING = YES +GDK_PIXBUF_DEPENDENCIES = \ + host-gdk-pixbuf host-libglib2 host-pkgconf \ + libglib2 $(if $(BR2_ENABLE_LOCALE),,libiconv) +HOST_GDK_PIXBUF_DEPENDENCIES = host-libpng host-pkgconf host-libglib2 + +GDK_PIXBUF_CONF_ENV = \ + ac_cv_path_GLIB_GENMARSHAL=$(LIBGLIB2_HOST_BINARY) \ + gio_can_sniff=no + +GDK_PIXBUF_CONF_OPTS = --disable-glibtest + +ifneq ($(BR2_PACKAGE_LIBPNG),y) +GDK_PIXBUF_CONF_OPTS += --without-libpng +else +GDK_PIXBUF_DEPENDENCIES += libpng +endif + +ifneq ($(BR2_PACKAGE_JPEG),y) +HOST_GDK_PIXBUF_CONF_OPTS += --without-libjpeg +GDK_PIXBUF_CONF_OPTS += --without-libjpeg +else +GDK_PIXBUF_DEPENDENCIES += jpeg +HOST_GDK_PIXBUF_DEPENDENCIES += host-libjpeg +endif + +ifneq ($(BR2_PACKAGE_TIFF),y) +GDK_PIXBUF_CONF_OPTS += --without-libtiff +HOST_GDK_PIXBUF_CONF_OPTS += --without-libtiff +else +GDK_PIXBUF_DEPENDENCIES += tiff +GDK_PIXBUF_CONF_ENV += \ + LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtiff-4`" +HOST_GDK_PIXBUF_DEPENDENCIES += host-tiff +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +GDK_PIXBUF_CONF_OPTS += --with-x11 +GDK_PIXBUF_DEPENDENCIES += xlib_libX11 +endif + +# gdk-pixbuf requires the loaders.cache file populated to work properly +# Rather than doing so at runtime, since the fs can be read-only, do so +# here after building and installing to target. +# And since the cache file will contain absolute host directory names we +# need to sanitize (strip) them. +ifeq ($(BR2_STATIC_LIBS),) +define GDK_PIXBUF_UPDATE_CACHE + GDK_PIXBUF_MODULEDIR=$(HOST_DIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders \ + $(HOST_DIR)/usr/bin/gdk-pixbuf-query-loaders \ + > $(TARGET_DIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache + $(SED) "s,$(HOST_DIR),,g" \ + $(TARGET_DIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache +endef +GDK_PIXBUF_POST_INSTALL_TARGET_HOOKS += GDK_PIXBUF_UPDATE_CACHE +endif + +# Tests don't build correctly with uClibc +define GDK_PIXBUF_DISABLE_TESTS + $(SED) 's/ tests//' $(@D)/Makefile.in +endef +GDK_PIXBUF_POST_PATCH_HOOKS += GDK_PIXBUF_DISABLE_TESTS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/genext2fs/0001-update-genext2fs.c-to-rev-1.118.patch b/package/genext2fs/0001-update-genext2fs.c-to-rev-1.118.patch new file mode 100644 index 0000000000..755ee9dee2 --- /dev/null +++ b/package/genext2fs/0001-update-genext2fs.c-to-rev-1.118.patch @@ -0,0 +1,2971 @@ +[PATCH] update genext2fs.c to CVS rev 1.118 + +See http://genext2fs.cvs.sourceforge.net/viewvc/genext2fs/genext2fs/genext2fs.c?view=log +for details. + +Numerous bugfixes, large file and filesystem support, rev 1 filesystems, +volume id support, block size, .. + +Signed-off-by: Peter Korsgaard +--- + cache.h | 128 ++++ + genext2fs.c | 1870 ++++++++++++++++++++++++++++++++++++++++++------------------ + list.h | 78 ++ + 3 files changed, 1527 insertions(+), 549 deletions(-) + +Index: genext2fs-1.4.1/genext2fs.c +=================================================================== +--- genext2fs-1.4.1.orig/genext2fs.c ++++ genext2fs-1.4.1/genext2fs.c +@@ -53,6 +53,12 @@ + // along with -q, -P, -U + + ++/* ++ * Allow fseeko/off_t to be 64-bit offsets to allow filesystems and ++ * individual files >2GB. ++ */ ++#define _FILE_OFFSET_BITS 64 ++ + #include + #include + +@@ -107,10 +113,8 @@ + + #if HAVE_DIRENT_H + # include +-# define NAMLEN(dirent) strlen((dirent)->d_name) + #else + # define dirent direct +-# define NAMLEN(dirent) (dirent)->d_namlen + # if HAVE_SYS_NDIR_H + # include + # endif +@@ -144,6 +148,8 @@ + # include + #endif + ++#include "cache.h" ++ + struct stats { + unsigned long nblocks; + unsigned long ninodes; +@@ -151,13 +157,42 @@ + + // block size + +-#define BLOCKSIZE 1024 ++static int blocksize = 1024; ++ ++#define SUPERBLOCK_OFFSET 1024 ++#define SUPERBLOCK_SIZE 1024 ++ ++#define BLOCKSIZE blocksize + #define BLOCKS_PER_GROUP 8192 + #define INODES_PER_GROUP 8192 + /* Percentage of blocks that are reserved.*/ + #define RESERVED_BLOCKS 5/100 + #define MAX_RESERVED_BLOCKS 25/100 + ++/* The default value for s_creator_os. */ ++#if defined(__linux__) && defined(EXT2_OS_LINUX) ++#define CREATOR_OS EXT2_OS_LINUX ++#define CREATOR_OS_NAME "linux" ++#else ++#if defined(__GNU__) && defined(EXT2_OS_HURD) ++#define CREATOR_OS EXT2_OS_HURD ++#define CREATOR_OS_NAME "hurd" ++#else ++#if defined(__FreeBSD__) && defined(EXT2_OS_FREEBSD) ++#define CREATOR_OS EXT2_OS_FREEBSD ++#define CREATOR_OS_NAME "freebsd" ++#else ++#if defined(LITES) && defined(EXT2_OS_LITES) ++#define CREATOR_OS EXT2_OS_LITES ++#define CREATOR_OS_NAME "lites" ++#else ++#define CREATOR_OS EXT2_OS_LINUX /* by default */ ++#define CREATOR_OS_NAME "linux" ++#endif /* defined(LITES) && defined(EXT2_OS_LITES) */ ++#endif /* defined(__FreeBSD__) && defined(EXT2_OS_FREEBSD) */ ++#endif /* defined(__GNU__) && defined(EXT2_OS_HURD) */ ++#endif /* defined(__linux__) && defined(EXT2_OS_LINUX) */ ++ + + // inode block size (why is it != BLOCKSIZE ?!?) + /* The field i_blocks in the ext2 inode stores the number of data blocks +@@ -190,6 +225,14 @@ + #define EXT2_TIND_BLOCK 14 // triple indirect block + #define EXT2_INIT_BLOCK 0xFFFFFFFF // just initialized (not really a block address) + ++// codes for operating systems ++ ++#define EXT2_OS_LINUX 0 ++#define EXT2_OS_HURD 1 ++#define EXT2_OS_MASIX 2 ++#define EXT2_OS_FREEBSD 3 ++#define EXT2_OS_LITES 4 ++ + // end of a block walk + + #define WALK_END 0xFFFFFFFE +@@ -227,44 +270,46 @@ + #define FM_IWOTH 0000002 // write + #define FM_IXOTH 0000001 // execute + +-// options +- +-#define OP_HOLES 0x01 // make files with holes +- + /* Defines for accessing group details */ + + // Number of groups in the filesystem + #define GRP_NBGROUPS(fs) \ +- (((fs)->sb.s_blocks_count - fs->sb.s_first_data_block + \ +- (fs)->sb.s_blocks_per_group - 1) / (fs)->sb.s_blocks_per_group) ++ (((fs)->sb->s_blocks_count - fs->sb->s_first_data_block + \ ++ (fs)->sb->s_blocks_per_group - 1) / (fs)->sb->s_blocks_per_group) + + // Get group block bitmap (bbm) given the group number +-#define GRP_GET_GROUP_BBM(fs,grp) ( get_blk((fs),(fs)->gd[(grp)].bg_block_bitmap) ) ++#define GRP_GET_GROUP_BBM(fs,grp,bi) (get_blk((fs),(grp)->bg_block_bitmap,(bi))) ++#define GRP_PUT_GROUP_BBM(bi) ( put_blk((bi)) ) + + // Get group inode bitmap (ibm) given the group number +-#define GRP_GET_GROUP_IBM(fs,grp) ( get_blk((fs),(fs)->gd[(grp)].bg_inode_bitmap) ) +- ++#define GRP_GET_GROUP_IBM(fs,grp,bi) (get_blk((fs), (grp)->bg_inode_bitmap,(bi))) ++#define GRP_PUT_GROUP_IBM(bi) ( put_blk((bi)) ) ++ + // Given an inode number find the group it belongs to +-#define GRP_GROUP_OF_INODE(fs,nod) ( ((nod)-1) / (fs)->sb.s_inodes_per_group) ++#define GRP_GROUP_OF_INODE(fs,nod) ( ((nod)-1) / (fs)->sb->s_inodes_per_group) + + //Given an inode number get the inode bitmap that covers it +-#define GRP_GET_INODE_BITMAP(fs,nod) \ +- ( GRP_GET_GROUP_IBM((fs),GRP_GROUP_OF_INODE((fs),(nod))) ) ++#define GRP_GET_INODE_BITMAP(fs,nod,bi,gi) \ ++ ( GRP_GET_GROUP_IBM((fs),get_gd(fs,GRP_GROUP_OF_INODE((fs),(nod)),gi),bi) ) ++#define GRP_PUT_INODE_BITMAP(bi,gi) \ ++ ( GRP_PUT_GROUP_IBM((bi)),put_gd((gi)) ) + + //Given an inode number find its offset within the inode bitmap that covers it + #define GRP_IBM_OFFSET(fs,nod) \ +- ( (nod) - GRP_GROUP_OF_INODE((fs),(nod))*(fs)->sb.s_inodes_per_group ) ++ ( (nod) - GRP_GROUP_OF_INODE((fs),(nod))*(fs)->sb->s_inodes_per_group ) + + // Given a block number find the group it belongs to +-#define GRP_GROUP_OF_BLOCK(fs,blk) ( ((blk)-1) / (fs)->sb.s_blocks_per_group) ++#define GRP_GROUP_OF_BLOCK(fs,blk) ( ((blk)-1) / (fs)->sb->s_blocks_per_group) + +-//Given a block number get the block bitmap that covers it +-#define GRP_GET_BLOCK_BITMAP(fs,blk) \ +- ( GRP_GET_GROUP_BBM((fs),GRP_GROUP_OF_BLOCK((fs),(blk))) ) ++//Given a block number get/put the block bitmap that covers it ++#define GRP_GET_BLOCK_BITMAP(fs,blk,bi,gi) \ ++ ( GRP_GET_GROUP_BBM((fs),get_gd(fs,GRP_GROUP_OF_BLOCK((fs),(blk)),(gi)),(bi)) ) ++#define GRP_PUT_BLOCK_BITMAP(bi,gi) \ ++ ( GRP_PUT_GROUP_BBM((bi)),put_gd((gi)) ) + + //Given a block number find its offset within the block bitmap that covers it + #define GRP_BBM_OFFSET(fs,blk) \ +- ( (blk) - GRP_GROUP_OF_BLOCK((fs),(blk))*(fs)->sb.s_blocks_per_group ) ++ ( (blk) - GRP_GROUP_OF_BLOCK((fs),(blk))*(fs)->sb->s_blocks_per_group ) + + + // used types +@@ -286,7 +331,9 @@ + // older solaris. Note that this is still not very portable, in that + // the return value cannot be trusted. + +-#if SCANF_CAN_MALLOC ++#if 0 // SCANF_CAN_MALLOC ++// C99 define "a" for floating point, so you can have runtime surprise ++// according the library versions + # define SCANF_PREFIX "a" + # define SCANF_STRING(s) (&s) + #else +@@ -430,6 +477,17 @@ + ((val<<8)&0xFF0000) | (val<<24)); + } + ++static inline int ++is_blk_empty(uint8 *b) ++{ ++ uint32 i; ++ uint32 *v = (uint32 *) b; ++ ++ for(i = 0; i < BLOCKSIZE / 4; i++) ++ if (*v++) ++ return 0; ++ return 1; ++} + + // on-disk structures + // this trick makes me declare things only once +@@ -460,7 +518,22 @@ + udecl32(s_creator_os) /* Indicator of which OS created the filesystem */ \ + udecl32(s_rev_level) /* The revision level of the filesystem */ \ + udecl16(s_def_resuid) /* The default uid for reserved blocks */ \ +- udecl16(s_def_resgid) /* The default gid for reserved blocks */ ++ udecl16(s_def_resgid) /* The default gid for reserved blocks */ \ ++ /* rev 1 version fields start here */ \ ++ udecl32(s_first_ino) /* First non-reserved inode */ \ ++ udecl16(s_inode_size) /* size of inode structure */ \ ++ udecl16(s_block_group_nr) /* block group # of this superblock */ \ ++ udecl32(s_feature_compat) /* compatible feature set */ \ ++ udecl32(s_feature_incompat) /* incompatible feature set */ \ ++ udecl32(s_feature_ro_compat) /* readonly-compatible feature set */ \ ++ utdecl8(s_uuid,16) /* 128-bit uuid for volume */ \ ++ utdecl8(s_volume_name,16) /* volume name */ \ ++ utdecl8(s_last_mounted,64) /* directory where last mounted */ \ ++ udecl32(s_algorithm_usage_bitmap) /* For compression */ ++ ++#define EXT2_GOOD_OLD_FIRST_INO 11 ++#define EXT2_GOOD_OLD_INODE_SIZE 128 ++#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE 0x0002 + + #define groupdescriptor_decl \ + udecl32(bg_block_bitmap) /* Block number of the block bitmap */ \ +@@ -500,6 +573,7 @@ + + #define decl8(x) int8 x; + #define udecl8(x) uint8 x; ++#define utdecl8(x,n) uint8 x[n]; + #define decl16(x) int16 x; + #define udecl16(x) uint16 x; + #define decl32(x) int32 x; +@@ -509,7 +583,7 @@ + typedef struct + { + superblock_decl +- uint32 s_reserved[235]; // Reserved ++ uint32 s_reserved[205]; // Reserved + } superblock; + + typedef struct +@@ -527,10 +601,9 @@ + typedef struct + { + directory_decl +- char d_name[0]; + } directory; + +-typedef uint8 block[BLOCKSIZE]; ++typedef uint8 *block; + + /* blockwalker fields: + The blockwalker is used to access all the blocks of a file (including +@@ -567,23 +640,41 @@ + uint32 bptind; + } blockwalker; + ++#define HDLINK_CNT 16 ++struct hdlink_s ++{ ++ uint32 src_inode; ++ uint32 dst_nod; ++}; ++ ++struct hdlinks_s ++{ ++ int32 count; ++ struct hdlink_s *hdl; ++}; + + /* Filesystem structure that support groups */ +-#if BLOCKSIZE == 1024 + typedef struct + { +- block zero; // The famous block 0 +- superblock sb; // The superblock +- groupdescriptor gd[0]; // The group descriptors ++ FILE *f; ++ superblock *sb; ++ int swapit; ++ int32 hdlink_cnt; ++ struct hdlinks_s hdlinks; ++ ++ int holes; ++ ++ listcache blks; ++ listcache gds; ++ listcache inodes; ++ listcache blkmaps; + } filesystem; +-#else +-#error UNHANDLED BLOCKSIZE +-#endif + + // now the endianness swap + + #undef decl8 + #undef udecl8 ++#undef utdecl8 + #undef decl16 + #undef udecl16 + #undef decl32 +@@ -592,28 +683,13 @@ + + #define decl8(x) + #define udecl8(x) ++#define utdecl8(x,n) + #define decl16(x) this->x = swab16(this->x); + #define udecl16(x) this->x = swab16(this->x); + #define decl32(x) this->x = swab32(this->x); + #define udecl32(x) this->x = swab32(this->x); + #define utdecl32(x,n) { int i; for(i=0; ix[i] = swab32(this->x[i]); } + +-#define HDLINK_CNT 16 +-static int32 hdlink_cnt = HDLINK_CNT; +-struct hdlink_s +-{ +- uint32 src_inode; +- uint32 dst_nod; +-}; +- +-struct hdlinks_s +-{ +- int32 count; +- struct hdlink_s *hdl; +-}; +- +-static struct hdlinks_s hdlinks; +- + static void + swap_sb(superblock *sb) + { +@@ -633,9 +709,24 @@ + static void + swap_nod(inode *nod) + { ++ uint32 nblk; ++ + #define this nod + inode_decl + #undef this ++ ++ // block and character inodes store the major and minor in the ++ // i_block, so we need to unswap to get those. Also, if it's ++ // zero iblocks, put the data back like it belongs. ++ nblk = nod->i_blocks / INOBLK; ++ if ((nod->i_size && !nblk) ++ || ((nod->i_mode & FM_IFBLK) == FM_IFBLK) ++ || ((nod->i_mode & FM_IFCHR) == FM_IFCHR)) ++ { ++ int i; ++ for(i = 0; i <= EXT2_TIND_BLOCK; i++) ++ nod->i_block[i] = swab32(nod->i_block[i]); ++ } + } + + static void +@@ -657,6 +748,7 @@ + + #undef decl8 + #undef udecl8 ++#undef utdecl8 + #undef decl16 + #undef udecl16 + #undef decl32 +@@ -770,15 +862,15 @@ + } + + int +-is_hardlink(ino_t inode) ++is_hardlink(filesystem *fs, ino_t inode) + { + int i; + +- for(i = 0; i < hdlinks.count; i++) { +- if(hdlinks.hdl[i].src_inode == inode) ++ for(i = 0; i < fs->hdlinks.count; i++) { ++ if(fs->hdlinks.hdl[i].src_inode == inode) + return i; + } +- return -1; ++ return -1; + } + + // printf helper macro +@@ -789,6 +881,8 @@ + get_workblk(void) + { + unsigned char* b=calloc(1,BLOCKSIZE); ++ if (!b) ++ error_msg_and_die("get_workblk() failed, out of memory"); + return b; + } + static inline void +@@ -811,24 +905,464 @@ + return b[(item-1) / 8] & (1 << ((item-1) % 8)); + } + +-// return a given block from a filesystem ++// Used by get_blk/put_blk to hold information about a block owned ++// by the user. ++typedef struct ++{ ++ cache_link link; ++ ++ filesystem *fs; ++ uint32 blk; ++ uint8 *b; ++ uint32 usecount; ++} blk_info; ++ ++#define MAX_FREE_CACHE_BLOCKS 100 ++ ++static uint32 ++blk_elem_val(cache_link *elem) ++{ ++ blk_info *bi = container_of(elem, blk_info, link); ++ return bi->blk; ++} ++ ++static void ++blk_freed(cache_link *elem) ++{ ++ blk_info *bi = container_of(elem, blk_info, link); ++ ++ if (fseeko(bi->fs->f, ((off_t) bi->blk) * BLOCKSIZE, SEEK_SET)) ++ perror_msg_and_die("fseek"); ++ if (fwrite(bi->b, BLOCKSIZE, 1, bi->fs->f) != 1) ++ perror_msg_and_die("get_blk: write"); ++ free(bi->b); ++ free(bi); ++} ++ ++// Return a given block from a filesystem. Make sure to call ++// put_blk when you are done with it. + static inline uint8 * +-get_blk(filesystem *fs, uint32 blk) ++get_blk(filesystem *fs, uint32 blk, blk_info **rbi) + { +- return (uint8*)fs + blk*BLOCKSIZE; ++ cache_link *curr; ++ blk_info *bi; ++ ++ if (blk >= fs->sb->s_blocks_count) ++ error_msg_and_die("Internal error, block out of range"); ++ ++ curr = cache_find(&fs->blks, blk); ++ if (curr) { ++ bi = container_of(curr, blk_info, link); ++ bi->usecount++; ++ goto out; ++ } ++ ++ bi = malloc(sizeof(*bi)); ++ if (!bi) ++ error_msg_and_die("get_blk: out of memory"); ++ bi->fs = fs; ++ bi->blk = blk; ++ bi->usecount = 1; ++ bi->b = malloc(BLOCKSIZE); ++ if (!bi->b) ++ error_msg_and_die("get_blk: out of memory"); ++ cache_add(&fs->blks, &bi->link); ++ if (fseeko(fs->f, ((off_t) blk) * BLOCKSIZE, SEEK_SET)) ++ perror_msg_and_die("fseek"); ++ if (fread(bi->b, BLOCKSIZE, 1, fs->f) != 1) { ++ if (ferror(fs->f)) ++ perror_msg_and_die("fread"); ++ memset(bi->b, 0, BLOCKSIZE); ++ } ++ ++out: ++ *rbi = bi; ++ return bi->b; + } + + // return a given inode from a filesystem +-static inline inode * +-get_nod(filesystem *fs, uint32 nod) ++static inline void ++put_blk(blk_info *bi) ++{ ++ if (bi->usecount == 0) ++ error_msg_and_die("Internal error: put_blk usecount zero"); ++ bi->usecount--; ++ if (bi->usecount == 0) ++ /* Free happens in the cache code */ ++ cache_item_set_unused(&bi->fs->blks, &bi->link); ++} ++ ++typedef struct + { +- int grp,offset; ++ cache_link link; ++ ++ filesystem *fs; ++ int gds; ++ blk_info *bi; ++ groupdescriptor *gd; ++ uint32 usecount; ++} gd_info; ++ ++#define MAX_FREE_CACHE_GDS 100 ++ ++static uint32 ++gd_elem_val(cache_link *elem) ++{ ++ gd_info *gi = container_of(elem, gd_info, link); ++ return gi->gds; ++} ++ ++static void ++gd_freed(cache_link *elem) ++{ ++ gd_info *gi = container_of(elem, gd_info, link); ++ ++ if (gi->fs->swapit) ++ swap_gd(gi->gd); ++ put_blk(gi->bi); ++ free(gi); ++} ++ ++#define GDS_START ((SUPERBLOCK_OFFSET + SUPERBLOCK_SIZE + BLOCKSIZE - 1) / BLOCKSIZE) ++#define GDS_PER_BLOCK (BLOCKSIZE / sizeof(groupdescriptor)) ++// the group descriptors are aligned on the block size ++static inline groupdescriptor * ++get_gd(filesystem *fs, uint32 no, gd_info **rgi) ++{ ++ uint32 gdblk; ++ uint32 offset; ++ gd_info *gi; ++ cache_link *curr; ++ ++ curr = cache_find(&fs->gds, no); ++ if (curr) { ++ gi = container_of(curr, gd_info, link); ++ gi->usecount++; ++ goto out; ++ } ++ ++ gi = malloc(sizeof(*gi)); ++ if (!gi) ++ error_msg_and_die("get_gd: out of memory"); ++ gi->fs = fs; ++ gi->gds = no; ++ gi->usecount = 1; ++ gdblk = GDS_START + (no / GDS_PER_BLOCK); ++ offset = no % GDS_PER_BLOCK; ++ gi->gd = ((groupdescriptor *) get_blk(fs, gdblk, &gi->bi)) + offset; ++ cache_add(&fs->gds, &gi->link); ++ if (fs->swapit) ++ swap_gd(gi->gd); ++ out: ++ *rgi = gi; ++ ++ return gi->gd; ++} ++ ++static inline void ++put_gd(gd_info *gi) ++{ ++ if (gi->usecount == 0) ++ error_msg_and_die("Internal error: put_gd usecount zero"); ++ ++ gi->usecount--; ++ if (gi->usecount == 0) ++ /* Free happens in the cache code */ ++ cache_item_set_unused(&gi->fs->gds, &gi->link); ++} ++ ++// Used by get_blkmap/put_blkmap to hold information about an block map ++// owned by the user. ++typedef struct ++{ ++ cache_link link; ++ ++ filesystem *fs; ++ uint32 blk; ++ uint8 *b; ++ blk_info *bi; ++ uint32 usecount; ++} blkmap_info; ++ ++#define MAX_FREE_CACHE_BLOCKMAPS 100 ++ ++static uint32 ++blkmap_elem_val(cache_link *elem) ++{ ++ blkmap_info *bmi = container_of(elem, blkmap_info, link); ++ return bmi->blk; ++} ++ ++static void ++blkmap_freed(cache_link *elem) ++{ ++ blkmap_info *bmi = container_of(elem, blkmap_info, link); ++ ++ if (bmi->fs->swapit) ++ swap_block(bmi->b); ++ put_blk(bmi->bi); ++ free(bmi); ++} ++ ++// Return a given block map from a filesystem. Make sure to call ++// put_blkmap when you are done with it. ++static inline uint32 * ++get_blkmap(filesystem *fs, uint32 blk, blkmap_info **rbmi) ++{ ++ blkmap_info *bmi; ++ cache_link *curr; ++ ++ curr = cache_find(&fs->blkmaps, blk); ++ if (curr) { ++ bmi = container_of(curr, blkmap_info, link); ++ bmi->usecount++; ++ goto out; ++ } ++ ++ bmi = malloc(sizeof(*bmi)); ++ if (!bmi) ++ error_msg_and_die("get_blkmap: out of memory"); ++ bmi->fs = fs; ++ bmi->blk = blk; ++ bmi->b = get_blk(fs, blk, &bmi->bi); ++ bmi->usecount = 1; ++ cache_add(&fs->blkmaps, &bmi->link); ++ ++ if (fs->swapit) ++ swap_block(bmi->b); ++ out: ++ *rbmi = bmi; ++ return (uint32 *) bmi->b; ++} ++ ++static inline void ++put_blkmap(blkmap_info *bmi) ++{ ++ if (bmi->usecount == 0) ++ error_msg_and_die("Internal error: put_blkmap usecount zero"); ++ ++ bmi->usecount--; ++ if (bmi->usecount == 0) ++ /* Free happens in the cache code */ ++ cache_item_set_unused(&bmi->fs->blkmaps, &bmi->link); ++} ++ ++// Used by get_nod/put_nod to hold information about an inode owned ++// by the user. ++typedef struct ++{ ++ cache_link link; ++ ++ filesystem *fs; ++ uint32 nod; ++ uint8 *b; ++ blk_info *bi; + inode *itab; ++ uint32 usecount; ++} nod_info; ++ ++#define MAX_FREE_CACHE_INODES 100 ++ ++static uint32 ++inode_elem_val(cache_link *elem) ++{ ++ nod_info *ni = container_of(elem, nod_info, link); ++ return ni->nod; ++} ++ ++static void ++inode_freed(cache_link *elem) ++{ ++ nod_info *ni = container_of(elem, nod_info, link); ++ ++ if (ni->fs->swapit) ++ swap_nod(ni->itab); ++ put_blk(ni->bi); ++ free(ni); ++} ++ ++#define INODES_PER_BLOCK (BLOCKSIZE / sizeof(inode)) + +- offset = GRP_IBM_OFFSET(fs,nod); ++// return a given inode from a filesystem ++static inline inode * ++get_nod(filesystem *fs, uint32 nod, nod_info **rni) ++{ ++ uint32 grp, boffset, offset; ++ cache_link *curr; ++ groupdescriptor *gd; ++ gd_info *gi; ++ nod_info *ni; ++ ++ curr = cache_find(&fs->inodes, nod); ++ if (curr) { ++ ni = container_of(curr, nod_info, link); ++ ni->usecount++; ++ goto out; ++ } ++ ++ ni = malloc(sizeof(*ni)); ++ if (!ni) ++ error_msg_and_die("get_nod: out of memory"); ++ ni->fs = fs; ++ ni->nod = nod; ++ ni->usecount = 1; ++ cache_add(&fs->inodes, &ni->link); ++ ++ offset = GRP_IBM_OFFSET(fs,nod) - 1; ++ boffset = offset / INODES_PER_BLOCK; ++ offset %= INODES_PER_BLOCK; + grp = GRP_GROUP_OF_INODE(fs,nod); +- itab = (inode *)get_blk(fs, fs->gd[grp].bg_inode_table); +- return itab+offset-1; ++ gd = get_gd(fs, grp, &gi); ++ ni->b = get_blk(fs, gd->bg_inode_table + boffset, &ni->bi); ++ ni->itab = ((inode *) ni->b) + offset; ++ if (fs->swapit) ++ swap_nod(ni->itab); ++ put_gd(gi); ++ out: ++ *rni = ni; ++ return ni->itab; ++} ++ ++static inline void ++put_nod(nod_info *ni) ++{ ++ if (ni->usecount == 0) ++ error_msg_and_die("Internal error: put_nod usecount zero"); ++ ++ ni->usecount--; ++ if (ni->usecount == 0) ++ /* Free happens in the cache code */ ++ cache_item_set_unused(&ni->fs->inodes, &ni->link); ++} ++ ++// Used to hold state information while walking a directory inode. ++typedef struct ++{ ++ directory d; ++ filesystem *fs; ++ uint32 nod; ++ directory *last_d; ++ uint8 *b; ++ blk_info *bi; ++} dirwalker; ++ ++// Start a directory walk on the given inode. You must pass in a ++// dirwalker structure, then use that dirwalker for future operations. ++// Call put_dir when you are done walking the directory. ++static inline directory * ++get_dir(filesystem *fs, uint32 nod, dirwalker *dw) ++{ ++ dw->fs = fs; ++ dw->b = get_blk(fs, nod, &dw->bi); ++ dw->nod = nod; ++ dw->last_d = (directory *) dw->b; ++ ++ memcpy(&dw->d, dw->last_d, sizeof(directory)); ++ if (fs->swapit) ++ swap_dir(&dw->d); ++ return &dw->d; ++} ++ ++// Move to the next directory. ++static inline directory * ++next_dir(dirwalker *dw) ++{ ++ directory *next_d = (directory *)((int8*)dw->last_d + dw->d.d_rec_len); ++ ++ if (dw->fs->swapit) ++ swap_dir(&dw->d); ++ memcpy(dw->last_d, &dw->d, sizeof(directory)); ++ ++ if (((int8 *) next_d) >= ((int8 *) dw->b + BLOCKSIZE)) ++ return NULL; ++ ++ dw->last_d = next_d; ++ memcpy(&dw->d, next_d, sizeof(directory)); ++ if (dw->fs->swapit) ++ swap_dir(&dw->d); ++ return &dw->d; ++} ++ ++// Call then when you are done with the directory walk. ++static inline void ++put_dir(dirwalker *dw) ++{ ++ if (dw->fs->swapit) ++ swap_dir(&dw->d); ++ memcpy(dw->last_d, &dw->d, sizeof(directory)); ++ ++ if (dw->nod == 0) ++ free_workblk(dw->b); ++ else ++ put_blk(dw->bi); ++} ++ ++// Create a new directory block with the given inode as it's destination ++// and append it to the current dirwalker. ++static directory * ++new_dir(filesystem *fs, uint32 dnod, const char *name, int nlen, dirwalker *dw) ++{ ++ directory *d; ++ ++ dw->fs = fs; ++ dw->b = get_workblk(); ++ dw->nod = 0; ++ dw->last_d = (directory *) dw->b; ++ d = &dw->d; ++ d->d_inode = dnod; ++ d->d_rec_len = BLOCKSIZE; ++ d->d_name_len = nlen; ++ strncpy(((char *) dw->last_d) + sizeof(directory), name, nlen); ++ return d; ++} ++ ++// Shrink the current directory entry, make a new one with the free ++// space, and return the new directory entry (making it current). ++static inline directory * ++shrink_dir(dirwalker *dw, uint32 nod, const char *name, int nlen) ++{ ++ int reclen, preclen; ++ directory *d = &dw->d; ++ ++ reclen = d->d_rec_len; ++ d->d_rec_len = sizeof(directory) + rndup(d->d_name_len, 4); ++ preclen = d->d_rec_len; ++ reclen -= preclen; ++ if (dw->fs->swapit) ++ swap_dir(&dw->d); ++ memcpy(dw->last_d, &dw->d, sizeof(directory)); ++ ++ dw->last_d = (directory *) (((int8 *) dw->last_d) + preclen); ++ d->d_rec_len = reclen; ++ d->d_inode = nod; ++ d->d_name_len = nlen; ++ strncpy(((char *) dw->last_d) + sizeof(directory), name, nlen); ++ ++ return d; ++} ++ ++// Return the current block the directory is walking ++static inline uint8 * ++dir_data(dirwalker *dw) ++{ ++ return dw->b; ++} ++ ++// Return the pointer to the name for the current directory ++static inline char * ++dir_name(dirwalker *dw) ++{ ++ return ((char *) dw->last_d) + sizeof(directory); ++} ++ ++// Set the name for the current directory. Note that this doesn't ++// verify that there is space for the directory name, you must do ++// that yourself. ++static void ++dir_set_name(dirwalker *dw, const char *name, int nlen) ++{ ++ dw->d.d_name_len = nlen; ++ strncpy(((char *) dw->last_d) + sizeof(directory), name, nlen); + } + + // allocate a given block/inode in the bitmap +@@ -870,21 +1404,34 @@ + { + uint32 bk=0; + uint32 grp,nbgroups; ++ blk_info *bi; ++ groupdescriptor *gd; ++ gd_info *gi; + + grp = GRP_GROUP_OF_INODE(fs,nod); + nbgroups = GRP_NBGROUPS(fs); +- if(!(bk = allocate(get_blk(fs,fs->gd[grp].bg_block_bitmap), 0))) { +- for(grp=0;grpgd[grp].bg_block_bitmap),0); ++ gd = get_gd(fs, grp, &gi); ++ bk = allocate(GRP_GET_GROUP_BBM(fs, gd, &bi), 0); ++ GRP_PUT_GROUP_BBM(bi); ++ put_gd(gi); ++ if (!bk) { ++ for (grp=0; grpgd[grp].bg_free_blocks_count--)) ++ gd = get_gd(fs, grp, &gi); ++ if(!(gd->bg_free_blocks_count--)) + error_msg_and_die("group descr %d. free blocks count == 0 (corrupted fs?)",grp); +- if(!(fs->sb.s_free_blocks_count--)) ++ put_gd(gi); ++ if(!(fs->sb->s_free_blocks_count--)) + error_msg_and_die("superblock free blocks count == 0 (corrupted fs?)"); +- return fs->sb.s_blocks_per_group*grp + bk; ++ return fs->sb->s_first_data_block + fs->sb->s_blocks_per_group*grp + (bk-1); + } + + // free a block +@@ -892,12 +1439,18 @@ + free_blk(filesystem *fs, uint32 bk) + { + uint32 grp; +- +- grp = bk / fs->sb.s_blocks_per_group; +- bk %= fs->sb.s_blocks_per_group; +- deallocate(get_blk(fs,fs->gd[grp].bg_block_bitmap), bk); +- fs->gd[grp].bg_free_blocks_count++; +- fs->sb.s_free_blocks_count++; ++ blk_info *bi; ++ gd_info *gi; ++ groupdescriptor *gd; ++ ++ grp = bk / fs->sb->s_blocks_per_group; ++ bk %= fs->sb->s_blocks_per_group; ++ gd = get_gd(fs, grp, &gi); ++ deallocate(GRP_GET_GROUP_BBM(fs, gd, &bi), bk); ++ GRP_PUT_GROUP_BBM(bi); ++ gd->bg_free_blocks_count++; ++ put_gd(gi); ++ fs->sb->s_free_blocks_count++; + } + + // allocate an inode +@@ -906,6 +1459,9 @@ + { + uint32 nod,best_group=0; + uint32 grp,nbgroups,avefreei; ++ blk_info *bi; ++ gd_info *gi, *bestgi; ++ groupdescriptor *gd, *bestgd; + + nbgroups = GRP_NBGROUPS(fs); + +@@ -914,22 +1470,32 @@ + /* find the one with the most free blocks and allocate node there */ + /* Idea from find_group_dir in fs/ext2/ialloc.c in 2.4.19 kernel */ + /* We do it for all inodes. */ +- avefreei = fs->sb.s_free_inodes_count / nbgroups; ++ avefreei = fs->sb->s_free_inodes_count / nbgroups; ++ bestgd = get_gd(fs, best_group, &bestgi); + for(grp=0; grpgd[grp].bg_free_inodes_count < avefreei || +- fs->gd[grp].bg_free_inodes_count == 0) ++ gd = get_gd(fs, grp, &gi); ++ if (gd->bg_free_inodes_count < avefreei || ++ gd->bg_free_inodes_count == 0) { ++ put_gd(gi); + continue; +- if (!best_group || +- fs->gd[grp].bg_free_blocks_count > fs->gd[best_group].bg_free_blocks_count) ++ } ++ if (!best_group || gd->bg_free_blocks_count > bestgd->bg_free_blocks_count) { ++ put_gd(bestgi); + best_group = grp; ++ bestgd = gd; ++ bestgi = gi; ++ } else ++ put_gd(gi); + } +- if (!(nod = allocate(get_blk(fs,fs->gd[best_group].bg_inode_bitmap),0))) ++ if (!(nod = allocate(GRP_GET_GROUP_IBM(fs, bestgd, &bi), 0))) + error_msg_and_die("couldn't allocate an inode (no free inode)"); +- if(!(fs->gd[best_group].bg_free_inodes_count--)) ++ GRP_PUT_GROUP_IBM(bi); ++ if(!(bestgd->bg_free_inodes_count--)) + error_msg_and_die("group descr. free blocks count == 0 (corrupted fs?)"); +- if(!(fs->sb.s_free_inodes_count--)) ++ put_gd(bestgi); ++ if(!(fs->sb->s_free_inodes_count--)) + error_msg_and_die("superblock free blocks count == 0 (corrupted fs?)"); +- return fs->sb.s_inodes_per_group*best_group+nod; ++ return fs->sb->s_inodes_per_group*best_group+nod; + } + + // print a bitmap allocation +@@ -962,30 +1528,40 @@ + // used after being freed, so once you start + // freeing blocks don't stop until the end of + // the file. moreover, i_blocks isn't updated. +-// in fact, don't do that, just use extend_blk + // if hole!=0, create a hole in the file + static uint32 + walk_bw(filesystem *fs, uint32 nod, blockwalker *bw, int32 *create, uint32 hole) + { + uint32 *bkref = 0; ++ uint32 bk = 0; ++ blkmap_info *bmi1 = NULL, *bmi2 = NULL, *bmi3 = NULL; + uint32 *b; + int extend = 0, reduce = 0; ++ inode *inod; ++ nod_info *ni; ++ uint32 *iblk; ++ + if(create && (*create) < 0) + reduce = 1; +- if(bw->bnum >= get_nod(fs, nod)->i_blocks / INOBLK) ++ inod = get_nod(fs, nod, &ni); ++ if(bw->bnum >= inod->i_blocks / INOBLK) + { + if(create && (*create) > 0) + { + (*create)--; + extend = 1; + } +- else ++ else ++ { ++ put_nod(ni); + return WALK_END; ++ } + } ++ iblk = inod->i_block; + // first direct block + if(bw->bpdir == EXT2_INIT_BLOCK) + { +- bkref = &get_nod(fs, nod)->i_block[bw->bpdir = 0]; ++ bkref = &iblk[bw->bpdir = 0]; + if(extend) // allocate first block + *bkref = hole ? 0 : alloc_blk(fs,nod); + if(reduce) // free first block +@@ -994,7 +1570,7 @@ + // direct block + else if(bw->bpdir < EXT2_NDIR_BLOCKS) + { +- bkref = &get_nod(fs, nod)->i_block[++bw->bpdir]; ++ bkref = &iblk[++bw->bpdir]; + if(extend) // allocate block + *bkref = hole ? 0 : alloc_blk(fs,nod); + if(reduce) // free block +@@ -1007,10 +1583,10 @@ + bw->bpdir = EXT2_IND_BLOCK; + bw->bpind = 0; + if(extend) // allocate indirect block +- get_nod(fs, nod)->i_block[bw->bpdir] = alloc_blk(fs,nod); ++ iblk[bw->bpdir] = alloc_blk(fs,nod); + if(reduce) // free indirect block +- free_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); ++ free_blk(fs, iblk[bw->bpdir]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); + bkref = &b[bw->bpind]; + if(extend) // allocate first block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1021,7 +1597,7 @@ + else if((bw->bpdir == EXT2_IND_BLOCK) && (bw->bpind < BLOCKSIZE/4 - 1)) + { + bw->bpind++; +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); + bkref = &b[bw->bpind]; + if(extend) // allocate block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1036,15 +1612,15 @@ + bw->bpind = 0; + bw->bpdind = 0; + if(extend) // allocate double indirect block +- get_nod(fs, nod)->i_block[bw->bpdir] = alloc_blk(fs,nod); ++ iblk[bw->bpdir] = alloc_blk(fs,nod); + if(reduce) // free double indirect block +- free_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); ++ free_blk(fs, iblk[bw->bpdir]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); + if(extend) // allocate first indirect block + b[bw->bpind] = alloc_blk(fs,nod); + if(reduce) // free firstindirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); + bkref = &b[bw->bpdind]; + if(extend) // allocate first block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1055,8 +1631,8 @@ + else if((bw->bpdir == EXT2_DIND_BLOCK) && (bw->bpdind < BLOCKSIZE/4 - 1)) + { + bw->bpdind++; +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); + bkref = &b[bw->bpdind]; + if(extend) // allocate block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1069,12 +1645,12 @@ + bw->bnum++; + bw->bpdind = 0; + bw->bpind++; +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); + if(extend) // allocate indirect block + b[bw->bpind] = alloc_blk(fs,nod); + if(reduce) // free indirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); + bkref = &b[bw->bpdind]; + if(extend) // allocate first block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1094,20 +1670,20 @@ + bw->bpdind = 0; + bw->bptind = 0; + if(extend) // allocate triple indirect block +- get_nod(fs, nod)->i_block[bw->bpdir] = alloc_blk(fs,nod); ++ iblk[bw->bpdir] = alloc_blk(fs,nod); + if(reduce) // free triple indirect block +- free_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); ++ free_blk(fs, iblk[bw->bpdir]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); + if(extend) // allocate first double indirect block + b[bw->bpind] = alloc_blk(fs,nod); + if(reduce) // free first double indirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); + if(extend) // allocate first indirect block + b[bw->bpdind] = alloc_blk(fs,nod); + if(reduce) // free first indirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpdind]); ++ b = get_blkmap(fs, b[bw->bpdind], &bmi3); + bkref = &b[bw->bptind]; + if(extend) // allocate first data block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1121,9 +1697,9 @@ + (bw->bptind < BLOCKSIZE/4 -1) ) + { + bw->bptind++; +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpdind]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); ++ b = get_blkmap(fs, b[bw->bpdind], &bmi3); + bkref = &b[bw->bptind]; + if(extend) // allocate data block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1140,13 +1716,13 @@ + bw->bnum++; + bw->bptind = 0; + bw->bpdind++; +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); + if(extend) // allocate single indirect block + b[bw->bpdind] = alloc_blk(fs,nod); + if(reduce) // free indirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpdind]); ++ b = get_blkmap(fs, b[bw->bpdind], &bmi3); + bkref = &b[bw->bptind]; + if(extend) // allocate first data block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1163,17 +1739,17 @@ + bw->bpdind = 0; + bw->bptind = 0; + bw->bpind++; +- b = (uint32*)get_blk(fs, get_nod(fs, nod)->i_block[bw->bpdir]); ++ b = get_blkmap(fs, iblk[bw->bpdir], &bmi1); + if(extend) // allocate double indirect block + b[bw->bpind] = alloc_blk(fs,nod); + if(reduce) // free double indirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpind]); ++ b = get_blkmap(fs, b[bw->bpind], &bmi2); + if(extend) // allocate single indirect block + b[bw->bpdind] = alloc_blk(fs,nod); + if(reduce) // free indirect block + free_blk(fs, b[bw->bpind]); +- b = (uint32*)get_blk(fs, b[bw->bpdind]); ++ b = get_blkmap(fs, b[bw->bpdind], &bmi3); + bkref = &b[bw->bptind]; + if(extend) // allocate first block + *bkref = hole ? 0 : alloc_blk(fs,nod); +@@ -1184,56 +1760,105 @@ + error_msg_and_die("file too big !"); + /* End change for walking triple indirection */ + +- if(*bkref) +- { ++ bk = *bkref; ++ if (bmi3) ++ put_blkmap(bmi3); ++ if (bmi2) ++ put_blkmap(bmi2); ++ if (bmi1) ++ put_blkmap(bmi1); ++ ++ if(bk) ++ { ++ blk_info *bi; ++ gd_info *gi; ++ uint8 *block; + bw->bnum++; +- if(!reduce && !allocated(GRP_GET_BLOCK_BITMAP(fs,*bkref), GRP_BBM_OFFSET(fs,*bkref))) +- error_msg_and_die("[block %d of inode %d is unallocated !]", *bkref, nod); ++ block = GRP_GET_BLOCK_BITMAP(fs,bk,&bi,&gi); ++ if(!reduce && !allocated(block, GRP_BBM_OFFSET(fs,bk))) ++ error_msg_and_die("[block %d of inode %d is unallocated !]", bk, nod); ++ GRP_PUT_BLOCK_BITMAP(bi, gi); + } + if(extend) +- get_nod(fs, nod)->i_blocks = bw->bnum * INOBLK; +- return *bkref; ++ inod->i_blocks = bw->bnum * INOBLK; ++ put_nod(ni); ++ return bk; + } + +-// add blocks to an inode (file/dir/etc...) +-static void +-extend_blk(filesystem *fs, uint32 nod, block b, int amount) ++typedef struct + { +- int create = amount; +- blockwalker bw, lbw; +- uint32 bk; +- init_bw(&bw); +- if(amount < 0) +- { +- uint32 i; +- for(i = 0; i < get_nod(fs, nod)->i_blocks / INOBLK + amount; i++) +- walk_bw(fs, nod, &bw, 0, 0); +- while(walk_bw(fs, nod, &bw, &create, 0) != WALK_END) ++ blockwalker bw; ++ uint32 nod; ++ nod_info *ni; ++ inode *inod; ++} inode_pos; ++#define INODE_POS_TRUNCATE 0 ++#define INODE_POS_EXTEND 1 ++ ++// Call this to set up an ipos structure for future use with ++// extend_inode_blk to append blocks to the given inode. If ++// op is INODE_POS_TRUNCATE, the inode is truncated to zero size. ++// If op is INODE_POS_EXTEND, the position is moved to the end ++// of the inode's data blocks. ++// Call inode_pos_finish when done with the inode_pos structure. ++static void ++inode_pos_init(filesystem *fs, inode_pos *ipos, uint32 nod, int op, ++ blockwalker *endbw) ++{ ++ blockwalker lbw; ++ ++ init_bw(&ipos->bw); ++ ipos->nod = nod; ++ ipos->inod = get_nod(fs, nod, &ipos->ni); ++ if (op == INODE_POS_TRUNCATE) { ++ int32 create = -1; ++ while(walk_bw(fs, nod, &ipos->bw, &create, 0) != WALK_END) + /*nop*/; +- get_nod(fs, nod)->i_blocks += amount * INOBLK; ++ ipos->inod->i_blocks = 0; + } +- else ++ ++ if (endbw) ++ ipos->bw = *endbw; ++ else { ++ /* Seek to the end */ ++ init_bw(&ipos->bw); ++ lbw = ipos->bw; ++ while(walk_bw(fs, nod, &ipos->bw, 0, 0) != WALK_END) ++ lbw = ipos->bw; ++ ipos->bw = lbw; ++ } ++} ++ ++// Clean up the inode_pos structure. ++static void ++inode_pos_finish(filesystem *fs, inode_pos *ipos) ++{ ++ put_nod(ipos->ni); ++} ++ ++// add blocks to an inode (file/dir/etc...) at the given position. ++// This will only work when appending to the end of an inode. ++static void ++extend_inode_blk(filesystem *fs, inode_pos *ipos, block b, int amount) ++{ ++ uint32 bk; ++ uint32 pos; ++ ++ if (amount < 0) ++ error_msg_and_die("extend_inode_blk: Got negative amount"); ++ ++ for (pos = 0; amount; pos += BLOCKSIZE) + { +- lbw = bw; +- while((bk = walk_bw(fs, nod, &bw, 0, 0)) != WALK_END) +- lbw = bw; +- bw = lbw; +- while(create) +- { +- int i, copyb = 0; +- if(!(fs->sb.s_reserved[200] & OP_HOLES)) +- copyb = 1; +- else +- for(i = 0; i < BLOCKSIZE / 4; i++) +- if(((int32*)(b + BLOCKSIZE * (amount - create)))[i]) +- { +- copyb = 1; +- break; +- } +- if((bk = walk_bw(fs, nod, &bw, &create, !copyb)) == WALK_END) +- break; +- if(copyb) +- memcpy(get_blk(fs, bk), b + BLOCKSIZE * (amount - create - 1), BLOCKSIZE); ++ int hole = (fs->holes && is_blk_empty(b + pos)); ++ ++ bk = walk_bw(fs, ipos->nod, &ipos->bw, &amount, hole); ++ if (bk == WALK_END) ++ error_msg_and_die("extend_inode_blk: extend failed"); ++ if (!hole) { ++ blk_info *bi; ++ uint8 *block = get_blk(fs, bk, &bi); ++ memcpy(block, b + pos, BLOCKSIZE); ++ put_blk(bi); + } + } + } +@@ -1242,15 +1867,17 @@ + static void + add2dir(filesystem *fs, uint32 dnod, uint32 nod, const char* name) + { +- blockwalker bw; ++ blockwalker bw, lbw; + uint32 bk; +- uint8 *b; + directory *d; ++ dirwalker dw; + int reclen, nlen; + inode *node; + inode *pnode; ++ nod_info *dni, *ni; ++ inode_pos ipos; + +- pnode = get_nod(fs, dnod); ++ pnode = get_nod(fs, dnod, &dni); + if((pnode->i_mode & FM_IFMT) != FM_IFDIR) + error_msg_and_die("can't add '%s' to a non-directory", name); + if(!*name) +@@ -1262,52 +1889,52 @@ + if(reclen > BLOCKSIZE) + error_msg_and_die("bad name '%s' (too long)", name); + init_bw(&bw); ++ lbw = bw; + while((bk = walk_bw(fs, dnod, &bw, 0, 0)) != WALK_END) // for all blocks in dir + { +- b = get_blk(fs, bk); + // for all dir entries in block +- for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + d->d_rec_len)) ++ for(d = get_dir(fs, bk, &dw); d; d = next_dir(&dw)) + { + // if empty dir entry, large enough, use it + if((!d->d_inode) && (d->d_rec_len >= reclen)) + { + d->d_inode = nod; +- node = get_nod(fs, nod); ++ node = get_nod(fs, nod, &ni); ++ dir_set_name(&dw, name, nlen); ++ put_dir(&dw); + node->i_links_count++; +- d->d_name_len = nlen; +- strncpy(d->d_name, name, nlen); +- return; ++ put_nod(ni); ++ goto out; + } + // if entry with enough room (last one?), shrink it & use it + if(d->d_rec_len >= (sizeof(directory) + rndup(d->d_name_len, 4) + reclen)) + { +- reclen = d->d_rec_len; +- d->d_rec_len = sizeof(directory) + rndup(d->d_name_len, 4); +- reclen -= d->d_rec_len; +- d = (directory*) (((int8*)d) + d->d_rec_len); +- d->d_rec_len = reclen; +- d->d_inode = nod; +- node = get_nod(fs, nod); ++ d = shrink_dir(&dw, nod, name, nlen); ++ put_dir(&dw); ++ node = get_nod(fs, nod, &ni); + node->i_links_count++; +- d->d_name_len = nlen; +- strncpy(d->d_name, name, nlen); +- return; ++ put_nod(ni); ++ goto out; + } + } ++ put_dir(&dw); ++ lbw = bw; + } + // we found no free entry in the directory, so we add a block +- if(!(b = get_workblk())) +- error_msg_and_die("get_workblk() failed."); +- d = (directory*)b; +- d->d_inode = nod; +- node = get_nod(fs, nod); ++ node = get_nod(fs, nod, &ni); ++ d = new_dir(fs, nod, name, nlen, &dw); + node->i_links_count++; +- d->d_rec_len = BLOCKSIZE; +- d->d_name_len = nlen; +- strncpy(d->d_name, name, nlen); +- extend_blk(fs, dnod, b, 1); +- get_nod(fs, dnod)->i_size += BLOCKSIZE; +- free_workblk(b); ++ put_nod(ni); ++ next_dir(&dw); // Force the data into the buffer ++ ++ inode_pos_init(fs, &ipos, dnod, INODE_POS_EXTEND, &lbw); ++ extend_inode_blk(fs, &ipos, dir_data(&dw), 1); ++ inode_pos_finish(fs, &ipos); ++ ++ put_dir(&dw); ++ pnode->i_size += BLOCKSIZE; ++out: ++ put_nod(dni); + } + + // find an entry in a directory +@@ -1321,11 +1948,13 @@ + while((bk = walk_bw(fs, nod, &bw, 0, 0)) != WALK_END) + { + directory *d; +- uint8 *b; +- b = get_blk(fs, bk); +- for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + d->d_rec_len)) +- if(d->d_inode && (nlen == d->d_name_len) && !strncmp(d->d_name, name, nlen)) ++ dirwalker dw; ++ for (d = get_dir(fs, bk, &dw); d; d=next_dir(&dw)) ++ if(d->d_inode && (nlen == d->d_name_len) && !strncmp(dir_name(&dw), name, nlen)) { ++ put_dir(&dw); + return d->d_inode; ++ } ++ put_dir(&dw); + } + return 0; + } +@@ -1356,47 +1985,55 @@ + return nod; + } + ++// chmod an inode ++void ++chmod_fs(filesystem *fs, uint32 nod, uint16 mode, uint16 uid, uint16 gid) ++{ ++ inode *node; ++ nod_info *ni; ++ node = get_nod(fs, nod, &ni); ++ node->i_mode = (node->i_mode & ~FM_IMASK) | (mode & FM_IMASK); ++ node->i_uid = uid; ++ node->i_gid = gid; ++ put_nod(ni); ++} ++ + // create a simple inode + static uint32 + mknod_fs(filesystem *fs, uint32 parent_nod, const char *name, uint16 mode, uint16 uid, uint16 gid, uint8 major, uint8 minor, uint32 ctime, uint32 mtime) + { + uint32 nod; + inode *node; +- if((nod = find_dir(fs, parent_nod, name))) +- { +- node = get_nod(fs, nod); +- if((node->i_mode & FM_IFMT) != (mode & FM_IFMT)) +- error_msg_and_die("node '%s' already exists and isn't of the same type", name); +- node->i_mode = mode; +- } +- else ++ nod_info *ni; ++ gd_info *gi; ++ ++ nod = alloc_nod(fs); ++ node = get_nod(fs, nod, &ni); ++ node->i_mode = mode; ++ add2dir(fs, parent_nod, nod, name); ++ switch(mode & FM_IFMT) + { +- nod = alloc_nod(fs); +- node = get_nod(fs, nod); +- node->i_mode = mode; +- add2dir(fs, parent_nod, nod, name); +- switch(mode & FM_IFMT) +- { +- case FM_IFLNK: +- mode = FM_IFLNK | FM_IRWXU | FM_IRWXG | FM_IRWXO; +- break; +- case FM_IFBLK: +- case FM_IFCHR: +- ((uint8*)get_nod(fs, nod)->i_block)[0] = minor; +- ((uint8*)get_nod(fs, nod)->i_block)[1] = major; +- break; +- case FM_IFDIR: +- add2dir(fs, nod, nod, "."); +- add2dir(fs, nod, parent_nod, ".."); +- fs->gd[GRP_GROUP_OF_INODE(fs,nod)].bg_used_dirs_count++; +- break; +- } ++ case FM_IFLNK: ++ mode = FM_IFLNK | FM_IRWXU | FM_IRWXG | FM_IRWXO; ++ break; ++ case FM_IFBLK: ++ case FM_IFCHR: ++ ((uint8*)node->i_block)[0] = minor; ++ ((uint8*)node->i_block)[1] = major; ++ break; ++ case FM_IFDIR: ++ add2dir(fs, nod, nod, "."); ++ add2dir(fs, nod, parent_nod, ".."); ++ get_gd(fs,GRP_GROUP_OF_INODE(fs,nod),&gi)->bg_used_dirs_count++; ++ put_gd(gi); ++ break; + } + node->i_uid = uid; + node->i_gid = gid; + node->i_atime = mtime; + node->i_ctime = ctime; + node->i_mtime = mtime; ++ put_nod(ni); + return nod; + } + +@@ -1413,33 +2050,73 @@ + mklink_fs(filesystem *fs, uint32 parent_nod, const char *name, size_t size, uint8 *b, uid_t uid, gid_t gid, uint32 ctime, uint32 mtime) + { + uint32 nod = mknod_fs(fs, parent_nod, name, FM_IFLNK | FM_IRWXU | FM_IRWXG | FM_IRWXO, uid, gid, 0, 0, ctime, mtime); +- extend_blk(fs, nod, 0, - (int)get_nod(fs, nod)->i_blocks / INOBLK); +- get_nod(fs, nod)->i_size = size; +- if(size <= 4 * (EXT2_TIND_BLOCK+1)) +- { +- strncpy((char*)get_nod(fs, nod)->i_block, (char*)b, size); ++ nod_info *ni; ++ inode *node = get_nod(fs, nod, &ni); ++ inode_pos ipos; ++ ++ inode_pos_init(fs, &ipos, nod, INODE_POS_TRUNCATE, NULL); ++ node->i_size = size; ++ if(size < 4 * (EXT2_TIND_BLOCK+1)) ++ { ++ strncpy((char*)node->i_block, (char*)b, size); ++ ((char*)node->i_block)[size+1] = '\0'; ++ inode_pos_finish(fs, &ipos); ++ put_nod(ni); + return nod; + } +- extend_blk(fs, nod, b, rndup(size, BLOCKSIZE) / BLOCKSIZE); ++ extend_inode_blk(fs, &ipos, b, rndup(size, BLOCKSIZE) / BLOCKSIZE); ++ inode_pos_finish(fs, &ipos); ++ put_nod(ni); + return nod; + } + ++static void ++fs_upgrade_rev1_largefile(filesystem *fs) ++{ ++ fs->sb->s_rev_level = 1; ++ fs->sb->s_first_ino = EXT2_GOOD_OLD_FIRST_INO; ++ fs->sb->s_inode_size = EXT2_GOOD_OLD_INODE_SIZE; ++} ++ ++#define COPY_BLOCKS 16 ++#define CB_SIZE (COPY_BLOCKS * BLOCKSIZE) ++ + // make a file from a FILE* + static uint32 +-mkfile_fs(filesystem *fs, uint32 parent_nod, const char *name, uint32 mode, size_t size, FILE *f, uid_t uid, gid_t gid, uint32 ctime, uint32 mtime) ++mkfile_fs(filesystem *fs, uint32 parent_nod, const char *name, uint32 mode, FILE *f, uid_t uid, gid_t gid, uint32 ctime, uint32 mtime) + { + uint8 * b; + uint32 nod = mknod_fs(fs, parent_nod, name, mode|FM_IFREG, uid, gid, 0, 0, ctime, mtime); +- extend_blk(fs, nod, 0, - (int)get_nod(fs, nod)->i_blocks / INOBLK); +- get_nod(fs, nod)->i_size = size; +- if (size) { +- if(!(b = (uint8*)calloc(rndup(size, BLOCKSIZE), 1))) +- error_msg_and_die("not enough mem to read file '%s'", name); +- if(f) +- fread(b, size, 1, f); // FIXME: ugly. use mmap() ... +- extend_blk(fs, nod, b, rndup(size, BLOCKSIZE) / BLOCKSIZE); +- free(b); +- } ++ nod_info *ni; ++ inode *node = get_nod(fs, nod, &ni); ++ off_t size = 0; ++ size_t readbytes; ++ inode_pos ipos; ++ int fullsize; ++ ++ b = malloc(CB_SIZE); ++ if (!b) ++ error_msg_and_die("mkfile_fs: out of memory"); ++ inode_pos_init(fs, &ipos, nod, INODE_POS_TRUNCATE, NULL); ++ readbytes = fread(b, 1, CB_SIZE, f); ++ while (readbytes) { ++ fullsize = rndup(readbytes, BLOCKSIZE); ++ // Fill to end of block with zeros. ++ memset(b + readbytes, 0, fullsize - readbytes); ++ extend_inode_blk(fs, &ipos, b, fullsize / BLOCKSIZE); ++ size += readbytes; ++ readbytes = fread(b, 1, CB_SIZE, f); ++ } ++ if (size > 0x7fffffff) { ++ if (fs->sb->s_rev_level < 1) ++ fs_upgrade_rev1_largefile(fs); ++ fs->sb->s_feature_ro_compat |= EXT2_FEATURE_RO_COMPAT_LARGE_FILE; ++ } ++ node->i_dir_acl = size >> 32; ++ node->i_size = size; ++ inode_pos_finish(fs, &ipos); ++ put_nod(ni); ++ free(b); + return nod; + } + +@@ -1591,13 +2268,24 @@ + dname = malloc(len + 1); + for(i = start; i < count; i++) + { ++ uint32 oldnod; + SNPRINTF(dname, len, "%s%lu", name, i); +- mknod_fs(fs, nod, dname, mode, uid, gid, major, minor + (i * increment - start), ctime, mtime); ++ oldnod = find_dir(fs, nod, dname); ++ if(oldnod) ++ chmod_fs(fs, oldnod, mode, uid, gid); ++ else ++ mknod_fs(fs, nod, dname, mode, uid, gid, major, minor + (i * increment - start), ctime, mtime); + } + free(dname); + } + else +- mknod_fs(fs, nod, name, mode, uid, gid, major, minor, ctime, mtime); ++ { ++ uint32 oldnod = find_dir(fs, nod, name); ++ if(oldnod) ++ chmod_fs(fs, oldnod, mode, uid, gid); ++ else ++ mknod_fs(fs, nod, name, mode, uid, gid, major, minor, ctime, mtime); ++ } + } + } + if (line) +@@ -1643,6 +2331,10 @@ + switch(st.st_mode & S_IFMT) + { + case S_IFLNK: ++ if((st.st_mode & S_IFMT) == S_IFREG || st.st_size >= 4 * (EXT2_TIND_BLOCK+1)) ++ stats->nblocks += (st.st_size + BLOCKSIZE - 1) / BLOCKSIZE; ++ stats->ninodes++; ++ break; + case S_IFREG: + if((st.st_mode & S_IFMT) == S_IFREG || st.st_size > 4 * (EXT2_TIND_BLOCK+1)) + stats->nblocks += (st.st_size + BLOCKSIZE - 1) / BLOCKSIZE; +@@ -1657,19 +2349,33 @@ + if(chdir(dent->d_name) < 0) + perror_msg_and_die(dent->d_name); + add2fs_from_dir(fs, this_nod, squash_uids, squash_perms, fs_timestamp, stats); +- chdir(".."); ++ if (chdir("..") == -1) ++ perror_msg_and_die(".."); ++ + break; + default: + break; + } + else + { ++ if((nod = find_dir(fs, this_nod, name))) ++ { ++ error_msg("ignoring duplicate entry %s", name); ++ if(S_ISDIR(st.st_mode)) { ++ if(chdir(dent->d_name) < 0) ++ perror_msg_and_die(name); ++ add2fs_from_dir(fs, nod, squash_uids, squash_perms, fs_timestamp, stats); ++ if (chdir("..") == -1) ++ perror_msg_and_die(".."); ++ } ++ continue; ++ } + save_nod = 0; + /* Check for hardlinks */ + if (!S_ISDIR(st.st_mode) && !S_ISLNK(st.st_mode) && st.st_nlink > 1) { +- int32 hdlink = is_hardlink(st.st_ino); ++ int32 hdlink = is_hardlink(fs, st.st_ino); + if (hdlink >= 0) { +- add2dir(fs, this_nod, hdlinks.hdl[hdlink].dst_nod, name); ++ add2dir(fs, this_nod, fs->hdlinks.hdl[hdlink].dst_nod, name); + continue; + } else { + save_nod = 1; +@@ -1697,8 +2403,12 @@ + free(lnk); + break; + case S_IFREG: +- fh = xfopen(dent->d_name, "rb"); +- nod = mkfile_fs(fs, this_nod, name, mode, st.st_size, fh, uid, gid, ctime, mtime); ++ fh = fopen(dent->d_name, "rb"); ++ if (!fh) { ++ error_msg("Unable to open file %s", dent->d_name); ++ break; ++ } ++ nod = mkfile_fs(fs, this_nod, name, mode, fh, uid, gid, ctime, mtime); + fclose(fh); + break; + case S_IFDIR: +@@ -1706,199 +2416,128 @@ + if(chdir(dent->d_name) < 0) + perror_msg_and_die(name); + add2fs_from_dir(fs, nod, squash_uids, squash_perms, fs_timestamp, stats); +- chdir(".."); ++ if (chdir("..") == -1) ++ perror_msg_and_die(".."); + break; + default: + error_msg("ignoring entry %s", name); + } + if (save_nod) { +- if (hdlinks.count == hdlink_cnt) { +- if ((hdlinks.hdl = +- realloc (hdlinks.hdl, (hdlink_cnt + HDLINK_CNT) * ++ if (fs->hdlinks.count == fs->hdlink_cnt) { ++ if ((fs->hdlinks.hdl = ++ realloc (fs->hdlinks.hdl, (fs->hdlink_cnt + HDLINK_CNT) * + sizeof (struct hdlink_s))) == NULL) { + error_msg_and_die("Not enough memory"); + } +- hdlink_cnt += HDLINK_CNT; ++ fs->hdlink_cnt += HDLINK_CNT; + } +- hdlinks.hdl[hdlinks.count].src_inode = st.st_ino; +- hdlinks.hdl[hdlinks.count].dst_nod = nod; +- hdlinks.count++; ++ fs->hdlinks.hdl[fs->hdlinks.count].src_inode = st.st_ino; ++ fs->hdlinks.hdl[fs->hdlinks.count].dst_nod = nod; ++ fs->hdlinks.count++; + } + } + } + closedir(dh); + } + +-// endianness swap of x-indirect blocks ++// Copy size blocks from src to dst, putting holes in the output ++// file (if possible) if the input block is all zeros. ++// Copy size blocks from src to dst, putting holes in the output ++// file (if possible) if the input block is all zeros. + static void +-swap_goodblocks(filesystem *fs, inode *nod) ++copy_file(filesystem *fs, FILE *dst, FILE *src, size_t size) + { +- uint32 i,j; +- int done=0; +- uint32 *b,*b2; ++ uint8 *b; + +- uint32 nblk = nod->i_blocks / INOBLK; +- if((nod->i_size && !nblk) || ((nod->i_mode & FM_IFBLK) == FM_IFBLK) || ((nod->i_mode & FM_IFCHR) == FM_IFCHR)) +- for(i = 0; i <= EXT2_TIND_BLOCK; i++) +- nod->i_block[i] = swab32(nod->i_block[i]); +- if(nblk <= EXT2_IND_BLOCK) +- return; +- swap_block(get_blk(fs, nod->i_block[EXT2_IND_BLOCK])); +- if(nblk <= EXT2_DIND_BLOCK + BLOCKSIZE/4) +- return; +- /* Currently this will fail b'cos the number of blocks as stored +- in i_blocks also includes the indirection blocks (see +- walk_bw). But this function assumes that i_blocks only +- stores the count of data blocks ( Actually according to +- "Understanding the Linux Kernel" (Table 17-3 p502 1st Ed) +- i_blocks IS supposed to store the count of data blocks). so +- with a file of size 268K nblk would be 269.The above check +- will be false even though double indirection hasn't been +- started.This is benign as 0 means block 0 which has been +- zeroed out and therefore points back to itself from any offset +- */ +- // FIXME: I have fixed that, but I have the feeling the rest of +- // ths function needs to be fixed for the same reasons - Xav +- assert(nod->i_block[EXT2_DIND_BLOCK] != 0); +- for(i = 0; i < BLOCKSIZE/4; i++) +- if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + (BLOCKSIZE/4)*i ) +- swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i])); +- swap_block(get_blk(fs, nod->i_block[EXT2_DIND_BLOCK])); +- if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4 + BLOCKSIZE/4 * BLOCKSIZE/4) +- return; +- /* Adding support for triple indirection */ +- b = (uint32*)get_blk(fs,nod->i_block[EXT2_TIND_BLOCK]); +- for(i=0;i < BLOCKSIZE/4 && !done ; i++) { +- b2 = (uint32*)get_blk(fs,b[i]); +- for(j=0; j ( EXT2_IND_BLOCK + BLOCKSIZE/4 + +- (BLOCKSIZE/4)*(BLOCKSIZE/4) + +- i*(BLOCKSIZE/4)*(BLOCKSIZE/4) + +- j*(BLOCKSIZE/4)) ) +- swap_block(get_blk(fs,b2[j])); +- else { +- done = 1; +- break; +- } ++ b = malloc(BLOCKSIZE); ++ if (!b) ++ error_msg_and_die("copy_file: out of memory"); ++ if (fseek(src, 0, SEEK_SET)) ++ perror_msg_and_die("fseek"); ++ if (ftruncate(fileno(dst), 0)) ++ perror_msg_and_die("copy_file: ftruncate"); ++ while (size > 0) { ++ if (fread(b, BLOCKSIZE, 1, src) != 1) ++ perror_msg_and_die("copy failed on read"); ++ if ((dst != stdout) && fs->holes && is_blk_empty(b)) { ++ /* Empty block, just skip it */ ++ if (fseek(dst, BLOCKSIZE, SEEK_CUR)) ++ perror_msg_and_die("fseek"); ++ } else { ++ if (fwrite(b, BLOCKSIZE, 1, dst) != 1) ++ perror_msg_and_die("copy failed on write"); + } +- swap_block((uint8 *)b2); ++ size--; + } +- swap_block((uint8 *)b); +- return; ++ free(b); + } + +-static void +-swap_badblocks(filesystem *fs, inode *nod) ++// Allocate a new filesystem structure, allocate internal memory, ++// and initialize the contents. ++static filesystem * ++alloc_fs(int swapit, char *fname, uint32 nbblocks, FILE *srcfile) + { +- uint32 i,j; +- int done=0; +- uint32 *b,*b2; ++ filesystem *fs; ++ struct stat srcstat, dststat; + +- uint32 nblk = nod->i_blocks / INOBLK; +- if((nod->i_size && !nblk) || ((nod->i_mode & FM_IFBLK) == FM_IFBLK) || ((nod->i_mode & FM_IFCHR) == FM_IFCHR)) +- for(i = 0; i <= EXT2_TIND_BLOCK; i++) +- nod->i_block[i] = swab32(nod->i_block[i]); +- if(nblk <= EXT2_IND_BLOCK) +- return; +- swap_block(get_blk(fs, nod->i_block[EXT2_IND_BLOCK])); +- if(nblk <= EXT2_DIND_BLOCK + BLOCKSIZE/4) +- return; +- /* See comment in swap_goodblocks */ +- assert(nod->i_block[EXT2_DIND_BLOCK] != 0); +- swap_block(get_blk(fs, nod->i_block[EXT2_DIND_BLOCK])); +- for(i = 0; i < BLOCKSIZE/4; i++) +- if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + (BLOCKSIZE/4)*i ) +- swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i])); +- if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4 + BLOCKSIZE/4 * BLOCKSIZE/4) +- return; +- /* Adding support for triple indirection */ +- b = (uint32*)get_blk(fs,nod->i_block[EXT2_TIND_BLOCK]); +- swap_block((uint8 *)b); +- for(i=0;i < BLOCKSIZE/4 && !done ; i++) { +- b2 = (uint32*)get_blk(fs,b[i]); +- swap_block((uint8 *)b2); +- for(j=0; j ( EXT2_IND_BLOCK + BLOCKSIZE/4 + +- (BLOCKSIZE/4)*(BLOCKSIZE/4) + +- i*(BLOCKSIZE/4)*(BLOCKSIZE/4) + +- j*(BLOCKSIZE/4)) ) +- swap_block(get_blk(fs,b2[j])); +- else { +- done = 1; +- break; +- } +- } +- } +- return; +-} ++ fs = malloc(sizeof(*fs)); ++ if (!fs) ++ error_msg_and_die("not enough memory for filesystem"); ++ memset(fs, 0, sizeof(*fs)); ++ fs->swapit = swapit; ++ cache_init(&fs->blks, MAX_FREE_CACHE_BLOCKS, blk_elem_val, blk_freed); ++ cache_init(&fs->gds, MAX_FREE_CACHE_GDS, gd_elem_val, gd_freed); ++ cache_init(&fs->blkmaps, MAX_FREE_CACHE_BLOCKMAPS, ++ blkmap_elem_val, blkmap_freed); ++ cache_init(&fs->inodes, MAX_FREE_CACHE_INODES, ++ inode_elem_val, inode_freed); ++ fs->hdlink_cnt = HDLINK_CNT; ++ fs->hdlinks.hdl = calloc(sizeof(struct hdlink_s), fs->hdlink_cnt); ++ if (!fs->hdlinks.hdl) ++ error_msg_and_die("Not enough memory"); ++ fs->hdlinks.count = 0 ; + +-// endianness swap of the whole filesystem +-static void +-swap_goodfs(filesystem *fs) +-{ +- uint32 i; +- for(i = 1; i < fs->sb.s_inodes_count; i++) +- { +- inode *nod = get_nod(fs, i); +- if(nod->i_mode & FM_IFDIR) +- { +- blockwalker bw; +- uint32 bk; +- init_bw(&bw); +- while((bk = walk_bw(fs, i, &bw, 0, 0)) != WALK_END) +- { +- directory *d; +- uint8 *b; +- b = get_blk(fs, bk); +- for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + swab16(d->d_rec_len))) +- swap_dir(d); +- } +- } +- swap_goodblocks(fs, nod); +- swap_nod(nod); +- } +- for(i=0;igd[i])); +- swap_sb(&fs->sb); ++ if (strcmp(fname, "-") == 0) ++ fs->f = tmpfile(); ++ else if (srcfile) { ++ if (fstat(fileno(srcfile), &srcstat)) ++ perror_msg_and_die("fstat srcfile"); ++ if (stat(fname, &dststat) == 0 ++ && srcstat.st_ino == dststat.st_ino ++ && srcstat.st_dev == dststat.st_dev) ++ { ++ // source and destination are the same file, don't ++ // truncate or copy, just use the file. ++ fs->f = fopen(fname, "r+b"); ++ } else { ++ fs->f = fopen(fname, "w+b"); ++ if (fs->f) ++ copy_file(fs, fs->f, srcfile, nbblocks); ++ } ++ } else ++ fs->f = fopen(fname, "w+b"); ++ if (!fs->f) ++ perror_msg_and_die("opening %s", fname); ++ return fs; + } + ++/* Make sure the output file is the right size */ + static void +-swap_badfs(filesystem *fs) ++set_file_size(filesystem *fs) + { +- uint32 i; +- swap_sb(&fs->sb); +- for(i=0;igd[i])); +- for(i = 1; i < fs->sb.s_inodes_count; i++) +- { +- inode *nod = get_nod(fs, i); +- swap_nod(nod); +- swap_badblocks(fs, nod); +- if(nod->i_mode & FM_IFDIR) +- { +- blockwalker bw; +- uint32 bk; +- init_bw(&bw); +- while((bk = walk_bw(fs, i, &bw, 0, 0)) != WALK_END) +- { +- directory *d; +- uint8 *b; +- b = get_blk(fs, bk); +- for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + d->d_rec_len)) +- swap_dir(d); +- } +- } +- } ++ if (ftruncate(fileno(fs->f), ++ ((off_t) fs->sb->s_blocks_count) * BLOCKSIZE)) ++ perror_msg_and_die("set_file_size: ftruncate"); + } + + // initialize an empty filesystem + static filesystem * +-init_fs(int nbblocks, int nbinodes, int nbresrvd, int holes, uint32 fs_timestamp) ++init_fs(int nbblocks, int nbinodes, int nbresrvd, int holes, ++ uint32 fs_timestamp, uint32 creator_os, int swapit, char *fname) + { + uint32 i; + filesystem *fs; +- directory *d; +- uint8 * b; ++ dirwalker dw; + uint32 nod, first_block; + uint32 nbgroups,nbinodes_per_group,overhead_per_group,free_blocks, + free_blocks_per_group,nbblocks_per_group,min_nbgroups; +@@ -1906,6 +2545,11 @@ + uint32 j; + uint8 *bbm,*ibm; + inode *itab0; ++ blk_info *bi; ++ nod_info *ni; ++ groupdescriptor *gd; ++ gd_info *gi; ++ inode_pos ipos; + + if(nbresrvd < 0) + error_msg_and_die("reserved blocks value is invalid. Note: options have changed, see --help or the man page."); +@@ -1919,10 +2563,14 @@ + */ + min_nbgroups = (nbinodes + INODES_PER_GROUP - 1) / INODES_PER_GROUP; + ++ /* On filesystems with 1k block size, the bootloader area uses a full ++ * block. For 2048 and up, the superblock can be fitted into block 0. ++ */ ++ first_block = (BLOCKSIZE == 1024); ++ + /* nbblocks is the total number of blocks in the filesystem. + * a block group can have no more than 8192 blocks. + */ +- first_block = (BLOCKSIZE == 1024); + nbgroups = (nbblocks - first_block + BLOCKS_PER_GROUP - 1) / BLOCKS_PER_GROUP; + if(nbgroups < min_nbgroups) nbgroups = min_nbgroups; + nbblocks_per_group = rndup((nbblocks - first_block + nbgroups - 1)/nbgroups, 8); +@@ -1934,51 +2582,59 @@ + gdsz = rndup(nbgroups*sizeof(groupdescriptor),BLOCKSIZE)/BLOCKSIZE; + itblsz = nbinodes_per_group * sizeof(inode)/BLOCKSIZE; + overhead_per_group = 3 /*sb,bbm,ibm*/ + gdsz + itblsz; +- if((uint32)nbblocks - 1 < overhead_per_group * nbgroups) +- error_msg_and_die("too much overhead, try fewer inodes or more blocks. Note: options have changed, see --help or the man page."); +- free_blocks = nbblocks - overhead_per_group*nbgroups - 1 /*boot block*/; ++ free_blocks = nbblocks - overhead_per_group*nbgroups - first_block; + free_blocks_per_group = nbblocks_per_group - overhead_per_group; ++ if(free_blocks < 0) ++ error_msg_and_die("too much overhead, try fewer inodes or more blocks. Note: options have changed, see --help or the man page."); + +- if(!(fs = (filesystem*)calloc(nbblocks, BLOCKSIZE))) +- error_msg_and_die("not enough memory for filesystem"); ++ fs = alloc_fs(swapit, fname, nbblocks, NULL); ++ fs->sb = calloc(1, SUPERBLOCK_SIZE); ++ if (!fs->sb) ++ error_msg_and_die("error allocating header memory"); + + // create the superblock for an empty filesystem +- fs->sb.s_inodes_count = nbinodes_per_group * nbgroups; +- fs->sb.s_blocks_count = nbblocks; +- fs->sb.s_r_blocks_count = nbresrvd; +- fs->sb.s_free_blocks_count = free_blocks; +- fs->sb.s_free_inodes_count = fs->sb.s_inodes_count - EXT2_FIRST_INO + 1; +- fs->sb.s_first_data_block = first_block; +- fs->sb.s_log_block_size = BLOCKSIZE >> 11; +- fs->sb.s_log_frag_size = BLOCKSIZE >> 11; +- fs->sb.s_blocks_per_group = nbblocks_per_group; +- fs->sb.s_frags_per_group = nbblocks_per_group; +- fs->sb.s_inodes_per_group = nbinodes_per_group; +- fs->sb.s_wtime = fs_timestamp; +- fs->sb.s_magic = EXT2_MAGIC_NUMBER; +- fs->sb.s_lastcheck = fs_timestamp; ++ fs->sb->s_inodes_count = nbinodes_per_group * nbgroups; ++ fs->sb->s_blocks_count = nbblocks; ++ fs->sb->s_r_blocks_count = nbresrvd; ++ fs->sb->s_free_blocks_count = free_blocks; ++ fs->sb->s_free_inodes_count = fs->sb->s_inodes_count - EXT2_FIRST_INO + 1; ++ fs->sb->s_first_data_block = first_block; ++ fs->sb->s_log_block_size = BLOCKSIZE >> 11; ++ fs->sb->s_log_frag_size = BLOCKSIZE >> 11; ++ fs->sb->s_blocks_per_group = nbblocks_per_group; ++ fs->sb->s_frags_per_group = nbblocks_per_group; ++ fs->sb->s_inodes_per_group = nbinodes_per_group; ++ fs->sb->s_wtime = fs_timestamp; ++ fs->sb->s_magic = EXT2_MAGIC_NUMBER; ++ fs->sb->s_lastcheck = fs_timestamp; ++ fs->sb->s_creator_os = creator_os; ++ ++ set_file_size(fs); + + // set up groupdescriptors +- for(i=0, bbmpos=gdsz+2, ibmpos=bbmpos+1, itblpos=ibmpos+1; ++ for(i=0, bbmpos=first_block+1+gdsz, ibmpos=bbmpos+1, itblpos=ibmpos+1; + i free_blocks_per_group) { +- fs->gd[i].bg_free_blocks_count = free_blocks_per_group; ++ gd->bg_free_blocks_count = free_blocks_per_group; + free_blocks -= free_blocks_per_group; + } else { +- fs->gd[i].bg_free_blocks_count = free_blocks; ++ gd->bg_free_blocks_count = free_blocks; + free_blocks = 0; // this is the last block group + } + if(i) +- fs->gd[i].bg_free_inodes_count = nbinodes_per_group; ++ gd->bg_free_inodes_count = nbinodes_per_group; + else +- fs->gd[i].bg_free_inodes_count = nbinodes_per_group - ++ gd->bg_free_inodes_count = nbinodes_per_group - + EXT2_FIRST_INO + 2; +- fs->gd[i].bg_used_dirs_count = 0; +- fs->gd[i].bg_block_bitmap = bbmpos; +- fs->gd[i].bg_inode_bitmap = ibmpos; +- fs->gd[i].bg_inode_table = itblpos; ++ gd->bg_used_dirs_count = 0; ++ gd->bg_block_bitmap = bbmpos; ++ gd->bg_inode_bitmap = ibmpos; ++ gd->bg_inode_table = itblpos; ++ put_gd(gi); + } + + /* Mark non-filesystem blocks and inodes as allocated */ +@@ -1984,110 +2640,143 @@ + /* Mark non-filesystem blocks and inodes as allocated */ + /* Mark system blocks and inodes as allocated */ + for(i = 0; igd[i].bg_block_bitmap); ++ gd = get_gd(fs, i, &gi); ++ bbm = GRP_GET_GROUP_BBM(fs, gd, &bi); + //non-filesystem blocks +- for(j = fs->gd[i].bg_free_blocks_count ++ for(j = gd->bg_free_blocks_count + + overhead_per_group + 1; j <= BLOCKSIZE * 8; j++) + allocate(bbm, j); + //system blocks + for(j = 1; j <= overhead_per_group; j++) + allocate(bbm, j); +- ++ GRP_PUT_GROUP_BBM(bi); ++ + /* Inode bitmap */ +- ibm = get_blk(fs,fs->gd[i].bg_inode_bitmap); ++ ibm = GRP_GET_GROUP_IBM(fs, gd, &bi); + //non-filesystem inodes +- for(j = fs->sb.s_inodes_per_group+1; j <= BLOCKSIZE * 8; j++) ++ for(j = fs->sb->s_inodes_per_group+1; j <= BLOCKSIZE * 8; j++) + allocate(ibm, j); + + //system inodes + if(i == 0) + for(j = 1; j < EXT2_FIRST_INO; j++) + allocate(ibm, j); ++ GRP_PUT_GROUP_IBM(bi); ++ put_gd(gi); + } + + // make root inode and directory + /* We have groups now. Add the root filesystem in group 0 */ + /* Also increment the directory count for group 0 */ +- fs->gd[0].bg_free_inodes_count--; +- fs->gd[0].bg_used_dirs_count = 1; +- itab0 = (inode *)get_blk(fs,fs->gd[0].bg_inode_table); +- itab0[EXT2_ROOT_INO-1].i_mode = FM_IFDIR | FM_IRWXU | FM_IRGRP | FM_IROTH | FM_IXGRP | FM_IXOTH; +- itab0[EXT2_ROOT_INO-1].i_ctime = fs_timestamp; +- itab0[EXT2_ROOT_INO-1].i_mtime = fs_timestamp; +- itab0[EXT2_ROOT_INO-1].i_atime = fs_timestamp; +- itab0[EXT2_ROOT_INO-1].i_size = BLOCKSIZE; +- itab0[EXT2_ROOT_INO-1].i_links_count = 2; +- +- if(!(b = get_workblk())) +- error_msg_and_die("get_workblk() failed."); +- d = (directory*)b; +- d->d_inode = EXT2_ROOT_INO; +- d->d_rec_len = sizeof(directory)+4; +- d->d_name_len = 1; +- strcpy(d->d_name, "."); +- d = (directory*)(b + d->d_rec_len); +- d->d_inode = EXT2_ROOT_INO; +- d->d_rec_len = BLOCKSIZE - (sizeof(directory)+4); +- d->d_name_len = 2; +- strcpy(d->d_name, ".."); +- extend_blk(fs, EXT2_ROOT_INO, b, 1); ++ gd = get_gd(fs, 0, &gi); ++ gd->bg_free_inodes_count--; ++ gd->bg_used_dirs_count = 1; ++ put_gd(gi); ++ itab0 = get_nod(fs, EXT2_ROOT_INO, &ni); ++ itab0->i_mode = FM_IFDIR | FM_IRWXU | FM_IRGRP | FM_IROTH | FM_IXGRP | FM_IXOTH; ++ itab0->i_ctime = fs_timestamp; ++ itab0->i_mtime = fs_timestamp; ++ itab0->i_atime = fs_timestamp; ++ itab0->i_size = BLOCKSIZE; ++ itab0->i_links_count = 2; ++ put_nod(ni); ++ ++ new_dir(fs, EXT2_ROOT_INO, ".", 1, &dw); ++ shrink_dir(&dw, EXT2_ROOT_INO, "..", 2); ++ next_dir(&dw); // Force the data into the buffer ++ inode_pos_init(fs, &ipos, EXT2_ROOT_INO, INODE_POS_EXTEND, NULL); ++ extend_inode_blk(fs, &ipos, dir_data(&dw), 1); ++ inode_pos_finish(fs, &ipos); ++ put_dir(&dw); + +- // make lost+found directory and reserve blocks +- if(fs->sb.s_r_blocks_count) ++ // make lost+found directory ++ if(fs->sb->s_r_blocks_count) + { +- nod = mkdir_fs(fs, EXT2_ROOT_INO, "lost+found", FM_IRWXU, 0, 0, fs_timestamp, fs_timestamp); ++ inode *node; ++ uint8 *b; ++ ++ nod = mkdir_fs(fs, EXT2_ROOT_INO, "lost+found", FM_IRWXU, ++ 0, 0, fs_timestamp, fs_timestamp); ++ b = get_workblk(); + memset(b, 0, BLOCKSIZE); + ((directory*)b)->d_rec_len = BLOCKSIZE; +- /* We run into problems with e2fsck if directory lost+found grows +- * bigger than this. Need to find out why this happens - sundar +- */ +- if (fs->sb.s_r_blocks_count > fs->sb.s_blocks_count * MAX_RESERVED_BLOCKS ) +- fs->sb.s_r_blocks_count = fs->sb.s_blocks_count * MAX_RESERVED_BLOCKS; +- for(i = 1; i < fs->sb.s_r_blocks_count; i++) +- extend_blk(fs, nod, b, 1); +- get_nod(fs, nod)->i_size = fs->sb.s_r_blocks_count * BLOCKSIZE; ++ inode_pos_init(fs, &ipos, nod, INODE_POS_EXTEND, NULL); ++ // It is always 16 blocks to start out with ++ for(i = 1; i < 16; i++) ++ extend_inode_blk(fs, &ipos, b, 1); ++ inode_pos_finish(fs, &ipos); ++ free_workblk(b); ++ node = get_nod(fs, nod, &ni); ++ node->i_size = 16 * BLOCKSIZE; ++ put_nod(ni); + } +- free_workblk(b); + + // administrative info +- fs->sb.s_state = 1; +- fs->sb.s_max_mnt_count = 20; ++ fs->sb->s_state = 1; ++ fs->sb->s_max_mnt_count = 20; + + // options for me +- if(holes) +- fs->sb.s_reserved[200] |= OP_HOLES; ++ fs->holes = holes; + + return fs; + } + + // loads a filesystem from disk + static filesystem * +-load_fs(FILE * fh, int swapit) ++load_fs(FILE *fh, int swapit, char *fname) + { +- size_t fssize; ++ off_t fssize; + filesystem *fs; +- if((fseek(fh, 0, SEEK_END) < 0) || ((ssize_t)(fssize = ftell(fh)) == -1)) ++ ++ if((fseek(fh, 0, SEEK_END) < 0) || ((fssize = ftello(fh)) == -1)) + perror_msg_and_die("input filesystem image"); + rewind(fh); +- fssize = (fssize + BLOCKSIZE - 1) / BLOCKSIZE; ++ if ((fssize % BLOCKSIZE) != 0) ++ error_msg_and_die("Input file not a multiple of block size"); ++ fssize /= BLOCKSIZE; + if(fssize < 16) // totally arbitrary + error_msg_and_die("too small filesystem"); +- if(!(fs = (filesystem*)calloc(fssize, BLOCKSIZE))) +- error_msg_and_die("not enough memory for filesystem"); +- if(fread(fs, BLOCKSIZE, fssize, fh) != fssize) +- perror_msg_and_die("input filesystem image"); ++ fs = alloc_fs(swapit, fname, fssize, fh); ++ ++ /* Read and check the superblock, then read the superblock ++ * and all the group descriptors */ ++ fs->sb = malloc(SUPERBLOCK_SIZE); ++ if (!fs->sb) ++ error_msg_and_die("error allocating header memory"); ++ if (fseek(fs->f, SUPERBLOCK_OFFSET, SEEK_SET)) ++ perror_msg_and_die("fseek"); ++ if (fread(fs->sb, SUPERBLOCK_SIZE, 1, fs->f) != 1) ++ perror_msg_and_die("fread filesystem image superblock"); + if(swapit) +- swap_badfs(fs); +- if(fs->sb.s_rev_level || (fs->sb.s_magic != EXT2_MAGIC_NUMBER)) ++ swap_sb(fs->sb); ++ ++ if((fs->sb->s_rev_level > 1) || (fs->sb->s_magic != EXT2_MAGIC_NUMBER)) + error_msg_and_die("not a suitable ext2 filesystem"); ++ if (fs->sb->s_rev_level > 0) { ++ if (fs->sb->s_first_ino != EXT2_GOOD_OLD_FIRST_INO) ++ error_msg_and_die("First inode incompatible"); ++ if (fs->sb->s_inode_size != EXT2_GOOD_OLD_INODE_SIZE) ++ error_msg_and_die("inode size incompatible"); ++ if (fs->sb->s_feature_compat) ++ error_msg_and_die("Unsupported compat features"); ++ if (fs->sb->s_feature_incompat) ++ error_msg_and_die("Unsupported incompat features"); ++ if (fs->sb->s_feature_ro_compat ++ & ~EXT2_FEATURE_RO_COMPAT_LARGE_FILE) ++ error_msg_and_die("Unsupported ro compat features"); ++ } ++ ++ set_file_size(fs); + return fs; + } + + static void + free_fs(filesystem *fs) + { ++ free(fs->hdlinks.hdl); ++ fclose(fs->f); ++ free(fs->sb); + free(fs); + } + +@@ -2123,16 +2812,23 @@ + { + blockwalker bw; + uint32 bk; +- int32 fsize = get_nod(fs, nod)->i_size; ++ nod_info *ni; ++ inode *node = get_nod(fs, nod, &ni); ++ int32 fsize = node->i_size; ++ blk_info *bi; ++ + init_bw(&bw); + while((bk = walk_bw(fs, nod, &bw, 0, 0)) != WALK_END) + { + if(fsize <= 0) + error_msg_and_die("wrong size while saving inode %d", nod); +- if(fwrite(get_blk(fs, bk), (fsize > BLOCKSIZE) ? BLOCKSIZE : fsize, 1, f) != 1) ++ if(fwrite(get_blk(fs, bk, &bi), ++ (fsize > BLOCKSIZE) ? BLOCKSIZE : fsize, 1, f) != 1) + error_msg_and_die("error while saving inode %d", nod); ++ put_blk(bi); + fsize -= BLOCKSIZE; + } ++ put_nod(ni); + } + + +@@ -2141,8 +2837,11 @@ + print_dev(filesystem *fs, uint32 nod) + { + int minor, major; +- minor = ((uint8*)get_nod(fs, nod)->i_block)[0]; +- major = ((uint8*)get_nod(fs, nod)->i_block)[1]; ++ nod_info *ni; ++ inode *node = get_nod(fs, nod, &ni); ++ minor = ((uint8*)node->i_block)[0]; ++ major = ((uint8*)node->i_block)[1]; ++ put_nod(ni); + printf("major: %d, minor: %d\n", major, minor); + } + +@@ -2157,17 +2856,15 @@ + while((bk = walk_bw(fs, nod, &bw, 0, 0)) != WALK_END) + { + directory *d; +- uint8 *b; +- b = get_blk(fs, bk); +- for(d = (directory*)b; (int8*)d + sizeof(*d) < (int8*)b + BLOCKSIZE; d = (directory*)((int8*)d + d->d_rec_len)) ++ dirwalker dw; ++ for (d = get_dir(fs, bk, &dw); d; d = next_dir(&dw)) + if(d->d_inode) + { +- int i; + printf("entry '"); +- for(i = 0; i < d->d_name_len; i++) +- putchar(d->d_name[i]); ++ fwrite(dir_name(&dw), 1, d->d_name_len, stdout); + printf("' (inode %d): rec_len: %d (name_len: %d)\n", d->d_inode, d->d_rec_len, d->d_name_len); + } ++ put_dir(&dw); + } + } + +@@ -2175,14 +2872,18 @@ + static void + print_link(filesystem *fs, uint32 nod) + { +- if(!get_nod(fs, nod)->i_blocks) +- printf("links to '%s'\n", (char*)get_nod(fs, nod)->i_block); ++ nod_info *ni; ++ inode *node = get_nod(fs, nod, &ni); ++ ++ if(!node->i_blocks) ++ printf("links to '%s'\n", (char*)node->i_block); + else + { + printf("links to '"); + write_blocks(fs, nod, stdout); + printf("'\n"); + } ++ put_nod(ni); + } + + // make a ls-like printout of permissions +@@ -2251,8 +2952,13 @@ + { + char *s; + char perms[11]; +- if(!get_nod(fs, nod)->i_mode) +- return; ++ nod_info *ni; ++ inode *node = get_nod(fs, nod, &ni); ++ blk_info *bi; ++ gd_info *gi; ++ ++ if(!node->i_mode) ++ goto out; + switch(nod) + { + case EXT2_BAD_INO: +@@ -2274,15 +2980,18 @@ + default: + s = (nod >= EXT2_FIRST_INO) ? "normal" : "unknown reserved"; + } +- printf("inode %d (%s, %d links): ", nod, s, get_nod(fs, nod)->i_links_count); +- if(!allocated(GRP_GET_INODE_BITMAP(fs,nod), GRP_IBM_OFFSET(fs,nod))) ++ printf("inode %d (%s, %d links): ", nod, s, node->i_links_count); ++ if(!allocated(GRP_GET_INODE_BITMAP(fs,nod,&bi,&gi), GRP_IBM_OFFSET(fs,nod))) + { ++ GRP_PUT_INODE_BITMAP(bi,gi); + printf("unallocated\n"); +- return; ++ goto out; + } +- make_perms(get_nod(fs, nod)->i_mode, perms); +- printf("%s, size: %d byte%s (%d block%s)\n", perms, plural(get_nod(fs, nod)->i_size), plural(get_nod(fs, nod)->i_blocks / INOBLK)); +- switch(get_nod(fs, nod)->i_mode & FM_IFMT) ++ GRP_PUT_INODE_BITMAP(bi,gi); ++ make_perms(node->i_mode, perms); ++ printf("%s, size: %d byte%s (%d block%s)\n", perms, ++ plural(node->i_size), plural(node->i_blocks / INOBLK)); ++ switch(node->i_mode & FM_IFMT) + { + case FM_IFSOCK: + list_blocks(fs, nod); +@@ -2310,6 +3019,8 @@ + list_blocks(fs, nod); + } + printf("Done with inode %d\n",nod); ++out: ++ put_nod(ni); + } + + // describes various fields in a filesystem +@@ -2317,49 +3028,65 @@ + print_fs(filesystem *fs) + { + uint32 i; ++ blk_info *bi; ++ groupdescriptor *gd; ++ gd_info *gi; + uint8 *ibm; + + printf("%d blocks (%d free, %d reserved), first data block: %d\n", +- fs->sb.s_blocks_count, fs->sb.s_free_blocks_count, +- fs->sb.s_r_blocks_count, fs->sb.s_first_data_block); +- printf("%d inodes (%d free)\n", fs->sb.s_inodes_count, +- fs->sb.s_free_inodes_count); ++ fs->sb->s_blocks_count, fs->sb->s_free_blocks_count, ++ fs->sb->s_r_blocks_count, fs->sb->s_first_data_block); ++ printf("%d inodes (%d free)\n", fs->sb->s_inodes_count, ++ fs->sb->s_free_inodes_count); + printf("block size = %d, frag size = %d\n", +- fs->sb.s_log_block_size ? (fs->sb.s_log_block_size << 11) : 1024, +- fs->sb.s_log_frag_size ? (fs->sb.s_log_frag_size << 11) : 1024); ++ fs->sb->s_log_block_size ? (fs->sb->s_log_block_size << 11) : 1024, ++ fs->sb->s_log_frag_size ? (fs->sb->s_log_frag_size << 11) : 1024); + printf("number of groups: %d\n",GRP_NBGROUPS(fs)); + printf("%d blocks per group,%d frags per group,%d inodes per group\n", +- fs->sb.s_blocks_per_group, fs->sb.s_frags_per_group, +- fs->sb.s_inodes_per_group); ++ fs->sb->s_blocks_per_group, fs->sb->s_frags_per_group, ++ fs->sb->s_inodes_per_group); + printf("Size of inode table: %d blocks\n", +- (int)(fs->sb.s_inodes_per_group * sizeof(inode) / BLOCKSIZE)); ++ (int)(fs->sb->s_inodes_per_group * sizeof(inode) / BLOCKSIZE)); + for (i = 0; i < GRP_NBGROUPS(fs); i++) { + printf("Group No: %d\n", i+1); ++ gd = get_gd(fs, i, &gi); + printf("block bitmap: block %d,inode bitmap: block %d, inode table: block %d\n", +- fs->gd[i].bg_block_bitmap, fs->gd[i].bg_inode_bitmap, +- fs->gd[i].bg_inode_table); ++ gd->bg_block_bitmap, ++ gd->bg_inode_bitmap, ++ gd->bg_inode_table); + printf("block bitmap allocation:\n"); +- print_bm(GRP_GET_GROUP_BBM(fs, i),fs->sb.s_blocks_per_group); ++ print_bm(GRP_GET_GROUP_BBM(fs, gd, &bi),fs->sb->s_blocks_per_group); ++ GRP_PUT_GROUP_BBM(bi); + printf("inode bitmap allocation:\n"); +- ibm = GRP_GET_GROUP_IBM(fs, i); +- print_bm(ibm, fs->sb.s_inodes_per_group); +- for (i = 1; i <= fs->sb.s_inodes_per_group; i++) ++ ibm = GRP_GET_GROUP_IBM(fs, gd, &bi); ++ print_bm(ibm, fs->sb->s_inodes_per_group); ++ for (i = 1; i <= fs->sb->s_inodes_per_group; i++) + if (allocated(ibm, i)) + print_inode(fs, i); ++ GRP_PUT_GROUP_IBM(bi); ++ put_gd(gi); + } + } + + static void +-dump_fs(filesystem *fs, FILE * fh, int swapit) ++finish_fs(filesystem *fs) + { +- uint32 nbblocks = fs->sb.s_blocks_count; +- fs->sb.s_reserved[200] = 0; +- if(swapit) +- swap_goodfs(fs); +- if(fwrite(fs, BLOCKSIZE, nbblocks, fh) < nbblocks) +- perror_msg_and_die("output filesystem image"); +- if(swapit) +- swap_badfs(fs); ++ if (cache_flush(&fs->inodes)) ++ error_msg_and_die("entry mismatch on inode cache flush"); ++ if (cache_flush(&fs->blkmaps)) ++ error_msg_and_die("entry mismatch on blockmap cache flush"); ++ if (cache_flush(&fs->gds)) ++ error_msg_and_die("entry mismatch on gd cache flush"); ++ if (cache_flush(&fs->blks)) ++ error_msg_and_die("entry mismatch on block cache flush"); ++ if(fs->swapit) ++ swap_sb(fs->sb); ++ if (fseek(fs->f, SUPERBLOCK_OFFSET, SEEK_SET)) ++ perror_msg_and_die("fseek"); ++ if(fwrite(fs->sb, SUPERBLOCK_SIZE, 1, fs->f) != 1) ++ perror_msg_and_die("output filesystem superblock"); ++ if(fs->swapit) ++ swap_sb(fs->sb); + } + + static void +@@ -2419,10 +3146,12 @@ + " -x, --starting-image \n" + " -d, --root \n" + " -D, --devtable \n" ++ " -B, --block-size \n" + " -b, --size-in-blocks \n" + " -i, --bytes-per-inode \n" + " -N, --number-of-inodes \n" + " -m, --reserved-percentage \n" ++ " -o, --creator-os 'linux' (default), 'hurd', 'freebsd' or number.\n" + " -g, --block-map Generate a block map file for this path.\n" + " -e, --fill-value Fill unallocated blocks with value.\n" + " -z, --allow-holes Allow files with holes.\n" +@@ -2444,15 +3173,34 @@ + extern char* optarg; + extern int optind, opterr, optopt; + ++// parse the value for -o ++int ++lookup_creator_os(const char *name) ++{ ++ if (isdigit (*name)) ++ return atoi(name); ++ else if (strcasecmp(name, "linux") == 0) ++ return EXT2_OS_LINUX; ++ else if (strcasecmp(name, "GNU") == 0 || strcasecmp(name, "hurd") == 0) ++ return EXT2_OS_HURD; ++ else if (strcasecmp(name, "freebsd") == 0) ++ return EXT2_OS_FREEBSD; ++ else if (strcasecmp(name, "lites") == 0) ++ return EXT2_OS_LITES; ++ else ++ return EXT2_OS_LINUX; ++} ++ + int + main(int argc, char **argv) + { +- int nbblocks = -1; ++ long long nbblocks = -1; + int nbinodes = -1; + int nbresrvd = -1; + float bytes_per_inode = -1; + float reserved_frac = -1; + int fs_timestamp = -1; ++ int creator_os = CREATOR_OS; + char * fsout = "-"; + char * fsin = 0; + char * dopt[MAX_DOPT]; +@@ -2466,6 +3214,7 @@ + int squash_perms = 0; + uint16 endian = 1; + int bigendian = !*(char*)&endian; ++ char *volumelabel = NULL; + filesystem *fs; + int i; + int c; +@@ -2476,13 +3225,16 @@ + { "starting-image", required_argument, NULL, 'x' }, + { "root", required_argument, NULL, 'd' }, + { "devtable", required_argument, NULL, 'D' }, ++ { "block-size", required_argument, NULL, 'B' }, + { "size-in-blocks", required_argument, NULL, 'b' }, + { "bytes-per-inode", required_argument, NULL, 'i' }, + { "number-of-inodes", required_argument, NULL, 'N' }, ++ { "volume-label", required_argument, NULL, 'L' }, + { "reserved-percentage", required_argument, NULL, 'm' }, ++ { "creator-os", required_argument, NULL, 'o' }, + { "block-map", required_argument, NULL, 'g' }, + { "fill-value", required_argument, NULL, 'e' }, +- { "allow-holes", no_argument, NULL, 'z' }, ++ { "allow-holes", no_argument, NULL, 'z' }, + { "faketime", no_argument, NULL, 'f' }, + { "squash", no_argument, NULL, 'q' }, + { "squash-uids", no_argument, NULL, 'U' }, +@@ -2495,11 +3247,11 @@ + + app_name = argv[0]; + +- while((c = getopt_long(argc, argv, "x:d:D:b:i:N:m:g:e:zfqUPhVv", longopts, NULL)) != EOF) { ++ while((c = getopt_long(argc, argv, "x:d:D:B:b:i:N:L:m:o:g:e:zfqUPhVv", longopts, NULL)) != EOF) { + #else + app_name = argv[0]; + +- while((c = getopt(argc, argv, "x:d:D:b:i:N:m:g:e:zfqUPhVv")) != EOF) { ++ while((c = getopt(argc, argv, "x:d:D:B:b:i:N:L:m:o:g:e:zfqUPhVv")) != EOF) { + #endif /* HAVE_GETOPT_LONG */ + switch(c) + { +@@ -2510,6 +3262,9 @@ + case 'D': + dopt[didx++] = optarg; + break; ++ case 'B': ++ blocksize = SI_atof(optarg); ++ break; + case 'b': + nbblocks = SI_atof(optarg); + break; +@@ -2519,9 +3274,15 @@ + case 'N': + nbinodes = SI_atof(optarg); + break; ++ case 'L': ++ volumelabel = optarg; ++ break; + case 'm': + reserved_frac = SI_atof(optarg) / 100; + break; ++ case 'o': ++ creator_os = lookup_creator_os(optarg); ++ break; + case 'g': + gopt[gidx++] = optarg; + break; +@@ -2565,21 +3326,21 @@ + error_msg_and_die("Not enough arguments. Try --help or else see the man page."); + fsout = argv[optind]; + +- hdlinks.hdl = (struct hdlink_s *)malloc(hdlink_cnt * sizeof(struct hdlink_s)); +- if (!hdlinks.hdl) +- error_msg_and_die("Not enough memory"); +- hdlinks.count = 0 ; ++ if(blocksize != 1024 && blocksize != 2048 && blocksize != 4096) ++ error_msg_and_die("Valid block sizes: 1024, 2048 or 4096."); ++ if(creator_os < 0) ++ error_msg_and_die("Creator OS unknown."); + + if(fsin) + { + if(strcmp(fsin, "-")) + { + FILE * fh = xfopen(fsin, "rb"); +- fs = load_fs(fh, bigendian); ++ fs = load_fs(fh, bigendian, fsout); + fclose(fh); + } + else +- fs = load_fs(stdin, bigendian); ++ fs = load_fs(stdin, bigendian, fsout); + } + else + { +@@ -2609,16 +3370,29 @@ + } + if(fs_timestamp == -1) + fs_timestamp = time(NULL); +- fs = init_fs(nbblocks, nbinodes, nbresrvd, holes, fs_timestamp); ++ fs = init_fs(nbblocks, nbinodes, nbresrvd, holes, ++ fs_timestamp, creator_os, bigendian, fsout); + } ++ if (volumelabel != NULL) ++ strncpy((char *)fs->sb->s_volume_name, volumelabel, ++ sizeof(fs->sb->s_volume_name)); + + populate_fs(fs, dopt, didx, squash_uids, squash_perms, fs_timestamp, NULL); + + if(emptyval) { + uint32 b; +- for(b = 1; b < fs->sb.s_blocks_count; b++) +- if(!allocated(GRP_GET_BLOCK_BITMAP(fs,b),GRP_BBM_OFFSET(fs,b))) +- memset(get_blk(fs, b), emptyval, BLOCKSIZE); ++ for(b = 1; b < fs->sb->s_blocks_count; b++) { ++ blk_info *bi; ++ gd_info *gi; ++ if(!allocated(GRP_GET_BLOCK_BITMAP(fs,b,&bi,&gi), ++ GRP_BBM_OFFSET(fs,b))) { ++ blk_info *bi2; ++ memset(get_blk(fs, b, &bi2), emptyval, ++ BLOCKSIZE); ++ put_blk(bi2); ++ } ++ GRP_PUT_BLOCK_BITMAP(bi,gi); ++ } + } + if(verbose) + print_fs(fs); +@@ -2628,24 +3402,22 @@ + char fname[MAX_FILENAME]; + char *p; + FILE *fh; ++ nod_info *ni; + if(!(nod = find_path(fs, EXT2_ROOT_INO, gopt[i]))) + error_msg_and_die("path %s not found in filesystem", gopt[i]); + while((p = strchr(gopt[i], '/'))) + *p = '_'; + SNPRINTF(fname, MAX_FILENAME-1, "%s.blk", gopt[i]); + fh = xfopen(fname, "wb"); +- fprintf(fh, "%d:", get_nod(fs, nod)->i_size); ++ fprintf(fh, "%d:", get_nod(fs, nod, &ni)->i_size); ++ put_nod(ni); + flist_blocks(fs, nod, fh); + fclose(fh); + } +- if(strcmp(fsout, "-")) +- { +- FILE * fh = xfopen(fsout, "wb"); +- dump_fs(fs, fh, bigendian); +- fclose(fh); +- } +- else +- dump_fs(fs, stdout, bigendian); ++ finish_fs(fs); ++ if(strcmp(fsout, "-") == 0) ++ copy_file(fs, stdout, fs->f, fs->sb->s_blocks_count); ++ + free_fs(fs); + return 0; + } +Index: genext2fs-1.4.1/cache.h +=================================================================== +--- /dev/null ++++ genext2fs-1.4.1/cache.h +@@ -0,0 +1,128 @@ ++#ifndef __CACHE_H__ ++#define __CACHE_H__ ++ ++#include "list.h" ++ ++#define CACHE_LISTS 256 ++ ++typedef struct ++{ ++ list_elem link; ++ list_elem lru_link; ++} cache_link; ++ ++typedef struct ++{ ++ /* LRU list holds unused items */ ++ unsigned int lru_entries; ++ list_elem lru_list; ++ unsigned int max_free_entries; ++ ++ unsigned int entries; ++ list_elem lists[CACHE_LISTS]; ++ unsigned int (*elem_val)(cache_link *elem); ++ void (*freed)(cache_link *elem); ++} listcache; ++ ++static inline void ++cache_add(listcache *c, cache_link *elem) ++{ ++ unsigned int hash = c->elem_val(elem) % CACHE_LISTS; ++ int delcount = c->lru_entries - c->max_free_entries; ++ ++ if (delcount > 0) { ++ /* Delete some unused items. */ ++ list_elem *lru, *next; ++ cache_link *l; ++ list_for_each_elem_safe(&c->lru_list, lru, next) { ++ l = container_of(lru, cache_link, lru_link); ++ list_del(lru); ++ list_del(&l->link); ++ c->entries--; ++ c->lru_entries--; ++ c->freed(l); ++ delcount--; ++ if (delcount <= 0) ++ break; ++ } ++ } ++ ++ c->entries++; ++ list_item_init(&elem->lru_link); /* Mark it not in the LRU list */ ++ list_add_after(&c->lists[hash], &elem->link); ++} ++ ++static inline void ++cache_item_set_unused(listcache *c, cache_link *elem) ++{ ++ list_add_before(&c->lru_list, &elem->lru_link); ++ c->lru_entries++; ++} ++ ++static inline cache_link * ++cache_find(listcache *c, unsigned int val) ++{ ++ unsigned int hash = val % CACHE_LISTS; ++ list_elem *elem; ++ ++ list_for_each_elem(&c->lists[hash], elem) { ++ cache_link *l = container_of(elem, cache_link, link); ++ if (c->elem_val(l) == val) { ++ if (!list_empty(&l->lru_link)) { ++ /* It's in the unused list, remove it. */ ++ list_del(&l->lru_link); ++ list_item_init(&l->lru_link); ++ c->lru_entries--; ++ } ++ return l; ++ } ++ } ++ return NULL; ++} ++ ++static inline int ++cache_flush(listcache *c) ++{ ++ list_elem *elem, *next; ++ cache_link *l; ++ int i; ++ ++ list_for_each_elem_safe(&c->lru_list, elem, next) { ++ l = container_of(elem, cache_link, lru_link); ++ list_del(elem); ++ list_del(&l->link); ++ c->entries--; ++ c->lru_entries--; ++ c->freed(l); ++ } ++ ++ for (i = 0; i < CACHE_LISTS; i++) { ++ list_for_each_elem_safe(&c->lists[i], elem, next) { ++ l = container_of(elem, cache_link, link); ++ list_del(&l->link); ++ c->entries--; ++ c->freed(l); ++ } ++ } ++ ++ return c->entries || c->lru_entries; ++} ++ ++static inline void ++cache_init(listcache *c, unsigned int max_free_entries, ++ unsigned int (*elem_val)(cache_link *elem), ++ void (*freed)(cache_link *elem)) ++{ ++ int i; ++ ++ c->entries = 0; ++ c->lru_entries = 0; ++ c->max_free_entries = max_free_entries; ++ list_init(&c->lru_list); ++ for (i = 0; i < CACHE_LISTS; i++) ++ list_init(&c->lists[i]); ++ c->elem_val = elem_val; ++ c->freed = freed; ++} ++ ++#endif /* __CACHE_H__ */ +Index: genext2fs-1.4.1/list.h +=================================================================== +--- /dev/null ++++ genext2fs-1.4.1/list.h +@@ -0,0 +1,78 @@ ++#ifndef __LIST_H__ ++#define __LIST_H__ ++ ++#if STDC_HEADERS ++# include ++# include ++#else ++# if HAVE_STDLIB_H ++# include ++# endif ++# if HAVE_STDDEF_H ++# include ++# endif ++#endif ++ ++#ifndef offsetof ++#define offsetof(st, m) \ ++ ((size_t) ( (char *)&((st *)(0))->m - (char *)0 )) ++#endif ++ ++#define container_of(ptr, type, member) ({ \ ++ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ ++ (type *)( (char *)__mptr - offsetof(type,member) );}) ++ ++typedef struct list_elem ++{ ++ struct list_elem *next; ++ struct list_elem *prev; ++} list_elem; ++ ++static inline void list_init(list_elem *list) ++{ ++ list->next = list; ++ list->prev = list; ++} ++ ++static inline void list_add_after(list_elem *pos, list_elem *elem) ++{ ++ elem->next = pos->next; ++ elem->prev = pos; ++ pos->next->prev = elem; ++ pos->next = elem; ++} ++ ++static inline void list_add_before(list_elem *pos, list_elem *elem) ++{ ++ elem->prev = pos->prev; ++ elem->next = pos; ++ pos->prev->next = elem; ++ pos->prev = elem; ++} ++ ++static inline void list_del(list_elem *elem) ++{ ++ elem->next->prev = elem->prev; ++ elem->prev->next = elem->next; ++} ++ ++static inline void list_item_init(list_elem *elem) ++{ ++ elem->next = elem; ++ elem->prev = elem; ++} ++ ++static inline int list_empty(list_elem *elem) ++{ ++ return elem->next == elem; ++} ++ ++#define list_for_each_elem(list, curr) \ ++ for ((curr) = (list)->next; (curr) != (list); (curr) = (curr)->next) ++ ++#define list_for_each_elem_safe(list, curr, next) \ ++ for ((curr) = (list)->next, (next) = (curr)->next; \ ++ (curr) != (list); \ ++ (curr) = (next), (next) = (curr)->next) ++ ++#endif /* __LIST_H__ */ diff --git a/package/genext2fs/Config.in b/package/genext2fs/Config.in new file mode 100644 index 0000000000..2251684d1d --- /dev/null +++ b/package/genext2fs/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_GENEXT2FS + bool "genext2fs" + help + genext2fs generates an ext2 filesystem as a normal (non-root) + user. It does not require you to mount the image file to + copy files on it, nor does it require that you become the + superuser to make device nodes. + + http://genext2fs.sourceforge.net/ diff --git a/package/genext2fs/Config.in.host b/package/genext2fs/Config.in.host new file mode 100644 index 0000000000..a03e16b2e2 --- /dev/null +++ b/package/genext2fs/Config.in.host @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_GENEXT2FS + bool "host genext2fs" + help + genext2fs generates an ext2 filesystem as a normal (non-root) + user. It does not require you to mount the image file to + copy files on it, nor does it require that you become the + superuser to make device nodes. + + http://genext2fs.sourceforge.net/ diff --git a/package/genext2fs/genext2fs.hash b/package/genext2fs/genext2fs.hash new file mode 100644 index 0000000000..46b8af352d --- /dev/null +++ b/package/genext2fs/genext2fs.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 404dbbfa7a86a6c3de8225c8da254d026b17fd288e05cec4df2cc7e1f4feecfc genext2fs-1.4.1.tar.gz diff --git a/package/genext2fs/genext2fs.mk b/package/genext2fs/genext2fs.mk new file mode 100644 index 0000000000..528912e9d7 --- /dev/null +++ b/package/genext2fs/genext2fs.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# genext2fs +# +################################################################################ + +GENEXT2FS_VERSION = 1.4.1 +GENEXT2FS_SITE = http://downloads.sourceforge.net/project/genext2fs/genext2fs/$(GENEXT2FS_VERSION) +GENEXT2FS_LICENSE = GPLv2 +GENEXT2FS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gengetopt/gengetopt.hash b/package/gengetopt/gengetopt.hash new file mode 100644 index 0000000000..4f411ac8b3 --- /dev/null +++ b/package/gengetopt/gengetopt.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 30b05a88604d71ef2a42a2ef26cd26df242b41f5b011ad03083143a31d9b01f7 gengetopt-2.22.6.tar.gz diff --git a/package/gengetopt/gengetopt.mk b/package/gengetopt/gengetopt.mk new file mode 100644 index 0000000000..b7cbc7f68a --- /dev/null +++ b/package/gengetopt/gengetopt.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# gengetopt +# +################################################################################ + +GENGETOPT_VERSION = 2.22.6 +GENGETOPT_SITE = $(BR2_GNU_MIRROR)/gengetopt +GENGETOPT_LICENSE = GPLv3+ +GENGETOPT_LICENSE_FILES = COPYING LICENSE + +# Parallel build broken +GENGETOPT_MAKE = $(MAKE1) + +$(eval $(host-autotools-package)) diff --git a/package/genimage/Config.in.host b/package/genimage/Config.in.host new file mode 100644 index 0000000000..acf777c8bf --- /dev/null +++ b/package/genimage/Config.in.host @@ -0,0 +1,13 @@ +config BR2_PACKAGE_HOST_GENIMAGE + bool "host genimage" + help + genimage is a tool to generate multiple filesystem and flash + images from a given root filesystem tree. genimage is + intended to be run in a fakeroot environment. + + Configuration is done is a config file parsed by + libconfuse. Options like the path to tools can be given in + environment variables, the config file or commandline + switches. + + http://www.pengutronix.de/software/genimage/ diff --git a/package/genimage/genimage.hash b/package/genimage/genimage.hash new file mode 100644 index 0000000000..b01ea46028 --- /dev/null +++ b/package/genimage/genimage.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 363b2222b8036eca927c464994e7a877539adc3ea9ba895c1e2186f0589fafbf genimage-8.tar.xz diff --git a/package/genimage/genimage.mk b/package/genimage/genimage.mk new file mode 100644 index 0000000000..2dffbc55cf --- /dev/null +++ b/package/genimage/genimage.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# genimage +# +################################################################################ + +GENIMAGE_VERSION = 8 +GENIMAGE_SOURCE = genimage-$(GENIMAGE_VERSION).tar.xz +GENIMAGE_SITE = http://www.pengutronix.de/software/genimage/download +GENIMAGE_DEPENDENCIES = host-pkgconf libconfuse +GENIMAGE_LICENSE = GPLv2 + +$(eval $(host-autotools-package)) diff --git a/package/genpart/0001-fix-return-code.patch b/package/genpart/0001-fix-return-code.patch new file mode 100644 index 0000000000..ec18c82f8c --- /dev/null +++ b/package/genpart/0001-fix-return-code.patch @@ -0,0 +1,25 @@ +genpart: return 0 if partition writen OK, with no do_magic + +If do_magic is false, we don't won't write the 0xaa55 magic. +However, if we succesfully wrote the partition entry, we still +want to return 0 to indicate success. + +Signed-off-by: "Yann E. MORIN" +Cc: Robert Schwebel + +-- +Patch sent upstream, but no mailing list. +Status: accepted upstream, not yet released. + +diff -durN host-genpart-1.0.2.orig/src/genpart.c host-genpart-1.0.2/src/genpart.c +--- host-genpart-1.0.2.orig/src/genpart.c 2009-12-20 21:54:56.000000000 +0100 ++++ host-genpart-1.0.2/src/genpart.c 2013-01-22 23:13:24.109752579 +0100 +@@ -92,6 +92,8 @@ + if (do_magic) { + if (fwrite(&magic, 2, 1, stdout) > 0) + rc=0; ++ } else { ++ rc=0; + } + } + return rc; diff --git a/package/genpart/Config.in b/package/genpart/Config.in new file mode 100644 index 0000000000..8d9ec795c9 --- /dev/null +++ b/package/genpart/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_GENPART + bool "genpart" + help + Generate a 16 byte partition table entry defined by command line + arguments and dump it to stdout. No CHS magic is done, only lba + entries are filled out. + + http://www.pengutronix.de/software/genpart/index_en.html diff --git a/package/genpart/Config.in.host b/package/genpart/Config.in.host new file mode 100644 index 0000000000..6cc2a59a70 --- /dev/null +++ b/package/genpart/Config.in.host @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_GENPART + bool "host genpart" + help + Generate a 16 byte partition table entry defined by command line + arguments and dump it to stdout. No CHS magic is done, only lba + entries are filled out. + + http://www.pengutronix.de/software/genpart/index_en.html diff --git a/package/genpart/genpart.hash b/package/genpart/genpart.hash new file mode 100644 index 0000000000..b741dbda14 --- /dev/null +++ b/package/genpart/genpart.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 bfb39434f31d10f1b8c7b6bc6ec612309838c2819022561541c4d2d5a424e3f2 genpart-1.0.2.tar.bz2 diff --git a/package/genpart/genpart.mk b/package/genpart/genpart.mk new file mode 100644 index 0000000000..2aa2c710c0 --- /dev/null +++ b/package/genpart/genpart.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# genpart +# +################################################################################ + +GENPART_VERSION = 1.0.2 +GENPART_SOURCE = genpart-$(GENPART_VERSION).tar.bz2 +GENPART_SITE = http://www.pengutronix.de/software/genpart/download +# genpart has no license embedded in its source release. +# However, their project page mentions: +# > This community portal offers an overview about our own OSS +# > projects and projects Pengutronix is or was involved with. +# We can thus assume genpart is under a FLOSS license. +# So, until the authors have clarified the licensing terms: +GENPART_LICENSE = Unknown (clarification has been asked to the authors) + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/genromfs/0001-build-system.patch b/package/genromfs/0001-build-system.patch new file mode 100644 index 0000000000..827fe75bd2 --- /dev/null +++ b/package/genromfs/0001-build-system.patch @@ -0,0 +1,26 @@ +--- + Makefile | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +Index: genromfs-0.5.2/Makefile +=================================================================== +--- genromfs-0.5.2.orig/Makefile ++++ genromfs-0.5.2/Makefile +@@ -6,8 +6,6 @@ + PACKAGE = genromfs + VERSION = 0.5.2 + CC = gcc +-CFLAGS = -O2 -Wall -DVERSION=\"$(VERSION)\"#-g# +-LDFLAGS = -s#-g + + DISTDIR = $(PACKAGE)-$(VERSION) + +@@ -24,7 +22,7 @@ + $(CC) $(LDFLAGS) genromfs.o -o genromfs + + .c.o: +- $(CC) $(CFLAGS) $< -c -o $@ ++ $(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" $< -c -o $@ + + clean: + rm -f genromfs *.o diff --git a/package/genromfs/Config.in b/package/genromfs/Config.in new file mode 100644 index 0000000000..e4eba9f16a --- /dev/null +++ b/package/genromfs/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_GENROMFS + bool "genromfs" + help + Tool to generate a ROMFS filesystem. + + http://romfs.sourceforge.net/ diff --git a/package/genromfs/genromfs.hash b/package/genromfs/genromfs.hash new file mode 100644 index 0000000000..477e5d2dcb --- /dev/null +++ b/package/genromfs/genromfs.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 30f37fc734572c1dbaa2504585bc23ba6b8fd7df767ae7155995b2ca0ebed960 genromfs-0.5.2.tar.gz diff --git a/package/genromfs/genromfs.mk b/package/genromfs/genromfs.mk new file mode 100644 index 0000000000..8db0899812 --- /dev/null +++ b/package/genromfs/genromfs.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# genromfs +# +################################################################################ + +GENROMFS_VERSION = 0.5.2 +GENROMFS_SITE = http://downloads.sourceforge.net/project/romfs/genromfs/$(GENROMFS_VERSION) +GENROMFS_LICENSE = GPLv2+ +GENROMFS_LICENSE_FILES = COPYING + +define GENROMFS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef + +define GENROMFS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) PREFIX=$(TARGET_DIR) install +endef + +define HOST_GENROMFS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define HOST_GENROMFS_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) PREFIX=$(HOST_DIR) install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/geoip/Config.in b/package/geoip/Config.in new file mode 100644 index 0000000000..739a8da0f6 --- /dev/null +++ b/package/geoip/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_GEOIP + bool "geoip" + help + GeoIP is a C library that enables the user to find + geographical and network information of an IP address. + + To use this library, you need to download MaxMind's free + GeoLite or commercial GeoIP binary databases into the + target's /usr/share/GeoIP directory in uncompressed form. + + Note that GeoIP2 / GeoLite2 are not supported by this + library. + + https://github.com/maxmind/geoip-api-c diff --git a/package/geoip/geoip.hash b/package/geoip/geoip.hash new file mode 100644 index 0000000000..505c38f941 --- /dev/null +++ b/package/geoip/geoip.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 4b446491843de67c1af9b887da17a3e5939e0aeed4826923a5f4bf09d845096f GeoIP-1.6.9.tar.gz diff --git a/package/geoip/geoip.mk b/package/geoip/geoip.mk new file mode 100644 index 0000000000..cf3bc1a042 --- /dev/null +++ b/package/geoip/geoip.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# geoip +# +################################################################################ + +GEOIP_VERSION = 1.6.9 +GEOIP_SOURCE = GeoIP-$(GEOIP_VERSION).tar.gz +GEOIP_SITE = https://github.com/maxmind/geoip-api-c/releases/download/v$(GEOIP_VERSION) +GEOIP_INSTALL_STAGING = YES +GEOIP_LICENSE = LGPLv2.1+ +GEOIP_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/gesftpserver/Config.in b/package/gesftpserver/Config.in new file mode 100644 index 0000000000..81cbce9f33 --- /dev/null +++ b/package/gesftpserver/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_GESFTPSERVER + bool "gesftpserver" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Green End SFTP Server + + This is an SFTP server supporting up to protocol version 6. + It is possible to use it as a drop-in replacement for the + OpenSSH server, or to provide sftp support for Dropbear. + + http://www.greenend.org.uk/rjk/sftpserver/ + +comment "gesftpserver needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gesftpserver/gesftpserver.hash b/package/gesftpserver/gesftpserver.hash new file mode 100644 index 0000000000..b4c9fdf52c --- /dev/null +++ b/package/gesftpserver/gesftpserver.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 5f744c38df9bb82f5ab500858a0fb4767ac3ee2254301da03cbcf8e6c587cbf5 sftpserver-0.2.1.tar.gz diff --git a/package/gesftpserver/gesftpserver.mk b/package/gesftpserver/gesftpserver.mk new file mode 100644 index 0000000000..25c947a78b --- /dev/null +++ b/package/gesftpserver/gesftpserver.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# gesftpserver +# +################################################################################ + +GESFTPSERVER_VERSION = 0.2.1 +GESFTPSERVER_SOURCE = sftpserver-$(GESFTPSERVER_VERSION).tar.gz +GESFTPSERVER_SITE = http://www.greenend.org.uk/rjk/sftpserver +GESFTPSERVER_LICENSE = GPLv2+ +GESFTPSERVER_LICENSE_FILES = COPYING +# forgets to link against pthread when cross compiling +GESFTPSERVER_CONF_ENV = LIBS=-lpthread + +# overwrite openssh version if enabled +GESFTPSERVER_DEPENDENCIES += \ + $(if $(BR2_ENABLE_LOCALE),,libiconv) \ + $(if $(BR2_PACKAGE_OPENSSH),openssh) + +# openssh/dropbear looks here +define GESFTPSERVER_ADD_SYMLINK + ln -sf gesftpserver $(TARGET_DIR)/usr/libexec/sftp-server +endef + +GESFTPSERVER_POST_INSTALL_TARGET_HOOKS += GESFTPSERVER_ADD_SYMLINK + +$(eval $(autotools-package)) diff --git a/package/getent/Config.in b/package/getent/Config.in new file mode 100644 index 0000000000..a7303cb969 --- /dev/null +++ b/package/getent/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_GETENT + bool "getent" + help + This package installs the 'getent' utility, which allows to + get entries from Name Service Switch libraries. For glibc + toolchains, it's the real getent program from the C library + that gets installed, which is NSS-capable. For uclibc and + musl toolchains, it's a simple wrapper script that emulates + getent's behavior, since there is no NSS support in uclibc + and musl. diff --git a/package/getent/getent b/package/getent/getent new file mode 100644 index 0000000000..fdda79363a --- /dev/null +++ b/package/getent/getent @@ -0,0 +1,45 @@ +#!/bin/sh +# $Header: /var/cvs/uClibc/extra/scripts/getent,v 1.2 2005/02/02 14:18:01 solar Exp $ +# +# Closely (not perfectly) emulate the behavior of glibc's getent utility +# +#passwd|shadow|group|aliases|hosts|networks|ethers|netgroup|protocols|services|rpc +# only returns the first match (by design) +# dns based search is not supported (hosts,networks) +# case-insensitive matches not supported (ethers; others?) +# may return false-positives (hosts,protocols,rpc,services,ethers) +# +# Taken from uClibc 0.9.33. + +export PATH="${PATH}:/bin:/usr/bin" + +file="/etc/$1" +case $1 in + passwd|group) + match="^$2:\|^[^:]*:[^:]*:$2:" ;; + shadow) + match="^$2:" ;; + networks|netgroup) + match="^[[:space:]]*$2\>" ;; + hosts|protocols|rpc|services|ethers) + match="\<$2\>" ;; + aliases) + match="^[[:space:]]*$2[[:space:]]*:" ;; + ""|-h|--help) + echo "USAGE: $0 database [key]" + exit 0 ;; + *) + echo "$0: Unknown database: $1" 1>&2 + exit 1 ;; +esac + +if [ ! -f "$file" ] ; then + echo "$0: Could not find database file for $1" 1>&2 + exit 1 +fi + +if [ $# -eq 1 ] ; then + exec cat "$file" +else + sed "s/#.*//; /$match/q; d" "$file" | grep . || exit 2 +fi diff --git a/package/getent/getent.mk b/package/getent/getent.mk new file mode 100644 index 0000000000..18f09912a7 --- /dev/null +++ b/package/getent/getent.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# getent +# +################################################################################ + +# source included in Buildroot +GETENT_SOURCE = + +GETENT_VERSION = buildroot-$(BR2_VERSION) +GETENT_LICENSE = LGPLv2.1+ + +# For glibc toolchains, we use the getent program built/installed by +# the C library. For other toolchains, we use the wrapper script +# included in this package. +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y) +# Sourcery toolchains install it in sysroot/usr/lib/bin +# Buildroot toolchains install it in sysroot/usr/bin +GETENT_LOCATION = $(firstword $(wildcard \ + $(STAGING_DIR)/usr/bin/getent \ + $(STAGING_DIR)/usr/lib/bin/getent)) +else +GETENT_LOCATION = package/getent/getent +endif + +define GETENT_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(GETENT_LOCATION) $(TARGET_DIR)/usr/bin/getent +endef + +$(eval $(generic-package)) diff --git a/package/gettext/0001-error_print_progname.patch b/package/gettext/0001-error_print_progname.patch new file mode 100644 index 0000000000..189d28b576 --- /dev/null +++ b/package/gettext/0001-error_print_progname.patch @@ -0,0 +1,14 @@ +--- gettext-0.16.1.oorig/gettext-tools/gnulib-lib/error.h 2006-11-27 18:14:50.000000000 +0100 ++++ gettext-0.16.1/gettext-tools/gnulib-lib/error.h 2007-06-20 13:29:32.000000000 +0200 +@@ -50,7 +50,10 @@ extern void error_at_line (int __status, + /* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this + function without parameters instead. */ +-extern DLL_VARIABLE void (*error_print_progname) (void); ++#ifndef __UCLIBC__ ++extern DLL_VARIABLE ++#endif ++void (*error_print_progname) (void); + + /* This variable is incremented each time `error' is called. */ + extern DLL_VARIABLE unsigned int error_message_count; diff --git a/package/gettext/Config.in b/package/gettext/Config.in new file mode 100644 index 0000000000..7871a480a8 --- /dev/null +++ b/package/gettext/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_GETTEXT + bool "gettext" + depends on BR2_USE_WCHAR + help + The GNU `gettext' utilities are a set of tools that provide a + framework to help other GNU packages produce multi-lingual + messages. + + Only the libintl library will be installed in the + target. The full gettext suite, including tools, will be + installed in the staging directory. + + http://www.gnu.org/software/gettext/ + +comment "gettext needs a toolchain w/ wchar" + depends on BR2_NEEDS_GETTEXT + depends on !BR2_USE_WCHAR diff --git a/package/gettext/gettext.hash b/package/gettext/gettext.hash new file mode 100644 index 0000000000..3236fda702 --- /dev/null +++ b/package/gettext/gettext.hash @@ -0,0 +1,3 @@ +# From http://lists.gnu.org/archive/html/bug-gettext/2015-12/msg00019.html +md5 f81e50556da41b44c1d59ac93474dca5 gettext-0.19.7.tar.xz +sha1 4b2574b76d14c98270bf607a2a62f033524d8e8c gettext-0.19.7.tar.xz diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk new file mode 100644 index 0000000000..0b4e5dde94 --- /dev/null +++ b/package/gettext/gettext.mk @@ -0,0 +1,87 @@ +################################################################################ +# +# gettext +# +################################################################################ + +GETTEXT_VERSION = 0.19.7 +GETTEXT_SITE = $(BR2_GNU_MIRROR)/gettext +GETTEXT_SOURCE = gettext-$(GETTEXT_VERSION).tar.xz +GETTEXT_INSTALL_STAGING = YES +GETTEXT_LICENSE = LGPLv2.1+ (libintl), GPLv3+ (the rest) +GETTEXT_LICENSE_FILES = COPYING gettext-runtime/intl/COPYING.LIB + +GETTEXT_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +# Avoid using the bundled subset of libxml2 +HOST_GETTEXT_DEPENDENCIES = host-libxml2 + +GETTEXT_CONF_OPTS += \ + --disable-libasprintf \ + --disable-acl \ + --disable-openmp \ + --disable-rpath \ + --disable-java \ + --disable-native-java \ + --disable-csharp \ + --disable-relocatable \ + --without-emacs + +HOST_GETTEXT_CONF_OPTS = \ + --disable-libasprintf \ + --disable-acl \ + --disable-openmp \ + --disable-rpath \ + --disable-java \ + --disable-native-java \ + --disable-csharp \ + --disable-relocatable \ + --without-emacs + +# For the target version, we only need the runtime, and for the host +# version, we only need the tools. +GETTEXT_SUBDIR = gettext-runtime +HOST_GETTEXT_SUBDIR = gettext-tools + +# Disable the build of documentation and examples of gettext-tools, +# and the build of documentation and tests of gettext-runtime. +define HOST_GETTEXT_DISABLE_UNNEEDED + $(SED) '/^SUBDIRS/s/ doc //;/^SUBDIRS/s/examples$$//' $(@D)/gettext-tools/Makefile.in + $(SED) '/^SUBDIRS/s/ doc //;/^SUBDIRS/s/tests$$//' $(@D)/gettext-runtime/Makefile.in +endef + +GETTEXT_POST_PATCH_HOOKS += HOST_GETTEXT_DISABLE_UNNEEDED +HOST_GETTEXT_POST_PATCH_HOOKS += HOST_GETTEXT_DISABLE_UNNEEDED + +define GETTEXT_REMOVE_UNNEEDED + $(RM) -rf $(TARGET_DIR)/usr/share/gettext/ABOUT-NLS + rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share/gettext +endef + +GETTEXT_POST_INSTALL_TARGET_HOOKS += GETTEXT_REMOVE_UNNEEDED + +define GETTEXT_GETTEXTIZE_EYE_CANDY + $(SED) '/Press Return\|read dummy/d' $(HOST_DIR)/usr/bin/gettextize +endef + +HOST_GETTEXT_POST_INSTALL_HOOKS += GETTEXT_GETTEXTIZE_EYE_CANDY + +# Force build with NLS support, otherwise libintl is not built +# This is needed because some packages (eg. libglib2) requires +# locales, but do not properly depend on BR2_ENABLE_LOCALE, and +# instead select BR2_PACKAGE_GETTEXT. Those packages need to be +# fixed before we can remove the following 3 lines... :-( +ifeq ($(BR2_ENABLE_LOCALE),) +GETTEXT_CONF_OPTS += --enable-nls +endif + +# Disable interactive confirmation in host gettextize for package fixups +define HOST_GETTEXT_GETTEXTIZE_CONFIRMATION + $(SED) '/read dummy/d' $(HOST_DIR)/usr/bin/gettextize +endef +HOST_GETTEXT_POST_INSTALL_HOOKS += HOST_GETTEXT_GETTEXTIZE_CONFIRMATION + +GETTEXTIZE = $(HOST_CONFIGURE_OPTS) AUTOM4TE=$(HOST_DIR)/usr/bin/autom4te $(HOST_DIR)/usr/bin/gettextize -f + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gflags/Config.in b/package/gflags/Config.in new file mode 100644 index 0000000000..ed059445ba --- /dev/null +++ b/package/gflags/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_GFLAGS + bool "gflags" + depends on BR2_INSTALL_LIBSTDCPP + help + The gflags package contains a C++ library that implements + commandline flags processing. It includes built-in support for + standard types such as string and the ability to define flags + in the source file in which they are used. + + https://github.com/gflags/gflags + +comment "gflags needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/gflags/gflags.hash b/package/gflags/gflags.hash new file mode 100644 index 0000000000..9c8b27a4b5 --- /dev/null +++ b/package/gflags/gflags.hash @@ -0,0 +1,2 @@ +# No hash for v2.1.2, comes from the github-helper: +none xxx gflags-v2.1.2.tar.gz diff --git a/package/gflags/gflags.mk b/package/gflags/gflags.mk new file mode 100644 index 0000000000..9dc4e15b6f --- /dev/null +++ b/package/gflags/gflags.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# gflags +# +################################################################################ + +GFLAGS_VERSION = v2.1.2 +GFLAGS_SITE = $(call github,gflags,gflags,$(GFLAGS_VERSION)) +GFLAGS_INSTALL_STAGING = YES +GFLAGS_LICENSE = BSD-3c +GFLAGS_LICENSE_FILES = COPYING.txt + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +GFLAGS_CONF_OPTS = -DBUILD_gflags_LIB=OFF -DCMAKE_CXX_FLAGS=-DNO_THREADS +endif + +$(eval $(cmake-package)) diff --git a/package/ghostscript-fonts/Config.in b/package/ghostscript-fonts/Config.in new file mode 100644 index 0000000000..80bfbd03ef --- /dev/null +++ b/package/ghostscript-fonts/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_GHOSTSCRIPT_FONTS + bool "ghostscript-fonts" + help + Fonts and font metrics customarily distributed with Ghostscript. + Currently includes the 35 standard PostScript fonts and a + grab-bag of others. + + http://sourceforge.net/projects/gs-fonts diff --git a/package/ghostscript-fonts/ghostscript-fonts.hash b/package/ghostscript-fonts/ghostscript-fonts.hash new file mode 100644 index 0000000000..e9c7fdf999 --- /dev/null +++ b/package/ghostscript-fonts/ghostscript-fonts.hash @@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/gs-fonts/files/gs-fonts/8.11%20%28base%2035%2C%20GPL%29/ +sha1 2a7198e8178b2e7dba87cb5794da515200b568f5 ghostscript-fonts-std-8.11.tar.gz diff --git a/package/ghostscript-fonts/ghostscript-fonts.mk b/package/ghostscript-fonts/ghostscript-fonts.mk new file mode 100644 index 0000000000..fa5c4b7e97 --- /dev/null +++ b/package/ghostscript-fonts/ghostscript-fonts.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# ghostscript-fonts +# +################################################################################ + +GHOSTSCRIPT_FONTS_VERSION = 8.11 +GHOSTSCRIPT_FONTS_SITE = http://downloads.sourceforge.net/project/gs-fonts/gs-fonts/8.11%20%28base%2035%2C%20GPL%29 +GHOSTSCRIPT_FONTS_SOURCE = ghostscript-fonts-std-$(GHOSTSCRIPT_FONTS_VERSION).tar.gz +GHOSTSCRIPT_FONTS_LICENSE = GPLv2 +GHOSTSCRIPT_FONTS_LICENSE_FILES = COPYING + +GHOSTSCRIPT_FONTS_TARGET_DIR = $(TARGET_DIR)/usr/share/fonts/gs + +define GHOSTSCRIPT_FONTS_INSTALL_TARGET_CMDS + mkdir -p $(GHOSTSCRIPT_FONTS_TARGET_DIR) + $(INSTALL) -m 644 $(@D)/*.afm $(GHOSTSCRIPT_FONTS_TARGET_DIR) + $(INSTALL) -m 644 $(@D)/*.pfb $(GHOSTSCRIPT_FONTS_TARGET_DIR) +endef + +$(eval $(generic-package)) diff --git a/package/giblib/0001-fix-imlib2-detection.patch b/package/giblib/0001-fix-imlib2-detection.patch new file mode 100644 index 0000000000..2323107941 --- /dev/null +++ b/package/giblib/0001-fix-imlib2-detection.patch @@ -0,0 +1,127 @@ +configure.ac + Makefile.am: fix the imlib2 detection + +Although imlib2 is correctly checked for, the variables used to get +the CFLAGS and LIBS are wrong (perhaps a remnant of the pre-imlib2 +era, when giblib was using imlib). + +Signed-off-by: "Yann E. MORIN" + +diff --git a/configure.ac b/configure.ac +index 6807d86..c8874f0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -18,16 +18,10 @@ AM_MAINTAINER_MODE + AM_WITH_DMALLOC + + AC_PATH_GENERIC(imlib2, 1.0.0, [ +- AC_SUBST(IMLIB_LIBS) +- AC_SUBST(IMLIB_CFLAGS) ], ++ AC_SUBST(IMLIB2_LIBS) ++ AC_SUBST(IMLIB2_CFLAGS) ], + AC_MSG_ERROR(Cannot find imlib2: Is imlib2-config in the path?) ) + +-dnl the above doesn't work for some reason :/ +-IMLIB_LIBS=`imlib2-config --libs` +-IMLIB_CFLAGS=`imlib2-config --cflags` +-AC_SUBST(IMLIB_LIBS) +-AC_SUBST(IMLIB_CFLAGS) +- + LIBS="$LIBS -lm" + CFLAGS="$CFLAGS -Wall" + +@@ -48,7 +42,7 @@ $PACKAGE $VERSION + Configuration: + -------------- + +-Imlib2 libs: $IMLIB_LIBS +-Imlib2 cflags: $IMLIB_CFLAGS ++Imlib2 libs: $IMLIB2_LIBS ++Imlib2 cflags: $IMLIB2_CFLAGS + CFLAGS: $CFLAGS + " +diff --git a/configure.in b/configure.in +index 432cb16..6999095 100644 +--- a/configure.in ++++ b/configure.in +@@ -17,16 +17,10 @@ AM_MAINTAINER_MODE + AM_WITH_DMALLOC + + AC_PATH_GENERIC(imlib2, 1.0.0, [ +- AC_SUBST(IMLIB_LIBS) +- AC_SUBST(IMLIB_CFLAGS) ], ++ AC_SUBST(IMLIB2_LIBS) ++ AC_SUBST(IMLIB2_CFLAGS) ], + AC_MSG_ERROR(Cannot find imlib2: Is imlib2-config in the path?) ) + +-dnl the above doesn't work for some reason :/ +-IMLIB_LIBS=`imlib2-config --libs` +-IMLIB_CFLAGS=`imlib2-config --cflags` +-AC_SUBST(IMLIB_LIBS) +-AC_SUBST(IMLIB_CFLAGS) +- + LIBS="$LIBS -lm" + CFLAGS="$CFLAGS -Wall" + +@@ -45,7 +39,7 @@ $PACKAGE $VERSION + Configuration: + -------------- + +-Imlib2 libs: $IMLIB_LIBS +-Imlib2 cflags: $IMLIB_CFLAGS ++Imlib2 libs: $IMLIB2_LIBS ++Imlib2 cflags: $IMLIB2_CFLAGS + CFLAGS: $CFLAGS + " +diff --git a/giblib-config.in b/giblib-config.in +index f3a7db6..cef1620 100644 +--- a/giblib-config.in ++++ b/giblib-config.in +@@ -42,11 +42,11 @@ while test $# -gt 0; do + if test @includedir@ != /usr/include ; then + includes=-I@includedir@ + fi +- echo $includes -I$prefix/include/giblib @IMLIB_CFLAGS@ ++ echo $includes -I$prefix/include/giblib @IMLIB2_CFLAGS@ + ;; + --libs) + libdirs=-L@libdir@ +- echo $libdirs -lgiblib @LDFLAGS@ @IMLIB_LIBS@ ++ echo $libdirs -lgiblib @LDFLAGS@ @IMLIB2_LIBS@ + ;; + *) + echo "${usage}" 1>&2 +diff --git a/giblib.pc.in b/giblib.pc.in +index df520ae..783e6e1 100644 +--- a/giblib.pc.in ++++ b/giblib.pc.in +@@ -6,6 +6,6 @@ includedir=@includedir@ + Name: giblib + Description: wrapper library for imlib2, and other stuff + Version: @VERSION@ +-Libs: -L${libdir} -lgiblib @LDFLAGS@ @IMLIB_LIBS@ +-Cflags: -I${includedir} -I${includedir}/giblib @IMLIB_CFLAGS@ ++Libs: -L${libdir} -lgiblib @LDFLAGS@ @IMLIB2_LIBS@ ++Cflags: -I${includedir} -I${includedir}/giblib @IMLIB2_CFLAGS@ + +diff --git a/giblib/Makefile.am b/giblib/Makefile.am +index d1edc09..49d8ac4 100644 +--- a/giblib/Makefile.am ++++ b/giblib/Makefile.am +@@ -3,7 +3,7 @@ MAINTAINERCLEANFILES = Makefile.in + + INCLUDES = \ + -I. -I$(top_srcdir) \ +--DPREFIX=\""$(prefix)"\" @IMLIB_CFLAGS@ ++-DPREFIX=\""$(prefix)"\" @IMLIB2_CFLAGS@ + + lib_LTLIBRARIES = libgiblib.la + +@@ -24,7 +24,7 @@ libgiblib_la_SOURCES = \ + gib_utils.c gib_utils.h \ + gib_queue.c gib_queue.h + +-libgiblib_la_LIBADD = @IMLIB_LIBS@ ++libgiblib_la_LIBADD = @IMLIB2_LIBS@ + libgiblib_la_DEPENDENCIES = giblib_config.h + libgiblib_la_LDFLAGS = -version-info 1:6:0 + diff --git a/package/giblib/Config.in b/package/giblib/Config.in new file mode 100644 index 0000000000..f50271ac53 --- /dev/null +++ b/package/giblib/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_GIBLIB + bool "giblib" + depends on BR2_PACKAGE_XORG7 + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_IMLIB2 + select BR2_PACKAGE_IMLIB2_X + help + Giblib is a simple library which wraps imlib2. + + http://linuxbrit.co.uk/giblib/ + +comment "giblib support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/giblib/giblib.hash b/package/giblib/giblib.hash new file mode 100644 index 0000000000..942aee705b --- /dev/null +++ b/package/giblib/giblib.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 176611c4d88d742ea4013991ad54c2f9d2feefbc97a28434c0f48922ebaa8bac giblib-1.2.4.tar.gz diff --git a/package/giblib/giblib.mk b/package/giblib/giblib.mk new file mode 100644 index 0000000000..b0a962001d --- /dev/null +++ b/package/giblib/giblib.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# giblib +# +################################################################################ + +GIBLIB_VERSION = 1.2.4 +GIBLIB_SITE = http://linuxbrit.co.uk/downloads +GIBLIB_INSTALL_STAGING = YES +GIBLIB_DEPENDENCIES = imlib2 +GIBLIB_AUTORECONF = YES +GIBLIB_CONF_OPTS = \ + --with-imlib2-prefix=$(STAGING_DIR)/usr \ + --with-imlib2-exec-prefix=$(STAGING_DIR)/usr +GIBLIB_CONFIG_SCRIPTS = giblib-config +GIBLIB_LICENSE = MIT +GIBLIB_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/giflib/Config.in b/package/giflib/Config.in new file mode 100644 index 0000000000..fc1f85d093 --- /dev/null +++ b/package/giflib/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_GIFLIB + bool "giflib" + help + giflib is a library for reading and writing gif images. + + http://sourceforge.net/projects/giflib diff --git a/package/giflib/giflib.hash b/package/giflib/giflib.hash new file mode 100644 index 0000000000..94bcb5d7a3 --- /dev/null +++ b/package/giflib/giflib.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/giflib/files +md5 323a9f11ab56c8a2d1715376410ce376 giflib-5.1.2.tar.bz2 +sha1 3f7bc86280db30a7120b2113f9f261301c515ad2 giflib-5.1.2.tar.bz2 diff --git a/package/giflib/giflib.mk b/package/giflib/giflib.mk new file mode 100644 index 0000000000..6f67a99fe1 --- /dev/null +++ b/package/giflib/giflib.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# giflib +# +################################################################################ + +GIFLIB_VERSION = 5.1.2 +GIFLIB_SOURCE = giflib-$(GIFLIB_VERSION).tar.bz2 +GIFLIB_SITE = http://downloads.sourceforge.net/project/giflib +GIFLIB_INSTALL_STAGING = YES +GIFLIB_LICENSE = MIT +GIFLIB_LICENSE_FILES = COPYING + +GIFLIB_BINS = \ + gif2epsn gif2ps gif2rgb gif2x11 gifasm gifbg gifbuild gifburst gifclip \ + gifclrmp gifcolor gifcomb gifcompose gifecho giffiltr giffix gifflip \ + gifhisto gifinfo gifinter gifinto gifovly gifpos gifrotat \ + gifrsize gifspnge giftext giftool gifwedge icon2gif raw2gif rgb2gif \ + text2gif + +define GIFLIB_BINS_CLEANUP + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(GIFLIB_BINS)) +endef + +GIFLIB_POST_INSTALL_TARGET_HOOKS += GIFLIB_BINS_CLEANUP + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/git/Config.in b/package/git/Config.in new file mode 100644 index 0000000000..9babbecf06 --- /dev/null +++ b/package/git/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_GIT + bool "git" + depends on BR2_USE_MMU # uses fork() + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Git is a free and open source distributed version control system + designed to handle everything from small to very large projects. + + http://git-scm.com diff --git a/package/git/git.hash b/package/git/git.hash new file mode 100644 index 0000000000..dabe964849 --- /dev/null +++ b/package/git/git.hash @@ -0,0 +1,2 @@ +# From: https://www.kernel.org/pub/software/scm/git/sha256sums.asc +sha256 ec0283d78a0f1c8408c5fd43610697b953fbaafe4077bb1e41446a9ee3a2f83d git-2.8.2.tar.xz diff --git a/package/git/git.mk b/package/git/git.mk new file mode 100644 index 0000000000..db260360c2 --- /dev/null +++ b/package/git/git.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# git +# +################################################################################ + +GIT_VERSION = 2.8.2 +GIT_SOURCE = git-$(GIT_VERSION).tar.xz +GIT_SITE = https://www.kernel.org/pub/software/scm/git +GIT_LICENSE = GPLv2 LGPLv2.1+ +GIT_LICENSE_FILES = COPYING LGPL-2.1 +GIT_DEPENDENCIES = zlib host-gettext + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +GIT_DEPENDENCIES += openssl +GIT_CONF_OPTS += --with-openssl +GIT_CONF_ENV_LIBS += $(if $(BR2_STATIC_LIBS),-lz) +else +GIT_CONF_OPTS += --without-openssl +endif + +ifeq ($(BR2_PACKAGE_PERL),y) +GIT_DEPENDENCIES += perl +GIT_CONF_OPTS += --with-libpcre +else +GIT_CONF_OPTS += --without-libpcre +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +GIT_DEPENDENCIES += libcurl +GIT_CONF_OPTS += --with-curl +GIT_CONF_ENV += \ + ac_cv_prog_curl_config=$(STAGING_DIR)/usr/bin/$(LIBCURL_CONFIG_SCRIPTS) +else +GIT_CONF_OPTS += --without-curl +endif + +ifeq ($(BR2_PACKAGE_EXPAT),y) +GIT_DEPENDENCIES += expat +GIT_CONF_OPTS += --with-expat +else +GIT_CONF_OPTS += --without-expat +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +GIT_DEPENDENCIES += libiconv +GIT_CONF_ENV_LIBS += -liconv +GIT_CONF_OPTS += --with-iconv=/usr/lib +else +GIT_CONF_OPTS += --without-iconv +endif + +ifeq ($(BR2_PACKAGE_TCL),y) +GIT_DEPENDENCIES += tcl +GIT_CONF_OPTS += --with-tcltk +else +GIT_CONF_OPTS += --without-tcltk +endif + +# assume yes for these tests, configure will bail out otherwise +# saying error: cannot run test program while cross compiling +GIT_CONF_ENV += \ + ac_cv_fread_reads_directories=yes \ + ac_cv_snprintf_returns_bogus=yes LIBS='$(GIT_CONF_ENV_LIBS)' + +$(eval $(autotools-package)) diff --git a/package/glib-networking/Config.in b/package/glib-networking/Config.in new file mode 100644 index 0000000000..01d8552f80 --- /dev/null +++ b/package/glib-networking/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_GLIB_NETWORKING + bool "glib-networking" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + help + Network-related GIO modules for glib. + +comment "glib-networking needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/glib-networking/glib-networking.hash b/package/glib-networking/glib-networking.hash new file mode 100644 index 0000000000..a495af149d --- /dev/null +++ b/package/glib-networking/glib-networking.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/glib-networking/2.48/glib-networking-2.48.2.sha256sum +sha256 925c0c49d6b2b8b5695f2e33cd952d1dbb7d18d3f2f796413577719315bb3a84 glib-networking-2.48.2.tar.xz diff --git a/package/glib-networking/glib-networking.mk b/package/glib-networking/glib-networking.mk new file mode 100644 index 0000000000..d4782e01f2 --- /dev/null +++ b/package/glib-networking/glib-networking.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# glib-networking +# +################################################################################ + +GLIB_NETWORKING_VERSION_MAJOR = 2.48 +GLIB_NETWORKING_VERSION = $(GLIB_NETWORKING_VERSION_MAJOR).2 +GLIB_NETWORKING_SITE = http://ftp.gnome.org/pub/gnome/sources/glib-networking/$(GLIB_NETWORKING_VERSION_MAJOR) +GLIB_NETWORKING_SOURCE = glib-networking-$(GLIB_NETWORKING_VERSION).tar.xz +GLIB_NETWORKING_INSTALL_STAGING = YES +GLIB_NETWORKING_DEPENDENCIES = \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + host-pkgconf \ + host-intltool \ + libglib2 +GLIB_NETWORKING_LICENSE = LGPLv2+ +GLIB_NETWORKING_LICENSE_FILES = COPYING +GLIB_NETWORKING_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) \ + GIO_MODULE_DIR=/usr/lib/gio/modules install + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +GLIB_NETWORKING_DEPENDENCIES += gnutls +GLIB_NETWORKING_CONF_OPTS += --with-libgcrypt-prefix=$(STAGING_DIR)/usr +else +GLIB_NETWORKING_CONF_OPTS += --without-gnutls +endif + +$(eval $(autotools-package)) diff --git a/package/glibc/2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch b/package/glibc/2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch new file mode 100644 index 0000000000..da2f49de10 --- /dev/null +++ b/package/glibc/2.18-svnr23787/0001-CVE-2014-7817-eglibc.patch @@ -0,0 +1,174 @@ +From https://bugzilla.redhat.com/show_bug.cgi?id=1157689 +Modified for eglibc. + +Signed-off-by: Gustavo Zacarias + +WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! +EMBARGOED !!! EMBARGOED !!! EMARGOED !!! EMBARGOED !!! EMBARGOED !!! +SECURITY !!! SECURITY !!! SECURITY !!! SECURITY !!! SECURITY !!! + +CVE-2014-7817: + +The function wordexp() fails to properly handle the WRDE_NOCMD +flag when processing arithmetic inputs in the form of "$((... ``))" +where "..." can be anything valid. The backticks in the arithmetic +epxression are evaluated by in a shell even if WRDE_NOCMD forbade +command substitution. This allows an attacker to attempt to pass +dangerous commands via constructs of the above form, and bypass +the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD +in parse_arith(). The patch also hardens parse_backticks() and +parse_comm() to check for WRDE_NOCMD flag and return an error instead +of ever running a shell. + +We expand the testsuite and add 3 new regression tests of roughtly +the same form but with a couple of nested levels. + +On top of the 3 new tests we add fork validation to the WRDE_NOCMD +testing. If any forks are detected during the execution of a wordexp() +call with WRDE_NOCMD, the test is marked as failed. This is slightly +heuristic since vfork might be used, but it provides a higher level +of assurance that no shells were executed as part of command substitution +with WRDE_NOCMD in effect. In addition it doesn't require libpthread or +libdl, instead we use the public implementation namespace function +__register_atfork (already part of the public ABI for libpthread). + +Tested on x86_64 with no regressions. + +2014-10-27 Carlos O'Donell + + * wordexp-test.c (__dso_handle): Add prototype. + (__register_atfork): Likewise. + (__app_register_atfork): New function. + (registered_forks): New global. + (register_fork): New function. + (test_case): Add 3 new tests for WRDE_CMDSUB. + (main): Call __app_register_atfork. + (testit): If WRDE_NOCMD set registered_forks to zero, run test, and + if fork count is non-zero fail the test. + * posix/wordexp.c (parse_arith): Return WRDE_NOCMD if WRDE_NOCMD flag + is set and parsing '`'. + (parse_comm): Return WRDE_NOCMD if WRDE_NOCMD flag is set. + (parse_backtick): Return WRDE_NOCMD if WRDE_NOCMD flag is set and + parsing '`'. + +diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c +index 4957006..5ce2a1b 100644 +--- a/libc/posix/wordexp-test.c ++++ b/libc/posix/wordexp-test.c +@@ -27,6 +27,25 @@ + + #define IFS " \n\t" + ++extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden"))); ++extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *); ++ ++static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void)) ++{ ++ return __register_atfork (prepare, parent, child, ++ &__dso_handle == NULL ? NULL : __dso_handle); ++} ++ ++/* Number of forks seen. */ ++static int registered_forks; ++ ++/* For each fork increment the fork count. */ ++static void ++register_fork (void) ++{ ++ registered_forks++; ++} ++ + struct test_case_struct + { + int retval; +@@ -206,6 +225,12 @@ struct test_case_struct + { WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS }, + { WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS }, + { WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS }, ++ /* Test for CVE-2014-7817. We test 3 combinations of command ++ substitution inside an arithmetic expression to make sure that ++ no commands are executed and error is returned. */ ++ { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, ++ { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, ++ { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS }, + + { -1, NULL, NULL, 0, 0, { NULL, }, IFS }, + }; +@@ -258,6 +283,15 @@ main (int argc, char *argv[]) + return -1; + } + ++ /* If we are not allowed to do command substitution, we install ++ fork handlers to verify that no forks happened. No forks should ++ happen at all if command substitution is disabled. */ ++ if (__app_register_atfork (register_fork, NULL, NULL) != 0) ++ { ++ printf ("Failed to register fork handler.\n"); ++ return -1; ++ } ++ + for (test = 0; test_case[test].retval != -1; test++) + if (testit (&test_case[test])) + ++fail; +@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc) + + printf ("Test %d (%s): ", ++tests, tc->words); + ++ if (tc->flags & WRDE_NOCMD) ++ registered_forks = 0; ++ + if (tc->flags & WRDE_APPEND) + { + /* initial wordexp() call, to be appended to */ +@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc) + } + retval = wordexp (tc->words, &we, tc->flags); + ++ if ((tc->flags & WRDE_NOCMD) ++ && (registered_forks > 0)) ++ { ++ printf ("FAILED fork called for WRDE_NOCMD\n"); ++ return 1; ++ } ++ + if (tc->flags & WRDE_DOOFFS) + start_offs = sav_we.we_offs; + +diff --git a/posix/wordexp.c b/posix/wordexp.c +index b6b65dd..d6a158f 100644 +--- a/libc/posix/wordexp.c ++++ b/libc/posix/wordexp.c +@@ -693,6 +693,12 @@ parse_arith (char **word, size_t *word_length, size_t *max_length, + break; + + case '`': ++ if (flags & WRDE_NOCMD) ++ { ++ free (expr); ++ return WRDE_NOCMD; ++ } ++ + (*offset)++; + error = parse_backtick (&expr, &expr_length, &expr_maxlen, + words, offset, flags, NULL, NULL, NULL); +@@ -1144,6 +1150,10 @@ parse_comm (char **word, size_t *word_length, size_t *max_length, + size_t comm_maxlen; + char *comm = w_newword (&comm_length, &comm_maxlen); + ++ /* Do nothing if command substitution should not succeed. */ ++ if (flags & WRDE_NOCMD) ++ return WRDE_CMDSUB; ++ + for (; words[*offset]; ++(*offset)) + { + switch (words[*offset]) +@@ -2121,6 +2131,9 @@ parse_backtick (char **word, size_t *word_length, size_t *max_length, + switch (words[*offset]) + { + case '`': ++ if (flags & WRDE_NOCMD) ++ return WRDE_NOCMD; ++ + /* Go -- give the script to the shell */ + error = exec_comm (comm, word, word_length, max_length, flags, + pwordexp, ifs, ifs_white); diff --git a/package/glibc/2.18-svnr23787/0002-accept-make4.patch b/package/glibc/2.18-svnr23787/0002-accept-make4.patch new file mode 100644 index 0000000000..4f426f29e6 --- /dev/null +++ b/package/glibc/2.18-svnr23787/0002-accept-make4.patch @@ -0,0 +1,33 @@ +Backport upstream patch (28d708c44bc47b56f6551ff285f78edcf61c208a) to accept +make-4.0 or newer. +We patch both configure and configure.in files so if we ever have to run +autoreconf in the glibc source, then the fix will be propagated properly. + +Signed-off-by: Markos Chandras + +Index: glibc-2.18-svnr23787/libc/configure +=================================================================== +--- glibc-2.18-svnr23787.orig/libc/configure ++++ glibc-2.18-svnr23787/libc/configure +@@ -4772,7 +4772,7 @@ $as_echo_n "checking version of $MAKE... + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +Index: glibc-2.18-svnr23787/libc/configure.in +=================================================================== +--- glibc-2.18-svnr23787.orig/libc/configure.in ++++ glibc-2.18-svnr23787/libc/configure.in +@@ -989,7 +989,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}g + critic_missing="$critic_missing gcc") + AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, + [GNU Make[^0-9]*\([0-9][0-9.]*\)], +- [3.79* | 3.[89]*], critic_missing="$critic_missing make") ++ [3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*], critic_missing="$critic_missing make") + + AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, + [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/package/glibc/2.18-svnr23787/0003-CVE-2014-6040.patch b/package/glibc/2.18-svnr23787/0003-CVE-2014-6040.patch new file mode 100644 index 0000000000..f447dcd329 --- /dev/null +++ b/package/glibc/2.18-svnr23787/0003-CVE-2014-6040.patch @@ -0,0 +1,141 @@ +Backport from https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=41488498b6 +See https://bugzilla.redhat.com/show_bug.cgi?id=1135841 + +Signed-off-by: Gustavo Zacarias + +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm1364.c eglibc-2.19/libc/iconvdata/ibm1364.c +--- eglibc-2.19.orig/libc/iconvdata/ibm1364.c 2015-01-08 16:05:53.918823240 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm1364.c 2015-01-08 16:06:02.781555143 -0300 +@@ -220,7 +220,8 @@ + ++rp2; \ + \ + uint32_t res; \ +- if (__builtin_expect (ch < rp2->start, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ ++ || __builtin_expect (ch < rp2->start, 0) \ + || (res = DB_TO_UCS4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ + { \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm932.c eglibc-2.19/libc/iconvdata/ibm932.c +--- eglibc-2.19.orig/libc/iconvdata/ibm932.c 2015-01-08 16:05:53.910818967 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm932.c 2015-01-08 16:06:02.781555143 -0300 +@@ -73,11 +73,12 @@ + } \ + \ + ch = (ch * 0x100) + inptr[1]; \ ++ /* ch was less than 0xfd. */ \ ++ assert (ch < 0xfd00); \ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ +- || __builtin_expect (ch < rp2->start, 0) \ ++ if (__builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm932db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, '\1') == 0 && ch !=0)) \ + { \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm933.c eglibc-2.19/libc/iconvdata/ibm933.c +--- eglibc-2.19.orig/libc/iconvdata/ibm933.c 2015-01-08 16:05:53.917822706 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm933.c 2015-01-08 16:06:02.781555143 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm933db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm935.c eglibc-2.19/libc/iconvdata/ibm935.c +--- eglibc-2.19.orig/libc/iconvdata/ibm935.c 2015-01-08 16:05:53.921824843 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm935.c 2015-01-08 16:06:02.782555677 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm935db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm937.c eglibc-2.19/libc/iconvdata/ibm937.c +--- eglibc-2.19.orig/libc/iconvdata/ibm937.c 2015-01-08 16:05:53.915821638 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm937.c 2015-01-08 16:06:02.782555677 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm937db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm939.c eglibc-2.19/libc/iconvdata/ibm939.c +--- eglibc-2.19.orig/libc/iconvdata/ibm939.c 2015-01-08 16:05:53.917822706 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm939.c 2015-01-08 16:06:02.782555677 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm939db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm943.c eglibc-2.19/libc/iconvdata/ibm943.c +--- eglibc-2.19.orig/libc/iconvdata/ibm943.c 2015-01-08 16:05:53.918823240 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm943.c 2015-01-08 16:06:02.782555677 -0300 +@@ -74,11 +74,12 @@ + } \ + \ + ch = (ch * 0x100) + inptr[1]; \ ++ /* ch was less than 0xfd. */ \ ++ assert (ch < 0xfd00); \ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ +- || __builtin_expect (ch < rp2->start, 0) \ ++ if (__builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm943db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, '\1') == 0 && ch !=0)) \ + { \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/Makefile eglibc-2.19/libc/iconvdata/Makefile +--- eglibc-2.19.orig/libc/iconvdata/Makefile 2015-01-08 16:05:53.903815227 -0300 ++++ eglibc-2.19/libc/iconvdata/Makefile 2015-01-08 16:06:02.782555677 -0300 +@@ -303,6 +303,7 @@ + $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \ + $(addprefix $(objpfx),$(modules.so)) \ + $(common-objdir)/iconv/iconv_prog TESTS ++ iconv_modules="$(modules)" \ + $(SHELL) $< $(common-objdir) '$(test-wrapper)' > $@ + + $(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/run-iconv-test.sh eglibc-2.19/libc/iconvdata/run-iconv-test.sh +--- eglibc-2.19.orig/libc/iconvdata/run-iconv-test.sh 2015-01-08 16:05:53.894810420 -0300 ++++ eglibc-2.19/libc/iconvdata/run-iconv-test.sh 2015-01-08 16:06:02.782555677 -0300 +@@ -188,6 +188,24 @@ + + done < TESTS2 + ++# Check for crashes in decoders. ++printf '\016\377\377\377\377\377\377\377' > $temp1 ++for from in $iconv_modules ; do ++ echo $ac_n "test decoder $from $ac_c" ++ PROG=`eval echo $ICONV` ++ if $PROG < $temp1 >/dev/null 2>&1 ; then ++ : # fall through ++ else ++ status=$? ++ if test $status -gt 1 ; then ++ echo "/FAILED" ++ failed=1 ++ continue ++ fi ++ fi ++ echo "OK" ++done ++ + exit $failed + # Local Variables: + # mode:shell-script diff --git a/package/glibc/2.18-svnr23787/0004-CVE-2014-9402.patch b/package/glibc/2.18-svnr23787/0004-CVE-2014-9402.patch new file mode 100644 index 0000000000..c7aa12c1b9 --- /dev/null +++ b/package/glibc/2.18-svnr23787/0004-CVE-2014-9402.patch @@ -0,0 +1,20 @@ +Fix CVE-2014-9402 - denial of service in getnetbyname function. +Backport from https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=11e3417af6e354f1942c68a271ae51e892b2814d +See https://bugzilla.redhat.com/show_bug.cgi?id=1175369 + +Signed-off-by: Gustavo Zacarias + +diff -Nura eglibc-2.19.orig/libc/resolv/nss_dns/dns-network.c eglibc-2.19/libc/resolv/nss_dns/dns-network.c +--- eglibc-2.19.orig/libc/resolv/nss_dns/dns-network.c 2015-01-08 16:12:35.024977879 -0300 ++++ eglibc-2.19/libc/resolv/nss_dns/dns-network.c 2015-01-08 16:12:42.543992357 -0300 +@@ -398,8 +398,8 @@ + + case BYNAME: + { +- char **ap = result->n_aliases++; +- while (*ap != NULL) ++ char **ap; ++ for (ap = result->n_aliases; *ap != NULL; ++ap) + { + /* Check each alias name for being of the forms: + 4.3.2.1.in-addr.arpa = net 1.2.3.4 diff --git a/package/glibc/2.18-svnr23787/0005-CVE-2015-1472.patch b/package/glibc/2.18-svnr23787/0005-CVE-2015-1472.patch new file mode 100644 index 0000000000..a0da626cbf --- /dev/null +++ b/package/glibc/2.18-svnr23787/0005-CVE-2015-1472.patch @@ -0,0 +1,88 @@ +Fix CVE-2015-1472 - heap buffer overflow in wscanf +Backport from upstream: +https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=5bd80bfe9ca0d955bfbbc002781bc7b01b6bcb06 +See: https://bugzilla.redhat.com/show_bug.cgi?id=1188235 + +Signed-off-by: Gustavo Zacarias + +diff --git a/stdio-common/tst-sscanf.c b/stdio-common/tst-sscanf.c +index aece3f2..8a2eb9e 100644 +--- a/libc/stdio-common/tst-sscanf.c ++++ b/libc/stdio-common/tst-sscanf.c +@@ -233,5 +233,38 @@ main (void) + } + } + ++ /* BZ #16618 ++ The test will segfault during SSCANF if the buffer overflow ++ is not fixed. The size of `s` is such that it forces the use ++ of malloc internally and this triggers the incorrect computation. ++ Thus the value for SIZE is arbitrariy high enough that malloc ++ is used. */ ++ { ++#define SIZE 131072 ++ CHAR *s = malloc ((SIZE + 1) * sizeof (*s)); ++ if (s == NULL) ++ abort (); ++ for (size_t i = 0; i < SIZE; i++) ++ s[i] = L('0'); ++ s[SIZE] = L('\0'); ++ int i = 42; ++ /* Scan multi-digit zero into `i`. */ ++ if (SSCANF (s, L("%d"), &i) != 1) ++ { ++ printf ("FAIL: bug16618: SSCANF did not read one input item.\n"); ++ result = 1; ++ } ++ if (i != 0) ++ { ++ printf ("FAIL: bug16618: Value of `i` was not zero as expected.\n"); ++ result = 1; ++ } ++ free (s); ++ if (result != 1) ++ printf ("PASS: bug16618: Did not crash.\n"); ++#undef SIZE ++ } ++ ++ + return result; + } +diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c +index cd129a8..0e204e7 100644 +--- a/libc/stdio-common/vfscanf.c ++++ b/libc/stdio-common/vfscanf.c +@@ -272,9 +272,10 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, + if (__glibc_unlikely (wpsize == wpmax)) \ + { \ + CHAR_T *old = wp; \ +- size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax \ +- ? UCHAR_MAX + 1 : 2 * wpmax); \ +- if (use_malloc || !__libc_use_alloca (newsize)) \ ++ bool fits = __glibc_likely (wpmax <= SIZE_MAX / sizeof (CHAR_T) / 2); \ ++ size_t wpneed = MAX (UCHAR_MAX + 1, 2 * wpmax); \ ++ size_t newsize = fits ? wpneed * sizeof (CHAR_T) : SIZE_MAX; \ ++ if (!__libc_use_alloca (newsize)) \ + { \ + wp = realloc (use_malloc ? wp : NULL, newsize); \ + if (wp == NULL) \ +@@ -286,14 +287,13 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, + } \ + if (! use_malloc) \ + MEMCPY (wp, old, wpsize); \ +- wpmax = newsize; \ ++ wpmax = wpneed; \ + use_malloc = true; \ + } \ + else \ + { \ + size_t s = wpmax * sizeof (CHAR_T); \ +- wp = (CHAR_T *) extend_alloca (wp, s, \ +- newsize * sizeof (CHAR_T)); \ ++ wp = (CHAR_T *) extend_alloca (wp, s, newsize); \ + wpmax = s / sizeof (CHAR_T); \ + if (old != NULL) \ + MEMCPY (wp, old, wpsize); \ +-- +1.9.4 + diff --git a/package/glibc/2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch b/package/glibc/2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch new file mode 100644 index 0000000000..da2f49de10 --- /dev/null +++ b/package/glibc/2.19-svnr25243/0001-CVE-2014-7817-eglibc.patch @@ -0,0 +1,174 @@ +From https://bugzilla.redhat.com/show_bug.cgi?id=1157689 +Modified for eglibc. + +Signed-off-by: Gustavo Zacarias + +WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! WARNING !!! +EMBARGOED !!! EMBARGOED !!! EMARGOED !!! EMBARGOED !!! EMBARGOED !!! +SECURITY !!! SECURITY !!! SECURITY !!! SECURITY !!! SECURITY !!! + +CVE-2014-7817: + +The function wordexp() fails to properly handle the WRDE_NOCMD +flag when processing arithmetic inputs in the form of "$((... ``))" +where "..." can be anything valid. The backticks in the arithmetic +epxression are evaluated by in a shell even if WRDE_NOCMD forbade +command substitution. This allows an attacker to attempt to pass +dangerous commands via constructs of the above form, and bypass +the WRDE_NOCMD flag. This patch fixes this by checking for WRDE_NOCMD +in parse_arith(). The patch also hardens parse_backticks() and +parse_comm() to check for WRDE_NOCMD flag and return an error instead +of ever running a shell. + +We expand the testsuite and add 3 new regression tests of roughtly +the same form but with a couple of nested levels. + +On top of the 3 new tests we add fork validation to the WRDE_NOCMD +testing. If any forks are detected during the execution of a wordexp() +call with WRDE_NOCMD, the test is marked as failed. This is slightly +heuristic since vfork might be used, but it provides a higher level +of assurance that no shells were executed as part of command substitution +with WRDE_NOCMD in effect. In addition it doesn't require libpthread or +libdl, instead we use the public implementation namespace function +__register_atfork (already part of the public ABI for libpthread). + +Tested on x86_64 with no regressions. + +2014-10-27 Carlos O'Donell + + * wordexp-test.c (__dso_handle): Add prototype. + (__register_atfork): Likewise. + (__app_register_atfork): New function. + (registered_forks): New global. + (register_fork): New function. + (test_case): Add 3 new tests for WRDE_CMDSUB. + (main): Call __app_register_atfork. + (testit): If WRDE_NOCMD set registered_forks to zero, run test, and + if fork count is non-zero fail the test. + * posix/wordexp.c (parse_arith): Return WRDE_NOCMD if WRDE_NOCMD flag + is set and parsing '`'. + (parse_comm): Return WRDE_NOCMD if WRDE_NOCMD flag is set. + (parse_backtick): Return WRDE_NOCMD if WRDE_NOCMD flag is set and + parsing '`'. + +diff --git a/posix/wordexp-test.c b/posix/wordexp-test.c +index 4957006..5ce2a1b 100644 +--- a/libc/posix/wordexp-test.c ++++ b/libc/posix/wordexp-test.c +@@ -27,6 +27,25 @@ + + #define IFS " \n\t" + ++extern void *__dso_handle __attribute__ ((__weak__, __visibility__ ("hidden"))); ++extern int __register_atfork (void (*) (void), void (*) (void), void (*) (void), void *); ++ ++static int __app_register_atfork (void (*prepare) (void), void (*parent) (void), void (*child) (void)) ++{ ++ return __register_atfork (prepare, parent, child, ++ &__dso_handle == NULL ? NULL : __dso_handle); ++} ++ ++/* Number of forks seen. */ ++static int registered_forks; ++ ++/* For each fork increment the fork count. */ ++static void ++register_fork (void) ++{ ++ registered_forks++; ++} ++ + struct test_case_struct + { + int retval; +@@ -206,6 +225,12 @@ struct test_case_struct + { WRDE_SYNTAX, NULL, "$((2+))", 0, 0, { NULL, }, IFS }, + { WRDE_SYNTAX, NULL, "`", 0, 0, { NULL, }, IFS }, + { WRDE_SYNTAX, NULL, "$((010+4+))", 0, 0, { NULL }, IFS }, ++ /* Test for CVE-2014-7817. We test 3 combinations of command ++ substitution inside an arithmetic expression to make sure that ++ no commands are executed and error is returned. */ ++ { WRDE_CMDSUB, NULL, "$((`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, ++ { WRDE_CMDSUB, NULL, "$((1+`echo 1`))", WRDE_NOCMD, 0, { NULL, }, IFS }, ++ { WRDE_CMDSUB, NULL, "$((1+$((`echo 1`))))", WRDE_NOCMD, 0, { NULL, }, IFS }, + + { -1, NULL, NULL, 0, 0, { NULL, }, IFS }, + }; +@@ -258,6 +283,15 @@ main (int argc, char *argv[]) + return -1; + } + ++ /* If we are not allowed to do command substitution, we install ++ fork handlers to verify that no forks happened. No forks should ++ happen at all if command substitution is disabled. */ ++ if (__app_register_atfork (register_fork, NULL, NULL) != 0) ++ { ++ printf ("Failed to register fork handler.\n"); ++ return -1; ++ } ++ + for (test = 0; test_case[test].retval != -1; test++) + if (testit (&test_case[test])) + ++fail; +@@ -367,6 +401,9 @@ testit (struct test_case_struct *tc) + + printf ("Test %d (%s): ", ++tests, tc->words); + ++ if (tc->flags & WRDE_NOCMD) ++ registered_forks = 0; ++ + if (tc->flags & WRDE_APPEND) + { + /* initial wordexp() call, to be appended to */ +@@ -378,6 +415,13 @@ testit (struct test_case_struct *tc) + } + retval = wordexp (tc->words, &we, tc->flags); + ++ if ((tc->flags & WRDE_NOCMD) ++ && (registered_forks > 0)) ++ { ++ printf ("FAILED fork called for WRDE_NOCMD\n"); ++ return 1; ++ } ++ + if (tc->flags & WRDE_DOOFFS) + start_offs = sav_we.we_offs; + +diff --git a/posix/wordexp.c b/posix/wordexp.c +index b6b65dd..d6a158f 100644 +--- a/libc/posix/wordexp.c ++++ b/libc/posix/wordexp.c +@@ -693,6 +693,12 @@ parse_arith (char **word, size_t *word_length, size_t *max_length, + break; + + case '`': ++ if (flags & WRDE_NOCMD) ++ { ++ free (expr); ++ return WRDE_NOCMD; ++ } ++ + (*offset)++; + error = parse_backtick (&expr, &expr_length, &expr_maxlen, + words, offset, flags, NULL, NULL, NULL); +@@ -1144,6 +1150,10 @@ parse_comm (char **word, size_t *word_length, size_t *max_length, + size_t comm_maxlen; + char *comm = w_newword (&comm_length, &comm_maxlen); + ++ /* Do nothing if command substitution should not succeed. */ ++ if (flags & WRDE_NOCMD) ++ return WRDE_CMDSUB; ++ + for (; words[*offset]; ++(*offset)) + { + switch (words[*offset]) +@@ -2121,6 +2131,9 @@ parse_backtick (char **word, size_t *word_length, size_t *max_length, + switch (words[*offset]) + { + case '`': ++ if (flags & WRDE_NOCMD) ++ return WRDE_NOCMD; ++ + /* Go -- give the script to the shell */ + error = exec_comm (comm, word, word_length, max_length, flags, + pwordexp, ifs, ifs_white); diff --git a/package/glibc/2.19-svnr25243/0002-CVE-2014-6040.patch b/package/glibc/2.19-svnr25243/0002-CVE-2014-6040.patch new file mode 100644 index 0000000000..f447dcd329 --- /dev/null +++ b/package/glibc/2.19-svnr25243/0002-CVE-2014-6040.patch @@ -0,0 +1,141 @@ +Backport from https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commit;h=41488498b6 +See https://bugzilla.redhat.com/show_bug.cgi?id=1135841 + +Signed-off-by: Gustavo Zacarias + +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm1364.c eglibc-2.19/libc/iconvdata/ibm1364.c +--- eglibc-2.19.orig/libc/iconvdata/ibm1364.c 2015-01-08 16:05:53.918823240 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm1364.c 2015-01-08 16:06:02.781555143 -0300 +@@ -220,7 +220,8 @@ + ++rp2; \ + \ + uint32_t res; \ +- if (__builtin_expect (ch < rp2->start, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ ++ || __builtin_expect (ch < rp2->start, 0) \ + || (res = DB_TO_UCS4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ + { \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm932.c eglibc-2.19/libc/iconvdata/ibm932.c +--- eglibc-2.19.orig/libc/iconvdata/ibm932.c 2015-01-08 16:05:53.910818967 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm932.c 2015-01-08 16:06:02.781555143 -0300 +@@ -73,11 +73,12 @@ + } \ + \ + ch = (ch * 0x100) + inptr[1]; \ ++ /* ch was less than 0xfd. */ \ ++ assert (ch < 0xfd00); \ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ +- || __builtin_expect (ch < rp2->start, 0) \ ++ if (__builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm932db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, '\1') == 0 && ch !=0)) \ + { \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm933.c eglibc-2.19/libc/iconvdata/ibm933.c +--- eglibc-2.19.orig/libc/iconvdata/ibm933.c 2015-01-08 16:05:53.917822706 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm933.c 2015-01-08 16:06:02.781555143 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm933db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm935.c eglibc-2.19/libc/iconvdata/ibm935.c +--- eglibc-2.19.orig/libc/iconvdata/ibm935.c 2015-01-08 16:05:53.921824843 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm935.c 2015-01-08 16:06:02.782555677 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm935db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm937.c eglibc-2.19/libc/iconvdata/ibm937.c +--- eglibc-2.19.orig/libc/iconvdata/ibm937.c 2015-01-08 16:05:53.915821638 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm937.c 2015-01-08 16:06:02.782555677 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm937db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm939.c eglibc-2.19/libc/iconvdata/ibm939.c +--- eglibc-2.19.orig/libc/iconvdata/ibm939.c 2015-01-08 16:05:53.917822706 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm939.c 2015-01-08 16:06:02.782555677 -0300 +@@ -161,7 +161,7 @@ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ ++ if (__builtin_expect (rp2->start == 0xffff, 0) \ + || __builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm939db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, L'\1') == L'\0' && ch != '\0')) \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/ibm943.c eglibc-2.19/libc/iconvdata/ibm943.c +--- eglibc-2.19.orig/libc/iconvdata/ibm943.c 2015-01-08 16:05:53.918823240 -0300 ++++ eglibc-2.19/libc/iconvdata/ibm943.c 2015-01-08 16:06:02.782555677 -0300 +@@ -74,11 +74,12 @@ + } \ + \ + ch = (ch * 0x100) + inptr[1]; \ ++ /* ch was less than 0xfd. */ \ ++ assert (ch < 0xfd00); \ + while (ch > rp2->end) \ + ++rp2; \ + \ +- if (__builtin_expect (rp2 == NULL, 0) \ +- || __builtin_expect (ch < rp2->start, 0) \ ++ if (__builtin_expect (ch < rp2->start, 0) \ + || (res = __ibm943db_to_ucs4[ch + rp2->idx], \ + __builtin_expect (res, '\1') == 0 && ch !=0)) \ + { \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/Makefile eglibc-2.19/libc/iconvdata/Makefile +--- eglibc-2.19.orig/libc/iconvdata/Makefile 2015-01-08 16:05:53.903815227 -0300 ++++ eglibc-2.19/libc/iconvdata/Makefile 2015-01-08 16:06:02.782555677 -0300 +@@ -303,6 +303,7 @@ + $(objpfx)iconv-test.out: run-iconv-test.sh $(objpfx)gconv-modules \ + $(addprefix $(objpfx),$(modules.so)) \ + $(common-objdir)/iconv/iconv_prog TESTS ++ iconv_modules="$(modules)" \ + $(SHELL) $< $(common-objdir) '$(test-wrapper)' > $@ + + $(objpfx)tst-tables.out: tst-tables.sh $(objpfx)gconv-modules \ +diff -Nura eglibc-2.19.orig/libc/iconvdata/run-iconv-test.sh eglibc-2.19/libc/iconvdata/run-iconv-test.sh +--- eglibc-2.19.orig/libc/iconvdata/run-iconv-test.sh 2015-01-08 16:05:53.894810420 -0300 ++++ eglibc-2.19/libc/iconvdata/run-iconv-test.sh 2015-01-08 16:06:02.782555677 -0300 +@@ -188,6 +188,24 @@ + + done < TESTS2 + ++# Check for crashes in decoders. ++printf '\016\377\377\377\377\377\377\377' > $temp1 ++for from in $iconv_modules ; do ++ echo $ac_n "test decoder $from $ac_c" ++ PROG=`eval echo $ICONV` ++ if $PROG < $temp1 >/dev/null 2>&1 ; then ++ : # fall through ++ else ++ status=$? ++ if test $status -gt 1 ; then ++ echo "/FAILED" ++ failed=1 ++ continue ++ fi ++ fi ++ echo "OK" ++done ++ + exit $failed + # Local Variables: + # mode:shell-script diff --git a/package/glibc/2.19-svnr25243/0003-CVE-2014-9402.patch b/package/glibc/2.19-svnr25243/0003-CVE-2014-9402.patch new file mode 100644 index 0000000000..c7aa12c1b9 --- /dev/null +++ b/package/glibc/2.19-svnr25243/0003-CVE-2014-9402.patch @@ -0,0 +1,20 @@ +Fix CVE-2014-9402 - denial of service in getnetbyname function. +Backport from https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=11e3417af6e354f1942c68a271ae51e892b2814d +See https://bugzilla.redhat.com/show_bug.cgi?id=1175369 + +Signed-off-by: Gustavo Zacarias + +diff -Nura eglibc-2.19.orig/libc/resolv/nss_dns/dns-network.c eglibc-2.19/libc/resolv/nss_dns/dns-network.c +--- eglibc-2.19.orig/libc/resolv/nss_dns/dns-network.c 2015-01-08 16:12:35.024977879 -0300 ++++ eglibc-2.19/libc/resolv/nss_dns/dns-network.c 2015-01-08 16:12:42.543992357 -0300 +@@ -398,8 +398,8 @@ + + case BYNAME: + { +- char **ap = result->n_aliases++; +- while (*ap != NULL) ++ char **ap; ++ for (ap = result->n_aliases; *ap != NULL; ++ap) + { + /* Check each alias name for being of the forms: + 4.3.2.1.in-addr.arpa = net 1.2.3.4 diff --git a/package/glibc/2.19-svnr25243/0004-CVE-2015-1472.patch b/package/glibc/2.19-svnr25243/0004-CVE-2015-1472.patch new file mode 100644 index 0000000000..a0da626cbf --- /dev/null +++ b/package/glibc/2.19-svnr25243/0004-CVE-2015-1472.patch @@ -0,0 +1,88 @@ +Fix CVE-2015-1472 - heap buffer overflow in wscanf +Backport from upstream: +https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=5bd80bfe9ca0d955bfbbc002781bc7b01b6bcb06 +See: https://bugzilla.redhat.com/show_bug.cgi?id=1188235 + +Signed-off-by: Gustavo Zacarias + +diff --git a/stdio-common/tst-sscanf.c b/stdio-common/tst-sscanf.c +index aece3f2..8a2eb9e 100644 +--- a/libc/stdio-common/tst-sscanf.c ++++ b/libc/stdio-common/tst-sscanf.c +@@ -233,5 +233,38 @@ main (void) + } + } + ++ /* BZ #16618 ++ The test will segfault during SSCANF if the buffer overflow ++ is not fixed. The size of `s` is such that it forces the use ++ of malloc internally and this triggers the incorrect computation. ++ Thus the value for SIZE is arbitrariy high enough that malloc ++ is used. */ ++ { ++#define SIZE 131072 ++ CHAR *s = malloc ((SIZE + 1) * sizeof (*s)); ++ if (s == NULL) ++ abort (); ++ for (size_t i = 0; i < SIZE; i++) ++ s[i] = L('0'); ++ s[SIZE] = L('\0'); ++ int i = 42; ++ /* Scan multi-digit zero into `i`. */ ++ if (SSCANF (s, L("%d"), &i) != 1) ++ { ++ printf ("FAIL: bug16618: SSCANF did not read one input item.\n"); ++ result = 1; ++ } ++ if (i != 0) ++ { ++ printf ("FAIL: bug16618: Value of `i` was not zero as expected.\n"); ++ result = 1; ++ } ++ free (s); ++ if (result != 1) ++ printf ("PASS: bug16618: Did not crash.\n"); ++#undef SIZE ++ } ++ ++ + return result; + } +diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c +index cd129a8..0e204e7 100644 +--- a/libc/stdio-common/vfscanf.c ++++ b/libc/stdio-common/vfscanf.c +@@ -272,9 +272,10 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, + if (__glibc_unlikely (wpsize == wpmax)) \ + { \ + CHAR_T *old = wp; \ +- size_t newsize = (UCHAR_MAX + 1 > 2 * wpmax \ +- ? UCHAR_MAX + 1 : 2 * wpmax); \ +- if (use_malloc || !__libc_use_alloca (newsize)) \ ++ bool fits = __glibc_likely (wpmax <= SIZE_MAX / sizeof (CHAR_T) / 2); \ ++ size_t wpneed = MAX (UCHAR_MAX + 1, 2 * wpmax); \ ++ size_t newsize = fits ? wpneed * sizeof (CHAR_T) : SIZE_MAX; \ ++ if (!__libc_use_alloca (newsize)) \ + { \ + wp = realloc (use_malloc ? wp : NULL, newsize); \ + if (wp == NULL) \ +@@ -286,14 +287,13 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr, + } \ + if (! use_malloc) \ + MEMCPY (wp, old, wpsize); \ +- wpmax = newsize; \ ++ wpmax = wpneed; \ + use_malloc = true; \ + } \ + else \ + { \ + size_t s = wpmax * sizeof (CHAR_T); \ +- wp = (CHAR_T *) extend_alloca (wp, s, \ +- newsize * sizeof (CHAR_T)); \ ++ wp = (CHAR_T *) extend_alloca (wp, s, newsize); \ + wpmax = s / sizeof (CHAR_T); \ + if (old != NULL) \ + MEMCPY (wp, old, wpsize); \ +-- +1.9.4 + diff --git a/package/glibc/2.22/0001-fix-CVE-2015-7547.patch b/package/glibc/2.22/0001-fix-CVE-2015-7547.patch new file mode 100644 index 0000000000..19b8b6ebd8 --- /dev/null +++ b/package/glibc/2.22/0001-fix-CVE-2015-7547.patch @@ -0,0 +1,236 @@ +Fetched from gentoo glibc patchball +Original patch filename: 10_all_glibc-CVE-2015-7547.patch +Based on: https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html + +Fixes: +CVE-2015-7547 - glibc getaddrinfo stack-based buffer overflow. + +Signed-off-by: Gustavo Zacarias + +--- a/resolv/nss_dns/dns-host.c ++++ b/resolv/nss_dns/dns-host.c +@@ -1031,7 +1031,10 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname, + int h_namelen = 0; + + if (ancount == 0) +- return NSS_STATUS_NOTFOUND; ++ { ++ *h_errnop = HOST_NOT_FOUND; ++ return NSS_STATUS_NOTFOUND; ++ } + + while (ancount-- > 0 && cp < end_of_message && had_error == 0) + { +@@ -1208,7 +1211,14 @@ gaih_getanswer_slice (const querybuf *answer, int anslen, const char *qname, + /* Special case here: if the resolver sent a result but it only + contains a CNAME while we are looking for a T_A or T_AAAA record, + we fail with NOTFOUND instead of TRYAGAIN. */ +- return canon == NULL ? NSS_STATUS_TRYAGAIN : NSS_STATUS_NOTFOUND; ++ if (canon != NULL) ++ { ++ *h_errnop = HOST_NOT_FOUND; ++ return NSS_STATUS_NOTFOUND; ++ } ++ ++ *h_errnop = NETDB_INTERNAL; ++ return NSS_STATUS_TRYAGAIN; + } + + +@@ -1242,8 +1252,15 @@ gaih_getanswer (const querybuf *answer1, int anslen1, const querybuf *answer2, + &pat, &buffer, &buflen, + errnop, h_errnop, ttlp, + &first); ++ /* Use the second response status in some cases. */ + if (status != NSS_STATUS_SUCCESS && status2 != NSS_STATUS_NOTFOUND) + status = status2; ++ /* Do not return a truncated second response (unless it was ++ unavoidable e.g. unrecoverable TRYAGAIN). */ ++ if (status == NSS_STATUS_SUCCESS ++ && (status2 == NSS_STATUS_TRYAGAIN ++ && *errnop == ERANGE && *h_errnop != NO_RECOVERY)) ++ status = NSS_STATUS_TRYAGAIN; + } + + return status; +--- a/resolv/res_query.c ++++ b/resolv/res_query.c +@@ -396,6 +396,7 @@ __libc_res_nsearch(res_state statp, + { + free (*answerp2); + *answerp2 = NULL; ++ *nanswerp2 = 0; + *answerp2_malloced = 0; + } + } +@@ -447,6 +448,7 @@ __libc_res_nsearch(res_state statp, + { + free (*answerp2); + *answerp2 = NULL; ++ *nanswerp2 = 0; + *answerp2_malloced = 0; + } + +@@ -521,6 +523,7 @@ __libc_res_nsearch(res_state statp, + { + free (*answerp2); + *answerp2 = NULL; ++ *nanswerp2 = 0; + *answerp2_malloced = 0; + } + if (saved_herrno != -1) +--- a/resolv/res_send.c ++++ b/resolv/res_send.c +@@ -639,11 +639,7 @@ send_vc(res_state statp, + { + const HEADER *hp = (HEADER *) buf; + const HEADER *hp2 = (HEADER *) buf2; +- u_char *ans = *ansp; +- int orig_anssizp = *anssizp; +- // XXX REMOVE +- // int anssiz = *anssizp; +- HEADER *anhp = (HEADER *) ans; ++ HEADER *anhp = (HEADER *) *ansp; + struct sockaddr *nsap = get_nsaddr (statp, ns); + int truncating, connreset, n; + /* On some architectures compiler might emit a warning indicating +@@ -767,35 +763,6 @@ send_vc(res_state statp, + assert (anscp != NULL || ansp2 == NULL); + thisresplenp = &resplen; + } else { +- if (*anssizp != MAXPACKET) { +- /* No buffer allocated for the first +- reply. We can try to use the rest +- of the user-provided buffer. */ +-#if __GNUC_PREREQ (4, 7) +- DIAG_PUSH_NEEDS_COMMENT; +- DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); +-#endif +-#if _STRING_ARCH_unaligned +- *anssizp2 = orig_anssizp - resplen; +- *ansp2 = *ansp + resplen; +-#else +- int aligned_resplen +- = ((resplen + __alignof__ (HEADER) - 1) +- & ~(__alignof__ (HEADER) - 1)); +- *anssizp2 = orig_anssizp - aligned_resplen; +- *ansp2 = *ansp + aligned_resplen; +-#endif +-#if __GNUC_PREREQ (4, 7) +- DIAG_POP_NEEDS_COMMENT; +-#endif +- } else { +- /* The first reply did not fit into the +- user-provided buffer. Maybe the second +- answer will. */ +- *anssizp2 = orig_anssizp; +- *ansp2 = *ansp; +- } +- + thisanssizp = anssizp2; + thisansp = ansp2; + thisresplenp = resplen2; +@@ -804,10 +771,14 @@ send_vc(res_state statp, + anhp = (HEADER *) *thisansp; + + *thisresplenp = rlen; +- if (rlen > *thisanssizp) { +- /* Yes, we test ANSCP here. If we have two buffers +- both will be allocatable. */ +- if (__glibc_likely (anscp != NULL)) { ++ /* Is the answer buffer too small? */ ++ if (*thisanssizp < rlen) { ++ /* If the current buffer is not the the static ++ user-supplied buffer then we can reallocate ++ it. */ ++ if (thisansp != NULL && thisansp != ansp) { ++ /* Always allocate MAXPACKET, callers expect ++ this specific size. */ + u_char *newp = malloc (MAXPACKET); + if (newp == NULL) { + *terrno = ENOMEM; +@@ -957,8 +928,6 @@ send_dg(res_state statp, + { + const HEADER *hp = (HEADER *) buf; + const HEADER *hp2 = (HEADER *) buf2; +- u_char *ans = *ansp; +- int orig_anssizp = *anssizp; + struct timespec now, timeout, finish; + struct pollfd pfd[1]; + int ptimeout; +@@ -1154,50 +1123,48 @@ send_dg(res_state statp, + assert (anscp != NULL || ansp2 == NULL); + thisresplenp = &resplen; + } else { +- if (*anssizp != MAXPACKET) { +- /* No buffer allocated for the first +- reply. We can try to use the rest +- of the user-provided buffer. */ +-#if _STRING_ARCH_unaligned +- *anssizp2 = orig_anssizp - resplen; +- *ansp2 = *ansp + resplen; +-#else +- int aligned_resplen +- = ((resplen + __alignof__ (HEADER) - 1) +- & ~(__alignof__ (HEADER) - 1)); +- *anssizp2 = orig_anssizp - aligned_resplen; +- *ansp2 = *ansp + aligned_resplen; +-#endif +- } else { +- /* The first reply did not fit into the +- user-provided buffer. Maybe the second +- answer will. */ +- *anssizp2 = orig_anssizp; +- *ansp2 = *ansp; +- } +- + thisanssizp = anssizp2; + thisansp = ansp2; + thisresplenp = resplen2; + } + + if (*thisanssizp < MAXPACKET +- /* Yes, we test ANSCP here. If we have two buffers +- both will be allocatable. */ +- && anscp ++ /* If the current buffer is not the the static ++ user-supplied buffer then we can reallocate ++ it. */ ++ && (thisansp != NULL && thisansp != ansp) + #ifdef FIONREAD ++ /* Is the size too small? */ + && (ioctl (pfd[0].fd, FIONREAD, thisresplenp) < 0 + || *thisanssizp < *thisresplenp) + #endif + ) { ++ /* Always allocate MAXPACKET, callers expect ++ this specific size. */ + u_char *newp = malloc (MAXPACKET); + if (newp != NULL) { +- *anssizp = MAXPACKET; +- *thisansp = ans = newp; ++ *thisanssizp = MAXPACKET; ++ *thisansp = newp; + if (thisansp == ansp2) + *ansp2_malloced = 1; + } + } ++ /* We could end up with truncation if anscp was NULL ++ (not allowed to change caller's buffer) and the ++ response buffer size is too small. This isn't a ++ reliable way to detect truncation because the ioctl ++ may be an inaccurate report of the UDP message size. ++ Therefore we use this only to issue debug output. ++ To do truncation accurately with UDP we need ++ MSG_TRUNC which is only available on Linux. We ++ can abstract out the Linux-specific feature in the ++ future to detect truncation. */ ++ if (__glibc_unlikely (*thisanssizp < *thisresplenp)) { ++ Dprint(statp->options & RES_DEBUG, ++ (stdout, ";; response may be truncated (UDP)\n") ++ ); ++ } ++ + HEADER *anhp = (HEADER *) *thisansp; + socklen_t fromlen = sizeof(struct sockaddr_in6); + assert (sizeof(from) <= fromlen); diff --git a/package/glibc/2.22/0002-microblaze-include-unix-sysdep.h.patch b/package/glibc/2.22/0002-microblaze-include-unix-sysdep.h.patch new file mode 100644 index 0000000000..28f4b6e0f1 --- /dev/null +++ b/package/glibc/2.22/0002-microblaze-include-unix-sysdep.h.patch @@ -0,0 +1,43 @@ +From 8415fb8d4f05c023b9d79e44dff197cc285fd1e5 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Thu, 6 Aug 2015 02:10:46 -0400 +Subject: [PATCH] microblaze: include unix/sysdep.h + +The semi-recent SYSCALL_CANCEL inclusion broke microblaze due to the +sysdep.h header not including the unix/sysdep.h header. Include it +here like all other ports. + +(cherry picked from commit 5d5de49c3ccd69f65b801f1ca490a0112d1cbd7d) + +Signed-off-by: Thomas Petazzoni +[edited to remove ChangeLog modifications, which cause conflicts.] +--- + sysdeps/unix/sysv/linux/microblaze/sysdep.h | 7 ++++++- + 2 files changed, 12 insertions(+), 1 deletion(-) + +diff --git a/sysdeps/unix/sysv/linux/microblaze/sysdep.h b/sysdeps/unix/sysv/linux/microblaze/sysdep.h +index 83c0340..9d5c542 100644 +--- a/sysdeps/unix/sysv/linux/microblaze/sysdep.h ++++ b/sysdeps/unix/sysv/linux/microblaze/sysdep.h +@@ -16,8 +16,11 @@ + License along with the GNU C Library; if not, see + . */ + ++#ifndef _LINUX_MICROBLAZE_SYSDEP_H ++#define _LINUX_MICROBLAZE_SYSDEP_H 1 ++ ++#include + #include +-#include + + /* Defines RTLD_PRIVATE_ERRNO. */ + #include +@@ -305,3 +308,5 @@ SYSCALL_ERROR_LABEL_DCL: \ + # define PTR_DEMANGLE(var) (void) (var) + + #endif /* not __ASSEMBLER__ */ ++ ++#endif /* _LINUX_MICROBLAZE_SYSDEP_H */ +-- +2.6.4 + diff --git a/package/glibc/2.22/0003-fix-CVE-2016-3075.patch b/package/glibc/2.22/0003-fix-CVE-2016-3075.patch new file mode 100644 index 0000000000..1ceb1f62f0 --- /dev/null +++ b/package/glibc/2.22/0003-fix-CVE-2016-3075.patch @@ -0,0 +1,44 @@ +From 883dceebc8f11921a9890211a4e202e5be17562f Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Tue, 29 Mar 2016 12:57:56 +0200 +Subject: [PATCH 1/1] CVE-2016-3075: Stack overflow in _nss_dns_getnetbyname_r [BZ #19879] + +The defensive copy is not needed because the name may not alias the +output buffer. + +(cherry picked from commit 317b199b4aff8cfa27f2302ab404d2bb5032b9a4) + +Signed-off-by: Bernd Kuhls +(downloaded from upstream git repo and removed changes to Changelog: + https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=883dceebc8f11921a9890211a4e202e5be17562f;hp=5a1a5f0dd2744044801c91bf2588444c29cda533) +--- + ChangeLog | 7 +++++++ + resolv/nss_dns/dns-network.c | 5 +---- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c +index 00f4490..89f8783 100644 +--- a/resolv/nss_dns/dns-network.c ++++ b/resolv/nss_dns/dns-network.c +@@ -118,17 +118,14 @@ _nss_dns_getnetbyname_r (const char *name, struct netent *result, + } net_buffer; + querybuf *orig_net_buffer; + int anslen; +- char *qbuf; + enum nss_status status; + + if (__res_maybe_init (&_res, 0) == -1) + return NSS_STATUS_UNAVAIL; + +- qbuf = strdupa (name); +- + net_buffer.buf = orig_net_buffer = (querybuf *) alloca (1024); + +- anslen = __libc_res_nsearch (&_res, qbuf, C_IN, T_PTR, net_buffer.buf->buf, ++ anslen = __libc_res_nsearch (&_res, name, C_IN, T_PTR, net_buffer.buf->buf, + 1024, &net_buffer.ptr, NULL, NULL, NULL, NULL); + if (anslen < 0) + { +-- +1.7.1 + diff --git a/package/glibc/2.23/0001-fix-CVE-2016-3075.patch b/package/glibc/2.23/0001-fix-CVE-2016-3075.patch new file mode 100644 index 0000000000..6b07116cb2 --- /dev/null +++ b/package/glibc/2.23/0001-fix-CVE-2016-3075.patch @@ -0,0 +1,47 @@ +From 146b58d11fddbef15b888906e3be4f33900c416f Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Tue, 29 Mar 2016 12:57:56 +0200 +Subject: [PATCH 1/1] CVE-2016-3075: Stack overflow in _nss_dns_getnetbyname_r [BZ #19879] + +The defensive copy is not needed because the name may not alias the +output buffer. + +(cherry picked from commit 317b199b4aff8cfa27f2302ab404d2bb5032b9a4) +(cherry picked from commit 883dceebc8f11921a9890211a4e202e5be17562f) + +Signed-off-by: Bernd Kuhls +(downloaded from upstream git repo and removed changes to files + Changelog and NEWS: + https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=146b58d11fddbef15b888906e3be4f33900c416f;hp=0eb234232eaf925fe4dca3bd60a3e1b4a7ab2882) +--- + ChangeLog | 7 +++++++ + NEWS | 10 ++++++++-- + resolv/nss_dns/dns-network.c | 5 +---- + 3 files changed, 16 insertions(+), 6 deletions(-) + +diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c +index 2eb2f67..8f301a7 100644 +--- a/resolv/nss_dns/dns-network.c ++++ b/resolv/nss_dns/dns-network.c +@@ -118,17 +118,14 @@ _nss_dns_getnetbyname_r (const char *name, struct netent *result, + } net_buffer; + querybuf *orig_net_buffer; + int anslen; +- char *qbuf; + enum nss_status status; + + if (__res_maybe_init (&_res, 0) == -1) + return NSS_STATUS_UNAVAIL; + +- qbuf = strdupa (name); +- + net_buffer.buf = orig_net_buffer = (querybuf *) alloca (1024); + +- anslen = __libc_res_nsearch (&_res, qbuf, C_IN, T_PTR, net_buffer.buf->buf, ++ anslen = __libc_res_nsearch (&_res, name, C_IN, T_PTR, net_buffer.buf->buf, + 1024, &net_buffer.ptr, NULL, NULL, NULL, NULL); + if (anslen < 0) + { +-- +1.7.1 + diff --git a/package/glibc/2.23/0002-gcc6.patch b/package/glibc/2.23/0002-gcc6.patch new file mode 100644 index 0000000000..f831cae2ca --- /dev/null +++ b/package/glibc/2.23/0002-gcc6.patch @@ -0,0 +1,88 @@ +From 5769d5d17cdb4770f1e08167b76c1684ad4e1f73 Mon Sep 17 00:00:00 2001 +From: Yvan Roux +Date: Fri, 15 Apr 2016 13:29:26 +0200 +Subject: [PATCH 1/1] Suppress GCC 6 warning about ambiguous 'else' with -Wparentheses + +(cherry picked from commit df1cf48777fe4cd81ad7fb09ecbe5b31432b7c1c) + +Signed-off-by: Bernd Kuhls +(downloaded from upstream git repo and removed changes to Changelog: + https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=5769d5d17cdb4770f1e08167b76c1684ad4e1f73;hp=f1e182acaaa84e844eb96462a92ba532e1c1fff4) +--- + ChangeLog | 5 +++++ + nis/nis_call.c | 20 +++++++++++--------- + stdlib/setenv.c | 26 ++++++++++++++------------ + 3 files changed, 30 insertions(+), 21 deletions(-) + +diff --git a/nis/nis_call.c b/nis/nis_call.c +index 3fa37e4..cb7839a 100644 +--- a/nis/nis_call.c ++++ b/nis/nis_call.c +@@ -680,16 +680,18 @@ nis_server_cache_add (const_nis_name name, int search_parent, + /* Choose which entry should be evicted from the cache. */ + loc = &nis_server_cache[0]; + if (*loc != NULL) +- for (i = 1; i < 16; ++i) +- if (nis_server_cache[i] == NULL) +- { ++ { ++ for (i = 1; i < 16; ++i) ++ if (nis_server_cache[i] == NULL) ++ { ++ loc = &nis_server_cache[i]; ++ break; ++ } ++ else if ((*loc)->uses > nis_server_cache[i]->uses ++ || ((*loc)->uses == nis_server_cache[i]->uses ++ && (*loc)->expires > nis_server_cache[i]->expires)) + loc = &nis_server_cache[i]; +- break; +- } +- else if ((*loc)->uses > nis_server_cache[i]->uses +- || ((*loc)->uses == nis_server_cache[i]->uses +- && (*loc)->expires > nis_server_cache[i]->expires)) +- loc = &nis_server_cache[i]; ++ } + old = *loc; + *loc = new; + +diff --git a/stdlib/setenv.c b/stdlib/setenv.c +index da61ee0..e66045f 100644 +--- a/stdlib/setenv.c ++++ b/stdlib/setenv.c +@@ -278,18 +278,20 @@ unsetenv (const char *name) + ep = __environ; + if (ep != NULL) + while (*ep != NULL) +- if (!strncmp (*ep, name, len) && (*ep)[len] == '=') +- { +- /* Found it. Remove this pointer by moving later ones back. */ +- char **dp = ep; +- +- do +- dp[0] = dp[1]; +- while (*dp++); +- /* Continue the loop in case NAME appears again. */ +- } +- else +- ++ep; ++ { ++ if (!strncmp (*ep, name, len) && (*ep)[len] == '=') ++ { ++ /* Found it. Remove this pointer by moving later ones back. */ ++ char **dp = ep; ++ ++ do ++ dp[0] = dp[1]; ++ while (*dp++); ++ /* Continue the loop in case NAME appears again. */ ++ } ++ else ++ ++ep; ++ } + + UNLOCK; + +-- +1.7.1 + diff --git a/package/glibc/Config.in b/package/glibc/Config.in new file mode 100644 index 0000000000..f719d5cd1b --- /dev/null +++ b/package/glibc/Config.in @@ -0,0 +1,59 @@ +if BR2_TOOLCHAIN_BUILDROOT_EGLIBC + +config BR2_PACKAGE_EGLIBC + bool + default y + select BR2_PACKAGE_LINUX_HEADERS + +choice + prompt "eglibc version" + default BR2_EGLIBC_VERSION_2_18 + +config BR2_EGLIBC_VERSION_2_18 + bool "2.18-svnr23787" + # Build breakage + depends on !BR2_sparc + +config BR2_EGLIBC_VERSION_2_19 + bool "2.19-svnr25243" + # Build breakage + depends on !BR2_powerpc_SPE + +endchoice + +endif + +if BR2_TOOLCHAIN_BUILDROOT_GLIBC + +config BR2_PACKAGE_GLIBC + bool + default y + select BR2_PACKAGE_LINUX_HEADERS + select BR2_TOOLCHAIN_HAS_SSP + +choice + prompt "glibc version" + default BR2_GLIBC_VERSION_2_22 + +config BR2_GLIBC_VERSION_2_22 + bool "2.22" + # No support for pthread barriers on < v9 ISA + depends on !BR2_sparc + # Too old to build with gcc >= 6.x + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_6 + +config BR2_GLIBC_VERSION_2_23 + bool "2.23" + # No support for pthread barriers on < v9 ISA + depends on !BR2_sparc + +endchoice + +endif + +config BR2_GLIBC_VERSION_STRING + string + default "2.18-svnr23787" if BR2_EGLIBC_VERSION_2_18 + default "2.19-svnr25243" if BR2_EGLIBC_VERSION_2_19 + default "2.22" if BR2_GLIBC_VERSION_2_22 + default "2.23" if BR2_GLIBC_VERSION_2_23 diff --git a/package/glibc/glibc.hash b/package/glibc/glibc.hash new file mode 100644 index 0000000000..b04f214741 --- /dev/null +++ b/package/glibc/glibc.hash @@ -0,0 +1,8 @@ +# Locally calculated after checking pgp signature (glibc) +# http://downloads.yoctoproject.org/releases/eglibc/*.{md5,sha1} (eglibc) +md5 b395b021422a027d89884992e91734fc eglibc-2.18-svnr23787.tar.bz2 +sha1 224d9e655e8f0ad04ffde47b97a11c64e2255b56 eglibc-2.18-svnr23787.tar.bz2 +md5 197836c2ba42fb146e971222647198dd eglibc-2.19-svnr25243.tar.bz2 +sha1 8013c1935b46fd50d2d1fbfad3b0af362b75fb28 eglibc-2.19-svnr25243.tar.bz2 +sha256 eb731406903befef1d8f878a46be75ef862b9056ab0cde1626d08a7a05328948 glibc-2.22.tar.xz +sha256 94efeb00e4603c8546209cefb3e1a50a5315c86fa9b078b6fad758e187ce13e9 glibc-2.23.tar.xz diff --git a/package/glibc/glibc.mk b/package/glibc/glibc.mk new file mode 100644 index 0000000000..2ae9cae861 --- /dev/null +++ b/package/glibc/glibc.mk @@ -0,0 +1,155 @@ +################################################################################ +# +# glibc/eglibc +# +################################################################################ + +GLIBC_VERSION = $(call qstrip,$(BR2_GLIBC_VERSION_STRING)) + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_EGLIBC),y) +GLIBC_SITE = http://downloads.yoctoproject.org/releases/eglibc +GLIBC_SOURCE = eglibc-$(GLIBC_VERSION).tar.bz2 +GLIBC_SRC_SUBDIR = libc +else +GLIBC_SITE = $(BR2_GNU_MIRROR)/libc +GLIBC_SOURCE = glibc-$(GLIBC_VERSION).tar.xz +GLIBC_SRC_SUBDIR = . +endif + +GLIBC_LICENSE = GPLv2+ (programs), LGPLv2.1+, BSD-3c, MIT (library) +GLIBC_LICENSE_FILES = $(addprefix $(GLIBC_SRC_SUBDIR)/,COPYING COPYING.LIB LICENSES) + +# glibc is part of the toolchain so disable the toolchain dependency +GLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO + +# Before (e)glibc is configured, we must have the first stage +# cross-compiler and the kernel headers +GLIBC_DEPENDENCIES = host-gcc-initial linux-headers host-gawk + +GLIBC_SUBDIR = build + +GLIBC_INSTALL_STAGING = YES + +GLIBC_INSTALL_STAGING_OPTS = install_root=$(STAGING_DIR) install + +# Thumb build is broken, build in ARM mode +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) +GLIBC_EXTRA_CFLAGS += -marm +endif + +# MIPS64 defaults to n32 so pass the correct -mabi if +# we are using a different ABI. OABI32 is also used +# in MIPS so we pass -mabi=32 in this case as well +# even though it's not strictly necessary. +ifeq ($(BR2_MIPS_NABI64),y) +GLIBC_EXTRA_CFLAGS += -mabi=64 +else ifeq ($(BR2_MIPS_OABI32),y) +GLIBC_EXTRA_CFLAGS += -mabi=32 +endif + +ifeq ($(BR2_ENABLE_DEBUG),y) +GLIBC_EXTRA_CFLAGS += -g +endif + +# The stubs.h header is not installed by install-headers, but is +# needed for the gcc build. An empty stubs.h will work, as explained +# in http://gcc.gnu.org/ml/gcc/2002-01/msg00900.html. The same trick +# is used by Crosstool-NG. +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_GLIBC),y) +define GLIBC_ADD_MISSING_STUB_H + mkdir -p $(STAGING_DIR)/usr/include/gnu + touch $(STAGING_DIR)/usr/include/gnu/stubs.h +endef +endif + +# Even though we use the autotools-package infrastructure, we have to +# override the default configure commands for several reasons: +# +# 1. We have to build out-of-tree, but we can't use the same +# 'symbolic link to configure' used with the gcc packages. +# +# 2. We have to execute the configure script with bash and not sh. +# +# Note that as mentionned in +# http://patches.openembedded.org/patch/38849/, eglibc/glibc must be +# built with -O2, so we pass our own CFLAGS and CXXFLAGS below. +define GLIBC_CONFIGURE_CMDS + mkdir -p $(@D)/build + # Do the configuration + (cd $(@D)/build; \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="-O2 $(GLIBC_EXTRA_CFLAGS)" CPPFLAGS="" \ + CXXFLAGS="-O2 $(GLIBC_EXTRA_CFLAGS)" \ + $(SHELL) $(@D)/$(GLIBC_SRC_SUBDIR)/configure \ + ac_cv_path_BASH_SHELL=/bin/bash \ + libc_cv_forced_unwind=yes \ + libc_cv_ssp=no \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --enable-shared \ + $(if $(BR2_SOFT_FLOAT),--without-fp,--with-fp) \ + $(if $(BR2_x86_64),--enable-lock-elision) \ + --with-pkgversion="Buildroot" \ + --without-cvs \ + --disable-profile \ + --without-gd \ + --enable-obsolete-rpc \ + --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) \ + --with-headers=$(STAGING_DIR)/usr/include) + $(GLIBC_ADD_MISSING_STUB_H) +endef + + +# +# We also override the install to target commands since we only want +# to install the libraries, and nothing more. +# + +GLIBC_LIBS_LIB = \ + ld*.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* libm.so.* \ + libnsl.so.* libpthread.so.* libresolv.so.* librt.so.* libutil.so.* \ + libnss_files.so.* libnss_dns.so.* + +ifeq ($(BR2_PACKAGE_GDB),y) +GLIBC_LIBS_LIB += libthread_db.so.* +endif + +define GLIBC_INSTALL_TARGET_CMDS + for libs in $(GLIBC_LIBS_LIB); do \ + $(call copy_toolchain_lib_root,$$libs) ; \ + done +endef + +# MIPS R6 requires to have NaN2008 support which is currently not +# supported by the Linux kernel. In order to prevent building the +# glibc against kernels not having NaN2008 support on platforms that +# requires it, glibc currently checks for an (inexisting) 10.0.0 +# kernel headers version. +# +# Since in practice the kernel support for NaN2008 is not really +# required for things to work properly, we adjust the glibc check to +# make it believe that NaN2008 support was added in the kernel +# starting from version 4.0.0. +# +# In general the compatibility issues introduced by mis-matched NaN +# encodings will not cause a problem as signalling NaNs are rarely used +# in average code. For MIPS R6 there isn't actually any compatibility +# issue as the hardware is always NaN2008 and software is always +# NaN2008. The problem only comes from when older MIPS code is linked in +# via a DSO and multiple NaN encodings are introduced. Since Buildroot +# is intended to have all code built from source then this scenario is +# highly unlikely. The failure mode, if it ever occurs, would be either +# that a signalling NaN fails to raise an invalid operation exception or +# (more likely) an ordinary NaN raises an invalid operation exception. +ifeq ($(BR2_mips_32r6)$(BR2_mips_64r6),y) +define GLIBC_FIX_MIPS_R6 + $(SED) 's#10.0.0#4.0.0#' \ + $(@D)/sysdeps/unix/sysv/linux/mips/configure \ + $(@D)/sysdeps/unix/sysv/linux/mips/configure.ac +endef +GLIBC_POST_EXTRACT_HOOKS += GLIBC_FIX_MIPS_R6 +endif + +$(eval $(autotools-package)) diff --git a/package/glibc/nsswitch.conf b/package/glibc/nsswitch.conf new file mode 100644 index 0000000000..5c384918d8 --- /dev/null +++ b/package/glibc/nsswitch.conf @@ -0,0 +1,13 @@ +# /etc/nsswitch.conf + +passwd: files +group: files +shadow: files + +hosts: files dns +networks: files dns + +protocols: files +services: files +ethers: files +rpc: files diff --git a/package/glibmm/Config.in b/package/glibmm/Config.in new file mode 100644 index 0000000000..fdbb43812c --- /dev/null +++ b/package/glibmm/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_GLIBMM + bool "glibmm" + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBSIGC + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + help + The GLibmm package is a set of C++ bindings for GLib. + + http://www.gtkmm.org/ + +comment "glibmm needs a toolchain w/ C++, wchar, threads, gcc >= 4.8" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR \ + || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/glibmm/glibmm.hash b/package/glibmm/glibmm.hash new file mode 100644 index 0000000000..82775e3080 --- /dev/null +++ b/package/glibmm/glibmm.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/glibmm/2.48/glibmm-2.48.1.sha256sum +sha256 dc225f7d2f466479766332483ea78f82dc349d59399d30c00de50e5073157cdf glibmm-2.48.1.tar.xz diff --git a/package/glibmm/glibmm.mk b/package/glibmm/glibmm.mk new file mode 100644 index 0000000000..741b45e854 --- /dev/null +++ b/package/glibmm/glibmm.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# glibmm +# +################################################################################ + +GLIBMM_VERSION_MAJOR = 2.48 +GLIBMM_VERSION = $(GLIBMM_VERSION_MAJOR).1 +GLIBMM_LICENSE = LGPLv2.1+ (library), GPLv2+ (tools) +GLIBMM_LICENSE_FILES = COPYING COPYING.tools +GLIBMM_SOURCE = glibmm-$(GLIBMM_VERSION).tar.xz +GLIBMM_SITE = http://ftp.gnome.org/pub/gnome/sources/glibmm/$(GLIBMM_VERSION_MAJOR) +GLIBMM_INSTALL_STAGING = YES +GLIBMM_DEPENDENCIES = libglib2 libsigc host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/glm/Config.in b/package/glm/Config.in new file mode 100644 index 0000000000..41b3608377 --- /dev/null +++ b/package/glm/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_GLM + bool "glm" + depends on BR2_INSTALL_LIBSTDCPP + help + OpenGL Mathematics (GLM) + + http://glm.g-truc.net + +comment "glm needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/glm/glm.mk b/package/glm/glm.mk new file mode 100644 index 0000000000..ff9423da17 --- /dev/null +++ b/package/glm/glm.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# glm +# +################################################################################ + +GLM_VERSION = 0.9.5.4 +GLM_SITE = $(call github,g-truc,glm,$(GLM_VERSION)) +GLM_LICENSE = MIT +GLM_LICENSE_FILES = copying.txt + +# GLM is a header-only library, it only makes sense +# to have it installed into the staging directory. +GLM_INSTALL_STAGING = YES +GLM_INSTALL_TARGET = NO + +$(eval $(cmake-package)) diff --git a/package/glmark2/Config.in b/package/glmark2/Config.in new file mode 100644 index 0000000000..c8380b1d34 --- /dev/null +++ b/package/glmark2/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_GLMARK2_EGL_GLES + bool + default y + depends on BR2_PACKAGE_MESA3D_OPENGL_EGL + depends on BR2_PACKAGE_MESA3D_OPENGL_ES + +config BR2_PACKAGE_GLMARK2_GL + bool + default y + depends on BR2_PACKAGE_HAS_LIBGL + depends on BR2_PACKAGE_MESA3D_DRI_DRIVER + +comment "glmark2 needs an OpenGL or an openGL ES and EGL backend provided by mesa3d" + depends on !BR2_PACKAGE_GLMARK2_GL && !BR2_PACKAGE_GLMARK2_EGL_GLES + +config BR2_PACKAGE_GLMARK2 + bool "glmark2" + depends on BR2_PACKAGE_GLMARK2_GL || BR2_PACKAGE_GLMARK2_EGL_GLES + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBPNG + help + glmark2 is an OpenGL 2.0 and ES 2.0 benchmark. + + https://github.com/glmark2/glmark2 diff --git a/package/glmark2/glmark2.mk b/package/glmark2/glmark2.mk new file mode 100644 index 0000000000..bd5b51a3f8 --- /dev/null +++ b/package/glmark2/glmark2.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# glmark2 +# +################################################################################ + +GLMARK2_VERSION = 499aa81a68fb4c8aac1c80f0d6a4cce05941c4cc +GLMARK2_SITE = $(call github,glmark2,glmark2,$(GLMARK2_VERSION)) +GLMARK2_LICENSE = GPLv3+ SGIv1 +GLMARK2_LICENSE_FILES = COPYING COPYING.SGI +GLMARK2_DEPENDENCIES = host-pkgconf host-python jpeg libpng \ + $(if $(BR2_PACKAGE_HAS_LIBEGL),libegl) \ + $(if $(BR2_PACKAGE_HAS_LIBGLES),libgles) \ + $(if $(BR2_PACKAGE_HAS_LIBGL),libgl) + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +GLMARK2_DEPENDENCIES += xlib_libX11 +ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGLES),yy) +GLMARK2_FLAVORS += x11-glesv2 +endif +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) +GLMARK2_FLAVORS += x11-gl +endif +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGLES),yy) +GLMARK2_FLAVORS += drm-glesv2 +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGL),yy) +GLMARK2_FLAVORS += drm-gl +endif + +ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGLES),yyy) +GLMARK2_DEPENDENCIES += wayland +GLMARK2_FLAVORS += wayland-glesv2 +endif + +ifeq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGL),yyy) +GLMARK2_DEPENDENCIES += wayland +GLMARK2_FLAVORS += wayland-gl +endif + +GLMARK2_CONF_OPTS += \ + --prefix=/usr \ + --with-flavors=$(subst $(space),$(comma),$(GLMARK2_FLAVORS)) + +define GLMARK2_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + $(GLMARK2_CONF_ENV) \ + $(HOST_DIR)/usr/bin/python2 ./waf configure $(GLMARK2_CONF_OPTS) \ + ) +endef + +define GLMARK2_BUILD_CMDS + cd $(@D) && $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/python2 ./waf +endef + +define GLMARK2_INSTALL_TARGET_CMDS + cd $(@D) && $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/python2 ./waf install --destdir=$(TARGET_DIR) +endef + +$(eval $(generic-package)) diff --git a/package/glog/Config.in b/package/glog/Config.in new file mode 100644 index 0000000000..f708758101 --- /dev/null +++ b/package/glog/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_GLOG + bool "glog" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + # build issues with this external toolchain + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX + help + C++ implementation of the Google logging module + + https://github.com/google/glog + +comment "glog needs a toolchain w/ C++, threads, dynamic library" + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/glog/glog.hash b/package/glog/glog.hash new file mode 100644 index 0000000000..dad15434d0 --- /dev/null +++ b/package/glog/glog.hash @@ -0,0 +1,2 @@ +# No hash for v0.3.4, comes from the github-helper: +none xxx glog-v0.3.4.tar.gz diff --git a/package/glog/glog.mk b/package/glog/glog.mk new file mode 100644 index 0000000000..aa7cacbdd3 --- /dev/null +++ b/package/glog/glog.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# glog +# +################################################################################ + +GLOG_VERSION = v0.3.4 +GLOG_SITE = $(call github,google,glog,$(GLOG_VERSION)) +GLOG_INSTALL_STAGING = YES +GLOG_LICENSE = BSD-3c +GLOG_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_GFLAGS),y) +GLOG_DEPENDENCIES = gflags +endif + +# glog can optionally use atomic __sync built-ins. However, its +# configure script only checks for the availability of the 4 bytes +# version, but the code also uses the 1 byte version. While this works +# on most architectures, it does not on architectures that implement +# only the 4 bytes version, such as Microblaze. So if the architecture +# does not implement the 1 byte version, we hint the configure script +# that atomic built-ins should not be used. +ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_1),) +GLOG_CONF_ENV += ac_cv___sync_val_compare_and_swap=no +endif + +$(eval $(autotools-package)) diff --git a/package/gmock/0001-force-use-python2.patch b/package/gmock/0001-force-use-python2.patch new file mode 100644 index 0000000000..5dcb231168 --- /dev/null +++ b/package/gmock/0001-force-use-python2.patch @@ -0,0 +1,20 @@ +Force use of Python 2 even when Python 3 is the default Python interpreter. + +Signed-off-by: Carlos Santos + +--- ./gtest/scripts/fuse_gtest_files.py.orig 2013-09-18 14:48:30.000000000 -0300 ++++ ./gtest/scripts/fuse_gtest_files.py 2015-07-22 15:42:53.291591205 -0300 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python2 + # + # Copyright 2009, Google Inc. + # All rights reserved. +--- ./scripts/generator/gmock_gen.py.orig 2013-09-18 14:50:15.000000000 -0300 ++++ ./scripts/generator/gmock_gen.py 2015-07-22 17:06:51.071815634 -0300 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python2 + # + # Copyright 2008 Google Inc. All Rights Reserved. + # diff --git a/package/gmock/Config.in b/package/gmock/Config.in new file mode 100644 index 0000000000..ec3eb921d1 --- /dev/null +++ b/package/gmock/Config.in @@ -0,0 +1,32 @@ +config BR2_PACKAGE_GMOCK + bool "gmock" + select BR2_PACKAGE_GTEST + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + help + Inspired by jMock, EasyMock, and Hamcrest, and designed with C++'s + specifics in mind, Google C++ Mocking Framework (or Google Mock for + short) is a library for writing and using C++ mock classes. + + Google Mock: + + * lets you create mock classes trivially using simple macros, + * supports a rich set of matchers and actions, + * handles unordered, partially ordered, or completely ordered + expectations, + * is extensible by users, and + * works on Linux, Mac OS X, Windows, Windows Mobile, minGW, and + Symbian. + + http://code.google.com/p/googlemock/ + + There are both host and target packages. The target one has include + files required to compile the tests and the static libraries required + to link/run them. The host package installs gmock_gen, a Python script + used to generate code mocks. + +comment "gmock needs a toolchain w/ C++, wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/gmock/gmock.hash b/package/gmock/gmock.hash new file mode 100644 index 0000000000..2b7173988f --- /dev/null +++ b/package/gmock/gmock.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 26fcbb5925b74ad5fc8c26b0495dfc96353f4d553492eb97e85a8a6d2f43095b gmock-1.7.0.zip diff --git a/package/gmock/gmock.mk b/package/gmock/gmock.mk new file mode 100644 index 0000000000..a0351d0ad6 --- /dev/null +++ b/package/gmock/gmock.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# gmock +# +################################################################################ + +# Make sure this remains the same version as the gtest one +GMOCK_VERSION = 1.7.0 +GMOCK_SOURCE = gmock-$(GMOCK_VERSION).zip +GMOCK_SITE = http://googlemock.googlecode.com/files +GMOCK_INSTALL_STAGING = YES +GMOCK_INSTALL_TARGET = NO +GMOCK_LICENSE = BSD-3c +GMOCK_LICENSE_FILES = LICENSE +GMOCK_DEPENDENCIES = gtest host-gmock + +# GMock 1.7.0 relies on Python 2.7 syntax which is NOT compatible with Python3. +HOST_GMOCK_DEPENDENCIES = host-python +HOST_GMOCK_PYTHONPATH=$(HOST_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages + +# Static linking is required in order to keep the GMock package completely +# separated from GTest. According to GMock's README file: +# +# "Google Mock can be used as a DLL, but the same DLL must contain Google +# Test as well. See Google Test's README file for instructions on how to +# set up necessary compiler settings". +GMOCK_CONF_OPTS = --enable-static --disable-shared + +define GMOCK_EXTRACT_CMDS + $(UNZIP) $(DL_DIR)/$(GMOCK_SOURCE) -d $(BUILD_DIR) +endef + +# We can't use the default rule for autotools-package staging because it fails +# because it tries to rebuild/install gtest stuff and fails after this error: +# "'make install' is dangerous and not supported. Instead, see README for +# how to integrate Google Test into your build system." +define GMOCK_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/lib/.libs/libgmock.a $(STAGING_DIR)/usr/lib/libgmock.a + $(INSTALL) -D -m 0755 $(@D)/lib/.libs/libgmock_main.a $(STAGING_DIR)/usr/lib/libgmock_main.a + $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/gmock/ + cp -rp $(@D)/include/gmock/* $(STAGING_DIR)/usr/include/gmock/ +endef + +# Unzipping inside $(@D) and moving everything from the created subdirectory is +# required because unzipping directly in $(BUILD_DIR) would cause host-gmock to +# overwrite the gmock subdir instead of unzipping in a host-gmock subdir. +define HOST_GMOCK_EXTRACT_CMDS + $(UNZIP) $(DL_DIR)/$(GMOCK_SOURCE) -d $(@D) + mv $(@D)/gmock-$(GMOCK_VERSION)/* $(@D) + rmdir $(@D)/gmock-$(GMOCK_VERSION) +endef + +define HOST_GMOCK_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/scripts/generator/gmock_gen.py $(HOST_DIR)/usr/bin/gmock_gen.py + ln -sf gmock_gen.py $(HOST_DIR)/usr/bin/gmock_gen + cp -rp $(@D)/scripts/generator/cpp $(HOST_GMOCK_PYTHONPATH) +endef + +$(eval $(autotools-package)) +# The host package does not build anything, just installs gmock_gen stuff, so +# it does not need to be a host-autotools-package. +$(eval $(host-generic-package)) diff --git a/package/gmp/Config.in b/package/gmp/Config.in new file mode 100644 index 0000000000..226e0887d8 --- /dev/null +++ b/package/gmp/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_GMP + bool "gmp" + help + GNU Multiple Precision Arithmetic Library. + + http://gmplib.org/ diff --git a/package/gmp/gmp.hash b/package/gmp/gmp.hash new file mode 100644 index 0000000000..e803623c00 --- /dev/null +++ b/package/gmp/gmp.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 68dadacce515b0f8a54f510edf07c1b636492bcdb8e8d54c56eb216225d16989 gmp-6.1.0.tar.xz diff --git a/package/gmp/gmp.mk b/package/gmp/gmp.mk new file mode 100644 index 0000000000..af6958de81 --- /dev/null +++ b/package/gmp/gmp.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# gmp +# +################################################################################ + +GMP_VERSION = 6.1.0 +GMP_SITE = $(BR2_GNU_MIRROR)/gmp +GMP_SOURCE = gmp-$(GMP_VERSION).tar.xz +GMP_INSTALL_STAGING = YES +GMP_LICENSE = LGPLv3+ +GMP_LICENSE_FILES = COPYING.LESSERv3 +GMP_DEPENDENCIES = host-m4 + +# GMP doesn't support assembly for r6 ISA yet +ifeq ($(BR2_mips_32r6)$(BR2_mips_64r6),y) +GMP_CONF_OPTS += --disable-assembly +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gmpc/Config.in b/package/gmpc/Config.in new file mode 100644 index 0000000000..43bc642d74 --- /dev/null +++ b/package/gmpc/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_GMPC + bool "gmpc" + depends on BR2_PACKAGE_LIBGTK2 + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_LIBMPD + select BR2_PACKAGE_LIBSOUP + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_XLIB_LIBICE + select BR2_PACKAGE_XLIB_LIBSM + select BR2_PACKAGE_XLIB_LIBX11 + help + Gnome Music Player Client is a GNOME/GTK2.2 client for + Music Player Daemon. + + http://gmpcwiki.sarine.nl/index.php?title=GMPC + +comment "gmpc needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_XORG7 && BR2_PACKAGE_LIBGTK2 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gmpc/gmpc.hash b/package/gmpc/gmpc.hash new file mode 100644 index 0000000000..cd39822c39 --- /dev/null +++ b/package/gmpc/gmpc.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 a69414f35396846733632ca9619921d7acda537ffd6d49bd84b444945cb76b2c gmpc-11.8.16.tar.gz diff --git a/package/gmpc/gmpc.mk b/package/gmpc/gmpc.mk new file mode 100644 index 0000000000..03d95d456c --- /dev/null +++ b/package/gmpc/gmpc.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# gmpc +# +################################################################################ + +GMPC_VERSION = 11.8.16 +GMPC_SITE = http://download.sarine.nl/Programs/gmpc/$(GMPC_VERSION) +GMPC_CONF_ENV = ac_cv_path_GOB2=$(GOB2_HOST_BINARY) +GMPC_CONF_OPTS = --disable-mmkeys --disable-unique +GMPC_LICENSE = GPLv2+ +GMPC_LICENSE_FILES = COPYING +GMPC_DEPENDENCIES = host-gob2 host-intltool host-pkgconf host-vala \ + libglib2 libgtk2 libmpd libsoup sqlite \ + xlib_libICE xlib_libSM xlib_libX11 \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +$(eval $(autotools-package)) diff --git a/package/gmrender-resurrect/Config.in b/package/gmrender-resurrect/Config.in new file mode 100644 index 0000000000..1a46225a37 --- /dev/null +++ b/package/gmrender-resurrect/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_GMRENDER_RESURRECT + bool "gmrender-resurrect" + depends on BR2_USE_WCHAR # gstreamer1 -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer1 -> libglib2, libupnp + depends on BR2_USE_MMU # gstreamer1 + # uses + depends on !BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BASE # run-time only + select BR2_PACKAGE_LIBUPNP + help + UPnP (DLNA) media renderer based on gstreamer + + https://github.com/hzeller/gmrender-resurrect + +comment "gmrender-resurrect needs an (e)glibc or uClibc toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_TOOLCHAIN_USES_MUSL diff --git a/package/gmrender-resurrect/gmrender-resurrect.hash b/package/gmrender-resurrect/gmrender-resurrect.hash new file mode 100644 index 0000000000..f41447a383 --- /dev/null +++ b/package/gmrender-resurrect/gmrender-resurrect.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 502129ecb097bf23ba011f18a8bf1923951ec2dc6da157f3b376383c5f99b623 gmrender-resurrect-aa3d02cf40321cf78a6ea9019e23a7f6cd091dee.tar.gz diff --git a/package/gmrender-resurrect/gmrender-resurrect.mk b/package/gmrender-resurrect/gmrender-resurrect.mk new file mode 100644 index 0000000000..18c6e01e6a --- /dev/null +++ b/package/gmrender-resurrect/gmrender-resurrect.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# gmrender-resurrect +# +################################################################################ + +GMRENDER_RESURRECT_VERSION = aa3d02cf40321cf78a6ea9019e23a7f6cd091dee +GMRENDER_RESURRECT_SITE = $(call github,hzeller,gmrender-resurrect,$(GMRENDER_RESURRECT_VERSION)) +# Original distribution does not have default configure, +# so we need to autoreconf: +GMRENDER_RESURRECT_AUTORECONF = YES +GMRENDER_RESURRECT_LICENSE = GPLv2+ +GMRENDER_RESURRECT_LICENSE_FILES = COPYING +GMRENDER_RESURRECT_DEPENDENCIES = gstreamer1 libupnp + +$(eval $(autotools-package)) diff --git a/package/gnu-efi/0001-Allow-CFLAGS-CPPFLAGS-to-be-completed-from-the-envir.patch b/package/gnu-efi/0001-Allow-CFLAGS-CPPFLAGS-to-be-completed-from-the-envir.patch new file mode 100644 index 0000000000..eee0a9a221 --- /dev/null +++ b/package/gnu-efi/0001-Allow-CFLAGS-CPPFLAGS-to-be-completed-from-the-envir.patch @@ -0,0 +1,80 @@ +From eea0f62a1f6712f10afe47635b80a061505d2d2f Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 17 Jan 2015 18:33:37 +0100 +Subject: [PATCH 1/2] Allow CFLAGS/CPPFLAGS to be completed from the + environment + +Buildroot passes its own CPPFLAGS and CFLAGS in the environment, so +the CFLAGS += and CPPFLAGS += statements in gnu-efi Makefile have no +effect. Change these to override += so that they extend the +flags passed by Buildroot. + +[Romain: + - rebase on top of 3.0.1 release] + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Romain Naour +--- + Make.defaults | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/Make.defaults b/Make.defaults +index 169273d..b0ddea0 100644 +--- a/Make.defaults ++++ b/Make.defaults +@@ -80,14 +80,14 @@ endif + # + + # Arch-specific compilation flags +-CPPFLAGS += -DCONFIG_$(ARCH) ++override CPPFLAGS += -DCONFIG_$(ARCH) + + ifeq ($(ARCH),ia64) +- CFLAGS += -mfixed-range=f32-f127 ++ override CFLAGS += -mfixed-range=f32-f127 + endif + + ifeq ($(ARCH),ia32) +- CFLAGS += -mno-mmx -mno-sse ++ override CFLAGS += -mno-mmx -mno-sse + ifeq ($(HOSTARCH),x86_64) + ARCH3264 = -m32 + endif +@@ -103,10 +103,10 @@ ifeq ($(ARCH),x86_64) + && [ $(GCCMINOR) -ge "7" ] ) ) \ + && echo 1) + ifeq ($(GCCNEWENOUGH),1) +- CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11 ++ override CPPFLAGS += -DGNU_EFI_USE_MS_ABI -maccumulate-outgoing-args --std=c11 + endif + +- CFLAGS += -mno-red-zone -mno-mmx -mno-sse ++ override CFLAGS += -mno-red-zone -mno-mmx -mno-sse + ifeq ($(HOSTARCH),ia32) + ARCH3264 = -m64 + endif +@@ -127,7 +127,7 @@ export LIBGCC=$(shell $(CC) $(ARCH3264) -print-libgcc-file-name) + endif + + ifeq ($(ARCH),arm) +-CFLAGS += -marm ++override CFLAGS += -marm + endif + + # Generic compilation flags +@@ -135,10 +135,10 @@ INCDIR += -I$(SRCDIR) -I$(TOPDIR)/inc -I$(TOPDIR)/inc/$(ARCH) \ + -I$(TOPDIR)/inc/protocol + + ifeq (FreeBSD, $(findstring FreeBSD, $(OS))) +-CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \ ++override CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \ + -ffreestanding -fno-stack-protector + else +-CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \ ++override CFLAGS += $(ARCH3264) -O2 -fpic -Wall -fshort-wchar -fno-strict-aliasing \ + -fno-merge-constants -ffreestanding -fno-stack-protector \ + -fno-stack-check + endif +-- +1.9.3 + diff --git a/package/gnu-efi/0002-Fix-parallel-make-failure-for-archives.patch b/package/gnu-efi/0002-Fix-parallel-make-failure-for-archives.patch new file mode 100644 index 0000000000..6e12388d10 --- /dev/null +++ b/package/gnu-efi/0002-Fix-parallel-make-failure-for-archives.patch @@ -0,0 +1,57 @@ +From 7e9a26b0fc0bd8ed64a5eced5ea78bcea8ae3bbc Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 17 Jan 2015 18:44:04 +0100 +Subject: [PATCH 2/2] Fix parallel make failure for archives + +Upstream-Status: Pending + +The lib and gnuefi makefiles were using the lib.a() form which compiles +and ar's as a pair instead of compiling all and then ar'ing which can +parallelize better. This was resulting in build failures on larger values +of -j. + +See http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_toc.html#TOC105 +for details. + +[Romain: + - rebase on top of 3.0.1 release] + +Signed-off-by: Saul Wold +Signed-off-by: Darren Hart +Signed-off-by: Romain Naour +--- + gnuefi/Makefile | 3 ++- + lib/Makefile | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/gnuefi/Makefile b/gnuefi/Makefile +index d234ac0..d29575d 100644 +--- a/gnuefi/Makefile ++++ b/gnuefi/Makefile +@@ -54,7 +54,8 @@ TARGETS = crt0-efi-$(ARCH).o libgnuefi.a + + all: $(TARGETS) + +-libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS)) ++libgnuefi.a: $(OBJS) ++ $(AR) rv $@ $(OBJS) + + clean: + rm -f $(TARGETS) *~ *.o $(OBJS) +diff --git a/lib/Makefile b/lib/Makefile +index 019ad57..c6abcae 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -73,7 +73,8 @@ all: libsubdirs libefi.a + libsubdirs: + for sdir in $(SUBDIRS); do mkdir -p $$sdir; done + +-libefi.a: $(patsubst %,libefi.a(%),$(OBJS)) ++libefi.a: $(OBJS) ++ $(AR) rv $@ $(OBJS) + + clean: + rm -f libefi.a *~ $(OBJS) */*.o +-- +1.9.3 + diff --git a/package/gnu-efi/Config.in b/package/gnu-efi/Config.in new file mode 100644 index 0000000000..982102faa5 --- /dev/null +++ b/package/gnu-efi/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_GNU_EFI + bool "gnu-efi" + depends on BR2_i386 || BR2_x86_64 + help + Develop EFI applications for IA-64 (IPF), IA-32 (x86), and + x86_64 platforms using the GNU toolchain and the EFI + development environment. + + http://gnu-efi.sourceforge.net/ diff --git a/package/gnu-efi/gnu-efi.hash b/package/gnu-efi/gnu-efi.hash new file mode 100644 index 0000000000..21033bddc2 --- /dev/null +++ b/package/gnu-efi/gnu-efi.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/gnu-efi/files +md5 c4099c443b6b0c2b04dedc33e7814ec0 gnu-efi-3.0.1.tar.bz2 +sha1 07eea4d72f7ecb7229aaa77ddd411de5673c67b6 gnu-efi-3.0.1.tar.bz2 diff --git a/package/gnu-efi/gnu-efi.mk b/package/gnu-efi/gnu-efi.mk new file mode 100644 index 0000000000..a11ff819ca --- /dev/null +++ b/package/gnu-efi/gnu-efi.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# gnu-efi +# +################################################################################ + +GNU_EFI_VERSION = 3.0.1 +GNU_EFI_SOURCE = gnu-efi-$(GNU_EFI_VERSION).tar.bz2 +GNU_EFI_SITE = http://downloads.sourceforge.net/project/gnu-efi +GNU_EFI_INSTALL_STAGING = YES +GNU_EFI_LICENSE = BSD-3c and/or GPLv2+ (gnuefi), BSD-3c (efilib) +GNU_EFI_LICENSE_FILES = README.efilib + +# gnu-efi is a set of library and header files used to build +# standalone EFI applications such as bootloaders. There is no point +# in installing these libraries to the target. +GNU_EFI_INSTALL_TARGET = NO + +ifeq ($(BR2_i386),y) +GNU_EFI_PLATFORM = ia32 +else ifeq ($(BR2_x86_64),y) +GNU_EFI_PLATFORM = x86_64 +endif + +define GNU_EFI_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + $(TARGET_CONFIGURE_OPTS) \ + ARCH=$(GNU_EFI_PLATFORM) +endef + +define GNU_EFI_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + $(TARGET_CONFIGURE_OPTS) \ + INSTALLROOT=$(STAGING_DIR) \ + PREFIX=/usr ARCH=$(GNU_EFI_PLATFORM) install +endef + +$(eval $(generic-package)) diff --git a/package/gnuchess/0001-fix-static-build-with-uClibc.patch b/package/gnuchess/0001-fix-static-build-with-uClibc.patch new file mode 100644 index 0000000000..20a0835e6d --- /dev/null +++ b/package/gnuchess/0001-fix-static-build-with-uClibc.patch @@ -0,0 +1,47 @@ +From 5bb2bc6384024c2344ef5cc6785131b382c38170 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 10 May 2015 22:19:03 +0200 +Subject: [PATCH] fix static build with uClibc + +uClibc doesn't provide lintl which should be provided +by gettext. If gnuchess is linked statically, -lintl should +be placed after libfrontend.a libadapter.a libengine.a. + +Fixes: +http://autobuild.buildroot.net/results/dcb/dcb1c0eb7212bd8d1e0d8b51fd517b73b7569cea/ + +Signed-off-by: Romain Naour +--- + src/Makefile.am | 2 +- + src/Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index ba90bce..fc02543 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -34,7 +34,7 @@ DEFS = -DLOCALEDIR=\"$(localedir)\" @DEFS@ + DISTCLEANFILES = *~ + + SUBDIRS = frontend adapter engine +-gnuchess_LDADD = $(LIBINTL) frontend/libfrontend.a adapter/libadapter.a engine/libengine.a ++gnuchess_LDADD = frontend/libfrontend.a adapter/libadapter.a engine/libengine.a $(LIBINTL) + + configmake.h: Makefile + rm -f $@-t $@ +diff --git a/src/Makefile.in b/src/Makefile.in +index 9460bfd..424da52 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -395,7 +395,7 @@ AM_LDFLAGS = $(PTHREAD_LDFLAGS) $(PTHREAD_LIBS) + AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_builddir)/lib + DISTCLEANFILES = *~ + SUBDIRS = frontend adapter engine +-gnuchess_LDADD = $(LIBINTL) frontend/libfrontend.a adapter/libadapter.a engine/libengine.a ++gnuchess_LDADD = frontend/libfrontend.a adapter/libadapter.a engine/libengine.a $(LIBINTL) + BUILT_SOURCES = configmake.h + CLEANFILES = configmake.h configmake.h-t + all: $(BUILT_SOURCES) config.h +-- +1.9.3 + diff --git a/package/gnuchess/Config.in b/package/gnuchess/Config.in new file mode 100644 index 0000000000..4993b1adf0 --- /dev/null +++ b/package/gnuchess/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_GNUCHESS + bool "gnuchess" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_FLEX + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + GNU Chess lets most modern computers play a full game of chess. + + http://ftp.gnu.org/pub/gnu/chess + +comment "gnuchess needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gnuchess/gnuchess.hash b/package/gnuchess/gnuchess.hash new file mode 100644 index 0000000000..26342bccd3 --- /dev/null +++ b/package/gnuchess/gnuchess.hash @@ -0,0 +1,2 @@ +# sha256 locally computed +sha256 17caab725539447bcb17a14b17905242cbf287087e53a6777524feb7bbaeed06 gnuchess-6.2.1.tar.gz diff --git a/package/gnuchess/gnuchess.mk b/package/gnuchess/gnuchess.mk new file mode 100644 index 0000000000..0555cb17b4 --- /dev/null +++ b/package/gnuchess/gnuchess.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# gnuchess +# +################################################################################ + +GNUCHESS_VERSION = 6.2.1 +GNUCHESS_SITE = $(BR2_GNU_MIRROR)/chess +GNUCHESS_LICENSE = GPLv2+ +GNUCHESS_LICENSE_FILES = COPYING + +GNUCHESS_DEPENDENCIES = host-flex flex +GNUCHESS_DEPENDENCIES += $(if $(BR2_PACKAGE_READLINE),readline) \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +$(eval $(autotools-package)) diff --git a/package/gnupg/Config.in b/package/gnupg/Config.in new file mode 100644 index 0000000000..30f215fed8 --- /dev/null +++ b/package/gnupg/Config.in @@ -0,0 +1,46 @@ +config BR2_PACKAGE_GNUPG + bool "gnupg" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_NCURSES + depends on !BR2_PACKAGE_GNUPG2 + help + GnuPG is the GNU project's complete and free implementation + of the OpenPGP standard as defined by RFC4880. GnuPG allows + to encrypt and sign your data and communication, features a + versatile key management system as well as access modules + for all kinds of public key directories. GnuPG, also known + as GPG, is a command line tool with features for easy + integration with other applications. + + http://gnupg.org/ + +if BR2_PACKAGE_GNUPG + +config BR2_PACKAGE_GNUPG_AES + bool "AES support" + help + Support for the AES cipher + +config BR2_PACKAGE_GNUPG_RSA + bool "RSA support" + help + Support for RSA public key algorithm + +config BR2_PACKAGE_GNUPG_GPGV + bool "gpgv" + help + gpgv is an OpenPGP signature verification tool. + + This program is actually a stripped-down version of gpg + which is only able to check signatures. It is somewhat + smaller than the fully-blown gpg and uses a different (and + simpler) way to check that the public keys used to make the + signature are valid. There are no configuration files and + only a few options are implemented. + +config BR2_PACKAGE_GNUPG_GPGSPLIT + bool "gpgsplit" + help + gpgsplit splits an OpenPGP message into packets. + +endif diff --git a/package/gnupg/gnupg.hash b/package/gnupg/gnupg.hash new file mode 100644 index 0000000000..f872d24d5c --- /dev/null +++ b/package/gnupg/gnupg.hash @@ -0,0 +1,2 @@ +# From https://lists.gnupg.org/pipermail/gnupg-announce/2015q4/000382.html +sha1 cbc9d960e3d8488c32675019a79fbfbf8680387e gnupg-1.4.20.tar.bz2 diff --git a/package/gnupg/gnupg.mk b/package/gnupg/gnupg.mk new file mode 100644 index 0000000000..8893a1cc68 --- /dev/null +++ b/package/gnupg/gnupg.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# gnupg +# +################################################################################ + +GNUPG_VERSION = 1.4.20 +GNUPG_SOURCE = gnupg-$(GNUPG_VERSION).tar.bz2 +GNUPG_SITE = ftp://ftp.gnupg.org/gcrypt/gnupg +GNUPG_LICENSE = GPLv3+ +GNUPG_LICENSE_FILES = COPYING +GNUPG_DEPENDENCIES = zlib ncurses $(if $(BR2_PACKAGE_LIBICONV),libiconv) +GNUPG_CONF_ENV = ac_cv_sys_symbol_underscore=no +GNUPG_CONF_OPTS = --disable-rpath --enable-minimal --disable-regex + +ifeq ($(BR2_PACKAGE_BZIP2),y) +GNUPG_CONF_OPTS += --enable-bzip2 +GNUPG_DEPENDENCIES += bzip2 +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +GNUPG_CONF_ENV += ac_cv_path__libcurl_config=$(STAGING_DIR)/usr/bin/curl-config +GNUPG_DEPENDENCIES += libcurl +else +GNUPG_CONF_OPTS += --without-libcurl +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +GNUPG_DEPENDENCIES += readline +else +GNUPG_CONF_OPTS += --without-readline +endif + +ifeq ($(BR2_PACKAGE_GNUPG_AES),y) +GNUPG_CONF_OPTS += --enable-aes +else +GNUPG_CONF_OPTS += --disable-aes +endif + +ifeq ($(BR2_PACKAGE_GNUPG_RSA),y) +GNUPG_CONF_OPTS += --enable-rsa +else +GNUPG_CONF_OPTS += --disable-rsa +endif + +ifneq ($(BR2_PACKAGE_GNUPG_GPGV),y) +define GNUPG_REMOVE_GPGV + rm -f $(TARGET_DIR)/usr/bin/gpgv +endef +GNUPG_POST_INSTALL_TARGET_HOOKS += GNUPG_REMOVE_GPGV +endif + +ifneq ($(BR2_PACKAGE_GNUPG_GPGSPLIT),y) +define GNUPG_REMOVE_GPGSPLIT + rm -f $(TARGET_DIR)/usr/bin/gpgsplit +endef +GNUPG_POST_INSTALL_TARGET_HOOKS += GNUPG_REMOVE_GPGSPLIT +endif + +$(eval $(autotools-package)) diff --git a/package/gnupg2/0001-fix-pth-config-usage.patch b/package/gnupg2/0001-fix-pth-config-usage.patch new file mode 100644 index 0000000000..756d351397 --- /dev/null +++ b/package/gnupg2/0001-fix-pth-config-usage.patch @@ -0,0 +1,24 @@ +Fix usage of PTH_CONFIG to work with pthsem + +The pthsem re-implement of pth provides a compatibility layer for pth, +but its pth-config script behaves slightly differently than the +original one when reporting the version number. This patch to gnupg2's +configure script adjusts the version checking to support this +difference, since Buildroot uses pth-config from pthsem. + +Signed-off-by: Thomas Petazzoni +[yann.morin.1998@free.fr: adapt to patch m4 macro for autoreconfiguring] +Signed-off-by: "Yann E. MORIN" + +diff -durN gnupg2-2.0.29.orig/m4/gnupg-pth.m4 gnupg2-2.0.29/m4/gnupg-pth.m4 +--- gnupg2-2.0.29.orig/m4/gnupg-pth.m4 2015-09-08 14:39:24.000000000 +0200 ++++ gnupg2-2.0.29/m4/gnupg-pth.m4 2015-12-16 18:30:54.336513493 +0100 +@@ -17,7 +17,7 @@ + # Taken and modified from the m4 macros which come with Pth. + AC_DEFUN([GNUPG_PTH_VERSION_CHECK], + [ +- _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print [$]3}'` ++ _pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print [$]2}'` + _req_version="ifelse([$1],,1.2.0,$1)" + + AC_MSG_CHECKING(for PTH - version >= $_req_version) diff --git a/package/gnupg2/0002-missing-include.patch b/package/gnupg2/0002-missing-include.patch new file mode 100644 index 0000000000..f20994cedb --- /dev/null +++ b/package/gnupg2/0002-missing-include.patch @@ -0,0 +1,15 @@ +tools/watchgnupg: select() is from sys/select.h + +Signed-off-by: "Yann E. MORIN" + +diff -durN gnupg2-2.0.29.orig/tools/watchgnupg.c gnupg2-2.0.29/tools/watchgnupg.c +--- gnupg2-2.0.29.orig/tools/watchgnupg.c 2015-09-08 14:39:24.000000000 +0200 ++++ gnupg2-2.0.29/tools/watchgnupg.c 2015-12-16 18:17:17.758057787 +0100 +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #define PGM "watchgnupg" + diff --git a/package/gnupg2/0003-dont-run-tests.patch b/package/gnupg2/0003-dont-run-tests.patch new file mode 100644 index 0000000000..1858a0de09 --- /dev/null +++ b/package/gnupg2/0003-dont-run-tests.patch @@ -0,0 +1,39 @@ +tests: really don't run tests in cross-compilation + +Signed-off-by: "Yann E. MORIN" + +diff -durN gnupg2-2.0.29.orig/tests/Makefile.am gnupg2-2.0.29/tests/Makefile.am +--- gnupg2-2.0.29.orig/tests/Makefile.am 2015-09-08 14:39:24.000000000 +0200 ++++ gnupg2-2.0.29/tests/Makefile.am 2015-12-16 18:27:55.778227183 +0100 +@@ -64,6 +64,7 @@ + asschk_SOURCES = asschk.c + + ++if RUN_GPG_TESTS + all-local: inittests.stamp + + clean-local: +@@ -72,4 +73,5 @@ + inittests.stamp: inittests + srcdir=$(srcdir) $(TESTS_ENVIRONMENT) $(srcdir)/inittests + echo timestamp >./inittests.stamp ++endif # RUN_GPG_TESTS + +diff -durN gnupg2-2.0.29.orig/tests/pkits/Makefile.am gnupg2-2.0.29/tests/pkits/Makefile.am +--- gnupg2-2.0.29.orig/tests/pkits/Makefile.am 2015-09-01 08:52:21.000000000 +0200 ++++ gnupg2-2.0.29/tests/pkits/Makefile.am 2015-12-16 18:44:06.422655594 +0100 +@@ -52,6 +52,7 @@ + + DISTCLEANFILES = pubring.kbx~ random_seed + ++if RUN_GPG_TESTS + all-local: inittests.stamp + + clean-local: +@@ -71,5 +72,5 @@ + elif test $$? -eq 77; then echo "- SKIP $$tst"; \ + fi; \ + done +- ++endif # RUN_GPG_TESTS + diff --git a/package/gnupg2/0004-silence-git-when-not-in-git-tree.patch b/package/gnupg2/0004-silence-git-when-not-in-git-tree.patch new file mode 100644 index 0000000000..5eaefe4bda --- /dev/null +++ b/package/gnupg2/0004-silence-git-when-not-in-git-tree.patch @@ -0,0 +1,26 @@ +configure: silence autoreconf when not in a git tree + +When autoreconfiguring ourside of a git tree, the output is verbose +with git errors. + +Silence that by consigning stderr to oblivion. + +Signed-off-by: "Yann E. MORIN" + +diff -durN gnupg2-2.0.29.orig/configure.ac gnupg2-2.0.29/configure.ac +--- gnupg2-2.0.29.orig/configure.ac 2015-09-08 14:39:24.000000000 +0200 ++++ gnupg2-2.0.29/configure.ac 2015-12-16 18:34:47.099493863 +0100 +@@ -33,11 +33,11 @@ + # flag indicating a development version (mym4_isgit). Note that the + # m4 processing is done by autoconf and not during the configure run. + m4_define([mym4_revision], +- m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r'])) ++ m4_esyscmd([git rev-parse --short HEAD 2>/dev/null | tr -d '\n\r'])) + m4_define([mym4_revision_dec], + m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))])) + m4_define([mym4_betastring], +- m4_esyscmd_s([git describe --match 'gnupg-2.[0-9].*[0-9]' --long|\ ++ m4_esyscmd_s([git describe --match 'gnupg-2.[0-9].*[0-9]' --long 2>/dev/null |\ + awk -F- '$3!=0{print"-beta"$3}'])) + m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes])) + m4_define([mym4_full_version],[mym4_version[]mym4_betastring]) diff --git a/package/gnupg2/Config.in b/package/gnupg2/Config.in new file mode 100644 index 0000000000..e246fd79e3 --- /dev/null +++ b/package/gnupg2/Config.in @@ -0,0 +1,42 @@ +comment "gnupg2 needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_GNUPG2 + bool "gnupg2" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LIBGPG_ERROR + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBASSUAN + select BR2_PACKAGE_LIBKSBA + select BR2_PACKAGE_LIBPTHSEM + select BR2_PACKAGE_LIBPTHSEM_COMPAT + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on BR2_USE_MMU # libassuan + depends on !BR2_STATIC_LIBS + help + GnuPG is the GNU project's complete and free implementation + of the OpenPGP standard as defined by RFC4880. GnuPG allows + to encrypt and sign your data and communication, features a + versatile key management system as well as access modules + for all kinds of public key directories. GnuPG, also known + as GPG, is a command line tool with features for easy + integration with other applications. + + http://gnupg.org/ + +if BR2_PACKAGE_GNUPG2 + +config BR2_PACKAGE_GNUPG2_GPGV2 + bool "gpgv2" + help + gpgv2 is an OpenPGP signature verification tool. + + This program is actually a stripped-down version of gpg + which is only able to check signatures. It is somewhat + smaller than the fully-blown gpg and uses a different (and + simpler) way to check that the public keys used to make the + signature are valid. There are no configuration files and + only a few options are implemented. + +endif diff --git a/package/gnupg2/gnupg2.hash b/package/gnupg2/gnupg2.hash new file mode 100644 index 0000000000..67f7d9da36 --- /dev/null +++ b/package/gnupg2/gnupg2.hash @@ -0,0 +1,4 @@ +# From https://lists.gnupg.org/pipermail/gnupg-announce/2016q1/000385.html +sha1 a9f024588c356a55e2fd413574bfb55b2e18794a gnupg-2.0.30.tar.bz2 +# Calculated based on the hash above +sha256 e329785a4f366ba5d72c2c678a7e388b0892ac8440c2f4e6810042123c235d71 gnupg-2.0.30.tar.bz2 diff --git a/package/gnupg2/gnupg2.mk b/package/gnupg2/gnupg2.mk new file mode 100644 index 0000000000..763e9454a9 --- /dev/null +++ b/package/gnupg2/gnupg2.mk @@ -0,0 +1,55 @@ +################################################################################ +# +# gnupg2 +# +################################################################################ + +GNUPG2_VERSION = 2.0.30 +GNUPG2_SOURCE = gnupg-$(GNUPG2_VERSION).tar.bz2 +GNUPG2_SITE = ftp://ftp.gnupg.org/gcrypt/gnupg +GNUPG2_LICENSE = GPLv3+ +GNUPG2_LICENSE_FILES = COPYING +GNUPG2_DEPENDENCIES = zlib libgpg-error libgcrypt libassuan libksba libpthsem \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +# Patching configure.ac and m4 macros, as well as Makefile.am +GNUPG2_AUTORECONF = YES + +GNUPG2_CONF_OPTS = \ + --disable-rpath --disable-regex --disable-doc \ + --with-libgpg-error-prefix=$(STAGING_DIR)/usr \ + --with-libgcrypt-prefix=$(STAGING_DIR)/usr \ + --with-libassuan-prefix=$(STAGING_DIR)/usr \ + --with-ksba-prefix=$(STAGING_DIR)/usr \ + --with-pth-prefix=$(STAGING_DIR)/usr +GNUPG2_CONF_ENV = gl_cv_header_working_stdint_h=yes + +ifneq ($(BR2_PACKAGE_GNUPG2_GPGV2),y) +define GNUPG2_REMOVE_GPGV2 + rm -f $(TARGET_DIR)/usr/bin/gpgv2 +endef +GNUPG2_POST_INSTALL_TARGET_HOOKS += GNUPG2_REMOVE_GPGV2 +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +GNUPG2_CONF_OPTS += --enable-bzip2 --with-bzip2=$(STAGING_DIR) +GNUPG2_DEPENDENCIES += bzip2 +else +GNUPG2_CONF_OPTS += --disable-bzip2 +endif + +ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y) +GNUPG2_CONF_OPTS += --enable-ccid-driver +GNUPG2_DEPENDENCIES += libusb-compat +else +GNUPG2_CONF_OPTS += --disable-ccid-driver +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +GNUPG2_CONF_OPTS += --with-readline=$(STAGING_DIR) +GNUPG2_DEPENDENCIES += readline +else +GNUPG2_CONF_OPTS += --without-readline +endif + +$(eval $(autotools-package)) diff --git a/package/gnuplot/0001-configure-add-without-demo-option.patch b/package/gnuplot/0001-configure-add-without-demo-option.patch new file mode 100644 index 0000000000..ccca4e3aa7 --- /dev/null +++ b/package/gnuplot/0001-configure-add-without-demo-option.patch @@ -0,0 +1,66 @@ +Add options to enable/disable docs and demos + +Originally written by Anthony Viallard +. + +Signed-off-by: Thomas Petazzoni + +Index: gnuplot-4.6.0/configure.in +=================================================================== +--- gnuplot-4.6.0.orig/configure.in 2012-03-08 05:34:42.000000000 +0100 ++++ gnuplot-4.6.0/configure.in 2013-01-07 11:50:03.003804463 +0100 +@@ -748,6 +748,16 @@ + AC_ARG_WITH(lisp-files,dnl + [ --without-lisp-files do not build emacs lisp files]) + ++dnl Whether we want to build the demo files ++dnl Does nothing here, is passed on to the demo subdir ++AC_ARG_ENABLE(demo,dnl ++[ --disable-demo do not build demo files]) ++ ++dnl Whether we want to build the doc files ++dnl Does nothing here, is passed on to the doc subdir ++AC_ARG_ENABLE(doc,dnl ++[ --disable-doc do not build doc files]) ++ + dnl Sort help/subtopic tables by row or column + AC_ARG_WITH(row-help,dnl + [ --with-row-help format help and subtopic tables by row (default) +@@ -1200,6 +1210,24 @@ + fi + AC_SUBST(LISPDIR) + ++dnl build demo files ++if test "$enable_demo" != no; then ++ AC_CONFIG_SUBDIRS(demo) ++ DEMOSUBDIR=demo ++else ++ DEMOSUBDIR= ++fi ++AC_SUBST(DEMOSUBDIR) ++ ++dnl build doc files ++if test "$enable_doc" != no; then ++ AC_CONFIG_SUBDIRS(docs) ++ DOCSUBDIR=docs ++else ++ DOCSUBDIR= ++fi ++AC_SUBST(DOCSUBDIR) ++ + dnl Substitute variables + AC_SUBST(PACKAGE) + AC_SUBST(VERSION_MAJOR) +Index: gnuplot-4.6.0/Makefile.am +=================================================================== +--- gnuplot-4.6.0.orig/Makefile.am 2013-01-04 14:07:02.239120935 +0100 ++++ gnuplot-4.6.0/Makefile.am 2013-01-07 11:51:12.034846363 +0100 +@@ -1,7 +1,7 @@ + ## Process this file with automake to produce Makefile.in -*-Makefile-*- + AUTOMAKE_OPTIONS = foreign 1.2h + +-SUBDIRS = config m4 term src docs $(LISPDIR) man demo tutorial share ++SUBDIRS = config m4 term src $(DOCSUBDIR) $(LISPDIR) man $(DEMOSUBDIR) tutorial share + + EXTRA_DIST = BUGS CodeStyle Copyright FAQ.pdf GNUmakefile INSTALL INSTALL.gnu \ + Makefile.maint PATCHLEVEL PGPKEYS PORTING README README.1ST \ diff --git a/package/gnuplot/0002-use-gdlib-config-properly.patch b/package/gnuplot/0002-use-gdlib-config-properly.patch new file mode 100644 index 0000000000..690a82652a --- /dev/null +++ b/package/gnuplot/0002-use-gdlib-config-properly.patch @@ -0,0 +1,27 @@ +Fix usage of gdlib-config + +gnuplot configure.in script properly takes care of finding +gdlib-config using AC_PATH_PROG... but then directly uses gdlib-config +instead of going through the GDLIB_CONFIG variable that AC_PATH_PROG +has defined. Which means that whenever a gdlib-config binary not in +the PATH is being used, it does not use it. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -537,9 +537,9 @@ + if test "$with_gd" != no; then + AC_PATH_PROG([GDLIB_CONFIG], [gdlib-config]) + if test -n "$GDLIB_CONFIG"; then +- libgd_CPPFLAGS=`gdlib-config --cflags` +- libgd_LDFLAGS=`gdlib-config --ldflags` +- libgd_LIBS=`gdlib-config --libs` ++ libgd_CPPFLAGS=`$GDLIB_CONFIG --cflags` ++ libgd_LDFLAGS=`$GDLIB_CONFIG --ldflags` ++ libgd_LIBS=`$GDLIB_CONFIG --libs` + elif test -d "$with_gd"; then + libgd_CPPFLAGS="-I$with_gd/include" + libgd_LDFLAGS="-L$with_gd/lib" diff --git a/package/gnuplot/Config.in b/package/gnuplot/Config.in new file mode 100644 index 0000000000..603c194fe5 --- /dev/null +++ b/package/gnuplot/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_GNUPLOT + bool "gnuplot" + help + A portable command-line driven graphing utility. + + http://www.gnuplot.info/ diff --git a/package/gnuplot/gnuplot.hash b/package/gnuplot/gnuplot.hash new file mode 100644 index 0000000000..37cc3e789a --- /dev/null +++ b/package/gnuplot/gnuplot.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/gnuplot/files/gnuplot/4.6.6/ +md5 02a980b37ba181f7510816ed6440c9c1 gnuplot-4.6.6.tar.gz +sha1 012bd22b7be32da186b6bb015c0c6d876926c90b gnuplot-4.6.6.tar.gz diff --git a/package/gnuplot/gnuplot.mk b/package/gnuplot/gnuplot.mk new file mode 100644 index 0000000000..4408ece5be --- /dev/null +++ b/package/gnuplot/gnuplot.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# gnuplot +# +################################################################################ + +GNUPLOT_VERSION = 4.6.6 +GNUPLOT_SITE = http://downloads.sourceforge.net/project/gnuplot/gnuplot/$(GNUPLOT_VERSION) +GNUPLOT_LICENSE = gnuplot license (open source) +GNUPLOT_LICENSE_FILES = Copyright + +GNUPLOT_AUTORECONF = YES + +GNUPLOT_CONF_OPTS = \ + --without-x \ + --disable-raise-console \ + --disable-mouse \ + --without-tutorial \ + --disable-demo \ + --without-row-help \ + --disable-history-file \ + --without-lisp-files \ + --disable-wxwidgets \ + --without-lua \ + --without-latex \ + --without-cairo + +ifeq ($(BR2_PACKAGE_GD)$(BR2_PACKAGE_LIBPNG),yy) +GNUPLOT_CONF_OPTS += --with-gd +GNUPLOT_DEPENDENCIES += gd +GNUPLOT_CONF_ENV += \ + ac_cv_path_GDLIB_CONFIG=$(STAGING_DIR)/usr/bin/gdlib-config +else +GNUPLOT_CONF_OPTS += --without-gd +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +GNUPLOT_CONF_OPTS += --with-readline=gnu +GNUPLOT_DEPENDENCIES += readline +else +GNUPLOT_CONF_OPTS += --without-readline +endif + +# Remove Javascript scripts, lua scripts, PostScript files +define GNUPLOT_REMOVE_UNNEEDED_FILES + $(RM) -rf $(TARGET_DIR)/usr/share/gnuplot +endef + +GNUPLOT_POST_INSTALL_TARGET_HOOKS += GNUPLOT_REMOVE_UNNEEDED_FILES + +$(eval $(autotools-package)) diff --git a/package/gnuradio/0001-suppress-boost_unitest-detection.patch b/package/gnuradio/0001-suppress-boost_unitest-detection.patch new file mode 100644 index 0000000000..f1713dc349 --- /dev/null +++ b/package/gnuradio/0001-suppress-boost_unitest-detection.patch @@ -0,0 +1,41 @@ +By default, the boost test option is mandatory for build environment +detection. +This patch suppress this dependency and allows the test part only if +build_test is enabled at the Buildroot level. + +Signed-off-by: Gwenhael Goavec-Merou +--- +Index: gnuradio-3.7.5/volk/cmake/VolkBoost.cmake +=================================================================== +--- gnuradio-3.7.5.orig/volk/cmake/Modules/VolkBoost.cmake ++++ gnuradio-3.7.5/volk/cmake/Modules/VolkBoost.cmake +@@ -29,7 +29,6 @@ set(__INCLUDED_VOLK_BOOST_CMAKE TRUE) + set(BOOST_REQUIRED_COMPONENTS + filesystem + system +- unit_test_framework + program_options + ) + +Index: gnuradio-3.7.5/volk/lib/CMakeLists.txt +=================================================================== +--- gnuradio-3.7.5.orig/volk/lib/CMakeLists.txt ++++ gnuradio-3.7.5/volk/lib/CMakeLists.txt +@@ -580,7 +580,10 @@ + ######################################################################## + # Build the QA test application + ######################################################################## +-if(ENABLE_TESTING) ++ ++find_package(Boost "1.35" COMPONENTS "unit_test_framework") ++ ++if(ENABLE_TESTING AND BUILD_TEST) + + #include Boost headers + include_directories(${Boost_INCLUDE_DIRS}) +@@ -597,4 +600,4 @@ + TARGET_DEPS volk + ) + +-endif(ENABLE_TESTING) ++endif(ENABLE_TESTING AND BUILD_TEST) diff --git a/package/gnuradio/0002-fix_cmake_3_5_0_build_failure.patch b/package/gnuradio/0002-fix_cmake_3_5_0_build_failure.patch new file mode 100644 index 0000000000..15d7dea7da --- /dev/null +++ b/package/gnuradio/0002-fix_cmake_3_5_0_build_failure.patch @@ -0,0 +1,175 @@ +Changing CMAKE_{SOURCE,BINARY}_DIR like volk does in its top-level +CMakeLists.txt no longer works with CMake 3.5.0. + +Use PROJECT_{BINARY,SOURCE}_DIR instead. + +Obtained from: http://pkgs.fedoraproject.org/cgit/rpms/gnuradio.git/commit/?id=b50c7e66f6e3a1e6a84e25505d3fd873756c2027 +Upstream patch and discussion: https://github.com/gnuradio/volk/pull/65 + +Signed-off-by: Gwenhael Goavec-Merou +--- + apps/CMakeLists.txt | 12 ++++++------ + lib/CMakeLists.txt | 48 ++++++++++++++++++++++++------------------------ + 2 files changed, 30 insertions(+), 30 deletions(-) + +diff --git a/volk/apps/CMakeLists.txt b/volk/apps/CMakeLists.txt +index 74ed18d..f9ef6e0 100644 +--- a/volk/apps/CMakeLists.txt ++++ b/volk/apps/CMakeLists.txt +@@ -19,23 +19,23 @@ + # Setup profiler + ######################################################################## + if(MSVC) +- include_directories(${CMAKE_SOURCE_DIR}/cmake/msvc) ++ include_directories(${PROJECT_SOURCE_DIR}/cmake/msvc) + endif(MSVC) + + include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} +- ${CMAKE_SOURCE_DIR}/include +- ${CMAKE_BINARY_DIR}/include +- ${CMAKE_SOURCE_DIR}/lib +- ${CMAKE_BINARY_DIR}/lib ++ ${PROJECT_SOURCE_DIR}/include ++ ${PROJECT_BINARY_DIR}/include ++ ${PROJECT_SOURCE_DIR}/lib ++ ${PROJECT_BINARY_DIR}/lib + ${Boost_INCLUDE_DIRS} + ) + + # MAKE volk_profile + add_executable(volk_profile + ${CMAKE_CURRENT_SOURCE_DIR}/volk_profile.cc +- ${CMAKE_SOURCE_DIR}/lib/qa_utils.cc ++ ${PROJECT_SOURCE_DIR}/lib/qa_utils.cc + ) + + +diff --git a/volk/lib/CMakeLists.txt b/volk/lib/CMakeLists.txt +index 35b67dc..f00200a 100644 +--- a/volk/lib/CMakeLists.txt ++++ b/volk/lib/CMakeLists.txt +@@ -90,7 +90,7 @@ endif() + ######################################################################## + execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} +- ${CMAKE_SOURCE_DIR}/gen/volk_compile_utils.py ++ ${PROJECT_SOURCE_DIR}/gen/volk_compile_utils.py + --mode "arch_flags" --compiler "${COMPILER_NAME}" + OUTPUT_VARIABLE arch_flag_lines OUTPUT_STRIP_TRAILING_WHITESPACE + ) +@@ -278,7 +278,7 @@ message(STATUS "Available architectures: ${available_archs}") + ######################################################################## + execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} +- ${CMAKE_SOURCE_DIR}/gen/volk_compile_utils.py ++ ${PROJECT_SOURCE_DIR}/gen/volk_compile_utils.py + --mode "machines" --archs "${available_archs}" + OUTPUT_VARIABLE available_machines OUTPUT_STRIP_TRAILING_WHITESPACE + ) +@@ -310,9 +310,9 @@ message(STATUS "Available machines: ${available_machines}") + ######################################################################## + + #dependencies are all python, xml, and header implementation files +-file(GLOB xml_files ${CMAKE_SOURCE_DIR}/gen/*.xml) +-file(GLOB py_files ${CMAKE_SOURCE_DIR}/gen/*.py) +-file(GLOB h_files ${CMAKE_SOURCE_DIR}/kernels/volk/*.h) ++file(GLOB xml_files ${PROJECT_SOURCE_DIR}/gen/*.xml) ++file(GLOB py_files ${PROJECT_SOURCE_DIR}/gen/*.py) ++file(GLOB h_files ${PROJECT_SOURCE_DIR}/kernels/volk/*.h) + + macro(gen_template tmpl output) + list(APPEND volk_gen_sources ${output}) +@@ -320,21 +320,21 @@ macro(gen_template tmpl output) + OUTPUT ${output} + DEPENDS ${xml_files} ${py_files} ${h_files} ${tmpl} + COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} +- ${CMAKE_SOURCE_DIR}/gen/volk_tmpl_utils.py ++ ${PROJECT_SOURCE_DIR}/gen/volk_tmpl_utils.py + --input ${tmpl} --output ${output} ${ARGN} + ) + endmacro(gen_template) + +-make_directory(${CMAKE_BINARY_DIR}/include/volk) ++make_directory(${PROJECT_BINARY_DIR}/include/volk) + +-gen_template(${CMAKE_SOURCE_DIR}/tmpl/volk.tmpl.h ${CMAKE_BINARY_DIR}/include/volk/volk.h) +-gen_template(${CMAKE_SOURCE_DIR}/tmpl/volk.tmpl.c ${CMAKE_BINARY_DIR}/lib/volk.c) +-gen_template(${CMAKE_SOURCE_DIR}/tmpl/volk_typedefs.tmpl.h ${CMAKE_BINARY_DIR}/include/volk/volk_typedefs.h) +-gen_template(${CMAKE_SOURCE_DIR}/tmpl/volk_cpu.tmpl.h ${CMAKE_BINARY_DIR}/include/volk/volk_cpu.h) +-gen_template(${CMAKE_SOURCE_DIR}/tmpl/volk_cpu.tmpl.c ${CMAKE_BINARY_DIR}/lib/volk_cpu.c) +-gen_template(${CMAKE_SOURCE_DIR}/tmpl/volk_config_fixed.tmpl.h ${CMAKE_BINARY_DIR}/include/volk/volk_config_fixed.h) +-gen_template(${CMAKE_SOURCE_DIR}/tmpl/volk_machines.tmpl.h ${CMAKE_BINARY_DIR}/lib/volk_machines.h) +-gen_template(${CMAKE_SOURCE_DIR}/tmpl/volk_machines.tmpl.c ${CMAKE_BINARY_DIR}/lib/volk_machines.c) ++gen_template(${PROJECT_SOURCE_DIR}/tmpl/volk.tmpl.h ${PROJECT_BINARY_DIR}/include/volk/volk.h) ++gen_template(${PROJECT_SOURCE_DIR}/tmpl/volk.tmpl.c ${PROJECT_BINARY_DIR}/lib/volk.c) ++gen_template(${PROJECT_SOURCE_DIR}/tmpl/volk_typedefs.tmpl.h ${PROJECT_BINARY_DIR}/include/volk/volk_typedefs.h) ++gen_template(${PROJECT_SOURCE_DIR}/tmpl/volk_cpu.tmpl.h ${PROJECT_BINARY_DIR}/include/volk/volk_cpu.h) ++gen_template(${PROJECT_SOURCE_DIR}/tmpl/volk_cpu.tmpl.c ${PROJECT_BINARY_DIR}/lib/volk_cpu.c) ++gen_template(${PROJECT_SOURCE_DIR}/tmpl/volk_config_fixed.tmpl.h ${PROJECT_BINARY_DIR}/include/volk/volk_config_fixed.h) ++gen_template(${PROJECT_SOURCE_DIR}/tmpl/volk_machines.tmpl.h ${PROJECT_BINARY_DIR}/lib/volk_machines.h) ++gen_template(${PROJECT_SOURCE_DIR}/tmpl/volk_machines.tmpl.c ${PROJECT_BINARY_DIR}/lib/volk_machines.c) + + set(BASE_CFLAGS NONE) + string(TOUPPER ${CMAKE_BUILD_TYPE} CBTU) +@@ -362,12 +362,12 @@ set(COMPILER_INFO "${CMAKE_C_COMPILER}:::${CMAKE_C_FLAGS_${GRCBTU}} ${CMAKE_C_FL + foreach(machine_name ${available_machines}) + #generate machine source + set(machine_source ${CMAKE_CURRENT_BINARY_DIR}/volk_machine_${machine_name}.c) +- gen_template(${CMAKE_SOURCE_DIR}/tmpl/volk_machine_xxx.tmpl.c ${machine_source} ${machine_name}) ++ gen_template(${PROJECT_SOURCE_DIR}/tmpl/volk_machine_xxx.tmpl.c ${machine_source} ${machine_name}) + + #determine machine flags + execute_process( + COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} +- ${CMAKE_SOURCE_DIR}/gen/volk_compile_utils.py ++ ${PROJECT_SOURCE_DIR}/gen/volk_compile_utils.py + --mode "machine_flags" --machine "${machine_name}" --compiler "${COMPILER_NAME}" + OUTPUT_VARIABLE ${machine_name}_flags OUTPUT_STRIP_TRAILING_WHITESPACE + ) +@@ -393,9 +393,9 @@ string(REPLACE "\n" " \\n" COMPILER_INFO ${COMPILER_INFO}) + # Set local include directories first + ######################################################################## + include_directories( +- ${CMAKE_BINARY_DIR}/include +- ${CMAKE_SOURCE_DIR}/include +- ${CMAKE_SOURCE_DIR}/kernels ++ ${PROJECT_BINARY_DIR}/include ++ ${PROJECT_SOURCE_DIR}/include ++ ${PROJECT_SOURCE_DIR}/kernels + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ) +@@ -420,8 +420,8 @@ if(${CMAKE_VERSION} VERSION_GREATER "2.8.9") + # setup architecture specific assembler flags + set(ARCH_ASM_FLAGS "-mfpu=neon -g") + # then add the files +- include_directories(${CMAKE_SOURCE_DIR}/kernels/volk/asm/neon) +- file(GLOB asm_files ${CMAKE_SOURCE_DIR}/kernels/volk/asm/neon/*.s) ++ include_directories(${PROJECT_SOURCE_DIR}/kernels/volk/asm/neon) ++ file(GLOB asm_files ${PROJECT_SOURCE_DIR}/kernels/volk/asm/neon/*.s) + foreach(asm_file ${asm_files}) + list(APPEND volk_sources ${asm_file}) + message(STATUS "Adding source file: ${asm_file}") +@@ -453,7 +453,7 @@ if(ORC_FOUND) + list(APPEND volk_libraries ${ORC_LIBRARIES}) + + #setup orc functions +- file(GLOB orc_files ${CMAKE_SOURCE_DIR}/kernels/volk/asm/orc/*.orc) ++ file(GLOB orc_files ${PROJECT_SOURCE_DIR}/kernels/volk/asm/orc/*.orc) + foreach(orc_file ${orc_files}) + + #extract the name for the generated c source from the orc file +@@ -511,7 +511,7 @@ PROPERTIES COMPILE_DEFINITIONS "${machine_defs}") + + if(MSVC) + #add compatibility includes for stdint types +- include_directories(${CMAKE_SOURCE_DIR}/cmake/msvc) ++ include_directories(${PROJECT_SOURCE_DIR}/cmake/msvc) + add_definitions(-DHAVE_CONFIG_H) + #compile the sources as C++ due to the lack of complex.h under MSVC + set_source_files_properties(${volk_sources} PROPERTIES LANGUAGE CXX) +-- +2.7.3 + diff --git a/package/gnuradio/Config.in b/package/gnuradio/Config.in new file mode 100644 index 0000000000..603532cf0c --- /dev/null +++ b/package/gnuradio/Config.in @@ -0,0 +1,109 @@ +comment "gnuradio needs a toolchain w/ C++, NPTL, wchar, dynamic library" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS + +config BR2_PACKAGE_GNURADIO + bool "gnuradio" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_USE_MMU # use fork() + depends on BR2_USE_WCHAR # boost + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_DATE_TIME + select BR2_PACKAGE_BOOST_FILESYSTEM + select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS + select BR2_PACKAGE_BOOST_SYSTEM + select BR2_PACKAGE_BOOST_THREAD + help + GNU Radio is a free & open-source software development + toolkit that provides signal processing blocks to implement + software radios. It can be used with readily-available + low-cost external RF hardware to create software-defined + radios, or without hardware in a simulation-like + environment. It is widely used in hobbyist, academic and + commercial environments to support both wireless + communications research and real-world radio systems. + + http://gnuradio.org/ + +if BR2_PACKAGE_GNURADIO + +config BR2_PACKAGE_GNURADIO_BLOCKS + bool "blocks support" + help + GNU Radio basic block library + +config BR2_PACKAGE_GNURADIO_FEC + bool "gr-fec support" + select BR2_PACKAGE_GNURADIO_BLOCKS + help + FEC signal processing blocks + +config BR2_PACKAGE_GNURADIO_PYTHON + bool "python support" + depends on BR2_PACKAGE_PYTHON + depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS + select BR2_PACKAGE_BOOST_PYTHON + select BR2_PACKAGE_PYTHON_NUMPY # runtime + help + Enable python component + +config BR2_PACKAGE_GNURADIO_UTILS + bool "gr-utils support" + depends on BR2_PACKAGE_GNURADIO_PYTHON + help + Misc python utilities + +comment "gr-fft, -filter, -analog, -channels, -digital, -trellis, -pager depends fftw's single precision" + depends on !BR2_PACKAGE_FFTW_PRECISION_SINGLE + +if BR2_PACKAGE_FFTW_PRECISION_SINGLE + +config BR2_PACKAGE_GNURADIO_ANALOG + bool "gr-analog support" + select BR2_PACKAGE_GNURADIO_FILTER + help + Analog communications blocks + +config BR2_PACKAGE_GNURADIO_CHANNELS + bool "gr-channels support" + select BR2_PACKAGE_GNURADIO_ANALOG + help + Channel model blocks + +config BR2_PACKAGE_GNURADIO_DIGITAL + bool "gr-digital support" + select BR2_PACKAGE_GNURADIO_ANALOG + help + Digital communications blocks + +config BR2_PACKAGE_GNURADIO_FFT + bool "gr-fft support" + select BR2_PACKAGE_GNURADIO_BLOCKS + help + FFT signal processing blocks + +config BR2_PACKAGE_GNURADIO_FILTER + bool "gr-filter support" + select BR2_PACKAGE_GNURADIO_FFT + help + Filter signal processing blocks + +config BR2_PACKAGE_GNURADIO_PAGER + bool "gr-flex support" + select BR2_PACKAGE_GNURADIO_ANALOG + help + FLEX pager decoder implementation blocks + +config BR2_PACKAGE_GNURADIO_TRELLIS + bool "gr-trellis support" + select BR2_PACKAGE_GNURADIO_DIGITAL + help + Trellis coded modulation blocks + +endif +endif diff --git a/package/gnuradio/gnuradio.hash b/package/gnuradio/gnuradio.hash new file mode 100644 index 0000000000..bb934e2b92 --- /dev/null +++ b/package/gnuradio/gnuradio.hash @@ -0,0 +1,2 @@ +# From http://gnuradio.org/releases/gnuradio/sha256sums +sha256 9c06f0f1ec14113203e0486fd526dd46ecef216dfe42f12d78d9b781b1ef967e gnuradio-3.7.9.1.tar.gz diff --git a/package/gnuradio/gnuradio.mk b/package/gnuradio/gnuradio.mk new file mode 100644 index 0000000000..46d1f4fab8 --- /dev/null +++ b/package/gnuradio/gnuradio.mk @@ -0,0 +1,117 @@ +################################################################################ +# +# gnuradio +# +################################################################################ + +GNURADIO_VERSION = 3.7.9.1 +GNURADIO_SITE = http://gnuradio.org/releases/gnuradio +GNURADIO_LICENSE = GPLv3+ +GNURADIO_LICENSE_FILES = COPYING + +GNURADIO_SUPPORTS_IN_SOURCE_BUILD = NO + +# host-python-cheetah is needed for volk to compile +GNURADIO_DEPENDENCIES = \ + host-python-cheetah \ + host-swig \ + boost + +ifeq ($(BR2_PACKAGE_ORC),y) +GNURADIO_DEPENDENCIES += orc +endif + +GNURADIO_CONF_OPTS = \ + -DENABLE_DEFAULT=OFF \ + -DENABLE_VOLK=ON \ + -DENABLE_GNURADIO_RUNTIME=ON + +# For third-party blocks, the gnuradio libraries are mandatory at +# compile time. +GNURADIO_INSTALL_STAGING = YES + +# Yes, this is silly, because -march is already known by the compiler +# with the internal toolchain, and passed by the external wrapper for +# external toolchains. Nonetheless, gnuradio does some matching on the +# CFLAGS to decide whether to build the NEON functions or not, and +# wants to see the string 'armv7' in the CFLAGS. +ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_ARM_CPU_HAS_NEON),yy) +GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="-march=armv7-a" +endif + +# As soon as -mfpu=neon is supported by the compiler, gnuradio will try +# to use it. But having NEON support in the compiler doesn't necessarily +# mean we have NEON support in our CPU. +ifeq ($(BR2_ARM_CPU_HAS_NEON),) +GNURADIO_CONF_OPTS += -Dhave_mfpu_neon=0 +endif + +ifeq ($(BR2_PACKAGE_GNURADIO_ANALOG),y) +GNURADIO_CONF_OPTS += -DENABLE_GR_ANALOG=ON +else +GNURADIO_CONF_OPTS += -DENABLE_GR_ANALOG=OFF +endif + +ifeq ($(BR2_PACKAGE_GNURADIO_BLOCKS),y) +GNURADIO_CONF_OPTS += -DENABLE_GR_BLOCKS=ON +else +GNURADIO_CONF_OPTS += -DENABLE_GR_BLOCKS=OFF +endif + +ifeq ($(BR2_PACKAGE_GNURADIO_CHANNELS),y) +GNURADIO_CONF_OPTS += -DENABLE_GR_CHANNELS=ON +else +GNURADIO_CONF_OPTS += -DENABLE_GR_CHANNELS=OFF +endif + +ifeq ($(BR2_PACKAGE_GNURADIO_DIGITAL),y) +GNURADIO_CONF_OPTS += -DENABLE_GR_DIGITAL=ON +else +GNURADIO_CONF_OPTS += -DENABLE_GR_DIGITAL=OFF +endif + +ifeq ($(BR2_PACKAGE_GNURADIO_FEC),y) +GNURADIO_CONF_OPTS += -DENABLE_GR_FEC=ON +else +GNURADIO_CONF_OPTS += -DENABLE_GR_FEC=OFF +endif + +ifeq ($(BR2_PACKAGE_GNURADIO_FFT),y) +GNURADIO_DEPENDENCIES += fftw +GNURADIO_CONF_OPTS += -DENABLE_GR_FFT=ON +else +GNURADIO_CONF_OPTS += -DENABLE_GR_FFT=OFF +endif + +ifeq ($(BR2_PACKAGE_GNURADIO_FILTER),y) +GNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=ON +else +GNURADIO_CONF_OPTS += -DENABLE_GR_FILTER=OFF +endif + +ifeq ($(BR2_PACKAGE_GNURADIO_PYTHON),y) +GNURADIO_DEPENDENCIES += python +GNURADIO_CONF_OPTS += -DENABLE_PYTHON=ON +else +GNURADIO_CONF_OPTS += -DENABLE_PYTHON=OFF +endif + +ifeq ($(BR2_PACKAGE_GNURADIO_PAGER),y) +GNURADIO_CONF_OPTS += -DENABLE_PAGER=ON +else +GNURADIO_CONF_OPTS += -DENABLE_PAGER=OFF +endif + +ifeq ($(BR2_PACKAGE_GNURADIO_TRELLIS),y) +GNURADIO_CONF_OPTS += -DENABLE_GR_TRELLIS=ON +else +GNURADIO_CONF_OPTS += -DENABLE_GR_TRELLIS=OFF +endif + +ifeq ($(BR2_PACKAGE_GNURADIO_UTILS),y) +GNURADIO_CONF_OPTS += -DENABLE_GR_UTILS=ON +else +GNURADIO_CONF_OPTS += -DENABLE_GR_UTILS=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/gnutls/Config.in b/package/gnutls/Config.in new file mode 100644 index 0000000000..998e213c7d --- /dev/null +++ b/package/gnutls/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_GNUTLS + bool "gnutls" + select BR2_PACKAGE_LIBTASN1 + select BR2_PACKAGE_NETTLE + select BR2_PACKAGE_PCRE + depends on BR2_USE_WCHAR + help + GnuTLS is a secure communications library implementing the SSL + and TLS protocols and technologies around them. + + http://www.gnutls.org + +if BR2_PACKAGE_GNUTLS + +config BR2_PACKAGE_GNUTLS_TOOLS + bool "install tools" + select BR2_PACKAGE_ARGP_STANDALONE \ + if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL + help + Install GnuTLS command line tools for various cryptographic tasks. + +endif + +comment "gnutls needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/gnutls/gnutls.hash b/package/gnutls/gnutls.hash new file mode 100644 index 0000000000..450b12bb46 --- /dev/null +++ b/package/gnutls/gnutls.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 70ef9c9f95822d363036c6e6b5479750e5b7fc34f50e750c3464a98ec65a9ab8 gnutls-3.4.11.tar.xz diff --git a/package/gnutls/gnutls.mk b/package/gnutls/gnutls.mk new file mode 100644 index 0000000000..676476de8d --- /dev/null +++ b/package/gnutls/gnutls.mk @@ -0,0 +1,84 @@ +################################################################################ +# +# gnutls +# +################################################################################ + +GNUTLS_VERSION_MAJOR = 3.4 +GNUTLS_VERSION = $(GNUTLS_VERSION_MAJOR).11 +GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz +GNUTLS_SITE = ftp://ftp.gnutls.org/gcrypt/gnutls/v$(GNUTLS_VERSION_MAJOR) +GNUTLS_LICENSE = GPLv3+, LGPLv2.1+ +GNUTLS_LICENSE_FILES = COPYING COPYING.LESSER +GNUTLS_DEPENDENCIES = host-pkgconf libtasn1 nettle pcre +GNUTLS_CONF_OPTS = \ + --disable-doc \ + --disable-guile \ + --disable-libdane \ + --disable-rpath \ + --enable-local-libopts \ + --enable-openssl-compatibility \ + --with-libnettle-prefix=$(STAGING_DIR)/usr \ + --with-librt-prefix=$(STAGING_DIR) \ + --without-tpm \ + $(if $(BR2_PACKAGE_GNUTLS_TOOLS),--enable-tools,--disable-tools) +GNUTLS_CONF_ENV = gl_cv_socket_ipv6=yes \ + ac_cv_header_wchar_h=$(if $(BR2_USE_WCHAR),yes,no) \ + gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) \ + gt_cv_c_wint_t=$(if $(BR2_USE_WCHAR),yes,no) \ + gl_cv_func_gettimeofday_clobber=no +GNUTLS_INSTALL_STAGING = YES + +# libpthread and libz autodetection poison the linkpath +GNUTLS_CONF_OPTS += $(if $(BR2_TOOLCHAIN_HAS_THREADS),--with-libpthread-prefix=$(STAGING_DIR)/usr) +GNUTLS_CONF_OPTS += $(if $(BR2_PACKAGE_ZLIB),--with-libz-prefix=$(STAGING_DIR)/usr) + +# gnutls needs libregex, but pcre can be used too +# The check isn't cross-compile friendly +GNUTLS_CONF_ENV += libopts_cv_with_libregex=yes +GNUTLS_CONF_OPTS += \ + --with-regex-header=pcreposix.h \ + --with-libregex-cflags="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --cflags`" \ + --with-libregex-libs="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --libs`" + +# Consider crywrap as part of tools because it needs WCHAR, and it's so too +ifeq ($(BR2_PACKAGE_GNUTLS_TOOLS),) +GNUTLS_CONF_OPTS += --disable-crywrap +endif + +# Prerequisite for crywrap +ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y) +GNUTLS_CONF_ENV += LIBS="-largp" +GNUTLS_DEPENDENCIES += argp-standalone +endif + +# libidn support for nommu must exclude the crywrap wrapper (uses fork) +GNUTLS_CONF_OPTS += $(if $(BR2_USE_MMU),,--disable-crywrap) + +ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y) +GNUTLS_CONF_OPTS += --enable-cryptodev +GNUTLS_DEPENDENCIES += cryptodev-linux +endif + +ifeq ($(BR2_PACKAGE_LIBIDN),y) +GNUTLS_CONF_OPTS += --with-idn +GNUTLS_DEPENDENCIES += libidn +else +GNUTLS_CONF_OPTS += --without-idn +endif + +ifeq ($(BR2_PACKAGE_P11_KIT),y) +GNUTLS_CONF_OPTS += --with-p11-kit +GNUTLS_DEPENDENCIES += p11-kit +else +GNUTLS_CONF_OPTS += --without-p11-kit +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +GNUTLS_CONF_OPTS += --with-zlib +GNUTLS_DEPENDENCIES += zlib +else +GNUTLS_CONF_OPTS += --without-zlib +endif + +$(eval $(autotools-package)) diff --git a/package/go-bootstrap/go-bootstrap.hash b/package/go-bootstrap/go-bootstrap.hash new file mode 100644 index 0000000000..1d0566a9de --- /dev/null +++ b/package/go-bootstrap/go-bootstrap.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 299a6fd8f8adfdce15bc06bde926e7b252ae8e24dd5b16b7d8791ed79e7b5e9b go1.4.2.src.tar.gz diff --git a/package/go-bootstrap/go-bootstrap.mk b/package/go-bootstrap/go-bootstrap.mk new file mode 100644 index 0000000000..47f5013232 --- /dev/null +++ b/package/go-bootstrap/go-bootstrap.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# go-bootstrap +# +################################################################################ + +GO_BOOTSTRAP_VERSION = 1.4.2 +GO_BOOTSTRAP_SITE = https://storage.googleapis.com/golang +GO_BOOTSTRAP_SOURCE = go$(GO_BOOTSTRAP_VERSION).src.tar.gz + +GO_BOOTSTRAP_LICENSE = BSD-3c +GO_BOOTSTRAP_LICENSE_FILES = LICENSE + +# To build programs that need cgo support the toolchain needs to be +# available, so the toolchain is not needed to build host-go-bootstrap +# itself, but needed by other packages that depend on +# host-go-bootstrap. +HOST_GO_BOOTSTRAP_DEPENDENCIES = toolchain + +HOST_GO_BOOTSTRAP_ROOT = $(HOST_DIR)/usr/lib/go-$(GO_BOOTSTRAP_VERSION) + +HOST_GO_BOOTSTRAP_MAKE_ENV = \ + GOOS=linux \ + GOROOT_FINAL="$(HOST_GO_BOOTSTRAP_ROOT)" \ + GOROOT="$(@D)" \ + GOBIN="$(@D)/bin" \ + CGO_ENABLED=0 + +define HOST_GO_BOOTSTRAP_BUILD_CMDS + cd $(@D)/src && $(HOST_GO_BOOTSTRAP_MAKE_ENV) ./make.bash +endef + +define HOST_GO_BOOTSTRAP_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/bin/go $(HOST_GO_BOOTSTRAP_ROOT)/bin/go + $(INSTALL) -D -m 0755 $(@D)/bin/gofmt $(HOST_GO_BOOTSTRAP_ROOT)/bin/gofmt + + cp -a $(@D)/lib $(HOST_GO_BOOTSTRAP_ROOT)/ + cp -a $(@D)/pkg $(HOST_GO_BOOTSTRAP_ROOT)/ + + # There is a known issue which requires the go sources to be installed + # https://golang.org/issue/2775 + cp -a $(@D)/src $(HOST_GO_BOOTSTRAP_ROOT)/ +endef + +$(eval $(host-generic-package)) diff --git a/package/go/Config.in.host b/package/go/Config.in.host new file mode 100644 index 0000000000..b57080399a --- /dev/null +++ b/package/go/Config.in.host @@ -0,0 +1,5 @@ +config BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS + bool + default y + depends on BR2_arm || BR2_aarch64 || BR2_i386 || BR2_x86_64 || BR2_powerpc64 || BR2_powerpc64le + depends on !BR2_ARM_CPU_ARMV4 diff --git a/package/go/go.hash b/package/go/go.hash new file mode 100644 index 0000000000..6826891b26 --- /dev/null +++ b/package/go/go.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 787b0b750d037016a30c6ed05a8a70a91b2e9db4bd9b1a2453aa502a63f1bccc go1.6.2.src.tar.gz diff --git a/package/go/go.mk b/package/go/go.mk new file mode 100644 index 0000000000..a1d6cf9df2 --- /dev/null +++ b/package/go/go.mk @@ -0,0 +1,116 @@ +################################################################################ +# +# go +# +################################################################################ + +GO_VERSION = 1.6.2 +GO_SITE = https://storage.googleapis.com/golang +GO_SOURCE = go$(GO_VERSION).src.tar.gz + +GO_LICENSE = BSD-3c +GO_LICENSE_FILES = LICENSE + +ifeq ($(BR2_arm),y) +GO_GOARCH = arm +ifeq ($(BR2_ARM_CPU_ARMV5),y) +GO_GOARM = 5 +else ifeq ($(BR2_ARM_CPU_ARMV6),y) +GO_GOARM = 6 +else ifeq ($(BR2_ARM_CPU_ARMV7A),y) +GO_GOARM = 7 +endif +else ifeq ($(BR2_aarch64),y) +GO_GOARCH = arm64 +else ifeq ($(BR2_i386),y) +GO_GOARCH = 386 +else ifeq ($(BR2_x86_64),y) +GO_GOARCH = amd64 +else ifeq ($(BR2_powerpc64),y) +GO_GOARCH = ppc64 +else ifeq ($(BR2_powerpc64le),y) +GO_GOARCH = ppc64le +endif + +HOST_GO_DEPENDENCIES = host-go-bootstrap +HOST_GO_ROOT = $(HOST_DIR)/usr/lib/go + +# For the convienience of target packages. +HOST_GO_TOOLDIR = $(HOST_GO_ROOT)/pkg/tool/linux_$(GO_GOARCH) +HOST_GO_TARGET_ENV = \ + GOARCH=$(GO_GOARCH) \ + GOROOT="$(HOST_GO_ROOT)" \ + CC="$(TARGET_CC)" \ + CXX="$(TARGET_CXX)" \ + GOTOOLDIR="$(HOST_GO_TOOLDIR)" + +# The go compiler's cgo support uses threads. If BR2_TOOLCHAIN_HAS_THREADS is +# set, build in cgo support for any go programs that may need it. Note that +# any target package needing cgo support must include +# 'depends on BR2_TOOLCHAIN_HAS_THREADS' in its config file. +ifeq (BR2_TOOLCHAIN_HAS_THREADS,y) +HOST_GO_CGO_ENABLED = 1 +else +HOST_GO_CGO_ENABLED = 0 +endif + +# The go build system doesn't have the notion of cross compiling, but just the +# notion of architecture. When the host and target architectures are different +# it expects to be given a target cross compiler in CC_FOR_TARGET. When the +# architectures are the same it will use CC_FOR_TARGET for both host and target +# compilation. To work around this limitation build and install a set of +# compiler and tool binaries built with CC_FOR_TARGET set to the host compiler. +# Also, the go build system is not compatible with ccache, so use +# HOSTCC_NOCCACHE. See https://github.com/golang/go/issues/11685. +HOST_GO_MAKE_ENV = \ + GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_ROOT) \ + GOROOT_FINAL=$(HOST_GO_ROOT) \ + GOROOT="$(@D)" \ + GOBIN="$(@D)/bin" \ + GOARCH=$(GO_GOARCH) \ + $(if $(GO_GOARM),GOARM=$(GO_GOARM)) \ + GOOS=linux \ + CGO_ENABLED=$(HOST_GO_CGO_ENABLED) \ + CC=$(HOSTCC_NOCCACHE) + +HOST_GO_TARGET_CC = \ + CC_FOR_TARGET="$(TARGET_CC)" \ + CXX_FOR_TARGET="$(TARGET_CXX)" + +HOST_GO_HOST_CC = \ + CC_FOR_TARGET=$(HOSTCC_NOCCACHE) \ + CXX_FOR_TARGET=$(HOSTCC_NOCCACHE) + +HOST_GO_TMP = $(@D)/host-go-tmp + +define HOST_GO_BUILD_CMDS + cd $(@D)/src && $(HOST_GO_MAKE_ENV) $(HOST_GO_HOST_CC) ./make.bash + mkdir -p $(HOST_GO_TMP) + mv $(@D)/pkg/tool $(HOST_GO_TMP)/ + mv $(@D)/bin/ $(HOST_GO_TMP)/ + cd $(@D)/src && $(HOST_GO_MAKE_ENV) $(HOST_GO_TARGET_CC) ./make.bash +endef + +define HOST_GO_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(HOST_GO_TMP)/bin/go $(HOST_GO_ROOT)/bin/go + $(INSTALL) -D -m 0755 $(HOST_GO_TMP)/bin/gofmt $(HOST_GO_ROOT)/bin/gofmt + + ln -sf ../lib/go/bin/go $(HOST_DIR)/usr/bin/ + ln -sf ../lib/go/bin/gofmt $(HOST_DIR)/usr/bin/ + + cp -a $(@D)/lib $(HOST_GO_ROOT)/ + + mkdir -p $(HOST_GO_ROOT)/pkg + cp -a $(@D)/pkg/include $(@D)/pkg/linux_* $(HOST_GO_ROOT)/pkg/ + cp -a $(HOST_GO_TMP)/tool $(HOST_GO_ROOT)/pkg/ + + # There is a known issue which requires the go sources to be installed + # https://golang.org/issue/2775 + cp -a $(@D)/src $(HOST_GO_ROOT)/ + + # Set all file timestamps to prevent the go compiler from rebuilding any + # built in packages when programs are built. + find $(HOST_GO_ROOT) -type f -exec touch -r $(HOST_GO_TMP)/bin/go {} \; +endef + +$(eval $(host-generic-package)) diff --git a/package/gob2/0001-dont-include-from-prefix.patch b/package/gob2/0001-dont-include-from-prefix.patch new file mode 100644 index 0000000000..1b603d754f --- /dev/null +++ b/package/gob2/0001-dont-include-from-prefix.patch @@ -0,0 +1,40 @@ +[PATCH] Don't search $prefix/include for header files + +Don't add $prefix/include to the header file search path, as that breaks +cross compilation (build $prefix/include isn't the same as target +$prefix/include). + +Signed-off-by: Peter Korsgaard +--- + src/Makefile.am | 3 +-- + src/Makefile.in | 3 +-- + 2 files changed, 2 insertions(+), 4 deletions(-) + +Index: gob2-2.0.15/src/Makefile.am +=================================================================== +--- gob2-2.0.15.orig/src/Makefile.am ++++ gob2-2.0.15/src/Makefile.am +@@ -17,8 +17,7 @@ INCLUDES = \ + -I$(top_builddir) \ + -I$(top_builddir)/src \ + -I$(top_srcdir) \ +- -I$(top_srcdir)/src \ +- -I$(includedir) ++ -I$(top_srcdir)/src + + if NOINSTGOB + noinst_PROGRAMS = @NOINSTGOB@ +Index: gob2-2.0.15/src/Makefile.in +=================================================================== +--- gob2-2.0.15.orig/src/Makefile.in ++++ gob2-2.0.15/src/Makefile.in +@@ -193,8 +193,7 @@ INCLUDES = \ + -I$(top_builddir) \ + -I$(top_builddir)/src \ + -I$(top_srcdir) \ +- -I$(top_srcdir)/src \ +- -I$(includedir) ++ -I$(top_srcdir)/src + + @NOINSTGOB_TRUE@noinst_PROGRAMS = @NOINSTGOB@ + @NOINSTGOB_FALSE@bin_PROGRAMS = @INSTGOB@ diff --git a/package/gob2/gob2.hash b/package/gob2/gob2.hash new file mode 100644 index 0000000000..3678bdd5c9 --- /dev/null +++ b/package/gob2/gob2.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 f7ee84c07ca88ae96e5a60461957cc4dd0aa69d61804433d1c85de3d50be8026 gob2-2.0.20.tar.xz diff --git a/package/gob2/gob2.mk b/package/gob2/gob2.mk new file mode 100644 index 0000000000..04d02e115c --- /dev/null +++ b/package/gob2/gob2.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# gob2 +# +################################################################################ + +GOB2_VERSION = 2.0.20 +GOB2_SOURCE = gob2-$(GOB2_VERSION).tar.xz +GOB2_SITE = http://ftp.5z.com/pub/gob +HOST_GOB2_DEPENDENCIES = host-bison host-flex host-libglib2 + +$(eval $(host-autotools-package)) + +# gob2 for the host +GOB2_HOST_BINARY = $(HOST_DIR)/usr/bin/gob2 diff --git a/package/google-breakpad/0001-add-missing-asm-ptrace-include.patch b/package/google-breakpad/0001-add-missing-asm-ptrace-include.patch new file mode 100644 index 0000000000..281c7a042a --- /dev/null +++ b/package/google-breakpad/0001-add-missing-asm-ptrace-include.patch @@ -0,0 +1,31 @@ +Include to get necessary definitions on AArch64 + +In glibc commit +https://sourceware.org/git/?p=glibc.git;a=commit;h=7d05a8168b45c0580e1f9a79c2dd26c8f0d31fca, +including from on AArch64 has been +removed. So the Google Breakpad code, which used to build fine on +glibc 2.18 (CodeSourcery toolchain for example), no longer builds with +glibc 2.19 (Linaro toolchain for example). + +To fix this, this patch adds the missing include (for +AArch64 only, to be conservative). + +This patch has not been submitted upstream, since more recent versions +of Google Breakpad have completely changed this part of the code. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/client/linux/minidump_writer/linux_dumper.h +=================================================================== +--- a/src/client/linux/minidump_writer/linux_dumper.h ++++ b/src/client/linux/minidump_writer/linux_dumper.h +@@ -43,6 +43,9 @@ + #include + #include + #include ++#if defined(__aarch64__) ++#include ++#endif + + #include "common/memory.h" + #include "google_breakpad/common/minidump_format.h" diff --git a/package/google-breakpad/Config.in b/package/google-breakpad/Config.in new file mode 100644 index 0000000000..a95bf63732 --- /dev/null +++ b/package/google-breakpad/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS + bool + default y if BR2_i386 || BR2_x86_64 || BR2_arm || BR2_aarch64 || \ + BR2_mips || BR2_mipsel + +config BR2_PACKAGE_GOOGLE_BREAKPAD + bool "google-breakpad" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS + help + Google-Breakpad is 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. + + You may want to set BR2_ENABLE_DEBUG, in order to get useful + results. + + This target package installs a static library named + libbreakpad_client.a which should be linked into programs + willing to use Google Breakpad. A host variant of this + package is also available, and provides the different tools + needed to extract the debugging symbols from target + binaries. + + http://code.google.com/p/google-breakpad/ + +comment "google-breakpad requires an (e)glibc toolchain w/ C++ enabled" + depends on BR2_PACKAGE_GOOGLE_BREAKPAD_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/google-breakpad/gen-syms.sh b/package/google-breakpad/gen-syms.sh new file mode 100755 index 0000000000..2bc0afafb6 --- /dev/null +++ b/package/google-breakpad/gen-syms.sh @@ -0,0 +1,34 @@ +#!/bin/sh +NAME="${0##*/}" +STAGING_DIR="${1}" +TARGET_DIR="${2}" +shift 2 + +SYMBOLS_DIR="${STAGING_DIR}/usr/share/google-breakpad-symbols" +rm -rf "${SYMBOLS_DIR}" +mkdir -p "${SYMBOLS_DIR}" + +error() { + fmt="${1}"; shift + printf "%s: ${fmt}" "${NAME}" "${@}" >&2 + exit 1 +} + +for FILE in ${@}; do + f="${TARGET_DIR}${FILE}" + if [ ! -e "${f}" ]; then + error "%s: No such file or directory\n" "${FILE}" + fi + if [ -d "${f}" ]; then + error "%s: Is a directory\n" "${FILE}" + fi + if dump_syms "${f}" > "${SYMBOLS_DIR}/tmp.sym" 2>/dev/null; then + hash=$(head -n1 "${SYMBOLS_DIR}/tmp.sym" | cut -d ' ' -f 4); + filename=$(basename "${FILE}"); + mkdir -p "${SYMBOLS_DIR}/${filename}/${hash}" + mv "${SYMBOLS_DIR}/tmp.sym" "${SYMBOLS_DIR}/${filename}/${hash}/${filename}.sym"; + else + error "Error dumping symbols for: '%s'\n" "${FILE}" + fi +done +rm -rf "${SYMBOLS_DIR}/tmp" diff --git a/package/google-breakpad/google-breakpad.mk b/package/google-breakpad/google-breakpad.mk new file mode 100644 index 0000000000..1bbe4dab72 --- /dev/null +++ b/package/google-breakpad/google-breakpad.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# google-breakpad +# +################################################################################ + +GOOGLE_BREAKPAD_VERSION = 1373 +GOOGLE_BREAKPAD_SITE = http://google-breakpad.googlecode.com/svn/trunk +GOOGLE_BREAKPAD_SITE_METHOD = svn +GOOGLE_BREAKPAD_CONF_OPTS = --disable-processor --disable-tools +# Only a static library is installed +GOOGLE_BREAKPAD_INSTALL_TARGET = NO +GOOGLE_BREAKPAD_INSTALL_STAGING = YES +GOOGLE_BREAKPAD_LICENSE = BSD-3c +GOOGLE_BREAKPAD_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PACKAGE_GOOGLE_BREAKPAD),y) +GOOGLE_BREAKPAD_DEPENDENCIES = host-google-breakpad +define GOOGLE_BREAKPAD_EXTRACT_SYMBOLS + $(EXTRA_ENV) package/google-breakpad/gen-syms.sh $(STAGING_DIR) \ + $(TARGET_DIR) $(call qstrip,$(BR2_GOOGLE_BREAKPAD_INCLUDE_FILES)) +endef +TARGET_FINALIZE_HOOKS += GOOGLE_BREAKPAD_EXTRACT_SYMBOLS +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/google-material-design-icons/Config.in b/package/google-material-design-icons/Config.in new file mode 100644 index 0000000000..a20042988e --- /dev/null +++ b/package/google-material-design-icons/Config.in @@ -0,0 +1,40 @@ +config BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS + bool "google-material-design-icons" + help + Material design icons are the official icon set from Google that + are designed under the material design guidelines. + + https://github.com/google/material-design-icons + +if BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS + +config BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS_TYPE_PNG + bool "Install PNG icons" + help + Use PNG icon types. + + The default. Traditional format; simplicity and compatibility. + +config BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS_TYPE_SVG + bool "Install SVG icons" + help + Use SVG icon types. + + Vector format that is limitlessly scalable. + +config BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS_FONT + bool "Install TrueType font" + help + Install the Material TrueType font (ttf) on the target system. + +config BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS_SPRITES_CSS + bool "Install CSS sprites" + help + Install CSS (PNG) spritesheets. + +config BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS_SPRITES_SVG + bool "Install SVG sprites" + help + Install SVG spritesheets. + +endif diff --git a/package/google-material-design-icons/google-material-design-icons.hash b/package/google-material-design-icons/google-material-design-icons.hash new file mode 100644 index 0000000000..7bcfcb5439 --- /dev/null +++ b/package/google-material-design-icons/google-material-design-icons.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 87d7c8515207edecd3438a96bdf5129df91e0b29261d5f8c52f672957c11af65 2.0.0.tar.gz diff --git a/package/google-material-design-icons/google-material-design-icons.mk b/package/google-material-design-icons/google-material-design-icons.mk new file mode 100644 index 0000000000..3228d1358d --- /dev/null +++ b/package/google-material-design-icons/google-material-design-icons.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# google-material-design-icons +# +################################################################################ + +GOOGLE_MATERIAL_DESIGN_ICONS_VERSION = 2.0.0 +GOOGLE_MATERIAL_DESIGN_ICONS_SOURCE = \ + $(GOOGLE_MATERIAL_DESIGN_ICONS_VERSION).tar.gz +GOOGLE_MATERIAL_DESIGN_ICONS_SITE = \ + https://github.com/google/material-design-icons/archive +GOOGLE_MATERIAL_DESIGN_ICONS_LICENSE = CC-BY-4.0 +GOOGLE_MATERIAL_DESIGN_ICONS_LICENSE_FILES = LICENSE + +GOOGLE_MATERIAL_DESIGN_ICONS_LIST = \ + action alert av communication content device editor file \ + hardware image maps navigation notification social toggle + +ifneq ($(BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS_TYPE_PNG)$(BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS_TYPE_SVG),) +define GOOGLE_MATERIAL_DESIGN_ICONS_INSTALL_ICONS_IMAGES + $(foreach family,$(GOOGLE_MATERIAL_DESIGN_ICONS_LIST),\ + $(INSTALL) -d $(TARGET_DIR)/usr/share/google-material/$(family) \ + || exit 1; \ + $(if $(BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS_TYPE_PNG), \ + $(INSTALL) -D -m 0644 $(@D)/$(family)/1x_web/*.png \ + $(TARGET_DIR)/usr/share/google-material/$(family) || exit 1;) \ + $(if $(BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS_TYPE_SVG), \ + $(INSTALL) -D -m 0644 $(@D)/$(family)/svg/production/*.svg \ + $(TARGET_DIR)/usr/share/google-material/$(family) || exit 1;) \ + ) +endef +endif + +ifeq ($(BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS_FONT),y) +define GOOGLE_MATERIAL_DESIGN_ICONS_INSTALL_ICONS_FONT + $(INSTALL) -D -m 0644 $(@D)/iconfont/MaterialIcons-Regular.ttf \ + $(TARGET_DIR)/usr/share/fonts/google-material/MaterialIcons-Regular.ttf \ + || exit 1 +endef +endif + +define GOOGLE_MATERIAL_DESIGN_ICONS_INSTALL_ICONS_SPRITES + $(if $(BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS_SPRITES_CSS), \ + $(INSTALL) -d $(TARGET_DIR)/usr/share/google-material/css-sprite \ + || exit 1; \ + $(INSTALL) -D -m 0644 $(@D)/sprites/css-sprite/* \ + $(TARGET_DIR)/usr/share/google-material/css-sprite || exit 1) + $(if $(BR2_PACKAGE_GOOGLE_MATERIAL_DESIGN_ICONS_SPRITES_SVG), \ + $(INSTALL) -d $(TARGET_DIR)/usr/share/google-material/svg-sprite \ + || exit 1; \ + $(INSTALL) -D -m 0644 $(@D)/sprites/svg-sprite/* \ + $(TARGET_DIR)/usr/share/google-material/svg-sprite || exit 1) +endef + +define GOOGLE_MATERIAL_DESIGN_ICONS_INSTALL_TARGET_CMDS + $(GOOGLE_MATERIAL_DESIGN_ICONS_INSTALL_ICONS_FONT) + $(GOOGLE_MATERIAL_DESIGN_ICONS_INSTALL_ICONS_IMAGES) + $(GOOGLE_MATERIAL_DESIGN_ICONS_INSTALL_ICONS_SPRITES) +endef + +$(eval $(generic-package)) diff --git a/package/googlefontdirectory/Config.in b/package/googlefontdirectory/Config.in new file mode 100644 index 0000000000..762c1b1775 --- /dev/null +++ b/package/googlefontdirectory/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_GOOGLEFONTDIRECTORY + bool "Google font directory" + help + Google font directory + + http://code.google.com/p/googlefontdirectory/ + +if BR2_PACKAGE_GOOGLEFONTDIRECTORY + +config BR2_PACKAGE_GOOGLEFONTDIRECTORY_FONTS + string "List of fonts to install" + default "droid" + help + Specify a space-separated list of fonts to install + +endif diff --git a/package/googlefontdirectory/googlefontdirectory.hash b/package/googlefontdirectory/googlefontdirectory.hash new file mode 100644 index 0000000000..6b15b2b8b7 --- /dev/null +++ b/package/googlefontdirectory/googlefontdirectory.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 8a7d04feef21fdfc09d90cd3e2c0c05dcb2fdd4e15f971e8ceaf4d90c1c123cd googlewebfonts.tgz diff --git a/package/googlefontdirectory/googlefontdirectory.mk b/package/googlefontdirectory/googlefontdirectory.mk new file mode 100644 index 0000000000..0e60892bb2 --- /dev/null +++ b/package/googlefontdirectory/googlefontdirectory.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# googlefontdirectory +# +################################################################################ + +GOOGLEFONTDIRECTORY_SITE = \ + https://s3.amazonaws.com/joemaller_google_webfonts +GOOGLEFONTDIRECTORY_SOURCE = googlewebfonts.tgz +GOOGLEFONTDIRECTORY_LICENSE = OFLv1.1 + +GOOGLEFONTDIRECTORY_FONTS = \ + $(call qstrip,$(BR2_PACKAGE_GOOGLEFONTDIRECTORY_FONTS)) + +define GOOGLEFONTDIRECTORY_INSTALL_TARGET_CMDS + for i in $(GOOGLEFONTDIRECTORY_FONTS); \ + do \ + $(INSTALL) -d $(TARGET_DIR)/usr/share/fonts/$$i && \ + $(INSTALL) -m 0644 -t $(TARGET_DIR)/usr/share/fonts/$$i $(@D)/$$i/*.ttf || exit 1; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/gperf/Config.in b/package/gperf/Config.in new file mode 100644 index 0000000000..e6d51fca72 --- /dev/null +++ b/package/gperf/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_GPERF + bool "gperf" + depends on BR2_INSTALL_LIBSTDCPP + help + A 'perfect hash function' generator + + http://www.gnu.org/software/gperf/ + +comment "gperf needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/gperf/gperf.hash b/package/gperf/gperf.hash new file mode 100644 index 0000000000..370235c627 --- /dev/null +++ b/package/gperf/gperf.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 767112a204407e62dbc3106647cf839ed544f3cf5d0f0523aaa2508623aad63e gperf-3.0.4.tar.gz diff --git a/package/gperf/gperf.mk b/package/gperf/gperf.mk new file mode 100644 index 0000000000..8ce3c95ffb --- /dev/null +++ b/package/gperf/gperf.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# gperf +# +################################################################################ + +GPERF_VERSION = 3.0.4 +GPERF_SITE = $(BR2_GNU_MIRROR)/gperf +GPERF_LICENSE = GPLv3+ +GPERF_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gpm/0001-Added-musl-support-to-libgpm-and-the-daemon.patch b/package/gpm/0001-Added-musl-support-to-libgpm-and-the-daemon.patch new file mode 100644 index 0000000000..1e1e919416 --- /dev/null +++ b/package/gpm/0001-Added-musl-support-to-libgpm-and-the-daemon.patch @@ -0,0 +1,71 @@ +From eb0e14f8a5c414603b2e882df54b9fec138104ec Mon Sep 17 00:00:00 2001 +From: Dima Krasner +Date: Wed, 12 Nov 2014 23:06:46 +0200 +Subject: [PATCH] Added musl support to libgpm and the daemon. + +[Upstream patch backported from the github repository, +https://github.com/telmich/gpm/commit/d88fb1de5803c366ab62f7de9ee5d83207fb2afe.] + +Signed-off-by: Thomas Petazzoni +--- + src/daemon/open_console.c | 1 + + src/prog/display-buttons.c | 1 + + src/prog/display-coords.c | 1 + + src/prog/gpm-root.y | 4 ++-- + 4 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/daemon/open_console.c b/src/daemon/open_console.c +index 98297c9..4d6c0af 100644 +--- a/src/daemon/open_console.c ++++ b/src/daemon/open_console.c +@@ -21,6 +21,7 @@ + + #include /* open and co. */ + #include /* stat() */ ++#include /* major() */ + #include /* ioctl */ + + /* Linux specific (to be outsourced in gpm2 */ +diff --git a/src/prog/display-buttons.c b/src/prog/display-buttons.c +index de8e5b2..38d2f11 100644 +--- a/src/prog/display-buttons.c ++++ b/src/prog/display-buttons.c +@@ -36,6 +36,7 @@ + #include /* printf() */ + #include /* time() */ + #include /* errno */ ++#include /* fd_set and FD_* */ + #include /* gpm information */ + + /* display resulting data */ +diff --git a/src/prog/display-coords.c b/src/prog/display-coords.c +index ed15c8a..411283a 100644 +--- a/src/prog/display-coords.c ++++ b/src/prog/display-coords.c +@@ -37,6 +37,7 @@ + #include /* printf() */ + #include /* time() */ + #include /* errno */ ++#include /* fd_set and FD_* */ + #include /* gpm information */ + + /* display resulting data */ +diff --git a/src/prog/gpm-root.y b/src/prog/gpm-root.y +index 069d801..188ae35 100644 +--- a/src/prog/gpm-root.y ++++ b/src/prog/gpm-root.y +@@ -1199,9 +1199,9 @@ int main(int argc, char **argv) + #if defined(__GLIBC__) + __sigemptyset(&childaction.sa_mask); + #else /* __GLIBC__ */ +- childaction.sa_mask=0; ++ sigemptyset(&childaction.sa_mask); + #endif /* __GLIBC__ */ +- childaction.sa_flags=SA_INTERRUPT; /* need to break the select() call */ ++ childaction.sa_flags=0; + sigaction(SIGCHLD,&childaction,NULL); + + /*....................................... Connect and get your buffer */ +-- +2.1.0 + diff --git a/package/gpm/0002-Install-unversioned-solibrary.patch b/package/gpm/0002-Install-unversioned-solibrary.patch new file mode 100644 index 0000000000..27e97acb32 --- /dev/null +++ b/package/gpm/0002-Install-unversioned-solibrary.patch @@ -0,0 +1,41 @@ +From 06b00d53d8bd513ad5d262dc94a016c6fbf2d3aa Mon Sep 17 00:00:00 2001 +From: Kamil Rytarowski +Date: Sat, 4 May 2013 01:30:17 +0200 +Subject: [PATCH] Install unversioned solibrary + +Unversioned solibraries are shipped with -devel packages in Linux +distros. Generate and install it for the consistency. + +[Upstream patch backported from the github repository, +https://github.com/telmich/gpm/commit/06b00d53d8bd513ad5d262dc94a016c6fbf2d3aa] + +Signed-off-by: Bernd Kuhls +--- + src/Makefile.in | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/Makefile.in b/src/Makefile.in +index 6b60ad3..7e9e2ef 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -79,7 +79,7 @@ prog/%: prog/%.o + # | $(SED) '\''s/\($*\)\.o\([ :]*\)/\1.o \1.lo\2/g'\'' > $(DEPDIR)/$@' + + # Do it all! +-all: gpm lib/libgpm.so.@abi_lev@ @LIBGPM_A@ $(PROG) ++all: gpm lib/libgpm.so.@abi_lev@ lib/libgpm.so @LIBGPM_A@ $(PROG) + + gpm: $(GOBJ) + $(CC) @LDFLAGS@ $(LDFLAGS) -o $@ $(GOBJ) @LIBS@ $(LIBS) -lm +@@ -168,9 +168,8 @@ lib/libgpm.so.@abi_full@: $(PICS) + @LDFLAGS@ $(LDFLAGS) -o lib/libgpm.so.@abi_full@ $^ @LIBS@ @SHARED_LIBS@ $(LIBS) + lib/libgpm.so.@abi_lev@: lib/libgpm.so.@abi_full@ + $(LN_S) -f libgpm.so.@abi_full@ lib/libgpm.so.@abi_lev@ +-# unneeded, isn't it? +-#lib/libgpm.so: lib/libgpm.so.@abi_full@ +-# $(LN_S) -f libgpm.so.@abi_full@ lib/libgpm.so ++lib/libgpm.so: lib/libgpm.so.@abi_full@ ++ $(LN_S) -f libgpm.so.@abi_full@ lib/libgpm.so + + include $(DEPFILE) + diff --git a/package/gpm/0003-src-Makefile.in-Really-install-unversioned-solibrary.patch b/package/gpm/0003-src-Makefile.in-Really-install-unversioned-solibrary.patch new file mode 100644 index 0000000000..58b260ce24 --- /dev/null +++ b/package/gpm/0003-src-Makefile.in-Really-install-unversioned-solibrary.patch @@ -0,0 +1,31 @@ +From 445be05fba32c512fd87a0c98b4e9936629ef95e Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 20 Feb 2016 17:59:52 +0100 +Subject: [PATCH 1/1] src/Makefile.in: Really install unversioned solibrary + +This commit is a follow-up to +https://github.com/telmich/gpm/commit/06b00d53d8bd513ad5d262dc94a016c6fbf2d3aa +which created libgpm.so but failed to include it in the install target. + +Patch sent upstream: https://github.com/telmich/gpm/pull/11 + +Signed-off-by: Bernd Kuhls +--- + src/Makefile.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/Makefile.in b/src/Makefile.in +index 7e9e2ef..bca226f 100644 +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -115,6 +115,7 @@ install: check + if test "x@SHLIB@" != "x" ; then \ + $(INSTALL_DATA) -m 755 lib/libgpm.so.@abi_full@ $(libdir)/libgpm.so.@abi_full@ ; \ + cd $(libdir) && $(LN_S) -f libgpm.so.@abi_full@ libgpm.so.@abi_lev@ ; \ ++ cd $(libdir) && $(LN_S) -f libgpm.so.@abi_full@ libgpm.so ; \ + echo "WARNING: We installed a lib, you should now call ldconfig" ; \ + echo "f.i.: ldconfig -n -l $(libdir)/libgpm.so.@abi_full@" ; \ + echo "Or to update everything just type ldconfig" ; \ +-- +2.7.0 + diff --git a/package/gpm/Config.in b/package/gpm/Config.in new file mode 100644 index 0000000000..2d0d366d7e --- /dev/null +++ b/package/gpm/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_GPM + bool "gpm" + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # fork() + help + "gpm" means general purpose mouse (server) and provides mouse support + for Linux virtual consoles. + gpm-root (to draw menus in current virtual console; config file in + /etc/gpm-root.conf) and disable-paste (to disable paste buffer for + security reasons), will also be installed. + + http://www.nico.schottelius.org/software/gpm/ + +if BR2_PACKAGE_GPM + +config BR2_PACKAGE_GPM_INSTALL_TEST_TOOLS + bool "install test tools" + help + Install gpm test tools (get-versions, mev, hltest, mouse-test, + display-buttons & display-coords). + +endif + +comment "gpm mouse server needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + depends on BR2_USE_MMU diff --git a/package/gpm/gpm.hash b/package/gpm/gpm.hash new file mode 100644 index 0000000000..7bbc43dd40 --- /dev/null +++ b/package/gpm/gpm.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 a955053b36556ffa7c628ce18fd6de7d625966573fa412fb08869533d8f7385c gpm-1.20.7.tar.lzma diff --git a/package/gpm/gpm.mk b/package/gpm/gpm.mk new file mode 100644 index 0000000000..6d3b5d2dc2 --- /dev/null +++ b/package/gpm/gpm.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# gpm +# +################################################################################ + +GPM_VERSION = 1.20.7 +GPM_SOURCE = gpm-$(GPM_VERSION).tar.lzma +GPM_SITE = http://www.nico.schottelius.org/software/gpm/archives +GPM_LICENSE = GPLv2+ +GPM_LICENSE_FILES = COPYING +GPM_INSTALL_STAGING = YES +GPM_DEPENDENCIES = host-bison + +# if not already installed in staging dir, gpm Makefile may fail to find some +# of the headers needed to generate build dependencies, the first time it is +# built. CPPFLAGS is used to pass the right include path to dependency rules. +GPM_CONF_ENV = CPPFLAGS="$(TARGET_CPPFLAGS) -I$(@D)/src/headers/" \ + ac_cv_path_emacs=no + +# For some reason, Microblaze gcc does not define __ELF__, which gpm +# configure script uses to determine whether the architecture uses ELF +# binaries and therefore can build shared libraries. We fix this by +# telling GPM that ELF is used on Microblaze. +ifeq ($(BR2_microblaze),y) +GPM_CONF_ENV += itz_cv_sys_elf=yes +endif + +# gpm and ncurses have a circular dependency. As gpm function GPM_Wgetch() +# (requiring ncurses) is not recommended for use by ncurses people themselves +# and as it's better to have gpm support in ncurses that the contrary, we force +# gpm to not look after ncurses explicitly. +# http://invisible-island.net/ncurses/ncurses.faq.html#using_gpm_lib +GPM_CONF_OPTS = --without-curses + +# configure is missing but gpm seems not compatible with our autoreconf +# mechanism so we have to do it manually instead of using GPM_AUTORECONF = YES +define GPM_RUN_AUTOGEN + cd $(@D) && PATH=$(BR_PATH) ./autogen.sh +endef +GPM_PRE_CONFIGURE_HOOKS += GPM_RUN_AUTOGEN + +GPM_DEPENDENCIES += host-automake host-autoconf host-libtool + +# gpm tries to build/install .info doc even if makeinfo isn't installed on the +# host, so we have to disable global doc installation to prevent autobuild +# errors. +define GPM_DISABLE_DOC_INSTALL + $(SED) 's/SUBDIRS = src doc contrib/SUBDIRS = src contrib/' \ + $(@D)/Makefile.in +endef +GPM_POST_PATCH_HOOKS += GPM_DISABLE_DOC_INSTALL + +ifeq ($(BR2_PACKAGE_GPM_INSTALL_TEST_TOOLS),) +define GPM_REMOVE_TEST_TOOLS_FROM_TARGET + for tools in mev hltest mouse-test display-buttons \ + get-versions display-coords; do \ + rm -f $(TARGET_DIR)/usr/bin/$$tools ; \ + done +endef +GPM_POST_INSTALL_TARGET_HOOKS += GPM_REMOVE_TEST_TOOLS_FROM_TARGET +endif + +define GPM_INSTALL_GPM_ROOT_CONF_ON_TARGET + $(INSTALL) -m 0644 -D $(@D)/conf/gpm-root.conf $(TARGET_DIR)/etc/ +endef + +GPM_POST_INSTALL_TARGET_HOOKS += GPM_INSTALL_GPM_ROOT_CONF_ON_TARGET + +$(eval $(autotools-package)) diff --git a/package/gpsd/Config.in b/package/gpsd/Config.in new file mode 100644 index 0000000000..b4008ebd83 --- /dev/null +++ b/package/gpsd/Config.in @@ -0,0 +1,236 @@ +comment "gpsd needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_GPSD + bool "gpsd" + # Uses fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + # Always tries to build a shared library + depends on !BR2_STATIC_LIBS + help + gpsd is a service daemon that monitors one or more GPSes or AIS + receivers attached to a host computer through serial or USB ports, + making all data on the location/course/velocity of the sensors + available to be queried on TCP port 2947 of the host computer. + + The D-Bus interface is included if dbus-glib is enabled. + + http://www.catb.org/gpsd/ + +if BR2_PACKAGE_GPSD + +config BR2_PACKAGE_GPSD_DEVICES + string "Where to look for GPSes" + default "/dev/ttyS1" + +menu "Features" + +config BR2_PACKAGE_GPSD_CLIENT_DEBUG + bool "client debugging support" + +config BR2_PACKAGE_GPSD_OLDSTYLE + bool "oldstyle (pre-JSON) protocol support" + +config BR2_PACKAGE_GPSD_PROFILING + bool "profiling support" + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on !BR2_aarch64 + +comment "profiling support not available with uClibc-based toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_GPSD_NTP_SHM + bool "NTP time hinting support" + +config BR2_PACKAGE_GPSD_PPS + bool "PPS time syncing support" + select BR2_PACKAGE_GPSD_NTP_SHM + +config BR2_PACKAGE_GPSD_USER + bool "GPSD privilege revocation user" +config BR2_PACKAGE_GPSD_USER_VALUE + string "" + default "nobody" + depends on BR2_PACKAGE_GPSD_USER + +config BR2_PACKAGE_GPSD_GROUP + bool "GPSD privilege revocation group" +config BR2_PACKAGE_GPSD_GROUP_VALUE + string "" + default "nobody" + depends on BR2_PACKAGE_GPSD_GROUP + +config BR2_PACKAGE_GPSD_FIXED_PORT_SPEED + bool "compile with fixed serial port speed" +config BR2_PACKAGE_GPSD_FIXED_PORT_SPEED_VALUE + string "" + default "9600" + depends on BR2_PACKAGE_GPSD_FIXED_PORT_SPEED + +config BR2_PACKAGE_GPSD_MAX_CLIENT + bool "compile with limited maximum clients" +config BR2_PACKAGE_GPSD_MAX_CLIENT_VALUE + string "compile with limited maximum clients" + default "10" + depends on BR2_PACKAGE_GPSD_MAX_CLIENT + +config BR2_PACKAGE_GPSD_MAX_DEV + bool "compile with maximum allowed devices" +config BR2_PACKAGE_GPSD_MAX_DEV_VALUE + string "compile with maximum allowed devices" + default "2" + depends on BR2_PACKAGE_GPSD_MAX_DEV + +config BR2_PACKAGE_GPSD_RECONFIGURE + bool "allow gpsd to change device settings" + default y + +config BR2_PACKAGE_GPSD_CONTROLSEND + bool "allow gpsctl/gpsmon to change device settings" + default y + +config BR2_PACKAGE_GPSD_SQUELCH + bool "squelch gpsd_report and gpsd_hexdump to save cpu" + +endmenu + +menu "Protocols" + +config BR2_PACKAGE_GPSD_AIVDM + bool "Aivdm" + help + Aivdm support + +config BR2_PACKAGE_GPSD_ASHTECH + bool "Ashtech" + help + Ashtech support + +config BR2_PACKAGE_GPSD_EARTHMATE + bool "Earthmate" + help + DeLorme EarthMate Zodiac support + +config BR2_PACKAGE_GPSD_EVERMORE + bool "EverMore" + help + EverMore binary support + +config BR2_PACKAGE_GPSD_FURY + bool "Fury" + help + Jackson Labs Fury and Firefly support + +config BR2_PACKAGE_GPSD_FV18 + bool "FV-18" + help + San Jose Navigation FV-18 support + +config BR2_PACKAGE_GPSD_GARMIN + bool "Garmin (kernel)" + help + Garmin kernel driver support + +config BR2_PACKAGE_GPSD_GARMIN_SIMPLE_TXT + bool "Garmin (simple text)" + help + Garmin Simple Text support + +config BR2_PACKAGE_GPSD_GEOSTAR + bool "Geostar" + help + Geostar Protocol support + +config BR2_PACKAGE_GPSD_GPSCLOCK + bool "GPSClock" + help + GPSClock support + +config BR2_PACKAGE_GPSD_ITRAX + bool "iTrax" + help + iTrax support + +config BR2_PACKAGE_GPSD_MTK3301 + bool "MTK-3301" + help + Mediatek MTK-3301 support + +config BR2_PACKAGE_GPSD_NAVCOM + bool "Navcom" + help + Navcom binary support + +config BR2_PACKAGE_GPSD_NMEA + bool "NMEA" + default y + help + Generic NMEA support + +config BR2_PACKAGE_GPSD_NMEA2000 + bool "NMEA2000" + select BR2_PACKAGE_GPSD_NAVCOM + select BR2_PACKAGE_GPSD_AIVDM + help + NMEA2000/CAN support + +config BR2_PACKAGE_GPSD_NTRIP + bool "NTRIP" + help + NTRIP support + +config BR2_PACKAGE_GPSD_OCEANSERVER + bool "OceanServer" + help + OceanServer Digital Compass support + +config BR2_PACKAGE_GPSD_ONCORE + bool "OnCore" + help + OnCore support + +config BR2_PACKAGE_GPSD_RTCM104V2 + bool "RTCM104 v2" + help + RTCM104 v2 support + +config BR2_PACKAGE_GPSD_RTCM104V3 + bool "RTCM104 v3" + help + RTCM104 v3 support + +config BR2_PACKAGE_GPSD_SIRF + bool "SiRF" + help + SiRF binary support + +config BR2_PACKAGE_GPSD_SUPERSTAR2 + bool "SuperStarII" + help + Novatel SuperStarII binary support + +config BR2_PACKAGE_GPSD_TRIMBLE_TSIP + bool "Trimble TSIP" + help + Trimble TSIP support + +config BR2_PACKAGE_GPSD_TRIPMATE + bool "TripMate" + help + Delorme TripMate support + +config BR2_PACKAGE_GPSD_TRUE_NORTH + bool "True North Technologies" + help + True North Technologies support + +config BR2_PACKAGE_GPSD_UBX + bool "UBX" + help + uBlox UBX binary support + +endmenu + +endif diff --git a/package/gpsd/S50gpsd b/package/gpsd/S50gpsd new file mode 100644 index 0000000000..39bf232061 --- /dev/null +++ b/package/gpsd/S50gpsd @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Starts the gps daemon. +# + +NAME=gpsd +DAEMON=/usr/sbin/$NAME +DEVICES=/dev/ttyS1 +PIDFILE=/var/run/$NAME.pid + +start() { + printf "Starting $NAME: " + start-stop-daemon -S -q -p $PIDFILE --exec $DAEMON -- -P $PIDFILE $DEVICES && echo "OK" || echo "Failed" +} +stop() { + printf "Stopping $NAME: " + start-stop-daemon -K -q -p $PIDFILE && echo "OK" || echo "Failed" + rm -f $PIDFILE +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/gpsd/gpsd.hash b/package/gpsd/gpsd.hash new file mode 100644 index 0000000000..3083af24f1 --- /dev/null +++ b/package/gpsd/gpsd.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 03579af13a4d3fe0c5b79fa44b5f75c9f3cac6749357f1d99ce5d38c09bc2029 gpsd-3.16.tar.gz diff --git a/package/gpsd/gpsd.mk b/package/gpsd/gpsd.mk new file mode 100644 index 0000000000..4fe5d18b1a --- /dev/null +++ b/package/gpsd/gpsd.mk @@ -0,0 +1,250 @@ +################################################################################ +# +# gpsd +# +################################################################################ + +GPSD_VERSION = 3.16 +GPSD_SITE = http://download-mirror.savannah.gnu.org/releases/gpsd +GPSD_LICENSE = BSD-3c +GPSD_LICENSE_FILES = COPYING +GPSD_INSTALL_STAGING = YES + +GPSD_DEPENDENCIES = host-scons host-pkgconf + +GPSD_LDFLAGS = $(TARGET_LDFLAGS) +GPSD_CFLAGS = $(TARGET_CFLAGS) + +GPSD_SCONS_ENV = $(TARGET_CONFIGURE_OPTS) + +GPSD_SCONS_OPTS = \ + arch=$(ARCH)\ + prefix=/usr\ + sysroot=$(STAGING_DIR)\ + strip=no\ + python=no + +ifeq ($(BR2_PACKAGE_NCURSES),y) +GPSD_DEPENDENCIES += ncurses +else +GPSD_SCONS_OPTS += ncurses=no +endif + +# Build libgpsmm if we've got C++ +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +GPSD_LDFLAGS += -lstdc++ +GPSD_SCONS_OPTS += libgpsmm=yes +else +GPSD_SCONS_OPTS += libgpsmm=no +endif + +# prevents from triggering GCC ICE +# A bug was reported to the gcc bug tracker: +# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485 +ifeq ($(BR2_microblaze),y) +GPSD_CFLAGS += -fno-expensive-optimizations -fno-schedule-insns +endif + +# Enable or disable Qt binding +ifeq ($(BR2_PACKAGE_QT_NETWORK),y) +GPSD_SCONS_ENV += QMAKE="$(QT_QMAKE)" +GPSD_DEPENDENCIES += qt +else +GPSD_SCONS_OPTS += qt=no +endif + +# If libusb is available build it before so the package can use it +ifeq ($(BR2_PACKAGE_LIBUSB),y) +GPSD_DEPENDENCIES += libusb +else +GPSD_SCONS_OPTS += usb=no +endif + +# If bluetooth is available build it before so the package can use it +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y) +GPSD_DEPENDENCIES += bluez_utils +else +GPSD_SCONS_OPTS += bluez=no +endif + +# If pps-tools is available, build it before so the package can use it +# (HAVE_SYS_TIMEPPS_H). +ifeq ($(BR2_PACKAGE_PPS_TOOLS),y) +GPSD_DEPENDENCIES += pps-tools +endif + +ifeq ($(BR2_PACKAGE_DBUS_GLIB),y) +GPSD_SCONS_OPTS += dbus_export=yes +GPSD_DEPENDENCIES += dbus-glib +endif + +# Protocol support +ifneq ($(BR2_PACKAGE_GPSD_ASHTECH),y) +GPSD_SCONS_OPTS += ashtech=no +endif +ifneq ($(BR2_PACKAGE_GPSD_AIVDM),y) +GPSD_SCONS_OPTS += aivdm=no +endif +ifneq ($(BR2_PACKAGE_GPSD_EARTHMATE),y) +GPSD_SCONS_OPTS += earthmate=no +endif +ifneq ($(BR2_PACKAGE_GPSD_EVERMORE),y) +GPSD_SCONS_OPTS += evermore=no +endif +ifneq ($(BR2_PACKAGE_GPSD_FURY),y) +GPSD_SCONS_OPTS += fury=no +endif +ifneq ($(BR2_PACKAGE_GPSD_FV18),y) +GPSD_SCONS_OPTS += fv18=no +endif +ifneq ($(BR2_PACKAGE_GPSD_GARMIN),y) +GPSD_SCONS_OPTS += garmin=no +endif +ifneq ($(BR2_PACKAGE_GPSD_GARMIN_SIMPLE_TXT),y) +GPSD_SCONS_OPTS += garmintxt=no +endif +ifneq ($(BR2_PACKAGE_GPSD_GEOSTAR),y) +GPSD_SCONS_OPTS += geostar=no +endif +ifneq ($(BR2_PACKAGE_GPSD_GPSCLOCK),y) +GPSD_SCONS_OPTS += gpsclock=no +endif +ifneq ($(BR2_PACKAGE_GPSD_ITRAX),y) +GPSD_SCONS_OPTS += itrax=no +endif +ifneq ($(BR2_PACKAGE_GPSD_MTK3301),y) +GPSD_SCONS_OPTS += mtk3301=no +endif +ifneq ($(BR2_PACKAGE_GPSD_NMEA),y) +GPSD_SCONS_OPTS += nmea0183=no +endif +ifneq ($(BR2_PACKAGE_GPSD_NTRIP),y) +GPSD_SCONS_OPTS += ntrip=no +endif +ifneq ($(BR2_PACKAGE_GPSD_NAVCOM),y) +GPSD_SCONS_OPTS += navcom=no +endif +ifneq ($(BR2_PACKAGE_GPSD_NMEA2000),y) +GPSD_SCONS_OPTS += nmea2000=no +endif +ifneq ($(BR2_PACKAGE_GPSD_OCEANSERVER),y) +GPSD_SCONS_OPTS += oceanserver=no +endif +ifneq ($(BR2_PACKAGE_GPSD_ONCORE),y) +GPSD_SCONS_OPTS += oncore=no +endif +ifneq ($(BR2_PACKAGE_GPSD_RTCM104V2),y) +GPSD_SCONS_OPTS += rtcm104v2=no +endif +ifneq ($(BR2_PACKAGE_GPSD_RTCM104V3),y) +GPSD_SCONS_OPTS += rtcm104v3=no +endif +ifneq ($(BR2_PACKAGE_GPSD_SIRF),y) +GPSD_SCONS_OPTS += sirf=no +endif +ifneq ($(BR2_PACKAGE_GPSD_SUPERSTAR2),y) +GPSD_SCONS_OPTS += superstar2=no +endif +ifneq ($(BR2_PACKAGE_GPSD_TRIMBLE_TSIP),y) +GPSD_SCONS_OPTS += tsip=no +endif +ifneq ($(BR2_PACKAGE_GPSD_TRIPMATE),y) +GPSD_SCONS_OPTS += tripmate=no +endif +ifneq ($(BR2_PACKAGE_GPSD_TRUE_NORTH),y) +GPSD_SCONS_OPTS += tnt=no +endif +ifneq ($(BR2_PACKAGE_GPSD_UBX),y) +GPSD_SCONS_OPTS += ublox=no +endif + +# Features +ifneq ($(BR2_PACKAGE_GPSD_NTP_SHM),y) +GPSD_SCONS_OPTS += ntpshm=no +endif +ifneq ($(BR2_PACKAGE_GPSD_PPS),y) +GPSD_SCONS_OPTS += pps=no +endif +ifeq ($(BR2_PACKAGE_GPSD_SQUELCH),y) +GPSD_SCONS_OPTS += squelch=yes +endif +ifneq ($(BR2_PACKAGE_GPSD_RECONFIGURE),y) +GPSD_SCONS_OPTS += reconfigure=no +endif +ifneq ($(BR2_PACKAGE_GPSD_CONTROLSEND),y) +GPSD_SCONS_OPTS += controlsend=no +endif +ifneq ($(BR2_PACKAGE_GPSD_OLDSTYLE),y) +GPSD_SCONS_OPTS += oldstyle=no +endif +ifeq ($(BR2_PACKAGE_GPSD_PROFILING),y) +GPSD_SCONS_OPTS += profiling=yes +endif +ifneq ($(BR2_PACKAGE_GPSD_CLIENT_DEBUG),y) +GPSD_SCONS_OPTS += clientdebug=no +endif +ifeq ($(BR2_PACKAGE_GPSD_USER),y) +GPSD_SCONS_OPTS += gpsd_user=$(BR2_PACKAGE_GPSD_USER_VALUE) +endif +ifeq ($(BR2_PACKAGE_GPSD_GROUP),y) +GPSD_SCONS_OPTS += gpsd_group=$(BR2_PACKAGE_GPSD_GROUP_VALUE) +endif +ifeq ($(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED),y) +GPSD_SCONS_OPTS += fixed_port_speed=$(BR2_PACKAGE_GPSD_FIXED_PORT_SPEED_VALUE) +endif +ifeq ($(BR2_PACKAGE_GPSD_MAX_CLIENT),y) +GPSD_SCONS_OPTS += limited_max_clients=$(BR2_PACKAGE_GPSD_MAX_CLIENT_VALUE) +endif +ifeq ($(BR2_PACKAGE_GPSD_MAX_DEV),y) +GPSD_SCONS_OPTS += limited_max_devices=$(BR2_PACKAGE_GPSD_MAX_DEV_VALUE) +endif + +GPSD_SCONS_ENV += LDFLAGS="$(GPSD_LDFLAGS)" CFLAGS="$(GPSD_CFLAGS)" + +define GPSD_BUILD_CMDS + (cd $(@D); \ + $(GPSD_SCONS_ENV) \ + $(SCONS) \ + $(GPSD_SCONS_OPTS)) +endef + +define GPSD_INSTALL_TARGET_CMDS + (cd $(@D); \ + $(GPSD_SCONS_ENV) \ + DESTDIR=$(TARGET_DIR) \ + $(SCONS) \ + $(GPSD_SCONS_OPTS) \ + install) +endef + +define GPSD_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/gpsd/S50gpsd $(TARGET_DIR)/etc/init.d/S50gpsd + $(SED) 's,^DEVICES=.*,DEVICES=$(BR2_PACKAGE_GPSD_DEVICES),' $(TARGET_DIR)/etc/init.d/S50gpsd +endef + +define GPSD_INSTALL_STAGING_CMDS + (cd $(@D); \ + $(GPSD_SCONS_ENV) \ + DESTDIR=$(STAGING_DIR) \ + $(SCONS) \ + $(GPSD_SCONS_OPTS) \ + install) +endef + +# After installing the udev rule, make it writable so that this +# package can be re-built/re-installed. +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +define GPSD_INSTALL_UDEV_RULES + (cd $(@D); \ + $(GPSD_SCONS_ENV) \ + DESTDIR=$(TARGET_DIR) \ + $(SCONS) \ + $(GPSD_SCONS_OPTS) \ + udev-install) + chmod u+w $(TARGET_DIR)/lib/udev/rules.d/25-gpsd.rules +endef + +GPSD_POST_INSTALL_TARGET_HOOKS += GPSD_INSTALL_UDEV_RULES +endif + +$(eval $(generic-package)) diff --git a/package/gptfdisk/0001-ldlibs.patch b/package/gptfdisk/0001-ldlibs.patch new file mode 100644 index 0000000000..ca1d7fbfea --- /dev/null +++ b/package/gptfdisk/0001-ldlibs.patch @@ -0,0 +1,31 @@ +Add $(LDLIBS) support to enable clean static builds (for libintl). + +Signed-off-by: Gustavo Zacarias + +diff -Nura gptfdisk-0.8.10.orig/Makefile gptfdisk-0.8.10/Makefile +--- gptfdisk-0.8.10.orig/Makefile 2015-05-01 08:45:14.667748141 -0300 ++++ gptfdisk-0.8.10/Makefile 2015-05-01 08:45:42.685699419 -0300 +@@ -14,19 +14,19 @@ + all: cgdisk gdisk sgdisk fixparts + + gdisk: $(LIB_OBJS) gdisk.o gpttext.o +- $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid -o gdisk ++ $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -luuid $(LDLIBS) -o gdisk + # $(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk + + cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o +- $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncursesw -o cgdisk ++ $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncursesw $(LDLIBS) -o cgdisk + # $(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licuio -licuuc -luuid -lncurses -o cgdisk + + sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o +- $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -luuid -lpopt -o sgdisk ++ $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -luuid -lpopt $(LDLIBS) -o sgdisk + # $(CXX) $(LIB_OBJS) sgdisk.o gptcl.o $(LDFLAGS) -licuio -licuuc -luuid -lpopt -o sgdisk + + fixparts: $(MBR_LIB_OBJS) fixparts.o +- $(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) -o fixparts ++ $(CXX) $(MBR_LIB_OBJS) fixparts.o $(LDFLAGS) $(LDLIBS) -o fixparts + + lint: #no pre-reqs + lint $(SRCS) diff --git a/package/gptfdisk/Config.in b/package/gptfdisk/Config.in new file mode 100644 index 0000000000..befdf77715 --- /dev/null +++ b/package/gptfdisk/Config.in @@ -0,0 +1,46 @@ +comment "gptfdisk needs a toolchain w/ wchar, C++" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR) + +config BR2_PACKAGE_GPTFDISK + bool "gptfdisk" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # util-linux + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_GPTFDISK_GDISK if \ + !(BR2_PACKAGE_GPTFDISK_SGDISK || BR2_PACKAGE_GPTFDISK_CGDISK) + help + GPT fdisk (consisting of the gdisk and sgdisk programs) is a + text-mode partitioning tool that works on Globally Unique Identifier + (GUID) Partition Table (GPT) disks, rather than on the more common + (through 2010) Master Boot Record (MBR) partition tables. + + http://www.rodsbooks.com/gdisk/ + +if BR2_PACKAGE_GPTFDISK + +config BR2_PACKAGE_GPTFDISK_GDISK + bool "interactive gdisk" + help + Install the interactive GUID partition table (GPT) manipulator + /usr/sbin/gdisk which is modelled after and quite similar in use + to the traditional MBR based fdisk tool. + +config BR2_PACKAGE_GPTFDISK_SGDISK + bool "command line sgdisk" + select BR2_PACKAGE_POPT + help + Install the command-line GUID partition table (GPT) manipulator + /usr/sbin/sgdisk which is named after the traditional MBR based + sfdisk tool albeit with an entirely different option syntax. + +config BR2_PACKAGE_GPTFDISK_CGDISK + bool "ncurses cgdisk" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_NCURSES_WCHAR # needed because of UTF-16 + depends on !(BR2_bfin && BR2_BINFMT_FLAT) # ncurses wchar support + help + Install the ncurses-based GUID partition table (GPT) + manipulator /usr/sbin/cgdisk. + +endif diff --git a/package/gptfdisk/Config.in.host b/package/gptfdisk/Config.in.host new file mode 100644 index 0000000000..1300d024e5 --- /dev/null +++ b/package/gptfdisk/Config.in.host @@ -0,0 +1,11 @@ +config BR2_PACKAGE_HOST_GPTFDISK + bool "host gptfdisk" + select BR2_PACKAGE_HOST_UTIL_LINUX + help + GPT fdisk (consisting of the gdisk and sgdisk programs) is a + text-mode partitioning tool that works on Globally Unique + Identifier (GUID) Partition Table (GPT) disks, rather than + on the more common (through 2010) Master Boot Record (MBR) + partition tables. + + http://www.rodsbooks.com/gdisk/ diff --git a/package/gptfdisk/gptfdisk.hash b/package/gptfdisk/gptfdisk.hash new file mode 100644 index 0000000000..0a72e0d922 --- /dev/null +++ b/package/gptfdisk/gptfdisk.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/gptfdisk/files/gptfdisk/1.0.0/ +md5 2061f917af084215898d4fea04d8388f gptfdisk-1.0.0.tar.gz +sha1 97f25db2def1c1939ed3954520bfd9948806d95a gptfdisk-1.0.0.tar.gz diff --git a/package/gptfdisk/gptfdisk.mk b/package/gptfdisk/gptfdisk.mk new file mode 100644 index 0000000000..274591c7d4 --- /dev/null +++ b/package/gptfdisk/gptfdisk.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# gptfdisk +# +################################################################################ + +GPTFDISK_VERSION = 1.0.0 +GPTFDISK_SITE = http://downloads.sourceforge.net/sourceforge/gptfdisk +GPTFDISK_LICENSE = GPLv2+ +GPTFDISK_LICENSE_FILES = COPYING + +GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_GDISK) += gdisk +GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_SGDISK) += sgdisk +GPTFDISK_TARGETS_$(BR2_PACKAGE_GPTFDISK_CGDISK) += cgdisk + +GPTFDISK_DEPENDENCIES += util-linux +ifeq ($(BR2_PACKAGE_GPTFDISK_SGDISK),y) +GPTFDISK_DEPENDENCIES += popt +endif +ifeq ($(BR2_PACKAGE_GPTFDISK_CGDISK),y) +GPTFDISK_DEPENDENCIES += ncurses +endif + +ifeq ($(BR2_STATIC_LIBS),y) +# gptfdisk dependencies may link against libintl/libiconv, so we need +# to do so as well when linking statically +ifeq ($(BR2_PACKAGE_GETTEXT),y) +GPTFDISK_DEPENDENCIES += gettext +GPTFDISK_LDLIBS += -lintl +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +GPTFDISK_DEPENDENCIES += libiconv +GPTFDISK_LDLIBS += -liconv +endif +endif + +define GPTFDISK_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + LDLIBS='$(GPTFDISK_LDLIBS)' $(GPTFDISK_TARGETS_y) +endef + +define GPTFDISK_INSTALL_TARGET_CMDS + for i in $(GPTFDISK_TARGETS_y); do \ + $(INSTALL) -D -m 0755 $(@D)/$$i $(TARGET_DIR)/usr/sbin/$$i || exit 1; \ + done +endef + +HOST_GPTFDISK_DEPENDENCIES = host-util-linux host-popt + +define HOST_GPTFDISK_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) sgdisk +endef + +define HOST_GPTFDISK_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/sgdisk $(HOST_DIR)/usr/sbin/sgdisk +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/gqview/0001-make.patch b/package/gqview/0001-make.patch new file mode 100644 index 0000000000..0b1626ffc5 --- /dev/null +++ b/package/gqview/0001-make.patch @@ -0,0 +1,11 @@ +--- a/src/Makefile.in 2006-12-02 20:41:25.000000000 -0500 ++++ b/src/Makefile.in 2008-02-13 14:00:25.000000000 -0500 +@@ -200,7 +200,7 @@ SUBDIRS = icons + DIST_SUBDIRS = icons + INCLUDES = -I$(srcdir) -I$(builddir) \ + -I$(top_srcdir) -I$(top_builddir) \ +- -I$(includedir) $(GTK_CFLAGS) ++ $(GTK_CFLAGS) + + module_SLIK = \ + intl.h \ diff --git a/package/gqview/Config.in b/package/gqview/Config.in new file mode 100644 index 0000000000..c1df40cc19 --- /dev/null +++ b/package/gqview/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_GQVIEW + bool "gqview" + depends on BR2_PACKAGE_LIBGTK2 + help + GQview is an image viewer for Unix operating systems + + http://prdownloads.sourceforge.net/gqview diff --git a/package/gqview/gqview.hash b/package/gqview/gqview.hash new file mode 100644 index 0000000000..eb65497131 --- /dev/null +++ b/package/gqview/gqview.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 12fea494e607a69eff31cdca13d306ef1b0b3b7850be0f8b236f267d8f2e9546 gqview-2.1.5.tar.gz diff --git a/package/gqview/gqview.mk b/package/gqview/gqview.mk new file mode 100644 index 0000000000..89620258bd --- /dev/null +++ b/package/gqview/gqview.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# gqview +# +################################################################################ + +GQVIEW_VERSION = 2.1.5 +GQVIEW_SITE = http://prdownloads.sourceforge.net/gqview +GQVIEW_DEPENDENCIES = host-pkgconf libgtk2 +GQVIEW_CONF_ENV = LIBS="-lm" +GQVIEW_LICENSE = GPLv2 +GQVIEW_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/gr-osmosdr/Config.in b/package/gr-osmosdr/Config.in new file mode 100644 index 0000000000..aa6ef0d4c2 --- /dev/null +++ b/package/gr-osmosdr/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_GR_OSMOSDR + bool "gr-osmosdr" + depends on BR2_PACKAGE_GNURADIO + select BR2_PACKAGE_GNURADIO_BLOCKS + help + GNU Radio block for interfacing with various radio hardware + +if BR2_PACKAGE_GR_OSMOSDR + +config BR2_PACKAGE_GR_OSMOSDR_PYTHON + bool "python support" + depends on BR2_PACKAGE_GNURADIO_PYTHON + help + Enable Python support + +config BR2_PACKAGE_GR_OSMOSDR_IQFILE + bool "IQ File Source support" + help + Enable IQ File Source support + +config BR2_PACKAGE_GR_OSMOSDR_RTLSDR + bool "Osmocom RTLSDR support" + select BR2_PACKAGE_LIBRTLSDR + help + Enable Osmocom RTLSDR support + +config BR2_PACKAGE_GR_OSMOSDR_RTLSDR_TCP + bool "RTLSDR TCP Client support" + help + Enable RTLSDR TCP client support + +config BR2_PACKAGE_GR_OSMOSDR_RFSPACE + bool "RFSPACE Receivers support" + help + Enable RFSPACE Receivers support + +endif diff --git a/package/gr-osmosdr/gr-osmosdr.hash b/package/gr-osmosdr/gr-osmosdr.hash new file mode 100644 index 0000000000..ce6e84a279 --- /dev/null +++ b/package/gr-osmosdr/gr-osmosdr.hash @@ -0,0 +1,2 @@ +# Locally calculated: +sha256 d40462dddc0ebd769b2df3c6ad6fe82c9e9a4a73f7b3c5ce53efbce724906290 gr-osmosdr-a45968f3381f33b86ca344bb76bd62c131d98d93.tar.gz diff --git a/package/gr-osmosdr/gr-osmosdr.mk b/package/gr-osmosdr/gr-osmosdr.mk new file mode 100644 index 0000000000..6a0cc267cf --- /dev/null +++ b/package/gr-osmosdr/gr-osmosdr.mk @@ -0,0 +1,55 @@ +################################################################################ +# +# gr-osmosdr +# +################################################################################ + +GR_OSMOSDR_VERSION = a45968f3381f33b86ca344bb76bd62c131d98d93 +GR_OSMOSDR_SITE = $(call github,osmocom,gr-osmosdr,$(GR_OSMOSDR_VERSION)) +GR_OSMOSDR_LICENSE = GPLv3+ +GR_OSMOSDR_LICENSE_FILES = COPYING + +# gr-osmosdr prevents doing an in-source-tree build +GR_OSMOSDR_SUPPORTS_IN_SOURCE_BUILD = NO + +GR_OSMOSDR_DEPENDENCIES = gnuradio + +GR_OSMOSDR_CONF_OPTS = -DENABLE_DEFAULT=OFF + +# For third-party blocks, the gr-osmosdr libraries are mandatory at +# compile time. +GR_OSMOSDR_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_GR_OSMOSDR_PYTHON),y) +GR_OSMOSDR_CONF_OPTS += -DENABLE_PYTHON=ON +GR_OSMOSDR_DEPENDENCIES += python +else +GR_OSMOSDR_CONF_OPTS += -DENABLE_PYTHON=OFF +endif + +ifeq ($(BR2_PACKAGE_GR_OSMOSDR_IQFILE),y) +GR_OSMOSDR_CONF_OPTS += -DENABLE_FILE=ON +else +GR_OSMOSDR_CONF_OPTS += -DENABLE_FILE=OFF +endif + +ifeq ($(BR2_PACKAGE_GR_OSMOSDR_RTLSDR),y) +GR_OSMOSDR_CONF_OPTS += -DENABLE_RTL=ON +GR_OSMOSDR_DEPENDENCIES += librtlsdr +else +GR_OSMOSDR_CONF_OPTS += -DENABLE_RTL=OFF +endif + +ifeq ($(BR2_PACKAGE_GR_OSMOSDR_RTLSDR_TCP),y) +GR_OSMOSDR_CONF_OPTS += -DENABLE_RTL_TCP=ON +else +GR_OSMOSDR_CONF_OPTS += -DENABLE_RTL_TCP=OFF +endif + +ifeq ($(BR2_PACKAGE_GR_OSMOSDR_RFSPACE),y) +GR_OSMOSDR_CONF_OPTS += -DENABLE_RFSPACE=ON +else +GR_OSMOSDR_CONF_OPTS += -DENABLE_RFSPACE=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/granite/Config.in b/package/granite/Config.in new file mode 100644 index 0000000000..fef5e27add --- /dev/null +++ b/package/granite/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_GRANITE + bool "granite" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on BR2_PACKAGE_LIBGTK3 + select BR2_PACKAGE_LIBGEE + select BR2_PACKAGE_LIBGLIB2 + help + An extension to GTK+ that provides several useful widgets and + classes to ease application development. + + https://launchpad.net/granite + +comment "granite needs libgtk3 and a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_PACKAGE_LIBGTK3 || !BR2_USE_WCHAR \ + || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/granite/granite.hash b/package/granite/granite.hash new file mode 100644 index 0000000000..5ce95e6278 --- /dev/null +++ b/package/granite/granite.hash @@ -0,0 +1,4 @@ +# From https://launchpad.net/granite/0.3/0.3.1/+download/granite-0.3.1.tar.xz/+md5 +md5 4297d4fcec8cfe2e08b460a45c779bbe granite-0.3.1.tar.xz +# Calculated based on the hash above +sha256 8ec1d61f9aba75f1b3a745e721288b0dfb34cb11d1307be80cef7b0571c2dec6 granite-0.3.1.tar.xz diff --git a/package/granite/granite.mk b/package/granite/granite.mk new file mode 100644 index 0000000000..dd5a09e5ff --- /dev/null +++ b/package/granite/granite.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# granite +# +################################################################################ + +GRANITE_VERSION_MAJOR = 0.3 +GRANITE_VERSION = $(GRANITE_VERSION_MAJOR).1 +GRANITE_SITE = https://launchpad.net/granite/$(GRANITE_VERSION_MAJOR)/$(GRANITE_VERSION)/+download +GRANITE_SOURCE = granite-$(GRANITE_VERSION).tar.xz +GRANITE_DEPENDENCIES = host-pkgconf host-vala libgee libglib2 libgtk3 +GRANITE_INSTALL_STAGING = YES +GRANITE_LICENSE = LGPLv3+ +GRANITE_LICENSE_FILES = COPYING + +$(eval $(cmake-package)) diff --git a/package/grantlee/Config.in b/package/grantlee/Config.in new file mode 100644 index 0000000000..7895c7ed80 --- /dev/null +++ b/package/grantlee/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_GRANTLEE + bool "grantlee" + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # Qt Script + depends on (BR2_PACKAGE_QT_ARCH_SUPPORTS_SCRIPT && BR2_PACKAGE_QT) || \ + (BR2_PACKAGE_QT5_JSCORE_AVAILABLE && BR2_PACKAGE_QT5) + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module + # https://sourceware.org/bugzilla/show_bug.cgi?id=20173 + depends on !BR2_microblaze && !BR2_nios2 + select BR2_PACKAGE_QT_STL if BR2_PACKAGE_QT + select BR2_PACKAGE_QT_SCRIPT if BR2_PACKAGE_QT + select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_QT + select BR2_PACKAGE_QT5SCRIPT if BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT5BASE_GUI if BR2_PACKAGE_QT5 + help + Qt implementation of the Django template framework + + http://www.grantlee.org + +comment "grantlee needs a toolchain with NPTL not affected by Binutils bug 19405" + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on !BR2_microblaze && !BR2_nios2 + depends on (BR2_PACKAGE_QT_ARCH_SUPPORTS_SCRIPT && BR2_PACKAGE_QT) || \ + (BR2_PACKAGE_QT5_JSCORE_AVAILABLE && BR2_PACKAGE_QT5) || \ + BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 diff --git a/package/grantlee/grantlee.hash b/package/grantlee/grantlee.hash new file mode 100644 index 0000000000..7f02bb3274 --- /dev/null +++ b/package/grantlee/grantlee.hash @@ -0,0 +1,3 @@ +# Locally calculated after checking pgp signature +sha256 191809bf4c9b7ef877af0fd29345061c2372edfb4506aa7d5df5c71a570fa0ac grantlee-0.5.1.tar.gz +sha256 eaf22ba92e53b8eb5dd8bca045fe81b734d3445445ed9e0c1af2a0a7c375b161 grantlee-5.0.0.tar.gz diff --git a/package/grantlee/grantlee.mk b/package/grantlee/grantlee.mk new file mode 100644 index 0000000000..a300106361 --- /dev/null +++ b/package/grantlee/grantlee.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# grantlee +# +################################################################################ +# qt4 support dropped after 0.5.1, so we use the older version for qt4 +ifeq ($(BR2_PACKAGE_QT),y) +GRANTLEE_VERSION = 0.5.1 +else ifeq ($(BR2_PACKAGE_QT5),y) +GRANTLEE_VERSION = 5.0.0 +endif +GRANTLEE_SITE = http://downloads.grantlee.org +GRANTLEE_INSTALL_STAGING = YES +GRANTLEE_LICENSE = LGPLv2.1+ +GRANTLEE_LICENSE_FILES = COPYING.LIB + +ifeq ($(BR2_PACKAGE_QT),y) +GRANTLEE_DEPENDENCIES = qt +else ifeq ($(BR2_PACKAGE_QT5),y) +GRANTLEE_DEPENDENCIES += qt5base qt5script +endif + +$(eval $(cmake-package)) diff --git a/package/graphite2/0001-disable-double-promotion.patch b/package/graphite2/0001-disable-double-promotion.patch new file mode 100644 index 0000000000..3bda3d7c63 --- /dev/null +++ b/package/graphite2/0001-disable-double-promotion.patch @@ -0,0 +1,21 @@ +Don't use -Wdouble-promotion gcc option + +The warning flag isn't recognized for older GCC versions (blackfin), +so just disable it. + +Signed-off-by: Gustavo Zacarias +[Gustavo: update for 1.3.5] + +diff -Nura graphite2-1.3.5.orig/src/CMakeLists.txt graphite2-1.3.5/src/CMakeLists.txt +--- graphite2-1.3.5.orig/src/CMakeLists.txt 2016-02-15 11:46:45.941906112 -0300 ++++ graphite2-1.3.5/src/CMakeLists.txt 2016-02-15 11:46:54.237194222 -0300 +@@ -111,9 +111,6 @@ + COMPILE_FLAGS "-Wall -Wextra -Wno-unknown-pragmas -Wendif-labels -Wshadow -Wctor-dtor-privacy -Wnon-virtual-dtor -fno-rtti -fno-exceptions -fvisibility=hidden -fvisibility-inlines-hidden -fno-stack-protector" + LINK_FLAGS "-nodefaultlibs ${GRAPHITE_LINK_FLAGS}" + LINKER_LANGUAGE C) +- if (CMAKE_COMPILER_IS_GNUCXX) +- add_definitions(-Wdouble-promotion) +- endif (CMAKE_COMPILER_IS_GNUCXX) + message(STATUS "Compiler ID is: ${CMAKE_CXX_COMPILER_ID}") + if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") + add_definitions(-Wimplicit-fallthrough) diff --git a/package/graphite2/Config.in b/package/graphite2/Config.in new file mode 100644 index 0000000000..5499e17e27 --- /dev/null +++ b/package/graphite2/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_GRAPHITE2 + bool "graphite2" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + help + Graphite is a project within SIL's scripts and software dev + groups to provide cross-platform rendering for complex + writing systems. + + http://graphite.sil.org/ + +comment "graphite2 needs a toolchain w/ C++, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS diff --git a/package/graphite2/graphite2.hash b/package/graphite2/graphite2.hash new file mode 100644 index 0000000000..d22b67c8a5 --- /dev/null +++ b/package/graphite2/graphite2.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/silgraphite/files/graphite2 +md5 236d2cb1f831fe33083112afbb555f0e graphite2-1.3.8.tgz +sha1 0c802628dacf3bfa2c1654d7d72b76e20e1adc97 graphite2-1.3.8.tgz diff --git a/package/graphite2/graphite2.mk b/package/graphite2/graphite2.mk new file mode 100644 index 0000000000..d066a1c69a --- /dev/null +++ b/package/graphite2/graphite2.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# graphite2 +# +################################################################################ + +GRAPHITE2_VERSION = 1.3.8 +GRAPHITE2_SOURCE = graphite2-$(GRAPHITE2_VERSION).tgz +GRAPHITE2_SITE = http://downloads.sourceforge.net/project/silgraphite/graphite2 +GRAPHITE2_INSTALL_STAGING = YES +GRAPHITE2_LICENSE = LGPLv2.1+ +GRAPHITE2_LICENSE_FILES = LICENSE + +# Avoid building docs and tests to save time +define GRAPHITE2_DISABLE_TESTS_DOC + $(SED) '/^add_subdirectory(doc)/d' \ + -e '/^add_subdirectory(tests)/d' \ + -e '/add_subdirectory(gr2fonttest)/d' \ + $(@D)/CMakeLists.txt +endef +GRAPHITE2_POST_PATCH_HOOKS += GRAPHITE2_DISABLE_TESTS_DOC + +$(eval $(cmake-package)) diff --git a/package/grep/Config.in b/package/grep/Config.in new file mode 100644 index 0000000000..2cd3406165 --- /dev/null +++ b/package/grep/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_GREP + bool "grep" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + The GNU regular expression matcher. + + http://www.gnu.org/software/grep/grep.html + +comment "grep needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/grep/grep.hash b/package/grep/grep.hash new file mode 100644 index 0000000000..409940aa25 --- /dev/null +++ b/package/grep/grep.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking signature +sha256 e21e83bac50450e0d0d61a42c154ee0dceaacdbf4f604ef6e79071cb8e596830 grep-2.25.tar.xz diff --git a/package/grep/grep.mk b/package/grep/grep.mk new file mode 100644 index 0000000000..f87e838299 --- /dev/null +++ b/package/grep/grep.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# grep +# +################################################################################ + +GREP_VERSION = 2.25 +GREP_SITE = $(BR2_GNU_MIRROR)/grep +GREP_SOURCE = grep-$(GREP_VERSION).tar.xz +GREP_LICENSE = GPLv3+ +GREP_LICENSE_FILES = COPYING +GREP_CONF_OPTS = --disable-perl-regexp \ + $(if $(BR2_TOOLCHAIN_USES_MUSL),--with-included-regex) +GREP_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +# link with iconv if enabled +ifeq ($(BR2_PACKAGE_LIBICONV),y) +GREP_CONF_ENV += LIBS=-liconv +GREP_DEPENDENCIES += libiconv +endif + +# link with pcre if enabled +ifeq ($(BR2_PACKAGE_PCRE),y) +GREP_CONF_OPTS += --enable-perl-regexp +GREP_DEPENDENCIES += pcre +endif + +# Full grep preferred over busybox grep +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +GREP_DEPENDENCIES += busybox +endif + +$(eval $(autotools-package)) diff --git a/package/gsl/Config.in b/package/gsl/Config.in new file mode 100644 index 0000000000..5b82ac2a0b --- /dev/null +++ b/package/gsl/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_GSL + bool "gsl" + help + The GNU Scientific Library (GSL) is a numerical library for + C and C++ programmers. The library provides a wide range of + mathematical routines such as random number generators, + special functions and least-squares fitting. There are over + 1000 functions in total with an extensive test suite. + + http://www.gnu.org/software/gsl diff --git a/package/gsl/gsl.hash b/package/gsl/gsl.hash new file mode 100644 index 0000000000..bc33e4e2d1 --- /dev/null +++ b/package/gsl/gsl.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 73bc2f51b90d2a780e6d266d43e487b3dbd78945dd0b04b14ca5980fe28d2f53 gsl-1.16.tar.gz diff --git a/package/gsl/gsl.mk b/package/gsl/gsl.mk new file mode 100644 index 0000000000..0ad5377ece --- /dev/null +++ b/package/gsl/gsl.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# gsl +# +################################################################################ + +GSL_VERSION = 1.16 +GSL_SITE = $(BR2_GNU_MIRROR)/gsl +GSL_INSTALL_STAGING = YES +GSL_LICENSE = GPLv3 +GSL_LICENSE_FILES = COPYING +GSL_CONFIG_SCRIPTS = gsl-config + +# uClibc pretends to have fenv support as it installs , but in +# practice, it only implements it for i386. Problem reported upstream +# at: http://lists.busybox.net/pipermail/uclibc/2012-October/047067.html. +# So we tell gsl that fenv related functions are not available in this +# case. +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +ifneq ($(BR2_i386),y) +GSL_CONF_ENV = \ + ac_cv_have_decl_feenableexcept=no \ + ac_cv_have_decl_fesettrapenable=no +endif +endif + +$(eval $(autotools-package)) diff --git a/package/gssdp/Config.in b/package/gssdp/Config.in new file mode 100644 index 0000000000..83149718da --- /dev/null +++ b/package/gssdp/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_GSSDP + bool "gssdp" + depends on BR2_USE_WCHAR # glib2, libsoup + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2, libsoup + depends on BR2_USE_MMU # glib2, libsoup + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBSOUP + help + GSSDP implements resource discovery and announcement over SSDP. + + http://www.gupnp.org + +comment "gssdp needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gssdp/gssdp.hash b/package/gssdp/gssdp.hash new file mode 100644 index 0000000000..fe7d9815d3 --- /dev/null +++ b/package/gssdp/gssdp.hash @@ -0,0 +1,2 @@ +# Hash from: http://ftp.gnome.org/pub/gnome/sources/gssdp/0.14/gssdp-0.14.14.sha256sum: +sha256 685718755b5b8d24aaeadda44047e515443784712891fc53879ab9a4865b48d6 gssdp-0.14.14.tar.xz diff --git a/package/gssdp/gssdp.mk b/package/gssdp/gssdp.mk new file mode 100644 index 0000000000..6ba125253b --- /dev/null +++ b/package/gssdp/gssdp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# gssdp +# +################################################################################ + +GSSDP_VERSION_MAJOR = 0.14 +GSSDP_VERSION = $(GSSDP_VERSION_MAJOR).14 +GSSDP_SOURCE = gssdp-$(GSSDP_VERSION).tar.xz +GSSDP_SITE = http://ftp.gnome.org/pub/gnome/sources/gssdp/$(GSSDP_VERSION_MAJOR) +GSSDP_LICENSE = LGPLv2+ +GSSDP_LICENSE_FILES = COPYING +GSSDP_INSTALL_STAGING = YES +GSSDP_DEPENDENCIES = host-pkgconf libglib2 libsoup + +$(eval $(autotools-package)) diff --git a/package/gstreamer/Config.in b/package/gstreamer/Config.in new file mode 100644 index 0000000000..c6292f4a7e --- /dev/null +++ b/package/gstreamer/Config.in @@ -0,0 +1,14 @@ +# Gstreamer 0.10.x & Plugins +source "package/gstreamer/gstreamer/Config.in" + +if BR2_PACKAGE_GSTREAMER +source "package/gstreamer/gst-plugins-base/Config.in" +source "package/gstreamer/gst-plugins-good/Config.in" +source "package/gstreamer/gst-plugins-bad/Config.in" +source "package/gstreamer/gst-plugins-ugly/Config.in" +source "package/gstreamer/gst-ffmpeg/Config.in" +source "package/gstreamer/gst-dsp/Config.in" +source "package/gstreamer/gst-fsl-plugins/Config.in" +source "package/gstreamer/gst-omapfb/Config.in" +source "package/gstreamer/gst-plugin-x170/Config.in" +endif diff --git a/package/gstreamer/gst-dsp/Config.in b/package/gstreamer/gst-dsp/Config.in new file mode 100644 index 0000000000..102cf69b45 --- /dev/null +++ b/package/gstreamer/gst-dsp/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_GST_DSP + bool "gst-dsp" + depends on BR2_cortex_a8 + select BR2_PACKAGE_TIDSP_BINARIES + help + GStreamer plug-in to access TI OMAP3 DSP algorithms. + + http://code.google.com/p/gst-dsp/ diff --git a/package/gstreamer/gst-dsp/gst-dsp.hash b/package/gstreamer/gst-dsp/gst-dsp.hash new file mode 100644 index 0000000000..3bccfc1c3a --- /dev/null +++ b/package/gstreamer/gst-dsp/gst-dsp.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 45437a038979916de74e78a2cc7a0b01ba3982d0848e1e483a054c9cf0ce5883 gst-dsp-v0.10.2.tar.gz diff --git a/package/gstreamer/gst-dsp/gst-dsp.mk b/package/gstreamer/gst-dsp/gst-dsp.mk new file mode 100644 index 0000000000..dedffb9822 --- /dev/null +++ b/package/gstreamer/gst-dsp/gst-dsp.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# gst-dsp +# +################################################################################ + +GST_DSP_VERSION = v0.10.2 +GST_DSP_SITE = $(call github,felipec,gst-dsp,$(GST_DSP_VERSION)) + +define GST_DSP_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e +endef + +define GST_DSP_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e DESTDIR=$(TARGET_DIR) install +endef + +GST_DSP_DEPENDENCIES = gstreamer tidsp-binaries host-pkgconf + +$(eval $(generic-package)) diff --git a/package/gstreamer/gst-ffmpeg/0001-gcc47.patch b/package/gstreamer/gst-ffmpeg/0001-gcc47.patch new file mode 100644 index 0000000000..16744abae3 --- /dev/null +++ b/package/gstreamer/gst-ffmpeg/0001-gcc47.patch @@ -0,0 +1,65 @@ +gst-ffmpeg libav: Fixes compiling gst-ffmpeg with gcc-4.7 + +Fetch from: http://www.slackware.com/~alien/slackbuilds/gst-plugins-ffmpeg/build/gst-ffmpeg-0.10.13_gcc47.patch + +Signed-off-by: Bernd Kuhls +--- +Submitted By: Andrew Benton +Date: 2012-06-15 +Initial Package Version: 0.10.13 +Upstream Status: From upstream +Origin: +http://git.videolan.org/?p=ffmpeg.git;a=patch;h=5f654897e325349dacf2546674e0510bb72ecb50 + +Description: Fixes compiling gst-ffmpeg with gcc-4.7 + +libavcodec/x86/h264_qpel_mmx.c: Assembler messages: +libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp' +libavcodec/x86/h264_qpel_mmx.c:1294: Error: operand type mismatch for `cmp' +libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp' +libavcodec/x86/h264_qpel_mmx.c:1298: Error: operand type mismatch for `cmp' +libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp' +libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp' +libavcodec/x86/h264_qpel_mmx.c:964: Error: operand type mismatch for `cmp' +make[5]: *** [libavcodec/x86/dsputil_mmx.o] Error 1 + +Index: gst-ffmpeg-0.10.13/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c +=================================================================== +--- gst-ffmpeg-0.10.13.orig/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c 2012-03-30 11:39:41.324522051 -0700 ++++ gst-ffmpeg-0.10.13/gst-libs/ext/libav/libavcodec/x86/h264_qpel_mmx.c 2012-03-30 11:54:08.152564075 -0700 +@@ -398,7 +398,7 @@ + "2: \n\t"\ + \ + : "+a"(src), "+c"(dst)\ +- : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\ ++ : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\ + : "memory"\ + );\ + src += 4-(h+5)*srcStride;\ +@@ -446,7 +446,7 @@ + QPEL_H264HV(%%mm3, %%mm4, %%mm5, %%mm0, %%mm1, %%mm2, 15*48)\ + "2: \n\t"\ + : "+a"(src)\ +- : "c"(tmp), "S"((x86_reg)srcStride), "g"(size)\ ++ : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size)\ + : "memory"\ + );\ + tmp += 4;\ +@@ -823,7 +823,7 @@ + "2: \n\t"\ + \ + : "+a"(src), "+c"(dst)\ +- : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "g"(h)\ ++ : "S"((x86_reg)srcStride), "D"((x86_reg)dstStride), "rm"(h)\ + : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", \ + "%xmm4", "%xmm5", "%xmm6", "%xmm7",)\ + "memory"\ +@@ -878,7 +878,7 @@ + QPEL_H264HV_XMM(%%xmm3, %%xmm4, %%xmm5, %%xmm0, %%xmm1, %%xmm2, 15*48) + "2: \n\t" + : "+a"(src) +- : "c"(tmp), "S"((x86_reg)srcStride), "g"(size) ++ : "c"(tmp), "S"((x86_reg)srcStride), "rm"(size) + : XMM_CLOBBERS("%xmm0", "%xmm1", "%xmm2", "%xmm3", + "%xmm4", "%xmm5", "%xmm6", "%xmm7",) + "memory" diff --git a/package/gstreamer/gst-ffmpeg/0002-arm-avoid-using-the-movw-instruction.patch b/package/gstreamer/gst-ffmpeg/0002-arm-avoid-using-the-movw-instruction.patch new file mode 100644 index 0000000000..288dc3d6e8 --- /dev/null +++ b/package/gstreamer/gst-ffmpeg/0002-arm-avoid-using-the-movw-instruction.patch @@ -0,0 +1,41 @@ +Date: Mon, 1 Aug 2011 20:21:04 +0300 +Subject: [libavcodec] arm: Avoid using the movw instruction needlessly +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf8 +Content-Transfer-Encoding: 8bit + +This fixes building for ARM11 without Thumb2. + +Signed-off-by: Martin Storsjö + +[Arnout: backported to gst-ffmpeg, from ffmpeg 9a83adaf3] +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + gst-libs/ext/libav/libavcodec/arm/ac3dsp_armv6.S | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gst-libs/ext/libav/libavcodec/arm/ac3dsp_armv6.S b/gst-libs/ext/libav/libavcodec/arm/ac3dsp_armv6.S +index d3058ff..b6aee86 100644 +--- a/gst-libs/ext/libav/libavcodec/arm/ac3dsp_armv6.S ++++ b/gst-libs/ext/libav/libavcodec/arm/ac3dsp_armv6.S +@@ -37,7 +37,7 @@ function ff_ac3_bit_alloc_calc_bap_armv6, export=1 + ldrb r10, [r4], #1 + 1: + ldrsh r9, [r0], #2 @ mask[band] +- movw r8, #0x1fe0 ++ mov r8, #0xff0 + sub r9, r9, r12 @ - snr_offset + mov r11, r10 + ldrb r10, [r4], #1 @ band_start_tab[band++] +@@ -44,7 +44,7 @@ function ff_ac3_bit_alloc_calc_bap_armv6, export=1 + subs r9, r9, r5 @ - floor + movlt r9, #0 + cmp r10, r3 @ - end +- and r9, r9, r8 @ & 0x1fe0 ++ and r9, r9, r8, lsl #1 @ & 0x1fe0 + subgt r8, r3, r11 + suble r8, r10, r11 + add r9, r9, r5 @ + floor => m +-- +1.7.10.4 + diff --git a/package/gstreamer/gst-ffmpeg/Config.in b/package/gstreamer/gst-ffmpeg/Config.in new file mode 100644 index 0000000000..f3d4b3e568 --- /dev/null +++ b/package/gstreamer/gst-ffmpeg/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_GST_FFMPEG + bool "gst-ffmpeg" + # Unsupported for MIPS R6. It bundles a version of libav which + # doesn't have support for MIPS R6. + depends on !BR2_mips_32r6 && !BR2_mips_64r6 + # triggers https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65151 on sh + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 || !BR2_sh + select BR2_PACKAGE_GST_PLUGINS_BASE + help + GStreamer plugin containing one plugin with a set of elements using + the Libav library. It contains most popular decoders as well as + colorspace conversion elements. + + This package is configured to use an internal copy of the Libav + library. + + http://gstreamer.freedesktop.org/modules/gst-ffmpeg.html + +if BR2_PACKAGE_GST_FFMPEG + +config BR2_PACKAGE_GST_FFMPEG_GPL + bool "Enable GPL code" + help + Allow use of GPL code. The resulting libs and binaries will + be under GPL. + +endif + +comment "gst-ffmpeg needs a toolchain w/ gcc >= 5" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5 && BR2_sh diff --git a/package/gstreamer/gst-ffmpeg/gst-ffmpeg.hash b/package/gstreamer/gst-ffmpeg/gst-ffmpeg.hash new file mode 100644 index 0000000000..5f7f35d9a4 --- /dev/null +++ b/package/gstreamer/gst-ffmpeg/gst-ffmpeg.hash @@ -0,0 +1,2 @@ +# From http://gstreamer.freedesktop.org/src/gst-ffmpeg/gst-ffmpeg-0.10.13.tar.bz2.md5 +md5 7f5beacaf1312db2db30a026b36888c4 gst-ffmpeg-0.10.13.tar.bz2 diff --git a/package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk b/package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk new file mode 100644 index 0000000000..b1d8f8bd85 --- /dev/null +++ b/package/gstreamer/gst-ffmpeg/gst-ffmpeg.mk @@ -0,0 +1,89 @@ +################################################################################ +# +# gst-ffmpeg +# +################################################################################ + +GST_FFMPEG_VERSION = 0.10.13 +GST_FFMPEG_SOURCE = gst-ffmpeg-$(GST_FFMPEG_VERSION).tar.bz2 +GST_FFMPEG_SITE = http://gstreamer.freedesktop.org/src/gst-ffmpeg +GST_FFMPEG_INSTALL_STAGING = YES +GST_FFMPEG_DEPENDENCIES = host-pkgconf gstreamer gst-plugins-base + +ifeq ($(BR2_PACKAGE_GST_FFMPEG_GPL),y) +GST_FFMPEG_CONF_OPTS += --disable-lgpl +GST_FFMPEG_LICENSE = GPLv2+ (gst-ffmpeg), GPLv2+/GPLv3+ (libav) +GST_FFMPEG_LICENSE_FILES = COPYING gst-libs/ext/libav/COPYING.GPLv2 gst-libs/ext/libav/COPYING.GPLv3 +else +GST_FFMPEG_CONF_OPTS += --enable-lgpl +GST_FFMPEG_LICENSE = LGPLv2+ (gst-ffmpeg), LGPLv2.1+/LGPLv3+ (libav) +GST_FFMPEG_LICENSE_FILES = COPYING.LIB gst-libs/ext/libav/COPYING.LGPLv2.1 gst-libs/ext/libav/COPYING.LGPLv3 +endif + +GST_FFMPEG_CONF_EXTRA_OPTS = \ + --cross-prefix=$(TARGET_CROSS) \ + --target-os=linux \ + --pkg-config='$(PKG_CONFIG_HOST_BINARY)' + +ifeq ($(BR2_PACKAGE_ZLIB),y) +GST_FFMPEG_CONF_EXTRA_OPTS += --enable-zlib +GST_FFMPEG_DEPENDENCIES += zlib +else +GST_FFMPEG_CONF_EXTRA_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +GST_FFMPEG_CONF_EXTRA_OPTS += --enable-bzlib +GST_FFMPEG_DEPENDENCIES += bzip2 +else +GST_FFMPEG_CONF_EXTRA_OPTS += --disable-bzlib +endif + +ifeq ($(BR2_X86_CPU_HAS_MMX),y) +GST_FFMPEG_CONF_EXTRA_OPTS += --enable-yasm +GST_FFMPEG_DEPENDENCIES += host-yasm +else +GST_FFMPEG_CONF_EXTRA_OPTS += --disable-yasm +GST_FFMPEG_CONF_EXTRA_OPTS += --disable-mmx +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE),y) +GST_FFMPEG_CONF_EXTRA_OPTS += --enable-sse +else +GST_FFMPEG_CONF_EXTRA_OPTS += --disable-sse +endif + +ifeq ($(BR2_X86_CPU_HAS_SSSE3),y) +GST_FFMPEG_CONF_EXTRA_OPTS += --enable-ssse3 +else +GST_FFMPEG_CONF_EXTRA_OPTS += --disable-ssse3 +endif + +# Explicitly disable everything that doesn't match for ARM +# FFMPEG "autodetects" by compiling an extended instruction via AS +# This works on compilers that aren't built for generic by default +ifeq ($(BR2_ARM_CPU_ARMV4),y) +GST_FFMPEG_CONF_EXTRA_OPTS += --disable-armv5te +endif +ifeq ($(BR2_ARM_CPU_ARMV6)$(BR2_ARM_CPU_ARMV7A),y) +GST_FFMPEG_CONF_EXTRA_OPTS += --enable-armv6 +else +GST_FFMPEG_CONF_EXTRA_OPTS += --disable-armv6 --disable-armv6t2 +endif +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +GST_FFMPEG_CONF_EXTRA_OPTS += --enable-neon +endif + +ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y) +GST_FFMPEG_CONF_EXTRA_OPTS += --enable-altivec +else +GST_FFMPEG_CONF_EXTRA_OPTS += --disable-altivec +endif + +ifeq ($(BR2_STATIC_LIBS),) +GST_FFMPEG_CONF_EXTRA_OPTS += --enable-pic +endif + +GST_FFMPEG_CONF_OPTS += --with-ffmpeg-extra-configure="$(GST_FFMPEG_CONF_EXTRA_OPTS)" + +$(eval $(autotools-package)) diff --git a/package/gstreamer/gst-fsl-plugins/0001-gplay-add-missing-include.patch b/package/gstreamer/gst-fsl-plugins/0001-gplay-add-missing-include.patch new file mode 100644 index 0000000000..19753bc787 --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/0001-gplay-add-missing-include.patch @@ -0,0 +1,23 @@ +From ed649ccb8ddc724546172d329fca39b23c49b804 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Mon, 17 Dec 2012 17:58:28 +0100 +Subject: [PATCH] gplay: add missing include + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + tools/gplay/gst_snapshot.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/gplay/gst_snapshot.c b/tools/gplay/gst_snapshot.c +index 40dbb6f..596f399 100755 +--- a/tools/gplay/gst_snapshot.c ++++ b/tools/gplay/gst_snapshot.c +@@ -22,6 +22,7 @@ + + #include + #include ++#include + #include "gst_snapshot.h" + + static void +-- diff --git a/package/gstreamer/gst-fsl-plugins/0002-Fix-bashism-in-configure-script.patch b/package/gstreamer/gst-fsl-plugins/0002-Fix-bashism-in-configure-script.patch new file mode 100644 index 0000000000..471c48364d --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/0002-Fix-bashism-in-configure-script.patch @@ -0,0 +1,48 @@ +From 83b4f84b1c490b9bb816e1ecbc743d80d48cc06d Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Tue, 18 Dec 2012 12:05:22 +0100 +Subject: [PATCH] Fix bashism in configure script. + +The configure script uses +=, which is not POSIX. Debians that +have the default dash as /bin/sh define a variable ending with ++ instead of appending to it. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + configure.ac | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5968eb6..1a31a06 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -152,7 +152,7 @@ AC_SUBST(GST_PLUGINS_BASE_LIBS) + AC_CHECK_HEADERS([vpu_lib.h], [HAVE_VPU_LIB=yes], [HAVE_VPU_LIB=no]) + if test "x$HAVE_VPU_LIB" = "xyes"; then + VPU_LIBS=`$PKG_CONFIG --libs libfslvpuwrap 2>/dev/null` +- VPU_LIBS+=" -lvpu" ++ VPU_LIBS="$VPU_LIBS -lvpu" + fi + AC_SUBST(VPU_LIBS) + +@@ -176,14 +176,14 @@ AC_SUBST(RT_CFLAGS) + AC_SUBST(RT_LIBS) + + FSL_MM_CORE_CFLAGS=`$PKG_CONFIG --cflags libfslaudiocodec 2>/dev/null` +-FSL_MM_CORE_CFLAGS+=`$PKG_CONFIG --cflags libfslvideocodec 2>/dev/null` +-FSL_MM_CORE_CFLAGS+=`$PKG_CONFIG --cflags libfslparser 2>/dev/null` +-FSL_MM_CORE_CFLAGS+=`$PKG_CONFIG --cflags libfslvpuwrap 2>/dev/null` ++FSL_MM_CORE_CFLAGS="$FSL_MM_CORE_CFLAGS `$PKG_CONFIG --cflags libfslvideocodec 2>/dev/null`" ++FSL_MM_CORE_CFLAGS="$FSL_MM_CORE_CFLAGS `$PKG_CONFIG --cflags libfslparser 2>/dev/null`" ++FSL_MM_CORE_CFLAGS="$FSL_MM_CORE_CFLAGS `$PKG_CONFIG --cflags libfslvpuwrap 2>/dev/null`" + AC_SUBST(FSL_MM_CORE_CFLAGS) + + FSL_MM_CORE_LIBS=`$PKG_CONFIG --libs libfslaudiocodec 2>/dev/null` +-FSL_MM_CORE_LIBS+=`$PKG_CONFIG --libs libfslvideocodec 2>/dev/null` +-FSL_MM_CORE_LIBS+=`$PKG_CONFIG --libs libfslparser 2>/dev/null` ++FSL_MM_CORE_LIBS="$FSL_MM_CORE_LIBS `$PKG_CONFIG --libs libfslvideocodec 2>/dev/null`" ++FSL_MM_CORE_LIBS="$FSL_MM_CORE_LIBS `$PKG_CONFIG --libs libfslparser 2>/dev/null`" + AC_SUBST(FSL_MM_CORE_LIBS) + + EXTRAPLATFORMCFLAGS="-DARM -D_GNUC_" +-- diff --git a/package/gstreamer/gst-fsl-plugins/0003-Use-proper-objdump.patch b/package/gstreamer/gst-fsl-plugins/0003-Use-proper-objdump.patch new file mode 100644 index 0000000000..b7b8c9f740 --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/0003-Use-proper-objdump.patch @@ -0,0 +1,36 @@ +From c58b658a93b1b6d6e94ba0306d58de845012cef6 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Tue, 18 Dec 2012 12:22:52 +0100 +Subject: [PATCH] Use proper objdump + +If the OBJDUMP environment variable is set, that should be used rather +than the objdump in PATH. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1a31a06..cc7557d 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -17,7 +17,7 @@ AC_DEFUN([FIND_PARSER_SONAME], + AC_MSG_CHECKING([for lib_$1_parser_$2_elinux.3.0.so soname]) + path=`$PKG_CONFIG --variable=libdir libfslparser` + SONAME=$( $CC -print-file-name=$PKG_CONFIG_SYSROOT_DIR$path/lib_$1_parser_$2_elinux.so | \ +- while read output; do objdump -p $output | \ ++ while read output; do $OBJDUMP -p $output | \ + grep "SONAME" | \ + sed -e 's/ \+SONAME \+//'; done 2> /dev/null ) + if [[ -z "$SONAME" ]]; then +@@ -36,7 +36,7 @@ AC_DEFUN([FIND_ACODEC_SONAME], + AC_MSG_CHECKING([for lib_$1_wrap_$2_elinux.so soname]) + path=`$PKG_CONFIG --variable=libdir libfslaudiocodec` + SONAME=$( $CC -print-file-name=$PKG_CONFIG_SYSROOT_DIR$path/wrap/lib_$1_wrap_$2_elinux.so | \ +- while read output; do objdump -p $output | \ ++ while read output; do $OBJDUMP -p $output | \ + grep "SONAME" | \ + sed -e 's/ \+SONAME \+//'; done 2> /dev/null ) + if [[ -z "$SONAME" ]]; then +-- diff --git a/package/gstreamer/gst-fsl-plugins/0004-Fix-libgstfsl-linkage-add-lrt-for-shared-memory-func.patch b/package/gstreamer/gst-fsl-plugins/0004-Fix-libgstfsl-linkage-add-lrt-for-shared-memory-func.patch new file mode 100644 index 0000000000..763703c27c --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/0004-Fix-libgstfsl-linkage-add-lrt-for-shared-memory-func.patch @@ -0,0 +1,46 @@ +From 1ca4251d1284f2cb56e31aaec4d369809e2139c9 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Mon, 24 Feb 2014 16:30:39 +0100 +Subject: [PATCH] Fix libgstfsl linkage (add -lrt for shared memory functions). + +Fixes runtime failure of gst-fsl-plugins, e.g.: +(gst-plugin-scanner:1700): GStreamer-WARNING **: Failed to load + plugin '/usr/lib/gstreamer-0.10/libmfw_vpu.so': + /usr/lib/libgstfsl-0.10.so.0: undefined symbol: shm_open) + +Signed-off-by: Peter Seiderer +--- + configure.ac | 3 +++ + libs/Makefile.am | 2 +- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index a5d1655..7b5a7a6 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -170,6 +170,9 @@ AC_CHECK_LIB(ipu, mxc_ipu_lib_task_init, [IPU_LIBS=-lipu], [echo "No libipu arou + AC_SUBST(IPU_CFLAGS) + AC_SUBST(IPU_LIBS) + ++AC_SEARCH_LIBS([shm_open], [rt], [SHM_LIBS="-lrt"]) ++AC_SUBST(SHM_LIBS) ++ + dnl of the POSIX Real-Time Extensions. + AC_CHECK_LIB(rt, clock_gettime) + AC_SUBST(RT_CFLAGS) +diff --git a/libs/Makefile.am b/libs/Makefile.am +index 2f56bba..5b30657 100755 +--- a/libs/Makefile.am ++++ b/libs/Makefile.am +@@ -42,7 +42,7 @@ libgstfsl_@GST_MAJORMINOR@_la_CFLAGS += -DIPULIB + endif + + libgstfsl_@GST_MAJORMINOR@_la_LDFLAGS = -version-info @GSTMXLIBS_VERSION@ +-libgstfsl_@GST_MAJORMINOR@_la_LIBADD = $(GST_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ -lgstinterfaces-$(GST_MAJORMINOR) $(IPU_LIBS) $(RT_LIBS) ++libgstfsl_@GST_MAJORMINOR@_la_LIBADD = $(GST_BASE_LIBS) -lgstvideo-@GST_MAJORMINOR@ -lgstinterfaces-$(GST_MAJORMINOR) $(IPU_LIBS) $(RT_LIBS) $(SHM_LIBS) + + libgstfsl_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/gst/imx-mm + libgstfsl_@GST_MAJORMINOR@include_HEADERS = \ +-- +1.8.1.4 + diff --git a/package/gstreamer/gst-fsl-plugins/0005-Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch b/package/gstreamer/gst-fsl-plugins/0005-Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch new file mode 100644 index 0000000000..56352753a0 --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/0005-Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch @@ -0,0 +1,69 @@ +From ce90794a3458af0aed43b8570cf44cd87900185d Mon Sep 17 00:00:00 2001 +From: Gary Bisson +Date: Fri, 25 Jul 2014 16:44:53 -0700 +Subject: [PATCH] Remove use of obsolete VIDIOC_DBG_G_CHIP_IDENT + +This ioctl should never be used in application as +stated in videodev2.h header. +Moreover, its use in this plugin was very limited. + +Signed-off-by: Gary Bisson +--- + src/misc/tvsrc/src/mfw_gst_tvsrc.c | 8 -------- + src/misc/v4l_source/src/mfw_gst_v4lsrc.c | 7 ------- + 2 files changed, 15 deletions(-) + +diff --git a/src/misc/tvsrc/src/mfw_gst_tvsrc.c b/src/misc/tvsrc/src/mfw_gst_tvsrc.c +index 67e0cd2..f495b6f 100755 +--- a/src/misc/tvsrc/src/mfw_gst_tvsrc.c ++++ b/src/misc/tvsrc/src/mfw_gst_tvsrc.c +@@ -450,7 +450,6 @@ mfw_gst_tvsrc_capture_setup (MFWGstTVSRC * v4l_src) + struct v4l2_format fmt; + struct v4l2_control ctrl; + struct v4l2_streamparm parm; +- struct v4l2_dbg_chip_ident chip; + gint fd_v4l = 0; + struct v4l2_mxc_offset off; + gint in_width = 0, in_height = 0; +@@ -461,13 +460,6 @@ mfw_gst_tvsrc_capture_setup (MFWGstTVSRC * v4l_src) + return 0; + } + +- if (ioctl (fd_v4l, VIDIOC_DBG_G_CHIP_IDENT, &chip)) { +- g_print ("VIDIOC_DBG_G_CHIP_IDENT failed.\n"); +- } else +- g_print ("sensor chip is %s\n", chip.match.name); +- +- +- + if (ioctl (fd_v4l, VIDIOC_G_STD, &id) < 0) { + g_print ("VIDIOC_G_STD failed\n"); + close (fd_v4l); +diff --git a/src/misc/v4l_source/src/mfw_gst_v4lsrc.c b/src/misc/v4l_source/src/mfw_gst_v4lsrc.c +index 2c2e838..85e7ff0 100755 +--- a/src/misc/v4l_source/src/mfw_gst_v4lsrc.c ++++ b/src/misc/v4l_source/src/mfw_gst_v4lsrc.c +@@ -464,7 +464,6 @@ mfw_gst_v4lsrc_capture_setup (MFWGstV4LSrc * v4l_src) + struct v4l2_format fmt = {0}; + struct v4l2_control ctrl = {0}; + struct v4l2_streamparm parm = {0}; +- struct v4l2_dbg_chip_ident chip = {0}; + struct v4l2_frmsizeenum fszenum = {0}; + gint input; + gint fd_v4l = 0; +@@ -476,12 +475,6 @@ mfw_gst_v4lsrc_capture_setup (MFWGstV4LSrc * v4l_src) + return 0; + } + +- if (ioctl (fd_v4l, VIDIOC_DBG_G_CHIP_IDENT, &chip)) { +- GST_ERROR ("VIDIOC_DBG_G_CHIP_IDENT failed."); +- } else +- GST_INFO ("sensor chip is %s", chip.match.name); +- +- + if (v4l_src->crop_pixel) { + in_width = v4l_src->capture_width - (2 * v4l_src->crop_pixel); + in_height = v4l_src->capture_height - (2 * v4l_src->crop_pixel); +-- +2.0.1 + diff --git a/package/gstreamer/gst-fsl-plugins/Config.in b/package/gstreamer/gst-fsl-plugins/Config.in new file mode 100644 index 0000000000..0407dc5251 --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/Config.in @@ -0,0 +1,104 @@ +comment "gst-fsl-plugins needs an imx-specific Linux kernel to be built" + depends on BR2_arm && !BR2_LINUX_KERNEL + +comment "gst-fsl-plugins needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_GST_FSL_PLUGINS + bool "gst-fsl-plugins" + depends on BR2_LINUX_KERNEL + depends on BR2_arm # Only relevant for i.MX + depends on BR2_TOOLCHAIN_USES_GLIBC # libfslcodec + select BR2_PACKAGE_GST_PLUGINS_BASE + select BR2_PACKAGE_LIBFSLVPUWRAP if BR2_PACKAGE_FREESCALE_IMX_HAS_VPU + select BR2_PACKAGE_IMX_LIB + select BR2_PACKAGE_LIBFSLPARSER + select BR2_PACKAGE_LIBFSLCODEC + select BR2_PACKAGE_FREESCALE_IMX + help + GStreamer plugins for hardware-accelerated audio and video + parsers and codecs on i.MX platforms. It requires a kernel that + includes the i.MX specific headers to be built. + + To use the VPU, its firmware blob must be installed as well. This + can be found in the firmware-imx package in the "Hardware handling" + menu. + + This library is provided by Freescale as-is and doesn't have + an upstream. Pengutronix maintains gst-fsl-plugins at + git://git.pengutronix.de/git/imx/gst-plugins-fsl-vpu.git + but it diverges heavily from Freescale's original implementation. + +if BR2_PACKAGE_GST_FSL_PLUGINS +choice + prompt "i.MX platform" + default BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX25 if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX25_3STACK + default BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX27 if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX27ADS + default BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX37 if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX37_3STACK + default BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX50 if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX50 + default BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX51 if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 + default BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX53 if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53 + default BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX6 if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX233 + bool "imx233" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX25 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX25_3STACK + bool "imx25" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX27 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX27ADS + bool "imx27" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX28 + bool "imx28" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX31 + bool "imx31" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX35 + bool "imx35" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX37 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX37_3STACK + bool "imx37" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX50 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX50 + bool "imx50" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX51 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX51 + bool "imx51" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX53 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX53 + bool "imx53" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX5X + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX5X + bool "imx5X" + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX6 + select BR2_PACKAGE_IMX_LIB_PLATFORM_IMX6Q + bool "imx6" + +endchoice + +config BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM + string + default "MX233" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX233 + default "MX25" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX25 + default "MX27" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX27 + default "MX28" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX28 + default "MX31" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX31 + default "MX35" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX35 + default "MX37" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX37 + default "MX50" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX50 + default "MX51" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX51 + default "MX53" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX53 + default "MX5X" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX5X + default "MX6" if BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM_MX6 +endif diff --git a/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.hash b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.hash new file mode 100644 index 0000000000..f1d639142f --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 568883b2a1d8d32e4004cb3f123790d0b4286c91c1fac38c9dc8e20bd1250764 gst-fsl-plugins-4.0.3.tar.gz diff --git a/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk new file mode 100644 index 0000000000..fa0e093a96 --- /dev/null +++ b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# gst-fsl-plugins +# +################################################################################ + +GST_FSL_PLUGINS_VERSION = 4.0.3 +GST_FSL_PLUGINS_SITE = $(FREESCALE_IMX_SITE) + +# Most is LGPLv2+, but some sources are copied from upstream and are +# LGPLv2.1+, which essentially makes it LGPLv2.1+ +GST_FSL_PLUGINS_LICENSE = LGPLv2+, LGPLv2.1+, PROPRIETARY (asf.h) +GST_FSL_PLUGINS_LICENSE_FILES = COPYING-LGPL-2.1 COPYING-LGPL-2 + +GST_FSL_PLUGINS_INSTALL_STAGING = YES +GST_FSL_PLUGINS_AUTORECONF = YES + +GST_FSL_PLUGINS_DEPENDENCIES += host-pkgconf gstreamer gst-plugins-base \ + imx-lib libfslparser libfslcodec + +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_HAS_VPU),y) +GST_FSL_PLUGINS_DEPENDENCIES += libfslvpuwrap +endif + +GST_FSL_PLUGINS_CONF_ENV = \ + PLATFORM=$(BR2_PACKAGE_GST_FSL_PLUGINS_PLATFORM) \ + CROSS_ROOT="$(STAGING_DIR)" + +# needs access to imx-specific kernel headers +GST_FSL_PLUGINS_DEPENDENCIES += linux +GST_FSL_PLUGINS_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -idirafter $(LINUX_DIR)/include/uapi" + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +GST_FSL_PLUGINS_DEPENDENCIES += xlib_libX11 +GST_FSL_PLUGINS_CONF_OPTS += --enable-x11 +else +GST_FSL_PLUGINS_CONF_OPTS += --disable-x11 +endif + +# Autoreconf requires an m4 directory to exist +define GST_FSL_PLUGINS_PATCH_M4 + mkdir -p $(@D)/m4 +endef + +GST_FSL_PLUGINS_POST_PATCH_HOOKS += GST_FSL_PLUGINS_PATCH_M4 + +$(eval $(autotools-package)) diff --git a/package/gstreamer/gst-omapfb/Config.in b/package/gstreamer/gst-omapfb/Config.in new file mode 100644 index 0000000000..cfe5bba6bc --- /dev/null +++ b/package/gstreamer/gst-omapfb/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_GST_OMAPFB + bool "gst-omapfb" + depends on BR2_cortex_a8 + help + GStreamer plug-in to use OMAP framebuffer. + + http://github.com/felipec/gst-omapfb diff --git a/package/gstreamer/gst-omapfb/gst-omapfb.hash b/package/gstreamer/gst-omapfb/gst-omapfb.hash new file mode 100644 index 0000000000..7d1c722de9 --- /dev/null +++ b/package/gstreamer/gst-omapfb/gst-omapfb.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 56c719584d7a7ede5fc2053e8d1060f623b226a60672de0faba46fad646658a4 gst-omapfb-v1.0.tar.gz diff --git a/package/gstreamer/gst-omapfb/gst-omapfb.mk b/package/gstreamer/gst-omapfb/gst-omapfb.mk new file mode 100644 index 0000000000..c0bf690531 --- /dev/null +++ b/package/gstreamer/gst-omapfb/gst-omapfb.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# gst-omapfb +# +################################################################################ + +GST_OMAPFB_VERSION = v1.0 +GST_OMAPFB_SITE = $(call github,felipec,gst-omapfb,$(GST_OMAPFB_VERSION)) + +define GST_OMAPFB_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e +endef + +define GST_OMAPFB_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) -e DESTDIR=$(TARGET_DIR) install +endef + +GST_OMAPFB_DEPENDENCIES = gstreamer + +$(eval $(generic-package)) diff --git a/package/gstreamer/gst-plugin-x170/0001-correct-CFLAGS.patch b/package/gstreamer/gst-plugin-x170/0001-correct-CFLAGS.patch new file mode 100644 index 0000000000..9c32e46cce --- /dev/null +++ b/package/gstreamer/gst-plugin-x170/0001-correct-CFLAGS.patch @@ -0,0 +1,28 @@ +The configure script is correctly getting the CFLAGS needed to compile a plugin +for gstreamer and storing them in GST_BASE_CFLAGS but the Makefiles are never +making use of those. + +We actually have to use AM_CPPFLAGS as AM_CFLAGS is used everywhere but on the +real compiling rule... + +Signed-off-by: Alexandre Belloni +--- + src/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 8cb51d1..6af5d91 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -5,6 +5,8 @@ + ############################################################################## + plugin_LTLIBRARIES = libgstx170.la + ++AM_CPPFLAGS = @GST_BASE_CFLAGS@ ++ + ############################################################################## + # for the next set of variables, rename the prefix if you renamed the .la, # + # e.g. libgstplugin_la_SOURCES => libmysomething_la_SOURCES # +-- +1.8.1.2 + diff --git a/package/gstreamer/gst-plugin-x170/Config.in b/package/gstreamer/gst-plugin-x170/Config.in new file mode 100644 index 0000000000..09b44be011 --- /dev/null +++ b/package/gstreamer/gst-plugin-x170/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_GST_PLUGIN_X170 + bool "gst-plugin-x170" + depends on BR2_arm926t + # glibc toolchain includes WCHAR and threading for libglib2 + depends on BR2_TOOLCHAIN_USES_GLIBC # on2-8170-libs + depends on BR2_LINUX_KERNEL # on2-8170-libs + select BR2_PACKAGE_ON2_8170_LIBS + help + GStreamer plug-in to use the Hantro X170 video decoder present on + ATMEL AT91SAM9M10 SoC. + + http://www.at91.com/linux4sam/bin/view/Linux4SAM/SAM9M10Gstreamer + +comment "gst-plugin-x170 needs an (e)glibc toolchain and a Linux kernel to be built" + depends on BR2_arm926t + depends on !BR2_LINUX_KERNEL || !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/gstreamer/gst-plugin-x170/gst-plugin-x170.hash b/package/gstreamer/gst-plugin-x170/gst-plugin-x170.hash new file mode 100644 index 0000000000..527c461656 --- /dev/null +++ b/package/gstreamer/gst-plugin-x170/gst-plugin-x170.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 734ded3618246d946b53c2c8c7ab5a0961287485aaef5fb9bf874f93e3caa342 gst-plugin-x170-1.0.tar.gz diff --git a/package/gstreamer/gst-plugin-x170/gst-plugin-x170.mk b/package/gstreamer/gst-plugin-x170/gst-plugin-x170.mk new file mode 100644 index 0000000000..378cd7a817 --- /dev/null +++ b/package/gstreamer/gst-plugin-x170/gst-plugin-x170.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# gst-plugin-x170 +# +################################################################################ + +GST_PLUGIN_X170_VERSION = 1.0 +GST_PLUGIN_X170_SITE = ftp://ftp.linux4sam.org/pub/demo/linux4sam_1.9/codec + +GST_PLUGIN_X170_LICENSE = BSD-1c +#A license file is included but it is just a placeholder + +# There is no generated configure script in the tarball. +GST_PLUGIN_X170_AUTORECONF = YES +GST_PLUGIN_X170_AUTORECONF_OPTS = -Im4/ +GST_PLUGIN_X170_DEPENDENCIES = gstreamer libglib2 on2-8170-libs + +$(eval $(autotools-package)) diff --git a/package/gstreamer/gst-plugins-bad/0001-opus-jpegformat-unbreak-non-debug-build.patch b/package/gstreamer/gst-plugins-bad/0001-opus-jpegformat-unbreak-non-debug-build.patch new file mode 100644 index 0000000000..2c98c3e102 --- /dev/null +++ b/package/gstreamer/gst-plugins-bad/0001-opus-jpegformat-unbreak-non-debug-build.patch @@ -0,0 +1,78 @@ +From 1725e702a3622cb45c8142622dd419fa0c410ac9 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Wed, 12 Sep 2012 09:10:35 +0200 +Subject: [PATCH] gst-plugins-bad: opus + jpegformat: unbreak non-debug build + +opus + jpegformat plugin builds fail when gstreamer is configured with +--disable-gst-debug as they are checking the GST_DISABLE_DEBUG symbol +instead of GST_DISABLE_GST_DEBUG. + +Submitted upstream as https://bugzilla.gnome.org/show_bug.cgi?id=683850 + +Signed-off-by: Peter Korsgaard +--- + ext/opus/gstopusdec.c | 2 +- + ext/opus/gstopusenc.c | 4 ++-- + gst/jpegformat/gstjpegparse.c | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/ext/opus/gstopusdec.c b/ext/opus/gstopusdec.c +index 0e2805c..ab7221d 100644 +--- a/ext/opus/gstopusdec.c ++++ b/ext/opus/gstopusdec.c +@@ -357,7 +357,7 @@ opus_dec_chain_parse_data (GstOpusDec * dec, GstBuffer * buffer) + + GST_DEBUG_OBJECT (dec, "Creating decoder with %d channels, %d Hz", + dec->n_channels, dec->sample_rate); +-#ifndef GST_DISABLE_DEBUG ++#ifndef GST_DISABLE_GST_DEBUG + gst_opus_common_log_channel_mapping_table (GST_ELEMENT (dec), opusdec_debug, + "Mapping table", dec->n_channels, dec->channel_mapping); + #endif +diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c +index 240a2cb..d991795 100644 +--- a/ext/opus/gstopusenc.c ++++ b/ext/opus/gstopusenc.c +@@ -589,7 +589,7 @@ gst_opus_enc_setup_channel_mappings (GstOpusEnc * enc, + } + } + +-#ifndef GST_DISABLE_DEBUG ++#ifndef GST_DISABLE_GST_DEBUG + GST_INFO_OBJECT (enc, + "Mapping tables built: %d channels, %d stereo streams", enc->n_channels, + enc->n_stereo_streams); +@@ -654,7 +654,7 @@ gst_opus_enc_setup (GstOpusEnc * enc) + { + int error = OPUS_OK; + +-#ifndef GST_DISABLE_DEBUG ++#ifndef GST_DISABLE_GST_DEBUG + GST_DEBUG_OBJECT (enc, + "setup: %d Hz, %d channels, %d stereo streams, family %d", + enc->sample_rate, enc->n_channels, enc->n_stereo_streams, +diff --git a/gst/jpegformat/gstjpegparse.c b/gst/jpegformat/gstjpegparse.c +index f984a52..b4af9ed 100644 +--- a/gst/jpegformat/gstjpegparse.c ++++ b/gst/jpegformat/gstjpegparse.c +@@ -545,7 +545,7 @@ gst_jpeg_parse_skip_marker (GstJpegParse * parse, + if (!gst_byte_reader_get_uint16_be (reader, &size)) + return FALSE; + +-#ifndef GST_DISABLE_DEBUG ++#ifndef GST_DISABLE_GST_DEBUG + /* We'd pry the id of the skipped application segment */ + if (marker >= APP0 && marker <= APP15) { + const gchar *id_str = NULL; +@@ -561,7 +561,7 @@ gst_jpeg_parse_skip_marker (GstJpegParse * parse, + #else + GST_DEBUG_OBJECT (parse, "unhandled marker %x skiping %u bytes", marker, + size); +-#endif // GST_DISABLE_DEBUG ++#endif // GST_DISABLE_GST_DEBUG + + if (!gst_byte_reader_skip (reader, size - 2)) + return FALSE; +-- +1.7.10 + diff --git a/package/gstreamer/gst-plugins-bad/0002-fix-dfb-example.patch b/package/gstreamer/gst-plugins-bad/0002-fix-dfb-example.patch new file mode 100644 index 0000000000..b2057484cd --- /dev/null +++ b/package/gstreamer/gst-plugins-bad/0002-fix-dfb-example.patch @@ -0,0 +1,22 @@ +Fix dfb-example + +Order of inclusion gives a strange effect on the definition of +gst_debug_log. Swapping the include statements solve it. + +Not upstreamed since there will be no more updates to this version +of gst-plugins-bad. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- +diff -rup gst-plugins-bad-0.10.23/ext/directfb/dfb-example.c gst-plugins-bad-0.10.23.fixed/ext/directfb/dfb-example.c +--- gst-plugins-bad-0.10.23/ext/directfb/dfb-example.c 2011-12-11 19:49:11.000000000 +0100 ++++ gst-plugins-bad-0.10.23.fixed/ext/directfb/dfb-example.c 2013-05-13 00:32:00.507469138 +0200 +@@ -1,7 +1,7 @@ + +-#include + #include + #include ++#include + + static IDirectFB *dfb = NULL; + static IDirectFBSurface *primary = NULL; diff --git a/package/gstreamer/gst-plugins-bad/0003-drop-buggy-libvpx-legacy-handling.patch b/package/gstreamer/gst-plugins-bad/0003-drop-buggy-libvpx-legacy-handling.patch new file mode 100644 index 0000000000..780b5e38e6 --- /dev/null +++ b/package/gstreamer/gst-plugins-bad/0003-drop-buggy-libvpx-legacy-handling.patch @@ -0,0 +1,44 @@ +[PATCH] vp8: drop buggy libvpx legacy handling + +Legacy handling for older libvpx versions were added back in 2010, but this +was unfortunately buggy as these symbols are enums and not defines - So they +are never defined and the legacy symbols always used. + +Now that the legacy symbols are completely removed from libvpx from v1.4.0 +onwards this breaks. Fix it by simply dropping the legacy handling, nobody +should be using libvpx versions from before 2010 (or gstreamer 0.10 for that +matter) any more. + +Signed-off-by: Peter Korsgaard +--- + ext/vp8/gstvp8utils.h | 17 ----------------- + 1 file changed, 17 deletions(-) + +Index: gst-plugins-bad-0.10.23/ext/vp8/gstvp8utils.h +=================================================================== +--- gst-plugins-bad-0.10.23.orig/ext/vp8/gstvp8utils.h ++++ gst-plugins-bad-0.10.23/ext/vp8/gstvp8utils.h +@@ -25,23 +25,6 @@ + + G_BEGIN_DECLS + +-/* Some compatibility defines for older libvpx versions */ +-#ifndef VPX_IMG_FMT_I420 +-#define VPX_IMG_FMT_I420 IMG_FMT_I420 +-#endif +- +-#ifndef VPX_PLANE_Y +-#define VPX_PLANE_Y PLANE_Y +-#endif +- +-#ifndef VPX_PLANE_U +-#define VPX_PLANE_U PLANE_U +-#endif +- +-#ifndef VPX_PLANE_V +-#define VPX_PLANE_V PLANE_V +-#endif +- + const char * gst_vpx_error_name (vpx_codec_err_t status); + + G_END_DECLS diff --git a/package/gstreamer/gst-plugins-bad/Config.in b/package/gstreamer/gst-plugins-bad/Config.in new file mode 100644 index 0000000000..d95edaa572 --- /dev/null +++ b/package/gstreamer/gst-plugins-bad/Config.in @@ -0,0 +1,337 @@ +menuconfig BR2_PACKAGE_GST_PLUGINS_BAD + bool "gst-plugins-bad" + select BR2_PACKAGE_GST_PLUGINS_BASE + help + A set of plug-ins for GStreamer that may be of poor quality or + lacking some features. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST_PLUGINS_BAD + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ADPCMDEC + bool "adpcmdec" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ADPCMENC + bool "adpcmenc" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AIFF + bool "aiff" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ASFMUX + bool "asfmux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AUTOCONVERT + bool "autoconvert" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AUDIOVISUALIZERS + bool "audiovisualizers" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_BAYER + bool "bayer" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CAMERABIN + bool "camerabin" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CAMERABIN2 + bool "camerabin2" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CDXAPARSE + bool "cdxaparse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_COLOREFFECTS + bool "coloreffects" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_COLORSPACE + bool "colorspace" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DATAURISRC + bool "dataurisrc" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DCCP + bool "dccp" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DEBUGUTILS + bool "debugutils" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DECKLINK + depends on BR2_INSTALL_LIBSTDCPP + bool "decklink" + +comment "decklink needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DTMF + bool "dtmf" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVBSUBOVERLAY + bool "dvdsuboverlay" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVDSPU + bool "dvdspu" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FACEOVERLAY + bool "faceoverlay" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FESTIVAL + bool "festival" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FIELDANALYSIS + bool "fieldanalysis" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREEVERB + bool "freeverb" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREEZE + bool "freeze" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREI0R + bool "frei0r" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_GAUDIEFFECTS + bool "gaudieffects" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_GEOMETRICTRANSFORM + bool "geometrictransform" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_GSETTINGS + bool "gsettings" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_H264PARSE + bool "h264parse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_HDVPARSE + bool "hdvparse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_HLS + bool "hls" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ID3TAG + bool "id3tag" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_INTER + bool "inter" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_INTERLACE + bool "interlace" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_IVFPARSE + bool "ivfparse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_JP2KDECIMATOR + bool "jp2kdecimator" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_JPEGFORMAT + bool "jpegformat" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LEGACYRESAMPLE + bool "legacyresample" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIBRFB + bool "librfb" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LINSYS + bool "linsys" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIVEADDER + bool "liveadder" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGDEMUX + bool "mpegdemux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGPSMUX + bool "mpegpsmux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGTSDEMUX + bool "mpegtsdemux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGTSMUX + bool "mpegtsmux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGVIDEOPARSE + bool "mpegvideoparse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MVE + bool "mve" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MXF + bool "mxf" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NSF + bool "nsf" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NUVDEMUX + bool "nuvdemux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PATCHDETECT + bool "patchdetect" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PCAPPARSE + bool "pcapparse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PNM + bool "pnm" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RAWPARSE + bool "rawparse" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_REAL + bool "real" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_REMOVESILENCE + bool "removesilence" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RTPMUX + bool "rtpmux" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RTPVP8 + bool "rtpvp8" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SCALETEMPO + bool "scaletempo" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDI + bool "sdi" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDP + bool "sdp" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SEGMENTCLIP + bool "segmentclip" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SIREN + bool "siren" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SMOOTH + bool "smooth" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SPEED + bool "speed" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_STEREO + bool "stereo" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SUBENC + bool "subenc" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_TTA + bool "tta" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOFILTERS + bool "videofilters" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOMAXRATE + bool "videomaxrate" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOMEASURE + bool "videomeasure" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOPARSERS + bool "videoparsers" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOSIGNAL + bool "videosignal" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VMNC + bool "vmnc" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_Y4M + bool "y4m" + +comment "plugins with external dependencies (there may be more available)" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_APEXSINK + bool "apexsink" + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_BZ2 + bool "bz2" + select BR2_PACKAGE_BZIP2 + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CDAUDIO + bool "cdaudio" + depends on !BR2_nios2 # libcdaudio + select BR2_PACKAGE_LIBCDAUDIO + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CURL + bool "curl" + select BR2_PACKAGE_LIBCURL + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DIRECTFB + bool "directfb" + depends on BR2_PACKAGE_DIRECTFB + default y + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVB + bool "dvb" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FBDEV + bool "fbdev" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FAAD + bool "faad" + select BR2_PACKAGE_FAAD2 + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIBMMS + bool "libmms" + depends on BR2_USE_WCHAR # libmms -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libmms -> libglib2 + select BR2_PACKAGE_LIBMMS + +comment "libmms needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MUSEPACK + bool "musepack" + select BR2_PACKAGE_MUSEPACK + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NEON + bool "neon" + select BR2_PACKAGE_NEON + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_OPUS + bool "opus" + select BR2_PACKAGE_OPUS + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RSVG + bool "rsvg" + depends on BR2_INSTALL_LIBSTDCPP # librsvg -> pango + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # librsvg -> pango -> harfbuzz + select BR2_PACKAGE_LIBRSVG + +comment "rsvg plugin needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDL + bool "sdl" + select BR2_PACKAGE_SDL + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SNDFILE + bool "sndfile" + select BR2_PACKAGE_LIBSNDFILE + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VCD + bool "vcd" + +config BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VP8 + bool "vp8" + select BR2_PACKAGE_LIBVPX + +config BR2_PACKAGE_GST_PLUGINS_BAD_ZBAR + bool "zbar" + depends on BR2_TOOLCHAIN_HAS_THREADS # zbar-> libv4l + depends on BR2_USE_MMU # zbar-> libv4l + depends on !BR2_STATIC_LIBS # zbar-> libv4l + depends on BR2_INSTALL_LIBSTDCPP # zbar-> libv4l + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # zbar-> libv4l + select BR2_PACKAGE_ZBAR + +comment "zbar plugin needs a toolchain w/ threads, dynamic library, C++ and headers >= 3.0" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \ + || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + +endif diff --git a/package/gstreamer/gst-plugins-bad/gst-plugins-bad.hash b/package/gstreamer/gst-plugins-bad/gst-plugins-bad.hash new file mode 100644 index 0000000000..760ed31c9c --- /dev/null +++ b/package/gstreamer/gst-plugins-bad/gst-plugins-bad.hash @@ -0,0 +1,2 @@ +# From http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.23.tar.xz.md5 +md5 e4822fa2cc933768e2998311a1565979 gst-plugins-bad-0.10.23.tar.xz diff --git a/package/gstreamer/gst-plugins-bad/gst-plugins-bad.mk b/package/gstreamer/gst-plugins-bad/gst-plugins-bad.mk new file mode 100644 index 0000000000..98e5c1cfb8 --- /dev/null +++ b/package/gstreamer/gst-plugins-bad/gst-plugins-bad.mk @@ -0,0 +1,598 @@ +################################################################################ +# +# gst-plugins-bad +# +################################################################################ + +GST_PLUGINS_BAD_VERSION = 0.10.23 +GST_PLUGINS_BAD_SOURCE = gst-plugins-bad-$(GST_PLUGINS_BAD_VERSION).tar.xz +GST_PLUGINS_BAD_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-bad +# COPYING.LIB is in fact v2, but most of the code is v2.1+ +GST_PLUGINS_BAD_LICENSE = LGPLv2.1+, GPLv2+ +GST_PLUGINS_BAD_LICENSE_FILES = COPYING.LIB COPYING + +GST_PLUGINS_BAD_CONF_OPTS = \ + --disable-examples + +GST_PLUGINS_BAD_DEPENDENCIES = gst-plugins-base gstreamer + +ifeq ($(BR2_PACKAGE_ORC),y) +GST_PLUGINS_BAD_DEPENDENCIES += orc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ADPCMDEC),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-adpcmdec +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-adpcmdec +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ADPCMENC),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-adpcmenc +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-adpcmenc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AIFF),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-aiff +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-aiff +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ASFMUX),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-asfmux +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-asfmux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AUDIOVISUALIZERS),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-audiovisualizers +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-audiovisualizers +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_AUTOCONVERT),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-autoconvert +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-autoconvert +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_BAYER),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-bayer +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-bayer +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CAMERABIN),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-camerabin +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-camerabin +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CAMERABIN2),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-camerabin2 +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-camerabin2 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CDXAPARSE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-cdxaparse +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-cdxaparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_COLOREFFECTS),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-coloreffects +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-coloreffects +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_COLORSPACE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-colorspace +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-colorspace +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DATAURISRC),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-dataurisrc +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-dataurisrc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DCCP),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-dccp +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-dccp +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DEBUGUTILS),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-debugutils +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-debugutils +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DECKLINK),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-decklink +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-decklink +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DTMF),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-dtmf +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-dtmf +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVBSUBOVERLAY),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-dvbsuboverlay +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-dvbsuboverlay +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVDSPU),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-dvdspu +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-dvdspu +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FACEOVERLAY),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-faceoverlay +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-faceoverlay +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FESTIVAL),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-festival +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-festival +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FIELDANALYSIS),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-fieldanalysis +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-fieldanalysis +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREEZE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-freeze +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-freeze +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREEVERB),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-freeverb +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-freeverb +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FREI0R),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-frei0r +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-frei0r +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_GAUDIEFFECTS),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-gaudieffects +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-gaudieffects +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_GEOMETRICTRANSFORM),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-geometrictransform +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-geometrictransform +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_GSETTINGS),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-gsettings +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-gsettings +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_H264PARSE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-h264parse +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-h264parse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_HDVPARSE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-hdvparse +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-hdvparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_HLS),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-hls +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-hls +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_ID3TAG),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-id3tag +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-id3tag +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_INTER),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-inter +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-inter +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_INTERLACE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-interlace +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-interlace +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_IVFPARSE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-ivfparse +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-ivfparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_JP2KDECIMATOR),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-jp2kdecimator +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-jp2kdecimator +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_JPEGFORMAT),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-jpegformat +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-jpegformat +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LEGACYRESAMPLE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-legacyresample +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-legacyresample +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIBRFB),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-librfb +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-librfb +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LINSYS),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-linsys +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-linsys +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIVEADDER),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-liveadder +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-liveadder +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGDEMUX),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-mpegdemux +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-mpegdemux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGPSMUX),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-mpegpsmux +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-mpegpsmux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGTSDEMUX),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-mpegtsdemux +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-mpegtsdemux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGTSMUX),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-mpegtsmux +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-mpegtsmux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MPEGVIDEOPARSE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-mpegvideoparse +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-mpegvideoparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MVE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-mve +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-mve +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MXF),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-mxf +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-mxf +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NSF),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-nsf +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-nsf +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NUVDEMUX),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-nuvdemux +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-nuvdemux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PATCHDETECT),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-patchdetect +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-patchdetect +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PCAPPARSE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-pcapparse +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-pcapparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_PNM),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-pnm +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-pnm +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RAWPARSE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-rawparse +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-rawparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_REAL),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-real +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-real +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_REMOVESILENCE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-removesilence +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-removesilence +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RTPMUX),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-rtpmux +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-rtpmux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RTPVP8),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-rtpvp8 +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-rtpvp8 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SCALETEMPO),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-scaletempo +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-scaletempo +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDI),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-sdi +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-sdi +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDP),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-sdp +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-sdp +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SEGMENTCLIP),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-segmentclip +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-segmentclip +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SIREN),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-siren +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-siren +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SMOOTH),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-smooth +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-smooth +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SPEED),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-speed +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-speed +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SUBENC),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-subenc +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-subenc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_STEREO),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-stereo +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-stereo +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_TTA),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-tta +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-tta +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOFILTERS),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-videofilters +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-videofilters +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOMAXRATE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-videomaxrate +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-videomaxrate +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOMEASURE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-videomeasure +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-videomeasure +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOPARSERS),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-videoparsers +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-videoparsers +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VIDEOSIGNAL),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-videosignal +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-videosignal +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VMNC),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-vmnc +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-vmnc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_Y4M),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-y4m +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-y4m +endif + +# plugins with deps +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_APEXSINK),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-apexsink +GST_PLUGINS_BAD_DEPENDENCIES += openssl +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-apexsink +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_BZ2),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-bz2 +GST_PLUGINS_BAD_DEPENDENCIES += bzip2 +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-bz2 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CDAUDIO),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-cdaudio +GST_PLUGINS_BAD_DEPENDENCIES += libcdaudio +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-cdaudio +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_CURL),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-curl +GST_PLUGINS_BAD_DEPENDENCIES += libcurl +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-curl +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DIRECTFB),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-directfb +GST_PLUGINS_BAD_DEPENDENCIES += directfb +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-directfb +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_DVB),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-dvb +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-dvb +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FAAD),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-faad +GST_PLUGINS_BAD_DEPENDENCIES += faad2 +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-faad +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_FBDEV),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-fbdev +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-fbdev +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_LIBMMS),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-libmms +GST_PLUGINS_BAD_DEPENDENCIES += libmms +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-libmms +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_MUSEPACK),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-musepack +GST_PLUGINS_BAD_DEPENDENCIES += musepack +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-musepack +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_NEON),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-neon +GST_PLUGINS_BAD_DEPENDENCIES += neon +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-neon +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_OPUS),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-opus +GST_PLUGINS_BAD_DEPENDENCIES += opus +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-opus +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_RSVG),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-rsvg +GST_PLUGINS_BAD_DEPENDENCIES += librsvg +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-rsvg +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SDL),y) +GST_PLUGINS_BAD_CONF_ENV += ac_cv_path_SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config +GST_PLUGINS_BAD_CONF_OPTS += --enable-sdl +GST_PLUGINS_BAD_DEPENDENCIES += sdl +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-sdl +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_SNDFILE),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-sndfile +GST_PLUGINS_BAD_DEPENDENCIES += libsndfile +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-sndfile +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VCD),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-vcd +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-vcd +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_PLUGIN_VP8),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-vp8 +GST_PLUGINS_BAD_DEPENDENCIES += libvpx +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-vp8 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BAD_ZBAR),y) +GST_PLUGINS_BAD_CONF_OPTS += --enable-zbar +GST_PLUGINS_BAD_DEPENDENCIES += zbar +else +GST_PLUGINS_BAD_CONF_OPTS += --disable-zbar +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer/gst-plugins-base/0001-tremor.patch b/package/gstreamer/gst-plugins-base/0001-tremor.patch new file mode 100644 index 0000000000..fa8785bed4 --- /dev/null +++ b/package/gstreamer/gst-plugins-base/0001-tremor.patch @@ -0,0 +1,139 @@ +From 0088753651350de3060ece22c1be4153b6009515 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Wed, 25 Jan 2012 23:53:04 +0100 +Subject: [PATCH] base: vorbisdeclib: support modern Tremor versions + +Reported upstream as https://bugzilla.gnome.org/show_bug.cgi?id=668726 + +Tremor changed to use standard libogg rather than its own incompatible +copy back in Aug 2010 (r17375), causing gst-plugin-base build to fail. + +Tremolo so far unfortunately hasn't been updated. Restructure +vorbisdeclib.h so the legacy _ogg_packet_wrapper code is only used for +Tremolo. + +Signed-off-by: Peter Korsgaard +--- + ext/vorbis/gstvorbisdeclib.h | 77 ++++++++++++++++++++++------------------- + 1 files changed, 41 insertions(+), 36 deletions(-) + +diff --git a/ext/vorbis/gstvorbisdeclib.h b/ext/vorbis/gstvorbisdeclib.h +index ca00af9..e147591 100644 +--- a/ext/vorbis/gstvorbisdeclib.h ++++ b/ext/vorbis/gstvorbisdeclib.h +@@ -29,11 +29,6 @@ + + #ifndef TREMOR + +-#include +- +-typedef float vorbis_sample_t; +-typedef ogg_packet ogg_packet_wrapper; +- + #define GST_VORBIS_DEC_DESCRIPTION "decode raw vorbis streams to float audio" + + #define GST_VORBIS_DEC_SRC_CAPS \ +@@ -47,6 +42,42 @@ typedef ogg_packet ogg_packet_wrapper; + + #define GST_VORBIS_DEC_GLIB_TYPE_NAME GstVorbisDec + ++#else /* TREMOR */ ++ ++#define GST_VORBIS_DEC_DESCRIPTION "decode raw vorbis streams to integer audio" ++ ++#define GST_VORBIS_DEC_SRC_CAPS \ ++ GST_STATIC_CAPS ("audio/x-raw-int, " \ ++ "rate = (int) [ 1, MAX ], " \ ++ "channels = (int) [ 1, 6 ], " \ ++ "endianness = (int) BYTE_ORDER, " \ ++ "width = (int) { 16, 32 }, " \ ++ "depth = (int) 16, " \ ++ "signed = (boolean) true") ++ ++#define GST_VORBIS_DEC_DEFAULT_SAMPLE_WIDTH (16) ++ ++/* we need a different type name here */ ++#define GST_VORBIS_DEC_GLIB_TYPE_NAME GstIVorbisDec ++ ++/* and still have it compile */ ++typedef struct _GstVorbisDec GstIVorbisDec; ++typedef struct _GstVorbisDecClass GstIVorbisDecClass; ++ ++#endif /* TREMOR */ ++ ++#ifndef USE_TREMOLO ++ ++#ifdef TREMOR ++ #include ++ typedef ogg_int32_t vorbis_sample_t; ++#else ++ #include ++ typedef float vorbis_sample_t; ++#endif ++ ++typedef ogg_packet ogg_packet_wrapper; ++ + static inline guint8 * + gst_ogg_packet_data (ogg_packet * p) + { +@@ -72,17 +103,11 @@ gst_ogg_packet_from_wrapper (ogg_packet_wrapper * packet) + return packet; + } + +-#else +- +-#ifdef USE_TREMOLO +- #include +- #include +- typedef ogg_int16_t vorbis_sample_t; +-#else +- #include +- typedef ogg_int32_t vorbis_sample_t; +-#endif ++#else /* USE_TREMOLO */ + ++#include ++#include ++typedef ogg_int16_t vorbis_sample_t; + typedef struct _ogg_packet_wrapper ogg_packet_wrapper; + + struct _ogg_packet_wrapper { +@@ -91,26 +116,6 @@ struct _ogg_packet_wrapper { + ogg_buffer buf; + }; + +-#define GST_VORBIS_DEC_DESCRIPTION "decode raw vorbis streams to integer audio" +- +-#define GST_VORBIS_DEC_SRC_CAPS \ +- GST_STATIC_CAPS ("audio/x-raw-int, " \ +- "rate = (int) [ 1, MAX ], " \ +- "channels = (int) [ 1, 6 ], " \ +- "endianness = (int) BYTE_ORDER, " \ +- "width = (int) { 16, 32 }, " \ +- "depth = (int) 16, " \ +- "signed = (boolean) true") +- +-#define GST_VORBIS_DEC_DEFAULT_SAMPLE_WIDTH (16) +- +-/* we need a different type name here */ +-#define GST_VORBIS_DEC_GLIB_TYPE_NAME GstIVorbisDec +- +-/* and still have it compile */ +-typedef struct _GstVorbisDec GstIVorbisDec; +-typedef struct _GstVorbisDecClass GstIVorbisDecClass; +- + /* compensate minor variation */ + #define vorbis_synthesis(a, b) vorbis_synthesis (a, b, 1) + +@@ -154,7 +159,7 @@ gst_ogg_packet_from_wrapper (ogg_packet_wrapper * packet) + return &(packet->packet); + } + +-#endif ++#endif /* USE_TREMOLO */ + + typedef void (*CopySampleFunc)(vorbis_sample_t *out, vorbis_sample_t **in, + guint samples, gint channels, gint width); +-- +1.7.8.3 + diff --git a/package/gstreamer/gst-plugins-base/0002-audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch b/package/gstreamer/gst-plugins-base/0002-audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch new file mode 100644 index 0000000000..eabea4f8ca --- /dev/null +++ b/package/gstreamer/gst-plugins-base/0002-audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch @@ -0,0 +1,38 @@ +From daa194b71ea6f9e8ee522ab02e8c56150b7e62b3 Mon Sep 17 00:00:00 2001 +From: Antoine Jacoutot +Date: Mon, 20 Jan 2014 15:44:09 +0100 +Subject: [PATCH] audioresample: Fix build on x86 if emmintrin.h is available + but can't be used + +On i386, EMMINTRIN is defined but not usable without SSE so check for +__SSE__ and __SSE2__ as well. + +https://bugzilla.gnome.org/show_bug.cgi?id=670690 +Signed-off-by: Peter Korsgaard +--- + gst/audioresample/resample.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c +index 98d006c..481fa01 100644 +--- a/gst/audioresample/resample.c ++++ b/gst/audioresample/resample.c +@@ -77,13 +77,13 @@ + #define EXPORT G_GNUC_INTERNAL + + #ifdef _USE_SSE +-#ifndef HAVE_XMMINTRIN_H ++#if !defined(__SSE__) || !defined(HAVE_XMMINTRIN_H) + #undef _USE_SSE + #endif + #endif + + #ifdef _USE_SSE2 +-#ifndef HAVE_EMMINTRIN_H ++#if !defined(__SSE2__) || !defined(HAVE_XMMINTRIN_H) + #undef _USE_SSE2 + #endif + #endif +-- +2.1.4 + diff --git a/package/gstreamer/gst-plugins-base/0003-audioresample-It-s-HAVE_EMMINTRIN_H-not-HAVE_XMMINTR.patch b/package/gstreamer/gst-plugins-base/0003-audioresample-It-s-HAVE_EMMINTRIN_H-not-HAVE_XMMINTR.patch new file mode 100644 index 0000000000..e67531d2f7 --- /dev/null +++ b/package/gstreamer/gst-plugins-base/0003-audioresample-It-s-HAVE_EMMINTRIN_H-not-HAVE_XMMINTR.patch @@ -0,0 +1,27 @@ +From 4e3d101aa854cfee633a9689efeb75e5001baa5e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Mon, 20 Jan 2014 16:11:04 +0100 +Subject: [PATCH] audioresample: It's HAVE_EMMINTRIN_H, not HAVE_XMMINTRIN_H + for SSE2 + +Signed-off-by: Peter Korsgaard +--- + gst/audioresample/resample.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c +index 481fa01..4410bdd 100644 +--- a/gst/audioresample/resample.c ++++ b/gst/audioresample/resample.c +@@ -83,7 +83,7 @@ + #endif + + #ifdef _USE_SSE2 +-#if !defined(__SSE2__) || !defined(HAVE_XMMINTRIN_H) ++#if !defined(__SSE2__) || !defined(HAVE_EMMINTRIN_H) + #undef _USE_SSE2 + #endif + #endif +-- +2.1.4 + diff --git a/package/gstreamer/gst-plugins-base/Config.in b/package/gstreamer/gst-plugins-base/Config.in new file mode 100644 index 0000000000..8ad9a8ef81 --- /dev/null +++ b/package/gstreamer/gst-plugins-base/Config.in @@ -0,0 +1,107 @@ +menuconfig BR2_PACKAGE_GST_PLUGINS_BASE + bool "gst-plugins-base" + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXV if BR2_PACKAGE_XORG7 + help + A basic set of well-supported plug-ins for GStreamer. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST_PLUGINS_BASE + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ADDER + bool "adder" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP + bool "app" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIOCONVERT + bool "audioconvert (mandatory for audio playback)" + default y + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIORATE + bool "audiorate" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE + bool "audioresample (mandatory for audio playback)" + default y + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC + bool "audiotestsrc" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ENCODING + bool "encoding" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_FFMPEGCOLORSPACE + bool "ffmpegcolorspace (mandatory for video playback)" + default y + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_GDP + bool "gdp" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_PLAYBACK + bool "playback (mandatory)" + default y + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_SUBPARSE + bool "subparse" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TCP + bool "tcp" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TYPEFIND + bool "typefind (mandatory)" + default y + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC + bool "videotestsrc" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEORATE + bool "videorate" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEOSCALE + bool "videoscale (mandatory for video playback)" + default y + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VOLUME + bool "volume (mandatory for audio playback)" + default y + +comment "plugins with external dependencies (there may be more available)" + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ALSA + bool "alsa (mandatory for audio playback)" + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_ALSA_LIB_MIXER + select BR2_PACKAGE_ALSA_LIB_PCM + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_OGG + bool "ogg (*.ogg audio/video)" + select BR2_PACKAGE_LIBOGG + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_PANGO + bool "pango font renderer" + depends on BR2_INSTALL_LIBSTDCPP # pango -> freetype + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango -> harfbuzz + select BR2_PACKAGE_PANGO + +comment "pango plugin needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_THEORA + bool "theora (*.ogg video)" + select BR2_PACKAGE_LIBTHEORA + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TREMOR + bool "tremor" + select BR2_PACKAGE_TREMOR + +config BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VORBIS + bool "vorbis (*.ogg audio)" + select BR2_PACKAGE_LIBVORBIS + +endif diff --git a/package/gstreamer/gst-plugins-base/gst-plugins-base.hash b/package/gstreamer/gst-plugins-base/gst-plugins-base.hash new file mode 100644 index 0000000000..77eba71bb5 --- /dev/null +++ b/package/gstreamer/gst-plugins-base/gst-plugins-base.hash @@ -0,0 +1,2 @@ +# From http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.36.tar.xz.md5 +md5 3d2337841b132fe996e5eb2396ac9438 gst-plugins-base-0.10.36.tar.xz diff --git a/package/gstreamer/gst-plugins-base/gst-plugins-base.mk b/package/gstreamer/gst-plugins-base/gst-plugins-base.mk new file mode 100644 index 0000000000..e1374ed801 --- /dev/null +++ b/package/gstreamer/gst-plugins-base/gst-plugins-base.mk @@ -0,0 +1,195 @@ +################################################################################ +# +# gst-plugins-base +# +################################################################################ + +GST_PLUGINS_BASE_VERSION = 0.10.36 +GST_PLUGINS_BASE_SOURCE = gst-plugins-base-$(GST_PLUGINS_BASE_VERSION).tar.xz +GST_PLUGINS_BASE_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-base +GST_PLUGINS_BASE_INSTALL_STAGING = YES +GST_PLUGINS_BASE_LICENSE = GPLv2+, LGPLv2+ +GST_PLUGINS_BASE_LICENSE_FILES = COPYING COPYING.LIB + +# freetype is only used by examples, but if it is not found +# and the host has a freetype-config script, then the host +# include dirs are added to the search path causing trouble +GST_PLUGINS_BASE_CONF_ENV = + FT2_CONFIG=/bin/false \ + ac_cv_header_stdint_t="stdint.h" + +GST_PLUGINS_BASE_CONF_OPTS = \ + --disable-examples \ + --disable-oggtest \ + --disable-vorbistest \ + --disable-freetypetest + +GST_PLUGINS_BASE_DEPENDENCIES = gstreamer + +ifeq ($(BR2_PACKAGE_XORG7),y) +GST_PLUGINS_BASE_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXv +GST_PLUGINS_BASE_CONF_OPTS += \ + --enable-x \ + --enable-xshm \ + --enable-xvideo +else +GST_PLUGINS_BASE_CONF_OPTS += \ + --disable-x \ + --disable-xshm \ + --disable-xvideo +endif + +ifeq ($(BR2_PACKAGE_ORC),y) +GST_PLUGINS_BASE_DEPENDENCIES += orc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ALSA),y) +GST_PLUGINS_BASE_DEPENDENCIES += alsa-lib +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-alsa +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ADDER),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-adder +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-adder +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-app +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-app +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIOCONVERT),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-audioconvert +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-audioconvert +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIORATE),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-audiorate +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-audiorate +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-audioresample +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-audioresample +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-audiotestsrc +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-audiotestsrc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ENCODING),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-encoding +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-encoding +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_FFMPEGCOLORSPACE),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-ffmpegcolorspace +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-ffmpegcolorspace +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_GDP),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-gdp +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-gdp +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_PLAYBACK),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-playback +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-playback +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_SUBPARSE),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-subparse +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-subparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TCP),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-tcp +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-tcp +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TYPEFIND),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-typefind +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-typefind +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-videotestsrc +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-videotestsrc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEORATE),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-videorate +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-videorate +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEOSCALE),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-videoscale +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-videoscale +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VOLUME),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-volume +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-volume +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_OGG),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-ogg +GST_PLUGINS_BASE_DEPENDENCIES += libogg +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-ogg +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_PANGO),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-pango +GST_PLUGINS_BASE_DEPENDENCIES += pango +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-pango +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_THEORA),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-theora +GST_PLUGINS_BASE_DEPENDENCIES += libtheora +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-theora +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_TREMOR),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-ivorbis +GST_PLUGINS_BASE_DEPENDENCIES += tremor +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-ivorbis +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VORBIS),y) +GST_PLUGINS_BASE_CONF_OPTS += --enable-vorbis +GST_PLUGINS_BASE_DEPENDENCIES += libvorbis +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-vorbis +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +GST_PLUGINS_BASE_DEPENDENCIES += zlib +else +GST_PLUGINS_BASE_CONF_OPTS += --disable-zlib +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer/gst-plugins-good/0001-linux36.patch b/package/gstreamer/gst-plugins-good/0001-linux36.patch new file mode 100644 index 0000000000..5d7cd932ed --- /dev/null +++ b/package/gstreamer/gst-plugins-good/0001-linux36.patch @@ -0,0 +1,37 @@ +Fix building with Linux headers 3.6 + +Signed-off-by: Markos Chandras + +From bfb1ac952b4c3caaba0297bbe7dc73ea92f9b292 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Thu, 09 Aug 2012 07:35:23 +0000 +Subject: v4l2: fix build with recent kernels, the v4l2_buffer input field was removed + +This was unused apparently and removed in the kernel in commit: + + From 2b719d7baf490e24ce7d817c6337b7c87fda84c1 Mon Sep 17 00:00:00 2001 + From: Sakari Ailus + Date: Wed, 2 May 2012 09:40:03 -0300 + Subject: [PATCH] [media] v4l: drop v4l2_buffer.input and V4L2_BUF_FLAG_INPUT + + Remove input field in struct v4l2_buffer and flag V4L2_BUF_FLAG_INPUT which + tells the former is valid. The flag is used by no driver currently. + +https://bugzilla.gnome.org/show_bug.cgi?id=681491 +--- +(limited to 'sys/v4l2/gstv4l2bufferpool.c') + +diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c +index 2e3a563..5aaed5a 100644 +--- a/sys/v4l2/gstv4l2bufferpool.c ++++ b/sys/v4l2/gstv4l2bufferpool.c +@@ -182,7 +182,6 @@ gst_v4l2_buffer_new (GstV4l2BufferPool * pool, guint index, GstCaps * caps) + GST_LOG_OBJECT (pool->v4l2elem, " MMAP offset: %u", + ret->vbuffer.m.offset); + GST_LOG_OBJECT (pool->v4l2elem, " length: %u", ret->vbuffer.length); +- GST_LOG_OBJECT (pool->v4l2elem, " input: %u", ret->vbuffer.input); + + ret->mmap_length = ret->vbuffer.length; + data = (guint8 *) v4l2_mmap (0, ret->vbuffer.length, +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/gstreamer/gst-plugins-good/0002-v4l2-fix-compilation-against-newer-kernel-headers.patch b/package/gstreamer/gst-plugins-good/0002-v4l2-fix-compilation-against-newer-kernel-headers.patch new file mode 100644 index 0000000000..62c3bb24e6 --- /dev/null +++ b/package/gstreamer/gst-plugins-good/0002-v4l2-fix-compilation-against-newer-kernel-headers.patch @@ -0,0 +1,30 @@ +From 8e633d2059cb835448021cf79becb487aff10975 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Mon, 18 Mar 2013 14:59:35 +0000 +Subject: [PATCH] v4l2: fix compilation against newer kernel headers as on + FC19 + +--- + sys/v4l2/v4l2_calls.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c +index 07d390a..4c10f4f 100644 +--- a/sys/v4l2/v4l2_calls.c ++++ b/sys/v4l2/v4l2_calls.c +@@ -291,8 +291,12 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object) + break; + case V4L2_CID_HFLIP: + case V4L2_CID_VFLIP: ++#ifndef V4L2_CID_PAN_RESET + case V4L2_CID_HCENTER: ++#endif ++#ifndef V4L2_CID_TILT_RESET + case V4L2_CID_VCENTER: ++#endif + #ifdef V4L2_CID_PAN_RESET + case V4L2_CID_PAN_RESET: + #endif +-- +1.7.10.4 + diff --git a/package/gstreamer/gst-plugins-good/Config.in b/package/gstreamer/gst-plugins-good/Config.in new file mode 100644 index 0000000000..65f74e819d --- /dev/null +++ b/package/gstreamer/gst-plugins-good/Config.in @@ -0,0 +1,233 @@ +menuconfig BR2_PACKAGE_GST_PLUGINS_GOOD + bool "gst-plugins-good" + select BR2_PACKAGE_GST_PLUGINS_BASE + help + A set of well-supported plug-ins for GStreamer under the preferred + license. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST_PLUGINS_GOOD + +config BR2_PACKAGE_GST_PLUGINS_GOOD_JPEG + bool "jpeg (JPEG support)" + select BR2_PACKAGE_JPEG + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PNG + bool "png (PNG support)" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_GST_PLUGINS_GOOD_BZ2 + bool "bz2 support" + depends on BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MATROSKA + select BR2_PACKAGE_BZIP2 + help + Enable bz2 support for the following plugins: + matroska + +config BR2_PACKAGE_GST_PLUGINS_GOOD_ZLIB + bool "zlib support" + depends on BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ISOMP4 || BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ID3DEMUX || BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MATROSKA + select BR2_PACKAGE_ZLIB + help + Enable zlib support for the following plugins: + id3demux, isomp4, matroska + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ALPHA + bool "alpha" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_APETAG + bool "apetag" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUDIOFX + bool "audiofx" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUDIOPARSERS + bool "audioparsers" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUPARSE + bool "auparse" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUTODETECT + bool "autodetect" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AVI + bool "avi (*.avi video)" + default y + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_CUTTER + bool "cutter" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_DEBUGUTILS + bool "debugutils" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_DEINTERLACE + bool "deinterlace" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_EFFECTV + bool "effectv" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_EQUALIZER + bool "equalizer" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLV + bool "flv" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLX + bool "flx" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GOOM + bool "goom" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GOOM2K1 + bool "goom2k1" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ID3DEMUX + bool "id3demux (*.mp3 audio)" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ICYDEMUX + bool "icydemux" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_IMAGEFREEZE + bool "imagefreeze" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_INTERLEAVE + bool "interleave" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ISOMP4 + bool "isomp4" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_LAW + bool "law" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_LEVEL + bool "level" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MATROSKA + bool "matroska" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MONOSCOPE + bool "monoscope" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MULTIFILE + bool "multifile" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MULTIPART + bool "multipart" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_REPLAYGAIN + bool "replaygain" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_RTP + bool "rtp" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_RTPMANAGER + bool "rtpmanager" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_RTSP + bool "rtsp" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SHAPEWIPE + bool "shapewipe" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SMPTE + bool "smpte" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SPECTRUM + bool "spectrum" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_UDP + bool "udp" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOBOX + bool "videobox" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOCROP + bool "videocrop" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOFILTER + bool "videofilter" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOMIXER + bool "videomixer" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_WAVENC + bool "wavenc" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_WAVPARSE + bool "wavparse (*.wav audio)" + default y + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_Y4M + bool "y4m" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_V4L2 + bool "v4l2" + +comment "plugins with external dependencies" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ANNODEX + bool "annodex (XML Library)" + select BR2_PACKAGE_LIBXML2 + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_CAIRO + bool "cairo" + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLAC + bool "flac (libFLAC)" + depends on BR2_USE_WCHAR # flac + select BR2_PACKAGE_FLAC + +comment "flac needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GDKPIXBUF + bool "gdkpixbuf" + depends on BR2_USE_WCHAR # gdk-pixbuf -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # gdk-pixbuf -> libglib2 + select BR2_PACKAGE_GDK_PIXBUF + +comment "gdkpixbuf needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_OSS + bool "ossaudio (OSS audio)" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_OSS4 + bool "oss4 (Open Sound System 4)" + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_PULSE + depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio + depends on BR2_USE_MMU # pulseaudio + depends on !BR2_STATIC_LIBS # pulseaudio + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pulseaudio -> json-c + select BR2_PACKAGE_PULSEAUDIO + bool "pulseaudio" + +comment "pulseaudio support needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC + bool "souphttpsrc (http client)" + depends on BR2_USE_WCHAR # libsoup -> glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libsoup -> glib2 + select BR2_PACKAGE_LIBSOUP + +comment "souphttpsrc needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SPEEX + bool "speex" + select BR2_PACKAGE_SPEEX + +config BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_WAVPACK + bool "wavpack (*.wv audio)" + select BR2_PACKAGE_WAVPACK + +endif diff --git a/package/gstreamer/gst-plugins-good/gst-plugins-good.hash b/package/gstreamer/gst-plugins-good/gst-plugins-good.hash new file mode 100644 index 0000000000..094dc87978 --- /dev/null +++ b/package/gstreamer/gst-plugins-good/gst-plugins-good.hash @@ -0,0 +1,2 @@ +# From http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.31.tar.xz.md5 +md5 555845ceab722e517040bab57f9ace95 gst-plugins-good-0.10.31.tar.xz diff --git a/package/gstreamer/gst-plugins-good/gst-plugins-good.mk b/package/gstreamer/gst-plugins-good/gst-plugins-good.mk new file mode 100644 index 0000000000..a686caf604 --- /dev/null +++ b/package/gstreamer/gst-plugins-good/gst-plugins-good.mk @@ -0,0 +1,394 @@ +################################################################################ +# +# gst-plugins-good +# +################################################################################ + +GST_PLUGINS_GOOD_VERSION = 0.10.31 +GST_PLUGINS_GOOD_SOURCE = gst-plugins-good-$(GST_PLUGINS_GOOD_VERSION).tar.xz +GST_PLUGINS_GOOD_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-good +GST_PLUGINS_GOOD_LICENSE = LGPLv2.1+ +GST_PLUGINS_GOOD_LICENSE_FILES = COPYING + +GST_PLUGINS_GOOD_CONF_OPTS = \ + --disable-examples \ + --disable-directsound \ + --disable-sunaudio \ + --disable-osx_audio \ + --disable-osx_video \ + --disable-aalib \ + --disable-aalibtest \ + --disable-esd \ + --disable-esdtest \ + --disable-shout2 + +GST_PLUGINS_GOOD_DEPENDENCIES = gstreamer gst-plugins-base + +ifeq ($(BR2_PACKAGE_XORG7),y) +GST_PLUGINS_GOOD_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXv +GST_PLUGINS_GOOD_CONF_OPTS += \ + --enable-x \ + --enable-xshm \ + --enable-xvideo +else +GST_PLUGINS_GOOD_CONF_OPTS += \ + --disable-x \ + --disable-xshm \ + --disable-xvideo +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_JPEG),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-jpeg +GST_PLUGINS_GOOD_DEPENDENCIES += jpeg +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-jpeg +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PNG),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-libpng +GST_PLUGINS_GOOD_DEPENDENCIES += libpng +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-libpng +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_BZ2),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-bz2 +GST_PLUGINS_GOOD_DEPENDENCIES += bzip2 +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-bz2 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_ZLIB),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-zlib +GST_PLUGINS_GOOD_DEPENDENCIES += zlib +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ALPHA),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-alpha +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-alpha +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_APETAG),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-apetag +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-apetag +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUDIOFX),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-audiofx +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-audiofx +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUDIOPARSERS),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-audioparsers +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-audioparsers +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUPARSE),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-auparse +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-auparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUTODETECT),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-autodetect +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-autodetect +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AVI),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-avi +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-avi +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_CUTTER),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-cutter +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-cutter +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_DEBUGUTILS),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-debugutils +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-debugutils +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_DEINTERLACE),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-deinterlace +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-deinterlace +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_EFFECTV),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-effectv +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-effectv +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_EQUALIZER),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-equalizer +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-equalizer +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLV),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-flv +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-flv +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLX),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-flx +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-flx +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GOOM),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-goom +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-goom +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GOOM2K1),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-goom2k1 +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-goom2k1 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ID3DEMUX),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-id3demux +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-id3demux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ICYDEMUX),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-icydemux +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-icydemux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_IMAGEFREEZE),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-imagefreeze +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-imagefreeze +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_INTERLEAVE),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-interleave +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-interleave +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ISOMP4),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-isomp4 +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-isomp4 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_LAW),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-law +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-law +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_LEVEL),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-level +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-level +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MATROSKA),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-matroska +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-matroska +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MONOSCOPE),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-monoscope +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-monoscope +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MULTIFILE),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-multifile +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-multifile +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MULTIPART),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-multipart +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-multipart +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_REPLAYGAIN),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-replaygain +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-replaygain +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_RTP),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-rtp +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-rtp +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_RTPMANAGER),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-rtpmanager +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-rtpmanager +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_RTSP),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-rtsp +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-rtsp +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SHAPEWIPE),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-shapewipe +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-shapewipe +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SMPTE),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-smpte +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-smpte +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SPECTRUM),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-spectrum +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-spectrum +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_UDP),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-udp +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-udp +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOBOX),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-videobox +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-videobox +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOCROP),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-videocrop +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-videocrop +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOFILTER),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-videofilter +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-videofilter +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOMIXER),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-videomixer +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-videomixer +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_WAVENC),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-wavenc +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-wavenc +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_WAVPARSE),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-wavparse +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-wavparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_Y4M),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-y4m +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-y4m +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_V4L2),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-gst_v4l2 +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-gst_v4l2 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ANNODEX),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-annodex +GST_PLUGINS_GOOD_DEPENDENCIES += libxml2 +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-annodex +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_CAIRO),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-cairo +GST_PLUGINS_GOOD_DEPENDENCIES += cairo +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-cairo +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLAC),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-flac +GST_PLUGINS_GOOD_DEPENDENCIES += flac +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-flac +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_GDKPIXBUF),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-gdk_pixbuf +GST_PLUGINS_GOOD_DEPENDENCIES += gdk-pixbuf +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-gdk_pixbuf +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_OSS),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-oss +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-oss +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_OSS4),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-oss4 +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-oss4 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_PULSE),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-pulse +GST_PLUGINS_GOOD_DEPENDENCIES += pulseaudio +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-pulse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-soup +GST_PLUGINS_GOOD_DEPENDENCIES += libsoup +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-soup +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_SPEEX),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-speex +GST_PLUGINS_GOOD_DEPENDENCIES += speex +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-speex +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_WAVPACK),y) +GST_PLUGINS_GOOD_CONF_OPTS += --enable-wavpack +GST_PLUGINS_GOOD_DEPENDENCIES += wavpack +else +GST_PLUGINS_GOOD_CONF_OPTS += --disable-wavpack +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer/gst-plugins-ugly/Config.in b/package/gstreamer/gst-plugins-ugly/Config.in new file mode 100644 index 0000000000..3d133cf3f1 --- /dev/null +++ b/package/gstreamer/gst-plugins-ugly/Config.in @@ -0,0 +1,53 @@ +menuconfig BR2_PACKAGE_GST_PLUGINS_UGLY + bool "gst-plugins-ugly" + select BR2_PACKAGE_GST_PLUGINS_BASE + help + A set of well-supported plug-ins for GStreamer, but might pose + problems for distributors. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST_PLUGINS_UGLY + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_ASFDEMUX + bool "asfdemux" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_DVDLPCMDEC + bool "dvdlpcmdec" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_DVDSUB + bool "dvdsub" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_IEC958 + bool "iec958" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MPEGAUDIOPARSE + bool "mpegaudioparse" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MPEGSTREAM + bool "mpegstream" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_REALMEDIA + bool "realmedia" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_SYNAESTHESIA + bool "synaesthesia" + +comment "plugins with external dependencies (there may be more available)" + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_LAME + bool "lame (*.mp3 audio encoder)" + select BR2_PACKAGE_LAME + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MAD + bool "mad (*.mp3 audio)" + select BR2_PACKAGE_LIBID3TAG + select BR2_PACKAGE_LIBMAD + +config BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MPEG2DEC + bool "mpeg2dec" + select BR2_PACKAGE_LIBMPEG2 + +endif diff --git a/package/gstreamer/gst-plugins-ugly/gst-plugins-ugly.hash b/package/gstreamer/gst-plugins-ugly/gst-plugins-ugly.hash new file mode 100644 index 0000000000..56f2a8c4bd --- /dev/null +++ b/package/gstreamer/gst-plugins-ugly/gst-plugins-ugly.hash @@ -0,0 +1,5 @@ +# From http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-0.10.19.tar.xz.md5 +md5 ba26045c8c8c91f0d48d327ccf53ac0c gst-plugins-ugly-0.10.19.tar.xz +# Locally computed +sha256 4934f65ff892637e7efaf1cfe635779189dde429d0706f40c86a3aac476ea873 gst-plugins-ugly-0.10.19.tar.xz +sha256 2a8aa4cd019fab333f1f8377bf7afa426d3038a033361d90fab70c335e9a53e7 cdio-cd-text-api.patch diff --git a/package/gstreamer/gst-plugins-ugly/gst-plugins-ugly.mk b/package/gstreamer/gst-plugins-ugly/gst-plugins-ugly.mk new file mode 100644 index 0000000000..0f56164d46 --- /dev/null +++ b/package/gstreamer/gst-plugins-ugly/gst-plugins-ugly.mk @@ -0,0 +1,90 @@ +################################################################################ +# +# gst-plugins-ugly +# +################################################################################ + +GST_PLUGINS_UGLY_VERSION = 0.10.19 +GST_PLUGINS_UGLY_SOURCE = gst-plugins-ugly-$(GST_PLUGINS_UGLY_VERSION).tar.xz +GST_PLUGINS_UGLY_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-ugly +GST_PLUGINS_UGLY_PATCH = http://git.alpinelinux.org/cgit/aports/plain/main/gst-plugins-ugly0.10/cdio-cd-text-api.patch +# COPYING is in fact LGPLv2.1, but all of the code is v2+ +# (except for one test, xingmux) +GST_PLUGINS_UGLY_LICENSE = LGPLv2+, GPLv2+ (synaesthesia) +GST_PLUGINS_UGLY_LICENSE_FILES = COPYING + +GST_PLUGINS_UGLY_CONF_OPTS = \ + --disable-examples + +GST_PLUGINS_UGLY_DEPENDENCIES = gstreamer gst-plugins-base + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_ASFDEMUX),y) +GST_PLUGINS_UGLY_CONF_OPTS += --enable-asfdemux +else +GST_PLUGINS_UGLY_CONF_OPTS += --disable-asfdemux +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_DVDLPCMDEC),y) +GST_PLUGINS_UGLY_CONF_OPTS += --enable-dvdlpcmdec +else +GST_PLUGINS_UGLY_CONF_OPTS += --disable-dvdlpcmdec +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_DVDSUB),y) +GST_PLUGINS_UGLY_CONF_OPTS += --enable-dvdsub +else +GST_PLUGINS_UGLY_CONF_OPTS += --disable-dvdsub +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_IEC958),y) +GST_PLUGINS_UGLY_CONF_OPTS += --enable-iec958 +else +GST_PLUGINS_UGLY_CONF_OPTS += --disable-iec958 +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MPEGAUDIOPARSE),y) +GST_PLUGINS_UGLY_CONF_OPTS += --enable-mpegaudioparse +else +GST_PLUGINS_UGLY_CONF_OPTS += --disable-mpegaudioparse +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MPEGSTREAM),y) +GST_PLUGINS_UGLY_CONF_OPTS += --enable-mpegstream +else +GST_PLUGINS_UGLY_CONF_OPTS += --disable-mpegstream +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_REALMEDIA),y) +GST_PLUGINS_UGLY_CONF_OPTS += --enable-realmedia +else +GST_PLUGINS_UGLY_CONF_OPTS += --disable-realmedia +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_SYNAESTHESIA),y) +GST_PLUGINS_UGLY_CONF_OPTS += --enable-synaesthesia +else +GST_PLUGINS_UGLY_CONF_OPTS += --disable-synaesthesia +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_LAME),y) +GST_PLUGINS_UGLY_CONF_OPTS += --enable-lame +GST_PLUGINS_UGLY_DEPENDENCIES += lame +else +GST_PLUGINS_UGLY_CONF_OPTS += --disable-lame +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MAD),y) +GST_PLUGINS_UGLY_CONF_OPTS += --enable-mad +GST_PLUGINS_UGLY_DEPENDENCIES += libid3tag libmad +else +GST_PLUGINS_UGLY_CONF_OPTS += --disable-mad +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGLY_PLUGIN_MPEG2DEC),y) +GST_PLUGINS_UGLY_CONF_OPTS += --enable-mpeg2dec +GST_PLUGINS_UGLY_DEPENDENCIES += libmpeg2 +else +GST_PLUGINS_UGLY_CONF_OPTS += --disable-mpeg2dec +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer/gstreamer.mk b/package/gstreamer/gstreamer.mk new file mode 100644 index 0000000000..bc886c78a2 --- /dev/null +++ b/package/gstreamer/gstreamer.mk @@ -0,0 +1 @@ +include package/gstreamer/*/*.mk diff --git a/package/gstreamer/gstreamer/0001-bison3.patch b/package/gstreamer/gstreamer/0001-bison3.patch new file mode 100644 index 0000000000..f9ec52d95a --- /dev/null +++ b/package/gstreamer/gstreamer/0001-bison3.patch @@ -0,0 +1,24 @@ +Fix deprecation from bison 3.0+ +From http://comments.gmane.org/gmane.linux.lfs.beyond.devel/24620 + +Signed-off-by: Gustavo Zacarias + +diff -Nura gstreamer-0.10.36.orig/gst/parse/grammar.y gstreamer-0.10.36/gst/parse/grammar.y +--- gstreamer-0.10.36.orig/gst/parse/grammar.y 2013-10-04 09:52:21.685282055 -0300 ++++ gstreamer-0.10.36/gst/parse/grammar.y 2013-10-04 10:21:54.800211238 -0300 +@@ -26,7 +26,6 @@ + */ + + #define YYERROR_VERBOSE 1 +-#define YYLEX_PARAM scanner + + #define YYENABLE_NLS 0 + +@@ -648,6 +647,7 @@ + %right '.' + %left '!' '=' + ++%lex-param { void *scanner } + %parse-param { void *scanner } + %parse-param { graph_t *graph } + %pure-parser diff --git a/package/gstreamer/gstreamer/Config.in b/package/gstreamer/gstreamer/Config.in new file mode 100644 index 0000000000..eb1249ac5f --- /dev/null +++ b/package/gstreamer/gstreamer/Config.in @@ -0,0 +1,36 @@ +comment "gstreamer 0.10 needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GSTREAMER + bool "gstreamer 0.10" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + help + GStreamer is an open source multimedia framework. + + This 0.10.x version of GStreamer is incompatible with + GStreamer 1.X. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GSTREAMER + +config BR2_PACKAGE_GSTREAMER_GST_DEBUG + bool "enable gst-debug trace support" + default y + help + Enable support for the gst-debug tracing functionality in gstreamer. + This has limited CPU overhead, but does increase the rootfs size + somewhat. + +config BR2_PACKAGE_GSTREAMER_PLUGIN_REGISTRY + bool "enable plugin registry" + default y + help + Enable support for the GStreamer plugin registry. This may increase + the launch-time for a GStreamer application. + +endif diff --git a/package/gstreamer/gstreamer/gstreamer.hash b/package/gstreamer/gstreamer/gstreamer.hash new file mode 100644 index 0000000000..e652eaea90 --- /dev/null +++ b/package/gstreamer/gstreamer/gstreamer.hash @@ -0,0 +1,2 @@ +# From http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.36.tar.xz.md5 +md5 15389c73e091b1dda915279c388b9cb2 gstreamer-0.10.36.tar.xz diff --git a/package/gstreamer/gstreamer/gstreamer.mk b/package/gstreamer/gstreamer/gstreamer.mk new file mode 100644 index 0000000000..f2bde30d29 --- /dev/null +++ b/package/gstreamer/gstreamer/gstreamer.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# gstreamer +# +################################################################################ + +GSTREAMER_VERSION = 0.10.36 +GSTREAMER_SOURCE = gstreamer-$(GSTREAMER_VERSION).tar.xz +GSTREAMER_SITE = http://gstreamer.freedesktop.org/src/gstreamer +GSTREAMER_INSTALL_STAGING = YES +# COPYING is in fact v2, but most of the code is v2.1+ +GSTREAMER_LICENSE = LGPLv2.1+ +GSTREAMER_LICENSE_FILES = COPYING + +# Checking if unaligned memory access works correctly cannot be done when cross +# compiling. For the following architectures there is no information available +# in the configure script. +ifeq ($(BR2_arc)$(BR2_xtensa)$(BR2_microblaze)$(BR2_nios2),y) +GSTREAMER_CONF_ENV = as_cv_unaligned_access=no +endif +ifeq ($(BR2_aarch64),y) +GSTREAMER_CONF_ENV = as_cv_unaligned_access=yes +endif + +GSTREAMER_CONF_OPTS = \ + --disable-examples \ + --disable-tests \ + --disable-failing-tests \ + --disable-loadsave \ + $(if $(BR2_PACKAGE_GSTREAMER_GST_DEBUG),,--disable-gst-debug) \ + $(if $(BR2_PACKAGE_GSTREAMER_PLUGIN_REGISTRY),,--disable-registry) + +GSTREAMER_DEPENDENCIES = libglib2 host-pkgconf host-bison host-flex \ + $(if $(BR2_PACKAGE_LIBXML2),libxml2) + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/Config.in b/package/gstreamer1/Config.in new file mode 100644 index 0000000000..ea35ecc9aa --- /dev/null +++ b/package/gstreamer1/Config.in @@ -0,0 +1,13 @@ +# Gstreamer 1.x & Plugins +source "package/gstreamer1/gstreamer1/Config.in" + +if BR2_PACKAGE_GSTREAMER1 +source "package/gstreamer1/gst1-plugins-base/Config.in" +source "package/gstreamer1/gst1-plugins-good/Config.in" +source "package/gstreamer1/gst1-plugins-bad/Config.in" +source "package/gstreamer1/gst1-plugins-ugly/Config.in" +source "package/gstreamer1/gst1-imx/Config.in" +source "package/gstreamer1/gst1-libav/Config.in" +source "package/gstreamer1/gst1-validate/Config.in" +source "package/gstreamer1/gst-omx/Config.in" +endif diff --git a/package/gstreamer1/gst-omx/Config.in b/package/gstreamer1/gst-omx/Config.in new file mode 100644 index 0000000000..d2e477648b --- /dev/null +++ b/package/gstreamer1/gst-omx/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_GST_OMX + bool "gst-omx" + depends on BR2_PACKAGE_HAS_LIBOPENMAX + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + GStreamer plug-in to use OpenMAX API. + + http://cgit.freedesktop.org/gstreamer/gst-omx + +comment "gst-omx requires a OpenMAX implementation" + depends on !BR2_PACKAGE_HAS_LIBOPENMAX diff --git a/package/gstreamer1/gst-omx/gst-omx.mk b/package/gstreamer1/gst-omx/gst-omx.mk new file mode 100644 index 0000000000..f008767661 --- /dev/null +++ b/package/gstreamer1/gst-omx/gst-omx.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# gst-omx +# +################################################################################ + +GST_OMX_VERSION = 1.2.0 +GST_OMX_SOURCE = gst-omx-$(GST_OMX_VERSION).tar.xz +GST_OMX_SITE = http://gstreamer.freedesktop.org/src/gst-omx + +GST_OMX_LICENSE = LGPLv2.1 +GST_OMX_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +GST_OMX_CONF_OPTS = \ + --with-omx-target=rpi +GST_OMX_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) \ + -I$(STAGING_DIR)/usr/include/IL \ + -I$(STAGING_DIR)/usr/include/interface/vcos/pthreads \ + -I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux" +endif + +ifeq ($(BR2_PACKAGE_BELLAGIO),y) +GST_OMX_CONF_OPTS = \ + --with-omx-target=bellagio +GST_OMX_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) \ + -DOMX_VERSION_MAJOR=1 \ + -DOMX_VERSION_MINOR=1 \ + -DOMX_VERSION_REVISION=2 \ + -DOMX_VERSION_STEP=0" +endif + +GST_OMX_DEPENDENCIES = gstreamer1 gst1-plugins-base libopenmax + +# adjust library paths to where buildroot installs them +define GST_OMX_FIXUP_CONFIG_PATHS + find $(@D)/config -name gstomx.conf | \ + xargs $(SED) 's|/usr/local|/usr|g' -e 's|/opt/vc|/usr|g' +endef + +GST_OMX_POST_PATCH_HOOKS += GST_OMX_FIXUP_CONFIG_PATHS + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/gst1-imx/Config.in b/package/gstreamer1/gst1-imx/Config.in new file mode 100644 index 0000000000..0084483d1e --- /dev/null +++ b/package/gstreamer1/gst1-imx/Config.in @@ -0,0 +1,23 @@ +comment "gst1-imx needs an imx-specific Linux kernel to be built" + depends on BR2_arm && !BR2_LINUX_KERNEL + +config BR2_PACKAGE_GST1_IMX + bool "gst1-imx" + depends on BR2_LINUX_KERNEL + depends on BR2_arm # Only relevant for i.MX + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + This is a set of GStreamer 1.0 plugins for plugins for Freescale's + i.MX platforms, which make use of the i.MX multimedia capabilities. + + This software supports only the i.MX6 SoC family and requires a + kernel that includes the i.MX6 specific headers to be built. + + The IPU and PXP plugins are always built. + The V4L2 plugin is built when BR2_PACKAGE_GST1_PLUGINS_BAD is enabled. + The VPU plugin is built when BR2_PACKAGE_LIBIMXVPUAPI is enabled. + The EGL plugin is built when BR2_PACKAGE_IMX_GPU_VIV is enabled. + The G2D plugin is built when BR2_PACKAGE_IMX_GPU_VIV_G2D is enabled. + The MP3 plugin is built when BR2_PACKAGE_LIBFSLCODEC is enabled. + + https://github.com/Freescale/gstreamer-imx diff --git a/package/gstreamer1/gst1-imx/gst1-imx.hash b/package/gstreamer1/gst1-imx/gst1-imx.hash new file mode 100644 index 0000000000..03e17299ba --- /dev/null +++ b/package/gstreamer1/gst1-imx/gst1-imx.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 df34f080e24ac8f1619780aa5ad4e6ab1333f822cd2bf5fcb380b28c97248810 gst1-imx-0.12.0.tar.gz diff --git a/package/gstreamer1/gst1-imx/gst1-imx.mk b/package/gstreamer1/gst1-imx/gst1-imx.mk new file mode 100644 index 0000000000..650e097592 --- /dev/null +++ b/package/gstreamer1/gst1-imx/gst1-imx.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# gst1-imx +# +################################################################################ + +GST1_IMX_VERSION = 0.12.0 +GST1_IMX_SITE = $(call github,Freescale,gstreamer-imx,$(GST1_IMX_VERSION)) + +GST1_IMX_LICENSE = LGPLv2+ +GST1_IMX_LICENSE_FILES = LICENSE + +GST1_IMX_INSTALL_STAGING = YES + +GST1_IMX_DEPENDENCIES += \ + host-pkgconf \ + host-python \ + gstreamer1 \ + gst1-plugins-base + +# needs access to imx-specific kernel headers +GST1_IMX_DEPENDENCIES += linux +GST1_IMX_CONF_OPTS += --prefix="/usr" \ + --kernel-headers="$(LINUX_DIR)/include" + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD),y) +GST1_IMX_DEPENDENCIES += gst1-plugins-bad +endif + +ifeq ($(BR2_PACKAGE_LIBFSLCODEC),y) +GST1_IMX_DEPENDENCIES += libfslcodec +endif + +ifeq ($(BR2_PACKAGE_LIBIMXVPUAPI),y) +GST1_IMX_DEPENDENCIES += libimxvpuapi +endif + +ifeq ($(BR2_PACKAGE_IMX_GPU_VIV),y) +GST1_IMX_DEPENDENCIES += imx-gpu-viv +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +GST1_IMX_DEPENDENCIES += xlib_libX11 +GST1_IMX_CONF_OPTS += --egl-platform=x11 +else +ifeq ($(BR2_PACKAGE_WAYLAND),y) +GST1_IMX_DEPENDENCIES += wayland +GST1_IMX_CONF_OPTS += --egl-platform=wayland +else +GST1_IMX_CONF_OPTS += --egl-platform=fb +endif +endif +endif + +define GST1_IMX_CONFIGURE_CMDS + cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + $(HOST_DIR)/usr/bin/python2 ./waf configure $(GST1_IMX_CONF_OPTS) +endef + +define GST1_IMX_BUILD_CMDS + cd $(@D); \ + $(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS) +endef + +define GST1_IMX_INSTALL_TARGET_CMDS + cd $(@D); \ + $(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(TARGET_DIR) \ + install +endef + +$(eval $(generic-package)) diff --git a/package/gstreamer1/gst1-libav/Config.in b/package/gstreamer1/gst1-libav/Config.in new file mode 100644 index 0000000000..23d78b6ad1 --- /dev/null +++ b/package/gstreamer1/gst1-libav/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_GST1_LIBAV + bool "gst1-libav" + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_SWSCALE + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + GStreamer plugin (formerly gst-ffmpeg). + + This package contains GStreamer plugins based on + the libav project. + + The codecs, muxers, bitstreams and filters to build can be + selected in the ffmpeg package. + + http://gstreamer.freedesktop.org/ diff --git a/package/gstreamer1/gst1-libav/gst1-libav.hash b/package/gstreamer1/gst1-libav/gst1-libav.hash new file mode 100644 index 0000000000..157c94f22f --- /dev/null +++ b/package/gstreamer1/gst1-libav/gst1-libav.hash @@ -0,0 +1,2 @@ +# From http://gstreamer.freedesktop.org/src/gst-libav/gst-libav-1.8.1.tar.xz.sha256sum +sha256 44a49108c3531b5ac4f346a2247cd7fbafb0e8ab394394cb6d75a70300b38933 gst-libav-1.8.1.tar.xz diff --git a/package/gstreamer1/gst1-libav/gst1-libav.mk b/package/gstreamer1/gst1-libav/gst1-libav.mk new file mode 100644 index 0000000000..65d18624ae --- /dev/null +++ b/package/gstreamer1/gst1-libav/gst1-libav.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# gst1-libav +# +################################################################################ + +GST1_LIBAV_VERSION = 1.8.1 +GST1_LIBAV_SOURCE = gst-libav-$(GST1_LIBAV_VERSION).tar.xz +GST1_LIBAV_SITE = http://gstreamer.freedesktop.org/src/gst-libav +GST1_LIBAV_CONF_OPTS = --with-system-libav +GST1_LIBAV_DEPENDENCIES = \ + host-pkgconf ffmpeg gstreamer1 gst1-plugins-base \ + $(if $(BR2_PACKAGE_BZIP2),bzip2) \ + $(if $(BR2_PACKAGE_XZ),xz) +GST1_LIBAV_LICENSE = GPLv2+ +GST1_LIBAV_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/gst1-plugins-bad/0001-use-gettext-0.18.patch b/package/gstreamer1/gst1-plugins-bad/0001-use-gettext-0.18.patch new file mode 100644 index 0000000000..ebf4567b00 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-bad/0001-use-gettext-0.18.patch @@ -0,0 +1,17 @@ +Use newer version of gettext to match current buildroot gettext. + +Signed-off-by: Spenser Gilliland +---- +Index: gst1-plugins-bad-1.1.1/po/Makefile.in.in +=================================================================== +--- gst1-plugins-bad-1.1.1.orig/po/Makefile.in.in ++++ gst1-plugins-bad-1.1.1/po/Makefile.in.in +@@ -9,7 +9,7 @@ + # General Public License and is *not* in the public domain. + # + # Origin: gettext-0.17 +-GETTEXT_MACRO_VERSION = 0.17 ++GETTEXT_MACRO_VERSION = 0.18 + + PACKAGE = @PACKAGE@ + VERSION = @VERSION@ diff --git a/package/gstreamer1/gst1-plugins-bad/Config.in b/package/gstreamer1/gst1-plugins-bad/Config.in new file mode 100644 index 0000000000..facfe58dcc --- /dev/null +++ b/package/gstreamer1/gst1-plugins-bad/Config.in @@ -0,0 +1,686 @@ +menuconfig BR2_PACKAGE_GST1_PLUGINS_BAD + bool "gst1-plugins-bad" + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + A set of plug-ins for GStreamer that may be of poor quality or + lacking some features. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST1_PLUGINS_BAD + +comment "libraries with external dependencies" + +menuconfig BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL + bool "opengl" + depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES + +if BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL + +config BR2_PACKAGE_GST1_PLUGINS_BAD_HAS_LIB_OPENGL + def_bool BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_WINDOW + +comment "The opengl library needs an API, a platform and a window system" + depends on !BR2_PACKAGE_GST1_PLUGINS_BAD_HAS_LIB_OPENGL + +comment "APIs" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_API + bool + +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_OPENGL + bool "opengl" + default y + depends on BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_LIBGLU + select BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_API + +comment "opengl needs an OpenGL backend" + depends on !BR2_PACKAGE_HAS_LIBGL + +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_GLES2 + bool "gles2" + default y + depends on BR2_PACKAGE_HAS_LIBGLES + select BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_API + +comment "gles2 needs an OpenGL ES backend" + depends on !BR2_PACKAGE_HAS_LIBGLES + +comment "Platforms" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_PLATFORM + bool + +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_GLX + bool "glx" + default y + depends on BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_OPENGL + depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR # mesa needs big X + depends on !BR2_PACKAGE_RPI_USERLAND # x11 + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XPROTO_GLPROTO + select BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_X11 + select BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_PLATFORM + help + OpenGL Extension to the X Window System + +comment "glx not supported with rpi-userland" + depends on BR2_PACKAGE_RPI_USERLAND + +comment "glx needs the opengl API and modular X.org" + depends on !BR2_PACKAGE_RPI_USERLAND && \ + (!BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_OPENGL || \ + !BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR) + +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_EGL + bool "egl" + default y + depends on BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_API + depends on BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_PLATFORM + +comment "egl needs an API and an EGL backend" + depends on !BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_API || \ + !BR2_PACKAGE_HAS_LIBEGL + +comment "Window systems" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_WINDOW + bool + +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_X11 + bool "x11" + default y + depends on BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_PLATFORM + depends on !BR2_PACKAGE_RPI_USERLAND + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_WINDOW + +comment "x11 not supported with rpi-userland" + depends on BR2_PACKAGE_RPI_USERLAND + +comment "x11 needs a platform and X.org" + depends on !BR2_PACKAGE_RPI_USERLAND && \ + (!BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_PLATFORM || \ + !BR2_PACKAGE_XORG7) + +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_WAYLAND + bool "wayland" + default y + depends on BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_EGL + depends on BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_WINDOW + +comment "wayland needs the egl platform and the wayland package" + depends on !BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_EGL || \ + !BR2_PACKAGE_WAYLAND + +config BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_DISPMANX + bool "dispmanx" + default y + depends on BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_EGL + depends on BR2_PACKAGE_RPI_USERLAND + select BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_HAS_WINDOW + help + Raspberry Pi's Dispmanx windowing system + +comment "dispmanx needs the egl platform and rpi-userland" + depends on !BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_EGL || \ + !BR2_PACKAGE_RPI_USERLAND + +endif + +comment "opengl needs an OpenGL or OpenGL ES backend" + depends on !BR2_PACKAGE_HAS_LIBGL && !BR2_PACKAGE_HAS_LIBGLES + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ACCURIP + bool "accurip" + help + Accurip plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ADPCMDEC + bool "adpcmdec" + help + ADPCM decoder + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ADPCMENC + bool "adpcmenc" + help + ADPCM encoder + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AIFF + bool "aiff" + help + Create and parse Audio interchange File Format (AIFF) files + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ASFMUX + bool "asfmux" + help + ASF Muxer Plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOFXBAD + bool "audiofxbad" + help + Audio filters plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOMIXER + bool "audiomixer" + help + Audio mixer plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_COMPOSITOR + bool "compositor" + help + Video compositor plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOVISUALIZERS + bool "audiovisualizers" + help + Creates video visualizations of audio input + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUTOCONVERT + bool "autoconvert" + help + Selects convertor element based on caps + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BAYER + bool "bayer" + help + Elements to convert Bayer images + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CAMERABIN2 + bool "camerabin2" + help + Take image snapshots and record movies from camera + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CDXAPARSE + bool "cdxaparse" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_COLOREFFECTS + bool "coloreffects" + help + Color Look-up Table filters + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DATAURISRC + bool "dataurisrc" + help + data: URI source + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DCCP + bool "dccp" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS + bool "debugutils" + help + Collection of elements that may or may not be useful for debugging + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DTLS + bool "dtls" + select BR2_PACKAGE_OPENSSL + help + DTLS plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVBSUBOVERLAY + bool "dvdsuboverlay" + help + DVB subtitle renderer plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVDSPU + bool "dvdspu" + help + DVD Sub-picture Overlay element + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FACEOVERLAY + bool "faceoverlay" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FESTIVAL + bool "festival" + help + Synthesizes plain text into audio + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FIELDANALYSIS + bool "fieldanalysis" + help + Video field analysis + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FREEVERB + bool "freeverb" + help + Reverberation/room effect + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FREI0R + bool "frei0r" + help + frei0r plugin library + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GAUDIEFFECTS + bool "gaudieffects" + help + Gaudi video effects + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GEOMETRICTRANSFORM + bool "geometrictransform" + help + Various geometric image transform elements + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GDP + bool "gdp" + help + Payload/depayload GDP packets + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HDVPARSE + bool "hdvparse" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ID3TAG + bool "id3tag" + help + ID3 v1 and v2 muxing plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_INTER + bool "inter" + help + plugin for inter-pipeline communication + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_INTERLACE + bool "interlace" + help + Create an interlaced video stream + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IVFPARSE + bool "ivfparse" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IVTC + bool "ivtc" + help + Inverse Telecine plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_JP2KDECIMATOR + bool "jp2kdecimator" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_JPEGFORMAT + bool "jpegformat" + help + JPEG interchange format plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIBRFB + bool "librfb" + help + Connects to a VNC server and decodes RFB stream + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIVEADDER + bool "liveadder" + help + Adds multiple live discontinuous streams + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MIDI + bool "midi" + help + MIDI plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGDEMUX + bool "mpegdemux" + help + MPEG-PS demuxer + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGTSDEMUX + bool "mpegtsdemux" + help + MPEG TS demuxer + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGTSMUX + bool "mpegtsmux" + help + MPEG-TS muxer + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGPSMUX + bool "mpegpsmux" + help + MPEG-PS muxer + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MVE + bool "mve" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MXF + bool "mxf" + help + MXF plugin library + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NETSIM + bool "netsim" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NUVDEMUX + bool "nuvdemux" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ONVIF + bool "onvif" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PATCHDETECT + bool "patchdetect" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PCAPPARSE + bool "pcapparse" + help + Element parsing raw pcap streams + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PNM + bool "pnm" + help + PNM plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RAWPARSE + bool "rawparse" + help + Parses byte streams into raw frames + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REMOVESILENCE + bool "removesilence" + help + Removes silence from an audio stream + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RTMP + bool "rtmp" + select BR2_PACKAGE_RTMPDUMP + help + RTMP plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDI + bool "sdi" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDP + bool "sdp" + help + configure streaming sessions using SDP + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SEGMENTCLIP + bool "segmentclip" + help + Segment clip elements + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SIREN + bool "siren" + help + Siren encoder/decoder/payloader/depayloader plugins + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SMOOTH + bool "smooth" + help + Apply a smooth filter to an image + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SPEED + bool "speed" + help + Set speed/pitch on audio/raw streams (resampler) + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SUBENC + bool "subenc" + help + subtitle encoders + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_STEREO + bool "stereo" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_TTA + bool "tta" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOFILTERS + bool "videofilters" + help + Video filters in gst-plugins-bad + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOFRAME_AUDIOLEVEL + bool "videoframe_audiolevel" + help + videoframe_audiolevel + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOMEASURE + bool "videomeasure" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOPARSERS + bool "videoparsers" + help + videoparsers + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOSIGNAL + bool "videosignal" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VMNC + bool "vmnc" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_Y4M + bool "y4m" + help + Demuxes/decodes YUV4MPEG streams + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_YADIF + bool "yadif" + help + YADIF deinterlacing filter + +comment "plugins with external dependencies" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SHM + bool "shm" + help + shared memory sink source + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VCD + bool "vcd" + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_APEXSINK + bool "apexsink" + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ASSRENDER + bool "assrender" + select BR2_PACKAGE_LIBASS + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VOAACENC + bool "voaacenc" + select BR2_PACKAGE_VO_AACENC + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BZ2 + bool "bz2" + select BR2_PACKAGE_BZIP2 + help + Compress or decompress streams + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CURL + bool "curl" + select BR2_PACKAGE_LIBCURL + help + libcurl-based elements + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DASH + bool "dash" + select BR2_PACKAGE_LIBXML2 + help + DASH demuxer plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DECKLINK + depends on BR2_INSTALL_LIBSTDCPP + bool "decklink" + help + Blackmagic Decklink plugin + +comment "decklink needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DIRECTFB + bool "directfb" + depends on BR2_PACKAGE_DIRECTFB + default y + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WAYLAND + bool "wayland" + depends on BR2_PACKAGE_WAYLAND + default y + help + Wayland Video Sink + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WEBP + bool "webp" + select BR2_PACKAGE_WEBP + help + Webp image format plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FAAD + bool "faad" + select BR2_PACKAGE_FAAD2 + help + Free AAC Decoder (FAAD) + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FBDEV + bool "fbdev" + help + Linux framebuffer video sink + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIBMMS + bool "libmms" + depends on BR2_USE_WCHAR # libmms -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libmms -> libglib2 + select BR2_PACKAGE_LIBMMS + help + Microsoft Multi Media Server streaming protocol support + +comment "libmms needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEG2ENC + bool "mpeg2enc" + select BR2_PACKAGE_LIBMPEG2 + help + High-quality MPEG-1/2 video encoder + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MUSEPACK + bool "musepack" + select BR2_PACKAGE_MUSEPACK + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NEON + bool "neon" + select BR2_PACKAGE_NEON + help + lib neon http client src + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENAL + bool "openal" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_PAKCAGE_OPENAL_ARCH_SUPPORTS + select BR2_PACKAGE_OPENAL + +comment "openal plugin needs a toolchain w/ NPTL, C++" + depends on BR2_PAKCAGE_OPENAL_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL \ + || !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENCV + bool "opencv" + depends on BR2_PACKAGE_OPENCV + # Remove the following opencv modules when gstreamer fixes the + # problem of including the old "cv.h" header + # bug: https://bugzilla.gnome.org/show_bug.cgi?id=725163 + select BR2_PACKAGE_OPENCV_LIB_CALIB3D + select BR2_PACKAGE_OPENCV_LIB_CONTRIB + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_FLANN + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_LEGACY + select BR2_PACKAGE_OPENCV_LIB_ML + select BR2_PACKAGE_OPENCV_LIB_OBJDETECT + select BR2_PACKAGE_OPENCV_LIB_VIDEO + help + GStreamer OpenCV Plugins + +comment "opencv plugin needs OpenCV-2.4" + depends on !BR2_PACKAGE_OPENCV + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENH264 + bool "openh264" + depends on BR2_PACKAGE_LIBOPENH264_ARCH_SUPPORTS + depends on BR2_INSTALL_LIBSTDCPP # libopenh264 + depends on !BR2_STATIC_LIBS # libopenh264 + depends on BR2_TOOLCHAIN_HAS_THREADS # libopenh264 + select BR2_PACKAGE_LIBOPENH264 + help + OpenH264 based encoding/decoding plugin + +comment "openh264 plugin needs a toolchain w/ C++, dynamic library, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS + depends on BR2_PACKAGE_LIBOPENH264_ARCH_SUPPORTS + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENJPEG + bool "openjpeg" + select BR2_PACKAGE_OPENJPEG + help + GStreamer OpenJPEG plugin + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPUS + bool "opus" + select BR2_PACKAGE_OPUS + help + OPUS plugin library + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RSVG + bool "rsvg" + depends on BR2_INSTALL_LIBSTDCPP # librsvg -> pango + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # librsvg -> pango -> harfbuzz + select BR2_PACKAGE_LIBRSVG + help + RSVG plugin library + +comment "rsvg plugin needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GL + bool "gl" + default y + depends on BR2_PACKAGE_GST1_PLUGINS_BAD_HAS_LIB_OPENGL + +comment "gl needs the gst1-plugins-bad opengl library" + depends on !BR2_PACKAGE_GST1_PLUGINS_BAD_HAS_LIB_OPENGL + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDL + bool "sdl" + select BR2_PACKAGE_SDL + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SNDFILE + bool "sndfile" + select BR2_PACKAGE_LIBSNDFILE + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVB + bool "dvb" + select BR2_PACKAGE_DTV_SCAN_TABLES + # FEC_2_5 / QAM_4_NR definitions + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + help + DVB elements + +comment "dvb needs a toolchain w/ headers >= 3.7" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HLS + bool "hls" + select BR2_PACKAGE_GNUTLS + help + Fragmented streaming plugins + +config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_X265 + bool "x265" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # x265 + select BR2_PACKAGE_X265 + help + x265 encoding plugin + +comment "x265 needs a toolchain w/ C++, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS + +endif diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.hash b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.hash new file mode 100644 index 0000000000..a5cac89d34 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.hash @@ -0,0 +1,2 @@ +# From http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.8.1.tar.xz.sha256sum +sha256 0bbd58f363734fc0c4a620b2d6fb01d427fdafdbda7b90b4e15d03b751ca40f5 gst-plugins-bad-1.8.1.tar.xz diff --git a/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk new file mode 100644 index 0000000000..e2446a3c25 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-bad/gst1-plugins-bad.mk @@ -0,0 +1,808 @@ +################################################################################ +# +# gst1-plugins-bad +# +################################################################################ + +GST1_PLUGINS_BAD_VERSION = 1.8.1 +GST1_PLUGINS_BAD_SOURCE = gst-plugins-bad-$(GST1_PLUGINS_BAD_VERSION).tar.xz +GST1_PLUGINS_BAD_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-bad +GST1_PLUGINS_BAD_INSTALL_STAGING = YES +GST1_PLUGINS_BAD_LICENSE_FILES = COPYING COPYING.LIB +# Unknown and GPL licensed plugins will append to GST1_PLUGINS_BAD_LICENSE if +# enabled. +GST1_PLUGINS_BAD_LICENSE = LGPLv2+ LGPLv2.1+ + +GST1_PLUGINS_BAD_AUTORECONF = YES +GST1_PLUGINS_BAD_AUTORECONF_OPTS = -I $(@D)/common/m4 +GST1_PLUGINS_BAD_GETTEXTIZE = YES + +GST1_PLUGINS_BAD_CONF_OPTS = \ + --disable-examples \ + --disable-valgrind \ + --disable-directsound \ + --disable-wsapi \ + --disable-direct3d \ + --disable-direct3d9 \ + --disable-winks \ + --disable-android_media \ + --disable-apple_media \ + --disable-sdltest \ + --disable-wininet \ + --disable-acm + +# Options which require currently unpackaged libraries +GST1_PLUGINS_BAD_CONF_OPTS += \ + --disable-avc \ + --disable-opensles \ + --disable-uvch264 \ + --disable-voamrwbenc \ + --disable-bs2b \ + --disable-chromaprint \ + --disable-dash \ + --disable-dc1394 \ + --disable-dts \ + --disable-resindvd \ + --disable-faac \ + --disable-flite \ + --disable-gsm \ + --disable-fluidsynth \ + --disable-kate \ + --disable-ladspa \ + --disable-lv2 \ + --disable-libde265 \ + --disable-strp \ + --disable-linsys \ + --disable-modplug \ + --disable-mimic \ + --disable-mplex \ + --disable-nas \ + --disable-ofa \ + --disable-openexr \ + --disable-openni2 \ + --disable-pvr \ + --disable-libvisual \ + --disable-timidity \ + --disable-teletextdec \ + --disable-wildmidi \ + --disable-smoothstreaming \ + --disable-soundtouch \ + --disable-spc \ + --disable-gme \ + --disable-xvid \ + --disable-vdpau \ + --disable-sbc \ + --disable-schro \ + --disable-zbar \ + --disable-rtmp \ + --disable-spandsp \ + --disable-gsettings \ + --disable-sndio \ + --disable-hls \ + --disable-gtk3 \ + --disable-qt + +GST1_PLUGINS_BAD_DEPENDENCIES = gst1-plugins-base gstreamer1 + +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +# RPI has odd locations for several required headers. +GST1_PLUGINS_BAD_CONF_ENV += \ + CPPFLAGS="$(TARGET_CPPFLAGS) \ + -I$(STAGING_DIR)/usr/include/IL \ + -I$(STAGING_DIR)/usr/include/interface/vcos/pthreads \ + -I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux" +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_OPENGL),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-opengl +GST1_PLUGINS_BAD_DEPENDENCIES += libgl libglu +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-opengl +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_GLES2),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-gles2 +GST1_PLUGINS_BAD_DEPENDENCIES += libgles +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-gles2 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_GLX),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-glx +GST1_PLUGINS_BAD_DEPENDENCIES += xproto_glproto xlib_libXrender +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-glx +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_EGL),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-egl +GST1_PLUGINS_BAD_DEPENDENCIES += libegl +GST1_PLUGINS_BAD_CONF_ENV += \ + CPPFLAGS="$(TARGET_CPPFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags egl`" \ + LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs egl`" +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-egl +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_X11),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-x11 +GST1_PLUGINS_BAD_DEPENDENCIES += xlib_libX11 xlib_libXext +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-x11 +endif + +ifneq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_WAYLAND)$(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WAYLAND),) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-wayland +GST1_PLUGINS_BAD_DEPENDENCIES += wayland +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-wayland +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_LIB_OPENGL_DISPMANX),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-dispmanx +GST1_PLUGINS_BAD_DEPENDENCIES += rpi-userland +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-dispmanx +endif + +ifeq ($(BR2_PACKAGE_ORC),y) +GST1_PLUGINS_BAD_DEPENDENCIES += orc +GST1_PLUGINS_BAD_CONF_OPTS += --enable-orc +endif + +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y) +GST1_PLUGINS_BAD_DEPENDENCIES += bluez_utils +GST1_PLUGINS_BAD_CONF_OPTS += --enable-bluez +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-bluez +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ACCURIP),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-accurip +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-accurip +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ADPCMDEC),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-adpcmdec +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-adpcmdec +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ADPCMENC),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-adpcmenc +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-adpcmenc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AIFF),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-aiff +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-aiff +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ASFMUX),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-asfmux +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-asfmux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOFXBAD),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-audiofxbad +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-audiofxbad +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOMIXER),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-audiomixer +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-audiomixer +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_COMPOSITOR),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-compositor +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-compositor +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUDIOVISUALIZERS),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-audiovisualizers +GST1_PLUGINS_BAD_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-audiovisualizers +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_AUTOCONVERT),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-autoconvert +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-autoconvert +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BAYER),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-bayer +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-bayer +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CAMERABIN2),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-camerabin2 +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-camerabin2 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CDXAPARSE),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-cdxaparse +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-cdxaparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_COLOREFFECTS),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-coloreffects +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-coloreffects +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DATAURISRC),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-dataurisrc +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-dataurisrc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DCCP),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-dccp +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-dccp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DEBUGUTILS),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-debugutils +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-debugutils +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DTLS),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-dtls +GST1_PLUGINS_BAD_DEPENDENCIES += openssl +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-dtls +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVBSUBOVERLAY),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-dvbsuboverlay +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-dvbsuboverlay +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVDSPU),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-dvdspu +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-dvdspu +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FACEOVERLAY),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-faceoverlay +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-faceoverlay +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FESTIVAL),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-festival +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-festival +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FIELDANALYSIS),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-fieldanalysis +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-fieldanalysis +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FREEVERB),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-freeverb +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-freeverb +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FREI0R),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-frei0r +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-frei0r +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GAUDIEFFECTS),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-gaudieffects +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-gaudieffects +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GEOMETRICTRANSFORM),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-geometrictransform +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-geometrictransform +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GDP),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-gdp +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-gdp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HDVPARSE),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-hdvparse +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-hdvparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ID3TAG),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-id3tag +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-id3tag +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_INTER),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-inter +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-inter +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_INTERLACE),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-interlace +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-interlace +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IVFPARSE),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-ivfparse +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-ivfparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_IVTC),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-ivtc +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-ivtc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_JP2KDECIMATOR),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-jp2kdecimator +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-jp2kdecimator +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_JPEGFORMAT),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-jpegformat +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-jpegformat +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIBRFB),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-librfb +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-librfb +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIVEADDER),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-liveadder +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-liveadder +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MIDI),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-midi +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-midi +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGDEMUX),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-mpegdemux +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-mpegdemux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGTSDEMUX),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-mpegtsdemux +GST1_PLUGINS_BAD_HAS_UNKNOWN_LICENSE = y +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-mpegtsdemux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGTSMUX),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-mpegtsmux +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-mpegtsmux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEGPSMUX),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-mpegpsmux +GST1_PLUGINS_BAD_HAS_UNKNOWN_LICENSE = y +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-mpegpsmux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MVE),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-mve +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-mve +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MXF),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-mxf +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-mxf +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_NETSIM),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-netsim +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-netsim +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NUVDEMUX),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-nuvdemux +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-nuvdemux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ONVIF),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-onvif +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-onvif +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PATCHDETECT),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-patchdetect +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-patchdetect +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PCAPPARSE),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-pcapparse +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-pcapparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_PNM),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-pnm +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-pnm +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RAWPARSE),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-rawparse +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-rawparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_REMOVESILENCE),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-removesilence +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-removesilence +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RTMP),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-rtmp +GST1_PLUGINS_BAD_DEPENDENCIES += rtmpdump +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-rtmp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDI),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-sdi +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-sdi +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDP),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-sdp +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-sdp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SEGMENTCLIP),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-segmentclip +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-segmentclip +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SIREN),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-siren +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-siren +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SMOOTH),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-smooth +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-smooth +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SPEED),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-speed +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-speed +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SUBENC),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-subenc +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-subenc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_STEREO),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-stereo +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-stereo +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_TTA),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-tta +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-tta +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOFILTERS),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-videofilters +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-videofilters +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOFRAME_AUDIOLEVEL),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-videoframe_audiolevel +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-videoframe_audiolevel +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOMEASURE),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-videomeasure +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-videomeasure +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOPARSERS),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-videoparsers +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-videoparsers +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VIDEOSIGNAL),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-videosignal +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-videosignal +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VMNC),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-vmnc +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-vmnc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_Y4M),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-y4m +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-y4m +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_YADIF),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-yadif +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-yadif +endif + +# Plugins with dependencies + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SHM),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-shm +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-shm +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VCD),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-vcd +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-vcd +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_APEXSINK),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-apexsink +GST1_PLUGINS_BAD_DEPENDENCIES += openssl +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-apexsink +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_ASSRENDER),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-assrender +GST1_PLUGINS_BAD_DEPENDENCIES += libass +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-assrender +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_VOAACENC),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-voaacenc +GST1_PLUGINS_BAD_DEPENDENCIES += vo-aacenc +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-voaacenc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_BZ2),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-bz2 +GST1_PLUGINS_BAD_DEPENDENCIES += bzip2 +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-bz2 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_CURL),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-curl +GST1_PLUGINS_BAD_DEPENDENCIES += libcurl +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-curl +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DASH),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-dash +GST1_PLUGINS_BAD_DEPENDENCIES += libxml2 +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-dash +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DECKLINK),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-decklink +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-decklink +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_WEBP),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-webp +GST1_PLUGINS_BAD_DEPENDENCIES += webp +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-webp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DIRECTFB),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-directfb +GST1_PLUGINS_BAD_DEPENDENCIES += directfb +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-directfb +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FAAD),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-faad +GST1_PLUGINS_BAD_DEPENDENCIES += faad2 +GST1_PLUGINS_BAD_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-faad +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_FBDEV),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-fbdev +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-fbdev +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_LIBMMS),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-libmms +GST1_PLUGINS_BAD_DEPENDENCIES += libmms +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-libmms +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MPEG2ENC),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-mpeg2enc +GST1_PLUGINS_BAD_DEPENDENCIES += libmpeg2 +GST1_PLUGINS_BAD_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-mpeg2enc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_MUSEPACK),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-musepack +GST1_PLUGINS_BAD_DEPENDENCIES += musepack +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-musepack +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NEON),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-neon +GST1_PLUGINS_BAD_DEPENDENCIES += neon +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-neon +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENAL),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-openal +GST1_PLUGINS_BAD_DEPENDENCIES += openal +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-openal +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENCV),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-opencv +GST1_PLUGINS_BAD_DEPENDENCIES += opencv +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-opencv +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENH264),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-openh264 +GST1_PLUGINS_BAD_DEPENDENCIES += libopenh264 +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-openh264 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENJPEG),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-openjpeg +GST1_PLUGINS_BAD_DEPENDENCIES += openjpeg +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-openjpeg +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPUS),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-opus +GST1_PLUGINS_BAD_DEPENDENCIES += opus +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-opus +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_RSVG),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-rsvg +GST1_PLUGINS_BAD_DEPENDENCIES += librsvg +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-rsvg +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_GL),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-gl +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-gl +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SDL),y) +GST1_PLUGINS_BAD_CONF_ENV += ac_cv_path_SDL_CONFIG=$(STAGING_DIR)/usr/bin/sdl-config +GST1_PLUGINS_BAD_CONF_OPTS += --enable-sdl +GST1_PLUGINS_BAD_DEPENDENCIES += sdl +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-sdl +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_SNDFILE),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-sndfile +GST1_PLUGINS_BAD_DEPENDENCIES += libsndfile +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-sndfile +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_DVB),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-dvb +GST1_PLUGINS_BAD_DEPENDENCIES += dtv-scan-tables +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-dvb +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_HLS),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-hls +GST1_PLUGINS_BAD_DEPENDENCIES += gnutls +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-hls +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_X265),y) +GST1_PLUGINS_BAD_CONF_OPTS += --enable-x265 +GST1_PLUGINS_BAD_DEPENDENCIES += x265 +GST1_PLUGINS_BAD_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_BAD_CONF_OPTS += --disable-x265 +endif + +# Add GPL license if GPL licensed plugins enabled. +ifeq ($(GST1_PLUGINS_BAD_HAS_GPL_LICENSE),y) +GST1_PLUGINS_BAD_LICENSE += GPL +endif + +# Add Unknown license if Unknown licensed plugins enabled. +ifeq ($(GST1_PLUGINS_BAD_HAS_UNKNOWN_LICENSE),y) +GST1_PLUGINS_BAD_LICENSE += UNKNOWN +endif + +# Use the following command to extract license info for plugins. +# # find . -name 'plugin-*.xml' | xargs grep license + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/gst1-plugins-base/Config.in b/package/gstreamer1/gst1-plugins-base/Config.in new file mode 100644 index 0000000000..897c1d13ca --- /dev/null +++ b/package/gstreamer1/gst1-plugins-base/Config.in @@ -0,0 +1,160 @@ +menuconfig BR2_PACKAGE_GST1_PLUGINS_BASE + bool "gst1-plugins-base" + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXV if BR2_PACKAGE_XORG7 + help + A basic set of well-supported plug-ins for GStreamer. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST1_PLUGINS_BASE + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ADDER + bool "adder" + help + Adds multiple streams + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP + bool "app" + help + Elements used to communicate with applications + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT + bool "audioconvert (mandatory for audio playback)" + default y + help + Convert audio to different formats + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORATE + bool "audiorate" + help + Adjusts audio frames + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC + bool "audiotestsrc" + help + Creates audio test signals of given frequency and volume + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ENCODING + bool "encoding" + help + various encoding-related elements + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERT + bool "videoconvert" + help + Colorspace conversion + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_GIO + bool "gio" + help + GIO elements + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TYPEFIND + bool "playback" + default y + help + various playback elements + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE + bool "audioresample (mandatory for audio playback)" + default y + help + Resamples audio + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_SUBPARSE + bool "subparse" + help + Subtitle parsing + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TCP + bool "tcp" + help + transfer data over the network via TCP + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TYPEFIND + bool "typefind" + default y + help + default typefind functions + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC + bool "videotestsrc" + help + Creates a test video stream + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEORATE + bool "videorate" + help + Adjusts video frames + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOSCALE + bool "videoscale (mandatory for video playback)" + default y + help + Resizes video + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME + bool "volume (mandatory for audio playback)" + default y + help + plugin for controlling audio volume + +comment "plugins with external dependencies" + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA + bool "alsa (mandatory for audio playback)" + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_ALSA_LIB_MIXER + select BR2_PACKAGE_ALSA_LIB_PCM + select BR2_PACKAGE_ALSA_LIB_SEQ + help + ALSA plugin library + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TREMOR + bool "tremor" + select BR2_PACKAGE_TREMOR + help + Vorbis Tremor decoder + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_OGG + bool "ogg (*.ogg audio/video)" + select BR2_PACKAGE_LIBOGG + help + ogg stream manipulation (info about ogg: http://xiph.org) + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_OPUS + bool "opus" + select BR2_PACKAGE_OPUS + help + Opus codec for speech and audio. + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PANGO + bool "pango font renderer" + depends on BR2_INSTALL_LIBSTDCPP # pango -> freetype + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango -> harfbuzz + select BR2_PACKAGE_PANGO + help + Pango-based text rendering and overlay + +comment "pango plugin needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_THEORA + bool "theora (*.ogg video)" + select BR2_PACKAGE_LIBTHEORA + help + Theora plugin library + +config BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VORBIS + bool "vorbis (*.ogg audio)" + select BR2_PACKAGE_LIBVORBIS + help + Vorbis plugin library + +endif diff --git a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.hash b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.hash new file mode 100644 index 0000000000..c3db9b0dc3 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.hash @@ -0,0 +1,2 @@ +# From http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-1.8.1.tar.xz.sha256sum +sha256 15a9de985cd265c344e359f5b19347df4021b7611ed2c2d91917cb900f2fad6f gst-plugins-base-1.8.1.tar.xz diff --git a/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk new file mode 100644 index 0000000000..62e8b22c63 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-base/gst1-plugins-base.mk @@ -0,0 +1,214 @@ +################################################################################ +# +# gst1-plugins-base +# +################################################################################ + +GST1_PLUGINS_BASE_VERSION = 1.8.1 +GST1_PLUGINS_BASE_SOURCE = gst-plugins-base-$(GST1_PLUGINS_BASE_VERSION).tar.xz +GST1_PLUGINS_BASE_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-base +GST1_PLUGINS_BASE_INSTALL_STAGING = YES +GST1_PLUGINS_BASE_LICENSE_FILES = COPYING.LIB +GST1_PLUGINS_BASE_LICENSE = LGPLv2+, LGPLv2.1+ + +# freetype is only used by examples, but if it is not found +# and the host has a freetype-config script, then the host +# include dirs are added to the search path causing trouble +GST1_PLUGINS_BASE_CONF_ENV = + FT2_CONFIG=/bin/false \ + ac_cv_header_stdint_t="stdint.h" + +# gio_unix_2_0 is only used for tests +GST1_PLUGINS_BASE_CONF_OPTS = \ + --disable-examples \ + --disable-oggtest \ + --disable-vorbistest \ + --disable-gio_unix_2_0 \ + --disable-freetypetest \ + --disable-valgrind + +# Options which require currently unpackaged libraries +GST1_PLUGINS_BASE_CONF_OPTS += \ + --disable-cdparanoia \ + --disable-libvisual \ + --disable-iso-codes + +GST1_PLUGINS_BASE_DEPENDENCIES = gstreamer1 + +# These plugins are liste in the order from ./configure --help + +ifeq ($(BR2_PACKAGE_ORC),y) +GST1_PLUGINS_BASE_DEPENDENCIES += orc +GST1_PLUGINS_BASE_CONF_OPTS += --enable-orc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ADDER),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-adder +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-adder +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-app +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-app +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-audioconvert +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-audioconvert +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORATE),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-audiorate +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-audiorate +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-audiotestsrc +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-audiotestsrc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ENCODING),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-encoding +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-encoding +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERT),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-videoconvert +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-videoconvert +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_GIO),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-gio +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-gio +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-playback +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-playback +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-audioresample +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-audioresample +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_SUBPARSE),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-subparse +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-subparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TCP),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-tcp +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-tcp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TYPEFIND),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-typefind +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-typefind +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-videotestsrc +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-videotestsrc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEORATE),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-videorate +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-videorate +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOSCALE),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-videoscale +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-videoscale +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-volume +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-volume +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +GST1_PLUGINS_BASE_DEPENDENCIES += zlib +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_XORG7),y) +GST1_PLUGINS_BASE_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXv +GST1_PLUGINS_BASE_CONF_OPTS += \ + --enable-x \ + --enable-xshm \ + --enable-xvideo +else +GST1_PLUGINS_BASE_CONF_OPTS += \ + --disable-x \ + --disable-xshm \ + --disable-xvideo +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA),y) +GST1_PLUGINS_BASE_DEPENDENCIES += alsa-lib +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-alsa +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TREMOR),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-ivorbis +GST1_PLUGINS_BASE_DEPENDENCIES += tremor +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-ivorbis +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_OPUS),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-opus +GST1_PLUGINS_BASE_DEPENDENCIES += opus +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-opus +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_OGG),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-ogg +GST1_PLUGINS_BASE_DEPENDENCIES += libogg +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-ogg +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PANGO),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-pango +GST1_PLUGINS_BASE_DEPENDENCIES += pango +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-pango +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_THEORA),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-theora +GST1_PLUGINS_BASE_DEPENDENCIES += libtheora +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-theora +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VORBIS),y) +GST1_PLUGINS_BASE_CONF_OPTS += --enable-vorbis +GST1_PLUGINS_BASE_DEPENDENCIES += libvorbis +else +GST1_PLUGINS_BASE_CONF_OPTS += --disable-vorbis +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/gst1-plugins-good/Config.in b/package/gstreamer1/gst1-plugins-good/Config.in new file mode 100644 index 0000000000..a59033a24e --- /dev/null +++ b/package/gstreamer1/gst1-plugins-good/Config.in @@ -0,0 +1,369 @@ +menuconfig BR2_PACKAGE_GST1_PLUGINS_GOOD + bool "gst1-plugins-good" + select BR2_PACKAGE_GST1_PLUGINS_BASE + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXV if BR2_PACKAGE_XORG7 + help + A set of well-supported plug-ins for GStreamer under the preferred + license. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST1_PLUGINS_GOOD + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_JPEG + bool "jpeg (JPEG support)" + select BR2_PACKAGE_JPEG + help + JPeg plugin library + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PNG + bool "png (PNG support)" + select BR2_PACKAGE_LIBPNG + help + PNG plugin library + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_BZ2 + bool "bz2 support" + depends on BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA + select BR2_PACKAGE_BZIP2 + help + Enable bz2 support for the following plugins: + matroska + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_ZLIB + bool "zlib support" + depends on BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ISOMP4 || BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ID3DEMUX || BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA + select BR2_PACKAGE_ZLIB + help + Enable zlib support for the following plugins: + id3demux, isomp4, matroska + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ALPHA + bool "alpha" + help + adds an alpha channel to video - constant or via chroma-keying + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_APETAG + bool "apetag" + help + APEv1/2 tag reader + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUDIOFX + bool "audiofx" + help + Audio effects plugin + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUDIOPARSERS + bool "audioparsers" + help + Parsers for various audio formats + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUPARSE + bool "auparse" + help + parses au streams + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUTODETECT + bool "autodetect" + help + Plugin contains auto-detection plugins for video/audio in- and outputs + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AVI + bool "avi (*.avi video)" + default y + help + AVI stream handling + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CUTTER + bool "cutter" + help + Audio Cutter to split audio into non-silent bits + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DEBUGUTILS + bool "debugutils" + help + elements for testing and debugging + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DEINTERLACE + bool "deinterlace" + help + Deinterlacer + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DTMF + bool "dtmf" + help + DTMF plugin + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_EFFECTV + bool "effectv" + help + effect plugins from the effectv project + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_EQUALIZER + bool "equalizer" + help + GStreamer audio equalizers + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLV + bool "flv" + help + FLV muxing and demuxing plugin + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLX + bool "flx" + help + FLC/FLI/FLX video decoder + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_GOOM + bool "goom" + help + GOOM visualization filter + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_GOOM2K1 + bool "goom2k1" + help + GOOM 2k1 visualization filter + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ICYDEMUX + bool "icydemux" + help + Demux ICY tags from a stream + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ID3DEMUX + bool "id3demux (*.mp3 audio)" + help + Demux ID3v1 and ID3v2 tags from a file + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_IMAGEFREEZE + bool "imagefreeze" + help + Still frame stream generator + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_INTERLEAVE + bool "interleave" + help + Audio interleaver/deinterleaver + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ISOMP4 + bool "isomp4" + default y + help + ISO base media file format support (mp4, 3gpp, qt, mj2) + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_LAW + bool "law" + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_LEVEL + bool "level" + help + Audio level plugin + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA + bool "matroska" + help + Matroska and WebM stream handling + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MONOSCOPE + bool "monoscope" + help + Monoscope visualization + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MULTIFILE + bool "multifile" + help + Reads/Writes buffers from/to sequentially named files + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MULTIPART + bool "multipart" + help + multipart stream manipulation + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_REPLAYGAIN + bool "replaygain" + help + ReplayGain volume normalization + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTP + bool "rtp" + help + Real-time protocol plugins + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTPMANAGER + bool "rtpmanager" + help + RTP session management plugin library + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTSP + bool "rtsp" + help + transfer data via RTSP + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SHAPEWIPE + bool "shapewipe" + help + Shape Wipe transition filter + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SMPTE + bool "smpte" + help + Apply the standard SMPTE transitions on video images + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SPECTRUM + bool "spectrum" + help + Run an FFT on the audio signal, output spectrum data + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_UDP + bool "udp" + help + transfer data via UDP + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOBOX + bool "videobox" + help + resizes a video by adding borders or cropping + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOCROP + bool "videocrop" + help + Crops video into a user-defined region + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOFILTER + bool "videofilter" + help + Video filters plugin + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOMIXER + bool "videomixer" + help + Video mixer + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVENC + bool "wavenc" + help + Encode raw audio into WAV + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVPARSE + bool "wavparse (*.wav audio)" + default y + help + Parse a .wav file into raw audio + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_Y4M + bool "y4m" + help + Encodes a YUV frame into the yuv4mpeg format (mjpegtools) + +comment "plugins with external dependencies" + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_OSS + bool "ossaudio (OSS audio)" + help + OSS (Open Sound System) support for GStreamer + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_OSS4 + bool "oss4 (Open Sound System 4)" + help + Open Sound System (OSS) version 4 support for GStreamer + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2 + bool "v4l2" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # multi planar api + help + elements for Video 4 Linux + +comment "v4l2 needs a toolchain w/ headers >= 3.0" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CAIRO + bool "cairo" + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + help + Cairo-based elements + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLAC + bool "flac (libFLAC)" + depends on BR2_USE_WCHAR # flac + select BR2_PACKAGE_FLAC + help + The FLAC Lossless compressor Codec + +comment "flac needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_GDKPIXBUF + bool "gdkpixbuf" + select BR2_PACKAGE_GDK_PIXBUF + depends on BR2_USE_WCHAR # gdk-pixbuf -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # gdk-pixbuf -> libglib2 + help + GdkPixbuf-based image decoder, overlay and sink + +comment "gdkpixbuf needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_PULSE + depends on BR2_TOOLCHAIN_HAS_THREADS # pulseaudio + depends on BR2_USE_MMU # pulseaudio + depends on !BR2_STATIC_LIBS # pulseaudio + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pulseaudio -> json-c + select BR2_PACKAGE_PULSEAUDIO + bool "pulseaudio" + help + PulseAudio plugin library + +comment "pulseaudio support needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC + bool "souphttpsrc (http client)" + depends on BR2_USE_WCHAR # libsoup -> glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libsoup -> glib2 + select BR2_PACKAGE_LIBSOUP + help + libsoup HTTP client src/sink + +comment "souphttpsrc needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SPEEX + bool "speex" + select BR2_PACKAGE_SPEEX + help + Speex plugin library + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_TAGLIB + bool "taglib" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + select BR2_PACKAGE_TAGLIB + help + Taglib tagging plugin library + +comment "taglib needs a toolchain w/ C++, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VPX + bool "vpx (webm)" + select BR2_PACKAGE_LIBVPX + depends on BR2_TOOLCHAIN_HAS_THREADS # libvpx + help + VP8 plugin + +comment "libvpx needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVPACK + bool "wavpack (*.wv audio)" + select BR2_PACKAGE_WAVPACK + help + Wavpack lossless/lossy audio format handling + +endif diff --git a/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.hash b/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.hash new file mode 100644 index 0000000000..425fb92efd --- /dev/null +++ b/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.hash @@ -0,0 +1,2 @@ +# From http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-1.8.1.tar.xz.sha256sum +sha256 2103e17921d67894e82eafdd64fb9b06518599952fd93e625bfbc83ffead0972 gst-plugins-good-1.8.1.tar.xz diff --git a/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk b/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk new file mode 100644 index 0000000000..14bd4e8dc7 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-good/gst1-plugins-good.mk @@ -0,0 +1,428 @@ +################################################################################ +# +# gst1-plugins-good +# +################################################################################ + +GST1_PLUGINS_GOOD_VERSION = 1.8.1 +GST1_PLUGINS_GOOD_SOURCE = gst-plugins-good-$(GST1_PLUGINS_GOOD_VERSION).tar.xz +GST1_PLUGINS_GOOD_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-good +GST1_PLUGINS_GOOD_LICENSE_FILES = COPYING +GST1_PLUGINS_GOOD_LICENSE = LGPLv2.1+ + +GST1_PLUGINS_GOOD_CONF_OPTS = \ + --disable-valgrind \ + --disable-examples \ + --disable-directsound \ + --disable-waveform \ + --disable-sunaudio \ + --disable-osx_audio \ + --disable-osx_video \ + --disable-aalib \ + --disable-aalibtest \ + --disable-libcaca \ + --disable-esd \ + --disable-esdtest + + +# Options which require currently unpackaged libraries +GST1_PLUGINS_GOOD_CONF_OPTS += \ + --disable-jack \ + --disable-libdv \ + --disable-dv1394 \ + --disable-shout2 \ + --disable-taglib + +GST1_PLUGINS_GOOD_DEPENDENCIES = gstreamer1 gst1-plugins-base + +ifeq ($(BR2_PACKAGE_LIBV4L),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --with-libv4l2 +GST1_PLUGINS_GOOD_DEPENDENCIES += libv4l +else +GST1_PLUGINS_GOOD_CONF_OPTS += --without-libv4l2 +endif + +ifeq ($(BR2_PACKAGE_ORC),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-orc +GST1_PLUGINS_GOOD_DEPENDENCIES += orc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ALPHA),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-alpha +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-alpha +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_APETAG),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-apetag +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-apetag +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUDIOFX),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-audiofx +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-audiofx +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUDIOPARSERS),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-audioparsers +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-audioparsers +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUPARSE),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-auparse +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-auparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUTODETECT),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-autodetect +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-autodetect +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AVI),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-avi +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-avi +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CUTTER),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-cutter +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-cutter +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DEBUGUTILS),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-debugutils +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-debugutils +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DEINTERLACE),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-deinterlace +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-deinterlace +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DTMF),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-dtmf +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-dtmf +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_EFFECTV),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-effectv +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-effectv +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_EQUALIZER),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-equalizer +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-equalizer +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLV),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-flv +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-flv +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLX),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-flx +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-flx +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_GOOM),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-goom +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-goom +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_GOOM2K1),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-goom2k1 +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-goom2k1 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ICYDEMUX),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-icydemux +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-icydemux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ID3DEMUX),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-id3demux +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-id3demux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_IMAGEFREEZE),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-imagefreeze +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-imagefreeze +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_INTERLEAVE),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-interleave +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-interleave +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ISOMP4),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-isomp4 +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-isomp4 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_LAW),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-law +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-law +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_LEVEL),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-level +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-level +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-matroska +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-matroska +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MONOSCOPE),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-monoscope +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-monoscope +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MULTIFILE),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-multifile +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-multifile +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MULTIPART),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-multipart +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-multipart +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_REPLAYGAIN),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-replaygain +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-replaygain +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTP),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-rtp +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-rtp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTPMANAGER),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-rtpmanager +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-rtpmanager +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTSP),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-rtsp +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-rtsp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SHAPEWIPE),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-shapewipe +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-shapewipe +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SMPTE),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-smpte +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-smpte +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SPECTRUM),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-spectrum +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-spectrum +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_UDP),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-udp +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-udp +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOBOX),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-videobox +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-videobox +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOCROP),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-videocrop +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-videocrop +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOFILTER),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-videofilter +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-videofilter +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VIDEOMIXER),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-videomixer +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-videomixer +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVENC),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-wavenc +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-wavenc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVPARSE),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-wavparse +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-wavparse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_Y4M),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-y4m +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-y4m +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_OSS),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-oss +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-oss +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_OSS4),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-oss4 +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-oss4 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_V4L2),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-gst_v4l2 +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-gst_v4l2 +endif + +ifeq ($(BR2_PACKAGE_XORG7),y) +GST1_PLUGINS_GOOD_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXv +GST1_PLUGINS_GOOD_CONF_OPTS += \ + --enable-x \ + $(if $(BR2_PACKAGE_XLIB_LIBXFIXES),xlib_libXfixes) \ + $(if $(BR2_PACKAGE_XLIB_LIBXDAMAGE),xlib_libXdamage) +else +GST1_PLUGINS_GOOD_CONF_OPTS += \ + --disable-x +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_CAIRO),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-cairo +GST1_PLUGINS_GOOD_DEPENDENCIES += cairo +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-cairo +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLAC),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-flac +GST1_PLUGINS_GOOD_DEPENDENCIES += flac +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-flac +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_GDKPIXBUF),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-gdk_pixbuf +GST1_PLUGINS_GOOD_DEPENDENCIES += gdk-pixbuf +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-gdk_pixbuf +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_JPEG),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-jpeg +GST1_PLUGINS_GOOD_DEPENDENCIES += jpeg +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-jpeg +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PNG),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-libpng +GST1_PLUGINS_GOOD_DEPENDENCIES += libpng +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-libpng +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_PULSE),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-pulse +GST1_PLUGINS_GOOD_DEPENDENCIES += pulseaudio +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-pulse +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SOUPHTTPSRC),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-soup +GST1_PLUGINS_GOOD_DEPENDENCIES += libsoup +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-soup +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_SPEEX),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-speex +GST1_PLUGINS_GOOD_DEPENDENCIES += speex +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-speex +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_TAGLIB),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-taglib +GST1_PLUGINS_GOOD_DEPENDENCIES += taglib +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-taglib +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_VPX),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-vpx +GST1_PLUGINS_GOOD_DEPENDENCIES += libvpx +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-vpx +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_WAVPACK),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-wavpack +GST1_PLUGINS_GOOD_DEPENDENCIES += wavpack +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-wavpack +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_ZLIB),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-zlib +GST1_PLUGINS_GOOD_DEPENDENCIES += zlib +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_BZ2),y) +GST1_PLUGINS_GOOD_CONF_OPTS += --enable-bz2 +GST1_PLUGINS_GOOD_DEPENDENCIES += bzip2 +else +GST1_PLUGINS_GOOD_CONF_OPTS += --disable-bz2 +endif + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/gst1-plugins-ugly/Config.in b/package/gstreamer1/gst1-plugins-ugly/Config.in new file mode 100644 index 0000000000..995835e41a --- /dev/null +++ b/package/gstreamer1/gst1-plugins-ugly/Config.in @@ -0,0 +1,84 @@ +menuconfig BR2_PACKAGE_GST1_PLUGINS_UGLY + bool "gst1-plugins-ugly" + select BR2_PACKAGE_GST1_PLUGINS_BASE + help + A set of well-supported plug-ins for GStreamer, but might pose + problems for distributors. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GST1_PLUGINS_UGLY + +comment "dependency-less plugins" + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_ASFDEMUX + bool "asfdemux" + help + Demuxes and muxes audio and video in Microsofts ASF format + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_DVDLPCMDEC + bool "dvdlpcmdec" + help + Decode DVD LPCM frames into standard PCM + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_DVDSUB + bool "dvdsub" + help + DVD subtitle parser and decoder + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_XINGMUX + bool "xingmux" + help + Add XING tags to mpeg audio files + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_REALMEDIA + bool "realmedia" + help + RealMedia support plugins + +comment "plugins with external dependencies (there may be more available)" + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_DVDREAD + bool "dvdread" + depends on !BR2_STATIC_LIBS # libdvdread + select BR2_PACKAGE_LIBDVDREAD + help + Access a DVD with dvdread + +comment "dvdread needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_LAME + bool "lame (*.mp3 audio encoder)" + select BR2_PACKAGE_LAME + help + Encode MP3s with LAME + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MAD + bool "mad (*.mp3 audio)" + select BR2_PACKAGE_LIBID3TAG + select BR2_PACKAGE_LIBMAD + help + mp3 decoding based on the mad library + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MPG123 + bool "mpg123 (*.mp3 audio)" + select BR2_PACKAGE_MPG123 + help + mp3 decoding based on the mpg123 library + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MPEG2DEC + bool "mpeg2dec" + select BR2_PACKAGE_LIBMPEG2 + help + LibMpeg2 decoder + +config BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_X264 + bool "x264" + select BR2_PACKAGE_X264 + help + x264 encoder + +# Note: to get descriptions use the following. +# # find . -name 'plugin-*.xml' | xargs grep -m 1 description +endif diff --git a/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.hash b/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.hash new file mode 100644 index 0000000000..77db9a221a --- /dev/null +++ b/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.hash @@ -0,0 +1,2 @@ +# From http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-1.8.1.tar.xz.sha256sum +sha256 8e656a9a3be60d7e7ed3fb8e2a22d070b1f54f95d0b22accd876360e659446ce gst-plugins-ugly-1.8.1.tar.xz diff --git a/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk b/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk new file mode 100644 index 0000000000..91bbb1e9f3 --- /dev/null +++ b/package/gstreamer1/gst1-plugins-ugly/gst1-plugins-ugly.mk @@ -0,0 +1,115 @@ +################################################################################ +# +# gst1-plugins-ugly +# +################################################################################ + +GST1_PLUGINS_UGLY_VERSION = 1.8.1 +GST1_PLUGINS_UGLY_SOURCE = gst-plugins-ugly-$(GST1_PLUGINS_UGLY_VERSION).tar.xz +GST1_PLUGINS_UGLY_SITE = http://gstreamer.freedesktop.org/src/gst-plugins-ugly +GST1_PLUGINS_UGLY_LICENSE_FILES = COPYING +# GPL licensed plugins will append to GST1_PLUGINS_UGLY_LICENSE if enabled. +GST1_PLUGINS_UGLY_LICENSE = LGPLv2.1+ + +GST1_PLUGINS_UGLY_CONF_OPTS = --disable-examples --disable-valgrind + +GST1_PLUGINS_UGLY_CONF_OPTS += \ + --disable-a52dec \ + --disable-amrnb \ + --disable-amrwb \ + --disable-cdio \ + --disable-sidplay \ + --disable-twolame + +GST1_PLUGINS_UGLY_DEPENDENCIES = gstreamer1 gst1-plugins-base + +ifeq ($(BR2_PACKAGE_ORC),y) +GST1_PLUGINS_UGLY_CONF_OPTS += --enable-orc +GST1_PLUGINS_UGLY_DEPENDENCIES += orc +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_ASFDEMUX),y) +GST1_PLUGINS_UGLY_CONF_OPTS += --enable-asfdemux +else +GST1_PLUGINS_UGLY_CONF_OPTS += --disable-asfdemux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_DVDLPCMDEC),y) +GST1_PLUGINS_UGLY_CONF_OPTS += --enable-dvdlpcmdec +else +GST1_PLUGINS_UGLY_CONF_OPTS += --disable-dvdlpcmdec +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_DVDSUB),y) +GST1_PLUGINS_UGLY_CONF_OPTS += --enable-dvdsub +else +GST1_PLUGINS_UGLY_CONF_OPTS += --disable-dvdsub +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_UGL1_PLUGIN_XINGMUX),y) +GST1_PLUGINS_UGLY_CONF_OPTS += --enable-xingmux +else +GST1_PLUGINS_UGLY_CONF_OPTS += --disable-xingmux +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_REALMEDIA),y) +GST1_PLUGINS_UGLY_CONF_OPTS += --enable-realmedia +else +GST1_PLUGINS_UGLY_CONF_OPTS += --disable-realmedia +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_DVDREAD),y) +GST1_PLUGINS_UGLY_CONF_OPTS += --enable-dvdread +GST1_PLUGINS_UGLY_DEPENDENCIES += libdvdread +GST1_PLUGINS_UGLY_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_UGLY_CONF_OPTS += --disable-dvdread +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_LAME),y) +GST1_PLUGINS_UGLY_CONF_OPTS += --enable-lame +GST1_PLUGINS_UGLY_DEPENDENCIES += lame +else +GST1_PLUGINS_UGLY_CONF_OPTS += --disable-lame +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MAD),y) +GST1_PLUGINS_UGLY_CONF_OPTS += --enable-mad +GST1_PLUGINS_UGLY_DEPENDENCIES += libid3tag libmad +GST1_PLUGINS_UGLY_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_UGLY_CONF_OPTS += --disable-mad +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MPG123),y) +GST1_PLUGINS_UGLY_CONF_OPTS += --enable-mpg123 +GST1_PLUGINS_UGLY_DEPENDENCIES += mpg123 +else +GST1_PLUGINS_UGLY_CONF_OPTS += --disable-mpg123 +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_MPEG2DEC),y) +GST1_PLUGINS_UGLY_CONF_OPTS += --enable-mpeg2dec +GST1_PLUGINS_UGLY_DEPENDENCIES += libmpeg2 +GST1_PLUGINS_ULGY_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_UGLY_CONF_OPTS += --disable-mpeg2dec +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_UGLY_PLUGIN_X264),y) +GST1_PLUGINS_UGLY_CONF_OPTS += --enable-x264 +GST1_PLUGINS_UGLY_DEPENDENCIES += x264 +GST1_PLUGINS_UGLY_HAS_GPL_LICENSE = y +else +GST1_PLUGINS_UGLY_CONF_OPTS += --disable-x264 +endif + +# Add GPL license if GPL plugins enabled. +ifeq ($(GST1_PLUGINS_UGLY_HAS_GPL_LICENSE),y) +GST1_PLUGINS_UGLY_LICENSE += GPLv2 +endif + +# Use the following command to extract license info for plugins. +# # find . -name 'plugin-*.xml' | xargs grep license + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/gst1-validate/Config.in b/package/gstreamer1/gst1-validate/Config.in new file mode 100644 index 0000000000..a9bb2aa388 --- /dev/null +++ b/package/gstreamer1/gst1-validate/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_GST1_VALIDATE + bool "gst1-validate" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_GST1_PLUGINS_BASE + select BR2_PACKAGE_PYTHON_PYEXPAT + # cairo is autodetected but needs PNG support + select BR2_PACKAGE_CAIRO_PNG if BR2_PACKAGE_CAIRO + help + GstValidate is a tool that allows GStreamer developers to + check that the GstElements they write behave the way they + are supposed to. + + http://gstreamer.freedesktop.org/ + +comment "gst1-validate depends on python" + depends on !BR2_PACKAGE_PYTHON diff --git a/package/gstreamer1/gst1-validate/gst1-validate.hash b/package/gstreamer1/gst1-validate/gst1-validate.hash new file mode 100644 index 0000000000..07f8cedfc0 --- /dev/null +++ b/package/gstreamer1/gst1-validate/gst1-validate.hash @@ -0,0 +1,2 @@ +# From http://gstreamer.freedesktop.org/src/gst-validate/gst-validate-1.8.1.tar.xz.sha256sum +sha256 a9b208c014cca2dc515599f01fd3a7a294133fd936366e74f439b9bc96a1ccbf gst-validate-1.8.1.tar.xz diff --git a/package/gstreamer1/gst1-validate/gst1-validate.mk b/package/gstreamer1/gst1-validate/gst1-validate.mk new file mode 100644 index 0000000000..37eb5676bd --- /dev/null +++ b/package/gstreamer1/gst1-validate/gst1-validate.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# gst1-validate +# +################################################################################ + +GST1_VALIDATE_VERSION = 1.8.1 +GST1_VALIDATE_SOURCE = gst-validate-$(GST1_VALIDATE_VERSION).tar.xz +GST1_VALIDATE_SITE = http://gstreamer.freedesktop.org/src/gst-validate +GST1_VALIDATE_LICENSE = LGPLv2.1+ +GST1_VALIDATE_LICENSE_FILES = COPYING + +GST1_VALIDATE_CONF_OPTS = --disable-sphinx-doc + +GST1_VALIDATE_DEPENDENCIES = \ + gstreamer1 \ + gst1-plugins-base \ + host-python \ + python \ + $(if $(BR2_PACKAGE_CAIRO),cairo) + +$(eval $(autotools-package)) diff --git a/package/gstreamer1/gstreamer1.mk b/package/gstreamer1/gstreamer1.mk new file mode 100644 index 0000000000..5b748e33fb --- /dev/null +++ b/package/gstreamer1/gstreamer1.mk @@ -0,0 +1 @@ +include package/gstreamer1/*/*.mk diff --git a/package/gstreamer1/gstreamer1/Config.in b/package/gstreamer1/gstreamer1/Config.in new file mode 100644 index 0000000000..274171b639 --- /dev/null +++ b/package/gstreamer1/gstreamer1/Config.in @@ -0,0 +1,55 @@ +comment "gstreamer 1.x needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GSTREAMER1 + bool "gstreamer 1.x" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + help + GStreamer is an open source multimedia framework. This 1.x version of + Gstreamer is incompatible with Gstreamer 0.10.x. + + http://gstreamer.freedesktop.org/ + +if BR2_PACKAGE_GSTREAMER1 + +config BR2_PACKAGE_GSTREAMER1_PARSE + bool "enable command-line parser" + default y + help + Enable command line parser for gstreamer. This may increase the CPU + overhead by a small amount. + +config BR2_PACKAGE_GSTREAMER1_TRACE + bool "enable tracing subsystem" + default y + help + Enable the tracing subsystem within gstreamer. This may increase CPU + overhead by a small amount. + +config BR2_PACKAGE_GSTREAMER1_GST_DEBUG + bool "enable gst-debug trace support" + default y + help + Enable support for the gst-debug tracing functionality in gstreamer. + This has limited CPU overhead, but does increase the rootfs size + somewhat. + +config BR2_PACKAGE_GSTREAMER1_PLUGIN_REGISTRY + bool "enable plugin registry" + default y + help + Enable support for the GStreamer plugin registry. This may increase + the launch-time for a GStreamer application. + +config BR2_PACKAGE_GSTREAMER1_INSTALL_TOOLS + bool "install gst-launch & gst-inspect" + default y + help + Install the gst-launch and gst-inspect tools. This will take up + additional space on the target. + +endif diff --git a/package/gstreamer1/gstreamer1/gstreamer1.hash b/package/gstreamer1/gstreamer1/gstreamer1.hash new file mode 100644 index 0000000000..49a609ded6 --- /dev/null +++ b/package/gstreamer1/gstreamer1/gstreamer1.hash @@ -0,0 +1,2 @@ +# From http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-1.8.1.tar.xz.sha256sum +sha256 5a3722fb9302dd977c17ced4240293dc777cb716dc98c8cca63d75c27e5e3107 gstreamer-1.8.1.tar.xz diff --git a/package/gstreamer1/gstreamer1/gstreamer1.mk b/package/gstreamer1/gstreamer1/gstreamer1.mk new file mode 100644 index 0000000000..3a6dd0b372 --- /dev/null +++ b/package/gstreamer1/gstreamer1/gstreamer1.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# gstreamer1 +# +################################################################################ + +GSTREAMER1_VERSION = 1.8.1 +GSTREAMER1_SOURCE = gstreamer-$(GSTREAMER1_VERSION).tar.xz +GSTREAMER1_SITE = http://gstreamer.freedesktop.org/src/gstreamer +GSTREAMER1_INSTALL_STAGING = YES +GSTREAMER1_LICENSE_FILES = COPYING +GSTREAMER1_LICENSE = LGPLv2+, LGPLv2.1+ + +# Checking if unaligned memory access works correctly cannot be done when cross +# compiling. For the following architectures there is no information available +# in the configure script. +ifeq ($(BR2_arc)$(BR2_xtensa)$(BR2_microblaze)$(BR2_nios2),y) +GSTREAMER1_CONF_ENV = as_cv_unaligned_access=no +endif +ifeq ($(BR2_aarch64),y) +GSTREAMER1_CONF_ENV = as_cv_unaligned_access=yes +endif + +GSTREAMER1_CONF_OPTS = \ + --disable-examples \ + --disable-tests \ + --disable-failing-tests \ + --disable-valgrind \ + --disable-benchmarks \ + --disable-check \ + $(if $(BR2_PACKAGE_GSTREAMER1_TRACE),,--disable-trace) \ + $(if $(BR2_PACKAGE_GSTREAMER1_PARSE),,--disable-parse) \ + $(if $(BR2_PACKAGE_GSTREAMER1_GST_DEBUG),,--disable-gst-debug) \ + $(if $(BR2_PACKAGE_GSTREAMER1_PLUGIN_REGISTRY),,--disable-registry) \ + $(if $(BR2_PACKAGE_GSTREAMER1_INSTALL_TOOLS),,--disable-tools) + +GSTREAMER1_DEPENDENCIES = libglib2 host-pkgconf host-bison host-flex + +# gstreamer-1.6 changed the location of its gstconfig.h file, +# and unfortunately, not all (by far!) consumers have been +# updated to look in the correct location. +# Add a symlink to the legacy location +define GSTREAMER1_LEGACY_CGSTCONFIG_H + cd $(STAGING_DIR)/usr/include/gstreamer-1.0/gst && \ + ln -sf ../../../lib/gstreamer-1.0/include/gst/gstconfig.h . +endef +GSTREAMER1_POST_INSTALL_STAGING_HOOKS += GSTREAMER1_LEGACY_CGSTCONFIG_H + +$(eval $(autotools-package)) diff --git a/package/gtest/Config.in b/package/gtest/Config.in new file mode 100644 index 0000000000..c07f13bf6f --- /dev/null +++ b/package/gtest/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_GTEST + bool "gtest" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + help + Google's framework for writing C++ tests on a variety of + platforms (Linux, Mac OS X, Windows, Cygwin, Windows CE, and + Symbian). Based on the xUnit architecture. Supports + automatic test discovery, a rich set of assertions, + user-defined assertions, death tests, fatal and non-fatal + failures, value- and type-parameterized tests, various + options for running the tests, and XML test report + generation. + + Gtest also allows to easily build testsuites for C programs. + + This package allows running testsuites on the target which + might be advantageous in certain cases. + + http://code.google.com/p/googletest/ + +comment "gtest needs a toolchain w/ C++, wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/gtest/gtest.hash b/package/gtest/gtest.hash new file mode 100644 index 0000000000..8ff79cb0d6 --- /dev/null +++ b/package/gtest/gtest.hash @@ -0,0 +1,2 @@ +# From http://code.google.com/p/googletest/downloads/detail?name=gtest-1.7.0.zip&can=2&q= +sha1 f85f6d2481e2c6c4a18539e391aa4ea8ab0394af gtest-1.7.0.zip diff --git a/package/gtest/gtest.mk b/package/gtest/gtest.mk new file mode 100644 index 0000000000..da08621029 --- /dev/null +++ b/package/gtest/gtest.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# gtest +# +################################################################################ + +# Make sure this remains the same version as the gmock one +GTEST_VERSION = 1.7.0 +GTEST_SOURCE = gtest-$(GTEST_VERSION).zip +GTEST_SITE = http://googletest.googlecode.com/files +GTEST_INSTALL_STAGING = YES +GTEST_INSTALL_TARGET = NO +GTEST_LICENSE = BSD-3c +GTEST_LICENSE_FILES = LICENSE + +# While it is possible to build gtest as shared library, using this gtest shared +# library requires to set some special configure option in the project using +# gtest. +# So, force to build gtest as a static library. +# +# For further details, refer to the explaination given in the README file from +# the gtest sources. +GTEST_CONF_OPTS = -DBUILD_SHARED_LIBS=OFF + +define GTEST_EXTRACT_CMDS + $(UNZIP) $(DL_DIR)/$(GTEST_SOURCE) -d $(BUILD_DIR) +endef + +define GTEST_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/libgtest.a $(STAGING_DIR)/usr/lib/libgtest.a + $(INSTALL) -D -m 0755 $(@D)/libgtest_main.a $(STAGING_DIR)/usr/lib/libgtest_main.a + $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/gtest/ + cp -rp $(@D)/include/gtest/* $(STAGING_DIR)/usr/include/gtest/ + # Generate the gtest-config script manually, since the CMake + # build system is not doing it. + sed 's%@PACKAGE_TARNAME@%gtest%;\ + s%@PACKAGE_VERSION@%$(GTEST_VERSION)%;\ + s%@prefix@%$(STAGING_DIR)/usr%;\ + s%@exec_prefix@%$(STAGING_DIR)/usr%;\ + s%@libdir@%$(STAGING_DIR)/usr/lib%;\ + s%@includedir@%$(STAGING_DIR)/usr/include%;\ + s%@bindir@%$(STAGING_DIR)/usr/bin%;\ + s%@PTHREAD_CFLAGS@%%;\ + s%@PTHREAD_LIBS@%-lpthread%;' \ + $(@D)/scripts/gtest-config.in \ + > $(STAGING_DIR)/usr/bin/gtest-config + chmod +x $(STAGING_DIR)/usr/bin/gtest-config +endef + +$(eval $(cmake-package)) diff --git a/package/gtk2-engines/Config.in b/package/gtk2-engines/Config.in new file mode 100644 index 0000000000..756a7d00f1 --- /dev/null +++ b/package/gtk2-engines/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_GTK2_ENGINES + bool "gtk engines" + depends on BR2_PACKAGE_LIBGTK2 + help + A collection of basic theme engines for GTK+. diff --git a/package/gtk2-engines/gtk2-engines.hash b/package/gtk2-engines/gtk2-engines.hash new file mode 100644 index 0000000000..ac56c7d73e --- /dev/null +++ b/package/gtk2-engines/gtk2-engines.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/gtk-engines/2.20/gtk-engines-2.20.2.sha256sum +sha256 15b680abca6c773ecb85253521fa100dd3b8549befeecc7595b10209d62d66b5 gtk-engines-2.20.2.tar.bz2 diff --git a/package/gtk2-engines/gtk2-engines.mk b/package/gtk2-engines/gtk2-engines.mk new file mode 100644 index 0000000000..9b285f6f31 --- /dev/null +++ b/package/gtk2-engines/gtk2-engines.mk @@ -0,0 +1,88 @@ +################################################################################ +# +# gtk2-engines +# +################################################################################ + +GTK2_ENGINES_VERSION_MAJOR = 2.20 +GTK2_ENGINES_VERSION = $(GTK2_ENGINES_VERSION_MAJOR).2 +GTK2_ENGINES_SOURCE = gtk-engines-$(GTK2_ENGINES_VERSION).tar.bz2 +GTK2_ENGINES_SITE = http://ftp.gnome.org/pub/GNOME/sources/gtk-engines/$(GTK2_ENGINES_VERSION_MAJOR) +GTK2_ENGINES_DEPENDENCIES = libgtk2 host-intltool +GTK2_ENGINES_LICENSE = LGPLv2.1+ +GTK2_ENGINES_LICENSE_FILES = COPYING + +GTK2_ENGINES_CONF_ENV = \ + ac_cv_func_posix_getpwuid_r=yes \ + glib_cv_stack_grows=no \ + glib_cv_uscore=no \ + ac_cv_func_strtod=yes \ + ac_fsusage_space=yes \ + fu_cv_sys_stat_statfs2_bsize=yes \ + ac_cv_func_closedir_void=no \ + ac_cv_func_getloadavg=no \ + ac_cv_lib_util_getloadavg=no \ + ac_cv_lib_getloadavg_getloadavg=no \ + ac_cv_func_getgroups=yes \ + ac_cv_func_getgroups_works=yes \ + ac_cv_func_chown_works=yes \ + ac_cv_have_decl_euidaccess=no \ + ac_cv_func_euidaccess=no \ + ac_cv_have_decl_strnlen=yes \ + ac_cv_func_strnlen_working=yes \ + ac_cv_func_lstat_dereferences_slashed_symlink=yes \ + ac_cv_func_lstat_empty_string_bug=no \ + ac_cv_func_stat_empty_string_bug=no \ + vb_cv_func_rename_trailing_slash_bug=no \ + ac_cv_have_decl_nanosleep=yes \ + jm_cv_func_nanosleep_works=yes \ + gl_cv_func_working_utimes=yes \ + ac_cv_func_utime_null=yes \ + ac_cv_have_decl_strerror_r=yes \ + ac_cv_func_strerror_r_char_p=no \ + jm_cv_func_svid_putenv=yes \ + ac_cv_func_getcwd_null=yes \ + ac_cv_func_getdelim=yes \ + ac_cv_func_mkstemp=yes \ + utils_cv_func_mkstemp_limitations=no \ + utils_cv_func_mkdir_trailing_slash_bug=no \ + jm_cv_func_gettimeofday_clobber=no \ + gl_cv_func_working_readdir=yes \ + jm_ac_cv_func_link_follows_symlink=no \ + utils_cv_localtime_cache=no \ + ac_cv_struct_st_mtim_nsec=no \ + gl_cv_func_tzset_clobber=no \ + gl_cv_func_getcwd_null=yes \ + gl_cv_func_getcwd_path_max=yes \ + ac_cv_func_fnmatch_gnu=yes \ + am_getline_needs_run_time_check=no \ + am_cv_func_working_getline=yes \ + gl_cv_func_mkdir_trailing_slash_bug=no \ + gl_cv_func_mkstemp_limitations=no \ + ac_cv_func_working_mktime=yes \ + jm_cv_func_working_re_compile_pattern=yes \ + ac_use_included_regex=no \ + gl_cv_c_restrict=no \ + ac_cv_path_CUPS_CONFIG=no + +GTK2_ENGINES_CONF_OPTS = \ + --with-x \ + --x-includes=$(STAGING_DIR)/usr/include/X11 \ + --x-libraries=$(STAGING_DIR)/usr/lib \ + --disable-glibtest \ + --enable-explicit-deps=no \ + --enable-clearlooks \ + --disable-crux \ + --disable-hc \ + --disable-industrial \ + --disable-mist \ + --disable-redmond \ + --disable-smooth \ + --disable-glide \ + --disable-thinice \ + --enable-animation \ + --disable-development \ + --disable-paranoia \ + --disable-deprecated + +$(eval $(autotools-package)) diff --git a/package/gtkmm3/Config.in b/package/gtkmm3/Config.in new file mode 100644 index 0000000000..ef62a1f9eb --- /dev/null +++ b/package/gtkmm3/Config.in @@ -0,0 +1,30 @@ +comment "gtkmm3 needs libgtk3 and a toolchain w/ C++, wchar, threads, gcc >= 4.8" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR \ + || !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_LIBGTK3 \ + || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_GTKMM3 + bool "gtkmm3" + # Broken on existing external/internal nios2 toolchains, + # revisit when they are upgraded with at least Binutils >= 2.26 + # and GCC >= 5.3. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19405 + depends on !BR2_nios2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pangomm, libgtk3 -> pango -> harfbuzz + depends on BR2_INSTALL_LIBSTDCPP # glibmm, libpangomm -> glibmm/pango + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on BR2_TOOLCHAIN_HAS_THREADS # *mm/libgtk3 -> libglib2 + depends on BR2_USE_MMU # *mm/libgtk3 -> libglib2 + depends on BR2_USE_WCHAR # *mm/libgtk3 -> libglib2 + depends on BR2_PACKAGE_LIBGTK3 + select BR2_PACKAGE_ATKMM + select BR2_PACKAGE_CAIROMM + select BR2_PACKAGE_GLIBMM + select BR2_PACKAGE_LIBSIGC + select BR2_PACKAGE_PANGOMM + help + The gtkmm3 package is a set of C++ bindings for GTK 3. + + http://www.gtkmm.org/ diff --git a/package/gtkmm3/gtkmm3.hash b/package/gtkmm3/gtkmm3.hash new file mode 100644 index 0000000000..f2fc960830 --- /dev/null +++ b/package/gtkmm3/gtkmm3.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/gtkmm/3.20/gtkmm-3.20.1.sha256sum +sha256 051de1b8756ca6ec61f26264338cfc3060af936fd70bf4558bfe1e115418c612 gtkmm-3.20.1.tar.xz diff --git a/package/gtkmm3/gtkmm3.mk b/package/gtkmm3/gtkmm3.mk new file mode 100644 index 0000000000..8c3e079363 --- /dev/null +++ b/package/gtkmm3/gtkmm3.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# gtkmm3 +# +################################################################################ + +GTKMM3_VERSION_MAJOR = 3.20 +GTKMM3_VERSION = $(GTKMM3_VERSION_MAJOR).1 +GTKMM3_SOURCE = gtkmm-$(GTKMM3_VERSION).tar.xz +GTKMM3_SITE = http://ftp.gnome.org/pub/gnome/sources/gtkmm/$(GTKMM3_VERSION_MAJOR) +GTKMM3_LICENSE = LGPLv2.1+ (library), GPLv2+ (tools) +GTKMM3_LICENSE_FILES = COPYING COPYING.tools +GTKMM3_INSTALL_STAGING = YES +GTKMM3_DEPENDENCIES = atkmm cairomm glibmm libgtk3 libsigc pangomm host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/gtkperf/Config.in b/package/gtkperf/Config.in new file mode 100644 index 0000000000..1089dbf477 --- /dev/null +++ b/package/gtkperf/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_GTKPERF + bool "gtkperf (performance test for GTK2)" + depends on BR2_PACKAGE_LIBGTK2 + help + GtkPerf is an application designed to test GTK+ performance. + The point is to create common testing platform to run + predefined GTK+ widgets + e.g. (opening comboboxes, toggling buttons, scrolling text yms.) + and this way define the speed of device/platform. diff --git a/package/gtkperf/gtkperf.hash b/package/gtkperf/gtkperf.hash new file mode 100644 index 0000000000..819851dd09 --- /dev/null +++ b/package/gtkperf/gtkperf.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 9704344e732038eecbd007dd996a56293a6b027b5b76f3f036273a3fae1ab27b gtkperf_0.40.tar.gz diff --git a/package/gtkperf/gtkperf.mk b/package/gtkperf/gtkperf.mk new file mode 100644 index 0000000000..0542a26fa7 --- /dev/null +++ b/package/gtkperf/gtkperf.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# gtkperf +# +################################################################################ + +GTKPERF_VERSION = 0.40 +GTKPERF_SOURCE = gtkperf_$(GTKPERF_VERSION).tar.gz +GTKPERF_SITE = http://downloads.sourceforge.net/project/gtkperf/gtkperf/$(GTKPERF_VERSION) +GTKPERF_DEPENDENCIES = libgtk2 +GTKPERF_LICENSE = GPLv2 +GTKPERF_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/guile/0001-fix_arm_endianness.patch b/package/guile/0001-fix_arm_endianness.patch new file mode 100644 index 0000000000..67c0b606ee --- /dev/null +++ b/package/guile/0001-fix_arm_endianness.patch @@ -0,0 +1,25 @@ +Fix support for ARM endianness, otherwise it gives the error +"unknown CPU endianness" + +Signed-off-by: Pedro Aguilar + +diff -Nau guile-2.0.11.orig/module/system/base/target.scm guile-2.0.11/module/system/base/target.scm +--- guile-2.0.11.orig/module/system/base/target.scm 2013-02-28 09:42:45.000000000 +0100 ++++ guile-2.0.11/module/system/base/target.scm 2014-11-03 23:05:01.789338997 +0100 +@@ -70,7 +70,15 @@ + ((member cpu '("sparc" "sparc64" "powerpc" "powerpc64" "spu" + "mips" "mips64")) + (endianness big)) +- ((string-match "^arm.*el" cpu) ++ ((string-match "^arm.*el" cpu) ++ (endianness little)) ++ ((string-match "^arm.*eb" cpu) ++ (endianness big)) ++ ((string-prefix? "arm" cpu) ;ARMs are LE by default ++ (endianness little)) ++ ((string-match "^aarch64.*be" cpu) ++ (endianness big)) ++ ((string=? "aarch64" cpu) + (endianness little)) + (else + (error "unknown CPU endianness" cpu))))) diff --git a/package/guile/0002-calculate-csqrt_manually.patch b/package/guile/0002-calculate-csqrt_manually.patch new file mode 100644 index 0000000000..98bb0b6850 --- /dev/null +++ b/package/guile/0002-calculate-csqrt_manually.patch @@ -0,0 +1,16 @@ +Avoid using scm_from_complex_double(csqrt()) when building with uclibc. + +Signed-off-by: Pedro Aguilar + +diff -Nau guile-2.0.11.orig/configure.ac guile-2.0.11/configure.ac +--- guile-2.0.11.orig/configure.ac 2014-03-12 14:36:02.000000000 +0100 ++++ guile-2.0.11/configure.ac 2014-11-03 23:59:51.897267207 +0100 +@@ -862,7 +862,7 @@ + }]])], + [guile_cv_use_csqrt=yes], + [guile_cv_use_csqrt="no, glibc 2.3 bug"], +- [guile_cv_use_csqrt="yes, hopefully (cross-compiling)"])]) ++ [guile_cv_use_csqrt="no (cross-compiling)"])]) + case $guile_cv_use_csqrt in + yes*) + AC_DEFINE([HAVE_USABLE_CSQRT], 1, [Define to 1 if csqrt is bug-free]) diff --git a/package/guile/0003-remove_unused_funcs.patch b/package/guile/0003-remove_unused_funcs.patch new file mode 100644 index 0000000000..3d70ee9fc9 --- /dev/null +++ b/package/guile/0003-remove_unused_funcs.patch @@ -0,0 +1,36 @@ +Remove unused static inline functions str_upcase_l() and +str_downcase_l() that cause the compilation error: +'dereferencing pointer to incomplete type'. + +Signed-off-by: Pedro Aguilar + +diff -Nau guile-2.0.11.orig/libguile/i18n.c guile-2.0.11/libguile/i18n.c +--- guile-2.0.11.orig/libguile/i18n.c 2014-01-21 22:25:11.000000000 +0100 ++++ guile-2.0.11/libguile/i18n.c 2014-11-04 23:18:52.675435613 +0100 +@@ -851,26 +851,6 @@ + *dst = '\0'; + } + +-#ifdef USE_GNU_LOCALE_API +-static inline void +-str_upcase_l (register char *dst, register const char *src, +- scm_t_locale locale) +-{ +- for (; *src != '\0'; src++, dst++) +- *dst = toupper_l (*src, locale); +- *dst = '\0'; +-} +- +-static inline void +-str_downcase_l (register char *dst, register const char *src, +- scm_t_locale locale) +-{ +- for (; *src != '\0'; src++, dst++) +- *dst = tolower_l (*src, locale); +- *dst = '\0'; +-} +-#endif +- + + SCM_DEFINE (scm_string_locale_lt, "string-locale for instructions. +... + +Tweak libguile/vm-i-system.c to add boundary value check to workaround it. + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia + +Fixes Buildroot autobuilder failures on AArch64. + +Signed-off-by: Thomas Petazzoni +--- + libguile/vm-i-system.c | 20 ++++++++++++++++---- + 1 file changed, 16 insertions(+), 4 deletions(-) + +diff --git a/libguile/vm-i-system.c b/libguile/vm-i-system.c +--- a/libguile/vm-i-system.c ++++ b/libguile/vm-i-system.c +@@ -625,10 +625,22 @@ VM_DEFINE_INSTRUCTION (47, bind_optionals_shuffle, "bind-optionals/shuffle", 6, + /* now shuffle up, from walk to ntotal */ + { + scm_t_ptrdiff nshuf = sp - walk + 1, i; +- sp = (fp - 1) + ntotal + nshuf; +- CHECK_OVERFLOW (); +- for (i = 0; i < nshuf; i++) +- sp[-i] = walk[nshuf-i-1]; ++ /* check the value of nshuf to workaround ice ssa corruption */ ++ /* while compiling with -O -g */ ++ if (nshuf > 0) ++ { ++ sp = (fp - 1) + ntotal + nshuf; ++ CHECK_OVERFLOW (); ++ for (i = 0; i < nshuf; i++) ++ sp[-i] = walk[nshuf-i-1]; ++ } ++ else ++ { ++ sp = (fp - 1) + ntotal + nshuf; ++ CHECK_OVERFLOW (); ++ for (i = 0; i < nshuf; i++) ++ sp[-i] = walk[nshuf-i-1]; ++ } + } + /* and fill optionals & keyword args with SCM_UNDEFINED */ + while (walk <= (fp - 1) + ntotal) +-- +1.9.1 + diff --git a/package/guile/Config.in b/package/guile/Config.in new file mode 100644 index 0000000000..b3f744ea41 --- /dev/null +++ b/package/guile/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_GUILE + bool "guile" + depends on !BR2_TOOLCHAIN_USES_MUSL # no strtol_l + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS # bdwgc + depends on BR2_USE_WCHAR # libunistring + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_LIBUNISTRING + select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_GMP + select BR2_PACKAGE_BDWGC + select BR2_PACKAGE_LIBTOOL + help + Guile is an interpreter and compiler for the Scheme + programming language, a clean and elegant dialect of Lisp. + + http://www.gnu.org/software/guile + +comment "guile needs a uClibc or (e)glibc toolchain w/ threads, wchar, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \ + BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + diff --git a/package/guile/guile.hash b/package/guile/guile.hash new file mode 100644 index 0000000000..9ba0bf506a --- /dev/null +++ b/package/guile/guile.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 aed0a4a6db4e310cbdfeb3613fa6f86fddc91ef624c1e3f8937a6304c69103e2 guile-2.0.11.tar.xz diff --git a/package/guile/guile.mk b/package/guile/guile.mk new file mode 100644 index 0000000000..0e0b1a34c1 --- /dev/null +++ b/package/guile/guile.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# guile +# +################################################################################ + +GUILE_VERSION = 2.0.11 +GUILE_SOURCE = guile-$(GUILE_VERSION).tar.xz +GUILE_SITE = $(BR2_GNU_MIRROR)/guile +GUILE_INSTALL_STAGING = YES +# For 0002-calculate-csqrt_manually.patch +GUILE_AUTORECONF = YES +GUILE_LICENSE = LGPLv3+ +GUILE_LICENSE_FILES = LICENSE COPYING COPYING.LESSER + +# libtool dependency is needed because guile uses libltdl +GUILE_DEPENDENCIES = host-guile libunistring libffi gmp bdwgc host-pkgconf libtool +HOST_GUILE_DEPENDENCIES = host-libunistring host-libffi host-gmp host-bdwgc host-flex host-pkgconf host-gettext + +# The HAVE_GC* CFLAGS specify that we will use internal callbacks +# instead of the ones provided by +# bdwgc. Eg. HAVE_GC_SET_FINALIZER_NOTIFIER specifies that we won't +# use bdwgc's GC_finalizer_notifier callback. Trying to use these +# specific bdwgc's callbacks breaks guile's building. +GUILE_CFLAGS = \ + -DHAVE_GC_SET_FINALIZER_NOTIFIER \ + -DHAVE_GC_GET_HEAP_USAGE_SAFE \ + -DHAVE_GC_GET_FREE_SPACE_DIVISOR \ + -DHAVE_GC_SET_FINALIZE_ON_DEMAND + +ifeq ($(BR2_STATIC_LIBS),y) +GUILE_CFLAGS += -DGC_NO_DLOPEN +endif + +# It can use readline, but on the condition that it was build against +# ncurses. If both aren't present disable readline support since the +# host readline/ncurses support can poison the build. +ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_READLINE),yy) +GUILE_CONF_OPTS += --with-libreadline-prefix=$(STAGING_DIR)/usr +GUILE_DEPENDENCIES += readline +else +GUILE_CONF_OPTS += --without-libreadline-prefix +endif + +GUILE_CONF_ENV += GUILE_FOR_BUILD=$(HOST_DIR)/usr/bin/guile \ + CFLAGS="$(TARGET_CFLAGS) $(GUILE_CFLAGS)" + +GUILE_CONF_OPTS += \ + --with-libltdl-prefix=$(STAGING_DIR)/usr/lib \ + --with-libgmp-prefix=$(STAGING_DIR)/usr/lib \ + --with-libunistring-prefix=$(STAGING_DIR)/usr/lib + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gupnp-av/Config.in b/package/gupnp-av/Config.in new file mode 100644 index 0000000000..5320b82b5a --- /dev/null +++ b/package/gupnp-av/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_GUPNP_AV + bool "gupnp-av" + depends on BR2_USE_WCHAR # glib2, gupnp + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2, gupnp + depends on BR2_USE_MMU # glib2, gupnp + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GUPNP + select BR2_PACKAGE_LIBXML2 + help + GUPnP-AV is a collection of helpers for building AV (audio/video) + applications using GUPnP. + + http://www.gupnp.org/ + +comment "gupnp-av needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gupnp-av/gupnp-av.hash b/package/gupnp-av/gupnp-av.hash new file mode 100644 index 0000000000..b97317195f --- /dev/null +++ b/package/gupnp-av/gupnp-av.hash @@ -0,0 +1,2 @@ +# Hash from: http://ftp.gnome.org/pub/gnome/sources/gupnp-av/0.12/gupnp-av-0.12.8.sha256sum: +sha256 759bc7d46aff894c282d17f508d9b5be82de96aa74b10cb6b0fc6c5e07cc273c gupnp-av-0.12.8.tar.xz diff --git a/package/gupnp-av/gupnp-av.mk b/package/gupnp-av/gupnp-av.mk new file mode 100644 index 0000000000..5835155155 --- /dev/null +++ b/package/gupnp-av/gupnp-av.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# gupnp-av +# +################################################################################ + +GUPNP_AV_VERSION_MAJOR = 0.12 +GUPNP_AV_VERSION = $(GUPNP_AV_VERSION_MAJOR).8 +GUPNP_AV_SOURCE = gupnp-av-$(GUPNP_AV_VERSION).tar.xz +GUPNP_AV_SITE = http://ftp.gnome.org/pub/gnome/sources/gupnp-av/$(GUPNP_AV_VERSION_MAJOR) +GUPNP_AV_LICENSE = LGPLv2+ +GUPNP_AV_LICENSE_FILES = COPYING +GUPNP_AV_INSTALL_STAGING = YES +GUPNP_AV_DEPENDENCIES = host-pkgconf libglib2 libxml2 gupnp + +$(eval $(autotools-package)) diff --git a/package/gupnp/Config.in b/package/gupnp/Config.in new file mode 100644 index 0000000000..a5ecab771e --- /dev/null +++ b/package/gupnp/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_GUPNP + bool "gupnp" + depends on BR2_USE_WCHAR # glib2, gssdp, util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2, gssdp + depends on BR2_USE_MMU # glib2, gssdp + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GSSDP + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + GUPnP implements the UPnP specification: resource announcement + and discovery, description, control, event notification, and + presentation. + + http://www.gupnp.org/ + +comment "gupnp needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gupnp/gupnp.hash b/package/gupnp/gupnp.hash new file mode 100644 index 0000000000..4208ecda9b --- /dev/null +++ b/package/gupnp/gupnp.hash @@ -0,0 +1,2 @@ +# Hash from: http://ftp.gnome.org/pub/gnome/sources/gupnp/0.20/gupnp-0.20.16.sha256sum: +sha256 ff1119eff12529c46837e03c742f69dc4fae48d59097d79582d38a383b832602 gupnp-0.20.16.tar.xz diff --git a/package/gupnp/gupnp.mk b/package/gupnp/gupnp.mk new file mode 100644 index 0000000000..c3ec0a0ba8 --- /dev/null +++ b/package/gupnp/gupnp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# gupnp +# +################################################################################ + +GUPNP_VERSION_MAJOR = 0.20 +GUPNP_VERSION = $(GUPNP_VERSION_MAJOR).16 +GUPNP_SOURCE = gupnp-$(GUPNP_VERSION).tar.xz +GUPNP_SITE = http://ftp.gnome.org/pub/gnome/sources/gupnp/$(GUPNP_VERSION_MAJOR) +GUPNP_LICENSE = LGPLv2+ +GUPNP_LICENSE_FILES = COPYING +GUPNP_INSTALL_STAGING = YES +GUPNP_DEPENDENCIES = host-pkgconf libglib2 libxml2 gssdp util-linux + +$(eval $(autotools-package)) diff --git a/package/gutenprint/0001-use-pregen-xmli18n-header.patch b/package/gutenprint/0001-use-pregen-xmli18n-header.patch new file mode 100644 index 0000000000..533fe33d82 --- /dev/null +++ b/package/gutenprint/0001-use-pregen-xmli18n-header.patch @@ -0,0 +1,48 @@ +src/xml: use preg-gen xmli18n_tmp.h if specified + +Ideally, the programs needed at build-time should be built with +CC_FOR_BUILD, and not with CC_FOR_HOST. + +Unfortunately, this program wants to link against the gutenprint libs, +so we would also need to build them with CC_FOR_HOST, that is build them +twice, once for build, once for host. + +Instead, in the Buildroot context, we first build gutenprint for the build +system, use that to generate the incriminated header, and then re-use that +header to build the gutenprint for the host. + +It is not possible to have such constructs in Makefile.am: + ifeq ($(FOO),) + bar: bla + cat $< >$@ + else + bar: + echo $(FOO) >$@ + endif + +as autoreconf will yell loudly that there is an 'endif' without an 'if'. +Sigh... :-( + +Signed-off-by: "Yann E. MORIN" + +diff -durN gutenprint-5.2.9.orig/src/xml/Makefile.am gutenprint-5.2.9/src/xml/Makefile.am +--- gutenprint-5.2.9.orig/src/xml/Makefile.am 2011-03-30 02:43:24.000000000 +0200 ++++ gutenprint-5.2.9/src/xml/Makefile.am 2013-03-24 17:08:08.435918773 +0100 +@@ -52,10 +52,13 @@ + + + xmli18n-tmp.h: xml-stamp extract-strings +- -rm -f $@ $@.tmp +- ./extract-strings `cat xml-stamp | sed -e 's;^;$(srcdir)/;'` > $@.tmp +- mv $@.tmp $@ +- ++ if [ -z "$(BR2_USE_PREGEN_XMLI18N_TMP_H)" ]; then \ ++ rm -f $@ $@.tmp; \ ++ ./extract-strings `cat xml-stamp | sed -e 's;^;$(srcdir)/;'` > $@.tmp; \ ++ mv $@.tmp $@; \ ++ else \ ++ cp $(BR2_USE_PREGEN_XMLI18N_TMP_H) $@; \ ++ fi + + dist-hook: xmli18n-tmp.h xml-stamp + # xmli18n-tmp.h is needed by po/POTFILES.in at dist time diff --git a/package/gutenprint/0002-cups-support-replaces-static-with-static-libtool-lib.patch b/package/gutenprint/0002-cups-support-replaces-static-with-static-libtool-lib.patch new file mode 100644 index 0000000000..d8cfb7d9d7 --- /dev/null +++ b/package/gutenprint/0002-cups-support-replaces-static-with-static-libtool-lib.patch @@ -0,0 +1,39 @@ +From 08a5d355160eb2ac8346ae1b94591418343217f9 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 17 Aug 2014 23:43:20 +0200 +Subject: [PATCH 1/1] cups support: replaces -static with -static-libtool-libs + +gutenprint rely on the original behaviour of -static, but since commit +in buildroot "support/libtool: make -static behave like -all-static" [1], +the build of genppd is broken. + +genppd need to be build statically otherwise the following warning appears: +***WARNING: Use of --disable-static-genppd or --disable-static + when building CUPS is very dangerous. The build may + fail when building the PPD files, or may *SILENTLY* + build incorrect PPD files or cause other problems. + Please review the README and release notes carefully! + +[1] http://git.buildroot.net/buildroot/commit/?id=97703978ac870ce2b14ad144f8e082de82aa2c64 + +Signed-off-by: Romain Naour +--- + src/cups/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cups/Makefile.am b/src/cups/Makefile.am +index 1e27ae0..d711b70 100644 +--- a/src/cups/Makefile.am ++++ b/src/cups/Makefile.am +@@ -84,7 +84,7 @@ noinst_SCRIPTS=test-rastertogutenprint + endif + + if BUILD_GENPPD_STATIC +-STATIC_LDOPTS=-static -export-dynamic ++STATIC_LDOPTS=-static-libtool-libs -export-dynamic + endif + + cups_calibrate_SOURCES = cups-calibrate.c +-- +1.9.3 + diff --git a/package/gutenprint/0003-print-olympus.c-fix-endianness-detection.patch b/package/gutenprint/0003-print-olympus.c-fix-endianness-detection.patch new file mode 100644 index 0000000000..fc1746ca00 --- /dev/null +++ b/package/gutenprint/0003-print-olympus.c-fix-endianness-detection.patch @@ -0,0 +1,33 @@ +From e0dad4bb237f1155e920c30c6fd3412e96a3e84d Mon Sep 17 00:00:00 2001 +From: Olivier Schonken +Date: Sun, 24 Jan 2016 17:14:21 +0200 +Subject: [PATCH 1/1] print-olympus.c: fix endianness detection + +The __LITTLE_ENDIAN__ and __BIG_ENDIAN__ macros are not a reliable way to +detect endianness. Instead, rely on __BYTE_ORDER like we do in the rest of +the code. + +Signed-off-by: Olivier Schonken +--- + src/main/print-olympus.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/main/print-olympus.c b/src/main/print-olympus.c +index 42c4897..8b2aa80 100644 +--- a/src/main/print-olympus.c ++++ b/src/main/print-olympus.c +@@ -4901,9 +4901,9 @@ dyesub_do_print(stp_vars_t *v, stp_image_t *image) + } + + if (pv.bytes_per_ink_channel > 1) { +-#if defined(__LITTLE_ENDIAN) || defined(__LITTLE_ENDIAN__) ++#if (__BYTE_ORDER == __LITTLE_ENDIAN) + pv.byteswap = dyesub_feature(caps, DYESUB_FEATURE_BIGENDIAN); +-#elif defined (__BIG_ENDIAN) || defined(__BIG_ENDIAN__) ++#elif (__BYTE_ORDER == __BIG_ENDIAN) + pv.byteswap = !dyesub_feature(caps, DYESUB_FEATURE_BIGENDIAN); + #else + #error "Unable to determine endianness, aborting compilation!" +-- +1.9.1 + diff --git a/package/gutenprint/0004-build-Don-t-allow-USB-backends-to-be-built-if-CUPS-i.patch b/package/gutenprint/0004-build-Don-t-allow-USB-backends-to-be-built-if-CUPS-i.patch new file mode 100644 index 0000000000..1ecc89ede8 --- /dev/null +++ b/package/gutenprint/0004-build-Don-t-allow-USB-backends-to-be-built-if-CUPS-i.patch @@ -0,0 +1,41 @@ +From b5e8dc446572c1198a24eff105a394d0f307951e Mon Sep 17 00:00:00 2001 +From: Solomon Peachy +Date: Fri, 15 Apr 2016 23:05:43 -0400 +Subject: [PATCH] build: Don't allow USB backends to be built if CUPS is not + enabled. + +[Waldemar: backport from upstream commit +fc1713589fed645f2c8002c3f66dfb69af314716.] +Signed-off-by: Waldemar Brodkorb +--- + configure.ac | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 800794b..ba30019 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -442,12 +442,14 @@ dnl if test -z "${[EXTRA_LIBREADLINE_DEPS]}" ; then + dnl [EXTRA_LIBREADLINE_DEPS]="" + dnl fi + +-# libusb-1.0 (For CUPS backends) +-PKG_CHECK_MODULES([LIBUSB], [libusb-1.0], +- [HAVE_LIBUSB=yes +- BUILD_LIBUSB_BACKENDS=yes], +- [HAVE_LIBUSB=no +- BUILD_LIBUSB_BACKENDS=no]) ++# libusb-1.0 (For CUPS backends, but only bother if CUPS is enabled) ++if test "x$BUILD_CUPS" = "xyes" ; then ++ PKG_CHECK_MODULES([LIBUSB], [libusb-1.0], ++ [HAVE_LIBUSB=yes ++ BUILD_LIBUSB_BACKENDS=yes], ++ [HAVE_LIBUSB=no ++ BUILD_LIBUSB_BACKENDS=no]) ++fi + + AC_PATH_PROGS([GIMPTOOL2_CHECK], [gimptool-2.0 gimptool]) + if test -z "${GIMPTOOL2_CHECK}" ; then +-- +2.6.4 + diff --git a/package/gutenprint/Config.in b/package/gutenprint/Config.in new file mode 100644 index 0000000000..f93717c7f2 --- /dev/null +++ b/package/gutenprint/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_GUTENPRINT + bool "gutenprint" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_CUPS + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Gutenprint, formerly named Gimp-Print, is a suite of printer + drivers that may be used with most common UNIX print spooling + systems, including CUPS, lpr, LPRng, or others + + http://gimp-print.sourceforge.net/ + +comment "gutenprint needs a toolchain w/ C++" + depends on BR2_PACKAGE_CUPS + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/gutenprint/gutenprint.hash b/package/gutenprint/gutenprint.hash new file mode 100644 index 0000000000..a52cc7d42d --- /dev/null +++ b/package/gutenprint/gutenprint.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 c1a34cd2e02527de4d2a9bf6c14732cb9aa11b333f771eb6043fdc974de24df9 gutenprint-5.2.11.tar.bz2 diff --git a/package/gutenprint/gutenprint.mk b/package/gutenprint/gutenprint.mk new file mode 100644 index 0000000000..8ee2406abb --- /dev/null +++ b/package/gutenprint/gutenprint.mk @@ -0,0 +1,92 @@ +################################################################################ +# +# gutenprint +# +################################################################################ + +GUTENPRINT_VERSION_MAJOR = 5.2 +GUTENPRINT_VERSION = $(GUTENPRINT_VERSION_MAJOR).11 +GUTENPRINT_SITE = http://downloads.sourceforge.net/project/gimp-print/gutenprint-$(GUTENPRINT_VERSION_MAJOR)/$(GUTENPRINT_VERSION) +GUTENPRINT_SOURCE = gutenprint-$(GUTENPRINT_VERSION).tar.bz2 +GUTENPRINT_LICENSE = GPLv2+ +GUTENPRINT_LICENSE_FILES = COPYING + +# Needed, as we touch Makefile.am and configure.ac +GUTENPRINT_AUTORECONF = YES + +GUTENPRINT_DEPENDENCIES = \ + cups host-pkgconf \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) \ + $(if $(BR2_PACKAGE_LIBUSB),libusb) + +# host-gutenprint is needed to generate XML as part of compilation +# the program that generates the xml also links against libgutenprint +# so we need to build both a host package and a target package +GUTENPRINT_DEPENDENCIES += host-gutenprint + +GUTENPRINT_CONF_ENV = \ + ac_cv_path_CUPS_CONFIG=$(STAGING_DIR)/usr/bin/cups-config \ + ac_cv_path_IJS_CONFIG="" + +GUTENPRINT_CONF_OPTS = \ + --disable-libgutenprintui2 \ + --disable-samples \ + --without-doc \ + --without-gimp2 \ + --without-foomatic \ + --without-foomatic3 \ + --disable-escputil \ + --disable-test \ + --disable-testpattern \ + --with-cups="/usr" \ + --with-sysroot="$(STAGING_DIR)" \ + --disable-cups-ppds + +# USE_PREGEN_XMLI18N_TMP_H is added by our patch +GUTENPRINT_MAKE_ENV = BR2_USE_PREGEN_XMLI18N_TMP_H=$(HOST_DIR)/usr/include/xmli18n-tmp.h + +HOST_GUTENPRINT_DEPENDENCIES = host-pkgconf +# The host-gutenprint shall create the required header +HOST_GUTENPRINT_MAKE_ENV = + +# Even with --without-cups, gutenprint will still add the output of +# cups-config --cflags / --ldflags to it's compiler/linker flags if +# available on host. +# Notice: Because of the configure logic, it needs to be set to the +# empty string to to disable this, not just to /bin/false like elsewhere. +HOST_GUTENPRINT_CONF_ENV = ac_cv_path_CUPS_CONFIG='' + +HOST_GUTENPRINT_CONF_OPTS = \ + --disable-libgutenprintui2 \ + --disable-samples \ + --without-gimp2 \ + --without-doc \ + --disable-nls \ + --disable-nls-macos \ + --without-foomatic \ + --without-foomatic3 \ + --disable-escputil \ + --disable-test \ + --disable-testpattern \ + --without-cups + +# Needed by autoreconf +define GUTENPRINT_CREATE_M4_DIR + mkdir -p $(@D)/m4local +endef +GUTENPRINT_POST_PATCH_HOOKS += GUTENPRINT_CREATE_M4_DIR +HOST_GUTENPRINT_POST_PATCH_HOOKS += GUTENPRINT_CREATE_M4_DIR + +define HOST_GUTENPRINT_POST_BUILD_INSTAL_TMP_HEADER + cp $(@D)/src/xml/xmli18n-tmp.h $(HOST_DIR)/usr/include +endef +HOST_GUTENPRINT_POST_BUILD_HOOKS += HOST_GUTENPRINT_POST_BUILD_INSTAL_TMP_HEADER + +define GUTENPRINT_POST_INSTALL_TARGET_FIXUP + mkdir -p $(TARGET_DIR)/usr/share/gutenprint/5.2 + cp -rf $(HOST_DIR)/usr/share/gutenprint/5.2/xml $(TARGET_DIR)/usr/share/gutenprint/5.2 +endef +GUTENPRINT_POST_INSTALL_TARGET_HOOKS += GUTENPRINT_POST_INSTALL_TARGET_FIXUP + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/gvfs/Config.in b/package/gvfs/Config.in new file mode 100644 index 0000000000..44a75210e5 --- /dev/null +++ b/package/gvfs/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_GVFS + bool "gvfs" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_USE_MMU # dbus, glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_SHARED_MIME_INFO + help + gvfs is a userspace virtual filesystem where mount runs as a + separate processes which you talk to via D-Bus. It also + contains a gio module that seamlessly adds gvfs support to + all applications using the gio API. It also supports exposing + the gvfs mounts to non-gio applications using fuse. + + https://wiki.gnome.org/action/show/Projects/gvfs + +comment "gvfs needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/gvfs/gvfs.hash b/package/gvfs/gvfs.hash new file mode 100644 index 0000000000..1fec32c982 --- /dev/null +++ b/package/gvfs/gvfs.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/gvfs/1.28/gvfs-1.28.2.sha256sum +sha256 bc6af45cff7e7e8d33c3a4be1d27e479f10f80105a6f2d1fae75c5c0d40636d9 gvfs-1.28.2.tar.xz diff --git a/package/gvfs/gvfs.mk b/package/gvfs/gvfs.mk new file mode 100644 index 0000000000..8e885732df --- /dev/null +++ b/package/gvfs/gvfs.mk @@ -0,0 +1,138 @@ +################################################################################ +# +# gvfs +# +################################################################################ + +GVFS_VERSION_MAJOR = 1.28 +GVFS_VERSION = $(GVFS_VERSION_MAJOR).2 +GVFS_SOURCE = gvfs-$(GVFS_VERSION).tar.xz +GVFS_SITE = http://ftp.gnome.org/pub/GNOME/sources/gvfs/$(GVFS_VERSION_MAJOR) +GVFS_INSTALL_STAGING = YES +GVFS_DEPENDENCIES = host-pkgconf host-libglib2 libglib2 dbus shared-mime-info +GVFS_LICENSE = LGPLv2+ +GVFS_LICENSE_FILES = COPYING + +# Export ac_cv_path_LIBGCRYPT_CONFIG unconditionally to prevent +# build system from searching the host paths. +GVFS_CONF_ENV = ac_cv_path_LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config + +# Most of these are missing library support +GVFS_CONF_OPTS = \ + --disable-afc \ + --disable-bash-completion \ + --disable-cdda \ + --disable-gconf \ + --disable-gcr \ + --disable-gdu \ + --disable-goa \ + --disable-google \ + --disable-gphoto2 \ + --disable-hal \ + --disable-keyring \ + --disable-libmtp \ + --disable-udisks2 + +ifeq ($(BR2_PACKAGE_AVAHI),y) +GVFS_DEPENDENCIES += avahi +GVFS_CONF_OPTS += --enable-avahi +else +GVFS_CONF_OPTS += --disable-avahi +endif + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +GVFS_DEPENDENCIES += udev +endif + +ifeq ($(BR2_PACKAGE_LIBGUDEV),y) +GVFS_DEPENDENCIES += libgudev +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +GVFS_DEPENDENCIES += libarchive +GVFS_CONF_OPTS += \ + --enable-archive \ + --with-archive-includes=$(STAGING_DIR)/usr \ + --with-archive-libs=$(STAGING_DIR)/usr +else +GVFS_CONF_OPTS += --disable-archive +endif + +ifeq ($(BR2_PACKAGE_LIBBLURAY),y) +GVFS_DEPENDENCIES += libbluray +GVFS_CONF_OPTS += --enable-bluray +else +GVFS_CONF_OPTS += --disable-bluray +endif + +ifeq ($(BR2_PACKAGE_LIBFUSE),y) +GVFS_DEPENDENCIES += libfuse +GVFS_CONF_OPTS += --enable-fuse +else +GVFS_CONF_OPTS += --disable-fuse +endif + +# AFP support is anon-only without libgcrypt which isn't very useful +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +GVFS_CONF_OPTS += --enable-afp +GVFS_DEPENDENCIES += libgcrypt +else +GVFS_CONF_OPTS += --disable-afp +endif + +ifeq ($(BR2_PACKAGE_LIBGTK3),y) +GVFS_CONF_OPTS += --enable-gtk +GVFS_DEPENDENCIES += libgtk3 +else +GVFS_CONF_OPTS += --disable-gtk +endif + +ifeq ($(BR2_PACKAGE_LIBNFS),y) +GVFS_CONF_OPTS += --enable-nfs +GVFS_DEPENDENCIES += libnfs +else +GVFS_CONF_OPTS += --disable-nfs +endif + +ifeq ($(BR2_PACKAGE_LIBSOUP),y) +GVFS_DEPENDENCIES += libsoup +GVFS_CONF_OPTS += --enable-http +else +GVFS_CONF_OPTS += --disable-http +endif + +ifeq ($(BR2_PACKAGE_SAMBA4),y) +GVFS_DEPENDENCIES += samba4 +GVFS_CONF_OPTS += \ + --enable-samba \ + --with-samba-includes=$(STAGING_DIR)/usr/include/samba-4.0 \ + --with-samba-libs=$(STAGING_DIR)/usr/lib \ + ac_cv_lib_smbclient_smbc_option_get=yes +else +GVFS_CONF_OPTS += --disable-samba +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +GVFS_DEPENDENCIES += systemd +else +GVFS_CONF_OPTS += --disable-libsystemd-login +endif + +define GVFS_REMOVE_USELESS_BINARY + rm $(TARGET_DIR)/usr/bin/gvfs-less +endef + +define GVFS_REMOVE_TARGET_SCHEMAS + rm $(TARGET_DIR)/usr/share/glib-2.0/schemas/*.xml +endef + +define GVFS_COMPILE_SCHEMAS + $(HOST_DIR)/usr/bin/glib-compile-schemas --targetdir=$(TARGET_DIR)/usr/share/glib-2.0/schemas $(STAGING_DIR)/usr/share/glib-2.0/schemas +endef + +GVFS_POST_INSTALL_TARGET_HOOKS += \ + GVFS_REMOVE_USELESS_BINARY \ + GVFS_REMOVE_TARGET_SCHEMAS \ + GVFS_COMPILE_SCHEMAS + +$(eval $(autotools-package)) diff --git a/package/gzip/Config.in b/package/gzip/Config.in new file mode 100644 index 0000000000..a251425f6e --- /dev/null +++ b/package/gzip/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_GZIP + bool "gzip" + depends on BR2_USE_WCHAR + help + Standard GNU compressor. Provides things like gzip, + gunzip, gzcat, etc... + + http://www.gnu.org/software/gzip/gzip.html + +comment "gzip needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/gzip/gzip.hash b/package/gzip/gzip.hash new file mode 100644 index 0000000000..466f846e12 --- /dev/null +++ b/package/gzip/gzip.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 ff1767ec444f71e5daf8972f6f8bf68cfcca1d2f76c248eb18e8741fc91dbbd3 gzip-1.8.tar.xz diff --git a/package/gzip/gzip.mk b/package/gzip/gzip.mk new file mode 100644 index 0000000000..6dc910ec15 --- /dev/null +++ b/package/gzip/gzip.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# gzip +# +################################################################################ + +GZIP_VERSION = 1.8 +GZIP_SOURCE = gzip-$(GZIP_VERSION).tar.xz +GZIP_SITE = $(BR2_GNU_MIRROR)/gzip +# Some other tools expect it to be in /bin +GZIP_CONF_OPTS = --exec-prefix=/ +# Prefer full gzip over potentially lightweight/slower from busybox +GZIP_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox) +GZIP_LICENSE = GPLv3+ +GZIP_LICENSE_FILES = COPYING +GZIP_CONF_ENV += gl_cv_func_fflush_stdin=yes + +$(eval $(autotools-package)) diff --git a/package/hans/Config.in b/package/hans/Config.in new file mode 100644 index 0000000000..7b60090f62 --- /dev/null +++ b/package/hans/Config.in @@ -0,0 +1,13 @@ +comment "hans needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_HANS + bool "hans" + depends on BR2_INSTALL_LIBSTDCPP + help + Hans makes it possible to tunnel IPv4 through ICMP echo packets, + so you could call it a ping tunnel. + This can be useful when you find yourself in the situation + that your Internet access is firewalled, but pings are allowed. + + http://code.gerade.org/hans/ diff --git a/package/hans/hans.hash b/package/hans/hans.hash new file mode 100644 index 0000000000..c1a28df129 --- /dev/null +++ b/package/hans/hans.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/hanstunnel/files/source/ +md5 97a93a886bc766212257198fd99d1061 hans-0.4.4.tar.gz +sha1 8a21a9acc6d52cf7d2a5049523469e2609716ab3 hans-0.4.4.tar.gz diff --git a/package/hans/hans.mk b/package/hans/hans.mk new file mode 100644 index 0000000000..bda091f33a --- /dev/null +++ b/package/hans/hans.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# hans +# +################################################################################ + +HANS_VERSION = 0.4.4 +HANS_SITE = http://downloads.sourceforge.net/project/hanstunnel/source +HANS_LICENSE = GPLv3+ +HANS_LICENSE_FILES = LICENSE + +define HANS_BUILD_CMDS + $(MAKE) GCC="$(TARGET_CC)" GPP="$(TARGET_CXX)" -C $(@D) +endef + +define HANS_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/hans $(TARGET_DIR)/usr/sbin/hans +endef + +$(eval $(generic-package)) diff --git a/package/harfbuzz/Config.in b/package/harfbuzz/Config.in new file mode 100644 index 0000000000..a6db9840cc --- /dev/null +++ b/package/harfbuzz/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_HARFBUZZ + bool "harfbuzz" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + help + HarfBuzz is an OpenType text shaping engine + + http://www.freedesktop.org/wiki/Software/HarfBuzz/ + + Harfbuzz can make optional use of cairo, freetype, + glib2 and icu packages if they are selected. + +comment "harfbuzz needs a toolchain w/ C++" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/harfbuzz/harfbuzz.hash b/package/harfbuzz/harfbuzz.hash new file mode 100644 index 0000000000..e8a909d300 --- /dev/null +++ b/package/harfbuzz/harfbuzz.hash @@ -0,0 +1,2 @@ +# From http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.2.7.tar.bz2.sha256 +sha256 bba0600ae08b84384e6d2d7175bea10b5fc246c4583dc841498d01894d479026 harfbuzz-1.2.7.tar.bz2 diff --git a/package/harfbuzz/harfbuzz.mk b/package/harfbuzz/harfbuzz.mk new file mode 100644 index 0000000000..8e8e7b67e7 --- /dev/null +++ b/package/harfbuzz/harfbuzz.mk @@ -0,0 +1,69 @@ +################################################################################ +# +# harfbuzz +# +################################################################################ + +HARFBUZZ_VERSION = 1.2.7 +HARFBUZZ_SITE = http://www.freedesktop.org/software/harfbuzz/release +HARFBUZZ_SOURCE = harfbuzz-$(HARFBUZZ_VERSION).tar.bz2 +HARFBUZZ_LICENSE = MIT, ISC (ucdn library) +HARFBUZZ_LICENSE_FILES = COPYING src/hb-ucdn/COPYING +HARFBUZZ_INSTALL_STAGING = YES +HARFBUZZ_CONF_OPTS = --with-coretext=no --with-uniscribe=no + +# freetype & glib2 support required by host-pango +HOST_HARFBUZZ_DEPENDENCIES = \ + host-freetype \ + host-libglib2 +HOST_HARFBUZZ_CONF_OPTS = \ + --with-coretext=no \ + --with-uniscribe=no \ + --with-graphite2=no \ + --with-cairo=no \ + --with-icu=no \ + --with-freetype=yes \ + --with-glib=yes + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +# forgets to link test programs with -pthread breaking static link +HARFBUZZ_CONF_ENV = LDFLAGS="$(TARGET_LDFLAGS) -pthread" +endif + +ifeq ($(BR2_PACKAGE_CAIRO),y) +HARFBUZZ_DEPENDENCIES += cairo +HARFBUZZ_CONF_OPTS += --with-cairo=yes +else +HARFBUZZ_CONF_OPTS += --with-cairo=no +endif + +ifeq ($(BR2_PACKAGE_FREETYPE),y) +HARFBUZZ_DEPENDENCIES += freetype +HARFBUZZ_CONF_OPTS += --with-freetype=yes +else +HARFBUZZ_CONF_OPTS += --with-freetype=no +endif + +ifeq ($(BR2_PACKAGE_GRAPHITE2),y) +HARFBUZZ_DEPENDENCIES += graphite2 +HARFBUZZ_CONF_OPTS += --with-graphite2=yes +else +HARFBUZZ_CONF_OPTS += --with-graphite2=no +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +HARFBUZZ_DEPENDENCIES += libglib2 +HARFBUZZ_CONF_OPTS += --with-glib=yes +else +HARFBUZZ_CONF_OPTS += --with-glib=no +endif + +ifeq ($(BR2_PACKAGE_ICU),y) +HARFBUZZ_DEPENDENCIES += icu +HARFBUZZ_CONF_OPTS += --with-icu=yes +else +HARFBUZZ_CONF_OPTS += --with-icu=no +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/haserl/0001-add-haserl_lualib.inc.patch b/package/haserl/0001-add-haserl_lualib.inc.patch new file mode 100644 index 0000000000..f9e2a95e42 --- /dev/null +++ b/package/haserl/0001-add-haserl_lualib.inc.patch @@ -0,0 +1,149 @@ +[HACK] add preprocessed lualib file so host-lua isn't needed + +Haserl no longer ships with haserl_lualib.inc, causing lua2c (which needs +host-lua support) to be built to generate it. + +Re-add .inc file from 0.9.33 so we don't need host-lua. + +Signed-off-by: Peter Korsgaard +Signed-off-by: Max Filippov +--- + src/Makefile.in | 3 - + src/haserl_lualib.inc | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 98 insertions(+), 2 deletions(-) + +Index: haserl-0.9.33/src/haserl_lualib.inc +=================================================================== +--- /dev/null ++++ haserl-0.9.33/src/haserl_lualib.inc +@@ -0,0 +1,109 @@ ++/* This file was automatically generated from haserl_lualib.lua. DO NOT EDIT */ ++ ++static const unsigned char haserl_lualib[] = { ++ 27, 76,117, 97, 81, 0, 1, 4, 8, 4, 8, 0, 19, 0, 0, 0, ++ 0, 0, 0, 0, 64,104, 97,115,101,114,108, 95,108,117, 97,108, ++ 105, 98, 46,108,117, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 2, 7, 24, 0, 0, 0, 10, 0, 0, 0, 74, 0, 0, 0,138, ++ 0, 0, 0,202, 0, 0, 0, 10, 1, 0, 0, 74, 1, 0, 0,138, ++ 1, 0, 0,135,129, 1, 0, 71, 65, 1, 0, 7, 1, 1, 0,199, ++ 192, 0, 0,135,128, 0, 0, 71, 64, 0, 0, 7, 0, 0, 0, 5, ++ 0, 0, 0,100, 0, 0, 0, 9, 64,128,131, 5, 0, 0, 0,100, ++ 64, 0, 0, 9, 64, 0,132, 5, 0, 0, 0,100,128, 0, 0, 9, ++ 64,128,132, 30, 0,128, 0, 10, 0, 0, 0, 4, 7, 0, 0, 0, ++ 0, 0, 0, 0,104, 97,115,101,114,108, 0, 4, 5, 0, 0, 0, ++ 0, 0, 0, 0, 70, 79, 82, 77, 0, 4, 4, 0, 0, 0, 0, 0, ++ 0, 0, 69, 78, 86, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 67, ++ 79, 79, 75, 73, 69, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 72, ++ 65, 83, 69, 82, 76, 0, 4, 4, 0, 0, 0, 0, 0, 0, 0, 71, ++ 69, 84, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 80, 79, 83, 84, ++ 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,115,101,116,102,105,101, ++ 108,100, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,103,101,116,102, ++ 105,101,108,100, 0, 4, 9, 0, 0, 0, 0, 0, 0, 0,109,121, ++ 112,117,116,101,110,118, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 0, 0, 25, 0, 0, 0, 39, 0, 0, 0, 0, 2, 0, 10, 29, ++ 0, 0, 0,133, 0, 0, 0,197, 64, 0, 0,198,128,192, 1, 0, ++ 1, 0, 0, 65,193, 0, 0,220, 0,129, 1, 22,128, 4,128, 5, ++ 2, 1, 0, 64, 2, 0, 3, 28,130, 0, 1, 26, 2, 0, 0, 22, ++ 192, 0,128, 5, 2, 1, 0, 64, 2, 0, 3, 28,130, 0, 1,128, ++ 1, 0, 4, 23, 64,193, 3, 22,128, 1,128, 6,130, 1, 1, 26, ++ 66, 0, 0, 22, 0, 0,128, 10, 2, 0, 0,137, 0, 2, 3,134, ++ 128, 1, 1, 22, 0, 0,128,137, 64, 0, 3,225,128, 0, 0, 22, ++ 128,250,127, 30, 0,128, 0, 6, 0, 0, 0, 4, 3, 0, 0, 0, ++ 0, 0, 0, 0, 95, 71, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, ++ 115,116,114,105,110,103, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, ++ 103,109, 97,116, 99,104, 0, 4, 15, 0, 0, 0, 0, 0, 0, 0, ++ 40, 91, 37,119, 95, 37, 45, 93, 43, 41, 40, 46, 63, 41, 0, 4, ++ 9, 0, 0, 0, 0, 0, 0, 0,116,111,110,117,109, 98,101,114, ++ 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, ++ 29, 0, 0, 0, 27, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, ++ 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, 28, 0, 0, 0, ++ 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, 29, 0, 0, 0, ++ 29, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, ++ 30, 0, 0, 0, 32, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, ++ 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, 33, 0, 0, 0, ++ 34, 0, 0, 0, 34, 0, 0, 0, 36, 0, 0, 0, 28, 0, 0, 0, ++ 37, 0, 0, 0, 39, 0, 0, 0, 8, 0, 0, 0, 2, 0, 0, 0, ++ 0, 0, 0, 0,102, 0, 0, 0, 0, 0, 28, 0, 0, 0, 2, 0, ++ 0, 0, 0, 0, 0, 0,118, 0, 0, 0, 0, 0, 28, 0, 0, 0, ++ 2, 0, 0, 0, 0, 0, 0, 0,116, 0, 1, 0, 0, 0, 28, 0, ++ 0, 0, 16, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,103, ++ 101,110,101,114, 97,116,111,114, 41, 0, 6, 0, 0, 0, 28, 0, ++ 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 40,102,111,114, 32,115, ++ 116, 97,116,101, 41, 0, 6, 0, 0, 0, 28, 0, 0, 0, 14, 0, ++ 0, 0, 0, 0, 0, 0, 40,102,111,114, 32, 99,111,110,116,114, ++ 111,108, 41, 0, 6, 0, 0, 0, 28, 0, 0, 0, 2, 0, 0, 0, ++ 0, 0, 0, 0,119, 0, 7, 0, 0, 0, 26, 0, 0, 0, 2, 0, ++ 0, 0, 0, 0, 0, 0,100, 0, 7, 0, 0, 0, 26, 0, 0, 0, ++ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 0, 0, 0, ++ 47, 0, 0, 0, 0, 1, 0, 8, 12, 0, 0, 0, 69, 0, 0, 0, ++ 133, 64, 0, 0,134,128, 64, 1,192, 0, 0, 0, 1,193, 0, 0, ++ 156, 0,129, 1, 22, 0, 0,128, 70, 64,129, 0,161, 64, 0, 0, ++ 22, 0,255,127, 94, 0, 0, 1, 30, 0,128, 0, 4, 0, 0, 0, ++ 4, 3, 0, 0, 0, 0, 0, 0, 0, 95, 71, 0, 4, 7, 0, 0, ++ 0, 0, 0, 0, 0,115,116,114,105,110,103, 0, 4, 7, 0, 0, ++ 0, 0, 0, 0, 0,103,109, 97,116, 99,104, 0, 4, 7, 0, 0, ++ 0, 0, 0, 0, 0, 91, 37,119, 95, 93, 43, 0, 0, 0, 0, 0, ++ 12, 0, 0, 0, 42, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, ++ 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, 43, 0, 0, 0, ++ 44, 0, 0, 0, 43, 0, 0, 0, 44, 0, 0, 0, 46, 0, 0, 0, ++ 47, 0, 0, 0, 6, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, ++ 102, 0, 0, 0, 0, 0, 11, 0, 0, 0, 2, 0, 0, 0, 0, 0, ++ 0, 0,118, 0, 1, 0, 0, 0, 11, 0, 0, 0, 16, 0, 0, 0, ++ 0, 0, 0, 0, 40,102,111,114, 32,103,101,110,101,114, 97,116, ++ 111,114, 41, 0, 6, 0, 0, 0, 10, 0, 0, 0, 12, 0, 0, 0, ++ 0, 0, 0, 0, 40,102,111,114, 32,115,116, 97,116,101, 41, 0, ++ 6, 0, 0, 0, 10, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, ++ 40,102,111,114, 32, 99,111,110,116,114,111,108, 41, 0, 6, 0, ++ 0, 0, 10, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0,119, 0, ++ 7, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 0, 0, 0, 49, 0, 0, 0, 55, 0, 0, 0, 0, 2, 0, 6, ++ 20, 0, 0, 0,133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, ++ 1,129, 0, 0, 65,193, 0, 0,156,128, 0, 2, 0, 0, 0, 1, ++ 133, 0, 0, 0,134, 64, 64, 1,192, 0, 0, 0, 1, 1, 1, 0, ++ 65,193, 0, 0,156,128, 0, 2, 0, 0, 0, 1,133, 64, 1, 0, ++ 134,128, 65, 1,192, 0, 0, 0, 0, 1,128, 0,156, 64,128, 1, ++ 30, 0,128, 0, 7, 0, 0, 0, 4, 7, 0, 0, 0, 0, 0, 0, ++ 0,115,116,114,105,110,103, 0, 4, 5, 0, 0, 0, 0, 0, 0, ++ 0,103,115,117, 98, 0, 4, 7, 0, 0, 0, 0, 0, 0, 0, 91, ++ 92, 93, 92, 91, 93, 0, 4, 2, 0, 0, 0, 0, 0, 0, 0, 46, ++ 0, 4, 6, 0, 0, 0, 0, 0, 0, 0, 91, 92, 46, 93, 43, 0, ++ 4, 7, 0, 0, 0, 0, 0, 0, 0,104, 97,115,101,114,108, 0, ++ 4, 9, 0, 0, 0, 0, 0, 0, 0,115,101,116,102,105,101,108, ++ 100, 0, 0, 0, 0, 0, 20, 0, 0, 0, 51, 0, 0, 0, 51, 0, ++ 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, 0, 0, 51, 0, ++ 0, 0, 51, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, ++ 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, 0, 0, 52, 0, ++ 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, 0, 0, 54, 0, ++ 0, 0, 54, 0, 0, 0, 55, 0, 0, 0, 2, 0, 0, 0, 4, 0, ++ 0, 0, 0, 0, 0, 0,107,101,121, 0, 0, 0, 0, 0, 19, 0, ++ 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,118, 97,108,117,101, 0, ++ 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, ++ 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, ++ 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, ++ 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, 23, 0, 0, 0, ++ 23, 0, 0, 0, 23, 0, 0, 0, 25, 0, 0, 0, 39, 0, 0, 0, ++ 25, 0, 0, 0, 41, 0, 0, 0, 47, 0, 0, 0, 41, 0, 0, 0, ++ 49, 0, 0, 0, 55, 0, 0, 0, 49, 0, 0, 0, 55, 0, 0, 0, ++ 0, 0, 0, 0, 0, 0, 0, 0, ++}; +Index: haserl-0.9.29/src/Makefile.in +=================================================================== +--- haserl-0.9.29.orig/src/Makefile.in ++++ haserl-0.9.29/src/Makefile.in +@@ -32,7 +32,6 @@ + NORMAL_UNINSTALL = : + PRE_UNINSTALL = : + POST_UNINSTALL = : +-@USE_LUA_TRUE@noinst_PROGRAMS = lua2c$(EXEEXT) + @INCLUDE_LUASHELL_TRUE@@USE_LUA_TRUE@am__append_1 = h_lua.c h_lua.h + @INCLUDE_LUACSHELL_TRUE@@USE_LUA_TRUE@am__append_2 = h_luac.c h_luac.h + bin_PROGRAMS = haserl$(EXEEXT) +@@ -515,7 +514,7 @@ + @USE_LUA_TRUE@ $(CC_FOR_BUILD) $(CFLAGS) $(LDFLAGS) $(lua2c_LDFLAGS) \ + @USE_LUA_TRUE@ -o $@ $^ $(LIBS) + +-@USE_LUA_TRUE@haserl_lualib.inc : haserl_lualib.lua lua2c ++@USE_LUA_TRUE@haserl_lualib.inc : + @USE_LUA_TRUE@ if ! ./lua2c haserl_lualib haserl_lualib.lua >$@; then \ + @USE_LUA_TRUE@ rm $@; \ + @USE_LUA_TRUE@ exit 1 ;\ diff --git a/package/haserl/Config.in b/package/haserl/Config.in new file mode 100644 index 0000000000..9ccc392d35 --- /dev/null +++ b/package/haserl/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_HASERL + bool "haserl" + depends on BR2_USE_MMU # fork() + help + Haserl is a small cgi wrapper that enables shell scripts to be + embedded into html documents. It is intended for environments + where something like PHP is too big. + + http://haserl.sourceforge.net/ + +config BR2_PACKAGE_HASERL_WITH_LUA + bool "Lua support" + depends on BR2_PACKAGE_HASERL + depends on BR2_PACKAGE_LUA + help + Enable Lua support for haserl diff --git a/package/haserl/haserl.hash b/package/haserl/haserl.hash new file mode 100644 index 0000000000..2b23a6c6ee --- /dev/null +++ b/package/haserl/haserl.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/haserl/files/haserl-devel/ +md5 918f0b4f6cec0b438c8b5c78f2989010 haserl-0.9.35.tar.gz +sha1 9a331d41e9d47a81e81e158f9a16bf5443347cd4 haserl-0.9.35.tar.gz diff --git a/package/haserl/haserl.mk b/package/haserl/haserl.mk new file mode 100644 index 0000000000..93d64c8732 --- /dev/null +++ b/package/haserl/haserl.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# haserl +# +################################################################################ + +HASERL_VERSION = 0.9.35 +HASERL_SITE = http://downloads.sourceforge.net/project/haserl/haserl-devel +HASERL_LICENSE = GPLv2 +HASERL_LICENSE_FILES = COPYING +HASERL_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_HASERL_WITH_LUA),y) +HASERL_CONF_OPTS += --with-lua +HASERL_DEPENDENCIES += lua + +# liblua uses dlopen when dynamically linked +ifneq ($(BR2_STATIC_LIBS),y) +HASERL_CONF_ENV += LIBS="-ldl" +endif + +else +HASERL_CONF_OPTS += --without-lua +endif + +define HASERL_REMOVE_EXAMPLES + rm -rf $(TARGET_DIR)/usr/share/haserl +endef + +HASERL_POST_INSTALL_TARGET_HOOKS += HASERL_REMOVE_EXAMPLES + +$(eval $(autotools-package)) diff --git a/package/haveged/Config.in b/package/haveged/Config.in new file mode 100644 index 0000000000..0e49a2db7c --- /dev/null +++ b/package/haveged/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HAVEGED + bool "haveged" + depends on BR2_USE_MMU # fork() + help + The haveged project is an attempt to provide an easy-to-use, + unpredictable random number generator based upon an adaptation + of the HAVEGE algorithm. + + http://www.issihosts.com/haveged/ diff --git a/package/haveged/S21haveged b/package/haveged/S21haveged new file mode 100755 index 0000000000..3e6ce8678f --- /dev/null +++ b/package/haveged/S21haveged @@ -0,0 +1,25 @@ +#!/bin/sh + +[ -x /usr/sbin/haveged ] || exit 0 + +case "$1" in + start) + printf "Starting haveged: " + start-stop-daemon -S -x /usr/sbin/haveged -- -w 1024 -r 0 + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping haveged: " + start-stop-daemon -K -x /usr/sbin/haveged + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart|reload) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit 0 diff --git a/package/haveged/haveged.hash b/package/haveged/haveged.hash new file mode 100644 index 0000000000..d1133b6931 --- /dev/null +++ b/package/haveged/haveged.hash @@ -0,0 +1,2 @@ +# From http://www.issihosts.com/haveged/verify/haveged-1.9.1.sha1 +sha1 ab7234b7f57dbb7d500a5ab3cbf0494715ce6499 haveged-1.9.1.tar.gz diff --git a/package/haveged/haveged.mk b/package/haveged/haveged.mk new file mode 100644 index 0000000000..66d69a6d7a --- /dev/null +++ b/package/haveged/haveged.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# haveged +# +################################################################################ + +HAVEGED_VERSION = 1.9.1 +HAVEGED_SITE = http://www.issihosts.com/haveged +HAVEGED_LICENSE = GPLv3+ +HAVEGED_LICENSE_FILES = COPYING + +ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y) +HAVEGED_CONF_OPTS += --enable-clock_gettime=yes +endif + +define HAVEGED_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/haveged/S21haveged \ + $(TARGET_DIR)/etc/init.d/S21haveged +endef + +define HAVEGED_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/haveged/haveged.service \ + $(TARGET_DIR)/usr/lib/systemd/system/haveged.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs /usr/lib/systemd/system/haveged.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/haveged.service +endef + +$(eval $(autotools-package)) diff --git a/package/haveged/haveged.service b/package/haveged/haveged.service new file mode 100644 index 0000000000..91035c6711 --- /dev/null +++ b/package/haveged/haveged.service @@ -0,0 +1,10 @@ +[Unit] +Description=Entropy Harvesting Daemon +Documentation=man:haveged(8) + +[Service] +ExecStart=/usr/sbin/haveged -F -w 1024 -v 1 +SuccessExitStatus=143 + +[Install] +WantedBy=multi-user.target diff --git a/package/hdparm/Config.in b/package/hdparm/Config.in new file mode 100644 index 0000000000..1b57439bbe --- /dev/null +++ b/package/hdparm/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HDPARM + bool "hdparm" + help + hdparm - get/set hard disk parameters for Linux IDE drives. + + http://www.ibiblio.org/pub/Linux/system/hardware/ diff --git a/package/hdparm/hdparm.hash b/package/hdparm/hdparm.hash new file mode 100644 index 0000000000..7d70f0b4fd --- /dev/null +++ b/package/hdparm/hdparm.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/hdparm/files/hdparm/ +md5 213efdbe7471fad3408198918e164354 hdparm-9.48.tar.gz +sha1 1efce086ef47667cf8016861d3ce958969e70dfc hdparm-9.48.tar.gz diff --git a/package/hdparm/hdparm.mk b/package/hdparm/hdparm.mk new file mode 100644 index 0000000000..a2b3e8c73e --- /dev/null +++ b/package/hdparm/hdparm.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# hdparm +# +################################################################################ + +HDPARM_VERSION = 9.48 +HDPARM_SITE = http://downloads.sourceforge.net/project/hdparm/hdparm +HDPARM_LICENSE = BSD-Style +HDPARM_LICENSE_FILES = LICENSE.TXT + +define HDPARM_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + STRIP=/bin/true +endef + +define HDPARM_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/hdparm $(TARGET_DIR)/sbin/hdparm +endef + +$(eval $(generic-package)) diff --git a/package/heimdal/0001-vendor.patch b/package/heimdal/0001-vendor.patch new file mode 100644 index 0000000000..1ccd629b69 --- /dev/null +++ b/package/heimdal/0001-vendor.patch @@ -0,0 +1,19 @@ +Add --vendor option to krb5-config, required by samba 4. +Status: Backport from upstream git. + +Signed-off-by: Gustavo Zacarias + +diff -Nura heimdal-1.5.3.orig/tools/krb5-config.in heimdal-1.5.3.vendor/tools/krb5-config.in +--- heimdal-1.5.3.orig/tools/krb5-config.in 2012-12-09 19:06:44.000000000 -0300 ++++ heimdal-1.5.3.vendor/tools/krb5-config.in 2013-12-18 15:49:45.283986300 -0300 +@@ -50,6 +50,10 @@ + do_usage=yes + usage_exit=0 + ;; ++ --vendor) ++ echo "Heimdal"; ++ exit 0 ++ ;; + --version) + echo "@PACKAGE@ @VERSION@" + exit 0 diff --git a/package/heimdal/0002-kadm5-fix-race-in-Makefile-with-kadm5_err.h.patch b/package/heimdal/0002-kadm5-fix-race-in-Makefile-with-kadm5_err.h.patch new file mode 100644 index 0000000000..7361bf2f77 --- /dev/null +++ b/package/heimdal/0002-kadm5-fix-race-in-Makefile-with-kadm5_err.h.patch @@ -0,0 +1,35 @@ +From 18fe7d300f133c2b9eb93bb4bd81e4644979a74b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jakub=20=C4=8Cajka?= +Date: Tue, 1 Jul 2014 13:13:43 -0600 +Subject: [PATCH] kadm5: fix race in Makefile with kadm5_err.h + +When running make with -j4, occasionally kadm5 fails due to a missing +header file kadm5_err.h. Fix the race condition. + +Reported at https://bugzilla.redhat.com/1115164 + +Reviewed-by: Ken Dreyer + +Backported from upstream commit +6affa4cceceaa1369dd895f8acdd7a883ee65674. + +Signed-off-by: Thomas Petazzoni +--- + lib/kadm5/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/kadm5/Makefile.am b/lib/kadm5/Makefile.am +index f8be3b1..1b399b1 100644 +--- a/lib/kadm5/Makefile.am ++++ b/lib/kadm5/Makefile.am +@@ -155,6 +155,7 @@ iprop-commands.c iprop-commands.h: iprop-commands.in + $(SLC) $(srcdir)/iprop-commands.in + + $(libkadm5srv_la_OBJECTS): kadm5_err.h ++$(libkadm5clnt_la_OBJECTS): kadm5_err.h + $(iprop_log_OBJECTS): iprop-commands.h + + client_glue.lo server_glue.lo: $(srcdir)/common_glue.c +-- +2.4.5 + diff --git a/package/heimdal/heimdal.hash b/package/heimdal/heimdal.hash new file mode 100644 index 0000000000..f32d279d73 --- /dev/null +++ b/package/heimdal/heimdal.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 8fe19e0f12ff0d0c2f20a6cf56727deaabd89db9c197288022fb489e103b730d heimdal-1.6rc2.tar.gz diff --git a/package/heimdal/heimdal.mk b/package/heimdal/heimdal.mk new file mode 100644 index 0000000000..2f5c4b3fb8 --- /dev/null +++ b/package/heimdal/heimdal.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# heimdal +# +################################################################################ + +HEIMDAL_VERSION = 1.6rc2 +HEIMDAL_SITE = http://www.h5l.org/dist/src +HEIMDAL_DEPENDENCIES = host-e2fsprogs host-ncurses host-pkgconf +HEIMDAL_INSTALL_STAGING = YES +# static because of -fPIC issues with e2fsprogs on x86_64 host +HOST_HEIMDAL_CONF_OPTS = \ + --disable-shared \ + --enable-static \ + --without-openldap \ + --without-capng \ + --without-sqlite3 \ + --without-libintl \ + --without-openssl \ + --without-berkeley-db \ + --without-readline \ + --without-libedit \ + --without-hesiod \ + --without-x \ + --disable-heimdal-documentation +HOST_HEIMDAL_CONF_ENV = MAKEINFO=true LIBS=-pthread +HEIMDAL_MAKE = $(MAKE1) +HEIMDAL_LICENSE = BSD-3c +HEIMDAL_LICENSE_FILES = LICENSE +# 0002-kadm5-fix-race-in-Makefile-with-kadm5_err.h.patch +HEIMDAL_AUTORECONF = YES + +# We need asn1_compile in the PATH for samba4 +define HOST_HEIMDAL_MAKE_SYMLINK + ln -sf $(HOST_DIR)/usr/libexec/heimdal/asn1_compile \ + $(HOST_DIR)/usr/bin/asn1_compile + ln -sf $(HOST_DIR)/usr/bin/compile_et \ + $(HOST_DIR)/usr/libexec/heimdal/compile_et +endef + +HOST_HEIMDAL_POST_INSTALL_HOOKS += HOST_HEIMDAL_MAKE_SYMLINK + +$(eval $(host-autotools-package)) diff --git a/package/heirloom-mailx/0001-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch b/package/heirloom-mailx/0001-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch new file mode 100644 index 0000000000..db5b19ee52 --- /dev/null +++ b/package/heirloom-mailx/0001-Patched-out-SSL2-support-since-it-is-no-longer-suppo.patch @@ -0,0 +1,42 @@ +From: Hilko Bengen +Date: Wed, 27 Apr 2011 00:18:42 +0200 +Subject: Patched out SSL2 support since it is no longer supported by OpenSSL. + +Now that openssl has dropped SSLv2 support we need to patch it out. +Patch picked up from debian patchseries 5. + +Signed-off-by: Gustavo Zacarias + +--- + mailx.1 | 2 +- + openssl.c | 4 +--- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/mailx.1 b/mailx.1 +index 417ea04..a02e430 100644 +--- a/mailx.1 ++++ b/mailx.1 +@@ -3575,7 +3575,7 @@ Only applicable if SSL/TLS support is built using OpenSSL. + .TP + .B ssl-method + Selects a SSL/TLS protocol version; +-valid values are `ssl2', `ssl3', and `tls1'. ++valid values are `ssl3', and `tls1'. + If unset, the method is selected automatically, + if possible. + .TP +diff --git a/openssl.c b/openssl.c +index b4e33fc..44fe4e5 100644 +--- a/openssl.c ++++ b/openssl.c +@@ -216,9 +216,7 @@ ssl_select_method(const char *uhp) + + cp = ssl_method_string(uhp); + if (cp != NULL) { +- if (equal(cp, "ssl2")) +- method = SSLv2_client_method(); +- else if (equal(cp, "ssl3")) ++ if (equal(cp, "ssl3")) + method = SSLv3_client_method(); + else if (equal(cp, "tls1")) + method = TLSv1_client_method(); diff --git a/package/heirloom-mailx/Config.in b/package/heirloom-mailx/Config.in new file mode 100644 index 0000000000..87664b489e --- /dev/null +++ b/package/heirloom-mailx/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_HEIRLOOM_MAILX + bool "heirloom-mailx" + # uses fork() + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + help + Heirloom mailx (previously known as nail) is a mail user + agent for Unix systems. + + It can be used as a command-line mail reader, but also more + importantly on embedded systems, as a mail composition + program and SMTP client, in order to send e-mail from shell + scripts. It supports SMTP authentication (login, plain, + cram-md5), SMTPS, MIME encoding of attachements, and more. + + http://heirloom.sourceforge.net/mailx.html + +comment "heirloom-mailx needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + depends on BR2_USE_MMU diff --git a/package/heirloom-mailx/heirloom-mailx.hash b/package/heirloom-mailx/heirloom-mailx.hash new file mode 100644 index 0000000000..6fc36c9532 --- /dev/null +++ b/package/heirloom-mailx/heirloom-mailx.hash @@ -0,0 +1,2 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-3.dsc +sha256 015ba4209135867f37a0245d22235a392b8bbed956913286b887c2e2a9a421ad heirloom-mailx_12.5.orig.tar.gz diff --git a/package/heirloom-mailx/heirloom-mailx.mk b/package/heirloom-mailx/heirloom-mailx.mk new file mode 100644 index 0000000000..044cd8cf3a --- /dev/null +++ b/package/heirloom-mailx/heirloom-mailx.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# heirloom-mailx +# +################################################################################ + +HEIRLOOM_MAILX_VERSION = 12.5 +HEIRLOOM_MAILX_SOURCE = heirloom-mailx_$(HEIRLOOM_MAILX_VERSION).orig.tar.gz +HEIRLOOM_MAILX_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/h/heirloom-mailx +HEIRLOOM_MAILX_LICENSE = BSD-4c, Bellcore (base64), OpenVision (imap_gssapi), RSA Data Security (md5), Network Working Group (hmac), MPLv1.1 (nss) +HEIRLOOM_MAILX_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +HEIRLOOM_MAILX_DEPENDENCIES += openssl +endif + +define HEIRLOOM_MAILX_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) $(SHELL) ./makeconfig) +endef + +# -fPIC is needed to build with NIOS2 toolchains. +define HEIRLOOM_MAILX_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) \ + CFLAGS="$(TARGET_CFLAGS) -fPIC" \ + -C $(@D) +endef + +define HEIRLOOM_MAILX_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + PREFIX=/usr \ + UCBINSTALL=$(INSTALL) \ + STRIP=/bin/true \ + DESTDIR=$(TARGET_DIR) \ + install +endef + +$(eval $(generic-package)) diff --git a/package/hiawatha/Config.in b/package/hiawatha/Config.in new file mode 100644 index 0000000000..68e47fde87 --- /dev/null +++ b/package/hiawatha/Config.in @@ -0,0 +1,35 @@ +comment "hiawatha needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_HIAWATHA + bool "hiawatha" + # needs fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_ZLIB + help + Hiawatha is a webserver for Unix and has been built with + security in mind. This resulted in a highly secure + webserver, in both code and features. + + This webserver runs on Linux, BSD, MacOS X and + Windows. Although it can run any kind of CGI / FastCGI + application, it has been optimized for usage with PHP. Most + well known PHP frameworks and CMS applications have been + tested with Hiawatha and ran without a problem. Hiawatha + supports many web and HTTP features such as CGI/FastCGI, + HTTP authentication, virtual host support, request + pipelining, keep alive connections, URL rewriting and many + more. + + http://www.hiawatha-webserver.org/ + +if BR2_PACKAGE_HIAWATHA + +config BR2_PACKAGE_HIAWATHA_SSL + bool "hiawatha TLS support" + select BR2_PACKAGE_MBEDTLS + +endif diff --git a/package/hiawatha/hiawatha.hash b/package/hiawatha/hiawatha.hash new file mode 100644 index 0000000000..5709076891 --- /dev/null +++ b/package/hiawatha/hiawatha.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3892e0a1836661c8dcc649f9ae965289f701640a618baf2c2287da9b78e36cf1 hiawatha-10.1.tar.gz diff --git a/package/hiawatha/hiawatha.mk b/package/hiawatha/hiawatha.mk new file mode 100644 index 0000000000..d30b1a1abd --- /dev/null +++ b/package/hiawatha/hiawatha.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# hiawatha +# +################################################################################ + +HIAWATHA_VERSION = 10.1 +HIAWATHA_SITE = http://www.hiawatha-webserver.org/files +HIAWATHA_DEPENDENCIES = zlib +HIAWATHA_LICENSE = GPLv2 +HIAWATHA_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PACKAGE_HIAWATHA_SSL),y) +HIAWATHA_CONF_OPTS += -DUSE_SYSTEM_MBEDTLS=ON +HIAWATHA_DEPENDENCIES += mbedtls +else +HIAWATHA_CONF_OPTS += -DENABLE_TLS=OFF +endif + +HIAWATHA_CONF_OPTS += \ + -DENABLE_TOOLKIT=OFF \ + -DENABLE_XSLT=OFF \ + -DCONFIG_DIR=/etc/hiawatha \ + -DLOG_DIR=/var/log \ + -DPID_DIR=/var/run \ + -DWEBROOT_DIR=/var/www/hiawatha \ + -DWORK_DIR=/var/lib/hiawatha + +$(eval $(cmake-package)) diff --git a/package/hicolor-icon-theme/Config.in b/package/hicolor-icon-theme/Config.in new file mode 100644 index 0000000000..6cda097c12 --- /dev/null +++ b/package/hicolor-icon-theme/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HICOLOR_ICON_THEME + bool "hicolor icon theme" + help + Freedesktop Hicolor icon theme + + This is the fallback icon theme, which only creates the + standard directory structure for storing icons of third-party + applications (i.e. the ones not available in usual icon themes). diff --git a/package/hicolor-icon-theme/hicolor-icon-theme.hash b/package/hicolor-icon-theme/hicolor-icon-theme.hash new file mode 100644 index 0000000000..522dcfcd82 --- /dev/null +++ b/package/hicolor-icon-theme/hicolor-icon-theme.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9cc45ac3318c31212ea2d8cb99e64020732393ee7630fa6c1810af5f987033cc hicolor-icon-theme-0.15.tar.xz diff --git a/package/hicolor-icon-theme/hicolor-icon-theme.mk b/package/hicolor-icon-theme/hicolor-icon-theme.mk new file mode 100644 index 0000000000..5e000749f7 --- /dev/null +++ b/package/hicolor-icon-theme/hicolor-icon-theme.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# hicolor-icon-theme +# +################################################################################ + +HICOLOR_ICON_THEME_VERSION = 0.15 +HICOLOR_ICON_THEME_SITE = http://icon-theme.freedesktop.org/releases +HICOLOR_ICON_THEME_SOURCE = hicolor-icon-theme-$(HICOLOR_ICON_THEME_VERSION).tar.xz +HICOLOR_ICON_THEME_LICENSE = GPLv2 +HICOLOR_ICON_THEME_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/hidapi/0001-hidtest-dont-use-a-C-source-file-since-it-s-pure-C.patch b/package/hidapi/0001-hidtest-dont-use-a-C-source-file-since-it-s-pure-C.patch new file mode 100644 index 0000000000..4740cb7b88 --- /dev/null +++ b/package/hidapi/0001-hidtest-dont-use-a-C-source-file-since-it-s-pure-C.patch @@ -0,0 +1,445 @@ +From 2fb04c2245167e247b95400112b5dbea12fcb206 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 30 Dec 2015 20:02:29 +0100 +Subject: [PATCH] hidtest: dont' use a C++ source file, since it's pure C + +This allows to build the test program with toolchains that don't have +C++ support. + +Signed-off-by: Thomas Petazzoni +--- + hidtest/Makefile.am | 6 +- + hidtest/hidtest.c | 194 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + hidtest/hidtest.cpp | 194 ---------------------------------------------------- + 3 files changed, 197 insertions(+), 197 deletions(-) + create mode 100644 hidtest/hidtest.c + delete mode 100644 hidtest/hidtest.cpp + +diff --git a/hidtest/Makefile.am b/hidtest/Makefile.am +index d278644..5f52c3f 100644 +--- a/hidtest/Makefile.am ++++ b/hidtest/Makefile.am +@@ -4,17 +4,17 @@ AM_CPPFLAGS = -I$(top_srcdir)/hidapi/ + if OS_LINUX + noinst_PROGRAMS = hidtest-libusb hidtest-hidraw + +-hidtest_hidraw_SOURCES = hidtest.cpp ++hidtest_hidraw_SOURCES = hidtest.c + hidtest_hidraw_LDADD = $(top_builddir)/linux/libhidapi-hidraw.la + +-hidtest_libusb_SOURCES = hidtest.cpp ++hidtest_libusb_SOURCES = hidtest.c + hidtest_libusb_LDADD = $(top_builddir)/libusb/libhidapi-libusb.la + else + + # Other OS's + noinst_PROGRAMS = hidtest + +-hidtest_SOURCES = hidtest.cpp ++hidtest_SOURCES = hidtest.c + hidtest_LDADD = $(top_builddir)/$(backend)/libhidapi.la + + endif +diff --git a/hidtest/hidtest.c b/hidtest/hidtest.c +new file mode 100644 +index 0000000..94f0a5c +--- /dev/null ++++ b/hidtest/hidtest.c +@@ -0,0 +1,194 @@ ++/******************************************************* ++ Windows HID simplification ++ ++ Alan Ott ++ Signal 11 Software ++ ++ 8/22/2009 ++ ++ Copyright 2009 ++ ++ This contents of this file may be used by anyone ++ for any reason without any conditions and may be ++ used as a starting point for your own applications ++ which use HIDAPI. ++********************************************************/ ++ ++#include ++#include ++#include ++#include ++#include "hidapi.h" ++ ++// Headers needed for sleeping. ++#ifdef _WIN32 ++ #include ++#else ++ #include ++#endif ++ ++int main(int argc, char* argv[]) ++{ ++ int res; ++ unsigned char buf[256]; ++ #define MAX_STR 255 ++ wchar_t wstr[MAX_STR]; ++ hid_device *handle; ++ int i; ++ ++#ifdef WIN32 ++ UNREFERENCED_PARAMETER(argc); ++ UNREFERENCED_PARAMETER(argv); ++#endif ++ ++ struct hid_device_info *devs, *cur_dev; ++ ++ if (hid_init()) ++ return -1; ++ ++ devs = hid_enumerate(0x0, 0x0); ++ cur_dev = devs; ++ while (cur_dev) { ++ printf("Device Found\n type: %04hx %04hx\n path: %s\n serial_number: %ls", cur_dev->vendor_id, cur_dev->product_id, cur_dev->path, cur_dev->serial_number); ++ printf("\n"); ++ printf(" Manufacturer: %ls\n", cur_dev->manufacturer_string); ++ printf(" Product: %ls\n", cur_dev->product_string); ++ printf(" Release: %hx\n", cur_dev->release_number); ++ printf(" Interface: %d\n", cur_dev->interface_number); ++ printf("\n"); ++ cur_dev = cur_dev->next; ++ } ++ hid_free_enumeration(devs); ++ ++ // Set up the command buffer. ++ memset(buf,0x00,sizeof(buf)); ++ buf[0] = 0x01; ++ buf[1] = 0x81; ++ ++ ++ // Open the device using the VID, PID, ++ // and optionally the Serial number. ++ ////handle = hid_open(0x4d8, 0x3f, L"12345"); ++ handle = hid_open(0x4d8, 0x3f, NULL); ++ if (!handle) { ++ printf("unable to open device\n"); ++ return 1; ++ } ++ ++ // Read the Manufacturer String ++ wstr[0] = 0x0000; ++ res = hid_get_manufacturer_string(handle, wstr, MAX_STR); ++ if (res < 0) ++ printf("Unable to read manufacturer string\n"); ++ printf("Manufacturer String: %ls\n", wstr); ++ ++ // Read the Product String ++ wstr[0] = 0x0000; ++ res = hid_get_product_string(handle, wstr, MAX_STR); ++ if (res < 0) ++ printf("Unable to read product string\n"); ++ printf("Product String: %ls\n", wstr); ++ ++ // Read the Serial Number String ++ wstr[0] = 0x0000; ++ res = hid_get_serial_number_string(handle, wstr, MAX_STR); ++ if (res < 0) ++ printf("Unable to read serial number string\n"); ++ printf("Serial Number String: (%d) %ls", wstr[0], wstr); ++ printf("\n"); ++ ++ // Read Indexed String 1 ++ wstr[0] = 0x0000; ++ res = hid_get_indexed_string(handle, 1, wstr, MAX_STR); ++ if (res < 0) ++ printf("Unable to read indexed string 1\n"); ++ printf("Indexed String 1: %ls\n", wstr); ++ ++ // Set the hid_read() function to be non-blocking. ++ hid_set_nonblocking(handle, 1); ++ ++ // Try to read from the device. There shoud be no ++ // data here, but execution should not block. ++ res = hid_read(handle, buf, 17); ++ ++ // Send a Feature Report to the device ++ buf[0] = 0x2; ++ buf[1] = 0xa0; ++ buf[2] = 0x0a; ++ buf[3] = 0x00; ++ buf[4] = 0x00; ++ res = hid_send_feature_report(handle, buf, 17); ++ if (res < 0) { ++ printf("Unable to send a feature report.\n"); ++ } ++ ++ memset(buf,0,sizeof(buf)); ++ ++ // Read a Feature Report from the device ++ buf[0] = 0x2; ++ res = hid_get_feature_report(handle, buf, sizeof(buf)); ++ if (res < 0) { ++ printf("Unable to get a feature report.\n"); ++ printf("%ls", hid_error(handle)); ++ } ++ else { ++ // Print out the returned buffer. ++ printf("Feature Report\n "); ++ for (i = 0; i < res; i++) ++ printf("%02hhx ", buf[i]); ++ printf("\n"); ++ } ++ ++ memset(buf,0,sizeof(buf)); ++ ++ // Toggle LED (cmd 0x80). The first byte is the report number (0x1). ++ buf[0] = 0x1; ++ buf[1] = 0x80; ++ res = hid_write(handle, buf, 17); ++ if (res < 0) { ++ printf("Unable to write()\n"); ++ printf("Error: %ls\n", hid_error(handle)); ++ } ++ ++ ++ // Request state (cmd 0x81). The first byte is the report number (0x1). ++ buf[0] = 0x1; ++ buf[1] = 0x81; ++ hid_write(handle, buf, 17); ++ if (res < 0) ++ printf("Unable to write() (2)\n"); ++ ++ // Read requested state. hid_read() has been set to be ++ // non-blocking by the call to hid_set_nonblocking() above. ++ // This loop demonstrates the non-blocking nature of hid_read(). ++ res = 0; ++ while (res == 0) { ++ res = hid_read(handle, buf, sizeof(buf)); ++ if (res == 0) ++ printf("waiting...\n"); ++ if (res < 0) ++ printf("Unable to read()\n"); ++ #ifdef WIN32 ++ Sleep(500); ++ #else ++ usleep(500*1000); ++ #endif ++ } ++ ++ printf("Data read:\n "); ++ // Print out the returned buffer. ++ for (i = 0; i < res; i++) ++ printf("%02hhx ", buf[i]); ++ printf("\n"); ++ ++ hid_close(handle); ++ ++ /* Free static HIDAPI objects. */ ++ hid_exit(); ++ ++#ifdef WIN32 ++ system("pause"); ++#endif ++ ++ return 0; ++} +diff --git a/hidtest/hidtest.cpp b/hidtest/hidtest.cpp +deleted file mode 100644 +index 94f0a5c..0000000 +--- a/hidtest/hidtest.cpp ++++ /dev/null +@@ -1,194 +0,0 @@ +-/******************************************************* +- Windows HID simplification +- +- Alan Ott +- Signal 11 Software +- +- 8/22/2009 +- +- Copyright 2009 +- +- This contents of this file may be used by anyone +- for any reason without any conditions and may be +- used as a starting point for your own applications +- which use HIDAPI. +-********************************************************/ +- +-#include +-#include +-#include +-#include +-#include "hidapi.h" +- +-// Headers needed for sleeping. +-#ifdef _WIN32 +- #include +-#else +- #include +-#endif +- +-int main(int argc, char* argv[]) +-{ +- int res; +- unsigned char buf[256]; +- #define MAX_STR 255 +- wchar_t wstr[MAX_STR]; +- hid_device *handle; +- int i; +- +-#ifdef WIN32 +- UNREFERENCED_PARAMETER(argc); +- UNREFERENCED_PARAMETER(argv); +-#endif +- +- struct hid_device_info *devs, *cur_dev; +- +- if (hid_init()) +- return -1; +- +- devs = hid_enumerate(0x0, 0x0); +- cur_dev = devs; +- while (cur_dev) { +- printf("Device Found\n type: %04hx %04hx\n path: %s\n serial_number: %ls", cur_dev->vendor_id, cur_dev->product_id, cur_dev->path, cur_dev->serial_number); +- printf("\n"); +- printf(" Manufacturer: %ls\n", cur_dev->manufacturer_string); +- printf(" Product: %ls\n", cur_dev->product_string); +- printf(" Release: %hx\n", cur_dev->release_number); +- printf(" Interface: %d\n", cur_dev->interface_number); +- printf("\n"); +- cur_dev = cur_dev->next; +- } +- hid_free_enumeration(devs); +- +- // Set up the command buffer. +- memset(buf,0x00,sizeof(buf)); +- buf[0] = 0x01; +- buf[1] = 0x81; +- +- +- // Open the device using the VID, PID, +- // and optionally the Serial number. +- ////handle = hid_open(0x4d8, 0x3f, L"12345"); +- handle = hid_open(0x4d8, 0x3f, NULL); +- if (!handle) { +- printf("unable to open device\n"); +- return 1; +- } +- +- // Read the Manufacturer String +- wstr[0] = 0x0000; +- res = hid_get_manufacturer_string(handle, wstr, MAX_STR); +- if (res < 0) +- printf("Unable to read manufacturer string\n"); +- printf("Manufacturer String: %ls\n", wstr); +- +- // Read the Product String +- wstr[0] = 0x0000; +- res = hid_get_product_string(handle, wstr, MAX_STR); +- if (res < 0) +- printf("Unable to read product string\n"); +- printf("Product String: %ls\n", wstr); +- +- // Read the Serial Number String +- wstr[0] = 0x0000; +- res = hid_get_serial_number_string(handle, wstr, MAX_STR); +- if (res < 0) +- printf("Unable to read serial number string\n"); +- printf("Serial Number String: (%d) %ls", wstr[0], wstr); +- printf("\n"); +- +- // Read Indexed String 1 +- wstr[0] = 0x0000; +- res = hid_get_indexed_string(handle, 1, wstr, MAX_STR); +- if (res < 0) +- printf("Unable to read indexed string 1\n"); +- printf("Indexed String 1: %ls\n", wstr); +- +- // Set the hid_read() function to be non-blocking. +- hid_set_nonblocking(handle, 1); +- +- // Try to read from the device. There shoud be no +- // data here, but execution should not block. +- res = hid_read(handle, buf, 17); +- +- // Send a Feature Report to the device +- buf[0] = 0x2; +- buf[1] = 0xa0; +- buf[2] = 0x0a; +- buf[3] = 0x00; +- buf[4] = 0x00; +- res = hid_send_feature_report(handle, buf, 17); +- if (res < 0) { +- printf("Unable to send a feature report.\n"); +- } +- +- memset(buf,0,sizeof(buf)); +- +- // Read a Feature Report from the device +- buf[0] = 0x2; +- res = hid_get_feature_report(handle, buf, sizeof(buf)); +- if (res < 0) { +- printf("Unable to get a feature report.\n"); +- printf("%ls", hid_error(handle)); +- } +- else { +- // Print out the returned buffer. +- printf("Feature Report\n "); +- for (i = 0; i < res; i++) +- printf("%02hhx ", buf[i]); +- printf("\n"); +- } +- +- memset(buf,0,sizeof(buf)); +- +- // Toggle LED (cmd 0x80). The first byte is the report number (0x1). +- buf[0] = 0x1; +- buf[1] = 0x80; +- res = hid_write(handle, buf, 17); +- if (res < 0) { +- printf("Unable to write()\n"); +- printf("Error: %ls\n", hid_error(handle)); +- } +- +- +- // Request state (cmd 0x81). The first byte is the report number (0x1). +- buf[0] = 0x1; +- buf[1] = 0x81; +- hid_write(handle, buf, 17); +- if (res < 0) +- printf("Unable to write() (2)\n"); +- +- // Read requested state. hid_read() has been set to be +- // non-blocking by the call to hid_set_nonblocking() above. +- // This loop demonstrates the non-blocking nature of hid_read(). +- res = 0; +- while (res == 0) { +- res = hid_read(handle, buf, sizeof(buf)); +- if (res == 0) +- printf("waiting...\n"); +- if (res < 0) +- printf("Unable to read()\n"); +- #ifdef WIN32 +- Sleep(500); +- #else +- usleep(500*1000); +- #endif +- } +- +- printf("Data read:\n "); +- // Print out the returned buffer. +- for (i = 0; i < res; i++) +- printf("%02hhx ", buf[i]); +- printf("\n"); +- +- hid_close(handle); +- +- /* Free static HIDAPI objects. */ +- hid_exit(); +- +-#ifdef WIN32 +- system("pause"); +-#endif +- +- return 0; +-} +-- +2.7.4 + diff --git a/package/hidapi/Config.in b/package/hidapi/Config.in new file mode 100644 index 0000000000..5119aac93d --- /dev/null +++ b/package/hidapi/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_HIDAPI + bool "hidapi" + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBGUDEV + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + HIDAPI is a multi-platform library which allows an application + to interface with USB and Bluetooth HID-Class devices on + Windows, Linux, and Mac OS X. + + http://www.signal11.us/oss/hidapi/ + +comment "hidapi needs udev /dev management and a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_HAS_UDEV diff --git a/package/hidapi/hidapi.hash b/package/hidapi/hidapi.hash new file mode 100644 index 0000000000..ba00df2e90 --- /dev/null +++ b/package/hidapi/hidapi.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 33e206f5e145fc1bc6aeb55084d71b55d686533d23ad5bb762746ceba81e728b hidapi-d17db57b9d4354752e0af42f5f33007a42ef2906.tar.gz diff --git a/package/hidapi/hidapi.mk b/package/hidapi/hidapi.mk new file mode 100644 index 0000000000..270836c6c1 --- /dev/null +++ b/package/hidapi/hidapi.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# hidapi +# +################################################################################ + +# Use master version as the current stable is very old and some bugs +# have been fixed since then. +HIDAPI_VERSION = d17db57b9d4354752e0af42f5f33007a42ef2906 +HIDAPI_SITE = $(call github,signal11,hidapi,$(HIDAPI_VERSION)) +HIDAPI_INSTALL_STAGING = YES +# No configure provided, so we need to autoreconf. +HIDAPI_AUTORECONF = YES +HIDAPI_LICENSE = GPLv3 or BSD-3c or HIDAPI license +HIDAPI_LICENSE_FILES = LICENSE.txt LICENSE-gpl3.txt LICENSE-bsd.txt LICENSE-orig.txt + +HIDAPI_DEPENDENCIES = libusb libgudev + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +HIDAPI_DEPENDENCIES += libiconv +HIDAPI_CONF_ENV += LIBS="-liconv" +endif + +$(eval $(autotools-package)) diff --git a/package/hostapd/0001-EAP-pwd-peer-Fix-last-fragment-length-validation.patch b/package/hostapd/0001-EAP-pwd-peer-Fix-last-fragment-length-validation.patch new file mode 100644 index 0000000000..82c26398b6 --- /dev/null +++ b/package/hostapd/0001-EAP-pwd-peer-Fix-last-fragment-length-validation.patch @@ -0,0 +1,54 @@ +From 8057821706784608b828e769ccefbced95591e50 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Sun, 1 Nov 2015 18:18:17 +0200 +Subject: [PATCH] EAP-pwd peer: Fix last fragment length validation + +All but the last fragment had their length checked against the remaining +room in the reassembly buffer. This allowed a suitably constructed last +fragment frame to try to add extra data that would go beyond the buffer. +The length validation code in wpabuf_put_data() prevents an actual +buffer write overflow from occurring, but this results in process +termination. (CVE-2015-5315) + +Signed-off-by: Jouni Malinen +--- + src/eap_peer/eap_pwd.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index 1f78544..75ceef1 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -903,7 +903,7 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + /* + * buffer and ACK the fragment + */ +- if (EAP_PWD_GET_MORE_BIT(lm_exch)) { ++ if (EAP_PWD_GET_MORE_BIT(lm_exch) || data->in_frag_pos) { + data->in_frag_pos += len; + if (data->in_frag_pos > wpabuf_size(data->inbuf)) { + wpa_printf(MSG_INFO, "EAP-pwd: Buffer overflow attack " +@@ -916,7 +916,8 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + return NULL; + } + wpabuf_put_data(data->inbuf, pos, len); +- ++ } ++ if (EAP_PWD_GET_MORE_BIT(lm_exch)) { + resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD, + EAP_PWD_HDR_SIZE, + EAP_CODE_RESPONSE, eap_get_id(reqData)); +@@ -930,10 +931,8 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + * we're buffering and this is the last fragment + */ + if (data->in_frag_pos) { +- wpabuf_put_data(data->inbuf, pos, len); + wpa_printf(MSG_DEBUG, "EAP-pwd: Last fragment, %d bytes", + (int) len); +- data->in_frag_pos += len; + pos = wpabuf_head_u8(data->inbuf); + len = data->in_frag_pos; + } +-- +1.9.1 + diff --git a/package/hostapd/0002-EAP-pwd-server-Fix-last-fragment-length-validation.patch b/package/hostapd/0002-EAP-pwd-server-Fix-last-fragment-length-validation.patch new file mode 100644 index 0000000000..bfc4c74e95 --- /dev/null +++ b/package/hostapd/0002-EAP-pwd-server-Fix-last-fragment-length-validation.patch @@ -0,0 +1,51 @@ +From bef802ece03f9ae9d52a21f0cf4f1bc2c5a1f8aa Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Sun, 1 Nov 2015 18:24:16 +0200 +Subject: [PATCH] EAP-pwd server: Fix last fragment length validation + +All but the last fragment had their length checked against the remaining +room in the reassembly buffer. This allowed a suitably constructed last +fragment frame to try to add extra data that would go beyond the buffer. +The length validation code in wpabuf_put_data() prevents an actual +buffer write overflow from occurring, but this results in process +termination. (CVE-2015-5314) + +Signed-off-by: Jouni Malinen +--- + src/eap_server/eap_server_pwd.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c +index cb83ff7..9f787ab 100644 +--- a/src/eap_server/eap_server_pwd.c ++++ b/src/eap_server/eap_server_pwd.c +@@ -970,7 +970,7 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv, + /* + * the first and all intermediate fragments have the M bit set + */ +- if (EAP_PWD_GET_MORE_BIT(lm_exch)) { ++ if (EAP_PWD_GET_MORE_BIT(lm_exch) || data->in_frag_pos) { + if ((data->in_frag_pos + len) > wpabuf_size(data->inbuf)) { + wpa_printf(MSG_DEBUG, "EAP-pwd: Buffer overflow " + "attack detected! (%d+%d > %d)", +@@ -981,6 +981,8 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv, + } + wpabuf_put_data(data->inbuf, pos, len); + data->in_frag_pos += len; ++ } ++ if (EAP_PWD_GET_MORE_BIT(lm_exch)) { + wpa_printf(MSG_DEBUG, "EAP-pwd: Got a %d byte fragment", + (int) len); + return; +@@ -990,8 +992,6 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv, + * buffering fragments so that's how we know it's the last) + */ + if (data->in_frag_pos) { +- wpabuf_put_data(data->inbuf, pos, len); +- data->in_frag_pos += len; + pos = wpabuf_head_u8(data->inbuf); + len = data->in_frag_pos; + wpa_printf(MSG_DEBUG, "EAP-pwd: Last fragment, %d bytes", +-- +1.9.1 + diff --git a/package/hostapd/0003-vlan-fix-musl-build-error.patch b/package/hostapd/0003-vlan-fix-musl-build-error.patch new file mode 100644 index 0000000000..da1ffcb7d5 --- /dev/null +++ b/package/hostapd/0003-vlan-fix-musl-build-error.patch @@ -0,0 +1,60 @@ +From 67ba6ed9871b2cab16eeee93818f05d9c49ccbab Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Tue, 8 Mar 2016 12:05:01 +0100 +Subject: [PATCH] vlan: fix musl build error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +caddr_t is legacy BSD and should be avoided [1]. + +This fixes compile errors with the musl libc: + +../src/ap/vlan_init.c: In function 'br_delif': +../src/ap/vlan_init.c:218:18: error: '__caddr_t' undeclared (first use in this function) + ifr.ifr_data = (__caddr_t) args; + +Upstream status: Pending [2] + +[1] http://stackoverflow.com/questions/6381526/what-is-the-significance-of-caddr-t-and-when-is-it-used +[2] http://lists.infradead.org/pipermail/hostap/2016-March/035350.html + +Signed-off-by: Jörg Krause +--- + src/ap/vlan_init.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/ap/vlan_init.c b/src/ap/vlan_init.c +index fd1c8dd..1670c0d 100644 +--- a/src/ap/vlan_init.c ++++ b/src/ap/vlan_init.c +@@ -215,7 +215,7 @@ static int br_delif(const char *br_name, const char *if_name) + args[1] = if_index; + + os_strlcpy(ifr.ifr_name, br_name, sizeof(ifr.ifr_name)); +- ifr.ifr_data = (__caddr_t) args; ++ ifr.ifr_data = (void *) args; + + if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0 && errno != EINVAL) { + /* No error if interface already removed. */ +@@ -266,7 +266,7 @@ static int br_addif(const char *br_name, const char *if_name) + args[1] = if_index; + + os_strlcpy(ifr.ifr_name, br_name, sizeof(ifr.ifr_name)); +- ifr.ifr_data = (__caddr_t) args; ++ ifr.ifr_data = (void *) args; + + if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0) { + if (errno == EBUSY) { +@@ -394,7 +394,7 @@ static int br_getnumports(const char *br_name) + + os_memset(ifindices, 0, sizeof(ifindices)); + os_strlcpy(ifr.ifr_name, br_name, sizeof(ifr.ifr_name)); +- ifr.ifr_data = (__caddr_t) arg; ++ ifr.ifr_data = (void *) arg; + + if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0) { + wpa_printf(MSG_ERROR, "VLAN: %s: BRCTL_GET_PORT_LIST " +-- +2.7.2 + diff --git a/package/hostapd/0004-vlan-fix-musl-libc-conflict-with-Linux-kernel-header.patch b/package/hostapd/0004-vlan-fix-musl-libc-conflict-with-Linux-kernel-header.patch new file mode 100644 index 0000000000..3e753d619a --- /dev/null +++ b/package/hostapd/0004-vlan-fix-musl-libc-conflict-with-Linux-kernel-header.patch @@ -0,0 +1,60 @@ +From 71a517e922c91e2c6cad28d339a081b5f6de0932 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Tue, 8 Mar 2016 21:07:12 +0100 +Subject: [PATCH] vlan: fix musl libc conflict with Linux kernel headers +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Due to both (in "utils/includes.h") and (in +) being included, the in6_addr is being redefined: once from +the C library headers and once from the Linux kernel headers. This causes some +build failures with for example the musl C library: + +In file included from /usr/include/linux/if_bridge.h:18, + from ../src/ap/vlan_init.c:17: +/usr/include/linux/in6.h:32: error: redefinition of 'struct in6_addr' +/usr/include/linux/in6.h:49: error: redefinition of 'struct sockaddr_in6' +/usr/include/linux/in6.h:59: error: redefinition of 'struct ipv6_mreq' + +Mixing C library and Linux kernel headers is a bit problematic [1] and should be +avoided if possible [2]. In order to fix this, define just the macros needed +from as done in Busybox for the brctl applet [3]. + +Upstream status: Pending [4] + +[1] https://sourceware.org/bugzilla/show_bug.cgi?id=15850 +[2] http://www.openwall.com/lists/musl/2015/10/06/1 +[3] https://git.busybox.net/busybox/commit/?id=5fa6d1a632505789409a2ba6cf8e112529f9db18 +[4] http://lists.infradead.org/pipermail/hostap/2016-March/035357.html + +Signed-off-by: Jörg Krause +--- + src/ap/vlan_init.c | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +diff --git a/src/ap/vlan_init.c b/src/ap/vlan_init.c +index 1670c0d..f2e3da0 100644 +--- a/src/ap/vlan_init.c ++++ b/src/ap/vlan_init.c +@@ -14,7 +14,16 @@ + #include + #include + #include +-#include ++/* From */ ++#define BRCTL_GET_VERSION 0 ++#define BRCTL_GET_BRIDGES 1 ++#define BRCTL_ADD_BRIDGE 2 ++#define BRCTL_DEL_BRIDGE 3 ++#define BRCTL_ADD_IF 4 ++#define BRCTL_DEL_IF 5 ++#define BRCTL_GET_BRIDGE_INFO 6 ++#define BRCTL_GET_PORT_LIST 7 ++#define BRCTL_SET_BRIDGE_FORWARD_DELAY 8 + #endif /* CONFIG_FULL_DYNAMIC_VLAN */ + + #include "utils/common.h" +-- +2.7.2 + diff --git a/package/hostapd/0005-WPS-Reject-a-Credential-with-invalid-passphrase.patch b/package/hostapd/0005-WPS-Reject-a-Credential-with-invalid-passphrase.patch new file mode 100644 index 0000000000..282aa952b5 --- /dev/null +++ b/package/hostapd/0005-WPS-Reject-a-Credential-with-invalid-passphrase.patch @@ -0,0 +1,85 @@ +From ecbb0b3dc122b0d290987cf9c84010bbe53e1022 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Fri, 4 Mar 2016 17:20:18 +0200 +Subject: [PATCH] WPS: Reject a Credential with invalid passphrase + +WPA/WPA2-Personal passphrase is not allowed to include control +characters. Reject a Credential received from a WPS Registrar both as +STA (Credential) and AP (AP Settings) if the credential is for WPAPSK or +WPA2PSK authentication type and includes an invalid passphrase. + +This fixes an issue where hostapd or wpa_supplicant could have updated +the configuration file PSK/passphrase parameter with arbitrary data from +an external device (Registrar) that may not be fully trusted. Should +such data include a newline character, the resulting configuration file +could become invalid and fail to be parsed. + +Signed-off-by: Jouni Malinen +Signed-off-by: Baruch Siach +--- +Patch status: upstream (ecbb0b3dc122b0d290987cf9c84010bbe53e1022) + + src/utils/common.c | 12 ++++++++++++ + src/utils/common.h | 1 + + src/wps/wps_attr_process.c | 10 ++++++++++ + 3 files changed, 23 insertions(+) + +diff --git a/src/utils/common.c b/src/utils/common.c +index 450e2c6519ba..27b7c02de10b 100644 +--- a/src/utils/common.c ++++ b/src/utils/common.c +@@ -697,6 +697,18 @@ int is_hex(const u8 *data, size_t len) + } + + ++int has_ctrl_char(const u8 *data, size_t len) ++{ ++ size_t i; ++ ++ for (i = 0; i < len; i++) { ++ if (data[i] < 32 || data[i] == 127) ++ return 1; ++ } ++ return 0; ++} ++ ++ + size_t merge_byte_arrays(u8 *res, size_t res_len, + const u8 *src1, size_t src1_len, + const u8 *src2, size_t src2_len) +diff --git a/src/utils/common.h b/src/utils/common.h +index 701dbb236ed5..a97224070385 100644 +--- a/src/utils/common.h ++++ b/src/utils/common.h +@@ -488,6 +488,7 @@ const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len); + + char * wpa_config_parse_string(const char *value, size_t *len); + int is_hex(const u8 *data, size_t len); ++int has_ctrl_char(const u8 *data, size_t len); + size_t merge_byte_arrays(u8 *res, size_t res_len, + const u8 *src1, size_t src1_len, + const u8 *src2, size_t src2_len); +diff --git a/src/wps/wps_attr_process.c b/src/wps/wps_attr_process.c +index eadb22fe2e78..e8c4579309ab 100644 +--- a/src/wps/wps_attr_process.c ++++ b/src/wps/wps_attr_process.c +@@ -229,6 +229,16 @@ static int wps_workaround_cred_key(struct wps_credential *cred) + cred->key_len--; + #endif /* CONFIG_WPS_STRICT */ + } ++ ++ ++ if (cred->auth_type & (WPS_AUTH_WPAPSK | WPS_AUTH_WPA2PSK) && ++ (cred->key_len < 8 || has_ctrl_char(cred->key, cred->key_len))) { ++ wpa_printf(MSG_INFO, "WPS: Reject credential with invalid WPA/WPA2-Personal passphrase"); ++ wpa_hexdump_ascii_key(MSG_INFO, "WPS: Network Key", ++ cred->key, cred->key_len); ++ return -1; ++ } ++ + return 0; + } + +-- +2.8.1 + diff --git a/package/hostapd/Config.in b/package/hostapd/Config.in new file mode 100644 index 0000000000..62fbb66d63 --- /dev/null +++ b/package/hostapd/Config.in @@ -0,0 +1,45 @@ +config BR2_PACKAGE_HOSTAPD + bool "hostapd" + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBNL + help + User space daemon for wireless access points. + + It implements IEEE 802.11 access point management, + IEEE 802.1X/WPA/WPA2/EAP authenticators, RADIUS client, + EAP server and RADIUS authentication server. + + http://hostap.epitest.fi/ + +if BR2_PACKAGE_HOSTAPD + +config BR2_PACKAGE_HOSTAPD_ACS + bool "Enable ACS" + default y + help + Enable support for standard ACS (Automatic Channel Selection). + Some propietary drivers use a custom algorithm which requires + channel to be set to '0' (which enables ACS in the config), + causing hostapd to use the standard one which doesn't work + for those cases. + +config BR2_PACKAGE_HOSTAPD_EAP + bool "Enable EAP" + depends on !BR2_STATIC_LIBS + help + Enable support for EAP and RADIUS. + +comment "hostapd EAP needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_HOSTAPD_WPS + bool "Enable WPS" + help + Enable support for Wi-Fi Protected Setup. + +endif + +comment "hostapd needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/hostapd/hostapd.hash b/package/hostapd/hostapd.hash new file mode 100644 index 0000000000..869849b640 --- /dev/null +++ b/package/hostapd/hostapd.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 8e272d954dc0d7026c264b79b15389ec2b2c555b32970de39f506b9f463ec74a hostapd-2.5.tar.gz diff --git a/package/hostapd/hostapd.mk b/package/hostapd/hostapd.mk new file mode 100644 index 0000000000..dca07c1bc5 --- /dev/null +++ b/package/hostapd/hostapd.mk @@ -0,0 +1,91 @@ +################################################################################ +# +# hostapd +# +################################################################################ + +HOSTAPD_VERSION = 2.5 +HOSTAPD_SITE = http://hostap.epitest.fi/releases +HOSTAPD_SUBDIR = hostapd +HOSTAPD_CONFIG = $(HOSTAPD_DIR)/$(HOSTAPD_SUBDIR)/.config +HOSTAPD_DEPENDENCIES = host-pkgconf libnl +HOSTAPD_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/ +HOSTAPD_LICENSE = BSD-3c +HOSTAPD_LICENSE_FILES = README +HOSTAPD_CONFIG_SET = + +HOSTAPD_CONFIG_ENABLE = \ + CONFIG_FULL_DYNAMIC_VLAN \ + CONFIG_HS20 \ + CONFIG_IEEE80211AC \ + CONFIG_IEEE80211N \ + CONFIG_IEEE80211R \ + CONFIG_INTERNAL_LIBTOMMATH \ + CONFIG_INTERWORKING \ + CONFIG_LIBNL32 \ + CONFIG_VLAN_NETLINK + +HOSTAPD_CONFIG_DISABLE = + +# libnl-3 needs -lm (for rint) and -lpthread if linking statically +# And library order matters hence stick -lnl-3 first since it's appended +# in the hostapd Makefiles as in LIBS+=-lnl-3 ... thus failing +ifeq ($(BR2_STATIC_LIBS),y) +HOSTAPD_LIBS += -lnl-3 -lm -lpthread +endif + +# Try to use openssl if it's already available +ifeq ($(BR2_PACKAGE_OPENSSL),y) +HOSTAPD_DEPENDENCIES += openssl +HOSTAPD_LIBS += $(if $(BR2_STATIC_LIBS),-lcrypto -lz) +HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=openssl\)/\1/' +else +HOSTAPD_CONFIG_DISABLE += CONFIG_EAP_PWD +HOSTAPD_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/' +endif + +ifeq ($(BR2_PACKAGE_HOSTAPD_ACS),y) +HOSTAPD_CONFIG_ENABLE += CONFIG_ACS +endif + +ifeq ($(BR2_PACKAGE_HOSTAPD_EAP),y) +HOSTAPD_CONFIG_ENABLE += \ + CONFIG_EAP \ + CONFIG_RADIUS_SERVER \ + +# Enable both TLS v1.1 (CONFIG_TLSV11) and v1.2 (CONFIG_TLSV12) +HOSTAPD_CONFIG_ENABLE += CONFIG_TLSV1 +else +HOSTAPD_CONFIG_DISABLE += CONFIG_EAP +HOSTAPD_CONFIG_ENABLE += \ + CONFIG_NO_ACCOUNTING \ + CONFIG_NO_RADIUS +endif + +ifeq ($(BR2_PACKAGE_HOSTAPD_WPS),y) +HOSTAPD_CONFIG_ENABLE += CONFIG_WPS +endif + +define HOSTAPD_CONFIGURE_CMDS + cp $(@D)/hostapd/defconfig $(HOSTAPD_CONFIG) + sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(HOSTAPD_CONFIG_ENABLE)) \ + $(patsubst %,-e 's/^\(%\)/#\1/',$(HOSTAPD_CONFIG_DISABLE)) \ + $(patsubst %,-e '1i%=y',$(HOSTAPD_CONFIG_SET)) \ + $(patsubst %,-e %,$(HOSTAPD_CONFIG_EDITS)) \ + $(HOSTAPD_CONFIG) +endef + +define HOSTAPD_BUILD_CMDS + $(TARGET_MAKE_ENV) CFLAGS="$(HOSTAPD_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(HOSTAPD_LIBS)" \ + $(MAKE) CC="$(TARGET_CC)" -C $(@D)/$(HOSTAPD_SUBDIR) +endef + +define HOSTAPD_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd \ + $(TARGET_DIR)/usr/sbin/hostapd + $(INSTALL) -m 0755 -D $(@D)/$(HOSTAPD_SUBDIR)/hostapd_cli \ + $(TARGET_DIR)/usr/bin/hostapd_cli +endef + +$(eval $(generic-package)) diff --git a/package/hplip/0001-build-use-pkg-config-to-discover-libusb.patch b/package/hplip/0001-build-use-pkg-config-to-discover-libusb.patch new file mode 100644 index 0000000000..59b89a4a32 --- /dev/null +++ b/package/hplip/0001-build-use-pkg-config-to-discover-libusb.patch @@ -0,0 +1,45 @@ +From 1eed2b65eff4c66b80eab0ec46c6705de19bdb9d Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 21 Jan 2016 23:54:03 +0100 +Subject: [PATCH] build: use pkg-config to discover libusb + +This allows to remove hardcoded paths to libusb headers. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 4 ++-- + configure.in | 3 +-- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 73fed2e..3a4e899 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -92,8 +92,8 @@ libhpmud_la_SOURCES += io/hpmud/musb_libusb01.c + libhpmud_la_LDFLAGS += -lusb + else + libhpmud_la_SOURCES += io/hpmud/musb.c +-libhpmud_la_CFLAGS += -I/usr/include/libusb-1.0 +-libhpmud_la_LDFLAGS += -lusb-1.0 ++libhpmud_la_CFLAGS += $(LIBUSB_CFLAGS) ++libhpmud_la_LDFLAGS += $(LIBUSB_LIBS) + endif + + if NETWORK_BUILD +diff --git a/configure.in b/configure.in +index 3706645..8b06428 100755 +--- a/configure.in ++++ b/configure.in +@@ -542,8 +542,7 @@ if test "$hpijs_only_build" = "no" && test "$hpcups_only_build" = "no"; then + AC_CHECK_LIB([usb], [usb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb support], 2)]) + AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)]) + else +- AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)]) +- AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)]) ++ PKG_CHECK_MODULES([LIBUSB], [libusb-1.0]) + fi + fi + +-- +2.6.4 + diff --git a/package/hplip/0002-configure.in-fix-AM_INIT_AUTOMAKE-call.patch b/package/hplip/0002-configure.in-fix-AM_INIT_AUTOMAKE-call.patch new file mode 100644 index 0000000000..7c7538d1ab --- /dev/null +++ b/package/hplip/0002-configure.in-fix-AM_INIT_AUTOMAKE-call.patch @@ -0,0 +1,35 @@ +From a2de7e834417de68db10dc6f09d5810b06e6cbc8 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 21 Jan 2016 23:54:50 +0100 +Subject: [PATCH] configure.in: fix AM_INIT_AUTOMAKE call + +Uncomment the appropriate call to AM_INIT_AUTOMAKE so that the +"foreign" option is passed, which avoids the need for creating various +unneeded files when autoreconfiguring. + +Add the subdir-objects options since the main Makefile.am references +files in subdirectories. This allows to silence a huge amount of +warning when autoreconfiguring. + +Signed-off-by: Thomas Petazzoni +--- + configure.in | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/configure.in b/configure.in +index 8b06428..680cad5 100755 +--- a/configure.in ++++ b/configure.in +@@ -27,8 +27,7 @@ + + #AC_PREREQ(2.59) + AC_INIT([HP Linux Imaging and Printing], [3.15.11], [3.15.11], [hplip]) +-#AM_INIT_AUTOMAKE([1.9 foreign]) +-AM_INIT_AUTOMAKE ++AM_INIT_AUTOMAKE([1.9 foreign subdir-objects]) + AC_DISABLE_STATIC + + # Checks for programs. +-- +2.6.4 + diff --git a/package/hplip/Config.in b/package/hplip/Config.in new file mode 100644 index 0000000000..756567150d --- /dev/null +++ b/package/hplip/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_HPLIP + bool "hplip" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_CUPS + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_JPEG + help + HP Linux Imaging and Printing (HPLIP) + HPLIP is an HP-developed solution for printing, scanning, and faxing + with HP inkjet and laser based printers in Linux. The HPLIP project + provides printing support for 2,211 printer models, including + Deskjet, Officejet, Photosmart, PSC (Print Scan Copy), Business + Inkjet, LaserJet, Edgeline MFP, and LaserJet MFP. + + http://hplipopensource.com/ + +comment "hplip needs a toolchain w/ C++, threads" + depends on BR2_PACKAGE_CUPS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/hplip/hplip.hash b/package/hplip/hplip.hash new file mode 100644 index 0000000000..75ff7d3d0c --- /dev/null +++ b/package/hplip/hplip.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 33c4711bde04a34b81f3f70e6277a0375dded171469e5aa8b9cef1a14a407c6d hplip-3.15.11.tar.gz diff --git a/package/hplip/hplip.mk b/package/hplip/hplip.mk new file mode 100644 index 0000000000..d70e2e926f --- /dev/null +++ b/package/hplip/hplip.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# hplip +# +################################################################################ + +HPLIP_VERSION = 3.15.11 +HPLIP_SITE = http://downloads.sourceforge.net/hplip/hplip +HPLIP_AUTORECONF = YES +HPLIP_DEPENDENCIES = cups libusb jpeg host-pkgconf +HPLIP_LICENSE = GPLv2 BSD-3c MIT +HPLIP_LICENSE_FILES = COPYING + +HPLIP_CONF_OPTS = \ + --disable-qt4 \ + --disable-scan-build \ + --disable-gui-build \ + --disable-doc-build \ + --disable-network-build \ + --enable-hpcups-install \ + --disable-hpijs-install \ + --enable-cups-ppd-install \ + --enable-cups-drv-install \ + --disable-foomatic-ppd-install \ + --disable-foomatic-drv-install \ + --disable-foomatic-rip-hplip-install \ + --enable-new-hpcups \ + --enable-lite-build + +# build system does not support cups-config +HPLIP_CONF_ENV = LIBS=`$(STAGING_DIR)/usr/bin/cups-config --libs` + +ifeq ($(BR2_PACKAGE_DBUS),y) +HPLIP_CONF_OPTS += --enable-dbus-build +HPLIP_DEPENDENCIES += dbus +else +HPLIP_CONF_OPTS += --disable-dbus-build +endif + +define HPLIP_POST_INSTALL_TARGET_FIXUP + mkdir -p $(TARGET_DIR)/usr/share/hplip/data/models + cp $(@D)/data/models/* $(TARGET_DIR)/usr/share/hplip/data/models +endef +HPLIP_POST_INSTALL_TARGET_HOOKS += HPLIP_POST_INSTALL_TARGET_FIXUP + +$(eval $(autotools-package)) diff --git a/package/htop/0001-native-affinity.patch b/package/htop/0001-native-affinity.patch new file mode 100644 index 0000000000..bf68e53ed1 --- /dev/null +++ b/package/htop/0001-native-affinity.patch @@ -0,0 +1,25 @@ +# This patch removes the check for native_affinity for cross compiling. +# This patch has been pushed to htop on 23 November 2011, however, is +# not in the 1.0 release and may not be exactly what Hisham puts into +# the official build. +# +# Signed-off-by: Andy Kennedy +diff -Naur a/configure.ac b/configure.ac +--- a/configure.ac 2011-11-20 20:46:48.000000000 -0600 ++++ b/configure.ac 2011-11-23 10:41:44.000000000 -0600 +@@ -111,7 +111,6 @@ + if test "$cross_compiling" = "no"; then + AC_CHECK_FILE($PROCDIR/stat,,AC_MSG_ERROR(Cannot find /proc/stat. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) + AC_CHECK_FILE($PROCDIR/meminfo,,AC_MSG_ERROR(Cannot find /proc/meminfo. Make sure you have a Linux-compatible /proc filesystem mounted. See the file README for help.)) +-fi + + AC_ARG_ENABLE(native_affinity, [AC_HELP_STRING([--enable-native-affinity], [enable native sched_setaffinity and sched_getaffinity for affinity support, disables hwloc])], ,enable_native_affinity="yes") + if test "x$enable_native_affinity" = xyes; then +@@ -130,6 +129,7 @@ + AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no])]) + fi ++fi + + AC_ARG_ENABLE(hwloc, [AC_HELP_STRING([--enable-hwloc], [enable hwloc support for CPU affinity])],, enable_hwloc="no") + if test "x$enable_hwloc" = xyes diff --git a/package/htop/Config.in b/package/htop/Config.in new file mode 100644 index 0000000000..c19ff27b77 --- /dev/null +++ b/package/htop/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HTOP + bool "htop" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + htop is an interactive text-mode process viewer for Linux. + It aims to be a better top. + + http://hisham.hm/htop/ diff --git a/package/htop/htop.hash b/package/htop/htop.hash new file mode 100644 index 0000000000..41d5a2edcb --- /dev/null +++ b/package/htop/htop.hash @@ -0,0 +1,2 @@ +# From http://www.freelists.org/post/htop/ANN-htop-103 +md5 e768b9b55c033d9c1dffda72db3a6ac7 htop-1.0.3.tar.gz diff --git a/package/htop/htop.mk b/package/htop/htop.mk new file mode 100644 index 0000000000..629b04cda5 --- /dev/null +++ b/package/htop/htop.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# htop +# +################################################################################ + +HTOP_VERSION = 1.0.3 +HTOP_SITE = http://hisham.hm/htop/releases/$(HTOP_VERSION) +HTOP_DEPENDENCIES = ncurses +# For htop-01-native-affinity.patch +HTOP_AUTORECONF = YES +HTOP_CONF_OPTS = --disable-unicode +HTOP_CONF_ENV = ac_cv_file__proc_stat=yes ac_cv_file__proc_meminfo=yes +HTOP_LICENSE = GPLv2 +HTOP_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/httping/0001-fix-math-library-linking.patch b/package/httping/0001-fix-math-library-linking.patch new file mode 100644 index 0000000000..0078f41c61 --- /dev/null +++ b/package/httping/0001-fix-math-library-linking.patch @@ -0,0 +1,25 @@ +Move LDFLAGS+=-lm option to the end. +The order of the math library directive '-lm' matters. + +Signed-off-by: Yuvaraj Patil +--- +diff -Nurp httping-2.3.4_orig/Makefile httping-2.3.4/Makefile +--- httping-2.3.4_orig/Makefile 2014-07-23 16:16:36.495546288 +0530 ++++ httping-2.3.4/Makefile 2014-07-23 16:18:42.547541002 +0530 +@@ -37,7 +37,6 @@ DEBUG=yes + WFLAGS=-Wall -W + OFLAGS= + CFLAGS+=$(WFLAGS) $(OFLAGS) -DVERSION=\"$(VERSION)\" -DLOCALEDIR=\"$(LOCALEDIR)\" +-LDFLAGS+=-lm + + PACKAGE=$(TARGET)-$(VERSION) + PREFIX?=/usr +@@ -97,6 +96,8 @@ ifeq ($(ARM),yes) + CC=arm-linux-gcc + endif + ++LDFLAGS+=-lm ++ + all: $(TARGET) $(TRANSLATIONS) + + $(TARGET): $(OBJS) diff --git a/package/httping/Config.in b/package/httping/Config.in new file mode 100644 index 0000000000..6564415997 --- /dev/null +++ b/package/httping/Config.in @@ -0,0 +1,22 @@ +comment "httping needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_HTTPING + bool "httping" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + help + Httping is like 'ping' but for http-requests. + Give it an url, and it'll show you how long it takes to connect, + send a request and retrieve the reply (only the headers). + Be aware that the transmission across the network also takes time! + So it measures the latency of the webserver + network. + + http://www.vanheusden.com/httping/ + +if BR2_PACKAGE_HTTPING + +config BR2_PACKAGE_HTTPING_TFO + bool "TCP Fast Open (TFO) support" + +endif diff --git a/package/httping/httping.hash b/package/httping/httping.hash new file mode 100644 index 0000000000..0368f75652 --- /dev/null +++ b/package/httping/httping.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 dab59f02b08bfbbc978c005bb16d2db6fe21e1fc841fde96af3d497ddfc82084 httping-2.4.tgz diff --git a/package/httping/httping.mk b/package/httping/httping.mk new file mode 100644 index 0000000000..7e7609086e --- /dev/null +++ b/package/httping/httping.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# httping +# +################################################################################ + +HTTPING_VERSION = 2.4 +HTTPING_SOURCE = httping-$(HTTPING_VERSION).tgz +HTTPING_SITE = http://www.vanheusden.com/httping +HTTPING_LICENSE = GPLv2 +HTTPING_LICENSE_FILES = license.txt +HTTPING_LDFLAGS = $(TARGET_LDFLAGS) \ + $(if $(BR2_NEEDS_GETTEXT),-lintl) \ + $(if $(BR2_PACKAGE_LIBICONV),-liconv) +HTTPING_DEPENDENCIES = host-gettext \ + $(if $(BR2_NEEDS_GETTEXT),gettext) \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) \ + $(if $(BR2_PACKAGE_NCURSES_WCHAR),ncurses) \ + $(if $(BR2_PACKAGE_OPENSSL),openssl) \ + $(if $(BR2_PACKAGE_FFTW),fftw) +HTTPING_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) \ + FW=$(if $(BR2_PACKAGE_FFTW),yes,no) \ + NC=$(if $(BR2_PACKAGE_NCURSES_WCHAR),yes,no) \ + SSL=$(if $(BR2_PACKAGE_OPENSSL),yes,no) \ + TFO=$(if $(BR2_PACKAGE_HTTPING_TFO),yes,no) + +define HTTPING_BUILD_CMDS + $(HTTPING_MAKE_OPTS) LDFLAGS="$(HTTPING_LDFLAGS)" \ + $(MAKE) DEBUG=no -C $(@D) +endef + +define HTTPING_INSTALL_TARGET_CMDS + $(HTTPING_MAKE_OPTS) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/hwdata/Config.in b/package/hwdata/Config.in new file mode 100644 index 0000000000..33e0738af8 --- /dev/null +++ b/package/hwdata/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_HWDATA + bool "hwdata" + help + Various hardware identification and configuration data, such as + the pci.ids database, or the XFree86/xorg Cards database. diff --git a/package/hwdata/hwdata.hash b/package/hwdata/hwdata.hash new file mode 100644 index 0000000000..b3c83ebb74 --- /dev/null +++ b/package/hwdata/hwdata.hash @@ -0,0 +1,3 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/h/hwdata/hwdata_0.267-1.dsc +sha256 d77f2b3f3d6e278be669141ffa5dac01b64cab02f7b2c744bbabc500a45263f4 hwdata_0.267.orig.tar.gz +sha256 055d2f168de9333562a04f6a230c43dc19c4975882935d8b2f0ab17f64f57275 hwdata_0.267-1.diff.gz diff --git a/package/hwdata/hwdata.mk b/package/hwdata/hwdata.mk new file mode 100644 index 0000000000..f8cffcdb80 --- /dev/null +++ b/package/hwdata/hwdata.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# hwdata +# +################################################################################ + +HWDATA_VERSION = 0.267 +HWDATA_SOURCE = hwdata_$(HWDATA_VERSION).orig.tar.gz +HWDATA_PATCH = hwdata_$(HWDATA_VERSION)-1.diff.gz +HWDATA_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/h/hwdata +HWDATA_LICENSE = GPLv2+ or XFree86 1.0 license +HWDATA_LICENSE_FILES = COPYING LICENSE + +define HWDATA_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 644 $(@D)/pci.ids $(TARGET_DIR)/usr/share/hwdata/pci.ids + $(INSTALL) -D -m 644 $(@D)/usb.ids $(TARGET_DIR)/usr/share/hwdata/usb.ids +endef + +$(eval $(generic-package)) diff --git a/package/hwloc/0001-utils-hwloc-Makefile.am-fix-install-man-race-conditi.patch b/package/hwloc/0001-utils-hwloc-Makefile.am-fix-install-man-race-conditi.patch new file mode 100644 index 0000000000..c27bdd4dc3 --- /dev/null +++ b/package/hwloc/0001-utils-hwloc-Makefile.am-fix-install-man-race-conditi.patch @@ -0,0 +1,35 @@ +From d5e802c9c2ed8dbe5c937e84bc3ab440218aa8de Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Tue, 12 May 2015 16:03:14 +0200 +Subject: [PATCH] utils/hwloc/Makefile.am: fix install-man race condition + +Make install contains a race condition in utils/hwloc, as both +install-exec-hook (through intall-exec) and install-data trigger +install-man: + +http://autobuild.buildroot.net/results/414/41403f8ce4751a27dd1bb9c43f5a97895dea3980/build-end.log + +The install-exec-hook target doesn't do anything with the manual pages, so +fix the race condition by dropping the dependency. + +Signed-off-by: Peter Korsgaard +--- + utils/hwloc/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/hwloc/Makefile.am b/utils/hwloc/Makefile.am +index 7ca8027..8bbee86 100644 +--- a/utils/hwloc/Makefile.am ++++ b/utils/hwloc/Makefile.am +@@ -108,7 +108,7 @@ endif HWLOC_HAVE_LINUX + -e 's/#HWLOC_DATE#/@HWLOC_RELEASE_DATE@/g' \ + > $@ < $< + +-install-exec-hook: install-man ++install-exec-hook: + $(SED) -e 's/HWLOC_top_builddir\/utils\/hwloc/bindir/' -e 's/HWLOC_top_builddir\/utils\/lstopo/bindir/' -e '/HWLOC_top_builddir/d' $(DESTDIR)$(bindir)/hwloc-assembler-remote > $(DESTDIR)$(bindir)/hwloc-assembler-remote.tmp && mv -f $(DESTDIR)$(bindir)/hwloc-assembler-remote.tmp $(DESTDIR)$(bindir)/hwloc-assembler-remote + $(SED) -e 's/HWLOC_top_builddir\/utils\/hwloc/bindir/' -e 's/HWLOC_top_builddir\/utils\/lstopo/bindir/' -e '/HWLOC_top_builddir/d' $(DESTDIR)$(bindir)/hwloc-compress-dir > $(DESTDIR)$(bindir)/hwloc-compress-dir.tmp && mv -f $(DESTDIR)$(bindir)/hwloc-compress-dir.tmp $(DESTDIR)$(bindir)/hwloc-compress-dir + chmod +x $(DESTDIR)$(bindir)/hwloc-assembler-remote $(DESTDIR)$(bindir)/hwloc-compress-dir +-- +2.1.4 + diff --git a/package/hwloc/Config.in b/package/hwloc/Config.in new file mode 100644 index 0000000000..1fb23027bb --- /dev/null +++ b/package/hwloc/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_HWLOC + bool "hwloc" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Portable Hardware Locality + + Provides a portable abstraction (across OS, versions, + architectures, ...) of the hierarchical topology of modern + architectures, including NUMA memory nodes, sockets, shared + caches, cores and simultaneous multithreading. + + http://www.open-mpi.org/projects/hwloc/ + +comment "hwloc needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/hwloc/hwloc.hash b/package/hwloc/hwloc.hash new file mode 100644 index 0000000000..53563dd8a4 --- /dev/null +++ b/package/hwloc/hwloc.hash @@ -0,0 +1,2 @@ +# From http://www.open-mpi.org/software/hwloc/v1.10/ +sha1 76291124e4638b2fbd4deb4cc3cd680e153077b5 hwloc-1.10.1.tar.bz2 diff --git a/package/hwloc/hwloc.mk b/package/hwloc/hwloc.mk new file mode 100644 index 0000000000..9b5eae8e1a --- /dev/null +++ b/package/hwloc/hwloc.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# hwloc +# +################################################################################ + +HWLOC_VERSION_MAJOR = 1.10 +HWLOC_VERSION = $(HWLOC_VERSION_MAJOR).1 +HWLOC_SOURCE = hwloc-$(HWLOC_VERSION).tar.bz2 +HWLOC_SITE = http://www.open-mpi.org/software/hwloc/v$(HWLOC_VERSION_MAJOR)/downloads +HWLOC_LICENSE = BSD-3c +HWLOC_LICENSE_FILES = COPYING +HWLOC_DEPENDENCIES = host-pkgconf +# 0001-utils-hwloc-Makefile.am-fix-install-man-race-conditi.patch touches Makefile.am +HWLOC_AUTORECONF = YES + +HWLOC_CONF_OPTS = \ + --disable-opencl \ + --disable-cuda \ + --disable-nvml \ + --disable-gl \ + --disable-cairo \ + --disable-libxml2 \ + --disable-doxygen + +ifeq ($(BR2_PACKAGE_LIBPCIACCESS),y) +HWLOC_CONF_OPTS += --enable-pci +HWLOC_DEPENDENCIES += libpciaccess +else +HWLOC_CONF_OPTS += --disable-pci +endif + +ifeq ($(BR2_PACKAGE_NUMACTL),y) +HWLOC_CONF_OPTS += --enable-libnuma +HWLOC_DEPENDENCIES += numactl +else +HWLOC_CONF_OPTS += --disable-libnuma +endif + +$(eval $(autotools-package)) diff --git a/package/i2c-tools/Config.in b/package/i2c-tools/Config.in new file mode 100644 index 0000000000..e83dbd65fa --- /dev/null +++ b/package/i2c-tools/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_I2C_TOOLS + bool "i2c-tools" + help + Heterogeneous set of I2C tools for Linux + + This package contains a heterogeneous set of I2C tools for Linux: + a bus probing tool, a chip dumper, register-level access helpers, + EEPROM decoding scripts, and more. + + http://www.lm-sensors.org/wiki/I2CTools diff --git a/package/i2c-tools/i2c-tools.hash b/package/i2c-tools/i2c-tools.hash new file mode 100644 index 0000000000..c12ffe845b --- /dev/null +++ b/package/i2c-tools/i2c-tools.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 db5e69f2e2a6e3aa2ecdfe6a5f490b149c504468770f58921c8c5b8a7860a441 i2c-tools-3.1.2.tar.bz2 diff --git a/package/i2c-tools/i2c-tools.mk b/package/i2c-tools/i2c-tools.mk new file mode 100644 index 0000000000..187bd09754 --- /dev/null +++ b/package/i2c-tools/i2c-tools.mk @@ -0,0 +1,58 @@ +################################################################################ +# +# i2c-tools +# +################################################################################ + +I2C_TOOLS_VERSION = 3.1.2 +I2C_TOOLS_SOURCE = i2c-tools-$(I2C_TOOLS_VERSION).tar.bz2 +I2C_TOOLS_SITE = http://dl.lm-sensors.org/i2c-tools/releases +I2C_TOOLS_LICENSE = GPLv2+, GPLv2 (py-smbus) +I2C_TOOLS_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_PYTHON),y) +I2C_TOOLS_DEPENDENCIES += python +endif + +ifeq ($(BR2_PACKAGE_PYTHON3),y) +I2C_TOOLS_DEPENDENCIES += python3 +endif + +# Build/install steps mirror the distutil python package type in the python package +# infrastructure +ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y) +# BASE_ENV taken from PKG_PYTHON_DISTUTILS_ENV in package/pkg-python.mk +I2C_TOOLS_PYTHON_BASE_ENV = \ + $(PKG_PYTHON_DISTUTILS_ENV) \ + CFLAGS="$(TARGET_CFLAGS) -I../include" + +define I2C_TOOLS_BUILD_PYSMBUS + (cd $(@D)/py-smbus; \ + $(I2C_TOOLS_PYTHON_BASE_ENV) \ + $(HOST_DIR)/usr/bin/python setup.py build \ + $(PKG_PYTHON_DISTUTILS_BUILD_OPTS)) +endef + +define I2C_TOOLS_INSTALL_PYSMBUS + (cd $(@D)/py-smbus; \ + $(I2C_TOOLS_PYTHON_BASE_ENV) \ + $(HOST_DIR)/usr/bin/python setup.py install \ + $(PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS)) +endef + +endif # BR2_PACKAGE_PYTHON + +define I2C_TOOLS_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) + $(I2C_TOOLS_BUILD_PYSMBUS) +endef + +define I2C_TOOLS_INSTALL_TARGET_CMDS + for i in i2cdump i2cget i2cset i2cdetect; \ + do \ + $(INSTALL) -m 755 -D $(@D)/tools/$$i $(TARGET_DIR)/usr/bin/$$i; \ + done + $(I2C_TOOLS_INSTALL_PYSMBUS) +endef + +$(eval $(generic-package)) diff --git a/package/i7z/Config.in b/package/i7z/Config.in new file mode 100644 index 0000000000..eea74f2fcf --- /dev/null +++ b/package/i7z/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_I7Z + bool "i7z" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_NCURSES + help + "A better i7 (and now i3, i5) reporting tool for Linux." + + i7z can print out the C-states and temperature for i3, i5 + and i7 based Core processors from Intel (including Nehalems, + Sandy Bridge and Ivy Bridge). + + https://github.com/ajaiantilal/i7z + +comment "i7z needs a toolchain w/ threads" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/i7z/i7z.hash b/package/i7z/i7z.hash new file mode 100644 index 0000000000..1bcf2c6357 --- /dev/null +++ b/package/i7z/i7z.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e127bddf850e7febd39cef2d2b13dca5fe19cc2a1bb1099d72b683be5d8bd1c0 i7z-5023138d7c35c4667c938b853e5ea89737334e92.tar.gz diff --git a/package/i7z/i7z.mk b/package/i7z/i7z.mk new file mode 100644 index 0000000000..e21fd9fba1 --- /dev/null +++ b/package/i7z/i7z.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# i7z +# +################################################################################ + +I7Z_VERSION = 5023138d7c35c4667c938b853e5ea89737334e92 +I7Z_SITE = $(call github,ajaiantilal,i7z,$(I7Z_VERSION)) +I7Z_LICENSE = GPLv2 +I7Z_LICENSE_FILES = COPYING +I7Z_DEPENDENCIES = ncurses + +define I7Z_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define I7Z_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) install \ + DESTDIR="$(TARGET_DIR)" +endef + +$(eval $(generic-package)) diff --git a/package/ibrcommon/0001-ibrcommon-data-File.cpp-support-POSIX-basename-call.patch b/package/ibrcommon/0001-ibrcommon-data-File.cpp-support-POSIX-basename-call.patch new file mode 100644 index 0000000000..b7c1839f75 --- /dev/null +++ b/package/ibrcommon/0001-ibrcommon-data-File.cpp-support-POSIX-basename-call.patch @@ -0,0 +1,55 @@ +From d667b13a87cf3207599a19eb981a893a1d7a67ee Mon Sep 17 00:00:00 2001 +From: Brendan Heading +Date: Mon, 14 Sep 2015 23:25:52 +0100 +Subject: [PATCH 1/1] ibrcommon/data/File.cpp: support POSIX basename call + +Firstly, and somewhat strangely, musl chooses not to provide a basename(3) +prototype within whenever __cplusplus is defined. This can be +solved by including the header defined by POSIX 1003.1 whenever +__GLIBC__ is not defined. + +However, this leads to a second problem. POSIX defines the function as +char* basename(char*) and this is the only version supported by musl. +However, the std::string.cstr() method returns a const char*. + +POSIX says that the string parameter can be modified. However the GNU +implementation never modifies it. glibc therefore supports an extension +when compiling under C++ by also supplying +const char* basename(const char*). This extension is not present on musl +which is the cause of the failure. + +The solution is reasonably straightforward; test if __GLIBC__ is defined +before calling basename. If not, use the fallback already provided for +other platforms whereby basename() is called on a temporary copy. + +Signed-off-by: Brendan Heading +Upstream-status: pending +--- + ibrcommon/data/File.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/ibrcommon/data/File.cpp b/ibrcommon/data/File.cpp +index 31af4ae..68e9b4f 100644 +--- a/ibrcommon/data/File.cpp ++++ b/ibrcommon/data/File.cpp +@@ -35,7 +35,7 @@ + #include + #include + +-#if !defined(HAVE_FEATURES_H) || defined(ANDROID) ++#if !defined(HAVE_FEATURES_H) || !defined(__GLIBC__) || defined(ANDROID) + #include + #endif + +@@ -225,7 +225,7 @@ namespace ibrcommon + + std::string File::getBasename() const + { +-#if !defined(ANDROID) && defined(HAVE_FEATURES_H) ++#if !defined(ANDROID) && defined(HAVE_FEATURES_H) && defined(__GLIBC__) + return std::string(basename(_path.c_str())); + #else + char path[_path.length()+1]; +-- +2.4.3 + diff --git a/package/ibrcommon/Config.in b/package/ibrcommon/Config.in new file mode 100644 index 0000000000..36ccfbc383 --- /dev/null +++ b/package/ibrcommon/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_IBRCOMMON + bool "ibrcommon" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + IBR-DTN is a small dtn application that supports: + Bundle Protocol RFC 5050 + Bundle Security Protocol RFC 6257 + + http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn + +comment "ibrcommon needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ibrcommon/ibrcommon.hash b/package/ibrcommon/ibrcommon.hash new file mode 100644 index 0000000000..21a0ec6f19 --- /dev/null +++ b/package/ibrcommon/ibrcommon.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9c457c1ebc01e6216524636628c647bef34ab11bd96f0e0788be8749374fdc20 ibrcommon-1.0.1.tar.gz diff --git a/package/ibrcommon/ibrcommon.mk b/package/ibrcommon/ibrcommon.mk new file mode 100644 index 0000000000..5fa2cb5191 --- /dev/null +++ b/package/ibrcommon/ibrcommon.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# ibrcommon +# +################################################################################ + +IBRCOMMON_VERSION = 1.0.1 +IBRCOMMON_SOURCE = ibrcommon-$(IBRCOMMON_VERSION).tar.gz +IBRCOMMON_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases +IBRCOMMON_INSTALL_STAGING = YES +IBRCOMMON_LICENSE = Apache-2.0 +IBRCOMMON_LICENSE_FILES = COPYING README +IBRCOMMON_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +IBRCOMMON_DEPENDENCIES += openssl +IBRCOMMON_CONF_OPTS += --with-openssl +else +IBRCOMMON_CONF_OPTS += --without-openssl +endif + +ifeq ($(BR2_PACKAGE_LIBNL),y) +IBRCOMMON_DEPENDENCIES += libnl +IBRCOMMON_CONF_OPTS += --with-lowpan +else +IBRCOMMON_CONF_OPTS += --without-lowpan +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +IBRCOMMON_DEPENDENCIES += libxml2 +IBRCOMMON_CONF_OPTS += --with-xml +else +IBRCOMMON_CONF_OPTS += --without-xml +endif + +$(eval $(autotools-package)) diff --git a/package/ibrdtn-tools/Config.in b/package/ibrdtn-tools/Config.in new file mode 100644 index 0000000000..91419d6769 --- /dev/null +++ b/package/ibrdtn-tools/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_IBRDTN_TOOLS + bool "ibrdtn-tools" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_IBRCOMMON + select BR2_PACKAGE_IBRDTN + help + IBR-DTN is a small dtn application that supports: + Bundle Protocol RFC 5050 + Bundle Security Protocol RFC 6257 + + http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn + +comment "ibrdtn-tools needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ibrdtn-tools/ibrdtn-tools.hash b/package/ibrdtn-tools/ibrdtn-tools.hash new file mode 100644 index 0000000000..fb77207526 --- /dev/null +++ b/package/ibrdtn-tools/ibrdtn-tools.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 eab066cf15f9c322d769c6c9c58adfb474cba7d446fd12e8de5ff6344376795b ibrdtn-tools-1.0.1.tar.gz diff --git a/package/ibrdtn-tools/ibrdtn-tools.mk b/package/ibrdtn-tools/ibrdtn-tools.mk new file mode 100644 index 0000000000..97ec3c9e17 --- /dev/null +++ b/package/ibrdtn-tools/ibrdtn-tools.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# ibrdtn-tools +# +################################################################################ + +IBRDTN_TOOLS_VERSION = 1.0.1 +IBRDTN_TOOLS_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases +IBRDTN_TOOLS_LICENSE = Apache-2.0 +IBRDTN_TOOLS_LICENSE_FILES = COPYING +IBRDTN_TOOLS_DEPENDENCIES = ibrcommon ibrdtn host-pkgconf + +ifeq ($(BR2_STATIC_LIBS),y) +IBRDTN_TOOLS_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -pthread" +endif + +ifeq ($(BR2_PACKAGE_LIBDAEMON),y) +IBRDTN_TOOLS_CONF_OPTS += --with-libdaemon +IBRDTN_TOOLS_DEPENDENCIES += libdaemon +else +IBRDTN_TOOLS_CONF_OPTS += --without-libdaemon +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +IBRDTN_TOOLS_CONF_OPTS += --with-libarchive +IBRDTN_TOOLS_DEPENDENCIES += libarchive +else +IBRDTN_TOOLS_CONF_OPTS += --without-libarchive +endif + +$(eval $(autotools-package)) diff --git a/package/ibrdtn/Config.in b/package/ibrdtn/Config.in new file mode 100644 index 0000000000..569831596d --- /dev/null +++ b/package/ibrdtn/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_IBRDTN + bool "ibrdtn" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_IBRCOMMON + help + IBR-DTN is a small dtn application that supports: + Bundle Protocol RFC 5050 + Bundle Security Protocol RFC 6257 + + This package contains the ibrdtn library. + + http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn + +comment "ibrdtn needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ibrdtn/ibrdtn.hash b/package/ibrdtn/ibrdtn.hash new file mode 100644 index 0000000000..5f233277c1 --- /dev/null +++ b/package/ibrdtn/ibrdtn.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 288b14ccbaefb5e3234065c2778c247797ccb3c7afbb6746bb37dc12c620d360 ibrdtn-1.0.1.tar.gz diff --git a/package/ibrdtn/ibrdtn.mk b/package/ibrdtn/ibrdtn.mk new file mode 100644 index 0000000000..7bd9b9bf1d --- /dev/null +++ b/package/ibrdtn/ibrdtn.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# ibrdtn +# +################################################################################ + +IBRDTN_VERSION = 1.0.1 +IBRDTN_SOURCE = ibrdtn-$(IBRDTN_VERSION).tar.gz +IBRDTN_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases +IBRDTN_INSTALL_STAGING = YES +IBRDTN_LICENSE = Apache-2.0 +IBRDTN_LICENSE_FILES = COPYING +IBRDTN_DEPENDENCIES = ibrcommon host-pkgconf + +ifeq ($(BR2_PACKAGE_ZLIB),y) +IBRDTN_CONF_OPTS += --with-compression +IBRDTN_DEPENDENCIES += zlib +else +IBRDTN_CONF_OPTS += --without-compression +endif + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +IBRDTN_CONF_OPTS += --with-glib +IBRDTN_DEPENDENCIES += libglib2 +else +IBRDTN_CONF_OPTS += --without-glib +endif + +$(eval $(autotools-package)) diff --git a/package/ibrdtnd/Config.in b/package/ibrdtnd/Config.in new file mode 100644 index 0000000000..f7f371edfd --- /dev/null +++ b/package/ibrdtnd/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_IBRDTND + bool "ibrdtnd" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_IBRDTN + select BR2_PACKAGE_IBRCOMMON + help + IBR-DTN is a small dtn application that supports: + Bundle Protocol RFC 5050 + Bundle Security Protocol RFC 6257 + + http://trac.ibr.cs.tu-bs.de/project-cm-2012-ibrdtn + +comment "ibrdtnd needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ibrdtnd/ibrdtnd.hash b/package/ibrdtnd/ibrdtnd.hash new file mode 100644 index 0000000000..4b7dd7c3d8 --- /dev/null +++ b/package/ibrdtnd/ibrdtnd.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9bd79636154093ab6bf4fd10d6c62d67c6db45141460847b19def327c93771ed ibrdtnd-1.0.1.tar.gz diff --git a/package/ibrdtnd/ibrdtnd.mk b/package/ibrdtnd/ibrdtnd.mk new file mode 100644 index 0000000000..01ebb7ab36 --- /dev/null +++ b/package/ibrdtnd/ibrdtnd.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# ibrdtnd +# +################################################################################ + +IBRDTND_VERSION = 1.0.1 +IBRDTND_SOURCE = ibrdtnd-$(IBRDTND_VERSION).tar.gz +IBRDTND_SITE = https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases +IBRDTND_LICENSE = Apache-2.0 +IBRDTND_LICENSE_FILES = COPYING +IBRDTND_DEPENDENCIES = ibrdtn ibrcommon host-pkgconf + +# Disable features that don't have the necessary dependencies in +# Buildroot +IBRDTND_CONF_OPTS = \ + --disable-dtndht \ + --without-wifip2p \ + --without-vmime + +# don't build documentation +IBRDTND_CONF_ENV = PDFLATEX='no' + +ifeq ($(BR2_PACKAGE_LIBDAEMON),y) +IBRDTND_CONF_OPTS += --enable-libdaemon +IBRDTND_DEPENDENCIES += libdaemon +else +IBRDTND_CONF_OPTS += --disable-libdaemon +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +IBRDTND_CONF_OPTS += --with-curl +IBRDTND_DEPENDENCIES += libcurl +else +IBRDTND_CONF_OPTS += --without-curl +endif + +ifeq ($(BR2_PACKAGE_SQLITE),y) +IBRDTND_CONF_OPTS += --with-sqlite +IBRDTND_DEPENDENCIES += sqlite +else +IBRDTND_CONF_OPTS += --without-sqlite +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +IBRDTND_CONF_OPTS += --with-tls +IBRDTND_DEPENDENCIES += openssl +else +IBRDTND_CONF_OPTS += --without-tls +endif + +$(eval $(autotools-package)) diff --git a/package/icu/0001-dont-build-static-dynamic-twice.patch b/package/icu/0001-dont-build-static-dynamic-twice.patch new file mode 100644 index 0000000000..ccbe534aa2 --- /dev/null +++ b/package/icu/0001-dont-build-static-dynamic-twice.patch @@ -0,0 +1,37 @@ +Don't build object files twice + +When passed --enable-static and --enable-shared, icu will generate +both a shared and a static version of its libraries. + +However, in order to do so, it builds each and every object file +twice: once with -fPIC (for the shared library), and once without +-fPIC (for the static library). While admittedly building -fPIC for a +static library generates a slightly suboptimal code, this is what all +the autotools-based project are doing. They build each object file +once, and they use it for both the static and shared libraries. + +icu builds the object files for the shared library as .o files, and +the object files for static library as .ao files. By simply changing +the suffix of object files used for static libraries to ".o", we tell +icu to use the ones built for the shared library (i.e, with -fPIC), +and avoid the double build of icu. + +On a fast build server, this brings the target icu build from +3m41.302s down to 1m43.926s (approximate numbers: some other builds +are running on the system at the same time). + +Signed-off-by: Thomas Petazzoni + +Index: b/source/config/mh-linux +=================================================================== +--- a/source/config/mh-linux ++++ b/source/config/mh-linux +@@ -35,7 +35,7 @@ + ## Shared object suffix + SO = so + ## Non-shared intermediate object suffix +-STATIC_O = ao ++STATIC_O = o + + ## Compilation rules + %.$(STATIC_O): $(srcdir)/%.c diff --git a/package/icu/0002-workaround-toolchain-bugs.patch b/package/icu/0002-workaround-toolchain-bugs.patch new file mode 100644 index 0000000000..b5f25d0a13 --- /dev/null +++ b/package/icu/0002-workaround-toolchain-bugs.patch @@ -0,0 +1,37 @@ +Workaround toolchain bugs + +Many of ARM Sourcery CodeBench toolchain have a bug when compiling +icu's translit.cpp source file. The bug is trigerred when there is a +combination of "-W -Wall" and "-Os", and causes an internal compiler +error. The bug has been reported to Mentor Graphics. + +Even though it is clearly a toolchain bug, having a workaround for it +is trivial in this case. So it will avoid our users falling into this +internal compiler error, and allow our autobuilders to test more +packages using this Sourcery CodeBench toolchain.qq + +[Gustavo: update for ICU4C 54.1] +Signed-off-by: Thomas Petazzoni +Signed-off-by: Gustavo Zacarias + +diff -Nura icu.orig/source/configure icu/source/configure +--- icu.orig/source/configure 2014-12-18 15:49:43.038628644 -0300 ++++ icu/source/configure 2014-12-18 15:51:23.183083232 -0300 +@@ -4323,7 +4323,7 @@ + ;; + esac + +- CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" ++ CFLAGS="$CFLAGS -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" + else + case "${host}" in + *-*-cygwin) +@@ -4337,7 +4337,7 @@ + fi + if test "$GXX" = yes + then +- CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" ++ CXXFLAGS="$CXXFLAGS -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" + else + case "${host}" in + *-*-cygwin) diff --git a/package/icu/0003-detect-compiler-symbol-prefix.patch b/package/icu/0003-detect-compiler-symbol-prefix.patch new file mode 100644 index 0000000000..1e9537503b --- /dev/null +++ b/package/icu/0003-detect-compiler-symbol-prefix.patch @@ -0,0 +1,116 @@ +detect and add compiler symbol prefix to the assembly code + +Some compiler, such as Blackfin GNU compiler, prefix a charater to any +C symbol in generated assembly code. If any assembly symbol is invoked +from C code, it needs to be prefixed as well. + +Note: since autoreconf doesn't work with this package because automake +isn't support + +[Ryan: add information about why patching configure is ok] +[Gustavo: update for ICU4C 54.1] + +Signed-off-by: Sonic Zhang +Signed-off-by: Ryan Barnett +Signed-off-by: Gustavo Zacarias + +diff -Nura icu.orig/source/configure icu/source/configure +--- icu.orig/source/configure 2014-12-18 15:49:43.038628644 -0300 ++++ icu/source/configure 2014-12-18 15:56:05.793832186 -0300 +@@ -637,6 +637,7 @@ + ICUDATA_CHAR + SAMPLES_TRUE + TESTS_TRUE ++SYMBOL_PREFIX + ICULIBSUFFIXCNAME + U_HAVE_LIB_SUFFIX + ICULIBSUFFIX +@@ -7414,6 +7415,17 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_UTF16_STRING_RESULT" >&5 + $as_echo "$CHECK_UTF16_STRING_RESULT" >&6; } + ++# Check compiler generated symbol profix ++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5 ++$as_echo "checking for symbol prefix... " >&6; } ++ SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \ ++ | ${CPP-${CC-gcc} -E} - 2>&1 \ ++ | ${EGREP-grep} "^PREFIX=" \ ++ | sed -e "s:^PREFIX=::" -e "s:__USER_LABEL_PREFIX__::"` ++ ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5 ++$as_echo "$SYMBOL_PREFIX" >&6; } ++ + # Enable/disable extras + # Check whether --enable-extras was given. + if test "${enable_extras+set}" = set; then : +diff -Nura icu.orig/source/data/Makefile.in icu/source/data/Makefile.in +--- icu.orig/source/data/Makefile.in 2014-12-18 15:49:42.908624160 -0300 ++++ icu/source/data/Makefile.in 2014-12-18 16:01:32.751110913 -0300 +@@ -182,11 +182,11 @@ + packagedata: icupkg.inc $(PKGDATA_LIST) build-local + ifneq ($(ENABLE_STATIC),) + ifeq ($(PKGDATA_MODE),dll) +- $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(PKGDATA_VERSIONING) $(PKGDATA_LIST) ++ $(PKGDATA_INVOKE) $(PKGDATA) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) -m static $(PKGDATA_VERSIONING) $(PKGDATA_LIST) + endif + endif + ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) +- $(PKGDATA_INVOKE) $(PKGDATA) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) ++ $(PKGDATA_INVOKE) $(PKGDATA) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -p $(ICUDATA_NAME) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) + else + $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(OUTDIR) + endif +@@ -209,11 +209,11 @@ + endif + ifneq ($(ENABLE_STATIC),) + ifeq ($(PKGDATA_MODE),dll) +- $(PKGDATA_INVOKE) $(PKGDATA) -m static -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_LIBDIR) ++ $(PKGDATA_INVOKE) $(PKGDATA) -m static -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBSTATICNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_LIBDIR) + endif + endif + ifneq ($(ICUDATA_SOURCE_IS_NATIVE_TARGET),YES) +- $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e $(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR) ++ $(PKGDATA_INVOKE) $(PKGDATA) -m $(PKGDATA_MODE) $(PKGDATA_VERSIONING) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) -T $(OUTTMPDIR) -s $(BUILDDIR) -p $(ICUDATA_NAME) $(PKGDATA_LIBNAME) $(PKGDATA_LIST) -I $(ICUPKGDATA_INSTALL_DIR) + else + $(INSTALL_DATA) $(ICUDATA_SOURCE_ARCHIVE) $(DESTDIR)$(ICUPKGDATA_DIR) + endif +@@ -224,7 +224,7 @@ + #### 390 support + install390: package390 + $(MKINSTALLDIRS) $(TMPDATADIR) $(DESTDIR)$(libdir) +- $(INVOKE) $(PKGDATA) -s $(BUILDDIR)$(STUB_SUFFIX) -T $(OUTTMPDIR_390STUB) -p $(ICUDATA_NAME)$(STUB_SUFFIX) $(PKGDATA_LIBNAME)$(STUB_SUFFIX) -e $(ICUDATA_ENTRY_POINT) $(OS390LIST) -m dll $(PKGDATA_VERSIONING) -I $(DESTDIR)$(ICUPKGDATA_DIR) ++ $(INVOKE) $(PKGDATA) -s $(BUILDDIR)$(STUB_SUFFIX) -T $(OUTTMPDIR_390STUB) -p $(ICUDATA_NAME)$(STUB_SUFFIX) $(PKGDATA_LIBNAME)$(STUB_SUFFIX) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) $(OS390LIST) -m dll $(PKGDATA_VERSIONING) -I $(DESTDIR)$(ICUPKGDATA_DIR) + ifeq ($(PKGDATA_MODE),dll) + $(INSTALL-L) $(ICUPKGDATA_OUTDIR)/$(FINAL_IMPORT_LIB) $(DESTDIR)$(ICUPKGDATA_DIR)/$(FINAL_IMPORT_LIB) + endif +@@ -232,7 +232,7 @@ + #### $(LIB_ICUDATA_NAME)$(STUB_SUFFIX) is the subset data for batch mode + package390: $(OUTTMPDIR)/icudata390.lst $(PKGDATA_LIST) ./icupkg.inc packagedata + ln -s $(ICUDATA_NAME) $(OUTDIR)/build/$(ICUDATA_NAME)$(STUB_SUFFIX) +- $(INVOKE) $(PKGDATA) -s $(BUILDDIR)$(STUB_SUFFIX) -T $(OUTTMPDIR_390STUB) -p $(ICUDATA_NAME)$(STUB_SUFFIX) $(PKGDATA_LIBNAME)$(STUB_SUFFIX) -e $(ICUDATA_ENTRY_POINT) $(OS390LIST) -m dll $(PKGDATA_VERSIONING) ++ $(INVOKE) $(PKGDATA) -s $(BUILDDIR)$(STUB_SUFFIX) -T $(OUTTMPDIR_390STUB) -p $(ICUDATA_NAME)$(STUB_SUFFIX) $(PKGDATA_LIBNAME)$(STUB_SUFFIX) -e @SYMBOL_PREFIX@$(ICUDATA_ENTRY_POINT) $(OS390LIST) -m dll $(PKGDATA_VERSIONING) + cp $(ICUPKGDATA_OUTDIR)/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) $(top_builddir)/stubdata/$(LIB_ICUDATA_NAME)$(STUB_SUFFIX).$(SO) + + +diff -Nura icu.orig/source/extra/uconv/Makefile.in icu/source/extra/uconv/Makefile.in +--- icu.orig/source/extra/uconv/Makefile.in 2014-12-18 15:49:42.986626850 -0300 ++++ icu/source/extra/uconv/Makefile.in 2014-12-18 15:57:40.558101179 -0300 +@@ -58,7 +58,8 @@ + ## Static mode + ifeq ($(UCONVMSG_MODE),static) + DEFS += -DUCONVMSG_LINK=$(MSGNAME) +-UCONVMSG_LIB = $(RESDIR)/$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)$(MSGNAME).$(A) ++UCONVMSG_LIB = $(RESDIR)/$(LIBPREFIX)$(STATIC_PREFIX_WHEN_USED)@SYMBOL_PREFIX@$(MSGNAME).$(A) ++ + LIBS += $(UCONVMSG_LIB) + PKGMODE=static + INSTALLTO=$(libdir) +@@ -152,7 +153,7 @@ + endif + + $(UCONVMSG_LIB): $(RESFILES) $(RESDIR)/$(RESDIR).lst pkgdata.inc +- $(INVOKE) $(PKGDATA_INVOKE_OPTS) $(TOOLBINDIR)/pkgdata -p $(MSGNAME) $(PKGDATA_OPTS) -m $(PKGMODE) -s $(RESDIR) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst ++ $(INVOKE) $(PKGDATA_INVOKE_OPTS) $(TOOLBINDIR)/pkgdata -p @SYMBOL_PREFIX@$(MSGNAME) $(PKGDATA_OPTS) -m $(PKGMODE) -s $(RESDIR) -d $(RESDIR) -T $(RESDIR) $(RESDIR)/$(RESDIR).lst + + $(RESDIR)/$(RESDIR).lst: Makefile $(srcdir)/resfiles.mk + @-$(RMV) $@ diff --git a/package/icu/0004-link-icudata-as-data-only.patch b/package/icu/0004-link-icudata-as-data-only.patch new file mode 100644 index 0000000000..d970e8d30d --- /dev/null +++ b/package/icu/0004-link-icudata-as-data-only.patch @@ -0,0 +1,35 @@ +From d5d0c4bb7cc9aa4a132ec0bea13255aee50c1cf9 Mon Sep 17 00:00:00 2001 +From: Maxime Hadjinlian +Date: Fri, 6 Jun 2014 14:55:58 +0200 +Subject: [PATCH] Don't link icudata as a data only library + +This patch cames straight from Debian. It fixes an issue when +libicudata would not have some flags indicating it's EABIhf, causing +applications linked against libicudata to not start on EABIhf +systems. Getting rid of the -nodefaultlibs -nostdlib flags solves the +problem, and is the solution that is used by Debian, see +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=653457. + +Signed-off-by: Maxime Hadjinlian +--- + source/config/mh-linux | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/source/config/mh-linux b/source/config/mh-linux +index 531a3b2..5a2a7c4 100644 +--- a/source/config/mh-linux ++++ b/source/config/mh-linux +@@ -21,7 +21,9 @@ LD_RPATH= -Wl,-zorigin,-rpath,'$$'ORIGIN + LD_RPATH_PRE = -Wl,-rpath, + + ## These are the library specific LDFLAGS +-LDFLAGSICUDT=-nodefaultlibs -nostdlib ++#LDFLAGSICUDT=-nodefaultlibs -nostdlib ++# Debian change: linking icudata as data only causes too many problems. ++LDFLAGSICUDT= + + ## Compiler switch to embed a library name + # The initial tab in the next line is to prevent icu-config from reading it. +-- +2.0.0.rc2 + diff --git a/package/icu/0005-fix-static-linking-with-icu-uc.patch b/package/icu/0005-fix-static-linking-with-icu-uc.patch new file mode 100644 index 0000000000..965906b9b9 --- /dev/null +++ b/package/icu/0005-fix-static-linking-with-icu-uc.patch @@ -0,0 +1,34 @@ +From ffff12fd321c7a056e796e74cc508726b0626ae0 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Wed, 22 Jul 2015 22:43:25 +0200 +Subject: [PATCH] fix static linking with icu-uc + +During static linking with a C application and libicuuc.a, +-lstdc++ is required. + +Add -lstdc++ in Libs.private of icu-uc.pc. + +Fixes: +http://autobuild.buildroot.net/results/210/2107f9dfb39eeb6559fb4271c7af8b39aef521ca/ + +Signed-off-by: Romain Naour +--- + source/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/source/Makefile.in b/source/Makefile.in +index 9db6c52..ca48e16 100644 +--- a/source/Makefile.in ++++ b/source/Makefile.in +@@ -264,7 +264,7 @@ config/icu-uc.pc: config/icu.pc Makefile icudefs.mk + @echo "Description: $(PACKAGE_ICU_DESCRIPTION): Common and Data libraries" >> $@ + @echo "Name: $(PACKAGE)-uc" >> $@ + @echo "Libs:" '-L$${libdir}' "${ICULIBS_UC}" "${ICULIBS_DT}" >> $@ +- @echo "Libs.private:" '$${baselibs}' >> $@ ++ @echo "Libs.private:" '$${baselibs}' -lstdc++ >> $@ + @echo $@ updated. + + config/icu-i18n.pc: config/icu.pc Makefile icudefs.mk +-- +2.4.3 + diff --git a/package/icu/Config.in b/package/icu/Config.in new file mode 100644 index 0000000000..d31c1fa3dc --- /dev/null +++ b/package/icu/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_ICU + bool "icu" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + # icu does some funky things by generating by itself an ELF + # file, and it cannot easily be changed to generate FLAT + # format. + depends on !BR2_BINFMT_FLAT + help + International Components for Unicode. + + http://site.icu-project.org/ + +if BR2_PACKAGE_ICU + +config BR2_PACKAGE_ICU_CUSTOM_DATA_PATH + string "Path to custom data library file" + help + This option allows to define the path to a custom data + library generated with http://apps.icu-project.org/datacustom/ + Make sure you select the appropiate version to match the one + provided by buildroot. + Leave empty to not use this functionality. + +endif + +comment "icu needs a toolchain w/ C++, wchar, threads" + depends on !BR2_BINFMT_FLAT + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/icu/icu.hash b/package/icu/icu.hash new file mode 100644 index 0000000000..4233ba3996 --- /dev/null +++ b/package/icu/icu.hash @@ -0,0 +1,4 @@ +# From https://ssl.icu-project.org/files/icu4c/57.1/icu4c-src-57_1.md5 +md5 976734806026a4ef8bdd17937c8898b9 icu4c-57_1-src.tgz +# Calculated based on the hash above +sha256 ff8c67cb65949b1e7808f2359f2b80f722697048e90e7cfc382ec1fe229e9581 icu4c-57_1-src.tgz diff --git a/package/icu/icu.mk b/package/icu/icu.mk new file mode 100644 index 0000000000..3b40dfbd86 --- /dev/null +++ b/package/icu/icu.mk @@ -0,0 +1,55 @@ +################################################################################ +# +# icu +# +################################################################################ + +ICU_VERSION = 57.1 +ICU_SOURCE = icu4c-$(subst .,_,$(ICU_VERSION))-src.tgz +ICU_SITE = http://download.icu-project.org/files/icu4c/$(ICU_VERSION) +ICU_LICENSE = ICU License +ICU_LICENSE_FILES = license.html + +ICU_DEPENDENCIES = host-icu +ICU_INSTALL_STAGING = YES +ICU_CONFIG_SCRIPTS = icu-config +ICU_CONF_OPTS = \ + --with-cross-build=$(HOST_ICU_DIR)/source \ + --disable-samples \ + --disable-tests + +# When available, icu prefers to use C++11 atomics, which rely on the +# __atomic builtins. On certain architectures, this requires linking +# with libatomic starting from gcc 4.8. +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +ICU_CONF_ENV += LIBS="-latomic" +endif + +HOST_ICU_CONF_OPTS = \ + --disable-samples \ + --disable-tests \ + --disable-extras \ + --disable-icuio \ + --disable-layout \ + --disable-renaming +ICU_SUBDIR = source +HOST_ICU_SUBDIR = source + +ICU_CUSTOM_DATA_PATH = $(call qstrip,$(BR2_PACKAGE_ICU_CUSTOM_DATA_PATH)) + +ifneq ($(ICU_CUSTOM_DATA_PATH),) +define ICU_COPY_CUSTOM_DATA + cp $(ICU_CUSTOM_DATA_PATH) $(@D)/source/data/in/ +endef +ICU_POST_PATCH_HOOKS += ICU_COPY_CUSTOM_DATA +endif + +define ICU_REMOVE_DEV_FILES + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,derb genbrk gencfu gencnval gendict genrb icuinfo makeconv uconv) + rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,genccode gencmn gennorm2 gensprep icupkg) + rm -rf $(TARGET_DIR)/usr/share/icu +endef +ICU_POST_INSTALL_TARGET_HOOKS += ICU_REMOVE_DEV_FILES + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/ifplugd/0001-cross.patch b/package/ifplugd/0001-cross.patch new file mode 100644 index 0000000000..6217238149 --- /dev/null +++ b/package/ifplugd/0001-cross.patch @@ -0,0 +1,17 @@ +--- + configure | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: ifplugd-0.28/configure +=================================================================== +--- ifplugd-0.28.orig/configure ++++ ifplugd-0.28/configure +@@ -5430,7 +5430,7 @@ + echo $ECHO_N "(cached) $ECHO_C" >&6 + else + if test "$cross_compiling" = yes; then +- ac_cv_func_malloc_0_nonnull=no ++ ac_cv_func_malloc_0_nonnull=yes + else + cat >conftest.$ac_ext <<_ACEOF + /* confdefs.h. */ diff --git a/package/ifplugd/0002-fix-headers.patch b/package/ifplugd/0002-fix-headers.patch new file mode 100644 index 0000000000..06372a26a0 --- /dev/null +++ b/package/ifplugd/0002-fix-headers.patch @@ -0,0 +1,24 @@ +--- + src/interface.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: ifplugd-0.28/src/interface.c +=================================================================== +--- ifplugd-0.28.orig/src/interface.c ++++ ifplugd-0.28/src/interface.c +@@ -23,7 +23,6 @@ + #endif + + #include +-#include + #include + #include + #include +@@ -32,6 +31,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/package/ifplugd/0003-no-cxx.patch b/package/ifplugd/0003-no-cxx.patch new file mode 100644 index 0000000000..50ec0545a3 --- /dev/null +++ b/package/ifplugd/0003-no-cxx.patch @@ -0,0 +1,17 @@ +[PATCH] ifplugd: configure: don't check for C++ compiler + +The configure script was checking for a C++ compiler (and erroring out +if not found), even though it isn't used for anything. + +Signed-off-by: Peter Korsgaard +diff -urpN ifplugd-0.28/configure.ac ifplugd-0.28.new/configure.ac +--- ifplugd-0.28/configure.ac 2005-06-04 21:21:51.000000000 +0200 ++++ ifplugd-0.28.new/configure.ac 2008-12-13 20:31:13.000000000 +0100 +@@ -33,7 +33,6 @@ if type -p stow > /dev/null && test -d / + fi + + # Checks for programs. +-AC_PROG_CXX + AC_PROG_CC + AC_PROG_CPP + AC_PROG_INSTALL diff --git a/package/ifplugd/0004-musl-fix-types.patch b/package/ifplugd/0004-musl-fix-types.patch new file mode 100644 index 0000000000..174f9c8a37 --- /dev/null +++ b/package/ifplugd/0004-musl-fix-types.patch @@ -0,0 +1,24 @@ +The musl C library does not define type names such as `__uint32_t`. Instead we +use the integer types declared in the ISO C standard header file . + +Signed-off-by: Jörg Krause + +diff -purN ifplugd-0.28.orig/src/ethtool-local.h ifplugd-0.28/src/ethtool-local.h +--- ifplugd-0.28.orig/src/ethtool-local.h 2015-08-01 18:43:47.360916834 +0200 ++++ ifplugd-0.28/src/ethtool-local.h 2015-08-01 18:44:24.256037746 +0200 +@@ -21,10 +21,12 @@ + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. + */ + ++#include ++ + typedef unsigned long long u64; +-typedef __uint32_t u32; +-typedef __uint16_t u16; +-typedef __uint8_t u8; ++typedef uint32_t u32; ++typedef uint16_t u16; ++typedef uint8_t u8; + + #include "ethtool-kernel.h" + diff --git a/package/ifplugd/Config.in b/package/ifplugd/Config.in new file mode 100644 index 0000000000..cbb5128c4a --- /dev/null +++ b/package/ifplugd/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_IFPLUGD + bool "ifplugd" + # libdaemon uses fork() + depends on BR2_USE_MMU + select BR2_PACKAGE_LIBDAEMON + help + Ifplugd is a daemon which will automatically configure your + ethernet device when a cable is plugged in and automatically + de-configure it if the cable is pulled out. This is useful + on laptops with onboard network adapters, since it will only + configure the interface when a cable is really connected. + + http://0pointer.de/lennart/projects/ifplugd/ diff --git a/package/ifplugd/ifplugd.hash b/package/ifplugd/ifplugd.hash new file mode 100644 index 0000000000..2977c69aa8 --- /dev/null +++ b/package/ifplugd/ifplugd.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 474754ac4ab32d738cbf2a4a3e87ee0a2c71b9048a38bdcd7df1e4f9fd6541f0 ifplugd-0.28.tar.gz diff --git a/package/ifplugd/ifplugd.mk b/package/ifplugd/ifplugd.mk new file mode 100644 index 0000000000..9f0feba3f5 --- /dev/null +++ b/package/ifplugd/ifplugd.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# ifplugd +# +################################################################################ + +IFPLUGD_VERSION = 0.28 +IFPLUGD_SITE = http://0pointer.de/lennart/projects/ifplugd +IFPLUGD_LICENSE = GPLv2 +IFPLUGD_LICENSE_FILES = LICENSE +IFPLUGD_AUTORECONF = YES + +# install-strip unconditionally overwrites $(TARGET_DIR)/etc/ifplugd/ifplugd.* +IFPLUGD_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-exec +IFPLUGD_CONF_OPTS = --disable-lynx --with-initdir=/etc/init.d/ +IFPLUGD_DEPENDENCIES = libdaemon + +# Prefer big ifplugd +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +IFPLUGD_DEPENDENCIES += busybox +endif + +define IFPLUGD_INSTALL_FIXUP + $(INSTALL) -D -m 0644 $(@D)/conf/ifplugd.conf $(TARGET_DIR)/etc/ifplugd/ifplugd.conf; \ + $(SED) 's^\(ARGS=.*\)w^\1^' $(TARGET_DIR)/etc/ifplugd/ifplugd.conf; \ + $(INSTALL) -D -m 0755 $(@D)/conf/ifplugd.action \ + $(TARGET_DIR)/etc/ifplugd/ifplugd.action +endef + +IFPLUGD_POST_INSTALL_TARGET_HOOKS += IFPLUGD_INSTALL_FIXUP + +define IFPLUGD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 $(@D)/conf/ifplugd.init \ + $(TARGET_DIR)/etc/init.d/S45ifplugd + # don't use bash for init script + $(SED) 's^/bin/bash^/bin/sh^g' $(TARGET_DIR)/etc/init.d/S45ifplugd +endef + +$(eval $(autotools-package)) diff --git a/package/iftop/Config.in b/package/iftop/Config.in new file mode 100644 index 0000000000..8c6ae0caaf --- /dev/null +++ b/package/iftop/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_IFTOP + bool "iftop" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_LIBPCAP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + iftop does for network usage what top(1) does for CPU usage. + It listens to network traffic on a named interface and displays + a table of current bandwidth usage by pairs of hosts. Handy for + answering the question "why is our ADSL link so slow?". + + http://www.ex-parrot.com/pdw/iftop/ + +comment "iftop needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/iftop/iftop.hash b/package/iftop/iftop.hash new file mode 100644 index 0000000000..19ce66b0a4 --- /dev/null +++ b/package/iftop/iftop.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 f733eeea371a7577f8fe353d86dd88d16f5b2a2e702bd96f5ffb2c197d9b4f97 iftop-1.0pre4.tar.gz diff --git a/package/iftop/iftop.mk b/package/iftop/iftop.mk new file mode 100644 index 0000000000..042f2b28eb --- /dev/null +++ b/package/iftop/iftop.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# iftop +# +################################################################################ + +IFTOP_VERSION = 1.0pre4 +IFTOP_SITE = http://www.ex-parrot.com/pdw/iftop/download +IFTOP_DEPENDENCIES = ncurses libpcap +IFTOP_LICENSE = GPLv2+ +IFTOP_LICENSE_FILES = COPYING + +IFTOP_LIBS = -lpcap +ifeq ($(BR2_STATIC_LIBS),y) +IFTOP_LIBS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs` +endif +IFTOP_CONF_ENV += LIBS+="$(IFTOP_LIBS)" + +$(eval $(autotools-package)) diff --git a/package/ifupdown/0001-dont-use-dpkg-architecture.patch b/package/ifupdown/0001-dont-use-dpkg-architecture.patch new file mode 100644 index 0000000000..bb5c58f840 --- /dev/null +++ b/package/ifupdown/0001-dont-use-dpkg-architecture.patch @@ -0,0 +1,17 @@ +Drop the need for dpkg-architecture, we only build for linux. +Thanks to Károly Kasza for catching this one. + +Signed-off-by: Gustavo Zacarias + +diff -Nura ifupdown.orig/defn2c.pl ifupdown/defn2c.pl +--- ifupdown.orig/defn2c.pl 2014-11-18 16:39:28.878772655 -0300 ++++ ifupdown/defn2c.pl 2014-11-18 16:43:41.120456676 -0300 +@@ -2,7 +2,7 @@ + + use strict; + +-my $DEB_HOST_ARCH_OS = `dpkg-architecture -qDEB_HOST_ARCH_OS`; ++my $DEB_HOST_ARCH_OS = "linux"; + + $DEB_HOST_ARCH_OS =~ s/\n//; + diff --git a/package/ifupdown/Config.in b/package/ifupdown/Config.in new file mode 100644 index 0000000000..1e11e4ee0a --- /dev/null +++ b/package/ifupdown/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_IFUPDOWN + bool "ifupdown" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # iproute2 + # Default/our uclibc lacks wordexp() + depends on !BR2_TOOLCHAIN_USES_UCLIBC + # runtime for ip binary + select BR2_PACKAGE_IPROUTE2 if !BR2_PACKAGE_BUSYBOX + # runtime for run-parts + select BR2_PACKAGE_DEBIANUTILS if !BR2_PACKAGE_BUSYBOX + help + High level tools to configure network interfaces. + + https://tracker.debian.org/pkg/ifupdown + +comment "ifupdown needs an (e)glibc or musl toolchain w/ headers >= 3.0" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_USES_UCLIBC || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 diff --git a/package/ifupdown/ifupdown.hash b/package/ifupdown/ifupdown.hash new file mode 100644 index 0000000000..cd180add67 --- /dev/null +++ b/package/ifupdown/ifupdown.hash @@ -0,0 +1,2 @@ +# From http://ftp.de.debian.org/debian/pool/main/i/ifupdown/ifupdown_0.8.10.dsc +sha256 d4730441b9234e5dcaab7dd688ad48ec17e130d1534a357b1c4fff13cf741b0c ifupdown_0.8.10.tar.xz diff --git a/package/ifupdown/ifupdown.mk b/package/ifupdown/ifupdown.mk new file mode 100644 index 0000000000..1421a67e6a --- /dev/null +++ b/package/ifupdown/ifupdown.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# ifupdown +# +################################################################################ + +IFUPDOWN_VERSION = 0.8.10 +IFUPDOWN_SOURCE = ifupdown_$(IFUPDOWN_VERSION).tar.xz +IFUPDOWN_SITE = http://snapshot.debian.org/archive/debian/20160122T224509Z/pool/main/i/ifupdown +IFUPDOWN_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox) +IFUPDOWN_LICENSE = GPLv2+ +IFUPDOWN_LICENSE_FILES = COPYING + +define IFUPDOWN_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99 -D'IFUPDOWN_VERSION=\"$(IFUPDOWN_VERSION)\"'" \ + -C $(@D) +endef + +# install doesn't overwrite +define IFUPDOWN_INSTALL_TARGET_CMDS + $(RM) $(TARGET_DIR)/sbin/{ifdown,ifquery} + $(TARGET_MAKE_ENV) $(MAKE) BASEDIR=$(TARGET_DIR) -C $(@D) install +endef + +# We need to switch from /bin/ip to /sbin/ip +IFUPDOWN_DEFN_FILES = can inet inet6 ipx link meta +define IFUPDOWN_MAKE_IP_IN_SBIN + for f in $(IFUPDOWN_DEFN_FILES) ; do \ + $(SED) 's,/bin/ip,/sbin/ip,' $(@D)/$$f.defn ; \ + done +endef +IFUPDOWN_POST_PATCH_HOOKS += IFUPDOWN_MAKE_IP_IN_SBIN + +$(eval $(generic-package)) diff --git a/package/igh-ethercat/Config.in b/package/igh-ethercat/Config.in new file mode 100644 index 0000000000..e600ef5fcd --- /dev/null +++ b/package/igh-ethercat/Config.in @@ -0,0 +1,29 @@ +comment "igh-ethercat needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_IGH_ETHERCAT + bool "igh-ethercat" + depends on BR2_LINUX_KERNEL + help + IgH EtherCAT Master for Linux. + + http://www.etherlab.org/en/ethercat/index.php + +if BR2_PACKAGE_IGH_ETHERCAT + +config BR2_PACKAGE_IGH_ETHERCAT_8139TOO + bool "8139too driver" + +config BR2_PACKAGE_IGH_ETHERCAT_E100 + bool "e100 driver" + +config BR2_PACKAGE_IGH_ETHERCAT_E1000 + bool "e1000 driver" + +config BR2_PACKAGE_IGH_ETHERCAT_E1000E + bool "e1000e driver" + +config BR2_PACKAGE_IGH_ETHERCAT_R8169 + bool "r8169 driver" + +endif diff --git a/package/igh-ethercat/igh-ethercat.hash b/package/igh-ethercat/igh-ethercat.hash new file mode 100644 index 0000000000..b5ee124aa4 --- /dev/null +++ b/package/igh-ethercat/igh-ethercat.hash @@ -0,0 +1,2 @@ +# From http://etherlab.org/download/ethercat/ethercat-1.5.2.tar.bz2.md5 +md5 6b4001f8d975865d74a0b108b3bdda3d ethercat-1.5.2.tar.bz2 diff --git a/package/igh-ethercat/igh-ethercat.mk b/package/igh-ethercat/igh-ethercat.mk new file mode 100644 index 0000000000..32c49a3cf8 --- /dev/null +++ b/package/igh-ethercat/igh-ethercat.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# igh-ethercat +# +################################################################################ + +IGH_ETHERCAT_VERSION = 1.5.2 +IGH_ETHERCAT_SITE = http://etherlab.org/download/ethercat +IGH_ETHERCAT_SOURCE = ethercat-$(IGH_ETHERCAT_VERSION).tar.bz2 +IGH_ETHERCAT_LICENSE = GPLv2 (IgH EtherCAT master), LGPLv2.1 (libraries) +IGH_ETHERCAT_LICENSE_FILES = COPYING COPYING.LESSER + +IGH_ETHERCAT_INSTALL_STAGING = YES + +IGH_ETHERCAT_CONF_OPTS = \ + --with-linux-dir=$(LINUX_DIR) + +IGH_ETHERCAT_CONF_OPTS += $(if $(BR2_PACKAGE_IGH_ETHERCAT_8139TOO),--enable-8139too,--disable-8139too) +IGH_ETHERCAT_CONF_OPTS += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E100),--enable-e100,--disable-e100) +IGH_ETHERCAT_CONF_OPTS += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E1000),--enable-e1000,--disable-e1000) +IGH_ETHERCAT_CONF_OPTS += $(if $(BR2_PACKAGE_IGH_ETHERCAT_E1000E),--enable-e1000e,--disable-e1000e) +IGH_ETHERCAT_CONF_OPTS += $(if $(BR2_PACKAGE_IGH_ETHERCAT_R8169),--enable-r8169,--disable-r8169) + +$(eval $(kernel-module)) +$(eval $(autotools-package)) diff --git a/package/igmpproxy/0001-uclinux.patch b/package/igmpproxy/0001-uclinux.patch new file mode 100644 index 0000000000..7fa4a23830 --- /dev/null +++ b/package/igmpproxy/0001-uclinux.patch @@ -0,0 +1,16 @@ +configure.ac: uclinux is also linux + +Signed-off-by: Gustavo Zacarias + +diff -Nura igmpproxy-0.1.orig/configure.ac igmpproxy-0.1/configure.ac +--- igmpproxy-0.1.orig/configure.ac 2014-03-12 18:43:02.369323771 -0300 ++++ igmpproxy-0.1/configure.ac 2014-03-12 18:43:22.129979179 -0300 +@@ -7,7 +7,7 @@ + + AC_CANONICAL_HOST + case $host_os in +- linux*) os=linux;; ++ linux*|uclinux*) os=linux;; + freebsd*) os=freebsd;; + netbsd*) os=netbsd;; + openbsd*) os=openbsd;; diff --git a/package/igmpproxy/Config.in b/package/igmpproxy/Config.in new file mode 100644 index 0000000000..a9e4c1cc6a --- /dev/null +++ b/package/igmpproxy/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_IGMPPROXY + bool "igmpproxy" + depends on BR2_USE_WCHAR + help + A simple dynamic Multicast Routing Daemon + using only IGMP signalling. It's intended + for simple forwarding of Multicast traffic + between networks. + + http://sourceforge.net/projects/igmpproxy/ + +comment "igmpproxy needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/igmpproxy/igmpproxy.hash b/package/igmpproxy/igmpproxy.hash new file mode 100644 index 0000000000..f7d3b1eb25 --- /dev/null +++ b/package/igmpproxy/igmpproxy.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 ee18ff3d8c3ae3a29dccb7e5eedf332337330020168bd95a11cece8d7d7ee6ae igmpproxy-0.1.tar.gz diff --git a/package/igmpproxy/igmpproxy.mk b/package/igmpproxy/igmpproxy.mk new file mode 100644 index 0000000000..cdf3774bdf --- /dev/null +++ b/package/igmpproxy/igmpproxy.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# igmpproxy +# +################################################################################ + +IGMPPROXY_VERSION = 0.1 +IGMPPROXY_SITE = http://downloads.sourceforge.net/project/igmpproxy/igmpproxy/$(IGMPPROXY_VERSION) +# igmpproxy-01-uclinux.patch +IGMPPROXY_AUTORECONF = YES +IGMPPROXY_LICENSE = GPLv2+ +IGMPPROXY_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/ijs/Config.in b/package/ijs/Config.in new file mode 100644 index 0000000000..50e8161bf0 --- /dev/null +++ b/package/ijs/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_IJS + bool "ijs" + depends on BR2_USE_MMU # fork() + help + The IJS package contains a library which implements a + protocol for transmission of raster page images. + + http://www.openprinting.org/ diff --git a/package/ijs/ijs.hash b/package/ijs/ijs.hash new file mode 100644 index 0000000000..1a8f564efd --- /dev/null +++ b/package/ijs/ijs.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 11a5f5084488c480f3ff5a24d64d7147bb64272bf60a0ba51330a56c5b50cab9 ijs-0.35.tar.bz2 diff --git a/package/ijs/ijs.mk b/package/ijs/ijs.mk new file mode 100644 index 0000000000..dfd3ff9f90 --- /dev/null +++ b/package/ijs/ijs.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# ijs +# +################################################################################ + +IJS_VERSION = 0.35 +IJS_SOURCE = ijs-$(IJS_VERSION).tar.bz2 +IJS_SITE = http://www.openprinting.org/download/ijs/download +IJS_LICENSE = MIT +IJS_LICENSE_FILES = README +# Buildroot libtool patch does not apply, so we autoreconf the +# package. +IJS_AUTORECONF = YES +IJS_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/imagemagick/Config.in b/package/imagemagick/Config.in new file mode 100644 index 0000000000..0bd4df2ab7 --- /dev/null +++ b/package/imagemagick/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_IMAGEMAGICK + bool "imagemagick" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + help + ImageMagick(R) is a software suite to create, edit, and compose + bitmap images. It can read, convert and write images in a variety of + formats (about 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, + PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to + translate, flip, mirror, rotate, scale, shear and transform images, + adjust image colors, apply various special effects, or draw text, + lines, polygons, ellipses and Bézier curves. + + http://www.imagemagick.org/ + +comment "imagemagick needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/imagemagick/imagemagick.hash b/package/imagemagick/imagemagick.hash new file mode 100644 index 0000000000..9a2a3eee56 --- /dev/null +++ b/package/imagemagick/imagemagick.hash @@ -0,0 +1,2 @@ +# From http://www.imagemagick.org/download/releases/digest.rdf +sha256 2ea0fef839cd5d6f134502b7cf7ee0e57a3f230b19771515d4aa44354f4c6b3b ImageMagick-6.9.4-1.tar.xz diff --git a/package/imagemagick/imagemagick.mk b/package/imagemagick/imagemagick.mk new file mode 100644 index 0000000000..c952c2a5d1 --- /dev/null +++ b/package/imagemagick/imagemagick.mk @@ -0,0 +1,129 @@ +################################################################################ +# +# imagemagick +# +################################################################################ + +IMAGEMAGICK_VERSION = 6.9.4-1 +IMAGEMAGICK_SOURCE = ImageMagick-$(IMAGEMAGICK_VERSION).tar.xz +IMAGEMAGICK_SITE = http://www.imagemagick.org/download/releases +IMAGEMAGICK_LICENSE = Apache-2.0 +IMAGEMAGICK_LICENSE_FILES = LICENSE + +IMAGEMAGICK_INSTALL_STAGING = YES +IMAGEMAGICK_CONFIG_SCRIPTS = \ + $(addsuffix -config,Magick MagickCore MagickWand Wand) + +ifeq ($(BR2_INSTALL_LIBSTDCPP)$(BR2_USE_WCHAR),yy) +IMAGEMAGICK_CONFIG_SCRIPTS += Magick++-config +endif + +IMAGEMAGICK_CONF_ENV = ac_cv_sys_file_offset_bits=64 + +IMAGEMAGICK_CONF_OPTS = \ + --program-transform-name='s,,,' \ + --disable-openmp \ + --without-perl \ + --without-wmf \ + --without-openexr \ + --without-jp2 \ + --without-jbig \ + --without-gvc \ + --without-djvu \ + --without-dps \ + --without-gslib \ + --without-fpx \ + --without-x + +IMAGEMAGICK_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +IMAGEMAGICK_CONF_OPTS += --with-fontconfig +IMAGEMAGICK_DEPENDENCIES += fontconfig +else +IMAGEMAGICK_CONF_OPTS += --without-fontconfig +endif + +ifeq ($(BR2_PACKAGE_FREETYPE),y) +IMAGEMAGICK_CONF_OPTS += --with-freetype +IMAGEMAGICK_CONF_ENV += \ + ac_cv_path_freetype_config=$(STAGING_DIR)/usr/bin/freetype-config +IMAGEMAGICK_DEPENDENCIES += freetype +else +IMAGEMAGICK_CONF_OPTS += --without-freetype +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +IMAGEMAGICK_CONF_OPTS += --with-jpeg +IMAGEMAGICK_DEPENDENCIES += jpeg +else +IMAGEMAGICK_CONF_OPTS += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_LCMS2),y) +IMAGEMAGICK_CONF_OPTS += --with-lcms +IMAGEMAGICK_DEPENDENCIES += lcms2 +else +IMAGEMAGICK_CONF_OPTS += --without-lcms +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +IMAGEMAGICK_CONF_OPTS += --with-png +IMAGEMAGICK_DEPENDENCIES += libpng +else +IMAGEMAGICK_CONF_OPTS += --without-png +endif + +ifeq ($(BR2_PACKAGE_LIBRSVG),y) +IMAGEMAGICK_CONF_OPTS += --with-rsvg +IMAGEMAGICK_DEPENDENCIES += librsvg +else +IMAGEMAGICK_CONF_OPTS += --without-rsvg +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +IMAGEMAGICK_CONF_OPTS += --with-xml +IMAGEMAGICK_CONF_ENV += ac_cv_path_xml2_config=$(STAGING_DIR)/usr/bin/xml2-config +IMAGEMAGICK_DEPENDENCIES += libxml2 +else +IMAGEMAGICK_CONF_OPTS += --without-xml +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) +IMAGEMAGICK_CONF_OPTS += --with-tiff +IMAGEMAGICK_DEPENDENCIES += tiff +else +IMAGEMAGICK_CONF_OPTS += --without-tiff +endif + +ifeq ($(BR2_PACKAGE_FFTW),y) +# configure script misdetects these leading to build errors +IMAGEMAGICK_CONF_ENV += ac_cv_func_creal=yes ac_cv_func_cimag=yes +IMAGEMAGICK_CONF_OPTS += --with-fftw +IMAGEMAGICK_DEPENDENCIES += fftw +else +IMAGEMAGICK_CONF_OPTS += --without-fftw +endif + +ifeq ($(BR2_PACKAGE_WEBP),y) +IMAGEMAGICK_CONF_OPTS += --with-webp +IMAGEMAGICK_DEPENDENCIES += webp +else +IMAGEMAGICK_CONF_OPTS += --without-webp +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +IMAGEMAGICK_CONF_OPTS += --with-zlib +IMAGEMAGICK_DEPENDENCIES += zlib +else +IMAGEMAGICK_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +IMAGEMAGICK_CONF_OPTS += --with-bzlib +IMAGEMAGICK_DEPENDENCIES += bzip2 +else +IMAGEMAGICK_CONF_OPTS += --without-bzlib +endif + +$(eval $(autotools-package)) diff --git a/package/imlib2/Config.in b/package/imlib2/Config.in new file mode 100644 index 0000000000..7aac07439c --- /dev/null +++ b/package/imlib2/Config.in @@ -0,0 +1,42 @@ +comment "imlib2 needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_IMLIB2 + bool "imlib2" + select BR2_PACKAGE_FREETYPE + depends on !BR2_STATIC_LIBS # dlopen() + help + Imlib 2 is the successor to Imlib. This library provides + routines to load, save and render images in various formats. + + http://freshmeat.net/projects/imlib2/ + +if BR2_PACKAGE_IMLIB2 + +config BR2_PACKAGE_IMLIB2_JPEG + bool "JPEG support" + select BR2_PACKAGE_JPEG + +config BR2_PACKAGE_IMLIB2_PNG + bool "PNG support" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_IMLIB2_GIF + bool "GIF support" + select BR2_PACKAGE_GIFLIB + +config BR2_PACKAGE_IMLIB2_TIFF + bool "TIFF support" + select BR2_PACKAGE_TIFF + +config BR2_PACKAGE_IMLIB2_ID3 + bool "ID3 support" + select BR2_PACKAGE_LIBID3TAG + +config BR2_PACKAGE_IMLIB2_X + bool "X support" + default y + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBX11 +endif diff --git a/package/imlib2/imlib2.hash b/package/imlib2/imlib2.hash new file mode 100644 index 0000000000..6e1faafc9b --- /dev/null +++ b/package/imlib2/imlib2.hash @@ -0,0 +1,3 @@ +# From https://sourceforge.net/projects/enlightenment/files/imlib2-src/1.4.9/ +md5 23ef8b49f2793bc63b16839a2062298b imlib2-1.4.9.tar.bz2 +sha1 f389d67c337b604a365e620b0083b2d342dd724e imlib2-1.4.9.tar.bz2 diff --git a/package/imlib2/imlib2.mk b/package/imlib2/imlib2.mk new file mode 100644 index 0000000000..9781777012 --- /dev/null +++ b/package/imlib2/imlib2.mk @@ -0,0 +1,68 @@ +################################################################################ +# +# imlib2 +# +################################################################################ + +IMLIB2_VERSION = 1.4.9 +IMLIB2_SOURCE = imlib2-$(IMLIB2_VERSION).tar.bz2 +IMLIB2_SITE = http://downloads.sourceforge.net/project/enlightenment/imlib2-src/$(IMLIB2_VERSION) +IMLIB2_LICENSE = imlib2 license +IMLIB2_LICENSE_FILES = COPYING + +IMLIB2_AUTORECONF = YES +IMLIB2_INSTALL_STAGING = YES +IMLIB2_DEPENDENCIES = host-pkgconf freetype +IMLIB2_CONF_OPTS = --with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config +IMLIB2_CONFIG_SCRIPTS = imlib2-config + +ifeq ($(BR2_PACKAGE_IMLIB2_X),y) +IMLIB2_CONF_OPTS += --with-x +IMLIB2_DEPENDENCIES += xlib_libX11 xlib_libXext +else +IMLIB2_CONF_OPTS += --without-x +endif + +ifeq ($(BR2_PACKAGE_IMLIB2_JPEG),y) +IMLIB2_CONF_OPTS += --with-jpeg +IMLIB2_DEPENDENCIES += jpeg +else +IMLIB2_CONF_OPTS += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_IMLIB2_PNG),y) +IMLIB2_CONF_OPTS += --with-png +IMLIB2_DEPENDENCIES += libpng +else +IMLIB2_CONF_OPTS += --without-png +endif + +ifeq ($(BR2_PACKAGE_IMLIB2_GIF),y) +IMLIB2_CONF_OPTS += --with-gif +IMLIB2_DEPENDENCIES += giflib +else +IMLIB2_CONF_OPTS += --without-gif +endif + +ifeq ($(BR2_PACKAGE_IMLIB2_TIFF),y) +IMLIB2_CONF_OPTS += --with-tiff +IMLIB2_DEPENDENCIES += tiff +else +IMLIB2_CONF_OPTS += --without-tiff +endif + +ifeq ($(BR2_PACKAGE_IMLIB2_ID3),y) +IMLIB2_CONF_OPTS += --with-id3 +IMLIB2_DEPENDENCIES += libid3tag +else +IMLIB2_CONF_OPTS += --without-id3 +endif + +# drop -L from linker flags +define IMLIB2_FIXUP_IMLIB2_CONFIG + $(SED) 's/-L[^ ]*//g' $(STAGING_DIR)/usr/bin/imlib2-config +endef + +IMLIB2_POST_INSTALL_STAGING_HOOKS += IMLIB2_FIXUP_IMLIB2_CONFIG + +$(eval $(autotools-package)) diff --git a/package/imx-usb-loader/Config.in.host b/package/imx-usb-loader/Config.in.host new file mode 100644 index 0000000000..aefa01b2b4 --- /dev/null +++ b/package/imx-usb-loader/Config.in.host @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_IMX_USB_LOADER + bool "host-imx-usb loader" + depends on BR2_arm + help + This package contains tools to download and execute code + on Freescale i.MX5/i.MX6 and Vybrid SoCs through the + Serial Download Protocol. + + https://github.com/boundarydevices/imx_usb_loader diff --git a/package/imx-usb-loader/imx-usb-loader.mk b/package/imx-usb-loader/imx-usb-loader.mk new file mode 100644 index 0000000000..280ffc0401 --- /dev/null +++ b/package/imx-usb-loader/imx-usb-loader.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# imx-usb-loader +# +################################################################################ + +IMX_USB_LOADER_VERSION = f96aee286ea17c832b7ec922dd76842deb5ce299 +IMX_USB_LOADER_SITE = $(call github,boundarydevices,imx_usb_loader,$(IMX_USB_LOADER_VERSION)) +IMX_USB_LOADER_LICENSE = LGPLv2.1+ +IMX_USB_LOADER_LICENSE_FILES = COPYING +IMX_USB_LOADER_DEPENDENCIES = host-libusb host-pkgconf + +define HOST_IMX_USB_LOADER_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define HOST_IMX_USB_LOADER_INSTALL_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + DESTDIR=$(HOST_DIR) sysconfdir=/etc install +endef + +$(eval $(host-generic-package)) diff --git a/package/inadyn/Config.in b/package/inadyn/Config.in new file mode 100644 index 0000000000..65f6851cb2 --- /dev/null +++ b/package/inadyn/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_INADYN + bool "inadyn" + depends on BR2_USE_MMU # Uses fork() + depends on !BR2_STATIC_LIBS # dlopen() + help + INADYN is a free DynDNS client. It gives the possibility + to have your own fixed hostname registered on the internet, + although your IP might be changing. + + https://github.com/troglobit/inadyn + +comment "inadyn needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + depends on BR2_USE_MMU diff --git a/package/inadyn/S70inadyn b/package/inadyn/S70inadyn new file mode 100644 index 0000000000..ca7b414678 --- /dev/null +++ b/package/inadyn/S70inadyn @@ -0,0 +1,44 @@ +#!/bin/sh +# +# Start & stop the inadyn client +# + +CONFIG=/etc/inadyn.conf + +# check if CONFIG exists, print message & exit if it doesn't +[ ! -f $CONFIG ] && ( echo "The config file "$CONFIG" is missing...exiting now." && exit 2 ) + +# Allow a few customizations from a config file. Especially inadyn +# must be explicitly enabled by adding ENABLED="yes" in this file. +test -r /etc/default/inadyn && . /etc/default/inadyn + +case "$1" in + start) + printf "Starting inadyn: " + if test "${ENABLED}" != "yes" ; then + echo "SKIPPED" + exit 0 + fi + start-stop-daemon -b -q -S -p /var/run/inadyn.pid -x /usr/sbin/inadyn + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping inadyn: " + if test "${ENABLED}" != "yes" ; then + echo "SKIPPED" + exit 0 + fi + start-stop-daemon -q -K -p /var/run/inadyn.pid -x /usr/sbin/inadyn + [ $? = 0 ] && echo "OK" || echo "FAIL" + rm -f /var/run/inadyn.pid + ;; + restart) + "$0" stop + "$0" start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/inadyn/inadyn.conf b/package/inadyn/inadyn.conf new file mode 100644 index 0000000000..ab8aa3611c --- /dev/null +++ b/package/inadyn/inadyn.conf @@ -0,0 +1,11 @@ +# Basic configuration file for inadyn +# +# /etc/inadyn.conf +pidfile /var/run/inadyn.pid +update_period_sec 600 # Check for a new IP every 600 seconds +username test # replace 'test' with your username +password test # replace 'test' with your password +dyndns_system default@dyndns.org # replace w/ your provider + +alias test.homeip.net +# replace 'test.homeip.net' with yourdomainname for actual (non-test) use diff --git a/package/inadyn/inadyn.hash b/package/inadyn/inadyn.hash new file mode 100644 index 0000000000..940bd16fba --- /dev/null +++ b/package/inadyn/inadyn.hash @@ -0,0 +1,2 @@ +# From https://github.com/troglobit/inadyn/releases/download/1.99.12/inadyn-1.99.12.tar.xz.md5 +md5 a620c9eab9cd31c8923e7264b08376f3 inadyn-1.99.12.tar.xz diff --git a/package/inadyn/inadyn.mk b/package/inadyn/inadyn.mk new file mode 100644 index 0000000000..8ceca4c352 --- /dev/null +++ b/package/inadyn/inadyn.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# inadyn +# +################################################################################ + +INADYN_VERSION = 1.99.12 +INADYN_SITE = https://github.com/troglobit/inadyn/releases/download/$(INADYN_VERSION) +INADYN_SOURCE = inadyn-$(INADYN_VERSION).tar.xz +INADYN_LICENSE = GPLv2+ +INADYN_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +INADYN_CONF_OPTS += --enable-openssl +INADYN_DEPENDENCIES += openssl +else ifeq ($(BR2_PACKAGE_GNUTLS),y) +INADYN_DEPENDENCIES += gnutls +else +INADYN_CONF_OPTS += --disable-ssl +endif + +define INADYN_INSTALL_SAMPLE_CONFIG + $(INSTALL) -D -m 0600 package/inadyn/inadyn.conf \ + $(TARGET_DIR)/etc/inadyn.conf +endef +INADYN_POST_INSTALL_TARGET_HOOKS += INADYN_INSTALL_SAMPLE_CONFIG + +define INADYN_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/inadyn/S70inadyn \ + $(TARGET_DIR)/etc/init.d/S70inadyn +endef + +define INADYN_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/inadyn/inadyn.service \ + $(TARGET_DIR)/usr/lib/systemd/system/inadyn.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/inadyn.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/inadyn.service +endef + +$(eval $(autotools-package)) diff --git a/package/inadyn/inadyn.service b/package/inadyn/inadyn.service new file mode 100644 index 0000000000..abc0a1e401 --- /dev/null +++ b/package/inadyn/inadyn.service @@ -0,0 +1,10 @@ +[Unit] +Description=DDNS client +After=syslog.target network.target + +[Service] +ExecStart=/usr/bin/inadyn +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/inconsolata/Config.in b/package/inconsolata/Config.in new file mode 100644 index 0000000000..de6b388574 --- /dev/null +++ b/package/inconsolata/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_INCONSOLATA + bool "inconsolata" + help + Inconsolata is a monospace font, designed for code listings + and the like. + + http://www.google.com/fonts/specimen/Inconsolata diff --git a/package/inconsolata/inconsolata.hash b/package/inconsolata/inconsolata.hash new file mode 100644 index 0000000000..49ea958472 --- /dev/null +++ b/package/inconsolata/inconsolata.hash @@ -0,0 +1,2 @@ +# From http://snapshot.debian.org/archive/debian/20091207T044352Z/pool/main/t/ttf-inconsolata/ttf-inconsolata_001.010-2.dsc +sha256 ecf8ba44911fcb3c9683aef1ca2b3cfbafa119a3e93c682f448850e1ae08ce93 ttf-inconsolata_001.010.orig.tar.gz diff --git a/package/inconsolata/inconsolata.mk b/package/inconsolata/inconsolata.mk new file mode 100644 index 0000000000..2f53b98a22 --- /dev/null +++ b/package/inconsolata/inconsolata.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# inconsolata +# +################################################################################ + +INCONSOLATA_VERSION = 001.010 +INCONSOLATA_SITE = http://snapshot.debian.org/archive/debian/20090524T155154Z/pool/main/t/ttf-inconsolata +INCONSOLATA_SOURCE = ttf-inconsolata_$(INCONSOLATA_VERSION).orig.tar.gz +INCONSOLATA_TARGET_DIR = $(TARGET_DIR)/usr/share/fonts/inconsolata +INCONSOLATA_LICENSE = OFLv1.0 +INCONSOLATA_LICENSE_FILES = OFL.txt + +define INCONSOLATA_INSTALL_TARGET_CMDS + mkdir -p $(INCONSOLATA_TARGET_DIR) + $(INSTALL) -m 644 $(@D)/*.otf $(INCONSOLATA_TARGET_DIR) +endef + +$(eval $(generic-package)) diff --git a/package/initscripts/Config.in b/package/initscripts/Config.in new file mode 100644 index 0000000000..82cbd5c678 --- /dev/null +++ b/package/initscripts/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_INITSCRIPTS + bool + help + The basics startup scripts for both SysV and Busybox diff --git a/package/initscripts/init.d/S20urandom b/package/initscripts/init.d/S20urandom new file mode 100755 index 0000000000..2f5b4e4c86 --- /dev/null +++ b/package/initscripts/init.d/S20urandom @@ -0,0 +1,51 @@ +#! /bin/sh +# +# urandom This script saves the random seed between reboots. +# It is called from the boot, halt and reboot scripts. +# +# Version: @(#)urandom 1.33 22-Jun-1998 miquels@cistron.nl +# + +[ -c /dev/urandom ] || exit 0 +#. /etc/default/rcS + +case "$1" in + start|"") + # check for read only file system + if ! touch /etc/random-seed 2>/dev/null + then + echo "read-only file system detected...done" + exit + fi + if [ "$VERBOSE" != no ] + then + printf "Initializing random number generator... " + fi + # Load and then save 512 bytes, + # which is the size of the entropy pool + cat /etc/random-seed >/dev/urandom + rm -f /etc/random-seed + umask 077 + dd if=/dev/urandom of=/etc/random-seed count=1 \ + >/dev/null 2>&1 || echo "urandom start: failed." + umask 022 + [ "$VERBOSE" != no ] && echo "done." + ;; + stop) + if ! touch /etc/random-seed 2>/dev/null + then + exit + fi + # Carry a random seed from shut-down to start-up; + # see documentation in linux/drivers/char/random.c + [ "$VERBOSE" != no ] && printf "Saving random seed... " + umask 077 + dd if=/dev/urandom of=/etc/random-seed count=1 \ + >/dev/null 2>&1 || echo "urandom stop: failed." + [ "$VERBOSE" != no ] && echo "done." + ;; + *) + echo "Usage: urandom {start|stop}" >&2 + exit 1 + ;; +esac diff --git a/package/initscripts/init.d/S40network b/package/initscripts/init.d/S40network new file mode 100755 index 0000000000..7b11d8b902 --- /dev/null +++ b/package/initscripts/init.d/S40network @@ -0,0 +1,28 @@ +#!/bin/sh +# +# Start the network.... +# + +# Debian ifupdown needs the /run/network lock directory +mkdir -p /run/network + +case "$1" in + start) + echo "Starting network..." + /sbin/ifup -a + ;; + stop) + printf "Stopping network..." + /sbin/ifdown -a + ;; + restart|reload) + "$0" stop + "$0" start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/initscripts/init.d/rcK b/package/initscripts/init.d/rcK new file mode 100755 index 0000000000..59e9c54ff9 --- /dev/null +++ b/package/initscripts/init.d/rcK @@ -0,0 +1,27 @@ +#!/bin/sh + + +# Stop all init scripts in /etc/init.d +# executing them in reversed numerical order. +# +for i in $(ls -r /etc/init.d/S??*) ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$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 + diff --git a/package/initscripts/init.d/rcS b/package/initscripts/init.d/rcS new file mode 100755 index 0000000000..de411534da --- /dev/null +++ b/package/initscripts/init.d/rcS @@ -0,0 +1,27 @@ +#!/bin/sh + + +# Start all init scripts in /etc/init.d +# executing them in numerical order. +# +for i in /etc/init.d/S??* ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$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 + diff --git a/package/initscripts/initscripts.mk b/package/initscripts/initscripts.mk new file mode 100644 index 0000000000..a5d8db7e9a --- /dev/null +++ b/package/initscripts/initscripts.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# initscripts +# +################################################################################ + +# source included in buildroot +INITSCRIPTS_SOURCE = + +define INITSCRIPTS_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/etc/init.d + $(INSTALL) -D -m 0755 package/initscripts/init.d/* $(TARGET_DIR)/etc/init.d/ +endef + +$(eval $(generic-package)) diff --git a/package/inotify-tools/Config.in b/package/inotify-tools/Config.in new file mode 100644 index 0000000000..df440d5926 --- /dev/null +++ b/package/inotify-tools/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_INOTIFY_TOOLS + bool "inotify-tools" + depends on BR2_USE_MMU # fork() + help + inotify-tools is a C library and a set of command-line + programs for Linux providing a simple interface to inotify. + These programs can be used to monitor and act upon + filesystem events. Provides the 'inotifywait' and 'inotifywatch' + binaries. + + https://github.com/rvoicilas/inotify-tools diff --git a/package/inotify-tools/inotify-tools.mk b/package/inotify-tools/inotify-tools.mk new file mode 100644 index 0000000000..3502525f61 --- /dev/null +++ b/package/inotify-tools/inotify-tools.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# inotify-tools +# +################################################################################ + +INOTIFY_TOOLS_VERSION = 06007d350faa8731c67e186923ab417486104719 +INOTIFY_TOOLS_SITE = $(call github,rvoicilas,inotify-tools,$(INOTIFY_TOOLS_VERSION)) +INOTIFY_TOOLS_LICENSE = GPL +INOTIFY_TOOLS_LICENSE_FILES = COPYING +INOTIFY_TOOLS_INSTALL_STAGING = YES +INOTIFY_TOOLS_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/input-event-daemon/Config.in b/package/input-event-daemon/Config.in new file mode 100644 index 0000000000..84177fd8f2 --- /dev/null +++ b/package/input-event-daemon/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_INPUT_EVENT_DAEMON + bool "input-event-daemon" + # Uses fork() + depends on BR2_USE_MMU + help + input-event-daemon is a daemon which executes + a user-defined command on input events, such as + keys, mouse buttons and switches. + + http://github.com/gandro/input-event-daemon diff --git a/package/input-event-daemon/S99input-event-daemon b/package/input-event-daemon/S99input-event-daemon new file mode 100755 index 0000000000..8d70dd3079 --- /dev/null +++ b/package/input-event-daemon/S99input-event-daemon @@ -0,0 +1,39 @@ +#! /bin/sh + +[ -f /usr/bin/input-event-daemon ] || exit 0 + +start() { + printf "Starting input-event-daemon: " + input-event-daemon + echo "done" +} + + +stop() { + printf "Stopping input-event-daemon: " + killall input-event-daemon + echo "done" +} + +restart() { + stop + start +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|reload|restart}" + exit 1 +esac + +exit $? diff --git a/package/input-event-daemon/input-event-daemon.mk b/package/input-event-daemon/input-event-daemon.mk new file mode 100644 index 0000000000..0d23037ff6 --- /dev/null +++ b/package/input-event-daemon/input-event-daemon.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# input-event-daemon +# +################################################################################ + +INPUT_EVENT_DAEMON_VERSION = v0.1.3 +INPUT_EVENT_DAEMON_SITE = $(call github,gandro,input-event-daemon,$(INPUT_EVENT_DAEMON_VERSION)) +INPUT_EVENT_DAEMON_LICENSE = input-event-daemon license +INPUT_EVENT_DAEMON_LICENSE_FILES = README + +define INPUT_EVENT_DAEMON_BUILD_CMDS + touch $(@D)/input-event-table.h + $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) +endef + +define INPUT_EVENT_DAEMON_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/input-event-daemon \ + $(TARGET_DIR)/usr/bin/input-event-daemon + $(INSTALL) -m 644 -D $(@D)/docs/sample.conf \ + $(TARGET_DIR)/etc/input-event-daemon.conf +endef + +define INPUT_EVENT_DAEMON_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/input-event-daemon/S99input-event-daemon \ + $(TARGET_DIR)/etc/init.d/S99input-event-daemon +endef + +define INPUT_EVENT_DAEMON_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/input-event-daemon/input-event-daemon.service \ + $(TARGET_DIR)/usr/lib/systemd/system/input-event-daemon.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf /usr/lib/systemd/system/input-event-daemon.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/input-event-daemon.service +endef + +$(eval $(generic-package)) diff --git a/package/input-event-daemon/input-event-daemon.service b/package/input-event-daemon/input-event-daemon.service new file mode 100644 index 0000000000..d91e655ff9 --- /dev/null +++ b/package/input-event-daemon/input-event-daemon.service @@ -0,0 +1,9 @@ +[Unit] +Description=Input Event Daemon + +[Service] +ExecStart=/usr/bin/input-event-daemon --no-daemon +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/input-tools/0001-rint.patch b/package/input-tools/0001-rint.patch new file mode 100644 index 0000000000..b2aa13f760 --- /dev/null +++ b/package/input-tools/0001-rint.patch @@ -0,0 +1,18 @@ +diff -urN joystick-20051019.orig/utils/jscal.c joystick-20051019/utils/jscal.c +--- joystick-20051019.orig/utils/jscal.c 2004-10-19 09:51:52.000000000 +0200 ++++ joystick-20051019/utils/jscal.c 2009-01-18 10:48:50.000000000 +0100 +@@ -141,10 +141,10 @@ + c = 32767.0 / (inputs.cmin[1] - inputs.cmax[0]); + d = 32767.0 / (inputs.cmin[2] - inputs.cmax[1]); + +- results[0] = rint(a); +- results[1] = rint(b); +- results[2] = rint(c*16384.0); +- results[3] = rint(d*16384.0); ++ results[0] = (int) (a + 0.5); ++ results[1] = (int) (b + 0.5); ++ results[2] = (int) (c*16384.0 + 0.5); ++ results[3] = (int) (d*16384.0 + 0.5); + + return 1; + } diff --git a/package/input-tools/Config.in b/package/input-tools/Config.in new file mode 100644 index 0000000000..85b4fd006e --- /dev/null +++ b/package/input-tools/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_INPUT_TOOLS + bool "input-tools" + help + Tools for the Linux kernel input layer. + http://linuxconsole.sourceforge.net/ + +if BR2_PACKAGE_INPUT_TOOLS + +config BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH + bool "inputattach" + default y + help + Inputattach is used for attaching a serial line to the input layer. + +config BR2_PACKAGE_INPUT_TOOLS_JSCAL + bool "jscal" + default y + help + Joystick calibration program. + +config BR2_PACKAGE_INPUT_TOOLS_JSTEST + bool "jstest" + default y + help + Joystick test program. + +endif diff --git a/package/input-tools/input-tools.hash b/package/input-tools/input-tools.hash new file mode 100644 index 0000000000..53b0f92ea2 --- /dev/null +++ b/package/input-tools/input-tools.hash @@ -0,0 +1,4 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/j/joystick/joystick_20051019-12.dsc +sha256 cb60cb62093f1889a91fcef1cc36546aba406f451941e8d057f095639e6afb89 joystick_20051019.orig.tar.gz +# From http://snapshot.debian.org/archive/debian/20090630T220234Z/pool/main/j/joystick/joystick_20051019-5.dsc +sha256 01e9d14a656d594a3e261751233200f740a09c2a538ac71447c104ffe89ec10c joystick_20051019-5.diff.gz diff --git a/package/input-tools/input-tools.mk b/package/input-tools/input-tools.mk new file mode 100644 index 0000000000..81e913d8f2 --- /dev/null +++ b/package/input-tools/input-tools.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# input-tools +# +################################################################################ + +INPUT_TOOLS_VERSION = 20051019 +INPUT_TOOLS_SOURCE = joystick_$(INPUT_TOOLS_VERSION).orig.tar.gz +INPUT_TOOLS_PATCH = joystick_$(INPUT_TOOLS_VERSION)-5.diff.gz +INPUT_TOOLS_SITE = http://snapshot.debian.org/archive/debian/20101023T043132Z/pool/main/j/joystick +INPUT_TOOLS_LICENSE = GPLv2+ +INPUT_TOOLS_LICENSE_FILES = utils/Makefile + +INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH) += inputattach +INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_JSCAL) += jscal +INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_JSTEST) += jstest + +define INPUT_TOOLS_DEBIAN_PATCHES + if [ -d $(@D)/debian/patches ]; then \ + $(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*.patch; \ + fi +endef + +INPUT_TOOLS_POST_PATCH_HOOKS = INPUT_TOOLS_DEBIAN_PATCHES + +# jscal needs -lm +define INPUT_TOOLS_BUILD_CMDS + for i in $(filter-out jscal,$(INPUT_TOOLS_TARGETS_y)); do \ + $(TARGET_CC) $(TARGET_CFLAGS) -o $(@D)/$$i $(@D)/utils/$$i.c \ + $(TARGET_LDFLAGS); \ + done + for i in $(filter jscal,$(INPUT_TOOLS_TARGETS_y)); do \ + $(TARGET_CC) $(TARGET_CFLAGS) -o $(@D)/$$i $(@D)/utils/$$i.c \ + $(TARGET_LDFLAGS) -lm; \ + done +endef + +define INPUT_TOOLS_INSTALL_TARGET_CMDS + for i in $(INPUT_TOOLS_TARGETS_y); do \ + $(INSTALL) -m 755 -D $(@D)/$$i $(TARGET_DIR)/usr/bin/$$i; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/intel-microcode/Config.in b/package/intel-microcode/Config.in new file mode 100644 index 0000000000..495ebd727f --- /dev/null +++ b/package/intel-microcode/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_INTEL_MICROCODE + bool "intel-microcode" + depends on BR2_x86_64 || BR2_i386 + help + This package provides an Intel microcode data file that can be + used to correct processor errors. The iucode-tool package and + proper kernel support are required to upload the microcode. diff --git a/package/intel-microcode/intel-microcode.hash b/package/intel-microcode/intel-microcode.hash new file mode 100644 index 0000000000..7925209b22 --- /dev/null +++ b/package/intel-microcode/intel-microcode.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 096e39489eef67666be652e81fa372a06b74f39ea3d565dc0287242c668717e7 microcode-20151106.tgz diff --git a/package/intel-microcode/intel-microcode.mk b/package/intel-microcode/intel-microcode.mk new file mode 100644 index 0000000000..aefa99a1c9 --- /dev/null +++ b/package/intel-microcode/intel-microcode.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# intel-microcode +# +################################################################################ + +INTEL_MICROCODE_VERSION = 20151106 +INTEL_MICROCODE_SOURCE = microcode-$(INTEL_MICROCODE_VERSION).tgz +INTEL_MICROCODE_SITE = http://downloadmirror.intel.com/25512/eng +INTEL_MICROCODE_STRIP_COMPONENTS = 0 +INTEL_MICROCODE_LICENSE = PROPRIETARY +INTEL_MICROCODE_LICENSE_FILES = license.txt +INTEL_MICROCODE_REDISTRIBUTE = NO + +define INTEL_MICROCODE_EXTRACT_LICENSE + head -n 33 $(@D)/microcode.dat > $(@D)/license.txt +endef + +INTEL_MICROCODE_POST_EXTRACT_HOOKS += INTEL_MICROCODE_EXTRACT_LICENSE + +define INTEL_MICROCODE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0644 $(@D)/microcode.dat \ + $(TARGET_DIR)/usr/share/misc/intel-microcode.dat +endef + +$(eval $(generic-package)) diff --git a/package/intltool/Config.in b/package/intltool/Config.in new file mode 100644 index 0000000000..4643a899d7 --- /dev/null +++ b/package/intltool/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_INTLTOOL + bool "intltool" + # Hide from configuration as we only support the host package + # for the moment + depends on BR2_HOST_ONLY + help + Utility scripts for internationalizing XML + + http://www.freedesktop.org/wiki/Software/intltool diff --git a/package/intltool/intltool.hash b/package/intltool/intltool.hash new file mode 100644 index 0000000000..f6f41dc709 --- /dev/null +++ b/package/intltool/intltool.hash @@ -0,0 +1,5 @@ +# From https://launchpad.net/intltool/trunk/0.51.0/+download/intltool-0.51.0.tar.gz/+md5 +md5 12e517cac2b57a0121cda351570f1e63 intltool-0.51.0.tar.gz + +# Locally calculated +sha256 67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd intltool-0.51.0.tar.gz diff --git a/package/intltool/intltool.mk b/package/intltool/intltool.mk new file mode 100644 index 0000000000..fb801a17b4 --- /dev/null +++ b/package/intltool/intltool.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# intltool +# +################################################################################ + +INTLTOOL_VERSION = 0.51.0 +INTLTOOL_SITE = https://launchpad.net/intltool/trunk/$(INTLTOOL_VERSION)/+download +INTLTOOL_LICENSE = GPLv2+ +INTLTOOL_LICENSE_FILES = COPYING + +HOST_INTLTOOL_DEPENDENCIES = host-gettext host-libxml-parser-perl + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/iodine/0001-disable-systemd-and-selinux.patch b/package/iodine/0001-disable-systemd-and-selinux.patch new file mode 100644 index 0000000000..965abb7cff --- /dev/null +++ b/package/iodine/0001-disable-systemd-and-selinux.patch @@ -0,0 +1,29 @@ +Disable selinux and systemd support since they check for host headers. + +Signed-off-by: Gustavo Zacarias + +diff -Nura iodine-0.7.0.orig/src/osflags iodine-0.7.0/src/osflags +--- iodine-0.7.0.orig/src/osflags 2015-02-20 14:59:00.799958145 -0300 ++++ iodine-0.7.0/src/osflags 2015-02-20 15:05:54.791135141 -0300 +@@ -18,8 +18,8 @@ + ;; + Linux) + FLAGS=""; +- [ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -lselinux"; +- [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -lsystemd-daemon"; ++ #[ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -lselinux"; ++ #[ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -lsystemd-daemon"; + echo $FLAGS; + ;; + esac +@@ -34,8 +34,8 @@ + ;; + Linux) + FLAGS="-D_GNU_SOURCE" +- [ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -DHAVE_SETCON"; +- [ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -DHAVE_SYSTEMD"; ++ #[ -e /usr/include/selinux/selinux.h ] && FLAGS="$FLAGS -DHAVE_SETCON"; ++ #[ -e /usr/include/systemd/sd-daemon.h ] && FLAGS="$FLAGS -DHAVE_SYSTEMD"; + echo $FLAGS; + ;; + esac diff --git a/package/iodine/Config.in b/package/iodine/Config.in new file mode 100644 index 0000000000..6962cb8a39 --- /dev/null +++ b/package/iodine/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_IODINE + bool "iodine" + select BR2_PACKAGE_ZLIB + help + iodine lets you tunnel IPv4 data through a DNS server. + This can be usable in different situations where + internet access is firewalled, but DNS queries are allowed. + + http://code.kryo.se/iodine/ diff --git a/package/iodine/iodine.hash b/package/iodine/iodine.hash new file mode 100644 index 0000000000..94eb5aa9cc --- /dev/null +++ b/package/iodine/iodine.hash @@ -0,0 +1,2 @@ +# From http://code.kryo.se/iodine/ +md5 fdbf3b81cd69caf5230d76a8b039fd99 iodine-0.7.0.tar.gz diff --git a/package/iodine/iodine.mk b/package/iodine/iodine.mk new file mode 100644 index 0000000000..9de54e041e --- /dev/null +++ b/package/iodine/iodine.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# iodine +# +################################################################################ + +IODINE_VERSION = 0.7.0 +IODINE_SITE = http://code.kryo.se/iodine +IODINE_DEPENDENCIES = zlib +IODINE_LICENSE = MIT +IODINE_LICENSE_FILES = README + +IODINE_CFLAGS = $(TARGET_CFLAGS) + +# iodine contains a local implementation of daemon(3) for older +# systems, unless __GLIBC__ is defined. Musl does provide it, but +# unlike uClibc it doesn't define __GLIBC__. Work around it by +# pretending to be glibc as we otherwise end up with symbol conflicts. +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +IODINE_CFLAGS += -D__GLIBC__ +endif + +define IODINE_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) CFLAGS="$(IODINE_CFLAGS)" \ + $(MAKE) ARCH=$(BR2_ARCH) -C $(@D) +endef + +define IODINE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) install DESTDIR="$(TARGET_DIR)" prefix=/usr +endef + +$(eval $(generic-package)) diff --git a/package/iostat/0001-cpunum.patch b/package/iostat/0001-cpunum.patch new file mode 100644 index 0000000000..0e75dbf71a --- /dev/null +++ b/package/iostat/0001-cpunum.patch @@ -0,0 +1,27 @@ +From bf646965f75cdad77a45fa3b0046e093b202b2ce Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Thu, 22 Jul 2010 12:42:10 -0300 +Subject: [PATCH] Make cpu number counter more reliable + + +Signed-off-by: Gustavo Zacarias +--- + iostat.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/iostat.c b/iostat.c +index 13e2af7..5d74085 100644 +--- a/iostat.c ++++ b/iostat.c +@@ -140,7 +140,7 @@ void get_number_of_cpus() + + handle_error("Can't open /proc/cpuinfo", !ncpufp); + while (fgets(buffer, sizeof(buffer), ncpufp)) { +- if (!strncmp(buffer, "processor\t:", 11)) ++ if (!strncasecmp(buffer, "processor\t", 10)) + ncpu++; + } + fclose(ncpufp); +-- +1.7.1 + diff --git a/package/iostat/Config.in b/package/iostat/Config.in new file mode 100644 index 0000000000..1aa1464581 --- /dev/null +++ b/package/iostat/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_IOSTAT + bool "iostat" + help + An I/O performance monitoring utility. + + http://www.linuxinsight.com/iostat_utility.html diff --git a/package/iostat/iostat.hash b/package/iostat/iostat.hash new file mode 100644 index 0000000000..2ba10a369f --- /dev/null +++ b/package/iostat/iostat.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 edc5aa73f43bd6c7d49f2c1d5906a0a68c0b28bc4dfdaf1f2aa5ae4a2449c58e iostat-2.2.tar.gz diff --git a/package/iostat/iostat.mk b/package/iostat/iostat.mk new file mode 100644 index 0000000000..d591c67dcb --- /dev/null +++ b/package/iostat/iostat.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# iostat +# +################################################################################ + +IOSTAT_VERSION = 2.2 +IOSTAT_SITE = http://www.linuxinsight.com/files +IOSTAT_LICENSE = GPL +IOSTAT_LICENSE_FILES = LICENSE + +define IOSTAT_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -DHZ=100" +endef + +define IOSTAT_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(IOSTAT_DIR)/iostat $(TARGET_DIR)/usr/bin/iostat +endef + +$(eval $(generic-package)) diff --git a/package/iotop/0001-Fix-build-error-with-Python-3.patch b/package/iotop/0001-Fix-build-error-with-Python-3.patch new file mode 100644 index 0000000000..bf656f889d --- /dev/null +++ b/package/iotop/0001-Fix-build-error-with-Python-3.patch @@ -0,0 +1,37 @@ +Status: upstream +http://repo.or.cz/w/iotop.git/commit/99c8d7cedce81f17b851954d94bfa73787300599 + +Signed-off-by: Christophe Vu-Brugier + +From 99c8d7cedce81f17b851954d94bfa73787300599 Mon Sep 17 00:00:00 2001 +From: Christophe Vu-Brugier +Date: Fri, 17 Oct 2014 13:49:31 +0200 +Subject: [PATCH] Fix build error with Python 3 caused by itervalues() in + setup.py + +The itervalues() method is not available in Python 3. As a +consequence, this patch replaces the call to itervalues() in setup.py +with a call to values() which works on both Python 2 and Python 3. + +Signed-off-by: Christophe Vu-Brugier +Signed-off-by: Paul Wise +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 7150102..9de6068 100755 +--- a/setup.py ++++ b/setup.py +@@ -7,7 +7,7 @@ from iotop.version import VERSION + # Dirty hack to make setup.py install the iotop script to sbin/ instead of bin/ + # while still honoring the choice of installing into local/ or not. + if hasattr(distutils_install, 'INSTALL_SCHEMES'): +- for d in distutils_install.INSTALL_SCHEMES.itervalues(): ++ for d in distutils_install.INSTALL_SCHEMES.values(): + if d.get('scripts', '').endswith('/bin'): + d['scripts'] = d['scripts'][:-len('/bin')] + '/sbin' + +-- +2.1.4 + diff --git a/package/iotop/Config.in b/package/iotop/Config.in new file mode 100644 index 0000000000..ada6131606 --- /dev/null +++ b/package/iotop/Config.in @@ -0,0 +1,12 @@ +comment "iotop depends on python or python3" + depends on !BR2_PACKAGE_PYTHON && !BR2_PACKAGE_PYTHON3 + +config BR2_PACKAGE_IOTOP + bool "iotop" + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_CURSES if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON3_CURSES if BR2_PACKAGE_PYTHON3 + help + iotop does for I/O usage what top does for CPU usage. + + http://guichaz.free.fr/iotop/ diff --git a/package/iotop/iotop.hash b/package/iotop/iotop.hash new file mode 100644 index 0000000000..b2c497c774 --- /dev/null +++ b/package/iotop/iotop.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 1a7c02fd3758bb048d8af861c5f8735eb3ee9abadeaa787f27b8af2b1eaee8ce iotop-0.6.tar.gz diff --git a/package/iotop/iotop.mk b/package/iotop/iotop.mk new file mode 100644 index 0000000000..31787c51a8 --- /dev/null +++ b/package/iotop/iotop.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# iotop +# +################################################################################ + +IOTOP_VERSION = 0.6 +IOTOP_SITE = http://guichaz.free.fr/iotop/files +IOTOP_LICENSE = GPLv2+ +IOTOP_LICENSE_FILES = COPYING +IOTOP_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/iozone/0001-targets.patch b/package/iozone/0001-targets.patch new file mode 100644 index 0000000000..258b960928 --- /dev/null +++ b/package/iozone/0001-targets.patch @@ -0,0 +1,92 @@ +Add new targets for iozone: + +linux-noaio is for linux targets without AIO (use case: uClibc) +linux-noth is for linux target without threads or AIO + +And make largefile support optional via CFLAGS. + +Signed-off-by: Gustavo Zacarias + +diff -Nura iozone3_414.orig/src/current/makefile iozone3_414/src/current/makefile +--- iozone3_414.orig/src/current/makefile 2013-06-11 09:48:18.257837091 -0300 ++++ iozone3_414/src/current/makefile 2013-06-11 13:05:56.338162144 -0300 +@@ -166,10 +166,28 @@ + # GNU 'C' compiler Linux build with threads, largefiles, async I/O + # + linux: iozone_linux.o libasync.o libbif.o fileop_linux.o pit_server.o +- $(CC) -O3 $(LDFLAGS) iozone_linux.o libasync.o libbif.o -lpthread \ ++ $(CC) $(CFLAGS) $(LDFLAGS) iozone_linux.o libasync.o libbif.o \ ++ -lpthread -lrt -o iozone ++ $(CC) $(CFLAGS) -Dlinux fileop_linux.o -o fileop ++ $(CC) $(CFLAGS) -Dlinux pit_server.o -o pit_server ++ ++# ++# GNU 'C' compiler Linux build with threads, largefiles ++# ++linux-noaio: iozone_linux-noaio.o libbif.o fileop_linux.o pit_server.o ++ $(CC) $(CFLAGS) $(LDFLAGS) iozone_linux-noaio.o libbif.o \ ++ -lpthread -lrt -o iozone ++ $(CC) $(CFLAGS) -Dlinux fileop_linux.o -o fileop ++ $(CC) $(CFLAGS) -Dlinux pit_server.o -o pit_server ++ ++# ++# GNU 'C' compiler Linux build with largefiles ++# ++linux-noth: iozone_linux-noth.o libbif.o fileop_linux.o pit_server.o ++ $(CC) $(CFLAGS) $(LDFLAGS) iozone_linux-noth.o libbif.o \ + -lrt -o iozone +- $(CC) -O3 -Dlinux fileop_linux.o -o fileop +- $(CC) -O3 -Dlinux pit_server.o -o pit_server ++ $(CC) $(CFLAGS) -Dlinux fileop_linux.o -o fileop ++ $(CC) $(CFLAGS) -Dlinux pit_server.o -o pit_server + + # + # GNU 'C' compiler Linux build for powerpc chip with threads, largefiles, async I/O +@@ -795,13 +813,33 @@ + @echo "" + @echo "Building iozone for Linux" + @echo "" +- $(CC) -Wall -c -O3 -Dunix -DHAVE_ANSIC_C -DASYNC_IO -DHAVE_PREAD \ +- -DSHARED_MEM -Dlinux -D_LARGEFILE64_SOURCE $(CFLAGS) iozone.c \ ++ $(CC) -Wall -c -Dunix -DHAVE_ANSIC_C -DASYNC_IO -DHAVE_PREAD \ ++ -DSHARED_MEM -Dlinux $(CFLAGS) iozone.c \ + -DNAME='"linux"' -o iozone_linux.o +- $(CC) -Wall -c -O3 -Dunix -DHAVE_ANSIC_C -DASYNC_IO -D_LARGEFILE64_SOURCE \ ++ $(CC) -Wall -c -Dunix -DHAVE_ANSIC_C -DASYNC_IO \ ++ -DSHARED_MEM -Dlinux $(CFLAGS) libbif.c -o libbif.o ++ $(CC) -Wall -c -Dunix -Dlinux -DHAVE_ANSIC_C -DASYNC_IO \ ++ $(CFLAGS) libasync.c -o libasync.o ++ ++iozone_linux-noaio.o: iozone.c libbif.c ++ @echo "" ++ @echo "Building iozone for Linux no AIO" ++ @echo "" ++ $(CC) -Wall -c -Dunix -DHAVE_ANSIC_C -DHAVE_PREAD \ ++ -DSHARED_MEM -Dlinux $(CFLAGS) iozone.c \ ++ -DNAME='"linux"' -o iozone_linux-noaio.o ++ $(CC) -Wall -c -Dunix -DHAVE_ANSIC_C \ ++ -DSHARED_MEM -Dlinux $(CFLAGS) libbif.c -o libbif.o ++ ++iozone_linux-noth.o: iozone.c libbif.c ++ @echo "" ++ @echo "Building iozone for Linux with no threads" ++ @echo "" ++ $(CC) -Wall -c -Dunix -DHAVE_ANSIC_C -DNO_THREADS -DHAVE_PREAD \ ++ -DSHARED_MEM -Dlinux $(CFLAGS) iozone.c \ ++ -DNAME='"linux"' -o iozone_linux-noth.o ++ $(CC) -Wall -c -Dunix -DHAVE_ANSIC_C -DNO_THREADS \ + -DSHARED_MEM -Dlinux $(CFLAGS) libbif.c -o libbif.o +- $(CC) -Wall -c -O3 -Dunix -Dlinux -DHAVE_ANSIC_C -DASYNC_IO \ +- -D_LARGEFILE64_SOURCE $(CFLAGS) libasync.c -o libasync.o + + fileop_AIX.o: fileop.c + @echo "" +@@ -893,7 +931,7 @@ + @echo "" + @echo "Building fileop for Linux" + @echo "" +- $(CC) -Wall -c -O3 $(CFLAGS) fileop.c -o fileop_linux.o ++ $(CC) -Wall -c $(CFLAGS) fileop.c -o fileop_linux.o + + fileop_openbsd.o: fileop.c + @echo "" diff --git a/package/iozone/0002-no-nptl-support.patch b/package/iozone/0002-no-nptl-support.patch new file mode 100644 index 0000000000..493f52cc77 --- /dev/null +++ b/package/iozone/0002-no-nptl-support.patch @@ -0,0 +1,37 @@ +Dummy pthread_setaffinity_np() when not available + +On uClibc configurations that do not use the NPTL thread +implementation, pthread_setaffinity_np() is not available. This patch +defines a dummy (empty) implementation of this function for such +cases. + +The only few architectures that do not provide the NPTL thread +implementation are very likely to be non-SMP architectures, and +therefore, setting the affinity of the thread is not doing anything +useful, so having an empty stub for pthread_setaffinity_np() is not a +problem. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/current/iozone.c +=================================================================== +--- a/src/current/iozone.c ++++ b/src/current/iozone.c +@@ -306,6 +306,17 @@ + #endif + #endif + ++#if defined (__linux__) ++#include ++#if defined (__UCLIBC__) && !defined (__UCLIBC_HAS_THREADS_NATIVE__) ++static int pthread_setaffinity_np(pthread_t thread, size_t cpusetsize, ++ const cpu_set_t *cpuset) ++{ ++ return 0; ++} ++#endif ++#endif ++ + #if ((defined(solaris) && defined(__LP64__)) || defined(__s390x__)) + /* If we are building for 64-bit Solaris, all functions that return pointers + * must be declared before they are used; otherwise the compiler will assume diff --git a/package/iozone/Config.in b/package/iozone/Config.in new file mode 100644 index 0000000000..8cf50b11e8 --- /dev/null +++ b/package/iozone/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_IOZONE + bool "iozone" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + help + IOzone is a filesystem benchmark tool. + The benchmark generates and measures a variety of file operations + + http://www.iozone.org/ diff --git a/package/iozone/iozone.hash b/package/iozone/iozone.hash new file mode 100644 index 0000000000..8d05382ce8 --- /dev/null +++ b/package/iozone/iozone.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 e8388238326dc29359e5cb9f790d193f1e1bdadfbf260e010c50fa682387faed iozone3_430.tar diff --git a/package/iozone/iozone.mk b/package/iozone/iozone.mk new file mode 100644 index 0000000000..0662207549 --- /dev/null +++ b/package/iozone/iozone.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# iozone +# +################################################################################ + +IOZONE_VERSION = 3_430 +IOZONE_SOURCE = iozone$(IOZONE_VERSION).tar +IOZONE_SITE = http://www.iozone.org/src/current +IOZONE_LICENSE = IOzone license (NO DERIVED WORKS ALLOWED) +# IOzone license details can be found at: +# http://www.iozone.org/docs/Iozone_License.txt + +# No threading target is non-AIO as well +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +IOZONE_TARGET = linux-noth +# AIO support not available on uClibc, use the linux (non-aio) target. +else ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +IOZONE_TARGET = linux-noaio +else +IOZONE_TARGET = linux +endif + +define IOZONE_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) $(IOZONE_TARGET) -C $(@D)/src/current +endef + +define IOZONE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/src/current/iozone \ + $(TARGET_DIR)/usr/bin/iozone +endef + +$(eval $(generic-package)) diff --git a/package/iperf/Config.in b/package/iperf/Config.in new file mode 100644 index 0000000000..86dd3e97c9 --- /dev/null +++ b/package/iperf/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_IPERF + bool "iperf" + depends on BR2_INSTALL_LIBSTDCPP + # uses fork() + depends on BR2_USE_MMU + help + Internet Protocol bandwidth measuring tool for measuring + TCP/UDP performance. + + http://dast.nlanr.net/projects/iperf/ + +comment "iperf needs a toolchain w/ C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/iperf/iperf.hash b/package/iperf/iperf.hash new file mode 100644 index 0000000000..8d93b723d0 --- /dev/null +++ b/package/iperf/iperf.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 636b4eff0431cea80667ea85a67ce4c68698760a9837e1e9d13096d20362265b iperf-2.0.5.tar.gz diff --git a/package/iperf/iperf.mk b/package/iperf/iperf.mk new file mode 100644 index 0000000000..8496b95d83 --- /dev/null +++ b/package/iperf/iperf.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# iperf +# +################################################################################ + +IPERF_VERSION = 2.0.5 +IPERF_SITE = http://downloads.sourceforge.net/project/iperf +IPERF_LICENSE = MIT-like +IPERF_LICENSE_FILES = COPYING + +IPERF_CONF_ENV = \ + ac_cv_func_malloc_0_nonnull=yes \ + ac_cv_type_bool=yes \ + ac_cv_sizeof_bool=1 + +IPERF_CONF_OPTS = \ + --disable-web100 + +$(eval $(autotools-package)) diff --git a/package/iperf3/0001-disable-profiling.patch b/package/iperf3/0001-disable-profiling.patch new file mode 100644 index 0000000000..09da98e974 --- /dev/null +++ b/package/iperf3/0001-disable-profiling.patch @@ -0,0 +1,20 @@ +This should be an option, but it's not. +Don't force profiled builds, it breaks on many toolchains. +Patch Makefile.in to avoid AUTORECONFing since it needs dummy files +that are missing to succeed (ChangeLog, COPYING, NEWS, README) and it's +simple enough so avoid pulling in dependencies and delays. + +Signed-off-by: Gustavo Zacarias + +diff -Nura iperf-3.0.10.orig/src/Makefile.in iperf-3.0.10/src/Makefile.in +--- iperf-3.0.10.orig/src/Makefile.in 2014-12-17 07:30:46.878310789 -0300 ++++ iperf-3.0.10/src/Makefile.in 2014-12-17 07:33:41.879356643 -0300 +@@ -82,7 +82,7 @@ + host_triplet = @host@ + bin_PROGRAMS = iperf3$(EXEEXT) + noinst_PROGRAMS = t_timer$(EXEEXT) t_units$(EXEEXT) t_uuid$(EXEEXT) \ +- iperf3_profile$(EXEEXT) ++ iperf3$(EXEEXT) + TESTS = t_timer$(EXEEXT) t_units$(EXEEXT) t_uuid$(EXEEXT) + subdir = src + DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ diff --git a/package/iperf3/0002-Fix-build-using-musl-libc.patch b/package/iperf3/0002-Fix-build-using-musl-libc.patch new file mode 100644 index 0000000000..f2203605f0 --- /dev/null +++ b/package/iperf3/0002-Fix-build-using-musl-libc.patch @@ -0,0 +1,43 @@ +From 1fe02385b60c9dcd8a04b8bd3ff5cff120ec35a6 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 30 Jan 2016 19:23:20 +0100 +Subject: [PATCH 1/1] Fix build using musl libc + +Fixes https://github.com/esnet/iperf/issues/331 + +Signed-off-by: Bernd Kuhls +--- +Patch sent upstream: https://github.com/esnet/iperf/pull/344 + + src/cjson.h | 2 ++ + src/timer.h | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/src/cjson.h b/src/cjson.h +index d4449e6..7af19a9 100644 +--- a/src/cjson.h ++++ b/src/cjson.h +@@ -23,6 +23,8 @@ + #ifndef cJSON__h + #define cJSON__h + ++#include ++ + #ifdef __cplusplus + extern "C" + { +diff --git a/src/timer.h b/src/timer.h +index 0f9c5eb..9b22b7f 100644 +--- a/src/timer.h ++++ b/src/timer.h +@@ -30,6 +30,7 @@ + #ifndef __TIMER_H + #define __TIMER_H + ++#include + #include + + /* TimerClientData is an opaque value that tags along with a timer. The +-- +2.7.0.rc3 + diff --git a/package/iperf3/Config.in b/package/iperf3/Config.in new file mode 100644 index 0000000000..074c1d36c0 --- /dev/null +++ b/package/iperf3/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_IPERF3 + bool "iperf3" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + iperf is a tool for active measurements of the maximum + achievable bandwidth on IP networks. + It supports tuning of various parameters related to timing, + protocols, and buffers. For each test it reports the bandwidth, + loss, and other parameters. + It's a redesign of the NLANR/DAST iperf(2) and is not + backward compatible. + + http://software.es.net/iperf/index.html + +comment "iperf3 needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/iperf3/iperf3.hash b/package/iperf3/iperf3.hash new file mode 100644 index 0000000000..48a2b2a807 --- /dev/null +++ b/package/iperf3/iperf3.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 48b5c783bb4a9c44f2bdcfe52c5d45b77ab1e1c82de3d0131f692457950811f9 iperf3-3.1.2.tar.gz diff --git a/package/iperf3/iperf3.mk b/package/iperf3/iperf3.mk new file mode 100644 index 0000000000..2438955f64 --- /dev/null +++ b/package/iperf3/iperf3.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# iperf3 +# +################################################################################ + +IPERF3_VERSION = 3.1.2 +IPERF3_SITE = $(call github,esnet,iperf,$(IPERF3_VERSION)) +IPERF3_LICENSE = BSD-3c, BSD-2c, MIT +IPERF3_LICENSE_FILES = LICENSE + +IPERF3_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +$(eval $(autotools-package)) diff --git a/package/ipkg/0001-fix-musl-build.patch b/package/ipkg/0001-fix-musl-build.patch new file mode 100644 index 0000000000..fce3ec4afb --- /dev/null +++ b/package/ipkg/0001-fix-musl-build.patch @@ -0,0 +1,50 @@ +Remove __P macro usage to fix musl build + +__P() is used for compatibility with old K&R C compilers. With ANSI C +this macro has no effect. + +This fixes a compilation error with musl libc because of undeclared +__P. + +Signed-off-by: Thomas Petazzoni + +Index: b/md5.c +=================================================================== +--- a/md5.c ++++ b/md5.c +@@ -97,21 +97,21 @@ + + /* Initialize structure containing state of computation. + (RFC 1321, 3.3: Step 3) */ +-static void md5_init_ctx __P ((struct md5_ctx *ctx)); ++static void md5_init_ctx (struct md5_ctx *ctx); + + /* Starting with the result of former calls of this function (or the + initialization function update the context for the next LEN bytes + starting at BUFFER. + It is necessary that LEN is a multiple of 64!!! */ +-static void md5_process_block __P ((const void *buffer, size_t len, +- struct md5_ctx *ctx)); ++static void md5_process_block (const void *buffer, size_t len, ++ struct md5_ctx *ctx); + + /* Starting with the result of former calls of this function (or the + initialization function update the context for the next LEN bytes + starting at BUFFER. + It is NOT required that LEN is a multiple of 64. */ +-static void md5_process_bytes __P ((const void *buffer, size_t len, +- struct md5_ctx *ctx)); ++static void md5_process_bytes (const void *buffer, size_t len, ++ struct md5_ctx *ctx); + + /* Process the remaining bytes in the buffer and put result from CTX + in first 16 bytes following RESBUF. The result is always in little +@@ -120,7 +120,7 @@ + + IMPORTANT: On some systems it is required that RESBUF is correctly + aligned for a 32 bits value. */ +-static void *md5_finish_ctx __P ((struct md5_ctx *ctx, void *resbuf)); ++static void *md5_finish_ctx (struct md5_ctx *ctx, void *resbuf); + + //---------------------------------------------------------------------------- + //--------end of md5.h diff --git a/package/ipkg/Config.in b/package/ipkg/Config.in new file mode 100644 index 0000000000..4b2078d9cd --- /dev/null +++ b/package/ipkg/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_IPKG + bool "ipkg" + help + The Itsy Package Installer from handhelds.org + + http://www.handhelds.org diff --git a/package/ipkg/ipkg-build b/package/ipkg/ipkg-build new file mode 100755 index 0000000000..f3f5d0c621 --- /dev/null +++ b/package/ipkg/ipkg-build @@ -0,0 +1,127 @@ +#!/bin/sh + +# ipkg-build -- construct a .ipk from a directory +# Carl Worth +# based on a script by Steve Redler IV, steve@sr-tech.com 5-21-2001 +set -e + +ipkg_extract_value() { + sed -e "s/^[^:]*:[[:space:]]*//" +} + +required_field() { + field=$1 + + value=`grep "^$field:" < $CONTROL/control | ipkg_extract_value` + if [ -z "$value" ]; then + echo "ipkg-build: Error: $CONTROL/control is missing field $field" ; + PKG_ERROR=1 + fi + echo $value +} + +pkg_appears_sane() { + local pkg_dir=$1 + + local owd=`pwd` + cd $pkg_dir + + PKG_ERROR=0 + if [ ! -f "$CONTROL/control" ]; then + echo "ipkg-build: Error: Control file $pkg_dir/$CONTROL/control not found." + cd $owd + return 1 + fi + + pkg=`required_field Package` + version=`required_field Version` + arch=`required_field Architecture` + required_field Maintainer >/dev/null + required_field Description >/dev/null + + if echo $pkg | grep '[^a-z0-9.+-]'; then + echo "ipkg-build: Error: Package name $name contains illegal characters, (other than [a-z0-9.+-])" + PKG_ERROR=1; + fi + + local bad_fields=`sed -ne 's/^\([^[:space:]][^:[:space:]]\+[[:space:]]\+\)[^:].*/\1/p' < $CONTROL/control | sed -e 's/\\n//'` + if [ -n "$bad_fields" ]; then + bad_fields=`echo $bad_fields` + echo "ipkg-build: Error: The following fields in $CONTROL/control are missing a ':'" + echo " $bad_fields" + echo "ipkg-build: This may be due to a missing initial space for a multi-line field value" + PKG_ERROR=1 + fi + + for script in $CONTROL/preinst $CONTROL/postinst $CONTROL/prerm $CONTROL/postrm; do + if [ -f $script -a ! -x $script ]; then + echo "ipkg-build: Error: package script $script is not executable" + PKG_ERROR=1 + fi + done + + if [ -f $CONTROL/conffiles ]; then + for cf in `cat $CONTROL/conffiles`; do + if [ ! -f ./$cf ]; then + echo "ipkg-build: Error: $CONTROL/conffiles mentions conffile $cf which does not exist" + PKG_ERROR=1 + fi + done + fi + + cd $owd + return $PKG_ERROR +} + +### +# ipkg-build "main" +### + +case $# in +1) + dest_dir=. + ;; +2) + dest_dir=$2 + ;; +*) + echo "Usage: ipkg-build []" ; + exit 1 + ;; +esac + +pkg_dir=$1 + +if [ ! -d $pkg_dir ]; then + echo "ipkg-build: Error: Directory $pkg_dir does not exist" + exit 1 +fi + +# CONTROL is second so that it takes precedence +CONTROL= +[ -d $pkg_dir/DEBIAN ] && CONTROL=DEBIAN +[ -d $pkg_dir/CONTROL ] && CONTROL=CONTROL +if [ -z "$CONTROL" ]; then + echo "ipkg-build: Error: Directory $pkg_dir has no CONTROL subdirectory." + exit 1 +fi + +if ! pkg_appears_sane $pkg_dir; then + echo "Please fix the above errors and try again." + exit 1 +fi + +tmp_dir=$dest_dir/IPKG_BUILD.$$ +mkdir $tmp_dir + +tar -C $pkg_dir -czf $tmp_dir/data.tar.gz . --exclude=$CONTROL +tar -C $pkg_dir/$CONTROL -czf $tmp_dir/control.tar.gz . + +echo "2.0" > $tmp_dir/debian-binary + +pkg_file=$dest_dir/${pkg}_${version}_${arch}.ipk +tar -C $tmp_dir -czf $pkg_file debian-binary data.tar.gz control.tar.gz +rm $tmp_dir/debian-binary $tmp_dir/data.tar.gz $tmp_dir/control.tar.gz +rmdir $tmp_dir + +echo "Packaged contents of $pkg_dir into $pkg_file" diff --git a/package/ipkg/ipkg.mk b/package/ipkg/ipkg.mk new file mode 100644 index 0000000000..10ef207242 --- /dev/null +++ b/package/ipkg/ipkg.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# ipkg +# +################################################################################ + +IPKG_VERSION = 0.99.163 +IPKG_SITE = http://www.handhelds.org/download/packages/ipkg +IPKG_INSTALL_STAGING = YES +IPKG_LICENSE = GPLv2+ +IPKG_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/ipmitool/0001-Make-the-package-autoreconfigurable.patch b/package/ipmitool/0001-Make-the-package-autoreconfigurable.patch new file mode 100644 index 0000000000..17b4076269 --- /dev/null +++ b/package/ipmitool/0001-Make-the-package-autoreconfigurable.patch @@ -0,0 +1,38 @@ +From 0d4b9d5d547b4a6e79108ac8c455e01f72a9aefa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sun, 10 Apr 2016 11:47:14 +0200 +Subject: [PATCH 1/3] Make the package autoreconfigurable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +ipmitool is not a compliant GNU package as it does not provide some necessary +files, like NEWS, AUTHORS, etc. + +Therefor set the Automake strictness to foreign to make the package +autoreconfigurable. + +Upstream status: Pending +https://sourceforge.net/p/ipmitool/mailman/message/35004711/ + +Signed-off-by: Jörg Krause +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 94e267a..9f3f7e1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -33,7 +33,7 @@ DOCLIST = $(top_srcdir)/README $(top_srcdir)/COPYING $(top_srcdir)/AUTHORS $(top + + EXTRA_DIST = $(DOCLIST) + +-AUTOMAKE_OPTIONS = dist-bzip2 ++AUTOMAKE_OPTIONS = dist-bzip2 foreign + + MAINTAINERCLEANFILES = Makefile.in aclocal.m4 configure configure-stamp \ + config.guess config.sub depcomp install-sh ltmain.sh missing \ +-- +2.8.0 + diff --git a/package/ipmitool/0002-Avoid-wchar_t-redefinition.patch b/package/ipmitool/0002-Avoid-wchar_t-redefinition.patch new file mode 100644 index 0000000000..99598e0a7d --- /dev/null +++ b/package/ipmitool/0002-Avoid-wchar_t-redefinition.patch @@ -0,0 +1,60 @@ +From 7d1863b47877129376f37613d29d3a5ba084af66 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sat, 2 Apr 2016 19:45:14 +0200 +Subject: [PATCH 2/3] Avoid wchar_t redefinition +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The musl C library does not define _WCHAR_T. Use autoconf to check for wchar_t. + +Upstream status: Pending +https://sourceforge.net/p/ipmitool/mailman/message/35007331/ + +Signed-off-by: Jörg Krause +--- + configure.ac | 2 ++ + src/plugins/imb/imbapi.h | 7 ++++++- + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 1d74fcf..c2ba1eb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,6 +22,8 @@ AC_CHECK_HEADERS([stdlib.h string.h sys/ioctl.h sys/stat.h unistd.h paths.h]) + AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h sys/socket.h]) + AC_CHECK_HEADERS([sys/byteorder.h byteswap.h]) + ++AC_CHECK_TYPES([wchar_t]) ++ + AC_C_CONST + AC_C_INLINE + AC_C_BIGENDIAN +diff --git a/src/plugins/imb/imbapi.h b/src/plugins/imb/imbapi.h +index 74975c6..ead8956 100644 +--- a/src/plugins/imb/imbapi.h ++++ b/src/plugins/imb/imbapi.h +@@ -35,6 +35,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + *----------------------------------------------------------------------*/ + #ifndef _WINDEFS_H + #define _WINDEFS_H ++ ++#if HAVE_CONFIG_H ++# include ++#endif ++ + #ifndef FALSE + #define FALSE 0 + #endif +@@ -46,7 +51,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #endif + #ifndef WIN32 + /* WIN32 defines this in stdio.h */ +-#ifndef _WCHAR_T ++#if !defined(HAVE_WCHAR_T) + #define _WCHAR_T + typedef long wchar_t; + #endif +-- +2.8.0 + diff --git a/package/ipmitool/0003-Add-missing-linux-param.h-header-include.patch b/package/ipmitool/0003-Add-missing-linux-param.h-header-include.patch new file mode 100644 index 0000000000..a3bd7257fb --- /dev/null +++ b/package/ipmitool/0003-Add-missing-linux-param.h-header-include.patch @@ -0,0 +1,39 @@ +From 661095378b74df564bc621ced4db72b688d87399 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sat, 2 Apr 2016 19:47:21 +0200 +Subject: [PATCH 3/3] Add missing linux/param.h header include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes the following build failure under musl: + +imbapi.c: In function 'MapPhysicalMemory': +imbapi.c:109:19: error: 'EXEC_PAGESIZE' undeclared (first use in this function) + # define PAGESIZE EXEC_PAGESIZE + +Upstream status: Pending +https://sourceforge.net/p/ipmitool/mailman/message/35007330/ + +Signed-off-by: Jörg Krause +--- + src/plugins/imb/imbapi.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/plugins/imb/imbapi.c b/src/plugins/imb/imbapi.c +index 899c47a..8a6421d 100644 +--- a/src/plugins/imb/imbapi.c ++++ b/src/plugins/imb/imbapi.c +@@ -95,6 +95,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + #include + #include ++#ifdef __linux__ ++#include ++#endif + #endif + #include "imbapi.h" + #include +-- +2.8.0 + diff --git a/package/ipmitool/0004-Fix-missing-stddef.h-include.patch b/package/ipmitool/0004-Fix-missing-stddef.h-include.patch new file mode 100644 index 0000000000..e58c8b09ea --- /dev/null +++ b/package/ipmitool/0004-Fix-missing-stddef.h-include.patch @@ -0,0 +1,37 @@ +From 2b149f7723fbd6153e6605ea8efb2c9f2940c8e5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Mon, 18 Apr 2016 21:17:26 +0200 +Subject: [PATCH] Fix missing stddef.h include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Needed for wchar_t. Fixes build error: + +imbapi.h:140:9: error: unknown type name 'wchar_t' + typedef wchar_t WCHAR; + +Upstream status: Pending +https://sourceforge.net/p/ipmitool/mailman/message/35022779/ + +Signed-off-by: Jörg Krause +--- + src/plugins/imb/imbapi.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/plugins/imb/imbapi.h b/src/plugins/imb/imbapi.h +index ead8956..8d0c7ae 100644 +--- a/src/plugins/imb/imbapi.h ++++ b/src/plugins/imb/imbapi.h +@@ -40,6 +40,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # include + #endif + ++#include ++ + #ifndef FALSE + #define FALSE 0 + #endif +-- +2.8.0 + diff --git a/package/ipmitool/Config.in b/package/ipmitool/Config.in new file mode 100644 index 0000000000..1da0ace16f --- /dev/null +++ b/package/ipmitool/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_IPMITOOL + bool "ipmitool" + depends on BR2_USE_MMU # fork() + help + IPMItool provides a simple command-line interface to IPMI-enabled devices. + + http://sourceforge.net/projects/ipmitool/ + +if BR2_PACKAGE_IPMITOOL + +config BR2_PACKAGE_IPMITOOL_LANPLUS + bool "enable lanplus interface" + select BR2_PACKAGE_OPENSSL + help + Enables the IPMI v2.0 RMCP+ LAN interface typically used to send IPMI + commands to the BMC of a remote server. + Not needed if you only want to communicate with the local BMC of your + device using the OpenIPMI ipmi_si kernel module, or if using the + legacy IPMI v1.5 RMCP LAN interface. + +config BR2_PACKAGE_IPMITOOL_IPMIEVD + bool "ipmievd" + help + IPMI event daemon for sending events to syslog + +config BR2_PACKAGE_IPMITOOL_IPMISHELL + bool "ipmishell" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + help + IPMI shell interface + +endif diff --git a/package/ipmitool/ipmitool.hash b/package/ipmitool/ipmitool.hash new file mode 100644 index 0000000000..9bb852c397 --- /dev/null +++ b/package/ipmitool/ipmitool.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 3c5da6b067abf475bc24685120ec79f6e4ef6b3ea606aaa267e462023861223e ipmitool-1.8.16.tar.bz2 diff --git a/package/ipmitool/ipmitool.mk b/package/ipmitool/ipmitool.mk new file mode 100644 index 0000000000..a24658437b --- /dev/null +++ b/package/ipmitool/ipmitool.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# ipmitool +# +################################################################################ + +IPMITOOL_VERSION = 1.8.16 +IPMITOOL_SOURCE = ipmitool-$(IPMITOOL_VERSION).tar.bz2 +IPMITOOL_SITE = http://downloads.sourceforge.net/project/ipmitool/ipmitool/$(IPMITOOL_VERSION) +IPMITOOL_LICENSE = BSD-3c +IPMITOOL_LICENSE_FILES = COPYING + +# Patching configure.ac +IPMITOOL_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_IPMITOOL_LANPLUS),y) +IPMITOOL_DEPENDENCIES += openssl +IPMITOOL_CONF_OPTS += --enable-intf-lanplus +else +IPMITOOL_CONF_OPTS += --disable-intf-lanplus +endif + +ifeq ($(BR2_PACKAGE_IPMITOOL_IPMISHELL),y) +IPMITOOL_DEPENDENCIES += ncurses readline +IPMITOOL_CONF_OPTS += --enable-ipmishell +else +IPMITOOL_CONF_OPTS += --disable-ipmishell +endif + +ifeq ($(BR2_PACKAGE_IPMITOOL_IPMIEVD),) +define IPMITOOL_REMOVE_IPMIEVD + $(RM) -f $(TARGET_DIR)/usr/sbin/ipmievd +endef +IPMITOOL_POST_INSTALL_TARGET_HOOKS += IPMITOOL_REMOVE_IPMIEVD +endif + +$(eval $(autotools-package)) diff --git a/package/ipmiutil/0001-no-build-doc.patch b/package/ipmiutil/0001-no-build-doc.patch new file mode 100644 index 0000000000..ea7da97249 --- /dev/null +++ b/package/ipmiutil/0001-no-build-doc.patch @@ -0,0 +1,31 @@ +configure: do not build doc + +Fixes: + http://autobuild.buildroot.org/results/2ec/2ecfb1143ba89ffa5cdc8096bb175b2c396c4670/ + http://autobuild.buildroot.org/results/c49/c497fc446140694084922d51fe6be308ce5c1c1a/ + http://autobuild.buildroot.org/results/434/434b156b5c9b5c7b65ffe6174cf4e029e7e3ffd8/ + +Signed-off-by: "Yann E. MORIN" + +diff --git a/configure.ac b/configure.ac +index 344b27a71a35..41b6ea89167a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -56,7 +56,7 @@ LIB_DIR="/usr/lib" + isredhat=0 + init_scripts="scripts/ipmi_port.sh scripts/ipmiutil_evt scripts/ipmiutil_asy scripts/ipmiutil_wdt" + projdir=`pwd` +-SUBDIR_S="doc scripts lib util" ++SUBDIR_S="scripts lib util" + os=Linux + + # ltmain.sh, config.sub, et al should have been created, but check to be sure. +@@ -162,7 +162,7 @@ AC_ARG_ENABLE([standalone], + LANPLUS_SAM="no" + LD_SAMX="" + CFLAGS="-O2" +- SUBDIR_S="doc scripts util" ++ SUBDIR_S="scripts util" + if test "x$cross_compiling" = "xyes"; then + # cross-compiling, so link with -static (e.g. Android ARM) + CROSS_LFLAGS="-static" diff --git a/package/ipmiutil/0002-lib-Makefile.am-fix-lanplus-disable.patch b/package/ipmiutil/0002-lib-Makefile.am-fix-lanplus-disable.patch new file mode 100644 index 0000000000..35d1d679ba --- /dev/null +++ b/package/ipmiutil/0002-lib-Makefile.am-fix-lanplus-disable.patch @@ -0,0 +1,38 @@ +From: Baruch Siach +Date: Tue, 27 Oct 2015 14:23:44 +0200 +Subject: [PATCH] lib/Makefile.am: fix lanplus disable + +Protect the install target as well when lanplus is disabled. Fixes the +following installation failure when openssl is missing: + +In file included from lanplus.c:78:0: +./inc/ipmitool/ipmi.h:51:25: fatal error: openssl/evp.h: No such file or directory + +Patch status: sent upstream +(http://sourceforge.net/p/ipmiutil/mailman/message/34572580/) + +Signed-off-by: Baruch Siach +--- + lib/Makefile.am | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/lib/Makefile.am b/lib/Makefile.am +index 805a218ab7eb..939594cfd3e5 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -51,8 +51,10 @@ distclean: + cd lanplus; make distclean + + install: +- $(MKDIR) ${datato} +- cd lanplus; make install ++ if [ "$(PLUSFLAGS)" = "-DHAVE_LANPLUS" ]; then \ ++ $(MKDIR) ${datato} ; \ ++ cd lanplus; make install ; \ ++ fi + + check: + +-- +2.6.1 + diff --git a/package/ipmiutil/0003-configure.ac-fix-stack-protector-test.patch b/package/ipmiutil/0003-configure.ac-fix-stack-protector-test.patch new file mode 100644 index 0000000000..d6ad6045dd --- /dev/null +++ b/package/ipmiutil/0003-configure.ac-fix-stack-protector-test.patch @@ -0,0 +1,45 @@ +From: Baruch Siach +Date: Tue, 27 Oct 2015 13:58:24 +0200 +Subject: [PATCH] configure.ac: fix stack protector test + +gcc does not generate stack protection check code for function that does not +use its stack. Some toolchain (most notable uClibc based) accept the +-fstack-protector option, but don't provide libssp. The current test will +incorrectly identify this case, leading to link failures like: + +ipmiutil.o: In function `main': +ipmiutil.c:(.text.startup+0x1c0): undefined reference to +`__stack_chk_fail_local' +ialarms.o: In function `get_alarms_picmg': +ialarms.c:(.text+0x1c5): undefined reference to `__stack_chk_fail_local' +ialarms.o: In function `.L46': +ialarms.c:(.text+0x362): undefined reference to `__stack_chk_fail_local' +ialarms.o: In function `get_enc_leds': +ialarms.c:(.text+0x45f): undefined reference to `__stack_chk_fail_local' + +Add stack usage code to the test to correctly identify missing libssp. + +Patch status: sent upstream +(http://sourceforge.net/p/ipmiutil/mailman/message/34572536/) + +Signed-off-by: Baruch Siach +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 41b6ea89167a..f3f60fb9ff69 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -334,7 +334,7 @@ else + rm -f $tmpc $tmpo >/dev/null 2>&1 + echo $ECHO_N "checking compile fortify flags ... $ECHO_C" + cfhard="-fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2" +- echo "int main() { return(1); }" >$tmpc ++ echo "int main() { alloca(100); return(1); }" >$tmpc + $CC -o $tmpo $cfhard $tmpc >/dev/null 2>&1 + if test $? -ne 0 ; then + cfhard= +-- +2.6.1 + diff --git a/package/ipmiutil/Config.in b/package/ipmiutil/Config.in new file mode 100644 index 0000000000..9eb5452b6c --- /dev/null +++ b/package/ipmiutil/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_IPMIUTIL + bool "ipmiutil" + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_x86_64 || BR2_i386 + help + The ipmiutil package provides easy-to-use utilities to view + the SEL, perform an IPMI chassis reset, set up the IPMI LAN + and Platform Event Filter entries to allow SNMP alerts, + Serial-Over-LAN console, event daemon, and other IPMI tasks. + + http://ipmiutil.sourceforge.net/ + +comment "ipmiutil needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on BR2_x86_64 || BR2_i386 diff --git a/package/ipmiutil/ipmiutil.hash b/package/ipmiutil/ipmiutil.hash new file mode 100644 index 0000000000..35a0bd360c --- /dev/null +++ b/package/ipmiutil/ipmiutil.hash @@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/ipmiutil/files/?source=navbar +sha1 cc26d977afc87717812ef25aa02b2d5ab84843c4 ipmiutil-2.9.7.tar.gz diff --git a/package/ipmiutil/ipmiutil.mk b/package/ipmiutil/ipmiutil.mk new file mode 100644 index 0000000000..30d0f966c6 --- /dev/null +++ b/package/ipmiutil/ipmiutil.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# ipmiutil +# +################################################################################ + +IPMIUTIL_VERSION = 2.9.7 +IPMIUTIL_SITE = http://sourceforge.net/projects/ipmiutil/files +IPMIUTIL_LICENSE = BSD-3c +IPMIUTIL_LICENSE_FILES = COPYING +# We're patching configure.ac, lib/Makefile.am +IPMIUTIL_AUTORECONF = YES + +IPMIUTIL_MAKE = $(MAKE1) + +# forgets to link against libcrypto dependencies breaking static link +ifeq ($(BR2_PACKAGE_OPENSSL)x$(BR2_STATIC_LIBS),yx) +# tests against distro libcrypto so it might get a false positive when +# the openssl version is old, so force it off +# SKIP_MD2 can be used only if ALLOW_GNU is defined. +IPMIUTIL_CONF_OPTS += CPPFLAGS="$(TARGET_CPPFLAGS) -DALLOW_GNU -DSKIP_MD2" +IPMIUTIL_DEPENDENCIES += openssl +else +IPMIUTIL_CONF_OPTS += --disable-lanplus +endif + +$(eval $(autotools-package)) diff --git a/package/iproute2/0001-Avoid-in6_addr-redefinition.patch b/package/iproute2/0001-Avoid-in6_addr-redefinition.patch new file mode 100644 index 0000000000..3417339b2b --- /dev/null +++ b/package/iproute2/0001-Avoid-in6_addr-redefinition.patch @@ -0,0 +1,79 @@ +From 48596709d8ab59727b79a5c6db33ebb251c36543 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 19 Nov 2015 17:44:25 +0100 +Subject: [PATCH] Avoid in6_addr redefinition +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Due to both and being included, the +in6_addr is being redefined: once from the C library headers and once +from the kernel headers. This causes some build failures with for +example the musl C library: + +In file included from ../include/linux/xfrm.h:4:0, + from xfrm.h:29, + from ipxfrm.c:39: +../include/linux/in6.h:32:8: error: redefinition of ‘struct in6_addr’ + struct in6_addr { + ^ +In file included from .../output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netdb.h:9:0, + from ipxfrm.c:34: +.../output/host/usr/x86_64-buildroot-linux-musl/sysroot/usr/include/netinet/in.h:24:8: note: originally defined here + struct in6_addr + ^ + +In order to fix this, use just the C library header . + +Original patch taken from +http://git.alpinelinux.org/cgit/aports/tree/main/iproute2/musl-fixes.patch. + +Signed-off-by: Thomas Petazzoni +[Gustavo: drop ipt_kernel_headers.h chunk since no longer necessary] +Signed-off-by: Gustavo Zacarias +--- + include/linux/if_bridge.h | 1 - + include/linux/netfilter.h | 2 -- + include/linux/xfrm.h | 1 - + 3 files changed, 4 deletions(-) + +diff --git a/include/linux/if_bridge.h b/include/linux/if_bridge.h +index ee197a3..f823aa4 100644 +--- a/include/linux/if_bridge.h ++++ b/include/linux/if_bridge.h +@@ -15,7 +15,6 @@ + + #include + #include +-#include + + #define SYSFS_BRIDGE_ATTR "bridge" + #define SYSFS_BRIDGE_FDB "brforward" +diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h +index b71b4c9..3e4e6ae 100644 +--- a/include/linux/netfilter.h ++++ b/include/linux/netfilter.h +@@ -4,8 +4,6 @@ + #include + + #include +-#include +-#include + + /* Responses from hook functions. */ + #define NF_DROP 0 +diff --git a/include/linux/xfrm.h b/include/linux/xfrm.h +index b8f5451..a9761a5 100644 +--- a/include/linux/xfrm.h ++++ b/include/linux/xfrm.h +@@ -1,7 +1,6 @@ + #ifndef _LINUX_XFRM_H + #define _LINUX_XFRM_H + +-#include + #include + + /* All of the structures in this file may not change size as they are +-- +2.6.3 + diff --git a/package/iproute2/0002-Add-missing-sys-types.h-include.patch b/package/iproute2/0002-Add-missing-sys-types.h-include.patch new file mode 100644 index 0000000000..ef918140da --- /dev/null +++ b/package/iproute2/0002-Add-missing-sys-types.h-include.patch @@ -0,0 +1,38 @@ +From 560dee4b4be54699c0c9679771c9e0d61e4db80a Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 19 Nov 2015 17:48:55 +0100 +Subject: [PATCH] Add missing include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The u_intXX_t types are defined in , so it should be +included before using those types. Otherwise, with certain C +libraries, the build fails with: + +In file included from ../include/iptables.h:4:0, + from m_ipt.c:18: +../include/iptables_common.h:47:16: error: unknown type name ‘u_int32_t’ + #define __le32 u_int32_t + +Signed-off-by: Thomas Petazzoni +--- + include/iptables_common.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/include/iptables_common.h b/include/iptables_common.h +index 9099667..2c27a4b 100644 +--- a/include/iptables_common.h ++++ b/include/iptables_common.h +@@ -43,6 +43,8 @@ extern char *lib_dir; + extern void init_extensions(void); + #endif + ++#include ++ + #define __be32 u_int32_t + #define __le32 u_int32_t + #define __be16 u_int16_t +-- +2.6.3 + diff --git a/package/iproute2/0003-iproute2-tc_bpf.c-fix-building-with-musl-libc..patch b/package/iproute2/0003-iproute2-tc_bpf.c-fix-building-with-musl-libc..patch new file mode 100644 index 0000000000..0342abef33 --- /dev/null +++ b/package/iproute2/0003-iproute2-tc_bpf.c-fix-building-with-musl-libc..patch @@ -0,0 +1,37 @@ +From 01b287582f25cc3a8a36caee5ce13e14b9233f49 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Fri, 8 Apr 2016 09:52:55 -0300 +Subject: [PATCH] iproute2: tc_bpf.c: fix building with musl libc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We need limits.h for PATH_MAX, fixes: + +tc_bpf.c: In function ‘bpf_map_selfcheck_pinned’: +tc_bpf.c:222:12: error: ‘PATH_MAX’ undeclared (first use in this +function) + char file[PATH_MAX], buff[4096]; + +Signed-off-by: Gustavo Zacarias +--- +Patch status: submitted upstream + + tc/tc_bpf.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tc/tc_bpf.c b/tc/tc_bpf.c +index d94af82..042e76f 100644 +--- a/tc/tc_bpf.c ++++ b/tc/tc_bpf.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_ELF + #include +-- +2.7.3 + diff --git a/package/iproute2/0004-iproute-no-iptables.patch b/package/iproute2/0004-iproute-no-iptables.patch new file mode 100644 index 0000000000..7f7f37b1d4 --- /dev/null +++ b/package/iproute2/0004-iproute-no-iptables.patch @@ -0,0 +1,48 @@ +Fix build issues when there's no iptables present. + +Patch from Matt Whitlock +See https://bugs.gentoo.org/show_bug.cgi?id=577464 +Status: in theory submitted upstream by Lars Wendler. + +--- iproute2-4.5.0/configure~ 2016-03-14 23:02:31.000000000 +0000 ++++ iproute2-4.5.0/configure 2016-03-17 13:24:17.634743197 +0000 +@@ -169,10 +169,25 @@ + + check_ipt() + { +- if ! grep TC_CONFIG_XT Config > /dev/null ++ if grep -q TC_CONFIG_XT Config + then ++ return ++ fi ++ ++ cat >$TMPDIR/ipttest.c < ++int main() { return 0; } ++EOF ++ ++ if $CC -std=c90 -I$INCLUDE $IPTC -o $TMPDIR/ipttest $TMPDIR/ipttest.c $IPTL \ ++ $(${PKG_CONFIG} libiptc --cflags --libs 2>/dev/null) -ldl >/dev/null 2>&1 ++ then ++ echo "TC_CONFIG_IPT:=y" >>Config + echo "using iptables" ++ else ++ echo "no" + fi ++ rm -f $TMPDIR/ipttest.c $TMPDIR/ipttest + } + + check_ipt_lib_dir() +--- iproute2-4.5.0/tc/Makefile~ 2016-03-14 23:02:31.000000000 +0000 ++++ iproute2-4.5.0/tc/Makefile 2016-03-17 13:18:18.686689985 +0000 +@@ -88,7 +88,9 @@ + CFLAGS += -DTC_CONFIG_XT_H + TCSO += m_xt_old.so + else +- TCMODULES += m_ipt.o ++ ifeq ($(TC_CONFIG_IPT),y) ++ TCMODULES += m_ipt.o ++ endif + endif + endif + endif diff --git a/package/iproute2/Config.in b/package/iproute2/Config.in new file mode 100644 index 0000000000..fd373a8123 --- /dev/null +++ b/package/iproute2/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_IPROUTE2 + bool "iproute2" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # bpf, namespaces + help + Kernel routing and traffic control utilities. Provides things + like ip and tc. + + http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2 + +comment "iproute2 needs a toolchain w/ headers >= 3.0" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 diff --git a/package/iproute2/iproute2.hash b/package/iproute2/iproute2.hash new file mode 100644 index 0000000000..1dafa8dbd8 --- /dev/null +++ b/package/iproute2/iproute2.hash @@ -0,0 +1,2 @@ +# From https://kernel.org/pub/linux/utils/net/iproute2/sha256sums.asc +sha256 3f15292f53e465cb5bd6652961343ca64eb6936309ae75be5d5a541435bc494a iproute2-4.5.0.tar.xz diff --git a/package/iproute2/iproute2.mk b/package/iproute2/iproute2.mk new file mode 100644 index 0000000000..91d5033f3d --- /dev/null +++ b/package/iproute2/iproute2.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# iproute2 +# +################################################################################ + +IPROUTE2_VERSION = 4.5.0 +IPROUTE2_SOURCE = iproute2-$(IPROUTE2_VERSION).tar.xz +IPROUTE2_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/net/iproute2 +IPROUTE2_DEPENDENCIES = host-bison host-flex host-pkgconf \ + $(if $(BR2_PACKAGE_LIBMNL),libmnl) +IPROUTE2_LICENSE = GPLv2 +IPROUTE2_LICENSE_FILES = COPYING + +# If both iproute2 and busybox are selected, make certain we win +# the fight over who gets to have their utils actually installed. +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +IPROUTE2_DEPENDENCIES += busybox +endif + +ifeq ($(BR2_PACKAGE_ELFUTILS),y) +IPROUTE2_DEPENDENCIES += elfutils +endif + +# If we've got iptables enable xtables support for tc +ifeq ($(BR2_PACKAGE_IPTABLES)x$(BR2_STATIC_LIBS),yx) +IPROUTE2_DEPENDENCIES += iptables +define IPROUTE2_WITH_IPTABLES + # Makefile is busted so it never passes IPT_LIB_DIR properly + $(SED) "s/-DIPT/-DXT/" $(IPROUTE2_DIR)/tc/Makefile +endef +else +define IPROUTE2_WITH_IPTABLES + # em_ipset needs xtables, but configure misdetects it + echo "TC_CONFIG_IPSET:=n" >>$(IPROUTE2_DIR)/Config + echo "TC_CONFIG_XT:=n" >>$(IPROUTE2_DIR)/Config +endef +endif + +# arpd needs BerkeleyDB and links against pthread +ifeq ($(BR2_PACKAGE_BERKELEYDB_COMPAT185)$(BR2_TOOLCHAIN_HAS_THREADS),yy) +IPROUTE2_DEPENDENCIES += berkeleydb +else +define IPROUTE2_DISABLE_ARPD + $(SED) "/^TARGETS=/s: arpd : :" $(IPROUTE2_DIR)/misc/Makefile +endef +endif + +# ifcfg needs bash +ifeq ($(BR2_PACKAGE_BASH),) +define IPROUTE2_REMOVE_IFCFG + rm -f $(TARGET_DIR)/sbin/ifcfg +endef +endif + +define IPROUTE2_CONFIGURE_CMDS + $(SED) 's/gcc/$$CC $$CFLAGS/g' $(@D)/configure + cd $(@D) && $(TARGET_CONFIGURE_OPTS) ./configure + $(IPROUTE2_DISABLE_ARPD) + $(IPROUTE2_WITH_IPTABLES) +endef + +define IPROUTE2_BUILD_CMDS + $(SED) 's/$$(CCOPTS)//' $(@D)/netem/Makefile + $(TARGET_MAKE_ENV) LDFLAGS="$(TARGET_LDFLAGS)" $(MAKE) \ + DBM_INCLUDE="$(STAGING_DIR)/usr/include" \ + CCOPTS="$(TARGET_CFLAGS) -D_GNU_SOURCE" \ + SHARED_LIBS="$(if $(BR2_STATIC_LIBS),n,y)" -C $(@D) +endef + +define IPROUTE2_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" \ + SBINDIR=/sbin \ + DOCDIR=/usr/share/doc/iproute2-$(IPROUTE2_VERSION) \ + MANDIR=/usr/share/man install + $(IPROUTE2_REMOVE_IFCFG) +endef + +$(eval $(generic-package)) diff --git a/package/iprutils/0001-iprutils-Don-t-use-gettext.patch b/package/iprutils/0001-iprutils-Don-t-use-gettext.patch new file mode 100644 index 0000000000..680bb07f5d --- /dev/null +++ b/package/iprutils/0001-iprutils-Don-t-use-gettext.patch @@ -0,0 +1,48 @@ +From 4ce3545b704588c5889b8dd7b100fcdb88ae2e1a Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Wed, 17 Sep 2014 17:48:54 +0100 +Subject: [PATCH] iprutils: Don't use gettext + +... since we don't have any translation. + +Based on the former patch by Jeremy Kerr. + +Signed-off-by: Vicente Olivert Riera +[Thomas: adapt to the new autotools build system.] +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 2 +- + iprconfig.h | 4 +--- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ee69bee..c1a4f70 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -137,7 +137,7 @@ AC_SUBST([IPRCONFIG_LIBS]) + LIBS="$save_LIBS" + + # Checks for header files. +-AC_CHECK_HEADERS([fcntl.h libintl.h locale.h netinet/in.h nl_types.h \ ++AC_CHECK_HEADERS([fcntl.h locale.h netinet/in.h nl_types.h \ + paths.h stddef.h stdint.h stdlib.h string.h sys/file.h \ + sys/ioctl.h sys/mount.h sys/socket.h syslog.h \ + unistd.h ncurses.h form.h menu.h], [], +diff --git a/iprconfig.h b/iprconfig.h +index 9bce950..751a737 100644 +--- a/iprconfig.h ++++ b/iprconfig.h +@@ -11,9 +11,7 @@ + * + **/ + +-#include +- +-#define _(string) gettext(string) ++#define _(string) (string) + #define __(string) (string) + #define EXIT_FLAG 0x8000 /* stops at given screen on exit call */ + #define CANCEL_FLAG 0x4000 /* stops at given screen on quit call */ +-- +2.6.4 + diff --git a/package/iprutils/0002-configure.ac-use-pow-instead-of-matherr-for-libm-che.patch b/package/iprutils/0002-configure.ac-use-pow-instead-of-matherr-for-libm-che.patch new file mode 100644 index 0000000000..ea7a683570 --- /dev/null +++ b/package/iprutils/0002-configure.ac-use-pow-instead-of-matherr-for-libm-che.patch @@ -0,0 +1,36 @@ +From 62a41abffa028a3a4c4ae0803d48c559a14e97f1 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sun, 7 Feb 2016 13:54:10 +0100 +Subject: [PATCH] configure.ac: use pow() instead of matherr() for libm check + +In certain configurations of uClibc, the matherr() function may not be +provided by the C library, which makes the current configure.ac check +for libm fail. However, iprutils does not use matherr(), so using this +function for the test makes little sense. + +This patch adjusts configure.ac to test for pow() instead, which is +actually used by iprutils, and more commonly available, including in +uClibc. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index c1a4f70..e430554 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -129,7 +129,7 @@ save_LIBS="$LIBS" + AC_CHECK_LIB([ncurses], [curses_version], [], + [AC_ERROR("libncurses not found.")]) + AC_CHECK_LIB([form], [free_form], [], [AC_ERROR("libform not found.")]) +-AC_CHECK_LIB([m], [matherr], [], [AC_ERROR("libm not found.")]) ++AC_CHECK_LIB([m], [pow], [], [AC_ERROR("libm not found.")]) + AC_CHECK_LIB([menu], [new_menu], [], [AC_ERROR("libmenu not found.")]) + AC_CHECK_LIB([panel], [show_panel], [], [AC_ERROR("libpanel not found.")]) + IPRCONFIG_LIBS="$LIBS" +-- +2.6.4 + diff --git a/package/iprutils/0003-iprlib-fixes-for-compatibility-with-musl.patch b/package/iprutils/0003-iprlib-fixes-for-compatibility-with-musl.patch new file mode 100644 index 0000000000..0fe882fb8e --- /dev/null +++ b/package/iprutils/0003-iprlib-fixes-for-compatibility-with-musl.patch @@ -0,0 +1,34 @@ +From df3b2b74ed7b49d74f5a5ec5687bcc3188d3b319 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 7 Feb 2016 14:10:44 +0100 +Subject: [PATCH] iprlib: fixes for compatibility with musl + + is an internal C library header, which is not +guaranteed to be available in all C libraries, so it shouldn't be +included, otherwise iprutils cannot be built with musl. + + is needed to get the definition of PATH_MAX. + +Signed-off-by: Thomas Petazzoni +--- + iprlib.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/iprlib.h b/iprlib.h +index 16fe1e1..73aa1ce 100644 +--- a/iprlib.h ++++ b/iprlib.h +@@ -46,9 +46,9 @@ + #include + #include + #include +-#include + #include + #include ++#include + + typedef uint8_t u8; + typedef uint16_t u16; +-- +2.6.4 + diff --git a/package/iprutils/Config.in b/package/iprutils/Config.in new file mode 100644 index 0000000000..1bc58e814b --- /dev/null +++ b/package/iprutils/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_IPRUTILS + bool "iprutils" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_NCURSES_TARGET_PANEL + select BR2_PACKAGE_NCURSES_TARGET_FORM + select BR2_PACKAGE_NCURSES_TARGET_MENU + select BR2_PACKAGE_LIBSYSFS + select BR2_PACKAGE_PCIUTILS + depends on !BR2_bfin # pciutils + help + System utilities for IBM Power RAID devices + + http://sourceforge.net/projects/iprdd/ diff --git a/package/iprutils/iprutils.hash b/package/iprutils/iprutils.hash new file mode 100644 index 0000000000..4b43a6177e --- /dev/null +++ b/package/iprutils/iprutils.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 99f28418fec505c4dfd532270569d4902a3792dcb2f08710b896f4e7bc0211e0 iprutils-2.4.10.1.tar.gz diff --git a/package/iprutils/iprutils.mk b/package/iprutils/iprutils.mk new file mode 100644 index 0000000000..2d3d62ed6a --- /dev/null +++ b/package/iprutils/iprutils.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# iprutils +# +################################################################################ + +IPRUTILS_VERSION_MAJOR = 2.4.10 +IPRUTILS_VERSION = $(IPRUTILS_VERSION_MAJOR).1 +IPRUTILS_SITE = http://downloads.sourceforge.net/project/iprdd/iprutils%20for%202.6%20kernels/$(IPRUTILS_VERSION_MAJOR) +IPRUTILS_DEPENDENCIES = ncurses libsysfs pciutils +IPRUTILS_LICENSE = Common Public License Version 1.0 +IPRUTILS_LICENSE_FILES = LICENSE +# Patches touching configure.ac +IPRUTILS_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/ipsec-tools/0001-susv3-legacy.patch b/package/ipsec-tools/0001-susv3-legacy.patch new file mode 100644 index 0000000000..ea98505622 --- /dev/null +++ b/package/ipsec-tools/0001-susv3-legacy.patch @@ -0,0 +1,35 @@ +Replaces sysv3 legacy functions with modern equivalents. + +Signed-off-by: Julien Boibessot +Index: ipsec-tools-0.7.3/src/racoon/pfkey.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/pfkey.c 2010-07-12 14:46:52.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/pfkey.c 2010-07-12 15:01:39.000000000 +0200 +@@ -3008,12 +3008,12 @@ + struct sockaddr *paddr; + + paddr = (struct sockaddr *)(xisr + 1); +- bcopy(paddr, &(*p_isr)->saidx.src, ++ memmove(&(*p_isr)->saidx.src, paddr, + sysdep_sa_len(paddr)); + + paddr = (struct sockaddr *)((caddr_t)paddr + + sysdep_sa_len(paddr)); +- bcopy(paddr, &(*p_isr)->saidx.dst, ++ memmove(&(*p_isr)->saidx.dst, paddr, + sysdep_sa_len(paddr)); + } + +Index: ipsec-tools-0.7.3/src/racoon/racoonctl.c +=================================================================== +--- ipsec-tools-0.7.3.orig/src/racoon/racoonctl.c 2010-07-12 14:49:51.000000000 +0200 ++++ ipsec-tools-0.7.3/src/racoon/racoonctl.c 2010-07-12 15:00:52.000000000 +0200 +@@ -785,7 +785,7 @@ + errx(1, "cannot read source address"); + + /* We get "ip[port]" strip the port */ +- if ((idx = index(srcaddr, '[')) == NULL) ++ if ((idx = strchr(srcaddr, '[')) == NULL) + errx(1, "unexpected source address format"); + *idx = '\0'; + diff --git a/package/ipsec-tools/Config.in b/package/ipsec-tools/Config.in new file mode 100644 index 0000000000..36c5a65a9f --- /dev/null +++ b/package/ipsec-tools/Config.in @@ -0,0 +1,75 @@ +config BR2_PACKAGE_IPSEC_TOOLS + bool "ipsec-tools" + depends on BR2_USE_MMU # fork() + depends on !BR2_TOOLCHAIN_USES_MUSL # Use __P() macro all over the tree + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_FLEX + help + This package is required to support IPSec for Linux 2.6+ + + http://ipsec-tools.sourceforge.net/ + +if BR2_PACKAGE_IPSEC_TOOLS + +config BR2_PACKAGE_IPSEC_TOOLS_ADMINPORT + default y + bool "Enable racoonctl(8)" + help + Lets racoon to listen to racoon admin port, which is to + be contacted by racoonctl(8). + +config BR2_PACKAGE_IPSEC_TOOLS_NATT + bool "Enable NAT-Traversal" + help + This needs kernel support, which is available on Linux. On + NetBSD, NAT-Traversal kernel support has not been integrated + yet, you can get it from here: + + http://ipsec-tools.sourceforge.net/netbsd_nat-t.diff If you + + live in a country where software patents are legal, using + NAT-Traversal might infringe a patent. + +config BR2_PACKAGE_IPSEC_TOOLS_FRAG + bool "Enable IKE fragmentation" + help + Enable IKE fragmentation, which is a workaround for + broken routers that drop fragmented packets + +config BR2_PACKAGE_IPSEC_TOOLS_DPD + bool "Enable DPD (Dead Peer Detection)" + help + Enable dead peer detection support + +config BR2_PACKAGE_IPSEC_TOOLS_STATS + default y + bool "Enable statistics logging function" + +config BR2_PACKAGE_IPSEC_TOOLS_READLINE + select BR2_PACKAGE_READLINE + bool "Enable readline input support" + +config BR2_PACKAGE_IPSEC_TOOLS_HYBRID + bool "Enable hybrid, both mode-cfg and xauth support" + help + Hybrid mode is required for successful interoperability + (e.g. Cisco VPN Client). + +choice + prompt "Security context" + default BR2_PACKAGE_IPSEC_SECCTX_DISABLE + help + Selects whether or not to enable security context support. + +config BR2_PACKAGE_IPSEC_SECCTX_DISABLE + bool "Disable security context support" + +config BR2_PACKAGE_IPSEC_SECCTX_ENABLE + bool "Enable SELinux security context support" + +config BR2_PACKAGE_IPSEC_SECCTX_KERNEL + bool "Enable kernel security context" + +endchoice + +endif diff --git a/package/ipsec-tools/ipsec-tools.hash b/package/ipsec-tools/ipsec-tools.hash new file mode 100644 index 0000000000..b12bea9477 --- /dev/null +++ b/package/ipsec-tools/ipsec-tools.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/ipsec-tools/files/ipsec-tools/0.8.2/ +md5 d53ec14a0a3ece64e09e5e34b3350b41 ipsec-tools-0.8.2.tar.bz2 +sha1 7d92cae9fde59fb4f125636698c43b0a3df3d0f0 ipsec-tools-0.8.2.tar.bz2 diff --git a/package/ipsec-tools/ipsec-tools.mk b/package/ipsec-tools/ipsec-tools.mk new file mode 100644 index 0000000000..98216eaea6 --- /dev/null +++ b/package/ipsec-tools/ipsec-tools.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# ipsec-tools +# +################################################################################ + +IPSEC_TOOLS_VERSION = 0.8.2 +IPSEC_TOOLS_SOURCE = ipsec-tools-$(IPSEC_TOOLS_VERSION).tar.bz2 +IPSEC_TOOLS_SITE = http://sourceforge.net/projects/ipsec-tools/files/ipsec-tools/$(IPSEC_TOOLS_VERSION) +IPSEC_TOOLS_INSTALL_STAGING = YES +IPSEC_TOOLS_MAKE = $(MAKE1) +IPSEC_TOOLS_DEPENDENCIES = openssl flex host-flex + +# configure hardcodes -Werror, so override CFLAGS on make invocation +IPSEC_TOOLS_MAKE_OPTS = CFLAGS='$(TARGET_CFLAGS)' + +# openssl uses zlib, so we need to explicitly link with it when static +ifeq ($(BR2_STATIC_LIBS),y) +IPSEC_TOOLS_CONF_ENV += LIBS=-lz +endif + +IPSEC_TOOLS_CONF_OPTS = \ + --without-libpam \ + --disable-gssapi \ + --with-kernel-headers=$(STAGING_DIR)/usr/include + +ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_ADMINPORT),y) +IPSEC_TOOLS_CONF_OPTS += --enable-adminport +else +IPSEC_TOOLS_CONF_OPTS += --disable-adminport +endif + +ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_NATT),y) +IPSEC_TOOLS_CONF_OPTS += --enable-natt +else +IPSEC_TOOLS_CONF_OPTS += --disable-natt +endif + +ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_FRAG),y) +IPSEC_TOOLS_CONF_OPTS += --enable-frag +else +IPSEC_TOOLS_CONF_OPTS += --disable-frag +endif + +ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_DPD),y) +IPSEC_TOOLS_CONF_OPTS += --enable-dpd +else +IPSEC_TOOLS_CONF_OPTS += --disable-dpd +endif + +ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_STATS),y) +IPSEC_TOOLS_CONF_OPTS += --enable-stats +else +IPSEC_TOOLS_CONF_OPTS += --disable-stats +endif + +ifneq ($(BR2_PACKAGE_IPSEC_TOOLS_READLINE),y) +IPSEC_TOOLS_CONF_OPTS += --without-readline +else +IPSEC_DEPENDENCIES += readline +endif + +ifeq ($(BR2_PACKAGE_IPSEC_TOOLS_HYBRID),y) +IPSEC_TOOLS_CONF_OPTS += --enable-hybrid +else +IPSEC_TOOLS_CONF_OPTS += --disable-hybrid +endif + +ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_DISABLE),y) +IPSEC_TOOLS_CONF_OPTS += --enable-security-context=no +endif +ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_ENABLE),y) +IPSEC_TOOLS_CONF_OPTS += --enable-security-context=yes +endif +ifeq ($(BR2_PACKAGE_IPSEC_SECCTX_KERNEL),y) +IPSEC_TOOLS_CONF_OPTS += --enable-security-context=kernel +endif + +$(eval $(autotools-package)) diff --git a/package/ipset/0001-Do-not-pass-Werror-when-enable-debug-is-used.patch b/package/ipset/0001-Do-not-pass-Werror-when-enable-debug-is-used.patch new file mode 100644 index 0000000000..c115f6337d --- /dev/null +++ b/package/ipset/0001-Do-not-pass-Werror-when-enable-debug-is-used.patch @@ -0,0 +1,39 @@ +From f31bb2561776ad2ce4b77339da6fbfc9e3b2ffbb Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 26 Oct 2014 14:18:29 +0100 +Subject: [PATCH] Do not pass -Werror when --enable-debug is used + +Signed-off-by: Thomas Petazzoni +--- + Make_global.am | 2 +- + configure.ac | 1 - + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Make_global.am b/Make_global.am +index 7953451..25c4d64 100644 +--- a/Make_global.am ++++ b/Make_global.am +@@ -77,7 +77,7 @@ AM_CPPFLAGS = $(kinclude_CFLAGS) $(all_includes) -I$(top_srcdir)/include \ + AM_CFLAGS = -std=gnu99 + + if ENABLE_DEBUG +-AM_CFLAGS += -g -g3 -ggdb -gdwarf-2 -DIPSET_DEBUG -Wall -Werror ++AM_CFLAGS += -g -g3 -ggdb -gdwarf-2 -DIPSET_DEBUG -Wall + else + AM_CFLAGS += -O2 -DNDEBUG + endif +diff --git a/configure.ac b/configure.ac +index 8fdac15..ee3b147 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -345,7 +345,6 @@ AX_CFLAGS_GCC_OPTION(-Waggregate-return) + AX_CFLAGS_GCC_OPTION(-Wbad-function-cast) + AX_CFLAGS_GCC_OPTION(-Wcast-align) + AX_CFLAGS_GCC_OPTION(-Wcast-qual) +-AX_CFLAGS_GCC_OPTION(-Werror) + AX_CFLAGS_GCC_OPTION(-Wextra) + AX_CFLAGS_GCC_OPTION(-Wfloat-equal) + AX_CFLAGS_GCC_OPTION(-Wformat=2) +-- +2.0.0 + diff --git a/package/ipset/Config.in b/package/ipset/Config.in new file mode 100644 index 0000000000..6951413210 --- /dev/null +++ b/package/ipset/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_IPSET + bool "ipset" + select BR2_PACKAGE_LIBMNL + help + Utility to manage IP sets in the linux kernel. + Requires a patched kernel or version >=2.6.39. + + http://ipset.netfilter.org/ diff --git a/package/ipset/ipset.hash b/package/ipset/ipset.hash new file mode 100644 index 0000000000..844bebba8c --- /dev/null +++ b/package/ipset/ipset.hash @@ -0,0 +1,4 @@ +# From ftp://ftp.netfilter.org/pub/ipset/ipset-6.27.tar.bz2.md5sum.txt +md5 c39f8958908b1396e2c69f082b75d924 ipset-6.27.tar.bz2 +# Calculated based on the hash above +sha256 724897a80395534466142c3542184e5a480a5046140ca2a7d9097690b931b235 ipset-6.27.tar.bz2 diff --git a/package/ipset/ipset.mk b/package/ipset/ipset.mk new file mode 100644 index 0000000000..fff67e2746 --- /dev/null +++ b/package/ipset/ipset.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# ipset +# +################################################################################ + +IPSET_VERSION = 6.27 +IPSET_SOURCE = ipset-$(IPSET_VERSION).tar.bz2 +IPSET_SITE = http://ipset.netfilter.org +IPSET_DEPENDENCIES = libmnl host-pkgconf +IPSET_CONF_OPTS = --with-kmod=no +# For 0001-Do-not-pass-Werror-when-enable-debug-is-used.patch +IPSET_AUTORECONF = YES +IPSET_LICENSE = GPLv2 +IPSET_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/iptables/0001-fix-build-with-musl.patch b/package/iptables/0001-fix-build-with-musl.patch new file mode 100644 index 0000000000..d5e0c2ed6c --- /dev/null +++ b/package/iptables/0001-fix-build-with-musl.patch @@ -0,0 +1,67 @@ +From 2f2fde48594ec34e93ab409cd83442efe58e10ad Mon Sep 17 00:00:00 2001 +From: Brendan Heading +Date: Mon, 31 Aug 2015 15:24:44 +0100 +Subject: [PATCH 3/3] fix build with musl + +Add needed headers they are just not needed for glibc6+ but also +for musl +Define additional TCOPTS if not there + +u_initX types are in sys/types.h be explicit about it + +Upstream-Status: Pending + +bh: this is a copy of the patch at the link below, modified to remove +the changes to include/libiptc/ipt_kernel_headers.h as these are +already integrated in the upstream tree. See : + +http://lists.openembedded.org/pipermail/openembedded-core/2015-April/103613.html + +Signed-off-by: Khem Raj +Signed-off-by: Brendan Heading +--- + extensions/libxt_TCPOPTSTRIP.c | 15 +++++++++++++++ + include/linux/netfilter_ipv4/ip_tables.h | 1 + + 2 files changed, 16 insertions(+) + +diff --git a/extensions/libxt_TCPOPTSTRIP.c b/extensions/libxt_TCPOPTSTRIP.c +index 6897857..8a170b2 100644 +--- a/extensions/libxt_TCPOPTSTRIP.c ++++ b/extensions/libxt_TCPOPTSTRIP.c +@@ -12,6 +12,21 @@ + #ifndef TCPOPT_MD5SIG + # define TCPOPT_MD5SIG 19 + #endif ++#ifndef TCPOPT_MAXSEG ++# define TCPOPT_MAXSEG 2 ++#endif ++#ifndef TCPOPT_WINDOW ++# define TCPOPT_WINDOW 3 ++#endif ++#ifndef TCPOPT_SACK_PERMITTED ++# define TCPOPT_SACK_PERMITTED 4 ++#endif ++#ifndef TCPOPT_SACK ++# define TCPOPT_SACK 5 ++#endif ++#ifndef TCPOPT_TIMESTAMP ++# define TCPOPT_TIMESTAMP 8 ++#endif + + enum { + O_STRIP_OPTION = 0, +diff --git a/include/linux/netfilter_ipv4/ip_tables.h b/include/linux/netfilter_ipv4/ip_tables.h +index 57fd82a..4807246 100644 +--- a/include/linux/netfilter_ipv4/ip_tables.h ++++ b/include/linux/netfilter_ipv4/ip_tables.h +@@ -15,6 +15,7 @@ + #ifndef _IPTABLES_H + #define _IPTABLES_H + ++#include + #include + + #include +-- +2.4.3 + diff --git a/package/iptables/0002-iptables-add-xtables-config-parser.h-to-BUILT_SOURCES.patch b/package/iptables/0002-iptables-add-xtables-config-parser.h-to-BUILT_SOURCES.patch new file mode 100644 index 0000000000..761c04894f --- /dev/null +++ b/package/iptables/0002-iptables-add-xtables-config-parser.h-to-BUILT_SOURCES.patch @@ -0,0 +1,39 @@ +From 4dc8e2aa91bd4151f7e5cd56d88d3731b4c1525e Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Wed, 30 Dec 2015 14:39:35 -0300 +Subject: [PATCH] iptables: add xtables-config-parser.h to BUILT_SOURCES + +Otherwise other sources that use it might be built before it's ready leading +to build failure, for example by iptables/nft.c + +Signed-off-by: Gustavo Zacarias +--- +Status: sent upstream (mailing list, no link yet) + + iptables/Makefile.am | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/iptables/Makefile.am b/iptables/Makefile.am +index 3c0faa5..c3eb8a8 100644 +--- a/iptables/Makefile.am ++++ b/iptables/Makefile.am +@@ -4,6 +4,8 @@ AM_CFLAGS = ${regular_CFLAGS} + AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CPPFLAGS} ${libmnl_CFLAGS} ${libnftnl_CFLAGS} ${libnetfilter_conntrack_CFLAGS} + AM_YFLAGS = -d + ++BUILT_SOURCES = ++ + xtables_multi_SOURCES = xtables-multi.c iptables-xml.c + xtables_multi_CFLAGS = ${AM_CFLAGS} + xtables_multi_LDADD = ../extensions/libext.a +@@ -27,6 +29,7 @@ xtables_multi_LDADD += ../libxtables/libxtables.la -lm + + # nftables compatibility layer + if ENABLE_NFTABLES ++BUILT_SOURCES += xtables-config-parser.h + xtables_compat_multi_SOURCES = xtables-compat-multi.c iptables-xml.c + xtables_compat_multi_CFLAGS = ${AM_CFLAGS} + xtables_compat_multi_LDADD = ../extensions/libext.a ../extensions/libext_ebt.a +-- +2.4.10 + diff --git a/package/iptables/Config.in b/package/iptables/Config.in new file mode 100644 index 0000000000..c7b69a8d73 --- /dev/null +++ b/package/iptables/Config.in @@ -0,0 +1,35 @@ +config BR2_PACKAGE_IPTABLES + bool "iptables" + help + Linux kernel firewall, NAT, and packet mangling tools. + + http://www.netfilter.org/projects/iptables/index.html + +if BR2_PACKAGE_IPTABLES + +config BR2_PACKAGE_IPTABLES_BPF_NFSYNPROXY + bool "bpfc and nfsynproxy" + # this dependency can be removed when using a musl version + # containing this commit: + # http://git.musl-libc.org/cgit/musl/commit/?id=53f41fb568ae43034c9876cc9bd3961fd6d13671 + depends on !BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_LIBPCAP + help + Build bpf compiler and nfsynproxy configuration tool. + +config BR2_PACKAGE_IPTABLES_NFTABLES + bool "nftables compat" + # uses dlfcn + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + select BR2_PACKAGE_LIBMNL + select BR2_PACKAGE_LIBNFTNL + help + Build nftables compat utilities. + +comment "nftables compat needs a toolchain w/ wchar, dynamic library, headers >= 3.4" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 || \ + !BR2_USE_WCHAR || BR2_STATIC_LIBS + +endif diff --git a/package/iptables/iptables.hash b/package/iptables/iptables.hash new file mode 100644 index 0000000000..18d8b4406c --- /dev/null +++ b/package/iptables/iptables.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/iptables/iptables-1.6.0.tar.bz2.{md5sum,sha1sum} +md5 27ba3451cb622467fc9267a176f19a31 iptables-1.6.0.tar.bz2 +sha1 21a694e75b0d6863cc001f85fb15915d12b8cc22 iptables-1.6.0.tar.bz2 diff --git a/package/iptables/iptables.mk b/package/iptables/iptables.mk new file mode 100644 index 0000000000..12e00f2383 --- /dev/null +++ b/package/iptables/iptables.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# iptables +# +################################################################################ + +IPTABLES_VERSION = 1.6.0 +IPTABLES_SOURCE = iptables-$(IPTABLES_VERSION).tar.bz2 +IPTABLES_SITE = http://ftp.netfilter.org/pub/iptables +IPTABLES_INSTALL_STAGING = YES +IPTABLES_DEPENDENCIES = host-pkgconf \ + $(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack) +IPTABLES_LICENSE = GPLv2 +IPTABLES_LICENSE_FILES = COPYING +# Building static causes ugly warnings on some plugins +IPTABLES_CONF_OPTS = --libexecdir=/usr/lib --with-kernel=$(STAGING_DIR)/usr \ + $(if $(BR2_STATIC_LIBS),,--disable-static) +# For 0002-iptables-add-xtables-config-parser.h-to-BUILT_SOURCES.patch +IPTABLES_AUTORECONF = YES + +# For connlabel match +ifeq ($(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),y) +IPTABLES_DEPENDENCIES += libnetfilter_conntrack +endif + +# For nfnl_osf +ifeq ($(BR2_PACKAGE_LIBNFNETLINK),y) +IPTABLES_DEPENDENCIES += libnfnetlink +endif + +# For iptables-compat tools +ifeq ($(BR2_PACKAGE_IPTABLES_NFTABLES),y) +IPTABLES_CONF_OPTS += --enable-nftables +IPTABLES_DEPENDENCIES += host-bison host-flex libmnl libnftnl +else +IPTABLES_CONF_OPTS += --disable-nftables +endif + +# bpf compiler support and nfsynproxy tool +ifeq ($(BR2_PACKAGE_IPTABLES_BPF_NFSYNPROXY),y) +# libpcap is tricky for static-only builds and needs help +ifeq ($(BR2_STATIC_LIBS),y) +IPTABLES_LIBS_FOR_STATIC_LINK += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs` +IPTABLES_CONF_OPTS += LIBS="$(IPTABLES_LIBS_FOR_STATIC_LINK)" +endif +IPTABLES_CONF_OPTS += --enable-bpf-compiler --enable-nfsynproxy +IPTABLES_DEPENDENCIES += libpcap +else +IPTABLES_CONF_OPTS += --disable-bpf-compiler --disable-nfsynproxy +endif + +$(eval $(autotools-package)) diff --git a/package/iptraf-ng/Config.in b/package/iptraf-ng/Config.in new file mode 100644 index 0000000000..5574cfa9a5 --- /dev/null +++ b/package/iptraf-ng/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_IPTRAF_NG + bool "iptraf-ng" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_NCURSES_TARGET_PANEL + help + IPTraf-ng is a ncurses-based network monitoring utility. It gathers + data like TCP connection packet and byte counts, interface statistics + and activity indicators. + + https://fedorahosted.org/iptraf-ng/ + + IPTraf-ng is a fork of original IPTraf v3.0.0 (http://iptraf.seul.org). diff --git a/package/iptraf-ng/iptraf-ng.hash b/package/iptraf-ng/iptraf-ng.hash new file mode 100644 index 0000000000..7cb4d1b137 --- /dev/null +++ b/package/iptraf-ng/iptraf-ng.hash @@ -0,0 +1,2 @@ +# From https://fedorahosted.org/releases/i/p/iptraf-ng/iptraf-ng-1.1.4.tar.gz.sum +sha1 a2e51b0dd6b8c80583fc25d055850c96b3d2f544 iptraf-ng-1.1.4.tar.gz diff --git a/package/iptraf-ng/iptraf-ng.mk b/package/iptraf-ng/iptraf-ng.mk new file mode 100644 index 0000000000..a36c7089fb --- /dev/null +++ b/package/iptraf-ng/iptraf-ng.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# iptraf-ng +# +################################################################################ + +IPTRAF_NG_VERSION = 1.1.4 +IPTRAF_NG_SITE = https://fedorahosted.org/releases/i/p/iptraf-ng +IPTRAF_NG_LICENSE = GPLv2+ +IPTRAF_NG_LICENSE_FILES = LICENSE +IPTRAF_NG_DEPENDENCIES = ncurses + +IPTRAF_NG_MAKE_ENV = \ + NCURSES_LDFLAGS="-lpanel -lncurses" + +IPTRAF_NG_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +$(eval $(autotools-package)) diff --git a/package/iputils/Config.in b/package/iputils/Config.in new file mode 100644 index 0000000000..c83e414cce --- /dev/null +++ b/package/iputils/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_IPUTILS + bool "iputils" + depends on BR2_USE_MMU # fork() + help + This package is set of small useful utilities for Linux networking. + It includes complete versions of ping, traceroute, etc. + + https://github.com/iputils/iputils diff --git a/package/iputils/iputils.hash b/package/iputils/iputils.hash new file mode 100644 index 0000000000..42ea5fd8d9 --- /dev/null +++ b/package/iputils/iputils.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 08b9f686fcc874f75b465f90f3e831aa9ac1f2e043f4bb61e6d99868e8869025 iputils-31d947cf7156cf78d3f57e0bd82b33e6f6ece6b4.tar.gz diff --git a/package/iputils/iputils.mk b/package/iputils/iputils.mk new file mode 100644 index 0000000000..18e48b4beb --- /dev/null +++ b/package/iputils/iputils.mk @@ -0,0 +1,73 @@ +################################################################################ +# +# iputils +# +################################################################################ + +# The original upstream was forked to the github repository in 2014 to +# pull fixes from other distribution and centralize the changes after +# the upstream seemed to have gone dormant. The fork contains the +# latest changes including msul support, removing a libsysfs dependency +# and IPv6 updates. +# http://www.spinics.net/lists/netdev/msg279881.html + +IPUTILS_VERSION = 31d947cf7156cf78d3f57e0bd82b33e6f6ece6b4 +IPUTILS_SITE = $(call github,iputils,iputils,$(IPUTILS_VERSION)) +IPUTILS_LICENSE = GPLv2+, BSD-3c, BSD-4c +# Only includes a license file for BSD +IPUTILS_LICENSE_FILES = ninfod/COPYING + +# Build after busybox so target ends up with this package's full +# versions of the applications instead of busybox applets. +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +IPUTILS_DEPENDENCIES += busybox +endif + +IPUTILS_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) USE_SYSFS=no USE_IDN=no\ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +IPUTILS_MAKE_OPTS += USE_CAP=yes +IPUTILS_DEPENDENCIES += libcap +else +IPUTILS_MAKE_OPTS += USE_CAP=no +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +IPUTILS_MAKE_OPTS += USE_GCRYPT=yes +IPUTILS_DEPENDENCIES += libgcrypt +else +IPUTILS_MAKE_OPTS += USE_GCRYPT=no +endif + +ifeq ($(BR2_PACKAGE_NETTLE),y) +IPUTILS_MAKE_OPTS += USE_NETTLE=yes +IPUTILS_DEPENDENCIES += nettle +else +IPUTILS_MAKE_OPTS += USE_NETTLE=no +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +IPUTILS_MAKE_OPTS += USE_CRYPTO=yes +IPUTILS_DEPENDENCIES += openssl +else +IPUTILS_MAKE_OPTS += USE_CRYPTO=no +endif + +define IPUTILS_BUILD_CMDS + $(MAKE) -C $(@D) $(IPUTILS_MAKE_OPTS) +endef + +define IPUTILS_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/arping $(TARGET_DIR)/sbin/arping + $(INSTALL) -D -m 755 $(@D)/clockdiff $(TARGET_DIR)/bin/clockdiff + $(INSTALL) -D -m 755 $(@D)/ping $(TARGET_DIR)/bin/ping + $(INSTALL) -D -m 755 $(@D)/rarpd $(TARGET_DIR)/sbin/rarpd + $(INSTALL) -D -m 755 $(@D)/rdisc $(TARGET_DIR)/sbin/rdisc + $(INSTALL) -D -m 755 $(@D)/tftpd $(TARGET_DIR)/usr/sbin/in.tftpd + $(INSTALL) -D -m 755 $(@D)/tracepath $(TARGET_DIR)/bin/tracepath + $(INSTALL) -D -m 755 $(@D)/tracepath6 $(TARGET_DIR)/bin/tracepath6 + $(INSTALL) -D -m 755 $(@D)/traceroute6 $(TARGET_DIR)/bin/traceroute6 +endef + +$(eval $(generic-package)) diff --git a/package/iqvlinux/Config.in b/package/iqvlinux/Config.in new file mode 100644 index 0000000000..8959955745 --- /dev/null +++ b/package/iqvlinux/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_IQVLINUX + bool "iqvlinux" + depends on BR2_LINUX_KERNEL + help + Intel Ethernet Adapter Debug Driver for Linux (iqvlinux), + which supports kernel versions 2.6.x up through 4.0.x. + + This debug driver supports all Intel's networking Tools based + on the SDK version 2.19.36.0 or higher which support Intel + Ethernet chip including e1000, e1000e, i210... + + Note: This driver requires PCI support to be enabled + (i.e. CONFIG_PCI). + + http://sourceforge.net/projects/e1000/files/iqvlinux/ + +comment "iqvlinux needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL diff --git a/package/iqvlinux/iqvlinux.hash b/package/iqvlinux/iqvlinux.hash new file mode 100644 index 0000000000..ddf57b712c --- /dev/null +++ b/package/iqvlinux/iqvlinux.hash @@ -0,0 +1,5 @@ +# From http://sourceforge.net/projects/e1000/files/iqvlinux/1.1.5.3/ +sha1 bd94416e4364015dbbd78a22e51080bf7ea81fac iqvlinux.tar.gz +md5 fb6a2a4dc122d39070fcb06985c97a05 iqvlinux.tar.gz +# locally computed +sha256 8cb19f3bfe040100a13bb2d05cb2b54f2b259e55cef23f8cc5aa6f2f31e98bec iqvlinux.tar.gz diff --git a/package/iqvlinux/iqvlinux.mk b/package/iqvlinux/iqvlinux.mk new file mode 100644 index 0000000000..b3981fa770 --- /dev/null +++ b/package/iqvlinux/iqvlinux.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# iqvlinux +# +################################################################################ + +IQVLINUX_VERSION = 1.1.5.3 +IQVLINUX_SITE = http://sourceforge.net/projects/e1000/files/iqvlinux/$(IQVLINUX_VERSION) +IQVLINUX_SOURCE = iqvlinux.tar.gz + +IQVLINUX_LICENSE = GPLv2, BSD-3c +IQVLINUX_LICENSE_FILES = \ + COPYING src/linux/driver/files.txt \ + inc/linux/files.txt inc/files.txt + +IQVLINUX_MODULE_MAKE_OPTS = NALDIR=$(@D) KSRC=$(LINUX_DIR) CC=$(TARGET_CC) + +IQVLINUX_MODULE_SUBDIRS = src/linux/driver + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/irda-utils/0001-daemon.patch b/package/irda-utils/0001-daemon.patch new file mode 100644 index 0000000000..f6034a75b4 --- /dev/null +++ b/package/irda-utils/0001-daemon.patch @@ -0,0 +1,34 @@ +written by Mike Frysinger + +https://sourceforge.net/tracker/?func=detail&aid=3132053&group_id=5616&atid=305616 + +Rather than using the fork function (which doesnt work on nommu +systems), simply use the daemon() function instead (which does +work). this should work the same before and after for all systems. + +--- a/irattach/util.c ++++ b/irattach/util.c +@@ -156,21 +156,10 @@ + + void fork_now(int ttyfd) + { +- int ret; + int i; + +- if ((ret = fork()) > 0) +- exit(0); +- +- if (ret == -1) +- syslog(LOG_INFO, "forking: %m"); +- if (setsid() < 0) +- syslog(LOG_INFO, "detaching from tty: %m"); +- +- if ((ret = fork()) > 0) { +- /* cleanup_files = 0; */ +- exit(0); +- } ++ if (daemon(1, 1)) ++ syslog(LOG_INFO, "daemon: %m"); + + /* Close all open inherited files! Except for ttyfd! */ + for (i = 0; i < 64; i++) diff --git a/package/irda-utils/0002-nommu.patch b/package/irda-utils/0002-nommu.patch new file mode 100644 index 0000000000..bc76bd3957 --- /dev/null +++ b/package/irda-utils/0002-nommu.patch @@ -0,0 +1,24 @@ +written by Mike Frysinger + +https://sourceforge.net/tracker/?func=detail&aid=3132056&group_id=5616&atid=305616 + +nommu systems cannot fork() as the hardware cannot support +it. irattach uses it as a minor optimization, but it isnt +necessary for correct functioning of the utility. so add a +NO_FORK define so we nommu peeps can do CFLAGS="... -DNO_FORK=1 +..." and use it in our embedded systems. + +--- a/irattach/irattach.c ++++ b/irattach/irattach.c +@@ -397,7 +397,11 @@ + after_names[i]); + /* Create a new instance for this other + * interface */ ++#ifdef NO_FORK ++ pid = -1; ++#else + pid = fork(); ++#endif + /* If in the child */ + if(!pid) { + /* Get the interface name */ diff --git a/package/irda-utils/0003-subdir.patch b/package/irda-utils/0003-subdir.patch new file mode 100644 index 0000000000..e9b5458a0b --- /dev/null +++ b/package/irda-utils/0003-subdir.patch @@ -0,0 +1,23 @@ +written by Mike Frysinger + +https://sourceforge.net/tracker/?func=detail&aid=3132051&group_id=5616&atid=305616 + +The top level makefile ignores build/install errors in subdirs which makes +packaging a pain to verify. + +--- a/Makefile ++++ b/Makefile +@@ -31,11 +31,11 @@ + CFLAGS= -O2 -W -Wall + + all: +- @-(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done) ++ @(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done) + + + install: +- @-(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done) ++ @(set -e ; for d in $(DIRS) ; do $(MAKE) $(MAKE_OUTPUT) -C $$d $@ ; done) + + + clean: diff --git a/package/irda-utils/0004-musl.patch b/package/irda-utils/0004-musl.patch new file mode 100644 index 0000000000..6cf975b8c1 --- /dev/null +++ b/package/irda-utils/0004-musl.patch @@ -0,0 +1,31 @@ +Replace use of with . + +kernel headers already provides the +needed definitions, moreover not all libc implementations +provide if_packet.h e.g. musl + +Signed-off-by: Khem Raj +Upstream-Status: Pending +[From http://cgit.openembedded.org/openembedded-core/plain/meta/recipes-connectivity/irda-utils/irda-utils-0.9.18/musl.patch.] +Signed-off-by: Bernd Kuhls + +Index: irda-utils-0.9.18/irdaping/irdaping.c +=================================================================== +--- irda-utils-0.9.18.orig/irdaping/irdaping.c ++++ irda-utils-0.9.18/irdaping/irdaping.c +@@ -33,7 +33,6 @@ + #include + #include + #include /* For struct ifreq */ +-#include /* For struct sockaddr_pkt */ + #include /* For ARPHRD_IRDA */ + #include /* For ETH_P_ALL */ + #include /* For htons */ +@@ -46,6 +45,7 @@ + #include /* __cpu_to_le32 and co. */ + + #include /* For __u8 and co. */ ++#include /* For struct sockaddr_pkt */ + #include + + #ifndef AF_IRDA diff --git a/package/irda-utils/Config.in b/package/irda-utils/Config.in new file mode 100644 index 0000000000..418ab618c8 --- /dev/null +++ b/package/irda-utils/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_IRDA_UTILS + bool "irda-utils" + help + user space utilities which control the IrDA stack + + http://irda.sourceforge.net/ + +if BR2_PACKAGE_IRDA_UTILS + +config BR2_PACKAGE_IRDA_UTILS_IRATTACH + bool "irattach" + +config BR2_PACKAGE_IRDA_UTILS_IRDAPING + bool "irdaping" + +config BR2_PACKAGE_IRDA_UTILS_IRNETD + bool "irnetd" + +endif diff --git a/package/irda-utils/irda-utils.hash b/package/irda-utils/irda-utils.hash new file mode 100644 index 0000000000..6a71c47f03 --- /dev/null +++ b/package/irda-utils/irda-utils.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 61980551e46b2eaa9e17ad31cbc1a638074611fc33bff34163d10c7a67a9fdc6 irda-utils-0.9.18.tar.gz diff --git a/package/irda-utils/irda-utils.mk b/package/irda-utils/irda-utils.mk new file mode 100644 index 0000000000..2c35dff791 --- /dev/null +++ b/package/irda-utils/irda-utils.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# irda-utils +# +################################################################################ + +IRDA_UTILS_VERSION = 0.9.18 +IRDA_UTILS_SITE = http://downloads.sourceforge.net/project/irda/irda-utils/$(IRDA_UTILS_VERSION) +IRDA_UTILS_LICENSE = GPLv2+ +IRDA_UTILS_LICENSE_FILES = man/COPYING + +IRDA_UTILS_CFLAGS = $(TARGET_CFLAGS) -I. +ifeq ($(BR2_USE_MMU),) +IRDA_UTILS_CFLAGS += -DNO_FORK=1 +endif + +define IRDA_UTILS_BUILD_CMDS + $(MAKE) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(IRDA_UTILS_CFLAGS)" \ + SYS_INCLUDES= \ + DIRS="irattach irdaping irnetd" \ + V=1 -C $(@D) +endef + +IRDA_UTILS_SBINS- = +IRDA_UTILS_SBINS-y = +IRDA_UTILS_SBINS-$(BR2_PACKAGE_IRDA_UTILS_IRATTACH) += irattach +IRDA_UTILS_SBINS-$(BR2_PACKAGE_IRDA_UTILS_IRDAPING) += irdaping +IRDA_UTILS_SBINS-$(BR2_PACKAGE_IRDA_UTILS_IRNETD) += irnetd +IRDA_UTILS_SBINS- += $(IRDA_UTILS_SBINS-y) + +define IRDA_UTILS_INSTALL_TARGET_CMDS + for i in $(IRDA_UTILS_SBINS-y); do \ + $(INSTALL) -m 0755 -D $(@D)/$$i/$$i $(TARGET_DIR)/usr/sbin/$$i || exit 1; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/irqbalance/Config.in b/package/irqbalance/Config.in new file mode 100644 index 0000000000..6c21497834 --- /dev/null +++ b/package/irqbalance/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_IRQBALANCE + bool "irqbalance" + help + Irqbalance is a daemon to help balance the cpu load generated + by interrupts across all of a systems cpus. + Irqbalance identifies the highest volume interrupt sources, + and isolates them to a single unique cpu, so that load is + spread as much as possible over an entire processor set, while + minimizing cache hit rates for irq handlers. + + https://github.com/Irqbalance/irqbalance diff --git a/package/irqbalance/S13irqbalance b/package/irqbalance/S13irqbalance new file mode 100644 index 0000000000..b06a3372e9 --- /dev/null +++ b/package/irqbalance/S13irqbalance @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Starts irqbalance +# + +EXEC="/usr/sbin/irqbalance" +ARGS="" +PID="/var/run/irqbalance.pid" + +case "$1" in + start) + printf "Starting irqbalance: " + start-stop-daemon -S -q -x $EXEC -- $ARGS + if [ $? != 0 ]; then + echo "FAILED" + exit 1 + else + echo "OK" + fi + pidof irqbalance > $PID + ;; + stop) + printf "Stopping irqbalance: " + start-stop-daemon -K -q -p $PID + echo "OK" + ;; + restart|reload) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/irqbalance/irqbalance.mk b/package/irqbalance/irqbalance.mk new file mode 100644 index 0000000000..1872c889c8 --- /dev/null +++ b/package/irqbalance/irqbalance.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# irqbalance +# +################################################################################ + +IRQBALANCE_VERSION = v1.0.9 +IRQBALANCE_SITE = $(call github,irqbalance,irqbalance,$(IRQBALANCE_VERSION)) +IRQBALANCE_LICENSE = GPLv2 +IRQBALANCE_LICENSE_FILES = COPYING +IRQBALANCE_DEPENDENCIES = host-pkgconf +# Autoreconf needed because package is distributed without a configure script +IRQBALANCE_AUTORECONF = YES + +# This would be done by the package's autogen.sh script +define IRQBALANCE_PRECONFIGURE + mkdir -p $(@D)/m4 +endef + +IRQBALANCE_PRE_CONFIGURE_HOOKS += IRQBALANCE_PRECONFIGURE + +define IRQBALANCE_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/irqbalance/S13irqbalance \ + $(TARGET_DIR)/etc/init.d/S13irqbalance +endef + +define IRQBALANCE_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/irqbalance/irqbalance.service \ + $(TARGET_DIR)/usr/lib/systemd/system/irqbalance.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/irqbalance.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/irqbalance.service +endef + +$(eval $(autotools-package)) diff --git a/package/irqbalance/irqbalance.service b/package/irqbalance/irqbalance.service new file mode 100644 index 0000000000..9ba3be43bb --- /dev/null +++ b/package/irqbalance/irqbalance.service @@ -0,0 +1,9 @@ +[Unit] +Description=irqbalance daemon +After=syslog.target + +[Service] +ExecStart=/usr/sbin/irqbalance --foreground + +[Install] +WantedBy=multi-user.target diff --git a/package/irssi/Config.in b/package/irssi/Config.in new file mode 100644 index 0000000000..7d29201789 --- /dev/null +++ b/package/irssi/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_IRSSI + bool "irssi" + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_NCURSES + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # fork() + help + Irssi is a terminal based IRC client for UNIX systems. + + http://irssi.org/ + +if BR2_PACKAGE_IRSSI + +config BR2_PACKAGE_IRSSI_PROXY + bool "proxy module" + help + Build the irssi proxy module, which allows an IRC connection + to be shared among multiple clients. + +config BR2_PACKAGE_IRSSI_TRUE_COLOR + bool "true color support" + help + Build with true color support in terminal. + +endif + +comment "irssi needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/irssi/irssi.hash b/package/irssi/irssi.hash new file mode 100644 index 0000000000..fa49d8594a --- /dev/null +++ b/package/irssi/irssi.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 c0a177f749757c2d171ebe49ab0f0dd9cf9374dea81ab01904d0549bcb057840 irssi-0.8.18.tar.xz diff --git a/package/irssi/irssi.mk b/package/irssi/irssi.mk new file mode 100644 index 0000000000..8272e4404f --- /dev/null +++ b/package/irssi/irssi.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# irssi +# +################################################################################ + +IRSSI_VERSION = 0.8.18 +IRSSI_SOURCE = irssi-$(IRSSI_VERSION).tar.xz +# Do not use the github helper here. The generated tarball is *NOT* the +# same as the one uploaded by upstream for the release. +IRSSI_SITE = https://github.com/irssi/irssi/releases/download/$(IRSSI_VERSION) +IRSSI_LICENSE = GPLv2+ +IRSSI_LICENSE_FILES = COPYING +IRSSI_DEPENDENCIES = host-pkgconf libglib2 ncurses + +IRSSI_CONF_OPTS = \ + --disable-glibtest \ + --with-ncurses=$(STAGING_DIR)/usr \ + --without-perl + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +IRSSI_CONF_OPTS += --enable-ssl +IRSSI_DEPENDENCIES += openssl +else +IRSSI_CONF_OPTS += --disable-ssl +endif + +ifeq ($(BR2_PACKAGE_IRSSI_PROXY),y) +IRSSI_CONF_OPTS += --with-proxy +# If shared libs are disabled, 'proxy' has to go in the list of built-in +# modules. +ifeq ($(BR2_STATIC_LIBS),y) +IRSSI_CONF_OPTS += --with-modules=proxy +endif +else +IRSSI_CONF_OPTS += --without-proxy +endif # proxy + +ifeq ($(BR2_PACKAGE_IRSSI_TRUE_COLOR),y) +IRSSI_CONF_OPTS += --enable-true-color +else +IRSSI_CONF_OPTS += --disable-true-color +endif + +# Cross-compiling irssi with the perl interpreter enabled doesn't work +# yet. So, remove scripts as they are useless in that case. +define IRSSI_REMOVE_SCRIPTS + rm -rf $(TARGET_DIR)/usr/share/irssi/scripts/ +endef + +IRSSI_POST_INSTALL_TARGET_HOOKS += IRSSI_REMOVE_SCRIPTS + +$(eval $(autotools-package)) diff --git a/package/isl/isl.hash b/package/isl/isl.hash new file mode 100644 index 0000000000..e2c14ad149 --- /dev/null +++ b/package/isl/isl.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 8882c9e36549fc757efa267706a9af733bb8d7fe3905cbfde43e17a89eea4675 isl-0.14.1.tar.xz diff --git a/package/isl/isl.mk b/package/isl/isl.mk new file mode 100644 index 0000000000..bb79039e88 --- /dev/null +++ b/package/isl/isl.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# isl +# +################################################################################ + +# The latest 0.15 version is not yet compatible with cloog 0.18.3, so +# bumping isl is not possible until a new version of cloog is +# published. +ISL_VERSION = 0.14.1 +ISL_SOURCE = isl-$(ISL_VERSION).tar.xz +ISL_SITE = http://isl.gforge.inria.fr +ISL_LICENSE = MIT +ISL_LICENSE_FILES = LICENSE +ISL_DEPENDENCIES = gmp + +# Our libtool patch doesn't apply, and since this package is only +# built for the host, we don't really care about it. +ISL_LIBTOOL_PATCH = NO + +$(eval $(host-autotools-package)) diff --git a/package/iucode-tool/Config.in b/package/iucode-tool/Config.in new file mode 100644 index 0000000000..d81dabb196 --- /dev/null +++ b/package/iucode-tool/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_IUCODE_TOOL + bool "iucode-tool" + depends on BR2_x86_64 || BR2_i386 + select BR2_PACKAGE_INTEL_MICROCODE + select BR2_PACKAGE_ARGP_STANDALONE \ + if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL + help + Intel processor microcode tool + + https://gitlab.com/iucode-tool diff --git a/package/iucode-tool/S00iucode-tool b/package/iucode-tool/S00iucode-tool new file mode 100644 index 0000000000..0c1e409de2 --- /dev/null +++ b/package/iucode-tool/S00iucode-tool @@ -0,0 +1,23 @@ +#!/bin/sh +# +# Upload microcode into the processor. +# + +microcode_file="/usr/share/misc/intel-microcode.dat" + +case "$1" in + start) + echo "Starting iucode-tool:" + /usr/sbin/iucode_tool -k $microcode_file + echo "done" + ;; + stop) + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/iucode-tool/iucode-tool.hash b/package/iucode-tool/iucode-tool.hash new file mode 100644 index 0000000000..c1f3bef045 --- /dev/null +++ b/package/iucode-tool/iucode-tool.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 33271652032f20f866a212bc98ea01a8db65c4ac839fa820aa23da974fd6ff62 iucode-tool_1.5.tar.xz diff --git a/package/iucode-tool/iucode-tool.mk b/package/iucode-tool/iucode-tool.mk new file mode 100644 index 0000000000..cee0572649 --- /dev/null +++ b/package/iucode-tool/iucode-tool.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# iucode-tool +# +################################################################################ + +IUCODE_TOOL_VERSION = 1.5 +IUCODE_TOOL_SOURCE = iucode-tool_$(IUCODE_TOOL_VERSION).tar.xz +IUCODE_TOOL_SITE = https://gitlab.com/iucode-tool/releases/raw/latest +ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y) +IUCODE_TOOL_CONF_ENV = LIBS="-largp" +IUCODE_TOOL_DEPENDENCIES = argp-standalone +endif +IUCODE_TOOL_LICENSE = GPLv2+ +IUCODE_TOOL_LICENSE_FILES = COPYING + +define IUCODE_TOOL_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/iucode-tool/S00iucode-tool \ + $(TARGET_DIR)/etc/init.d/S00iucode-tool +endef + +$(eval $(autotools-package)) diff --git a/package/iw/Config.in b/package/iw/Config.in new file mode 100644 index 0000000000..fd73b20992 --- /dev/null +++ b/package/iw/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_IW + bool "iw" + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + select BR2_PACKAGE_LIBNL + help + Utility for wireless devices using the mac80211 kernel stack + + http://wireless.kernel.org/en/users/Documentation/iw + +comment "iw needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/iw/iw.hash b/package/iw/iw.hash new file mode 100644 index 0000000000..424a71e5de --- /dev/null +++ b/package/iw/iw.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/software/network/iw/sha256sums.asc +sha256 a6add81a51667649d8d7cfba783ab6a0f82e250a663a4065b13babdff3f6b220 iw-4.3.tar.xz diff --git a/package/iw/iw.mk b/package/iw/iw.mk new file mode 100644 index 0000000000..3c1767ae08 --- /dev/null +++ b/package/iw/iw.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# iw +# +################################################################################ + +IW_VERSION = 4.3 +IW_SOURCE = iw-$(IW_VERSION).tar.xz +IW_SITE = $(BR2_KERNEL_MIRROR)/software/network/iw +IW_LICENSE = iw license +IW_LICENSE_FILES = COPYING +IW_DEPENDENCIES = host-pkgconf libnl +IW_MAKE_OPTS = CC="$(TARGET_CC)" LD="$(TARGET_LD)" LDFLAGS="$(TARGET_LDFLAGS)" +IW_MAKE_ENV = PKG_CONFIG="$(HOST_DIR)/usr/bin/pkg-config" \ + GIT_DIR=$(IW_DIR) + +define IW_BUILD_CMDS + $(IW_MAKE_ENV) $(MAKE) $(IW_MAKE_OPTS) -C $(@D) +endef + +define IW_INSTALL_TARGET_CMDS + $(IW_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/jack2/0001-Add-support-for-nios2.patch b/package/jack2/0001-Add-support-for-nios2.patch new file mode 100644 index 0000000000..f6d60af215 --- /dev/null +++ b/package/jack2/0001-Add-support-for-nios2.patch @@ -0,0 +1,34 @@ +From 3651f95d0433c84d2b67e30e68dd6140585535b0 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Tue, 19 Apr 2016 19:32:35 +0200 +Subject: [PATCH 1/1] Add support for nios2 + +When compiling jack on nios2, compilation fails because NGREGS is not +defined. Since this is only for debug output on segmentation faults, stub +the debug print out like it's been done for other platforms before. + +Inspired by +https://github.com/jackaudio/jack2/commit/d11bb095291d8880508c87adfe625bf2bcab1456 + +Signed-off-by: Bernd Kuhls +[Patch sent upstream: https://github.com/jackaudio/jack2/pull/199] +--- + dbus/sigsegv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dbus/sigsegv.c b/dbus/sigsegv.c +index 64c3986..ee12f91 100644 +--- a/dbus/sigsegv.c ++++ b/dbus/sigsegv.c +@@ -104,7 +104,7 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) { + jack_error("info.si_errno = %d", info->si_errno); + jack_error("info.si_code = %d (%s)", info->si_code, si_code_str); + jack_error("info.si_addr = %p", info->si_addr); +-#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__) ++#if !defined(__alpha__) && !defined(__ia64__) && !defined(__FreeBSD_kernel__) && !defined(__arm__) && !defined(__hppa__) && !defined(__sh__) && !defined(__aarch64__) && !defined(nios2) + for(i = 0; i < NGREG; i++) + jack_error("reg[%02d] = 0x" REGFORMAT, i, + #if defined(__powerpc64__) +-- +2.8.0.rc3 + diff --git a/package/jack2/0002-Make-backtrace-support-depends-on-execinfo.h-existen.patch b/package/jack2/0002-Make-backtrace-support-depends-on-execinfo.h-existen.patch new file mode 100644 index 0000000000..719c6a83ba --- /dev/null +++ b/package/jack2/0002-Make-backtrace-support-depends-on-execinfo.h-existen.patch @@ -0,0 +1,67 @@ +From 4b2c73ad056aa327dc3b505410da68cf384317ba Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Mon, 16 May 2016 22:26:05 +0200 +Subject: [PATCH] Make backtrace support depends on execinfo.h existence + +In some C-libraries (like uclibc), backtrace support is optional, so the +execinfo.h file may not exist. + +This change adds the check for execinfo.h header and conditionnaly enable +backtrace support. + +This issue has been triggered by Buildroot farms: + http://autobuild.buildroot.org/results/391/391e71a988250ea66ec4dbee6f60fdce9eaf2766/build-end.log + +Signed-off-by: Samuel Martin +--- + dbus/sigsegv.c | 8 +++++++- + wscript | 1 + + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/dbus/sigsegv.c b/dbus/sigsegv.c +index ee12f91..0b31d89 100644 +--- a/dbus/sigsegv.c ++++ b/dbus/sigsegv.c +@@ -27,7 +27,9 @@ + #include + #include + #include +-#include ++#if defined(HAVE_EXECINFO_H) ++# include ++#endif /* defined(HAVE_EXECINFO_H) */ + #include + #ifndef NO_CPP_DEMANGLE + char * __cxa_demangle(const char * __mangled_name, char * __output_buffer, size_t * __length, int * __status); +@@ -161,12 +163,16 @@ static void signal_segv(int signum, siginfo_t* info, void*ptr) { + bp = (void**)bp[0]; + } + #else ++# if defined(HAVE_EXECINFO_H) + jack_error("Stack trace (non-dedicated):"); + sz = backtrace(bt, 20); + strings = backtrace_symbols(bt, sz); + + for(i = 0; i < sz; ++i) + jack_error("%s", strings[i]); ++# else /* defined(HAVE_EXECINFO_H) */ ++ jack_error("Stack trace not available"); ++# endif /* defined(HAVE_EXECINFO_H) */ + #endif + jack_error("End of stack trace"); + exit (-1); +diff --git a/wscript b/wscript +index aef4bd8..63ba3aa 100644 +--- a/wscript ++++ b/wscript +@@ -166,6 +166,7 @@ def configure(conf): + if conf.env['BUILD_JACKDBUS'] != True: + conf.fatal('jackdbus was explicitly requested but cannot be built') + ++ conf.check_cc(header_name='execinfo.h', define_name="HAVE_EXECINFO_H", mandatory=False) + conf.check_cc(header_name='samplerate.h', define_name="HAVE_SAMPLERATE") + + if conf.is_defined('HAVE_SAMPLERATE'): +-- +2.8.2 + diff --git a/package/jack2/Config.in b/package/jack2/Config.in new file mode 100644 index 0000000000..f9de7be041 --- /dev/null +++ b/package/jack2/Config.in @@ -0,0 +1,54 @@ +config BR2_PACKAGE_JACK2 + bool "jack2" + depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib + depends on BR2_USE_MMU # fork() + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_LIBSAMPLERATE + select BR2_PACKAGE_LIBSNDFILE + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_ALSA_LIB_HWDEP + select BR2_PACKAGE_ALSA_LIB_SEQ + select BR2_PACKAGE_ALSA_LIB_RAWMIDI + # Ensure we get at least one: + select BR2_PACKAGE_JACK2_LEGACY if !BR2_PACKAGE_JACK2_DBUS + help + JACK Audio Connection Kit (server and example clients). + + JACK is a low-latency sound server, allowing multiple + applications to connect to one audio device, and to share + audio between themselves. This package contains the daemon + jackd as well as some example clients. + + http://jackaudio.org/ + +if BR2_PACKAGE_JACK2 + +config BR2_PACKAGE_JACK2_LEGACY + bool "classic jack2" + help + Build and use jackd. + + https://github.com/jackaudio/jackaudio.github.com/wiki/JackDbusPackaging + +config BR2_PACKAGE_JACK2_DBUS + bool "dbus jack2" + depends on BR2_USE_WCHAR # dbus-python, python + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_DBUS_PYTHON + select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 # runtime + help + Build and use jackdbus. + + https://github.com/jackaudio/jackaudio.github.com/wiki/JackDbusPackaging + +endif + +comment "jack2 needs a toolchain w/ threads, C++, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \ + BR2_STATIC_LIBS diff --git a/package/jack2/jack2.mk b/package/jack2/jack2.mk new file mode 100644 index 0000000000..777a321319 --- /dev/null +++ b/package/jack2/jack2.mk @@ -0,0 +1,68 @@ +################################################################################ +# +# jack2 +# +################################################################################ + +JACK2_VERSION = v1.9.10 +JACK2_SITE = $(call github,jackaudio,jack2,$(JACK2_VERSION)) +JACK2_LICENSE = GPLv2+ (jack server), LGPLv2.1+ (jack library) +JACK2_DEPENDENCIES = libsamplerate libsndfile alsa-lib host-python +JACK2_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_OPUS),y) +JACK2_DEPENDENCIES += opus +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +JACK2_DEPENDENCIES += readline +endif + +ifeq ($(BR2_PACKAGE_JACK2_LEGACY),y) +JACK2_CONF_OPTS += --classic +else +define JACK2_REMOVE_JACK_CONTROL + $(RM) -f $(TARGET_DIR)/usr/bin/jack_control +endef +JACK2_POST_INSTALL_TARGET_HOOKS += JACK2_REMOVE_JACK_CONTROL +endif + +ifeq ($(BR2_PACKAGE_JACK2_DBUS),y) +JACK2_DEPENDENCIES += dbus +JACK2_CONF_OPTS += --dbus +endif + +# Even though it advertises support for celt-0.5.x, jack2 really +# requires celt >= 0.5.2 but we only have 0.5.1.3 and we cannot +# upgrade, so we do not add a dependency to celt051, which it can't +# find anyway as it looks for celt.pc but we only have celt-51.pc. + +# The dependency against eigen is only useful in conjunction with +# gtkiostream, which we do not have, so we don't need to depend on +# eigen. + +define JACK2_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + $(HOST_DIR)/usr/bin/python2 ./waf configure \ + --prefix=/usr \ + --alsa \ + $(JACK2_CONF_OPTS) \ + ) +endef + +define JACK2_BUILD_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS)) +endef + +define JACK2_INSTALL_TARGET_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(TARGET_DIR) \ + install) +endef + +define JACK2_INSTALL_STAGING_CMDS + (cd $(@D); $(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(STAGING_DIR) \ + install) +endef + +$(eval $(generic-package)) diff --git a/package/jamvm/0001-Use-fenv.h-instead-of-fpu_control.h.patch b/package/jamvm/0001-Use-fenv.h-instead-of-fpu_control.h.patch new file mode 100644 index 0000000000..50f95cde57 --- /dev/null +++ b/package/jamvm/0001-Use-fenv.h-instead-of-fpu_control.h.patch @@ -0,0 +1,86 @@ +From 7152ded5219453c9ff1cd062cecbeaf4d77e4cab Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 26 May 2016 15:05:48 +0200 +Subject: [PATCH] Use instead of + +musl libc (http://musl-libc.org lack the non-standard +header, which is used in src/os/linux/{i386,x86_64}/init.c files to +setup the floating point precision. This patch makes it use the +standard C header instead. + +Original patch at Felix Janda at +https://sourceforge.net/p/jamvm/patches/6/. + +Signed-off-by: Thomas Petazzoni +--- + src/os/linux/i386/init.c | 12 ++++++------ + src/os/linux/x86_64/init.c | 16 ++++++---------- + 2 files changed, 12 insertions(+), 16 deletions(-) + +diff --git a/src/os/linux/i386/init.c b/src/os/linux/i386/init.c +index d9c6648..94a733e 100644 +--- a/src/os/linux/i386/init.c ++++ b/src/os/linux/i386/init.c +@@ -19,18 +19,18 @@ + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +-#include ++#include + + /* Change floating point precision to double (64-bit) from + * the extended (80-bit) Linux default. */ + + void setDoublePrecision() { +- fpu_control_t cw; ++ fenv_t fenv; + +- _FPU_GETCW(cw); +- cw &= ~_FPU_EXTENDED; +- cw |= _FPU_DOUBLE; +- _FPU_SETCW(cw); ++ fegetenv(&fenv); ++ fenv.__control_word &= ~0x300; /* _FPU_EXTENDED */ ++ fenv.__control_word |= 0x200; /* _FPU_DOUBLE */ ++ fesetenv(&fenv); + } + + void initialisePlatform() { +diff --git a/src/os/linux/x86_64/init.c b/src/os/linux/x86_64/init.c +index 9d55229..a76a923 100644 +--- a/src/os/linux/x86_64/init.c ++++ b/src/os/linux/x86_64/init.c +@@ -19,9 +19,7 @@ + * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +-#ifdef __linux__ +-#include +-#endif ++#include + + /* Change the x87 FPU precision to double (64-bit) from the extended + (80-bit) Linux default. Note, unlike on i386, my testcases pass +@@ -30,14 +28,12 @@ + */ + + void setDoublePrecision() { +-#ifdef __linux__ +- fpu_control_t cw; ++ fenv_t fenv; + +- _FPU_GETCW(cw); +- cw &= ~_FPU_EXTENDED; +- cw |= _FPU_DOUBLE; +- _FPU_SETCW(cw); +-#endif ++ fegetenv(&fenv); ++ fenv.__control_word &= ~0x300; /*_FPU_EXTENDED */ ++ fenv.__control_word |= 0x200; /*_FPU_DOUBLE */ ++ fesetenv(&fenv); + } + + void initialisePlatform() { +-- +2.7.4 + diff --git a/package/jamvm/Config.in b/package/jamvm/Config.in new file mode 100644 index 0000000000..2cc97a1398 --- /dev/null +++ b/package/jamvm/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_JAMVM + bool "jamvm" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_x86_64 \ + || BR2_mips || BR2_mipsel || BR2_powerpc + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_CLASSPATH + help + JamVM is a new Java Virtual Machine which conforms to the + JVM specification version 2 (blue book). + + http://jamvm.sf.net + +comment "jamvm needs a toolchain w/ threads, dynamic library" + depends on BR2_arm || BR2_armeb || BR2_i386 || BR2_x86_64 \ + || BR2_mips || BR2_mipsel || BR2_powerpc + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/jamvm/jamvm.hash b/package/jamvm/jamvm.hash new file mode 100644 index 0000000000..f8ef76cb92 --- /dev/null +++ b/package/jamvm/jamvm.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 76428e96df0ae9dd964c7a7c74c1e9a837e2f312c39e9a357fa8178f7eff80da jamvm-2.0.0.tar.gz diff --git a/package/jamvm/jamvm.mk b/package/jamvm/jamvm.mk new file mode 100644 index 0000000000..b1520ada49 --- /dev/null +++ b/package/jamvm/jamvm.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# jamvm +# +################################################################################ + +JAMVM_VERSION = 2.0.0 +JAMVM_SITE = http://downloads.sourceforge.net/project/jamvm/jamvm/JamVM%20$(JAMVM_VERSION) +JAMVM_LICENSE = GPLv2+ +JAMVM_LICENSE_FILES = COPYING +JAMVM_DEPENDENCIES = zlib classpath +# int inlining seems to crash jamvm, don't build shared version of internal lib +JAMVM_CONF_OPTS = \ + --with-classpath-install-dir=/usr \ + --disable-int-inlining \ + --disable-shared \ + --without-pic + +# jamvm has ARM assembly code that cannot be compiled in Thumb2 mode, +# so we must force traditional ARM mode. +ifeq ($(BR2_arm),y) +JAMVM_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -marm" +endif + +$(eval $(autotools-package)) diff --git a/package/jansson/Config.in b/package/jansson/Config.in new file mode 100644 index 0000000000..960a7c4c38 --- /dev/null +++ b/package/jansson/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_JANSSON + bool "jansson" + help + Jansson is a C library for encoding, decoding and manipulating JSON + data. + + http://www.digip.org/jansson/ diff --git a/package/jansson/jansson.hash b/package/jansson/jansson.hash new file mode 100644 index 0000000000..013d9296f4 --- /dev/null +++ b/package/jansson/jansson.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 7905e6590fb316c0ff943df3dc6a21cd81a59cff7a6d12514054c359d04d78d7 jansson-2.7.tar.gz diff --git a/package/jansson/jansson.mk b/package/jansson/jansson.mk new file mode 100644 index 0000000000..193fafbaa9 --- /dev/null +++ b/package/jansson/jansson.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# jansson +# +################################################################################ + +JANSSON_VERSION = 2.7 +JANSSON_SITE = http://www.digip.org/jansson/releases +JANSSON_LICENSE = MIT +JANSSON_LICENSE_FILES = LICENSE +JANSSON_INSTALL_STAGING = YES +JANSSON_CONF_ENV = LIBS="-lm" + +$(eval $(autotools-package)) diff --git a/package/janus-gateway/0001-disable-ssp.patch b/package/janus-gateway/0001-disable-ssp.patch new file mode 100644 index 0000000000..9ef184aa80 --- /dev/null +++ b/package/janus-gateway/0001-disable-ssp.patch @@ -0,0 +1,20 @@ +Do not force SSP usage + +The toolchain may not support SSP, so do not enforce its usage, let +the package user pass the appropriate CFLAGS to enable SSP if needed. + +Signed-off-by: Gregory Dymarek +Signed-off-by: Thomas Petazzoni + +diff -rupN janus-gateway-master.orig/Makefile.am janus-gateway-master/Makefile.am +--- janus-gateway-master.orig/Makefile.am 2014-11-27 14:36:31.000000000 +0000 ++++ janus-gateway-master/Makefile.am 2014-12-01 16:39:50.551935028 +0000 +@@ -14,7 +14,7 @@ AM_CFLAGS += -Wredundant-decls # sophia + # some fairly big refactoring though, which can wait. + # AM_CFLAGS += -Wshadow -Wstrict-aliasing=2 + +-AM_CFLAGS += -fstack-protector-all -g -ggdb -fPIC -rdynamic ++AM_CFLAGS += -g -ggdb -fPIC -rdynamic + + # FIXME: make docs work with distcheck + DISTCHECK_CONFIGURE_FLAGS = --disable-docs --enable-post-processing diff --git a/package/janus-gateway/0002-Add-test-for-Wunused-but-set-variable.patch b/package/janus-gateway/0002-Add-test-for-Wunused-but-set-variable.patch new file mode 100644 index 0000000000..14acae5575 --- /dev/null +++ b/package/janus-gateway/0002-Add-test-for-Wunused-but-set-variable.patch @@ -0,0 +1,133 @@ +From c0f075bdee5edabf8f19b68e0880fbd249a89653 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 3 Jan 2015 15:09:59 +0100 +Subject: [PATCH] Add test for -Wunused-but-set-variable + +The -Wunused-but-set-variable option does not exist in some old gcc +versions (gcc 4.5.x), so using it unconditionally breaks the build +with such compilers. + +This commit introduces the AX_CHECK_COMPILE_FLAG m4 macro taken from +the autoconf-archive +(http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_check_compile_flag.m4), +and uses it to detect if the -Wunused-but-set-variable option is +supported, and only uses it in this case. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 2 +- + configure.ac | 3 ++ + m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 78 insertions(+), 1 deletion(-) + create mode 100644 m4/ax_check_compile_flag.m4 + +diff --git a/Makefile.am b/Makefile.am +index 5d23e0b..0f51f6a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -6,7 +6,7 @@ AM_CFLAGS = \ + -Wnested-externs -Wstrict-prototypes -Wunsafe-loop-optimizations \ + -Wwrite-strings -Wno-missing-field-initializers -Wno-unused-parameter \ + -Wcast-align -Wformat-nonliteral -Wformat-security -Wswitch-default \ +- -Wmissing-include-dirs -Waggregate-return -Wunused-but-set-variable \ ++ -Wmissing-include-dirs -Waggregate-return @GCC_WARN_UNUSED_BUT_SET@ \ + -Warray-bounds -Wold-style-definition -Wsign-compare -Wlarger-than=65537 + AM_CFLAGS += -Wno-undef # sophiasip is not -Wundef--safe + AM_CFLAGS += -Wredundant-decls # sophiasip also contains redundant declarations +diff --git a/configure.ac b/configure.ac +index 17870a7..f9bb1e4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -7,6 +7,9 @@ AM_SILENT_RULES([yes]) + AC_GNU_SOURCE + + AC_PROG_CC ++AX_CHECK_COMPILE_FLAG([-Wunused-but-set-variable], ++ [GCC_WARN_UNUSED_BUT_SET=-Wunused-but-set-variable]) ++AC_SUBST(GCC_WARN_UNUSED_BUT_SET) + + LT_PREREQ([2.2]) + LT_INIT +diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 +new file mode 100644 +index 0000000..51df0c0 +--- /dev/null ++++ b/m4/ax_check_compile_flag.m4 +@@ -0,0 +1,74 @@ ++# =========================================================================== ++# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) ++# ++# DESCRIPTION ++# ++# Check whether the given FLAG works with the current language's compiler ++# or gives an error. (Warnings, however, are ignored) ++# ++# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on ++# success/failure. ++# ++# If EXTRA-FLAGS is defined, it is added to the current language's default ++# flags (e.g. CFLAGS) when the check is done. The check is thus made with ++# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to ++# force the compiler to issue an error when a bad flag is given. ++# ++# INPUT gives an alternative input source to AC_COMPILE_IFELSE. ++# ++# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this ++# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. ++# ++# LICENSE ++# ++# Copyright (c) 2008 Guido U. Draheim ++# Copyright (c) 2011 Maarten Bosmans ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see . ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 3 ++ ++AC_DEFUN([AX_CHECK_COMPILE_FLAG], ++[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX ++AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl ++AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ++ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS ++ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" ++ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], ++ [AS_VAR_SET(CACHEVAR,[yes])], ++ [AS_VAR_SET(CACHEVAR,[no])]) ++ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) ++AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], ++ [m4_default([$2], :)], ++ [m4_default([$3], :)]) ++AS_VAR_POPDEF([CACHEVAR])dnl ++])dnl AX_CHECK_COMPILE_FLAGS +-- +2.1.0 + diff --git a/package/janus-gateway/Config.in b/package/janus-gateway/Config.in new file mode 100644 index 0000000000..035ee6c334 --- /dev/null +++ b/package/janus-gateway/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_JANUS_GATEWAY + bool "janus-gateway" + select BR2_PACKAGE_LIBMICROHTTPD + select BR2_PACKAGE_JANSSON + select BR2_PACKAGE_LIBNICE + select BR2_PACKAGE_SOFIA_SIP + select BR2_PACKAGE_LIBSRTP + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_DING_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2, libmicrohttpd + depends on BR2_USE_WCHAR # libnice -> libglib2 + depends on BR2_USE_MMU # libnice + depends on !BR2_STATIC_LIBS # dlopen + help + Janus is an open source, general purpose, WebRTC gateway + designed and developed by Meetecho. + + https://github.com/meetecho/janus-gateway + +comment "janus-gateway needs a toolchain w/ dynamic library, threads, wchar" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/janus-gateway/janus-gateway.mk b/package/janus-gateway/janus-gateway.mk new file mode 100644 index 0000000000..e1361d3dac --- /dev/null +++ b/package/janus-gateway/janus-gateway.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# janus-gateway +# +################################################################################ + +JANUS_GATEWAY_VERSION = c632c1e9da5ffd8c34df6086a1aa5a8511a2a02d +JANUS_GATEWAY_SITE = $(call github,meetecho,janus-gateway,$(JANUS_GATEWAY_VERSION)) +JANUS_GATEWAY_LICENSE = GPLv3 +JANUS_GATEWAY_LICENSE_FILES = COPYING + +# ding-libs provides the ini_config library +JANUS_GATEWAY_DEPENDENCIES = host-pkgconf libmicrohttpd jansson \ + libnice sofia-sip libsrtp host-gengetopt openssl ding-libs + +# Straight out of the repository, no ./configure, and we also patch +# configure.ac. +JANUS_GATEWAY_AUTORECONF = YES + +define JANUS_GATEWAY_M4 + mkdir -p $(@D)/m4 +endef +JANUS_GATEWAY_POST_PATCH_HOOKS += JANUS_GATEWAY_M4 + +JANUS_GATEWAY_CONF_OPTS = \ + --disable-data-channels \ + --disable-rabbitmq + +ifeq ($(BR2_PACKAGE_LIBWEBSOCK),y) +JANUS_GATEWAY_DEPENDENCIES += libwebsock +JANUS_GATEWAY_CONF_OPTS += --enable-websockets +else +JANUS_GATEWAY_CONF_OPTS += --disable-websockets +endif + +ifeq ($(BR2_PACKAGE_OPUS),y) +JANUS_GATEWAY_DEPENDENCIES += opus +JANUS_GATEWAY_CONF_OPTS += --enable-plugin-audiobridge +else +JANUS_GATEWAY_CONF_OPTS += --disable-plugin-audiobridge +endif + +ifeq ($(BR2_PACKAGE_LIBOGG),y) +JANUS_GATEWAY_DEPENDENCIES += libogg +JANUS_GATEWAY_CONF_OPTS += --enable-plugin-voicemail +else +JANUS_GATEWAY_CONF_OPTS += --disable-plugin-voicemail +endif + +# Parallel build broken +JANUS_GATEWAY_MAKE = $(MAKE1) + +$(eval $(autotools-package)) diff --git a/package/jasper/0001-fix-CVE-2014-9029.patch b/package/jasper/0001-fix-CVE-2014-9029.patch new file mode 100644 index 0000000000..c2e95a8d14 --- /dev/null +++ b/package/jasper/0001-fix-CVE-2014-9029.patch @@ -0,0 +1,36 @@ +Fix CVE-2014-9029 + +Patch taken from https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2014-9029 + +Signed-off-by: Baruch Siach +--- + +--- jasper-1.900.1.orig/src/libjasper/jpc/jpc_dec.c 2014-11-27 12:45:44.000000000 +0100 ++++ jasper-1.900.1.orig/src/libjasper/jpc/jpc_dec.c 2014-11-27 12:44:58.000000000 +0100 +@@ -1281,7 +1281,7 @@ static int jpc_dec_process_coc(jpc_dec_t + jpc_coc_t *coc = &ms->parms.coc; + jpc_dec_tile_t *tile; + +- if (JAS_CAST(int, coc->compno) > dec->numcomps) { ++ if (JAS_CAST(int, coc->compno) >= dec->numcomps) { + jas_eprintf("invalid component number in COC marker segment\n"); + return -1; + } +@@ -1307,7 +1307,7 @@ static int jpc_dec_process_rgn(jpc_dec_t + jpc_rgn_t *rgn = &ms->parms.rgn; + jpc_dec_tile_t *tile; + +- if (JAS_CAST(int, rgn->compno) > dec->numcomps) { ++ if (JAS_CAST(int, rgn->compno) >= dec->numcomps) { + jas_eprintf("invalid component number in RGN marker segment\n"); + return -1; + } +@@ -1356,7 +1356,7 @@ static int jpc_dec_process_qcc(jpc_dec_t + jpc_qcc_t *qcc = &ms->parms.qcc; + jpc_dec_tile_t *tile; + +- if (JAS_CAST(int, qcc->compno) > dec->numcomps) { ++ if (JAS_CAST(int, qcc->compno) >= dec->numcomps) { + jas_eprintf("invalid component number in QCC marker segment\n"); + return -1; + } diff --git a/package/jasper/0002-fix-CVE-2014-8138.patch b/package/jasper/0002-fix-CVE-2014-8138.patch new file mode 100644 index 0000000000..e107123ce8 --- /dev/null +++ b/package/jasper/0002-fix-CVE-2014-8138.patch @@ -0,0 +1,18 @@ +See https://bugzilla.redhat.com/show_bug.cgi?id=1173162 + +Signed-off-by: Gustavo Zacarias + +--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:06:44.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:06:26.000000000 +0100 +@@ -386,6 +386,11 @@ jas_image_t *jp2_decode(jas_stream_t *in + /* Determine the type of each component. */ + if (dec->cdef) { + for (i = 0; i < dec->numchans; ++i) { ++ /* Is the channel number reasonable? */ ++ if (dec->cdef->data.cdef.ents[i].channo >= dec->numchans) { ++ jas_eprintf("error: invalid channel number in CDEF box\n"); ++ goto error; ++ } + jas_image_setcmpttype(dec->image, + dec->chantocmptlut[dec->cdef->data.cdef.ents[i].channo], + jp2_getct(jas_image_clrspc(dec->image), diff --git a/package/jasper/0003-fix-CVE-2014-8137-1.patch b/package/jasper/0003-fix-CVE-2014-8137-1.patch new file mode 100644 index 0000000000..0253c62839 --- /dev/null +++ b/package/jasper/0003-fix-CVE-2014-8137-1.patch @@ -0,0 +1,47 @@ +See https://bugzilla.redhat.com/show_bug.cgi?id=1173157 + +Signed-off-by: Gustavo Zacarias + +--- jasper-1.900.1.orig/src/libjasper/base/jas_icc.c 2014-12-11 14:06:44.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/base/jas_icc.c 2014-12-11 15:16:37.971272386 +0100 +@@ -1009,7 +1009,6 @@ static int jas_icccurv_input(jas_iccattr + return 0; + + error: +- jas_icccurv_destroy(attrval); + return -1; + } + +@@ -1127,7 +1126,6 @@ static int jas_icctxtdesc_input(jas_icca + #endif + return 0; + error: +- jas_icctxtdesc_destroy(attrval); + return -1; + } + +@@ -1206,8 +1204,6 @@ static int jas_icctxt_input(jas_iccattrv + goto error; + return 0; + error: +- if (txt->string) +- jas_free(txt->string); + return -1; + } + +@@ -1328,7 +1324,6 @@ static int jas_icclut8_input(jas_iccattr + goto error; + return 0; + error: +- jas_icclut8_destroy(attrval); + return -1; + } + +@@ -1497,7 +1492,6 @@ static int jas_icclut16_input(jas_iccatt + goto error; + return 0; + error: +- jas_icclut16_destroy(attrval); + return -1; + } + diff --git a/package/jasper/0004-fix-CVE-2014-8137-2.patch b/package/jasper/0004-fix-CVE-2014-8137-2.patch new file mode 100644 index 0000000000..e052709d55 --- /dev/null +++ b/package/jasper/0004-fix-CVE-2014-8137-2.patch @@ -0,0 +1,18 @@ +See https://bugzilla.redhat.com/show_bug.cgi?id=1173157 + +Signed-off-by: Gustavo Zacarias + +--- jasper-1.900.1.orig/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:30:54.193209780 +0100 ++++ jasper-1.900.1/src/libjasper/jp2/jp2_dec.c 2014-12-11 14:36:46.313217814 +0100 +@@ -291,7 +291,10 @@ jas_image_t *jp2_decode(jas_stream_t *in + case JP2_COLR_ICC: + iccprof = jas_iccprof_createfrombuf(dec->colr->data.colr.iccp, + dec->colr->data.colr.iccplen); +- assert(iccprof); ++ if (!iccprof) { ++ jas_eprintf("error: failed to parse ICC profile\n"); ++ goto error; ++ } + jas_iccprof_gethdr(iccprof, &icchdr); + jas_eprintf("ICC Profile CS %08x\n", icchdr.colorspc); + jas_image_setclrspc(dec->image, fromiccpcs(icchdr.colorspc)); diff --git a/package/jasper/0005-fix-CVE-2014-8157.patch b/package/jasper/0005-fix-CVE-2014-8157.patch new file mode 100644 index 0000000000..ab81674f93 --- /dev/null +++ b/package/jasper/0005-fix-CVE-2014-8157.patch @@ -0,0 +1,17 @@ +Fix CVE-2014-8157 - dec->numtiles off-by-one check in jpc_dec_process_sot() +From https://bugzilla.redhat.com/show_bug.cgi?id=1179282 + +Signed-off-by: Gustavo Zacarias + +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.CVE-2014-8157 jasper-1.900.1/src/libjasper/jpc/jpc_dec.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_dec.c.CVE-2014-8157 2015-01-19 16:59:36.000000000 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_dec.c 2015-01-19 17:07:41.609863268 +0100 +@@ -489,7 +489,7 @@ static int jpc_dec_process_sot(jpc_dec_t + dec->curtileendoff = 0; + } + +- if (JAS_CAST(int, sot->tileno) > dec->numtiles) { ++ if (JAS_CAST(int, sot->tileno) >= dec->numtiles) { + jas_eprintf("invalid tile number in SOT marker segment\n"); + return -1; + } diff --git a/package/jasper/0006-fix-CVE-2014-8158.patch b/package/jasper/0006-fix-CVE-2014-8158.patch new file mode 100644 index 0000000000..8413d2ef93 --- /dev/null +++ b/package/jasper/0006-fix-CVE-2014-8158.patch @@ -0,0 +1,334 @@ +Fix CVE-2014-8158 - unrestricted stack memory use in jpc_qmfb.c +From https://bugzilla.redhat.com/show_bug.cgi?id=1179298 + +Signed-off-by: Gustavo Zacarias + +diff -up jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c.CVE-2014-8158 jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c +--- jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c.CVE-2014-8158 2015-01-19 17:25:28.730195502 +0100 ++++ jasper-1.900.1/src/libjasper/jpc/jpc_qmfb.c 2015-01-19 17:27:20.214663127 +0100 +@@ -306,11 +306,7 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in + { + + int bufsize = JPC_CEILDIVPOW2(numcols, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; +-#else +- jpc_fix_t splitbuf[bufsize]; +-#endif + jpc_fix_t *buf = splitbuf; + register jpc_fix_t *srcptr; + register jpc_fix_t *dstptr; +@@ -318,7 +314,6 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in + register int m; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Get a buffer. */ + if (bufsize > QMFB_SPLITBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { +@@ -326,7 +321,6 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in + abort(); + } + } +-#endif + + if (numcols >= 2) { + hstartcol = (numcols + 1 - parity) >> 1; +@@ -360,12 +354,10 @@ void jpc_qmfb_split_row(jpc_fix_t *a, in + } + } + +-#if !defined(HAVE_VLA) + /* If the split buffer was allocated on the heap, free this memory. */ + if (buf != splitbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -374,11 +366,7 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in + { + + int bufsize = JPC_CEILDIVPOW2(numrows, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE]; +-#else +- jpc_fix_t splitbuf[bufsize]; +-#endif + jpc_fix_t *buf = splitbuf; + register jpc_fix_t *srcptr; + register jpc_fix_t *dstptr; +@@ -386,7 +374,6 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in + register int m; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Get a buffer. */ + if (bufsize > QMFB_SPLITBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { +@@ -394,7 +381,6 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in + abort(); + } + } +-#endif + + if (numrows >= 2) { + hstartcol = (numrows + 1 - parity) >> 1; +@@ -428,12 +414,10 @@ void jpc_qmfb_split_col(jpc_fix_t *a, in + } + } + +-#if !defined(HAVE_VLA) + /* If the split buffer was allocated on the heap, free this memory. */ + if (buf != splitbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -442,11 +426,7 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, + { + + int bufsize = JPC_CEILDIVPOW2(numrows, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE]; +-#else +- jpc_fix_t splitbuf[bufsize * JPC_QMFB_COLGRPSIZE]; +-#endif + jpc_fix_t *buf = splitbuf; + jpc_fix_t *srcptr; + jpc_fix_t *dstptr; +@@ -457,7 +437,6 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, + int m; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Get a buffer. */ + if (bufsize > QMFB_SPLITBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { +@@ -465,7 +444,6 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, + abort(); + } + } +-#endif + + if (numrows >= 2) { + hstartcol = (numrows + 1 - parity) >> 1; +@@ -517,12 +495,10 @@ void jpc_qmfb_split_colgrp(jpc_fix_t *a, + } + } + +-#if !defined(HAVE_VLA) + /* If the split buffer was allocated on the heap, free this memory. */ + if (buf != splitbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -531,11 +507,7 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, + { + + int bufsize = JPC_CEILDIVPOW2(numrows, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t splitbuf[QMFB_SPLITBUFSIZE * JPC_QMFB_COLGRPSIZE]; +-#else +- jpc_fix_t splitbuf[bufsize * numcols]; +-#endif + jpc_fix_t *buf = splitbuf; + jpc_fix_t *srcptr; + jpc_fix_t *dstptr; +@@ -546,7 +518,6 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, + int m; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Get a buffer. */ + if (bufsize > QMFB_SPLITBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { +@@ -554,7 +525,6 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, + abort(); + } + } +-#endif + + if (numrows >= 2) { + hstartcol = (numrows + 1 - parity) >> 1; +@@ -606,12 +576,10 @@ void jpc_qmfb_split_colres(jpc_fix_t *a, + } + } + +-#if !defined(HAVE_VLA) + /* If the split buffer was allocated on the heap, free this memory. */ + if (buf != splitbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -619,18 +587,13 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int + { + + int bufsize = JPC_CEILDIVPOW2(numcols, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t joinbuf[QMFB_JOINBUFSIZE]; +-#else +- jpc_fix_t joinbuf[bufsize]; +-#endif + jpc_fix_t *buf = joinbuf; + register jpc_fix_t *srcptr; + register jpc_fix_t *dstptr; + register int n; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Allocate memory for the join buffer from the heap. */ + if (bufsize > QMFB_JOINBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { +@@ -638,7 +601,6 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int + abort(); + } + } +-#endif + + hstartcol = (numcols + 1 - parity) >> 1; + +@@ -670,12 +632,10 @@ void jpc_qmfb_join_row(jpc_fix_t *a, int + ++srcptr; + } + +-#if !defined(HAVE_VLA) + /* If the join buffer was allocated on the heap, free this memory. */ + if (buf != joinbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -684,18 +644,13 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int + { + + int bufsize = JPC_CEILDIVPOW2(numrows, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t joinbuf[QMFB_JOINBUFSIZE]; +-#else +- jpc_fix_t joinbuf[bufsize]; +-#endif + jpc_fix_t *buf = joinbuf; + register jpc_fix_t *srcptr; + register jpc_fix_t *dstptr; + register int n; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Allocate memory for the join buffer from the heap. */ + if (bufsize > QMFB_JOINBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, sizeof(jpc_fix_t)))) { +@@ -703,7 +658,6 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int + abort(); + } + } +-#endif + + hstartcol = (numrows + 1 - parity) >> 1; + +@@ -735,12 +689,10 @@ void jpc_qmfb_join_col(jpc_fix_t *a, int + ++srcptr; + } + +-#if !defined(HAVE_VLA) + /* If the join buffer was allocated on the heap, free this memory. */ + if (buf != joinbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -749,11 +701,7 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, + { + + int bufsize = JPC_CEILDIVPOW2(numrows, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; +-#else +- jpc_fix_t joinbuf[bufsize * JPC_QMFB_COLGRPSIZE]; +-#endif + jpc_fix_t *buf = joinbuf; + jpc_fix_t *srcptr; + jpc_fix_t *dstptr; +@@ -763,7 +711,6 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, + register int i; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Allocate memory for the join buffer from the heap. */ + if (bufsize > QMFB_JOINBUFSIZE) { + if (!(buf = jas_alloc2(bufsize, JPC_QMFB_COLGRPSIZE * sizeof(jpc_fix_t)))) { +@@ -771,7 +718,6 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, + abort(); + } + } +-#endif + + hstartcol = (numrows + 1 - parity) >> 1; + +@@ -821,12 +767,10 @@ void jpc_qmfb_join_colgrp(jpc_fix_t *a, + srcptr += JPC_QMFB_COLGRPSIZE; + } + +-#if !defined(HAVE_VLA) + /* If the join buffer was allocated on the heap, free this memory. */ + if (buf != joinbuf) { + jas_free(buf); + } +-#endif + + } + +@@ -835,11 +779,7 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, + { + + int bufsize = JPC_CEILDIVPOW2(numrows, 1); +-#if !defined(HAVE_VLA) + jpc_fix_t joinbuf[QMFB_JOINBUFSIZE * JPC_QMFB_COLGRPSIZE]; +-#else +- jpc_fix_t joinbuf[bufsize * numcols]; +-#endif + jpc_fix_t *buf = joinbuf; + jpc_fix_t *srcptr; + jpc_fix_t *dstptr; +@@ -849,7 +789,6 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, + register int i; + int hstartcol; + +-#if !defined(HAVE_VLA) + /* Allocate memory for the join buffer from the heap. */ + if (bufsize > QMFB_JOINBUFSIZE) { + if (!(buf = jas_alloc3(bufsize, numcols, sizeof(jpc_fix_t)))) { +@@ -857,7 +796,6 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, + abort(); + } + } +-#endif + + hstartcol = (numrows + 1 - parity) >> 1; + +@@ -907,12 +845,10 @@ void jpc_qmfb_join_colres(jpc_fix_t *a, + srcptr += numcols; + } + +-#if !defined(HAVE_VLA) + /* If the join buffer was allocated on the heap, free this memory. */ + if (buf != joinbuf) { + jas_free(buf); + } +-#endif + + } + diff --git a/package/jasper/0007-preserve-cflags.patch b/package/jasper/0007-preserve-cflags.patch new file mode 100644 index 0000000000..7e4c4a26f0 --- /dev/null +++ b/package/jasper/0007-preserve-cflags.patch @@ -0,0 +1,27 @@ +From: Max Filippov +Subject: Don't overwrite CFLAGS when configured with --enable-debug + +This drops architecture-specific ABI flags, which may be important. + +Signded-off-by: Max Filippov + +--- jasper-1.900.1/configure.ac.orig 2015-05-18 22:27:53.057512760 +0300 ++++ jasper-1.900.1/configure.ac 2015-05-18 22:28:36.090415422 +0300 +@@ -327,7 +327,7 @@ + AC_DEFINE(DEBUG) + AC_DEFINE(DEBUG_OVERFLOW) + if test "$GCC" = yes; then +- CFLAGS="-g -O0" ++ CFLAGS="$CFLAGS -g -O0" + fi + ;; + no) +@@ -357,7 +357,7 @@ + case "${enableval}" in + yes) + if test "$GCC" = yes; then +- CFLAGS="-g -O0" ++ CFLAGS="$CFLAGS -g -O0" + fi + ;; + no) diff --git a/package/jasper/Config.in b/package/jasper/Config.in new file mode 100644 index 0000000000..087b520f11 --- /dev/null +++ b/package/jasper/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_JASPER + bool "jasper" + select BR2_PACKAGE_JPEG + help + JPEG-2000 decoder + + http://www.ece.uvic.ca/~mdadams/jasper/ diff --git a/package/jasper/jasper.hash b/package/jasper/jasper.hash new file mode 100644 index 0000000000..4d9ed7432a --- /dev/null +++ b/package/jasper/jasper.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 6e9a959bf4f8cb02f77f42d1b9880b8e85d021ac51f43d8787b5438fd2b7a1c5 jasper-1.900.1.tar.bz2 diff --git a/package/jasper/jasper.mk b/package/jasper/jasper.mk new file mode 100644 index 0000000000..db86ae88e1 --- /dev/null +++ b/package/jasper/jasper.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# jasper +# +################################################################################ + +JASPER_VERSION = 1.900.1 +JASPER_SITE = http://sources.openelec.tv/devel +JASPER_SOURCE = jasper-$(JASPER_VERSION).tar.bz2 +JASPER_INSTALL_STAGING = YES +JASPER_DEPENDENCIES = jpeg +JASPER_LICENSE = MIT +JASPER_LICENSE_FILES = LICENSE +# needed to fix rpath issue (http://autobuild.buildroot.net/results/307/307cac65287420252a5bb64715d9a1edd90e72fa/) +JASPER_AUTORECONF = YES + +# Xtensa gcc is unable to generate correct code with -O0 enabled by +# --enable-debug. Allow package build but disable debug. +ifeq ($(BR2_xtensa)$(BR2_ENABLE_DEBUG),yy) +JASPER_CONF_OPTS += --disable-debug +endif + +$(eval $(autotools-package)) diff --git a/package/jhead/0001-use-ldflags.patch b/package/jhead/0001-use-ldflags.patch new file mode 100644 index 0000000000..a1d8185a26 --- /dev/null +++ b/package/jhead/0001-use-ldflags.patch @@ -0,0 +1,16 @@ +Make jhead use LDFLAGS for the final link. + +Signed-off-by: Gustavo Zacarias + +diff -Nura jhead-2.97.orig/makefile jhead-2.97/makefile +--- jhead-2.97.orig/makefile 2013-03-27 09:22:38.759966389 -0300 ++++ jhead-2.97/makefile 2013-03-27 09:25:06.290691745 -0300 +@@ -14,7 +14,7 @@ + ${CC} $(CFLAGS) -c $< -o $@ + + jhead: $(objs) jhead.h +- ${CC} -o jhead $(objs) -lm ++ ${CC} $(LDFLAGS) -o jhead $(objs) -lm + + clean: + rm -f $(objs) jhead diff --git a/package/jhead/Config.in b/package/jhead/Config.in new file mode 100644 index 0000000000..58498cd6e9 --- /dev/null +++ b/package/jhead/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_JHEAD + bool "jhead" + depends on BR2_USE_WCHAR + help + Jhead is a program for manipulating settings and thumbnails + in Exif jpeg headers used by most Digital Cameras. + + http://www.sentex.net/~mwandel/jhead/ + +comment "jhead needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/jhead/jhead.hash b/package/jhead/jhead.hash new file mode 100644 index 0000000000..55af7a7244 --- /dev/null +++ b/package/jhead/jhead.hash @@ -0,0 +1,2 @@ +# Locally calculated from download (no sig, hash) +sha256 88cc01da018e242fe2e05db73f91b6288106858dd70f27506c4989a575d2895e jhead-3.00.tar.gz diff --git a/package/jhead/jhead.mk b/package/jhead/jhead.mk new file mode 100644 index 0000000000..8a99915bac --- /dev/null +++ b/package/jhead/jhead.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# jhead +# +################################################################################ + +JHEAD_VERSION = 3.00 +JHEAD_SITE = http://www.sentex.net/~mwandel/jhead +JHEAD_LICENSE = Public Domain +JHEAD_LICENSE_FILES = readme.txt + +define JHEAD_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define JHEAD_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/jhead $(TARGET_DIR)/usr/bin/jhead +endef + +$(eval $(generic-package)) diff --git a/package/jimtcl/Config.in b/package/jimtcl/Config.in new file mode 100644 index 0000000000..635fef14ec --- /dev/null +++ b/package/jimtcl/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_JIMTCL + bool "jimtcl" + help + Jim Tcl is a small footprint reimplementation of the Tcl + scripting language. The core language engine is compatible + with Tcl 8.5+, while implementing a significant subset of + the Tcl 8.6 command set, plus additional features available + only in Jim Tcl. + + http://jim.tcl.tk diff --git a/package/jimtcl/jimtcl.hash b/package/jimtcl/jimtcl.hash new file mode 100644 index 0000000000..223dbcf57e --- /dev/null +++ b/package/jimtcl/jimtcl.hash @@ -0,0 +1,2 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/j/jimtcl/jimtcl_0.75-1.dsc +sha256 432ad29b98f33efd018d9e1d49a5d07a5efc523c5660983733f7e30d9b2b76cb jimtcl_0.75.orig.tar.xz diff --git a/package/jimtcl/jimtcl.mk b/package/jimtcl/jimtcl.mk new file mode 100644 index 0000000000..fe35223b43 --- /dev/null +++ b/package/jimtcl/jimtcl.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# jimtcl +# +################################################################################ + +JIMTCL_VERSION = 0.75 +JIMTCL_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/j/jimtcl +JIMTCL_SOURCE = jimtcl_$(JIMTCL_VERSION).orig.tar.xz +JIMTCL_INSTALL_STAGING = YES +JIMTCL_LICENSE = BSD-2c +JIMTCL_LICENSE_FILES = LICENSE + +JIMTCL_HEADERS_TO_INSTALL = \ + jim.h \ + jim-eventloop.h \ + jim-signal.h \ + jim-subcmd.h \ + jim-win32compat.h \ + jim-config.h \ + +ifeq ($(BR2_PACKAGE_TCL),) +define JIMTCL_LINK_TCLSH + ln -sf jimsh $(TARGET_DIR)/usr/bin/tclsh +endef +endif + +ifeq ($(BR2_STATIC_LIBS),y) +define JIMTCL_INSTALL_LIB + $(INSTALL) -m 0644 -D $(@D)/libjim.a $(1)/usr/lib/libjim.a +endef +else +JIMTCL_SHARED = --shared +define JIMTCL_INSTALL_LIB + $(INSTALL) -m 0755 -D $(@D)/libjim.so.$(JIMTCL_VERSION) \ + $(1)/usr/lib/libjim.so.$(JIMTCL_VERSION) + ln -sf libjim.so.$(JIMTCL_VERSION) $(1)/usr/lib/libjim.so +endef +endif + +define JIMTCL_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) CCACHE=none \ + ./configure --prefix=/usr \ + $(JIMTCL_SHARED) \ + ) +endef + +# -fPIC is mandatory to build shared libraries on certain architectures +# (e.g. SPARC) and causes no harm or drawbacks on other architectures +define JIMTCL_BUILD_CMDS + SH_CFLAGS="-fPIC" \ + SHOBJ_CFLAGS="-fPIC" \ + $(MAKE) -C $(@D) +endef + +define JIMTCL_INSTALL_STAGING_CMDS + for i in $(JIMTCL_HEADERS_TO_INSTALL); do \ + cp -a $(@D)/$$i $(STAGING_DIR)/usr/include/ || exit 1 ; \ + done; \ + $(call JIMTCL_INSTALL_LIB,$(STAGING_DIR)) +endef + +define JIMTCL_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/jimsh $(TARGET_DIR)/usr/bin/jimsh + $(call JIMTCL_INSTALL_LIB,$(TARGET_DIR)) + $(JIMTCL_LINK_TCLSH) +endef + +$(eval $(generic-package)) diff --git a/package/joe/0001-disable-bessel-functions-on-uclibc.patch b/package/joe/0001-disable-bessel-functions-on-uclibc.patch new file mode 100644 index 0000000000..9f7b72c170 --- /dev/null +++ b/package/joe/0001-disable-bessel-functions-on-uclibc.patch @@ -0,0 +1,50 @@ +[PATCH] uClibc can be (and by default is) configured without bessel functions + +Signed-off-by: Peter Korsgaard +--- + umath.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +Index: joe-3.7/umath.c +=================================================================== +--- joe-3.7.orig/umath.c ++++ joe-3.7/umath.c +@@ -7,6 +7,12 @@ + */ + #include "types.h" + ++/* uClibc can be configured without bessel functions */ ++#include ++#if defined (__UCLIBC__) && !defined(__DO_XSI_MATH__) ++#define NO_BESSEL ++#endif ++ + unsigned char *merr; + + int mode_hex; +@@ -396,10 +402,12 @@ + double m_fabs(double n) { return fabs(n); } + double m_erf(double n) { return erf(n); } + double m_erfc(double n) { return erfc(n); } ++#ifndef NO_BESSEL + double m_j0(double n) { return j0(n); } + double m_j1(double n) { return j1(n); } + double m_y0(double n) { return y0(n); } + double m_y1(double n) { return y1(n); } ++#endif + + double calc(BW *bw, unsigned char *s) + { +@@ -434,10 +442,12 @@ + v = get(USTR "abs"); v->func = m_fabs; + v = get(USTR "erf"); v->func = m_erf; + v = get(USTR "erfc"); v->func = m_erfc; ++#ifndef NO_BESSEL + v = get(USTR "j0"); v->func = m_j0; + v = get(USTR "j1"); v->func = m_j1; + v = get(USTR "y0"); v->func = m_y0; + v = get(USTR "y1"); v->func = m_y1; ++#endif + } + + v = get(USTR "top"); diff --git a/package/joe/Config.in b/package/joe/Config.in new file mode 100644 index 0000000000..eabfae78dc --- /dev/null +++ b/package/joe/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_JOE + bool "joe" + depends on BR2_USE_MMU # fork() + help + Joe's Own Editor + + JOE is an easy-to-use, full featured terminal-based screen editor. + Its behavior is a blending of WordStar and GNU-EMACS (but it does + not use code from either program). It is a great editor for new + users or as an alternative to vi. + + http://joe-editor.sf.net + +config BR2_PACKAGE_JOE_FULL + bool "full install of rc and syntax highlighting files" + depends on BR2_PACKAGE_JOE + default y + help + Install all rc and syntax highlighting files. Without this option + only the joe binary is installed, which contains a default + configuration. diff --git a/package/joe/joe.hash b/package/joe/joe.hash new file mode 100644 index 0000000000..664410d19f --- /dev/null +++ b/package/joe/joe.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 cae456e1ad5a8c1d3c94920a3416c2347277739b260e3494d3bc0f2b9b73106f joe-3.7.tar.gz diff --git a/package/joe/joe.mk b/package/joe/joe.mk new file mode 100644 index 0000000000..e86007e0f7 --- /dev/null +++ b/package/joe/joe.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# joe +# +################################################################################ + +JOE_VERSION = 3.7 +JOE_SITE = http://downloads.sourceforge.net/project/joe-editor/JOE%20sources/joe-$(JOE_VERSION) +JOE_LICENSE = GPLv1+ +JOE_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_NCURSES),y) +JOE_DEPENDENCIES += ncurses +JOE_CONF_OPTS += --enable-curses +else +JOE_CONF_OPTS += --disable-curses +endif + +ifneq ($(BR2_PACKAGE_JOE_FULL),y) +define JOE_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/joe $(TARGET_DIR)/usr/bin/joe +endef +endif + +$(eval $(autotools-package)) diff --git a/package/jpeg-turbo/jpeg-turbo.hash b/package/jpeg-turbo/jpeg-turbo.hash new file mode 100644 index 0000000000..a38a5afae7 --- /dev/null +++ b/package/jpeg-turbo/jpeg-turbo.hash @@ -0,0 +1,5 @@ +# From http://sourceforge.net/projects/libjpeg-turbo/files/1.4.2/ +sha1 2666158ccd5318513f875867bbc4af52f6eb9f0b libjpeg-turbo-1.4.2.tar.gz +md5 86b0d5f7507c2e6c21c00219162c3c44 libjpeg-turbo-1.4.2.tar.gz +# Locally computed +sha256 521bb5d3043e7ac063ce3026d9a59cc2ab2e9636c655a2515af5f4706122233e libjpeg-turbo-1.4.2.tar.gz diff --git a/package/jpeg-turbo/jpeg-turbo.mk b/package/jpeg-turbo/jpeg-turbo.mk new file mode 100644 index 0000000000..047e925909 --- /dev/null +++ b/package/jpeg-turbo/jpeg-turbo.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# jpeg-turbo +# +################################################################################ + +JPEG_TURBO_VERSION = 1.4.2 +JPEG_TURBO_SOURCE = libjpeg-turbo-$(JPEG_TURBO_VERSION).tar.gz +JPEG_TURBO_SITE = http://downloads.sourceforge.net/project/libjpeg-turbo/$(JPEG_TURBO_VERSION) +JPEG_TURBO_LICENSE = jpeg-license (BSD-3c-like) +JPEG_TURBO_LICENSE_FILES = README README-turbo.txt +JPEG_TURBO_INSTALL_STAGING = YES +JPEG_TURBO_CONF_OPTS = --with-jpeg8 + +ifeq ($(BR2_X86_CPU_HAS_MMX)$(BR2_ARM_CPU_HAS_NEON),y) +JPEG_TURBO_CONF_OPTS += --with-simd +# x86 simd support needs nasm +JPEG_TURBO_DEPENDENCIES += $(if $(BR2_X86_CPU_HAS_MMX),host-nasm) +else +JPEG_TURBO_CONF_OPTS += --without-simd +endif + +define JPEG_TURBO_REMOVE_USELESS_TOOLS + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,cjpeg djpeg jpegtran rdjpgcom tjbench wrjpgcom) +endef + +JPEG_TURBO_POST_INSTALL_TARGET_HOOKS += JPEG_TURBO_REMOVE_USELESS_TOOLS + +$(eval $(autotools-package)) diff --git a/package/jpeg/Config.in b/package/jpeg/Config.in new file mode 100644 index 0000000000..f337aeb956 --- /dev/null +++ b/package/jpeg/Config.in @@ -0,0 +1,43 @@ +config BR2_PACKAGE_JPEG + bool "jpeg support" + help + Select the desired JPEG library provider. + +if BR2_PACKAGE_JPEG + +choice + prompt "jpeg variant" + default BR2_PACKAGE_JPEG_TURBO if (BR2_X86_CPU_HAS_MMX || BR2_ARM_CPU_HAS_NEON) + help + Select the older stable version, or the newer developer version + +config BR2_PACKAGE_LIBJPEG + bool "jpeg" + select BR2_PACKAGE_HAS_JPEG + help + The ubiquitous C library for manipulating JPEG images. + + http://www.ijg.org/ + +config BR2_PACKAGE_JPEG_TURBO + bool "jpeg-turbo" + select BR2_PACKAGE_HAS_JPEG + help + Libjpeg-turbo is a derivative of libjpeg that uses SIMD + instructions (MMX, SSE2, NEON) to accelerate baseline JPEG + compression and decompression on x86, x86-64, and ARM + systems. + + http://www.libjpeg-turbo.org + +endchoice + +config BR2_PACKAGE_HAS_JPEG + bool + +config BR2_PACKAGE_PROVIDES_JPEG + string + default "libjpeg" if BR2_PACKAGE_LIBJPEG + default "jpeg-turbo" if BR2_PACKAGE_JPEG_TURBO + +endif diff --git a/package/jpeg/jpeg.mk b/package/jpeg/jpeg.mk new file mode 100644 index 0000000000..2d56be6a7c --- /dev/null +++ b/package/jpeg/jpeg.mk @@ -0,0 +1,7 @@ +################################################################################ +# +# jpeg +# +################################################################################ + +$(eval $(virtual-package)) diff --git a/package/jq/Config.in b/package/jq/Config.in new file mode 100644 index 0000000000..9329b2fb35 --- /dev/null +++ b/package/jq/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_JQ + bool "jq" + help + jq is like sed for JSON data - you can use it to slice and filter + and map and transform structured data with the same ease that sed, + awk, grep and friends let you play with text. + + http://stedolan.github.io/jq/ diff --git a/package/jq/Config.in.host b/package/jq/Config.in.host new file mode 100644 index 0000000000..a0aabc0b30 --- /dev/null +++ b/package/jq/Config.in.host @@ -0,0 +1,11 @@ +config BR2_PACKAGE_HOST_JQ + bool "host jq" + help + jq is like sed for JSON data - you can use it to slice and filter + and map and transform structured data with the same ease that sed, + awk, grep and friends let you play with text. + + As a host tool, jq can be useful to create/edit/merge/check JSON + files from a post-build script. + + http://stedolan.github.io/jq/ diff --git a/package/jq/jq.hash b/package/jq/jq.hash new file mode 100644 index 0000000000..2cd640563a --- /dev/null +++ b/package/jq/jq.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c4d2bfec6436341113419debf479d833692cc5cdab7eb0326b5a4d4fbe9f493c jq-1.5.tar.gz diff --git a/package/jq/jq.mk b/package/jq/jq.mk new file mode 100644 index 0000000000..9a094ba9a0 --- /dev/null +++ b/package/jq/jq.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# jq +# +################################################################################ + +JQ_VERSION = 1.5 +JQ_SITE = https://github.com/stedolan/jq/releases/download/jq-$(JQ_VERSION) +JQ_LICENSE = MIT (code), CC-BY-3.0 (documentation) +JQ_LICENSE_FILES = COPYING + +# uses c99 specific features +JQ_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=c99" +HOST_JQ_CONF_ENV += CFLAGS="$(HOST_CFLAGS) -std=c99" + +# jq explicitly enables maintainer mode, which we don't need/want +JQ_CONF_OPTS += --disable-maintainer-mode +HOST_JQ_CONF_OPTS += --disable-maintainer-mode + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/jquery-datetimepicker/Config.in b/package/jquery-datetimepicker/Config.in new file mode 100644 index 0000000000..9da37188ae --- /dev/null +++ b/package/jquery-datetimepicker/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_JQUERY_DATETIMEPICKER + bool "jquery-datetimepicker" + help + Use this plugin to unobtrusively add a datetimepicker, + datepicker or timepicker dropdown to your forms. + + http://xdsoft.net/jqplugins/datetimepicker diff --git a/package/jquery-datetimepicker/jquery-datetimepicker.mk b/package/jquery-datetimepicker/jquery-datetimepicker.mk new file mode 100644 index 0000000000..e4d47997f1 --- /dev/null +++ b/package/jquery-datetimepicker/jquery-datetimepicker.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# jquery-datetimepicker +# +################################################################################ + +JQUERY_DATETIMEPICKER_VERSION = 2.4.5 +JQUERY_DATETIMEPICKER_SITE = $(call github,xdan,datetimepicker,$(JQUERY_DATETIMEPICKER_VERSION)) +JQUERY_DATETIMEPICKER_LICENSE = MIT +JQUERY_DATETIMEPICKER_LICENSE_FILES = MIT-LICENSE.txt + +define JQUERY_DATETIMEPICKER_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/jquery.datetimepicker.css \ + $(TARGET_DIR)/var/www/jquery-plugins/datetimepicker/jquery.datetimepicker.css + $(INSTALL) -m 0644 -D $(@D)/jquery.datetimepicker.js \ + $(TARGET_DIR)/var/www/jquery-plugins/datetimepicker/jquery.datetimepicker.js +endef + +$(eval $(generic-package)) diff --git a/package/jquery-keyboard/Config.in b/package/jquery-keyboard/Config.in new file mode 100644 index 0000000000..117c4a5665 --- /dev/null +++ b/package/jquery-keyboard/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_JQUERY_KEYBOARD + bool "jquery-keyboard" + select BR2_PACKAGE_JQUERY_UI + help + Virtual Keyboard using jQuery UI + + https://github.com/Mottie/Keyboard diff --git a/package/jquery-keyboard/jquery-keyboard.mk b/package/jquery-keyboard/jquery-keyboard.mk new file mode 100644 index 0000000000..a1320dc97a --- /dev/null +++ b/package/jquery-keyboard/jquery-keyboard.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# jquery-keyboard +# +################################################################################ + +JQUERY_KEYBOARD_VERSION = v1.18.12 +JQUERY_KEYBOARD_SITE = $(call github,Mottie,Keyboard,$(JQUERY_KEYBOARD_VERSION)) +JQUERY_KEYBOARD_LICENSE = MIT WTFPL +JQUERY_KEYBOARD_LICENSE_FILES = README.markdown + +define JQUERY_KEYBOARD_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/css/keyboard.css \ + $(TARGET_DIR)/var/www/css/keyboard.css + $(INSTALL) -m 0644 $(@D)/js/jquery.keyboard*.js \ + $(TARGET_DIR)/var/www + $(INSTALL) -m 0644 -D $(@D)/js/jquery.mousewheel.js \ + $(TARGET_DIR)/var/www/jquery.mousewheel.js + $(INSTALL) -m 0755 -d $(TARGET_DIR)/var/www/layouts + $(INSTALL) -m 0644 $(@D)/layouts/*.js \ + $(TARGET_DIR)/var/www/layouts +endef + +$(eval $(generic-package)) diff --git a/package/jquery-mobile/Config.in b/package/jquery-mobile/Config.in new file mode 100644 index 0000000000..fa31a3630c --- /dev/null +++ b/package/jquery-mobile/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_JQUERY_MOBILE + bool "jquery-mobile" + help + jQuery-Mobile is a unified, HTML5-based user interface + system for all popular mobile device platforms, built on the + rock-solid jQuery and jQuery UI foundation. Its lightweight + code is built with progressive enhancement, and has a + flexible, easily themeable design. + + http://jquerymobile.com + +if BR2_PACKAGE_JQUERY_MOBILE + +config BR2_PACKAGE_JQUERY_MOBILE_FULL + bool "jquery-mobile development files" + help + Installs the development versions. + +config BR2_PACKAGE_JQUERY_MOBILE_DEMOS + bool "jquery-mobile demo files" + help + Installs the demo files. + The main demo page is http://hostname/demos/index.html + +endif diff --git a/package/jquery-mobile/jquery-mobile.mk b/package/jquery-mobile/jquery-mobile.mk new file mode 100644 index 0000000000..1067952904 --- /dev/null +++ b/package/jquery-mobile/jquery-mobile.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# jquery-mobile +# +################################################################################ + +JQUERY_MOBILE_VERSION = 1.4.3 +JQUERY_MOBILE_SITE = http://jquerymobile.com/resources/download +JQUERY_MOBILE_SOURCE = jquery.mobile-$(JQUERY_MOBILE_VERSION).zip +JQUERY_MOBILE_LICENSE = MIT + +define JQUERY_MOBILE_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(DL_DIR)/$(JQUERY_MOBILE_SOURCE) +endef + +JQUERY_MOBILE_INSTALLED_FILES = \ + jquery.mobile.structure-$(JQUERY_MOBILE_VERSION).min.css \ + jquery.mobile.theme-$(JQUERY_MOBILE_VERSION).min.css \ + jquery.mobile-$(JQUERY_MOBILE_VERSION).min.css \ + jquery.mobile-$(JQUERY_MOBILE_VERSION).min.map \ + jquery.mobile-$(JQUERY_MOBILE_VERSION).min.js + +ifeq ($(BR2_PACKAGE_JQUERY_MOBILE_FULL),y) +JQUERY_MOBILE_INSTALLED_FILES += \ + jquery.mobile.structure-$(JQUERY_MOBILE_VERSION).css \ + jquery.mobile.theme-$(JQUERY_MOBILE_VERSION).css \ + jquery.mobile-$(JQUERY_MOBILE_VERSION).css \ + jquery.mobile-$(JQUERY_MOBILE_VERSION).js +endif + +ifeq ($(BR2_PACKAGE_JQUERY_MOBILE_DEMOS),y) +define JQUERY_MOBILE_INSTALL_DEMOS + mkdir -p $(TARGET_DIR)/var/www/demos + cp -r $(@D)/demos/* $(TARGET_DIR)/var/www/demos +endef +endif + +define JQUERY_MOBILE_INSTALL_TARGET_CMDS + for f in $(JQUERY_MOBILE_INSTALLED_FILES) ; do \ + $(INSTALL) -m 0644 -D $(@D)/$$f $(TARGET_DIR)/var/www/$$f || break ; \ + done + mkdir -p $(TARGET_DIR)/var/www/images + cp -r $(@D)/images/* $(TARGET_DIR)/var/www/images + $(JQUERY_MOBILE_INSTALL_DEMOS) +endef + +$(eval $(generic-package)) diff --git a/package/jquery-sidebar/Config.in b/package/jquery-sidebar/Config.in new file mode 100644 index 0000000000..324a20c200 --- /dev/null +++ b/package/jquery-sidebar/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_JQUERY_SIDEBAR + bool "jquery-sidebar" + help + A stupid simple sidebar jQuery plugin. + + http://jillix.github.io/jQuery-sidebar/ diff --git a/package/jquery-sidebar/jquery-sidebar.hash b/package/jquery-sidebar/jquery-sidebar.hash new file mode 100644 index 0000000000..60e44d4187 --- /dev/null +++ b/package/jquery-sidebar/jquery-sidebar.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 c96e46439a87555f2200442f597cce64f21f81f94d7601ddfc3b837913ddb42f jquery-sidebar-3.3.2.tar.gz diff --git a/package/jquery-sidebar/jquery-sidebar.mk b/package/jquery-sidebar/jquery-sidebar.mk new file mode 100644 index 0000000000..7af3667b62 --- /dev/null +++ b/package/jquery-sidebar/jquery-sidebar.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# jquery-sidebar +# +################################################################################ + +JQUERY_SIDEBAR_VERSION = 3.3.2 +JQUERY_SIDEBAR_SITE = $(call github,jillix,jQuery-sidebar,$(JQUERY_SIDEBAR_VERSION)) +JQUERY_SIDEBAR_LICENSE = MIT +JQUERY_SIDEBAR_LICENSE_FILES = LICENSE + +define JQUERY_SIDEBAR_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/src/jquery.sidebar.min.js \ + $(TARGET_DIR)/var/www/jquery-plugins/sidebar/jquery.sidebar.min.js +endef + +$(eval $(generic-package)) diff --git a/package/jquery-sparkline/Config.in b/package/jquery-sparkline/Config.in new file mode 100644 index 0000000000..1741a2941a --- /dev/null +++ b/package/jquery-sparkline/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_JQUERY_SPARKLINE + bool "jquery-sparkline" + help + This jQuery plugin generates sparklines (small inline + charts) directly in the browser using data supplied either + inline in the HTML, or via javascript. + + The plugin is compatible with most modern browsers and has + been tested with Firefox 2+, Safari 3+, Opera 9, Google + Chrome and Internet Explorer 6, 7 & 8. + + http://www.omnipotent.net/jquery.sparkline/ diff --git a/package/jquery-sparkline/jquery-sparkline.mk b/package/jquery-sparkline/jquery-sparkline.mk new file mode 100644 index 0000000000..4a7b94ea35 --- /dev/null +++ b/package/jquery-sparkline/jquery-sparkline.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# jquery-sparkline +# +################################################################################ + +JQUERY_SPARKLINE_VERSION = 2.1.2 +JQUERY_SPARKLINE_SITE = http://www.omnipotent.net/jquery.sparkline/$(JQUERY_SPARKLINE_VERSION) +JQUERY_SPARKLINE_SOURCE = jquery.sparkline.min.js +JQUERY_SPARKLINE_LICENSE = BSD-3c + +define JQUERY_SPARKLINE_EXTRACT_CMDS + cp $(DL_DIR)/$(JQUERY_SPARKLINE_SOURCE) $(@D) +endef + +define JQUERY_SPARKLINE_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/$(JQUERY_SPARKLINE_SOURCE) \ + $(TARGET_DIR)/var/www/jquery.sparkline.js +endef + +$(eval $(generic-package)) diff --git a/package/jquery-ui-themes/Config.in b/package/jquery-ui-themes/Config.in new file mode 100644 index 0000000000..a7ae11eca6 --- /dev/null +++ b/package/jquery-ui-themes/Config.in @@ -0,0 +1,117 @@ +config BR2_PACKAGE_JQUERY_UI_THEMES + bool "jquery-ui-themes" + depends on BR2_PACKAGE_JQUERY_UI + help + Themes for jQuery UI. + + http://jqueryui.com/ + +if BR2_PACKAGE_JQUERY_UI_THEMES + +choice + prompt "theme to install" + help + Specify the jQuery UI theme to install. + + config BR2_PACKAGE_JQUERY_UI_THEME_BLACK_TIE + bool "black-tie" + + config BR2_PACKAGE_JQUERY_UI_THEME_BLITZER + bool "blitzer" + + config BR2_PACKAGE_JQUERY_UI_THEME_CUPERTINO + bool "cupertino" + + config BR2_PACKAGE_JQUERY_UI_THEME_DARK_HIVE + bool "dark-hive" + + config BR2_PACKAGE_JQUERY_UI_THEME_DOT_LUV + bool "dot-luv" + + config BR2_PACKAGE_JQUERY_UI_THEME_EGGPLANT + bool "eggplant" + + config BR2_PACKAGE_JQUERY_UI_THEME_EXCITE_BIKE + bool "excite-bike" + + config BR2_PACKAGE_JQUERY_UI_THEME_FLICK + bool "flick" + + config BR2_PACKAGE_JQUERY_UI_THEME_HOT_SNEAKS + bool "hot-sneaks" + + config BR2_PACKAGE_JQUERY_UI_THEME_HUMANITY + bool "humanity" + + config BR2_PACKAGE_JQUERY_UI_THEME_LE_FROG + bool "le-frog" + + config BR2_PACKAGE_JQUERY_UI_THEME_MINT_CHOC + bool "mint-choc" + + config BR2_PACKAGE_JQUERY_UI_THEME_OVERCAST + bool "overcast" + + config BR2_PACKAGE_JQUERY_UI_THEME_PEPPER_GRINDER + bool "pepper-grinder" + + config BR2_PACKAGE_JQUERY_UI_THEME_REDMOND + bool "redmond" + + config BR2_PACKAGE_JQUERY_UI_THEME_SMOOTHNESS + bool "smoothness" + + config BR2_PACKAGE_JQUERY_UI_THEME_SOUTH_STREET + bool "south-street" + + config BR2_PACKAGE_JQUERY_UI_THEME_START + bool "start" + + config BR2_PACKAGE_JQUERY_UI_THEME_SUNNY + bool "sunny" + + config BR2_PACKAGE_JQUERY_UI_THEME_SWANKY_PURSE + bool "swanky-purse" + + config BR2_PACKAGE_JQUERY_UI_THEME_TRONTASTIC + bool "trontastic" + + config BR2_PACKAGE_JQUERY_UI_THEME_UI_DARKNESS + bool "ui-darkness" + + config BR2_PACKAGE_JQUERY_UI_THEME_UI_LIGHTNESS + bool "ui-lightness" + + config BR2_PACKAGE_JQUERY_UI_THEME_VADER + bool "vader" + +endchoice + +config BR2_PACKAGE_JQUERY_UI_THEMES_THEME + string + default "black-tie" if BR2_PACKAGE_JQUERY_UI_THEME_BLACK_TIE + default "blitzer" if BR2_PACKAGE_JQUERY_UI_THEME_BLITZER + default "cupertino" if BR2_PACKAGE_JQUERY_UI_THEME_CUPERTINO + default "dark-hive" if BR2_PACKAGE_JQUERY_UI_THEME_DARK_HIVE + default "dot-luv" if BR2_PACKAGE_JQUERY_UI_THEME_DOT_LUV + default "eggplant" if BR2_PACKAGE_JQUERY_UI_THEME_EGGPLANT + default "excite-bike" if BR2_PACKAGE_JQUERY_UI_THEME_EXCITE_BIKE + default "flick" if BR2_PACKAGE_JQUERY_UI_THEME_FLICK + default "hot-sneaks" if BR2_PACKAGE_JQUERY_UI_THEME_HOT_SNEAKS + default "humanity" if BR2_PACKAGE_JQUERY_UI_THEME_HUMANITY + default "le-frog" if BR2_PACKAGE_JQUERY_UI_THEME_LE_FROG + default "mint-choc" if BR2_PACKAGE_JQUERY_UI_THEME_MINT_CHOC + default "overcast" if BR2_PACKAGE_JQUERY_UI_THEME_OVERCAST + default "pepper-grinder" if BR2_PACKAGE_JQUERY_UI_THEME_PEPPER_GRINDER + default "redmond" if BR2_PACKAGE_JQUERY_UI_THEME_REDMOND + default "smoothness" if BR2_PACKAGE_JQUERY_UI_THEME_SMOOTHNESS + default "south-street" if BR2_PACKAGE_JQUERY_UI_THEME_SOUTH_STREET + default "start" if BR2_PACKAGE_JQUERY_UI_THEME_START + default "sunny" if BR2_PACKAGE_JQUERY_UI_THEME_SUNNY + default "swanky-purse" if BR2_PACKAGE_JQUERY_UI_THEME_SWANKY_PURSE + default "trontastic" if BR2_PACKAGE_JQUERY_UI_THEME_TRONTASTIC + default "ui-darkness" if BR2_PACKAGE_JQUERY_UI_THEME_UI_DARKNESS + default "ui-lightness" if BR2_PACKAGE_JQUERY_UI_THEME_UI_LIGHTNESS + default "vader" if BR2_PACKAGE_JQUERY_UI_THEME_UI_VADER + +endif diff --git a/package/jquery-ui-themes/jquery-ui-themes.mk b/package/jquery-ui-themes/jquery-ui-themes.mk new file mode 100644 index 0000000000..cd3dab6d87 --- /dev/null +++ b/package/jquery-ui-themes/jquery-ui-themes.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# jquery-ui-themes +# +################################################################################ + +JQUERY_UI_THEMES_VERSION = 1.10.4 +JQUERY_UI_THEMES_SITE = http://jqueryui.com/resources/download +JQUERY_UI_THEMES_SOURCE = jquery-ui-themes-$(JQUERY_UI_THEMES_VERSION).zip +JQUERY_UI_THEMES_LICENSE = MIT +JQUERY_UI_THEMES_LICENSE_FILES = MIT-LICENSE.txt +JQUERY_UI_THEMES_DEPENDENCIES = jquery-ui + +define JQUERY_UI_THEMES_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(DL_DIR)/$(JQUERY_UI_THEMES_SOURCE) + mv $(@D)/jquery-ui-themes-$(JQUERY_UI_THEMES_VERSION)/* $(@D) + $(RM) -r $(@D)/jquery-ui-themes-$(JQUERY_UI_THEMES_VERSION) +endef + +define JQUERY_UI_THEMES_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D \ + $(@D)/themes/$(call qstrip,$(BR2_PACKAGE_JQUERY_UI_THEMES_THEME))/jquery-ui.css \ + $(TARGET_DIR)/var/www/jquery-ui.css + $(INSTALL) -d $(TARGET_DIR)/var/www/images + cp -a $(@D)/themes/$(call qstrip,$(BR2_PACKAGE_JQUERY_UI_THEMES_THEME))/images/*.png \ + $(TARGET_DIR)/var/www/images + chmod 0644 $(TARGET_DIR)/var/www/images/*.png +endef + +$(eval $(generic-package)) diff --git a/package/jquery-ui/Config.in b/package/jquery-ui/Config.in new file mode 100644 index 0000000000..a7c0a6df5a --- /dev/null +++ b/package/jquery-ui/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_JQUERY_UI + bool "jquery-ui" + help + jQuery UI provides abstractions for low-level interaction and + animation, advanced effects and high-level, themeable widgets, + built on top of the jQuery JavaScript Library, that you can use + to build highly interactive web applications. + + http://jqueryui.com/ diff --git a/package/jquery-ui/jquery-ui.mk b/package/jquery-ui/jquery-ui.mk new file mode 100644 index 0000000000..d829d6241b --- /dev/null +++ b/package/jquery-ui/jquery-ui.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# jquery-ui +# +################################################################################ + +JQUERY_UI_VERSION = 1.10.4 +# Use buildroot mirror since upstream switched the zipfile and directory +# structure without bumping/renaming. +# Remember to switch back to jqueryui.com when bumping! +JQUERY_UI_SITE = http://sources.buildroot.net +JQUERY_UI_SOURCE = jquery-ui-$(JQUERY_UI_VERSION).zip +JQUERY_UI_LICENSE = MIT +JQUERY_UI_LICENSE_FILES = MIT-LICENSE.txt + +define JQUERY_UI_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(DL_DIR)/$(JQUERY_UI_SOURCE) + mv $(@D)/jquery-ui-$(JQUERY_UI_VERSION)/* $(@D) + $(RM) -r $(@D)/jquery-ui-$(JQUERY_UI_VERSION) +endef + +define JQUERY_UI_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/ui/minified/jquery-ui.min.js \ + $(TARGET_DIR)/var/www/jquery-ui.js + $(INSTALL) -m 0644 -D $(@D)/ui/minified/i18n/jquery-ui-i18n.min.js \ + $(TARGET_DIR)/var/www/jquery-ui-i18n.js + $(INSTALL) -m 0644 -D $(@D)/themes/base/minified/jquery-ui.min.css \ + $(TARGET_DIR)/var/www/jquery-ui.css + $(INSTALL) -d $(TARGET_DIR)/var/www/images + $(INSTALL) -m 0644 -t $(TARGET_DIR)/var/www/images \ + $(@D)/themes/base/minified/images/*.png +endef + +$(eval $(generic-package)) diff --git a/package/jquery-validation/Config.in b/package/jquery-validation/Config.in new file mode 100644 index 0000000000..39e898e853 --- /dev/null +++ b/package/jquery-validation/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_JQUERY_VALIDATION + bool "jquery-validation" + help + The jQuery Validation Plugin provides drop-in validation for + your existing forms, while making all kinds of + customizations to fit your application really easy. + + http://jqueryvalidation.org/ diff --git a/package/jquery-validation/jquery-validation.hash b/package/jquery-validation/jquery-validation.hash new file mode 100644 index 0000000000..61c16cf093 --- /dev/null +++ b/package/jquery-validation/jquery-validation.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 14efe6f1784ef6e97116b15c77b04b7e8f47ec07b1479bcd6fa0b081faa19440 jquery-validation-1.14.0.zip diff --git a/package/jquery-validation/jquery-validation.mk b/package/jquery-validation/jquery-validation.mk new file mode 100644 index 0000000000..10d2a92afc --- /dev/null +++ b/package/jquery-validation/jquery-validation.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# jquery-validation +# +################################################################################ + +JQUERY_VALIDATION_VERSION = 1.14.0 +JQUERY_VALIDATION_SITE = http://jqueryvalidation.org/files +JQUERY_VALIDATION_SOURCE = jquery-validation-$(JQUERY_VALIDATION_VERSION).zip +JQUERY_VALIDATION_LICENSE = MIT +JQUERY_VALIDATION_LICENSE_FILES = README.md + +define JQUERY_VALIDATION_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(DL_DIR)/$(JQUERY_VALIDATION_SOURCE) +endef + +define JQUERY_VALIDATION_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/dist/jquery.validate.min.js \ + $(TARGET_DIR)/var/www/jquery.validate.js +endef + +$(eval $(generic-package)) diff --git a/package/jquery/Config.in b/package/jquery/Config.in new file mode 100644 index 0000000000..92f5604270 --- /dev/null +++ b/package/jquery/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_JQUERY + bool "jQuery" + help + jQuery is a fast and concise JavaScript Library that + simplifies HTML document traversing, event handling, + animating, and Ajax interactions for rapid web development. + + http://jquery.com diff --git a/package/jquery/jquery.hash b/package/jquery/jquery.hash new file mode 100644 index 0000000000..ec43e7cd7a --- /dev/null +++ b/package/jquery/jquery.hash @@ -0,0 +1,2 @@ +# Locally computed hashes, not provided by upstream +sha256 2ecd295d295bec062cedebe177e54b9d6b19fc0a841dc5c178c654c9ccff09c0 jquery-1.11.2.min.js diff --git a/package/jquery/jquery.mk b/package/jquery/jquery.mk new file mode 100644 index 0000000000..363ee09633 --- /dev/null +++ b/package/jquery/jquery.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# jquery +# +################################################################################ + +JQUERY_VERSION = 1.11.2 +JQUERY_SITE = http://code.jquery.com +JQUERY_SOURCE = jquery-$(JQUERY_VERSION).min.js +JQUERY_LICENSE = MIT + +define JQUERY_EXTRACT_CMDS + cp $(DL_DIR)/$(JQUERY_SOURCE) $(@D) +endef + +define JQUERY_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/$(JQUERY_SOURCE) \ + $(TARGET_DIR)/var/www/jquery.js +endef + +$(eval $(generic-package)) diff --git a/package/jsmin/Config.in b/package/jsmin/Config.in new file mode 100644 index 0000000000..d0948b8914 --- /dev/null +++ b/package/jsmin/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_JSMIN + bool "jsmin" + help + JSMin is a filter which removes comments and unnecessary + whitespace from JavaScript files. It typically reduces + filesize by half, resulting in faster downloads. It also + encourages a more expressive programming style because it + eliminates the download cost of clean, literate + self-documentation. + + http://www.crockford.com/javascript/jsmin.html diff --git a/package/jsmin/jsmin.mk b/package/jsmin/jsmin.mk new file mode 100644 index 0000000000..a66ba71582 --- /dev/null +++ b/package/jsmin/jsmin.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# jsmin +# +################################################################################ + +JSMIN_VERSION = 1bf6ce5f74a9f8752ac7f5d115b8d7ccb31cfe1b +JSMIN_SITE = $(call github,douglascrockford,JSMin,$(JSMIN_VERSION)) +JSMIN_LICENSE = MIT +JSMIN_LICENSE_FILES = jsmin.c + +define JSMIN_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) jsmin +endef + +define JSMIN_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/jsmin $(TARGET_DIR)/usr/bin/jsmin +endef + +define HOST_JSMIN_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) jsmin +endef + +define HOST_JSMIN_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/jsmin $(HOST_DIR)/usr/bin/jsmin +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/json-c/0001-don-t-threat-warnings-as-errors.patch b/package/json-c/0001-don-t-threat-warnings-as-errors.patch new file mode 100644 index 0000000000..804fb2cd33 --- /dev/null +++ b/package/json-c/0001-don-t-threat-warnings-as-errors.patch @@ -0,0 +1,21 @@ +From 2b4a43a94fb988e344f2d7edc74d6a4a5f64571d Mon Sep 17 00:00:00 2001 +From: Sagaert Johan +Date: Wed, 15 Apr 2015 00:40:46 +0200 +Subject: [PATCH] don't threat warnings as errors + +Signed-off-by: Sagaert Johan +--- + Makefile.am.inc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am.inc b/Makefile.am.inc +index fec591b..5eb461e 100644 +--- a/Makefile.am.inc ++++ b/Makefile.am.inc +@@ -1,2 +1,2 @@ +-AM_CFLAGS = -Wall -Werror -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT ++AM_CFLAGS = -Wall -Wno-error=deprecated-declarations -Wextra -Wwrite-strings -std=gnu99 -D_GNU_SOURCE -D_REENTRANT + +-- +2.1.0 + diff --git a/package/json-c/0002-Link-against-libm-when-needed.patch b/package/json-c/0002-Link-against-libm-when-needed.patch new file mode 100644 index 0000000000..305b782f76 --- /dev/null +++ b/package/json-c/0002-Link-against-libm-when-needed.patch @@ -0,0 +1,53 @@ +From ccb15ee3d7e8c925cb3af9ea805feea2863c4f81 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Fri, 1 May 2015 12:52:18 +0200 +Subject: [PATCH] Link against libm when needed + +In certain C libraries (e.g uClibc), isnan() and related functions are +implemented in libm, so json-c needs to link against it. This commit +therefore adds an AC_TRY_LINK() test to check whether a program +calling isnan() can be properly linked with no special flags. If not, +we assume linking against libm is needed. + +The json-c.pc.in file is also adjusted so that in the case of static +linking against json-c, -lm is also used. + +Submitted upstream: https://github.com/json-c/json-c/pull/182 + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 4 ++++ + json-c.pc.in | 3 ++- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 99660a4..2a14ccf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -50,6 +50,10 @@ AC_CHECK_DECLS([isinf], [], [], [[#include ]]) + AC_CHECK_DECLS([_isnan], [], [], [[#include ]]) + AC_CHECK_DECLS([_finite], [], [], [[#include ]]) + ++if test "$ac_cv_have_decl_isnan" = "yes" ; then ++ AC_TRY_LINK([#include ], [float f = 0.0; return isnan(f)], [], [LIBS="$LIBS -lm"]) ++fi ++ + #check if .section.gnu.warning accepts long strings (for __warn_references) + AC_LANG_PUSH([C]) + +diff --git a/json-c.pc.in b/json-c.pc.in +index 037739d..05bfbc8 100644 +--- a/json-c.pc.in ++++ b/json-c.pc.in +@@ -6,6 +6,7 @@ includedir=@includedir@ + Name: json-c + Description: JSON implementation in C + Version: @VERSION@ +-Requires: ++Requires: ++Libs.private: @LIBS@ + Libs: -L${libdir} -ljson-c + Cflags: -I${includedir}/json-c +-- +2.1.0 + diff --git a/package/json-c/Config.in b/package/json-c/Config.in new file mode 100644 index 0000000000..4df44a96ab --- /dev/null +++ b/package/json-c/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_JSON_C + bool "json-c" + # uses __sync_val_compare_and_swap_4 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + help + JSON-C - A JSON implementation in C + + JSON-C implements a reference counting object model that + allows you to easily construct JSON objects in C, output + them as JSON formatted strings and parse JSON formatted + strings back into the C representation of JSON objects. + + https://github.com/json-c/json-c/ diff --git a/package/json-c/json-c.mk b/package/json-c/json-c.mk new file mode 100644 index 0000000000..35243f13a1 --- /dev/null +++ b/package/json-c/json-c.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# json-c +# +################################################################################ + +JSON_C_VERSION = json-c-0.12-20140410 +JSON_C_SITE = $(call github,json-c,json-c,$(JSON_C_VERSION)) +JSON_C_INSTALL_STAGING = YES +JSON_C_MAKE = $(MAKE1) +JSON_C_CONF_OPTS = --disable-oldname-compat +# AUTORECONF is needed because of Makefile.am.inc patch. +JSON_C_AUTORECONF = YES +JSON_C_LICENSE = MIT +JSON_C_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/json-glib/Config.in b/package/json-glib/Config.in new file mode 100644 index 0000000000..ea15295b38 --- /dev/null +++ b/package/json-glib/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_JSON_GLIB + bool "json-glib" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + help + JSON-GLib is a library providing serialization and + deserialization support for the JavaScript Object Notation + (JSON) format described by RFC 4627. + + https://live.gnome.org/JsonGlib/ + +comment "json-glib needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/json-glib/json-glib.hash b/package/json-glib/json-glib.hash new file mode 100644 index 0000000000..18e1aa014d --- /dev/null +++ b/package/json-glib/json-glib.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/json-glib/1.2/json-glib-1.2.0.sha256sum +sha256 99d6dfbe49c08fd7529f1fe8dcb1893b810a1bb222f1e7b65f41507658b8a7d3 json-glib-1.2.0.tar.xz diff --git a/package/json-glib/json-glib.mk b/package/json-glib/json-glib.mk new file mode 100644 index 0000000000..f7c52c018a --- /dev/null +++ b/package/json-glib/json-glib.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# json-glib +# +################################################################################ + +JSON_GLIB_VERSION_MAJOR = 1.2 +JSON_GLIB_VERSION = $(JSON_GLIB_VERSION_MAJOR).0 +JSON_GLIB_SITE = http://ftp.gnome.org/pub/GNOME/sources/json-glib/$(JSON_GLIB_VERSION_MAJOR) +JSON_GLIB_SOURCE = json-glib-$(JSON_GLIB_VERSION).tar.xz +JSON_GLIB_LICENSE = LGPLv2.1+ +JSON_GLIB_LICENSE_FILES = COPYING +JSON_GLIB_INSTALL_STAGING = YES + +JSON_GLIB_DEPENDENCIES = \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + host-pkgconf \ + libglib2 + +$(eval $(autotools-package)) diff --git a/package/json-javascript/Config.in b/package/json-javascript/Config.in new file mode 100644 index 0000000000..501c54f3d1 --- /dev/null +++ b/package/json-javascript/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_JSON_JAVASCRIPT + bool "json-javascript" + help + JSON in JavaScript + + https://github.com/douglascrockford/JSON-js/ diff --git a/package/json-javascript/json-javascript.mk b/package/json-javascript/json-javascript.mk new file mode 100644 index 0000000000..c15b5319b3 --- /dev/null +++ b/package/json-javascript/json-javascript.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# json-javascript +# +################################################################################ + +JSON_JAVASCRIPT_VERSION = 3d7767b6b1f3da363c625ff54e63bbf20e9e83ac +JSON_JAVASCRIPT_SITE = $(call github,douglascrockford,JSON-js,$(JSON_JAVASCRIPT_VERSION)) +JSON_JAVASCRIPT_LICENSE = Public Domain +JSON_JAVASCRIPT_LICENSE_FILES = json2.js + +define JSON_JAVASCRIPT_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/json2.js $(TARGET_DIR)/var/www/json2.js +endef + +$(eval $(generic-package)) diff --git a/package/jsoncpp/0001-CMakeLists.txt-Treat-conversion-warning-as-error-onl.patch b/package/jsoncpp/0001-CMakeLists.txt-Treat-conversion-warning-as-error-onl.patch new file mode 100644 index 0000000000..3e009b93a6 --- /dev/null +++ b/package/jsoncpp/0001-CMakeLists.txt-Treat-conversion-warning-as-error-onl.patch @@ -0,0 +1,37 @@ +From 98a7f56ed41071240274063b2d4e39e4e1c9589f Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Mon, 25 Apr 2016 19:41:28 +0200 +Subject: [PATCH 1/1] CMakeLists.txt: Treat conversion warning as error only + with JSONCPP_WITH_WARNING_AS_ERROR=On + +Fixes errors when building with buildroot: +http://autobuild.buildroot.net/?reason=jsoncpp-1.7.2 + +Signed-off-by: Bernd Kuhls +(Patch sent upstream: + https://github.com/open-source-parsers/jsoncpp/pull/466) +--- + CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7787850..637fc34 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,11 +107,11 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Werror=conversion -Werror=sign-compare") + elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + # using GCC +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Wextra -Werror=conversion") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wconversion -Wshadow -Wextra") + # not yet ready for -Wsign-conversion + + if (JSONCPP_WITH_STRICT_ISO AND NOT JSONCPP_WITH_WARNING_AS_ERROR) +- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic") ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=conversion -pedantic") + endif () + endif() + +-- +2.8.0.rc3 + diff --git a/package/jsoncpp/Config.in b/package/jsoncpp/Config.in new file mode 100644 index 0000000000..83118c400c --- /dev/null +++ b/package/jsoncpp/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_JSONCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 + depends on BR2_INSTALL_LIBSTDCPP + bool "jsoncpp" + help + JsonCpp is a C++ library that allows manipulating JSON + values, including serialization and deserialization to and + from strings. It can also preserve existing comment in + unserialization/serialization steps, making it a convenient + format to store user input files. + + https://github.com/open-source-parsers/jsoncpp + +comment "jsoncpp needs a toolchain w/ C++, gcc >= 4.7" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 diff --git a/package/jsoncpp/jsoncpp.hash b/package/jsoncpp/jsoncpp.hash new file mode 100644 index 0000000000..5b4bbcf7d0 --- /dev/null +++ b/package/jsoncpp/jsoncpp.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 2179a7df19c1c6dc87e02c65b847efc914625a9b87df3e443d9610fc70c0f557 jsoncpp-1.7.2.tar.gz diff --git a/package/jsoncpp/jsoncpp.mk b/package/jsoncpp/jsoncpp.mk new file mode 100644 index 0000000000..34da14c0f6 --- /dev/null +++ b/package/jsoncpp/jsoncpp.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# jsoncpp +# +################################################################################ + +JSONCPP_VERSION = 1.7.2 +JSONCPP_SITE = $(call github,open-source-parsers,jsoncpp,$(JSONCPP_VERSION)) +JSONCPP_LICENSE = Public Domain or MIT +JSONCPP_LICENSE_FILES = LICENSE +JSONCPP_INSTALL_STAGING = YES + +JSONCPP_CONF_OPTS += \ + -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \ + -DJSONCPP_WITH_TESTS=OFF \ + -DJSONCPP_WITH_STRICT_ISO=OFF + +$(eval $(cmake-package)) diff --git a/package/kbd/0001-add-configure-flag-to-disable-tests.patch b/package/kbd/0001-add-configure-flag-to-disable-tests.patch new file mode 100644 index 0000000000..28983e97a0 --- /dev/null +++ b/package/kbd/0001-add-configure-flag-to-disable-tests.patch @@ -0,0 +1,64 @@ +From baeb5aa827d956bd06492775dc5bd9f89d394149 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Mon, 13 Jul 2015 23:38:41 -0400 +Subject: [PATCH] add configure flag to disable tests + +The tests require the check package to be installed. There is a configure +test for this package (which is good), but it's unconditional (which is +bad) as it means you can't even build & install kbd w/out the check +package being installed. + +URL: https://bugs.gentoo.org/485116 +Reported-by: Arfrever Frehtes Taifersar Arahesis +--- + Makefile.am | 5 ++++- + configure.ac | 17 +++++++++++++++-- + 2 files changed, 19 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 89c7e83..f855110 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -8,7 +8,10 @@ EXTRA_DIST = \ + CREDITS \ + contrib docs rc + +-SUBDIRS = src data po tests docs ++SUBDIRS = src data po docs ++if BUILD_TESTS ++SUBDIRS += tests ++endif + + kbd-$(VERSION).tar.xz: + make distcheck +diff --git a/configure.ac b/configure.ac +index d0b462b..f659758 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -10,8 +10,21 @@ AC_CONFIG_MACRO_DIR([m4]) + AM_INIT_AUTOMAKE([1.9 -Wall color-tests dist-xz]) + AC_CONFIG_SRCDIR([src/loadkeys.c]) + AC_CONFIG_HEADERS(config.h) +- +-PKG_CHECK_MODULES([CHECK], [check >= 0.9.4]) ++PKG_PROG_PKG_CONFIG ++ ++AC_ARG_ENABLE(tests, ++ [AS_HELP_STRING([--disable-tests], [do not build tests])], ++ [build_tests=$enableval], [build_tests=auto]) ++if test "$build_tests" != "no"; then ++ PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], ++ [build_tests="yes"], [ ++ if test "$build_tests" = "yes"; then ++ AC_MSG_ERROR([tests requested, but check package is missing]) ++ fi ++ build_tests="no" ++ ]) ++fi ++AM_CONDITIONAL(BUILD_TESTS, test "$build_tests" != "no") + + m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) + AM_SILENT_RULES([yes]) +-- +2.6.4 + diff --git a/package/kbd/0002-Link-against-libintl-when-needed.patch b/package/kbd/0002-Link-against-libintl-when-needed.patch new file mode 100644 index 0000000000..d28f0c809c --- /dev/null +++ b/package/kbd/0002-Link-against-libintl-when-needed.patch @@ -0,0 +1,49 @@ +From 008e7dc0ae46281360be62b7d69cd13e0a7f7e14 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 7 Feb 2016 18:24:35 +0100 +Subject: [PATCH] Link against libintl when needed + +Since the kbd code uses gettext functionality, it should link with the +libintl library using the @INTLLIBS@ symbol provided by the gettext m4 +macro. This is necessary on C libraries that don't provide a built-in +gettext functionality, and rely on the libintl library provided by +gettext, as is the case with the uClibc C library. + +@INTLLIBS@ is empty when linking a separate library is not needed, as +is the case with the glibc C library. + +Signed-off-by: Thomas Petazzoni +--- + src/Makefile.am | 2 +- + tests/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 40e8083..d4e0583 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -80,7 +80,7 @@ mapscrn_CFLAGS = -DMAIN + loadunimap_CFLAGS = -DMAIN + + noinst_LIBRARIES = libcommon.a libfont.a +-LDADD = libcommon.a libfont.a libkeymap/libkeymap.la ++LDADD = libcommon.a libfont.a libkeymap/libkeymap.la @INTLLIBS@ + + install-exec-hook: + for i in psfaddtable psfgettable psfstriptable; do \ +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 1976333..848fd31 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -4,7 +4,7 @@ AM_CPPFLAGS = \ + -DDATADIR=\"$(srcdir)\" -DBUILDDIR=\"$(builddir)\" + + AM_CFLAGS = $(CHECK_CFLAGS) +-LDADD = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS) ++LDADD = $(top_builddir)/src/libkeymap/libkeymap.la $(CHECK_LIBS) @INTLLIBS@ + + EXTRA_DIST = \ + alt-is-meta.in \ +-- +2.6.4 + diff --git a/package/kbd/Config.in b/package/kbd/Config.in new file mode 100644 index 0000000000..44c3163388 --- /dev/null +++ b/package/kbd/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_KBD + bool "kbd" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + # Uses fork() + depends on BR2_USE_MMU + help + Keytable files and keyboard utilities. + + http://kernel.org/pub/linux/utils/kbd/ diff --git a/package/kbd/kbd.hash b/package/kbd/kbd.hash new file mode 100644 index 0000000000..39a4cddb6e --- /dev/null +++ b/package/kbd/kbd.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/kbd/sha256sums.asc +sha256 7a899de1c0eb75f3aea737095a736f2375e1cbfbe693fc14a3fe0bfb4649fb5e kbd-2.0.3.tar.xz diff --git a/package/kbd/kbd.mk b/package/kbd/kbd.mk new file mode 100644 index 0000000000..0243c53265 --- /dev/null +++ b/package/kbd/kbd.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# kbd +# +################################################################################ + +KBD_VERSION = 2.0.3 +KBD_SOURCE = kbd-$(KBD_VERSION).tar.xz +KBD_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kbd +KBD_CONF_OPTS = \ + --disable-vlock \ + --disable-tests +KBD_DEPENDENCIES = \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + host-pkgconf +KBD_LICENSE = GPLv2+ +KBD_LICENSE_FILES = COPYING +KBD_AUTORECONF = YES + +KBD_INSTALL_TARGET_OPTS = MKINSTALLDIRS=$(@D)/config/mkinstalldirs DESTDIR=$(TARGET_DIR) install + +$(eval $(autotools-package)) diff --git a/package/kexec-lite/0001-clean-restart.patch b/package/kexec-lite/0001-clean-restart.patch new file mode 100644 index 0000000000..faaa93a046 --- /dev/null +++ b/package/kexec-lite/0001-clean-restart.patch @@ -0,0 +1,34 @@ +From 0a654c20e1b9324c57ba4116b52fb6ab33847e1d Mon Sep 17 00:00:00 2001 +From: Jeremy Kerr +Date: Thu, 8 Aug 2013 17:16:31 +0800 +Subject: [PATCH] kexec: Implement clean restart for busybox init + +Signed-off-by: Jeremy Kerr +--- + kexec.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/kexec.c b/kexec.c +index 2edb7df..b2a0c42 100644 +--- a/kexec.c ++++ b/kexec.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -818,7 +819,7 @@ int main(int argc, char *argv[]) + sync(); + exec_kexec(); + } else { +- execlp("shutdown", "shutdown", "-r", "now", NULL); ++ kill(1, SIGQUIT); + } + + return -1; +-- +1.7.10.4 + diff --git a/package/kexec-lite/Config.in b/package/kexec-lite/Config.in new file mode 100644 index 0000000000..fcc0d88be5 --- /dev/null +++ b/package/kexec-lite/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_KEXEC_LITE + bool "kexec-lite" + depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le + depends on !BR2_STATIC_LIBS # dtc, elfutils + depends on BR2_USE_WCHAR # elfutils + depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils + select BR2_PACKAGE_ELFUTILS + select BR2_PACKAGE_DTC + select BR2_PACKAGE_DTC_PROGRAMS + help + Kexec is a user space utiltity for loading another kernel + and asking the currently running kernel to do something with it. + + This package is a tiny implementation of the kexec userspace + components, for devicetree-based platforms. + +comment "kexec-lite needs a uClibc or (e)glibc toolchain w/ wchar, dynamic library" + depends on BR2_powerpc || BR2_powerpc64 + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR \ + || !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) diff --git a/package/kexec-lite/kexec-lite.hash b/package/kexec-lite/kexec-lite.hash new file mode 100644 index 0000000000..e8179b7021 --- /dev/null +++ b/package/kexec-lite/kexec-lite.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 2300187bf25616c382cb2f191a2eb13033e019511854794ce234a76cf9f5ad6b kexec-lite-783fb4a811d0b0f8cc2ed68fa7872dcad56a3944.tar.gz diff --git a/package/kexec-lite/kexec-lite.mk b/package/kexec-lite/kexec-lite.mk new file mode 100644 index 0000000000..27bc20485d --- /dev/null +++ b/package/kexec-lite/kexec-lite.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# kexec-lite +# +################################################################################ + +KEXEC_LITE_VERSION = 783fb4a811d0b0f8cc2ed68fa7872dcad56a3944 +KEXEC_LITE_SITE = $(call github,antonblanchard,kexec-lite,$(KEXEC_LITE_VERSION)) +KEXEC_LITE_LICENSE = GPLv2+ +KEXEC_LITE_DEPENDENCIES = elfutils dtc + +define KEXEC_LITE_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all +endef + +define KEXEC_LITE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/kexec $(TARGET_DIR)/usr/sbin/kexec +endef + +$(eval $(generic-package)) diff --git a/package/kexec/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch b/package/kexec/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch new file mode 100644 index 0000000000..adaac2f6ec --- /dev/null +++ b/package/kexec/0001-vmcore-dmesg-Define-_GNU_SOURCE.patch @@ -0,0 +1,38 @@ +Fix musl build + +Downloaded from http://patchwork.openembedded.org/patch/112685/ + +Signed-off-by: Bernd Kuhls + + +From d811875a41b4628040abaada3da29b7b9592e757 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 9 Jan 2016 17:16:16 -0800 +Subject: [PATCH] vmcore-dmesg: Define _GNU_SOURCE + +loff_t is guarded with _GNU_SOURCE on some C library implementations +e.g. musl since this type is not defined by POSIX. Define _GNU_SOURCE to +include this define, it should help compiling on musl while nothing +changes for glibc based systems since there _GNU_SOURCE is already +defined + +Signed-off-by: Khem Raj +--- +Upstream-Status: Submitted + + vmcore-dmesg/vmcore-dmesg.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/vmcore-dmesg/vmcore-dmesg.c b/vmcore-dmesg/vmcore-dmesg.c +index 0364636..a8f56df 100644 +--- a/vmcore-dmesg/vmcore-dmesg.c ++++ b/vmcore-dmesg/vmcore-dmesg.c +@@ -1,4 +1,5 @@ + #define _XOPEN_SOURCE 600 ++#define _GNU_SOURCE + #define _LARGEFILE_SOURCE 1 + #define _FILE_OFFSET_BITS 64 + #include +-- +2.7.0 + diff --git a/package/kexec/Config.in b/package/kexec/Config.in new file mode 100644 index 0000000000..d92e6b9573 --- /dev/null +++ b/package/kexec/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_KEXEC + bool "kexec" + depends on BR2_i386 || BR2_x86_64 || BR2_arm || BR2_armeb || \ + BR2_mips || BR2_mips64 || BR2_mipsel || BR2_mips64el || \ + BR2_powerpc || BR2_sh4 || BR2_sh4a + help + Kexec is a user space utility for loading another kernel + and asking the currently running kernel to do something with it. + + https://www.kernel.org/pub/linux/utils/kernel/kexec/ + +if BR2_PACKAGE_KEXEC + +config BR2_PACKAGE_KEXEC_ZLIB + bool "zlib support" + select BR2_PACKAGE_ZLIB + help + Support for compressed kernel images + +endif diff --git a/package/kexec/kexec.hash b/package/kexec/kexec.hash new file mode 100644 index 0000000000..24a71e7a45 --- /dev/null +++ b/package/kexec/kexec.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/kernel/kexec/sha256sums.asc +sha256 b1097986ffdb928cf41a94e8a5dfddc981a8fa710cccf13298e7f8dd939a2ee3 kexec-tools-2.0.11.tar.xz diff --git a/package/kexec/kexec.mk b/package/kexec/kexec.mk new file mode 100644 index 0000000000..0e64c0d4f3 --- /dev/null +++ b/package/kexec/kexec.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# kexec +# +################################################################################ + +KEXEC_VERSION = 2.0.11 +KEXEC_SOURCE = kexec-tools-$(KEXEC_VERSION).tar.xz +KEXEC_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/kexec +KEXEC_LICENSE = GPLv2 +KEXEC_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_KEXEC_ZLIB),y) +KEXEC_CONF_OPTS += --with-zlib +KEXEC_DEPENDENCIES = zlib +else +KEXEC_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +KEXEC_CONF_OPTS += --with-lzma +KEXEC_DEPENDENCIES += xz +else +KEXEC_CONF_OPTS += --without-lzma +endif + +define KEXEC_REMOVE_LIB_TOOLS + rm -rf $(TARGET_DIR)/usr/lib/kexec-tools +endef + +KEXEC_POST_INSTALL_TARGET_HOOKS += KEXEC_REMOVE_LIB_TOOLS + +$(eval $(autotools-package)) diff --git a/package/keyutils/0001-allow-building-of-the-shared-library-to-be-suppressed.patch b/package/keyutils/0001-allow-building-of-the-shared-library-to-be-suppressed.patch new file mode 100644 index 0000000000..88d32b0cf0 --- /dev/null +++ b/package/keyutils/0001-allow-building-of-the-shared-library-to-be-suppressed.patch @@ -0,0 +1,104 @@ +keyutils: Allow building of the shared library to be suppressed + +Upstream patch: + https://kernel.googlesource.com/pub/scm/linux/kernel/git/dhowells/keyutils/+/a4deb71ddc05e951c8be8d46615beed9d408a5c8 + +Signed-off-by: Vicente Olivert Riera + +LIB: Allow building of the shared library to be suppressed + +Allow building of the shared library to be suppressed by passing NO_SOLIB=1 to +the Makefile. + +Reported-and-tested-by: Vicente Olivert Riera +Signed-off-by: David Howells +diff --git a/Makefile b/Makefile +index c904eaf..5dd2113 100644 +--- a/Makefile ++++ b/Makefile +@@ -5,6 +5,7 @@ + SPECFILE := keyutils.spec + NO_GLIBC_KEYERR := 0 + NO_ARLIB := 0 ++NO_SOLIB := 0 + ETCDIR := /etc + BINDIR := /bin + SBINDIR := /sbin +@@ -95,7 +96,7 @@ + # Normal build rule + # + ############################################################################### +-all: $(DEVELLIB) keyctl request-key key.dns_resolver ++all: keyctl request-key key.dns_resolver + + ############################################################################### + # +@@ -104,20 +105,23 @@ + ############################################################################### + #RPATH = -Wl,-rpath,$(LIBDIR) + +-ifeq ($(NO_ARLIB),0) +-all: $(ARLIB) +-$(ARLIB): keyutils.o +- $(AR) rcs $@ $< +-endif +- + VCPPFLAGS := -DPKGBUILD="\"$(shell date -u +%F)\"" + VCPPFLAGS += -DPKGVERSION="\"keyutils-$(VERSION)\"" + VCPPFLAGS += -DAPIVERSION="\"libkeyutils-$(APIVERSION)\"" + ++ifeq ($(NO_ARLIB),0) ++all: $(ARLIB) ++$(ARLIB): keyutils.o ++ $(AR) rcs $@ $< ++ + keyutils.o: keyutils.c keyutils.h Makefile + $(CC) $(CPPFLAGS) $(VCPPFLAGS) $(CFLAGS) -UNO_GLIBC_KEYERR -o $@ -c $< ++LIB_DEPENDENCY := libkeyutils.a ++endif + + ++ifeq ($(NO_SOLIB),0) ++all: $(DEVELLIB) + $(DEVELLIB): $(SONAME) + ln -sf $< $@ + +@@ -131,6 +135,8 @@ + + keyutils.os: keyutils.c keyutils.h Makefile + $(CC) $(CPPFLAGS) $(VCPPFLAGS) $(CFLAGS) -fPIC -o $@ -c $< ++LIB_DEPENDENCY := $(DEVELLIB) ++endif + + ############################################################################### + # +@@ -140,13 +146,13 @@ + %.o: %.c keyutils.h Makefile + $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $< + +-keyctl: keyctl.o $(DEVELLIB) ++keyctl: keyctl.o $(LIB_DEPENDENCY) + $(CC) -L. $(CFLAGS) $(LDFLAGS) $(RPATH) -o $@ $< -lkeyutils + +-request-key: request-key.o $(DEVELLIB) ++request-key: request-key.o $(LIB_DEPENDENCY) + $(CC) -L. $(CFLAGS) $(LDFLAGS) $(RPATH) -o $@ $< -lkeyutils + +-key.dns_resolver: key.dns_resolver.o $(DEVELLIB) ++key.dns_resolver: key.dns_resolver.o $(LIB_DEPENDENCY) + $(CC) -L. $(CFLAGS) $(LDFLAGS) $(RPATH) -o $@ $< -lkeyutils -lresolv + + ############################################################################### +@@ -158,10 +164,12 @@ + ifeq ($(NO_ARLIB),0) + $(INSTALL) -D -m 0644 $(ARLIB) $(DESTDIR)$(USRLIBDIR)/$(ARLIB) + endif ++ifeq ($(NO_SOLIB),0) + $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) + $(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) + mkdir -p $(DESTDIR)$(USRLIBDIR) + $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) ++endif + $(INSTALL) -D keyctl $(DESTDIR)$(BINDIR)/keyctl + $(INSTALL) -D request-key $(DESTDIR)$(SBINDIR)/request-key + $(INSTALL) -D request-key-debug.sh $(DESTDIR)$(SHAREDIR)/request-key-debug.sh diff --git a/package/keyutils/0002-fix-install-rule.patch b/package/keyutils/0002-fix-install-rule.patch new file mode 100644 index 0000000000..3670d28e66 --- /dev/null +++ b/package/keyutils/0002-fix-install-rule.patch @@ -0,0 +1,20 @@ +Makefile: fix install rule + +Do not link the .so with an absolute path, otherwise it may point to +the host library. + +Based on the former patch by Yann E. MORIN. + +Signed-off-by: Vicente Olivert Riera + +--- keyutils-1.5.9/Makefile.orig 2014-09-22 16:13:41.593562765 +0100 ++++ keyutils-1.5.9/Makefile 2014-09-22 16:14:05.377963952 +0100 +@@ -168,7 +168,7 @@ ifeq ($(NO_SOLIB),0) + $(INSTALL) -D $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME) + $(LNS) $(LIBNAME) $(DESTDIR)$(LIBDIR)/$(SONAME) + mkdir -p $(DESTDIR)$(USRLIBDIR) +- $(LNS) $(LIBDIR)/$(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) ++ $(LNS) $(SONAME) $(DESTDIR)$(USRLIBDIR)/$(DEVELLIB) + endif + $(INSTALL) -D keyctl $(DESTDIR)$(BINDIR)/keyctl + $(INSTALL) -D request-key $(DESTDIR)$(SBINDIR)/request-key diff --git a/package/keyutils/0003-cifs.patch b/package/keyutils/0003-cifs.patch new file mode 100644 index 0000000000..b2903f971f --- /dev/null +++ b/package/keyutils/0003-cifs.patch @@ -0,0 +1,15 @@ +Patch vampirised from Debian's packaging of keyutils-1.4 + +Author: Marcus Meissner +Description: Added 2 cifs helpers to request-key.conf (for CIFS DFS support) + +diff -Naurp keyutils.orig/request-key.conf keyutils/request-key.conf +--- keyutils.orig/request-key.conf 2008-09-07 23:53:10.000000000 +0000 ++++ keyutils/request-key.conf 2009-02-05 00:53:00.000000000 +0000 +@@ -34,4 +34,6 @@ + create user debug:* negate /bin/keyctl negate %k 30 %S + create user debug:loop:* * |/bin/cat + create user debug:* * /usr/share/keyutils/request-key-debug.sh %k %d %c %S ++create cifs.spnego * * /usr/sbin/cifs.upcall -c %k ++create dns_resolver * * /usr/sbin/cifs.upcall %k + negate * * * /bin/keyctl negate %k 30 %S diff --git a/package/keyutils/0004-Makefile-for-buildroot.patch b/package/keyutils/0004-Makefile-for-buildroot.patch new file mode 100644 index 0000000000..1e19f77dcb --- /dev/null +++ b/package/keyutils/0004-Makefile-for-buildroot.patch @@ -0,0 +1,19 @@ +Makefile: Don't call "ln" directly + +Signed-off-by: Vicente Olivert Riera + +--- keyutils-1.5.9/Makefile.orig 2014-09-22 16:05:14.117007430 +0100 ++++ keyutils-1.5.9/Makefile 2014-09-22 16:06:26.053219336 +0100 +@@ -123,10 +123,10 @@ endif + ifeq ($(NO_SOLIB),0) + all: $(DEVELLIB) + $(DEVELLIB): $(SONAME) +- ln -sf $< $@ ++ $(LNS) $< $@ + + $(SONAME): $(LIBNAME) +- ln -sf $< $@ ++ $(LNS) $< $@ + + LIBVERS := -shared -Wl,-soname,$(SONAME) -Wl,--version-script,version.lds + diff --git a/package/keyutils/0005-Add-missing-limits.h-include.patch b/package/keyutils/0005-Add-missing-limits.h-include.patch new file mode 100644 index 0000000000..45c84398f9 --- /dev/null +++ b/package/keyutils/0005-Add-missing-limits.h-include.patch @@ -0,0 +1,32 @@ +From b2c6d3744dca029560d0d5e780f16561f8eeed53 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 12 Jul 2015 16:22:14 +0200 +Subject: [PATCH] Add missing include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +key.dns_resolver.c uses ‘UINT_MAX’ and ‘ULONG_MAX’, but forgets to +include , which causes build failure with certain C +libraries (notably the musl C library). + +Signed-off-by: Thomas Petazzoni +--- + key.dns_resolver.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/key.dns_resolver.c b/key.dns_resolver.c +index c2a9fe5..d41e219 100644 +--- a/key.dns_resolver.c ++++ b/key.dns_resolver.c +@@ -56,6 +56,7 @@ + #include + #include + #include ++#include + + static const char *DNS_PARSE_VERSION = "1.0"; + static const char prog[] = "key.dns_resolver"; +-- +2.4.5 + diff --git a/package/keyutils/Config.in b/package/keyutils/Config.in new file mode 100644 index 0000000000..6f0758f473 --- /dev/null +++ b/package/keyutils/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_KEYUTILS + bool "keyutils" + depends on !BR2_microblaze + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # dlopen + help + These tools are used to control the key management system + built into the Linux kernel. + + http://people.redhat.com/~dhowells/keyutils/ + +comment "keyutils needs a toolchain w/ dynamic library" + depends on !BR2_microblaze + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/keyutils/keyutils.hash b/package/keyutils/keyutils.hash new file mode 100644 index 0000000000..21ecae5159 --- /dev/null +++ b/package/keyutils/keyutils.hash @@ -0,0 +1,3 @@ +# From http://people.redhat.com/~dhowells/keyutils/ +md5 7f8ac985c45086b5fbcd12cecd23cf07 keyutils-1.5.9.tar.bz2 +sha1 cf040adebe25eb466760f34752f4100fd5acb5e7 keyutils-1.5.9.tar.bz2 diff --git a/package/keyutils/keyutils.mk b/package/keyutils/keyutils.mk new file mode 100644 index 0000000000..7a30ba644d --- /dev/null +++ b/package/keyutils/keyutils.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# keyutils +# +################################################################################ + +KEYUTILS_VERSION = 1.5.9 +KEYUTILS_SOURCE = keyutils-$(KEYUTILS_VERSION).tar.bz2 +KEYUTILS_SITE = http://people.redhat.com/~dhowells/keyutils +KEYUTILS_LICENSE = GPLv2+, LGPLv2.1+ +KEYUTILS_LICENSE_FILES = LICENCE.GPL LICENCE.LGPL +KEYUTILS_INSTALL_STAGING = YES + +KEYUTILS_MAKE_PARAMS = \ + INSTALL=$(INSTALL) \ + LIBDIR=/usr/lib \ + USRLIBDIR=/usr/lib \ + CFLAGS="$(TARGET_CFLAGS)" \ + CPPFLAGS="$(TARGET_CPPFLAGS) -I." \ + LNS="$(HOSTLN) -sf" + +ifeq ($(BR2_SHARED_LIBS),y) +KEYUTILS_MAKE_PARAMS += NO_ARLIB=1 +endif + +define KEYUTILS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) $(KEYUTILS_MAKE_PARAMS) -C $(@D) +endef + +define KEYUTILS_INSTALL_STAGING_CMDS + $(MAKE) $(KEYUTILS_MAKE_PARAMS) -C $(@D) DESTDIR=$(STAGING_DIR) install +endef + +define KEYUTILS_INSTALL_TARGET_CMDS + $(MAKE) $(KEYUTILS_MAKE_PARAMS) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/kismet/0001-ncurses.patch b/package/kismet/0001-ncurses.patch new file mode 100644 index 0000000000..af8fba52b7 --- /dev/null +++ b/package/kismet/0001-ncurses.patch @@ -0,0 +1,11 @@ +--- kismet-2009-06-R1/configure 2009-06-12 04:26:32.000000000 +0100 ++++ kismet-2009-06-R1.mod/configure 2009-08-05 11:27:43.000000000 +0100 +@@ -6981,7 +6981,7 @@ + + + # Add additional cflags since some distros bury panel.h +-CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses" ++#CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses" + + termcontrol="none"; + diff --git a/package/kismet/0002-nobsd.patch b/package/kismet/0002-nobsd.patch new file mode 100644 index 0000000000..451d9ce4a1 --- /dev/null +++ b/package/kismet/0002-nobsd.patch @@ -0,0 +1,44 @@ +diff -Nura kismet-2009-06-R1/ifcontrol.cc kismet-2009-06-R1-nobsd/ifcontrol.cc +--- kismet-2009-06-R1/ifcontrol.cc 2009-04-08 16:57:44.000000000 -0300 ++++ kismet-2009-06-R1-nobsd/ifcontrol.cc 2009-09-01 12:54:44.000000000 -0300 +@@ -148,7 +148,7 @@ + devlinklen = readlink(devlink.c_str(), devlinktarget, 511); + if (devlinklen > 0) { + devlinktarget[devlinklen] = '\0'; +- rind = rindex(devlinktarget, '/'); ++ rind = strrchr(devlinktarget, '/'); + // If we found it and not at the end of the line + if (rind != NULL && (rind - devlinktarget) + 1 < devlinklen) + return string(rind + 1); +diff -Nura kismet-2009-06-R1/iwcontrol.cc kismet-2009-06-R1-nobsd/iwcontrol.cc +--- kismet-2009-06-R1/iwcontrol.cc 2009-04-20 00:22:55.000000000 -0300 ++++ kismet-2009-06-R1-nobsd/iwcontrol.cc 2009-09-01 12:54:44.000000000 -0300 +@@ -697,7 +697,7 @@ + return -1; + } + +- bzero(buffer, sizeof(buffer)); ++ memset(buffer, 0, sizeof(buffer)); + + memset(&wrq, 0, sizeof(struct iwreq)); + +@@ -732,7 +732,7 @@ + memcpy((char *) &range, buffer, sizeof(iw_range)); + } else { + /* Zero unknown fields */ +- bzero((char *) &range, sizeof(struct iw_range)); ++ memset((char *) &range, 0, sizeof(struct iw_range)); + + /* Initial part unmoved */ + memcpy((char *) &range, buffer, iwr15_off(num_channels)); +diff -Nura kismet-2009-06-R1/madwifing_control.cc kismet-2009-06-R1-nobsd/madwifing_control.cc +--- kismet-2009-06-R1/madwifing_control.cc 2009-03-22 23:19:19.000000000 -0300 ++++ kismet-2009-06-R1-nobsd/madwifing_control.cc 2009-09-01 12:54:42.000000000 -0300 +@@ -34,7 +34,6 @@ + #include + #include + #include +-#include + #include + #include + #include diff --git a/package/kismet/0003-fix-curses-libs-ordering.patch b/package/kismet/0003-fix-curses-libs-ordering.patch new file mode 100644 index 0000000000..b579c96d46 --- /dev/null +++ b/package/kismet/0003-fix-curses-libs-ordering.patch @@ -0,0 +1,42 @@ +configure: fix ordering of ncurses libraries + +Says Vicente: + [T]he order is very important when doing static builds. + Otherwise we will see errors like this one: + + [...]/sysroot/usr/lib/libpanel.a(p_delete.o): + In function `del_panel': + p_delete.c:(.text+0x68): undefined reference to `_nc_panelhook' + +Fix the order configure adds libraries: new libraries should be added +at the *front* of the list, not at the end. + +Reported-by: Vicente Olivert Riera +Signed-off-by: "Yann E. MORIN" +Cc: Vicente Olivert Riera + +diff -durN kismet-Kismet-2014-02-R1.orig/configure.in kismet-Kismet-2014-02-R1/configure.in +--- kismet-Kismet-2014-02-R1.orig/configure.in 2014-02-19 05:37:43.000000000 +0100 ++++ kismet-Kismet-2014-02-R1/configure.in 2014-12-26 16:46:55.770692349 +0100 +@@ -437,10 +434,10 @@ + AC_MSG_ERROR(Failed to find curses.h or ncurses.h. You probably need to install the curses-devel package from your distribution) + fi + +- LIBS="$LIBS $curseaux" ++ LIBS="$curseaux $LIBS" + AC_CHECK_LIB([panel], [new_panel], + AC_DEFINE(HAVE_LIBPANEL, 1, Panel terminal lib) +- curseaux="$curseaux -lpanel", ++ curseaux="-lpanel $curseaux", + AC_MSG_ERROR(Failed to find libpanel extension to curses/ncurses. Install it, or disable building the Kismet client with --disable-client. Disabling the client is probably not something you want to do normally.)) + + AC_CHECK_HEADER([panel.h], [foundhpanel=yes]) +@@ -450,7 +447,7 @@ + + LIBS="$OLIBS" + +- CLIENTCLIBS="$CLIENTCLIBS $curseaux" ++ CLIENTCLIBS="$curseaux $CLIENTCLIBS" + fi + + AC_SUBST(CLIBS) diff --git a/package/kismet/0004-no-include-host-paths.patch b/package/kismet/0004-no-include-host-paths.patch new file mode 100644 index 0000000000..1dcf1200f9 --- /dev/null +++ b/package/kismet/0004-no-include-host-paths.patch @@ -0,0 +1,23 @@ +configure: do not hard-code host paths + +configure hard-codes include dirs to contain /usr/include/ncurses. +Needless to say this does not work well for cross-compilation. + +Remove that directory from the include search dirs. + +Signed-off-by: "Yann E. MORIN" +Cc: Vicente Olivert Riera + +diff -durN kismet-Kismet-2014-02-R1.orig/configure.in kismet-Kismet-2014-02-R1/configure.in +--- kismet-Kismet-2014-02-R1.orig/configure.in 2014-02-19 05:37:43.000000000 +0100 ++++ kismet-Kismet-2014-02-R1/configure.in 2014-12-26 16:46:55.770692349 +0100 +@@ -406,9 +406,6 @@ + ) + AC_SUBST(wantclient) + +-# Add additional cflags since some distros bury panel.h +-CPPFLAGS="$CPPFLAGS -I/usr/include/ncurses" +- + termcontrol="none"; + + if test "$wantclient" = "yes"; then diff --git a/package/kismet/Config.in b/package/kismet/Config.in new file mode 100644 index 0000000000..7265c63e87 --- /dev/null +++ b/package/kismet/Config.in @@ -0,0 +1,43 @@ +comment "kismet needs a toolchain w/ threads, C++, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS + +config BR2_PACKAGE_KISMET + bool "kismet" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # dlfcn.h + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_NCURSES_TARGET_PANEL + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBNL + help + Kismet - 802.11 layer2 wireless network detector, sniffer, + and intrusion detection system. + + Kismet will work with any wireless card which supports raw + monitoring (rfmon) mode, and can sniff 802.11b, 802.11a, and + 802.11g traffic. + + Kismet identifies networks by passively collecting packets + and detecting standard named networks, detecting (and given + time, decloaking) hidden networks, and infering the presence + of nonbeaconing networks via data traffic. + + http://www.kismetwireless.net + +if BR2_PACKAGE_KISMET + +config BR2_PACKAGE_KISMET_CLIENT + bool "Install client" + +config BR2_PACKAGE_KISMET_DRONE + bool "Install drone" + +config BR2_PACKAGE_KISMET_SERVER + bool "Install server" + default y + +endif diff --git a/package/kismet/kismet.mk b/package/kismet/kismet.mk new file mode 100644 index 0000000000..f4a28b86dc --- /dev/null +++ b/package/kismet/kismet.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# kismet +# +################################################################################ + +KISMET_VERSION = Kismet-2014-02-R1 +KISMET_SITE = http://www.kismetwireless.net/kismet.git +KISMET_SITE_METHOD = git +KISMET_DEPENDENCIES = host-pkgconf libpcap ncurses libnl +KISMET_CONF_OPTS += --with-netlink-version=3 +KISMET_LICENSE = GPLv2+ +KISMET_LICENSE_FILES = debian/copyright + +# We touch configure.in: +KISMET_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +KISMET_DEPENDENCIES += libcap +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +KISMET_DEPENDENCIES += pcre +endif + +ifeq ($(BR2_PACKAGE_KISMET_CLIENT),y) +KISMET_TARGET_BINARIES += kismet_client +endif + +ifeq ($(BR2_PACKAGE_KISMET_SERVER),y) +KISMET_TARGET_BINARIES += kismet_server +KISMET_TARGET_CONFIGS += kismet.conf +endif + +ifeq ($(BR2_PACKAGE_KISMET_DRONE),y) +KISMET_TARGET_BINARIES += kismet_drone +KISMET_TARGET_CONFIGS += kismet_drone.conf +endif + +ifdef KISMET_TARGET_BINARIES +define KISMET_INSTALL_TARGET_BINARIES + $(INSTALL) -m 755 $(addprefix $(KISMET_DIR)/, $(KISMET_TARGET_BINARIES)) $(TARGET_DIR)/usr/bin +endef +endif + +ifdef KISMET_TARGET_CONFIGS +define KISMET_INSTALL_TARGET_CONFIGS + $(INSTALL) -m 644 $(addprefix $(KISMET_DIR)/conf/, $(KISMET_TARGET_CONFIGS)) $(TARGET_DIR)/etc +endef +endif + +define KISMET_INSTALL_TARGET_CMDS + $(KISMET_INSTALL_TARGET_BINARIES) + $(KISMET_INSTALL_TARGET_CONFIGS) +endef + +$(eval $(autotools-package)) diff --git a/package/kmod/0001-fix-O_CLOEXEC.patch b/package/kmod/0001-fix-O_CLOEXEC.patch new file mode 100644 index 0000000000..145ac34207 --- /dev/null +++ b/package/kmod/0001-fix-O_CLOEXEC.patch @@ -0,0 +1,48 @@ +From b39a62f6682463bcd47480348fac3dcd209a19a5 Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Wed, 22 Jan 2014 01:06:40 -0500 +Subject: [PATCH] Add dummy definition of O_CLOEXEC + +O_CLOEXEC is introduced from Linux 2.6.23, so old kernel doesn't have +it, we need check before use. + +This patch is much more like a workaround, since it may need fcntl() use +FD_CLOEXEC to replace. + +This problem was reported by "Ting Liu " + +[Thomas De Schampheleire +Signed-off-by: Vicente Olivert Riera + +Upstream-status: rejected, suggests to add in buildroot instead [1] + +[1] http://news.gmane.org/find-root.php?message_id=1412062906%2d27378%2d1%2dgit%2dsend%2demail%2dpatrickdepinguin%40gmail.com + +--- + shared/missing.h | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/shared/missing.h b/shared/missing.h +index 4c0d136..e123e98 100644 +--- a/shared/missing.h ++++ b/shared/missing.h +@@ -19,6 +19,10 @@ + # define __NR_finit_module -1 + #endif + ++#ifndef O_CLOEXEC ++#define O_CLOEXEC 0 ++#endif ++ + #ifndef HAVE_FINIT_MODULE + #include + +-- +1.7.1 + diff --git a/package/kmod/Config.in b/package/kmod/Config.in new file mode 100644 index 0000000000..e59b281cf9 --- /dev/null +++ b/package/kmod/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_KMOD + bool "kmod" + depends on !BR2_STATIC_LIBS + help + handle kernel modules + + http://git.kernel.org/?p=utils/kernel/kmod/kmod.git + +if BR2_PACKAGE_KMOD + +config BR2_PACKAGE_KMOD_TOOLS + bool "kmod utilities" + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + help + Install kmod module utilities (depmod, insmod, lsmod, + modinfo, modprobe, rmmod). + +endif + +comment "kmod needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/kmod/kmod.hash b/package/kmod/kmod.hash new file mode 100644 index 0000000000..75b819e3e3 --- /dev/null +++ b/package/kmod/kmod.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/kernel/kmod/sha256sums.asc +sha256 ba3b1ddea33228b473189fcb05b809024a3b86e9a7cf37d420cae06beb749f82 kmod-22.tar.xz diff --git a/package/kmod/kmod.mk b/package/kmod/kmod.mk new file mode 100644 index 0000000000..2b9d002939 --- /dev/null +++ b/package/kmod/kmod.mk @@ -0,0 +1,77 @@ +################################################################################ +# +# kmod +# +################################################################################ + +KMOD_VERSION = 22 +KMOD_SOURCE = kmod-$(KMOD_VERSION).tar.xz +KMOD_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/kmod +KMOD_INSTALL_STAGING = YES +KMOD_DEPENDENCIES = host-pkgconf +HOST_KMOD_DEPENDENCIES = host-pkgconf + +# license info for libkmod only, conditionally add more below +KMOD_LICENSE = LGPLv2.1+ +KMOD_LICENSE_FILES = libkmod/COPYING + +# static linking not supported, see +# https://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/?id=b7016153ec8 +KMOD_CONF_OPTS = --disable-static --enable-shared + +KMOD_CONF_OPTS += --disable-manpages +HOST_KMOD_CONF_OPTS = --disable-manpages + +ifeq ($(BR2_PACKAGE_ZLIB),y) +KMOD_DEPENDENCIES += zlib +KMOD_CONF_OPTS += --with-zlib +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +KMOD_DEPENDENCIES += xz +KMOD_CONF_OPTS += --with-xz +endif + +ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y) +KMOD_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,python3) +KMOD_CONF_OPTS += --enable-python +endif + +ifeq ($(BR2_PACKAGE_KMOD_TOOLS),y) + +# add license info for kmod tools +KMOD_LICENSE += GPLv2+ +KMOD_LICENSE_FILES += COPYING + +# take precedence over busybox implementation +KMOD_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox) + +# /sbin is really /usr/sbin with merged /usr, so adjust relative symlink +ifeq ($(BR2_ROOTFS_MERGED_USR),y) +KMOD_BIN_PATH = ../bin/kmod +else +KMOD_BIN_PATH = ../usr/bin/kmod +endif + +define KMOD_INSTALL_TOOLS + for i in depmod insmod lsmod modinfo modprobe rmmod; do \ + ln -sf $(KMOD_BIN_PATH) $(TARGET_DIR)/sbin/$$i; \ + done +endef + +KMOD_POST_INSTALL_TARGET_HOOKS += KMOD_INSTALL_TOOLS +else +KMOD_CONF_OPTS += --disable-tools +endif + +# We only install depmod, since that's the only tool used for the +# host. +define HOST_KMOD_INSTALL_TOOLS + mkdir -p $(HOST_DIR)/sbin/ + ln -sf ../usr/bin/kmod $(HOST_DIR)/sbin/depmod +endef + +HOST_KMOD_POST_INSTALL_HOOKS += HOST_KMOD_INSTALL_TOOLS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/knock/Config.in b/package/knock/Config.in new file mode 100644 index 0000000000..8778a7e3fd --- /dev/null +++ b/package/knock/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_KNOCK + bool "knock" + select BR2_PACKAGE_LIBPCAP + depends on BR2_USE_MMU # fork() + help + A port knocking implementation. + Provides a daemon and a user application. Port knocking can be + used to run an arbitrary application, once the daemon detects + a predefined sequence of incoming TCP/UDP packets on a network + interface. This can be used, e.g. to open up ports in a + firewall. + + http://www.zeroflux.org/projects/knock diff --git a/package/knock/knock.hash b/package/knock/knock.hash new file mode 100644 index 0000000000..3599e43da2 --- /dev/null +++ b/package/knock/knock.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 940a8de61b4b3530560805c3b9310a077c28c99173c2ccb07ff96720b0e93c58 knock-258a27e5a47809f97c2b9f2751a88c2f94aae891.tar.gz diff --git a/package/knock/knock.mk b/package/knock/knock.mk new file mode 100644 index 0000000000..2ab8d1b680 --- /dev/null +++ b/package/knock/knock.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# knock +# +################################################################################ + +KNOCK_VERSION = 258a27e5a47809f97c2b9f2751a88c2f94aae891 +KNOCK_SITE = $(call github,jvinet,knock,$(KNOCK_VERSION)) +KNOCK_AUTORECONF = YES +KNOCK_LICENSE = GPLv2+ +KNOCK_LICENSE_FILES = COPYING +KNOCK_DEPENDENCIES = libpcap + +ifeq ($(BR2_STATIC_LIBS),y) +KNOCK_CONF_OPTS = LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`" +endif + +$(eval $(autotools-package)) diff --git a/package/kodi-addon-xvdr/0001-xbmc-rebrand.patch b/package/kodi-addon-xvdr/0001-xbmc-rebrand.patch new file mode 100644 index 0000000000..6e87b79b64 --- /dev/null +++ b/package/kodi-addon-xvdr/0001-xbmc-rebrand.patch @@ -0,0 +1,19 @@ +Update for Kodi + +Ported from OpenELEC: +https://github.com/OpenELEC/OpenELEC.tv/blob/master/packages/mediacenter/kodi-addon-xvdr/patches/kodi-addon-xvdr-xbmc-rebrand.patch + +Signed-off-by: Bernd Kuhls + +diff -Naur xbmc-addon-xvdr-2bf2563/configure.ac xbmc-addon-xvdr-2bf2563.patch/configure.ac +--- xbmc-addon-xvdr-2bf2563/configure.ac 2014-10-18 22:02:18.000000000 +0200 ++++ xbmc-addon-xvdr-2bf2563.patch/configure.ac 2014-10-20 03:03:20.525526996 +0200 +@@ -6,7 +6,7 @@ + AC_INIT([xbmc-addon-xvdr], [MAJOR.MINOR.MICRO], [alexander.pipelka@gmail.com]) + + AC_CONFIG_AUX_DIR(autotools) +-AC_PREFIX_DEFAULT(/usr/lib/xbmc) ++AC_PREFIX_DEFAULT(/usr/lib/kodi) + + AC_CANONICAL_HOST + AC_CANONICAL_TARGET diff --git a/package/kodi-addon-xvdr/Config.in b/package/kodi-addon-xvdr/Config.in new file mode 100644 index 0000000000..85e9d600c8 --- /dev/null +++ b/package/kodi-addon-xvdr/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_KODI_ADDON_XVDR + bool "kodi-addon-xvdr" + # upstream discontinued the development + depends on BR2_DEPRECATED_SINCE_2016_05 + help + This is a PVR add-on for Kodi to add VDR (http://tvdr.de/) + as a TV/PVR Backend to Kodi. + + It adds support for Live TV watching, replaying of Recordings, + programming Timers and EPG TV Guide to use on same computer or + over the Network. + + https://github.com/pipelka/xbmc-addon-xvdr + + Note: since the VDR server is not packaged in Buildroot, using + this addon requires that a remote VDR server be used. diff --git a/package/kodi-addon-xvdr/kodi-addon-xvdr.hash b/package/kodi-addon-xvdr/kodi-addon-xvdr.hash new file mode 100644 index 0000000000..933c7b8de2 --- /dev/null +++ b/package/kodi-addon-xvdr/kodi-addon-xvdr.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 783796eccc19c639c59b7a05cad1df705d557993b15cc7e29f7dbbd8388d698b kodi-addon-xvdr-ae66610bc2e1a3efe49f4fa0db55ff3a7808a247.tar.gz diff --git a/package/kodi-addon-xvdr/kodi-addon-xvdr.mk b/package/kodi-addon-xvdr/kodi-addon-xvdr.mk new file mode 100644 index 0000000000..ac7f3cb0b5 --- /dev/null +++ b/package/kodi-addon-xvdr/kodi-addon-xvdr.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# kodi-addon-xvdr +# +################################################################################ + +# This cset is on master. When a Jarvis branch is made, we should +# follow it, as incompatible changes in the plugins API can happen +# on the master branch. +KODI_ADDON_XVDR_VERSION = ae66610bc2e1a3efe49f4fa0db55ff3a7808a247 +KODI_ADDON_XVDR_SITE = $(call github,pipelka,xbmc-addon-xvdr,$(KODI_ADDON_XVDR_VERSION)) +KODI_ADDON_XVDR_LICENSE = GPLv2+ +KODI_ADDON_XVDR_LICENSE_FILES = COPYING + +# There's no ./configure in the git tree, we need to generate it +# kodi-addon-xvdr uses a weird autogen.sh script, which +# is even incorrect (it's missing the #! ) Sigh... :-( +# Fortunately, with our little patch, it autoreconfs nicely! :-) +KODI_ADDON_XVDR_AUTORECONF = YES + +# This really is a runtime dependency, but we need KODI to be installed +# first, since we'll install files in KODI's directories _after_ KODI has +# installed his own files +KODI_ADDON_XVDR_DEPENDENCIES = kodi + +$(eval $(autotools-package)) diff --git a/package/kodi-adsp-basic/Config.in b/package/kodi-adsp-basic/Config.in new file mode 100644 index 0000000000..87bdd1973c --- /dev/null +++ b/package/kodi-adsp-basic/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_KODI_ADSP_BASIC + bool "kodi-adsp-basic" + select BR2_PACKAGE_LIBPLATFORM + select BR2_PACKAGE_KODI_PLATFORM + help + This add-on contains basic dsp related parts to handle + speaker delays, channel related volume amplification. As + mode it supports a Dolby Pro Logic II compatible + multichannel downmix to stereo, which becomes available if + only 2 channel output on Kodi is selected. + + https://github.com/kodi-adsp/adsp.basic diff --git a/package/kodi-adsp-basic/kodi-adsp-basic.hash b/package/kodi-adsp-basic/kodi-adsp-basic.hash new file mode 100644 index 0000000000..e668ff2aa4 --- /dev/null +++ b/package/kodi-adsp-basic/kodi-adsp-basic.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 0ae320af73085c322671d4b361248ff4341a6a04bd81c8b699847d5b04da828f kodi-adsp-basic-cb56e0eb6530fd50a286d47ef0be529001e9d556.tar.gz diff --git a/package/kodi-adsp-basic/kodi-adsp-basic.mk b/package/kodi-adsp-basic/kodi-adsp-basic.mk new file mode 100644 index 0000000000..0b1ba95948 --- /dev/null +++ b/package/kodi-adsp-basic/kodi-adsp-basic.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-adsp-basic +# +################################################################################ + +KODI_ADSP_BASIC_VERSION = cb56e0eb6530fd50a286d47ef0be529001e9d556 +KODI_ADSP_BASIC_SITE = $(call github,kodi-adsp,adsp.basic,$(KODI_ADSP_BASIC_VERSION)) +KODI_ADSP_BASIC_LICENSE = GPLv3+ +KODI_ADSP_BASIC_LICENSE_FILES = LICENSE.md +KODI_ADSP_BASIC_DEPENDENCIES = libplatform kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-adsp-freesurround/Config.in b/package/kodi-adsp-freesurround/Config.in new file mode 100644 index 0000000000..80aadf1d40 --- /dev/null +++ b/package/kodi-adsp-freesurround/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_KODI_ADSP_FREESURROUND + bool "kodi-adsp-freesurround" + select BR2_PACKAGE_LIBPLATFORM + select BR2_PACKAGE_KODI_PLATFORM + help + FreeSurround is meant to be the KODI equivalent of your + hi-fi receiver's Dolby ProLogic II button. It's purpose is + to decode surround information from your stereo music and to + produce multichannel output from it. + + https://github.com/kodi-adsp/adsp.freesurround diff --git a/package/kodi-adsp-freesurround/kodi-adsp-freesurround.hash b/package/kodi-adsp-freesurround/kodi-adsp-freesurround.hash new file mode 100644 index 0000000000..f23717f79b --- /dev/null +++ b/package/kodi-adsp-freesurround/kodi-adsp-freesurround.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 652c32d0c4b61343cbed13b6edd1ab4ad35280240a0ddb386f04adaa46986e7f kodi-adsp-freesurround-08b691d3d9a0382d2f6f789a31614fb02512036c.tar.gz diff --git a/package/kodi-adsp-freesurround/kodi-adsp-freesurround.mk b/package/kodi-adsp-freesurround/kodi-adsp-freesurround.mk new file mode 100644 index 0000000000..49cf673276 --- /dev/null +++ b/package/kodi-adsp-freesurround/kodi-adsp-freesurround.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-adsp-freesurround +# +################################################################################ + +KODI_ADSP_FREESURROUND_VERSION = 08b691d3d9a0382d2f6f789a31614fb02512036c +KODI_ADSP_FREESURROUND_SITE = $(call github,kodi-adsp,adsp.freesurround,$(KODI_ADSP_FREESURROUND_VERSION)) +KODI_ADSP_FREESURROUND_LICENSE = GPLv3+ +KODI_ADSP_FREESURROUND_LICENSE_FILES = LICENSE.md +KODI_ADSP_FREESURROUND_DEPENDENCIES = libplatform kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-audiodecoder-modplug/Config.in b/package/kodi-audiodecoder-modplug/Config.in new file mode 100644 index 0000000000..026997319e --- /dev/null +++ b/package/kodi-audiodecoder-modplug/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_KODI_AUDIODECODER_MODPLUG + bool "kodi-audiodecoder-modplug" + select BR2_PACKAGE_KODI_PLATFORM + select BR2_PACKAGE_LIBMODPLUG + help + Modplug decoder addon for Kodi + + https://github.com/notspiff/audiodecoder.modplug diff --git a/package/kodi-audiodecoder-modplug/kodi-audiodecoder-modplug.hash b/package/kodi-audiodecoder-modplug/kodi-audiodecoder-modplug.hash new file mode 100644 index 0000000000..2760b11b53 --- /dev/null +++ b/package/kodi-audiodecoder-modplug/kodi-audiodecoder-modplug.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 dd4610ba5fdf3f46dcd0deff785d373d3996c6585cbeb39cb4449baafe5ea3df kodi-audiodecoder-modplug-03b772da7ea44ff3c34b322989254cd1e4732443.tar.gz diff --git a/package/kodi-audiodecoder-modplug/kodi-audiodecoder-modplug.mk b/package/kodi-audiodecoder-modplug/kodi-audiodecoder-modplug.mk new file mode 100644 index 0000000000..581223c0b9 --- /dev/null +++ b/package/kodi-audiodecoder-modplug/kodi-audiodecoder-modplug.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-modplug +# +################################################################################ + +KODI_AUDIODECODER_MODPLUG_VERSION = 03b772da7ea44ff3c34b322989254cd1e4732443 +KODI_AUDIODECODER_MODPLUG_SITE = $(call github,notspiff,audiodecoder.modplug,$(KODI_AUDIODECODER_MODPLUG_VERSION)) +KODI_AUDIODECODER_MODPLUG_LICENSE = GPLv2+ +KODI_AUDIODECODER_MODPLUG_LICENSE_FILES = src/ModplugCodec.cpp +KODI_AUDIODECODER_MODPLUG_DEPENDENCIES = kodi-platform libmodplug + +$(eval $(cmake-package)) diff --git a/package/kodi-audiodecoder-nosefart/Config.in b/package/kodi-audiodecoder-nosefart/Config.in new file mode 100644 index 0000000000..96591aae5c --- /dev/null +++ b/package/kodi-audiodecoder-nosefart/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_AUDIODECODER_NOSEFART + bool "kodi-audiodecoder-nosefart" + select BR2_PACKAGE_KODI_PLATFORM + help + Nosefart decoder addon for Kodi + + https://github.com/notspiff/audiodecoder.nosefart diff --git a/package/kodi-audiodecoder-nosefart/kodi-audiodecoder-nosefart.hash b/package/kodi-audiodecoder-nosefart/kodi-audiodecoder-nosefart.hash new file mode 100644 index 0000000000..b4cd28fea5 --- /dev/null +++ b/package/kodi-audiodecoder-nosefart/kodi-audiodecoder-nosefart.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 da65b21ed6218d65b7d382d7fdd9c848a87f6dc766864925979ea8244320db94 kodi-audiodecoder-nosefart-bfab543bae0d9855538cf03e78ea9cd5e3b9750e.tar.gz diff --git a/package/kodi-audiodecoder-nosefart/kodi-audiodecoder-nosefart.mk b/package/kodi-audiodecoder-nosefart/kodi-audiodecoder-nosefart.mk new file mode 100644 index 0000000000..49688a4d9e --- /dev/null +++ b/package/kodi-audiodecoder-nosefart/kodi-audiodecoder-nosefart.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-nosefart +# +################################################################################ + +KODI_AUDIODECODER_NOSEFART_VERSION = bfab543bae0d9855538cf03e78ea9cd5e3b9750e +KODI_AUDIODECODER_NOSEFART_SITE = $(call github,notspiff,audiodecoder.nosefart,$(KODI_AUDIODECODER_NOSEFART_VERSION)) +KODI_AUDIODECODER_NOSEFART_LICENSE = GPLv2+ +KODI_AUDIODECODER_NOSEFART_LICENSE_FILES = src/NSFCodec.cpp +KODI_AUDIODECODER_NOSEFART_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-audiodecoder-opus/Config.in b/package/kodi-audiodecoder-opus/Config.in new file mode 100644 index 0000000000..12d7247d58 --- /dev/null +++ b/package/kodi-audiodecoder-opus/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_KODI_AUDIODECODER_OPUS + bool "kodi-audiodecoder-opus" + select BR2_PACKAGE_KODI_PLATFORM + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_OPUS + select BR2_PACKAGE_OPUSFILE + help + Opus audio decoder for Kodi + + https://github.com/notspiff/audiodecoder.opus diff --git a/package/kodi-audiodecoder-opus/kodi-audiodecoder-opus.hash b/package/kodi-audiodecoder-opus/kodi-audiodecoder-opus.hash new file mode 100644 index 0000000000..fa60ce5769 --- /dev/null +++ b/package/kodi-audiodecoder-opus/kodi-audiodecoder-opus.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 74b5736aa21d9cfb8fa835c1dc9cca47817cdb3867f99f5c6aee655f0df476ad kodi-audiodecoder-opus-0bd11e35e6ed8b6480e4100ac8927113cb085eda.tar.gz diff --git a/package/kodi-audiodecoder-opus/kodi-audiodecoder-opus.mk b/package/kodi-audiodecoder-opus/kodi-audiodecoder-opus.mk new file mode 100644 index 0000000000..efe17f38a9 --- /dev/null +++ b/package/kodi-audiodecoder-opus/kodi-audiodecoder-opus.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-opus +# +################################################################################ + +KODI_AUDIODECODER_OPUS_VERSION = 0bd11e35e6ed8b6480e4100ac8927113cb085eda +KODI_AUDIODECODER_OPUS_SITE = $(call github,notspiff,audiodecoder.opus,$(KODI_AUDIODECODER_OPUS_VERSION)) +KODI_AUDIODECODER_OPUS_LICENSE = GPLv2+ +KODI_AUDIODECODER_OPUS_LICENSE_FILES = src/OpusCodec.cpp +KODI_AUDIODECODER_OPUS_DEPENDENCIES = kodi-platform libogg opus opusfile + +$(eval $(cmake-package)) diff --git a/package/kodi-audiodecoder-sidplay/Config.in b/package/kodi-audiodecoder-sidplay/Config.in new file mode 100644 index 0000000000..ae99afa9e0 --- /dev/null +++ b/package/kodi-audiodecoder-sidplay/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_KODI_AUDIODECODER_SIDPLAY + bool "kodi-audiodecoder-sidplay" + select BR2_PACKAGE_KODI_PLATFORM + select BR2_PACKAGE_LIBSIDPLAY2 + help + Sidplay decoder addon for Kodi + + https://github.com/notspiff/audiodecoder.sidplay diff --git a/package/kodi-audiodecoder-sidplay/kodi-audiodecoder-sidplay.hash b/package/kodi-audiodecoder-sidplay/kodi-audiodecoder-sidplay.hash new file mode 100644 index 0000000000..f339654f74 --- /dev/null +++ b/package/kodi-audiodecoder-sidplay/kodi-audiodecoder-sidplay.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 11855e7b0311516602eda34c5fa4917d51220a27c3053ea831da149ae4c93757 kodi-audiodecoder-sidplay-d832f050211b4e5f085a8b09bc7d26ce32098169.tar.gz diff --git a/package/kodi-audiodecoder-sidplay/kodi-audiodecoder-sidplay.mk b/package/kodi-audiodecoder-sidplay/kodi-audiodecoder-sidplay.mk new file mode 100644 index 0000000000..d8cf438b17 --- /dev/null +++ b/package/kodi-audiodecoder-sidplay/kodi-audiodecoder-sidplay.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-sidplay +# +################################################################################ + +KODI_AUDIODECODER_SIDPLAY_VERSION = d832f050211b4e5f085a8b09bc7d26ce32098169 +KODI_AUDIODECODER_SIDPLAY_SITE = $(call github,notspiff,audiodecoder.sidplay,$(KODI_AUDIODECODER_SIDPLAY_VERSION)) +KODI_AUDIODECODER_SIDPLAY_LICENSE = GPLv2+ +KODI_AUDIODECODER_SIDPLAY_LICENSE_FILES = src/SIDCodec.cpp +KODI_AUDIODECODER_SIDPLAY_DEPENDENCIES = host-pkgconf kodi-platform libsidplay2 + +$(eval $(cmake-package)) diff --git a/package/kodi-audiodecoder-snesapu/Config.in b/package/kodi-audiodecoder-snesapu/Config.in new file mode 100644 index 0000000000..0cb572fec3 --- /dev/null +++ b/package/kodi-audiodecoder-snesapu/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_AUDIODECODER_SNESAPU + bool "kodi-audiodecoder-snesapu" + select BR2_PACKAGE_KODI_PLATFORM + help + SPC decoder addon for Kodi + + https://github.com/notspiff/audiodecoder.snesapu diff --git a/package/kodi-audiodecoder-snesapu/kodi-audiodecoder-snesapu.hash b/package/kodi-audiodecoder-snesapu/kodi-audiodecoder-snesapu.hash new file mode 100644 index 0000000000..e3da57221a --- /dev/null +++ b/package/kodi-audiodecoder-snesapu/kodi-audiodecoder-snesapu.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 6fd6e5dda0fbcdac280952e0efc0bb255ef99628c892164c26e60ee3f2ab8e4e kodi-audiodecoder-snesapu-db62e88e568994a0496d7026a10e044d70b3aa2b.tar.gz diff --git a/package/kodi-audiodecoder-snesapu/kodi-audiodecoder-snesapu.mk b/package/kodi-audiodecoder-snesapu/kodi-audiodecoder-snesapu.mk new file mode 100644 index 0000000000..f9f398ca76 --- /dev/null +++ b/package/kodi-audiodecoder-snesapu/kodi-audiodecoder-snesapu.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-snesapu +# +################################################################################ + +KODI_AUDIODECODER_SNESAPU_VERSION = db62e88e568994a0496d7026a10e044d70b3aa2b +KODI_AUDIODECODER_SNESAPU_SITE = $(call github,notspiff,audiodecoder.snesapu,$(KODI_AUDIODECODER_SNESAPU_VERSION)) +KODI_AUDIODECODER_SNESAPU_LICENSE = GPLv2+ +KODI_AUDIODECODER_SNESAPU_LICENSE_FILES = src/SPCCodec.cpp +KODI_AUDIODECODER_SNESAPU_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-audiodecoder-stsound/Config.in b/package/kodi-audiodecoder-stsound/Config.in new file mode 100644 index 0000000000..6be216a2c7 --- /dev/null +++ b/package/kodi-audiodecoder-stsound/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_AUDIODECODER_STSOUND + bool "kodi-audiodecoder-stsound" + select BR2_PACKAGE_KODI_PLATFORM + help + YM decoder addon for Kodi + + https://github.com/notspiff/audiodecoder.stsound diff --git a/package/kodi-audiodecoder-stsound/kodi-audiodecoder-stsound.hash b/package/kodi-audiodecoder-stsound/kodi-audiodecoder-stsound.hash new file mode 100644 index 0000000000..164e967634 --- /dev/null +++ b/package/kodi-audiodecoder-stsound/kodi-audiodecoder-stsound.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 2bd89d66c493ba354df5c154f313a4bd801ff019ad5c102aa54741b99dd9c608 kodi-audiodecoder-stsound-759ae7eadb94adfde8533a2a42d949c321718625.tar.gz diff --git a/package/kodi-audiodecoder-stsound/kodi-audiodecoder-stsound.mk b/package/kodi-audiodecoder-stsound/kodi-audiodecoder-stsound.mk new file mode 100644 index 0000000000..76010899b0 --- /dev/null +++ b/package/kodi-audiodecoder-stsound/kodi-audiodecoder-stsound.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-stsound +# +################################################################################ + +KODI_AUDIODECODER_STSOUND_VERSION = 759ae7eadb94adfde8533a2a42d949c321718625 +KODI_AUDIODECODER_STSOUND_SITE = $(call github,notspiff,audiodecoder.stsound,$(KODI_AUDIODECODER_STSOUND_VERSION)) +KODI_AUDIODECODER_STSOUND_LICENSE = GPLv2+ +KODI_AUDIODECODER_STSOUND_LICENSE_FILES = src/YMCodec.cpp +KODI_AUDIODECODER_STSOUND_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-audiodecoder-timidity/Config.in b/package/kodi-audiodecoder-timidity/Config.in new file mode 100644 index 0000000000..8f604adf00 --- /dev/null +++ b/package/kodi-audiodecoder-timidity/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_AUDIODECODER_TIMIDITY + bool "kodi-audiodecoder-timidity" + select BR2_PACKAGE_KODI_PLATFORM + help + Timidity decoder addon for Kodi + + https://github.com/notspiff/audiodecoder.timidity diff --git a/package/kodi-audiodecoder-timidity/kodi-audiodecoder-timidity.hash b/package/kodi-audiodecoder-timidity/kodi-audiodecoder-timidity.hash new file mode 100644 index 0000000000..d4af0197b3 --- /dev/null +++ b/package/kodi-audiodecoder-timidity/kodi-audiodecoder-timidity.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 2e220b7d279fce73ff289536cd9e94b159ae648514fb8b423977dddb99c50e85 kodi-audiodecoder-timidity-a84559da92aa67744069fc9e9dc885732588c8ce.tar.gz diff --git a/package/kodi-audiodecoder-timidity/kodi-audiodecoder-timidity.mk b/package/kodi-audiodecoder-timidity/kodi-audiodecoder-timidity.mk new file mode 100644 index 0000000000..fb680d142f --- /dev/null +++ b/package/kodi-audiodecoder-timidity/kodi-audiodecoder-timidity.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-timidity +# +################################################################################ + +KODI_AUDIODECODER_TIMIDITY_VERSION = a84559da92aa67744069fc9e9dc885732588c8ce +KODI_AUDIODECODER_TIMIDITY_SITE = $(call github,notspiff,audiodecoder.timidity,$(KODI_AUDIODECODER_TIMIDITY_VERSION)) +KODI_AUDIODECODER_TIMIDITY_LICENSE = GPLv2+ +KODI_AUDIODECODER_TIMIDITY_LICENSE_FILES = src/TimidityCodec.cpp +KODI_AUDIODECODER_TIMIDITY_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-audiodecoder-vgmstream/Config.in b/package/kodi-audiodecoder-vgmstream/Config.in new file mode 100644 index 0000000000..ebf83df23b --- /dev/null +++ b/package/kodi-audiodecoder-vgmstream/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_AUDIODECODER_VGMSTREAM + bool "kodi-audiodecoder-vgmstream" + select BR2_PACKAGE_KODI_PLATFORM + help + VGM decoder addon for Kodi + + https://github.com/notspiff/audiodecoder.vgmstream diff --git a/package/kodi-audiodecoder-vgmstream/kodi-audiodecoder-vgmstream.hash b/package/kodi-audiodecoder-vgmstream/kodi-audiodecoder-vgmstream.hash new file mode 100644 index 0000000000..5e6dfab3a3 --- /dev/null +++ b/package/kodi-audiodecoder-vgmstream/kodi-audiodecoder-vgmstream.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 7a376447e8390f01c18f22b57ea553441493625545537a023d5d896272e56369 kodi-audiodecoder-vgmstream-cb2892ac0465b0563ee45f532323198a6f722b62.tar.gz diff --git a/package/kodi-audiodecoder-vgmstream/kodi-audiodecoder-vgmstream.mk b/package/kodi-audiodecoder-vgmstream/kodi-audiodecoder-vgmstream.mk new file mode 100644 index 0000000000..447d837c47 --- /dev/null +++ b/package/kodi-audiodecoder-vgmstream/kodi-audiodecoder-vgmstream.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audiodecoder-vgmstream +# +################################################################################ + +KODI_AUDIODECODER_VGMSTREAM_VERSION = cb2892ac0465b0563ee45f532323198a6f722b62 +KODI_AUDIODECODER_VGMSTREAM_SITE = $(call github,notspiff,audiodecoder.vgmstream,$(KODI_AUDIODECODER_VGMSTREAM_VERSION)) +KODI_AUDIODECODER_VGMSTREAM_LICENSE = GPLv2+ +KODI_AUDIODECODER_VGMSTREAM_LICENSE_FILES = src/VGMCodec.cpp +KODI_AUDIODECODER_VGMSTREAM_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-audioencoder-flac/Config.in b/package/kodi-audioencoder-flac/Config.in new file mode 100644 index 0000000000..95acbbadb9 --- /dev/null +++ b/package/kodi-audioencoder-flac/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_KODI_AUDIOENCODER_FLAC + bool "kodi-audioencoder-flac" + select BR2_PACKAGE_FLAC + select BR2_PACKAGE_KODI_OPTICALDRIVE + select BR2_PACKAGE_LIBOGG + help + An audioencoder addon for Kodi + + https://github.com/xbmc/audioencoder.flac diff --git a/package/kodi-audioencoder-flac/kodi-audioencoder-flac.hash b/package/kodi-audioencoder-flac/kodi-audioencoder-flac.hash new file mode 100644 index 0000000000..f563f56b21 --- /dev/null +++ b/package/kodi-audioencoder-flac/kodi-audioencoder-flac.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 4317a01414577885ef4a0ac4f8d95714b021ad15fc668cbf36eae2fdf400bb33 kodi-audioencoder-flac-v1.0.0.tar.gz diff --git a/package/kodi-audioencoder-flac/kodi-audioencoder-flac.mk b/package/kodi-audioencoder-flac/kodi-audioencoder-flac.mk new file mode 100644 index 0000000000..ca4882629b --- /dev/null +++ b/package/kodi-audioencoder-flac/kodi-audioencoder-flac.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audioencoder-flac +# +################################################################################ + +KODI_AUDIOENCODER_FLAC_VERSION = v1.0.0 +KODI_AUDIOENCODER_FLAC_SITE = $(call github,xbmc,audioencoder.flac,$(KODI_AUDIOENCODER_FLAC_VERSION)) +KODI_AUDIOENCODER_FLAC_LICENSE = GPLv2+ +KODI_AUDIOENCODER_FLAC_LICENSE_FILES = src/EncoderFlac.cpp +KODI_AUDIOENCODER_FLAC_DEPENDENCIES = flac kodi libogg host-pkgconf + +$(eval $(cmake-package)) diff --git a/package/kodi-audioencoder-lame/Config.in b/package/kodi-audioencoder-lame/Config.in new file mode 100644 index 0000000000..dc6a0cd7e5 --- /dev/null +++ b/package/kodi-audioencoder-lame/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_KODI_AUDIOENCODER_LAME + bool "kodi-audioencoder-lame" + select BR2_PACKAGE_KODI_OPTICALDRIVE + select BR2_PACKAGE_LAME + help + An audioencoder addon for Kodi + + https://github.com/xbmc/audioencoder.lame diff --git a/package/kodi-audioencoder-lame/kodi-audioencoder-lame.hash b/package/kodi-audioencoder-lame/kodi-audioencoder-lame.hash new file mode 100644 index 0000000000..ffd38ba803 --- /dev/null +++ b/package/kodi-audioencoder-lame/kodi-audioencoder-lame.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 7fbdc6c9111431f49498157204d19dfa94bbf9e5f807b631e84129c6c491225e kodi-audioencoder-lame-v1.0.0.tar.gz diff --git a/package/kodi-audioencoder-lame/kodi-audioencoder-lame.mk b/package/kodi-audioencoder-lame/kodi-audioencoder-lame.mk new file mode 100644 index 0000000000..3e1836fc63 --- /dev/null +++ b/package/kodi-audioencoder-lame/kodi-audioencoder-lame.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-audioencoder-lame +# +################################################################################ + +KODI_AUDIOENCODER_LAME_VERSION = v1.0.0 +KODI_AUDIOENCODER_LAME_SITE = $(call github,xbmc,audioencoder.lame,$(KODI_AUDIOENCODER_LAME_VERSION)) +KODI_AUDIOENCODER_LAME_LICENSE = GPLv2+ +KODI_AUDIOENCODER_LAME_LICENSE_FILES = src/EncoderLame.cpp +KODI_AUDIOENCODER_LAME_DEPENDENCIES = kodi lame +KODI_AUDIOENCODER_LAME_CONF_OPTS += \ + -DLAME_INCLUDE_DIRS=$(STAGING_DIR)/usr/include + +$(eval $(cmake-package)) diff --git a/package/kodi-audioencoder-vorbis/Config.in b/package/kodi-audioencoder-vorbis/Config.in new file mode 100644 index 0000000000..8b84626f08 --- /dev/null +++ b/package/kodi-audioencoder-vorbis/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_KODI_AUDIOENCODER_VORBIS + bool "kodi-audioencoder-vorbis" + select BR2_PACKAGE_KODI_OPTICALDRIVE + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBVORBIS + help + An audioencoder addon for Kodi + + https://github.com/xbmc/audioencoder.vorbis diff --git a/package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.hash b/package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.hash new file mode 100644 index 0000000000..47f428c783 --- /dev/null +++ b/package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 65169e785d82f9081088df2693721f4a7e4b2d24f7e8b1e86b5f443206935303 kodi-audioencoder-vorbis-v1.0.0.tar.gz diff --git a/package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.mk b/package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.mk new file mode 100644 index 0000000000..749ea8e179 --- /dev/null +++ b/package/kodi-audioencoder-vorbis/kodi-audioencoder-vorbis.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audioencoder-vorbis +# +################################################################################ + +KODI_AUDIOENCODER_VORBIS_VERSION = v1.0.0 +KODI_AUDIOENCODER_VORBIS_SITE = $(call github,xbmc,audioencoder.vorbis,$(KODI_AUDIOENCODER_VORBIS_VERSION)) +KODI_AUDIOENCODER_VORBIS_LICENSE = GPLv2+ +KODI_AUDIOENCODER_VORBIS_LICENSE_FILES = src/EncoderVorbis.cpp +KODI_AUDIOENCODER_VORBIS_DEPENDENCIES = kodi libogg libvorbis host-pkgconf + +$(eval $(cmake-package)) diff --git a/package/kodi-audioencoder-wav/Config.in b/package/kodi-audioencoder-wav/Config.in new file mode 100644 index 0000000000..6bdbb9aa37 --- /dev/null +++ b/package/kodi-audioencoder-wav/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_AUDIOENCODER_WAV + bool "kodi-audioencoder-wav" + select BR2_PACKAGE_KODI_OPTICALDRIVE + help + An audioencoder addon for Kodi + + https://github.com/xbmc/audioencoder.wav diff --git a/package/kodi-audioencoder-wav/kodi-audioencoder-wav.hash b/package/kodi-audioencoder-wav/kodi-audioencoder-wav.hash new file mode 100644 index 0000000000..86eb13cc55 --- /dev/null +++ b/package/kodi-audioencoder-wav/kodi-audioencoder-wav.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 d4e6de5786b9e2bd3fa5e09314c9a60a8daac32cf96e8aa84ab42cacf60f7094 kodi-audioencoder-wav-v1.0.0.tar.gz diff --git a/package/kodi-audioencoder-wav/kodi-audioencoder-wav.mk b/package/kodi-audioencoder-wav/kodi-audioencoder-wav.mk new file mode 100644 index 0000000000..661ab44bd8 --- /dev/null +++ b/package/kodi-audioencoder-wav/kodi-audioencoder-wav.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-audioencoder-wav +# +################################################################################ + +KODI_AUDIOENCODER_WAV_VERSION = v1.0.0 +KODI_AUDIOENCODER_WAV_SITE = $(call github,xbmc,audioencoder.wav,$(KODI_AUDIOENCODER_WAV_VERSION)) +KODI_AUDIOENCODER_WAV_LICENSE = GPLv2+ +KODI_AUDIOENCODER_WAV_LICENSE_FILES = src/EncoderWav.cpp +KODI_AUDIOENCODER_WAV_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-platform/0001-kodiplatform-config.cmake-fix-for-cross-compilation.patch b/package/kodi-platform/0001-kodiplatform-config.cmake-fix-for-cross-compilation.patch new file mode 100644 index 0000000000..18a74e7b54 --- /dev/null +++ b/package/kodi-platform/0001-kodiplatform-config.cmake-fix-for-cross-compilation.patch @@ -0,0 +1,54 @@ +From a6e25dba4b5c1d911a4644a0ca116abc642cd72a Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 30 Jul 2015 09:28:24 +0200 +Subject: [PATCH] kodiplatform-config.cmake: fix for cross-compilation + +Use CMAKE_FIND_ROOT_PATH in kodiplatform-config.cmake in order to make +it cross-compilation friendly. + +Signed-off-by: Thomas Petazzoni +--- + CMakeLists.txt | 2 +- + kodiplatform-config.cmake.in | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 25d8004..db23dc9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -22,7 +22,7 @@ if(NOT WIN32) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") + endif() + +-set(kodiplatform_INCLUDE_DIRS ${TINYXML_INCLUDE_DIR} "${CMAKE_INSTALL_PREFIX}/include/kodi") ++set(kodiplatform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/kodi") + IF(WIN32) + LIST(APPEND kodiplatform_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/include/kodi/windows") + ENDIF(WIN32) +diff --git a/kodiplatform-config.cmake.in b/kodiplatform-config.cmake.in +index 3fc5273..1bc437a 100644 +--- a/kodiplatform-config.cmake.in ++++ b/kodiplatform-config.cmake.in +@@ -10,16 +10,16 @@ + # + # propagate these properties from one build system to the other + set (kodiplatform_VERSION "@kodiplatform_VERSION_MAJOR@.@kodiplatform_VERSION_MINOR@") +-set (kodiplatform_INCLUDE_DIRS @kodiplatform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include) ++set (kodiplatform_INCLUDE_DIRS @TINYXML_INCLUDE_DIR@ ${CMAKE_FIND_ROOT_PATH}@kodiplatform_INCLUDE_DIRS@ ${CMAKE_FIND_ROOT_PATH}@CMAKE_INSTALL_PREFIX@/include) + set (kodiplatform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@") + set (kodiplatform_LINKER_FLAGS "@kodiplatform_LINKER_FLAGS@") + set (kodiplatform_CONFIG_VARS "@kodiplatform_CONFIG_VARS@") + + # libraries come from the build tree where this file was generated + if(WIN32) +- set (kodiplatform_LIBRARY "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/kodiplatform.lib") ++ set (kodiplatform_LIBRARY "${CMAKE_FIND_ROOT_PATH}@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/kodiplatform.lib") + else(WIN32) +- set (kodiplatform_LIBRARY "-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lkodiplatform") ++ set (kodiplatform_LIBRARY "-L${CMAKE_FIND_ROOT_PATH}@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lkodiplatform") + endif(WIN32) + set (kodiplatform_LIBRARIES ${kodiplatform_LIBRARY} "@kodiplatform_LIBRARIES@") + mark_as_advanced (kodiplatform_LIBRARY) +-- +2.5.0 + diff --git a/package/kodi-platform/Config.in b/package/kodi-platform/Config.in new file mode 100644 index 0000000000..cde1925c07 --- /dev/null +++ b/package/kodi-platform/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PLATFORM + bool + select BR2_PACKAGE_LIBPLATFORM + help + Kodi add-on platform support library + + https://github.com/xbmc/kodi-platform diff --git a/package/kodi-platform/kodi-platform.hash b/package/kodi-platform/kodi-platform.hash new file mode 100644 index 0000000000..a2484484e3 --- /dev/null +++ b/package/kodi-platform/kodi-platform.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 88741358d5d54a0031553ac28aa63bc56c44d994a76f8651bac94a1e244a6595 kodi-platform-45d6ad1984fdb1dc855076ff18484dbec33939d1.tar.gz diff --git a/package/kodi-platform/kodi-platform.mk b/package/kodi-platform/kodi-platform.mk new file mode 100644 index 0000000000..4b642f9cfe --- /dev/null +++ b/package/kodi-platform/kodi-platform.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# kodi-platform +# +################################################################################ + +KODI_PLATFORM_VERSION = 45d6ad1984fdb1dc855076ff18484dbec33939d1 +KODI_PLATFORM_SITE = $(call github,xbmc,kodi-platform,$(KODI_PLATFORM_VERSION)) +KODI_PLATFORM_LICENSE = GPLv2+ +KODI_PLATFORM_LICENSE_FILES = src/util/XMLUtils.h +KODI_PLATFORM_INSTALL_STAGING = YES +KODI_PLATFORM_DEPENDENCIES = libplatform kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-argustv/Config.in b/package/kodi-pvr-argustv/Config.in new file mode 100644 index 0000000000..216000aefd --- /dev/null +++ b/package/kodi-pvr-argustv/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_KODI_PVR_ARGUSTV + bool "kodi-pvr-argustv" + select BR2_PACKAGE_JSONCPP + select BR2_PACKAGE_KODI_PLATFORM + help + Kodi's ARGUS TV client addon + + https://github.com/kodi-pvr/pvr.argustv diff --git a/package/kodi-pvr-argustv/kodi-pvr-argustv.hash b/package/kodi-pvr-argustv/kodi-pvr-argustv.hash new file mode 100644 index 0000000000..ef6438797e --- /dev/null +++ b/package/kodi-pvr-argustv/kodi-pvr-argustv.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 68fab94cabbeb0fbf6fac0fcb66e8362505ee736ae3b72c4e29867cfc44b595b kodi-pvr-argustv-2aca01c6db28fe3145b57eb5bf5841895c618507.tar.gz diff --git a/package/kodi-pvr-argustv/kodi-pvr-argustv.mk b/package/kodi-pvr-argustv/kodi-pvr-argustv.mk new file mode 100644 index 0000000000..3c0f40a29e --- /dev/null +++ b/package/kodi-pvr-argustv/kodi-pvr-argustv.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-argustv +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_ARGUSTV_VERSION = 2aca01c6db28fe3145b57eb5bf5841895c618507 +KODI_PVR_ARGUSTV_SITE = $(call github,kodi-pvr,pvr.argustv,$(KODI_PVR_ARGUSTV_VERSION)) +KODI_PVR_ARGUSTV_LICENSE = GPLv2+ +KODI_PVR_ARGUSTV_LICENSE_FILES = src/client.h +KODI_PVR_ARGUSTV_DEPENDENCIES = jsoncpp kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-dvblink/Config.in b/package/kodi-pvr-dvblink/Config.in new file mode 100644 index 0000000000..57f11271ec --- /dev/null +++ b/package/kodi-pvr-dvblink/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_KODI_PVR_DVBLINK + bool "kodi-pvr-dvblink" + select BR2_PACKAGE_KODI_PLATFORM + select BR2_PACKAGE_TINYXML2 + help + Kodi's DVBLink client addon + + https://github.com/kodi-pvr/pvr.dvblink diff --git a/package/kodi-pvr-dvblink/kodi-pvr-dvblink.hash b/package/kodi-pvr-dvblink/kodi-pvr-dvblink.hash new file mode 100644 index 0000000000..713aae0ec6 --- /dev/null +++ b/package/kodi-pvr-dvblink/kodi-pvr-dvblink.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 1c359c1a59c50f98910ec1d4bc332cd9360447e05d63f0d90b07a7ba22bc7ab6 kodi-pvr-dvblink-06c4e5603e4db0bda3f35e80344a308f486ae0f9.tar.gz diff --git a/package/kodi-pvr-dvblink/kodi-pvr-dvblink.mk b/package/kodi-pvr-dvblink/kodi-pvr-dvblink.mk new file mode 100644 index 0000000000..75ce6217b4 --- /dev/null +++ b/package/kodi-pvr-dvblink/kodi-pvr-dvblink.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-dvblink +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_DVBLINK_VERSION = 06c4e5603e4db0bda3f35e80344a308f486ae0f9 +KODI_PVR_DVBLINK_SITE = $(call github,kodi-pvr,pvr.dvblink,$(KODI_PVR_DVBLINK_VERSION)) +KODI_PVR_DVBLINK_LICENSE = GPLv2+ +KODI_PVR_DVBLINK_LICENSE_FILES = src/client.h +KODI_PVR_DVBLINK_DEPENDENCIES = kodi-platform tinyxml2 + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-dvbviewer/Config.in b/package/kodi-pvr-dvbviewer/Config.in new file mode 100644 index 0000000000..e7dd7b3eb6 --- /dev/null +++ b/package/kodi-pvr-dvbviewer/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_DVBVIEWER + bool "kodi-pvr-dvbviewer" + select BR2_PACKAGE_KODI_PLATFORM + help + Kodi's DVBViewer client addon + + https://github.com/kodi-pvr/pvr.dvbviewer diff --git a/package/kodi-pvr-dvbviewer/kodi-pvr-dvbviewer.hash b/package/kodi-pvr-dvbviewer/kodi-pvr-dvbviewer.hash new file mode 100644 index 0000000000..785fd6c2a7 --- /dev/null +++ b/package/kodi-pvr-dvbviewer/kodi-pvr-dvbviewer.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 a6a6d63e4b88df0d8b5166efdc09f6410cae736e610b328aaea49c8688bfce82 kodi-pvr-dvbviewer-26286604635a170eeea68df9b7eb52fea0056cfe.tar.gz diff --git a/package/kodi-pvr-dvbviewer/kodi-pvr-dvbviewer.mk b/package/kodi-pvr-dvbviewer/kodi-pvr-dvbviewer.mk new file mode 100644 index 0000000000..b2fae52212 --- /dev/null +++ b/package/kodi-pvr-dvbviewer/kodi-pvr-dvbviewer.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-dvbviewer +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_DVBVIEWER_VERSION = 26286604635a170eeea68df9b7eb52fea0056cfe +KODI_PVR_DVBVIEWER_SITE = $(call github,kodi-pvr,pvr.dvbviewer,$(KODI_PVR_DVBVIEWER_VERSION)) +KODI_PVR_DVBVIEWER_LICENSE = GPLv2+ +KODI_PVR_DVBVIEWER_LICENSE_FILES = src/client.h +KODI_PVR_DVBVIEWER_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-filmon/Config.in b/package/kodi-pvr-filmon/Config.in new file mode 100644 index 0000000000..0b662df176 --- /dev/null +++ b/package/kodi-pvr-filmon/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_KODI_PVR_FILMON + bool "kodi-pvr-filmon" + select BR2_PACKAGE_JSONCPP + select BR2_PACKAGE_KODI_PLATFORM + help + Filmon PVR client addon for Kodi + + https://github.com/kodi-pvr/pvr.filmon diff --git a/package/kodi-pvr-filmon/kodi-pvr-filmon.hash b/package/kodi-pvr-filmon/kodi-pvr-filmon.hash new file mode 100644 index 0000000000..b60df98235 --- /dev/null +++ b/package/kodi-pvr-filmon/kodi-pvr-filmon.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 4a51ba62239c96c16c569ca47bc7aac4a2e9e9ef4ae09dfc23d10be15afdee34 kodi-pvr-filmon-4b34b41999b86e675f794ec8e5a63c85b78c001e.tar.gz diff --git a/package/kodi-pvr-filmon/kodi-pvr-filmon.mk b/package/kodi-pvr-filmon/kodi-pvr-filmon.mk new file mode 100644 index 0000000000..0174aa4547 --- /dev/null +++ b/package/kodi-pvr-filmon/kodi-pvr-filmon.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-filmon +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_FILMON_VERSION = 4b34b41999b86e675f794ec8e5a63c85b78c001e +KODI_PVR_FILMON_SITE = $(call github,kodi-pvr,pvr.filmon,$(KODI_PVR_FILMON_VERSION)) +KODI_PVR_FILMON_LICENSE = GPLv2+ +KODI_PVR_FILMON_LICENSE_FILES = src/client.h +KODI_PVR_FILMON_DEPENDENCIES = jsoncpp kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-hdhomerun/Config.in b/package/kodi-pvr-hdhomerun/Config.in new file mode 100644 index 0000000000..ed5b914cb3 --- /dev/null +++ b/package/kodi-pvr-hdhomerun/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_KODI_PVR_HDHOMERUN + bool "kodi-pvr-hdhomerun" + select BR2_PACKAGE_JSONCPP + select BR2_PACKAGE_KODI_PLATFORM + select BR2_PACKAGE_LIBHDHOMERUN + help + Kodi's HDHomeRun client addon + + https://github.com/kodi-pvr/pvr.hdhomerun diff --git a/package/kodi-pvr-hdhomerun/kodi-pvr-hdhomerun.hash b/package/kodi-pvr-hdhomerun/kodi-pvr-hdhomerun.hash new file mode 100644 index 0000000000..fcf0468885 --- /dev/null +++ b/package/kodi-pvr-hdhomerun/kodi-pvr-hdhomerun.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 84c7dd60db6e0d0c40cc83a70ad860127d0e5c8e77c6091014055372cad5fe1f kodi-pvr-hdhomerun-aa4324eaa5f738394f21d3f54667e346eb65038e.tar.gz diff --git a/package/kodi-pvr-hdhomerun/kodi-pvr-hdhomerun.mk b/package/kodi-pvr-hdhomerun/kodi-pvr-hdhomerun.mk new file mode 100644 index 0000000000..67980fba93 --- /dev/null +++ b/package/kodi-pvr-hdhomerun/kodi-pvr-hdhomerun.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-hdhomerun +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_HDHOMERUN_VERSION = aa4324eaa5f738394f21d3f54667e346eb65038e +KODI_PVR_HDHOMERUN_SITE = $(call github,kodi-pvr,pvr.hdhomerun,$(KODI_PVR_HDHOMERUN_VERSION)) +KODI_PVR_HDHOMERUN_LICENSE = GPLv2+ +KODI_PVR_HDHOMERUN_LICENSE_FILES = src/client.h +KODI_PVR_HDHOMERUN_DEPENDENCIES = jsoncpp kodi-platform libhdhomerun + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-hts/Config.in b/package/kodi-pvr-hts/Config.in new file mode 100644 index 0000000000..c4c4497bd3 --- /dev/null +++ b/package/kodi-pvr-hts/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_HTS + bool "kodi-pvr-hts" + select BR2_PACKAGE_KODI_PLATFORM + help + Tvheadend HTSP PVR client addon for Kodi + + https://github.com/kodi-pvr/pvr.hts diff --git a/package/kodi-pvr-hts/kodi-pvr-hts.hash b/package/kodi-pvr-hts/kodi-pvr-hts.hash new file mode 100644 index 0000000000..369e6c0232 --- /dev/null +++ b/package/kodi-pvr-hts/kodi-pvr-hts.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 004dee4455d5d539b5e42d663659d4886d9a8650847ad614fa2179bbaace3783 kodi-pvr-hts-3c673b5b29fc26c203c79f7df58680af50a1afa7.tar.gz diff --git a/package/kodi-pvr-hts/kodi-pvr-hts.mk b/package/kodi-pvr-hts/kodi-pvr-hts.mk new file mode 100644 index 0000000000..4ca5a318fd --- /dev/null +++ b/package/kodi-pvr-hts/kodi-pvr-hts.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-hts +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_HTS_VERSION = 3c673b5b29fc26c203c79f7df58680af50a1afa7 +KODI_PVR_HTS_SITE = $(call github,kodi-pvr,pvr.hts,$(KODI_PVR_HTS_VERSION)) +KODI_PVR_HTS_LICENSE = GPLv2+ +KODI_PVR_HTS_LICENSE_FILES = src/client.h +KODI_PVR_HTS_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-iptvsimple/Config.in b/package/kodi-pvr-iptvsimple/Config.in new file mode 100644 index 0000000000..b59674979f --- /dev/null +++ b/package/kodi-pvr-iptvsimple/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_IPTVSIMPLE + bool "kodi-pvr-iptvsimple" + select BR2_PACKAGE_KODI_PLATFORM + help + IPTV Live TV and Radio PVR client addon for Kodi + + https://github.com/kodi-pvr/pvr.iptvsimple diff --git a/package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.hash b/package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.hash new file mode 100644 index 0000000000..cdf94fdb9f --- /dev/null +++ b/package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 5b5c67f70f47c52ccda673c3a98b5a81827835fb74289754bebf840133a84d56 kodi-pvr-iptvsimple-ae9bc1d94e97c5381b2fa59adac70a57146016cd.tar.gz diff --git a/package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.mk b/package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.mk new file mode 100644 index 0000000000..85039dd969 --- /dev/null +++ b/package/kodi-pvr-iptvsimple/kodi-pvr-iptvsimple.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-iptvsimple +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_IPTVSIMPLE_VERSION = ae9bc1d94e97c5381b2fa59adac70a57146016cd +KODI_PVR_IPTVSIMPLE_SITE = $(call github,kodi-pvr,pvr.iptvsimple,$(KODI_PVR_IPTVSIMPLE_VERSION)) +KODI_PVR_IPTVSIMPLE_LICENSE = GPLv2+ +KODI_PVR_IPTVSIMPLE_LICENSE_FILES = src/client.h +KODI_PVR_IPTVSIMPLE_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-mediaportal-tvserver/Config.in b/package/kodi-pvr-mediaportal-tvserver/Config.in new file mode 100644 index 0000000000..733ca8859e --- /dev/null +++ b/package/kodi-pvr-mediaportal-tvserver/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_MEDIAPORTAL_TVSERVER + bool "kodi-pvr-mediaportal-tvserver" + select BR2_PACKAGE_KODI_PLATFORM + help + MediaPortal TVServer PVR client addon for Kodi + + https://github.com/kodi-pvr/pvr.mediaportal.tvserver diff --git a/package/kodi-pvr-mediaportal-tvserver/kodi-pvr-mediaportal-tvserver.hash b/package/kodi-pvr-mediaportal-tvserver/kodi-pvr-mediaportal-tvserver.hash new file mode 100644 index 0000000000..74770fd3d9 --- /dev/null +++ b/package/kodi-pvr-mediaportal-tvserver/kodi-pvr-mediaportal-tvserver.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 45590c1b8dc57f2b5921641c864e68671c32db33f55db82ca62411557e9278b9 kodi-pvr-mediaportal-tvserver-a3dd464379a56131bae61b94275c14a3abcf2869.tar.gz diff --git a/package/kodi-pvr-mediaportal-tvserver/kodi-pvr-mediaportal-tvserver.mk b/package/kodi-pvr-mediaportal-tvserver/kodi-pvr-mediaportal-tvserver.mk new file mode 100644 index 0000000000..e3a4df4390 --- /dev/null +++ b/package/kodi-pvr-mediaportal-tvserver/kodi-pvr-mediaportal-tvserver.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-mediaportal-tvserver +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_MEDIAPORTAL_TVSERVER_VERSION = a3dd464379a56131bae61b94275c14a3abcf2869 +KODI_PVR_MEDIAPORTAL_TVSERVER_SITE = $(call github,kodi-pvr,pvr.mediaportal.tvserver,$(KODI_PVR_MEDIAPORTAL_TVSERVER_VERSION)) +KODI_PVR_MEDIAPORTAL_TVSERVER_LICENSE = GPLv2+ +KODI_PVR_MEDIAPORTAL_TVSERVER_LICENSE_FILES = src/client.h +KODI_PVR_MEDIAPORTAL_TVSERVER_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-mythtv/Config.in b/package/kodi-pvr-mythtv/Config.in new file mode 100644 index 0000000000..798ff3e911 --- /dev/null +++ b/package/kodi-pvr-mythtv/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_MYTHTV + bool "kodi-pvr-mythtv" + select BR2_PACKAGE_KODI_PLATFORM + help + MythTV PVR for Kodi + + https://github.com/kodi-pvr/pvr.mythtv diff --git a/package/kodi-pvr-mythtv/kodi-pvr-mythtv.hash b/package/kodi-pvr-mythtv/kodi-pvr-mythtv.hash new file mode 100644 index 0000000000..0e9eba87e2 --- /dev/null +++ b/package/kodi-pvr-mythtv/kodi-pvr-mythtv.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 f6d61b134a96a25820b616e60e43ac1ed33bd3f8b9f7612a6f6324356b78582d kodi-pvr-mythtv-84b0b6b122ca779588de5c895ef77b6bc454e859.tar.gz diff --git a/package/kodi-pvr-mythtv/kodi-pvr-mythtv.mk b/package/kodi-pvr-mythtv/kodi-pvr-mythtv.mk new file mode 100644 index 0000000000..a8a1a6daee --- /dev/null +++ b/package/kodi-pvr-mythtv/kodi-pvr-mythtv.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-mythtv +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_MYTHTV_VERSION = 84b0b6b122ca779588de5c895ef77b6bc454e859 +KODI_PVR_MYTHTV_SITE = $(call github,kodi-pvr,pvr.mythtv,$(KODI_PVR_MYTHTV_VERSION)) +KODI_PVR_MYTHTV_LICENSE = GPLv2+ +KODI_PVR_MYTHTV_LICENSE_FILES = src/client.h +KODI_PVR_MYTHTV_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-nextpvr/0001-Sync-enum-representation-of-char_class_e-in-struct-t.patch b/package/kodi-pvr-nextpvr/0001-Sync-enum-representation-of-char_class_e-in-struct-t.patch new file mode 100644 index 0000000000..18e59951c6 --- /dev/null +++ b/package/kodi-pvr-nextpvr/0001-Sync-enum-representation-of-char_class_e-in-struct-t.patch @@ -0,0 +1,48 @@ +From 2698ac4eeca3a82967ff83386460c070ce387ead Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sun, 28 Feb 2016 01:07:52 +0100 +Subject: [PATCH] Sync enum representation of char_class_e in struct traits + with definition + +Copied from +https://github.com/kodi-pvr/pvr.mediaportal.tvserver/pull/28 +https://github.com/kodi-pvr/pvr.mediaportal.tvserver/pull/35 + +Signed-off-by: Bernd Kuhls +[Patch sent upstream: https://github.com/kodi-pvr/pvr.nextpvr/pull/42] +--- + src/uri.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/uri.h b/src/uri.h +index 2757cf0..3dbca88 100644 +--- a/src/uri.h ++++ b/src/uri.h +@@ -21,13 +21,13 @@ + namespace uri + { + /// Char class. +- enum char_class_e ++ typedef enum char_class_e : signed char + { + CINV = -2, ///< invalid + CEND = -1, ///< end delimitor + CVAL = 0, ///< valid any position + CVA2 = 1, ///< valid anywhere but 1st position +- }; ++ } char_class_e_type; + + /// Traits used for parsing and encoding components. + struct traits +@@ -35,7 +35,7 @@ namespace uri + const char* begin_cstring; ///< begin cstring (or 0 if none) + const char begin_char; ///< begin char (or 0 if none) + const char end_char; ///< end char (or 0 if none) +- char char_class[256]; ///< map of char to class ++ const char_class_e_type char_class[256]; ///< map of char to class + }; + + /** +-- +2.7.0 + diff --git a/package/kodi-pvr-nextpvr/Config.in b/package/kodi-pvr-nextpvr/Config.in new file mode 100644 index 0000000000..e520426796 --- /dev/null +++ b/package/kodi-pvr-nextpvr/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_NEXTPVR + bool "kodi-pvr-nextpvr" + select BR2_PACKAGE_KODI_PLATFORM + help + Kodi's NextPVR client addon + + https://github.com/kodi-pvr/pvr.nextpvr diff --git a/package/kodi-pvr-nextpvr/kodi-pvr-nextpvr.hash b/package/kodi-pvr-nextpvr/kodi-pvr-nextpvr.hash new file mode 100644 index 0000000000..64c09cfe65 --- /dev/null +++ b/package/kodi-pvr-nextpvr/kodi-pvr-nextpvr.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 8c4a36c21dc65cc358b34e5c2db849997f0add2501c3f787f99df3ae0ea850c5 kodi-pvr-nextpvr-2055105c93e18e04e73c87578bece3edf7525e14.tar.gz diff --git a/package/kodi-pvr-nextpvr/kodi-pvr-nextpvr.mk b/package/kodi-pvr-nextpvr/kodi-pvr-nextpvr.mk new file mode 100644 index 0000000000..a8b823543e --- /dev/null +++ b/package/kodi-pvr-nextpvr/kodi-pvr-nextpvr.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-nextpvr +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_NEXTPVR_VERSION = 2055105c93e18e04e73c87578bece3edf7525e14 +KODI_PVR_NEXTPVR_SITE = $(call github,kodi-pvr,pvr.nextpvr,$(KODI_PVR_NEXTPVR_VERSION)) +KODI_PVR_NEXTPVR_LICENSE = GPLv2+ +KODI_PVR_NEXTPVR_LICENSE_FILES = src/client.h +KODI_PVR_NEXTPVR_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-njoy/Config.in b/package/kodi-pvr-njoy/Config.in new file mode 100644 index 0000000000..33c493cb8b --- /dev/null +++ b/package/kodi-pvr-njoy/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_NJOY + bool "kodi-pvr-njoy" + select BR2_PACKAGE_KODI_PLATFORM + help + Kodi's Njoy N7 client addon + + https://github.com/kodi-pvr/pvr.njoy diff --git a/package/kodi-pvr-njoy/kodi-pvr-njoy.hash b/package/kodi-pvr-njoy/kodi-pvr-njoy.hash new file mode 100644 index 0000000000..c6006d2a33 --- /dev/null +++ b/package/kodi-pvr-njoy/kodi-pvr-njoy.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 aa5e8b471993326be3622056a26ebf7387ac4758348e8f64632c1fc6979d993e kodi-pvr-njoy-480c1591d486c6166746fb8b5efc68a7aca3d0f0.tar.gz diff --git a/package/kodi-pvr-njoy/kodi-pvr-njoy.mk b/package/kodi-pvr-njoy/kodi-pvr-njoy.mk new file mode 100644 index 0000000000..0f2eecd3a6 --- /dev/null +++ b/package/kodi-pvr-njoy/kodi-pvr-njoy.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-njoy +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_NJOY_VERSION = 480c1591d486c6166746fb8b5efc68a7aca3d0f0 +KODI_PVR_NJOY_SITE = $(call github,kodi-pvr,pvr.njoy,$(KODI_PVR_NJOY_VERSION)) +KODI_PVR_NJOY_LICENSE = GPLv2+ +KODI_PVR_NJOY_LICENSE_FILES = src/client.h +KODI_PVR_NJOY_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-pctv/Config.in b/package/kodi-pvr-pctv/Config.in new file mode 100644 index 0000000000..255cd4a5f0 --- /dev/null +++ b/package/kodi-pvr-pctv/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_KODI_PVR_PCTV + bool "kodi-pvr-pctv" + select BR2_PACKAGE_JSONCPP + select BR2_PACKAGE_KODI_PLATFORM + help + PCTV PVR client addon for Kodi + + https://github.com/kodi-pvr/pvr.vdr.vnsi diff --git a/package/kodi-pvr-pctv/kodi-pvr-pctv.hash b/package/kodi-pvr-pctv/kodi-pvr-pctv.hash new file mode 100644 index 0000000000..0ff481a3e5 --- /dev/null +++ b/package/kodi-pvr-pctv/kodi-pvr-pctv.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 4c045722c326dfe152ffadb8d966e8db4caa6128a7c53b2a852fce85f803bcbc kodi-pvr-pctv-0096770e96f84c46f444e159b9b737ac8b4238dc.tar.gz diff --git a/package/kodi-pvr-pctv/kodi-pvr-pctv.mk b/package/kodi-pvr-pctv/kodi-pvr-pctv.mk new file mode 100644 index 0000000000..a9824d5c0d --- /dev/null +++ b/package/kodi-pvr-pctv/kodi-pvr-pctv.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-pctv +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_PCTV_VERSION = 0096770e96f84c46f444e159b9b737ac8b4238dc +KODI_PVR_PCTV_SITE = $(call github,kodi-pvr,pvr.pctv,$(KODI_PVR_PCTV_VERSION)) +KODI_PVR_PCTV_LICENSE = GPLv2+ +KODI_PVR_PCTV_LICENSE_FILES = src/client.h +KODI_PVR_PCTV_DEPENDENCIES = jsoncpp kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-stalker/Config.in b/package/kodi-pvr-stalker/Config.in new file mode 100644 index 0000000000..3ec530cd39 --- /dev/null +++ b/package/kodi-pvr-stalker/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_KODI_PVR_STALKER + bool "kodi-pvr-stalker" + select BR2_PACKAGE_JSONCPP + select BR2_PACKAGE_KODI_PLATFORM + help + A PVR Client that connects Kodi to Stalker Middleware + + https://github.com/kodi-pvr/pvr.stalker diff --git a/package/kodi-pvr-stalker/kodi-pvr-stalker.hash b/package/kodi-pvr-stalker/kodi-pvr-stalker.hash new file mode 100644 index 0000000000..7af1bcb28a --- /dev/null +++ b/package/kodi-pvr-stalker/kodi-pvr-stalker.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 e16cb12bd7a78b8849f370bedb8093d3cb1deb3a766a66efe4b838fc569ab50c kodi-pvr-stalker-5e588330c453141ae0a2f4fd9c02d909ac9d199e.tar.gz diff --git a/package/kodi-pvr-stalker/kodi-pvr-stalker.mk b/package/kodi-pvr-stalker/kodi-pvr-stalker.mk new file mode 100644 index 0000000000..d1fa8a0f06 --- /dev/null +++ b/package/kodi-pvr-stalker/kodi-pvr-stalker.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-stalker +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_STALKER_VERSION = 5e588330c453141ae0a2f4fd9c02d909ac9d199e +KODI_PVR_STALKER_SITE = $(call github,kodi-pvr,pvr.stalker,$(KODI_PVR_STALKER_VERSION)) +KODI_PVR_STALKER_LICENSE = GPLv2+ +KODI_PVR_STALKER_LICENSE_FILES = src/client.h +KODI_PVR_STALKER_DEPENDENCIES = jsoncpp kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-vbox/Config.in b/package/kodi-pvr-vbox/Config.in new file mode 100644 index 0000000000..3a5f8c4649 --- /dev/null +++ b/package/kodi-pvr-vbox/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_VBOX + bool "kodi-pvr-vbox" + select BR2_PACKAGE_KODI_PLATFORM + help + Kodi PVR addon for interfacing with VBox Communications XTi TV Gateway + + https://github.com/kodi-pvr/pvr.vbox diff --git a/package/kodi-pvr-vbox/kodi-pvr-vbox.hash b/package/kodi-pvr-vbox/kodi-pvr-vbox.hash new file mode 100644 index 0000000000..705c0cb3e1 --- /dev/null +++ b/package/kodi-pvr-vbox/kodi-pvr-vbox.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 8eb43fb6e2a3132324bf24787bc0545c610832648aa17c12e93676502f7fc565 kodi-pvr-vbox-15e864d160da5a051e18aef06f3a53e49808be02.tar.gz diff --git a/package/kodi-pvr-vbox/kodi-pvr-vbox.mk b/package/kodi-pvr-vbox/kodi-pvr-vbox.mk new file mode 100644 index 0000000000..593c1e7cc5 --- /dev/null +++ b/package/kodi-pvr-vbox/kodi-pvr-vbox.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-vbox +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_VBOX_VERSION = 15e864d160da5a051e18aef06f3a53e49808be02 +KODI_PVR_VBOX_SITE = $(call github,kodi-pvr,pvr.vbox,$(KODI_PVR_VBOX_VERSION)) +KODI_PVR_VBOX_LICENSE = GPLv2+ +KODI_PVR_VBOX_LICENSE_FILES = src/client.h +KODI_PVR_VBOX_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-vdr-vnsi/Config.in b/package/kodi-pvr-vdr-vnsi/Config.in new file mode 100644 index 0000000000..768dec88fd --- /dev/null +++ b/package/kodi-pvr-vdr-vnsi/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_VDR_VNSI + bool "kodi-pvr-vdr-vnsi" + select BR2_PACKAGE_KODI_PLATFORM + help + Kodi PVR addon VNSI + + https://github.com/kodi-pvr/pvr.vdr.vnsi diff --git a/package/kodi-pvr-vdr-vnsi/kodi-pvr-vdr-vnsi.hash b/package/kodi-pvr-vdr-vnsi/kodi-pvr-vdr-vnsi.hash new file mode 100644 index 0000000000..ecce639d71 --- /dev/null +++ b/package/kodi-pvr-vdr-vnsi/kodi-pvr-vdr-vnsi.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 1d9e70030b73f44786d54e42e46c6bfa7810af3e4c71ba0dca95c2aa1751ef9b kodi-pvr-vdr-vnsi-7e11b853637ec436e30e4ac826de6ee87c303482.tar.gz diff --git a/package/kodi-pvr-vdr-vnsi/kodi-pvr-vdr-vnsi.mk b/package/kodi-pvr-vdr-vnsi/kodi-pvr-vdr-vnsi.mk new file mode 100644 index 0000000000..f8e1e92730 --- /dev/null +++ b/package/kodi-pvr-vdr-vnsi/kodi-pvr-vdr-vnsi.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-vdr-vnsi +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_VDR_VNSI_VERSION = 7e11b853637ec436e30e4ac826de6ee87c303482 +KODI_PVR_VDR_VNSI_SITE = $(call github,kodi-pvr,pvr.vdr.vnsi,$(KODI_PVR_VDR_VNSI_VERSION)) +KODI_PVR_VDR_VNSI_LICENSE = GPLv2+ +KODI_PVR_VDR_VNSI_LICENSE_FILES = src/client.h +KODI_PVR_VDR_VNSI_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-vuplus/Config.in b/package/kodi-pvr-vuplus/Config.in new file mode 100644 index 0000000000..a56c4ede93 --- /dev/null +++ b/package/kodi-pvr-vuplus/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_VUPLUS + bool "kodi-pvr-vuplus" + select BR2_PACKAGE_KODI_PLATFORM + help + VuPlus PVR client addon for Kodi + + https://github.com/kodi-pvr/pvr.vuplus diff --git a/package/kodi-pvr-vuplus/kodi-pvr-vuplus.hash b/package/kodi-pvr-vuplus/kodi-pvr-vuplus.hash new file mode 100644 index 0000000000..efdb12539d --- /dev/null +++ b/package/kodi-pvr-vuplus/kodi-pvr-vuplus.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 9684775c296dfd9b925d73ed1c21bee45afba4785d1bfb226f98b09ed235a8ee kodi-pvr-vuplus-815ea2f303dbe7dd19f87c53965dfdf2358fcdc8.tar.gz diff --git a/package/kodi-pvr-vuplus/kodi-pvr-vuplus.mk b/package/kodi-pvr-vuplus/kodi-pvr-vuplus.mk new file mode 100644 index 0000000000..e839bcce8a --- /dev/null +++ b/package/kodi-pvr-vuplus/kodi-pvr-vuplus.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-vuplus +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_VUPLUS_VERSION = 815ea2f303dbe7dd19f87c53965dfdf2358fcdc8 +KODI_PVR_VUPLUS_SITE = $(call github,kodi-pvr,pvr.vuplus,$(KODI_PVR_VUPLUS_VERSION)) +KODI_PVR_VUPLUS_LICENSE = GPLv2+ +KODI_PVR_VUPLUS_LICENSE_FILES = src/client.h +KODI_PVR_VUPLUS_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-pvr-wmc/Config.in b/package/kodi-pvr-wmc/Config.in new file mode 100644 index 0000000000..2672c83434 --- /dev/null +++ b/package/kodi-pvr-wmc/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_KODI_PVR_WMC + bool "kodi-pvr-wmc" + select BR2_PACKAGE_KODI_PLATFORM + help + Kodi's Windows Media Center client addon + + https://github.com/kodi-pvr/pvr.wmc diff --git a/package/kodi-pvr-wmc/kodi-pvr-wmc.hash b/package/kodi-pvr-wmc/kodi-pvr-wmc.hash new file mode 100644 index 0000000000..6cbdede3fa --- /dev/null +++ b/package/kodi-pvr-wmc/kodi-pvr-wmc.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 25963d8acbce397b6ec940d5ee1d7a69481d295ae31876daf57d3d3537b14543 kodi-pvr-wmc-949fcd162206b569af15942180e6c133ad61e336.tar.gz diff --git a/package/kodi-pvr-wmc/kodi-pvr-wmc.mk b/package/kodi-pvr-wmc/kodi-pvr-wmc.mk new file mode 100644 index 0000000000..194bd1f2be --- /dev/null +++ b/package/kodi-pvr-wmc/kodi-pvr-wmc.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# kodi-pvr-wmc +# +################################################################################ + +# This cset is on the branch 'Jarvis' +# When Kodi is updated, then this should be updated to the corresponding branch +KODI_PVR_WMC_VERSION = 949fcd162206b569af15942180e6c133ad61e336 +KODI_PVR_WMC_SITE = $(call github,kodi-pvr,pvr.wmc,$(KODI_PVR_WMC_VERSION)) +KODI_PVR_WMC_LICENSE = GPLv2+ +KODI_PVR_WMC_LICENSE_FILES = src/client.h +KODI_PVR_WMC_DEPENDENCIES = kodi-platform + +$(eval $(cmake-package)) diff --git a/package/kodi-screensaver-asteroids/Config.in b/package/kodi-screensaver-asteroids/Config.in new file mode 100644 index 0000000000..ccc2aba6aa --- /dev/null +++ b/package/kodi-screensaver-asteroids/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_KODI_SCREENSAVER_ASTEROIDS + bool "kodi-screensaver-asteroids" + depends on BR2_PACKAGE_HAS_LIBGL + help + Asteroids screensaver for Kodi + + https://github.com/notspiff/screensaver.asteroids + +comment "kodi-screensaver-asteroids needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-screensaver-asteroids/kodi-screensaver-asteroids.hash b/package/kodi-screensaver-asteroids/kodi-screensaver-asteroids.hash new file mode 100644 index 0000000000..a70f1b0a5d --- /dev/null +++ b/package/kodi-screensaver-asteroids/kodi-screensaver-asteroids.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 b76b9ba122cebddc7c201b088d93e86fde8fc76e7e9f167ff3e43c3390088f3f kodi-screensaver-asteroids-c7ae05f1881b9abda6a1ac6beaca8d64a164c4fa.tar.gz diff --git a/package/kodi-screensaver-asteroids/kodi-screensaver-asteroids.mk b/package/kodi-screensaver-asteroids/kodi-screensaver-asteroids.mk new file mode 100644 index 0000000000..1af1f2ed6b --- /dev/null +++ b/package/kodi-screensaver-asteroids/kodi-screensaver-asteroids.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-asteroids +# +################################################################################ + +KODI_SCREENSAVER_ASTEROIDS_VERSION = c7ae05f1881b9abda6a1ac6beaca8d64a164c4fa +KODI_SCREENSAVER_ASTEROIDS_SITE = $(call github,notspiff,screensaver.asteroids,$(KODI_SCREENSAVER_ASTEROIDS_VERSION)) +KODI_SCREENSAVER_ASTEROIDS_LICENSE = GPLv2+ +KODI_SCREENSAVER_ASTEROIDS_LICENSE_FILES = src/main.cpp +KODI_SCREENSAVER_ASTEROIDS_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-screensaver-asterwave/Config.in b/package/kodi-screensaver-asterwave/Config.in new file mode 100644 index 0000000000..bd5db738ca --- /dev/null +++ b/package/kodi-screensaver-asterwave/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_KODI_SCREENSAVER_ASTERWAVE + bool "kodi-screensaver-asterwave" + depends on BR2_PACKAGE_HAS_LIBGL # libglu, libsoil + select BR2_PACKAGE_LIBGLU + select BR2_PACKAGE_LIBSOIL + help + AsterWave screensaver for Kodi + + https://github.com/notspiff/screensaver.asterwave + +comment "kodi-screensaver-asterwave needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-screensaver-asterwave/kodi-screensaver-asterwave.hash b/package/kodi-screensaver-asterwave/kodi-screensaver-asterwave.hash new file mode 100644 index 0000000000..5f04031af0 --- /dev/null +++ b/package/kodi-screensaver-asterwave/kodi-screensaver-asterwave.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 6bf9367889c4ddece7e0c3720762d41bb0b22fc9ab28d1c8759edb1f77487ecd kodi-screensaver-asterwave-0dc2c48dadb100954eef823e7e3a5f502ce65b1e.tar.gz diff --git a/package/kodi-screensaver-asterwave/kodi-screensaver-asterwave.mk b/package/kodi-screensaver-asterwave/kodi-screensaver-asterwave.mk new file mode 100644 index 0000000000..7c718ccd84 --- /dev/null +++ b/package/kodi-screensaver-asterwave/kodi-screensaver-asterwave.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# kodi-screensaver-asterwave +# +################################################################################ + +KODI_SCREENSAVER_ASTERWAVE_VERSION = 0dc2c48dadb100954eef823e7e3a5f502ce65b1e +KODI_SCREENSAVER_ASTERWAVE_SITE = $(call github,notspiff,screensaver.asterwave,$(KODI_SCREENSAVER_ASTERWAVE_VERSION)) +KODI_SCREENSAVER_ASTERWAVE_DEPENDENCIES = kodi libglu libsoil + +$(eval $(cmake-package)) diff --git a/package/kodi-screensaver-biogenesis/Config.in b/package/kodi-screensaver-biogenesis/Config.in new file mode 100644 index 0000000000..cdc2d91951 --- /dev/null +++ b/package/kodi-screensaver-biogenesis/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_KODI_SCREENSAVER_BIOGENESIS + bool "kodi-screensaver-biogenesis" + depends on BR2_PACKAGE_HAS_LIBGL + help + BioGenesis screensaver for Kodi + + https://github.com/notspiff/screensaver.biogenesis + +comment "kodi-screensaver-biogenesis needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-screensaver-biogenesis/kodi-screensaver-biogenesis.hash b/package/kodi-screensaver-biogenesis/kodi-screensaver-biogenesis.hash new file mode 100644 index 0000000000..6fc273d184 --- /dev/null +++ b/package/kodi-screensaver-biogenesis/kodi-screensaver-biogenesis.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 25e497c6843a7d933d1e4736e8dcb671bc9881328d5e27349dd0b25cb9be07eb kodi-screensaver-biogenesis-39928eef56ed639085d401dd97bf18f44b1f3e8b.tar.gz diff --git a/package/kodi-screensaver-biogenesis/kodi-screensaver-biogenesis.mk b/package/kodi-screensaver-biogenesis/kodi-screensaver-biogenesis.mk new file mode 100644 index 0000000000..dce6968d28 --- /dev/null +++ b/package/kodi-screensaver-biogenesis/kodi-screensaver-biogenesis.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-biogenesis +# +################################################################################ + +KODI_SCREENSAVER_BIOGENESIS_VERSION = 39928eef56ed639085d401dd97bf18f44b1f3e8b +KODI_SCREENSAVER_BIOGENESIS_SITE = $(call github,notspiff,screensaver.biogenesis,$(KODI_SCREENSAVER_BIOGENESIS_VERSION)) +KODI_SCREENSAVER_BIOGENESIS_LICENSE = GPLv2+ +KODI_SCREENSAVER_BIOGENESIS_LICENSE_FILES = src/Life.cpp +KODI_SCREENSAVER_BIOGENESIS_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-screensaver-cpblobs/Config.in b/package/kodi-screensaver-cpblobs/Config.in new file mode 100644 index 0000000000..e80ea0ebb3 --- /dev/null +++ b/package/kodi-screensaver-cpblobs/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_KODI_SCREENSAVER_CPBLOBS + bool "kodi-screensaver-cpblobs" + depends on BR2_PACKAGE_HAS_LIBGL # libsoil + select BR2_PACKAGE_LIBSOIL + help + CpBlobs screensaver for Kodi + + https://github.com/notspiff/screensaver.cpblobs + +comment "kodi-screensaver-cpblobs needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-screensaver-cpblobs/kodi-screensaver-cpblobs.hash b/package/kodi-screensaver-cpblobs/kodi-screensaver-cpblobs.hash new file mode 100644 index 0000000000..ebf19d9dee --- /dev/null +++ b/package/kodi-screensaver-cpblobs/kodi-screensaver-cpblobs.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 c2d19c33aff73b99cbf51f943b62e58b2b6233dcf1d789ae8f73e92fa96f07bc kodi-screensaver-cpblobs-87a3abfbe6e4fd1089548eab77a84902d0e1af60.tar.gz diff --git a/package/kodi-screensaver-cpblobs/kodi-screensaver-cpblobs.mk b/package/kodi-screensaver-cpblobs/kodi-screensaver-cpblobs.mk new file mode 100644 index 0000000000..bf67ea089a --- /dev/null +++ b/package/kodi-screensaver-cpblobs/kodi-screensaver-cpblobs.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-cpblobs +# +################################################################################ + +KODI_SCREENSAVER_CPBLOBS_VERSION = 87a3abfbe6e4fd1089548eab77a84902d0e1af60 +KODI_SCREENSAVER_CPBLOBS_SITE = $(call github,notspiff,screensaver.cpblobs,$(KODI_SCREENSAVER_CPBLOBS_VERSION)) +KODI_SCREENSAVER_CPBLOBS_LICENSE = GPLv2 +KODI_SCREENSAVER_CPBLOBS_LICENSE_FILES = LICENSE +KODI_SCREENSAVER_CPBLOBS_DEPENDENCIES = kodi libsoil + +$(eval $(cmake-package)) diff --git a/package/kodi-screensaver-crystalmorph/Config.in b/package/kodi-screensaver-crystalmorph/Config.in new file mode 100644 index 0000000000..1303d229fd --- /dev/null +++ b/package/kodi-screensaver-crystalmorph/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_KODI_SCREENSAVER_CRYSTALMORPH + bool "kodi-screensaver-crystalmorph" + depends on BR2_PACKAGE_HAS_LIBGL # libglu + help + CrystalMorph screensaver for Kodi + + https://github.com/notspiff/screensaver.crystalmorph + +comment "kodi-screensaver-crystalmorph needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-screensaver-crystalmorph/kodi-screensaver-crystalmorph.hash b/package/kodi-screensaver-crystalmorph/kodi-screensaver-crystalmorph.hash new file mode 100644 index 0000000000..01183d74f0 --- /dev/null +++ b/package/kodi-screensaver-crystalmorph/kodi-screensaver-crystalmorph.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 680e9354adcb7048b5c2b55b3c49cf37cea0e12e6564018cd694feeb253c90dd kodi-screensaver-crystalmorph-2e7c10e3543f5aaab6fd2f5aa9d05b976a43ba68.tar.gz diff --git a/package/kodi-screensaver-crystalmorph/kodi-screensaver-crystalmorph.mk b/package/kodi-screensaver-crystalmorph/kodi-screensaver-crystalmorph.mk new file mode 100644 index 0000000000..49ddb43c3a --- /dev/null +++ b/package/kodi-screensaver-crystalmorph/kodi-screensaver-crystalmorph.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-crystalmorph +# +################################################################################ + +KODI_SCREENSAVER_CRYSTALMORPH_VERSION = 2e7c10e3543f5aaab6fd2f5aa9d05b976a43ba68 +KODI_SCREENSAVER_CRYSTALMORPH_SITE = $(call github,notspiff,screensaver.crystalmorph,$(KODI_SCREENSAVER_CRYSTALMORPH_VERSION)) +KODI_SCREENSAVER_CRYSTALMORPH_LICENSE = GPLv2+ +KODI_SCREENSAVER_CRYSTALMORPH_LICENSE_FILES = src/Fractal.cpp +KODI_SCREENSAVER_CRYSTALMORPH_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-screensaver-greynetic/Config.in b/package/kodi-screensaver-greynetic/Config.in new file mode 100644 index 0000000000..ce636b8271 --- /dev/null +++ b/package/kodi-screensaver-greynetic/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_KODI_SCREENSAVER_GREYNETIC + bool "kodi-screensaver-greynetic" + depends on BR2_PACKAGE_HAS_LIBGL + help + Greynetic screensaver for Kodi + + https://github.com/notspiff/screensaver.greynetic + +comment "kodi-screensaver-greynetic needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-screensaver-greynetic/kodi-screensaver-greynetic.hash b/package/kodi-screensaver-greynetic/kodi-screensaver-greynetic.hash new file mode 100644 index 0000000000..93394532e6 --- /dev/null +++ b/package/kodi-screensaver-greynetic/kodi-screensaver-greynetic.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 fc114434db18a885fda30ac6b82fe82ec1d5ed97e2ff6414b4927487da684871 kodi-screensaver-greynetic-80e850eb3cbc7ee2c937fcab666dc45d2b2ee0bb.tar.gz diff --git a/package/kodi-screensaver-greynetic/kodi-screensaver-greynetic.mk b/package/kodi-screensaver-greynetic/kodi-screensaver-greynetic.mk new file mode 100644 index 0000000000..9773bac1c3 --- /dev/null +++ b/package/kodi-screensaver-greynetic/kodi-screensaver-greynetic.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-greynetic +# +################################################################################ + +KODI_SCREENSAVER_GREYNETIC_VERSION = 80e850eb3cbc7ee2c937fcab666dc45d2b2ee0bb +KODI_SCREENSAVER_GREYNETIC_SITE = $(call github,notspiff,screensaver.greynetic,$(KODI_SCREENSAVER_GREYNETIC_VERSION)) +KODI_SCREENSAVER_GREYNETIC_LICENSE = GPLv2+ +KODI_SCREENSAVER_GREYNETIC_LICENSE_FILES = src/GreyNetic.cpp +KODI_SCREENSAVER_GREYNETIC_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-screensaver-matrixtrails/Config.in b/package/kodi-screensaver-matrixtrails/Config.in new file mode 100644 index 0000000000..e2d3f71acf --- /dev/null +++ b/package/kodi-screensaver-matrixtrails/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_KODI_SCREENSAVER_MATRIXTRAILS + bool "kodi-screensaver-matrixtrails" + depends on BR2_PACKAGE_HAS_LIBGL # libsoil + select BR2_PACKAGE_LIBSOIL + help + Matrix trails screensaver for Kodi + + https://github.com/notspiff/screensaver.matrixtrails + +comment "kodi-screensaver-matrixtrails needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-screensaver-matrixtrails/kodi-screensaver-matrixtrails.hash b/package/kodi-screensaver-matrixtrails/kodi-screensaver-matrixtrails.hash new file mode 100644 index 0000000000..5ae2459cff --- /dev/null +++ b/package/kodi-screensaver-matrixtrails/kodi-screensaver-matrixtrails.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 91990a29072cf85f4b9253a16a362d83fdfcc7595de796d982a189aa8618555c kodi-screensaver-matrixtrails-16057e7195f930109f0a4aea999296ca315700e5.tar.gz diff --git a/package/kodi-screensaver-matrixtrails/kodi-screensaver-matrixtrails.mk b/package/kodi-screensaver-matrixtrails/kodi-screensaver-matrixtrails.mk new file mode 100644 index 0000000000..5ecacdf56f --- /dev/null +++ b/package/kodi-screensaver-matrixtrails/kodi-screensaver-matrixtrails.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# kodi-screensaver-matrixtrails +# +################################################################################ + +KODI_SCREENSAVER_MATRIXTRAILS_VERSION = 16057e7195f930109f0a4aea999296ca315700e5 +KODI_SCREENSAVER_MATRIXTRAILS_SITE = $(call github,notspiff,screensaver.matrixtrails,$(KODI_SCREENSAVER_MATRIXTRAILS_VERSION)) +KODI_SCREENSAVER_MATRIXTRAILS_LICENSE = GPLv2+ +KODI_SCREENSAVER_MATRIXTRAILS_LICENSE_FILES = src/matrixtrails.cpp + +KODI_SCREENSAVER_MATRIXTRAILS_DEPENDENCIES = kodi libsoil + +$(eval $(cmake-package)) diff --git a/package/kodi-screensaver-pingpong/Config.in b/package/kodi-screensaver-pingpong/Config.in new file mode 100644 index 0000000000..3971052b94 --- /dev/null +++ b/package/kodi-screensaver-pingpong/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_KODI_SCREENSAVER_PINGPONG + bool "kodi-screensaver-pingpong" + depends on BR2_PACKAGE_HAS_LIBGL + help + Ping-pong screensaver for Kodi + + https://github.com/notspiff/screensaver.pingpong + +comment "kodi-screensaver-pingpong needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-screensaver-pingpong/kodi-screensaver-pingpong.hash b/package/kodi-screensaver-pingpong/kodi-screensaver-pingpong.hash new file mode 100644 index 0000000000..79d4dd40a7 --- /dev/null +++ b/package/kodi-screensaver-pingpong/kodi-screensaver-pingpong.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 59a5cdfa6387760205efabcd91bc64fdc92f103c8f213b650018160f6c1a691c kodi-screensaver-pingpong-5c7cf6fd9f9ff1468f620bb891e66bebd3a5fe17.tar.gz diff --git a/package/kodi-screensaver-pingpong/kodi-screensaver-pingpong.mk b/package/kodi-screensaver-pingpong/kodi-screensaver-pingpong.mk new file mode 100644 index 0000000000..2adf9601f4 --- /dev/null +++ b/package/kodi-screensaver-pingpong/kodi-screensaver-pingpong.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-pingpong +# +################################################################################ + +KODI_SCREENSAVER_PINGPONG_VERSION = 5c7cf6fd9f9ff1468f620bb891e66bebd3a5fe17 +KODI_SCREENSAVER_PINGPONG_SITE = $(call github,notspiff,screensaver.pingpong,$(KODI_SCREENSAVER_PINGPONG_VERSION)) +KODI_SCREENSAVER_PINGPONG_LICENSE = GPLv2+ +KODI_SCREENSAVER_PINGPONG_LICENSE_FILES = src/readme.txt +KODI_SCREENSAVER_PINGPONG_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-screensaver-planestate/Config.in b/package/kodi-screensaver-planestate/Config.in new file mode 100644 index 0000000000..b63d70e641 --- /dev/null +++ b/package/kodi-screensaver-planestate/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_KODI_SCREENSAVER_PLANESTATE + bool "kodi-screensaver-planestate" + depends on BR2_PACKAGE_HAS_LIBGL # libsoil + select BR2_PACKAGE_LIBSOIL + help + PlaneState screensaver for Kodi + + https://github.com/notspiff/screensaver.planestate + +comment "kodi-screensaver-planestate needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-screensaver-planestate/kodi-screensaver-planestate.hash b/package/kodi-screensaver-planestate/kodi-screensaver-planestate.hash new file mode 100644 index 0000000000..9aea929257 --- /dev/null +++ b/package/kodi-screensaver-planestate/kodi-screensaver-planestate.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 13ce2881f8eaf9936691cf66b9f3471a718ae87249d62ade55174201873fb496 kodi-screensaver-planestate-95b6d1ec72f37bcd16cf8e5d49806193dba883f0.tar.gz diff --git a/package/kodi-screensaver-planestate/kodi-screensaver-planestate.mk b/package/kodi-screensaver-planestate/kodi-screensaver-planestate.mk new file mode 100644 index 0000000000..38885c5cbc --- /dev/null +++ b/package/kodi-screensaver-planestate/kodi-screensaver-planestate.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# kodi-screensaver-planestate +# +################################################################################ + +KODI_SCREENSAVER_PLANESTATE_VERSION = 95b6d1ec72f37bcd16cf8e5d49806193dba883f0 +KODI_SCREENSAVER_PLANESTATE_SITE = $(call github,notspiff,screensaver.planestate,$(KODI_SCREENSAVER_PLANESTATE_VERSION)) +KODI_SCREENSAVER_PLANESTATE_DEPENDENCIES = kodi libsoil + +$(eval $(cmake-package)) diff --git a/package/kodi-screensaver-pyro/Config.in b/package/kodi-screensaver-pyro/Config.in new file mode 100644 index 0000000000..982542d5a3 --- /dev/null +++ b/package/kodi-screensaver-pyro/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_KODI_SCREENSAVER_PYRO + bool "kodi-screensaver-pyro" + depends on BR2_PACKAGE_HAS_LIBGL + help + Pyro screensaver for Kodi + + https://github.com/notspiff/screensaver.pyro + +comment "kodi-screensaver-pyro needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-screensaver-pyro/kodi-screensaver-pyro.hash b/package/kodi-screensaver-pyro/kodi-screensaver-pyro.hash new file mode 100644 index 0000000000..c79e3f5f1f --- /dev/null +++ b/package/kodi-screensaver-pyro/kodi-screensaver-pyro.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 951bc3259407b7f21183c34556b1efc4c40bfafec61008cd543f382f67466184 kodi-screensaver-pyro-2476b77d9954980a27e07eb8eb0727e2af226351.tar.gz diff --git a/package/kodi-screensaver-pyro/kodi-screensaver-pyro.mk b/package/kodi-screensaver-pyro/kodi-screensaver-pyro.mk new file mode 100644 index 0000000000..f90405275e --- /dev/null +++ b/package/kodi-screensaver-pyro/kodi-screensaver-pyro.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-pyro +# +################################################################################ + +KODI_SCREENSAVER_PYRO_VERSION = 2476b77d9954980a27e07eb8eb0727e2af226351 +KODI_SCREENSAVER_PYRO_SITE = $(call github,notspiff,screensaver.pyro,$(KODI_SCREENSAVER_PYRO_VERSION)) +KODI_SCREENSAVER_PYRO_LICENSE = GPLv2+ +KODI_SCREENSAVER_PYRO_LICENSE_FILES = src/Pyro.cpp +KODI_SCREENSAVER_PYRO_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-screensaver-rsxs/0001-cross-compile.patch b/package/kodi-screensaver-rsxs/0001-cross-compile.patch new file mode 100644 index 0000000000..56c2f4e4ba --- /dev/null +++ b/package/kodi-screensaver-rsxs/0001-cross-compile.patch @@ -0,0 +1,37 @@ +Fix cross-compilation + +Use the cross-compiler and not the host version. + +Patch sent upstream: +https://github.com/notspiff/screensavers.rsxs/pull/5 + +Signed-off-by: Bernd Kuhls + +diff -uNr screensavers.rsxs-195e0ec3fbbcb2ee2012cd560e42d05167f0f259.org/CMakeLists.txt screensavers.rsxs-195e0ec3fbbcb2ee2012cd560e42d05167f0f259/CMakeLists.txt +--- screensavers.rsxs-195e0ec3fbbcb2ee2012cd560e42d05167f0f259.org/CMakeLists.txt 2015-03-19 12:20:23.000000000 +0100 ++++ screensavers.rsxs-195e0ec3fbbcb2ee2012cd560e42d05167f0f259/CMakeLists.txt 2015-07-19 20:26:16.660481032 +0200 +@@ -33,6 +33,11 @@ + ${PROJECT_SOURCE_DIR}/${rsxs_dir}/src/skyrocket + ${PROJECT_SOURCE_DIR}/${rsxs_dir}/src/solarwinds) + ++ ++get_filename_component( COMPILER_FILENAME "${CMAKE_C_COMPILER}" NAME ) ++string( REGEX REPLACE "-[^-]+$" "" ++ TOOLCHAIN_NAME "${COMPILER_FILENAME}" ) ++ + include(ExternalProject) + set(update_command "") + if(BOOTSTRAP_IN_TREE OR NOT DEFINED BOOTSTRAP_IN_TREE) +@@ -46,8 +51,11 @@ + endif() + endif() + externalproject_add(rsxs SOURCE_DIR ${PROJECT_SOURCE_DIR}/${rsxs_dir} +- CONFIGURE_COMMAND ${configure_start} ++ CONFIGURE_COMMAND gl_cv_func_gettimeofday_clobber=no ++ ac_cv_func_malloc_0_nonnull=yes ++ ${configure_start} + --prefix= ++ --host=${TOOLCHAIN_NAME} + --without-xscreensaver + --disable-cyclone + --disable-euphoria diff --git a/package/kodi-screensaver-rsxs/Config.in b/package/kodi-screensaver-rsxs/Config.in new file mode 100644 index 0000000000..11546ad1f8 --- /dev/null +++ b/package/kodi-screensaver-rsxs/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_KODI_SCREENSAVER_RSXS + bool "kodi-screensaver-rsxs" + depends on BR2_PACKAGE_HAS_LIBGL # libglu + depends on BR2_PACKAGE_XORG7 # xlib_libXmu + select BR2_PACKAGE_XLIB_LIBXMU + help + RSXS screensaver add-ons for Kodi + + https://github.com/notspiff/screensavers.rsxs + +comment "kodi-screensaver-rsxs depends on X.org and needs OpenGL" + depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-screensaver-rsxs/kodi-screensaver-rsxs.hash b/package/kodi-screensaver-rsxs/kodi-screensaver-rsxs.hash new file mode 100644 index 0000000000..568b44b37c --- /dev/null +++ b/package/kodi-screensaver-rsxs/kodi-screensaver-rsxs.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 0797ffb720056ea2e04ac8b7ee4fc2dca1e42611ef138b347e928d8d7f3c696f kodi-screensaver-rsxs-195e0ec3fbbcb2ee2012cd560e42d05167f0f259.tar.gz diff --git a/package/kodi-screensaver-rsxs/kodi-screensaver-rsxs.mk b/package/kodi-screensaver-rsxs/kodi-screensaver-rsxs.mk new file mode 100644 index 0000000000..7df6c22cef --- /dev/null +++ b/package/kodi-screensaver-rsxs/kodi-screensaver-rsxs.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# kodi-screensaver-rsxs +# +################################################################################ + +KODI_SCREENSAVER_RSXS_VERSION = 195e0ec3fbbcb2ee2012cd560e42d05167f0f259 +KODI_SCREENSAVER_RSXS_SITE = $(call github,notspiff,screensavers.rsxs,$(KODI_SCREENSAVER_RSXS_VERSION)) +KODI_SCREENSAVER_RSXS_LICENSE = GPLv3 +KODI_SCREENSAVER_RSXS_LICENSE_FILES = lib/rsxs-1.0/COPYING + +KODI_SCREENSAVER_RSXS_DEPENDENCIES = kodi xlib_libXmu + +$(eval $(cmake-package)) diff --git a/package/kodi-screensaver-stars/Config.in b/package/kodi-screensaver-stars/Config.in new file mode 100644 index 0000000000..bcfb47b2cc --- /dev/null +++ b/package/kodi-screensaver-stars/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_KODI_SCREENSAVER_STARS + bool "kodi-screensaver-stars" + depends on BR2_PACKAGE_HAS_LIBGL + help + Starfield screensaver for Kodi + + https://github.com/notspiff/screensaver.stars + +comment "kodi-screensaver-stars needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-screensaver-stars/kodi-screensaver-stars.hash b/package/kodi-screensaver-stars/kodi-screensaver-stars.hash new file mode 100644 index 0000000000..107ada4701 --- /dev/null +++ b/package/kodi-screensaver-stars/kodi-screensaver-stars.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 79633afcdccf5df31c98d2144bd23086d691e7749255b4295b183b535d9b7abf kodi-screensaver-stars-28bf79d4dce040e9fbdc25f51007e13950cab937.tar.gz diff --git a/package/kodi-screensaver-stars/kodi-screensaver-stars.mk b/package/kodi-screensaver-stars/kodi-screensaver-stars.mk new file mode 100644 index 0000000000..b5b5206d1f --- /dev/null +++ b/package/kodi-screensaver-stars/kodi-screensaver-stars.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-screensaver-stars +# +################################################################################ + +KODI_SCREENSAVER_STARS_VERSION = 28bf79d4dce040e9fbdc25f51007e13950cab937 +KODI_SCREENSAVER_STARS_SITE = $(call github,notspiff,screensaver.stars,$(KODI_SCREENSAVER_STARS_VERSION)) +KODI_SCREENSAVER_STARS_LICENSE = GPLv2+ +KODI_SCREENSAVER_STARS_LICENSE_FILES = src/StarField.cpp +KODI_SCREENSAVER_STARS_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-visualisation-fishbmc/Config.in b/package/kodi-visualisation-fishbmc/Config.in new file mode 100644 index 0000000000..9e2eabbdbc --- /dev/null +++ b/package/kodi-visualisation-fishbmc/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_KODI_VISUALISATION_FISHBMC + bool "kodi-visualisation-fishbmc" + depends on BR2_PACKAGE_HAS_LIBGL + help + Fische visualiser for Kodi + + https://github.com/notspiff/visualization.fishbmc + +comment "kodi-visualisation-fishbmc needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-visualisation-fishbmc/kodi-visualisation-fishbmc.hash b/package/kodi-visualisation-fishbmc/kodi-visualisation-fishbmc.hash new file mode 100644 index 0000000000..6a65a58fea --- /dev/null +++ b/package/kodi-visualisation-fishbmc/kodi-visualisation-fishbmc.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 7047d501942bcd5095e0f1424f003caec8eb792b59d16d16ad25f14829844e50 kodi-visualisation-fishbmc-50c38c296a62e096a2216e43b86d864ee265c506.tar.gz diff --git a/package/kodi-visualisation-fishbmc/kodi-visualisation-fishbmc.mk b/package/kodi-visualisation-fishbmc/kodi-visualisation-fishbmc.mk new file mode 100644 index 0000000000..1e07774f14 --- /dev/null +++ b/package/kodi-visualisation-fishbmc/kodi-visualisation-fishbmc.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-visualisation-fishbmc +# +################################################################################ + +KODI_VISUALISATION_FISHBMC_VERSION = 50c38c296a62e096a2216e43b86d864ee265c506 +KODI_VISUALISATION_FISHBMC_SITE = $(call github,notspiff,visualization.fishbmc,$(KODI_VISUALISATION_FISHBMC_VERSION)) +KODI_VISUALISATION_FISHBMC_LICENSE = GPLv2+ +KODI_VISUALISATION_FISHBMC_LICENSE_FILES = visualization.fishbmc/LICENSE +KODI_VISUALISATION_FISHBMC_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-visualisation-fountain/Config.in b/package/kodi-visualisation-fountain/Config.in new file mode 100644 index 0000000000..570d169338 --- /dev/null +++ b/package/kodi-visualisation-fountain/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_KODI_VISUALISATION_FOUNTAIN + bool "kodi-visualisation-fountain" + depends on BR2_PACKAGE_HAS_LIBGL # libsoil + select BR2_PACKAGE_LIBSOIL + help + Fountain visualization for Kodi + + https://github.com/notspiff/visualization.fountain + +comment "kodi-visualisation-fountain needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-visualisation-fountain/kodi-visualisation-fountain.hash b/package/kodi-visualisation-fountain/kodi-visualisation-fountain.hash new file mode 100644 index 0000000000..8dc933effa --- /dev/null +++ b/package/kodi-visualisation-fountain/kodi-visualisation-fountain.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 7b2867f415f22e4bc4ba834034f00117fcf76774aea0afc7bf30b5f2d1991dd7 kodi-visualisation-fountain-f22deacd2396a204694d346f85369ea9ea70e16f.tar.gz diff --git a/package/kodi-visualisation-fountain/kodi-visualisation-fountain.mk b/package/kodi-visualisation-fountain/kodi-visualisation-fountain.mk new file mode 100644 index 0000000000..5684402a2a --- /dev/null +++ b/package/kodi-visualisation-fountain/kodi-visualisation-fountain.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# kodi-visualisation-fountain +# +################################################################################ + +KODI_VISUALISATION_FOUNTAIN_VERSION = f22deacd2396a204694d346f85369ea9ea70e16f +KODI_VISUALISATION_FOUNTAIN_SITE = $(call github,notspiff,visualization.fountain,$(KODI_VISUALISATION_FOUNTAIN_VERSION)) +KODI_VISUALISATION_FOUNTAIN_DEPENDENCIES = kodi libsoil + +$(eval $(cmake-package)) diff --git a/package/kodi-visualisation-goom/0001-cross-compile.patch b/package/kodi-visualisation-goom/0001-cross-compile.patch new file mode 100644 index 0000000000..8dd0fe9109 --- /dev/null +++ b/package/kodi-visualisation-goom/0001-cross-compile.patch @@ -0,0 +1,32 @@ +Fix cross-compilation + +Use the cross-compiler and not the host version. + +Patch sent upstream: +https://github.com/notspiff/visualization.goom/pull/4 + +Signed-off-by: Bernd Kuhls + +diff -uNr visualization.goom-fb5933ba5b2143d055cc7749dc60a82f6002b305.org/CMakeLists.txt visualization.goom-fb5933ba5b2143d055cc7749dc60a82f6002b305/CMakeLists.txt +--- visualization.goom-fb5933ba5b2143d055cc7749dc60a82f6002b305.org/CMakeLists.txt 2014-10-31 11:34:21.000000000 +0100 ++++ visualization.goom-fb5933ba5b2143d055cc7749dc60a82f6002b305/CMakeLists.txt 2015-07-19 19:49:43.340054342 +0200 +@@ -13,6 +13,10 @@ + ${KODI_INCLUDE_DIR} + ${PROJECT_SOURCE_DIR}/lib/goom2k4-0/src) + ++get_filename_component( COMPILER_FILENAME "${CMAKE_C_COMPILER}" NAME ) ++string( REGEX REPLACE "-[^-]+$" "" ++ TOOLCHAIN_NAME "${COMPILER_FILENAME}" ) ++ + include(ExternalProject) + set(update_command "") + if(BOOTSTRAP_IN_TREE OR NOT DEFINED BOOTSTRAP_IN_TREE) +@@ -20,7 +24,7 @@ + endif() + externalproject_add(libgoom SOURCE_DIR ${PROJECT_SOURCE_DIR}/lib/goom2k4-0 + "${update_command}" +- CONFIGURE_COMMAND ${PROJECT_SOURCE_DIR}/lib/goom2k4-0/configure --disable-shared --enable-static --with-pic --prefix= ++ CONFIGURE_COMMAND ${PROJECT_SOURCE_DIR}/lib/goom2k4-0/configure --disable-shared --enable-static --with-pic --prefix= --host=${TOOLCHAIN_NAME} + BUILD_COMMAND ${MAKE} + INSTALL_COMMAND "") + diff --git a/package/kodi-visualisation-goom/Config.in b/package/kodi-visualisation-goom/Config.in new file mode 100644 index 0000000000..de4d2ef2ff --- /dev/null +++ b/package/kodi-visualisation-goom/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_KODI_VISUALISATION_GOOM + bool "kodi-visualisation-goom" + depends on BR2_PACKAGE_HAS_LIBGL + help + GOOM visualiser for Kodi + + https://github.com/notspiff/visualization.goom + +comment "kodi-visualization-goom needs OpenGL" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/kodi-visualisation-goom/kodi-visualisation-goom.hash b/package/kodi-visualisation-goom/kodi-visualisation-goom.hash new file mode 100644 index 0000000000..8507c652a5 --- /dev/null +++ b/package/kodi-visualisation-goom/kodi-visualisation-goom.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 66a71a5c5a1c0016d7020fcc9941634ee465dab14644cdc96023ce0a28408338 kodi-visualisation-goom-16747b7dba9cbdcfdc8df44e849eaf09450fc86f.tar.gz diff --git a/package/kodi-visualisation-goom/kodi-visualisation-goom.mk b/package/kodi-visualisation-goom/kodi-visualisation-goom.mk new file mode 100644 index 0000000000..89f2bab1d6 --- /dev/null +++ b/package/kodi-visualisation-goom/kodi-visualisation-goom.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# kodi-visualisation-goom +# +################################################################################ + +KODI_VISUALISATION_GOOM_VERSION = 16747b7dba9cbdcfdc8df44e849eaf09450fc86f +KODI_VISUALISATION_GOOM_SITE = $(call github,notspiff,visualization.goom,$(KODI_VISUALISATION_GOOM_VERSION)) +KODI_VISUALISATION_GOOM_LICENSE = GPLv2+ +KODI_VISUALISATION_GOOM_LICENSE_FILES = src/Main.cpp + +KODI_VISUALISATION_GOOM_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-visualisation-shadertoy/0001-FindOpenGLES2-also-search-for-egl-with-pkg-config.patch b/package/kodi-visualisation-shadertoy/0001-FindOpenGLES2-also-search-for-egl-with-pkg-config.patch new file mode 100644 index 0000000000..6737296fe7 --- /dev/null +++ b/package/kodi-visualisation-shadertoy/0001-FindOpenGLES2-also-search-for-egl-with-pkg-config.patch @@ -0,0 +1,44 @@ +From 9c428c3c9f120a11468f98546bcc754d2c3302af Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 30 Jul 2015 10:02:15 +0200 +Subject: [PATCH] FindOpenGLES2: also search for egl with pkg-config + +The non-pkg-config path looks for both EGL *and* OpenGL ES, but not +the pkg-config path, which might lead to missing libraries/headers if +egl.pc has more header paths or libraries than glesv2.pc. + +Signed-off-by: Thomas Petazzoni +--- + CMakeLists.txt | 2 +- + FindOpenGLES2.cmake | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8b084cf..81bbe27 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,7 +35,7 @@ + endif() + endif() + +- include_directories(${OpenGL_INCLUDE_DIR} ++ include_directories(${OpenGL_INCLUDE_DIR} ${OpenGLES2_INCLUDE_DIRS} + ${GLEW_INCLUDE_DIR} + ${KODI_INCLUDE_DIR} + ${platform_INCLUDE_DIRS} +diff --git a/FindOpenGLES2.cmake b/FindOpenGLES2.cmake +index e1b7d21..2a9ce0d 100644 +--- a/FindOpenGLES2.cmake ++++ b/FindOpenGLES2.cmake +@@ -7,7 +7,7 @@ + + find_package(PkgConfig) + if(PKG_CONFIG_FOUND) +- pkg_check_modules(OpenGLES2 glesv2) ++ pkg_check_modules(OpenGLES2 glesv2 egl) + endif(PKG_CONFIG_FOUND) + + if(NOT OPENGLES2_FOUND) +-- +2.5.0 + diff --git a/package/kodi-visualisation-shadertoy/Config.in b/package/kodi-visualisation-shadertoy/Config.in new file mode 100644 index 0000000000..ac17702709 --- /dev/null +++ b/package/kodi-visualisation-shadertoy/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_KODI_VISUALISATION_SHADERTOY + bool "kodi-visualisation-shadertoy" + select BR2_PACKAGE_LIBGLEW if BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_LIBPLATFORM + help + Shadertoy visualiser for Kodi + + https://github.com/notspiff/visualization.shadertoy diff --git a/package/kodi-visualisation-shadertoy/kodi-visualisation-shadertoy.hash b/package/kodi-visualisation-shadertoy/kodi-visualisation-shadertoy.hash new file mode 100644 index 0000000000..fdd81fd590 --- /dev/null +++ b/package/kodi-visualisation-shadertoy/kodi-visualisation-shadertoy.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 88732c399bb7e1237e8fc375583bb3789c96a28695a3805fb374361a7e5636c5 kodi-visualisation-shadertoy-f9988007681bf37e6c03d6992bae30133b020608.tar.gz diff --git a/package/kodi-visualisation-shadertoy/kodi-visualisation-shadertoy.mk b/package/kodi-visualisation-shadertoy/kodi-visualisation-shadertoy.mk new file mode 100644 index 0000000000..e5f2d911db --- /dev/null +++ b/package/kodi-visualisation-shadertoy/kodi-visualisation-shadertoy.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# kodi-visualisation-shadertoy +# +################################################################################ + +KODI_VISUALISATION_SHADERTOY_VERSION = f9988007681bf37e6c03d6992bae30133b020608 +KODI_VISUALISATION_SHADERTOY_SITE = $(call github,notspiff,visualization.shadertoy,$(KODI_VISUALISATION_SHADERTOY_VERSION)) +KODI_VISUALISATION_SHADERTOY_LICENSE = GPLv2+ +KODI_VISUALISATION_SHADERTOY_LICENSE_FILES = src/main.cpp +KODI_VISUALISATION_SHADERTOY_DEPENDENCIES = kodi libplatform + +ifeq ($(BR2_PACKAGE_LIBGLEW),y) +KODI_VISUALISATION_SHADERTOY_DEPENDENCIES += libglew +endif + +$(eval $(cmake-package)) diff --git a/package/kodi-visualisation-spectrum/Config.in b/package/kodi-visualisation-spectrum/Config.in new file mode 100644 index 0000000000..3b2b0a25e2 --- /dev/null +++ b/package/kodi-visualisation-spectrum/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_KODI_VISUALISATION_SPECTRUM + bool "kodi-visualisation-spectrum" + help + Spectrum visualiser for Kodi + + https://github.com/notspiff/visualization.spectrum diff --git a/package/kodi-visualisation-spectrum/kodi-visualisation-spectrum.hash b/package/kodi-visualisation-spectrum/kodi-visualisation-spectrum.hash new file mode 100644 index 0000000000..18e38f577f --- /dev/null +++ b/package/kodi-visualisation-spectrum/kodi-visualisation-spectrum.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 aa417d6ad3d3770029e7d8d9f7f0ca8d56a8a4f47821267b5a8604fc26993334 kodi-visualisation-spectrum-9dbe53a0db73f00ee22e9ca235c98f8137b7bb9e.tar.gz diff --git a/package/kodi-visualisation-spectrum/kodi-visualisation-spectrum.mk b/package/kodi-visualisation-spectrum/kodi-visualisation-spectrum.mk new file mode 100644 index 0000000000..de197eb7ff --- /dev/null +++ b/package/kodi-visualisation-spectrum/kodi-visualisation-spectrum.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-visualisation-spectrum +# +################################################################################ + +KODI_VISUALISATION_SPECTRUM_VERSION = 9dbe53a0db73f00ee22e9ca235c98f8137b7bb9e +KODI_VISUALISATION_SPECTRUM_SITE = $(call github,notspiff,visualization.spectrum,$(KODI_VISUALISATION_SPECTRUM_VERSION)) +KODI_VISUALISATION_SPECTRUM_LICENSE = GPLv2+ +KODI_VISUALISATION_SPECTRUM_LICENSE_FILES = COPYING +KODI_VISUALISATION_SPECTRUM_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-visualisation-waveforhue/Config.in b/package/kodi-visualisation-waveforhue/Config.in new file mode 100644 index 0000000000..9694027d2a --- /dev/null +++ b/package/kodi-visualisation-waveforhue/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_KODI_VISUALISATION_WAVEFORHUE + bool "kodi-visualisation-waveforhue" + help + WaveForHue visualiser for Kodi + + https://github.com/notspiff/visualization.waveforhue diff --git a/package/kodi-visualisation-waveforhue/kodi-visualisation-waveforhue.hash b/package/kodi-visualisation-waveforhue/kodi-visualisation-waveforhue.hash new file mode 100644 index 0000000000..5f49daae94 --- /dev/null +++ b/package/kodi-visualisation-waveforhue/kodi-visualisation-waveforhue.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 2590ce4ee1816ffdf59fe33580a36fba49fbd1f60f4c9022b3315e04debc9c73 kodi-visualisation-waveforhue-e87d5c7d7e7504036b80af8bc89f4cf6489085fe.tar.gz diff --git a/package/kodi-visualisation-waveforhue/kodi-visualisation-waveforhue.mk b/package/kodi-visualisation-waveforhue/kodi-visualisation-waveforhue.mk new file mode 100644 index 0000000000..28eeb4d881 --- /dev/null +++ b/package/kodi-visualisation-waveforhue/kodi-visualisation-waveforhue.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-visualisation-waveforhue +# +################################################################################ + +KODI_VISUALISATION_WAVEFORHUE_VERSION = e87d5c7d7e7504036b80af8bc89f4cf6489085fe +KODI_VISUALISATION_WAVEFORHUE_SITE = $(call github,notspiff,visualization.waveforhue,$(KODI_VISUALISATION_WAVEFORHUE_VERSION)) +KODI_VISUALISATION_WAVEFORHUE_LICENSE = GPLv2+ +KODI_VISUALISATION_WAVEFORHUE_LICENSE_FILES = COPYING +KODI_VISUALISATION_WAVEFORHUE_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi-visualisation-waveform/Config.in b/package/kodi-visualisation-waveform/Config.in new file mode 100644 index 0000000000..56f25096f5 --- /dev/null +++ b/package/kodi-visualisation-waveform/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_KODI_VISUALISATION_WAVEFORM + bool "kodi-visualisation-waveform" + help + Waveform visualiser for Kodi + + https://github.com/notspiff/visualization.waveform diff --git a/package/kodi-visualisation-waveform/kodi-visualisation-waveform.hash b/package/kodi-visualisation-waveform/kodi-visualisation-waveform.hash new file mode 100644 index 0000000000..728b857ecc --- /dev/null +++ b/package/kodi-visualisation-waveform/kodi-visualisation-waveform.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 439bd50fcb1c0912532d0d113f7eeadf28f72bd2cb0c234581ee1acc2a70e45b kodi-visualisation-waveform-89aec48e2975f820004df5a1a53801339a5b3064.tar.gz diff --git a/package/kodi-visualisation-waveform/kodi-visualisation-waveform.mk b/package/kodi-visualisation-waveform/kodi-visualisation-waveform.mk new file mode 100644 index 0000000000..81e880b080 --- /dev/null +++ b/package/kodi-visualisation-waveform/kodi-visualisation-waveform.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# kodi-visualisation-waveform +# +################################################################################ + +KODI_VISUALISATION_WAVEFORM_VERSION = 89aec48e2975f820004df5a1a53801339a5b3064 +KODI_VISUALISATION_WAVEFORM_SITE = $(call github,notspiff,visualization.waveform,$(KODI_VISUALISATION_WAVEFORM_VERSION)) +KODI_VISUALISATION_WAVEFORM_LICENSE = GPLv2+ +KODI_VISUALISATION_WAVEFORM_LICENSE_FILES = COPYING +KODI_VISUALISATION_WAVEFORM_DEPENDENCIES = kodi + +$(eval $(cmake-package)) diff --git a/package/kodi/0001-Fixup-include-path.patch b/package/kodi/0001-Fixup-include-path.patch new file mode 100644 index 0000000000..9298981c4f --- /dev/null +++ b/package/kodi/0001-Fixup-include-path.patch @@ -0,0 +1,33 @@ +From 63c255f1f5d68363f49193aceed343e602dc8bdf Mon Sep 17 00:00:00 2001 +From: Maxime Hadjinlian +Date: Thu, 26 Dec 2013 21:17:10 +0100 +Subject: [PATCH] Fixup include path + +Patch originally taken from : +http://repository.timesys.com/buildsources/x/xbmc/xbmc-11.0/xbmc-11.0-fixups.patch + +Signed-off-by: Maxime Hadjinlian +--- + lib/enca/configure | 3 --- + lib/enca/configure.ac | 3 --- + lib/libdvd/libdvdread/misc/dvdread-config.sh | 6 +++--- + lib/timidity/configure.in | 6 +++--- + 4 files changed, 6 insertions(+), 12 deletions(-) + +diff --git a/lib/libdvd/libdvdread/misc/dvdread-config.sh b/lib/libdvd/libdvdread/misc/dvdread-config.sh +index e170c7e..25ee893 100644 +--- a/lib/libdvd/libdvdread/misc/dvdread-config.sh ++++ b/lib/libdvd/libdvdread/misc/dvdread-config.sh +@@ -48,9 +48,9 @@ if test "$echo_prefix" = "yes"; then + fi + + if test "$echo_cflags" = "yes"; then +- echo -I$prefix/include $extracflags ++ echo $extracflags + fi + + if test "$echo_libs" = "yes"; then +- echo -L$libdir $dvdreadlib +-fi ++ echo $dvdreadlib ++fi diff --git a/package/kodi/0002-texturepacker.patch b/package/kodi/0002-texturepacker.patch new file mode 100644 index 0000000000..8830b4c646 --- /dev/null +++ b/package/kodi/0002-texturepacker.patch @@ -0,0 +1,16 @@ +Fix host compile + +Signed-off-by: Bernd Kuhls + +diff -uNr xbmc-656cba5d5c7c5edb166196b48560825b9b1f03fd.org/tools/depends/native/TexturePacker/Makefile xbmc-656cba5d5c7c5edb166196b48560825b9b1f03fd/tools/depends/native/TexturePacker/Makefile +--- xbmc-656cba5d5c7c5edb166196b48560825b9b1f03fd.org/tools/depends/native/TexturePacker/Makefile 2015-01-25 09:00:48.000000000 +0100 ++++ xbmc-656cba5d5c7c5edb166196b48560825b9b1f03fd/tools/depends/native/TexturePacker/Makefile 2015-01-25 13:03:23.606140953 +0100 +@@ -36,7 +36,7 @@ + -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) + cd $(PLATFORM); cp -a $(SOURCE)/* . + cd $(PLATFORM); ./autogen.sh +- cd $(PLATFORM); ./configure --prefix=$(PREFIX) $(EXTRA_CONFIGURE) EXTRA_DEFINES="$(NATIVE_ARCH_DEFINES)" ++ cd $(PLATFORM); ./configure --prefix=$(PREFIX) EXTRA_DEFINES="$(NATIVE_ARCH_DEFINES)" + + + $(APP): $(PLATFORM) diff --git a/package/kodi/0003-ALSA-fix-device-change-event-support.patch b/package/kodi/0003-ALSA-fix-device-change-event-support.patch new file mode 100644 index 0000000000..b5f37b94da --- /dev/null +++ b/package/kodi/0003-ALSA-fix-device-change-event-support.patch @@ -0,0 +1,67 @@ +Patch sent upstream: + +https://github.com/xbmc/xbmc/pull/7551 + + +From a6d6a1a36ff2dff2586fbad2a068e7df14b55fdc Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sun, 19 Jul 2015 14:12:03 +0200 +Subject: [PATCH 1/1] ALSA: fix device change event support + +Current uClibc version 0.9.33.2 does not support eventfd_read/write. + +Signed-off-by: Bernd Kuhls +--- + configure.ac | 5 ++++- + xbmc/linux/FDEventMonitor.cpp | 12 ++++++++++++ + 2 files changed, 16 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d321f7d..4c6c750 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -911,7 +911,7 @@ AC_FUNC_STRFTIME + AC_FUNC_STRTOD + AC_FUNC_UTIME_NULL + AC_FUNC_VPRINTF +-AC_CHECK_FUNCS([atexit dup2 fdatasync floor fs_stat_dev ftime ftruncate getcwd gethostbyaddr gethostbyname gethostname getpagesize getpass gettimeofday inet_ntoa lchown localeconv memchr memmove memset mkdir modf munmap pow rmdir select setenv setlocale socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strspn strstr strtol strtoul sysinfo tzset utime posix_fadvise localtime_r]) ++AC_CHECK_FUNCS([atexit dup2 fdatasync floor fs_stat_dev ftime ftruncate getcwd gethostbyaddr gethostbyname gethostname getpagesize getpass gettimeofday inet_ntoa lchown localeconv memchr memmove memset mkdir modf munmap pow rmdir select setenv setlocale socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strspn strstr strtol strtoul sysinfo tzset utime posix_fadvise localtime_r eventfd_read eventfd_write]) + + # Check for various sizes + AC_CHECK_SIZEOF([int]) +@@ -2064,6 +2064,9 @@ fi + if test "$use_alsa" = "yes"; then + USE_ALSA=1 + AC_DEFINE([USE_ALSA],[1],["Define to 1 if alsa is installed"]) ++ if test "$ac_cv_func_eventfd_read" = "yes" -a "$ac_cv_func_eventfd_write" = "yes"; then ++ AC_DEFINE([HAVE_EVENTFD],[1],["Define to 1 if eventfd is installed"]) ++ fi + final_message="$final_message\n ALSA:\t\tYes" + else + USE_ALSA=0 +diff --git a/xbmc/linux/FDEventMonitor.cpp b/xbmc/linux/FDEventMonitor.cpp +index 4a41477..84efeb9 100644 +--- a/xbmc/linux/FDEventMonitor.cpp ++++ b/xbmc/linux/FDEventMonitor.cpp +@@ -28,6 +28,18 @@ + + #include "FDEventMonitor.h" + ++#ifndef HAVE_EVENTFD ++static int eventfd_read(int __fd, eventfd_t *__value) ++{ ++ return read(__fd, __value, sizeof(eventfd_t)) == sizeof(eventfd_t) ? 0 : -1; ++} ++ ++static int eventfd_write(int __fd, eventfd_t __value) ++{ ++ return write(__fd, &__value, sizeof(eventfd_t)) == sizeof(eventfd_t) ? 0 : -1; ++} ++#endif ++ + CFDEventMonitor::CFDEventMonitor() : + CThread("FDEventMonitor"), + m_nextID(0), +-- +1.7.10.4 + diff --git a/package/kodi/0004-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch b/package/kodi/0004-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch new file mode 100644 index 0000000000..2678a7839e --- /dev/null +++ b/package/kodi/0004-kodi-config.cmake-use-CMAKE_FIND_ROOT_PATH-to-fix-cr.patch @@ -0,0 +1,41 @@ +From 6604cce38fed748e98d3bd2bf9d0f368d67eeb3c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 29 Jul 2015 23:13:33 +0200 +Subject: [PATCH] kodi-config.cmake: use CMAKE_FIND_ROOT_PATH to fix + cross-compilation + +When cross-compiling, the location at build time of the libraries is +not the same as the one at run-time. The CMAKE_FIND_ROOT_PATH variable +is here to handle this difference, so use it in kodi-config.cmake. + +Signed-off-by: Thomas Petazzoni +--- + project/cmake/kodi-config.cmake.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/project/cmake/kodi-config.cmake.in b/project/cmake/kodi-config.cmake.in +index 76626ec..ffb8e1d 100644 +--- a/project/cmake/kodi-config.cmake.in ++++ b/project/cmake/kodi-config.cmake.in +@@ -7,15 +7,15 @@ + SET(@APP_NAME_UC@_PREFIX @APP_PREFIX@) + ENDIF() + IF(NOT @APP_NAME_UC@_INCLUDE_DIR) +- SET(@APP_NAME_UC@_INCLUDE_DIR @APP_INCLUDE_DIR@) ++ SET(@APP_NAME_UC@_INCLUDE_DIR ${CMAKE_FIND_ROOT_PATH}/@APP_INCLUDE_DIR@) + ENDIF() + IF(NOT @APP_NAME_UC@_LIB_DIR) +- SET(@APP_NAME_UC@_LIB_DIR @APP_LIB_DIR@) ++ SET(@APP_NAME_UC@_LIB_DIR ${CMAKE_FIND_ROOT_PATH}/@APP_LIB_DIR@) + ENDIF() + IF(NOT WIN32) + SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} @CXX11_SWITCH@") + ENDIF() +-LIST(APPEND CMAKE_MODULE_PATH @APP_LIB_DIR@) ++LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_FIND_ROOT_PATH}/@APP_LIB_DIR@) + ADD_DEFINITIONS(@ARCH_DEFINES@ -DBUILD_KODI_ADDON) + + if(NOT CORE_SYSTEM_NAME) +-- +2.5.0 + diff --git a/package/kodi/0005-native-TexturePacker-fix-compilation-with-gcc-4.6.patch b/package/kodi/0005-native-TexturePacker-fix-compilation-with-gcc-4.6.patch new file mode 100644 index 0000000000..3d9370ff0e --- /dev/null +++ b/package/kodi/0005-native-TexturePacker-fix-compilation-with-gcc-4.6.patch @@ -0,0 +1,53 @@ +From 2b395fb3f07551ae1ce2e484c14ac59f36e192b0 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Thu, 17 Mar 2016 21:47:53 +0100 +Subject: [PATCH] native/TexturePacker: fix compilation with gcc 4.6 + +Kodi itself depends on gcc >= 4.7 due to its use of the C++11 standard. +When cross-compiling the host gcc currently also needs to be >= 4.7 due +to the texturepacker tool being needed as native binary to compile +Textures.xbt for the target system. + +Cross-compiling on a system where host gcc is at version 4.6 fails atm +with this error: + +cc1plus: error: unrecognized command line option '-std=c++11' +make[4]: *** [md5.o] Error 1 +make[4]: *** Waiting for unfinished jobs.... +cc1plus: error: unrecognized command line option '-std=c++11' +cc1plus: error: unrecognized command line option '-std=c++11' + +make[4]: *** [DecoderManager.o] Error 1 +make[4]: *** [XBTFWriter.o] Error 1 +cc1plus: error: unrecognized command line option '-std=c++11' +make[4]: *** [TexturePacker.o] Error 1 +cc1plus: error: unrecognized command line option '-std=c++11' +make[4]: *** [decoder/PNGDecoder.o] Error 1 +make[3]: *** [all] Error 2 +make[2]: *** [native/TexturePacker] Error 2 + +Using this patch the problem is fixed and a working TexturePacker host +binary is created. + +Signed-off-by: Bernd Kuhls +Patch sent upstream: https://github.com/xbmc/xbmc/pull/9378 +--- + tools/depends/native/TexturePacker/src/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/depends/native/TexturePacker/src/Makefile.am b/tools/depends/native/TexturePacker/src/Makefile.am +index c1fc8be..d075290 100644 +--- a/tools/depends/native/TexturePacker/src/Makefile.am ++++ b/tools/depends/native/TexturePacker/src/Makefile.am +@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = subdir-objects + + AM_CFLAGS = -DTARGET_POSIX -DUSE_LZO_PACKING + AM_CFLAGS += @EXTRA_DEFINES@ +-AM_CXXFLAGS = $(AM_CFLAGS) -std=c++11 ++AM_CXXFLAGS = $(AM_CFLAGS) -std=c++0x + + AM_CPPFLAGS = \ + -I. \ +-- +2.7.0 + diff --git a/package/kodi/0006-ffmpeg30.patch b/package/kodi/0006-ffmpeg30.patch new file mode 100644 index 0000000000..9164d48ad7 --- /dev/null +++ b/package/kodi/0006-ffmpeg30.patch @@ -0,0 +1,646 @@ +Add support for ffmpeg 3.0 + +Changes from original commit are only in file paths & quilt refresh. + +commit c31b7d374062f87c7512d9872cbceac920465913 +Author: Philip Langdale +Date: Mon Sep 21 19:49:36 2015 -0700 + + ffmpeg: Update AVPixelFormat and AV_PIX_FMT_* to compile with master + + The deprecated PixelFormat and PIX_FMT_* names have been removed in + ffmpeg master. + +Signed-off-by: Bernd Kuhls +[Downloaded from +https://gitweb.gentoo.org/repo/gentoo.git/tree/media-tv/kodi/files/kodi-16-ffmpeg3.patch] + +Index: xbmc-16.0-Jarvis/xbmc/cores/FFmpeg.h +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/FFmpeg.h ++++ xbmc-16.0-Jarvis/xbmc/cores/FFmpeg.h +@@ -24,7 +24,6 @@ + #include "utils/CPUInfo.h" + + extern "C" { +-#include "libswscale/swscale.h" + #include "libavcodec/avcodec.h" + #include "libavformat/avformat.h" + #include "libavutil/avutil.h" +@@ -33,23 +32,6 @@ extern "C" { + #include "libpostproc/postprocess.h" + } + +-inline int SwScaleCPUFlags() +-{ +- unsigned int cpuFeatures = g_cpuInfo.GetCPUFeatures(); +- int flags = 0; +- +- if (cpuFeatures & CPU_FEATURE_MMX) +- flags |= SWS_CPU_CAPS_MMX; +- if (cpuFeatures & CPU_FEATURE_MMX2) +- flags |= SWS_CPU_CAPS_MMX2; +- if (cpuFeatures & CPU_FEATURE_3DNOW) +- flags |= SWS_CPU_CAPS_3DNOW; +- if (cpuFeatures & CPU_FEATURE_ALTIVEC) +- flags |= SWS_CPU_CAPS_ALTIVEC; +- +- return flags; +-} +- + inline int PPCPUFlags() + { + unsigned int cpuFeatures = g_cpuInfo.GetCPUFeatures(); +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/DVDCodecUtils.cpp +@@ -39,7 +39,7 @@ extern "C" { + #include "libswscale/swscale.h" + } + +-// allocate a new picture (PIX_FMT_YUV420P) ++// allocate a new picture (AV_PIX_FMT_YUV420P) + DVDVideoPicture* CDVDCodecUtils::AllocatePicture(int iWidth, int iHeight) + { + DVDVideoPicture* pPicture = new DVDVideoPicture; +@@ -264,13 +264,13 @@ DVDVideoPicture* CDVDCodecUtils::Convert + + int dstformat; + if (format == RENDER_FMT_UYVY422) +- dstformat = PIX_FMT_UYVY422; ++ dstformat = AV_PIX_FMT_UYVY422; + else +- dstformat = PIX_FMT_YUYV422; ++ dstformat = AV_PIX_FMT_YUYV422; + +- struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, PIX_FMT_YUV420P, ++ struct SwsContext *ctx = sws_getContext(pSrc->iWidth, pSrc->iHeight, AV_PIX_FMT_YUV420P, + pPicture->iWidth, pPicture->iHeight, (AVPixelFormat)dstformat, +- SWS_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); ++ SWS_BILINEAR, NULL, NULL, NULL); + sws_scale(ctx, src, srcStride, 0, pSrc->iHeight, dst, dstStride); + sws_freeContext(ctx); + } +@@ -403,25 +403,25 @@ double CDVDCodecUtils::NormalizeFramedur + } + + struct EFormatMap { +- PixelFormat pix_fmt; ++ AVPixelFormat pix_fmt; + ERenderFormat format; + }; + + static const EFormatMap g_format_map[] = { +- { PIX_FMT_YUV420P, RENDER_FMT_YUV420P } +-, { PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P } +-, { PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 } +-, { PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 } +-, { PIX_FMT_UYVY422, RENDER_FMT_UYVY422 } +-, { PIX_FMT_YUYV422, RENDER_FMT_YUYV422 } +-, { PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI } +-, { PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA } +-, { PIX_FMT_NONE , RENDER_FMT_NONE } ++ { AV_PIX_FMT_YUV420P, RENDER_FMT_YUV420P } ++, { AV_PIX_FMT_YUVJ420P, RENDER_FMT_YUV420P } ++, { AV_PIX_FMT_YUV420P10, RENDER_FMT_YUV420P10 } ++, { AV_PIX_FMT_YUV420P16, RENDER_FMT_YUV420P16 } ++, { AV_PIX_FMT_UYVY422, RENDER_FMT_UYVY422 } ++, { AV_PIX_FMT_YUYV422, RENDER_FMT_YUYV422 } ++, { AV_PIX_FMT_VAAPI_VLD, RENDER_FMT_VAAPI } ++, { AV_PIX_FMT_DXVA2_VLD, RENDER_FMT_DXVA } ++, { AV_PIX_FMT_NONE , RENDER_FMT_NONE } + }; + + ERenderFormat CDVDCodecUtils::EFormatFromPixfmt(int fmt) + { +- for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p) ++ for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p) + { + if(p->pix_fmt == fmt) + return p->format; +@@ -431,10 +431,10 @@ ERenderFormat CDVDCodecUtils::EFormatFro + + int CDVDCodecUtils::PixfmtFromEFormat(ERenderFormat fmt) + { +- for(const EFormatMap *p = g_format_map; p->pix_fmt != PIX_FMT_NONE; ++p) ++ for(const EFormatMap *p = g_format_map; p->pix_fmt != AV_PIX_FMT_NONE; ++p) + { + if(p->format == fmt) + return p->pix_fmt; + } +- return PIX_FMT_NONE; ++ return AV_PIX_FMT_NONE; + } +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp +@@ -77,8 +77,8 @@ enum DecoderState + STATE_SW_MULTI + }; + +-enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx +- , const PixelFormat * fmt ) ++enum AVPixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx ++ , const AVPixelFormat * fmt ) + { + CDVDVideoCodecFFmpeg* ctx = (CDVDVideoCodecFFmpeg*)avctx->opaque; + +@@ -104,8 +104,8 @@ enum PixelFormat CDVDVideoCodecFFmpeg::G + avctx->hwaccel_context = 0; + } + +- const PixelFormat * cur = fmt; +- while(*cur != PIX_FMT_NONE) ++ const AVPixelFormat * cur = fmt; ++ while(*cur != AV_PIX_FMT_NONE) + { + #ifdef HAVE_LIBVDPAU + if(VDPAU::CDecoder::IsVDPAUFormat(*cur) && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVDPAU)) +@@ -137,7 +137,7 @@ enum PixelFormat CDVDVideoCodecFFmpeg::G + #endif + #ifdef HAVE_LIBVA + // mpeg4 vaapi decoding is disabled +- if(*cur == PIX_FMT_VAAPI_VLD && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVAAPI)) ++ if(*cur == AV_PIX_FMT_VAAPI_VLD && CSettings::GetInstance().GetBool(CSettings::SETTING_VIDEOPLAYER_USEVAAPI)) + { + VAAPI::CDecoder* dec = new VAAPI::CDecoder(); + if(dec->Open(avctx, ctx->m_pCodecContext, *cur, ctx->m_uSurfacesCount) == true) +@@ -214,11 +214,11 @@ bool CDVDVideoCodecFFmpeg::Open(CDVDStre + + for(std::vector::iterator it = options.m_formats.begin(); it != options.m_formats.end(); ++it) + { +- m_formats.push_back((PixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it)); ++ m_formats.push_back((AVPixelFormat)CDVDCodecUtils::PixfmtFromEFormat(*it)); + if(*it == RENDER_FMT_YUV420P) +- m_formats.push_back(PIX_FMT_YUVJ420P); ++ m_formats.push_back(AV_PIX_FMT_YUVJ420P); + } +- m_formats.push_back(PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */ ++ m_formats.push_back(AV_PIX_FMT_NONE); /* always add none to get a terminated list in ffmpeg world */ + + pCodec = avcodec_find_decoder(hints.codec); + +@@ -655,7 +655,7 @@ bool CDVDVideoCodecFFmpeg::GetPictureCom + pDvdVideoPicture->color_transfer = m_pCodecContext->color_trc; + pDvdVideoPicture->color_matrix = m_pCodecContext->colorspace; + if(m_pCodecContext->color_range == AVCOL_RANGE_JPEG +- || m_pCodecContext->pix_fmt == PIX_FMT_YUVJ420P) ++ || m_pCodecContext->pix_fmt == AV_PIX_FMT_YUVJ420P) + pDvdVideoPicture->color_range = 1; + else + pDvdVideoPicture->color_range = 0; +@@ -738,8 +738,8 @@ bool CDVDVideoCodecFFmpeg::GetPicture(DV + pDvdVideoPicture->iFlags |= pDvdVideoPicture->data[0] ? 0 : DVP_FLAG_DROPPED; + pDvdVideoPicture->extended_format = 0; + +- PixelFormat pix_fmt; +- pix_fmt = (PixelFormat)m_pFrame->format; ++ AVPixelFormat pix_fmt; ++ pix_fmt = (AVPixelFormat)m_pFrame->format; + + pDvdVideoPicture->format = CDVDCodecUtils::EFormatFromPixfmt(pix_fmt); + return true; +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.h +@@ -46,7 +46,7 @@ public: + public: + IHardwareDecoder() {} + virtual ~IHardwareDecoder() {}; +- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces) = 0; ++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces) = 0; + virtual int Decode (AVCodecContext* avctx, AVFrame* frame) = 0; + virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture) = 0; + virtual int Check (AVCodecContext* avctx) = 0; +@@ -77,7 +77,7 @@ public: + void SetHardware(IHardwareDecoder* hardware); + + protected: +- static enum PixelFormat GetFormat(struct AVCodecContext * avctx, const PixelFormat * fmt); ++ static enum AVPixelFormat GetFormat(struct AVCodecContext * avctx, const AVPixelFormat * fmt); + + int FilterOpen(const std::string& filters, bool scale); + void FilterClose(); +@@ -119,7 +119,7 @@ protected: + int m_iLastKeyframe; + double m_dts; + bool m_started; +- std::vector m_formats; ++ std::vector m_formats; + double m_decoderPts; + int m_skippedDeint; + bool m_requestSkipDeint; +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecVDA.cpp +@@ -554,11 +554,11 @@ void CDVDVideoCodecVDA::DisplayQueuePop( + + void CDVDVideoCodecVDA::UYVY422_to_YUV420P(uint8_t *yuv422_ptr, int yuv422_stride, DVDVideoPicture *picture) + { +- // convert PIX_FMT_UYVY422 to PIX_FMT_YUV420P. ++ // convert AV_PIX_FMT_UYVY422 to AV_PIX_FMT_YUV420P. + struct SwsContext *swcontext = sws_getContext( +- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_UYVY422, +- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_YUV420P, +- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); ++ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_UYVY422, ++ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_YUV420P, ++ SWS_FAST_BILINEAR, NULL, NULL, NULL); + if (swcontext) + { + uint8_t *src[] = { yuv422_ptr, 0, 0, 0 }; +@@ -574,11 +574,11 @@ void CDVDVideoCodecVDA::UYVY422_to_YUV42 + + void CDVDVideoCodecVDA::BGRA_to_YUV420P(uint8_t *bgra_ptr, int bgra_stride, DVDVideoPicture *picture) + { +- // convert PIX_FMT_BGRA to PIX_FMT_YUV420P. ++ // convert AV_PIX_FMT_BGRA to AV_PIX_FMT_YUV420P. + struct SwsContext *swcontext = sws_getContext( +- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_BGRA, +- m_videobuffer.iWidth, m_videobuffer.iHeight, PIX_FMT_YUV420P, +- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); ++ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_BGRA, ++ m_videobuffer.iWidth, m_videobuffer.iHeight, AV_PIX_FMT_YUV420P, ++ SWS_FAST_BILINEAR, NULL, NULL, NULL); + if (swcontext) + { + uint8_t *src[] = { bgra_ptr, 0, 0, 0 }; +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp +@@ -886,7 +886,7 @@ static bool CheckCompatibility(AVCodecCo + return true; + } + +-bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum PixelFormat fmt, unsigned int surfaces) ++bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum AVPixelFormat fmt, unsigned int surfaces) + { + if (!CheckCompatibility(avctx)) + return false; +@@ -1135,9 +1135,9 @@ bool CDecoder::OpenDecoder() + return true; + } + +-bool CDecoder::Supports(enum PixelFormat fmt) ++bool CDecoder::Supports(enum AVPixelFormat fmt) + { +- if(fmt == PIX_FMT_DXVA2_VLD) ++ if(fmt == AV_PIX_FMT_DXVA2_VLD) + return true; + return false; + } +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.h +@@ -141,7 +141,7 @@ class CDecoder + public: + CDecoder(); + ~CDecoder(); +- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces); ++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces); + virtual int Decode (AVCodecContext* avctx, AVFrame* frame); + virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture); + virtual int Check (AVCodecContext* avctx); +@@ -154,7 +154,7 @@ public: + int GetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags); + void RelBuffer(uint8_t *data); + +- static bool Supports(enum PixelFormat fmt); ++ static bool Supports(enum AVPixelFormat fmt); + + void CloseDXVADecoder(); + +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.cpp +@@ -479,7 +479,7 @@ CDecoder::~CDecoder() + Close(); + } + +-bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces) ++bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces) + { + // don't support broken wrappers by default + // nvidia cards with a vaapi to vdpau wrapper +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VAAPI.h +@@ -406,7 +406,7 @@ public: + CDecoder(); + virtual ~CDecoder(); + +- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0); ++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0); + virtual int Decode (AVCodecContext* avctx, AVFrame* frame); + virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture); + virtual void Reset(); +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.cpp +@@ -186,7 +186,7 @@ void CDecoder::Close() + m_bitstream = NULL; + } + +-bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum PixelFormat fmt, unsigned int surfaces) ++bool CDecoder::Open(AVCodecContext *avctx, AVCodecContext* mainctx, enum AVPixelFormat fmt, unsigned int surfaces) + { + Close(); + +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDA.h +@@ -35,7 +35,7 @@ class CDecoder + public: + CDecoder(); + ~CDecoder(); +- virtual bool Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0); ++ virtual bool Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0); + virtual int Decode(AVCodecContext* avctx, AVFrame* frame); + virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture); + virtual int Check(AVCodecContext* avctx); +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.cpp +@@ -486,7 +486,7 @@ CDecoder::CDecoder() : m_vdpauOutput(&m_ + m_vdpauConfig.context = 0; + } + +-bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat fmt, unsigned int surfaces) ++bool CDecoder::Open(AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat fmt, unsigned int surfaces) + { + // check if user wants to decode this format with VDPAU + std::string gpuvendor = g_Windowing.GetRenderVendor(); +@@ -760,7 +760,7 @@ int CDecoder::Check(AVCodecContext* avct + return 0; + } + +-bool CDecoder::IsVDPAUFormat(PixelFormat format) ++bool CDecoder::IsVDPAUFormat(AVPixelFormat format) + { + if (format == AV_PIX_FMT_VDPAU) + return true; +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDCodecs/Video/VDPAU.h +@@ -556,7 +556,7 @@ public: + CDecoder(); + virtual ~CDecoder(); + +- virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum PixelFormat, unsigned int surfaces = 0); ++ virtual bool Open (AVCodecContext* avctx, AVCodecContext* mainctx, const enum AVPixelFormat, unsigned int surfaces = 0); + virtual int Decode (AVCodecContext* avctx, AVFrame* frame); + virtual bool GetPicture(AVCodecContext* avctx, AVFrame* frame, DVDVideoPicture* picture); + virtual void Reset(); +@@ -571,7 +571,7 @@ public: + bool Supports(VdpVideoMixerFeature feature); + bool Supports(EINTERLACEMETHOD method); + EINTERLACEMETHOD AutoInterlaceMethod(); +- static bool IsVDPAUFormat(PixelFormat fmt); ++ static bool IsVDPAUFormat(AVPixelFormat fmt); + + static void FFReleaseBuffer(void *opaque, uint8_t *data); + static int FFGetBuffer(AVCodecContext *avctx, AVFrame *pic, int flags); +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxFFmpeg.cpp +@@ -1638,7 +1638,7 @@ void CDVDDemuxFFmpeg::ParsePacket(AVPack + + // for video we need a decoder to get desired information into codec context + if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO && st->codec->extradata && +- (!st->codec->width || st->codec->pix_fmt == PIX_FMT_NONE)) ++ (!st->codec->width || st->codec->pix_fmt == AV_PIX_FMT_NONE)) + { + // open a decoder, it will be cleared down by ffmpeg on closing the stream + if (!st->codec->codec) +@@ -1695,7 +1695,7 @@ bool CDVDDemuxFFmpeg::IsVideoReady() + st = m_pFormatContext->streams[idx]; + if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) + { +- if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE) ++ if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE) + return true; + hasVideo = true; + } +@@ -1708,7 +1708,7 @@ bool CDVDDemuxFFmpeg::IsVideoReady() + st = m_pFormatContext->streams[i]; + if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) + { +- if (st->codec->width && st->codec->pix_fmt != PIX_FMT_NONE) ++ if (st->codec->width && st->codec->pix_fmt != AV_PIX_FMT_NONE) + return true; + hasVideo = true; + } +Index: xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDFileInfo.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/dvdplayer/DVDFileInfo.cpp ++++ xbmc-16.0-Jarvis/xbmc/cores/dvdplayer/DVDFileInfo.cpp +@@ -275,7 +275,7 @@ bool CDVDFileInfo::ExtractThumb(const st + + uint8_t *pOutBuf = new uint8_t[nWidth * nHeight * 4]; + struct SwsContext *context = sws_getContext(picture.iWidth, picture.iHeight, +- PIX_FMT_YUV420P, nWidth, nHeight, PIX_FMT_BGRA, SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); ++ AV_PIX_FMT_YUV420P, nWidth, nHeight, AV_PIX_FMT_BGRA, SWS_FAST_BILINEAR, NULL, NULL, NULL); + + if (context) + { +Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp ++++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGL.cpp +@@ -2932,7 +2932,7 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im + } + else if (m_format == RENDER_FMT_NV12) + { +- srcFormat = PIX_FMT_NV12; ++ srcFormat = AV_PIX_FMT_NV12; + for (int i = 0; i < 2; i++) + { + src[i] = im->plane[i]; +@@ -2941,13 +2941,13 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im + } + else if (m_format == RENDER_FMT_YUYV422) + { +- srcFormat = PIX_FMT_YUYV422; ++ srcFormat = AV_PIX_FMT_YUYV422; + src[0] = im->plane[0]; + srcStride[0] = im->stride[0]; + } + else if (m_format == RENDER_FMT_UYVY422) + { +- srcFormat = PIX_FMT_UYVY422; ++ srcFormat = AV_PIX_FMT_UYVY422; + src[0] = im->plane[0]; + srcStride[0] = im->stride[0]; + } +@@ -2965,8 +2965,8 @@ void CLinuxRendererGL::ToRGBFrame(YV12Im + + m_context = sws_getCachedContext(m_context, + im->width, im->height, (AVPixelFormat)srcFormat, +- im->width, im->height, (AVPixelFormat)PIX_FMT_BGRA, +- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); ++ im->width, im->height, (AVPixelFormat)AV_PIX_FMT_BGRA, ++ SWS_FAST_BILINEAR, NULL, NULL, NULL); + + uint8_t *dst[] = { m_rgbBuffer, 0, 0, 0 }; + int dstStride[] = { (int)m_sourceWidth * 4, 0, 0, 0 }; +@@ -2995,7 +2995,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I + + if (m_format == RENDER_FMT_YUV420P) + { +- srcFormat = PIX_FMT_YUV420P; ++ srcFormat = AV_PIX_FMT_YUV420P; + for (int i = 0; i < 3; i++) + { + srcTop[i] = im->plane[i]; +@@ -3006,7 +3006,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I + } + else if (m_format == RENDER_FMT_NV12) + { +- srcFormat = PIX_FMT_NV12; ++ srcFormat = AV_PIX_FMT_NV12; + for (int i = 0; i < 2; i++) + { + srcTop[i] = im->plane[i]; +@@ -3017,7 +3017,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I + } + else if (m_format == RENDER_FMT_YUYV422) + { +- srcFormat = PIX_FMT_YUYV422; ++ srcFormat = AV_PIX_FMT_YUYV422; + srcTop[0] = im->plane[0]; + srcStrideTop[0] = im->stride[0] * 2; + srcBot[0] = im->plane[0] + im->stride[0]; +@@ -3025,7 +3025,7 @@ void CLinuxRendererGL::ToRGBFields(YV12I + } + else if (m_format == RENDER_FMT_UYVY422) + { +- srcFormat = PIX_FMT_UYVY422; ++ srcFormat = AV_PIX_FMT_UYVY422; + srcTop[0] = im->plane[0]; + srcStrideTop[0] = im->stride[0] * 2; + srcBot[0] = im->plane[0] + im->stride[0]; +@@ -3045,8 +3045,8 @@ void CLinuxRendererGL::ToRGBFields(YV12I + + m_context = sws_getCachedContext(m_context, + im->width, im->height >> 1, (AVPixelFormat)srcFormat, +- im->width, im->height >> 1, (AVPixelFormat)PIX_FMT_BGRA, +- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); ++ im->width, im->height >> 1, (AVPixelFormat)AV_PIX_FMT_BGRA, ++ SWS_FAST_BILINEAR, NULL, NULL, NULL); + uint8_t *dstTop[] = { m_rgbBuffer, 0, 0, 0 }; + uint8_t *dstBot[] = { m_rgbBuffer + m_sourceWidth * m_sourceHeight * 2, 0, 0, 0 }; + int dstStride[] = { (int)m_sourceWidth * 4, 0, 0, 0 }; +Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp ++++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp +@@ -2006,8 +2006,8 @@ void CLinuxRendererGLES::UploadYV12Textu + #endif + { + m_sw_context = sws_getCachedContext(m_sw_context, +- im->width, im->height, PIX_FMT_YUV420P, +- im->width, im->height, PIX_FMT_RGBA, ++ im->width, im->height, AV_PIX_FMT_YUV420P, ++ im->width, im->height, AV_PIX_FMT_RGBA, + SWS_FAST_BILINEAR, NULL, NULL, NULL); + + uint8_t *src[] = { im->plane[0], im->plane[1], im->plane[2], 0 }; +Index: xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/WinRenderer.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/cores/VideoRenderers/WinRenderer.cpp ++++ xbmc-16.0-Jarvis/xbmc/cores/VideoRenderers/WinRenderer.cpp +@@ -94,16 +94,16 @@ CWinRenderer::~CWinRenderer() + UnInit(); + } + +-static enum PixelFormat PixelFormatFromFormat(ERenderFormat format) ++static enum AVPixelFormat PixelFormatFromFormat(ERenderFormat format) + { +- if (format == RENDER_FMT_DXVA) return PIX_FMT_NV12; +- if (format == RENDER_FMT_YUV420P) return PIX_FMT_YUV420P; +- if (format == RENDER_FMT_YUV420P10) return PIX_FMT_YUV420P10; +- if (format == RENDER_FMT_YUV420P16) return PIX_FMT_YUV420P16; +- if (format == RENDER_FMT_NV12) return PIX_FMT_NV12; +- if (format == RENDER_FMT_UYVY422) return PIX_FMT_UYVY422; +- if (format == RENDER_FMT_YUYV422) return PIX_FMT_YUYV422; +- return PIX_FMT_NONE; ++ if (format == RENDER_FMT_DXVA) return AV_PIX_FMT_NV12; ++ if (format == RENDER_FMT_YUV420P) return AV_PIX_FMT_YUV420P; ++ if (format == RENDER_FMT_YUV420P10) return AV_PIX_FMT_YUV420P10; ++ if (format == RENDER_FMT_YUV420P16) return AV_PIX_FMT_YUV420P16; ++ if (format == RENDER_FMT_NV12) return AV_PIX_FMT_NV12; ++ if (format == RENDER_FMT_UYVY422) return AV_PIX_FMT_UYVY422; ++ if (format == RENDER_FMT_YUYV422) return AV_PIX_FMT_YUYV422; ++ return AV_PIX_FMT_NONE; + } + + void CWinRenderer::ManageTextures() +@@ -719,13 +719,13 @@ void CWinRenderer::Render(DWORD flags) + + void CWinRenderer::RenderSW() + { +- enum PixelFormat format = PixelFormatFromFormat(m_format); ++ enum AVPixelFormat format = PixelFormatFromFormat(m_format); + + // 1. convert yuv to rgb + m_sw_scale_ctx = sws_getCachedContext(m_sw_scale_ctx, + m_sourceWidth, m_sourceHeight, format, +- m_sourceWidth, m_sourceHeight, PIX_FMT_BGRA, +- SWS_FAST_BILINEAR | SwScaleCPUFlags(), NULL, NULL, NULL); ++ m_sourceWidth, m_sourceHeight, AV_PIX_FMT_BGRA, ++ SWS_FAST_BILINEAR, NULL, NULL, NULL); + + YUVBuffer* buf = (YUVBuffer*)m_VideoBuffers[m_iYV12RenderBuffer]; + +Index: xbmc-16.0-Jarvis/xbmc/pictures/Picture.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/pictures/Picture.cpp ++++ xbmc-16.0-Jarvis/xbmc/pictures/Picture.cpp +@@ -342,9 +342,9 @@ bool CPicture::ScaleImage(uint8_t *in_pi + uint8_t *out_pixels, unsigned int out_width, unsigned int out_height, unsigned int out_pitch, + CPictureScalingAlgorithm::Algorithm scalingAlgorithm /* = CPictureScalingAlgorithm::NoAlgorithm */) + { +- struct SwsContext *context = sws_getContext(in_width, in_height, PIX_FMT_BGRA, +- out_width, out_height, PIX_FMT_BGRA, +- CPictureScalingAlgorithm::ToSwscale(scalingAlgorithm) | SwScaleCPUFlags(), NULL, NULL, NULL); ++ struct SwsContext *context = sws_getContext(in_width, in_height, AV_PIX_FMT_BGRA, ++ out_width, out_height, AV_PIX_FMT_BGRA, ++ CPictureScalingAlgorithm::ToSwscale(scalingAlgorithm), NULL, NULL, NULL); + + uint8_t *src[] = { in_pixels, 0, 0, 0 }; + int srcStride[] = { (int)in_pitch, 0, 0, 0 }; +Index: xbmc-16.0-Jarvis/xbmc/video/FFmpegVideoDecoder.cpp +=================================================================== +--- xbmc-16.0-Jarvis.orig/xbmc/video/FFmpegVideoDecoder.cpp ++++ xbmc-16.0-Jarvis/xbmc/video/FFmpegVideoDecoder.cpp +@@ -252,7 +252,7 @@ bool FFmpegVideoDecoder::nextFrame( CBas + return false; + + // Due to a bug in swsscale we need to allocate one extra line of data +- if ( avpicture_alloc( m_pFrameRGB, PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 ) ++ if ( avpicture_alloc( m_pFrameRGB, AV_PIX_FMT_RGB32, m_frameRGBwidth, m_frameRGBheight + 1 ) < 0 ) + return false; + } + +@@ -287,7 +287,7 @@ bool FFmpegVideoDecoder::nextFrame( CBas + + // We got the video frame, render it into the picture buffer + struct SwsContext * context = sws_getContext( m_pCodecCtx->width, m_pCodecCtx->height, m_pCodecCtx->pix_fmt, +- m_frameRGBwidth, m_frameRGBheight, PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL ); ++ m_frameRGBwidth, m_frameRGBheight, AV_PIX_FMT_RGB32, SWS_FAST_BILINEAR, NULL, NULL, NULL ); + + sws_scale( context, m_pFrame->data, m_pFrame->linesize, 0, m_pCodecCtx->height, + m_pFrameRGB->data, m_pFrameRGB->linesize ); diff --git a/package/kodi/0007-exif-Fix-for-out-of-memory-errors-with-large-numbers.patch b/package/kodi/0007-exif-Fix-for-out-of-memory-errors-with-large-numbers.patch new file mode 100644 index 0000000000..9b0e47d074 --- /dev/null +++ b/package/kodi/0007-exif-Fix-for-out-of-memory-errors-with-large-numbers.patch @@ -0,0 +1,45 @@ +From f63563615e357b7d794a38e1d37276c325d1466f Mon Sep 17 00:00:00 2001 +From: popcornmix +Date: Sat, 7 May 2016 13:47:42 +0100 +Subject: [PATCH] [exif] Fix for out-of-memory errors with large numbers + of jpegs + +This reverts part of https://github.com/xbmc/xbmc/pull/7472 + +Basically the commit made the 4 comments in the exif block increase +from 2K to 64K each, so you now need 256K per photo. + +When opening a folder exif information for all photos is extracted. +So, for a folder of 5000 jpegs, 1.2GB of RAM is needed just for +the comments. + +As a 64K comment string is of no use to kodi, just truncate them to 2K +like we used to. + +See: +http://trac.kodi.tv/ticket/16193 +http://forum.kodi.tv/showthread.php?tid=251908 + +Signed-off-by: Bernd Kuhls +(backported from upstream commit in master branch: + https://github.com/xbmc/xbmc/commit/f63563615e357b7d794a38e1d37276c325d1466f) +--- + lib/libexif/libexif.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/libexif/libexif.h b/lib/libexif/libexif.h +index aa8da07..519ac30 100644 +--- a/lib/libexif/libexif.h ++++ b/lib/libexif/libexif.h +@@ -81,7 +81,7 @@ typedef struct { + #define EXIF_COMMENT_CHARSET_UNICODE 3 // Exif: Unicode (UTF-16) + #define EXIF_COMMENT_CHARSET_JIS 4 // Exif: JIS X208-1990 + +-#define MAX_COMMENT 65533 // 2 bytes - 2 for the length param ++#define MAX_COMMENT 2000 + #define MAX_DATE_COPIES 10 + + typedef struct { +-- +2.8.1 + diff --git a/package/kodi/Config.in b/package/kodi/Config.in new file mode 100644 index 0000000000..d9760cac52 --- /dev/null +++ b/package/kodi/Config.in @@ -0,0 +1,302 @@ +config BR2_PACKAGE_KODI_ARCH_SUPPORTS + bool + default y if (BR2_arm || (BR2_mipsel && BR2_TOOLCHAIN_USES_GLIBC) || BR2_i386 || BR2_x86_64) \ + && BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS \ + && BR2_PACKAGE_BOOST_ARCH_SUPPORTS \ + && BR2_TOOLCHAIN_HAS_SYNC_8 + +comment "kodi needs a uClibc or (e)glibc toolchain w/ C++, threads, wchar, dynamic library, gcc >= 4.7, host gcc >= 4.6" + depends on BR2_PACKAGE_KODI_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_USE_WCHAR || BR2_STATIC_LIBS \ + || !BR2_HOST_GCC_AT_LEAST_4_6 \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 \ + || BR2_TOOLCHAIN_USES_MUSL + depends on BR2_USE_MMU + +config BR2_PACKAGE_KODI_EGL_GLES + bool + default y + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_HAS_LIBGLES + depends on !BR2_PACKAGE_KODI_GL # prefer GL if available + +config BR2_PACKAGE_KODI_GL + bool + default y + depends on BR2_PACKAGE_HAS_LIBGL + depends on !BR2_arm # kodi needs egl/gles on arm + +comment "kodi needs an OpenGL or an openGL ES and EGL backend" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_PACKAGE_KODI_GL && !BR2_PACKAGE_KODI_EGL_GLES + +comment "kodi requires an OpenGL ES and EGL backend" + depends on BR2_arm + depends on !BR2_PACKAGE_KODI_EGL_GLES + +menuconfig BR2_PACKAGE_KODI + bool "kodi" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_HOST_GCC_AT_LEAST_4_6 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_TOOLCHAIN_USES_MUSL + depends on BR2_PACKAGE_KODI_EGL_GLES || BR2_PACKAGE_KODI_GL + depends on BR2_USE_MMU # python + depends on BR2_USE_WCHAR + depends on !BR2_STATIC_LIBS # python + depends on BR2_PACKAGE_KODI_ARCH_SUPPORTS + select BR2_NEEDS_HOST_JAVA + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_THREAD + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_GPL + select BR2_PACKAGE_FFMPEG_POSTPROC # postproc depends on GPL + select BR2_PACKAGE_FFMPEG_SWSCALE + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_GIFLIB + select BR2_PACKAGE_JASPER + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBASS + select BR2_PACKAGE_LIBCDIO + select BR2_PACKAGE_LIBCROSSGUID + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBDCADEC + select BR2_PACKAGE_LIBFRIBIDI + select BR2_PACKAGE_LIBGLEW if BR2_PACKAGE_KODI_GL + select BR2_PACKAGE_LIBGLU if BR2_PACKAGE_KODI_GL + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBMPEG2 + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBPLIST + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_LIBSAMPLERATE + select BR2_PACKAGE_LIBSQUISH + select BR2_PACKAGE_LIBVORBIS + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBXSLT + select BR2_PACKAGE_LZO + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_PCRE_UCP + select BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_BSDDB + select BR2_PACKAGE_PYTHON_BZIP2 + select BR2_PACKAGE_PYTHON_CURSES + select BR2_PACKAGE_PYTHON_PYEXPAT + select BR2_PACKAGE_PYTHON_READLINE + select BR2_PACKAGE_PYTHON_SQLITE + select BR2_PACKAGE_PYTHON_SSL + select BR2_PACKAGE_PYTHON_UNICODEDATA + select BR2_PACKAGE_PYTHON_ZLIB + select BR2_PACKAGE_READLINE + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_TAGLIB + select BR2_PACKAGE_TIFF + select BR2_PACKAGE_TINYXML + select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_KODI_GL + select BR2_PACKAGE_XLIB_LIBXRANDR if BR2_PACKAGE_KODI_GL + select BR2_PACKAGE_YAJL + select BR2_PACKAGE_ZLIB + select BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY if BR2_TOOLCHAIN_USES_GLIBC # runtime UTF conversion support + help + Kodi is an award-winning free and open source (GPL) software + media player and entertainment hub for digital media. + + http://kodi.tv + +if BR2_PACKAGE_KODI + +source "package/kodi-platform/Config.in" + +config BR2_PACKAGE_KODI_ALSA_LIB + bool "alsa" + select BR2_PACKAGE_ALSA_LIB + help + Enable alsa support. + +config BR2_PACKAGE_KODI_AVAHI + bool "avahi" + select BR2_PACKAGE_AVAHI + select BR2_PACKAGE_AVAHI_DAEMON + help + Enable Avahi support. + Select this if you want Kodi to support Bonjour protocol. + +config BR2_PACKAGE_KODI_DBUS + bool "dbus" + select BR2_PACKAGE_DBUS + help + Enable D-Bus support + +config BR2_PACKAGE_KODI_LIBBLURAY + bool "blu-ray" + select BR2_PACKAGE_LIBBLURAY + help + Enable Blu-ray input support. + Select this if you want to play back Blu-ray content. + +config BR2_PACKAGE_KODI_LIBCEC + bool "hdmi cec" + depends on BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_LIBCEC + help + Enable CEC (Consumer Electronics Control) support. + Select this if you want Kodi to support HDMI CEC. + +comment "hdmi cec support needs udev /dev management" + depends on !BR2_PACKAGE_HAS_UDEV + +config BR2_PACKAGE_KODI_LIRC + bool "lirc" + help + Enable lirc support + +config BR2_PACKAGE_KODI_LIBMICROHTTPD + bool "web server" + select BR2_PACKAGE_LIBMICROHTTPD + help + Enable webserver feature + +config BR2_PACKAGE_KODI_LIBNFS + bool "nfs" + # libnfs -> libtirpc + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBNFS + help + Enable NFS server support. + +comment "nfs support needs a toolchain w/ threads support" + depends on !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC) + +config BR2_PACKAGE_KODI_RTMPDUMP + bool "rtmp" + select BR2_PACKAGE_RTMPDUMP + help + Enable RTMP input support. + Select this if you want to play back rtmp stream. + +config BR2_PACKAGE_KODI_LIBSHAIRPLAY + bool "shairport" + select BR2_PACKAGE_LIBSHAIRPLAY + help + Enable Shairport support. + Select this if you want to stream content from an Apple device. + +comment "samba support needs a (e)glibc or uClibc toolchain w/ RPC" + depends on (!BR2_TOOLCHAIN_USES_GLIBC && \ + !BR2_TOOLCHAIN_USES_UCLIBC) || !BR2_TOOLCHAIN_HAS_NATIVE_RPC + +config BR2_PACKAGE_KODI_LIBSMBCLIENT + bool "samba" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_SAMBA4 + help + Enable Samba support + +config BR2_PACKAGE_KODI_LIBSSH + bool "ssh" + select BR2_PACKAGE_LIBSSH + help + Enable sftp virtual filesystem using libssh. + +config BR2_PACKAGE_KODI_LIBTHEORA + bool "theora" + select BR2_PACKAGE_LIBTHEORA + help + Enable Theora input support. + Select this if you want to play back OGG/OGV files (Video). + +config BR2_PACKAGE_KODI_LIBUSB + bool "usb" + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + help + Enable libusb support. + +config BR2_PACKAGE_KODI_LIBVA + bool "va" + select BR2_PACKAGE_LIBVA + help + Enable libva support. + +config BR2_PACKAGE_KODI_OPTICALDRIVE + bool + +menu "Audio decoder addons" + source "package/kodi-audiodecoder-modplug/Config.in" + source "package/kodi-audiodecoder-nosefart/Config.in" + source "package/kodi-audiodecoder-opus/Config.in" + source "package/kodi-audiodecoder-sidplay/Config.in" + source "package/kodi-audiodecoder-snesapu/Config.in" + source "package/kodi-audiodecoder-stsound/Config.in" + source "package/kodi-audiodecoder-timidity/Config.in" + source "package/kodi-audiodecoder-vgmstream/Config.in" +endmenu + +menu "Audio DSP addons" + source "package/kodi-adsp-basic/Config.in" + source "package/kodi-adsp-freesurround/Config.in" +endmenu + +menu "Audio encoder addons" + source "package/kodi-audioencoder-flac/Config.in" + source "package/kodi-audioencoder-lame/Config.in" + source "package/kodi-audioencoder-vorbis/Config.in" + source "package/kodi-audioencoder-wav/Config.in" +endmenu + +menu "PVR addons" + source "package/kodi-addon-xvdr/Config.in" + source "package/kodi-pvr-argustv/Config.in" + source "package/kodi-pvr-dvblink/Config.in" + source "package/kodi-pvr-dvbviewer/Config.in" + source "package/kodi-pvr-filmon/Config.in" + source "package/kodi-pvr-hdhomerun/Config.in" + source "package/kodi-pvr-hts/Config.in" + source "package/kodi-pvr-iptvsimple/Config.in" + source "package/kodi-pvr-mediaportal-tvserver/Config.in" + source "package/kodi-pvr-mythtv/Config.in" + source "package/kodi-pvr-nextpvr/Config.in" + source "package/kodi-pvr-njoy/Config.in" + source "package/kodi-pvr-pctv/Config.in" + source "package/kodi-pvr-stalker/Config.in" + source "package/kodi-pvr-vbox/Config.in" + source "package/kodi-pvr-vdr-vnsi/Config.in" + source "package/kodi-pvr-vuplus/Config.in" + source "package/kodi-pvr-wmc/Config.in" +endmenu + +menu "Screensavers" + source "package/kodi-screensaver-asteroids/Config.in" + source "package/kodi-screensaver-asterwave/Config.in" + source "package/kodi-screensaver-biogenesis/Config.in" + source "package/kodi-screensaver-cpblobs/Config.in" + source "package/kodi-screensaver-crystalmorph/Config.in" + source "package/kodi-screensaver-greynetic/Config.in" + source "package/kodi-screensaver-matrixtrails/Config.in" + source "package/kodi-screensaver-pingpong/Config.in" + source "package/kodi-screensaver-planestate/Config.in" + source "package/kodi-screensaver-pyro/Config.in" + source "package/kodi-screensaver-rsxs/Config.in" + source "package/kodi-screensaver-stars/Config.in" +endmenu + +menu "Visualisations" + source "package/kodi-visualisation-fishbmc/Config.in" + source "package/kodi-visualisation-fountain/Config.in" + source "package/kodi-visualisation-goom/Config.in" + source "package/kodi-visualisation-shadertoy/Config.in" + source "package/kodi-visualisation-spectrum/Config.in" + source "package/kodi-visualisation-waveforhue/Config.in" + source "package/kodi-visualisation-waveform/Config.in" +endmenu + +endif # BR2_PACKAGE_KODI diff --git a/package/kodi/S50kodi b/package/kodi/S50kodi new file mode 100755 index 0000000000..f00c59c5d9 --- /dev/null +++ b/package/kodi/S50kodi @@ -0,0 +1,39 @@ +#!/bin/sh +# +# Starts Kodi +# + +BIN=/usr/bin/br-kodi +KODI=/usr/lib/xbmc/kodi.bin +KODI_ARGS="--standalone -fs -n" +PIDFILE=/var/run/kodi.pid + +start() { + printf "Starting Kodi: " + start-stop-daemon -S -q -b -m -p $PIDFILE --exec $BIN -- $KODI $KODI_ARGS + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +stop() { + printf "Stopping Kodi: " + start-stop-daemon -K -q -p $PIDFILE + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/kodi/br-kodi b/package/kodi/br-kodi new file mode 100755 index 0000000000..83d4d4e5ac --- /dev/null +++ b/package/kodi/br-kodi @@ -0,0 +1,36 @@ +#!/bin/sh + +# We're called with the real Kodi executable as +# first argument, followed by any Kodi extra args +KODI="${1}" +shift + +# In case someone asked we terminate, just kill +# the Kodi process +trap_kill() { + LOOP=0 + killall "${KODI##*/}" +} +trap trap_kill INT QUIT TERM + +LOOP=1 +while [ ${LOOP} -eq 1 ]; do + # Hack: BusyBox ash does not catch signals while a non-builtin + # is running, and only catches the signal when the non-builtin + # command ends. So, we just background the Kodi binary, and wait + # for it. But BusyBox' ash's wait builtin does not return the + # exit code even if there was only one job (which is correct + # for POSIX). So we explicitly wait for the Kodi job + "${KODI}" "${@}" & + wait %1 + ret=$? + case "${ret}" in + 0) ;; + 64) poweroff; LOOP=0;; + 66) reboot; LOOP=0;; + *) # Crash + sleep 1 + ;; + esac +done +exit ${ret} diff --git a/package/kodi/kodi.hash b/package/kodi/kodi.hash new file mode 100644 index 0000000000..5aa580ec7a --- /dev/null +++ b/package/kodi/kodi.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 7d82c8aff2715c83deecdf10c566e26105bec0473af530a1356d4c747ebdfd10 kodi-16.1-Jarvis.tar.gz diff --git a/package/kodi/kodi.mk b/package/kodi/kodi.mk new file mode 100644 index 0000000000..e163c24018 --- /dev/null +++ b/package/kodi/kodi.mk @@ -0,0 +1,251 @@ +################################################################################ +# +# kodi +# +################################################################################ + +KODI_VERSION = 16.1-Jarvis +KODI_SITE = $(call github,xbmc,xbmc,$(KODI_VERSION)) +KODI_LICENSE = GPLv2 +KODI_LICENSE_FILES = LICENSE.GPL +# needed for binary addons +KODI_INSTALL_STAGING = YES +KODI_DEPENDENCIES = host-gawk host-gettext host-gperf host-zip host-giflib \ + host-libjpeg host-lzo host-nasm host-libpng host-swig +KODI_DEPENDENCIES += boost bzip2 expat ffmpeg fontconfig freetype giflib jasper jpeg \ + libass libcdio libcrossguid libcurl libdcadec libfribidi libgcrypt libmpeg2 \ + libogg libplist libpng libsamplerate libsquish libvorbis libxml2 \ + libxslt lzo ncurses openssl pcre python readline sqlite taglib tiff \ + tinyxml yajl zlib + +KODI_CONF_ENV = \ + PYTHON_VERSION="$(PYTHON_VERSION_MAJOR)" \ + PYTHON_LDFLAGS="-lpython$(PYTHON_VERSION_MAJOR) -lpthread -ldl -lutil -lm" \ + PYTHON_CPPFLAGS="-I$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)" \ + PYTHON_SITE_PKG="$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages" \ + PYTHON_NOVERSIONCHECK="no-check" \ + use_texturepacker_native=yes \ + USE_TEXTUREPACKER_NATIVE_ROOT="$(HOST_DIR)/usr" \ + TEXTUREPACKER_NATIVE_ROOT="$(HOST_DIR)/usr" + +KODI_CONF_OPTS += \ + --with-ffmpeg=shared \ + --disable-joystick \ + --disable-openmax \ + --disable-pulse \ + --disable-vdpau \ + --disable-vtbdecoder \ + --enable-optimizations + +ifeq ($(BR2_PACKAGE_MYSQL),y) +KODI_CONF_OPTS += --enable-mysql +KODI_CONF_ENV += ac_cv_path_MYSQL_CONFIG="$(STAGING_DIR)/usr/bin/mysql_config" +KODI_DEPENDENCIES += mysql +else +KODI_CONF_OPTS += --disable-mysql +endif + +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +KODI_DEPENDENCIES += rpi-userland +KODI_CONF_OPTS += --with-platform=raspberry-pi --enable-player=omxplayer +KODI_CONF_ENV += INCLUDES="-I$(STAGING_DIR)/usr/include/interface/vcos/pthreads \ + -I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux" \ + LIBS="-lvcos -lvchostif" +endif + +ifeq ($(BR2_PACKAGE_LIBFSLVPUWRAP),y) +KODI_DEPENDENCIES += libfslvpuwrap +KODI_CONF_OPTS += --enable-codec=imxvpu +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +KODI_CONF_OPTS += --enable-libcap +KODI_DEPENDENCIES += libcap +else +KODI_CONF_OPTS += --disable-libcap +endif + +ifeq ($(BR2_PACKAGE_KODI_DBUS),y) +KODI_DEPENDENCIES += dbus +KODI_CONF_OPTS += --enable-dbus +else +KODI_CONF_OPTS += --disable-dbus +endif + +ifeq ($(BR2_PACKAGE_KODI_ALSA_LIB),y) +KODI_DEPENDENCIES += alsa-lib +KODI_CONF_OPTS += --enable-alsa +else +KODI_CONF_OPTS += --disable-alsa +endif + +# quote from kodi/configure.in: "GLES overwrites GL if both set to yes." +# we choose the opposite because opengl offers more features, like libva support +# GL means X11, and under X11, Kodi needs libdrm; libdrm is forcefully selected +# by a modular Xorg server, which Kodi already depends on. +ifeq ($(BR2_PACKAGE_KODI_GL),y) +KODI_DEPENDENCIES += libglew libglu libgl xlib_libX11 xlib_libXext \ + xlib_libXmu xlib_libXrandr xlib_libXt libdrm +KODI_CONF_OPTS += --enable-gl --enable-x11 --disable-gles +else +KODI_CONF_OPTS += --disable-gl --disable-x11 +ifeq ($(BR2_PACKAGE_KODI_EGL_GLES),y) +KODI_DEPENDENCIES += libegl libgles +KODI_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags --libs egl`" +KODI_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags --libs egl`" +KODI_CONF_OPTS += --enable-gles +else +KODI_CONF_OPTS += --disable-gles +endif +endif + +ifeq ($(BR2_PACKAGE_KODI_LIBUSB),y) +KODI_DEPENDENCIES += libusb-compat +KODI_CONF_OPTS += --enable-libusb +else +KODI_CONF_OPTS += --disable-libusb +endif + +ifeq ($(BR2_PACKAGE_KODI_LIBMICROHTTPD),y) +KODI_DEPENDENCIES += libmicrohttpd +KODI_CONF_OPTS += --enable-webserver +else +KODI_CONF_OPTS += --disable-webserver +endif + +ifeq ($(BR2_PACKAGE_KODI_LIBSMBCLIENT),y) +KODI_DEPENDENCIES += samba4 +KODI_CONF_OPTS += --enable-samba +else +KODI_CONF_OPTS += --disable-samba +endif + +ifeq ($(BR2_PACKAGE_KODI_LIBNFS),y) +KODI_DEPENDENCIES += libnfs +KODI_CONF_OPTS += --enable-nfs +else +KODI_CONF_OPTS += --disable-nfs +endif + +ifeq ($(BR2_PACKAGE_KODI_RTMPDUMP),y) +KODI_DEPENDENCIES += rtmpdump +KODI_CONF_OPTS += --enable-rtmp +else +KODI_CONF_OPTS += --disable-rtmp +endif + +ifeq ($(BR2_PACKAGE_KODI_LIBBLURAY),y) +KODI_DEPENDENCIES += libbluray +KODI_CONF_OPTS += --enable-libbluray +else +KODI_CONF_OPTS += --disable-libbluray +endif + +ifeq ($(BR2_PACKAGE_KODI_LIBSHAIRPLAY),y) +KODI_DEPENDENCIES += libshairplay +KODI_CONF_OPTS += --enable-airplay +else +KODI_CONF_OPTS += --disable-airplay +endif + +ifeq ($(BR2_PACKAGE_KODI_LIBSSH),y) +KODI_DEPENDENCIES += libssh +KODI_CONF_OPTS += --enable-ssh +else +KODI_CONF_OPTS += --disable-ssh +endif + +ifeq ($(BR2_PACKAGE_KODI_AVAHI),y) +KODI_DEPENDENCIES += avahi +KODI_CONF_OPTS += --enable-avahi +else +KODI_CONF_OPTS += --disable-avahi +endif + +ifeq ($(BR2_PACKAGE_KODI_LIBCEC),y) +KODI_DEPENDENCIES += libcec +KODI_CONF_OPTS += --enable-libcec +else +KODI_CONF_OPTS += --disable-libcec +endif + +ifeq ($(BR2_PACKAGE_KODI_LIRC),y) +KODI_CONF_OPTS += --enable-lirc +else +KODI_CONF_OPTS += --disable-lirc +endif + +ifeq ($(BR2_PACKAGE_KODI_LIBTHEORA),y) +KODI_DEPENDENCIES += libtheora +endif + +# kodi needs libva & libva-glx +ifeq ($(BR2_PACKAGE_KODI_LIBVA)$(BR2_PACKAGE_MESA3D_DRI_DRIVER),yy) +KODI_DEPENDENCIES += mesa3d libva +KODI_CONF_OPTS += --enable-vaapi +else +KODI_CONF_OPTS += --disable-vaapi +endif + +ifeq ($(BR2_PACKAGE_KODI_OPTICALDRIVE),y) +KODI_CONF_OPTS += --enable-optical-drive --enable-dvdcss +else +KODI_CONF_OPTS += --disable-optical-drive --disable-dvdcss +endif + +# Add HOST_DIR to PATH for codegenerator.mk to find swig +define KODI_BOOTSTRAP + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)/tools/depends/native/JsonSchemaBuilder + $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)/tools/depends/native/TexturePacker + cd $(@D) && PATH=$(BR_PATH) ./bootstrap +endef +KODI_PRE_CONFIGURE_HOOKS += KODI_BOOTSTRAP + +define KODI_CLEAN_UNUSED_ADDONS + rm -Rf $(TARGET_DIR)/usr/share/kodi/addons/visualization.milkdrop + rm -Rf $(TARGET_DIR)/usr/share/kodi/addons/visualization.projectm + rm -Rf $(TARGET_DIR)/usr/share/kodi/addons/visualization.itunes +endef +KODI_POST_INSTALL_TARGET_HOOKS += KODI_CLEAN_UNUSED_ADDONS + +define KODI_CLEAN_CONFLUENCE_SKIN + find $(TARGET_DIR)/usr/share/kodi/addons/skin.confluence/media -name *.png -delete + find $(TARGET_DIR)/usr/share/kodi/addons/skin.confluence/media -name *.jpg -delete +endef +KODI_POST_INSTALL_TARGET_HOOKS += KODI_CLEAN_CONFLUENCE_SKIN + +define KODI_INSTALL_BR_WRAPPER + $(INSTALL) -D -m 0755 package/kodi/br-kodi \ + $(TARGET_DIR)/usr/bin/br-kodi +endef +KODI_POST_INSTALL_TARGET_HOOKS += KODI_INSTALL_BR_WRAPPER + +# When run from a startup script, Kodi has no $HOME where to store its +# configuration, so ends up storing it in /.kodi (yes, at the root of +# the rootfs). This is a problem for read-only filesystems. But we can't +# easily change that, so create /.kodi as a symlink where we want the +# config to eventually be. Add synlinks for the legacy XBMC name as well +define KODI_INSTALL_CONFIG_DIR + $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/kodi + ln -sf /var/kodi $(TARGET_DIR)/.kodi + ln -sf /var/kodi $(TARGET_DIR)/var/xbmc + ln -sf /var/kodi $(TARGET_DIR)/.xbmc +endef +KODI_POST_INSTALL_TARGET_HOOKS += KODI_INSTALL_CONFIG_DIR + +define KODI_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/kodi/S50kodi \ + $(TARGET_DIR)/etc/init.d/S50kodi +endef + +define KODI_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/kodi/kodi.service \ + $(TARGET_DIR)/usr/lib/systemd/system/kodi.service + + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + + ln -fs ../../../../usr/lib/systemd/system/kodi.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/kodi.service +endef + +$(eval $(autotools-package)) diff --git a/package/kodi/kodi.service b/package/kodi/kodi.service new file mode 100644 index 0000000000..f30741c10a --- /dev/null +++ b/package/kodi/kodi.service @@ -0,0 +1,12 @@ +[Unit] +Description = Kodi Entertainment Center +After = network.target + +[Service] +Type = simple +ExecStart = /usr/lib/kodi/kodi.bin --standalone -fs -n +Restart = on-failure + +[Install] +WantedBy = multi-user.target + diff --git a/package/kompexsqlite/0001-Makefile-use-autoconf-CXX-for-proper-builds.patch b/package/kompexsqlite/0001-Makefile-use-autoconf-CXX-for-proper-builds.patch new file mode 100644 index 0000000000..408c100d71 --- /dev/null +++ b/package/kompexsqlite/0001-Makefile-use-autoconf-CXX-for-proper-builds.patch @@ -0,0 +1,27 @@ +From 769693d9ddf63b04dd4aad6cad080f3cee3f997e Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Thu, 11 Jun 2015 14:08:38 -0300 +Subject: [PATCH] Makefile: use autoconf CXX for proper builds + +Status: applied upstream. + +Signed-off-by: Gustavo Zacarias +--- + Makefile.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile.in b/Makefile.in +index 91fb8b2..fe862cd 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -23,6 +23,7 @@ mandir = $(prefix)/share/man/man3 + headerdir = $(prefix)/include/kompex + + CC = @CC@ ++CXX = @CXX@ + CFLAGS = @CFLAGS@ + CPPFLAGS = $(CFLAGS) @CPPFLAGS@ + LDFLAGS = @LDFLAGS@ +-- +2.3.6 + diff --git a/package/kompexsqlite/0002-append-to-cflags-and-cxxflags.patch b/package/kompexsqlite/0002-append-to-cflags-and-cxxflags.patch new file mode 100644 index 0000000000..abd0dc0fdd --- /dev/null +++ b/package/kompexsqlite/0002-append-to-cflags-and-cxxflags.patch @@ -0,0 +1,49 @@ +From 3eb064ffa9b43fb5f245b8abda48a1c152a6f2d7 Mon Sep 17 00:00:00 2001 +From: me +Date: Thu, 20 Nov 2014 14:37:34 -0700 +Subject: [PATCH] Append to CFLAGS and CXXFLAGS as setup by ./configure. This + can allow users to Customize the SQLite build process with compile time + #defines rather than altering the sources. + +Signed-off-by: Max Filippov +--- +Backported from: 3eb064ffa9b43fb5f245b8abda48a1c152a6f2d7 + + Makefile-shared.mk | 4 ++-- + Makefile-static.mk | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile-shared.mk b/Makefile-shared.mk +index b2a4920..d15ce3c 100644 +--- a/Makefile-shared.mk ++++ b/Makefile-shared.mk +@@ -12,10 +12,10 @@ OBJS= \ + ${objsdir}/sqlite3.o + + # C Compiler Flags +-CFLAGS= -fPIC -MMD -MP ++CFLAGS+= -fPIC -MMD -MP + + # CC Compiler Flags +-CPPFLAGS= -DKOMPEX_SQLITEWRAPPER_EXPORT -DKOMPEX_SQLITEWRAPPER_DYN -fPIC -MMD -MP -I${includedir} ++CPPFLAGS+= -DKOMPEX_SQLITEWRAPPER_EXPORT -DKOMPEX_SQLITEWRAPPER_DYN -fPIC -MMD -MP -I${includedir} + + # Link Libraries and Options + LDLIBSOPTIONS= -shared -fPIC +diff --git a/Makefile-static.mk b/Makefile-static.mk +index 429a4ff..0678681 100644 +--- a/Makefile-static.mk ++++ b/Makefile-static.mk +@@ -12,10 +12,10 @@ OBJS= \ + ${objsdir}/sqlite3.o + + # C Compiler Flags +-CFLAGS= -MMD -MP ++CFLAGS+= -MMD -MP + + # CC Compiler Flags +-CPPFLAGS= -I${includedir} -MMD -MP ++CPPFLAGS+= -I${includedir} -MMD -MP + + # Link Libraries and Options + LDLIBSOPTIONS= diff --git a/package/kompexsqlite/Config.in b/package/kompexsqlite/Config.in new file mode 100644 index 0000000000..5b71842577 --- /dev/null +++ b/package/kompexsqlite/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_KOMPEXSQLITE + bool "kompexsqlite" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + help + The Kompex SQLite Wrapper is an open source C++ wrapper + library for SQLite. + + http://sqlitewrapper.kompex-online.com/index.php + +comment "kompexsqlite needs a toolchain w/ C++, wchar, threads, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/kompexsqlite/kompexsqlite.hash b/package/kompexsqlite/kompexsqlite.hash new file mode 100644 index 0000000000..3c94adf091 --- /dev/null +++ b/package/kompexsqlite/kompexsqlite.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 73bec94fe5dd3a24bd8668b3a131a84dbe39a992579eebab1236aa0e73b2c9cc v1.10.12-1.tar.gz diff --git a/package/kompexsqlite/kompexsqlite.mk b/package/kompexsqlite/kompexsqlite.mk new file mode 100644 index 0000000000..7f57680af5 --- /dev/null +++ b/package/kompexsqlite/kompexsqlite.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# kompexsqlite +# +################################################################################ + +KOMPEXSQLITE_VERSION = v1.10.12-1 +KOMPEXSQLITE_SOURCE = $(KOMPEXSQLITE_VERSION).tar.gz +KOMPEXSQLITE_SITE = https://github.com/Aethelflaed/kompex-sqlite-wrapper/archive +KOMPEXSQLITE_INSTALL_STAGING = YES +KOMPEXSQLITE_LICENSE = LGPLv3+ (wrapper), Public Domain (bundled sqlite) +KOMPEXSQLITE_LICENSE_FILES = LICENSE.txt + +$(eval $(autotools-package)) diff --git a/package/ktap/Config.in b/package/ktap/Config.in new file mode 100644 index 0000000000..c85522846a --- /dev/null +++ b/package/ktap/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_KTAP + bool "ktap" + depends on BR2_LINUX_KERNEL + depends on BR2_TOOLCHAIN_HAS_THREADS + help + ktap is a script-based dynamic tracing tool for Linux + + It uses a scripting language and lets users trace the Linux kernel + dynamically. ktap is designed to give operational insights with + interoperability that allows users to tune, troubleshoot and extend + kernel and application. It's similar to Linux Systemtap and + Solaris Dtrace. + + ktap doesn't support kernels older than 3.1. + + To be able to resolve symbols in DSO and for sdt, you need to enable + elfutils. + + Your kernel must have CONFIG_EVENT_TRACING, + CONFIG_PERF_EVENTS, and CONFIG_DEBUG_FS enabled to compile. + + Buildroot automatically enables these in the kernel configuration. + + http://www.ktap.org + +comment "ktap needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +comment "ktap needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ktap/ktap.mk b/package/ktap/ktap.mk new file mode 100644 index 0000000000..966b51c9a1 --- /dev/null +++ b/package/ktap/ktap.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# ktap +# +################################################################################ + +KTAP_VERSION = eb66d40310c93dc82bc8eac889744c1ed1f01f7b +KTAP_SITE = $(call github,ktap,ktap,$(KTAP_VERSION)) +KTAP_LICENSE = GPLv2 +KTAP_LICENSE_FILES = LICENSE-GPL + +ifeq ($(BR2_PACKAGE_ELFUTILS),y) +KTAP_DEPENDENCIES += elfutils +else +KTAP_FLAGS += NO_LIBELF=1 +endif + +define KTAP_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) $(KTAP_FLAGS) ktap +endef + +define KTAP_INSTALL_TARGET_CMDS + $(INSTALL) -D -m755 $(@D)/ktap $(TARGET_DIR)/usr/bin/ktap +endef + +KTAP_MODULE_MAKE_OPTS = KVERSION=$(LINUX_VERSION_PROBED) + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/kvmtool/Config.in b/package/kvmtool/Config.in new file mode 100644 index 0000000000..f047c755cc --- /dev/null +++ b/package/kvmtool/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_KVMTOOL + bool "kvmtool" + depends on BR2_USE_MMU # guest simple init fork() + # No MADV_HUGEPAGE define in uClibc(-ng) + depends on (BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) + # Only mips big-endian seems to be supported (build breaks) + # Should work on powerpc64 but the build breaks with missing types + depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \ + BR2_mips || BR2_x86_64 + # libfdt is only required for DT architectures... + # ...but it's not able to build for static targets + depends on !(BR2_STATIC_LIBS && (BR2_aarch64 || BR2_arm || BR2_armeb)) + select BR2_PACKAGE_DTC if BR2_aarch64 || BR2_arm || BR2_armeb + help + kvmtool is a lightweight tool for hosting KVM guests. + As a pure virtualization tool it only supports guests using + the same architecture, though it supports running 32-bit guests + on those 64-bit architectures that allow this. + + https://git.kernel.org/cgit/linux/kernel/git/will/kvmtool.git/tree/README + +comment "kvmtool needs a (e)glibc or musl toolchain" + depends on BR2_USE_MMU + depends on BR2_i386 || BR2_mips || BR2_x86_64 + depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) + +comment "kvmtool needs a (e)glibc or musl toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_aarch64 || BR2_arm || BR2_armeb + depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) || \ + BR2_STATIC_LIBS diff --git a/package/kvmtool/kvmtool.mk b/package/kvmtool/kvmtool.mk new file mode 100644 index 0000000000..7f682db625 --- /dev/null +++ b/package/kvmtool/kvmtool.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# kvmtool +# +################################################################################ + +KVMTOOL_VERSION = 372f583d359a5bdcbbe7268809c8d1dc179c64d2 +KVMTOOL_SITE = $(BR2_KERNEL_MIRROR)/scm/linux/kernel/git/will/kvmtool.git +KVMTOOL_SITE_METHOD = git +KVMTOOL_DEPENDENCIES = \ + $(if $(BR2_PACKAGE_BINUTILS),binutils) \ + $(if $(BR2_PACKAGE_DTC),dtc) \ + $(if $(BR2_PACKAGE_LIBAIO),libaio) \ + $(if $(BR2_PACKAGE_LIBGTK3),libgtk3) \ + $(if $(BR2_PACKAGE_LIBVNCSERVER),libvncserver) \ + $(if $(BR2_PACKAGE_SDL),sdl) \ + $(if $(BR2_PACKAGE_ZLIB),zlib) +KVMTOOL_LICENSE = GPLv2 +KVMTOOL_LICENSE_FILES = COPYING + +# This is required to convert a static binary (init helper) back into +# object-file format, and in multilib toolchains like CS 2012.09 for x86 +# the default is i386, hence when building for x86_64 things break since +# LD doesn't autodetect the input file format. +# GCC-as-linker can't accomplish this feat easily either since it's mixing +# static content (guest_init.o) with dynamic one (lkvm) making +# a relocatable output file. +# The purpose of this trick is to embed the init helper into the main +# binary to help users in guest system startup, which would otherwise +# require more complex guest images. +# This needs revisiting if/when X32 ABI support is added. +# +# If more packages need this (unlikely) an ld wrapper might be a better +# solution, using gcc -dumpspecs information. +KVMTOOL_EXTRA_LDFLAGS = \ + $(if $(BR2_x86_64),-m elf_x86_64) + +# Disable -Werror, otherwise musl is not happy +KVMTOOL_MAKE_OPTS = \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + LDFLAGS="$(TARGET_LDFLAGS) $(KVMTOOL_EXTRA_LDFLAGS)" \ + WERROR=0 + +define KVMTOOL_BUILD_CMDS + $(TARGET_MAKE_ENV) ARCH=$(KERNEL_ARCH) $(MAKE) -C $(@D) $(KVMTOOL_MAKE_OPTS) +endef + +define KVMTOOL_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) ARCH=$(KERNEL_ARCH) $(MAKE) -C $(@D) \ + $(KVMTOOL_MAKE_OPTS) install DESTDIR=$(TARGET_DIR) prefix=/usr +endef + +$(eval $(generic-package)) diff --git a/package/kyua/Config.in b/package/kyua/Config.in new file mode 100644 index 0000000000..4f887b0e0a --- /dev/null +++ b/package/kyua/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_KYUA + bool "kyua" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_HAS_LUAINTERPRETER # lutok + depends on !BR2_PACKAGE_LUAJIT # lutok + depends on BR2_USE_MMU # atf + select BR2_PACKAGE_ATF + select BR2_PACKAGE_LUTOK + select BR2_PACKAGE_SQLITE + help + Kyua is a testing framework for infrastructure software, + originally designed to equip BSD-based operating systems + with a test suite. This means that Kyua is lightweight + and simple, and that Kyua integrates well with various build + systems and continuous integration frameworks. + + https://github.com/jmmv/kyua + +comment "kyua needs a toolchain w/ C++ and full Lua" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_PACKAGE_LUAJIT + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + depends on BR2_USE_MMU diff --git a/package/kyua/kyua.hash b/package/kyua/kyua.hash new file mode 100644 index 0000000000..298d0d85c6 --- /dev/null +++ b/package/kyua/kyua.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 2b8b64a458b642df75086eeb73e8073d105b8d9cff04c9b1a905b68bc8502560 kyua-0.11.tar.gz diff --git a/package/kyua/kyua.mk b/package/kyua/kyua.mk new file mode 100644 index 0000000000..c75a09fbc8 --- /dev/null +++ b/package/kyua/kyua.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# kyua +# +################################################################################ + +KYUA_VERSION = 0.11 +KYUA_SITE = https://github.com/jmmv/kyua/releases/download/kyua-$(KYUA_VERSION) +KYUA_DEPENDENCIES = host-pkgconf atf lutok sqlite +KYUA_CONF_OPTS = --without-doxygen --without-atf +KYUA_LICENSE = BSD-3c +KYUA_LICENSE_FILES = COPYING +KYUA_CONF_ENV = \ + kyua_cv_attribute_noreturn=yes \ + kyua_cv_getcwd_dyn=yes \ + kyua_cv_lchmod_works=no \ + kyua_cv_getopt_gnu=yes \ + kyua_cv_getopt_optind_reset_value=0 \ + kyua_cv_signals_lastno=15 + +define KYUA_INSTALL_CONFIG + $(INSTALL) -D -m 644 $(@D)/examples/kyua.conf $(TARGET_DIR)/etc/kyua/kyua.conf +endef + +KYUA_POST_INSTALL_HOOKS += KYUA_INSTALL_CONFIG + +$(eval $(autotools-package)) diff --git a/package/lame/0001-configure.patch b/package/lame/0001-configure.patch new file mode 100644 index 0000000000..7e407f28c0 --- /dev/null +++ b/package/lame/0001-configure.patch @@ -0,0 +1,69 @@ +Various patches to fix autoreconf errors. + +All patches besides +- AM_ICONV in configure.in +are already applied upstream: +http://lame.cvs.sourceforge.net/viewvc/lame/lame/configure.in?r1=1.145&r2=1.146 +http://lame.cvs.sourceforge.net/viewvc/lame/lame/doc/html/Makefile.am?r1=1.8&r2=1.9 +http://lame.cvs.sourceforge.net/viewvc/lame/lame/doc/man/Makefile.am?r1=1.1&r2=1.2 + +libmp3lame/i386/Makefile.am patch ported from Debian +http://anonscm.debian.org/cgit/pkg-multimedia/lame.git/tree/debian/patches/ansi2knr2devnull.patch + +Signed-off-by: Bernd Kuhls + +diff -uNr lame-3.99.5.org/configure.in lame-3.99.5/configure.in +--- lame-3.99.5.org/configure.in 2012-02-28 19:50:27.000000000 +0100 ++++ lame-3.99.5/configure.in 2015-04-11 11:36:15.464835008 +0200 +@@ -77,9 +77,6 @@ + AC_MSG_RESULT(${GCC_version}) + fi + +-dnl more automake stuff +-AM_C_PROTOTYPES +- + AC_CHECK_HEADER(dmalloc.h) + if test "${ac_cv_header_dmalloc_h}" = "yes"; then + AM_WITH_DMALLOC +@@ -376,8 +373,6 @@ + AC_CHECK_LIB(curses, initscr, HAVE_TERMCAP="curses") + AC_CHECK_LIB(ncurses, initscr, HAVE_TERMCAP="ncurses") + +-AM_ICONV +- + dnl math lib + AC_CHECK_LIB(m, cos, USE_LIBM="-lm") + dnl free fast math library +diff -uNr lame-3.99.5.org/doc/html/Makefile.am lame-3.99.5/doc/html/Makefile.am +--- lame-3.99.5.org/doc/html/Makefile.am 2010-09-30 22:58:40.000000000 +0200 ++++ lame-3.99.5/doc/html/Makefile.am 2015-04-11 11:37:02.880239754 +0200 +@@ -1,6 +1,6 @@ + ## $Id: Makefile.am,v 1.7 2010/09/30 20:58:40 jaz001 Exp $ + +-AUTOMAKE_OPTIONS = foreign ansi2knr ++AUTOMAKE_OPTIONS = foreign + + docdir = $(datadir)/doc + pkgdocdir = $(docdir)/$(PACKAGE) +diff -uNr lame-3.99.5.org/doc/man/Makefile.am lame-3.99.5/doc/man/Makefile.am +--- lame-3.99.5.org/doc/man/Makefile.am 2000-10-22 13:39:44.000000000 +0200 ++++ lame-3.99.5/doc/man/Makefile.am 2015-04-11 11:37:08.704167318 +0200 +@@ -1,6 +1,6 @@ + ## $Id: Makefile.am,v 1.1 2000/10/22 11:39:44 aleidinger Exp $ + +-AUTOMAKE_OPTIONS = foreign ansi2knr ++AUTOMAKE_OPTIONS = foreign + + man_MANS = lame.1 + EXTRA_DIST = ${man_MANS} +diff -uNr lame-3.99.5.org/libmp3lame/i386/Makefile.am lame-3.99.5/libmp3lame/i386/Makefile.am +--- lame-3.99.5.org/libmp3lame/i386/Makefile.am 2011-04-04 11:42:34.000000000 +0200 ++++ lame-3.99.5/libmp3lame/i386/Makefile.am 2015-04-11 11:37:35.191833351 +0200 +@@ -1,6 +1,6 @@ + ## $Id: Makefile.am,v 1.26 2011/04/04 09:42:34 aleidinger Exp $ + +-AUTOMAKE_OPTIONS = foreign $(top_srcdir)/ansi2knr ++AUTOMAKE_OPTIONS = foreign + + DEFS = @DEFS@ @CONFIG_DEFS@ + diff --git a/package/lame/0002-gtk1-ac-directives.patch b/package/lame/0002-gtk1-ac-directives.patch new file mode 100644 index 0000000000..858ee0baf8 --- /dev/null +++ b/package/lame/0002-gtk1-ac-directives.patch @@ -0,0 +1,210 @@ +Include GTK-1 autoconf directives in build system. +Applied-Upstream: http://lame.cvs.sf.net/viewvc/lame/lame/acinclude.m4?r1=1.5&r2=1.6 + +Downloaded from +http://lame.cvs.sf.net/viewvc/lame/lame/acinclude.m4?r1=1.5&r2=1.6&view=patch + +to fix autoreconf. + +Signed-off-by: Bernd Kuhls + +--- a/acinclude.m4 2006/12/21 09:03:03 1.5 ++++ b/acinclude.m4 2012/06/18 20:51:05 1.6 +@@ -85,4 +85,197 @@ + [AC_MSG_WARN(can't check for IEEE854 compliant 80 bit floats)] + )])]) # alex_IEEE854_FLOAT80 + ++# Configure paths for GTK+ ++# Owen Taylor 97-11-3 + ++dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) ++dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS ++dnl ++AC_DEFUN([AM_PATH_GTK], ++[dnl ++dnl Get the cflags and libraries from the gtk-config script ++dnl ++AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], ++ gtk_config_prefix="$withval", gtk_config_prefix="") ++AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], ++ gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") ++AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], ++ , enable_gtktest=yes) ++ ++ for module in . $4 ++ do ++ case "$module" in ++ gthread) ++ gtk_config_args="$gtk_config_args gthread" ++ ;; ++ esac ++ done ++ ++ if test x$gtk_config_exec_prefix != x ; then ++ gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" ++ if test x${GTK_CONFIG+set} != xset ; then ++ GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config ++ fi ++ fi ++ if test x$gtk_config_prefix != x ; then ++ gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" ++ if test x${GTK_CONFIG+set} != xset ; then ++ GTK_CONFIG=$gtk_config_prefix/bin/gtk-config ++ fi ++ fi ++ ++ AC_PATH_PROG(GTK_CONFIG, gtk-config, no) ++ min_gtk_version=ifelse([$1], ,0.99.7,$1) ++ AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) ++ no_gtk="" ++ if test "$GTK_CONFIG" = "no" ; then ++ no_gtk=yes ++ else ++ GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` ++ GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` ++ gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ ++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` ++ gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ ++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` ++ gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ ++ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` ++ if test "x$enable_gtktest" = "xyes" ; then ++ ac_save_CFLAGS="$CFLAGS" ++ ac_save_LIBS="$LIBS" ++ CFLAGS="$CFLAGS $GTK_CFLAGS" ++ LIBS="$GTK_LIBS $LIBS" ++dnl ++dnl Now check if the installed GTK is sufficiently new. (Also sanity ++dnl checks the results of gtk-config to some extent ++dnl ++ rm -f conf.gtktest ++ AC_TRY_RUN([ ++#include ++#include ++#include ++ ++int ++main () ++{ ++ int major, minor, micro; ++ char *tmp_version; ++ ++ system ("touch conf.gtktest"); ++ ++ /* HP/UX 9 (%@#!) writes to sscanf strings */ ++ tmp_version = g_strdup("$min_gtk_version"); ++ if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { ++ printf("%s, bad version string\n", "$min_gtk_version"); ++ exit(1); ++ } ++ ++ if ((gtk_major_version != $gtk_config_major_version) || ++ (gtk_minor_version != $gtk_config_minor_version) || ++ (gtk_micro_version != $gtk_config_micro_version)) ++ { ++ printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", ++ $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, ++ gtk_major_version, gtk_minor_version, gtk_micro_version); ++ printf ("*** was found! If gtk-config was correct, then it is best\n"); ++ printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); ++ printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); ++ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); ++ printf("*** required on your system.\n"); ++ printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); ++ printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); ++ printf("*** before re-running configure\n"); ++ } ++#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) ++ else if ((gtk_major_version != GTK_MAJOR_VERSION) || ++ (gtk_minor_version != GTK_MINOR_VERSION) || ++ (gtk_micro_version != GTK_MICRO_VERSION)) ++ { ++ printf("*** GTK+ header files (version %d.%d.%d) do not match\n", ++ GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); ++ printf("*** library (version %d.%d.%d)\n", ++ gtk_major_version, gtk_minor_version, gtk_micro_version); ++ } ++#endif /* defined (GTK_MAJOR_VERSION) ... */ ++ else ++ { ++ if ((gtk_major_version > major) || ++ ((gtk_major_version == major) && (gtk_minor_version > minor)) || ++ ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) ++ { ++ return 0; ++ } ++ else ++ { ++ printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", ++ gtk_major_version, gtk_minor_version, gtk_micro_version); ++ printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", ++ major, minor, micro); ++ printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); ++ printf("***\n"); ++ printf("*** If you have already installed a sufficiently new version, this error\n"); ++ printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); ++ printf("*** being found. The easiest way to fix this is to remove the old version\n"); ++ printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); ++ printf("*** correct copy of gtk-config. (In this case, you will have to\n"); ++ printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); ++ printf("*** so that the correct libraries are found at run-time))\n"); ++ } ++ } ++ return 1; ++} ++],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) ++ CFLAGS="$ac_save_CFLAGS" ++ LIBS="$ac_save_LIBS" ++ fi ++ fi ++ if test "x$no_gtk" = x ; then ++ AC_MSG_RESULT(yes) ++ ifelse([$2], , :, [$2]) ++ else ++ AC_MSG_RESULT(no) ++ if test "$GTK_CONFIG" = "no" ; then ++ echo "*** The gtk-config script installed by GTK could not be found" ++ echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" ++ echo "*** your path, or set the GTK_CONFIG environment variable to the" ++ echo "*** full path to gtk-config." ++ else ++ if test -f conf.gtktest ; then ++ : ++ else ++ echo "*** Could not run GTK test program, checking why..." ++ CFLAGS="$CFLAGS $GTK_CFLAGS" ++ LIBS="$LIBS $GTK_LIBS" ++ AC_TRY_LINK([ ++#include ++#include ++], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], ++ [ echo "*** The test program compiled, but did not run. This usually means" ++ echo "*** that the run-time linker is not finding GTK or finding the wrong" ++ echo "*** version of GTK. If it is not finding GTK, you'll need to set your" ++ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" ++ echo "*** to the installed location Also, make sure you have run ldconfig if that" ++ echo "*** is required on your system" ++ echo "***" ++ echo "*** If you have an old version installed, it is best to remove it, although" ++ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ++ echo "***" ++ echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" ++ echo "*** came with the system with the command" ++ echo "***" ++ echo "*** rpm --erase --nodeps gtk gtk-devel" ], ++ [ echo "*** The test program failed to compile or link. See the file config.log for the" ++ echo "*** exact error that occured. This usually means GTK was incorrectly installed" ++ echo "*** or that you have moved GTK since it was installed. In the latter case, you" ++ echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) ++ CFLAGS="$ac_save_CFLAGS" ++ LIBS="$ac_save_LIBS" ++ fi ++ fi ++ GTK_CFLAGS="" ++ GTK_LIBS="" ++ ifelse([$3], , :, [$3]) ++ fi ++ AC_SUBST(GTK_CFLAGS) ++ AC_SUBST(GTK_LIBS) ++ rm -f conf.gtktest ++]) diff --git a/package/lame/0003-msse.patch b/package/lame/0003-msse.patch new file mode 100644 index 0000000000..ca4f65f40b --- /dev/null +++ b/package/lame/0003-msse.patch @@ -0,0 +1,24 @@ +Fix compile on 32bit Intel + +Downloaded from +http://anonscm.debian.org/cgit/pkg-multimedia/lame.git/tree/debian/patches/msse.patch + +Signed-off-by: Bernd Kuhls + +Description: Build xmm_quantize_sub.c with -msse +Author: Sebastian Ramacher +Bug: http://sourceforge.net/p/lame/bugs/443/ +Bug-Debian: https://bugs.debian.org/760047 +Forwarded: http://sourceforge.net/p/lame/bugs/443/ +Last-Update: 2014-08-31 + +--- lame-3.99.5+repack1.orig/libmp3lame/vector/Makefile.am ++++ lame-3.99.5+repack1/libmp3lame/vector/Makefile.am +@@ -20,6 +20,7 @@ xmm_sources = xmm_quantize_sub.c + + if WITH_XMM + liblamevectorroutines_la_SOURCES = $(xmm_sources) ++liblamevectorroutines_la_CFLAGS = -msse + endif + + noinst_HEADERS = lame_intrin.h diff --git a/package/lame/Config.in b/package/lame/Config.in new file mode 100644 index 0000000000..2b144a0537 --- /dev/null +++ b/package/lame/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LAME + bool "lame" + help + LAME is a high quality MPEG Audio Layer III (MP3) encoder. + + http://lame.sourceforge.net/ diff --git a/package/lame/lame.hash b/package/lame/lame.hash new file mode 100644 index 0000000000..875b49c2fc --- /dev/null +++ b/package/lame/lame.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 24346b4158e4af3bd9f2e194bb23eb473c75fb7377011523353196b19b9a23ff lame-3.99.5.tar.gz diff --git a/package/lame/lame.mk b/package/lame/lame.mk new file mode 100644 index 0000000000..934579953b --- /dev/null +++ b/package/lame/lame.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# lame +# +################################################################################ + +LAME_VERSION_MAJOR = 3.99 +LAME_VERSION = $(LAME_VERSION_MAJOR).5 +LAME_SITE = http://downloads.sourceforge.net/project/lame/lame/$(LAME_VERSION_MAJOR) +LAME_DEPENDENCIES = host-pkgconf +LAME_AUTORECONF = YES +LAME_INSTALL_STAGING = YES +LAME_CONF_ENV = GTK_CONFIG=/bin/false +LAME_CONF_OPTS = --enable-dynamic-frontends +LAME_LICENSE = LGPLv2+ +LAME_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBSNDFILE),y) +LAME_DEPENDENCIES += libsndfile +LAME_CONF_OPTS += --with-fileio=sndfile +endif + +ifeq ($(BR2_PACKAGE_NCURSES),y) +LAME_DEPENDENCIES += ncurses +endif + +ifeq ($(BR2_ENDIAN),"BIG") +define LAME_BIGENDIAN_ARCH + echo "#define WORDS_BIGENDIAN 1" >>$(@D)/config.h +endef +endif + +LAME_POST_CONFIGURE_HOOKS += LAME_BIGENDIAN_ARCH + +$(eval $(autotools-package)) diff --git a/package/latencytop/0001-makefile.patch b/package/latencytop/0001-makefile.patch new file mode 100644 index 0000000000..fa8c51cfd0 --- /dev/null +++ b/package/latencytop/0001-makefile.patch @@ -0,0 +1,28 @@ +Usee $(CC) to enable cross compiling and link to the right ncurses library. + +Signed-off-by: Qais Yousef + +--- latencytop-0.5/Makefile.old 2012-04-18 11:59:39.748084334 +0100 ++++ latencytop-0.5/Makefile 2012-04-18 12:00:08.659112340 +0100 +@@ -4,7 +4,7 @@ + DESTDIR = + SBINDIR = /usr/sbin + XCFLAGS = -W -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare +-LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncursesw ++LDF = -Wl,--as-needed `pkg-config --libs glib-2.0` -lncurses + + OBJS= latencytop.o text_display.o translate.o fsync.o + +@@ -26,10 +26,10 @@ + + # We write explicity this "implicit rule" + %.o : %.c +- gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@ ++ $(CC) -c $(CFLAGS) $(XCFLAGS) $< -o $@ + + latencytop: $(OBJS) latencytop.h Makefile +- gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop ++ $(CC) $(CFLAGS) $(OBJS) $(LDF) -o latencytop + + clean: + rm -f *~ latencytop DEADJOE *.o diff --git a/package/latencytop/Config.in b/package/latencytop/Config.in new file mode 100644 index 0000000000..b54ef052b4 --- /dev/null +++ b/package/latencytop/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_LATENCYTOP + bool "latencytop" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_LIBGLIB2 + help + There are many types and causes of latency. LatencyTOP + focuses on the type of latency that causes skips in audio, + stutters in your desktop experience or that overloads your + server (while you have plenty of CPU power left). + + LatencyTOP focuses on the cases where the applications want + to run and execute useful code, but there's some resource + that's not currently available (and the kernel then blocks + the process). This is done both on a system level and on a + per process level, so that you can see what's happening to + the system, and which process is suffering and/or causing + the delays. + + http://www.latencytop.org + +comment "latencytop needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/latencytop/latencytop.mk b/package/latencytop/latencytop.mk new file mode 100644 index 0000000000..935b2a3c04 --- /dev/null +++ b/package/latencytop/latencytop.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# latencytop +# +################################################################################ + +LATENCYTOP_VERSION = 0.5 +LATENCYTOP_SITE = http://www.latencytop.org/download +LATENCYTOP_DEPENDENCIES = libglib2 ncurses +LATENCYTOP_LICENSE = GPLv2 +LATENCYTOP_LICENSE_FILES = latencytop.c + +# NOTE: GTK is heavy weight, we intentionally build the text (ncurses) +# version only +define LATENCYTOP_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) HAS_GTK_GUI= +endef + +define LATENCYTOP_INSTALL_TARGET_CMDS + $(MAKE) install -C $(@D) DESTDIR=$(TARGET_DIR) HAS_GTK_GUI= +endef + +$(eval $(generic-package)) diff --git a/package/lbase64/Config.in b/package/lbase64/Config.in new file mode 100644 index 0000000000..5ef91bf301 --- /dev/null +++ b/package/lbase64/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LBASE64 + bool "lbase64" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + depends on BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT + help + A base64 library for Lua + + http://luaforge.net/projects/lbase64/ + +comment "lbase64 needs a Lua 5.1 interpreter" + depends on !BR2_PACKAGE_LUA_5_1 + depends on !BR2_PACKAGE_LUAJIT diff --git a/package/lbase64/lbase64.hash b/package/lbase64/lbase64.hash new file mode 100644 index 0000000000..080609037e --- /dev/null +++ b/package/lbase64/lbase64.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7326658d48a70382b496eb88220b0c398c19ed712e39863939330fec0533362a lbase64-20120820-1.src.rock diff --git a/package/lbase64/lbase64.mk b/package/lbase64/lbase64.mk new file mode 100644 index 0000000000..80e880079e --- /dev/null +++ b/package/lbase64/lbase64.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# lbase64 +# +################################################################################ + +LBASE64_VERSION = 20120820-1 +LBASE64_SUBDIR = base64 +LBASE64_LICENSE = Public domain +LBASE64_LICENSE_FILES = $(LBASE64_SUBDIR)/README + +$(eval $(luarocks-package)) diff --git a/package/lbreakout2/Config.in b/package/lbreakout2/Config.in new file mode 100644 index 0000000000..221c9e2c5b --- /dev/null +++ b/package/lbreakout2/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_LBREAKOUT2 + bool "LBreakout2" + select BR2_PACKAGE_SDL + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + LBreakout2 is the successor to LBreakout, a breakout-style arcade + game in the manner of Arkanoid. Requires SDL, libpng, and + optionnally SDL_mixer/SDL_net. + A display with minimum 640x480 resolution, a keyboard and a mouse + are recommanded. + + http://lgames.sourceforge.net/index.php?project=LBreakout2 + +if BR2_PACKAGE_LBREAKOUT2 + +config BR2_PACKAGE_LBREAKOUT2_AUDIO + bool "audio support" + default y + select BR2_PACKAGE_SDL_MIXER + help + Activates audio support in LBreakout2. Will add SDL_mixer. + +config BR2_PACKAGE_LBREAKOUT2_NET + bool "network support" + default y + select BR2_PACKAGE_SDL_NET + help + Activates network support LBreakout2. Will add SDL_net. + +endif diff --git a/package/lbreakout2/lbreakout2.hash b/package/lbreakout2/lbreakout2.hash new file mode 100644 index 0000000000..d9638b47b3 --- /dev/null +++ b/package/lbreakout2/lbreakout2.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 0b90716d52e67c27ff41ab7aa5c09dad4f5f19a78076cc57dd4b4d7ed2c1dbd9 lbreakout2-2.6.4.tar.gz diff --git a/package/lbreakout2/lbreakout2.mk b/package/lbreakout2/lbreakout2.mk new file mode 100644 index 0000000000..5dc4c71753 --- /dev/null +++ b/package/lbreakout2/lbreakout2.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# lbreakout2 +# +################################################################################ + +LBREAKOUT2_VERSION_MAJOR = 2.6 +LBREAKOUT2_VERSION = $(LBREAKOUT2_VERSION_MAJOR).4 +LBREAKOUT2_SITE = http://downloads.sourceforge.net/lgames/lbreakout2/$(LBREAKOUT2_VERSION_MAJOR) +LBREAKOUT2_LICENSE = GPLv2+ +LBREAKOUT2_LICENSE_FILES = COPYING + +LBREAKOUT2_DEPENDENCIES = sdl libpng + +LBREAKOUT2_CONF_ENV = \ + SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +LBREAKOUT2_DEPENDENCIES += gettext +LBREAKOUT2_CONF_ENV += LIBS=-lintl +endif + +ifeq ($(BR2_PACKAGE_LBREAKOUT2_AUDIO),y) +LBREAKOUT2_DEPENDENCIES += sdl_mixer +LBREAKOUT2_CONF_OPTS += --enable-audio=yes +else +LBREAKOUT2_CONF_OPTS += --disable-audio +endif + +ifeq ($(BR2_PACKAGE_LBREAKOUT2_NET),y) +LBREAKOUT2_DEPENDENCIES += sdl_net +LBREAKOUT2_CONF_OPTS += --enable-network=yes +else +LBREAKOUT2_CONF_OPTS += --disable-network +endif + +$(eval $(autotools-package)) diff --git a/package/lcdapi/0001-Remove-installation-of-docs-examples.patch b/package/lcdapi/0001-Remove-installation-of-docs-examples.patch new file mode 100644 index 0000000000..dcadcf4a1b --- /dev/null +++ b/package/lcdapi/0001-Remove-installation-of-docs-examples.patch @@ -0,0 +1,39 @@ +From ede0fa7d410be407164b68570a1540378bf0bd09 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 19 Jul 2014 10:40:59 +0200 +Subject: [PATCH] Remove installation of docs/examples + +They get installed in the wrong directory, i.e if DESTDIR is +/path/to/output/target, they will be installed in +/path/to/output/target./examples and /path/to/output/target./docs. + +Since we don't need docs and examples in Buildroot anyway, simply get +rid of them. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index c56860a..6b1267b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -69,14 +69,3 @@ liblcdapi_la_CXXFLAGS = \ + -g0 -DNODEBUG -Os + + ACLOCAL_AMFLAGS = -I m4 +- +-docsdir = $(top_srcdir)/docs +-exampledir = $(top_srcdir)/example +-dist_docs_DATA = \ +- docs/Makefile.am \ +- docs/Makefile.in \ +- docs/Doxyfile.in +-dist_example_DATA = \ +- example/client.cpp \ +- example/Makefile.am \ +- example/Makefile.in +-- +2.0.0 + diff --git a/package/lcdapi/Config.in b/package/lcdapi/Config.in new file mode 100644 index 0000000000..34ce0fa1a1 --- /dev/null +++ b/package/lcdapi/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LCDAPI + bool "lcdapi" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + C++ client API for lcdproc, containing a set of widget classes. + + https://github.com/spdawson/lcdapi + +comment "lcdapi needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/lcdapi/lcdapi.mk b/package/lcdapi/lcdapi.mk new file mode 100644 index 0000000000..bcf5c4770a --- /dev/null +++ b/package/lcdapi/lcdapi.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# lcdapi +# +################################################################################ + +LCDAPI_VERSION = dbbdca06f271b8cf81b4817a9da3d558cfe59905 +LCDAPI_SITE = $(call github,spdawson,lcdapi,$(LCDAPI_VERSION)) +LCDAPI_LICENSE = LGPLv2.1+ +LCDAPI_LICENSE_FILES = COPYING +LCDAPI_AUTORECONF = YES +LCDAPI_INSTALL_STAGING = YES + +define LCDAPI_CREATE_M4_DIR + mkdir -p $(@D)/m4 +endef + +LCDAPI_POST_PATCH_HOOKS += LCDAPI_CREATE_M4_DIR + +$(eval $(autotools-package)) diff --git a/package/lcdproc/0001-LCDd.conf.patch b/package/lcdproc/0001-LCDd.conf.patch new file mode 100644 index 0000000000..283ac8867b --- /dev/null +++ b/package/lcdproc/0001-LCDd.conf.patch @@ -0,0 +1,18 @@ +Fix the default LCDd configuration file, so that the DriverPath +is set to the correct lcdproc library install path, rather than +the dummy/default path. + +Signed-off-by: Simon Dawson +--- + +--- lcdproc-0.5.3/LCDd.conf.orig 2009-06-20 14:48:34.000000000 +0100 ++++ lcdproc-0.5.3/LCDd.conf 2010-05-11 10:02:21.000000000 +0100 +@@ -34,7 +34,7 @@ + # the driver modules and will thus not be able to + # function properly. + # NOTE: Always place a slash as last character ! +-DriverPath=server/drivers/ ++DriverPath=/usr/lib/lcdproc/ + + # Tells the server to load the given drivers. Multiple lines can be given. + # The name of the driver is case sensitive and determines the section diff --git a/package/lcdproc/0002-musl.patch b/package/lcdproc/0002-musl.patch new file mode 100644 index 0000000000..d0425fd5b2 --- /dev/null +++ b/package/lcdproc/0002-musl.patch @@ -0,0 +1,102 @@ +Fix musl build + +Partly downloaded from +http://lists.omnipotent.net/pipermail/lcdproc/2015-November/014291.html +http://lists.omnipotent.net/pipermail/lcdproc/2015-November/014281.html + +Signed-off-by: Bernd Kuhls + +diff -uNr lcdproc-0.5.7.org/clients/lcdproc/machine.h lcdproc-0.5.7/clients/lcdproc/machine.h +--- lcdproc-0.5.7.org/clients/lcdproc/machine.h 2012-08-19 16:29:07.000000000 +0200 ++++ lcdproc-0.5.7/clients/lcdproc/machine.h 2016-01-30 14:07:33.641802847 +0100 +@@ -12,6 +12,7 @@ + #ifndef _lcdproc_machine_h_ + #define _lcdproc_machine_h_ + ++#include + #include "shared/LL.h" + + #ifndef LOADAVG_NSTATS +diff -uNr lcdproc-0.5.7.org/server/drivers/hd44780-pifacecad.c lcdproc-0.5.7/server/drivers/hd44780-pifacecad.c +--- lcdproc-0.5.7.org/server/drivers/hd44780-pifacecad.c 2014-03-23 11:22:09.000000000 +0100 ++++ lcdproc-0.5.7/server/drivers/hd44780-pifacecad.c 2016-01-30 14:12:03.521279729 +0100 +@@ -54,6 +54,7 @@ + #include + #include + #include ++#include + #include + #include + +diff -uNr lcdproc-0.5.7.org/server/drivers/hd44780-rpi.c lcdproc-0.5.7/server/drivers/hd44780-rpi.c +--- lcdproc-0.5.7.org/server/drivers/hd44780-rpi.c 2014-03-23 11:22:09.000000000 +0100 ++++ lcdproc-0.5.7/server/drivers/hd44780-rpi.c 2016-01-30 14:04:10.288112853 +0100 +@@ -285,7 +285,7 @@ + + /* Unmap and free memory */ + if (gpio_map != NULL) +- munmap((caddr_t) gpio_map, GPIO_BLOCK_SIZE); ++ munmap((void *) gpio_map, GPIO_BLOCK_SIZE); + if (p->rpi_gpio != NULL) + free(p->rpi_gpio); + p->rpi_gpio = NULL; +diff -uNr lcdproc-0.5.7.org/server/drivers/hd44780-spi.c lcdproc-0.5.7/server/drivers/hd44780-spi.c +--- lcdproc-0.5.7.org/server/drivers/hd44780-spi.c 2014-03-23 11:22:09.000000000 +0100 ++++ lcdproc-0.5.7/server/drivers/hd44780-spi.c 2016-01-30 14:11:11.604763500 +0100 +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + +diff -uNr lcdproc-0.5.7.org/server/drivers/mtc_s16209x.c lcdproc-0.5.7/server/drivers/mtc_s16209x.c +--- lcdproc-0.5.7.org/server/drivers/mtc_s16209x.c 2011-08-14 14:29:16.000000000 +0200 ++++ lcdproc-0.5.7/server/drivers/mtc_s16209x.c 2016-01-30 14:13:10.691122839 +0100 +@@ -49,6 +49,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_CONFIG_H + # include "config.h" +diff -uNr lcdproc-0.5.7.org/server/drivers/rawserial.c lcdproc-0.5.7/server/drivers/rawserial.c +--- lcdproc-0.5.7.org/server/drivers/rawserial.c 2014-03-23 11:22:10.000000000 +0100 ++++ lcdproc-0.5.7/server/drivers/rawserial.c 2016-01-30 14:03:43.465779507 +0100 +@@ -60,13 +60,13 @@ + /** \name Event loop timing. refresh_time and refresh_delta form the + * event loop timing mechanism for configurable update rates. + *@{*/ +- uint refresh_time; /**< time at the last screen update */ +- uint refresh_delta; /**< time step to next screen update */ ++ unsigned int refresh_time; /**< time at the last screen update */ ++ unsigned int refresh_delta; /**< time step to next screen update */ + /**@}*/ + } PrivateData; + + /* Local prototypes */ +-static uint get_millisecond_time(void); ++static unsigned int get_millisecond_time(void); + + + /* Vars for the server core */ +@@ -303,7 +303,7 @@ + PrivateData *p = drvthis->private_data; + char out[LCD_MAX_WIDTH * LCD_MAX_HEIGHT]; + +- uint currentTime = get_millisecond_time(); ++ unsigned int currentTime = get_millisecond_time(); + int t_delta = currentTime - p->refresh_time; + + /* +@@ -415,7 +415,7 @@ + * + * \return int with current millisecond time. + */ +-static uint ++static unsigned int + get_millisecond_time(void) + { + struct timeval ts; diff --git a/package/lcdproc/Config.in b/package/lcdproc/Config.in new file mode 100644 index 0000000000..042abd69df --- /dev/null +++ b/package/lcdproc/Config.in @@ -0,0 +1,29 @@ +comment "lcdproc needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_LCDPROC + bool "lcdproc" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_ZLIB + help + LCD display driver daemon and clients + + http://lcdproc.org/ + +if BR2_PACKAGE_LCDPROC + +config BR2_PACKAGE_LCDPROC_DRIVERS + string "List of drivers to build" + default "all" + help + Specify a comma-separated list of lcdproc drivers to be built + +config BR2_PACKAGE_LCDPROC_MENUS + bool "Menu support" + help + Enable support for lcdproc menus + +endif diff --git a/package/lcdproc/lcdproc.hash b/package/lcdproc/lcdproc.hash new file mode 100644 index 0000000000..ea39a9b492 --- /dev/null +++ b/package/lcdproc/lcdproc.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 843007d377adc856529ed0c7c42c9a7563043f06b1b73add0372bba3a3029804 lcdproc-0.5.7.tar.gz diff --git a/package/lcdproc/lcdproc.mk b/package/lcdproc/lcdproc.mk new file mode 100644 index 0000000000..4fbeca14ca --- /dev/null +++ b/package/lcdproc/lcdproc.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# lcdproc +# +################################################################################ + +LCDPROC_VERSION = 0.5.7 +LCDPROC_SITE = http://downloads.sourceforge.net/project/lcdproc/lcdproc/$(LCDPROC_VERSION) +LCDPROC_LICENSE = GPLv2+ +LCDPROC_LICENSE_FILES = COPYING +LCDPROC_MAKE = $(MAKE1) + +LCDPROC_CONF_OPTS = --enable-drivers=$(BR2_PACKAGE_LCDPROC_DRIVERS) \ + --with-ft-prefix="$(STAGING_DIR)/usr" \ + --with-ft-exec-prefix="$(STAGING_DIR)/usr" + +ifeq ($(BR2_PACKAGE_LCDPROC_MENUS),y) +LCDPROC_CONF_OPTS += --enable-lcdproc-menus +endif + +LCDPROC_DEPENDENCIES = freetype ncurses zlib + +$(eval $(autotools-package)) diff --git a/package/lcms2/Config.in b/package/lcms2/Config.in new file mode 100644 index 0000000000..d94c075e1e --- /dev/null +++ b/package/lcms2/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LCMS2 + bool "lcms2" + help + Little Color Management Software (CMS) intends to be an OPEN + SOURCE small-footprint color management engine, with special + focus on accuracy and performance. + It uses the International Color Consortium standard (ICC), which is + the modern standard when regarding to color management. + + http://www.littlecms.com/ diff --git a/package/lcms2/lcms2.hash b/package/lcms2/lcms2.hash new file mode 100644 index 0000000000..908822f8c1 --- /dev/null +++ b/package/lcms2/lcms2.hash @@ -0,0 +1,5 @@ +# From http://sourceforge.net/projects/lcms/files/lcms/2.7/ +sha1 625f0d74bad4a0f6f917120fd992437d26f754d2 lcms2-2.7.tar.gz +md5 06c1626f625424a811fb4b5eb070839d lcms2-2.7.tar.gz +# Locally computed: +sha256 4524234ae7de185e6b6da5d31d6875085b2198bc63b1211f7dde6e2d197d6a53 lcms2-2.7.tar.gz diff --git a/package/lcms2/lcms2.mk b/package/lcms2/lcms2.mk new file mode 100644 index 0000000000..265af29098 --- /dev/null +++ b/package/lcms2/lcms2.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# lcms2 +# +################################################################################ + +LCMS2_VERSION = 2.7 +LCMS2_SITE = http://downloads.sourceforge.net/lcms/lcms +LCMS2_LICENSE = MIT +LCMS2_LICENSE_FILES = COPYING +LCMS2_INSTALL_STAGING = YES + +LCMS2_CONF_OPTS = \ + +ifeq ($(BR2_PACKAGE_JPEG),y) +LCMS2_CONF_OPTS += --with-jpeg +LCMS2_DEPENDENCIES += jpeg +else +LCMS2_CONF_OPTS += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) +LCMS2_CONF_OPTS += --with-tiff +LCMS2_DEPENDENCIES += tiff +else +LCMS2_CONF_OPTS += --without-tiff +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +LCMS2_CONF_OPTS += --with-zlib +LCMS2_DEPENDENCIES += zlib +else +LCMS2_CONF_OPTS += --without-zlib +endif + +$(eval $(autotools-package)) diff --git a/package/leafnode2/0001-cross_makefile.patch b/package/leafnode2/0001-cross_makefile.patch new file mode 100644 index 0000000000..b61a8ef3c6 --- /dev/null +++ b/package/leafnode2/0001-cross_makefile.patch @@ -0,0 +1,39 @@ +Fix cross-compilation issues + + - During target package compilation the host version of b_sortnl is + needed. + + - Do not call a 'amiroot' program built for the target when + cross-compiling. We're anyway not root, so simply remove the + chown/chgrp dance. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.in +=================================================================== +--- a/Makefile.in ++++ b/Makefile.in +@@ -1853,7 +1853,7 @@ + + configparam_data.c: $(srcdir)/config.table b_sortnl$(EXEEXT) genconfigparam_data.awk + rm -f config.table.sorted +- ./b_sortnl$(EXEEXT) <$(srcdir)/config.table >config.table.sorted ++ ./b_sortnl_host$(EXEEXT) <$(srcdir)/config.table >config.table.sorted + $(AWK) -f $(srcdir)/genconfigparam_data.awk $@ \ + || { rm -f $@ ; false ; } + +@@ -1868,13 +1868,7 @@ + install-data-hook: + $(INSTALL) -d -m 02770 $(DESTDIR)$(SPOOLDIR) + $(INSTALL) -d -m 02770 $(DESTDIR)$(SPOOLDIR)/leaf.node +- -./amiroot && chown $(RUNAS_USER) $(DESTDIR)$(SPOOLDIR) +- -./amiroot && chown $(RUNAS_USER) $(DESTDIR)$(SPOOLDIR)/leaf.node +- -./amiroot && chgrp $(RUNAS_GROUP) $(DESTDIR)$(SPOOLDIR) +- -./amiroot && chgrp $(RUNAS_GROUP) $(DESTDIR)$(SPOOLDIR)/leaf.node + rm -f $(DESTDIR)$(sbindir)/leafnode-version # now in $(bindir) +- ./amiroot && p=$(DESTDIR)$(bindir)/newsq && chown 0 $$p \ +- && chgrp $(RUNAS_GROUP) $$p && chmod 2111 $$p ; true + @echo + @echo "### If upgrading from leafnode before 1.6," + @echo "### run: make update" diff --git a/package/leafnode2/Config.in b/package/leafnode2/Config.in new file mode 100644 index 0000000000..348e6daacf --- /dev/null +++ b/package/leafnode2/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_LEAFNODE2 + bool "leafnode2" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_PCRE + help + Leafnode-2 is a store-and-forward NNTP (or Usenet) proxy + server designed for small sites with just a few active + newsgroups. + + Leafnode-2 needs inetd, check chapter 14 of the documentation at + http://www.dt.e-technik.uni-dortmund.de/~ma/leafnode/beta/leafnode-readme.txt + + For example, you can add this line to inetd.conf: + nntp stream tcp nowait news /usr/sbin/leafnode + + http://www.dt.e-technik.tu-dortmund.de/~ma/leafnode/beta diff --git a/package/leafnode2/leafnode2.hash b/package/leafnode2/leafnode2.hash new file mode 100644 index 0000000000..9c94fb9ec4 --- /dev/null +++ b/package/leafnode2/leafnode2.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 34eba2cbbb871b724c8d5dd402d1c358aeb21ba426beb5658e155ed0d7461075 leafnode-2.0.0.alpha20140727b.tar.bz2 diff --git a/package/leafnode2/leafnode2.mk b/package/leafnode2/leafnode2.mk new file mode 100644 index 0000000000..5b9b85482b --- /dev/null +++ b/package/leafnode2/leafnode2.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# leafnode2 +# +################################################################################ + +LEAFNODE2_VERSION = 2.0.0.alpha20140727b +LEAFNODE2_SOURCE = leafnode-$(LEAFNODE2_VERSION).tar.bz2 +LEAFNODE2_SITE = http://www.dt.e-technik.tu-dortmund.de/~ma/leafnode/beta +LEAFNODE2_LICENSE = LGPLv2.1 +LEAFNODE2_LICENSE_FILES = COPYING COPYING.LGPL +LEAFNODE2_DEPENDENCIES = host-pcre pcre + +LEAFNODE2_CONF_ENV = \ + PCRECONFIG="$(STAGING_DIR)/usr/bin/pcre-config" + +# --enable-runas-user use 'news' as default but the configure stop +# if news doesn't exist on the build host. +# Use 'root' while cross-compiling +LEAFNODE2_CONF_OPTS = \ + --sysconfdir=/etc/leafnode2 \ + --enable-spooldir=/var/spool/news \ + --enable-runas-user=root + +# Leafnode2 needs the host version of b_sortnl during +# compilation. Instead of creating a seperate host package and +# installing b_sortnl to $(HOST_DIR) this binary is compiled +# on-the-fly, host-pcre is needed for this +define LEAFNODE2_BUILD_SORTNL_TOOL + cd $(@D); \ + $(HOSTCC) $(HOST_CFLAGS) -o b_sortnl_host \ + arc4random.c mergesort.c b_sortnl.c critmem_malloc.c \ + critmem_realloc.c -DHAVE_CONFIG_H -I$(HOST_DIR)/usr/include \ + -L $(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib -lpcre +endef + +LEAFNODE2_PRE_BUILD_HOOKS += LEAFNODE2_BUILD_SORTNL_TOOL + +define LEAFNODE2_USERS + news -1 news -1 * - - - Leafnode2 daemon +endef + +$(eval $(autotools-package)) diff --git a/package/leafpad/Config.in b/package/leafpad/Config.in new file mode 100644 index 0000000000..a4408547cd --- /dev/null +++ b/package/leafpad/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LEAFPAD + bool "leafpad" + depends on BR2_PACKAGE_LIBGTK2 + help + GTK+ based simple text editor + + http://savannah.nongnu.org/download/leafpad diff --git a/package/leafpad/leafpad.hash b/package/leafpad/leafpad.hash new file mode 100644 index 0000000000..be56d41454 --- /dev/null +++ b/package/leafpad/leafpad.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 959d22ae07f22803bc66ff40d373a854532a6e4732680bf8a96a3fbcb9f80a2c leafpad-0.8.18.1.tar.gz diff --git a/package/leafpad/leafpad.mk b/package/leafpad/leafpad.mk new file mode 100644 index 0000000000..9551a75835 --- /dev/null +++ b/package/leafpad/leafpad.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# leafpad +# +################################################################################ + +LEAFPAD_VERSION = 0.8.18.1 +LEAFPAD_SITE = http://savannah.nongnu.org/download/leafpad +LEAFPAD_DEPENDENCIES = libgtk2 host-intltool +LEAFPAD_LICENSE = GPLv2+ +LEAFPAD_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/less/Config.in b/package/less/Config.in new file mode 100644 index 0000000000..b7aa152aea --- /dev/null +++ b/package/less/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LESS + bool "less" + select BR2_PACKAGE_NCURSES + help + Excellent text file viewer. + + http://www.greenwoodsoftware.com/ diff --git a/package/less/less.hash b/package/less/less.hash new file mode 100644 index 0000000000..eea201da1e --- /dev/null +++ b/package/less/less.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 3fa38f2cf5e9e040bb44fffaa6c76a84506e379e47f5a04686ab78102090dda5 less-481.tar.gz diff --git a/package/less/less.mk b/package/less/less.mk new file mode 100644 index 0000000000..c2175438fb --- /dev/null +++ b/package/less/less.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# less +# +################################################################################ + +LESS_VERSION = 481 +LESS_SITE = $(BR2_GNU_MIRROR)/less +LESS_LICENSE = GPLv3+ +LESS_LICENSE_FILES = COPYING +# Build after busybox, full-blown is better +LESS_DEPENDENCIES = ncurses $(if $(BR2_PACKAGE_BUSYBOX),busybox) + +define LESS_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/less $(TARGET_DIR)/usr/bin/less +endef + +$(eval $(autotools-package)) diff --git a/package/lesstif/Config.in b/package/lesstif/Config.in new file mode 100644 index 0000000000..a6a88ec466 --- /dev/null +++ b/package/lesstif/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LESSTIF + bool "lesstif" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_FREETYPE + depends on BR2_USE_MMU # fork() + help + lesstif is the Hungry Programmers' version of OSF/Motif + + http://lesstif.sourceforge.net/ diff --git a/package/lesstif/lesstif.hash b/package/lesstif/lesstif.hash new file mode 100644 index 0000000000..c2ede8b6a8 --- /dev/null +++ b/package/lesstif/lesstif.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 eb4aa38858c29a4a3bcf605cfe7d91ca41f4522d78d770f69721e6e3a4ecf7e3 lesstif-0.95.2.tar.bz2 diff --git a/package/lesstif/lesstif.mk b/package/lesstif/lesstif.mk new file mode 100644 index 0000000000..6ce2339b38 --- /dev/null +++ b/package/lesstif/lesstif.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# lesstif +# +################################################################################ +LESSTIF_VERSION = 0.95.2 +LESSTIF_SOURCE = lesstif-$(LESSTIF_VERSION).tar.bz2 +LESSTIF_SITE = http://downloads.sourceforge.net/project/lesstif/lesstif/$(LESSTIF_VERSION) +LESSTIF_INSTALL_STAGING = YES +LESSTIF_DEPENDENCIES = \ + xlib_libXt \ + xlib_libXext \ + freetype +LESSTIF_LICENSE = LGPLv2+ +LESSTIF_LICENSE_FILES = COPYING.LIB +LESSTIF_CONF_OPTS = \ + --with-gnu-ld \ + --with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config \ + --enable-production=yes \ + --enable-build-tests=no \ + --no-recursion + +# Reduces the buggy makefile to the smallest possible (and working) thing +define LESSTIF_NOMAN2HTML + echo "all:" > $(@D)/doc/Makefile + echo "" >> $(@D)/doc/Makefile + echo "install:" >> $(@D)/doc/Makefile + echo "" >> $(@D)/doc/Makefile + echo "clean:" >> $(@D)/doc/Makefile +endef + +# Prevents to copy ac_find_motif.m4 on target, it would else +# be created at $(TARGET_DIR)/$(TOPDIR)/output/host/usr/share/aclocal/ac_find_motif.m4 +define LESSTIF_FIXACLOCAL + sed -i -e "/install-data-am: install-aclocalDATA/d" $(@D)/scripts/autoconf/Makefile +endef + +LESSTIF_POST_CONFIGURE_HOOKS += LESSTIF_NOMAN2HTML +LESSTIF_POST_CONFIGURE_HOOKS += LESSTIF_FIXACLOCAL + +$(eval $(autotools-package)) diff --git a/package/leveldb/0001-Fix-compilation-with-g-4.8.2.patch b/package/leveldb/0001-Fix-compilation-with-g-4.8.2.patch new file mode 100644 index 0000000000..f39216067c --- /dev/null +++ b/package/leveldb/0001-Fix-compilation-with-g-4.8.2.patch @@ -0,0 +1,31 @@ +From 8a8016f6d2af335ab205aa40d5274fc9b0c7a566 Mon Sep 17 00:00:00 2001 +From: Steve James +Date: Sun, 5 Apr 2015 16:29:51 +0200 +Subject: [PATCH 1/2] Fix compilation with g++ 4.8.2 + +Where db_iter.cc fails to get a typedef for ssize_t when compiled by +GCC. + +Upstream-Status: Submitted [https://github.com/google/leveldb/issues/233] + +Signed-off-by: Steve James +Signed-off-by: Thomas Petazzoni +--- + db/db_iter.cc | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/db/db_iter.cc b/db/db_iter.cc +index 3b2035e..c2e5f35 100644 +--- a/db/db_iter.cc ++++ b/db/db_iter.cc +@@ -13,6 +13,7 @@ + #include "util/logging.h" + #include "util/mutexlock.h" + #include "util/random.h" ++#include // for ssize_t + + namespace leveldb { + +-- +2.1.0 + diff --git a/package/leveldb/0002-Add-install-recipe.patch b/package/leveldb/0002-Add-install-recipe.patch new file mode 100644 index 0000000000..38c2ca8d3d --- /dev/null +++ b/package/leveldb/0002-Add-install-recipe.patch @@ -0,0 +1,40 @@ +From 818d59f093100d5f39db34d5686a9d983172d307 Mon Sep 17 00:00:00 2001 +From: Steve James +Date: Sun, 5 Apr 2015 16:30:46 +0200 +Subject: [PATCH 2/2] Add install recipe + +Upstream-Status: Submitted [https://github.com/google/leveldb/pull/276] + +Signed-off-by: Steve James +Signed-off-by: Thomas Petazzoni +--- + Makefile | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/Makefile b/Makefile +index 2bd2cad..530f2c3 100644 +--- a/Makefile ++++ b/Makefile +@@ -225,3 +225,19 @@ else + .c.o: + $(CC) $(CFLAGS) -c $< -o $@ + endif ++ ++INSTALL_ROOT = / ++INSTALL_PREFIX= usr/local ++ ++install: $(SHARED) $(LIBRARY) ++ install -d -m 0755 $(INSTALL_ROOT)$(INSTALL_PREFIX)/include/leveldb ++ install -D -m 0644 include/leveldb/*.h $(INSTALL_ROOT)$(INSTALL_PREFIX)/include/leveldb ++ install -d -m 0755 $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib ++ ifneq (,$(LIBRARY)) ++ install -m 0644 $(LIBRARY) $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib ++ endif ++ ifneq (,$(SHARED)) ++ install -m 0755 $(SHARED3) $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib ++ ln -sf $(SHARED3) $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib/$(SHARED1) ++ ln -sf $(SHARED3) $(INSTALL_ROOT)$(INSTALL_PREFIX)/lib/$(SHARED2) ++ endif +-- +2.1.0 + diff --git a/package/leveldb/Config.in b/package/leveldb/Config.in new file mode 100644 index 0000000000..b583c3b9fe --- /dev/null +++ b/package/leveldb/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_LEVELDB + bool "leveldb" + # Missing/broken atomic pointer support + depends on !BR2_bfin + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_SNAPPY + help + LevelDB is a fast key-value storage library written at Google that + provides an ordered mapping from string keys to string values. + + https://github.com/google/leveldb + +comment "leveldb needs a toolchain w/ C++, threads" + depends on !BR2_bfin + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/leveldb/leveldb.mk b/package/leveldb/leveldb.mk new file mode 100644 index 0000000000..e2c267b82b --- /dev/null +++ b/package/leveldb/leveldb.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# leveldb +# +################################################################################ + +LEVELDB_VERSION = v1.18 +LEVELDB_SITE = $(call github,google,leveldb,$(LEVELDB_VERSION)) +LEVELDB_LICENSE = BSD-3c +LEVELDB_LICENSE_FILES = LICENSE +LEVELDB_INSTALL_STAGING = YES +LEVELDB_DEPENDENCIES = snappy + +# We will pass optimisation level via CFLAGS so remove leveldb default +LEVELDB_MAKE_ARGS += OPTIM= + +# Disable the static library for shared only build +ifeq ($(BR2_SHARED_LIBS),y) +LEVELDB_MAKE_ARGS += LIBRARY= +endif + +# Disable the shared library for static only build +ifeq ($(BR2_STATIC_LIBS),y) +LEVELDB_MAKE_ARGS += SHARED= +endif + +define LEVELDB_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \ + $(LEVELDB_MAKE_ARGS) -C $(@D) +endef + +define LEVELDB_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + INSTALL_ROOT=$(STAGING_DIR) INSTALL_PREFIX=/usr \ + $(LEVELDB_MAKE_ARGS) -C $(@D) install +endef + +define LEVELDB_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + INSTALL_ROOT=$(TARGET_DIR) INSTALL_PREFIX=/usr \ + $(LEVELDB_MAKE_ARGS) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/lftp/Config.in b/package/lftp/Config.in new file mode 100644 index 0000000000..fb4ac13611 --- /dev/null +++ b/package/lftp/Config.in @@ -0,0 +1,66 @@ +config BR2_PACKAGE_LFTP + bool "lftp" + depends on BR2_USE_WCHAR + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_READLINE + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_GNUTLS + help + LFTP is a sophisticated ftp/http client, and a file transfer program + supporting a number of network protocols. Like BASH, it has job + control and uses the readline library for input. It has bookmarks, + a built-in mirror command, and can transfer several files in parallel. + It was designed with reliability in mind. + + http://lftp.yar.ru/ + +if BR2_PACKAGE_LFTP + +comment "Commands" + +config BR2_PACKAGE_LFTP_CMD_MIRROR + bool "Mirror command" + default y + help + Enable mirror command + +config BR2_PACKAGE_LFTP_CMD_SLEEP + bool "Sleep command" + default y + help + Enable sleep command + +config BR2_PACKAGE_LFTP_CMD_TORRENT + bool "Torrent command" + help + Enable torrent command + +comment "Protocols" + +config BR2_PACKAGE_LFTP_PROTO_FISH + bool "FISH protocol" + help + Enable FISH protocol + +config BR2_PACKAGE_LFTP_PROTO_FTP + bool "FTP protocol" + default y + help + Enable FTP protocol + +config BR2_PACKAGE_LFTP_PROTO_HTTP + bool "HTTP protocol" + help + Enable HTTP protocol + +config BR2_PACKAGE_LFTP_PROTO_SFTP + bool "SFTP protocol" + help + Enable SFTP protocol + +endif # BR2_PACKAGE_LFTP + +comment "lftp requires a toolchain w/ C++, wchar" + depends on BR2_USE_MMU + depends on !(BR2_USE_WCHAR && BR2_INSTALL_LIBSTDCPP) diff --git a/package/lftp/lftp.hash b/package/lftp/lftp.hash new file mode 100644 index 0000000000..4c5d799591 --- /dev/null +++ b/package/lftp/lftp.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 1e7cb674c83ace48172263f86847ed04bb6ab2f24116b11a8505f70a15e8805c lftp-4.6.4.tar.xz diff --git a/package/lftp/lftp.mk b/package/lftp/lftp.mk new file mode 100644 index 0000000000..5051f707a9 --- /dev/null +++ b/package/lftp/lftp.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# lftp +# +################################################################################ + +LFTP_VERSION = 4.6.4 +LFTP_SOURCE = lftp-$(LFTP_VERSION).tar.xz +LFTP_SITE = http://lftp.yar.ru/ftp +LFTP_LICENSE = GPLv3+ +LFTP_LICENSE_FILES = COPYING +# Needed so that our libtool patch applies properly +LFTP_AUTORECONF = YES +LFTP_DEPENDENCIES = readline zlib host-pkgconf + +ifneq ($(BR2_STATIC_LIBS),y) +LFTP_CONF_OPTS += --with-modules +endif + +ifeq ($(BR2_PACKAGE_EXPAT)$(BR2_PACKAGE_LFTP_PROTO_HTTP),yy) +LFTP_DEPENDENCIES += expat +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +LFTP_DEPENDENCIES += gnutls +LFTP_CONF_OPTS += --with-gnutls +else +LFTP_CONF_OPTS += --without-gnutls +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LFTP_DEPENDENCIES += openssl +LFTP_CONF_OPTS += --with-openssl +else +LFTP_CONF_OPTS += --without-openssl +endif + +# Remove /usr/share/lftp +define LFTP_REMOVE_DATA + $(RM) -fr $(TARGET_DIR)/usr/share/lftp +endef + +LFTP_POST_INSTALL_TARGET_HOOKS += LFTP_REMOVE_DATA + +# Optional commands and protocols +LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_CMD_MIRROR) += cmd-mirror.so +LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_CMD_SLEEP) += cmd-sleep.so +LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_CMD_TORRENT) += cmd-torrent.so +LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_PROTO_FISH) += proto-fish.so +LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_PROTO_FTP) += proto-ftp.so +LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_PROTO_HTTP) += proto-http.so +LFTP_MODULES_TO_REMOVE-$(BR2_PACKAGE_LFTP_PROTO_SFTP) += proto-sftp.so + +define LFTP_REMOVE_MODULES + for f in $(LFTP_MODULES_TO_REMOVE-) ; do \ + $(RM) -f $(TARGET_DIR)/usr/lib/lftp/$(LFTP_VERSION)/$$f ; \ + done +endef + +LFTP_POST_INSTALL_TARGET_HOOKS += LFTP_REMOVE_MODULES + +$(eval $(autotools-package)) diff --git a/package/libaio/0001-arches.patch b/package/libaio/0001-arches.patch new file mode 100644 index 0000000000..4b77f57768 --- /dev/null +++ b/package/libaio/0001-arches.patch @@ -0,0 +1,249 @@ +Patch borrowed from OpenEmbedded, available at +/meta/recipes-extended/libaio/libaio/00_arches.patch in their source +tree. This patch has been modified to only add the MIPS definitions. + +The patch adds MIPS specific definitions (syscall number and macros). + +Signed-off-by: Alistair Francis + +Index: libaio-0.3.110/src/syscall.h +=================================================================== +--- libaio-0.3.110.orig/src/syscall.h ++++ libaio-0.3.110/src/syscall.h +@@ -28,6 +28,8 @@ + #include "syscall-sparc.h" + #elif defined(__aarch64__) + #include "syscall-arm64.h" ++#elif defined(__mips__) ++#include "syscall-mips.h" + #else + #warning "using generic syscall method" + #include "syscall-generic.h" +Index: libaio-0.3.110/src/syscall-mips.h +=================================================================== +--- /dev/null ++++ libaio-0.3.110/src/syscall-mips.h +@@ -0,0 +1,223 @@ ++/* ++ * This file is subject to the terms and conditions of the GNU General Public ++ * License. See the file "COPYING" in the main directory of this archive ++ * for more details. ++ * ++ * Copyright (C) 1995, 96, 97, 98, 99, 2000 by Ralf Baechle ++ * Copyright (C) 1999, 2000 Silicon Graphics, Inc. ++ * ++ * Changed system calls macros _syscall5 - _syscall7 to push args 5 to 7 onto ++ * the stack. Robin Farine for ACN S.A, Copyright (C) 1996 by ACN S.A ++ */ ++ ++#ifndef _MIPS_SIM_ABI32 ++#define _MIPS_SIM_ABI32 1 ++#define _MIPS_SIM_NABI32 2 ++#define _MIPS_SIM_ABI64 3 ++#endif ++ ++#if _MIPS_SIM == _MIPS_SIM_ABI32 ++ ++/* ++ * Linux o32 style syscalls are in the range from 4000 to 4999. ++ */ ++#define __NR_Linux 4000 ++#define __NR_io_setup (__NR_Linux + 241) ++#define __NR_io_destroy (__NR_Linux + 242) ++#define __NR_io_getevents (__NR_Linux + 243) ++#define __NR_io_submit (__NR_Linux + 244) ++#define __NR_io_cancel (__NR_Linux + 245) ++ ++#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ ++ ++#if _MIPS_SIM == _MIPS_SIM_ABI64 ++ ++/* ++ * Linux 64-bit syscalls are in the range from 5000 to 5999. ++ */ ++#define __NR_Linux 5000 ++#define __NR_io_setup (__NR_Linux + 200) ++#define __NR_io_destroy (__NR_Linux + 201) ++#define __NR_io_getevents (__NR_Linux + 202) ++#define __NR_io_submit (__NR_Linux + 203) ++#define __NR_io_cancel (__NR_Linux + 204) ++#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */ ++ ++#if _MIPS_SIM == _MIPS_SIM_NABI32 ++ ++/* ++ * Linux N32 syscalls are in the range from 6000 to 6999. ++ */ ++#define __NR_Linux 6000 ++#define __NR_io_setup (__NR_Linux + 200) ++#define __NR_io_destroy (__NR_Linux + 201) ++#define __NR_io_getevents (__NR_Linux + 202) ++#define __NR_io_submit (__NR_Linux + 203) ++#define __NR_io_cancel (__NR_Linux + 204) ++#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */ ++ ++#define io_syscall1(type,fname,sname,atype,a) \ ++type fname(atype a) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a3 asm("$7"); \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %3\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "=r" (__a3) \ ++ : "r" (__a0), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall2(type,fname,sname,atype,a,btype,b) \ ++type fname(atype a, btype b) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a3 asm("$7"); \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %4\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "=r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall3(type,fname,sname,atype,a,btype,b,ctype,c) \ ++type fname(atype a, btype b, ctype c) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7"); \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %5\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "=r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#define io_syscall4(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d) \ ++type fname(atype a, btype b, ctype c, dtype d) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7") = (unsigned long) d; \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %5\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "+r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#if (_MIPS_SIM == _MIPS_SIM_ABI32) ++ ++/* ++ * Using those means your brain needs more than an oil change ;-) ++ */ ++ ++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ ++type fname(atype a, btype b, ctype c, dtype d, etype e) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7") = (unsigned long) d; \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "lw\t$2, %6\n\t" \ ++ "subu\t$29, 32\n\t" \ ++ "sw\t$2, 16($29)\n\t" \ ++ "li\t$2, %5\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ "addiu\t$29, 32\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "+r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "i" (__NR_##sname), \ ++ "m" ((unsigned long)e) \ ++ : "$2", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#endif /* (_MIPS_SIM == _MIPS_SIM_ABI32) */ ++ ++#if (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) ++ ++#define io_syscall5(type,fname,sname,atype,a,btype,b,ctype,c,dtype,d,etype,e) \ ++type fname (atype a,btype b,ctype c,dtype d,etype e) \ ++{ \ ++ register unsigned long __a0 asm("$4") = (unsigned long) a; \ ++ register unsigned long __a1 asm("$5") = (unsigned long) b; \ ++ register unsigned long __a2 asm("$6") = (unsigned long) c; \ ++ register unsigned long __a3 asm("$7") = (unsigned long) d; \ ++ register unsigned long __a4 asm("$8") = (unsigned long) e; \ ++ unsigned long __v0; \ ++ \ ++ __asm__ volatile ( \ ++ ".set\tnoreorder\n\t" \ ++ "li\t$2, %6\t\t\t# " #fname "\n\t" \ ++ "syscall\n\t" \ ++ "move\t%0, $2\n\t" \ ++ ".set\treorder" \ ++ : "=&r" (__v0), "+r" (__a3) \ ++ : "r" (__a0), "r" (__a1), "r" (__a2), "r" (__a4), "i" (__NR_##sname) \ ++ : "$2", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", \ ++ "memory"); \ ++ \ ++ if (__a3 == 0) \ ++ return (type) __v0; \ ++ return (type) -1; \ ++} ++ ++#endif /* (_MIPS_SIM == _MIPS_SIM_NABI32) || (_MIPS_SIM == _MIPS_SIM_ABI64) */ ++ diff --git a/package/libaio/0003-destdir.patch b/package/libaio/0003-destdir.patch new file mode 100644 index 0000000000..583a2afa86 --- /dev/null +++ b/package/libaio/0003-destdir.patch @@ -0,0 +1,24 @@ +Patch borrowed from OpenEmbedded, available at +recipes/libaio/libaio-0.3.106/destdir.patch in their source tree. + +It just adds support for the traditional DESTDIR variable to install +the library in a different sysroot than the normal /. + +Signed-off-by: Thomas Petazzoni +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: libaio-0.3.109/Makefile +=================================================================== +--- libaio-0.3.109.orig/Makefile ++++ libaio-0.3.109/Makefile +@@ -23,7 +23,7 @@ + @$(MAKE) -C src + + install: +- @$(MAKE) -C src install prefix=$(prefix) includedir=$(includedir) libdir=$(libdir) ++ @$(MAKE) -C src install prefix=$(DESTDIR)$(prefix) includedir=$(DESTDIR)$(includedir) libdir=$(DESTDIR)$(libdir) + + check: + @$(MAKE) -C harness check diff --git a/package/libaio/Config.in b/package/libaio/Config.in new file mode 100644 index 0000000000..3031c894b7 --- /dev/null +++ b/package/libaio/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS + bool + default y if BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \ + BR2_m68k || BR2_mips || BR2_mipsel || BR2_powerpc || \ + BR2_sparc || BR2_x86_64 + +config BR2_PACKAGE_LIBAIO + bool "libaio" + depends on BR2_PACKAGE_LIBAIO_ARCH_SUPPORTS + help + Library for doing asynchronous I/O diff --git a/package/libaio/libaio.hash b/package/libaio/libaio.hash new file mode 100644 index 0000000000..7aa8961fbf --- /dev/null +++ b/package/libaio/libaio.hash @@ -0,0 +1,2 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/liba/libaio/libaio_0.3.110-1.dsc +sha256 e019028e631725729376250e32b473012f7cb68e1f7275bfc1bbcdd0f8745f7e libaio_0.3.110.orig.tar.gz diff --git a/package/libaio/libaio.mk b/package/libaio/libaio.mk new file mode 100644 index 0000000000..9b28f0562a --- /dev/null +++ b/package/libaio/libaio.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# libaio +# +################################################################################ + +LIBAIO_VERSION = 0.3.110 +LIBAIO_SOURCE = libaio_$(LIBAIO_VERSION).orig.tar.gz +LIBAIO_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/liba/libaio +LIBAIO_INSTALL_STAGING = YES +LIBAIO_LICENSE = LGPLv2.1+ +LIBAIO_LICENSE_FILES = COPYING + +define LIBAIO_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define LIBAIO_INSTALL_STAGING_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install +endef + +define LIBAIO_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/libao/Config.in b/package/libao/Config.in new file mode 100644 index 0000000000..3c99ab968d --- /dev/null +++ b/package/libao/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBAO + bool "libao" + help + Libao is a cross-platform audio library that allows programs + to output audio using a simple API on a wide variety of platforms. + + http://www.xiph.org/ao/ diff --git a/package/libao/libao.hash b/package/libao/libao.hash new file mode 100644 index 0000000000..64174dad8f --- /dev/null +++ b/package/libao/libao.hash @@ -0,0 +1,2 @@ +# From http://downloads.xiph.org/releases/ao/SHA256SUMS.txt +sha256 03ad231ad1f9d64b52474392d63c31197b0bc7bd416e58b1c10a329a5ed89caf libao-1.2.0.tar.gz diff --git a/package/libao/libao.mk b/package/libao/libao.mk new file mode 100644 index 0000000000..a314c08d17 --- /dev/null +++ b/package/libao/libao.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# libao +# +################################################################################ + +LIBAO_VERSION = 1.2.0 +LIBAO_SITE = http://downloads.xiph.org/releases/ao +LIBAO_DEPENDENCIES = host-pkgconf +LIBAO_INSTALL_STAGING = YES +LIBAO_LICENSE = GPLv2+ +LIBAO_LICENSE_FILES = COPYING +LIBAO_CONF_OPTS = \ + --disable-esd \ + --disable-wmm \ + --disable-arts \ + --disable-nas \ + --disable-pulse \ + --disable-broken-oss + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +LIBAO_DEPENDENCIES += alsa-lib +LIBAO_CONF_OPTS += --enable-alsa --enable-alsa-mmap + +# Remove the OSS plugin if ALSA is enabled, as libao will prefer ALSA anyway +define LIBAO_REMOVE_OSS_PLUGIN + rm -f $(TARGET_DIR)/usr/lib/ao/plugins-4/liboss.so +endef +LIBAO_POST_INSTALL_TARGET_HOOKS += LIBAO_REMOVE_OSS_PLUGIN +else +LIBAO_CONF_OPTS += --disable-alsa +endif + +$(eval $(autotools-package)) diff --git a/package/libarchive/0001-fix-CVE-2016-1541.patch b/package/libarchive/0001-fix-CVE-2016-1541.patch new file mode 100644 index 0000000000..ef2448c04b --- /dev/null +++ b/package/libarchive/0001-fix-CVE-2016-1541.patch @@ -0,0 +1,71 @@ +From d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7 Mon Sep 17 00:00:00 2001 +From: Tim Kientzle +Date: Sun, 24 Apr 2016 17:13:45 -0700 +Subject: [PATCH] Issue #656: Fix CVE-2016-1541, VU#862384 + +When reading OS X metadata entries in Zip archives that were stored +without compression, libarchive would use the uncompressed entry size +to allocate a buffer but would use the compressed entry size to limit +the amount of data copied into that buffer. Since the compressed +and uncompressed sizes are provided by data in the archive itself, +an attacker could manipulate these values to write data beyond +the end of the allocated buffer. + +This fix provides three new checks to guard against such +manipulation and to make libarchive generally more robust when +handling this type of entry: + 1. If an OS X metadata entry is stored without compression, + abort the entire archive if the compressed and uncompressed + data sizes do not match. + 2. When sanity-checking the size of an OS X metadata entry, + abort this entry if either the compressed or uncompressed + size is larger than 4MB. + 3. When copying data into the allocated buffer, check the copy + size against both the compressed entry size and uncompressed + entry size. + +Signed-off-by: Gustavo Zacarias +--- +Status: from upstream https://github.com/libarchive/libarchive/issues/656 + + libarchive/archive_read_support_format_zip.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/libarchive/archive_read_support_format_zip.c b/libarchive/archive_read_support_format_zip.c +index 0f8262c..0a0be96 100644 +--- a/libarchive/archive_read_support_format_zip.c ++++ b/libarchive/archive_read_support_format_zip.c +@@ -2778,6 +2778,11 @@ zip_read_mac_metadata(struct archive_read *a, struct archive_entry *entry, + + switch(rsrc->compression) { + case 0: /* No compression. */ ++ if (rsrc->uncompressed_size != rsrc->compressed_size) { ++ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, ++ "Malformed OS X metadata entry: inconsistent size"); ++ return (ARCHIVE_FATAL); ++ } + #ifdef HAVE_ZLIB_H + case 8: /* Deflate compression. */ + #endif +@@ -2798,6 +2803,12 @@ zip_read_mac_metadata(struct archive_read *a, struct archive_entry *entry, + (intmax_t)rsrc->uncompressed_size); + return (ARCHIVE_WARN); + } ++ if (rsrc->compressed_size > (4 * 1024 * 1024)) { ++ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT, ++ "Mac metadata is too large: %jd > 4M bytes", ++ (intmax_t)rsrc->compressed_size); ++ return (ARCHIVE_WARN); ++ } + + metadata = malloc((size_t)rsrc->uncompressed_size); + if (metadata == NULL) { +@@ -2836,6 +2847,8 @@ zip_read_mac_metadata(struct archive_read *a, struct archive_entry *entry, + bytes_avail = remaining_bytes; + switch(rsrc->compression) { + case 0: /* No compression. */ ++ if ((size_t)bytes_avail > metadata_bytes) ++ bytes_avail = metadata_bytes; + memcpy(mp, p, bytes_avail); + bytes_used = (size_t)bytes_avail; + metadata_bytes -= bytes_used; diff --git a/package/libarchive/Config.in b/package/libarchive/Config.in new file mode 100644 index 0000000000..81b5936ce8 --- /dev/null +++ b/package/libarchive/Config.in @@ -0,0 +1,27 @@ +comment "libarchive needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_LIBARCHIVE + bool "libarchive" + depends on BR2_USE_WCHAR + help + Libarchive is a reusable C library for reading and writing a + variety of streaming archive formats. + + http://www.libarchive.org/ + +if BR2_PACKAGE_LIBARCHIVE + +config BR2_PACKAGE_LIBARCHIVE_BSDTAR + bool "bsdtar" + help + The 'bsdtar' program is a full-featured 'tar' + replacement built on libarchive. + +config BR2_PACKAGE_LIBARCHIVE_BSDCPIO + bool "bsdcpio" + help + The 'bsdcpio' program is a different interface to + essentially the same functionality as 'bsdtar'. + +endif diff --git a/package/libarchive/libarchive.hash b/package/libarchive/libarchive.hash new file mode 100644 index 0000000000..5f96211507 --- /dev/null +++ b/package/libarchive/libarchive.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 eb87eacd8fe49e8d90c8fdc189813023ccc319c5e752b01fb6ad0cc7b2c53d5e libarchive-3.1.2.tar.gz diff --git a/package/libarchive/libarchive.mk b/package/libarchive/libarchive.mk new file mode 100644 index 0000000000..726142b217 --- /dev/null +++ b/package/libarchive/libarchive.mk @@ -0,0 +1,102 @@ +################################################################################ +# +# libarchive +# +################################################################################ + +LIBARCHIVE_VERSION = 3.1.2 +LIBARCHIVE_SITE = http://www.libarchive.org/downloads +LIBARCHIVE_INSTALL_STAGING = YES +LIBARCHIVE_LICENSE = BSD-2c, BSD-3c +LIBARCHIVE_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBARCHIVE_BSDTAR),y) +ifeq ($(BR2_STATIC_LIBS),y) +LIBARCHIVE_CONF_OPTS += --enable-bsdtar=static +else +LIBARCHIVE_CONF_OPTS += --enable-bsdtar=shared +endif +else +LIBARCHIVE_CONF_OPTS += --disable-bsdtar +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE_BSDCPIO),y) +ifeq ($(BR2_STATIC_LIBS),y) +LIBARCHIVE_CONF_OPTS += --enable-bsdcpio=static +else +LIBARCHIVE_CONF_OPTS += --enable-bsdcpio=shared +endif +else +LIBARCHIVE_CONF_OPTS += --disable-bsdcpio +endif + +ifeq ($(BR2_PACKAGE_ACL),y) +LIBARCHIVE_DEPENDENCIES += acl +else +LIBARCHIVE_CONF_OPTS += --disable-acl +endif + +ifeq ($(BR2_PACKAGE_ATTR),y) +LIBARCHIVE_DEPENDENCIES += attr +else +LIBARCHIVE_CONF_OPTS += --disable-xattr +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +LIBARCHIVE_CONF_OPTS += --with-bz2lib +LIBARCHIVE_DEPENDENCIES += bzip2 +else +LIBARCHIVE_CONF_OPTS += --without-bz2lib +endif + +ifeq ($(BR2_PACKAGE_EXPAT),y) +LIBARCHIVE_DEPENDENCIES += expat +else +LIBARCHIVE_CONF_OPTS += --without-expat +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +LIBARCHIVE_DEPENDENCIES += libiconv +else +LIBARCHIVE_CONF_OPTS += --without-libiconv-prefix +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +LIBARCHIVE_DEPENDENCIES += libxml2 +LIBARCHIVE_CONF_ENV += XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config +else +LIBARCHIVE_CONF_OPTS += --without-xml2 +endif + +ifeq ($(BR2_PACKAGE_LZO),y) +LIBARCHIVE_DEPENDENCIES += lzo +else +LIBARCHIVE_CONF_OPTS += --without-lzo2 +endif + +ifeq ($(BR2_PACKAGE_NETTLE),y) +LIBARCHIVE_DEPENDENCIES += nettle +else +LIBARCHIVE_CONF_OPTS += --without-nettle +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBARCHIVE_DEPENDENCIES += openssl +else +LIBARCHIVE_CONF_OPTS += --without-openssl +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +LIBARCHIVE_DEPENDENCIES += zlib +else +LIBARCHIVE_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +LIBARCHIVE_DEPENDENCIES += xz +LIBARCHIVE_CONF_OPTS += --with-lzma +else +LIBARCHIVE_CONF_OPTS += --without-lzma +endif + +$(eval $(autotools-package)) diff --git a/package/libargtable2/Config.in b/package/libargtable2/Config.in new file mode 100644 index 0000000000..42d067becd --- /dev/null +++ b/package/libargtable2/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBARGTABLE2 + bool "libargtable2" + help + A greatly simplified and yet quite robust argument parsing + set of library calls. + + http://argtable.sourceforge.net/ diff --git a/package/libargtable2/libargtable2.hash b/package/libargtable2/libargtable2.hash new file mode 100644 index 0000000000..9addbc54b9 --- /dev/null +++ b/package/libargtable2/libargtable2.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 8f77e8a7ced5301af6e22f47302fdbc3b1ff41f2b83c43c77ae5ca041771ddbf argtable2-13.tar.gz diff --git a/package/libargtable2/libargtable2.mk b/package/libargtable2/libargtable2.mk new file mode 100644 index 0000000000..6b42cc0899 --- /dev/null +++ b/package/libargtable2/libargtable2.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libargtable2 +# +################################################################################ + +LIBARGTABLE2_VERSION = 13 +LIBARGTABLE2_SOURCE = argtable2-$(LIBARGTABLE2_VERSION).tar.gz +LIBARGTABLE2_SITE = http://downloads.sourceforge.net/project/argtable/argtable/argtable-2.13 +LIBARGTABLE2_INSTALL_STAGING = YES +LIBARGTABLE2_CONF_OPTS = \ + --disable-example \ + --disable-kernel-module \ + --enable-lib \ + --enable-util +LIBARGTABLE2_LICENSE = LGPLv2+ +LIBARGTABLE2_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libart/0001-art-config-cross.patch b/package/libart/0001-art-config-cross.patch new file mode 100644 index 0000000000..a54f26a235 --- /dev/null +++ b/package/libart/0001-art-config-cross.patch @@ -0,0 +1,34 @@ +diff -Nura libart_lgpl-2.3.21.orig/Makefile.am libart_lgpl-2.3.21/Makefile.am +--- libart_lgpl-2.3.21.orig/Makefile.am 2011-02-01 10:07:39.687545397 -0300 ++++ libart_lgpl-2.3.21/Makefile.am 2011-02-01 10:08:48.320545396 -0300 +@@ -5,11 +5,6 @@ + + noinst_SCRIPTS = gen_art_config.sh + +-BUILT_SOURCES = art_config.h +- +-art_config.h: +- ./gen_art_config.sh > art_config.h +- + EXTRA_DIST = \ + libart.def \ + libart-config.in \ +diff -Nura libart_lgpl-2.3.21.orig/art_config.h libart_lgpl-2.3.21/art_config.h +--- libart_lgpl-2.3.21.orig/art_config.h 2011-02-01 10:07:39.688545397 -0300 ++++ libart_lgpl-2.3.21/art_config.h 2011-02-01 10:08:27.315545395 -0300 +@@ -1,9 +1,15 @@ + /* Automatically generated by gen_art_config */ + ++#include ++ + #define ART_SIZEOF_CHAR 1 + #define ART_SIZEOF_SHORT 2 + #define ART_SIZEOF_INT 4 ++#if LONG_MAX == 2147483647L + #define ART_SIZEOF_LONG 4 ++#else ++#define ART_SIZEOF_LONG 8 ++#endif + + typedef unsigned char art_u8; + typedef unsigned short art_u16; diff --git a/package/libart/Config.in b/package/libart/Config.in new file mode 100644 index 0000000000..926233587b --- /dev/null +++ b/package/libart/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBART + bool "libart" + help + Libart is a library for high-performance 2D graphics. It + supports a very powerful imaging model, basically the same + as SVG and the Java 2D API. It includes all PostScript + imaging operations, and adds antialiasing and + alpha-transparency. It is also highly tuned for incremental + rendering. It contains data structures and algorithms suited + to rapid, precise computation of Region of Interest, and a + two-phase rendering pipeline optimized for interactive + display. + + http://www.levien.com/libart/ diff --git a/package/libart/libart.hash b/package/libart/libart.hash new file mode 100644 index 0000000000..769c3bfeab --- /dev/null +++ b/package/libart/libart.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/libart_lgpl/2.3/libart_lgpl-2.3.21.sha256sum +sha256 2a10b1c884bb37c7bd5c5eba59dbd0d28bf68e64a42d7f2083c836f60f8e98fa libart_lgpl-2.3.21.tar.gz diff --git a/package/libart/libart.mk b/package/libart/libart.mk new file mode 100644 index 0000000000..85ee37c156 --- /dev/null +++ b/package/libart/libart.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libart +# +################################################################################ + +LIBART_VERSION_MAJOR = 2.3 +LIBART_VERSION = $(LIBART_VERSION_MAJOR).21 +LIBART_SOURCE = libart_lgpl-$(LIBART_VERSION).tar.gz +LIBART_SITE = http://ftp.gnome.org/pub/gnome/sources/libart_lgpl/$(LIBART_VERSION_MAJOR) +LIBART_AUTORECONF = YES +LIBART_INSTALL_STAGING = YES +LIBART_CONFIG_SCRIPTS = libart2-config +LIBART_LICENSE = LGPLv2+ +LIBART_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libasplib/Config.in b/package/libasplib/Config.in new file mode 100644 index 0000000000..89d5448473 --- /dev/null +++ b/package/libasplib/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBASPLIB + bool "libasplib" + depends on BR2_INSTALL_LIBSTDCPP + help + asplib (Achim's Signal Processing LIBrary), is a small and + lightweight C++ library for digital signal processing. + + https://github.com/AchimTuran/asplib + +comment "asplib needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libasplib/libasplib.hash b/package/libasplib/libasplib.hash new file mode 100644 index 0000000000..bbd027dda5 --- /dev/null +++ b/package/libasplib/libasplib.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 ccc2718c79a8d684317cc1987ede88b198e1602df47d0f18f03d474eda00af9c libasplib-f7219142e790a329b002a94f3db943abcb183739.tar.gz diff --git a/package/libasplib/libasplib.mk b/package/libasplib/libasplib.mk new file mode 100644 index 0000000000..41aeaeb8a2 --- /dev/null +++ b/package/libasplib/libasplib.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libasplib +# +################################################################################ + +LIBASPLIB_VERSION = f7219142e790a329b002a94f3db943abcb183739 +LIBASPLIB_SITE = $(call github,AchimTuran,asplib,$(LIBASPLIB_VERSION)) +LIBASPLIB_LICENSE = GPLv3+ +LIBASPLIB_LICENSE_FILES = LICENSE +LIBASPLIB_INSTALL_STAGING = YES + +$(eval $(cmake-package)) diff --git a/package/libass/Config.in b/package/libass/Config.in new file mode 100644 index 0000000000..7690685187 --- /dev/null +++ b/package/libass/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBASS + bool "libass" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_LIBFRIBIDI + help + libass is a portable subtitle renderer for the ASS/SSA + (Advanced Substation Alpha/Substation Alpha) subtitle format + + http://code.google.com/p/libass/ diff --git a/package/libass/libass.hash b/package/libass/libass.hash new file mode 100644 index 0000000000..5dddc403ca --- /dev/null +++ b/package/libass/libass.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 d698d0a6adca7c36c5a86b540d67b05bfd36cebc3c351ab7646497c43fe1face libass-0.13.2.tar.xz diff --git a/package/libass/libass.mk b/package/libass/libass.mk new file mode 100644 index 0000000000..716bca6b4f --- /dev/null +++ b/package/libass/libass.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# libass +# +################################################################################ + +LIBASS_VERSION = 0.13.2 +LIBASS_SOURCE = libass-$(LIBASS_VERSION).tar.xz +# Do not use the github helper here, the generated tarball is *NOT* +# the same as the one uploaded by upstream for the release. +LIBASS_SITE = https://github.com/libass/libass/releases/download/$(LIBASS_VERSION) +LIBASS_INSTALL_STAGING = YES +LIBASS_LICENSE = ISC +LIBASS_LICENSE_FILES = COPYING +LIBASS_DEPENDENCIES = \ + host-pkgconf \ + freetype \ + libfribidi \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +# configure: WARNING: Install yasm for a significantly faster libass build. +# only for Intel archs +ifeq ($(BR2_i386)$(BR2_x86_64),y) +LIBASS_DEPENDENCIES += host-yasm +endif + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +LIBASS_DEPENDENCIES += fontconfig +LIBASS_CONF_OPTS += --enable-fontconfig +else +LIBASS_CONF_OPTS += --disable-fontconfig --disable-require-system-font-provider +endif + +ifeq ($(BR2_PACKAGE_HARFBUZZ),y) +LIBASS_DEPENDENCIES += harfbuzz +LIBASS_CONF_OPTS += --enable-harfbuzz +else +LIBASS_CONF_OPTS += --disable-harfbuzz +endif + +$(eval $(autotools-package)) diff --git a/package/libassuan/Config.in b/package/libassuan/Config.in new file mode 100644 index 0000000000..4f0a6ba0b7 --- /dev/null +++ b/package/libassuan/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBASSUAN + bool "libassuan" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBGPG_ERROR + help + Libassuan is a small library implementing the so-called + Assuan protocol. + + This protocol is used for IPC between most newer GnuPG + components. Both, server and client side functions are + provided. + + http://www.gnupg.org/related_software/libassuan/ diff --git a/package/libassuan/libassuan.hash b/package/libassuan/libassuan.hash new file mode 100644 index 0000000000..a019f76c89 --- /dev/null +++ b/package/libassuan/libassuan.hash @@ -0,0 +1,2 @@ +# From https://www.gnupg.org/download/integrity_check.html +sha1 c21b86482f6a3624c2b46b91e20f8415f244233a libassuan-2.2.1.tar.bz2 diff --git a/package/libassuan/libassuan.mk b/package/libassuan/libassuan.mk new file mode 100644 index 0000000000..3656ea579f --- /dev/null +++ b/package/libassuan/libassuan.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libassuan +# +################################################################################ + +LIBASSUAN_VERSION = 2.2.1 +LIBASSUAN_SITE = ftp://ftp.gnupg.org/gcrypt/libassuan +LIBASSUAN_SOURCE = libassuan-$(LIBASSUAN_VERSION).tar.bz2 +LIBASSUAN_LICENSE = LGPLv2.1+ (library), GPLv3 (tests, doc) +LIBASSUAN_LICENSE_FILES = COPYING.LIB COPYING +LIBASSUAN_INSTALL_STAGING = YES +LIBASSUAN_DEPENDENCIES = libgpg-error +LIBASSUAN_CONF_OPTS = \ + --with-gpg-error-prefix=$(STAGING_DIR)/usr + +$(eval $(autotools-package)) diff --git a/package/libatasmart/0001-strpool-cross-flags.patch b/package/libatasmart/0001-strpool-cross-flags.patch new file mode 100644 index 0000000000..89b91cca41 --- /dev/null +++ b/package/libatasmart/0001-strpool-cross-flags.patch @@ -0,0 +1,42 @@ +From 730158700ea7a554c37f24bfbf5f4985f7280f3e Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Wed, 6 Feb 2013 14:07:02 +0100 +Subject: [PATCH] strpool: don't mix up host/build flags when cross compiling + +Submitted upstream as https://bugs.freedesktop.org/show_bug.cgi?id=60364 + +Commit b71035ce89 (build-sys: modernize build system) changed the strpool +(which needs to be built for the build machine) compilation to use +AM_CFLAGS / AM_LDFLAGS rather than CFLAGS / LDFLAGS. This is wrong, as +The AM_ version is used TOGETHER with (the user supplied) CFLAGS/LDFLAGS, +causing strpool to use both CFLAGS (for host) and CCFLAGS_FOR_BUILD (for +build) flags, breaking cross compilation with errors like: + +cc1: error: unrecognized command line option "-mabi=spe" + +Instead overwrite the (user supplied) CFLAGS with the (user supplied) +CFLAGS_FOR_BUILD (and similar for LDFLAGS) like we used to do. + +Signed-off-by: Peter Korsgaard +--- + strpool/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/strpool/Makefile.am b/strpool/Makefile.am +index b041cea..5b335a5 100644 +--- a/strpool/Makefile.am ++++ b/strpool/Makefile.am +@@ -17,8 +17,8 @@ + # . + + CC = @CC_FOR_BUILD@ +-AM_CFLAGS = @BUILD_CFLAGS@ +-AM_LDFLAGS = @BUILD_LDFLAGS@ ++CFLAGS = @BUILD_CFLAGS@ ++LDFLAGS = @BUILD_LDFLAGS@ + + noinst_PROGRAMS = \ + strpool +-- +1.7.10.4 + diff --git a/package/libatasmart/Config.in b/package/libatasmart/Config.in new file mode 100644 index 0000000000..9db3b093bf --- /dev/null +++ b/package/libatasmart/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBATASMART + bool "libatasmart" + depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency + help + The libatasmart package is a disk reporting library. + It only supports a subset of the ATA S.M.A.R.T. functionality. + + http://0pointer.de/blog/projects/being-smart.html + +comment "libatasmart requires udev to be enabled" + depends on !BR2_PACKAGE_HAS_UDEV diff --git a/package/libatasmart/libatasmart.hash b/package/libatasmart/libatasmart.hash new file mode 100644 index 0000000000..8733d07964 --- /dev/null +++ b/package/libatasmart/libatasmart.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 61f0ea345f63d28ab2ff0dc352c22271661b66bf09642db3a4049ac9dbdb0f8d libatasmart-0.19.tar.xz diff --git a/package/libatasmart/libatasmart.mk b/package/libatasmart/libatasmart.mk new file mode 100644 index 0000000000..9e5de97d00 --- /dev/null +++ b/package/libatasmart/libatasmart.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libatasmart +# +################################################################################ + +LIBATASMART_VERSION = 0.19 +LIBATASMART_SOURCE = libatasmart-$(LIBATASMART_VERSION).tar.xz +LIBATASMART_SITE = http://0pointer.de/public +LIBATASMART_LICENSE = LGPLv2.1 +LIBATASMART_LICENSE_FILES = LGPL +LIBATASMART_INSTALL_STAGING = YES + +# package doesn't include configure script +LIBATASMART_AUTORECONF = YES + +LIBATASMART_DEPENDENCIES = udev + +$(eval $(autotools-package)) diff --git a/package/libatomic_ops/Config.in b/package/libatomic_ops/Config.in new file mode 100644 index 0000000000..c6fe7a03b4 --- /dev/null +++ b/package/libatomic_ops/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS + bool + default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_sparc || BR2_sparc64 || BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64 + +config BR2_PACKAGE_LIBATOMIC_OPS + bool "libatomic_ops" + depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS + help + Atomic operations library + + https://github.com/ivmai/libatomic_ops diff --git a/package/libatomic_ops/libatomic_ops.mk b/package/libatomic_ops/libatomic_ops.mk new file mode 100644 index 0000000000..fd45726750 --- /dev/null +++ b/package/libatomic_ops/libatomic_ops.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libatomic_ops +# +################################################################################ + +LIBATOMIC_OPS_VERSION = libatomic_ops-7_4_2 +LIBATOMIC_OPS_SITE = $(call github,ivmai,libatomic_ops,$(LIBATOMIC_OPS_VERSION)) +LIBATOMIC_OPS_AUTORECONF = YES + +# From doc/LICENSING.txt: "Our intent is to make it easy to use +# libatomic_ops, in both free and proprietary software. Hence most +# code that we expect to be linked into a client application is +# covered by an MIT-style license. A few library routines are covered +# by the GNU General Public License. These are put into a separate +# library, libatomic_ops_gpl.a." +LIBATOMIC_OPS_LICENSE = MIT (main library) / GPLv2+ (gpl extension) +LIBATOMIC_OPS_LICENSE_FILES = doc/LICENSING.txt COPYING + +LIBATOMIC_OPS_INSTALL_STAGING = YES + +ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y) +LIBATOMIC_OPS_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -DAO_NO_SPARC_V9" +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libbluray/Config.in b/package/libbluray/Config.in new file mode 100644 index 0000000000..357a562d9c --- /dev/null +++ b/package/libbluray/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBBLURAY + bool "libbluray" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + libbluray is a client library for accessing bluray disks. + + http://www.videolan.org/developers/libbluray.html + +comment "libbluray needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_STATIC_LIBS diff --git a/package/libbluray/libbluray.hash b/package/libbluray/libbluray.hash new file mode 100644 index 0000000000..9acd89d2fd --- /dev/null +++ b/package/libbluray/libbluray.hash @@ -0,0 +1,2 @@ +# From http://get.videolan.org/libbluray/0.9.2/libbluray-0.9.2.tar.bz2.sha512 +sha512 f7fda2ef4c0ec70eb9a38aed0e76d21d8784410cb13713e7ee66ecd23a1cc58325977b046d40c526554a4a4e4cf96706a233e15451bf34892aff201b47e25aef libbluray-0.9.2.tar.bz2 diff --git a/package/libbluray/libbluray.mk b/package/libbluray/libbluray.mk new file mode 100644 index 0000000000..2cc27f1084 --- /dev/null +++ b/package/libbluray/libbluray.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# libbluray +# +################################################################################ + +LIBBLURAY_VERSION = 0.9.2 +LIBBLURAY_SITE = http://get.videolan.org/libbluray/$(LIBBLURAY_VERSION) +LIBBLURAY_SOURCE = libbluray-$(LIBBLURAY_VERSION).tar.bz2 +LIBBLURAY_INSTALL_STAGING = YES +LIBBLURAY_LICENSE = LGPLv2.1+ +LIBBLURAY_LICENSE_FILES = COPYING +LIBBLURAY_DEPENDENCIES = host-pkgconf + +LIBBLURAY_CONF_OPTS = --enable-udf --disable-bdjava + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +LIBBLURAY_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_PACKAGE_FREETYPE),y) +LIBBLURAY_DEPENDENCIES += freetype +LIBBLURAY_CONF_OPTS += --with-freetype +else +LIBBLURAY_CONF_OPTS += --without-freetype +endif + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +LIBBLURAY_DEPENDENCIES += fontconfig +LIBBLURAY_CONF_OPTS += --with-fontconfig +else +LIBBLURAY_CONF_OPTS += --without-fontconfig +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +LIBBLURAY_DEPENDENCIES += libxml2 +LIBBLURAY_CONF_OPTS += --with-libxml2 +else +LIBBLURAY_CONF_OPTS += --without-libxml2 +endif + +$(eval $(autotools-package)) diff --git a/package/libbroadvoice/Config.in b/package/libbroadvoice/Config.in new file mode 100644 index 0000000000..3301ba8ff8 --- /dev/null +++ b/package/libbroadvoice/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBBROADVOICE + bool "libbroadvoice" + # broken with gcc <= 4.8 on arc + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59049 + depends on !BR2_arc || BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + broadvoice - a library for the BroadVoice 16 and 32 speech + codecs + + https://www.broadcom.com/support/broadvoice diff --git a/package/libbroadvoice/libbroadvoice.mk b/package/libbroadvoice/libbroadvoice.mk new file mode 100644 index 0000000000..c18d3d292b --- /dev/null +++ b/package/libbroadvoice/libbroadvoice.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libbroadvoice +# +################################################################################ + +LIBBROADVOICE_VERSION = f65b0f50c8c767229fbf1758370880abc0d78564 +# we use the FreeSwitch fork because (quoting README): +# "This library is based on the Broadcom reference code, but has been +# heavily modified so that it builds into a proper library, with a clean +# usable interface, on a range of platforms." +LIBBROADVOICE_SITE = https://freeswitch.org/stash/scm/sd/libbroadvoice.git +LIBBROADVOICE_SITE_METHOD = git +LIBBROADVOICE_LICENSE = LGPLv2.1 +LIBBROADVOICE_LICENSE_FILES = COPYING +LIBBROADVOICE_AUTORECONF = YES +LIBBROADVOICE_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libbsd/0001-build-clock_gettime-might-need-librt.patch b/package/libbsd/0001-build-clock_gettime-might-need-librt.patch new file mode 100644 index 0000000000..ad6fcdbdf0 --- /dev/null +++ b/package/libbsd/0001-build-clock_gettime-might-need-librt.patch @@ -0,0 +1,49 @@ +From 188049ac7adcabfa66e5b6a674ac28a2f7da81f3 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Fri, 12 Feb 2016 11:06:58 -0300 +Subject: [PATCH] build: clock_gettime might need librt + +In older glibc versions (< 2.17) clock_gettime is in librt. +Add a check for this to avoid build breakage for programs/libraries that +use libbsd on such systems. + +Signed-off-by: Gustavo Zacarias +--- +Patch status: submitted upstream + + configure.ac | 5 +++++ + src/Makefile.am | 2 ++ + 2 files changed, 7 insertions(+) + +diff --git a/configure.ac b/configure.ac +index d334774..1862d19 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -44,6 +44,11 @@ AC_SUBST([TESTU01_LIBS]) + AM_CONDITIONAL([HAVE_LIBTESTU01], + [test "x$ac_cv_lib_testu01_unif01_CreateExternGenBits" = "xyes"]) + ++# In old glibc versions (< 2.17) clock_gettime() is in librt ++AC_SEARCH_LIBS([clock_gettime], [rt], ++ [LIB_CLOCK_GETTIME="-lrt"]) ++AC_SUBST([LIB_CLOCK_GETTIME]) ++ + # Checks for header files. + AC_CHECK_HEADERS([sys/ndir.h sys/dir.h ndir.h dirent.h]) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 4649937..6b705f0 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -52,6 +52,8 @@ hash/md5hl.c: $(srcdir)/hash/helper.c + libbsd_la_DEPENDENCIES = \ + $(libbsd_la_included_sources) \ + libbsd.map ++libbsd_la_LIBADD = \ ++ $(LIB_CLOCK_GETTIME) + libbsd_la_LDFLAGS = \ + -Wl,--version-script=$(srcdir)/libbsd.map \ + -version-number $(LIBBSD_ABI) +-- +2.4.10 + diff --git a/package/libbsd/Config.in b/package/libbsd/Config.in new file mode 100644 index 0000000000..dd2c19c183 --- /dev/null +++ b/package/libbsd/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS + bool + # libbsd does not support the MicroBlaze ELF machine type (see local-elf.h) + default y if !BR2_microblaze + +config BR2_PACKAGE_LIBBSD + bool "libbsd" + depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC + help + This library provides useful functions commonly found on BSD + systems, and lacking on others like GNU systems, thus making + it easier to port projects with strong BSD origins, without + needing to embed the same code over and over again on each + project. + + http://libbsd.freedesktop.org/ + +comment "libbsd needs an (e)glibc toolchain w/ threads" + depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/libbsd/libbsd.hash b/package/libbsd/libbsd.hash new file mode 100644 index 0000000000..f77c0aa4d6 --- /dev/null +++ b/package/libbsd/libbsd.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 b2f644cae94a6e2fe109449c20ad79a0f6ee4faec2205b07eefa0020565e250a libbsd-0.8.2.tar.xz diff --git a/package/libbsd/libbsd.mk b/package/libbsd/libbsd.mk new file mode 100644 index 0000000000..f750d752fe --- /dev/null +++ b/package/libbsd/libbsd.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libbsd +# +################################################################################ + +LIBBSD_VERSION = 0.8.2 +LIBBSD_SOURCE = libbsd-$(LIBBSD_VERSION).tar.xz +LIBBSD_SITE = http://libbsd.freedesktop.org/releases +LIBBSD_LICENSE = BSD-3c, MIT +LIBBSD_LICENSE_FILES = COPYING +LIBBSD_INSTALL_STAGING = YES +# For 0001-build-clock_gettime-might-need-librt.patch +LIBBSD_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/libcap-ng/0001-add-missing-include.patch b/package/libcap-ng/0001-add-missing-include.patch new file mode 100644 index 0000000000..c30c40dc18 --- /dev/null +++ b/package/libcap-ng/0001-add-missing-include.patch @@ -0,0 +1,22 @@ +Add missing include + +This include is needed to get the pid_t definition, at least with the +musl C library. + +Patch inspired from Alpine Linux patch +http://git.alpinelinux.org/cgit/aports/tree/main/libcap-ng/fix-includes.patch. + +Signed-off-by: Thomas Petazzoni + +Index: b/utils/proc-llist.h +=================================================================== +--- a/utils/proc-llist.h ++++ b/utils/proc-llist.h +@@ -26,6 +26,7 @@ + + #include "config.h" + ++#include + + /* This is the node of the linked list. Any data elements that are per + * record goes here. */ diff --git a/package/libcap-ng/Config.in b/package/libcap-ng/Config.in new file mode 100644 index 0000000000..d1663cdefc --- /dev/null +++ b/package/libcap-ng/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBCAP_NG + bool "libcap-ng" + help + The libcap-ng library is intended to make programming with + posix capabilities much easier than the traditional libcap + library. It includes utilities that can analyse all currently + running applications and print out any capabilities and whether + or not it has an open ended bounding set. + + http://people.redhat.com/sgrubb/libcap-ng/ diff --git a/package/libcap-ng/libcap-ng.hash b/package/libcap-ng/libcap-ng.hash new file mode 100644 index 0000000000..ecea6e8841 --- /dev/null +++ b/package/libcap-ng/libcap-ng.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 615549ce39b333f6b78baee0c0b4ef18bc726c6bf1cca123dfd89dd963f6d06b libcap-ng-0.7.7.tar.gz diff --git a/package/libcap-ng/libcap-ng.mk b/package/libcap-ng/libcap-ng.mk new file mode 100644 index 0000000000..d78f5dc660 --- /dev/null +++ b/package/libcap-ng/libcap-ng.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libcap-ng +# +################################################################################ + +LIBCAP_NG_VERSION = 0.7.7 +LIBCAP_NG_SITE = http://people.redhat.com/sgrubb/libcap-ng +LIBCAP_NG_LICENSE = GPLv2+ LGPLv2.1+ +LIBCAP_NG_LICENSE_FILES = COPYING COPYING.LIB +LIBCAP_NG_INSTALL_STAGING = YES + +LIBCAP_NG_CONF_ENV = ac_cv_prog_swig_found=no +LIBCAP_NG_CONF_OPTS = --without-python + +$(eval $(autotools-package)) diff --git a/package/libcap/0001-build-system-fixes-for-cross-compilation.patch b/package/libcap/0001-build-system-fixes-for-cross-compilation.patch new file mode 100644 index 0000000000..de2409085e --- /dev/null +++ b/package/libcap/0001-build-system-fixes-for-cross-compilation.patch @@ -0,0 +1,53 @@ +From d8d70559a279706c206761dfaf665d2197934123 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Sun, 6 Mar 2016 22:52:02 +0100 +Subject: [PATCH] build-system: fixes for cross-compilation + +Avoid the libcap buildsys forcing CC/CFLAGS/LDFLAGS/AR/RANLIB + +Signed-off-by: Gustavo Zacarias +[yann.morin.1998@free.fr: dont chmod +x the shared lib] +Signed-off-by: "Yann E. MORIN" + +diff --git a/Make.Rules b/Make.Rules +index 8347b26..8a07a3f 100644 +--- a/Make.Rules ++++ b/Make.Rules +@@ -48,26 +48,26 @@ MINOR=25 + KERNEL_HEADERS := $(topdir)/libcap/include/uapi + IPATH += -fPIC -I$(KERNEL_HEADERS) -I$(topdir)/libcap/include + +-CC := gcc +-CFLAGS := -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 +-BUILD_CC := $(CC) +-BUILD_CFLAGS := $(CFLAGS) $(IPATH) +-AR := ar +-RANLIB := ranlib ++CC ?= gcc ++CFLAGS ?= -O2 -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ++BUILD_CC ?= $(CC) ++BUILD_CFLAGS ?= $(CFLAGS) $(IPATH) ++AR ?= ar ++RANLIB ?= ranlib + DEBUG = -g #-DDEBUG + WARNINGS=-Wall -Wwrite-strings \ + -Wpointer-arith -Wcast-qual -Wcast-align \ + -Wstrict-prototypes -Wmissing-prototypes \ + -Wnested-externs -Winline -Wshadow + LD=$(CC) -Wl,-x -shared +-LDFLAGS := #-g ++LDFLAGS ?= #-g + BUILD_GPERF := $(shell which gperf >/dev/null 2>/dev/null && echo yes) + + SYSTEM_HEADERS = /usr/include + INCS=$(topdir)/libcap/include/sys/capability.h + LDFLAGS += -L$(topdir)/libcap + CFLAGS += -Dlinux $(WARNINGS) $(DEBUG) +-PAM_CAP := $(shell if [ -f /usr/include/security/pam_modules.h ]; then echo yes ; else echo no ; fi) ++PAM_CAP = no + INDENT := $(shell if [ -n "$$(which indent 2>/dev/null)" ]; then echo "| indent -kr" ; fi) + DYNAMIC := $(shell if [ ! -d "$(topdir)/.git" ]; then echo yes; fi) + +-- +1.9.1 + diff --git a/package/libcap/0002-libcap-split-install-into-install-shared-install-sta.patch b/package/libcap/0002-libcap-split-install-into-install-shared-install-sta.patch new file mode 100644 index 0000000000..a8579b7660 --- /dev/null +++ b/package/libcap/0002-libcap-split-install-into-install-shared-install-sta.patch @@ -0,0 +1,48 @@ +From af21635665ab568f3333ff9fe8b474f4950e5acb Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 6 Mar 2016 22:53:24 +0100 +Subject: [PATCH] libcap: split install into install-shared/install-static + +In order to support static only builds, split the install target into +install-shared and install-static targets. + +Signed-off-by: Thomas Petazzoni +[yann.morin.1998@free.fr: install the .pc file in the common rule] +Signed-off-by: "Yann E. MORIN" + +diff --git a/libcap/Makefile b/libcap/Makefile +index d189777..44ddb27 100644 +--- a/libcap/Makefile ++++ b/libcap/Makefile +@@ -62,19 +62,25 @@ $(MINLIBNAME): $(OBJS) + cap_text.o: cap_text.c $(USE_GPERF_OUTPUT) $(INCLS) + $(CC) $(CFLAGS) $(IPATH) $(INCLUDE_GPERF_OUTPUT) -c $< -o $@ + +-install: all ++install: install-shared install-static ++ ++install-common: + mkdir -p -m 0755 $(FAKEROOT)$(INCDIR)/sys + install -m 0644 include/sys/capability.h $(FAKEROOT)$(INCDIR)/sys ++ mkdir -p -m 0755 $(FAKEROOT)$(PKGCONFIGDIR) ++ install -m 0644 libcap.pc $(FAKEROOT)$(PKGCONFIGDIR)/libcap.pc ++ ++install-static: $(STALIBNAME) install-common + mkdir -p -m 0755 $(FAKEROOT)$(LIBDIR) + install -m 0644 $(STALIBNAME) $(FAKEROOT)$(LIBDIR)/$(STALIBNAME) ++ ++install-shared: $(MINLIBNAME) install-common + install -m 0644 $(MINLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MINLIBNAME) + ln -sf $(MINLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MAJLIBNAME) + ln -sf $(MAJLIBNAME) $(FAKEROOT)$(LIBDIR)/$(LIBNAME) + ifeq ($(FAKEROOT),) + -/sbin/ldconfig + endif +- mkdir -p -m 0755 $(FAKEROOT)$(PKGCONFIGDIR) +- install -m 0644 libcap.pc $(FAKEROOT)$(PKGCONFIGDIR)/libcap.pc + + clean: + $(LOCALCLEAN) +-- +1.9.1 + diff --git a/package/libcap/0003-libcap-cap_file.c-fix-build-with-old-kernel-headers.patch b/package/libcap/0003-libcap-cap_file.c-fix-build-with-old-kernel-headers.patch new file mode 100644 index 0000000000..02cc228b1d --- /dev/null +++ b/package/libcap/0003-libcap-cap_file.c-fix-build-with-old-kernel-headers.patch @@ -0,0 +1,51 @@ +From ace694e9574eb38e07cfe0db235434eb40003f47 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 14 Mar 2016 22:39:15 +0100 +Subject: [PATCH] libcap/cap_file.c: fix build with old kernel headers + +Signed-off-by: Thomas Petazzoni +--- + libcap/cap_file.c | 27 +++++++++++++++++++++++++++ + 1 file changed, 27 insertions(+) + +diff --git a/libcap/cap_file.c b/libcap/cap_file.c +index 40756ea..e3d54dd 100644 +--- a/libcap/cap_file.c ++++ b/libcap/cap_file.c +@@ -23,6 +23,33 @@ extern int fsetxattr(int, const char *, const void *, size_t, int); + extern int removexattr(const char *, const char *); + extern int fremovexattr(int, const char *); + ++ ++/* ++ * Old kernels (before 2.6.36) were defining XATTR_NAME_CAPS in ++ * , but using XATTR_SECURITY_PREFIX and ++ * XATTR_CAPS_SUFFIX which were defined in the kernel-only part of ++ * . ++ * ++ * In kernel 2.6.36 (commit af4f136056c984b0aa67feed7d3170b958370b2f), ++ * the XATTR_NAME_CAPS definition was moved to the kernel-only part of ++ * . It's only in kernel 3.0 (commit ++ * 1dbe39424a43e56a6c9aed12661192af51dcdb9f) that was ++ * fixed to expose XATTR_NAME_CAPS and the related definitions to ++ * userspace. ++ * ++ * In order to cope with kernels < 3.0, we define here the appropriate ++ * values, which we assume haven't changed over history. ++ */ ++#ifndef XATTR_CAPS_SUFFIX ++#define XATTR_CAPS_SUFFIX "capability" ++#endif ++#ifndef XATTR_SECURITY_PREFIX ++#define XATTR_SECURITY_PREFIX "security." ++#endif ++#ifndef XATTR_NAME_CAPS ++#define XATTR_NAME_CAPS XATTR_SECURITY_PREFIX XATTR_CAPS_SUFFIX ++#endif ++ + #include "libcap.h" + + #ifdef VFS_CAP_U32 +-- +2.6.4 + diff --git a/package/libcap/Config.in b/package/libcap/Config.in new file mode 100644 index 0000000000..5b0c827191 --- /dev/null +++ b/package/libcap/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_LIBCAP + bool "libcap" + help + This library implements the user-space interfaces to the + POSIX 1003.1e capabilities available in Linux kernels. These + capabilities are a partitioning of the all powerful root + privilege into a set of distinct privileges. + + http://sites.google.com/site/fullycapable/ + +if BR2_PACKAGE_LIBCAP + +config BR2_PACKAGE_LIBCAP_TOOLS + bool "install tools" + depends on BR2_USE_MMU + help + Install setcap, getcap, getpcaps and capsh tools. + + For these tools to run properly, you should enable, in your + kernel configuration, extended file attributes/security labels + support for the file system type used on target system (e.g. + CONFIG_EXT2_FS_XATTR and CONFIG_EXT2_FS_SECURITY for ext2). + +endif diff --git a/package/libcap/libcap.hash b/package/libcap/libcap.hash new file mode 100644 index 0000000000..a1dcd62b3c --- /dev/null +++ b/package/libcap/libcap.hash @@ -0,0 +1,2 @@ +# https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/sha256sums.asc +sha256 693c8ac51e983ee678205571ef272439d83afe62dd8e424ea14ad9790bc35162 libcap-2.25.tar.xz diff --git a/package/libcap/libcap.mk b/package/libcap/libcap.mk new file mode 100644 index 0000000000..bcb5d8cedb --- /dev/null +++ b/package/libcap/libcap.mk @@ -0,0 +1,71 @@ +################################################################################ +# +# libcap +# +################################################################################ + +LIBCAP_VERSION = 2.25 +LIBCAP_SITE = https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2 +LIBCAP_SOURCE = libcap-$(LIBCAP_VERSION).tar.xz +LIBCAP_LICENSE = GPLv2 or BSD-3c +LIBCAP_LICENSE_FILES = License + +LIBCAP_DEPENDENCIES = host-libcap host-gperf +LIBCAP_INSTALL_STAGING = YES + +HOST_LIBCAP_DEPENDENCIES = host-gperf + +ifeq ($(BR2_STATIC_LIBS),y) +LIBCAP_MAKE_TARGET = libcap.a libcap.pc +LIBCAP_MAKE_INSTALL_TARGET = install-static +else +LIBCAP_MAKE_TARGET = all +LIBCAP_MAKE_INSTALL_TARGET = install +endif + +LIBCAP_MAKE_FLAGS = \ + BUILD_CC="$(HOSTCC)" \ + BUILD_CFLAGS="$(HOST_CFLAGS)" + +ifeq ($(BR2_PACKAGE_LIBCAP_TOOLS),y) +define LIBCAP_BUILD_TOOLS_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/progs \ + $(LIBCAP_MAKE_FLAGS) +endef + +define LIBCAP_INSTALL_TOOLS_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/progs \ + RAISE_SETFCAP=no prefix=/usr \ + DESTDIR=$(TARGET_DIR) $(LIBCAP_MAKE_FLAGS) install +endef +endif + +define LIBCAP_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/libcap \ + $(LIBCAP_MAKE_FLAGS) $(LIBCAP_MAKE_TARGET) + $(LIBCAP_BUILD_TOOLS_CMDS) +endef + +define LIBCAP_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libcap $(LIBCAP_MAKE_FLAGS) \ + DESTDIR=$(STAGING_DIR) prefix=/usr lib=lib $(LIBCAP_MAKE_INSTALL_TARGET) +endef + +define LIBCAP_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/libcap $(LIBCAP_MAKE_FLAGS) \ + DESTDIR=$(TARGET_DIR) prefix=/usr lib=lib $(LIBCAP_MAKE_INSTALL_TARGET) + $(LIBCAP_INSTALL_TOOLS_CMDS) +endef + +define HOST_LIBCAP_BUILD_CMDS + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D)\ + RAISE_SETFCAP=no +endef + +define HOST_LIBCAP_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) \ + RAISE_SETFCAP=no prefix=/usr lib=lib install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/libcdaudio/Config.in b/package/libcdaudio/Config.in new file mode 100644 index 0000000000..3eca607fc1 --- /dev/null +++ b/package/libcdaudio/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBCDAUDIO + bool "libcdaudio" + # binutils assertion failure + depends on !BR2_nios2 + help + libcdaudio is a library designed to provide functions to + control operation of a CD-ROM when playing audio CDs. It + also contains functions for CDDB and CD Index lookup. + + http://libcdaudio.sourceforge.net/ diff --git a/package/libcdaudio/libcdaudio.hash b/package/libcdaudio/libcdaudio.hash new file mode 100644 index 0000000000..f8e1112c59 --- /dev/null +++ b/package/libcdaudio/libcdaudio.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 5fdaf9af5ac4f75c0215d000b82b128fd054a582f81cc4f039a1e7fe69335ebb libcdaudio-0.99.12p2.tar.gz diff --git a/package/libcdaudio/libcdaudio.mk b/package/libcdaudio/libcdaudio.mk new file mode 100644 index 0000000000..bee1fe3d23 --- /dev/null +++ b/package/libcdaudio/libcdaudio.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libcdaudio +# +################################################################################ + +LIBCDAUDIO_VERSION = 0.99.12p2 +LIBCDAUDIO_SITE = http://downloads.sourceforge.net/project/libcdaudio/libcdaudio/$(LIBCDAUDIO_VERSION) +LIBCDAUDIO_INSTALL_STAGING = YES +LIBCDAUDIO_CONFIG_SCRIPTS = libcdaudio-config +LIBCDAUDIO_LICENSE = GPLv2+ +LIBCDAUDIO_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libcddb/Config.in b/package/libcddb/Config.in new file mode 100644 index 0000000000..f2bb827829 --- /dev/null +++ b/package/libcddb/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBCDDB + bool "libcddb" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Libcddb is a C library to access data on a CDDB server + (freedb.org). It allows you to: + * search the database for possible CD matches; + * retrieve detailed information about a specific CD; + * submit new CD entries to the database. + + http://libcddb.sourceforge.net/index.html + +if BR2_PACKAGE_LIBCDDB + +config BR2_PACKAGE_LIBCDDB_INSTALL_CDDB_QUERY + bool "install cddb_query" + help + cddb_query is an optionnal libcddb test program. + +endif diff --git a/package/libcddb/libcddb.hash b/package/libcddb/libcddb.hash new file mode 100644 index 0000000000..9e60683ea3 --- /dev/null +++ b/package/libcddb/libcddb.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 35ce0ee1741ea38def304ddfe84a958901413aa829698357f0bee5bb8f0a223b libcddb-1.3.2.tar.bz2 diff --git a/package/libcddb/libcddb.mk b/package/libcddb/libcddb.mk new file mode 100644 index 0000000000..96b265a4dd --- /dev/null +++ b/package/libcddb/libcddb.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# libcddb +# +################################################################################ + +LIBCDDB_VERSION = 1.3.2 +LIBCDDB_SOURCE = libcddb-$(LIBCDDB_VERSION).tar.bz2 +LIBCDDB_SITE = http://downloads.sourceforge.net/libcddb +LIBCDDB_LICENSE = LGPLv2+ +LIBCDDB_LICENSE_FILES = COPYING +LIBCDDB_INSTALL_STAGING = YES + +ifeq ($(BR2_ENABLE_LOCALE),) +LIBCDDB_DEPENDENCIES += libiconv +endif + +define LIBCDDB_REMOVE_CDDB_QUERY + rm -f $(TARGET_DIR)/usr/bin/cddb_query +endef + +ifeq ($(BR2_PACKAGE_LIBCDDB_INSTALL_CDDB_QUERY),) +LIBCDDB_POST_INSTALL_TARGET_HOOKS += LIBCDDB_REMOVE_CDDB_QUERY +endif + +$(eval $(autotools-package)) diff --git a/package/libcdio/Config.in b/package/libcdio/Config.in new file mode 100644 index 0000000000..fdc001ec40 --- /dev/null +++ b/package/libcdio/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBCDIO + bool "libcdio" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + The GNU Compact Disc Input and Control library. + + http://www.gnu.org/software/libcdio/ diff --git a/package/libcdio/libcdio.hash b/package/libcdio/libcdio.hash new file mode 100644 index 0000000000..cc87ffb9cb --- /dev/null +++ b/package/libcdio/libcdio.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking signature +sha256 4972cd22fd8d0e8bff922d35c7a645be0db0ab0e7b3dfaecc9cd8272429d6975 libcdio-0.93.tar.gz diff --git a/package/libcdio/libcdio.mk b/package/libcdio/libcdio.mk new file mode 100644 index 0000000000..03e6002079 --- /dev/null +++ b/package/libcdio/libcdio.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libcdio +# +################################################################################ + +LIBCDIO_VERSION = 0.93 +LIBCDIO_SITE = $(BR2_GNU_MIRROR)/libcdio +LIBCDIO_INSTALL_STAGING = YES +LIBCDIO_LICENSE = GPLv3+ +LIBCDIO_LICENSE_FILES = COPYING +LIBCDIO_CONF_OPTS = --disable-example-progs --disable-cddb + +ifeq ($(BR2_ENABLE_LOCALE),) +LIBCDIO_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_INSTALL_LIBSTDCPP),) +LIBCDIO_CONF_OPTS += --disable-cxx +endif + +ifeq ($(BR2_PACKAGE_NCURSES),y) +LIBCDIO_DEPENDENCIES += ncurses +else +LIBCDIO_CONF_OPTS += --without-cdda-player +endif + +$(eval $(autotools-package)) diff --git a/package/libcec/Config.in b/package/libcec/Config.in new file mode 100644 index 0000000000..2dddc53635 --- /dev/null +++ b/package/libcec/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_LIBCEC + bool "libcec" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 + select BR2_PACKAGE_LIBPLATFORM + help + libcec allows you in combination with the right hardware to + control your home theater devices with your TV remote + control utilizing existing HDMI cabling. + + http://libcec.pulse-eight.com + +comment "libcec needs a toolchain w/ C++, wchar, threads, dynamic library, gcc >= 4.7" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_USE_WCHAR || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || \ + BR2_STATIC_LIBS diff --git a/package/libcec/libcec.hash b/package/libcec/libcec.hash new file mode 100644 index 0000000000..377f343a22 --- /dev/null +++ b/package/libcec/libcec.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 0f29d5a2d155b507807ba896bc3b3e50a0ab56bf8f543a2bf5c2798c790292b5 libcec-2c675dac48387c48c7f43c5d2547ef0c4ef5c7dd.tar.gz diff --git a/package/libcec/libcec.mk b/package/libcec/libcec.mk new file mode 100644 index 0000000000..b762d88d71 --- /dev/null +++ b/package/libcec/libcec.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# libcec +# +################################################################################ + +LIBCEC_VERSION = 2c675dac48387c48c7f43c5d2547ef0c4ef5c7dd +LIBCEC_SITE = $(call github,Pulse-Eight,libcec,$(LIBCEC_VERSION)) +LIBCEC_LICENSE = GPLv2+ +LIBCEC_LICENSE_FILES = COPYING + +# Autoreconf required due to being a dev tarball and not a release tarball. +LIBCEC_AUTORECONF = YES +LIBCEC_INSTALL_STAGING = YES +LIBCEC_DEPENDENCIES = host-pkgconf libplatform + +ifeq ($(BR2_PACKAGE_LOCKDEV),y) +LIBCEC_DEPENDENCIES += lockdev +endif + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +LIBCEC_DEPENDENCIES += udev +endif + +ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y) +LIBCEC_DEPENDENCIES += host-swig $(if $(BR2_PACKAGE_PYTHON3),python3,python) +endif + +ifeq ($(BR2_PACKAGE_RPI_USERLAND),y) +LIBCEC_DEPENDENCIES += rpi-userland +LIBCEC_CONF_OPTS += \ + -DCMAKE_C_FLAGS="-lvcos -lvchiq_arm" \ + -DCMAKE_CXX_FLAGS="-I$(STAGING_DIR)/usr/include/interface/vmcs_host/linux \ + -I$(STAGING_DIR)/usr/include/interface/vcos/pthreads" +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +LIBCEC_DEPENDENCIES += xlib_libXrandr +endif + +$(eval $(cmake-package)) diff --git a/package/libcgi/0001-misc-fixes.patch b/package/libcgi/0001-misc-fixes.patch new file mode 100644 index 0000000000..b576178546 --- /dev/null +++ b/package/libcgi/0001-misc-fixes.patch @@ -0,0 +1,122 @@ +Index: b/src/cgi.c +=================================================================== +--- a/src/cgi.c ++++ b/src/cgi.c +@@ -336,7 +336,7 @@ + hextable['b'] = 11; + hextable['c'] = 12; + hextable['d'] = 13; +- hextable['e'] = 13; ++ hextable['e'] = 14; + hextable['f'] = 15; + hextable['A'] = 10; + hextable['B'] = 11; +Index: b/src/string.c +=================================================================== +--- a/src/string.c ++++ b/src/string.c +@@ -584,7 +584,7 @@ + + va_start(ptr, s); + +- va_copy(bkp, str); ++ va_copy(bkp, ptr); + len = strlen(s); + + while (*str) { +Index: b/Makefile.in +=================================================================== +--- a/Makefile.in ++++ b/Makefile.in +@@ -5,22 +5,32 @@ + prefix = @prefix@ + exec_prefix = @exec_prefix@ + +-SHAREDOPT = -shared ++SHAREDOPT = -shared -fPIC -Wl,-soname,libcgi.so.0 + LIBDIR = $(prefix)/lib +-INCDIR = $(prefix)/include ++INCDIR = $(prefix)/include/libcgi/ + MANDIR = $(prefix)/man/man3 + SHELL = /bin/sh + EXTRA_LIBS = + + INCS = -Isrc +-FLAGS = -Wall -fpic ++FLAGS = -Wall -D_REENTRANT + + OBJS = src/error.o src/cgi.o src/session.o src/base64.o src/md5.o \ + src/string.o src/general.o src/list.o src/cookie.o ++SHOBJS=$(OBJS:.o=.sh.o) + +-.c.o: $(CC) $(FLAGS) -c $< ++ALL_TARGETS = src/libcgi.a ++ifeq ($(STATIC),) ++ALL_TARGETS += src/libcgi.so ++endif + +-all: $(OBJS) src/libcgi.so ++%.o: %.c ++ $(CC) $(FLAGS) -c $*.c -o $@ ++ ++%.sh.o: %.c ++ $(CC) $(FLAGS) -fPIC -c $*.c -o $@ ++ ++all: $(ALL_TARGETS) + + @echo "" + @echo "" +@@ -48,14 +58,17 @@ + src/libcgi.a: $(OBJS) + $(AR) rc src/libcgi.a $(OBJS) + +-src/libcgi.so: src/libcgi.a +- $(CC) $(SHAREDOPT) -o src/libcgi.so $(OBJS) $(EXTRA_LIBS) ++src/libcgi.so: $(SHOBJS) ++ $(CC) $(SHAREDOPT) -o src/libcgi.so $(SHOBJS) $(EXTRA_LIBS) + + install: +- cp src/libcgi.a $(LIBDIR) +- cp src/libcgi.so $(LIBDIR) +- cp src/cgi.h $(INCDIR) +- cp src/session.h $(INCDIR) ++ cp src/libcgi.a $(DESTDIR)/$(LIBDIR) ++ifeq ($(STATIC),) ++ cp src/libcgi.so $(DESTDIR)/$(LIBDIR) ++endif ++ [ -d $(DESTDIR)/$(INCDIR) ] || mkdir -p $(DESTDIR)/$(INCDIR) ++ cp src/cgi.h $(DESTDIR)/$(INCDIR) ++ cp src/session.h $(DESTDIR)/$(INCDIR) + + + src/error.o: src/error.c src/error.h +@@ -69,8 +82,9 @@ + src/list.o: src/list.c + + clean: +- find src/ -name *.*o -exec rm -f {} \; ++ find src/ -name *.o -exec rm -f {} \; + find src/ -name *.a -exec rm -f {} \; ++ find src/ -name *.so -exec rm -f {} \; + + uninstall: clean + rm -f $(LIBDIR)/libcgi.* +@@ -78,11 +92,11 @@ + rm -f $(INCDIR)/session.h + rm -f $(MANDIR)/libcgi* + +-install_man: +- cp doc/man/man3/libcgi_base64.3 $(MANDIR) +- cp doc/man/man3/libcgi_cgi.3 $(MANDIR) +- cp doc/man/man3/libcgi_general.3 $(MANDIR) +- cp doc/man/man3/libcgi_string.3 $(MANDIR) +- cp doc/man/man3/libcgi_session.3 $(MANDIR) +- cp doc/man/man3/libcgi_cookie.3 $(MANDIR) ++#install_man: ++# cp doc/man/man3/libcgi_base64.3 $(MANDIR) ++# cp doc/man/man3/libcgi_cgi.3 $(MANDIR) ++# cp doc/man/man3/libcgi_general.3 $(MANDIR) ++# cp doc/man/man3/libcgi_string.3 $(MANDIR) ++# cp doc/man/man3/libcgi_session.3 $(MANDIR) ++# cp doc/man/man3/libcgi_cookie.3 $(MANDIR) + diff --git a/package/libcgi/Config.in b/package/libcgi/Config.in new file mode 100644 index 0000000000..430039e559 --- /dev/null +++ b/package/libcgi/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBCGI + bool "libcgi" + help + LibCGI is a library written from scratch to easily make + CGI applications in C. + + There are a lot of functions like string manipulation, + session and cookie support, GET and POST methods manipulation + etc..., to help you to quickly write powerful CGI programs. + + http://libcgi.sourceforge.net/ diff --git a/package/libcgi/libcgi.hash b/package/libcgi/libcgi.hash new file mode 100644 index 0000000000..6bd7c0c3d6 --- /dev/null +++ b/package/libcgi/libcgi.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 861df39cc0195d43419c4c3de8dff4f42478db66c9ba0b0c1e994c99400e130c libcgi-1.0.tar.gz diff --git a/package/libcgi/libcgi.mk b/package/libcgi/libcgi.mk new file mode 100644 index 0000000000..7cb3417382 --- /dev/null +++ b/package/libcgi/libcgi.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libcgi +# +################################################################################ + +LIBCGI_VERSION = 1.0 +LIBCGI_SITE = http://downloads.sourceforge.net/project/libcgi/libcgi/$(LIBCGI_VERSION) +LIBCGI_INSTALL_STAGING = YES +# use cross CC/AR rather than host +LIBCGI_MAKE_ENV = CC="$(TARGET_CC) $(TARGET_CFLAGS)" AR="$(TARGET_AR)" \ + $(if $(BR2_STATIC_LIBS),STATIC=1) +LIBCGI_LICENSE = LGPLv2.1+ + +$(eval $(autotools-package)) diff --git a/package/libcgicc/0001-disable-documentation-option.patch b/package/libcgicc/0001-disable-documentation-option.patch new file mode 100644 index 0000000000..a7b04a83a7 --- /dev/null +++ b/package/libcgicc/0001-disable-documentation-option.patch @@ -0,0 +1,50 @@ +Index: cgicc-3.2.9/Makefile.am +=================================================================== +--- cgicc-3.2.9.orig/Makefile.am 2010-02-25 16:34:06.000000000 +0100 ++++ cgicc-3.2.9/Makefile.am 2010-02-25 16:34:14.000000000 +0100 +@@ -8,9 +8,15 @@ + DEMO = + endif + ++if DOC ++DOCDIR = doc ++else ++DOC = ++endif ++ + ACLOCAL_AMFLAGS= + +-SUBDIRS = cgicc doc support $(DEMO) ++SUBDIRS = cgicc $(DOCDIR) support $(DEMO) + + CLEANFILES = *~ + +Index: cgicc-3.2.9/configure.ac +=================================================================== +--- cgicc-3.2.9.orig/configure.ac 2010-02-25 16:34:06.000000000 +0100 ++++ cgicc-3.2.9/configure.ac 2010-02-25 16:45:46.000000000 +0100 +@@ -17,9 +17,23 @@ + AC_PROG_CXX + AC_PROG_INSTALL + AC_PROG_LIBTOOL +-AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, /bin/echo) + + ++AC_ARG_ENABLE(doc, ++ [ --enable-doc build doc [[default=yes]]], ++ [case "${enableval}" in ++ yes) cgicc_doc=yes ;; ++ no) cgicc_doc=no ;; ++ *) AC_MSG_ERROR(bad value ${enableval} for --enable-doc) ;; ++ esac], cgicc_doc=yes) ++ ++if test "$cgicc_doc" = yes; then ++ AC_CHECK_PROG(DOXYGEN, doxygen, doxygen) ++ if test -z "$DOXYGEN" ; then ++ AC_MSG_ERROR([Doxygen is required to build the documentation]) ++ fi ++fi ++AM_CONDITIONAL(DOC, test "$cgicc_doc" = yes) + + dnl Determine host system type + diff --git a/package/libcgicc/Config.in b/package/libcgicc/Config.in new file mode 100644 index 0000000000..e1f6904b29 --- /dev/null +++ b/package/libcgicc/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBCGICC + bool "libcgicc" + depends on BR2_INSTALL_LIBSTDCPP + help + GNU cgicc is a C++ class library that greatly simplifies + the creation of CGI applications for the World Wide Web. + + http://www.cgicc.com + +comment "libcgicc needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libcgicc/libcgicc.hash b/package/libcgicc/libcgicc.hash new file mode 100644 index 0000000000..313478d468 --- /dev/null +++ b/package/libcgicc/libcgicc.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 d94a2b5dec6d5eb6f05f114e2c7a64aeb7da71708ebe7b5f32bd6ebde1dfbc96 cgicc-3.2.16.tar.bz2 diff --git a/package/libcgicc/libcgicc.mk b/package/libcgicc/libcgicc.mk new file mode 100644 index 0000000000..1c36d42aa7 --- /dev/null +++ b/package/libcgicc/libcgicc.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libcgicc +# +################################################################################ + +LIBCGICC_VERSION = 3.2.16 +LIBCGICC_SITE = $(BR2_GNU_MIRROR)/cgicc +LIBCGICC_SOURCE = cgicc-$(LIBCGICC_VERSION).tar.bz2 +LIBCGICC_LICENSE = LGPLv3+ (library), GFDL1.2+ (docs) +LIBCGICC_LICENSE_FILES = COPYING.LIB COPYING.DOC +LIBCGICC_INSTALL_STAGING = YES +LIBCGICC_AUTORECONF = YES +LIBCGICC_CONFIG_SCRIPTS = cgicc-config +LIBCGICC_CONF_OPTS = \ + --disable-demos \ + --disable-doc + +$(eval $(autotools-package)) diff --git a/package/libcgroup/Config.in b/package/libcgroup/Config.in new file mode 100644 index 0000000000..d02c2829ad --- /dev/null +++ b/package/libcgroup/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBCGROUP + bool "libcgroup" + depends on BR2_INSTALL_LIBSTDCPP + # libcgroup uses which is not included by default in uClibc + depends on BR2_TOOLCHAIN_USES_GLIBC + help + libcgroup is a library that abstracts the control + group file system in Linux. + + http://libcg.sourceforge.net/ + +if BR2_PACKAGE_LIBCGROUP + +config BR2_PACKAGE_LIBCGROUP_TOOLS + bool "install tools" + help + Include a set of command-line tools for managing cgroups. + +endif + +comment "libcgroup needs an (e)glibc toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/libcgroup/libcgroup.hash b/package/libcgroup/libcgroup.hash new file mode 100644 index 0000000000..c671791771 --- /dev/null +++ b/package/libcgroup/libcgroup.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e4e38bdc7ef70645ce33740ddcca051248d56b53283c0dc6d404e17706f6fb51 libcgroup-0.41.tar.bz2 diff --git a/package/libcgroup/libcgroup.mk b/package/libcgroup/libcgroup.mk new file mode 100644 index 0000000000..a4c3084c6c --- /dev/null +++ b/package/libcgroup/libcgroup.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# libcgroup +# +################################################################################ + +LIBCGROUP_VERSION = 0.41 +LIBCGROUP_SOURCE = libcgroup-$(LIBCGROUP_VERSION).tar.bz2 +LIBCGROUP_SITE = http://downloads.sourceforge.net/project/libcg/libcgroup/v$(LIBCGROUP_VERSION) +LIBCGROUP_LICENSE = LGPLv2.1 +LIBCGROUP_LICENSE_FILES = COPYING +LIBCGROUP_DEPENDENCIES = host-bison host-flex +LIBCGROUP_INSTALL_STAGING = YES + +# Undefining _FILE_OFFSET_BITS here because of a "bug" with glibc fts.h +# large file support. See https://bugzilla.redhat.com/show_bug.cgi?id=574992 +# for more information. +LIBCGROUP_CONF_ENV = \ + CXXFLAGS="$(TARGET_CXXFLAGS) -U_FILE_OFFSET_BITS" \ + CFLAGS="$(TARGET_CFLAGS) -U_FILE_OFFSET_BITS" + +LIBCGROUP_CONF_OPTS = \ + --disable-daemon \ + --disable-initscript-install + +ifeq ($(BR2_PACKAGE_LIBCGROUP_TOOLS),y) +LIBCGROUP_CONF_OPTS += --enable-tools +else +LIBCGROUP_CONF_OPTS += --disable-tools +endif + +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +LIBCGROUP_DEPENDENCIES += linux-pam +LIBCGROUP_CONF_OPTS += --enable-pam +else +LIBCGROUP_CONF_OPTS += --disable-pam +endif + +$(eval $(autotools-package)) diff --git a/package/libcli/Config.in b/package/libcli/Config.in new file mode 100644 index 0000000000..e20afb0e02 --- /dev/null +++ b/package/libcli/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBCLI + bool "libcli" + help + Libcli provides a shared library for including a Cisco-like + command- line interface into other software. It's a telnet + interface which supports command-line editing, history, + authentication and callbacks for a user-definable function + tree. + + http://sites.dparrish.com/libcli + diff --git a/package/libcli/libcli.mk b/package/libcli/libcli.mk new file mode 100644 index 0000000000..17eed79884 --- /dev/null +++ b/package/libcli/libcli.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# libcli +# +################################################################################ + +LIBCLI_VERSION = c63c9d35144939c8b4fa3c5394aed2e29ff517b0 +LIBCLI_SITE = $(call github,dparrish,libcli,$(LIBCLI_VERSION)) +LIBCLI_LICENSE = LGPLv2.1 +LIBCLI_LICENSE_FILES = COPYING +LIBCLI_INSTALL_STAGING = YES + +# We will pass optimisation level via CFLAGS so remove libcli default +LIBCLI_MAKE_ARGS += OPTIM= + +# We can't run the test harness +LIBCLI_MAKE_ARGS += TESTS= + +# Disable the static library for shared only build +ifeq ($(BR2_SHARED_LIBS),y) +LIBCLI_MAKE_ARGS += STATIC_LIB= +endif + +# Disable the shared library for static only build +ifeq ($(BR2_STATIC_LIBS),y) +LIBCLI_MAKE_ARGS += DYNAMIC_LIB= +endif + +define LIBCLI_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + $(LIBCLI_MAKE_ARGS) +endef + +define LIBCLI_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + $(LIBCLI_MAKE_ARGS) DESTDIR=$(STAGING_DIR) PREFIX=/usr install +endef + +define LIBCLI_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + $(LIBCLI_MAKE_ARGS) DESTDIR=$(TARGET_DIR) PREFIX=/usr install +endef + +$(eval $(generic-package)) diff --git a/package/libcodec2/0001-Use-the-native-compiler-to-build-generate_cookbook.patch b/package/libcodec2/0001-Use-the-native-compiler-to-build-generate_cookbook.patch new file mode 100644 index 0000000000..ede31dbc2a --- /dev/null +++ b/package/libcodec2/0001-Use-the-native-compiler-to-build-generate_cookbook.patch @@ -0,0 +1,153 @@ +From c7c769990bca3049bc389dcbd9985adaec134946 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 29 Aug 2015 11:59:18 +0200 +Subject: [PATCH] Use the native compiler to build generate_cookbook + +The generate_cookbook binary needs to be executed at build time. When +cross-compiling, this means that it should be built with the native +compiler rather than the cross-compiler. + +To achieve this, this commit imports the AX_CC_FOR_BUILD autoconf +macro from the GNU Autoconf Archive project, and adjusts +src/Makefile.am to use CC_FOR_BUILD to build generate_cookbook. + +Based on initial work by Bernd Kuhls. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 1 + + configure.ac | 2 ++ + m4/ax_cc_for_build.m4 | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++ + src/Makefile.am | 3 ++ + 4 files changed, 83 insertions(+) + create mode 100644 m4/ax_cc_for_build.m4 + +diff --git a/Makefile.am b/Makefile.am +index 4468bca..bd3ce01 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,6 +2,7 @@ AM_CFLAGS = -Isrc -fPIC -Wall -O3 -lm + AUTOMAKE_OPTIONS = gnu + NAME = codec2 + AM_CPPFLAGS = $(AM_CFLAGS) ++ACLOCAL_AMFLAGS = -I m4 + + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = codec2.pc +diff --git a/configure.ac b/configure.ac +index 493c517..7520af6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4,10 +4,12 @@ + AC_PREREQ([2.59]) + AC_INIT(codec2, 0.2, david@rowetel.com) + AM_INIT_AUTOMAKE ++AC_CONFIG_MACRO_DIR([m4]) + + # Checks for programs. + AC_PROG_CC + AC_PROG_LIBTOOL ++AX_CC_FOR_BUILD + + # Checks for libraries. + # FIXME: Replace `main' with a function in `-lm': +diff --git a/m4/ax_cc_for_build.m4 b/m4/ax_cc_for_build.m4 +new file mode 100644 +index 0000000..c880fd0 +--- /dev/null ++++ b/m4/ax_cc_for_build.m4 +@@ -0,0 +1,77 @@ ++# =========================================================================== ++# http://www.gnu.org/software/autoconf-archive/ax_cc_for_build.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_CC_FOR_BUILD ++# ++# DESCRIPTION ++# ++# Find a build-time compiler. Sets CC_FOR_BUILD and EXEEXT_FOR_BUILD. ++# ++# LICENSE ++# ++# Copyright (c) 2010 Reuben Thomas ++# Copyright (c) 1999 Richard Henderson ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see . ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 2 ++ ++dnl Get a default for CC_FOR_BUILD to put into Makefile. ++AC_DEFUN([AX_CC_FOR_BUILD], ++[# Put a plausible default for CC_FOR_BUILD in Makefile. ++if test -z "$CC_FOR_BUILD"; then ++ if test "x$cross_compiling" = "xno"; then ++ CC_FOR_BUILD='$(CC)' ++ else ++ CC_FOR_BUILD=gcc ++ fi ++fi ++AC_SUBST(CC_FOR_BUILD) ++# Also set EXEEXT_FOR_BUILD. ++if test "x$cross_compiling" = "xno"; then ++ EXEEXT_FOR_BUILD='$(EXEEXT)' ++else ++ AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext, ++ [rm -f conftest* ++ echo 'int main () { return 0; }' > conftest.c ++ bfd_cv_build_exeext= ++ ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5 ++ for file in conftest.*; do ++ case $file in ++ *.c | *.o | *.obj | *.ilk | *.pdb) ;; ++ *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;; ++ esac ++ done ++ rm -f conftest* ++ test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no]) ++ EXEEXT_FOR_BUILD="" ++ test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext} ++fi ++AC_SUBST(EXEEXT_FOR_BUILD)])dnl +diff --git a/src/Makefile.am b/src/Makefile.am +index 1153b3c..719088d 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -77,6 +77,9 @@ CODEBOOKSGE= \ + + noinst_PROGRAMS = generate_codebook genlspdtcb + ++generate_codebook$(EXEEXT_FOR_BUILD): generate_codebook.c ++ $(CC_FOR_BUILD) -o $@ generate_codebook.c -lm ++ + codebook.$(OBJEXT): codebook.c + codebookd.$(OBJEXT): codebookd.c + codebookdt.$(OBJEXT): codebookdt.c +-- +2.5.0 + diff --git a/package/libcodec2/0002-Add-option-to-disable-unit-tests.patch b/package/libcodec2/0002-Add-option-to-disable-unit-tests.patch new file mode 100644 index 0000000000..7822702092 --- /dev/null +++ b/package/libcodec2/0002-Add-option-to-disable-unit-tests.patch @@ -0,0 +1,50 @@ +From 19db6244200b870317382294f14b7d561d55a64e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 29 Aug 2015 12:05:53 +0200 +Subject: [PATCH] Add option to disable unit tests + +The unittests require C++, while the rest of the library does not, so +this commit implements a --{enable,disable}-unittests option to +selectively enable the build of the unit tests. When not provided, the +option defaults to yes so that the existing behavior is preserved. + +Based on initial work by Bernd Kuhls. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 6 +++++- + configure.ac | 5 +++++ + 2 files changed, 10 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index bd3ce01..1da250b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -95,4 +95,8 @@ src/codebook/lsp8.txt \ + src/codebook/lsp9.txt \ + src/codebook/lsp10.txt + +-SUBDIRS = src unittest ++SUBDIRS = src ++ ++if UNITTESTS ++SUBDIRS += unittest ++endif +diff --git a/configure.ac b/configure.ac +index 7520af6..55b7215 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -24,5 +24,10 @@ AC_CHECK_HEADERS([stdlib.h string.h]) + AC_FUNC_MALLOC + AC_CHECK_FUNCS([floor pow sqrt]) + ++AC_ARG_ENABLE([unittests], ++ AS_HELP_STRING([--disable-unittests], [Disable unittests]), ++ [], [enable_unittests=yes]) ++AM_CONDITIONAL([UNITTESTS], [test "${enable_unittests}" = "yes"]) ++ + AC_CONFIG_FILES([Makefile src/Makefile unittest/Makefile codec2.pc]) + AC_OUTPUT +-- +2.5.0 + diff --git a/package/libcodec2/Config.in b/package/libcodec2/Config.in new file mode 100644 index 0000000000..b27aab1c70 --- /dev/null +++ b/package/libcodec2/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBCODEC2 + bool "libcodec2" + help + Codec2 is an open source low bit rate speech codec designed + for communications quality speech between 1200 and 3200 bit/s. + + http://rowetel.com/codec2.html diff --git a/package/libcodec2/libcodec2.mk b/package/libcodec2/libcodec2.mk new file mode 100644 index 0000000000..73f98ca2fe --- /dev/null +++ b/package/libcodec2/libcodec2.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libcodec2 +# +################################################################################ + +LIBCODEC2_VERSION = 392a55b4f3f8ad30d845ac6ae35e8b27343bb944 +LIBCODEC2_SITE = https://freeswitch.org/stash/scm/sd/libcodec2.git +LIBCODEC2_SITE_METHOD = git +LIBCODEC2_LICENSE = LGPLv2.1 +LIBCODEC2_LICENSE_FILES = COPYING +LIBCODEC2_AUTORECONF = YES +LIBCODEC2_INSTALL_STAGING = YES +LIBCODEC2_CONF_OPTS = --disable-unittests + +$(eval $(autotools-package)) diff --git a/package/libcofi/Config.in b/package/libcofi/Config.in new file mode 100644 index 0000000000..e9914d6e0f --- /dev/null +++ b/package/libcofi/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBCOFI + bool "libcofi" + depends on BR2_arm + help + A replacement for memcpy and memset functionality for the + Raspberry Pi with the intention of gaining greater performance. + + https://github.com/simonjhall/copies-and-fills diff --git a/package/libcofi/libcofi.mk b/package/libcofi/libcofi.mk new file mode 100644 index 0000000000..90daff2ae8 --- /dev/null +++ b/package/libcofi/libcofi.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libcofi +# +################################################################################ + +LIBCOFI_VERSION = 7313fbe12b0593034d0a1b606bf33c7cf4ababce +LIBCOFI_SITE = $(call github,simonjhall,copies-and-fills,$(LIBCOFI_VERSION)) +LIBCOFI_LICENSE = LGPLv2.1 +LIBCOFI_LICENSE_FILES = README.md + +define LIBCOFI_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define LIBCOFI_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/libcofi_rpi.so $(TARGET_DIR)/usr/lib/libcofi_rpi.so +endef + +$(eval $(generic-package)) diff --git a/package/libconfig/Config.in b/package/libconfig/Config.in new file mode 100644 index 0000000000..75dacab36d --- /dev/null +++ b/package/libconfig/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBCONFIG + bool "libconfig" + help + Libconfig is a simple library for manipulating structured + configuration files. The file format is more compact and more + readable than XML. And unlike XML, it is type-aware, so it is + not necessary to do string parsing in application code. + + http://www.hyperrealm.com/libconfig/ diff --git a/package/libconfig/libconfig.hash b/package/libconfig/libconfig.hash new file mode 100644 index 0000000000..30110cbbd0 --- /dev/null +++ b/package/libconfig/libconfig.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e31daa390d8e4461c8830512fe2e13ba1a3d6a02a2305a02429eec61e68703f6 libconfig-1.5.tar.gz diff --git a/package/libconfig/libconfig.mk b/package/libconfig/libconfig.mk new file mode 100644 index 0000000000..f11937c4e2 --- /dev/null +++ b/package/libconfig/libconfig.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libconfig +# +################################################################################ + +LIBCONFIG_VERSION = 1.5 +LIBCONFIG_SITE = http://www.hyperrealm.com/libconfig +LIBCONFIG_LICENSE = LGPLv2.1+ +LIBCONFIG_LICENSE_FILES = COPYING.LIB +LIBCONFIG_INSTALL_STAGING = YES +LIBCONFIG_CONF_OPTS = --disable-examples + +ifneq ($(BR2_INSTALL_LIBSTDCPP),y) +LIBCONFIG_CONF_OPTS += --disable-cxx +endif + +$(eval $(autotools-package)) diff --git a/package/libconfuse/Config.in b/package/libconfuse/Config.in new file mode 100644 index 0000000000..be18cbb073 --- /dev/null +++ b/package/libconfuse/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBCONFUSE + bool "libconfuse" + help + LibConfuse is a configuration file parser library written in + C. It supports sections and (lists of) values (strings, + integers, floats, booleans or other sections), as well as some + other features (such as single/double-quoted strings, + environment variable expansion, functions and nested include + statements. + + http://savannah.nongnu.org/download/confuse/ diff --git a/package/libconfuse/libconfuse.hash b/package/libconfuse/libconfuse.hash new file mode 100644 index 0000000000..3e221d2a9c --- /dev/null +++ b/package/libconfuse/libconfuse.hash @@ -0,0 +1,2 @@ +# From https://github.com/martinh/libconfuse/releases/download/v2.8/confuse-2.8.tar.xz.md5 +md5 cb552c5737a72ef164733f0118971eb0 confuse-2.8.tar.xz diff --git a/package/libconfuse/libconfuse.mk b/package/libconfuse/libconfuse.mk new file mode 100644 index 0000000000..1a01896ebc --- /dev/null +++ b/package/libconfuse/libconfuse.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libconfuse +# +################################################################################ + +LIBCONFUSE_VERSION = 2.8 +LIBCONFUSE_SOURCE = confuse-$(LIBCONFUSE_VERSION).tar.xz +LIBCONFUSE_SITE = https://github.com/martinh/libconfuse/releases/download/v$(LIBCONFUSE_VERSION) +LIBCONFUSE_INSTALL_STAGING = YES +LIBCONFUSE_CONF_OPTS = --disable-rpath +LIBCONFUSE_DEPENDENCIES = host-flex +LIBCONFUSE_LICENSE = ISC +LIBCONFUSE_LICENSE_FILES = LICENSE + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libcroco/Config.in b/package/libcroco/Config.in new file mode 100644 index 0000000000..5baf83dfb9 --- /dev/null +++ b/package/libcroco/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBCROCO + bool "libcroco" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + help + Libcroco is a standalone css2 parsing and manipulation + library. The parser provides a low level event driven SAC + like api and a css object model like api. + + Libcroco provides a CSS2 selection engine and an + experimental xml/css rendering engine. + + https://github.com/GNOME/libcroco + +comment "libcroco needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libcroco/libcroco.hash b/package/libcroco/libcroco.hash new file mode 100644 index 0000000000..edf0b1f388 --- /dev/null +++ b/package/libcroco/libcroco.hash @@ -0,0 +1,2 @@ +# From http://ftp.acc.umu.se/pub/gnome/sources/libcroco/0.6/libcroco-0.6.11.sha256sum +sha256 132b528a948586b0dfa05d7e9e059901bca5a3be675b6071a90a90b81ae5a056 libcroco-0.6.11.tar.xz diff --git a/package/libcroco/libcroco.mk b/package/libcroco/libcroco.mk new file mode 100644 index 0000000000..c4cb6762d8 --- /dev/null +++ b/package/libcroco/libcroco.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libcroco +# +################################################################################ + +LIBCROCO_VERSION_MAJOR = 0.6 +LIBCROCO_VERSION = $(LIBCROCO_VERSION_MAJOR).11 +LIBCROCO_SITE = http://ftp.gnome.org/pub/gnome/sources/libcroco/$(LIBCROCO_VERSION_MAJOR) +LIBCROCO_SOURCE = libcroco-$(LIBCROCO_VERSION).tar.xz +LIBCROCO_INSTALL_STAGING = YES +LIBCROCO_DEPENDENCIES = host-pkgconf libglib2 libxml2 +LIBCROCO_CONFIG_SCRIPTS = croco-$(LIBCROCO_VERSION_MAJOR)-config +# NEWS states that it's only LGPL +# Source code says v2.1+ even though COPYING.LIB is v2 +LIBCROCO_LICENSE = LGPLv2.1+ +LIBCROCO_LICENSE_FILES = COPYING.LIB + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libcrossguid/Config.in b/package/libcrossguid/Config.in new file mode 100644 index 0000000000..61ca781aef --- /dev/null +++ b/package/libcrossguid/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBCROSSGUID + bool "libcrossguid" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 + depends on BR2_USE_WCHAR # util-linux + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Lightweight cross platform C++ GUID/UUID library + + https://github.com/graeme-hill/crossguid + +comment "libcrossguid needs a toolchain w/ C++, wchar, gcc >= 4.7" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 diff --git a/package/libcrossguid/libcrossguid.mk b/package/libcrossguid/libcrossguid.mk new file mode 100644 index 0000000000..46d9a9dcc6 --- /dev/null +++ b/package/libcrossguid/libcrossguid.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libcrossguid +# +################################################################################ + +LIBCROSSGUID_VERSION = 8f399e8bd4252be9952f3dfa8199924cc8487ca4 +LIBCROSSGUID_SITE = $(call github,graeme-hill,crossguid,$(LIBCROSSGUID_VERSION)) +LIBCROSSGUID_LICENSE = MIT +LIBCROSSGUID_LICENSE_FILES = LICENSE +LIBCROSSGUID_INSTALL_STAGING = YES +# only a static library +LIBCROSSGUID_INSTALL_TARGET = NO +LIBCROSSGUID_DEPENDENCIES = util-linux + +define LIBCROSSGUID_BUILD_CMDS + (cd $(@D); $(TARGET_CXX) $(TARGET_CXXFLAGS) -std=c++11 -DGUID_LIBUUID \ + -c guid.cpp -o guid.o) + (cd $(@D); $(TARGET_AR) rvs libcrossguid.a guid.o) +endef + +define LIBCROSSGUID_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 644 $(@D)/libcrossguid.a \ + $(STAGING_DIR)/usr/lib/libcrossguid.a + $(INSTALL) -D -m 644 $(@D)/guid.h $(STAGING_DIR)/usr/include/guid.h +endef + +$(eval $(generic-package)) diff --git a/package/libcue/Config.in b/package/libcue/Config.in new file mode 100644 index 0000000000..69e6495594 --- /dev/null +++ b/package/libcue/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBCUE + bool "libcue" + select BR2_PACKAGE_FLEX + help + CUE Sheet Parser Library + + https://github.com/lipnitsk/libcue diff --git a/package/libcue/libcue.hash b/package/libcue/libcue.hash new file mode 100644 index 0000000000..779cda0d66 --- /dev/null +++ b/package/libcue/libcue.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 c3c46d58cebf15b3fe07e6f649014694d338ddd880e941bfb1fd3cedae66c62f libcue-v1.4.0.tar.gz diff --git a/package/libcue/libcue.mk b/package/libcue/libcue.mk new file mode 100644 index 0000000000..70124538f2 --- /dev/null +++ b/package/libcue/libcue.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libcue +# +################################################################################ + +LIBCUE_VERSION = v1.4.0 +LIBCUE_SITE = $(call github,lipnitsk,libcue,$(LIBCUE_VERSION)) +LIBCUE_LICENSE = GPLv2, BSD-2c (rem.c) +LIBCUE_LICENSE_FILES = COPYING +LIBCUE_DEPENDENCIES = host-bison host-flex flex +LIBCUE_INSTALL_STAGING = YES +LIBCUE_AUTORECONF = YES + +# Needed for autoreconf +define LIBCUE_MAKE_CONFIG_DIR + mkdir $(@D)/config +endef +LIBCUE_POST_EXTRACT_HOOKS += LIBCUE_MAKE_CONFIG_DIR + +$(eval $(autotools-package)) diff --git a/package/libcuefile/0001-fix-static-link.patch b/package/libcuefile/0001-fix-static-link.patch new file mode 100644 index 0000000000..6eb58909fd --- /dev/null +++ b/package/libcuefile/0001-fix-static-link.patch @@ -0,0 +1,25 @@ +Fix static only build + +Make sure to build the shared library only if BUILD_SHARED_LIBS is +ON. Normally, CMake takes care of this automatically, but libcuefile +wants to build both the shared and static variants, so the normal +logic of CMake doesn't apply. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/CMakeLists.txt +=================================================================== +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -4,7 +4,11 @@ + add_library(cuefile-static STATIC cd cdtext cue_parse cue_print cue_scan cuefile time toc toc_parse toc_print toc_scan) + set_target_properties(cuefile-static PROPERTIES OUTPUT_NAME cuefile CLEAN_DIRECT_OUTPUT 1) + ++if (BUILD_SHARED_LIBS) + add_library(cuefile-shared SHARED cd cdtext cue_parse cue_print cue_scan cuefile time toc toc_parse toc_print toc_scan) + set_target_properties(cuefile-shared PROPERTIES OUTPUT_NAME cuefile CLEAN_DIRECT_OUTPUT 1 VERSION 0.0.0 SOVERSION 0) + + install(TARGETS cuefile-static cuefile-shared LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}") ++else (BUILD_SHARED_LIBS) ++install(TARGETS cuefile-static LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}") ++endif (BUILD_SHARED_LIBS) diff --git a/package/libcuefile/Config.in b/package/libcuefile/Config.in new file mode 100644 index 0000000000..416b3e1495 --- /dev/null +++ b/package/libcuefile/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBCUEFILE + bool "libcuefile" + help + Cue File library from Musepack + + http://www.musepack.net/ diff --git a/package/libcuefile/libcuefile.hash b/package/libcuefile/libcuefile.hash new file mode 100644 index 0000000000..57db91f322 --- /dev/null +++ b/package/libcuefile/libcuefile.hash @@ -0,0 +1,4 @@ +# From https://www.musepack.net/index.php?pg=src +md5 1a6ac52e1080fd54f0f59372345f1e4e libcuefile_r475.tar.gz +# Calculated based on the hash above +sha256 b681ca6772b3f64010d24de57361faecf426ee6182f5969fcf29b3f649133fe7 libcuefile_r475.tar.gz diff --git a/package/libcuefile/libcuefile.mk b/package/libcuefile/libcuefile.mk new file mode 100644 index 0000000000..d1f2448832 --- /dev/null +++ b/package/libcuefile/libcuefile.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# libcuefile +# +################################################################################ + +LIBCUEFILE_VERSION = r475 +LIBCUEFILE_SITE = http://files.musepack.net/source +LIBCUEFILE_SOURCE = libcuefile_$(LIBCUEFILE_VERSION).tar.gz +LIBCUEFILE_INSTALL_STAGING = YES +LIBCUEFILE_LICENSE = GPLv2+ +LIBCUEFILE_LICENSE_FILES = COPYING + +define LIBCUEFILE_INSTALL_STAGING_INCLUDES + cp -r $(@D)/include $(STAGING_DIR)/usr +endef + +define LIBCUEFILE_INSTALL_TARGET_INCLUDES + cp -r $(@D)/include $(TARGET_DIR)/usr +endef + +LIBCUEFILE_POST_INSTALL_STAGING_HOOKS += LIBCUEFILE_INSTALL_STAGING_INCLUDES +LIBCUEFILE_POST_INSTALL_TARGET_HOOKS += LIBCUEFILE_INSTALL_TARGET_INCLUDES + +$(eval $(cmake-package)) diff --git a/package/libcurl/Config.in b/package/libcurl/Config.in new file mode 100644 index 0000000000..026ae0154b --- /dev/null +++ b/package/libcurl/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_LIBCURL + bool "libcurl" + help + cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet, + and Dict servers, using any of the supported protocols. + + http://curl.haxx.se/ + +if BR2_PACKAGE_LIBCURL + +config BR2_PACKAGE_CURL + bool "curl binary" + help + Install curl binary as well + +endif diff --git a/package/libcurl/libcurl.hash b/package/libcurl/libcurl.hash new file mode 100644 index 0000000000..f9b90c0b4d --- /dev/null +++ b/package/libcurl/libcurl.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 eb63cec4bef692eab9db459033f409533e6d10e20942f4b060b32819e81885f1 curl-7.49.1.tar.bz2 diff --git a/package/libcurl/libcurl.mk b/package/libcurl/libcurl.mk new file mode 100644 index 0000000000..942c677191 --- /dev/null +++ b/package/libcurl/libcurl.mk @@ -0,0 +1,78 @@ +################################################################################ +# +# libcurl +# +################################################################################ + +LIBCURL_VERSION = 7.49.1 +LIBCURL_SOURCE = curl-$(LIBCURL_VERSION).tar.bz2 +LIBCURL_SITE = http://curl.haxx.se/download +LIBCURL_DEPENDENCIES = host-pkgconf \ + $(if $(BR2_PACKAGE_ZLIB),zlib) \ + $(if $(BR2_PACKAGE_LIBIDN),libidn) \ + $(if $(BR2_PACKAGE_RTMPDUMP),rtmpdump) +LIBCURL_LICENSE = ISC +LIBCURL_LICENSE_FILES = COPYING +LIBCURL_INSTALL_STAGING = YES + +# We disable NTLM support because it uses fork(), which doesn't work +# on non-MMU platforms. Moreover, this authentication method is +# probably almost never used. See +# http://curl.haxx.se/docs/manpage.html#--ntlm. +LIBCURL_CONF_OPTS = --disable-verbose --disable-manual --disable-ntlm-wb \ + --enable-hidden-symbols --with-random=/dev/urandom --disable-curldebug +LIBCURL_CONFIG_SCRIPTS = curl-config + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBCURL_DEPENDENCIES += openssl +LIBCURL_CONF_ENV += ac_cv_lib_crypto_CRYPTO_lock=yes +# configure adds the cross openssl dir to LD_LIBRARY_PATH which screws up +# native stuff during the rest of configure when target == host. +# Fix it by setting LD_LIBRARY_PATH to something sensible so those libs +# are found first. +LIBCURL_CONF_ENV += LD_LIBRARY_PATH=$(if $(LD_LIBRARY_PATH),$(LD_LIBRARY_PATH):)/lib:/usr/lib +LIBCURL_CONF_OPTS += --with-ssl=$(STAGING_DIR)/usr \ + --with-ca-path=/etc/ssl/certs +else ifeq ($(BR2_PACKAGE_GNUTLS),y) +LIBCURL_CONF_OPTS += --with-gnutls=$(STAGING_DIR)/usr +LIBCURL_DEPENDENCIES += gnutls +else ifeq ($(BR2_PACKAGE_LIBNSS),y) +LIBCURL_CONF_OPTS += --with-nss=$(STAGING_DIR)/usr +LIBCURL_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) `$(PKG_CONFIG_HOST_BINARY) nspr nss --cflags`" +LIBCURL_DEPENDENCIES += libnss +else ifeq ($(BR2_PACKAGE_MBEDTLS),y) +LIBCURL_CONF_OPTS += --with-mbedtls=$(STAGING_DIR)/usr +LIBCURL_DEPENDENCIES += mbedtls +else +LIBCURL_CONF_OPTS += --without-ssl --without-gnutls \ + --without-polarssl --without-nss --without-mbedtls +endif + +ifeq ($(BR2_PACKAGE_C_ARES),y) +LIBCURL_DEPENDENCIES += c-ares +LIBCURL_CONF_OPTS += --enable-ares +else +LIBCURL_CONF_OPTS += --disable-ares +endif + +# Configure curl to support libssh2 +ifeq ($(BR2_PACKAGE_LIBSSH2),y) +LIBCURL_DEPENDENCIES += libssh2 +LIBCURL_CONF_OPTS += --with-libssh2 +else +LIBCURL_CONF_OPTS += --without-libssh2 +endif + +define LIBCURL_FIX_DOT_PC + printf 'Requires: openssl\n' >>$(@D)/libcurl.pc.in +endef +LIBCURL_POST_PATCH_HOOKS += $(if $(BR2_PACKAGE_OPENSSL),LIBCURL_FIX_DOT_PC) + +ifeq ($(BR2_PACKAGE_CURL),) +define LIBCURL_TARGET_CLEANUP + rm -rf $(TARGET_DIR)/usr/bin/curl +endef +LIBCURL_POST_INSTALL_TARGET_HOOKS += LIBCURL_TARGET_CLEANUP +endif + +$(eval $(autotools-package)) diff --git a/package/libdaemon/0001-testd-use-unistd-h-instead-of-sys-unistd-h.patch b/package/libdaemon/0001-testd-use-unistd-h-instead-of-sys-unistd-h.patch new file mode 100644 index 0000000000..c8f4270d6a --- /dev/null +++ b/package/libdaemon/0001-testd-use-unistd-h-instead-of-sys-unistd-h.patch @@ -0,0 +1,16 @@ +examples/testd.c: As the C POSIX library recommends include the +instead of . This removes an error when building libdaemon +against the musl C library. + +Signed-off-by: Jörg Krause +--- libdaemon-0.14.orig/examples/testd.c 2014-08-30 00:27:08.359832977 +0200 ++++ libdaemon-0.14/examples/testd.c 2014-08-30 00:27:25.439832670 +0200 +@@ -23,7 +23,7 @@ + #include + #include + #include +-#include ++#include + #include + + #include diff --git a/package/libdaemon/Config.in b/package/libdaemon/Config.in new file mode 100644 index 0000000000..bfcedc1968 --- /dev/null +++ b/package/libdaemon/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBDAEMON + bool "libdaemon" + # needs fork() + depends on BR2_USE_MMU + help + libdaemon is a lightweight C library that eases the + writing of UNIX daemons. + + http://0pointer.de/lennart/projects/libdaemon/ diff --git a/package/libdaemon/libdaemon.hash b/package/libdaemon/libdaemon.hash new file mode 100644 index 0000000000..8dbbb5a358 --- /dev/null +++ b/package/libdaemon/libdaemon.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 fd23eb5f6f986dcc7e708307355ba3289abe03cc381fc47a80bca4a50aa6b834 libdaemon-0.14.tar.gz diff --git a/package/libdaemon/libdaemon.mk b/package/libdaemon/libdaemon.mk new file mode 100644 index 0000000000..69dc0b76ba --- /dev/null +++ b/package/libdaemon/libdaemon.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libdaemon +# +################################################################################ + +LIBDAEMON_VERSION = 0.14 +LIBDAEMON_SITE = http://0pointer.de/lennart/projects/libdaemon +LIBDAEMON_LICENSE = LGPLv2.1+ +LIBDAEMON_LICENSE_FILES = LICENSE +LIBDAEMON_INSTALL_STAGING = YES +LIBDAEMON_CONF_ENV = ac_cv_func_setpgrp_void=no +LIBDAEMON_CONF_OPTS = --disable-lynx +LIBDAEMON_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/libdcadec/Config.in b/package/libdcadec/Config.in new file mode 100644 index 0000000000..2687a18187 --- /dev/null +++ b/package/libdcadec/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBDCADEC + bool "libdcadec" + help + dcadec is a free DTS Coherent Acoustics decoder with support + for HD extensions. + + https://github.com/foo86/dcadec diff --git a/package/libdcadec/libdcadec.hash b/package/libdcadec/libdcadec.hash new file mode 100644 index 0000000000..dda58d1065 --- /dev/null +++ b/package/libdcadec/libdcadec.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 ed9d207fde3e8d576f3af8b0d1235b3371e315175757173689104efcaebf0d44 libdcadec-v0.2.0.tar.gz diff --git a/package/libdcadec/libdcadec.mk b/package/libdcadec/libdcadec.mk new file mode 100644 index 0000000000..48e4a12f65 --- /dev/null +++ b/package/libdcadec/libdcadec.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# libdcadec +# +################################################################################ + +LIBDCADEC_VERSION = v0.2.0 +LIBDCADEC_SITE = $(call github,foo86,dcadec,$(LIBDCADEC_VERSION)) +LIBDCADEC_LICENSE = LGPLv2.1+ +LIBDCADEC_LICENSE_FILES = COPYING.LGPLv2.1 +LIBDCADEC_INSTALL_STAGING = YES + +ifeq ($(BR2_STATIC_LIBS),) +LIBDCADEC_SHARED = CONFIG_SHARED=1 +endif + +define LIBDCADEC_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99" \ + $(LIBDCADEC_SHARED) -C $(@D) +endef + +define LIBDCADEC_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + $(LIBDCADEC_SHARED) DESTDIR=$(STAGING_DIR) PREFIX=/usr install +endef + +define LIBDCADEC_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + $(LIBDCADEC_SHARED) DESTDIR=$(TARGET_DIR) PREFIX=/usr install +endef + +$(eval $(generic-package)) diff --git a/package/libdmtx/Config.in b/package/libdmtx/Config.in new file mode 100644 index 0000000000..db4187fdae --- /dev/null +++ b/package/libdmtx/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBDMTX + bool "libdmtx" + help + libdmtx is a software library that enables programs to read and write + Data Matrix barcodes of the modern ECC200 variety. + + http://www.libdmtx.org/ diff --git a/package/libdmtx/libdmtx.hash b/package/libdmtx/libdmtx.hash new file mode 100644 index 0000000000..505baf4ee4 --- /dev/null +++ b/package/libdmtx/libdmtx.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 686bcfb44e50b96345aa53f41e285f2118a2cf87a333b69b74165a2e7ddca492 libdmtx-0.7.4.tar.gz diff --git a/package/libdmtx/libdmtx.mk b/package/libdmtx/libdmtx.mk new file mode 100644 index 0000000000..146534e856 --- /dev/null +++ b/package/libdmtx/libdmtx.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libdmtx +# +################################################################################ + +LIBDMTX_VERSION = 0.7.4 +LIBDMTX_SITE = http://downloads.sourceforge.net/project/libdmtx/libdmtx/$(LIBDMTX_VERSION) +LIBDMTX_LICENSE = BSD-2c or Special Permission +LIBDMTX_LICENSE_FILES = LICENSE +LIBDMTX_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libdnet/0001-python-gcc.patch b/package/libdnet/0001-python-gcc.patch new file mode 100644 index 0000000000..ea732e4358 --- /dev/null +++ b/package/libdnet/0001-python-gcc.patch @@ -0,0 +1,20 @@ +--- a/python/dnet.c 2006-01-19 18:08:23.000000000 +1100 ++++ b/python/dnet.c 2008-09-03 16:30:47.000000000 +1000 +@@ -2726,7 +2726,7 @@ + PyObject *__pyx_3 = 0; + unsigned short __pyx_4; + Py_INCREF(__pyx_v_self); +- ((PyObject*)__pyx_v_next) = Py_None; Py_INCREF(((PyObject*)__pyx_v_next)); ++ __pyx_v_next = (struct __pyx_obj_4dnet_addr*)Py_None; Py_INCREF(((PyObject*)__pyx_v_next)); + + /* "/Users/dugsong/projects/libdnet/python/./dnet.pyx":634 */ + __pyx_1 = (((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->cur <= ((struct __pyx_obj_4dnet___addr_ip4_iter *)__pyx_v_self)->max); +@@ -2738,7 +2739,7 @@ + Py_DECREF(__pyx_2); __pyx_2 = 0; + if (!__Pyx_TypeTest(__pyx_3, __pyx_ptype_4dnet_addr)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; goto __pyx_L1;} + Py_DECREF(((PyObject *)__pyx_v_next)); +- ((PyObject *)__pyx_v_next) = __pyx_3; ++ __pyx_v_next = (struct __pyx_obj_4dnet_addr*)__pyx_3; + __pyx_3 = 0; + + /* "/Users/dugsong/projects/libdnet/python/./dnet.pyx":636 */ diff --git a/package/libdnet/0002-python-makefile.patch b/package/libdnet/0002-python-makefile.patch new file mode 100644 index 0000000000..fb41e43e35 --- /dev/null +++ b/package/libdnet/0002-python-makefile.patch @@ -0,0 +1,16 @@ +--- + python/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +Index: libdnet-1.11/python/Makefile.am +=================================================================== +--- libdnet-1.11.orig/python/Makefile.am ++++ libdnet-1.11/python/Makefile.am +@@ -11,6 +11,7 @@ + pyrexc $(srcdir)/dnet.pyx + + python-build: $(srcdir)/dnet.c ++ CC="$(CC)" LDSHARED="$(CC) -shared" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" $(PYTHON) setup.py build_ext -I$(PYINCDIR) -L$(PYLIBDIR) + $(PYTHON) setup.py build + touch python-build + diff --git a/package/libdnet/Config.in b/package/libdnet/Config.in new file mode 100644 index 0000000000..e78bdedaba --- /dev/null +++ b/package/libdnet/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_LIBDNET + bool "libdnet" + help + libdnet - simplified interface to low-level networking routines. + + http://libdnet.sourceforge.net/ + +if BR2_PACKAGE_LIBDNET + +config BR2_PACKAGE_LIBDNET_PYTHON + bool "libdnet python module" + depends on BR2_PACKAGE_PYTHON + help + dnet module for python + +comment "dnet module for python requires python package" + depends on !BR2_PACKAGE_PYTHON + +endif diff --git a/package/libdnet/libdnet.hash b/package/libdnet/libdnet.hash new file mode 100644 index 0000000000..ee418723d9 --- /dev/null +++ b/package/libdnet/libdnet.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 0eb78415c8f2564c2f1e8ad36e98473348d9c94852f796a226360c716cc7ca53 libdnet-1.11.tar.gz diff --git a/package/libdnet/libdnet.mk b/package/libdnet/libdnet.mk new file mode 100644 index 0000000000..f4e7a74ce0 --- /dev/null +++ b/package/libdnet/libdnet.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# libdnet +# +################################################################################ + +LIBDNET_VERSION = 1.11 +LIBDNET_SITE = http://downloads.sourceforge.net/project/libdnet/libdnet/libdnet-$(LIBDNET_VERSION) +LIBDNET_LICENSE = BSD-3c +LIBDNET_LICENSE_FILES = LICENSE +LIBDNET_INSTALL_STAGING = YES +LIBDNET_AUTORECONF = YES +LIBDNET_CONF_OPTS = \ + --with-gnu-ld \ + --with-check=no + +ifneq ($(BR2_PACKAGE_LIBDNET_PYTHON),) +LIBDNET_DEPENDENCIES = python +LIBDNET_CONF_OPTS += --with-python +LIBDNET_MAKE_OPTS = PYINCDIR=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) PYLIBDIR=$(STAGING_DIR)/usr/lib +LIBDNET_INSTALL_TARGET_OPTS = $(LIBDNET_MAKE_OPTS) DESTDIR=$(TARGET_DIR) INSTALL_STRIP_FLAG=-s install-exec +LIBDNET_INSTALL_STAGING_OPTS = $(LIBDNET_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install +endif + +# Needed for autoreconf to work properly +define LIBDNET_FIXUP_ACINCLUDE_M4 + ln -sf config/acinclude.m4 $(@D) +endef + +LIBDNET_POST_EXTRACT_HOOKS += LIBDNET_FIXUP_ACINCLUDE_M4 + +define LIBDNET_REMOVE_CONFIG_SCRIPT + $(RM) -f $(TARGET_DIR)/usr/bin/dnet-config +endef + +LIBDNET_POST_INSTALL_TARGET_HOOKS += LIBDNET_REMOVE_CONFIG_SCRIPT + +$(eval $(autotools-package)) diff --git a/package/libdri2/Config.in b/package/libdri2/Config.in new file mode 100644 index 0000000000..fff979e3ab --- /dev/null +++ b/package/libdri2/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBDRI2 + bool "libdri2" + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XLIB_LIBXDAMAGE + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XPROTO_DRI2PROTO + depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm + depends on BR2_PACKAGE_XORG7 + help + Library for the DRI2 extension to the X Window System. + + https://github.com/robclark/libdri2 + +comment "libdri2 needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libdri2/libdri2.mk b/package/libdri2/libdri2.mk new file mode 100644 index 0000000000..22854b5060 --- /dev/null +++ b/package/libdri2/libdri2.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libdri2 +# +################################################################################ + +LIBDRI2_VERSION = 4f1eef3183df2b270c3d5cbef07343ee5127a6a4 +LIBDRI2_SITE = $(call github,robclark,libdri2,$(LIBDRI2_VERSION)) +LIBDRI2_DEPENDENCIES = xlib_libXext xproto_dri2proto xlib_libXdamage libdrm +LIBDRI2_LICENSE = MIT +LIBDRI2_LICENSE_FILES = COPYING + +LIBDRI2_INSTALL_STAGING = YES +LIBDRI2_AUTORECONF = YES +LIBDRI2_CONF_ENV = xorg_cv_malloc0_returns_null=true + +$(eval $(autotools-package)) diff --git a/package/libdrm/0001-Add-ARM-support-into-xf86drm.h.patch b/package/libdrm/0001-Add-ARM-support-into-xf86drm.h.patch new file mode 100644 index 0000000000..3c00e9c73a --- /dev/null +++ b/package/libdrm/0001-Add-ARM-support-into-xf86drm.h.patch @@ -0,0 +1,56 @@ +From 2e3dd0040e676530f7e735fab335ff449b9b3f4d Mon Sep 17 00:00:00 2001 +From: Lauren Post +Date: Tue, 22 Mar 2016 22:08:25 +0100 +Subject: [PATCH] Add ARM support into xf86drm.h + +This provides support for Xorg interface. Without this the vivante +samples will hang during close requiring a reboot + +[Adapted from yocto project] +Upstream-Status: Pending +Signed-off-by: Lauren Post +Signed-off-by: Evan Kotara +[Thomas: change CAS code to only be used on ARMv6/ARMv7, and not +ARMv4/ARMv5, which don't support ldrex/strex. If no CAS implementation +is provided libdrm falls back to a system call for locking/unlocking.] +Signed-off-by: Thomas Petazzoni +--- + xf86drm.h | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/xf86drm.h b/xf86drm.h +index 481d882..72341f6 100644 +--- a/xf86drm.h ++++ b/xf86drm.h +@@ -469,6 +469,28 @@ do { register unsigned int __old __asm("o0"); \ + : "cr0", "memory"); \ + } while (0) + ++# elif defined (__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \ ++ || defined (__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \ ++ || defined (__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) \ ++ || defined (__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \ ++ || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \ ++ || defined(__ARM_ARCH_7EM__) ++ #undef DRM_DEV_MODE ++ #define DRM_DEV_MODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) ++ ++ #define DRM_CAS(lock,old,new,__ret) \ ++ do { \ ++ __asm__ __volatile__ ( \ ++ "1: ldrex %0, [%1]\n" \ ++ " teq %0, %2\n" \ ++ " ite eq\n" \ ++ " strexeq %0, %3, [%1]\n" \ ++ " movne %0, #1\n" \ ++ : "=&r" (__ret) \ ++ : "r" (lock), "r" (old), "r" (new) \ ++ : "cc","memory"); \ ++ } while (0) ++ + #endif /* architecture */ + #endif /* __GNUC__ >= 2 */ + +-- +2.6.4 + diff --git a/package/libdrm/0002-xf86drm.c-Include-limits.h-to-fix-build-error-on-Sol.patch b/package/libdrm/0002-xf86drm.c-Include-limits.h-to-fix-build-error-on-Sol.patch new file mode 100644 index 0000000000..03b4524510 --- /dev/null +++ b/package/libdrm/0002-xf86drm.c-Include-limits.h-to-fix-build-error-on-Sol.patch @@ -0,0 +1,31 @@ +From 3fed80daf1dcb0b5d20e623d27228726c735e138 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sun, 27 Sep 2015 19:09:47 +0200 +Subject: [PATCH 1/1] xf86drm.c: Include limits.h to fix build error on Solaris + and with musl + +musl's strict implementation requires #include for PATH_MAX. + +Patch suggested by evgeny for Solaris: +https://bugs.freedesktop.org/show_bug.cgi?id=92082 + +Signed-off-by: Bernd Kuhls +--- + xf86drm.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/xf86drm.c b/xf86drm.c +index a9f5c29..ec985eb 100644 +--- a/xf86drm.c ++++ b/xf86drm.c +@@ -53,6 +53,7 @@ + #include + #include + #include ++#include + #ifdef HAVE_SYS_MKDEV_H + # include /* defines major(), minor(), and makedev() on Solaris */ + #endif +-- +2.5.3 + diff --git a/package/libdrm/0003-xf86atomic-require-CAS-support-in-libatomic_ops.patch b/package/libdrm/0003-xf86atomic-require-CAS-support-in-libatomic_ops.patch new file mode 100644 index 0000000000..ff920fb5a7 --- /dev/null +++ b/package/libdrm/0003-xf86atomic-require-CAS-support-in-libatomic_ops.patch @@ -0,0 +1,32 @@ +From 7384f79f69fdb7b691cc5b0c28c301b3fe8b633e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 26 May 2016 10:46:57 +0200 +Subject: [PATCH] xf86atomic: require CAS support in libatomic_ops + +Since AO_compare_and_swap_full() is used by libdrm, AO_REQUIRE_CAS +must be defined before including so that we are sure +that CAS support will be provided. This is necessary to make sure that +the AO_compare_and_swap_full() function will be provided on all +architectures, including the ones that don't have built-in CAS support +such as SPARCv8. + +Signed-off-by: Thomas Petazzoni +--- + xf86atomic.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/xf86atomic.h b/xf86atomic.h +index 922b37d..d7017a5 100644 +--- a/xf86atomic.h ++++ b/xf86atomic.h +@@ -58,6 +58,7 @@ typedef struct { + #endif + + #if HAVE_LIB_ATOMIC_OPS ++#define AO_REQUIRE_CAS + #include + + #define HAS_ATOMIC_OPS 1 +-- +2.7.4 + diff --git a/package/libdrm/Config.in b/package/libdrm/Config.in new file mode 100644 index 0000000000..7c2a82859f --- /dev/null +++ b/package/libdrm/Config.in @@ -0,0 +1,105 @@ +config BR2_PACKAGE_LIBDRM + bool "libdrm" + select BR2_PACKAGE_LIBPTHREAD_STUBS + depends on BR2_TOOLCHAIN_HAS_THREADS # libpthread-stubs + help + Direct Rendering Manager + + http://dri.freedesktop.org/libdrm/ + +if BR2_PACKAGE_LIBDRM + +config BR2_PACKAGE_LIBDRM_HAS_ATOMIC + bool + default y if BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS || \ + BR2_TOOLCHAIN_HAS_SYNC_4 + +config BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC + bool + select BR2_PACKAGE_LIBATOMIC_OPS if !BR2_TOOLCHAIN_HAS_SYNC_4 + +config BR2_PACKAGE_LIBDRM_INSTALL_TESTS + bool "Install test programs" + help + This option allows to install the libdrm test programs. + +menu "DRM Drivers" + +config BR2_PACKAGE_LIBDRM_INTEL + bool "intel" + select BR2_PACKAGE_LIBPCIACCESS + depends on BR2_i386 || BR2_x86_64 + depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC + select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC + help + Install intel graphics driver. + +config BR2_PACKAGE_LIBDRM_RADEON + bool "radeon" + depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC + select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC + help + Install AMD/ATI graphics driver. + +config BR2_PACKAGE_LIBDRM_AMDGPU + bool "amdgpu" + depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC + select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC + help + Install AMD GPU driver. + +config BR2_PACKAGE_LIBDRM_NOUVEAU + bool "nouveau" + depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC + select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC + help + Install NVIDIA graphics driver. + +config BR2_PACKAGE_LIBDRM_VMWGFX + bool "vmwgfx" + depends on BR2_i386 || BR2_x86_64 + help + Installs Vmware graphics driver. + +config BR2_PACKAGE_LIBDRM_OMAP + bool "omap (experimental)" + depends on BR2_arm + depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC + select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC + help + Install the TI OMAP driver using an experimental API. + +config BR2_PACKAGE_LIBDRM_EXYNOS + bool "exynos (experimental)" + depends on BR2_arm + help + Install Samsung Exynos driver using an experimental API. + +config BR2_PACKAGE_LIBDRM_FREEDRENO + bool "freedreno" + depends on BR2_arm || BR2_aarch64 || BR2_aarch64_be + depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC + select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC + help + Install Qualcomm Snapdragon driver. + +config BR2_PACKAGE_LIBDRM_TEGRA + bool "tegra (experimental)" + depends on BR2_arm + depends on BR2_PACKAGE_LIBDRM_HAS_ATOMIC + select BR2_PACKAGE_LIBDRM_ENABLE_ATOMIC + help + Install NVIDIA Tegra driver using an experimental API. + +config BR2_PACKAGE_LIBDRM_VC4 + bool "vc4" + depends on BR2_arm + help + Install vc4 (Raspberry Pi) driver. + +endmenu + +endif + +comment "libdrm needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libdrm/libdrm.hash b/package/libdrm/libdrm.hash new file mode 100644 index 0000000000..8bd3d95f37 --- /dev/null +++ b/package/libdrm/libdrm.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/dri-devel/2016-April/106211.html +sha256 5b4bd9a5922929bc716411cb74061fbf31b06ba36feb89bc1358a91a8d0ca9df libdrm-2.4.68.tar.bz2 diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk new file mode 100644 index 0000000000..50fa7ef92f --- /dev/null +++ b/package/libdrm/libdrm.mk @@ -0,0 +1,110 @@ +################################################################################ +# +# libdrm +# +################################################################################ + +LIBDRM_VERSION = 2.4.68 +LIBDRM_SOURCE = libdrm-$(LIBDRM_VERSION).tar.bz2 +LIBDRM_SITE = http://dri.freedesktop.org/libdrm +LIBDRM_LICENSE = MIT + +LIBDRM_INSTALL_STAGING = YES + +LIBDRM_DEPENDENCIES = \ + libpthread-stubs \ + host-pkgconf + +LIBDRM_CONF_OPTS = \ + --disable-cairo-tests \ + --disable-manpages + +LIBDRM_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' + +ifeq ($(BR2_PACKAGE_LIBATOMIC_OPS),y) +LIBDRM_DEPENDENCIES += libatomic_ops +ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y) +LIBDRM_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -DAO_NO_SPARC_V9" +endif +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_INTEL),y) +LIBDRM_CONF_OPTS += --enable-intel +LIBDRM_DEPENDENCIES += libpciaccess +else +LIBDRM_CONF_OPTS += --disable-intel +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_RADEON),y) +LIBDRM_CONF_OPTS += --enable-radeon +else +LIBDRM_CONF_OPTS += --disable-radeon +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_AMDGPU),y) +LIBDRM_CONF_OPTS += --enable-amdgpu +else +LIBDRM_CONF_OPTS += --disable-amdgpu +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_NOUVEAU),y) +LIBDRM_CONF_OPTS += --enable-nouveau +else +LIBDRM_CONF_OPTS += --disable-nouveau +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_VMWGFX),y) +LIBDRM_CONF_OPTS += --enable-vmwgfx +else +LIBDRM_CONF_OPTS += --disable-vmwgfx +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_OMAP),y) +LIBDRM_CONF_OPTS += --enable-omap-experimental-api +else +LIBDRM_CONF_OPTS += --disable-omap-experimental-api +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_EXYNOS),y) +LIBDRM_CONF_OPTS += --enable-exynos-experimental-api +else +LIBDRM_CONF_OPTS += --disable-exynos-experimental-api +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_FREEDRENO),y) +LIBDRM_CONF_OPTS += --enable-freedreno +else +LIBDRM_CONF_OPTS += --disable-freedreno +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_TEGRA),y) +LIBDRM_CONF_OPTS += --enable-tegra-experimental-api +else +LIBDRM_CONF_OPTS += --disable-tegra-experimental-api +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_VC4),y) +LIBDRM_CONF_OPTS += --enable-vc4 +else +LIBDRM_CONF_OPTS += --disable-vc4 +endif + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +LIBDRM_CONF_OPTS += --enable-udev +LIBDRM_DEPENDENCIES += udev +else +LIBDRM_CONF_OPTS += --disable-udev +endif + +ifeq ($(BR2_PACKAGE_VALGRIND),y) +LIBDRM_CONF_OPTS += --enable-valgrind +LIBDRM_DEPENDENCIES += valgrind +else +LIBDRM_CONF_OPTS += --disable-valgrind +endif + +ifeq ($(BR2_PACKAGE_LIBDRM_INSTALL_TESTS),y) +LIBDRM_CONF_OPTS += --enable-install-test-programs +endif + +$(eval $(autotools-package)) diff --git a/package/libdvbcsa/Config.in b/package/libdvbcsa/Config.in new file mode 100644 index 0000000000..dd7dc15120 --- /dev/null +++ b/package/libdvbcsa/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBDVBCSA + bool "libdvbcsa" + help + libdvbcsa is a free implementation of the DVB Common Scrambling + Algorithm - DVB/CSA - with encryption and decryption capabilities + + As libdvbcsa implements a standard, it is completely legal to use it. + + http://www.videolan.org/developers/libdvbcsa.html diff --git a/package/libdvbcsa/libdvbcsa.hash b/package/libdvbcsa/libdvbcsa.hash new file mode 100644 index 0000000000..d8360e60bc --- /dev/null +++ b/package/libdvbcsa/libdvbcsa.hash @@ -0,0 +1,4 @@ +# From http://download.videolan.org/pub/videolan/libdvbcsa/1.1.0/libdvbcsa-1.1.0.tar.gz.sha256 +sha256 4db78af5cdb2641dfb1136fe3531960a477c9e3e3b6ba19a2754d046af3f456d libdvbcsa-1.1.0.tar.gz +# From http://download.videolan.org/pub/videolan/libdvbcsa/1.1.0/libdvbcsa-1.1.0.tar.gz.sha1 +sha1 5f4640a7e93ae6494f24a881414e5c343f803365 libdvbcsa-1.1.0.tar.gz diff --git a/package/libdvbcsa/libdvbcsa.mk b/package/libdvbcsa/libdvbcsa.mk new file mode 100644 index 0000000000..1472537938 --- /dev/null +++ b/package/libdvbcsa/libdvbcsa.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# libdvbcsa +# +################################################################################ + +LIBDVBCSA_VERSION = 1.1.0 +LIBDVBCSA_SITE = http://get.videolan.org/libdvbcsa/$(LIBDVBCSA_VERSION) +LIBDVBCSA_LICENSE = GPLv2+ +LIBDVBCSA_LICENSE_FILES = COPYING +LIBDVBCSA_INSTALL_STAGING = YES + +ifeq ($(BR2_X86_CPU_HAS_MMX),y) +LIBDVBCSA_CONF_OPTS += --enable-mmx +else +LIBDVBCSA_CONF_OPTS += --disable-mmx +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE2),y) +LIBDVBCSA_CONF_OPTS += --enable-sse2 +else +LIBDVBCSA_CONF_OPTS += --disable-sse2 +endif + +ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y) +LIBDVBCSA_CONF_OPTS += --enable-altivec +else +LIBDVBCSA_CONF_OPTS += --disable-altivec +endif + +$(eval $(autotools-package)) diff --git a/package/libdvbpsi/Config.in b/package/libdvbpsi/Config.in new file mode 100644 index 0000000000..4d543bc91c --- /dev/null +++ b/package/libdvbpsi/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBDVBPSI + bool "libdvbpsi" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + libdvbpsi is a simple library designed for decoding and + generation of MPEG TS and DVB PSI tables according to standards + ISO/IEC 13818 and ITU-T H.222.0. + + http://www.videolan.org/developers/libdvbpsi.html + +comment "libdvbpsi needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libdvbpsi/libdvbpsi.hash b/package/libdvbpsi/libdvbpsi.hash new file mode 100644 index 0000000000..cf76616ff4 --- /dev/null +++ b/package/libdvbpsi/libdvbpsi.hash @@ -0,0 +1,4 @@ +# From http://download.videolan.org/pub/libdvbpsi/1.3.0/libdvbpsi-1.3.0.tar.bz2.md5 +md5 2b217039a1299000c39423441f77e76a libdvbpsi-1.3.0.tar.bz2 +# From http://download.videolan.org/pub/libdvbpsi/1.3.0/libdvbpsi-1.3.0.tar.bz2.sha256 +sha256 a2fed1d11980662f919bbd1f29e2462719e0f6227e1a531310bd5a706db0a1fe libdvbpsi-1.3.0.tar.bz2 diff --git a/package/libdvbpsi/libdvbpsi.mk b/package/libdvbpsi/libdvbpsi.mk new file mode 100644 index 0000000000..218c19e1f0 --- /dev/null +++ b/package/libdvbpsi/libdvbpsi.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libdvbpsi +# +################################################################################ + +LIBDVBPSI_VERSION = 1.3.0 +LIBDVBPSI_SITE = http://download.videolan.org/pub/libdvbpsi/$(LIBDVBPSI_VERSION) +LIBDVBPSI_SOURCE = libdvbpsi-$(LIBDVBPSI_VERSION).tar.bz2 +LIBDVBPSI_LICENSE = LGPLv2.1+ +LIBDVBPSI_LICENSE_FILES = COPYING +LIBDVBPSI_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libdvbsi/Config.in b/package/libdvbsi/Config.in new file mode 100644 index 0000000000..f67342d650 --- /dev/null +++ b/package/libdvbsi/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBDVBSI + bool "libdvbsi" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + help + C++ parsing library for Service Information (SI) in DVB systems. + With libdvbsi++ you can convert raw DVB service information to + a set of C++ objects, removing the need to parse data manually. + + http://www.saftware.de/ + +comment "libdvbsi++ needs a toolchain w/ C++, wchar, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libdvbsi/libdvbsi.hash b/package/libdvbsi/libdvbsi.hash new file mode 100644 index 0000000000..7454625afe --- /dev/null +++ b/package/libdvbsi/libdvbsi.hash @@ -0,0 +1,2 @@ +# From http://www.saftware.de/libdvbsi++/libdvbsi++-0.3.7.tar.bz2.md5 +md5 7eb50352c06b17c499a6d51e18e99ec5 libdvbsi++-0.3.7.tar.bz2 diff --git a/package/libdvbsi/libdvbsi.mk b/package/libdvbsi/libdvbsi.mk new file mode 100644 index 0000000000..f6469f9b92 --- /dev/null +++ b/package/libdvbsi/libdvbsi.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libdvbsi +# +################################################################################ + +LIBDVBSI_VERSION = 0.3.7 +LIBDVBSI_SOURCE = libdvbsi++-$(LIBDVBSI_VERSION).tar.bz2 +LIBDVBSI_SITE = http://www.saftware.de/libdvbsi++ +LIBDVBSI_INSTALL_STAGING = YES +LIBDVBSI_LICENSE = LGPLv2.1 +LIBDVBSI_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libdvdnav/0001-fix-os2-support.patch b/package/libdvdnav/0001-fix-os2-support.patch new file mode 100644 index 0000000000..0f75f2fbd7 --- /dev/null +++ b/package/libdvdnav/0001-fix-os2-support.patch @@ -0,0 +1,32 @@ +configure: fix build on NIOS II platform + +NIOS II is a CPU architecture from Altera, which uses 'nios2' as the +architecture part of the tuple. Unfortunately, 'nios2' matches the +current '*os2*' test done by libdvdnav's configure script to detect +the OS/2 operating system. This leads to build issues as the build +process of libdvdnav then tries to use OS/2 specific compiler +options, that do not exist in the gcc used for Linux/NIOS2. + +To fix this, this patch makes the test for OS/2 a little bit more +specific: in the case of the OS/2 operating system, the OS part of the +tuple contains just 'os2' (confirmed by looking at config.guess and +config.sub in the gnuconfig project). So using '*-os2-*' will properly +match the OS/2 operating system but not the NIOS II architecture. + +Upstream-status: not needed, newer upstream versions no longer have + this test +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -166,7 +166,7 @@ + *cygwin*) + LDFLAGS="-no-undefined $LDFLAGS" + ;; +- *os2*) ++ *-os2-*) + LDFLAGS="-no-undefined -Zbin-files $LDFLAGS" + ;; + *) diff --git a/package/libdvdnav/Config.in b/package/libdvdnav/Config.in new file mode 100644 index 0000000000..fb13bc022a --- /dev/null +++ b/package/libdvdnav/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBDVDNAV + bool "libdvdnav" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # libdvdread + select BR2_PACKAGE_LIBDVDREAD + help + libdvdnav is a library that allows easy use of sophisticated + DVD navigation features such as DVD menus, multiangle + playback and even interactive DVD games. + + http://www.mplayerhq.hu + +comment "libdvdnav needs a toolchain w/ dynamic library, threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/libdvdnav/libdvdnav.hash b/package/libdvdnav/libdvdnav.hash new file mode 100644 index 0000000000..4a0d851b22 --- /dev/null +++ b/package/libdvdnav/libdvdnav.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7fca272ecc3241b6de41bbbf7ac9a303ba25cb9e0c82aa23901d3104887f2372 libdvdnav-4.2.1.tar.xz diff --git a/package/libdvdnav/libdvdnav.mk b/package/libdvdnav/libdvdnav.mk new file mode 100644 index 0000000000..2ff2ce911b --- /dev/null +++ b/package/libdvdnav/libdvdnav.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libdvdnav +# +################################################################################ + +LIBDVDNAV_VERSION = 4.2.1 +LIBDVDNAV_SOURCE = libdvdnav-$(LIBDVDNAV_VERSION).tar.xz +LIBDVDNAV_SITE = http://dvdnav.mplayerhq.hu/releases +# configure not shipped +LIBDVDNAV_AUTORECONF = YES +LIBDVDNAV_INSTALL_STAGING = YES +LIBDVDNAV_CONFIG_SCRIPTS = dvdnav-config +LIBDVDNAV_DEPENDENCIES = libdvdread host-pkgconf +LIBDVDNAV_LICENSE = GPLv2+ +LIBDVDNAV_LICENSE_FILES = COPYING + +# By default libdvdnav tries to find dvdread-config in $PATH. Because +# of cross compilation, we prefer using pkg-config. +LIBDVDNAV_CONF_OPTS = --with-dvdread-config="$(PKG_CONFIG_HOST_BINARY) dvdread" + +$(eval $(autotools-package)) diff --git a/package/libdvdread/0001-fix-os2-support.patch b/package/libdvdread/0001-fix-os2-support.patch new file mode 100644 index 0000000000..755bfaf3ee --- /dev/null +++ b/package/libdvdread/0001-fix-os2-support.patch @@ -0,0 +1,31 @@ +configure: fix build on NIOS II platform + +NIOS II is a CPU architecture from Altera, which uses 'nios2' as the +architecture part of the tuple. Unfortunately, 'nios2' matches the +current '*os2*' test done by libdvdread's configure script to detect +the OS/2 operating system. This leads to build issues as the build +process of libdvdread then tries to use OS/2 specific compiler +options, that do not exist in the gcc used for Linux/NIOS2. + +To fix this, this patch makes the test for OS/2 a little bit more +specific: in the case of the OS/2 operating system, the OS part of the +tuple contains just 'os2' (confirmed by looking at config.guess and +config.sub in the gnuconfig project). So using '*-os2-*' will properly +match the OS/2 operating system but not the NIOS II architecture. + +Upstream-status: submitted +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -146,7 +146,7 @@ + *cygwin*) + LDFLAGS="-no-undefined $LDFLAGS" + ;; +- *os2*) ++ *-os2-*) + LDFLAGS="-no-undefined -Zbin-files $LDFLAGS" + ;; + *) diff --git a/package/libdvdread/Config.in b/package/libdvdread/Config.in new file mode 100644 index 0000000000..1326709ff0 --- /dev/null +++ b/package/libdvdread/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBDVDREAD + bool "libdvdread" + depends on !BR2_STATIC_LIBS + help + libdvdread provides a simple foundation for reading + DVD-Video images. + + http://www.mplayerhq.hu/MPlayer/releases/dvdnav/ + +comment "libdvdread needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/libdvdread/libdvdread.hash b/package/libdvdread/libdvdread.hash new file mode 100644 index 0000000000..11cc1ceadc --- /dev/null +++ b/package/libdvdread/libdvdread.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 af9b98f049580a6521d56c978b736d3d609562dd12955e11d50e26d97542dcd4 libdvdread-4.2.1.tar.xz diff --git a/package/libdvdread/libdvdread.mk b/package/libdvdread/libdvdread.mk new file mode 100644 index 0000000000..665846092b --- /dev/null +++ b/package/libdvdread/libdvdread.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libdvdread +# +################################################################################ + +LIBDVDREAD_VERSION = 4.2.1 +LIBDVDREAD_SOURCE = libdvdread-$(LIBDVDREAD_VERSION).tar.xz +LIBDVDREAD_SITE = http://dvdnav.mplayerhq.hu/releases +# configure not shipped +LIBDVDREAD_AUTORECONF = YES +LIBDVDREAD_INSTALL_STAGING = YES +LIBDVDREAD_CONFIG_SCRIPTS = dvdread-config +LIBDVDREAD_LICENSE = GPLv2+ +LIBDVDREAD_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libeXosip2/0001-use-pkg-config-to-detect-openssl.patch b/package/libeXosip2/0001-use-pkg-config-to-detect-openssl.patch new file mode 100644 index 0000000000..69e349f205 --- /dev/null +++ b/package/libeXosip2/0001-use-pkg-config-to-detect-openssl.patch @@ -0,0 +1,62 @@ +configure: use pkg-config to find openssl + +The current check is broken for static linking, since the openssl +libs need to be linked against libz, which is missing in the link +command when doing a static build: + http://autobuild.buildroot.net/results/787/787cd9992b00d8008641af208f5fb7c4afb40b06/build-end.log + +Instead of trying convoluted tests to decide what additional libs +are required, just delegate this job to pkg-config. + +At the same time, fix a few legacy, deprecated constructs in favour +of their new counterparts. + +Signed-off-by: "Yann E. MORIN" + +--- +Upstream status: submitted, but no public mailing list (sent to the +mail documented in: http://www.antisip.com/doc/exosip2/index.html ) + +diff -durN libeXosip2-3.6.0.orig/configure.in libeXosip2-3.6.0/configure.in +--- libeXosip2-3.6.0.orig/configure.in 2014-06-22 23:58:26.549487427 +0200 ++++ libeXosip2-3.6.0/configure.in 2014-06-22 23:59:12.822008499 +0200 +@@ -44,7 +44,7 @@ + AC_CONFIG_AUX_DIR(scripts) + AC_CONFIG_HEADERS(config.h) + AM_INIT_AUTOMAKE($PACKAGE, $VERSION) +-AM_ACLOCAL_INCLUDE(scripts) ++AC_CONFIG_MACRO_DIR([scripts]) + + AC_CANONICAL_HOST + +@@ -371,13 +371,15 @@ + + AC_ARG_ENABLE(openssl, + [ --enable-openssl enable support for openssl], +- enable_openssl=$enableval,enable_openssl="yes") ++ enable_openssl=$enableval,enable_openssl="auto") + +-if test "$enable_openssl" = "yes" ; then +- AC_CHECK_HEADERS(openssl/ssl.h) +- AC_CHECK_LIB(ssl,SSL_CTX_new,[EXOSIP_LIB="$EXOSIP_LIB -lssl"]) +- AC_CHECK_LIB(crypto,X509_get_issuer_name,[EXOSIP_LIB="$EXOSIP_LIB -lcrypto"]) +-fi ++AS_IF([test "$enable_openssl" = "yes" -o "$enable_openssl" = "auto"], ++ [PKG_CHECK_MODULES([SSL], [openssl], ++ [EXOSIP_LIB="$EXOSIP_LIB $SSL_LIBS"], ++ [AS_IF([test "$enable_openssl" = "yes"], ++ [AC_MSG_ERROR([can not find openssl])]) ++ ]) ++ ]) + + AC_ARG_ENABLE(srvrec, + [ --enable-srvrec enable support for SRV records DNS queries (yes) ], +diff -durN build/libeXosip2-3.6.0.orig/Makefile.am build/libeXosip2-3.6.0/Makefile.am +--- libeXosip2-3.6.0.orig/Makefile.am 2014-06-23 00:14:25.328226745 +0200 ++++ libeXosip2-3.6.0/Makefile.am 2014-06-23 00:14:38.296371236 +0200 +@@ -1,4 +1,4 @@ +- ++ACLOCAL_AMFLAGS = -I scripts + EXTRA_DIST = README autogen.sh + + SUBDIRS = scripts platform src include tools help diff --git a/package/libeXosip2/Config.in b/package/libeXosip2/Config.in new file mode 100644 index 0000000000..4cb8218f20 --- /dev/null +++ b/package/libeXosip2/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBEXOSIP2 + bool "libeXosip2" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBOSIP2 + help + eXosip is a library that hides the complexity of using the + SIP protocol for mutlimedia session establishement. + This protocol is mainly to be used by VoIP telephony + applications (endpoints or conference server) but might be + also usefull for any application that wish to establish + sessions like multiplayer games. + eXosip is based in libosip. + + http://savannah.nongnu.org/projects/exosip/ diff --git a/package/libeXosip2/libeXosip2.hash b/package/libeXosip2/libeXosip2.hash new file mode 100644 index 0000000000..1f16994b0f --- /dev/null +++ b/package/libeXosip2/libeXosip2.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 91da1a084c9ab663afe04b493342e075ad59ac54a1af011c7f2ba4543a923564 libeXosip2-3.6.0.tar.gz diff --git a/package/libeXosip2/libeXosip2.mk b/package/libeXosip2/libeXosip2.mk new file mode 100644 index 0000000000..d101f95478 --- /dev/null +++ b/package/libeXosip2/libeXosip2.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# libexosip2 +# +################################################################################ + +LIBEXOSIP2_VERSION = 3.6.0 +LIBEXOSIP2_SITE = http://download.savannah.gnu.org/releases/exosip +LIBEXOSIP2_INSTALL_STAGING = YES +LIBEXOSIP2_LICENSE = GPLv2+ +LIBEXOSIP2_LICENSE_FILES = COPYING + +LIBEXOSIP2_DEPENDENCIES = host-pkgconf libosip2 + +# We are touching configure.in and Makefile.am with one of our patches +LIBEXOSIP2_AUTORECONF = YES + +ifeq ($(BR2_arc),y) +# toolchain __arc__ define conflicts with libeXosip2 source +LIBEXOSIP2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -U__arc__" +endif + +ifeq ($(BR2_PACKAGE_C_ARES),y) +LIBEXOSIP2_DEPENDENCIES += c-ares +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBEXOSIP2_DEPENDENCIES += openssl +LIBEXOSIP2_CONF_OPTS += --enable-openssl +else +LIBEXOSIP2_CONF_OPTS += --disable-openssl +endif + +LIBEXOSIP2_CONF_OPTS += \ + --enable-mt=$(if $(BR2_TOOLCHAIN_HAS_THREADS),yes,no) + +$(eval $(autotools-package)) diff --git a/package/libebml/Config.in b/package/libebml/Config.in new file mode 100644 index 0000000000..a00b894358 --- /dev/null +++ b/package/libebml/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBEBML + bool "libebml" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + help + Access library for the EBML (Extensible Binary Meta + Language, a binary derivative of XML) format. + + http://matroska.org + +comment "libebml needs a toolchain w/ C++, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR diff --git a/package/libebml/libebml.hash b/package/libebml/libebml.hash new file mode 100644 index 0000000000..5abc1ebfb0 --- /dev/null +++ b/package/libebml/libebml.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 35fb44daa41961f94a0ac1b8f06801e88cc9bf2ad6f562ced8ab7c1f1a875499 libebml-1.3.3.tar.bz2 diff --git a/package/libebml/libebml.mk b/package/libebml/libebml.mk new file mode 100644 index 0000000000..36c8a5c7c2 --- /dev/null +++ b/package/libebml/libebml.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libebml +# +################################################################################ + +LIBEBML_VERSION = 1.3.3 +LIBEBML_SOURCE = libebml-$(LIBEBML_VERSION).tar.bz2 +LIBEBML_SITE = http://dl.matroska.org/downloads/libebml +LIBEBML_INSTALL_STAGING = YES +LIBEBML_LICENSE = LGPLv2.1+ +LIBEBML_LICENSE_FILES = LICENSE.LGPL + +$(eval $(autotools-package)) diff --git a/package/libedit/0001-check-bsd-functions-in-libbsd.patch b/package/libedit/0001-check-bsd-functions-in-libbsd.patch new file mode 100644 index 0000000000..de452a5c24 --- /dev/null +++ b/package/libedit/0001-check-bsd-functions-in-libbsd.patch @@ -0,0 +1,20 @@ +configure: on Linux, the BSD functions require linking against libbsd + +Signed-off-by: "Yann E. MORIN" +(Rebased against 20150325-3.1) +Signed-off-by: Bernd Kuhls + +diff -durN libedit-20130712-3.1.orig/configure.ac libedit-20130712-3.1/configure.ac +--- libedit-20130712-3.1.orig/configure.ac 2013-07-12 20:39:22.000000000 +0200 ++++ libedit-20130712-3.1/configure.ac 2013-07-28 23:35:35.012676469 +0200 +@@ -117,6 +117,10 @@ + #AC_FUNC_REALLOC + AC_TYPE_SIGNAL + AC_FUNC_STAT ++ ++# Search for libbsd for *vis functions ++AC_CHECK_LIB([bsd], [vis]) ++ + AC_CHECK_FUNCS([endpwent isascii memchr memset re_comp regcomp strcasecmp strchr strcspn strdup strerror strrchr strstr strtol issetugid wcsdup strlcpy strlcat fgetln vis strvis strunvis __secure_getenv secure_getenv]) + + # strlcpy diff --git a/package/libedit/Config.in b/package/libedit/Config.in new file mode 100644 index 0000000000..7c850145e7 --- /dev/null +++ b/package/libedit/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_LIBEDIT + bool "libedit" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + The editline library (from BSD) provides generic line editing + and history functions. It slightly resembles GNU readline. + + The official homepage is at: + http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-5-0/src/lib/libedit/ + + Jess Thrysoee maintains an autotoolified package, which we use + in Buildroot as it makes it much simpler than using the upstream + sources which require pmake. + + http://www.thrysoee.dk/editline + +comment "libedit needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/libedit/libedit.hash b/package/libedit/libedit.hash new file mode 100644 index 0000000000..4bfb8afce8 --- /dev/null +++ b/package/libedit/libedit.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 c88a5e4af83c5f40dda8455886ac98923a9c33125699742603a88a0253fcc8c5 libedit-20150325-3.1.tar.gz diff --git a/package/libedit/libedit.mk b/package/libedit/libedit.mk new file mode 100644 index 0000000000..e7ddd1fcb5 --- /dev/null +++ b/package/libedit/libedit.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# libedit +# +################################################################################ + +LIBEDIT_VERSION = 20150325-3.1 +LIBEDIT_SITE = http://www.thrysoee.dk/editline +LIBEDIT_INSTALL_STAGING = YES +LIBEDIT_DEPENDENCIES = ncurses +LIBEDIT_LICENSE = BSD-3c +LIBEDIT_LICENSE_FILES = COPYING + +# We're patching configure.ac +LIBEDIT_AUTORECONF = YES + +# Needed for autoreconf to work properly +define LIBEDIT_FIXUP_M4_DIR + mkdir $(@D)/m4 +endef +LIBEDIT_POST_EXTRACT_HOOKS += LIBEDIT_FIXUP_M4_DIR + +# Doesn't really support !wchar, but support is disabled otherwise +LIBEDIT_CONF_OPTS += --enable-widec + +# musl is ISO 10646 compliant but doesn't define __STDC_ISO_10646__, +# so let's define it manually +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +LIBEDIT_CONF_OPTS += CFLAGS="$(TARGET_CFLAGS) -D__STDC_ISO_10646__=201103L" +endif + +# Note: libbsd required for *vis functions, but works only with a toolchain +# with __progname; otherwise, some features are disabled, as if libbsd was +# missing entirely. +ifeq ($(BR2_PACKAGE_LIBBSD),y) +LIBEDIT_DEPENDENCIES += libbsd +endif + +$(eval $(autotools-package)) diff --git a/package/libee/Config.in b/package/libee/Config.in new file mode 100644 index 0000000000..9a3411ef29 --- /dev/null +++ b/package/libee/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_LIBEE + bool "libee" + select BR2_PACKAGE_LIBESTR + help + An Event Expression Library inspired by CEE. + + CEE is an upcoming standard used to describe network + events in a number of normalized formats. It's goal is + to unify they currently many different representations + that exist in the industry. + + The core idea of libee is to provide a small but hopefully + convenient API layer above the CEE standard. However, CEE + is not finished. At the time of this writing, CEE is under + heavy development and even some of its core data structures + (like the data dictionary and taxonmy) have not been fully + specified. + + http://www.libee.org diff --git a/package/libee/libee.hash b/package/libee/libee.hash new file mode 100644 index 0000000000..b70242aa29 --- /dev/null +++ b/package/libee/libee.hash @@ -0,0 +1,2 @@ +# From http://www.libee.org/download/libee-0-4-1/ +md5 7bbf4160876c12db6193c06e2badedb2 libee-0.4.1.tar.gz diff --git a/package/libee/libee.mk b/package/libee/libee.mk new file mode 100644 index 0000000000..23441bc11c --- /dev/null +++ b/package/libee/libee.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libee +# +################################################################################ + +LIBEE_VERSION = 0.4.1 +LIBEE_SITE = http://www.libee.org/download/files/download +LIBEE_LICENSE = LGPLv2.1+ +LIBEE_LICENSE_FILES = COPYING +LIBEE_DEPENDENCIES = libestr host-pkgconf +LIBEE_INSTALL_STAGING = YES + +LIBEE_MAKE = $(MAKE1) + +$(eval $(autotools-package)) diff --git a/package/libenca/Config.in b/package/libenca/Config.in new file mode 100644 index 0000000000..5e951ed835 --- /dev/null +++ b/package/libenca/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBENCA + bool "libenca" + help + Extremely Naive Charset Analyser + + http://cihar.com/software/enca/ diff --git a/package/libenca/libenca.mk b/package/libenca/libenca.mk new file mode 100644 index 0000000000..184cac943a --- /dev/null +++ b/package/libenca/libenca.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# libenca +# +################################################################################ + +LIBENCA_VERSION = 1.16 +LIBENCA_SITE = $(call github,nijel,enca,$(LIBENCA_VERSION)) +LIBENCA_INSTALL_STAGING = YES +LIBENCA_LICENSE = GPLv2 +LIBENCA_LICENSE_FILES = COPYING +LIBENCA_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +LIBENCA_CONF_ENV += \ + ac_cv_file__dev_random=yes \ + ac_cv_file__dev_urandom=yes \ + ac_cv_file__dev_arandom=no \ + ac_cv_file__dev_srandom=no + +define LIBENCA_MAKE_HOST_TOOL + $(MAKE) -C $(@D)/tools $(HOST_CONFIGURE_OPTS) make_hash +endef + +LIBENCA_PRE_BUILD_HOOKS += LIBENCA_MAKE_HOST_TOOL + +$(eval $(autotools-package)) diff --git a/package/libepoxy/0001-select-platforms-based-on-configuration-results.patch b/package/libepoxy/0001-select-platforms-based-on-configuration-results.patch new file mode 100644 index 0000000000..e3a7b4995c --- /dev/null +++ b/package/libepoxy/0001-select-platforms-based-on-configuration-results.patch @@ -0,0 +1,125 @@ +From 7eff2bf8e27599c1c94217b2bb1b73d4b7d18e59 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Wed, 6 May 2015 10:45:22 +0200 +Subject: [PATCH 1/4] select platforms based on configuration results +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Andreas Müller +Fetched from pull #81 on github for libepoxy: +https://github.com/anholt/libepoxy/pull/81/commits +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 13 +++++-------- + src/dispatch_common.c | 9 ++++++--- + src/dispatch_common.h | 9 +++++---- + 3 files changed, 16 insertions(+), 15 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 2d67726..225ab73 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -58,6 +58,10 @@ AC_CHECK_HEADER([KHR/khrplatform.h], + # uintptr_t to a void *") by default. Kill that. + XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-int-conversion]) + ++PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no]) ++ ++AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes) ++ + has_znow=yes + + case $host_os in +@@ -86,7 +90,7 @@ case $host_os in + ;; + *) + build_egl=yes +- build_glx=yes ++ build_glx=$x11 + build_wgl=no + # On platforms with dlopen, we load everything dynamically and + # don't link against a specific window system or GL implementation. +@@ -144,13 +148,6 @@ esac + + AC_SUBST([VISIBILITY_CFLAGS]) + +-PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no]) +-if test x$x11 = xno -a x$build_glx = xyes; then +- AC_MSG_ERROR([libX11 headers (libx11-dev) required to build with GLX support]) +-fi +- +-AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes) +- + PKG_CHECK_MODULES(GL, [gl], [gl=yes], [gl=no]) + + AC_CONFIG_FILES([ +diff --git a/src/dispatch_common.c b/src/dispatch_common.c +index 013027f..163d348 100644 +--- a/src/dispatch_common.c ++++ b/src/dispatch_common.c +@@ -656,10 +656,13 @@ epoxy_get_proc_address(const char *name) + #elif defined(__APPLE__) + return epoxy_gl_dlsym(name); + #else ++#if PLATFORM_HAS_GLX + if (epoxy_current_context_is_glx()) { + return glXGetProcAddressARB((const GLubyte *)name); +- } else { ++ } else ++#endif /* PLATFORM_HAS_GLX */ + #if PLATFORM_HAS_EGL ++ { + GLenum egl_api = epoxy_egl_get_current_gl_context_api(); + + switch (egl_api) { +@@ -669,10 +672,10 @@ epoxy_get_proc_address(const char *name) + case EGL_NONE: + break; + } +-#endif + } ++#endif /* PLATFORM_HAS_EGL */ + errx(1, "Couldn't find current GLX or EGL context.\n"); +-#endif ++#endif /* _WIN32 | __APPLE__*/ + } + + WRAPPER_VISIBILITY (void) +diff --git a/src/dispatch_common.h b/src/dispatch_common.h +index 676a4d5..2728b45 100644 +--- a/src/dispatch_common.h ++++ b/src/dispatch_common.h +@@ -21,12 +21,13 @@ + * IN THE SOFTWARE. + */ + ++#include + #include + + #ifdef _WIN32 + #define PLATFORM_HAS_EGL 0 + #define PLATFORM_HAS_GLX 0 +-#define PLATFORM_HAS_WGL 1 ++#define PLATFORM_HAS_WGL BUILD_WGL + #define EPOXY_IMPORTEXPORT __declspec(dllexport) + #elif defined(__APPLE__) + #define PLATFORM_HAS_EGL 0 +@@ -34,13 +35,13 @@ + #define PLATFORM_HAS_WGL 0 + #define EPOXY_IMPORTEXPORT + #elif defined(ANDROID) +-#define PLATFORM_HAS_EGL 1 ++#define PLATFORM_HAS_EGL BUILD_EGL + #define PLATFORM_HAS_GLX 0 + #define PLATFORM_HAS_WGL 0 + #define EPOXY_IMPORTEXPORT + #else +-#define PLATFORM_HAS_EGL 1 +-#define PLATFORM_HAS_GLX 1 ++#define PLATFORM_HAS_EGL BUILD_EGL ++#define PLATFORM_HAS_GLX BUILD_GLX + #define PLATFORM_HAS_WGL 0 + #define EPOXY_IMPORTEXPORT + #endif + diff --git a/package/libepoxy/0002-add-an-option-to-disable-glx-support.patch b/package/libepoxy/0002-add-an-option-to-disable-glx-support.patch new file mode 100644 index 0000000000..a81547de1c --- /dev/null +++ b/package/libepoxy/0002-add-an-option-to-disable-glx-support.patch @@ -0,0 +1,39 @@ +From a9efde0fb2678cd26bdf26d256732d97ded0c595 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= +Date: Wed, 6 May 2015 11:05:48 +0200 +Subject: [PATCH 2/4] add an option to disable glx support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +this option would help us in yocto to get deterministic build results + +Signed-off-by: Andreas Müller +Fetched from pull #81 on github for libepoxy: +https://github.com/anholt/libepoxy/pull/81/commits +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 225ab73..d3d947c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -58,7 +58,14 @@ AC_CHECK_HEADER([KHR/khrplatform.h], + # uintptr_t to a void *") by default. Kill that. + XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-int-conversion]) + +-PKG_CHECK_MODULES(X11, [x11], [x11=yes], [x11=no]) ++AC_ARG_ENABLE([glx], ++ [AS_HELP_STRING([--disable-glx], ++ [disable if you don't want x11/glx support])], ++ [], ++ [enable_glx=yes] ++ ) ++ ++PKG_CHECK_MODULES(X11, [x11], [x11=$enable_glx], [x11=no]) + + AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes) + + diff --git a/package/libepoxy/0003-make-enable-glx-actually-work-on-osx-and-windows.patch b/package/libepoxy/0003-make-enable-glx-actually-work-on-osx-and-windows.patch new file mode 100644 index 0000000000..5b0d4fece2 --- /dev/null +++ b/package/libepoxy/0003-make-enable-glx-actually-work-on-osx-and-windows.patch @@ -0,0 +1,67 @@ +From 902ea1eb073187603ec2eda4d2a146bef96592d4 Mon Sep 17 00:00:00 2001 +From: Jeremy Huddleston Sequoia +Date: Mon, 18 Jan 2016 10:08:44 -0800 +Subject: [PATCH 3/4] Make --enable-glx actually work on OSX and Windows + +Followup for anholt/libepoxy#52 + +Signed-off-by: Jeremy Huddleston Sequoia +Fetched from pull #81 on github for libepoxy: +https://github.com/anholt/libepoxy/pull/81/commits +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 6 +++--- + src/dispatch_common.h | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d3d947c..b4c7ede 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -61,7 +61,7 @@ XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-int-conversion]) + AC_ARG_ENABLE([glx], + [AS_HELP_STRING([--disable-glx], + [disable if you don't want x11/glx support])], +- [], ++ [enable_glx=$enableval], + [enable_glx=yes] + ) + +@@ -74,7 +74,7 @@ has_znow=yes + case $host_os in + mingw*) + build_egl=no +- build_glx=no ++ build_glx=$x11 + build_wgl=yes + # On windows, the DLL has to have all of its functions + # resolved at link time, so we have to link directly aginst +@@ -89,7 +89,7 @@ case $host_os in + ;; + darwin*) + build_egl=no +- build_glx=no ++ build_glx=$x11 + build_wgl=no + build_apple=yes + has_znow=no +diff --git a/src/dispatch_common.h b/src/dispatch_common.h +index 2728b45..c30ce44 100644 +--- a/src/dispatch_common.h ++++ b/src/dispatch_common.h +@@ -26,12 +26,12 @@ + + #ifdef _WIN32 + #define PLATFORM_HAS_EGL 0 +-#define PLATFORM_HAS_GLX 0 ++#define PLATFORM_HAS_GLX BUILD_GLX + #define PLATFORM_HAS_WGL BUILD_WGL + #define EPOXY_IMPORTEXPORT __declspec(dllexport) + #elif defined(__APPLE__) + #define PLATFORM_HAS_EGL 0 +-#define PLATFORM_HAS_GLX 0 ++#define PLATFORM_HAS_GLX BUILD_GLX + #define PLATFORM_HAS_WGL 0 + #define EPOXY_IMPORTEXPORT + #elif defined(ANDROID) + diff --git a/package/libepoxy/0004-darwin-use-glx-instead-of-opengl-framework.patch b/package/libepoxy/0004-darwin-use-glx-instead-of-opengl-framework.patch new file mode 100644 index 0000000000..be9b009f5c --- /dev/null +++ b/package/libepoxy/0004-darwin-use-glx-instead-of-opengl-framework.patch @@ -0,0 +1,95 @@ +From d010922282580a32dfebcda12ee1c307b3ef6005 Mon Sep 17 00:00:00 2001 +From: Jeremy Huddleston Sequoia +Date: Mon, 18 Jan 2016 09:49:55 -0800 +Subject: [PATCH 4/4] darwin: Use GLX instead of OpenGL.framework if it is the + current context + +Also makes a stab at similar support for Win32 + +anholt/libepoxy#63 + +Signed-off-by: Jeremy Huddleston Sequoia +Fetched from pull #81 on github for libepoxy: +https://github.com/anholt/libepoxy/pull/81/commits +Signed-off-by: Gustavo Zacarias +--- + src/dispatch_common.c | 29 ++++++++++++++++------------- + 1 file changed, 16 insertions(+), 13 deletions(-) + +diff --git a/src/dispatch_common.c b/src/dispatch_common.c +index 163d348..cb9f76a 100644 +--- a/src/dispatch_common.c ++++ b/src/dispatch_common.c +@@ -482,16 +482,20 @@ epoxy_glx_dlsym(const char *name) + void * + epoxy_gl_dlsym(const char *name) + { +-#ifdef _WIN32 ++#if defined(_WIN32) || defined(__APPLE__) ++if (!epoxy_current_context_is_glx()) { ++# if defined(_WIN32) + return do_dlsym(&api.gl_handle, "OPENGL32", name, true); +-#elif defined(__APPLE__) ++# elif defined(__APPLE__) + return do_dlsym(&api.gl_handle, + "/System/Library/Frameworks/OpenGL.framework/Versions/Current/OpenGL", + name, true); +-#else ++# endif ++} ++#endif ++ + /* There's no library for desktop GL support independent of GLX. */ + return epoxy_glx_dlsym(name); +-#endif + } + + void * +@@ -615,7 +619,7 @@ epoxy_get_bootstrap_proc_address(const char *name) + */ + #if PLATFORM_HAS_GLX + if (api.glx_handle && glXGetCurrentContext()) +- return epoxy_gl_dlsym(name); ++ return epoxy_glx_dlsym(name); + #endif + + /* If epoxy hasn't loaded any API-specific library yet, try to +@@ -644,22 +648,17 @@ epoxy_get_bootstrap_proc_address(const char *name) + } + #endif /* PLATFORM_HAS_EGL */ + +- /* Fall back to GLX */ ++ /* Fall back to the platform default */ + return epoxy_gl_dlsym(name); + } + + void * + epoxy_get_proc_address(const char *name) + { +-#ifdef _WIN32 +- return wglGetProcAddress(name); +-#elif defined(__APPLE__) +- return epoxy_gl_dlsym(name); +-#else + #if PLATFORM_HAS_GLX + if (epoxy_current_context_is_glx()) { + return glXGetProcAddressARB((const GLubyte *)name); +- } else ++ } + #endif /* PLATFORM_HAS_GLX */ + #if PLATFORM_HAS_EGL + { +@@ -674,8 +673,12 @@ epoxy_get_proc_address(const char *name) + } + } + #endif /* PLATFORM_HAS_EGL */ ++#if defined(_WIN32) ++ return wglGetProcAddress(name); ++#elif defined(__APPLE__) ++ return epoxy_gl_dlsym(name); ++#endif + errx(1, "Couldn't find current GLX or EGL context.\n"); +-#endif /* _WIN32 | __APPLE__*/ + } + + WRAPPER_VISIBILITY (void) diff --git a/package/libepoxy/0005-Forward-egl-cflags-into-epoxy.pc.patch b/package/libepoxy/0005-Forward-egl-cflags-into-epoxy.pc.patch new file mode 100644 index 0000000000..d13f01def5 --- /dev/null +++ b/package/libepoxy/0005-Forward-egl-cflags-into-epoxy.pc.patch @@ -0,0 +1,45 @@ +From 68e5f1574758240aedfe8653d7aaae62cdb08bf5 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Sun, 20 Dec 2015 10:07:06 -0300 +Subject: [PATCH] Forward egl cflags into epoxy.pc + +When building mesa egl without x11 and gles2 the headers need a +MESA_EGL_NO_X11_HEADERS define, so put them in epoxy.pc as well since +otherwise builds will fail. + +Signed-off-by: Gustavo Zacarias +--- +Status: pull request https://github.com/anholt/libepoxy/pull/80 + + configure.ac | 2 ++ + epoxy.pc.in | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index c7cffb2..7b599de 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -102,6 +102,8 @@ if test x$build_egl = xyes; then + AC_DEFINE([BUILD_EGL], [1], [build EGL tests]) + fi + ++AC_SUBST(EGL_CFLAGS) ++ + PKG_CHECK_MODULES(GL, [gl], [gl=yes], [gl=no]) + if test x$gl = xno; then + build_glx=no +diff --git a/epoxy.pc.in b/epoxy.pc.in +index 8c85a33..f377da5 100644 +--- a/epoxy.pc.in ++++ b/epoxy.pc.in +@@ -6,6 +6,6 @@ includedir=@includedir@ + Name: epoxy + Description: epoxy GL dispatch Library + Version: @PACKAGE_VERSION@ +-Cflags: -I${includedir} ++Cflags: -I${includedir} @EGL_CFLAGS@ + Libs: -L${libdir} -lepoxy + Libs.private: @DLOPEN_LIBS@ +-- +2.4.10 + diff --git a/package/libepoxy/0006-Make-egl-conditional.patch b/package/libepoxy/0006-Make-egl-conditional.patch new file mode 100644 index 0000000000..752e8e4fb9 --- /dev/null +++ b/package/libepoxy/0006-Make-egl-conditional.patch @@ -0,0 +1,59 @@ +From 5492e81f317e48141b0687ad77252c52c2dfcd6d Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Fri, 5 Feb 2016 19:03:39 -0300 +Subject: [PATCH] Make egl conditional + +Mesa can be built with GLX and without EGL support, so make this +possible in epoxy as well. + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 6e56599..21e3a25 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -58,6 +58,13 @@ AC_CHECK_HEADER([KHR/khrplatform.h], + # uintptr_t to a void *") by default. Kill that. + XORG_TESTSET_CFLAG(CWARNFLAGS, [-Wno-int-conversion]) + ++AC_ARG_ENABLE([egl], ++ [AS_HELP_STRING([--disable-egl], ++ [disable if you don't want egl support])], ++ [enable_egl=$enableval], ++ [enable_egl=yes] ++ ) ++ + AC_ARG_ENABLE([glx], + [AS_HELP_STRING([--disable-glx], + [disable if you don't want x11/glx support])], +@@ -65,6 +72,7 @@ AC_ARG_ENABLE([glx], + [enable_glx=yes] + ) + ++PKG_CHECK_MODULES(EGL, [egl], [egl=$enable_egl], [egl=no]) + PKG_CHECK_MODULES(X11, [x11], [x11=$enable_glx], [x11=no]) + + AM_CONDITIONAL(HAVE_X11, test x$x11 = xyes) +@@ -96,7 +104,7 @@ case $host_os in + EPOXY_LINK_LIBS="" + ;; + *) +- build_egl=yes ++ build_egl=$egl + build_glx=$x11 + build_wgl=no + # On platforms with dlopen, we load everything dynamically and +@@ -109,7 +117,6 @@ AC_SUBST(EPOXY_LINK_LIBS) + + AM_CONDITIONAL(BUILD_EGL, test x$build_egl = xyes) + if test x$build_egl = xyes; then +- PKG_CHECK_MODULES(EGL, [egl]) + AC_DEFINE([BUILD_EGL], [1], [build EGL tests]) + fi + +-- +2.4.10 + diff --git a/package/libepoxy/Config.in b/package/libepoxy/Config.in new file mode 100644 index 0000000000..c87366afd0 --- /dev/null +++ b/package/libepoxy/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBEPOXY + bool "libepoxy" + select BR2_PACKAGE_XUTIL_UTIL_MACROS + depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL + help + Epoxy is a library for handling OpenGL function pointer + management for you. + + https://github.com/anholt/libepoxy + +comment "libepoxy needs an OpenGL and/or OpenGL EGL backend" + depends on !BR2_PACKAGE_HAS_LIBEGL && !BR2_PACKAGE_HAS_LIBGL diff --git a/package/libepoxy/libepoxy.mk b/package/libepoxy/libepoxy.mk new file mode 100644 index 0000000000..7436e8fed6 --- /dev/null +++ b/package/libepoxy/libepoxy.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# libepoxy +# +################################################################################ + +LIBEPOXY_VERSION = v1.3.1 +LIBEPOXY_SITE = $(call github,anholt,libepoxy,$(LIBEPOXY_VERSION)) +LIBEPOXY_INSTALL_STAGING = YES +# For patches 0001-0006: +LIBEPOXY_AUTORECONF = YES +LIBEPOXY_DEPENDENCIES = xutil_util-macros +LIBEPOXY_LICENSE = MIT +LIBEPOXY_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y) +LIBEPOXY_CONF_OPTS += --enable-egl +LIBEPOXY_DEPENDENCIES += libegl +else +LIBEPOXY_CONF_OPTS += --disable-egl +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBGL)$(BR2_PACKAGE_XLIB_LIBX11),yy) +LIBEPOXY_CONF_OPTS += --enable-glx +LIBEPOXY_DEPENDENCIES += libgl xlib_libX11 +else +LIBEPOXY_CONF_OPTS += --disable-glx +endif + +$(eval $(autotools-package)) diff --git a/package/liberation/Config.in b/package/liberation/Config.in new file mode 100644 index 0000000000..b68166f638 --- /dev/null +++ b/package/liberation/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBERATION + bool "Liberation (Free fonts)" + help + The Liberation Fonts are intended to be replacements for the + three most commonly used fonts on Microsoft systems: + Times New Roman, Arial, and Courier New. + +if BR2_PACKAGE_LIBERATION + +config BR2_PACKAGE_LIBERATION_MONO + bool "mono fonts" + default y + +config BR2_PACKAGE_LIBERATION_SANS + bool "sans fonts" + default y + +config BR2_PACKAGE_LIBERATION_SERIF + bool "serif fonts" + default y + +endif diff --git a/package/liberation/liberation.hash b/package/liberation/liberation.hash new file mode 100644 index 0000000000..34328803b6 --- /dev/null +++ b/package/liberation/liberation.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7890278a6cd17873c57d9cd785c2d230d9abdea837e96516019c5885dd271504 liberation-fonts-ttf-2.00.1.tar.gz diff --git a/package/liberation/liberation.mk b/package/liberation/liberation.mk new file mode 100644 index 0000000000..dfed086f6a --- /dev/null +++ b/package/liberation/liberation.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# liberation +# +################################################################################ + +LIBERATION_VERSION = 2.00.1 +LIBERATION_SITE = http://www.fedorahosted.org/releases/l/i/liberation-fonts +LIBERATION_SOURCE = liberation-fonts-ttf-$(LIBERATION_VERSION).tar.gz +LIBERATION_TARGET_DIR = $(TARGET_DIR)/usr/share/fonts/liberation +LIBERATION_LICENSE = OFLv1.1 +LIBERATION_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PACKAGE_LIBERATION_MONO),y) +define LIBERATION_INSTALL_MONO + $(INSTALL) -m 644 $(@D)/LiberationMono*.ttf $(LIBERATION_TARGET_DIR) +endef +endif + +ifeq ($(BR2_PACKAGE_LIBERATION_SANS),y) +define LIBERATION_INSTALL_SANS + $(INSTALL) -m 644 $(@D)/LiberationSans*.ttf $(LIBERATION_TARGET_DIR) +endef +endif + +ifeq ($(BR2_PACKAGE_LIBERATION_SERIF),y) +define LIBERATION_INSTALL_SERIF + $(INSTALL) -m 644 $(@D)/LiberationSerif*.ttf $(LIBERATION_TARGET_DIR) +endef +endif + +define LIBERATION_INSTALL_TARGET_CMDS + mkdir -p $(LIBERATION_TARGET_DIR) + $(LIBERATION_INSTALL_MONO) + $(LIBERATION_INSTALL_SANS) + $(LIBERATION_INSTALL_SERIF) +endef + +$(eval $(generic-package)) diff --git a/package/libesmtp/Config.in b/package/libesmtp/Config.in new file mode 100644 index 0000000000..ba9d52751c --- /dev/null +++ b/package/libesmtp/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBESMTP + bool "libesmtp" + depends on !BR2_STATIC_LIBS + help + Library for sending emails through SMTP. + + http://www.stafford.uklinux.net/libesmtp + +comment "libesmtp needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/libesmtp/libesmtp.hash b/package/libesmtp/libesmtp.hash new file mode 100644 index 0000000000..c9c0fa303e --- /dev/null +++ b/package/libesmtp/libesmtp.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d0a61a5c52d99fa7ce7d00ed0a07e341dbda67101dbed1ab0cdae3f37db4eb0b libesmtp-1.0.6.tar.bz2 diff --git a/package/libesmtp/libesmtp.mk b/package/libesmtp/libesmtp.mk new file mode 100644 index 0000000000..cad2e27da6 --- /dev/null +++ b/package/libesmtp/libesmtp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libesmtp +# +################################################################################ + +LIBESMTP_VERSION = 1.0.6 +LIBESMTP_SOURCE = libesmtp-$(LIBESMTP_VERSION).tar.bz2 +LIBESMTP_SITE = http://www.stafford.uklinux.net/libesmtp +LIBESMTP_INSTALL_STAGING = YES +LIBESMTP_CONFIG_SCRIPTS = libesmtp-config +LIBESMTP_DEPENDENCIES = $(if $(BR2_PACKAGE_OPENSSL),openssl) +LIBESMTP_LICENSE = GPLv2+ (examples), LGPLv2.1+ (library) +LIBESMTP_LICENSE_FILES = COPYING COPYING.LIB + +$(eval $(autotools-package)) diff --git a/package/libestr/Config.in b/package/libestr/Config.in new file mode 100644 index 0000000000..b1ca2a5473 --- /dev/null +++ b/package/libestr/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBESTR + bool "libestr" + help + Some essentials for string handling (and a bit more) + + http://libestr.adiscon.com/ diff --git a/package/libestr/libestr.hash b/package/libestr/libestr.hash new file mode 100644 index 0000000000..e37cbb13c2 --- /dev/null +++ b/package/libestr/libestr.hash @@ -0,0 +1,2 @@ +# From http://libestr.adiscon.com/download/libestr-0-1-10/ +sha256 bd655e126e750edd18544b88eb1568d200a424a0c23f665eb14bbece07ac703c libestr-0.1.10.tar.gz diff --git a/package/libestr/libestr.mk b/package/libestr/libestr.mk new file mode 100644 index 0000000000..e9783d335f --- /dev/null +++ b/package/libestr/libestr.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libestr +# +################################################################################ + +LIBESTR_VERSION = 0.1.10 +LIBESTR_SITE = http://libestr.adiscon.com/files/download +LIBESTR_LICENSE = LGPLv2.1+ +LIBESTR_LICENSE_FILES = COPYING +LIBESTR_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libev/Config.in b/package/libev/Config.in new file mode 100644 index 0000000000..db8d263df0 --- /dev/null +++ b/package/libev/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBEV + bool "libev" + # needs memory fences + depends on !BR2_bfin + help + Userspace library for handling asynchronous notifications + + http://software.schmorp.de/pkg/libev.html diff --git a/package/libev/libev.hash b/package/libev/libev.hash new file mode 100644 index 0000000000..7f029df7fa --- /dev/null +++ b/package/libev/libev.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 736079e8ac543c74d59af73f9c52737b3bfec9601f020bf25a87a4f4d0f01bd6 libev-4.22.tar.gz diff --git a/package/libev/libev.mk b/package/libev/libev.mk new file mode 100644 index 0000000000..02bc72cba2 --- /dev/null +++ b/package/libev/libev.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libev +# +################################################################################ + +LIBEV_VERSION = 4.22 +LIBEV_SITE = http://dist.schmorp.de/libev +LIBEV_INSTALL_STAGING = YES +LIBEV_LICENSE = BSD-2c or GPLv2+ +LIBEV_LICENSE_FILES = LICENSE + +# The 'compatibility' event.h header conflicts with libevent +# It's completely unnecessary for BR packages so remove it +define LIBEV_DISABLE_EVENT_H_INSTALL + $(SED) 's/ event.h//' $(@D)/Makefile.in +endef +LIBEV_POST_PATCH_HOOKS += LIBEV_DISABLE_EVENT_H_INSTALL + +$(eval $(autotools-package)) diff --git a/package/libevas-generic-loaders/Config.in b/package/libevas-generic-loaders/Config.in new file mode 100644 index 0000000000..c171d47193 --- /dev/null +++ b/package/libevas-generic-loaders/Config.in @@ -0,0 +1,41 @@ +config BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS + bool "libevas generic loaders" + depends on BR2_PACKAGE_EFL + select BR2_PACKAGE_ZLIB + help + These are additional "generic" loaders for Evas that are + stand-alone executables that evas may run from its generic + loader module. + + https://www.enlightenment.org/ + +if BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS + +config BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_LIBRAW + bool "libraw loader" + depends on BR2_INSTALL_LIBSTDCPP # libraw + select BR2_PACKAGE_LIBRAW + help + This option enables the Evas generic Libraw loader + +comment "libraw loader needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_SVG + bool "SVG loader" + depends on BR2_USE_MMU # librsvg -> glib2 + depends on BR2_USE_WCHAR # librsvg -> glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # librsvg -> glib2 + depends on BR2_INSTALL_LIBSTDCPP # librsvg -> pango + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # librsvg -> pango -> harfbuzz + select BR2_PACKAGE_LIBRSVG + select BR2_PACKAGE_CAIRO + help + This option enables the Evas generic SVG loader + +comment "SVG loader needs a toolchain w/ wchar, threads, C++" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP + +endif diff --git a/package/libevas-generic-loaders/libevas-generic-loaders.hash b/package/libevas-generic-loaders/libevas-generic-loaders.hash new file mode 100644 index 0000000000..32723ba9b3 --- /dev/null +++ b/package/libevas-generic-loaders/libevas-generic-loaders.hash @@ -0,0 +1,2 @@ +# From https://download.enlightenment.org/rel/libs/evas_generic_loaders/evas_generic_loaders-1.15.0.tar.xz.sha256 +sha256 1e539e4d4d4e1590345caeb7fdd84f47ec7cd63bb76b6b7107a87420a401fd7f evas_generic_loaders-1.15.0.tar.xz diff --git a/package/libevas-generic-loaders/libevas-generic-loaders.mk b/package/libevas-generic-loaders/libevas-generic-loaders.mk new file mode 100644 index 0000000000..ff8ea372ad --- /dev/null +++ b/package/libevas-generic-loaders/libevas-generic-loaders.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# libevas-generic-loaders +# +################################################################################ + +LIBEVAS_GENERIC_LOADERS_VERSION = 1.15.0 +LIBEVAS_GENERIC_LOADERS_SOURCE = evas_generic_loaders-$(LIBEVAS_GENERIC_LOADERS_VERSION).tar.xz +LIBEVAS_GENERIC_LOADERS_SITE = http://download.enlightenment.org/rel/libs/evas_generic_loaders +LIBEVAS_GENERIC_LOADERS_LICENSE = GPLv2 +LIBEVAS_GENERIC_LOADERS_LICENSE_FILES = COPYING + +LIBEVAS_GENERIC_LOADERS_INSTALL_STAGING = YES + +LIBEVAS_GENERIC_LOADERS_DEPENDENCIES = host-pkgconf efl zlib + +# poppler >= 0.32 is not supported by the current version of +# libevas-generic-loaders. +LIBEVAS_GENERIC_LOADERS_CONF_OPTS += \ + --disable-poppler \ + --disable-spectre \ + --disable-gstreamer + +ifeq ($(BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_LIBRAW),y) +LIBEVAS_GENERIC_LOADERS_DEPENDENCIES += libraw +LIBEVAS_GENERIC_LOADERS_CONF_OPTS += --enable-libraw +else +LIBEVAS_GENERIC_LOADERS_CONF_OPTS += --disable-libraw +endif + +ifeq ($(BR2_PACKAGE_LIBEVAS_GENERIC_LOADERS_SVG),y) +LIBEVAS_GENERIC_LOADERS_DEPENDENCIES += librsvg cairo +LIBEVAS_GENERIC_LOADERS_CONF_OPTS += --enable-svg +else +LIBEVAS_GENERIC_LOADERS_CONF_OPTS += --disable-svg +endif + +$(eval $(autotools-package)) diff --git a/package/libevdev/0001-configure-add-disable-runtime-tests-option.patch b/package/libevdev/0001-configure-add-disable-runtime-tests-option.patch new file mode 100644 index 0000000000..405dff0e5a --- /dev/null +++ b/package/libevdev/0001-configure-add-disable-runtime-tests-option.patch @@ -0,0 +1,42 @@ +From 95527e43845a5063a6125d7779a30d44c3b437ac Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Sun, 11 Oct 2015 13:33:19 +0200 +Subject: [PATCH] configure: add '--disable-runtime-tests' option + +Signed-off-by: Peter Seiderer +--- + configure.ac | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 54a2510..286737b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -74,7 +74,14 @@ else + AC_MSG_WARN([check not found - skipping building unit tests]) + fi + AM_CONDITIONAL(HAVE_VALGRIND, [test "x$VALGRIND" != "x"]) +-AM_CONDITIONAL(ENABLE_RUNTIME_TESTS, [test "x$HAVE_CHECK" = "xyes"]) ++ ++AC_ARG_ENABLE([runtime-tests], ++ AS_HELP_STRING([--disable-runtime-tests], [Disable runtime tests])) ++AS_IF([test "x$enable_runtime_tests" != "xno"], ++ [enable_runtime_tests=yes], ++ [enable_runtime_tests=no]) ++ ++AM_CONDITIONAL(ENABLE_RUNTIME_TESTS, [test "x${enable_runtime_tests}x$HAVE_CHECK" = "xyesxyes"]) + AM_CONDITIONAL(ENABLE_STATIC_LINK_TEST, [test "x$enable_static" = "xyes"]) + + with_cflags="" +@@ -159,7 +166,7 @@ AC_MSG_RESULT([ + Libdir ${libdir} + + Build documentation ${have_doxygen} +- Enable unit-tests ${HAVE_CHECK} ++ Enable unit-tests ${HAVE_CHECK} (runtime-tests: ${enable_runtime_tests}) + Enable profiling ${enable_gcov} + Static library symbol check ${static_symbol_leaks_test} + ]) +-- +2.1.4 + diff --git a/package/libevdev/Config.in b/package/libevdev/Config.in new file mode 100644 index 0000000000..91dd9db6f7 --- /dev/null +++ b/package/libevdev/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBEVDEV + bool "libevdev" + help + libevdev is a wrapper library for evdev devices + + http://freedesktop.org/wiki/Software/libevdev/ diff --git a/package/libevdev/libevdev.hash b/package/libevdev/libevdev.hash new file mode 100644 index 0000000000..20ca4fbecb --- /dev/null +++ b/package/libevdev/libevdev.hash @@ -0,0 +1,2 @@ +# Hash from http://lists.freedesktop.org/archives/input-tools/2016-January/001240.html +sha256 7b2ae1a0c7f9f7a96198ddc8fd167f090f233d6cbd8168b847e4f968445132d3 libevdev-1.4.6.tar.xz diff --git a/package/libevdev/libevdev.mk b/package/libevdev/libevdev.mk new file mode 100644 index 0000000000..5513191a06 --- /dev/null +++ b/package/libevdev/libevdev.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libevdev +# +################################################################################ + +LIBEVDEV_VERSION = 1.4.6 +LIBEVDEV_SITE = http://www.freedesktop.org/software/libevdev +LIBEVDEV_SOURCE = libevdev-$(LIBEVDEV_VERSION).tar.xz +LIBEVDEV_LICENSE = X11 +LIBEVDEV_LICENSE_FILES = COPYING + +# patch touches configure.ac +LIBEVDEV_AUTORECONF = YES + +# Uses PKG_CHECK_MODULES() in configure.ac +LIBEVDEV_DEPENDENCIES = host-pkgconf + +LIBEVDEV_INSTALL_STAGING = YES + +LIBEVDEV_CONF_OPTS += --disable-runtime-tests + +$(eval $(autotools-package)) diff --git a/package/libevent/0001-Disable-building-test-programs.patch b/package/libevent/0001-Disable-building-test-programs.patch new file mode 100644 index 0000000000..eb1acfd676 --- /dev/null +++ b/package/libevent/0001-Disable-building-test-programs.patch @@ -0,0 +1,30 @@ +From 4b5a135fa681e85eb6988a379f59f3c7a41cc48c Mon Sep 17 00:00:00 2001 +From: Gilles Talis +Date: Fri, 21 Jun 2013 15:25:11 -0700 +Subject: [PATCH 1/2] Disable building test programs + +We are not really interested in building test programs. +Moreover, these programs use fork() function that is +not available on MMU-less architectures. + +Signed-off-by: Gilles Talis +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 42879a3..dc90359 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -126,7 +126,7 @@ else + noinst_LTLIBRARIES = $(LIBEVENT_LIBS_LA) + endif + +-SUBDIRS = . include sample test ++SUBDIRS = . include sample + + if BUILD_WIN32 + +-- +2.1.1 + diff --git a/package/libevent/Config.in b/package/libevent/Config.in new file mode 100644 index 0000000000..c32f29e5b0 --- /dev/null +++ b/package/libevent/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBEVENT + bool "libevent" + help + Userspace library for handling asynchronous notifications + + http://libevent.org diff --git a/package/libevent/libevent.hash b/package/libevent/libevent.hash new file mode 100644 index 0000000000..633cf5b8fa --- /dev/null +++ b/package/libevent/libevent.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/levent/files/libevent/libevent-2.0/ +md5 c4c56f986aa985677ca1db89630a2e11 libevent-2.0.22-stable.tar.gz +sha1 a586882bc93a208318c70fc7077ed8fca9862864 libevent-2.0.22-stable.tar.gz diff --git a/package/libevent/libevent.mk b/package/libevent/libevent.mk new file mode 100644 index 0000000000..820beea9c5 --- /dev/null +++ b/package/libevent/libevent.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# libevent +# +################################################################################ + +LIBEVENT_VERSION = 2.0.22-stable +LIBEVENT_SITE = https://github.com/libevent/libevent/releases/download/release-$(LIBEVENT_VERSION) +LIBEVENT_INSTALL_STAGING = YES +LIBEVENT_LICENSE = BSD-3c, OpenBSD +LIBEVENT_LICENSE_FILES = LICENSE +# For 0001-Disable-building-test-programs.patch +LIBEVENT_AUTORECONF = YES + +define LIBEVENT_REMOVE_PYSCRIPT + rm $(TARGET_DIR)/usr/bin/event_rpcgen.py +endef + +# libevent installs a python script to target - get rid of it if we +# don't have python support enabled +ifneq ($(BR2_PACKAGE_PYTHON),y) +LIBEVENT_POST_INSTALL_TARGET_HOOKS += LIBEVENT_REMOVE_PYSCRIPT +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBEVENT_DEPENDENCIES += openssl +LIBEVENT_CONF_OPTS += --enable-openssl +# openssl needs zlib but configure forgets to link against it causing +# openssl detection to fail +ifeq ($(BR2_STATIC_LIBS),y) +LIBEVENT_CONF_ENV += OPENSSL_LIBADD='-lz' +endif +else +LIBEVENT_CONF_OPTS += --disable-openssl +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libexif/Config.in b/package/libexif/Config.in new file mode 100644 index 0000000000..8a38b477b8 --- /dev/null +++ b/package/libexif/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBEXIF + bool "libexif" + help + Most digital cameras produce EXIF files, which are JPEG + files with extra tags that contain information about the + image. The EXIF library allows you to parse an EXIF file + and read the data from those tags. + + http://libexif.sf.net diff --git a/package/libexif/libexif.hash b/package/libexif/libexif.hash new file mode 100644 index 0000000000..cf1b4d7c45 --- /dev/null +++ b/package/libexif/libexif.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 16cdaeb62eb3e6dfab2435f7d7bccd2f37438d21c5218ec4e58efa9157d4d41a libexif-0.6.21.tar.bz2 diff --git a/package/libexif/libexif.mk b/package/libexif/libexif.mk new file mode 100644 index 0000000000..a71c117334 --- /dev/null +++ b/package/libexif/libexif.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libexif +# +################################################################################ + +LIBEXIF_VERSION = 0.6.21 +LIBEXIF_SOURCE = libexif-$(LIBEXIF_VERSION).tar.bz2 +LIBEXIF_SITE = http://downloads.sourceforge.net/project/libexif/libexif/$(LIBEXIF_VERSION) +LIBEXIF_INSTALL_STAGING = YES +LIBEXIF_DEPENDENCIES = host-pkgconf +LIBEXIF_LICENSE = LGPLv2.1+ +LIBEXIF_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libfcgi/0001-eof.patch b/package/libfcgi/0001-eof.patch new file mode 100644 index 0000000000..e7314265a2 --- /dev/null +++ b/package/libfcgi/0001-eof.patch @@ -0,0 +1,24 @@ +[PATCH] fix build with C++ support and gcc >= 4.4 + +EOF is defined in stdio, so ensure it is included. + +Based on similar patch by Markus Rothe: +http://comments.gmane.org/gmane.comp.web.fastcgi.devel/3205 + +Signed-off-by: Peter Korsgaard +--- + libfcgi/fcgio.cpp | 1 + + 1 file changed, 1 insertion(+) + +Index: fcgi-2.4.0/libfcgi/fcgio.cpp +=================================================================== +--- fcgi-2.4.0.orig/libfcgi/fcgio.cpp ++++ fcgi-2.4.0/libfcgi/fcgio.cpp +@@ -22,6 +22,7 @@ + #define DLLAPI __declspec(dllexport) + #endif + ++#include + #include + #include "fcgio.h" + diff --git a/package/libfcgi/0002-link-against-libfcgi-la.patch b/package/libfcgi/0002-link-against-libfcgi-la.patch new file mode 100644 index 0000000000..8a5973ac5b --- /dev/null +++ b/package/libfcgi/0002-link-against-libfcgi-la.patch @@ -0,0 +1,20 @@ +Properly link libfcgi++ against libfcgi + +We cannot directly use -lfcgi to link libfcgi++ against libfcgi, +because libfcgi is not installed at this time. Instead, we should rely +on libtool doing the right thing, by specifying libfcgi.la in +libfcgi++ LIBADD variable. + +Signed-off-by: Thomas Petazzoni + +Index: b/libfcgi/Makefile.am +=================================================================== +--- a/libfcgi/Makefile.am ++++ b/libfcgi/Makefile.am +@@ -23,5 +23,6 @@ + $(INCLUDEDIR)/fcgio.h \ + fcgio.cpp + libfcgi___la_CFLAGS = @PTHREAD_CFLAGS@ +-libfcgi___la_LDFLAGS = -lfcgi -rpath @libdir@ ++libfcgi___la_LIBADD = libfcgi.la ++libfcgi___la_LDFLAGS = -rpath @libdir@ diff --git a/package/libfcgi/0003-link-against-math.patch b/package/libfcgi/0003-link-against-math.patch new file mode 100644 index 0000000000..c60c6d50ce --- /dev/null +++ b/package/libfcgi/0003-link-against-math.patch @@ -0,0 +1,16 @@ +Link libfcgi against the math library. + +Signed-off-by: Thomas Claveirole + +Index: b/libfcgi/Makefile.am +=================================================================== +--- a/libfcgi/Makefile.am ++++ b/libfcgi/Makefile.am +@@ -18,6 +18,7 @@ + os_@SYSTEM@.c + libfcgi_la_CC = @PTHREAD_CC@ + libfcgi_la_CFLAGS = @PTHREAD_CFLAGS@ ++libfcgi_la_LIBADD = -lm + + libfcgi___la_SOURCES = $(INCLUDE_FILES) \ + $(INCLUDEDIR)/fcgio.h \ diff --git a/package/libfcgi/0004-make-autoreconfable.patch b/package/libfcgi/0004-make-autoreconfable.patch new file mode 100644 index 0000000000..e255fc6d3b --- /dev/null +++ b/package/libfcgi/0004-make-autoreconfable.patch @@ -0,0 +1,67 @@ +Make the package autoreconfigurable + +Adjust minor details in Makefile.am and configure.in in order to make +the package compatible with the autoconf/automake versions we are +using in Buildroot. + +Signed-off-by: Thomas Petazzoni + +Index: b/cgi-fcgi/Makefile.am +=================================================================== +--- a/cgi-fcgi/Makefile.am ++++ b/cgi-fcgi/Makefile.am +@@ -2,7 +2,7 @@ + bin_PROGRAMS = cgi-fcgi + + INCLUDEDIR = ../include +-CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include ++AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include + + INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h \ + $(INCLUDEDIR)/fcgiapp.h \ +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -4,12 +4,13 @@ + dnl generate the file "configure", which is run during the build + dnl to configure the system for the local environment. + +-AC_INIT +-AM_INIT_AUTOMAKE(fcgi, 2.4.0) ++AC_INIT([fcgi], [2.4.0]) ++AM_INIT_AUTOMAKE([foreign]) + + AM_CONFIG_HEADER(fcgi_config.h) + + AC_PROG_CC ++AC_PROG_CC_C_O + AC_PROG_CPP + AC_PROG_INSTALL + AC_PROG_LIBTOOL +Index: b/examples/Makefile.am +=================================================================== +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -11,7 +11,7 @@ + EXTRA_PROGRAMS = threaded echo-cpp + + INCLUDEDIR = ../include +-CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include ++AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include + + INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h \ + $(INCLUDEDIR)/fcgiapp.h \ +Index: b/libfcgi/Makefile.am +=================================================================== +--- a/libfcgi/Makefile.am ++++ b/libfcgi/Makefile.am +@@ -1,7 +1,7 @@ + # $Id: Makefile.am,v 1.9 2001/12/22 03:16:20 robs Exp $ + + INCLUDEDIR = ../include +-CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include ++AM_CPPFLAGS = @CPPFLAGS@ -I$(top_srcdir)/include + + INCLUDE_FILES = $(INCLUDEDIR)/fastcgi.h \ + $(INCLUDEDIR)/fcgiapp.h \ diff --git a/package/libfcgi/0005-disable-examples.patch b/package/libfcgi/0005-disable-examples.patch new file mode 100644 index 0000000000..4a9916f02a --- /dev/null +++ b/package/libfcgi/0005-disable-examples.patch @@ -0,0 +1,21 @@ +Common subdirectories: libfcgi-2.4.0.orig/cgi-fcgi and libfcgi-2.4.0/cgi-fcgi +Common subdirectories: libfcgi-2.4.0.orig/doc and libfcgi-2.4.0/doc +Common subdirectories: libfcgi-2.4.0.orig/examples and libfcgi-2.4.0/examples +Common subdirectories: libfcgi-2.4.0.orig/images and libfcgi-2.4.0/images +Common subdirectories: libfcgi-2.4.0.orig/include and libfcgi-2.4.0/include +Common subdirectories: libfcgi-2.4.0.orig/java and libfcgi-2.4.0/java +Common subdirectories: libfcgi-2.4.0.orig/libfcgi and libfcgi-2.4.0/libfcgi +diff -du libfcgi-2.4.0.orig/Makefile.am libfcgi-2.4.0/Makefile.am +--- libfcgi-2.4.0.orig/Makefile.am 2001-12-22 14:05:39.000000000 +0100 ++++ libfcgi-2.4.0/Makefile.am 2014-07-19 16:56:21.935216540 +0200 +@@ -4,7 +4,7 @@ + # $Id: Makefile.am,v 1.7 2001/12/22 13:05:39 robs Exp $ + # + +-SUBDIRS = libfcgi cgi-fcgi examples include ++SUBDIRS = libfcgi cgi-fcgi include + + include_HEADERS = fcgi_config.h + +Common subdirectories: libfcgi-2.4.0.orig/perl and libfcgi-2.4.0/perl +Common subdirectories: libfcgi-2.4.0.orig/Win32 and libfcgi-2.4.0/Win32 diff --git a/package/libfcgi/0006-fix-CVE-2012-6687.patch b/package/libfcgi/0006-fix-CVE-2012-6687.patch new file mode 100644 index 0000000000..10d33ed58d --- /dev/null +++ b/package/libfcgi/0006-fix-CVE-2012-6687.patch @@ -0,0 +1,104 @@ +libfcgi:add security patch for CVE-2012-6687 +CVE-2012-6687 - remote attackers cause a denial of service (crash) via a large number +of connections (http://www.cvedetails.com/cve/CVE-2012-6687/). +Fix:use poll in os_unix.c instead of select to avoid problem with > 1024 connections. +This patch libfcgi_2.4.0-8.3.debian.tar.xz is pulled from the below link: +(https://launchpad.net/ubuntu/+source/libfcgi/2.4.0-8.3) +The next release of libfcgi is 2.4.1 which may have this fix is yet to be released +officially. + +Signed-off-by: Anton Kortunov +Signed-off-by: Niranjan Reddy + +Index: b/libfcgi/os_unix.c +=================================================================== +--- a/libfcgi/os_unix.c ++++ b/libfcgi/os_unix.c +@@ -42,6 +42,7 @@ + #include + #include + #include ++#include + + #ifdef HAVE_NETDB_H + #include +@@ -103,6 +104,9 @@ + static int shutdownPending = FALSE; + static int shutdownNow = FALSE; + ++static int libfcgiOsClosePollTimeout = 2000; ++static int libfcgiIsAfUnixKeeperPollTimeout = 2000; ++ + void OS_ShutdownPending() + { + shutdownPending = TRUE; +@@ -168,6 +172,16 @@ + if(libInitialized) + return 0; + ++ char *libfcgiOsClosePollTimeoutStr = getenv( "LIBFCGI_OS_CLOSE_POLL_TIMEOUT" ); ++ if(libfcgiOsClosePollTimeoutStr) { ++ libfcgiOsClosePollTimeout = atoi(libfcgiOsClosePollTimeoutStr); ++ } ++ ++ char *libfcgiIsAfUnixKeeperPollTimeoutStr = getenv( "LIBFCGI_IS_AF_UNIX_KEEPER_POLL_TIMEOUT" ); ++ if(libfcgiIsAfUnixKeeperPollTimeoutStr) { ++ libfcgiIsAfUnixKeeperPollTimeout = atoi(libfcgiIsAfUnixKeeperPollTimeoutStr); ++ } ++ + asyncIoTable = (AioInfo *)malloc(asyncIoTableSize * sizeof(AioInfo)); + if(asyncIoTable == NULL) { + errno = ENOMEM; +@@ -755,19 +769,16 @@ + + if (shutdown(fd, 1) == 0) + { +- struct timeval tv; +- fd_set rfds; ++ struct pollfd pfd; + int rv; + char trash[1024]; + +- FD_ZERO(&rfds); ++ pfd.fd = fd; ++ pfd.events = POLLIN; + + do + { +- FD_SET(fd, &rfds); +- tv.tv_sec = 2; +- tv.tv_usec = 0; +- rv = select(fd + 1, &rfds, NULL, NULL, &tv); ++ rv = poll(&pfd, 1, libfcgiOsClosePollTimeout); + } + while (rv > 0 && read(fd, trash, sizeof(trash)) > 0); + } +@@ -1116,13 +1127,11 @@ + */ + static int is_af_unix_keeper(const int fd) + { +- struct timeval tval = { READABLE_UNIX_FD_DROP_DEAD_TIMEVAL }; +- fd_set read_fds; +- +- FD_ZERO(&read_fds); +- FD_SET(fd, &read_fds); ++ struct pollfd pfd; ++ pfd.fd = fd; ++ pfd.events = POLLIN; + +- return select(fd + 1, &read_fds, NULL, NULL, &tval) >= 0 && FD_ISSET(fd, &read_fds); ++ return poll(&pfd, 1, libfcgiIsAfUnixKeeperPollTimeout) >= 0 && (pfd.revents & POLLIN); + } + + /* + +Index: b/examples/Makefile.am +=================================================================== +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -34,5 +34,5 @@ threaded_CFLAGS = @PTHREAD_CFLAGS@ + threaded_LDFLAGS = @PTHREAD_CFLAGS@ @PTHREAD_LIBS@ + + echo_cpp_SOURCES = $(INCLUDE_FILES) $(INCLUDEDIR)/fcgio.h echo-cpp.cpp +-echo_cpp_LDADD = $(LIBDIR)/libfcgi++.la ++echo_cpp_LDADD = $(LIBDIR)/libfcgi++.la $(LIBDIR)/libfcgi.la diff --git a/package/libfcgi/Config.in b/package/libfcgi/Config.in new file mode 100644 index 0000000000..47ff8a2d13 --- /dev/null +++ b/package/libfcgi/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBFCGI + bool "libfcgi" + depends on BR2_USE_MMU # fork() + help + FCGI, a fastcgi developer library for C/C++ + + http://www.fastcgi.com/ diff --git a/package/libfcgi/libfcgi.hash b/package/libfcgi/libfcgi.hash new file mode 100644 index 0000000000..586ff1e7ad --- /dev/null +++ b/package/libfcgi/libfcgi.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 66fc45c6b36a21bf2fbbb68e90f780cc21a9da1fffbae75e76d2b4402d3f05b9 fcgi-2.4.0.tar.gz diff --git a/package/libfcgi/libfcgi.mk b/package/libfcgi/libfcgi.mk new file mode 100644 index 0000000000..ced850c153 --- /dev/null +++ b/package/libfcgi/libfcgi.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libfcgi +# +################################################################################ + +LIBFCGI_VERSION = 2.4.0 +LIBFCGI_SOURCE = fcgi-$(LIBFCGI_VERSION).tar.gz +LIBFCGI_SITE = http://www.fastcgi.com/dist +LIBFCGI_LICENSE = fcgi license +LIBFCGI_LICENSE_FILES = LICENSE.TERMS +LIBFCGI_INSTALL_STAGING = YES +LIBFCGI_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/libffi/0001-Fix-installation-location-of-libffi.patch b/package/libffi/0001-Fix-installation-location-of-libffi.patch new file mode 100644 index 0000000000..6ac9123730 --- /dev/null +++ b/package/libffi/0001-Fix-installation-location-of-libffi.patch @@ -0,0 +1,55 @@ +From 580f46a7bc6e9fea3a2227b5268cc3aed1d60e3b Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 7 Feb 2013 22:26:56 +0100 +Subject: [PATCH] Fix installation location of libffi +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The libffi is currently declared as toolexeclib_LTLIBRARIES. In many +cases, toolexeclib libraries will be installed in /usr/lib, so it +doesn't make any difference. + +However, with multilib toolchains, they get installed in a +subdirectory of /usr/lib/. For example, with a Sourcery CodeBench +PowerPC toolchain, if the e500mc multilib variant is used, the libffi +library gets installed in /usr/lib/te500mc/. This is due to the +following code in the configure script: + + multi_os_directory=`$CC -print-multi-os-directory` + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; + esac + +Once the library is installed in /usr/lib/te500mc/, nothing works +because this installation location is inconsistent with the +installation location declared in libffi.pc. + +So, instead of using this bizarre toolexeclib_LTLIBRARIES, simply use +the more standard lib_LTLIBRARIES, which ensures that the libffi +library is always installed in /usr/lib. + +Signed-off-by: Thomas Petazzoni +[unfuzz for 3.2.1] +Signed-off-by: Jörg Krause +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 0e40451..309474c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -104,7 +104,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) + + MAKEOVERRIDES= + +-toolexeclib_LTLIBRARIES = libffi.la ++lib_LTLIBRARIES = libffi.la + noinst_LTLIBRARIES = libffi_convenience.la + + libffi_la_SOURCES = src/prep_cif.c src/types.c \ +-- +2.5.3 + diff --git a/package/libffi/0002-Fix-use-of-compact-eh-frames-on-MIPS.patch b/package/libffi/0002-Fix-use-of-compact-eh-frames-on-MIPS.patch new file mode 100644 index 0000000000..c19e395f90 --- /dev/null +++ b/package/libffi/0002-Fix-use-of-compact-eh-frames-on-MIPS.patch @@ -0,0 +1,45 @@ +From 31b6b6bc14197cd4183bdbd311fddeb36b5ae100 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sat, 19 Sep 2015 22:53:29 +0200 +Subject: [PATCH] Fix use of compact eh frames on MIPS +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Newer MIPS toolchains use a different (compact) eh_frame format. +libffi don't like them, so we have to switch to the older format. + +This patch add -mno-compact-eh to CFLAGS when compiling for +Mips and compiler support it. + +Signed-off-by: Jérôme Pouiller +[unfuzz for 3.2.1] +Signed-off-by: Jörg Krause +--- + configure.ac | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/configure.ac b/configure.ac +index a7bf5ee..36cd0d4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -469,6 +469,16 @@ esac + AM_CONDITIONAL(FFI_EXEC_TRAMPOLINE_TABLE, test x$FFI_EXEC_TRAMPOLINE_TABLE = x1) + AC_SUBST(FFI_EXEC_TRAMPOLINE_TABLE) + ++if test x$TARGET = xMIPS; then ++ save_CFLAGS="$CFLAGS" ++ CFLAGS=-mno-compact-eh ++ AC_MSG_CHECKING([whether the C compiler needs -mno-compact-eh]) ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], ++ [AC_MSG_RESULT([yes])]; [save_CFLAGS="$save_CFLAGS -mno-compact-eh"], ++ [AC_MSG_RESULT([no])]) ++ CFLAGS="$save_CFLAGS" ++fi ++ + if test x$TARGET = xX86_64; then + AC_CACHE_CHECK([toolchain supports unwind section type], + libffi_cv_as_x86_64_unwind_section_type, [ +-- +2.5.3 + diff --git a/package/libffi/0003-libffi-enable-hardfloat-in-the-MIPS-assembly-code.patch b/package/libffi/0003-libffi-enable-hardfloat-in-the-MIPS-assembly-code.patch new file mode 100644 index 0000000000..776990df65 --- /dev/null +++ b/package/libffi/0003-libffi-enable-hardfloat-in-the-MIPS-assembly-code.patch @@ -0,0 +1,41 @@ +From 48bc37fabbc685b1e3293055bd33ca66c619305e Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Wed, 13 Jan 2016 14:49:59 +0000 +Subject: [PATCH] libffi: enable hardfloat in the MIPS assembly code + +This way it will be possible to build it for soft-float. This is only a +temporary fix. The package needs to be fixed properly. + +Signed-off-by: Vicente Olivert Riera +--- + src/mips/n32.S | 1 + + src/mips/o32.S | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/mips/n32.S b/src/mips/n32.S +index c6985d3..dc842d5 100644 +--- a/src/mips/n32.S ++++ b/src/mips/n32.S +@@ -44,6 +44,7 @@ + .abicalls + #endif + .set mips4 ++ .set hardfloat + .text + .align 2 + .globl ffi_call_N32 +diff --git a/src/mips/o32.S b/src/mips/o32.S +index eb27981..b653daf 100644 +--- a/src/mips/o32.S ++++ b/src/mips/o32.S +@@ -42,6 +42,7 @@ + #define RA_OFF (SIZEOF_FRAME - 1 * FFI_SIZEOF_ARG) + + .abicalls ++ .set hardfloat + .text + .align 2 + .globl ffi_call_O32 +-- +2.4.10 + diff --git a/package/libffi/Config.in b/package/libffi/Config.in new file mode 100644 index 0000000000..6edf570baf --- /dev/null +++ b/package/libffi/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBFFI + bool "libffi" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + The libffi library provides a portable, high level + programming interface to various calling conventions. This + allows a programmer to call any function specified by a call + interface description at run-time. + + http://sourceware.org/libffi/ + +comment "libffi needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libffi/libffi.hash b/package/libffi/libffi.hash new file mode 100644 index 0000000000..63a9203f9b --- /dev/null +++ b/package/libffi/libffi.hash @@ -0,0 +1,2 @@ +# From ftp://sourceware.org/pub/libffi/sha512.sum +sha512 980ca30a8d76f963fca722432b1fe5af77d7a4e4d2eac5144fbc5374d4c596609a293440573f4294207e1bdd9fda80ad1e1cafb2ffb543df5a275bc3bd546483 libffi-3.2.1.tar.gz diff --git a/package/libffi/libffi.mk b/package/libffi/libffi.mk new file mode 100644 index 0000000000..38ef2d60d0 --- /dev/null +++ b/package/libffi/libffi.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# libffi +# +################################################################################ + +LIBFFI_VERSION = 3.2.1 +LIBFFI_SITE = ftp://sourceware.org/pub/libffi +LIBFFI_LICENSE = MIT +LIBFFI_LICENSE_FILES = LICENSE +LIBFFI_INSTALL_STAGING = YES +LIBFFI_AUTORECONF = YES + +# Move the headers to the usual location, and adjust the .pc file +# accordingly. +define LIBFFI_MOVE_HEADERS + mv $(1)/usr/lib/libffi-$(LIBFFI_VERSION)/include/*.h $(1)/usr/include/ + $(SED) '/^includedir.*/d' -e '/^Cflags:.*/d' \ + $(1)/usr/lib/pkgconfig/libffi.pc + rm -rf $(1)/usr/lib/libffi-* +endef + +LIBFFI_MOVE_STAGING_HEADERS = $(call LIBFFI_MOVE_HEADERS,$(STAGING_DIR)) +LIBFFI_POST_INSTALL_STAGING_HOOKS += LIBFFI_MOVE_STAGING_HEADERS + +HOST_LIBFFI_MOVE_HOST_HEADERS = $(call LIBFFI_MOVE_HEADERS,$(HOST_DIR)) +HOST_LIBFFI_POST_INSTALL_HOOKS += HOST_LIBFFI_MOVE_HOST_HEADERS + +# Remove headers that are not at the usual location from the target +define LIBFFI_REMOVE_TARGET_HEADERS + $(RM) -rf $(TARGET_DIR)/usr/lib/libffi-$(LIBFFI_VERSION) +endef + +LIBFFI_POST_INSTALL_TARGET_HOOKS += LIBFFI_REMOVE_TARGET_HEADERS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libfm-extra/Config.in b/package/libfm-extra/Config.in new file mode 100644 index 0000000000..f0e0b631d7 --- /dev/null +++ b/package/libfm-extra/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBFM_EXTRA + bool "libfm-extra" + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + help + The libfm-extra package contains a library and other files + required by menu-cache-gen libexec of menu-cache-1.0.0 + + http://wiki.lxde.org/en/Libfm + +comment "libfm-extra needs a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libfm-extra/libfm-extra.hash b/package/libfm-extra/libfm-extra.hash new file mode 100644 index 0000000000..5311deccfa --- /dev/null +++ b/package/libfm-extra/libfm-extra.hash @@ -0,0 +1,2 @@ +# From http://blog.lxde.org/?p=1280 +sha1 c3f2f34086761d89d6aba549883610084ba00750 libfm-1.2.3.tar.xz diff --git a/package/libfm-extra/libfm-extra.mk b/package/libfm-extra/libfm-extra.mk new file mode 100644 index 0000000000..f5b1928868 --- /dev/null +++ b/package/libfm-extra/libfm-extra.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libfm-extra +# +################################################################################ + +LIBFM_EXTRA_VERSION = 1.2.3 +LIBFM_EXTRA_SOURCE = libfm-$(LIBFM_EXTRA_VERSION).tar.xz +LIBFM_EXTRA_SITE = http://sourceforge.net/projects/pcmanfm/files +LIBFM_EXTRA_DEPENDENCIES = libglib2 host-intltool +LIBFM_EXTRA_LICENSE = GPLv2+, LGPLv2.1+ +LIBFM_EXTRA_LICENSE_FILES = COPYING src/extra/fm-xml-file.c +LIBFM_EXTRA_INSTALL_STAGING = YES +LIBFM_EXTRA_CONF_OPTS = --with-extra-only --with-gtk=no + +$(eval $(autotools-package)) diff --git a/package/libfm/Config.in b/package/libfm/Config.in new file mode 100644 index 0000000000..603b4d51ee --- /dev/null +++ b/package/libfm/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_LIBFM + bool "libfm" + select BR2_PACKAGE_MENU_CACHE + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_CAIRO + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + depends on BR2_INSTALL_LIBSTDCPP # libgtk2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk2 -> pango -> harfbuzz + help + A glib/gio-based library providing some file management + utilities and related-widgets missing in gtk+/glib. This is + the core of PCManFM. The library is desktop independent + (not LXDE specific) and has clean API. It can be used to + develop other applications requiring file management + functionality. For example, you can create your own file + manager with facilities provided by libfm. + + http://wiki.lxde.org/en/Libfm + +comment "libfm needs X.org and a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_XORG7 diff --git a/package/libfm/libfm.hash b/package/libfm/libfm.hash new file mode 100644 index 0000000000..5311deccfa --- /dev/null +++ b/package/libfm/libfm.hash @@ -0,0 +1,2 @@ +# From http://blog.lxde.org/?p=1280 +sha1 c3f2f34086761d89d6aba549883610084ba00750 libfm-1.2.3.tar.xz diff --git a/package/libfm/libfm.mk b/package/libfm/libfm.mk new file mode 100644 index 0000000000..e8410d0288 --- /dev/null +++ b/package/libfm/libfm.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libfm +# +################################################################################ + +LIBFM_VERSION = 1.2.3 +LIBFM_SOURCE = libfm-$(LIBFM_VERSION).tar.xz +LIBFM_SITE = http://sourceforge.net/projects/pcmanfm/files +LIBFM_DEPENDENCIES = menu-cache libgtk2 libglib2 cairo +LIBFM_LICENSE = GPLv2+, LGPLv2.1+ +LIBFM_LICENSE_FILES = COPYING src/extra/fm-xml-file.c +LIBFM_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_LIBEXIF),y) +LIBFM_CONF_OPTS += --enable-exif +LIBFM_DEPENDENCIES += libexif +else +LIBFM_CONF_OPTS += --disable-exif +endif + +$(eval $(autotools-package)) diff --git a/package/libfreefare/Config.in b/package/libfreefare/Config.in new file mode 100644 index 0000000000..2bb0c93ddf --- /dev/null +++ b/package/libfreefare/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBFREEFARE + bool "libfreefare" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBNFC + help + Library for high level manipulation of MIFARE cards. + + http://nfc-tools.org/index.php?title=Libfreefare + +comment "libfreefare needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libfreefare/libfreefare.hash b/package/libfreefare/libfreefare.hash new file mode 100644 index 0000000000..4d231368b4 --- /dev/null +++ b/package/libfreefare/libfreefare.hash @@ -0,0 +1,2 @@ +# From https://github.com/nfc-tools/libfreefare/releases/download/libfreefare-0.4.0/libfreefare-0.4.0.tar.bz2 +sha256 bfa31d14a99a1247f5ed49195d6373de512e3eb75bf1627658b40cf7f876bc64 libfreefare-0.4.0.tar.bz2 diff --git a/package/libfreefare/libfreefare.mk b/package/libfreefare/libfreefare.mk new file mode 100644 index 0000000000..e2d7bf1245 --- /dev/null +++ b/package/libfreefare/libfreefare.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libfreefare +# +################################################################################ + +LIBFREEFARE_VERSION = 0.4.0 +LIBFREEFARE_SOURCE = libfreefare-$(LIBFREEFARE_VERSION).tar.bz2 +# Do not use the github helper here, the generated tarball is *NOT* +# the same as the one uploaded by upstream for the release. +LIBFREEFARE_SITE = https://github.com/nfc-tools/libfreefare/releases/download/libfreefare-$(LIBFREEFARE_VERSION) +LIBFREEFARE_DEPENDENCIES = libnfc openssl +LIBFREEFARE_LICENSE = LGPLv3+ with exception +LIBFREEFARE_LICENSE_FILES = COPYING + +ifeq ($(BR2_STATIC_LIBS),y) +# openssl needs zlib even if the libfreefare example itself doesn't +LIBFREEFARE_CONF_ENV += LIBS='-lz' +endif + +$(eval $(autotools-package)) diff --git a/package/libfreeglut/Config.in b/package/libfreeglut/Config.in new file mode 100644 index 0000000000..e09e7efe89 --- /dev/null +++ b/package/libfreeglut/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBFREEGLUT + bool "libfreeglut" + select BR2_PACKAGE_LIBGLU + select BR2_PACKAGE_XLIB_LIBXI + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBXXF86VM + depends on BR2_PACKAGE_HAS_LIBGL + depends on BR2_PACKAGE_XORG7 + help + FreeGLUT is a free-software/open-source alternative to the + OpenGL Utility Toolkit (GLUT) library. GLUT (and hence + FreeGLUT) takes care of all the system-specific chores required + for creating windows, initializing OpenGL contexts, and + handling input events, to allow for trully portable OpenGL + programs. + + http://freeglut.sourceforge.net + +comment "libfreeglut depends on X.org and needs an OpenGL backend" + depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_HAS_LIBGL diff --git a/package/libfreeglut/libfreeglut.hash b/package/libfreeglut/libfreeglut.hash new file mode 100644 index 0000000000..a69a0b41d1 --- /dev/null +++ b/package/libfreeglut/libfreeglut.hash @@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/freeglut/files/freeglut/3.0.0/ +sha1 fca52242f9344627a30f11487ee42002e6b0dacd freeglut-3.0.0.tar.gz diff --git a/package/libfreeglut/libfreeglut.mk b/package/libfreeglut/libfreeglut.mk new file mode 100644 index 0000000000..507cb523ab --- /dev/null +++ b/package/libfreeglut/libfreeglut.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# libfreeglut +# +################################################################################ + +LIBFREEGLUT_VERSION = 3.0.0 +LIBFREEGLUT_SOURCE = freeglut-$(LIBFREEGLUT_VERSION).tar.gz +LIBFREEGLUT_SITE = http://downloads.sourceforge.net/freeglut +LIBFREEGLUT_LICENSE = MIT +LIBFREEGLUT_LICENSE_FILES = COPYING +LIBFREEGLUT_INSTALL_STAGING = YES +LIBFREEGLUT_DEPENDENCIES = \ + libgl \ + libglu \ + xlib_libXi \ + xlib_libXrandr \ + xlib_libXxf86vm + +LIBFREEGLUT_CONF_OPTS = -DFREEGLUT_BUILD_DEMOS=OFF + +# package depends on X.org which depends on !BR2_STATIC_LIBS +ifeq ($(BR2_SHARED_LIBS),y) +LIBFREEGLUT_CONF_OPTS += \ + -DFREEGLUT_BUILD_SHARED_LIBS=ON \ + -DFREEGLUT_BUILD_STATIC_LIBS=OFF +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +LIBFREEGLUT_CONF_OPTS += \ + -DFREEGLUT_BUILD_SHARED_LIBS=ON \ + -DFREEGLUT_BUILD_STATIC_LIBS=ON +endif + +$(eval $(cmake-package)) diff --git a/package/libfreeimage/0001-no-root-install.patch b/package/libfreeimage/0001-no-root-install.patch new file mode 100644 index 0000000000..54756d8e9e --- /dev/null +++ b/package/libfreeimage/0001-no-root-install.patch @@ -0,0 +1,20 @@ +Makefile.gnu: allow non-root install by not enforcing root ownserhip + +Signed-off-by: Rémi Rérolle + +diff -ruN a/Makefile.gnu b/Makefile.gnu +--- a/Makefile.gnu 2015-04-09 16:34:02.315316841 +0200 ++++ b/Makefile.gnu 2015-04-09 16:34:28.875483201 +0200 +@@ -71,9 +71,9 @@ + + install: + install -d $(INCDIR) $(INSTALLDIR) +- install -m 644 -o root -g root $(HEADER) $(INCDIR) +- install -m 644 -o root -g root $(STATICLIB) $(INSTALLDIR) +- install -m 755 -o root -g root $(SHAREDLIB) $(INSTALLDIR) ++ install -m 644 $(HEADER) $(INCDIR) ++ install -m 644 $(STATICLIB) $(INSTALLDIR) ++ install -m 755 $(SHAREDLIB) $(INSTALLDIR) + ln -sf $(SHAREDLIB) $(INSTALLDIR)/$(VERLIBNAME) + ln -sf $(VERLIBNAME) $(INSTALLDIR)/$(LIBNAME) + # ldconfig diff --git a/package/libfreeimage/0002-fix-cpuid-x86.patch b/package/libfreeimage/0002-fix-cpuid-x86.patch new file mode 100644 index 0000000000..98b0e9c6e3 --- /dev/null +++ b/package/libfreeimage/0002-fix-cpuid-x86.patch @@ -0,0 +1,67 @@ +Fix build issue caused by invalid register usage on x86 + +Patch taken from https://github.com/openexr/openexr/issues/128. + +Signed-off-by: Thomas Petazzoni + +Index: b/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp +=================================================================== +--- a/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp ++++ b/Source/OpenEXR/IlmImf/ImfSystemSpecific.cpp +@@ -40,21 +40,19 @@ + + namespace { + #if defined(IMF_HAVE_SSE2) && defined(__GNUC__) +- ++#include + // Helper functions for gcc + SSE enabled +- void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx) ++ void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx, ++ unsigned int &ecx, unsigned int &edx) + { +- __asm__ __volatile__ ( +- "cpuid" +- : /* Output */ "=a"(eax), "=b"(ebx), "=c"(ecx), "=d"(edx) +- : /* Input */ "a"(n) +- : /* Clobber */); ++ __get_cpuid(n, &eax, &ebx, &ecx, &edx); + } + + #else // IMF_HAVE_SSE2 && __GNUC__ + + // Helper functions for generic compiler - all disabled +- void cpuid(int n, int &eax, int &ebx, int &ecx, int &edx) ++ void cpuid(unsigned int n, unsigned int &eax, unsigned int &ebx, ++ unsigned int &ecx, unsigned int &edx) + { + eax = ebx = ecx = edx = 0; + } +@@ -64,7 +62,7 @@ + + #ifdef OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX + +- void xgetbv(int n, int &eax, int &edx) ++ void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx) + { + __asm__ __volatile__ ( + "xgetbv" +@@ -75,7 +73,7 @@ + + #else // OPENEXR_IMF_HAVE_GCC_INLINE_ASM_AVX + +- void xgetbv(int n, int &eax, int &edx) ++ void xgetbv(unsigned int n, unsigned int &eax, unsigned int &edx) + { + eax = edx = 0; + } +@@ -94,8 +92,8 @@ + f16c(false) + { + bool osxsave = false; +- int max = 0; +- int eax, ebx, ecx, edx; ++ unsigned int max = 0; ++ unsigned int eax, ebx, ecx, edx; + + cpuid(0, max, ebx, ecx, edx); + if (max > 0) diff --git a/package/libfreeimage/0003-LibWebP-fix-compilation-issue-with-GCC-5.x-C-11.patch b/package/libfreeimage/0003-LibWebP-fix-compilation-issue-with-GCC-5.x-C-11.patch new file mode 100644 index 0000000000..6964827cca --- /dev/null +++ b/package/libfreeimage/0003-LibWebP-fix-compilation-issue-with-GCC-5.x-C-11.patch @@ -0,0 +1,1172 @@ +From 44bce1b66c1cdd5308ac3ac773ea0a53d83790fd Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Tue, 24 Nov 2015 21:16:39 +0100 +Subject: [PATCH] LibWebP: fix compilation issue with GCC 5.x / C++11 + +GCC 5.1 / C++11 gets confused about the "#" in the inline assembly +code, and dies with errors like: + +Source/LibWebP/./src/dsp/dsp.upsampling_mips_dsp_r2.c:37:34: error: invalid +character ' ' in raw string delimiter + +Fix it by introducting white space around the string literals like it has +been done in upstream webp: + +https://chromium.googlesource.com/webm/libwebp/+/eebaf97f5a1cb713d81d311308d8a48c124e5aef + +Discussed upstream: +http://sourceforge.net/p/freeimage/discussion/36110/thread/605ef8e4/ + +[Scripted by sed -i 's/"\(#[A-Z0-9]*\)"/" \1 "/g' *.c] +Signed-off-by: Peter Korsgaard +--- + Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c | 28 +- + Source/LibWebP/src/dsp/dsp.enc_mips32.c | 314 ++++++++++----------- + Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c | 288 +++++++++---------- + Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c | 10 +- + Source/LibWebP/src/dsp/dsp.lossless_mips32.c | 34 +-- + Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c | 8 +- + .../LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c | 18 +- + Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c | 10 +- + 8 files changed, 355 insertions(+), 355 deletions(-) + +diff --git a/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c +index dac2c93..aaa8111 100644 +--- a/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c ++++ b/Source/LibWebP/src/dsp/dsp.dec_mips_dsp_r2.c +@@ -548,10 +548,10 @@ static void SimpleVFilter16(uint8_t* p, int stride, int thresh) { + // TEMP3 = SRC[D + D1 * BPS] + #define LOAD_4_BYTES(TEMP0, TEMP1, TEMP2, TEMP3, \ + A, A1, B, B1, C, C1, D, D1, SRC) \ +- "lbu %["#TEMP0"], "#A"+"#A1"*"XSTR(BPS)"(%["#SRC"]) \n\t" \ +- "lbu %["#TEMP1"], "#B"+"#B1"*"XSTR(BPS)"(%["#SRC"]) \n\t" \ +- "lbu %["#TEMP2"], "#C"+"#C1"*"XSTR(BPS)"(%["#SRC"]) \n\t" \ +- "lbu %["#TEMP3"], "#D"+"#D1"*"XSTR(BPS)"(%["#SRC"]) \n\t" \ ++ "lbu %[" #TEMP0 "], " #A "+" #A1 "*"XSTR(BPS)"(%[" #SRC "]) \n\t" \ ++ "lbu %[" #TEMP1 "], " #B "+" #B1 "*"XSTR(BPS)"(%[" #SRC "]) \n\t" \ ++ "lbu %[" #TEMP2 "], " #C "+" #C1 "*"XSTR(BPS)"(%[" #SRC "]) \n\t" \ ++ "lbu %[" #TEMP3 "], " #D "+" #D1 "*"XSTR(BPS)"(%[" #SRC "]) \n\t" \ + + static void SimpleHFilter16(uint8_t* p, int stride, int thresh) { + int i; +@@ -623,8 +623,8 @@ static void SimpleHFilter16i(uint8_t* p, int stride, int thresh) { + // DST[A * BPS] = TEMP0 + // DST[B + C * BPS] = TEMP1 + #define STORE_8_BYTES(TEMP0, TEMP1, A, B, C, DST) \ +- "usw %["#TEMP0"], "#A"*"XSTR(BPS)"(%["#DST"]) \n\t" \ +- "usw %["#TEMP1"], "#B"+"#C"*"XSTR(BPS)"(%["#DST"]) \n\t" ++ "usw %[" #TEMP0 "], " #A "*"XSTR(BPS)"(%[" #DST "]) \n\t" \ ++ "usw %[" #TEMP1 "], " #B "+" #C "*"XSTR(BPS)"(%[" #DST "]) \n\t" + + static void VE4(uint8_t* dst) { // vertical + const uint8_t* top = dst - BPS; +@@ -725,8 +725,8 @@ static void RD4(uint8_t* dst) { // Down-right + // TEMP0 = SRC[A * BPS] + // TEMP1 = SRC[B + C * BPS] + #define LOAD_8_BYTES(TEMP0, TEMP1, A, B, C, SRC) \ +- "ulw %["#TEMP0"], "#A"*"XSTR(BPS)"(%["#SRC"]) \n\t" \ +- "ulw %["#TEMP1"], "#B"+"#C"*"XSTR(BPS)"(%["#SRC"]) \n\t" ++ "ulw %[" #TEMP0 "], " #A "*"XSTR(BPS)"(%[" #SRC "]) \n\t" \ ++ "ulw %[" #TEMP1 "], " #B "+" #C "*"XSTR(BPS)"(%[" #SRC "]) \n\t" + + static void LD4(uint8_t* dst) { // Down-Left + int temp0, temp1, temp2, temp3, temp4; +@@ -873,24 +873,24 @@ static void DC8uvNoTop(uint8_t* dst) { // DC with no top samples + #define CLIPPING(SIZE) \ + "preceu.ph.qbl %[temp2], %[temp0] \n\t" \ + "preceu.ph.qbr %[temp0], %[temp0] \n\t" \ +-".if "#SIZE" == 8 \n\t" \ ++".if " #SIZE " == 8 \n\t" \ + "preceu.ph.qbl %[temp3], %[temp1] \n\t" \ + "preceu.ph.qbr %[temp1], %[temp1] \n\t" \ + ".endif \n\t" \ + "addu.ph %[temp2], %[temp2], %[dst_1] \n\t" \ + "addu.ph %[temp0], %[temp0], %[dst_1] \n\t" \ +-".if "#SIZE" == 8 \n\t" \ ++".if " #SIZE " == 8 \n\t" \ + "addu.ph %[temp3], %[temp3], %[dst_1] \n\t" \ + "addu.ph %[temp1], %[temp1], %[dst_1] \n\t" \ + ".endif \n\t" \ + "shll_s.ph %[temp2], %[temp2], 7 \n\t" \ + "shll_s.ph %[temp0], %[temp0], 7 \n\t" \ +-".if "#SIZE" == 8 \n\t" \ ++".if " #SIZE " == 8 \n\t" \ + "shll_s.ph %[temp3], %[temp3], 7 \n\t" \ + "shll_s.ph %[temp1], %[temp1], 7 \n\t" \ + ".endif \n\t" \ + "precrqu_s.qb.ph %[temp0], %[temp2], %[temp0] \n\t" \ +-".if "#SIZE" == 8 \n\t" \ ++".if " #SIZE " == 8 \n\t" \ + "precrqu_s.qb.ph %[temp1], %[temp3], %[temp1] \n\t" \ + ".endif \n\t" + +@@ -899,7 +899,7 @@ static void DC8uvNoTop(uint8_t* dst) { // DC with no top samples + int dst_1 = ((int)(DST)[-1] << 16) + (DST)[-1]; \ + int temp0, temp1, temp2, temp3; \ + __asm__ volatile ( \ +- ".if "#SIZE" < 8 \n\t" \ ++ ".if " #SIZE " < 8 \n\t" \ + "ulw %[temp0], 0(%[top]) \n\t" \ + "subu.ph %[dst_1], %[dst_1], %[top_1] \n\t" \ + CLIPPING(4) \ +@@ -911,7 +911,7 @@ static void DC8uvNoTop(uint8_t* dst) { // DC with no top samples + CLIPPING(8) \ + "usw %[temp0], 0(%[dst]) \n\t" \ + "usw %[temp1], 4(%[dst]) \n\t" \ +- ".if "#SIZE" == 16 \n\t" \ ++ ".if " #SIZE " == 16 \n\t" \ + "ulw %[temp0], 8(%[top]) \n\t" \ + "ulw %[temp1], 12(%[top]) \n\t" \ + CLIPPING(8) \ +diff --git a/Source/LibWebP/src/dsp/dsp.enc_mips32.c b/Source/LibWebP/src/dsp/dsp.enc_mips32.c +index 545aa3a..bf1c16d 100644 +--- a/Source/LibWebP/src/dsp/dsp.enc_mips32.c ++++ b/Source/LibWebP/src/dsp/dsp.enc_mips32.c +@@ -31,26 +31,26 @@ static const int kC2 = 35468; + // TEMP0..TEMP3 - registers for corresponding tmp elements + // TEMP4..TEMP5 - temporary registers + #define VERTICAL_PASS(A, B, C, D, TEMP4, TEMP0, TEMP1, TEMP2, TEMP3) \ +- "lh %[temp16], "#A"(%[temp20]) \n\t" \ +- "lh %[temp18], "#B"(%[temp20]) \n\t" \ +- "lh %[temp17], "#C"(%[temp20]) \n\t" \ +- "lh %[temp19], "#D"(%[temp20]) \n\t" \ +- "addu %["#TEMP4"], %[temp16], %[temp18] \n\t" \ ++ "lh %[temp16], " #A "(%[temp20]) \n\t" \ ++ "lh %[temp18], " #B "(%[temp20]) \n\t" \ ++ "lh %[temp17], " #C "(%[temp20]) \n\t" \ ++ "lh %[temp19], " #D "(%[temp20]) \n\t" \ ++ "addu %[" #TEMP4 "], %[temp16], %[temp18] \n\t" \ + "subu %[temp16], %[temp16], %[temp18] \n\t" \ +- "mul %["#TEMP0"], %[temp17], %[kC2] \n\t" \ ++ "mul %[" #TEMP0 "], %[temp17], %[kC2] \n\t" \ + "mul %[temp18], %[temp19], %[kC1] \n\t" \ + "mul %[temp17], %[temp17], %[kC1] \n\t" \ + "mul %[temp19], %[temp19], %[kC2] \n\t" \ +- "sra %["#TEMP0"], %["#TEMP0"], 16 \n\n" \ ++ "sra %[" #TEMP0 "], %[" #TEMP0 "], 16 \n\n" \ + "sra %[temp18], %[temp18], 16 \n\n" \ + "sra %[temp17], %[temp17], 16 \n\n" \ + "sra %[temp19], %[temp19], 16 \n\n" \ +- "subu %["#TEMP2"], %["#TEMP0"], %[temp18] \n\t" \ +- "addu %["#TEMP3"], %[temp17], %[temp19] \n\t" \ +- "addu %["#TEMP0"], %["#TEMP4"], %["#TEMP3"] \n\t" \ +- "addu %["#TEMP1"], %[temp16], %["#TEMP2"] \n\t" \ +- "subu %["#TEMP2"], %[temp16], %["#TEMP2"] \n\t" \ +- "subu %["#TEMP3"], %["#TEMP4"], %["#TEMP3"] \n\t" ++ "subu %[" #TEMP2 "], %[" #TEMP0 "], %[temp18] \n\t" \ ++ "addu %[" #TEMP3 "], %[temp17], %[temp19] \n\t" \ ++ "addu %[" #TEMP0 "], %[" #TEMP4 "], %[" #TEMP3 "] \n\t" \ ++ "addu %[" #TEMP1 "], %[temp16], %[" #TEMP2 "] \n\t" \ ++ "subu %[" #TEMP2 "], %[temp16], %[" #TEMP2 "] \n\t" \ ++ "subu %[" #TEMP3 "], %[" #TEMP4 "], %[" #TEMP3 "] \n\t" + + // macro for one horizontal pass in ITransformOne + // MUL and STORE macros inlined +@@ -59,58 +59,58 @@ static const int kC2 = 35468; + // A - offset in bytes to load from ref and store to dst buffer + // TEMP0, TEMP4, TEMP8 and TEMP12 - registers for corresponding tmp elements + #define HORIZONTAL_PASS(A, TEMP0, TEMP4, TEMP8, TEMP12) \ +- "addiu %["#TEMP0"], %["#TEMP0"], 4 \n\t" \ +- "addu %[temp16], %["#TEMP0"], %["#TEMP8"] \n\t" \ +- "subu %[temp17], %["#TEMP0"], %["#TEMP8"] \n\t" \ +- "mul %["#TEMP0"], %["#TEMP4"], %[kC2] \n\t" \ +- "mul %["#TEMP8"], %["#TEMP12"], %[kC1] \n\t" \ +- "mul %["#TEMP4"], %["#TEMP4"], %[kC1] \n\t" \ +- "mul %["#TEMP12"], %["#TEMP12"], %[kC2] \n\t" \ +- "sra %["#TEMP0"], %["#TEMP0"], 16 \n\t" \ +- "sra %["#TEMP8"], %["#TEMP8"], 16 \n\t" \ +- "sra %["#TEMP4"], %["#TEMP4"], 16 \n\t" \ +- "sra %["#TEMP12"], %["#TEMP12"], 16 \n\t" \ +- "subu %[temp18], %["#TEMP0"], %["#TEMP8"] \n\t" \ +- "addu %[temp19], %["#TEMP4"], %["#TEMP12"] \n\t" \ +- "addu %["#TEMP0"], %[temp16], %[temp19] \n\t" \ +- "addu %["#TEMP4"], %[temp17], %[temp18] \n\t" \ +- "subu %["#TEMP8"], %[temp17], %[temp18] \n\t" \ +- "subu %["#TEMP12"], %[temp16], %[temp19] \n\t" \ ++ "addiu %[" #TEMP0 "], %[" #TEMP0 "], 4 \n\t" \ ++ "addu %[temp16], %[" #TEMP0 "], %[" #TEMP8 "] \n\t" \ ++ "subu %[temp17], %[" #TEMP0 "], %[" #TEMP8 "] \n\t" \ ++ "mul %[" #TEMP0 "], %[" #TEMP4 "], %[kC2] \n\t" \ ++ "mul %[" #TEMP8 "], %[" #TEMP12 "], %[kC1] \n\t" \ ++ "mul %[" #TEMP4 "], %[" #TEMP4 "], %[kC1] \n\t" \ ++ "mul %[" #TEMP12 "], %[" #TEMP12 "], %[kC2] \n\t" \ ++ "sra %[" #TEMP0 "], %[" #TEMP0 "], 16 \n\t" \ ++ "sra %[" #TEMP8 "], %[" #TEMP8 "], 16 \n\t" \ ++ "sra %[" #TEMP4 "], %[" #TEMP4 "], 16 \n\t" \ ++ "sra %[" #TEMP12 "], %[" #TEMP12 "], 16 \n\t" \ ++ "subu %[temp18], %[" #TEMP0 "], %[" #TEMP8 "] \n\t" \ ++ "addu %[temp19], %[" #TEMP4 "], %[" #TEMP12 "] \n\t" \ ++ "addu %[" #TEMP0 "], %[temp16], %[temp19] \n\t" \ ++ "addu %[" #TEMP4 "], %[temp17], %[temp18] \n\t" \ ++ "subu %[" #TEMP8 "], %[temp17], %[temp18] \n\t" \ ++ "subu %[" #TEMP12 "], %[temp16], %[temp19] \n\t" \ + "lw %[temp20], 0(%[args]) \n\t" \ +- "sra %["#TEMP0"], %["#TEMP0"], 3 \n\t" \ +- "sra %["#TEMP4"], %["#TEMP4"], 3 \n\t" \ +- "sra %["#TEMP8"], %["#TEMP8"], 3 \n\t" \ +- "sra %["#TEMP12"], %["#TEMP12"], 3 \n\t" \ +- "lbu %[temp16], 0+"XSTR(BPS)"*"#A"(%[temp20]) \n\t" \ +- "lbu %[temp17], 1+"XSTR(BPS)"*"#A"(%[temp20]) \n\t" \ +- "lbu %[temp18], 2+"XSTR(BPS)"*"#A"(%[temp20]) \n\t" \ +- "lbu %[temp19], 3+"XSTR(BPS)"*"#A"(%[temp20]) \n\t" \ +- "addu %["#TEMP0"], %[temp16], %["#TEMP0"] \n\t" \ +- "addu %["#TEMP4"], %[temp17], %["#TEMP4"] \n\t" \ +- "addu %["#TEMP8"], %[temp18], %["#TEMP8"] \n\t" \ +- "addu %["#TEMP12"], %[temp19], %["#TEMP12"] \n\t" \ +- "slt %[temp16], %["#TEMP0"], $zero \n\t" \ +- "slt %[temp17], %["#TEMP4"], $zero \n\t" \ +- "slt %[temp18], %["#TEMP8"], $zero \n\t" \ +- "slt %[temp19], %["#TEMP12"], $zero \n\t" \ +- "movn %["#TEMP0"], $zero, %[temp16] \n\t" \ +- "movn %["#TEMP4"], $zero, %[temp17] \n\t" \ +- "movn %["#TEMP8"], $zero, %[temp18] \n\t" \ +- "movn %["#TEMP12"], $zero, %[temp19] \n\t" \ ++ "sra %[" #TEMP0 "], %[" #TEMP0 "], 3 \n\t" \ ++ "sra %[" #TEMP4 "], %[" #TEMP4 "], 3 \n\t" \ ++ "sra %[" #TEMP8 "], %[" #TEMP8 "], 3 \n\t" \ ++ "sra %[" #TEMP12 "], %[" #TEMP12 "], 3 \n\t" \ ++ "lbu %[temp16], 0+"XSTR(BPS)"*" #A "(%[temp20]) \n\t" \ ++ "lbu %[temp17], 1+"XSTR(BPS)"*" #A "(%[temp20]) \n\t" \ ++ "lbu %[temp18], 2+"XSTR(BPS)"*" #A "(%[temp20]) \n\t" \ ++ "lbu %[temp19], 3+"XSTR(BPS)"*" #A "(%[temp20]) \n\t" \ ++ "addu %[" #TEMP0 "], %[temp16], %[" #TEMP0 "] \n\t" \ ++ "addu %[" #TEMP4 "], %[temp17], %[" #TEMP4 "] \n\t" \ ++ "addu %[" #TEMP8 "], %[temp18], %[" #TEMP8 "] \n\t" \ ++ "addu %[" #TEMP12 "], %[temp19], %[" #TEMP12 "] \n\t" \ ++ "slt %[temp16], %[" #TEMP0 "], $zero \n\t" \ ++ "slt %[temp17], %[" #TEMP4 "], $zero \n\t" \ ++ "slt %[temp18], %[" #TEMP8 "], $zero \n\t" \ ++ "slt %[temp19], %[" #TEMP12 "], $zero \n\t" \ ++ "movn %[" #TEMP0 "], $zero, %[temp16] \n\t" \ ++ "movn %[" #TEMP4 "], $zero, %[temp17] \n\t" \ ++ "movn %[" #TEMP8 "], $zero, %[temp18] \n\t" \ ++ "movn %[" #TEMP12 "], $zero, %[temp19] \n\t" \ + "addiu %[temp20], $zero, 255 \n\t" \ +- "slt %[temp16], %["#TEMP0"], %[temp20] \n\t" \ +- "slt %[temp17], %["#TEMP4"], %[temp20] \n\t" \ +- "slt %[temp18], %["#TEMP8"], %[temp20] \n\t" \ +- "slt %[temp19], %["#TEMP12"], %[temp20] \n\t" \ +- "movz %["#TEMP0"], %[temp20], %[temp16] \n\t" \ +- "movz %["#TEMP4"], %[temp20], %[temp17] \n\t" \ ++ "slt %[temp16], %[" #TEMP0 "], %[temp20] \n\t" \ ++ "slt %[temp17], %[" #TEMP4 "], %[temp20] \n\t" \ ++ "slt %[temp18], %[" #TEMP8 "], %[temp20] \n\t" \ ++ "slt %[temp19], %[" #TEMP12 "], %[temp20] \n\t" \ ++ "movz %[" #TEMP0 "], %[temp20], %[temp16] \n\t" \ ++ "movz %[" #TEMP4 "], %[temp20], %[temp17] \n\t" \ + "lw %[temp16], 8(%[args]) \n\t" \ +- "movz %["#TEMP8"], %[temp20], %[temp18] \n\t" \ +- "movz %["#TEMP12"], %[temp20], %[temp19] \n\t" \ +- "sb %["#TEMP0"], 0+"XSTR(BPS)"*"#A"(%[temp16]) \n\t" \ +- "sb %["#TEMP4"], 1+"XSTR(BPS)"*"#A"(%[temp16]) \n\t" \ +- "sb %["#TEMP8"], 2+"XSTR(BPS)"*"#A"(%[temp16]) \n\t" \ +- "sb %["#TEMP12"], 3+"XSTR(BPS)"*"#A"(%[temp16]) \n\t" ++ "movz %[" #TEMP8 "], %[temp20], %[temp18] \n\t" \ ++ "movz %[" #TEMP12 "], %[temp20], %[temp19] \n\t" \ ++ "sb %[" #TEMP0 "], 0+"XSTR(BPS)"*" #A "(%[temp16]) \n\t" \ ++ "sb %[" #TEMP4 "], 1+"XSTR(BPS)"*" #A "(%[temp16]) \n\t" \ ++ "sb %[" #TEMP8 "], 2+"XSTR(BPS)"*" #A "(%[temp16]) \n\t" \ ++ "sb %[" #TEMP12 "], 3+"XSTR(BPS)"*" #A "(%[temp16]) \n\t" + + // Does one or two inverse transforms. + static WEBP_INLINE void ITransformOne(const uint8_t* ref, const int16_t* in, +@@ -161,9 +161,9 @@ static void ITransform(const uint8_t* ref, const int16_t* in, + // K - offset in bytes (kZigzag[n] * 4) + // N - offset in bytes (n * 2) + #define QUANTIZE_ONE(J, K, N) \ +- "lh %[temp0], "#J"(%[ppin]) \n\t" \ +- "lhu %[temp1], "#J"(%[ppsharpen]) \n\t" \ +- "lw %[temp2], "#K"(%[ppzthresh]) \n\t" \ ++ "lh %[temp0], " #J "(%[ppin]) \n\t" \ ++ "lhu %[temp1], " #J "(%[ppsharpen]) \n\t" \ ++ "lw %[temp2], " #K "(%[ppzthresh]) \n\t" \ + "sra %[sign], %[temp0], 15 \n\t" \ + "xor %[coeff], %[temp0], %[sign] \n\t" \ + "subu %[coeff], %[coeff], %[sign] \n\t" \ +@@ -172,9 +172,9 @@ static void ITransform(const uint8_t* ref, const int16_t* in, + "addiu %[temp5], $zero, 0 \n\t" \ + "addiu %[level], $zero, 0 \n\t" \ + "beqz %[temp4], 2f \n\t" \ +- "lhu %[temp1], "#J"(%[ppiq]) \n\t" \ +- "lw %[temp2], "#K"(%[ppbias]) \n\t" \ +- "lhu %[temp3], "#J"(%[ppq]) \n\t" \ ++ "lhu %[temp1], " #J "(%[ppiq]) \n\t" \ ++ "lw %[temp2], " #K "(%[ppbias]) \n\t" \ ++ "lhu %[temp3], " #J "(%[ppq]) \n\t" \ + "mul %[level], %[coeff], %[temp1] \n\t" \ + "addu %[level], %[level], %[temp2] \n\t" \ + "sra %[level], %[level], 17 \n\t" \ +@@ -184,8 +184,8 @@ static void ITransform(const uint8_t* ref, const int16_t* in, + "subu %[level], %[level], %[sign] \n\t" \ + "mul %[temp5], %[level], %[temp3] \n\t" \ + "2: \n\t" \ +- "sh %[temp5], "#J"(%[ppin]) \n\t" \ +- "sh %[level], "#N"(%[pout]) \n\t" ++ "sh %[temp5], " #J "(%[ppin]) \n\t" \ ++ "sh %[level], " #N "(%[pout]) \n\t" + + static int QuantizeBlock(int16_t in[16], int16_t out[16], + const VP8Matrix* const mtx) { +@@ -254,14 +254,14 @@ static int Quantize2Blocks(int16_t in[32], int16_t out[32], + // E..H - offsets in bytes to store first results to tmp buffer + // E1..H1 - offsets in bytes to store second results to tmp buffer + #define HORIZONTAL_PASS(A, E, F, G, H, E1, F1, G1, H1) \ +- "lbu %[temp0], 0+"XSTR(BPS)"*"#A"(%[a]) \n\t" \ +- "lbu %[temp1], 1+"XSTR(BPS)"*"#A"(%[a]) \n\t" \ +- "lbu %[temp2], 2+"XSTR(BPS)"*"#A"(%[a]) \n\t" \ +- "lbu %[temp3], 3+"XSTR(BPS)"*"#A"(%[a]) \n\t" \ +- "lbu %[temp4], 0+"XSTR(BPS)"*"#A"(%[b]) \n\t" \ +- "lbu %[temp5], 1+"XSTR(BPS)"*"#A"(%[b]) \n\t" \ +- "lbu %[temp6], 2+"XSTR(BPS)"*"#A"(%[b]) \n\t" \ +- "lbu %[temp7], 3+"XSTR(BPS)"*"#A"(%[b]) \n\t" \ ++ "lbu %[temp0], 0+"XSTR(BPS)"*" #A "(%[a]) \n\t" \ ++ "lbu %[temp1], 1+"XSTR(BPS)"*" #A "(%[a]) \n\t" \ ++ "lbu %[temp2], 2+"XSTR(BPS)"*" #A "(%[a]) \n\t" \ ++ "lbu %[temp3], 3+"XSTR(BPS)"*" #A "(%[a]) \n\t" \ ++ "lbu %[temp4], 0+"XSTR(BPS)"*" #A "(%[b]) \n\t" \ ++ "lbu %[temp5], 1+"XSTR(BPS)"*" #A "(%[b]) \n\t" \ ++ "lbu %[temp6], 2+"XSTR(BPS)"*" #A "(%[b]) \n\t" \ ++ "lbu %[temp7], 3+"XSTR(BPS)"*" #A "(%[b]) \n\t" \ + "addu %[temp8], %[temp0], %[temp2] \n\t" \ + "subu %[temp0], %[temp0], %[temp2] \n\t" \ + "addu %[temp2], %[temp1], %[temp3] \n\t" \ +@@ -278,14 +278,14 @@ static int Quantize2Blocks(int16_t in[32], int16_t out[32], + "subu %[temp3], %[temp3], %[temp6] \n\t" \ + "addu %[temp6], %[temp4], %[temp5] \n\t" \ + "subu %[temp4], %[temp4], %[temp5] \n\t" \ +- "sw %[temp7], "#E"(%[tmp]) \n\t" \ +- "sw %[temp2], "#H"(%[tmp]) \n\t" \ +- "sw %[temp8], "#F"(%[tmp]) \n\t" \ +- "sw %[temp0], "#G"(%[tmp]) \n\t" \ +- "sw %[temp1], "#E1"(%[tmp]) \n\t" \ +- "sw %[temp3], "#H1"(%[tmp]) \n\t" \ +- "sw %[temp6], "#F1"(%[tmp]) \n\t" \ +- "sw %[temp4], "#G1"(%[tmp]) \n\t" ++ "sw %[temp7], " #E "(%[tmp]) \n\t" \ ++ "sw %[temp2], " #H "(%[tmp]) \n\t" \ ++ "sw %[temp8], " #F "(%[tmp]) \n\t" \ ++ "sw %[temp0], " #G "(%[tmp]) \n\t" \ ++ "sw %[temp1], " #E1 "(%[tmp]) \n\t" \ ++ "sw %[temp3], " #H1 "(%[tmp]) \n\t" \ ++ "sw %[temp6], " #F1 "(%[tmp]) \n\t" \ ++ "sw %[temp4], " #G1 "(%[tmp]) \n\t" + + // macro for one vertical pass in Disto4x4 (TTransform) + // two calls of function TTransform are merged into single one +@@ -300,10 +300,10 @@ static int Quantize2Blocks(int16_t in[32], int16_t out[32], + // A1..D1 - offsets in bytes to load second results from tmp buffer + // E..H - offsets in bytes to load from w buffer + #define VERTICAL_PASS(A, B, C, D, A1, B1, C1, D1, E, F, G, H) \ +- "lw %[temp0], "#A1"(%[tmp]) \n\t" \ +- "lw %[temp1], "#C1"(%[tmp]) \n\t" \ +- "lw %[temp2], "#B1"(%[tmp]) \n\t" \ +- "lw %[temp3], "#D1"(%[tmp]) \n\t" \ ++ "lw %[temp0], " #A1 "(%[tmp]) \n\t" \ ++ "lw %[temp1], " #C1 "(%[tmp]) \n\t" \ ++ "lw %[temp2], " #B1 "(%[tmp]) \n\t" \ ++ "lw %[temp3], " #D1 "(%[tmp]) \n\t" \ + "addu %[temp8], %[temp0], %[temp1] \n\t" \ + "subu %[temp0], %[temp0], %[temp1] \n\t" \ + "addu %[temp1], %[temp2], %[temp3] \n\t" \ +@@ -324,18 +324,18 @@ static int Quantize2Blocks(int16_t in[32], int16_t out[32], + "subu %[temp1], %[temp1], %[temp5] \n\t" \ + "subu %[temp0], %[temp0], %[temp6] \n\t" \ + "subu %[temp8], %[temp8], %[temp7] \n\t" \ +- "lhu %[temp4], "#E"(%[w]) \n\t" \ +- "lhu %[temp5], "#F"(%[w]) \n\t" \ +- "lhu %[temp6], "#G"(%[w]) \n\t" \ +- "lhu %[temp7], "#H"(%[w]) \n\t" \ ++ "lhu %[temp4], " #E "(%[w]) \n\t" \ ++ "lhu %[temp5], " #F "(%[w]) \n\t" \ ++ "lhu %[temp6], " #G "(%[w]) \n\t" \ ++ "lhu %[temp7], " #H "(%[w]) \n\t" \ + "madd %[temp4], %[temp3] \n\t" \ + "madd %[temp5], %[temp1] \n\t" \ + "madd %[temp6], %[temp0] \n\t" \ + "madd %[temp7], %[temp8] \n\t" \ +- "lw %[temp0], "#A"(%[tmp]) \n\t" \ +- "lw %[temp1], "#C"(%[tmp]) \n\t" \ +- "lw %[temp2], "#B"(%[tmp]) \n\t" \ +- "lw %[temp3], "#D"(%[tmp]) \n\t" \ ++ "lw %[temp0], " #A "(%[tmp]) \n\t" \ ++ "lw %[temp1], " #C "(%[tmp]) \n\t" \ ++ "lw %[temp2], " #B "(%[tmp]) \n\t" \ ++ "lw %[temp3], " #D "(%[tmp]) \n\t" \ + "addu %[temp8], %[temp0], %[temp1] \n\t" \ + "subu %[temp0], %[temp0], %[temp1] \n\t" \ + "addu %[temp1], %[temp2], %[temp3] \n\t" \ +@@ -413,70 +413,70 @@ static int Disto16x16(const uint8_t* const a, const uint8_t* const b, + // A - offset in bytes to load from src and ref buffers + // TEMP0..TEMP3 - registers for corresponding tmp elements + #define HORIZONTAL_PASS(A, TEMP0, TEMP1, TEMP2, TEMP3) \ +- "lw %["#TEMP1"], 0(%[args]) \n\t" \ +- "lw %["#TEMP2"], 4(%[args]) \n\t" \ +- "lbu %[temp16], 0+"XSTR(BPS)"*"#A"(%["#TEMP1"]) \n\t" \ +- "lbu %[temp17], 0+"XSTR(BPS)"*"#A"(%["#TEMP2"]) \n\t" \ +- "lbu %[temp18], 1+"XSTR(BPS)"*"#A"(%["#TEMP1"]) \n\t" \ +- "lbu %[temp19], 1+"XSTR(BPS)"*"#A"(%["#TEMP2"]) \n\t" \ ++ "lw %[" #TEMP1 "], 0(%[args]) \n\t" \ ++ "lw %[" #TEMP2 "], 4(%[args]) \n\t" \ ++ "lbu %[temp16], 0+"XSTR(BPS)"*" #A "(%[" #TEMP1 "]) \n\t" \ ++ "lbu %[temp17], 0+"XSTR(BPS)"*" #A "(%[" #TEMP2 "]) \n\t" \ ++ "lbu %[temp18], 1+"XSTR(BPS)"*" #A "(%[" #TEMP1 "]) \n\t" \ ++ "lbu %[temp19], 1+"XSTR(BPS)"*" #A "(%[" #TEMP2 "]) \n\t" \ + "subu %[temp20], %[temp16], %[temp17] \n\t" \ +- "lbu %[temp16], 2+"XSTR(BPS)"*"#A"(%["#TEMP1"]) \n\t" \ +- "lbu %[temp17], 2+"XSTR(BPS)"*"#A"(%["#TEMP2"]) \n\t" \ +- "subu %["#TEMP0"], %[temp18], %[temp19] \n\t" \ +- "lbu %[temp18], 3+"XSTR(BPS)"*"#A"(%["#TEMP1"]) \n\t" \ +- "lbu %[temp19], 3+"XSTR(BPS)"*"#A"(%["#TEMP2"]) \n\t" \ +- "subu %["#TEMP1"], %[temp16], %[temp17] \n\t" \ +- "subu %["#TEMP2"], %[temp18], %[temp19] \n\t" \ +- "addu %["#TEMP3"], %[temp20], %["#TEMP2"] \n\t" \ +- "subu %["#TEMP2"], %[temp20], %["#TEMP2"] \n\t" \ +- "addu %[temp20], %["#TEMP0"], %["#TEMP1"] \n\t" \ +- "subu %["#TEMP0"], %["#TEMP0"], %["#TEMP1"] \n\t" \ +- "mul %[temp16], %["#TEMP2"], %[c5352] \n\t" \ +- "mul %[temp17], %["#TEMP2"], %[c2217] \n\t" \ +- "mul %[temp18], %["#TEMP0"], %[c5352] \n\t" \ +- "mul %[temp19], %["#TEMP0"], %[c2217] \n\t" \ +- "addu %["#TEMP1"], %["#TEMP3"], %[temp20] \n\t" \ +- "subu %[temp20], %["#TEMP3"], %[temp20] \n\t" \ +- "sll %["#TEMP0"], %["#TEMP1"], 3 \n\t" \ +- "sll %["#TEMP2"], %[temp20], 3 \n\t" \ ++ "lbu %[temp16], 2+"XSTR(BPS)"*" #A "(%[" #TEMP1 "]) \n\t" \ ++ "lbu %[temp17], 2+"XSTR(BPS)"*" #A "(%[" #TEMP2 "]) \n\t" \ ++ "subu %[" #TEMP0 "], %[temp18], %[temp19] \n\t" \ ++ "lbu %[temp18], 3+"XSTR(BPS)"*" #A "(%[" #TEMP1 "]) \n\t" \ ++ "lbu %[temp19], 3+"XSTR(BPS)"*" #A "(%[" #TEMP2 "]) \n\t" \ ++ "subu %[" #TEMP1 "], %[temp16], %[temp17] \n\t" \ ++ "subu %[" #TEMP2 "], %[temp18], %[temp19] \n\t" \ ++ "addu %[" #TEMP3 "], %[temp20], %[" #TEMP2 "] \n\t" \ ++ "subu %[" #TEMP2 "], %[temp20], %[" #TEMP2 "] \n\t" \ ++ "addu %[temp20], %[" #TEMP0 "], %[" #TEMP1 "] \n\t" \ ++ "subu %[" #TEMP0 "], %[" #TEMP0 "], %[" #TEMP1 "] \n\t" \ ++ "mul %[temp16], %[" #TEMP2 "], %[c5352] \n\t" \ ++ "mul %[temp17], %[" #TEMP2 "], %[c2217] \n\t" \ ++ "mul %[temp18], %[" #TEMP0 "], %[c5352] \n\t" \ ++ "mul %[temp19], %[" #TEMP0 "], %[c2217] \n\t" \ ++ "addu %[" #TEMP1 "], %[" #TEMP3 "], %[temp20] \n\t" \ ++ "subu %[temp20], %[" #TEMP3 "], %[temp20] \n\t" \ ++ "sll %[" #TEMP0 "], %[" #TEMP1 "], 3 \n\t" \ ++ "sll %[" #TEMP2 "], %[temp20], 3 \n\t" \ + "addiu %[temp16], %[temp16], 1812 \n\t" \ + "addiu %[temp17], %[temp17], 937 \n\t" \ + "addu %[temp16], %[temp16], %[temp19] \n\t" \ + "subu %[temp17], %[temp17], %[temp18] \n\t" \ +- "sra %["#TEMP1"], %[temp16], 9 \n\t" \ +- "sra %["#TEMP3"], %[temp17], 9 \n\t" ++ "sra %[" #TEMP1 "], %[temp16], 9 \n\t" \ ++ "sra %[" #TEMP3 "], %[temp17], 9 \n\t" + + // macro for one vertical pass in FTransform + // temp0..temp15 holds tmp[0]..tmp[15] + // A..D - offsets in bytes to store to out buffer + // TEMP0, TEMP4, TEMP8 and TEMP12 - registers for corresponding tmp elements + #define VERTICAL_PASS(A, B, C, D, TEMP0, TEMP4, TEMP8, TEMP12) \ +- "addu %[temp16], %["#TEMP0"], %["#TEMP12"] \n\t" \ +- "subu %[temp19], %["#TEMP0"], %["#TEMP12"] \n\t" \ +- "addu %[temp17], %["#TEMP4"], %["#TEMP8"] \n\t" \ +- "subu %[temp18], %["#TEMP4"], %["#TEMP8"] \n\t" \ +- "mul %["#TEMP8"], %[temp19], %[c2217] \n\t" \ +- "mul %["#TEMP12"], %[temp18], %[c2217] \n\t" \ +- "mul %["#TEMP4"], %[temp19], %[c5352] \n\t" \ ++ "addu %[temp16], %[" #TEMP0 "], %[" #TEMP12 "] \n\t" \ ++ "subu %[temp19], %[" #TEMP0 "], %[" #TEMP12 "] \n\t" \ ++ "addu %[temp17], %[" #TEMP4 "], %[" #TEMP8 "] \n\t" \ ++ "subu %[temp18], %[" #TEMP4 "], %[" #TEMP8 "] \n\t" \ ++ "mul %[" #TEMP8 "], %[temp19], %[c2217] \n\t" \ ++ "mul %[" #TEMP12 "], %[temp18], %[c2217] \n\t" \ ++ "mul %[" #TEMP4 "], %[temp19], %[c5352] \n\t" \ + "mul %[temp18], %[temp18], %[c5352] \n\t" \ + "addiu %[temp16], %[temp16], 7 \n\t" \ +- "addu %["#TEMP0"], %[temp16], %[temp17] \n\t" \ +- "sra %["#TEMP0"], %["#TEMP0"], 4 \n\t" \ +- "addu %["#TEMP12"], %["#TEMP12"], %["#TEMP4"] \n\t" \ +- "subu %["#TEMP4"], %[temp16], %[temp17] \n\t" \ +- "sra %["#TEMP4"], %["#TEMP4"], 4 \n\t" \ +- "addiu %["#TEMP8"], %["#TEMP8"], 30000 \n\t" \ +- "addiu %["#TEMP12"], %["#TEMP12"], 12000 \n\t" \ +- "addiu %["#TEMP8"], %["#TEMP8"], 21000 \n\t" \ +- "subu %["#TEMP8"], %["#TEMP8"], %[temp18] \n\t" \ +- "sra %["#TEMP12"], %["#TEMP12"], 16 \n\t" \ +- "sra %["#TEMP8"], %["#TEMP8"], 16 \n\t" \ +- "addiu %[temp16], %["#TEMP12"], 1 \n\t" \ +- "movn %["#TEMP12"], %[temp16], %[temp19] \n\t" \ +- "sh %["#TEMP0"], "#A"(%[temp20]) \n\t" \ +- "sh %["#TEMP4"], "#C"(%[temp20]) \n\t" \ +- "sh %["#TEMP8"], "#D"(%[temp20]) \n\t" \ +- "sh %["#TEMP12"], "#B"(%[temp20]) \n\t" ++ "addu %[" #TEMP0 "], %[temp16], %[temp17] \n\t" \ ++ "sra %[" #TEMP0 "], %[" #TEMP0 "], 4 \n\t" \ ++ "addu %[" #TEMP12 "], %[" #TEMP12 "], %[" #TEMP4 "] \n\t" \ ++ "subu %[" #TEMP4 "], %[temp16], %[temp17] \n\t" \ ++ "sra %[" #TEMP4 "], %[" #TEMP4 "], 4 \n\t" \ ++ "addiu %[" #TEMP8 "], %[" #TEMP8 "], 30000 \n\t" \ ++ "addiu %[" #TEMP12 "], %[" #TEMP12 "], 12000 \n\t" \ ++ "addiu %[" #TEMP8 "], %[" #TEMP8 "], 21000 \n\t" \ ++ "subu %[" #TEMP8 "], %[" #TEMP8 "], %[temp18] \n\t" \ ++ "sra %[" #TEMP12 "], %[" #TEMP12 "], 16 \n\t" \ ++ "sra %[" #TEMP8 "], %[" #TEMP8 "], 16 \n\t" \ ++ "addiu %[temp16], %[" #TEMP12 "], 1 \n\t" \ ++ "movn %[" #TEMP12 "], %[temp16], %[temp19] \n\t" \ ++ "sh %[" #TEMP0 "], " #A "(%[temp20]) \n\t" \ ++ "sh %[" #TEMP4 "], " #C "(%[temp20]) \n\t" \ ++ "sh %[" #TEMP8 "], " #D "(%[temp20]) \n\t" \ ++ "sh %[" #TEMP12 "], " #B "(%[temp20]) \n\t" + + static void FTransform(const uint8_t* src, const uint8_t* ref, int16_t* out) { + int temp0, temp1, temp2, temp3, temp4, temp5, temp6, temp7, temp8; +@@ -516,14 +516,14 @@ static void FTransform(const uint8_t* src, const uint8_t* ref, int16_t* out) { + #if !defined(WORK_AROUND_GCC) + + #define GET_SSE_INNER(A, B, C, D) \ +- "lbu %[temp0], "#A"(%[a]) \n\t" \ +- "lbu %[temp1], "#A"(%[b]) \n\t" \ +- "lbu %[temp2], "#B"(%[a]) \n\t" \ +- "lbu %[temp3], "#B"(%[b]) \n\t" \ +- "lbu %[temp4], "#C"(%[a]) \n\t" \ +- "lbu %[temp5], "#C"(%[b]) \n\t" \ +- "lbu %[temp6], "#D"(%[a]) \n\t" \ +- "lbu %[temp7], "#D"(%[b]) \n\t" \ ++ "lbu %[temp0], " #A "(%[a]) \n\t" \ ++ "lbu %[temp1], " #A "(%[b]) \n\t" \ ++ "lbu %[temp2], " #B "(%[a]) \n\t" \ ++ "lbu %[temp3], " #B "(%[b]) \n\t" \ ++ "lbu %[temp4], " #C "(%[a]) \n\t" \ ++ "lbu %[temp5], " #C "(%[b]) \n\t" \ ++ "lbu %[temp6], " #D "(%[a]) \n\t" \ ++ "lbu %[temp7], " #D "(%[b]) \n\t" \ + "subu %[temp0], %[temp0], %[temp1] \n\t" \ + "subu %[temp2], %[temp2], %[temp3] \n\t" \ + "subu %[temp4], %[temp4], %[temp5] \n\t" \ +diff --git a/Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c +index ec58efe..1a3f968 100644 +--- a/Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c ++++ b/Source/LibWebP/src/dsp/dsp.enc_mips_dsp_r2.c +@@ -27,25 +27,25 @@ static const int kC2 = 35468; + // I - input (macro doesn't change it) + #define ADD_SUB_HALVES_X4(O0, O1, O2, O3, O4, O5, O6, O7, \ + I0, I1, I2, I3, I4, I5, I6, I7) \ +- "addq.ph %["#O0"], %["#I0"], %["#I1"] \n\t" \ +- "subq.ph %["#O1"], %["#I0"], %["#I1"] \n\t" \ +- "addq.ph %["#O2"], %["#I2"], %["#I3"] \n\t" \ +- "subq.ph %["#O3"], %["#I2"], %["#I3"] \n\t" \ +- "addq.ph %["#O4"], %["#I4"], %["#I5"] \n\t" \ +- "subq.ph %["#O5"], %["#I4"], %["#I5"] \n\t" \ +- "addq.ph %["#O6"], %["#I6"], %["#I7"] \n\t" \ +- "subq.ph %["#O7"], %["#I6"], %["#I7"] \n\t" ++ "addq.ph %[" #O0 "], %[" #I0 "], %[" #I1 "] \n\t" \ ++ "subq.ph %[" #O1 "], %[" #I0 "], %[" #I1 "] \n\t" \ ++ "addq.ph %[" #O2 "], %[" #I2 "], %[" #I3 "] \n\t" \ ++ "subq.ph %[" #O3 "], %[" #I2 "], %[" #I3 "] \n\t" \ ++ "addq.ph %[" #O4 "], %[" #I4 "], %[" #I5 "] \n\t" \ ++ "subq.ph %[" #O5 "], %[" #I4 "], %[" #I5 "] \n\t" \ ++ "addq.ph %[" #O6 "], %[" #I6 "], %[" #I7 "] \n\t" \ ++ "subq.ph %[" #O7 "], %[" #I6 "], %[" #I7 "] \n\t" + + // IO - input/output + #define ABS_X8(IO0, IO1, IO2, IO3, IO4, IO5, IO6, IO7) \ +- "absq_s.ph %["#IO0"], %["#IO0"] \n\t" \ +- "absq_s.ph %["#IO1"], %["#IO1"] \n\t" \ +- "absq_s.ph %["#IO2"], %["#IO2"] \n\t" \ +- "absq_s.ph %["#IO3"], %["#IO3"] \n\t" \ +- "absq_s.ph %["#IO4"], %["#IO4"] \n\t" \ +- "absq_s.ph %["#IO5"], %["#IO5"] \n\t" \ +- "absq_s.ph %["#IO6"], %["#IO6"] \n\t" \ +- "absq_s.ph %["#IO7"], %["#IO7"] \n\t" ++ "absq_s.ph %[" #IO0 "], %[" #IO0 "] \n\t" \ ++ "absq_s.ph %[" #IO1 "], %[" #IO1 "] \n\t" \ ++ "absq_s.ph %[" #IO2 "], %[" #IO2 "] \n\t" \ ++ "absq_s.ph %[" #IO3 "], %[" #IO3 "] \n\t" \ ++ "absq_s.ph %[" #IO4 "], %[" #IO4 "] \n\t" \ ++ "absq_s.ph %[" #IO5 "], %[" #IO5 "] \n\t" \ ++ "absq_s.ph %[" #IO6 "], %[" #IO6 "] \n\t" \ ++ "absq_s.ph %[" #IO7 "], %[" #IO7 "] \n\t" + + // dpa.w.ph $ac0 temp0 ,temp1 + // $ac += temp0[31..16] * temp1[31..16] + temp0[15..0] * temp1[15..0] +@@ -56,15 +56,15 @@ static const int kC2 = 35468; + #define MUL_HALF(O0, I0, I1, I2, I3, I4, I5, I6, I7, \ + I8, I9, I10, I11, I12, I13, I14, I15) \ + "mult $ac0, $zero, $zero \n\t" \ +- "dpa.w.ph $ac0, %["#I2"], %["#I0"] \n\t" \ +- "dpax.w.ph $ac0, %["#I5"], %["#I6"] \n\t" \ +- "dpa.w.ph $ac0, %["#I8"], %["#I9"] \n\t" \ +- "dpax.w.ph $ac0, %["#I11"], %["#I4"] \n\t" \ +- "dpa.w.ph $ac0, %["#I12"], %["#I7"] \n\t" \ +- "dpax.w.ph $ac0, %["#I13"], %["#I1"] \n\t" \ +- "dpa.w.ph $ac0, %["#I14"], %["#I3"] \n\t" \ +- "dpax.w.ph $ac0, %["#I15"], %["#I10"] \n\t" \ +- "mflo %["#O0"], $ac0 \n\t" ++ "dpa.w.ph $ac0, %[" #I2 "], %[" #I0 "] \n\t" \ ++ "dpax.w.ph $ac0, %[" #I5 "], %[" #I6 "] \n\t" \ ++ "dpa.w.ph $ac0, %[" #I8 "], %[" #I9 "] \n\t" \ ++ "dpax.w.ph $ac0, %[" #I11 "], %[" #I4 "] \n\t" \ ++ "dpa.w.ph $ac0, %[" #I12 "], %[" #I7 "] \n\t" \ ++ "dpax.w.ph $ac0, %[" #I13 "], %[" #I1 "] \n\t" \ ++ "dpa.w.ph $ac0, %[" #I14 "], %[" #I3 "] \n\t" \ ++ "dpax.w.ph $ac0, %[" #I15 "], %[" #I10 "] \n\t" \ ++ "mflo %[" #O0 "], $ac0 \n\t" + + #define OUTPUT_EARLY_CLOBBER_REGS_17() \ + OUTPUT_EARLY_CLOBBER_REGS_10(), \ +@@ -77,69 +77,69 @@ static const int kC2 = 35468; + // A - offset in bytes to load from src and ref buffers + // TEMP0..TEMP3 - registers for corresponding tmp elements + #define HORIZONTAL_PASS(A, TEMP0, TEMP1, TEMP2, TEMP3) \ +- "lw %["#TEMP0"], 0(%[args]) \n\t" \ +- "lw %["#TEMP1"], 4(%[args]) \n\t" \ +- "lw %["#TEMP2"], "XSTR(BPS)"*"#A"(%["#TEMP0"]) \n\t" \ +- "lw %["#TEMP3"], "XSTR(BPS)"*"#A"(%["#TEMP1"]) \n\t" \ +- "preceu.ph.qbl %["#TEMP0"], %["#TEMP2"] \n\t" \ +- "preceu.ph.qbl %["#TEMP1"], %["#TEMP3"] \n\t" \ +- "preceu.ph.qbr %["#TEMP2"], %["#TEMP2"] \n\t" \ +- "preceu.ph.qbr %["#TEMP3"], %["#TEMP3"] \n\t" \ +- "subq.ph %["#TEMP0"], %["#TEMP0"], %["#TEMP1"] \n\t" \ +- "subq.ph %["#TEMP2"], %["#TEMP2"], %["#TEMP3"] \n\t" \ +- "rotr %["#TEMP0"], %["#TEMP0"], 16 \n\t" \ +- "addq.ph %["#TEMP1"], %["#TEMP2"], %["#TEMP0"] \n\t" \ +- "subq.ph %["#TEMP3"], %["#TEMP2"], %["#TEMP0"] \n\t" \ +- "seh %["#TEMP0"], %["#TEMP1"] \n\t" \ +- "sra %[temp16], %["#TEMP1"], 16 \n\t" \ +- "seh %[temp19], %["#TEMP3"] \n\t" \ +- "sra %["#TEMP3"], %["#TEMP3"], 16 \n\t" \ +- "subu %["#TEMP2"], %["#TEMP0"], %[temp16] \n\t" \ +- "addu %["#TEMP0"], %["#TEMP0"], %[temp16] \n\t" \ ++ "lw %[" #TEMP0 "], 0(%[args]) \n\t" \ ++ "lw %[" #TEMP1 "], 4(%[args]) \n\t" \ ++ "lw %[" #TEMP2 "], "XSTR(BPS)"*" #A "(%[" #TEMP0 "]) \n\t" \ ++ "lw %[" #TEMP3 "], "XSTR(BPS)"*" #A "(%[" #TEMP1 "]) \n\t" \ ++ "preceu.ph.qbl %[" #TEMP0 "], %[" #TEMP2 "] \n\t" \ ++ "preceu.ph.qbl %[" #TEMP1 "], %[" #TEMP3 "] \n\t" \ ++ "preceu.ph.qbr %[" #TEMP2 "], %[" #TEMP2 "] \n\t" \ ++ "preceu.ph.qbr %[" #TEMP3 "], %[" #TEMP3 "] \n\t" \ ++ "subq.ph %[" #TEMP0 "], %[" #TEMP0 "], %[" #TEMP1 "] \n\t" \ ++ "subq.ph %[" #TEMP2 "], %[" #TEMP2 "], %[" #TEMP3 "] \n\t" \ ++ "rotr %[" #TEMP0 "], %[" #TEMP0 "], 16 \n\t" \ ++ "addq.ph %[" #TEMP1 "], %[" #TEMP2 "], %[" #TEMP0 "] \n\t" \ ++ "subq.ph %[" #TEMP3 "], %[" #TEMP2 "], %[" #TEMP0 "] \n\t" \ ++ "seh %[" #TEMP0 "], %[" #TEMP1 "] \n\t" \ ++ "sra %[temp16], %[" #TEMP1 "], 16 \n\t" \ ++ "seh %[temp19], %[" #TEMP3 "] \n\t" \ ++ "sra %[" #TEMP3 "], %[" #TEMP3 "], 16 \n\t" \ ++ "subu %[" #TEMP2 "], %[" #TEMP0 "], %[temp16] \n\t" \ ++ "addu %[" #TEMP0 "], %[" #TEMP0 "], %[temp16] \n\t" \ + "mul %[temp17], %[temp19], %[c2217] \n\t" \ +- "mul %[temp18], %["#TEMP3"], %[c5352] \n\t" \ +- "mul %["#TEMP1"], %[temp19], %[c5352] \n\t" \ +- "mul %[temp16], %["#TEMP3"], %[c2217] \n\t" \ +- "sll %["#TEMP2"], %["#TEMP2"], 3 \n\t" \ +- "sll %["#TEMP0"], %["#TEMP0"], 3 \n\t" \ +- "subu %["#TEMP3"], %[temp17], %[temp18] \n\t" \ +- "addu %["#TEMP1"], %[temp16], %["#TEMP1"] \n\t" \ +- "addiu %["#TEMP3"], %["#TEMP3"], 937 \n\t" \ +- "addiu %["#TEMP1"], %["#TEMP1"], 1812 \n\t" \ +- "sra %["#TEMP3"], %["#TEMP3"], 9 \n\t" \ +- "sra %["#TEMP1"], %["#TEMP1"], 9 \n\t" ++ "mul %[temp18], %[" #TEMP3 "], %[c5352] \n\t" \ ++ "mul %[" #TEMP1 "], %[temp19], %[c5352] \n\t" \ ++ "mul %[temp16], %[" #TEMP3 "], %[c2217] \n\t" \ ++ "sll %[" #TEMP2 "], %[" #TEMP2 "], 3 \n\t" \ ++ "sll %[" #TEMP0 "], %[" #TEMP0 "], 3 \n\t" \ ++ "subu %[" #TEMP3 "], %[temp17], %[temp18] \n\t" \ ++ "addu %[" #TEMP1 "], %[temp16], %[" #TEMP1 "] \n\t" \ ++ "addiu %[" #TEMP3 "], %[" #TEMP3 "], 937 \n\t" \ ++ "addiu %[" #TEMP1 "], %[" #TEMP1 "], 1812 \n\t" \ ++ "sra %[" #TEMP3 "], %[" #TEMP3 "], 9 \n\t" \ ++ "sra %[" #TEMP1 "], %[" #TEMP1 "], 9 \n\t" + + // macro for one vertical pass in FTransform + // temp0..temp15 holds tmp[0]..tmp[15] + // A..D - offsets in bytes to store to out buffer + // TEMP0, TEMP4, TEMP8 and TEMP12 - registers for corresponding tmp elements + #define VERTICAL_PASS(A, B, C, D, TEMP0, TEMP4, TEMP8, TEMP12) \ +- "addu %[temp16], %["#TEMP0"], %["#TEMP12"] \n\t" \ +- "subu %[temp19], %["#TEMP0"], %["#TEMP12"] \n\t" \ +- "addu %[temp17], %["#TEMP4"], %["#TEMP8"] \n\t" \ +- "subu %[temp18], %["#TEMP4"], %["#TEMP8"] \n\t" \ +- "mul %["#TEMP8"], %[temp19], %[c2217] \n\t" \ +- "mul %["#TEMP12"], %[temp18], %[c2217] \n\t" \ +- "mul %["#TEMP4"], %[temp19], %[c5352] \n\t" \ ++ "addu %[temp16], %[" #TEMP0 "], %[" #TEMP12 "] \n\t" \ ++ "subu %[temp19], %[" #TEMP0 "], %[" #TEMP12 "] \n\t" \ ++ "addu %[temp17], %[" #TEMP4 "], %[" #TEMP8 "] \n\t" \ ++ "subu %[temp18], %[" #TEMP4 "], %[" #TEMP8 "] \n\t" \ ++ "mul %[" #TEMP8 "], %[temp19], %[c2217] \n\t" \ ++ "mul %[" #TEMP12 "], %[temp18], %[c2217] \n\t" \ ++ "mul %[" #TEMP4 "], %[temp19], %[c5352] \n\t" \ + "mul %[temp18], %[temp18], %[c5352] \n\t" \ + "addiu %[temp16], %[temp16], 7 \n\t" \ +- "addu %["#TEMP0"], %[temp16], %[temp17] \n\t" \ +- "sra %["#TEMP0"], %["#TEMP0"], 4 \n\t" \ +- "addu %["#TEMP12"], %["#TEMP12"], %["#TEMP4"] \n\t" \ +- "subu %["#TEMP4"], %[temp16], %[temp17] \n\t" \ +- "sra %["#TEMP4"], %["#TEMP4"], 4 \n\t" \ +- "addiu %["#TEMP8"], %["#TEMP8"], 30000 \n\t" \ +- "addiu %["#TEMP12"], %["#TEMP12"], 12000 \n\t" \ +- "addiu %["#TEMP8"], %["#TEMP8"], 21000 \n\t" \ +- "subu %["#TEMP8"], %["#TEMP8"], %[temp18] \n\t" \ +- "sra %["#TEMP12"], %["#TEMP12"], 16 \n\t" \ +- "sra %["#TEMP8"], %["#TEMP8"], 16 \n\t" \ +- "addiu %[temp16], %["#TEMP12"], 1 \n\t" \ +- "movn %["#TEMP12"], %[temp16], %[temp19] \n\t" \ +- "sh %["#TEMP0"], "#A"(%[temp20]) \n\t" \ +- "sh %["#TEMP4"], "#C"(%[temp20]) \n\t" \ +- "sh %["#TEMP8"], "#D"(%[temp20]) \n\t" \ +- "sh %["#TEMP12"], "#B"(%[temp20]) \n\t" ++ "addu %[" #TEMP0 "], %[temp16], %[temp17] \n\t" \ ++ "sra %[" #TEMP0 "], %[" #TEMP0 "], 4 \n\t" \ ++ "addu %[" #TEMP12 "], %[" #TEMP12 "], %[" #TEMP4 "] \n\t" \ ++ "subu %[" #TEMP4 "], %[temp16], %[temp17] \n\t" \ ++ "sra %[" #TEMP4 "], %[" #TEMP4 "], 4 \n\t" \ ++ "addiu %[" #TEMP8 "], %[" #TEMP8 "], 30000 \n\t" \ ++ "addiu %[" #TEMP12 "], %[" #TEMP12 "], 12000 \n\t" \ ++ "addiu %[" #TEMP8 "], %[" #TEMP8 "], 21000 \n\t" \ ++ "subu %[" #TEMP8 "], %[" #TEMP8 "], %[temp18] \n\t" \ ++ "sra %[" #TEMP12 "], %[" #TEMP12 "], 16 \n\t" \ ++ "sra %[" #TEMP8 "], %[" #TEMP8 "], 16 \n\t" \ ++ "addiu %[temp16], %[" #TEMP12 "], 1 \n\t" \ ++ "movn %[" #TEMP12 "], %[temp16], %[temp19] \n\t" \ ++ "sh %[" #TEMP0 "], " #A "(%[temp20]) \n\t" \ ++ "sh %[" #TEMP4 "], " #C "(%[temp20]) \n\t" \ ++ "sh %[" #TEMP8 "], " #D "(%[temp20]) \n\t" \ ++ "sh %[" #TEMP12 "], " #B "(%[temp20]) \n\t" + + static void FTransform(const uint8_t* src, const uint8_t* ref, int16_t* out) { + const int c2217 = 2217; +@@ -329,11 +329,11 @@ static int Disto16x16(const uint8_t* const a, const uint8_t* const b, + // Intra predictions + + #define FILL_PART(J, SIZE) \ +- "usw %[value], 0+"#J"*"XSTR(BPS)"(%[dst]) \n\t" \ +- "usw %[value], 4+"#J"*"XSTR(BPS)"(%[dst]) \n\t" \ +- ".if "#SIZE" == 16 \n\t" \ +- "usw %[value], 8+"#J"*"XSTR(BPS)"(%[dst]) \n\t" \ +- "usw %[value], 12+"#J"*"XSTR(BPS)"(%[dst]) \n\t" \ ++ "usw %[value], 0+" #J "*"XSTR(BPS)"(%[dst]) \n\t" \ ++ "usw %[value], 4+" #J "*"XSTR(BPS)"(%[dst]) \n\t" \ ++ ".if " #SIZE " == 16 \n\t" \ ++ "usw %[value], 8+" #J "*"XSTR(BPS)"(%[dst]) \n\t" \ ++ "usw %[value], 12+" #J "*"XSTR(BPS)"(%[dst]) \n\t" \ + ".endif \n\t" + + #define FILL_8_OR_16(DST, VALUE, SIZE) do { \ +@@ -348,7 +348,7 @@ static int Disto16x16(const uint8_t* const a, const uint8_t* const b, + FILL_PART( 5, SIZE) \ + FILL_PART( 6, SIZE) \ + FILL_PART( 7, SIZE) \ +- ".if "#SIZE" == 16 \n\t" \ ++ ".if " #SIZE " == 16 \n\t" \ + FILL_PART( 8, 16) \ + FILL_PART( 9, 16) \ + FILL_PART(10, 16) \ +@@ -425,7 +425,7 @@ HORIZONTAL_PRED(dst, left, 16) + CLIPPING() \ + "usw %[temp0], 0(%[dst]) \n\t" \ + "usw %[temp1], 4(%[dst]) \n\t" \ +- ".if "#SIZE" == 16 \n\t" \ ++ ".if " #SIZE " == 16 \n\t" \ + "ulw %[temp0], 8(%[top]) \n\t" \ + "ulw %[temp1], 12(%[top]) \n\t" \ + CLIPPING() \ +@@ -1060,8 +1060,8 @@ static void Intra4Preds(uint8_t* dst, const uint8_t* top) { + #if !defined(WORK_AROUND_GCC) + + #define GET_SSE_INNER(A) \ +- "lw %[temp0], "#A"(%[a]) \n\t" \ +- "lw %[temp1], "#A"(%[b]) \n\t" \ ++ "lw %[temp0], " #A "(%[a]) \n\t" \ ++ "lw %[temp1], " #A "(%[b]) \n\t" \ + "preceu.ph.qbr %[temp2], %[temp0] \n\t" \ + "preceu.ph.qbl %[temp0], %[temp0] \n\t" \ + "preceu.ph.qbr %[temp3], %[temp1] \n\t" \ +@@ -1185,28 +1185,28 @@ static int SSE4x4(const uint8_t* a, const uint8_t* b) { + // N - offset in bytes (n * 2) + // N1 - offset in bytes ((n + 1) * 2) + #define QUANTIZE_ONE(J, K, N, N1) \ +- "ulw %[temp1], "#J"(%[ppin]) \n\t" \ +- "ulw %[temp2], "#J"(%[ppsharpen]) \n\t" \ +- "lhu %[temp3], "#K"(%[ppzthresh]) \n\t" \ +- "lhu %[temp6], "#K"+4(%[ppzthresh]) \n\t" \ ++ "ulw %[temp1], " #J "(%[ppin]) \n\t" \ ++ "ulw %[temp2], " #J "(%[ppsharpen]) \n\t" \ ++ "lhu %[temp3], " #K "(%[ppzthresh]) \n\t" \ ++ "lhu %[temp6], " #K "+4(%[ppzthresh]) \n\t" \ + "absq_s.ph %[temp4], %[temp1] \n\t" \ + "ins %[temp3], %[temp6], 16, 16 \n\t" \ + "addu.ph %[coeff], %[temp4], %[temp2] \n\t" \ + "shra.ph %[sign], %[temp1], 15 \n\t" \ + "li %[level], 0x10001 \n\t" \ + "cmp.lt.ph %[temp3], %[coeff] \n\t" \ +- "lhu %[temp1], "#J"(%[ppiq]) \n\t" \ ++ "lhu %[temp1], " #J "(%[ppiq]) \n\t" \ + "pick.ph %[temp5], %[level], $0 \n\t" \ +- "lw %[temp2], "#K"(%[ppbias]) \n\t" \ ++ "lw %[temp2], " #K "(%[ppbias]) \n\t" \ + "beqz %[temp5], 0f \n\t" \ +- "lhu %[temp3], "#J"(%[ppq]) \n\t" \ ++ "lhu %[temp3], " #J "(%[ppq]) \n\t" \ + "beq %[temp5], %[level], 1f \n\t" \ + "andi %[temp5], %[temp5], 0x1 \n\t" \ + "andi %[temp4], %[coeff], 0xffff \n\t" \ + "beqz %[temp5], 2f \n\t" \ + "mul %[level], %[temp4], %[temp1] \n\t" \ +- "sh $0, "#J"+2(%[ppin]) \n\t" \ +- "sh $0, "#N1"(%[pout]) \n\t" \ ++ "sh $0, " #J "+2(%[ppin]) \n\t" \ ++ "sh $0, " #N1 "(%[pout]) \n\t" \ + "addu %[level], %[level], %[temp2] \n\t" \ + "sra %[level], %[level], 17 \n\t" \ + "slt %[temp4], %[max_level], %[level] \n\t" \ +@@ -1216,15 +1216,15 @@ static int SSE4x4(const uint8_t* a, const uint8_t* b) { + "subu %[level], %[level], %[temp6] \n\t" \ + "mul %[temp5], %[level], %[temp3] \n\t" \ + "or %[ret], %[ret], %[level] \n\t" \ +- "sh %[level], "#N"(%[pout]) \n\t" \ +- "sh %[temp5], "#J"(%[ppin]) \n\t" \ ++ "sh %[level], " #N "(%[pout]) \n\t" \ ++ "sh %[temp5], " #J "(%[ppin]) \n\t" \ + "j 3f \n\t" \ + "2: \n\t" \ +- "lhu %[temp1], "#J"+2(%[ppiq]) \n\t" \ ++ "lhu %[temp1], " #J "+2(%[ppiq]) \n\t" \ + "srl %[temp5], %[coeff], 16 \n\t" \ + "mul %[level], %[temp5], %[temp1] \n\t" \ +- "lw %[temp2], "#K"+4(%[ppbias]) \n\t" \ +- "lhu %[temp3], "#J"+2(%[ppq]) \n\t" \ ++ "lw %[temp2], " #K "+4(%[ppbias]) \n\t" \ ++ "lhu %[temp3], " #J "+2(%[ppq]) \n\t" \ + "addu %[level], %[level], %[temp2] \n\t" \ + "sra %[level], %[level], 17 \n\t" \ + "srl %[temp6], %[sign], 16 \n\t" \ +@@ -1233,20 +1233,20 @@ static int SSE4x4(const uint8_t* a, const uint8_t* b) { + "xor %[level], %[level], %[temp6] \n\t" \ + "subu %[level], %[level], %[temp6] \n\t" \ + "mul %[temp5], %[level], %[temp3] \n\t" \ +- "sh $0, "#J"(%[ppin]) \n\t" \ +- "sh $0, "#N"(%[pout]) \n\t" \ ++ "sh $0, " #J "(%[ppin]) \n\t" \ ++ "sh $0, " #N "(%[pout]) \n\t" \ + "or %[ret], %[ret], %[level] \n\t" \ +- "sh %[temp5], "#J"+2(%[ppin]) \n\t" \ +- "sh %[level], "#N1"(%[pout]) \n\t" \ ++ "sh %[temp5], " #J "+2(%[ppin]) \n\t" \ ++ "sh %[level], " #N1 "(%[pout]) \n\t" \ + "j 3f \n\t" \ + "1: \n\t" \ +- "lhu %[temp1], "#J"(%[ppiq]) \n\t" \ +- "lw %[temp2], "#K"(%[ppbias]) \n\t" \ +- "ulw %[temp3], "#J"(%[ppq]) \n\t" \ ++ "lhu %[temp1], " #J "(%[ppiq]) \n\t" \ ++ "lw %[temp2], " #K "(%[ppbias]) \n\t" \ ++ "ulw %[temp3], " #J "(%[ppq]) \n\t" \ + "andi %[temp5], %[coeff], 0xffff \n\t" \ + "srl %[temp0], %[coeff], 16 \n\t" \ +- "lhu %[temp6], "#J"+2(%[ppiq]) \n\t" \ +- "lw %[coeff], "#K"+4(%[ppbias]) \n\t" \ ++ "lhu %[temp6], " #J "+2(%[ppiq]) \n\t" \ ++ "lw %[coeff], " #K "+4(%[ppbias]) \n\t" \ + "mul %[level], %[temp5], %[temp1] \n\t" \ + "mul %[temp4], %[temp0], %[temp6] \n\t" \ + "addu %[level], %[level], %[temp2] \n\t" \ +@@ -1259,15 +1259,15 @@ static int SSE4x4(const uint8_t* a, const uint8_t* b) { + "subu.ph %[level], %[level], %[sign] \n\t" \ + "mul.ph %[temp3], %[level], %[temp3] \n\t" \ + "or %[ret], %[ret], %[level] \n\t" \ +- "sh %[level], "#N"(%[pout]) \n\t" \ ++ "sh %[level], " #N "(%[pout]) \n\t" \ + "srl %[level], %[level], 16 \n\t" \ +- "sh %[level], "#N1"(%[pout]) \n\t" \ +- "usw %[temp3], "#J"(%[ppin]) \n\t" \ ++ "sh %[level], " #N1 "(%[pout]) \n\t" \ ++ "usw %[temp3], " #J "(%[ppin]) \n\t" \ + "j 3f \n\t" \ + "0: \n\t" \ +- "sh $0, "#N"(%[pout]) \n\t" \ +- "sh $0, "#N1"(%[pout]) \n\t" \ +- "usw $0, "#J"(%[ppin]) \n\t" \ ++ "sh $0, " #N "(%[pout]) \n\t" \ ++ "sh $0, " #N1 "(%[pout]) \n\t" \ ++ "usw $0, " #J "(%[ppin]) \n\t" \ + "3: \n\t" + + static int QuantizeBlock(int16_t in[16], int16_t out[16], +@@ -1326,37 +1326,37 @@ static int Quantize2Blocks(int16_t in[32], int16_t out[32], + // A, B, C, D - offset in bytes to load from in buffer + // TEMP0, TEMP1 - registers for corresponding tmp elements + #define HORIZONTAL_PASS_WHT(A, B, C, D, TEMP0, TEMP1) \ +- "lh %["#TEMP0"], "#A"(%[in]) \n\t" \ +- "lh %["#TEMP1"], "#B"(%[in]) \n\t" \ +- "lh %[temp8], "#C"(%[in]) \n\t" \ +- "lh %[temp9], "#D"(%[in]) \n\t" \ +- "ins %["#TEMP1"], %["#TEMP0"], 16, 16 \n\t" \ ++ "lh %[" #TEMP0 "], " #A "(%[in]) \n\t" \ ++ "lh %[" #TEMP1 "], " #B "(%[in]) \n\t" \ ++ "lh %[temp8], " #C "(%[in]) \n\t" \ ++ "lh %[temp9], " #D "(%[in]) \n\t" \ ++ "ins %[" #TEMP1 "], %[" #TEMP0 "], 16, 16 \n\t" \ + "ins %[temp9], %[temp8], 16, 16 \n\t" \ +- "subq.ph %[temp8], %["#TEMP1"], %[temp9] \n\t" \ +- "addq.ph %[temp9], %["#TEMP1"], %[temp9] \n\t" \ +- "precrq.ph.w %["#TEMP0"], %[temp8], %[temp9] \n\t" \ ++ "subq.ph %[temp8], %[" #TEMP1 "], %[temp9] \n\t" \ ++ "addq.ph %[temp9], %[" #TEMP1 "], %[temp9] \n\t" \ ++ "precrq.ph.w %[" #TEMP0 "], %[temp8], %[temp9] \n\t" \ + "append %[temp8], %[temp9], 16 \n\t" \ +- "subq.ph %["#TEMP1"], %["#TEMP0"], %[temp8] \n\t" \ +- "addq.ph %["#TEMP0"], %["#TEMP0"], %[temp8] \n\t" \ +- "rotr %["#TEMP1"], %["#TEMP1"], 16 \n\t" ++ "subq.ph %[" #TEMP1 "], %[" #TEMP0 "], %[temp8] \n\t" \ ++ "addq.ph %[" #TEMP0 "], %[" #TEMP0 "], %[temp8] \n\t" \ ++ "rotr %[" #TEMP1 "], %[" #TEMP1 "], 16 \n\t" + + // macro for one vertical pass in FTransformWHT + // temp0..temp7 holds tmp[0]..tmp[15] + // A, B, C, D - offsets in bytes to store to out buffer + // TEMP0, TEMP2, TEMP4 and TEMP6 - registers for corresponding tmp elements + #define VERTICAL_PASS_WHT(A, B, C, D, TEMP0, TEMP2, TEMP4, TEMP6) \ +- "addq.ph %[temp8], %["#TEMP0"], %["#TEMP4"] \n\t" \ +- "addq.ph %[temp9], %["#TEMP2"], %["#TEMP6"] \n\t" \ +- "subq.ph %["#TEMP2"], %["#TEMP2"], %["#TEMP6"] \n\t" \ +- "subq.ph %["#TEMP6"], %["#TEMP0"], %["#TEMP4"] \n\t" \ +- "addqh.ph %["#TEMP0"], %[temp8], %[temp9] \n\t" \ +- "subqh.ph %["#TEMP4"], %["#TEMP6"], %["#TEMP2"] \n\t" \ +- "addqh.ph %["#TEMP2"], %["#TEMP2"], %["#TEMP6"] \n\t" \ +- "subqh.ph %["#TEMP6"], %[temp8], %[temp9] \n\t" \ +- "usw %["#TEMP0"], "#A"(%[out]) \n\t" \ +- "usw %["#TEMP2"], "#B"(%[out]) \n\t" \ +- "usw %["#TEMP4"], "#C"(%[out]) \n\t" \ +- "usw %["#TEMP6"], "#D"(%[out]) \n\t" ++ "addq.ph %[temp8], %[" #TEMP0 "], %[" #TEMP4 "] \n\t" \ ++ "addq.ph %[temp9], %[" #TEMP2 "], %[" #TEMP6 "] \n\t" \ ++ "subq.ph %[" #TEMP2 "], %[" #TEMP2 "], %[" #TEMP6 "] \n\t" \ ++ "subq.ph %[" #TEMP6 "], %[" #TEMP0 "], %[" #TEMP4 "] \n\t" \ ++ "addqh.ph %[" #TEMP0 "], %[temp8], %[temp9] \n\t" \ ++ "subqh.ph %[" #TEMP4 "], %[" #TEMP6 "], %[" #TEMP2 "] \n\t" \ ++ "addqh.ph %[" #TEMP2 "], %[" #TEMP2 "], %[" #TEMP6 "] \n\t" \ ++ "subqh.ph %[" #TEMP6 "], %[temp8], %[temp9] \n\t" \ ++ "usw %[" #TEMP0 "], " #A "(%[out]) \n\t" \ ++ "usw %[" #TEMP2 "], " #B "(%[out]) \n\t" \ ++ "usw %[" #TEMP4 "], " #C "(%[out]) \n\t" \ ++ "usw %[" #TEMP6 "], " #D "(%[out]) \n\t" + + static void FTransformWHT(const int16_t* in, int16_t* out) { + int temp0, temp1, temp2, temp3, temp4; +@@ -1385,10 +1385,10 @@ static void FTransformWHT(const int16_t* in, int16_t* out) { + // convert 8 coeffs at time + // A, B, C, D - offsets in bytes to load from out buffer + #define CONVERT_COEFFS_TO_BIN(A, B, C, D) \ +- "ulw %[temp0], "#A"(%[out]) \n\t" \ +- "ulw %[temp1], "#B"(%[out]) \n\t" \ +- "ulw %[temp2], "#C"(%[out]) \n\t" \ +- "ulw %[temp3], "#D"(%[out]) \n\t" \ ++ "ulw %[temp0], " #A "(%[out]) \n\t" \ ++ "ulw %[temp1], " #B "(%[out]) \n\t" \ ++ "ulw %[temp2], " #C "(%[out]) \n\t" \ ++ "ulw %[temp3], " #D "(%[out]) \n\t" \ + "absq_s.ph %[temp0], %[temp0] \n\t" \ + "absq_s.ph %[temp1], %[temp1] \n\t" \ + "absq_s.ph %[temp2], %[temp2] \n\t" \ +diff --git a/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c +index 6c34efb..6a1f8f4 100644 +--- a/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c ++++ b/Source/LibWebP/src/dsp/dsp.filters_mips_dsp_r2.c +@@ -48,7 +48,7 @@ + "srl %[temp0], %[length], 0x2 \n\t" \ + "beqz %[temp0], 4f \n\t" \ + " andi %[temp6], %[length], 0x3 \n\t" \ +- ".if "#INVERSE" \n\t" \ ++ ".if " #INVERSE " \n\t" \ + "lbu %[temp1], -1(%[src]) \n\t" \ + "1: \n\t" \ + "lbu %[temp2], 0(%[src]) \n\t" \ +@@ -84,7 +84,7 @@ + "lbu %[temp1], -1(%[src]) \n\t" \ + "lbu %[temp2], 0(%[src]) \n\t" \ + "addiu %[src], %[src], 1 \n\t" \ +- ".if "#INVERSE" \n\t" \ ++ ".if " #INVERSE " \n\t" \ + "addu %[temp3], %[temp1], %[temp2] \n\t" \ + "sb %[temp3], -1(%[src]) \n\t" \ + ".else \n\t" \ +@@ -131,7 +131,7 @@ static WEBP_INLINE void PredictLine(const uint8_t* src, uint8_t* dst, + "ulw %[temp3], 4(%[src]) \n\t" \ + "ulw %[temp4], 4(%[pred]) \n\t" \ + "addiu %[src], %[src], 8 \n\t" \ +- ".if "#INVERSE" \n\t" \ ++ ".if " #INVERSE " \n\t" \ + "addu.qb %[temp5], %[temp1], %[temp2] \n\t" \ + "addu.qb %[temp6], %[temp3], %[temp4] \n\t" \ + ".else \n\t" \ +@@ -152,7 +152,7 @@ static WEBP_INLINE void PredictLine(const uint8_t* src, uint8_t* dst, + "lbu %[temp2], 0(%[pred]) \n\t" \ + "addiu %[src], %[src], 1 \n\t" \ + "addiu %[pred], %[pred], 1 \n\t" \ +- ".if "#INVERSE" \n\t" \ ++ ".if " #INVERSE " \n\t" \ + "addu %[temp3], %[temp1], %[temp2] \n\t" \ + ".else \n\t" \ + "subu %[temp3], %[temp1], %[temp2] \n\t" \ +@@ -177,7 +177,7 @@ static WEBP_INLINE void PredictLine(const uint8_t* src, uint8_t* dst, + __asm__ volatile ( \ + "lbu %[temp1], 0(%[src]) \n\t" \ + "lbu %[temp2], 0(%[pred]) \n\t" \ +- ".if "#INVERSE" \n\t" \ ++ ".if " #INVERSE " \n\t" \ + "addu %[temp3], %[temp1], %[temp2] \n\t" \ + ".else \n\t" \ + "subu %[temp3], %[temp1], %[temp2] \n\t" \ +diff --git a/Source/LibWebP/src/dsp/dsp.lossless_mips32.c b/Source/LibWebP/src/dsp/dsp.lossless_mips32.c +index 68fbe85..abe97c1 100644 +--- a/Source/LibWebP/src/dsp/dsp.lossless_mips32.c ++++ b/Source/LibWebP/src/dsp/dsp.lossless_mips32.c +@@ -285,28 +285,28 @@ static VP8LStreaks HuffmanCostCombinedCount(const uint32_t* X, + // literal_ and successive histograms could be unaligned + // so we must use ulw and usw + #define ADD_TO_OUT(A, B, C, D, E, P0, P1, P2) \ +- "ulw %[temp0], "#A"(%["#P0"]) \n\t" \ +- "ulw %[temp1], "#B"(%["#P0"]) \n\t" \ +- "ulw %[temp2], "#C"(%["#P0"]) \n\t" \ +- "ulw %[temp3], "#D"(%["#P0"]) \n\t" \ +- "ulw %[temp4], "#A"(%["#P1"]) \n\t" \ +- "ulw %[temp5], "#B"(%["#P1"]) \n\t" \ +- "ulw %[temp6], "#C"(%["#P1"]) \n\t" \ +- "ulw %[temp7], "#D"(%["#P1"]) \n\t" \ ++ "ulw %[temp0], " #A "(%[" #P0 "]) \n\t" \ ++ "ulw %[temp1], " #B "(%[" #P0 "]) \n\t" \ ++ "ulw %[temp2], " #C "(%[" #P0 "]) \n\t" \ ++ "ulw %[temp3], " #D "(%[" #P0 "]) \n\t" \ ++ "ulw %[temp4], " #A "(%[" #P1 "]) \n\t" \ ++ "ulw %[temp5], " #B "(%[" #P1 "]) \n\t" \ ++ "ulw %[temp6], " #C "(%[" #P1 "]) \n\t" \ ++ "ulw %[temp7], " #D "(%[" #P1 "]) \n\t" \ + "addu %[temp4], %[temp4], %[temp0] \n\t" \ + "addu %[temp5], %[temp5], %[temp1] \n\t" \ + "addu %[temp6], %[temp6], %[temp2] \n\t" \ + "addu %[temp7], %[temp7], %[temp3] \n\t" \ +- "addiu %["#P0"], %["#P0"], 16 \n\t" \ +- ".if "#E" == 1 \n\t" \ +- "addiu %["#P1"], %["#P1"], 16 \n\t" \ ++ "addiu %[" #P0 "], %[" #P0 "], 16 \n\t" \ ++ ".if " #E " == 1 \n\t" \ ++ "addiu %[" #P1 "], %[" #P1 "], 16 \n\t" \ + ".endif \n\t" \ +- "usw %[temp4], "#A"(%["#P2"]) \n\t" \ +- "usw %[temp5], "#B"(%["#P2"]) \n\t" \ +- "usw %[temp6], "#C"(%["#P2"]) \n\t" \ +- "usw %[temp7], "#D"(%["#P2"]) \n\t" \ +- "addiu %["#P2"], %["#P2"], 16 \n\t" \ +- "bne %["#P0"], %[LoopEnd], 1b \n\t" \ ++ "usw %[temp4], " #A "(%[" #P2 "]) \n\t" \ ++ "usw %[temp5], " #B "(%[" #P2 "]) \n\t" \ ++ "usw %[temp6], " #C "(%[" #P2 "]) \n\t" \ ++ "usw %[temp7], " #D "(%[" #P2 "]) \n\t" \ ++ "addiu %[" #P2 "], %[" #P2 "], 16 \n\t" \ ++ "bne %[" #P0 "], %[LoopEnd], 1b \n\t" \ + ".set pop \n\t" \ + + #define ASM_END_COMMON_0 \ +diff --git a/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c +index 821cda9..31ac181 100644 +--- a/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c ++++ b/Source/LibWebP/src/dsp/dsp.lossless_mips_dsp_r2.c +@@ -29,14 +29,14 @@ static void FUNC_NAME(const TYPE* src, \ + for (x = 0; x < (width >> 2); ++x) { \ + int tmp1, tmp2, tmp3, tmp4; \ + __asm__ volatile ( \ +- ".ifc "#TYPE", uint8_t \n\t" \ ++ ".ifc " #TYPE ", uint8_t \n\t" \ + "lbu %[tmp1], 0(%[src]) \n\t" \ + "lbu %[tmp2], 1(%[src]) \n\t" \ + "lbu %[tmp3], 2(%[src]) \n\t" \ + "lbu %[tmp4], 3(%[src]) \n\t" \ + "addiu %[src], %[src], 4 \n\t" \ + ".endif \n\t" \ +- ".ifc "#TYPE", uint32_t \n\t" \ ++ ".ifc " #TYPE ", uint32_t \n\t" \ + "lw %[tmp1], 0(%[src]) \n\t" \ + "lw %[tmp2], 4(%[src]) \n\t" \ + "lw %[tmp3], 8(%[src]) \n\t" \ +@@ -55,7 +55,7 @@ static void FUNC_NAME(const TYPE* src, \ + "lwx %[tmp2], %[tmp2](%[color_map]) \n\t" \ + "lwx %[tmp3], %[tmp3](%[color_map]) \n\t" \ + "lwx %[tmp4], %[tmp4](%[color_map]) \n\t" \ +- ".ifc "#TYPE", uint8_t \n\t" \ ++ ".ifc " #TYPE ", uint8_t \n\t" \ + "ext %[tmp1], %[tmp1], 8, 8 \n\t" \ + "ext %[tmp2], %[tmp2], 8, 8 \n\t" \ + "ext %[tmp3], %[tmp3], 8, 8 \n\t" \ +@@ -66,7 +66,7 @@ static void FUNC_NAME(const TYPE* src, \ + "sb %[tmp4], 3(%[dst]) \n\t" \ + "addiu %[dst], %[dst], 4 \n\t" \ + ".endif \n\t" \ +- ".ifc "#TYPE", uint32_t \n\t" \ ++ ".ifc " #TYPE ", uint32_t \n\t" \ + "sw %[tmp1], 0(%[dst]) \n\t" \ + "sw %[tmp2], 4(%[dst]) \n\t" \ + "sw %[tmp3], 8(%[dst]) \n\t" \ +diff --git a/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c +index a7864a0..cb3adfe 100644 +--- a/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c ++++ b/Source/LibWebP/src/dsp/dsp.upsampling_mips_dsp_r2.c +@@ -34,15 +34,15 @@ + G = G - t2 + kGCst; \ + B = B + kBCst; \ + __asm__ volatile ( \ +- "shll_s.w %["#R"], %["#R"], 9 \n\t" \ +- "shll_s.w %["#G"], %["#G"], 9 \n\t" \ +- "shll_s.w %["#B"], %["#B"], 9 \n\t" \ +- "precrqu_s.qb.ph %["#R"], %["#R"], $zero \n\t" \ +- "precrqu_s.qb.ph %["#G"], %["#G"], $zero \n\t" \ +- "precrqu_s.qb.ph %["#B"], %["#B"], $zero \n\t" \ +- "srl %["#R"], %["#R"], 24 \n\t" \ +- "srl %["#G"], %["#G"], 24 \n\t" \ +- "srl %["#B"], %["#B"], 24 \n\t" \ ++ "shll_s.w %[" #R "], %[" #R "], 9 \n\t" \ ++ "shll_s.w %[" #G "], %[" #G "], 9 \n\t" \ ++ "shll_s.w %[" #B "], %[" #B "], 9 \n\t" \ ++ "precrqu_s.qb.ph %[" #R "], %[" #R "], $zero \n\t" \ ++ "precrqu_s.qb.ph %[" #G "], %[" #G "], $zero \n\t" \ ++ "precrqu_s.qb.ph %[" #B "], %[" #B "], $zero \n\t" \ ++ "srl %[" #R "], %[" #R "], 24 \n\t" \ ++ "srl %[" #G "], %[" #G "], 24 \n\t" \ ++ "srl %[" #B "], %[" #B "], 24 \n\t" \ + : [R]"+r"(R), [G]"+r"(G), [B]"+r"(B) \ + : \ + ); \ +diff --git a/Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c b/Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c +index 66adde5..51cbe9e 100644 +--- a/Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c ++++ b/Source/LibWebP/src/dsp/dsp.yuv_mips_dsp_r2.c +@@ -39,12 +39,12 @@ + "addu %[temp5], %[temp0], %[temp1] \n\t" \ + "subu %[temp6], %[temp0], %[temp2] \n\t" \ + "addu %[temp7], %[temp0], %[temp4] \n\t" \ +-".if "#K" \n\t" \ ++".if " #K " \n\t" \ + "lbu %[temp0], 1(%[y]) \n\t" \ + ".endif \n\t" \ + "shll_s.w %[temp5], %[temp5], 9 \n\t" \ + "shll_s.w %[temp6], %[temp6], 9 \n\t" \ +-".if "#K" \n\t" \ ++".if " #K " \n\t" \ + "mul %[temp0], %[t_con_5], %[temp0] \n\t" \ + ".endif \n\t" \ + "shll_s.w %[temp7], %[temp7], 9 \n\t" \ +@@ -54,9 +54,9 @@ + "srl %[temp5], %[temp5], 24 \n\t" \ + "srl %[temp6], %[temp6], 24 \n\t" \ + "srl %[temp7], %[temp7], 24 \n\t" \ +- "sb %[temp5], "#R"(%[dst]) \n\t" \ +- "sb %[temp6], "#G"(%[dst]) \n\t" \ +- "sb %[temp7], "#B"(%[dst]) \n\t" \ ++ "sb %[temp5], " #R "(%[dst]) \n\t" \ ++ "sb %[temp6], " #G "(%[dst]) \n\t" \ ++ "sb %[temp7], " #B "(%[dst]) \n\t" \ + + #define ASM_CLOBBER_LIST() \ + : [temp0]"=&r"(temp0), [temp1]"=&r"(temp1), [temp2]"=&r"(temp2), \ +-- +2.1.4 + diff --git a/package/libfreeimage/Config.in b/package/libfreeimage/Config.in new file mode 100644 index 0000000000..4b462cb633 --- /dev/null +++ b/package/libfreeimage/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_LIBFREEIMAGE + bool "libfreeimage" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR + # compiler issue: "Error: invalid register number `63'" + depends on !BR2_arc + # Numerous build issues + depends on !BR2_bfin + help + FreeImage is an Open Source library project for developers who + would like to support popular graphics image formats like PNG, + BMP, JPEG, TIFF and others as needed by today's multimedia + applications. + + http://freeimage.sourceforge.net + +comment "libfreeimage needs a toolchain w/ C++, dynamic library, wchar" + depends on !BR2_arc + depends on !BR2_bfin + depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR diff --git a/package/libfreeimage/libfreeimage.hash b/package/libfreeimage/libfreeimage.hash new file mode 100644 index 0000000000..4e69508be9 --- /dev/null +++ b/package/libfreeimage/libfreeimage.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 fbfc65e39b3d4e2cb108c4ffa8c41fd02c07d4d436c594fff8dab1a6d5297f89 FreeImage3170.zip diff --git a/package/libfreeimage/libfreeimage.mk b/package/libfreeimage/libfreeimage.mk new file mode 100644 index 0000000000..2849e94f22 --- /dev/null +++ b/package/libfreeimage/libfreeimage.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# libfreeimage +# +################################################################################ + +LIBFREEIMAGE_VERSION = 3.17.0 +LIBFREEIMAGE_SITE = http://downloads.sourceforge.net/freeimage +LIBFREEIMAGE_SOURCE = FreeImage$(subst .,,$(LIBFREEIMAGE_VERSION)).zip +LIBFREEIMAGE_LICENSE = GPLv2 or GPLv3 or FreeImage Public License +LIBFREEIMAGE_LICENSE_FILES = license-gplv2.txt license-gplv3.txt license-fi.txt +LIBFREEIMAGE_INSTALL_STAGING = YES + +define LIBFREEIMAGE_EXTRACT_CMDS + $(UNZIP) $(DL_DIR)/$(LIBFREEIMAGE_SOURCE) -d $(@D) + mv $(@D)/FreeImage/* $(@D) + rmdir $(@D)/FreeImage +endef + +define LIBFREEIMAGE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define LIBFREEIMAGE_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install +endef + +define LIBFREEIMAGE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) + diff --git a/package/libfribidi/Config.in b/package/libfribidi/Config.in new file mode 100644 index 0000000000..74d9c5b431 --- /dev/null +++ b/package/libfribidi/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBFRIBIDI + bool "libfribidi" + help + GNU FriBidi is an implementation of the Unicode + Bidirectional Algorithm (bidi). + + http://www.fribidi.org/ diff --git a/package/libfribidi/libfribidi.hash b/package/libfribidi/libfribidi.hash new file mode 100644 index 0000000000..79b5dd3185 --- /dev/null +++ b/package/libfribidi/libfribidi.hash @@ -0,0 +1,2 @@ +# From http://www.fribidi.org/download/fribidi-0.19.7.tar.bz2.sha256 +sha256 08222a6212bbc2276a2d55c3bf370109ae4a35b689acbc66571ad2a670595a8e fribidi-0.19.7.tar.bz2 diff --git a/package/libfribidi/libfribidi.mk b/package/libfribidi/libfribidi.mk new file mode 100644 index 0000000000..4e82a5e4df --- /dev/null +++ b/package/libfribidi/libfribidi.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libfribidi +# +################################################################################ + +LIBFRIBIDI_VERSION = 0.19.7 +LIBFRIBIDI_SOURCE = fribidi-$(LIBFRIBIDI_VERSION).tar.bz2 +LIBFRIBIDI_SITE = http://www.fribidi.org/download +LIBFRIBIDI_LICENSE = LGPLv2.1+ +LIBFRIBIDI_LICENSE_FILES = COPYING +LIBFRIBIDI_INSTALL_STAGING = YES +# Ships a beta libtool version hence our patch doesn't apply. +# Run autoreconf to regenerate ltmain.sh. +LIBFRIBIDI_AUTORECONF = YES +LIBFRIBIDI_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +LIBFRIBIDI_DEPENDENCIES += libglib2 +else +LIBFRIBIDI_CONF_OPTS += --with-glib=no +endif + +$(eval $(autotools-package)) diff --git a/package/libfslcodec/Config.in b/package/libfslcodec/Config.in new file mode 100644 index 0000000000..d2007fe1ea --- /dev/null +++ b/package/libfslcodec/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBFSLCODEC + bool "libfslcodec" + depends on BR2_arm # Only relevant for i.MX + depends on BR2_TOOLCHAIN_USES_GLIBC # prebuilt binaries + help + Binary codec libraries for the Freescale i.MX SoCs. + + This library is provided by Freescale as-is and doesn't have + an upstream. + +comment "libfslcodec needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/libfslcodec/libfslcodec.hash b/package/libfslcodec/libfslcodec.hash new file mode 100644 index 0000000000..fd934f7506 --- /dev/null +++ b/package/libfslcodec/libfslcodec.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 544ffc5989bce18ca50c7a826cc03370b1cf8455335e4291ef0c0779b4c33de0 libfslcodec-4.0.8.bin diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk new file mode 100644 index 0000000000..502390fb99 --- /dev/null +++ b/package/libfslcodec/libfslcodec.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libfslcodec +# +################################################################################ + +LIBFSLCODEC_VERSION = 4.0.8 +LIBFSLCODEC_SITE = $(FREESCALE_IMX_SITE) +LIBFSLCODEC_SOURCE = libfslcodec-$(LIBFSLCODEC_VERSION).bin +LIBFSLCODEC_INSTALL_STAGING = YES + +LIBFSLCODEC_LICENSE = Freescale Semiconductor Software License Agreement, BSD-3c (flac, ogg headers) +LIBFSLCODEC_LICENSE_FILES = EULA COPYING +LIBFSLCODEC_REDISTRIBUTE = NO + +define LIBFSLCODEC_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLCODEC_SOURCE)) +endef + +# FIXME The Makefile installs both the arm9 and arm11 versions of the +# libraries, but we only need one of them. + +$(eval $(autotools-package)) diff --git a/package/libfslparser/Config.in b/package/libfslparser/Config.in new file mode 100644 index 0000000000..e3ab980ec9 --- /dev/null +++ b/package/libfslparser/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBFSLPARSER + bool "libfslparser" + depends on BR2_arm # Only relevant for i.MX + help + Binary parser libraries for the Freescale i.MX SoCs. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/libfslparser/libfslparser.hash b/package/libfslparser/libfslparser.hash new file mode 100644 index 0000000000..c49345fa09 --- /dev/null +++ b/package/libfslparser/libfslparser.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 a04621783c84a9776216caff9563c7f840fddd584b0b2d27738d6ca6d2c77f32 libfslparser-4.0.8.bin diff --git a/package/libfslparser/libfslparser.mk b/package/libfslparser/libfslparser.mk new file mode 100644 index 0000000000..44e6039c6a --- /dev/null +++ b/package/libfslparser/libfslparser.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libfslparser +# +################################################################################ + +LIBFSLPARSER_VERSION = 4.0.8 +LIBFSLPARSER_SITE = $(FREESCALE_IMX_SITE) +LIBFSLPARSER_SOURCE = libfslparser-$(LIBFSLPARSER_VERSION).bin +LIBFSLPARSER_INSTALL_STAGING = YES + +LIBFSLPARSER_LICENSE = Freescale Semiconductor Software License Agreement +LIBFSLPARSER_LICENSE_FILES = EULA COPYING +LIBFSLPARSER_REDISTRIBUTE = NO + +define LIBFSLPARSER_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLPARSER_SOURCE)) +endef + +# The Makefile installs several versions of the libraries, but we only +# need one of them, depending on the platform. + +$(eval $(autotools-package)) diff --git a/package/libfslvpuwrap/Config.in b/package/libfslvpuwrap/Config.in new file mode 100644 index 0000000000..72f7126307 --- /dev/null +++ b/package/libfslvpuwrap/Config.in @@ -0,0 +1,19 @@ +comment "libfslvpuwrap needs an imx-specific Linux kernel to be built" + depends on BR2_arm + depends on !BR2_LINUX_KERNEL + +comment "libfslvpuwrap needs an i.MX platform with VPU support" + depends on BR2_arm + depends on BR2_LINUX_KERNEL && !BR2_PACKAGE_FREESCALE_IMX_HAS_VPU + +config BR2_PACKAGE_LIBFSLVPUWRAP + bool "libfslvpuwrap" + depends on BR2_LINUX_KERNEL + depends on BR2_arm # Only relevant for i.MX + depends on BR2_PACKAGE_FREESCALE_IMX_HAS_VPU + select BR2_PACKAGE_IMX_VPU + help + Wrapper library for the vpu library, giving it a different API. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/libfslvpuwrap/libfslvpuwrap.hash b/package/libfslvpuwrap/libfslvpuwrap.hash new file mode 100644 index 0000000000..e98707731f --- /dev/null +++ b/package/libfslvpuwrap/libfslvpuwrap.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 0717faccb5413dc95ce9ad919400095ecf722320478c924366793a6cc450ae16 libfslvpuwrap-1.0.62.bin diff --git a/package/libfslvpuwrap/libfslvpuwrap.mk b/package/libfslvpuwrap/libfslvpuwrap.mk new file mode 100644 index 0000000000..12a4e864c8 --- /dev/null +++ b/package/libfslvpuwrap/libfslvpuwrap.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libfslvpuwrap +# +################################################################################ + +LIBFSLVPUWRAP_VERSION = 1.0.62 +LIBFSLVPUWRAP_SITE = $(FREESCALE_IMX_SITE) +LIBFSLVPUWRAP_SOURCE = libfslvpuwrap-$(LIBFSLVPUWRAP_VERSION).bin +LIBFSLVPUWRAP_DEPENDENCIES = imx-vpu +LIBFSLVPUWRAP_INSTALL_STAGING = YES + +LIBFSLVPUWRAP_LICENSE = Freescale Semiconductor Software License Agreement +LIBFSLVPUWRAP_LICENSE_FILES = EULA COPYING +LIBFSLVPUWRAP_REDISTRIBUTE = NO + +define LIBFSLVPUWRAP_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLVPUWRAP_SOURCE)) +endef + +$(eval $(autotools-package)) diff --git a/package/libftdi/0001_pkgconfig_libusb.patch b/package/libftdi/0001_pkgconfig_libusb.patch new file mode 100644 index 0000000000..389291de00 --- /dev/null +++ b/package/libftdi/0001_pkgconfig_libusb.patch @@ -0,0 +1,47 @@ +--- + configure.in | 35 +++++++++++------------------------ + 1 file changed, 11 insertions(+), 24 deletions(-) + +--- a/configure.in ++++ b/configure.in +@@ -8,30 +8,17 @@ + AM_PROG_LIBTOOL + AC_PROG_CXX + +-dnl check for libusb-config +-AC_CHECK_TOOL(HAVELIBUSB, libusb-config) +- +-if test ! -z "$HAVELIBUSB"; then +- LIBUSB_CFLAGS=`$HAVELIBUSB --cflags` +- LIBUSB_LIBS=`$HAVELIBUSB --libs` +- +- CFLAGS="$CFLAGS $LIBUSB_CFLAGS" +- LIBS="$LIBS $LIBUSB_LIBS" +-else +- AC_MSG_ERROR([*** libusb-config not found. You need a working libusb installation.]) +-fi +- +-dnl check for version of libusb +-AC_MSG_CHECKING([if libusb version is >= 0.1.7]) +-libusb_version_needed="1007" +-libusb_version=`$HAVELIBUSB --version | sed -e "s/libusb //" | awk 'BEGIN { FS = "."; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'` ++dnl check for libusb ++PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.11) ++CFLAGS="$CFLAGS $LIBUSB_CFLAGS" ++LIBS="$LIBS $LIBUSB_LIBS" + +-if test $libusb_version -lt $libusb_version_needed; then +- AC_MSG_RESULT(no) +- AC_MSG_ERROR([*** libusb is too old ($libusb_version). You need a libusb installation newer or equal to 0.1.7.]) +-else +- AC_MSG_RESULT(yes) +-fi ++dnl Check for recent pkg-config which supports Requires.private ++case `$PKG_CONFIG --version` in ++0.?|0.1[0-7]) PKGCONFIG_REQUIRES="Requires"; ;; ++*) PKGCONFIG_REQUIRES="Requires.private"; ;; ++esac ++AC_SUBST(PKGCONFIG_REQUIRES) + + ENABLE_ASYNC_MODE=0 + AC_ARG_WITH(async-mode, diff --git a/package/libftdi/0002-libftdi.pc-requires-libusb-fix-static-build.patch b/package/libftdi/0002-libftdi.pc-requires-libusb-fix-static-build.patch new file mode 100644 index 0000000000..ee47af6058 --- /dev/null +++ b/package/libftdi/0002-libftdi.pc-requires-libusb-fix-static-build.patch @@ -0,0 +1,27 @@ +From d3d6ca63cb86727533d7d83c98e70002bb04f343 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Wed, 21 Jan 2015 11:18:59 +0100 +Subject: [PATCH] libftdi.pc: requires libusb (fix static build) + +--- + libftdi.pc.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libftdi.pc.in b/libftdi.pc.in +index 2061b91..57f0a09 100644 +--- a/libftdi.pc.in ++++ b/libftdi.pc.in +@@ -5,8 +5,8 @@ includedir=@includedir@ + + Name: libftdi + Description: Library to program and control the FTDI USB controller +-Requires: ++Requires: libusb + Version: @VERSION@ +-Libs: -L${libdir} -lftdi -lusb ++Libs: -L${libdir} -lftdi + Cflags: -I${includedir} + +-- +2.1.0 + diff --git a/package/libftdi/Config.in b/package/libftdi/Config.in new file mode 100644 index 0000000000..8e02cb914c --- /dev/null +++ b/package/libftdi/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_LIBFTDI + bool "libftdi" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + help + Userspace access to FTDI USB interface chips + + http://www.intra2net.com/en/developer/libftdi/index.php + +if BR2_PACKAGE_LIBFTDI + +config BR2_PACKAGE_LIBTFDI_CPP + bool "C++ bindings" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on BR2_USE_WCHAR + select BR2_PACKAGE_BOOST + help + C++ bindings for libftdi + +comment "libftdi C++ bindings need a toolchain w/ wchar, C++" + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP + +endif # BR2_PACKAGE_LIBFTDI + +comment "libftdi needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libftdi/libftdi.hash b/package/libftdi/libftdi.hash new file mode 100644 index 0000000000..5d9f8765db --- /dev/null +++ b/package/libftdi/libftdi.hash @@ -0,0 +1,2 @@ +# Locally computed (after checking the signature from http://www.intra2net.com/en/developer/libftdi/download.php) +sha256 3176d5b5986438f33f5208e690a8bfe90941be501cc0a72118ce3d338d4b838e libftdi-0.20.tar.gz diff --git a/package/libftdi/libftdi.mk b/package/libftdi/libftdi.mk new file mode 100644 index 0000000000..28f20e3547 --- /dev/null +++ b/package/libftdi/libftdi.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# libftdi +# +################################################################################ + +LIBFTDI_VERSION = 0.20 +LIBFTDI_SITE = http://www.intra2net.com/en/developer/libftdi/download +LIBFTDI_DEPENDENCIES = libusb-compat libusb +LIBFTDI_INSTALL_STAGING = YES +LIBFTDI_CONFIG_SCRIPTS = libftdi-config +LIBFTDI_AUTORECONF = YES + +LIBFDTI_CONF_OPTS = --without-examples + +# configure detect it automaticaly so we need to force it +ifeq ($(BR2_PACKAGE_LIBTFDI_CPP),y) +LIBFTDI_DEPENDENCIES += boost +LIBFDTI_CONF_OPTS += --enable-libftdipp +else +LIBFDTI_CONF_OPTS += --disable-libftdipp +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch b/package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file mode 100644 index 0000000000..487fc28215 --- /dev/null +++ b/package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch @@ -0,0 +1,96 @@ +From 7e57ff280b55b45e74329b9988279e8831d32eab Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 25 Jan 2015 09:45:04 +0100 +Subject: [PATCH 1/2] cmake: use the standard CMake flag to drive the shared + object build + +Remove the STATICLIBS CMake option (and the code handling it) and let +the standard CMake flags drive the shared object build. + +Signed-off-by: Samuel Martin +--- + CMakeLists.txt | 2 -- + ftdipp/CMakeLists.txt | 15 +-------------- + src/CMakeLists.txt | 13 +------------ + 3 files changed, 2 insertions(+), 28 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 74f80f4..0ba0b08 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -46,8 +46,6 @@ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development") + set(CPACK_COMPONENT_STATICLIBS_GROUP "Development") + set(CPACK_COMPONENT_HEADERS_GROUP "Development") + +-option ( STATICLIBS "Build static libraries" ON ) +- + # guess LIB_SUFFIX, don't take debian multiarch into account + if ( NOT DEFINED LIB_SUFFIX ) + if( CMAKE_SYSTEM_NAME MATCHES "Linux" +diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt +index 7500211..27e7884 100644 +--- a/ftdipp/CMakeLists.txt ++++ b/ftdipp/CMakeLists.txt +@@ -23,8 +23,7 @@ if (FTDIPP) + set(FTDI_BUILD_CPP True PARENT_SCOPE) + message(STATUS "Building libftdi1++") + +- # Shared library +- add_library(ftdipp1 SHARED ${cpp_sources}) ++ add_library(ftdipp1 ${cpp_sources}) + + math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases + set_target_properties(ftdipp1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2) +@@ -41,18 +40,6 @@ if (FTDIPP) + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX} + ) +- +- # Static library +- if ( STATICLIBS ) +- add_library(ftdipp1-static STATIC ${cpp_sources}) +- set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME "ftdipp1") +- set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) +- +- install ( TARGETS ftdipp1-static +- ARCHIVE DESTINATION lib${LIB_SUFFIX} +- COMPONENT staticlibs +- ) +- endif () + + install ( FILES ${cpp_headers} + DESTINATION include/${PROJECT_NAME} +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9fd86a6..501d4a8 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -21,7 +21,7 @@ configure_file(ftdi_version_i.h.in "${CMAKE_CURRENT_BINARY_DIR}/ftdi_version_i.h + set(c_sources ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.c ${CMAKE_CURRENT_SOURCE_DIR}/ftdi_stream.c CACHE INTERNAL "List of c sources" ) + set(c_headers ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.h CACHE INTERNAL "List of c headers" ) + +-add_library(ftdi1 SHARED ${c_sources}) ++add_library(ftdi1 ${c_sources}) + + math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases + set_target_properties(ftdi1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2) +@@ -38,17 +38,6 @@ install ( TARGETS ftdi1 + ARCHIVE DESTINATION lib${LIB_SUFFIX} + ) + +-if ( STATICLIBS ) +- add_library(ftdi1-static STATIC ${c_sources}) +- target_link_libraries(ftdi1-static ${LIBUSB_LIBRARIES}) +- set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1") +- set_target_properties(ftdi1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1) +- install ( TARGETS ftdi1-static +- ARCHIVE DESTINATION lib${LIB_SUFFIX} +- COMPONENT staticlibs +- ) +-endif () +- + install ( FILES ${c_headers} + DESTINATION include/${PROJECT_NAME} + COMPONENT headers +-- +2.2.2 + diff --git a/package/libftdi1/0002-cmake-fix-FindUSB1.cmake.patch b/package/libftdi1/0002-cmake-fix-FindUSB1.cmake.patch new file mode 100644 index 0000000000..5619a0ceec --- /dev/null +++ b/package/libftdi1/0002-cmake-fix-FindUSB1.cmake.patch @@ -0,0 +1,34 @@ +From 81275d75ae88fe8ab1915d3ba260ea935e63c362 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 25 Jan 2015 10:01:17 +0100 +Subject: [PATCH 2/2] cmake: fix FindUSB1.cmake + +Make sure all ldflags are correctly set, especially for static build. + +Signed-off-by: Samuel Martin +--- + cmake/FindUSB1.cmake | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/cmake/FindUSB1.cmake b/cmake/FindUSB1.cmake +index b90e297..e7f1b3c 100644 +--- a/cmake/FindUSB1.cmake ++++ b/cmake/FindUSB1.cmake +@@ -26,8 +26,12 @@ else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) + PATH_SUFFIXES libusb-1.0 + PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS}) + +- FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0 +- PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) ++ set(LIBUSB_LIBRARIES ${PC_LIBUSB_STATIC_LDFLAGS} ${PC_LIBUSB_STATIC_LDFLAGS_OTHER}) ++ foreach(libname ${PC_LIBUSB_STATIC_LIBRARIES}) ++ FIND_LIBRARY(lib NAMES ${libname} ++ PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS}) ++ list(APPEND LIBUSB_LIBRARIES ${lib}) ++ endforeach() + + include(FindPackageHandleStandardArgs) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR) +-- +2.2.2 + diff --git a/package/libftdi1/0003-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch b/package/libftdi1/0003-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch new file mode 100644 index 0000000000..be0913de4a --- /dev/null +++ b/package/libftdi1/0003-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch @@ -0,0 +1,46 @@ +From c215d5ecd985b57700e817920d0e99112b4a571b Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 25 Jan 2015 13:35:24 +0100 +Subject: [PATCH] cmake: do not check for g++ when FTDIPP is disabled + +Signed-off-by: Samuel Martin +--- + CMakeLists.txt | 6 ++++-- + ftdipp/CMakeLists.txt | 1 + + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 0ba0b08..e880211 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,5 +1,5 @@ + # Project +-project(libftdi1) ++project(libftdi1 C) + set(MAJOR_VERSION 1) + set(MINOR_VERSION 2) + set(PACKAGE libftdi1) +@@ -145,7 +145,9 @@ else(DOCUMENTATION AND DOXYGEN_FOUND) + endif(DOCUMENTATION AND DOXYGEN_FOUND) + + add_subdirectory(src) +-add_subdirectory(ftdipp) ++if(FTDIPP) ++ add_subdirectory(ftdipp) ++endif() + add_subdirectory(python) + add_subdirectory(ftdi_eeprom) + add_subdirectory(examples) +diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt +index 27e7884..2d080f4 100644 +--- a/ftdipp/CMakeLists.txt ++++ b/ftdipp/CMakeLists.txt +@@ -1,4 +1,5 @@ + # Check ++project(libftdipp1 C CXX) + set(FTDI_BUILD_CPP False PARENT_SCOPE) + + option ( FTDIPP "Build C++ binding library libftdi1++" ON ) +-- +2.2.2 + diff --git a/package/libftdi1/Config.in b/package/libftdi1/Config.in new file mode 100644 index 0000000000..61d4c1cf20 --- /dev/null +++ b/package/libftdi1/Config.in @@ -0,0 +1,39 @@ +config BR2_PACKAGE_LIBFTDI1 + bool "libftdi1" + select BR2_PACKAGE_LIBUSB + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + help + Userspace access to FTDI USB interface chips (version 1.x) + + http://www.intra2net.com/en/developer/libftdi/index.php + +if BR2_PACKAGE_LIBFTDI1 + +config BR2_PACKAGE_LIBFTDI1_LIBFTDIPP1 + bool "libftdipp1" + select BR2_PACKAGE_BOOST + depends on BR2_INSTALL_LIBSTDCPP # boost + depends on BR2_TOOLCHAIN_HAS_THREADS # boost + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on BR2_USE_WCHAR # boost + help + C++ bindings for libftdi + +comment "libftdipp1 needs a toolchain w/ C++, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + +config BR2_PACKAGE_LIBFTDI1_PYTHON_BINDINGS + bool "python bindings" + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + help + Python bindings for libftdi + +config BR2_PACKAGE_LIBFTDI1_FDTI_EEPROM + select BR2_PACKAGE_LIBCONFUSE + bool "ftdi_eeprom tool" + +endif # BR2_PACKAGE_LIBFTDI1 + +comment "libftdi1 needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libftdi1/libftdi1.hash b/package/libftdi1/libftdi1.hash new file mode 100644 index 0000000000..e53bc8f7ed --- /dev/null +++ b/package/libftdi1/libftdi1.hash @@ -0,0 +1,2 @@ +# Locally computed (after checking the signature from http://www.intra2net.com/en/developer/libftdi/download.php) +sha256 a6ea795c829219015eb372b03008351cee3fb39f684bff3bf8a4620b558488d6 libftdi1-1.2.tar.bz2 diff --git a/package/libftdi1/libftdi1.mk b/package/libftdi1/libftdi1.mk new file mode 100644 index 0000000000..e77f37bb58 --- /dev/null +++ b/package/libftdi1/libftdi1.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# libftdi1 +# +################################################################################ + +LIBFTDI1_VERSION = 1.2 +LIBFTDI1_SOURCE = libftdi1-$(LIBFTDI1_VERSION).tar.bz2 +LIBFTDI1_SITE = http://www.intra2net.com/en/developer/libftdi/download +LIBFTDI1_INSTALL_STAGING = YES +LIBFTDI1_DEPENDENCIES = libusb +LIBFTDI1_LICENSE = LGPLv2 (libftdi1), GPLv2 with exception (ftdipp1) +LIBFTDI1_LICENSE_FILES = LICENSE COPYING.GPL COPYING.LIB +LIBFTDI1_CONF_OPTS = -DDOCUMENTATION=OFF -DEXAMPLES=OFF + +ifeq ($(BR2_PACKAGE_LIBFTDI1_LIBFTDIPP1),y) +LIBFTDI1_DEPENDENCIES += boost +LIBFTDI1_CONF_OPTS += -DFTDIPP=ON +else +LIBFTDI1_CONF_OPTS += -DFTDIPP=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBFTDI1_PYTHON_BINDINGS),y) +LIBFTDI1_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,python3) host-swig +LIBFTDI1_CONF_OPTS += -DPYTHON_BINDINGS=ON +else +LIBFTDI1_CONF_OPTS += -DPYTHON_BINDINGS=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBFTDI1_FDTI_EEPROM),y) +# ftdi_eeprom optionally depends on libintl, so make sure gettext is built +# _before_ libfitdi1 when gettext is enbaled. +LIBFTDI1_DEPENDENCIES += libconfuse $(if $(BR2_PACKAGE_GETTEXT),gettext) +LIBFTDI1_CONF_OPTS += -DFTDI_EEPROM=ON +else +LIBFTDI1_CONF_OPTS += -DFTDI_EEPROM=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/libfuse/0001-fix-aarch64-build.patch b/package/libfuse/0001-fix-aarch64-build.patch new file mode 100644 index 0000000000..3b88687f6c --- /dev/null +++ b/package/libfuse/0001-fix-aarch64-build.patch @@ -0,0 +1,22 @@ +Fix build on the AArch64 platform + +Upstream-Status: Submitted + +Signed-off-by: Riku Voipio + +--- a/include/fuse_kernel.h ++++ b/include/fuse_kernel.h +@@ -88,12 +88,7 @@ + #ifndef _LINUX_FUSE_H + #define _LINUX_FUSE_H + +-#include +-#define __u64 uint64_t +-#define __s64 int64_t +-#define __u32 uint32_t +-#define __s32 int32_t +-#define __u16 uint16_t ++#include + + /* + * Version negotiation: diff --git a/package/libfuse/Config.in b/package/libfuse/Config.in new file mode 100644 index 0000000000..2b0e31a991 --- /dev/null +++ b/package/libfuse/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBFUSE + bool "libfuse" + # Really doesn't like static, see fuse/lib/fuse.c + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + FUSE (Filesystem in UserSpacE) + + https://github.com/libfuse/libfuse + +comment "libfuse needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/libfuse/libfuse.hash b/package/libfuse/libfuse.hash new file mode 100644 index 0000000000..d00d723083 --- /dev/null +++ b/package/libfuse/libfuse.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 0cb48bbc7106632d15a0c6bb582496c9884b869e329428891fe075a9e916f16b fuse-2.9.6.tar.gz diff --git a/package/libfuse/libfuse.mk b/package/libfuse/libfuse.mk new file mode 100644 index 0000000000..1709b56330 --- /dev/null +++ b/package/libfuse/libfuse.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libfuse +# +################################################################################ + +LIBFUSE_VERSION = 2.9.6 +LIBFUSE_SOURCE = fuse-$(LIBFUSE_VERSION).tar.gz +LIBFUSE_SITE = https://github.com/libfuse/libfuse/releases/download/fuse-$(LIBFUSE_VERSION) +LIBFUSE_LICENSE = GPLv2, LGPLv2.1 +LIBFUSE_LICENSE_FILES = COPYING COPYING.LIB +LIBFUSE_INSTALL_STAGING = YES +LIBFUSE_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) +LIBFUSE_CONF_OPTS = \ + --disable-example \ + --enable-lib \ + --enable-util + +define LIBFUSE_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/bin/fusermount $(TARGET_DIR)/usr/bin/ + cp -dpf $(STAGING_DIR)/usr/lib/libfuse.so* $(TARGET_DIR)/usr/lib/ +endef + +$(eval $(autotools-package)) diff --git a/package/libg7221/Config.in b/package/libg7221/Config.in new file mode 100644 index 0000000000..e057d289fb --- /dev/null +++ b/package/libg7221/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBG7221 + bool "libg7221" + help + libg722_1 is a library for the ITU G.722.1 and Annex C + wideband speech codecs. + + http://www.soft-switch.org diff --git a/package/libg7221/libg7221.mk b/package/libg7221/libg7221.mk new file mode 100644 index 0000000000..813af11cee --- /dev/null +++ b/package/libg7221/libg7221.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libg7221 +# +################################################################################ + +LIBG7221_VERSION = dbfc29d4806ecdace50379a2f4d68a992a6fec34 +# we use the FreeSwitch fork because it contains pkgconf support +LIBG7221_SITE = https://freeswitch.org/stash/scm/sd/libg7221.git +LIBG7221_SITE_METHOD = git +LIBG7221_LICENSE = Polycom +LIBG7221_LICENSE_FILES = COPYING +LIBG7221_AUTORECONF = YES +LIBG7221_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libgail/0001-Relax-X11-dependencies.patch b/package/libgail/0001-Relax-X11-dependencies.patch new file mode 100644 index 0000000000..97e56560d6 --- /dev/null +++ b/package/libgail/0001-Relax-X11-dependencies.patch @@ -0,0 +1,42 @@ +From cca72c48b5643fa62e1d55b7b181e147f5ba7fe9 Mon Sep 17 00:00:00 2001 +From: Lionel Landwerlin +Date: Sun, 28 Mar 2010 21:47:38 +0200 +Subject: [PATCH] Relax X11 dependency + +Signed-off-by: Lionel Landwerlin +--- + configure.in | 4 +++- + gail/gailwindow.c | 2 +- + 2 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/configure.in b/configure.in +index 3801655..abaf417 100644 +--- a/configure.in ++++ b/configure.in +@@ -86,7 +86,9 @@ GTK_REQUIRED_VERSION=2.9.4 + PKG_CHECK_MODULES(DEP, $ATK_PACKAGES >= $ATK_REQUIRED_VERSION \ + $GTK_PACKAGES >= $GTK_REQUIRED_VERSION) + +-if test "$gail_native_win32" != "yes"; then ++AC_ARG_ENABLE(x, [ --disable-x disable x11 backend ],x11_backend=no,x11_backend=yes) ++ ++if test "$gail_native_win32" != "yes" -a "$x11_backend" != "no"; then + + PKG_CHECK_MODULES(X, x11, :, [ + # pkg-config modules not found (only present since X11R7 aka Xorg); use +diff --git a/gail/gailwindow.c b/gail/gailwindow.c +index 616b25e..add454b 100644 +--- a/gail/gailwindow.c ++++ b/gail/gailwindow.c +@@ -1071,7 +1071,7 @@ gail_window_get_mdi_zorder (AtkComponent *component) + return get_window_zorder (widget->window); + } + +-#elif defined (GDK_WINDOWING_WIN32) ++#elif defined (GDK_WINDOWING_WIN32) || defined (GDK_WINDOWING_DIRECTFB) + + static gint + gail_window_get_mdi_zorder (AtkComponent *component) +-- +1.7.0.2 + diff --git a/package/libgail/Config.in b/package/libgail/Config.in new file mode 100644 index 0000000000..821a922fa5 --- /dev/null +++ b/package/libgail/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_LIBGAIL + bool "libgail" + depends on BR2_USE_WCHAR # pango -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # pango -> libglib2 + depends on BR2_USE_MMU # pango -> libglib2 + depends on BR2_INSTALL_LIBSTDCPP # pango -> freetype + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango -> harfbuzz + depends on BR2_PACKAGE_LIBGTK2 + depends on BR2_DEPRECATED_SINCE_2015_08 + select BR2_PACKAGE_PANGO + help + GAIL provides accessibility support for gtk+ and + libgnomecanvas by implementing AtkObjects for widgets in + gtk+ and libgnomecanvas. + + The GAIL library is a GTK+ module. For example, if the + module is loaded in a program which calls + gtk_widget_get_accessible() for a GtkEntry an instance of + GailEntry is returned. This module is normally used with the + atk-bridge GTK+ module from at-spi to allow an assistive + technology, e.g a screenreader, to query or drive the + program. + + http://developer.gnome.org/projects/gap + +comment "libgail needs a toolchain w/ C++, wchar, threads" + depends on BR2_PACKAGE_LIBGTK2 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_DEPRECATED_SINCE_2015_08 diff --git a/package/libgail/libgail.hash b/package/libgail/libgail.hash new file mode 100644 index 0000000000..5cfd7525bd --- /dev/null +++ b/package/libgail/libgail.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/gail/1.22/gail-1.22.3.sha256sum +sha256 03f03029277eb4f0e2c15a825fe716245d8647ede0435645475110289b059ae8 gail-1.22.3.tar.bz2 diff --git a/package/libgail/libgail.mk b/package/libgail/libgail.mk new file mode 100644 index 0000000000..4c5c8684e9 --- /dev/null +++ b/package/libgail/libgail.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libgail +# +################################################################################ + +LIBGAIL_VERSION_MAJOR = 1.22 +LIBGAIL_VERSION = $(LIBGAIL_VERSION_MAJOR).3 +LIBGAIL_SOURCE = gail-$(LIBGAIL_VERSION).tar.bz2 +LIBGAIL_SITE = http://ftp.gnome.org/pub/gnome/sources/gail/$(LIBGAIL_VERSION_MAJOR) +LIBGAIL_AUTORECONF = YES +LIBGAIL_INSTALL_STAGING = YES +LIBGAIL_LICENSE = LGPLv2+ +LIBGAIL_LICENSE_FILES = COPYING + +ifneq ($(BR2_PACKAGE_XLIB_LIBX11),y) +LIBGAIL_CONF_OPTS += --disable-x +endif + +LIBGAIL_DEPENDENCIES = host-pkgconf libgtk2 pango + +$(eval $(autotools-package)) diff --git a/package/libgcrypt/0001-ac_cv_sys_symbol_underscore.patch b/package/libgcrypt/0001-ac_cv_sys_symbol_underscore.patch new file mode 100644 index 0000000000..95db0fbba8 --- /dev/null +++ b/package/libgcrypt/0001-ac_cv_sys_symbol_underscore.patch @@ -0,0 +1,27 @@ +diff --git a/acinclude.m4 b/acinclude.m4 +index a7bc0fa..1a5bffc 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -76,13 +76,14 @@ case "${host}" in + i386-emx-os2 | i[3456]86-pc-os2*emx | i386-pc-msdosdjgpp) + ac_cv_sys_symbol_underscore=yes + ;; +- *) +- if test "$cross_compiling" = yes; then +- if test "x$ac_cv_sys_symbol_underscore" = x ; then +- ac_cv_sys_symbol_underscore=yes +- fi +- else +- tmp_do_check="yes" ++ *) if test -z "$ac_cv_sys_symbol_underscore"; then ++ if test "$cross_compiling" = yes; then ++ if test "x$ac_cv_sys_symbol_underscore" = x ; then ++ ac_cv_sys_symbol_underscore=yes ++ fi ++ else ++ tmp_do_check="yes" ++ fi + fi + ;; + esac + diff --git a/package/libgcrypt/0002-reconfigure.patch b/package/libgcrypt/0002-reconfigure.patch new file mode 100644 index 0000000000..87d29a298b --- /dev/null +++ b/package/libgcrypt/0002-reconfigure.patch @@ -0,0 +1,27 @@ +diff --git a/configure b/configure +index 70a6d50..8f55d95 100755 +--- a/configure ++++ b/configure +@@ -22306,14 +22306,15 @@ case "${host}" in + i386-emx-os2 | i345686-pc-os2*emx | i386-pc-msdosdjgpp) + ac_cv_sys_symbol_underscore=yes + ;; +- *) +- if test "$cross_compiling" = yes; then +- if test "x$ac_cv_sys_symbol_underscore" = x ; then +- ac_cv_sys_symbol_underscore=yes ++ *)if test -z "$ac_cv_sys_symbol_underscore";then ++ if test "$cross_compiling" = yes; then ++ if test "x$ac_cv_sys_symbol_underscore" = x ; then ++ ac_cv_sys_symbol_underscore=yes ++ fi ++ else ++ tmp_do_check="yes" ++ fi + fi +- else +- tmp_do_check="yes" +- fi + ;; + esac + if test "$tmp_do_check" = "yes"; then diff --git a/package/libgcrypt/Config.in b/package/libgcrypt/Config.in new file mode 100644 index 0000000000..dd8f270116 --- /dev/null +++ b/package/libgcrypt/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBGCRYPT + bool "libgcrypt" + select BR2_PACKAGE_LIBGPG_ERROR + help + LibGCrypt is GNU's basic cryptographic library. + + http://www.gnu.org/software/libgcrypt/ diff --git a/package/libgcrypt/libgcrypt.hash b/package/libgcrypt/libgcrypt.hash new file mode 100644 index 0000000000..272d332353 --- /dev/null +++ b/package/libgcrypt/libgcrypt.hash @@ -0,0 +1,4 @@ +# From https://lists.gnupg.org/pipermail/gnupg-announce/2016q1/000384.html +sha1 c3a5a13e717f7b3e3895650afc1b6e0d3fe9c726 libgcrypt-1.6.5.tar.bz2 +# Calculated based on the hash above +sha256 f49ebc5842d455ae7019def33eb5a014a0f07a2a8353dc3aa50a76fd1dafa924 libgcrypt-1.6.5.tar.bz2 diff --git a/package/libgcrypt/libgcrypt.mk b/package/libgcrypt/libgcrypt.mk new file mode 100644 index 0000000000..7c27a22320 --- /dev/null +++ b/package/libgcrypt/libgcrypt.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# libgcrypt +# +################################################################################ + +LIBGCRYPT_VERSION = 1.6.5 +LIBGCRYPT_SOURCE = libgcrypt-$(LIBGCRYPT_VERSION).tar.bz2 +LIBGCRYPT_LICENSE = LGPLv2.1+ +LIBGCRYPT_LICENSE_FILES = COPYING.LIB +LIBGCRYPT_SITE = ftp://ftp.gnupg.org/gcrypt/libgcrypt +LIBGCRYPT_INSTALL_STAGING = YES +LIBGCRYPT_DEPENDENCIES = libgpg-error +LIBGCRYPT_CONFIG_SCRIPTS = libgcrypt-config + +LIBGCRYPT_CONF_ENV = \ + ac_cv_sys_symbol_underscore=no +LIBGCRYPT_CONF_OPTS = \ + --with-gpg-error-prefix=$(STAGING_DIR)/usr + +# Code doesn't build in thumb mode +ifeq ($(BR2_arm),y) +LIBGCRYPT_CONF_ENV += CFLAGS="$(patsubst -mthumb,,$(TARGET_CFLAGS))" +endif + +# Tests use fork() +define LIBGCRYPT_DISABLE_TESTS + $(SED) 's/ tests//' $(@D)/Makefile.in +endef + +LIBGCRYPT_POST_PATCH_HOOKS += LIBGCRYPT_DISABLE_TESTS + +$(eval $(autotools-package)) diff --git a/package/libgdiplus/0001-Fix-compile-error-when-cross-compiling.patch b/package/libgdiplus/0001-Fix-compile-error-when-cross-compiling.patch new file mode 100644 index 0000000000..db67d467df --- /dev/null +++ b/package/libgdiplus/0001-Fix-compile-error-when-cross-compiling.patch @@ -0,0 +1,35 @@ +From daf96b07c02734dceaf3c3b78c10e4e758b74d9e Mon Sep 17 00:00:00 2001 +From: Sergio Prado +Date: Fri, 18 Dec 2015 15:08:58 -0200 +Subject: [PATCH 1/1] Fix compile error when cross-compiling. + +When cross-compiling with libjpeg enabled, we can get errors like the +following when linking: + +sh-linux-gnu-gcc: ERROR: unsafe header/library path used in +cross-compilation: '/lib' + +That's because there is an error in the configure script that are not +generating ldflags correctly, and are trying to link with -L/lib. + +Signed-off-by: Sergio Prado +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 772d5fc9d87a..58d55ade48e3 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -223,7 +223,7 @@ AC_ARG_WITH([libjpeg], + jpeg_ok=no) + AC_MSG_RESULT($jpeg_ok) + if test "$jpeg_ok" = yes; then +- JPEG='jpeg'; LIBJPEG='-L${libjpeg_prefix}/lib -ljpeg' ++ JPEG='jpeg'; LIBJPEG="-L${libjpeg_prefix}/lib -ljpeg" + else + AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***) + fi +-- +1.9.1 + diff --git a/package/libgdiplus/Config.in b/package/libgdiplus/Config.in new file mode 100644 index 0000000000..68625031e2 --- /dev/null +++ b/package/libgdiplus/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_LIBGDIPLUS + bool "libgdiplus" + select BR2_PACKAGE_XLIB_LIBXFT + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_LIBPNG + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_WCHAR # libglib2 -> gettext + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + help + An Open Source implementation of the GDI+ API. + + https://github.com/mono/libgdiplus + +comment "libgdiplus needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_XORG7 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libgdiplus/libgdiplus.hash b/package/libgdiplus/libgdiplus.hash new file mode 100644 index 0000000000..f7fdcb58a4 --- /dev/null +++ b/package/libgdiplus/libgdiplus.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 98f8a8e58ed22e136c4ac6eaafbc860757f5a97901ecc0ea357e2b6e4cfa2be5 libgdiplus-4.2.tar.gz diff --git a/package/libgdiplus/libgdiplus.mk b/package/libgdiplus/libgdiplus.mk new file mode 100644 index 0000000000..aac859f865 --- /dev/null +++ b/package/libgdiplus/libgdiplus.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# libgdiplus +# +################################################################################ + +LIBGDIPLUS_VERSION = 4.2 +LIBGDIPLUS_SITE = $(call github,mono,libgdiplus,$(LIBGDIPLUS_VERSION)) + +# Although there is a LICENSE file thas specifies LGPL or MPLv1.1, +# looks like it is incorrect. The actual source files specify that +# they're licensed under MIT, and so does the COPYING file (and they +# all predate the addition of the LICENSE file). +LIBGDIPLUS_LICENSE = MIT +LIBGDIPLUS_LICENSE_FILES = COPYING src/carbon-private.h + +LIBGDIPLUS_INSTALL_STAGING = YES + +# github tarball doesn't have configure +LIBGDIPLUS_AUTORECONF = YES + +LIBGDIPLUS_DEPENDENCIES = xlib_libXft libglib2 cairo libpng host-pkgconf + +# API changes in recent versions of libgif makes it incompatible with +# this version of libgdiplus, so we are disabling it for now. +LIBGDIPLUS_CONF_OPTS = --without-libgif + +# there is a bug in the configure script that enables pango support +# when passing --without-pango, so let's just not use it +ifeq ($(BR2_PACKAGE_PANGO),y) +LIBGDIPLUS_CONF_OPTS += --with-pango +LIBGDIPLUS_DEPENDENCIES += pango +endif + +ifeq ($(BR2_PACKAGE_LIBEXIF),y) +LIBGDIPLUS_CONF_OPTS += --with-libexif +LIBGDIPLUS_DEPENDENCIES += libexif +else +LIBGDIPLUS_CONF_OPTS += --without-libexif +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +LIBGDIPLUS_CONF_OPTS += --with-libjpeg=$(STAGING_DIR)/usr +LIBGDIPLUS_DEPENDENCIES += jpeg +else +LIBGDIPLUS_CONF_OPTS += --without-libjpeg +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) +LIBGDIPLUS_CONF_OPTS += --with-libtiff=$(STAGING_DIR)/usr +LIBGDIPLUS_DEPENDENCIES += tiff +else +LIBGDIPLUS_CONF_OPTS += --without-libtiff +endif + +$(eval $(autotools-package)) diff --git a/package/libgee/Config.in b/package/libgee/Config.in new file mode 100644 index 0000000000..07c387c985 --- /dev/null +++ b/package/libgee/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBGEE + bool "libgee" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBGLIB2 + help + Libgee is an utility library providing GObject-based + interfaces and classes for commonly used data structures. + + https://wiki.gnome.org/Projects/Libgee + +comment "libgee needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libgee/libgee.hash b/package/libgee/libgee.hash new file mode 100644 index 0000000000..4c38c7833e --- /dev/null +++ b/package/libgee/libgee.hash @@ -0,0 +1,2 @@ +# From http://ftp.acc.umu.se/pub/gnome/sources/libgee/0.18/libgee-0.18.0.sha256sum +sha256 4ad99ef937d071b4883c061df40bfe233f7649d50c354cf81235f180b4244399 libgee-0.18.0.tar.xz diff --git a/package/libgee/libgee.mk b/package/libgee/libgee.mk new file mode 100644 index 0000000000..1df322c018 --- /dev/null +++ b/package/libgee/libgee.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libgee +# +################################################################################ + +LIBGEE_VERSION_MAJOR = 0.18 +LIBGEE_VERSION = $(LIBGEE_VERSION_MAJOR).0 +LIBGEE_SITE = http://ftp.gnome.org/pub/gnome/sources/libgee/$(LIBGEE_VERSION_MAJOR) +LIBGEE_SOURCE = libgee-$(LIBGEE_VERSION).tar.xz +LIBGEE_DEPENDENCIES = host-pkgconf host-vala libglib2 +LIBGEE_INSTALL_STAGING = YES +LIBGEE_LICENSE = LGPLv2.1+ +LIBGEE_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libgeotiff/0001-use-pkg-config.patch b/package/libgeotiff/0001-use-pkg-config.patch new file mode 100644 index 0000000000..a4b11f1523 --- /dev/null +++ b/package/libgeotiff/0001-use-pkg-config.patch @@ -0,0 +1,79 @@ +Use pkg-config for libtiff detection + +Using pkg-config allows proper behavior in static-only contexts: the +libtiff library might depend on libz and libjpeg. + +This patch also fixes a few other issues in the configure.ac script +that prevents autoreconf to work, or proper detection of the proj +library. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -196,39 +196,12 @@ + + TIFF_CONFIG="no" + +-AC_ARG_WITH(libtiff, [ --with-libtiff=dir Use libtiff in directory dir],,) +- +-if test "$with_libtiff" != "" ; then +- if test -f $with_libtiff/include/tiffio.h -a -d $with_libtiff/lib ; then +- LIBS="-L$with_libtiff/lib -ltiff $LIBS" +- TIFF_INC=-I$with_libtiff/include +- else +- LIBS="-L$with_libtiff -ltiff $LIBS" +- TIFF_INC=-I$with_libtiff +- fi +- LIBS_SAVED="$LIBS" +- AC_CHECK_LIB(tiff,TIFFOpen,[TIFF_CONFIG=yes], +- AC_MSG_ERROR([failed to link with -ltiff to find TIFFOpen]),-lm) +- AC_CHECK_LIB(tiff,TIFFMergeFieldInfo,[TIFF_CONFIG=yes], +- AC_MSG_ERROR([Libtiff 3.6.0 Beta or later required for this version of +-libgeotiff. Please upgrade or use an older version of libgeotiff.]),-lm) +- LIBS="$LIBS_SAVED" +-else +- AC_CHECK_LIB(tiff,TIFFOpen,[TIFF_CONFIG=yes], +- AC_MSG_ERROR([You will need to substantially rewrite libxtiff to +-build libgeotiff without libtiff]),-lm) +- LIBS_SAVED="$LIBS" +- AC_CHECK_LIB(tiff,TIFFMergeFieldInfo,[TIFF_CONFIG=yes], +- AC_MSG_ERROR([Libtiff 3.6.0 Beta or later required for this version of +-libgeotiff. Please upgrade libtiff or use an older version of libgeotiff.]),-lm) +- LIBS="$LIBS -ltiff" +- TIFF_INC= +- TIFF_CONFIG="yes" +-fi +- ++PKG_CHECK_MODULES(LIBTIFF, libtiff-4) ++TIFF_INC="$LIBTIFF_CFLAGS" ++LIBS="$LIBS $LIBTIFF_LIBS" ++TIFF_CONFIG="yes" + + AC_SUBST([TIFF_INC]) +-AC_SUBST([TIFF_PREFIX]) + AM_CONDITIONAL([TIFF_IS_CONFIG], [test ! x$TIFF_CONFIG = xno]) + + dnl +@@ -280,15 +253,16 @@ + PROJ_INC=-I$PROJ_INC + + AC_SUBST(PROJ_INC,$PROJ_INC) +- AC_DEFINE(HAVE_PROJECTS_H) ++ AC_DEFINE([HAVE_PROJECTS_H], [], [Whether proj library header is available]) + AC_DEFINE(HAVE_LIBPROJ) + AC_SUBST([HAVE_LIBPROJ]) + PROJ_CONFIG="yes" +- + else + AC_CHECK_LIB(proj,pj_init,,,-lm) + AC_CHECK_HEADERS(proj_api.h,,) +- PROJ_CONFIG="yes" ++ if "$ac_cv_lib_proj_pj_init" = "yes" -a "$ac_cv_header_proj_api_h" = "yes"; then ++ PROJ_CONFIG="yes" ++ fi + fi + + AM_CONDITIONAL([PROJ_IS_CONFIG], [test ! x$PROJ_CONFIG = xno]) diff --git a/package/libgeotiff/Config.in b/package/libgeotiff/Config.in new file mode 100644 index 0000000000..530cd450b4 --- /dev/null +++ b/package/libgeotiff/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBGEOTIFF + bool "libgeotiff" + select BR2_PACKAGE_TIFF + help + Libgeotiff is an open source library normally hosted on top of + libtiff for reading, and writing GeoTIFF information tags. + + http://geotiff.osgeo.org diff --git a/package/libgeotiff/libgeotiff.hash b/package/libgeotiff/libgeotiff.hash new file mode 100644 index 0000000000..66b8cb74b2 --- /dev/null +++ b/package/libgeotiff/libgeotiff.hash @@ -0,0 +1,2 @@ +# Locally computed +sha1 4c6f405869826bb7d9f35f1d69167e3b44a57ef0 libgeotiff-1.4.0.tar.gz diff --git a/package/libgeotiff/libgeotiff.mk b/package/libgeotiff/libgeotiff.mk new file mode 100644 index 0000000000..96f04c2e09 --- /dev/null +++ b/package/libgeotiff/libgeotiff.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# libgeotiff +# +################################################################################ + +LIBGEOTIFF_VERSION = 1.4.0 +LIBGEOTIFF_SITE = http://download.osgeo.org/geotiff/libgeotiff +LIBGEOTIFF_LICENSE = X11-style, public domain +LIBGEOTIFF_LICENSE_FILES = LICENSE +LIBGEOTIFF_DEPENDENCIES = tiff host-pkgconf +LIBGEOTIFF_INSTALL_STAGING = YES +LIBGEOTIFF_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_ZLIB),y) +LIBGEOTIFF_DEPENDENCIES += zlib +LIBGEOTIFF_CONF_OPTS += --with-zlib +else +LIBGEOTIFF_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +LIBGEOTIFF_DEPENDENCIES += jpeg +LIBGEOTIFF_CONF_OPTS += --with-jpeg +else +LIBGEOTIFF_CONF_OPTS += --without-jpeg +endif + +$(eval $(autotools-package)) diff --git a/package/libglade/Config.in b/package/libglade/Config.in new file mode 100644 index 0000000000..e269a07548 --- /dev/null +++ b/package/libglade/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBGLADE + bool "libglade" + depends on BR2_PACKAGE_LIBGTK2 + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_ATK + select BR2_PACKAGE_LIBXML2 + help + Libglade allows you to load glade interface files in a program + at runtime. It doesn't require GLADE to be used, but GLADE is + by far the easiest way to create the interface files. + + http://ftp.gnome.org/pub/GNOME/sources/libglade/ + +comment "libglade needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_LIBGTK2 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libglade/libglade.hash b/package/libglade/libglade.hash new file mode 100644 index 0000000000..fdcc837efc --- /dev/null +++ b/package/libglade/libglade.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/libglade/2.6/libglade-2.6.4.sha256sum +sha256 64361e7647839d36ed8336d992fd210d3e8139882269bed47dc4674980165dec libglade-2.6.4.tar.bz2 diff --git a/package/libglade/libglade.mk b/package/libglade/libglade.mk new file mode 100644 index 0000000000..a6eea09c34 --- /dev/null +++ b/package/libglade/libglade.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libglade +# +################################################################################ + +LIBGLADE_VERSION_MAJOR = 2.6 +LIBGLADE_VERSION = $(LIBGLADE_VERSION_MAJOR).4 +LIBGLADE_SOURCE = libglade-$(LIBGLADE_VERSION).tar.bz2 +LIBGLADE_SITE = http://ftp.gnome.org/pub/GNOME/sources/libglade/$(LIBGLADE_VERSION_MAJOR) +LIBGLADE_INSTALL_STAGING = YES +LIBGLADE_DEPENDENCIES = host-pkgconf libglib2 libgtk2 atk libxml2 +LIBGLADE_LICENSE = LGPLv2+ +LIBGLADE_LICENSE_FILES = COPYING + +define LIBGLADE_INSTALL_FIX + rm -rf $(TARGET_DIR)/usr/share/xml/libglade \ + $(TARGET_DIR)/usr/bin/libglade-convert +endef + +LIBGLADE_POST_INSTALL_TARGET_HOOKS += LIBGLADE_INSTALL_FIX + +$(eval $(autotools-package)) diff --git a/package/libglew/Config.in b/package/libglew/Config.in new file mode 100644 index 0000000000..67c49d4162 --- /dev/null +++ b/package/libglew/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_LIBGLEW + bool "libglew" + depends on BR2_PACKAGE_XORG7 + depends on BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXI + select BR2_PACKAGE_XLIB_LIBXMU + help + The OpenGL Extension Wrangler Library (GLEW) is a cross-platform C/C++ + extension loading library. GLEW provides efficient run-time mechanisms + for determining which OpenGL extensions are supported on the target + platform. OpenGL core and extension functionality is exposed in a + single header file. + + http://glew.sourceforge.net + +comment "libglew depends on X.org and needs an OpenGL backend" + depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_HAS_LIBGL diff --git a/package/libglew/libglew.hash b/package/libglew/libglew.hash new file mode 100644 index 0000000000..5e12785cb1 --- /dev/null +++ b/package/libglew/libglew.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 aa25dc48ed84b0b64b8d41cdd42c8f40f149c37fa2ffa39cd97f42c78d128bc7 glew-1.13.0.tgz diff --git a/package/libglew/libglew.mk b/package/libglew/libglew.mk new file mode 100644 index 0000000000..dc73f39621 --- /dev/null +++ b/package/libglew/libglew.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# libglew +# +################################################################################ + +LIBGLEW_VERSION = 1.13.0 +LIBGLEW_SOURCE = glew-$(LIBGLEW_VERSION).tgz +LIBGLEW_SITE = http://sourceforge.net/projects/glew/files/glew/$(LIBGLEW_VERSION) +LIBGLEW_LICENSE = BSD-3c, MIT +LIBGLEW_LICENSE_FILES = LICENSE.txt +LIBGLEW_INSTALL_STAGING = YES +LIBGLEW_DEPENDENCIES = libgl xlib_libX11 xlib_libXext xlib_libXi xlib_libXmu + +# using $TARGET_CONFIGURE_OPTS breaks compilation +define LIBGLEW_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + GLEW_DEST="/usr" LIBDIR="/usr/lib" \ + AR="$(TARGET_AR)" CC="$(TARGET_CC)" \ + LD="$(TARGET_CC)" STRIP="$(TARGET_STRIP)" \ + POPT="$(TARGET_CFLAGS)" LDFLAGS.EXTRA="$(TARGET_LDFLAGS)" +endef + +define LIBGLEW_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + GLEW_DEST="$(STAGING_DIR)/usr" LIBDIR="$(STAGING_DIR)/usr/lib" \ + $(TARGET_CONFIGURE_OPTS) install +endef + +define LIBGLEW_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + GLEW_DEST="$(TARGET_DIR)/usr" LIBDIR="$(TARGET_DIR)/usr/lib" \ + $(TARGET_CONFIGURE_OPTS) install +endef + +$(eval $(generic-package)) diff --git a/package/libglfw/Config.in b/package/libglfw/Config.in new file mode 100644 index 0000000000..045bd269e4 --- /dev/null +++ b/package/libglfw/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_LIBGLFW + bool "libglfw" + depends on BR2_PACKAGE_XORG7 + depends on BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_XLIB_LIBXCURSOR + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXINERAMA + select BR2_PACKAGE_XLIB_LIBXRANDR + help + GLFW is an Open Source, multi-platform library for creating + windows with OpenGL contexts and receiving input and events. + + http://www.glfw.org + +comment "libglfw depends on X.org and needs an OpenGL backend" + depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_HAS_LIBGL diff --git a/package/libglfw/libglfw.hash b/package/libglfw/libglfw.hash new file mode 100644 index 0000000000..3226aad22d --- /dev/null +++ b/package/libglfw/libglfw.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 6ac642087682aaf7f8397761a41a99042b2c656498217a1c63ba9706d1eef122 libglfw-3.1.2.tar.gz diff --git a/package/libglfw/libglfw.mk b/package/libglfw/libglfw.mk new file mode 100644 index 0000000000..0b1730d523 --- /dev/null +++ b/package/libglfw/libglfw.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libglfw +# +################################################################################ + +LIBGLFW_VERSION = 3.1.2 +LIBGLFW_SITE = $(call github,glfw,glfw,$(LIBGLFW_VERSION)) +LIBGLFW_INSTALL_STAGING = YES +LIBGLFW_DEPENDENCIES = libgl xlib_libXcursor xlib_libXext \ + xlib_libXinerama xlib_libXrandr +LIBGLFW_LICENSE = zlib +LIBGLFW_LICENSE_FILES = COPYING.txt + +LIBGLFW_CONF_OPTS += \ + -DGLFW_BUILD_EXAMPLES=OFF \ + -DGLFW_BUILD_TESTS=OFF \ + -DGLFW_BUILD_DOCS=OFF + +ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y) +LIBGLFW_DEPENDENCIES += xlib_libXi +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y) +LIBGLFW_DEPENDENCIES += xlib_libXxf86vm +endif + +$(eval $(cmake-package)) diff --git a/package/libglib2/0001-fix-compile-time-atomic-detection.patch b/package/libglib2/0001-fix-compile-time-atomic-detection.patch new file mode 100644 index 0000000000..f6d0c5d6a5 --- /dev/null +++ b/package/libglib2/0001-fix-compile-time-atomic-detection.patch @@ -0,0 +1,28 @@ +[PATCH] Fix compilation issues on architectures with limited atomic support + +Improved compile-time detection of atomic support in the compiler. + +Upstream-Status: submitted +See : https://bugzilla.gnome.org/show_bug.cgi?id=752731 + +Signed-off-by: Brendan Heading +--- + glib/gthread-posix.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c +index ae5d805..8db8557 100644 +--- a/glib/gthread-posix.c ++++ b/glib/gthread-posix.c +@@ -67,7 +67,7 @@ + #endif + + /* clang defines __ATOMIC_SEQ_CST but doesn't support the GCC extension */ +-#if defined(HAVE_FUTEX) && defined(__ATOMIC_SEQ_CST) && !defined(__clang__) ++#if defined(HAVE_FUTEX) && defined(__ATOMIC_SEQ_CST) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) && !defined(__clang__) + #define USE_NATIVE_MUTEX + #endif + +-- +2.4.3 + diff --git a/package/libglib2/0002-disable-tests.patch b/package/libglib2/0002-disable-tests.patch new file mode 100644 index 0000000000..1b0c535571 --- /dev/null +++ b/package/libglib2/0002-disable-tests.patch @@ -0,0 +1,43 @@ +Disable tests, some of them need python and sometimes host-python +gets mixed with distro python leading to build failures. + +Signed-off-by: Gustavo Zacarias + +diff -Nura glib-2.46.1.orig/gio/Makefile.am glib-2.46.1/gio/Makefile.am +--- glib-2.46.1.orig/gio/Makefile.am 2015-10-20 16:59:03.042212468 -0300 ++++ glib-2.46.1/gio/Makefile.am 2015-10-20 17:32:26.763146133 -0300 +@@ -233,7 +233,7 @@ + platform_deps += win32/libgiowin32.la + endif + +-SUBDIRS += . tests ++SUBDIRS += . + + if HAVE_FAM + SUBDIRS += fam +diff -Nura glib-2.46.1.orig/glib/Makefile.am glib-2.46.1/glib/Makefile.am +--- glib-2.46.1.orig/glib/Makefile.am 2015-10-20 16:59:03.066213318 -0300 ++++ glib-2.46.1/glib/Makefile.am 2015-10-20 17:33:23.537155988 -0300 +@@ -33,8 +33,8 @@ + MAYBE_PCRE = pcre + endif + +-SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . tests +-DIST_SUBDIRS = libcharset gnulib pcre update-pcre tests ++SUBDIRS = libcharset $(PRINTF_SUBDIR) $(MAYBE_PCRE) update-pcre . ++DIST_SUBDIRS = libcharset gnulib pcre update-pcre + + AM_CPPFLAGS = \ + $(glib_INCLUDES) \ +diff -Nura glib-2.46.1.orig/Makefile.am glib-2.46.1/Makefile.am +--- glib-2.46.1.orig/Makefile.am 2015-10-20 16:59:03.003211087 -0300 ++++ glib-2.46.1/Makefile.am 2015-10-20 17:32:20.923939420 -0300 +@@ -6,7 +6,7 @@ + + ACLOCAL_AMFLAGS = -I m4macros ${ACLOCAL_FLAGS} + +-SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs tests ++SUBDIRS = . m4macros glib gmodule gthread gobject gio po docs + DIST_SUBDIRS = $(SUBDIRS) build + + bin_SCRIPTS = glib-gettextize diff --git a/package/libglib2/Config.in b/package/libglib2/Config.in new file mode 100644 index 0000000000..84ee816a89 --- /dev/null +++ b/package/libglib2/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_LIBGLIB2 + bool "libglib2" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_PCRE_UCP + select BR2_PACKAGE_ZLIB + depends on BR2_USE_WCHAR # gettext + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Low-level core library that forms the basis of GTK+ and GNOME. + + http://www.gtk.org/ + +comment "libglib2 needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libglib2/libglib2.hash b/package/libglib2/libglib2.hash new file mode 100644 index 0000000000..6463759f24 --- /dev/null +++ b/package/libglib2/libglib2.hash @@ -0,0 +1,2 @@ +# https://download.gnome.org/sources/glib/2.48/glib-2.48.1.sha256sum +sha256 74411bff489cb2a3527bac743a51018841a56a4d896cc1e0d0d54f8166a14612 glib-2.48.1.tar.xz diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk new file mode 100644 index 0000000000..b479bae32a --- /dev/null +++ b/package/libglib2/libglib2.mk @@ -0,0 +1,171 @@ +################################################################################ +# +# libglib2 +# +################################################################################ + +LIBGLIB2_VERSION_MAJOR = 2.48 +LIBGLIB2_VERSION = $(LIBGLIB2_VERSION_MAJOR).1 +LIBGLIB2_SOURCE = glib-$(LIBGLIB2_VERSION).tar.xz +LIBGLIB2_SITE = http://ftp.gnome.org/pub/gnome/sources/glib/$(LIBGLIB2_VERSION_MAJOR) +LIBGLIB2_LICENSE = LGPLv2+ +LIBGLIB2_LICENSE_FILES = COPYING + +LIBGLIB2_INSTALL_STAGING = YES +LIBGLIB2_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install + +LIBGLIB2_CONF_ENV = \ + ac_cv_func_posix_getpwuid_r=yes \ + glib_cv_stack_grows=no \ + glib_cv_uscore=no \ + ac_cv_func_strtod=yes \ + ac_fsusage_space=yes \ + fu_cv_sys_stat_statfs2_bsize=yes \ + ac_cv_func_closedir_void=no \ + ac_cv_func_getloadavg=no \ + ac_cv_lib_util_getloadavg=no \ + ac_cv_lib_getloadavg_getloadavg=no \ + ac_cv_func_getgroups=yes \ + ac_cv_func_getgroups_works=yes \ + ac_cv_func_chown_works=yes \ + ac_cv_have_decl_euidaccess=no \ + ac_cv_func_euidaccess=no \ + ac_cv_have_decl_strnlen=yes \ + ac_cv_func_strnlen_working=yes \ + ac_cv_func_lstat_dereferences_slashed_symlink=yes \ + ac_cv_func_lstat_empty_string_bug=no \ + ac_cv_func_stat_empty_string_bug=no \ + vb_cv_func_rename_trailing_slash_bug=no \ + ac_cv_have_decl_nanosleep=yes \ + jm_cv_func_nanosleep_works=yes \ + gl_cv_func_working_utimes=yes \ + ac_cv_func_utime_null=yes \ + ac_cv_have_decl_strerror_r=yes \ + ac_cv_func_strerror_r_char_p=no \ + jm_cv_func_svid_putenv=yes \ + ac_cv_func_getcwd_null=yes \ + ac_cv_func_getdelim=yes \ + ac_cv_func_mkstemp=yes \ + utils_cv_func_mkstemp_limitations=no \ + utils_cv_func_mkdir_trailing_slash_bug=no \ + jm_cv_func_gettimeofday_clobber=no \ + gl_cv_func_working_readdir=yes \ + jm_ac_cv_func_link_follows_symlink=no \ + utils_cv_localtime_cache=no \ + ac_cv_struct_st_mtim_nsec=no \ + gl_cv_func_tzset_clobber=no \ + gl_cv_func_getcwd_null=yes \ + gl_cv_func_getcwd_path_max=yes \ + ac_cv_func_fnmatch_gnu=yes \ + am_getline_needs_run_time_check=no \ + am_cv_func_working_getline=yes \ + gl_cv_func_mkdir_trailing_slash_bug=no \ + gl_cv_func_mkstemp_limitations=no \ + ac_cv_func_working_mktime=yes \ + jm_cv_func_working_re_compile_pattern=yes \ + ac_use_included_regex=no \ + gl_cv_c_restrict=no \ + ac_cv_path_GLIB_GENMARSHAL=$(HOST_DIR)/usr/bin/glib-genmarshal \ + ac_cv_prog_F77=no \ + ac_cv_func_posix_getgrgid_r=no \ + glib_cv_long_long_format=ll \ + ac_cv_func_printf_unix98=yes \ + ac_cv_func_vsnprintf_c99=yes \ + ac_cv_func_newlocale=no \ + ac_cv_func_uselocale=no \ + ac_cv_func_strtod_l=no \ + ac_cv_func_strtoll_l=no \ + ac_cv_func_strtoull_l=no \ + gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) + +# old uClibc versions don't provide qsort_r +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) +LIBGLIB2_CONF_ENV += glib_cv_have_qsort_r=no +else +LIBGLIB2_CONF_ENV += glib_cv_have_qsort_r=yes +endif + +# glib/valgrind.h contains inline asm not compatible with thumb1 +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) +LIBGLIB2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -marm" +endif + +HOST_LIBGLIB2_CONF_OPTS = \ + --disable-coverage \ + --disable-dtrace \ + --disable-fam \ + --disable-libelf \ + --disable-selinux \ + --disable-systemtap \ + --disable-xattr \ + --with-pcre=system + +LIBGLIB2_DEPENDENCIES = \ + host-pkgconf host-libglib2 host-gettext \ + libffi pcre zlib $(if $(BR2_NEEDS_GETTEXT),gettext) + +HOST_LIBGLIB2_DEPENDENCIES = \ + host-gettext host-libffi host-pcre host-pkgconf host-zlib + +LIBGLIB2_CONF_OPTS = \ + --with-pcre=system + +ifneq ($(BR2_ENABLE_LOCALE),y) +LIBGLIB2_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_PACKAGE_ELFUTILS),y) +LIBGLIB2_CONF_OPTS += --enable-libelf +LIBGLIB2_DEPENDENCIES += elfutils +else +LIBGLIB2_CONF_OPTS += --disable-libelf +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +LIBGLIB2_CONF_OPTS += --with-libiconv=gnu +LIBGLIB2_DEPENDENCIES += libiconv +endif + +# Purge gdb-related files +ifneq ($(BR2_PACKAGE_GDB),y) +define LIBGLIB2_REMOVE_GDB_FILES + rm -rf $(TARGET_DIR)/usr/share/glib-2.0/gdb +endef +endif + +# Purge useless binaries from target +define LIBGLIB2_REMOVE_DEV_FILES + rm -rf $(TARGET_DIR)/usr/lib/glib-2.0 + rm -rf $(addprefix $(TARGET_DIR)/usr/share/glib-2.0/,codegen gettext) + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,gdbus-codegen glib-compile-schemas glib-compile-resources glib-genmarshal glib-gettextize glib-mkenums gobject-query gtester gtester-report) + $(LIBGLIB2_REMOVE_GDB_FILES) +endef + +LIBGLIB2_POST_INSTALL_TARGET_HOOKS += LIBGLIB2_REMOVE_DEV_FILES + +# Remove schema sources/DTDs, we use staging ones to compile them. +# Do so at target finalization since other packages install additional +# ones and we want to deal with it in a single place. +define LIBGLIB2_REMOVE_TARGET_SCHEMAS + rm -f $(TARGET_DIR)/usr/share/glib-2.0/schemas/*.xml \ + $(TARGET_DIR)/usr/share/glib-2.0/schemas/*.dtd +endef + +# Compile schemas at target finalization since other packages install +# them as well, and better do it in a central place. +# It's used at run time so it doesn't matter defering it. +define LIBGLIB2_COMPILE_SCHEMAS + $(HOST_DIR)/usr/bin/glib-compile-schemas \ + $(STAGING_DIR)/usr/share/glib-2.0/schemas \ + --targetdir=$(TARGET_DIR)/usr/share/glib-2.0/schemas +endef + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +TARGET_FINALIZE_HOOKS += LIBGLIB2_REMOVE_TARGET_SCHEMAS +TARGET_FINALIZE_HOOKS += LIBGLIB2_COMPILE_SCHEMAS +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +LIBGLIB2_HOST_BINARY = $(HOST_DIR)/usr/bin/glib-genmarshal diff --git a/package/libglu/Config.in b/package/libglu/Config.in new file mode 100644 index 0000000000..de8e1efba2 --- /dev/null +++ b/package/libglu/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBGLU + bool "libglu" + depends on BR2_PACKAGE_HAS_LIBGL + help + Mesa OpenGL Utility library + + http://cgit.freedesktop.org/mesa/glu/ + +comment "libglu needs an OpenGL backend" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/libglu/libglu.mk b/package/libglu/libglu.mk new file mode 100644 index 0000000000..038d281c59 --- /dev/null +++ b/package/libglu/libglu.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libglu +# +################################################################################ + +LIBGLU_VERSION = 9.0.0 +LIBGLU_SITE = http://cgit.freedesktop.org/mesa/glu/snapshot +LIBGLU_SOURCE = glu-$(LIBGLU_VERSION).tar.gz +LIBGLU_LICENSE = SGI-B-2.0 +LIBGLU_LICENSE_FILES = include/GL/glu.h +LIBGLU_INSTALL_STAGING = YES +# upstream does not distribute a autoconf´ed configure script +LIBGLU_AUTORECONF = YES +LIBGLU_DEPENDENCIES = libgl + +$(eval $(autotools-package)) diff --git a/package/libgpg-error/0001-avoid-breakage-with-gcc-5.patch b/package/libgpg-error/0001-avoid-breakage-with-gcc-5.patch new file mode 100644 index 0000000000..96dc569cb3 --- /dev/null +++ b/package/libgpg-error/0001-avoid-breakage-with-gcc-5.patch @@ -0,0 +1,56 @@ +Patch ported from Debian +http://anonscm.debian.org/cgit/pkg-gnupg/libgpg-error.git/diff/?id=c3d7571 + +Signed-off-by: Bernd Kuhls + + +From 91da4f5dbbc9d93975ef9753652a4e71719f9f27 Mon Sep 17 00:00:00 2001 +From: Daniel Kahn Gillmor +Date: Mon, 16 Mar 2015 13:26:00 -0400 +Subject: [LIBGPG-ERROR PATCH] avoid breakage with gcc 5 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + * src/Makefile.am: add -P to the C preprocessor when building + mkerrcodes.h, to avoid a noisy intermediate pipeline. + +-- + +With gcc 5 without this patch, we see many errors like the following: + +gcc -I. -I. -o mkerrcodes ./mkerrcodes.c +In file included from ./mkerrcodes.c:26:0: +./mkerrcodes.h:9:5: error: expected expression before ‘,’ token + { , "GPG_ERR_E2BIG" }, + ^ +./mkerrcodes.h:10:5: error: expected expression before ‘,’ token + { , "GPG_ERR_EACCES" }, + ^ + +This patch cleans up the generated mkerrcodes.h by making the +intermediate stage clean for all the versions of gcc i tested (4.x and +5). + +Debian-Bug-Id: 777374 +Signed-Off-By: Daniel Kahn Gillmor +--- + src/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 99c2c53..f847a80 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -213,7 +213,7 @@ code-to-errno.h: Makefile mkerrnos.awk errnos.in + # It is correct to use $(CPP). We want the host's idea of the error codes. + mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers) + $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@ +- $(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \ ++ $(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \ + $(AWK) -f $(srcdir)/mkerrcodes.awk >$@ + -rm _$@ + +-- +2.1.4 + diff --git a/package/libgpg-error/Config.in b/package/libgpg-error/Config.in new file mode 100644 index 0000000000..8287f98b0f --- /dev/null +++ b/package/libgpg-error/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBGPG_ERROR + bool "libgpg-error" + help + Libgpg-error is a small library with error codes and + descriptions shared by most GnuPG related software. + + ftp://gd.tuwien.ac.at/privacy/gnupg/libgpg-error diff --git a/package/libgpg-error/libgpg-error.hash b/package/libgpg-error/libgpg-error.hash new file mode 100644 index 0000000000..76aff5d751 --- /dev/null +++ b/package/libgpg-error/libgpg-error.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 fa6fbf315efa33a943751e3c4d04ea3d41ddf4bdee5727de3c0978277d52923b libgpg-error-1.12.tar.gz diff --git a/package/libgpg-error/libgpg-error.mk b/package/libgpg-error/libgpg-error.mk new file mode 100644 index 0000000000..52b7058e81 --- /dev/null +++ b/package/libgpg-error/libgpg-error.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libgpg-error +# +################################################################################ + +LIBGPG_ERROR_VERSION = 1.12 +LIBGPG_ERROR_SITE = ftp://ftp.gnupg.org/gcrypt/libgpg-error +LIBGPG_ERROR_LICENSE = LGPLv2.1+ +LIBGPG_ERROR_LICENSE_FILES = COPYING.LIB +LIBGPG_ERROR_INSTALL_STAGING = YES +LIBGPG_ERROR_CONFIG_SCRIPTS = gpg-error-config +# we patch src/Makefile.am +LIBGPG_ERROR_AUTORECONF = YES +LIBGPG_ERROR_GETTEXTIZE = YES + +$(eval $(autotools-package)) diff --git a/package/libgpgme/Config.in b/package/libgpgme/Config.in new file mode 100644 index 0000000000..e176dacd13 --- /dev/null +++ b/package/libgpgme/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBGPGME + bool "libgpgme" + depends on BR2_USE_MMU # libassuan + #gnupg is not needed to build, but at runtime. + select BR2_PACKAGE_GNUPG if !BR2_PACKAGE_GNUPG2 + select BR2_PACKAGE_LIBGPG_ERROR + select BR2_PACKAGE_LIBASSUAN + help + GnuPG Made Easy (GPGME) is a library designed to make access + to GnuPG easier for applications. + + http://www.gnupg.org/related_software/gpgme/ diff --git a/package/libgpgme/libgpgme.hash b/package/libgpgme/libgpgme.hash new file mode 100644 index 0000000000..a7efbf6d24 --- /dev/null +++ b/package/libgpgme/libgpgme.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 0b3d3d5107680c594777aae65882a1ff6dd1ba629a83432e719c8b82a743c207 gpgme-1.5.5.tar.bz2 diff --git a/package/libgpgme/libgpgme.mk b/package/libgpgme/libgpgme.mk new file mode 100644 index 0000000000..574ddd6be1 --- /dev/null +++ b/package/libgpgme/libgpgme.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# libgpgme +# +################################################################################ + +LIBGPGME_VERSION = 1.5.5 +LIBGPGME_SITE = ftp://ftp.gnupg.org/gcrypt/gpgme +LIBGPGME_SOURCE = gpgme-$(LIBGPGME_VERSION).tar.bz2 +LIBGPGME_LICENSE = LGPLv2.1+ +LIBGPGME_LICENSE_FILES = COPYING.LESSER +LIBGPGME_INSTALL_STAGING = YES +LIBGPGME_DEPENDENCIES = libassuan libgpg-error + +# libgpgme, needs to know the gpg binary path on the target. +LIBGPGME_CONF_OPTS = --with-gpg=/usr/bin/gpg \ + --with-gpg-error-prefix=$(STAGING_DIR)/usr \ + --with-libassuan-prefix=$(STAGING_DIR)/usr \ + --disable-gpgsm-test \ + --disable-gpgconf-test \ + --disable-g13-test \ + --disable-gpg-test + +# Handle argp-standalone or it errors out during build +ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y) +# musl libc does not define error_t in errno.h, but argp.h does. +# Assume we have error_t to avoid collision with the argp.h error_t. +LIBGPGME_CONF_ENV += LIBS="-largp" ac_cv_type_error_t=yes +LIBGPGME_DEPENDENCIES += argp-standalone +endif + +$(eval $(autotools-package)) diff --git a/package/libgsasl/Config.in b/package/libgsasl/Config.in new file mode 100644 index 0000000000..5181386272 --- /dev/null +++ b/package/libgsasl/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBGSASL + bool "libgsasl" + help + Simple Authentication and Security Layer framework Library. + GNU SASL is an implementation of the Simple Authentication and + Security Layer framework and a few common SASL mechanisms. + SASL is used by network servers (e.g., IMAP, SMTP) to request + authentication from clients, and in clients to authenticate + against servers. + + http://www.gnu.org/software/gsasl diff --git a/package/libgsasl/libgsasl.hash b/package/libgsasl/libgsasl.hash new file mode 100644 index 0000000000..4205927168 --- /dev/null +++ b/package/libgsasl/libgsasl.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 3adfb49f9c92a719dea855fd1840d698cde55d4648d332a69032ba8bea207720 libgsasl-1.8.0.tar.gz diff --git a/package/libgsasl/libgsasl.mk b/package/libgsasl/libgsasl.mk new file mode 100644 index 0000000000..00ce8e0375 --- /dev/null +++ b/package/libgsasl/libgsasl.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libgsasl +# +################################################################################ + +LIBGSASL_VERSION = 1.8.0 +LIBGSASL_SITE = $(BR2_GNU_MIRROR)/gsasl +LIBGSASL_LICENSE = LGPLv2.1+ (library), GPLv3+ (programs) +LIBGSASL_LICENSE_FILES = README COPYING.LIB COPYING +LIBGSASL_INSTALL_STAGING = YES +# It doesn't seem to build with our libgcrypt so better be safe +LIBGSASL_CONF_OPTS = --without-libgcrypt + +ifeq ($(BR2_PACKAGE_LIBIDN),y) +LIBGSASL_CONF_OPTS += --with-libidn-prefix=$(STAGING_DIR)/usr +LIBGSASL_DEPENDENCIES += libidn +else +LIBGSASL_CONF_OPTS += --without-stringprep +endif + +$(eval $(autotools-package)) diff --git a/package/libgtk2/0001-reduce-dependencies.patch b/package/libgtk2/0001-reduce-dependencies.patch new file mode 100644 index 0000000000..3250cae4b0 --- /dev/null +++ b/package/libgtk2/0001-reduce-dependencies.patch @@ -0,0 +1,117 @@ +Hack the configure.in file to add a "none" gdktarget which removes +dependencies on graphic backends such as X.org or DirectFB. Gtk does +not fully build in this mode, but it builds sufficiently to build the +host tools that are needed to build the target Gtk. + +Changes: + Ported to 2.24.18 + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Spenser Gilliland +--- +Index: libgtk2-2.24.18/configure.ac +=================================================================== +--- libgtk2-2.24.18.orig/configure.ac 2013-05-13 07:02:44.000000000 -0500 ++++ libgtk2-2.24.18/configure.ac 2013-05-27 02:12:09.947030335 -0500 +@@ -258,12 +258,12 @@ + gdktarget=x11 + fi + +-AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target], ++AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb/none]] select non-default GDK target], + gdktarget=$with_gdktarget) + + AC_SUBST(gdktarget) + case $gdktarget in +- x11|win32|quartz|directfb) ;; ++ x11|win32|quartz|directfb|none) ;; + *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);; + esac + +@@ -372,11 +373,15 @@ + ## annoying to construct + PKG_CHECK_MODULES(BASE_DEPENDENCIES, + [glib-2.0 >= glib_required_version dnl +- atk >= atk_required_version dnl +- pango >= pango_required_version dnl +- cairo >= cairo_required_version dnl + gdk-pixbuf-2.0 >= gdk_pixbuf_required_version]) + ++if test "x$gdktarget" != "xnone"; then ++ PKG_CHECK_MODULES(BASE_DEPENDENCIES, ++ [atk >= atk_required_version dnl ++ pango >= pango_required_version dnl ++ cairo >= cairo_required_version]) ++fi ++ + ## In addition to checking that cairo is present, we also need to + ## check that the correct cairo backend is there. E.g. if the GDK + ## target is win32 we need the cairo-win32 backend and so on. +@@ -387,8 +392,11 @@ + if test "x$cairo_backend" = "xx11"; then + cairo_backend=xlib + fi +-PKG_CHECK_MODULES(CAIRO_BACKEND, +- [cairo-$cairo_backend >= cairo_required_version]) ++ ++if test "x$gdktarget" != "xnone"; then ++ PKG_CHECK_MODULES(CAIRO_BACKEND, ++ [cairo-$cairo_backend >= cairo_required_version]) ++fi + + PKG_CHECK_MODULES(GMODULE, [gmodule-2.0]) + +@@ -1279,6 +1287,7 @@ + AM_CONDITIONAL(USE_DIRECTFB, false) + fi + ++if test "x$gdktarget" != "xnone"; then + + # Check for Pango flags + +@@ -1324,6 +1333,8 @@ + GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend" + fi + ++fi # gdktarget != none ++ + GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES` $MATH_LIB" + GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS" + # +@@ -1341,6 +1352,7 @@ + AC_SUBST(GDK_DEP_LIBS) + AC_SUBST(GDK_DEP_CFLAGS) + ++if test "x$gdktarget" != "xnone"; then + + ######################################## + # Check for Accessibility Toolkit flags +@@ -1372,6 +1384,10 @@ + fi + + GTK_PACKAGES="atk cairo gdk-pixbuf-2.0 gio-2.0" ++else # gdktarget != none ++GTK_PACKAGES="gdk-pixbuf-2.0" ++fi # gdktarget != none ++ + if test "x$gdktarget" = "xx11"; then + GTK_PACKAGES="$GTK_PACKAGES pangoft2" + fi +@@ -1533,6 +1549,8 @@ + gtk_save_cppflags="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS" + ++if test "x$gdktarget" != "xnone"; then ++ + AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([ + *** Can't find cairo-pdf.h. You must build Cairo with the pdf + *** backend enabled.])) +@@ -1547,6 +1565,8 @@ + *** svg backend enabled.])) + fi + ++fi # gdktarget != none ++ + CPPFLAGS="$gtk_save_cppflags" + + diff --git a/package/libgtk2/Config.in b/package/libgtk2/Config.in new file mode 100644 index 0000000000..b6cf37e191 --- /dev/null +++ b/package/libgtk2/Config.in @@ -0,0 +1,41 @@ +config BR2_PACKAGE_LIBGTK2 + bool "libgtk2" + select BR2_PACKAGE_ATK + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PS + select BR2_PACKAGE_CAIRO_PDF + select BR2_PACKAGE_CAIRO_SVG + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_PANGO + select BR2_PACKAGE_GDK_PIXBUF + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXRENDER + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + depends on BR2_INSTALL_LIBSTDCPP # pango + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango -> harfbuzz + help + The GTK+ version 2 graphical user interface library + + http://www.gtk.org/ + +if BR2_PACKAGE_LIBGTK2 + +config BR2_PACKAGE_LIBGTK2_DEMO + bool "Install libgtk2 demo program" + help + The GTK+ source base contains a gtk-demo program. This + option allows to install this program to the target. + +endif + +comment "libgtk2 needs a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_PACKAGE_XORG7 + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libgtk2/libgtk2.hash b/package/libgtk2/libgtk2.hash new file mode 100644 index 0000000000..175702f751 --- /dev/null +++ b/package/libgtk2/libgtk2.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.30.sha256sum +sha256 0d15cec3b6d55c60eac205b1f3ba81a1ed4eadd9d0f8e7c508bc7065d0c4ca50 gtk+-2.24.30.tar.xz diff --git a/package/libgtk2/libgtk2.mk b/package/libgtk2/libgtk2.mk new file mode 100644 index 0000000000..94fa97f204 --- /dev/null +++ b/package/libgtk2/libgtk2.mk @@ -0,0 +1,127 @@ +################################################################################ +# +# libgtk2 +# +################################################################################ + +LIBGTK2_VERSION_MAJOR = 2.24 +LIBGTK2_VERSION = $(LIBGTK2_VERSION_MAJOR).30 +LIBGTK2_SOURCE = gtk+-$(LIBGTK2_VERSION).tar.xz +LIBGTK2_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk+/$(LIBGTK2_VERSION_MAJOR) +LIBGTK2_INSTALL_STAGING = YES +LIBGTK2_LICENSE = LGPLv2+ +LIBGTK2_LICENSE_FILES = COPYING +# For 0001-reduce-dependencies.patch +LIBGTK2_AUTORECONF = YES + +LIBGTK2_CONF_ENV = \ + ac_cv_path_GTK_UPDATE_ICON_CACHE=$(HOST_DIR)/usr/bin/gtk-update-icon-cache \ + ac_cv_path_GDK_PIXBUF_CSOURCE=$(HOST_DIR)/usr/bin/gdk-pixbuf-csource \ + DB2HTML=false + +LIBGTK2_CONF_OPTS = --disable-glibtest --enable-explicit-deps=no + +LIBGTK2_DEPENDENCIES = host-pkgconf host-libgtk2 libglib2 cairo pango atk gdk-pixbuf + +# Xorg dependencies +LIBGTK2_CONF_OPTS += \ + --with-x \ + --x-includes=$(STAGING_DIR)/usr/include/X11 \ + --x-libraries=$(STAGING_DIR)/usr/lib \ + --with-gdktarget=x11 +LIBGTK2_DEPENDENCIES += \ + fontconfig xlib_libX11 xlib_libXext xlib_libXrender + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +LIBGTK2_CONF_OPTS += --enable-xinerama +LIBGTK2_DEPENDENCIES += xlib_libXinerama +else +LIBGTK2_CONF_OPTS += --disable-xinerama +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y) +LIBGTK2_CONF_OPTS += --with-xinput=yes +LIBGTK2_DEPENDENCIES += xlib_libXi +else +LIBGTK2_CONF_OPTS += --with-xinput=no +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +LIBGTK2_DEPENDENCIES += xlib_libXrandr +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +LIBGTK2_DEPENDENCIES += xlib_libXcursor +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y) +LIBGTK2_DEPENDENCIES += xlib_libXfixes +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y) +LIBGTK2_DEPENDENCIES += xlib_libXcomposite +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE),y) +LIBGTK2_DEPENDENCIES += xlib_libXdamage +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +LIBGTK2_DEPENDENCIES += libpng +else +LIBGTK2_CONF_OPTS += --without-libpng +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +LIBGTK2_DEPENDENCIES += jpeg +else +LIBGTK2_CONF_OPTS += --without-libjpeg +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) +LIBGTK2_DEPENDENCIES += tiff +else +LIBGTK2_CONF_OPTS += --without-libtiff +endif + +ifeq ($(BR2_PACKAGE_CUPS),y) +LIBGTK2_CONF_OPTS += CUPS_CONFIG="$(STAGING_DIR)/usr/bin/cups-config" +LIBGTK2_DEPENDENCIES += cups +else +LIBGTK2_CONF_OPTS += --disable-cups +endif + +ifeq ($(BR2_PACKAGE_LIBGTK2_DEMO),) +define LIBGTK2_POST_INSTALL_TWEAKS + rm -rf $(TARGET_DIR)/usr/share/gtk-2.0/demo $(TARGET_DIR)/usr/bin/gtk-demo +endef + +LIBGTK2_POST_INSTALL_TARGET_HOOKS += LIBGTK2_POST_INSTALL_TWEAKS +endif + +# We do not build a full version of libgtk2 for the host, because that +# requires compiling Cairo, Pango, ATK and X.org for the +# host. Therefore, we patch it to remove dependencies, and we hack the +# build to only build gdk-pixbuf-from-source and +# gtk-update-icon-cache, which are the host tools needed to build Gtk +# for the target. + +HOST_LIBGTK2_DEPENDENCIES = host-libglib2 host-libpng host-gdk-pixbuf +HOST_LIBGTK2_CONF_OPTS = \ + --disable-static \ + --disable-glibtest \ + --without-libtiff \ + --without-libjpeg \ + --with-gdktarget=none \ + --disable-cups + +define HOST_LIBGTK2_BUILD_CMDS + $(HOST_MAKE_ENV) make -C $(@D)/gtk gtk-update-icon-cache +endef + +define HOST_LIBGTK2_INSTALL_CMDS + cp $(@D)/gtk/gtk-update-icon-cache $(HOST_DIR)/usr/bin +endef + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libgtk3/0001-no-gtk-doc.patch b/package/libgtk3/0001-no-gtk-doc.patch new file mode 100644 index 0000000000..6dede7348a --- /dev/null +++ b/package/libgtk3/0001-no-gtk-doc.patch @@ -0,0 +1,25 @@ +Same patch as for systemd in commit +http://git.buildroot.net/buildroot/commit/?id=7144f2f04b70553 + +Fix deactivation of gtk-doc + +The tarball contains the Makefile for building documentation with gtk-doc, +Unfortunately the AM_CONDITIONAL variable is not the correct one, which +results in an error when running autoreconf. + +This patch fixes this issue. + +Signed-off-by: Eric Le Bihan +Signed-off-by: Hadrien Boutteville + +--- a/gtk-doc.make ++++ b/gtk-doc.make +@@ -267,7 +267,7 @@ + # + # Require gtk-doc when making dist + # +-if HAVE_GTK_DOC ++if ENABLE_GTK_DOC + dist-check-gtkdoc: docs + else + dist-check-gtkdoc: diff --git a/package/libgtk3/0002-fix-introspection-check.patch b/package/libgtk3/0002-fix-introspection-check.patch new file mode 100644 index 0000000000..4c2806d819 --- /dev/null +++ b/package/libgtk3/0002-fix-introspection-check.patch @@ -0,0 +1,28 @@ +Fix HAVE_INTROSPECTION does not appear in AM_CONDITIONAL + +During autoreconf GOBJECT_INTROSPECTION_CHECK could not be resolved because we +don't have introspection which provides its custom m4 macro. Reconfigure fails +with: + +gdk/Makefile.am:196: error: HAVE_INTROSPECTION does not appear in AM_CONDITIONAL +gtk/Makefile.am:1347: error: HAVE_INTROSPECTION does not appear in AM_CONDITIONAL + +We avoid to add a copy of introspection.m4 in the m4 directory of libgtk3 by +adding a check, as performed in Systemd. + +Signed-off-by: Hadrien Boutteville + +--- a/configure.ac ++++ b/configure.ac +@@ -1621,7 +1621,10 @@ + # GObject introspection + ################################################## + +-GOBJECT_INTROSPECTION_CHECK(introspection_required_version) ++m4_ifdef([GOBJECT_INTROSPECTION_CHECK], ++ [GOBJECT_INTROSPECTION_CHECK(introspection_required_version)], ++ [AM_CONDITIONAL([HAVE_INTROSPECTION], [false]) ++ enable_introspection=no]) + + ################################################## + # colord module diff --git a/package/libgtk3/0003-disable-atk-bridge.patch b/package/libgtk3/0003-disable-atk-bridge.patch new file mode 100644 index 0000000000..c92174f400 --- /dev/null +++ b/package/libgtk3/0003-disable-atk-bridge.patch @@ -0,0 +1,45 @@ +Remove atk-bridge support. + +atk-bridge doesn't seem useful for now in Buildroot and requires to +add two new packages just for it: at-spi2-core and at-spi2-atk. + +Signed-off-by: Hadrien Boutteville + +--- a/configure.ac ++++ b/configure.ac +@@ -1349,11 +1349,7 @@ + # Check for Accessibility Toolkit flags + ######################################## + +-if test x$enable_x11_backend = xyes; then +- ATK_PACKAGES="atk atk-bridge-2.0" +-else +- ATK_PACKAGES="atk" +-fi ++ATK_PACKAGES="atk" + + PKG_CHECK_MODULES(ATK, $ATK_PACKAGES) + +--- a/gtk/a11y/gtkaccessibility.c ++++ b/gtk/a11y/gtkaccessibility.c +@@ -37,10 +37,6 @@ + #include + #include + +-#ifdef GDK_WINDOWING_X11 +-#include +-#endif +- + static gboolean gail_focus_watcher (GSignalInvocationHint *ihint, + guint n_param_values, + const GValue *param_values, +@@ -987,9 +983,5 @@ + _gtk_accessibility_override_atk_util (); + do_window_event_initialization (); + +-#ifdef GDK_WINDOWING_X11 +- atk_bridge_adaptor_init (NULL, NULL); +-#endif +- + atk_misc_instance = g_object_new (GTK_TYPE_MISC_IMPL, NULL); + } diff --git a/package/libgtk3/0004-Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch b/package/libgtk3/0004-Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch new file mode 100644 index 0000000000..cea4259b9a --- /dev/null +++ b/package/libgtk3/0004-Remove-Gdk-dependency-from-gtk-encode-symbolic-svg.patch @@ -0,0 +1,105 @@ +From 4d09ff324419fe4e671233044e424378da53969b Mon Sep 17 00:00:00 2001 +From: Jussi Kukkonen +Date: Tue, 9 Jun 2015 14:20:30 +0300 +Subject: [PATCH] Remove Gdk-dependency from gtk-encode-symbolic-svg + +Building gtk-encode-symbolic-svg without building Gdk is useful +as only the icon tools are needed on the native build: this makes +native build much faster and requires much less dependencies. + +Upstream-Status: Pending + +Signed-off-by: Jussi Kukkonen +Signed-off-by: Gustavo Zacarias +--- +Patch status: taken from yocto, upstream pending + + gtk/encodesymbolic.c | 36 ++++++++++-------------------------- + 1 file changed, 10 insertions(+), 26 deletions(-) + +diff --git a/gtk/encodesymbolic.c b/gtk/encodesymbolic.c +index 9f7d015..1f07563 100644 +--- a/gtk/encodesymbolic.c ++++ b/gtk/encodesymbolic.c +@@ -19,7 +19,6 @@ + + #include + #include +-#include + #include + + #ifdef HAVE_UNISTD_H +@@ -43,30 +42,18 @@ static GdkPixbuf * + load_symbolic_svg (char *file_data, gsize file_len, + int width, + int height, +- const GdkRGBA *fg, +- const GdkRGBA *success_color, +- const GdkRGBA *warning_color, +- const GdkRGBA *error_color, ++ const char *css_fg, ++ const char *css_success, ++ const char *css_warning, ++ const char *css_error, + GError **error) + { + GInputStream *stream; + GdkPixbuf *pixbuf; +- gchar *css_fg; +- gchar *css_success; +- gchar *css_warning; +- gchar *css_error; + gchar *data; + gchar *svg_width, *svg_height; + gchar *escaped_file_data; + +- css_fg = gdk_rgba_to_string (fg); +- +- css_success = css_warning = css_error = NULL; +- +- css_warning = gdk_rgba_to_string (warning_color); +- css_error = gdk_rgba_to_string (error_color); +- css_success = gdk_rgba_to_string (success_color); +- + /* Fetch size from the original icon */ + stream = g_memory_input_stream_new_from_data (file_data, file_len, NULL); + pixbuf = gdk_pixbuf_new_from_stream (stream, NULL, error); +@@ -105,10 +92,6 @@ load_symbolic_svg (char *file_data, gsize file_len, + "", + NULL); + g_free (escaped_file_data); +- g_free (css_fg); +- g_free (css_warning); +- g_free (css_error); +- g_free (css_success); + g_free (svg_width); + g_free (svg_height); + +@@ -167,7 +150,8 @@ make_symbolic_pixbuf (char *file, + GError **error) + + { +- GdkRGBA r = { 1,0,0,1}, g = {0,1,0,1}; ++ const char r[] = "rgba(255,0,0,1)"; ++ const char g[] = "rgba(0,255,0,1)"; + GdkPixbuf *loaded; + GdkPixbuf *pixbuf; + int plane; +@@ -196,10 +180,10 @@ make_symbolic_pixbuf (char *file, + * the "rest", as all color fractions should add up to 1. + */ + loaded = load_symbolic_svg (file_data, file_len, width, height, +- &g, +- plane == 0 ? &r : &g, +- plane == 1 ? &r : &g, +- plane == 2 ? &r : &g, ++ g, ++ plane == 0 ? r : g, ++ plane == 1 ? r : g, ++ plane == 2 ? r : g, + error); + if (loaded == NULL) + return NULL; +-- +2.1.4 + diff --git a/package/libgtk3/Config.in b/package/libgtk3/Config.in new file mode 100644 index 0000000000..39105acd9b --- /dev/null +++ b/package/libgtk3/Config.in @@ -0,0 +1,106 @@ +comment "libgtk3 needs a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS + +comment "libgtk3 needs an OpenGL or OpenGL EGL backend provided by mesa3d" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL && \ + !BR2_PACKAGE_HAS_LIBGL + +config BR2_PACKAGE_LIBGTK3 + bool "libgtk3" + select BR2_PACKAGE_ATK + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PS + select BR2_PACKAGE_CAIRO_PDF + select BR2_PACKAGE_CAIRO_SVG + select BR2_PACKAGE_LIBEPOXY + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_PANGO + select BR2_PACKAGE_GDK_PIXBUF + # At least one backend is required + select BR2_PACKAGE_LIBGTK3_BROADWAY if \ + !(BR2_PACKAGE_LIBGTK3_X11 || BR2_PACKAGE_LIBGTK3_WAYLAND) + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + depends on BR2_INSTALL_LIBSTDCPP # pango + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango -> harfbuzz + depends on BR2_PACKAGE_MESA3D_OPENGL_EGL || \ + BR2_PACKAGE_HAS_LIBGL + help + The GTK+ version 3 graphical user interface library + + http://www.gtk.org/ + +if BR2_PACKAGE_LIBGTK3 + +config BR2_PACKAGE_LIBGTK3_BROADWAY + bool "Broadway GDK backend" + default y + help + This enables the Broadway backend for GDK, which provides support + for displaying GTK+ applications in a web browser, using HTML5 and + web sockets. + + For example, to run gtk3-demo on a target which IP address is + 192.168.0.1 and use it from a web browser, execute the following + commands: + + $ broadwayd -a 192.168.0.1 -p 8080 :2 & + $ export GDK_BACKEND=broadway + $ export BROADWAY_DISPLAY=:2 + $ gtk3-demo + + Then open a web browser at address http://192.168.0.1:8080. + Javascript and web sockets should be enabled. + +comment "Wayland GDK backend needs an OpenGL EGL backend provided by mesa3d w/ headers >= 3.17" + depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + +config BR2_PACKAGE_LIBGTK3_WAYLAND + bool "Wayland GDK backend" + default y + depends on BR2_PACKAGE_MESA3D_OPENGL_EGL + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + select BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_WAYLAND_PROTOCOLS + select BR2_PACKAGE_LIBXKBCOMMON + help + This enables the Wayland backend for GDK. + +comment "X11 GDK backend needs an OpenGL provider" + depends on !BR2_PACKAGE_HAS_LIBGL + +config BR2_PACKAGE_LIBGTK3_X11 + bool "X11 GDK backend" + default y + depends on BR2_PACKAGE_XORG7 + depends on BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXI + help + This enables the X11 backend for GDK. + +config BR2_PACKAGE_LIBGTK3_DEMO + bool "Install libgtk3 demo program" + select BR2_PACKAGE_SHARED_MIME_INFO + select BR2_PACKAGE_HICOLOR_ICON_THEME + help + The GTK+ source base contains a demo program. This + option allows to install this program to the target. + +config BR2_PACKAGE_LIBGTK3_TESTS + bool "Install libgtk3 tests" + help + The GTK+ source base contains tests. This option + allows to install them to the target. + +endif diff --git a/package/libgtk3/libgtk3.hash b/package/libgtk3/libgtk3.hash new file mode 100644 index 0000000000..78bfc868ba --- /dev/null +++ b/package/libgtk3/libgtk3.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/gtk+/3.20/gtk+-3.20.4.sha256sum +sha256 e7e3aaf54a54dd1c1ca0588939254abe31329e0bcd280a12290d5306b41ea03f gtk+-3.20.4.tar.xz diff --git a/package/libgtk3/libgtk3.mk b/package/libgtk3/libgtk3.mk new file mode 100644 index 0000000000..0ba7928fa3 --- /dev/null +++ b/package/libgtk3/libgtk3.mk @@ -0,0 +1,194 @@ +################################################################################ +# +# libgtk3 +# +################################################################################ + +LIBGTK3_VERSION_MAJOR = 3.20 +LIBGTK3_VERSION = $(LIBGTK3_VERSION_MAJOR).4 +LIBGTK3_SOURCE = gtk+-$(LIBGTK3_VERSION).tar.xz +LIBGTK3_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk+/$(LIBGTK3_VERSION_MAJOR) +LIBGTK3_LICENSE = LGPLv2+ +LIBGTK3_LICENSE_FILES = COPYING +LIBGTK3_INSTALL_STAGING = YES +LIBGTK3_AUTORECONF = YES + +LIBGTK3_CONF_ENV = \ + ac_cv_path_GTK_UPDATE_ICON_CACHE=$(HOST_DIR)/usr/bin/gtk-update-icon-cache \ + ac_cv_path_GDK_PIXBUF_CSOURCE=$(HOST_DIR)/usr/bin/gdk-pixbuf-csource \ + PKG_CONFIG_FOR_BUILD=$(HOST_DIR)/usr/bin/pkgconf + +LIBGTK3_CONF_OPTS = \ + --disable-glibtest \ + --enable-explicit-deps=no \ + --enable-gtk2-dependency \ + --disable-introspection + +# Override pkg-config pkgdatadir variable, it needs the prefix +LIBGTK3_MAKE_OPTS = \ + WAYLAND_PROTOCOLS_DATADIR=$(STAGING_DIR)/usr/share/wayland-protocols + +LIBGTK3_DEPENDENCIES = host-pkgconf host-libgtk3 atk libglib2 cairo pango gdk-pixbuf libepoxy + +ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) +LIBGTK3_DEPENDENCIES += fontconfig xlib_libX11 xlib_libXext xlib_libXrender xlib_libXi + +LIBGTK3_CONF_OPTS += \ + --enable-x11-backend \ + --x-includes=$(STAGING_DIR)/usr/include/X11 \ + --x-libraries=$(STAGING_DIR)/usr/lib +else +LIBGTK3_CONF_OPTS += --disable-x11-backend +endif + +ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND),y) +LIBGTK3_DEPENDENCIES += wayland wayland-protocols libxkbcommon +LIBGTK3_CONF_OPTS += --enable-wayland-backend +else +LIBGTK3_CONF_OPTS += --disable-wayland-backend +endif + +ifeq ($(BR2_PACKAGE_LIBGTK3_BROADWAY),y) +LIBGTK3_CONF_OPTS += --enable-broadway-backend +else +LIBGTK3_CONF_OPTS += --disable-broadway-backend +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +LIBGTK3_CONF_OPTS += --enable-xinerama +LIBGTK3_DEPENDENCIES += xlib_libXinerama +else +LIBGTK3_CONF_OPTS += --disable-xinerama +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +LIBGTK3_CONF_OPTS += --enable-xrandr +LIBGTK3_DEPENDENCIES += xlib_libXrandr +else +LIBGTK3_CONF_OPTS += --disable-xrandr +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +LIBGTK3_DEPENDENCIES += xlib_libXcursor +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y) +LIBGTK3_CONF_OPTS += --enable-xfixes +LIBGTK3_DEPENDENCIES += xlib_libXfixes +else +LIBGTK3_CONF_OPTS += --disable-xfixes +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y) +LIBGTK3_CONF_OPTS += --enable-xcomposite +LIBGTK3_DEPENDENCIES += xlib_libXcomposite +else +LIBGTK3_CONF_OPTS += --disable-xcomposite +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE),y) +LIBGTK3_CONF_OPTS += --enable-xdamage +LIBGTK3_DEPENDENCIES += xlib_libXdamage +else +LIBGTK3_CONF_OPTS += --disable-xdamage +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXKBFILE),y) +LIBGTK3_CONF_OPTS += --enable-xkb +LIBGTK3_DEPENDENCIES += xlib_libxkbfile +else +LIBGTK3_CONF_OPTS += --disable-xkb +endif + +ifeq ($(BR2_PACKAGE_CUPS),y) +LIBGTK3_CONF_OPTS += --enable-cups +LIBGTK3_CONF_ENV += ac_cv_path_CUPS_CONFIG=$(STAGING_DIR)/usr/bin/cups-config +LIBGTK3_DEPENDENCIES += cups +else +LIBGTK3_CONF_OPTS += --disable-cups +endif + +ifeq ($(BR2_PACKAGE_LIBGTK3_DEMO),y) +LIBGTK3_DEPENDENCIES += hicolor-icon-theme shared-mime-info +else +define LIBGTK3_REMOVE_DEMOS + $(RM) $(TARGET_DIR)/usr/bin/gtk3-demo \ + $(TARGET_DIR)/usr/bin/gtk3-demo-application +endef +LIBGTK3_POST_INSTALL_TARGET_HOOKS += LIBGTK3_REMOVE_DEMOS +endif + +ifeq ($(BR2_PACKAGE_LIBGTK3_TESTS),y) +LIBGTK3_CONF_OPTS += --enable-installed-tests +else +LIBGTK3_CONF_OPTS += --disable-installed-tests +endif + +define LIBGTK3_COMPILE_GLIB_SCHEMAS + $(HOST_DIR)/usr/bin/glib-compile-schemas \ + $(TARGET_DIR)/usr/share/glib-2.0/schemas +endef + +LIBGTK3_POST_INSTALL_TARGET_HOOKS += LIBGTK3_COMPILE_GLIB_SCHEMAS + +# gtk+ >= 3.10 can build a native version of gtk-update-icon-cache if +# --enable-gtk2-dependency=no is set when invoking './configure'. +# +# Unfortunately, if the target toolchain is based on uClibc, the macro +# AM_GLIB_GNU_GETTEXT will detect the libintl built for the target and +# will add '-lintl' to the default list of libraries for the linker (used +# for both native and target builds). +# +# But no native version of libintl is available (the functions are +# provided by glibc). So gtk-update-icon-cache will not build. +# +# As a workaround, we build gtk-update-icon-cache on our own, set +# --enable-gtk2-dependency=yes and force './configure' to use our version. + +HOST_LIBGTK3_DEPENDENCIES = \ + host-libglib2 \ + host-libpng \ + host-gdk-pixbuf \ + host-pkgconf \ + host-librsvg + +HOST_LIBGTK3_CFLAGS = \ + `$(HOST_DIR)/usr/bin/pkgconf --cflags --libs gdk-pixbuf-2.0` \ + `$(HOST_DIR)/usr/bin/pkgconf --cflags --libs gio-2.0` + +define HOST_LIBGTK3_CONFIGURE_CMDS + echo "#define GETTEXT_PACKAGE \"gtk30\"" >> $(@D)/gtk/config.h + echo "#define HAVE_UNISTD_H 1" >> $(@D)/gtk/config.h + echo "#define HAVE_FTW_H 1" >> $(@D)/gtk/config.h +endef + +define HOST_LIBGTK3_BUILD_CMDS + $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \ + $(@D)/gtk/updateiconcache.c \ + $(HOST_LIBGTK3_CFLAGS) \ + -o $(@D)/gtk/gtk-update-icon-cache + $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \ + $(@D)/gtk/encodesymbolic.c \ + $(HOST_LIBGTK3_CFLAGS) \ + -o $(@D)/gtk/gtk-encode-symbolic-svg +endef + +define HOST_LIBGTK3_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/gtk/gtk-update-icon-cache \ + $(HOST_DIR)/usr/bin/gtk-update-icon-cache + $(INSTALL) -D -m 0755 $(@D)/gtk/gtk-encode-symbolic-svg \ + $(HOST_DIR)/usr/bin/gtk-encode-symbolic-svg +endef + +# Create icon-theme.cache for each of the icon directories/themes +# It's not strictly necessary but speeds up lookups +ifeq ($(BR2_PACKAGE_LIBGTK3),y) +define LIBGTK3_UPDATE_ICON_CACHE + find $(TARGET_DIR)/usr/share/icons -maxdepth 1 -mindepth 1 -type d \ + -exec $(HOST_DIR)/usr/bin/gtk-update-icon-cache {} \; +endef +TARGET_FINALIZE_HOOKS += LIBGTK3_UPDATE_ICON_CACHE +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libgudev/Config.in b/package/libgudev/Config.in new file mode 100644 index 0000000000..ecaacf5fd2 --- /dev/null +++ b/package/libgudev/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBGUDEV + bool "libgudev" + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_USE_WCHAR # gettext + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBGLIB2 + help + This library provides GObject bindings for libudev. It was + originally part of udev-extras, then udev, then systemd. + It's now a project on its own. Required for building some + programs that use udev, when using systemd. + + When systemd is not used, libgudev is directly provided by + eudev. + + https://wiki.gnome.org/Projects/libgudev + +comment "libgudev needs udev /dev handling and a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_PACKAGE_HAS_UDEV diff --git a/package/libgudev/libgudev.hash b/package/libgudev/libgudev.hash new file mode 100644 index 0000000000..a6c1d6b535 --- /dev/null +++ b/package/libgudev/libgudev.hash @@ -0,0 +1,2 @@ +# From: http://ftp.gnome.org/pub/GNOME/sources/libgudev/230/libgudev-230.sha256sum +sha256 a2e77faced0c66d7498403adefcc0707105e03db71a2b2abd620025b86347c18 libgudev-230.tar.xz diff --git a/package/libgudev/libgudev.mk b/package/libgudev/libgudev.mk new file mode 100644 index 0000000000..dce9cd8e71 --- /dev/null +++ b/package/libgudev/libgudev.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libgudev +# +################################################################################ + +LIBGUDEV_VERSION = 230 +LIBGUDEV_SOURCE = libgudev-$(LIBGUDEV_VERSION).tar.xz +LIBGUDEV_SITE = http://ftp.gnome.org/pub/GNOME/sources/libgudev/$(LIBGUDEV_VERSION) +LIBGUDEV_INSTALL_STAGING = YES +LIBGUDEV_DEPENDENCIES = host-pkgconf udev libglib2 +LIBGUDEV_LICENSE = LGPLv2.1+ +LIBGUDEV_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libhdhomerun/0001-dont-strip.patch b/package/libhdhomerun/0001-dont-strip.patch new file mode 100644 index 0000000000..17a9ff49a9 --- /dev/null +++ b/package/libhdhomerun/0001-dont-strip.patch @@ -0,0 +1,18 @@ +Disable strip in Makefile. + +Patch downloaded from Gentoo: +https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/libhdhomerun/files/dont-strip.patch + +Signed-off-by: Bernd Kuhls + +diff -Nur libhdhomerun/Makefile libhdhomerun.fix/Makefile +--- libhdhomerun/Makefile 2012-08-30 15:46:27.000000000 -0500 ++++ libhdhomerun.fix/Makefile 2013-03-24 14:47:08.740937164 -0500 +@@ -42,7 +42,6 @@ + + hdhomerun_config$(BINEXT) : hdhomerun_config.c $(LIBSRCS) + $(CC) $(CFLAGS) $+ $(LDFLAGS) -o $@ +- $(STRIP) $@ + + libhdhomerun$(LIBEXT) : $(LIBSRCS) + $(CC) $(CFLAGS) -fPIC -DDLL_EXPORT $(SHARED) $+ $(LDFLAGS) -o $@ diff --git a/package/libhdhomerun/Config.in b/package/libhdhomerun/Config.in new file mode 100644 index 0000000000..9425c1b159 --- /dev/null +++ b/package/libhdhomerun/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBHDHOMERUN + bool "libhdhomerun" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + HDHomeRun is a network-attached digital television tuner + box, produced by the company SiliconDust USA, Inc. + + http://www.silicondust.com + +comment "libhdhomerun needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/libhdhomerun/libhdhomerun.hash b/package/libhdhomerun/libhdhomerun.hash new file mode 100644 index 0000000000..7897764164 --- /dev/null +++ b/package/libhdhomerun/libhdhomerun.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 907dfbd1eb82aebd8b09e7c00c21a02433e6baaacf4a4f99aa2511b1d5244baf libhdhomerun_20150826.tgz diff --git a/package/libhdhomerun/libhdhomerun.mk b/package/libhdhomerun/libhdhomerun.mk new file mode 100644 index 0000000000..16e34c2383 --- /dev/null +++ b/package/libhdhomerun/libhdhomerun.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# libhdhomerun +# +################################################################################ + +LIBHDHOMERUN_VERSION = 20150826 +LIBHDHOMERUN_SOURCE = libhdhomerun_$(LIBHDHOMERUN_VERSION).tgz +LIBHDHOMERUN_SITE = http://download.silicondust.com/hdhomerun +LIBHDHOMERUN_LICENSE = LGPLv2.1+ +LIBHDHOMERUN_LICENSE_FILES = lgpl.txt +LIBHDHOMERUN_INSTALL_STAGING = YES + +define LIBHDHOMERUN_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \ + CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) +endef + +define LIBHDHOMERUN_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/libhdhomerun.so \ + $(STAGING_DIR)/usr/lib/libhdhomerun.so + mkdir -p $(STAGING_DIR)/usr/include/libhdhomerun/ + $(INSTALL) -m 0644 $(@D)/*.h \ + $(STAGING_DIR)/usr/include/libhdhomerun/ +endef + +define LIBHDHOMERUN_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/libhdhomerun.so \ + $(TARGET_DIR)/usr/lib/libhdhomerun.so +endef + +$(eval $(generic-package)) diff --git a/package/libhid/0001-dont-fiddle-with-debug-flags.patch b/package/libhid/0001-dont-fiddle-with-debug-flags.patch new file mode 100644 index 0000000000..44a172877a --- /dev/null +++ b/package/libhid/0001-dont-fiddle-with-debug-flags.patch @@ -0,0 +1,19 @@ +MD_CONF_DEBUGGING changes CFLAGS and CXXFLAGS with a horrible magic so disable +it to prevent compilation errors. + +downloaded from +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/libhid/files/libhid-0.2.16-gentoo.patch?revision=1.1&view=markup + +Signed-off-by: Bernd Kuhls + +diff -uNr libhid-0.2.16.org/configure.ac libhid-0.2.16/configure.ac +--- libhid-0.2.16.org/configure.ac 2007-04-01 22:32:10.000000000 +0200 ++++ libhid-0.2.16/configure.ac 2014-10-19 21:31:00.550091947 +0200 +@@ -78,7 +78,6 @@ + AC_C_BIGENDIAN + AC_C_STRINGIZE + +-MD_CONF_DEBUGGING + MD_CONF_COMPILER + AM_CONDITIONAL(OS_LINUX, test "$MD_OS" = "linux") + AM_CONDITIONAL(OS_BSD, test "$MD_OS" = "bsd") diff --git a/package/libhid/0002-no-newline-in-ldflags.patch b/package/libhid/0002-no-newline-in-ldflags.patch new file mode 100644 index 0000000000..df845ee1f5 --- /dev/null +++ b/package/libhid/0002-no-newline-in-ldflags.patch @@ -0,0 +1,22 @@ +Fix improper usage of macro that introduces a wrong newline + +The MD_CONF_FLAGS() macro was used with a final newline that +introduces an invalid newline in the middle of the macro expansion +when defining LDFLAGS. + +Signed-off-by: Thomas Petazzoni + +Index: libhid-0.2.16/configure.ac +=================================================================== +--- libhid-0.2.16.orig/configure.ac 2007-04-01 22:32:10.000000000 +0200 ++++ libhid-0.2.16/configure.ac 2012-12-12 20:24:03.000000000 +0100 +@@ -102,8 +102,7 @@ + [], + [$OS_CFLAGS $LIBUSB_CFLAGS], + [], +- [$OS_LDFLAGS $LIBUSB_LIBS] +-) ++ [$OS_LDFLAGS $LIBUSB_LIBS]) + + MD_CONF_DB2MAN + diff --git a/package/libhid/0003-uclinux.patch b/package/libhid/0003-uclinux.patch new file mode 100644 index 0000000000..cb3c45216a --- /dev/null +++ b/package/libhid/0003-uclinux.patch @@ -0,0 +1,27 @@ +Good old 'uclinux is also linux' + +Signed-off-by: Gustavo Zacarias + +diff -Nura libhid-0.2.16.orig/configure.ac libhid-0.2.16/configure.ac +--- libhid-0.2.16.orig/configure.ac 2014-06-22 09:35:50.277261742 -0300 ++++ libhid-0.2.16/configure.ac 2014-06-22 09:36:10.688951947 -0300 +@@ -80,6 +80,7 @@ + + MD_CONF_DEBUGGING + MD_CONF_COMPILER ++AM_CONDITIONAL(OS_LINUX, test "$MD_OS" = "uclinux") + AM_CONDITIONAL(OS_LINUX, test "$MD_OS" = "linux") + AM_CONDITIONAL(OS_BSD, test "$MD_OS" = "bsd") + AM_CONDITIONAL(OS_SOLARIS, test "$MD_OS" = "solaris") +diff -Nura libhid-0.2.16.orig/m4/md_check_os.m4 libhid-0.2.16/m4/md_check_os.m4 +--- libhid-0.2.16.orig/m4/md_check_os.m4 2014-06-22 09:35:50.275261675 -0300 ++++ libhid-0.2.16/m4/md_check_os.m4 2014-06-22 09:46:17.651475891 -0300 +@@ -3,7 +3,7 @@ + AC_CANONICAL_HOST + AC_MSG_CHECKING(for target OS) + case $host in +- *-linux*) ++ *-linux*|*-uclinux*) + AC_DEFINE(OS_LINUX, [], [define to 1 if building for Linux]) + AC_SUBST(OS_LINUX) + MD_OS=linux diff --git a/package/libhid/Config.in b/package/libhid/Config.in new file mode 100644 index 0000000000..e6f2012860 --- /dev/null +++ b/package/libhid/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBHID + bool "libhid" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + help + Userspace library for accessing USB HID devices + + http://libhid.alioth.debian.org + +comment "libhid needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libhid/libhid.mk b/package/libhid/libhid.mk new file mode 100644 index 0000000000..8b3cb2aff8 --- /dev/null +++ b/package/libhid/libhid.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libhid +# +################################################################################ + +LIBHID_VERSION = 0.2.16 +LIBHID_SITE = http://sources.buildroot.net +LIBHID_DEPENDENCIES = libusb-compat libusb +LIBHID_INSTALL_STAGING = YES +LIBHID_AUTORECONF = YES +LIBHID_LICENSE = GPLv2 +LIBHID_LICENSE_FILES = COPYING +# configure runs libusb-config for cflags/ldflags. Ensure it picks up +# the target version +LIBHID_CONF_ENV = PATH=$(STAGING_DIR)/usr/bin:$(BR_PATH) +LIBHID_CONF_OPTS = \ + --disable-swig \ + --disable-werror \ + --without-doxygen \ + --disable-package-config + +$(eval $(autotools-package)) diff --git a/package/libhttpparser/0001-Use-f-option-when-calling-ln-at-install-time.patch b/package/libhttpparser/0001-Use-f-option-when-calling-ln-at-install-time.patch new file mode 100644 index 0000000000..df166565f9 --- /dev/null +++ b/package/libhttpparser/0001-Use-f-option-when-calling-ln-at-install-time.patch @@ -0,0 +1,35 @@ +From 384917321c45e492b0ca7aaa94d4b15324aef95d Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Fri, 28 Aug 2015 19:02:11 +0200 +Subject: [PATCH] Use -f option when calling ln at install time + +This allows "make install; make install" to work properly. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Renaud AUBIN +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 33c8ba0..b36d95a 100644 +--- a/Makefile ++++ b/Makefile +@@ -125,12 +125,12 @@ tags: http_parser.c http_parser.h test.c + install: library + $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h + $(INSTALL) -D $(SONAME) $(LIBDIR)/$(SONAME) +- ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) ++ ln -sf $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) + + install-strip: library + $(INSTALL) -D http_parser.h $(INCLUDEDIR)/http_parser.h + $(INSTALL) -D -s $(SONAME) $(LIBDIR)/$(SONAME) +- ln -s $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) ++ ln -sf $(LIBDIR)/$(SONAME) $(LIBDIR)/libhttp_parser.$(SOEXT) + + uninstall: + rm $(INCLUDEDIR)/http_parser.h +-- +2.6.2 + diff --git a/package/libhttpparser/Config.in b/package/libhttpparser/Config.in new file mode 100644 index 0000000000..43563049e4 --- /dev/null +++ b/package/libhttpparser/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBHTTPPARSER + bool "libhttpparser" + depends on !BR2_STATIC_LIBS + help + This is a parser for HTTP messages written in C. It + parses both requests and responses. The parser is + designed to be used in performance HTTP applications. + It does not make any syscalls nor allocations, it does + not buffer data, it can be interrupted at anytime. + Depending on your architecture, it only requires about + 40 bytes of data per message stream (in a web server + that is per connection). + + https://github.com/nodejs/http-parser + +comment "libhttpparser needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/libhttpparser/libhttpparser.hash b/package/libhttpparser/libhttpparser.hash new file mode 100644 index 0000000000..e11006e8a5 --- /dev/null +++ b/package/libhttpparser/libhttpparser.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 a11c5ccb9808496f3de66d54ea1f89271919923307e31c75de2a3a77a6754c97 libhttpparser-v2.6.0.tar.gz diff --git a/package/libhttpparser/libhttpparser.mk b/package/libhttpparser/libhttpparser.mk new file mode 100644 index 0000000000..015efc0a1d --- /dev/null +++ b/package/libhttpparser/libhttpparser.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# libhttpparser +# +################################################################################ + +LIBHTTPPARSER_VERSION = v2.6.0 +LIBHTTPPARSER_SITE = $(call github,nodejs,http-parser,$(LIBHTTPPARSER_VERSION)) +LIBHTTPPARSER_INSTALL_STAGING = YES +LIBHTTPPARSER_LICENSE = MIT +LIBHTTPPARSER_LICENSE_FILES = LICENSE-MIT + +define LIBHTTPPARSER_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) library package +endef + +define LIBHTTPPARSER_INSTALL_STAGING_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) PREFIX=$(STAGING_DIR)/usr install + $(INSTALL) -D -m 0644 $(@D)/libhttp_parser.a $(STAGING_DIR)/usr/lib/libhttp_parser.a +endef + +define LIBHTTPPARSER_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) PREFIX=$(TARGET_DIR)/usr install +endef + +$(eval $(generic-package)) diff --git a/package/libical/0001-no-tests.patch b/package/libical/0001-no-tests.patch new file mode 100644 index 0000000000..324c04f643 --- /dev/null +++ b/package/libical/0001-no-tests.patch @@ -0,0 +1,19 @@ +Disable tests to avoid MMU dependency due to fork. + +Fixes +CMakeFiles/regression.dir/regression.c.o: In function `_test_file_locks': +/home/br/br4/output/build/libical-v1.0.1/src/test/regression.c:(.text+0x96d8): undefined reference to `_fork' + +Signed-off-by: Bernd Kuhls + +diff -uNr libical-1.0.1.org/src/CMakeLists.txt libical-1.0.1/src/CMakeLists.txt +--- libical-1.0.1.org/src/CMakeLists.txt 2014-10-09 17:07:05.000000000 +0200 ++++ libical-1.0.1/src/CMakeLists.txt 2015-04-25 17:41:22.657345548 +0200 +@@ -1,7 +1,6 @@ + add_subdirectory(libical) + add_subdirectory(libicalss) + add_subdirectory(libicalvcal) +-add_subdirectory(test) + + if(MSVC) + install(FILES diff --git a/package/libical/Config.in b/package/libical/Config.in new file mode 100644 index 0000000000..48170e9f87 --- /dev/null +++ b/package/libical/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBICAL + bool "libical" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR + help + libical is an Open Source (MPL/LGPL) implementation of the IETF's + iCalendar Calendaring and Scheduling protocols. + + http://libical.github.io/libical + +comment "libical needs a toolchain w/ C++, dynamic library, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + BR2_STATIC_LIBS diff --git a/package/libical/libical.hash b/package/libical/libical.hash new file mode 100644 index 0000000000..5c42cdcc61 --- /dev/null +++ b/package/libical/libical.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 089ce3c42d97fbd7a5d4b3c70adbdd82115dd306349c1f5c46a8fb3f8c949592 libical-1.0.1.tar.gz diff --git a/package/libical/libical.mk b/package/libical/libical.mk new file mode 100644 index 0000000000..e8cb3f8d79 --- /dev/null +++ b/package/libical/libical.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libical +# +################################################################################ + +LIBICAL_VERSION = 1.0.1 +LIBICAL_SITE = https://github.com/libical/libical/releases/download/v$(LIBICAL_VERSION) +LIBICAL_INSTALL_STAGING = YES +LIBICAL_LICENSE = MPLv1.0 or LGPLv2.1 +LIBICAL_LICENSE_FILES = LICENSE + +# building without this option is broken, it is used by +# Gentoo/alpinelinux as well +LIBICAL_CONF_OPTS = -DSHARED_ONLY=true + +$(eval $(cmake-package)) diff --git a/package/libiconv/Config.in b/package/libiconv/Config.in new file mode 100644 index 0000000000..ee4fd62011 --- /dev/null +++ b/package/libiconv/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBICONV + bool "libiconv" + depends on !BR2_ENABLE_LOCALE + help + unicode conversion library + + http://ftp.gnu.org/pub/gnu/libiconv diff --git a/package/libiconv/libiconv.hash b/package/libiconv/libiconv.hash new file mode 100644 index 0000000000..83de76f4d7 --- /dev/null +++ b/package/libiconv/libiconv.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 72b24ded17d687193c3366d0ebe7cde1e6b18f0df8c55438ac95be39e8a30613 libiconv-1.14.tar.gz diff --git a/package/libiconv/libiconv.mk b/package/libiconv/libiconv.mk new file mode 100644 index 0000000000..f014da0f13 --- /dev/null +++ b/package/libiconv/libiconv.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libiconv +# +################################################################################ + +LIBICONV_VERSION = 1.14 +LIBICONV_SITE = $(BR2_GNU_MIRROR)/libiconv +LIBICONV_INSTALL_STAGING = YES +LIBICONV_LICENSE = GPLv3+ (iconv program), LGPLv2+ (library) +LIBICONV_LICENSE_FILES = COPYING COPYING.LIB + +# Don't build the preloadable library, as we don't need it (it's only +# for LD_PRELOAD to replace glibc's iconv, but we never build libiconv +# when glibc is used). And it causes problems for static only builds. +define LIBICONV_DISABLE_PRELOAD + $(SED) '/preload/d' $(@D)/Makefile.in +endef +LIBICONV_PRE_CONFIGURE_HOOKS += LIBICONV_DISABLE_PRELOAD + +$(eval $(autotools-package)) + +# Configurations where the toolchain supports locales and the libiconv +# package is enabled are incorrect, because the toolchain already +# provides libiconv functionality, and having both confuses packages. +ifeq ($(BR2_PACKAGE_LIBICONV)$(BR2_ENABLE_LOCALE),yy) +$(error Libiconv should never be enabled when the toolchain supports locales. Report this failure to Buildroot developers) +endif diff --git a/package/libid3tag/Config.in b/package/libid3tag/Config.in new file mode 100644 index 0000000000..869b9f7f6c --- /dev/null +++ b/package/libid3tag/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBID3TAG + bool "libid3tag" + select BR2_PACKAGE_ZLIB + help + ID3 tag reading library from the MAD project. + + http://www.underbit.com/products/mad/ diff --git a/package/libid3tag/libid3tag.hash b/package/libid3tag/libid3tag.hash new file mode 100644 index 0000000000..fb02882db7 --- /dev/null +++ b/package/libid3tag/libid3tag.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 63da4f6e7997278f8a3fef4c6a372d342f705051d1eeb6a46a86b03610e26151 libid3tag-0.15.1b.tar.gz diff --git a/package/libid3tag/libid3tag.mk b/package/libid3tag/libid3tag.mk new file mode 100644 index 0000000000..2cd7820d1f --- /dev/null +++ b/package/libid3tag/libid3tag.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libid3tag +# +################################################################################ + +LIBID3TAG_VERSION = 0.15.1b +LIBID3TAG_SITE = http://downloads.sourceforge.net/project/mad/libid3tag/$(LIBID3TAG_VERSION) +LIBID3TAG_LICENSE = GPLv2+ +LIBID3TAG_LICENSE_FILES = COPYING COPYRIGHT +LIBID3TAG_INSTALL_STAGING = YES +LIBID3TAG_DEPENDENCIES = zlib +LIBID3TAG_LIBTOOL_PATCH = NO + +$(eval $(autotools-package)) diff --git a/package/libidn/Config.in b/package/libidn/Config.in new file mode 100644 index 0000000000..7b558c7175 --- /dev/null +++ b/package/libidn/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBIDN + bool "libidn" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + Libidn's purpose is to encode and decode internationalized + domain names. + + http://www.gnu.org/software/libidn/ + +if BR2_PACKAGE_LIBIDN + +config BR2_PACKAGE_LIBIDN_BINARY + bool "idn binary" + help + Install idn command line tool + +endif diff --git a/package/libidn/libidn.hash b/package/libidn/libidn.hash new file mode 100644 index 0000000000..20c844e121 --- /dev/null +++ b/package/libidn/libidn.hash @@ -0,0 +1,2 @@ +# From http://lists.nongnu.org/archive/html/help-libidn/2015-08/msg00001.html +sha1 ddd018611b98af7c67d434aa42d15d39f45129f5 libidn-1.32.tar.gz diff --git a/package/libidn/libidn.mk b/package/libidn/libidn.mk new file mode 100644 index 0000000000..ab43949355 --- /dev/null +++ b/package/libidn/libidn.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# libidn +# +################################################################################ + +LIBIDN_VERSION = 1.32 +LIBIDN_SITE = $(BR2_GNU_MIRROR)/libidn +LIBIDN_INSTALL_STAGING = YES +LIBIDN_CONF_ENV = EMACS="no" +LIBIDN_CONF_OPTS = --disable-java --enable-csharp=no +LIBIDN_DEPENDENCIES = host-pkgconf $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) $(if $(BR2_PACKAGE_LIBICONV),libiconv) +LIBIDN_LICENSE = GPLv2+, GPLv3+, LGPLv3+ +LIBIDN_LICENSE_FILES = COPYINGv2 COPYINGv3 COPYING.LESSERv3 + +define LIBIDN_REMOVE_BINARY + rm -f $(TARGET_DIR)/usr/bin/idn +endef + +ifneq ($(BR2_PACKAGE_LIBIDN_BINARY),y) +LIBIDN_POST_INSTALL_TARGET_HOOKS += LIBIDN_REMOVE_BINARY +endif + +define LIBIDN_REMOVE_EMACS_STUFF + rm -rf $(TARGET_DIR)/usr/share/emacs +endef + +LIBIDN_POST_INSTALL_TARGET_HOOKS += LIBIDN_REMOVE_EMACS_STUFF + +$(eval $(autotools-package)) diff --git a/package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch b/package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch new file mode 100644 index 0000000000..9f441698f8 --- /dev/null +++ b/package/libiio/0001-cmake-libxml2-detection-try-first-the-CMake-module-f.patch @@ -0,0 +1,42 @@ +From 4f849e1d2287206cfb7ff0fdeca96c22383b0d53 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Mon, 29 Dec 2014 19:05:13 +0100 +Subject: [PATCH] cmake: libxml2 detection: try first the CMake module from + libxml2 + +Libxml2 >=2.9.2 provides its own CMake module, so check for it before +falling back on the CMake's module FindLibXml2.cmake. + +Signed-off-by: Samuel Martin +--- + CMakeLists.txt | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 393fee3..b4f1d26 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,7 +38,19 @@ endif() + find_library(AVAHI_CLIENT_LIBRARIES avahi-client) + find_library(AVAHI_COMMON_LIBRARIES avahi-common) + find_library(PTHREAD_LIBRARIES pthread) +-include(FindLibXml2) ++ ++# Since libxml2-2.9.2, libxml2 provides its own LibXml2-config.cmake, with all ++# variables correctly set. ++# So, try first to find the CMake module provided by libxml2 package, then fallback ++# on the CMake's FindLibXml2.cmake module (which can lack some definition, especially ++# in static build case). ++find_package(LibXml2 QUIET NO_MODULE) ++if(DEFINED LIBXML2_VERSION_STRING) ++ set(LIBXML2_FOUND ON) ++ set(LIBXML2_INCLUDE_DIR ${LIBXML2_INCLUDE_DIRS}) ++else() ++ include(FindLibXml2) ++endif() + + set(LIBIIO_CFILES channel.c device.c context.c buffer.c utilities.c) + set(LIBIIO_HEADERS iio.h) +-- +2.2.1 + diff --git a/package/libiio/0002-cmake-fix-build-on-unix-systems-without-cpp.patch b/package/libiio/0002-cmake-fix-build-on-unix-systems-without-cpp.patch new file mode 100644 index 0000000000..4839a394cc --- /dev/null +++ b/package/libiio/0002-cmake-fix-build-on-unix-systems-without-cpp.patch @@ -0,0 +1,36 @@ +From 2e6fa357ffbe755bfecaecad4fc82e3307fe2831 Mon Sep 17 00:00:00 2001 +From: Paul Cercueil +Date: Wed, 22 Jul 2015 10:25:01 +0200 +Subject: [PATCH] CMake: Fix build on UNIX systems without a C++ compiler + +Signed-off-by: Paul Cercueil +--- + bindings/csharp/CMakeLists.txt | 2 +- + bindings/python/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/bindings/csharp/CMakeLists.txt b/bindings/csharp/CMakeLists.txt +index 8aafb8f..fceab88 100644 +--- a/bindings/csharp/CMakeLists.txt ++++ b/bindings/csharp/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 2.8.7) +-project(libiio-sharp) ++project(libiio-sharp LANGUAGES NONE) + + find_program(MCS_EXECUTABLE + NAMES mcs csc +diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt +index 22ffdb4..76ceae8 100644 +--- a/bindings/python/CMakeLists.txt ++++ b/bindings/python/CMakeLists.txt +@@ -1,5 +1,5 @@ + cmake_minimum_required(VERSION 2.8.7) +-project(libiio-py) ++project(libiio-py LANGUAGES NONE) + + include(FindPythonInterp) + +-- +2.1.4 + diff --git a/package/libiio/Config.in b/package/libiio/Config.in new file mode 100644 index 0000000000..99da4c1c10 --- /dev/null +++ b/package/libiio/Config.in @@ -0,0 +1,59 @@ +config BR2_PACKAGE_LIBIIO + bool "libiio" + select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND if !BR2_PACKAGE_LIBIIO_NETWORK_BACKEND + help + Libiio is a library to ease the development of software + interfacing Linux Industrial I/O (IIO) devices. + + http://wiki.analog.com/resources/tools-software/linux-software/libiio + +if BR2_PACKAGE_LIBIIO + +config BR2_PACKAGE_LIBIIO_LOCAL_BACKEND + bool "Local backend" + default y + help + Enable the local backend of the library. + +config BR2_PACKAGE_LIBIIO_NETWORK_BACKEND + bool "Network backend" + select BR2_PACKAGE_LIBXML2 + default y + help + Enable the network backend of the library. + +config BR2_PACKAGE_LIBIIO_IIOD + bool "IIO Daemon" + select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND + depends on BR2_TOOLCHAIN_HAS_THREADS + default y + help + Install the IIO Daemon. + +comment "IIO Daemon needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_LIBIIO_TESTS + bool "Install test programs" + select BR2_PACKAGE_LIBIIO_LOCAL_BACKEND + select BR2_PACKAGE_LIBIIO_NETWORK_BACKEND + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Install the test programs (iio_info, iio_genxml, iio_readdev). + +comment "IIO test programs need a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_LIBIIO_BINDINGS_CSHARP + bool "Install C# bindings" + depends on BR2_PACKAGE_MONO + help + Install the C# bindings. + +config BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON + bool "Install Python bindings" + depends on BR2_PACKAGE_PYTHON + help + Install the Python bindings. + +endif diff --git a/package/libiio/S99iiod b/package/libiio/S99iiod new file mode 100644 index 0000000000..df2f763461 --- /dev/null +++ b/package/libiio/S99iiod @@ -0,0 +1,30 @@ +#!/bin/sh + +# Server-side demuxing by default +IIOD_OPTS=-D + +[ -r /etc/default/iiod ] && . /etc/default/iiod + +case "$1" in + start) + echo "Starting IIO Server Daemon" + start-stop-daemon -S -b -q -m -p /var/run/iiod.pid -x /usr/sbin/iiod -- $IIOD_OPTS + exit $? + ;; + + stop) + echo "Stopping IIO Server Daemon" + start-stop-daemon -K -q -p /var/run/iiod.pid 2>/dev/null + exit $? + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/libiio/libiio.hash b/package/libiio/libiio.hash new file mode 100644 index 0000000000..28b9c63e62 --- /dev/null +++ b/package/libiio/libiio.hash @@ -0,0 +1,2 @@ +# From https://github.com/analogdevicesinc/libiio/archive/v0.5/ +sha256 c41cdcfeae8717e72f1100b4dac9d7cc9d86f4e0731da3354149cb7e051666f3 libiio-0.5.tar.gz diff --git a/package/libiio/libiio.mk b/package/libiio/libiio.mk new file mode 100644 index 0000000000..0e92b738a8 --- /dev/null +++ b/package/libiio/libiio.mk @@ -0,0 +1,76 @@ +################################################################################ +# +# libiio +# +################################################################################ + +LIBIIO_VERSION = 0.5 +LIBIIO_SITE = $(call github,analogdevicesinc,libiio,v$(LIBIIO_VERSION)) +LIBIIO_INSTALL_STAGING = YES +LIBIIO_LICENSE = LGPLv2.1+ +LIBIIO_LICENSE_FILES = COPYING + +LIBIIO_CONF_OPTS = -DENABLE_IPV6=ON \ + -DWITH_LOCAL_BACKEND=$(if $(BR2_PACKAGE_LIBIIO_LOCAL_BACKEND),ON,OFF) \ + -DWITH_TESTS=$(if $(BR2_PACKAGE_LIBIIO_TESTS),ON,OFF) \ + -DWITH_DOC=OFF + +ifeq ($(BR2_PACKAGE_LIBIIO_NETWORK_BACKEND),y) +LIBIIO_DEPENDENCIES += libxml2 +LIBIIO_CONF_OPTS += -DWITH_NETWORK_BACKEND=ON +else +LIBIIO_CONF_OPTS += -DWITH_NETWORK_BACKEND=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y) +LIBIIO_DEPENDENCIES += host-flex host-bison +LIBIIO_CONF_OPTS += -DWITH_IIOD=ON +else +LIBIIO_CONF_OPTS += -DWITH_IIOD=OFF +endif + +# Avahi support in libiio requires avahi-client, which needs avahi-daemon +ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON),yy) +LIBIIO_DEPENDENCIES += avahi +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y) +LIBIIO_DEPENDENCIES += python +LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=ON +else +LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_CSHARP),y) +define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET + rm $(TARGET_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll.mdb + $(HOST_DIR)/usr/bin/gacutil -root $(TARGET_DIR)/usr/lib -i \ + $(TARGET_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll +endef +define LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING + $(HOST_DIR)/usr/bin/gacutil -root $(STAGING_DIR)/usr/lib -i \ + $(STAGING_DIR)/usr/lib/cli/libiio-sharp-$(LIBIIO_VERSION)/libiio-sharp.dll +endef +LIBIIO_POST_INSTALL_TARGET_HOOKS += LIBIIO_INSTALL_CSHARP_BINDINGS_TO_TARGET +LIBIIO_POST_INSTALL_STAGING_HOOKS += LIBIIO_INSTALL_CSHARP_BINDINGS_TO_STAGING +LIBIIO_DEPENDENCIES += mono +LIBIIO_CONF_OPTS += -DCSHARP_BINDINGS=ON +else +LIBIIO_CONF_OPTS += -DCSHARP_BINDINGS=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBIIO_IIOD),y) +define LIBIIO_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/libiio/S99iiod \ + $(TARGET_DIR)/etc/init.d/S99iiod +endef +define LIBIIO_INSTALL_INIT_SYSTEMD + $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + $(INSTALL) -D -m 0644 $(@D)/debian/iiod.service \ + $(TARGET_DIR)/usr/lib/systemd/system/iiod.service + ln -fs ../../../../usr/lib/systemd/system/iiod.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/iiod.service +endef +endif + +$(eval $(cmake-package)) diff --git a/package/libilbc/Config.in b/package/libilbc/Config.in new file mode 100644 index 0000000000..89d5db2fd6 --- /dev/null +++ b/package/libilbc/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBILBC + bool "libilbc" + help + iLBC (internet Low Bitrate Codec) is a FREE speech codec + suitable for robust voice communication over IP. + + http://www.webrtc.org/license-rights/ilbc-freeware diff --git a/package/libilbc/libilbc.mk b/package/libilbc/libilbc.mk new file mode 100644 index 0000000000..06d94eb36d --- /dev/null +++ b/package/libilbc/libilbc.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libilbc +# +################################################################################ + +LIBILBC_VERSION = 829b08c7902ceb87a261279fabb36b6d523c6e07 +LIBILBC_SITE = https://freeswitch.org/stash/scm/sd/libilbc.git +LIBILBC_SITE_METHOD = git +LIBILBC_LICENSE = Global IP Sound iLBC Public License v2.0 +LIBILBC_LICENSE_FILES = gips_iLBClicense.pdf +LIBILBC_AUTORECONF = YES +LIBILBC_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libimxvpuapi/Config.in b/package/libimxvpuapi/Config.in new file mode 100644 index 0000000000..8b8b839ce8 --- /dev/null +++ b/package/libimxvpuapi/Config.in @@ -0,0 +1,16 @@ +comment "libimxvpuapi needs an i.MX platform with VPU support" + depends on BR2_arm + depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_VPU + +config BR2_PACKAGE_LIBIMXVPUAPI + bool "libimxvpuapi" + depends on BR2_arm # Only relevant for i.MX + depends on BR2_PACKAGE_FREESCALE_IMX_HAS_VPU + select BR2_PACKAGE_IMX_VPU + help + This library provides an API for using the iMX6 VPU video + engine. It is an alternative to Freescale's VPU + wrapper. Both the wrapper and this library are layered on + top of imx-vpu, the low-level iMX6 VPU interface. + + https://github.com/Freescale/libimxvpuapi diff --git a/package/libimxvpuapi/libimxvpuapi.hash b/package/libimxvpuapi/libimxvpuapi.hash new file mode 100644 index 0000000000..fd90a20564 --- /dev/null +++ b/package/libimxvpuapi/libimxvpuapi.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 8d7aeed88c06fda44318cef9565ae47b86461bd309908b1103a7974ed0822a8d libimxvpuapi-0.10.1.tar.gz diff --git a/package/libimxvpuapi/libimxvpuapi.mk b/package/libimxvpuapi/libimxvpuapi.mk new file mode 100644 index 0000000000..e0d8cc981f --- /dev/null +++ b/package/libimxvpuapi/libimxvpuapi.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# libimxvpuapi +# +################################################################################ + +LIBIMXVPUAPI_VERSION = 0.10.1 +LIBIMXVPUAPI_SITE = $(call github,Freescale,libimxvpuapi,$(LIBIMXVPUAPI_VERSION)) +LIBIMXVPUAPI_LICENSE = LGPLv2.1+ +LIBIMXVPUAPI_LICENSE_FILES = LICENSE +LIBIMXVPUAPI_DEPENDENCIES = host-pkgconf host-python imx-vpu +LIBIMXVPUAPI_INSTALL_STAGING = YES + +define LIBIMXVPUAPI_CONFIGURE_CMDS + cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/usr/bin/python2 ./waf configure \ + --prefix=/usr --libdir=/usr/lib +endef + +define LIBIMXVPUAPI_BUILD_CMDS + cd $(@D); \ + $(HOST_DIR)/usr/bin/python2 ./waf build -j $(PARALLEL_JOBS) +endef + +define LIBIMXVPUAPI_INSTALL_STAGING_CMDS + cd $(@D); \ + $(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(STAGING_DIR) install +endef + +define LIBIMXVPUAPI_INSTALL_TARGET_CMDS + cd $(@D); \ + $(HOST_DIR)/usr/bin/python2 ./waf --destdir=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/libinput/0001-rename-log_msg-to-libinput_log_msg.patch b/package/libinput/0001-rename-log_msg-to-libinput_log_msg.patch new file mode 100644 index 0000000000..e36862a12d --- /dev/null +++ b/package/libinput/0001-rename-log_msg-to-libinput_log_msg.patch @@ -0,0 +1,77 @@ +From bf4a4a4e2b0479322fe16c9e1f15f146daa893ee Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Thu, 21 Aug 2014 18:18:16 +0200 +Subject: [PATCH] rename log_msg to libinput_log_msg + +This fixes a conflict between libevdev and libinput on the definition +of the log_msg() symbol. + +http://autobuild.buildroot.net/results/c13/c133b7c706ee31302125df8ca94f4d0f0152c6c6/build-end.log + +Signed-off-by: Romain Naour +[yann.morin.1998@free.fr: rebase on-top of 0.6.0] +Signed-off-by: "Yann E. MORIN" +[ps.report@gmx.net: rebase on top of 0.7.0] +Signed-off-by: Peter Seiderer +--- + src/libinput-private.h | 14 +++++++------- + src/libinput.c | 2 +- + 2 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/src/libinput-private.h b/src/libinput-private.h +index b36dc95..98f91b3 100644 +--- a/src/libinput-private.h ++++ b/src/libinput-private.h +@@ -259,12 +259,12 @@ + + typedef void (*libinput_source_dispatch_t)(void *data); + +-#define log_debug(li_, ...) log_msg((li_), LIBINPUT_LOG_PRIORITY_DEBUG, __VA_ARGS__) +-#define log_info(li_, ...) log_msg((li_), LIBINPUT_LOG_PRIORITY_INFO, __VA_ARGS__) +-#define log_error(li_, ...) log_msg((li_), LIBINPUT_LOG_PRIORITY_ERROR, __VA_ARGS__) +-#define log_bug_kernel(li_, ...) log_msg((li_), LIBINPUT_LOG_PRIORITY_ERROR, "kernel bug: " __VA_ARGS__) +-#define log_bug_libinput(li_, ...) log_msg((li_), LIBINPUT_LOG_PRIORITY_ERROR, "libinput bug: " __VA_ARGS__) +-#define log_bug_client(li_, ...) log_msg((li_), LIBINPUT_LOG_PRIORITY_ERROR, "client bug: " __VA_ARGS__) ++#define log_debug(li_, ...) libinput_log_msg((li_), LIBINPUT_LOG_PRIORITY_DEBUG, __VA_ARGS__) ++#define log_info(li_, ...) libinput_log_msg((li_), LIBINPUT_LOG_PRIORITY_INFO, __VA_ARGS__) ++#define log_error(li_, ...) libinput_log_msg((li_), LIBINPUT_LOG_PRIORITY_ERROR, __VA_ARGS__) ++#define log_bug_kernel(li_, ...) libinput_log_msg((li_), LIBINPUT_LOG_PRIORITY_ERROR, "kernel bug: " __VA_ARGS__) ++#define log_bug_libinput(li_, ...) libinput_log_msg((li_), LIBINPUT_LOG_PRIORITY_ERROR, "libinput bug: " __VA_ARGS__) ++#define log_bug_client(li_, ...) libinput_log_msg((li_), LIBINPUT_LOG_PRIORITY_ERROR, "client bug: " __VA_ARGS__) + + #define log_debug_ratelimit(li_, r_, ...) log_msg_ratelimit((li_), (r_), LIBINPUT_LOG_PRIORITY_DEBUG, __VA_ARGS__) + #define log_info_ratelimit(li_, r_, ...) log_msg_ratelimit((li_), (r_), LIBINPUT_LOG_PRIORITY_INFO, __VA_ARGS__) +@@ -281,7 +281,7 @@ + LIBINPUT_ATTRIBUTE_PRINTF(4, 5); + + void +-log_msg(struct libinput *libinput, ++libinput_log_msg(struct libinput *libinput, + enum libinput_log_priority priority, + const char *format, ...) + LIBINPUT_ATTRIBUTE_PRINTF(3, 4); +diff --git a/src/libinput.c b/src/libinput.c +index 279cce0..5748e5e 100644 +--- a/src/libinput.c ++++ b/src/libinput.c +@@ -155,7 +155,7 @@ + } + + void +-log_msg(struct libinput *libinput, ++libinput_log_msg(struct libinput *libinput, + enum libinput_log_priority priority, + const char *format, ...) + { +@@ -184,7 +184,7 @@ + va_end(args); + + if (state == RATELIMIT_THRESHOLD) +- log_msg(libinput, ++ libinput_log_msg(libinput, + priority, + "WARNING: log rate limit exceeded (%d msgs per %dms). Discarding future messages.\n", + ratelimit->burst, +-- +2.1.2 + diff --git a/package/libinput/0002-Add-configure.ac-check-for-static_assert.patch b/package/libinput/0002-Add-configure.ac-check-for-static_assert.patch new file mode 100644 index 0000000000..4df47b9a2b --- /dev/null +++ b/package/libinput/0002-Add-configure.ac-check-for-static_assert.patch @@ -0,0 +1,34 @@ +From 0df21f54942dc82ddde4095824e7b65efb96d261 Mon Sep 17 00:00:00 2001 +From: Peter Hutterer +Date: Mon, 16 May 2016 13:32:07 +1000 +Subject: [PATCH] Add configure.ac check for static_assert + +Part of C11, defined via assert.h. + +Signed-off-by: Peter Hutterer +Signed-off-by: Baruch Siach +--- +Patch status: suggested upstream +(https://lists.freedesktop.org/archives/wayland-devel/2016-May/028881.html) + + configure.ac | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 602a86026544..28a5197cfa2e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -55,6 +55,10 @@ AC_CHECK_DECL(TFD_CLOEXEC,[], + AC_CHECK_DECL(CLOCK_MONOTONIC,[], + [AC_MSG_ERROR("CLOCK_MONOTONIC is needed to compile libinput")], + [[#include ]]) ++AC_CHECK_DECL(static_assert, [], ++ [AC_DEFINE(static_assert(...), [/* */], [noop static_assert() replacement]), ++ AC_MSG_RESULT([no])], ++ [[#include ]]) + + PKG_PROG_PKG_CONFIG() + PKG_CHECK_MODULES(MTDEV, [mtdev >= 1.1.0]) +-- +2.8.1 + diff --git a/package/libinput/Config.in b/package/libinput/Config.in new file mode 100644 index 0000000000..f7793df84f --- /dev/null +++ b/package/libinput/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBINPUT + bool "libinput" + depends on BR2_ENABLE_LOCALE + depends on BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_LIBEVDEV + select BR2_PACKAGE_MTDEV + help + libinput is a library to handle input devices in Wayland + compositors and to provide a generic X.Org input driver. + It provides device detection, device handling, input device + event processing and abstraction so minimize the amount of + custom input code compositors need to provide the common + set of functionality that users expect. + + http://freedesktop.org/wiki/Software/libinput/ + +comment "libinput needs udev /dev management and a toolchain w/ locale" + depends on !BR2_PACKAGE_HAS_UDEV || !BR2_ENABLE_LOCALE diff --git a/package/libinput/libinput.hash b/package/libinput/libinput.hash new file mode 100644 index 0000000000..43fcf5ddec --- /dev/null +++ b/package/libinput/libinput.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/wayland-devel/2016-April/028215.html +sha256 aee3650ad2a864ab9a10e7e63df543cc2b475f6bf3974751037a2df325dabbb1 libinput-1.2.4.tar.xz diff --git a/package/libinput/libinput.mk b/package/libinput/libinput.mk new file mode 100644 index 0000000000..bd8fe2cbcc --- /dev/null +++ b/package/libinput/libinput.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# libinput +# +################################################################################ + +LIBINPUT_VERSION = 1.2.4 +LIBINPUT_SOURCE = libinput-$(LIBINPUT_VERSION).tar.xz +LIBINPUT_SITE = http://www.freedesktop.org/software/libinput +LIBINPUT_DEPENDENCIES = host-pkgconf libevdev mtdev udev +LIBINPUT_INSTALL_STAGING = YES +LIBINPUT_LICENSE = MIT +LIBINPUT_LICENSE_FILES = COPYING +# Tests need fork, so just disable them everywhere. +LIBINPUT_CONF_OPTS = --disable-tests --disable-libwacom +# Patching configure.ac +LIBINPUT_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_LIBGTK3),y) +LIBINPUT_CONF_OPTS += --enable-event-gui +LIBINPUT_DEPENDENCIES += libgtk3 +else +LIBINPUT_CONF_OPTS += --disable-event-gui +endif + +$(eval $(autotools-package)) diff --git a/package/libiqrf/0001-cmake-handle-static-library-and-find-required-thread.patch b/package/libiqrf/0001-cmake-handle-static-library-and-find-required-thread.patch new file mode 100644 index 0000000000..cfd7d54523 --- /dev/null +++ b/package/libiqrf/0001-cmake-handle-static-library-and-find-required-thread.patch @@ -0,0 +1,45 @@ +From 46660112b76664473cc98b8ae6c863fd27c27d2d Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Fri, 29 Aug 2014 23:40:59 +0200 +Subject: [PATCH 1/1] cmake: handle static library and find required thread + module + +Signed-off-by: Samuel Martin +--- + CMakeLists.txt | 2 ++ + src/CMakeLists.txt | 4 +++- + 2 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 79f644c..7779a2a 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -6,7 +6,9 @@ enable_testing() + # use local module (for Findlibusb-1.0.cmake) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") + ++find_package(Threads REQUIRED) + find_package(libusb-1.0 REQUIRED) ++ + if (NOT LIBUSB_1_FOUND) + message(FATAL_ERROR "libusb-1.0 not installed. (try apt-get install libusb-1.0-0-dev)") + endif (NOT LIBUSB_1_FOUND) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 149d198..0597ccd 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -18,8 +18,10 @@ set (iqrf_sources + + include_directories ("${LIBUSB_1_INCLUDE_DIRS}") + +-add_library(iqrf SHARED ${iqrf_sources} ${iqrf_headers}) ++add_library(iqrf ${iqrf_sources} ${iqrf_headers}) ++ + target_link_libraries(iqrf ${LIBUSB_1_LIBRARIES}) ++target_link_libraries(iqrf ${CMAKE_THREAD_LIBS_INIT}) + + set_target_properties(iqrf PROPERTIES + VERSION "${iqrf_version_major}.${iqrf_version_minor}" +-- +2.1.0 + diff --git a/package/libiqrf/0002-use-only-c-language.patch b/package/libiqrf/0002-use-only-c-language.patch new file mode 100644 index 0000000000..2f1c23c28b --- /dev/null +++ b/package/libiqrf/0002-use-only-c-language.patch @@ -0,0 +1,29 @@ +Use only the C language + +libirqf is written completely in C, but by default, CMake assumes that +both C and C++ are used, and therefore verifies that a C++ compiler is +installed. This may not necessarily be the case for a C-only package +in Buildroot. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/CMakeLists.txt +=================================================================== +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -1,5 +1,3 @@ +-project(iqrf) +- + set (iqrf_version_major 0) + set (iqrf_version_minor 1) + set (iqrf_version_patch 2) +Index: b/CMakeLists.txt +=================================================================== +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,3 +1,5 @@ ++project(iqrf C) ++ + cmake_minimum_required(VERSION 2.8.1) + enable_testing() + diff --git a/package/libiqrf/Config.in b/package/libiqrf/Config.in new file mode 100644 index 0000000000..03555e063a --- /dev/null +++ b/package/libiqrf/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBIQRF + bool "libiqrf" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + help + This library implement specific protocol + which is used for communicating with iqrf devices + (http://iqrf.org) over usb. For usb access is used + libusb library. + + https://github.com/nandra/libiqrf + +comment "libiqrf needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libiqrf/libiqrf.mk b/package/libiqrf/libiqrf.mk new file mode 100644 index 0000000000..05316029dd --- /dev/null +++ b/package/libiqrf/libiqrf.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libiqrf +# +################################################################################ + +LIBIQRF_VERSION = v0.1.2 +LIBIQRF_SITE = $(call github,nandra,libiqrf,$(LIBIQRF_VERSION)) +LIBIQRF_INSTALL_STAGING = YES +LIBIQRF_DEPENDENCIES = libusb +LIBIQRF_LICENSE = LGPLv2.1+ + +$(eval $(cmake-package)) diff --git a/package/libiscsi/Config.in b/package/libiscsi/Config.in new file mode 100644 index 0000000000..88933f3942 --- /dev/null +++ b/package/libiscsi/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBISCSI + bool "libiscsi" + help + Libiscsi is a client-side library to implement the iSCSI protocol + that can be used to access resource of an iSCSI Target. + + The library is fully async with regards to iscsi commands and scsi + tasks, but a sync layer is also provided for ease of use for simpler + applications. + + https://github.com/sahlberg/libiscsi (no proper homepage) diff --git a/package/libiscsi/libiscsi.hash b/package/libiscsi/libiscsi.hash new file mode 100644 index 0000000000..8ccc264784 --- /dev/null +++ b/package/libiscsi/libiscsi.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 26aa5583053d4fe0d4686f76a76c216c7dce00130f008e652ece305b88758ff1 libiscsi-1.15.0.tar.gz diff --git a/package/libiscsi/libiscsi.mk b/package/libiscsi/libiscsi.mk new file mode 100644 index 0000000000..71c10c1014 --- /dev/null +++ b/package/libiscsi/libiscsi.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libiscsi +# +################################################################################ + +LIBISCSI_VERSION = 1.15.0 +LIBISCSI_SITE = https://sites.google.com/site/libiscsitarballs/libiscsitarballs +LIBISCSI_LICENSE = GPLv2+, LGPLv2.1+ +LIBISCSI_LICENSE_FILES = COPYING LICENCE-GPL-2.txt LICENCE-LGPL-2.1.txt +LIBISCSI_INSTALL_STAGING = YES + +# Force libiscsi to use gcc as the linker, otherwise it uses directly +# ld, which doesn't work for certain architectures. +LIBISCSI_CONF_ENV = LD="$(TARGET_CC)" + +$(eval $(autotools-package)) diff --git a/package/libjpeg/libjpeg.hash b/package/libjpeg/libjpeg.hash new file mode 100644 index 0000000000..2ad7dda6cf --- /dev/null +++ b/package/libjpeg/libjpeg.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 240fd398da741669bf3c90366f58452ea59041cacc741a489b99f2f6a0bad052 jpegsrc.v9b.tar.gz diff --git a/package/libjpeg/libjpeg.mk b/package/libjpeg/libjpeg.mk new file mode 100644 index 0000000000..14aba61fd4 --- /dev/null +++ b/package/libjpeg/libjpeg.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libjpeg +# +################################################################################ + +LIBJPEG_VERSION = 9b +LIBJPEG_SITE = http://www.ijg.org/files +LIBJPEG_SOURCE = jpegsrc.v$(LIBJPEG_VERSION).tar.gz +LIBJPEG_LICENSE = jpeg-license (BSD-3c-like) +LIBJPEG_LICENSE_FILES = README +LIBJPEG_INSTALL_STAGING = YES + +define LIBJPEG_REMOVE_USELESS_TOOLS + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,cjpeg djpeg jpegtran rdjpgcom wrjpgcom) +endef + +LIBJPEG_POST_INSTALL_TARGET_HOOKS += LIBJPEG_REMOVE_USELESS_TOOLS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libjson/0001-fix-broken-makefile.patch b/package/libjson/0001-fix-broken-makefile.patch new file mode 100644 index 0000000000..8ceb0cac3a --- /dev/null +++ b/package/libjson/0001-fix-broken-makefile.patch @@ -0,0 +1,16 @@ +Fix the broken libjson makefile. + +Signed-off-by: Simon Dawson + +diff -Nurp a/makefile b/makefile +--- a/makefile 2012-05-30 10:15:42.000000000 +0100 ++++ b/makefile 2013-03-27 18:45:34.814670534 +0000 +@@ -170,7 +170,7 @@ include_path = $(prefix)/$(includedi + # Usage check + ifdef CXXFLAGS + ifdef BUILD_TYPE +- $(error CXXFLAGS and BUILD_TYPE are mutually exclusive) ++$(error CXXFLAGS and BUILD_TYPE are mutually exclusive) + endif + endif + diff --git a/package/libjson/Config.in b/package/libjson/Config.in new file mode 100644 index 0000000000..50a99311d2 --- /dev/null +++ b/package/libjson/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBJSON + bool "libjson" + depends on BR2_INSTALL_LIBSTDCPP + help + A JSON reader and writer which is super-efficient and usually + runs circles around other JSON libraries. + + http://sourceforge.net/projects/libjson/ + +comment "libjson needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libjson/libjson.hash b/package/libjson/libjson.hash new file mode 100644 index 0000000000..f3447ee73d --- /dev/null +++ b/package/libjson/libjson.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 07267a3951038ee2e02d26cc41bf8e275668c38f751240d3e78dc979182e7376 libjson_7.6.1.zip diff --git a/package/libjson/libjson.mk b/package/libjson/libjson.mk new file mode 100644 index 0000000000..c73a69f10e --- /dev/null +++ b/package/libjson/libjson.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# libjson +# +################################################################################ + +LIBJSON_VERSION = 7.6.1 +LIBJSON_SITE = http://downloads.sourceforge.net/project/libjson +LIBJSON_SOURCE = libjson_$(LIBJSON_VERSION).zip +LIBJSON_INSTALL_STAGING = YES +LIBJSON_LICENSE = BSD-2c +LIBJSON_LICENSE_FILES = License.txt + +LIBJSON_CXXFLAGS = $(TARGET_CFLAGS) -DNDEBUG + +ifeq ($(BR2_STATIC_LIBS),y) +LIBJSON_MAKE_OPTS += SHARED=0 +else +LIBJSON_MAKE_OPTS += SHARED=1 +LIBJSON_CXXFLAGS += -fPIC +endif + +LIBJSON_MAKE_OPTS += BUILD_TYPE= CXXFLAGS="$(LIBJSON_CXXFLAGS)" + +define LIBJSON_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(DL_DIR)/$(LIBJSON_SOURCE) + mv $(@D)/libjson/* $(@D) + $(RM) -r $(@D)/libjson + $(SED) '/ldconfig/d' $(@D)/makefile +endef + +define LIBJSON_BUILD_CMDS + mkdir -p $(@D)/Objects_$(if $(BR2_STATIC_LIBS),static,shared) \ + $(@D)/_internal/Source/Dependencies + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(LIBJSON_MAKE_OPTS) -C $(@D) +endef + +define LIBJSON_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(LIBJSON_MAKE_OPTS) prefix=$(TARGET_DIR)/usr install -C $(@D) +endef + +define LIBJSON_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(LIBJSON_MAKE_OPTS) prefix=$(STAGING_DIR)/usr install -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/libksba/Config.in b/package/libksba/Config.in new file mode 100644 index 0000000000..780fed9b6a --- /dev/null +++ b/package/libksba/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBKSBA + bool "libksba" + select BR2_PACKAGE_LIBGPG_ERROR + help + CMS and X.509 library + + https://www.gnupg.org/related_software/libksba/ diff --git a/package/libksba/libksba.hash b/package/libksba/libksba.hash new file mode 100644 index 0000000000..92abbab6ea --- /dev/null +++ b/package/libksba/libksba.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 f6c2883cebec5608692d8730843d87f237c0964d923bbe7aa89c05f20558ad4f libksba-1.3.4.tar.bz2 diff --git a/package/libksba/libksba.mk b/package/libksba/libksba.mk new file mode 100644 index 0000000000..40a8c9b5a4 --- /dev/null +++ b/package/libksba/libksba.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libksba +# +################################################################################ + +LIBKSBA_VERSION = 1.3.4 +LIBKSBA_SOURCE = libksba-$(LIBKSBA_VERSION).tar.bz2 +LIBKSBA_SITE = ftp://ftp.gnupg.org/gcrypt/libksba +LIBKSBA_LICENSE = LGPLv3+ or GPLv2+ (library, headers), GPLv3+ (manual, tests, build system) +LIBKSBA_LICENSE_FILES = AUTHORS COPYING COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv3 +LIBKSBA_INSTALL_STAGING = YES +LIBKSBA_DEPENDENCIES = libgpg-error +LIBKSBA_CONF_OPTS = --with-gpg-error-prefix=$(STAGING_DIR)/usr + +$(eval $(autotools-package)) diff --git a/package/libldns/0001-bugfix-548-Double-free-for-answers-4096.patch b/package/libldns/0001-bugfix-548-Double-free-for-answers-4096.patch new file mode 100644 index 0000000000..4097cfedd9 --- /dev/null +++ b/package/libldns/0001-bugfix-548-Double-free-for-answers-4096.patch @@ -0,0 +1,28 @@ +From 128aeb54593d4dd8ff2403eb2dd7d6cd596717d2 Mon Sep 17 00:00:00 2001 +From: Willem Toorop +Date: Tue, 28 Jan 2014 11:06:38 +0100 +Subject: [PATCH] bugfix #548: Double free for answers > 4096 + +in ldns_resolver_send_pkt. Thank you sunthought@gmail.com + +[Backport from upstream commit 2853eb352b4461e98f2926ace4ea3810cedf4167] +Signed-off-by: Bernd Kuhls +--- + resolver.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/resolver.c b/resolver.c +index 16efc90..1474dc8 100644 +--- a/resolver.c ++++ b/resolver.c +@@ -1117,6 +1117,7 @@ ldns_resolver_send_pkt(ldns_pkt **answer, ldns_resolver *r, + ldns_pkt_set_edns_udp_size(query_pkt + , 4096); + ldns_pkt_free(answer_pkt); ++ answer_pkt = NULL; + /* Nameservers should not become + * unreachable because fragments are + * dropped (network error). We might +-- +2.6.4 + diff --git a/package/libldns/0002-whitespace-bug-in-ldns-read-zone.patch b/package/libldns/0002-whitespace-bug-in-ldns-read-zone.patch new file mode 100644 index 0000000000..ec87b18e09 --- /dev/null +++ b/package/libldns/0002-whitespace-bug-in-ldns-read-zone.patch @@ -0,0 +1,47 @@ +From 055ea6aef77058f651b5571d98d2d9458821a977 Mon Sep 17 00:00:00 2001 +From: Matthijs Mekking +Date: Wed, 18 Jun 2014 09:55:17 +0200 +Subject: [PATCH] whitespace bug in ldns-read-zone + +[Backport from upstream commit d6037a22fbedb8ef3a22de4107e4eaa36840865b] +Signed-off-by: Bernd Kuhls +--- + rr.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/rr.c b/rr.c +index cfee170..e530702 100644 +--- a/rr.c ++++ b/rr.c +@@ -670,6 +670,18 @@ ldns_rr_new_question_frm_str(ldns_rr **newrr, const char *str, + true); + } + ++static int ++ldns_rr_is_whitespace_line(char* line, int line_len) ++{ ++ int i; ++ for (i = 0; i < line_len; i++) { ++ if (!isspace((int)line[i])) { ++ return 0; ++ } ++ } ++ return 1; ++} ++ + ldns_status + ldns_rr_new_frm_fp(ldns_rr **newrr, FILE *fp, uint32_t *ttl, ldns_rdf **origin, ldns_rdf **prev) + { +@@ -745,6 +757,9 @@ ldns_rr_new_frm_fp_l(ldns_rr **newrr, FILE *fp, uint32_t *default_ttl, ldns_rdf + s = LDNS_STATUS_SYNTAX_TTL; + } else if (strncmp(line, "$INCLUDE", 8) == 0) { + s = LDNS_STATUS_SYNTAX_INCLUDE; ++ } else if (ldns_rr_is_whitespace_line(line, size)) { ++ LDNS_FREE(line); ++ return LDNS_STATUS_SYNTAX_EMPTY; + } else { + if (origin && *origin) { + s = ldns_rr_new_frm_str(&rr, (const char*) line, ttl, *origin, prev); +-- +2.6.4 + diff --git a/package/libldns/0003-let-doxyparse-output-manpage-generation-issues.patch b/package/libldns/0003-let-doxyparse-output-manpage-generation-issues.patch new file mode 100644 index 0000000000..223ebe98b3 --- /dev/null +++ b/package/libldns/0003-let-doxyparse-output-manpage-generation-issues.patch @@ -0,0 +1,116 @@ +From d8a3da12be085fbc92e3d4d4d084c328fc37485a Mon Sep 17 00:00:00 2001 +From: Willem Toorop +Date: Thu, 27 Nov 2014 16:21:54 +0100 +Subject: [PATCH] let doxyparse output manpage generation issues + +[Backport from upstream commit +168ee09a4bf184947798c3ee3ac99b6651470d64, fixes the build with Perl +5.22.] +Signed-off-by: Bernd Kuhls +--- + doc/doxyparse.pl | 45 ++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 38 insertions(+), 7 deletions(-) + +diff --git a/doc/doxyparse.pl b/doc/doxyparse.pl +index 96a1732..a09b2e8 100755 +--- a/doc/doxyparse.pl ++++ b/doc/doxyparse.pl +@@ -57,10 +57,15 @@ This manpage was automaticly generated from the ldns source code by + use of Doxygen and some perl. + "; + +-getopts("m:",\%options); ++getopts("em:",\%options); + # if -m manpage file is given process that file + # parse the file which tells us what manpages go together + my $functions, $see_also; ++my $i = -1; ++my $report_errors = defined $options{'e'}; ++my $errors = 0; ++my %unique; ++ + if (defined $options{'m'}) { + # process + open(MAN, "<$options{'m'}") or die "Cannot open $options{'m'}"; +@@ -68,18 +73,35 @@ if (defined $options{'m'}) { + # func1, func2, .. | see_also1, see_also2, ... + while() { + chomp; ++ $i += 1; + if (/^#/) { next; } + if (/^$/) { next; } +- ($functions, $see_also) = split /[\t ]*\|[\t ]*/, $_; +- #print "{$functions}\n"; +- #print "{$see_also}\n"; ++ my @parts = split /[\t ]*\|[\t ]*/, $_; ++ $functions = shift @parts; ++ $see_also = join ', ', @parts; ++ print "{$functions}\n"; ++ print "{$see_also}\n"; + my @funcs = split /[\t ]*,[\t ]*/, $functions; + my @also = split /[\t ]*,[\t ]*/, $see_also; + $manpages{$funcs[0]} = \@funcs; + $see_also{$funcs[0]} = \@also; ++ foreach (@funcs) { ++ if ($unique{$_}) { ++ push $unique{$_}, ($i,); ++ } else { ++ $unique{$_} = [$i]; ++ } ++ } + #print "[", $funcs[0], "]\n"; + } + close(MAN); ++ while (($func, $lines) = each %unique ) { ++ if (scalar @$lines > 1) { ++ print STDERR "$func in function_manpages on lines: " ++ . join(", ",@$lines) . "\n" if $report_errors; ++ $errors += 1; ++ } ++ } + } else { + print "Need -m file to process the .h files\n"; + exit 1; +@@ -95,7 +117,7 @@ mkdir "doc/man"; + mkdir "doc/man/man$MAN_SECTION"; + + $state = 0; +-my $i; ++$i = 0; + my @lines = ; + my $max = @lines; + +@@ -273,7 +295,7 @@ foreach (keys %manpages) { + + print MAN $MAN_MIDDLE; + +- if (defined(@$also)) { ++ if (@$also) { + print MAN "\n.SH SEE ALSO\n\\fI"; + print MAN join "\\fR, \\fI", @$also; + print MAN "\\fR.\nAnd "; +@@ -290,7 +312,7 @@ foreach (keys %manpages) { + # create symlinks + chdir("$BASE/man$MAN_SECTION"); + foreach (@$name) { +- print STDERR $_,"\n"; ++ print STDOUT $_,"\n"; + my $new_file = $_ . "." . $MAN_SECTION; + if ($new_file eq $symlink_file) { + next; +@@ -301,3 +323,12 @@ foreach (keys %manpages) { + chdir("../../.."); # and back, tricky and fragile... + close(MAN); + } ++foreach (keys %api) { ++ next if (/ / || /^$/); ++ if (not $unique{$_}) { ++ print STDERR "no man page for $_\n" if $report_errors; ++ $errors += 1; ++ } ++} ++ ++exit ($report_errors and $errors != 0); +-- +2.6.4 + diff --git a/package/libldns/0004-Comment-out-debugging-remnants.patch b/package/libldns/0004-Comment-out-debugging-remnants.patch new file mode 100644 index 0000000000..659253876b --- /dev/null +++ b/package/libldns/0004-Comment-out-debugging-remnants.patch @@ -0,0 +1,31 @@ +From 9720f6f7fdae210aa6d87d97324abd32e103dd16 Mon Sep 17 00:00:00 2001 +From: Willem Toorop +Date: Thu, 27 Nov 2014 16:50:33 +0100 +Subject: [PATCH] Comment out debugging remnants + +[Backport from upstream commit +a0a943d504debb05ce4d62ea81c2d218a6cc8727, needed for a following patch +fixing the build with Perl 5.10.] +Signed-off-by: Bernd Kuhls +--- + doc/doxyparse.pl | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/doc/doxyparse.pl b/doc/doxyparse.pl +index a09b2e8..3f7897f 100755 +--- a/doc/doxyparse.pl ++++ b/doc/doxyparse.pl +@@ -79,8 +79,8 @@ if (defined $options{'m'}) { + my @parts = split /[\t ]*\|[\t ]*/, $_; + $functions = shift @parts; + $see_also = join ', ', @parts; +- print "{$functions}\n"; +- print "{$see_also}\n"; ++ #print "{$functions}\n"; ++ #print "{$see_also}\n"; + my @funcs = split /[\t ]*,[\t ]*/, $functions; + my @also = split /[\t ]*,[\t ]*/, $see_also; + $manpages{$funcs[0]} = \@funcs; +-- +2.6.4 + diff --git a/package/libldns/0005-Remove-manpage-content-nondeterminicity-warnings.patch b/package/libldns/0005-Remove-manpage-content-nondeterminicity-warnings.patch new file mode 100644 index 0000000000..c282634082 --- /dev/null +++ b/package/libldns/0005-Remove-manpage-content-nondeterminicity-warnings.patch @@ -0,0 +1,429 @@ +From adcef14bb9257ab38238eacabaa48cb7e8ef471f Mon Sep 17 00:00:00 2001 +From: Willem Toorop +Date: Wed, 14 Jan 2015 10:14:32 +0100 +Subject: [PATCH] Remove manpage content nondeterminicity & warnings + +TODO: Missing manpages + +[Backport upstream commit a56e48856d519d12f1ef600848f335615467f147, +which fixes the build with Perl 5.10.] +Signed-off-by: Bernd Kuhls +--- + doc/doxyparse.pl | 20 +++-- + doc/function_manpages | 244 ++++++++++++++++++++++++-------------------------- + 2 files changed, 133 insertions(+), 131 deletions(-) + +diff --git a/doc/doxyparse.pl b/doc/doxyparse.pl +index 3f7897f..b9f015d 100755 +--- a/doc/doxyparse.pl ++++ b/doc/doxyparse.pl +@@ -35,7 +35,7 @@ my %see_also; + + my $BASE="doc/man"; + my $MAN_SECTION = "3"; +-my $MAN_HEADER = ".TH ldns $MAN_SECTION \"30 May 2006\"\n"; ++my $MAN_HEADER = ".ad l\n.TH ldns $MAN_SECTION \"30 May 2006\"\n"; + my $MAN_MIDDLE = ".SH AUTHOR + The ldns team at NLnet Labs. Which consists out of + Jelte Jansen and Miek Gieben. +@@ -60,8 +60,8 @@ use of Doxygen and some perl. + getopts("em:",\%options); + # if -m manpage file is given process that file + # parse the file which tells us what manpages go together +-my $functions, $see_also; +-my $i = -1; ++my $functions, $see_also, $shorts; ++my $i = 0; + my $report_errors = defined $options{'e'}; + my $errors = 0; + my %unique; +@@ -78,16 +78,22 @@ if (defined $options{'m'}) { + if (/^$/) { next; } + my @parts = split /[\t ]*\|[\t ]*/, $_; + $functions = shift @parts; +- $see_also = join ', ', @parts; ++ @parts = split /[\t ]*-[\t ]*/, join ', ', @parts; ++ $see_also = shift @parts; ++ if (! $see_also) { ++ @parts = split /[\t ]*-[\t ]*/, $_; ++ $functions = shift @parts; ++ } + #print "{$functions}\n"; + #print "{$see_also}\n"; + my @funcs = split /[\t ]*,[\t ]*/, $functions; + my @also = split /[\t ]*,[\t ]*/, $see_also; + $manpages{$funcs[0]} = \@funcs; + $see_also{$funcs[0]} = \@also; ++ $shorts{$funcs[0]} = join '', @parts; + foreach (@funcs) { + if ($unique{$_}) { +- push $unique{$_}, ($i,); ++ push @{$unique{$_}}, ($i,); + } else { + $unique{$_} = [$i]; + } +@@ -249,6 +255,7 @@ while($i < $max) { + foreach (keys %manpages) { + $name = $manpages{$_}; + $also = $see_also{$_}; ++ my $shrt = $shorts{$_}; + + $filename = @$name[0]; + $filename = "$BASE/man$MAN_SECTION/$filename.$MAN_SECTION"; +@@ -261,6 +268,9 @@ foreach (keys %manpages) { + print MAN $MAN_HEADER; + print MAN ".SH NAME\n"; + print MAN join ", ", @$name; ++ if ($shrt) { ++ print MAN " \\- $shrt"; ++ } + print MAN "\n\n"; + print MAN ".SH SYNOPSIS\n"; + +diff --git a/doc/function_manpages b/doc/function_manpages +index ce05899..db53ee5 100644 +--- a/doc/function_manpages ++++ b/doc/function_manpages +@@ -8,221 +8,213 @@ + + ### host2wire.h + # conversion functions +-ldns_rr2wire, ldns_pkt2wire, ldns_rdf2wire | ldns_wire2rr, ldns_wire2pkt, ldns_wire2rdf ++ldns_rr2wire, ldns_pkt2wire, ldns_rdf2wire | ldns_wire2rr, ldns_wire2pkt, ldns_wire2rdf - conversion functions + # lower level conversions, some are from host2str.h +-ldns_pkt2buffer_str, ldns_pktheader2buffer_str, ldns_rr2buffer_str, ldns_rr_list2buffer_str, ldns_rdf2buffer_str, ldns_key2buffer_str, ldns_pkt2buffer_wire, ldns_rr2buffer_wire, ldns_rdf2buffer_wire, ldns_rrsig2buffer_wire, ldns_rr_rdata2buffer_wire | ldns_pkt2str, ldns_rr2str, ldns_rdf2str, ldns_rr_list2str, ldns_key2str ++ldns_pkt2buffer_str, ldns_pktheader2buffer_str, ldns_rr2buffer_str, ldns_rr_list2buffer_str, ldns_rdf2buffer_str, ldns_key2buffer_str, ldns_pkt2buffer_wire, ldns_rr2buffer_wire, ldns_rdf2buffer_wire, ldns_rrsig2buffer_wire, ldns_rr_rdata2buffer_wire | ldns_pkt2str, ldns_rr2str, ldns_rdf2str, ldns_rr_list2str, ldns_key2str - lower level conversions + ### /host2wire.h + + ### host2str.h +-ldns_rr2str, ldns_pkt2str, ldns_rdf2str, ldns_rr_list2str, ldns_key2str | ldns_rr_print, ldns_rdf_print, ldns_pkt_print, ldns_rr_list_print, ldns_resolver_print, ldns_zone_print +-ldns_rr_print, ldns_rdf_print, ldns_pkt_print, ldns_rr_list_print, ldns_resolver_print, ldns_zone_print | ldns_rr2str, ldns_rdf2str, ldns_pkt2str, ldns_rr_list2str, ldns_key2str ++ldns_rr2str, ldns_pkt2str, ldns_rdf2str, ldns_rr_list2str, ldns_key2str | ldns_rr_print, ldns_rdf_print, ldns_pkt_print, ldns_rr_list_print, ldns_resolver_print, ldns_zone_print - functions for conversions to string + ### /host2str.h + + ### host2str.h + # and even lower +-ldns_rdf2buffer_str_a, ldns_rdf2buffer_str_aaaa, ldns_rdf2buffer_str_str, ldns_rdf2buffer_str_b64, ldns_rdf2buffer_str_hex, ldns_rdf2buffer_str_type, ldns_rdf2buffer_str_class, ldns_rdf2buffer_str_alg, ldns_rdf2buffer_str_loc, ldns_rdf2buffer_str_unknown, ldns_rdf2buffer_str_nsap, ldns_rdf2buffer_str_wks, ldns_rdf2buffer_str_nsec, ldns_rdf2buffer_str_period, ldns_rdf2buffer_str_tsigtime, ldns_rdf2buffer_str_apl, ldns_rdf2buffer_str_int16_data, ldns_rdf2buffer_str_int16, ldns_rdf2buffer_str_ipseckey ++ldns_rdf2buffer_str_a, ldns_rdf2buffer_str_aaaa, ldns_rdf2buffer_str_str, ldns_rdf2buffer_str_b64, ldns_rdf2buffer_str_hex, ldns_rdf2buffer_str_type, ldns_rdf2buffer_str_class, ldns_rdf2buffer_str_alg, ldns_rdf2buffer_str_loc, ldns_rdf2buffer_str_unknown, ldns_rdf2buffer_str_nsap, ldns_rdf2buffer_str_wks, ldns_rdf2buffer_str_nsec, ldns_rdf2buffer_str_period, ldns_rdf2buffer_str_tsigtime, ldns_rdf2buffer_str_apl, ldns_rdf2buffer_str_int16_data, ldns_rdf2buffer_str_int16, ldns_rdf2buffer_str_ipseckey - lower level to string conversion functions + ### /host2str.h + + ### wire2host.h + # wirefunctions +-ldns_wire2rr, ldns_wire2pkt, ldns_wire2rdf, ldns_wire2dname | ldns_rr2wire, ldns_pkt2wire, ldns_rdf2wire, ldns_dname2wire +-ldns_buffer2pkt_wire ++ldns_wire2rr, ldns_wire2pkt, ldns_wire2rdf, ldns_wire2dname | ldns_rr2wire, ldns_pkt2wire, ldns_rdf2wire, ldns_dname2wire - convert from wire format to host type ++ldns_buffer2pkt_wire - convert buffer/wire format to ldns_pkt + ### /wire2host.h + + ### dname.h +-ldns_dname_left_chop, ldns_dname_label_count | ldns_dname +-ldns_dname2canonical | ldns_dname +-ldns_dname_cat_clone, ldns_dname_cat | ldns_dname +-ldns_dname_new, ldns_dname_new_frm_str, ldns_dname_new_frm_data | ldns_dname, ldns_pkt_query_new_frm_str, ldns_rdf_new_frm_str, ldns_rr_new_frm_str +-ldns_dname_is_subdomain, ldns_dname_str_absolute, ldns_dname_label | ldns_dname +-ldns_dname_compare, ldns_dname_interval | ldns_dname_is_subdomain | ldns_dname +-ldns_dname | ldns_dname_left_chop, ldns_dname_label_count, ldns_dname2canonical, ldns_dname_cat, ldns_dname_cat_clone, ldns_dname_new, ldns_dname_new_frm_str, ldns_dname_new_frm_data, ldns_dname_is_subdomain, ldns_dname_str_absolute, ldns_dname_label, ldns_dname_compare, ldns_dname_interval ++ldns_dname_left_chop, ldns_dname_label_count - dname label functions ++ldns_dname2canonical - canonicalize dname ++ldns_dname_cat_clone, ldns_dname_cat - concatenate two dnames ++ldns_dname_new, ldns_dname_new_frm_str, ldns_dname_new_frm_data | ldns_pkt_query_new_frm_str, ldns_rdf_new_frm_str, ldns_rr_new_frm_str - create a dname ++ldns_dname_is_subdomain, ldns_dname_str_absolute, ldns_dname_label - check properties of dnames ++ldns_dname_compare, ldns_dname_interval | ldns_dname_is_subdomain - compare two dnames + ### /dname.h + + ### dane.h +-ldns_dane_create_tlsa_owner, ldns_dane_cert2rdf, ldns_dane_select_certificate, ldns_dane_create_tlsa_rr | ldns_dane_verify, ldns_dane_verify_rr +-ldns_dane_verify, ldns_dane_verify_rr | ldns_dane_create_tlsa_owner, ldns_dane_cert2rdf, ldns_dane_select_certificate, ldns_dane_create_tlsa_rr ++ldns_dane_create_tlsa_rr, ldns_dane_create_tlsa_owner, ldns_dane_cert2rdf, ldns_dane_select_certificate | ldns_dane_verify, ldns_dane_verify_rr - TLSA RR creation functions ++ldns_dane_verify, ldns_dane_verify_rr | ldns_dane_create_tlsa_owner, ldns_dane_cert2rdf, ldns_dane_select_certificate, ldns_dane_create_tlsa_rr - TLSA RR verification functions + ### /dane.h + + ### rdata.h +-ldns_rdf, ldns_rdf_type | ldns_rdf_set_size, ldns_rdf_set_type, ldns_rdf_set_data, ldns_rdf_size, ldns_rdf_get_type, ldns_rdf_data, ldns_rdf_compare, ldns_rdf_new, ldns_rdf_clone, ldns_rdf_new_frm_data, ldns_rdf_new_frm_str, ldns_rdf_new_frm_fp, ldns_rdf_free, ldns_rdf_deep_free, ldns_rdf_print, ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32, ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage, ldns_rdf2native_time_t, ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32, ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage, ldns_rdf2native_time_t, ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32, ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage, ldns_rdf2native_time_t +-ldns_rdf_set_size, ldns_rdf_set_type, ldns_rdf_set_data | ldns_rdf +-ldns_rdf_size, ldns_rdf_get_type, ldns_rdf_data, ldns_rdf_compare | ldns_rdf +-ldns_rdf_new, ldns_rdf_clone, ldns_rdf_new_frm_data, ldns_rdf_new_frm_str, ldns_rdf_new_frm_fp, ldns_rdf_free, ldns_rdf_deep_free, ldns_rdf_print | ldns_rdf +-ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32, ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage, ldns_rdf2native_time_t | ldns_rdf +-ldns_rdf_address_reverse | ldns_rdf +-ldns_octet | ldns_rdf ++ldns_rdf, ldns_rdf_type | ldns_rdf_set_size, ldns_rdf_set_type, ldns_rdf_set_data, ldns_rdf_size, ldns_rdf_get_type, ldns_rdf_data, ldns_rdf_compare, ldns_rdf_new, ldns_rdf_clone, ldns_rdf_new_frm_data, ldns_rdf_new_frm_str, ldns_rdf_new_frm_fp, ldns_rdf_free, ldns_rdf_deep_free, ldns_rdf_print, ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32, ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage, ldns_rdf2native_time_t, ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32, ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage, ldns_rdf2native_time_t, ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32, ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage, ldns_rdf2native_time_t - rdata field type ++ldns_rdf_set_size, ldns_rdf_set_type, ldns_rdf_set_data | ldns_rdf - set rdf attributes ++ldns_rdf_size, ldns_rdf_get_type, ldns_rdf_data, ldns_rdf_compare | ldns_rdf - get rdf attributes ++ldns_rdf_new, ldns_rdf_clone, ldns_rdf_new_frm_data, ldns_rdf_new_frm_str, ldns_rdf_new_frm_fp, ldns_rdf_free, ldns_rdf_deep_free, ldns_rdf_print | ldns_rdf - ldns_rdf creation, destruction and printing ++ldns_native2rdf_int8, ldns_native2rdf_int16, ldns_native2rdf_int32, ldns_native2rdf_int16_data, ldns_rdf2native_int8, ldns_rdf2native_int16, ldns_rdf2native_int32, ldns_rdf2native_sockaddr_storage, ldns_rdf2native_time_t | ldns_rdf - rdf numeric converion functions ++ldns_rdf_address_reverse | ldns_rdf - reverse an address rdf ++ldns_octet | ldns_rdf - removes escaped from the input + # why is this in rdata.h? +-ldns_str2period ++ldns_str2period - converts a ttl value (like 5d2h) to a long + ### /rdata.h + + ### higher.h +-ldns_get_rr_list_addr_by_name, ldns_get_rr_list_name_by_addr | ldns_rr_list, ldns_rr +-ldns_get_rr_list_hosts_frm_fp, ldns_get_rr_list_hosts_frm_file | ldns_rr_list, ldns_rr, ldns_get_rr_list_hosts_frm_fp_l +-ldns_get_rr_list_hosts_frm_fp_l | ldns_rr_list +-ldns_getaddrinfo ++ldns_get_rr_list_addr_by_name, ldns_get_rr_list_name_by_addr | ldns_rr_list, ldns_rr - get addresses by name or names by address ++ldns_get_rr_list_hosts_frm_file, ldns_get_rr_list_hosts_frm_fp, ldns_get_rr_list_hosts_frm_fp_l | ldns_rr_list, ldns_rr - parse /etc/hosts file ++ldns_getaddrinfo - mimic libc getaddrinfo + ### /higher.h + + # + ### dnssec.h + # +-ldns_calc_keytag, ldns_verify, ldns_verify_rrsig, ldns_verify_rrsig_dsa, ldns_verify_rrsig_rsasha1, ldns_verify_rrsig_rsamd5, ldns_key_rr2ds, ldns_key_buf2dsa, ldns_key_buf2rsa | ldns_key, ldns_sign_public, ldns_zone_sign, ldns_verify, ldns_verify_rrsig +- + # algs +-ldns_verify_rrsig_dsa, ldns_verify_rrsig_rsasha1, ldns_verify_rrsig_rsamd5 | ldns_key, ldns_sign_public, ldns_zone_sign, ldns_verify, ldns_verify_rrsig ++ldns_verify_rrsig_dsa, ldns_verify_rrsig_rsasha1, ldns_verify_rrsig_rsamd5 | ldns_key, ldns_sign_public, ldns_zone_sign, ldns_verify, ldns_verify_rrsig - verify signature data buffers + + # tsig +-ldns_pkt_tsig_verify, ldns_pkt_tsig_sign | ldns_key ++ldns_pkt_tsig_verify, ldns_pkt_tsig_sign | ldns_key - tsig signing and verification + + # verify +-ldns_verify, ldns_verify_rrsig, ldns_verify_rrsig_keylist, ldns_verify_rrsig_keylist_notime, ldns_verify_notime | ldns_verify_rrsig_evp | ldns_verify_rrsig_dsa, ldns_verify_rrsig_rsasha1, ldns_verify_rrsig_rsamd5, ldns_sign_public, ldns_zone_sign, ldns_key ++ldns_verify, ldns_verify_rrsig, ldns_verify_rrsig_keylist, ldns_verify_rrsig_keylist_notime, ldns_verify_notime | ldns_verify_rrsig_evp | ldns_verify_rrsig_dsa, ldns_verify_rrsig_rsasha1, ldns_verify_rrsig_rsamd5, ldns_sign_public, ldns_zone_sign, ldns_key - verify rrsigs + + # convert +-ldns_key_buf2dsa, ldns_key_buf2rsa | ldns_key_rr2ds +-ldns_key_rr2ds | ldns_key +-ldns_create_nsec | ldns_sign_public ++ldns_key_buf2dsa, ldns_key_buf2rsa | ldns_key_rr2ds - convert buffer to openssl key ++ldns_key_rr2ds | ldns_key - create DS rr from DNSKEY rr ++ldns_create_nsec | ldns_sign_public - Create a NSEC record + + # signing +-ldns_sign_public | ldns_sign_public_dsa, ldns_sign_public_rsamd5, ldns_sign_public_rsasha1, ldns_verify, ldns_verify_rrsig, ldns_key +-ldns_sign_public_dsa, ldns_sign_public_rsamd5, ldns_sign_public_rsasha1 | ldns_sign_public +-ldns_dnssec_zone_sign, ldns_dnssec_zone_sign_nsec3 | ldns_zone_sign, ldns_zone_sign_nsec3 | ldns_sign_public, ldns_key, ldns_init_random +-ldns_init_random | ldns_sign_public, ldns_key +-ldns_pkt_verify | ldns_verify, ldns_sign_public, ldns_zone_sign ++ldns_sign_public | ldns_sign_public_dsa, ldns_sign_public_rsamd5, ldns_sign_public_rsasha1, ldns_verify, ldns_verify_rrsig, ldns_key - sign an rrset ++ldns_sign_public_dsa, ldns_sign_public_rsamd5, ldns_sign_public_rsasha1 | ldns_sign_public - sign buffer ++ldns_init_random | ldns_sign_public, ldns_key - seed the random function ++ldns_pkt_verify | ldns_verify, ldns_sign_public, ldns_zone_sign - verify a packet ++ldns_zone_sign, ldns_zone_sign_nsec3 - dnssec sign a zone + + # new family of dnssec functions +-ldns_dnssec_zone, ldns_dnssec_name, ldns_dnssec_rrs, ldns_dnssec_rrsets | ldns_dnssec_zone_new, ldns_dnssec_name_new, ldns_dnssec_rrs_new, ldns_dnssec_rrsets_new +-ldns_dnssec_zone_find_rrset, ldns_dnssec_zone_new, ldns_dnssec_zone_free, ldns_dnssec_zone_add_rr, ldns_dnssec_zone_names_print, ldns_dnssec_zone_print, ldns_dnssec_zone_add_empty_nonterminals | ldns_dnssec_zone +-ldns_dnssec_name_new, ldns_dnssec_name_new_frm_rr, ldns_dnssec_name_free, ldns_dnssec_name_name, ldns_dnssec_name_set_name, ldns_dnssec_name_set_nsec, ldns_dnssec_name_cmp, ldns_dnssec_name_add_rr, ldns_dnssec_name_find_rrset, ldns_dnssec_name_print | ldns_dnssec_zone +-ldns_dnssec_rrsets_new, ldns_dnssec_rrsets_free, ldns_dnssec_rrsets_type, ldns_dnssec_rrsets_set_type, ldns_dnssec_rrsets_add_rr, ldns_dnssec_rrsets_print | ldns_dnssec_zone +-ldns_dnssec_rrs_new, ldns_dnssec_rrs_free, ldns_dnssec_rrs_add_rr, ldns_dnssec_rrs_print | ldns_dnssec_zone ++ldns_dnssec_zone, ldns_dnssec_name, ldns_dnssec_rrs, ldns_dnssec_rrsets | ldns_dnssec_zone_new, ldns_dnssec_name_new, ldns_dnssec_rrs_new, ldns_dnssec_rrsets_new - data structures ++ldns_dnssec_zone_find_rrset, ldns_dnssec_zone_new, ldns_dnssec_zone_free, ldns_dnssec_zone_add_rr, ldns_dnssec_zone_names_print, ldns_dnssec_zone_print, ldns_dnssec_zone_add_empty_nonterminals | ldns_dnssec_zone - functions for ldns_dnssec_zone ++ldns_dnssec_name_new, ldns_dnssec_name_new_frm_rr, ldns_dnssec_name_free, ldns_dnssec_name_name, ldns_dnssec_name_set_name, ldns_dnssec_name_set_nsec, ldns_dnssec_name_cmp, ldns_dnssec_name_add_rr, ldns_dnssec_name_find_rrset, ldns_dnssec_name_print | ldns_dnssec_zone - functions for ldns_dnssec_name ++ldns_dnssec_rrsets_new, ldns_dnssec_rrsets_free, ldns_dnssec_rrsets_type, ldns_dnssec_rrsets_set_type, ldns_dnssec_rrsets_add_rr, ldns_dnssec_rrsets_print | ldns_dnssec_zone - functions for ldns_dnssec_rrsets ++ldns_dnssec_rrs_new, ldns_dnssec_rrs_free, ldns_dnssec_rrs_add_rr, ldns_dnssec_rrs_print | ldns_dnssec_zone - functions for ldns_dnssec-rrs + + # verification +-ldns_dnssec_data_chain, ldns_dnssec_data_chain_struct, ldns_dnssec_trust_tree | ldns_dnssec_data_chain_new, ldns_dnssec_trust_tree_new, ldns_dnssec_verify_denial +-ldns_dnssec_data_chain_new, ldns_dnssec_data_chain_free, ldns_dnssec_data_chain_deep_free, ldns_dnssec_build_data_chain, ldns_dnssec_data_chain_print | ldns_dnssec_data_chain +-ldns_dnssec_trust_tree_new, ldns_dnssec_trust_tree_free, ldns_dnssec_trust_tree_depth, ldns_dnssec_derive_trust_tree, ldns_dnssec_trust_tree_contains_keys, ldns_dnssec_trust_tree_print, ldns_dnssec_trust_tree_print_sm, ldns_dnssec_trust_tree_add_parent, ldns_dnssec_derive_trust_tree_normal_rrset, ldns_dnssec_derive_trust_tree_dnskey_rrset, ldns_dnssec_derive_trust_tree_ds_rrset, ldns_dnssec_derive_trust_tree_no_sig | ldns_dnssec_data_chain, ldns_dnssec_trust_tree +-ldns_dnssec_verify_denial, ldns_dnssec_verify_denial_nsec3 | ldns_dnssec_trust_tree, ldns_dnssec_data_chain ++ldns_dnssec_data_chain, ldns_dnssec_data_chain_struct, ldns_dnssec_trust_tree | ldns_dnssec_data_chain_new, ldns_dnssec_trust_tree_new, ldns_dnssec_verify_denial - data structures for validation chains ++ldns_dnssec_data_chain_new, ldns_dnssec_data_chain_free, ldns_dnssec_data_chain_deep_free, ldns_dnssec_build_data_chain, ldns_dnssec_data_chain_print | ldns_dnssec_data_chain - ldns_chain creation, destruction and printing ++ldns_dnssec_trust_tree_new, ldns_dnssec_trust_tree_free, ldns_dnssec_trust_tree_depth, ldns_dnssec_derive_trust_tree, ldns_dnssec_trust_tree_contains_keys, ldns_dnssec_trust_tree_print, ldns_dnssec_trust_tree_print_sm, ldns_dnssec_trust_tree_add_parent, ldns_dnssec_derive_trust_tree_normal_rrset, ldns_dnssec_derive_trust_tree_dnskey_rrset, ldns_dnssec_derive_trust_tree_ds_rrset, ldns_dnssec_derive_trust_tree_no_sig | ldns_dnssec_data_chain, ldns_dnssec_trust_tree - functions for ldns_dnssec_trust_tree ++ldns_dnssec_verify_denial, ldns_dnssec_verify_denial_nsec3 | ldns_dnssec_trust_tree, ldns_dnssec_data_chain - verify denial of existence + + # new signing functions +-ldns_dnssec_zone_sign, ldns_dnssec_zone_sign_nsec3, ldns_dnssec_zone_mark_glue, ldns_dnssec_name_node_next_nonglue, ldns_dnssec_zone_create_nsecs, ldns_dnssec_remove_signatures, ldns_dnssec_zone_create_rrsigs | ldns_dnssec_zone ++ldns_dnssec_zone_sign, ldns_dnssec_zone_sign_nsec3, ldns_dnssec_zone_mark_glue, ldns_dnssec_name_node_next_nonglue, ldns_dnssec_zone_create_nsecs, ldns_dnssec_remove_signatures, ldns_dnssec_zone_create_rrsigs | ldns_dnssec_zone - sign ldns_dnssec_zone + + ### /dnssec.h + + ### dnskey.h +-ldns_key_new | ldns_key, ldns_key_list_new +-ldns_key_new_frm_algorithm, ldns_key_new_frm_fp, ldns_key_new_frm_fp_l | ldns_key +-ldns_key_new_frm_fp_rsa, ldns_key_new_frm_fp_rsa_l | ldns_key_new_frm_fp, ldns_key +-ldns_key_new_frm_fp_dsa, ldns_key_new_frm_fp_dsa_l | ldns_key_new_frm_fp, ldns_key +-ldns_key_list_new | ldns_key_new, ldns_key ++ldns_key_new, ldns_key_new_frm_algorithm, ldns_key_new_frm_fp, ldns_key_new_frm_fp_l, ldns_key_new_frm_fp_rsa, ldns_key_new_frm_fp_rsa_l, ldns_key_new_frm_fp_dsa, ldns_key_new_frm_fp_dsa_l | ldns_key - create a ldns_key ++ldns_key_list_new - create a ldns_key_list + # access, write +-ldns_key_set_algorithm, ldns_key_set_rsa_key, ldns_key_set_dsa_key, ldns_key_set_hmac_key, ldns_key_set_origttl, ldns_key_set_inception, ldns_key_set_expiration, ldns_key_set_pubkey_owner, ldns_key_set_keytag, ldns_key_set_flags, ldns_key_list_set_key_count, ldns_key_algo_supported | ldns_key_push_key, ldns_key +-ldns_key_list_push_key | ldns_key_list_pop_key, ldns_key +-ldns_key_list_pop_key | ldns_key_list_push_key, ldns_key ++ldns_key_set_algorithm, ldns_key_set_rsa_key, ldns_key_set_dsa_key, ldns_key_set_hmac_key, ldns_key_set_origttl, ldns_key_set_inception, ldns_key_set_expiration, ldns_key_set_pubkey_owner, ldns_key_set_keytag, ldns_key_set_flags, ldns_key_list_set_key_count, ldns_key_algo_supported | ldns_key_push_key, ldns_key - set ldns_key attributes ++ldns_key_list_push_key, ldns_key_list_pop_key | ldns_key - manipulate ldns_key_list + # access, read +-ldns_key_list_key_count, ldns_key_list_key, ldns_key_rsa_key, ldns_key_dsa_key, ldns_key_algorithm, ldns_key_hmac_key, ldns_key_origttl, ldns_key_inception, ldns_key_expiration, ldns_key_keytag, ldns_key_pubkey_owner, ldns_key_flags | ldns_key ++ldns_key_list_key_count, ldns_key_list_key, ldns_key_rsa_key, ldns_key_dsa_key, ldns_key_algorithm, ldns_key_hmac_key, ldns_key_origttl, ldns_key_inception, ldns_key_expiration, ldns_key_keytag, ldns_key_pubkey_owner, ldns_key_flags | ldns_key - read ldns_keys + # convert +-ldns_key2rr | ldns_key +-ldns_key_free, ldns_key_deep_free, ldns_key_list_free | ldns_key ++ldns_key2rr | ldns_key - convert ldns_key to rr ++ldns_key_free, ldns_key_deep_free, ldns_key_list_free | ldns_key - free a ldns_key + # +-ldns_key_print | ldns_key_new, ldns_key +-ldns_key | ldns_key_new, ldns_key_new_frm_algorithm,ldns_key_new_frm_fp,ldns_key_new_frm_fp_l, ldns_key_new_frm_fp_rsa, ldns_key_new_frm_fp_rsa_l, ldns_key_new_frm_fp_dsa, ldns_key_new_frm_fp_dsa_l, ldns_key_list_new, ldns_key_set_algorithm, ldns_key_set_rsa_key, ldns_key_set_dsa_key, ldns_key_set_hmac_key, ldns_key_set_origttl, ldns_key_set_inception, ldns_key_set_expiration, ldns_key_set_pubkey_owner, ldns_key_set_keytag, ldns_key_set_flags, ldns_key_list_set_key_count, ldns_key_list_push_key, ldns_key_list_pop_key, ldns_key_list_key_count, ldns_key_list_key, ldns_key_rsa_key, ldns_key_dsa_key, ldns_key_algorithm, ldns_key_hmac_key, ldns_key_origttl, ldns_key_inception, ldns_key_expiration, ldns_key_keytag, ldns_key_pubkey_owner, ldns_key_flags, ldns_key2rr, ldns_key_free, ldns_key_deep_free, ldns_key_list_free, ldns_key_print ++ldns_key_print | ldns_key_new, ldns_key - print a ldns_key ++ldns_calc_keytag, ldns_calc_keytag_raw | ldns_key - calculate ldns keytag ++ldns_key | ldns_key_new, ldns_key_new_frm_algorithm,ldns_key_new_frm_fp,ldns_key_new_frm_fp_l, ldns_key_new_frm_fp_rsa, ldns_key_new_frm_fp_rsa_l, ldns_key_new_frm_fp_dsa, ldns_key_new_frm_fp_dsa_l, ldns_key_list_new, ldns_key_set_algorithm, ldns_key_set_rsa_key, ldns_key_set_dsa_key, ldns_key_set_hmac_key, ldns_key_set_origttl, ldns_key_set_inception, ldns_key_set_expiration, ldns_key_set_pubkey_owner, ldns_key_set_keytag, ldns_key_set_flags, ldns_key_list_set_key_count, ldns_key_list_push_key, ldns_key_list_pop_key, ldns_key_list_key_count, ldns_key_list_key, ldns_key_rsa_key, ldns_key_dsa_key, ldns_key_algorithm, ldns_key_hmac_key, ldns_key_origttl, ldns_key_inception, ldns_key_expiration, ldns_key_keytag, ldns_key_pubkey_owner, ldns_key_flags, ldns_key2rr, ldns_key_free, ldns_key_deep_free, ldns_key_list_free, ldns_key_print - ldns_key data structure + ### /dnskey.h + + ### MIEK TOT HIER TOT HIER + +-# lists +-ldns_key_list_new, ldns_key_list_push_key, ldns_key_list_pop_key, ldns_key_list_key_count, ldns_key_list_key | ldns_key_list, ldns_key +-ldns_key_rsa_key, ldns_key_dsa_key, ldns_key_algorithm, ldns_key_hmac_key | ldns_key_list, ldns_key +- +-# gets/sets +-ldns_key_origttl, ldns_key_inception, ldns_key_expiration, ldns_key_keytag, ldns_key_pubkey_owner, ldns_key_flags | ldns_key +-ldns_key_set_algorithm, ldns_key_set_rsa_key, ldns_key_set_dsa_key, ldns_key_set_hmac_key, ldns_key_set_origttl, ldns_key_set_inception, ldns_key_set_expiration, ldns_key_set_pubkey_owner, ldns_key_set_keytag, ldns_key_set_flags, ldns_key_list_set_key_count | ldns_key +- + # errr.h +-ldns_get_errorstr_by_id | ldns_status +-ldns_status | ldns_get_errorstr_by_id ++ldns_get_errorstr_by_id, ldns_status - errors + + ### net.h +-ldns_send | ldns_pkt, ldns_resolver +-ldns_tcp_send_query, ldns_tcp_read_wire, ldns_tcp_connect | ldns_send, ldns_pkt, ldns_resolver ++ldns_send | ldns_pkt, ldns_resolver - send a packet ++ldns_tcp_send_query, ldns_tcp_read_wire, ldns_tcp_connect | ldns_send, ldns_pkt, ldns_resolver - tcp queries + ### /net.h + + ### buffer.h + # general +-ldns_buffer | ldns_buffer_new, ldns_buffer_new_frm_data, ldns_buffer_clear, ldns_buffer_printf, ldns_buffer_free, ldns_buffer_export, ldns_buffer_flip, ldns_buffer_rewind, ldns_buffer_position, ldns_buffer_set_position, ldns_buffer_skip, ldns_buffer_limit, ldns_buffer_set_limit, ldns_buffer_capacity, ldns_buffer_set_capacity, ldns_buffer_reserve, ldns_buffer_at, ldns_buffer_begin, ldns_buffer_end, ldns_buffer_current, ldns_buffer_remaining_at, ldns_buffer_remaining, ldns_buffer_available_at, ldns_buffer_available, ldns_buffer_status, ldns_buffer_status_ok, ldns_buffer_write_at, ldns_buffer_write_at, ldns_buffer_write, ldns_buffer_write_string_at, ldns_buffer_write_string, ldns_buffer_write_u8_at, ldns_buffer_write_u8, ldns_buffer_write_u16_at, ldns_buffer_write_u16, ldns_buffer_read_at, ldns_buffer_read, ldns_buffer_read_u8_at, ldns_buffer_read_u8, ldns_buffer_read_u16_at, ldns_buffer_read_u16, ldns_buffer_read_u32_at, ldns_buffer_read_u32 +-ldns_buffer_new, ldns_buffer_new_frm_data, ldns_buffer_clear, ldns_buffer_printf, ldns_buffer_free, ldns_buffer_export | ldns_buffer ++ldns_buffer, ldns_buffer_new, ldns_buffer_new_frm_data, ldns_buffer_clear, ldns_buffer_printf, ldns_buffer_free, ldns_buffer_copy, ldns_buffer_export, ldns_buffer_export2str, ldns_buffer2str | ldns_buffer_flip, ldns_buffer_rewind, ldns_buffer_position, ldns_buffer_set_position, ldns_buffer_skip, ldns_buffer_limit, ldns_buffer_set_limit, ldns_buffer_capacity, ldns_buffer_set_capacity, ldns_buffer_reserve, ldns_buffer_at, ldns_buffer_begin, ldns_buffer_end, ldns_buffer_current, ldns_buffer_remaining_at, ldns_buffer_remaining, ldns_buffer_available_at, ldns_buffer_available, ldns_buffer_status, ldns_buffer_status_ok, ldns_buffer_write_at, ldns_buffer_write, ldns_buffer_write_string_at, ldns_buffer_write_string, ldns_buffer_write_u8_at, ldns_buffer_write_u8, ldns_buffer_write_u16_at, ldns_buffer_write_u16, ldns_buffer_read_at, ldns_buffer_read, ldns_buffer_read_u8_at, ldns_buffer_read_u8, ldns_buffer_read_u16_at, ldns_buffer_read_u16, ldns_buffer_read_u32_at, ldns_buffer_read_u32, ldns_buffer_write_u32, ldns_buffer_write_u32_at - buffers + # position +-ldns_buffer_flip, ldns_buffer_rewind, ldns_buffer_position, ldns_buffer_set_position, ldns_buffer_skip | ldns_buffer ++ldns_buffer_flip, ldns_buffer_rewind, ldns_buffer_position, ldns_buffer_set_position, ldns_buffer_skip | ldns_buffer - buffer positioning + # values and pointers +-ldns_buffer_limit, ldns_buffer_set_limit, ldns_buffer_capacity, ldns_buffer_set_capacity, ldns_buffer_reserve, ldns_buffer_at, ldns_buffer_begin, ldns_buffer_end, ldns_buffer_current | ldns_buffer ++ldns_buffer_limit, ldns_buffer_set_limit, ldns_buffer_capacity, ldns_buffer_set_capacity, ldns_buffer_reserve, ldns_buffer_at, ldns_buffer_begin, ldns_buffer_end, ldns_buffer_current | ldns_buffer - buffer limits and pointers + # info +-ldns_buffer_remaining_at, ldns_buffer_remaining, ldns_buffer_available_at, ldns_buffer_available, ldns_buffer_status, ldns_buffer_status_ok | ldns_buffer ++ldns_buffer_remaining_at, ldns_buffer_remaining, ldns_buffer_available_at, ldns_buffer_available, ldns_buffer_status, ldns_buffer_status_ok | ldns_buffer - check buffer status + # read and write +-ldns_buffer_write_at, ldns_buffer_write_at, ldns_buffer_write, ldns_buffer_write_string_at, ldns_buffer_write_string, ldns_buffer_write_u8_at, ldns_buffer_write_u8, ldns_buffer_write_u16_at, ldns_buffer_write_u16, ldns_buffer_read_at, ldns_buffer_read, ldns_buffer_read_u8_at, ldns_buffer_read_u8, ldns_buffer_read_u16_at, ldns_buffer_read_u16, ldns_buffer_read_u32_at, ldns_buffer_read_u32 | ldns_buffer ++ldns_buffer_write_at, ldns_buffer_write, ldns_buffer_write_string_at, ldns_buffer_write_string, ldns_buffer_write_u8_at, ldns_buffer_write_u8, ldns_buffer_write_u16_at, ldns_buffer_write_u16, ldns_buffer_read_at, ldns_buffer_read, ldns_buffer_read_u8_at, ldns_buffer_read_u8, ldns_buffer_read_u16_at, ldns_buffer_read_u16, ldns_buffer_read_u32_at, ldns_buffer_read_u32, ldns_buffer_write_u32, ldns_buffer_write_u32_at | ldns_buffer - reading and writing buffers + ### /buffer.h + + # parse.h +-ldns_bget_token, ldns_bgetc, ldns_bskipcs | ldns_buffer +-ldns_fget_token, ldns_fskipcs | ldns_buffer +-ldns_str_remove_comment +- ++ldns_bget_token, ldns_bgetc, ldns_bskipcs | ldns_buffer - get tokens from buffers ++ldns_fget_token, ldns_fskipcs | ldns_buffer - get tokens from files + + # rr.h and other general rr funcs +-ldns_rr, ldns_rr_class, ldns_rr_type, ldns_rr_compress, ldns_rr_list | ldns_rr_new, ldns_rr_new_frm_type, ldns_rr_new_frm_str, ldns_rr_new_frm_fp, ldns_rr_free, ldns_rr_print, ldns_rr_set_owner, ldns_rr_set_ttl, ldns_rr_set_type, ldns_rr_set_rd_count, ldns_rr_set_class, ldns_rr_set_rdf, ldns_rr_push_rdf, ldns_rr_pop_rdf, ldns_rr_rdf, ldns_rr_owner, ldns_rr_rd_count, ldns_rr_ttl, ldns_rr_get_class, ldns_rr_list_rr_count, ldns_rr_list_set_rr_count, ldns_rr_list_new, ldns_rr_list_free, ldns_rr_list_cat, ldns_rr_list_push_rr, ldns_rr_list_pop_rr, ldns_is_rrset, ldns_rr_set_push_rr, ldns_rr_set_pop_rr, ldns_get_rr_class_by_name, ldns_get_rr_type_by_name, ldns_rr_list_clone, ldns_rr_list_sort, ldns_rr_compare, ldns_rr_compare_ds, ldns_rr_uncompressed_size, ldns_rr2canonical, ldns_rr_label_count, ldns_is_rrset, ldns_rr_descriptor, ldns_rr_descript +-ldns_rr_new, ldns_rr_new_frm_type, ldns_rr_new_frm_str, ldns_rr_new_frm_fp, ldns_rr_free, ldns_rr_print | ldns_rr, ldns_rr_list +-ldns_rr_set_owner, ldns_rr_set_ttl, ldns_rr_set_type, ldns_rr_set_rd_count, ldns_rr_set_class, ldns_rr_set_rdf | ldns_rr, ldns_rr_list +-ldns_rr_push_rdf, ldns_rr_pop_rdf | ldns_rr, ldns_rr_list +-ldns_rr_rdf, ldns_rr_owner, ldns_rr_rd_count, ldns_rr_ttl, ldns_rr_get_class | ldns_rr, ldns_rr_list +-ldns_rr_list_rr_count, ldns_rr_list_set_rr_count | ldns_rr, ldns_rr_list +-ldns_rr_list_new, ldns_rr_list_free | ldns_rr, ldns_rr_list +-ldns_rr_list_cat, ldns_rr_list_push_rr, ldns_rr_list_pop_rr | ldns_rr, ldns_rr_list +-ldns_is_rrset | ldns_rr, ldns_rr_list +-ldns_rr_set_push_rr, ldns_rr_set_pop_rr | ldns_rr, ldns_rr_list +-ldns_get_rr_class_by_name, ldns_get_rr_type_by_name | ldns_rr, ldns_rr_list +-ldns_rr_list_clone | ldns_rr, ldns_rr_list +-ldns_rr_list_sort | ldns_rr, ldns_rr_list +-ldns_rr_compare, ldns_rr_compare_ds | ldns_rr, ldns_rr_list +-ldns_rr_uncompressed_size | ldns_rr, ldns_rr_list +-ldns_rr2canonical | ldns_rr, ldns_rr_list +-ldns_rr_label_count | ldns_rr, ldns_rr_list +-ldns_is_rrset | ldns_rr ++ldns_rr, ldns_rr_class, ldns_rr_type, ldns_rr_compress, ldns_rr_list | ldns_rr_new, ldns_rr_new_frm_type, ldns_rr_new_frm_str, ldns_rr_new_frm_fp, ldns_rr_free, ldns_rr_print, ldns_rr_set_owner, ldns_rr_set_ttl, ldns_rr_set_type, ldns_rr_set_rd_count, ldns_rr_set_class, ldns_rr_set_rdf, ldns_rr_push_rdf, ldns_rr_pop_rdf, ldns_rr_rdf, ldns_rr_owner, ldns_rr_rd_count, ldns_rr_ttl, ldns_rr_get_class, ldns_rr_list_rr_count, ldns_rr_list_set_rr_count, ldns_rr_list_new, ldns_rr_list_free, ldns_rr_list_cat, ldns_rr_list_push_rr, ldns_rr_list_pop_rr, ldns_is_rrset, ldns_rr_set_push_rr, ldns_rr_set_pop_rr, ldns_get_rr_class_by_name, ldns_get_rr_type_by_name, ldns_rr_list_clone, ldns_rr_list_sort, ldns_rr_compare, ldns_rr_compare_ds, ldns_rr_uncompressed_size, ldns_rr2canonical, ldns_rr_label_count, ldns_is_rrset, ldns_rr_descriptor, ldns_rr_descript - types representing dns resource records ++ldns_rr_new, ldns_rr_new_frm_type, ldns_rr_new_frm_str, ldns_rr_new_frm_fp, ldns_rr_free, ldns_rr_print | ldns_rr, ldns_rr_list - ldns_rr creation, destruction and printing ++ldns_rr_set_owner, ldns_rr_set_ttl, ldns_rr_set_type, ldns_rr_set_rd_count, ldns_rr_set_class, ldns_rr_set_rdf | ldns_rr, ldns_rr_list - set ldns_rr attributes ++ldns_rr_push_rdf, ldns_rr_pop_rdf | ldns_rr, ldns_rr_list - push and pop rdata fields ++ldns_rr_rdf, ldns_rr_owner, ldns_rr_rd_count, ldns_rr_ttl, ldns_rr_get_class | ldns_rr, ldns_rr_list - access rdata fields on ldns_rr ++ldns_rr_list_rr_count, ldns_rr_list_set_rr_count | ldns_rr, ldns_rr_list - get and set ldns_rr_list length ++ldns_rr_list_new, ldns_rr_list_free | ldns_rr, ldns_rr_list - ldns_rr_list creation and destruction ++ldns_rr_list_cat, ldns_rr_list_push_rr, ldns_rr_list_pop_rr | ldns_rr, ldns_rr_list - ldns_rr_list manipulation ++ldns_is_rrset | ldns_rr, ldns_rr_list - is rr_list a rrset ++ldns_rr_set_push_rr, ldns_rr_set_pop_rr | ldns_rr, ldns_rr_list - push and pop rr on a rrset ++ldns_get_rr_class_by_name, ldns_get_rr_type_by_name | ldns_rr, ldns_rr_list - lookup class or type by name ++ldns_rr_list_clone | ldns_rr, ldns_rr_list - clone a ldns_rr_list ++ldns_rr_list_sort | ldns_rr, ldns_rr_list - sort a ldns_rr_list ++ldns_rr_compare, ldns_rr_compare_ds | ldns_rr, ldns_rr_list - compare a ldns_rr ++ldns_rr_uncompressed_size | ldns_rr, ldns_rr_list - calculates the uncompressed size of an RR ++ldns_rr2canonical | ldns_rr, ldns_rr_list - canonicalize a RR ++ldns_rr_label_count | ldns_rr, ldns_rr_list - return ownername label count + + # rr descriptors +-ldns_rr_descriptor, ldns_rr_descript, ldns_rr_descriptor_minimum, ldns_rr_descriptor_maximum, ldns_rr_descriptor_field_type | ldns_rr, ldns_rdf ++ldns_rr_descriptor, ldns_rr_descript, ldns_rr_descriptor_minimum, ldns_rr_descriptor_maximum, ldns_rr_descriptor_field_type | ldns_rr, ldns_rdf - rdata field descriptors + + # packet.h +-ldns_pkt, ldns_pkt_section, ldns_pkt_type | ldns_pkt_new, ldns_pkt_free, ldns_pkt_print, ldns_pkt_query_new, ldns_pkt_query_new_frm_str, ldns_pkt_reply_type, ldns_pkt_id, ldns_pkt_qr, ldns_pkt_aa, ldns_pkt_tc, ldns_pkt_rd, ldns_pkt_cd, ldns_pkt_ra, ldns_pkt_ad, ldns_pkt_get_opcode, ldns_pkt_get_rcode, ldns_pkt_qdcount, ldns_pkt_ancount, ldns_pkt_nscount, ldns_pkt_arcount, ldns_pkt_answerfrom, ldns_pkt_querytime, ldns_pkt_size, ldns_pkt_tsig, ldns_pkt_question, ldns_pkt_answer, ldns_pkt_authority, ldns_pkt_additional, ldns_pkt_get_section_clone, ldns_pkt_rr_list_by_name, ldns_pkt_rr_list_by_type, ldns_pkt_rr_list_by_name_and_type, ldns_pkt_set_flags, ldns_pkt_set_id, ldns_pkt_set_qr, ldns_pkt_set_aa, ldns_pkt_set_tc, ldns_pkt_set_rd, ldns_pkt_set_cd, ldns_pkt_set_ra, ldns_pkt_set_ad, ldns_pkt_set_opcode, ldns_pkt_set_rcode, ldns_pkt_set_qdcount, ldns_pkt_set_ancount, ldns_pkt_set_nscount, ldns_pkt_set_arcount, ldns_pkt_set_answerfrom, ldns_pkt_set_querytime, ldns_pkt_set_size, ldns_pkt_set_section_count, ldns_pkt_set_tsig, ldns_pkt_edns, ldns_pkt_edns_udp_size, ldns_pkt_edns_extended_rcode, ldns_pkt_edns_version, ldns_pkt_edns_z, ldns_pkt_edns_data, ldns_pkt_set_edns_udp_size, ldns_pkt_set_edns_extended_rcode, ldns_pkt_set_edns_version, ldns_pkt_set_edns_z, ldns_pkt_set_edns_data ++ldns_pkt, ldns_pkt_section, ldns_pkt_type | ldns_pkt_new, ldns_pkt_free, ldns_pkt_print, ldns_pkt_query_new, ldns_pkt_query_new_frm_str, ldns_pkt_reply_type, ldns_pkt_id, ldns_pkt_qr, ldns_pkt_aa, ldns_pkt_tc, ldns_pkt_rd, ldns_pkt_cd, ldns_pkt_ra, ldns_pkt_ad, ldns_pkt_get_opcode, ldns_pkt_get_rcode, ldns_pkt_qdcount, ldns_pkt_ancount, ldns_pkt_nscount, ldns_pkt_arcount, ldns_pkt_answerfrom, ldns_pkt_querytime, ldns_pkt_size, ldns_pkt_tsig, ldns_pkt_question, ldns_pkt_answer, ldns_pkt_authority, ldns_pkt_additional, ldns_pkt_get_section_clone, ldns_pkt_rr_list_by_name, ldns_pkt_rr_list_by_type, ldns_pkt_rr_list_by_name_and_type, ldns_pkt_set_flags, ldns_pkt_set_id, ldns_pkt_set_qr, ldns_pkt_set_aa, ldns_pkt_set_tc, ldns_pkt_set_rd, ldns_pkt_set_cd, ldns_pkt_set_ra, ldns_pkt_set_ad, ldns_pkt_set_opcode, ldns_pkt_set_rcode, ldns_pkt_set_qdcount, ldns_pkt_set_ancount, ldns_pkt_set_nscount, ldns_pkt_set_arcount, ldns_pkt_set_answerfrom, ldns_pkt_set_querytime, ldns_pkt_set_size, ldns_pkt_set_section_count, ldns_pkt_set_tsig, ldns_pkt_edns, ldns_pkt_edns_udp_size, ldns_pkt_edns_extended_rcode, ldns_pkt_edns_version, ldns_pkt_edns_z, ldns_pkt_edns_data, ldns_pkt_set_edns_udp_size, ldns_pkt_set_edns_extended_rcode, ldns_pkt_set_edns_version, ldns_pkt_set_edns_z, ldns_pkt_set_edns_data - request or anser packets types + +-ldns_pkt_new, ldns_pkt_free, ldns_pkt_print, ldns_pkt_query_new, ldns_pkt_query_new_frm_str, ldns_pkt_reply_type | ldns_pkt ++ldns_pkt_new, ldns_pkt_free, ldns_pkt_print, ldns_pkt_query_new, ldns_pkt_query_new_frm_str, ldns_pkt_reply_type | ldns_pkt - ldns_pkt creation, destruction and printing + # gets +-ldns_pkt_id, ldns_pkt_qr, ldns_pkt_aa, ldns_pkt_tc, ldns_pkt_rd, ldns_pkt_cd, ldns_pkt_ra, ldns_pkt_ad, ldns_pkt_get_opcode, ldns_pkt_get_rcode, ldns_pkt_qdcount, ldns_pkt_ancount, ldns_pkt_nscount, ldns_pkt_arcount, ldns_pkt_answerfrom, ldns_pkt_querytime, ldns_pkt_size, ldns_pkt_tsig, ldns_pkt_question, ldns_pkt_answer, ldns_pkt_authority, ldns_pkt_additional, ldns_pkt_get_section_clone, ldns_pkt_rr_list_by_name, ldns_pkt_rr_list_by_type, ldns_pkt_rr_list_by_name_and_type | ldns_pkt ++ldns_pkt_id, ldns_pkt_qr, ldns_pkt_aa, ldns_pkt_tc, ldns_pkt_rd, ldns_pkt_cd, ldns_pkt_ra, ldns_pkt_ad, ldns_pkt_get_opcode, ldns_pkt_get_rcode, ldns_pkt_qdcount, ldns_pkt_ancount, ldns_pkt_nscount, ldns_pkt_arcount, ldns_pkt_answerfrom, ldns_pkt_querytime, ldns_pkt_size, ldns_pkt_tsig, ldns_pkt_question, ldns_pkt_answer, ldns_pkt_authority, ldns_pkt_additional, ldns_pkt_get_section_clone, ldns_pkt_rr_list_by_name, ldns_pkt_rr_list_by_type, ldns_pkt_rr_list_by_name_and_type | ldns_pkt - get ldns_pkt attributes + # sets +-ldns_pkt_set_flags, ldns_pkt_set_id, ldns_pkt_set_qr, ldns_pkt_set_aa, ldns_pkt_set_tc, ldns_pkt_set_rd, ldns_pkt_set_cd, ldns_pkt_set_ra, ldns_pkt_set_ad, ldns_pkt_set_opcode, ldns_pkt_set_rcode, ldns_pkt_set_qdcount, ldns_pkt_set_ancount, ldns_pkt_set_nscount, ldns_pkt_set_arcount, ldns_pkt_set_answerfrom, ldns_pkt_set_querytime, ldns_pkt_set_size, ldns_pkt_set_section_count, ldns_pkt_set_tsig | ldns_pkt ++ldns_pkt_set_flags, ldns_pkt_set_id, ldns_pkt_set_qr, ldns_pkt_set_aa, ldns_pkt_set_tc, ldns_pkt_set_rd, ldns_pkt_set_cd, ldns_pkt_set_ra, ldns_pkt_set_ad, ldns_pkt_set_opcode, ldns_pkt_set_rcode, ldns_pkt_set_qdcount, ldns_pkt_set_ancount, ldns_pkt_set_nscount, ldns_pkt_set_arcount, ldns_pkt_set_answerfrom, ldns_pkt_set_querytime, ldns_pkt_set_size, ldns_pkt_set_section_count, ldns_pkt_set_tsig | ldns_pkt - set ldns_pkt attributes + # EDNS0 +-ldns_pkt_edns, ldns_pkt_edns_udp_size, ldns_pkt_edns_extended_rcode, ldns_pkt_edns_version, ldns_pkt_edns_z, ldns_pkt_edns_data, ldns_pkt_set_edns_udp_size, ldns_pkt_set_edns_extended_rcode, ldns_pkt_set_edns_version, ldns_pkt_set_edns_z, ldns_pkt_set_edns_data | ldns_pkt ++ldns_pkt_edns, ldns_pkt_edns_udp_size, ldns_pkt_edns_extended_rcode, ldns_pkt_edns_version, ldns_pkt_edns_z, ldns_pkt_edns_data, ldns_pkt_set_edns_udp_size, ldns_pkt_set_edns_extended_rcode, ldns_pkt_set_edns_version, ldns_pkt_set_edns_z, ldns_pkt_set_edns_data | ldns_pkt - ldns_pkt ends0 related functions + + # rr_functions.h +-ldns_rr_ns_nsdname ++ldns_rr_ns_nsdname - get dname rdata field from NS RR + # +-ldns_rr_mx_preference, ldns_rr_mx_exchange ++ldns_rr_mx_preference, ldns_rr_mx_exchange - get MX RR rdata fields + # +-ldns_rr_rrsig_typecovered, ldns_rr_rrsig_set_typecovered, ldns_rr_rrsig_algorithm, ldns_rr_rrsig_set_algorithm, ldns_rr_rrsig_labels, ldns_rr_rrsig_set_labels, ldns_rr_rrsig_origttl, ldns_rr_rrsig_set_origttl, ldns_rr_rrsig_expiration, ldns_rr_rrsig_set_expiration, ldns_rr_rrsig_inception, ldns_rr_rrsig_set_inception, ldns_rr_rrsig_keytag, ldns_rr_rrsig_set_keytag, ldns_rr_rrsig_signame, ldns_rr_rrsig_set_signame, ldns_rr_rrsig_sig, ldns_rr_rrsig_set_sig ++ldns_rr_rrsig_typecovered, ldns_rr_rrsig_set_typecovered, ldns_rr_rrsig_algorithm, ldns_rr_rrsig_set_algorithm, ldns_rr_rrsig_labels, ldns_rr_rrsig_set_labels, ldns_rr_rrsig_origttl, ldns_rr_rrsig_set_origttl, ldns_rr_rrsig_expiration, ldns_rr_rrsig_set_expiration, ldns_rr_rrsig_inception, ldns_rr_rrsig_set_inception, ldns_rr_rrsig_keytag, ldns_rr_rrsig_set_keytag, ldns_rr_rrsig_signame, ldns_rr_rrsig_set_signame, ldns_rr_rrsig_sig, ldns_rr_rrsig_set_sig - get and set RRSIG RR rdata fields + # +-ldns_rr_dnskey_flags, ldns_rr_dnskey_set_flags, ldns_rr_dnskey_protocol, ldns_rr_dnskey_set_protocol, ldns_rr_dnskey_algorithm, ldns_rr_dnskey_set_algorithm, ldns_rr_dnskey_key, ldns_rr_dnskey_set_key | ldns_rr ++ldns_rr_dnskey_flags, ldns_rr_dnskey_set_flags, ldns_rr_dnskey_protocol, ldns_rr_dnskey_set_protocol, ldns_rr_dnskey_algorithm, ldns_rr_dnskey_set_algorithm, ldns_rr_dnskey_key, ldns_rr_dnskey_set_key | ldns_rr - get and set DNSKEY RR rdata fields + + ### zone.h +-ldns_zone | ldns_zone_new, ldns_zone_deep_free, ldns_zone_new_frm_fp, ldns_zone_new_frm_fp_l, ldns_zone_sort, ldns_zone_glue_rr_list, ldns_zone_push_rr, ldns_zone_push_rr_list, ldns_zone_set_rrs, ldns_zone_set_soa, ldns_zone_rrs, ldns_zone_soa, ldns_zone_rr_count, ++ldns_zone, ldns_zone_new, ldns_zone_free, ldns_zone_deep_free, ldns_zone_new_frm_fp, ldns_zone_new_frm_fp_l, ldns_zone_print, ldns_zone_print_fmt - ldns_zone creation, destruction and printing ++ldns_zone_sort, ldns_zone_glue_rr_list | ldns_zone - sort a zone and get the glue records ++ldns_zone_push_rr, ldns_zone_push_rr_list | ldns_zone - add rr's to a ldns_zone ++ldns_zone_set_rrs, ldns_zone_set_soa | ldns_zone, ldns_zone_rrs, ldns_zone_soa - ldns_zone set content ++ldns_zone_rrs, ldns_zone_soa | ldns_zone ldns_zone_set_rrs - ldns_zone get content ++ldns_zone_rr_count | ldns_zone - get ldns_zone size + ++### update.h ++ldns_update_pkt_new | ldns_update_pkt_tsig_add, ldns_update_pkt_tsig_add, ldns_update_zocount, ldns_update_prcount, ldns_update_upcount, ldns_update_adcount, ldns_update_set_zocount, ldns_update_set_prcount, ldns_update_set_upcount, ldns_update_set_adcount - create an update packet + +-ldns_zone_new, ldns_zone_deep_free, ldns_zone_new_frm_fp, ldns_zone_new_frm_fp_l | ldns_zone +-ldns_zone_sort, ldns_zone_glue_rr_list | ldns_zone +-ldns_zone_push_rr, ldns_zone_push_rr_list | ldns_zone +-ldns_zone_set_rrs, ldns_zone_set_soa | ldns_zone, ldns_zone_rrs, ldns_zone_soa +-ldns_zone_rrs, ldns_zone_soa | ldns_zone ldns_zone_set_rrs +-ldns_zone_rr_count | ldns_zone ++ldns_update_pkt_tsig_add | ldns_update_pkt_new - add resolver's tsig credentials to an ldns_pkt ++ldns_update_zocount, ldns_update_prcount, ldns_update_upcount, ldns_update_adcount | ldns_update_pkt_new - return update packet counters ++ldns_update_set_zocount, ldns_update_set_prcount, ldns_update_set_upcount, ldns_update_set_adcount | ldns_update_pkt_new - set the update packet counters ++ ++### keys.h ++ldns_algorithm - numbers assigned to algorithms used in dns ++ ++ ++ldns_axfr_start, ldns_axfr_next, ldns_axfr_abort, ldns_axfr_complete, ldns_axfr_last_pkt - functions for full zone transfer ++ ++ldns_b32_ntop_calculate_size, ldns_b32_pton_calculate_size, ldns_b64_ntop_calculate_size, ldns_b64_pton_calculate_size - return size needed for b32 or b64 encoded or decoded data ++ ++ldns_duration_type, ldns_duration_create, ldns_duration_create_from_string, ldns_duration_cleanup, ldns_duration_compare, ldns_duration2string, ldns_duration2time - duration type and related functions ++ ++ldns_bubblebabble - encode data as BubbleBabble ++ ++ldns_version - return library version + +-### update.h +-ldns_update_pkt_new | ldns_update_pkt_tsig_add, ldns_update_pkt_tsig_add, ldns_update_zocount, ldns_update_prcount, ldns_update_upcount, ldns_update_adcount, ldns_update_set_zocount, ldns_update_set_prcount, ldns_update_set_upcount, ldns_update_set_adcount, + +-ldns_update_pkt_tsig_add | ldns_update_pkt_new +-ldns_update_zocount, ldns_update_prcount, ldns_update_upcount, ldns_update_adcount | ldns_update_pkt_new +-ldns_update_set_zocount, ldns_update_set_prcount, ldns_update_set_upcount, ldns_update_set_adcount | ldns_update_pkt_new +-- +2.6.4 + diff --git a/package/libldns/Config.in b/package/libldns/Config.in new file mode 100644 index 0000000000..12065ae2f1 --- /dev/null +++ b/package/libldns/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBLDNS + bool "libldns" + help + The goal of ldns is to simplify DNS programming, it supports + recent RFCs like the DNSSEC documents, and allows developers + to easily create software conforming to current RFCs, and + experimental software for current Internet Drafts. + + http://www.nlnetlabs.nl/projects/ldns diff --git a/package/libldns/libldns.hash b/package/libldns/libldns.hash new file mode 100644 index 0000000000..3565c5830a --- /dev/null +++ b/package/libldns/libldns.hash @@ -0,0 +1,4 @@ +# From http://www.nlnetlabs.nl/downloads/ldns/ldns-1.6.17.tar.gz.sha1 +sha1 4218897b3c002aadfc7280b3f40cda829e05c9a4 ldns-1.6.17.tar.gz +# Locally calculated +sha256 8b88e059452118e8949a2752a55ce59bc71fa5bc414103e17f5b6b06f9bcc8cd ldns-1.6.17.tar.gz diff --git a/package/libldns/libldns.mk b/package/libldns/libldns.mk new file mode 100644 index 0000000000..3d4d35688c --- /dev/null +++ b/package/libldns/libldns.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# libldns +# +################################################################################ + +LIBLDNS_VERSION = 1.6.17 +LIBLDNS_SOURCE = ldns-$(LIBLDNS_VERSION).tar.gz +LIBLDNS_SITE = http://www.nlnetlabs.nl/downloads/ldns +LIBLDNS_LICENSE = BSD-3c +LIBLDNS_LICENSE_FILES = LICENSE +LIBLDNS_INSTALL_STAGING = YES +LIBLDNS_CONF_OPTS = \ + --without-examples \ + --without-p5-dns-ldns \ + --without-pyldns \ + --without-pyldnsx + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBLDNS_DEPENDENCIES += openssl +LIBLDNS_CONF_OPTS += \ + --with-ssl=$(STAGING_DIR)/usr \ + --enable-dane \ + --enable-ecdsa \ + --enable-gost \ + --enable-sha2 + +ifeq ($(BR2_STATIC_LIBS),y) +LIBLDNS_DEPENDENCIES += host-pkgconf +# missing -lz breaks configure, add it using pkgconf +LIBLDNS_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs openssl`" +endif + +else +LIBLDNS_CONF_OPTS += \ + --without-ssl \ + --disable-dane \ + --disable-ecdsa \ + --disable-gost \ + --disable-sha2 +endif + +# the linktest make target fails with static linking, and we are only +# interested in the lib target anyway +LIBLDNS_MAKE_OPTS = lib + +$(eval $(autotools-package)) diff --git a/package/liblinear/0001-blas-don-t-overwrite-ar-options.patch b/package/liblinear/0001-blas-don-t-overwrite-ar-options.patch new file mode 100644 index 0000000000..5d1ef3f52a --- /dev/null +++ b/package/liblinear/0001-blas-don-t-overwrite-ar-options.patch @@ -0,0 +1,35 @@ +From cae4c3b80fee0f3637d70f6d33946888c8105637 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 13 Dec 2014 17:16:58 +0100 +Subject: [PATCH 1/1] blas: don't overwrite ar options + +ar's rcv options get lost when AR is passed on +the command line. + +Signed-off-by: Romain Naour +--- + blas/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/blas/Makefile b/blas/Makefile +index 895fd24..78cec9a 100644 +--- a/blas/Makefile ++++ b/blas/Makefile +@@ -1,4 +1,4 @@ +-AR = ar rcv ++AR = ar + RANLIB = ranlib + + HEADERS = blas.h blasp.h +@@ -8,7 +8,7 @@ CFLAGS = $(OPTFLAGS) + FFLAGS = $(OPTFLAGS) + + blas: $(FILES) $(HEADERS) +- $(AR) blas.a $(FILES) ++ $(AR) rcv blas.a $(FILES) + $(RANLIB) blas.a + + clean: +-- +1.9.3 + diff --git a/package/liblinear/0002-build-static-lib.patch b/package/liblinear/0002-build-static-lib.patch new file mode 100644 index 0000000000..98657d3c82 --- /dev/null +++ b/package/liblinear/0002-build-static-lib.patch @@ -0,0 +1,18 @@ +Makefile: add a rule to build a static library + +Signed-off-by: "Yann E. MORIN" +diff -durN liblinear-1.96.orig/Makefile liblinear-1.96/Makefile +--- liblinear-1.96.orig/Makefile 2014-11-15 07:50:23.000000000 +0100 ++++ liblinear-1.96/Makefile 2014-12-14 00:23:00.135893956 +0100 +@@ -16,6 +16,11 @@ + fi; \ + $(CXX) $${SHARED_LIB_FLAG} linear.o tron.o blas/blas.a -o liblinear.so.$(SHVER) + ++# Keeping blas/blas.a as a pre-requisite, to ensure all .o files are built ++static-lib: linear.o tron.o blas/blas.a ++ $(AR) rcv liblinear.a linear.o tron.o blas/*.o ++ $(RANLIB) liblinear.a ++ + train: tron.o linear.o train.c blas/blas.a + $(CXX) $(CFLAGS) -o train train.c tron.o linear.o $(LIBS) + diff --git a/package/liblinear/Config.in b/package/liblinear/Config.in new file mode 100644 index 0000000000..f25c1196fc --- /dev/null +++ b/package/liblinear/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBLINEAR + bool "liblinear" + depends on BR2_INSTALL_LIBSTDCPP + help + liblinear is a linear classifier for data with millions of instances + and features. + + http://www.csie.ntu.edu.tw/~cjlin/liblinear/ + +comment "liblinear needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/liblinear/liblinear.hash b/package/liblinear/liblinear.hash new file mode 100644 index 0000000000..4f03fa4a84 --- /dev/null +++ b/package/liblinear/liblinear.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 fa5c12dedc76ffca12f1681de7073b03af68163c4e4be65194217c99e55a7d68 liblinear-2.1.tar.gz diff --git a/package/liblinear/liblinear.mk b/package/liblinear/liblinear.mk new file mode 100644 index 0000000000..a9524e35df --- /dev/null +++ b/package/liblinear/liblinear.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# liblinear +# +################################################################################ + +LIBLINEAR_VERSION = 2.1 +LIBLINEAR_SITE = http://www.csie.ntu.edu.tw/~cjlin/liblinear +LIBLINEAR_LICENSE = BSD-3c +LIBLINEAR_LICENSE_FILES = COPYRIGHT +LIBLINEAR_INSTALL_STAGING = YES +LIBLINEAR_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +# $1: destination directory +define LIBLINEAR_INSTALL_SHARED + $(INSTALL) -m 0644 -D $(@D)/liblinear.so.3 $(1)/usr/lib/liblinear.so.3 + ln -sf liblinear.so.3 $(1)/usr/lib/liblinear.so +endef +LIBLINEAR_CFLAGS += -fPIC +endif + +ifeq ($(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +# $1: destination directory +define LIBLINEAR_INSTALL_STATIC + $(INSTALL) -m 0644 -D $(@D)/liblinear.a $(1)/usr/lib/liblinear.a +endef +endif + +define LIBLINEAR_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(LIBLINEAR_CFLAGS)" -C $(@D) \ + $(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),lib) \ + $(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),static-lib) +endef + +define LIBLINEAR_INSTALL_STAGING_CMDS + $(INSTALL) -m 0644 -D $(@D)/linear.h $(STAGING_DIR)/usr/include/linear.h + $(call LIBLINEAR_INSTALL_SHARED,$(STAGING_DIR)) + $(call LIBLINEAR_INSTALL_STATIC,$(STAGING_DIR)) +endef + +define LIBLINEAR_INSTALL_TARGET_CMDS + $(call LIBLINEAR_INSTALL_SHARED,$(TARGET_DIR)) +endef + +$(eval $(generic-package)) diff --git a/package/libllcp/Config.in b/package/libllcp/Config.in new file mode 100644 index 0000000000..e5b21082e5 --- /dev/null +++ b/package/libllcp/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBLLCP + bool "libllcp" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBNFC + help + Library extending libnfc with support for Logical Link Control + Protocol. + + https://code.google.com/p/libllcp/ diff --git a/package/libllcp/libllcp.mk b/package/libllcp/libllcp.mk new file mode 100644 index 0000000000..2c2014a168 --- /dev/null +++ b/package/libllcp/libllcp.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libllcp +# +################################################################################ + +LIBLLCP_VERSION = 05dfa8003433a7070bfd8ae02efdb0203bbf34aa +LIBLLCP_SITE = $(call github,nfc-tools,libllcp,$(LIBLLCP_VERSION)) +LIBLLCP_DEPENDENCIES = host-pkgconf libnfc +# There's no ./configure in the repository, so we need to autoreconf +LIBLLCP_AUTORECONF = YES +LIBLLCP_INSTALL_STAGING = YES +LIBLLCP_LICENSE = GPLv3+ +LIBLLCP_LICENSE_FILES = COPYING +# ensure graphviz isn't used +LIBLLCP_CONF_ENV = ac_cv_path_DOT= + +$(eval $(autotools-package)) diff --git a/package/liblo/Config.in b/package/liblo/Config.in new file mode 100644 index 0000000000..705ac84514 --- /dev/null +++ b/package/liblo/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBLO + bool "liblo" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + liblo is an implementation of the Open Sound Control + protocol for POSIX systems + + http://liblo.sourceforge.net/ + +comment "liblo needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/liblo/liblo.hash b/package/liblo/liblo.hash new file mode 100644 index 0000000000..a4e01a6d73 --- /dev/null +++ b/package/liblo/liblo.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/liblo/files/liblo/0.26/ +sha1 21942c8f19e9829b5842cb85352f98c49dfbc823 liblo-0.26.tar.gz +md5 5351de14262560e15e7f23865293b16f liblo-0.26.tar.gz diff --git a/package/liblo/liblo.mk b/package/liblo/liblo.mk new file mode 100644 index 0000000000..a6b907509c --- /dev/null +++ b/package/liblo/liblo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# liblo +# +################################################################################ + +LIBLO_VERSION = 0.26 +LIBLO_SITE = http://downloads.sourceforge.net/project/liblo/liblo/$(LIBLO_VERSION) + +LIBLO_LICENSE = LGPLv2.1+ +LIBLO_LICENSE_FILES = COPYING +LIBLO_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/liblockfile/0001-install.patch b/package/liblockfile/0001-install.patch new file mode 100644 index 0000000000..bfa197c64f --- /dev/null +++ b/package/liblockfile/0001-install.patch @@ -0,0 +1,16 @@ +diff -ur liblockfile-1.06.1/Makefile.in liblockfile-1.06.1-patched/Makefile.in +--- liblockfile-1.06.1/Makefile.in 2001-03-16 22:08:33.000000000 -0600 ++++ liblockfile-1.06.1-patched/Makefile.in 2007-04-11 07:18:38.000000000 -0500 +@@ -60,11 +60,7 @@ + + install_common: + install -m 644 lockfile.h maillock.h $(ROOT)$(includedir) +- if [ "$(MAILGROUP)" != "" ]; then\ +- install -g $(MAILGROUP) -m 2755 dotlockfile $(ROOT)$(bindir);\ +- else \ +- install -g root -m 755 dotlockfile $(ROOT)$(bindir); \ +- fi ++ install -m 2755 dotlockfile $(ROOT)$(bindir);\ + install -m 644 *.1 $(ROOT)$(mandir)/man1 + install -m 644 *.3 $(ROOT)$(mandir)/man3 + diff --git a/package/liblockfile/Config.in b/package/liblockfile/Config.in new file mode 100644 index 0000000000..88a9c338bb --- /dev/null +++ b/package/liblockfile/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_LIBLOCKFILE + bool "liblockfile" + help + NFS-safe locking library. diff --git a/package/liblockfile/liblockfile.hash b/package/liblockfile/liblockfile.hash new file mode 100644 index 0000000000..4421673b91 --- /dev/null +++ b/package/liblockfile/liblockfile.hash @@ -0,0 +1,3 @@ +# From http://snapshot.debian.org/archive/debian/20151026T153523Z/pool/main/libl/liblockfile/liblockfile_1.09-6.dsc +sha256 16979eba05396365e1d6af7100431ae9d32f9bc063930d1de66298a0695f1b7f liblockfile_1.09.orig.tar.gz +sha256 d45eacb7c637c16d03c777c55989d98da494ae9584a0783fe6dbf0db60fa290f liblockfile_1.09-6.debian.tar.bz2 diff --git a/package/liblockfile/liblockfile.mk b/package/liblockfile/liblockfile.mk new file mode 100644 index 0000000000..8de598f19b --- /dev/null +++ b/package/liblockfile/liblockfile.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# liblockfile +# +################################################################################ + +LIBLOCKFILE_VERSION = 1.09 +LIBLOCKFILE_SOURCE = liblockfile_$(LIBLOCKFILE_VERSION).orig.tar.gz +LIBLOCKFILE_SITE = http://snapshot.debian.org/archive/debian/20151026T153523Z/pool/main/libl/liblockfile +LIBLOCKFILE_PATCH = liblockfile_$(LIBLOCKFILE_VERSION)-6.debian.tar.bz2 + +LIBLOCKFILE_LICENSE = LGPLv2+, dotlockfile GPLv2+ +LIBLOCKFILE_LICENSE_FILES = COPYRIGHT + +LIBLOCKFILE_INSTALL_STAGING = YES +LIBLOCKFILE_CONF_OPTS = --mandir=/usr/share/man + +define LIBLOCKFILE_INSTALL_STAGING_CMDS + mkdir -p $(addprefix $(STAGING_DIR)/usr/share/man/man,1 3) + rm -f $(STAGING_DIR)/usr/lib/liblockfile.so + $(MAKE) -C $(LIBLOCKFILE_DIR) ROOT=$(STAGING_DIR) install + ln -sf liblockfile.so $(STAGING_DIR)/usr/lib/liblockfile.so.1 +endef + +define LIBLOCKFILE_INSTALL_TARGET_CMDS + cp -a $(STAGING_DIR)/usr/lib/liblockfile.so* $(TARGET_DIR)/usr/lib +endef + +$(eval $(autotools-package)) diff --git a/package/liblog4c-localtime/0001-log4c.m4-fix-underquoted-definition-of-AM_PATH_LOG4C.patch b/package/liblog4c-localtime/0001-log4c.m4-fix-underquoted-definition-of-AM_PATH_LOG4C.patch new file mode 100644 index 0000000000..1fe0798a3b --- /dev/null +++ b/package/liblog4c-localtime/0001-log4c.m4-fix-underquoted-definition-of-AM_PATH_LOG4C.patch @@ -0,0 +1,34 @@ +From b7290560082e91673431de79e1fa318c9fd90261 Mon Sep 17 00:00:00 2001 +From: Danomi Manchego +Date: Sat, 25 Oct 2014 19:42:38 +0200 +Subject: [PATCH 1/5] log4c.m4: fix "underquoted definition of AM_PATH_LOG4C" + warning + +When autoreconfiguring liblog4c-localtime, there is a warning from +autoconf caused by an underquoted definition of AM_PATH_LOG4C. This +patch fixes this warning. + +Submitted upstream: https://github.com/rcmadruga/log4c-localtime/pull/1 + +Signed-off-by: Danomi Manchego +Signed-off-by: Thomas Petazzoni +--- + log4c.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/log4c.m4 b/log4c.m4 +index 551a90d..96424c0 100644 +--- a/log4c.m4 ++++ b/log4c.m4 +@@ -4,7 +4,7 @@ + dnl AM_PATH_LOG4C([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) + dnl Test for LOG4C, and define LOG4C_CFLAGS and LOG4C_LIBS + dnl +-AC_DEFUN(AM_PATH_LOG4C, ++AC_DEFUN([AM_PATH_LOG4C], + [dnl + dnl Get the cflags and libraries from the log4c-config script + dnl +-- +2.0.0 + diff --git a/package/liblog4c-localtime/0002-Fix-linking-error-without-pthread.patch b/package/liblog4c-localtime/0002-Fix-linking-error-without-pthread.patch new file mode 100644 index 0000000000..5b679e38ba --- /dev/null +++ b/package/liblog4c-localtime/0002-Fix-linking-error-without-pthread.patch @@ -0,0 +1,38 @@ +From 435b28cd90973cc03a533e75e90a46cd9f197dff Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Sat, 25 Oct 2014 19:44:01 +0200 +Subject: [PATCH 2/5] Fix linking error without pthread + +The rollingfile functionality only gets built if pthread support is +available, but a call to these functions from log4c_fini() was outside +the #if WITH_ROLLINGFILE conditional, causing linker errors when the +library is used. + +Submitted upstream: https://github.com/rcmadruga/log4c-localtime/pull/1 + +Signed-off-by: Peter Korsgaard +Signed-off-by: Thomas Petazzoni +--- + src/log4c/init.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/log4c/init.c b/src/log4c/init.c +index 99883ea..7dd9eb4 100644 +--- a/src/log4c/init.c ++++ b/src/log4c/init.c +@@ -267,10 +267,12 @@ extern int log4c_fini(void) + log4c_layout_factory = NULL; + } + ++#ifdef WITH_ROLLINGFILE + if (log4c_rollingpolicy_factory) { + sd_factory_delete(log4c_rollingpolicy_factory); + log4c_rollingpolicy_factory = NULL; + } ++#endif + + #ifdef __SD_DEBUG__ + if( getenv("SD_DEBUG")){ +-- +2.0.0 + diff --git a/package/liblog4c-localtime/0003-Fix-debug-mode-build-with-uClibc.patch b/package/liblog4c-localtime/0003-Fix-debug-mode-build-with-uClibc.patch new file mode 100644 index 0000000000..4b9a45db68 --- /dev/null +++ b/package/liblog4c-localtime/0003-Fix-debug-mode-build-with-uClibc.patch @@ -0,0 +1,69 @@ +From acbaee34bcb1881db97969dd2c411446f32ca4cc Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 25 Oct 2014 19:45:33 +0200 +Subject: [PATCH 3/5] Fix debug mode build with uClibc + +When --enable-debug is passed, liblog4c-localtime wants to use +. It takes the precaution of testing if __GLIBC__ is +defined. But unfortunately, the uClibc C library pretends to be +compatible with glibc by defining __GLIBC__, but it doesn't provide +mcheck.h. + +To better support this situation, we add an AC_CHECK_HEADERS() check +on mcheck.h, and then use HAVE_MCHECK_H were appropriate. + +Submitted upstream: https://github.com/rcmadruga/log4c-localtime/pull/1 + +Signed-off-by: Thomas Petazzoni +--- + configure.in | 2 +- + src/log4c/init.c | 6 +++--- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/configure.in b/configure.in +index 612ccbe..dbf11e9 100644 +--- a/configure.in ++++ b/configure.in +@@ -115,7 +115,7 @@ AM_CONDITIONAL(TEST, test x$enable_test = xyes) + AC_HEADER_STDC + AC_CHECK_HEADERS([fcntl.h inttypes.h langinfo.h limits.h stddef.h stdint.h \ + stdlib.h string.h sys/time.h syslog.h unistd.h stdarg.h varargs.h getopt.h \ +-pthread.h]) ++pthread.h mcheck.h]) + + # Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +diff --git a/src/log4c/init.c b/src/log4c/init.c +index 7dd9eb4..4b88210 100644 +--- a/src/log4c/init.c ++++ b/src/log4c/init.c +@@ -35,7 +35,7 @@ static const char version[] = "$Id$"; + #include + #include + +-#if defined(__LOG4C_DEBUG__) && defined(__GLIBC__) ++#if defined(__LOG4C_DEBUG__) && defined(HAVE_MCHECK_H) + #include + #endif + +@@ -100,7 +100,7 @@ extern int log4c_init(void) + sd_debug("log4c_init["); + + /* activate GLIBC allocation debugging */ +-#if defined(__LOG4C_DEBUG__) && defined(__GLIBC__) ++#if defined(__LOG4C_DEBUG__) && defined(HAVE_MCHECK_H) + mtrace(); + #endif + +@@ -280,7 +280,7 @@ extern int log4c_fini(void) + log4c_dump_all_instances(stderr); + } + #endif +-#if defined(__LOG4C_DEBUG__) && defined(__GLIBC__) ++#if defined(__LOG4C_DEBUG__) && defined(HAVE_MCHECK_H) + muntrace(); + #endif + +-- +2.0.0 + diff --git a/package/liblog4c-localtime/0004-Add-AC_CONFIG_MACRO_DIR-to-configure.in.patch b/package/liblog4c-localtime/0004-Add-AC_CONFIG_MACRO_DIR-to-configure.in.patch new file mode 100644 index 0000000000..479eb3987f --- /dev/null +++ b/package/liblog4c-localtime/0004-Add-AC_CONFIG_MACRO_DIR-to-configure.in.patch @@ -0,0 +1,30 @@ +From a2553c203d8b8257dea1d2e2139b220935587144 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 25 Oct 2014 20:03:25 +0200 +Subject: [PATCH 4/5] Add AC_CONFIG_MACRO_DIR to configure.in + +Without AC_CONFIG_MACRO_DIR, when autoreconfiguring the package, it +cannot find AM_PATH_EXPAT which is defined in config/expat.m4. + +Submitted upstream: https://github.com/rcmadruga/log4c-localtime/pull/1 + +Signed-off-by: Thomas Petazzoni +--- + configure.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.in b/configure.in +index dbf11e9..769b204 100644 +--- a/configure.in ++++ b/configure.in +@@ -5,6 +5,7 @@ AC_PREREQ(2.57) + AC_INIT + AC_CONFIG_SRCDIR([configure.in]) + AC_CONFIG_AUX_DIR(config) ++AC_CONFIG_MACRO_DIR([config]) + AM_CONFIG_HEADER(src/config.h) + + LOG4C_MAJOR_VERSION=1 +-- +2.0.0 + diff --git a/package/liblog4c-localtime/0005-Fix-C-support.patch b/package/liblog4c-localtime/0005-Fix-C-support.patch new file mode 100644 index 0000000000..6ba25c36ff --- /dev/null +++ b/package/liblog4c-localtime/0005-Fix-C-support.patch @@ -0,0 +1,61 @@ +From bdccec4c374a93480a7fd303d15e20810a5d5b7e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 25 Oct 2014 21:22:40 +0200 +Subject: [PATCH 5/5] Fix C++ support + +Autoreconf fails with the following message: + +tests/log4c/Makefile.am: error: C++ source seen but 'CXX' is undefined + +So this commit adds the AC_PROG_CXX macro to configure.in, and ensures +that the C++ test is only built if a C++ compiler is available. + +Submitted upstream: https://github.com/rcmadruga/log4c-localtime/pull/1 + +Signed-off-by: Thomas Petazzoni +--- + configure.in | 3 +++ + tests/log4c/Makefile.am | 6 +++++- + 2 files changed, 8 insertions(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index 769b204..ce75800 100644 +--- a/configure.in ++++ b/configure.in +@@ -38,6 +38,7 @@ AC_DEFINE(_GNU_SOURCE,1,"POSIXandGNU extensions") + #. + AC_PROG_YACC + AC_PROG_CC ++AC_PROG_CXX + AC_PROG_CPP + AM_PROG_LEX + AC_PROG_AWK +@@ -47,6 +48,8 @@ AC_PROG_MAKE_SET + AC_PROG_RANLIB + AC_PROG_LIBTOOL + ++AM_CONDITIONAL([USE_CXX], [test "$ac_cv_prog_CXX" != "no"]) ++ + # platform idioms + case "$host" in + *-hp-hpux*) +diff --git a/tests/log4c/Makefile.am b/tests/log4c/Makefile.am +index f647f27..b1b4ed6 100644 +--- a/tests/log4c/Makefile.am ++++ b/tests/log4c/Makefile.am +@@ -3,7 +3,11 @@ INCLUDES = \ + -DSRCDIR="\"$(srcdir)\"" + + noinst_PROGRAMS = test_category test_rc bench bench_fwrite \ +- test_stream2 test_layout_r cpp_compile_test ++ test_stream2 test_layout_r ++ ++if USE_CXX ++noinst_PROGRAMS += cpp_compile_test ++endif + + if WITH_ROLLINGFILE + noinst_PROGRAMS += test_rollingfile_appender test_rollingfile_appender_mt +-- +2.0.0 + diff --git a/package/liblog4c-localtime/Config.in b/package/liblog4c-localtime/Config.in new file mode 100644 index 0000000000..a2b7a843f1 --- /dev/null +++ b/package/liblog4c-localtime/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBLOG4C_LOCALTIME + bool "liblog4c-localtime" + select BR2_PACKAGE_EXPAT + help + Log4c is a library of C for flexible logging to files, syslog + and other destinations. + This version is with localtime patch, to make lib show times in + local timezone. + + https://github.com/rcmadruga/log4c-localtime + http://log4c.sourceforge.net/ diff --git a/package/liblog4c-localtime/liblog4c-localtime.mk b/package/liblog4c-localtime/liblog4c-localtime.mk new file mode 100644 index 0000000000..bc6d1ab506 --- /dev/null +++ b/package/liblog4c-localtime/liblog4c-localtime.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# liblog4c-localtime +# +################################################################################ + +LIBLOG4C_LOCALTIME_VERSION = v1.0 +LIBLOG4C_LOCALTIME_SITE = $(call github,rcmadruga,log4c-localtime,$(LIBLOG4C_LOCALTIME_VERSION)) +LIBLOG4C_LOCALTIME_INSTALL_STAGING = YES +LIBLOG4C_LOCALTIME_CONF_OPTS = --disable-expattest +LIBLOG4C_LOCALTIME_DEPENDENCIES = expat +LIBLOG4C_LOCALTIME_CONFIG_SCRIPTS = log4c-config +LIBLOG4C_LOCALTIME_LICENSE = LGPLv2.1 +LIBLOG4C_LOCALTIME_LICENSE_FILES = COPYING +LIBLOG4C_LOCALTIME_AUTORECONF = YES + +define LIBLOG4C_LOCALTIME_FIX_CONFIGURE_PERMS + chmod +x $(@D)/configure +endef + +LIBLOG4C_LOCALTIME_PRE_CONFIGURE_HOOKS += LIBLOG4C_LOCALTIME_FIX_CONFIGURE_PERMS + +$(eval $(autotools-package)) diff --git a/package/liblogging/Config.in b/package/liblogging/Config.in new file mode 100644 index 0000000000..12ee950dc8 --- /dev/null +++ b/package/liblogging/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBLOGGING + bool "liblogging" + select BR2_PACKAGE_SYSTEMD_COMPAT if BR2_INIT_SYSTEMD + help + Liblogging is an easy to use library for + logging. It offers an enhanced replacement + for the syslog() call, but retains its ease of use. + + http://www.liblogging.org/ diff --git a/package/liblogging/liblogging.hash b/package/liblogging/liblogging.hash new file mode 100644 index 0000000000..f5674a1c6d --- /dev/null +++ b/package/liblogging/liblogging.hash @@ -0,0 +1,2 @@ +# From http://www.liblogging.org/ +sha256 310dc1691279b7a669d383581fe4b0babdc7bf75c9b54a24e51e60428624890b liblogging-1.0.5.tar.gz diff --git a/package/liblogging/liblogging.mk b/package/liblogging/liblogging.mk new file mode 100644 index 0000000000..9ef2e28b7e --- /dev/null +++ b/package/liblogging/liblogging.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# liblogging +# +################################################################################ + +LIBLOGGING_VERSION = 1.0.5 +LIBLOGGING_SITE = http://download.rsyslog.com/liblogging +LIBLOGGING_LICENSE = BSD-2c +LIBLOGGING_LICENSE_FILES = COPYING +LIBLOGGING_INSTALL_STAGING = YES +LIBLOGGING_CONF_OPTS = --enable-cached-man-pages + +ifeq ($(BR2_INIT_SYSTEMD),y) +LIBLOGGING_CONF_OPTS += --enable-journal +LIBLOGGING_DEPENDENCIES += systemd +else +LIBLOGGING_CONF_OPTS += --disable-journal +endif + +$(eval $(autotools-package)) diff --git a/package/libmad/0001-mips-h-constraint-removal.patch b/package/libmad/0001-mips-h-constraint-removal.patch new file mode 100644 index 0000000000..095858717e --- /dev/null +++ b/package/libmad/0001-mips-h-constraint-removal.patch @@ -0,0 +1,72 @@ +http://patchwork.openembedded.org/patch/921/ + +diff -ur libmad-0.15.1b-orig/fixed.h libmad-0.15.1b/fixed.h +--- libmad-0.15.1b-orig/fixed.h 2004-02-17 12:32:03.000000000 +1030 ++++ libmad-0.15.1b/fixed.h 2009-08-05 10:46:30.000000000 +0930 +@@ -299,6 +299,23 @@ + + # elif defined(FPM_MIPS) + ++/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ ++#if defined (__GNUC__) && defined (__GNUC_MINOR__) ++#define __GNUC_PREREQ(maj, min) \ ++ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) ++#else ++#define __GNUC_PREREQ(maj, min) 0 ++#endif ++ ++#if __GNUC_PREREQ(4,4) ++ typedef unsigned int u64_di_t __attribute__ ((mode (DI))); ++# define MAD_F_MLX(hi, lo, x, y) \ ++ do { \ ++ u64_di_t __ll = (u64_di_t) (x) * (y); \ ++ hi = __ll >> 32; \ ++ lo = __ll; \ ++ } while (0) ++#else + /* + * This MIPS version is fast and accurate; the disposition of the least + * significant bit depends on OPT_ACCURACY via mad_f_scale64(). +@@ -328,6 +345,7 @@ + : "%r" ((x) >> 12), "r" ((y) >> 16)) + # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo)) + # endif ++#endif /* __GNU_PREREQ(4,4) */ + + # if defined(OPT_SPEED) + # define mad_f_scale64(hi, lo) \ +diff -ur libmad-0.15.1b-orig/mad.h libmad-0.15.1b/mad.h +--- libmad-0.15.1b-orig/mad.h 2004-02-17 13:25:44.000000000 +1030 ++++ libmad-0.15.1b/mad.h 2009-08-05 10:42:40.000000000 +0930 +@@ -344,6 +344,23 @@ + + # elif defined(FPM_MIPS) + ++/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */ ++#if defined (__GNUC__) && defined (__GNUC_MINOR__) ++#define __GNUC_PREREQ(maj, min) \ ++ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) ++#else ++#define __GNUC_PREREQ(maj, min) 0 ++#endif ++ ++#if __GNUC_PREREQ(4,4) ++ typedef unsigned int u64_di_t __attribute__ ((mode (DI))); ++# define MAD_F_MLX(hi, lo, x, y) \ ++ do { \ ++ u64_di_t __ll = (u64_di_t) (x) * (y); \ ++ hi = __ll >> 32; \ ++ lo = __ll; \ ++ } while (0) ++#else + /* + * This MIPS version is fast and accurate; the disposition of the least + * significant bit depends on OPT_ACCURACY via mad_f_scale64(). +@@ -373,6 +390,7 @@ + : "%r" ((x) >> 12), "r" ((y) >> 16)) + # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo)) + # endif ++#endif /* __GNU_PREREQ(4,4) */ + + # if defined(OPT_SPEED) + # define mad_f_scale64(hi, lo) \ diff --git a/package/libmad/0003-remove-deprecated-cflags.patch b/package/libmad/0003-remove-deprecated-cflags.patch new file mode 100644 index 0000000000..e5040830f9 --- /dev/null +++ b/package/libmad/0003-remove-deprecated-cflags.patch @@ -0,0 +1,33 @@ +libmad: remove deprecated cflags (-fforce-mem) + +fforce-mem has long been deprecated, and is completely removed from +gcc 4.3.x on. +--- + configure | 1 - + configure.ac | 1 - + 2 files changed, 2 deletions(-) + +Index: libmad-0.15.1b/configure.ac +=================================================================== +--- libmad-0.15.1b.orig/configure.ac ++++ libmad-0.15.1b/configure.ac +@@ -140,7 +140,6 @@ + case "$optimize" in + -O|"-O "*) + optimize="-O" +- optimize="$optimize -fforce-mem" + optimize="$optimize -fforce-addr" + : #x optimize="$optimize -finline-functions" + : #- optimize="$optimize -fstrength-reduce" +Index: libmad-0.15.1b/configure +=================================================================== +--- libmad-0.15.1b.orig/configure ++++ libmad-0.15.1b/configure +@@ -19099,7 +19099,6 @@ + case "$optimize" in + -O|"-O "*) + optimize="-O" +- optimize="$optimize -fforce-mem" + optimize="$optimize -fforce-addr" + : #x optimize="$optimize -finline-functions" + : #- optimize="$optimize -fstrength-reduce" diff --git a/package/libmad/0004-thumb2-fixed-arm.patch b/package/libmad/0004-thumb2-fixed-arm.patch new file mode 100644 index 0000000000..befda48d7e --- /dev/null +++ b/package/libmad/0004-thumb2-fixed-arm.patch @@ -0,0 +1,40 @@ +Fixes Thumb2-related build failure + +Patch below comes from the Debian libmad package. + +Signed-off-by: Thomas Petazzoni + +From: Dave Martin +Subject: "rsc" doesnt exist anymore in thumb2 + +diff --git a/fixed.h b/fixed.h +index 4b58abf..ba4bc26 100644 +--- a/fixed.h ++++ b/fixed.h +@@ -275,12 +275,25 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y) + : "+r" (lo), "+r" (hi) \ + : "%r" (x), "r" (y)) + ++#ifdef __thumb__ ++/* In Thumb-2, the RSB-immediate instruction is only allowed with a zero ++ operand. If needed this code can also support Thumb-1 ++ (simply append "s" to the end of the second two instructions). */ ++# define MAD_F_MLN(hi, lo) \ ++ asm ("rsbs %0, %0, #0\n\t" \ ++ "sbc %1, %1, %1\n\t" \ ++ "sub %1, %1, %2" \ ++ : "+&r" (lo), "=&r" (hi) \ ++ : "r" (hi) \ ++ : "cc") ++#else /* ! __thumb__ */ + # define MAD_F_MLN(hi, lo) \ + asm ("rsbs %0, %2, #0\n\t" \ + "rsc %1, %3, #0" \ +- : "=r" (lo), "=r" (hi) \ ++ : "=&r" (lo), "=r" (hi) \ + : "0" (lo), "1" (hi) \ + : "cc") ++#endif /* __thumb__ */ + + # define mad_f_scale64(hi, lo) \ + ({ mad_fixed_t __result; \ diff --git a/package/libmad/0005-thumb2-imdct-arm.patch b/package/libmad/0005-thumb2-imdct-arm.patch new file mode 100644 index 0000000000..414b9c8fcf --- /dev/null +++ b/package/libmad/0005-thumb2-imdct-arm.patch @@ -0,0 +1,20 @@ +Fixes Thumb2 related build failure + +Patch below comes from the Debian libmad package. + +Signed-off-by: Thomas Petazzoni + +From: Konstantinos Margaritis +Subject: use "adr" instead of "add" to make code ready for thumb2 + +--- ./imdct_l_arm.S.orig 2010-02-25 13:25:23.000000000 +0100 ++++ ./imdct_l_arm.S 2010-02-25 13:27:26.000000000 +0100 +@@ -468,7 +468,7 @@ + + @---- + +- add r2, pc, #(imdct36_long_karray-.-8) @ r2 = base address of Knn array (PIC safe ?) ++ adr r2, imdct36_long_karray + + + loop: diff --git a/package/libmad/Config.in b/package/libmad/Config.in new file mode 100644 index 0000000000..7d66976c1b --- /dev/null +++ b/package/libmad/Config.in @@ -0,0 +1,49 @@ +config BR2_PACKAGE_LIBMAD + bool "libmad" + help + High-quality MPEG audio decoder. All computations are performed + with fixed-point integer arithmetic, making it ideal for systems + without a floating-point unit. + + http://www.underbit.com/products/mad/ + +if BR2_PACKAGE_LIBMAD + +choice + prompt "Speed vs. accuracy" + default BR2_PACKAGE_LIBMAD_OPTIMIZATION_DEFAULT + +config BR2_PACKAGE_LIBMAD_OPTIMIZATION_DEFAULT + bool "Default" + help + Keep optimizations balanced between speed and accuracy. + +config BR2_PACKAGE_LIBMAD_OPTIMIZATION_SPEED + bool "Optimize for speed over accuracy" + help + Compromise accuracy for speed. + +config BR2_PACKAGE_LIBMAD_OPTIMIZATION_ACCURACY + bool "Optimize for accuracy over speed" + help + Compromise speed for accuracy. + +endchoice + +config BR2_PACKAGE_LIBMAD_SSO + bool "Subband synthesis optimization" + help + Use the subband synthesis optimization, with reduced accuracy. + +config BR2_PACKAGE_LIBMAD_ASO + bool "Architecture-specific optimizations" + default y + help + Use certain architecture-specific optimizations. + +config BR2_PACKAGE_LIBMAD_STRICT_ISO + bool "Strict ISO/IEC interpretations" + help + Use strict ISO/IEC interpretations. + +endif diff --git a/package/libmad/libmad.hash b/package/libmad/libmad.hash new file mode 100644 index 0000000000..1e555568fe --- /dev/null +++ b/package/libmad/libmad.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 bbfac3ed6bfbc2823d3775ebb931087371e142bb0e9bb1bee51a76a6e0078690 libmad-0.15.1b.tar.gz diff --git a/package/libmad/libmad.mk b/package/libmad/libmad.mk new file mode 100644 index 0000000000..9c152f9721 --- /dev/null +++ b/package/libmad/libmad.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# libmad +# +################################################################################ + +LIBMAD_VERSION = 0.15.1b +LIBMAD_SITE = http://downloads.sourceforge.net/project/mad/libmad/$(LIBMAD_VERSION) +LIBMAD_INSTALL_STAGING = YES +LIBMAD_LIBTOOL_PATCH = NO +LIBMAD_LICENSE = GPLv2+ +LIBMAD_LICENSE_FILES = COPYING + +define LIBMAD_PREVENT_AUTOMAKE + # Prevent automake from running. + (cd $(@D); touch -c config* aclocal.m4 Makefile*); +endef + +define LIBMAD_INSTALL_STAGING_PC + $(INSTALL) -D package/libmad/mad.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/mad.pc +endef + +define LIBMAD_INSTALL_TARGET_PC + $(INSTALL) -D package/libmad/mad.pc \ + $(TARGET_DIR)/usr/lib/pkgconfig/mad.pc +endef + +LIBMAD_POST_PATCH_HOOKS += LIBMAD_PREVENT_AUTOMAKE +LIBMAD_POST_INSTALL_STAGING_HOOKS += LIBMAD_INSTALL_STAGING_PC +LIBMAD_POST_INSTALL_TARGET_HOOKS += LIBMAD_INSTALL_TARGET_PC + +LIBMAD_CONF_OPTS = \ + --disable-debugging \ + $(if $(BR2_PACKAGE_LIBMAD_OPTIMIZATION_SPEED),--enable-speed) \ + $(if $(BR2_PACKAGE_LIBMAD_OPTIMIZATION_ACCURACY),--enable-accuracy) \ + --$(if $(BR2_PACKAGE_LIBMAD_SSO),enable,disable)-sso \ + --$(if $(BR2_PACKAGE_LIBMAD_ASO),enable,disable)-aso \ + --$(if $(BR2_PACKAGE_LIBMAD_STRICT_ISO),enable,disable)-strict-iso + +$(eval $(autotools-package)) diff --git a/package/libmad/mad.pc b/package/libmad/mad.pc new file mode 100644 index 0000000000..14af388661 --- /dev/null +++ b/package/libmad/mad.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: mad +Description: MPEG Audio Decoder +Requires: +Version: 0.15.1b +Libs: -L${libdir} -lmad +Cflags: -I${includedir} diff --git a/package/libmatroska/Config.in b/package/libmatroska/Config.in new file mode 100644 index 0000000000..5815a46c59 --- /dev/null +++ b/package/libmatroska/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBMATROSKA + bool "libmatroska" + select BR2_PACKAGE_LIBEBML + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + help + Extensible open standard audio/video container format access + library. + + http://matroska.org + +comment "libmatroska needs a toolchain w/ C++, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR diff --git a/package/libmatroska/libmatroska.hash b/package/libmatroska/libmatroska.hash new file mode 100644 index 0000000000..275af63995 --- /dev/null +++ b/package/libmatroska/libmatroska.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d3efaa9f6d3964351a05bea0f848a8d5dc570e4791f179816ce9a93730296bd7 libmatroska-1.4.4.tar.bz2 diff --git a/package/libmatroska/libmatroska.mk b/package/libmatroska/libmatroska.mk new file mode 100644 index 0000000000..083cced9ef --- /dev/null +++ b/package/libmatroska/libmatroska.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libmatroska +# +################################################################################ + +LIBMATROSKA_VERSION = 1.4.4 +LIBMATROSKA_SOURCE = libmatroska-$(LIBMATROSKA_VERSION).tar.bz2 +LIBMATROSKA_SITE = http://dl.matroska.org/downloads/libmatroska +LIBMATROSKA_INSTALL_STAGING = YES +LIBMATROSKA_LICENSE = LGPLv2.1+ +LIBMATROSKA_LICENSE_FILES = LICENSE.LGPL +LIBMATROSKA_DEPENDENCIES = libebml host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/libmbim/Config.in b/package/libmbim/Config.in new file mode 100644 index 0000000000..0ef28db125 --- /dev/null +++ b/package/libmbim/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBMBIM + bool "libmbim" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_LIBGUDEV + select BR2_PACKAGE_LIBGLIB2 + help + libmbim is a glib-based library for talking to WWAN modems and + devices which speak the Mobile Interface Broadband Model (MBIM) + protocol. + + http://www.freedesktop.org/wiki/Software/libmbim/ + +comment "libmbim needs udev /dev management and a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_PACKAGE_HAS_UDEV diff --git a/package/libmbim/libmbim.hash b/package/libmbim/libmbim.hash new file mode 100644 index 0000000000..2c10b4f2db --- /dev/null +++ b/package/libmbim/libmbim.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 7bd9af154e88ee1cccaf2fedd05e0f5cb82e3359ab6ad2a75cfec98bf57f973a libmbim-1.12.4.tar.xz diff --git a/package/libmbim/libmbim.mk b/package/libmbim/libmbim.mk new file mode 100644 index 0000000000..746596ed98 --- /dev/null +++ b/package/libmbim/libmbim.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libmbim +# +################################################################################ + +LIBMBIM_VERSION = 1.12.4 +LIBMBIM_SITE = http://www.freedesktop.org/software/libmbim +LIBMBIM_SOURCE = libmbim-$(LIBMBIM_VERSION).tar.xz +LIBMBIM_LICENSE = LGPLv2+ (library), GPLv2+ (programs) +LIBMBIM_LICENSE_FILES = COPYING +LIBMBIM_INSTALL_STAGING = YES + +LIBMBIM_DEPENDENCIES = libglib2 udev libgudev + +# we don't want -Werror +LIBMBIM_CONF_OPTS = --enable-more-warnings=no + +$(eval $(autotools-package)) diff --git a/package/libmbus/Config.in b/package/libmbus/Config.in new file mode 100644 index 0000000000..861406901f --- /dev/null +++ b/package/libmbus/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBMBUS + bool "libmbus" + help + libmbus is a library for communicating with energy metering devices. + It supports TCP and RS232 M-bus gateways. + (M-bus standard: http://www.m-bus.com/) + + http://www.rscada.se/libmbus/ diff --git a/package/libmbus/libmbus.hash b/package/libmbus/libmbus.hash new file mode 100644 index 0000000000..faf6a27ab7 --- /dev/null +++ b/package/libmbus/libmbus.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9fca42592da0ba75df66c6f885a4dbfa916d23e65e3d1ce6e38d940d2a2719a4 libmbus-0.8.0.tar.gz diff --git a/package/libmbus/libmbus.mk b/package/libmbus/libmbus.mk new file mode 100644 index 0000000000..75aaa8dcfb --- /dev/null +++ b/package/libmbus/libmbus.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libmbus +# +################################################################################ + +LIBMBUS_VERSION = 0.8.0 +LIBMBUS_SITE = http://www.rscada.se/public-dist +LIBMBUS_INSTALL_STAGING = YES +LIBMBUS_LICENSE = BSD-3c +LIBMBUS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libmcrypt/0001-nocxx.patch b/package/libmcrypt/0001-nocxx.patch new file mode 100644 index 0000000000..b1c28713a1 --- /dev/null +++ b/package/libmcrypt/0001-nocxx.patch @@ -0,0 +1,15 @@ +libmcrypt doesn't use C++ so remove the check. + +Signed-off-by: Gustavo Zacarias + +diff -Nura libmcrypt-2.5.8.orig/configure.in libmcrypt-2.5.8/configure.in +--- libmcrypt-2.5.8.orig/configure.in 2013-01-07 12:20:44.332200669 -0300 ++++ libmcrypt-2.5.8/configure.in 2013-01-07 12:20:50.405390565 -0300 +@@ -19,7 +19,6 @@ + + AC_PROG_MAKE_SET + +-AC_PROG_CXX + AC_PROG_CC + AC_PROG_CPP + AC_PROG_INSTALL diff --git a/package/libmcrypt/Config.in b/package/libmcrypt/Config.in new file mode 100644 index 0000000000..e5dc5e23a9 --- /dev/null +++ b/package/libmcrypt/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBMCRYPT + bool "libmcrypt" + help + libmcrypt is a library that provides uniform interface to access + several encryption algorithms. + + http://mcrypt.sourceforge.net/ diff --git a/package/libmcrypt/libmcrypt.hash b/package/libmcrypt/libmcrypt.hash new file mode 100644 index 0000000000..d0d3a9c977 --- /dev/null +++ b/package/libmcrypt/libmcrypt.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e4eb6c074bbab168ac47b947c195ff8cef9d51a211cdd18ca9c9ef34d27a373e libmcrypt-2.5.8.tar.gz diff --git a/package/libmcrypt/libmcrypt.mk b/package/libmcrypt/libmcrypt.mk new file mode 100644 index 0000000000..1a2645bc14 --- /dev/null +++ b/package/libmcrypt/libmcrypt.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libmcrypt +# +################################################################################ + +LIBMCRYPT_VERSION = 2.5.8 +LIBMCRYPT_SITE = http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/$(LIBMCRYPT_VERSION) +LIBMCRYPT_AUTORECONF = YES +LIBMCRYPT_INSTALL_STAGING = YES +LIBMCRYPT_LICENSE = LGPLv2.1 +LIBMCRYPT_LICENSE_FILES = COPYING.LIB +LIBMCRYPT_CONFIG_SCRIPTS = libmcrypt-config + +$(eval $(autotools-package)) diff --git a/package/libmemcached/0001-disable-tests.patch b/package/libmemcached/0001-disable-tests.patch new file mode 100644 index 0000000000..6128306787 --- /dev/null +++ b/package/libmemcached/0001-disable-tests.patch @@ -0,0 +1,42 @@ +Disable the tests, cuts build time by half and avoids build issues +with extra dependencies. + +Signed-off-by: Gustavo Zacarias + +diff -Nura libmemcached-1.0.18.orig/Makefile.am libmemcached-1.0.18/Makefile.am +--- libmemcached-1.0.18.orig/Makefile.am 2014-07-19 09:24:45.246418899 -0300 ++++ libmemcached-1.0.18/Makefile.am 2014-07-19 09:25:12.701349345 -0300 +@@ -1,6 +1,6 @@ + # vim:ft=automake + +-ACLOCAL_AMFLAGS= -I m4 -I libtest/m4 ++ACLOCAL_AMFLAGS= -I m4 + AM_YFLAGS= -d + + # includes append to these: +@@ -45,8 +45,6 @@ + include libmemcached-1.0/include.am + else + +-include libtest/include.am +- + include libhashkit-1.0/include.am + include libmemcached-1.0/include.am + +@@ -76,7 +74,6 @@ + include libmemcachedinternal/util/include.am + include rpm/include.mk + include support/include.am +-include tests/include.am + include util/include.am + include win32/include.am + +@@ -103,7 +100,7 @@ + @echo "Files that need to be either removed or checked in:" + @bzr unknowns + +-clean-local: clean-libtest-check clean-docs-check clean-rpm ++clean-local: clean-docs-check clean-rpm + + + lcov: lcov-clean check diff --git a/package/libmemcached/0002-disable-sanitizer.patch b/package/libmemcached/0002-disable-sanitizer.patch new file mode 100644 index 0000000000..108da22550 --- /dev/null +++ b/package/libmemcached/0002-disable-sanitizer.patch @@ -0,0 +1,25 @@ +Disable sanitizer checks, they're busted. + +Signed-off-by: Gustavo Zacarias + +diff -Nura libmemcached-1.0.18.orig/m4/ax_harden_compiler_flags.m4 libmemcached-1.0.18/m4/ax_harden_compiler_flags.m4 +--- libmemcached-1.0.18.orig/m4/ax_harden_compiler_flags.m4 2014-11-13 08:07:09.011614311 -0300 ++++ libmemcached-1.0.18/m4/ax_harden_compiler_flags.m4 2014-11-13 08:07:52.406092440 -0300 +@@ -222,8 +222,6 @@ + # GCC 4.5 removed this. + # _APPEND_COMPILE_FLAGS_ERROR([-Wunreachable-code]) + +- _SET_SANITIZE_FLAGS +- + AS_IF([test "x$ax_enable_debug" = xno], + [AS_IF([test "x$ac_cv_vcs_checkout" = xyes], + [AS_IF([test "x${host_os}" != "xmingw"], +@@ -337,8 +335,6 @@ + _APPEND_COMPILE_FLAGS_ERROR([-fstack-protector-all]) + ])])])]) + +- _SET_SANITIZE_FLAGS +- + AS_IF([test "x$ac_cv_warnings_as_errors" = xyes], + [AX_APPEND_FLAG([-Werror])]) + AC_LANG_POP([C++]) diff --git a/package/libmemcached/0003-move-ac_config_aux_dir.patch b/package/libmemcached/0003-move-ac_config_aux_dir.patch new file mode 100644 index 0000000000..790aa93d29 --- /dev/null +++ b/package/libmemcached/0003-move-ac_config_aux_dir.patch @@ -0,0 +1,25 @@ +Move AC_CONFIG_AUX_DIR up a few lines so the autotools can find it + +This patch is based on the same solution adopted by Debian: + + https://lists.debian.org/debian-release/2014/11/msg01231.html + +Signed-off-by: Vicente Olivert Riera + +diff -rup a/configure.ac b/configure.ac +--- a/configure.ac 2014-02-09 11:52:42.000000000 +0000 ++++ b/configure.ac 2015-01-06 15:07:10.003074775 +0000 +@@ -13,11 +13,12 @@ m4_include([version.m4]) + AC_PREREQ([2.61]) + AC_INIT([libmemcached],VERSION_NUMBER,[http://libmemcached.org/]) + ++AC_CONFIG_AUX_DIR([build-aux]) ++ + # Setup the compilers early on + AC_PROG_CC([cc gcc clang]) + AC_PROG_CXX([c++ g++ clang++]) + +-AC_CONFIG_AUX_DIR([build-aux]) + AC_CONFIG_MACRO_DIR([m4]) + + AC_CANONICAL_HOST diff --git a/package/libmemcached/0004-disable-doc-and-man.patch b/package/libmemcached/0004-disable-doc-and-man.patch new file mode 100644 index 0000000000..9605095899 --- /dev/null +++ b/package/libmemcached/0004-disable-doc-and-man.patch @@ -0,0 +1,37 @@ +From 6c01bd3562cc18fbafdf950bbeb73a399c1adcdd Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Tue, 12 May 2015 00:00:02 +0200 +Subject: [PATCH] disable doc and man + +WARNING: master file /home/naourr/git/buildroot/test/libmemcached-bfin/build/libmemcached-1.0.18/docs/index.rst not found + +Exception occurred: + File "/usr/lib/python2.7/site-packages/sphinx/environment.py", line 1213, in get_doctree + f = open(doctree_filename, 'rb') +IOError: [Errno 2] No such file or directory: '/home/naourr/buildroot-test/test/libmemcached-bfin/build/libmemcached-1.0.18/man/.doctrees/hashkit_create.doctree' +The full traceback has been saved in /tmp/sphinx-err-JCIsnB.log, if you want to report the issue to the developers. +Please also report this if it was a user error, so that a better error message can be provided next time. +Either send bugs to the mailing list at , +or report them in the tracker at . Thanks! + +Signed-off-by: Romain Naour +--- + Makefile.am | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 7f44102..cb7d058 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -55,8 +55,6 @@ endif + include libmemcachedutil-1.0/include.am + + include clients/include.am +-include docs/include.am +-include man/include.am + + if BUILD_LIBMEMCACHED_PROTOCOL + include example/include.am +-- +1.9.3 + diff --git a/package/libmemcached/Config.in b/package/libmemcached/Config.in new file mode 100644 index 0000000000..4af2b3b0e7 --- /dev/null +++ b/package/libmemcached/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBMEMCACHED + bool "libmemcached" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + libMemcached is an open source C/C++ client library and tools + for the memcached server. + It has been designed to be light on memory usage, thread safe, + and provide full access to server side methods. + + http://libmemcached.org/libMemcached.html + +comment "libmemcached needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libmemcached/libmemcached.hash b/package/libmemcached/libmemcached.hash new file mode 100644 index 0000000000..85df58f01e --- /dev/null +++ b/package/libmemcached/libmemcached.hash @@ -0,0 +1,2 @@ +# From https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz/+md5 +md5 b3958716b4e53ddc5992e6c49d97e819 libmemcached-1.0.18.tar.gz diff --git a/package/libmemcached/libmemcached.mk b/package/libmemcached/libmemcached.mk new file mode 100644 index 0000000000..a5ea4f5d3e --- /dev/null +++ b/package/libmemcached/libmemcached.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# libmemcached +# +################################################################################ + +LIBMEMCACHED_VERSION_MAJOR = 1.0 +LIBMEMCACHED_VERSION = $(LIBMEMCACHED_VERSION_MAJOR).18 +LIBMEMCACHED_SITE = http://launchpad.net/libmemcached/$(LIBMEMCACHED_VERSION_MAJOR)/$(LIBMEMCACHED_VERSION)/+download +LIBMEMCACHED_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' \ + ax_cv_check_cflags__Werror__fmudflapth=no \ + ax_cv_check_cxxflags__Werror__fmudflapth=no +LIBMEMCACHED_CONF_OPTS = --disable-dtrace +LIBMEMCACHED_INSTALL_STAGING = YES +LIBMEMCACHED_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBEVENT),libevent) +# For 0001-disable-tests.patch and 0002-disable-sanitizer.patch +LIBMEMCACHED_AUTORECONF = YES +LIBMEMCACHED_LICENSE = BSD-3c +LIBMEMCACHED_LICENSE_FILES = COPYING + +# Help libmemcached to understand that -fPIE and -pie should not be +# used when linking statically. +ifeq ($(BR2_STATIC_LIBS),y) +LIBMEMCACHED_CONF_ENV += \ + ax_cv_check_cflags__Werror__fPIE=no \ + ax_cv_check_cflags__Werror__pie=no \ + ax_cv_check_cxxflags__Werror__fPIE=no \ + ax_cv_check_cxxflags__Werror__pie=no +endif + +$(eval $(autotools-package)) diff --git a/package/libmhash/Config.in b/package/libmhash/Config.in new file mode 100644 index 0000000000..a9bd51a2c9 --- /dev/null +++ b/package/libmhash/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBMHASH + bool "libmhash" + help + Mhash is a free (under GNU Lesser GPL) library which provides + a uniform interface to a large number of hash algorithms. + These algorithms can be used to compute checksums, message digests, + and other signatures. + + http://mhash.sourceforge.net/ diff --git a/package/libmhash/libmhash.hash b/package/libmhash/libmhash.hash new file mode 100644 index 0000000000..5ae5686652 --- /dev/null +++ b/package/libmhash/libmhash.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 56521c52a9033779154432d0ae47ad7198914785265e1f570cee21ab248dfef0 mhash-0.9.9.9.tar.bz2 diff --git a/package/libmhash/libmhash.mk b/package/libmhash/libmhash.mk new file mode 100644 index 0000000000..f7b8e72997 --- /dev/null +++ b/package/libmhash/libmhash.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libmhash +# +################################################################################ + +LIBMHASH_VERSION = 0.9.9.9 +LIBMHASH_SITE = http://downloads.sourceforge.net/project/mhash/mhash/$(LIBMHASH_VERSION) +LIBMHASH_SOURCE = mhash-$(LIBMHASH_VERSION).tar.bz2 +LIBMHASH_INSTALL_STAGING = YES +LIBMHASH_LICENSE = LGPLv2 +LIBMHASH_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libmicrohttpd/Config.in b/package/libmicrohttpd/Config.in new file mode 100644 index 0000000000..ec0b715fb5 --- /dev/null +++ b/package/libmicrohttpd/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_LIBMICROHTTPD + bool "libmicrohttpd" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + GNU libmicrohttpd is a small C library that makes it easy to + run an HTTP server as part of another application. + + http://www.gnu.org/software/libmicrohttpd/ + +if BR2_PACKAGE_LIBMICROHTTPD + +config BR2_PACKAGE_LIBMICROHTTPD_SSL + bool "https support" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_LIBGCRYPT + help + Enable HTTPS (SSL) support. + +comment "libmicrohttpd https support needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +endif + +comment "libmicrohttpd needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libmicrohttpd/libmicrohttpd.hash b/package/libmicrohttpd/libmicrohttpd.hash new file mode 100644 index 0000000000..f0f15012ff --- /dev/null +++ b/package/libmicrohttpd/libmicrohttpd.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 87667e158f2bf8c691a002e256ffe30885d4121a9ee4143af0320c47cdf8a2a4 libmicrohttpd-0.9.48.tar.gz diff --git a/package/libmicrohttpd/libmicrohttpd.mk b/package/libmicrohttpd/libmicrohttpd.mk new file mode 100644 index 0000000000..9c41b89405 --- /dev/null +++ b/package/libmicrohttpd/libmicrohttpd.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libmicrohttpd +# +################################################################################ + +LIBMICROHTTPD_VERSION = 0.9.48 +LIBMICROHTTPD_SITE = $(BR2_GNU_MIRROR)/libmicrohttpd +LIBMICROHTTPD_LICENSE_FILES = COPYING +LIBMICROHTTPD_INSTALL_STAGING = YES +LIBMICROHTTPD_CONF_OPTS = --disable-curl --disable-examples + +ifeq ($(BR2_PACKAGE_LIBMICROHTTPD_SSL),y) +LIBMICROHTTPD_LICENSE = LGPLv2.1+ +LIBMICROHTTPD_DEPENDENCIES += host-pkgconf gnutls libgcrypt +LIBMICROHTTPD_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs gnutls`" +LIBMICROHTTPD_CONF_OPTS += --enable-https --with-gnutls=$(STAGING_DIR)/usr \ + --with-libgcrypt-prefix=$(STAGING_DIR)/usr +else +LIBMICROHTTPD_LICENSE = LGPLv2.1+ or eCos +LIBMICROHTTPD_CONF_OPTS += --disable-https +endif + +$(eval $(autotools-package)) diff --git a/package/libmms/Config.in b/package/libmms/Config.in new file mode 100644 index 0000000000..11df6e5142 --- /dev/null +++ b/package/libmms/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBMMS + bool "libmms" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + help + LibMMS is a common library for parsing mms:// and mmsh:// + type network streams. These are commonly used to stream + Windows Media Video content over the web. LibMMS itself is + only for receiving MMS stream, it doesn't handle sending at + all. + + http://launchpad.net/libmms + +comment "libmms needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libmms/libmms.hash b/package/libmms/libmms.hash new file mode 100644 index 0000000000..69865f7c3e --- /dev/null +++ b/package/libmms/libmms.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 01931b62172d7d7050fc9ef9b1b64162f3b6e9f6cc4415170192a32a0b7ea432 libmms-0.6.2.tar.gz diff --git a/package/libmms/libmms.mk b/package/libmms/libmms.mk new file mode 100644 index 0000000000..01c8d67224 --- /dev/null +++ b/package/libmms/libmms.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libmms +# +################################################################################ + +LIBMMS_VERSION = 0.6.2 +LIBMMS_SITE = http://downloads.sourceforge.net/project/libmms/libmms/$(LIBMMS_VERSION) +LIBMMS_INSTALL_STAGING = YES +LIBMMS_DEPENDENCIES = host-pkgconf libglib2 +LIBMMS_LICENSE = LGPLv2.1+ +LIBMMS_LICENSE_FILES = COPYING.LIB + +$(eval $(autotools-package)) diff --git a/package/libmng/0001-jpeg-9a.patch b/package/libmng/0001-jpeg-9a.patch new file mode 100644 index 0000000000..5d651335c1 --- /dev/null +++ b/package/libmng/0001-jpeg-9a.patch @@ -0,0 +1,22 @@ +Adaptation from gentoo patch for libmng 2.0.3 +See https://bugs.gentoo.org/show_bug.cgi?id=520906 + +Signed-off-by: Gustavo Zacarias + +diff -Nura libmng-2.0.3.orig/libmng_types.h libmng-2.0.3/libmng_types.h +--- libmng-2.0.3.orig/libmng_types.h 2015-09-24 10:32:05.500984924 -0300 ++++ libmng-2.0.3/libmng_types.h 2015-09-24 10:33:11.145254771 -0300 +@@ -200,13 +200,6 @@ + #undef FAR /* possibly defined by zlib or lcms */ + #endif + #define JPEG_INTERNAL_OPTIONS /* for RGB_PIXELSIZE */ +-/* There has been a change in jpeg-9 : */ +-#if !defined(HAVE_BOOLEAN) && !defined(_WIN32) +-#define HAVE_BOOLEAN +-#endif +-#ifndef _WIN32 +-typedef int boolean; +-#endif + /* For jpegsrc.v09a: */ + #include + #include diff --git a/package/libmng/Config.in b/package/libmng/Config.in new file mode 100644 index 0000000000..a0bd59c839 --- /dev/null +++ b/package/libmng/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBMNG + bool "libmng" + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_ZLIB + help + The reference library for reading, displaying, writing and + examining Multiple-Image Network Graphics. + + http://sourceforge.net/projects/libmng/ diff --git a/package/libmng/libmng.hash b/package/libmng/libmng.hash new file mode 100644 index 0000000000..a695cc3706 --- /dev/null +++ b/package/libmng/libmng.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/libmng/files/libmng-devel/2.0.3/ +md5 e9e899adb1b681b17f14d91e261878c5 libmng-2.0.3.tar.xz +sha1 0f141482ffcef6f8cd4413f945a59310ac2e49af libmng-2.0.3.tar.xz diff --git a/package/libmng/libmng.mk b/package/libmng/libmng.mk new file mode 100644 index 0000000000..090fe18380 --- /dev/null +++ b/package/libmng/libmng.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libmng +# +################################################################################ + +LIBMNG_VERSION = 2.0.3 +LIBMNG_SITE = http://downloads.sourceforge.net/project/libmng/libmng-devel/$(LIBMNG_VERSION) +LIBMNG_SOURCE = libmng-$(LIBMNG_VERSION).tar.xz +LIBMNG_DEPENDENCIES = jpeg zlib +LIBMNG_CONF_OPTS = --without-lcms +LIBMNG_INSTALL_STAGING = YES +LIBMNG_LICENSE = libmng license +LIBMNG_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PACKAGE_LCMS2),y) +LIBMNG_DEPDENDENCIES += lcms2 +else +LIBMNG_CONF_OPTS += --without-lcms2 +endif + +$(eval $(autotools-package)) diff --git a/package/libmnl/0001-uclinux.patch b/package/libmnl/0001-uclinux.patch new file mode 100644 index 0000000000..e8f97c6c17 --- /dev/null +++ b/package/libmnl/0001-uclinux.patch @@ -0,0 +1,26 @@ +From ae2acfa7d287e3ffc0bb66091059b86f62775bd5 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 15:24:47 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index dcd3cf8..313a015 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -17,7 +17,7 @@ AC_DISABLE_STATIC + LT_INIT + CHECK_GCC_FVISIBILITY + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libmnl/Config.in b/package/libmnl/Config.in new file mode 100644 index 0000000000..5acfb2447e --- /dev/null +++ b/package/libmnl/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBMNL + bool "libmnl" + help + libmnl is a minimalistic user-space library oriented + to Netlink developers. + + http://netfilter.org/projects/libmnl/ diff --git a/package/libmnl/libmnl.hash b/package/libmnl/libmnl.hash new file mode 100644 index 0000000000..c16dfe7ae6 --- /dev/null +++ b/package/libmnl/libmnl.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/libmnl/libmnl-1.0.3.tar.bz2.{md5sum,sha1sum} +md5 7d95fc3bea3365bc03c48e484224f65f libmnl-1.0.3.tar.bz2 +sha1 c27e25f67c6422ebf893fc3a844af8085a1c5b63 libmnl-1.0.3.tar.bz2 diff --git a/package/libmnl/libmnl.mk b/package/libmnl/libmnl.mk new file mode 100644 index 0000000000..b16c5345c0 --- /dev/null +++ b/package/libmnl/libmnl.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libmnl +# +################################################################################ + +LIBMNL_VERSION = 1.0.3 +LIBMNL_SOURCE = libmnl-$(LIBMNL_VERSION).tar.bz2 +LIBMNL_SITE = http://netfilter.org/projects/libmnl/files +LIBMNL_INSTALL_STAGING = YES +LIBMNL_AUTORECONF = YES +LIBMNL_LICENSE = LGPLv2.1+ +LIBMNL_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libmodbus/Config.in b/package/libmodbus/Config.in new file mode 100644 index 0000000000..ccf11906fc --- /dev/null +++ b/package/libmodbus/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBMODBUS + bool "libmodbus" + help + libmodbus is a free software library to send/receive data according + to the Modbus protocol. This library is written in C and supports + RTU (serial) and TCP (Ethernet) communications. + + http://libmodbus.org diff --git a/package/libmodbus/libmodbus.hash b/package/libmodbus/libmodbus.hash new file mode 100644 index 0000000000..095164d613 --- /dev/null +++ b/package/libmodbus/libmodbus.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 046d63f10f755e2160dc56ef681e5f5ad3862a57c1955fd82e0ce036b69471b6 libmodbus-3.0.6.tar.gz diff --git a/package/libmodbus/libmodbus.mk b/package/libmodbus/libmodbus.mk new file mode 100644 index 0000000000..1f8c730362 --- /dev/null +++ b/package/libmodbus/libmodbus.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libmodbus +# +################################################################################ + +LIBMODBUS_VERSION = 3.0.6 +LIBMODBUS_SITE = http://libmodbus.org/releases +LIBMODBUS_LICENSE = LGPLv2.1+ +LIBMODBUS_LICENSE_FILES = COPYING.LESSER +LIBMODBUS_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libmodplug/Config.in b/package/libmodplug/Config.in new file mode 100644 index 0000000000..cfc774a5de --- /dev/null +++ b/package/libmodplug/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBMODPLUG + bool "libmodplug" + depends on BR2_INSTALL_LIBSTDCPP + help + MOD music file decoder + + http://modplug-xmms.sourceforge.net/ + +comment "libmodplug needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libmodplug/libmodplug.hash b/package/libmodplug/libmodplug.hash new file mode 100644 index 0000000000..0077e26ccd --- /dev/null +++ b/package/libmodplug/libmodplug.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 77462d12ee99476c8645cb5511363e3906b88b33a6b54362b4dbc0f39aa2daad libmodplug-0.8.8.5.tar.gz diff --git a/package/libmodplug/libmodplug.mk b/package/libmodplug/libmodplug.mk new file mode 100644 index 0000000000..d9d74df50c --- /dev/null +++ b/package/libmodplug/libmodplug.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libmodplug +# +################################################################################ + +LIBMODPLUG_VERSION = 0.8.8.5 +LIBMODPLUG_SITE = http://downloads.sourceforge.net/project/modplug-xmms/libmodplug/$(LIBMODPLUG_VERSION) +LIBMODPLUG_INSTALL_STAGING = YES +LIBMODPLUG_LICENSE = Public Domain +LIBMODPLUG_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libmpd/Config.in b/package/libmpd/Config.in new file mode 100644 index 0000000000..1e3b860063 --- /dev/null +++ b/package/libmpd/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBMPD + bool "libmpd" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + High-level client library for accessing Music Player Daemon. + LibMpd is a library that provides high-level, callback-based + access to Music Player Daemon (mpd). + + http://gmpcwiki.sarine.nl/index.php?title=Libmpd + +comment "libmpd needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libmpd/libmpd.hash b/package/libmpd/libmpd.hash new file mode 100644 index 0000000000..ca06c754fb --- /dev/null +++ b/package/libmpd/libmpd.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 fe20326b0d10641f71c4673fae637bf9222a96e1712f71f170fca2fc34bf7a83 libmpd-11.8.17.tar.gz diff --git a/package/libmpd/libmpd.mk b/package/libmpd/libmpd.mk new file mode 100644 index 0000000000..882210cc27 --- /dev/null +++ b/package/libmpd/libmpd.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libmpd +# +################################################################################ + +LIBMPD_VERSION_MAJOR = 11.8 +LIBMPD_VERSION = $(LIBMPD_VERSION_MAJOR).17 +LIBMPD_SITE = http://download.sarine.nl/Programs/gmpc/$(LIBMPD_VERSION_MAJOR) +LIBMPD_INSTALL_STAGING = YES +LIBMPD_DEPENDENCIES = libglib2 +LIBMPD_LICENSE = GPLv2+ +LIBMPD_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libmpdclient/Config.in b/package/libmpdclient/Config.in new file mode 100644 index 0000000000..a58c6c3457 --- /dev/null +++ b/package/libmpdclient/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBMPDCLIENT + bool "libmpdclient" + help + A stable, documented, asynchronous API library for interfacing MPD + in the C, C++ & Objective C languages. + + http://www.musicpd.org/libs/libmpdclient/ diff --git a/package/libmpdclient/libmpdclient.hash b/package/libmpdclient/libmpdclient.hash new file mode 100644 index 0000000000..2fd20a41fb --- /dev/null +++ b/package/libmpdclient/libmpdclient.hash @@ -0,0 +1,2 @@ +# Verified against http://www.musicpd.org/download/libmpdclient/2/libmpdclient-2.10.tar.xz.sig, sha256 locally computed +sha256 4f08cde82dae70895f8e4532a6e9b54b201efd5591c6b5d6834895807ed2ff82 libmpdclient-2.10.tar.xz diff --git a/package/libmpdclient/libmpdclient.mk b/package/libmpdclient/libmpdclient.mk new file mode 100644 index 0000000000..db3ae0596e --- /dev/null +++ b/package/libmpdclient/libmpdclient.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libmpdclient +# +################################################################################ + +LIBMPDCLIENT_VERSION_MAJOR = 2 +LIBMPDCLIENT_VERSION = $(LIBMPDCLIENT_VERSION_MAJOR).10 +LIBMPDCLIENT_SOURCE = libmpdclient-$(LIBMPDCLIENT_VERSION).tar.xz +LIBMPDCLIENT_SITE = http://www.musicpd.org/download/libmpdclient/$(LIBMPDCLIENT_VERSION_MAJOR) +LIBMPDCLIENT_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' +LIBMPDCLIENT_INSTALL_STAGING = YES +LIBMPDCLIENT_LICENSE = BSD-3c +LIBMPDCLIENT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libmpeg2/0001-altivec.patch b/package/libmpeg2/0001-altivec.patch new file mode 100644 index 0000000000..4928a62e6d --- /dev/null +++ b/package/libmpeg2/0001-altivec.patch @@ -0,0 +1,23 @@ +[PATCH] fix altivec.h detection + +Patch from Gentoo: + +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/libmpeg2/files/libmpeg2-0.5.1-altivec.patch?revision=1.1&view=markup + +Signed-off-by: Peter Korsgaard +--- a/configure.ac.bak 2010-05-25 17:12:14.756245990 +0000 ++++ b/configure.ac 2010-05-25 17:11:51.629581723 +0000 +@@ -79,11 +79,10 @@ + CFLAGS="$OPT_CFLAGS $TRY_CFLAGS $CFLAGS" + AC_MSG_CHECKING([if is needed]) + AC_TRY_COMPILE([], +- [typedef vector int t; +- vec_ld(0, (unsigned char *)0);], ++ [vector int t; t = vec_add(t,t);], + [have_altivec=yes; AC_MSG_RESULT(no)], + [AC_TRY_COMPILE([#include ], +- [typedef vector int t; vec_ld(0, (unsigned char *)0);], ++ [vector int t; t = vec_add(t,t);], + [AC_DEFINE([HAVE_ALTIVEC_H],, + [Define to 1 if you have the header.]) + have_altivec=yes; AC_MSG_RESULT(yes)], diff --git a/package/libmpeg2/0002-armv4l.patch b/package/libmpeg2/0002-armv4l.patch new file mode 100644 index 0000000000..70d45ef916 --- /dev/null +++ b/package/libmpeg2/0002-armv4l.patch @@ -0,0 +1,24 @@ +Patch taken from gentoo. + +Signed-off-by: Gustavo Zacarias + +diff -urNp libmpeg2.orig/libmpeg2/motion_comp_arm_s.S libmpeg2/libmpeg2/motion_comp_arm_s.S +--- libmpeg2.orig/libmpeg2/motion_comp_arm_s.S 2008-07-09 21:16:05.000000000 +0200 ++++ libmpeg2/libmpeg2/motion_comp_arm_s.S 2009-11-20 19:55:22.000000000 +0100 +@@ -19,6 +19,16 @@ + @ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + ++@ Data preload is supported only by ARM V5TE and above ++ ++#if (defined (__ARM_ARCH_2__) || defined (__ARM_ARCH_3__) \ ++ || defined (__ARM_ARCH_3M__) || defined (__ARM_ARCH_4__) \ ++ || defined (__ARM_ARCH_4T__) || defined (__ARM_ARCH_5__) \ ++ || defined (__ARM_ARCH_5T__)) ++.macro pld reg ++.endm ++#endif ++ + .text + + @ ---------------------------------------------------------------- diff --git a/package/libmpeg2/Config.in b/package/libmpeg2/Config.in new file mode 100644 index 0000000000..6d7ff67865 --- /dev/null +++ b/package/libmpeg2/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_LIBMPEG2 + bool "libmpeg2" + help + MPEG1/MPEG2 video decoder library + + http://libmpeg2.sourceforge.net/ + +if BR2_PACKAGE_LIBMPEG2 + +config BR2_PACKAGE_LIBMPEG2_BINS + bool "mpeg2 binaries" + help + Install mpeg2dec, corrupt_mpeg2 and extract_mpeg2 programs as + well. + +endif diff --git a/package/libmpeg2/libmpeg2.hash b/package/libmpeg2/libmpeg2.hash new file mode 100644 index 0000000000..c2adb67de0 --- /dev/null +++ b/package/libmpeg2/libmpeg2.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 dee22e893cb5fc2b2b6ebd60b88478ab8556cb3b93f9a0d7ce8f3b61851871d4 libmpeg2-0.5.1.tar.gz diff --git a/package/libmpeg2/libmpeg2.mk b/package/libmpeg2/libmpeg2.mk new file mode 100644 index 0000000000..124c7499db --- /dev/null +++ b/package/libmpeg2/libmpeg2.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# libmpeg2 +# +################################################################################ + +LIBMPEG2_VERSION = 0.5.1 +LIBMPEG2_SITE = http://libmpeg2.sourceforge.net/files +LIBMPEG2_LICENSE = GPLv2+ +LIBMPEG2_LICENSE_FILES = COPYING +LIBMPEG2_INSTALL_STAGING = YES +LIBMPEG2_AUTORECONF = YES +LIBMPEG2_CONF_OPTS = --without-x --disable-directx + +ifeq ($(BR2_PACKAGE_SDL),y) +LIBMPEG2_CONF_ENV += ac_cv_prog_SDLCONFIG=$(STAGING_DIR)/usr/bin/sdl-config +LIBMPEG2_CONF_OPTS += --enable-sdl +LIBMPEG2_DEPENDENCIES += sdl +else +LIBMPEG2_CONF_OPTS += --disable-sdl +endif + +ifneq ($(BR2_PACKAGE_LIBMPEG2_BINS),y) +define LIBMPEG2_REMOVE_BINS + rm -f $(addprefix $(TARGET_DIR)/usr/bin/,\ + mpeg2dec corrupt_mpeg2 extract_mpeg2) +endef + +LIBMPEG2_POST_INSTALL_TARGET_HOOKS += LIBMPEG2_REMOVE_BINS +endif + +$(eval $(autotools-package)) diff --git a/package/libndp/0001-ndptool.c-Fix-musl-build.patch b/package/libndp/0001-ndptool.c-Fix-musl-build.patch new file mode 100644 index 0000000000..547598c6ee --- /dev/null +++ b/package/libndp/0001-ndptool.c-Fix-musl-build.patch @@ -0,0 +1,30 @@ +From 561f80b9a848be923f37bf1afedbecf92da3b2e7 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 30 Jan 2016 16:36:39 +0100 +Subject: [PATCH 1/1] ndptool.c: Fix musl build + +Fixes a build issue with the musl C library +http://autobuild.buildroot.net/results/d42/d42bebe51bbec38f131840b6bbefdc162f0ad194/build-end.log + +Patch sent upstream: https://github.com/jpirko/libndp/pull/7 + +Signed-off-by: Bernd Kuhls +--- + utils/ndptool.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/utils/ndptool.c b/utils/ndptool.c +index 04ec4e1..c6ef48c 100644 +--- a/utils/ndptool.c ++++ b/utils/ndptool.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + + enum verbosity_level { +-- +2.7.0.rc3 + diff --git a/package/libndp/Config.in b/package/libndp/Config.in new file mode 100644 index 0000000000..6639bb5e06 --- /dev/null +++ b/package/libndp/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBNDP + bool "libndp" + help + This package contains a library which provides a wrapper + for IPv6 Neighbor Discovery Protocol. It also provides a tool + named ndptool for sending and receiving NDP messages. + + https://github.com/jpirko/libndp diff --git a/package/libndp/libndp.mk b/package/libndp/libndp.mk new file mode 100644 index 0000000000..c880b7e664 --- /dev/null +++ b/package/libndp/libndp.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libndp +# +################################################################################ + +LIBNDP_VERSION = v1.5 +LIBNDP_SITE = $(call github,jpirko,libndp,$(LIBNDP_VERSION)) +LIBNDP_LICENSE = LGPLv2.1+ +LIBNDP_LICENSE_FILES = COPYING +LIBNDP_AUTORECONF = YES +LIBNDP_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libnet/Config.in b/package/libnet/Config.in new file mode 100644 index 0000000000..8a881286e7 --- /dev/null +++ b/package/libnet/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBNET + bool "libnet" + # Build with musl fails due to header issues + depends on !BR2_TOOLCHAIN_USES_MUSL + help + libnet provides a portable framework for low-level network + packet construction. + + http://sourceforge.net/projects/libnet-dev + +comment "libnet needs a (e)glibc or uClibc toolchain" + depends on BR2_TOOLCHAIN_USES_MUSL diff --git a/package/libnet/libnet.hash b/package/libnet/libnet.hash new file mode 100644 index 0000000000..dd3349082d --- /dev/null +++ b/package/libnet/libnet.hash @@ -0,0 +1,3 @@ +# From https://sourceforge.net/projects/libnet-dev/files/ +sha1 dffff71c325584fdcf99b80567b60f8ad985e34c libnet-1.1.6.tar.gz +md5 710296fe424a49344e5fcc0d09e53317 libnet-1.1.6.tar.gz diff --git a/package/libnet/libnet.mk b/package/libnet/libnet.mk new file mode 100644 index 0000000000..d13c4533b2 --- /dev/null +++ b/package/libnet/libnet.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libnet +# +################################################################################ + +LIBNET_VERSION = 1.1.6 +LIBNET_SITE = http://sourceforge.net/projects/libnet-dev/files +LIBNET_INSTALL_STAGING = YES +# PF_PACKET is always available on Linux +LIBNET_CONF_OPTS = libnet_cv_have_packet_socket=yes +LIBNET_LICENSE = BSD-2c, BSD-3c +LIBNET_LICENSE_FILES = doc/COPYING + +$(eval $(autotools-package)) diff --git a/package/libnetfilter_acct/0001-uclinux.patch b/package/libnetfilter_acct/0001-uclinux.patch new file mode 100644 index 0000000000..070f02cdce --- /dev/null +++ b/package/libnetfilter_acct/0001-uclinux.patch @@ -0,0 +1,26 @@ +From bfcaf00a8c972e2c10412d917f08626eb05079c7 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 15:32:03 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index ad1bef8..24a7bb9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,7 @@ AC_DISABLE_STATIC + LT_INIT + CHECK_GCC_FVISIBILITY + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnetfilter_acct/Config.in b/package/libnetfilter_acct/Config.in new file mode 100644 index 0000000000..ecfef6dc64 --- /dev/null +++ b/package/libnetfilter_acct/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBNETFILTER_ACCT + bool "libnetfilter_acct" + select BR2_PACKAGE_LIBMNL + help + libnetfilter_acct is the userspace library providing interface + to extended accounting infrastructure. + + http://www.netfilter.org/projects/libnetfilter_acct/ diff --git a/package/libnetfilter_acct/libnetfilter_acct.hash b/package/libnetfilter_acct/libnetfilter_acct.hash new file mode 100644 index 0000000000..852617c0b0 --- /dev/null +++ b/package/libnetfilter_acct/libnetfilter_acct.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/libnetfilter_acct/libnetfilter_acct-1.0.2.tar.bz2.{md5sum,sha1sum} +md5 2118d9514c079839ebd9cb3144ad2ad7 libnetfilter_acct-1.0.2.tar.bz2 +sha1 ca0186912b5ee57088a20dd0a5b78606fd6af02e libnetfilter_acct-1.0.2.tar.bz2 diff --git a/package/libnetfilter_acct/libnetfilter_acct.mk b/package/libnetfilter_acct/libnetfilter_acct.mk new file mode 100644 index 0000000000..5adb6e0dfe --- /dev/null +++ b/package/libnetfilter_acct/libnetfilter_acct.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libnetfilter_acct +# +################################################################################ + +LIBNETFILTER_ACCT_VERSION = 1.0.2 +LIBNETFILTER_ACCT_SOURCE = libnetfilter_acct-$(LIBNETFILTER_ACCT_VERSION).tar.bz2 +LIBNETFILTER_ACCT_SITE = http://www.netfilter.org/projects/libnetfilter_acct/files +LIBNETFILTER_ACCT_INSTALL_STAGING = YES +LIBNETFILTER_ACCT_DEPENDENCIES = host-pkgconf libmnl +LIBNETFILTER_ACCT_AUTORECONF = YES +LIBNETFILTER_ACCT_LICENSE = LGPLv2.1+ +LIBNETFILTER_ACCT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnetfilter_conntrack/Config.in b/package/libnetfilter_conntrack/Config.in new file mode 100644 index 0000000000..f9a407ff15 --- /dev/null +++ b/package/libnetfilter_conntrack/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBNETFILTER_CONNTRACK + bool "libnetfilter_conntrack" + select BR2_PACKAGE_LIBMNL + select BR2_PACKAGE_LIBNFNETLINK + help + libnetfilter_conntrack is a userspace library providing + a programming interface (API) to the in-kernel + connection tracking state table. + + http://www.netfilter.org/projects/libnetfilter_conntrack/ diff --git a/package/libnetfilter_conntrack/libnetfilter_conntrack.hash b/package/libnetfilter_conntrack/libnetfilter_conntrack.hash new file mode 100644 index 0000000000..67d1e408a1 --- /dev/null +++ b/package/libnetfilter_conntrack/libnetfilter_conntrack.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/libnetfilter_conntrack/libnetfilter_conntrack-1.0.5.tar.bz2.{md5sum,sha1sum} +md5 6aa1bd3c1d0723235ac897087b4cd4e5 libnetfilter_conntrack-1.0.5.tar.bz2 +sha1 9aed8733d98af39d57fffd929c2bea70f1dcba06 libnetfilter_conntrack-1.0.5.tar.bz2 diff --git a/package/libnetfilter_conntrack/libnetfilter_conntrack.mk b/package/libnetfilter_conntrack/libnetfilter_conntrack.mk new file mode 100644 index 0000000000..33f129404e --- /dev/null +++ b/package/libnetfilter_conntrack/libnetfilter_conntrack.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libnetfilter_conntrack +# +################################################################################ + +LIBNETFILTER_CONNTRACK_VERSION = 1.0.5 +LIBNETFILTER_CONNTRACK_SOURCE = libnetfilter_conntrack-$(LIBNETFILTER_CONNTRACK_VERSION).tar.bz2 +LIBNETFILTER_CONNTRACK_SITE = http://www.netfilter.org/projects/libnetfilter_conntrack/files +LIBNETFILTER_CONNTRACK_INSTALL_STAGING = YES +LIBNETFILTER_CONNTRACK_DEPENDENCIES = host-pkgconf libnfnetlink libmnl +LIBNETFILTER_CONNTRACK_LICENSE = GPLv2+ +LIBNETFILTER_CONNTRACK_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnetfilter_cthelper/0001-uclinux.patch b/package/libnetfilter_cthelper/0001-uclinux.patch new file mode 100644 index 0000000000..7a6ca70b53 --- /dev/null +++ b/package/libnetfilter_cthelper/0001-uclinux.patch @@ -0,0 +1,26 @@ +From d028334281b218209412ec6e1dba56ca96320bd9 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 16:08:29 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d52b1ce..9389b70 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,7 @@ AC_DISABLE_STATIC + LT_INIT + CHECK_GCC_FVISIBILITY + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnetfilter_cthelper/Config.in b/package/libnetfilter_cthelper/Config.in new file mode 100644 index 0000000000..571883df6a --- /dev/null +++ b/package/libnetfilter_cthelper/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBNETFILTER_CTHELPER + bool "libnetfilter_cthelper" + select BR2_PACKAGE_LIBMNL + help + libnetfilter_cthelper is the userspace library that provides + the programming interface to the user-space helper infrastructure + available since Linux kernel 3.6. + + http://www.netfilter.org/projects/libnetfilter_cthelper/ diff --git a/package/libnetfilter_cthelper/libnetfilter_cthelper.hash b/package/libnetfilter_cthelper/libnetfilter_cthelper.hash new file mode 100644 index 0000000000..5108652638 --- /dev/null +++ b/package/libnetfilter_cthelper/libnetfilter_cthelper.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/libnetfilter_cthelper/libnetfilter_cthelper-1.0.0.tar.bz2.{md5sum,sha1sum} +md5 b2efab1a3a198a5add448960ba011acd libnetfilter_cthelper-1.0.0.tar.bz2 +sha1 5d0a82794bd46aafde20c16800edca23d563de66 libnetfilter_cthelper-1.0.0.tar.bz2 diff --git a/package/libnetfilter_cthelper/libnetfilter_cthelper.mk b/package/libnetfilter_cthelper/libnetfilter_cthelper.mk new file mode 100644 index 0000000000..00388a5c99 --- /dev/null +++ b/package/libnetfilter_cthelper/libnetfilter_cthelper.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libnetfilter_cthelper +# +################################################################################ + +LIBNETFILTER_CTHELPER_VERSION = 1.0.0 +LIBNETFILTER_CTHELPER_SOURCE = libnetfilter_cthelper-$(LIBNETFILTER_CTHELPER_VERSION).tar.bz2 +LIBNETFILTER_CTHELPER_SITE = http://www.netfilter.org/projects/libnetfilter_cthelper/files +LIBNETFILTER_CTHELPER_INSTALL_STAGING = YES +LIBNETFILTER_CTHELPER_DEPENDENCIES = host-pkgconf libmnl +LIBNETFILTER_CTHELPER_AUTORECONF = YES +LIBNETFILTER_CTHELPER_LICENSE = GPLv2+ +LIBNETFILTER_CTHELPER_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnetfilter_cttimeout/0001-uclinux.patch b/package/libnetfilter_cttimeout/0001-uclinux.patch new file mode 100644 index 0000000000..5d462d8fec --- /dev/null +++ b/package/libnetfilter_cttimeout/0001-uclinux.patch @@ -0,0 +1,26 @@ +From d8d2ec14bc192f998afae2b71c69248e73518ddf Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 16:09:14 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d79e941..aeb6ad0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,7 @@ AC_DISABLE_STATIC + LT_INIT + CHECK_GCC_FVISIBILITY + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnetfilter_cttimeout/Config.in b/package/libnetfilter_cttimeout/Config.in new file mode 100644 index 0000000000..333919be13 --- /dev/null +++ b/package/libnetfilter_cttimeout/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBNETFILTER_CTTIMEOUT + bool "libnetfilter_cttimeout" + select BR2_PACKAGE_LIBMNL + help + libnetfilter_cttimeout is the userspace library that provides + the programming interface to the fine-grain + connection tracking timeout infrastructure. + + http://www.netfilter.org/projects/libnetfilter_cttimeout/ diff --git a/package/libnetfilter_cttimeout/libnetfilter_cttimeout.hash b/package/libnetfilter_cttimeout/libnetfilter_cttimeout.hash new file mode 100644 index 0000000000..7749f96ec8 --- /dev/null +++ b/package/libnetfilter_cttimeout/libnetfilter_cttimeout.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/libnetfilter_cttimeout/libnetfilter_cttimeout-1.0.0.tar.bz2.{md5sum,sha1sum} +md5 7697437fc9ebb6f6b83df56a633db7f9 libnetfilter_cttimeout-1.0.0.tar.bz2 +sha1 24cba24b0371e80007be4ea0fa9d872df63b8a7a libnetfilter_cttimeout-1.0.0.tar.bz2 diff --git a/package/libnetfilter_cttimeout/libnetfilter_cttimeout.mk b/package/libnetfilter_cttimeout/libnetfilter_cttimeout.mk new file mode 100644 index 0000000000..d85a8d2bd7 --- /dev/null +++ b/package/libnetfilter_cttimeout/libnetfilter_cttimeout.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libnetfilter_cttimeout +# +################################################################################ + +LIBNETFILTER_CTTIMEOUT_VERSION = 1.0.0 +LIBNETFILTER_CTTIMEOUT_SOURCE = libnetfilter_cttimeout-$(LIBNETFILTER_CTTIMEOUT_VERSION).tar.bz2 +LIBNETFILTER_CTTIMEOUT_SITE = http://www.netfilter.org/projects/libnetfilter_cttimeout/files +LIBNETFILTER_CTTIMEOUT_INSTALL_STAGING = YES +LIBNETFILTER_CTTIMEOUT_DEPENDENCIES = host-pkgconf libmnl +LIBNETFILTER_CTTIMEOUT_AUTORECONF = YES +LIBNETFILTER_CTTIMEOUT_LICENSE = GPLv2+ +LIBNETFILTER_CTTIMEOUT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnetfilter_log/0001-uclinux.patch b/package/libnetfilter_log/0001-uclinux.patch new file mode 100644 index 0000000000..75d4a1e9d1 --- /dev/null +++ b/package/libnetfilter_log/0001-uclinux.patch @@ -0,0 +1,26 @@ +From e36a2377e7ec50f6f675eb41f79edcda6ddebe5c Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 15:48:50 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index e6e1317..189a753 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -20,7 +20,7 @@ AC_PROG_INSTALL + AC_PROG_LN_S + + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnetfilter_log/Config.in b/package/libnetfilter_log/Config.in new file mode 100644 index 0000000000..927cd0aae1 --- /dev/null +++ b/package/libnetfilter_log/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBNETFILTER_LOG + bool "libnetfilter_log" + select BR2_PACKAGE_LIBNFNETLINK + help + libnetfilter_log is a userspace library providing interface + to packets that have been logged by the kernel packet filter. + + http://www.netfilter.org/projects/libnetfilter_log/ diff --git a/package/libnetfilter_log/libnetfilter_log.hash b/package/libnetfilter_log/libnetfilter_log.hash new file mode 100644 index 0000000000..4fe6a9b8b6 --- /dev/null +++ b/package/libnetfilter_log/libnetfilter_log.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/libnetfilter_log/libnetfilter_log-1.0.1.tar.bz2.{md5sum,sha1sum} +md5 2a4bb0654ae675a52d2e8d1c06090b94 libnetfilter_log-1.0.1.tar.bz2 +sha1 0b95bcb1ad15eea906fa3607cd6c2290bd48d5bd libnetfilter_log-1.0.1.tar.bz2 diff --git a/package/libnetfilter_log/libnetfilter_log.mk b/package/libnetfilter_log/libnetfilter_log.mk new file mode 100644 index 0000000000..a448c547c4 --- /dev/null +++ b/package/libnetfilter_log/libnetfilter_log.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libnetfilter_log +# +################################################################################ + +LIBNETFILTER_LOG_VERSION = 1.0.1 +LIBNETFILTER_LOG_SOURCE = libnetfilter_log-$(LIBNETFILTER_LOG_VERSION).tar.bz2 +LIBNETFILTER_LOG_SITE = http://www.netfilter.org/projects/libnetfilter_log/files +LIBNETFILTER_LOG_INSTALL_STAGING = YES +LIBNETFILTER_LOG_DEPENDENCIES = host-pkgconf libnfnetlink +LIBNETFILTER_LOG_AUTORECONF = YES +LIBNETFILTER_LOG_LICENSE = GPLv2+ +LIBNETFILTER_LOG_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnetfilter_queue/0001-uclinux.patch b/package/libnetfilter_queue/0001-uclinux.patch new file mode 100644 index 0000000000..21895d9b0e --- /dev/null +++ b/package/libnetfilter_queue/0001-uclinux.patch @@ -0,0 +1,26 @@ +From 311b60655761f6f3c4fe44cf6eff63427283f25e Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 16:13:58 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 07747a6..289868f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -21,7 +21,7 @@ AC_PROG_INSTALL + CHECK_GCC_FVISIBILITY + + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnetfilter_queue/0002-musl.patch b/package/libnetfilter_queue/0002-musl.patch new file mode 100644 index 0000000000..3765d58af3 --- /dev/null +++ b/package/libnetfilter_queue/0002-musl.patch @@ -0,0 +1,45 @@ +From 5348da83403383a60831f4c297841afb98692887 Mon Sep 17 00:00:00 2001 +From: Felix Janda +Date: Sat, 16 May 2015 14:45:46 +0200 +Subject: [PATCH] extra: Define _GNU_SOURCE to get members of tcphdr&ucphdr + +The source uses linux names for members of tcphdr. For example +"source" instead of "th_sport", ... musl libc's headers need +_GNU_SOURCE defined in order to expose these. + +Signed-off-by: Felix Janda +Signed-off-by: Pablo Neira Ayuso +[yann.morin.1998@free.fr: backported from upstream] +Signed-off-by: "Yann E. MORIN" +--- + src/extra/tcp.c | 1 + + src/extra/udp.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/extra/tcp.c b/src/extra/tcp.c +index bf161aa..d1cd79d 100644 +--- a/src/extra/tcp.c ++++ b/src/extra/tcp.c +@@ -15,6 +15,7 @@ + #include + #include + #include ++#define _GNU_SOURCE + #include + + #include +diff --git a/src/extra/udp.c b/src/extra/udp.c +index 6e6baed..8c44a66 100644 +--- a/src/extra/udp.c ++++ b/src/extra/udp.c +@@ -14,6 +14,7 @@ + #include + #include + #include ++#define _GNU_SOURCE + #include + + #include +-- +1.9.1 + diff --git a/package/libnetfilter_queue/Config.in b/package/libnetfilter_queue/Config.in new file mode 100644 index 0000000000..e93e8ea374 --- /dev/null +++ b/package/libnetfilter_queue/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBNETFILTER_QUEUE + bool "libnetfilter_queue" + select BR2_PACKAGE_LIBNFNETLINK + select BR2_PACKAGE_LIBMNL + help + libnetfilter_queue is the userspace library that provides + the programming interface to the fine-grain + connection tracking timeout infrastructure. + + http://www.netfilter.org/projects/libnetfilter_queue/ diff --git a/package/libnetfilter_queue/libnetfilter_queue.hash b/package/libnetfilter_queue/libnetfilter_queue.hash new file mode 100644 index 0000000000..4ea37216c7 --- /dev/null +++ b/package/libnetfilter_queue/libnetfilter_queue.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/libnetfilter_queue/libnetfilter_queue-1.0.2.tar.bz2.{md5sum,sha1sum} +md5 df09befac35cb215865b39a36c96a3fa libnetfilter_queue-1.0.2.tar.bz2 +sha1 8cc0b8ed33162281bc9fa8bcfa8c9dcb08848ff9 libnetfilter_queue-1.0.2.tar.bz2 diff --git a/package/libnetfilter_queue/libnetfilter_queue.mk b/package/libnetfilter_queue/libnetfilter_queue.mk new file mode 100644 index 0000000000..d788fd1575 --- /dev/null +++ b/package/libnetfilter_queue/libnetfilter_queue.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libnetfilter_queue +# +################################################################################ + +LIBNETFILTER_QUEUE_VERSION = 1.0.2 +LIBNETFILTER_QUEUE_SOURCE = libnetfilter_queue-$(LIBNETFILTER_QUEUE_VERSION).tar.bz2 +LIBNETFILTER_QUEUE_SITE = http://www.netfilter.org/projects/libnetfilter_queue/files +LIBNETFILTER_QUEUE_INSTALL_STAGING = YES +LIBNETFILTER_QUEUE_DEPENDENCIES = host-pkgconf libnfnetlink libmnl +LIBNETFILTER_QUEUE_AUTORECONF = YES +LIBNETFILTER_QUEUE_LICENSE = GPLv2+ +LIBNETFILTER_QUEUE_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnfc/0001-build-systems-make-example-build-optional.patch b/package/libnfc/0001-build-systems-make-example-build-optional.patch new file mode 100644 index 0000000000..06577c58ec --- /dev/null +++ b/package/libnfc/0001-build-systems-make-example-build-optional.patch @@ -0,0 +1,82 @@ +From 40a4871b171293d98acb40cf54be9ee9b78a3244 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Wed, 6 Jun 2012 00:49:25 +0200 +Subject: [PATCH 1/1] build systems: make example build optional + +This patch makes example build optional for both cmake and autotools build +systems. + +In order to keep the former behavior, example build is enabled by default. + +Signed-off-by: Samuel Martin + +diff -Nurp a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2013-12-08 18:51:01.000000000 +0000 ++++ b/CMakeLists.txt 2014-01-08 12:51:42.435096403 +0000 +@@ -39,6 +39,7 @@ IF(LIBNFC_ENVVARS) + ADD_DEFINITIONS(-DENVVARS) + ENDIF(LIBNFC_ENVVARS) + ++SET(BUILD_EXAMPLES ON CACHE BOOL "Build examples") + SET(LIBNFC_DEBUG_MODE OFF CACHE BOOL "Debug mode") + IF(LIBNFC_DEBUG_MODE) + ADD_DEFINITIONS(-DDEBUG) +@@ -155,7 +156,10 @@ ENDIF(WIN32) + ADD_SUBDIRECTORY(libnfc) + ADD_SUBDIRECTORY(include) + ADD_SUBDIRECTORY(utils) +-ADD_SUBDIRECTORY(examples) ++ ++IF(BUILD_EXAMPLES) ++ ADD_SUBDIRECTORY(examples) ++ENDIF(BUILD_EXAMPLES) + + # Binary Package + IF(WIN32) +diff -Nurp a/Makefile.am b/Makefile.am +--- a/Makefile.am 2013-12-08 18:51:01.000000000 +0000 ++++ b/Makefile.am 2014-01-08 12:52:12.807018593 +0000 +@@ -2,7 +2,13 @@ ACLOCAL_AMFLAGS = -I m4 + + AM_CFLAGS = $(LIBNFC_CFLAGS) + +-SUBDIRS = libnfc utils examples include contrib cmake test ++SUBDIRS = libnfc utils ++ ++if EXAMPLE_ENABLED ++SUBDIRS += examples ++endif ++ ++SUBDIRS += include contrib cmake test + + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = libnfc.pc +diff -Nurp a/configure.ac b/configure.ac +--- a/configure.ac 2013-12-08 18:51:01.000000000 +0000 ++++ b/configure.ac 2014-01-08 12:53:02.054872564 +0000 +@@ -142,6 +142,14 @@ then + fi + AM_CONDITIONAL(DOC_ENABLED, [test x"$enable_doc" = xyes]) + ++# Example build (default: yes) ++AC_ARG_ENABLE([example],AS_HELP_STRING([--enable-example],[Enable example build.]),[enable_example=$enableval],[enable_example="yes"]) ++ ++AC_MSG_CHECKING(for example build) ++AC_MSG_RESULT($enable_example) ++ ++AM_CONDITIONAL(EXAMPLE_ENABLED, [test x"$enable_example" = xyes]) ++ + # Dependencies + PKG_CONFIG_REQUIRES="" + +@@ -160,7 +168,10 @@ if test x$ac_cv_with_cutter = xyes -a x$ + fi + AM_CONDITIONAL([WITH_CUTTER], [test "$ac_cv_use_cutter" != "no"]) + ++if test x"$enable_example" = "xyes" ++then + AC_CHECK_READLINE ++fi + + # Help us to write great code ;-) + CFLAGS="$CFLAGS -Wall -pedantic -Wextra" diff --git a/package/libnfc/Config.in b/package/libnfc/Config.in new file mode 100644 index 0000000000..1707f21c32 --- /dev/null +++ b/package/libnfc/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBNFC + bool "libnfc" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + help + Public platform independent Near Field Communication (NFC) library. + + http://www.libnfc.org/ + +if BR2_PACKAGE_LIBNFC + +config BR2_PACKAGE_LIBNFC_EXAMPLES + bool "build libnfc examples" + select BR2_PACKAGE_READLINE + +endif + +comment "libnfc needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libnfc/libnfc.hash b/package/libnfc/libnfc.hash new file mode 100644 index 0000000000..307e04929a --- /dev/null +++ b/package/libnfc/libnfc.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 945e74d8e27683f9b8a6f6e529557b305d120df347a960a6a7ead6cb388f4072 libnfc-1.7.1.tar.bz2 diff --git a/package/libnfc/libnfc.mk b/package/libnfc/libnfc.mk new file mode 100644 index 0000000000..aceedb09ae --- /dev/null +++ b/package/libnfc/libnfc.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libnfc +# +################################################################################ + +LIBNFC_VERSION = 1.7.1 +LIBNFC_SOURCE = libnfc-$(LIBNFC_VERSION).tar.bz2 +LIBNFC_SITE = https://github.com/nfc-tools/libnfc/releases/download/libnfc-$(LIBNFC_VERSION) +LIBNFC_LICENSE = LGPLv3+ +LIBNFC_LICENSE_FILES = COPYING +LIBNFC_AUTORECONF = YES +LIBNFC_INSTALL_STAGING = YES + +LIBNFC_DEPENDENCIES = host-pkgconf libusb libusb-compat + +# N.B. The acr122 driver requires pcsc-lite. +LIBNFC_CONF_OPTS = --with-drivers=arygon,pn53x_usb + +ifeq ($(BR2_PACKAGE_LIBNFC_EXAMPLES),y) +LIBNFC_CONF_OPTS += --enable-example +LIBNFC_DEPENDENCIES += readline +else +LIBNFC_CONF_OPTS += --disable-example +endif + +$(eval $(autotools-package)) diff --git a/package/libnfnetlink/0001-uclinux.patch b/package/libnfnetlink/0001-uclinux.patch new file mode 100644 index 0000000000..b15201283a --- /dev/null +++ b/package/libnfnetlink/0001-uclinux.patch @@ -0,0 +1,26 @@ +From 8e5a9d8f32c9646d01d8c84e979892dfd28a7f7c Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 15:35:22 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 0926a1c..b979772 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -18,7 +18,7 @@ AC_DISABLE_STATIC + AM_PROG_LIBTOOL + + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/libnfnetlink/0002-musl.patch b/package/libnfnetlink/0002-musl.patch new file mode 100644 index 0000000000..bee7898aae --- /dev/null +++ b/package/libnfnetlink/0002-musl.patch @@ -0,0 +1,32 @@ +Include to get the u_int* definitions + +This is needed to fix the build with the musl C library, and this +patch comes from +http://git.alpinelinux.org/cgit/aports/plain/main/libnfnetlink/musl-fix-includes.patch. + +It will no longer be needed with upcoming upstream releases of +libnfnetlink, since they have switched to use the types +instead. However this change was too invasive to backport. + +Signed-off-by: Thomas Petazzoni + +--- libnfnetlink-1.0.1.orig/include/libnfnetlink/linux_nfnetlink.h ++++ libnfnetlink-1.0.1/include/libnfnetlink/linux_nfnetlink.h +@@ -1,6 +1,6 @@ + #ifndef _NFNETLINK_H + #define _NFNETLINK_H +-#include ++#include + #include + + enum nfnetlink_groups { +--- libnfnetlink-1.0.1.orig/include/libnfnetlink/libnfnetlink.h ++++ libnfnetlink-1.0.1/include/libnfnetlink/libnfnetlink.h +@@ -15,6 +15,7 @@ + #define aligned_u64 unsigned long long __attribute__((aligned(8))) + #endif + ++#include + #include /* for sa_family_t */ + #include + #include diff --git a/package/libnfnetlink/Config.in b/package/libnfnetlink/Config.in new file mode 100644 index 0000000000..fa247c5957 --- /dev/null +++ b/package/libnfnetlink/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBNFNETLINK + bool "libnfnetlink" + help + libnfnetlink is the low-level library for netfilter related + kernel/userspace communication. + It provides a generic messaging infrastructure for in-kernel + netfilter subsystems (such as nfnetlink_log, nfnetlink_queue, + nfnetlink_conntrack) and their respective users + and/or management tools in userspace. + + http://www.netfilter.org/projects/libnfnetlink/ diff --git a/package/libnfnetlink/libnfnetlink.hash b/package/libnfnetlink/libnfnetlink.hash new file mode 100644 index 0000000000..93844f22ee --- /dev/null +++ b/package/libnfnetlink/libnfnetlink.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/libnfnetlink/libnfnetlink-1.0.1.tar.bz2.{md5sum,sha1sum} +md5 98927583d2016a9fb1936fed992e2c5e libnfnetlink-1.0.1.tar.bz2 +sha1 27ae2dfbd976e28cb7a417f9e946c901f512dd9a libnfnetlink-1.0.1.tar.bz2 diff --git a/package/libnfnetlink/libnfnetlink.mk b/package/libnfnetlink/libnfnetlink.mk new file mode 100644 index 0000000000..6f69a81a98 --- /dev/null +++ b/package/libnfnetlink/libnfnetlink.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libnfnetlink +# +################################################################################ + +LIBNFNETLINK_VERSION = 1.0.1 +LIBNFNETLINK_SOURCE = libnfnetlink-$(LIBNFNETLINK_VERSION).tar.bz2 +LIBNFNETLINK_SITE = http://www.netfilter.org/projects/libnfnetlink/files +LIBNFNETLINK_AUTORECONF = YES +LIBNFNETLINK_INSTALL_STAGING = YES +LIBNFNETLINK_LICENSE = GPLv2 +LIBNFNETLINK_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libnfs/Config.in b/package/libnfs/Config.in new file mode 100644 index 0000000000..2a1ef03cd7 --- /dev/null +++ b/package/libnfs/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBNFS + bool "libnfs" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS # libtirpc + select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + nfs userspace implementation. + + http://github.com/sahlberg/libnfs + +comment "libnfs needs a toolchain w/ threads" + depends on !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC) diff --git a/package/libnfs/libnfs.hash b/package/libnfs/libnfs.hash new file mode 100644 index 0000000000..27a9e5d349 --- /dev/null +++ b/package/libnfs/libnfs.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7f6c62a05c7e0f0749f2b13f178a4ed7aaf17bd09e65a10bb147bfe9807da272 libnfs-libnfs-1.10.0.tar.gz diff --git a/package/libnfs/libnfs.mk b/package/libnfs/libnfs.mk new file mode 100644 index 0000000000..e49656b7bf --- /dev/null +++ b/package/libnfs/libnfs.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libnfs +# +################################################################################ + +LIBNFS_VERSION = libnfs-1.10.0 +LIBNFS_SITE = $(call github,sahlberg,libnfs,$(LIBNFS_VERSION)) +LIBNFS_INSTALL_STAGING = YES +LIBNFS_AUTORECONF = YES +LIBNFS_MAKE = $(MAKE1) +LIBNFS_LICENSE = LGPLv2.1+ +LIBNFS_LICENSE_FILES = LICENCE-LGPL-2.1.txt +LIBNFS_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +LIBNFS_DEPENDENCIES += libtirpc +endif + +$(eval $(autotools-package)) diff --git a/package/libnftnl/0001-Rename-xfree-to-libnftnl_xfree-to-avoid-symbol-namin.patch b/package/libnftnl/0001-Rename-xfree-to-libnftnl_xfree-to-avoid-symbol-namin.patch new file mode 100644 index 0000000000..26c9d2e646 --- /dev/null +++ b/package/libnftnl/0001-Rename-xfree-to-libnftnl_xfree-to-avoid-symbol-namin.patch @@ -0,0 +1,709 @@ +From 85dfe7dcd20c54e6d75d66a400f7ae038a52239b Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 29 Dec 2014 15:31:40 +0100 +Subject: [PATCH 1/2] Rename xfree() to libnftnl_xfree() to avoid symbol naming + conflict + +When ELF binaries and shared libraries are used, the internal +functions of libnftnl such as xfree() are not visible to the outside +world (their visibility is 'hidden'). Therefore, the fact that other +programs (especially nftables) may have symbols with the same name +does not cause any problem. + +However, when doing static linking on a non-ELF platform (such as +Blackfin, which uses the FLAT binary format), there is no way of +encoding this visibility. Therefore, the xfree() symbols of libnftnl +becomes visible to the outside world, causing a conflict with the +xfree() symbol defined by nftables. + +To solve this, this patch renames the libnftnl xfree() function to +libnftnl_xfree(). + +Signed-off-by: Thomas Petazzoni +[Gustavo: update for version 1.0.5] + +Signed-off-by: Thomas Petazzoni +--- + include/utils.h | 2 +- + src/chain.c | 28 ++++++++++++++-------------- + src/common.c | 2 +- + src/expr.c | 4 ++-- + src/expr/data_reg.c | 4 ++-- + src/expr/immediate.c | 2 +- + src/expr/log.c | 6 +++--- + src/expr/match.c | 6 +++--- + src/expr/target.c | 6 +++--- + src/gen.c | 2 +- + src/mxml.c | 2 +- + src/rule.c | 26 +++++++++++++------------- + src/ruleset.c | 2 +- + src/set.c | 22 +++++++++++----------- + src/set_elem.c | 16 ++++++++-------- + src/table.c | 14 +++++++------- + src/utils.c | 2 +- + 17 files changed, 73 insertions(+), 73 deletions(-) + +diff --git a/include/utils.h b/include/utils.h +index f7436fa..e03ee3b 100644 +--- a/include/utils.h ++++ b/include/utils.h +@@ -17,7 +17,7 @@ + + #define __noreturn __attribute__((__noreturn__)) + +-#define xfree(ptr) free((void *)ptr); ++#define nftnl_xfree(ptr) free((void *)ptr); + + #define div_round_up(n, d) (((n) + (d) - 1) / (d)) + +diff --git a/src/chain.c b/src/chain.c +index 8a8e8b8..37a27b1 100644 +--- a/src/chain.c ++++ b/src/chain.c +@@ -96,13 +96,13 @@ EXPORT_SYMBOL(nftnl_chain_alloc, nft_chain_alloc); + void nftnl_chain_free(struct nftnl_chain *c) + { + if (c->table != NULL) +- xfree(c->table); ++ nftnl_xfree(c->table); + if (c->type != NULL) +- xfree(c->type); ++ nftnl_xfree(c->type); + if (c->dev != NULL) +- xfree(c->dev); ++ nftnl_xfree(c->dev); + +- xfree(c); ++ nftnl_xfree(c); + } + EXPORT_SYMBOL(nftnl_chain_free, nft_chain_free); + +@@ -120,7 +120,7 @@ void nftnl_chain_unset(struct nftnl_chain *c, uint16_t attr) + switch (attr) { + case NFTNL_CHAIN_TABLE: + if (c->table) { +- xfree(c->table); ++ nftnl_xfree(c->table); + c->table = NULL; + } + break; +@@ -128,7 +128,7 @@ void nftnl_chain_unset(struct nftnl_chain *c, uint16_t attr) + break; + case NFTNL_CHAIN_TYPE: + if (c->type) { +- xfree(c->type); ++ nftnl_xfree(c->type); + c->type = NULL; + } + break; +@@ -143,7 +143,7 @@ void nftnl_chain_unset(struct nftnl_chain *c, uint16_t attr) + break; + case NFTNL_CHAIN_DEV: + if (c->dev) { +- xfree(c->dev); ++ nftnl_xfree(c->dev); + c->dev = NULL; + } + break; +@@ -179,7 +179,7 @@ void nftnl_chain_set_data(struct nftnl_chain *c, uint16_t attr, + break; + case NFTNL_CHAIN_TABLE: + if (c->table) +- xfree(c->table); ++ nftnl_xfree(c->table); + + c->table = strdup(data); + break; +@@ -209,13 +209,13 @@ void nftnl_chain_set_data(struct nftnl_chain *c, uint16_t attr, + break; + case NFTNL_CHAIN_TYPE: + if (c->type) +- xfree(c->type); ++ nftnl_xfree(c->type); + + c->type = strdup(data); + break; + case NFTNL_CHAIN_DEV: + if (c->dev) +- xfree(c->dev); ++ nftnl_xfree(c->dev); + + c->dev = strdup(data); + break; +@@ -535,7 +535,7 @@ int nftnl_chain_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_chain *c) + c->flags |= (1 << NFTNL_CHAIN_NAME); + } + if (tb[NFTA_CHAIN_TABLE]) { +- xfree(c->table); ++ nftnl_xfree(c->table); + c->table = strdup(mnl_attr_get_str(tb[NFTA_CHAIN_TABLE])); + c->flags |= (1 << NFTNL_CHAIN_TABLE); + } +@@ -562,7 +562,7 @@ int nftnl_chain_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_chain *c) + c->flags |= (1 << NFTNL_CHAIN_HANDLE); + } + if (tb[NFTA_CHAIN_TYPE]) { +- xfree(c->type); ++ nftnl_xfree(c->type); + c->type = strdup(mnl_attr_get_str(tb[NFTA_CHAIN_TYPE])); + c->flags |= (1 << NFTNL_CHAIN_TYPE); + } +@@ -976,7 +976,7 @@ void nftnl_chain_list_free(struct nftnl_chain_list *list) + list_del(&r->head); + nftnl_chain_free(r); + } +- xfree(list); ++ nftnl_xfree(list); + } + EXPORT_SYMBOL(nftnl_chain_list_free, nft_chain_list_free); + +@@ -1061,6 +1061,6 @@ EXPORT_SYMBOL(nftnl_chain_list_iter_next, nft_chain_list_iter_next); + + void nftnl_chain_list_iter_destroy(struct nftnl_chain_list_iter *iter) + { +- xfree(iter); ++ nftnl_xfree(iter); + } + EXPORT_SYMBOL(nftnl_chain_list_iter_destroy, nft_chain_list_iter_destroy); +diff --git a/src/common.c b/src/common.c +index 43d2cfd..0bc814d 100644 +--- a/src/common.c ++++ b/src/common.c +@@ -58,7 +58,7 @@ EXPORT_SYMBOL(nftnl_parse_err_alloc, nft_parse_err_alloc); + + void nftnl_parse_err_free(struct nftnl_parse_err *err) + { +- xfree(err); ++ nftnl_xfree(err); + } + EXPORT_SYMBOL(nftnl_parse_err_free, nft_parse_err_free); + +diff --git a/src/expr.c b/src/expr.c +index 3249a5c..8563d9e 100644 +--- a/src/expr.c ++++ b/src/expr.c +@@ -50,7 +50,7 @@ void nftnl_expr_free(struct nftnl_expr *expr) + if (expr->ops->free) + expr->ops->free(expr); + +- xfree(expr); ++ nftnl_xfree(expr); + } + EXPORT_SYMBOL(nftnl_expr_free, nft_rule_expr_free); + +@@ -257,7 +257,7 @@ struct nftnl_expr *nftnl_expr_parse(struct nlattr *attr) + return expr; + + err2: +- xfree(expr); ++ nftnl_xfree(expr); + err1: + return NULL; + } +diff --git a/src/expr/data_reg.c b/src/expr/data_reg.c +index b85d2ef..32becb4 100644 +--- a/src/expr/data_reg.c ++++ b/src/expr/data_reg.c +@@ -123,7 +123,7 @@ static int nftnl_data_reg_verdict_xml_parse(union nftnl_data_reg *reg, + NFTNL_XML_OPT, err); + if (chain != NULL) { + if (reg->chain) +- xfree(reg->chain); ++ nftnl_xfree(reg->chain); + + reg->chain = strdup(chain); + } +@@ -504,7 +504,7 @@ void nftnl_free_verdict(union nftnl_data_reg *data) + switch(data->verdict) { + case NFT_JUMP: + case NFT_GOTO: +- xfree(data->chain); ++ nftnl_xfree(data->chain); + break; + default: + break; +diff --git a/src/expr/immediate.c b/src/expr/immediate.c +index c2fb9ad..4a8cd83 100644 +--- a/src/expr/immediate.c ++++ b/src/expr/immediate.c +@@ -44,7 +44,7 @@ nftnl_expr_immediate_set(struct nftnl_expr *e, uint16_t type, + break; + case NFTNL_EXPR_IMM_CHAIN: + if (imm->data.chain) +- xfree(imm->data.chain); ++ nftnl_xfree(imm->data.chain); + + imm->data.chain = strdup(data); + break; +diff --git a/src/expr/log.c b/src/expr/log.c +index f615d8e..1957aa6 100644 +--- a/src/expr/log.c ++++ b/src/expr/log.c +@@ -38,7 +38,7 @@ static int nftnl_expr_log_set(struct nftnl_expr *e, uint16_t type, + switch(type) { + case NFTNL_EXPR_LOG_PREFIX: + if (log->prefix) +- xfree(log->prefix); ++ nftnl_xfree(log->prefix); + + log->prefix = strdup(data); + break; +@@ -152,7 +152,7 @@ nftnl_expr_log_parse(struct nftnl_expr *e, struct nlattr *attr) + + if (tb[NFTA_LOG_PREFIX]) { + if (log->prefix) +- xfree(log->prefix); ++ nftnl_xfree(log->prefix); + + log->prefix = strdup(mnl_attr_get_str(tb[NFTA_LOG_PREFIX])); + e->flags |= (1 << NFTNL_EXPR_LOG_PREFIX); +@@ -329,7 +329,7 @@ static void nftnl_expr_log_free(struct nftnl_expr *e) + { + struct nftnl_expr_log *log = nftnl_expr_data(e); + +- xfree(log->prefix); ++ nftnl_xfree(log->prefix); + } + + struct expr_ops expr_ops_log = { +diff --git a/src/expr/match.c b/src/expr/match.c +index ddecb43..2071b3c 100644 +--- a/src/expr/match.c ++++ b/src/expr/match.c +@@ -50,7 +50,7 @@ nftnl_expr_match_set(struct nftnl_expr *e, uint16_t type, + break; + case NFTNL_EXPR_MT_INFO: + if (mt->data) +- xfree(mt->data); ++ nftnl_xfree(mt->data); + + mt->data = data; + mt->data_len = data_len; +@@ -147,7 +147,7 @@ static int nftnl_expr_match_parse(struct nftnl_expr *e, struct nlattr *attr) + void *match_data; + + if (match->data) +- xfree(match->data); ++ nftnl_xfree(match->data); + + match_data = calloc(1, len); + if (match_data == NULL) +@@ -237,7 +237,7 @@ static void nftnl_expr_match_free(struct nftnl_expr *e) + { + struct nftnl_expr_match *match = nftnl_expr_data(e); + +- xfree(match->data); ++ nftnl_xfree(match->data); + } + + struct expr_ops expr_ops_match = { +diff --git a/src/expr/target.c b/src/expr/target.c +index cbbee60..064f56a 100644 +--- a/src/expr/target.c ++++ b/src/expr/target.c +@@ -50,7 +50,7 @@ nftnl_expr_target_set(struct nftnl_expr *e, uint16_t type, + break; + case NFTNL_EXPR_TG_INFO: + if (tg->data) +- xfree(tg->data); ++ nftnl_xfree(tg->data); + + tg->data = data; + tg->data_len = data_len; +@@ -147,7 +147,7 @@ static int nftnl_expr_target_parse(struct nftnl_expr *e, struct nlattr *attr) + void *target_data; + + if (target->data) +- xfree(target->data); ++ nftnl_xfree(target->data); + + target_data = calloc(1, len); + if (target_data == NULL) +@@ -238,7 +238,7 @@ static void nftnl_expr_target_free(struct nftnl_expr *e) + { + struct nftnl_expr_target *target = nftnl_expr_data(e); + +- xfree(target->data); ++ nftnl_xfree(target->data); + } + + struct expr_ops expr_ops_target = { +diff --git a/src/gen.c b/src/gen.c +index eb3b70d..dac3e47 100644 +--- a/src/gen.c ++++ b/src/gen.c +@@ -37,7 +37,7 @@ EXPORT_SYMBOL(nftnl_gen_alloc, nft_gen_alloc); + + void nftnl_gen_free(struct nftnl_gen *gen) + { +- xfree(gen); ++ nftnl_xfree(gen); + } + EXPORT_SYMBOL(nftnl_gen_free, nft_gen_free); + +diff --git a/src/mxml.c b/src/mxml.c +index 51dbf1b..5b2aa57 100644 +--- a/src/mxml.c ++++ b/src/mxml.c +@@ -85,7 +85,7 @@ struct nftnl_expr *nftnl_mxml_expr_parse(mxml_node_t *node, + goto err_expr; + + tree = mxmlLoadString(NULL, xml_text, MXML_OPAQUE_CALLBACK); +- xfree(xml_text); ++ nftnl_xfree(xml_text); + + if (tree == NULL) + goto err_expr; +diff --git a/src/rule.c b/src/rule.c +index 0fb27ed..f8e33ff 100644 +--- a/src/rule.c ++++ b/src/rule.c +@@ -72,11 +72,11 @@ void nftnl_rule_free(struct nftnl_rule *r) + nftnl_expr_free(e); + + if (r->table != NULL) +- xfree(r->table); ++ nftnl_xfree(r->table); + if (r->chain != NULL) +- xfree(r->chain); ++ nftnl_xfree(r->chain); + +- xfree(r); ++ nftnl_xfree(r); + } + EXPORT_SYMBOL(nftnl_rule_free, nft_rule_free); + +@@ -94,13 +94,13 @@ void nftnl_rule_unset(struct nftnl_rule *r, uint16_t attr) + switch (attr) { + case NFTNL_RULE_TABLE: + if (r->table) { +- xfree(r->table); ++ nftnl_xfree(r->table); + r->table = NULL; + } + break; + case NFTNL_RULE_CHAIN: + if (r->chain) { +- xfree(r->chain); ++ nftnl_xfree(r->chain); + r->chain = NULL; + } + break; +@@ -136,13 +136,13 @@ void nftnl_rule_set_data(struct nftnl_rule *r, uint16_t attr, + switch(attr) { + case NFTNL_RULE_TABLE: + if (r->table) +- xfree(r->table); ++ nftnl_xfree(r->table); + + r->table = strdup(data); + break; + case NFTNL_RULE_CHAIN: + if (r->chain) +- xfree(r->chain); ++ nftnl_xfree(r->chain); + + r->chain = strdup(data); + break; +@@ -425,12 +425,12 @@ int nftnl_rule_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_rule *r) + return -1; + + if (tb[NFTA_RULE_TABLE]) { +- xfree(r->table); ++ nftnl_xfree(r->table); + r->table = strdup(mnl_attr_get_str(tb[NFTA_RULE_TABLE])); + r->flags |= (1 << NFTNL_RULE_TABLE); + } + if (tb[NFTA_RULE_CHAIN]) { +- xfree(r->chain); ++ nftnl_xfree(r->chain); + r->chain = strdup(mnl_attr_get_str(tb[NFTA_RULE_CHAIN])); + r->flags |= (1 << NFTNL_RULE_CHAIN); + } +@@ -451,7 +451,7 @@ int nftnl_rule_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_rule *r) + mnl_attr_get_payload(tb[NFTA_RULE_USERDATA]); + + if (r->user.data) +- xfree(r->user.data); ++ nftnl_xfree(r->user.data); + + r->user.len = mnl_attr_get_payload_len(tb[NFTA_RULE_USERDATA]); + +@@ -1042,7 +1042,7 @@ EXPORT_SYMBOL(nftnl_expr_iter_next, nft_rule_expr_iter_next); + + void nftnl_expr_iter_destroy(struct nftnl_expr_iter *iter) + { +- xfree(iter); ++ nftnl_xfree(iter); + } + EXPORT_SYMBOL(nftnl_expr_iter_destroy, nft_rule_expr_iter_destroy); + +@@ -1072,7 +1072,7 @@ void nftnl_rule_list_free(struct nftnl_rule_list *list) + list_del(&r->head); + nftnl_rule_free(r); + } +- xfree(list); ++ nftnl_xfree(list); + } + EXPORT_SYMBOL(nftnl_rule_list_free, nft_rule_list_free); + +@@ -1163,6 +1163,6 @@ EXPORT_SYMBOL(nftnl_rule_list_iter_next, nft_rule_list_iter_next); + + void nftnl_rule_list_iter_destroy(struct nftnl_rule_list_iter *iter) + { +- xfree(iter); ++ nftnl_xfree(iter); + } + EXPORT_SYMBOL(nftnl_rule_list_iter_destroy, nft_rule_list_iter_destroy); +diff --git a/src/ruleset.c b/src/ruleset.c +index 7b1ab7a..b8188de 100644 +--- a/src/ruleset.c ++++ b/src/ruleset.c +@@ -74,7 +74,7 @@ void nftnl_ruleset_free(struct nftnl_ruleset *r) + nftnl_set_list_free(r->set_list); + if (r->flags & (1 << NFTNL_RULESET_RULELIST)) + nftnl_rule_list_free(r->rule_list); +- xfree(r); ++ nftnl_xfree(r); + } + EXPORT_SYMBOL(nftnl_ruleset_free, nft_ruleset_free); + +diff --git a/src/set.c b/src/set.c +index f5a9454..4eff325 100644 +--- a/src/set.c ++++ b/src/set.c +@@ -45,15 +45,15 @@ void nftnl_set_free(struct nftnl_set *s) + struct nftnl_set_elem *elem, *tmp; + + if (s->table != NULL) +- xfree(s->table); ++ nftnl_xfree(s->table); + if (s->name != NULL) +- xfree(s->name); ++ nftnl_xfree(s->name); + + list_for_each_entry_safe(elem, tmp, &s->element_list, head) { + list_del(&elem->head); + nftnl_set_elem_free(elem); + } +- xfree(s); ++ nftnl_xfree(s); + } + EXPORT_SYMBOL(nftnl_set_free, nft_set_free); + +@@ -69,14 +69,14 @@ void nftnl_set_unset(struct nftnl_set *s, uint16_t attr) + case NFTNL_SET_TABLE: + if (s->flags & (1 << NFTNL_SET_TABLE)) + if (s->table) { +- xfree(s->table); ++ nftnl_xfree(s->table); + s->table = NULL; + } + break; + case NFTNL_SET_NAME: + if (s->flags & (1 << NFTNL_SET_NAME)) + if (s->name) { +- xfree(s->name); ++ nftnl_xfree(s->name); + s->name = NULL; + } + break; +@@ -124,13 +124,13 @@ void nftnl_set_set_data(struct nftnl_set *s, uint16_t attr, const void *data, + switch(attr) { + case NFTNL_SET_TABLE: + if (s->table) +- xfree(s->table); ++ nftnl_xfree(s->table); + + s->table = strdup(data); + break; + case NFTNL_SET_NAME: + if (s->name) +- xfree(s->name); ++ nftnl_xfree(s->name); + + s->name = strdup(data); + break; +@@ -435,12 +435,12 @@ int nftnl_set_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_set *s) + return -1; + + if (tb[NFTA_SET_TABLE]) { +- xfree(s->table); ++ nftnl_xfree(s->table); + s->table = strdup(mnl_attr_get_str(tb[NFTA_SET_TABLE])); + s->flags |= (1 << NFTNL_SET_TABLE); + } + if (tb[NFTA_SET_NAME]) { +- xfree(s->name); ++ nftnl_xfree(s->name); + s->name = strdup(mnl_attr_get_str(tb[NFTA_SET_NAME])); + s->flags |= (1 << NFTNL_SET_NAME); + } +@@ -1085,7 +1085,7 @@ void nftnl_set_list_free(struct nftnl_set_list *list) + list_del(&s->head); + nftnl_set_free(s); + } +- xfree(list); ++ nftnl_xfree(list); + } + EXPORT_SYMBOL(nftnl_set_list_free, nft_set_list_free); + +@@ -1175,7 +1175,7 @@ EXPORT_SYMBOL(nftnl_set_list_iter_next, nft_set_list_iter_next); + + void nftnl_set_list_iter_destroy(struct nftnl_set_list_iter *iter) + { +- xfree(iter); ++ nftnl_xfree(iter); + } + EXPORT_SYMBOL(nftnl_set_list_iter_destroy, nft_set_list_iter_destroy); + +diff --git a/src/set_elem.c b/src/set_elem.c +index 293ce15..4e20159 100644 +--- a/src/set_elem.c ++++ b/src/set_elem.c +@@ -43,7 +43,7 @@ void nftnl_set_elem_free(struct nftnl_set_elem *s) + { + if (s->flags & (1 << NFTNL_SET_ELEM_CHAIN)) { + if (s->data.chain) { +- xfree(s->data.chain); ++ nftnl_xfree(s->data.chain); + s->data.chain = NULL; + } + } +@@ -51,7 +51,7 @@ void nftnl_set_elem_free(struct nftnl_set_elem *s) + if (s->flags & (1 << NFTNL_SET_ELEM_EXPR)) + nftnl_expr_free(s->expr); + +- xfree(s); ++ nftnl_xfree(s); + } + EXPORT_SYMBOL(nftnl_set_elem_free, nft_set_elem_free); + +@@ -67,7 +67,7 @@ void nftnl_set_elem_unset(struct nftnl_set_elem *s, uint16_t attr) + case NFTNL_SET_ELEM_CHAIN: + if (s->flags & (1 << NFTNL_SET_ELEM_CHAIN)) { + if (s->data.chain) { +- xfree(s->data.chain); ++ nftnl_xfree(s->data.chain); + s->data.chain = NULL; + } + } +@@ -110,7 +110,7 @@ void nftnl_set_elem_set(struct nftnl_set_elem *s, uint16_t attr, + break; + case NFTNL_SET_ELEM_CHAIN: /* NFTA_SET_ELEM_DATA */ + if (s->data.chain) +- xfree(s->data.chain); ++ nftnl_xfree(s->data.chain); + + s->data.chain = strdup(data); + break; +@@ -390,7 +390,7 @@ static int nftnl_set_elems_parse2(struct nftnl_set *s, const struct nlattr *nest + mnl_attr_get_payload(tb[NFTA_SET_ELEM_USERDATA]); + + if (e->user.data) +- xfree(e->user.data); ++ nftnl_xfree(e->user.data); + + e->user.len = mnl_attr_get_payload_len(tb[NFTA_SET_ELEM_USERDATA]); + e->user.data = malloc(e->user.len); +@@ -462,13 +462,13 @@ int nftnl_set_elems_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_set *s) + return -1; + + if (tb[NFTA_SET_ELEM_LIST_TABLE]) { +- xfree(s->table); ++ nftnl_xfree(s->table); + s->table = + strdup(mnl_attr_get_str(tb[NFTA_SET_ELEM_LIST_TABLE])); + s->flags |= (1 << NFTNL_SET_TABLE); + } + if (tb[NFTA_SET_ELEM_LIST_SET]) { +- xfree(s->name); ++ nftnl_xfree(s->name); + s->name = + strdup(mnl_attr_get_str(tb[NFTA_SET_ELEM_LIST_SET])); + s->flags |= (1 << NFTNL_SET_NAME); +@@ -853,7 +853,7 @@ EXPORT_SYMBOL(nftnl_set_elems_iter_next, nft_set_elems_iter_next); + + void nftnl_set_elems_iter_destroy(struct nftnl_set_elems_iter *iter) + { +- xfree(iter); ++ nftnl_xfree(iter); + } + EXPORT_SYMBOL(nftnl_set_elems_iter_destroy, nft_set_elems_iter_destroy); + +diff --git a/src/table.c b/src/table.c +index 28f6bd6..6aa2eb5 100644 +--- a/src/table.c ++++ b/src/table.c +@@ -45,9 +45,9 @@ EXPORT_SYMBOL(nftnl_table_alloc, nft_table_alloc); + void nftnl_table_free(struct nftnl_table *t) + { + if (t->flags & (1 << NFTNL_TABLE_NAME)) +- xfree(t->name); ++ nftnl_xfree(t->name); + +- xfree(t); ++ nftnl_xfree(t); + } + EXPORT_SYMBOL(nftnl_table_free, nft_table_free); + +@@ -65,7 +65,7 @@ void nftnl_table_unset(struct nftnl_table *t, uint16_t attr) + switch (attr) { + case NFTNL_TABLE_NAME: + if (t->name) { +- xfree(t->name); ++ nftnl_xfree(t->name); + t->name = NULL; + } + break; +@@ -95,7 +95,7 @@ void nftnl_table_set_data(struct nftnl_table *t, uint16_t attr, + switch (attr) { + case NFTNL_TABLE_NAME: + if (t->name) +- xfree(t->name); ++ nftnl_xfree(t->name); + + t->name = strdup(data); + break; +@@ -229,7 +229,7 @@ int nftnl_table_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_table *t) + return -1; + + if (tb[NFTA_TABLE_NAME]) { +- xfree(t->name); ++ nftnl_xfree(t->name); + t->name = strdup(mnl_attr_get_str(tb[NFTA_TABLE_NAME])); + t->flags |= (1 << NFTNL_TABLE_NAME); + } +@@ -496,7 +496,7 @@ void nftnl_table_list_free(struct nftnl_table_list *list) + list_del(&r->head); + nftnl_table_free(r); + } +- xfree(list); ++ nftnl_xfree(list); + } + EXPORT_SYMBOL(nftnl_table_list_free, nft_table_list_free); + +@@ -581,6 +581,6 @@ EXPORT_SYMBOL(nftnl_table_list_iter_next, nft_table_list_iter_next); + + void nftnl_table_list_iter_destroy(struct nftnl_table_list_iter *iter) + { +- xfree(iter); ++ nftnl_xfree(iter); + } + EXPORT_SYMBOL(nftnl_table_list_iter_destroy, nft_table_list_iter_destroy); +diff --git a/src/utils.c b/src/utils.c +index c241e5f..ba44a60 100644 +--- a/src/utils.c ++++ b/src/utils.c +@@ -249,7 +249,7 @@ int nftnl_fprintf(FILE *fp, void *obj, uint32_t cmd, uint32_t type, uint32_t fla + + out: + if (buf != _buf) +- xfree(buf); ++ nftnl_xfree(buf); + + return ret; + } +-- +2.4.9 + diff --git a/package/libnftnl/0002-Add-Libs.private-field-to-libnftnl.pc.patch b/package/libnftnl/0002-Add-Libs.private-field-to-libnftnl.pc.patch new file mode 100644 index 0000000000..ce3e9500ee --- /dev/null +++ b/package/libnftnl/0002-Add-Libs.private-field-to-libnftnl.pc.patch @@ -0,0 +1,49 @@ +From d89fca062ba966332b573673fdd5c4cf01c3e2f5 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 29 Dec 2014 15:32:08 +0100 +Subject: [PATCH 2/2] Add Libs.private field to libnftnl.pc + +Static linking userspace programs such as nftables against libnftnl +currently doesn't work out of the box, because libnftnl is linked +against libmnl, but this isn't expressed in libnftnl pkg-config +file: + + CCLD nft +[...]/bfin-buildroot-uclinux-uclibc/sysroot/usr/lib/libnftnl.a(table.o): In function `_nft_table_nlmsg_parse': +table.c:(.text+0x480): undefined reference to `_mnl_attr_parse' +table.c:(.text+0x492): undefined reference to `_mnl_attr_get_str' +table.c:(.text+0x4a8): undefined reference to `_mnl_attr_get_u32' +table.c:(.text+0x4ca): undefined reference to `_mnl_attr_get_u32' +[...] + +The Libs.private field is specifically designed for such usage: + +From pkg-config documentation: + + Libs.private: + + This line should list any private libraries in use. Private + libraries are libraries which are not exposed through your + library, but are needed in the case of static linking. + +Therefore, this patch adds a reference to libmnl in the Libs.private +field of libnftnl pkg-config file. + +Signed-off-by: Thomas Petazzoni +--- + libnftnl.pc.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libnftnl.pc.in b/libnftnl.pc.in +index fd5cc6a..7fef921 100644 +--- a/libnftnl.pc.in ++++ b/libnftnl.pc.in +@@ -12,4 +12,5 @@ Version: @VERSION@ + Requires: + Conflicts: + Libs: -L${libdir} -lnftnl ++Libs.private: @LIBMNL_LIBS@ + Cflags: -I${includedir} +-- +2.1.0 + diff --git a/package/libnftnl/Config.in b/package/libnftnl/Config.in new file mode 100644 index 0000000000..365ab10201 --- /dev/null +++ b/package/libnftnl/Config.in @@ -0,0 +1,35 @@ +comment "libnftnl needs a toolchain w/ headers >= 3.1" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + +config BR2_PACKAGE_LIBNFTNL + bool "libnftnl" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + select BR2_PACKAGE_LIBMNL + help + libnftnl is a userspace library providing a low-level + netlink programming interface (API) to the in-kernel + nf_tables subsystem. The library libnftnl has been + previously known as libnftables. This library is + currently used by nftables. + + http://netfilter.org/projects/libnftnl/index.html + +if BR2_PACKAGE_LIBNFTNL + +config BR2_PACKAGE_LIBNFTNL_JSON + bool "enable JSON support" + select BR2_PACKAGE_JANSSON + help + Enable JSON parsing support + +config BR2_PACKAGE_LIBNFTNL_XML + bool "enable XML support" + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_MXML + help + Enable XML parsing support + +comment "libnftnl XML parsing support needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +endif diff --git a/package/libnftnl/libnftnl.hash b/package/libnftnl/libnftnl.hash new file mode 100644 index 0000000000..50896fba86 --- /dev/null +++ b/package/libnftnl/libnftnl.hash @@ -0,0 +1,2 @@ +# From http://www.netfilter.org/projects/libnftnl/downloads.html#libnftnl-1.0.5 +sha1 2ae3172251574ee36077af760933ec0369960a17 libnftnl-1.0.5.tar.bz2 diff --git a/package/libnftnl/libnftnl.mk b/package/libnftnl/libnftnl.mk new file mode 100644 index 0000000000..37c82d3a6a --- /dev/null +++ b/package/libnftnl/libnftnl.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# libnftnl +# +################################################################################ + +LIBNFTNL_VERSION = 1.0.5 +LIBNFTNL_SITE = http://netfilter.org/projects/libnftnl/files +LIBNFTNL_SOURCE = libnftnl-$(LIBNFTNL_VERSION).tar.bz2 +LIBNFTNL_LICENSE = GPLv2+ +LIBNFTNL_LICENSE_FILES = COPYING +LIBNFTNL_INSTALL_STAGING = YES +LIBNFTNL_DEPENDENCIES = host-pkgconf libmnl + +ifeq ($(BR2_PACKAGE_LIBNFTNL_JSON),y) +LIBNFTNL_CONF_OPTS += --with-json-parsing +LIBNFTNL_DEPENDENCIES += jansson +else +LIBNFTNL_CONF_OPTS += --without-json-parsing +endif + +ifeq ($(BR2_PACKAGE_LIBNFTNL_XML),y) +LIBNFTNL_CONF_OPTS += --with-xml-parsing +LIBNFTNL_DEPENDENCIES += mxml +else +LIBNFTNL_CONF_OPTS += --without-xml-parsing +endif + +$(eval $(autotools-package)) diff --git a/package/libnice/Config.in b/package/libnice/Config.in new file mode 100644 index 0000000000..1d7c3410e0 --- /dev/null +++ b/package/libnice/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBNICE + bool "libnice" + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # fork() + help + Libnice is an implementation of the IETF's Interactive + Connectivity Establishment (ICE) standard (RFC 5245) and the + Session Traversal Utilities for NAT (STUN) standard (RFC + 5389). + + It provides a GLib-based library, libnice and a Glib-free + library, libstun as well as GStreamer elements. + + http://nice.freedesktop.org/wiki/ + +comment "libnice needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libnice/libnice.hash b/package/libnice/libnice.hash new file mode 100644 index 0000000000..bb419b9d73 --- /dev/null +++ b/package/libnice/libnice.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 9da7f09909902d535389d929c3e4d69129528fb18438a6c8565ec812d9904ddf libnice-0.1.8.tar.gz diff --git a/package/libnice/libnice.mk b/package/libnice/libnice.mk new file mode 100644 index 0000000000..68f5eaef59 --- /dev/null +++ b/package/libnice/libnice.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libnice +# +################################################################################ + +LIBNICE_VERSION = 0.1.8 +LIBNICE_SITE = http://nice.freedesktop.org/releases +LIBNICE_LICENSE = MPLv1.1 or LGPLv2.1 +LIBNICE_LICENSE_FILES = COPYING COPYING.MPL COPYING.LGPL +LIBNICE_DEPENDENCIES = libglib2 host-pkgconf +LIBNICE_INSTALL_STAGING = YES +LIBNICE_CONF_OPTS = \ + --without-gstreamer \ + --without-gstreamer-0.10 \ + +$(eval $(autotools-package)) diff --git a/package/libnl/0002-build-add-Libs.private-field-in-libnl-pkg-config-fil.patch b/package/libnl/0002-build-add-Libs.private-field-in-libnl-pkg-config-fil.patch new file mode 100644 index 0000000000..845a593761 --- /dev/null +++ b/package/libnl/0002-build-add-Libs.private-field-in-libnl-pkg-config-fil.patch @@ -0,0 +1,30 @@ +From db0d59cd06f3ffd350379847c0885e1bfb85af0f Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 7 Mar 2015 11:34:42 +0100 +Subject: [PATCH 2/2] build: add Libs.private field in libnl pkg-config file + +In order to support static linking, the libnl pkg-config file should +indicate in its Libs.private field the libraries that libnl-3.0.a +requires. The LIBS variable contains the appropriate list of +libraries: -lm in all cases, and -lpthread when pthread support is +enabled. This allows to statically link applications against libnl +properly. + +Signed-off-by: Thomas Petazzoni +--- + libnl-3.0.pc.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libnl-3.0.pc.in b/libnl-3.0.pc.in +index b87e3dc..ddbc999 100644 +--- a/libnl-3.0.pc.in ++++ b/libnl-3.0.pc.in +@@ -7,4 +7,5 @@ Name: libnl + Description: Convenience library for netlink sockets + Version: @PACKAGE_VERSION@ + Libs: -L${libdir} -lnl-@MAJ_VERSION@ ++Libs.private: @LIBS@ + Cflags: -I${includedir}/libnl@MAJ_VERSION@ +-- +2.1.0 + diff --git a/package/libnl/Config.in b/package/libnl/Config.in new file mode 100644 index 0000000000..46877c37a2 --- /dev/null +++ b/package/libnl/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_LIBNL + bool "libnl" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + A library for applications dealing with netlink socket. + + http://people.suug.ch/~tgr/libnl/ + +if BR2_PACKAGE_LIBNL + +config BR2_PACKAGE_LIBNL_TOOLS + bool "install tools" + # uses + depends on !BR2_STATIC_LIBS + help + Install binary tools. + +comment "libnl tools needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS +endif + +comment "libnl needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libnl/libnl.hash b/package/libnl/libnl.hash new file mode 100644 index 0000000000..2f1a3cb1b3 --- /dev/null +++ b/package/libnl/libnl.hash @@ -0,0 +1,2 @@ +# From https://github.com/thom311/libnl/releases/download/libnl3_2_27/libnl-3.2.27.tar.gz.sha256sum +sha256 4bbbf92b3c78a90f423cf96260bf419a28b75db8cced47051217a56795f58ec6 libnl-3.2.27.tar.gz diff --git a/package/libnl/libnl.mk b/package/libnl/libnl.mk new file mode 100644 index 0000000000..85c0db86f6 --- /dev/null +++ b/package/libnl/libnl.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libnl +# +################################################################################ + +LIBNL_VERSION = 3.2.27 +LIBNL_SITE = https://github.com/thom311/libnl/releases/download/libnl$(subst .,_,$(LIBNL_VERSION)) +LIBNL_LICENSE = LGPLv2.1+ +LIBNL_LICENSE_FILES = COPYING +LIBNL_INSTALL_STAGING = YES +LIBNL_DEPENDENCIES = host-bison host-flex + +ifeq ($(BR2_PACKAGE_LIBNL_TOOLS),y) +LIBNL_CONF_OPTS += --enable-cli +else +LIBNL_CONF_OPTS += --disable-cli +endif + +$(eval $(autotools-package)) diff --git a/package/libnspr/0001-nios2.patch b/package/libnspr/0001-nios2.patch new file mode 100644 index 0000000000..22cacd72a1 --- /dev/null +++ b/package/libnspr/0001-nios2.patch @@ -0,0 +1,72 @@ +Add Nios-II support + +[Gustavo: update for nspr 4.10.9] +Signed-off-by: Ezequiel Garcia + +diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg nspr-4.10.9/nspr/pr/include/md/_linux.cfg +--- nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg 2015-10-03 08:11:43.229387215 -0300 ++++ nspr-4.10.9/nspr/pr/include/md/_linux.cfg 2015-10-03 08:11:55.277798841 -0300 +@@ -1017,6 +1017,51 @@ + #define PR_BYTES_PER_WORD_LOG2 2 + #define PR_BYTES_PER_DWORD_LOG2 3 + ++#elif defined(nios2) ++ ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 4 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 4 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ + #else + + #error "Unknown CPU architecture" +diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.h nspr-4.10.9/nspr/pr/include/md/_linux.h +--- nspr-4.10.9.orig/nspr/pr/include/md/_linux.h 2015-10-03 08:11:43.229387215 -0300 ++++ nspr-4.10.9/nspr/pr/include/md/_linux.h 2015-10-03 08:12:22.474728003 -0300 +@@ -57,6 +57,8 @@ + #define _PR_SI_ARCHITECTURE "m32r" + #elif defined(__or1k__) + #define _PR_SI_ARCHITECTURE "or1k" ++#elif defined(nios2) ++#define _PR_SI_ARCHITECTURE "nios2" + #else + #error "Unknown CPU architecture" + #endif diff --git a/package/libnspr/0002-microblaze.patch b/package/libnspr/0002-microblaze.patch new file mode 100644 index 0000000000..f1416e7e97 --- /dev/null +++ b/package/libnspr/0002-microblaze.patch @@ -0,0 +1,80 @@ +Add Microblaze support + +[Gustavo: update for nspr 4.10.9] +Signed-off-by: Spenser Gilliland + +diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg nspr-4.10.9/nspr/pr/include/md/_linux.cfg +--- nspr-4.10.9.orig/nspr/pr/include/md/_linux.cfg 2015-10-03 08:13:11.845414714 -0300 ++++ nspr-4.10.9/nspr/pr/include/md/_linux.cfg 2015-10-03 08:13:20.435708195 -0300 +@@ -1062,6 +1062,56 @@ + #define PR_BYTES_PER_WORD_LOG2 2 + #define PR_BYTES_PER_DWORD_LOG2 3 + ++#elif defined(__microblaze__) ++ ++#if defined(__BIG_ENDIAN__) ++#define IS_BIG_ENDIAN 1 ++#undef IS_LITTLE_ENDIAN ++#else ++#define IS_LITTLE_ENDIAN 1 ++#undef IS_BIG_ENDIAN ++#endif ++ ++#define PR_BYTES_PER_BYTE 1 ++#define PR_BYTES_PER_SHORT 2 ++#define PR_BYTES_PER_INT 4 ++#define PR_BYTES_PER_INT64 8 ++#define PR_BYTES_PER_LONG 4 ++#define PR_BYTES_PER_FLOAT 4 ++#define PR_BYTES_PER_DOUBLE 8 ++#define PR_BYTES_PER_WORD 4 ++#define PR_BYTES_PER_DWORD 8 ++ ++#define PR_BITS_PER_BYTE 8 ++#define PR_BITS_PER_SHORT 16 ++#define PR_BITS_PER_INT 32 ++#define PR_BITS_PER_INT64 64 ++#define PR_BITS_PER_LONG 32 ++#define PR_BITS_PER_FLOAT 32 ++#define PR_BITS_PER_DOUBLE 64 ++#define PR_BITS_PER_WORD 32 ++ ++#define PR_BITS_PER_BYTE_LOG2 3 ++#define PR_BITS_PER_SHORT_LOG2 4 ++#define PR_BITS_PER_INT_LOG2 5 ++#define PR_BITS_PER_INT64_LOG2 6 ++#define PR_BITS_PER_LONG_LOG2 5 ++#define PR_BITS_PER_FLOAT_LOG2 5 ++#define PR_BITS_PER_DOUBLE_LOG2 6 ++#define PR_BITS_PER_WORD_LOG2 5 ++ ++#define PR_ALIGN_OF_SHORT 2 ++#define PR_ALIGN_OF_INT 4 ++#define PR_ALIGN_OF_LONG 4 ++#define PR_ALIGN_OF_INT64 4 ++#define PR_ALIGN_OF_FLOAT 4 ++#define PR_ALIGN_OF_DOUBLE 4 ++#define PR_ALIGN_OF_POINTER 4 ++#define PR_ALIGN_OF_WORD 4 ++ ++#define PR_BYTES_PER_WORD_LOG2 2 ++#define PR_BYTES_PER_DWORD_LOG2 3 ++ + #else + + #error "Unknown CPU architecture" +diff -Nura nspr-4.10.9.orig/nspr/pr/include/md/_linux.h nspr-4.10.9/nspr/pr/include/md/_linux.h +--- nspr-4.10.9.orig/nspr/pr/include/md/_linux.h 2015-10-03 08:13:11.845414714 -0300 ++++ nspr-4.10.9/nspr/pr/include/md/_linux.h 2015-10-03 08:14:53.351882603 -0300 +@@ -57,8 +57,11 @@ + #define _PR_SI_ARCHITECTURE "m32r" + #elif defined(__or1k__) + #define _PR_SI_ARCHITECTURE "or1k" ++#elif defined(__microblaze__) ++#define _PR_SI_ARCHITECTURE "microblaze" + #elif defined(nios2) + #define _PR_SI_ARCHITECTURE "nios2" ++#elif defined(nios2) + #else + #error "Unknown CPU architecture" + #endif diff --git a/package/libnspr/Config.in b/package/libnspr/Config.in new file mode 100644 index 0000000000..ba1ea55933 --- /dev/null +++ b/package/libnspr/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT + def_bool y + depends on !BR2_arc && !BR2_xtensa && !BR2_bfin + +if BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT + +config BR2_PACKAGE_LIBNSPR + bool "libnspr" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + NSPR is the Netscape Portable Runtime library which provides + a platform-neutral API for system level and libc like + functions. The library is used by the Mozilla project as well + as others. + + http://www.mozilla.org/projects/nspr/ + +comment "libnspr needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +endif diff --git a/package/libnspr/libnspr.hash b/package/libnspr/libnspr.hash new file mode 100644 index 0000000000..f513213d25 --- /dev/null +++ b/package/libnspr/libnspr.hash @@ -0,0 +1,2 @@ +# From https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v4.12/src/SHA256SUMS +sha256 e0b10a1e569153668ff8bdea6c7e491b389fab69c2f18285a1ebf7c2ea4269de nspr-4.12.tar.gz diff --git a/package/libnspr/libnspr.mk b/package/libnspr/libnspr.mk new file mode 100644 index 0000000000..0311f8fc98 --- /dev/null +++ b/package/libnspr/libnspr.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# libnspr +# +################################################################################ + +LIBNSPR_VERSION = 4.12 +LIBNSPR_SOURCE = nspr-$(LIBNSPR_VERSION).tar.gz +LIBNSPR_SITE = https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$(LIBNSPR_VERSION)/src +LIBNSPR_SUBDIR = nspr +LIBNSPR_INSTALL_STAGING = YES +LIBNSPR_CONFIG_SCRIPTS = nspr-config +LIBNSPR_LICENSE = MPLv2.0 +LIBNSPR_LICENSE_FILES = nspr/LICENSE + +# Set the host CFLAGS and LDFLAGS so NSPR does not guess wrongly +LIBNSPR_CONF_ENV = \ + HOST_CFLAGS="-g -O2" \ + HOST_LDFLAGS="-lc" +# NSPR mixes up --build and --host +LIBNSPR_CONF_OPTS = --host=$(GNU_HOST_NAME) +LIBNSPR_CONF_OPTS += --$(if $(BR2_ARCH_IS_64),en,dis)able-64bit + +# ./nspr/pr/include/md/_linux.h tests only __GLIBC__ version to detect +# c-library features, list musl features here for now (taken from +# Alpine Linux). +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +LIBNSPR_CFLAGS += \ + -D_PR_POLL_AVAILABLE \ + -D_PR_HAVE_OFF64_T \ + -D_PR_INET6 \ + -D_PR_HAVE_INET_NTOP \ + -D_PR_HAVE_GETHOSTBYNAME2 \ + -D_PR_HAVE_GETADDRINFO \ + -D_PR_INET6_PROBE +endif + +LIBNSPR_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) $(LIBNSPR_CFLAGS)" + +ifeq ($(BR2_STATIC_LIBS),y) +LIBNSPR_MAKE_OPTS = SHARED_LIBRARY= +LIBNSPR_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) SHARED_LIBRARY= install +LIBNSPR_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) SHARED_LIBRARY= install +endif + +ifeq ($(BR2_SHARED_LIBS),y) +LIBNSPR_MAKE_OPTS = LIBRARY= +LIBNSPR_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) LIBRARY= install +LIBNSPR_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LIBRARY= install +endif + +$(eval $(autotools-package)) diff --git a/package/libnss/0001-cross-compile.patch b/package/libnss/0001-cross-compile.patch new file mode 100644 index 0000000000..31de71bc5a --- /dev/null +++ b/package/libnss/0001-cross-compile.patch @@ -0,0 +1,48 @@ +This patch allows us to set a value for the cross compiler via TARGETCC without +setting CC on the command line. CC is used for host tools as well as cross +compiled code so we cannot define it on the command line without breaking +the host tools build. + +[Gustavo: update for nss 3.16.1] +[baruch: add OPTIMIZER handling] +Signed-off-by: Will Newton + +diff -Nuar nss-3.16.1-orig/nss/coreconf/Linux.mk nss-3.16.1/nss/coreconf/Linux.mk +--- nss-3.16.1-orig/nss/coreconf/Linux.mk 2014-05-02 06:27:18.000000000 +0300 ++++ nss-3.16.1/nss/coreconf/Linux.mk 2014-07-01 02:38:18.701480512 +0300 +@@ -16,9 +16,13 @@ + IMPL_STRATEGY = _PTH + endif + +-CC = gcc +-CCC = g++ +-RANLIB = ranlib ++TARGETCC = gcc ++TARGETCCC = g++ ++TARGETRANLIB = ranlib ++ ++CC = $(TARGETCC) ++CCC = $(TARGETCCC) ++RANLIB = $(TARGETRANLIB) + + DEFAULT_COMPILER = gcc + +@@ -125,6 +129,7 @@ + endif + endif + ++OPTIMIZER = $(TARGET_OPTIMIZER) + + ifeq ($(USE_PTHREADS),1) + OS_PTHREAD = -lpthread +diff -Nuar nss-3.16.1-orig/nss/coreconf/nsinstall/Makefile nss-3.16.1/nss/coreconf/nsinstall/Makefile +--- nss-3.16.1-orig/nss/coreconf/nsinstall/Makefile 2014-05-02 06:27:18.000000000 +0300 ++++ nss-3.16.1/nss/coreconf/nsinstall/Makefile 2014-07-01 02:38:48.102185011 +0300 +@@ -31,6 +31,7 @@ + + ifdef NATIVE_FLAGS + OS_CFLAGS=$(NATIVE_FLAGS) ++OPTIMIZER= + endif + + include $(DEPTH)/coreconf/rules.mk diff --git a/package/libnss/0002-uclibc.patch b/package/libnss/0002-uclibc.patch new file mode 100644 index 0000000000..b81db930be --- /dev/null +++ b/package/libnss/0002-uclibc.patch @@ -0,0 +1,20 @@ +uCLibc does not define RTLD_NOLOAD. + +[Gustavo: update for nss 3.16.1] +Signed-off-by: Will Newton + +diff -Nura nss-3.16.1.orig/nss/lib/freebl/stubs.c nss-3.16.1/nss/lib/freebl/stubs.c +--- nss-3.16.1.orig/nss/lib/freebl/stubs.c 2014-06-18 10:34:30.529997002 -0300 ++++ nss-3.16.1/nss/lib/freebl/stubs.c 2014-06-18 10:36:25.508882650 -0300 +@@ -594,6 +594,11 @@ + return SECSuccess; + } + ++/* uClibc does not define RTLD_NOLOAD. */ ++#ifndef RTLD_NOLOAD ++#define RTLD_NOLOAD 0 ++#endif ++ + /* + * fetch the library if it's loaded. For NSS it should already be loaded + */ diff --git a/package/libnss/Config.in b/package/libnss/Config.in new file mode 100644 index 0000000000..f07bb043a6 --- /dev/null +++ b/package/libnss/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBNSS + bool "libnss" + select BR2_PACKAGE_LIBNSPR + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_ZLIB + depends on BR2_TOOLCHAIN_HAS_THREADS # libnspr + depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT # libnspr + depends on !BR2_STATIC_LIBS + help + Network Security Services (NSS) is a set of libraries designed + to support development of security-enabled client and server + applications. Applications built with NSS can support SSL v2 + and v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, + and X.509 v3 certificates. + + http://www.mozilla.org/projects/security/pki/nss/ + +comment "libnss needs a toolchain w/ threads, dynamic library" + depends on BR2_PACKAGE_LIBNSPR_ARCH_SUPPORT + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/libnss/libnss.hash b/package/libnss/libnss.hash new file mode 100644 index 0000000000..8e03faf31c --- /dev/null +++ b/package/libnss/libnss.hash @@ -0,0 +1,2 @@ +# From https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_23_RTM/src/SHA256SUMS +sha256 94b383e31c9671e9dfcca81084a8a813817e8f05a57f54533509b318d26e11cf nss-3.23.tar.gz diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk new file mode 100644 index 0000000000..e2bbf1f39f --- /dev/null +++ b/package/libnss/libnss.mk @@ -0,0 +1,89 @@ +################################################################################ +# +# libnss +# +################################################################################ + +LIBNSS_VERSION = 3.23 +LIBNSS_SOURCE = nss-$(LIBNSS_VERSION).tar.gz +LIBNSS_SITE = https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(subst .,_,$(LIBNSS_VERSION))_RTM/src +LIBNSS_DISTDIR = dist +LIBNSS_INSTALL_STAGING = YES +LIBNSS_DEPENDENCIES = libnspr sqlite zlib +LIBNSS_LICENSE = MPLv2.0 +LIBNSS_LICENSE_FILES = nss/COPYING + +LIBNSS_BUILD_VARS = \ + MOZILLA_CLIENT=1 \ + NSPR_INCLUDE_DIR=$(STAGING_DIR)/usr/include/nspr \ + NSPR_LIB_DIR=$(STAGING_DIR)/usr/lib \ + BUILD_OPT=1 \ + NS_USE_GCC=1 \ + NSS_DISABLE_GTESTS=1 \ + NSS_USE_SYSTEM_SQLITE=1 \ + NSS_ENABLE_ECC=1 \ + NATIVE_CC="$(HOSTCC)" \ + TARGETCC="$(TARGET_CC)" \ + TARGETCCC="$(TARGET_CXX)" \ + TARGETRANLIB="$(TARGET_RANLIB)" \ + OS_ARCH="Linux" \ + OS_RELEASE="2.6" \ + OS_TEST="$(ARCH)" + +# #pragma usage needs gcc >= 4.8 +# See https://bugzilla.mozilla.org/show_bug.cgi?id=1226179 +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8),) +LIBNSS_BUILD_VARS += NSS_ENABLE_WERROR=0 +endif + +ifeq ($(BR2_ARCH_IS_64),y) +# MIPS64 n32 is treated as a 32-bit architecture by libnss. +# See: https://bugzilla.mozilla.org/show_bug.cgi?id=1010730 +ifeq ($(BR2_MIPS_NABI32),) +LIBNSS_BUILD_VARS += USE_64=1 +endif +endif + +define LIBNSS_BUILD_CMDS + $(MAKE1) -C $(@D)/nss coreconf \ + SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \ + DIST=$(@D)/$(LIBNSS_DISTDIR) \ + CHECKLOC= \ + $(LIBNSS_BUILD_VARS) + $(MAKE1) -C $(@D)/nss lib/dbm all \ + SOURCE_MD_DIR=$(@D)/$(LIBNSS_DISTDIR) \ + DIST=$(@D)/$(LIBNSS_DISTDIR) \ + CHECKLOC= \ + $(LIBNSS_BUILD_VARS) TARGET_OPTIMIZER="$(TARGET_CFLAGS)" \ + NATIVE_FLAGS="$(HOST_CFLAGS)" +endef + +define LIBNSS_INSTALL_STAGING_CMDS + $(INSTALL) -m 755 -t $(STAGING_DIR)/usr/lib/ \ + $(@D)/$(LIBNSS_DISTDIR)/lib/*.so + $(INSTALL) -m 755 -d $(STAGING_DIR)/usr/include/nss + $(INSTALL) -m 644 -t $(STAGING_DIR)/usr/include/nss \ + $(@D)/$(LIBNSS_DISTDIR)/public/nss/* + $(INSTALL) -m 755 -t $(STAGING_DIR)/usr/lib/ \ + $(@D)/$(LIBNSS_DISTDIR)/lib/*.a + $(INSTALL) -D -m 0644 $(TOPDIR)/package/libnss/nss.pc.in \ + $(STAGING_DIR)/usr/lib/pkgconfig/nss.pc + $(SED) 's/@VERSION@/$(LIBNSS_VERSION)/g;' \ + $(STAGING_DIR)/usr/lib/pkgconfig/nss.pc +endef + +define LIBNSS_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/lib/ \ + $(@D)/$(LIBNSS_DISTDIR)/lib/*.so + $(INSTALL) -m 755 -d $(TARGET_DIR)/usr/include/nss + $(INSTALL) -m 644 -t $(TARGET_DIR)/usr/include/nss \ + $(@D)/$(LIBNSS_DISTDIR)/public/nss/* + $(INSTALL) -m 755 -t $(TARGET_DIR)/usr/lib/ \ + $(@D)/$(LIBNSS_DISTDIR)/lib/*.a + $(INSTALL) -D -m 0644 $(TOPDIR)/package/libnss/nss.pc.in \ + $(TARGET_DIR)/usr/lib/pkgconfig/nss.pc + $(SED) 's/@VERSION@/$(LIBNSS_VERSION)/g;' \ + $(TARGET_DIR)/usr/lib/pkgconfig/nss.pc +endef + +$(eval $(generic-package)) diff --git a/package/libnss/nss.pc.in b/package/libnss/nss.pc.in new file mode 100644 index 0000000000..e27783f64d --- /dev/null +++ b/package/libnss/nss.pc.in @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/nss + +Name: NSS +Description: Mozilla Network Security Services +Version: @VERSION@ +Requires: nspr +Libs: -L${libdir} -lnss3 -lnssutil3 -lsmime3 -lssl3 +Cflags: -I${includedir} diff --git a/package/liboauth/Config.in b/package/liboauth/Config.in new file mode 100644 index 0000000000..77a78f115a --- /dev/null +++ b/package/liboauth/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBOAUTH + bool "liboauth" + select BR2_PACKAGE_OPENSSL + help + liboauth is a collection of c functions implementing the oAuth + Core 1.0 Rev A standard API. liboauth provides basic functions to + escape and encode parameters according to oAuth specs and offers + high-level functions to sign requests or verify signatures. + + http://liboauth.sourceforge.net/ diff --git a/package/liboauth/liboauth.hash b/package/liboauth/liboauth.hash new file mode 100644 index 0000000000..6806a08f9f --- /dev/null +++ b/package/liboauth/liboauth.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 0df60157b052f0e774ade8a8bac59d6e8d4b464058cc55f9208d72e41156811f liboauth-1.0.3.tar.gz diff --git a/package/liboauth/liboauth.mk b/package/liboauth/liboauth.mk new file mode 100644 index 0000000000..bd54330ddf --- /dev/null +++ b/package/liboauth/liboauth.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# liboauth +# +################################################################################ + +LIBOAUTH_VERSION = 1.0.3 +LIBOAUTH_SITE = http://downloads.sourceforge.net/project/liboauth +LIBOAUTH_INSTALL_STAGING = YES +LIBOAUTH_DEPENDENCIES += host-pkgconf openssl +LIBOAUTH_LICENSE = MIT +LIBOAUTH_LICENSE_FILES = COPYING.MIT + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +LIBOAUTH_DEPENDENCIES += libcurl +else +LIBOAUTH_CONF_OPTS += --disable-libcurl +endif + +$(eval $(autotools-package)) diff --git a/package/libogg/Config.in b/package/libogg/Config.in new file mode 100644 index 0000000000..bf719ff4d7 --- /dev/null +++ b/package/libogg/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBOGG + bool "libogg" + help + Ogg is a multimedia container format, and the native file + and stream format for the Xiph.org multimedia codecs. As + with all Xiph.org technology is it an open format free for + anyone to use. + + http://xiph.org/ogg/ diff --git a/package/libogg/libogg.hash b/package/libogg/libogg.hash new file mode 100644 index 0000000000..393ebee2a3 --- /dev/null +++ b/package/libogg/libogg.hash @@ -0,0 +1,2 @@ +# From: http://www.xiph.org/downloads/ +sha256 3f687ccdd5ac8b52d76328fbbfebc70c459a40ea891dbf3dccb74a210826e79b libogg-1.3.2.tar.xz diff --git a/package/libogg/libogg.mk b/package/libogg/libogg.mk new file mode 100644 index 0000000000..8fff52970b --- /dev/null +++ b/package/libogg/libogg.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libogg +# +################################################################################ + +LIBOGG_VERSION = 1.3.2 +LIBOGG_SOURCE = libogg-$(LIBOGG_VERSION).tar.xz +LIBOGG_SITE = http://downloads.xiph.org/releases/ogg +LIBOGG_LICENSE = BSD-3c +LIBOGG_LICENSE_FILES = COPYING + +LIBOGG_INSTALL_STAGING = YES +LIBOGG_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/libopenh264/Config.in b/package/libopenh264/Config.in new file mode 100644 index 0000000000..2b77578a83 --- /dev/null +++ b/package/libopenh264/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBOPENH264_ARCH_SUPPORTS + bool + default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_x86_64 + +config BR2_PACKAGE_LIBOPENH264 + bool "libopenh264" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_LIBOPENH264_ARCH_SUPPORTS + help + OpenH264 is a codec library which supports H.264 encoding and + decoding. + + http://www.openh264.org + +comment "libopenh264 needs a toolchain w/ C++, dynamic library, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS + depends on BR2_PACKAGE_LIBOPENH264_ARCH_SUPPORTS diff --git a/package/libopenh264/libopenh264.mk b/package/libopenh264/libopenh264.mk new file mode 100644 index 0000000000..cbe30bcc8e --- /dev/null +++ b/package/libopenh264/libopenh264.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# libopenh264 +# +################################################################################ + +LIBOPENH264_VERSION = v1.4.0 +LIBOPENH264_SITE = $(call github,cisco,openh264,$(LIBOPENH264_VERSION)) +LIBOPENH264_LICENSE = BSD-2c +LIBOPENH264_LICENSE_FILES = LICENSE +LIBOPENH264_INSTALL_STAGING = YES + +ifeq ($(BR2_aarch64),y) +LIBOPENH264_ARCH = aarch64 +else ifeq ($(BR2_arm)$(BR2_armeb),y) +LIBOPENH264_ARCH = arm +else ifeq ($(BR2_i386),y) +LIBOPENH264_ARCH = x86 +LIBOPENH264_DEPENDENCIES += host-nasm +else ifeq ($(BR2_mips)$(BR2_mipsel),y) +LIBOPENH264_ARCH = mips +else ifeq ($(BR2_mips64)$(BR2_mips64el),y) +LIBOPENH264_ARCH = mips64 +else ifeq ($(BR2_x86_64),y) +LIBOPENH264_ARCH = x86_64 +LIBOPENH264_DEPENDENCIES += host-nasm +endif + +# ENABLE64BIT is really only used for x86-64, other 64 bits +# architecture don't need it. +LIBOPENH264_MAKE_OPTS = \ + ARCH=$(LIBOPENH264_ARCH) \ + ENABLE64BIT=$(if $(BR2_x86_64),Yes,No) + +define LIBOPENH264_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + $(LIBOPENH264_MAKE_OPTS) +endef + +define LIBOPENH264_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + $(LIBOPENH264_MAKE_OPTS) \ + DESTDIR=$(STAGING_DIR) PREFIX=/usr install +endef + +define LIBOPENH264_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + $(LIBOPENH264_MAKE_OPTS) \ + DESTDIR=$(TARGET_DIR) PREFIX=/usr install +endef + +$(eval $(generic-package)) diff --git a/package/liboping/Config.in b/package/liboping/Config.in new file mode 100644 index 0000000000..1d2de31874 --- /dev/null +++ b/package/liboping/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBOPING + bool "liboping" + help + liboping is a C library to generate ICMP echo requests, + better known as "ping packets". + + http://noping.cc/ diff --git a/package/liboping/liboping.hash b/package/liboping/liboping.hash new file mode 100644 index 0000000000..536f6aef50 --- /dev/null +++ b/package/liboping/liboping.hash @@ -0,0 +1,2 @@ +# From http://noping.cc/#download +sha256 824792ae7fc5e9569bacc4167b89de31f6ba8476de44760f0bc272682e894b41 liboping-1.8.0.tar.gz diff --git a/package/liboping/liboping.mk b/package/liboping/liboping.mk new file mode 100644 index 0000000000..94de73c373 --- /dev/null +++ b/package/liboping/liboping.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# liboping +# +################################################################################ + +LIBOPING_VERSION = 1.8.0 +LIBOPING_SITE = http://noping.cc/files +LIBOPING_INSTALL_STAGING = YES +LIBOPING_DEPENDENCIES = $(if $(BR2_PACKAGE_NCURSES),ncurses) +LIBOPING_CONF_OPTS = --without-perl-bindings +LIBOPING_LICENSE = LGPLv2.1+, GPLv2 +LIBOPING_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libosip2/Config.in b/package/libosip2/Config.in new file mode 100644 index 0000000000..5b1d3d2661 --- /dev/null +++ b/package/libosip2/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBOSIP2 + bool "libosip2" + help + GNU SIP (Session Initiation Protocol) + This library aims to provide multimedia and telecom software + developers an easy and powerful interface to initiate and + control SIP based sessions in their applications. + SIP is a open standard replacement from IETF for H323. + + http://www.gnu.org/software/osip/ diff --git a/package/libosip2/libosip2.hash b/package/libosip2/libosip2.hash new file mode 100644 index 0000000000..9ff2d9a98a --- /dev/null +++ b/package/libosip2/libosip2.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 c9a18b0c760506d150017cdb1fa5c1cefe12b8dcbbf9a7e784eb75af376e96cd libosip2-3.6.0.tar.gz diff --git a/package/libosip2/libosip2.mk b/package/libosip2/libosip2.mk new file mode 100644 index 0000000000..f22dcc3117 --- /dev/null +++ b/package/libosip2/libosip2.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libosip2 +# +################################################################################ + +LIBOSIP2_VERSION = 3.6.0 +LIBOSIP2_SITE = $(BR2_GNU_MIRROR)/osip +LIBOSIP2_INSTALL_STAGING = YES +LIBOSIP2_LICENSE = LGPLv2.1+ +LIBOSIP2_LICENSE_FILES = COPYING + +ifeq ($(BR2_arc),y) +# toolchain __arc__ define conflicts with libosip2 source +LIBOSIP2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -U__arc__" +endif + +LIBOSIP2_CONF_OPTS = \ + --enable-mt=$(if $(BR2_TOOLCHAIN_HAS_THREADS),yes,no) + +$(eval $(autotools-package)) diff --git a/package/libpam-radius-auth/Config.in b/package/libpam-radius-auth/Config.in new file mode 100644 index 0000000000..a0dec148d7 --- /dev/null +++ b/package/libpam-radius-auth/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBPAM_RADIUS_AUTH + bool "libpam-radius-auth" + help + This is the PAM to RADIUS authentication module. It allows + any PAM-capable machine to become a RADIUS client for + authentication and accounting requests. You will need a + RADIUS server to perform the actual authentication. + + http://freeradius.org/pam_radius_auth/ diff --git a/package/libpam-radius-auth/libpam-radius-auth.hash b/package/libpam-radius-auth/libpam-radius-auth.hash new file mode 100644 index 0000000000..ffd7404df3 --- /dev/null +++ b/package/libpam-radius-auth/libpam-radius-auth.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking PGP signature +sha256 742d79fc39824726c098e746bd3dc3484f983f5ee082c621c1e848b2c3725305 pam_radius-1.4.0.tar.gz diff --git a/package/libpam-radius-auth/libpam-radius-auth.mk b/package/libpam-radius-auth/libpam-radius-auth.mk new file mode 100644 index 0000000000..5ed5953c5b --- /dev/null +++ b/package/libpam-radius-auth/libpam-radius-auth.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libpam-radius-auth +# +################################################################################ + +LIBPAM_RADIUS_AUTH_VERSION = 1.4.0 +LIBPAM_RADIUS_AUTH_SITE = ftp://ftp.freeradius.org/pub/radius +LIBPAM_RADIUS_AUTH_SOURCE = pam_radius-$(LIBPAM_RADIUS_AUTH_VERSION).tar.gz +LIBPAM_RADIUS_AUTH_DEPENDENCIES = linux-pam +LIBPAM_RADIUS_AUTH_INSTALL_STAGING = YES +LIBPAM_RADIUS_AUTH_LICENSE = GPLv2+ +LIBPAM_RADIUS_AUTH_LICENSE_FILES = LICENSE +# While autoconf is used for configuration, the Makefile is +# hand-written, so we need to pass CC, LD, CFLAGS at build time. +LIBPAM_RADIUS_AUTH_MAKE_ENV = $(TARGET_CONFIGURE_OPTS) + +define LIBPAM_RADIUS_AUTH_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/lib/security/ + cp -dpfr $(@D)/pam_radius_auth.so* $(STAGING_DIR)/lib/security/ +endef + +define LIBPAM_RADIUS_AUTH_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/lib/security/ + cp -dpfr $(@D)/pam_radius_auth.so* $(TARGET_DIR)/lib/security/ +endef + +$(eval $(autotools-package)) diff --git a/package/libpam-tacplus/Config.in b/package/libpam-tacplus/Config.in new file mode 100644 index 0000000000..2d80809d3b --- /dev/null +++ b/package/libpam-tacplus/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBPAM_TACPLUS + bool "libpam-tacplus" + help + TACACS+ protocol client library and PAM module in C. This + PAM module support authentication, authorization (account + management) and accounting (session management)performed + using TACACS+ protocol designed by Cisco. + + https://github.com/jeroennijhof/pam_tacplus diff --git a/package/libpam-tacplus/libpam-tacplus.mk b/package/libpam-tacplus/libpam-tacplus.mk new file mode 100644 index 0000000000..6696d89887 --- /dev/null +++ b/package/libpam-tacplus/libpam-tacplus.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libpam-tacplus +# +################################################################################ + +LIBPAM_TACPLUS_VERSION = 1.3.9 +LIBPAM_TACPLUS_SITE = $(call github,jeroennijhof,pam_tacplus,$(LIBPAM_TACPLUS_VERSION)) +LIBPAM_TACPLUS_LICENSE = GPLv2+ +LIBPAM_TACPLUS_LICENSE_FILES = COPYING +LIBPAM_TACPLUS_DEPENDENCIES = linux-pam +# Fetching from github, we need to generate the configure script +LIBPAM_TACPLUS_AUTORECONF = YES +LIBPAM_TACPLUS_AUTORECONF_OPTS = -I m4 +LIBPAM_TACPLUS_INSTALL_STAGING = YES +LIBPAM_TACPLUS_CONF_ENV = \ + ax_cv_check_cflags___fstack_protector_all=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) +LIBPAM_TACPLUS_CONF_OPTS = \ + --enable-pamdir=/lib/security + +$(eval $(autotools-package)) diff --git a/package/libpcap/0001-remove-libnl-include-path.patch b/package/libpcap/0001-remove-libnl-include-path.patch new file mode 100644 index 0000000000..d0760d4f9d --- /dev/null +++ b/package/libpcap/0001-remove-libnl-include-path.patch @@ -0,0 +1,25 @@ +Remove hardcoded path to libnl3 include directory + +Signed-off-by: Thomas Petazzoni +[Gustavo: update for 1.7.2] + +diff -Nura libpcap-1.7.2.orig/configure.in libpcap-1.7.2/configure.in +--- libpcap-1.7.2.orig/configure.in 2015-03-14 08:02:05.538706347 -0300 ++++ libpcap-1.7.2/configure.in 2015-03-14 08:17:22.637519050 -0300 +@@ -461,14 +461,13 @@ + # + # Yes, we have libnl 3.x. + # +- LIBS="${libnldir} -lnl-genl-3 -lnl-3 $LIBS" ++ LIBS="-lnl-genl-3 -lnl-3 $LIBS" + AC_DEFINE(HAVE_LIBNL,1,[if libnl exists]) + AC_DEFINE(HAVE_LIBNL_3_x,1,[if libnl exists and is version 3.x]) + AC_DEFINE(HAVE_LIBNL_NLE,1,[libnl has NLE_FAILURE]) + AC_DEFINE(HAVE_LIBNL_SOCKETS,1,[libnl has new-style socket api]) +- V_INCLS="$V_INCLS ${incdir}" + have_any_nl="yes" +- ],[], ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 ) ++ ],[], -lnl-genl-3 -lnl-3 ) + + if test x$have_any_nl = xno ; then + # diff --git a/package/libpcap/0002-configure.in-fix-detect-of-if_bonding.h-on-uclinux.patch b/package/libpcap/0002-configure.in-fix-detect-of-if_bonding.h-on-uclinux.patch new file mode 100644 index 0000000000..7838c6f256 --- /dev/null +++ b/package/libpcap/0002-configure.in-fix-detect-of-if_bonding.h-on-uclinux.patch @@ -0,0 +1,30 @@ +From 5b8dc4eaeab60d5effc33055e5bce9ac0d98d339 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Tue, 2 Jun 2015 21:39:15 +0300 +Subject: [PATCH] configure.in: fix detect of if_bonding.h on uclinux + +noMMU Linux (uClinux) is also Linux + +Upstream status: https://github.com/the-tcpdump-group/libpcap/pull/440 + +Signed-off-by: Baruch Siach +--- + configure.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index be4b29e2f8ba..31287d0dbe61 100644 +--- a/configure.in ++++ b/configure.in +@@ -149,7 +149,7 @@ struct rtentry; + fi + + case "$host_os" in +-linux*) ++linux*|uclinux*) + AC_CHECK_HEADERS(linux/sockios.h linux/if_bonding.h,,, + [ + #include +-- +2.1.4 + diff --git a/package/libpcap/Config.in b/package/libpcap/Config.in new file mode 100644 index 0000000000..7f9517a7bc --- /dev/null +++ b/package/libpcap/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBPCAP + bool "libpcap" + select BR2_PACKAGE_ZLIB + help + A system-independent library for user-level network packet capture. + + http://www.tcpdump.org/ diff --git a/package/libpcap/libpcap.hash b/package/libpcap/libpcap.hash new file mode 100644 index 0000000000..5ce53673b8 --- /dev/null +++ b/package/libpcap/libpcap.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 7ad3112187e88328b85e46dce7a9b949632af18ee74d97ffc3f2b41fe7f448b0 libpcap-1.7.4.tar.gz diff --git a/package/libpcap/libpcap.mk b/package/libpcap/libpcap.mk new file mode 100644 index 0000000000..4c7a66c09d --- /dev/null +++ b/package/libpcap/libpcap.mk @@ -0,0 +1,63 @@ +################################################################################ +# +# libpcap +# +################################################################################ + +LIBPCAP_VERSION = 1.7.4 +LIBPCAP_SITE = http://www.tcpdump.org/release +LIBPCAP_LICENSE = BSD-3c +LIBPCAP_LICENSE_FILES = LICENSE +LIBPCAP_INSTALL_STAGING = YES +LIBPCAP_DEPENDENCIES = zlib host-flex host-bison + +# We're patching configure.in +LIBPCAP_AUTORECONF = YES +LIBPCAP_CONF_ENV = \ + ac_cv_linux_vers=2 \ + ac_cv_header_linux_wireless_h=yes \ + CFLAGS="$(LIBPCAP_CFLAGS)" +LIBPCAP_CFLAGS = $(TARGET_CFLAGS) +LIBPCAP_CONF_OPTS = --disable-yydebug --with-pcap=linux +LIBPCAP_CONFIG_SCRIPTS = pcap-config + +# Omit -rpath from pcap-config output +define LIBPCAP_CONFIG_REMOVE_RPATH + $(SED) 's/^V_RPATH_OPT=.*/V_RPATH_OPT=""/g' $(@D)/pcap-config +endef +LIBPCAP_POST_BUILD_HOOKS = LIBPCAP_CONFIG_REMOVE_RPATH + +# On purpose, not compatible with bluez5 +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y) +LIBPCAP_DEPENDENCIES += bluez_utils +else +LIBPCAP_CONF_OPTS += --disable-bluetooth +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +LIBPCAP_CONF_OPTS += --enable-dbus +LIBPCAP_DEPENDENCIES += dbus +else +LIBPCAP_CONF_OPTS += --disable-dbus +endif + +ifeq ($(BR2_PACKAGE_LIBUSB),y) +LIBPCAP_CONF_OPTS += --enable-canusb +LIBPCAP_DEPENDENCIES += libusb +else +LIBPCAP_CONF_OPTS += --disable-canusb +endif + +ifeq ($(BR2_PACKAGE_LIBNL),y) +LIBPCAP_DEPENDENCIES += libnl +LIBPCAP_CFLAGS += "-I$(STAGING_DIR)/usr/include/libnl3" +else +LIBPCAP_CONF_OPTS += --without-libnl +endif + +# microblaze/sparc64 need -fPIC instead of -fpic +ifeq ($(BR2_microblaze)$(BR2_sparc64),y) +LIBPCAP_CFLAGS += -fPIC +endif + +$(eval $(autotools-package)) diff --git a/package/libpciaccess/0001-limits_h.patch b/package/libpciaccess/0001-limits_h.patch new file mode 100644 index 0000000000..c5c8444a59 --- /dev/null +++ b/package/libpciaccess/0001-limits_h.patch @@ -0,0 +1,22 @@ +Fix compilation error with musl-based toolchain + +linux_sysfs.c:751:15: error: 'PATH_MAX' undeclared (first use in this function) + char name[PATH_MAX]; + +Patch applied upstream: +http://cgit.freedesktop.org/xorg/lib/libpciaccess/commit/?id=8ea3af620a2d4ad5648917b4a0ef2b23ff566774 + +Signed-off-by: Felix Janda +Signed-off-by: Bernd Kuhls + +diff -uNr libpciaccess-0.13.3.org/src/linux_sysfs.c libpciaccess-0.13.3/src/linux_sysfs.c +--- libpciaccess-0.13.3.org/src/linux_sysfs.c 2015-02-04 00:59:14.000000000 +0100 ++++ libpciaccess-0.13.3/src/linux_sysfs.c 2015-04-10 21:57:35.000000000 +0200 +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + + #if defined(__i386__) || defined(__x86_64__) || defined(__arm__) + #include diff --git a/package/libpciaccess/0002-musl-arm.patch b/package/libpciaccess/0002-musl-arm.patch new file mode 100644 index 0000000000..0077f451bf --- /dev/null +++ b/package/libpciaccess/0002-musl-arm.patch @@ -0,0 +1,20 @@ +Fix musl build + +Inspired by http://patchwork.openembedded.org/patch/111661/ +"inb/outb are implemented for ARM on glibc but not on linux in general +therefore the conditional has to reflect that" + +Signed-off-by: Bernd Kuhls + +diff -uNr libpciaccess-0.13.4.org/src/linux_sysfs.c libpciaccess-0.13.4/src/linux_sysfs.c +--- libpciaccess-0.13.4.org/src/linux_sysfs.c 2015-05-01 06:44:47.000000000 +0200 ++++ libpciaccess-0.13.4/src/linux_sysfs.c 2016-01-24 15:27:57.141562678 +0100 +@@ -49,7 +49,7 @@ + #include + #include + +-#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) ++#if defined(__i386__) || defined(__x86_64__) + #include + #else + #define inb(x) -1 diff --git a/package/libpciaccess/Config.in b/package/libpciaccess/Config.in new file mode 100644 index 0000000000..6cc983f577 --- /dev/null +++ b/package/libpciaccess/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_LIBPCIACCESS + bool "libpciaccess" + help + X.Org libpciaccess diff --git a/package/libpciaccess/libpciaccess.hash b/package/libpciaccess/libpciaccess.hash new file mode 100644 index 0000000000..0483c4c814 --- /dev/null +++ b/package/libpciaccess/libpciaccess.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002590.html +sha256 07f864654561e4ac8629a0ef9c8f07fbc1f8592d1b6c418431593e9ba2cf2fcf libpciaccess-0.13.4.tar.bz2 diff --git a/package/libpciaccess/libpciaccess.mk b/package/libpciaccess/libpciaccess.mk new file mode 100644 index 0000000000..ced0786a18 --- /dev/null +++ b/package/libpciaccess/libpciaccess.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libpciaccess +# +################################################################################ + +LIBPCIACCESS_VERSION = 0.13.4 +LIBPCIACCESS_SOURCE = libpciaccess-$(LIBPCIACCESS_VERSION).tar.bz2 +LIBPCIACCESS_SITE = http://xorg.freedesktop.org/releases/individual/lib +LIBPCIACCESS_LICENSE = MIT +LIBPCIACCESS_LICENSE_FILES = COPYING +LIBPCIACCESS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_ZLIB),y) +LIBPCIACCESS_CONF_OPTS += --with-zlib +LIBPCIACCESS_DEPENDENCIES += zlib +else +LIBPCIACCESS_CONF_OPTS += --without-zlib +endif + +$(eval $(autotools-package)) diff --git a/package/libpfm4/Config.in b/package/libpfm4/Config.in new file mode 100644 index 0000000000..441c6dee09 --- /dev/null +++ b/package/libpfm4/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBPFM4 + bool "libpfm4" + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + help + A helper library to help encode Performance Events to use with + Operating system kernels performance monitoring interfaces. + + http://perfmon2.sourceforge.net/ + +comment "libpfm4 needs a toolchain w/ NPTL" + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL diff --git a/package/libpfm4/libpfm4.hash b/package/libpfm4/libpfm4.hash new file mode 100644 index 0000000000..8bebc493fd --- /dev/null +++ b/package/libpfm4/libpfm4.hash @@ -0,0 +1,5 @@ +# From http://sourceforge.net/projects/perfmon2/files/libpfm4/: +sha1 2ed06d6e746f7b1cd4b70e9736e621052f60d625 libpfm-4.6.0.tar.gz +md5 5077b9022440e4951d96f2d0e73bd487 libpfm-4.6.0.tar.gz +# Locally calculated +sha256 5ab1e5b0472550f9037a8800834f6bc3b927690070f69fac0b67284b4b05fd5f libpfm-4.6.0.tar.gz diff --git a/package/libpfm4/libpfm4.mk b/package/libpfm4/libpfm4.mk new file mode 100644 index 0000000000..147be7c2b9 --- /dev/null +++ b/package/libpfm4/libpfm4.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# libpfm4 +# +################################################################################ + +LIBPFM4_VERSION = 4.6.0 +LIBPFM4_SOURCE = libpfm-$(LIBPFM4_VERSION).tar.gz +LIBPFM4_SITE = http://downloads.sourceforge.net/project/perfmon2/libpfm4 +LIBPFM4_LICENSE = libpfm4 license +LIBPFM4_LICENSE_FILES = COPYING +LIBPFM4_INSTALL_STAGING = YES + +LIBPFM4_FLAGS = SYS=Linux ARCH=$(BR2_ARCH) \ + CC="$(TARGET_CC)" LDCONFIG=true \ + CONFIG_PFMLIB_SHARED=$(if $(BR2_STATIC_LIBS),n,y) \ + DBG= + +define LIBPFM4_BUILD_CMDS + $(MAKE) -C $(@D) $(LIBPFM4_FLAGS) +endef + +define LIBPFM4_INSTALL_STAGING_CMDS + make -C $(@D) $(LIBPFM4_FLAGS) PREFIX=$(STAGING_DIR)/usr install +endef + +define LIBPFM4_INSTALL_TARGET_CMDS + make -C $(@D) $(LIBPFM4_FLAGS) PREFIX=$(TARGET_DIR)/usr install +endef + +$(eval $(generic-package)) diff --git a/package/libphidget/Config.in b/package/libphidget/Config.in new file mode 100644 index 0000000000..7466fb5056 --- /dev/null +++ b/package/libphidget/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_LIBPHIDGET + bool "libphidget" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_LIBUSB + help + The libphidget library provides an API for controlling Phidgets + USB devices. The library translates API function calls to libusb + function calls to control attached Phidgets devices that provide + GPIO's, DAC's, accelerometers, servo motors, and other capabilities + either singly or on combo devices. + + To use libphidget for controlling locally attached devices you + need to set up the userspace USB device tree /dev/bus/usb. See + file udev/99-phidgets.rules. + + The libphidget library also contains an API for sending commands + to a local or remote phidgetwebservice using HTTP. The + phidgetwebservice then translates HTTP requests to libphidget API + function calls to control locally attached Phidgets devices. + + http://phidgets.com/ + +comment "libphidget needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_STATIC_LIBS diff --git a/package/libphidget/libphidget.mk b/package/libphidget/libphidget.mk new file mode 100644 index 0000000000..1b2557d726 --- /dev/null +++ b/package/libphidget/libphidget.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libphidget +# +################################################################################ + +LIBPHIDGET_VERSION = 2.1.8.20140319 +LIBPHIDGET_SOURCE = libphidget_$(LIBPHIDGET_VERSION).tar.gz +LIBPHIDGET_SITE = http://www.phidgets.com/downloads/libraries +LIBPHIDGET_DEPENDENCIES = libusb +LIBPHIDGET_CONF_OPTS = --disable-ldconfig +LIBPHIDGET_INSTALL_STAGING = YES +LIBPHIDGET_LICENSE = LGPLv3 +LIBPHIDGET_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libpjsip/0001-Use-mutex-types-compatible-with-musl-fixes-musl-buil.patch b/package/libpjsip/0001-Use-mutex-types-compatible-with-musl-fixes-musl-buil.patch new file mode 100644 index 0000000000..ab3444b710 --- /dev/null +++ b/package/libpjsip/0001-Use-mutex-types-compatible-with-musl-fixes-musl-buil.patch @@ -0,0 +1,53 @@ +From ba1057d74aac6c2dde5477bd6a2deea79f14962c Mon Sep 17 00:00:00 2001 +From: Luca Ceresoli +Date: Sat, 12 Mar 2016 15:19:34 +0100 +Subject: [PATCH 1/2] Use mutex types compatible with musl (fixes musl build) + +PTHREAD_MUTEX_FAST_NP and PTHREAD_MUTEX_RECURSIVE_NP are not defined +in the musl C library. Use values that map to the same mutex type in +GNU libc and uClibc-ng. + +Fixes the following build errors when building with musl: + + ../src/pj/os_core_unix.c: In function 'init_mutex': + ../src/pj/os_core_unix.c:1128:40: error: 'PTHREAD_MUTEX_FAST_NP' undeclared (first use in this function) + rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_FAST_NP); + ^ + ../src/pj/os_core_unix.c:1128:40: note: each undeclared identifier is reported only once for each function it appears in + ../src/pj/os_core_unix.c:1138:40: error: 'PTHREAD_MUTEX_RECURSIVE_NP' undeclared (first use in this function) + rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); + ^ + +Original patch: +http://git.alpinelinux.org/cgit/aports/plain/main/pjproject/musl-fixes.patch + +Signed-off-by: Luca Ceresoli +--- + pjlib/src/pj/os_core_unix.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pjlib/src/pj/os_core_unix.c b/pjlib/src/pj/os_core_unix.c +index 1c87b2f..f08ba27 100644 +--- a/pjlib/src/pj/os_core_unix.c ++++ b/pjlib/src/pj/os_core_unix.c +@@ -1125,7 +1125,7 @@ static pj_status_t init_mutex(pj_mutex_t *mutex, const char *name, int type) + if (type == PJ_MUTEX_SIMPLE) { + #if (defined(PJ_LINUX) && PJ_LINUX!=0) || \ + defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE) +- rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_FAST_NP); ++ rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL); + #elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \ + defined(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE) + /* Nothing to do, default is simple */ +@@ -1135,7 +1135,7 @@ static pj_status_t init_mutex(pj_mutex_t *mutex, const char *name, int type) + } else { + #if (defined(PJ_LINUX) && PJ_LINUX!=0) || \ + defined(PJ_HAS_PTHREAD_MUTEXATTR_SETTYPE) +- rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); ++ rc = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + #elif (defined(PJ_RTEMS) && PJ_RTEMS!=0) || \ + defined(PJ_PTHREAD_MUTEXATTR_T_HAS_RECURSIVE) + // Phil Torre : +-- +1.9.1 + diff --git a/package/libpjsip/0002-Replace-__sched_priority-with-sched_priority-fixes-m.patch b/package/libpjsip/0002-Replace-__sched_priority-with-sched_priority-fixes-m.patch new file mode 100644 index 0000000000..e1cb00229a --- /dev/null +++ b/package/libpjsip/0002-Replace-__sched_priority-with-sched_priority-fixes-m.patch @@ -0,0 +1,82 @@ +From cca93ce25f993c97ef3d96fa32461d5717c30518 Mon Sep 17 00:00:00 2001 +From: Luca Ceresoli +Date: Sat, 12 Mar 2016 15:31:47 +0100 +Subject: [PATCH 2/2] Replace __sched_priority with sched_priority(fixes musl + build) + +The musl C library defines sched_priority, not __sched_priority as GNU +libc and uClibc-ng do. Use sched_priority instead. + +This does not break compatibility with GNU libc and uClibc-ng because +both define in sched.h: + + #define sched_priority __sched_priority + +Fixes the following build errors when building with musl: + + ../src/samples/siprtp.c: In function 'boost_priority': + ../src/samples/siprtp.c:1137:7: error: 'struct sched_param' has no member named '__sched_priority' + tp.__sched_priority = max_prio; + ^ + In file included from /home/murray/devel/buildroot/test-musl-eabi/build/libpjsip-2.4.5/pjlib/include/pj/except.h:30:0, + from /home/murray/devel/buildroot/test-musl-eabi/build/libpjsip-2.4.5/pjlib/include/pjlib.h:35, + from ../src/samples/siprtp.c:76: + ../src/samples/siprtp.c:1146:18: error: 'struct sched_param' has no member named '__sched_priority' + policy, tp.__sched_priority)); + ^ + +Original patch: +http://git.alpinelinux.org/cgit/aports/plain/main/pjproject/musl-fixes.patch + +Signed-off-by: Luca Ceresoli +--- + pjsip-apps/src/samples/siprtp.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/pjsip-apps/src/samples/siprtp.c b/pjsip-apps/src/samples/siprtp.c +index 796464f..6e32a8f 100644 +--- a/pjsip-apps/src/samples/siprtp.c ++++ b/pjsip-apps/src/samples/siprtp.c +@@ -1134,7 +1134,7 @@ static void boost_priority(void) + PJ_RETURN_OS_ERROR(rc)); + return; + } +- tp.__sched_priority = max_prio; ++ tp.sched_priority = max_prio; + + rc = sched_setscheduler(0, POLICY, &tp); + if (rc != 0) { +@@ -1143,7 +1143,7 @@ static void boost_priority(void) + } + + PJ_LOG(4, (THIS_FILE, "New process policy=%d, priority=%d", +- policy, tp.__sched_priority)); ++ policy, tp.sched_priority)); + + /* + * Adjust thread scheduling algorithm and priority +@@ -1156,10 +1156,10 @@ static void boost_priority(void) + } + + PJ_LOG(4, (THIS_FILE, "Old thread policy=%d, priority=%d", +- policy, tp.__sched_priority)); ++ policy, tp.sched_priority)); + + policy = POLICY; +- tp.__sched_priority = max_prio; ++ tp.sched_priority = max_prio; + + rc = pthread_setschedparam(pthread_self(), policy, &tp); + if (rc != 0) { +@@ -1169,7 +1169,7 @@ static void boost_priority(void) + } + + PJ_LOG(4, (THIS_FILE, "New thread policy=%d, priority=%d", +- policy, tp.__sched_priority)); ++ policy, tp.sched_priority)); + } + + #else +-- +1.9.1 + diff --git a/package/libpjsip/Config.in b/package/libpjsip/Config.in new file mode 100644 index 0000000000..727d2ec3d0 --- /dev/null +++ b/package/libpjsip/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBPJSIP + bool "libpjsip" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBSRTP + help + PJSIP is a free and open source multimedia communication + library written in C language implementing standard based + protocols such as: SIP, SDP, RTP, STUN, TURN, and ICE. + + http://www.pjsip.org + +comment "libpjsip needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libpjsip/libpjsip.hash b/package/libpjsip/libpjsip.hash new file mode 100644 index 0000000000..e0d3d14323 --- /dev/null +++ b/package/libpjsip/libpjsip.hash @@ -0,0 +1,5 @@ +# From http://www.pjsip.org/release/2.4.5/MD5SUM.TXT +md5 f58b3485977b3a700256203a554b3869 pjproject-2.4.5.tar.bz2 + +# Locally computed +sha256 086f5e70dcaee312b66ddc24dac6ef85e6f1fec4eed00ff2915cebe0ee3cdd8d pjproject-2.4.5.tar.bz2 diff --git a/package/libpjsip/libpjsip.mk b/package/libpjsip/libpjsip.mk new file mode 100644 index 0000000000..ebb5897d09 --- /dev/null +++ b/package/libpjsip/libpjsip.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# libpjsip +# +################################################################################ + +LIBPJSIP_VERSION = 2.4.5 +LIBPJSIP_SOURCE = pjproject-$(LIBPJSIP_VERSION).tar.bz2 +LIBPJSIP_SITE = http://www.pjsip.org/release/$(LIBPJSIP_VERSION) +LIBPJSIP_DEPENDENCIES = libsrtp +LIBPJSIP_LICENSE = GPLv2+ +LIBPJSIP_LICENSE_FILES = COPYING +LIBPJSIP_INSTALL_STAGING = YES +LIBPJSIP_MAKE = $(MAKE1) + +LIBPJSIP_CONF_ENV = \ + LD="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -DPJ_HAS_IPV6=1" + +LIBPJSIP_CONF_OPTS = \ + --disable-sound \ + --disable-gsm-codec \ + --disable-speex-codec \ + --disable-speex-aec \ + --disable-resample \ + --disable-video \ + --disable-opencore-amr \ + --disable-g7221-codec \ + --disable-ilbc-codec \ + --with-external-srtp=$(STAGING_DIR)/usr + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBPJSIP_DEPENDENCIES += openssl +LIBPJSIP_CONF_OPTS += --with-ssl=$(STAGING_DIR)/usr +else +LIBPJSIP_CONF_OPTS += --disable-ssl +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +LIBPJSIP_DEPENDENCIES += util-linux +endif + +$(eval $(autotools-package)) diff --git a/package/libplatform/0001-platform-config.cmake-fix-paths-for-cross-compilatio.patch b/package/libplatform/0001-platform-config.cmake-fix-paths-for-cross-compilatio.patch new file mode 100644 index 0000000000..89f35bdb3d --- /dev/null +++ b/package/libplatform/0001-platform-config.cmake-fix-paths-for-cross-compilatio.patch @@ -0,0 +1,40 @@ +From 65ba437ed5514dd5762a796d349ed5db49e40fe7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 29 Jul 2015 21:26:16 +0200 +Subject: [PATCH] platform-config.cmake: fix paths for cross-compilation + +Headers and library paths in platform-config.cmake must take into +account ${CMAKE_FIND_ROOT_PATH} to work in cross-compilation. + +Signed-off-by: Thomas Petazzoni +--- + platform-config.cmake.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/platform-config.cmake.in b/platform-config.cmake.in +index 7fe35fe..78b5085 100644 +--- a/platform-config.cmake.in ++++ b/platform-config.cmake.in +@@ -10,16 +10,16 @@ + # + # propagate these properties from one build system to the other + set (platform_VERSION "@platform_VERSION_MAJOR@.@platform_VERSION_MINOR@") +-set (platform_INCLUDE_DIRS @platform_INCLUDE_DIRS@ @CMAKE_INSTALL_PREFIX@/include) ++set (platform_INCLUDE_DIRS ${CMAKE_FIND_ROOT_PATH}/@platform_INCLUDE_DIRS@ ${CMAKE_FIND_ROOT_PATH}/@CMAKE_INSTALL_PREFIX@/include) + set (platform_LIBRARY_DIRS "@CMAKE_LIBRARY_OUTPUT_DIRECTORY@") + set (platform_LINKER_FLAGS "@platform_LINKER_FLAGS@") + set (platform_CONFIG_VARS "@platform_CONFIG_VARS@") + + # libraries come from the build tree where this file was generated + if(WIN32) +- set (platform_LIBRARY "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/platform.lib") ++ set (platform_LIBRARY "${CMAKE_FIND_ROOT_PATH}/@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/platform.lib") + else(WIN32) +- set (platform_LIBRARY "-L@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lplatform") ++ set (platform_LIBRARY "-L${CMAKE_FIND_ROOT_PATH}/@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@ -lplatform") + endif(WIN32) + set (platform_LIBRARIES ${platform_LIBRARY} "@platform_LIBRARIES@") + mark_as_advanced (platform_LIBRARY) +-- +2.5.0 + diff --git a/package/libplatform/Config.in b/package/libplatform/Config.in new file mode 100644 index 0000000000..7d275b1fc9 --- /dev/null +++ b/package/libplatform/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBPLATFORM + bool + help + Platform support library used by libCEC and binary add-ons for Kodi + + https://github.com/Pulse-Eight/platform diff --git a/package/libplatform/libplatform.hash b/package/libplatform/libplatform.hash new file mode 100644 index 0000000000..8975dfd8ab --- /dev/null +++ b/package/libplatform/libplatform.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 3603ead8b16a48cb35b1e6dea330a693f10552b1a6ea036c5db9ec248cd8baf5 libplatform-feafe68e3e0b02c3261aefb3d711863ef6fadd38.tar.gz diff --git a/package/libplatform/libplatform.mk b/package/libplatform/libplatform.mk new file mode 100644 index 0000000000..6d549151d7 --- /dev/null +++ b/package/libplatform/libplatform.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libplatform +# +################################################################################ + +LIBPLATFORM_VERSION = feafe68e3e0b02c3261aefb3d711863ef6fadd38 +LIBPLATFORM_SITE = $(call github,Pulse-Eight,platform,$(LIBPLATFORM_VERSION)) +LIBPLATFORM_LICENSE = GPLv2+, PHP license v3.01 +LIBPLATFORM_LICENSE_FILES = src/os.h src/util/fstrcmp.c +LIBPLATFORM_INSTALL_STAGING = YES + +$(eval $(cmake-package)) diff --git a/package/libplayer/0001-add-fpic.patch b/package/libplayer/0001-add-fpic.patch new file mode 100644 index 0000000000..e4b227f911 --- /dev/null +++ b/package/libplayer/0001-add-fpic.patch @@ -0,0 +1,18 @@ +Add -fPIC to CFLAGS + +-fPIC is needed to build shared library code. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -9,6 +9,7 @@ + SHARED_LIBNAME_VERSION = $(SHARED_LIBNAME).$(VERSION) + SHARED_LIBNAME_MAJOR = $(SHARED_LIBNAME).$(shell echo $(VERSION) | cut -f1 -d.) + SHARED_LIBNAME_FLAGS = -shared -Wl,-soname,$(SHARED_LIBNAME_MAJOR) ++CFLAGS = -fPIC + + ifeq ($(BUILD_STATIC),yes) + BUILD_RULES += lib_static diff --git a/package/libplayer/0002-fix-configure-cflags.patch b/package/libplayer/0002-fix-configure-cflags.patch new file mode 100644 index 0000000000..186afd562e --- /dev/null +++ b/package/libplayer/0002-fix-configure-cflags.patch @@ -0,0 +1,41 @@ +From: Arnout Vandecappelle (Essensium/Mind) +Subject: [PATCH] libplayer: Fix handling of cflags in configure. + +The cflags returned by pkg-config or another config script may consist +of several arguments for the compiler. These should not be quoted together +into a single argument. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- +Sent upstream to devel@geexbox.org on July 11, 2012. +--- +diff -rup libplayer-2.0.1.orig/configure libplayer-2.0.1/configure +--- libplayer-2.0.1.orig/configure 2010-10-03 19:26:11.000000000 +0200 ++++ libplayer-2.0.1/configure 2012-07-10 23:33:02.783701852 +0200 +@@ -342,7 +342,7 @@ check_libconfig(){ + err=1 + if `which "$config" 1>/dev/null 2>&1`; then + cflags=`$config $ccflags` +- [ -n "$cflags" ] && check_cflags "$cflags" ++ [ -n "$cflags" ] && check_cflags $cflags + libs=`$config $clibs` + if [ -n "$libs" ]; then + temp_extralibs "$libs" +@@ -364,7 +364,7 @@ check_libconfig_exists(){ + err=1 + if `which "$config" 1>/dev/null 2>&1`; then + cflags=`$config $ccflags` +- [ -n "$cflags" ] && temp_cflags "$cflags" ++ [ -n "$cflags" ] && temp_cflags $cflags + libs=`$config $clibs` + if [ -n "$libs" ]; then + temp_extralibs "$libs" +@@ -386,7 +386,7 @@ check_pkgconfig(){ + err=1 + if `which pkg-config 1>/dev/null 2>&1`; then + cflags=`pkg-config $pkg $ccflags` +- [ -n "$cflags" ] && check_cflags "$cflags" ++ [ -n "$cflags" ] && check_cflags $cflags + libs=`pkg-config $pkg $clibs` + if [ -n "$libs" ]; then + temp_extralibs "$libs" diff --git a/package/libplayer/Config.in b/package/libplayer/Config.in new file mode 100644 index 0000000000..aa599ae55c --- /dev/null +++ b/package/libplayer/Config.in @@ -0,0 +1,40 @@ +config BR2_PACKAGE_LIBPLAYER + depends on BR2_TOOLCHAIN_HAS_THREADS + bool "libplayer" + help + libplayer provides a generic A/V API that relies on various multimedia + player for Linux systems. It currently supports MPlayer, xine VLC and + GStreamer only + + http://libplayer.geexbox.org/ + +if BR2_PACKAGE_LIBPLAYER +config BR2_PACKAGE_LIBPLAYER_MPLAYER + bool "mplayer backend" + # mplayer + depends on !(BR2_bfin || BR2_sh2a || BR2_sh4a || BR2_sh4aeb || \ + BR2_microblaze || BR2_aarch64 || BR2_nios2) + # mplayer + # Broken support for + +diff -Nura libpng-1.6.10.orig/Makefile.am libpng-1.6.10/Makefile.am +--- libpng-1.6.10.orig/Makefile.am 2014-03-17 08:51:25.812005079 -0300 ++++ libpng-1.6.10/Makefile.am 2014-03-17 09:14:28.807586433 -0300 +@@ -10,7 +10,7 @@ + check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage + + # Utilities - installed +-bin_PROGRAMS= pngfix png-fix-itxt ++bin_PROGRAMS= + + # This ensures that pnglibconf.h gets built at the start of 'make all' or + # 'make check', but it does not add dependencies to the individual programs, +diff -Nura libpng-1.6.10.orig/Makefile.in libpng-1.6.10/Makefile.in +--- libpng-1.6.10.orig/Makefile.in 2014-03-17 08:51:25.807005070 -0300 ++++ libpng-1.6.10/Makefile.in 2014-03-17 09:14:44.846617623 -0300 +@@ -87,7 +87,7 @@ + host_triplet = @host@ + check_PROGRAMS = pngtest$(EXEEXT) pngunknown$(EXEEXT) \ + pngstest$(EXEEXT) pngvalid$(EXEEXT) pngimage$(EXEEXT) +-bin_PROGRAMS = pngfix$(EXEEXT) png-fix-itxt$(EXEEXT) ++bin_PROGRAMS = + @PNG_ARM_NEON_TRUE@am__append_1 = arm/arm_init.c\ + @PNG_ARM_NEON_TRUE@ arm/filter_neon.S arm/filter_neon_intrinsics.c + diff --git a/package/libpng/0002-ignore-symbol-prefix.patch b/package/libpng/0002-ignore-symbol-prefix.patch new file mode 100644 index 0000000000..5a8ede58a9 --- /dev/null +++ b/package/libpng/0002-ignore-symbol-prefix.patch @@ -0,0 +1,48 @@ +From dbfea83a7436cbac34cc883ab2b7befacaf02c40 Mon Sep 17 00:00:00 2001 +From: Danomi Manchego +Date: Tue, 23 Jun 2015 13:54:42 -0400 +Subject: libpng: don't append prefix to symbol names in version script + +Even if Blackfin GNU toolchain add prefix '_' to all symbols, +symbol prefix is not accepted in the link flag --version-script. +Don't append prefix in the symbols in the version script file. + +Original patch by: Sonic Zhang + +Rebase to apply cleanly. + +Signed-off-by: Danomi Manchego +--- + Makefile.am | 2 +- + Makefile.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index dcc5439..e543c81 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -231,7 +231,7 @@ contrib/tools/pngfix.o: pnglibconf.h + # interfering with the symbol file format. + SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\ + -DPNGLIB_VERSION='@PNGLIB_VERSION@'\ +- -DSYMBOL_PREFIX='$(SYMBOL_PREFIX)'\ ++ -DSYMBOL_PREFIX=''\ + -DPNG_NO_USE_READ_MACROS -DPNG_BUILDING_SYMBOL_TABLE + + if DO_PNG_PREFIX +diff --git a/Makefile.in b/Makefile.in +index 975f931..a3e0552 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -747,7 +747,7 @@ SUFFIXES = .chk .out + # interfering with the symbol file format. + SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0' \ + -DPNGLIB_VERSION='@PNGLIB_VERSION@' \ +- -DSYMBOL_PREFIX='$(SYMBOL_PREFIX)' -DPNG_NO_USE_READ_MACROS \ ++ -DSYMBOL_PREFIX='' -DPNG_NO_USE_READ_MACROS \ + -DPNG_BUILDING_SYMBOL_TABLE $(am__append_5) + + # EXT_LIST is a list of the possibly library directory extensions, this exists +-- +1.7.9.5 + diff --git a/package/libpng/Config.in b/package/libpng/Config.in new file mode 100644 index 0000000000..b0a3646078 --- /dev/null +++ b/package/libpng/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBPNG + bool "libpng" + select BR2_PACKAGE_ZLIB + help + Library for handling PNG (Portable Network Graphics) + images. + + http://www.libpng.org/ diff --git a/package/libpng/libpng.hash b/package/libpng/libpng.hash new file mode 100644 index 0000000000..3b2db43ce5 --- /dev/null +++ b/package/libpng/libpng.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/libpng/files/libpng16/1.6.21/ +md5 3bacb4728f6694a64ad9052769d6a4ce libpng-1.6.21.tar.xz +sha1 978b2f4e007eda56032001493ddb97d20f0ab291 libpng-1.6.21.tar.xz diff --git a/package/libpng/libpng.mk b/package/libpng/libpng.mk new file mode 100644 index 0000000000..7ce4a3a693 --- /dev/null +++ b/package/libpng/libpng.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libpng +# +################################################################################ + +LIBPNG_VERSION = 1.6.21 +LIBPNG_SERIES = 16 +LIBPNG_SOURCE = libpng-$(LIBPNG_VERSION).tar.xz +LIBPNG_SITE = http://downloads.sourceforge.net/project/libpng/libpng${LIBPNG_SERIES}/$(LIBPNG_VERSION) +LIBPNG_LICENSE = libpng license +LIBPNG_LICENSE_FILES = LICENSE +LIBPNG_INSTALL_STAGING = YES +LIBPNG_DEPENDENCIES = host-pkgconf zlib +LIBPNG_CONFIG_SCRIPTS = libpng$(LIBPNG_SERIES)-config libpng-config +LIBPNG_CONF_OPTS = $(if $(BR2_ARM_CPU_HAS_NEON),--enable-arm-neon=yes,--enable-arm-neon=no) + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libpthread-stubs/Config.in b/package/libpthread-stubs/Config.in new file mode 100644 index 0000000000..a4ce1cb0ac --- /dev/null +++ b/package/libpthread-stubs/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBPTHREAD_STUBS + bool "libpthread-stubs" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + This library provides weak aliases for pthread functions not + provided in libc or otherwise available by default. + + http://xcb.freedesktop.org/ + +comment "libpthread-stubs needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libpthread-stubs/libpthread-stubs.hash b/package/libpthread-stubs/libpthread-stubs.hash new file mode 100644 index 0000000000..8211455d25 --- /dev/null +++ b/package/libpthread-stubs/libpthread-stubs.hash @@ -0,0 +1,2 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 35b6d54e3cc6f3ba28061da81af64b9a92b7b757319098172488a660e3d87299 libpthread-stubs-0.3.tar.bz2 diff --git a/package/libpthread-stubs/libpthread-stubs.mk b/package/libpthread-stubs/libpthread-stubs.mk new file mode 100644 index 0000000000..856793c4e0 --- /dev/null +++ b/package/libpthread-stubs/libpthread-stubs.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libpthread-stubs +# +################################################################################ + +LIBPTHREAD_STUBS_VERSION = 0.3 +LIBPTHREAD_STUBS_SOURCE = libpthread-stubs-$(LIBPTHREAD_STUBS_VERSION).tar.bz2 +LIBPTHREAD_STUBS_SITE = http://xcb.freedesktop.org/dist +LIBPTHREAD_STUBS_LICENSE = MIT +LIBPTHREAD_STUBS_LICENSE_FILES = COPYING + +LIBPTHREAD_STUBS_INSTALL_STAGING = YES + +ifeq ($(BR2_STATIC_LIBS),y) +LIBPTHREAD_STUBS_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -pthread" +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libpthsem/0001-fix-build-on-linux-3.x-host.patch b/package/libpthsem/0001-fix-build-on-linux-3.x-host.patch new file mode 100644 index 0000000000..21fff4e7cc --- /dev/null +++ b/package/libpthsem/0001-fix-build-on-linux-3.x-host.patch @@ -0,0 +1,28 @@ +From 2d0450bfa3fb7003098da1a7fe24c3ae140912dc Mon Sep 17 00:00:00 2001 +From: Gregory Hermant +Date: Mon, 22 Oct 2012 15:11:53 +0200 +Subject: [PATCH] pthsem build on Linux 3.x host + + +Signed-off-by: Michael Markstaller +Signed-off-by: Gregory Hermant +--- + acinclude.m4 | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 03b42de..fea9bc8 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -892,6 +892,8 @@ case $PLATFORM in + case "x`uname -r`" in + changequote(, )dnl + x2.[23456789]* ) ;; ++changequote(, )dnl ++ x3.* ) ;; + changequote([, ]) + * ) braindead=yes ;; + esac +-- +1.7.9.5 + diff --git a/package/libpthsem/Config.in b/package/libpthsem/Config.in new file mode 100644 index 0000000000..3219de137d --- /dev/null +++ b/package/libpthsem/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBPTHSEM + bool "libpthsem" + depends on BR2_USE_MMU # fork() + help + GNU pth is a user mode multi threading library. pthsem is an extend + version, with support for semaphores added. + + http://www.auto.tuwien.ac.at/~mkoegler/pth/ + +if BR2_PACKAGE_LIBPTHSEM + +config BR2_PACKAGE_LIBPTHSEM_COMPAT + bool "libpth compatibility" + help + This option enables the compatibility with the original + libpth library. + +endif diff --git a/package/libpthsem/libpthsem.hash b/package/libpthsem/libpthsem.hash new file mode 100644 index 0000000000..b6aa2b87c5 --- /dev/null +++ b/package/libpthsem/libpthsem.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 4024cafdd5d4bce2b1778a6be5491222c3f6e7ef1e43971264c451c0012c5c01 pthsem_2.0.8.tar.gz diff --git a/package/libpthsem/libpthsem.mk b/package/libpthsem/libpthsem.mk new file mode 100644 index 0000000000..b8a3d7d561 --- /dev/null +++ b/package/libpthsem/libpthsem.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# libpthsem +# +################################################################################ + +LIBPTHSEM_VERSION = 2.0.8 +LIBPTHSEM_SOURCE = pthsem_$(LIBPTHSEM_VERSION).tar.gz +LIBPTHSEM_SITE = http://www.auto.tuwien.ac.at/~mkoegler/pth +LIBPTHSEM_LICENSE = LGPLv2.1+ +LIBPTHSEM_LICENSE_FILES = COPYING +LIBPTHSEM_AUTORECONF = YES +LIBPTHSEM_INSTALL_STAGING = YES +LIBPTHSEM_CONFIG_SCRIPTS = pthsem-config + +# Force the setjmp/longjmp detection, because the test being done in +# the AC_CHECK_SJLJ macro is not cross-compilation safe: it checks the +# running kernel with 'uname -r', and checks the C library version by +# looking at /usr/include/features.h. In terms of kernel version, it +# assumes any version later than 2.2.x is fine, except that it doesn't +# recognize 4.x as a valid kernel version, recognizing such systems as +# "braindead" and therefore falling back to the 'sjljlx' value for +# ac_cv_check_sjlj. In terms of C library version, it wants +# __GLIBC_MINOR to be at least 1. Since both conditions are true for +# all Buildroot systems, we can simply force the setjmp/longjmp +# detection to ssjlj. +LIBPTHSEM_CONF_ENV += \ + ac_cv_check_sjlj=ssjlj + +ifeq ($(BR2_PACKAGE_LIBPTHSEM_COMPAT),y) +LIBPTHSEM_CONF_OPTS += --enable-compat +LIBPTHSEM_CONFIG_SCRIPTS += pth-config +else +LIBPTHSEM_CONF_OPTS += --disable-compat +endif + +$(eval $(autotools-package)) diff --git a/package/libqmi/Config.in b/package/libqmi/Config.in new file mode 100644 index 0000000000..a0e896cce8 --- /dev/null +++ b/package/libqmi/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBQMI + bool "libqmi" + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + help + libqmi is a glib-based library for talking to WWAN modems and devices + which speak the Qualcomm MSM Interface (QMI) protocol. + + http://www.freedesktop.org/wiki/Software/libqmi/ + +comment "libqmi needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libqmi/libqmi.hash b/package/libqmi/libqmi.hash new file mode 100644 index 0000000000..4a335b6e14 --- /dev/null +++ b/package/libqmi/libqmi.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 6283b80aea1b2721523e5229087764b4d6a1c9f53488690fa16a11adff4a0040 libqmi-1.14.2.tar.xz diff --git a/package/libqmi/libqmi.mk b/package/libqmi/libqmi.mk new file mode 100644 index 0000000000..7c46037035 --- /dev/null +++ b/package/libqmi/libqmi.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libqmi +# +################################################################################ + +LIBQMI_VERSION = 1.14.2 +LIBQMI_SITE = http://www.freedesktop.org/software/libqmi +LIBQMI_SOURCE = libqmi-$(LIBQMI_VERSION).tar.xz +LIBQMI_LICENSE = LGPLv2+ (library), GPLv2+ (programs) +LIBQMI_LICENSE_FILES = COPYING +LIBQMI_INSTALL_STAGING = YES + +LIBQMI_DEPENDENCIES = libglib2 + +# we don't want -Werror +LIBQMI_CONF_OPTS = --enable-more-warnings=no + +$(eval $(autotools-package)) diff --git a/package/libqrencode/Config.in b/package/libqrencode/Config.in new file mode 100644 index 0000000000..b86662621e --- /dev/null +++ b/package/libqrencode/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LIBQRENCODE + bool "libqrencode" + help + libqrencode is a C library for encoding data in a QR Code + symbol, a kind of 2D symbology that can be scanned by handy + terminals such as a mobile phone with CCD. The capacity of + QR Code is up to 7000 digits or 4000 characters, and is + highly robust. + + http://fukuchi.org/works/qrencode/index.html + +if BR2_PACKAGE_LIBQRENCODE + +config BR2_PACKAGE_LIBQRENCODE_TOOLS + bool "libqrencode tools" + select BR2_PACKAGE_LIBPNG + help + Build command-line tools + +endif #BR2_PACKAGE_LIBQRENCODE diff --git a/package/libqrencode/libqrencode.hash b/package/libqrencode/libqrencode.hash new file mode 100644 index 0000000000..8c94ccd35d --- /dev/null +++ b/package/libqrencode/libqrencode.hash @@ -0,0 +1,2 @@ +# From http://fukuchi.org/works/qrencode/qrencode-3.4.2.tar.gz.sha1 +sha1 7daaad61f333ff6cdabfb0d925c3ab668d16dee2 qrencode-3.4.2.tar.gz diff --git a/package/libqrencode/libqrencode.mk b/package/libqrencode/libqrencode.mk new file mode 100644 index 0000000000..5f30e77ba6 --- /dev/null +++ b/package/libqrencode/libqrencode.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libqrencode +# +################################################################################ + +LIBQRENCODE_VERSION = 3.4.2 +LIBQRENCODE_SOURCE = qrencode-$(LIBQRENCODE_VERSION).tar.gz +LIBQRENCODE_SITE = http://fukuchi.org/works/qrencode +LIBQRENCODE_DEPENDENCIES = host-pkgconf +LIBQRENCODE_INSTALL_STAGING = YES +LIBQRENCODE_LICENSE = LGPLv2.1+ +LIBQRENCODE_LICENSE_FILES = COPYING + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +LIBQRENCODE_CONF_ENV += LIBS='-pthread' +else +LIBQRENCODE_CONF_OPTS += --disable-thread-safety +endif + +ifeq ($(BR2_PACKAGE_LIBQRENCODE_TOOLS),y) +LIBQRENCODE_CONF_OPTS += --with-tools=yes +LIBQRENCODE_DEPENDENCIES += libpng +else +LIBQRENCODE_CONF_OPTS += --with-tools=no +endif + +$(eval $(autotools-package)) diff --git a/package/libraw/0001-Remove-paths-which-break-cross-compilation.patch b/package/libraw/0001-Remove-paths-which-break-cross-compilation.patch new file mode 100644 index 0000000000..0f0eee1a64 --- /dev/null +++ b/package/libraw/0001-Remove-paths-which-break-cross-compilation.patch @@ -0,0 +1,29 @@ +From 1f9c2ebc9c65e8ce7fdbece55d578cf00c6c4b46 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 30 Jan 2016 17:06:04 +0100 +Subject: [PATCH 1/1] Remove paths which break cross-compilation + +Patch sent upstream: https://github.com/LibRaw/LibRaw/pull/57 + +Signed-off-by: Bernd Kuhls +--- + configure.ac | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9bb07b2..78064d9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -16,9 +16,6 @@ AC_SUBST(LIBTOOL_DEPS) + + # Config files to generate + +-CPPFLAGS="$CPPFLAGS -I/usr/local/include" +-LDFLAGS="$LDFLAGS -L/usr/local/lib" +- + AC_CONFIG_FILES([ + Makefile + libraw.pc +-- +2.7.0.rc3 + diff --git a/package/libraw/0002-libraw_x3f.cpp-remove-Byte-order-mark.patch b/package/libraw/0002-libraw_x3f.cpp-remove-Byte-order-mark.patch new file mode 100644 index 0000000000..24f0eb1897 --- /dev/null +++ b/package/libraw/0002-libraw_x3f.cpp-remove-Byte-order-mark.patch @@ -0,0 +1,39 @@ +From 0f2507bfe30f2df10dfc38b94cdfde5594902b8e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Fri, 12 Feb 2016 10:00:12 +0100 +Subject: [PATCH] libraw_x3f.cpp: remove Byte order mark + +The U+FEFF character, which is a Byte order mark, at the beginning of +libraw_x3f.cpp, prevents gcc 4.3.x from building this file: + +src/../internal/libraw_x3f.cpp:1: error: stray '\357' in program +src/../internal/libraw_x3f.cpp:1: error: stray '\273' in program +src/../internal/libraw_x3f.cpp:1: error: stray '\277' in program + +Support in gcc for the Byte order mark has been added in gcc +4.4.x. Since anyway this Byte order mark is not useful, we simply +remove it. + +See https://en.wikipedia.org/wiki/Byte_order_mark for more details. + +Signed-off-by: Thomas Petazzoni +--- +Submitted upstream at: +https://github.com/LibRaw/LibRaw/pull/61 + + internal/libraw_x3f.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/internal/libraw_x3f.cpp b/internal/libraw_x3f.cpp +index dbf28c1..67047ab 100644 +--- a/internal/libraw_x3f.cpp ++++ b/internal/libraw_x3f.cpp +@@ -1,4 +1,4 @@ +-/* Library for accessing X3F Files ++/* Library for accessing X3F Files + ---------------------------------------------------------------- + BSD-style License + ---------------------------------------------------------------- +-- +2.6.4 + diff --git a/package/libraw/Config.in b/package/libraw/Config.in new file mode 100644 index 0000000000..de763cd36a --- /dev/null +++ b/package/libraw/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBRAW + bool "libraw" + depends on BR2_INSTALL_LIBSTDCPP + help + libraw is a raw image manipulation library + + http://www.libraw.org/ + +comment "libraw needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libraw/libraw.hash b/package/libraw/libraw.hash new file mode 100644 index 0000000000..e23ca9ce2c --- /dev/null +++ b/package/libraw/libraw.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 e599651a4cc37e00cfc2d2b56be87c3a4e4dae2c360b680fe9ab3f93d07cdea1 LibRaw-0.17.1.tar.gz diff --git a/package/libraw/libraw.mk b/package/libraw/libraw.mk new file mode 100644 index 0000000000..7fc4709e8f --- /dev/null +++ b/package/libraw/libraw.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# libraw +# +################################################################################ + +LIBRAW_VERSION = 0.17.1 +LIBRAW_SOURCE = LibRaw-$(LIBRAW_VERSION).tar.gz +LIBRAW_SITE = http://www.libraw.org/data +LIBRAW_INSTALL_STAGING = YES +# we patch configure.ac +LIBRAW_AUTORECONF = YES +LIBRAW_CONF_OPTS += \ + --disable-examples \ + --disable-openmp \ + --disable-demosaic-pack-gpl2 \ + --disable-demosaic-pack-gpl3 +LIBRAW_LICENSE = LGPLv2.1 or CDDL 1.0 or LibRaw Software License 27032010 +LIBRAW_LICENSE_FILES = LICENSE.LGPL LICENSE.CDDL LICENSE.LibRaw.pdf README +LIBRAW_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_JASPER),y) +LIBRAW_CONF_OPTS += --enable-jasper +LIBRAW_DEPENDENCIES += jasper +else +LIBRAW_CONF_OPTS += --disable-jasper +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +LIBRAW_CONF_OPTS += --enable-jpeg +LIBRAW_DEPENDENCIES += jpeg +else +LIBRAW_CONF_OPTS += --disable-jpeg +endif + +ifeq ($(BR2_PACKAGE_LCMS2),y) +LIBRAW_CONF_OPTS += --enable-lcms +LIBRAW_DEPENDENCIES += lcms2 host-pkgconf +else +LIBRAW_CONF_OPTS += --disable-lcms +endif + +$(eval $(autotools-package)) diff --git a/package/libraw1394/0001-testlibraw-build-the-CLOCK_MONOTONIC_RAW-test-condit.patch b/package/libraw1394/0001-testlibraw-build-the-CLOCK_MONOTONIC_RAW-test-condit.patch new file mode 100644 index 0000000000..b87ef715de --- /dev/null +++ b/package/libraw1394/0001-testlibraw-build-the-CLOCK_MONOTONIC_RAW-test-condit.patch @@ -0,0 +1,38 @@ +From 94c66ade15d7fc468b52c72dfe76a8c10b1910a7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Fri, 12 Feb 2016 10:13:45 +0100 +Subject: [PATCH] testlibraw: build the CLOCK_MONOTONIC_RAW test conditionally + +CLOCK_MONOTONIC_RAW is a somewhat recent addition, and some older +toolchains/kernels may not have the support for it. Therefore, we +build the part of the test that uses CLOCK_MONOTONIC_RAW only when +this definition is available. + +Signed-off-by: Thomas Petazzoni +--- + tools/testlibraw.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tools/testlibraw.c b/tools/testlibraw.c +index d8a0702..ae37157 100644 +--- a/tools/testlibraw.c ++++ b/tools/testlibraw.c +@@ -211,6 +211,7 @@ read_cycle_timer(raw1394handle_t handle) + printf(" local time from CLOCK_MONOTONIC: %lld us\n", + (unsigned long long)local_time); + ++#if defined(CLOCK_MONOTONIC_RAW) + retval = raw1394_read_cycle_timer_and_clock(handle, &ct, &local_time, + CLOCK_MONOTONIC_RAW); + if (retval < 0) { +@@ -221,6 +222,7 @@ read_cycle_timer(raw1394handle_t handle) + ct >> 25, (ct >> 12) & 0x1fff, ct & 0xfff); + printf(" local time from CLOCK_MONOTONIC_RAW: %lld us\n", + (unsigned long long)local_time); ++#endif + } + + int test_card(int card) +-- +2.6.4 + diff --git a/package/libraw1394/Config.in b/package/libraw1394/Config.in new file mode 100644 index 0000000000..7a64959a52 --- /dev/null +++ b/package/libraw1394/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBRAW1394 + bool "libraw1394" + help + libraw1394 provides direct access to the IEEE 1394 bus through + the Linux 1394 subsystem's raw1394 user space interface. + + http://sourceforge.net/projects/libraw1394/ diff --git a/package/libraw1394/libraw1394.hash b/package/libraw1394/libraw1394.hash new file mode 100644 index 0000000000..b785995db1 --- /dev/null +++ b/package/libraw1394/libraw1394.hash @@ -0,0 +1,4 @@ +# From https://www.kernel.org/pub/linux/libs/ieee1394/sha256sums.asc +sha256 1bab9780189f9d1eb4e973df12679c04f979c21e024240fc98e536ff5b680ee9 libraw1394-2.1.1.tar.xz +# Locally computed +sha256 39369c65fbed7fccc2e6d8e645f258f101c414107d67238f10996e6c2009f20d fix-types.patch diff --git a/package/libraw1394/libraw1394.mk b/package/libraw1394/libraw1394.mk new file mode 100644 index 0000000000..7123ac74c8 --- /dev/null +++ b/package/libraw1394/libraw1394.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libraw1394 +# +################################################################################ + +LIBRAW1394_VERSION = 2.1.1 +LIBRAW1394_SOURCE = libraw1394-$(LIBRAW1394_VERSION).tar.xz +LIBRAW1394_SITE = $(BR2_KERNEL_MIRROR)/linux/libs/ieee1394 +LIBRAW1394_PATCH = http://git.alpinelinux.org/cgit/aports/plain/main/libraw1394/fix-types.patch +LIBRAW1394_INSTALL_STAGING = YES +LIBRAW1394_LICENSE = LGPLv2.1+ +LIBRAW1394_LICENSE_FILES = COPYING.LIB + +$(eval $(autotools-package)) diff --git a/package/libreplaygain/Config.in b/package/libreplaygain/Config.in new file mode 100644 index 0000000000..d0045b2f22 --- /dev/null +++ b/package/libreplaygain/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBREPLAYGAIN + bool "libreplaygain" + help + Replay Gain library from Musepack + + http://www.musepack.net/ diff --git a/package/libreplaygain/libreplaygain.hash b/package/libreplaygain/libreplaygain.hash new file mode 100644 index 0000000000..7a6109805a --- /dev/null +++ b/package/libreplaygain/libreplaygain.hash @@ -0,0 +1,4 @@ +# From https://www.musepack.net/index.php?pg=src +md5 e27b3b1249b7fbae92d656d9e3d26633 libreplaygain_r475.tar.gz +# Calculated based on the hash above +sha256 8258bf785547ac2cda43bb195e07522f0a3682f55abe97753c974609ec232482 libreplaygain_r475.tar.gz diff --git a/package/libreplaygain/libreplaygain.mk b/package/libreplaygain/libreplaygain.mk new file mode 100644 index 0000000000..4775999819 --- /dev/null +++ b/package/libreplaygain/libreplaygain.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libreplaygain +# +################################################################################ + +LIBREPLAYGAIN_VERSION = r475 +LIBREPLAYGAIN_SITE = http://files.musepack.net/source +LIBREPLAYGAIN_SOURCE = libreplaygain_$(LIBREPLAYGAIN_VERSION).tar.gz +# upstream doesn't ship configure +LIBREPLAYGAIN_AUTORECONF = YES +LIBREPLAYGAIN_INSTALL_STAGING = YES +LIBREPLAYGAIN_LICENSE = LGPLv2.1+ +LIBREPLAYGAIN_LICENSE_FILES = src/gain_analysis.c + +$(eval $(autotools-package)) diff --git a/package/libroxml/Config.in b/package/libroxml/Config.in new file mode 100644 index 0000000000..2fcf2f2a70 --- /dev/null +++ b/package/libroxml/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBROXML + bool "roxml" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + libroxml is a light and powerful xml parsing library with + xpath handling. Roxml is a binary using libroxml to explore + xml file from shell scripts. + + http://www.libroxml.net + +comment "libroxml needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libroxml/libroxml.hash b/package/libroxml/libroxml.hash new file mode 100644 index 0000000000..32482e65de --- /dev/null +++ b/package/libroxml/libroxml.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 1da8f20b530eba4409f2b217587d2f1281ff5d9ba45b24aeac71b94c6c621b78 libroxml-2.3.0.tar.gz diff --git a/package/libroxml/libroxml.mk b/package/libroxml/libroxml.mk new file mode 100644 index 0000000000..43d1d916af --- /dev/null +++ b/package/libroxml/libroxml.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libroxml +# +################################################################################ + +LIBROXML_VERSION = 2.3.0 +LIBROXML_SITE = http://download.libroxml.net/pool/v2.x +LIBROXML_INSTALL_STAGING = YES +LIBROXML_LICENSE = LGPLv2.1+ with static link exception +LIBROXML_LICENSE_FILES = License.txt + +LIBROXML_CONF_OPTS = --disable-silent-rules + +# libroxml forgets to compile/link with -pthread, even though it uses +# thread functions breaking static linking +LIBROXML_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -pthread" LIBS="-pthread" + +$(eval $(autotools-package)) diff --git a/package/librsvg/Config.in b/package/librsvg/Config.in new file mode 100644 index 0000000000..7ce9d063a8 --- /dev/null +++ b/package/librsvg/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_LIBRSVG + bool "librsvg" + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_GDK_PIXBUF + select BR2_PACKAGE_LIBCROCO + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_PANGO + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + depends on BR2_INSTALL_LIBSTDCPP # pango + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango -> harfbuzz + help + The rsvg library is an efficient renderer for Scalable + Vector Graphics (SVG) pictures. + + http://librsvg.sourceforge.net/ + +comment "librsvg needs a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/librsvg/librsvg.hash b/package/librsvg/librsvg.hash new file mode 100644 index 0000000000..71d96c881b --- /dev/null +++ b/package/librsvg/librsvg.hash @@ -0,0 +1,2 @@ +# From http://ftp.acc.umu.se/pub/gnome/sources/librsvg/2.40/librsvg-2.40.15.sha256sum +sha256 d9cac4a123eec6e553a26e120979bab7425def9ae7ce7c079eba5e4a45db05f4 librsvg-2.40.15.tar.xz diff --git a/package/librsvg/librsvg.mk b/package/librsvg/librsvg.mk new file mode 100644 index 0000000000..dadffe8dec --- /dev/null +++ b/package/librsvg/librsvg.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# librsvg +# +################################################################################ + +LIBRSVG_VERSION_MAJOR = 2.40 +LIBRSVG_VERSION = $(LIBRSVG_VERSION_MAJOR).15 +LIBRSVG_SITE = http://ftp.gnome.org/pub/gnome/sources/librsvg/$(LIBRSVG_VERSION_MAJOR) +LIBRSVG_SOURCE = librsvg-$(LIBRSVG_VERSION).tar.xz +LIBRSVG_INSTALL_STAGING = YES +LIBRSVG_CONF_OPTS = --disable-tools --enable-introspection=no +HOST_LIBRSVG_CONF_OPTS = --enable-introspection=no +LIBRSVG_DEPENDENCIES = cairo host-gdk-pixbuf gdk-pixbuf libcroco libglib2 libxml2 pango \ + $(if $(BR2_PACKAGE_LIBGTK3),libgtk3) +HOST_LIBRSVG_DEPENDENCIES = host-cairo host-gdk-pixbuf host-libcroco host-libglib2 host-libxml2 host-pango +LIBRSVG_LICENSE = LGPLv2+ +LIBRSVG_LICENSE_FILES = COPYING.LIB + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/librsync/Config.in b/package/librsync/Config.in new file mode 100644 index 0000000000..5dcdfc8f2e --- /dev/null +++ b/package/librsync/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBRSYNC + bool "librsync" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_POPT + help + librsync implements the rolling-checksum algorithm of + remote file synchronization that was popularized by the + rsync utility and is used in rproxy. + + http://sourceforge.net/projects/librsync/ diff --git a/package/librsync/librsync.hash b/package/librsync/librsync.hash new file mode 100644 index 0000000000..55ace76394 --- /dev/null +++ b/package/librsync/librsync.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 6633e4605662763a03bb6388529cbdfd3b11a9ec55b8845351c1bd9a92bc41d6 librsync-0.9.7.tar.gz diff --git a/package/librsync/librsync.mk b/package/librsync/librsync.mk new file mode 100644 index 0000000000..d475c7333d --- /dev/null +++ b/package/librsync/librsync.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# librsync +# +################################################################################ + +LIBRSYNC_VERSION = 0.9.7 +LIBRSYNC_SITE = http://downloads.sourceforge.net/project/librsync/librsync/$(LIBRSYNC_VERSION) +LIBRSYNC_LICENSE = LGPLv2.1+ +LIBRSYNC_LICENSE_FILES = COPYING +LIBRSYNC_INSTALL_STAGING = YES +LIBRSYNC_DEPENDENCIES = zlib bzip2 popt + +$(eval $(autotools-package)) diff --git a/package/librtas/0001-librtas-install-librtas.so.1-symlink.patch b/package/librtas/0001-librtas-install-librtas.so.1-symlink.patch new file mode 100644 index 0000000000..2150c3f508 --- /dev/null +++ b/package/librtas/0001-librtas-install-librtas.so.1-symlink.patch @@ -0,0 +1,31 @@ +Add a line to the librtas Makefile to create librtas.so.1 when +performing "make install". + +Without this patch programs linked with librtas will fail at run time: + +error while loading shared libraries: librtas.so.1: cannot open shared +object file: No such file or directory + +A patch has been submitted upstream so it is likely that this patch +can be dropped after the next release of librtas. + +Signed-off-by: Sam Bobroff +--- + librtas_src/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/librtas_src/Makefile b/librtas_src/Makefile +index 3a10222..deba29d 100644 +--- a/librtas_src/Makefile ++++ b/librtas_src/Makefile +@@ -33,6 +33,7 @@ install: + @$(call install_lib,$(LIBRTAS),$(DESTDIR)) + @$(call install_inc,$(HEADERS),$(DESTDIR)) + @ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME) ++ @ln -sf $(LIBRTAS) $(DESTDIR)/$(LIB_DIR)$(call is_lib64,$(LIBRTAS))/$(LIBRTAS_SONAME).1 + + uninstall: + @$(call uninstall_lib,$(LIBRTAS),$(DESTDIR)) +-- +1.7.10.4 + diff --git a/package/librtas/Config.in b/package/librtas/Config.in new file mode 100644 index 0000000000..2e6063f830 --- /dev/null +++ b/package/librtas/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBRTAS + bool "librtas" + depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le + depends on BR2_TOOLCHAIN_USES_GLIBC + help + The librtas package provides an interface for Run-Time Abstraction + Services (RTAS) calls on PAPR platforms. The libraries allow users to + examine and manipulate hardware, and parse RTAS events. + + http://librtas.sourceforge.net/ + +comment "librtas needs an (e)glibc toolchain" + depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/librtas/librtas.hash b/package/librtas/librtas.hash new file mode 100644 index 0000000000..c81b583147 --- /dev/null +++ b/package/librtas/librtas.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 d5f2951b0934ffbd82bebf26acfa103cc21d89f4c90c7c41472acf7b4ec6d907 librtas-1.3.13.tar.gz diff --git a/package/librtas/librtas.mk b/package/librtas/librtas.mk new file mode 100644 index 0000000000..6e1ebd1f0c --- /dev/null +++ b/package/librtas/librtas.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# librtas +# +################################################################################ + +LIBRTAS_VERSION = 1.3.13 +LIBRTAS_SITE = http://downloads.sourceforge.net/project/librtas +LIBRTAS_LICENSE = Common Public License Version 1.0 +LIBRTAS_LICENSE_FILES = COPYRIGHT +LIBRTAS_INSTALL_STAGING = YES + +define LIBRTAS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define LIBRTAS_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install +endef + +define LIBRTAS_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/librtlsdr/0001-disable_shared_library_target_in_build.patch b/package/librtlsdr/0001-disable_shared_library_target_in_build.patch new file mode 100644 index 0000000000..b763c48b2e --- /dev/null +++ b/package/librtlsdr/0001-disable_shared_library_target_in_build.patch @@ -0,0 +1,80 @@ +librtlsdr: disable shared library target in build + +Disable shared library target if BUILD_SHARED_LIBS if OFF. + +Signed-off-by: Yuvaraj Patil +--- +diff -Nurp librtlsdr-v0.5.3_orig/src/CMakeLists.txt librtlsdr-v0.5.3/src/CMakeLists.txt +--- librtlsdr-v0.5.3_orig/src/CMakeLists.txt 2014-09-24 17:31:40.610337074 +0530 ++++ librtlsdr-v0.5.3/src/CMakeLists.txt 2014-09-24 17:32:38.838334632 +0530 +@@ -20,6 +20,7 @@ + ######################################################################## + # Setup library + ######################################################################## ++if(BUILD_SHARED_LIBS) + add_library(rtlsdr_shared SHARED + librtlsdr.c + tuner_e4k.c +@@ -37,6 +38,7 @@ set_target_properties(rtlsdr_shared PROP + set_target_properties(rtlsdr_shared PROPERTIES OUTPUT_NAME rtlsdr) + set_target_properties(rtlsdr_shared PROPERTIES SOVERSION ${MAJOR_VERSION}) + set_target_properties(rtlsdr_shared PROPERTIES VERSION ${LIBVER}) ++endif() + + add_library(rtlsdr_static STATIC + librtlsdr.c +@@ -71,6 +73,12 @@ if(NOT WIN32) + set_target_properties(rtlsdr_static PROPERTIES OUTPUT_NAME rtlsdr) + endif() + ++if(BUILD_SHARED_LIBS) ++set(rtlsdr_lib rtlsdr_shared) ++else() ++set(rtlsdr_lib rtlsdr_static) ++endif() ++ + ######################################################################## + # Build utility + ######################################################################## +@@ -81,33 +89,33 @@ add_executable(rtl_fm rtl_fm.c) + add_executable(rtl_eeprom rtl_eeprom.c) + add_executable(rtl_adsb rtl_adsb.c) + add_executable(rtl_power rtl_power.c) +-set(INSTALL_TARGETS rtlsdr_shared rtlsdr_static rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power) ++set(INSTALL_TARGETS ${rtlsdr_lib} rtl_sdr rtl_tcp rtl_test rtl_fm rtl_eeprom rtl_adsb rtl_power) + +-target_link_libraries(rtl_sdr rtlsdr_shared convenience_static ++target_link_libraries(rtl_sdr ${rtlsdr_lib} convenience_static + ${LIBUSB_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ) +-target_link_libraries(rtl_tcp rtlsdr_shared convenience_static ++target_link_libraries(rtl_tcp ${rtlsdr_lib} convenience_static + ${LIBUSB_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ) +-target_link_libraries(rtl_test rtlsdr_shared convenience_static ++target_link_libraries(rtl_test ${rtlsdr_lib} convenience_static + ${LIBUSB_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ) +-target_link_libraries(rtl_fm rtlsdr_shared convenience_static ++target_link_libraries(rtl_fm ${rtlsdr_lib} convenience_static + ${LIBUSB_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ) +-target_link_libraries(rtl_eeprom rtlsdr_shared convenience_static ++target_link_libraries(rtl_eeprom ${rtlsdr_lib} convenience_static + ${LIBUSB_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ) +-target_link_libraries(rtl_adsb rtlsdr_shared convenience_static ++target_link_libraries(rtl_adsb ${rtlsdr_lib} convenience_static + ${LIBUSB_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ) +-target_link_libraries(rtl_power rtlsdr_shared convenience_static ++target_link_libraries(rtl_power ${rtlsdr_lib} convenience_static + ${LIBUSB_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} + ) diff --git a/package/librtlsdr/Config.in b/package/librtlsdr/Config.in new file mode 100644 index 0000000000..1e217bcf10 --- /dev/null +++ b/package/librtlsdr/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_LIBRTLSDR + bool "librtlsdr" + select BR2_PACKAGE_LIBUSB + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Library and command line programs for accessing + RTL2832U SDR dongles. + + http://sdr.osmocom.org/trac/wiki/rtl-sdr/ + +if BR2_PACKAGE_LIBRTLSDR + +config BR2_PACKAGE_LIBRTLSDR_DETACH_DRIVER + bool "Detach kernel driver" + default y + help + Enable this option if you would like librtlsdr to + automatically detach any kernel driver associated to the + RTL2832U USB device on startup if one is loaded. + +endif + +comment "librtlsdr needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/librtlsdr/librtlsdr.mk b/package/librtlsdr/librtlsdr.mk new file mode 100644 index 0000000000..51ecabe14a --- /dev/null +++ b/package/librtlsdr/librtlsdr.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# librtlsdr +# +################################################################################ + +LIBRTLSDR_VERSION = v0.5.3 +LIBRTLSDR_SITE = $(call github,steve-m,librtlsdr,$(LIBRTLSDR_VERSION)) +LIBRTLSDR_LICENSE = GPLv2+ +LIBRTLSDR_LICENSE_FILES = COPYING +LIBRTLSDR_INSTALL_STAGING = YES +LIBRTLSDR_DEPENDENCIES = libusb + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +LIBRTLSDR_CONF_OPTS += -DINSTALL_UDEV_RULES=ON +endif + +ifeq ($(BR2_PACKAGE_LIBRTLSDR_DETACH_DRIVER),y) +LIBRTLSDR_CONF_OPTS += -DDETACH_KERNEL_DRIVER=1 +endif + +# In case of static-lib-only builds, CMake's FindThreads.cmake code tries to +# get the right flags, checking first for -lpthreads, then -lpthread, and lastly +# for -pthread. +# The 2 first link checks fail because of undefined symbols: __libc_setup_tls. +# In the later check, CMake successfully compiles and links the test program, +# but it also tries to run it, which is wrong when cross-compiling. +# +# The following CMake variable only disables the TRY_RUN call in the -pthread +# test. +LIBRTLSDR_CONF_OPTS += -DTHREADS_PTHREAD_ARG=OFF + +$(eval $(cmake-package)) diff --git a/package/libsamplerate/Config.in b/package/libsamplerate/Config.in new file mode 100644 index 0000000000..b394fdb0ac --- /dev/null +++ b/package/libsamplerate/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBSAMPLERATE + bool "libsamplerate" + help + Secret Rabbit Code (aka libsamplerate) is a Sample Rate + Converter for audio. One example of where such a thing would + be useful is converting audio from the CD sample rate of + 44.1kHz to the 48kHz sample rate used by DAT players. + + http://www.mega-nerd.com/SRC/ diff --git a/package/libsamplerate/libsamplerate.hash b/package/libsamplerate/libsamplerate.hash new file mode 100644 index 0000000000..a495108d3a --- /dev/null +++ b/package/libsamplerate/libsamplerate.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 93b54bdf46d5e6d2354b7034395fe329c222a966790de34520702bb9642f1c06 libsamplerate-0.1.8.tar.gz diff --git a/package/libsamplerate/libsamplerate.mk b/package/libsamplerate/libsamplerate.mk new file mode 100644 index 0000000000..28fd644fa3 --- /dev/null +++ b/package/libsamplerate/libsamplerate.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# libsamplerate +# +################################################################################ + +LIBSAMPLERATE_VERSION = 0.1.8 +LIBSAMPLERATE_SITE = http://www.mega-nerd.com/SRC +LIBSAMPLERATE_INSTALL_STAGING = YES +LIBSAMPLERATE_DEPENDENCIES = host-pkgconf +LIBSAMPLERATE_CONF_OPTS = --disable-fftw --program-transform-name='' +LIBSAMPLERATE_LICENSE = Dual GPLv2+ / libsamplerate commercial use license +LIBSAMPLERATE_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBSNDFILE),y) +LIBSAMPLERATE_DEPENDENCIES += libsndfile +endif + +$(eval $(autotools-package)) diff --git a/package/libseccomp/0001-remove-static.patch b/package/libseccomp/0001-remove-static.patch new file mode 100644 index 0000000000..6fd81f96d5 --- /dev/null +++ b/package/libseccomp/0001-remove-static.patch @@ -0,0 +1,29 @@ +Do not force static link, it breaks build with +# BR2_STATIC_LIBS is not set +BR2_SHARED_LIBS=y + +Signed-off-by: Bernd Kuhls + +diff -uNr libseccomp-2.2.0.org/tests/Makefile.am libseccomp-2.2.0/tests/Makefile.am +--- libseccomp-2.2.0.org/tests/Makefile.am 2015-02-11 21:57:11.000000000 +0100 ++++ libseccomp-2.2.0/tests/Makefile.am 2015-03-29 16:03:49.668946652 +0200 +@@ -16,7 +16,6 @@ + # along with this library; if not, see . + # + +-AM_LDFLAGS = -static + LDADD = util.la ../src/libseccomp.la + + check_LTLIBRARIES = util.la +diff -uNr libseccomp-2.2.0.org/tools/Makefile.am libseccomp-2.2.0/tools/Makefile.am +--- libseccomp-2.2.0.org/tools/Makefile.am 2015-02-11 21:57:11.000000000 +0100 ++++ libseccomp-2.2.0/tools/Makefile.am 2015-03-29 16:03:46.164992302 +0200 +@@ -33,8 +33,6 @@ + scmp_bpf_sim_SOURCES = scmp_bpf_sim.c bpf.h util.h + + scmp_sys_resolver_LDADD = ../src/libseccomp.la +-scmp_sys_resolver_LDFLAGS = -static + scmp_arch_detect_LDADD = ../src/libseccomp.la +-scmp_arch_detect_LDFLAGS = -static + scmp_bpf_disasm_LDADD = util.la + scmp_bpf_sim_LDADD = util.la diff --git a/package/libseccomp/0002-musl.patch b/package/libseccomp/0002-musl.patch new file mode 100644 index 0000000000..9858d76099 --- /dev/null +++ b/package/libseccomp/0002-musl.patch @@ -0,0 +1,28 @@ +From eb5382287cd25235e760b5da4939510b11bbf2a1 Mon Sep 17 00:00:00 2001 +From: Kylie McClain +Date: Fri, 1 Jan 2016 13:12:59 -0500 +Subject: [PATCH] system.h: Remove conflicting kernel header include + +This fixes building on musl libc, since musl does not include kernel +headers. I've tested this as working on both glibc and musl. + +Signed-off-by: Kylie McClain +[Bernd: downloaded from upstream PR: + https://github.com/seccomp/libseccomp/pull/23] +Signed-off-by: Bernd Kuhls +--- + src/system.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/system.h b/src/system.h +index 4660679..e84b0a0 100644 +--- a/src/system.h ++++ b/src/system.h +@@ -23,7 +23,6 @@ + #define _SYSTEM_H + + #include +-#include + + #include "configure.h" + diff --git a/package/libseccomp/Config.in b/package/libseccomp/Config.in new file mode 100644 index 0000000000..4c34c54665 --- /dev/null +++ b/package/libseccomp/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_LIBSECCOMP + bool "libseccomp" + depends on BR2_aarch64 || BR2_mips || BR2_mipsel || BR2_mips64 || \ + BR2_mips64el || BR2_i386 || BR2_x86_64 + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + help + High level interface to the Linux Kernel's seccomp filter + + The libseccomp library provides an easy to use, platform independent, + interface to the Linux Kernel's syscall filtering mechanism: seccomp. + The libseccomp API is designed to abstract away the underlying BPF + based syscall filter language and present a more conventional + function-call based filtering interface that should be familiar to, + and easily adopted by application developers. + + https://github.com/seccomp/libseccomp + +comment "libseccomp needs a toolchain w/ headers >= 3.12" + depends on BR2_aarch64 || BR2_mips || BR2_mipsel || BR2_mips64 || \ + BR2_mips64el || BR2_i386 || BR2_x86_64 + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 diff --git a/package/libseccomp/libseccomp.mk b/package/libseccomp/libseccomp.mk new file mode 100644 index 0000000000..69559f73f9 --- /dev/null +++ b/package/libseccomp/libseccomp.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libseccomp +# +################################################################################ + +LIBSECCOMP_VERSION = v2.2.3 +LIBSECCOMP_SITE = $(call github,seccomp,libseccomp,$(LIBSECCOMP_VERSION)) +LIBSECCOMP_LICENSE = LGPLv2.1 +LIBSECCOMP_LICENSE_FILES = LICENSE +LIBSECCOMP_INSTALL_STAGING = YES +LIBSECCOMP_AUTORECONF = YES + +# Needed for autoreconf to work properly, see ./autogen.sh +define LIBSECCOMP_FIXUP_M4_DIR + mkdir $(@D)/m4 +endef +LIBSECCOMP_POST_EXTRACT_HOOKS += LIBSECCOMP_FIXUP_M4_DIR + +$(eval $(autotools-package)) diff --git a/package/libsecret/0001-libsecret.pc-add-Libs.private-field-for-libgcrypt.patch b/package/libsecret/0001-libsecret.pc-add-Libs.private-field-for-libgcrypt.patch new file mode 100644 index 0000000000..62bc84c87e --- /dev/null +++ b/package/libsecret/0001-libsecret.pc-add-Libs.private-field-for-libgcrypt.patch @@ -0,0 +1,38 @@ +From 754897490d9478025d174c2b1c1849305f728324 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 28 Dec 2015 12:13:07 +0100 +Subject: [PATCH] libsecret.pc: add Libs.private field for libgcrypt + +When libgcrypt is available, libsecret links with it. When dynamic +linking is used, there is no problem: libsecret.so has a NEEDED +pointing to libgcrypt, so linking an application with -lsecret works +fine. However, when doing static linking, you must specify the entire +chain of libraries, otherwise you get unresolved symbols errors, such +as: + +host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libsecret-1.a(libsecret_1_la-secret-session.o): In function `request_open_session_aes': +build/libsecret-0.18.3/libsecret/secret-session.c:99: undefined reference to `gcry_mpi_release' +build/libsecret-0.18.3/libsecret/secret-session.c:101: undefined reference to `gcry_mpi_aprint' +build/libsecret-0.18.3/libsecret/secret-session.c:107: undefined reference to `gcry_free' + +In order to solve this, we simply need to indicate in the Libs.private +field of the .pc file that we depend on libgcrypt. + +Signed-off-by: Thomas Petazzoni +--- + libsecret/libsecret.pc.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libsecret/libsecret.pc.in b/libsecret/libsecret.pc.in +index 0c342ef..d99cf44 100644 +--- a/libsecret/libsecret.pc.in ++++ b/libsecret/libsecret.pc.in +@@ -11,4 +11,5 @@ Description: GObject bindings for Secret Service API + Version: @VERSION@ + Requires: glib-2.0 gobject-2.0 gio-2.0 + Libs: -L${libdir} -lsecret-@SECRET_MAJOR@ ++Libs.private: @LIBGCRYPT_LIBS@ + Cflags: -I${includedir}/libsecret-@SECRET_MAJOR@ +-- +2.6.4 + diff --git a/package/libsecret/Config.in b/package/libsecret/Config.in new file mode 100644 index 0000000000..70f1fe7eb9 --- /dev/null +++ b/package/libsecret/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBSECRET + bool "libsecret" + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # gettext dep in libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + help + libsecret is a library for storing and retrieving passwords and other + secrets. It communicates with the "Secret Service" using DBus. + gnome-keyring and ksecretservice are both implementations of a Secret + Service. + + https://wiki.gnome.org/Libsecret + +comment "libsecret needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libsecret/libsecret.hash b/package/libsecret/libsecret.hash new file mode 100644 index 0000000000..a637cbecf4 --- /dev/null +++ b/package/libsecret/libsecret.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/libsecret/0.18/libsecret-0.18.5.sha256sum +sha256 9ce7bd8dd5831f2786c935d82638ac428fa085057cc6780aba0e39375887ccb3 libsecret-0.18.5.tar.xz diff --git a/package/libsecret/libsecret.mk b/package/libsecret/libsecret.mk new file mode 100644 index 0000000000..20a217f197 --- /dev/null +++ b/package/libsecret/libsecret.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# libsecret +# +################################################################################ + +LIBSECRET_VERSION_MAJOR = 0.18 +LIBSECRET_VERSION = $(LIBSECRET_VERSION_MAJOR).5 +LIBSECRET_SITE = http://ftp.gnome.org/pub/GNOME/sources/libsecret/$(LIBSECRET_VERSION_MAJOR) +LIBSECRET_SOURCE = libsecret-$(LIBSECRET_VERSION).tar.xz +LIBSECRET_INSTALL_STAGING = YES +LIBSECRET_DEPENDENCIES = libglib2 host-intltool +LIBSECRET_CONF_OPTS = \ + --disable-manpages \ + --disable-strict \ + --disable-coverage \ + --enable-introspection=no \ + --enable-vala=no +LIBSECRET_LICENSE = LGPLv2.1+ +LIBSECRET_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +LIBSECRET_DEPENDENCIES += libgcrypt +LIBSECRET_CONF_OPTS += --enable-gcrypt \ + --with-libgcrypt-prefix=$(STAGING_DIR)/usr +else +LIBSECRET_CONF_OPTS += --disable-gcrypt +endif + +$(eval $(autotools-package)) diff --git a/package/libselinux/0001-workaround-blackfin-issue.patch b/package/libselinux/0001-workaround-blackfin-issue.patch new file mode 100644 index 0000000000..5d00c6983b --- /dev/null +++ b/package/libselinux/0001-workaround-blackfin-issue.patch @@ -0,0 +1,24 @@ +Do not make symbols hidden on Blackfin + +The libselinux logic to hide internal symbols from the DSO doesn't +work properly on Blackfin due to the USER_LABEL_PREFIX not being +handled properly. A real fix is not that simple, so this patch simply +disables the internal symbol hiding mechanism. This means that those +symbols are visible in the final DSO, which is not a problem for +proper execution, it just isn't as clean. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/dso.h +=================================================================== +--- a/src/dso.h ++++ b/src/dso.h +@@ -1,7 +1,7 @@ + #ifndef _SELINUX_DSO_H + #define _SELINUX_DSO_H 1 + +-#ifdef SHARED ++#if defined(SHARED) && !defined(__bfin__) + # define hidden __attribute__ ((visibility ("hidden"))) + # define hidden_proto(fct) __hidden_proto (fct, fct##_internal) + # define __hidden_proto(fct, internal) \ diff --git a/package/libselinux/0002-fix-musl-build.patch b/package/libselinux/0002-fix-musl-build.patch new file mode 100644 index 0000000000..7af3a3c36f --- /dev/null +++ b/package/libselinux/0002-fix-musl-build.patch @@ -0,0 +1,30 @@ +fix undefined macros in musl + +musl does not define glibc-specific macros, so use a simple version of +the macro when it is not defined. + +This is very inefficient, however, but copying the code from glibc is +not really possible because it is LGPL while libselinux in Public +Domain, and we want to avoid license propagation, so this macro is +completely written from scratch, and non-optimal. + +Signed-off-by: "Yann E. MORIN" + +diff -durN libselinux-2.1.13.orig/src/booleans.c libselinux-2.1.13/src/booleans.c +--- libselinux-2.1.13.orig/src/booleans.c 2013-02-06 02:43:22.000000000 +0100 ++++ libselinux-2.1.13/src/booleans.c 2015-07-26 20:40:41.311801914 +0200 +@@ -62,6 +62,14 @@ + goto bad; + } + ++/* Simple (but inefficient) version of _D_ALLOC_NAMLEN when ++ * building with a C library that misses it (e.g. musl). ++ * Note: glibc does a strlen on (d)->d_name, so assume it is safe. ++ */ ++#ifndef _D_ALLOC_NAMLEN ++#define _D_ALLOC_NAMLEN(d) (strlen((d)->d_name)+1) ++#endif ++ + for (i = 0; i < *len; i++) { + n[i] = (char *)malloc(_D_ALLOC_NAMLEN(namelist[i])); + if (!n[i]) { diff --git a/package/libselinux/Config.in b/package/libselinux/Config.in new file mode 100644 index 0000000000..bc8298db4c --- /dev/null +++ b/package/libselinux/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBSELINUX + bool "libselinux" + select BR2_PACKAGE_LIBSEPOL + select BR2_PACKAGE_PCRE + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + # Toolchain issue: "fixup not contained within frag" + depends on !BR2_arc + help + libselinux is the runtime SELinux library that provides + interfaces (e.g. library functions for the SELinux kernel + APIs like getcon(), other support functions like + getseuserbyname()) to SELinux-aware applications. libselinux + may use the shared libsepol to manipulate the binary policy + if necessary (e.g. to downgrade the policy format to an + older version supported by the kernel) when loading policy. + + http://selinuxproject.org/page/Main_Page + +comment "libselinux needs a toolchain w/ threads, dynamic library" + depends on !BR2_arc + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/libselinux/libselinux.hash b/package/libselinux/libselinux.hash new file mode 100644 index 0000000000..861c327ffa --- /dev/null +++ b/package/libselinux/libselinux.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 57aad47c06b7ec18a76e8d9870539277a84cb40109cfdcf70ed3260bdb04447a libselinux-2.1.13.tar.gz diff --git a/package/libselinux/libselinux.mk b/package/libselinux/libselinux.mk new file mode 100644 index 0000000000..d4b96c47d1 --- /dev/null +++ b/package/libselinux/libselinux.mk @@ -0,0 +1,80 @@ +################################################################################ +# +# libselinux +# +################################################################################ + +LIBSELINUX_VERSION = 2.1.13 +LIBSELINUX_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20130423 +LIBSELINUX_LICENSE = Public Domain +LIBSELINUX_LICENSE_FILES = LICENSE + +LIBSELINUX_DEPENDENCIES = libsepol pcre + +LIBSELINUX_INSTALL_STAGING = YES + +LIBSELINUX_MAKE_OPTS = \ + $(TARGET_CONFIGURE_OPTS) \ + LDFLAGS="$(TARGET_LDFLAGS) -lpcre -lpthread" \ + ARCH=$(KERNEL_ARCH) + +define LIBSELINUX_BUILD_CMDS + # DESTDIR is needed during the compile to compute library and + # header paths. + $(MAKE) -C $(@D) $(LIBSELINUX_MAKE_OPTS) DESTDIR=$(STAGING_DIR) all +endef + +define LIBSELINUX_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) $(LIBSELINUX_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install +endef + +define LIBSELINUX_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) $(LIBSELINUX_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install + # Create the selinuxfs mount point + if [ ! -d "$(TARGET_DIR)/selinux" ]; then mkdir $(TARGET_DIR)/selinux; fi + if ! grep -q "selinuxfs" $(TARGET_DIR)/etc/fstab; then \ + echo "none /selinux selinuxfs noauto 0 0" >> $(TARGET_DIR)/etc/fstab ; fi +endef + +HOST_LIBSELINUX_DEPENDENCIES = \ + host-libsepol host-pcre host-swig + +ifeq ($(BR2_PACKAGE_PYTHON3),y) +HOST_LIBSELINUX_DEPENDENCIES += host-python3 +HOST_LIBSELINUX_PYTHONLIBDIR = -L$(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/ +HOST_LIBSELINUX_PYINC = -I$(HOST_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)m/ +HOST_LIBSELINUX_PYLIBVER = python$(PYTHON3_VERSION_MAJOR) +else +HOST_LIBSELINUX_DEPENDENCIES += host-python +HOST_LIBSELINUX_PYTHONLIBDIR = -L$(HOST_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/ +HOST_LIBSELINUX_PYINC = -I$(HOST_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)/ +HOST_LIBSELINUX_PYLIBVER = python$(PYTHON_VERSION_MAJOR) +endif + +HOST_LIBSELINUX_MAKE_OPTS = \ + $(HOST_CONFIGURE_OPTS) \ + LDFLAGS="$(HOST_LDFLAGS) -lpcre -lpthread" \ + PYINC="$(HOST_LIBSELINUX_PYINC)" \ + PYTHONLIBDIR="$(HOST_LIBSELINUX_PYTHONLIBDIR)" \ + PYLIBVER="$(HOST_LIBSELINUX_PYLIBVER)" \ + SWIG_LIB="$(HOST_DIR)/usr/share/swig/$(SWIG_VERSION)/" + +define HOST_LIBSELINUX_BUILD_CMDS + # DESTDIR is needed during the compile to compute library and + # header paths. + $(MAKE1) -C $(@D) $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) \ + SHLIBDIR=$(HOST_DIR)/usr/lib all + # Generate python interface wrapper + $(MAKE1) -C $(@D) $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) swigify pywrap +endef + +define HOST_LIBSELINUX_INSTALL_CMDS + $(MAKE) -C $(@D) $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) \ + SHLIBDIR=$(HOST_DIR)/usr/lib SBINDIR=$(HOST_DIR)/usr/sbin install + (cd $(HOST_DIR)/usr/lib; $(HOSTLN) -sf libselinux.so.1 libselinux.so) + # Install python interface wrapper + $(MAKE) -C $(@D) $(HOST_LIBSELINUX_MAKE_OPTS) DESTDIR=$(HOST_DIR) install-pywrap +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/libsemanage/0001-execption-lib-path-fix.patch b/package/libsemanage/0001-execption-lib-path-fix.patch new file mode 100644 index 0000000000..cbcbea5995 --- /dev/null +++ b/package/libsemanage/0001-execption-lib-path-fix.patch @@ -0,0 +1,14 @@ +Patch to correct a missing header file issue. + +Signed-off-by Clayton Shotwell + +--- a/src/exception.sh 2011-12-21 11:46:04.000000000 -0600 ++++ b/src/exception.sh 2012-08-27 11:29:58.000000000 -0500 +@@ -9,6 +9,6 @@ + } + " + } +-gcc -x c -c - -aux-info temp.aux < ../include/semanage/semanage.h ++gcc -x c -c - -aux-info temp.aux -I../include < ../include/semanage/semanage.h + for i in `awk '/extern int/ { print $6 }' temp.aux`; do except $i ; done + rm -f -- temp.aux -.o diff --git a/package/libsemanage/0002-workaround-blackfin-issue.patch b/package/libsemanage/0002-workaround-blackfin-issue.patch new file mode 100644 index 0000000000..5d00c6983b --- /dev/null +++ b/package/libsemanage/0002-workaround-blackfin-issue.patch @@ -0,0 +1,24 @@ +Do not make symbols hidden on Blackfin + +The libselinux logic to hide internal symbols from the DSO doesn't +work properly on Blackfin due to the USER_LABEL_PREFIX not being +handled properly. A real fix is not that simple, so this patch simply +disables the internal symbol hiding mechanism. This means that those +symbols are visible in the final DSO, which is not a problem for +proper execution, it just isn't as clean. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/dso.h +=================================================================== +--- a/src/dso.h ++++ b/src/dso.h +@@ -1,7 +1,7 @@ + #ifndef _SELINUX_DSO_H + #define _SELINUX_DSO_H 1 + +-#ifdef SHARED ++#if defined(SHARED) && !defined(__bfin__) + # define hidden __attribute__ ((visibility ("hidden"))) + # define hidden_proto(fct) __hidden_proto (fct, fct##_internal) + # define __hidden_proto(fct, internal) \ diff --git a/package/libsemanage/Config.in b/package/libsemanage/Config.in new file mode 100644 index 0000000000..5e9ad8fee5 --- /dev/null +++ b/package/libsemanage/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_LIBSEMANAGE + bool "libsemanage" + select BR2_PACKAGE_LIBSELINUX + select BR2_PACKAGE_USTR + select BR2_PACKAGE_BZIP2 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # getpwent_r() + depends on !BR2_arc + help + libsemanage is the policy management library. It uses + libsepol for binary policy manipulation and libselinux for + interacting with the SELinux system. It also exec's helper + programs for loading policy and for checking whether the + file_contexts configuration is valid (load_policy and + setfiles from policycoreutils) presently, although this may + change at least for the bootstrapping case (for rpm). + + http://selinuxproject.org/page/Main_Page + +comment "libsemanage needs a toolchain w/ threads, dynamic library" + depends on !BR2_arc + depends on !BR2_TOOLCHAIN_USES_MUSL + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/libsemanage/libsemanage.hash b/package/libsemanage/libsemanage.hash new file mode 100644 index 0000000000..d4204d1b62 --- /dev/null +++ b/package/libsemanage/libsemanage.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 de2e8077245581e94576276f54e80a53c23c28d6961d2dfbe2f004eaba452e91 libsemanage-2.1.10.tar.gz diff --git a/package/libsemanage/libsemanage.mk b/package/libsemanage/libsemanage.mk new file mode 100644 index 0000000000..197c14e422 --- /dev/null +++ b/package/libsemanage/libsemanage.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# libsemanage +# +################################################################################ + +LIBSEMANAGE_VERSION = 2.1.10 +LIBSEMANAGE_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20130423 +LIBSEMANAGE_LICENSE = LGPLv2.1+ +LIBSEMANAGE_LICENSE_FILES = COPYING +LIBSEMANAGE_DEPENDENCIES = host-bison host-flex libselinux ustr bzip2 +LIBSEMANAGE_INSTALL_STAGING = YES + +LIBSEMANAGE_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) + +define LIBSEMANAGE_BUILD_CMDS + # DESTDIR is needed during the compile to compute library and + # header paths. + $(MAKE) -C $(@D) $(LIBSEMANAGE_MAKE_OPTS) DESTDIR=$(STAGING_DIR) all +endef + +define LIBSEMANAGE_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) $(LIBSEMANAGE_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install +endef + +define LIBSEMANAGE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) $(LIBSEMANAGE_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install +endef + +HOST_LIBSEMANAGE_DEPENDENCIES = host-bison host-libsepol host-libselinux \ + host-ustr host-bzip2 host-swig +HOST_LIBSEMANAGE_MAKE_OPTS += $(HOST_CONFIGURE_OPTS) \ + SWIG_LIB="$(HOST_DIR)/usr/share/swig/$(SWIG_VERSION)/" + +ifeq ($(BR2_PACKAGE_PYTHON3),y) +HOST_LIBSEMANAGE_DEPENDENCIES += host-python3 +HOST_LIBSEMANAGE_MAKE_OPTS += \ + PYINC="-I$(HOST_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)m/" \ + PYTHONLIBDIR="-L$(HOST_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/" \ + PYLIBVER="python$(PYTHON3_VERSION_MAJOR)" +else +HOST_LIBSEMANAGE_DEPENDENCIES += host-python +HOST_LIBSEMANAGE_MAKE_OPTS += \ + PYINC="-I$(HOST_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR)/" \ + PYTHONLIBDIR="-L$(HOST_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/" \ + PYLIBVER="python$(PYTHON_VERSION_MAJOR)" +endif + +define HOST_LIBSEMANAGE_BUILD_CMDS + # DESTDIR is needed during the compile to compute library and + # header paths. + $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR) all + $(MAKE) -C $(@D) $(HOST_LIBSEMANAGE_MAKE_OPTS) DESTDIR=$(HOST_DIR) swigify pywrap +endef + +define HOST_LIBSEMANAGE_INSTALL_CMDS + $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR) install + $(MAKE) -C $(@D) $(HOST_LIBSEMANAGE_MAKE_OPTS) DESTDIR=$(HOST_DIR) install-pywrap +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/libsepol/0001-support-static-only.patch b/package/libsepol/0001-support-static-only.patch new file mode 100644 index 0000000000..b9746807ba --- /dev/null +++ b/package/libsepol/0001-support-static-only.patch @@ -0,0 +1,44 @@ +Add support for static-only build + +Instead of unconditionally building shared libraries, this patch +improves the libsepol build system with a "STATIC" variable, which +when defined to some non-empty value, will disable the build of shared +libraries. It allows to support cases where the target architecture +does not have support for shared libraries. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -17,7 +17,12 @@ + CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute + override CFLAGS += -I. -I../include -D_GNU_SOURCE + +-all: $(LIBA) $(LIBSO) $(LIBPC) ++ALL_TARGETS = $(LIBA) $(LIBPC) ++ifeq ($(STATIC),) ++ALL_TARGETS += $(LIBSO) ++endif ++ ++all: $(ALL_TARGETS) + + $(LIBA): $(OBJS) + $(AR) rcs $@ $^ +@@ -39,11 +44,13 @@ + install: all + test -d $(LIBDIR) || install -m 755 -d $(LIBDIR) + install -m 644 $(LIBA) $(LIBDIR) +- test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR) +- install -m 755 $(LIBSO) $(SHLIBDIR) + test -d $(LIBDIR)/pkgconfig || install -m 755 -d $(LIBDIR)/pkgconfig + install -m 644 $(LIBPC) $(LIBDIR)/pkgconfig ++ifeq ($(STATIC),) ++ test -d $(SHLIBDIR) || install -m 755 -d $(SHLIBDIR) ++ install -m 755 $(LIBSO) $(SHLIBDIR) + cd $(LIBDIR) && ln -sf ../../`basename $(SHLIBDIR)`/$(LIBSO) $(TARGET) ++endif + + relabel: + /sbin/restorecon $(SHLIBDIR)/$(LIBSO) diff --git a/package/libsepol/0002-workaround-blackfin-issue.patch b/package/libsepol/0002-workaround-blackfin-issue.patch new file mode 100644 index 0000000000..5d00c6983b --- /dev/null +++ b/package/libsepol/0002-workaround-blackfin-issue.patch @@ -0,0 +1,24 @@ +Do not make symbols hidden on Blackfin + +The libselinux logic to hide internal symbols from the DSO doesn't +work properly on Blackfin due to the USER_LABEL_PREFIX not being +handled properly. A real fix is not that simple, so this patch simply +disables the internal symbol hiding mechanism. This means that those +symbols are visible in the final DSO, which is not a problem for +proper execution, it just isn't as clean. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/dso.h +=================================================================== +--- a/src/dso.h ++++ b/src/dso.h +@@ -1,7 +1,7 @@ + #ifndef _SELINUX_DSO_H + #define _SELINUX_DSO_H 1 + +-#ifdef SHARED ++#if defined(SHARED) && !defined(__bfin__) + # define hidden __attribute__ ((visibility ("hidden"))) + # define hidden_proto(fct) __hidden_proto (fct, fct##_internal) + # define __hidden_proto(fct, internal) \ diff --git a/package/libsepol/Config.in b/package/libsepol/Config.in new file mode 100644 index 0000000000..f92af52072 --- /dev/null +++ b/package/libsepol/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBSEPOL + bool "libsepol" + help + Libsepol is the binary policy manipulation library. It doesn't + depend upon or use any of the other SELinux components. + + http://selinuxproject.org/page/Main_Page diff --git a/package/libsepol/libsepol.hash b/package/libsepol/libsepol.hash new file mode 100644 index 0000000000..df5dabdf68 --- /dev/null +++ b/package/libsepol/libsepol.hash @@ -0,0 +1,2 @@ +# From https://github.com/SELinuxProject/selinux/wiki/Releases +sha256 290d17f583635a4a5d8a2141511272adf0571c4205cdea38b5a68df20d58a70b libsepol-2.1.9.tar.gz diff --git a/package/libsepol/libsepol.mk b/package/libsepol/libsepol.mk new file mode 100644 index 0000000000..1e709c6186 --- /dev/null +++ b/package/libsepol/libsepol.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# libsepol +# +################################################################################ + +LIBSEPOL_VERSION = 2.1.9 +LIBSEPOL_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20130423 +LIBSEPOL_LICENSE = LGPLv2.1+ +LIBSEPOL_LICENSE_FILES = COPYING + +LIBSEPOL_INSTALL_STAGING = YES + +LIBSEPOL_MAKE_FLAGS = $(TARGET_CONFIGURE_OPTS) + +ifeq ($(BR2_STATIC_LIBS),y) +LIBSEPOL_MAKE_FLAGS += STATIC=1 +endif + +define LIBSEPOL_BUILD_CMDS + # DESTDIR is needed during the compile to compute library and + # header paths. + $(MAKE) -C $(@D) $(LIBSEPOL_MAKE_FLAGS) DESTDIR=$(STAGING_DIR) +endef + +define LIBSEPOL_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) DESTDIR=$(STAGING_DIR) +endef + +define LIBSEPOL_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) install $(LIBSEPOL_MAKE_FLAGS) DESTDIR=$(TARGET_DIR) +endef + +define HOST_LIBSEPOL_BUILD_CMDS + $(MAKE) -C $(@D) $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR) +endef + +define HOST_LIBSEPOL_INSTALL_CMDS + $(MAKE) -C $(@D) install $(HOST_CONFIGURE_OPTS) DESTDIR=$(HOST_DIR) + mv $(HOST_DIR)/lib/libsepol.so.1 $(HOST_DIR)/usr/lib + (cd $(HOST_DIR)/usr/lib; rm -f libsepol.so; ln -s libsepol.so.1 libsepol.so) + -rmdir $(HOST_DIR)/lib +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/libserial/0001-disable-python-bindings.patch b/package/libserial/0001-disable-python-bindings.patch new file mode 100644 index 0000000000..1f2f5ed7df --- /dev/null +++ b/package/libserial/0001-disable-python-bindings.patch @@ -0,0 +1,26 @@ +Disable build of Python bindings, which requires the sipconfig module. + +Signed-off-by: Simon Dawson +Signed-off-by: Jörg Krause + +diff -purN libserial-0.6.0rc2.orig/Makefile.am libserial-0.6.0rc2/Makefile.am +--- libserial-0.6.0rc2.orig/Makefile.am 2014-06-05 18:37:25.000000000 +0200 ++++ libserial-0.6.0rc2/Makefile.am 2015-07-30 20:59:28.828429011 +0200 +@@ -1,4 +1,4 @@ +-SUBDIRS=src doc examples sip ++SUBDIRS=src doc examples + ACLOCAL_AMFLAGS=-I m4 + + EXTRA_DIST = doxygen.conf.in Makefile.dist libserial.spec libserial.pc +diff -purN libserial-0.6.0rc2.orig/Makefile.in libserial-0.6.0rc2/Makefile.in +--- libserial-0.6.0rc2.orig/Makefile.in 2014-06-05 18:40:09.000000000 +0200 ++++ libserial-0.6.0rc2/Makefile.in 2015-07-30 21:00:09.215188376 +0200 +@@ -348,7 +348,7 @@ target_alias = @target_alias@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = src doc examples sip ++SUBDIRS = src doc examples + ACLOCAL_AMFLAGS = -I m4 + EXTRA_DIST = doxygen.conf.in Makefile.dist libserial.spec libserial.pc + pkgconfigdir = $(libdir)/pkgconfig diff --git a/package/libserial/0002-Don-t-use-high-baudrates-when-not-available.patch b/package/libserial/0002-Don-t-use-high-baudrates-when-not-available.patch new file mode 100644 index 0000000000..f2ad61ae7d --- /dev/null +++ b/package/libserial/0002-Don-t-use-high-baudrates-when-not-available.patch @@ -0,0 +1,65 @@ +From 47ca0621ccd2100e4ba0d7f4e2a861d14f05f63c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 17 Nov 2015 23:50:14 +0100 +Subject: [PATCH] Don't use high baudrates when not available + +On certain architectures (namely Sparc), the maximum baud rate exposed +by the kernel headers is B2000000. Therefore, the current libserial +code doesn't build for the Sparc and Sparc64 architectures due to +this. + +In order to address this problem, this patch tests the value of +__MAX_BAUD. If it's higher than B2000000 then we assume we're on an +architecture that supports all baud rates up to B4000000. Otherwise, +we simply don't support the baud rates above B2000000. + +Fixes build failures such as: + +./SerialPort.h:88:24: error: 'B2500000' was not declared in this scope + BAUD_2500000 = B2500000, + +Signed-off-by: Thomas Petazzoni +--- + src/SerialPort.h | 2 ++ + src/SerialStreamBuf.h | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/src/SerialPort.h b/src/SerialPort.h +index 6c0baaa..0b1af4c 100644 +--- a/src/SerialPort.h ++++ b/src/SerialPort.h +@@ -85,11 +85,13 @@ public: + BAUD_1152000 = B1152000, + BAUD_1500000 = B1500000, + BAUD_2000000 = B2000000, ++#if __MAX_BAUD > B2000000 + BAUD_2500000 = B2500000, + BAUD_3000000 = B3000000, + BAUD_3500000 = B3500000, + BAUD_4000000 = B4000000, + #endif ++#endif /* __linux__ */ + BAUD_DEFAULT = BAUD_57600 + } ; + +diff --git a/src/SerialStreamBuf.h b/src/SerialStreamBuf.h +index ccbb996..174f31c 100644 +--- a/src/SerialStreamBuf.h ++++ b/src/SerialStreamBuf.h +@@ -85,11 +85,13 @@ extern "C++" + BAUD_1152000 = SerialPort::BAUD_1152000, + BAUD_1500000 = SerialPort::BAUD_1500000, + BAUD_2000000 = SerialPort::BAUD_2000000, ++#if __MAX_BAUD > B2000000 + BAUD_2500000 = SerialPort::BAUD_2500000, + BAUD_3000000 = SerialPort::BAUD_3000000, + BAUD_3500000 = SerialPort::BAUD_3500000, + BAUD_4000000 = SerialPort::BAUD_4000000, + #endif ++#endif /* __linux__ */ + BAUD_DEFAULT = SerialPort::BAUD_DEFAULT, + BAUD_INVALID = -1 + } ; +-- +2.6.3 + diff --git a/package/libserial/Config.in b/package/libserial/Config.in new file mode 100644 index 0000000000..df5d1b5432 --- /dev/null +++ b/package/libserial/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_LIBSERIAL + bool "libserial" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS # boost + depends on BR2_TOOLCHAIN_HAS_THREADS # boost + depends on BR2_USE_WCHAR # boost + select BR2_PACKAGE_BOOST + help + Simplified serial port programming in C++ under POSIX operating + systems. + + http://libserial.sourceforge.net/ + +comment "libserial needs a toolchain w/ C++, threads, wchar" + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/libserial/libserial.hash b/package/libserial/libserial.hash new file mode 100644 index 0000000000..bca647ae3f --- /dev/null +++ b/package/libserial/libserial.hash @@ -0,0 +1,5 @@ +# From http://sourceforge.net/projects/libserial/files/libserial/0.6.0rc2/ +sha1 e09113be3ba595135e95e853003ff96feea0da63 libserial-0.6.0rc2.tar.gz +md5 7787679b22901e4810bc53ecccdf8266 libserial-0.6.0rc2.tar.gz +# Locally calculated +sha256 35ee29eb1369d52ffb8658237577692f991eb508320d0abbb71c53e6494a1c23 libserial-0.6.0rc2.tar.gz diff --git a/package/libserial/libserial.mk b/package/libserial/libserial.mk new file mode 100644 index 0000000000..11f187484e --- /dev/null +++ b/package/libserial/libserial.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libserial +# +################################################################################ + +LIBSERIAL_VERSION = 0.6.0rc2 +LIBSERIAL_SITE = http://downloads.sourceforge.net/libserial +LIBSERIAL_INSTALL_STAGING = YES +LIBSERIAL_LICENSE = GPLv2+ +LIBSERIAL_LICENSE_FILES = COPYING +LIBSERIAL_DEPENDENCIES = boost + +LIBSERIAL_CONF_ENV = ac_cv_prog_DOCBOOK2PDF=no + +$(eval $(autotools-package)) diff --git a/package/libserialport/Config.in b/package/libserialport/Config.in new file mode 100644 index 0000000000..d8218309e9 --- /dev/null +++ b/package/libserialport/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBSERIALPORT + bool "libserialport" + help + Libserialport is a minimal, cross-platform shared + library written in C that is intended to take care + of the OS-specific details when writing software + that uses serial ports. + + http://sigrok.org/wiki/Libserialport diff --git a/package/libserialport/libserialport.hash b/package/libserialport/libserialport.hash new file mode 100644 index 0000000000..f2619029a2 --- /dev/null +++ b/package/libserialport/libserialport.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 4a2af9d9c3ff488e92fb75b4ba38b35bcf9b8a66df04773eba2a7bbf1fa7529d libserialport-0.1.1.tar.gz diff --git a/package/libserialport/libserialport.mk b/package/libserialport/libserialport.mk new file mode 100644 index 0000000000..d8c3a3d173 --- /dev/null +++ b/package/libserialport/libserialport.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libserialport +# +################################################################################ + +LIBSERIALPORT_VERSION = 0.1.1 +LIBSERIALPORT_SITE = http://sigrok.org/download/source/libserialport +LIBSERIALPORT_LICENSE = LGPLv3+ +LIBSERIALPORT_LICENSE_FILES = COPYING +LIBSERIALPORT_INSTALL_STAGING = YES +LIBSERIALPORT_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/libsexy/Config.in b/package/libsexy/Config.in new file mode 100644 index 0000000000..5d1e710c44 --- /dev/null +++ b/package/libsexy/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBSEXY + bool "libsexy" + depends on BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_LIBXML2 + help + libsexy is a collection of GTK+ widgets that extend the + functionality of such standard widgets as GtkEntry and + GtkLabel by subclassing them and working around the + limitations of the widgets. + + http://www.chipx86.com/wiki/Libsexy diff --git a/package/libsexy/libsexy.hash b/package/libsexy/libsexy.hash new file mode 100644 index 0000000000..78b1a82657 --- /dev/null +++ b/package/libsexy/libsexy.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 8c4101a8cda5fccbba85ba1a15f46f2cf75deaa8b3c525ce5b135b9e1a8fe49e libsexy-0.1.11.tar.gz diff --git a/package/libsexy/libsexy.mk b/package/libsexy/libsexy.mk new file mode 100644 index 0000000000..c291d7dc9f --- /dev/null +++ b/package/libsexy/libsexy.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libsexy +# +################################################################################ + +LIBSEXY_VERSION = 0.1.11 +LIBSEXY_SITE = http://releases.chipx86.com/libsexy/libsexy +LIBSEXY_DEPENDENCIES = libgtk2 libxml2 +LIBSEXY_INSTALL_STAGING = YES +LIBSEXY_LICENSE = LGPLv2.1+ +LIBSEXY_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libsha1/Config.in b/package/libsha1/Config.in new file mode 100644 index 0000000000..5467a6c4cd --- /dev/null +++ b/package/libsha1/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBSHA1 + bool "libsha1" + help + libsha1 is a tiny library providing SHA1 implementation, + created for facilitating X server compilation on devices + when larger libraries containing SHA1 implementations + (OpenSSL, Mozilla NSS) are not needed. + + https://github.com/dottedmag/libsha1 diff --git a/package/libsha1/libsha1.mk b/package/libsha1/libsha1.mk new file mode 100644 index 0000000000..647f986d4f --- /dev/null +++ b/package/libsha1/libsha1.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libsha1 +# +################################################################################ + +LIBSHA1_VERSION = 0.3 +LIBSHA1_SITE = $(call github,dottedmag,libsha1,$(LIBSHA1_VERSION)) +LIBSHA1_LICENSE = BSD-3c or GPL +LIBSHA1_LICENSE_FILES = COPYING + +LIBSHA1_INSTALL_STAGING = YES + +# We're getting the source code from GitHub, so there is no generated +# configure script in the tarball. +LIBSHA1_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/libshairplay/Config.in b/package/libshairplay/Config.in new file mode 100644 index 0000000000..1cfbdfe488 --- /dev/null +++ b/package/libshairplay/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LIBSHAIRPLAY + bool "libshairplay" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # avahi + depends on !BR2_STATIC_LIBS # avahi + select BR2_PACKAGE_AVAHI + select BR2_PACKAGE_AVAHI_DAEMON + select BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY # runtime + help + libshairplay is a client library that emulates an airplay + server. + + https://github.com/juhovh/shairplay + +comment "libshairplay needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/libshairplay/libshairplay.mk b/package/libshairplay/libshairplay.mk new file mode 100644 index 0000000000..35bbeac9d6 --- /dev/null +++ b/package/libshairplay/libshairplay.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libshairplay +# +################################################################################ + +LIBSHAIRPLAY_VERSION = 64d59e3087f829006d091fa0d114efb50972a2bf +LIBSHAIRPLAY_SITE = $(call github,juhovh,shairplay,$(LIBSHAIRPLAY_VERSION)) +LIBSHAIRPLAY_INSTALL_STAGING = YES +LIBSHAIRPLAY_AUTORECONF = YES +LIBSHAIRPLAY_LICENSE = MIT, BSD-3c, LGPLv2.1+ +LIBSHAIRPLAY_LICENSE_FILES = LICENSE +LIBSHAIRPLAY_DEPENDENCIES = host-pkgconf $(if $(BR2_PACKAGE_LIBAO),libao) + +$(eval $(autotools-package)) diff --git a/package/libshout/Config.in b/package/libshout/Config.in new file mode 100644 index 0000000000..02248c7f8e --- /dev/null +++ b/package/libshout/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBSHOUT + bool "libshout" + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBVORBIS + help + Libshout is a library for communicating with and sending data to an + icecast server. It handles the socket connection, the timing of the + data, and prevents bad data from getting to the icecast server. + + http://icecast.org/download/ diff --git a/package/libshout/libshout.hash b/package/libshout/libshout.hash new file mode 100644 index 0000000000..5b3ae2d446 --- /dev/null +++ b/package/libshout/libshout.hash @@ -0,0 +1,3 @@ +# From https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/libshout/Manifest +# hash from http://downloads.xiph.org/releases/libshout/SHA256SUMS is wrong! +sha256 f3acb8dec26f2dbf6df778888e0e429a4ce9378a9d461b02a7ccbf2991bbf24d libshout-2.4.1.tar.gz diff --git a/package/libshout/libshout.mk b/package/libshout/libshout.mk new file mode 100644 index 0000000000..029c134412 --- /dev/null +++ b/package/libshout/libshout.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# libshout +# +################################################################################ + +LIBSHOUT_VERSION = 2.4.1 +LIBSHOUT_SITE = http://downloads.xiph.org/releases/libshout +LIBSHOUT_LICENSE = LGPLv2+ +LIBSHOUT_LICENSE_FILES = COPYING +LIBSHOUT_INSTALL_STAGING = YES +LIBSHOUT_DEPENDENCIES = host-pkgconf libogg libvorbis + +ifeq ($(BR2_PACKAGE_LIBTHEORA),y) +LIBSHOUT_CONF_OPTS += --enable-theora +LIBSHOUT_DEPENDENCIES += libtheora +else +LIBSHOUT_CONF_OPTS += --disable-theora +endif + +ifeq ($(BR2_PACKAGE_SPEEX),y) +LIBSHOUT_CONF_OPTS += --enable-speex +LIBSHOUT_DEPENDENCIES += speex +else +LIBSHOUT_CONF_OPTS += --disable-speex +endif + +$(eval $(autotools-package)) diff --git a/package/libsidplay2/0001-sidplay2-libs-2.1.1.patch b/package/libsidplay2/0001-sidplay2-libs-2.1.1.patch new file mode 100644 index 0000000000..3f7664407a --- /dev/null +++ b/package/libsidplay2/0001-sidplay2-libs-2.1.1.patch @@ -0,0 +1,331 @@ +Various fixes to compile libsidplay2 with newer gcc compilers + +Downloaded from +http://tsubasa.googlecode.com/svn/trunk/tsubasa/sidplay2-libs/sidplay2-libs-2.1.1.diff + +Signed-off-by: Bernd Kuhls + +--- sidplay-libs-2.1.1.orig/Makefile.in ++++ sidplay-libs-2.1.1/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.8.4 from Makefile.am. ++# Makefile.in generated by automake 1.8.5 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -253,7 +253,7 @@ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ +- test -f $$subdir/TAGS && \ ++ test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ +@@ -264,7 +264,7 @@ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ +- test -z "$$unique" && unique=$$empty_fix; \ ++ test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +--- sidplay-libs-2.1.1.orig/aclocal.m4 ++++ sidplay-libs-2.1.1/aclocal.m4 +@@ -1,4 +1,4 @@ +-# generated automatically by aclocal 1.8.4 -*- Autoconf -*- ++# generated automatically by aclocal 1.8.5 -*- Autoconf -*- + + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + # Free Software Foundation, Inc. +@@ -40,7 +40,7 @@ + # Call AM_AUTOMAKE_VERSION so it can be traced. + # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +- [AM_AUTOMAKE_VERSION([1.8.4])]) ++ [AM_AUTOMAKE_VERSION([1.8.5])]) + + # AM_AUX_DIR_EXPAND + +--- sidplay-libs-2.1.1.orig/builders/Makefile.in ++++ sidplay-libs-2.1.1/builders/Makefile.in +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.8.4 from Makefile.am. ++# Makefile.in generated by automake 1.8.5 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -130,9 +130,9 @@ + exit 1;; \ + esac; \ + done; \ +- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu builders/Makefile'; \ ++ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign builders/Makefile'; \ + cd $(top_srcdir) && \ +- $(AUTOMAKE) --gnu builders/Makefile ++ $(AUTOMAKE) --foreign builders/Makefile + .PRECIOUS: Makefile + Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ +@@ -234,7 +234,7 @@ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ +- test -f $$subdir/TAGS && \ ++ test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ +@@ -245,7 +245,7 @@ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ +- test -z "$$unique" && unique=$$empty_fix; \ ++ test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +--- sidplay-libs-2.1.1.orig/builders/hardsid-builder/src/hardsid-builder.cpp ++++ sidplay-libs-2.1.1/builders/hardsid-builder/src/hardsid-builder.cpp +@@ -47,6 +47,7 @@ + ***************************************************************************/ + + #include ++#include + #include "config.h" + + #ifdef HAVE_EXCEPTIONS +--- sidplay-libs-2.1.1.orig/builders/resid-builder/src/resid-builder.cpp ++++ sidplay-libs-2.1.1/builders/resid-builder/src/resid-builder.cpp +@@ -37,6 +37,7 @@ + ***************************************************************************/ + + #include ++#include + + #include "config.h" + #ifdef HAVE_EXCEPTIONS +--- sidplay-libs-2.1.1.orig/builders/resid-builder/src/resid.cpp ++++ sidplay-libs-2.1.1/builders/resid-builder/src/resid.cpp +@@ -16,6 +16,7 @@ + * * + ***************************************************************************/ + ++#include + #include "config.h" + + #ifdef HAVE_EXCEPTIONS +--- sidplay-libs-2.1.1.orig/configure.ac ++++ sidplay-libs-2.1.1/configure.ac +@@ -2,7 +2,7 @@ + + #Variables + pwd=`pwd` +-builders='${libdir}'/sidplay/builders ++builders='${libdir}'/ + ac_configure_args="$ac_configure_args --disable-library-checks" + + AC_CONFIG_AUX_DIR(unix) +@@ -11,7 +11,7 @@ + + hardsid=false + case "$host" in +- *linux*) hardsid=true ++ *linux*|*-k*bsd*-gnu) hardsid=true + ;; + esac + AM_CONDITIONAL(HARDSID, test x$hardsid = xtrue) +--- sidplay-libs-2.1.1.orig/libsidplay/include/sidplay/SmartPtr.h ++++ sidplay-libs-2.1.1/libsidplay/include/sidplay/SmartPtr.h +@@ -17,16 +17,16 @@ + doFree = bufOwner; + if ( bufferLen >= 1 ) + { +- pBufCurrent = ( bufBegin = buffer ); +- bufEnd = bufBegin + bufferLen; +- bufLen = bufferLen; +- status = true; ++ this->pBufCurrent = ( this->bufBegin = buffer ); ++ this->bufEnd = this->bufBegin + bufferLen; ++ this->bufLen = bufferLen; ++ this->status = true; + } + else + { +- pBufCurrent = ( bufBegin = ( bufEnd = 0 )); +- bufLen = 0; +- status = false; ++ this->pBufCurrent = ( this->bufBegin = ( this->bufEnd = 0 )); ++ this->bufLen = 0; ++ this->status = false; + } + } + +@@ -211,16 +211,16 @@ + { + if ( bufferLen >= 1 ) + { +- pBufCurrent = ( bufBegin = buffer ); +- bufEnd = bufBegin + bufferLen; +- bufLen = bufferLen; +- status = true; ++ this->pBufCurrent = ( this->bufBegin = buffer ); ++ this->bufEnd = this->bufBegin + bufferLen; ++ this->bufLen = bufferLen; ++ this->status = true; + } + else + { +- pBufCurrent = bufBegin = bufEnd = 0; +- bufLen = 0; +- status = false; ++ this->pBufCurrent = this->bufBegin = this->bufEnd = 0; ++ this->bufLen = 0; ++ this->status = false; + } + } + }; +--- sidplay-libs-2.1.1.orig/libsidplay/include/sidplay/sidendian.h ++++ sidplay-libs-2.1.1/libsidplay/include/sidplay/sidendian.h +@@ -16,6 +16,10 @@ + ***************************************************************************/ + /*************************************************************************** + * $Log: sidendian.h,v $ ++ * Revision 1.6 2005/11/20 11:02:06 s_a_white ++ * Work around for bug in gcc 4 (optimiser breaks if variable never has a ++ * direct assignment). ++ * + * Revision 1.5 2001/07/03 22:44:13 s_a_white + * Added endian_16 to convert a 16 bit value to an array of 8s. + * +@@ -141,7 +145,7 @@ + // Convert high-byte and low-byte to 16-bit word. + inline uint_least16_t endian_16 (uint8_t hi, uint8_t lo) + { +- uint_least16_t word; ++ uint_least16_t word = 0; + endian_16lo8 (word, lo); + endian_16hi8 (word, hi); + return word; +@@ -165,7 +169,7 @@ + + inline void endian_16 (char ptr[2], uint_least16_t word) + { +- endian_16 ((uint8_t *) ptr, word); ++ endian_16 ((uint8_t *) ptr, word); + } + + // Convert high-byte and low-byte to 16-bit little endian word. +@@ -334,7 +338,7 @@ + // Swap word endian. + inline void endian_32swap8 (uint_least32_t &dword) + { +- uint_least16_t lo, hi; ++ uint_least16_t lo = 0, hi = 0; + lo = endian_32lo16 (dword); + hi = endian_32hi16 (dword); + endian_16swap8 (lo); +@@ -346,8 +350,8 @@ + // Convert high-byte and low-byte to 32-bit word. + inline uint_least32_t endian_32 (uint8_t hihi, uint8_t hilo, uint8_t hi, uint8_t lo) + { +- uint_least32_t dword; +- uint_least16_t word; ++ uint_least32_t dword = 0; ++ uint_least16_t word = 0; + endian_32lo8 (dword, lo); + endian_32hi8 (dword, hi); + endian_16lo8 (word, hilo); +@@ -374,7 +378,7 @@ + defined(SID_WORDS_LITTLEENDIAN) + *((uint_least32_t *) ptr) = dword; + #else +- uint_least16_t word; ++ uint_least16_t word = 0; + ptr[0] = endian_32lo8 (dword); + ptr[1] = endian_32hi8 (dword); + word = endian_32hi16 (dword); +@@ -401,7 +405,7 @@ + defined(SID_WORDS_BIGENDIAN) + *((uint_least32_t *) ptr) = dword; + #else +- uint_least16_t word; ++ uint_least16_t word = 0; + word = endian_32hi16 (dword); + ptr[1] = endian_16lo8 (word); + ptr[0] = endian_16hi8 (word); +--- sidplay-libs-2.1.1.orig/libsidplay/unix/config.h.in ++++ sidplay-libs-2.1.1/libsidplay/unix/config.h.in +@@ -72,22 +72,22 @@ + /* Define to the version of this package. */ + #undef PACKAGE_VERSION + +-/* The size of a `char', as computed by sizeof. */ ++/* The size of `char', as computed by sizeof. */ + #undef SIZEOF_CHAR + +-/* The size of a `int', as computed by sizeof. */ ++/* The size of `int', as computed by sizeof. */ + #undef SIZEOF_INT + + /* The number of bytes in type long */ + #undef SIZEOF_LONG + +-/* The size of a `long int', as computed by sizeof. */ ++/* The size of `long int', as computed by sizeof. */ + #undef SIZEOF_LONG_INT + + /* The number of bytes in type short */ + #undef SIZEOF_SHORT + +-/* The size of a `short int', as computed by sizeof. */ ++/* The size of `short int', as computed by sizeof. */ + #undef SIZEOF_SHORT_INT + + /* The number of bytes in type void* */ +--- sidplay-libs-2.1.1.orig/libsidplay/unix/my_macros.m4 ++++ sidplay-libs-2.1.1/libsidplay/unix/my_macros.m4 +@@ -105,8 +105,9 @@ + AC_CACHE_VAL(test_cv_have_ios_openmode, + [ + AC_TRY_COMPILE( +- [#include +- #include ], ++ [#include ++ #include ++ using namespace std;], + [ios::openmode myTest = ios::in;], + [test_cv_have_ios_openmode=yes], + [test_cv_have_ios_openmode=no] +--- sidplay-libs-2.1.1.orig/libsidplay/unix/sidint.h ++++ sidplay-libs-2.1.1/libsidplay/unix/sidint.h +@@ -0,0 +1,17 @@ ++#ifndef _UNIX_SIDINT_H ++#define _UNIX_SIDINT_H 1 ++#ifndef _GENERATED_STDINT_H ++#define _GENERATED_STDINT_H "libsidplay 2.1.1" ++/* generated using a gnu compiler version gcc (Debian 4.3-20080219-1) 4.3.0 20080219 (prerelease) [gcc-4_3-branch revision 132456] Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ ++ ++#include ++ ++ ++/* system headers have good uint64_t */ ++#ifndef _HAVE_UINT64_T ++#define _HAVE_UINT64_T ++#endif ++ ++ /* once */ ++#endif ++#endif +--- sidplay-libs-2.1.1.orig/libsidutils/include/sidplay/utils/SidUsage.h ++++ sidplay-libs-2.1.1/libsidutils/include/sidplay/utils/SidUsage.h +@@ -33,7 +33,7 @@ + uint_least16_t length; // usage scan length + + // Copy common parts of basic usage to extended usage. +- sid2_usage_t &sid2_usage_t::operator= (const sid_usage_t &usage) ++ sid2_usage_t &operator= (const sid_usage_t &usage) + { + *((sid_usage_t *) this) = usage; + return *this; diff --git a/package/libsidplay2/0002-pkg-config.patch b/package/libsidplay2/0002-pkg-config.patch new file mode 100644 index 0000000000..ce37e94209 --- /dev/null +++ b/package/libsidplay2/0002-pkg-config.patch @@ -0,0 +1,25 @@ +Include correct libdir in pkgconfig files + +Downloaded from +https://sources.debian.net/src/sidplay-libs/2.1.1-14/debian/patches/pkg-config.patch/ + +Signed-off-by: Bernd Kuhls + +--- sidplay-libs-2.1.1.orig/libsidplay/unix/libsidplay2.pc.in ++++ sidplay-libs-2.1.1/libsidplay/unix/libsidplay2.pc.in +@@ -7,5 +7,5 @@ builders=@builders@ + Name: @PACKAGE@ + Description: C64 cycle exact stereo sidplayer library. + Version: @VERSION@ +-Libs: ${libdir}/libsidplay2.la ++Libs: -L${libdir} -lsidplay2 + Cflags: -DHAVE_UNIX -I${includedir} +--- sidplay-libs-2.1.1.orig/libsidutils/unix/libsidutils.pc.in ++++ sidplay-libs-2.1.1/libsidutils/unix/libsidutils.pc.in +@@ -6,5 +6,5 @@ includedir=@includedir@ + Name: @PACKAGE@ + Description: Utils for supporting the libsidplay2 library. + Version: @VERSION@ +-Libs: ${libdir}/libsidutils.la ++Libs: -L${libdir} -lsidutils + Cflags: -DHAVE_UNIX -I${includedir} diff --git a/package/libsidplay2/Config.in b/package/libsidplay2/Config.in new file mode 100644 index 0000000000..5698367058 --- /dev/null +++ b/package/libsidplay2/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBSIDPLAY2 + bool "libsidplay2" + depends on BR2_INSTALL_LIBSTDCPP + help + Sidplay 2 is the second in the Sidplay series originally developed by + Michael Schwendt. This version is written by Simon White and is cycle + accurate for improved sound reproduction. Sidplay 2 is capable of + playing all C64 mono and stereo file formats. + + http://sourceforge.net/projects/sidplay2 + +comment "libsidplay2 needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libsidplay2/libsidplay2.hash b/package/libsidplay2/libsidplay2.hash new file mode 100644 index 0000000000..1b45cb8781 --- /dev/null +++ b/package/libsidplay2/libsidplay2.hash @@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/sidplay2/files/sidplay2/sidplay-libs-2.1.1/ +sha1 8af6350866edc30b0d331e075fa97292f6f645a5 sidplay-libs-2.1.1.tar.gz diff --git a/package/libsidplay2/libsidplay2.mk b/package/libsidplay2/libsidplay2.mk new file mode 100644 index 0000000000..b294964397 --- /dev/null +++ b/package/libsidplay2/libsidplay2.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libsidplay2 +# +################################################################################ + +LIBSIDPLAY2_VERSION = 2.1.1 +LIBSIDPLAY2_SOURCE = sidplay-libs-$(LIBSIDPLAY2_VERSION).tar.gz +LIBSIDPLAY2_SITE = http://downloads.sourceforge.net/project/sidplay2/sidplay2/sidplay-libs-$(LIBSIDPLAY2_VERSION) +LIBSIDPLAY2_LICENSE = GPLv2+ +LIBSIDPLAY2_LICENSE_FILES = libsidplay/COPYING +LIBSIDPLAY2_AUTORECONF = YES +LIBSIDPLAY2_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libsigc/Config.in b/package/libsigc/Config.in new file mode 100644 index 0000000000..41ea19e227 --- /dev/null +++ b/package/libsigc/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBSIGC + bool "libsigc++" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # C++11 + depends on BR2_INSTALL_LIBSTDCPP + help + libsigc++ implements a typesafe callback system for standard C++. + It allows you to define signals and to connect those signals to + any callback function, either global or a member function, + regardless of whether it is static or virtual. + + http://libsigc.sourceforge.net/ + +comment "libsigc++ needs a toolchain w/ C++, gcc >= 4.7" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 diff --git a/package/libsigc/libsigc.hash b/package/libsigc/libsigc.hash new file mode 100644 index 0000000000..c452414067 --- /dev/null +++ b/package/libsigc/libsigc.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/libsigc++/2.8/libsigc++-2.8.0.sha256sum +sha256 774980d027c52947cb9ee4fac6ffe2ca60cc2f753068a89dfd281c83dbff9651 libsigc++-2.8.0.tar.xz diff --git a/package/libsigc/libsigc.mk b/package/libsigc/libsigc.mk new file mode 100644 index 0000000000..f3ca97022f --- /dev/null +++ b/package/libsigc/libsigc.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libsigc +# +################################################################################ + +LIBSIGC_VERSION_MAJOR = 2.8 +LIBSIGC_VERSION = $(LIBSIGC_VERSION_MAJOR).0 +LIBSIGC_SOURCE = libsigc++-$(LIBSIGC_VERSION).tar.xz +LIBSIGC_SITE = http://ftp.gnome.org/pub/GNOME/sources/libsigc++/$(LIBSIGC_VERSION_MAJOR) +LIBSIGC_DEPENDENCIES = host-m4 +LIBSIGC_INSTALL_STAGING = YES +LIBSIGC_LICENSE = LGPLv2.1+ +LIBSIGC_LICENSE_FILES = COPYING + +define LIBSIGC_INSTALL_TARGET_FIXUP + rm -rf $(TARGET_DIR)/usr/share/devhelp/books/libsigc++* +endef + +LIBSIGC_POST_INSTALL_TARGET_HOOKS += LIBSIGC_INSTALL_TARGET_FIXUP + +$(eval $(autotools-package)) diff --git a/package/libsigrok/0001-beaglelogic.h-fix-build-with-musl-libc.patch b/package/libsigrok/0001-beaglelogic.h-fix-build-with-musl-libc.patch new file mode 100644 index 0000000000..2b20680511 --- /dev/null +++ b/package/libsigrok/0001-beaglelogic.h-fix-build-with-musl-libc.patch @@ -0,0 +1,36 @@ +From 83bf4762e42a4d4a5c077f48d8f5715c9147d9b8 Mon Sep 17 00:00:00 2001 +From: Aurelien Jacobs +Date: Mon, 1 Feb 2016 22:37:36 +0100 +Subject: [PATCH] beaglelogic: use standard # operator instead of ugly __STRING + macro + +Also note that the __ namespace is reserved by POSIX for its private +usage, so user land software should never rely on any kind of API +with a __ prefix. + +Signed-off-by: Aurelien Jacobs +Signed-off-by: Bernd Kuhls +--- +Patch downloaded from upstream git: +http://sigrok.org/gitweb/?p=libsigrok.git;a=commit;h=83bf4762e42a4d4a5c077f48d8f5715c9147d9b8 + + src/hardware/beaglelogic/beaglelogic.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/hardware/beaglelogic/beaglelogic.h b/src/hardware/beaglelogic/beaglelogic.h +index 9015c61..96713ba 100644 +--- a/src/hardware/beaglelogic/beaglelogic.h ++++ b/src/hardware/beaglelogic/beaglelogic.h +@@ -30,8 +30,7 @@ + + /* BeagleLogic device node name */ + #define BEAGLELOGIC_DEV_NODE "/dev/beaglelogic" +-#define BEAGLELOGIC_SYSFS_ATTR(a) "/sys/devices/virtual/misc/beaglelogic/"\ +- __STRING(a) ++#define BEAGLELOGIC_SYSFS_ATTR(a) "/sys/devices/virtual/misc/beaglelogic/" #a + + /* Reproduced verbatim from beaglelogic.h in the kernel tree until the kernel + * module hits the mainline. Contains the ABI, so DO NOT TOUCH this section */ +-- +2.6.2 + diff --git a/package/libsigrok/Config.in b/package/libsigrok/Config.in new file mode 100644 index 0000000000..ff2d249827 --- /dev/null +++ b/package/libsigrok/Config.in @@ -0,0 +1,39 @@ +config BR2_PACKAGE_LIBSIGROK + bool "libsigrok" + select BR2_PACKAGE_LIBZIP + select BR2_PACKAGE_LIBGLIB2 + # libglib2 + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + # std=c11 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + help + Libsigrok is a shared library written in C, which provides + the basic hardware access drivers for logic analyzers and + other supported devices, as well as input/output file format + support. + + This library is a part of the sigrok software suite. + + http://sigrok.org/wiki/Libsigrok + +if BR2_PACKAGE_LIBSIGROK + +config BR2_PACKAGE_LIBSIGROKCXX + bool "build C++ bindings" + select BR2_PACKAGE_GLIBMM + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # glibmm + help + Build libsigrok C++ bindings as well. + +comment "C++ bindings need a toolchain w/ C++, gcc >= 4.8" + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + +endif + +comment "libsigrok needs a toolchain w/ wchar, threads, gcc >= 4.7" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 diff --git a/package/libsigrok/libsigrok.hash b/package/libsigrok/libsigrok.hash new file mode 100644 index 0000000000..999cef54ed --- /dev/null +++ b/package/libsigrok/libsigrok.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 5f291f3fee36e6dab1336f1c78596e50588831bc5ebd7cddc2a95fe8c71d669e libsigrok-0.4.0.tar.gz diff --git a/package/libsigrok/libsigrok.mk b/package/libsigrok/libsigrok.mk new file mode 100644 index 0000000000..e4e079d3c8 --- /dev/null +++ b/package/libsigrok/libsigrok.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# libsigrok +# +################################################################################ + +LIBSIGROK_VERSION = 0.4.0 +LIBSIGROK_SITE = http://sigrok.org/download/source/libsigrok +LIBSIGROK_LICENSE = GPLv3+ +LIBSIGROK_LICENSE_FILES = COPYING +LIBSIGROK_INSTALL_STAGING = YES +LIBSIGROK_DEPENDENCIES = libglib2 libzip host-pkgconf +LIBSIGROK_CONF_OPTS = --disable-glibtest --disable-java --disable-python + +ifeq ($(BR2_PACKAGE_LIBSERIALPORT),y) +LIBSIGROK_CONF_OPTS += --enable-libserialport +LIBSIGROK_DEPENDENCIES += libserialport +else +LIBSIGROK_CONF_OPTS += --disable-libserialport +endif + +ifeq ($(BR2_PACKAGE_LIBFTDI),y) +LIBSIGROK_CONF_OPTS += --enable-libftdi +LIBSIGROK_DEPENDENCIES += libftdi +else +LIBSIGROK_CONF_OPTS += --disable-libftdi +endif + +ifeq ($(BR2_PACKAGE_LIBUSB),y) +LIBSIGROK_CONF_OPTS += --enable-libusb +LIBSIGROK_DEPENDENCIES += libusb +else +LIBSIGROK_CONF_OPTS += --disable-libusb +endif + +ifeq ($(BR2_PACKAGE_GLIBMM),y) +LIBSIGROK_DEPENDENCIES += glibmm +endif + +ifeq ($(BR2_PACKAGE_LIBSIGROKCXX),y) +LIBSIGROK_CONF_OPTS += --enable-cxx +LIBSIGROK_AUTORECONF_OPTS += -I $(HOST_DIR)/usr/share/autoconf-archive +LIBSIGROK_DEPENDENCIES += \ + host-autoconf-archive \ + glibmm \ + host-doxygen \ + $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python) +else +LIBSIGROK_CONF_OPTS += --disable-cxx +endif + +$(eval $(autotools-package)) diff --git a/package/libsigrokdecode/Config.in b/package/libsigrokdecode/Config.in new file mode 100644 index 0000000000..70f86ceb76 --- /dev/null +++ b/package/libsigrokdecode/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_LIBSIGROKDECODE + bool "libsigrokdecode" + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_PYTHON3 + depends on !BR2_PACKAGE_PYTHON # python3 + depends on BR2_USE_WCHAR # libglib2/python3 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2/python3 + depends on BR2_USE_MMU # libglib2/python3 + depends on !BR2_STATIC_LIBS # python3 + help + Libsigrokdecode is a shared library written in C, which + provides (streaming) protocol decoding functionality. Say + yes here if you want to add this functionality to your + buildroot-generated sigrok suite. + + This library is a part of the sigrok software suite. + + http://sigrok.org/wiki/Libsigrokdecode + +comment "libsigrokdecode needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_PACKAGE_PYTHON + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +comment "libsigrokdecode is not compatible with python" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_PYTHON diff --git a/package/libsigrokdecode/libsigrokdecode.hash b/package/libsigrokdecode/libsigrokdecode.hash new file mode 100644 index 0000000000..3ac8a7628d --- /dev/null +++ b/package/libsigrokdecode/libsigrokdecode.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 fd7e9d1b73245e844ead97a16d5321c766196f946c9b28a8646cab2e98ec3537 libsigrokdecode-0.4.0.tar.gz diff --git a/package/libsigrokdecode/libsigrokdecode.mk b/package/libsigrokdecode/libsigrokdecode.mk new file mode 100644 index 0000000000..b8b3c59a88 --- /dev/null +++ b/package/libsigrokdecode/libsigrokdecode.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libsigrokdecode +# +################################################################################ + +LIBSIGROKDECODE_VERSION = 0.4.0 +LIBSIGROKDECODE_SITE = http://sigrok.org/download/source/libsigrokdecode +LIBSIGROKDECODE_LICENSE = GPLv3+ +LIBSIGROKDECODE_LICENSE_FILES = COPYING +LIBSIGROKDECODE_INSTALL_STAGING = YES +LIBSIGROKDECODE_DEPENDENCIES = host-pkgconf libglib2 python3 + +$(eval $(autotools-package)) diff --git a/package/libsigsegv/0001-Add-stack-direction-for-the-AArch64-architecture.patch b/package/libsigsegv/0001-Add-stack-direction-for-the-AArch64-architecture.patch new file mode 100644 index 0000000000..a3b03a0024 --- /dev/null +++ b/package/libsigsegv/0001-Add-stack-direction-for-the-AArch64-architecture.patch @@ -0,0 +1,28 @@ +From 790e8f620f06834f3fd03c310cbecd1416536987 Mon Sep 17 00:00:00 2001 +From: Will Newton +Date: Tue, 28 May 2013 18:31:46 +0100 +Subject: [PATCH 2/5] Add stack direction for the AArch64 architecture + +On this architecture, the stack grows downward. + +Signed-off-by: Will Newton +Signed-off-by: Thomas Petazzoni +--- + m4/stack-direction.m4 | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4 +index 39c1a28..3f70530 100644 +--- a/m4/stack-direction.m4 ++++ b/m4/stack-direction.m4 +@@ -13,6 +13,7 @@ AC_DEFUN([SV_STACK_DIRECTION], + case "$host_cpu" in + dnl See the #define STACK_GROWS_DOWNWARD in gcc-3.1/gcc/config/*/*.h. + a29k | \ ++ aarch64* | \ + alpha* | \ + arc | \ + arm* | strongarm* | xscale* | \ +-- +2.1.0 + diff --git a/package/libsigsegv/0002-Add-stack-direction-for-the-Microblaze-architecture.patch b/package/libsigsegv/0002-Add-stack-direction-for-the-Microblaze-architecture.patch new file mode 100644 index 0000000000..d3795d3fe7 --- /dev/null +++ b/package/libsigsegv/0002-Add-stack-direction-for-the-Microblaze-architecture.patch @@ -0,0 +1,26 @@ +From f4395ff932758884416753f88f5d98f33ec67479 Mon Sep 17 00:00:00 2001 +From: Spenser Gilliland +Date: Mon, 29 Dec 2014 13:54:54 +0100 +Subject: [PATCH 3/5] Add stack direction for the Microblaze architecture + +Signed-off-by: Spenser Gilliland +Signed-off-by: Thomas Petazzoni +--- + m4/stack-direction.m4 | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4 +index 3f70530..53f4216 100644 +--- a/m4/stack-direction.m4 ++++ b/m4/stack-direction.m4 +@@ -32,6 +32,7 @@ AC_DEFUN([SV_STACK_DIRECTION], + m68* | \ + m88k | \ + mcore | \ ++ microblaze | \ + mips* | \ + mmix | \ + mn10200 | \ +-- +2.1.0 + diff --git a/package/libsigsegv/0003-Add-stack-direction-for-the-Blackfin-architecture.patch b/package/libsigsegv/0003-Add-stack-direction-for-the-Blackfin-architecture.patch new file mode 100644 index 0000000000..5d8232a1b6 --- /dev/null +++ b/package/libsigsegv/0003-Add-stack-direction-for-the-Blackfin-architecture.patch @@ -0,0 +1,29 @@ +From 55a707283dbb3b2fdcaaa4e177d050e122cfc2a0 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 29 Dec 2014 13:55:16 +0100 +Subject: [PATCH 4/5] Add stack direction for the Blackfin architecture + +The stack grows downward on Blackfin, see +https://sourceware.org/binutils/docs/as/Blackfin-Syntax.html: "The +stack grows by decrementing the stack pointer.". + +Signed-off-by: Thomas Petazzoni +--- + m4/stack-direction.m4 | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4 +index 53f4216..1a97d5a 100644 +--- a/m4/stack-direction.m4 ++++ b/m4/stack-direction.m4 +@@ -18,6 +18,7 @@ AC_DEFUN([SV_STACK_DIRECTION], + arc | \ + arm* | strongarm* | xscale* | \ + avr | \ ++ bfin | \ + c1 | c2 | c32 | c34 | c38 | \ + clipper | \ + cris | \ +-- +2.1.0 + diff --git a/package/libsigsegv/0004-Add-stack-direction-for-the-Nios-II-architecture.patch b/package/libsigsegv/0004-Add-stack-direction-for-the-Nios-II-architecture.patch new file mode 100644 index 0000000000..ee4778ea0c --- /dev/null +++ b/package/libsigsegv/0004-Add-stack-direction-for-the-Nios-II-architecture.patch @@ -0,0 +1,31 @@ +From 24bac122bf4ffe437bb4f6ca633ad08f31a23d73 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 29 Dec 2014 13:56:54 +0100 +Subject: [PATCH 5/5] Add stack direction for the Nios II architecture + +According to Altera Application Binary Interface document for the Nios +II architecture +(http://www.altera.com/literature/hb/nios2/n2cpu_nii51016.pdf): + + "The stack grows downward (i.e. towards lower addresses). ". + +Signed-off-by: Thomas Petazzoni +--- + m4/stack-direction.m4 | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4 +index 1a97d5a..d9c5157 100644 +--- a/m4/stack-direction.m4 ++++ b/m4/stack-direction.m4 +@@ -38,6 +38,7 @@ AC_DEFUN([SV_STACK_DIRECTION], + mmix | \ + mn10200 | \ + mn10300 | \ ++ nios2 | \ + ns32k | \ + pdp11 | \ + pj* | \ +-- +2.1.0 + diff --git a/package/libsigsegv/0005-fix-sparc64-stackpointer.patch b/package/libsigsegv/0005-fix-sparc64-stackpointer.patch new file mode 100644 index 0000000000..62de35f6e0 --- /dev/null +++ b/package/libsigsegv/0005-fix-sparc64-stackpointer.patch @@ -0,0 +1,16 @@ +Fix sparc64 build. + +Signed-off-by: Waldemar Brodkorb + +diff -Nur libsigsegv-2.10.orig/src/fault-linux-sparc.h libsigsegv-2.10/src/fault-linux-sparc.h +--- libsigsegv-2.10.orig/src/fault-linux-sparc.h 2009-08-01 17:06:49.000000000 +0200 ++++ libsigsegv-2.10/src/fault-linux-sparc.h 2015-11-29 11:55:29.000000000 +0100 +@@ -27,4 +27,8 @@ + (see also ) + are quite different types. */ + ++#if __WORDSIZE == 64 ++#define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.mc_gregs[REG_O6] ++#else + #define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gregs[REG_O6] ++#endif diff --git a/package/libsigsegv/Config.in b/package/libsigsegv/Config.in new file mode 100644 index 0000000000..e96ba5f017 --- /dev/null +++ b/package/libsigsegv/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBSIGSEGV + bool "libsigsegv" + depends on !BR2_xtensa + depends on !BR2_arc # no ucontext_i.sym file + depends on !BR2_microblaze + # No ucontext support in uclibc for powerpc, sparc and superh + depends on !((BR2_powerpc || BR2_sh || BR2_sparc ) && BR2_TOOLCHAIN_USES_UCLIBC) + help + Library for handling page faults in user mode. + + http://libsigsegv.sourceforge.net/ + +comment "libsigsegv needs an (e)glibc toolchain" + depends on (BR2_powerpc || BR2_sh || BR2_sparc) && BR2_TOOLCHAIN_USES_UCLIBC diff --git a/package/libsigsegv/libsigsegv.hash b/package/libsigsegv/libsigsegv.hash new file mode 100644 index 0000000000..0151105f84 --- /dev/null +++ b/package/libsigsegv/libsigsegv.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 8460a4a3dd4954c3d96d7a4f5dd5bc4d9b76f5754196aa245287553b26d2199a libsigsegv-2.10.tar.gz diff --git a/package/libsigsegv/libsigsegv.mk b/package/libsigsegv/libsigsegv.mk new file mode 100644 index 0000000000..a5bb31c9cf --- /dev/null +++ b/package/libsigsegv/libsigsegv.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libsigsegv +# +################################################################################ + +LIBSIGSEGV_VERSION = 2.10 +LIBSIGSEGV_SITE = $(BR2_GNU_MIRROR)/libsigsegv +LIBSIGSEGV_INSTALL_STAGING = YES +LIBSIGSEGV_CONF_ENV = sv_cv_fault_posix=yes +LIBSIGSEGV_LICENSE = GPLv2+ +LIBSIGSEGV_LICENSE_FILES = COPYING + +LIBSIGSEGV_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/libsilk/Config.in b/package/libsilk/Config.in new file mode 100644 index 0000000000..10fe03ad32 --- /dev/null +++ b/package/libsilk/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBSILK + bool "libsilk" + help + SILK is an audio compression format and audio codec. + + http://tools.ietf.org/html/draft-vos-silk-01 diff --git a/package/libsilk/libsilk.mk b/package/libsilk/libsilk.mk new file mode 100644 index 0000000000..eefdf8fd07 --- /dev/null +++ b/package/libsilk/libsilk.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libsilk +# +################################################################################ + +LIBSILK_VERSION = 4268a02240c35c6055b0f237c46b09b2dcf79e45 +# we use the FreeSwitch fork because it contains pkgconf support +LIBSILK_SITE = https://freeswitch.org/stash/scm/sd/libsilk.git +LIBSILK_SITE_METHOD = git +LIBSILK_LICENSE = BSD-3c +LIBSILK_LICENSE_FILES = COPYING +LIBSILK_AUTORECONF = YES +LIBSILK_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libsndfile/0001-srconly.patch b/package/libsndfile/0001-srconly.patch new file mode 100644 index 0000000000..417e34072a --- /dev/null +++ b/package/libsndfile/0001-srconly.patch @@ -0,0 +1,17 @@ +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: libsndfile-1.0.18/Makefile.in +=================================================================== +--- libsndfile-1.0.18.orig/Makefile.in ++++ libsndfile-1.0.18/Makefile.in +@@ -260,7 +260,7 @@ + top_srcdir = @top_srcdir@ + DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror + @BUILD_OCTAVE_MOD_TRUE@octave_dir = Octave +-SUBDIRS = M4 man doc Win32 src $(octave_dir) examples regtest tests programs ++SUBDIRS = src + DIST_SUBDIRS = M4 man doc Win32 src Octave examples regtest tests programs + EXTRA_DIST = libsndfile.spec.in sndfile.pc.in Mingw-make-dist.sh + pkgconfigdir = $(libdir)/pkgconfig diff --git a/package/libsndfile/Config.in b/package/libsndfile/Config.in new file mode 100644 index 0000000000..9afe4966c0 --- /dev/null +++ b/package/libsndfile/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBSNDFILE + bool "libsndfile" + help + Libsndfile is a C library for reading and writing files containing + sampled sound (such as MS Windows WAV and the Apple/SGI AIFF format) + through one standard library interface. + + http://www.mega-nerd.com/libsndfile/ diff --git a/package/libsndfile/libsndfile.hash b/package/libsndfile/libsndfile.hash new file mode 100644 index 0000000000..04d091b58b --- /dev/null +++ b/package/libsndfile/libsndfile.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 cd6520ec763d1a45573885ecb1f8e4e42505ac12180268482a44b28484a25092 libsndfile-1.0.26.tar.gz diff --git a/package/libsndfile/libsndfile.mk b/package/libsndfile/libsndfile.mk new file mode 100644 index 0000000000..107a356604 --- /dev/null +++ b/package/libsndfile/libsndfile.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libsndfile +# +################################################################################ + +LIBSNDFILE_VERSION = 1.0.26 +LIBSNDFILE_SITE = http://www.mega-nerd.com/libsndfile/files +LIBSNDFILE_INSTALL_STAGING = YES +LIBSNDFILE_LICENSE = LGPLv2.1+ +LIBSNDFILE_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libsoc/Config.in b/package/libsoc/Config.in new file mode 100644 index 0000000000..2aaeb1fe9a --- /dev/null +++ b/package/libsoc/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBSOC + bool "libsoc" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + libsoc is a C library for interfacing with common SoC + peripherals through generic kernel interfaces + + https://github.com/jackmitch/libsoc + +comment "libsoc needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libsoc/libsoc.hash b/package/libsoc/libsoc.hash new file mode 100644 index 0000000000..e6a85771f3 --- /dev/null +++ b/package/libsoc/libsoc.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 fc7f4c4ec5cc694833f27d91603aaaa6a43e8100ab26bac47f553753c8d45ac0 libsoc-0.7.1.tar.gz diff --git a/package/libsoc/libsoc.mk b/package/libsoc/libsoc.mk new file mode 100644 index 0000000000..84e281fb69 --- /dev/null +++ b/package/libsoc/libsoc.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libsoc +# +################################################################################ + +LIBSOC_VERSION = 0.7.1 +LIBSOC_SITE = $(call github,jackmitch,libsoc,$(LIBSOC_VERSION)) +LIBSOC_LICENSE = LGPLv2.1 +LIBSOC_LICENSE_FILES = COPYING +LIBSOC_AUTORECONF = YES +LIBSOC_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libsocketcan/Config.in b/package/libsocketcan/Config.in new file mode 100644 index 0000000000..97903db78b --- /dev/null +++ b/package/libsocketcan/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBSOCKETCAN + bool "libsocketcan" + help + SocketCAN library to control CAN devices from C code. + + http://git.pengutronix.de/?p=tools/libsocketcan.git;a=summary diff --git a/package/libsocketcan/libsocketcan.hash b/package/libsocketcan/libsocketcan.hash new file mode 100644 index 0000000000..2546c66cf2 --- /dev/null +++ b/package/libsocketcan/libsocketcan.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3c83e386c3fa7673141658472ae0b0e2a9f5849bf52fd9f7b22b04fd98ec7b6e libsocketcan-0.0.10.tar.bz2 diff --git a/package/libsocketcan/libsocketcan.mk b/package/libsocketcan/libsocketcan.mk new file mode 100644 index 0000000000..65f3cb55ed --- /dev/null +++ b/package/libsocketcan/libsocketcan.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libsocketcan +# +################################################################################ + +LIBSOCKETCAN_VERSION = 0.0.10 +LIBSOCKETCAN_SITE = http://www.pengutronix.de/software/libsocketcan/download +LIBSOCKETCAN_SOURCE = libsocketcan-$(LIBSOCKETCAN_VERSION).tar.bz2 +LIBSOCKETCAN_INSTALL_STAGING = YES +LIBSOCKETCAN_LICENSE = LGPLv2.1+ + +$(eval $(autotools-package)) diff --git a/package/libsodium/Config.in b/package/libsodium/Config.in new file mode 100644 index 0000000000..47b9bb350c --- /dev/null +++ b/package/libsodium/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBSODIUM + bool "libsodium" + help + A modern and easy-to-use crypto library. + + http://libsodium.org/ diff --git a/package/libsodium/libsodium.hash b/package/libsodium/libsodium.hash new file mode 100644 index 0000000000..8b7955519c --- /dev/null +++ b/package/libsodium/libsodium.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 c0f191d2527852641e0a996b7b106d2e04cbc76ea50731b2d0babd3409301926 libsodium-1.0.8.tar.gz diff --git a/package/libsodium/libsodium.mk b/package/libsodium/libsodium.mk new file mode 100644 index 0000000000..bd6f58d343 --- /dev/null +++ b/package/libsodium/libsodium.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# libsodium +# +################################################################################ + +LIBSODIUM_VERSION = 1.0.8 +LIBSODIUM_SITE = https://download.libsodium.org/libsodium/releases +LIBSODIUM_LICENSE = ISC +LIBSODIUM_LICENSE_FILES = LICENSE +LIBSODIUM_INSTALL_STAGING = YES + +ifeq ($(BR2_arc),y) +LIBSODIUM_CONF_OPTS += --disable-pie +endif + +$(eval $(autotools-package)) diff --git a/package/libsoil/0001-fix-makefile.patch b/package/libsoil/0001-fix-makefile.patch new file mode 100644 index 0000000000..310d26448b --- /dev/null +++ b/package/libsoil/0001-fix-makefile.patch @@ -0,0 +1,40 @@ +Various makefile fixes to allow cross compilation + +Partly ported from +http://anonscm.debian.org/cgit/pkg-games/libsoil.git/tree/debian/patches/linking_correctly.patch + +Signed-off-by: Bernd Kuhls + +diff -uNr soil.org/projects/makefile/alternate_Makefile.txt soil/projects/makefile/alternate_Makefile.txt +--- soil.org/projects/makefile/alternate_Makefile.txt 2008-07-07 18:13:28.000000000 +0200 ++++ soil/projects/makefile/alternate_Makefile.txt 2015-11-07 11:15:04.140106336 +0100 +@@ -1,8 +1,8 @@ + MAKE = make +-CC = gcc +-INSTALL_FILE = install -p -o root -g root -m 644 +-INSTALL_DIR = install -p -o root -g root -d +-LN = ln -s ++CC = $(GCC) ++INSTALL_FILE = $(INSTALL) -m 644 ++INSTALL_DIR = $(INSTALL) -d ++LN = ln -sf + RM = rm -fv + CFLAGS += -c -O2 -Wall + LDFLAGS += +@@ -23,13 +23,13 @@ + all: $(OFILES) lib + + %.o: %.c +- $(CC) $(CFLAGS) $< -o $@ ++ $(CC) $(CFLAGS) -c -fPIC $< -o $@ + + lib: $(OFILES) + # create static library +- ar -cvq $(LIBNAME).a $(OFILES) ++ $(AR) -cvq $(LIBNAME).a $(OFILES) + # create shared library +- gcc -shared -Wl,-soname,$(LIBNAME).so.$(MAJOR) -o $(LIBNAME).so.$(VERSION) $(OFILES) ++ $(CC) -shared -Wl,-soname,$(LIBNAME).so.$(MAJOR) -o $(LIBNAME).so.$(VERSION) $(OFILES) -lGL -lm + + install: + $(INSTALL_DIR) $(DESTDIR)/$(INCLUDEDIR) diff --git a/package/libsoil/Config.in b/package/libsoil/Config.in new file mode 100644 index 0000000000..aea0cc3548 --- /dev/null +++ b/package/libsoil/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBSOIL + bool "libsoil" + depends on BR2_PACKAGE_HAS_LIBGL + depends on !BR2_STATIC_LIBS + help + SOIL is a tiny C library used primarily for uploading + textures into OpenGL. + + http://www.lonesock.net/soil.html + +comment "libsoil needs an OpenGL backend and a toolchain w/ dynamic library" + depends on !BR2_PACKAGE_HAS_LIBGL || BR2_STATIC_LIBS diff --git a/package/libsoil/libsoil.hash b/package/libsoil/libsoil.hash new file mode 100644 index 0000000000..175569b9f6 --- /dev/null +++ b/package/libsoil/libsoil.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 a2305b8d64f6d636e36d669bbdb0ca5445d1345c754b3d61d3f037dad2e5f701 soil.zip diff --git a/package/libsoil/libsoil.mk b/package/libsoil/libsoil.mk new file mode 100644 index 0000000000..efa67d9eee --- /dev/null +++ b/package/libsoil/libsoil.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# libsoil +# +################################################################################ + +LIBSOIL_VERSION = 20080707 +LIBSOIL_SOURCE = soil.zip +LIBSOIL_SITE = http://www.lonesock.net/files +LIBSOIL_INSTALL_STAGING = YES +LIBSOIL_DEPENDENCIES = libgl +LIBSOIL_LICENSE = Public Domain, MIT +LIBSOIL_LICENSE_FILES = src/stb_image_aug.c src/image_helper.c +LIBSOIL_MAKEFILE = ../projects/makefile/alternate_Makefile.txt + +define LIBSOIL_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(DL_DIR)/$(LIBSOIL_SOURCE) + mv $(@D)/Simple\ OpenGL\ Image\ Library/* $(@D) +endef + +# gnu patch < v2.5.9 doesn't correctly handle spaces in file names, +# and we want to patch the 'alternate Makefile.txt' file, so rename +# the file (and patch the renamed file) for compatibility with older +# distributions +define REMOVE_SPACE_FROM_FILENAME + cd $(@D)/projects/makefile/ && \ + mv "alternate Makefile.txt" alternate_Makefile.txt +endef +LIBSOIL_POST_EXTRACT_HOOKS += REMOVE_SPACE_FROM_FILENAME + +define LIBSOIL_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -f $(LIBSOIL_MAKEFILE) \ + -C $(@D)/src +endef + +define LIBSOIL_INSTALL_STAGING_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -f $(LIBSOIL_MAKEFILE) \ + DESTDIR=$(STAGING_DIR) install \ + INSTALL=$(INSTALL) \ + -C $(@D)/src +endef + +define LIBSOIL_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -f $(LIBSOIL_MAKEFILE) \ + DESTDIR=$(TARGET_DIR) install \ + INSTALL=$(INSTALL) \ + -C $(@D)/src +endef + +$(eval $(generic-package)) diff --git a/package/libsoundtouch/Config.in b/package/libsoundtouch/Config.in new file mode 100644 index 0000000000..fdbc0757be --- /dev/null +++ b/package/libsoundtouch/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBSOUNDTOUCH + bool "libsoundtouch" + depends on BR2_INSTALL_LIBSTDCPP + help + SoundTouch is an open-source audio processing library for + changing the Tempo, Pitch and Playback Rates of audio streams + or audio files. + + http://www.surina.net/soundtouch + +comment "libsoundtouch needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/libsoundtouch/libsoundtouch.mk b/package/libsoundtouch/libsoundtouch.mk new file mode 100644 index 0000000000..cdfec20d2b --- /dev/null +++ b/package/libsoundtouch/libsoundtouch.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libsoundtouch +# +################################################################################ + +LIBSOUNDTOUCH_VERSION = 010a91a59071c7fefd316fca62c0d980ec85b4b1 +LIBSOUNDTOUCH_SITE = https://freeswitch.org/stash/scm/sd/libsoundtouch.git +LIBSOUNDTOUCH_SITE_METHOD = git +LIBSOUNDTOUCH_LICENSE = LGPLv2.1+ +LIBSOUNDTOUCH_LICENSE_FILES = COPYING.TXT +LIBSOUNDTOUCH_AUTORECONF = YES +LIBSOUNDTOUCH_INSTALL_STAGING = YES + +define LIBSOUNDTOUCH_CREATE_CONFIG_M4 + mkdir -p $(@D)/config/m4 +endef +LIBSOUNDTOUCH_POST_PATCH_HOOKS += LIBSOUNDTOUCH_CREATE_CONFIG_M4 + +$(eval $(autotools-package)) diff --git a/package/libsoup/Config.in b/package/libsoup/Config.in new file mode 100644 index 0000000000..bc0ba950aa --- /dev/null +++ b/package/libsoup/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_LIBSOUP + bool "libsoup" + depends on BR2_USE_WCHAR # glib2 and gnutls + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_SQLITE + help + libsoup is an HTTP client/server library. It uses GObject + and the GLib main loop, to integrate well with GNOME + applications. + + http://live.gnome.org/LibSoup + +if BR2_PACKAGE_LIBSOUP + +config BR2_PACKAGE_LIBSOUP_GNOME + bool "libsoup-gnome" + help + Build libsoup-gnome library. + +config BR2_PACKAGE_LIBSOUP_SSL + bool "https support" + select BR2_PACKAGE_GLIB_NETWORKING + select BR2_PACKAGE_GNUTLS + help + Enable HTTPS (SSL) support. + +endif + +comment "libsoup needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libsoup/libsoup.hash b/package/libsoup/libsoup.hash new file mode 100644 index 0000000000..45cee4216d --- /dev/null +++ b/package/libsoup/libsoup.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/libsoup/2.54/libsoup-2.54.1.sha256sum +sha256 47b42c232034734d66e5f093025843a5d8cc4b2357c011085a2fd04ef02dd633 libsoup-2.54.1.tar.xz diff --git a/package/libsoup/libsoup.mk b/package/libsoup/libsoup.mk new file mode 100644 index 0000000000..5f5156b6e8 --- /dev/null +++ b/package/libsoup/libsoup.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# libsoup +# +################################################################################ + +LIBSOUP_VERSION_MAJOR = 2.54 +LIBSOUP_VERSION = $(LIBSOUP_VERSION_MAJOR).1 +LIBSOUP_SOURCE = libsoup-$(LIBSOUP_VERSION).tar.xz +LIBSOUP_SITE = http://ftp.gnome.org/pub/gnome/sources/libsoup/$(LIBSOUP_VERSION_MAJOR) +LIBSOUP_LICENSE = LGPLv2+ +LIBSOUP_LICENSE_FILES = COPYING +LIBSOUP_INSTALL_STAGING = YES +LIBSOUP_CONF_ENV = ac_cv_path_GLIB_GENMARSHAL=$(LIBGLIB2_HOST_BINARY) +LIBSOUP_CONF_OPTS = --disable-glibtest --enable-vala=no --with-gssapi=no +LIBSOUP_DEPENDENCIES = host-pkgconf host-libglib2 \ + libglib2 libxml2 sqlite host-intltool + +ifeq ($(BR2_PACKAGE_LIBSOUP_GNOME),y) +LIBSOUP_CONF_OPTS += --with-gnome +else +LIBSOUP_CONF_OPTS += --without-gnome +endif + +ifeq ($(BR2_PACKAGE_LIBSOUP_SSL),y) +LIBSOUP_DEPENDENCIES += glib-networking +else +LIBSOUP_CONF_OPTS += --disable-tls-check +endif + +$(eval $(autotools-package)) diff --git a/package/libsoxr/Config.in b/package/libsoxr/Config.in new file mode 100644 index 0000000000..a218ae99c8 --- /dev/null +++ b/package/libsoxr/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBSOXR + bool "libsoxr" + help + The SoX Resampler library `libsoxr' performs one-dimensional + sample-rate conversion—it may be used, for example, to + resample PCM-encoded audio. + + It aims to give fast and high quality results for any constant + (rational or irrational) resampling ratio. Phase-response, + preserved bandwidth, aliasing, and rejection level parameters + are all configurable; alternatively, simple `preset' + configurations may be selected. An experimental, variable-rate + resampling mode of operation is also included. + + http://sourceforge.net/projects/soxr/ diff --git a/package/libsoxr/libsoxr.hash b/package/libsoxr/libsoxr.hash new file mode 100644 index 0000000000..066b546e62 --- /dev/null +++ b/package/libsoxr/libsoxr.hash @@ -0,0 +1,5 @@ +# From http://sourceforge.net/projects/soxr/files/ +sha1 3b990f91dc8dc08e70626cd5fb90deda0239c211 soxr-0.1.2-Source.tar.xz +md5 0866fc4320e26f47152798ac000de1c0 soxr-0.1.2-Source.tar.xz +# Locally calculated +sha256 54e6f434f1c491388cd92f0e3c47f1ade082cc24327bdc43762f7d1eefe0c275 soxr-0.1.2-Source.tar.xz diff --git a/package/libsoxr/libsoxr.mk b/package/libsoxr/libsoxr.mk new file mode 100644 index 0000000000..0fdc57078f --- /dev/null +++ b/package/libsoxr/libsoxr.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libsoxr +# +################################################################################ + +LIBSOXR_VERSION = 0.1.2 +LIBSOXR_SOURCE = soxr-$(LIBSOXR_VERSION)-Source.tar.xz +LIBSOXR_SITE = http://downloads.sourceforge.net/project/soxr +LIBSOXR_LICENSE = LGPLv2.1+ +LIBSOXR_LICENSE_FILES = LICENCE COPYING.LGPL +LIBSOXR_INSTALL_STAGING = YES +LIBSOXR_CONF_OPTS = -DWITH_OPENMP=OFF + +ifeq ($(call qstrip,$(BR2_ENDIAN)),BIG) +LIBSOXR_CONF_OPTS += -DHAVE_WORDS_BIGENDIAN=1 +else +LIBSOXR_CONF_OPTS += -DHAVE_WORDS_BIGENDIAN=0 +endif + +$(eval $(cmake-package)) diff --git a/package/libsquish/0001-kodi.patch b/package/libsquish/0001-kodi.patch new file mode 100644 index 0000000000..a9bca66904 --- /dev/null +++ b/package/libsquish/0001-kodi.patch @@ -0,0 +1,327 @@ +Add Kodi-specific patch + +Kodi 15.0 contains an updated version of libsquish: +https://github.com/xbmc/xbmc/tree/master/tools/depends/native/libsquish-native + +The OpenElec project provides a separate tarball including the Kodi- +specific patches: +http://sources.openelec.tv/devel/libsquish-1.10-openelec.tar.gz + +This patch contains the relevant diff between upstream libsquish 1.13 +and the OpenElec tarball. + +Signed-off-by: Bernd Kuhls + +diff -uwNr 1.13/squish.cpp libsquish-1.10-openelec/squish.cpp +--- 1.13/squish.cpp 2015-04-30 12:48:49.000000000 +0200 ++++ libsquish-1.10-openelec/squish.cpp 2015-01-09 10:58:43.000000000 +0100 +@@ -23,6 +23,7 @@ + + -------------------------------------------------------------------------- */ + ++#include + #include + #include "colourset.h" + #include "maths.h" +@@ -39,7 +40,7 @@ + // grab the flag bits + int method = flags & ( kDxt1 | kDxt3 | kDxt5 ); + int fit = flags & ( kColourIterativeClusterFit | kColourClusterFit | kColourRangeFit ); +- int extra = flags & kWeightColourByAlpha; ++ int extra = flags & ( kWeightColourByAlpha | kSourceBGRA ); + + // set defaults + if( method != kDxt3 && method != kDxt5 ) +@@ -124,8 +125,30 @@ + return blockcount*blocksize; + } + ++void CopyRGBA( u8 const* source, u8* dest, int flags ) ++{ ++ if (flags & kSourceBGRA) ++ { ++ // convert from bgra to rgba ++ dest[0] = source[2]; ++ dest[1] = source[1]; ++ dest[2] = source[0]; ++ dest[3] = source[3]; ++ } ++ else ++ { ++ for( int i = 0; i < 4; ++i ) ++ *dest++ = *source++; ++ } ++} ++ + void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric ) + { ++ CompressImage(rgba, width, height, width*4, blocks, flags, metric); ++} ++ ++void CompressImage( u8 const* rgba, int width, int height, int pitch, void* blocks, int flags, float* metric ) ++{ + // fix any bad flags + flags = FixFlags( flags ); + +@@ -154,20 +177,14 @@ + if( sx < width && sy < height ) + { + // copy the rgba value +- u8 const* sourcePixel = rgba + 4*( width*sy + sx ); +- for( int i = 0; i < 4; ++i ) +- *targetPixel++ = *sourcePixel++; +- ++ u8 const* sourcePixel = rgba + pitch*sy + 4*sx; ++ CopyRGBA(sourcePixel, targetPixel, flags); + // enable this pixel + mask |= ( 1 << ( 4*py + px ) ); + } +- else +- { +- // skip this pixel as its outside the image + targetPixel += 4; + } + } +- } + + // compress it into the output + CompressMasked( sourceRgba, mask, targetBlock, flags, metric ); +@@ -180,6 +197,11 @@ + + void DecompressImage( u8* rgba, int width, int height, void const* blocks, int flags ) + { ++ DecompressImage( rgba, width, height, width*4, blocks, flags ); ++} ++ ++void DecompressImage( u8* rgba, int width, int height, int pitch, void const* blocks, int flags ) ++{ + // fix any bad flags + flags = FixFlags( flags ); + +@@ -207,24 +229,132 @@ + int sy = y + py; + if( sx < width && sy < height ) + { +- u8* targetPixel = rgba + 4*( width*sy + sx ); ++ u8* targetPixel = rgba + pitch*sy + 4*sx; + + // copy the rgba value ++ CopyRGBA(sourcePixel, targetPixel, flags); ++ } ++ sourcePixel += 4; ++ } ++ } ++ ++ // advance ++ sourceBlock += bytesPerBlock; ++ } ++ } ++} ++ ++static double ErrorSq(double x, double y) ++{ ++ return (x - y) * (x - y); ++} ++ ++static void ComputeBlockWMSE(u8 const *original, u8 const *compressed, unsigned int w, unsigned int h, double &cmse, double &amse) ++{ ++ // Computes the MSE for the block and weights it by the variance of the original block. ++ // If the variance of the original block is less than 4 (i.e. a standard deviation of 1 per channel) ++ // then the block is close to being a single colour. Quantisation errors in single colour blocks ++ // are easier to see than similar errors in blocks that contain more colours, particularly when there ++ // are many such blocks in a large area (eg a blue sky background) as they cause banding. Given that ++ // banding is easier to see than small errors in "complex" blocks, we weight the errors by a factor ++ // of 5. This implies that images with large, single colour areas will have a higher potential WMSE ++ // than images with lots of detail. ++ ++ cmse = amse = 0; ++ unsigned int sum_p[4]; // per channel sum of pixels ++ unsigned int sum_p2[4]; // per channel sum of pixels squared ++ memset(sum_p, 0, sizeof(sum_p)); ++ memset(sum_p2, 0, sizeof(sum_p2)); ++ for( unsigned int py = 0; py < 4; ++py ) ++ { ++ for( unsigned int px = 0; px < 4; ++px ) ++ { ++ if( px < w && py < h ) ++ { ++ double pixelCMSE = 0; ++ for( int i = 0; i < 3; ++i ) ++ { ++ pixelCMSE += ErrorSq(original[i], compressed[i]); ++ sum_p[i] += original[i]; ++ sum_p2[i] += (unsigned int)original[i]*original[i]; ++ } ++ if( original[3] == 0 && compressed[3] == 0 ) ++ pixelCMSE = 0; // transparent in both, so colour is inconsequential ++ amse += ErrorSq(original[3], compressed[3]); ++ cmse += pixelCMSE; ++ sum_p[3] += original[3]; ++ sum_p2[3] += (unsigned int)original[3]*original[3]; ++ } ++ original += 4; ++ compressed += 4; ++ } ++ } ++ unsigned int variance = 0; + for( int i = 0; i < 4; ++i ) +- *targetPixel++ = *sourcePixel++; ++ variance += w*h*sum_p2[i] - sum_p[i]*sum_p[i]; ++ if( variance < 4 * w * w * h * h ) ++ { ++ amse *= 5; ++ cmse *= 5; + } +- else ++} ++ ++void ComputeMSE( u8 const *rgba, int width, int height, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE ) + { +- // skip this pixel as its outside the image +- sourcePixel += 4; ++ ComputeMSE(rgba, width, height, width*4, dxt, flags, colourMSE, alphaMSE); ++} ++ ++void ComputeMSE( u8 const *rgba, int width, int height, int pitch, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE ) ++{ ++ // fix any bad flags ++ flags = FixFlags( flags ); ++ colourMSE = alphaMSE = 0; ++ ++ // initialise the block input ++ squish::u8 const* sourceBlock = dxt; ++ int bytesPerBlock = ( ( flags & squish::kDxt1 ) != 0 ) ? 8 : 16; ++ ++ // loop over blocks ++ for( int y = 0; y < height; y += 4 ) ++ { ++ for( int x = 0; x < width; x += 4 ) ++ { ++ // decompress the block ++ u8 targetRgba[4*16]; ++ Decompress( targetRgba, sourceBlock, flags ); ++ u8 const* sourcePixel = targetRgba; ++ ++ // copy across to a similar pixel block ++ u8 originalRgba[4*16]; ++ u8* originalPixel = originalRgba; ++ ++ for( int py = 0; py < 4; ++py ) ++ { ++ for( int px = 0; px < 4; ++px ) ++ { ++ int sx = x + px; ++ int sy = y + py; ++ if( sx < width && sy < height ) ++ { ++ u8 const* targetPixel = rgba + pitch*sy + 4*sx; ++ CopyRGBA(targetPixel, originalPixel, flags); + } ++ sourcePixel += 4; ++ originalPixel += 4; + } + } + ++ // compute the weighted MSE of the block ++ double blockCMSE, blockAMSE; ++ ComputeBlockWMSE(originalRgba, targetRgba, std::min(4, width - x), std::min(4, height - y), blockCMSE, blockAMSE); ++ colourMSE += blockCMSE; ++ alphaMSE += blockAMSE; + // advance + sourceBlock += bytesPerBlock; + } + } ++ colourMSE /= (width * height * 3); ++ alphaMSE /= (width * height); + } + + } // namespace squish +diff -uwNr 1.13/squish.h libsquish-1.10-openelec/squish.h +--- 1.13/squish.h 2015-04-30 12:55:27.000000000 +0200 ++++ libsquish-1.10-openelec/squish.h 2015-01-09 10:58:43.000000000 +0100 +@@ -57,7 +57,10 @@ + kColourRangeFit = ( 1 << 4 ), + + //! Weight the colour by alpha during cluster fit (disabled by default). +- kWeightColourByAlpha = ( 1 << 7 ) ++ kWeightColourByAlpha = ( 1 << 7 ), ++ ++ //! Source is BGRA rather than RGBA ++ kSourceBGRA = ( 1 << 9 ), + }; + + // ----------------------------------------------------------------------------- +@@ -194,6 +197,7 @@ + @param rgba The pixels of the source. + @param width The width of the source image. + @param height The height of the source image. ++ @param pitch The pitch of the source image. + @param blocks Storage for the compressed output. + @param flags Compression flags. + @param metric An optional perceptual metric. +@@ -231,6 +235,7 @@ + to allocate for the compressed output. + */ + void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags, float* metric = 0 ); ++void CompressImage( u8 const* rgba, int width, int height, int pitch, void* blocks, int flags, float* metric = 0 ); + + // ----------------------------------------------------------------------------- + +@@ -239,6 +244,7 @@ + @param rgba Storage for the decompressed pixels. + @param width The width of the source image. + @param height The height of the source image. ++ @param pitch The pitch of the decompressed pixels. + @param blocks The compressed DXT blocks. + @param flags Compression flags. + +@@ -254,6 +260,32 @@ + Internally this function calls squish::Decompress for each block. + */ + void DecompressImage( u8* rgba, int width, int height, void const* blocks, int flags ); ++void DecompressImage( u8* rgba, int width, int height, int pitch, void const* blocks, int flags ); ++ ++// ----------------------------------------------------------------------------- ++ ++/*! @brief Computes MSE of an compressed image in memory. ++ ++ @param rgba The original image pixels. ++ @param width The width of the source image. ++ @param height The height of the source image. ++ @param pitch The pitch of the source image. ++ @param dxt The compressed dxt blocks ++ @param flags Compression flags. ++ @param colourMSE The MSE of the colour values. ++ @param alphaMSE The MSE of the alpha values. ++ ++ The colour MSE and alpha MSE are computed across all pixels. The colour MSE is ++ averaged across all rgb values (i.e. colourMSE = sum sum_k ||dxt.k - rgba.k||/3) ++ ++ The flags parameter should specify either kDxt1, kDxt3 or kDxt5 compression, ++ however, DXT1 will be used by default if none is specified. All other flags ++ are ignored. ++ ++ Internally this function calls squish::Decompress for each block. ++*/ ++void ComputeMSE(u8 const *rgba, int width, int height, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE); ++void ComputeMSE(u8 const *rgba, int width, int height, int pitch, u8 const *dxt, int flags, double &colourMSE, double &alphaMSE); + + // ----------------------------------------------------------------------------- + +diff -uwNr 1.13/squish.pc.in libsquish-1.10-openelec/squish.pc.in +--- 1.13/squish.pc 1970-01-01 01:00:00.000000000 +0100 ++++ libsquish-1.10-openelec/squish.pc 2015-01-09 10:58:43.000000000 +0100 +@@ -0,0 +1,13 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${prefix}/lib ++sharedlibdir=${libdir} ++includedir=${prefix}/include ++ ++Name: squish ++Description: squish DXT lib ++Version: 1.1.3-kodi ++ ++Requires: ++Libs: -L${libdir} -L${sharedlibdir} -lsquish ++Cflags: -I${includedir} diff --git a/package/libsquish/Config.in b/package/libsquish/Config.in new file mode 100644 index 0000000000..eabe6c54a8 --- /dev/null +++ b/package/libsquish/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBSQUISH + bool "libsquish" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + help + The libSquish library compresses images with the DXT standard + (also known as S3TC). This standard is mainly used by OpenGL + and DirectX for the lossy compression of RGBA textures. + + http://sourceforge.net/projects/libsquish + +comment "libsquish needs a toolchain w/ C++, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS diff --git a/package/libsquish/libsquish.hash b/package/libsquish/libsquish.hash new file mode 100644 index 0000000000..caa7198642 --- /dev/null +++ b/package/libsquish/libsquish.hash @@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/libsquish/files +sha1 7bcdd7d0f0460a29e25dcdab8dc41a30e58bb366 libsquish-1.13.tgz diff --git a/package/libsquish/libsquish.mk b/package/libsquish/libsquish.mk new file mode 100644 index 0000000000..73f8de9cc1 --- /dev/null +++ b/package/libsquish/libsquish.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# libsquish +# +################################################################################ + +LIBSQUISH_VERSION = 1.13 +LIBSQUISH_SOURCE = libsquish-$(LIBSQUISH_VERSION).tgz +LIBSQUISH_SITE = http://downloads.sourceforge.net/project/libsquish +LIBSQUISH_INSTALL_STAGING = YES +LIBSQUISH_STRIP_COMPONENTS = 0 +LIBSQUISH_LICENSE = MIT +LIBSQUISH_LICENSE_FILES = README + +define LIBSQUISH_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define LIBSQUISH_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/include + mkdir -p $(STAGING_DIR)/usr/lib + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + install PREFIX=/usr INSTALL_DIR=$(STAGING_DIR)/usr + $(INSTALL) -D -m 644 $(@D)/squish.pc $(STAGING_DIR)/usr/lib/pkgconfig/squish.pc + ln -sf libsquish.so.0.0 $(STAGING_DIR)/usr/lib/libsquish.so + ln -sf libsquish.so.0.0 $(STAGING_DIR)/usr/lib/libsquish.so.0 +endef + +define LIBSQUISH_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/include + mkdir -p $(TARGET_DIR)/usr/lib + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + install PREFIX=/usr INSTALL_DIR=$(TARGET_DIR)/usr + ln -sf libsquish.so.0.0 $(TARGET_DIR)/usr/lib/libsquish.so.0 +endef + +$(eval $(generic-package)) diff --git a/package/libsrtp/0001-Rename-SHA1-functions-to-avoid-conflicts-with-downst.patch b/package/libsrtp/0001-Rename-SHA1-functions-to-avoid-conflicts-with-downst.patch new file mode 100644 index 0000000000..60a123eccd --- /dev/null +++ b/package/libsrtp/0001-Rename-SHA1-functions-to-avoid-conflicts-with-downst.patch @@ -0,0 +1,396 @@ +From f76eb65d008d0c8e06698e4a63a776e91b80155b Mon Sep 17 00:00:00 2001 +From: jfigus +Date: Tue, 4 Nov 2014 14:54:02 -0500 +Subject: [PATCH] Rename SHA1 functions to avoid conflicts with downstream + packages. + +Backported from upstream commit c270245a94ae9a007202754eb8f7ce9e48f97007 +and tweaked to apply on top of v1.5.4. + +Signed-off-by: Vicente Olivert Riera +--- + crypto/hash/hmac.c | 20 ++++++++++---------- + crypto/hash/hmac_ossl.c | 18 +++++++++--------- + crypto/hash/sha1.c | 32 ++++++++++++++++---------------- + crypto/include/hmac.h | 4 ++-- + crypto/include/sha1.h | 34 +++++++++++++++++----------------- + crypto/test/sha1_driver.c | 8 ++++---- + 6 files changed, 58 insertions(+), 58 deletions(-) + +diff --git a/crypto/hash/hmac.c b/crypto/hash/hmac.c +index ddb75ea..4bed61e 100644 +--- a/crypto/hash/hmac.c ++++ b/crypto/hash/hmac.c +@@ -141,11 +141,11 @@ hmac_init(hmac_ctx_t *state, const uint8_t *key, int key_len) { + debug_print(mod_hmac, "ipad: %s", octet_string_hex_string(ipad, 64)); + + /* initialize sha1 context */ +- sha1_init(&state->init_ctx); ++ srtp_sha1_init(&state->init_ctx); + + /* hash ipad ^ key */ +- sha1_update(&state->init_ctx, ipad, 64); +- memcpy(&state->ctx, &state->init_ctx, sizeof(sha1_ctx_t)); ++ srtp_sha1_update(&state->init_ctx, ipad, 64); ++ memcpy(&state->ctx, &state->init_ctx, sizeof(srtp_sha1_ctx_t)); + + return err_status_ok; + } +@@ -153,7 +153,7 @@ hmac_init(hmac_ctx_t *state, const uint8_t *key, int key_len) { + err_status_t + hmac_start(hmac_ctx_t *state) { + +- memcpy(&state->ctx, &state->init_ctx, sizeof(sha1_ctx_t)); ++ memcpy(&state->ctx, &state->init_ctx, sizeof(srtp_sha1_ctx_t)); + + return err_status_ok; + } +@@ -165,7 +165,7 @@ hmac_update(hmac_ctx_t *state, const uint8_t *message, int msg_octets) { + octet_string_hex_string(message, msg_octets)); + + /* hash message into sha1 context */ +- sha1_update(&state->ctx, message, msg_octets); ++ srtp_sha1_update(&state->ctx, message, msg_octets); + + return err_status_ok; + } +@@ -183,7 +183,7 @@ hmac_compute(hmac_ctx_t *state, const void *message, + + /* hash message, copy output into H */ + hmac_update(state, (const uint8_t*)message, msg_octets); +- sha1_final(&state->ctx, H); ++ srtp_sha1_final(&state->ctx, H); + + /* + * note that we don't need to debug_print() the input, since the +@@ -193,16 +193,16 @@ hmac_compute(hmac_ctx_t *state, const void *message, + octet_string_hex_string((uint8_t *)H, 20)); + + /* re-initialize hash context */ +- sha1_init(&state->ctx); ++ srtp_sha1_init(&state->ctx); + + /* hash opad ^ key */ +- sha1_update(&state->ctx, (uint8_t *)state->opad, 64); ++ srtp_sha1_update(&state->ctx, (uint8_t *)state->opad, 64); + + /* hash the result of the inner hash */ +- sha1_update(&state->ctx, (uint8_t *)H, 20); ++ srtp_sha1_update(&state->ctx, (uint8_t *)H, 20); + + /* the result is returned in the array hash_value[] */ +- sha1_final(&state->ctx, hash_value); ++ srtp_sha1_final(&state->ctx, hash_value); + + /* copy hash_value to *result */ + for (i=0; i < tag_len; i++) +diff --git a/crypto/hash/hmac_ossl.c b/crypto/hash/hmac_ossl.c +index f62ce57..2ec8350 100644 +--- a/crypto/hash/hmac_ossl.c ++++ b/crypto/hash/hmac_ossl.c +@@ -163,11 +163,11 @@ hmac_init (hmac_ctx_t *state, const uint8_t *key, int key_len) + debug_print(mod_hmac, "ipad: %s", octet_string_hex_string(ipad, sizeof(ipad))); + + /* initialize sha1 context */ +- sha1_init(&state->init_ctx); ++ srtp_sha1_init(&state->init_ctx); + state->init_ctx_initialized = 1; + + /* hash ipad ^ key */ +- sha1_update(&state->init_ctx, ipad, sizeof(ipad)); ++ srtp_sha1_update(&state->init_ctx, ipad, sizeof(ipad)); + return (hmac_start(state)); + } + +@@ -192,7 +192,7 @@ hmac_update (hmac_ctx_t *state, const uint8_t *message, int msg_octets) + octet_string_hex_string(message, msg_octets)); + + /* hash message into sha1 context */ +- sha1_update(&state->ctx, message, msg_octets); ++ srtp_sha1_update(&state->ctx, message, msg_octets); + + return err_status_ok; + } +@@ -211,8 +211,8 @@ hmac_compute (hmac_ctx_t *state, const void *message, + } + + /* hash message, copy output into H */ +- sha1_update(&state->ctx, message, msg_octets); +- sha1_final(&state->ctx, H); ++ srtp_sha1_update(&state->ctx, message, msg_octets); ++ srtp_sha1_final(&state->ctx, H); + + /* + * note that we don't need to debug_print() the input, since the +@@ -222,16 +222,16 @@ hmac_compute (hmac_ctx_t *state, const void *message, + octet_string_hex_string((uint8_t*)H, sizeof(H))); + + /* re-initialize hash context */ +- sha1_init(&state->ctx); ++ srtp_sha1_init(&state->ctx); + + /* hash opad ^ key */ +- sha1_update(&state->ctx, (uint8_t*)state->opad, sizeof(state->opad)); ++ srtp_sha1_update(&state->ctx, (uint8_t*)state->opad, sizeof(state->opad)); + + /* hash the result of the inner hash */ +- sha1_update(&state->ctx, (uint8_t*)H, sizeof(H)); ++ srtp_sha1_update(&state->ctx, (uint8_t*)H, sizeof(H)); + + /* the result is returned in the array hash_value[] */ +- sha1_final(&state->ctx, hash_value); ++ srtp_sha1_final(&state->ctx, hash_value); + + /* copy hash_value to *result */ + for (i = 0; i < tag_len; i++) { +diff --git a/crypto/hash/sha1.c b/crypto/hash/sha1.c +index c200437..29c2e62 100644 +--- a/crypto/hash/sha1.c ++++ b/crypto/hash/sha1.c +@@ -77,17 +77,17 @@ uint32_t SHA_K2 = 0x8F1BBCDC; /* Kt for 40 <= t <= 59 */ + uint32_t SHA_K3 = 0xCA62C1D6; /* Kt for 60 <= t <= 79 */ + + void +-sha1(const uint8_t *msg, int octets_in_msg, uint32_t hash_value[5]) { +- sha1_ctx_t ctx; ++srtp_sha1(const uint8_t *msg, int octets_in_msg, uint32_t hash_value[5]) { ++ srtp_sha1_ctx_t ctx; + +- sha1_init(&ctx); +- sha1_update(&ctx, msg, octets_in_msg); +- sha1_final(&ctx, hash_value); ++ srtp_sha1_init(&ctx); ++ srtp_sha1_update(&ctx, msg, octets_in_msg); ++ srtp_sha1_final(&ctx, hash_value); + + } + + /* +- * sha1_core(M, H) computes the core compression function, where M is ++ * srtp_sha1_core(M, H) computes the core compression function, where M is + * the next part of the message (in network byte order) and H is the + * intermediate state { H0, H1, ...} (in host byte order) + * +@@ -99,7 +99,7 @@ sha1(const uint8_t *msg, int octets_in_msg, uint32_t hash_value[5]) { + */ + + void +-sha1_core(const uint32_t M[16], uint32_t hash_value[5]) { ++srtp_sha1_core(const uint32_t M[16], uint32_t hash_value[5]) { + uint32_t H0; + uint32_t H1; + uint32_t H2; +@@ -186,7 +186,7 @@ sha1_core(const uint32_t M[16], uint32_t hash_value[5]) { + } + + void +-sha1_init(sha1_ctx_t *ctx) { ++srtp_sha1_init(srtp_sha1_ctx_t *ctx) { + + /* initialize state vector */ + ctx->H[0] = 0x67452301; +@@ -204,7 +204,7 @@ sha1_init(sha1_ctx_t *ctx) { + } + + void +-sha1_update(sha1_ctx_t *ctx, const uint8_t *msg, int octets_in_msg) { ++srtp_sha1_update(srtp_sha1_ctx_t *ctx, const uint8_t *msg, int octets_in_msg) { + int i; + uint8_t *buf = (uint8_t *)ctx->M; + +@@ -227,13 +227,13 @@ sha1_update(sha1_ctx_t *ctx, const uint8_t *msg, int octets_in_msg) { + + /* process a whole block */ + +- debug_print(mod_sha1, "(update) running sha1_core()", NULL); ++ debug_print(mod_sha1, "(update) running srtp_sha1_core()", NULL); + +- sha1_core(ctx->M, ctx->H); ++ srtp_sha1_core(ctx->M, ctx->H); + + } else { + +- debug_print(mod_sha1, "(update) not running sha1_core()", NULL); ++ debug_print(mod_sha1, "(update) not running srtp_sha1_core()", NULL); + + for (i=ctx->octets_in_buffer; + i < (ctx->octets_in_buffer + octets_in_msg); i++) +@@ -247,12 +247,12 @@ sha1_update(sha1_ctx_t *ctx, const uint8_t *msg, int octets_in_msg) { + } + + /* +- * sha1_final(ctx, output) computes the result for ctx and copies it ++ * srtp_sha1_final(ctx, output) computes the result for ctx and copies it + * into the twenty octets located at *output + */ + + void +-sha1_final(sha1_ctx_t *ctx, uint32_t *output) { ++srtp_sha1_final(srtp_sha1_ctx_t *ctx, uint32_t *output) { + uint32_t A, B, C, D, E, TEMP; + uint32_t W[80]; + int i, t; +@@ -339,11 +339,11 @@ sha1_final(sha1_ctx_t *ctx, uint32_t *output) { + + } + +- debug_print(mod_sha1, "(final) running sha1_core()", NULL); ++ debug_print(mod_sha1, "(final) running srtp_sha1_core()", NULL); + + if (ctx->octets_in_buffer >= 56) { + +- debug_print(mod_sha1, "(final) running sha1_core() again", NULL); ++ debug_print(mod_sha1, "(final) running srtp_sha1_core() again", NULL); + + /* we need to do one final run of the compression algo */ + +diff --git a/crypto/include/hmac.h b/crypto/include/hmac.h +index 875f45c..9fc664e 100644 +--- a/crypto/include/hmac.h ++++ b/crypto/include/hmac.h +@@ -51,8 +51,8 @@ + + typedef struct { + uint8_t opad[64]; +- sha1_ctx_t ctx; +- sha1_ctx_t init_ctx; ++ srtp_sha1_ctx_t ctx; ++ srtp_sha1_ctx_t init_ctx; + #ifdef OPENSSL + int ctx_initialized; + int init_ctx_initialized; +diff --git a/crypto/include/sha1.h b/crypto/include/sha1.h +index f1744ce..e177af6 100644 +--- a/crypto/include/sha1.h ++++ b/crypto/include/sha1.h +@@ -56,15 +56,15 @@ + #include + #include + +-typedef EVP_MD_CTX sha1_ctx_t; ++typedef EVP_MD_CTX srtp_sha1_ctx_t; + + /* +- * sha1_init(&ctx) initializes the SHA1 context ctx ++ * srtp_sha1_init(&ctx) initializes the SHA1 context ctx + * +- * sha1_update(&ctx, msg, len) hashes the len octets starting at msg ++ * srtp_sha1_update(&ctx, msg, len) hashes the len octets starting at msg + * into the SHA1 context + * +- * sha1_final(&ctx, output) performs the final processing of the SHA1 ++ * srtp_sha1_final(&ctx, output) performs the final processing of the SHA1 + * context and writes the result to the 20 octets at output + * + * Return values are ignored on the EVP functions since all three +@@ -72,18 +72,18 @@ typedef EVP_MD_CTX sha1_ctx_t; + * + */ + +-static inline void sha1_init (sha1_ctx_t *ctx) ++static inline void srtp_sha1_init (srtp_sha1_ctx_t *ctx) + { + EVP_MD_CTX_init(ctx); + EVP_DigestInit(ctx, EVP_sha1()); + } + +-static inline void sha1_update (sha1_ctx_t *ctx, const uint8_t *M, int octets_in_msg) ++static inline void srtp_sha1_update (srtp_sha1_ctx_t *ctx, const uint8_t *M, int octets_in_msg) + { + EVP_DigestUpdate(ctx, M, octets_in_msg); + } + +-static inline void sha1_final (sha1_ctx_t *ctx, uint32_t *output) ++static inline void srtp_sha1_final (srtp_sha1_ctx_t *ctx, uint32_t *output) + { + unsigned int len = 0; + +@@ -97,7 +97,7 @@ typedef struct { + uint32_t M[16]; /* message buffer */ + int octets_in_buffer; /* octets of message in buffer */ + uint32_t num_bits_in_msg; /* total number of bits in message */ +-} sha1_ctx_t; ++} srtp_sha1_ctx_t; + + /* + * sha1(&ctx, msg, len, output) hashes the len octets starting at msg +@@ -110,33 +110,33 @@ void + sha1(const uint8_t *message, int octets_in_msg, uint32_t output[5]); + + /* +- * sha1_init(&ctx) initializes the SHA1 context ctx ++ * srtp_sha1_init(&ctx) initializes the SHA1 context ctx + * +- * sha1_update(&ctx, msg, len) hashes the len octets starting at msg ++ * srtp_sha1_update(&ctx, msg, len) hashes the len octets starting at msg + * into the SHA1 context + * +- * sha1_final(&ctx, output) performs the final processing of the SHA1 ++ * srtp_sha1_final(&ctx, output) performs the final processing of the SHA1 + * context and writes the result to the 20 octets at output + * + */ + + void +-sha1_init(sha1_ctx_t *ctx); ++srtp_sha1_init(srtp_sha1_ctx_t *ctx); + + void +-sha1_update(sha1_ctx_t *ctx, const uint8_t *M, int octets_in_msg); ++srtp_sha1_update(srtp_sha1_ctx_t *ctx, const uint8_t *M, int octets_in_msg); + + void +-sha1_final(sha1_ctx_t *ctx, uint32_t output[5]); ++srtp_sha1_final(srtp_sha1_ctx_t *ctx, uint32_t output[5]); + + /* +- * The sha1_core function is INTERNAL to SHA-1, but it is declared ++ * The srtp_sha1_core function is INTERNAL to SHA-1, but it is declared + * here because it is also used by the cipher SEAL 3.0 in its key + * setup algorithm. + */ + + /* +- * sha1_core(M, H) computes the core sha1 compression function, where M is ++ * srtp_sha1_core(M, H) computes the core sha1 compression function, where M is + * the next part of the message and H is the intermediate state {H0, + * H1, ...} + * +@@ -145,7 +145,7 @@ sha1_final(sha1_ctx_t *ctx, uint32_t output[5]); + */ + + void +-sha1_core(const uint32_t M[16], uint32_t hash_value[5]); ++srtp_sha1_core(const uint32_t M[16], uint32_t hash_value[5]); + + #endif /* else OPENSSL */ + +diff --git a/crypto/test/sha1_driver.c b/crypto/test/sha1_driver.c +index 6adfad1..2e19479 100644 +--- a/crypto/test/sha1_driver.c ++++ b/crypto/test/sha1_driver.c +@@ -102,7 +102,7 @@ hash_test_case_add(hash_test_case_t **list_ptr, + + err_status_t + sha1_test_case_validate(const hash_test_case_t *test_case) { +- sha1_ctx_t ctx; ++ srtp_sha1_ctx_t ctx; + uint32_t hash_value[5]; + + if (test_case == NULL) +@@ -113,9 +113,9 @@ sha1_test_case_validate(const hash_test_case_t *test_case) { + if (test_case->data_len > MAX_HASH_DATA_LEN) + return err_status_bad_param; + +- sha1_init(&ctx); +- sha1_update(&ctx, test_case->data, test_case->data_len); +- sha1_final(&ctx, hash_value); ++ srtp_sha1_init(&ctx); ++ srtp_sha1_update(&ctx, test_case->data, test_case->data_len); ++ srtp_sha1_final(&ctx, hash_value); + if (0 == memcmp(test_case->hash, hash_value, 20)) { + #if VERBOSE + printf("PASSED: reference value: %s\n", +-- +2.7.3 + diff --git a/package/libsrtp/Config.in b/package/libsrtp/Config.in new file mode 100644 index 0000000000..ce37712f7d --- /dev/null +++ b/package/libsrtp/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBSRTP + bool "libsrtp" + help + This package provides an implementation of the Secure + Real-time Transport Protocol (SRTP), the Universal Security + Transform (UST), and a supporting cryptographic kernel. + + https://github.com/cisco/libsrtp diff --git a/package/libsrtp/libsrtp.hash b/package/libsrtp/libsrtp.hash new file mode 100644 index 0000000000..cb060d27b9 --- /dev/null +++ b/package/libsrtp/libsrtp.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 56a7b521c25134f48faff26b0b1e3d4378a14986a2d3d7bc6fefb48987304ff0 libsrtp-v1.5.4.tar.gz diff --git a/package/libsrtp/libsrtp.mk b/package/libsrtp/libsrtp.mk new file mode 100644 index 0000000000..40b85e69f3 --- /dev/null +++ b/package/libsrtp/libsrtp.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# libsrtp +# +################################################################################ + +LIBSRTP_VERSION = v1.5.4 +LIBSRTP_SITE = $(call github,cisco,libsrtp,$(LIBSRTP_VERSION)) +LIBSRTP_INSTALL_STAGING = YES +LIBSRTP_LICENSE = BSD-3c +LIBSRTP_LICENSE_FILES = LICENSE + +ifeq ($(BR2_STATIC_LIBS),y) +LIBSRTP_MAKE_OPTS = libsrtp.a +else ifeq ($(BR2_SHARED_LIBS),y) +LIBSRTP_MAKE_OPTS = shared_library +else +LIBSRTP_MAKE_OPTS = libsrtp.a shared_library +endif + +# While libsrtp is not using pkg-config itself, it checks if +# pkg-config is available to determine whether it should install +# libsrtp.pc. Since installing it seems useful, let's depend on +# host-pkgconf to make sure pkg-config is installed. +LIBSRTP_DEPENDENCIES = host-pkgconf + +# openssl handling needs libdl support +ifeq ($(BR2_PACKAGE_OPENSSL)x$(BR2_STATIC_LIBS),yx) +LIBSRTP_DEPENDENCIES += openssl +LIBSRTP_CONF_OPTS += --enable-openssl +else +LIBSRTP_CONF_OPTS += --disable-openssl +endif + +$(eval $(autotools-package)) diff --git a/package/libssh/Config.in b/package/libssh/Config.in new file mode 100644 index 0000000000..3357fb9e92 --- /dev/null +++ b/package/libssh/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBSSH + bool "libssh" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS + # Either OpenSSL or libgcrypt are mandatory + select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL + help + libssh is a multiplatform C library implementing the SSHv2 + and SSHv1 protocol on client and server side. With libssh, + you can remotely execute programs, transfer files, use a + secure and transparent tunnel for your remote applications. + + http://www.libssh.org/ + +comment "libssh needs a toolchain w/ dynamic library, threads" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libssh/libssh.hash b/package/libssh/libssh.hash new file mode 100644 index 0000000000..1eef804e5c --- /dev/null +++ b/package/libssh/libssh.hash @@ -0,0 +1,4 @@ +# from https://red.libssh.org/projects/libssh/files/ +md5 05465da8004f3258db946346213209de libssh-0.7.3.tar.xz +# Locally calculated after checking signature on uncompressed libssh-0.7.3.tar +sha256 26ef46be555da21112c01e4b9f5e3abba9194485c8822ab55ba3d6496222af98 libssh-0.7.3.tar.xz diff --git a/package/libssh/libssh.mk b/package/libssh/libssh.mk new file mode 100644 index 0000000000..29bbf4e9f2 --- /dev/null +++ b/package/libssh/libssh.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# libssh +# +################################################################################ + +LIBSSH_VERSION = 0.7.3 +LIBSSH_SOURCE = libssh-$(LIBSSH_VERSION).tar.xz +LIBSSH_SITE = https://red.libssh.org/attachments/download/195 +LIBSSH_LICENSE = LGPLv2.1 +LIBSSH_LICENSE_FILES = COPYING +LIBSSH_INSTALL_STAGING = YES +LIBSSH_SUPPORTS_IN_SOURCE_BUILD = NO +LIBSSH_CONF_OPTS = \ + -DWITH_STACK_PROTECTOR=OFF \ + -DWITH_SERVER=OFF \ + -DWITH_EXAMPLES=OFF + +ifeq ($(BR2_PACKAGE_ZLIB),y) +LIBSSH_CONF_OPTS += -DWITH_ZLIB=ON +LIBSSH_DEPENDENCIES += zlib +else +LIBSSH_CONF_OPTS += -DWITH_ZLIB=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +LIBSSH_CONF_OPTS += -DWITH_GCRYPT=ON +LIBSSH_DEPENDENCIES += libgcrypt +else +LIBSSH_CONF_OPTS += -DWITH_GCRYPT=OFF +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBSSH_DEPENDENCIES += openssl +endif +endif + +$(eval $(cmake-package)) diff --git a/package/libssh2/Config.in b/package/libssh2/Config.in new file mode 100644 index 0000000000..017fd4061a --- /dev/null +++ b/package/libssh2/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBSSH2 + bool "libssh2" + select BR2_PACKAGE_LIBGCRYPT if !BR2_PACKAGE_OPENSSL + help + libssh2 is a client-side C library implementing the SSH2 + protocol as defined by Internet Drafts: SECSH-TRANS(22), + SECSH-USERAUTH(25), SECSH-CONNECTION(23), SECSH-ARCH(20), + SECSH-FILEXFER(06)*, SECSH-DHGEX(04), and SECSH-NUMBERS(10) + + http://www.libssh2.org/ diff --git a/package/libssh2/libssh2.hash b/package/libssh2/libssh2.hash new file mode 100644 index 0000000000..8f6268f3d3 --- /dev/null +++ b/package/libssh2/libssh2.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 e4561fd43a50539a8c2ceb37841691baf03ecb7daf043766da1b112e4280d584 libssh2-1.7.0.tar.gz diff --git a/package/libssh2/libssh2.mk b/package/libssh2/libssh2.mk new file mode 100644 index 0000000000..221fac473c --- /dev/null +++ b/package/libssh2/libssh2.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# libssh2 +# +################################################################################ + +LIBSSH2_VERSION = 1.7.0 +LIBSSH2_SITE = http://www.libssh2.org/download +LIBSSH2_LICENSE = BSD +LIBSSH2_LICENSE_FILES = COPYING +LIBSSH2_INSTALL_STAGING = YES +LIBSSH2_CONF_OPTS = --disable-examples-build + +# libssh2 must use either libgcrypt or OpenSSL +# Only select openssl if libgcrypt is not selected +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +LIBSSH2_DEPENDENCIES += libgcrypt +LIBSSH2_CONF_OPTS += --with-libgcrypt \ + --with-libgcrypt-prefix=$(STAGING_DIR)/usr \ + --without-openssl +# configure.ac forgets to link to dependent libraries of gcrypt breaking static +# linking +LIBSSH2_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/libgcrypt-config --libs`" +else +LIBSSH2_DEPENDENCIES += openssl +LIBSSH2_CONF_OPTS += --with-openssl \ + --with-libssl-prefix=$(STAGING_DIR)/usr \ + --without-libgcrypt +endif + +# Add zlib support if enabled +ifeq ($(BR2_PACKAGE_ZLIB),y) +LIBSSH2_DEPENDENCIES += zlib +LIBSSH2_CONF_OPTS += --with-libz \ + --with-libz-prefix=$(STAGING_DIR)/usr +else +LIBSSH2_CONF_OPTS += --without-libz +endif + +$(eval $(autotools-package)) diff --git a/package/libstrophe/0001-make-autoreconfable.patch b/package/libstrophe/0001-make-autoreconfable.patch new file mode 100644 index 0000000000..76ca6f25e8 --- /dev/null +++ b/package/libstrophe/0001-make-autoreconfable.patch @@ -0,0 +1,20 @@ +Make the package autoreconfigurable + +Signed-off-by: Denis Bodor +[Gustavo: update for 0.8.8] + +diff -Nura libstrophe-0.8.8.orig/m4/.empty libstrophe-0.8.8/m4/.empty +--- libstrophe-0.8.8.orig/m4/.empty 1969-12-31 21:00:00.000000000 -0300 ++++ libstrophe-0.8.8/m4/.empty 2015-09-23 19:29:37.893688227 -0300 +@@ -0,0 +1,2 @@ ++ ++ +diff -Nura libstrophe-0.8.8.orig/Makefile.am libstrophe-0.8.8/Makefile.am +--- libstrophe-0.8.8.orig/Makefile.am 2015-09-23 19:26:10.960492781 -0300 ++++ libstrophe-0.8.8/Makefile.am 2015-09-23 19:29:17.265970964 -0300 +@@ -1,4 +1,4 @@ +-AUTOMAKE_OPTIONS = subdir-objects ++AUTOMAKE_OPTIONS = subdir-objects foreign + + ACLOCAL_AMFLAGS = -I m4 + AM_CFLAGS = -g -Wall diff --git a/package/libstrophe/Config.in b/package/libstrophe/Config.in new file mode 100644 index 0000000000..55dc162b02 --- /dev/null +++ b/package/libstrophe/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBSTROPHE + bool "libstrophe" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBXML2 if !BR2_PACKAGE_EXPAT + depends on BR2_TOOLCHAIN_HAS_THREADS + help + libstrophe is a lightweight XMPP client library written in C. + It has minimal dependencies and is configurable for various + environments. It runs well on both Linux, Unix, and Windows + based platforms. + + https://github.com/strophe/libstrophe + +comment "libstrophe needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libstrophe/libstrophe.mk b/package/libstrophe/libstrophe.mk new file mode 100644 index 0000000000..60e29d38c3 --- /dev/null +++ b/package/libstrophe/libstrophe.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libstrophe +# +################################################################################ + +LIBSTROPHE_VERSION = 0.8.8 +LIBSTROPHE_SITE = $(call github,strophe,libstrophe,$(LIBSTROPHE_VERSION)) +LIBSTROPHE_DEPENDENCIES = openssl host-pkgconf +# Doesn't ship configure +LIBSTROPHE_AUTORECONF = YES +LIBSTROPHE_LICENSE = MIT or GPLv3 +LIBSTROPHE_LICENSE_FILES = MIT-LICENSE.txt GPL-LICENSE.txt +LIBSTROPHE_INSTALL_STAGING = YES +LIBSTROPHE_PATCH = https://github.com/msantos/libstrophe/commit/b08766c8e46956daba010044b00c97f78b598780.patch + +ifeq ($(BR2_PACKAGE_EXPAT),y) +# Passing --without-libxml2 doesn't work, due to how AC_ARG_WITH is +# used in configure.ac. As long as --with-libxml2 is *not* passed, the +# configure script assumes expat should be used. +LIBSTROPHE_DEPENDENCIES += expat +else +LIBSTROPHE_CONF_OPTS += --with-libxml2 +LIBSTROPHE_DEPENDENCIES += libxml2 +endif + +$(eval $(autotools-package)) diff --git a/package/libsvg-cairo/Config.in b/package/libsvg-cairo/Config.in new file mode 100644 index 0000000000..9577c69bf0 --- /dev/null +++ b/package/libsvg-cairo/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBSVG_CAIRO + bool "libsvg-cairo" + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_SVG + select BR2_PACKAGE_LIBSVG + help + Libsvg-cairo provides the ability to render SVG content from + files or buffers. All rendering is performed using the cairo + rendering library. + + http://cairographics.org diff --git a/package/libsvg-cairo/libsvg-cairo.hash b/package/libsvg-cairo/libsvg-cairo.hash new file mode 100644 index 0000000000..fba96def72 --- /dev/null +++ b/package/libsvg-cairo/libsvg-cairo.hash @@ -0,0 +1,5 @@ +# From http://cairographics.org/snapshots/libsvg-cairo-0.1.6.tar.gz.md5 +md5 d79da7b3a60ad8c8e4b902c9b3563047 libsvg-cairo-0.1.6.tar.gz + +# Locally calculated +sha256 a380be6a78ec2938100ce904363815a94068fca372c666b8cc82aa8711a0215c libsvg-cairo-0.1.6.tar.gz diff --git a/package/libsvg-cairo/libsvg-cairo.mk b/package/libsvg-cairo/libsvg-cairo.mk new file mode 100644 index 0000000000..28c914165f --- /dev/null +++ b/package/libsvg-cairo/libsvg-cairo.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libsvg-cairo +# +################################################################################ + +LIBSVG_CAIRO_VERSION = 0.1.6 +LIBSVG_CAIRO_SITE = http://cairographics.org/snapshots +LIBSVG_CAIRO_DEPENDENCIES = cairo libsvg +LIBSVG_CAIRO_INSTALL_STAGING = YES +LIBSVG_CAIRO_LICENSE = LGPLv2.1+ +LIBSVG_CAIRO_LICENSE_FILES = COPYING + +LIBSVG_CAIRO_CONF_OPTS = --without-x + +$(eval $(autotools-package)) diff --git a/package/libsvg/0001-fix-expat-static-declaration.patch b/package/libsvg/0001-fix-expat-static-declaration.patch new file mode 100644 index 0000000000..58ef286729 --- /dev/null +++ b/package/libsvg/0001-fix-expat-static-declaration.patch @@ -0,0 +1,33 @@ +Newer expat versions use different declarations of the following functions: + +static void _svg_parser_sax_start_element (); +static void _svg_parser_sax_end_element (); +static void _svg_parser_sax_characters (); + +We need to patch the libsvg source to not follow into a build error like + "static declaration of 'foo' follows non-static declaration" +and use the functions from the expat library instead from the libsvg source. + +Patch based on +http://oe-lite.org/redmine/projects/xorg/repository/revisions/c4df7951e846e1be718f37f2455696a1d0861f3d/entry/recipes/cairo/libsvg-0.1.4/gcc4_and_expat.patch + +Signed-off-by: Carsten Schoenert + +diff -bur libsvg-0.1.4~orig/src/svg_parser_expat.c libsvg-0.1.4/src/svg_parser_expat.c +--- libsvg-0.1.4~orig/src/svg_parser_expat.c 2005-02-14 11:26:26.000000000 -0600 ++++ libsvg-0.1.4/src/svg_parser_expat.c 2006-02-10 21:58:20.000000000 -0600 +@@ -30,6 +30,7 @@ + #include "svgint.h" + #include "svg_hash.h" + ++#ifndef LIBSVG_EXPAT + static void + _svg_parser_sax_start_element (void *closure, + const XML_Char *name, +@@ -43,6 +44,7 @@ + _svg_parser_sax_characters (void *closure, + const XML_Char *ch, + int len); ++#endif + + static void diff --git a/package/libsvg/0002-Fix-undefined-symbol-png_set_gray_1_2_4_to_8.patch b/package/libsvg/0002-Fix-undefined-symbol-png_set_gray_1_2_4_to_8.patch new file mode 100644 index 0000000000..d0bbeab074 --- /dev/null +++ b/package/libsvg/0002-Fix-undefined-symbol-png_set_gray_1_2_4_to_8.patch @@ -0,0 +1,32 @@ +From 213e5749947fad08d985eda8d06839efedda78ef Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 5 Mar 2015 21:42:52 +0100 +Subject: [PATCH] Fix undefined symbol png_set_gray_1_2_4_to_8 + +Since libpng-1.4.0 the function png_set_gray_1_2_4_to_8() was +removed, the replacement function is called +png_set_expand_gray_1_2_4_to_8() (see [1]). + +[1] http://libpng.sourceforge.net/ANNOUNCE-1.4.0.txt + +Signed-off-by: Peter Seiderer +--- + src/svg_image.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/svg_image.c b/src/svg_image.c +index cd8a95a..f256943 100755 +--- a/src/svg_image.c ++++ b/src/svg_image.c +@@ -271,7 +271,7 @@ _svg_image_read_png (const char *filename, + + /* expand gray bit depth if needed */ + if (color_type == PNG_COLOR_TYPE_GRAY && depth < 8) +- png_set_gray_1_2_4_to_8 (png); ++ png_set_expand_gray_1_2_4_to_8 (png); + + /* transform transparency to alpha */ + if (png_get_valid(png, info, PNG_INFO_tRNS)) +-- +2.1.4 + diff --git a/package/libsvg/Config.in b/package/libsvg/Config.in new file mode 100644 index 0000000000..741ef10c7a --- /dev/null +++ b/package/libsvg/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBSVG + bool "libsvg" + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBXML2 if !BR2_PACKAGE_EXPAT + help + Libsvg provides a parser for SVG content in files or buffers. + Libsvg does not do any rendering, but instead provides a + function-based interface that can be used by various rendering + engines. + + http://cairographics.org/snapshots/ diff --git a/package/libsvg/libsvg.hash b/package/libsvg/libsvg.hash new file mode 100644 index 0000000000..c5008491f1 --- /dev/null +++ b/package/libsvg/libsvg.hash @@ -0,0 +1,5 @@ +# From http://cairographics.org/snapshots/libsvg-0.1.4.tar.gz.md5 +md5 ce0715e3013f78506795fba16e8455d3 libsvg-0.1.4.tar.gz + +# Locally calculated +sha256 4c3bf9292e676a72b12338691be64d0f38cd7f2ea5e8b67fbbf45f1ed404bc8f libsvg-0.1.4.tar.gz diff --git a/package/libsvg/libsvg.mk b/package/libsvg/libsvg.mk new file mode 100644 index 0000000000..8b85d5a3d6 --- /dev/null +++ b/package/libsvg/libsvg.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libsvg +# +################################################################################ + +LIBSVG_VERSION = 0.1.4 +LIBSVG_SITE = http://cairographics.org/snapshots +LIBSVG_DEPENDENCIES = host-pkgconf libpng jpeg +LIBSVG_INSTALL_STAGING = YES +LIBSVG_LICENSE = LGPLv2+ +LIBSVG_LICENSE_FILES = COPYING + +# libsvg needs at last a XML parser +ifeq ($(BR2_PACKAGE_EXPAT),y) +LIBSVG_CONF_OPTS += --with-expat +LIBSVG_DEPENDENCIES += expat +else +LIBSVG_CONF_OPTS += --with-libxml2 +LIBSVG_DEPENDENCIES += libxml2 +endif + +$(eval $(autotools-package)) diff --git a/package/libsvgtiny/0001-disable-debug-printfs.patch b/package/libsvgtiny/0001-disable-debug-printfs.patch new file mode 100644 index 0000000000..72ed21ccfa --- /dev/null +++ b/package/libsvgtiny/0001-disable-debug-printfs.patch @@ -0,0 +1,125 @@ +svntiny: svntiny_gradient.c: only print debugging if GRADIENT_DEBUG is enabled + +Signed-off-by: Peter Korsgaard +--- + src/svgtiny_gradient.c | 23 ++++++++++++++++++++++- + 1 file changed, 22 insertions(+), 1 deletion(-) + +Index: libsvgtiny/src/svgtiny_gradient.c +=================================================================== +--- libsvgtiny.orig/src/svgtiny_gradient.c ++++ libsvgtiny/src/svgtiny_gradient.c +@@ -30,8 +30,9 @@ void svgtiny_find_gradient(const char *i + { + xmlNode *gradient; + ++#ifdef GRADIENT_DEBUG + fprintf(stderr, "svgtiny_find_gradient: id \"%s\"\n", id); +- ++#endif + state->linear_gradient_stop_count = 0; + state->gradient_x1 = "0%"; + state->gradient_y1 = "0%"; +@@ -47,13 +48,17 @@ void svgtiny_find_gradient(const char *i + + gradient = svgtiny_find_element_by_id( + (xmlNode *) state->document, id); ++#ifdef GRADIENT_DEBUG + fprintf(stderr, "gradient %p\n", (void *) gradient); ++#endif + if (!gradient) { + fprintf(stderr, "gradient \"%s\" not found\n", id); + return; + } + ++#ifdef GRADIENT_DEBUG + fprintf(stderr, "gradient name \"%s\"\n", gradient->name); ++#endif + if (strcmp((const char *) gradient->name, "linearGradient") == 0) { + svgtiny_parse_linear_gradient(gradient, state); + } +@@ -98,8 +103,10 @@ svgtiny_code svgtiny_parse_linear_gradie + return svgtiny_OUT_OF_MEMORY; + svgtiny_parse_transform(s, &a, &b, &c, &d, &e, &f); + free(s); ++#ifdef GRADIENT_DEBUG + fprintf(stderr, "transform %g %g %g %g %g %g\n", + a, b, c, d, e, f); ++#endif + state->gradient_transform.a = a; + state->gradient_transform.b = b; + state->gradient_transform.c = c; +@@ -143,7 +150,9 @@ svgtiny_code svgtiny_parse_linear_gradie + } + + if (offset != -1 && color != svgtiny_TRANSPARENT) { ++#ifdef GRADIENT_DEBUG + fprintf(stderr, "stop %g %x\n", offset, color); ++#endif + state->gradient_stop[i].offset = offset; + state->gradient_stop[i].color = color; + i++; +@@ -220,9 +229,11 @@ svgtiny_code svgtiny_add_path_linear_gra + #endif + + /* compute gradient vector */ ++#ifdef GRADIENT_DEBUG + fprintf(stderr, "x1 %s, y1 %s, x2 %s, y2 %s\n", + state->gradient_x1, state->gradient_y1, + state->gradient_x2, state->gradient_y2); ++#endif + if (!state->gradient_user_space_on_use) { + gradient_x0 = object_x0 + + svgtiny_parse_length(state->gradient_x1, +@@ -297,9 +308,11 @@ svgtiny_code svgtiny_add_path_linear_gra + + /* invert gradient transform for applying to vertices */ + svgtiny_invert_matrix(&state->gradient_transform.a, trans); ++#ifdef GRADIENT_DEBUG + fprintf(stderr, "inverse transform %g %g %g %g %g %g\n", + trans[0], trans[1], trans[2], trans[3], + trans[4], trans[5]); ++#endif + + /* compute points on the path for triangle vertices */ + /* r, r0, r1 are distance along gradient vector */ +@@ -372,8 +385,10 @@ svgtiny_code svgtiny_add_path_linear_gra + steps = ceilf(fabsf(r1 - r0) / 0.05); + if (steps == 0) + steps = 1; ++#ifdef GRADIENT_DEBUG + fprintf(stderr, "r0 %g, r1 %g, steps %i\n", + r0, r1, steps); ++#endif + + /* loop through intermediate points */ + for (z = 1; z != steps; z++) { +@@ -398,7 +413,9 @@ svgtiny_code svgtiny_add_path_linear_gra + r = ((x_trans - gradient_x0) * gradient_dx + + (y_trans - gradient_y0) * gradient_dy) / + gradient_norm_squared; ++#ifdef GRADIENT_DEBUG + fprintf(stderr, "(%g %g [%g]) ", x, y, r); ++#endif + point = svgtiny_list_push(pts); + if (!point) { + svgtiny_list_free(pts); +@@ -412,14 +429,18 @@ svgtiny_code svgtiny_add_path_linear_gra + min_pt = svgtiny_list_size(pts) - 1; + } + } ++#ifdef GRADIENT_DEBUG + fprintf(stderr, "\n"); ++#endif + + /* next segment start point is this segment end point */ + x0 = x1; + y0 = y1; + } ++#ifdef GRADIENT_DEBUG + fprintf(stderr, "pts size %i, min_pt %i, min_r %.3f\n", + svgtiny_list_size(pts), min_pt, min_r); ++#endif + + /* render triangles */ + stop_count = state->linear_gradient_stop_count; diff --git a/package/libsvgtiny/0002-create-builddir.patch b/package/libsvgtiny/0002-create-builddir.patch new file mode 100644 index 0000000000..a404d86bca --- /dev/null +++ b/package/libsvgtiny/0002-create-builddir.patch @@ -0,0 +1,15 @@ +svgtiny: create BUILDDIR before $(BUILDDIR)/src_colors.c + +Signed-off-by: Max Filippov +--- +--- libsvgtiny-12121/src/Makefile.orig 2014-06-17 15:30:21.765311434 +0400 ++++ libsvgtiny-12121/src/Makefile 2014-06-17 15:29:56.569909931 +0400 +@@ -3,7 +3,7 @@ + + SOURCES := $(SOURCES) $(BUILDDIR)/src_colors.c + +-$(BUILDDIR)/src_colors.c: src/colors.gperf ++$(BUILDDIR)/src_colors.c: src/colors.gperf $(BUILDDIR)/stamp + $(VQ)$(ECHO) " GPERF: $<" + $(Q)gperf --output-file=$@.tmp $< + # Hack for GCC 4.2 compatibility (gperf 3.0.4 solves this properly) diff --git a/package/libsvgtiny/0003-Remove-Werror.patch b/package/libsvgtiny/0003-Remove-Werror.patch new file mode 100644 index 0000000000..c8b0c0b9ef --- /dev/null +++ b/package/libsvgtiny/0003-Remove-Werror.patch @@ -0,0 +1,44 @@ +Remove -Werror from Makefile + +glibc-2.20 includes some changes to the include/features.h file +introduced by this commit: + + https://sourceware.org/git/?p=glibc.git;a=commit;h=ade40b10ff5fa59a318cf55b9d8414b758e8df78 + +Those changes make libsvgtiny fail because some warnings are thrown and +the build system is using the -Werror option. We disable this to be able +to build it, or otherwise we will see errors like this one: + +GPERF: src/colors.gperf +COMPILE: build-Linux-Linux-release-lib-static/src_colors.c +In file included from +/br/output/host/usr/mipsel-buildroot-linux-gnu/sysroot/usr/include/string.h:25:0, + from src/colors.gperf:16: +/br/output/host/usr/mipsel-buildroot-linux-gnu/sysroot/usr/include/features.h:148:3: +error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use +_DEFAULT_SOURCE" [-Werror=cpp] + +and this one: + +In file included from src/colors.gperf:18:0: +/home/ldap/vriera/work/mips-buildroots/mips32/output/build/libsvgtiny-12121/src/svgtiny_internal.h:71:0: +error: "strndup" redefined [-Werror] + +Signed-off-by: Vicente Olivert Riera + +diff -rup a/Makefile b/Makefile +--- a/Makefile 2010-01-03 23:37:39.000000000 +0000 ++++ b/Makefile 2014-12-11 11:35:37.241903884 +0000 +@@ -13,12 +13,6 @@ TESTRUNNER := $(ECHO) + WARNFLAGS := -Wall -W -Wundef -Wpointer-arith -Wcast-align \ + -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ + -Wmissing-declarations -Wnested-externs -pedantic +-# BeOS/Haiku/AmigaOS4 standard library headers create warnings +-ifneq ($(TARGET),beos) +- ifneq ($(TARGET),AmigaOS) +- WARNFLAGS := $(WARNFLAGS) -Werror +- endif +-endif + CFLAGS := -D_BSD_SOURCE -I$(CURDIR)/include/ \ + -I$(CURDIR)/src $(WARNFLAGS) $(CFLAGS) + ifneq ($(GCCVER),2) diff --git a/package/libsvgtiny/Config.in b/package/libsvgtiny/Config.in new file mode 100644 index 0000000000..836dec210e --- /dev/null +++ b/package/libsvgtiny/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBSVGTINY + bool "libsvgtiny" + select BR2_PACKAGE_LIBXML2 + help + Libsvgtiny is an implementation of SVG Tiny, written in C. + It is currently in development for use with NetSurf and is + intended to be suitable for use in other projects too. + + http://www.netsurf-browser.org/projects/libsvgtiny/ diff --git a/package/libsvgtiny/libsvgtiny.mk b/package/libsvgtiny/libsvgtiny.mk new file mode 100644 index 0000000000..acd08d72d5 --- /dev/null +++ b/package/libsvgtiny/libsvgtiny.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# libsvgtiny +# +################################################################################ + +LIBSVGTINY_SITE = http://git.netsurf-browser.org/libsvgtiny.git +LIBSVGTINY_SITE_METHOD = git +LIBSVGTINY_VERSION = ea9d99fc8b231c22d06168135e181d61f4eb2f06 +LIBSVGTINY_INSTALL_STAGING = YES +LIBSVGTINY_DEPENDENCIES = \ + libxml2 host-gperf host-pkgconf host-netsurf-buildsystem +LIBSVGTINY_LICENSE = MIT +LIBSVGTINY_LICENSE_FILES = README + +# The libsvgtiny build system cannot build both the shared and static +# libraries. So when the Buildroot configuration requests to build +# both the shared and static variants, we build only the shared one. +ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +LIBSVGTINY_COMPONENT_TYPE = lib-shared +else +LIBSVGTINY_COMPONENT_TYPE = lib-static +endif + +define LIBSVGTINY_CONFIGURE_CMDS + ln -sf $(HOST_DIR)/usr/share/netsurf-buildsystem $(@D)/build +endef + +define LIBSVGTINY_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) PREFIX=/usr \ + COMPONENT_TYPE=$(LIBSVGTINY_COMPONENT_TYPE) +endef + +define LIBSVGTINY_INSTALL_STAGING_CMDS + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) PREFIX=/usr DESTDIR=$(STAGING_DIR) \ + COMPONENT_TYPE=$(LIBSVGTINY_COMPONENT_TYPE) install +endef + +define LIBSVGTINY_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) \ + $(MAKE) -C $(@D) PREFIX=/usr DESTDIR=$(TARGET_DIR) \ + COMPONENT_TYPE=$(LIBSVGTINY_COMPONENT_TYPE) install +endef + +$(eval $(generic-package)) diff --git a/package/libsysfs/Config.in b/package/libsysfs/Config.in new file mode 100644 index 0000000000..e4e6f28ea1 --- /dev/null +++ b/package/libsysfs/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBSYSFS + bool "libsysfs" + help + These are a set of utilities built upon sysfs, a filesystem in + Linux 2.6 kernels that exposes a system's device tree. + + http://linux-diag.sourceforge.net/Sysfsutils.html diff --git a/package/libsysfs/libsysfs.hash b/package/libsysfs/libsysfs.hash new file mode 100644 index 0000000000..c419ed95d8 --- /dev/null +++ b/package/libsysfs/libsysfs.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e865de2c1f559fff0d3fc936e660c0efaf7afe662064f2fb97ccad1ec28d208a sysfsutils-2.1.0.tar.gz diff --git a/package/libsysfs/libsysfs.mk b/package/libsysfs/libsysfs.mk new file mode 100644 index 0000000000..fb0310fcb5 --- /dev/null +++ b/package/libsysfs/libsysfs.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libsysfs +# +################################################################################ + +LIBSYSFS_VERSION = 2.1.0 +LIBSYSFS_SITE = http://downloads.sourceforge.net/project/linux-diag/sysfsutils/$(LIBSYSFS_VERSION) +LIBSYSFS_SOURCE = sysfsutils-$(LIBSYSFS_VERSION).tar.gz +LIBSYSFS_INSTALL_STAGING = YES +LIBSYSFS_LICENSE = GPLv2 (utilities), LGPLv2.1+ (library) +LIBSYSFS_LICENSE_FILES = cmd/GPL lib/LGPL + +$(eval $(autotools-package)) diff --git a/package/libtasn1/Config.in b/package/libtasn1/Config.in new file mode 100644 index 0000000000..181fc69895 --- /dev/null +++ b/package/libtasn1/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBTASN1 + bool "libtasn1" + help + ASN.1 library + + http://www.gnu.org/software/libtasn1 diff --git a/package/libtasn1/libtasn1.hash b/package/libtasn1/libtasn1.hash new file mode 100644 index 0000000000..dc65210387 --- /dev/null +++ b/package/libtasn1/libtasn1.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 fa802fc94d79baa00e7397cedf29eb6827d4bd8b4dd77b577373577c93a8c513 libtasn1-4.8.tar.gz diff --git a/package/libtasn1/libtasn1.mk b/package/libtasn1/libtasn1.mk new file mode 100644 index 0000000000..c51d8c0072 --- /dev/null +++ b/package/libtasn1/libtasn1.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libtasn1 +# +################################################################################ + +LIBTASN1_VERSION = 4.8 +LIBTASN1_SITE = http://ftp.gnu.org/gnu/libtasn1 +LIBTASN1_DEPENDENCIES = host-bison +LIBTASN1_LICENSE = GPLv3+, LGPLv2.1+ +LIBTASN1_LICENSE_FILES = COPYING COPYING.LIB +LIBTASN1_INSTALL_STAGING = YES +# 'missing' fallback logic botched so disable it completely +LIBTASN1_CONF_ENV = MAKEINFO="true" + +$(eval $(autotools-package)) diff --git a/package/libtheora/0001-link-libtheoradec.patch b/package/libtheora/0001-link-libtheoradec.patch new file mode 100644 index 0000000000..c38d32bbbc --- /dev/null +++ b/package/libtheora/0001-link-libtheoradec.patch @@ -0,0 +1,21 @@ +libtheoraenc.so needs to be linked to libtheoradec.so in order to avoid + +symbol 'th_comment_query_count': can't resolve symbol in lib '/usr/lib/libtheoraenc.so.1' + +when starting Freeswitch. + +Patch downloaded from +http://www.sisyphus.ru/en/srpm/Sisyphus/libtheora/patches/0 + +Signed-off-by: Bernd Kuhls + +--- libtheora/lib/Makefile.am ++++ libtheora/lib/Makefile.am +@@ -153,6 +153,7 @@ libtheoraenc_la_SOURCES = \ + libtheoraenc_la_LDFLAGS = \ + -version-info @THENC_LIB_CURRENT@:@THENC_LIB_REVISION@:@THENC_LIB_AGE@ \ + @THEORAENC_LDFLAGS@ $(OGG_LIBS) ++libtheoraenc_la_LIBADD = libtheoradec.la + + libtheora_la_SOURCES = \ + $(decoder_sources) \ diff --git a/package/libtheora/0002-fix-autoreconf.patch b/package/libtheora/0002-fix-autoreconf.patch new file mode 100644 index 0000000000..dd3f473222 --- /dev/null +++ b/package/libtheora/0002-fix-autoreconf.patch @@ -0,0 +1,46 @@ +Fix broken autoreconf + +Downloaded from upstream git +https://git.xiph.org/?p=theora.git;a=commitdiff;h=28cc6dbd9b2a141df94f60993256a5fca368fa54 + +Signed-off-by: Bernd Kuhls + + +From: Tim Terriberry +Date: Fri, 20 May 2011 20:41:50 +0000 (+0000) +Subject: Make autoreconf -i -f work. +X-Git-Url: https://git.xiph.org/?p=theora.git;a=commitdiff_plain;h=28cc6dbd9b2a141df94f60993256a5fca368fa54 + +Make autoreconf -i -f work. + +Patch from David Schleef. + +svn path=/trunk/theora/; revision=17990 +--- + +diff --git a/Makefile.am b/Makefile.am +index 89fd753..1783857 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -4,6 +4,8 @@ + #AUTOMAKE_OPTIONS = foreign 1.7 dist-zip dist-bzip2 + AUTOMAKE_OPTIONS = foreign 1.11 dist-zip dist-xz + ++ACLOCAL_AMFLAGS=-I m4 ++ + if THEORA_ENABLE_EXAMPLES + EXAMPLES_DIR = examples + else +diff --git a/configure.ac b/configure.ac +index 1cbec1a..456b603 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -68,7 +68,7 @@ AC_LIBTOOL_WIN32_DLL + AM_PROG_LIBTOOL + + dnl Add parameters for aclocal +-AC_SUBST(ACLOCAL_AMFLAGS, "-I m4") ++AC_CONFIG_MACRO_DIR([m4]) + + dnl Check for doxygen + AC_ARG_ENABLE([doc], diff --git a/package/libtheora/Config.in b/package/libtheora/Config.in new file mode 100644 index 0000000000..bf20a50372 --- /dev/null +++ b/package/libtheora/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBTHEORA + bool "libtheora" + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBVORBIS + help + A library for the free and open video compression format "Theora" + from the Xiph.org Foundation. + + http://www.theora.org/ diff --git a/package/libtheora/libtheora.hash b/package/libtheora/libtheora.hash new file mode 100644 index 0000000000..daf245570a --- /dev/null +++ b/package/libtheora/libtheora.hash @@ -0,0 +1,2 @@ +# From http://downloads.xiph.org/releases/theora/SHA256SUMS +sha256 f36da409947aa2b3dcc6af0a8c2e3144bc19db2ed547d64e9171c59c66561c61 libtheora-1.1.1.tar.xz diff --git a/package/libtheora/libtheora.mk b/package/libtheora/libtheora.mk new file mode 100644 index 0000000000..11f9852eaf --- /dev/null +++ b/package/libtheora/libtheora.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# libtheora +# +################################################################################ + +LIBTHEORA_VERSION = 1.1.1 +LIBTHEORA_SOURCE = libtheora-$(LIBTHEORA_VERSION).tar.xz +LIBTHEORA_SITE = http://downloads.xiph.org/releases/theora +LIBTHEORA_INSTALL_STAGING = YES +# We're patching Makefile.am +LIBTHEORA_AUTORECONF = YES +LIBTHEORA_LICENSE = BSD-3c +LIBTHEORA_LICENSE_FILES = COPYING LICENSE + +LIBTHEORA_CONF_OPTS = \ + --disable-oggtest \ + --disable-vorbistest \ + --disable-sdltest \ + --disable-examples \ + --disable-spec + +LIBTHEORA_DEPENDENCIES = libogg libvorbis host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/libtirpc/0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch b/package/libtirpc/0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch new file mode 100644 index 0000000000..e51c5a44b2 --- /dev/null +++ b/package/libtirpc/0001-Disable-parts-of-TIRPC-requiring-NIS-support.patch @@ -0,0 +1,46 @@ +From 15adb318818f5d0ac609ef2b87643dd760487cb6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Mon, 20 Jul 2015 20:30:11 +0200 +Subject: [PATCH 1/1] Disable parts of TIRPC requiring NIS support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Thomas Petazzoni +[yann.morin.1998@free.fr: update for 0.3.1] +Signed-off-by: "Yann E. MORIN" +[joerg.krause@embedded.rocks: update for 0.3.2] +Signed-off-by: Jörg Krause +[peda@axentia.se: update for 1.0.1] +Signed-off-by: Peter Rosin +--- + src/Makefile.am | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 6cc567a..9834f9a 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -24,7 +24,7 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln + rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \ + svc_auth_des.c \ + svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \ +- auth_time.c auth_des.c authdes_prot.c debug.c ++ auth_des.c authdes_prot.c debug.c + + ## XDR + libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c +@@ -41,8 +41,8 @@ if GSS + libtirpc_la_CFLAGS = -DHAVE_RPCSEC_GSS $(GSSAPI_CFLAGS) + endif + +-libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c +-libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c ++#libtirpc_la_SOURCES += key_call.c key_prot_xdr.c getpublickey.c ++#libtirpc_la_SOURCES += netname.c netnamer.c rpcdname.c rtime.c + + CLEANFILES = cscope.* *~ + DISTCLEANFILES = Makefile.in +-- +2.4.6 + diff --git a/package/libtirpc/0002-uClibc-without-RPC-support-and-musl-does-not-install-rpcent.h.patch b/package/libtirpc/0002-uClibc-without-RPC-support-and-musl-does-not-install-rpcent.h.patch new file mode 100644 index 0000000000..643a57ed5a --- /dev/null +++ b/package/libtirpc/0002-uClibc-without-RPC-support-and-musl-does-not-install-rpcent.h.patch @@ -0,0 +1,33 @@ +From 7aa1fe6a0f9280571117c30c03c2cc521cd86ec3 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 23 Jun 2012 21:58:07 +0200 +Subject: [PATCH] uClibc without RPC support and musl does not install rpcent.h + +Signed-off-by: Thomas Petazzoni +[yann.morin.1998@free.fr: update for 0.3.1] +Signed-off-by: "Yann E. MORIN" +[joerg.krause@embedded.rocks: musl fix] +Signed-off-by: Jörg Krause +--- + tirpc/rpc/rpcent.h | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tirpc/rpc/rpcent.h b/tirpc/rpc/rpcent.h +index 147f909..4a58180 100644 +--- a/tirpc/rpc/rpcent.h ++++ b/tirpc/rpc/rpcent.h +@@ -48,8 +48,9 @@ + extern "C" { + #endif + +-/* These are defined in /usr/include/rpc/netdb.h */ +-#if !defined(__GLIBC__) ++/* These are defined in /usr/include/rpc/netdb.h, unless we are using ++ the C library without RPC support. */ ++#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__) + struct rpcent { + char *r_name; /* name of server for this rpc program */ + char **r_aliases; /* alias list */ +-- +1.9.1 + diff --git a/package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch b/package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch new file mode 100644 index 0000000000..1cf861417c --- /dev/null +++ b/package/libtirpc/0003-Add-rpcgen-program-from-nfs-utils-sources.patch @@ -0,0 +1,6508 @@ +From 866b651bcb9f93f47582e5e2e4f1eb3155025298 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 16:21:01 +0100 +Subject: [PATCH] Add rpcgen program from nfs-utils sources + +Signed-off-by: Thomas Petazzoni +[yann.morin.1998@free.fr: update for 0.3.1] +Signed-off-by: "Yann E. MORIN" +--- + Makefile.am | 2 +- + configure.ac | 14 +- + rpcgen/Makefile.am | 22 ++ + rpcgen/rpc_clntout.c | 217 ++++++++++ + rpcgen/rpc_cout.c | 706 +++++++++++++++++++++++++++++++++ + rpcgen/rpc_hout.c | 490 +++++++++++++++++++++++ + rpcgen/rpc_main.c | 1067 ++++++++++++++++++++++++++++++++++++++++++++++++++ + rpcgen/rpc_output.h | 16 + + rpcgen/rpc_parse.c | 609 ++++++++++++++++++++++++++++ + rpcgen/rpc_parse.h | 166 ++++++++ + rpcgen/rpc_sample.c | 247 ++++++++++++ + rpcgen/rpc_scan.c | 474 ++++++++++++++++++++++ + rpcgen/rpc_scan.h | 103 +++++ + rpcgen/rpc_svcout.c | 882 +++++++++++++++++++++++++++++++++++++++++ + rpcgen/rpc_tblout.c | 165 ++++++++ + rpcgen/rpc_util.c | 479 ++++++++++++++++++++++ + rpcgen/rpc_util.h | 166 ++++++++ + rpcgen/rpcgen.1 | 521 ++++++++++++++++++++++++ + 18 files changed, 6344 insertions(+), 2 deletions(-) + create mode 100644 rpcgen/Makefile.am + create mode 100644 rpcgen/rpc_clntout.c + create mode 100644 rpcgen/rpc_cout.c + create mode 100644 rpcgen/rpc_hout.c + create mode 100644 rpcgen/rpc_main.c + create mode 100644 rpcgen/rpc_output.h + create mode 100644 rpcgen/rpc_parse.c + create mode 100644 rpcgen/rpc_parse.h + create mode 100644 rpcgen/rpc_sample.c + create mode 100644 rpcgen/rpc_scan.c + create mode 100644 rpcgen/rpc_scan.h + create mode 100644 rpcgen/rpc_svcout.c + create mode 100644 rpcgen/rpc_tblout.c + create mode 100644 rpcgen/rpc_util.c + create mode 100644 rpcgen/rpc_util.h + create mode 100644 rpcgen/rpcgen.1 + +diff --git a/Makefile.am b/Makefile.am +index 466b6dd..8558289 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = src man doc ++SUBDIRS = src man doc rpcgen + ACLOCAL_AMFLAGS = -I m4 + + noinst_HEADERS = tirpc/reentrant.h \ +diff --git a/configure.ac b/configure.ac +index e3cb8af..0ea2e6e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -58,6 +58,18 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netine + AC_CHECK_LIB([pthread], [pthread_create]) + AC_CHECK_FUNCS([getrpcbyname getrpcbynumber setrpcent endrpcent getrpcent]) + +-AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile]) ++AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes) ++ ++AC_MSG_CHECKING([for a C compiler for build tools]) ++if test $cross_compiling = yes; then ++ AC_CHECK_PROGS(CC_FOR_BUILD, gcc cc) ++else ++ CC_FOR_BUILD=$CC ++fi ++AC_MSG_RESULT([$CC_FOR_BUILD]) ++AC_SUBST(CC_FOR_BUILD) ++ ++AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile rpcgen/Makefile]) ++ + AC_OUTPUT(libtirpc.pc) + +diff --git a/rpcgen/Makefile.am b/rpcgen/Makefile.am +new file mode 100644 +index 0000000..2277b6f +--- /dev/null ++++ b/rpcgen/Makefile.am +@@ -0,0 +1,22 @@ ++COMPILE = $(CC_FOR_BUILD) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ ++ $(CPPFLAGS_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) ++LINK = $(CC_FOR_BUILD) $(AM_CFLAGS) $(CFLAGS_FOR_BUILD) $(AM_LDFLAGS) $(LDFLAGS_FOR_BUILD) -o $@ ++ ++noinst_PROGRAMS = rpcgen ++ ++rpcgen_SOURCES = \ ++ rpc_clntout.c \ ++ rpc_cout.c \ ++ rpc_hout.c \ ++ rpc_main.c \ ++ rpc_parse.c \ ++ rpc_sample.c \ ++ rpc_scan.c \ ++ rpc_svcout.c \ ++ rpc_tblout.c \ ++ rpc_util.c \ ++ rpc_parse.h \ ++ rpc_scan.h \ ++ rpc_util.h ++ ++dist_man1_MANS = rpcgen.1 +diff --git a/rpcgen/rpc_clntout.c b/rpcgen/rpc_clntout.c +new file mode 100644 +index 0000000..e2f4382 +--- /dev/null ++++ b/rpcgen/rpc_clntout.c +@@ -0,0 +1,217 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_clntout.c 1.11 89/02/22 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_clntout.c, Client-stub outputter for the RPC protocol compiler ++ * Copyright (C) 1987, Sun Microsytsems, Inc. ++ */ ++#include ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++#include "rpc_output.h" ++ ++/* extern pdeclaration(); */ ++/* void printarglist(); */ ++ ++#define DEFAULT_TIMEOUT 25 /* in seconds */ ++static char RESULT[] = "clnt_res"; ++ ++static void write_program(definition *def); ++static void printbody(proc_list *proc); ++ ++ ++void ++write_stubs(void) ++{ ++ list *l; ++ definition *def; ++ ++ f_print(fout, ++ "\n/* Default timeout can be changed using clnt_control() */\n"); ++ f_print(fout, "static struct timeval TIMEOUT = { %d, 0 };\n", ++ DEFAULT_TIMEOUT); ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind == DEF_PROGRAM) { ++ write_program(def); ++ } ++ } ++} ++ ++static void ++write_program(definition *def) ++{ ++ version_list *vp; ++ proc_list *proc; ++ ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ f_print(fout, "\n"); ++ ptype(proc->res_prefix, proc->res_type, 1); ++ f_print(fout, "*\n"); ++ pvname(proc->proc_name, vp->vers_num); ++ printarglist(proc, "clnt", "CLIENT *"); ++ f_print(fout, "{\n"); ++ printbody(proc); ++ f_print(fout, "}\n"); ++ } ++ } ++} ++ ++/* ++ * Writes out declarations of procedure's argument list. ++ * In either ANSI C style, in one of old rpcgen style (pass by reference), ++ * or new rpcgen style (multiple arguments, pass by value); ++ */ ++ ++/* sample addargname = "clnt"; sample addargtype = "CLIENT * " */ ++ ++void ++printarglist(proc_list *proc, char *addargname, char *addargtype) ++{ ++ ++ decl_list *l; ++ ++ if (!newstyle) { /* old style: always pass arg by reference */ ++ if (Cflag) { /* C++ style heading */ ++ f_print(fout, "("); ++ ptype(proc->args.decls->decl.prefix, proc->args.decls->decl.type, 1); ++ f_print(fout, "*argp, %s%s)\n", addargtype, addargname); ++ } else { ++ f_print(fout, "(argp, %s)\n", addargname); ++ f_print(fout, "\t"); ++ ptype(proc->args.decls->decl.prefix, proc->args.decls->decl.type, 1); ++ f_print(fout, "*argp;\n"); ++ } ++ } else if (streq(proc->args.decls->decl.type, "void")) { ++ /* newstyle, 0 argument */ ++ if (Cflag) ++ f_print(fout, "(%s%s)\n", addargtype, addargname); ++ else ++ f_print(fout, "(%s)\n", addargname); ++ } else { ++ /* new style, 1 or multiple arguments */ ++ if (!Cflag) { ++ f_print(fout, "("); ++ for (l = proc->args.decls; l != NULL; l = l->next) ++ f_print(fout, "%s, ", l->decl.name); ++ f_print(fout, "%s)\n", addargname); ++ for (l = proc->args.decls; l != NULL; l = l->next) { ++ pdeclaration(proc->args.argname, &l->decl, 1, ";\n"); ++ } ++ } else { /* C++ style header */ ++ f_print(fout, "("); ++ for (l = proc->args.decls; l != NULL; l = l->next) { ++ pdeclaration(proc->args.argname, &l->decl, 0, ", "); ++ } ++ f_print(fout, " %s%s)\n", addargtype, addargname); ++ } ++ } ++ ++ if (!Cflag) ++ f_print(fout, "\t%s%s;\n", addargtype, addargname); ++} ++ ++ ++ ++static char * ++ampr(char *type) ++{ ++ if (isvectordef(type, REL_ALIAS)) { ++ return (""); ++ } else { ++ return ("&"); ++ } ++} ++ ++static void ++printbody(proc_list *proc) ++{ ++ decl_list *l; ++ bool_t args2 = (proc->arg_num > 1); ++ ++ /* For new style with multiple arguments, need a structure in which ++ * to stuff the arguments. */ ++ if (newstyle && args2) { ++ f_print(fout, "\t%s", proc->args.argname); ++ f_print(fout, " arg;\n"); ++ } ++ f_print(fout, "\tstatic "); ++ if (streq(proc->res_type, "void")) { ++ f_print(fout, "char "); ++ } else { ++ ptype(proc->res_prefix, proc->res_type, 0); ++ } ++ f_print(fout, "%s;\n", RESULT); ++ f_print(fout, "\n"); ++ f_print(fout, "\tmemset((char *)%s%s, 0, sizeof(%s));\n", ++ ampr(proc->res_type), RESULT, RESULT); ++ if (newstyle && !args2 && (streq(proc->args.decls->decl.type, "void"))) { ++ /* newstyle, 0 arguments */ ++ f_print(fout, ++ "\tif (clnt_call(clnt, %s, (xdrproc_t) xdr_void, (caddr_t) NULL, " ++ "(xdrproc_t) xdr_%s, (caddr_t) %s%s, TIMEOUT) != RPC_SUCCESS) {\n", ++ proc->proc_name, ++ stringfix(proc->res_type), ampr(proc->res_type), RESULT); ++ ++ } else if (newstyle && args2) { ++ /* newstyle, multiple arguments: stuff arguments into structure */ ++ for (l = proc->args.decls; l != NULL; l = l->next) { ++ f_print(fout, "\targ.%s = %s;\n", ++ l->decl.name, l->decl.name); ++ } ++ f_print(fout, ++ "\tif (clnt_call(clnt, %s, (xdrproc_t) xdr_%s, (caddr_t) &arg, " ++ "(xdrproc_t) xdr_%s, (caddr_t) %s%s, TIMEOUT) != RPC_SUCCESS) {\n", ++ proc->proc_name, proc->args.argname, ++ stringfix(proc->res_type), ampr(proc->res_type), RESULT); ++ } else { /* single argument, new or old style */ ++ f_print(fout, ++ "\tif (clnt_call(clnt, %s, (xdrproc_t) xdr_%s, " ++ "(caddr_t) %s%s, (xdrproc_t) xdr_%s, (caddr_t) %s%s, TIMEOUT) != RPC_SUCCESS) {\n", ++ proc->proc_name, ++ stringfix(proc->args.decls->decl.type), ++ (newstyle ? "&" : ""), ++ (newstyle ? proc->args.decls->decl.name : "argp"), ++ stringfix(proc->res_type), ampr(proc->res_type), RESULT); ++ } ++ f_print(fout, "\t\treturn (NULL);\n"); ++ f_print(fout, "\t}\n"); ++ if (streq(proc->res_type, "void")) { ++ f_print(fout, "\treturn ((void *)%s%s);\n", ++ ampr(proc->res_type), RESULT); ++ } else { ++ f_print(fout, "\treturn (%s%s);\n", ampr(proc->res_type), RESULT); ++ } ++} +diff --git a/rpcgen/rpc_cout.c b/rpcgen/rpc_cout.c +new file mode 100644 +index 0000000..a61214f +--- /dev/null ++++ b/rpcgen/rpc_cout.c +@@ -0,0 +1,706 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_cout.c, XDR routine outputter for the RPC protocol compiler ++ */ ++#include ++#include ++#include ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++ ++static int findtype(definition *def, char *type); ++static int undefined(char *type); ++static void print_generic_header(char *procname, int pointerp); ++static void print_header(definition *def); ++static void print_prog_header(proc_list *plist); ++static void print_trailer(void); ++static void print_ifopen(int indent, char *name); ++static void print_ifarg(char *arg); ++static void print_ifsizeof(char *prefix, char *type); ++static void print_ifclose(int indent); ++static void print_ifstat(int indent, char *prefix, char *type, relation rel, ++ char *amax, char *objname, char *name); ++static void emit_enum(definition *def); ++static void emit_program(definition *def); ++static void emit_union(definition *def); ++static void emit_struct(definition *def); ++static void emit_typedef(definition *def); ++static void print_stat(int indent, declaration *dec); ++static void emit_inline(declaration *decl, int flag); ++static void emit_single_in_line(declaration *decl, int flag, relation rel); ++static char * upcase(char *str); ++ ++/* ++ * Emit the C-routine for the given definition ++ */ ++void ++emit(definition *def) ++{ ++ if (def->def_kind == DEF_CONST) { ++ return; ++ } ++ if (def->def_kind == DEF_PROGRAM) { ++ emit_program(def); ++ return; ++ } ++ if (def->def_kind == DEF_TYPEDEF) { ++ /* now we need to handle declarations like ++ * struct typedef foo foo; ++ * since we dont want this to be expanded into 2 calls ++ * to xdr_foo */ ++ ++ if (strcmp(def->def.ty.old_type, def->def_name) == 0) ++ return; ++ }; ++ ++ print_header(def); ++ switch (def->def_kind) { ++ case DEF_UNION: ++ emit_union(def); ++ break; ++ case DEF_ENUM: ++ emit_enum(def); ++ break; ++ case DEF_STRUCT: ++ emit_struct(def); ++ break; ++ case DEF_TYPEDEF: ++ emit_typedef(def); ++ break; ++ default: ++ break; ++ } ++ print_trailer(); ++} ++ ++static int ++findtype(definition *def, char *type) ++{ ++ ++ if (def->def_kind == DEF_PROGRAM || def->def_kind == DEF_CONST) { ++ return (0); ++ } else { ++ return (streq(def->def_name, type)); ++ } ++} ++ ++static int ++undefined(char *type) ++{ ++ definition *def; ++ ++ def = (definition *) FINDVAL(defined, type, findtype); ++ ++ return (def == NULL); ++} ++ ++ ++static void ++print_generic_header(char *procname, int pointerp) ++{ ++ f_print(fout, "\n"); ++ f_print(fout, "bool_t\n"); ++ if (Cflag) { ++ f_print(fout, "xdr_%s(", procname); ++ f_print(fout, "XDR *xdrs, "); ++ f_print(fout, "%s ", procname); ++ if (pointerp) ++ f_print(fout, "*"); ++ f_print(fout, "objp)\n{\n\n"); ++ } else { ++ f_print(fout, "xdr_%s(xdrs, objp)\n", procname); ++ f_print(fout, "\tXDR *xdrs;\n"); ++ f_print(fout, "\t%s ", procname); ++ if (pointerp) ++ f_print(fout, "*"); ++ f_print(fout, "objp;\n{\n\n"); ++ } ++} ++ ++static void ++print_header(definition *def) ++{ ++ print_generic_header(def->def_name, ++ def->def_kind != DEF_TYPEDEF || ++ !isvectordef(def->def.ty.old_type, def->def.ty.rel)); ++ ++ /* Now add Inline support */ ++ ++ ++ if (Inline == 0) ++ return; ++} ++ ++static void ++print_prog_header(proc_list *plist) ++{ ++ print_generic_header(plist->args.argname, 1); ++} ++ ++static void ++print_trailer(void) ++{ ++ f_print(fout, "\treturn (TRUE);\n"); ++ f_print(fout, "}\n"); ++} ++ ++ ++static void ++print_ifopen(int indent, char *name) ++{ ++ tabify(fout, indent); ++ f_print(fout, " if (!xdr_%s(xdrs", name); ++} ++ ++static void ++print_ifarg(char *arg) ++{ ++ f_print(fout, ", %s", arg); ++} ++ ++static void ++print_ifsizeof(char *prefix, char *type) ++{ ++ if (streq(type, "bool")) { ++ f_print(fout, ", sizeof(bool_t), (xdrproc_t)xdr_bool"); ++ } else { ++ f_print(fout, ", sizeof("); ++ if (undefined(type) && prefix) { ++ f_print(fout, "%s ", prefix); ++ } ++ f_print(fout, "%s), (xdrproc_t)xdr_%s", type, type); ++ } ++} ++ ++static void ++print_ifclose(int indent) ++{ ++ f_print(fout, ")) {\n"); ++ tabify(fout, indent); ++ f_print(fout, "\t return (FALSE);\n"); ++ tabify(fout, indent); ++ f_print(fout, " }\n"); ++} ++ ++static void ++print_ifstat(int indent, char *prefix, char *type, relation rel, ++ char *amax, char *objname, char *name) ++{ ++ char *alt = NULL; ++ ++ switch (rel) { ++ case REL_POINTER: ++ print_ifopen(indent, "pointer"); ++ print_ifarg("(char **)"); ++ f_print(fout, "%s", objname); ++ print_ifsizeof(prefix, type); ++ break; ++ case REL_VECTOR: ++ if (streq(type, "string")) { ++ alt = "string"; ++ } else if (streq(type, "opaque")) { ++ alt = "opaque"; ++ } ++ if (alt) { ++ print_ifopen(indent, alt); ++ print_ifarg(objname); ++ } else { ++ print_ifopen(indent, "vector"); ++ print_ifarg("(char *)"); ++ f_print(fout, "%s", objname); ++ } ++ print_ifarg(amax); ++ if (!alt) { ++ print_ifsizeof(prefix, type); ++ } ++ break; ++ case REL_ARRAY: ++ if (streq(type, "string")) { ++ alt = "string"; ++ } else if (streq(type, "opaque")) { ++ alt = "bytes"; ++ } ++ if (streq(type, "string")) { ++ print_ifopen(indent, alt); ++ print_ifarg(objname); ++ } else { ++ if (alt) { ++ print_ifopen(indent, alt); ++ } else { ++ print_ifopen(indent, "array"); ++ } ++ /* The (void*) avoids a gcc-4.1 warning */ ++ print_ifarg("(char **)(void*)"); ++ if (*objname == '&') { ++ f_print(fout, "%s.%s_val, (u_int *)%s.%s_len", ++ objname, name, objname, name); ++ } else { ++ f_print(fout, "&%s->%s_val, (u_int *)&%s->%s_len", ++ objname, name, objname, name); ++ } ++ } ++ print_ifarg(amax); ++ if (!alt) { ++ print_ifsizeof(prefix, type); ++ } ++ break; ++ case REL_ALIAS: ++ print_ifopen(indent, type); ++ print_ifarg(objname); ++ break; ++ } ++ print_ifclose(indent); ++} ++ ++static void ++emit_enum(definition *def) ++{ ++ print_ifopen(1, "enum"); ++ print_ifarg("(enum_t *)objp"); ++ print_ifclose(1); ++} ++ ++static void ++emit_program(definition *def) ++{ ++ decl_list *dl; ++ version_list *vlist; ++ proc_list *plist; ++ ++ for (vlist = def->def.pr.versions; vlist != NULL; vlist = vlist->next) ++ for (plist = vlist->procs; plist != NULL; plist = plist->next) { ++ if (!newstyle || plist->arg_num < 2) ++ continue;/* old style, or single argument */ ++ print_prog_header(plist); ++ for (dl = plist->args.decls; dl != NULL; dl = dl->next) ++ print_stat(1, &dl->decl); ++ print_trailer(); ++ } ++} ++ ++ ++static void ++emit_union(definition *def) ++{ ++ declaration *dflt; ++ case_list *cl; ++ declaration *cs; ++ char *object; ++ char *vecformat = "objp->%s_u.%s"; ++ char *format = "&objp->%s_u.%s"; ++ ++ print_stat(1,&def->def.un.enum_decl); ++ f_print(fout, "\tswitch (objp->%s) {\n", def->def.un.enum_decl.name); ++ for (cl = def->def.un.cases; cl != NULL; cl = cl->next) { ++ ++ f_print(fout, "\tcase %s:\n", cl->case_name); ++ if(cl->contflag == 1) /* a continued case statement */ ++ continue; ++ cs = &cl->case_decl; ++ if (!streq(cs->type, "void")) { ++ object = alloc(strlen(def->def_name) + strlen(format) + ++ strlen(cs->name) + 1); ++ if (isvectordef (cs->type, cs->rel)) { ++ s_print(object, vecformat, def->def_name, ++ cs->name); ++ } else { ++ s_print(object, format, def->def_name, ++ cs->name); ++ } ++ print_ifstat(2, cs->prefix, cs->type, cs->rel, cs->array_max, ++ object, cs->name); ++ free(object); ++ } ++ f_print(fout, "\t\tbreak;\n"); ++ } ++ dflt = def->def.un.default_decl; ++ if (dflt != NULL) { ++ if (!streq(dflt->type, "void")) { ++ f_print(fout, "\tdefault:\n"); ++ object = alloc(strlen(def->def_name) + strlen(format) + ++ strlen(dflt->name) + 1); ++ if (isvectordef (dflt->type, dflt->rel)) { ++ s_print(object, vecformat, def->def_name, ++ dflt->name); ++ } else { ++ s_print(object, format, def->def_name, ++ dflt->name); ++ } ++ ++ print_ifstat(2, dflt->prefix, dflt->type, dflt->rel, ++ dflt->array_max, object, dflt->name); ++ free(object); ++ f_print(fout, "\t\tbreak;\n"); ++ } else { ++ /* Avoid gcc warnings about `value not handled in switch' */ ++ f_print(fout, "\tdefault:\n"); ++ f_print(fout, "\t\tbreak;\n"); ++ } ++ } else { ++ f_print(fout, "\tdefault:\n"); ++ f_print(fout, "\t\treturn (FALSE);\n"); ++ } ++ ++ f_print(fout, "\t}\n"); ++} ++ ++static void ++emit_struct(definition *def) ++{ ++ decl_list *dl; ++ int i, j, size, flag; ++ decl_list *cur = NULL, *psav; ++ bas_type *ptr; ++ char *sizestr, *plus; ++ char ptemp[256]; ++ int can_inline; ++ const char *buf_declaration; ++ ++ ++ if (Inline == 0) { ++ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) ++ print_stat(1, &dl->decl); ++ } else { ++ size = 0; ++ can_inline = 0; ++ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) ++ if ((dl->decl.prefix == NULL) && ((ptr = find_type(dl->decl.type)) != NULL) && ((dl->decl.rel == REL_ALIAS) || (dl->decl.rel == REL_VECTOR))) { ++ ++ if (dl->decl.rel == REL_ALIAS) ++ size += ptr->length; ++ else { ++ can_inline = 1; ++ break; /* can be inlined */ ++ }; ++ } else { ++ if (size >= Inline) { ++ can_inline = 1; ++ break; /* can be inlined */ ++ } ++ size = 0; ++ } ++ if (size > Inline) ++ can_inline = 1; ++ ++ if (can_inline == 0) { /* can not inline, drop back to old mode */ ++ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) ++ print_stat(1, &dl->decl); ++ return; ++ }; ++ ++ ++ ++ ++ flag = PUT; ++ for (j = 0; j < 2; j++) { ++ ++ if (flag == PUT) ++ f_print(fout, "\n\t if (xdrs->x_op == XDR_ENCODE) {\n"); ++ else ++ f_print(fout, "\n \t return (TRUE);\n\t} else if (xdrs->x_op == XDR_DECODE) {\n"); ++ ++ ++ i = 0; ++ size = 0; ++ sizestr = NULL; ++ buf_declaration = "int32_t *"; ++ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) { /* xxx */ ++ ++ /* now walk down the list and check for basic types */ ++ if ((dl->decl.prefix == NULL) && ((ptr = find_type(dl->decl.type)) != NULL) && ((dl->decl.rel == REL_ALIAS) || (dl->decl.rel == REL_VECTOR))) { ++ if (i == 0) ++ cur = dl; ++ i++; ++ ++ if (dl->decl.rel == REL_ALIAS) ++ size += ptr->length; ++ else { ++ /* this is required to handle arrays */ ++ ++ if (sizestr == NULL) ++ plus = " "; ++ else ++ plus = "+"; ++ ++ if (ptr->length != 1) ++ s_print(ptemp, " %s %s * %d", plus, dl->decl.array_max, ptr->length); ++ else ++ s_print(ptemp, " %s %s ", plus, dl->decl.array_max); ++ ++ /*now concatenate to sizestr !!!! */ ++ if (sizestr == NULL) ++ sizestr = strdup(ptemp); ++ else { ++ sizestr = realloc(sizestr, strlen(sizestr) + strlen(ptemp) + 1); ++ if (sizestr == NULL) { ++ ++ f_print(stderr, "Fatal error : no memory \n"); ++ crash(); ++ }; ++ sizestr = strcat(sizestr, ptemp); /*build up length of array */ ++ ++ } ++ } ++ ++ } else { ++ if (i > 0) ++ { ++ if (sizestr == NULL && size < Inline) { ++ /* don't expand into inline code if size < inline */ ++ while (cur != dl) { ++ print_stat(1, &cur->decl); ++ cur = cur->next; ++ } ++ } else { ++ ++ ++ ++ /* were already looking at a xdr_inlineable structure */ ++ if (sizestr == NULL) ++ f_print(fout, "\t %sbuf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);", ++ buf_declaration, size); ++ else if (size == 0) ++ f_print(fout, ++ "\t %sbuf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);", ++ buf_declaration, sizestr); ++ else ++ f_print(fout, ++ "\t %sbuf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);", ++ buf_declaration, size, sizestr); ++ buf_declaration = ""; ++ ++ f_print(fout, "\n\t if (buf == NULL) {\n"); ++ ++ psav = cur; ++ while (cur != dl) { ++ print_stat(2, &cur->decl); ++ cur = cur->next; ++ } ++ ++ f_print(fout, "\n\t }\n\t else {\n"); ++ ++ cur = psav; ++ while (cur != dl) { ++ emit_inline(&cur->decl, flag); ++ cur = cur->next; ++ } ++ ++ f_print(fout, "\t }\n"); ++ } ++ } ++ size = 0; ++ i = 0; ++ sizestr = NULL; ++ print_stat(1, &dl->decl); ++ } ++ ++ } ++ if (i > 0) ++ { ++ if (sizestr == NULL && size < Inline) { ++ /* don't expand into inline code if size < inline */ ++ while (cur != dl) { ++ print_stat(1, &cur->decl); ++ cur = cur->next; ++ } ++ } else { ++ ++ /* were already looking at a xdr_inlineable structure */ ++ if (sizestr == NULL) ++ f_print(fout, "\t\t%sbuf = XDR_INLINE(xdrs,%d * BYTES_PER_XDR_UNIT);", ++ buf_declaration, size); ++ else if (size == 0) ++ f_print(fout, ++ "\t\t%sbuf = XDR_INLINE(xdrs,%s * BYTES_PER_XDR_UNIT);", ++ buf_declaration, sizestr); ++ else ++ f_print(fout, ++ "\t\t%sbuf = XDR_INLINE(xdrs,(%d + %s)* BYTES_PER_XDR_UNIT);", ++ buf_declaration, size, sizestr); ++ buf_declaration = ""; ++ ++ f_print(fout, "\n\t\tif (buf == NULL) {\n"); ++ ++ psav = cur; ++ while (cur != NULL) { ++ print_stat(2, &cur->decl); ++ cur = cur->next; ++ } ++ f_print(fout, "\n\t }\n\t else {\n"); ++ ++ cur = psav; ++ while (cur != dl) { ++ emit_inline(&cur->decl, flag); ++ cur = cur->next; ++ } ++ ++ f_print(fout, "\t }\n"); ++ ++ } ++ } ++ flag = GET; ++ } ++ f_print(fout, "\t return(TRUE);\n\t}\n\n"); ++ ++ /* now take care of XDR_FREE case */ ++ ++ for (dl = def->def.st.decls; dl != NULL; dl = dl->next) ++ print_stat(1, &dl->decl); ++ } ++} ++ ++ ++ ++ ++static void ++emit_typedef(definition *def) ++{ ++ char *prefix = def->def.ty.old_prefix; ++ char *type = def->def.ty.old_type; ++ char *amax = def->def.ty.array_max; ++ relation rel = def->def.ty.rel; ++ ++ ++ print_ifstat(1, prefix, type, rel, amax, "objp", def->def_name); ++} ++ ++static void ++print_stat(int indent, declaration *dec) ++{ ++ char *prefix = dec->prefix; ++ char *type = dec->type; ++ char *amax = dec->array_max; ++ relation rel = dec->rel; ++ char name[256]; ++ ++ if (isvectordef(type, rel)) { ++ s_print(name, "objp->%s", dec->name); ++ } else { ++ s_print(name, "&objp->%s", dec->name); ++ } ++ print_ifstat(indent, prefix, type, rel, amax, name, dec->name); ++} ++ ++ ++static void ++emit_inline(declaration *decl, int flag) ++{ ++ ++ /*check whether an array or not */ ++ ++ switch (decl->rel) { ++ case REL_ALIAS: ++ emit_single_in_line(decl, flag, REL_ALIAS); ++ break; ++ case REL_VECTOR: ++ f_print(fout, "\t\t{ register %s *genp; \n", decl->type); ++ f_print(fout, "\t\t int i;\n"); ++ f_print(fout, "\t\t for ( i = 0,genp=objp->%s;\n \t\t\ti < %s; i++){\n\t\t", ++ decl->name, decl->array_max); ++ emit_single_in_line(decl, flag, REL_VECTOR); ++ f_print(fout, "\t\t }\n\t\t };\n"); ++ break; ++ default: ++ break; ++ } ++} ++ ++static void ++emit_single_in_line(declaration *decl, int flag, relation rel) ++{ ++ char *upp_case; ++ int freed=0; ++ ++ if(flag == PUT) ++ f_print(fout,"\t\t (void) IXDR_PUT_"); ++ else ++ if(rel== REL_ALIAS) ++ f_print(fout,"\t\t objp->%s = IXDR_GET_",decl->name); ++ else ++ f_print(fout,"\t\t *genp++ = IXDR_GET_"); ++ ++ upp_case=upcase(decl->type); ++ ++ /* hack - XX */ ++ if(strcmp(upp_case,"INT") == 0) ++ { ++ free(upp_case); ++ freed=1; ++ upp_case="INT32"; ++ } ++ ++ if(strcmp(upp_case,"U_INT") == 0) ++ { ++ free(upp_case); ++ freed=1; ++ upp_case="U_INT32"; ++ } ++ ++ ++ if(flag == PUT) ++ if(rel== REL_ALIAS) ++ f_print(fout,"%s(buf,objp->%s);\n",upp_case,decl->name); ++ else ++ f_print(fout,"%s(buf,*genp++);\n",upp_case); ++ ++ else ++ f_print(fout,"%s(buf);\n",upp_case); ++ if(!freed) ++ free(upp_case); ++ ++} ++ ++ ++static char * ++upcase(char *str) ++{ ++ char *ptr, *hptr; ++ ++ ++ ptr = (char *) malloc(strlen(str)+1); ++ if (ptr == (char *) NULL) { ++ f_print(stderr, "malloc failed \n"); ++ exit(1); ++ }; ++ ++ hptr = ptr; ++ while (*str != '\0') ++ *ptr++ = toupper(*str++); ++ ++ *ptr = '\0'; ++ return (hptr); ++ ++} +diff --git a/rpcgen/rpc_hout.c b/rpcgen/rpc_hout.c +new file mode 100644 +index 0000000..ea1cb24 +--- /dev/null ++++ b/rpcgen/rpc_hout.c +@@ -0,0 +1,490 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_hout.c, Header file outputter for the RPC protocol compiler ++ */ ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++#include "rpc_output.h" ++ ++ ++static int undefined2(char *type, char *stop); ++static void pxdrfuncdecl(char *name, int pointerp); ++static void pconstdef(definition *def); ++static void pargdef(definition *def); ++static void pstructdef(definition *def); ++static void puniondef(definition *def); ++static void pdefine(char *name, char *num); ++static void puldefine(char *name, char *num); ++static int define_printed(proc_list *stop, version_list *start); ++static void pprogramdef(definition *def); ++static void pprocdef(proc_list *proc, version_list *vp, ++ char *addargtype, int server_p, int mode); ++static void parglist(proc_list *proc, char *addargtype); ++static void penumdef(definition *def); ++static void ptypedef(definition *def); ++ ++/* ++ * Print the C-version of an xdr definition ++ */ ++void ++print_datadef(definition *def) ++{ ++ ++ if (def->def_kind == DEF_PROGRAM ) /* handle data only */ ++ return; ++ ++ if (def->def_kind != DEF_CONST) { ++ f_print(fout, "\n"); ++ } ++ switch (def->def_kind) { ++ case DEF_STRUCT: ++ pstructdef(def); ++ break; ++ case DEF_UNION: ++ puniondef(def); ++ break; ++ case DEF_ENUM: ++ penumdef(def); ++ break; ++ case DEF_TYPEDEF: ++ ptypedef(def); ++ break; ++ case DEF_PROGRAM: ++ pprogramdef(def); ++ break; ++ case DEF_CONST: ++ pconstdef(def); ++ break; ++ } ++ if (def->def_kind != DEF_PROGRAM && def->def_kind != DEF_CONST) { ++ pxdrfuncdecl( def->def_name, ++ def->def_kind != DEF_TYPEDEF || ++ !isvectordef(def->def.ty.old_type, def->def.ty.rel)); ++ ++ } ++} ++ ++ ++void ++print_funcdef(definition *def) ++{ ++ switch (def->def_kind) { ++ case DEF_PROGRAM: ++ f_print(fout, "\n"); ++ pprogramdef(def); ++ break; ++ default: ++ break; ++ } ++} ++ ++static void ++pxdrfuncdecl(char *name, int pointerp) ++{ ++ f_print(fout, ++ "#ifdef __cplusplus \n" ++ "extern \"C\" bool_t xdr_%s(XDR *, %s%s);\n" ++ "#elif __STDC__ \n" ++ "extern bool_t xdr_%s(XDR *, %s%s);\n" ++ "#else /* Old Style C */ \n" ++ "bool_t xdr_%s();\n" ++ "#endif /* Old Style C */ \n\n", ++ name, name, pointerp ? "*" : "", ++ name, name, pointerp ? "*" : "", ++ name); ++} ++ ++ ++static void ++pconstdef(definition *def) ++{ ++ pdefine(def->def_name, def->def.co); ++} ++ ++/* print out the definitions for the arguments of functions in the ++ header file ++*/ ++static void ++pargdef(definition *def) ++{ ++ decl_list *l; ++ version_list *vers; ++ char *name; ++ proc_list *plist; ++ ++ ++ for (vers = def->def.pr.versions; vers != NULL; vers = vers->next) { ++ for(plist = vers->procs; plist != NULL; ++ plist = plist->next) { ++ ++ if (!newstyle || plist->arg_num < 2) { ++ continue; /* old style or single args */ ++ } ++ name = plist->args.argname; ++ f_print(fout, "struct %s {\n", name); ++ for (l = plist->args.decls; ++ l != NULL; l = l->next) { ++ pdeclaration(name, &l->decl, 1, ";\n" ); ++ } ++ f_print(fout, "};\n"); ++ f_print(fout, "typedef struct %s %s;\n", name, name); ++ pxdrfuncdecl(name, 0); ++ f_print( fout, "\n" ); ++ } ++ } ++ ++} ++ ++ ++static void ++pstructdef(definition *def) ++{ ++ decl_list *l; ++ char *name = def->def_name; ++ ++ f_print(fout, "struct %s {\n", name); ++ for (l = def->def.st.decls; l != NULL; l = l->next) { ++ pdeclaration(name, &l->decl, 1, ";\n"); ++ } ++ f_print(fout, "};\n"); ++ f_print(fout, "typedef struct %s %s;\n", name, name); ++} ++ ++static void ++puniondef(definition *def) ++{ ++ case_list *l; ++ char *name = def->def_name; ++ declaration *decl; ++ ++ f_print(fout, "struct %s {\n", name); ++ decl = &def->def.un.enum_decl; ++ if (streq(decl->type, "bool")) { ++ f_print(fout, "\tbool_t %s;\n", decl->name); ++ } else { ++ f_print(fout, "\t%s %s;\n", decl->type, decl->name); ++ } ++ f_print(fout, "\tunion {\n"); ++ for (l = def->def.un.cases; l != NULL; l = l->next) { ++ if (l->contflag == 0) ++ pdeclaration(name, &l->case_decl, 2, ";\n"); ++ } ++ decl = def->def.un.default_decl; ++ if (decl && !streq(decl->type, "void")) { ++ pdeclaration(name, decl, 2, ";\n"); ++ } ++ f_print(fout, "\t} %s_u;\n", name); ++ f_print(fout, "};\n"); ++ f_print(fout, "typedef struct %s %s;\n", name, name); ++} ++ ++static void ++pdefine(char *name, char *num) ++{ ++ f_print(fout, "#define %s %s\n", name, num); ++} ++ ++static void ++puldefine(char *name, char *num) ++{ ++ f_print(fout, "#define %s ((u_int32_t)%s)\n", name, num); ++} ++ ++static int ++define_printed(proc_list *stop, version_list *start) ++{ ++ version_list *vers; ++ proc_list *proc; ++ ++ for (vers = start; vers != NULL; vers = vers->next) { ++ for (proc = vers->procs; proc != NULL; proc = proc->next) { ++ if (proc == stop) { ++ return (0); ++ } else if (streq(proc->proc_name, stop->proc_name)) { ++ return (1); ++ } ++ } ++ } ++ abort(); ++ /* NOTREACHED */ ++} ++ ++static void ++pprogramdef(definition *def) ++{ ++ version_list *vers; ++ proc_list *proc; ++ int i; ++ char *ext; ++ ++ pargdef(def); ++ ++ puldefine(def->def_name, def->def.pr.prog_num); ++ for (vers = def->def.pr.versions; vers != NULL; vers = vers->next) { ++ if (tblflag) { ++ f_print(fout, "extern struct rpcgen_table %s_%s_table[];\n", ++ locase(def->def_name), vers->vers_num); ++ f_print(fout, "extern %s_%s_nproc;\n", ++ locase(def->def_name), vers->vers_num); ++ } ++ puldefine(vers->vers_name, vers->vers_num); ++ ++ /* ++ * Print out 3 definitions, one for ANSI-C, another for C++, ++ * a third for old style C ++ */ ++ ++ for (i = 0; i < 3; i++) { ++ if (i == 0) { ++ f_print(fout, "\n#ifdef __cplusplus\n"); ++ ext = "extern \"C\" "; ++ } else if (i == 1) { ++ f_print(fout, "\n#elif __STDC__\n"); ++ ext = "extern "; ++ } else { ++ f_print(fout, "\n#else /* Old Style C */ \n"); ++ ext = "extern "; ++ } ++ ++ ++ for (proc = vers->procs; proc != NULL; proc = proc->next) { ++ if (!define_printed(proc, def->def.pr.versions)) { ++ puldefine(proc->proc_name, proc->proc_num); ++ } ++ f_print(fout, "%s", ext); ++ pprocdef(proc, vers, "CLIENT *", 0, i); ++ f_print(fout, "%s", ext); ++ pprocdef(proc, vers, "struct svc_req *", 1, i); ++ ++ } ++ ++ } ++ f_print(fout, "#endif /* Old Style C */ \n"); ++ } ++} ++ ++static void ++pprocdef(proc_list *proc, version_list *vp, char *addargtype, ++ int server_p, int mode) ++{ ++ ptype(proc->res_prefix, proc->res_type, 1); ++ f_print(fout, "* "); ++ if (server_p) ++ pvname_svc(proc->proc_name, vp->vers_num); ++ else ++ pvname(proc->proc_name, vp->vers_num); ++ ++ /* ++ * mode 0 == cplusplus, mode 1 = ANSI-C, mode 2 = old style C ++ */ ++ if (mode == 0 || mode == 1) ++ parglist(proc, addargtype); ++ else ++ f_print(fout, "();\n"); ++} ++ ++ ++ ++/* print out argument list of procedure */ ++static void ++parglist(proc_list *proc, char *addargtype) ++{ ++ decl_list *dl; ++ ++ f_print(fout, "("); ++ ++ if (proc->arg_num < 2 && newstyle && ++ streq(proc->args.decls->decl.type, "void")) { ++ /* 0 argument in new style: do nothing */ ++ } else { ++ for (dl = proc->args.decls; dl != NULL; dl = dl->next) { ++ ptype(dl->decl.prefix, dl->decl.type, 1); ++ if (!newstyle) ++ f_print(fout, "*"); /* old style passes by reference */ ++ ++ f_print(fout, ", "); ++ } ++ } ++ ++ f_print(fout, "%s);\n", addargtype); ++} ++ ++static void ++penumdef(definition *def) ++{ ++ char *name = def->def_name; ++ enumval_list *l; ++ char *last = NULL; ++ int count = 0; ++ ++ f_print(fout, "enum %s {\n", name); ++ for (l = def->def.en.vals; l != NULL; l = l->next) { ++ f_print(fout, "\t%s", l->name); ++ if (l->assignment) { ++ f_print(fout, " = %s", l->assignment); ++ last = l->assignment; ++ count = 1; ++ } else { ++ if (last == NULL) { ++ f_print(fout, " = %d", count++); ++ } else { ++ f_print(fout, " = %s + %d", last, count++); ++ } ++ } ++ f_print(fout, ",\n"); ++ } ++ f_print(fout, "};\n"); ++ f_print(fout, "typedef enum %s %s;\n", name, name); ++} ++ ++static void ++ptypedef(definition *def) ++{ ++ char *name = def->def_name; ++ char *old = def->def.ty.old_type; ++ char prefix[8]; /* enough to contain "struct ", including NUL */ ++ relation rel = def->def.ty.rel; ++ ++ ++ if (!streq(name, old)) { ++ if (streq(old, "string")) { ++ old = "char"; ++ rel = REL_POINTER; ++ } else if (streq(old, "opaque")) { ++ old = "char"; ++ } else if (streq(old, "bool")) { ++ old = "bool_t"; ++ } ++ if (undefined2(old, name) && def->def.ty.old_prefix) { ++ s_print(prefix, "%s ", def->def.ty.old_prefix); ++ } else { ++ prefix[0] = 0; ++ } ++ f_print(fout, "typedef "); ++ switch (rel) { ++ case REL_ARRAY: ++ f_print(fout, "struct {\n"); ++ f_print(fout, "\tu_int %s_len;\n", name); ++ f_print(fout, "\t%s%s *%s_val;\n", prefix, old, name); ++ f_print(fout, "} %s", name); ++ break; ++ case REL_POINTER: ++ f_print(fout, "%s%s *%s", prefix, old, name); ++ break; ++ case REL_VECTOR: ++ f_print(fout, "%s%s %s[%s]", prefix, old, name, ++ def->def.ty.array_max); ++ break; ++ case REL_ALIAS: ++ f_print(fout, "%s%s %s", prefix, old, name); ++ break; ++ } ++ f_print(fout, ";\n"); ++ } ++} ++ ++void ++pdeclaration(char *name, declaration *dec, int tab, char *separator) ++{ ++ char buf[8]; /* enough to hold "struct ", include NUL */ ++ char *prefix; ++ char *type; ++ ++ if (streq(dec->type, "void")) { ++ return; ++ } ++ tabify(fout, tab); ++ if (streq(dec->type, name) && !dec->prefix) { ++ f_print(fout, "struct "); ++ } ++ if (streq(dec->type, "string")) { ++ f_print(fout, "char *%s", dec->name); ++ } else { ++ prefix = ""; ++ if (streq(dec->type, "bool")) { ++ type = "bool_t"; ++ } else if (streq(dec->type, "opaque")) { ++ type = "char"; ++ } else { ++ if (dec->prefix) { ++ s_print(buf, "%s ", dec->prefix); ++ prefix = buf; ++ } ++ type = dec->type; ++ } ++ switch (dec->rel) { ++ case REL_ALIAS: ++ f_print(fout, "%s%s %s", prefix, type, dec->name); ++ break; ++ case REL_VECTOR: ++ f_print(fout, "%s%s %s[%s]", prefix, type, dec->name, ++ dec->array_max); ++ break; ++ case REL_POINTER: ++ f_print(fout, "%s%s *%s", prefix, type, dec->name); ++ break; ++ case REL_ARRAY: ++ f_print(fout, "struct {\n"); ++ tabify(fout, tab); ++ f_print(fout, "\tu_int %s_len;\n", dec->name); ++ tabify(fout, tab); ++ f_print(fout, "\t%s%s *%s_val;\n", prefix, type, dec->name); ++ tabify(fout, tab); ++ f_print(fout, "} %s", dec->name); ++ break; ++ } ++ } ++ f_print(fout, separator ); ++} ++ ++static int ++undefined2(char *type, char *stop) ++{ ++ list *l; ++ definition *def; ++ ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind != DEF_PROGRAM) { ++ if (streq(def->def_name, stop)) { ++ return (1); ++ } else if (streq(def->def_name, type)) { ++ return (0); ++ } ++ } ++ } ++ return (1); ++} +diff --git a/rpcgen/rpc_main.c b/rpcgen/rpc_main.c +new file mode 100644 +index 0000000..28aa60c +--- /dev/null ++++ b/rpcgen/rpc_main.c +@@ -0,0 +1,1067 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_main.c, Top level of the RPC protocol compiler. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++#include "rpc_scan.h" ++ ++struct commandline { ++ int cflag; /* xdr C routines */ ++ int hflag; /* header file */ ++ int lflag; /* client side stubs */ ++ int mflag; /* server side stubs */ ++ int nflag; /* netid flag */ ++ int sflag; /* server stubs for the given transport */ ++ int tflag; /* dispatch Table file */ ++ int Ssflag; /* produce server sample code */ ++ int Scflag; /* produce client sample code */ ++ char *infile; /* input module name */ ++ char *outfile; /* output module name */ ++}; ++ ++static char * extendfile(char *file, char *ext); ++static void open_output(char *infile, char *outfile); ++static void add_warning(void); ++static void clear_args(void); ++static void open_input(char *infile, char *define); ++static int check_nettype(char *name, char **list_to_check); ++static void c_output(char *infile, char *define, int extend, char *outfile); ++static void c_initialize(void); ++static char * generate_guard(char *pathname); ++static void h_output(char *infile, char *define, int extend, char *outfile); ++static void s_output(int argc, char **argv, char *infile, ++ char *define, int extend, char *outfile, ++ int nomain, int netflag); ++static void l_output(char *infile, char *define, int extend, char *outfile); ++static void t_output(char *infile, char *define, int extend, char *outfile); ++static void svc_output(char *, char *, int, char *); ++static void clnt_output(char *, char *, int, char *); ++static int do_registers(int argc, char **argv); ++static void addarg(char *cp); ++static void putarg(int where, char *cp); ++static void checkfiles(char *infile, char *outfile); ++static int parseargs(int argc, char **argv, struct commandline *cmd); ++static void usage(void); ++static void options_usage(void); ++ ++/* ++extern void write_sample_svc(); ++int write_sample_clnt(); ++void write_sample_clnt_main(); ++ ++static svc_output(); ++ */ ++ ++#define EXTEND 1 /* alias for TRUE */ ++#define DONT_EXTEND 0 /* alias for FALSE */ ++ ++#define SVR4_CPP "/usr/ccs/lib/cpp" ++#define SUNOS_CPP "/lib/cpp" ++static int cppDefined = 0; /* explicit path for C preprocessor */ ++ ++ ++static char *cmdname; ++ ++static char *svcclosetime = "120"; ++static char *CPP = SVR4_CPP; ++static char CPPFLAGS[] = "-C"; ++static char pathbuf[MAXPATHLEN + 1]; ++static char *allv[] = { ++ "rpcgen", "-s", "udp", "-s", "tcp", ++}; ++static int allc = sizeof(allv)/sizeof(allv[0]); ++static char *allnv[] = { ++ "rpcgen", "-s", "netpath", ++}; ++static int allnc = sizeof(allnv)/sizeof(allnv[0]); ++ ++/* ++ * machinations for handling expanding argument list ++ */ ++#if 0 ++static void addarg(); /* add another argument to the list */ ++static void putarg(); /* put argument at specified location */ ++static void clear_args(); /* clear argument list */ ++static void checkfiles(); /* check if out file already exists */ ++#endif ++ ++ ++ ++#define ARGLISTLEN 20 ++#define FIXEDARGS 2 ++ ++static char *arglist[ARGLISTLEN]; ++static int argcount = FIXEDARGS; ++ ++ ++int nonfatalerrors; /* errors */ ++int inetdflag/* = 1*/; /* Support for inetd */ /* is now the default */ ++int pmflag; /* Support for port monitors */ ++int logflag; /* Use syslog instead of fprintf for errors */ ++int tblflag; /* Support for dispatch table file */ ++ ++/* length at which to start doing an inline */ ++#define INLINE 3 ++ ++int Inline = INLINE; /* length at which to start doing an inline. 3 = default ++ * if 0, no xdr_inline code */ ++ ++int indefinitewait; /* If started by port monitors, hang till it wants */ ++int exitnow; /* If started by port monitors, exit after the call */ ++int timerflag; /* TRUE if !indefinite && !exitnow */ ++int newstyle; /* newstyle of passing arguments (by value) */ ++int Cflag = 0 ; /* ANSI C syntax */ ++static int allfiles; /* generate all files */ ++#ifdef linux ++int tirpcflag = 0; /* no tirpc by default */ ++#else ++int tirpcflag = 1; /* generating code for tirpc, by default */ ++#endif ++ ++int ++main(int argc, char **argv) ++{ ++ struct commandline cmd; ++ ++ (void) memset((char *) &cmd, 0, sizeof(struct commandline)); ++ clear_args(); ++ if (!parseargs(argc, argv, &cmd)) ++ usage(); ++ ++ if (cmd.cflag || cmd.hflag || cmd.lflag || cmd.tflag || cmd.sflag || ++ cmd.mflag || cmd.nflag || cmd.Ssflag || cmd.Scflag) { ++ checkfiles(cmd.infile, cmd.outfile); ++ } else ++ checkfiles(cmd.infile, NULL); ++ ++ if (cmd.cflag) { ++ c_output(cmd.infile, "-DRPC_XDR", DONT_EXTEND, cmd.outfile); ++ } else if (cmd.hflag) { ++ h_output(cmd.infile, "-DRPC_HDR", DONT_EXTEND, cmd.outfile); ++ } else if (cmd.lflag) { ++ l_output(cmd.infile, "-DRPC_CLNT", DONT_EXTEND, cmd.outfile); ++ } else if (cmd.sflag || cmd.mflag || (cmd.nflag)) { ++ s_output(argc, argv, cmd.infile, "-DRPC_SVC", DONT_EXTEND, ++ cmd.outfile, cmd.mflag, cmd.nflag); ++ } else if (cmd.tflag) { ++ t_output(cmd.infile, "-DRPC_TBL", DONT_EXTEND, cmd.outfile); ++ } else if (cmd.Ssflag) { ++ svc_output(cmd.infile, "-DRPC_SERVER", DONT_EXTEND, cmd.outfile); ++ } else if (cmd.Scflag) { ++ clnt_output(cmd.infile, "-DRPC_CLIENT", DONT_EXTEND, cmd.outfile); ++ } else { ++ /* the rescans are required, since cpp may effect input */ ++ c_output(cmd.infile, "-DRPC_XDR", EXTEND, "_xdr.c"); ++ reinitialize(); ++ h_output(cmd.infile, "-DRPC_HDR", EXTEND, ".h"); ++ reinitialize(); ++ l_output(cmd.infile, "-DRPC_CLNT", EXTEND, "_clnt.c"); ++ reinitialize(); ++ if (inetdflag || !tirpcflag) ++ s_output(allc, allv, cmd.infile, "-DRPC_SVC", EXTEND, ++ "_svc.c", cmd.mflag, cmd.nflag); ++ else ++ s_output(allnc, allnv, cmd.infile, "-DRPC_SVC", ++ EXTEND, "_svc.c", cmd.mflag, cmd.nflag); ++ if (tblflag) { ++ reinitialize(); ++ t_output(cmd.infile, "-DRPC_TBL", EXTEND, "_tbl.i"); ++ } ++ if (allfiles) { ++ reinitialize(); ++ svc_output(cmd.infile, "-DRPC_SERVER", EXTEND, "_server.c"); ++ } ++ if (allfiles) { ++ reinitialize(); ++ clnt_output(cmd.infile, "-DRPC_CLIENT", EXTEND, "_client.c"); ++ } ++ } ++ exit(nonfatalerrors); ++ /* NOTREACHED */ ++} ++ ++/* ++ * add extension to filename ++ */ ++static char * ++extendfile(char *file, char *ext) ++{ ++ char *res; ++ char *p; ++ ++ res = alloc(strlen(file) + strlen(ext) + 1); ++ if (res == NULL) { ++ abort(); ++ } ++ p = strrchr(file, '.'); ++ if (p == NULL) { ++ p = file + strlen(file); ++ } ++ (void) strcpy(res, file); ++ (void) strcpy(res + (p - file), ext); ++ return (res); ++} ++ ++/* ++ * Open output file with given extension ++ */ ++static void ++open_output(char *infile, char *outfile) ++{ ++ ++ if (outfile == NULL) { ++ fout = stdout; ++ return; ++ } ++ ++ if (infile != NULL && streq(outfile, infile)) { ++ f_print(stderr, "%s: output would overwrite %s\n", cmdname, ++ infile); ++ crash(); ++ } ++ fout = fopen(outfile, "w"); ++ if (fout == NULL) { ++ f_print(stderr, "%s: unable to open ", cmdname); ++ perror(outfile); ++ crash(); ++ } ++ record_open(outfile); ++ ++} ++ ++static void ++add_warning(void) ++{ ++ f_print(fout, "/*\n"); ++ f_print(fout, " * Please do not edit this file.\n"); ++ f_print(fout, " * It was generated using rpcgen.\n"); ++ f_print(fout, " */\n\n"); ++} ++ ++/* clear list of arguments */ ++static void ++clear_args(void) ++{ ++ int i; ++ for( i=FIXEDARGS; i" : infile; ++ (void) pipe(pd); ++ switch (fork()) { ++ case 0: ++ putarg(0, "cpp"); ++ putarg(1, CPPFLAGS); ++ addarg(define); ++ addarg(infile); ++ addarg((char *)NULL); ++ (void) close(1); ++ (void) dup2(pd[1], 1); ++ (void) close(pd[0]); ++ if (cppDefined) ++ execv(CPP, arglist); ++ else { ++ execvp("cpp", arglist); ++ if (errno == ENOENT) ++ execvp(SVR4_CPP, arglist); ++ if (errno == ENOENT) ++ execvp(SUNOS_CPP, arglist); ++ } ++ perror("execv"); ++ exit(1); ++ case -1: ++ perror("fork"); ++ exit(1); ++ } ++ (void) close(pd[1]); ++ fin = fdopen(pd[0], "r"); ++ if (fin == NULL) { ++ f_print(stderr, "%s: ", cmdname); ++ perror(infilename); ++ crash(); ++ } ++} ++ ++/* valid tirpc nettypes */ ++static char* valid_ti_nettypes[] = ++{ ++ "netpath", ++ "visible", ++ "circuit_v", ++ "datagram_v", ++ "circuit_n", ++ "datagram_n", ++ "udp", ++ "tcp", ++ "raw", ++ NULL ++}; ++ ++/* valid inetd nettypes */ ++static char* valid_i_nettypes[] = ++{ ++ "udp", ++ "tcp", ++ NULL ++}; ++ ++static int ++check_nettype(char *name, char **list_to_check) ++{ ++ int i; ++ for( i = 0; list_to_check[i] != NULL; i++ ) { ++ if( strcmp( name, list_to_check[i] ) == 0 ) { ++ return 1; ++ } ++ } ++ f_print( stderr, "illegal nettype :\'%s\'\n", name ); ++ return 0; ++} ++ ++/* ++ * Compile into an XDR routine output file ++ */ ++ ++static void ++c_output(char *infile, char *define, int extend, char *outfile) ++{ ++ definition *def; ++ char *include; ++ char *outfilename; ++ long tell; ++ ++ c_initialize(); ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ open_output(infile, outfilename); ++ add_warning(); ++ if (infile && (include = extendfile(infile, ".h"))) { ++ f_print(fout, "#include \"%s\"\n", include); ++ free(include); ++ /* .h file already contains rpc/rpc.h */ ++ } else ++ f_print(fout, "#include \n"); ++ tell = ftell(fout); ++ while ((def = get_definition()) != NULL) { ++ emit(def); ++ } ++ if (extend && tell == ftell(fout)) { ++ (void) unlink(outfilename); ++ } ++} ++ ++ ++static void ++c_initialize(void) ++{ ++ ++ /* add all the starting basic types */ ++ ++ add_type(1,"int"); ++ add_type(1,"int32_t"); ++ add_type(1,"short"); ++ add_type(1,"bool"); ++ ++ add_type(1,"u_int"); ++ add_type(1,"u_int32_t"); ++ add_type(1,"u_short"); ++ ++} ++ ++char rpcgen_table_dcl[] = "struct rpcgen_table {\n\ ++ char *(*proc)();\n\ ++ xdrproc_t xdr_arg;\n\ ++ unsigned len_arg;\n\ ++ xdrproc_t xdr_res;\n\ ++ unsigned len_res;\n\ ++};\n"; ++ ++ ++static char * ++generate_guard(char *pathname) ++{ ++ char* filename, *guard, *tmp; ++ ++ filename = strrchr(pathname, '/' ); /* find last component */ ++ filename = ((filename == 0) ? pathname : filename+1); ++ guard = strdup(filename); ++ /* convert to upper case */ ++ tmp = guard; ++ while (*tmp) { ++ if (islower(*tmp)) ++ *tmp = toupper(*tmp); ++ tmp++; ++ } ++ ++ guard = extendfile(guard, "_H_RPCGEN"); ++ return( guard ); ++} ++ ++/* ++ * Compile into an XDR header file ++ */ ++static void ++h_output(char *infile, char *define, int extend, char *outfile) ++{ ++ definition *def; ++ char *outfilename; ++ long tell; ++ char *guard; ++ list *l; ++ ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ open_output(infile, outfilename); ++ add_warning(); ++ guard = generate_guard( outfilename ? outfilename: infile ); ++ ++ f_print(fout,"#ifndef _%s\n#define _%s\n\n", guard, ++ guard); ++ ++ f_print(fout, "#include \n\n"); ++ ++ f_print(fout, "#ifndef IXDR_GET_INT32\n"); ++ f_print(fout, "#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf))\n"); ++ f_print(fout, "#endif\n"); ++ f_print(fout, "#ifndef IXDR_PUT_INT32\n"); ++ f_print(fout, "#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v))\n"); ++ f_print(fout, "#endif\n"); ++ f_print(fout, "#ifndef IXDR_GET_U_INT32\n"); ++ f_print(fout, "#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf))\n"); ++ f_print(fout, "#endif\n"); ++ f_print(fout, "#ifndef IXDR_PUT_U_INT32\n"); ++ f_print(fout, "#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v))\n"); ++ f_print(fout, "#endif\n"); ++ ++ tell = ftell(fout); ++ /* print data definitions */ ++ while ((def = get_definition()) != NULL) { ++ print_datadef(def); ++ } ++ ++ /* print function declarations. ++ Do this after data definitions because they might be used as ++ arguments for functions */ ++ for (l = defined; l != NULL; l = l->next) { ++ print_funcdef(l->val); ++ } ++ if (extend && tell == ftell(fout)) { ++ (void) unlink(outfilename); ++ } else if (tblflag) { ++ f_print(fout, rpcgen_table_dcl); ++ } ++ f_print(fout, "\n#endif /* !_%s */\n", guard); ++} ++ ++/* ++ * Compile into an RPC service ++ */ ++static void ++s_output(int argc, char **argv, char *infile, char *define, int extend, ++ char *outfile, int nomain, int netflag) ++{ ++ char *include; ++ definition *def; ++ int foundprogram = 0; ++ char *outfilename; ++ ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ open_output(infile, outfilename); ++ add_warning(); ++ if (infile && (include = extendfile(infile, ".h"))) { ++ f_print(fout, "#include \"%s\"\n", include); ++ free(include); ++ } else ++ f_print(fout, "#include \n"); ++ ++ f_print(fout, "#include \n"); ++ f_print(fout, "#include /* getenv, exit */\n"); ++ if (Cflag) { ++ f_print (fout, "#include /* for pmap_unset */\n"); ++ f_print (fout, "#include /* strcmp */ \n"); ++ } ++ if (strcmp(svcclosetime, "-1") == 0) ++ indefinitewait = 1; ++ else if (strcmp(svcclosetime, "0") == 0) ++ exitnow = 1; ++ else if (inetdflag || pmflag) { ++ f_print(fout, "#include \n"); ++ timerflag = 1; ++ } ++ ++#ifndef linux ++ if( !tirpcflag && inetdflag ) ++ f_print(fout, "#include /* TIOCNOTTY */\n"); ++#else ++ if( !tirpcflag ) ++ f_print(fout, "#include /* TIOCNOTTY */\n"); ++#endif ++ if( Cflag && (inetdflag || pmflag ) ) { ++ f_print(fout, "#ifdef __cplusplus\n"); ++ f_print(fout, "#include /* getdtablesize, open */\n"); ++ f_print(fout, "#endif /* __cplusplus */\n"); ++ ++ if( tirpcflag ) ++ f_print(fout, "#include /* setsid */\n"); ++ } ++ if( tirpcflag ) ++ f_print(fout, "#include \n"); ++ ++ f_print(fout, "#include \n"); ++#ifndef linux ++ f_print(fout, "#include \n"); ++#endif ++ if (inetdflag || !tirpcflag ) { ++ f_print(fout, "#include \n"); ++ f_print(fout, "#include \n"); ++ } ++ ++ if ( (netflag || pmflag) && tirpcflag ) { ++ f_print(fout, "#include \n"); ++ } ++ if (/*timerflag &&*/ tirpcflag) ++ f_print(fout, "#include /* rlimit */\n"); ++ if (logflag || inetdflag || pmflag) { ++#ifdef linux ++ f_print(fout, "#include \n"); ++#else ++ f_print(fout, "#ifdef SYSLOG\n"); ++ f_print(fout, "#include \n"); ++ f_print(fout, "#else\n"); ++ f_print(fout, "#define LOG_ERR 1\n"); ++ f_print(fout, "#define openlog(a, b, c)\n"); ++ f_print(fout, "#endif\n"); ++#endif ++ } ++ ++ /* for ANSI-C */ ++ f_print(fout, "\n#ifdef __STDC__\n#define SIG_PF void(*)(int)\n#endif\n"); ++ ++ f_print(fout, "\n#ifdef DEBUG\n#define RPC_SVC_FG\n#endif\n"); ++ if (timerflag) ++ f_print(fout, "\n#define _RPCSVC_CLOSEDOWN %s\n", svcclosetime); ++ while ((def = get_definition()) != NULL) { ++ foundprogram |= (def->def_kind == DEF_PROGRAM); ++ } ++ if (extend && !foundprogram) { ++ (void) unlink(outfilename); ++ return; ++ } ++ write_most(infile, netflag, nomain); ++ if (!nomain) { ++ if( !do_registers(argc, argv) ) { ++ if (outfilename) ++ (void) unlink(outfilename); ++ usage(); ++ } ++ write_rest(); ++ } ++} ++ ++/* ++ * generate client side stubs ++ */ ++static void ++l_output(char *infile, char *define, int extend, char *outfile) ++{ ++ char *include; ++ definition *def; ++ int foundprogram = 0; ++ char *outfilename; ++ ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ open_output(infile, outfilename); ++ add_warning(); ++ if (Cflag) ++ f_print (fout, "#include /* for memset */\n"); ++ if (infile && (include = extendfile(infile, ".h"))) { ++ f_print(fout, "#include \"%s\"\n", include); ++ free(include); ++ } else ++ f_print(fout, "#include \n"); ++ while ((def = get_definition()) != NULL) { ++ foundprogram |= (def->def_kind == DEF_PROGRAM); ++ } ++ if (extend && !foundprogram) { ++ (void) unlink(outfilename); ++ return; ++ } ++ write_stubs(); ++} ++ ++/* ++ * generate the dispatch table ++ */ ++static void ++t_output(char *infile, char *define, int extend, char *outfile) ++{ ++ definition *def; ++ int foundprogram = 0; ++ char *outfilename; ++ ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ open_output(infile, outfilename); ++ add_warning(); ++ while ((def = get_definition()) != NULL) { ++ foundprogram |= (def->def_kind == DEF_PROGRAM); ++ } ++ if (extend && !foundprogram) { ++ (void) unlink(outfilename); ++ return; ++ } ++ write_tables(); ++} ++ ++/* sample routine for the server template */ ++static void ++svc_output(char *infile, char *define, int extend, char *outfile) ++{ ++ definition *def; ++ char *include; ++ char *outfilename; ++ long tell; ++ ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ checkfiles(infile,outfilename); /*check if outfile already exists. ++ if so, print an error message and exit*/ ++ open_output(infile, outfilename); ++ add_sample_msg(); ++ ++ if (infile && (include = extendfile(infile, ".h"))) { ++ f_print(fout, "#include \"%s\"\n", include); ++ free(include); ++ } else ++ f_print(fout, "#include \n"); ++ ++ tell = ftell(fout); ++ while ((def = get_definition()) != NULL) { ++ write_sample_svc(def); ++ } ++ if (extend && tell == ftell(fout)) { ++ (void) unlink(outfilename); ++ } ++} ++ ++ ++/* sample main routine for client */ ++static void ++clnt_output(char *infile, char *define, int extend, char *outfile) ++{ ++ definition *def; ++ char *include; ++ char *outfilename; ++ long tell; ++ int has_program = 0; ++ ++ open_input(infile, define); ++ outfilename = extend ? extendfile(infile, outfile) : outfile; ++ checkfiles(infile, outfilename); /*check if outfile already exists. ++ if so, print an error message and exit*/ ++ ++ open_output(infile, outfilename); ++ add_sample_msg(); ++ if (infile && (include = extendfile(infile, ".h"))) { ++ f_print(fout, "#include \"%s\"\n", include); ++ free(include); ++ } else ++ f_print(fout, "#include \n"); ++ tell = ftell(fout); ++ while ((def = get_definition()) != NULL) { ++ has_program += write_sample_clnt(def); ++ } ++ ++ if (has_program) ++ write_sample_clnt_main(); ++ ++ if (extend && tell == ftell(fout)) { ++ (void) unlink(outfilename); ++ } ++} ++ ++/* ++ * Perform registrations for service output ++ * Return 0 if failed; 1 otherwise. ++ */ ++static int ++do_registers(int argc, char **argv) ++{ ++ int i; ++ ++ if (inetdflag || !tirpcflag) { ++ for (i = 1; i < argc; i++) { ++ if (streq(argv[i], "-s")) { ++ if (!check_nettype(argv[i + 1], valid_i_nettypes)) ++ return 0; ++ write_inetd_register(argv[i + 1]); ++ i++; ++ } ++ } ++ } else { ++ for (i = 1; i < argc; i++) ++ if (streq(argv[i], "-s")) { ++ if (!check_nettype(argv[i + 1], valid_ti_nettypes)) ++ return 0; ++ write_nettype_register(argv[i + 1]); ++ i++; ++ } else if (streq(argv[i], "-n")) { ++ write_netid_register(argv[i + 1]); ++ i++; ++ } ++ } ++ return 1; ++} ++ ++/* ++ * Add another argument to the arg list ++ */ ++static void ++addarg(char *cp) ++{ ++ if (argcount >= ARGLISTLEN) { ++ f_print(stderr, "rpcgen: too many defines\n"); ++ crash(); ++ /*NOTREACHED*/ ++ } ++ arglist[argcount++] = cp; ++ ++} ++ ++static void ++putarg(int where, char *cp) ++{ ++ if (where >= ARGLISTLEN) { ++ f_print(stderr, "rpcgen: arglist coding error\n"); ++ crash(); ++ /*NOTREACHED*/ ++ } ++ arglist[where] = cp; ++ ++} ++ ++/* ++ * if input file is stdin and an output file is specified then complain ++ * if the file already exists. Otherwise the file may get overwritten ++ * If input file does not exist, exit with an error ++ */ ++ ++static void ++checkfiles(char *infile, char *outfile) ++{ ++ ++ struct stat buf; ++ ++ if(infile) /* infile ! = NULL */ ++ if(stat(infile,&buf) < 0) ++ { ++ perror(infile); ++ crash(); ++ }; ++ if (outfile) { ++ if (stat(outfile, &buf) < 0) ++ return; /* file does not exist */ ++ else { ++ f_print(stderr, ++ "file '%s' already exists and may be overwritten\n", outfile); ++ crash(); ++ } ++ } ++} ++ ++/* ++ * Parse command line arguments ++ */ ++static int ++parseargs(int argc, char **argv, struct commandline *cmd) ++{ ++ int i; ++ int j; ++ char c; ++ char flag[(1 << 8 * sizeof(char))]; ++ int nflags; ++ ++ cmdname = argv[0]; ++ cmd->infile = cmd->outfile = NULL; ++ if (argc < 2) { ++ return (0); ++ } ++ allfiles = 0; ++ flag['c'] = 0; ++ flag['h'] = 0; ++ flag['l'] = 0; ++ flag['m'] = 0; ++ flag['o'] = 0; ++ flag['s'] = 0; ++ flag['n'] = 0; ++ flag['t'] = 0; ++ flag['S'] = 0; ++ flag['C'] = 0; ++ for (i = 1; i < argc; i++) { ++ if (argv[i][0] != '-') { ++ if (cmd->infile) { ++ f_print( stderr, "Cannot specify more than one input file!\n"); ++ ++ return (0); ++ } ++ cmd->infile = argv[i]; ++ } else { ++ for (j = 1; argv[i][j] != 0; j++) { ++ c = argv[i][j]; ++ switch (c) { ++ case 'a': ++ allfiles = 1; ++ break; ++ case 'c': ++ case 'h': ++ case 'l': ++ case 'm': ++ case 't': ++ if (flag[(int) c]) { ++ return (0); ++ } ++ flag[(int) c] = 1; ++ break; ++ case 'S': ++ /* sample flag: Ss or Sc. ++ Ss means set flag['S']; ++ Sc means set flag['C']; */ ++ c = argv[i][++j]; /* get next char */ ++ if( c == 's' ) ++ c = 'S'; ++ else if( c == 'c' ) ++ c = 'C'; ++ else ++ return( 0 ); ++ ++ if (flag[(int) c]) { ++ return (0); ++ } ++ flag[(int) c] = 1; ++ break; ++ case 'C': /* ANSI C syntax */ ++ Cflag = 1; ++ break; ++ ++ case 'b': /* turn TIRPC flag off for ++ generating backward compatible ++ */ ++ tirpcflag = 0; ++ break; ++ ++ case 'I': ++ inetdflag = 1; ++ break; ++ case 'N': ++ newstyle = 1; ++ break; ++ case 'L': ++ logflag = 1; ++ break; ++ case 'K': ++ if (++i == argc) { ++ return (0); ++ } ++ svcclosetime = argv[i]; ++ goto nextarg; ++ case 'T': ++ tblflag = 1; ++ break; ++ case 'i' : ++ if (++i == argc) { ++ return (0); ++ } ++ Inline = atoi(argv[i]); ++ goto nextarg; ++ case 'n': ++ case 'o': ++ case 's': ++ if (argv[i][j - 1] != '-' || ++ argv[i][j + 1] != 0) { ++ return (0); ++ } ++ flag[(int) c] = 1; ++ if (++i == argc) { ++ return (0); ++ } ++ if (c == 's') { ++ if (!streq(argv[i], "udp") && ++ !streq(argv[i], "tcp")) { ++ return (0); ++ } ++ } else if (c == 'o') { ++ if (cmd->outfile) { ++ return (0); ++ } ++ cmd->outfile = argv[i]; ++ } ++ goto nextarg; ++ case 'D': ++ if (argv[i][j - 1] != '-') { ++ return (0); ++ } ++ (void) addarg(argv[i]); ++ goto nextarg; ++ case 'Y': ++ if (++i == argc) { ++ return (0); ++ } ++ (void) strcpy(pathbuf, argv[i]); ++ (void) strcat(pathbuf, "/cpp"); ++ CPP = pathbuf; ++ cppDefined = 1; ++ goto nextarg; ++ ++ ++ ++ default: ++ return (0); ++ } ++ } ++ nextarg: ++ ; ++ } ++ } ++ ++ cmd->cflag = flag['c']; ++ cmd->hflag = flag['h']; ++ cmd->lflag = flag['l']; ++ cmd->mflag = flag['m']; ++ cmd->nflag = flag['n']; ++ cmd->sflag = flag['s']; ++ cmd->tflag = flag['t']; ++ cmd->Ssflag = flag['S']; ++ cmd->Scflag = flag['C']; ++ ++ if( tirpcflag ) { ++ pmflag = inetdflag ? 0 : 1; /* pmflag or inetdflag is always TRUE */ ++ if( (inetdflag && cmd->nflag)) { /* netid not allowed with inetdflag */ ++ f_print(stderr, "Cannot use netid flag with inetd flag!\n"); ++ return (0); ++ } ++ } else { /* 4.1 mode */ ++ pmflag = 0; /* set pmflag only in tirpcmode */ ++ inetdflag = 1; /* inetdflag is TRUE by default */ ++ if( cmd->nflag ) { /* netid needs TIRPC */ ++ f_print( stderr, "Cannot use netid flag without TIRPC!\n"); ++ return( 0 ); ++ } ++ } ++ ++ if( newstyle && ( tblflag || cmd->tflag) ) { ++ f_print( stderr, "Cannot use table flags with newstyle!\n"); ++ return( 0 ); ++ } ++ ++ /* check no conflicts with file generation flags */ ++ nflags = cmd->cflag + cmd->hflag + cmd->lflag + cmd->mflag + ++ cmd->sflag + cmd->nflag + cmd->tflag + cmd->Ssflag + cmd->Scflag; ++ ++ if (nflags == 0) { ++ if (cmd->outfile != NULL || cmd->infile == NULL) { ++ return (0); ++ } ++ } else if (nflags > 1) { ++ f_print( stderr, "Cannot have more than one file generation flag!\n"); ++ return (0); ++ } ++ return (1); ++} ++ ++static void ++usage(void) ++{ ++ f_print(stderr, "usage: %s infile\n", cmdname); ++ f_print(stderr, "\t%s [-a][-b][-C][-Dname[=value]] -i size [-I [-K seconds]] [-L][-N][-T] infile\n", ++ cmdname); ++ f_print(stderr, "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss] [-o outfile] [infile]\n", ++ cmdname); ++ f_print(stderr, "\t%s [-s nettype]* [-o outfile] [infile]\n", cmdname); ++ f_print(stderr, "\t%s [-n netid]* [-o outfile] [infile]\n", cmdname); ++ options_usage(); ++ exit(1); ++} ++ ++static void ++options_usage(void) ++{ ++ f_print(stderr, "options:\n"); ++ f_print(stderr, "-a\t\tgenerate all files, including samples\n"); ++ f_print(stderr, "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n"); ++ f_print(stderr, "-c\t\tgenerate XDR routines\n"); ++ f_print(stderr, "-C\t\tANSI C mode\n"); ++ f_print(stderr, "-Dname[=value]\tdefine a symbol (same as #define)\n"); ++ f_print(stderr, "-h\t\tgenerate header file\n"); ++ f_print(stderr, "-i size\t\tsize at which to start generating inline code\n"); ++ f_print(stderr, "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n"); ++ f_print(stderr, "-K seconds\tserver exits after K seconds of inactivity\n"); ++ f_print(stderr, "-l\t\tgenerate client side stubs\n"); ++ f_print(stderr, "-L\t\tserver errors will be printed to syslog\n"); ++ f_print(stderr, "-m\t\tgenerate server side stubs\n"); ++ f_print(stderr, "-n netid\tgenerate server code that supports named netid\n"); ++ f_print(stderr, "-N\t\tsupports multiple arguments and call-by-value\n"); ++ f_print(stderr, "-o outfile\tname of the output file\n"); ++ f_print(stderr, "-s nettype\tgenerate server code that supports named nettype\n"); ++ f_print(stderr, "-Sc\t\tgenerate sample client code that uses remote procedures\n"); ++ f_print(stderr, "-Ss\t\tgenerate sample server code that defines remote procedures\n"); ++ f_print(stderr, "-t\t\tgenerate RPC dispatch table\n"); ++ f_print(stderr, "-T\t\tgenerate code to support RPC dispatch tables\n"); ++ f_print(stderr, "-Y path\t\tdirectory name to find C preprocessor (cpp)\n"); ++ ++ exit(1); ++} +diff --git a/rpcgen/rpc_output.h b/rpcgen/rpc_output.h +new file mode 100644 +index 0000000..eb25a60 +--- /dev/null ++++ b/rpcgen/rpc_output.h +@@ -0,0 +1,16 @@ ++/* ++ * rpc_output.h ++ * ++ * Declarations for output functions ++ * ++ */ ++ ++#ifndef RPCGEN_NEW_OUTPUT_H ++#define RPCGEN_NEW_OUTPUT_H ++ ++void write_msg_out(void); ++int nullproc(proc_list *); ++void printarglist(proc_list *, char *, char *); ++void pdeclaration(char *, declaration *, int, char *); ++ ++#endif /* RPCGEN_NEW_OUTPUT_H */ +diff --git a/rpcgen/rpc_parse.c b/rpcgen/rpc_parse.c +new file mode 100644 +index 0000000..b53a553 +--- /dev/null ++++ b/rpcgen/rpc_parse.c +@@ -0,0 +1,609 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_parse.c, Parser for the RPC protocol compiler ++ * Copyright (C) 1987 Sun Microsystems, Inc. ++ */ ++#include ++#include ++#include "rpc/types.h" ++#include "rpc_scan.h" ++#include "rpc_parse.h" ++#include "rpc_util.h" ++ ++#define ARGNAME "arg" ++ ++/* ++extern char *make_argname(); ++extern char *strdup(); ++ */ ++ ++static void isdefined(definition *defp); ++static void def_struct(definition *defp); ++static void def_program(definition *defp); ++static void def_enum(definition *defp); ++static void def_const(definition *defp); ++static void def_union(definition *defp); ++static void check_type_name(char *name, int new_type); ++static void def_typedef(definition *defp); ++static void get_declaration(declaration *dec, defkind dkind); ++static void get_prog_declaration(declaration *dec, defkind dkind, int num); ++static void get_type(char **prefixp, char **typep, defkind dkind); ++static void unsigned_dec(char **typep); ++ ++/* ++ * return the next definition you see ++ */ ++definition * ++get_definition(void) ++{ ++ definition *defp; ++ token tok; ++ ++ defp = ALLOC(definition); ++ get_token(&tok); ++ switch (tok.kind) { ++ case TOK_STRUCT: ++ def_struct(defp); ++ break; ++ case TOK_UNION: ++ def_union(defp); ++ break; ++ case TOK_TYPEDEF: ++ def_typedef(defp); ++ break; ++ case TOK_ENUM: ++ def_enum(defp); ++ break; ++ case TOK_PROGRAM: ++ def_program(defp); ++ break; ++ case TOK_CONST: ++ def_const(defp); ++ break; ++ case TOK_EOF: ++ free(defp); ++ return (NULL); ++ default: ++ error("definition keyword expected"); ++ } ++ scan(TOK_SEMICOLON, &tok); ++ isdefined(defp); ++ return (defp); ++} ++ ++static void ++isdefined(definition *defp) ++{ ++ STOREVAL(&defined, defp); ++} ++ ++static void ++def_struct(definition *defp) ++{ ++ token tok; ++ declaration dec; ++ decl_list *decls; ++ decl_list **tailp; ++ ++ defp->def_kind = DEF_STRUCT; ++ ++ scan(TOK_IDENT, &tok); ++ defp->def_name = tok.str; ++ scan(TOK_LBRACE, &tok); ++ tailp = &defp->def.st.decls; ++ do { ++ get_declaration(&dec, DEF_STRUCT); ++ decls = ALLOC(decl_list); ++ decls->decl = dec; ++ *tailp = decls; ++ tailp = &decls->next; ++ scan(TOK_SEMICOLON, &tok); ++ peek(&tok); ++ } while (tok.kind != TOK_RBRACE); ++ get_token(&tok); ++ *tailp = NULL; ++} ++ ++static void ++def_program(definition *defp) ++{ ++ token tok; ++ declaration dec; ++ decl_list *decls; ++ decl_list **tailp; ++ version_list *vlist; ++ version_list **vtailp; ++ proc_list *plist; ++ proc_list **ptailp; ++ int num_args; ++ bool_t isvoid = FALSE; /* whether first argument is void */ ++ defp->def_kind = DEF_PROGRAM; ++ scan(TOK_IDENT, &tok); ++ defp->def_name = tok.str; ++ scan(TOK_LBRACE, &tok); ++ vtailp = &defp->def.pr.versions; ++ tailp = &defp->def.st.decls; ++ scan(TOK_VERSION, &tok); ++ do { ++ scan(TOK_IDENT, &tok); ++ vlist = ALLOC(version_list); ++ vlist->vers_name = tok.str; ++ scan(TOK_LBRACE, &tok); ++ ptailp = &vlist->procs; ++ do { ++ /* get result type */ ++ plist = ALLOC(proc_list); ++ get_type(&plist->res_prefix, &plist->res_type, ++ DEF_PROGRAM); ++ if (streq(plist->res_type, "opaque")) { ++ error("illegal result type"); ++ } ++ scan(TOK_IDENT, &tok); ++ plist->proc_name = tok.str; ++ scan(TOK_LPAREN, &tok); ++ /* get args - first one*/ ++ num_args = 1; ++ isvoid = FALSE; ++ /* type of DEF_PROGRAM in the first ++ * get_prog_declaration and DEF_STURCT in the next ++ * allows void as argument if it is the only argument ++ */ ++ get_prog_declaration(&dec, DEF_PROGRAM, num_args); ++ if (streq(dec.type, "void")) ++ isvoid = TRUE; ++ decls = ALLOC(decl_list); ++ plist->args.decls = decls; ++ decls->decl = dec; ++ tailp = &decls->next; ++ /* get args */ ++ while(peekscan(TOK_COMMA, &tok)) { ++ num_args++; ++ get_prog_declaration(&dec, DEF_STRUCT, ++ num_args); ++ decls = ALLOC(decl_list); ++ decls->decl = dec; ++ *tailp = decls; ++ if (streq(dec.type, "void")) ++ isvoid = TRUE; ++ tailp = &decls->next; ++ } ++ /* multiple arguments are only allowed in newstyle */ ++ if( !newstyle && num_args > 1 ) { ++ error("only one argument is allowed" ); ++ } ++ if (isvoid && num_args > 1) { ++ error("illegal use of void in program definition"); ++ } ++ *tailp = NULL; ++ scan(TOK_RPAREN, &tok); ++ scan(TOK_EQUAL, &tok); ++ scan_num(&tok); ++ scan(TOK_SEMICOLON, &tok); ++ plist->proc_num = tok.str; ++ plist->arg_num = num_args; ++ *ptailp = plist; ++ ptailp = &plist->next; ++ peek(&tok); ++ } while (tok.kind != TOK_RBRACE); ++ *ptailp = NULL; ++ *vtailp = vlist; ++ vtailp = &vlist->next; ++ scan(TOK_RBRACE, &tok); ++ scan(TOK_EQUAL, &tok); ++ scan_num(&tok); ++ vlist->vers_num = tok.str; ++ /* make the argument structure name for each arg*/ ++ for(plist = vlist->procs; plist != NULL; ++ plist = plist->next) { ++ plist->args.argname = make_argname(plist->proc_name, ++ vlist->vers_num); ++ /* free the memory ??*/ ++ } ++ scan(TOK_SEMICOLON, &tok); ++ scan2(TOK_VERSION, TOK_RBRACE, &tok); ++ } while (tok.kind == TOK_VERSION); ++ scan(TOK_EQUAL, &tok); ++ scan_num(&tok); ++ defp->def.pr.prog_num = tok.str; ++ *vtailp = NULL; ++} ++ ++ ++static void ++def_enum(definition *defp) ++{ ++ token tok; ++ enumval_list *elist; ++ enumval_list **tailp; ++ ++ defp->def_kind = DEF_ENUM; ++ scan(TOK_IDENT, &tok); ++ defp->def_name = tok.str; ++ scan(TOK_LBRACE, &tok); ++ tailp = &defp->def.en.vals; ++ do { ++ scan(TOK_IDENT, &tok); ++ elist = ALLOC(enumval_list); ++ elist->name = tok.str; ++ elist->assignment = NULL; ++ scan3(TOK_COMMA, TOK_RBRACE, TOK_EQUAL, &tok); ++ if (tok.kind == TOK_EQUAL) { ++ scan_num(&tok); ++ elist->assignment = tok.str; ++ scan2(TOK_COMMA, TOK_RBRACE, &tok); ++ } ++ *tailp = elist; ++ tailp = &elist->next; ++ } while (tok.kind != TOK_RBRACE); ++ *tailp = NULL; ++} ++ ++static void ++def_const(definition *defp) ++{ ++ token tok; ++ ++ defp->def_kind = DEF_CONST; ++ scan(TOK_IDENT, &tok); ++ defp->def_name = tok.str; ++ scan(TOK_EQUAL, &tok); ++ scan2(TOK_IDENT, TOK_STRCONST, &tok); ++ defp->def.co = tok.str; ++} ++ ++static void ++def_union(definition *defp) ++{ ++ token tok; ++ declaration dec; ++ case_list *cases; ++ case_list **tailp; ++ ++ defp->def_kind = DEF_UNION; ++ scan(TOK_IDENT, &tok); ++ defp->def_name = tok.str; ++ scan(TOK_SWITCH, &tok); ++ scan(TOK_LPAREN, &tok); ++ get_declaration(&dec, DEF_UNION); ++ defp->def.un.enum_decl = dec; ++ tailp = &defp->def.un.cases; ++ scan(TOK_RPAREN, &tok); ++ scan(TOK_LBRACE, &tok); ++ scan(TOK_CASE, &tok); ++ while (tok.kind == TOK_CASE) { ++ scan2(TOK_IDENT, TOK_CHARCONST, &tok); ++ cases = ALLOC(case_list); ++ cases->case_name = tok.str; ++ scan(TOK_COLON, &tok); ++ /* now peek at next token */ ++ if(peekscan(TOK_CASE,&tok)) ++ { ++ ++ do ++ { ++ scan2(TOK_IDENT, TOK_CHARCONST, &tok); ++ cases->contflag=1; /* continued case statement */ ++ *tailp = cases; ++ tailp = &cases->next; ++ cases = ALLOC(case_list); ++ cases->case_name = tok.str; ++ scan(TOK_COLON, &tok); ++ ++ }while(peekscan(TOK_CASE,&tok)); ++ } ++ ++ get_declaration(&dec, DEF_UNION); ++ cases->case_decl = dec; ++ cases->contflag=0; /* no continued case statement */ ++ *tailp = cases; ++ tailp = &cases->next; ++ scan(TOK_SEMICOLON, &tok); ++ ++ scan3(TOK_CASE, TOK_DEFAULT, TOK_RBRACE, &tok); ++ } ++ *tailp = NULL; ++ if (tok.kind == TOK_DEFAULT) { ++ scan(TOK_COLON, &tok); ++ get_declaration(&dec, DEF_UNION); ++ defp->def.un.default_decl = ALLOC(declaration); ++ *defp->def.un.default_decl = dec; ++ scan(TOK_SEMICOLON, &tok); ++ scan(TOK_RBRACE, &tok); ++ } else { ++ defp->def.un.default_decl = NULL; ++ } ++} ++ ++static char* reserved_words[] = ++{ ++ "array", ++ "bytes", ++ "destroy", ++ "free", ++ "getpos", ++ "inline", ++ "pointer", ++ "reference", ++ "setpos", ++ "sizeof", ++ "union", ++ "vector", ++ NULL ++ }; ++ ++static char* reserved_types[] = ++{ ++ "opaque", ++ "string", ++ NULL ++ }; ++ ++/* check that the given name is not one that would eventually result in ++ xdr routines that would conflict with internal XDR routines. */ ++static void ++check_type_name(char *name, int new_type) ++{ ++ int i; ++ char tmp[100]; ++ ++ for( i = 0; reserved_words[i] != NULL; i++ ) { ++ if( strcmp( name, reserved_words[i] ) == 0 ) { ++ sprintf(tmp, ++ "illegal (reserved) name :\'%s\' in type definition", name ); ++ error(tmp); ++ } ++ } ++ if( new_type ) { ++ for( i = 0; reserved_types[i] != NULL; i++ ) { ++ if( strcmp( name, reserved_types[i] ) == 0 ) { ++ sprintf(tmp, ++ "illegal (reserved) name :\'%s\' in type definition", name ); ++ error(tmp); ++ } ++ } ++ } ++} ++ ++static void ++def_typedef(definition *defp) ++{ ++ declaration dec; ++ ++ defp->def_kind = DEF_TYPEDEF; ++ get_declaration(&dec, DEF_TYPEDEF); ++ defp->def_name = dec.name; ++ check_type_name( dec.name, 1 ); ++ defp->def.ty.old_prefix = dec.prefix; ++ defp->def.ty.old_type = dec.type; ++ defp->def.ty.rel = dec.rel; ++ defp->def.ty.array_max = dec.array_max; ++} ++ ++static void ++get_declaration(declaration *dec, defkind dkind) ++{ ++ token tok; ++ ++ get_type(&dec->prefix, &dec->type, dkind); ++ dec->rel = REL_ALIAS; ++ if (streq(dec->type, "void")) { ++ return; ++ } ++ ++ check_type_name( dec->type, 0 ); ++ ++ scan2(TOK_STAR, TOK_IDENT, &tok); ++ if (tok.kind == TOK_STAR) { ++ dec->rel = REL_POINTER; ++ scan(TOK_IDENT, &tok); ++ } ++ dec->name = tok.str; ++ if (peekscan(TOK_LBRACKET, &tok)) { ++ if (dec->rel == REL_POINTER) { ++ error("no array-of-pointer declarations -- use typedef"); ++ } ++ dec->rel = REL_VECTOR; ++ scan_num(&tok); ++ dec->array_max = tok.str; ++ scan(TOK_RBRACKET, &tok); ++ } else if (peekscan(TOK_LANGLE, &tok)) { ++ if (dec->rel == REL_POINTER) { ++ error("no array-of-pointer declarations -- use typedef"); ++ } ++ dec->rel = REL_ARRAY; ++ if (peekscan(TOK_RANGLE, &tok)) { ++ dec->array_max = "~0"; /* unspecified size, use max */ ++ } else { ++ scan_num(&tok); ++ dec->array_max = tok.str; ++ scan(TOK_RANGLE, &tok); ++ } ++ } ++ if (streq(dec->type, "opaque")) { ++ if (dec->rel != REL_ARRAY && dec->rel != REL_VECTOR) { ++ error("array declaration expected"); ++ } ++ } else if (streq(dec->type, "string")) { ++ if (dec->rel != REL_ARRAY) { ++ error("variable-length array declaration expected"); ++ } ++ } ++} ++ ++ ++static void ++get_prog_declaration(declaration *dec, defkind dkind, int num) ++{ ++ token tok; ++ char name[10]; /* argument name */ ++ ++ if (dkind == DEF_PROGRAM) { ++ peek(&tok); ++ if (tok.kind == TOK_RPAREN) { /* no arguments */ ++ dec->rel = REL_ALIAS; ++ dec->type = "void"; ++ dec->prefix = NULL; ++ dec->name = NULL; ++ return; ++ } ++ } ++ get_type(&dec->prefix, &dec->type, dkind); ++ dec->rel = REL_ALIAS; ++ if (peekscan(TOK_IDENT, &tok)) /* optional name of argument */ ++ strcpy(name, tok.str); ++ else ++ sprintf(name, "%s%d", ARGNAME, num); /* default name of argument */ ++ ++ dec->name = (char *) strdup(name); ++ ++ if (streq(dec->type, "void")) { ++ return; ++ } ++ ++ if (streq(dec->type, "opaque")) { ++ error("opaque -- illegal argument type"); ++ } ++ if (peekscan(TOK_STAR, &tok)) { ++ if (streq(dec->type, "string")) { ++ error("pointer to string not allowed in program arguments\n"); ++ } ++ dec->rel = REL_POINTER; ++ if (peekscan(TOK_IDENT, &tok)) /* optional name of argument */ ++ dec->name = strdup(tok.str); ++ } ++ if (peekscan(TOK_LANGLE, &tok)) { ++ if (!streq(dec->type, "string")) { ++ error("arrays cannot be declared as arguments to procedures -- use typedef"); ++ } ++ dec->rel = REL_ARRAY; ++ if (peekscan(TOK_RANGLE, &tok)) { ++ dec->array_max = "~0";/* unspecified size, use max */ ++ } else { ++ scan_num(&tok); ++ dec->array_max = tok.str; ++ scan(TOK_RANGLE, &tok); ++ } ++ } ++ if (streq(dec->type, "string")) { ++ if (dec->rel != REL_ARRAY) { /* .x specifies just string as ++ * type of argument ++ * - make it string<> ++ */ ++ dec->rel = REL_ARRAY; ++ dec->array_max = "~0";/* unspecified size, use max */ ++ } ++ } ++} ++ ++ ++ ++static void ++get_type(char **prefixp, char **typep, defkind dkind) ++{ ++ token tok; ++ ++ *prefixp = NULL; ++ get_token(&tok); ++ switch (tok.kind) { ++ case TOK_IDENT: ++ *typep = tok.str; ++ break; ++ case TOK_STRUCT: ++ case TOK_ENUM: ++ case TOK_UNION: ++ *prefixp = tok.str; ++ scan(TOK_IDENT, &tok); ++ *typep = tok.str; ++ break; ++ case TOK_UNSIGNED: ++ unsigned_dec(typep); ++ break; ++ case TOK_SHORT: ++ *typep = "short"; ++ (void) peekscan(TOK_INT, &tok); ++ break; ++ case TOK_INT32: ++ *typep = "int32_t"; ++ (void) peekscan(TOK_INT, &tok); ++ break; ++ case TOK_VOID: ++ if (dkind != DEF_UNION && dkind != DEF_PROGRAM) { ++ error("voids allowed only inside union and program definitions with one argument"); ++ } ++ *typep = tok.str; ++ break; ++ case TOK_STRING: ++ case TOK_OPAQUE: ++ case TOK_CHAR: ++ case TOK_INT: ++ case TOK_FLOAT: ++ case TOK_DOUBLE: ++ case TOK_BOOL: ++ *typep = tok.str; ++ break; ++ default: ++ error("expected type specifier"); ++ } ++} ++ ++static void ++unsigned_dec(char **typep) ++{ ++ token tok; ++ ++ peek(&tok); ++ switch (tok.kind) { ++ case TOK_CHAR: ++ get_token(&tok); ++ *typep = "u_char"; ++ break; ++ case TOK_SHORT: ++ get_token(&tok); ++ *typep = "u_short"; ++ (void) peekscan(TOK_INT, &tok); ++ break; ++ case TOK_INT32: ++ get_token(&tok); ++ *typep = "u_int32_"; ++ (void) peekscan(TOK_INT, &tok); ++ break; ++ case TOK_INT: ++ get_token(&tok); ++ *typep = "u_int"; ++ break; ++ default: ++ *typep = "u_int"; ++ break; ++ } ++} +diff --git a/rpcgen/rpc_parse.h b/rpcgen/rpc_parse.h +new file mode 100644 +index 0000000..2afae10 +--- /dev/null ++++ b/rpcgen/rpc_parse.h +@@ -0,0 +1,166 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* @(#)rpc_parse.h 1.3 90/08/29 (C) 1987 SMI */ ++ ++/* ++ * rpc_parse.h, Definitions for the RPCL parser ++ */ ++ ++enum defkind { ++ DEF_CONST, ++ DEF_STRUCT, ++ DEF_UNION, ++ DEF_ENUM, ++ DEF_TYPEDEF, ++ DEF_PROGRAM ++}; ++typedef enum defkind defkind; ++ ++typedef char *const_def; ++ ++enum relation { ++ REL_VECTOR, /* fixed length array */ ++ REL_ARRAY, /* variable length array */ ++ REL_POINTER, /* pointer */ ++ REL_ALIAS, /* simple */ ++}; ++typedef enum relation relation; ++ ++struct typedef_def { ++ char *old_prefix; ++ char *old_type; ++ relation rel; ++ char *array_max; ++}; ++typedef struct typedef_def typedef_def; ++ ++struct enumval_list { ++ char *name; ++ char *assignment; ++ struct enumval_list *next; ++}; ++typedef struct enumval_list enumval_list; ++ ++struct enum_def { ++ enumval_list *vals; ++}; ++typedef struct enum_def enum_def; ++ ++struct declaration { ++ char *prefix; ++ char *type; ++ char *name; ++ relation rel; ++ char *array_max; ++}; ++typedef struct declaration declaration; ++ ++struct decl_list { ++ declaration decl; ++ struct decl_list *next; ++}; ++typedef struct decl_list decl_list; ++ ++struct struct_def { ++ decl_list *decls; ++}; ++typedef struct struct_def struct_def; ++ ++struct case_list { ++ char *case_name; ++ int contflag; ++ declaration case_decl; ++ struct case_list *next; ++}; ++typedef struct case_list case_list; ++ ++struct union_def { ++ declaration enum_decl; ++ case_list *cases; ++ declaration *default_decl; ++}; ++typedef struct union_def union_def; ++ ++struct arg_list { ++ char *argname; /* name of struct for arg*/ ++ decl_list *decls; ++}; ++ ++typedef struct arg_list arg_list; ++ ++struct proc_list { ++ char *proc_name; ++ char *proc_num; ++ arg_list args; ++ int arg_num; ++ char *res_type; ++ char *res_prefix; ++ struct proc_list *next; ++}; ++typedef struct proc_list proc_list; ++ ++struct version_list { ++ char *vers_name; ++ char *vers_num; ++ proc_list *procs; ++ struct version_list *next; ++}; ++typedef struct version_list version_list; ++ ++struct program_def { ++ char *prog_num; ++ version_list *versions; ++}; ++typedef struct program_def program_def; ++ ++struct definition { ++ char *def_name; ++ defkind def_kind; ++ union { ++ const_def co; ++ struct_def st; ++ union_def un; ++ enum_def en; ++ typedef_def ty; ++ program_def pr; ++ } def; ++}; ++typedef struct definition definition; ++ ++definition *get_definition(); ++ ++ ++struct bas_type ++{ ++ char *name; ++ int length; ++ struct bas_type *next; ++}; ++ ++typedef struct bas_type bas_type; +diff --git a/rpcgen/rpc_sample.c b/rpcgen/rpc_sample.c +new file mode 100644 +index 0000000..2b5c81b +--- /dev/null ++++ b/rpcgen/rpc_sample.c +@@ -0,0 +1,247 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_sample.c 1.1 90/08/30 (C) 1987 SMI"; ++ ++#endif ++ ++/* ++ * rpc_sample.c, Sample client-server code outputter for the RPC protocol compiler ++ */ ++ ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++ ++ ++static char RQSTP[] = "rqstp"; ++ ++static void write_sample_client(char *program_name, version_list *vp); ++static void write_sample_server(definition * def); ++static void return_type(proc_list *plist); ++ ++void ++write_sample_svc(definition *def) ++{ ++ if (def->def_kind != DEF_PROGRAM) ++ return; ++ write_sample_server(def); ++} ++ ++ ++int ++write_sample_clnt(definition *def) ++{ ++ version_list *vp; ++ int count = 0; ++ ++ if (def->def_kind != DEF_PROGRAM) ++ return (0); ++ /* generate sample code for each version */ ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ write_sample_client(def->def_name, vp); ++ ++count; ++ } ++ return (count); ++} ++ ++ ++static void ++write_sample_client(char *program_name, version_list *vp) ++{ ++ proc_list *proc; ++ int i; ++ decl_list *l; ++ ++ f_print(fout, "\n\nvoid\n"); ++ pvname(program_name, vp->vers_num); ++ if (Cflag) ++ f_print(fout, "( char* host )\n{\n"); ++ else ++ f_print(fout, "(host)\nchar *host;\n{\n"); ++ f_print(fout, "\tCLIENT *clnt;\n"); ++ ++ i = 0; ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ f_print(fout, "\t"); ++ ptype(proc->res_prefix, proc->res_type, 1); ++ f_print(fout, " *result_%d;\n", ++i); ++ /* print out declarations for arguments */ ++ if (proc->arg_num < 2 && !newstyle) { ++ f_print(fout, "\t"); ++ if (!streq(proc->args.decls->decl.type, "void")) ++ ptype(proc->args.decls->decl.prefix, proc->args.decls->decl.type, 1); ++ else ++ f_print(fout, "char* "); /* cannot have "void" type */ ++ f_print(fout, " "); ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "_arg;\n"); ++ } else if (!streq(proc->args.decls->decl.type, "void")) { ++ for (l = proc->args.decls; l != NULL; l = l->next) { ++ f_print(fout, "\t"); ++ ptype(l->decl.prefix, l->decl.type, 1); ++ f_print(fout, " "); ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "_%s;\n", l->decl.name); ++ /* pdeclaration(proc->args.argname, &l->decl, 1, ";\n" );*/ ++ } ++ } ++ } ++ ++ /* generate creation of client handle */ ++ f_print(fout, "\tclnt = clnt_create(host, %s, %s, \"%s\");\n", ++ program_name, vp->vers_name, tirpcflag ? "netpath" : "udp"); ++ f_print(fout, "\tif (clnt == NULL) {\n"); ++ f_print(fout, "\t\tclnt_pcreateerror(host);\n"); ++ f_print(fout, "\t\texit(1);\n\t}\n"); ++ ++ /* generate calls to procedures */ ++ i = 0; ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ f_print(fout, "\tresult_%d = ", ++i); ++ pvname(proc->proc_name, vp->vers_num); ++ if (proc->arg_num < 2 && !newstyle) { ++ f_print(fout, "("); ++ if (streq(proc->args.decls->decl.type, "void")) /* cast to void* */ ++ f_print(fout, "(void*)"); ++ f_print(fout, "&"); ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "_arg, clnt);\n"); ++ } else if (streq(proc->args.decls->decl.type, "void")) { ++ f_print(fout, "(clnt);\n"); ++ } else { ++ f_print(fout, "("); ++ for (l = proc->args.decls; l != NULL; l = l->next) { ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "_%s, ", l->decl.name); ++ } ++ f_print(fout, "clnt);\n"); ++ } ++ f_print(fout, "\tif (result_%d == NULL) {\n", i); ++ f_print(fout, "\t\tclnt_perror(clnt, \"call failed:\");\n"); ++ f_print(fout, "\t}\n"); ++ } ++ ++ f_print(fout, "\tclnt_destroy( clnt );\n"); ++ f_print(fout, "}\n"); ++} ++ ++static void ++write_sample_server(definition * def) ++{ ++ version_list *vp; ++ proc_list *proc; ++ ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ f_print(fout, "\n"); ++ /* if( Cflag ) ++ f_print( fout, "extern \"C\"{\n"); ++*/ ++ return_type(proc); ++ f_print(fout, "* \n"); ++ if (Cflag) ++ pvname_svc(proc->proc_name, vp->vers_num); ++ else ++ pvname(proc->proc_name, vp->vers_num); ++ printarglist(proc, RQSTP, "struct svc_req *"); ++ ++ f_print(fout, "{\n"); ++ f_print(fout, "\n\tstatic "); ++ if (!streq(proc->res_type, "void")) ++ return_type(proc); ++ else ++ f_print(fout, "char*"); /* cannot have void type */ ++ /* f_print(fout, " result;\n", proc->res_type); */ ++ f_print(fout, " result;\n"); ++ f_print(fout, ++ "\n\t/*\n\t * insert server code here\n\t */\n\n"); ++ if (!streq(proc->res_type, "void")) ++ f_print(fout, "\treturn(&result);\n}\n"); ++ else /* cast back to void * */ ++ f_print(fout, "\treturn((void*) &result);\n}\n"); ++ /* if( Cflag) ++ f_print( fout, "};\n"); ++*/ ++ ++ } ++ } ++} ++ ++ ++ ++static void ++return_type(proc_list *plist) ++{ ++ ptype( plist->res_prefix, plist->res_type, 1 ); ++} ++ ++void ++add_sample_msg(void) ++{ ++ f_print(fout, "/*\n"); ++ f_print(fout, " * This is sample code generated by rpcgen.\n"); ++ f_print(fout, " * These are only templates and you can use them\n"); ++ f_print(fout, " * as a guideline for developing your own functions.\n"); ++ f_print(fout, " */\n\n"); ++} ++ ++void ++write_sample_clnt_main(void) ++{ ++ list *l; ++ definition *def; ++ version_list *vp; ++ ++ f_print(fout, "\n\n" ); ++ if( Cflag ) ++ f_print(fout,"main( int argc, char* argv[] )\n{\n" ); ++ else ++ f_print(fout, "main(argc, argv)\nint argc;\nchar *argv[];\n{\n" ); ++ ++ f_print(fout, "\tchar *host;"); ++ f_print(fout, "\n\n\tif(argc < 2) {"); ++ f_print(fout, "\n\t\tprintf(\"usage: %%s server_host\\n\", argv[0]);\n" ); ++ f_print(fout, "\t\texit(1);\n\t}"); ++ f_print(fout, "\n\thost = argv[1];\n"); ++ ++ for (l = defined; l != NULL; l = l->next) { ++ def = l->val; ++ if (def->def_kind != DEF_PROGRAM) { ++ continue; ++ } ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ f_print( fout, "\t" ); ++ pvname(def->def_name, vp->vers_num); ++ f_print( fout, "( host );\n" ); ++ } ++ } ++ f_print(fout, "}\n"); ++} +diff --git a/rpcgen/rpc_scan.c b/rpcgen/rpc_scan.c +new file mode 100644 +index 0000000..f58fa9f +--- /dev/null ++++ b/rpcgen/rpc_scan.c +@@ -0,0 +1,474 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_scan.c 1.11 89/02/22 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_scan.c, Scanner for the RPC protocol compiler ++ * Copyright (C) 1987, Sun Microsystems, Inc. ++ */ ++#include ++#include ++#include ++#include "rpc_scan.h" ++#include "rpc_parse.h" ++#include "rpc_util.h" ++ ++static void unget_token(token *tokp); ++static void findstrconst(char **str, char **val); ++static void findchrconst(char **str, char **val); ++static void findconst(char **str, char **val); ++static void findkind(char **mark, token *tokp); ++static int cppline(char *line); ++static int directive(char *line); ++static void printdirective(char *line); ++static void docppline(char *line, int *lineno, char **fname); ++ ++#define startcomment(where) (where[0] == '/' && where[1] == '*') ++#define endcomment(where) (where[-1] == '*' && where[0] == '/') ++ ++static int pushed = 0; /* is a token pushed */ ++static token lasttok; /* last token, if pushed */ ++ ++/* ++ * scan expecting 1 given token ++ */ ++void ++scan(tok_kind expect, token *tokp) ++{ ++ get_token(tokp); ++ if (tokp->kind != expect) { ++ expected1(expect); ++ } ++} ++ ++/* ++ * scan expecting any of the 2 given tokens ++ */ ++void ++scan2(tok_kind expect1, tok_kind expect2, token *tokp) ++{ ++ get_token(tokp); ++ if (tokp->kind != expect1 && tokp->kind != expect2) { ++ expected2(expect1, expect2); ++ } ++} ++ ++/* ++ * scan expecting any of the 3 given token ++ */ ++void ++scan3(tok_kind expect1, tok_kind expect2, tok_kind expect3, token *tokp) ++{ ++ get_token(tokp); ++ if (tokp->kind != expect1 && tokp->kind != expect2 ++ && tokp->kind != expect3) { ++ expected3(expect1, expect2, expect3); ++ } ++} ++ ++/* ++ * scan expecting a constant, possibly symbolic ++ */ ++void ++scan_num(token *tokp) ++{ ++ get_token(tokp); ++ switch (tokp->kind) { ++ case TOK_IDENT: ++ break; ++ default: ++ error("constant or identifier expected"); ++ } ++} ++ ++/* ++ * Peek at the next token ++ */ ++void ++peek(token *tokp) ++{ ++ get_token(tokp); ++ unget_token(tokp); ++} ++ ++/* ++ * Peek at the next token and scan it if it matches what you expect ++ */ ++int ++peekscan(tok_kind expect, token *tokp) ++{ ++ peek(tokp); ++ if (tokp->kind == expect) { ++ get_token(tokp); ++ return (1); ++ } ++ return (0); ++} ++ ++/* ++ * Get the next token, printing out any directive that are encountered. ++ */ ++void ++get_token(token *tokp) ++{ ++ int commenting; ++ ++ if (pushed) { ++ pushed = 0; ++ *tokp = lasttok; ++ return; ++ } ++ commenting = 0; ++ for (;;) { ++ if (*where == 0) { ++ for (;;) { ++ if (!fgets(curline, MAXLINESIZE, fin)) { ++ tokp->kind = TOK_EOF; ++ *where = 0; ++ return; ++ } ++ linenum++; ++ if (commenting) { ++ break; ++ } else if (cppline(curline)) { ++ docppline(curline, &linenum, ++ &infilename); ++ } else if (directive(curline)) { ++ printdirective(curline); ++ } else { ++ break; ++ } ++ } ++ where = curline; ++ } else if (isspace(*where)) { ++ while (isspace(*where)) { ++ where++; /* eat */ ++ } ++ } else if (commenting) { ++ for (where++; *where; where++) { ++ if (endcomment(where)) { ++ where++; ++ commenting--; ++ break; ++ } ++ } ++ } else if (startcomment(where)) { ++ where += 2; ++ commenting++; ++ } else { ++ break; ++ } ++ } ++ ++ /* ++ * 'where' is not whitespace, comment or directive Must be a token! ++ */ ++ switch (*where) { ++ case ':': ++ tokp->kind = TOK_COLON; ++ where++; ++ break; ++ case ';': ++ tokp->kind = TOK_SEMICOLON; ++ where++; ++ break; ++ case ',': ++ tokp->kind = TOK_COMMA; ++ where++; ++ break; ++ case '=': ++ tokp->kind = TOK_EQUAL; ++ where++; ++ break; ++ case '*': ++ tokp->kind = TOK_STAR; ++ where++; ++ break; ++ case '[': ++ tokp->kind = TOK_LBRACKET; ++ where++; ++ break; ++ case ']': ++ tokp->kind = TOK_RBRACKET; ++ where++; ++ break; ++ case '{': ++ tokp->kind = TOK_LBRACE; ++ where++; ++ break; ++ case '}': ++ tokp->kind = TOK_RBRACE; ++ where++; ++ break; ++ case '(': ++ tokp->kind = TOK_LPAREN; ++ where++; ++ break; ++ case ')': ++ tokp->kind = TOK_RPAREN; ++ where++; ++ break; ++ case '<': ++ tokp->kind = TOK_LANGLE; ++ where++; ++ break; ++ case '>': ++ tokp->kind = TOK_RANGLE; ++ where++; ++ break; ++ ++ case '"': ++ tokp->kind = TOK_STRCONST; ++ findstrconst(&where, &tokp->str); ++ break; ++ case '\'': ++ tokp->kind = TOK_CHARCONST; ++ findchrconst(&where, &tokp->str); ++ break; ++ ++ case '-': ++ case '0': ++ case '1': ++ case '2': ++ case '3': ++ case '4': ++ case '5': ++ case '6': ++ case '7': ++ case '8': ++ case '9': ++ tokp->kind = TOK_IDENT; ++ findconst(&where, &tokp->str); ++ break; ++ ++ default: ++ if (!(isalpha(*where) || *where == '_')) { ++ char buf[100]; ++ char *p; ++ ++ s_print(buf, "illegal character in file: "); ++ p = buf + strlen(buf); ++ if (isprint(*where)) { ++ s_print(p, "%c", *where); ++ } else { ++ s_print(p, "%d", *where); ++ } ++ error(buf); ++ } ++ findkind(&where, tokp); ++ break; ++ } ++} ++ ++static void ++unget_token(token *tokp) ++{ ++ lasttok = *tokp; ++ pushed = 1; ++} ++ ++static void ++findstrconst(char **str, char **val) ++{ ++ char *p; ++ int size; ++ ++ p = *str; ++ do { ++ *p++; ++ } while (*p && *p != '"'); ++ if (*p == 0) { ++ error("unterminated string constant"); ++ } ++ p++; ++ size = p - *str; ++ *val = alloc(size + 1); ++ (void) strncpy(*val, *str, size); ++ (*val)[size] = 0; ++ *str = p; ++} ++ ++static void ++findchrconst(char **str, char **val) ++{ ++ char *p; ++ int size; ++ ++ p = *str; ++ do { ++ *p++; ++ } while (*p && *p != '\''); ++ if (*p == 0) { ++ error("unterminated string constant"); ++ } ++ p++; ++ size = p - *str; ++ if (size != 3) { ++ error("empty char string"); ++ } ++ *val = alloc(size + 1); ++ (void) strncpy(*val, *str, size); ++ (*val)[size] = 0; ++ *str = p; ++} ++ ++static void ++findconst(char **str, char **val) ++{ ++ char *p; ++ int size; ++ ++ p = *str; ++ if (*p == '0' && *(p + 1) == 'x') { ++ p++; ++ do { ++ p++; ++ } while (isxdigit(*p)); ++ } else { ++ do { ++ p++; ++ } while (isdigit(*p)); ++ } ++ size = p - *str; ++ *val = alloc(size + 1); ++ (void) strncpy(*val, *str, size); ++ (*val)[size] = 0; ++ *str = p; ++} ++ ++static token symbols[] = { ++ {TOK_CONST, "const"}, ++ {TOK_UNION, "union"}, ++ {TOK_SWITCH, "switch"}, ++ {TOK_CASE, "case"}, ++ {TOK_DEFAULT, "default"}, ++ {TOK_STRUCT, "struct"}, ++ {TOK_TYPEDEF, "typedef"}, ++ {TOK_ENUM, "enum"}, ++ {TOK_OPAQUE, "opaque"}, ++ {TOK_BOOL, "bool"}, ++ {TOK_VOID, "void"}, ++ {TOK_CHAR, "char"}, ++ {TOK_INT, "int"}, ++ {TOK_UNSIGNED, "unsigned"}, ++ {TOK_SHORT, "short"}, ++ {TOK_INT32, "int32"}, ++ {TOK_FLOAT, "float"}, ++ {TOK_DOUBLE, "double"}, ++ {TOK_STRING, "string"}, ++ {TOK_PROGRAM, "program"}, ++ {TOK_VERSION, "version"}, ++ {TOK_EOF, "??????"}, ++}; ++ ++static void ++findkind(char **mark, token *tokp) ++{ ++ int len; ++ token *s; ++ char *str; ++ ++ str = *mark; ++ for (s = symbols; s->kind != TOK_EOF; s++) { ++ len = strlen(s->str); ++ if (strncmp(str, s->str, len) == 0) { ++ if (!isalnum(str[len]) && str[len] != '_') { ++ tokp->kind = s->kind; ++ tokp->str = s->str; ++ *mark = str + len; ++ return; ++ } ++ } ++ } ++ tokp->kind = TOK_IDENT; ++ for (len = 0; isalnum(str[len]) || str[len] == '_'; len++); ++ tokp->str = alloc(len + 1); ++ (void) strncpy(tokp->str, str, len); ++ tokp->str[len] = 0; ++ *mark = str + len; ++} ++ ++static int ++cppline(char *line) ++{ ++ return (line == curline && *line == '#'); ++} ++ ++static int ++directive(char *line) ++{ ++ return (line == curline && *line == '%'); ++} ++ ++static void ++printdirective(char *line) ++{ ++ f_print(fout, "%s", line + 1); ++} ++ ++static void ++docppline(char *line, int *lineno, char **fname) ++{ ++ char *file; ++ int num; ++ char *p; ++ ++ line++; ++ while (isspace(*line)) { ++ line++; ++ } ++ num = atoi(line); ++ while (isdigit(*line)) { ++ line++; ++ } ++ while (isspace(*line)) { ++ line++; ++ } ++ if (*line != '"') { ++ error("preprocessor error"); ++ } ++ line++; ++ p = file = alloc(strlen(line) + 1); ++ while (*line && *line != '"') { ++ *p++ = *line++; ++ } ++ if (*line == 0) { ++ error("preprocessor error"); ++ } ++ *p = 0; ++ if (*file == 0) { ++ *fname = NULL; ++ free(file); ++ } else { ++ *fname = file; ++ } ++ *lineno = num - 1; ++} +diff --git a/rpcgen/rpc_scan.h b/rpcgen/rpc_scan.h +new file mode 100644 +index 0000000..16f688c +--- /dev/null ++++ b/rpcgen/rpc_scan.h +@@ -0,0 +1,103 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* @(#)rpc_scan.h 1.3 90/08/29 (C) 1987 SMI */ ++ ++/* ++ * rpc_scan.h, Definitions for the RPCL scanner ++ */ ++ ++/* ++ * kinds of tokens ++ */ ++enum tok_kind { ++ TOK_IDENT, ++ TOK_CHARCONST, ++ TOK_STRCONST, ++ TOK_LPAREN, ++ TOK_RPAREN, ++ TOK_LBRACE, ++ TOK_RBRACE, ++ TOK_LBRACKET, ++ TOK_RBRACKET, ++ TOK_LANGLE, ++ TOK_RANGLE, ++ TOK_STAR, ++ TOK_COMMA, ++ TOK_EQUAL, ++ TOK_COLON, ++ TOK_SEMICOLON, ++ TOK_CONST, ++ TOK_STRUCT, ++ TOK_UNION, ++ TOK_SWITCH, ++ TOK_CASE, ++ TOK_DEFAULT, ++ TOK_ENUM, ++ TOK_TYPEDEF, ++ TOK_INT, ++ TOK_SHORT, ++ TOK_INT32, ++ TOK_UNSIGNED, ++ TOK_FLOAT, ++ TOK_DOUBLE, ++ TOK_OPAQUE, ++ TOK_CHAR, ++ TOK_STRING, ++ TOK_BOOL, ++ TOK_VOID, ++ TOK_PROGRAM, ++ TOK_VERSION, ++ TOK_EOF ++}; ++typedef enum tok_kind tok_kind; ++ ++/* ++ * a token ++ */ ++struct token { ++ tok_kind kind; ++ char *str; ++}; ++typedef struct token token; ++ ++ ++/* ++ * routine interface ++ */ ++void scan(); ++void scan2(); ++void scan3(); ++void scan_num(); ++void peek(); ++int peekscan(); ++void get_token(); ++void expected1(tok_kind); ++void expected2(tok_kind, tok_kind); ++void expected3(tok_kind, tok_kind, tok_kind); ++ +diff --git a/rpcgen/rpc_svcout.c b/rpcgen/rpc_svcout.c +new file mode 100644 +index 0000000..284a529 +--- /dev/null ++++ b/rpcgen/rpc_svcout.c +@@ -0,0 +1,882 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++ static char sccsid[] = "@(#)rpc_svcout.c 1.29 89/03/30 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_svcout.c, Server-skeleton outputter for the RPC protocol compiler ++ */ ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++#include "rpc_output.h" ++ ++static void write_real_program(definition *def); ++static void write_program(definition *def, char *storage); ++static void printerr(char *err, char *transp); ++static void printif(char *proc, char *transp, char *prefix, char *arg); ++static void write_inetmost(char *infile); ++static void print_return(char *space); ++static void print_pmapunset(char *space); ++static void print_err_message(char *space); ++static void write_timeout_func(void); ++static void write_pm_most(char *infile, int netflag); ++static void write_rpc_svc_fg(char *infile, char *sp); ++static void open_log_file(char *infile, char *sp); ++ ++static char RQSTP[] = "rqstp"; ++static char TRANSP[] = "transp"; ++static char ARG[] = "argument"; ++static char RESULT[] = "result"; ++static char ROUTINE[] = "local"; ++ ++char _errbuf[256]; /* For all messages */ ++ ++static void ++p_xdrfunc(char *rname, char *typename) ++{ ++ if (Cflag) ++ f_print(fout, "\t\txdr_%s = (xdrproc_t) xdr_%s;\n", rname, ++ stringfix(typename)); ++ else ++ f_print(fout, "\t\txdr_%s = xdr_%s;\n", rname, stringfix(typename)); ++} ++ ++void ++internal_proctype(proc_list *plist) ++{ ++ f_print(fout, "static "); ++ ptype( plist->res_prefix, plist->res_type, 1 ); ++ f_print( fout, "*" ); ++} ++ ++ ++/* ++ * write most of the service, that is, everything but the registrations. ++ */ ++void ++write_most(char *infile, int netflag, int nomain) ++{ ++ if (inetdflag || pmflag) { ++ char* var_type; ++ var_type = (nomain? "extern" : "static"); ++ f_print(fout, "%s int _rpcpmstart;", var_type ); ++ f_print(fout, "\t\t/* Started by a port monitor ? */\n"); ++ f_print(fout, "%s int _rpcfdtype;", var_type ); ++ f_print(fout, "\t\t/* Whether Stream or Datagram ? */\n"); ++ if (timerflag) { ++ f_print(fout, "%s int _rpcsvcdirty;", var_type ); ++ f_print(fout, "\t/* Still serving ? */\n"); ++ } ++ write_svc_aux( nomain ); ++ } ++ /* write out dispatcher and stubs */ ++ write_programs( nomain? (char *)NULL : "static" ); ++ ++ if( nomain ) ++ return; ++ ++ f_print(fout, "\nmain()\n"); ++ f_print(fout, "{\n"); ++ if (inetdflag) { ++ write_inetmost(infile); /* Includes call to write_rpc_svc_fg() */ ++ } else { ++ if( tirpcflag ) { ++ if (netflag) { ++ f_print(fout, "\tregister SVCXPRT *%s;\n", TRANSP); ++ f_print(fout, "\tstruct netconfig *nconf = NULL;\n"); ++ } ++ f_print(fout, "\tpid_t pid;\n"); ++ f_print(fout, "\tint i;\n"); ++ f_print(fout, "\tchar mname[FMNAMESZ + 1];\n\n"); ++ write_pm_most(infile, netflag); ++ f_print(fout, "\telse {\n"); ++ write_rpc_svc_fg(infile, "\t\t"); ++ f_print(fout, "\t}\n"); ++ } else { ++ f_print(fout, "\tregister SVCXPRT *%s;\n", TRANSP); ++ f_print(fout, "\n"); ++ print_pmapunset("\t"); ++ } ++ } ++ ++ if (logflag && !inetdflag) { ++ open_log_file(infile, "\t"); ++ } ++} ++ ++/* ++ * write a registration for the given transport ++ */ ++void ++write_netid_register(char *transp) ++{ ++ list *l; ++ definition *def; ++ version_list *vp; ++ char *sp; ++ char tmpbuf[32]; ++ ++ sp = ""; ++ f_print(fout, "\n"); ++ f_print(fout, "%s\tnconf = getnetconfigent(\"%s\");\n", sp, transp); ++ f_print(fout, "%s\tif (nconf == NULL) {\n", sp); ++ (void) sprintf(_errbuf, "cannot find %s netid.", transp); ++ sprintf(tmpbuf, "%s\t\t", sp); ++ print_err_message(tmpbuf); ++ f_print(fout, "%s\t\texit(1);\n", sp); ++ f_print(fout, "%s\t}\n", sp); ++ f_print(fout, "%s\t%s = svc_tli_create(RPC_ANYFD, nconf, 0, 0, 0);\n", ++ sp, TRANSP); ++ f_print(fout, "%s\tif (%s == NULL) {\n", sp, TRANSP); ++ (void) sprintf(_errbuf, "cannot create %s service.", transp); ++ print_err_message(tmpbuf); ++ f_print(fout, "%s\t\texit(1);\n", sp); ++ f_print(fout, "%s\t}\n", sp); ++ ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind != DEF_PROGRAM) { ++ continue; ++ } ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ f_print(fout, ++ "%s\t(void) rpcb_unset(%s, %s, nconf);\n", ++ sp, def->def_name, vp->vers_name); ++ f_print(fout, ++ "%s\tif (!svc_reg(%s, %s, %s, ", ++ sp, TRANSP, def->def_name, vp->vers_name); ++ pvname(def->def_name, vp->vers_num); ++ f_print(fout, ", nconf)) {\n"); ++ (void) sprintf(_errbuf, "unable to register (%s, %s, %s).", ++ def->def_name, vp->vers_name, transp); ++ print_err_message(tmpbuf); ++ f_print(fout, "%s\t\texit(1);\n", sp); ++ f_print(fout, "%s\t}\n", sp); ++ } ++ } ++ f_print(fout, "%s\tfreenetconfigent(nconf);\n", sp); ++} ++ ++/* ++ * write a registration for the given transport for TLI ++ */ ++void ++write_nettype_register(char *transp) ++{ ++ list *l; ++ definition *def; ++ version_list *vp; ++ ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind != DEF_PROGRAM) { ++ continue; ++ } ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ f_print(fout, "\tif (!svc_create("); ++ pvname(def->def_name, vp->vers_num); ++ f_print(fout, ", %s, %s, \"%s\")) {\n ", ++ def->def_name, vp->vers_name, transp); ++ (void) sprintf(_errbuf, ++ "unable to create (%s, %s) for %s.", ++ def->def_name, vp->vers_name, transp); ++ print_err_message("\t\t"); ++ f_print(fout, "\t\texit(1);\n"); ++ f_print(fout, "\t}\n"); ++ } ++ } ++} ++ ++/* ++ * write the rest of the service ++ */ ++void ++write_rest(void) ++{ ++ f_print(fout, "\n"); ++ if (inetdflag) { ++ f_print(fout, "\tif (%s == (SVCXPRT *)NULL) {\n", TRANSP); ++ (void) sprintf(_errbuf, "could not create a handle"); ++ print_err_message("\t\t"); ++ f_print(fout, "\t\texit(1);\n"); ++ f_print(fout, "\t}\n"); ++ if (timerflag) { ++ f_print(fout, "\tif (_rpcpmstart) {\n"); ++ f_print(fout, ++ "\t\t(void) signal(SIGALRM, %s closedown);\n", ++ Cflag? "(SIG_PF)" : "(void(*)())" ); ++ f_print(fout, "\t\t(void) alarm(_RPCSVC_CLOSEDOWN);\n"); ++ f_print(fout, "\t}\n"); ++ } ++ } ++ f_print(fout, "\tsvc_run();\n"); ++ (void) sprintf(_errbuf, "svc_run returned"); ++ print_err_message("\t"); ++ f_print(fout, "\texit(1);\n"); ++ f_print(fout, "\t/* NOTREACHED */\n"); ++ f_print(fout, "}\n"); ++} ++ ++void ++write_programs(char *storage) ++{ ++ list *l; ++ definition *def; ++ ++ /* write out stubs for procedure definitions */ ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind == DEF_PROGRAM) { ++ write_real_program(def); ++ } ++ } ++ ++ /* write out dispatcher for each program */ ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind == DEF_PROGRAM) { ++ write_program(def, storage); ++ } ++ } ++ ++ ++} ++ ++/* write out definition of internal function (e.g. _printmsg_1(...)) ++ which calls server's defintion of actual function (e.g. printmsg_1(...)). ++ Unpacks single user argument of printmsg_1 to call-by-value format ++ expected by printmsg_1. */ ++static void ++write_real_program(definition *def) ++{ ++ version_list *vp; ++ proc_list *proc; ++ decl_list *l; ++ ++ if( !newstyle ) return; /* not needed for old style */ ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ f_print(fout, "\n"); ++ internal_proctype(proc); ++ f_print(fout, "\n_"); ++ pvname(proc->proc_name, vp->vers_num); ++ if( Cflag ) { ++ f_print(fout, "(" ); ++ /* arg name */ ++ if (proc->arg_num > 1) ++ f_print(fout, proc->args.argname); ++ else ++ ptype(proc->args.decls->decl.prefix, ++ proc->args.decls->decl.type, 0); ++ f_print(fout, " *argp, struct svc_req *%s)\n", ++ RQSTP); ++ } else { ++ f_print(fout, "(argp, %s)\n", RQSTP ); ++ /* arg name */ ++ if (proc->arg_num > 1) ++ f_print(fout, "\t%s *argp;\n", proc->args.argname); ++ else { ++ f_print(fout, "\t"); ++ ptype(proc->args.decls->decl.prefix, ++ proc->args.decls->decl.type, 0); ++ f_print(fout, " *argp;\n"); ++ } ++ f_print(fout, " struct svc_req *%s;\n", RQSTP); ++ } ++ ++ f_print(fout, "{\n"); ++ f_print(fout, "\treturn("); ++ if( Cflag ) ++ pvname_svc(proc->proc_name, vp->vers_num); ++ else ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "("); ++ if (proc->arg_num < 2) { /* single argument */ ++ if (!streq( proc->args.decls->decl.type, "void")) ++ f_print(fout, "*argp, "); /* non-void */ ++ } else { ++ for (l = proc->args.decls; l != NULL; l = l->next) ++ f_print(fout, "argp->%s, ", l->decl.name); ++ } ++ f_print(fout, "%s));\n}\n", RQSTP); ++ } ++ } ++} ++ ++static void ++write_program(definition *def, char *storage) ++{ ++ version_list *vp; ++ proc_list *proc; ++ int filled; ++ ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ f_print(fout, "\n"); ++ if (storage != NULL) { ++ f_print(fout, "%s ", storage); ++ } ++ f_print(fout, "void\n"); ++ pvname(def->def_name, vp->vers_num); ++ ++ if (Cflag) { ++ f_print(fout, "(struct svc_req *%s, ", RQSTP); ++ f_print(fout, "register SVCXPRT *%s)\n", TRANSP); ++ } else { ++ f_print(fout, "(%s, %s)\n", RQSTP, TRANSP); ++ f_print(fout, " struct svc_req *%s;\n", RQSTP); ++ f_print(fout, " register SVCXPRT *%s;\n", TRANSP); ++ } ++ ++ f_print(fout, "{\n"); ++ ++ filled = 0; ++ f_print(fout, "\tunion {\n"); ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ if (proc->arg_num < 2) { /* single argument */ ++ if (streq(proc->args.decls->decl.type, ++ "void")) { ++ continue; ++ } ++ filled = 1; ++ f_print(fout, "\t\t"); ++ ptype(proc->args.decls->decl.prefix, ++ proc->args.decls->decl.type, 0); ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "_arg;\n"); ++ ++ } ++ else { ++ filled = 1; ++ f_print(fout, "\t\t%s", proc->args.argname); ++ f_print(fout, " "); ++ pvname(proc->proc_name, vp->vers_num); ++ f_print(fout, "_arg;\n"); ++ } ++ } ++ if (!filled) { ++ f_print(fout, "\t\tint fill;\n"); ++ } ++ f_print(fout, "\t} %s;\n", ARG); ++ f_print(fout, "\tchar *%s;\n", RESULT); ++ ++ if (Cflag) { ++ f_print(fout, "\txdrproc_t xdr_%s, xdr_%s;\n", ARG, RESULT); ++ f_print(fout, ++ "\tchar *(*%s)(char *, struct svc_req *);\n", ++ ROUTINE); ++ } else { ++ f_print(fout, "\tbool_t (*xdr_%s)(), (*xdr_%s)();\n", ARG, RESULT); ++ f_print(fout, "\tchar *(*%s)();\n", ROUTINE); ++ } ++ ++ f_print(fout, "\n"); ++ ++ if (timerflag) ++ f_print(fout, "\t_rpcsvcdirty = 1;\n"); ++ f_print(fout, "\tswitch (%s->rq_proc) {\n", RQSTP); ++ if (!nullproc(vp->procs)) { ++ f_print(fout, "\tcase NULLPROC:\n"); ++ f_print(fout, ++ "\t\t(void) svc_sendreply(%s, (xdrproc_t) xdr_void, (char *)NULL);\n", ++ TRANSP); ++ print_return("\t\t"); ++ f_print(fout, "\n"); ++ } ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ f_print(fout, "\tcase %s:\n", proc->proc_name); ++ if (proc->arg_num < 2) { /* single argument */ ++ p_xdrfunc( ARG, proc->args.decls->decl.type); ++ } else { ++ p_xdrfunc( ARG, proc->args.argname); ++ } ++ p_xdrfunc( RESULT, proc->res_type); ++ if( Cflag ) ++ f_print(fout, ++ "\t\t%s = (char *(*)(char *, struct svc_req *)) ", ++ ROUTINE); ++ else ++ f_print(fout, "\t\t%s = (char *(*)()) ", ROUTINE); ++ ++ if (newstyle) { /* new style: calls internal routine */ ++ f_print(fout,"_"); ++ } ++ /* Not sure about the following... ++ * rpc_hout always generates foobar_1_svc for ++ * the service procedure, so why should we use ++ * foobar_1 here?! --okir */ ++#if 0 ++ if( Cflag && !newstyle ) ++ pvname_svc(proc->proc_name, vp->vers_num); ++ else ++ pvname(proc->proc_name, vp->vers_num); ++#else ++ pvname_svc(proc->proc_name, vp->vers_num); ++#endif ++ f_print(fout, ";\n"); ++ f_print(fout, "\t\tbreak;\n\n"); ++ } ++ f_print(fout, "\tdefault:\n"); ++ printerr("noproc", TRANSP); ++ print_return("\t\t"); ++ f_print(fout, "\t}\n"); ++ ++ f_print(fout, "\t(void) memset((char *)&%s, 0, sizeof (%s));\n", ARG, ARG); ++ if (Cflag) ++ printif("getargs", TRANSP, "(caddr_t) &", ARG); ++ else ++ printif("getargs", TRANSP, "&", ARG); ++ printerr("decode", TRANSP); ++ print_return("\t\t"); ++ f_print(fout, "\t}\n"); ++ ++ if (Cflag) ++ f_print(fout, "\t%s = (*%s)((char *)&%s, %s);\n", ++ RESULT, ROUTINE, ARG, RQSTP); ++ else ++ f_print(fout, "\t%s = (*%s)(&%s, %s);\n", ++ RESULT, ROUTINE, ARG, RQSTP); ++ f_print(fout, ++ "\tif (%s != NULL && !svc_sendreply(%s, " ++ "(xdrproc_t) xdr_%s, %s)) {\n", ++ RESULT, TRANSP, RESULT, RESULT); ++ printerr("systemerr", TRANSP); ++ f_print(fout, "\t}\n"); ++ ++ if (Cflag) ++ printif("freeargs", TRANSP, "(caddr_t) &", ARG); ++ else ++ printif("freeargs", TRANSP, "&", ARG); ++ (void) sprintf(_errbuf, "unable to free arguments"); ++ print_err_message("\t\t"); ++ f_print(fout, "\t\texit(1);\n"); ++ f_print(fout, "\t}\n"); ++ print_return("\t"); ++ f_print(fout, "}\n"); ++ } ++} ++ ++static void ++printerr(char *err, char *transp) ++{ ++ f_print(fout, "\t\tsvcerr_%s(%s);\n", err, transp); ++} ++ ++static void ++printif(char *proc, char *transp, char *prefix, char *arg) ++{ ++ f_print(fout, "\tif (!svc_%s(%s, (xdrproc_t) xdr_%s, (caddr_t) %s%s)) {\n", ++ proc, transp, arg, prefix, arg); ++} ++ ++int ++nullproc(proc_list *proc) ++{ ++ for (; proc != NULL; proc = proc->next) { ++ if (streq(proc->proc_num, "0")) { ++ return (1); ++ } ++ } ++ return (0); ++} ++ ++static void ++write_inetmost(char *infile) ++{ ++ f_print(fout, "\tregister SVCXPRT *%s;\n", TRANSP); ++ f_print(fout, "\tint sock;\n"); ++ f_print(fout, "\tint proto;\n"); ++ f_print(fout, "\tstruct sockaddr_in saddr;\n"); ++ f_print(fout, "\tint asize = sizeof (saddr);\n"); ++ f_print(fout, "\n"); ++ f_print(fout, ++ "\tif (getsockname(0, (struct sockaddr *)&saddr, &asize) == 0) {\n"); ++ f_print(fout, "\t\tint ssize = sizeof (int);\n\n"); ++ f_print(fout, "\t\tif (saddr.sin_family != AF_INET)\n"); ++ f_print(fout, "\t\t\texit(1);\n"); ++ f_print(fout, "\t\tif (getsockopt(0, SOL_SOCKET, SO_TYPE,\n"); ++ f_print(fout, "\t\t\t\t(char *)&_rpcfdtype, &ssize) == -1)\n"); ++ f_print(fout, "\t\t\texit(1);\n"); ++ f_print(fout, "\t\tsock = 0;\n"); ++ f_print(fout, "\t\t_rpcpmstart = 1;\n"); ++ f_print(fout, "\t\tproto = 0;\n"); ++ open_log_file(infile, "\t\t"); ++ f_print(fout, "\t} else {\n"); ++ write_rpc_svc_fg(infile, "\t\t"); ++ f_print(fout, "\t\tsock = RPC_ANYSOCK;\n"); ++ print_pmapunset("\t\t"); ++ f_print(fout, "\t}\n"); ++} ++ ++static void ++print_return(char *space) ++{ ++ if (exitnow) ++ f_print(fout, "%sexit(0);\n", space); ++ else { ++ if (timerflag) ++ f_print(fout, "%s_rpcsvcdirty = 0;\n", space); ++ f_print(fout, "%sreturn;\n", space); ++ } ++} ++ ++static void ++print_pmapunset(char *space) ++{ ++ list *l; ++ definition *def; ++ version_list *vp; ++ ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind == DEF_PROGRAM) { ++ for (vp = def->def.pr.versions; vp != NULL; ++ vp = vp->next) { ++ f_print(fout, "%s(void) pmap_unset(%s, %s);\n", ++ space, def->def_name, vp->vers_name); ++ } ++ } ++ } ++} ++ ++static void ++print_err_message(char *space) ++{ ++ if (logflag) ++ f_print(fout, "%ssyslog(LOG_ERR, \"%s\");\n", space, _errbuf); ++ else if (inetdflag || pmflag) ++ f_print(fout, "%s_msgout(\"%s\");\n", space, _errbuf); ++ else ++ f_print(fout, "%sfprintf(stderr, \"%s\");\n", space, _errbuf); ++} ++ ++/* ++ * Write the server auxiliary function ( _msgout, timeout) ++ */ ++void ++write_svc_aux(int nomain) ++{ ++ if (!logflag) ++ write_msg_out(); ++ if( !nomain ) ++ write_timeout_func(); ++} ++ ++/* ++ * Write the _msgout function ++ */ ++void ++write_msg_out(void) ++{ ++ f_print(fout, "\n"); ++ f_print(fout, "static\n"); ++ if( !Cflag ) { ++ f_print(fout, "void _msgout(msg)\n"); ++ f_print(fout, "\tchar *msg;\n"); ++ } else { ++ f_print(fout, "void _msgout(char* msg)\n"); ++ } ++ f_print(fout, "{\n"); ++ f_print(fout, "#ifdef RPC_SVC_FG\n"); ++ if (inetdflag || pmflag) ++ f_print(fout, "\tif (_rpcpmstart)\n"); ++ f_print(fout, "\t\tsyslog(LOG_ERR, \"%%s\", msg);\n"); ++ f_print(fout, "\telse\n"); ++ f_print(fout, "\t\t(void) fprintf(stderr, \"%%s\\n\", msg);\n"); ++ f_print(fout, "#else\n"); ++ f_print(fout, "\tsyslog(LOG_ERR, \"%%s\", msg);\n"); ++ f_print(fout, "#endif\n"); ++ f_print(fout, "}\n"); ++} ++ ++/* ++ * Write the timeout function ++ */ ++static void ++write_timeout_func(void) ++{ ++ if (!timerflag) ++ return; ++ f_print(fout, "\n"); ++ f_print(fout, "static void\n"); ++ f_print(fout, "closedown()\n"); ++ f_print(fout, "{\n"); ++ f_print(fout, "\tif (_rpcsvcdirty == 0) {\n"); ++ f_print(fout, "\t\tstatic int size;\n"); ++ f_print(fout, "\t\tint i, openfd;\n"); ++ if (tirpcflag && pmflag) { ++ f_print(fout, "\t\tstruct t_info tinfo;\n\n"); ++ f_print(fout, "\t\tif (!t_getinfo(0, &tinfo) && (tinfo.servtype == T_CLTS))\n"); ++ } else { ++ f_print(fout, "\n\t\tif (_rpcfdtype == SOCK_DGRAM)\n"); ++ } ++ f_print(fout, "\t\t\texit(0);\n"); ++ f_print(fout, "\t\tif (size == 0) {\n"); ++ if( tirpcflag ) { ++ f_print(fout, "\t\t\tstruct rlimit rl;\n\n"); ++ f_print(fout, "\t\t\trl.rlim_max = 0;\n"); ++ f_print(fout, "\t\t\tgetrlimit(RLIMIT_NOFILE, &rl);\n"); ++ f_print(fout, "\t\t\tif ((size = rl.rlim_max) == 0)\n"); ++ f_print(fout, "\t\t\t\treturn;\n"); ++ } else { ++ f_print(fout, "\t\t\tsize = getdtablesize();\n"); ++ } ++ f_print(fout, "\t\t}\n"); ++ f_print(fout, "\t\tfor (i = 0, openfd = 0; i < size && openfd < 2; i++)\n"); ++ f_print(fout, "\t\t\tif (FD_ISSET(i, &svc_fdset))\n"); ++ f_print(fout, "\t\t\t\topenfd++;\n"); ++ f_print(fout, "\t\tif (openfd <= 1)\n"); ++ f_print(fout, "\t\t\texit(0);\n"); ++ f_print(fout, "\t}\n"); ++ f_print(fout, "\t(void) alarm(_RPCSVC_CLOSEDOWN);\n"); ++ f_print(fout, "}\n"); ++} ++ ++/* ++ * Write the most of port monitor support ++ */ ++static void ++write_pm_most(char *infile, int netflag) ++{ ++ list *l; ++ definition *def; ++ version_list *vp; ++ ++ f_print(fout, "\tif (!ioctl(0, I_LOOK, mname) &&\n"); ++ f_print(fout, "\t\t(!strcmp(mname, \"sockmod\") ||"); ++ f_print(fout, " !strcmp(mname, \"timod\"))) {\n"); ++ f_print(fout, "\t\tchar *netid;\n"); ++ if (!netflag) { /* Not included by -n option */ ++ f_print(fout, "\t\tstruct netconfig *nconf = NULL;\n"); ++ f_print(fout, "\t\tSVCXPRT *%s;\n", TRANSP); ++ } ++ if( timerflag ) ++ f_print(fout, "\t\tint pmclose;\n"); ++/* not necessary, defined in /usr/include/stdlib */ ++/* f_print(fout, "\t\textern char *getenv();\n");*/ ++ f_print(fout, "\n"); ++ f_print(fout, "\t\t_rpcpmstart = 1;\n"); ++ if (logflag) ++ open_log_file(infile, "\t\t"); ++ f_print(fout, "\t\tif ((netid = getenv(\"NLSPROVIDER\")) == NULL) {\n"); ++ sprintf(_errbuf, "cannot get transport name"); ++ print_err_message("\t\t\t"); ++ f_print(fout, "\t\t} else if ((nconf = getnetconfigent(netid)) == NULL) {\n"); ++ sprintf(_errbuf, "cannot get transport info"); ++ print_err_message("\t\t\t"); ++ f_print(fout, "\t\t}\n"); ++ /* ++ * A kludgy support for inetd services. Inetd only works with ++ * sockmod, and RPC works only with timod, hence all this jugglery ++ */ ++ f_print(fout, "\t\tif (strcmp(mname, \"sockmod\") == 0) {\n"); ++ f_print(fout, "\t\t\tif (ioctl(0, I_POP, 0) || ioctl(0, I_PUSH, \"timod\")) {\n"); ++ sprintf(_errbuf, "could not get the right module"); ++ print_err_message("\t\t\t\t"); ++ f_print(fout, "\t\t\t\texit(1);\n"); ++ f_print(fout, "\t\t\t}\n"); ++ f_print(fout, "\t\t}\n"); ++ if( timerflag ) ++ f_print(fout, "\t\tpmclose = (t_getstate(0) != T_DATAXFER);\n"); ++ f_print(fout, "\t\tif ((%s = svc_tli_create(0, nconf, NULL, 0, 0)) == NULL) {\n", ++ TRANSP); ++ sprintf(_errbuf, "cannot create server handle"); ++ print_err_message("\t\t\t"); ++ f_print(fout, "\t\t\texit(1);\n"); ++ f_print(fout, "\t\t}\n"); ++ f_print(fout, "\t\tif (nconf)\n"); ++ f_print(fout, "\t\t\tfreenetconfigent(nconf);\n"); ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind != DEF_PROGRAM) { ++ continue; ++ } ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ f_print(fout, ++ "\t\tif (!svc_reg(%s, %s, %s, ", ++ TRANSP, def->def_name, vp->vers_name); ++ pvname(def->def_name, vp->vers_num); ++ f_print(fout, ", 0)) {\n"); ++ (void) sprintf(_errbuf, "unable to register (%s, %s).", ++ def->def_name, vp->vers_name); ++ print_err_message("\t\t\t"); ++ f_print(fout, "\t\t\texit(1);\n"); ++ f_print(fout, "\t\t}\n"); ++ } ++ } ++ if (timerflag) { ++ f_print(fout, "\t\tif (pmclose) {\n"); ++ f_print(fout, "\t\t\t(void) signal(SIGALRM, %s closedown);\n", ++ Cflag? "(SIG_PF)" : "(void(*)())" ); ++ f_print(fout, "\t\t\t(void) alarm(_RPCSVC_CLOSEDOWN);\n"); ++ f_print(fout, "\t\t}\n"); ++ } ++ f_print(fout, "\t\tsvc_run();\n"); ++ f_print(fout, "\t\texit(1);\n"); ++ f_print(fout, "\t\t/* NOTREACHED */\n"); ++ f_print(fout, "\t}\n"); ++} ++ ++/* ++ * Support for backgrounding the server if self started. ++ */ ++static void ++write_rpc_svc_fg(char *infile, char *sp) ++{ ++ f_print(fout, "#ifndef RPC_SVC_FG\n"); ++ f_print(fout, "%sint size;\n", sp); ++ if( tirpcflag ) ++ f_print(fout, "%sstruct rlimit rl;\n", sp); ++ if (inetdflag) ++ f_print(fout, "%sint pid, i;\n\n", sp); ++ f_print(fout, "%spid = fork();\n", sp); ++ f_print(fout, "%sif (pid < 0) {\n", sp); ++ f_print(fout, "%s\tperror(\"cannot fork\");\n", sp); ++ f_print(fout, "%s\texit(1);\n", sp); ++ f_print(fout, "%s}\n", sp); ++ f_print(fout, "%sif (pid)\n", sp); ++ f_print(fout, "%s\texit(0);\n", sp); ++ /* get number of file descriptors */ ++ if( tirpcflag ) { ++ f_print(fout, "%srl.rlim_max = 0;\n", sp); ++ f_print(fout, "%sgetrlimit(RLIMIT_NOFILE, &rl);\n", sp); ++ f_print(fout, "%sif ((size = rl.rlim_max) == 0)\n", sp); ++ f_print(fout, "%s\texit(1);\n", sp); ++ } else { ++ f_print(fout, "%ssize = getdtablesize();\n", sp); ++ } ++ ++ f_print(fout, "%sfor (i = 0; i < size; i++)\n", sp); ++ f_print(fout, "%s\t(void) close(i);\n", sp); ++ /* Redirect stderr and stdout to console */ ++ f_print(fout, "%si = open(\"/dev/console\", 2);\n", sp); ++ f_print(fout, "%s(void) dup2(i, 1);\n", sp); ++ f_print(fout, "%s(void) dup2(i, 2);\n", sp); ++ /* This removes control of the controlling terminal */ ++ if( tirpcflag ) ++ f_print(fout, "%ssetsid();\n", sp); ++ else { ++ f_print(fout, "%si = open(\"/dev/tty\", 2);\n", sp); ++ f_print(fout, "%sif (i >= 0) {\n", sp); ++ f_print(fout, "%s\t(void) ioctl(i, TIOCNOTTY, (char *)NULL);\n", sp);; ++ f_print(fout, "%s\t(void) close(i);\n", sp); ++ f_print(fout, "%s}\n", sp); ++ } ++ if (!logflag) ++ open_log_file(infile, sp); ++ f_print(fout, "#endif\n"); ++ if (logflag) ++ open_log_file(infile, sp); ++} ++ ++static void ++open_log_file(char *infile, char *sp) ++{ ++ char *s; ++ ++ s = strrchr(infile, '.'); ++ if (s) ++ *s = '\0'; ++ f_print(fout,"%sopenlog(\"%s\", LOG_PID, LOG_DAEMON);\n", sp, infile); ++ if (s) ++ *s = '.'; ++} ++ ++ ++ ++ ++/* ++ * write a registration for the given transport for Inetd ++ */ ++void ++write_inetd_register(char *transp) ++{ ++ list *l; ++ definition *def; ++ version_list *vp; ++ char *sp; ++ int isudp; ++ char tmpbuf[32]; ++ ++ if (inetdflag) ++ sp = "\t"; ++ else ++ sp = ""; ++ if (streq(transp, "udp")) ++ isudp = 1; ++ else ++ isudp = 0; ++ f_print(fout, "\n"); ++ if (inetdflag) { ++ f_print(fout, "\tif ((_rpcfdtype == 0) || (_rpcfdtype == %s)) {\n", ++ isudp ? "SOCK_DGRAM" : "SOCK_STREAM"); ++ } ++ f_print(fout, "%s\t%s = svc%s_create(%s", ++ sp, TRANSP, transp, inetdflag? "sock": "RPC_ANYSOCK"); ++ if (!isudp) ++ f_print(fout, ", 0, 0"); ++ f_print(fout, ");\n"); ++ f_print(fout, "%s\tif (%s == NULL) {\n", sp, TRANSP); ++ (void) sprintf(_errbuf, "cannot create %s service.", transp); ++ (void) sprintf(tmpbuf, "%s\t\t", sp); ++ print_err_message(tmpbuf); ++ f_print(fout, "%s\t\texit(1);\n", sp); ++ f_print(fout, "%s\t}\n", sp); ++ ++ if (inetdflag) { ++ f_print(fout, "%s\tif (!_rpcpmstart)\n\t", sp); ++ f_print(fout, "%s\tproto = IPPROTO_%s;\n", ++ sp, isudp ? "UDP": "TCP"); ++ } ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind != DEF_PROGRAM) { ++ continue; ++ } ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ f_print(fout, "%s\tif (!svc_register(%s, %s, %s, ", ++ sp, TRANSP, def->def_name, vp->vers_name); ++ pvname(def->def_name, vp->vers_num); ++ if (inetdflag) ++ f_print(fout, ", proto)) {\n"); ++ else ++ f_print(fout, ", IPPROTO_%s)) {\n", ++ isudp ? "UDP": "TCP"); ++ (void) sprintf(_errbuf, "unable to register (%s, %s, %s).", ++ def->def_name, vp->vers_name, transp); ++ print_err_message(tmpbuf); ++ f_print(fout, "%s\t\texit(1);\n", sp); ++ f_print(fout, "%s\t}\n", sp); ++ } ++ } ++ if (inetdflag) ++ f_print(fout, "\t}\n"); ++} +diff --git a/rpcgen/rpc_tblout.c b/rpcgen/rpc_tblout.c +new file mode 100644 +index 0000000..ae002f7 +--- /dev/null ++++ b/rpcgen/rpc_tblout.c +@@ -0,0 +1,165 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_tblout.c 1.4 89/02/22 (C) 1988 SMI"; ++#endif ++ ++/* ++ * rpc_tblout.c, Dispatch table outputter for the RPC protocol compiler ++ */ ++#include ++#include ++#include "rpc_parse.h" ++#include "rpc_util.h" ++#include "rpc_output.h" ++ ++static void write_table(definition *def); ++static void printit(char *prefix, char *type); ++ ++#define TABSIZE 8 ++#define TABCOUNT 5 ++#define TABSTOP (TABSIZE*TABCOUNT) ++ ++static char tabstr[TABCOUNT+1] = "\t\t\t\t\t"; ++ ++static char tbl_hdr[] = "struct rpcgen_table %s_table[] = {\n"; ++static char tbl_end[] = "};\n"; ++ ++static char null_entry[] = "\n\t(char *(*)())0,\n\ ++ \t(xdrproc_t) xdr_void,\t\t\t0,\n\ ++ \t(xdrproc_t) xdr_void,\t\t\t0,\n"; ++ ++ ++static char tbl_nproc[] = "int %s_nproc =\n\tsizeof(%s_table)/sizeof(%s_table[0]);\n\n"; ++ ++void ++write_tables(void) ++{ ++ list *l; ++ definition *def; ++ ++ f_print(fout, "\n"); ++ for (l = defined; l != NULL; l = l->next) { ++ def = (definition *) l->val; ++ if (def->def_kind == DEF_PROGRAM) { ++ write_table(def); ++ } ++ } ++} ++ ++static void ++write_table(definition *def) ++{ ++ version_list *vp; ++ proc_list *proc; ++ int current; ++ int expected; ++ char progvers[100]; ++ int warning; ++ ++ for (vp = def->def.pr.versions; vp != NULL; vp = vp->next) { ++ warning = 0; ++ s_print(progvers, "%s_%s", ++ locase(def->def_name), vp->vers_num); ++ /* print the table header */ ++ f_print(fout, tbl_hdr, progvers); ++ ++ if (nullproc(vp->procs)) { ++ expected = 0; ++ } else { ++ expected = 1; ++ f_print(fout, null_entry); ++ } ++ for (proc = vp->procs; proc != NULL; proc = proc->next) { ++ current = atoi(proc->proc_num); ++ if (current != expected++) { ++ f_print(fout, ++ "\n/*\n * WARNING: table out of order\n */\n"); ++ if (warning == 0) { ++ f_print(stderr, ++ "WARNING %s table is out of order\n", ++ progvers); ++ warning = 1; ++ nonfatalerrors = 1; ++ } ++ expected = current + 1; ++ } ++ f_print(fout, "\n\t(char *(*)())RPCGEN_ACTION("); ++ ++ /* routine to invoke */ ++ if( Cflag && !newstyle ) ++ pvname_svc(proc->proc_name, vp->vers_num); ++ else { ++ if( newstyle ) ++ f_print( fout, "_"); /* calls internal func */ ++ pvname(proc->proc_name, vp->vers_num); ++ } ++ f_print(fout, "),\n"); ++ ++ /* argument info */ ++ if( proc->arg_num > 1 ) ++ printit((char*) NULL, proc->args.argname ); ++ else ++ /* do we have to do something special for newstyle */ ++ printit( proc->args.decls->decl.prefix, ++ proc->args.decls->decl.type ); ++ /* result info */ ++ printit(proc->res_prefix, proc->res_type); ++ } ++ ++ /* print the table trailer */ ++ f_print(fout, tbl_end); ++ f_print(fout, tbl_nproc, progvers, progvers, progvers); ++ } ++} ++ ++static void ++printit(char *prefix, char *type) ++{ ++ int len; ++ int tabs; ++ ++ ++ len = fprintf(fout, "\txdr_%s,", stringfix(type)); ++ /* account for leading tab expansion */ ++ len += TABSIZE - 1; ++ /* round up to tabs required */ ++ tabs = (TABSTOP - len + TABSIZE - 1)/TABSIZE; ++ f_print(fout, "%s", &tabstr[TABCOUNT-tabs]); ++ ++ if (streq(type, "void")) { ++ f_print(fout, "0"); ++ } else { ++ f_print(fout, "sizeof ( "); ++ /* XXX: should "follow" be 1 ??? */ ++ ptype(prefix, type, 0); ++ f_print(fout, ")"); ++ } ++ f_print(fout, ",\n"); ++} +diff --git a/rpcgen/rpc_util.c b/rpcgen/rpc_util.c +new file mode 100644 +index 0000000..b67be57 +--- /dev/null ++++ b/rpcgen/rpc_util.c +@@ -0,0 +1,479 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++#if 0 ++static char sccsid[] = "@(#)rpc_util.c 1.11 89/02/22 (C) 1987 SMI"; ++#endif ++ ++/* ++ * rpc_util.c, Utility routines for the RPC protocol compiler ++ */ ++#include ++#include ++#include ++#include ++#include "rpc_scan.h" ++#include "rpc_parse.h" ++#include "rpc_util.h" ++ ++static void printwhere(void); ++ ++ ++#define ARGEXT "argument" ++ ++char curline[MAXLINESIZE]; /* current read line */ ++char *where = curline; /* current point in line */ ++int linenum = 0; /* current line number */ ++ ++char *infilename; /* input filename */ ++ ++#define NFILES 7 ++char *outfiles[NFILES]; /* output file names */ ++int nfiles; ++ ++FILE *fout; /* file pointer of current output */ ++FILE *fin; /* file pointer of current input */ ++ ++list *defined; /* list of defined things */ ++ ++/* ++ * Reinitialize the world ++ */ ++void ++reinitialize(void) ++{ ++ memset(curline, 0, MAXLINESIZE); ++ where = curline; ++ linenum = 0; ++ defined = NULL; ++} ++ ++/* ++ * string equality ++ */ ++int ++streq(char *a, char *b) ++{ ++ return (strcmp(a, b) == 0); ++} ++ ++/* ++ * find a value in a list ++ */ ++definition * ++findval(list *lst, char *val, int (*cmp)(definition *, char *)) ++{ ++ ++ for (; lst != NULL; lst = lst->next) { ++ if ((*cmp) (lst->val, val)) { ++ return (lst->val); ++ } ++ } ++ return (NULL); ++} ++ ++/* ++ * store a value in a list ++ */ ++void ++storeval(lstp, val) ++ list **lstp; ++ definition *val; ++{ ++ list **l; ++ list *lst; ++ ++ ++ for (l = lstp; *l != NULL; l = (list **) & (*l)->next); ++ lst = ALLOC(list); ++ lst->val = val; ++ lst->next = NULL; ++ *l = lst; ++} ++ ++static int ++findit(definition *def, char *type) ++{ ++ return (streq(def->def_name, type)); ++} ++ ++static char * ++fixit(char *type, char *orig) ++{ ++ definition *def; ++ ++ def = (definition *) FINDVAL(defined, type, findit); ++ if (def == NULL || def->def_kind != DEF_TYPEDEF) { ++ return (orig); ++ } ++ switch (def->def.ty.rel) { ++ case REL_VECTOR: ++ return (def->def.ty.old_type); ++ case REL_ALIAS: ++ return (fixit(def->def.ty.old_type, orig)); ++ default: ++ return (orig); ++ } ++} ++ ++char * ++fixtype(char *type) ++{ ++ return (fixit(type, type)); ++} ++ ++char * ++stringfix(char *type) ++{ ++ if (streq(type, "string")) { ++ return ("wrapstring"); ++ } else { ++ return (type); ++ } ++} ++ ++void ++ptype(char *prefix, char *type, int follow) ++{ ++ if (prefix != NULL) { ++ if (streq(prefix, "enum")) { ++ f_print(fout, "enum "); ++ } else { ++ f_print(fout, "struct "); ++ } ++ } ++ if (streq(type, "bool")) { ++ f_print(fout, "bool_t "); ++ } else if (streq(type, "string")) { ++ f_print(fout, "char *"); ++ } else { ++ f_print(fout, "%s ", follow ? fixtype(type) : type); ++ } ++} ++ ++static int ++typedefed(definition *def, char *type) ++{ ++ if (def->def_kind != DEF_TYPEDEF || def->def.ty.old_prefix != NULL) { ++ return (0); ++ } else { ++ return (streq(def->def_name, type)); ++ } ++} ++ ++int ++isvectordef(char *type, relation rel) ++{ ++ definition *def; ++ ++ for (;;) { ++ switch (rel) { ++ case REL_VECTOR: ++ return (!streq(type, "string")); ++ case REL_ARRAY: ++ return (0); ++ case REL_POINTER: ++ return (0); ++ case REL_ALIAS: ++ def = (definition *) FINDVAL(defined, type, typedefed); ++ if (def == NULL) { ++ return (0); ++ } ++ type = def->def.ty.old_type; ++ rel = def->def.ty.rel; ++ } ++ } ++} ++ ++char * ++locase(char *str) ++{ ++ char c; ++ static char buf[100]; ++ char *p = buf; ++ ++ while ((c = *str++) != '\0') { ++ *p++ = (c >= 'A' && c <= 'Z') ? (c - 'A' + 'a') : c; ++ } ++ *p = 0; ++ return (buf); ++} ++ ++void ++pvname_svc(char *pname, char *vnum) ++{ ++ f_print(fout, "%s_%s_svc", locase(pname), vnum); ++} ++ ++void ++pvname(char *pname, char *vnum) ++{ ++ f_print(fout, "%s_%s", locase(pname), vnum); ++} ++ ++/* ++ * print a useful (?) error message, and then die ++ */ ++void ++error(char *msg) ++{ ++ printwhere(); ++ f_print(stderr, "%s, line %d: ", infilename, linenum); ++ f_print(stderr, "%s\n", msg); ++ crash(); ++} ++ ++/* ++ * Something went wrong, unlink any files that we may have created and then ++ * die. ++ */ ++void ++crash(void) ++{ ++ int i; ++ ++ for (i = 0; i < nfiles; i++) { ++ (void) unlink(outfiles[i]); ++ } ++ exit(1); ++} ++ ++void ++record_open(char *file) ++{ ++ if (nfiles < NFILES) { ++ outfiles[nfiles++] = file; ++ } else { ++ f_print(stderr, "too many files!\n"); ++ crash(); ++ } ++} ++ ++static char expectbuf[100]; ++static char *toktostr(); ++ ++/* ++ * error, token encountered was not the expected one ++ */ ++void ++expected1(exp1) ++ tok_kind exp1; ++{ ++ s_print(expectbuf, "expected '%s'", ++ toktostr(exp1)); ++ error(expectbuf); ++} ++ ++/* ++ * error, token encountered was not one of two expected ones ++ */ ++void ++expected2(exp1, exp2) ++ tok_kind exp1, exp2; ++{ ++ s_print(expectbuf, "expected '%s' or '%s'", ++ toktostr(exp1), ++ toktostr(exp2)); ++ error(expectbuf); ++} ++ ++/* ++ * error, token encountered was not one of 3 expected ones ++ */ ++void ++expected3(exp1, exp2, exp3) ++ tok_kind exp1, exp2, exp3; ++{ ++ s_print(expectbuf, "expected '%s', '%s' or '%s'", ++ toktostr(exp1), ++ toktostr(exp2), ++ toktostr(exp3)); ++ error(expectbuf); ++} ++ ++void ++tabify(f, tab) ++ FILE *f; ++ int tab; ++{ ++ while (tab--) { ++ (void) fputc('\t', f); ++ } ++} ++ ++ ++static token tokstrings[] = { ++ {TOK_IDENT, "identifier"}, ++ {TOK_CONST, "const"}, ++ {TOK_RPAREN, ")"}, ++ {TOK_LPAREN, "("}, ++ {TOK_RBRACE, "}"}, ++ {TOK_LBRACE, "{"}, ++ {TOK_LBRACKET, "["}, ++ {TOK_RBRACKET, "]"}, ++ {TOK_STAR, "*"}, ++ {TOK_COMMA, ","}, ++ {TOK_EQUAL, "="}, ++ {TOK_COLON, ":"}, ++ {TOK_SEMICOLON, ";"}, ++ {TOK_UNION, "union"}, ++ {TOK_STRUCT, "struct"}, ++ {TOK_SWITCH, "switch"}, ++ {TOK_CASE, "case"}, ++ {TOK_DEFAULT, "default"}, ++ {TOK_ENUM, "enum"}, ++ {TOK_TYPEDEF, "typedef"}, ++ {TOK_INT, "int"}, ++ {TOK_SHORT, "short"}, ++ {TOK_INT32, "int32"}, ++ {TOK_UNSIGNED, "unsigned"}, ++ {TOK_DOUBLE, "double"}, ++ {TOK_FLOAT, "float"}, ++ {TOK_CHAR, "char"}, ++ {TOK_STRING, "string"}, ++ {TOK_OPAQUE, "opaque"}, ++ {TOK_BOOL, "bool"}, ++ {TOK_VOID, "void"}, ++ {TOK_PROGRAM, "program"}, ++ {TOK_VERSION, "version"}, ++ {TOK_EOF, "??????"} ++}; ++ ++static char * ++toktostr(kind) ++ tok_kind kind; ++{ ++ token *sp; ++ ++ for (sp = tokstrings; sp->kind != TOK_EOF && sp->kind != kind; sp++); ++ return (sp->str); ++} ++ ++static void ++printbuf(void) ++{ ++ char c; ++ int i; ++ int cnt; ++ ++# define TABSIZE 4 ++ ++ for (i = 0; (c = curline[i]) != '\0'; i++) { ++ if (c == '\t') { ++ cnt = 8 - (i % TABSIZE); ++ c = ' '; ++ } else { ++ cnt = 1; ++ } ++ while (cnt--) { ++ (void) fputc(c, stderr); ++ } ++ } ++} ++ ++static void ++printwhere(void) ++{ ++ int i; ++ char c; ++ int cnt; ++ ++ printbuf(); ++ for (i = 0; i < where - curline; i++) { ++ c = curline[i]; ++ if (c == '\t') { ++ cnt = 8 - (i % TABSIZE); ++ } else { ++ cnt = 1; ++ } ++ while (cnt--) { ++ (void) fputc('^', stderr); ++ } ++ } ++ (void) fputc('\n', stderr); ++} ++ ++char * ++make_argname(char *pname, char *vname) ++{ ++ char *name; ++ ++ name = malloc(strlen(pname) + strlen(vname) + strlen(ARGEXT) + 3); ++ if (!name) { ++ fprintf(stderr, "failed in malloc"); ++ exit(1); ++ } ++ sprintf(name, "%s_%s_%s", locase(pname), vname, ARGEXT); ++ return(name); ++} ++ ++bas_type *typ_list_h; ++bas_type *typ_list_t; ++ ++void ++add_type(int len, char *type) ++{ ++ bas_type *ptr; ++ ++ ++ if ((ptr = (bas_type *) malloc(sizeof(bas_type))) == (bas_type *) NULL) { ++ fprintf(stderr, "failed in malloc"); ++ exit(1); ++ } ++ ptr->name = type; ++ ptr->length = len; ++ ptr->next = NULL; ++ if (typ_list_t == NULL) { ++ ++ typ_list_t = ptr; ++ typ_list_h = ptr; ++ } else { ++ ++ typ_list_t->next = ptr; ++ typ_list_t = ptr; ++ } ++} ++ ++ ++bas_type * ++find_type(char *type) ++{ ++ bas_type *ptr; ++ ++ ptr = typ_list_h; ++ ++ ++ while (ptr != NULL) { ++ if (strcmp(ptr->name, type) == 0) ++ return (ptr); ++ else ++ ptr = ptr->next; ++ }; ++ return (NULL); ++} ++ +diff --git a/rpcgen/rpc_util.h b/rpcgen/rpc_util.h +new file mode 100644 +index 0000000..fa115be +--- /dev/null ++++ b/rpcgen/rpc_util.h +@@ -0,0 +1,166 @@ ++/* ++ * Copyright (c) 2009, Sun Microsystems, Inc. ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions are met: ++ * - Redistributions of source code must retain the above copyright notice, ++ * this list of conditions and the following disclaimer. ++ * - Redistributions in binary form must reproduce the above copyright notice, ++ * this list of conditions and the following disclaimer in the documentation ++ * and/or other materials provided with the distribution. ++ * - Neither the name of Sun Microsystems, Inc. nor the names of its ++ * contributors may be used to endorse or promote products derived ++ * from this software without specific prior written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" ++ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE ++ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR ++ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF ++ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS ++ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN ++ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ++ * POSSIBILITY OF SUCH DAMAGE. ++ */ ++ ++/* @(#)rpc_util.h 1.5 90/08/29 (C) 1987 SMI */ ++ ++/* ++ * rpc_util.h, Useful definitions for the RPC protocol compiler ++ */ ++ ++#include ++ ++#define alloc(size) malloc((unsigned)(size)) ++#define ALLOC(object) (object *) malloc(sizeof(object)) ++ ++#define s_print (void) sprintf ++#define f_print (void) fprintf ++ ++struct list { ++ definition *val; ++ struct list *next; ++}; ++typedef struct list list; ++ ++#define PUT 1 ++#define GET 2 ++ ++/* ++ * Global variables ++ */ ++#define MAXLINESIZE 1024 ++extern char curline[MAXLINESIZE]; ++extern char *where; ++extern int linenum; ++ ++extern char *infilename; ++extern FILE *fout; ++extern FILE *fin; ++ ++extern list *defined; ++ ++ ++extern bas_type *typ_list_h; ++extern bas_type *typ_list_t; ++ ++/* ++ * All the option flags ++ */ ++extern int inetdflag; ++extern int pmflag; ++extern int tblflag; ++extern int logflag; ++extern int newstyle; ++extern int Cflag; /* C++ flag */ ++extern int tirpcflag; /* flag for generating tirpc code */ ++extern int Inline; /* if this is 0, then do not generate inline code */ ++ ++/* ++ * Other flags related with inetd jumpstart. ++ */ ++extern int indefinitewait; ++extern int exitnow; ++extern int timerflag; ++ ++extern int nonfatalerrors; ++ ++/* ++ * rpc_util routines ++ */ ++void storeval(); ++ ++#define STOREVAL(list,item) \ ++ storeval(list,item) ++ ++definition *findval(); ++ ++#define FINDVAL(list,item,finder) \ ++ findval(list, item, finder) ++ ++ ++/* ++ * rpc_cout routines ++ */ ++void cprint(void); ++void emit(definition *); ++ ++/* ++ * rpc_hout routines ++ */ ++void print_datadef(definition *); ++void print_funcdef(definition *); ++ ++/* ++ * rpc_svcout routines ++ */ ++void write_most(char *, int, int); ++void write_register(void); ++void write_netid_register(char *); ++void write_nettype_register(char *); ++void write_inetd_register(char *); ++void write_rest(void); ++void write_programs(char *); ++void write_svc_aux(int); ++ ++/* ++ * rpc_clntout routines ++ */ ++void write_stubs(void); ++void printarglist(proc_list *, char *, char *); ++ ++/* ++ * rpc_tblout routines ++ */ ++void write_tables(void); ++ ++/* ++ * rpc_util ++ */ ++void pvname_svc(char *, char *); ++void pvname(char *, char *); ++void ptype(char *, char *, int); ++char * make_argname(char *, char *); ++void add_type(int, char *); ++void reinitialize(void); ++void crash(void); ++void error(char *); ++char *fixtype(char *); ++char *stringfix(char *); ++char *locase(char *); ++int isvectordef(char *, relation); ++int streq(char *, char *); ++void tabify(FILE *, int); ++void record_open(char *); ++bas_type *find_type(char *type); ++ ++/* ++ * rpc_sample ++ */ ++void write_sample_svc(definition *); ++int write_sample_clnt(definition *); ++void write_sample_clnt_main(void); ++void add_sample_msg(void); +diff --git a/rpcgen/rpcgen.1 b/rpcgen/rpcgen.1 +new file mode 100644 +index 0000000..89df7ed +--- /dev/null ++++ b/rpcgen/rpcgen.1 +@@ -0,0 +1,521 @@ ++.\" @(#)rpcgen.1 1.35 93/06/02 SMI ++.\" $FreeBSD: src/usr.bin/rpcgen/rpcgen.1,v 1.12.2.4 2002/06/21 15:28:50 charnier Exp $ ++.\" Copyright 1985-1993 Sun Microsystems, Inc. ++.Dd March 28, 1993 ++.Dt RPCGEN 1 ++.Os ++.Sh NAME ++.Nm rpcgen ++.Nd an RPC protocol compiler ++.Sh SYNOPSIS ++.Nm ++.Ar infile ++.Nm ++.Op Fl a ++.Op Fl b ++.Op Fl C ++.Oo ++.Fl D Ns Ar name Ns Op Ar =value ++.Oc ++.Op Fl i Ar size ++.Op Fl I Op Fl K Ar seconds ++.Op Fl L ++.Op Fl M ++.Op Fl N ++.Op Fl T ++.Op Fl Y Ar pathname ++.Ar infile ++.Nm ++.Oo ++.Fl c | ++.Fl h | ++.Fl l | ++.Fl m | ++.Fl t | ++.Fl \&Sc | ++.Fl \&Ss | ++.Fl \&Sm ++.Oc ++.Op Fl o Ar outfile ++.Op Ar infile ++.Nm ++.Op Fl s Ar nettype ++.Op Fl o Ar outfile ++.Op Ar infile ++.Nm ++.Op Fl n Ar netid ++.Op Fl o Ar outfile ++.Op Ar infile ++.\" .SH AVAILABILITY ++.\" .LP ++.\" SUNWcsu ++.Sh DESCRIPTION ++The ++.Nm ++utility is a tool that generates C code to implement an ++.Tn RPC ++protocol. ++The input to ++.Nm ++is a language similar to C known as ++.Tn RPC ++Language (Remote Procedure Call Language). ++.Pp ++The ++.Nm ++utility is normally used as in the first synopsis where ++it takes an input file and generates three output files. ++If the ++.Ar infile ++is named ++.Pa proto.x , ++then ++.Nm ++generates a header in ++.Pa proto.h , ++XDR routines in ++.Pa proto_xdr.c , ++server-side stubs in ++.Pa proto_svc.c , ++and client-side stubs in ++.Pa proto_clnt.c . ++With the ++.Fl T ++option, ++it also generates the ++.Tn RPC ++dispatch table in ++.Pa proto_tbl.i . ++.Pp ++The ++.Nm ++utility can also generate sample client and server files ++that can be customized to suit a particular application. ++The ++.Fl \&Sc , ++.Fl \&Ss ++and ++.Fl \&Sm ++options generate sample client, server and makefile, respectively. ++The ++.Fl a ++option generates all files, including sample files. ++If the ++.Ar infile ++is ++.Pa proto.x , ++then the client side sample file is written to ++.Pa proto_client.c , ++the server side sample file to ++.Pa proto_server.c ++and the sample makefile to ++.Pa makefile.proto . ++.Pp ++The server created can be started both by the port monitors ++(for example, ++.Xr inetd 8 ) ++or by itself. ++When it is started by a port monitor, ++it creates servers only for the transport for which ++the file descriptor ++.Em 0 ++was passed. ++The name of the transport must be specified ++by setting up the environment variable ++.Ev PM_TRANSPORT . ++When the server generated by ++.Nm ++is executed, ++it creates server handles for all the transports ++specified in ++.Ev NETPATH ++environment variable, ++or if it is unset, ++it creates server handles for all the visible transports from ++.Pa /etc/netconfig ++file. ++Note: ++the transports are chosen at run time and not at compile time. ++When the server is self-started, ++it backgrounds itself by default. ++A special define symbol ++.Em RPC_SVC_FG ++can be used to run the server process in foreground. ++.Pp ++The second synopsis provides special features which allow ++for the creation of more sophisticated ++.Tn RPC ++servers. ++These features include support for user provided ++.Em #defines ++and ++.Tn RPC ++dispatch tables. ++The entries in the ++.Tn RPC ++dispatch table contain: ++.Bl -bullet -offset indent -compact ++.It ++pointers to the service routine corresponding to that procedure, ++.It ++a pointer to the input and output arguments, ++.It ++the size of these routines. ++.El ++A server can use the dispatch table to check authorization ++and then to execute the service routine; ++a client library may use it to deal with the details of storage ++management and XDR data conversion. ++.Pp ++The other three synopses shown above are used when ++one does not want to generate all the output files, ++but only a particular one. ++See the ++.Sx EXAMPLES ++section below for examples of ++.Nm ++usage. ++When ++.Nm ++is executed with the ++.Fl s ++option, ++it creates servers for that particular class of transports. ++When ++executed with the ++.Fl n ++option, ++it creates a server for the transport specified by ++.Ar netid . ++If ++.Ar infile ++is not specified, ++.Nm ++accepts the standard input. ++.Pp ++The C preprocessor, ++.Em cc -E ++is run on the input file before it is actually interpreted by ++.Nm . ++For each type of output file, ++.Nm ++defines a special preprocessor symbol for use by the ++.Nm ++programmer: ++.Bl -tag -width indent ++.It RPC_HDR ++defined when compiling into headers ++.It RPC_XDR ++defined when compiling into XDR routines ++.It RPC_SVC ++defined when compiling into server-side stubs ++.It RPC_CLNT ++defined when compiling into client-side stubs ++.It RPC_TBL ++defined when compiling into RPC dispatch tables ++.El ++.Pp ++Any line beginning with ++.Dq % ++is passed directly into the output file, ++uninterpreted by ++.Nm . ++To specify the path name of the C preprocessor use ++.Fl Y ++flag. ++.Pp ++For every data type referred to in ++.Ar infile , ++.Nm ++assumes that there exists a ++routine with the string ++.Em xdr_ ++prepended to the name of the data type. ++If this routine does not exist in the ++.Tn RPC/XDR ++library, it must be provided. ++Providing an undefined data type ++allows customization of ++.Xr xdr 3 ++routines. ++.Sh OPTIONS ++The following options are available: ++.Bl -tag -width indent ++.It Fl a ++Generate all files, including sample files. ++.It Fl b ++Backward compatibility mode. ++Generate transport specific ++.Tn RPC ++code for older versions ++of the operating system. ++.Pp ++Note: in ++.Fx , ++this compatibility flag is turned on by ++default since ++.Fx ++supports only the older ++.Tn ONC RPC ++library. ++.It Fl c ++Compile into ++.Tn XDR ++routines. ++.It Fl C ++Generate header and stub files which can be used with ++.Tn ANSI ++C compilers. Headers generated with this flag can also be ++used with C++ programs. ++.It Fl D Ns Ar name ++.It Fl D Ns Ar name=value ++.\".It Fl D Ns Ar name Ns Op Ar =value ++Define a symbol ++.Ar name . ++Equivalent to the ++.Em #define ++directive in the source. ++If no ++.Ar value ++is given, ++.Ar value ++is defined as ++.Em 1 . ++This option may be specified more than once. ++.It Fl h ++Compile into C data-definitions (a header). ++.Fl T ++option can be used in conjunction to produce a ++header which supports ++.Tn RPC ++dispatch tables. ++.It Fl i Ar size ++Size at which to start generating inline code. ++This option is useful for optimization. ++The default size is 5. ++.Pp ++Note: in order to provide backwards compatibility with the older ++.Nm ++on the ++.Fx ++platform, the default is actually 0 (which means ++that inline code generation is disabled by default). You must specify ++a non-zero value explicitly to override this default. ++.It Fl I ++Compile support for ++.Xr inetd 8 ++in the server side stubs. ++Such servers can be self-started or can be started by ++.Nm inetd . ++When the server is self-started, it backgrounds itself by default. ++A special define symbol ++.Em RPC_SVC_FG ++can be used to run the ++server process in foreground, or the user may simply compile without ++the ++.Fl I ++option. ++.Pp ++If there are no pending client requests, the ++.Nm inetd ++servers exit after 120 seconds (default). ++The default can be changed with the ++.Fl K ++option. ++All the error messages for ++.Nm inetd ++servers ++are always logged with ++.Xr syslog 3 . ++.\" .IP ++.\" Note: ++.\" this option is supported for backward compatibility only. ++.\" By default, ++.\" .B rpcgen ++.\" generates servers that can be invoked through portmonitors. ++.Pp ++.It Fl K Ar seconds ++By default, services created using ++.Nm ++and invoked through ++port monitors wait 120 seconds ++after servicing a request before exiting. ++That interval can be changed using the ++.Fl K ++flag. ++To create a server that exits immediately upon servicing a request, ++use ++.Fl K Ar 0 . ++To create a server that never exits, the appropriate argument is ++.Fl k Ar -1 . ++.Pp ++When monitoring for a server, ++some portmonitors ++.Em always ++spawn a new process in response to a service request. ++If it is known that a server will be used with such a monitor, the ++server should exit immediately on completion. ++For such servers, ++.Nm ++should be used with ++.Fl K Ar 0 . ++.It Fl l ++Compile into client-side stubs. ++.It Fl L ++When the servers are started in foreground, use ++.Xr syslog 3 ++to log the server errors instead of printing them on the standard ++error. ++.It Fl m ++Compile into server-side stubs, ++but do not generate a ++.Qq main ++routine. ++This option is useful for doing callback-routines ++and for users who need to write their own ++.Qq main ++routine to do initialization. ++.It Fl M ++Generate multithread-safe stubs for passing arguments and results between ++rpcgen generated code and user written code. ++This option is useful ++for users who want to use threads in their code. ++However, the ++.Xr rpc_svc_calls 3 ++functions are not yet MT-safe, which means that rpcgen generated server-side ++code will not be MT-safe. ++.It Fl N ++This option allows procedures to have multiple arguments. ++It also uses the style of parameter passing that closely resembles C. ++So, when passing an argument to a remote procedure, you do not have to ++pass a pointer to the argument, but can pass the argument itself. ++This behavior is different from the old style of ++.Nm ++generated code. ++To maintain backward compatibility, ++this option is not the default. ++.It Fl n Ar netid ++Compile into server-side stubs for the transport ++specified by ++.Ar netid . ++There should be an entry for ++.Ar netid ++in the ++netconfig database. ++This option may be specified more than once, ++so as to compile a server that serves multiple transports. ++.It Fl o Ar outfile ++Specify the name of the output file. ++If none is specified, ++standard output is used ++( ++.Fl c , ++.Fl h , ++.Fl l , ++.Fl m , ++.Fl n , ++.Fl s , ++.Fl \&Sc , ++.Fl \&Sm , ++.Fl \&Ss , ++and ++.Fl t ++modes only). ++.It Fl s Ar nettype ++Compile into server-side stubs for all the ++transports belonging to the class ++.Ar nettype . ++The supported classes are ++.Em netpath , ++.Em visible , ++.Em circuit_n , ++.Em circuit_v , ++.Em datagram_n , ++.Em datagram_v , ++.Em tcp , ++and ++.Em udp ++(see ++.Xr rpc 3 ++for the meanings associated with these classes). ++This option may be specified more than once. ++Note: ++the transports are chosen at run time and not at compile time. ++.It Fl \&Sc ++Generate sample client code that uses remote procedure calls. ++.It Fl \&Sm ++Generate a sample ++.Pa Makefile ++which can be used for compiling the application. ++.It Fl \&Ss ++Generate sample server code that uses remote procedure calls. ++.It Fl t ++Compile into ++.Tn RPC ++dispatch table. ++.It Fl T ++Generate the code to support ++.Tn RPC ++dispatch tables. ++.Pp ++The options ++.Fl c , ++.Fl h , ++.Fl l , ++.Fl m , ++.Fl s , ++.Fl \&Sc , ++.Fl \&Sm , ++.Fl \&Ss , ++and ++.Fl t ++are used exclusively to generate a particular type of file, ++while the options ++.Fl D ++and ++.Fl T ++are global and can be used with the other options. ++.It Fl Y Ar pathname ++Give the name of the directory where ++.Nm ++will start looking for the C-preprocessor. ++.El ++.Sh EXAMPLES ++The following example: ++.Dl example% rpcgen -T prot.x ++.Pp ++generates all the five files: ++.Pa prot.h , ++.Pa prot_clnt.c , ++.Pa prot_svc.c , ++.Pa prot_xdr.c ++and ++.Pa prot_tbl.i . ++.Pp ++The following example sends the C data-definitions (header) ++to the standard output. ++.Dl example% rpcgen -h prot.x ++.Pp ++To send the test version of the ++.Fl D Ns Ar TEST , ++server side stubs for ++all the transport belonging to the class ++.Ar datagram_n ++to standard output, use: ++.Dl example% rpcgen -s datagram_n -DTEST prot.x ++.Pp ++To create the server side stubs for the transport indicated ++by ++.Ar netid ++tcp, ++use: ++.Dl example% rpcgen -n tcp -o prot_svc.c prot.x ++.Sh SEE ALSO ++.Xr cc 1 , ++.Xr rpc 3 , ++.Xr syslog 3 , ++.Xr inetd 8 ++.\" .BR rpc_svc_calls (3) ++.Rs ++.%T The rpcgen chapter in the NETP manual ++.Re +-- +1.9.1 + diff --git a/package/libtirpc/0004-Automatically-generate-XDR-header-files-from-.x-sour.patch b/package/libtirpc/0004-Automatically-generate-XDR-header-files-from-.x-sour.patch new file mode 100644 index 0000000000..e302c5d1ce --- /dev/null +++ b/package/libtirpc/0004-Automatically-generate-XDR-header-files-from-.x-sour.patch @@ -0,0 +1,1002 @@ +From eba198c27f2b8d3f0b27ea4a42f3dc79d397440c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 17:29:53 +0100 +Subject: [PATCH] Automatically generate XDR header files from .x sources using + rpcgen + +[Gustavo: update after dropping non-IPv6 support] +Signed-off-by: Thomas Petazzoni +[yann.morin.1998@free.fr: update for 0.3.1] +Signed-off-by: "Yann E. MORIN" +--- + Makefile.am | 19 +- + src/Makefile.am | 2 +- + tirpc/rpc/rpcb_prot.h | 797 -------------------------------------------------- + tirpc/rpcsvc/crypt.h | 109 ------- + 4 files changed, 17 insertions(+), 910 deletions(-) + delete mode 100644 tirpc/rpc/rpcb_prot.h + delete mode 100644 tirpc/rpcsvc/crypt.h + +diff --git a/Makefile.am b/Makefile.am +index 8558289..aa5908e 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,6 +1,9 @@ + SUBDIRS = src man doc rpcgen + ACLOCAL_AMFLAGS = -I m4 + ++GENFILES = tirpc/rpcsvc/crypt.h \ ++ tirpc/rpc/rpcb_prot.h ++ + noinst_HEADERS = tirpc/reentrant.h \ + tirpc/getpeereid.h \ + tirpc/libc_private.h \ +@@ -8,7 +11,6 @@ noinst_HEADERS = tirpc/reentrant.h \ + + nobase_include_HEADERS = tirpc/netconfig.h \ + tirpc/rpcsvc/crypt.x \ +- tirpc/rpcsvc/crypt.h \ + tirpc/rpc/xdr.h \ + tirpc/rpc/types.h \ + tirpc/rpc/svc_soc.h \ +@@ -20,7 +22,6 @@ nobase_include_HEADERS = tirpc/netconfig.h \ + tirpc/rpc/rpcent.h \ + tirpc/rpc/rpc_com.h \ + tirpc/rpc/rpcb_prot.x \ +- tirpc/rpc/rpcb_prot.h \ + tirpc/rpc/rpcb_clnt.h \ + tirpc/rpc/raw.h \ + tirpc/rpc/pmap_rmt.h \ +@@ -51,5 +52,17 @@ endif + pkgconfigdir=$(libdir)/pkgconfig + pkgconfig_DATA = libtirpc.pc + +-CLEANFILES = cscope.* *~ ++nobase_nodist_include_HEADERS = $(GENFILES) ++BUILT_SOURCES = $(GENFILES) ++ ++$(GENFILES): %.h: %.x $(top_builddir)/rpcgen/rpcgen ++ mkdir -p $(dir $@) ++ $(top_builddir)/rpcgen/rpcgen -h -o $@ $< ++ ++$(top_builddir)/rpcgen/rpcgen: force ++ cd rpcgen && $(MAKE) ++ ++force: ++ ++CLEANFILES = cscope.* *~ $(GENFILES) + DISTCLEANFILES = Makefile.in libtirpc*.tar.gz +diff --git a/src/Makefile.am b/src/Makefile.am +index 7428e92..0356171 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -8,7 +8,7 @@ + noinst_HEADERS = rpc_com.h debug.h + + AM_CPPFLAGS = -I$(top_srcdir)/tirpc -include config.h -DPORTMAP -DINET6 \ +- -D_GNU_SOURCE -Wall -pipe ++ -D_GNU_SOURCE -Wall -pipe -I$(top_builddir)/tirpc + + lib_LTLIBRARIES = libtirpc.la + +diff --git a/tirpc/rpc/rpcb_prot.h b/tirpc/rpc/rpcb_prot.h +deleted file mode 100644 +index 7ae48b8..0000000 +--- a/tirpc/rpc/rpcb_prot.h ++++ /dev/null +@@ -1,797 +0,0 @@ +-/* +- * Please do not edit this file. +- * It was generated using rpcgen. +- */ +- +-#ifndef _RPCB_PROT_H_RPCGEN +-#define _RPCB_PROT_H_RPCGEN +- +-#include +- +-#ifndef IXDR_GET_INT32 +-#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf)) +-#endif +-#ifndef IXDR_PUT_INT32 +-#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v)) +-#endif +-#ifndef IXDR_GET_U_INT32 +-#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf)) +-#endif +-#ifndef IXDR_PUT_U_INT32 +-#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v)) +-#endif +-/* +- * $FreeBSD: src/include/rpc/rpcb_prot.x,v 1.3 2002/03/13 10:29:06 obrien Exp $ +- * +- * Copyright (c) 2009, Sun Microsystems, Inc. +- * All rights reserved. +- * +- * Redistribution and use in source and binary forms, with or without +- * modification, are permitted provided that the following conditions are met: +- * - Redistributions of source code must retain the above copyright notice, +- * this list of conditions and the following disclaimer. +- * - Redistributions in binary form must reproduce the above copyright notice, +- * this list of conditions and the following disclaimer in the documentation +- * and/or other materials provided with the distribution. +- * - Neither the name of Sun Microsystems, Inc. nor the names of its +- * contributors may be used to endorse or promote products derived +- * from this software without specific prior written permission. +- * +- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +- * POSSIBILITY OF SUCH DAMAGE. +- */ +-/* +- * Copyright (c) 1988 by Sun Microsystems, Inc. +- */ +-/* from rpcb_prot.x */ +- +-/* #pragma ident "@(#)rpcb_prot.x 1.5 94/04/29 SMI" */ +- +-#ifndef _KERNEL +- +- +-/* +- * The following procedures are supported by the protocol in version 3: +- * +- * RPCBPROC_NULL() returns () +- * takes nothing, returns nothing +- * +- * RPCBPROC_SET(rpcb) returns (bool_t) +- * TRUE is success, FALSE is failure. Registers the tuple +- * [prog, vers, address, owner, netid]. +- * Finds out owner and netid information on its own. +- * +- * RPCBPROC_UNSET(rpcb) returns (bool_t) +- * TRUE is success, FALSE is failure. Un-registers tuple +- * [prog, vers, netid]. addresses is ignored. +- * If netid is NULL, unregister all. +- * +- * RPCBPROC_GETADDR(rpcb) returns (string). +- * 0 is failure. Otherwise returns the universal address where the +- * triple [prog, vers, netid] is registered. Ignore address and owner. +- * +- * RPCBPROC_DUMP() RETURNS (rpcblist_ptr) +- * used to dump the entire rpcbind maps +- * +- * RPCBPROC_CALLIT(rpcb_rmtcallargs) +- * RETURNS (rpcb_rmtcallres); +- * Calls the procedure on the remote machine. If it is not registered, +- * this procedure is quiet; i.e. it does not return error information!!! +- * This routine only passes null authentication parameters. +- * It has no interface to xdr routines for RPCBPROC_CALLIT. +- * +- * RPCBPROC_GETTIME() returns (int). +- * Gets the remote machines time +- * +- * RPCBPROC_UADDR2TADDR(strint) RETURNS (struct netbuf) +- * Returns the netbuf address from universal address. +- * +- * RPCBPROC_TADDR2UADDR(struct netbuf) RETURNS (string) +- * Returns the universal address from netbuf address. +- * +- * END OF RPCBIND VERSION 3 PROCEDURES +- */ +-/* +- * Except for RPCBPROC_CALLIT, the procedures above are carried over to +- * rpcbind version 4. Those below are added or modified for version 4. +- * NOTE: RPCBPROC_BCAST HAS THE SAME FUNCTIONALITY AND PROCEDURE NUMBER +- * AS RPCBPROC_CALLIT. +- * +- * RPCBPROC_BCAST(rpcb_rmtcallargs) +- * RETURNS (rpcb_rmtcallres); +- * Calls the procedure on the remote machine. If it is not registered, +- * this procedure IS quiet; i.e. it DOES NOT return error information!!! +- * This routine should be used for broadcasting and nothing else. +- * +- * RPCBPROC_GETVERSADDR(rpcb) returns (string). +- * 0 is failure. Otherwise returns the universal address where the +- * triple [prog, vers, netid] is registered. Ignore address and owner. +- * Same as RPCBPROC_GETADDR except that if the given version number +- * is not available, the address is not returned. +- * +- * RPCBPROC_INDIRECT(rpcb_rmtcallargs) +- * RETURNS (rpcb_rmtcallres); +- * Calls the procedure on the remote machine. If it is not registered, +- * this procedure is NOT quiet; i.e. it DOES return error information!!! +- * as any normal application would expect. +- * +- * RPCBPROC_GETADDRLIST(rpcb) returns (rpcb_entry_list_ptr). +- * Same as RPCBPROC_GETADDR except that it returns a list of all the +- * addresses registered for the combination (prog, vers) (for all +- * transports). +- * +- * RPCBPROC_GETSTAT(void) returns (rpcb_stat_byvers) +- * Returns the statistics about the kind of requests received by rpcbind. +- */ +- +-/* +- * A mapping of (program, version, network ID) to address +- */ +- +-struct rpcb { +- rpcprog_t r_prog; +- rpcvers_t r_vers; +- char *r_netid; +- char *r_addr; +- char *r_owner; +-}; +-typedef struct rpcb rpcb; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb(XDR *, rpcb*); +-#elif __STDC__ +-extern bool_t xdr_rpcb(XDR *, rpcb*); +-#else /* Old Style C */ +-bool_t xdr_rpcb(); +-#endif /* Old Style C */ +- +- +-typedef rpcb RPCB; +- +- +-/* +- * A list of mappings +- * +- * Below are two definitions for the rpcblist structure. This is done because +- * xdr_rpcblist() is specified to take a struct rpcblist **, rather than a +- * struct rpcblist * that rpcgen would produce. One version of the rpcblist +- * structure (actually called rp__list) is used with rpcgen, and the other is +- * defined only in the header file for compatibility with the specified +- * interface. +- */ +- +-struct rp__list { +- rpcb rpcb_map; +- struct rp__list *rpcb_next; +-}; +-typedef struct rp__list rp__list; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rp__list(XDR *, rp__list*); +-#elif __STDC__ +-extern bool_t xdr_rp__list(XDR *, rp__list*); +-#else /* Old Style C */ +-bool_t xdr_rp__list(); +-#endif /* Old Style C */ +- +- +-typedef rp__list *rpcblist_ptr; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcblist_ptr(XDR *, rpcblist_ptr*); +-#elif __STDC__ +-extern bool_t xdr_rpcblist_ptr(XDR *, rpcblist_ptr*); +-#else /* Old Style C */ +-bool_t xdr_rpcblist_ptr(); +-#endif /* Old Style C */ +- +- +-typedef struct rp__list rpcblist; +-typedef struct rp__list RPCBLIST; +- +-#ifndef __cplusplus +-struct rpcblist { +- RPCB rpcb_map; +- struct rpcblist *rpcb_next; +-}; +-#endif +- +-#ifdef __cplusplus +-extern "C" { +-#endif +-extern bool_t xdr_rpcblist(XDR *, rpcblist**); +-#ifdef __cplusplus +-} +-#endif +- +- +-/* +- * Arguments of remote calls +- */ +- +-struct rpcb_rmtcallargs { +- rpcprog_t prog; +- rpcvers_t vers; +- rpcproc_t proc; +- struct { +- u_int args_len; +- char *args_val; +- } args; +-}; +-typedef struct rpcb_rmtcallargs rpcb_rmtcallargs; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_rmtcallargs(XDR *, rpcb_rmtcallargs*); +-#elif __STDC__ +-extern bool_t xdr_rpcb_rmtcallargs(XDR *, rpcb_rmtcallargs*); +-#else /* Old Style C */ +-bool_t xdr_rpcb_rmtcallargs(); +-#endif /* Old Style C */ +- +- +-/* +- * Client-side only representation of rpcb_rmtcallargs structure. +- * +- * The routine that XDRs the rpcb_rmtcallargs structure must deal with the +- * opaque arguments in the "args" structure. xdr_rpcb_rmtcallargs() needs to +- * be passed the XDR routine that knows the args' structure. This routine +- * doesn't need to go over-the-wire (and it wouldn't make sense anyway) since +- * the application being called already knows the args structure. So we use a +- * different "XDR" structure on the client side, r_rpcb_rmtcallargs, which +- * includes the args' XDR routine. +- */ +-struct r_rpcb_rmtcallargs { +- rpcprog_t prog; +- rpcvers_t vers; +- rpcproc_t proc; +- struct { +- u_int args_len; +- char *args_val; +- } args; +- xdrproc_t xdr_args; /* encodes args */ +-}; +- +- +-/* +- * Results of the remote call +- */ +- +-struct rpcb_rmtcallres { +- char *addr; +- struct { +- u_int results_len; +- char *results_val; +- } results; +-}; +-typedef struct rpcb_rmtcallres rpcb_rmtcallres; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_rmtcallres(XDR *, rpcb_rmtcallres*); +-#elif __STDC__ +-extern bool_t xdr_rpcb_rmtcallres(XDR *, rpcb_rmtcallres*); +-#else /* Old Style C */ +-bool_t xdr_rpcb_rmtcallres(); +-#endif /* Old Style C */ +- +- +-/* +- * Client-side only representation of rpcb_rmtcallres structure. +- */ +-struct r_rpcb_rmtcallres { +- char *addr; +- struct { +- u_int32_t results_len; +- char *results_val; +- } results; +- xdrproc_t xdr_res; /* decodes results */ +-}; +- +-/* +- * rpcb_entry contains a merged address of a service on a particular +- * transport, plus associated netconfig information. A list of rpcb_entrys +- * is returned by RPCBPROC_GETADDRLIST. See netconfig.h for values used +- * in r_nc_* fields. +- */ +- +-struct rpcb_entry { +- char *r_maddr; +- char *r_nc_netid; +- u_int r_nc_semantics; +- char *r_nc_protofmly; +- char *r_nc_proto; +-}; +-typedef struct rpcb_entry rpcb_entry; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_entry(XDR *, rpcb_entry*); +-#elif __STDC__ +-extern bool_t xdr_rpcb_entry(XDR *, rpcb_entry*); +-#else /* Old Style C */ +-bool_t xdr_rpcb_entry(); +-#endif /* Old Style C */ +- +- +-/* +- * A list of addresses supported by a service. +- */ +- +-struct rpcb_entry_list { +- rpcb_entry rpcb_entry_map; +- struct rpcb_entry_list *rpcb_entry_next; +-}; +-typedef struct rpcb_entry_list rpcb_entry_list; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_entry_list(XDR *, rpcb_entry_list*); +-#elif __STDC__ +-extern bool_t xdr_rpcb_entry_list(XDR *, rpcb_entry_list*); +-#else /* Old Style C */ +-bool_t xdr_rpcb_entry_list(); +-#endif /* Old Style C */ +- +- +-typedef rpcb_entry_list *rpcb_entry_list_ptr; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_entry_list_ptr(XDR *, rpcb_entry_list_ptr*); +-#elif __STDC__ +-extern bool_t xdr_rpcb_entry_list_ptr(XDR *, rpcb_entry_list_ptr*); +-#else /* Old Style C */ +-bool_t xdr_rpcb_entry_list_ptr(); +-#endif /* Old Style C */ +- +- +-/* +- * rpcbind statistics +- */ +- +-#define rpcb_highproc_2 RPCBPROC_CALLIT +-#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR +-#define rpcb_highproc_4 RPCBPROC_GETSTAT +-#define RPCBSTAT_HIGHPROC 13 +-#define RPCBVERS_STAT 3 +-#define RPCBVERS_4_STAT 2 +-#define RPCBVERS_3_STAT 1 +-#define RPCBVERS_2_STAT 0 +- +-/* Link list of all the stats about getport and getaddr */ +- +-struct rpcbs_addrlist { +- rpcprog_t prog; +- rpcvers_t vers; +- int success; +- int failure; +- char *netid; +- struct rpcbs_addrlist *next; +-}; +-typedef struct rpcbs_addrlist rpcbs_addrlist; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcbs_addrlist(XDR *, rpcbs_addrlist*); +-#elif __STDC__ +-extern bool_t xdr_rpcbs_addrlist(XDR *, rpcbs_addrlist*); +-#else /* Old Style C */ +-bool_t xdr_rpcbs_addrlist(); +-#endif /* Old Style C */ +- +- +-/* Link list of all the stats about rmtcall */ +- +-struct rpcbs_rmtcalllist { +- rpcprog_t prog; +- rpcvers_t vers; +- rpcproc_t proc; +- int success; +- int failure; +- int indirect; +- char *netid; +- struct rpcbs_rmtcalllist *next; +-}; +-typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcbs_rmtcalllist(XDR *, rpcbs_rmtcalllist*); +-#elif __STDC__ +-extern bool_t xdr_rpcbs_rmtcalllist(XDR *, rpcbs_rmtcalllist*); +-#else /* Old Style C */ +-bool_t xdr_rpcbs_rmtcalllist(); +-#endif /* Old Style C */ +- +- +-typedef int rpcbs_proc[RPCBSTAT_HIGHPROC]; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcbs_proc(XDR *, rpcbs_proc); +-#elif __STDC__ +-extern bool_t xdr_rpcbs_proc(XDR *, rpcbs_proc); +-#else /* Old Style C */ +-bool_t xdr_rpcbs_proc(); +-#endif /* Old Style C */ +- +- +-typedef rpcbs_addrlist *rpcbs_addrlist_ptr; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcbs_addrlist_ptr(XDR *, rpcbs_addrlist_ptr*); +-#elif __STDC__ +-extern bool_t xdr_rpcbs_addrlist_ptr(XDR *, rpcbs_addrlist_ptr*); +-#else /* Old Style C */ +-bool_t xdr_rpcbs_addrlist_ptr(); +-#endif /* Old Style C */ +- +- +-typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcbs_rmtcalllist_ptr(XDR *, rpcbs_rmtcalllist_ptr*); +-#elif __STDC__ +-extern bool_t xdr_rpcbs_rmtcalllist_ptr(XDR *, rpcbs_rmtcalllist_ptr*); +-#else /* Old Style C */ +-bool_t xdr_rpcbs_rmtcalllist_ptr(); +-#endif /* Old Style C */ +- +- +-struct rpcb_stat { +- rpcbs_proc info; +- int setinfo; +- int unsetinfo; +- rpcbs_addrlist_ptr addrinfo; +- rpcbs_rmtcalllist_ptr rmtinfo; +-}; +-typedef struct rpcb_stat rpcb_stat; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_stat(XDR *, rpcb_stat*); +-#elif __STDC__ +-extern bool_t xdr_rpcb_stat(XDR *, rpcb_stat*); +-#else /* Old Style C */ +-bool_t xdr_rpcb_stat(); +-#endif /* Old Style C */ +- +- +-/* +- * One rpcb_stat structure is returned for each version of rpcbind +- * being monitored. +- */ +- +-typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT]; +-#ifdef __cplusplus +-extern "C" bool_t xdr_rpcb_stat_byvers(XDR *, rpcb_stat_byvers); +-#elif __STDC__ +-extern bool_t xdr_rpcb_stat_byvers(XDR *, rpcb_stat_byvers); +-#else /* Old Style C */ +-bool_t xdr_rpcb_stat_byvers(); +-#endif /* Old Style C */ +- +- +-/* +- * We don't define netbuf in RPCL, since it would contain structure member +- * names that would conflict with the definition of struct netbuf in +- * . Instead we merely declare the XDR routine xdr_netbuf() here, +- * and implement it ourselves in rpc/rpcb_prot.c. +- */ +-#ifdef __cplusplus +-extern "C" bool_t xdr_netbuf(XDR *, struct netbuf *); +- +-#else /* __STDC__ */ +-extern bool_t xdr_netbuf(XDR *, struct netbuf *); +- +-#endif +- +-#define RPCBVERS_3 RPCBVERS +-#define RPCBVERS_4 RPCBVERS4 +- +-#define _PATH_RPCBINDSOCK "/var/run/rpcbind.sock" +- +-#else /* ndef _KERNEL */ +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-/* +- * A mapping of (program, version, network ID) to address +- */ +-struct rpcb { +- rpcprog_t r_prog; /* program number */ +- rpcvers_t r_vers; /* version number */ +- char *r_netid; /* network id */ +- char *r_addr; /* universal address */ +- char *r_owner; /* owner of the mapping */ +-}; +-typedef struct rpcb RPCB; +- +-/* +- * A list of mappings +- */ +-struct rpcblist { +- RPCB rpcb_map; +- struct rpcblist *rpcb_next; +-}; +-typedef struct rpcblist RPCBLIST; +-typedef struct rpcblist *rpcblist_ptr; +- +-/* +- * Remote calls arguments +- */ +-struct rpcb_rmtcallargs { +- rpcprog_t prog; /* program number */ +- rpcvers_t vers; /* version number */ +- rpcproc_t proc; /* procedure number */ +- u_int32_t arglen; /* arg len */ +- caddr_t args_ptr; /* argument */ +- xdrproc_t xdr_args; /* XDR routine for argument */ +-}; +-typedef struct rpcb_rmtcallargs rpcb_rmtcallargs; +- +-/* +- * Remote calls results +- */ +-struct rpcb_rmtcallres { +- char *addr_ptr; /* remote universal address */ +- u_int32_t resultslen; /* results length */ +- caddr_t results_ptr; /* results */ +- xdrproc_t xdr_results; /* XDR routine for result */ +-}; +-typedef struct rpcb_rmtcallres rpcb_rmtcallres; +- +-struct rpcb_entry { +- char *r_maddr; +- char *r_nc_netid; +- unsigned int r_nc_semantics; +- char *r_nc_protofmly; +- char *r_nc_proto; +-}; +-typedef struct rpcb_entry rpcb_entry; +- +-/* +- * A list of addresses supported by a service. +- */ +- +-struct rpcb_entry_list { +- rpcb_entry rpcb_entry_map; +- struct rpcb_entry_list *rpcb_entry_next; +-}; +-typedef struct rpcb_entry_list rpcb_entry_list; +- +-typedef rpcb_entry_list *rpcb_entry_list_ptr; +- +-/* +- * rpcbind statistics +- */ +- +-#define rpcb_highproc_2 RPCBPROC_CALLIT +-#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR +-#define rpcb_highproc_4 RPCBPROC_GETSTAT +-#define RPCBSTAT_HIGHPROC 13 +-#define RPCBVERS_STAT 3 +-#define RPCBVERS_4_STAT 2 +-#define RPCBVERS_3_STAT 1 +-#define RPCBVERS_2_STAT 0 +- +-/* Link list of all the stats about getport and getaddr */ +- +-struct rpcbs_addrlist { +- rpcprog_t prog; +- rpcvers_t vers; +- int success; +- int failure; +- char *netid; +- struct rpcbs_addrlist *next; +-}; +-typedef struct rpcbs_addrlist rpcbs_addrlist; +- +-/* Link list of all the stats about rmtcall */ +- +-struct rpcbs_rmtcalllist { +- rpcprog_t prog; +- rpcvers_t vers; +- rpcproc_t proc; +- int success; +- int failure; +- int indirect; +- char *netid; +- struct rpcbs_rmtcalllist *next; +-}; +-typedef struct rpcbs_rmtcalllist rpcbs_rmtcalllist; +- +-typedef int rpcbs_proc[RPCBSTAT_HIGHPROC]; +- +-typedef rpcbs_addrlist *rpcbs_addrlist_ptr; +- +-typedef rpcbs_rmtcalllist *rpcbs_rmtcalllist_ptr; +- +-struct rpcb_stat { +- rpcbs_proc info; +- int setinfo; +- int unsetinfo; +- rpcbs_addrlist_ptr addrinfo; +- rpcbs_rmtcalllist_ptr rmtinfo; +-}; +-typedef struct rpcb_stat rpcb_stat; +- +-/* +- * One rpcb_stat structure is returned for each version of rpcbind +- * being monitored. +- */ +- +-typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT]; +- +-#ifdef __cplusplus +-} +-#endif +- +-#endif /* ndef _KERNEL */ +- +-#define RPCBPROG ((u_int32_t)100000) +-#define RPCBVERS ((u_int32_t)3) +- +-#ifdef __cplusplus +-#define RPCBPROC_SET ((u_int32_t)1) +-extern "C" bool_t * rpcbproc_set_3(rpcb *, CLIENT *); +-extern "C" bool_t * rpcbproc_set_3_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_UNSET ((u_int32_t)2) +-extern "C" bool_t * rpcbproc_unset_3(rpcb *, CLIENT *); +-extern "C" bool_t * rpcbproc_unset_3_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_GETADDR ((u_int32_t)3) +-extern "C" char ** rpcbproc_getaddr_3(rpcb *, CLIENT *); +-extern "C" char ** rpcbproc_getaddr_3_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_DUMP ((u_int32_t)4) +-extern "C" rpcblist_ptr * rpcbproc_dump_3(void *, CLIENT *); +-extern "C" rpcblist_ptr * rpcbproc_dump_3_svc(void *, struct svc_req *); +-#define RPCBPROC_CALLIT ((u_int32_t)5) +-extern "C" rpcb_rmtcallres * rpcbproc_callit_3(rpcb_rmtcallargs *, CLIENT *); +-extern "C" rpcb_rmtcallres * rpcbproc_callit_3_svc(rpcb_rmtcallargs *, struct svc_req *); +-#define RPCBPROC_GETTIME ((u_int32_t)6) +-extern "C" u_int * rpcbproc_gettime_3(void *, CLIENT *); +-extern "C" u_int * rpcbproc_gettime_3_svc(void *, struct svc_req *); +-#define RPCBPROC_UADDR2TADDR ((u_int32_t)7) +-extern "C" struct netbuf * rpcbproc_uaddr2taddr_3(char **, CLIENT *); +-extern "C" struct netbuf * rpcbproc_uaddr2taddr_3_svc(char **, struct svc_req *); +-#define RPCBPROC_TADDR2UADDR ((u_int32_t)8) +-extern "C" char ** rpcbproc_taddr2uaddr_3(struct netbuf *, CLIENT *); +-extern "C" char ** rpcbproc_taddr2uaddr_3_svc(struct netbuf *, struct svc_req *); +- +-#elif __STDC__ +-#define RPCBPROC_SET ((u_int32_t)1) +-extern bool_t * rpcbproc_set_3(rpcb *, CLIENT *); +-extern bool_t * rpcbproc_set_3_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_UNSET ((u_int32_t)2) +-extern bool_t * rpcbproc_unset_3(rpcb *, CLIENT *); +-extern bool_t * rpcbproc_unset_3_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_GETADDR ((u_int32_t)3) +-extern char ** rpcbproc_getaddr_3(rpcb *, CLIENT *); +-extern char ** rpcbproc_getaddr_3_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_DUMP ((u_int32_t)4) +-extern rpcblist_ptr * rpcbproc_dump_3(void *, CLIENT *); +-extern rpcblist_ptr * rpcbproc_dump_3_svc(void *, struct svc_req *); +-#define RPCBPROC_CALLIT ((u_int32_t)5) +-extern rpcb_rmtcallres * rpcbproc_callit_3(rpcb_rmtcallargs *, CLIENT *); +-extern rpcb_rmtcallres * rpcbproc_callit_3_svc(rpcb_rmtcallargs *, struct svc_req *); +-#define RPCBPROC_GETTIME ((u_int32_t)6) +-extern u_int * rpcbproc_gettime_3(void *, CLIENT *); +-extern u_int * rpcbproc_gettime_3_svc(void *, struct svc_req *); +-#define RPCBPROC_UADDR2TADDR ((u_int32_t)7) +-extern struct netbuf * rpcbproc_uaddr2taddr_3(char **, CLIENT *); +-extern struct netbuf * rpcbproc_uaddr2taddr_3_svc(char **, struct svc_req *); +-#define RPCBPROC_TADDR2UADDR ((u_int32_t)8) +-extern char ** rpcbproc_taddr2uaddr_3(struct netbuf *, CLIENT *); +-extern char ** rpcbproc_taddr2uaddr_3_svc(struct netbuf *, struct svc_req *); +- +-#else /* Old Style C */ +-#define RPCBPROC_SET ((u_int32_t)1) +-extern bool_t * rpcbproc_set_3(); +-extern bool_t * rpcbproc_set_3_svc(); +-#define RPCBPROC_UNSET ((u_int32_t)2) +-extern bool_t * rpcbproc_unset_3(); +-extern bool_t * rpcbproc_unset_3_svc(); +-#define RPCBPROC_GETADDR ((u_int32_t)3) +-extern char ** rpcbproc_getaddr_3(); +-extern char ** rpcbproc_getaddr_3_svc(); +-#define RPCBPROC_DUMP ((u_int32_t)4) +-extern rpcblist_ptr * rpcbproc_dump_3(); +-extern rpcblist_ptr * rpcbproc_dump_3_svc(); +-#define RPCBPROC_CALLIT ((u_int32_t)5) +-extern rpcb_rmtcallres * rpcbproc_callit_3(); +-extern rpcb_rmtcallres * rpcbproc_callit_3_svc(); +-#define RPCBPROC_GETTIME ((u_int32_t)6) +-extern u_int * rpcbproc_gettime_3(); +-extern u_int * rpcbproc_gettime_3_svc(); +-#define RPCBPROC_UADDR2TADDR ((u_int32_t)7) +-extern struct netbuf * rpcbproc_uaddr2taddr_3(); +-extern struct netbuf * rpcbproc_uaddr2taddr_3_svc(); +-#define RPCBPROC_TADDR2UADDR ((u_int32_t)8) +-extern char ** rpcbproc_taddr2uaddr_3(); +-extern char ** rpcbproc_taddr2uaddr_3_svc(); +-#endif /* Old Style C */ +-#define RPCBVERS4 ((u_int32_t)4) +- +-#ifdef __cplusplus +-extern "C" bool_t * rpcbproc_set_4(rpcb *, CLIENT *); +-extern "C" bool_t * rpcbproc_set_4_svc(rpcb *, struct svc_req *); +-extern "C" bool_t * rpcbproc_unset_4(rpcb *, CLIENT *); +-extern "C" bool_t * rpcbproc_unset_4_svc(rpcb *, struct svc_req *); +-extern "C" char ** rpcbproc_getaddr_4(rpcb *, CLIENT *); +-extern "C" char ** rpcbproc_getaddr_4_svc(rpcb *, struct svc_req *); +-extern "C" rpcblist_ptr * rpcbproc_dump_4(void *, CLIENT *); +-extern "C" rpcblist_ptr * rpcbproc_dump_4_svc(void *, struct svc_req *); +-#define RPCBPROC_BCAST ((u_int32_t)RPCBPROC_CALLIT) +-extern "C" rpcb_rmtcallres * rpcbproc_bcast_4(rpcb_rmtcallargs *, CLIENT *); +-extern "C" rpcb_rmtcallres * rpcbproc_bcast_4_svc(rpcb_rmtcallargs *, struct svc_req *); +-extern "C" u_int * rpcbproc_gettime_4(void *, CLIENT *); +-extern "C" u_int * rpcbproc_gettime_4_svc(void *, struct svc_req *); +-extern "C" struct netbuf * rpcbproc_uaddr2taddr_4(char **, CLIENT *); +-extern "C" struct netbuf * rpcbproc_uaddr2taddr_4_svc(char **, struct svc_req *); +-extern "C" char ** rpcbproc_taddr2uaddr_4(struct netbuf *, CLIENT *); +-extern "C" char ** rpcbproc_taddr2uaddr_4_svc(struct netbuf *, struct svc_req *); +-#define RPCBPROC_GETVERSADDR ((u_int32_t)9) +-extern "C" char ** rpcbproc_getversaddr_4(rpcb *, CLIENT *); +-extern "C" char ** rpcbproc_getversaddr_4_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_INDIRECT ((u_int32_t)10) +-extern "C" rpcb_rmtcallres * rpcbproc_indirect_4(rpcb_rmtcallargs *, CLIENT *); +-extern "C" rpcb_rmtcallres * rpcbproc_indirect_4_svc(rpcb_rmtcallargs *, struct svc_req *); +-#define RPCBPROC_GETADDRLIST ((u_int32_t)11) +-extern "C" rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(rpcb *, CLIENT *); +-extern "C" rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_GETSTAT ((u_int32_t)12) +-extern "C" rpcb_stat * rpcbproc_getstat_4(void *, CLIENT *); +-extern "C" rpcb_stat * rpcbproc_getstat_4_svc(void *, struct svc_req *); +- +-#elif __STDC__ +-extern bool_t * rpcbproc_set_4(rpcb *, CLIENT *); +-extern bool_t * rpcbproc_set_4_svc(rpcb *, struct svc_req *); +-extern bool_t * rpcbproc_unset_4(rpcb *, CLIENT *); +-extern bool_t * rpcbproc_unset_4_svc(rpcb *, struct svc_req *); +-extern char ** rpcbproc_getaddr_4(rpcb *, CLIENT *); +-extern char ** rpcbproc_getaddr_4_svc(rpcb *, struct svc_req *); +-extern rpcblist_ptr * rpcbproc_dump_4(void *, CLIENT *); +-extern rpcblist_ptr * rpcbproc_dump_4_svc(void *, struct svc_req *); +-#define RPCBPROC_BCAST ((u_int32_t)RPCBPROC_CALLIT) +-extern rpcb_rmtcallres * rpcbproc_bcast_4(rpcb_rmtcallargs *, CLIENT *); +-extern rpcb_rmtcallres * rpcbproc_bcast_4_svc(rpcb_rmtcallargs *, struct svc_req *); +-extern u_int * rpcbproc_gettime_4(void *, CLIENT *); +-extern u_int * rpcbproc_gettime_4_svc(void *, struct svc_req *); +-extern struct netbuf * rpcbproc_uaddr2taddr_4(char **, CLIENT *); +-extern struct netbuf * rpcbproc_uaddr2taddr_4_svc(char **, struct svc_req *); +-extern char ** rpcbproc_taddr2uaddr_4(struct netbuf *, CLIENT *); +-extern char ** rpcbproc_taddr2uaddr_4_svc(struct netbuf *, struct svc_req *); +-#define RPCBPROC_GETVERSADDR ((u_int32_t)9) +-extern char ** rpcbproc_getversaddr_4(rpcb *, CLIENT *); +-extern char ** rpcbproc_getversaddr_4_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_INDIRECT ((u_int32_t)10) +-extern rpcb_rmtcallres * rpcbproc_indirect_4(rpcb_rmtcallargs *, CLIENT *); +-extern rpcb_rmtcallres * rpcbproc_indirect_4_svc(rpcb_rmtcallargs *, struct svc_req *); +-#define RPCBPROC_GETADDRLIST ((u_int32_t)11) +-extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(rpcb *, CLIENT *); +-extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(rpcb *, struct svc_req *); +-#define RPCBPROC_GETSTAT ((u_int32_t)12) +-extern rpcb_stat * rpcbproc_getstat_4(void *, CLIENT *); +-extern rpcb_stat * rpcbproc_getstat_4_svc(void *, struct svc_req *); +- +-#else /* Old Style C */ +-extern bool_t * rpcbproc_set_4(); +-extern bool_t * rpcbproc_set_4_svc(); +-extern bool_t * rpcbproc_unset_4(); +-extern bool_t * rpcbproc_unset_4_svc(); +-extern char ** rpcbproc_getaddr_4(); +-extern char ** rpcbproc_getaddr_4_svc(); +-extern rpcblist_ptr * rpcbproc_dump_4(); +-extern rpcblist_ptr * rpcbproc_dump_4_svc(); +-#define RPCBPROC_BCAST ((u_int32_t)RPCBPROC_CALLIT) +-extern rpcb_rmtcallres * rpcbproc_bcast_4(); +-extern rpcb_rmtcallres * rpcbproc_bcast_4_svc(); +-extern u_int * rpcbproc_gettime_4(); +-extern u_int * rpcbproc_gettime_4_svc(); +-extern struct netbuf * rpcbproc_uaddr2taddr_4(); +-extern struct netbuf * rpcbproc_uaddr2taddr_4_svc(); +-extern char ** rpcbproc_taddr2uaddr_4(); +-extern char ** rpcbproc_taddr2uaddr_4_svc(); +-#define RPCBPROC_GETVERSADDR ((u_int32_t)9) +-extern char ** rpcbproc_getversaddr_4(); +-extern char ** rpcbproc_getversaddr_4_svc(); +-#define RPCBPROC_INDIRECT ((u_int32_t)10) +-extern rpcb_rmtcallres * rpcbproc_indirect_4(); +-extern rpcb_rmtcallres * rpcbproc_indirect_4_svc(); +-#define RPCBPROC_GETADDRLIST ((u_int32_t)11) +-extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(); +-extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(); +-#define RPCBPROC_GETSTAT ((u_int32_t)12) +-extern rpcb_stat * rpcbproc_getstat_4(); +-extern rpcb_stat * rpcbproc_getstat_4_svc(); +-#endif /* Old Style C */ +- +-#endif /* !_RPCB_PROT_H_RPCGEN */ +diff --git a/tirpc/rpcsvc/crypt.h b/tirpc/rpcsvc/crypt.h +deleted file mode 100644 +index da1f9cc..0000000 +--- a/tirpc/rpcsvc/crypt.h ++++ /dev/null +@@ -1,109 +0,0 @@ +-/* +- * Please do not edit this file. +- * It was generated using rpcgen. +- */ +- +-#ifndef _CRYPT_H_RPCGEN +-#define _CRYPT_H_RPCGEN +- +-#include +- +-#ifndef IXDR_GET_INT32 +-#define IXDR_GET_INT32(buf) IXDR_GET_LONG((buf)) +-#endif +-#ifndef IXDR_PUT_INT32 +-#define IXDR_PUT_INT32(buf, v) IXDR_PUT_LONG((buf), (v)) +-#endif +-#ifndef IXDR_GET_U_INT32 +-#define IXDR_GET_U_INT32(buf) IXDR_GET_U_LONG((buf)) +-#endif +-#ifndef IXDR_PUT_U_INT32 +-#define IXDR_PUT_U_INT32(buf, v) IXDR_PUT_U_LONG((buf), (v)) +-#endif +- +-enum des_dir { +- ENCRYPT_DES = 0, +- DECRYPT_DES = 1, +-}; +-typedef enum des_dir des_dir; +-#ifdef __cplusplus +-extern "C" bool_t xdr_des_dir(XDR *, des_dir*); +-#elif __STDC__ +-extern bool_t xdr_des_dir(XDR *, des_dir*); +-#else /* Old Style C */ +-bool_t xdr_des_dir(); +-#endif /* Old Style C */ +- +- +-enum des_mode { +- CBC_DES = 0, +- ECB_DES = 1, +-}; +-typedef enum des_mode des_mode; +-#ifdef __cplusplus +-extern "C" bool_t xdr_des_mode(XDR *, des_mode*); +-#elif __STDC__ +-extern bool_t xdr_des_mode(XDR *, des_mode*); +-#else /* Old Style C */ +-bool_t xdr_des_mode(); +-#endif /* Old Style C */ +- +- +-struct desargs { +- u_char des_key[8]; +- des_dir des_dir; +- des_mode des_mode; +- u_char des_ivec[8]; +- struct { +- u_int desbuf_len; +- char *desbuf_val; +- } desbuf; +-}; +-typedef struct desargs desargs; +-#ifdef __cplusplus +-extern "C" bool_t xdr_desargs(XDR *, desargs*); +-#elif __STDC__ +-extern bool_t xdr_desargs(XDR *, desargs*); +-#else /* Old Style C */ +-bool_t xdr_desargs(); +-#endif /* Old Style C */ +- +- +-struct desresp { +- struct { +- u_int desbuf_len; +- char *desbuf_val; +- } desbuf; +- u_char des_ivec[8]; +- int stat; +-}; +-typedef struct desresp desresp; +-#ifdef __cplusplus +-extern "C" bool_t xdr_desresp(XDR *, desresp*); +-#elif __STDC__ +-extern bool_t xdr_desresp(XDR *, desresp*); +-#else /* Old Style C */ +-bool_t xdr_desresp(); +-#endif /* Old Style C */ +- +- +-#define CRYPT_PROG ((u_int32_t)600100029) +-#define CRYPT_VERS ((u_int32_t)1) +- +-#ifdef __cplusplus +-#define DES_CRYPT ((u_int32_t)1) +-extern "C" desresp * des_crypt_1(desargs *, CLIENT *); +-extern "C" desresp * des_crypt_1_svc(desargs *, struct svc_req *); +- +-#elif __STDC__ +-#define DES_CRYPT ((u_int32_t)1) +-extern desresp * des_crypt_1(desargs *, CLIENT *); +-extern desresp * des_crypt_1_svc(desargs *, struct svc_req *); +- +-#else /* Old Style C */ +-#define DES_CRYPT ((u_int32_t)1) +-extern desresp * des_crypt_1(); +-extern desresp * des_crypt_1_svc(); +-#endif /* Old Style C */ +- +-#endif /* !_CRYPT_H_RPCGEN */ +-- +1.9.1 + diff --git a/package/libtirpc/0005-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch b/package/libtirpc/0005-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch new file mode 100644 index 0000000000..7f53ffca16 --- /dev/null +++ b/package/libtirpc/0005-Add-more-XDR-files-needed-to-build-rpcbind-on-top-of.patch @@ -0,0 +1,1653 @@ +From baeca7ea594fe9faa1d40d35e76066c6002ca638 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 17:45:03 +0100 +Subject: [PATCH] Add more XDR files needed to build rpcbind on top of libtirpc + +Signed-off-by: Thomas Petazzoni +[yann.morin.1998@free.fr: update for 0.3.1] +Signed-off-by: "Yann E. MORIN" +--- + Makefile.am | 6 + + tirpc/rpcsvc/mount.x | 257 ++++++++++ + tirpc/rpcsvc/nfs_prot.x | 1266 +++++++++++++++++++++++++++++++++++++++++++++++ + tirpc/rpcsvc/rquota.x | 67 +++ + 4 files changed, 1596 insertions(+) + create mode 100644 tirpc/rpcsvc/mount.x + create mode 100644 tirpc/rpcsvc/nfs_prot.x + create mode 100644 tirpc/rpcsvc/rquota.x + +diff --git a/Makefile.am b/Makefile.am +index aa5908e..4999066 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,6 +2,9 @@ SUBDIRS = src man doc rpcgen + ACLOCAL_AMFLAGS = -I m4 + + GENFILES = tirpc/rpcsvc/crypt.h \ ++ tirpc/rpcsvc/mount.h \ ++ tirpc/rpcsvc/nfs_prot.h \ ++ tirpc/rpcsvc/rquota.h \ + tirpc/rpc/rpcb_prot.h + + noinst_HEADERS = tirpc/reentrant.h \ +@@ -11,6 +14,9 @@ noinst_HEADERS = tirpc/reentrant.h \ + + nobase_include_HEADERS = tirpc/netconfig.h \ + tirpc/rpcsvc/crypt.x \ ++ tirpc/rpcsvc/mount.x \ ++ tirpc/rpcsvc/nfs_prot.x \ ++ tirpc/rpcsvc/rquota.x \ + tirpc/rpc/xdr.h \ + tirpc/rpc/types.h \ + tirpc/rpc/svc_soc.h \ +diff --git a/tirpc/rpcsvc/mount.x b/tirpc/rpcsvc/mount.x +new file mode 100644 +index 0000000..f68a06f +--- /dev/null ++++ b/tirpc/rpcsvc/mount.x +@@ -0,0 +1,257 @@ ++/* ++ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for ++ * unrestricted use provided that this legend is included on all tape ++ * media and as a part of the software program in whole or part. Users ++ * may copy or modify Sun RPC without charge, but are not authorized ++ * to license or distribute it to anyone else except as part of a product or ++ * program developed by the user. ++ * ++ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE ++ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR ++ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. ++ * ++ * Sun RPC is provided with no support and without any obligation on the ++ * part of Sun Microsystems, Inc. to assist in its use, correction, ++ * modification or enhancement. ++ * ++ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE ++ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC ++ * OR ANY PART THEREOF. ++ * ++ * In no event will Sun Microsystems, Inc. be liable for any lost revenue ++ * or profits or other special, indirect and consequential damages, even if ++ * Sun has been advised of the possibility of such damages. ++ * ++ * Sun Microsystems, Inc. ++ * 2550 Garcia Avenue ++ * Mountain View, California 94043 ++ */ ++ ++/* ++ * Protocol description for the mount program ++ */ ++ ++#ifndef RPC_HDR ++%#ifndef lint ++%/*static char sccsid[] = "from: @(#)mount.x 1.2 87/09/18 Copyr 1987 Sun Micro";*/ ++%/*static char sccsid[] = "from: @(#)mount.x 2.1 88/08/01 4.0 RPCSRC";*/ ++%static const char rcsid[] = ++% "$FreeBSD: src/include/rpcsvc/mount.x,v 1.6 1999/08/27 23:45:08 peter Exp $"; ++%#endif /* not lint */ ++#endif ++ ++const MNTPATHLEN = 1024; /* maximum bytes in a pathname argument */ ++const MNTNAMLEN = 255; /* maximum bytes in a name argument */ ++const FHSIZE = 32; /* size in bytes of a file handle */ ++#ifdef WANT_NFS3 ++const FHSIZE3 = 64; /* size in bytes of a file handle (v3) */ ++#endif ++ ++/* ++ * The fhandle is the file handle that the server passes to the client. ++ * All file operations are done using the file handles to refer to a file ++ * or a directory. The file handle can contain whatever information the ++ * server needs to distinguish an individual file. ++ */ ++typedef opaque fhandle[FHSIZE]; ++#ifdef WANT_NFS3 ++typedef opaque fhandle3; ++#endif ++ ++/* ++ * If a status of zero is returned, the call completed successfully, and ++ * a file handle for the directory follows. A non-zero status indicates ++ * some sort of error. The status corresponds with UNIX error numbers. ++ */ ++union fhstatus switch (unsigned fhs_status) { ++case 0: ++ fhandle fhs_fhandle; ++default: ++ void; ++}; ++ ++#ifdef WANT_NFS3 ++/* ++ * Status codes returned by the version 3 mount call. ++ */ ++enum mountstat3 { ++ MNT3_OK = 0, /* no error */ ++ MNT3ERR_PERM = 1, /* Not owner */ ++ MNT3ERR_NOENT = 2, /* No such file or directory */ ++ MNT3ERR_IO = 5, /* I/O error */ ++ MNT3ERR_ACCES = 13, /* Permission denied */ ++ MNT3ERR_NOTDIR = 20, /* Not a directory */ ++ MNT3ERR_INVAL = 22, /* Invalid argument */ ++ MNT3ERR_NAMETOOLONG = 63, /* Filename too long */ ++ MNT3ERR_NOTSUPP = 10004, /* Operation not supported */ ++ MNT3ERR_SERVERFAULT = 10006 /* A failure on the server */ ++}; ++ ++struct mountres3_ok { ++ fhandle3 fhandle; ++ int auth_flavors<>; ++}; ++ ++union mountres3 switch (mountstat3 fhs_status) { ++case 0: ++ mountres3_ok mountinfo; ++default: ++ void; ++}; ++#endif ++ ++/* ++ * The type dirpath is the pathname of a directory ++ */ ++typedef string dirpath; ++ ++/* ++ * The type name is used for arbitrary names (hostnames, groupnames) ++ */ ++typedef string name; ++ ++/* ++ * A list of who has what mounted ++ */ ++typedef struct mountbody *mountlist; ++struct mountbody { ++ name ml_hostname; ++ dirpath ml_directory; ++ mountlist ml_next; ++}; ++ ++/* ++ * A list of netgroups ++ */ ++typedef struct groupnode *groups; ++struct groupnode { ++ name gr_name; ++ groups gr_next; ++}; ++ ++/* ++ * A list of what is exported and to whom ++ */ ++typedef struct exportnode *exports; ++struct exportnode { ++ dirpath ex_dir; ++ groups ex_groups; ++ exports ex_next; ++}; ++ ++program MOUNTPROG { ++ /* ++ * Version one of the mount protocol communicates with version two ++ * of the NFS protocol. Version three communicates with ++ * version three of the NFS protocol. The only connecting ++ * point is the fhandle structure, which is the same for both ++ * protocols. ++ */ ++ version MOUNTVERS { ++ /* ++ * Does no work. It is made available in all RPC services ++ * to allow server reponse testing and timing ++ */ ++ void ++ MOUNTPROC_NULL(void) = 0; ++ ++ /* ++ * If fhs_status is 0, then fhs_fhandle contains the ++ * file handle for the directory. This file handle may ++ * be used in the NFS protocol. This procedure also adds ++ * a new entry to the mount list for this client mounting ++ * the directory. ++ * Unix authentication required. ++ */ ++ fhstatus ++ MOUNTPROC_MNT(dirpath) = 1; ++ ++ /* ++ * Returns the list of remotely mounted filesystems. The ++ * mountlist contains one entry for each hostname and ++ * directory pair. ++ */ ++ mountlist ++ MOUNTPROC_DUMP(void) = 2; ++ ++ /* ++ * Removes the mount list entry for the directory ++ * Unix authentication required. ++ */ ++ void ++ MOUNTPROC_UMNT(dirpath) = 3; ++ ++ /* ++ * Removes all of the mount list entries for this client ++ * Unix authentication required. ++ */ ++ void ++ MOUNTPROC_UMNTALL(void) = 4; ++ ++ /* ++ * Returns a list of all the exported filesystems, and which ++ * machines are allowed to import it. ++ */ ++ exports ++ MOUNTPROC_EXPORT(void) = 5; ++ ++ /* ++ * Identical to MOUNTPROC_EXPORT above ++ */ ++ exports ++ MOUNTPROC_EXPORTALL(void) = 6; ++ } = 1; ++#ifdef WANT_NFS3 ++ version MOUNTVERS3 { ++ /* ++ * Does no work. It is made available in all RPC services ++ * to allow server reponse testing and timing ++ */ ++ void ++ MOUNTPROC_NULL(void) = 0; ++ ++ /* ++ * If mountres3.fhs_status is MNT3_OK, then ++ * mountres3.mountinfo contains the file handle for ++ * the directory and a list of acceptable ++ * authentication flavors. This file handle may only ++ * be used in the NFS version 3 protocol. This ++ * procedure also results in the server adding a new ++ * entry to its mount list recording that this client ++ * has mounted the directory. AUTH_UNIX authentication ++ * or better is required. ++ */ ++ mountres3 ++ MOUNTPROC_MNT(dirpath) = 1; ++ ++ /* ++ * Returns the list of remotely mounted filesystems. The ++ * mountlist contains one entry for each hostname and ++ * directory pair. ++ */ ++ mountlist ++ MOUNTPROC_DUMP(void) = 2; ++ ++ /* ++ * Removes the mount list entry for the directory ++ * Unix authentication required. ++ */ ++ void ++ MOUNTPROC_UMNT(dirpath) = 3; ++ ++ /* ++ * Removes all of the mount list entries for this client ++ * Unix authentication required. ++ */ ++ void ++ MOUNTPROC_UMNTALL(void) = 4; ++ ++ /* ++ * Returns a list of all the exported filesystems, and which ++ * machines are allowed to import it. ++ */ ++ exports ++ MOUNTPROC_EXPORT(void) = 5; ++ } = 3; ++#endif ++} = 100005; +diff --git a/tirpc/rpcsvc/nfs_prot.x b/tirpc/rpcsvc/nfs_prot.x +new file mode 100644 +index 0000000..01564f8 +--- /dev/null ++++ b/tirpc/rpcsvc/nfs_prot.x +@@ -0,0 +1,1266 @@ ++/* ++ * Sun RPC is a product of Sun Microsystems, Inc. and is provided for ++ * unrestricted use provided that this legend is included on all tape ++ * media and as a part of the software program in whole or part. Users ++ * may copy or modify Sun RPC without charge, but are not authorized ++ * to license or distribute it to anyone else except as part of a product or ++ * program developed by the user. ++ * ++ * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE ++ * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR ++ * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. ++ * ++ * Sun RPC is provided with no support and without any obligation on the ++ * part of Sun Microsystems, Inc. to assist in its use, correction, ++ * modification or enhancement. ++ * ++ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE ++ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC ++ * OR ANY PART THEREOF. ++ * ++ * In no event will Sun Microsystems, Inc. be liable for any lost revenue ++ * or profits or other special, indirect and consequential damages, even if ++ * Sun has been advised of the possibility of such damages. ++ * ++ * Sun Microsystems, Inc. ++ * 2550 Garcia Avenue ++ * Mountain View, California 94043 ++ */ ++ ++#ifndef RPC_HDR ++%#ifndef lint ++%/*static char sccsid[] = "from: @(#)nfs_prot.x 1.2 87/10/12 Copyr 1987 Sun Micro";*/ ++%/*static char sccsid[] = "from: @(#)nfs_prot.x 2.1 88/08/01 4.0 RPCSRC";*/ ++%static const char rcsid[] = ++% "$FreeBSD: src/include/rpcsvc/nfs_prot.x,v 1.7 1999/08/27 23:45:08 peter Exp $"; ++%#endif /* not lint */ ++#endif ++ ++const NFS_PORT = 2049; ++const NFS_MAXDATA = 8192; ++const NFS_MAXPATHLEN = 1024; ++const NFS_MAXNAMLEN = 255; ++const NFS_FHSIZE = 32; ++const NFS_COOKIESIZE = 4; ++const NFS_FIFO_DEV = -1; /* size kludge for named pipes */ ++ ++/* ++ * File types ++ */ ++const NFSMODE_FMT = 0170000; /* type of file */ ++const NFSMODE_DIR = 0040000; /* directory */ ++const NFSMODE_CHR = 0020000; /* character special */ ++const NFSMODE_BLK = 0060000; /* block special */ ++const NFSMODE_REG = 0100000; /* regular */ ++const NFSMODE_LNK = 0120000; /* symbolic link */ ++const NFSMODE_SOCK = 0140000; /* socket */ ++const NFSMODE_FIFO = 0010000; /* fifo */ ++ ++/* ++ * Error status ++ */ ++enum nfsstat { ++ NFS_OK= 0, /* no error */ ++ NFSERR_PERM=1, /* Not owner */ ++ NFSERR_NOENT=2, /* No such file or directory */ ++ NFSERR_IO=5, /* I/O error */ ++ NFSERR_NXIO=6, /* No such device or address */ ++ NFSERR_ACCES=13, /* Permission denied */ ++ NFSERR_EXIST=17, /* File exists */ ++ NFSERR_NODEV=19, /* No such device */ ++ NFSERR_NOTDIR=20, /* Not a directory*/ ++ NFSERR_ISDIR=21, /* Is a directory */ ++ NFSERR_FBIG=27, /* File too large */ ++ NFSERR_NOSPC=28, /* No space left on device */ ++ NFSERR_ROFS=30, /* Read-only file system */ ++ NFSERR_NAMETOOLONG=63, /* File name too long */ ++ NFSERR_NOTEMPTY=66, /* Directory not empty */ ++ NFSERR_DQUOT=69, /* Disc quota exceeded */ ++ NFSERR_STALE=70, /* Stale NFS file handle */ ++ NFSERR_WFLUSH=99 /* write cache flushed */ ++}; ++ ++/* ++ * File types ++ */ ++enum ftype { ++ NFNON = 0, /* non-file */ ++ NFREG = 1, /* regular file */ ++ NFDIR = 2, /* directory */ ++ NFBLK = 3, /* block special */ ++ NFCHR = 4, /* character special */ ++ NFLNK = 5, /* symbolic link */ ++ NFSOCK = 6, /* unix domain sockets */ ++ NFBAD = 7, /* unused */ ++ NFFIFO = 8 /* named pipe */ ++}; ++ ++/* ++ * File access handle ++ */ ++struct nfs_fh { ++ opaque data[NFS_FHSIZE]; ++}; ++ ++/* ++ * Timeval ++ */ ++struct nfstime { ++ unsigned seconds; ++ unsigned useconds; ++}; ++ ++ ++/* ++ * File attributes ++ */ ++struct fattr { ++ ftype type; /* file type */ ++ unsigned mode; /* protection mode bits */ ++ unsigned nlink; /* # hard links */ ++ unsigned uid; /* owner user id */ ++ unsigned gid; /* owner group id */ ++ unsigned size; /* file size in bytes */ ++ unsigned blocksize; /* prefered block size */ ++ unsigned rdev; /* special device # */ ++ unsigned blocks; /* Kb of disk used by file */ ++ unsigned fsid; /* device # */ ++ unsigned fileid; /* inode # */ ++ nfstime atime; /* time of last access */ ++ nfstime mtime; /* time of last modification */ ++ nfstime ctime; /* time of last change */ ++}; ++ ++/* ++ * File attributes which can be set ++ */ ++struct sattr { ++ unsigned mode; /* protection mode bits */ ++ unsigned uid; /* owner user id */ ++ unsigned gid; /* owner group id */ ++ unsigned size; /* file size in bytes */ ++ nfstime atime; /* time of last access */ ++ nfstime mtime; /* time of last modification */ ++}; ++ ++ ++typedef string filename; ++typedef string nfspath; ++ ++/* ++ * Reply status with file attributes ++ */ ++union attrstat switch (nfsstat status) { ++case NFS_OK: ++ fattr attributes; ++default: ++ void; ++}; ++ ++struct sattrargs { ++ nfs_fh file; ++ sattr attributes; ++}; ++ ++/* ++ * Arguments for directory operations ++ */ ++struct diropargs { ++ nfs_fh dir; /* directory file handle */ ++ filename name; /* name (up to NFS_MAXNAMLEN bytes) */ ++}; ++ ++struct diropokres { ++ nfs_fh file; ++ fattr attributes; ++}; ++ ++/* ++ * Results from directory operation ++ */ ++union diropres switch (nfsstat status) { ++case NFS_OK: ++ diropokres diropres; ++default: ++ void; ++}; ++ ++union readlinkres switch (nfsstat status) { ++case NFS_OK: ++ nfspath data; ++default: ++ void; ++}; ++ ++/* ++ * Arguments to remote read ++ */ ++struct readargs { ++ nfs_fh file; /* handle for file */ ++ unsigned offset; /* byte offset in file */ ++ unsigned count; /* immediate read count */ ++ unsigned totalcount; /* total read count (from this offset)*/ ++}; ++ ++/* ++ * Status OK portion of remote read reply ++ */ ++struct readokres { ++ fattr attributes; /* attributes, need for pagin*/ ++ opaque data; ++}; ++ ++union readres switch (nfsstat status) { ++case NFS_OK: ++ readokres reply; ++default: ++ void; ++}; ++ ++/* ++ * Arguments to remote write ++ */ ++struct writeargs { ++ nfs_fh file; /* handle for file */ ++ unsigned beginoffset; /* beginning byte offset in file */ ++ unsigned offset; /* current byte offset in file */ ++ unsigned totalcount; /* total write count (to this offset)*/ ++ opaque data; ++}; ++ ++struct createargs { ++ diropargs where; ++ sattr attributes; ++}; ++ ++struct renameargs { ++ diropargs from; ++ diropargs to; ++}; ++ ++struct linkargs { ++ nfs_fh from; ++ diropargs to; ++}; ++ ++struct symlinkargs { ++ diropargs from; ++ nfspath to; ++ sattr attributes; ++}; ++ ++ ++typedef opaque nfscookie[NFS_COOKIESIZE]; ++ ++/* ++ * Arguments to readdir ++ */ ++struct readdirargs { ++ nfs_fh dir; /* directory handle */ ++ nfscookie cookie; ++ unsigned count; /* number of directory bytes to read */ ++}; ++ ++struct entry { ++ unsigned fileid; ++ filename name; ++ nfscookie cookie; ++ entry *nextentry; ++}; ++ ++struct dirlist { ++ entry *entries; ++ bool eof; ++}; ++ ++union readdirres switch (nfsstat status) { ++case NFS_OK: ++ dirlist reply; ++default: ++ void; ++}; ++ ++struct statfsokres { ++ unsigned tsize; /* preferred transfer size in bytes */ ++ unsigned bsize; /* fundamental file system block size */ ++ unsigned blocks; /* total blocks in file system */ ++ unsigned bfree; /* free blocks in fs */ ++ unsigned bavail; /* free blocks avail to non-superuser */ ++}; ++ ++union statfsres switch (nfsstat status) { ++case NFS_OK: ++ statfsokres reply; ++default: ++ void; ++}; ++ ++#ifdef WANT_NFS3 ++ ++/* ++ * NFSv3 constants and types ++ */ ++const NFS3_FHSIZE = 64; /* maximum size in bytes of a file handle */ ++const NFS3_COOKIEVERFSIZE = 8; /* size of a cookie verifier for READDIR */ ++const NFS3_CREATEVERFSIZE = 8; /* size of the verifier used for CREATE */ ++const NFS3_WRITEVERFSIZE = 8; /* size of the verifier used for WRITE */ ++ ++typedef unsigned hyper uint64; ++typedef hyper int64; ++typedef unsigned long uint32; ++typedef long int32; ++typedef string filename3<>; ++typedef string nfspath3<>; ++typedef uint64 fileid3; ++typedef uint64 cookie3; ++typedef opaque cookieverf3[NFS3_COOKIEVERFSIZE]; ++typedef opaque createverf3[NFS3_CREATEVERFSIZE]; ++typedef opaque writeverf3[NFS3_WRITEVERFSIZE]; ++typedef uint32 uid3; ++typedef uint32 gid3; ++typedef uint64 size3; ++typedef uint64 offset3; ++typedef uint32 mode3; ++typedef uint32 count3; ++ ++/* ++ * Error status (v3) ++ */ ++enum nfsstat3 { ++ NFS3_OK = 0, ++ NFS3ERR_PERM = 1, ++ NFS3ERR_NOENT = 2, ++ NFS3ERR_IO = 5, ++ NFS3ERR_NXIO = 6, ++ NFS3ERR_ACCES = 13, ++ NFS3ERR_EXIST = 17, ++ NFS3ERR_XDEV = 18, ++ NFS3ERR_NODEV = 19, ++ NFS3ERR_NOTDIR = 20, ++ NFS3ERR_ISDIR = 21, ++ NFS3ERR_INVAL = 22, ++ NFS3ERR_FBIG = 27, ++ NFS3ERR_NOSPC = 28, ++ NFS3ERR_ROFS = 30, ++ NFS3ERR_MLINK = 31, ++ NFS3ERR_NAMETOOLONG = 63, ++ NFS3ERR_NOTEMPTY = 66, ++ NFS3ERR_DQUOT = 69, ++ NFS3ERR_STALE = 70, ++ NFS3ERR_REMOTE = 71, ++ NFS3ERR_BADHANDLE = 10001, ++ NFS3ERR_NOT_SYNC = 10002, ++ NFS3ERR_BAD_COOKIE = 10003, ++ NFS3ERR_NOTSUPP = 10004, ++ NFS3ERR_TOOSMALL = 10005, ++ NFS3ERR_SERVERFAULT = 10006, ++ NFS3ERR_BADTYPE = 10007, ++ NFS3ERR_JUKEBOX = 10008 ++}; ++ ++/* ++ * File types (v3) ++ */ ++enum ftype3 { ++ NF3REG = 1, /* regular file */ ++ NF3DIR = 2, /* directory */ ++ NF3BLK = 3, /* block special */ ++ NF3CHR = 4, /* character special */ ++ NF3LNK = 5, /* symbolic link */ ++ NF3SOCK = 6, /* unix domain sockets */ ++ NF3FIFO = 7 /* named pipe */ ++}; ++ ++struct specdata3 { ++ uint32 specdata1; ++ uint32 specdata2; ++}; ++ ++/* ++ * File access handle (v3) ++ */ ++struct nfs_fh3 { ++ opaque data; ++}; ++ ++/* ++ * Timeval (v3) ++ */ ++struct nfstime3 { ++ uint32 seconds; ++ uint32 nseconds; ++}; ++ ++ ++/* ++ * File attributes (v3) ++ */ ++struct fattr3 { ++ ftype3 type; /* file type */ ++ mode3 mode; /* protection mode bits */ ++ uint32 nlink; /* # hard links */ ++ uid3 uid; /* owner user id */ ++ gid3 gid; /* owner group id */ ++ size3 size; /* file size in bytes */ ++ size3 used; /* prefered block size */ ++ specdata3 rdev; /* special device # */ ++ uint64 fsid; /* device # */ ++ fileid3 fileid; /* inode # */ ++ nfstime3 atime; /* time of last access */ ++ nfstime3 mtime; /* time of last modification */ ++ nfstime3 ctime; /* time of last change */ ++}; ++ ++union post_op_attr switch (bool attributes_follow) { ++case TRUE: ++ fattr3 attributes; ++case FALSE: ++ void; ++}; ++ ++struct wcc_attr { ++ size3 size; ++ nfstime3 mtime; ++ nfstime3 ctime; ++}; ++ ++union pre_op_attr switch (bool attributes_follow) { ++case TRUE: ++ wcc_attr attributes; ++case FALSE: ++ void; ++}; ++ ++struct wcc_data { ++ pre_op_attr before; ++ post_op_attr after; ++}; ++ ++union post_op_fh3 switch (bool handle_follows) { ++case TRUE: ++ nfs_fh3 handle; ++case FALSE: ++ void; ++}; ++ ++/* ++ * File attributes which can be set (v3) ++ */ ++enum time_how { ++ DONT_CHANGE = 0, ++ SET_TO_SERVER_TIME = 1, ++ SET_TO_CLIENT_TIME = 2 ++}; ++ ++union set_mode3 switch (bool set_it) { ++case TRUE: ++ mode3 mode; ++default: ++ void; ++}; ++ ++union set_uid3 switch (bool set_it) { ++case TRUE: ++ uid3 uid; ++default: ++ void; ++}; ++ ++union set_gid3 switch (bool set_it) { ++case TRUE: ++ gid3 gid; ++default: ++ void; ++}; ++ ++union set_size3 switch (bool set_it) { ++case TRUE: ++ size3 size; ++default: ++ void; ++}; ++ ++union set_atime switch (time_how set_it) { ++case SET_TO_CLIENT_TIME: ++ nfstime3 atime; ++default: ++ void; ++}; ++ ++union set_mtime switch (time_how set_it) { ++case SET_TO_CLIENT_TIME: ++ nfstime3 mtime; ++default: ++ void; ++}; ++ ++struct sattr3 { ++ set_mode3 mode; ++ set_uid3 uid; ++ set_gid3 gid; ++ set_size3 size; ++ set_atime atime; ++ set_mtime mtime; ++}; ++ ++/* ++ * Arguments for directory operations (v3) ++ */ ++struct diropargs3 { ++ nfs_fh3 dir; /* directory file handle */ ++ filename3 name; /* name (up to NFS_MAXNAMLEN bytes) */ ++}; ++ ++/* ++ * Arguments to getattr (v3). ++ */ ++struct GETATTR3args { ++ nfs_fh3 object; ++}; ++ ++struct GETATTR3resok { ++ fattr3 obj_attributes; ++}; ++ ++union GETATTR3res switch (nfsstat3 status) { ++case NFS3_OK: ++ GETATTR3resok resok; ++default: ++ void; ++}; ++ ++/* ++ * Arguments to setattr (v3). ++ */ ++union sattrguard3 switch (bool check) { ++case TRUE: ++ nfstime3 obj_ctime; ++case FALSE: ++ void; ++}; ++ ++struct SETATTR3args { ++ nfs_fh3 object; ++ sattr3 new_attributes; ++ sattrguard3 guard; ++}; ++ ++struct SETATTR3resok { ++ wcc_data obj_wcc; ++}; ++ ++struct SETATTR3resfail { ++ wcc_data obj_wcc; ++}; ++ ++union SETATTR3res switch (nfsstat3 status) { ++case NFS3_OK: ++ SETATTR3resok resok; ++default: ++ SETATTR3resfail resfail; ++}; ++ ++/* ++ * Arguments to lookup (v3). ++ */ ++struct LOOKUP3args { ++ diropargs3 what; ++}; ++ ++struct LOOKUP3resok { ++ nfs_fh3 object; ++ post_op_attr obj_attributes; ++ post_op_attr dir_attributes; ++}; ++ ++struct LOOKUP3resfail { ++ post_op_attr dir_attributes; ++}; ++ ++union LOOKUP3res switch (nfsstat3 status) { ++case NFS3_OK: ++ LOOKUP3resok resok; ++default: ++ LOOKUP3resfail resfail; ++}; ++ ++/* ++ * Arguments to access (v3). ++ */ ++const ACCESS3_READ = 0x0001; ++const ACCESS3_LOOKUP = 0x0002; ++const ACCESS3_MODIFY = 0x0004; ++const ACCESS3_EXTEND = 0x0008; ++const ACCESS3_DELETE = 0x0010; ++const ACCESS3_EXECUTE = 0x0020; ++ ++struct ACCESS3args { ++ nfs_fh3 object; ++ uint32 access; ++}; ++ ++struct ACCESS3resok { ++ post_op_attr obj_attributes; ++ uint32 access; ++}; ++ ++struct ACCESS3resfail { ++ post_op_attr obj_attributes; ++}; ++ ++union ACCESS3res switch (nfsstat3 status) { ++case NFS3_OK: ++ ACCESS3resok resok; ++default: ++ ACCESS3resfail resfail; ++}; ++ ++/* ++ * Arguments to readlink (v3). ++ */ ++struct READLINK3args { ++ nfs_fh3 symlink; ++}; ++ ++struct READLINK3resok { ++ post_op_attr symlink_attributes; ++ nfspath3 data; ++}; ++ ++struct READLINK3resfail { ++ post_op_attr symlink_attributes; ++}; ++ ++union READLINK3res switch (nfsstat3 status) { ++case NFS3_OK: ++ READLINK3resok resok; ++default: ++ READLINK3resfail resfail; ++}; ++ ++/* ++ * Arguments to read (v3). ++ */ ++struct READ3args { ++ nfs_fh3 file; ++ offset3 offset; ++ count3 count; ++}; ++ ++struct READ3resok { ++ post_op_attr file_attributes; ++ count3 count; ++ bool eof; ++ opaque data<>; ++}; ++ ++struct READ3resfail { ++ post_op_attr file_attributes; ++}; ++ ++/* XXX: solaris 2.6 uses ``nfsstat'' here */ ++union READ3res switch (nfsstat3 status) { ++case NFS3_OK: ++ READ3resok resok; ++default: ++ READ3resfail resfail; ++}; ++ ++/* ++ * Arguments to write (v3). ++ */ ++enum stable_how { ++ UNSTABLE = 0, ++ DATA_SYNC = 1, ++ FILE_SYNC = 2 ++}; ++ ++struct WRITE3args { ++ nfs_fh3 file; ++ offset3 offset; ++ count3 count; ++ stable_how stable; ++ opaque data<>; ++}; ++ ++struct WRITE3resok { ++ wcc_data file_wcc; ++ count3 count; ++ stable_how committed; ++ writeverf3 verf; ++}; ++ ++struct WRITE3resfail { ++ wcc_data file_wcc; ++}; ++ ++union WRITE3res switch (nfsstat3 status) { ++case NFS3_OK: ++ WRITE3resok resok; ++default: ++ WRITE3resfail resfail; ++}; ++ ++/* ++ * Arguments to create (v3). ++ */ ++enum createmode3 { ++ UNCHECKED = 0, ++ GUARDED = 1, ++ EXCLUSIVE = 2 ++}; ++ ++union createhow3 switch (createmode3 mode) { ++case UNCHECKED: ++case GUARDED: ++ sattr3 obj_attributes; ++case EXCLUSIVE: ++ createverf3 verf; ++}; ++ ++struct CREATE3args { ++ diropargs3 where; ++ createhow3 how; ++}; ++ ++struct CREATE3resok { ++ post_op_fh3 obj; ++ post_op_attr obj_attributes; ++ wcc_data dir_wcc; ++}; ++ ++struct CREATE3resfail { ++ wcc_data dir_wcc; ++}; ++ ++union CREATE3res switch (nfsstat3 status) { ++case NFS3_OK: ++ CREATE3resok resok; ++default: ++ CREATE3resfail resfail; ++}; ++ ++/* ++ * Arguments to mkdir (v3). ++ */ ++struct MKDIR3args { ++ diropargs3 where; ++ sattr3 attributes; ++}; ++ ++struct MKDIR3resok { ++ post_op_fh3 obj; ++ post_op_attr obj_attributes; ++ wcc_data dir_wcc; ++}; ++ ++struct MKDIR3resfail { ++ wcc_data dir_wcc; ++}; ++ ++union MKDIR3res switch (nfsstat3 status) { ++case NFS3_OK: ++ MKDIR3resok resok; ++default: ++ MKDIR3resfail resfail; ++}; ++ ++/* ++ * Arguments to symlink (v3). ++ */ ++struct symlinkdata3 { ++ sattr3 symlink_attributes; ++ nfspath3 symlink_data; ++}; ++ ++struct SYMLINK3args { ++ diropargs3 where; ++ symlinkdata3 symlink; ++}; ++ ++struct SYMLINK3resok { ++ post_op_fh3 obj; ++ post_op_attr obj_attributes; ++ wcc_data dir_wcc; ++}; ++ ++struct SYMLINK3resfail { ++ wcc_data dir_wcc; ++}; ++ ++union SYMLINK3res switch (nfsstat3 status) { ++case NFS3_OK: ++ SYMLINK3resok resok; ++default: ++ SYMLINK3resfail resfail; ++}; ++ ++/* ++ * Arguments to mknod (v3). ++ */ ++struct devicedata3 { ++ sattr3 dev_attributes; ++ specdata3 spec; ++}; ++ ++union mknoddata3 switch (ftype3 type) { ++case NF3CHR: ++case NF3BLK: ++ devicedata3 device; ++case NF3SOCK: ++case NF3FIFO: ++ sattr3 pipe_attributes; ++default: ++ void; ++}; ++ ++struct MKNOD3args { ++ diropargs3 where; ++ mknoddata3 what; ++}; ++ ++struct MKNOD3resok { ++ post_op_fh3 obj; ++ post_op_attr obj_attributes; ++ wcc_data dir_wcc; ++}; ++ ++struct MKNOD3resfail { ++ wcc_data dir_wcc; ++}; ++ ++union MKNOD3res switch (nfsstat3 status) { ++case NFS3_OK: ++ MKNOD3resok resok; ++default: ++ MKNOD3resfail resfail; ++}; ++ ++/* ++ * Arguments to remove (v3). ++ */ ++struct REMOVE3args { ++ diropargs3 object; ++}; ++ ++struct REMOVE3resok { ++ wcc_data dir_wcc; ++}; ++ ++struct REMOVE3resfail { ++ wcc_data dir_wcc; ++}; ++ ++union REMOVE3res switch (nfsstat3 status) { ++case NFS3_OK: ++ REMOVE3resok resok; ++default: ++ REMOVE3resfail resfail; ++}; ++ ++/* ++ * Arguments to rmdir (v3). ++ */ ++struct RMDIR3args { ++ diropargs3 object; ++}; ++ ++struct RMDIR3resok { ++ wcc_data dir_wcc; ++}; ++ ++struct RMDIR3resfail { ++ wcc_data dir_wcc; ++}; ++ ++union RMDIR3res switch (nfsstat3 status) { ++case NFS3_OK: ++ RMDIR3resok resok; ++default: ++ RMDIR3resfail resfail; ++}; ++ ++/* ++ * Arguments to rename (v3). ++ */ ++struct RENAME3args { ++ diropargs3 from; ++ diropargs3 to; ++}; ++ ++struct RENAME3resok { ++ wcc_data fromdir_wcc; ++ wcc_data todir_wcc; ++}; ++ ++struct RENAME3resfail { ++ wcc_data fromdir_wcc; ++ wcc_data todir_wcc; ++}; ++ ++union RENAME3res switch (nfsstat3 status) { ++case NFS3_OK: ++ RENAME3resok resok; ++default: ++ RENAME3resfail resfail; ++}; ++ ++/* ++ * Arguments to link (v3). ++ */ ++struct LINK3args { ++ nfs_fh3 file; ++ diropargs3 link; ++}; ++ ++struct LINK3resok { ++ post_op_attr file_attributes; ++ wcc_data linkdir_wcc; ++}; ++ ++struct LINK3resfail { ++ post_op_attr file_attributes; ++ wcc_data linkdir_wcc; ++}; ++ ++union LINK3res switch (nfsstat3 status) { ++case NFS3_OK: ++ LINK3resok resok; ++default: ++ LINK3resfail resfail; ++}; ++ ++/* ++ * Arguments to readdir (v3). ++ */ ++struct READDIR3args { ++ nfs_fh3 dir; ++ cookie3 cookie; ++ cookieverf3 cookieverf; ++ count3 count; ++}; ++ ++struct entry3 { ++ fileid3 fileid; ++ filename3 name; ++ cookie3 cookie; ++ entry3 *nextentry; ++}; ++ ++struct dirlist3 { ++ entry3 *entries; ++ bool eof; ++}; ++ ++struct READDIR3resok { ++ post_op_attr dir_attributes; ++ cookieverf3 cookieverf; ++ dirlist3 reply; ++}; ++ ++struct READDIR3resfail { ++ post_op_attr dir_attributes; ++}; ++ ++union READDIR3res switch (nfsstat3 status) { ++case NFS3_OK: ++ READDIR3resok resok; ++default: ++ READDIR3resfail resfail; ++}; ++ ++/* ++ * Arguments to readdirplus (v3). ++ */ ++struct READDIRPLUS3args { ++ nfs_fh3 dir; ++ cookie3 cookie; ++ cookieverf3 cookieverf; ++ count3 dircount; ++ count3 maxcount; ++}; ++ ++struct entryplus3 { ++ fileid3 fileid; ++ filename3 name; ++ cookie3 cookie; ++ post_op_attr name_attributes; ++ post_op_fh3 name_handle; ++ entryplus3 *nextentry; ++}; ++ ++struct dirlistplus3 { ++ entryplus3 *entries; ++ bool eof; ++}; ++ ++struct READDIRPLUS3resok { ++ post_op_attr dir_attributes; ++ cookieverf3 cookieverf; ++ dirlistplus3 reply; ++}; ++ ++struct READDIRPLUS3resfail { ++ post_op_attr dir_attributes; ++}; ++ ++union READDIRPLUS3res switch (nfsstat3 status) { ++case NFS3_OK: ++ READDIRPLUS3resok resok; ++default: ++ READDIRPLUS3resfail resfail; ++}; ++ ++/* ++ * Arguments to fsstat (v3). ++ */ ++struct FSSTAT3args { ++ nfs_fh3 fsroot; ++}; ++ ++struct FSSTAT3resok { ++ post_op_attr obj_attributes; ++ size3 tbytes; ++ size3 fbytes; ++ size3 abytes; ++ size3 tfiles; ++ size3 ffiles; ++ size3 afiles; ++ uint32 invarsec; ++}; ++ ++struct FSSTAT3resfail { ++ post_op_attr obj_attributes; ++}; ++ ++union FSSTAT3res switch (nfsstat3 status) { ++case NFS3_OK: ++ FSSTAT3resok resok; ++default: ++ FSSTAT3resfail resfail; ++}; ++ ++/* ++ * Arguments to fsinfo (v3). ++ */ ++const FSF3_LINK = 0x0001; ++const FSF3_SYMLINK = 0x0002; ++const FSF3_HOMOGENEOUS = 0x0008; ++const FSF3_CANSETTIME = 0x0010; ++ ++struct FSINFO3args { ++ nfs_fh3 fsroot; ++}; ++ ++struct FSINFO3resok { ++ post_op_attr obj_attributes; ++ uint32 rtmax; ++ uint32 rtpref; ++ uint32 rtmult; ++ uint32 wtmax; ++ uint32 wtpref; ++ uint32 wtmult; ++ uint32 dtpref; ++ size3 maxfilesize; ++ nfstime3 time_delta; ++ uint32 properties; ++}; ++ ++struct FSINFO3resfail { ++ post_op_attr obj_attributes; ++}; ++ ++union FSINFO3res switch (nfsstat3 status) { ++case NFS3_OK: ++ FSINFO3resok resok; ++default: ++ FSINFO3resfail resfail; ++}; ++ ++/* ++ * Arguments to pathconf (v3). ++ */ ++struct PATHCONF3args { ++ nfs_fh3 object; ++}; ++ ++struct PATHCONF3resok { ++ post_op_attr obj_attributes; ++ uint32 linkmax; ++ uint32 name_max; ++ bool no_trunc; ++ bool chown_restricted; ++ bool case_insensitive; ++ bool case_preserving; ++}; ++ ++struct PATHCONF3resfail { ++ post_op_attr obj_attributes; ++}; ++ ++union PATHCONF3res switch (nfsstat3 status) { ++case NFS3_OK: ++ PATHCONF3resok resok; ++default: ++ PATHCONF3resfail resfail; ++}; ++ ++/* ++ * Arguments to commit (v3). ++ */ ++struct COMMIT3args { ++ nfs_fh3 file; ++ offset3 offset; ++ count3 count; ++}; ++ ++struct COMMIT3resok { ++ wcc_data file_wcc; ++ writeverf3 verf; ++}; ++ ++struct COMMIT3resfail { ++ wcc_data file_wcc; ++}; ++ ++union COMMIT3res switch (nfsstat3 status) { ++case NFS3_OK: ++ COMMIT3resok resok; ++default: ++ COMMIT3resfail resfail; ++}; ++ ++#endif /* WANT_NFS3 */ ++ ++/* ++ * Remote file service routines ++ */ ++program NFS_PROGRAM { ++ version NFS_VERSION { ++ void ++ NFSPROC_NULL(void) = 0; ++ ++ attrstat ++ NFSPROC_GETATTR(nfs_fh) = 1; ++ ++ attrstat ++ NFSPROC_SETATTR(sattrargs) = 2; ++ ++ void ++ NFSPROC_ROOT(void) = 3; ++ ++ diropres ++ NFSPROC_LOOKUP(diropargs) = 4; ++ ++ readlinkres ++ NFSPROC_READLINK(nfs_fh) = 5; ++ ++ readres ++ NFSPROC_READ(readargs) = 6; ++ ++ void ++ NFSPROC_WRITECACHE(void) = 7; ++ ++ attrstat ++ NFSPROC_WRITE(writeargs) = 8; ++ ++ diropres ++ NFSPROC_CREATE(createargs) = 9; ++ ++ nfsstat ++ NFSPROC_REMOVE(diropargs) = 10; ++ ++ nfsstat ++ NFSPROC_RENAME(renameargs) = 11; ++ ++ nfsstat ++ NFSPROC_LINK(linkargs) = 12; ++ ++ nfsstat ++ NFSPROC_SYMLINK(symlinkargs) = 13; ++ ++ diropres ++ NFSPROC_MKDIR(createargs) = 14; ++ ++ nfsstat ++ NFSPROC_RMDIR(diropargs) = 15; ++ ++ readdirres ++ NFSPROC_READDIR(readdirargs) = 16; ++ ++ statfsres ++ NFSPROC_STATFS(nfs_fh) = 17; ++ } = 2; ++} = 100003; ++#ifdef WANT_NFS3 ++program NFS3_PROGRAM { ++ version NFS_V3 { ++ void ++ NFSPROC3_NULL(void) = 0; ++ ++ GETATTR3res ++ NFSPROC3_GETATTR(GETATTR3args) = 1; ++ ++ SETATTR3res ++ NFSPROC3_SETATTR(SETATTR3args) = 2; ++ ++ LOOKUP3res ++ NFSPROC3_LOOKUP(LOOKUP3args) = 3; ++ ++ ACCESS3res ++ NFSPROC3_ACCESS(ACCESS3args) = 4; ++ ++ READLINK3res ++ NFSPROC3_READLINK(READLINK3args) = 5; ++ ++ READ3res ++ NFSPROC3_READ(READ3args) = 6; ++ ++ WRITE3res ++ NFSPROC3_WRITE(WRITE3args) = 7; ++ ++ CREATE3res ++ NFSPROC3_CREATE(CREATE3args) = 8; ++ ++ MKDIR3res ++ NFSPROC3_MKDIR(MKDIR3args) = 9; ++ ++ SYMLINK3res ++ NFSPROC3_SYMLINK(SYMLINK3args) = 10; ++ ++ MKNOD3res ++ NFSPROC3_MKNOD(MKNOD3args) = 11; ++ ++ REMOVE3res ++ NFSPROC3_REMOVE(REMOVE3args) = 12; ++ ++ RMDIR3res ++ NFSPROC3_RMDIR(RMDIR3args) = 13; ++ ++ RENAME3res ++ NFSPROC3_RENAME(RENAME3args) = 14; ++ ++ LINK3res ++ NFSPROC3_LINK(LINK3args) = 15; ++ ++ READDIR3res ++ NFSPROC3_READDIR(READDIR3args) = 16; ++ ++ READDIRPLUS3res ++ NFSPROC3_READDIRPLUS(READDIRPLUS3args) = 17; ++ ++ FSSTAT3res ++ NFSPROC3_FSSTAT(FSSTAT3args) = 18; ++ ++ FSINFO3res ++ NFSPROC3_FSINFO(FSINFO3args) = 19; ++ ++ PATHCONF3res ++ NFSPROC3_PATHCONF(PATHCONF3args) = 20; ++ ++ COMMIT3res ++ NFSPROC3_COMMIT(COMMIT3args) = 21; ++ } = 3; ++} = 100003; ++#endif ++ +diff --git a/tirpc/rpcsvc/rquota.x b/tirpc/rpcsvc/rquota.x +new file mode 100644 +index 0000000..72864d1 +--- /dev/null ++++ b/tirpc/rpcsvc/rquota.x +@@ -0,0 +1,67 @@ ++/* ++ * Remote quota protocol ++ * Requires unix authentication ++ */ ++ ++#ifndef RPC_HDR ++%#ifndef lint ++%/*static char sccsid[] = "from: @(#)rquota.x 1.2 87/09/20 Copyr 1987 Sun Micro";*/ ++%/*static char sccsid[] = "from: @(#)rquota.x 2.1 88/08/01 4.0 RPCSRC";*/ ++%static const char rcsid[] = ++% "$FreeBSD: src/include/rpcsvc/rquota.x,v 1.6 1999/08/27 23:45:10 peter Exp $"; ++%#endif /* not lint */ ++#endif ++ ++const RQ_PATHLEN = 1024; ++ ++struct getquota_args { ++ string gqa_pathp; /* path to filesystem of interest */ ++ int gqa_uid; /* inquire about quota for uid */ ++}; ++ ++/* ++ * remote quota structure ++ */ ++struct rquota { ++ int rq_bsize; /* block size for block counts */ ++ bool rq_active; /* indicates whether quota is active */ ++ unsigned int rq_bhardlimit; /* absolute limit on disk blks alloc */ ++ unsigned int rq_bsoftlimit; /* preferred limit on disk blks */ ++ unsigned int rq_curblocks; /* current block count */ ++ unsigned int rq_fhardlimit; /* absolute limit on allocated files */ ++ unsigned int rq_fsoftlimit; /* preferred file limit */ ++ unsigned int rq_curfiles; /* current # allocated files */ ++ unsigned int rq_btimeleft; /* time left for excessive disk use */ ++ unsigned int rq_ftimeleft; /* time left for excessive files */ ++}; ++ ++enum gqr_status { ++ Q_OK = 1, /* quota returned */ ++ Q_NOQUOTA = 2, /* noquota for uid */ ++ Q_EPERM = 3 /* no permission to access quota */ ++}; ++ ++union getquota_rslt switch (gqr_status status) { ++case Q_OK: ++ rquota gqr_rquota; /* valid if status == Q_OK */ ++case Q_NOQUOTA: ++ void; ++case Q_EPERM: ++ void; ++}; ++ ++program RQUOTAPROG { ++ version RQUOTAVERS { ++ /* ++ * Get all quotas ++ */ ++ getquota_rslt ++ RQUOTAPROC_GETQUOTA(getquota_args) = 1; ++ ++ /* ++ * Get active quotas only ++ */ ++ getquota_rslt ++ RQUOTAPROC_GETACTIVEQUOTA(getquota_args) = 2; ++ } = 1; ++} = 100011; +-- +1.9.1 + diff --git a/package/libtirpc/0006-Disable-DES-authentification-support.patch b/package/libtirpc/0006-Disable-DES-authentification-support.patch new file mode 100644 index 0000000000..59a77ffc1d --- /dev/null +++ b/package/libtirpc/0006-Disable-DES-authentification-support.patch @@ -0,0 +1,148 @@ +From 79975eb4104667be85abd06874c258438826b674 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Fri, 24 Jul 2015 14:45:52 +0200 +Subject: [PATCH] Disable DES authentification support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +uClibc and musl does not provide DES authentication. + +Signed-off-by: Jörg Krause +[peda@axentia.se: update for 1.0.1] +Signed-off-by: Peter Rosin +--- + src/Makefile.am | 2 +- + src/rpc_soc.c | 32 -------------------------------- + 2 files changed, 1 insertion(+), 33 deletions(-) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 960a522..3a88e31 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -22,9 +22,8 @@ libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c cln + pmap_prot.c pmap_prot2.c pmap_rmt.c rpc_prot.c rpc_commondata.c \ + rpc_callmsg.c rpc_generic.c rpc_soc.c rpcb_clnt.c rpcb_prot.c \ + rpcb_st_xdr.c svc.c svc_auth.c svc_dg.c svc_auth_unix.c svc_auth_none.c \ +- svc_auth_des.c \ + svc_generic.c svc_raw.c svc_run.c svc_simple.c svc_vc.c getpeereid.c \ +- auth_des.c authdes_prot.c debug.c ++ debug.c + + ## XDR + libtirpc_la_SOURCES += xdr.c xdr_rec.c xdr_array.c xdr_float.c xdr_mem.c xdr_reference.c xdr_stdio.c xdr_sizeof.c +diff --git a/src/svc_auth.c b/src/svc_auth.c +--- a/src/svc_auth.c ++++ b/src/svc_auth.c +@@ -114,9 +114,6 @@ _gss_authenticate(rqst, msg, no_dispatch) + case AUTH_SHORT: + dummy = _svcauth_short(rqst, msg); + return (dummy); +- case AUTH_DES: +- dummy = _svcauth_des(rqst, msg); +- return (dummy); + #ifdef HAVE_RPCSEC_GSS + case RPCSEC_GSS: + dummy = _svcauth_gss(rqst, msg, no_dispatch); +diff --git a/src/rpc_soc.c b/src/rpc_soc.c +index e146ed4..161a1ec 100644 +--- a/src/rpc_soc.c ++++ b/src/rpc_soc.c +@@ -61,7 +61,6 @@ #ifdef PORTMAP + #include + #include + #include +-#include + + #include "rpc_com.h" + +@@ -522,86 +521,6 @@ clnt_broadcast(prog, vers, proc, xargs, argsp, xresults, resultsp, eachresult) + } + + /* +- * Create the client des authentication object. Obsoleted by +- * authdes_seccreate(). +- */ +-AUTH * +-authdes_create(servername, window, syncaddr, ckey) +- char *servername; /* network name of server */ +- u_int window; /* time to live */ +- struct sockaddr *syncaddr; /* optional hostaddr to sync with */ +- des_block *ckey; /* optional conversation key to use */ +-{ +- AUTH *nauth; +- char hostname[NI_MAXHOST]; +- +- if (syncaddr) { +- /* +- * Change addr to hostname, because that is the way +- * new interface takes it. +- */ +- switch (syncaddr->sa_family) { +- case AF_INET: +- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname, +- sizeof hostname, NULL, 0, 0) != 0) +- goto fallback; +- break; +- case AF_INET6: +- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in6), hostname, +- sizeof hostname, NULL, 0, 0) != 0) +- goto fallback; +- break; +- default: +- goto fallback; +- } +- nauth = authdes_seccreate(servername, window, hostname, ckey); +- return (nauth); +- } +-fallback: +- return authdes_seccreate(servername, window, NULL, ckey); +-} +- +-/* +- * Create the client des authentication object. Obsoleted by +- * authdes_pk_seccreate(). +- */ +-extern AUTH *authdes_pk_seccreate(const char *, netobj *, u_int, const char *, +- const des_block *, nis_server *); +- +-AUTH * +-authdes_pk_create(servername, pkey, window, syncaddr, ckey) +- char *servername; /* network name of server */ +- netobj *pkey; /* public key */ +- u_int window; /* time to live */ +- struct sockaddr *syncaddr; /* optional hostaddr to sync with */ +- des_block *ckey; /* optional conversation key to use */ +-{ +- AUTH *nauth; +- char hostname[NI_MAXHOST]; +- +- if (syncaddr) { +- /* +- * Change addr to hostname, because that is the way +- * new interface takes it. +- */ +- switch (syncaddr->sa_family) { +- case AF_INET: +- if (getnameinfo(syncaddr, sizeof(struct sockaddr_in), hostname, +- sizeof hostname, NULL, 0, 0) != 0) +- goto fallback; +- break; +- default: +- goto fallback; +- } +- nauth = authdes_pk_seccreate(servername, pkey, window, hostname, ckey, NULL); +- return (nauth); +- } +-fallback: +- return authdes_pk_seccreate(servername, pkey, window, NULL, ckey, NULL); +-} +- +- +-/* + * Create a client handle for a unix connection. Obsoleted by clnt_vc_create() + */ + CLIENT * +-- +2.4.6 + diff --git a/package/libtirpc/0007-Add-missing-rwlock_unlocks-in-xprt_register.patch b/package/libtirpc/0007-Add-missing-rwlock_unlocks-in-xprt_register.patch new file mode 100644 index 0000000000..56b5bf8392 --- /dev/null +++ b/package/libtirpc/0007-Add-missing-rwlock_unlocks-in-xprt_register.patch @@ -0,0 +1,63 @@ +From 4f1503e84b2f7bd229a097335e52fb8203f5bb0b Mon Sep 17 00:00:00 2001 +From: Michael Forney +Date: Wed, 4 Nov 2015 13:58:06 -0500 +Subject: [PATCH] Add missing rwlock_unlocks in xprt_register + +It looks like in b2c9430f46c4ac848957fb8adaac176a3f6ac03f when svc_run +switched to poll, an early return was added, but the rwlock was not +unlocked. + +I observed that rpcbind built against libtirpc-1.0.1 would handle only +one request before hanging, and tracked it down to a missing +rwlock_unlock here. + +Fixes: b2c9430f46c4 ('Use poll() instead of select() in svc_run()') +Signed-off-by: Michael Forney +Signed-off-by: Steve Dickson +[peda@axentia.se: backport from upstream] +Signed-off-by: Peter Rosin +--- + src/svc.c | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/svc.c b/src/svc.c +index 9c41445..b59467b 100644 +--- a/src/svc.c ++++ b/src/svc.c +@@ -99,7 +99,7 @@ xprt_register (xprt) + { + __svc_xports = (SVCXPRT **) calloc (_rpc_dtablesize(), sizeof (SVCXPRT *)); + if (__svc_xports == NULL) +- return; ++ goto unlock; + } + if (sock < _rpc_dtablesize()) + { +@@ -120,14 +120,14 @@ xprt_register (xprt) + svc_pollfd[i].fd = sock; + svc_pollfd[i].events = (POLLIN | POLLPRI | + POLLRDNORM | POLLRDBAND); +- return; ++ goto unlock; + } + + new_svc_pollfd = (struct pollfd *) realloc (svc_pollfd, + sizeof (struct pollfd) + * (svc_max_pollfd + 1)); + if (new_svc_pollfd == NULL) /* Out of memory */ +- return; ++ goto unlock; + svc_pollfd = new_svc_pollfd; + ++svc_max_pollfd; + +@@ -135,6 +135,7 @@ xprt_register (xprt) + svc_pollfd[svc_max_pollfd - 1].events = (POLLIN | POLLPRI | + POLLRDNORM | POLLRDBAND); + } ++unlock: + rwlock_unlock (&svc_fd_lock); + } + +-- +2.5.3 + diff --git a/package/libtirpc/Config.in b/package/libtirpc/Config.in new file mode 100644 index 0000000000..2e9c939fa8 --- /dev/null +++ b/package/libtirpc/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBTIRPC + bool "libtirpc" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Libtirpc is a port of Sun's Transport-Independent RPC + library to Linux. + + http://sourceforge.net/projects/libtirpc/ + +comment "libtirpc needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libtirpc/libtirpc.hash b/package/libtirpc/libtirpc.hash new file mode 100644 index 0000000000..cd65164cb2 --- /dev/null +++ b/package/libtirpc/libtirpc.hash @@ -0,0 +1,4 @@ +# From sourceforge's info on download page: +sha1 8da1636f98b5909c0d587e7534bc1e91f5c1a970 libtirpc-1.0.1.tar.bz2 +# Locally computed +sha256 5156974f31be7ccbc8ab1de37c4739af6d9d42c87b1d5caf4835dda75fcbb89e libtirpc-1.0.1.tar.bz2 diff --git a/package/libtirpc/libtirpc.mk b/package/libtirpc/libtirpc.mk new file mode 100644 index 0000000000..70a31ac59f --- /dev/null +++ b/package/libtirpc/libtirpc.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libtirpc +# +################################################################################ + +LIBTIRPC_VERSION = 1.0.1 +LIBTIRPC_SOURCE = libtirpc-$(LIBTIRPC_VERSION).tar.bz2 +LIBTIRPC_SITE = http://downloads.sourceforge.net/project/libtirpc/libtirpc/$(LIBTIRPC_VERSION) +LIBTIRPC_LICENSE = BSD-3c +LIBTIRPC_LICENSE_FILES = COPYING + +LIBTIRPC_INSTALL_STAGING = YES +LIBTIRPC_AUTORECONF = YES + +# getrpcby{number,name} are only provided if 'GQ' is defined +LIBTIRPC_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -DGQ" + +LIBTIRPC_CONF_OPTS = --disable-gssapi + +$(eval $(autotools-package)) diff --git a/package/libtomcrypt/Config.in b/package/libtomcrypt/Config.in new file mode 100644 index 0000000000..6678b303df --- /dev/null +++ b/package/libtomcrypt/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBTOMCRYPT + bool "libtomcrypt" + select BR2_PACKAGE_LIBTOMMATH + help + LibTomCrypt is a fairly comprehensive, modular and portable + cryptographic toolkit that provides developers with a vast array + of well known published block ciphers, one-way hash functions, + chaining modes, pseudo-random number generators, public key + cryptography and a plethora of other routines. + + http://www.libtom.net diff --git a/package/libtomcrypt/libtomcrypt.hash b/package/libtomcrypt/libtomcrypt.hash new file mode 100644 index 0000000000..562016d52f --- /dev/null +++ b/package/libtomcrypt/libtomcrypt.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 e33b47d77a495091c8703175a25c8228aff043140b2554c08a3c3cd71f79d116 crypt-1.17.tar.bz2 diff --git a/package/libtomcrypt/libtomcrypt.mk b/package/libtomcrypt/libtomcrypt.mk new file mode 100644 index 0000000000..53dbfd504b --- /dev/null +++ b/package/libtomcrypt/libtomcrypt.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libtomcrypt +# +################################################################################ + +LIBTOMCRYPT_VERSION = 1.17 +LIBTOMCRYPT_SITE = https://github.com/libtom/libtomcrypt/releases/download/$(LIBTOMCRYPT_VERSION) +LIBTOMCRYPT_SOURCE = crypt-$(LIBTOMCRYPT_VERSION).tar.bz2 +LIBTOMCRYPT_LICENSE = WTFPL +LIBTOMCRYPT_LICENSE_FILES = LICENSE +LIBTOMCRYPT_INSTALL_STAGING = YES +LIBTOMCRYPT_INSTALL_TARGET = NO # only static library +LIBTOMCRYPT_DEPENDENCIES = libtommath + +LIBTOMCRYPT_CFLAGS = -I./src/headers $(TARGET_CFLAGS) -DLTC_SOURCE -DLTM_DESC \ + $(if $(BR2_USE_WCHAR),,-DLTC_NO_WCHAR) + +define LIBTOMCRYPT_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(LIBTOMCRYPT_CFLAGS)" +endef + +define LIBTOMCRYPT_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" NODOCS=1 INSTALL_USER=$(shell id -u) INSTALL_GROUP=$(shell id -g) install +endef + +$(eval $(generic-package)) diff --git a/package/libtommath/Config.in b/package/libtommath/Config.in new file mode 100644 index 0000000000..b2ffc722ac --- /dev/null +++ b/package/libtommath/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBTOMMATH + bool "libtommath" + help + LibTomMath is a free open source portable number theoretic + multiple-precision integer library written entirely in C. + + http://www.libtom.net diff --git a/package/libtommath/libtommath.hash b/package/libtommath/libtommath.hash new file mode 100644 index 0000000000..fcf2ddc9e4 --- /dev/null +++ b/package/libtommath/libtommath.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 993a7df9ee091fca430cdde3263df57d88ef62af8103903214da49fc51bbb56c ltm-1.0.tar.xz diff --git a/package/libtommath/libtommath.mk b/package/libtommath/libtommath.mk new file mode 100644 index 0000000000..eb3b00e861 --- /dev/null +++ b/package/libtommath/libtommath.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libtommath +# +################################################################################ + +LIBTOMMATH_VERSION = 1.0 +LIBTOMMATH_SITE = https://github.com/libtom/libtommath/releases/download/v$(LIBTOMMATH_VERSION) +LIBTOMMATH_SOURCE = ltm-$(LIBTOMMATH_VERSION).tar.xz +LIBTOMMATH_LICENSE = WTFPL +LIBTOMMATH_LICENSE_FILES = LICENSE +LIBTOMMATH_INSTALL_STAGING = YES +LIBTOMMATH_INSTALL_TARGET = NO # only static library + +define LIBTOMMATH_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CFLAGS="-I./ -fPIC $(TARGET_CFLAGS)" +endef + +define LIBTOMMATH_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR="$(STAGING_DIR)" install +endef + +$(eval $(generic-package)) diff --git a/package/libtool/Config.in b/package/libtool/Config.in new file mode 100644 index 0000000000..d3cf2d7843 --- /dev/null +++ b/package/libtool/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBTOOL + bool "libtool" + help + Library that hides the complexity of using shared/static libraries + on different platforms behind a consistent, portable interface. + + http://www.gnu.org/software/libtool/ diff --git a/package/libtool/libtool.hash b/package/libtool/libtool.hash new file mode 100644 index 0000000000..baaac61232 --- /dev/null +++ b/package/libtool/libtool.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 7c87a8c2c8c0fc9cd5019e402bed4292462d00a718a7cd5f11218153bf28b26f libtool-2.4.6.tar.xz diff --git a/package/libtool/libtool.mk b/package/libtool/libtool.mk new file mode 100644 index 0000000000..8688f8b20c --- /dev/null +++ b/package/libtool/libtool.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# libtool +# +################################################################################ + +LIBTOOL_VERSION = 2.4.6 +LIBTOOL_SOURCE = libtool-$(LIBTOOL_VERSION).tar.xz +LIBTOOL_SITE = $(BR2_GNU_MIRROR)/libtool +LIBTOOL_INSTALL_STAGING = YES +LIBTOOL_CONF_ENV = HELP2MAN=true +LIBTOOL_DEPENDENCIES = host-m4 +LIBTOOL_LICENSE = GPLv2+ +LIBTOOL_LICENSE_FILES = COPYING + +HOST_LIBTOOL_CONF_ENV = MAKEINFO=true +HOST_LIBTOOL_LIBTOOL_PATCH = NO + +# We have a patch that affects libtool.m4, which triggers an autoreconf +# in the build step. Normally we would set AUTORECONF = YES, but this +# doesn't work for host-libtool because that creates a circular +# dependency. Instead, touch the generated files so autoreconf is not +# triggered in the build step. Note that aclocal.m4 has to be touched +# first since the rest depends on it. Note that we don't need the changes +# in libtool.m4 in our configure script, because we're not actually +# running it on the target. +# For the target, we would normally be able to use AUTORECONF, but it +# fails on libltdl/Makefile.inc. Rather than trying to fix that failure, +# just use the same hack as on the host. +define LIBTOOL_AVOID_AUTORECONF_HOOK + find $(@D) -name aclocal.m4 -exec touch '{}' \; + find $(@D) -name config-h.in -exec touch '{}' \; + find $(@D) -name configure -exec touch '{}' \; + find $(@D) -name Makefile.in -exec touch '{}' \; +endef +LIBTOOL_PRE_CONFIGURE_HOOKS += LIBTOOL_AVOID_AUTORECONF_HOOK +HOST_LIBTOOL_PRE_CONFIGURE_HOOKS += LIBTOOL_AVOID_AUTORECONF_HOOK + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +# variables used by other packages +LIBTOOL = $(HOST_DIR)/usr/bin/libtool +LIBTOOLIZE = $(HOST_DIR)/usr/bin/libtoolize diff --git a/package/libtorrent/0001-cross_compile.patch b/package/libtorrent/0001-cross_compile.patch new file mode 100644 index 0000000000..abb243820c --- /dev/null +++ b/package/libtorrent/0001-cross_compile.patch @@ -0,0 +1,65 @@ +From c4cc0ba76c81e1967c648be423f5f0312ac9d87f Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Mon, 5 Oct 2015 00:40:25 +0100 +Subject: [PATCH] Fix cross compilation, based on OpenWRT patch. + +[Vincent: tweak the patch for version 0.13.6] + +Signed-off-by: Gustavo Zacarias +Signed-off-by: Vicente Olivert Riera +--- + configure.ac | 1 - + scripts/checks.m4 | 2 +- + scripts/common.m4 | 4 ++-- + 3 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ba994ee..7696466 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -19,7 +19,6 @@ AC_SUBST(LIBTORRENT_INTERFACE_VERSION_NO) + + AM_INIT_AUTOMAKE + AC_CONFIG_HEADERS(config.h) +-AM_PATH_CPPUNIT(1.9.6) + + AC_PROG_CXX + +diff --git a/scripts/checks.m4 b/scripts/checks.m4 +index 598f39b..0e5abe0 100644 +--- a/scripts/checks.m4 ++++ b/scripts/checks.m4 +@@ -96,7 +96,7 @@ AC_DEFUN([TORRENT_CHECK_KQUEUE], [ + AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [ + AC_MSG_CHECKING(whether kqueue supports pipes and ptys) + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include + #include + #include +diff --git a/scripts/common.m4 b/scripts/common.m4 +index 5127624..cc68269 100644 +--- a/scripts/common.m4 ++++ b/scripts/common.m4 +@@ -223,7 +223,7 @@ dnl Need to fix this so that it uses the stuff defined by the system. + AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_MSG_CHECKING(for execinfo.h) + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include + int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} + ])], +@@ -238,7 +238,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_DEFUN([TORRENT_CHECK_ALIGNED], [ + AC_MSG_CHECKING(the byte alignment) + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include + int main() { + char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 }; +-- +1.7.1 + diff --git a/package/libtorrent/Config.in b/package/libtorrent/Config.in new file mode 100644 index 0000000000..4787f9c60d --- /dev/null +++ b/package/libtorrent/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBTORRENT + bool "libtorrent" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HAS_SYNC_1 && BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_ZLIB + help + BitTorrent library written in C++ for *nix + + https://github.com/rakshasa/libtorrent + +comment "libtorrent needs a toolchain w/ C++, threads" + depends on BR2_TOOLCHAIN_HAS_SYNC_1 && BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libtorrent/libtorrent.hash b/package/libtorrent/libtorrent.hash new file mode 100644 index 0000000000..73753e94ce --- /dev/null +++ b/package/libtorrent/libtorrent.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 2838a08c96edfd936aff8fbf99ecbb930c2bfca3337dd1482eb5fccdb80d5a04 libtorrent-0.13.6.tar.gz diff --git a/package/libtorrent/libtorrent.mk b/package/libtorrent/libtorrent.mk new file mode 100644 index 0000000000..ef1c75f039 --- /dev/null +++ b/package/libtorrent/libtorrent.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libtorrent +# +################################################################################ + +LIBTORRENT_VERSION = 0.13.6 +LIBTORRENT_SITE = http://rtorrent.net/downloads +LIBTORRENT_DEPENDENCIES = host-pkgconf zlib \ + $(if $(BR2_PACKAGE_OPENSSL),openssl) +LIBTORRENT_CONF_OPTS = --enable-aligned \ + --disable-instrumentation \ + --with-zlib=$(STAGING_DIR)/usr \ + $(if $(BR2_PACKAGE_OPENSSL),--enable-openssl,--disable-openssl) +LIBTORRENT_INSTALL_STAGING = YES +LIBTORRENT_AUTORECONF = YES +LIBTORRENT_LICENSE = GPLv2 +LIBTORRENT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libtpl/Config.in b/package/libtpl/Config.in new file mode 100644 index 0000000000..0286e033d6 --- /dev/null +++ b/package/libtpl/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBTPL + bool "libtpl" + help + Easily store and retrieve binary data in C + + http://troydhanson.github.io/tpl/ diff --git a/package/libtpl/libtpl.mk b/package/libtpl/libtpl.mk new file mode 100644 index 0000000000..ed3bfb57bb --- /dev/null +++ b/package/libtpl/libtpl.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# libtpl +# +################################################################################ + +LIBTPL_VERSION = v1.6.1 +LIBTPL_SITE = $(call github,troydhanson,tpl,$(LIBTPL_VERSION)) +LIBTPL_INSTALL_STAGING = YES +LIBTPL_LICENSE = BSD-like +LIBTPL_LICENSE_FILES = LICENSE + +LIBTPL_AUTORECONF = YES + +define LIBTPL_CREATE_MISSING_FILES + touch $(@D)/NEWS $(@D)/AUTHORS $(@D)/ChangeLog $(@D)/COPYING +endef +LIBTPL_POST_EXTRACT_HOOKS += LIBTPL_CREATE_MISSING_FILES + +$(eval $(autotools-package)) diff --git a/package/libubox/Config.in b/package/libubox/Config.in new file mode 100644 index 0000000000..25ef4bb89a --- /dev/null +++ b/package/libubox/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBUBOX + bool "libubox" + depends on !BR2_STATIC_LIBS + help + This library originates from the OpenWrt project to + handle the configuration file infrastructure, but can + also be used for the same purposes in projects other + than OpenWrt. + + http://nbd.name/gitweb.cgi?p=luci2/libubox.git;a=summary + +comment "libubox needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/libubox/libubox.mk b/package/libubox/libubox.mk new file mode 100644 index 0000000000..4c56951a3d --- /dev/null +++ b/package/libubox/libubox.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libubox +# +################################################################################ + +LIBUBOX_VERSION = e88d816d6e462180f0337565e04e36be58a63309 +LIBUBOX_SITE = git://git.openwrt.org/project/libubox.git +LIBUBOX_LICENSE = LGPLv2.1, GPLv2, BSD-3c, MIT +LIBUBOX_INSTALL_STAGING = YES +LIBUBOX_DEPENDENCIES = $(if $(BR2_PACKAGE_JSON_C),json-c) + +ifeq ($(BR2_USE_MMU)$(BR2_PACKAGE_LUA_5_1),yy) +LIBUBOX_DEPENDENCIES += lua +LIBUBOX_CONF_OPTS += -DBUILD_LUA=ON \ + -DLUAPATH=$(STAGING_DIR)/usr/lib/lua/5.1 \ + -DLUA_CFLAGS=-I$(STAGING_DIR)/usr/include +else +LIBUBOX_CONF_OPTS += -DBUILD_LUA=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/libuci/Config.in b/package/libuci/Config.in new file mode 100644 index 0000000000..2f4ad40487 --- /dev/null +++ b/package/libuci/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_LIBUCI + bool "libuci" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_LIBUBOX + help + This library originates from the OpenWrt project to + handle the configuration file infrastructure, but can + also be used for the same purposes in projects other + than OpenWrt. + + This package will also install CLI tool uci. + + http://wiki.openwrt.org/doc/techref/uci + +comment "libuci needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/libuci/libuci.mk b/package/libuci/libuci.mk new file mode 100644 index 0000000000..8c060d5984 --- /dev/null +++ b/package/libuci/libuci.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libuci +# +################################################################################ + +LIBUCI_VERSION = e339407372ffc70b1451e4eda218c01aa95a6a7f +LIBUCI_SITE = git://nbd.name/uci.git +LIBUCI_LICENSE = LGPLv2.1 +LIBUCI_INSTALL_STAGING = YES +LIBUCI_DEPENDENCIES = libubox + +ifeq ($(BR2_PACKAGE_LUA_5_1),y) +LIBUCI_DEPENDENCIES += lua +LIBUCI_CONF_OPTS += -DBUILD_LUA=ON \ + -DLUAPATH=/usr/lib/lua/5.1 \ + -DLUA_CFLAGS=-I$(STAGING_DIR)/usr/include +else +LIBUCI_CONF_OPTS += -DBUILD_LUA=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/libucl/Config.in b/package/libucl/Config.in new file mode 100644 index 0000000000..a94701e1d0 --- /dev/null +++ b/package/libucl/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LIBUCL + bool "libucl" + help + Universal configuration library parser + + Libucl is a parser and C API to parse and generate ucl + objects. Libucl consist of several groups of functions: + parser, emitting, conversion, generation, iteration, + validation, and utility. These functions can be used to work + with several formats: JSON, compact JSON, configuration + (nginx like), and YAML. Libucl has clear design that should + be very convenient for reading and writing and makes for an + ideal parser with high performance. + + https://github.com/vstakhov/libucl diff --git a/package/libucl/libucl.mk b/package/libucl/libucl.mk new file mode 100644 index 0000000000..3530bbe5ea --- /dev/null +++ b/package/libucl/libucl.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libucl +# +################################################################################ + +LIBUCL_VERSION = 0.7.3 +LIBUCL_SITE = $(call github,vstakhov,libucl,$(LIBUCL_VERSION)) +LIBUCL_INSTALL_STAGING = YES +LIBUCL_AUTORECONF = YES +LIBUCL_LICENSE = BSD-2c +LIBUCL_LICENSE_FILES = COPYING +LIBUCL_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/libuecc/Config.in b/package/libuecc/Config.in new file mode 100644 index 0000000000..b7cd0450fe --- /dev/null +++ b/package/libuecc/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBUECC + bool "libuecc" + depends on !BR2_STATIC_LIBS + help + Very small Elliptic Curve Cryptography library + + http://git.universe-factory.net/libuecc + +comment "libuecc needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/libuecc/libuecc.hash b/package/libuecc/libuecc.hash new file mode 100644 index 0000000000..67eb5eb572 --- /dev/null +++ b/package/libuecc/libuecc.hash @@ -0,0 +1,4 @@ +# from https://projects.universe-factory.net/projects/fastd/files +md5 5cd543cb8e7bce83a22c07a0579c95a1 libuecc-7.tar.xz +# computed locally +sha256 b94aef08eab5359d0facaa7ead2ce81b193eef0c61379d9835213ebc0a46257a libuecc-7.tar.xz diff --git a/package/libuecc/libuecc.mk b/package/libuecc/libuecc.mk new file mode 100644 index 0000000000..87ca2e42d9 --- /dev/null +++ b/package/libuecc/libuecc.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libuecc +# +################################################################################ + +LIBUECC_VERSION = 7 +LIBUECC_SITE = https://projects.universe-factory.net/attachments/download/85 +LIBUECC_SOURCE = libuecc-$(LIBUECC_VERSION).tar.xz +LIBUECC_LICENSE = BSD-2c +LIBUECC_LICENSE_FILES = COPYRIGHT +LIBUECC_INSTALL_STAGING = YES + +$(eval $(cmake-package)) diff --git a/package/libump/Config.in b/package/libump/Config.in new file mode 100644 index 0000000000..10232b3f93 --- /dev/null +++ b/package/libump/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBUMP + bool "libump" + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_arm + help + The ARMs Universal Memory Provider userspace library. + This library is a requirement for ARMs binary Mali driver. + + http://github.com/linux-sunxi/libump + +comment "libump needs a (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/libump/libump.mk b/package/libump/libump.mk new file mode 100644 index 0000000000..65012ffd13 --- /dev/null +++ b/package/libump/libump.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# libump +# +################################################################################ + +LIBUMP_VERSION = ec0680628744f30b8fac35e41a7bd8e23e59c39f +LIBUMP_SITE = $(call github,linux-sunxi,libump,$(LIBUMP_VERSION)) +LIBUMP_LICENSE = Apache-2.0 +LIBUMP_AUTORECONF = YES +LIBUMP_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libunistring/Config.in b/package/libunistring/Config.in new file mode 100644 index 0000000000..88fc658035 --- /dev/null +++ b/package/libunistring/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBUNISTRING + bool "libunistring" + depends on BR2_USE_WCHAR + help + The libunistring library provides functions for manipulating + Unicode strings and for manipulating C strings according to + the Unicode standard. + + http://www.gnu.org/software/libunistring/ + +comment "libunistring needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/libunistring/libunistring.hash b/package/libunistring/libunistring.hash new file mode 100644 index 0000000000..ba4b642dcb --- /dev/null +++ b/package/libunistring/libunistring.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 2df42eae46743e3f91201bf5c100041540a7704e8b9abfd57c972b2d544de41b libunistring-0.9.6.tar.xz diff --git a/package/libunistring/libunistring.mk b/package/libunistring/libunistring.mk new file mode 100644 index 0000000000..bb1641e04f --- /dev/null +++ b/package/libunistring/libunistring.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# libunistring +# +################################################################################ + +LIBUNISTRING_VERSION = 0.9.6 +LIBUNISTRING_SITE = $(BR2_GNU_MIRROR)/libunistring +LIBUNISTRING_SOURCE = libunistring-$(LIBUNISTRING_VERSION).tar.xz +LIBUNISTRING_INSTALL_STAGING = YES +LIBUNISTRING_LICENSE = LGPLv3+ +LIBUNISTRING_LICENSE_FILES = COPYING.LIB + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +LIBUNISTRING_CONF_OPTS += --enable-threads=posix +else +LIBUNISTRING_CONF_OPTS += --disable-threads +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libunwind/0001-disable-tests.patch b/package/libunwind/0001-disable-tests.patch new file mode 100644 index 0000000000..05475a5d6c --- /dev/null +++ b/package/libunwind/0001-disable-tests.patch @@ -0,0 +1,32 @@ +Disable building of tests + +libunwind tests do not build with uClibc, so we disable them. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.am +=================================================================== +--- a/Makefile.am ++++ b/Makefile.am +@@ -36,7 +36,7 @@ + + nodist_include_HEADERS = include/libunwind-common.h + +-SUBDIRS = src tests doc ++SUBDIRS = src doc + + noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \ + include/compiler.h include/libunwind_i.h include/mempool.h \ +Index: b/Makefile.in +=================================================================== +--- a/Makefile.in ++++ b/Makefile.in +@@ -313,7 +313,7 @@ + $(am__append_7) $(am__append_8) $(am__append_9) \ + $(am__append_10) + nodist_include_HEADERS = include/libunwind-common.h +-SUBDIRS = src tests doc ++SUBDIRS = src doc + noinst_HEADERS = include/dwarf.h include/dwarf_i.h include/dwarf-eh.h \ + include/compiler.h include/libunwind_i.h include/mempool.h \ + include/remote.h \ diff --git a/package/libunwind/0002-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch b/package/libunwind/0002-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch new file mode 100644 index 0000000000..2a37ed7784 --- /dev/null +++ b/package/libunwind/0002-Add-AO_REQUIRE_CAS-to-fix-build-on-ARM-v6.patch @@ -0,0 +1,56 @@ +From 24484e80b3e329c9edee1995e102f8612eedb79c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 13 May 2014 23:32:27 +0200 +Subject: [PATCH] Add AO_REQUIRE_CAS to fix build on ARM < v6 + +ARM earlier than ARMv6, such as ARMv4 and ARMv5 do not provide +optimize atomic operations in libatomic_ops. Since libunwind is using +such operations, it should define AO_REQUIRE_CAS before including + so that libatomic_ops knows it should use emulated +atomic operations instead (even though they are obviously a lot more +expensive). + +Also, while real atomic operations are all inline functions and +therefore linking against libatomic_ops was not required, the emulated +atomic operations actually require linking against libatomic_ops, so +the commented AC_CHECK_LIB test in acinclude.m4 is uncommented to make +sure we link against libatomic_ops. + +Signed-off-by: Thomas Petazzoni +--- + acinclude.m4 | 8 +------- + include/libunwind_i.h | 1 + + 2 files changed, 2 insertions(+), 7 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index 497f7c2..9c15af1 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -22,11 +22,5 @@ fi]) + AC_DEFUN([CHECK_ATOMIC_OPS], + [dnl Check whether the system has the atomic_ops package installed. + AC_CHECK_HEADERS(atomic_ops.h) +-# +-# Don't link against libatomic_ops for now. We don't want libunwind +-# to depend on libatomic_ops.so. Fortunately, none of the platforms +-# we care about so far need libatomic_ops.a (everything is done via +-# inline macros). +-# +-# AC_CHECK_LIB(atomic_ops, main) ++ AC_CHECK_LIB(atomic_ops, main) + ]) +diff --git a/include/libunwind_i.h b/include/libunwind_i.h +index 23f615e..deabdfd 100644 +--- a/include/libunwind_i.h ++++ b/include/libunwind_i.h +@@ -95,6 +95,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + (pthread_mutex_unlock != NULL ? pthread_mutex_unlock (l) : 0) + + #ifdef HAVE_ATOMIC_OPS_H ++# define AO_REQUIRE_CAS + # include + static inline int + cmpxchg_ptr (void *addr, void *old, void *new) +-- +1.9.2 + diff --git a/package/libunwind/0003-Link-libunwind-to-libgcc_s-rather-than-libgcc.patch b/package/libunwind/0003-Link-libunwind-to-libgcc_s-rather-than-libgcc.patch new file mode 100644 index 0000000000..7ea25129f1 --- /dev/null +++ b/package/libunwind/0003-Link-libunwind-to-libgcc_s-rather-than-libgcc.patch @@ -0,0 +1,41 @@ +From f1684379dfaf8018d5d4c1945e292a56d0fab245 Mon Sep 17 00:00:00 2001 +From: Thierry Reding +Date: Fri, 27 Jun 2014 08:40:33 +0200 +Subject: [PATCH] Link libunwind to libgcc_s rather than libgcc + +For some architectures, -lgcc and -lgcc_s are not equivalent. On ARM for +example, libgcc_s.so.1 contains some symbols needed by libunwind which +are not present in libgcc. + +This causes the following link error when building the X.Org X server +with libunwind support: + + CCLD Xorg + /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr0' + /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr1' + +Linking against libgcc_s explicitly solves this problem. + +Signed-off-by: Thierry Reding +[yann.morin.1998@free.fr: backport to libunwind 1.1] +Signed-off-by: "Yann E. MORIN" +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 4e2fd23..a77cf01 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -258,7 +258,7 @@ else + + if test x$GCC = xyes -a x$intel_compiler != xyes; then + CFLAGS="${CFLAGS} -fexceptions -Wall -Wsign-compare" +- LIBCRTS="-lgcc" ++ LIBCRTS="-lgcc_s" + fi + AC_MSG_RESULT([$intel_compiler]) + +-- +1.9.1 + diff --git a/package/libunwind/Config.in b/package/libunwind/Config.in new file mode 100644 index 0000000000..593172fc23 --- /dev/null +++ b/package/libunwind/Config.in @@ -0,0 +1,32 @@ +# libunwind is only available for a certain subset of the +# architectures (as visible in the list of architectures supported +# with the glibc C library below). +# +# In addition to this, on some architectures libunwind requires the +# *context() function from the C library, which are only available on +# certain architectures in uClibc, and not available at all on +# musl. But on some other architectures, libunwind works without using +# the *context() functions, which allows it to be built with musl. +config BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS + bool + default y if BR2_TOOLCHAIN_USES_GLIBC && \ + (BR2_arm || BR2_armeb || BR2_mips || BR2_mipsel || BR2_mips64 || \ + BR2_mips64el || BR2_powerpc || BR2_sh || BR2_sh64 || BR2_i386 || BR2_x86_64) + default y if BR2_TOOLCHAIN_USES_UCLIBC && \ + (BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_mips64 || BR2_mips64el || BR2_x86_64) + default y if BR2_TOOLCHAIN_USES_MUSL && \ + (BR2_arm || BR2_armeb || BR2_i386 || BR2_x86_64) + +config BR2_PACKAGE_LIBUNWIND + bool "libunwind" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS + help + C API to determine the call-chain of a program. + + http://www.nongnu.org/libunwind/index.html + +comment "libunwind needs a toolchain w/ threads" + depends on BR2_PACKAGE_LIBUNWIND_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libunwind/libunwind.hash b/package/libunwind/libunwind.hash new file mode 100644 index 0000000000..7ec47fab5a --- /dev/null +++ b/package/libunwind/libunwind.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 9dfe0fcae2a866de9d3942c66995e4b460230446887dbdab302d41a8aee8d09a libunwind-1.1.tar.gz diff --git a/package/libunwind/libunwind.mk b/package/libunwind/libunwind.mk new file mode 100644 index 0000000000..a75a88848b --- /dev/null +++ b/package/libunwind/libunwind.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libunwind +# +################################################################################ + +LIBUNWIND_VERSION = 1.1 +LIBUNWIND_SITE = http://download.savannah.gnu.org/releases/libunwind +LIBUNWIND_INSTALL_STAGING = YES +LIBUNWIND_LICENSE_FILES = COPYING +LIBUNWIND_LICENSE = MIT +LIBUNWIND_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_LIBATOMIC_OPS),y) +LIBUNWIND_DEPENDENCIES = libatomic_ops +endif + +$(eval $(autotools-package)) diff --git a/package/libupnp/Config.in b/package/libupnp/Config.in new file mode 100644 index 0000000000..6a07b42d8a --- /dev/null +++ b/package/libupnp/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LIBUPNP + bool "libupnp" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + The portable SDK for UPnP(tm) Devices (libupnp) provides developers + with an API and open source code for building control points, + devices, and bridges that are compliant with Version 1.0 of the + Universal Plug and Play Device Architecture Specification + + http://pupnp.sourceforge.net/ + +comment "libupnp needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libupnp/libupnp.hash b/package/libupnp/libupnp.hash new file mode 100644 index 0000000000..59f7d7b5fe --- /dev/null +++ b/package/libupnp/libupnp.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 b3142b39601243b50532eec90f4a27dba85eb86f58d4b849ac94edeb29d9b22a libupnp-1.6.19.tar.bz2 diff --git a/package/libupnp/libupnp.mk b/package/libupnp/libupnp.mk new file mode 100644 index 0000000000..48233b61db --- /dev/null +++ b/package/libupnp/libupnp.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libupnp +# +################################################################################ + +LIBUPNP_VERSION = 1.6.19 +LIBUPNP_SOURCE = libupnp-$(LIBUPNP_VERSION).tar.bz2 +LIBUPNP_SITE = http://downloads.sourceforge.net/project/pupnp/pupnp/libUPnP%20$(LIBUPNP_VERSION) +LIBUPNP_CONF_ENV = ac_cv_lib_compat_ftime=no +LIBUPNP_INSTALL_STAGING = YES +LIBUPNP_LICENSE = BSD-3c +LIBUPNP_LICENSE_FILES = LICENSE + +$(eval $(autotools-package)) diff --git a/package/libupnpp/Config.in b/package/libupnpp/Config.in new file mode 100644 index 0000000000..2d99586788 --- /dev/null +++ b/package/libupnpp/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_LIBUPNPP + bool "libupnpp" + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBUPNP + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # libupnp + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + help + The libupnpp C++ library wraps libupnp for easier use by upmpdcli and + upplay. + + http://www.lesbonscomptes.com/upmpdcli/ + +comment "libupnpp needs a toolchain w/ C++, threads, gcc >= 4.6" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 diff --git a/package/libupnpp/libupnpp.hash b/package/libupnpp/libupnpp.hash new file mode 100644 index 0000000000..685ccf4b86 --- /dev/null +++ b/package/libupnpp/libupnpp.hash @@ -0,0 +1,2 @@ +# Hashes from: http://www.lesbonscomptes.com/upmpdcli/downloads/libupnpp-0.14.1.tar.gz.sha256 +sha256 ffb33379f3734419de683b0adca5228e802c64d3960681c15f3a8de7d7e315d1 libupnpp-0.14.1.tar.gz diff --git a/package/libupnpp/libupnpp.mk b/package/libupnpp/libupnpp.mk new file mode 100644 index 0000000000..1525f8169b --- /dev/null +++ b/package/libupnpp/libupnpp.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libupnpp +# +################################################################################ + +LIBUPNPP_VERSION = 0.14.1 +LIBUPNPP_SITE = http://www.lesbonscomptes.com/upmpdcli/downloads +LIBUPNPP_LICENSE = GPLv2+ +LIBUPNPP_LICENSE_FILES = COPYING +LIBUPNPP_INSTALL_STAGING = YES +LIBUPNPP_DEPENDENCIES = expat libcurl libupnp + +# configure script fails to link against the dependencies of libupnp +# and libcurl causing detection to fail when statically linking +ifeq ($(BR2_STATIC_LIBS),y) +LIBUPNPP_DEPENDENCIES += host-pkgconf +LIBUPNPP_CONF_ENV += \ + LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libupnp libcurl`" +endif + +$(eval $(autotools-package)) diff --git a/package/liburcu/0001-Only-blacklist-ARM-gcc-4.8.0-and-4.8.1.patch b/package/liburcu/0001-Only-blacklist-ARM-gcc-4.8.0-and-4.8.1.patch new file mode 100644 index 0000000000..585abc0322 --- /dev/null +++ b/package/liburcu/0001-Only-blacklist-ARM-gcc-4.8.0-and-4.8.1.patch @@ -0,0 +1,40 @@ +From 54d8fe7ae40902d6d38e670f4024092f53c14e1f Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sat, 8 Mar 2014 13:19:14 +0100 +Subject: [PATCH] Only blacklist ARM gcc 4.8.0 and 4.8.1 + +Since many ARM toolchain providers include the bug fix for PR58854 in +their latest releases based on gcc-4.8.2, then only blacklist gcc 4.8.0 +and 4.8.1. + +Signed-off-by: Samuel Martin +--- + urcu/compiler.h | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/urcu/compiler.h b/urcu/compiler.h +index 1e30903..56115f1 100644 +--- a/urcu/compiler.h ++++ b/urcu/compiler.h +@@ -118,10 +118,17 @@ + + __GNUC_PATCHLEVEL__) + + /* ++ * Official gcc releases from 4.8.0 to 4.8.2 have the following bug, ++ * however, many arm toolchain providers have the included the fix for ++ * their latest 4.8.2 releases. ++ * So, we only blacklist gcc 4.8.0 and 4.8.1. ++ * Unfortunately, this bug is not easy to test, so we rely on the ++ * knowledge of the user on its compiler. ++ * + * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854 + */ + # ifdef __ARMEL__ +-# if URCU_GCC_VERSION >= 40800 && URCU_GCC_VERSION <= 40802 ++# if URCU_GCC_VERSION >= 40800 && URCU_GCC_VERSION <= 40801 + # error Your gcc version produces clobbered frame accesses + # endif + # endif +-- +1.9.0 + diff --git a/package/liburcu/0002-support-aarch64.patch b/package/liburcu/0002-support-aarch64.patch new file mode 100644 index 0000000000..6830e25ebe --- /dev/null +++ b/package/liburcu/0002-support-aarch64.patch @@ -0,0 +1,21 @@ +libucru: recognize aarch64 + +Make the same as "arm" internally. + +Upstream-Status: Pending + +Signed-off-by: joe.slater@windriver.com +[moved to buildroot from openembedded-core] +Signed-off-by: Ben Shelton + + +--- a/configure.ac ++++ b/configure.ac +@@ -77,6 +77,7 @@ AS_CASE([$host_cpu], + [alpha*], [ARCHTYPE="alpha"], + [ia64], [ARCHTYPE="gcc"], + [arm*], [ARCHTYPE="arm"], ++ [aarch64], [ARCHTYPE="arm"], + [mips*], [ARCHTYPE="mips"], + [tile*], [ARCHTYPE="gcc"], + [ARCHTYPE="unknown"] diff --git a/package/liburcu/Config.in b/package/liburcu/Config.in new file mode 100644 index 0000000000..49510da495 --- /dev/null +++ b/package/liburcu/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS + bool + depends on BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_powerpc || BR2_x86_64 + default y + +config BR2_PACKAGE_LIBURCU + bool "liburcu" + depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Userspace implementation of the Read-Copy-Update (RCU) + synchronization mechanism. This library is mainly used by + the LTTng tracing infrastructure, but can be used for other + purposes as well. + + On ARM, because of bug: + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854 + liburcu cannot be built using gcc 4.8.0, 4.8.1 or 4.8.2 without the + following bug fix: + http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=204665 + + http://lttng.org/urcu + +comment "liburcu needs a toolchain w/ threads" + depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/liburcu/liburcu.hash b/package/liburcu/liburcu.hash new file mode 100644 index 0000000000..64ba90195a --- /dev/null +++ b/package/liburcu/liburcu.hash @@ -0,0 +1,4 @@ +# http://www.lttng.org/files/urcu/userspace-rcu-0.8.7.tar.bz2.sha1 +sha1 5306999b8a3296f3dea91246d92e0a993d732898 userspace-rcu-0.8.7.tar.bz2 +# Locally generated +sha256 b523f22c4726ca6bb77a77d258e76d8c33c89724433bd65313024b98e55c4295 userspace-rcu-0.8.7.tar.bz2 diff --git a/package/liburcu/liburcu.mk b/package/liburcu/liburcu.mk new file mode 100644 index 0000000000..c886a1cf0e --- /dev/null +++ b/package/liburcu/liburcu.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# liburcu +# +################################################################################ + +LIBURCU_VERSION = 0.8.7 +LIBURCU_SITE = http://lttng.org/files/urcu +LIBURCU_SOURCE = userspace-rcu-$(LIBURCU_VERSION).tar.bz2 +LIBURCU_LICENSE = LGPLv2.1+ for the library; MIT-like license for few source files listed in LICENSE; GPLv2+ for test; GPLv3 for few *.m4 files +LIBURCU_LICENSE_FILES = lgpl-2.1.txt lgpl-relicensing.txt gpl-2.0.txt LICENSE + +LIBURCU_AUTORECONF = YES +LIBURCU_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/liburiparser/Config.in b/package/liburiparser/Config.in new file mode 100644 index 0000000000..95a6fe83ae --- /dev/null +++ b/package/liburiparser/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBURIPARSER + bool "liburiparser" + help + uriparser is a strictly RFC 3986 compliant URI parsing and handling + library written in C. + + http://uriparser.sourceforge.net diff --git a/package/liburiparser/liburiparser.hash b/package/liburiparser/liburiparser.hash new file mode 100644 index 0000000000..84340f8b9c --- /dev/null +++ b/package/liburiparser/liburiparser.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/uriparser/files/Sources/0.8.1/ +md5 4e4c5f0ee6abb111a431c45e144247aa uriparser-0.8.1.tar.bz2 +sha1 4405d8baa0d9f5bc0319e6d5e68770acab67b602 uriparser-0.8.1.tar.bz2 diff --git a/package/liburiparser/liburiparser.mk b/package/liburiparser/liburiparser.mk new file mode 100644 index 0000000000..661fa960f4 --- /dev/null +++ b/package/liburiparser/liburiparser.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# liburiparser +# +################################################################################ + +LIBURIPARSER_VERSION = 0.8.1 +LIBURIPARSER_SOURCE = uriparser-$(LIBURIPARSER_VERSION).tar.bz2 +LIBURIPARSER_SITE = http://sourceforge.net/projects/uriparser/files/Sources/$(LIBURIPARSER_VERSION) +LIBURIPARSER_LICENSE = BSD-3c +LIBURIPARSER_LICENSE_FILES = COPYING +LIBURIPARSER_INSTALL_STAGING = YES +LIBURIPARSER_CONF_OPTS = --disable-test + +ifeq ($(BR2_USE_WCHAR),) +LIBURIPARSER_CONF_OPTS += --disable-wchar_t +endif + +$(eval $(autotools-package)) diff --git a/package/libusb-compat/0001-Use-C99-standard-fixed-width-integer-types-in-usb.h.patch b/package/libusb-compat/0001-Use-C99-standard-fixed-width-integer-types-in-usb.h.patch new file mode 100644 index 0000000000..ad71199c4c --- /dev/null +++ b/package/libusb-compat/0001-Use-C99-standard-fixed-width-integer-types-in-usb.h.patch @@ -0,0 +1,236 @@ +From 2e9b6bbebb7cf1ef0095516ec6d5203deb3822e8 Mon Sep 17 00:00:00 2001 +From: Nathan Hjelm +Date: Fri, 9 Oct 2015 15:03:10 -0600 +Subject: [PATCH 1/1] Use C99 standard fixed width integer types in usb.h + +This patch modifies the integer types in usb.h of the form u_int* to the +C99 standard uint* types. + +Based on patch from Gwenhael Goavec-Merou. + +Backported from upstream commit +https://github.com/libusb/libusb-compat-0.1/commit/2e9b6bbebb7cf1ef0095516ec6d5203deb3822e8. + +Signed-off-by: Gwenhael Goavec-Merou +Signed-off-by: Nathan Hjelm +--- + libusb/usb.h | 130 ++++++++++++++++++++++++++++++++--------------------------- + 1 file changed, 70 insertions(+), 60 deletions(-) + +diff --git a/libusb/usb.h b/libusb/usb.h +index 84e730f..d2c30aa 100644 +--- a/libusb/usb.h ++++ b/libusb/usb.h +@@ -2,6 +2,7 @@ + * Prototypes, structure definitions and macros. + * + * Copyright (c) 2000-2003 Johannes Erdfelt ++ * Copyright (c) 2015 Nathan Hjelm + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public +@@ -22,8 +23,8 @@ + * distribution for details. + */ + +-#ifndef __USB_H__ +-#define __USB_H__ ++#ifndef USB_H ++#define USB_H + + #include + #include +@@ -31,6 +32,15 @@ + + #include + ++/* stdint.h is not available on older MSVC */ ++#if defined(_MSC_VER) && (_MSC_VER < 1600) && (!defined(_STDINT)) && (!defined(_STDINT_H)) ++typedef unsigned __int8 uint8_t; ++typedef unsigned __int16 uint16_t; ++typedef unsigned __int32 uint32_t; ++#else ++#include ++#endif ++ + /* + * USB spec information + * +@@ -78,40 +88,40 @@ + + /* All standard descriptors have these 2 fields in common */ + struct usb_descriptor_header { +- u_int8_t bLength; +- u_int8_t bDescriptorType; ++ uint8_t bLength; ++ uint8_t bDescriptorType; + }; + + /* String descriptor */ + struct usb_string_descriptor { +- u_int8_t bLength; +- u_int8_t bDescriptorType; +- u_int16_t wData[1]; ++ uint8_t bLength; ++ uint8_t bDescriptorType; ++ uint16_t wData[1]; + }; + + /* HID descriptor */ + struct usb_hid_descriptor { +- u_int8_t bLength; +- u_int8_t bDescriptorType; +- u_int16_t bcdHID; +- u_int8_t bCountryCode; +- u_int8_t bNumDescriptors; +- /* u_int8_t bReportDescriptorType; */ +- /* u_int16_t wDescriptorLength; */ ++ uint8_t bLength; ++ uint8_t bDescriptorType; ++ uint16_t bcdHID; ++ uint8_t bCountryCode; ++ uint8_t bNumDescriptors; ++ /* uint8_t bReportDescriptorType; */ ++ /* uint16_t wDescriptorLength; */ + /* ... */ + }; + + /* Endpoint descriptor */ + #define USB_MAXENDPOINTS 32 + struct usb_endpoint_descriptor { +- u_int8_t bLength; +- u_int8_t bDescriptorType; +- u_int8_t bEndpointAddress; +- u_int8_t bmAttributes; +- u_int16_t wMaxPacketSize; +- u_int8_t bInterval; +- u_int8_t bRefresh; +- u_int8_t bSynchAddress; ++ uint8_t bLength; ++ uint8_t bDescriptorType; ++ uint8_t bEndpointAddress; ++ uint8_t bmAttributes; ++ uint16_t wMaxPacketSize; ++ uint8_t bInterval; ++ uint8_t bRefresh; ++ uint8_t bSynchAddress; + + unsigned char *extra; /* Extra descriptors */ + int extralen; +@@ -129,15 +139,15 @@ struct usb_endpoint_descriptor { + /* Interface descriptor */ + #define USB_MAXINTERFACES 32 + struct usb_interface_descriptor { +- u_int8_t bLength; +- u_int8_t bDescriptorType; +- u_int8_t bInterfaceNumber; +- u_int8_t bAlternateSetting; +- u_int8_t bNumEndpoints; +- u_int8_t bInterfaceClass; +- u_int8_t bInterfaceSubClass; +- u_int8_t bInterfaceProtocol; +- u_int8_t iInterface; ++ uint8_t bLength; ++ uint8_t bDescriptorType; ++ uint8_t bInterfaceNumber; ++ uint8_t bAlternateSetting; ++ uint8_t bNumEndpoints; ++ uint8_t bInterfaceClass; ++ uint8_t bInterfaceSubClass; ++ uint8_t bInterfaceProtocol; ++ uint8_t iInterface; + + struct usb_endpoint_descriptor *endpoint; + +@@ -155,14 +165,14 @@ struct usb_interface { + /* Configuration descriptor information.. */ + #define USB_MAXCONFIG 8 + struct usb_config_descriptor { +- u_int8_t bLength; +- u_int8_t bDescriptorType; +- u_int16_t wTotalLength; +- u_int8_t bNumInterfaces; +- u_int8_t bConfigurationValue; +- u_int8_t iConfiguration; +- u_int8_t bmAttributes; +- u_int8_t MaxPower; ++ uint8_t bLength; ++ uint8_t bDescriptorType; ++ uint16_t wTotalLength; ++ uint8_t bNumInterfaces; ++ uint8_t bConfigurationValue; ++ uint8_t iConfiguration; ++ uint8_t bmAttributes; ++ uint8_t MaxPower; + + struct usb_interface *interface; + +@@ -172,28 +182,28 @@ struct usb_config_descriptor { + + /* Device descriptor */ + struct usb_device_descriptor { +- u_int8_t bLength; +- u_int8_t bDescriptorType; +- u_int16_t bcdUSB; +- u_int8_t bDeviceClass; +- u_int8_t bDeviceSubClass; +- u_int8_t bDeviceProtocol; +- u_int8_t bMaxPacketSize0; +- u_int16_t idVendor; +- u_int16_t idProduct; +- u_int16_t bcdDevice; +- u_int8_t iManufacturer; +- u_int8_t iProduct; +- u_int8_t iSerialNumber; +- u_int8_t bNumConfigurations; ++ uint8_t bLength; ++ uint8_t bDescriptorType; ++ uint16_t bcdUSB; ++ uint8_t bDeviceClass; ++ uint8_t bDeviceSubClass; ++ uint8_t bDeviceProtocol; ++ uint8_t bMaxPacketSize0; ++ uint16_t idVendor; ++ uint16_t idProduct; ++ uint16_t bcdDevice; ++ uint8_t iManufacturer; ++ uint8_t iProduct; ++ uint8_t iSerialNumber; ++ uint8_t bNumConfigurations; + }; + + struct usb_ctrl_setup { +- u_int8_t bRequestType; +- u_int8_t bRequest; +- u_int16_t wValue; +- u_int16_t wIndex; +- u_int16_t wLength; ++ uint8_t bRequestType; ++ uint8_t bRequest; ++ uint16_t wValue; ++ uint16_t wIndex; ++ uint16_t wLength; + }; + + /* +@@ -254,7 +264,7 @@ struct usb_device { + + void *dev; /* Darwin support */ + +- u_int8_t devnum; ++ uint8_t devnum; + + unsigned char num_children; + struct usb_device **children; +@@ -266,7 +276,7 @@ struct usb_bus { + char dirname[PATH_MAX + 1]; + + struct usb_device *devices; +- u_int32_t location; ++ uint32_t location; + + struct usb_device *root_dev; + }; +-- +2.4.9 + diff --git a/package/libusb-compat/Config.in b/package/libusb-compat/Config.in new file mode 100644 index 0000000000..076d7b8d77 --- /dev/null +++ b/package/libusb-compat/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LIBUSB_COMPAT + bool "libusb-compat" + depends on BR2_PACKAGE_LIBUSB + help + libusb-0.1 compatibility layer for libusb-1.0. + + http://libusb.info/ diff --git a/package/libusb-compat/libusb-compat.hash b/package/libusb-compat/libusb-compat.hash new file mode 100644 index 0000000000..c01eee532b --- /dev/null +++ b/package/libusb-compat/libusb-compat.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 404ef4b6b324be79ac1bfb3d839eac860fbc929e6acb1ef88793a6ea328bc55a libusb-compat-0.1.5.tar.bz2 diff --git a/package/libusb-compat/libusb-compat.mk b/package/libusb-compat/libusb-compat.mk new file mode 100644 index 0000000000..a98eb0924f --- /dev/null +++ b/package/libusb-compat/libusb-compat.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libusb-compat +# +################################################################################ + +LIBUSB_COMPAT_VERSION_MAJOR = 0.1 +LIBUSB_COMPAT_VERSION = $(LIBUSB_COMPAT_VERSION_MAJOR).5 +LIBUSB_COMPAT_SOURCE = libusb-compat-$(LIBUSB_COMPAT_VERSION).tar.bz2 +LIBUSB_COMPAT_SITE = http://downloads.sourceforge.net/project/libusb/libusb-compat-$(LIBUSB_COMPAT_VERSION_MAJOR)/libusb-compat-$(LIBUSB_COMPAT_VERSION) +LIBUSB_COMPAT_DEPENDENCIES = host-pkgconf libusb +LIBUSB_COMPAT_INSTALL_STAGING = YES +LIBUSB_COMPAT_CONFIG_SCRIPTS = libusb-config +LIBUSB_COMPAT_LICENSE = LGPLv2.1+ +LIBUSB_COMPAT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libusb/Config.in b/package/libusb/Config.in new file mode 100644 index 0000000000..5238588aa8 --- /dev/null +++ b/package/libusb/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBUSB + bool "libusb" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Userspace library for accessing USB devices + + http://libusb.info/ + +comment "libusb needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libusb/libusb.hash b/package/libusb/libusb.hash new file mode 100644 index 0000000000..175273818e --- /dev/null +++ b/package/libusb/libusb.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 6c502c816002f90d4f76050a6429c3a7e0d84204222cbff2dce95dd773ba6840 libusb-1.0.19.tar.bz2 diff --git a/package/libusb/libusb.mk b/package/libusb/libusb.mk new file mode 100644 index 0000000000..d24a6343eb --- /dev/null +++ b/package/libusb/libusb.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libusb +# +################################################################################ + +LIBUSB_VERSION_MAJOR = 1.0 +LIBUSB_VERSION = $(LIBUSB_VERSION_MAJOR).19 +LIBUSB_SOURCE = libusb-$(LIBUSB_VERSION).tar.bz2 +LIBUSB_SITE = http://downloads.sourceforge.net/project/libusb/libusb-$(LIBUSB_VERSION_MAJOR)/libusb-$(LIBUSB_VERSION) +LIBUSB_LICENSE = LGPLv2.1+ +LIBUSB_LICENSE_FILES = COPYING +LIBUSB_DEPENDENCIES = host-pkgconf +LIBUSB_INSTALL_STAGING = YES + +# Avoid the discovery of udev for the host variant +HOST_LIBUSB_CONF_OPTS = --disable-udev +HOST_LIBUSB_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +LIBUSB_DEPENDENCIES += udev +else +LIBUSB_CONF_OPTS += --disable-udev +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libusbgx/Config.in b/package/libusbgx/Config.in new file mode 100644 index 0000000000..fcebf3cfaa --- /dev/null +++ b/package/libusbgx/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBUSBGX + bool "libusbgx" + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBCONFIG + help + libusbgx is a C library encapsulating the kernel USB + gadget-configfs userspace API functionality. + + https://github.com/libusbgx/libusbgx + +comment "libusbgx needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libusbgx/libusbgx.hash b/package/libusbgx/libusbgx.hash new file mode 100644 index 0000000000..c185c5803c --- /dev/null +++ b/package/libusbgx/libusbgx.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 1e258205dcde99d0eeb52404ee7ff1bc9a39eb3878e8455fb72bad7cf90c7357 libusbgx-2e3d43ee098ed928d1baa61ce791ce9ff4788c5a.tar.gz diff --git a/package/libusbgx/libusbgx.mk b/package/libusbgx/libusbgx.mk new file mode 100644 index 0000000000..1340d2d17a --- /dev/null +++ b/package/libusbgx/libusbgx.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libusbgx +# +################################################################################ + +LIBUSBGX_VERSION = 2e3d43ee098ed928d1baa61ce791ce9ff4788c5a +LIBUSBGX_SITE = $(call github,libusbgx,libusbgx,$(LIBUSBGX_VERSION)) +LIBUSBGX_LICENSE = GPLv2+ (examples), LGPLv2.1+ (library) +LIBUSBGX_LICENSE_FILES = COPYING COPYING.LGPL +LIBUSBGX_DEPENDENCIES = host-pkgconf libconfig +LIBUSBGX_AUTORECONF = YES +LIBUSBGX_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/libuv/Config.in b/package/libuv/Config.in new file mode 100644 index 0000000000..26cb97eecf --- /dev/null +++ b/package/libuv/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBUV + bool "libuv" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + help + libuv is a multi-platform support library with a focus + on asynchronous I/O. + + https://github.com/libuv/libuv + +comment "libuv needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on BR2_USE_MMU diff --git a/package/libuv/libuv.hash b/package/libuv/libuv.hash new file mode 100644 index 0000000000..9758d76a81 --- /dev/null +++ b/package/libuv/libuv.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 f8b8272a0d80138b709d38fad2baf771899eed61e7f9578d17898b07a1a2a5eb libuv-v1.9.0.tar.gz diff --git a/package/libuv/libuv.mk b/package/libuv/libuv.mk new file mode 100644 index 0000000000..45b301f68a --- /dev/null +++ b/package/libuv/libuv.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# libuv +# +################################################################################ + +LIBUV_VERSION = v1.9.0 +LIBUV_SITE = $(call github,libuv,libuv,$(LIBUV_VERSION)) +LIBUV_DEPENDENCIES = host-pkgconf +LIBUV_INSTALL_STAGING = YES +LIBUV_AUTORECONF = YES +LIBUV_LICENSE = BSD-2c, BSD-3c, ISC, MIT +LIBUV_LICENSE_FILES = LICENSE + +# Upstream needs tests to be run sequentially. This is the default in +# automake 1.11 and before, but not starting in 1.12. To maintain +# sequentiality in 1.12 and later, the automake option 'serial-tests' +# must be used, Unfortunately, it is not recognised by 1.11 and +# before. So upstream only adds it conditionally. We use automake +# 1.14, so we need it. +define LIBUV_FIXUP_AUTOGEN + echo "m4_define([UV_EXTRA_AUTOMAKE_FLAGS], [serial-tests])" \ + >$(@D)/m4/libuv-extra-automake-flags.m4 +endef +LIBUV_POST_PATCH_HOOKS += LIBUV_FIXUP_AUTOGEN + +$(eval $(autotools-package)) diff --git a/package/libv4l/0001-fixup-lfs-mismatch-in-preload-libraries.patch b/package/libv4l/0001-fixup-lfs-mismatch-in-preload-libraries.patch new file mode 100644 index 0000000000..f23eb7a350 --- /dev/null +++ b/package/libv4l/0001-fixup-lfs-mismatch-in-preload-libraries.patch @@ -0,0 +1,44 @@ +From e5952b043a71fe83fbc392e498e8f77774fca0d8 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Sat, 28 Jun 2014 09:32:53 -0300 +Subject: [PATCH] fixup lfs mismatch in preload libraries + +Ensure that the lfs variants are not transparently used instead of the !lfs +ones so both can be wrapped, independently of any custom CFLAGS/CPPFLAGS. + +Signed-off-by: Peter Korsgaard +--- + lib/libv4l1/v4l1compat.c | 3 +++ + lib/libv4l2/v4l2convert.c | 3 +++ + 2 files changed, 6 insertions(+) + +diff --git a/lib/libv4l1/v4l1compat.c b/lib/libv4l1/v4l1compat.c +index e328288..70eb74f 100644 +--- a/lib/libv4l1/v4l1compat.c ++++ b/lib/libv4l1/v4l1compat.c +@@ -19,6 +19,9 @@ + # Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA + */ + ++/* ensure we see *64 variants and they aren't transparently used */ ++#undef _LARGEFILE_SOURCE ++#undef _FILE_OFFSET_BITS + #define _LARGEFILE64_SOURCE 1 + + #include +diff --git a/lib/libv4l2/v4l2convert.c b/lib/libv4l2/v4l2convert.c +index 9b46ab8..bc41056 100644 +--- a/lib/libv4l2/v4l2convert.c ++++ b/lib/libv4l2/v4l2convert.c +@@ -23,6 +23,9 @@ + /* prevent GCC 4.7 inlining error */ + #undef _FORTIFY_SOURCE + ++/* ensure we see *64 variants and they aren't transparently used */ ++#undef _LARGEFILE_SOURCE ++#undef _FILE_OFFSET_BITS + #define _LARGEFILE64_SOURCE 1 + + #include +-- +1.9.1 diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in new file mode 100644 index 0000000000..4da00342a2 --- /dev/null +++ b/package/libv4l/Config.in @@ -0,0 +1,48 @@ +config BR2_PACKAGE_LIBV4L + bool "libv4l" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # dlopen() + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # media headers + select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + libv4l is a collection of libraries which adds a thin abstraction + layer on top of video4linux2 devices. libv4l consists of 3 different + libraries: libv4lconvert, libv4l1 and libv4l2. + + http://linuxtv.org/wiki/index.php/V4l-utils + +if BR2_PACKAGE_LIBV4L + +comment "libv4l JPEG support not enabled" + depends on !BR2_PACKAGE_JPEG + +config BR2_PACKAGE_LIBV4L_UTILS + bool "v4l-utils tools" + depends on BR2_ENABLE_LOCALE + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + v4l-utils is a collection of various video4linux and DVB utilities. + Enable this if you want to build the following tools: + - cx18-ctl + - dvb-fe-tool, dvbv5-zap, dvbv5-scan, dvb-format-convert + - decode_tm6000 + - ir-keytable + - media-ctl + - v4l2-compliance + - v4l2-ctl, cx18-ctl, ivtv-ctl + - v4l2-sysfs-path + - rds-ctl + - qv4l2 (if Qt is enabled) + +comment "libv4l-utils tools need a toolchain w/ locale" + depends on !BR2_ENABLE_LOCALE + +endif + +comment "libv4l needs a toolchain w/ threads, dynamic library, C++ and headers >= 3.0" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \ + || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 diff --git a/package/libv4l/libv4l.hash b/package/libv4l/libv4l.hash new file mode 100644 index 0000000000..d58296f90c --- /dev/null +++ b/package/libv4l/libv4l.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 78ead27ee58a701d7c6342303cf4520bdd4a2b88a7813bc99a0b389307e4336b v4l-utils-1.10.0.tar.bz2 diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk new file mode 100644 index 0000000000..bdd28bf8dc --- /dev/null +++ b/package/libv4l/libv4l.mk @@ -0,0 +1,69 @@ +################################################################################ +# +# libv4l +# +################################################################################ + +LIBV4L_VERSION = 1.10.0 +LIBV4L_SOURCE = v4l-utils-$(LIBV4L_VERSION).tar.bz2 +LIBV4L_SITE = http://linuxtv.org/downloads/v4l-utils +LIBV4L_INSTALL_STAGING = YES +LIBV4L_DEPENDENCIES = host-pkgconf +LIBV4L_CONF_OPTS = --disable-doxygen-doc + +# fix uclibc-ng configure/compile +LIBV4L_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' + +# v4l-utils components have different licences, see v4l-utils.spec for details +LIBV4L_LICENSE = GPLv2+ (utilities), LGPLv2.1+ (libraries) +LIBV4L_LICENSE_FILES = COPYING COPYING.libv4l lib/libv4l1/libv4l1-kernelcode-license.txt + +ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y) +LIBV4L_DEPENDENCIES += argp-standalone +LIBV4L_LIBS += -largp +endif + +LIBV4L_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +ifeq ($(BR2_PACKAGE_JPEG),y) +LIBV4L_DEPENDENCIES += jpeg +LIBV4L_CONF_OPTS += --with-jpeg +else +LIBV4L_CONF_OPTS += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +LIBV4L_CONF_OPTS += --with-libudev +LIBV4L_DEPENDENCIES += udev +else +LIBV4L_CONF_OPTS += --without-libudev +endif + +ifeq ($(BR2_PACKAGE_LIBV4L_UTILS),y) +LIBV4L_CONF_OPTS += --enable-v4l-utils +# clock_gettime is used, which is provided by librt for glibc < 2.17 +LIBV4L_LIBS += -lrt +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +LIBV4L_DEPENDENCIES += gettext +endif +ifeq ($(BR2_PACKAGE_QT5BASE)$(BR2_PACKAGE_QT5BASE_GUI)$(BR2_PACKAGE_QT5BASE_WIDGETS),yyy) +LIBV4L_CONF_OPTS += --enable-qv4l2 +LIBV4L_DEPENDENCIES += qt5base +# protect against host version detection of moc-qt5/rcc-qt5/uic-qt5 +LIBV4L_CONF_ENV += \ + ac_cv_prog_MOC=$(HOST_DIR)/usr/bin/moc \ + ac_cv_prog_RCC=$(HOST_DIR)/usr/bin/rcc \ + ac_cv_prog_UIC=$(HOST_DIR)/usr/bin/uic +else ifeq ($(BR2_PACKAGE_QT_GUI_MODULE),y) +LIBV4L_CONF_OPTS += --enable-qv4l2 +LIBV4L_DEPENDENCIES += qt +else +LIBV4L_CONF_OPTS += --disable-qv4l2 +endif +else +LIBV4L_CONF_OPTS += --disable-v4l-utils +endif + +LIBV4L_CONF_ENV += LIBS="$(LIBV4L_LIBS)" + +$(eval $(autotools-package)) diff --git a/package/libva-intel-driver/Config.in b/package/libva-intel-driver/Config.in new file mode 100644 index 0000000000..0f5b656b12 --- /dev/null +++ b/package/libva-intel-driver/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_LIBVA_INTEL_DRIVER + bool "libva-intel-driver" + select BR2_PACKAGE_LIBVA + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBDRM_INTEL + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XORG7 + depends on BR2_i386 || BR2_x86_64 + depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm/libpthread-stubs + depends on !BR2_STATIC_LIBS # libva + help + VA-API back-end driver for Intel graphics chips + + https://01.org/linuxgraphics/community/vaapi + +comment "libva intel driver needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on BR2_i386 || BR2_x86_64 diff --git a/package/libva-intel-driver/libva-intel-driver.hash b/package/libva-intel-driver/libva-intel-driver.hash new file mode 100644 index 0000000000..9d77aeddce --- /dev/null +++ b/package/libva-intel-driver/libva-intel-driver.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/libva/2016-March/003886.html +sha1 6766ff2e8134e09e9204ec9ccd3b8d550890d5d2 libva-intel-driver-1.7.0.tar.bz2 diff --git a/package/libva-intel-driver/libva-intel-driver.mk b/package/libva-intel-driver/libva-intel-driver.mk new file mode 100644 index 0000000000..e930adefd8 --- /dev/null +++ b/package/libva-intel-driver/libva-intel-driver.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# libva-intel-driver +# +################################################################################ + +LIBVA_INTEL_DRIVER_VERSION = 1.7.0 +LIBVA_INTEL_DRIVER_SOURCE = libva-intel-driver-$(LIBVA_INTEL_DRIVER_VERSION).tar.bz2 +LIBVA_INTEL_DRIVER_SITE = http://www.freedesktop.org/software/vaapi/releases/libva-intel-driver +LIBVA_INTEL_DRIVER_LICENSE = MIT +LIBVA_INTEL_DRIVER_LICENSE_FILES = COPYING +# needed to work around https://bugs.freedesktop.org/show_bug.cgi?id=79478 +LIBVA_INTEL_DRIVER_AUTORECONF = YES +LIBVA_INTEL_DRIVER_DEPENDENCIES = host-pkgconf libdrm libva + +ifeq ($(BR2_PACKAGE_XORG7),y) +LIBVA_INTEL_DRIVER_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXfixes +LIBVA_INTEL_DRIVER_CONF_OPTS += --enable-x11 +else +LIBVA_INTEL_DRIVER_CONF_OPTS += --disable-x11 +endif + +ifeq ($(BR2_PACKAGE_WAYLAND),y) +LIBVA_INTEL_DRIVER_DEPENDENCIES += wayland +LIBVA_INTEL_DRIVER_CONF_OPTS += --enable-wayland +else +LIBVA_INTEL_DRIVER_CONF_OPTS += --disable-wayland +endif + +$(eval $(autotools-package)) diff --git a/package/libva/0001-no_test_decode.patch b/package/libva/0001-no_test_decode.patch new file mode 100644 index 0000000000..0f0d786679 --- /dev/null +++ b/package/libva/0001-no_test_decode.patch @@ -0,0 +1,17 @@ +mpeg2vldemo is the only file requiring cxx support. It is not needed for +buildroot, so disable its compilation to avoid depending on cxx. + +Signed-off-by: Bernd Kuhls + +diff -uNr libva-1.3.0.org/test/Makefile.am libva-1.3.0/test/Makefile.am +--- libva-1.3.0.org/test/Makefile.am 2014-03-24 05:49:46.000000000 +0100 ++++ libva-1.3.0/test/Makefile.am 2014-04-26 18:12:25.644390292 +0200 +@@ -20,7 +20,7 @@ + # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-SUBDIRS = common decode encode vainfo ++SUBDIRS = common encode vainfo + + if USE_X11 + SUBDIRS += basic putsurface diff --git a/package/libva/Config.in b/package/libva/Config.in new file mode 100644 index 0000000000..467b9d2fa4 --- /dev/null +++ b/package/libva/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBVA + bool "libva" + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XORG7 + depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm/libpthread-stubs + depends on !BR2_STATIC_LIBS + help + The main motivation for VA-API (Video Acceleration API) is to enable + hardware accelerated video decode/encode at various entry-points (VLD, + IDCT, Motion Compensation etc.) for the prevailing coding standards + today (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3). + + http://www.freedesktop.org/wiki/Software/vaapi/ + +comment "libva needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/libva/libva.hash b/package/libva/libva.hash new file mode 100644 index 0000000000..02113651ba --- /dev/null +++ b/package/libva/libva.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/libva/2016-March/003885.html +sha1 e1e440da60b11986afb54fc130c7707f11827298 libva-1.7.0.tar.bz2 diff --git a/package/libva/libva.mk b/package/libva/libva.mk new file mode 100644 index 0000000000..e11bed3c96 --- /dev/null +++ b/package/libva/libva.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# libva +# +################################################################################ + +LIBVA_VERSION = 1.7.0 +LIBVA_SOURCE = libva-$(LIBVA_VERSION).tar.bz2 +LIBVA_SITE = http://www.freedesktop.org/software/vaapi/releases/libva +LIBVA_LICENSE = MIT +LIBVA_LICENSE_FILES = COPYING +LIBVA_AUTORECONF = YES +LIBVA_INSTALL_STAGING = YES +LIBVA_DEPENDENCIES = host-pkgconf libdrm + +# libdrm is a hard-dependency +LIBVA_CONF_OPTS = \ + --enable-drm \ + --disable-dummy-driver \ + --with-drivers-path="/usr/lib/va" + +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y) +LIBVA_DEPENDENCIES += mesa3d +LIBVA_CONF_OPTS += --enable-glx +else +LIBVA_CONF_OPTS += --disable-glx +endif + +ifeq ($(BR2_PACKAGE_XORG7),y) +LIBVA_DEPENDENCIES += xlib_libX11 xlib_libXext xlib_libXfixes +LIBVA_CONF_OPTS += --enable-x11 +else +LIBVA_CONF_OPTS += --disable-x11 +endif + +ifeq ($(BR2_PACKAGE_WAYLAND),y) +LIBVA_DEPENDENCIES += wayland +LIBVA_CONF_OPTS += --enable-wayland +else +LIBVA_CONF_OPTS += --disable-wayland +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y) +LIBVA_DEPENDENCIES += libegl +LIBVA_CONF_OPTS += --enable-egl +else +LIBVA_CONF_OPTS += --disable-egl +endif + +# Autoreconf requires an m4 directory to exist +define LIBVA_PATCH_M4 + mkdir -p $(@D)/m4 +endef +LIBVA_POST_PATCH_HOOKS += LIBVA_PATCH_M4 + +$(eval $(autotools-package)) diff --git a/package/libvips/0001-fix-no-gtk-doc.patch b/package/libvips/0001-fix-no-gtk-doc.patch new file mode 100644 index 0000000000..bfaf7c345b --- /dev/null +++ b/package/libvips/0001-fix-no-gtk-doc.patch @@ -0,0 +1,35 @@ +From a3d47be3b6bed845af5e1aa87ca2da2b1e840cbb Mon Sep 17 00:00:00 2001 +From: Pieter De Gendt +Date: Thu, 29 Jan 2015 12:25:35 +0100 +Subject: [PATCH] Same patch as for systemd in commit + http://git.buildroot.net/buildroot/commit/?id=7144f2f04b70553 + +Fix deactivation of gtk-doc + +The tarball contains the Makefile for building documentation with gtk-doc, +Unfortunately the AM_CONDITIONAL variable is not the correct one, which +results in an error when running autoreconf. + +This patch fixes this issue. + +Signed-off-by: Pieter De Gendt +--- + doc/reference/gtk-doc.make | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/doc/reference/gtk-doc.make b/doc/reference/gtk-doc.make +index e791656..786803e 100644 +--- a/doc/reference/gtk-doc.make ++++ b/doc/reference/gtk-doc.make +@@ -267,7 +267,7 @@ uninstall-local: + # + # Require gtk-doc when making dist + # +-if HAVE_GTK_DOC ++if ENABLE_GTK_DOC + dist-check-gtkdoc: docs + else + dist-check-gtkdoc: +-- +2.2.2 + diff --git a/package/libvips/Config.in b/package/libvips/Config.in new file mode 100644 index 0000000000..87ada513d6 --- /dev/null +++ b/package/libvips/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LIBVIPS + bool "libvips" + depends on BR2_USE_WCHAR # gettext, libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # fork() + # C++ support is required to build libvips + # https://github.com/jcupitt/libvips/issues/231 + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + libvips is a 2D image processing library. Compared to + similar libraries, libvips runs quickly and uses little + memory. + + http://www.vips.ecs.soton.ac.uk/ + +comment "libvips needs a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_INSTALL_LIBSTDCPP diff --git a/package/libvips/libvips.hash b/package/libvips/libvips.hash new file mode 100644 index 0000000000..18c1ae80f9 --- /dev/null +++ b/package/libvips/libvips.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 45961855e21c8d5f0983d05bb79a6f3c2427dc6eed8e3ac68c0f62759b8612c6 vips-7.42.2.tar.gz diff --git a/package/libvips/libvips.mk b/package/libvips/libvips.mk new file mode 100644 index 0000000000..5f80b2d64c --- /dev/null +++ b/package/libvips/libvips.mk @@ -0,0 +1,85 @@ +################################################################################ +# +# libvips +# +################################################################################ + +LIBVIPS_VERSION_MAJOR = 7.42 +LIBVIPS_VERSION = $(LIBVIPS_VERSION_MAJOR).2 +LIBVIPS_SOURCE = vips-$(LIBVIPS_VERSION).tar.gz +LIBVIPS_SITE = http://www.vips.ecs.soton.ac.uk/supported/$(LIBVIPS_VERSION_MAJOR) +LIBVIPS_LICENSE = LGPLv2.1+ +LIBVIPS_LICENSE_FILES = COPYING +# We're patching gtk-doc.make, so need to autoreconf +LIBVIPS_AUTORECONF = YES + +# Sparc64 compile fails, for all optimization levels except -O0. To +# fix the problem, use -O0 with no optimization instead. Bug reported +# upstream at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69038. +ifeq ($(BR2_sparc64),y) +LIBVIPS_CXXFLAGS += -O0 +endif + +LIBVIPS_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) $(LIBVIPS_CXXFLAGS)" + +LIBVIPS_CONF_OPTS = \ + --disable-introspection \ + --without-dmalloc \ + --without-gsf \ + --without-magick \ + --without-orc \ + --without-lcms \ + --without-OpenEXR \ + --without-openslide \ + --without-matio \ + --without-cfitsio \ + --without-libwebp \ + --without-pangoft2 \ + --without-x \ + --without-zip \ + --without-python +LIBVIPS_INSTALL_STAGING = YES +LIBVIPS_DEPENDENCIES = \ + host-pkgconf libglib2 \ + libxml2 $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +# --disable-cxx is broken upstream +# https://github.com/jcupitt/libvips/issues/231 +LIBVIPS_CONF_OPTS += --enable-cxx + +ifeq ($(BR2_PACKAGE_JPEG),y) +LIBVIPS_CONF_OPTS += --with-jpeg +LIBVIPS_DEPENDENCIES += jpeg +else +LIBVIPS_CONF_OPTS += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +LIBVIPS_CONF_OPTS += --with-png +LIBVIPS_DEPENDENCIES += libpng +else +LIBVIPS_CONF_OPTS += --without-png +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) +LIBVIPS_CONF_OPTS += --with-tiff +LIBVIPS_DEPENDENCIES += tiff +else +LIBVIPS_CONF_OPTS += --without-tiff +endif + +ifeq ($(BR2_PACKAGE_FFTW),y) +LIBVIPS_CONF_OPTS += --with-fftw +LIBVIPS_DEPENDENCIES += fftw +else +LIBVIPS_CONF_OPTS += --without-fftw +endif + +ifeq ($(BR2_PACKAGE_LIBEXIF),y) +LIBVIPS_CONF_OPTS += --with-libexif +LIBVIPS_DEPENDENCIES += libexif +else +LIBVIPS_CONF_OPTS += --without-libexif +endif + +$(eval $(autotools-package)) diff --git a/package/libvncserver/Config.in b/package/libvncserver/Config.in new file mode 100644 index 0000000000..460aa784e9 --- /dev/null +++ b/package/libvncserver/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_LIBVNCSERVER + bool "libvncserver" + depends on BR2_USE_MMU # VNCommand.c uses fork() + # binutils issue (bad expression) + depends on !BR2_nios2 + help + libvncserver is a VNC server/client library. + + http://libvncserver.sourceforge.net/ + +if BR2_PACKAGE_LIBVNCSERVER + +config BR2_PACKAGE_LIBVNCSERVER_TIGHTPNG + bool "TightPNG encoding support" + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBPNG + help + TightPNG encoding speeds up HTML5 based VNC clients like + noVNC. + + http://wiki.qemu.org/VNC_Tight_PNG + +endif diff --git a/package/libvncserver/libvncserver.hash b/package/libvncserver/libvncserver.hash new file mode 100644 index 0000000000..23d5fb080b --- /dev/null +++ b/package/libvncserver/libvncserver.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 ed10819a5bfbf269969f97f075939cc38273cc1b6d28bccfb0999fba489411f7 LibVNCServer-0.9.10.tar.gz diff --git a/package/libvncserver/libvncserver.mk b/package/libvncserver/libvncserver.mk new file mode 100644 index 0000000000..92cb1e1aa6 --- /dev/null +++ b/package/libvncserver/libvncserver.mk @@ -0,0 +1,69 @@ +################################################################################ +# +# libvncserver +# +################################################################################ + +LIBVNCSERVER_VERSION = 0.9.10 +LIBVNCSERVER_SOURCE = LibVNCServer-$(LIBVNCSERVER_VERSION).tar.gz +LIBVNCSERVER_SITE = https://github.com/LibVNC/libvncserver/archive +LIBVNCSERVER_LICENSE = GPLv2+ +LIBVNCSERVER_LICENSE_FILES = COPYING +LIBVNCSERVER_INSTALL_STAGING = YES +LIBVNCSERVER_CONFIG_SCRIPTS = libvncserver-config +LIBVNCSERVER_DEPENDENCIES = host-pkgconf + +# Upstream decided to remove generated autotools files from the +# tarball, so we need to generate them. +LIBVNCSERVER_AUTORECONF = YES + +# libvncserver does not get along with newer libva versions +# https://github.com/LibVNC/libvncserver/issues/11 +LIBVNCSERVER_CONF_OPTS += --without-libva + +# only used for examples +LIBVNCSERVER_CONF_OPTS += --with-sdl-config=/bin/false + +ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +LIBVNCSERVER_CONF_OPTS += --without-pthread +endif + +# openssl supports needs NPTL thread support +ifeq ($(BR2_PACKAGE_OPENSSL)$(BR2_TOOLCHAIN_HAS_THREADS_NPTL),yy) +LIBVNCSERVER_DEPENDENCIES += openssl +else +LIBVNCSERVER_CONF_OPTS += --without-crypto --without-ssl +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +LIBVNCSERVER_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +LIBVNCSERVER_DEPENDENCIES += libgcrypt +else +LIBVNCSERVER_CONF_OPTS += --without-gcrypt +endif + +ifeq ($(BR2_PACKAGE_GNUTLS)$(BR2_PACKAGE_LIBGCRYPT),yy) +LIBVNCSERVER_DEPENDENCIES += gnutls host-pkgconf +else +LIBVNCSERVER_CONF_OPTS += --without-gnutls +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +LIBVNCSERVER_DEPENDENCIES += jpeg +else +LIBVNCSERVER_CONF_OPTS += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +LIBVNCSERVER_DEPENDENCIES += libpng +else +LIBVNCSERVER_CONF_OPTS += --without-png +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +LIBVNCSERVER_DEPENDENCIES += zlib +else +LIBVNCSERVER_CONF_OPTS += --without-zlib +endif + +$(eval $(autotools-package)) diff --git a/package/libvorbis/Config.in b/package/libvorbis/Config.in new file mode 100644 index 0000000000..e322dd256d --- /dev/null +++ b/package/libvorbis/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBVORBIS + bool "libvorbis" + select BR2_PACKAGE_LIBOGG + help + Library for the Vorbis open source audio decoder + Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, + general-purpose compressed audio format for mid to high quality + (8kHz-48.0kHz, 16+ bit, polyphonic) audio and music at fixed and + variable bitrates from 16 to 128 kbps/channel. + + This places Vorbis in the same competitive class as audio + representations such as MPEG-4 (AAC), and similar to, but higher + performance than MPEG-1/2 audio layer 3, MPEG-4 audio (TwinVQ), + WMA and PAC. diff --git a/package/libvorbis/libvorbis.hash b/package/libvorbis/libvorbis.hash new file mode 100644 index 0000000000..e990f4d74f --- /dev/null +++ b/package/libvorbis/libvorbis.hash @@ -0,0 +1,2 @@ +# From http://www.xiph.org/downloads/ +sha256 54f94a9527ff0a88477be0a71c0bab09a4c3febe0ed878b24824906cd4b0e1d1 libvorbis-1.3.5.tar.xz diff --git a/package/libvorbis/libvorbis.mk b/package/libvorbis/libvorbis.mk new file mode 100644 index 0000000000..f1b710c8c8 --- /dev/null +++ b/package/libvorbis/libvorbis.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libvorbis +# +################################################################################ + +LIBVORBIS_VERSION = 1.3.5 +LIBVORBIS_SOURCE = libvorbis-$(LIBVORBIS_VERSION).tar.xz +LIBVORBIS_SITE = http://downloads.xiph.org/releases/vorbis +LIBVORBIS_INSTALL_STAGING = YES +LIBVORBIS_CONF_OPTS = --disable-oggtest +LIBVORBIS_DEPENDENCIES = host-pkgconf libogg +LIBVORBIS_LICENSE = BSD-3c +LIBVORBIS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/libvpx/Config.in b/package/libvpx/Config.in new file mode 100644 index 0000000000..6b0400c0a2 --- /dev/null +++ b/package/libvpx/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIBVPX + bool "libvpx" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + A high-quality, open video format that's freely available to + everyone. Supports the VP8 and VP9 formats. + + http://webmproject.org + +comment "libvpx needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libvpx/libvpx.hash b/package/libvpx/libvpx.hash new file mode 100644 index 0000000000..44cd994e10 --- /dev/null +++ b/package/libvpx/libvpx.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 f582d9b2d60a592a4a3d8c32965ca2d2167e9ade38c6c30bac8801ff66a118e4 libvpx-1.4.0.tar.bz2 diff --git a/package/libvpx/libvpx.mk b/package/libvpx/libvpx.mk new file mode 100644 index 0000000000..066b037fb8 --- /dev/null +++ b/package/libvpx/libvpx.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# libvpx +# +################################################################################ + +LIBVPX_VERSION = 1.4.0 +LIBVPX_SOURCE = libvpx-$(LIBVPX_VERSION).tar.bz2 +LIBVPX_SITE = http://storage.googleapis.com/downloads.webmproject.org/releases/webm +LIBVPX_LICENSE = BSD-3c +LIBVPX_LICENSE_FILES = LICENSE PATENTS +LIBVPX_INSTALL_STAGING = YES + +# ld is being used with cc options. therefore, pretend ld is cc. +LIBVPX_CONF_ENV = \ + LD="$(TARGET_CC)" \ + CROSS=$(GNU_TARGET_NAME) + +LIBVPX_CONF_OPTS = \ + --disable-examples \ + --disable-docs \ + --disable-unit-tests + +# This is not a true autotools package. It is based on the ffmpeg build system +define LIBVPX_CONFIGURE_CMDS + (cd $(LIBVPX_SRCDIR) && rm -rf config.cache && \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + $(LIBVPX_CONF_ENV) \ + ./configure \ + --target=generic-gnu \ + --enable-pic \ + --prefix=/usr \ + $(SHARED_STATIC_LIBS_OPTS) \ + $(LIBVPX_CONF_OPTS) \ + ) +endef + +define LIBVPX_BUILD_CMDS + $(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) -C $(@D) all +endef + +define LIBVPX_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install +endef + +define LIBVPX_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(LIBVPX_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/libwebsock/0001-Switch-to-use-pkg-config-to-detect-libevent-and-open.patch b/package/libwebsock/0001-Switch-to-use-pkg-config-to-detect-libevent-and-open.patch new file mode 100644 index 0000000000..ea3fd0074b --- /dev/null +++ b/package/libwebsock/0001-Switch-to-use-pkg-config-to-detect-libevent-and-open.patch @@ -0,0 +1,81 @@ +From a6c35dbab5a2a75c176e031122ee64152e50e5d3 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 1 Jan 2015 12:23:43 +0100 +Subject: [PATCH] Switch to use pkg-config to detect libevent and openssl + +Switching to pkg-config fixes a number of problems when detecting the +libraries. For example the detection of libpthread was failing, +because libevent_threads was added to LIBS before libevent itself, +causing the libpthread test to fail due to missing symbols. pkg-config +is anyway nowadays the preferred way for detecting libraries. It also +has the benefit of working properly in static library situations. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 36 ++++++++++++------------------------ + 1 file changed, 12 insertions(+), 24 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d4109ce..fc1cadc 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -27,35 +27,20 @@ AC_FUNC_MALLOC + AC_FUNC_REALLOC + AC_CHECK_FUNCS([memset socket strstr]) + +-AC_CHECK_HEADERS([event2/thread.h], [ +- LIBS="-levent_pthreads ${LIBS}" +- ], [ +- echo "libevent_pthreads required, failing" +- exit -1 +- ]) +-AC_CHECK_LIB(pthread, pthread_create, [LIBS="-lpthread ${LIBS}"], [ ++AC_CHECK_LIB(pthread, pthread_create, [PTHREAD_LIBS="-lpthread"], [ + echo "pthreads required, failing" + exit -1 + ]) +-AC_CHECK_LIB(event, event_base_dispatch, [], [ +- echo "libevent required, failing" +- exit -1 +- ]) ++ ++PKG_CHECK_MODULES([EVENT], [libevent]) ++PKG_CHECK_MODULES([EVENT_PTHREAD], [libevent_pthreads]) + + AS_IF([test "x$with_ssl" != "xno"], + [ +- AC_CHECK_LIB([ssl], [SSL_CTX_new], +- [ +- LIBS="-lssl ${LIBS}" +- AC_CHECK_LIB([event_openssl], [bufferevent_openssl_socket_new], [ +- LIBS="-levent_openssl ${LIBS}" +- have_ssl=yes +- ], [have_ssl=no]) +- ], +- [have_ssl=no]) +- ], +- [have_ssl=no]) +- ++ PKG_CHECK_MODULES([SSL], [openssl], [have_ssl=yes], [have_ssl=no]) ++ AS_IF([test "x${have_ssl}" = "xyes"], ++ [PKG_CHECK_MODULES([EVENT_OPENSSL], [libevent_openssl], [have_ssl=yes], [have_ssl=no])])]) ++ + AS_IF([test "x$have_ssl" = "xyes"], + [ + AC_DEFINE([WEBSOCK_HAVE_SSL], [1], [Define if building SSL support]) +@@ -63,8 +48,11 @@ AS_IF([test "x$have_ssl" = "xyes"], + [AS_IF([test "x$with_ssl" = "xyes"], + [AC_MSG_ERROR([SSL support requested but not found]) + ])]) +- ++ + AM_CONDITIONAL([HAVE_SSL], [test "x$have_ssl" = "xyes"]) ++ ++LIBS="${EVENT_LIBS} ${EVENT_PTHREAD_LIBS} ${PTHREAD_LIBS} ${SSL_LIBS} ${EVENT_OPENSSL_LIBS}" ++ + AC_DEFINE_UNQUOTED([WEBSOCK_PACKAGE_VERSION], ["$PACKAGE_VERSION"], [libwebsock version]) + AC_DEFINE_UNQUOTED([WEBSOCK_PACKAGE_STRING], ["$PACKAGE_STRING"], [libwebsock package string]) + AC_DEFINE_UNQUOTED([WEBSOCK_PACKAGE_NAME], ["$PACKAGE_NAME"], [libwebsock package name]) +-- +2.1.0 + diff --git a/package/libwebsock/0002-fix-ssl.patch b/package/libwebsock/0002-fix-ssl.patch new file mode 100644 index 0000000000..51b9b36825 --- /dev/null +++ b/package/libwebsock/0002-fix-ssl.patch @@ -0,0 +1,26 @@ +config: fix SSL detection + +The @WEBSOCK_HAVE_SSL@ is not replaced at configure time, and even if +it was, it would be replaced by an empty string if openssl is disabled, +thus still defining WEBSOCK_HAVE_SSL when we would not want it. + +Instead, rely on config.h, which is properly generated by ./configure, +to provide the information about whether openssl is enabled or not. + +Signed-off-by: "Yann E. MORIN" + +diff -durN a/src/websock_config.h.in b/src/websock_config.h.in +--- a/src/websock_config.h.in ++++ b/src/websock_config.h.in +@@ -1,9 +1,10 @@ + #ifndef WEBSOCK_CONFIG_H + #define WEBSOCK_CONFIG_H 1 + ++#include "config.h" ++ + #define WEBSOCK_PACKAGE_STRING @WEBSOCK_PACKAGE_STRING@ + #define WEBSOCK_PACKAGE_VERSION @WEBSOCK_PACKAGE_VERSION@ + #define WEBSOCK_PACKAGE_NAME @WEBSOCK_PACKAGE_NAME@ +-#define WEBSOCK_HAVE_SSL @WEBSOCK_HAVE_SSL@ + + #endif diff --git a/package/libwebsock/0003-fix-incorrect-inline.patch b/package/libwebsock/0003-fix-incorrect-inline.patch new file mode 100644 index 0000000000..043df45bd3 --- /dev/null +++ b/package/libwebsock/0003-fix-incorrect-inline.patch @@ -0,0 +1,66 @@ +utf: do not define decode() to be inline + +Currently, decode() is prototyped in utf.h, its body is in utf.c and it +is called from util.c. + +However, decode() is defined to be inline, which can not work since, +when compiling util.c, the body of decode() is out-of-scope for that +compilation unit. + +Furthermore, decode() uses a utf8d, which is a static defined in utf.c . +So utf8d is not visible when compiling util.c either. + +This means that the definition of decode() along with utf8d is basically +wrong, and is now failing with gcc-5.x, with warnings like so: + + libtool: compile: /home/ymorin/dev/buildroot/O/host/usr/bin/arm-linux-gcc -DHAVE_CONFIG_H -I. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wmissing-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c utf.c -fPIC -DPIC -o .libs/libwebsock_la-utf.o + utf.c:36:12: warning: ‘utf8d’ is static but used in inline function ‘decode’ which is not static + *state = utf8d[256 + *state*16 + type]; + ^ + utf.c:30:19: warning: ‘utf8d’ is static but used in inline function ‘decode’ which is not static + uint32_t type = utf8d[byte]; + ^ + libtool: compile: /home/ymorin/dev/buildroot/O/host/usr/bin/arm-linux-gcc -DHAVE_CONFIG_H -I. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wmissing-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -c util.c -fPIC -DPIC -o .libs/libwebsock_la-util.o + In file included from websock.h:73:0, + from util.c:20: + utf.h:25:17: warning: inline function ‘decode’ declared but never defined + uint32_t inline decode(uint32_t *state, uint32_t *codep, uint32_t byte); + ^ + +This results in decode() to be omitted from libwebsock.so, and thus link +failures when another program wants to link with -lwebsock. + +The simplest solution is to not inline decode() at all. + +Signed-off-by: "Yann E. MORIN" + +--- +Note: an alternative would be to move both decode() and utf8d into +decode.h nad ditch decode.c if decode really must be inline. This is +left as an execise for an interested party. But since upstream hasn't +seen a single commit in more than a year now... :-( + +diff -durN a/src/utf.c b/src/utf.c +--- a/src/utf.c 2014-07-15 01:43:20.000000000 +0200 ++++ b/src/utf.c 2015-08-22 22:29:38.667393786 +0200 +@@ -24,7 +24,7 @@ + 1,3,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // s7..s8 + }; + +-uint32_t inline ++uint32_t + decode(uint32_t* state, uint32_t* codep, uint32_t byte) + { + uint32_t type = utf8d[byte]; +diff -durN a/src/utf.h b/src/utf.h +--- a/src/utf.h 2014-07-15 01:43:20.000000000 +0200 ++++ b/src/utf.h 2015-08-22 22:29:10.439227396 +0200 +@@ -22,7 +22,7 @@ + + #include + +-uint32_t inline decode(uint32_t *state, uint32_t *codep, uint32_t byte); ++uint32_t decode(uint32_t *state, uint32_t *codep, uint32_t byte); + + + #endif /* UTF_H_ */ diff --git a/package/libwebsock/Config.in b/package/libwebsock/Config.in new file mode 100644 index 0000000000..9ef21362a1 --- /dev/null +++ b/package/libwebsock/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_LIBWEBSOCK + bool "libwebsock" + select BR2_PACKAGE_LIBEVENT + depends on BR2_TOOLCHAIN_HAS_THREADS + help + C library for easy WebSockets servers. + + This library allows a developer to quickly develop WebSocket + servers by focusing on the actual logic of your WebSocket + implementation instead of the details of the WebSocket + protocol or even specifics of C sockets. + + https://github.com/payden/libwebsock + +comment "libwebsock needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libwebsock/libwebsock.mk b/package/libwebsock/libwebsock.mk new file mode 100644 index 0000000000..b52293b21e --- /dev/null +++ b/package/libwebsock/libwebsock.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# libwebsock +# +################################################################################ + +LIBWEBSOCK_VERSION = 3c1615eeadb0b582b63851073bfe3e5132f31ebc +LIBWEBSOCK_SITE = $(call github,payden,libwebsock,$(LIBWEBSOCK_VERSION)) +LIBWEBSOCK_DEPENDENCIES = libevent host-pkgconf +LIBWEBSOCK_AUTORECONF = YES +LIBWEBSOCK_INSTALL_STAGING = YES +LIBWEBSOCK_LICENSE = LGPLv3 +LIBWEBSOCK_LICENSE_FILES = COPYING.lesser + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBWEBSOCK_DEPENDENCIES += openssl +LIBWEBSOCK_CONF_OPTS += --with-ssl +else +LIBWEBSOCK_CONF_OPTS += --without-ssl +endif + +$(eval $(autotools-package)) diff --git a/package/libwebsockets/Config.in b/package/libwebsockets/Config.in new file mode 100644 index 0000000000..2b350bf389 --- /dev/null +++ b/package/libwebsockets/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LIBWEBSOCKETS + bool "libwebsockets" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_ZLIB + help + Libwebsockets is a lightweight pure C library built to use + minimal CPU and memory resources, and provide fast throughput + in both directions. + + http://libwebsockets.org/ diff --git a/package/libwebsockets/libwebsockets.hash b/package/libwebsockets/libwebsockets.hash new file mode 100644 index 0000000000..c931a0db71 --- /dev/null +++ b/package/libwebsockets/libwebsockets.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e91f59fb6238462b4ffdfef2482239558b8a02198c9c6076eb3f86eb1c4e935d libwebsockets-v1.7.5.tar.gz diff --git a/package/libwebsockets/libwebsockets.mk b/package/libwebsockets/libwebsockets.mk new file mode 100644 index 0000000000..5bb7ae44a2 --- /dev/null +++ b/package/libwebsockets/libwebsockets.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# libwebsockets +# +################################################################################ + +LIBWEBSOCKETS_VERSION = v1.7.5 +LIBWEBSOCKETS_SITE = $(call github,warmcat,libwebsockets,$(LIBWEBSOCKETS_VERSION)) +LIBWEBSOCKETS_LICENSE = LGPLv2.1 with exceptions +LIBWEBSOCKETS_LICENSE_FILES = LICENSE +LIBWEBSOCKETS_DEPENDENCIES = zlib +LIBWEBSOCKETS_INSTALL_STAGING = YES +LIBWEBSOCKETS_CONF_OPTS = -DLWS_WITHOUT_TESTAPPS=ON -DLWS_IPV6=ON + +# If LWS_MAX_SMP=1, then there is no code related to pthreads compiled +# in the library. If unset, LWS_MAX_SMP defaults to 32 and a small +# amount of pthread mutex code is built into the library. +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +LIBWEBSOCKETS_CONF_OPTS += -DLWS_MAX_SMP=1 +else +LIBWEBSOCKETS_CONF_OPTS += -DLWS_MAX_SMP= +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LIBWEBSOCKETS_DEPENDENCIES += openssl host-openssl +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SSL=ON +else +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SSL=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBEV),y) +LIBWEBSOCKETS_DEPENDENCIES += libev +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEV=ON +else +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBEV=OFF +endif + +ifeq ($(BR2_PACKAGE_LIBUV),y) +LIBWEBSOCKETS_DEPENDENCIES += libuv +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBUV=ON +else +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_LIBUV=OFF +endif + +ifeq ($(BR2_STATIC_LIBS),y) +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_SHARED=OFF +endif + +ifeq ($(BR2_SHARED_LIBS),y) +LIBWEBSOCKETS_CONF_OPTS += -DLWS_WITH_STATIC=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/libxkbcommon/Config.in b/package/libxkbcommon/Config.in new file mode 100644 index 0000000000..4da12897f2 --- /dev/null +++ b/package/libxkbcommon/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LIBXKBCOMMON + bool "libxkbcommon" + select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7 + help + xkbcommon is a keymap compiler and support library which + processes a reduced subset of keymaps as defined by the XKB + specification. + + http://xkbcommon.org/ diff --git a/package/libxkbcommon/libxkbcommon.hash b/package/libxkbcommon/libxkbcommon.hash new file mode 100644 index 0000000000..693630a776 --- /dev/null +++ b/package/libxkbcommon/libxkbcommon.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/wayland-devel/2016-April/027962.html +sha256 5b0887b080b42169096a61106661f8d35bae783f8b6c58f97ebcd3af83ea8760 libxkbcommon-0.6.1.tar.xz diff --git a/package/libxkbcommon/libxkbcommon.mk b/package/libxkbcommon/libxkbcommon.mk new file mode 100644 index 0000000000..1f80348069 --- /dev/null +++ b/package/libxkbcommon/libxkbcommon.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# libxkbcommon +# +################################################################################ + +LIBXKBCOMMON_VERSION = 0.6.1 +LIBXKBCOMMON_SITE = http://xkbcommon.org/download +LIBXKBCOMMON_SOURCE = libxkbcommon-$(LIBXKBCOMMON_VERSION).tar.xz +LIBXKBCOMMON_LICENSE = MIT/X11 +LIBXKBCOMMON_LICENSE_FILES = LICENSE +LIBXKBCOMMON_INSTALL_STAGING = YES +LIBXKBCOMMON_DEPENDENCIES = host-bison host-flex +# uses C99 features +LIBXKBCOMMON_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99" + +ifeq ($(BR2_PACKAGE_XORG7),y) +LIBXKBCOMMON_CONF_OPTS += --enable-x11 +LIBXKBCOMMON_DEPENDENCIES += libxcb +else +LIBXKBCOMMON_CONF_OPTS += --disable-x11 +endif + +$(eval $(autotools-package)) diff --git a/package/libxml-parser-perl/libxml-parser-perl.hash b/package/libxml-parser-perl/libxml-parser-perl.hash new file mode 100644 index 0000000000..4a8c0d305d --- /dev/null +++ b/package/libxml-parser-perl/libxml-parser-perl.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 b48197cd2265a26c5f016489f11a7b450d8833cb8b3d6a46ee15975740894de9 XML-Parser-2.41.tar.gz diff --git a/package/libxml-parser-perl/libxml-parser-perl.mk b/package/libxml-parser-perl/libxml-parser-perl.mk new file mode 100644 index 0000000000..5c2ac546b4 --- /dev/null +++ b/package/libxml-parser-perl/libxml-parser-perl.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# libxml-parser-perl +# +################################################################################ + +LIBXML_PARSER_PERL_VERSION = 2.41 +LIBXML_PARSER_PERL_SOURCE = XML-Parser-$(LIBXML_PARSER_PERL_VERSION).tar.gz +LIBXML_PARSER_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/T/TO/TODDR +LIBXML_PARSER_PERL_DEPENDENCIES = expat +LIBXML_PARSER_PERL_LICENSE = Artistic or GPLv1+ +LIBXML_PARSER_PERL_RUN_PERL = `which perl` + +define HOST_LIBXML_PARSER_PERL_CONFIGURE_CMDS + (cd $(@D) ; \ + $(HOST_CONFIGURE_OPTS) $(LIBXML_PARSER_PERL_RUN_PERL) Makefile.PL \ + PREFIX=$(HOST_DIR)/usr \ + EXPATLIBPATH=$(HOST_DIR)/usr/lib \ + EXPATINCPATH=$(HOST_DIR)/usr/include \ + INSTALLDIRS=site \ + INSTALLSITELIB=$(HOST_DIR)/usr/lib/perl \ + INSTALLSITEARCH=$(HOST_DIR)/usr/lib/perl \ + ) +endef + +define HOST_LIBXML_PARSER_PERL_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define HOST_LIBXML_PARSER_PERL_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +$(eval $(host-generic-package)) diff --git a/package/libxml2/Config.in b/package/libxml2/Config.in new file mode 100644 index 0000000000..ebd63fe54c --- /dev/null +++ b/package/libxml2/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBXML2 + bool "libxml2" + help + XML C Parser + + http://xmlsoft.org/ diff --git a/package/libxml2/libxml2.hash b/package/libxml2/libxml2.hash new file mode 100644 index 0000000000..098121e117 --- /dev/null +++ b/package/libxml2/libxml2.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 ffb911191e509b966deb55de705387f14156e1a56b21824357cdf0053233633c libxml2-2.9.4.tar.gz diff --git a/package/libxml2/libxml2.mk b/package/libxml2/libxml2.mk new file mode 100644 index 0000000000..ed6f9af49b --- /dev/null +++ b/package/libxml2/libxml2.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# libxml2 +# +################################################################################ + +LIBXML2_VERSION = 2.9.4 +LIBXML2_SITE = ftp://xmlsoft.org/libxml2 +LIBXML2_INSTALL_STAGING = YES +LIBXML2_LICENSE = MIT +LIBXML2_LICENSE_FILES = COPYING +LIBXML2_CONFIG_SCRIPTS = xml2-config + +LIBXML2_CONF_OPTS = --with-gnu-ld --without-python --without-debug + +HOST_LIBXML2_DEPENDENCIES = host-pkgconf +LIBXML2_DEPENDENCIES = host-pkgconf + +HOST_LIBXML2_CONF_OPTS = --without-zlib --without-lzma --without-python + +ifeq ($(BR2_PACKAGE_ZLIB),y) +LIBXML2_DEPENDENCIES += zlib +LIBXML2_CONF_OPTS += --with-zlib=$(STAGING_DIR)/usr +else +LIBXML2_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +LIBXML2_DEPENDENCIES += xz +LIBXML2_CONF_OPTS += --with-lzma +else +LIBXML2_CONF_OPTS += --without-lzma +endif + +LIBXML2_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +ifeq ($(BR2_ENABLE_LOCALE)$(BR2_PACKAGE_LIBICONV),y) +LIBXML2_CONF_OPTS += --with-iconv +else +LIBXML2_CONF_OPTS += --without-iconv +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +# libxml2 for the host +LIBXML2_HOST_BINARY = $(HOST_DIR)/usr/bin/xmllint diff --git a/package/libxmlpp/Config.in b/package/libxmlpp/Config.in new file mode 100644 index 0000000000..0f2da98f24 --- /dev/null +++ b/package/libxmlpp/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBXMLPP + bool "libxml++" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_GLIBMM + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # glibmm -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glibmm -> libglib2 + depends on BR2_USE_MMU # glibmm -> libglib2 + help + libxml++ is a C++ wrapper for the libxml XML parser library. + + http://libxmlplusplus.sourceforge.net/ + +comment "libxml++ needs a toolchain w/ C++, wchar, threads, gcc >= 4.8" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR \ + ||!BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU diff --git a/package/libxmlpp/libxmlpp.hash b/package/libxmlpp/libxmlpp.hash new file mode 100644 index 0000000000..5fc7f5beb4 --- /dev/null +++ b/package/libxmlpp/libxmlpp.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/libxml++/2.40/libxml++-2.40.1.sha256sum +sha256 4ad4abdd3258874f61c2e2a41d08e9930677976d303653cd1670d3e9f35463e9 libxml++-2.40.1.tar.xz diff --git a/package/libxmlpp/libxmlpp.mk b/package/libxmlpp/libxmlpp.mk new file mode 100644 index 0000000000..d42819928a --- /dev/null +++ b/package/libxmlpp/libxmlpp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# libxmlpp +# +################################################################################ + +LIBXMLPP_VERSION_MAJOR = 2.40 +LIBXMLPP_VERSION = $(LIBXMLPP_VERSION_MAJOR).1 +LIBXMLPP_LICENSE = LGPLv2.1 (library), LGPLv2+ (examples) +LIBXMLPP_LICENSE_FILES = COPYING +LIBXMLPP_SOURCE = libxml++-$(LIBXMLPP_VERSION).tar.xz +LIBXMLPP_SITE = http://ftp.gnome.org/pub/GNOME/sources/libxml++/$(LIBXMLPP_VERSION_MAJOR) +LIBXMLPP_INSTALL_STAGING = YES +LIBXMLPP_DEPENDENCIES = libxml2 glibmm host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/libxmlrpc/0001-fix-gennmtab-build.patch b/package/libxmlrpc/0001-fix-gennmtab-build.patch new file mode 100644 index 0000000000..8cdd9329f5 --- /dev/null +++ b/package/libxmlrpc/0001-fix-gennmtab-build.patch @@ -0,0 +1,25 @@ +Fix build of host tool + +genmtab is a tool that needs to be built for the host as it is used +during the compilation process of libxmlrpc. Its Makefile needs a bit +of tuning to use the conventional CC_FOR_BUILD, CFLAGS_FOR_BUILD and +LDFLAGS_FOR_BUILD variables. + +Signed-off-by: Thomas Petazzoni + +Index: b/lib/expat/gennmtab/Makefile +=================================================================== +--- a/lib/expat/gennmtab/Makefile ++++ b/lib/expat/gennmtab/Makefile +@@ -40,9 +40,9 @@ + dep: dep-common + + gennmtab.o:%.o:%.c +- $(BUILDTOOL_CC) -c $< -o $@ $(CFLAGS_ALL) $(INCLUDES) ++ $(CC_FOR_BUILD) -c $< -o $@ $(CFLAGS_FOR_BUILD) $(INCLUDES) + + gennmtab:%:%.o +- $(BUILDTOOL_CCLD) -o $@ $(LDFLAGS) $^ ++ $(CC_FOR_BUILD) -o $@ $(LDFLAGS_FOR_BUILD) $^ + + include depend.mk diff --git a/package/libxmlrpc/0002-fix-non-cplusplus-build.patch b/package/libxmlrpc/0002-fix-non-cplusplus-build.patch new file mode 100644 index 0000000000..efeb9cc83f --- /dev/null +++ b/package/libxmlrpc/0002-fix-non-cplusplus-build.patch @@ -0,0 +1,27 @@ +Handle builds without C++ + +libxmlrpc nicely handles the fact of being built without C++ support, +except for one location, fixed by this patch. + +Signed-off-by: Thomas Petazzoni + +Index: b/lib/util/Makefile +=================================================================== +--- a/lib/util/Makefile ++++ b/lib/util/Makefile +@@ -41,11 +41,14 @@ + LIBOBJS = \ + casprintf.o \ + cmdline_parser.o \ +- cmdline_parser_cpp.o \ + getoptx.o \ + string_parser.o \ + stripcaseeq.o \ + ++ifeq ($(ENABLE_CPLUSPLUS),yes) ++LIBOBJS += cmdline_parser_cpp.o ++endif ++ + .PHONY: all + all: $(LIBOBJS) + diff --git a/package/libxmlrpc/0003-non-wchar-build.patch b/package/libxmlrpc/0003-non-wchar-build.patch new file mode 100644 index 0000000000..1f04353061 --- /dev/null +++ b/package/libxmlrpc/0003-non-wchar-build.patch @@ -0,0 +1,24 @@ +Disable wide-char specific code + +The vast majority of the libxmlrpc code nicely handles the absence of +wide char support, except at one location, which is fixed by this +patch. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/xmlrpc_decompose.c +=================================================================== +--- a/src/xmlrpc_decompose.c ++++ b/src/xmlrpc_decompose.c +@@ -217,7 +217,11 @@ + xmlrpc_strfree(*decompRootP->store.Tstring.valueP); + break; + case 'w': ++#if HAVE_UNICODE_WCHAR + free((void*)*decompRootP->store.TwideString.valueP); ++#else ++ XMLRPC_ASSERT(false); ++#endif + break; + case '6': + free((void*)*decompRootP->store.TbitString.valueP); diff --git a/package/libxmlrpc/0004-use-correct-curl-config.patch b/package/libxmlrpc/0004-use-correct-curl-config.patch new file mode 100644 index 0000000000..b5816432d8 --- /dev/null +++ b/package/libxmlrpc/0004-use-correct-curl-config.patch @@ -0,0 +1,96 @@ +Use correct curl-config program + +Instead of calling directly curl-config in src/Makefile (which ends up +calling the wrong curl-config: the one in the PATH instead of the one +pointed at by the environment variables at configure time), let's +define a CURL_CONFIG variable that contains the path to the proper +curl-config program, and use it where appropriate. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -56,7 +56,7 @@ + TRANSPORT_MODS += blddir/lib/curl_transport/curltransaction + TRANSPORT_MODS += blddir/lib/curl_transport/curlmulti + TRANSPORT_MODS += blddir/lib/curl_transport/lock_pthread +- TRANSPORT_LIBDEP += $(shell curl-config --libs) ++ TRANSPORT_LIBDEP += $(shell $CURL_CONFIG --libs) + endif + ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes) + TRANSPORT_MODS += blddir/lib/libwww_transport/xmlrpc_libwww_transport +Index: b/config.mk.in +=================================================================== +--- a/config.mk.in ++++ b/config.mk.in +@@ -32,6 +32,7 @@ + LSOCKET = @LSOCKET@ + WININET_LDADD = @WININET_LDADD@ + WININET_LIBDIR = @WININET_LIBDIR@ ++CURL_CONFIG = @CURL_CONFIG@ + CURL_LDADD = @CURL_LDADD@ + CURL_LIBDIR = @CURL_LIBDIR@ + LIBWWW_LDADD = @LIBWWW_LDADD@ +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -550,6 +550,8 @@ + dnl So we don't do any check now. If we find out there's a problem with + dnl older Curls, we will revisit that. + ++ AC_SUBST(CURL_CONFIG) ++ + CURL_LDADD=$($CURL_CONFIG --libs) + AC_SUBST(CURL_LDADD) + +Index: b/lib/curl_transport/Makefile +=================================================================== +--- a/lib/curl_transport/Makefile ++++ b/lib/curl_transport/Makefile +@@ -29,7 +29,7 @@ + + $(SRCDIR)/common.mk: srcdir blddir + +-CURL_VERSION := $(shell curl-config --vernum) ++CURL_VERSION := $(shell $(CURL_CONFIG) --vernum) + + # Some time at or before Curl 7.12, became an empty file + # (no-op). Some time after Curl 7.18, ceased to exist. +@@ -43,7 +43,7 @@ + CFLAGS_LOCAL += -DNEED_CURL_TYPES_H + endif + +-CURL_INCLUDES := $(shell curl-config --cflags) ++CURL_INCLUDES := $(shell $(CURL_CONFIG) --cflags) + # We expect that curl-config --cflags just gives us -I options, because + # we need just the -I options for 'make dep'. Plus, it's scary to think + # of what any other compiler flag would do to our compile. +Index: b/src/cpp/test/Makefile +=================================================================== +--- a/src/cpp/test/Makefile ++++ b/src/cpp/test/Makefile +@@ -20,7 +20,7 @@ + LIBS := $(shell $(XMLRPC_C_CONFIG) client --ldadd) + + ifeq ($(MUST_BUILD_CURL_CLIENT),yes) +- LIBS += $(shell curl-config --libs) ++ LIBS += $(shell $(CURL_CONFIG) --libs) + endif + ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes) + LIBS += $(shell libwww-config --libs) +Index: b/tools/common.mk +=================================================================== +--- a/tools/common.mk ++++ b/tools/common.mk +@@ -15,7 +15,7 @@ + CLIENT_LDLIBS += $(shell libwww-config --libs) + endif + ifeq ($(MUST_BUILD_CURL_CLIENT),yes) +- CLIENT_LDLIBS += $(shell curl-config --libs) ++ CLIENT_LDLIBS += $(shell $(CURL_CONFIG) --libs) + endif + ifeq ($(MUST_BUILD_WININET_CLIENT),yes) + CLIENT_LDLIBS += $(shell wininet-config --libs) diff --git a/package/libxmlrpc/0005-config.mk.in-fix-shared-libraries-build-for-uClibc.patch b/package/libxmlrpc/0005-config.mk.in-fix-shared-libraries-build-for-uClibc.patch new file mode 100644 index 0000000000..5970df51a9 --- /dev/null +++ b/package/libxmlrpc/0005-config.mk.in-fix-shared-libraries-build-for-uClibc.patch @@ -0,0 +1,27 @@ +From 5d68179a54b0a34d989722dcbe3b6eb962feb27d Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Tue, 23 Dec 2014 16:04:18 +0100 +Subject: [PATCH] config.mk.in: fix shared libraries build for uClibc + +Signed-off-by: Romain Naour +--- + config.mk.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/config.mk.in b/config.mk.in +index c5d4160..45461cf 100644 +--- a/config.mk.in ++++ b/config.mk.in +@@ -166,7 +166,8 @@ shliblefn = $(1:%=%.shlibledummy) + # HOST_OS is usually has a version number suffix, e.g. "aix5.3.0.0", so + # we compare based on prefix. + +-ifeq ($(patsubst linux-gnu%,linux-gnu,$(HOST_OS)),linux-gnu) ++# linux-uclibc is also a linux ++ifeq ($(patsubst linux-%,linux-,$(HOST_OS)),linux-) + # Assume linker is GNU Compiler (gcc) + SHARED_LIB_TYPE = unix + MUST_BUILD_SHLIB = Y +-- +1.9.3 + diff --git a/package/libxmlrpc/Config.in b/package/libxmlrpc/Config.in new file mode 100644 index 0000000000..d24a79163d --- /dev/null +++ b/package/libxmlrpc/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LIBXMLRPC + bool "libxmlrpc" + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBCURL + help + XML-RPC is a quick-and-easy way to make procedure calls over + the Internet. It converts the procedure call into an XML + document, sends it to a remote server using HTTP, and gets + back the response as XML. + + http://xmlrpc-c.sourceforge.net/ + +comment "libxmlrpc needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/libxmlrpc/libxmlrpc.hash b/package/libxmlrpc/libxmlrpc.hash new file mode 100644 index 0000000000..d37fcfc95c --- /dev/null +++ b/package/libxmlrpc/libxmlrpc.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 8ae6ed4ec57d50ed132b1150fc5258346eef3e291501a564f14fa97586902f98 xmlrpc-c-1.25.30.tgz diff --git a/package/libxmlrpc/libxmlrpc.mk b/package/libxmlrpc/libxmlrpc.mk new file mode 100644 index 0000000000..03a709597b --- /dev/null +++ b/package/libxmlrpc/libxmlrpc.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# libxmlrpc +# +################################################################################ + +LIBXMLRPC_VERSION = 1.25.30 +LIBXMLRPC_SOURCE = xmlrpc-c-$(LIBXMLRPC_VERSION).tgz +LIBXMLRPC_SITE = http://downloads.sourceforge.net/project/xmlrpc-c/Xmlrpc-c%20Super%20Stable/$(LIBXMLRPC_VERSION) +LIBXMLRPC_LICENSE = BSD-3c (xml-rpc main code and abyss web server), BSD like (lib/expat), Python 1.5.2 license (parts of xmlrpc_base64.c) +LIBXMLRPC_LICENSE_FILES = doc/COPYING +LIBXMLRPC_INSTALL_STAGING = YES +LIBXMLRPC_DEPENDENCIES = libcurl host-autoconf +LIBXMLRPC_CONFIG_SCRIPTS = xmlrpc-c-config +LIBXMLRPC_MAKE = $(MAKE1) + +# Using autoconf, not automake, so we cannot use AUTORECONF = YES. +define LIBXMLRPC_RUN_AUTOCONF + cd $(@D); $(HOST_DIR)/usr/bin/autoconf +endef + +LIBXMLRPC_PRE_CONFIGURE_HOOKS += LIBXMLRPC_RUN_AUTOCONF + +LIBXMLRPC_CONF_OPTS = \ + $(if $(BR2_USE_WCHAR),,ac_cv_header_wchar_h=no) \ + $(if $(BR2_INSTALL_LIBSTDCPP),,--disable-cplusplus) \ + have_curl_config=$(STAGING_DIR)/usr/bin/curl-config \ + CURL_CONFIG=$(STAGING_DIR)/usr/bin/curl-config + +# Our package uses autoconf, but not automake, so we need to pass +# those variables at compile time as well. +LIBXMLRPC_MAKE_ENV = \ + CC_FOR_BUILD="$(HOSTCC)" \ + LD_FOR_BUILD="$(HOSTLD)" \ + CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \ + LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" + +ifeq ($(BR2_STATIC_LIBS),y) +LIBXMLRPC_STATIC_OPTS = SHARED_LIB_TYPE=NONE MUST_BUILD_SHLIB=N +endif + +LIBXMLRPC_MAKE_OPTS = $(LIBXMLRPC_STATIC_OPTS) +LIBXMLRPC_INSTALL_STAGING_OPTS = $(LIBXMLRPC_STATIC_OPTS) \ + DESTDIR=$(STAGING_DIR) install +LIBXMLRPC_INSTALL_TARGET_OPTS = $(LIBXMLRPC_STATIC_OPTS) \ + DESTDIR=$(TARGET_DIR) install + +$(eval $(autotools-package)) diff --git a/package/libxslt/Config.in b/package/libxslt/Config.in new file mode 100644 index 0000000000..ee2f66c36e --- /dev/null +++ b/package/libxslt/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_LIBXSLT + bool "libxslt" + select BR2_PACKAGE_LIBXML2 + help + Install the xslt library which is used + to transform XML files to other XML files. + + XSLT is designed for use as part of XSL, + which is a stylesheet language for XML. + In addition to XSLT, XSL includes an XML vocabulary + for specifying formatting. + XSL specifies the styling of an XML document by using XSLT + to describe how the document is transformed into another + XML document that uses the formatting vocabulary. + + http://www.w3.org/TR/xslt diff --git a/package/libxslt/libxslt.hash b/package/libxslt/libxslt.hash new file mode 100644 index 0000000000..8222bc590d --- /dev/null +++ b/package/libxslt/libxslt.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 b5976e3857837e7617b29f2249ebb5eeac34e249208d31f1fbf7a6ba7a4090ce libxslt-1.1.29.tar.gz diff --git a/package/libxslt/libxslt.mk b/package/libxslt/libxslt.mk new file mode 100644 index 0000000000..868ba6a10f --- /dev/null +++ b/package/libxslt/libxslt.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# libxslt +# +################################################################################ + +LIBXSLT_VERSION = 1.1.29 +LIBXSLT_SITE = ftp://xmlsoft.org/libxslt +LIBXSLT_INSTALL_STAGING = YES +LIBXSLT_LICENSE = MIT +LIBXSLT_LICENSE_FILES = COPYING + +LIBXSLT_CONF_OPTS = \ + --with-gnu-ld \ + --without-debug \ + --without-python \ + --with-libxml-prefix=$(STAGING_DIR)/usr/ \ + --with-libxml-libs-prefix=$(STAGING_DIR)/usr/lib +LIBXSLT_CONFIG_SCRIPTS = xslt-config +LIBXSLT_DEPENDENCIES = libxml2 + +# If we have enabled libgcrypt then use it, else disable crypto support. +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +LIBXSLT_DEPENDENCIES += libgcrypt +LIBXSLT_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +else +LIBXSLT_CONF_OPTS += --without-crypto +endif + +HOST_LIBXSLT_CONF_OPTS = --without-debug --without-python --without-crypto + +HOST_LIBXSLT_DEPENDENCIES = host-libxml2 + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/libyaml/0001-fix-CVE-2014-9130.patch b/package/libyaml/0001-fix-CVE-2014-9130.patch new file mode 100644 index 0000000000..a267e4084c --- /dev/null +++ b/package/libyaml/0001-fix-CVE-2014-9130.patch @@ -0,0 +1,33 @@ +From e6aa721cc0e5a48f408c52355559fd36780ba32a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= +Date: Fri, 28 Nov 2014 09:21:49 -0800 +Subject: [PATCH] Fix for https://bitbucket.org/xi/libyaml/issue/10/ + +https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure + +Commenting out the assert makes the scanner do the right thing and +results in just a simple parse failure. + +Signed-off-by: Gustavo Zacarias +--- + src/scanner.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/scanner.c b/src/scanner.c +index 88d4fa5..c5f3d2f 100644 +--- a/src/scanner.c ++++ b/src/scanner.c +@@ -1110,7 +1110,9 @@ yaml_parser_save_simple_key(yaml_parser_t *parser) + * line. Therefore it is always allowed. But we add a check anyway. + */ + +- assert(parser->simple_key_allowed || !required); /* Impossible. */ ++ /* XXX This caused: ++ * https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure ++ assert(parser->simple_key_allowed || !required); */ /* Impossible. */ + + /* + * If the current position may start a simple key, save it. +-- +2.0.4 + diff --git a/package/libyaml/Config.in b/package/libyaml/Config.in new file mode 100644 index 0000000000..00a48b2016 --- /dev/null +++ b/package/libyaml/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBYAML + bool "libyaml" + help + LibYAML is a YAML 1.1 parser and emitter written in C. + + http://pyyaml.org/wiki/LibYAML diff --git a/package/libyaml/libyaml.hash b/package/libyaml/libyaml.hash new file mode 100644 index 0000000000..fd039fa6e4 --- /dev/null +++ b/package/libyaml/libyaml.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749 yaml-0.1.6.tar.gz diff --git a/package/libyaml/libyaml.mk b/package/libyaml/libyaml.mk new file mode 100644 index 0000000000..52d475066e --- /dev/null +++ b/package/libyaml/libyaml.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# libyaml +# +################################################################################ + +LIBYAML_VERSION = 0.1.6 +LIBYAML_SOURCE = yaml-$(LIBYAML_VERSION).tar.gz +LIBYAML_SITE = http://pyyaml.org/download/libyaml +LIBYAML_INSTALL_STAGING = YES +LIBYAML_LICENSE = MIT +LIBYAML_LICENSE_FILES = LICENSE + +$(eval $(autotools-package)) diff --git a/package/libyuv/0001-i386-sse2.patch b/package/libyuv/0001-i386-sse2.patch new file mode 100644 index 0000000000..b8ecb34d0f --- /dev/null +++ b/package/libyuv/0001-i386-sse2.patch @@ -0,0 +1,16 @@ +Fix compilation on non-sse2 platforms + +Signed-off-by: Bernd Kuhls + +diff -uNr libyuv-1411.org/include/libyuv/scale_row.h libyuv-1411/include/libyuv/scale_row.h +--- libyuv-1411.org/include/libyuv/scale_row.h 2015-05-22 23:39:21.000000000 +0200 ++++ libyuv-1411/include/libyuv/scale_row.h 2015-05-25 12:35:17.000000000 +0200 +@@ -33,7 +33,7 @@ + + // The following are available on all x86 platforms: + #if !defined(LIBYUV_DISABLE_X86) && \ +- (defined(_M_IX86) || defined(__x86_64__) || defined(__i386__)) ++ (defined(_M_IX86) || defined(__x86_64__) || (defined(__i386__) && defined(__SSE2__))) + #define HAS_FIXEDDIV1_X86 + #define HAS_FIXEDDIV_X86 + #define HAS_SCALEADDROWS_SSE2 diff --git a/package/libyuv/0002-aarch64.patch b/package/libyuv/0002-aarch64.patch new file mode 100644 index 0000000000..c783cffe88 --- /dev/null +++ b/package/libyuv/0002-aarch64.patch @@ -0,0 +1,36 @@ +Add missing source files for aarch64. + +Signed-off-by: Bernd Kuhls + +diff -uNr libyuv-1ebf86795cb213a37f06eb1ef3713cff080568ea.org/CMakeLists.txt libyuv-1ebf86795cb213a37f06eb1ef3713cff080568ea/CMakeLists.txt +--- libyuv-1ebf86795cb213a37f06eb1ef3713cff080568ea.org/CMakeLists.txt 2015-06-20 00:04:06.000000000 +0200 ++++ libyuv-1ebf86795cb213a37f06eb1ef3713cff080568ea/CMakeLists.txt 2015-09-07 19:29:42.898034988 +0200 +@@ -14,6 +14,7 @@ + ${ly_src_dir}/compare.cc + ${ly_src_dir}/compare_common.cc + ${ly_src_dir}/compare_neon.cc ++ ${ly_src_dir}/compare_neon64.cc + ${ly_src_dir}/compare_gcc.cc + ${ly_src_dir}/compare_win.cc + ${ly_src_dir}/convert.cc +@@ -31,10 +32,12 @@ + ${ly_src_dir}/rotate_argb.cc + ${ly_src_dir}/rotate_mips.cc + ${ly_src_dir}/rotate_neon.cc ++ ${ly_src_dir}/rotate_neon64.cc + ${ly_src_dir}/row_any.cc + ${ly_src_dir}/row_common.cc + ${ly_src_dir}/row_mips.cc + ${ly_src_dir}/row_neon.cc ++ ${ly_src_dir}/row_neon64.cc + ${ly_src_dir}/row_gcc.cc + ${ly_src_dir}/row_win.cc + ${ly_src_dir}/scale.cc +@@ -43,6 +46,7 @@ + ${ly_src_dir}/scale_common.cc + ${ly_src_dir}/scale_mips.cc + ${ly_src_dir}/scale_neon.cc ++ ${ly_src_dir}/scale_neon64.cc + ${ly_src_dir}/scale_gcc.cc + ${ly_src_dir}/scale_win.cc + ${ly_src_dir}/video_common.cc diff --git a/package/libyuv/Config.in b/package/libyuv/Config.in new file mode 100644 index 0000000000..29dcaa44ed --- /dev/null +++ b/package/libyuv/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBYUV + bool "libyuv" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + help + libyuv is an open source project that includes YUV scaling + and conversion functionality. + + https://code.google.com/p/libyuv + +comment "libyuv needs a toolchain w/ C++, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS diff --git a/package/libyuv/libyuv.mk b/package/libyuv/libyuv.mk new file mode 100644 index 0000000000..c00bc05c0a --- /dev/null +++ b/package/libyuv/libyuv.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# libyuv +# +################################################################################ + +LIBYUV_VERSION = 1ebf86795cb213a37f06eb1ef3713cff080568ea +# we use the FreeSwitch fork because there is currently no alternative +# for https://chromium.googlesource.com/libyuv/libyuv which will be +# deactivated in 2015. +LIBYUV_SITE = https://freeswitch.org/stash/scm/sd/libyuv.git +LIBYUV_SITE_METHOD = git +LIBYUV_LICENSE = BSD-3c +LIBYUV_LICENSE_FILES = LICENSE +LIBYUV_INSTALL_STAGING = YES +LIBYUV_DEPENDENCIES = $(if $(BR2_PACKAGE_JPEG),jpeg) + +$(eval $(cmake-package)) diff --git a/package/libzip/Config.in b/package/libzip/Config.in new file mode 100644 index 0000000000..54de9e5af2 --- /dev/null +++ b/package/libzip/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LIBZIP + bool "libzip" + select BR2_PACKAGE_ZLIB + help + C library for reading, creating, and modifying zip archives. This + package also contains zipcmp, ziptorrent and zipmerge utilities. + + http://www.nih.at/libzip/ diff --git a/package/libzip/libzip.hash b/package/libzip/libzip.hash new file mode 100644 index 0000000000..ccd0e6adf9 --- /dev/null +++ b/package/libzip/libzip.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7cfbbc2c540e154b933b6e9ec781e2671086bd8114eb744ae1a1ade34d2bb6bb libzip-0.11.2.tar.xz diff --git a/package/libzip/libzip.mk b/package/libzip/libzip.mk new file mode 100644 index 0000000000..a419db7ec5 --- /dev/null +++ b/package/libzip/libzip.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# libzip +# +################################################################################ + +LIBZIP_VERSION = 0.11.2 +LIBZIP_SITE = http://www.nih.at/libzip +LIBZIP_SOURCE = libzip-$(LIBZIP_VERSION).tar.xz +LIBZIP_LICENSE = BSD-3c +LIBZIP_LICENSE_FILES = LICENSE +LIBZIP_INSTALL_STAGING = YES +LIBZIP_DEPENDENCIES = zlib + +$(eval $(autotools-package)) diff --git a/package/lightning/Config.in b/package/lightning/Config.in new file mode 100644 index 0000000000..6750114be2 --- /dev/null +++ b/package/lightning/Config.in @@ -0,0 +1,32 @@ +comment "lightning needs a toolchain w/ dynamic library" + depends on BR2_sparc || BR2_i386 || BR2_x86_64 || BR2_mips || \ + BR2_mipsel || BR2_arm || BR2_powerpc + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_LIGHTNING + bool "lightning" + depends on BR2_sparc || BR2_i386 || BR2_x86_64 || BR2_mips || \ + BR2_mipsel || BR2_arm || BR2_powerpc + depends on !BR2_STATIC_LIBS + help + GNU lightning is a library that generates + assembly language code at run-time. + + https://www.gnu.org/software/lightning/ + +if BR2_PACKAGE_LIGHTNING + +config BR2_PACKAGE_LIGHTNING_DISASSEMBLER + bool "enable disassembler" + select BR2_PACKAGE_BINUTILS + select BR2_PACKAGE_ZLIB + depends on !BR2_aarch64 && !BR2_nios2 # binutils + depends on BR2_USE_WCHAR # binutils + help + Enable the GNU lightning disassembler. + +comment "lightning disassembler needs a toolchain w/ wchar" + depends on !BR2_aarch64 && !BR2_nios2 + depends on !BR2_USE_WCHAR + +endif diff --git a/package/lightning/lightning.hash b/package/lightning/lightning.hash new file mode 100644 index 0000000000..4805686e98 --- /dev/null +++ b/package/lightning/lightning.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 1fa3a2421852598b3162d6765645bb3cd0fccb5f0c105d0800c64c8428b749a6 lightning-2.1.0.tar.gz diff --git a/package/lightning/lightning.mk b/package/lightning/lightning.mk new file mode 100644 index 0000000000..b74147a62d --- /dev/null +++ b/package/lightning/lightning.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# lightning +# +################################################################################ + +LIGHTNING_VERSION = 2.1.0 +LIGHTNING_SITE = http://ftp.gnu.org/gnu/lightning +LIGHTNING_LICENSE = LGPLv3+ +LIGHTNING_LICENSE_FILES = COPYING.LESSER +LIGHTNING_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_LIGHTNING_DISASSEMBLER),y) +LIGHTNING_DEPENDENCIES += binutils zlib +LIGHTNING_CONF_OPTS += --enable-disassembler +# binutils libraries are not explicitly linked against gettext +LIGHTNING_CONF_ENV += $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),LIBS=-lintl) +endif + +$(eval $(autotools-package)) diff --git a/package/lighttpd/0001-Fix-default-config-file.patch b/package/lighttpd/0001-Fix-default-config-file.patch new file mode 100644 index 0000000000..ada1589760 --- /dev/null +++ b/package/lighttpd/0001-Fix-default-config-file.patch @@ -0,0 +1,100 @@ +Modify the default lighttpd configuration file to have one a starting conf + + * Changed the log path to /var/log and logs filenames + * Disable IPv6 + * Do not setuid to a user that doesn't exist on the system + * Disable pdf ranges fix for Adobe Reader since it uses regex and we + don't always have pcre support + * Change the network backend to writev since linux-sendfile fails on buildroot + +Signed-off-by: Maxime Ripard +Signed-off-by: Simon Dawson +[Gustavo: update for 1.4.37] +Signed-off-by: Gustavo Zacarias + +diff -Nura lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf lighttpd-1.4.37/doc/config/conf.d/access_log.conf +--- lighttpd-1.4.37.orig/doc/config/conf.d/access_log.conf 2015-09-01 14:38:48.684673663 -0300 ++++ lighttpd-1.4.37/doc/config/conf.d/access_log.conf 2015-09-01 14:38:53.975855142 -0300 +@@ -9,7 +9,7 @@ + ## + ## Default access log. + ## +-accesslog.filename = log_root + "/access.log" ++accesslog.filename = log_root + "/lighttpd-access.log" + + ## + ## The default format produces CLF compatible output. +diff -Nura lighttpd-1.4.37.orig/doc/config/lighttpd.conf lighttpd-1.4.37/doc/config/lighttpd.conf +--- lighttpd-1.4.37.orig/doc/config/lighttpd.conf 2015-09-01 14:38:48.684673663 -0300 ++++ lighttpd-1.4.37/doc/config/lighttpd.conf 2015-09-01 14:39:40.256442492 -0300 +@@ -13,8 +13,8 @@ + ## if you add a variable here. Add the corresponding variable in the + ## chroot example aswell. + ## +-var.log_root = "/var/log/lighttpd" +-var.server_root = "/srv/www" ++var.log_root = "/var/log" ++var.server_root = "/var/www" + var.state_dir = "/var/run" + var.home_dir = "/var/lib/lighttpd" + var.conf_dir = "/etc/lighttpd" +@@ -90,7 +90,7 @@ + ## + ## Use IPv6? + ## +-server.use-ipv6 = "enable" ++# server.use-ipv6 = "enable" + + ## + ## bind to a specific IP +@@ -101,8 +101,8 @@ + ## Run as a different username/groupname. + ## This requires root permissions during startup. + ## +-server.username = "lighttpd" +-server.groupname = "lighttpd" ++server.username = "www-data" ++server.groupname = "www-data" + + ## + ## enable core files. +@@ -112,7 +112,7 @@ + ## + ## Document root + ## +-server.document-root = server_root + "/htdocs" ++server.document-root = server_root + + ## + ## The value for the "Server:" response field. +@@ -138,7 +138,7 @@ + ## + ## Path to the error log file + ## +-server.errorlog = log_root + "/error.log" ++server.errorlog = log_root + "/lighttpd-error.log" + + ## + ## If you want to log to syslog you have to unset the +@@ -188,7 +188,7 @@ + ## sendfile - is recommended for small files. + ## writev - is recommended for sending many large files + ## +-server.network-backend = "sendfile" ++server.network-backend = "writev" + + ## + ## As lighttpd is a single-threaded server, its main resource limit is +@@ -311,9 +311,9 @@ + ## disable range requests for pdf files + ## workaround for a bug in the Acrobat Reader plugin. + ## +-$HTTP["url"] =~ "\.pdf$" { +- server.range-requests = "disable" +-} ++# $HTTP["url"] =~ "\.pdf$" { ++# server.range-requests = "disable" ++# } + + ## + ## url handling modules (rewrite, redirect) diff --git a/package/lighttpd/0002-compat-latest-lua.patch b/package/lighttpd/0002-compat-latest-lua.patch new file mode 100644 index 0000000000..ddbbfc2d87 --- /dev/null +++ b/package/lighttpd/0002-compat-latest-lua.patch @@ -0,0 +1,1398 @@ +add handling for lua 5.2 and 5.3 + +Fetch from: https://redmine.lighttpd.net/projects/lighttpd/repository/revisions/3070 + +Signed-off-by: Francois Perrad + +Index: lighttpd-1.4.37/src/mod_magnet_cache.c +=================================================================== +--- lighttpd-1.4.37/src/mod_magnet_cache.c (revision 3069) ++++ lighttpd-1.4.37/src/mod_magnet_cache.c (revision 3070) +@@ -68,6 +68,7 @@ + /* oops, the script failed last time */ + + if (lua_gettop(sc->L) == 0) break; ++ force_assert(lua_gettop(sc->L) == 1); + + if (HANDLER_ERROR == stat_cache_get_entry(srv, con, sc->name, &sce)) { + lua_pop(sc->L, 1); /* pop the old function */ +@@ -81,7 +82,6 @@ + } + + force_assert(lua_isfunction(sc->L, -1)); +- lua_pushvalue(sc->L, -1); /* copy the function-reference */ + + return sc->L; + } +@@ -114,7 +114,6 @@ + + if (0 != luaL_loadfile(sc->L, name->ptr)) { + /* oops, an error, return it */ +- + return sc->L; + } + +@@ -122,14 +121,7 @@ + buffer_copy_buffer(sc->etag, sce->etag); + } + +- /** +- * pcall() needs the function on the stack +- * +- * as pcall() will pop the script from the stack when done, we have to +- * duplicate it here +- */ + force_assert(lua_isfunction(sc->L, -1)); +- lua_pushvalue(sc->L, -1); /* copy the function-reference */ + + return sc->L; + } +Index: lighttpd-1.4.37/src/mod_cml_lua.c +=================================================================== +--- lighttpd-1.4.37/src/mod_cml_lua.c (revision 3069) ++++ lighttpd-1.4.37/src/mod_cml_lua.c (revision 3070) +@@ -28,67 +28,35 @@ + #include + #include + +-typedef struct { +- stream st; +- int done; +-} readme; +- +-static const char * load_file(lua_State *L, void *data, size_t *size) { +- readme *rm = data; +- +- UNUSED(L); +- +- if (rm->done) return 0; +- +- *size = rm->st.size; +- rm->done = 1; +- return rm->st.start; +-} +- + static int lua_to_c_get_string(lua_State *L, const char *varname, buffer *b) { +- int curelem; ++ int curelem = lua_gettop(L); ++ int result; + +- lua_pushstring(L, varname); ++ lua_getglobal(L, varname); + +- curelem = lua_gettop(L); +- lua_gettable(L, LUA_GLOBALSINDEX); +- +- /* it should be a table */ +- if (!lua_isstring(L, curelem)) { +- lua_settop(L, curelem - 1); +- +- return -1; ++ if (lua_isstring(L, curelem)) { ++ buffer_copy_string(b, lua_tostring(L, curelem)); ++ result = 0; ++ } else { ++ result = -1; + } + +- buffer_copy_string(b, lua_tostring(L, curelem)); +- + lua_pop(L, 1); +- +- force_assert(curelem - 1 == lua_gettop(L)); +- +- return 0; ++ force_assert(curelem == lua_gettop(L)); ++ return result; + } + + static int lua_to_c_is_table(lua_State *L, const char *varname) { +- int curelem; ++ int curelem = lua_gettop(L); ++ int result; + +- lua_pushstring(L, varname); ++ lua_getglobal(L, varname); + +- curelem = lua_gettop(L); +- lua_gettable(L, LUA_GLOBALSINDEX); ++ result = lua_istable(L, curelem) ? 1 : 0; + +- /* it should be a table */ +- if (!lua_istable(L, curelem)) { +- lua_settop(L, curelem - 1); +- +- return 0; +- } +- +- lua_settop(L, curelem - 1); +- +- force_assert(curelem - 1 == lua_gettop(L)); +- +- return 1; ++ lua_pop(L, 1); ++ force_assert(curelem == lua_gettop(L)); ++ return result; + } + + static int c_to_lua_push(lua_State *L, int tbl, const char *key, size_t key_len, const char *val, size_t val_len) { +@@ -99,7 +67,6 @@ + return 0; + } + +- + static int cache_export_get_params(lua_State *L, int tbl, buffer *qrystr) { + size_t is_key = 1; + size_t i, len; +@@ -143,83 +110,12 @@ + + return 0; + } +-#if 0 +-int cache_export_cookie_params(server *srv, connection *con, plugin_data *p) { +- data_unset *d; + +- UNUSED(srv); +- +- if (NULL != (d = array_get_element(con->request.headers, "Cookie"))) { +- data_string *ds = (data_string *)d; +- size_t key = 0, value = 0; +- size_t is_key = 1, is_sid = 0; +- size_t i; +- +- /* found COOKIE */ +- if (!DATA_IS_STRING(d)) return -1; +- if (ds->value->used == 0) return -1; +- +- if (ds->value->ptr[0] == '\0' || +- ds->value->ptr[0] == '=' || +- ds->value->ptr[0] == ';') return -1; +- +- buffer_reset(p->session_id); +- for (i = 0; i < ds->value->used; i++) { +- switch(ds->value->ptr[i]) { +- case '=': +- if (is_key) { +- if (0 == strncmp(ds->value->ptr + key, "PHPSESSID", i - key)) { +- /* found PHP-session-id-key */ +- is_sid = 1; +- } +- value = i + 1; +- +- is_key = 0; +- } +- +- break; +- case ';': +- if (is_sid) { +- buffer_copy_string_len(p->session_id, ds->value->ptr + value, i - value); +- } +- +- is_sid = 0; +- key = i + 1; +- value = 0; +- is_key = 1; +- break; +- case ' ': +- if (is_key == 1 && key == i) key = i + 1; +- if (is_key == 0 && value == i) value = i + 1; +- break; +- case '\0': +- if (is_sid) { +- buffer_copy_string_len(p->session_id, ds->value->ptr + value, i - value); +- } +- /* fin */ +- break; +- } +- } +- } +- +- return 0; +-} +-#endif +- + int cache_parse_lua(server *srv, connection *con, plugin_data *p, buffer *fn) { + lua_State *L; +- readme rm; + int ret = -1; + buffer *b; +- int header_tbl = 0; + +- rm.done = 0; +- if (-1 == stream_open(&rm.st, fn)) { +- log_error_write(srv, __FILE__, __LINE__, "sbss", +- "opening lua cml file ", fn, "failed:", strerror(errno)); +- return -1; +- } +- + b = buffer_init(); + /* push the lua file to the interpreter and see what happends */ + L = luaL_newstate(); +@@ -233,73 +129,77 @@ + lua_register(L, "dir_files", f_dir_files); + + #ifdef HAVE_MEMCACHE_H +- lua_pushliteral(L, "memcache_get_long"); + lua_pushlightuserdata(L, p->conf.mc); + lua_pushcclosure(L, f_memcache_get_long, 1); +- lua_settable(L, LUA_GLOBALSINDEX); ++ lua_setglobal(L, "memcache_get_long"); + +- lua_pushliteral(L, "memcache_get_string"); + lua_pushlightuserdata(L, p->conf.mc); + lua_pushcclosure(L, f_memcache_get_string, 1); +- lua_settable(L, LUA_GLOBALSINDEX); ++ lua_setglobal(L, "memcache_get_string"); + +- lua_pushliteral(L, "memcache_exists"); + lua_pushlightuserdata(L, p->conf.mc); + lua_pushcclosure(L, f_memcache_exists, 1); +- lua_settable(L, LUA_GLOBALSINDEX); ++ lua_setglobal(L, "memcache_exists"); + #endif ++ + /* register CGI environment */ +- lua_pushliteral(L, "request"); + lua_newtable(L); +- lua_settable(L, LUA_GLOBALSINDEX); ++ { ++ int header_tbl = lua_gettop(L); + +- lua_pushliteral(L, "request"); +- header_tbl = lua_gettop(L); +- lua_gettable(L, LUA_GLOBALSINDEX); ++ c_to_lua_push(L, header_tbl, CONST_STR_LEN("REQUEST_URI"), CONST_BUF_LEN(con->request.orig_uri)); ++ c_to_lua_push(L, header_tbl, CONST_STR_LEN("SCRIPT_NAME"), CONST_BUF_LEN(con->uri.path)); ++ c_to_lua_push(L, header_tbl, CONST_STR_LEN("SCRIPT_FILENAME"), CONST_BUF_LEN(con->physical.path)); ++ c_to_lua_push(L, header_tbl, CONST_STR_LEN("DOCUMENT_ROOT"), CONST_BUF_LEN(con->physical.doc_root)); ++ if (!buffer_string_is_empty(con->request.pathinfo)) { ++ c_to_lua_push(L, header_tbl, CONST_STR_LEN("PATH_INFO"), CONST_BUF_LEN(con->request.pathinfo)); ++ } + +- c_to_lua_push(L, header_tbl, CONST_STR_LEN("REQUEST_URI"), CONST_BUF_LEN(con->request.orig_uri)); +- c_to_lua_push(L, header_tbl, CONST_STR_LEN("SCRIPT_NAME"), CONST_BUF_LEN(con->uri.path)); +- c_to_lua_push(L, header_tbl, CONST_STR_LEN("SCRIPT_FILENAME"), CONST_BUF_LEN(con->physical.path)); +- c_to_lua_push(L, header_tbl, CONST_STR_LEN("DOCUMENT_ROOT"), CONST_BUF_LEN(con->physical.doc_root)); +- if (!buffer_string_is_empty(con->request.pathinfo)) { +- c_to_lua_push(L, header_tbl, CONST_STR_LEN("PATH_INFO"), CONST_BUF_LEN(con->request.pathinfo)); ++ c_to_lua_push(L, header_tbl, CONST_STR_LEN("CWD"), CONST_BUF_LEN(p->basedir)); ++ c_to_lua_push(L, header_tbl, CONST_STR_LEN("BASEURL"), CONST_BUF_LEN(p->baseurl)); + } ++ lua_setglobal(L, "request"); + +- c_to_lua_push(L, header_tbl, CONST_STR_LEN("CWD"), CONST_BUF_LEN(p->basedir)); +- c_to_lua_push(L, header_tbl, CONST_STR_LEN("BASEURL"), CONST_BUF_LEN(p->baseurl)); +- + /* register GET parameter */ +- lua_pushliteral(L, "get"); + lua_newtable(L); +- lua_settable(L, LUA_GLOBALSINDEX); ++ { ++ int get_tbl = lua_gettop(L); + +- lua_pushliteral(L, "get"); +- header_tbl = lua_gettop(L); +- lua_gettable(L, LUA_GLOBALSINDEX); ++ buffer_copy_buffer(b, con->uri.query); ++ cache_export_get_params(L, get_tbl, b); ++ buffer_reset(b); ++ } ++ lua_setglobal(L, "get"); + +- buffer_copy_buffer(b, con->uri.query); +- cache_export_get_params(L, header_tbl, b); +- buffer_reset(b); +- + /* 2 default constants */ +- lua_pushliteral(L, "CACHE_HIT"); +- lua_pushnumber(L, 0); +- lua_settable(L, LUA_GLOBALSINDEX); ++ lua_pushinteger(L, 0); ++ lua_setglobal(L, "CACHE_HIT"); + +- lua_pushliteral(L, "CACHE_MISS"); +- lua_pushnumber(L, 1); +- lua_settable(L, LUA_GLOBALSINDEX); ++ lua_pushinteger(L, 1); ++ lua_setglobal(L, "CACHE_MISS"); + + /* load lua program */ +- if (lua_load(L, load_file, &rm, fn->ptr) || lua_pcall(L,0,1,0)) { +- log_error_write(srv, __FILE__, __LINE__, "s", +- lua_tostring(L,-1)); ++ ret = luaL_loadfile(L, fn->ptr); ++ if (0 != ret) { ++ log_error_write(srv, __FILE__, __LINE__, "sbsS", ++ "failed loading cml_lua script", ++ fn, ++ ":", ++ lua_tostring(L, -1)); ++ goto error; ++ } + ++ if (lua_pcall(L, 0, 1, 0)) { ++ log_error_write(srv, __FILE__, __LINE__, "sbsS", ++ "failed running cml_lua script", ++ fn, ++ ":", ++ lua_tostring(L, -1)); + goto error; + } + + /* get return value */ +- ret = (int)lua_tonumber(L, -1); ++ ret = (int)lua_tointeger(L, -1); + lua_pop(L, 1); + + /* fetch the data from lua */ +@@ -323,10 +223,8 @@ + goto error; + } + +- lua_pushstring(L, "output_include"); +- ++ lua_getglobal(L, "output_include"); + curelem = lua_gettop(L); +- lua_gettable(L, LUA_GLOBALSINDEX); + + /* HOW-TO build a etag ? + * as we don't just have one file we have to take the stat() +@@ -441,7 +339,6 @@ + error: + lua_close(L); + +- stream_close(&rm.st); + buffer_free(b); + + return ret /* cache-error */; +Index: lighttpd-1.4.37/src/mod_magnet.c +=================================================================== +--- lighttpd-1.4.37/src/mod_magnet.c (revision 3069) ++++ lighttpd-1.4.37/src/mod_magnet.c (revision 3070) +@@ -20,6 +20,9 @@ + #include + #include + ++#define LUA_RIDX_LIGHTTPD_SERVER "lighty.srv" ++#define LUA_RIDX_LIGHTTPD_CONNECTION "lighty.con" ++ + #define MAGNET_CONFIG_RAW_URL "magnet.attract-raw-url-to" + #define MAGNET_CONFIG_PHYSICAL_PATH "magnet.attract-physical-path-to" + #define MAGNET_RESTART_REQUEST 99 +@@ -159,23 +162,57 @@ + } + #undef PATCH + +-/* See http://lua-users.org/wiki/GeneralizedPairsAndIpairs for implementation details. */ ++static void magnet_get_global_table(lua_State *L) { /* (-0, +1, e) */ ++#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 502 ++ lua_geti(L, LUA_REGISTRYINDEX, LUA_RIDX_GLOBALS); ++#else ++ lua_pushvalue(L, LUA_GLOBALSINDEX); ++#endif ++} + +-/* Override the default pairs() function to allow us to use a __pairs metakey */ ++static void magnet_setfenv_mainfn(lua_State *L, int funcIndex) { /* (-1, 0, -) */ ++#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 502 ++ /* set "_ENV" upvalue, which should be the first upvalue of a "main" lua ++ * function if it uses any global names ++ */ ++ ++ const char* first_upvalue_name = lua_getupvalue(L, funcIndex, 1); ++ if (NULL == first_upvalue_name) return; /* doesn't have any upvalues */ ++ lua_pop(L, 1); /* only need the name of the upvalue, not the value */ ++ ++ if (0 != strcmp(first_upvalue_name, "_ENV")) return; ++ ++ if (NULL == lua_setupvalue(L, funcIndex, 1)) { ++ /* pop value if lua_setupvalue didn't set the (not existing) upvalue */ ++ lua_pop(L, 1); ++ } ++#else ++ lua_setfenv(L, funcIndex); ++#endif ++} ++ ++#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502 ++/* lua 5.2 already supports __pairs */ ++ ++/* See http://lua-users.org/wiki/GeneralizedPairsAndIpairs for implementation details. ++ * Override the default pairs() function to allow us to use a __pairs metakey ++ */ + static int magnet_pairs(lua_State *L) { +- luaL_checkany(L, 1); ++ luaL_checkany(L, 1); /* "self" */ + + if (luaL_getmetafield(L, 1, "__pairs")) { +- lua_insert(L, 1); +- lua_call(L, lua_gettop(L) - 1, LUA_MULTRET); +- return lua_gettop(L); ++ /* call __pairs(self) */ ++ lua_pushvalue(L, 1); ++ lua_call(L, 1, 3); + } else { ++ /* call (self) */ + lua_pushvalue(L, lua_upvalueindex(1)); +- lua_insert(L, 1); +- lua_call(L, lua_gettop(L) - 1, LUA_MULTRET); +- return lua_gettop(L); ++ lua_pushvalue(L, 1); ++ lua_call(L, 1, 3); + } ++ return 3; + } ++#endif + + /* Define a function that will iterate over an array* (in upval 1) using current position (upval 2) */ + static int magnet_array_next(lua_State *L) { +@@ -229,40 +266,63 @@ + return 1; + } + +-static int magnet_print(lua_State *L) { +- const char *s = luaL_checkstring(L, 1); ++static server* magnet_get_server(lua_State *L) { + server *srv; + +- lua_pushstring(L, "lighty.srv"); +- lua_gettable(L, LUA_REGISTRYINDEX); ++ lua_getfield(L, LUA_REGISTRYINDEX, LUA_RIDX_LIGHTTPD_SERVER); + srv = lua_touserdata(L, -1); + lua_pop(L, 1); + +- log_error_write(srv, __FILE__, __LINE__, "ss", +- "(lua-print)", s); ++ return srv; ++} + ++static connection* magnet_get_connection(lua_State *L) { ++ connection *con; ++ ++ lua_getfield(L, LUA_REGISTRYINDEX, LUA_RIDX_LIGHTTPD_CONNECTION); ++ con = lua_touserdata(L, -1); ++ lua_pop(L, 1); ++ ++ return con; ++} ++ ++typedef struct { ++ const char *ptr; ++ size_t len; ++} const_buffer; ++ ++static const_buffer magnet_checkconstbuffer(lua_State *L, int index) { ++ const_buffer cb; ++ cb.ptr = luaL_checklstring(L, index, &cb.len); ++ return cb; ++} ++ ++static buffer* magnet_checkbuffer(lua_State *L, int index) { ++ const_buffer cb = magnet_checkconstbuffer(L, index); ++ buffer *b = buffer_init(); ++ buffer_copy_string_len(b, cb.ptr, cb.len); ++ return b; ++} ++ ++static int magnet_print(lua_State *L) { ++ buffer *b = magnet_checkbuffer(L, 1); ++ ++ log_error_write(magnet_get_server(L), __FILE__, __LINE__, "sB", ++ "(lua-print)", ++ b); ++ ++ buffer_free(b); ++ + return 0; + } + + static int magnet_stat(lua_State *L) { +- const char *s = luaL_checkstring(L, 1); +- server *srv; +- connection *con; +- buffer *sb; ++ buffer *sb = magnet_checkbuffer(L, 1); ++ server *srv = magnet_get_server(L); ++ connection *con = magnet_get_connection(L); + stat_cache_entry *sce = NULL; + handler_t res; + +- lua_pushstring(L, "lighty.srv"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- srv = lua_touserdata(L, -1); +- lua_pop(L, 1); +- +- lua_pushstring(L, "lighty.con"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- con = lua_touserdata(L, -1); +- lua_pop(L, 1); +- +- sb = buffer_init_string(s); + res = stat_cache_get_entry(srv, con, sb, &sce); + buffer_free(sb); + +@@ -271,7 +331,7 @@ + return 1; + } + +- lua_newtable(L); ++ lua_newtable(L); // return value + + lua_pushboolean(L, S_ISREG(sce->st.st_mode)); + lua_setfield(L, -2, "is_file"); +@@ -315,7 +375,6 @@ + lua_pushinteger(L, sce->st.st_ino); + lua_setfield(L, -2, "st_ino"); + +- + if (!buffer_string_is_empty(sce->etag)) { + /* we have to mutate the etag */ + buffer *b = buffer_init(); +@@ -340,31 +399,24 @@ + + + static int magnet_atpanic(lua_State *L) { +- const char *s = luaL_checkstring(L, 1); +- server *srv; ++ buffer *b = magnet_checkbuffer(L, 1); + +- lua_pushstring(L, "lighty.srv"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- srv = lua_touserdata(L, -1); +- lua_pop(L, 1); ++ log_error_write(magnet_get_server(L), __FILE__, __LINE__, "sB", ++ "(lua-atpanic)", ++ b); + +- log_error_write(srv, __FILE__, __LINE__, "ss", +- "(lua-atpanic)", s); ++ buffer_free(b); + + longjmp(exceptionjmp, 1); + } + + static int magnet_reqhdr_get(lua_State *L) { +- connection *con; ++ connection *con = magnet_get_connection(L); + data_string *ds; + ++ /* __index: param 1 is the (empty) table the value was not found in */ + const char *key = luaL_checkstring(L, 2); + +- lua_pushstring(L, "lighty.con"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- con = lua_touserdata(L, -1); +- lua_pop(L, 1); +- + if (NULL != (ds = (data_string *)array_get_element(con->request.headers, key))) { + if (!buffer_is_empty(ds->value)) { + lua_pushlstring(L, CONST_BUF_LEN(ds->value)); +@@ -378,60 +430,40 @@ + } + + static int magnet_reqhdr_pairs(lua_State *L) { +- connection *con; ++ connection *con = magnet_get_connection(L); + +- lua_pushstring(L, "lighty.con"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- con = lua_touserdata(L, -1); +- lua_pop(L, 1); +- + return magnet_array_pairs(L, con->request.headers); + } + + static int magnet_status_get(lua_State *L) { + data_integer *di; +- server *srv; +- size_t key_len = 0; ++ server *srv = magnet_get_server(L); + +- const char *key = luaL_checklstring(L, 2, &key_len); ++ /* __index: param 1 is the (empty) table the value was not found in */ ++ const_buffer key = magnet_checkconstbuffer(L, 2); + +- lua_pushstring(L, "lighty.srv"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- srv = lua_touserdata(L, -1); +- lua_pop(L, 1); ++ di = status_counter_get_counter(srv, key.ptr, key.len); + +- di = status_counter_get_counter(srv, key, key_len); ++ lua_pushinteger(L, (lua_Integer)di->value); + +- lua_pushnumber(L, (double)di->value); +- + return 1; + } + + static int magnet_status_set(lua_State *L) { +- size_t key_len = 0; +- server *srv; ++ server *srv = magnet_get_server(L); + +- const char *key = luaL_checklstring(L, 2, &key_len); +- int counter = luaL_checkint(L, 3); ++ /* __newindex: param 1 is the (empty) table the value is supposed to be set in */ ++ const_buffer key = magnet_checkconstbuffer(L, 2); ++ int counter = (int) luaL_checkinteger(L, 3); + +- lua_pushstring(L, "lighty.srv"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- srv = lua_touserdata(L, -1); +- lua_pop(L, 1); ++ status_counter_set(srv, key.ptr, key.len, counter); + +- status_counter_set(srv, key, key_len, counter); +- + return 0; + } + + static int magnet_status_pairs(lua_State *L) { +- server *srv; ++ server *srv = magnet_get_server(L); + +- lua_pushstring(L, "lighty.srv"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- srv = lua_touserdata(L, -1); +- lua_pop(L, 1); +- + return magnet_array_pairs(L, srv->status); + } + +@@ -534,22 +566,13 @@ + } + + static int magnet_env_get(lua_State *L) { +- server *srv; +- connection *con; ++ server *srv = magnet_get_server(L); ++ connection *con = magnet_get_connection(L); + ++ /* __index: param 1 is the (empty) table the value was not found in */ + const char *key = luaL_checkstring(L, 2); + buffer *dest = NULL; + +- lua_pushstring(L, "lighty.srv"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- srv = lua_touserdata(L, -1); +- lua_pop(L, 1); +- +- lua_pushstring(L, "lighty.con"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- con = lua_touserdata(L, -1); +- lua_pop(L, 1); +- + dest = magnet_env_get_buffer(srv, con, key); + + if (!buffer_is_empty(dest)) { +@@ -562,25 +585,22 @@ + } + + static int magnet_env_set(lua_State *L) { +- server *srv; +- connection *con; ++ server *srv = magnet_get_server(L); ++ connection *con = magnet_get_connection(L); + ++ /* __newindex: param 1 is the (empty) table the value is supposed to be set in */ + const char *key = luaL_checkstring(L, 2); +- const char *val = luaL_checkstring(L, 3); + buffer *dest = NULL; + +- lua_pushstring(L, "lighty.srv"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- srv = lua_touserdata(L, -1); +- lua_pop(L, 1); ++ luaL_checkany(L, 3); /* nil or a string */ + +- lua_pushstring(L, "lighty.con"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- con = lua_touserdata(L, -1); +- lua_pop(L, 1); +- + if (NULL != (dest = magnet_env_get_buffer(srv, con, key))) { +- buffer_copy_string(dest, val); ++ if (lua_isnil(L, 3)) { ++ buffer_reset(dest); ++ } else { ++ const_buffer val = magnet_checkconstbuffer(L, 3); ++ buffer_copy_string_len(dest, val.ptr, val.len); ++ } + } else { + /* couldn't save */ + +@@ -591,28 +611,24 @@ + } + + static int magnet_env_next(lua_State *L) { +- server *srv; +- connection *con; +- int pos = lua_tointeger(L, lua_upvalueindex(1)); ++ server *srv = magnet_get_server(L); ++ connection *con = magnet_get_connection(L); ++ const int pos = lua_tointeger(L, lua_upvalueindex(1)); + + buffer *dest; + +- lua_pushstring(L, "lighty.srv"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- srv = lua_touserdata(L, -1); +- lua_pop(L, 1); +- +- lua_pushstring(L, "lighty.con"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- con = lua_touserdata(L, -1); +- lua_pop(L, 1); +- ++ /* ignore previous key: use upvalue for current pos */ + lua_settop(L, 0); + + if (NULL == magnet_env[pos].name) return 0; /* end of list */ ++ /* Update our positional upval to reflect our new current position */ ++ lua_pushinteger(L, pos + 1); ++ lua_replace(L, lua_upvalueindex(1)); + ++ /* key to return */ + lua_pushstring(L, magnet_env[pos].name); + ++ /* get value */ + dest = magnet_env_get_buffer_by_id(srv, con, magnet_env[pos].type); + if (!buffer_is_empty(dest)) { + lua_pushlstring(L, CONST_BUF_LEN(dest)); +@@ -620,12 +636,7 @@ + lua_pushnil(L); + } + +- /* Update our positional upval to reflect our new current position */ +- pos++; +- lua_pushinteger(L, pos); +- lua_replace(L, lua_upvalueindex(1)); +- +- /* Returning 2 items on the stack (key, value) */ ++ /* return 2 items on the stack (key, value) */ + return 2; + } + +@@ -636,16 +647,12 @@ + } + + static int magnet_cgi_get(lua_State *L) { +- connection *con; ++ connection *con = magnet_get_connection(L); + data_string *ds; + ++ /* __index: param 1 is the (empty) table the value was not found in */ + const char *key = luaL_checkstring(L, 2); + +- lua_pushstring(L, "lighty.con"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- con = lua_touserdata(L, -1); +- lua_pop(L, 1); +- + ds = (data_string *)array_get_element(con->environment, key); + if (NULL != ds && !buffer_is_empty(ds->value)) + lua_pushlstring(L, CONST_BUF_LEN(ds->value)); +@@ -656,47 +663,28 @@ + } + + static int magnet_cgi_set(lua_State *L) { +- connection *con; ++ connection *con = magnet_get_connection(L); + +- const char *key = luaL_checkstring(L, 2); +- const char *val = luaL_checkstring(L, 3); ++ /* __newindex: param 1 is the (empty) table the value is supposed to be set in */ ++ const_buffer key = magnet_checkconstbuffer(L, 2); ++ const_buffer val = magnet_checkconstbuffer(L, 2); + +- lua_pushstring(L, "lighty.con"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- con = lua_touserdata(L, -1); +- lua_pop(L, 1); ++ array_set_key_value(con->environment, key.ptr, key.len, val.ptr, val.len); + +- array_set_key_value(con->environment, key, strlen(key), val, strlen(val)); +- + return 0; + } + + static int magnet_cgi_pairs(lua_State *L) { +- connection *con; ++ connection *con = magnet_get_connection(L); + +- lua_pushstring(L, "lighty.con"); +- lua_gettable(L, LUA_REGISTRYINDEX); +- con = lua_touserdata(L, -1); +- lua_pop(L, 1); +- + return magnet_array_pairs(L, con->environment); + } + + +-static int magnet_copy_response_header(server *srv, connection *con, plugin_data *p, lua_State *L) { +- UNUSED(p); +- /** +- * get the environment of the function +- */ ++static int magnet_copy_response_header(server *srv, connection *con, lua_State *L, int lighty_table_ndx) { ++ force_assert(lua_istable(L, lighty_table_ndx)); + +- lua_getfenv(L, -1); /* -1 is the function */ +- +- /* lighty.header */ +- +- lua_getfield(L, -1, "lighty"); /* lighty.* from the env */ +- force_assert(lua_istable(L, -1)); +- +- lua_getfield(L, -1, "header"); /* lighty.header */ ++ lua_getfield(L, lighty_table_ndx, "header"); /* lighty.header */ + if (lua_istable(L, -1)) { + /* header is found, and is a table */ + +@@ -703,23 +691,17 @@ + lua_pushnil(L); + while (lua_next(L, -2) != 0) { + if (lua_isstring(L, -1) && lua_isstring(L, -2)) { +- const char *key, *val; +- size_t key_len, val_len; ++ const_buffer key = magnet_checkconstbuffer(L, -2); ++ const_buffer val = magnet_checkconstbuffer(L, -1); + +- key = lua_tolstring(L, -2, &key_len); +- val = lua_tolstring(L, -1, &val_len); +- +- response_header_overwrite(srv, con, key, key_len, val, val_len); ++ response_header_overwrite(srv, con, key.ptr, key.len, val.ptr, val.len); + } + + lua_pop(L, 1); + } + } ++ lua_pop(L, 1); /* pop lighty.header */ + +- lua_pop(L, 1); /* pop the header-table */ +- lua_pop(L, 1); /* pop the lighty-env */ +- lua_pop(L, 1); /* pop the function env */ +- + return 0; + } + +@@ -732,22 +714,13 @@ + * + * return 200 + */ +-static int magnet_attach_content(server *srv, connection *con, plugin_data *p, lua_State *L) { +- UNUSED(p); +- /** +- * get the environment of the function +- */ ++static int magnet_attach_content(server *srv, connection *con, lua_State *L, int lighty_table_ndx) { ++ force_assert(lua_istable(L, lighty_table_ndx)); + +- force_assert(lua_isfunction(L, -1)); +- lua_getfenv(L, -1); /* -1 is the function */ +- +- lua_getfield(L, -1, "lighty"); /* lighty.* from the env */ +- force_assert(lua_istable(L, -1)); +- +- lua_getfield(L, -1, "content"); /* lighty.content */ ++ lua_getfield(L, lighty_table_ndx, "content"); /* lighty.content */ + if (lua_istable(L, -1)) { + int i; +- /* header is found, and is a table */ ++ /* content is found, and is a table */ + + for (i = 1; ; i++) { + lua_rawgeti(L, -1, i); +@@ -754,10 +727,9 @@ + + /* -1 is the value and should be the value ... aka a table */ + if (lua_isstring(L, -1)) { +- size_t s_len = 0; +- const char *s = lua_tolstring(L, -1, &s_len); ++ const_buffer data = magnet_checkconstbuffer(L, -1); + +- chunkqueue_append_mem(con->write_queue, s, s_len); ++ chunkqueue_append_mem(con->write_queue, data.ptr, data.len); + } else if (lua_istable(L, -1)) { + lua_getfield(L, -1, "filename"); + lua_getfield(L, -2, "length"); +@@ -766,36 +738,24 @@ + if (lua_isstring(L, -3)) { /* filename has to be a string */ + buffer *fn; + stat_cache_entry *sce; +- const char *fn_str; + handler_t res; + +- fn_str = lua_tostring(L, -3); +- fn = buffer_init_string(fn_str); ++ fn = magnet_checkbuffer(L, -3); + + res = stat_cache_get_entry(srv, con, fn, &sce); + + if (HANDLER_GO_ON == res) { +- off_t off = 0; +- off_t len = 0; ++ off_t off = (off_t) luaL_optinteger(L, -1, 0); ++ off_t len = (off_t) luaL_optinteger(L, -2, (lua_Integer) sce->st.st_size); + +- if (lua_isnumber(L, -1)) { +- off = lua_tonumber(L, -1); +- } +- +- if (lua_isnumber(L, -2)) { +- len = lua_tonumber(L, -2); +- } else { +- len = sce->st.st_size; +- } +- + if (off < 0) { + buffer_free(fn); +- return luaL_error(L, "offset for '%s' is negative", fn_str); ++ return luaL_error(L, "offset for '%s' is negative", lua_tostring(L, -3)); + } + + if (len < off) { + buffer_free(fn); +- return luaL_error(L, "offset > length for '%s'", fn_str); ++ return luaL_error(L, "offset > length for '%s'", lua_tostring(L, -3)); + } + + chunkqueue_append_file(con->write_queue, fn, off, len - off); +@@ -803,40 +763,34 @@ + + buffer_free(fn); + } else { +- lua_pop(L, 3 + 2); /* correct the stack */ +- + return luaL_error(L, "content[%d] is a table and requires the field \"filename\"", i); + } + + lua_pop(L, 3); + } else if (lua_isnil(L, -1)) { +- /* oops, end of list */ ++ /* end of list */ + + lua_pop(L, 1); + + break; + } else { +- lua_pop(L, 4); +- + return luaL_error(L, "content[%d] is neither a string nor a table: ", i); + } + +- lua_pop(L, 1); /* pop the content[...] table */ ++ lua_pop(L, 1); /* pop the content[...] entry value */ + } + } else { + return luaL_error(L, "lighty.content has to be a table"); + } +- lua_pop(L, 1); /* pop the header-table */ +- lua_pop(L, 1); /* pop the lighty-table */ +- lua_pop(L, 1); /* php the function env */ ++ lua_pop(L, 1); /* pop lighty.content */ + + return 0; + } + +-static int traceback (lua_State *L) { ++static int traceback(lua_State *L) { + if (!lua_isstring(L, 1)) /* 'message' not a string? */ + return 1; /* keep it intact */ +- lua_getfield(L, LUA_GLOBALSINDEX, "debug"); ++ lua_getglobal(L, "debug"); + if (!lua_istable(L, -1)) { + lua_pop(L, 1); + return 1; +@@ -852,6 +806,10 @@ + return 1; + } + ++/* push traceback function before calling lua_pcall after narg arguments ++ * have been pushed (inserts it before the arguments). returns index for ++ * traceback function ("msgh" in lua_pcall) ++ */ + static int push_traceback(lua_State *L, int narg) { + int base = lua_gettop(L) - narg; /* function index */ + lua_pushcfunction(L, traceback); +@@ -861,11 +819,11 @@ + + static handler_t magnet_attract(server *srv, connection *con, plugin_data *p, buffer *name) { + lua_State *L; +- int lua_return_value = -1; +- int errfunc; ++ int lua_return_value; ++ const int func_ndx = 1; ++ const int lighty_table_ndx = 2; ++ + /* get the script-context */ +- +- + L = script_cache_get_script(srv, con, p->cache, name); + + if (lua_isstring(L, -1)) { +@@ -878,7 +836,7 @@ + + lua_pop(L, 1); + +- force_assert(lua_gettop(L) == 0); /* only the function should be on the stack */ ++ force_assert(lua_gettop(L) == 0); /* only the error should have been on the stack */ + + con->http_status = 500; + con->mode = DIRECT; +@@ -886,13 +844,14 @@ + return HANDLER_FINISHED; + } + +- lua_pushstring(L, "lighty.srv"); ++ force_assert(lua_gettop(L) == 1); ++ force_assert(lua_isfunction(L, func_ndx)); ++ + lua_pushlightuserdata(L, srv); +- lua_settable(L, LUA_REGISTRYINDEX); /* registery[] = srv */ ++ lua_setfield(L, LUA_REGISTRYINDEX, LUA_RIDX_LIGHTTPD_SERVER); + +- lua_pushstring(L, "lighty.con"); + lua_pushlightuserdata(L, con); +- lua_settable(L, LUA_REGISTRYINDEX); /* registery[] = con */ ++ lua_setfield(L, LUA_REGISTRYINDEX, LUA_RIDX_LIGHTTPD_CONNECTION); + + lua_atpanic(L, magnet_atpanic); + +@@ -901,7 +860,7 @@ + * + * setmetatable({}, {__index = _G}) + * +- * if a function, symbol is not defined in our env, __index will lookup ++ * if a function symbol is not defined in our env, __index will lookup + * in the global env. + * + * all variables created in the script-env will be thrown +@@ -914,9 +873,13 @@ + lua_setfield(L, -2, "print"); /* -1 is the env we want to set(sp -= 1) */ + + /** +- * lighty.request[] has the HTTP-request headers +- * lighty.content[] is a table of string/file +- * lighty.header[] is a array to set response headers ++ * lighty.request[] (ro) has the HTTP-request headers ++ * lighty.env[] (rw) has various url/physical file paths and ++ * request meta data; might contain nil values ++ * lighty.req_env[] (ro) has the cgi environment ++ * lighty.status[] (ro) has the status counters ++ * lighty.content[] (rw) is a table of string/file ++ * lighty.header[] (rw) is a array to set response headers + */ + + lua_newtable(L); /* lighty.* (sp += 1) */ +@@ -931,7 +894,7 @@ + lua_setfield(L, -2, "request"); /* content = {} (sp -= 1) */ + + lua_newtable(L); /* {} (sp += 1) */ +- lua_newtable(L); /* the meta-table for the request-table (sp += 1) */ ++ lua_newtable(L); /* the meta-table for the env-table (sp += 1) */ + lua_pushcfunction(L, magnet_env_get); /* (sp += 1) */ + lua_setfield(L, -2, "__index"); /* (sp -= 1) */ + lua_pushcfunction(L, magnet_env_set); /* (sp += 1) */ +@@ -938,11 +901,11 @@ + lua_setfield(L, -2, "__newindex"); /* (sp -= 1) */ + lua_pushcfunction(L, magnet_env_pairs); /* (sp += 1) */ + lua_setfield(L, -2, "__pairs"); /* (sp -= 1) */ +- lua_setmetatable(L, -2); /* tie the metatable to request (sp -= 1) */ ++ lua_setmetatable(L, -2); /* tie the metatable to env (sp -= 1) */ + lua_setfield(L, -2, "env"); /* content = {} (sp -= 1) */ + + lua_newtable(L); /* {} (sp += 1) */ +- lua_newtable(L); /* the meta-table for the request-table (sp += 1) */ ++ lua_newtable(L); /* the meta-table for the req_env-table (sp += 1) */ + lua_pushcfunction(L, magnet_cgi_get); /* (sp += 1) */ + lua_setfield(L, -2, "__index"); /* (sp -= 1) */ + lua_pushcfunction(L, magnet_cgi_set); /* (sp += 1) */ +@@ -953,7 +916,7 @@ + lua_setfield(L, -2, "req_env"); /* content = {} (sp -= 1) */ + + lua_newtable(L); /* {} (sp += 1) */ +- lua_newtable(L); /* the meta-table for the request-table (sp += 1) */ ++ lua_newtable(L); /* the meta-table for the status-table (sp += 1) */ + lua_pushcfunction(L, magnet_status_get); /* (sp += 1) */ + lua_setfield(L, -2, "__index"); /* (sp -= 1) */ + lua_pushcfunction(L, magnet_status_set); /* (sp += 1) */ +@@ -960,7 +923,7 @@ + lua_setfield(L, -2, "__newindex"); /* (sp -= 1) */ + lua_pushcfunction(L, magnet_status_pairs); /* (sp += 1) */ + lua_setfield(L, -2, "__pairs"); /* (sp -= 1) */ +- lua_setmetatable(L, -2); /* tie the metatable to request (sp -= 1) */ ++ lua_setmetatable(L, -2); /* tie the metatable to statzs (sp -= 1) */ + lua_setfield(L, -2, "status"); /* content = {} (sp -= 1) */ + + /* add empty 'content' and 'header' tables */ +@@ -976,78 +939,92 @@ + lua_pushcfunction(L, magnet_stat); /* (sp += 1) */ + lua_setfield(L, -2, "stat"); /* -1 is the env we want to set (sp -= 1) */ + ++ /* insert lighty table at index 2 */ ++ lua_pushvalue(L, -1); ++ lua_insert(L, lighty_table_ndx); ++ + lua_setfield(L, -2, "lighty"); /* lighty.* (sp -= 1) */ + +- /* override the default pairs() function to our __pairs capable version */ ++#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502 ++ /* override the default pairs() function to our __pairs capable version; ++ * not needed for lua 5.2+ ++ */ + lua_getglobal(L, "pairs"); /* push original pairs() (sp += 1) */ + lua_pushcclosure(L, magnet_pairs, 1); + lua_setfield(L, -2, "pairs"); /* (sp -= 1) */ ++#endif + + lua_newtable(L); /* the meta-table for the new env (sp += 1) */ +- lua_pushvalue(L, LUA_GLOBALSINDEX); /* (sp += 1) */ ++ magnet_get_global_table(L); /* (sp += 1) */ + lua_setfield(L, -2, "__index"); /* { __index = _G } (sp -= 1) */ + lua_setmetatable(L, -2); /* setmetatable({}, {__index = _G}) (sp -= 1) */ + ++ magnet_setfenv_mainfn(L, 1); /* (sp -= 1) */ + +- lua_setfenv(L, -2); /* on the stack should be a modified env (sp -= 1) */ +- +- errfunc = push_traceback(L, 0); +- if (lua_pcall(L, 0, 1, errfunc)) { ++ /* pcall will destroy the func value, duplicate it */ /* (sp += 1) */ ++ lua_pushvalue(L, func_ndx); ++ { ++ int errfunc = push_traceback(L, 0); ++ int ret = lua_pcall(L, 0, 1, errfunc); + lua_remove(L, errfunc); +- log_error_write(srv, __FILE__, __LINE__, +- "ss", +- "lua_pcall():", +- lua_tostring(L, -1)); +- lua_pop(L, 1); /* remove the error-msg and the function copy from the stack */ + +- force_assert(lua_gettop(L) == 1); /* only the function should be on the stack */ ++ /* reset environment */ ++ magnet_get_global_table(L); /* (sp += 1) */ ++ magnet_setfenv_mainfn(L, 1); /* (sp -= 1) */ + +- con->http_status = 500; +- con->mode = DIRECT; ++ if (0 != ret) { ++ log_error_write(srv, __FILE__, __LINE__, ++ "ss", ++ "lua_pcall():", ++ lua_tostring(L, -1)); ++ lua_pop(L, 2); /* remove the error-msg and the lighty table at index 2 */ + +- return HANDLER_FINISHED; +- } +- lua_remove(L, errfunc); ++ force_assert(lua_gettop(L) == 1); /* only the function should be on the stack */ + +- /* we should have the function-copy and the return value on the stack */ +- force_assert(lua_gettop(L) == 2); ++ con->http_status = 500; ++ con->mode = DIRECT; + +- if (lua_isnumber(L, -1)) { +- /* if the ret-value is a number, take it */ +- lua_return_value = (int)lua_tonumber(L, -1); ++ return HANDLER_FINISHED; ++ } + } +- lua_pop(L, 1); /* pop the ret-value */ + +- magnet_copy_response_header(srv, con, p, L); ++ /* we should have the function, the lighty table and the return value on the stack */ ++ force_assert(lua_gettop(L) == 3); + +- if (lua_return_value > 99) { +- con->http_status = lua_return_value; +- con->file_finished = 1; ++ lua_return_value = (int) luaL_optinteger(L, -1, -1); ++ lua_pop(L, 1); /* pop return value */ + +- /* try { ...*/ +- if (0 == setjmp(exceptionjmp)) { +- magnet_attach_content(srv, con, p, L); +- if (!chunkqueue_is_empty(con->write_queue)) { +- con->mode = p->id; ++ magnet_copy_response_header(srv, con, L, lighty_table_ndx); ++ ++ { ++ handler_t result = HANDLER_GO_ON; ++ ++ if (lua_return_value > 99) { ++ con->http_status = lua_return_value; ++ con->file_finished = 1; ++ ++ /* try { ...*/ ++ if (0 == setjmp(exceptionjmp)) { ++ magnet_attach_content(srv, con, L, lighty_table_ndx); ++ if (!chunkqueue_is_empty(con->write_queue)) { ++ con->mode = p->id; ++ } ++ } else { ++ lua_settop(L, 2); /* remove all but function and lighty table */ ++ /* } catch () { */ ++ con->http_status = 500; ++ con->mode = DIRECT; + } +- } else { +- /* } catch () { */ +- con->http_status = 500; +- con->mode = DIRECT; ++ ++ result = HANDLER_FINISHED; ++ } else if (MAGNET_RESTART_REQUEST == lua_return_value) { ++ result = HANDLER_COMEBACK; + } + +- force_assert(lua_gettop(L) == 1); /* only the function should be on the stack */ ++ lua_pop(L, 1); /* pop the lighty table */ ++ force_assert(lua_gettop(L) == 1); /* only the function should remain on the stack */ + +- /* we are finished */ +- return HANDLER_FINISHED; +- } else if (MAGNET_RESTART_REQUEST == lua_return_value) { +- force_assert(lua_gettop(L) == 1); /* only the function should be on the stack */ +- +- return HANDLER_COMEBACK; +- } else { +- force_assert(lua_gettop(L) == 1); /* only the function should be on the stack */ +- +- return HANDLER_GO_ON; ++ return result; + } + } + +Index: lighttpd-1.4.37/src/mod_cml_funcs.c +=================================================================== +--- lighttpd-1.4.37/src/mod_cml_funcs.c (revision 3069) ++++ lighttpd-1.4.37/src/mod_cml_funcs.c (revision 3070) +@@ -37,6 +37,8 @@ + HASH HA1; + char hex[33]; + int n = lua_gettop(L); ++ size_t s_len; ++ const char *s; + + if (n != 1) { + lua_pushstring(L, "md5: expected one argument"); +@@ -48,8 +50,10 @@ + lua_error(L); + } + ++ s = lua_tolstring(L, 1, &s_len); ++ + li_MD5_Init(&Md5Ctx); +- li_MD5_Update(&Md5Ctx, (unsigned char *)lua_tostring(L, 1), lua_strlen(L, 1)); ++ li_MD5_Update(&Md5Ctx, (unsigned char *) s, (unsigned int) s_len); + li_MD5_Final(HA1, &Md5Ctx); + + li_tohex(hex, (const char*) HA1, 16); +@@ -79,7 +83,7 @@ + return 1; + } + +- lua_pushnumber(L, st.st_mtime); ++ lua_pushinteger(L, st.st_mtime); + + return 1; + } +@@ -121,7 +125,7 @@ + return 1; + } + +- /* push d into registry */ ++ /* push d into userdata */ + lua_pushlightuserdata(L, d); + lua_pushcclosure(L, f_dir_files_iter, 1); + +@@ -147,7 +151,7 @@ + return 1; + } + +- lua_pushnumber(L, S_ISREG(st.st_mode)); ++ lua_pushinteger(L, S_ISREG(st.st_mode)); + + return 1; + } +@@ -171,7 +175,7 @@ + return 1; + } + +- lua_pushnumber(L, S_ISDIR(st.st_mode)); ++ lua_pushinteger(L, S_ISDIR(st.st_mode)); + + return 1; + } +@@ -183,6 +187,8 @@ + char *r; + int n = lua_gettop(L); + struct memcache *mc; ++ size_t s_len; ++ const char *s; + + if (!lua_islightuserdata(L, lua_upvalueindex(1))) { + lua_pushstring(L, "where is my userdata ?"); +@@ -201,9 +207,8 @@ + lua_error(L); + } + +- if (NULL == (r = mc_aget(mc, +- (char*) lua_tostring(L, 1), lua_strlen(L, 1)))) { +- ++ s = lua_tolstring(L, 1, &s_len); ++ if (NULL == (r = mc_aget(mc, (char*) s, s_len))) { + lua_pushboolean(L, 0); + return 1; + } +@@ -217,6 +222,8 @@ + int f_memcache_get_string(lua_State *L) { + char *r; + int n = lua_gettop(L); ++ size_t s_len; ++ const char *s; + + struct memcache *mc; + +@@ -238,8 +245,8 @@ + lua_error(L); + } + +- if (NULL == (r = mc_aget(mc, +- (char*) lua_tostring(L, 1), lua_strlen(L, 1)))) { ++ s = lua_tolstring(L, 1, &s_len); ++ if (NULL == (r = mc_aget(mc, (char*) s, s_len))) { + lua_pushnil(L); + return 1; + } +@@ -254,6 +261,8 @@ + int f_memcache_get_long(lua_State *L) { + char *r; + int n = lua_gettop(L); ++ size_t s_len; ++ const char *s; + + struct memcache *mc; + +@@ -275,13 +284,13 @@ + lua_error(L); + } + +- if (NULL == (r = mc_aget(mc, +- (char*) lua_tostring(L, 1), lua_strlen(L, 1)))) { ++ s = lua_tolstring(L, 1, &s_len); ++ if (NULL == (r = mc_aget(mc, (char*) s, s_len))) { + lua_pushnil(L); + return 1; + } + +- lua_pushnumber(L, strtol(r, NULL, 10)); ++ lua_pushinteger(L, strtol(r, NULL, 10)); + + free(r); + diff --git a/package/lighttpd/Config.in b/package/lighttpd/Config.in new file mode 100644 index 0000000000..f62ccb9c05 --- /dev/null +++ b/package/lighttpd/Config.in @@ -0,0 +1,59 @@ +comment "lighttpd needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_LIGHTTPD + bool "lighttpd" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + help + lighttpd a secure, fast, compliant and very flexible web-server + which has been optimized for high-performance environments. It + has a very low memory footprint compared to other webservers and + takes care of cpu-load. Its advanced feature-set (FastCGI, CGI, + Auth, Output-Compression, URL-Rewriting and many more) make + lighttpd the perfect webserver-software for every server that + is suffering load problems. + + http://www.lighttpd.net/ + +if BR2_PACKAGE_LIGHTTPD + +config BR2_PACKAGE_LIGHTTPD_OPENSSL + bool "openssl support" + select BR2_PACKAGE_OPENSSL + help + Enable OpenSSL support for lighttpd. + +config BR2_PACKAGE_LIGHTTPD_ZLIB + bool "zlib support" + select BR2_PACKAGE_ZLIB + help + Enable zlib support for lighttpd mod_compress. + +config BR2_PACKAGE_LIGHTTPD_BZIP2 + bool "bzip2 support" + select BR2_PACKAGE_BZIP2 + help + Enable bzip2 support for lighttpd mod_compress. + +config BR2_PACKAGE_LIGHTTPD_PCRE + bool "pcre support" + select BR2_PACKAGE_PCRE + help + Enable PCRE support. Needed to support mod_rewrite + +config BR2_PACKAGE_LIGHTTPD_WEBDAV + bool "webdav support" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_SQLITE + help + Enable webdav support. Needed to support mod_webdav + +config BR2_PACKAGE_LIGHTTPD_LUA + bool "lua support" + depends on BR2_PACKAGE_LUA + help + Enable Lua support. Needed to support mod_magnet + +endif diff --git a/package/lighttpd/S50lighttpd b/package/lighttpd/S50lighttpd new file mode 100644 index 0000000000..44ac257c18 --- /dev/null +++ b/package/lighttpd/S50lighttpd @@ -0,0 +1,37 @@ +#!/bin/sh +# +# Starts lighttpd. +# + +start() { + printf "Starting lighttpd: " + start-stop-daemon -S -q -p /var/run/lighttpd.pid --exec /usr/sbin/lighttpd -- -f /etc/lighttpd/lighttpd.conf + echo "OK" +} +stop() { + printf "Stopping lighttpd: " + start-stop-daemon -K -q -p /var/run/lighttpd.pid + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/lighttpd/lighttpd.hash b/package/lighttpd/lighttpd.hash new file mode 100644 index 0000000000..7ae17f2307 --- /dev/null +++ b/package/lighttpd/lighttpd.hash @@ -0,0 +1,2 @@ +# From http://www.lighttpd.net/ +sha256 7eb9a1853c3d6dd5851682b0733a729ba4158d6bdff80974d5ef5f1f6887365b lighttpd-1.4.39.tar.xz diff --git a/package/lighttpd/lighttpd.mk b/package/lighttpd/lighttpd.mk new file mode 100644 index 0000000000..01463737f3 --- /dev/null +++ b/package/lighttpd/lighttpd.mk @@ -0,0 +1,95 @@ +################################################################################ +# +# lighttpd +# +################################################################################ + +LIGHTTPD_VERSION_MAJOR = 1.4 +LIGHTTPD_VERSION = $(LIGHTTPD_VERSION_MAJOR).39 +LIGHTTPD_SOURCE = lighttpd-$(LIGHTTPD_VERSION).tar.xz +LIGHTTPD_SITE = http://download.lighttpd.net/lighttpd/releases-$(LIGHTTPD_VERSION_MAJOR).x +LIGHTTPD_LICENSE = BSD-3c +LIGHTTPD_LICENSE_FILES = COPYING +LIGHTTPD_DEPENDENCIES = host-pkgconf +LIGHTTPD_CONF_OPTS = \ + --libdir=/usr/lib/lighttpd \ + --libexecdir=/usr/lib + +ifeq ($(BR2_PACKAGE_LIGHTTPD_OPENSSL),y) +LIGHTTPD_DEPENDENCIES += openssl +LIGHTTPD_CONF_OPTS += --with-openssl +else +LIGHTTPD_CONF_OPTS += --without-openssl +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_ZLIB),y) +LIGHTTPD_DEPENDENCIES += zlib +LIGHTTPD_CONF_OPTS += --with-zlib +else +LIGHTTPD_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_BZIP2),y) +LIGHTTPD_DEPENDENCIES += bzip2 +LIGHTTPD_CONF_OPTS += --with-bzip2 +else +LIGHTTPD_CONF_OPTS += --without-bzip2 +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_PCRE),y) +LIGHTTPD_CONF_ENV = PCRECONFIG=$(STAGING_DIR)/usr/bin/pcre-config +LIGHTTPD_DEPENDENCIES += pcre +LIGHTTPD_CONF_OPTS += --with-pcre +else +LIGHTTPD_CONF_OPTS += --without-pcre +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_WEBDAV),y) +LIGHTTPD_DEPENDENCIES += libxml2 sqlite +LIGHTTPD_CONF_OPTS += --with-webdav-props --with-webdav-locks +else +LIGHTTPD_CONF_OPTS += --without-webdav-props --without-webdav-locks +endif + +ifeq ($(BR2_PACKAGE_LIGHTTPD_LUA),y) +LIGHTTPD_DEPENDENCIES += lua +LIGHTTPD_CONF_OPTS += --with-lua +else +LIGHTTPD_CONF_OPTS += --without-lua +endif + +define LIGHTTPD_INSTALL_CONFIG + $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/lighttpd/conf.d + $(INSTALL) -d -m 0755 $(TARGET_DIR)/var/www + $(INSTALL) -D -m 0644 $(@D)/doc/config/lighttpd.conf \ + $(TARGET_DIR)/etc/lighttpd/lighttpd.conf + $(INSTALL) -D -m 0644 $(@D)/doc/config/modules.conf \ + $(TARGET_DIR)/etc/lighttpd/modules.conf + $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/access_log.conf \ + $(TARGET_DIR)/etc/lighttpd/conf.d/access_log.conf + $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/debug.conf \ + $(TARGET_DIR)/etc/lighttpd/conf.d/debug.conf + $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/dirlisting.conf \ + $(TARGET_DIR)/etc/lighttpd/conf.d/dirlisting.conf + $(INSTALL) -D -m 0644 $(@D)/doc/config/conf.d/mime.conf \ + $(TARGET_DIR)/etc/lighttpd/conf.d/mime.conf +endef + +LIGHTTPD_POST_INSTALL_TARGET_HOOKS += LIGHTTPD_INSTALL_CONFIG + +define LIGHTTPD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/lighttpd/S50lighttpd \ + $(TARGET_DIR)/etc/init.d/S50lighttpd +endef + +define LIGHTTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 $(@D)/doc/systemd/lighttpd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/lighttpd.service + + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + + ln -fs ../../../../usr/lib/systemd/system/lighttpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/lighttpd.service +endef + +$(eval $(autotools-package)) diff --git a/package/linenoise/Config.in b/package/linenoise/Config.in new file mode 100644 index 0000000000..8e4ab91da5 --- /dev/null +++ b/package/linenoise/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LINENOISE + bool "linenoise" + help + A small self-contained alternative to readline and libedit + + https://github.com/antirez/linenoise diff --git a/package/linenoise/linenoise.mk b/package/linenoise/linenoise.mk new file mode 100644 index 0000000000..64a7b7c8dc --- /dev/null +++ b/package/linenoise/linenoise.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# linenoise +# +################################################################################ + +LINENOISE_VERSION = 1.0 +LINENOISE_SITE = $(call github,antirez,linenoise,$(LINENOISE_VERSION)) +LINENOISE_LICENSE = BSD-2c +LINENOISE_LICENSE_FILES = LICENSE +LINENOISE_INSTALL_STAGING = YES +# Static library only, nothing to install on target +LINENOISE_INSTALL_TARGET = NO + +define LINENOISE_BUILD_CMDS + cd $(@D); $(TARGET_CC) $(TARGET_CFLAGS) -c linenoise.c + cd $(@D); $(TARGET_AR) rcu liblinenoise.a linenoise.o + cd $(@D); $(TARGET_CC) $(TARGET_LDFLAGS) -o linenoise_example example.c -L. -llinenoise +endef + +define LINENOISE_INSTALL_STAGING_CMDS + $(INSTALL) -m 644 -D $(@D)/linenoise.h $(STAGING_DIR)/usr/include/linenoise.h + $(INSTALL) -m 644 -D $(@D)/liblinenoise.a $(STAGING_DIR)/usr/lib/liblinenoise.a + $(INSTALL) -m 755 -D $(@D)/linenoise_example $(STAGING_DIR)/usr/bin/linenoise_example +endef + +$(eval $(generic-package)) diff --git a/package/linknx/0001-fix-static-build-with-mysql.patch b/package/linknx/0001-fix-static-build-with-mysql.patch new file mode 100644 index 0000000000..c26bef77be --- /dev/null +++ b/package/linknx/0001-fix-static-build-with-mysql.patch @@ -0,0 +1,47 @@ +Fix static build with mysql + +When building static binaries, the order of libraries in the link command line +is significant. Use $LIBS for mysql libraries, so that mysql appear after the +object files that depends on it. This fixes build failures like the following. + +/home/buildroot/build/instance-1/output/host/usr/bin/arm-linux-g++ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -static -I/home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/include/mysql -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -DUNIV_LINUX -DUNIV_LINUX -static -static -rdynamic -L/home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -lmysqlclient_r -lz -lpthread -lcrypt -lnsl -lm -lpthread -o linknx linknx.o logger.o ruleserver.o objectcontroller.o eibclient.o threads.o timermanager.o persistentstorage.o xmlserver.o smsgateway.o emailgateway.o knxconnection.o services.o suncalc.o luacondition.o ioport.o ../ticpp/libticpp.a -L/home/buildroot/build/instance-1/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -lpthsem -lm -largp +persistentstorage.o: In function `MysqlPersistentStorage::~MysqlPersistentStorage()': +persistentstorage.cpp:(.text+0x2c): undefined reference to `mysql_close' +persistentstorage.o: In function `MysqlPersistentStorage::MysqlPersistentStorage(ticpp::Element*)': +persistentstorage.cpp:(.text+0x518): undefined reference to `mysql_init' +persistentstorage.cpp:(.text+0x570): undefined reference to `mysql_options' +persistentstorage.cpp:(.text+0x5a8): undefined reference to `mysql_real_connect' +persistentstorage.cpp:(.text+0x5c0): undefined reference to `mysql_options' +persistentstorage.cpp:(.text+0x618): undefined reference to `mysql_error' +persistentstorage.cpp:(.text+0x6c0): undefined reference to `mysql_options' +persistentstorage.o: In function `MysqlPersistentStorage::write(std::string const&, std::string const&)': +persistentstorage.cpp:(.text+0xb70): undefined reference to `mysql_real_query' +persistentstorage.cpp:(.text+0xbcc): undefined reference to `mysql_error' +persistentstorage.o: In function `MysqlPersistentStorage::read(std::string const&, std::string const&)': +persistentstorage.cpp:(.text+0xd14): undefined reference to `mysql_real_query' +persistentstorage.cpp:(.text+0xd38): undefined reference to `mysql_store_result' +persistentstorage.cpp:(.text+0xd40): undefined reference to `mysql_num_rows' +persistentstorage.cpp:(.text+0xd50): undefined reference to `mysql_fetch_row' +persistentstorage.cpp:(.text+0xd68): undefined reference to `mysql_free_result' +persistentstorage.cpp:(.text+0xdc8): undefined reference to `mysql_error' +persistentstorage.o: In function `MysqlPersistentStorage::writelog(std::string const&, std::string const&)': +persistentstorage.cpp:(.text+0xf74): undefined reference to `mysql_real_query' +persistentstorage.cpp:(.text+0xfd0): undefined reference to `mysql_error' +collect2: error: ld returned 1 exit status + +Signed-off-by: Baruch Siach +--- +Patch status: sent to jef2000@users.sourceforge.net + +diff -Nuar linknx-0.0.1.32-orig/acinclude.m4 linknx-0.0.1.32/acinclude.m4 +--- linknx-0.0.1.32-orig/acinclude.m4 2011-01-09 16:47:32.000000000 +0200 ++++ linknx-0.0.1.32/acinclude.m4 2016-03-15 12:41:19.983861719 +0200 +@@ -36,7 +36,7 @@ + CFLAGS="$CFLAGS $ADDFLAGS" + CXXFLAGS="$CXXFLAGS $ADDFLAGS" + +- LDFLAGS="$LDFLAGS "`$MYSQL_CONFIG --libs_r` ++ LIBS="$LIBS "`$MYSQL_CONFIG --libs_r` + + AC_MSG_RESULT($MYSQL_CONFIG) + AC_DEFINE([HAVE_MYSQL], [1], [Build with MySQL support.]) diff --git a/package/linknx/Config.in b/package/linknx/Config.in new file mode 100644 index 0000000000..ca55c8bfb2 --- /dev/null +++ b/package/linknx/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LINKNX + bool "linknx" + select BR2_PACKAGE_LIBPTHSEM + select BR2_PACKAGE_LIBCURL # for autoreconf + select BR2_PACKAGE_ARGP_STANDALONE \ + if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # libpthsem + help + Linknx is an automation platform providing high level functionalities + to EIB/KNX installation. + + http://linknx.sourceforge.net/ + +comment "linknx needs a toolchain w/ C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/linknx/linknx.hash b/package/linknx/linknx.hash new file mode 100644 index 0000000000..d1be6d204a --- /dev/null +++ b/package/linknx/linknx.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 f161d3c8da3b8c6969e9c02d84d3cd26eb5e7fb4f3a3efbaaede8acdaaf11700 linknx-0.0.1.32.tar.gz diff --git a/package/linknx/linknx.mk b/package/linknx/linknx.mk new file mode 100644 index 0000000000..5dc8bb2d08 --- /dev/null +++ b/package/linknx/linknx.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# linknx +# +################################################################################ + +LINKNX_VERSION = 0.0.1.32 +LINKNX_SITE = http://downloads.sourceforge.net/project/linknx/linknx/linknx-$(LINKNX_VERSION) +LINKNX_LICENSE = GPLv2+ +LINKNX_INSTALL_STAGING = YES +# Patching acinclude.m4 +LINKNX_AUTORECONF = YES +LINKNX_CONF_OPTS = \ + --without-lua \ + --without-log4cpp \ + --without-pth-test \ + --with-pth=$(STAGING_DIR)/usr \ + --disable-smtp \ + --with-libcurl=$(STAGING_DIR)/usr/bin/curl-config + +LINKNX_DEPENDENCIES = libpthsem libcurl \ + $(if $(BR2_PACKAGE_ARGP_STANDALONE),argp-standalone) + +# This is needed to make autoreconf happy +define LINKNX_CREATE_MISSING_FILES + touch $(@D)/NEWS $(@D)/AUTHORS $(@D)/README +endef +LINKNX_POST_EXTRACT_HOOKS += LINKNX_CREATE_MISSING_FILES + +ifeq ($(BR2_PACKAGE_MYSQL),y) +LINKNX_CONF_OPTS += --with-mysql=$(STAGING_DIR)/usr/bin/mysql_config +LINKNX_DEPENDENCIES += mysql +else +LINKNX_CONF_OPTS += --without-mysql +endif + +$(eval $(autotools-package)) diff --git a/package/links/Config.in b/package/links/Config.in new file mode 100644 index 0000000000..713f53da4e --- /dev/null +++ b/package/links/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LINKS + bool "links" + depends on BR2_USE_MMU # fork() + help + Graphics and text mode WWW browser (kind of like lynx). + + http://links.twibright.com/ + +if BR2_PACKAGE_LINKS + +config BR2_PACKAGE_LINKS_GRAPHICS + bool "use graphics" + depends on BR2_PACKAGE_DIRECTFB || BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXT if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_LIBPNG + help + Enable graphics output for DirectFB or X11. + Otherwise links will be text-mode only. + +endif diff --git a/package/links/links.hash b/package/links/links.hash new file mode 100644 index 0000000000..2d9a7b3236 --- /dev/null +++ b/package/links/links.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 98411811ded1e8028f5aed708dd7d8ec0ae63ce24c2991a0241a989b7d09d84e links-2.12.tar.bz2 diff --git a/package/links/links.mk b/package/links/links.mk new file mode 100644 index 0000000000..ab2b583599 --- /dev/null +++ b/package/links/links.mk @@ -0,0 +1,97 @@ +################################################################################ +# +# links +# +################################################################################ + +LINKS_VERSION = 2.12 +LINKS_SOURCE = links-$(LINKS_VERSION).tar.bz2 +LINKS_SITE = http://links.twibright.com/download +LINKS_DEPENDENCIES = host-pkgconf +LINKS_LICENSE = GPLv2+ +LINKS_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LINKS_GRAPHICS),y) +LINKS_CONF_OPTS += --enable-graphics +LINKS_DEPENDENCIES += libpng +ifeq ($(BR2_PACKAGE_XLIB_LIBXT),y) +LINKS_CONF_OPTS += --with-x +LINKS_DEPENDENCIES += xlib_libXt +else +LINKS_CONF_OPTS += --without-x +endif +ifeq ($(BR2_PACKAGE_DIRECTFB),y) +LINKS_CONF_ENV = ac_cv_path_DIRECTFB_CONFIG=$(STAGING_DIR)/usr/bin/directfb-config +ifeq ($(BR2_STATIC_LIBS),y) +LINKS_CONF_ENV += LIBS=-lstdc++ +endif +LINKS_CONF_OPTS += --with-directfb +LINKS_DEPENDENCIES += directfb +else +LINKS_CONF_OPTS += --without-directfb +endif +ifeq ($(BR2_PACKAGE_JPEG),y) +LINKS_CONF_OPTS += --with-libjpeg +LINKS_DEPENDENCIES += jpeg +else +LINKS_CONF_OPTS += --without-libjpeg +endif +ifeq ($(BR2_PACKAGE_LIBRSVG),y) +LINKS_CONF_OPTS += --with-librsvg +LINKS_DEPENDENCIES += librsvg +else +LINKS_CONF_OPTS += --without-librsvg +endif +ifeq ($(BR2_PACKAGE_TIFF),y) +LINKS_CONF_OPTS += --with-libtiff +LINKS_DEPENDENCIES += tiff +else +LINKS_CONF_OPTS += --without-libtiff +endif +else +LINKS_CONF_OPTS += --disable-graphics +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +LINKS_CONF_OPTS += --with-bzip2 +LINKS_DEPENDENCIES += bzip2 +else +LINKS_CONF_OPTS += --without-bzip2 +endif + +ifeq ($(BR2_PACKAGE_GPM),y) +LINKS_CONF_OPTS += --with-gpm +LINKS_DEPENDENCIES += gpm +else +LINKS_CONF_OPTS += --without-gpm +endif + +ifeq ($(BR2_PACKAGE_LIBEVENT),y) +LINKS_CONF_OPTS += --with-libevent +LINKS_DEPENDENCIES += libevent +else +LINKS_CONF_OPTS += --without-libevent +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LINKS_CONF_OPTS += --with-ssl --enable-ssl-pkgconfig +LINKS_DEPENDENCIES += openssl +else +LINKS_CONF_OPTS += --without-ssl +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +LINKS_CONF_OPTS += --with-lzma +LINKS_DEPENDENCIES += xz +else +LINKS_CONF_OPTS += --without-lzma +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +LINKS_CONF_OPTS += --with-zlib +LINKS_DEPENDENCIES += zlib +else +LINKS_CONF_OPTS += --without-zlib +endif + +$(eval $(autotools-package)) diff --git a/package/linphone/Config.in b/package/linphone/Config.in new file mode 100644 index 0000000000..2622aa4f4c --- /dev/null +++ b/package/linphone/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_LINPHONE + bool "linphone" + select BR2_PACKAGE_LIBEXOSIP2 + select BR2_PACKAGE_SPEEX + depends on BR2_INSTALL_LIBSTDCPP # mediastreamer (bundled) + depends on BR2_TOOLCHAIN_HAS_THREADS # ortp (bundled) + depends on BR2_USE_MMU # libeXosip2 + help + Linphone is an internet phone or Voice Over IP phone (VoIP). + + With linphone you can communicate freely with people over + the internet, with voice, video, and text instant messaging. + Linphone makes use of the SIP protocol, an open standard + for internet telephony. You can use Linphone with any SIP + VoIP operator, including our free SIP audio/video service. + linphone is free-software (or open-source), you can download + and redistribute it freely. + Linphone is available for desktop computers: Linux, Windows, + MacOSX, and for mobile phones: Android, iPhone, Blackberry. + + Linphone support in Buildroot is limited to the commandline + client, linphonec, and video support is not enabled. + + http://www.linphone.org/ + +comment "linphone needs a toolchain w/ threads, C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/linphone/linphone.hash b/package/linphone/linphone.hash new file mode 100644 index 0000000000..2e202cf10e --- /dev/null +++ b/package/linphone/linphone.hash @@ -0,0 +1,6 @@ +# Locally calculated after checking pgp signature +sha256 05ba81223e9378c3bce8d33080213b9925af49bd9623cd9004eb3dd22ca9d2a0 linphone-3.6.1.tar.gz +sha256 bc4ef670c0ecc1bb60bcb79374309b555c11d154bacfa363d809a26a58780933 libav9.patch +sha256 a50a8ac2caedb389c224f81393901a029fec055ec2ec83aa18d677e1bfe7fc73 libav10.patch +sha256 e384775c12ea93d3bc35dccfe4ea875c38b74be8af63fcb82e6b7f06e93d1593 libav11.patch +sha256 3367a26f65f49f4101787b1821402127d29cde9b02d3873112a5001a549cc7d9 ffmpeg_2.9.patch diff --git a/package/linphone/linphone.mk b/package/linphone/linphone.mk new file mode 100644 index 0000000000..df804907e8 --- /dev/null +++ b/package/linphone/linphone.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# linphone +# +################################################################################ + +LINPHONE_VERSION_MAJOR = 3.6 +LINPHONE_VERSION = $(LINPHONE_VERSION_MAJOR).1 +LINPHONE_SITE = http://download-mirror.savannah.gnu.org/releases/linphone/$(LINPHONE_VERSION_MAJOR).x/sources +LINPHONE_CONF_OPTS = \ + --disable-strict --disable-video +# configure is out of sync causing deplibs linking issues +LINPHONE_AUTORECONF = YES +LINPHONE_INSTALL_STAGING = YES +LINPHONE_DEPENDENCIES = host-pkgconf libeXosip2 speex +LINPHONE_LICENSE = GPLv2+ +LINPHONE_LICENSE_FILES = COPYING +LINPHONE_PATCH = \ + https://sources.debian.net/data/main/l/linphone/3.6.1-2.5/debian/patches/libav9.patch \ + https://sources.debian.net/data/main/l/linphone/3.6.1-2.5/debian/patches/libav10.patch \ + https://sources.debian.net/data/main/l/linphone/3.6.1-2.5/debian/patches/libav11.patch \ + https://sources.debian.net/data/main/l/linphone/3.6.1-2.5/debian/patches/ffmpeg_2.9.patch + +ifeq ($(BR2_arc),y) +# toolchain __arc__ define conflicts with libosip2 source +LINPHONE_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -U__arc__" +endif + +ifeq ($(BR2_PACKAGE_LIBGTK2)$(BR2_PACKAGE_XORG7),yy) +LINPHONE_CONF_OPTS += --enable-gtk_ui +LINPHONE_DEPENDENCIES += libgtk2 +else +LINPHONE_CONF_OPTS += --disable-gtk_ui +endif + +# needed for bundled mediastreamer2 +LINPHONE_DEPENDENCIES += host-intltool host-gettext + +ifeq ($(BR2_PACKAGE_ALSA_LIB_MIXER)$(BR2_PACKAGE_ALSA_LIB_PCM),yy) +LINPHONE_CONF_OPTS += --enable-alsa +LINPHONE_DEPENDENCIES += alsa-lib +else +LINPHONE_CONF_OPTS += --disable-alsa +endif + +ifeq ($(BR2_PACKAGE_LIBV4L),y) +LINPHONE_CONF_OPTS += --enable-libv4l1 --enable-libv4l2 +LINPHONE_DEPENDENCIES += libv4l +else +LINPHONE_CONF_OPTS += --disable-libv4l1 --disable-libv4l2 +endif + +$(eval $(autotools-package)) diff --git a/package/linux-backports/Config.in b/package/linux-backports/Config.in new file mode 100644 index 0000000000..e858a45abc --- /dev/null +++ b/package/linux-backports/Config.in @@ -0,0 +1,52 @@ +comment "linux-backports needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_LINUX_BACKPORTS + bool "linux-backports" + depends on BR2_LINUX_KERNEL + help + The linux-backports package includes many Linux drivers from + recent kernels, backported to older ones. + + This version of linux-backports supports kernels starting from 3.0. + + https://backports.wiki.kernel.org + +if BR2_PACKAGE_LINUX_BACKPORTS + +choice + prompt "Linux kernel driver backports configuration" + default BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG + +config BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG + bool "Using an in-tree defconfig file" + +config BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG + bool "Using a custom (def)config file" + +endchoice + +config BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG + string "Defconfig name" + depends on BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG + help + Name of the backports defconfig file to use, without the + leading defconfig-. The defconfig is located in defconfigs/ + directory in the backports tree. + +config BR2_PACKAGE_LINUX_BACKPORTS_CUSTOM_CONFIG_FILE + string "Configuration file path" + depends on BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG + help + Path to the backports configuration file + + Note: this can be a defconfig file or a complete .config file, + which can later be saved back with make linux-update-(def)config. + +config BR2_PACKAGE_LINUX_BACKPORTS_CONFIG_FRAGMENT_FILES + string "Additional configuration fragment files" + help + A space-separated list of configuration fragment files, that + will be merged to the main linux-backports configuration file. + +endif # BR2_PACKAGE_LINUX_BACKPORTS diff --git a/package/linux-backports/linux-backports.hash b/package/linux-backports/linux-backports.hash new file mode 100644 index 0000000000..38f39b98d5 --- /dev/null +++ b/package/linux-backports/linux-backports.hash @@ -0,0 +1,2 @@ +# From: https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v4.4.2/sha256sums.asc +sha256 a979e194c2ed9fdfca092a448e626d85c5af0e4de5ad993c0967afd15af01285 backports-4.4.2-1.tar.xz diff --git a/package/linux-backports/linux-backports.mk b/package/linux-backports/linux-backports.mk new file mode 100644 index 0000000000..58cd50f2c4 --- /dev/null +++ b/package/linux-backports/linux-backports.mk @@ -0,0 +1,99 @@ +################################################################################ +# +# linux-backports +# +################################################################################ + +LINUX_BACKPORTS_VERSION_MAJOR = 4.4.2 +LINUX_BACKPORTS_VERSION = $(LINUX_BACKPORTS_VERSION_MAJOR)-1 +LINUX_BACKPORTS_SOURCE = backports-$(LINUX_BACKPORTS_VERSION).tar.xz +LINUX_BACKPORTS_SITE = $(BR2_KERNEL_MIRROR)/linux/kernel/projects/backports/stable/v$(LINUX_BACKPORTS_VERSION_MAJOR) +LINUX_BACKPORTS_LICENSE = GPLv2 +LINUX_BACKPORTS_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG),y) +LINUX_BACKPORTS_KCONFIG_FILE = $(LINUX_BACKPORTS_DIR)/defconfigs/$(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG)) +else ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG),y) +LINUX_BACKPORTS_KCONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_CUSTOM_CONFIG_FILE)) +endif + +LINUX_BACKPORTS_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_CONFIG_FRAGMENT_FILES)) +LINUX_BACKPORTS_KCONFIG_OPTS = $(LINUX_BACKPORTS_MAKE_OPTS) + +# linux-backports' build system expects the config options to be present +# in the environment, and it is so when using their custom buildsystem, +# because they are set in the main Makefile, which then calls a second +# Makefile. +# +# In our case, we do not use that first Makefile. So, we parse the +# .config file, filter-out comment lines and put the rest as command +# line variables. +# +# LINUX_BACKPORTS_MAKE_OPTS is used by the kconfig-package infra, while +# LINUX_BACKPORTS_MODULE_MAKE_OPTS is used by the kernel-module infra. +# +LINUX_BACKPORTS_MAKE_OPTS = \ + BACKPORT_DIR=$(@D) \ + KLIB_BUILD=$(LINUX_DIR) \ + KLIB=$(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED) \ + INSTALL_MOD_DIR=backports \ + `sed -r -e '/^\#/d;' $(@D)/.config` + +LINUX_BACKPORTS_MODULE_MAKE_OPTS = $(LINUX_BACKPORTS_MAKE_OPTS) + +# This file is not automatically generated by 'oldconfig' that we use in +# the kconfig-package infrastructure. In the linux buildsystem, it is +# generated by running silentoldconfig, but that's not the case for +# linux-backports: it uses a hand-crafted rule to generate that file. +define LINUX_BACKPORTS_KCONFIG_FIXUP_CMDS + $(MAKE) -C $(@D) $(LINUX_BACKPORTS_MAKE_OPTS) backport-include/backport/autoconf.h +endef + +# Checks to give errors that the user can understand +ifeq ($(BR_BUILDING),y) + +ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_DEFCONFIG),y) +ifeq ($(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG)),) +$(error No linux-backports defconfig name specified, check your BR2_PACKAGE_LINUX_BACKPORTS_DEFCONFIG setting) +endif +endif + +ifeq ($(BR2_PACKAGE_LINUX_BACKPORTS_USE_CUSTOM_CONFIG),y) +ifeq ($(call qstrip,$(BR2_PACKAGE_LINUX_BACKPORTS_CUSTOM_CONFIG_FILE)),) +$(error No linux-backports configuration file specified, check your BR2_PACKAGE_LINUX_BACKPORTS_CUSTOM_CONFIG_FILE setting) +endif +endif + +endif # BR_BUILDING + +$(eval $(kernel-module)) +$(eval $(kconfig-package)) + +# linux-backports' own .config file needs options from the kernel's own +# .config file. The dependencies handling in the infrastructure does not +# allow to express this kind of dependencies. Besides, linux.mk might +# not have been parsed yet, so the Linux build dir LINUX_DIR is not yet +# known. Thus, we use a "secondary expansion" so the rule is re-evaluated +# after all Makefiles are parsed, and thus at that time we will have the +# LINUX_DIR variable set to the proper value. +# +# Furthermore, we want to check the kernel version, since linux-backports +# only supports kernels >= 3.0. To avoid overriding linux-backports' +# .config rule defined in the kconfig-package infra, we use an +# intermediate stamp-file. +# +# Finally, it must also come after the call to kconfig-package, so we get +# LINUX_BACKPORTS_DIR properly defined (because the target part of the +# rule is not re-evaluated). +# +$(LINUX_BACKPORTS_DIR)/.config: $(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version + +.SECONDEXPANSION: +$(LINUX_BACKPORTS_DIR)/.stamp_check_kernel_version: $$(LINUX_DIR)/.config + $(Q)LINUX_VERSION_PROBED=$(LINUX_VERSION_PROBED); \ + if [ $${LINUX_VERSION_PROBED%%.*} -lt 3 ]; then \ + printf "Linux version '%s' is too old for linux-backports (needs 3.0 or later)\n" \ + "$${LINUX_VERSION_PROBED}"; \ + exit 1; \ + fi + $(Q)touch $(@) diff --git a/package/linux-firmware/Config.in b/package/linux-firmware/Config.in new file mode 100644 index 0000000000..f56f31df67 --- /dev/null +++ b/package/linux-firmware/Config.in @@ -0,0 +1,289 @@ +config BR2_PACKAGE_LINUX_FIRMWARE + bool "linux-firmware" + help + This package provides various binary firmware files (closed + binary blobs) for such devices like LAN, WLAN cards etc. + + https://git.kernel.org/?p=linux/kernel/git/firmware/linux-firmware.git + +if BR2_PACKAGE_LINUX_FIRMWARE + +menu "Audio firmware" + +config BR2_PACKAGE_LINUX_FIRMWARE_INTEL_SST_DSP + bool "Intel SST DSP" + help + Firmware files for Intel Baytrail SST DSP audio. + +endmenu # Audio + +menu "Video firmware" + +config BR2_PACKAGE_LINUX_FIRMWARE_RADEON + bool "AMD Radeon video card firmware" + help + Firmware files for AMD Radeon video cards. + +endmenu # Video + +menu "WiFi firmware" + +config BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_6002 + bool "Atheros 6002" + help + Firmware files for the Atheros AR6002 chip + +config BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_6003 + bool "Atheros 6003" + help + Firmware files for the Atheros AR6003 chip + +config BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_6004 + bool "Atheros 6004" + help + Firmware files for the Atheros AR6004 chip + +config BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010 + bool "Atheros 7010" + help + Firmware files for the Atheros 7010 module + +config BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170 + bool "Atheros 9170" + help + Firmware files for the Atheros 9170 module + +config BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271 + bool "Atheros 9271" + help + Firmware files for the Atheros 9271 module + +config BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX + bool "Broadcom BRCM bcm43xx" + help + Firmware files for the Broadcom bcm43xx SoftMAC and FullMAC. + +config BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX + bool "Broadcom BRCM bcm43xxx" + help + Firmware files for the Broadcom bcm43xxx, SoftMAC and FullMAC. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160 + bool "Intel iwlwifi 3160" + help + Firmware files for the Intel Wifi 3160 devices supported by + the iwlwifi kernel driver. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3168 + bool "Intel iwlwifi 3168" + help + Firmware files for the Intel Wifi 3168 devices supported by + the iwlwifi kernel driver. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_5000 + bool "Intel iwlwifi 5000" + help + Firmware files for the Intel Wifi 5000 devices supported by + the iwlwifi kernel driver. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_6000G2A + bool "Intel iwlwifi 6000G2A" + help + Firmware files for the Intel Wifi 6000G2A devices supported by + the iwlwifi kernel driver. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_6000G2B + bool "Intel iwlwifi 6000G2B" + help + Firmware files for the Intel Wifi 6000G2B devices supported by + the iwlwifi kernel driver. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7260 + bool "Intel iwlwifi 7260" + help + Firmware files for the Intel Wifi 7260 devices supported by + the iwlwifi kernel driver. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7265 + bool "Intel iwlwifi 7265" + help + Firmware files for the Intel Wifi 7265 devices supported by + the iwlwifi kernel driver. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7265D + bool "Intel iwlwifi 7265D" + # needed for old kernel versions, where the non-D and D + # firmwares were the same + select BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7265 + help + Firmware files for the Intel Wifi 7265D devices supported by + the iwlwifi kernel driver. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8000C + bool "Intel iwlwifi 8000C" + help + Firmware files for the Intel Wifi 8000C devices supported by + the iwlwifi kernel driver. + +config BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8265 + bool "Intel iwlwifi 8265" + help + Firmware files for the Intel Wifi 8265 devices supported by + the iwlwifi kernel driver. + +config BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8686_V8 + bool "Libertas SD 8686 v8" + help + Firmware files (version 8) for the Marvell SD8686 module + +config BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8686_V9 + bool "Libertas SD 8686 v9" + help + Firmware files (version 9) for the Marvell SD8686 module + +config BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8688 + bool "Libertas SD 8688" + help + Firmware files for the Marvell SD8688 module + +config BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8787 + bool "Marvell Wifi-Ex 8787 SDIO" + help + Firmware files for the Marvell Wifi-Ex 8787 module on SDIO. + +config BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8797 + bool "Marvell Wifi-Ex 8797 SDIO" + help + Firmware files for the Marvell Wifi-Ex 8797 module on SDIO. + +config BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8797 + bool "Marvell Wifi-Ex 8797 USB" + help + Firmware files for the Marvell Wifi-Ex 8797 module on USB. + +config BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8887 + bool "Marvell Wifi-Ex 8887 SDIO" + help + Firmware files for the Marvell Wifi-Ex 8887 module on SDIO. + +config BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8897 + bool "Marvell Wifi-Ex 8897 SDIO" + help + Firmware files for the Marvell Wifi-Ex 8897 module on SDIO. + +config BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8897 + bool "Marvell Wifi-Ex 8897 USB" + help + Firmware files for the Marvell Wifi-Ex 8897 module on USB. + +config BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_PCIE8897 + bool "Marvell Wifi-Ex 8897 PCI-E" + help + Firmware files for the Marvell Wifi-Ex 8897 module on PCI-E. + +config BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U + bool "MediaTek MT7601U" + help + MediaTek MT7601U + +config BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61 + bool "Ralink rt2501/rt61" + help + Ralink rt2501/rt61 + +config BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73 + bool "Ralink rt73" + help + Ralink rt73 + +config BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX + bool "Ralink rt27xx/rt28xx/rt30xx" + help + Ralink rt27xx/rt28xx/rt30xx + +config BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX + bool "Realtek 81xx" + help + Realtek 8188/8192 + +config BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX + bool "Realtek 87xx" + help + Realtek 8712/8723/8723be + +config BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX + bool "Realtek 88xx" + help + Realtek rtl8821ae + +config BR2_PACKAGE_LINUX_FIRMWARE_TI_WL127X + bool "TI wl127x" + help + Firmware files for WLAN and Bluetooth modules wl1271 and wl1273 + +config BR2_PACKAGE_LINUX_FIRMWARE_TI_WL128X + bool "TI wl128x" + help + Firmware files for WLAN and Bluetooth modules wl128x + +config BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX + bool "TI wl18xx" + help + Firmware files for WLAN and Bluetooth modules wl18xx + +endmenu + +menu "Ethernet firmware" + +config BR2_PACKAGE_LINUX_FIRMWARE_BNX2X + bool "Broadcom NetXtremeII" + help + Firmware files for Broadcom NetXtreme 10Gb ethernet cards (bnx2x) + +config BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4 + bool "Chelsio T4" + help + Firmware files for Chelsio T4 1Gb and 10Gb ethernet cards (cxgb4) + +config BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T5 + bool "Chelsio T5" + help + Firmware files for Chelsio T5 1Gb and 10Gb ethernet cards (cxgb4) + +config BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169 + bool "Realtek 8169" + help + Firmware files for Realtek 8169 gigabit ethernet cards + +endmenu + +menu "DVB firmware" + +config BR2_PACKAGE_LINUX_FIRMWARE_AS102 + bool "Abilis Systems as102" + help + Firmware file for Abilis Systems single DVB-T receiver as102 + +config BR2_PACKAGE_LINUX_FIRMWARE_DIB0700 + bool "DiBcom dib0700" + help + Firmware file for dib0700-based USB DVB tuner driver + +config BR2_PACKAGE_LINUX_FIRMWARE_ITETECH_IT9135 + bool "ITEtech it9135" + help + Firmware files for ITEtech it9135 (Ax and Bx) DVB-T USB tuner + +config BR2_PACKAGE_LINUX_FIRMWARE_H5_DRXK + bool "Terratec H5 DRX-K" + help + Firmware file for Terratec H5 DRX-K based DVB tuner driver + +config BR2_PACKAGE_LINUX_FIRMWARE_XCx000 + bool "Xceive/Cresta xc4000/xc5000/xc500c" + help + Firmware file for xc4000/xc5000/xc5000c based DVB tuner driver + +endmenu + +endif diff --git a/package/linux-firmware/linux-firmware.mk b/package/linux-firmware/linux-firmware.mk new file mode 100644 index 0000000000..140184870b --- /dev/null +++ b/package/linux-firmware/linux-firmware.mk @@ -0,0 +1,424 @@ +################################################################################ +# +# linux-firmware +# +################################################################################ + +LINUX_FIRMWARE_VERSION = b0668886def608d352cd0263a7ef04e64e25574a +LINUX_FIRMWARE_SITE = http://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git +LINUX_FIRMWARE_SITE_METHOD = git + +# Intel SST DSP +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_INTEL_SST_DSP),y) +LINUX_FIRMWARE_FILES += intel/fw_sst_0f28.bin-48kHz_i2s_master +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.fw_sst_0f28 +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_RADEON),y) +LINUX_FIRMWARE_DIRS += radeon +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENSE.radeon +endif + +# rt2501/rt61 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT61),y) +LINUX_FIRMWARE_FILES += rt2561.bin rt2561s.bin rt2661.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ralink-firmware.txt +endif + +# rt73 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73),y) +LINUX_FIRMWARE_FILES += rt73.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ralink-firmware.txt +endif + +# rt2xx +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX),y) +# rt3090.bin is a symlink to rt2860.bin +# rt3070.bin is a symlink to rt2870.bin +LINUX_FIRMWARE_FILES += rt2860.bin rt2870.bin rt3070.bin rt3071.bin rt3090.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ralink-firmware.txt +endif + +# rtl81xx +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX),y) +LINUX_FIRMWARE_FILES += \ + rtlwifi/rtl8192cfw.bin rtlwifi/rtl8192cfwU.bin \ + rtlwifi/rtl8192cfwU_B.bin rtlwifi/rtl8192cufw.bin \ + rtlwifi/rtl8192defw.bin rtlwifi/rtl8192sefw.bin \ + rtlwifi/rtl8188efw.bin rtlwifi/rtl8188eufw.bin \ + rtlwifi/rtl8192cufw_A.bin \ + rtlwifi/rtl8192cufw_B.bin rtlwifi/rtl8192cufw_TMSC.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.rtlwifi_firmware.txt +endif + +# rtl87xx +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_RTL_87XX),y) +LINUX_FIRMWARE_FILES += \ + rtlwifi/rtl8712u.bin rtlwifi/rtl8723fw.bin \ + rtlwifi/rtl8723fw_B.bin rtlwifi/rtl8723befw.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.rtlwifi_firmware.txt +endif + +# rtl88xx +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_RTL_88XX),y) +LINUX_FIRMWARE_FILES += \ + rtlwifi/rtl8821aefw.bin \ + rtlwifi/rtl8821aefw_wowlan.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.rtlwifi_firmware.txt +endif + +# ar6002 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_6002),y) +LINUX_FIRMWARE_FILES += ath6k/AR6002 +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.atheros_firmware +endif + +# ar6003 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_6003),y) +LINUX_FIRMWARE_FILES += ath6k/AR6003 +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.atheros_firmware +endif + +# ar6004 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_6004),y) +LINUX_FIRMWARE_FILES += ath6k/AR6004 +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.atheros_firmware +endif + +# ar7010 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010),y) +LINUX_FIRMWARE_FILES += ar7010.fw ar7010_1_1.fw htc_7010.fw ath9k_htc/htc_7010-1.4.0.fw +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.atheros_firmware +endif + +# ar9170 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9170),y) +LINUX_FIRMWARE_FILES += ar9170-1.fw ar9170-2.fw +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.atheros_firmware +endif + +# ar9271 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271),y) +LINUX_FIRMWARE_FILES += ar9271.fw htc_9271.fw ath9k_htc/htc_9271-1.4.0.fw +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.atheros_firmware +endif + +# sd8686 v8 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8686_V8),y) +LINUX_FIRMWARE_FILES += libertas/sd8686_v8.bin libertas/sd8686_v8_helper.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.Marvell +endif + +# sd8686 v9 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8686_V9),y) +LINUX_FIRMWARE_FILES += libertas/sd8686_v9.bin libertas/sd8686_v9_helper.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.Marvell +endif + +# sd8688 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_LIBERTAS_SD8688),y) +LINUX_FIRMWARE_FILES += libertas/sd8688.bin libertas/sd8688_helper.bin +# The two files above are but symlinks to those two ones: +LINUX_FIRMWARE_FILES += mrvl/sd8688.bin mrvl/sd8688_helper.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.Marvell +endif + +# sd8787 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8787),y) +LINUX_FIRMWARE_FILES += mrvl/sd8787_uapsta.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.Marvell +endif + +# sd8797 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8797),y) +LINUX_FIRMWARE_FILES += mrvl/sd8797_uapsta.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.Marvell +endif + +# usb8797 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8797),y) +LINUX_FIRMWARE_FILES += mrvl/usb8797_uapsta.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.Marvell +endif + +# sd8887 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8887),y) +LINUX_FIRMWARE_FILES += mrvl/sd8887_uapsta.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.Marvell +endif + +# sd8897 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_SD8897),y) +LINUX_FIRMWARE_FILES += mrvl/sd8897_uapsta.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.Marvell +endif + +# usb8897 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_USB8897),y) +LINUX_FIRMWARE_FILES += mrvl/usb8897_uapsta.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.Marvell +endif + +# pcie8897 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MWIFIEX_PCIE8897),y) +LINUX_FIRMWARE_FILES += mrvl/pcie8897_uapsta.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.Marvell +endif + +# MT7601 +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_MEDIATEK_MT7601U),y) +LINUX_FIRMWARE_FILES += mt7601u.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ralink_a_mediatek_company_firmware +endif + +# wl127x +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_TI_WL127X),y) +# wl1271-nvs.bin is a symlink to wl127x-nvs.bin +LINUX_FIRMWARE_FILES += \ + ti-connectivity/wl1271-fw-2.bin \ + ti-connectivity/wl1271-fw-ap.bin \ + ti-connectivity/wl1271-fw.bin \ + ti-connectivity/wl1271-nvs.bin \ + ti-connectivity/wl127x-fw-3.bin \ + ti-connectivity/wl127x-fw-plt-3.bin \ + ti-connectivity/wl127x-nvs.bin \ + ti-connectivity/wl127x-fw-4-mr.bin \ + ti-connectivity/wl127x-fw-4-plt.bin \ + ti-connectivity/wl127x-fw-4-sr.bin \ + ti-connectivity/wl127x-fw-5-mr.bin \ + ti-connectivity/wl127x-fw-5-plt.bin \ + ti-connectivity/wl127x-fw-5-sr.bin \ + ti-connectivity/TIInit_7.2.31.bts +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ti-connectivity +endif + +# wl128x +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_TI_WL128X),y) +# wl1271-nvs.bin and wl12xx-nvs.bin are symlinks to wl127x-nvs.bin +LINUX_FIRMWARE_FILES += \ + ti-connectivity/wl128x-fw-3.bin \ + ti-connectivity/wl128x-fw-ap.bin \ + ti-connectivity/wl128x-fw-plt-3.bin \ + ti-connectivity/wl128x-fw.bin \ + ti-connectivity/wl1271-nvs.bin \ + ti-connectivity/wl128x-nvs.bin \ + ti-connectivity/wl12xx-nvs.bin \ + ti-connectivity/wl127x-nvs.bin \ + ti-connectivity/wl128x-fw-4-mr.bin \ + ti-connectivity/wl128x-fw-4-plt.bin \ + ti-connectivity/wl128x-fw-4-sr.bin \ + ti-connectivity/wl128x-fw-5-mr.bin \ + ti-connectivity/wl128x-fw-5-plt.bin \ + ti-connectivity/wl128x-fw-5-sr.bin \ + ti-connectivity/TIInit_7.2.31.bts +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ti-connectivity +endif + +# wl18xx +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_TI_WL18XX),y) +# wl1271-nvs.bin is a symlink to wl127x-nvs.bin +LINUX_FIRMWARE_FILES += \ + ti-connectivity/wl18xx-fw.bin \ + ti-connectivity/wl18xx-fw-2.bin \ + ti-connectivity/wl18xx-fw-3.bin \ + ti-connectivity/wl18xx-fw-4.bin \ + ti-connectivity/wl1271-nvs.bin \ + ti-connectivity/wl127x-nvs.bin \ + ti-connectivity/TIInit_7.2.31.bts +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.ti-connectivity +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3160),y) +LINUX_FIRMWARE_FILES += iwlwifi-3160-*.ucode +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_3168),y) +LINUX_FIRMWARE_FILES += iwlwifi-3168-*.ucode +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware +endif + +# iwlwifi 5000. Multiple files are available (iwlwifi-5000-1.ucode, +# iwlwifi-5000-2.ucode, iwlwifi-5000-5.ucode), corresponding to +# different versions of the firmware API. For now, we only install the +# most recent one. +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_5000),y) +LINUX_FIRMWARE_FILES += iwlwifi-5000-5.ucode +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_6000G2A),y) +LINUX_FIRMWARE_FILES += iwlwifi-6000g2a-6.ucode +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_6000G2B),y) +LINUX_FIRMWARE_FILES += iwlwifi-6000g2b-6.ucode +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7260),y) +LINUX_FIRMWARE_FILES += iwlwifi-7260-*.ucode +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7265),y) +LINUX_FIRMWARE_FILES += iwlwifi-7265-*.ucode +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_7265D),y) +LINUX_FIRMWARE_FILES += iwlwifi-7265D-*.ucode +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8000C),y) +LINUX_FIRMWARE_FILES += iwlwifi-8000C-*.ucode +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_IWLWIFI_8265),y) +LINUX_FIRMWARE_FILES += iwlwifi-8265-*.ucode +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.iwlwifi_firmware +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_BNX2X),y) +LINUX_FIRMWARE_FILES += \ + bnx2x/bnx2x-e1-7.10.51.0.fw \ + bnx2x/bnx2x-e1h-7.10.51.0.fw \ + bnx2x/bnx2x-e2-7.10.51.0.fw +# No license file; the license is in the file WHENCE +# which is installed unconditionally +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T4),y) +# cxgb4/t4fw.bin is a symlink to cxgb4/t4fw-1.14.4.0.bin +LINUX_FIRMWARE_FILES += cxgb4/t4fw-1.14.4.0.bin cxgb4/t4fw.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.chelsio_firmware +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_CXGB4_T5),y) +# cxgb4/t5fw.bin is a symlink to cxgb4/t5fw-1.14.4.0.bin +LINUX_FIRMWARE_FILES += cxgb4/t5fw-1.14.4.0.bin cxgb4/t5fw.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.chelsio_firmware +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_RTL_8169),y) +LINUX_FIRMWARE_FILES += \ + rtl_nic/rtl8168d-1.fw \ + rtl_nic/rtl8168d-2.fw \ + rtl_nic/rtl8168e-1.fw \ + rtl_nic/rtl8168e-2.fw \ + rtl_nic/rtl8168e-3.fw \ + rtl_nic/rtl8168f-1.fw \ + rtl_nic/rtl8168f-2.fw \ + rtl_nic/rtl8105e-1.fw \ + rtl_nic/rtl8402-1.fw \ + rtl_nic/rtl8411-1.fw \ + rtl_nic/rtl8411-2.fw \ + rtl_nic/rtl8106e-1.fw \ + rtl_nic/rtl8106e-2.fw \ + rtl_nic/rtl8168g-2.fw \ + rtl_nic/rtl8168g-3.fw +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_XCx000),y) +LINUX_FIRMWARE_FILES += \ + dvb-fe-xc4000-1.4.1.fw \ + dvb-fe-xc5000-1.6.114.fw \ + dvb-fe-xc5000c-4.1.30.7.fw +LINUX_FIRMWARE_ALL_LICENSE_FILES += \ + LICENCE.xc4000 \ + LICENCE.xc5000 \ + LICENCE.xc5000c +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_AS102),y) +LINUX_FIRMWARE_FILES += as102_data1_st.hex as102_data2_st.hex +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.Abilis +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_DIB0700),y) +LINUX_FIRMWARE_FILES += dvb-usb-dib0700-1.20.fw +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENSE.dib0700 +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_ITETECH_IT9135),y) +LINUX_FIRMWARE_FILES += dvb-usb-it9135-01.fw dvb-usb-it9135-02.fw +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.it913x +endif + +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_H5_DRXK),y) +LINUX_FIRMWARE_FILES += dvb-usb-terratec-h5-drxk.fw +# No license file; the license is in the file WHENCE +# which is installed unconditionally +endif + +# brcm43xx +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XX),y) +LINUX_FIRMWARE_FILES += \ + brcm/bcm43xx-0.fw brcm/bcm43xx_hdr-0.fw \ + brcm/bcm4329-fullmac-4.bin brcm/brcmfmac4329-sdio.bin \ + brcm/brcmfmac4330-sdio.bin brcm/brcmfmac4334-sdio.bin \ + brcm/brcmfmac4335-sdio.bin brcm/brcmfmac4339-sdio.bin \ + brcm/brcmfmac4350-pcie.bin brcm/brcmfmac4354-sdio.bin \ + brcm/brcmfmac4356-pcie.bin brcm/brcmfmac4371-pcie.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.broadcom_bcm43xx +endif + +# brcm43xxx +ifeq ($(BR2_PACKAGE_LINUX_FIRMWARE_BRCM_BCM43XXX),y) +LINUX_FIRMWARE_FILES += \ + brcm/brcmfmac43143.bin brcm/brcmfmac43143-sdio.bin \ + brcm/brcmfmac43236b.bin brcm/brcmfmac43241b0-sdio.bin \ + brcm/brcmfmac43241b4-sdio.bin brcm/brcmfmac43241b5-sdio.bin \ + brcm/brcmfmac43242a.bin brcm/brcmfmac43340-sdio.bin \ + brcm/brcmfmac43362-sdio.bin brcm/brcmfmac43455-sdio.bin \ + brcm/brcmfmac43569.bin brcm/brcmfmac43570-pcie.bin \ + brcm/brcmfmac43602-pcie.ap.bin brcm/brcmfmac43602-pcie.bin +LINUX_FIRMWARE_ALL_LICENSE_FILES += LICENCE.broadcom_bcm43xx +endif + +ifneq ($(LINUX_FIRMWARE_FILES),) +define LINUX_FIRMWARE_INSTALL_FILES + cd $(@D) ; \ + $(TAR) c $(sort $(LINUX_FIRMWARE_FILES)) | \ + $(TAR) x -C $(TARGET_DIR)/lib/firmware +endef +endif + +ifneq ($(LINUX_FIRMWARE_DIRS),) +# We need to rm-rf the destination directory to avoid copying +# into it in itself, should we re-install the package. +define LINUX_FIRMWARE_INSTALL_DIRS + $(foreach d,$(LINUX_FIRMWARE_DIRS), \ + rm -rf $(TARGET_DIR)/lib/firmware/$(d); \ + cp -a $(@D)/$(d) $(TARGET_DIR)/lib/firmware/$(d)$(sep)) +endef +endif + +ifneq ($(LINUX_FIRMWARE_FILES)$(LINUX_FIRMWARE_DIRS),) + +# Most firmware files are under a proprietary license, so no need to +# repeat it for every selections above. Those firmwares that have more +# lax licensing terms may still add them on a per-case basis. +LINUX_FIRMWARE_LICENSE += Proprietary + +# This file contains some licensing information about all the firmware +# files found in the linux-firmware package, so we always add it, even +# for firmwares that have their own licensing terms. +LINUX_FIRMWARE_ALL_LICENSE_FILES += WHENCE + +# Some license files may be listed more than once, so we have to remove +# duplicates +LINUX_FIRMWARE_LICENSE_FILES = $(sort $(LINUX_FIRMWARE_ALL_LICENSE_FILES)) + +endif + +define LINUX_FIRMWARE_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/lib/firmware + $(LINUX_FIRMWARE_INSTALL_FILES) + $(LINUX_FIRMWARE_INSTALL_DIRS) +endef + +$(eval $(generic-package)) diff --git a/package/linux-fusion/0001-fix-for-linux-4-and-above.patch b/package/linux-fusion/0001-fix-for-linux-4-and-above.patch new file mode 100644 index 0000000000..689d9bf107 --- /dev/null +++ b/package/linux-fusion/0001-fix-for-linux-4-and-above.patch @@ -0,0 +1,25 @@ +Fix build for linux >= 4.x + +Instead of relying on testing for '3' as the linux kernel major verison, +check that it is 2.x to include the proper Makefile, otherwise forcibly +include the .26 Makefile, that is good for 3.x and 4.x too. + +Signed-off-by: "Yann E. MORIN" + +diff -durN linux-fusion-9.0.2.orig/Makefile linux-fusion-9.0.2/Makefile +--- linux-fusion-9.0.2.orig/Makefile 2013-07-15 11:58:03.000000000 +0200 ++++ linux-fusion-9.0.2/Makefile 2015-06-06 19:03:04.059842652 +0200 +@@ -62,10 +62,10 @@ + CPPFLAGS += -DHAVE_LINUX_CONFIG_H + endif + +-ifeq ($(K_VERSION),3) +- KMAKEFILE = Makefile-2.6 +-else ++ifeq ($(K_VERSION),2) + KMAKEFILE = Makefile-2.$(K_PATCHLEVEL) ++else ++ KMAKEFILE = Makefile-2.6 + endif + + check-version = $(shell expr \( $(K_VERSION) \* 65536 + $(K_PATCHLEVEL) \* 256 + $(K_SUBLEVEL) \) \>= \( $(1) \* 65536 + $(2) \* 256 + $(3) \)) diff --git a/package/linux-fusion/0002-Fix-mismatched-conversion-spec-and-value-in-printk.patch b/package/linux-fusion/0002-Fix-mismatched-conversion-spec-and-value-in-printk.patch new file mode 100644 index 0000000000..a3f8bb7812 --- /dev/null +++ b/package/linux-fusion/0002-Fix-mismatched-conversion-spec-and-value-in-printk.patch @@ -0,0 +1,29 @@ +From debb9cafe9b7cc2b286399ecc8e3210480061c70 Mon Sep 17 00:00:00 2001 +From: Marc Gonzalez +Date: Mon, 11 Jan 2016 15:42:16 +0100 +Subject: [PATCH] Fix mismatched conversion spec and value in printk + +linux/drivers/char/fusion/fusiondev.c:775:38: warning: +format '%ld' expects argument of type 'long int', but argument 7 has type 'int' + +Subtracting two pointers yields a ptrdiff_t value, and ptrdiff_t is not +necessarily an alias for long int. Cast the value to long int. + +Signed-off-by: Marc Gonzalez +--- + linux/drivers/char/fusion/fusiondev.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/linux/drivers/char/fusion/fusiondev.c b/linux/drivers/char/fusion/fusiondev.c +index 7003407f7e1e..dfb5f8ecb81a 100644 +--- a/linux/drivers/char/fusion/fusiondev.c ++++ b/linux/drivers/char/fusion/fusiondev.c +@@ -775,7 +775,7 @@ call_ioctl(FusionDev * dev, Fusionee * fusionee, + printk( KERN_ERR "fusion: FUSION_CALL_EXECUTE3 with errorneous call (failed on previous ioctl call), " + "call id %d, flags 0x%08x, arg %d, length %u, serial %u, %ld\n", + execute3.call_id, execute3.flags, execute3.call_arg, execute3.length, execute3.ret_length, +- (execute3_bin - (FusionCallExecute3 *) arg) ); ++ (long int)(execute3_bin - (FusionCallExecute3 *) arg) ); + return -EIO; + } + diff --git a/package/linux-fusion/0003-Fix-fusion-Unknown-symbol-tasklist_lock-err-0.patch b/package/linux-fusion/0003-Fix-fusion-Unknown-symbol-tasklist_lock-err-0.patch new file mode 100644 index 0000000000..b14ec9d90a --- /dev/null +++ b/package/linux-fusion/0003-Fix-fusion-Unknown-symbol-tasklist_lock-err-0.patch @@ -0,0 +1,38 @@ +From 9fcd5003c0363af140a06aba94e62c9e1ea0381e Mon Sep 17 00:00:00 2001 +From: Marc Gonzalez +Date: Mon, 11 Jan 2016 16:45:30 +0100 +Subject: [PATCH] Fix fusion: Unknown symbol tasklist_lock (err 0) + +Commit 28f6569ab7d0 renamed TREE_PREEMPT_RCU to PREEMPT_RCU in 3.19 +As a result, the code incorrectly falls back to using tasklist_lock +(which was made private in 2.6.18) + +Always use rcu_read_lock on modern kernels. + +Signed-off-by: Marc Gonzalez +--- + linux/drivers/char/fusion/fusionee.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/linux/drivers/char/fusion/fusionee.c b/linux/drivers/char/fusion/fusionee.c +index ef067f5bc831..70cd0a665f98 100644 +--- a/linux/drivers/char/fusion/fusionee.c ++++ b/linux/drivers/char/fusion/fusionee.c +@@ -925,7 +925,7 @@ fusionee_kill(FusionDev * dev, + if (f != fusionee && (!target || target == f->id)) { + struct task_struct *p; + +-#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) || defined(CONFIG_TINY_RCU) || defined(rcu_read_lock) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + rcu_read_lock(); + #else + read_lock(&tasklist_lock); +@@ -946,7 +946,7 @@ fusionee_kill(FusionDev * dev, + } + } + +-#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) || defined(CONFIG_TINY_RCU) || defined(rcu_read_unlock) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + rcu_read_unlock(); + #else + read_unlock(&tasklist_lock); diff --git a/package/linux-fusion/0004-Port-one-one_udp.c-to-Linux-4.1.patch b/package/linux-fusion/0004-Port-one-one_udp.c-to-Linux-4.1.patch new file mode 100644 index 0000000000..e1bff64f3b --- /dev/null +++ b/package/linux-fusion/0004-Port-one-one_udp.c-to-Linux-4.1.patch @@ -0,0 +1,99 @@ +From be288b60278c78eccfd347aacf4d3dd8771215a9 Mon Sep 17 00:00:00 2001 +From: Marc Gonzalez +Date: Tue, 12 Jan 2016 14:01:42 +0100 +Subject: [PATCH] Port one/one_udp.c to Linux 4.1 + +Kernel commit c0371da6047a replaced msg_iov and msg_iovlen with msg_iter +in struct msghdr since 3.19 + +one/one_udp.c: In function 'ksocket_send_iov': +one/one_udp.c:186:9: error: 'struct msghdr' has no member named 'msg_iov' +one/one_udp.c:187:9: error: 'struct msghdr' has no member named 'msg_iovlen' + +one/one_udp.c: In function 'ksocket_receive': +one/one_udp.c:221:9: error: 'struct msghdr' has no member named 'msg_iov' +one/one_udp.c:222:9: error: 'struct msghdr' has no member named 'msg_iovlen' + +The iov_iter interface +https://lwn.net/Articles/625077/ + +Kernel commit d8725c86aeba dropped the len parameter in sock_sendmsg +since 4.1 + +one/one_udp.c: In function 'ksocket_send_iov': +one/one_udp.c:192:13: error: too many arguments to function 'sock_sendmsg' + +Signed-off-by: Marc Gonzalez +--- + one/one_udp.c | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) + +diff --git a/one/one_udp.c b/one/one_udp.c +index 26b9e6a1f729..b1daae164cdf 100644 +--- a/one/one_udp.c ++++ b/one/one_udp.c +@@ -161,7 +161,7 @@ ksocket_send_iov( struct socket *sock, + const struct iovec *iov, + size_t iov_count ) + { +- struct msghdr msg; ++ struct msghdr msg = { addr, sizeof *addr }; + mm_segment_t oldfs; + int size = 0; + size_t len = 0; +@@ -178,18 +178,20 @@ ksocket_send_iov( struct socket *sock, + for (i=0; i +Signed-off-by: Brendan Heading + +Upstream-status: inappropriate + +diff -urN a/doc/Makefile.am b/doc/Makefile.am +--- a/doc/Makefile.am 2012-08-15 06:08:43.000000000 -0500 ++++ b/doc/Makefile.am 2013-07-17 09:54:53.000000000 -0500 +@@ -2,8 +2,6 @@ + # Copyright (c) 2005, 2006 Thorsten Kukuk + # + +-SUBDIRS = man specs sag adg mwg +- + CLEANFILES = *~ + + dist_html_DATA = index.html +@@ -11,11 +9,4 @@ + ####################################################### + + releasedocs: all +- $(mkinstalldirs) $(top_builddir)/Linux-PAM-$(VERSION)/doc/specs +- cp -av specs/draft-morgan-pam-current.txt \ +- $(top_builddir)/Linux-PAM-$(VERSION)/doc/specs/ +- cp -av $(srcdir)/specs/rfc86.0.txt \ +- $(top_builddir)/Linux-PAM-$(VERSION)/doc/specs/ +- make -C sag releasedocs +- make -C adg releasedocs +- make -C mwg releasedocs ++ /bin/true diff --git a/package/linux-pam/0002-Conditionally-compile-per-ruserok-availability.patch b/package/linux-pam/0002-Conditionally-compile-per-ruserok-availability.patch new file mode 100644 index 0000000000..cec642d845 --- /dev/null +++ b/package/linux-pam/0002-Conditionally-compile-per-ruserok-availability.patch @@ -0,0 +1,49 @@ +ruserok is not available/functional in uclibc, provide conditions +for compilation where needed. + +Patch originally by Dmitry Golubovsky - +porting to linux-pam 1.2.1. + +Signed-off-by: Brendan Heading + +Upstream-status: pending + +--- + configure.ac | 2 +- + modules/pam_rhosts/pam_rhosts.c | 6 +++++- + 2 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 08e4530..fd2fd23 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -542,7 +542,7 @@ AC_CHECK_FUNCS(fseeko getdomainname gethostname gettimeofday lckpwdf mkdir selec + AC_CHECK_FUNCS(strcspn strdup strspn strstr strtol uname) + AC_CHECK_FUNCS(getutent_r getpwnam_r getpwuid_r getgrnam_r getgrgid_r getspnam_r) + AC_CHECK_FUNCS(getgrouplist getline getdelim) +-AC_CHECK_FUNCS(inet_ntop inet_pton innetgr ruserok_af) ++AC_CHECK_FUNCS(inet_ntop inet_pton innetgr ruserok_af ruserok) + + AC_CHECK_FUNCS(unshare, [UNSHARE=yes], [UNSHARE=no]) + AM_CONDITIONAL([HAVE_UNSHARE], [test "$UNSHARE" = yes]) +diff --git a/modules/pam_rhosts/pam_rhosts.c b/modules/pam_rhosts/pam_rhosts.c +index bc9e76f..909db29 100644 +--- a/modules/pam_rhosts/pam_rhosts.c ++++ b/modules/pam_rhosts/pam_rhosts.c +@@ -114,8 +114,12 @@ int pam_sm_authenticate (pam_handle_t *pamh, int flags, int argc, + #ifdef HAVE_RUSEROK_AF + retval = ruserok_af (rhost, as_root, ruser, luser, PF_UNSPEC); + #else ++ #ifdef HAVE_RUSEROK + retval = ruserok (rhost, as_root, ruser, luser); +-#endif ++ #else ++ retval = -1; ++ #endif /* HAVE_RUSEROK */ ++#endif /*HAVE_RUSEROK_AF */ + if (retval != 0) { + if (!opt_silent || opt_debug) + pam_syslog(pamh, LOG_WARNING, "denied access to %s@%s as %s", +-- +2.4.3 + diff --git a/package/linux-pam/0003-Conditionally-compile-per-innetgr-availability.patch b/package/linux-pam/0003-Conditionally-compile-per-innetgr-availability.patch new file mode 100644 index 0000000000..4b516fa986 --- /dev/null +++ b/package/linux-pam/0003-Conditionally-compile-per-innetgr-availability.patch @@ -0,0 +1,84 @@ +innetgr is not available/functional in uclibc, provide conditions for +compilation. + +Patch originally by Dmitry Golubovsky - porting +to linux-pam 1.2.1. + +Signed-off-by: Brendan Heading + +Upstream-status: pending + +--- + modules/pam_group/pam_group.c | 8 +++++++- + modules/pam_succeed_if/pam_succeed_if.c | 4 ++++ + modules/pam_time/pam_time.c | 8 +++++++- + 3 files changed, 18 insertions(+), 2 deletions(-) + +diff --git a/modules/pam_group/pam_group.c b/modules/pam_group/pam_group.c +index be5f20f..0982de8 100644 +--- a/modules/pam_group/pam_group.c ++++ b/modules/pam_group/pam_group.c +@@ -655,8 +655,14 @@ static int check_account(pam_handle_t *pamh, const char *service, + continue; + } + /* If buffer starts with @, we are using netgroups */ +- if (buffer[0] == '@') ++ if (buffer[0] == '@') { ++#ifdef HAVE_INNETGR + good &= innetgr (&buffer[1], NULL, user, NULL); ++#else ++ good = 0; ++ pam_syslog (pamh, LOG_ERR, "pam_group does not have netgroup support"); ++#endif /* HAVE_INNETGR */ ++ } + /* otherwise, if the buffer starts with %, it's a UNIX group */ + else if (buffer[0] == '%') + good &= pam_modutil_user_in_group_nam_nam(pamh, user, &buffer[1]); +diff --git a/modules/pam_succeed_if/pam_succeed_if.c b/modules/pam_succeed_if/pam_succeed_if.c +index aa828fc..c09d669 100644 +--- a/modules/pam_succeed_if/pam_succeed_if.c ++++ b/modules/pam_succeed_if/pam_succeed_if.c +@@ -233,16 +233,20 @@ evaluate_notingroup(pam_handle_t *pamh, const char *user, const char *group) + static int + evaluate_innetgr(const char *host, const char *user, const char *group) + { ++#ifdef HAVE_INNETGR + if (innetgr(group, host, user, NULL) == 1) + return PAM_SUCCESS; ++#endif /* HAVE_INNETGR */ + return PAM_AUTH_ERR; + } + /* Return PAM_SUCCESS if the (host,user) is NOT in the netgroup. */ + static int + evaluate_notinnetgr(const char *host, const char *user, const char *group) + { ++#ifdef HAVE_INNETGR + if (innetgr(group, host, user, NULL) == 0) + return PAM_SUCCESS; ++#endif /* HAVE_INNETGR */ + return PAM_AUTH_ERR; + } + +diff --git a/modules/pam_time/pam_time.c b/modules/pam_time/pam_time.c +index c94737c..4898fd2 100644 +--- a/modules/pam_time/pam_time.c ++++ b/modules/pam_time/pam_time.c +@@ -554,8 +554,14 @@ check_account(pam_handle_t *pamh, const char *service, + continue; + } + /* If buffer starts with @, we are using netgroups */ +- if (buffer[0] == '@') ++ if (buffer[0] == '@') { ++#ifdef HAVE_INNETGR + good &= innetgr (&buffer[1], NULL, user, NULL); ++#else ++ good = 0; ++ pam_syslog (pamh, LOG_ERR, "pam_time does not have netgroup support"); ++#endif /* HAVE_INNETGR */ ++ } + else + good &= logic_field(pamh, user, buffer, count, is_same); + D(("with user: %s", good ? "passes":"fails" )); +-- +2.4.3 + diff --git a/package/linux-pam/Config.in b/package/linux-pam/Config.in new file mode 100644 index 0000000000..f5088b967f --- /dev/null +++ b/package/linux-pam/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_LINUX_PAM + bool "linux-pam" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_FLEX + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) + # While linux-pam does have some support for statically linked + # modules (through --enable-static-modules), it doesn't work + # properly due to a build cycle between libpam and + # modules. See + # https://lists.fedorahosted.org/pipermail/linux-pam-commits/2012-February/000105.html + # for details. + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + help + A Security Framework that Provides Authentication for Applications + + http://linux-pam.org + +comment "linux-pam needs a uClibc or (e)glibc toolchain w/ wchar, locale, dynamic library" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL diff --git a/package/linux-pam/linux-pam.hash b/package/linux-pam/linux-pam.hash new file mode 100644 index 0000000000..a6a26d1997 --- /dev/null +++ b/package/linux-pam/linux-pam.hash @@ -0,0 +1,2 @@ +# Locally computed hashes, not provided by upstream +sha256 342b1211c0d3b203a7df2540a5b03a428a087bd8a48c17e49ae268f992b334d9 Linux-PAM-1.2.1.tar.bz2 diff --git a/package/linux-pam/linux-pam.mk b/package/linux-pam/linux-pam.mk new file mode 100644 index 0000000000..2b94412ff6 --- /dev/null +++ b/package/linux-pam/linux-pam.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# linux-pam +# +################################################################################ + +LINUX_PAM_VERSION = 1.2.1 +LINUX_PAM_SOURCE = Linux-PAM-$(LINUX_PAM_VERSION).tar.bz2 +LINUX_PAM_SITE = http://linux-pam.org/library +LINUX_PAM_INSTALL_STAGING = YES +LINUX_PAM_CONF_OPTS = \ + --disable-prelude \ + --disable-isadir \ + --disable-nis \ + --disable-db \ + --disable-regenerate-docu \ + --enable-securedir=/lib/security \ + --libdir=/lib +LINUX_PAM_DEPENDENCIES = flex host-flex host-pkgconf +LINUX_PAM_AUTORECONF = YES +LINUX_PAM_LICENSE = BSD-3c +LINUX_PAM_LICENSE_FILES = Copyright + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +LINUX_PAM_DEPENDENCIES += gettext +LINUX_PAM_MAKE_OPTS += LIBS=-lintl +endif + +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +LINUX_PAM_CONF_OPTS += --enable-selinux +LINUX_PAM_DEPENDENCIES += libselinux +else +LINUX_PAM_CONF_OPTS += --disable-selinux +endif + +ifeq ($(BR2_PACKAGE_AUDIT),y) +LINUX_PAM_CONF_OPTS += --enable-audit +LINUX_PAM_DEPENDENCIES += audit +else +LINUX_PAM_CONF_OPTS += --disable-audit +endif + +# Install default pam config (deny everything except login) +define LINUX_PAM_INSTALL_CONFIG + $(INSTALL) -m 0644 -D package/linux-pam/login.pam \ + $(TARGET_DIR)/etc/pam.d/login + $(INSTALL) -m 0644 -D package/linux-pam/other.pam \ + $(TARGET_DIR)/etc/pam.d/other +endef + +LINUX_PAM_POST_INSTALL_TARGET_HOOKS += LINUX_PAM_INSTALL_CONFIG + +$(eval $(autotools-package)) diff --git a/package/linux-pam/login.pam b/package/linux-pam/login.pam new file mode 100644 index 0000000000..01f56324da --- /dev/null +++ b/package/linux-pam/login.pam @@ -0,0 +1,10 @@ +auth required pam_unix.so nullok + +account required pam_unix.so + +password required pam_unix.so nullok + +session required pam_limits.so +session required pam_env.so +session required pam_unix.so +session optional pam_lastlog.so diff --git a/package/linux-pam/other.pam b/package/linux-pam/other.pam new file mode 100644 index 0000000000..a198aa2acb --- /dev/null +++ b/package/linux-pam/other.pam @@ -0,0 +1,7 @@ +auth required pam_deny.so + +account required pam_deny.so + +password required pam_deny.so + +session required pam_deny.so diff --git a/package/linux-zigbee/0001-test-serial-Remove-test-serial.patch b/package/linux-zigbee/0001-test-serial-Remove-test-serial.patch new file mode 100644 index 0000000000..8cd9d754c0 --- /dev/null +++ b/package/linux-zigbee/0001-test-serial-Remove-test-serial.patch @@ -0,0 +1,54 @@ +From 98187a5238939edc889fdaad93b00628b55d1e08 Mon Sep 17 00:00:00 2001 +From: Maxime Hadjinlian +Date: Sat, 3 May 2014 19:43:20 +0200 +Subject: [PATCH] test-serial: Remove test-serial + +This folders only contains python tests scripts which would force us to +enable a dependency to host-python which seems kind of silly since +theses are only tests scripts. + +Signed-off-by: Maxime Hadjinlian +--- + Makefile.am | 2 +- + configure.ac | 6 ------ + 2 files changed, 1 insertion(+), 7 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 265f0d7..e7bb1a1 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2,7 +2,7 @@ include $(top_srcdir)/Makefile.common + + ACLOCAL_AMFLAGS = -I m4 + +-SUBDIRS = lib addrdb src tests test-serial ++SUBDIRS = lib addrdb src tests + + include_HEADERS = include/ieee802154.h include/nl802154.h + noinst_HEADERS = include/libcommon.h include/addrdb.h include/logging.h +diff --git a/configure.ac b/configure.ac +index 17658af..506b289 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -77,11 +77,6 @@ AC_PROG_LIBTOOL + AM_PROG_LEX + AC_PROG_YACC + AC_SUBST(LIBTOOL_DEPS) +-# Currently the scripts works with python2.x only +-# Check for this at first +-AC_PATH_PROG(PYTHON, python2 python2.7 python2.6 python2.5 python) +-AM_PATH_PYTHON(,, [:]) +-py_CHECK_MAJOR_VERSION([PYTHON_VERSION], [2]) + AM_MISSING_PROG(HELP2MAN, help2man, $missing_dir) + + # Checks for libraries. +@@ -135,6 +130,5 @@ AC_CONFIG_FILES([ + addrdb/Makefile + src/Makefile + tests/Makefile +- test-serial/Makefile + ]) + AC_OUTPUT +-- +1.9.2 + diff --git a/package/linux-zigbee/Config.in b/package/linux-zigbee/Config.in new file mode 100644 index 0000000000..fc21faa441 --- /dev/null +++ b/package/linux-zigbee/Config.in @@ -0,0 +1,56 @@ +comment "linux-zigbee needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + +config BR2_PACKAGE_LINUX_ZIGBEE + bool "linux-zigbee" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + select BR2_PACKAGE_LIBNL + help + IEEE 802.15.4 is a standard for communication in small + low-rate wireless personal area networks (WPAN). While + 802.15.4 is a MAC- and PHY- layer standard only, several + common protocols commonly sit on top of it such as ZigBee, + MiWi, and 6LoWPAN. The goal of this project is to create an + implementation of 802.15.4 and several of the protocols + which run on top of it (primarily 6LoWPAN) for Linux. + + It's worth noting that the name linux-zigbee is somewhat of + a misnomer. While this project was originally started to + create a ZigBee implementation for Linux, licensing + restrictions put in place by the ZigBee Alliance make it + impossible for an implementation of ZigBee to ever become + part of the Linux kernel. Once this licensing issue was + discovered, this project's primary focus shifted to IEEE + 802.15.4 and 6LoWPAN. Other higher-layer standards may be + added at a future time. + + The 802.15.4 stack contains kernel components, which are + part of the mainline Linux kernel, and userspace components, + available in this package. + + http://sourceforge.net/apps/trac/linux-zigbee/ + +if BR2_PACKAGE_LINUX_ZIGBEE + +config BR2_PACKAGE_LINUX_ZIGBEE_TESTS + bool "tests programs" + help + Enable this option to install the Linux-ZigBee test programs + to the target. + + +config BR2_PACKAGE_LINUX_ZIGBEE_OLD_KERNEL_COMPAT + bool "compatibility with older kernels" + help + Enable this option to get compatibility of the Linux-ZigBee + userspace tools with old kernels. Recent kernels know the + 802.15.4 line discipline as N_IEEE802154 with the value 25, + but some older kernels had it with the values 22 or 19. + +config BR2_PACKAGE_LINUX_ZIGBEE_LEASEFILE + string "path for persistent lease storage" + default "/var/run/izcoordinator.leases" + +endif diff --git a/package/linux-zigbee/linux-zigbee.mk b/package/linux-zigbee/linux-zigbee.mk new file mode 100644 index 0000000000..1f4197f063 --- /dev/null +++ b/package/linux-zigbee/linux-zigbee.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# linux-zigbee +# +################################################################################ + +LINUX_ZIGBEE_VERSION = v0.3.1 +LINUX_ZIGBEE_SITE = git://linux-zigbee.git.sourceforge.net/gitroot/linux-zigbee/linux-zigbee +LINUX_ZIGBEE_LICENSE = GPLv2 +LINUX_ZIGBEE_LICENSE_FILES = COPYING +LINUX_ZIGBEE_DEPENDENCIES = libnl host-pkgconf host-flex host-bison + +# We patch configure.ac/Makefile.am +LINUX_ZIGBEE_AUTORECONF = YES + +LINUX_ZIGBEE_CONF_OPTS = \ + --disable-manpages \ + --with-leasefile="$(call qstrip,$(BR2_PACKAGE_LINUX_ZIGBEE_LEASEFILE))" + +ifeq ($(BR2_PACKAGE_LINUX_ZIGBEE_TESTS),y) +LINUX_ZIGBEE_CONF_OPTS += --with-zbtestdir='/usr/sbin/' +else +LINUX_ZIGBEE_CONF_OPTS += --with-zbtestdir='' +endif + +ifeq ($(BR2_PACKAGE_LINUX_ZIGBEE_OLD_KERNEL_COMPAT),y) +LINUX_ZIGBEE_CONF_OPTS += --enable-kernel-compat +endif + +$(eval $(autotools-package)) diff --git a/package/liquid-dsp/0001-configure.ac-use-AC_CONFIG_MACRO_DIR.patch b/package/liquid-dsp/0001-configure.ac-use-AC_CONFIG_MACRO_DIR.patch new file mode 100644 index 0000000000..c51f587813 --- /dev/null +++ b/package/liquid-dsp/0001-configure.ac-use-AC_CONFIG_MACRO_DIR.patch @@ -0,0 +1,45 @@ +From c9d239490d47d5dd3d7d7b8b7d9007171c5f60ce Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 11 Oct 2015 15:27:09 +0200 +Subject: [PATCH] configure.ac: use AC_CONFIG_MACRO_DIR + +Instead of having to explicitly pass -I./scripts when running aclocal, +use the AC_CONFIG_MACRO_DIR() macro in configure.ac. This allows to +use "autoreconf" normally, without any hacks. + +Submitted upstream at https://github.com/jgaeddert/liquid-dsp/pull/15. + +Signed-off-by: Thomas Petazzoni +--- + bootstrap.sh | 2 +- + configure.ac | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/bootstrap.sh b/bootstrap.sh +index 640e01d..eb4894e 100755 +--- a/bootstrap.sh ++++ b/bootstrap.sh +@@ -27,7 +27,7 @@ + # + + rm -f config.cache aclocal.m4 +-aclocal -I./scripts ++aclocal + autoconf + autoheader + #automake --foreign --add-missing +diff --git a/configure.ac b/configure.ac +index a9ad1d7..3b1ba68 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -25,6 +25,7 @@ + + AC_INIT([liquid-dsp],[1.2.0],[support@liquidsdr.org]) + AC_CONFIG_SRCDIR([src/libliquid.c]) ++AC_CONFIG_MACRO_DIR([scripts]) + + # permit auxiliary scripts directory (e.g. config.sub, config.guess, install-sh) + AC_CONFIG_AUX_DIR(scripts/) +-- +2.6.1 + diff --git a/package/liquid-dsp/0002-math-poly-wrapping-isnan-in-T_ABS-to-help-compilatio.patch b/package/liquid-dsp/0002-math-poly-wrapping-isnan-in-T_ABS-to-help-compilatio.patch new file mode 100644 index 0000000000..f8dd602ba3 --- /dev/null +++ b/package/liquid-dsp/0002-math-poly-wrapping-isnan-in-T_ABS-to-help-compilatio.patch @@ -0,0 +1,39 @@ +From 3055eb3da9d0a202c1a975f7db0c8370a09a30bc Mon Sep 17 00:00:00 2001 +From: "Joseph D. Gaeddert" +Date: Thu, 25 Feb 2016 17:47:07 -0500 +Subject: [PATCH] math/poly: wrapping isnan in T_ABS to help compilation w/ + certain gcc versions + +This is an upstreamed patch backported from here: + +https://github.com/jgaeddert/liquid-dsp/commit/3055eb3da9d0a202c1a975f7db0c8370a09a30bc + +It fixes the following error: + +src/math/src/poly.findroots.c: In function +'polyc_findroots_bairstow_recursion': +src/math/src/poly.findroots.c:305:9: error: non-floating-point argument +in call to function '__builtin_isnan' + if (isnan(du) || isnan(dv)) { + +Signed-off-by: Vicente Olivert Riera +--- + src/math/src/poly.findroots.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/math/src/poly.findroots.c b/src/math/src/poly.findroots.c +index 21b5756..e000ee8 100644 +--- a/src/math/src/poly.findroots.c ++++ b/src/math/src/poly.findroots.c +@@ -302,7 +302,7 @@ void POLY(_findroots_bairstow_recursion)(T * _p, + #endif + + // adjust u, v +- if (isnan(du) || isnan(dv)) { ++ if (isnan(T_ABS(du)) || isnan(T_ABS(dv))) { + u *= 0.5f; + v *= 0.5f; + } else { +-- +2.7.3 + diff --git a/package/liquid-dsp/Config.in b/package/liquid-dsp/Config.in new file mode 100644 index 0000000000..a2cd21cf05 --- /dev/null +++ b/package/liquid-dsp/Config.in @@ -0,0 +1,25 @@ +comment "liquid-dsp requires a (e)glibc/musl toolchain w/ dynamic library" + depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) || BR2_STATIC_LIBS + +config BR2_PACKAGE_LIQUID_DSP + bool "liquid-dsp" + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL + depends on !BR2_STATIC_LIBS + help + Liquid-DSP is a free and open-source signal processing + library for software-defined radios written in C. Its + purpose is to provide a set of extensible DSP modules that + do no rely on external dependencies or cumbersome + frameworks. + + http://liquidsdr.org/ + +if BR2_PACKAGE_LIQUID_DSP + +config BR2_PACKAGE_LIQUID_DSP_FAST + bool "optimize for speed over accuracy" + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH + help + Optimize for speed over accuracy. + +endif diff --git a/package/liquid-dsp/liquid-dsp.hash b/package/liquid-dsp/liquid-dsp.hash new file mode 100644 index 0000000000..5c1c0a8c27 --- /dev/null +++ b/package/liquid-dsp/liquid-dsp.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 4b6dcb0846ed884c55984494adef721f910ac6f895174b31ec52138263842637 liquid-dsp-df5a459fa05dba4199c1299555891104cc1fdca7.tar.gz diff --git a/package/liquid-dsp/liquid-dsp.mk b/package/liquid-dsp/liquid-dsp.mk new file mode 100644 index 0000000000..e7bb686327 --- /dev/null +++ b/package/liquid-dsp/liquid-dsp.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# liquid-dsp +# +################################################################################ + +LIQUID_DSP_VERSION = df5a459fa05dba4199c1299555891104cc1fdca7 +LIQUID_DSP_SITE = $(call github,jgaeddert,liquid-dsp,$(LIQUID_DSP_VERSION)) +LIQUID_DSP_LICENSE = MIT +LIQUID_DSP_LICENSE_FILES = LICENSE +LIQUID_DSP_INSTALL_STAGING = YES +LIQUID_DSP_AUTORECONF = YES + +LIQUID_DSP_CONF_ENV = \ + ax_cv_have_mmx_ext=$(if $(BR2_X86_CPU_HAS_MMX),yes,no) \ + ax_cv_have_sse_ext=$(if $(BR2_X86_CPU_HAS_SSE),yes,no) \ + ax_cv_have_sse2_ext=$(if $(BR2_X86_CPU_HAS_SSE2),yes,no) \ + ax_cv_have_sse3_ext=$(if $(BR2_X86_CPU_HAS_SSE3),yes,no) \ + ax_cv_have_ssse3_ext=$(if $(BR2_X86_CPU_HAS_SSSE3),yes,no) \ + ax_cv_have_sse41_ext=$(if $(BR2_X86_CPU_HAS_SSE4),yes,no) \ + ax_cv_have_sse42_ext=$(if $(BR2_X86_CPU_HAS_SSE42),yes,no) \ + ax_cv_have_avx_ext=$(if $(BR2_X86_CPU_HAS_AVX),yes,no) + +LIQUID_DSP_CFLAGS = $(TARGET_CFLAGS) +LIQUID_DSP_LDFLAGS = $(TARGET_LDFLAGS) + +# Speed over accuracy trade off +ifeq ($(BR2_PACKAGE_LIQUID_DSP_FAST),y) +LIQUID_DSP_CFLAGS += -ffast-math +endif + +# use FFTW instead of built-in FFT +ifeq ($(BR2_PACKAGE_FFTW_PRECISION_SINGLE),y) +LIQUID_DSP_LDFLAGS += -lfftw3f +endif + +# disable altivec, it has build issues +ifeq ($(BR2_powerpc)$(BR2_powerpc64),y) +LIQUID_DSP_CONF_OPTS += --enable-simdoverride +endif + +ifeq ($(BR2_PACKAGE_FFTW_PRECISION_DOUBLE),y) +LIQUID_DSP_LDFLAGS += -lfftw3 +endif + +ifeq ($(BR2_PACKAGE_FFTW_PRECISION_LONG_DOUBLE),y) +LIQUID_DSP_LDFLAGS += -lfftw3l +endif + +LIQUID_DSP_CONF_OPTS += \ + CFLAGS="$(LIQUID_DSP_CFLAGS)" \ + LDFLAGS="$(LIQUID_DSP_LDFLAGS)" + +$(eval $(autotools-package)) diff --git a/package/lirc-tools/0001-lib-use-proper-linking-method-to-avoid-parallel-buil.patch b/package/lirc-tools/0001-lib-use-proper-linking-method-to-avoid-parallel-buil.patch new file mode 100644 index 0000000000..5863128551 --- /dev/null +++ b/package/lirc-tools/0001-lib-use-proper-linking-method-to-avoid-parallel-buil.patch @@ -0,0 +1,46 @@ +From f2fc8c48e5e55a91b309225f377b6cb3783fc6f6 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 25 May 2016 15:21:57 +0200 +Subject: [PATCH] lib: use proper linking method to avoid parallel build issue + +Using _LDFLAGS = -l is correct when is an +external library. However, when it is built by the same package, and +especially in the same directory, this is wrong and can cause parallel +build issues. In lib/Makefile.am, there was: + +libirrecord_la_LDFLAGS = -llirc + +But the liblirc library is built in the same directory. Or, due to the +using of _LDFLAGS, make is not aware of the build dependency +between libirrecord and liblirc. + +To solve this, _LIBADD should be used instead, as follows: + +libirrecord_la_LIBADD = liblirc.la + +This fixes parallel build issues seen by automated build tests +conducted by the Buildroot project, such as: + + http://autobuild.buildroot.org/results/eb4/eb47d57de8182d25b1dacbf0ac3726ed20063d04/build-end.log + +Signed-off-by: Thomas Petazzoni +--- + lib/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/Makefile.am b/lib/Makefile.am +index ce5c94c..8780f88 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -29,7 +29,7 @@ liblirc_la_SOURCES = config_file.c \ + transmit.c \ + util.c + +-libirrecord_la_LDFLAGS = -llirc ++libirrecord_la_LIBADD = liblirc.la + libirrecord_la_SOURCES = irrecord.c + + liblirc_client_la_LDFLAGS = -version-info 4:0:4 +-- +2.7.4 + diff --git a/package/lirc-tools/0002-tools-make_rel_symlink.py-can-also-use-python2.patch b/package/lirc-tools/0002-tools-make_rel_symlink.py-can-also-use-python2.patch new file mode 100644 index 0000000000..070aab941c --- /dev/null +++ b/package/lirc-tools/0002-tools-make_rel_symlink.py-can-also-use-python2.patch @@ -0,0 +1,28 @@ +From c861eae83bae3116d330efb3c6061e2de4fdcbce Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Sun, 5 Apr 2015 22:26:12 +0300 +Subject: [PATCH] tools: make_rel_symlink.py can also use python2 + +The make_rel_symlink.py script is compatible with both python2 and python3. +Don't hard code a requirement for python3. + +Patch status: sent upstream + +Signed-off-by: Baruch Siach +--- + tools/make_rel_symlink.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/make_rel_symlink.py b/tools/make_rel_symlink.py +index 896637ff93e0..ff0403a0397a 100755 +--- a/tools/make_rel_symlink.py ++++ b/tools/make_rel_symlink.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python3 ++#!/usr/bin/env python + + import os + import os.path +-- +2.1.4 + diff --git a/package/lirc-tools/Config.in b/package/lirc-tools/Config.in new file mode 100644 index 0000000000..3dd202f284 --- /dev/null +++ b/package/lirc-tools/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_LIRC_TOOLS + bool "lirc-tools" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_TOOLCHAIN_USES_MUSL # GLOB_BRACE + # dlopen() + depends on !BR2_STATIC_LIBS + help + LIRC is a package that supports receiving and sending IR + signals of the most common IR remote controls. It contains a + daemon that decodes and sends IR signals, a mouse daemon + that translates IR signals to mouse movements and a couple + of user programs that allow to control your computer with a + remote control. + + It requires the kernel LIRC interface driver, make sure to + enable the kernel drivers to support your hardware. + + http://www.lirc.org/ + +comment "lirc-tools needs a uClibc or (e)glibc toolchain w/ threads, dynamic library, C++" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \ + || !BR2_INSTALL_LIBSTDCPP || BR2_TOOLCHAIN_USES_MUSL diff --git a/package/lirc-tools/S25lircd b/package/lirc-tools/S25lircd new file mode 100755 index 0000000000..7a0ec2f627 --- /dev/null +++ b/package/lirc-tools/S25lircd @@ -0,0 +1,38 @@ +#!/bin/sh +# +# Start lirc +# +# Support for remotes - Add remotes to /etc/lirc/lircd.conf.d/ +# + +start() { + printf "Starting lirc: " + mkdir -p /var/run/lirc + ln -sf /var/run/lirc/lircd /dev/lircd + start-stop-daemon -b -S -q -m -p /var/run/lirc.pid --exec /usr/sbin/lircd -- -n -O /etc/lirc/lirc_options.conf + echo "OK" +} + +stop() { + printf "Stopping lirc: " + start-stop-daemon -K -q -p /var/run/lirc.pid + echo "OK" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/lirc-tools/lirc-tools.hash b/package/lirc-tools/lirc-tools.hash new file mode 100644 index 0000000000..1acd93d164 --- /dev/null +++ b/package/lirc-tools/lirc-tools.hash @@ -0,0 +1,2 @@ +#hash from http://sourceforge.net/projects/lirc/files/LIRC/0.9.3a/ +sha1 a6cadb916e09de068c967055b48c96d79d38f736 lirc-0.9.3a.tar.bz2 diff --git a/package/lirc-tools/lirc-tools.mk b/package/lirc-tools/lirc-tools.mk new file mode 100644 index 0000000000..289b9ed231 --- /dev/null +++ b/package/lirc-tools/lirc-tools.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# lirc-tools +# +################################################################################ + +LIRC_TOOLS_VERSION = 0.9.3a +LIRC_TOOLS_SOURCE = lirc-$(LIRC_TOOLS_VERSION).tar.bz2 +LIRC_TOOLS_SITE = http://downloads.sourceforge.net/project/lirc/LIRC/$(LIRC_TOOLS_VERSION) +LIRC_TOOLS_LICENSE = GPLv2+ +LIRC_TOOLS_LICENSE_FILES = COPYING +LIRC_TOOLS_DEPENDENCIES = host-libxslt host-pkgconf host-python3 +LIRC_TOOLS_INSTALL_STAGING = YES +# 0001-lib-use-proper-linking-method-to-avoid-parallel-buil.patch +LIRC_TOOLS_AUTORECONF = YES + +LIRC_TOOLS_CONF_ENV = XSLTPROC=yes +LIRC_TOOLS_CONF_OPTS = --without-x + +define LIRC_TOOLS_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/lirc-tools/S25lircd \ + $(TARGET_DIR)/etc/init.d/S25lircd +endef + +$(eval $(autotools-package)) diff --git a/package/lite/0001-dfbspy-stat.patch b/package/lite/0001-dfbspy-stat.patch new file mode 100644 index 0000000000..5ca73691ed --- /dev/null +++ b/package/lite/0001-dfbspy-stat.patch @@ -0,0 +1,53 @@ +From upstream git (git://git.directfb.org/git/directfb/libs/LiTE.git) + +From ffe0ce78327a63ddb1265328ea9b5b03acdca019 Mon Sep 17 00:00:00 2001 +From: Denis Oliver Kropp +Date: Fri, 1 Apr 2011 20:20:26 +0200 +Subject: [PATCH] dfbspy: Build fix for dfbspy example. + +--- + examples/dfbspy.c | 20 ++++++++++---------- + 1 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/examples/dfbspy.c b/examples/dfbspy.c +index 5f36f0b..c7f9725 100644 +--- a/examples/dfbspy.c ++++ b/examples/dfbspy.c +@@ -89,9 +89,9 @@ read_stat( FusionStat *stat, int world ) + + /**************************************************************************************************/ + +-#define CALC(x) stat.x = (int)(((s.x - last_stat.x) * 1000 / (float) diff) + 0.5f) ++#define CALC(x) stats.x = (int)(((s.x - last_stat.x) * 1000 / (float) diff) + 0.5f) + +-static FusionStat last_stat, stat; ++static FusionStat last_stat, stats; + static long long last_millis; + + static int +@@ -145,14 +145,14 @@ static const struct { + void (*update)( LiteLabel *label, void *ctx ); + void *ctx; + } list[] = { +- { "lease/purchase", update_number, &stat.lease_purchase }, +- { "cede", update_number, &stat.cede }, +- { "attach", update_number, &stat.attach }, +- { "detach", update_number, &stat.detach }, +- { "ref up", update_number, &stat.ref_up }, +- { "ref down", update_number, &stat.ref_down }, +- { "prevail/swoop", update_number, &stat.prevail_swoop }, +- { "dismiss", update_number, &stat.dismiss } ++ { "lease/purchase", update_number, &stats.lease_purchase }, ++ { "cede", update_number, &stats.cede }, ++ { "attach", update_number, &stats.attach }, ++ { "detach", update_number, &stats.detach }, ++ { "ref up", update_number, &stats.ref_up }, ++ { "ref down", update_number, &stats.ref_down }, ++ { "prevail/swoop", update_number, &stats.prevail_swoop }, ++ { "dismiss", update_number, &stats.dismiss } + }; + + #define NUM_LIST (sizeof(list)/sizeof(list[0])) +-- +1.7.6.3 + diff --git a/package/lite/0002-no-tests.patch b/package/lite/0002-no-tests.patch new file mode 100644 index 0000000000..3a47186512 --- /dev/null +++ b/package/lite/0002-no-tests.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in.orig 2008-07-07 13:07:12.000000000 +0200 ++++ b/Makefile.in 2008-07-07 13:07:05.000000000 +0200 +@@ -202,7 +202,7 @@ + target_vendor = @target_vendor@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = data fonts lite leck examples tests ++SUBDIRS = data fonts lite leck examples + EXTRA_DIST = TODO lite.pc.in leck.pc.in + pkgconfigdir = $(libdir)/pkgconfig + pkgconfig_DATA = lite.pc leck.pc diff --git a/package/lite/0003-pkg-config.patch b/package/lite/0003-pkg-config.patch new file mode 100644 index 0000000000..cdd24162c7 --- /dev/null +++ b/package/lite/0003-pkg-config.patch @@ -0,0 +1,22 @@ +From 7982cccbb6ad58f3802bb266467290200d130a48 Mon Sep 17 00:00:00 2001 +From: Ville Syrjala +Date: Sat, 27 Nov 2010 01:14:25 +0200 +Subject: [PATCH] Too many '\' characters in the .pc file + +--- + lite.pc.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/lite.pc.in b/lite.pc.in +index 48eb969..3a21eaa 100644 +--- a/lite.pc.in ++++ b/lite.pc.in +@@ -9,4 +9,4 @@ Description: "LiTE" is a Toolkit Engine + Requires: directfb >= @DFB_REQUIRED_VERSION@ + Version: @VERSION@ + Libs: -L${libdir} -llite +-Cflags: -I${includedir} -DLITEFONTDIR=\\\"@LITEFONTDIR@\\\" ++Cflags: -I${includedir} -DLITEFONTDIR=\"@LITEFONTDIR@\" +-- +1.7.1 + diff --git a/package/lite/Config.in b/package/lite/Config.in new file mode 100644 index 0000000000..62cd21e53d --- /dev/null +++ b/package/lite/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LITE + bool "LiTE (toolbox engine)" + depends on BR2_PACKAGE_DIRECTFB + help + LiTE stands for LiTE is a Toolbox Engine. + Its role is to facilitate the functions of DirectFB so that a + toolbox could be written on top of DirectFB with less effort. + As such LiTE has abstractions for the underlying graphics and + event systems. + + See http://www.directfb.org/wiki/index.php/LiTE:Architecture diff --git a/package/lite/lite.hash b/package/lite/lite.hash new file mode 100644 index 0000000000..9da6b4b6e6 --- /dev/null +++ b/package/lite/lite.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 1b784cf595c3d5313e3705db210119f77d48826dbc7fcf6328af83a1270c2264 LiTE-0.8.10.tar.gz diff --git a/package/lite/lite.mk b/package/lite/lite.mk new file mode 100644 index 0000000000..9a1c917425 --- /dev/null +++ b/package/lite/lite.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# lite +# +################################################################################ + +LITE_VERSION = 0.8.10 +LITE_SOURCE = LiTE-$(LITE_VERSION).tar.gz +LITE_SITE = http://www.directfb.org/downloads/Libs +LITE_INSTALL_STAGING = YES +LITE_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install +LITE_CONF_ENV = DFB_CFLAGS=-I$(STAGING_DIR)/usr/include/directfb +LITE_DEPENDENCIES = directfb +LITE_LICENSE = LGPLv2.1+ +LITE_LICENSE_FILES = COPYING + +define LITE_FINALIZE_INSTALL + $(INSTALL) -d $(TARGET_DIR)/usr/share/LiTE/examples/ + $(INSTALL) -d $(TARGET_DIR)/usr/share/fonts/truetype/ + $(INSTALL) -m0644 $(@D)/data/*.png $(TARGET_DIR)/usr/share/LiTE/ + $(INSTALL) -m0644 $(@D)/examples/*.png $(TARGET_DIR)/usr/share/LiTE/examples/ + $(INSTALL) -m0644 $(@D)/fonts/*.ttf $(TARGET_DIR)/usr/share/fonts/truetype/ +endef + +LITE_POST_INSTALL_TARGET_HOOKS += LITE_FINALIZE_INSTALL + +$(eval $(autotools-package)) diff --git a/package/live555/Config.in b/package/live555/Config.in new file mode 100644 index 0000000000..5018296c2e --- /dev/null +++ b/package/live555/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LIVE555 + bool "live555" + depends on BR2_INSTALL_LIBSTDCPP + help + LIVE555 Streaming Media forms a set of C++ libraries for multimedia + streaming, using open standard protocols (RTP/RTCP, RTSP, SIP). + + http://www.live555.com/liveMedia/ + +comment "live555 needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/live555/live555.hash b/package/live555/live555.hash new file mode 100644 index 0000000000..16f7077440 --- /dev/null +++ b/package/live555/live555.hash @@ -0,0 +1,4 @@ +# From http://live555.com/liveMedia/public/live555-latest-md5.txt +md5 df4ad1d60c2f5ae8155fb077bb011ab3 live.2016.03.16.tar.gz +# Locally generated +sha256 6f98a96d4cf6e986c7711f0a2431c02cb807a8107d6715eb491a6ed9d0446cf6 live.2016.03.16.tar.gz diff --git a/package/live555/live555.mk b/package/live555/live555.mk new file mode 100644 index 0000000000..3ccba63d77 --- /dev/null +++ b/package/live555/live555.mk @@ -0,0 +1,55 @@ +################################################################################ +# +# live555 +# +################################################################################ + +LIVE555_VERSION = 2016.03.16 +LIVE555_SOURCE = live.$(LIVE555_VERSION).tar.gz +LIVE555_SITE = http://www.live555.com/liveMedia/public +LIVE555_LICENSE = LGPLv2.1+ +LIVE555_LICENSE_FILES = COPYING +LIVE555_INSTALL_STAGING = YES + +LIVE555_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_STATIC_LIBS),y) +LIVE555_CONFIG_TARGET = linux +LIVE555_LIBRARY_LINK = $(TARGET_AR) cr +else +LIVE555_CONFIG_TARGET = linux-with-shared-libraries +LIVE555_LIBRARY_LINK = $(TARGET_CC) -o +LIVE555_CFLAGS += -fPIC +endif + +ifndef ($(BR2_ENABLE_LOCALE),y) +LIVE555_CFLAGS += -DLOCALE_NOT_USED +endif + +define LIVE555_CONFIGURE_CMDS + echo 'COMPILE_OPTS = $$(INCLUDES) -I. -DSOCKLEN_T=socklen_t $(LIVE555_CFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) + echo 'C_COMPILER = $(TARGET_CC)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) + echo 'CPLUSPLUS_COMPILER = $(TARGET_CXX)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) + + echo 'LINK = $(TARGET_CXX) -o' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) + echo 'LINK_OPTS = -L. $(TARGET_LDFLAGS)' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) + echo 'PREFIX = /usr' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) + # Must have a whitespace at the end of LIBRARY_LINK, otherwise static link + # fails + echo 'LIBRARY_LINK = $(LIVE555_LIBRARY_LINK) ' >> $(@D)/config.$(LIVE555_CONFIG_TARGET) + (cd $(@D); ./genMakefiles $(LIVE555_CONFIG_TARGET)) +endef + +define LIVE555_BUILD_CMDS + $(MAKE) -C $(@D) all +endef + +define LIVE555_INSTALL_STAGING_CMDS + $(MAKE) DESTDIR=$(STAGING_DIR) -C $(@D) install +endef + +define LIVE555_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/ljlinenoise/Config.in b/package/ljlinenoise/Config.in new file mode 100644 index 0000000000..be83bdba50 --- /dev/null +++ b/package/ljlinenoise/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LJLINENOISE + bool "ljlinenoise" + # run-time dependency only + select BR2_PACKAGE_LJSYSCALL + # ljsyscall is specifically for LuaJIT, not Lua. + depends on BR2_PACKAGE_LUAJIT + help + ljlinenoise is a pure LuaJIT port of linenoise, + a small alternative to readline and libedit. + + http://fperrad.github.io/ljlinenoise/ + +comment "ljlinenoise needs LuaJIT" + depends on !BR2_PACKAGE_LUAJIT diff --git a/package/ljlinenoise/ljlinenoise.hash b/package/ljlinenoise/ljlinenoise.hash new file mode 100644 index 0000000000..7b4a948c52 --- /dev/null +++ b/package/ljlinenoise/ljlinenoise.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 a5fa2a88d8232bd0f97d3af9aafe780cd855830b42a9ab87c9ae2a5697b044a1 ljlinenoise-0.1.2-1.src.rock diff --git a/package/ljlinenoise/ljlinenoise.mk b/package/ljlinenoise/ljlinenoise.mk new file mode 100644 index 0000000000..aca635885a --- /dev/null +++ b/package/ljlinenoise/ljlinenoise.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# ljlinenoise +# +################################################################################ + +LJLINENOISE_VERSION_UPSTREAM = 0.1.2 +LJLINENOISE_VERSION = $(LJLINENOISE_VERSION_UPSTREAM)-1 +LJLINENOISE_SUBDIR = ljlinenoise-$(LJLINENOISE_VERSION_UPSTREAM) +LJLINENOISE_LICENSE = MIT +LJLINENOISE_LICENSE_FILES = $(LJLINENOISE_SUBDIR)/COPYRIGHT + +$(eval $(luarocks-package)) diff --git a/package/ljsyscall/Config.in b/package/ljsyscall/Config.in new file mode 100644 index 0000000000..149e71d3fd --- /dev/null +++ b/package/ljsyscall/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LJSYSCALL + bool "ljsyscall" + # ljsyscall is specifically for LuaJIT, not Lua. + depends on BR2_PACKAGE_LUAJIT + help + An FFI implementation of the Linux and NetBSD kernel ABIs for LuaJIT. + + http://github.com/justincormack/ljsyscall + +comment "ljsyscall needs LuaJIT" + depends on !BR2_PACKAGE_LUAJIT + diff --git a/package/ljsyscall/ljsyscall.mk b/package/ljsyscall/ljsyscall.mk new file mode 100644 index 0000000000..1c6c2c111f --- /dev/null +++ b/package/ljsyscall/ljsyscall.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# ljsyscall +# +################################################################################ + +LJSYSCALL_VERSION = v0.10 +LJSYSCALL_SITE = $(call github,justincormack,ljsyscall,$(LJSYSCALL_VERSION)) +LJSYSCALL_LICENSE = MIT +LJSYSCALL_LICENSE_FILES = COPYRIGHT + +# dispatch all architectures of LuaJIT +ifeq ($(BR2_i386),y) +LJSYSCALL_ARCH = x86 +else ifeq ($(BR2_x86_64),y) +LJSYSCALL_ARCH = x64 +else ifeq ($(BR2_powerpc),y) +LJSYSCALL_ARCH = ppc +else ifeq ($(BR2_arm)$(BR2_armeb),y) +LJSYSCALL_ARCH = arm +else ifeq ($(BR2_mips)$(BR2_mipsel),y) +LJSYSCALL_ARCH = mips +else +LJSYSCALL_ARCH = $(BR2_ARCH) +endif + +LJSYSCALL_TARGET_DIR = $(TARGET_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER) + +define LJSYSCALL_INSTALL_TARGET_CMDS + $(INSTALL) -d $(LJSYSCALL_TARGET_DIR)/syscall + $(INSTALL) -m 0644 -t $(LJSYSCALL_TARGET_DIR)/ $(@D)/syscall.lua + $(INSTALL) -m 0644 -t $(LJSYSCALL_TARGET_DIR)/syscall $(@D)/syscall/*.lua + + $(INSTALL) -d $(LJSYSCALL_TARGET_DIR)/syscall/linux/$(LJSYSCALL_ARCH) + $(INSTALL) -m 0644 -t $(LJSYSCALL_TARGET_DIR)/syscall/linux/ $(@D)/syscall/linux/*.lua + $(INSTALL) -m 0644 -t $(LJSYSCALL_TARGET_DIR)/syscall/linux/$(LJSYSCALL_ARCH) $(@D)/syscall/linux/$(LJSYSCALL_ARCH)/*.lua + + $(INSTALL) -d $(LJSYSCALL_TARGET_DIR)/syscall/shared + $(INSTALL) -m 0644 -t $(LJSYSCALL_TARGET_DIR)/syscall/shared/ $(@D)/syscall/shared/*.lua +endef + +$(eval $(generic-package)) diff --git a/package/lksctp-tools/Config.in b/package/lksctp-tools/Config.in new file mode 100644 index 0000000000..9c95ef5e1c --- /dev/null +++ b/package/lksctp-tools/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_LKSCTP_TOOLS + bool "lksctp-tools" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # dlopen() + help + The lksctp-tools project provides a Linux user space library + for SCTP (libsctp) including C language header files + (netinet/sctp.h) for accessing SCTP specific application + programming interfaces not provided by the standard sockets, + and also some helper utilities around SCTP. + + http://lksctp.sourceforge.net/ + +comment "lksctp-tools needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/lksctp-tools/lksctp-tools.hash b/package/lksctp-tools/lksctp-tools.hash new file mode 100644 index 0000000000..0ecc8ff0e2 --- /dev/null +++ b/package/lksctp-tools/lksctp-tools.hash @@ -0,0 +1,3 @@ +# From https://sourceforge.net/projects/lksctp/files/lksctp-tools/ +md5 68e9b8fa4d4e331029b247b72d46d7a5 lksctp-tools-1.0.17.tar.gz +sha1 941b0b5c39e364a971f514bba66120435660e518 lksctp-tools-1.0.17.tar.gz diff --git a/package/lksctp-tools/lksctp-tools.mk b/package/lksctp-tools/lksctp-tools.mk new file mode 100644 index 0000000000..a36d6ca96e --- /dev/null +++ b/package/lksctp-tools/lksctp-tools.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# lksctp-tools +# +################################################################################ + +LKSCTP_TOOLS_VERSION = 1.0.17 +LKSCTP_TOOLS_SITE = http://downloads.sourceforge.net/project/lksctp/lksctp-tools +LKSCTP_TOOLS_INSTALL_STAGING = YES +# configure not shipped +LKSCTP_TOOLS_AUTORECONF = YES +LKSCTP_TOOLS_LICENSE = LGPLv2.1 (library), GPLv2+ (programs) +LKSCTP_TOOLS_LICENSE_FILES = COPYING.lib COPYING +LKSCTP_TOOLS_CONF_OPTS = --disable-tests + +# Cleanup installed target source code +define LKSCTP_TOOLS_CLEANUP_TARGET + rm -rf $(TARGET_DIR)/usr/share/lksctp-tools +endef +LKSCTP_TOOLS_POST_INSTALL_TARGET_HOOKS += LKSCTP_TOOLS_CLEANUP_TARGET + +$(eval $(autotools-package)) diff --git a/package/lldpd/Config.in b/package/lldpd/Config.in new file mode 100644 index 0000000000..9a9517b5b0 --- /dev/null +++ b/package/lldpd/Config.in @@ -0,0 +1,73 @@ +config BR2_PACKAGE_LLDPD + bool "lldpd" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBEVENT + help + lldpd is a 802.1ab implementation (LLDP) to help you locate + neighbors of all your equipments. + + LLDP allows you to know exactly on which port is a server + (and reciprocally). + + LLDP is an industry standard protocol designed to supplant + proprietary Link-Layer protocols such as EDP or CDP. The + goal of LLDP is to provide an inter-vendor compatible + mechanism to deliver Link-Layer notifications to adjacent + network devices. + + lldpd is an ISC-licensed implementation of LLDP for various + Unixes. It also supports some proprietary protocols. + + https://vincentbernat.github.io/lldpd/ + +if BR2_PACKAGE_LLDPD + +config BR2_PACKAGE_LLDPD_CDP + bool "CDP" + default y + help + Enable Cisco Discovery Protocol + +config BR2_PACKAGE_LLDPD_FDP + bool "FDP" + default y + help + Enable Foundry Discovery Protocol + +config BR2_PACKAGE_LLDPD_EDP + bool "EDP" + default y + help + Enable Extreme Discovery Protocol + +config BR2_PACKAGE_LLDPD_SONMP + bool "SONMP" + default y + help + Enable SynOptics Network Management + +config BR2_PACKAGE_LLDPD_LLDPMED + bool "LLDP-MED" + default y + help + Enable LLDP-MED extension + +config BR2_PACKAGE_LLDPD_DOT1 + bool "DOT1" + default y + help + Enable Dot1 extension (VLAN stuff) + +config BR2_PACKAGE_LLDPD_DOT3 + bool "DOT3" + default y + help + Enable Dot3 extension (PHY stuff) + +config BR2_PACKAGE_LLDPD_CUSTOM_TLV + bool "Custom TLV" + default y + help + Enable Custom TLV support + +endif diff --git a/package/lldpd/lldpd.hash b/package/lldpd/lldpd.hash new file mode 100644 index 0000000000..a6d905bd36 --- /dev/null +++ b/package/lldpd/lldpd.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 aac11cb1fdc037709517372c70c9bf89c752ab8e5eaab9ce140b84ed5a0507c8 lldpd-0.7.19.tar.gz diff --git a/package/lldpd/lldpd.mk b/package/lldpd/lldpd.mk new file mode 100644 index 0000000000..416967b223 --- /dev/null +++ b/package/lldpd/lldpd.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# lldpd +# +################################################################################ + +LLDPD_VERSION = 0.7.19 +LLDPD_SITE = http://media.luffy.cx/files/lldpd +LLDPD_DEPENDENCIES = host-pkgconf libevent +LLDPD_LICENSE = ISC +LLDPD_LICENSE_FILES = README.md + +# Detection of c99 support in configure fails without WCHAR. To enable +# automatic detection of c99 support by configure, we need to enable +# WCHAR in toolchain. But actually we do not need WCHAR at lldpd +# runtime. So requesting WCHAR in toolchain just for automatic detection +# will be overkill. To solve this, explicitly -specify c99 here. +LLDPD_CONF_ENV = ac_cv_prog_cc_c99=-std=gnu99 + +LLDPD_CONF_OPTS = \ + --without-readline \ + --without-embedded-libevent \ + --without-snmp \ + --without-xml \ + --without-json \ + --without-seccomp \ + --disable-hardening \ + --disable-privsep \ + $(if $(BR2_PACKAGE_LLDPD_CDP),--enable-cdp,--disable-cdp) \ + $(if $(BR2_PACKAGE_LLDPD_FDP),--enable-fdp,--disable-fdp) \ + $(if $(BR2_PACKAGE_LLDPD_EDP),--enable-edp,--disable-edp) \ + $(if $(BR2_PACKAGE_LLDPD_SONMP),--enable-sonmp,--disable-sonmp) \ + $(if $(BR2_PACKAGE_LLDPD_LLDPMED),--enable-lldpmed,--disable-lldpmed) \ + $(if $(BR2_PACKAGE_LLDPD_DOT1),--enable-dot1,--disable-dot1) \ + $(if $(BR2_PACKAGE_LLDPD_DOT3),--enable-dot3,--disable-dot3) \ + $(if $(BR2_PACKAGE_LLDPD_CUSTOM_TLV),--enable-custom,--disable-custom) + +$(eval $(autotools-package)) diff --git a/package/lm-sensors/0001-static-build.patch b/package/lm-sensors/0001-static-build.patch new file mode 100644 index 0000000000..63edd44f84 --- /dev/null +++ b/package/lm-sensors/0001-static-build.patch @@ -0,0 +1,81 @@ +Add support for static only build + +This patch adds support for a BUILD_SHARED_LIB variable that allows to +enable/disable the build of the shared library, in order to support +static-only builds. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -85,6 +85,9 @@ + # Build and install static library + BUILD_STATIC_LIB := 1 + ++# Build and install shared library ++BUILD_SHARED_LIB := 1 ++ + # Set these to add preprocessor or compiler flags, or use + # environment variables + # CFLAGS := +Index: b/lib/Module.mk +=================================================================== +--- a/lib/Module.mk ++++ b/lib/Module.mk +@@ -43,8 +43,14 @@ + LIBSTLIBNAME := libsensors.a + LIBSHSONAME := libsensors.so.$(LIBMAINVER) + ++ifeq ($(BUILD_SHARED_LIB),1) + LIBTARGETS := $(MODULE_DIR)/$(LIBSHLIBNAME) \ + $(MODULE_DIR)/$(LIBSHSONAME) $(MODULE_DIR)/$(LIBSHBASENAME) ++LIBDEP_FOR_PROGS := $(LIBSHBASENAME) ++else ++LIBDEP_FOR_PROGS := $(LIBSTLIBNAME) ++endif ++ + ifeq ($(BUILD_STATIC_LIB),1) + LIBTARGETS += $(MODULE_DIR)/$(LIBSTLIBNAME) + endif +@@ -131,9 +137,11 @@ + ifeq ($(BUILD_STATIC_LIB),1) + $(INSTALL) -m 644 $(LIB_DIR)/$(LIBSTLIBNAME) $(DESTDIR)$(LIBDIR) + endif ++ifeq ($(BUILD_SHARED_LIB),1) + $(INSTALL) -m 755 $(LIB_DIR)/$(LIBSHLIBNAME) $(DESTDIR)$(LIBDIR) + $(LN) $(LIBSHLIBNAME) $(DESTDIR)$(LIBDIR)/$(LIBSHSONAME) + $(LN) $(LIBSHSONAME) $(DESTDIR)$(LIBDIR)/$(LIBSHBASENAME) ++endif + @if [ -z "$(DESTDIR)" -a "$(LIBDIR)" != "/usr/lib" -a "$(LIBDIR)" != "/lib" ] ; then \ + if [ -e "/usr/lib/$(LIBSHSONAME)" -o -e "/usr/lib/$(LIBSHBASENAME)" ] ; then \ + echo '******************************************************************************' ; \ +Index: b/prog/sensord/Module.mk +=================================================================== +--- a/prog/sensord/Module.mk ++++ b/prog/sensord/Module.mk +@@ -41,7 +41,7 @@ + REMOVESENSORDBIN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(SBINDIR)/%,$(PROGSENSORDTARGETS)) + REMOVESENSORDMAN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(PROGSENSORDMAN8DIR)/%,$(PROGSENSORDMAN8FILES)) + +-$(PROGSENSORDTARGETS): $(PROGSENSORDSOURCES:.c=.ro) lib/$(LIBSHBASENAME) ++$(PROGSENSORDTARGETS): $(PROGSENSORDSOURCES:.c=.ro) lib/$(LIBDEP_FOR_PROGS) + $(CC) $(EXLDFLAGS) -o $@ $(PROGSENSORDSOURCES:.c=.ro) -Llib -lsensors -lrrd + + all-prog-sensord: $(PROGSENSORDTARGETS) +Index: b/prog/sensors/Module.mk +=================================================================== +--- a/prog/sensors/Module.mk ++++ b/prog/sensors/Module.mk +@@ -39,8 +39,8 @@ + + LIBICONV := $(shell if /sbin/ldconfig -p | grep -q '/libiconv\.so$$' ; then echo \-liconv; else echo; fi) + +-$(PROGSENSORSTARGETS): $(PROGSENSORSSOURCES:.c=.ro) lib/$(LIBSHBASENAME) +- $(CC) $(EXLDFLAGS) -o $@ $(PROGSENSORSSOURCES:.c=.ro) $(LIBICONV) -Llib -lsensors ++$(PROGSENSORSTARGETS): $(PROGSENSORSSOURCES:.c=.ro) lib/$(LIBDEP_FOR_PROGS) ++ $(CC) $(EXLDFLAGS) -o $@ $(PROGSENSORSSOURCES:.c=.ro) $(LIBICONV) -Llib -lsensors -lm + + all-prog-sensors: $(PROGSENSORSTARGETS) + user :: all-prog-sensors diff --git a/package/lm-sensors/0002-no-host-ldconfig.patch b/package/lm-sensors/0002-no-host-ldconfig.patch new file mode 100644 index 0000000000..51f7f6af01 --- /dev/null +++ b/package/lm-sensors/0002-no-host-ldconfig.patch @@ -0,0 +1,29 @@ +Remove usage of host ldconfig + +To know whether the libiconv library is available, lm-sensors is using +the host ldconfig, which is obviously wrong in cross-compilation. + +Moreover, the lm-sensors program making use of the iconv_*() API +already does it when __UCLIBC__ is *not* defined. In this case, the +iconv_*() functions are already part of the C library, so there is no +need to link against a separate library. Therefore, this patch simply +removes the libiconv handling. + +Signed-off-by: Thomas Petazzoni + +Index: b/prog/sensors/Module.mk +=================================================================== +--- a/prog/sensors/Module.mk ++++ b/prog/sensors/Module.mk +@@ -37,10 +37,8 @@ + REMOVESENSORSBIN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(BINDIR)/%,$(PROGSENSORSTARGETS)) + REMOVESENSORSMAN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(PROGSENSORSMAN1DIR)/%,$(PROGSENSORSMAN1FILES)) + +-LIBICONV := $(shell if /sbin/ldconfig -p | grep -q '/libiconv\.so$$' ; then echo \-liconv; else echo; fi) +- + $(PROGSENSORSTARGETS): $(PROGSENSORSSOURCES:.c=.ro) lib/$(LIBDEP_FOR_PROGS) +- $(CC) $(EXLDFLAGS) -o $@ $(PROGSENSORSSOURCES:.c=.ro) $(LIBICONV) -Llib -lsensors -lm ++ $(CC) $(EXLDFLAGS) -o $@ $(PROGSENSORSSOURCES:.c=.ro) -Llib -lsensors -lm + + all-prog-sensors: $(PROGSENSORSTARGETS) + user :: all-prog-sensors diff --git a/package/lm-sensors/0003-musl-fix-includes.patch b/package/lm-sensors/0003-musl-fix-includes.patch new file mode 100644 index 0000000000..69325abce0 --- /dev/null +++ b/package/lm-sensors/0003-musl-fix-includes.patch @@ -0,0 +1,100 @@ +From 6d85773537c9f277ed342f57500f784ccb2c4a3e Mon Sep 17 00:00:00 2001 +From: Brendan Heading +Date: Sun, 30 Aug 2015 22:26:39 +0100 +Subject: [PATCH 1/1] fix compilation under musl + +This patch removes conditional compilation elements that are designed to +support glibc versions earlier than 2.0, which were causing the build +to fail under musl. + +Based on the patch found here : + +http://git.alpinelinux.org/cgit/aports/plain/main/lm_sensors/musl-fix-includes.patch?id=fece1d19448dbd3a56fd8ac70443116187141848 + +This patch has been accepted for integration upstream and should be +present in the next release. See : + +http://www.lm-sensors.org/changeset/6314 + +Signed-off-by: Brendan Heading +Upstream-Status: pending +--- + prog/dump/isadump.c | 6 ------ + prog/dump/isaset.c | 6 ------ + prog/dump/superio.c | 5 ----- + prog/dump/util.c | 5 ----- + 4 files changed, 22 deletions(-) + +diff --git a/prog/dump/isadump.c b/prog/dump/isadump.c +index e031e47..88e4c3b 100644 +--- a/prog/dump/isadump.c ++++ b/prog/dump/isadump.c +@@ -36,13 +36,7 @@ + #include "util.h" + #include "superio.h" + +- +-/* To keep glibc2 happy */ +-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 + #include +-#else +-#include +-#endif + + #ifdef __powerpc__ + unsigned long isa_io_base = 0; /* XXX for now */ +diff --git a/prog/dump/isaset.c b/prog/dump/isaset.c +index 1d1bdad..a084c8a 100644 +--- a/prog/dump/isaset.c ++++ b/prog/dump/isaset.c +@@ -32,13 +32,7 @@ + #include + #include "util.h" + +- +-/* To keep glibc2 happy */ +-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 + #include +-#else +-#include +-#endif + + #ifdef __powerpc__ + unsigned long isa_io_base = 0; /* XXX for now */ +diff --git a/prog/dump/superio.c b/prog/dump/superio.c +index 1af7358..31e0d78 100644 +--- a/prog/dump/superio.c ++++ b/prog/dump/superio.c +@@ -20,12 +20,7 @@ + */ + + #include +- +-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 + #include +-#else +-#include +-#endif + + #include "superio.h" + +diff --git a/prog/dump/util.c b/prog/dump/util.c +index 676c339..d8b0927 100644 +--- a/prog/dump/util.c ++++ b/prog/dump/util.c +@@ -11,12 +11,7 @@ + #include + #include "util.h" + +-/* To keep glibc2 happy */ +-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ >= 0 + #include +-#else +-#include +-#endif + + /* Return 1 if we should continue, 0 if we should abort */ + int user_ack(int def) +-- +2.4.3 + diff --git a/package/lm-sensors/Config.in b/package/lm-sensors/Config.in new file mode 100644 index 0000000000..7065c4cb1e --- /dev/null +++ b/package/lm-sensors/Config.in @@ -0,0 +1,55 @@ +config BR2_PACKAGE_LM_SENSORS + bool "lm-sensors" + help + Lm-sensors is a hardware health monitoring package for + Linux. It allows you to access information from + temperature, voltage, and fan speed sensors. It + works with most newer systems. + + http://www.lm-sensors.org/ + +if BR2_PACKAGE_LM_SENSORS +comment "lm-sensors tools" + +config BR2_PACKAGE_LM_SENSORS_SENSORS + bool "sensors" + default y + help + Sensors is used to show the current readings of all sensor + chips. + +config BR2_PACKAGE_LM_SENSORS_FANCONTROL + bool "fancontrol" + help + Script for temperature driven fan control + +config BR2_PACKAGE_LM_SENSORS_ISADUMP + bool "isadump" + help + Isadump is a small helper program to examine registers + visible through the ISA bus. + +config BR2_PACKAGE_LM_SENSORS_ISASET + bool "isaset" + help + Isaset is a small helper program to set register visible + through the ISA bus. + +config BR2_PACKAGE_LM_SENSORS_PWMCONFIG + bool "pwmconfig" + help + Pwmconfig searches your sensors for pulse width modulation (PWM) + controls, and tests each one to see if it controls a fan on + your motherboard. + +config BR2_PACKAGE_LM_SENSORS_SENSORS_DETECT + bool "sensors-detect" + depends on BR2_PACKAGE_PERL + help + Sensors-detect is an interactive program for detecting + available hardware monitoring chips. + +comment "sensors-detect needs perl" + depends on !BR2_PACKAGE_PERL + +endif diff --git a/package/lm-sensors/lm-sensors.hash b/package/lm-sensors/lm-sensors.hash new file mode 100644 index 0000000000..8cbd3d1f75 --- /dev/null +++ b/package/lm-sensors/lm-sensors.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 e0579016081a262dd23eafe1d22b41ebde78921e73a1dcef71e05e424340061f lm_sensors-3.4.0.tar.bz2 diff --git a/package/lm-sensors/lm-sensors.mk b/package/lm-sensors/lm-sensors.mk new file mode 100644 index 0000000000..d2080d88f0 --- /dev/null +++ b/package/lm-sensors/lm-sensors.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# lm-sensors +# +################################################################################ + +LM_SENSORS_VERSION = 3.4.0 +LM_SENSORS_SOURCE = lm_sensors-$(LM_SENSORS_VERSION).tar.bz2 +LM_SENSORS_SITE = ftp://ftp.netroedge.com/pub/lm-sensors +LM_SENSORS_INSTALL_STAGING = YES +LM_SENSORS_DEPENDENCIES = host-bison host-flex +LM_SENSORS_LICENSE = libsensors LGPLv2.1+, programs GPLv2+ +LM_SENSORS_LICENSE_FILES = COPYING.LGPL COPYING + +LM_SENSORS_BINS_ = bin/sensors-conf-convert +LM_SENSORS_BINS_$(BR2_PACKAGE_LM_SENSORS_SENSORS) += bin/sensors +LM_SENSORS_BINS_$(BR2_PACKAGE_LM_SENSORS_FANCONTROL) += sbin/fancontrol +LM_SENSORS_BINS_$(BR2_PACKAGE_LM_SENSORS_ISADUMP) += sbin/isadump +LM_SENSORS_BINS_$(BR2_PACKAGE_LM_SENSORS_ISASET) += sbin/isaset +LM_SENSORS_BINS_$(BR2_PACKAGE_LM_SENSORS_PWMCONFIG) += sbin/pwmconfig +LM_SENSORS_BINS_$(BR2_PACKAGE_LM_SENSORS_SENSORS_DETECT) += sbin/sensors-detect + +LM_SENSORS_MAKE_OPTS = \ + BUILD_STATIC_LIB=1 \ + MACHINE=$(KERNEL_ARCH) \ + PREFIX=/usr + +ifeq ($(BR2_STATIC_LIBS),y) +LM_SENSORS_MAKE_OPTS += BUILD_SHARED_LIB=0 +else +LM_SENSORS_MAKE_OPTS += BUILD_SHARED_LIB=1 +endif + +ifeq ($(BR2_SHARED_LIBS),y) +LM_SENSORS_MAKE_OPTS += BUILD_STATIC_LIB=0 +else +LM_SENSORS_MAKE_OPTS += BUILD_STATIC_LIB=1 +endif + +define LM_SENSORS_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) $(LM_SENSORS_MAKE_OPTS) -C $(@D) +endef + +define LM_SENSORS_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) $(LM_SENSORS_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install + rm -f $(addprefix $(STAGING_DIR)/usr/,$(LM_SENSORS_BINS_) $(LM_SENSORS_BINS_y)) +endef + +define LM_SENSORS_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) $(LM_SENSORS_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install + rm -f $(addprefix $(TARGET_DIR)/usr/,$(LM_SENSORS_BINS_)) +endef + +$(eval $(generic-package)) diff --git a/package/lmbench/Config.in b/package/lmbench/Config.in new file mode 100644 index 0000000000..c4ea5223af --- /dev/null +++ b/package/lmbench/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LMBENCH + bool "lmbench" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS # libtirpc + select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC + depends on BR2_USE_MMU # fork() + help + LMbench is a suite of simple, portable, + ANSI/C microbenchmarks for UNIX/POSIX. + + http://sourceforge.net/projects/lmbench/ + +comment "lmbench needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC) diff --git a/package/lmbench/lmbench.hash b/package/lmbench/lmbench.hash new file mode 100644 index 0000000000..b7aaa6ae56 --- /dev/null +++ b/package/lmbench/lmbench.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551 lmbench-3.0-a9.tgz diff --git a/package/lmbench/lmbench.mk b/package/lmbench/lmbench.mk new file mode 100644 index 0000000000..dc758c6faf --- /dev/null +++ b/package/lmbench/lmbench.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# lmbench +# +################################################################################ + +LMBENCH_VERSION = 3.0-a9 +LMBENCH_SOURCE = lmbench-$(LMBENCH_VERSION).tgz +LMBENCH_SITE = http://downloads.sourceforge.net/project/lmbench/development/lmbench-$(LMBENCH_VERSION) +LMBENCH_LICENSE = lmbench license (based on GPLv2) +LMBENCH_LICENSE_FILES = COPYING COPYING-2 + +LMBENCH_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +LMBENCH_DEPENDENCIES += host-pkgconf libtirpc +LMBENCH_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc` +LMBENCH_LDLIBS = `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc` +endif + +define LMBENCH_CONFIGURE_CMDS + $(call CONFIG_UPDATE,$(@D)) + sed -i 's/CFLAGS=/CFLAGS+=/g' $(@D)/src/Makefile + sed -i 's/LDLIBS=/LDLIBS+=/g' $(@D)/scripts/build + sed -i '/cd .*doc/d' $(@D)/src/Makefile + sed -i '/include/d' $(@D)/src/Makefile + touch $@ +endef + +# Note: there is a second stage 'make' invocation from the 'scripts/build' +# script. So the variables override below don't take direct effect in +# src/Makefile. +define LMBENCH_BUILD_CMDS + $(MAKE) CFLAGS="$(LMBENCH_CFLAGS)" LDLIBS="$(LMBENCH_LDLIBS)" OS=$(ARCH) CC="$(TARGET_CC)" -C $(@D)/src +endef + +define LMBENCH_INSTALL_TARGET_CMDS + $(MAKE) CFLAGS="$(TARGET_CFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" BASE=$(TARGET_DIR)/usr -C $(@D)/src install +endef + +$(eval $(generic-package)) diff --git a/package/localedef/localedef.hash b/package/localedef/localedef.hash new file mode 100644 index 0000000000..ee14fb16b8 --- /dev/null +++ b/package/localedef/localedef.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9a60f7cdab6fb39adf23a12102f2d950d5f07f0cd7e51e85ec327e07440a79c6 localedef-eglibc-2.14.1-r17443-ptx1.tar.bz2 diff --git a/package/localedef/localedef.mk b/package/localedef/localedef.mk new file mode 100644 index 0000000000..1fe431aac0 --- /dev/null +++ b/package/localedef/localedef.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# localedef +# +################################################################################ + +LOCALEDEF_VERSION = 2.14.1-r17443-ptx1 +LOCALEDEF_SOURCE = localedef-eglibc-$(LOCALEDEF_VERSION).tar.bz2 +LOCALEDEF_SITE = http://www.pengutronix.de/software/ptxdist/temporary-src + +HOST_LOCALEDEF_CONF_OPTS += \ + --prefix=/usr \ + --with-glibc=./eglibc + +HOST_LOCALEDEF_CONF_ENV = CFLAGS="$(HOST_CFLAGS) -fgnu89-inline" + +# The makefile does not implement an install target +define HOST_LOCALEDEF_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/localedef $(HOST_DIR)/usr/bin/localedef +endef + +$(eval $(host-autotools-package)) diff --git a/package/lockdev/0001-Makefile-install-static-library-and-headers-separate.patch b/package/lockdev/0001-Makefile-install-static-library-and-headers-separate.patch new file mode 100644 index 0000000000..d5a498a19e --- /dev/null +++ b/package/lockdev/0001-Makefile-install-static-library-and-headers-separate.patch @@ -0,0 +1,44 @@ +From 0dcd2368c3e23a5cc1cc4a979d9c241ed9302236 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 4 Jan 2015 16:06:07 +0100 +Subject: [PATCH] Makefile: install static library and headers separately + +Signed-off-by: Romain Naour +--- + Makefile | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/Makefile b/Makefile +index e27dcbd..ecf52d1 100644 +--- a/Makefile ++++ b/Makefile +@@ -45,12 +45,10 @@ perl-lib: static + cd LockDev && make OPTIMIZE="-O2 -g -Wall" + cd LockDev && make test + +-.PHONY: install install_dev install_dbg install_doc install_run +-install: install_dev install_dbg install_doc install_run ++.PHONY: install install_dev install_dbg install_doc install_run install_static ++install: install_dev install_dbg install_doc install_run install_static + +-install_dev: ${static} src/lockdev.h +- install -m755 -d ${libdir} +- install -m644 ${static} ${libdir} ++install_dev: src/lockdev.h + install -m755 -d ${incdir} + install -m644 src/lockdev.h ${incdir} + install -m644 src/ttylock.h ${incdir} +@@ -69,6 +67,10 @@ install_doc: docs/lockdev.3 + install -m755 -d ${mandir}/man3 + install -m644 docs/lockdev.3 ${mandir}/man3 + ++install_static: ${static} ++ install -m755 -d ${libdir} ++ install -m644 ${static} ${libdir} ++ + install_run: ${shared} + install -m755 -d ${libdir} + install -m644 ${shared} ${libdir} +-- +1.9.3 + diff --git a/package/lockdev/Config.in b/package/lockdev/Config.in new file mode 100644 index 0000000000..4b386f4ab0 --- /dev/null +++ b/package/lockdev/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LOCKDEV + bool "lockdev" + help + Library for locking devices. + + No upstream site, primary site is Debian. diff --git a/package/lockdev/lockdev.hash b/package/lockdev/lockdev.hash new file mode 100644 index 0000000000..bb055e4ade --- /dev/null +++ b/package/lockdev/lockdev.hash @@ -0,0 +1,3 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/l/lockdev/lockdev_1.0.3-1.6.dsc +sha256 ccae635d7ac3fdd50897eceb250872b3d9a191d298f213e7f0c836910d869f82 lockdev_1.0.3.orig.tar.gz +sha256 a5405c6ee5e97e45eeb1c81330a7e9f444a58bda5e6771fa30007516c115007e lockdev_1.0.3-1.6.diff.gz diff --git a/package/lockdev/lockdev.mk b/package/lockdev/lockdev.mk new file mode 100644 index 0000000000..a45e22e733 --- /dev/null +++ b/package/lockdev/lockdev.mk @@ -0,0 +1,58 @@ +################################################################################ +# +# lockdev +# +################################################################################ + +LOCKDEV_VERSION_MAJOR = 1 +LOCKDEV_VERSION = $(LOCKDEV_VERSION_MAJOR).0.3 +LOCKDEV_SOURCE = lockdev_$(LOCKDEV_VERSION).orig.tar.gz +LOCKDEV_PATCH = lockdev_$(LOCKDEV_VERSION)-1.6.diff.gz +LOCKDEV_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/l/lockdev +LOCKDEV_LICENSE = LGPLv2.1 +LOCKDEV_LICENSE_FILES = LICENSE +LOCKDEV_INSTALL_STAGING = YES + +ifeq ($(BR2_STATIC_LIBS),y) +LOCKDEV_BUILD_ARGS = static +LOCKDEV_INSTALL_ARGS = install_static +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +LOCKDEV_BUILD_ARGS = static shared +LOCKDEV_INSTALL_ARGS = install_run install_static +else # BR2_SHARED_LIBS +LOCKDEV_BUILD_ARGS = shared +LOCKDEV_INSTALL_ARGS = install_run +endif + +# Make the code believe we are using a C library compatible with +# glibc, which for the purpose of lockdev is actually true. +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +LOCKDEV_BUILD_ARGS += CFLAGS="$(TARGET_CFLAGS) -D__GNU_LIBRARY__" +endif + +ifeq ($(BR2_SHARED_STATIC_LIBS)$(BR2_SHARED_LIBS),y) +define LOCKDEV_CREATE_LINKS_STAGING + ln -sf liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so + ln -sf liblockdev.$(LOCKDEV_VERSION).so $(STAGING_DIR)/usr/lib/liblockdev.so.$(LOCKDEV_VERSION_MAJOR) +endef + +define LOCKDEV_CREATE_LINKS_TARGET + ln -sf liblockdev.$(LOCKDEV_VERSION).so $(TARGET_DIR)/usr/lib/liblockdev.so.$(LOCKDEV_VERSION_MAJOR) +endef +endif + +define LOCKDEV_BUILD_CMDS + $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) $(LOCKDEV_BUILD_ARGS) +endef + +define LOCKDEV_INSTALL_STAGING_CMDS + $(MAKE1) basedir=$(STAGING_DIR)/usr -C $(@D) $(LOCKDEV_INSTALL_ARGS) install_dev + $(LOCKDEV_CREATE_LINKS_STAGING) +endef + +define LOCKDEV_INSTALL_TARGET_CMDS + $(MAKE1) basedir=$(TARGET_DIR)/usr -C $(@D) $(LOCKDEV_INSTALL_ARGS) + $(LOCKDEV_CREATE_LINKS_TARGET) +endef + +$(eval $(generic-package)) diff --git a/package/lockfile-progs/0001-sus3v-legacy.patch b/package/lockfile-progs/0001-sus3v-legacy.patch new file mode 100644 index 0000000000..8cf552ef5c --- /dev/null +++ b/package/lockfile-progs/0001-sus3v-legacy.patch @@ -0,0 +1,11 @@ +--- /lockfile-progs.orig.c 2007-10-11 10:32:09.000000000 -0300 ++++ /lockfile-progs.c 2007-10-11 10:32:28.000000000 -0300 +@@ -93,7 +93,7 @@ + { NULL, 0, NULL, 0 } + }; + +- char *cmd_name = rindex(argv[0], '/'); ++ char *cmd_name = strrchr(argv[0], '/'); + int mail_cmd_p = 0; + + if(cmd_name != NULL) { diff --git a/package/lockfile-progs/Config.in b/package/lockfile-progs/Config.in new file mode 100644 index 0000000000..de101a9a15 --- /dev/null +++ b/package/lockfile-progs/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_LOCKFILE_PROGS + bool "lockfile programs" + select BR2_PACKAGE_LIBLOCKFILE + help + Build lockfile utility programs. diff --git a/package/lockfile-progs/lockfile-progs.hash b/package/lockfile-progs/lockfile-progs.hash new file mode 100644 index 0000000000..e628f0cc1e --- /dev/null +++ b/package/lockfile-progs/lockfile-progs.hash @@ -0,0 +1,2 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/l/lockfile-progs/lockfile-progs_0.1.17.dsc +sha256 03fb05d25499532f497775b1747b61fa6beebf12d3bcc951e125349ae166c511 lockfile-progs_0.1.17.tar.gz diff --git a/package/lockfile-progs/lockfile-progs.mk b/package/lockfile-progs/lockfile-progs.mk new file mode 100644 index 0000000000..deb9f90812 --- /dev/null +++ b/package/lockfile-progs/lockfile-progs.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# lockfile-progs +# +################################################################################ + +LOCKFILE_PROGS_VERSION = 0.1.17 +LOCKFILE_PROGS_SOURCE = lockfile-progs_$(LOCKFILE_PROGS_VERSION).tar.gz +LOCKFILE_PROGS_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/l/lockfile-progs +LOCKFILE_PROGS_DEPENDENCIES = liblockfile +LOCKFILE_PROGS_LICENSE = GPLv2 +LOCKFILE_PROGS_LICENSE_FILES = COPYING + +LOCKFILE_BINS = \ + $(addprefix lockfile-,check create remove touch) \ + $(addprefix mail-,lock touchlock unlock) + +define LOCKFILE_PROGS_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define LOCKFILE_PROGS_INSTALL_TARGET_CMDS + for i in $(LOCKFILE_BINS); do \ + $(INSTALL) -D -m 755 $(@D)/bin/$$i $(TARGET_DIR)/usr/bin/$$i || exit 1; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/log4cplus/Config.in b/package/log4cplus/Config.in new file mode 100644 index 0000000000..8a112a4e8f --- /dev/null +++ b/package/log4cplus/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_LOG4CPLUS + bool "log4cplus" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + help + log4cplus is a simple to use C++ logging API providing + thread-safe, flexible, and arbitrarily granular control + over log management and configuration. It is modelled + after the Java log4j API. + + http://sourceforge.net/projects/log4cplus + +comment "log4cplus needs a toolchain w/ C++, wchar, threads" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/log4cplus/log4cplus.hash b/package/log4cplus/log4cplus.hash new file mode 100644 index 0000000000..395e9fe535 --- /dev/null +++ b/package/log4cplus/log4cplus.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 999427580cded403b4edc8a85088621f27493c489f08b9f564fb5fe76c16a883 log4cplus-1.1.2.tar.xz diff --git a/package/log4cplus/log4cplus.mk b/package/log4cplus/log4cplus.mk new file mode 100644 index 0000000000..292fa66d49 --- /dev/null +++ b/package/log4cplus/log4cplus.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# log4cplus +# +################################################################################ + +LOG4CPLUS_VERSION = 1.1.2 +LOG4CPLUS_SOURCE = log4cplus-$(LOG4CPLUS_VERSION).tar.xz +LOG4CPLUS_SITE = http://downloads.sourceforge.net/project/log4cplus/log4cplus-stable/$(LOG4CPLUS_VERSION) +LOG4CPLUS_LICENSE = Apache-2.0 +LOG4CPLUS_LICENSE_FILES = LICENSE +LOG4CPLUS_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/log4cxx/0001-charset-fixes.patch b/package/log4cxx/0001-charset-fixes.patch new file mode 100644 index 0000000000..75567fdad1 --- /dev/null +++ b/package/log4cxx/0001-charset-fixes.patch @@ -0,0 +1,43 @@ +Fix build when iconv support is not available + +When iconv support is not available, the apr-util library does not +provide character set conversion features, and therefore APR_HAS_XLATE +is false. + +However, on Linux !defined(_WIN32) is always true, but the part of the +code that defines the APRCharsetDecoder and APRCharsetEncoder are only +enclosed in a #if APR_HAS_XLATE, without the "|| defined(_WIN32)" +which leads to build failures: the APRCharsetEncoder and +APRCharsetDecoder classes are used without being defined. + +This patch removes the || !defined(_WIN32) so that when iconv support +is not here, we fall back to raising an exception at runtime. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/main/cpp/charsetdecoder.cpp +=================================================================== +--- a/src/main/cpp/charsetdecoder.cpp ++++ b/src/main/cpp/charsetdecoder.cpp +@@ -476,7 +476,7 @@ + StringHelper::equalsIgnoreCase(charset, LOG4CXX_STR("ISO-LATIN-1"), LOG4CXX_STR("iso-latin-1"))) { + return new ISOLatinCharsetDecoder(); + } +-#if APR_HAS_XLATE || !defined(_WIN32) ++#if APR_HAS_XLATE + return new APRCharsetDecoder(charset); + #else + throw IllegalArgumentException(charset); +Index: b/src/main/cpp/charsetencoder.cpp +=================================================================== +--- a/src/main/cpp/charsetencoder.cpp ++++ b/src/main/cpp/charsetencoder.cpp +@@ -484,7 +484,7 @@ + } else if (StringHelper::equalsIgnoreCase(charset, LOG4CXX_STR("UTF-16LE"), LOG4CXX_STR("utf-16le"))) { + return new UTF16LECharsetEncoder(); + } +-#if APR_HAS_XLATE || !defined(_WIN32) ++#if APR_HAS_XLATE + return new APRCharsetEncoder(charset); + #else + throw IllegalArgumentException(charset); diff --git a/package/log4cxx/0002-missing-includes.patch b/package/log4cxx/0002-missing-includes.patch new file mode 100644 index 0000000000..dd4da11619 --- /dev/null +++ b/package/log4cxx/0002-missing-includes.patch @@ -0,0 +1,44 @@ +commit bcaf1f8a682d641cee325142099c371464fd5946 +Author: Curtis William Arnold +Date: Tue May 20 16:05:37 2008 +0000 + + LOGCXX-286: gcc 4.3 requires #include + + git-svn-id: https://svn.apache.org/repos/asf/logging/log4cxx/trunk@658304 13f79535-47bb-0310-9956-ffa450edef68 + +diff --git a/src/examples/cpp/console.cpp b/src/examples/cpp/console.cpp +index 6a01d8a..a673a10 100755 +--- a/src/examples/cpp/console.cpp ++++ b/src/examples/cpp/console.cpp +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; +diff --git a/src/main/cpp/inputstreamreader.cpp b/src/main/cpp/inputstreamreader.cpp +index 52b1c0a..cb45181 100644 +--- a/src/main/cpp/inputstreamreader.cpp ++++ b/src/main/cpp/inputstreamreader.cpp +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; +diff --git a/src/main/cpp/socketoutputstream.cpp b/src/main/cpp/socketoutputstream.cpp +index 185f835..c61eb11 100644 +--- a/src/main/cpp/socketoutputstream.cpp ++++ b/src/main/cpp/socketoutputstream.cpp +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; diff --git a/package/log4cxx/0003-missing-includes.patch b/package/log4cxx/0003-missing-includes.patch new file mode 100644 index 0000000000..cd21bbab3e --- /dev/null +++ b/package/log4cxx/0003-missing-includes.patch @@ -0,0 +1,21 @@ +commit ce62c00ea5f9bf2f0740ecde5b245c9b7edc80ff +Author: Curtis William Arnold +Date: Mon Apr 27 03:53:50 2009 +0000 + + LOGCXX-332: fails to build with gcc 4.4 + + git-svn-id: https://svn.apache.org/repos/asf/logging/log4cxx/trunk@768863 13f79535-47bb-0310-9956-ffa450edef68 + +diff --git a/src/examples/cpp/console.cpp b/src/examples/cpp/console.cpp +index a673a10..f44c944 100755 +--- a/src/examples/cpp/console.cpp ++++ b/src/examples/cpp/console.cpp +@@ -23,6 +23,8 @@ + #include + #include + #include ++#include ++#include + + using namespace log4cxx; + using namespace log4cxx::helpers; diff --git a/package/log4cxx/Config.in b/package/log4cxx/Config.in new file mode 100644 index 0000000000..40c7df9220 --- /dev/null +++ b/package/log4cxx/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_LOG4CXX + bool "log4cxx" + select BR2_PACKAGE_APR + select BR2_PACKAGE_APR_UTIL + # apr really needs shared library support + depends on !BR2_STATIC_LIBS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # apr + help + Apache log4cxx is a logging framework for C++ patterned + after Apache log4j. + + http://apache.linux-mirror.org/logging/log4cxx/0.10.0 + +comment "log4cxx needs a toolchain w/ C++, threads, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS + depends on BR2_USE_MMU diff --git a/package/log4cxx/log4cxx.hash b/package/log4cxx/log4cxx.hash new file mode 100644 index 0000000000..469d99af02 --- /dev/null +++ b/package/log4cxx/log4cxx.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 0de0396220a9566a580166e66b39674cb40efd2176f52ad2c65486c99c920c8c apache-log4cxx-0.10.0.tar.gz diff --git a/package/log4cxx/log4cxx.mk b/package/log4cxx/log4cxx.mk new file mode 100644 index 0000000000..7d7e2e9bb2 --- /dev/null +++ b/package/log4cxx/log4cxx.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# log4cxx +# +################################################################################ + +LOG4CXX_VERSION = 0.10.0 +LOG4CXX_SITE = http://archive.apache.org/dist/logging/log4cxx/$(LOG4CXX_VERSION) +LOG4CXX_SOURCE = apache-log4cxx-$(LOG4CXX_VERSION).tar.gz +LOG4CXX_INSTALL_STAGING = YES +LOG4CXX_LICENSE = Apache-2.0 +LOG4CXX_LICENSE_FILES = LICENSE + +LOG4CXX_CONF_OPTS = \ + --with-apr=$(STAGING_DIR)/usr/bin/apr-1-config \ + --with-apr-util=$(STAGING_DIR)/usr/bin/apu-1-config \ + --disable-dot \ + --disable-doxygen \ + --disable-html-docs + +LOG4CXX_DEPENDENCIES = apr apr-util + +$(eval $(autotools-package)) diff --git a/package/logrotate/0001-make-autoreconfable.patch b/package/logrotate/0001-make-autoreconfable.patch new file mode 100644 index 0000000000..89759d07fe --- /dev/null +++ b/package/logrotate/0001-make-autoreconfable.patch @@ -0,0 +1,20 @@ +Make the package autoreconfigurable + +Adjust a minor detail in configure.ac in order to make the package +compatible with the autoconf/automake versions we are using in +Buildroot. + +Signed-off-by: Benoît Thébaudeau + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -1,6 +1,6 @@ + AC_INIT([logrotate],[3.8.9]) + +-AM_INIT_AUTOMAKE ++AM_INIT_AUTOMAKE([foreign]) + AC_DEFINE(_GNU_SOURCE) + + AM_EXTRA_RECURSIVE_TARGETS([test]) diff --git a/package/logrotate/Config.in b/package/logrotate/Config.in new file mode 100644 index 0000000000..8528361b12 --- /dev/null +++ b/package/logrotate/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LOGROTATE + bool "logrotate" + select BR2_PACKAGE_POPT + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + help + A simple program to rotate logs. + + https://fedorahosted.org/logrotate/ + +comment "logrotate needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/logrotate/logrotate.conf b/package/logrotate/logrotate.conf new file mode 100644 index 0000000000..6d829dc9d2 --- /dev/null +++ b/package/logrotate/logrotate.conf @@ -0,0 +1,14 @@ +compress + +include /etc/logrotate.d + +/var/log/messages /var/log/auth.log /var/log/user.log { + rotate 7 + daily + delaycompress + missingok + sharedscripts + postrotate + /usr/bin/killall -HUP syslogd + endscript +} diff --git a/package/logrotate/logrotate.hash b/package/logrotate/logrotate.hash new file mode 100644 index 0000000000..ef537a9556 --- /dev/null +++ b/package/logrotate/logrotate.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 700ed7ce9072a1cca324779a74797dfaefdae37ac50a817134b947c4ded1dfa7 logrotate-3.8.9.tar.gz diff --git a/package/logrotate/logrotate.mk b/package/logrotate/logrotate.mk new file mode 100644 index 0000000000..4a70040279 --- /dev/null +++ b/package/logrotate/logrotate.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# logrotate +# +################################################################################ + +LOGROTATE_VERSION = 3.8.9 +LOGROTATE_SITE = https://www.fedorahosted.org/releases/l/o/logrotate +LOGROTATE_LICENSE = GPLv2+ +LOGROTATE_LICENSE_FILES = COPYING +LOGROTATE_DEPENDENCIES = popt host-pkgconf +# tarball does not have a generated configure script +LOGROTATE_AUTORECONF = YES +LOGROTATE_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs popt`" +LOGROTATE_CONF_OPTS = --without-selinux + +ifeq ($(BR2_PACKAGE_ACL),y) +LOGROTATE_DEPENDENCIES += acl +LOGROTATE_CONF_OPTS += --with-acl +else +LOGROTATE_CONF_OPTS += --without-acl +endif + +define LOGROTATE_INSTALL_TARGET_CONF + $(INSTALL) -m 0644 package/logrotate/logrotate.conf $(TARGET_DIR)/etc/logrotate.conf + $(INSTALL) -d -m 0755 $(TARGET_DIR)/etc/logrotate.d +endef +LOGROTATE_POST_INSTALL_TARGET_HOOKS += LOGROTATE_INSTALL_TARGET_CONF + +$(eval $(autotools-package)) diff --git a/package/logsurfer/Config.in b/package/logsurfer/Config.in new file mode 100644 index 0000000000..d4218bce7e --- /dev/null +++ b/package/logsurfer/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LOGSURFER + bool "logsurfer" + depends on BR2_USE_MMU # fork() + help + Logsurfer is a program for monitoring system logs in real-time, + and reporting on the occurrence of events. + + http://www.crypt.gen.nz/logsurfer/ diff --git a/package/logsurfer/logsurfer.hash b/package/logsurfer/logsurfer.hash new file mode 100644 index 0000000000..2c14078f76 --- /dev/null +++ b/package/logsurfer/logsurfer.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 74a36e8530a884031b4ae2344a46b9aaa07a1ee36d143802f6b64f817c5bd1af logsurfer-1.8.tar.gz diff --git a/package/logsurfer/logsurfer.mk b/package/logsurfer/logsurfer.mk new file mode 100644 index 0000000000..8eb9dc8f8a --- /dev/null +++ b/package/logsurfer/logsurfer.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# logsurfer +# +################################################################################ + +LOGSURFER_VERSION = 1.8 +LOGSURFER_SITE = http://downloads.sourceforge.net/project/logsurfer/logsurfer/logsurfer-$(LOGSURFER_VERSION) + +define LOGSURFER_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/src/logsurfer \ + $(TARGET_DIR)/usr/bin/logsurfer +endef + +$(eval $(autotools-package)) diff --git a/package/lpc3250loader/Config.in.host b/package/lpc3250loader/Config.in.host new file mode 100644 index 0000000000..9371f13430 --- /dev/null +++ b/package/lpc3250loader/Config.in.host @@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_LPC3250LOADER + bool "host lpc3250loader" + help + lpc3250loader is a tool to load/burn programs (in particular kickstart + and S1L) on an LPC3250 platform. + + https://github.com/alexandrebelloni/lpc3250loader diff --git a/package/lpc3250loader/lpc3250loader.mk b/package/lpc3250loader/lpc3250loader.mk new file mode 100644 index 0000000000..042e364f12 --- /dev/null +++ b/package/lpc3250loader/lpc3250loader.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# lpc3250loader +# +################################################################################ + +HOST_LPC3250LOADER_VERSION = 1.0 +HOST_LPC3250LOADER_SITE = $(call github,alexandrebelloni,lpc3250loader,$(HOST_LPC3250LOADER_VERSION)) +LPC3250LOADER_LICENSE = GPLv2+ +LPC3250LOADER_LICENSE_FILES = LPC3250loader.py + +define HOST_LPC3250LOADER_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/LPC3250loader.py \ + $(HOST_DIR)/usr/bin/LPC3250loader.py +endef + +$(eval $(host-generic-package)) diff --git a/package/lpeg/Config.in b/package/lpeg/Config.in new file mode 100644 index 0000000000..957991d416 --- /dev/null +++ b/package/lpeg/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LPEG + bool "lpeg" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + help + LPeg is a new pattern-matching library for Lua, + based on Parsing Expression Grammars (PEGs). + + http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html diff --git a/package/lpeg/lpeg.hash b/package/lpeg/lpeg.hash new file mode 100644 index 0000000000..50e66d1204 --- /dev/null +++ b/package/lpeg/lpeg.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 e70c7cf8d7b8feddd8a41235d0ebb27bb60fbe7f31c8364ad23ee30a7f0cc26e lpeg-1.0.0-1.src.rock diff --git a/package/lpeg/lpeg.mk b/package/lpeg/lpeg.mk new file mode 100644 index 0000000000..0754f00d60 --- /dev/null +++ b/package/lpeg/lpeg.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# lpeg +# +################################################################################ + +LPEG_VERSION = 1.0.0-1 +LPEG_LICENSE = MIT + +$(eval $(luarocks-package)) diff --git a/package/lpty/Config.in b/package/lpty/Config.in new file mode 100644 index 0000000000..50cbd2548a --- /dev/null +++ b/package/lpty/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LPTY + bool "lpty" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + help + A simple facility for lua to control other programs via + PTYs. + + http://www.tset.de/lpty/ diff --git a/package/lpty/lpty.hash b/package/lpty/lpty.hash new file mode 100644 index 0000000000..a451fd8580 --- /dev/null +++ b/package/lpty/lpty.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 cf263ece9b50a78a7fb2277e3546fbbf0bf6858f41821932d92f2e3d8a065091 lpty-1.0.1-1.src.rock diff --git a/package/lpty/lpty.mk b/package/lpty/lpty.mk new file mode 100644 index 0000000000..963ab61103 --- /dev/null +++ b/package/lpty/lpty.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# lpty +# +################################################################################ + +LPTY_VERSION_UPSTREAM = 1.0.1 +LPTY_VERSION = $(LPTY_VERSION_UPSTREAM)-1 +LPTY_SUBDIR = lpty-$(LPTY_VERSION) +LPTY_LICENSE = MIT +LPTY_LICENSE_FILES = $(LPTY_SUBDIR)/doc/LICENSE + +$(eval $(luarocks-package)) diff --git a/package/lrandom/Config.in b/package/lrandom/Config.in new file mode 100644 index 0000000000..64bcf0ce01 --- /dev/null +++ b/package/lrandom/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LRANDOM + bool "lrandom" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + help + A library for generating random numbers + based on the Mersenne Twister + + http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lrandom diff --git a/package/lrandom/lrandom.hash b/package/lrandom/lrandom.hash new file mode 100644 index 0000000000..3f601330c6 --- /dev/null +++ b/package/lrandom/lrandom.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 96fbc56beb0efca20253301915e14ba25150e2b09541ea7a3570e0def624b196 lrandom-20120430.51-1.src.rock +sha256 480a6cf11caaba99290ff30cd6e854ac9dce61e38b9d9caf5498165f7fb93454 lrandom-20120430.52-1.src.rock diff --git a/package/lrandom/lrandom.mk b/package/lrandom/lrandom.mk new file mode 100644 index 0000000000..09b62c94a5 --- /dev/null +++ b/package/lrandom/lrandom.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# lrandom +# +################################################################################ + +ifeq ($(BR2_PACKAGE_LUA_5_2)$(BR2_PACKAGE_LUA_5_3),y) +LRANDOM_VERSION = 20120430.52-1 +else +LRANDOM_VERSION = 20120430.51-1 +endif +LRANDOM_SUBDIR = random +LRANDOM_LICENSE = Public domain + +$(eval $(luarocks-package)) diff --git a/package/lrzsz/Config.in b/package/lrzsz/Config.in new file mode 100644 index 0000000000..1b5da14871 --- /dev/null +++ b/package/lrzsz/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_LRZSZ + bool "lrzsz" + # It could technically build in a static-only environment, but + # it unconditionally redefines the error() and error_at_line() + # functions, which clashes with the definition from + # uClibc. Since the autotools packaging dates back from 1998, + # lots of work is needed to fix it, and do some proper tests + # on the availability of such functions. + depends on !BR2_STATIC_LIBS + help + Portable and fast implementation of the X/Y/Zmodem protocols. + + http://www.ohse.de/uwe/software/lrzsz.html + +comment "lrzsz needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/lrzsz/lrzsz.hash b/package/lrzsz/lrzsz.hash new file mode 100644 index 0000000000..932832d58b --- /dev/null +++ b/package/lrzsz/lrzsz.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1 lrzsz-0.12.20.tar.gz diff --git a/package/lrzsz/lrzsz.mk b/package/lrzsz/lrzsz.mk new file mode 100644 index 0000000000..453ef6250d --- /dev/null +++ b/package/lrzsz/lrzsz.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# lrzsz +# +################################################################################ + +LRZSZ_VERSION = 0.12.20 +LRZSZ_SITE = http://www.ohse.de/uwe/releases +LRZSZ_CONF_OPTS = --disable-timesync +LRZSZ_LICENSE = GPLv2+ +LRZSZ_LICENSE_FILES = COPYING + +define LRZSZ_POST_CONFIGURE_HOOKS + $(SED) "s/-lnsl//;" $(@D)/src/Makefile + $(SED) "s~\(#define ENABLE_SYSLOG.*\)~/* \1 */~;" $(@D)/config.h +endef + +define LRZSZ_BUILD_HOOKS + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" prefix="$(TARGET_DIR)" -C $(@D) +endef + +define LRZSZ_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/src/lrz $(TARGET_DIR)/usr/bin/rz + $(INSTALL) -m 0755 -D $(@D)/src/lsz $(TARGET_DIR)/usr/bin/sz + ln -sf rz $(TARGET_DIR)/usr/bin/lrz + ln -sf sz $(TARGET_DIR)/usr/bin/lsz +endef + +$(eval $(autotools-package)) diff --git a/package/lshw/0001-add-LIBS.patch b/package/lshw/0001-add-LIBS.patch new file mode 100644 index 0000000000..70b2a5b68f --- /dev/null +++ b/package/lshw/0001-add-LIBS.patch @@ -0,0 +1,30 @@ +We need to be able to pass extra LIBS when our toolchain lacks NLS support, +this way we can build libintl and link to it. +A good example is uClibc with locale support disabled. + +Signed-off-by: Gustavo Zacarias + +diff -Nura lshw-B.02.16.orig/src/gui/Makefile lshw-B.02.16/src/gui/Makefile +--- lshw-B.02.16.orig/src/gui/Makefile 2012-05-28 12:32:49.303885759 -0300 ++++ lshw-B.02.16/src/gui/Makefile 2012-05-28 12:33:33.850206001 -0300 +@@ -11,7 +11,7 @@ + CXXFLAGS=-g -Wall $(INCLUDES) $(DEFINES) $(RPM_OPT_FLAGS) + CFLAGS=$(CXXFLAGS) $(DEFINES) + GTKLIBS=$(shell pkg-config gtk+-2.0 gmodule-2.0 --libs) +-LIBS=-L../core -llshw -lresolv -lsqlite3 $(GTKLIBS) ++LIBS+=-L../core -llshw -lresolv -lsqlite3 $(GTKLIBS) + LDFLAGS= + ifneq ($(shell $(LD) --help 2| grep -- --as-needed), ) + LDFLAGS+= -Wl,--as-needed +diff -Nura lshw-B.02.16.orig/src/Makefile lshw-B.02.16/src/Makefile +--- lshw-B.02.16.orig/src/Makefile 2012-05-28 12:32:49.292885680 -0300 ++++ lshw-B.02.16/src/Makefile 2012-05-28 12:33:24.530139060 -0300 +@@ -30,7 +30,7 @@ + LDFLAGS+= -Wl,--as-needed + endif + LDSTATIC=-static +-LIBS=-llshw -lresolv ++LIBS+=-llshw -lresolv + ifeq ($(SQLITE), 1) + LIBS+= $(shell pkg-config --libs sqlite3) + endif diff --git a/package/lshw/Config.in b/package/lshw/Config.in new file mode 100644 index 0000000000..8cc935ab4d --- /dev/null +++ b/package/lshw/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LSHW + bool "lshw" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + lshw (Hardware Lister) is a small tool to provide + detailed information on the hardware configuration of the machine. + + http://ezix.org/project/wiki/HardwareLiSter + +comment "lshw needs a toolchain w/ C++, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR diff --git a/package/lshw/lshw.hash b/package/lshw/lshw.hash new file mode 100644 index 0000000000..8dfc7d3e4d --- /dev/null +++ b/package/lshw/lshw.hash @@ -0,0 +1,5 @@ +# Locally calculated +sha256 eb9cc053fa0f1e78685cb695596e73931bfb55d2377e3bc3b8b94aff4c5a489c lshw-B.02.17.tar.gz +sha256 2e5a3d63da8475db17fd90969bcb1930cf19d2b8da7be41edeea5c2a53878382 no-private-uint.patch +sha256 c8365f7ac8fc7a751c78d89ab446111bb1a235bc977a1b21e1b826c2e62361d1 basename-limits-long-bits.patch +sha256 9eba284061574e02a6b162ab20dff07c48693e00f781220ee974ba5c90d1cca9 988f5449791ebf869ab9fa7520463dab4eae3404.patch diff --git a/package/lshw/lshw.mk b/package/lshw/lshw.mk new file mode 100644 index 0000000000..e8e67e2cb2 --- /dev/null +++ b/package/lshw/lshw.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# lshw +# +################################################################################ + +LSHW_VERSION = B.02.17 +LSHW_SITE = http://ezix.org/software/files +LSHW_PATCH = \ + http://git.alpinelinux.org/cgit/aports/plain/testing/lshw/basename-limits-long-bits.patch \ + http://git.alpinelinux.org/cgit/aports/plain/testing/lshw/no-private-uint.patch \ + https://github.com/lyonel/lshw/commit/988f5449791ebf869ab9fa7520463dab4eae3404.patch +LSHW_LICENSE = GPLv2 +LSHW_LICENSE_FILES = COPYING + +LSHW_CFLAGS = $(TARGET_CFLAGS) +ifeq ($(BR2_ENABLE_LOCALE),) +LSHW_CFLAGS += -DNONLS +endif + +LSHW_MAKE_OPTS = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)" \ + RPM_OPT_FLAGS="$(LSHW_CFLAGS)" all +LSHW_MAKE_ENV = LIBS="$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)" +LSHW_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +define LSHW_BUILD_CMDS + $(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src $(LSHW_MAKE_OPTS) +endef + +define LSHW_INSTALL_TARGET_CMDS + $(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) \ + $(LSHW_MAKE_OPTS) install +endef + +$(eval $(generic-package)) diff --git a/package/lsof/0001-makefile.patch b/package/lsof/0001-makefile.patch new file mode 100644 index 0000000000..65b1b2e2a7 --- /dev/null +++ b/package/lsof/0001-makefile.patch @@ -0,0 +1,14 @@ +diff -ru lsof_4.81.orig/lsof_4.81_src/lib/Makefile.skel lsof_4.81/lsof_4.81_src/lib/Makefile.skel +--- a/lib/Makefile.skel 2001-02-13 03:12:22.000000000 +0100 ++++ b/lib/Makefile.skel 2006-11-29 13:51:44.000000000 +0100 +@@ -21,8 +21,8 @@ + all: ${LIB} + + ${LIB}: ${OBJ} +- ${AR} +- ${RANLIB} ++ ${AR} cr ${LIB} ${OBJ} ++ ${RANLIB} ${LIB} + + clean: FRC + rm -f ${LIB} ${OBJ} errs Makefile.bak a.out core diff --git a/package/lsof/0002-noportmap.patch b/package/lsof/0002-noportmap.patch new file mode 100644 index 0000000000..984e0d8eac --- /dev/null +++ b/package/lsof/0002-noportmap.patch @@ -0,0 +1,18 @@ +--- a/print.c 2006-08-23 13:37:43.000000000 -0600 ++++ b/print.c 2006-08-23 13:38:29.000000000 -0600 +@@ -148,6 +148,7 @@ + static void + fill_portmap() + { ++#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_RPC__) + char buf[128], *cp, *nm; + CLIENT *c; + int h, port, pr; +@@ -266,6 +267,7 @@ + Pth[pr][h] = pt; + } + clnt_destroy(c); ++#endif + } + + diff --git a/package/lsof/0003-override-cflags.patch b/package/lsof/0003-override-cflags.patch new file mode 100644 index 0000000000..135e599ac9 --- /dev/null +++ b/package/lsof/0003-override-cflags.patch @@ -0,0 +1,13 @@ +--- lsof_4.84/Configure 2008-10-21 18:21:45.000000000 +0200 ++++ lsof_4.84/Configure 2010-11-03 14:00:00.000000000 +0100 +@@ -5206,6 +5206,10 @@ + cp $LSOF_MKFC ${LSOF_LIB}/$LSOF_LIBMKF + fi # } + cat ./dialects/$LSOF_DIALECT_DIR/$LSOF_REST >> $LSOF_MKFC ++if test "X$LSOF_CFLAGS_OVERRIDE" != "X" # { ++then ++ sed -i -e 's/^CFLAGS=/override CFLAGS=/' $LSOF_MKFC ++fi # } + if test "X$LSOF_LIB_NO" = "X" # { + then + diff --git a/package/lsof/0004-remove-susvlegacy-funcs.patch b/package/lsof/0004-remove-susvlegacy-funcs.patch new file mode 100644 index 0000000000..fca66aee57 --- /dev/null +++ b/package/lsof/0004-remove-susvlegacy-funcs.patch @@ -0,0 +1,12 @@ +diff -rdup lsof_4.81.orig/lsof_4.81_src/dialects/linux/machine.h lsof_4.81/lsof_4.81_src/dialects/linux/machine.h +--- a/dialects/linux/machine.h 2007-04-24 18:20:58.000000000 +0200 ++++ b/dialects/linux/machine.h 2007-05-15 12:17:03.000000000 +0200 +@@ -616,6 +616,6 @@ + * zeromem is a macro that uses bzero or memset. + */ + +-#define zeromem(a, l) bzero(a, l) ++#define zeromem(a, l) memset(a, 0, l) + + #endif /* !defined(LSOF_MACHINE_H) */ + diff --git a/package/lsof/Config.in b/package/lsof/Config.in new file mode 100644 index 0000000000..7b7e47d65c --- /dev/null +++ b/package/lsof/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LSOF + bool "lsof" + depends on BR2_USE_MMU # fork() + help + lsof (LiSt Open Files) + The lsof tool lists information about files opened by + processes. + + http://people.freebsd.org/~abe/ diff --git a/package/lsof/lsof.hash b/package/lsof/lsof.hash new file mode 100644 index 0000000000..4a1249f1af --- /dev/null +++ b/package/lsof/lsof.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 81ac2fc5fdc944793baf41a14002b6deb5a29096b387744e28f8c30a360a3718 lsof_4.89.tar.bz2 diff --git a/package/lsof/lsof.mk b/package/lsof/lsof.mk new file mode 100644 index 0000000000..312d834b03 --- /dev/null +++ b/package/lsof/lsof.mk @@ -0,0 +1,57 @@ +################################################################################ +# +# lsof +# +################################################################################ + +LSOF_VERSION = 4.89 +LSOF_SOURCE = lsof_$(LSOF_VERSION).tar.bz2 +# Use http mirror since master ftp site access is very draconian +LSOF_SITE = http://www.mirrorservice.org/sites/lsof.itap.purdue.edu/pub/tools/unix/lsof +LSOF_LICENSE = lsof license +# License is repeated in each file, this is a relatively small one. +# It is also defined in 00README, but that contains a lot of other cruft. +LSOF_LICENSE_FILES = dialects/linux/dproto.h + +# Make certain full-blown lsof gets built after the busybox version (1.20+) +LSOF_DEPENDENCIES += $(if $(BR2_PACKAGE_BUSYBOX),busybox) + +ifeq ($(BR2_USE_WCHAR),) +define LSOF_CONFIGURE_WCHAR_FIXUPS + $(SED) 's,^#define[[:space:]]*HASWIDECHAR.*,#undef HASWIDECHAR,' \ + $(@D)/machine.h +endef +endif + +ifeq ($(BR2_ENABLE_LOCALE),) +define LSOF_CONFIGURE_LOCALE_FIXUPS + $(SED) 's,^#define[[:space:]]*HASSETLOCALE.*,#undef HASSETLOCALE,' \ + $(@D)/machine.h +endef +endif + +# The .tar.bz2 contains another .tar, which contains the source code. +define LSOF_EXTRACT_CMDS + $(call suitable-extractor,$(LSOF_SOURCE)) $(DL_DIR)/$(LSOF_SOURCE) | \ + $(TAR) -O $(TAR_OPTIONS) - lsof_$(LSOF_VERSION)/lsof_$(LSOF_VERSION)_src.tar | \ + $(TAR) --strip-components=1 -C $(LSOF_DIR) $(TAR_OPTIONS) - +endef + +define LSOF_CONFIGURE_CMDS + (cd $(@D) ; \ + echo n | $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" \ + LSOF_INCLUDE="$(STAGING_DIR)/usr/include" LSOF_CFLAGS_OVERRIDE=1 \ + LINUX_CLIB=-DGLIBCV=2 ./Configure linux) + $(LSOF_CONFIGURE_WCHAR_FIXUPS) + $(LSOF_CONFIGURE_LOCALE_FIXUPS) +endef + +define LSOF_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) DEBUG="$(TARGET_CFLAGS)" -C $(@D) +endef + +define LSOF_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/lsof $(TARGET_DIR)/usr/bin/lsof +endef + +$(eval $(generic-package)) diff --git a/package/lsqlite3/Config.in b/package/lsqlite3/Config.in new file mode 100644 index 0000000000..cc431ae08d --- /dev/null +++ b/package/lsqlite3/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LSQLITE3 + bool "lsqlite3" + select BR2_PACKAGE_SQLITE + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + help + a thin Lua wrapper for the SQLite3 library. + + http://lua.sqlite.org/ diff --git a/package/lsqlite3/lsqlite3.hash b/package/lsqlite3/lsqlite3.hash new file mode 100644 index 0000000000..23273bbf91 --- /dev/null +++ b/package/lsqlite3/lsqlite3.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 b49b5941af92a6e7834a45f76dba1f6ea8f817cda373655f59c9da78416d1dfc lsqlite3-0.9.3-0.src.rock diff --git a/package/lsqlite3/lsqlite3.mk b/package/lsqlite3/lsqlite3.mk new file mode 100644 index 0000000000..db65ae530f --- /dev/null +++ b/package/lsqlite3/lsqlite3.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# lsqlite3 +# +################################################################################ + +LSQLITE3_VERSION = 0.9.3-0 +LSQLITE3_SUBDIR = lsqlite3_fsl09w +LSQLITE3_DEPENDENCIES = sqlite +LSQLITE3_LICENSE = MIT + +$(eval $(luarocks-package)) diff --git a/package/lsuio/Config.in b/package/lsuio/Config.in new file mode 100644 index 0000000000..675a318c93 --- /dev/null +++ b/package/lsuio/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LSUIO + bool "lsuio" + help + list available userspace I/O (UIO) devices + + http://www.osadl.org/UIO.uio.0.html diff --git a/package/lsuio/lsuio.hash b/package/lsuio/lsuio.hash new file mode 100644 index 0000000000..d6077af2d4 --- /dev/null +++ b/package/lsuio/lsuio.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c88b3850248b2d3419e025abd7b9b0991c8bd33a2d4983f9608408a29900bfb5 lsuio-0.2.0.tar.gz diff --git a/package/lsuio/lsuio.mk b/package/lsuio/lsuio.mk new file mode 100644 index 0000000000..5f8a9658f3 --- /dev/null +++ b/package/lsuio/lsuio.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# lsuio +# +################################################################################ + +LSUIO_VERSION = 0.2.0 +LSUIO_SITE = http://www.osadl.org/projects/downloads/UIO/user +LSUIO_LICENSE = GPLv2 +LSUIO_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/ltp-testsuite/0001-fix-uClibc-build.patch b/package/ltp-testsuite/0001-fix-uClibc-build.patch new file mode 100644 index 0000000000..231bc83324 --- /dev/null +++ b/package/ltp-testsuite/0001-fix-uClibc-build.patch @@ -0,0 +1,51 @@ +O_DIRECTORY is only available if _GNU_SOURCE is defined + +https://github.com/linux-test-project/ltp/pull/58 + +Signed-off-by: Waldemar Brodkorb + +diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify01.c ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify01.c +--- ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify01.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify01.c 2016-03-05 00:55:02.977264913 +0100 +@@ -25,6 +25,7 @@ + * DESCRIPTION + * Check that fanotify work for a file + */ ++#define _GNU_SOURCE + #include "config.h" + + #include +diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify02.c ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify02.c +--- ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify02.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify02.c 2016-03-05 00:54:44.600558612 +0100 +@@ -25,6 +25,7 @@ + * DESCRIPTION + * Check that fanotify work for children of a directory + */ ++#define _GNU_SOURCE + #include "config.h" + + #include +diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify03.c ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify03.c +--- ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify03.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify03.c 2016-03-05 00:55:13.917685403 +0100 +@@ -25,6 +25,7 @@ + * DESCRIPTION + * Check that fanotify permission events work + */ ++#define _GNU_SOURCE + #include "config.h" + + #include +diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify04.c ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify04.c +--- ltp-full-20160126.orig/testcases/kernel/syscalls/fanotify/fanotify04.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/kernel/syscalls/fanotify/fanotify04.c 2016-03-05 00:55:24.530093286 +0100 +@@ -25,6 +25,8 @@ + * DESCRIPTION + * Check various fanotify special flags + */ ++ ++#define _GNU_SOURCE + #include "config.h" + + #include diff --git a/package/ltp-testsuite/0002-rpc-tirpc-disable-tirpc_auth_authdes_seccreate-tests.patch b/package/ltp-testsuite/0002-rpc-tirpc-disable-tirpc_auth_authdes_seccreate-tests.patch new file mode 100644 index 0000000000..f69b364efe --- /dev/null +++ b/package/ltp-testsuite/0002-rpc-tirpc-disable-tirpc_auth_authdes_seccreate-tests.patch @@ -0,0 +1,31 @@ +rpc-tirpc: disable tirpc_auth_authdes_*create tests + +Due to Buildroot patch 0007-Disable-DES-authentification-support.patch on +libtirpc, this library is built without method authdes_create. Any code +that uses this library, like the rpc-tirpc testsuite, thus fails to link. + +In the context of Buildroot, instead of disabling ltp-testsuite entirely, +just disable the problematic tests. + +Upstream-status: not applicable +Signed-off-by: Thomas De Schampheleire +--- + testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/Makefile | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/Makefile b/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/Makefile +index 45bc8a6..c04a088 100644 +--- a/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/Makefile ++++ b/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/tirpc/Makefile +@@ -19,4 +19,8 @@ + top_srcdir ?= ../../../../../../.. + + include $(top_srcdir)/include/mk/env_pre.mk ++ ++FILTER_OUT_DIRS += tirpc_auth_authdes_seccreate \ ++ tirpc_auth_authdes_create ++ + include $(top_srcdir)/include/mk/generic_trunk_target.mk +-- +1.9.5 + diff --git a/package/ltp-testsuite/0003-disable-profil-on-uClibc.patch b/package/ltp-testsuite/0003-disable-profil-on-uClibc.patch new file mode 100644 index 0000000000..d33b6771a7 --- /dev/null +++ b/package/ltp-testsuite/0003-disable-profil-on-uClibc.patch @@ -0,0 +1,27 @@ +uClibc-ng has no profil() support + +Signed-off-by: Waldemar Brodkorb + +diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/profil/profil01.c ltp-full-20160126/testcases/kernel/syscalls/profil/profil01.c +--- ltp-full-20160126.orig/testcases/kernel/syscalls/profil/profil01.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/kernel/syscalls/profil/profil01.c 2016-03-05 01:00:07.328962536 +0100 +@@ -37,6 +37,9 @@ + #define PROFIL_BUFLEN (32*1024) + + char *TCID = "profil01"; ++ ++#if !defined(__UCLIBC__) ++ + int TST_TOTAL = 1; + + static volatile sig_atomic_t profil_done; +@@ -124,3 +127,9 @@ + + tst_exit(); + } ++#else /* systems that dont support profil */ ++int main(void) ++{ ++ tst_brkm(TCONF, NULL, "system doesn't have profil support"); ++} ++#endif diff --git a/package/ltp-testsuite/0004-disable-ustat-on-uClibc.patch b/package/ltp-testsuite/0004-disable-ustat-on-uClibc.patch new file mode 100644 index 0000000000..7a1f017169 --- /dev/null +++ b/package/ltp-testsuite/0004-disable-ustat-on-uClibc.patch @@ -0,0 +1,70 @@ +uClibc-ng need __UCLIBC_SV4_DEPRECATED__ enabled for ustat + +Signed-off-by: Waldemar Brodkorb + +diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/ustat/ustat01.c ltp-full-20160126/testcases/kernel/syscalls/ustat/ustat01.c +--- ltp-full-20160126.orig/testcases/kernel/syscalls/ustat/ustat01.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/kernel/syscalls/ustat/ustat01.c 2016-03-05 01:15:39.492789841 +0100 +@@ -20,7 +20,9 @@ + */ + + #include ++#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__) + #include ++#endif + #include + #include + #include +@@ -30,6 +32,9 @@ + static void setup(void); + + char *TCID = "ustat01"; ++ ++#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__) ++ + int TST_TOTAL = 1; + + static dev_t dev_num; +@@ -79,3 +84,10 @@ + + dev_num = buf.st_dev; + } ++#else /* systems that dont support ustat */ ++int main(void) ++{ ++ tst_brkm(TCONF, NULL, "system doesn't have ustat support"); ++} ++#endif ++ +diff -Nur ltp-full-20160126.orig/testcases/kernel/syscalls/ustat/ustat02.c ltp-full-20160126/testcases/kernel/syscalls/ustat/ustat02.c +--- ltp-full-20160126.orig/testcases/kernel/syscalls/ustat/ustat02.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/kernel/syscalls/ustat/ustat02.c 2016-03-05 01:15:55.677411889 +0100 +@@ -21,7 +21,9 @@ + */ + + #include ++#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__) + #include ++#endif + #include + #include + #include +@@ -32,6 +34,8 @@ + + char *TCID = "ustat02"; + ++#if !defined(__UCLIBC__) || defined(__UCLIBC_SV4_DEPRECATED__) ++ + static dev_t invalid_dev = -1; + static dev_t root_dev; + struct ustat ubuf; +@@ -101,3 +105,9 @@ + + root_dev = buf.st_dev; + } ++#else /* systems that dont support ustat */ ++int main(void) ++{ ++ tst_brkm(TCONF, NULL, "system doesn't have ustat support"); ++} ++#endif diff --git a/package/ltp-testsuite/0005-rpc-fix-uClibc.patch b/package/ltp-testsuite/0005-rpc-fix-uClibc.patch new file mode 100644 index 0000000000..1d9152b061 --- /dev/null +++ b/package/ltp-testsuite/0005-rpc-fix-uClibc.patch @@ -0,0 +1,125 @@ +rusers.h is unused and not available for uClibc-ng / libtirpc + +Signed-off-by: Waldemar Brodkorb + +diff -Nur ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_auth_destroy/rpc_auth_destroy.c ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_auth_destroy/rpc_auth_destroy.c +--- ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_auth_destroy/rpc_auth_destroy.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_auth_destroy/rpc_auth_destroy.c 2016-03-05 02:16:56.274105305 +0100 +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff -Nur ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_authnone_create/rpc_authnone_create.c ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_authnone_create/rpc_authnone_create.c +--- ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_authnone_create/rpc_authnone_create.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_authnone_create/rpc_authnone_create.c 2016-03-05 02:16:32.641196984 +0100 +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff -Nur ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create/rpc_authunix_create.c ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create/rpc_authunix_create.c +--- ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create/rpc_authunix_create.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create/rpc_authunix_create.c 2016-03-05 02:21:09.831850681 +0100 +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff -Nur ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create_default/rpc_authunix_create_default.c ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create_default/rpc_authunix_create_default.c +--- ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create_default/rpc_authunix_create_default.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_auth_authunix_create_default/rpc_authunix_create_default.c 2016-03-05 02:18:57.370759601 +0100 +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff -Nur ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/rpc_clnttcp_create.c ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/rpc_clnttcp_create.c +--- ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/rpc_clnttcp_create.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/rpc_clnttcp_create.c 2016-03-05 02:23:32.113319210 +0100 +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff -Nur ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/rpc_clnttcp_create_limits.c ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/rpc_clnttcp_create_limits.c +--- ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/rpc_clnttcp_create_limits.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/rpc_clnttcp_create_limits.c 2016-03-05 02:23:39.221592413 +0100 +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff -Nur ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/rpc_clnttcp_create_stress.c ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/rpc_clnttcp_create_stress.c +--- ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/rpc_clnttcp_create_stress.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clnttcp_create/rpc_clnttcp_create_stress.c 2016-03-05 02:23:48.565951560 +0100 +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff -Nur ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/rpc_clntudp_bufcreate.c ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/rpc_clntudp_bufcreate.c +--- ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/rpc_clntudp_bufcreate.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/rpc_clntudp_bufcreate.c 2016-03-05 02:23:56.706264429 +0100 +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff -Nur ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/rpc_clntudp_bufcreate_limits.c ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/rpc_clntudp_bufcreate_limits.c +--- ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/rpc_clntudp_bufcreate_limits.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_bufcreate/rpc_clntudp_bufcreate_limits.c 2016-03-05 02:24:03.818537786 +0100 +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff -Nur ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/rpc_clntudp_create.c ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/rpc_clntudp_create.c +--- ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/rpc_clntudp_create.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/rpc_clntudp_create.c 2016-03-05 02:24:10.518795308 +0100 +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + #include + #include + #include +diff -Nur ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/rpc_clntudp_create_stress.c ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/rpc_clntudp_create_stress.c +--- ltp-full-20160126.orig/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/rpc_clntudp_create_stress.c 2016-01-26 13:35:25.000000000 +0100 ++++ ltp-full-20160126/testcases/network/rpc/rpc-tirpc/tests_pack/rpc_suite/rpc/rpc_createdestroy_clntudp_create/rpc_clntudp_create_stress.c 2016-03-05 02:24:20.095163371 +0100 +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + #include + #include + #include diff --git a/package/ltp-testsuite/Config.in b/package/ltp-testsuite/Config.in new file mode 100644 index 0000000000..8475902158 --- /dev/null +++ b/package/ltp-testsuite/Config.in @@ -0,0 +1,28 @@ +comment "ltp-testsuite needs specific uClibc options, see help" + depends on BR2_PACKAGE_LTP_TESTSUITE + depends on BR2_TOOLCHAIN_USES_UCLIBC + +config BR2_PACKAGE_LTP_TESTSUITE + bool "ltp-testsuite" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC + # does not build, cachectl.h issue + depends on !BR2_nios2 + help + The Linux Test Project provides a huge testsuite for Linux. + + The LTP testsuite uses several functions that are considered + obsolete, such as sigset() and others. Therefore, the LTP + testsuite does not build with Buildroot's default uClibc + configuration, and options such as DO_XSI_MATH, + UCLIBC_HAS_OBSOLETE_BSD_SIGNAL and UCLIBC_SV4_DEPRECATED + are needed. + + http://linux-test-project.github.io + +comment "ltp-testsuite needs a non-musl toolchain w/ threads" + depends on !BR2_nios2 + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_USES_MUSL diff --git a/package/ltp-testsuite/ltp-testsuite.hash b/package/ltp-testsuite/ltp-testsuite.hash new file mode 100644 index 0000000000..f3c1be5d55 --- /dev/null +++ b/package/ltp-testsuite/ltp-testsuite.hash @@ -0,0 +1,4 @@ +# From: https://github.com/linux-test-project/ltp/releases/download/20160126/ltp-full-20160126.tar.xz.md5 +md5 fc3b7411cdf17b2608e26c05d36fc26a ltp-full-20160126.tar.xz +# From: https://github.com/linux-test-project/ltp/releases/download/20160126/ltp-full-20160126.tar.xz.sha1 +sha1 a39c9b05edb942cde23a1f7fa08289a5e427fa04 ltp-full-20160126.tar.xz diff --git a/package/ltp-testsuite/ltp-testsuite.mk b/package/ltp-testsuite/ltp-testsuite.mk new file mode 100644 index 0000000000..cf48072f81 --- /dev/null +++ b/package/ltp-testsuite/ltp-testsuite.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# ltp-testsuite +# +################################################################################ + +LTP_TESTSUITE_VERSION = 20160126 +LTP_TESTSUITE_SOURCE = ltp-full-$(LTP_TESTSUITE_VERSION).tar.xz +LTP_TESTSUITE_SITE = https://github.com/linux-test-project/ltp/releases/download/$(LTP_TESTSUITE_VERSION) +LTP_TESTSUITE_LICENSE = GPLv2, GPLv2+ +LTP_TESTSUITE_LICENSE_FILES = COPYING +LTP_TESTSUITE_CONF_OPTS += \ + --with-power-management-testsuite \ + --with-realtime-testsuite + +ifeq ($(BR2_LINUX_KERNEL),y) +LTP_TESTSUITE_DEPENDENCIES += linux +LTP_TESTSUITE_MAKE_ENV += $(LINUX_MAKE_FLAGS) +LTP_TESTSUITE_CONF_OPTS += --with-linux-dir=$(LINUX_DIR) +else +LTP_TESTSUITE_CONF_OPTS += --without-modules +endif + +# Needs libcap with file attrs which needs attr, so both required +ifeq ($(BR2_PACKAGE_LIBCAP)$(BR2_PACKAGE_ATTR),yy) +LTP_TESTSUITE_DEPENDENCIES += libcap +else +LTP_TESTSUITE_CONF_ENV += ac_cv_lib_cap_cap_compare=no +endif + +# ltp-testsuite uses , which isn't compatible with largefile +# support. +LTP_TESTSUITE_CFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) +LTP_TESTSUITE_CPPFLAGS = $(filter-out -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS)) +LTP_TESTSUITE_LIBS = + +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +LTP_TESTSUITE_DEPENDENCIES += libtirpc host-pkgconf +LTP_TESTSUITE_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" +LTP_TESTSUITE_LIBS += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`" +endif + +LTP_TESTSUITE_CONF_ENV += \ + CFLAGS="$(LTP_TESTSUITE_CFLAGS)" \ + CPPFLAGS="$(LTP_TESTSUITE_CPPFLAGS)" \ + LIBS="$(LTP_TESTSUITE_LIBS)" \ + SYSROOT="$(STAGING_DIR)" + +# Requires uClibc fts and bessel support, normally not enabled +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +define LTP_TESTSUITE_REMOVE_UNSUPPORTED + rm -rf $(@D)/testcases/kernel/controllers/cpuset/ + rm -rf $(@D)/testcases/misc/math/float/bessel/ + rm -f $(@D)/testcases/misc/math/float/float_bessel.c +endef +LTP_TESTSUITE_POST_PATCH_HOOKS += LTP_TESTSUITE_REMOVE_UNSUPPORTED +endif + + +$(eval $(autotools-package)) diff --git a/package/ltrace/0001-arm-plt.patch b/package/ltrace/0001-arm-plt.patch new file mode 100644 index 0000000000..f130ce8426 --- /dev/null +++ b/package/ltrace/0001-arm-plt.patch @@ -0,0 +1,30 @@ +From 04377d28135e351c8d096c4392a493e937416815 Mon Sep 17 00:00:00 2001 +From: Alexandre Belloni +Date: Thu, 24 Jul 2014 23:15:20 +0200 +Subject: [PATCH] Allow building with uclibc toolchains + +Unfortunately, uclicbc doesn't define SHT_ARM_ATTRIBUTES in elf.h + +Signed-off-by: Alexandre Belloni +--- + sysdeps/linux-gnu/arm/plt.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sysdeps/linux-gnu/arm/plt.c b/sysdeps/linux-gnu/arm/plt.c +index 9e9e37f0c5b0..a0a5795eb9cb 100644 +--- a/sysdeps/linux-gnu/arm/plt.c ++++ b/sysdeps/linux-gnu/arm/plt.c +@@ -28,6 +28,10 @@ + #include "library.h" + #include "ltrace-elf.h" + ++#ifndef SHT_ARM_ATTRIBUTES ++#define SHT_ARM_ATTRIBUTES 0x70000003 ++#endif ++ + static int + get_hardfp(uint64_t abi_vfp_args) + { +-- +1.9.1 + diff --git a/package/ltrace/0002-sparc-add-missing-library.h-include.patch b/package/ltrace/0002-sparc-add-missing-library.h-include.patch new file mode 100644 index 0000000000..01f1f2edb3 --- /dev/null +++ b/package/ltrace/0002-sparc-add-missing-library.h-include.patch @@ -0,0 +1,36 @@ +From 4e58f53b7886420d002e5919f279acd6d7c4afd1 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 22 Dec 2015 21:47:45 +0100 +Subject: [PATCH] sparc: add missing library.h include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes the following build failure on sparc: + +plt.c: In function ‘sym2addr’: +plt.c:33:12: error: dereferencing pointer to incomplete type + return sym->enter_addr; + ^ +plt.c:34:1: warning: control reaches end of non-void function [-Wreturn-type] + +Signed-off-by: Thomas Petazzoni +--- + sysdeps/linux-gnu/sparc/plt.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sysdeps/linux-gnu/sparc/plt.c b/sysdeps/linux-gnu/sparc/plt.c +index 3d2e589..959eed1 100644 +--- a/sysdeps/linux-gnu/sparc/plt.c ++++ b/sysdeps/linux-gnu/sparc/plt.c +@@ -21,6 +21,7 @@ + #include + #include "proc.h" + #include "common.h" ++#include "library.h" + + GElf_Addr + arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) { +-- +2.6.4 + diff --git a/package/ltrace/Config.in b/package/ltrace/Config.in new file mode 100644 index 0000000000..ff4d7bd3b0 --- /dev/null +++ b/package/ltrace/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_LTRACE + bool "ltrace" + # ltrace normally has mips/mipsel support, but it's currently + # broken (error: 'struct ltelf' has no member named + # 'relplt_count'). Issue reported upstream at + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=756764. + depends on (BR2_i386 || BR2_arm || BR2_mips || BR2_mipsel \ + || BR2_powerpc || BR2_sparc || BR2_x86_64 || BR2_xtensa) + select BR2_PACKAGE_ELFUTILS + depends on BR2_USE_WCHAR # elfutils + depends on !BR2_STATIC_LIBS # elfutils + depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils + help + Debugging program which runs a specified command until it exits. + While the command is executing, ltrace intercepts and records + the dynamic library calls which are called by the executed + process and the signals received by that process. + + http://ltrace.org + +comment "ltrace needs a uclibc or (e)glibc toolchain w/ wchar, dynamic library" + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \ + || !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) diff --git a/package/ltrace/ltrace.mk b/package/ltrace/ltrace.mk new file mode 100644 index 0000000000..eac42be328 --- /dev/null +++ b/package/ltrace/ltrace.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# ltrace +# +################################################################################ + +LTRACE_VERSION = c22d359433b333937ee3d803450dc41998115685 +LTRACE_SITE = git://anonscm.debian.org/collab-maint/ltrace.git +LTRACE_DEPENDENCIES = elfutils +LTRACE_CONF_OPTS = --disable-werror +LTRACE_LICENSE = GPLv2 +LTRACE_LICENSE_FILES = COPYING +LTRACE_AUTORECONF = YES + +define LTRACE_CREATE_CONFIG_M4 + mkdir -p $(@D)/config/m4 +endef +LTRACE_POST_PATCH_HOOKS += LTRACE_CREATE_CONFIG_M4 + +# ltrace can use libunwind only if libc has backtrace() support +# We don't normally do so for uClibc and we can't know if it's external +# Also ltrace with libunwind support is broken for MIPS so we disable it +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC)$(BR2_mips)$(BR2_mipsel),) +# --with-elfutils only selects unwinding support backend. elfutils is a +# mandatory dependency regardless. +LTRACE_CONF_OPTS += --with-libunwind=yes --with-elfutils=no +LTRACE_DEPENDENCIES += libunwind +else +LTRACE_CONF_OPTS += --with-libunwind=no +endif +endif + +$(eval $(autotools-package)) diff --git a/package/ltris/0001-fix-gcc5-build.patch b/package/ltris/0001-fix-gcc5-build.patch new file mode 100644 index 0000000000..66d0fa3df7 --- /dev/null +++ b/package/ltris/0001-fix-gcc5-build.patch @@ -0,0 +1,308 @@ +Upstream patch to fix build with GCC 5 + +Obtained from the LGames Subversion repository with the following command: +svn diff -c164 svn://svn.code.sf.net/p/lgames/code/trunk/ltris + +Signed-off-by: Rodrigo Rebello + +Revision log message: +------------------------------------------------------------------------ +r164 | kulkanie | 2015-05-16 05:48:02 -0300 (Sat, 16 May 2015) | 1 line + +removed all inline keywords +------------------------------------------------------------------------ + +Line added to LTris ChangeLog concerning the change: +- removed all inline keywords to work with GCC 5 (2015/05/16 MS) + +Author: Michael Speck + +Index: src/sdl.c +=================================================================== +--- a/src/sdl.c (revision 163) ++++ b/src/sdl.c (revision 164) +@@ -244,7 +244,7 @@ + #endif + + /* return full path of bitmap */ +-inline void get_full_bmp_path( char *full_path, char *file_name ) ++void get_full_bmp_path( char *full_path, char *file_name ) + { + sprintf(full_path, "%s/gfx/%s", SRC_DIR, file_name ); + } +@@ -330,7 +330,7 @@ + /* + lock surface + */ +-inline void lock_surf(SDL_Surface *sur) ++void lock_surf(SDL_Surface *sur) + { + if (SDL_MUSTLOCK(sur)) + SDL_LockSurface(sur); +@@ -339,7 +339,7 @@ + /* + unlock surface + */ +-inline void unlock_surf(SDL_Surface *sur) ++void unlock_surf(SDL_Surface *sur) + { + if (SDL_MUSTLOCK(sur)) + SDL_UnlockSurface(sur); +@@ -666,7 +666,7 @@ + /* + lock font surface + */ +-inline void lock_font(Font *fnt) ++void lock_font(Font *fnt) + { + if (SDL_MUSTLOCK(fnt->pic)) + SDL_LockSurface(fnt->pic); +@@ -675,7 +675,7 @@ + /* + unlock font surface + */ +-inline void unlock_font(Font *fnt) ++void unlock_font(Font *fnt) + { + if (SDL_MUSTLOCK(fnt->pic)) + SDL_UnlockSurface(fnt->pic); +@@ -905,7 +905,7 @@ + /* + update rectangle (0,0,0,0)->fullscreen + */ +-inline void refresh_screen(int x, int y, int w, int h) ++void refresh_screen(int x, int y, int w, int h) + { + SDL_UpdateRect(sdl.screen, x, y, w, h); + } +@@ -1055,7 +1055,7 @@ + /* + lock surface + */ +-inline void lock_screen() ++void lock_screen() + { + if (SDL_MUSTLOCK(sdl.screen)) + SDL_LockSurface(sdl.screen); +@@ -1064,7 +1064,7 @@ + /* + unlock surface + */ +-inline void unlock_screen() ++void unlock_screen() + { + if (SDL_MUSTLOCK(sdl.screen)) + SDL_UnlockSurface(sdl.screen); +@@ -1073,7 +1073,7 @@ + /* + flip hardware screens (double buffer) + */ +-inline void flip_screen() ++void flip_screen() + { + SDL_Flip(sdl.screen); + } +@@ -1132,7 +1132,7 @@ + /* + get milliseconds since last call + */ +-inline int get_time() ++int get_time() + { + int ms; + cur_time = SDL_GetTicks(); +@@ -1148,7 +1148,7 @@ + /* + reset timer + */ +-inline void reset_timer() ++void reset_timer() + { + last_time = SDL_GetTicks(); + } +Index: src/sdl.h +=================================================================== +--- a/src/sdl.h (revision 163) ++++ b/src/sdl.h (revision 164) +@@ -41,8 +41,8 @@ + SDL_Surface* load_surf(char *fname, int f); + SDL_Surface* create_surf(int w, int h, int f); + void free_surf( SDL_Surface **surf ); +-inline void lock_surf(SDL_Surface *sur); +-inline void unlock_surf(SDL_Surface *sur); ++void lock_surf(SDL_Surface *sur); ++void unlock_surf(SDL_Surface *sur); + void blit_surf(void); + void alpha_blit_surf(int alpha); + void fill_surf(int c); +@@ -86,8 +86,8 @@ + Font* load_fixed_font(char *fname, int off, int len, int w); + void free_font(Font **sfnt); + int write_text(Font *sfnt, SDL_Surface *dest, int x, int y, char *str, int alpha); +-inline void lock_font(Font *sfnt); +-inline void unlock_font(Font *sfnt); ++void lock_font(Font *sfnt); ++void unlock_font(Font *sfnt); + SDL_Rect last_write_rect(Font *fnt); + int text_width(Font *fnt, char *str); + +@@ -132,14 +132,14 @@ + char** get_mode_names( int *count ); + int set_video_mode( Video_Mode mode ); + void hardware_cap(); +-inline void refresh_screen( int x, int y, int w, int h ); ++void refresh_screen( int x, int y, int w, int h ); + void refresh_rects(); + void add_refresh_rect(int x, int y, int w, int h); + int wait_for_key(); + void wait_for_click(); +-inline void lock_screen(); +-inline void unlock_screen(); +-inline void flip_screen(); ++void lock_screen(); ++void unlock_screen(); ++void flip_screen(); + void fade_screen( int type, int ms ); + void take_screenshot( int i ); + +@@ -148,8 +148,8 @@ + SDL_Cursor* create_cursor( int width, int height, int hot_x, int hot_y, char *source ); + + /* timer */ +-inline int get_time(); +-inline void reset_timer(); ++int get_time(); ++void reset_timer(); + + #ifdef __cplusplus + }; +Index: src/tools.c +=================================================================== +--- a/src/tools.c (revision 163) ++++ b/src/tools.c (revision 164) +@@ -23,7 +23,7 @@ + #include "ltris.h" + + /* compares to strings and returns true if their first strlen(str1) chars are equal */ +-inline int strequal( char *str1, char *str2 ) ++int strequal( char *str1, char *str2 ) + { + if ( strlen( str1 ) != strlen( str2 ) ) return 0; + return ( !strncmp( str1, str2, strlen( str1 ) ) ); +@@ -30,7 +30,7 @@ + } + + /* set delay to ms milliseconds */ +-inline void delay_set( Delay *delay, int ms ) ++void delay_set( Delay *delay, int ms ) + { + delay->limit = ms; + delay->cur = 0; +@@ -37,13 +37,13 @@ + } + + /* reset delay ( cur = 0 )*/ +-inline void delay_reset( Delay *delay ) ++void delay_reset( Delay *delay ) + { + delay->cur = 0; + } + + /* check if times out and reset */ +-inline int delay_timed_out( Delay *delay, int ms ) ++int delay_timed_out( Delay *delay, int ms ) + { + delay->cur += ms; + if ( delay->cur >= delay->limit ) { +@@ -56,12 +56,12 @@ + } + + /* set timer so that we have a time out next call of delay_timed_out() */ +-inline void delay_force_time_out( Delay *delay ) ++void delay_force_time_out( Delay *delay ) + { + delay->cur = delay->limit; + } + +-inline void goto_tile( int *x, int *y, int d ) ++void goto_tile( int *x, int *y, int d ) + { + /* 0 -up, clockwise, 5 - left up */ + switch ( d ) { +@@ -326,24 +326,24 @@ + the target value until reached when counter_update() is called. + ==================================================================== + */ +-inline void counter_set( Counter *counter, double value ) ++void counter_set( Counter *counter, double value ) + { + counter->value = value; + counter->approach = value; + } +-inline void counter_add( Counter *counter, double add ) ++void counter_add( Counter *counter, double add ) + { + counter->value += add; + } +-inline double counter_get_approach( Counter counter ) ++double counter_get_approach( Counter counter ) + { + return counter.approach; + } +-inline double counter_get( Counter counter ) ++double counter_get( Counter counter ) + { + return counter.value; + } +-inline void counter_update( Counter *counter, int ms ) ++void counter_update( Counter *counter, int ms ) + { + double change; + if ( counter->approach == counter->value ) return; +Index: src/bowl.c +=================================================================== +--- a/src/bowl.c (revision 163) ++++ b/src/bowl.c (revision 164) +@@ -333,7 +333,7 @@ + Set a tile contents and pixel contents. + ==================================================================== + */ +-inline void bowl_set_tile( Bowl *bowl, int x, int y, int tile_id ) ++void bowl_set_tile( Bowl *bowl, int x, int y, int tile_id ) + { + int i, j = y * bowl->block_size; + bowl->contents[x][y] = tile_id; +Index: src/tools.h +=================================================================== +--- a/src/tools.h (revision 163) ++++ b/src/tools.h (revision 164) +@@ -33,7 +33,7 @@ + #define VEC_DIST( vec1, vec2 ) ( sqrt( ( vec1.x - vec2.x ) * ( vec1.x - vec2.x ) + ( vec1.y - vec2.y ) * ( vec1.y - vec2.y ) ) ) + + /* compares to strings and returns true if their first strlen(str1) chars are equal */ +-inline int strequal( char *str1, char *str2 ); ++int strequal( char *str1, char *str2 ); + + /* delete lines */ + void delete_lines( char **lines, int line_number ); +@@ -45,16 +45,16 @@ + } Delay; + + /* set delay to ms milliseconds */ +-inline void delay_set( Delay *delay, int ms ); ++void delay_set( Delay *delay, int ms ); + + /* reset delay ( cur = 0 )*/ +-inline void delay_reset( Delay *delay ); ++void delay_reset( Delay *delay ); + + /* check if time's out ( add ms milliseconds )and reset */ +-inline int delay_timed_out( Delay *delay, int ms ); ++int delay_timed_out( Delay *delay, int ms ); + + /* set timer so that we have a time out next call of delay_timed_out() */ +-inline void delay_force_time_out( Delay *delay ); ++void delay_force_time_out( Delay *delay ); + + /* return distance betwteen to map positions */ + int get_dist( int x1, int y1, int x2, int y2 ); diff --git a/package/ltris/Config.in b/package/ltris/Config.in new file mode 100644 index 0000000000..bf73489da4 --- /dev/null +++ b/package/ltris/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_LTRIS + bool "LTris" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_SDL + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + LTris is a tetris clone, using SDL. It optionally requires + SDL_mixer for audio support. A display with minimum 640x480 + resolution and a keyboard are recommended. + + http://lgames.sourceforge.net/index.php?project=LTris + +if BR2_PACKAGE_LTRIS + +config BR2_PACKAGE_LTRIS_AUDIO + bool "audio support" + default y + select BR2_PACKAGE_SDL_MIXER + help + Activates audio support in LTris. Will add SDL_mixer. + +endif diff --git a/package/ltris/ltris.hash b/package/ltris/ltris.hash new file mode 100644 index 0000000000..5c0fcde7a0 --- /dev/null +++ b/package/ltris/ltris.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 8f6a9e7719d22004aee153db29ffd9ca41c7a6cd87fc791591994eecc2e625a1 ltris-1.0.19.tar.gz diff --git a/package/ltris/ltris.mk b/package/ltris/ltris.mk new file mode 100644 index 0000000000..bbd270ea13 --- /dev/null +++ b/package/ltris/ltris.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# ltris +# +################################################################################ + +LTRIS_SITE = http://downloads.sourceforge.net/lgames/ltris +LTRIS_VERSION = 1.0.19 +LTRIS_LICENSE = GPLv2+ +LTRIS_LICENSE_FILES = COPYING + +LTRIS_DEPENDENCIES = sdl + +LTRIS_CONF_ENV = \ + SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \ + LIBS="$(LTRIS_LIBS)" + +ifeq ($(BR2_PACKAGE_LTRIS_AUDIO),y) +LTRIS_DEPENDENCIES += sdl_mixer host-pkgconf +LTRIS_CONF_OPTS += --enable-sound +# configure script does NOT use pkg-config to figure out how to link +# with sdl_mixer, breaking static linking as sdl_mixer can use libmad +LTRIS_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs SDL_mixer` +else +LTRIS_CONF_OPTS += --disable-sound +endif + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +LTRIS_DEPENDENCIES += gettext +LTRIS_LIBS += -lintl +endif + +$(eval $(autotools-package)) diff --git a/package/lttng-babeltrace/0001-no-posix-fallocate-in-uclibc.patch b/package/lttng-babeltrace/0001-no-posix-fallocate-in-uclibc.patch new file mode 100644 index 0000000000..d77825fab6 --- /dev/null +++ b/package/lttng-babeltrace/0001-no-posix-fallocate-in-uclibc.patch @@ -0,0 +1,37 @@ +Do not call posix_fallocate() on uClibc + +uClibc does not implement posix_fallocate(), and posix_fallocate() is +mostly only an hint to the kernel that we will need such or such +amount of space inside a file. So we just don't call posix_fallocate() +when building against uClibc. + +Signed-off-by: Thomas Petazzoni +[Peter: add #include +--- + formats/ctf/ctf.c | 3 +++ + 1 file changed, 3 insertions(+) + +Index: lttng-babeltrace-0.8/formats/ctf/ctf.c +=================================================================== +--- lttng-babeltrace-0.8.orig/formats/ctf/ctf.c ++++ lttng-babeltrace-0.8/formats/ctf/ctf.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -384,9 +385,11 @@ + } + pos->content_size = -1U; /* Unknown at this point */ + pos->packet_size = WRITE_PACKET_LEN; ++#ifndef __UCLIBC__ + off = posix_fallocate(pos->fd, pos->mmap_offset, + pos->packet_size / CHAR_BIT); + assert(off >= 0); ++#endif + pos->offset = 0; + } else { + read_next_packet: diff --git a/package/lttng-babeltrace/0002-configure-fix-uuid-support-detection-on-static-build.patch b/package/lttng-babeltrace/0002-configure-fix-uuid-support-detection-on-static-build.patch new file mode 100644 index 0000000000..849c0a3d26 --- /dev/null +++ b/package/lttng-babeltrace/0002-configure-fix-uuid-support-detection-on-static-build.patch @@ -0,0 +1,63 @@ +From 670d0961a823df0db28f39a354430f3dc2519418 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sat, 28 May 2016 12:53:33 +0200 +Subject: [PATCH] configure: fix uuid support detection on static build + +This change adds uuid support detection using pkg-config, before falling +back on default AC_CHECK_LIB calls. + +Using flags from pkg-config is useful for static build, because they +also include dependency flags; whereas + +AC_CHECK_LIB function achieves its test by trying to link against the +requested library, without taking care of its dependency +requirements/flags. Therefore, in case of static build, it can fail on +the uuid detection like [1], because the uuid's dependency flags +(regarding gettext) are missing. +Instead, using pkg-config to do the check will take care of getting and +setting all required flags. + +This change adds uuid detection using pkg-config helper before falling +back on the standard AC_CHECK_LIB detection for platforms missing +pkg-config. + +This issue [1] has been triggered on Buildroot farms. + +[1] http://autobuild.buildroot.net/results/43b/43b98ddf9eb44152ed9ac4a98d887af14831d8da/build-end.log + +Signed-off-by: Samuel Martin +--- + configure.ac | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 632fe39..b344fa8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -65,6 +65,15 @@ esac + AM_CONDITIONAL([BABELTRACE_BUILD_WITH_MINGW], [test "x$MINGW32" = "xyes"]) + + # Check for libuuid ++PKG_CHECK_MODULES([UUID], [uuid], ++[ ++ LIBS="${UUID_LIBS} ${LIBS}" ++ CFLAGS="${CFLAGS} ${UUID_CFLAGS}" ++ AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_LIBUUID], 1, [Has libuuid support.]) ++ have_libuuid=yes ++], ++[ ++# try detecting libuuid without pkg-config + AC_CHECK_LIB([uuid], [uuid_generate], + [ + AC_DEFINE_UNQUOTED([BABELTRACE_HAVE_LIBUUID], 1, [Has libuuid support.]) +@@ -83,6 +92,7 @@ AC_CHECK_LIB([uuid], [uuid_generate], + AC_MSG_ERROR([Cannot find libuuid uuid_generate nor libc uuid_create. Use [LDFLAGS]=-Ldir to specify their location.]) + fi + ]) ++]) + ] + ) + AM_CONDITIONAL([BABELTRACE_BUILD_WITH_LIBUUID], [test "x$have_libuuid" = "xyes"]) +-- +2.8.3 + diff --git a/package/lttng-babeltrace/Config.in b/package/lttng-babeltrace/Config.in new file mode 100644 index 0000000000..d362779eac --- /dev/null +++ b/package/lttng-babeltrace/Config.in @@ -0,0 +1,32 @@ +config BR2_PACKAGE_LTTNG_BABELTRACE + bool "lttng-babeltrace" + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_POPT + depends on BR2_USE_WCHAR # libglib2, util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + help + The Babeltrace project provides trace read and write + libraries, as well as a trace converter application. Plugins + can be created for any trace format to allow its conversion + to/from another trace format. + + Babeltrace is the reference implementation of the Common + Trace Format (see ). Babeltrace + can decode and display LTTng traces, since the latter are + written using the CTF format. + + Having this tool on the target is not mandatory. You can + transfer the binary trace output from the target to your + development workstation, and use babeltrace here. Buildroot + automatically builds a host babeltrace in + $(O)/host/usr/bin/babeltrace as a dependency of the + lttng-tools package. + + http://www.efficios.com/babeltrace + +comment "lttng-babeltrace needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/lttng-babeltrace/lttng-babeltrace.hash b/package/lttng-babeltrace/lttng-babeltrace.hash new file mode 100644 index 0000000000..a9f45b212e --- /dev/null +++ b/package/lttng-babeltrace/lttng-babeltrace.hash @@ -0,0 +1,7 @@ +# From http://lttng.org/files/babeltrace/babeltrace-1.2.4.tar.bz2.md5 +md5 20a806fa7570e69a91707855a98f3ca6 babeltrace-1.2.4.tar.bz2 +# From http://lttng.org/files/babeltrace/babeltrace-1.2.4.tar.bz2.sha1 +sha1 c72a80e8fd905cb1ae3b0cf88885517faafe0fa1 babeltrace-1.2.4.tar.bz2 +# Locally generated +sha256 666e3a1ad2dc7d5703059963056e7800f0eab59c8eeb6be2efe4f3acc5209eb1 babeltrace-1.2.4.tar.bz2 + diff --git a/package/lttng-babeltrace/lttng-babeltrace.mk b/package/lttng-babeltrace/lttng-babeltrace.mk new file mode 100644 index 0000000000..fdc647e8da --- /dev/null +++ b/package/lttng-babeltrace/lttng-babeltrace.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# lttng-babeltrace +# +################################################################################ + +LTTNG_BABELTRACE_SITE = http://lttng.org/files/babeltrace +LTTNG_BABELTRACE_VERSION = 1.2.4 +LTTNG_BABELTRACE_SOURCE = babeltrace-$(LTTNG_BABELTRACE_VERSION).tar.bz2 +LTTNG_BABELTRACE_LICENSE = MIT, LGPLv2.1 (include/babeltrace/list.h), GPLv2 (test code) +LTTNG_BABELTRACE_LICENSE_FILES = mit-license.txt gpl-2.0.txt LICENSE + +LTTNG_BABELTRACE_DEPENDENCIES = popt util-linux libglib2 host-pkgconf +# for 0002-configure-fix-uuid-support-detection-on-static-build.patch +LTTNG_BABELTRACE_AUTORECONF = YES + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/lttng-libust/Config.in b/package/lttng-libust/Config.in new file mode 100644 index 0000000000..ce60599557 --- /dev/null +++ b/package/lttng-libust/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_LTTNG_LIBUST + bool "lttng-libust" + select BR2_PACKAGE_LIBURCU + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + depends on BR2_USE_WCHAR # util-linux + # liburcu only works on some architectures and requires threads support" + depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + Userspace tracing library for the LTTng 2.x tracing + infrastructure. It allows userspace programs to create + custom trace events that are integrated with all other + events gathered by LTTng. + + http://lttng.org + +comment "lttng-libust needs a toolchain w/ dynamic library, wchar, threads" + depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/lttng-libust/lttng-libust.hash b/package/lttng-libust/lttng-libust.hash new file mode 100644 index 0000000000..57c7e003ae --- /dev/null +++ b/package/lttng-libust/lttng-libust.hash @@ -0,0 +1,2 @@ +# http://www.lttng.org/files/lttng-ust/lttng-ust-2.7.1.tar.bz2.sha1 +sha1 597ebecb885debb58c263de57f30b1096d4eefc6 lttng-ust-2.7.1.tar.bz2 diff --git a/package/lttng-libust/lttng-libust.mk b/package/lttng-libust/lttng-libust.mk new file mode 100644 index 0000000000..4a65057c45 --- /dev/null +++ b/package/lttng-libust/lttng-libust.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# lttng-libust +# +################################################################################ + +LTTNG_LIBUST_SITE = http://lttng.org/files/lttng-ust +LTTNG_LIBUST_VERSION = 2.7.1 +LTTNG_LIBUST_SOURCE = lttng-ust-$(LTTNG_LIBUST_VERSION).tar.bz2 +LTTNG_LIBUST_LICENSE = LGPLv2.1, MIT (system headers), GPLv2 (liblttng-ust-ctl/ustctl.c used by lttng-sessiond) +LTTNG_LIBUST_LICENSE_FILES = COPYING + +LTTNG_LIBUST_INSTALL_STAGING = YES +LTTNG_LIBUST_DEPENDENCIES = liburcu util-linux + +ifeq ($(BR2_PACKAGE_PYTHON),y) +LTTNG_LIBUST_DEPENDENCIES += python +else ifeq ($(BR2_PACKAGE_PYTHON3),y) +LTTNG_LIBUST_DEPENDENCIES += python3 +else +LTTNG_LIBUST_CONF_ENV = am_cv_pathless_PYTHON="none" +endif + +$(eval $(autotools-package)) diff --git a/package/lttng-modules/Config.in b/package/lttng-modules/Config.in new file mode 100644 index 0000000000..e8ba9bad8c --- /dev/null +++ b/package/lttng-modules/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_LTTNG_MODULES + bool "lttng-modules" + depends on BR2_LINUX_KERNEL + help + Linux kernel modules for the LTTng 2.x kernel tracing + infrastructure. + + Make sure your target kernel has the following config + options enabled: + + * CONFIG_MODULES: loadable module support + * CONFIG_KALLSYMS: this is necessary until the few + required missing symbols are exported to GPL + modules from mainline + * CONFIG_HIGH_RES_TIMERS: needed for LTTng 2.x + clock source + * CONFIG_TRACEPOINTS: kernel tracepoint instrumentation + (enabled as a side-effect of any of the + perf/ftrace/blktrace instrumentation features) + + The following kernel configuration options will + affect the features available from LTTng: + + * CONFIG_HAVE_SYSCALL_TRACEPOINTS: system call tracing + * CONFIG_PERF_EVENTS: performance counters + * CONFIG_EVENT_TRACING: needed to allow block layer tracing + * CONFIG_KPROBES: dynamic probes + * CONFIG_KRETPROBES: dynamic function entry/return probes + * CONFIG_KALLSYMS_ALL: state dump of mapping between block + device number and name + + The packaged version is compatible with Linux 2.6.38 to 3.16. + + http://lttng.org + +comment "lttng-modules needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL diff --git a/package/lttng-modules/lttng-modules.hash b/package/lttng-modules/lttng-modules.hash new file mode 100644 index 0000000000..2d50287897 --- /dev/null +++ b/package/lttng-modules/lttng-modules.hash @@ -0,0 +1,2 @@ +# from http://lttng.org/files/lttng-tools/lttng-modules-2.7.1.tar.bz2.sha1 +sha1 38c42ec89b4966c7a4cc04aea75f5841634d8d66 lttng-modules-2.7.1.tar.bz2 diff --git a/package/lttng-modules/lttng-modules.mk b/package/lttng-modules/lttng-modules.mk new file mode 100644 index 0000000000..5d0c422b13 --- /dev/null +++ b/package/lttng-modules/lttng-modules.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# lttng-modules +# +################################################################################ + +LTTNG_MODULES_VERSION = 2.7.1 +LTTNG_MODULES_SITE = http://lttng.org/files/lttng-modules +LTTNG_MODULES_SOURCE = lttng-modules-$(LTTNG_MODULES_VERSION).tar.bz2 +LTTNG_MODULES_LICENSE = LGPLv2.1/GPLv2 (kernel modules), MIT (lib/bitfield.h, lib/prio_heap/*) +LTTNG_MODULES_LICENSE_FILES = lgpl-2.1.txt gpl-2.0.txt mit-license.txt LICENSE + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/lttng-tools/0001-Fix-build-failure-when-__GLIBC_PREREQ-is-missing.patch b/package/lttng-tools/0001-Fix-build-failure-when-__GLIBC_PREREQ-is-missing.patch new file mode 100644 index 0000000000..2c01dea6ae --- /dev/null +++ b/package/lttng-tools/0001-Fix-build-failure-when-__GLIBC_PREREQ-is-missing.patch @@ -0,0 +1,55 @@ +From: Baruch Siach +Date: Tue, 8 Mar 2016 14:25:34 +0200 +Subject: [PATCH] Fix: build failure when __GLIBC_PREREQ is missing + +The musl C library does not provide the __GLIBC_PREREQ macro. Instead of +relying on glibc version test, check directly for the availability of +epoll_create1(). + +Signed-off-by: Baruch Siach +--- +Patch status: sent upstream rebased on master branch +(http://lists.lttng.org/pipermail/lttng-dev/2016-March/025593.html) + + configure.ac | 2 +- + src/common/compat/poll.h | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 66d83b60b017..4fc1160c9a08 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -70,7 +70,7 @@ AC_CHECK_FUNCS([ \ + gethostbyname gethostname getpagesize localtime_r memchr memset \ + mkdir munmap putenv realpath rmdir socket strchr strcspn strdup \ + strncasecmp strndup strpbrk strrchr strstr strtol strtoul \ +- strtoull \ ++ strtoull epoll_create1 \ + ]) + + # Babeltrace viewer check +diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h +index 699901848dc1..84f25d5c85aa 100644 +--- a/src/common/compat/poll.h ++++ b/src/common/compat/poll.h +@@ -73,7 +73,7 @@ enum { + LPOLLNVAL = EPOLLHUP, + LPOLLRDHUP = EPOLLRDHUP, + /* Close on exec feature of epoll */ +-#if __GLIBC_PREREQ(2, 9) ++#if defined(HAVE_EPOLL_CREATE1) && defined(EPOLL_CLOEXEC) + LTTNG_CLOEXEC = EPOLL_CLOEXEC, + #else + /* +@@ -127,7 +127,7 @@ extern int compat_epoll_create(struct lttng_poll_event *events, + #define lttng_poll_create(events, size, flags) \ + compat_epoll_create(events, size, flags) + +-#if __GLIBC_PREREQ(2, 9) ++#if defined(HAVE_EPOLL_CREATE1) && defined(EPOLL_CLOEXEC) + static inline int compat_glibc_epoll_create(int size __attribute__((unused)), + int flags) + { +-- +2.7.0 + diff --git a/package/lttng-tools/0002-Fix-add-missing-sys-types.h-header.patch b/package/lttng-tools/0002-Fix-add-missing-sys-types.h-header.patch new file mode 100644 index 0000000000..5ce2da52dc --- /dev/null +++ b/package/lttng-tools/0002-Fix-add-missing-sys-types.h-header.patch @@ -0,0 +1,29 @@ +From: Baruch Siach +Date: Tue, 8 Mar 2016 14:40:49 +0200 +Subject: [PATCH] Fix: add missing sys/types.h header + +The musl C library requires inclusion of sys/types.h for mode_t. + +Signed-off-by: Baruch Siach +--- +Patch status: sent upstream +(http://lists.lttng.org/pipermail/lttng-dev/2016-March/025594.html) + + src/common/runas.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/common/runas.h b/src/common/runas.h +index 2c5565af3646..ac1143eecf84 100644 +--- a/src/common/runas.h ++++ b/src/common/runas.h +@@ -19,6 +19,7 @@ + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + ++#include + #include + #include + +-- +2.7.0 + diff --git a/package/lttng-tools/Config.in b/package/lttng-tools/Config.in new file mode 100644 index 0000000000..dd72cc68c7 --- /dev/null +++ b/package/lttng-tools/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_LTTNG_TOOLS + bool "lttng-tools" + # liburcu only works on some architectures and requires thread support + depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # uses dlfcn + select BR2_PACKAGE_LIBURCU + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_POPT + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Userspace utilities for the LTTng 2.x tracing + infrastructure. + + Those utilities are required on the target system to start + and stop tracing sessions. Analysis of the trace can be done + on the host machine using the babeltrace utility. This + utility is automatically built by Buildroot in + $(O)/host/usr/bin/babeltrace, as a dependency of + lttng-tools. However, there is also a lttng-babeltrace + package for the target, if babeltrace on the target is + interesting. + + If userspace tracing is desired, you need to enable + lttng-libust. + + http://lttng.org + +comment "lttng-tools needs a toolchain w/ threads, wchar, dynamic library" + depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || BR2_STATIC_LIBS diff --git a/package/lttng-tools/lttng-tools.hash b/package/lttng-tools/lttng-tools.hash new file mode 100644 index 0000000000..f05b0e3826 --- /dev/null +++ b/package/lttng-tools/lttng-tools.hash @@ -0,0 +1,2 @@ +# Locally generated +sha256 0c799fb21dfa42475feaa1507ded934608b2e531039b46c40e944a5b81c7b21c lttng-tools-2.7.1.tar.bz2 diff --git a/package/lttng-tools/lttng-tools.mk b/package/lttng-tools/lttng-tools.mk new file mode 100644 index 0000000000..e5b12079a8 --- /dev/null +++ b/package/lttng-tools/lttng-tools.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# lttng-tools +# +################################################################################ + +LTTNG_TOOLS_VERSION = 2.7.1 +LTTNG_TOOLS_SITE = http://lttng.org/files/lttng-tools +LTTNG_TOOLS_SOURCE = lttng-tools-$(LTTNG_TOOLS_VERSION).tar.bz2 +LTTNG_TOOLS_LICENSE = GPLv2+, LGPLv2.1+ (include/lttng/*, src/lib/lttng-ctl/*) +LTTNG_TOOLS_LICENSE_FILES = gpl-2.0.txt lgpl-2.1.txt LICENSE +LTTNG_TOOLS_CONF_OPTS += --with-xml-prefix=$(STAGING_DIR)/usr +# Patching configure.ac +LTTNG_TOOLS_AUTORECONF = YES + +# The host-lttng-babeltrace technically isn't a required build +# dependency. However, having the babeltrace utilities built for the +# host is very useful, since those tools allow to convert the binary +# trace format into an human readable format. +LTTNG_TOOLS_DEPENDENCIES = liburcu libxml2 popt host-lttng-babeltrace util-linux + +ifeq ($(BR2_PACKAGE_LTTNG_LIBUST),y) +LTTNG_TOOLS_CONF_OPTS += --enable-lttng-ust +LTTNG_TOOLS_DEPENDENCIES += lttng-libust +else +LTTNG_TOOLS_CONF_OPTS += --disable-lttng-ust +endif + +$(eval $(autotools-package)) diff --git a/package/lua-cjson/Config.in b/package/lua-cjson/Config.in new file mode 100644 index 0000000000..1f4c7c7982 --- /dev/null +++ b/package/lua-cjson/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LUA_CJSON + bool "lua-cjson" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + help + The Lua CJSON module provides JSON support for Lua. It features: + - Fast, standards compliant encoding/parsing routines + - Full support for JSON with UTF-8, including decoding surrogate pairs + - Optional run-time support for common exceptions to the JSON + specification (infinity, NaN, ...) + - No dependencies on other libraries + + (C-module) + + http://www.kyne.com.au/~mark/software/lua-cjson.php diff --git a/package/lua-cjson/lua-cjson.hash b/package/lua-cjson/lua-cjson.hash new file mode 100644 index 0000000000..852dc67814 --- /dev/null +++ b/package/lua-cjson/lua-cjson.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 db7af849c555d1a474f729fe4a56b5530e9be7b24749eb7a7c474a7c7207b972 lua-cjson-2.1.0-1.src.rock diff --git a/package/lua-cjson/lua-cjson.mk b/package/lua-cjson/lua-cjson.mk new file mode 100644 index 0000000000..16cb97412a --- /dev/null +++ b/package/lua-cjson/lua-cjson.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# lua-cjson +# +################################################################################ + +LUA_CJSON_VERSION_UPSTREAM = 2.1.0 +LUA_CJSON_VERSION = $(LUA_CJSON_VERSION_UPSTREAM)-1 +LUA_CJSON_LICENSE = MIT +LUA_CJSON_LICENSE_FILES = lua-cjson-$(LUA_CJSON_VERSION_UPSTREAM)/LICENSE + +$(eval $(luarocks-package)) diff --git a/package/lua-coat/Config.in b/package/lua-coat/Config.in new file mode 100644 index 0000000000..f6ba6cf684 --- /dev/null +++ b/package/lua-coat/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LUA_COAT + bool "lua-coat" + help + Yet Another Lua Object-Oriented Model + + http://fperrad.github.io/lua-Coat/ diff --git a/package/lua-coat/lua-coat.hash b/package/lua-coat/lua-coat.hash new file mode 100644 index 0000000000..ad15a38b9f --- /dev/null +++ b/package/lua-coat/lua-coat.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 38a8342f6b3883a81931feaa9ef90a6343445289f3d65a296f0924818587c7d4 lua-coat-0.9.1-1.src.rock diff --git a/package/lua-coat/lua-coat.mk b/package/lua-coat/lua-coat.mk new file mode 100644 index 0000000000..205995ed63 --- /dev/null +++ b/package/lua-coat/lua-coat.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# lua-coat +# +################################################################################ + +LUA_COAT_VERSION_UPSTREAM = 0.9.1 +LUA_COAT_VERSION = $(LUA_COAT_VERSION_UPSTREAM)-1 +LUA_COAT_SUBDIR = lua-Coat-$(LUA_COAT_VERSION_UPSTREAM) +LUA_COAT_LICENSE = MIT +LUA_COAT_LICENSE_FILES = $(LUA_COAT_SUBDIR)/COPYRIGHT + +$(eval $(luarocks-package)) diff --git a/package/lua-coatpersistent/Config.in b/package/lua-coatpersistent/Config.in new file mode 100644 index 0000000000..a0f5bdc0d0 --- /dev/null +++ b/package/lua-coatpersistent/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LUA_COATPERSISTENT + bool "lua-coatpersistent" + # run-time dependencies + select BR2_PACKAGE_DADO + select BR2_PACKAGE_LUA_COAT + depends on BR2_PACKAGE_LSQLITE3 || BR2_PACKAGE_LUASQL_SQLITE3 + help + An ORM for lua-Coat. + + http://fperrad.github.io/lua-CoatPersistent/ + +comment "lua-coatpersistent needs lsqlite3 or luasql-sqlite3" + depends on !BR2_PACKAGE_LSQLITE3 && !BR2_PACKAGE_LUASQL_SQLITE3 diff --git a/package/lua-coatpersistent/lua-coatpersistent.hash b/package/lua-coatpersistent/lua-coatpersistent.hash new file mode 100644 index 0000000000..ddd3c9bb6a --- /dev/null +++ b/package/lua-coatpersistent/lua-coatpersistent.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 46f5a1988a47b988d729df2937589756d989df7c26dac6aaf2a331a7b15bf7cf lua-coatpersistent-lsqlite3-0.2.1-1.src.rock +sha256 8053428fa7a6229d70ae161ec55a24b28c210078ac494161d48b6bf74ed000ca lua-coatpersistent-luasql-0.2.1-1.src.rock diff --git a/package/lua-coatpersistent/lua-coatpersistent.mk b/package/lua-coatpersistent/lua-coatpersistent.mk new file mode 100644 index 0000000000..be8a4da468 --- /dev/null +++ b/package/lua-coatpersistent/lua-coatpersistent.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# lua-coatpersistent +# +################################################################################ + +LUA_COATPERSISTENT_VERSION_UPSTREAM = 0.2.1 +ifeq ($(BR2_PACKAGE_LSQLITE3),y) +LUA_COATPERSISTENT_VERSION = lsqlite3-$(LUA_COATPERSISTENT_VERSION_UPSTREAM)-1 +else +LUA_COATPERSISTENT_VERSION = luasql-$(LUA_COATPERSISTENT_VERSION_UPSTREAM)-1 +endif +LUA_COATPERSISTENT_SUBDIR = lua-CoatPersistent-$(LUA_COATPERSISTENT_VERSION_UPSTREAM) +LUA_COATPERSISTENT_LICENSE = MIT +LUA_COATPERSISTENT_LICENSE_FILES = $(LUA_COATPERSISTENT_SUBDIR)/COPYRIGHT + +$(eval $(luarocks-package)) diff --git a/package/lua-csnappy/Config.in b/package/lua-csnappy/Config.in new file mode 100644 index 0000000000..0562277a0f --- /dev/null +++ b/package/lua-csnappy/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LUA_CSNAPPY + bool "lua-csnappy" + help + lua-csnappy is a binding of the csnappy library + which implements the Google's Snappy (de)compressor. + + http://fperrad.github.io/lua-csnappy/ + diff --git a/package/lua-csnappy/lua-csnappy.hash b/package/lua-csnappy/lua-csnappy.hash new file mode 100644 index 0000000000..2864c3fd9c --- /dev/null +++ b/package/lua-csnappy/lua-csnappy.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3504789c7832f4ed3d7aef47ba9d62940985cde7556284db2233842bfb7d8876 lua-csnappy-0.1.3-1.src.rock diff --git a/package/lua-csnappy/lua-csnappy.mk b/package/lua-csnappy/lua-csnappy.mk new file mode 100644 index 0000000000..60b92acfc5 --- /dev/null +++ b/package/lua-csnappy/lua-csnappy.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# lua-csnappy +# +################################################################################ + +LUA_CSNAPPY_VERSION_UPSTREAM = 0.1.3 +LUA_CSNAPPY_VERSION = $(LUA_CSNAPPY_VERSION_UPSTREAM)-1 +LUA_CSNAPPY_SUBDIR = lua-csnappy-$(LUA_CSNAPPY_VERSION_UPSTREAM) +LUA_CSNAPPY_LICENSE = BSD-3c +LUA_CSNAPPY_LICENSE_FILES = $(LUA_CSNAPPY_SUBDIR)/COPYRIGHT + +$(eval $(luarocks-package)) diff --git a/package/lua-ev/Config.in b/package/lua-ev/Config.in new file mode 100644 index 0000000000..4b3f8ed185 --- /dev/null +++ b/package/lua-ev/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LUA_EV + bool "lua-ev" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + select BR2_PACKAGE_LIBEV + depends on !BR2_bfin # libev + help + Get access to the libev library from Lua. + + https://github.com/brimworks/lua-ev diff --git a/package/lua-ev/lua-ev.mk b/package/lua-ev/lua-ev.mk new file mode 100644 index 0000000000..68f7fc75b0 --- /dev/null +++ b/package/lua-ev/lua-ev.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# lua-ev +# +################################################################################ + +LUA_EV_VERSION = v1.4 +LUA_EV_SITE = $(call github,brimworks,lua-ev,$(LUA_EV_VERSION)) +LUA_EV_DEPENDENCIES = luainterpreter libev +LUA_EV_LICENSE = MIT +LUA_EV_LICENSE_FILES = README +LUA_EV_CONF_OPTS = -DINSTALL_CMOD="/usr/lib/lua/$(LUAINTERPRETER_ABIVER)" + +$(eval $(cmake-package)) diff --git a/package/lua-iconv/Config.in b/package/lua-iconv/Config.in new file mode 100644 index 0000000000..e76019d676 --- /dev/null +++ b/package/lua-iconv/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LUA_ICONV + bool "lua-iconv" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Lua binding to the POSIX 'iconv' library + + http://ittner.github.io/lua-iconv/ diff --git a/package/lua-iconv/lua-iconv.hash b/package/lua-iconv/lua-iconv.hash new file mode 100644 index 0000000000..46291026cf --- /dev/null +++ b/package/lua-iconv/lua-iconv.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 fb66e785e15376c2d2817f1f1b27d10272b877eacc998c727a10f081a7d768fa lua-iconv-7-1.src.rock diff --git a/package/lua-iconv/lua-iconv.mk b/package/lua-iconv/lua-iconv.mk new file mode 100644 index 0000000000..f0afa2b85e --- /dev/null +++ b/package/lua-iconv/lua-iconv.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# lua-iconv +# +################################################################################ + +LUA_ICONV_VERSION_UPSTREAM = 7 +LUA_ICONV_VERSION = $(LUA_ICONV_VERSION_UPSTREAM)-1 +LUA_ICONV_SUBDIR = lua-iconv-$(LUA_ICONV_VERSION_UPSTREAM) +LUA_ICONV_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) +LUA_ICONV_LICENSE = MIT +LUA_ICONV_LICENSE_FILES = $(LUA_ICONV_SUBDIR)/COPYING + +$(eval $(luarocks-package)) diff --git a/package/lua-messagepack/Config.in b/package/lua-messagepack/Config.in new file mode 100644 index 0000000000..2dab316a8d --- /dev/null +++ b/package/lua-messagepack/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_LUA_MESSAGEPACK + bool "lua-messagepack" + help + A pure Lua implementation of the MessagePack serialization + format. + + http://fperrad.github.io/lua-MessagePack/ diff --git a/package/lua-messagepack/lua-messagepack.hash b/package/lua-messagepack/lua-messagepack.hash new file mode 100644 index 0000000000..b46b686f81 --- /dev/null +++ b/package/lua-messagepack/lua-messagepack.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 be6827c93383c8d7214c9ac9b7a62ab04186db4c6c2a3a7b36036157784f58b8 lua-messagepack-0.3.4-1.src.rock +sha256 5ab74601696973a66802de1fec614859db0d93d5fa960fac0f70cb04a490e5e5 lua-messagepack-lua53-0.3.4-1.src.rock diff --git a/package/lua-messagepack/lua-messagepack.mk b/package/lua-messagepack/lua-messagepack.mk new file mode 100644 index 0000000000..18a4e4ab29 --- /dev/null +++ b/package/lua-messagepack/lua-messagepack.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# lua-messagepack +# +################################################################################ + +LUA_MESSAGEPACK_VERSION_UPSTREAM = 0.3.4 +ifeq ($(BR2_PACKAGE_LUA_5_3),y) +LUA_MESSAGEPACK_VERSION = lua53-$(LUA_MESSAGEPACK_VERSION_UPSTREAM)-1 +else +LUA_MESSAGEPACK_VERSION = $(LUA_MESSAGEPACK_VERSION_UPSTREAM)-1 +endif +LUA_MESSAGEPACK_SUBDIR = lua-MessagePack-$(LUA_MESSAGEPACK_VERSION_UPSTREAM) +LUA_MESSAGEPACK_LICENSE = MIT +LUA_MESSAGEPACK_LICENSE_FILES = $(LUA_MESSAGEPACK_SUBDIR)/COPYRIGHT + +$(eval $(luarocks-package)) diff --git a/package/lua-msgpack-native/Config.in b/package/lua-msgpack-native/Config.in new file mode 100644 index 0000000000..3837228fa0 --- /dev/null +++ b/package/lua-msgpack-native/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LUA_MSGPACK_NATIVE + bool "lua-msgpack-native" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + depends on BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT + help + This is a native, C language implementation of msgpack + (http://msgpack.org) library/protocol for Lua language + + https://github.com/kengonakajima/lua-msgpack-native + +comment "lua-msgpack-native needs a Lua 5.1 interpreter" + depends on !BR2_PACKAGE_LUA_5_1 + depends on !BR2_PACKAGE_LUAJIT diff --git a/package/lua-msgpack-native/lua-msgpack-native.mk b/package/lua-msgpack-native/lua-msgpack-native.mk new file mode 100644 index 0000000000..acd3a0e1c9 --- /dev/null +++ b/package/lua-msgpack-native/lua-msgpack-native.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# lua-msgpack-native +# +################################################################################ + +LUA_MSGPACK_NATIVE_VERSION = 41a91b994c70389dc9daa1a15678741d8ec41749 +LUA_MSGPACK_NATIVE_SITE = $(call github,kengonakajima,lua-msgpack-native,$(LUA_MSGPACK_NATIVE_VERSION)) +LUA_MSGPACK_NATIVE_DEPENDENCIES = luainterpreter +LUA_MSGPACK_NATIVE_LICENSE = Apache-2.0 +LUA_MSGPACK_NATIVE_LICENSE_FILES = LICENSE.txt + +define LUA_MSGPACK_NATIVE_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) -fPIC -shared -o $(@D)/msgpack.so $(@D)/mp.c +endef + +define LUA_MSGPACK_NATIVE_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/msgpack.so \ + $(TARGET_DIR)/usr/lib/lua/$(LUAINTERPRETER_ABIVER)/msgpack.so +endef + +$(eval $(generic-package)) diff --git a/package/lua-periphery/0001-Add-missing-header-for-musl-compatibility.patch b/package/lua-periphery/0001-Add-missing-header-for-musl-compatibility.patch new file mode 100644 index 0000000000..22c748ccb3 --- /dev/null +++ b/package/lua-periphery/0001-Add-missing-header-for-musl-compatibility.patch @@ -0,0 +1,34 @@ +From 1d8cb0ad54099c3d7261aaa19a2c0786f16736d0 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 8 Aug 2015 22:42:39 +0200 +Subject: [PATCH] Add missing header for musl compatibility + + is needed to get the definition of _IOC_SIZEBITS and +solve the following build failure: + +src/spi.c: In function 'spi_transfer': +src/spi.c:100:24: error: '_IOC_SIZEBITS' undeclared (first use in this function) + if (ioctl(spi->fd, SPI_IOC_MESSAGE(1), &spi_xfer) < 1) + +Signed-off-by: Thomas Petazzoni +[Port from c-periphery] +Signed-off-by: Jörg Krause +--- + src/spi.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lua-periphery/c-periphery/src/spi.c b/lua-periphery/c-periphery/src/spi.c +index 52a8d3d..1a6b17c 100644 +--- a/lua-periphery/c-periphery/src/spi.c ++++ b/lua-periphery/c-periphery/src/spi.c +@@ -16,6 +16,7 @@ + #include + + #include ++#include + #include + + #include "spi.h" +-- +2.5.0 + diff --git a/package/lua-periphery/0002-Fix-build-on-SPARC.patch b/package/lua-periphery/0002-Fix-build-on-SPARC.patch new file mode 100644 index 0000000000..ce461ddca2 --- /dev/null +++ b/package/lua-periphery/0002-Fix-build-on-SPARC.patch @@ -0,0 +1,60 @@ +[PATCH] Fix build on SPARC + +On SPARC, the definitions of B2500000, B3000000, B3500000 and B4000000 +are not necessarily available, so use those values only if defined in +the kernel headers. + +It fixes SPARC build failures such as: + +src/serial.c: In function '_serial_baudrate_to_bits': +src/serial.c:73:30: error: 'B2500000' undeclared (first use in this function) + case 2500000: return B2500000; + ^ +src/serial.c:73:30: note: each undeclared identifier is reported only once for each function it appears in +src/serial.c:74:30: error: 'B3000000' undeclared (first use in this function) + case 3000000: return B3000000; + ^ +Signed-off-by: Thomas Petazzoni + +Index: b/lua-periphery/c-periphery/src/serial.c +=================================================================== +--- a/lua-periphery/c-periphery/src/serial.c ++++ b/lua-periphery/c-periphery/src/serial.c +@@ -70,10 +70,18 @@ + case 1152000: return B1152000; + case 1500000: return B1500000; + case 2000000: return B2000000; ++#ifdef B2500000 + case 2500000: return B2500000; ++#endif ++#ifdef B3000000 + case 3000000: return B3000000; ++#endif ++#ifdef B3500000 + case 3500000: return B3500000; ++#endif ++#ifdef B4000000 + case 4000000: return B4000000; ++#endif + default: return -1; + } + } +@@ -107,10 +115,18 @@ + case B1152000: return 1152000; + case B1500000: return 1500000; + case B2000000: return 2000000; ++#ifdef B2500000 + case B2500000: return 2500000; ++#endif ++#ifdef B3000000 + case B3000000: return 3000000; ++#endif ++#ifdef B3500000 + case B3500000: return 3500000; ++#endif ++#ifdef B4000000 + case B4000000: return 4000000; ++#endif + default: return -1; + } + } diff --git a/package/lua-periphery/Config.in b/package/lua-periphery/Config.in new file mode 100644 index 0000000000..de5a71633c --- /dev/null +++ b/package/lua-periphery/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LUA_PERIPHERY + bool "lua-periphery" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + help + A library for GPIO, SPI, I2C, MMIO, and Serial peripheral I/O + interface access in userspace Linux with Lua. + + https://github.com/vsergeev/lua-periphery diff --git a/package/lua-periphery/lua-periphery.hash b/package/lua-periphery/lua-periphery.hash new file mode 100644 index 0000000000..7f6e63f3bb --- /dev/null +++ b/package/lua-periphery/lua-periphery.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 53762ed9b8a2edfcc5b4c535ef73e6a425f2577e036bb15994ca16a39b16ebab lua-periphery-1.0.6-1.src.rock diff --git a/package/lua-periphery/lua-periphery.mk b/package/lua-periphery/lua-periphery.mk new file mode 100644 index 0000000000..48eba39289 --- /dev/null +++ b/package/lua-periphery/lua-periphery.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# lua-periphery +# +################################################################################ + +LUA_PERIPHERY_VERSION_UPSTREAM = 1.0.6 +LUA_PERIPHERY_VERSION = $(LUA_PERIPHERY_VERSION_UPSTREAM)-1 +LUA_PERIPHERY_SUBDIR = lua-periphery +LUA_PERIPHERY_LICENSE = MIT +LUA_PERIPHERY_LICENSE_FILES = $(LUA_PERIPHERY_SUBDIR)/LICENSE + +$(eval $(luarocks-package)) diff --git a/package/lua-testmore/Config.in b/package/lua-testmore/Config.in new file mode 100644 index 0000000000..61dea3a6ee --- /dev/null +++ b/package/lua-testmore/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LUA_TESTMORE + bool "lua-testmore" + help + an Unit Testing Framework. + + http://fperrad.github.io/lua-TestMore/ diff --git a/package/lua-testmore/lua-testmore.hash b/package/lua-testmore/lua-testmore.hash new file mode 100644 index 0000000000..439097b933 --- /dev/null +++ b/package/lua-testmore/lua-testmore.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 a76a9b707487bf3e8b6a5362640bc2e010d184c4f66e423de7b28bd480a0db90 lua-testmore-0.3.2-1.src.rock diff --git a/package/lua-testmore/lua-testmore.mk b/package/lua-testmore/lua-testmore.mk new file mode 100644 index 0000000000..771b97f000 --- /dev/null +++ b/package/lua-testmore/lua-testmore.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# lua-testmore +# +################################################################################ + +LUA_TESTMORE_VERSION_UPSTREAM = 0.3.2 +LUA_TESTMORE_VERSION = $(LUA_TESTMORE_VERSION_UPSTREAM)-1 +LUA_TESTMORE_SUBDIR = lua-TestMore-$(LUA_TESTMORE_VERSION_UPSTREAM) +LUA_TESTMORE_LICENSE = MIT +LUA_TESTMORE_LICENSE_FILES = $(LUA_TESTMORE_SUBDIR)/COPYRIGHT + +$(eval $(luarocks-package)) diff --git a/package/lua/5.1.5/0001-root-path.patch b/package/lua/5.1.5/0001-root-path.patch new file mode 100644 index 0000000000..fd0da6eb57 --- /dev/null +++ b/package/lua/5.1.5/0001-root-path.patch @@ -0,0 +1,30 @@ +Adjust installation location to /usr. + +Signed-off-by: Francois Perrad + +Index: b/etc/lua.pc +=================================================================== +--- a/etc/lua.pc ++++ b/etc/lua.pc +@@ -8,7 +8,7 @@ + R= 5.1.5 + + # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' +-prefix= /usr/local ++prefix= /usr + INSTALL_BIN= ${prefix}/bin + INSTALL_INC= ${prefix}/include + INSTALL_LIB= ${prefix}/lib +Index: b/src/luaconf.h +=================================================================== +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -94,7 +94,7 @@ + ".\\?.dll;" LUA_CDIR"?.dll;" LUA_CDIR"loadall.dll" + + #else +-#define LUA_ROOT "/usr/local/" ++#define LUA_ROOT "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/5.1/" + #define LUA_CDIR LUA_ROOT "lib/lua/5.1/" + #define LUA_PATH_DEFAULT \ diff --git a/package/lua/5.1.5/0002-shared-libs-for-lua.patch b/package/lua/5.1.5/0002-shared-libs-for-lua.patch new file mode 100644 index 0000000000..3f863a530c --- /dev/null +++ b/package/lua/5.1.5/0002-shared-libs-for-lua.patch @@ -0,0 +1,78 @@ +Add the compilation of a shared library. +Compile the lua binary with the shared library. +And install the shared library. +The variable BUILDMODE allows to switch between static and dynamic mode. + +Signed-off-by: Francois Perrad + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -44,6 +44,7 @@ + TO_BIN= lua luac + TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp + TO_LIB= liblua.a ++TO_SOLIB = liblua.so.$(R) + TO_MAN= lua.1 luac.1 + + # Lua version and release. +@@ -61,6 +62,8 @@ + install: dummy + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) ++ test -f src/$(TO_SOLIB) && cd src && $(INSTALL_EXEC) $(TO_SOLIB) $(INSTALL_LIB) || : ++ test -f src/$(TO_SOLIB) && ln -sf $(TO_SOLIB) $(INSTALL_LIB)/liblua.so || : + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -23,6 +23,7 @@ + PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \ + lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \ + lundump.o lvm.o lzio.o +@@ -36,8 +37,13 @@ + LUAC_O= luac.o print.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) ++ifneq (dynamic,$(BUILDMODE)) + ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++else ++ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) ++endif + ALL_A= $(LUA_A) ++ALL_SO= $(LUA_SO) + + default: $(PLAT) + +@@ -47,12 +53,23 @@ + + a: $(ALL_A) + ++so: $(ALL_SO) ++ + $(LUA_A): $(CORE_O) $(LIB_O) + $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? ++ ln -fs $@.$(PKG_VERSION) $@ ++ ++ifneq (dynamic,$(BUILDMODE)) + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) ++else ++$(LUA_T): $(LUA_O) $(LUA_SO) ++ $(CC) -o $@ -L. $(MYLDFLAGS) $(LUA_O) -llua $(LIBS) ++endif + + $(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) diff --git a/package/lua/5.1.5/0011-linenoise.patch b/package/lua/5.1.5/0011-linenoise.patch new file mode 100644 index 0000000000..488c080a1e --- /dev/null +++ b/package/lua/5.1.5/0011-linenoise.patch @@ -0,0 +1,24 @@ +Add support of linenoise (replace readline) + +see discussion, http://lua-users.org/lists/lua-l/2010-03/msg00879.html + +Signed-off-by: Francois Perrad + +Index: b/src/luaconf.h +=================================================================== +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -279,6 +279,13 @@ + if (lua_strlen(L,idx) > 0) /* non-empty line? */ \ + add_history(lua_tostring(L, idx)); /* add it to history */ + #define lua_freeline(L,b) ((void)L, free(b)) ++#elif defined(LUA_USE_LINENOISE) ++#include ++#define lua_readline(L,b,p) ((void)L, ((b)=linenoise(p)) != NULL) ++#define lua_saveline(L,idx) \ ++ if (lua_strlen(L,idx) > 0) /* non-empty line? */ \ ++ linenoiseHistoryAdd(lua_tostring(L, idx)); /* add it to history */ ++#define lua_freeline(L,b) ((void)L, free(b)) + #else + #define lua_readline(L,b,p) \ + ((void)L, fputs(p, stdout), fflush(stdout), /* show prompt */ \ diff --git a/package/lua/5.1.5/0012-fix-reader-at-eoz.patch b/package/lua/5.1.5/0012-fix-reader-at-eoz.patch new file mode 100644 index 0000000000..17a28ba4c3 --- /dev/null +++ b/package/lua/5.1.5/0012-fix-reader-at-eoz.patch @@ -0,0 +1,46 @@ +When loading a file, Lua may call the reader function again after it returned end of input. + +Fetch from: http://www.lua.org/bugs.html#5.1.5-2 + +Signed-off-by: Francois Perrad + +Index: b/src/lzio.c +=================================================================== +--- a/src/lzio.c ++++ b/src/lzio.c +@@ -22,10 +22,14 @@ + size_t size; + lua_State *L = z->L; + const char *buff; ++ if (z->eoz) return EOZ; + lua_unlock(L); + buff = z->reader(L, z->data, &size); + lua_lock(L); +- if (buff == NULL || size == 0) return EOZ; ++ if (buff == NULL || size == 0) { ++ z->eoz = 1; /* avoid calling reader function next time */ ++ return EOZ; ++ } + z->n = size - 1; + z->p = buff; + return char2int(*(z->p++)); +@@ -51,6 +55,7 @@ + z->data = data; + z->n = 0; + z->p = NULL; ++ z->eoz = 0; + } + + +Index: b/src/lzio.h +=================================================================== +--- a/src/lzio.h ++++ b/src/lzio.h +@@ -59,6 +59,7 @@ + lua_Reader reader; + void* data; /* additional data */ + lua_State *L; /* Lua state (for reader) */ ++ int eoz; /* true if reader has no more data */ + }; + + diff --git a/package/lua/5.2.4/0001-root-path.patch b/package/lua/5.2.4/0001-root-path.patch new file mode 100644 index 0000000000..c6f242c20e --- /dev/null +++ b/package/lua/5.2.4/0001-root-path.patch @@ -0,0 +1,17 @@ +Adjust installation location to /usr. + +Signed-off-by: Francois Perrad + +Index: b/src/luaconf.h +=================================================================== +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -100,7 +100,7 @@ + #else /* }{ */ + + #define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/" +-#define LUA_ROOT "/usr/local/" ++#define LUA_ROOT "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR + #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR + #define LUA_PATH_DEFAULT \ diff --git a/package/lua/5.2.4/0002-shared-libs-for-lua.patch b/package/lua/5.2.4/0002-shared-libs-for-lua.patch new file mode 100644 index 0000000000..3cf3b24848 --- /dev/null +++ b/package/lua/5.2.4/0002-shared-libs-for-lua.patch @@ -0,0 +1,78 @@ +Add the compilation of a shared library. +Compile the lua binary with the shared library. +And install the shared library. +The variable BUILDMODE allows to switch between static and dynamic mode. + +Signed-off-by: Francois Perrad + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -42,6 +42,7 @@ + TO_BIN= lua luac + TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp + TO_LIB= liblua.a ++TO_SOLIB = liblua.so.$(R) + TO_MAN= lua.1 luac.1 + + # Lua version and release. +@@ -60,6 +61,8 @@ + install: dummy + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) ++ test -f src/$(TO_SOLIB) && cd src && $(INSTALL_EXEC) $(TO_SOLIB) $(INSTALL_LIB) || : ++ test -f src/$(TO_SOLIB) && ln -sf $(TO_SOLIB) $(INSTALL_LIB)/liblua.so || : + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -29,6 +29,7 @@ + PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ + lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \ + ltm.o lundump.o lvm.o lzio.o +@@ -43,8 +44,13 @@ + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) ++ifneq (dynamic,$(BUILDMODE)) + ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++else ++ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) ++endif + ALL_A= $(LUA_A) ++ALL_SO= $(LUA_SO) + + # Targets start here. + default: $(PLAT) +@@ -55,12 +61,23 @@ + + a: $(ALL_A) + ++so: $(ALL_SO) ++ + $(LUA_A): $(BASE_O) + $(AR) $@ $(BASE_O) + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? ++ ln -fs $@.$(PKG_VERSION) $@ ++ ++ifneq (dynamic,$(BUILDMODE)) + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) ++else ++$(LUA_T): $(LUA_O) $(LUA_SO) ++ $(CC) -o $@ -L. $(LDFLAGS) $(LUA_O) -llua $(LIBS) ++endif + + $(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) diff --git a/package/lua/5.2.4/0004-lua-pc.patch b/package/lua/5.2.4/0004-lua-pc.patch new file mode 100644 index 0000000000..62acb201f2 --- /dev/null +++ b/package/lua/5.2.4/0004-lua-pc.patch @@ -0,0 +1,40 @@ +add lua.pc + +Signed-off-by: Francois Perrad + +Index: b/etc/lua.pc +=================================================================== +--- /dev/null ++++ b/etc/lua.pc +@@ -0,0 +1,31 @@ ++# lua.pc -- pkg-config data for Lua ++ ++# vars from install Makefile ++ ++# grep '^V=' ../Makefile ++V= 5.2 ++# grep '^R=' ../Makefile ++R= 5.2.3 ++ ++# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' ++prefix= /usr ++INSTALL_BIN= ${prefix}/bin ++INSTALL_INC= ${prefix}/include ++INSTALL_LIB= ${prefix}/lib ++INSTALL_MAN= ${prefix}/man/man1 ++INSTALL_LMOD= ${prefix}/share/lua/${V} ++INSTALL_CMOD= ${prefix}/lib/lua/${V} ++ ++# canonical vars ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: Lua ++Description: An Extensible Extension Language ++Version: ${R} ++Requires: ++Libs: -L${libdir} -llua -lm ++Cflags: -I${includedir} ++ ++# (end of lua.pc) diff --git a/package/lua/5.2.4/0011-linenoise.patch b/package/lua/5.2.4/0011-linenoise.patch new file mode 100644 index 0000000000..b1f228cd49 --- /dev/null +++ b/package/lua/5.2.4/0011-linenoise.patch @@ -0,0 +1,26 @@ +Add support of linenoise (replace readline) + +see discussion, http://lua-users.org/lists/lua-l/2010-03/msg00879.html + +Signed-off-by: Francois Perrad + +Index: b/src/lua.c +=================================================================== +--- a/src/lua.c ++++ b/src/lua.c +@@ -72,6 +72,15 @@ + add_history(lua_tostring(L, idx)); /* add it to history */ + #define lua_freeline(L,b) ((void)L, free(b)) + ++#elif defined(LUA_USE_LINENOISE) ++ ++#include ++#define lua_readline(L,b,p) ((void)L, ((b)=linenoise(p)) != NULL) ++#define lua_saveline(L,idx) \ ++ if (lua_rawlen(L,idx) > 0) /* non-empty line? */ \ ++ linenoiseHistoryAdd(lua_tostring(L, idx)); /* add it to history */ ++#define lua_freeline(L,b) ((void)L, free(b)) ++ + #elif !defined(lua_readline) + + #define lua_readline(L,b,p) \ diff --git a/package/lua/5.3.2/0001-root-path.patch b/package/lua/5.3.2/0001-root-path.patch new file mode 100644 index 0000000000..d8ef8d070d --- /dev/null +++ b/package/lua/5.3.2/0001-root-path.patch @@ -0,0 +1,17 @@ +Adjust installation location to /usr. + +Signed-off-by: Francois Perrad + +Index: b/src/luaconf.h +=================================================================== +--- a/src/luaconf.h ++++ b/src/luaconf.h +@@ -188,7 +188,7 @@ + + #else /* }{ */ + +-#define LUA_ROOT "/usr/local/" ++#define LUA_ROOT "/usr/" + #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/" + #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/" + #define LUA_PATH_DEFAULT \ diff --git a/package/lua/5.3.2/0002-shared-libs-for-lua.patch b/package/lua/5.3.2/0002-shared-libs-for-lua.patch new file mode 100644 index 0000000000..493828c9da --- /dev/null +++ b/package/lua/5.3.2/0002-shared-libs-for-lua.patch @@ -0,0 +1,78 @@ +Add the compilation of a shared library. +Compile the lua binary with the shared library. +And install the shared library. +The variable BUILDMODE allows to switch between static and dynamic mode. + +Signed-off-by: Francois Perrad + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -42,6 +42,7 @@ + TO_BIN= lua luac + TO_INC= lua.h luaconf.h lualib.h lauxlib.h lua.hpp + TO_LIB= liblua.a ++TO_SOLIB = liblua.so.$(R) + TO_MAN= lua.1 luac.1 + + # Lua version and release. +@@ -60,6 +61,8 @@ + install: dummy + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) + cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) ++ test -f src/$(TO_SOLIB) && cd src && $(INSTALL_EXEC) $(TO_SOLIB) $(INSTALL_LIB) || : ++ test -f src/$(TO_SOLIB) && ln -sf $(TO_SOLIB) $(INSTALL_LIB)/liblua.so || : + cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) + cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) + cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN) +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -29,6 +29,7 @@ + PLATS= aix bsd c89 freebsd generic linux macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o lctype.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o \ + lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o \ + ltm.o lundump.o lvm.o lzio.o +@@ -43,8 +44,13 @@ + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) ++ifneq (dynamic,$(BUILDMODE)) + ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++else ++ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T) ++endif + ALL_A= $(LUA_A) ++ALL_SO= $(LUA_SO) + + # Targets start here. + default: $(PLAT) +@@ -55,12 +61,23 @@ + + a: $(ALL_A) + ++so: $(ALL_SO) ++ + $(LUA_A): $(BASE_O) + $(AR) $@ $(BASE_O) + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? ++ ln -fs $@.$(PKG_VERSION) $@ ++ ++ifneq (dynamic,$(BUILDMODE)) + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) ++else ++$(LUA_T): $(LUA_O) $(LUA_SO) ++ $(CC) -o $@ -L. $(LDFLAGS) $(LUA_O) -llua $(LIBS) ++endif + + $(LUAC_T): $(LUAC_O) $(LUA_A) + $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS) diff --git a/package/lua/5.3.2/0004-lua-pc.patch b/package/lua/5.3.2/0004-lua-pc.patch new file mode 100644 index 0000000000..811d9313b4 --- /dev/null +++ b/package/lua/5.3.2/0004-lua-pc.patch @@ -0,0 +1,40 @@ +add lua.pc + +Signed-off-by: Francois Perrad + +Index: b/etc/lua.pc +=================================================================== +--- /dev/null ++++ b/etc/lua.pc +@@ -0,0 +1,31 @@ ++# lua.pc -- pkg-config data for Lua ++ ++# vars from install Makefile ++ ++# grep '^V=' ../Makefile ++V= 5.3 ++# grep '^R=' ../Makefile ++R= 5.3.2 ++ ++# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' ++prefix= /usr ++INSTALL_BIN= ${prefix}/bin ++INSTALL_INC= ${prefix}/include ++INSTALL_LIB= ${prefix}/lib ++INSTALL_MAN= ${prefix}/man/man1 ++INSTALL_LMOD= ${prefix}/share/lua/${V} ++INSTALL_CMOD= ${prefix}/lib/lua/${V} ++ ++# canonical vars ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: Lua ++Description: An Extensible Extension Language ++Version: ${R} ++Requires: ++Libs: -L${libdir} -llua -lm ++Cflags: -I${includedir} ++ ++# (end of lua.pc) diff --git a/package/lua/5.3.2/0011-linenoise.patch b/package/lua/5.3.2/0011-linenoise.patch new file mode 100644 index 0000000000..f3ced2b22e --- /dev/null +++ b/package/lua/5.3.2/0011-linenoise.patch @@ -0,0 +1,24 @@ +Add support of linenoise (replace readline) + +see discussion, http://lua-users.org/lists/lua-l/2010-03/msg00879.html + +Signed-off-by: Francois Perrad + +Index: b/src/lua.c +=================================================================== +--- a/src/lua.c ++++ b/src/lua.c +@@ -83,6 +83,13 @@ + #define lua_saveline(L,line) ((void)L, add_history(line)) + #define lua_freeline(L,b) ((void)L, free(b)) + ++#elif defined(LUA_USE_LINENOISE) ++ ++#include ++#define lua_readline(L,b,p) ((void)L, ((b)=linenoise(p)) != NULL) ++#define lua_saveline(L,line) ((void)L, linenoiseHistoryAdd(line)) ++#define lua_freeline(L,b) ((void)L, free(b)) ++ + #else /* }{ */ + + #define lua_readline(L,b,p) \ diff --git a/package/lua/Config.in b/package/lua/Config.in new file mode 100644 index 0000000000..711fa89163 --- /dev/null +++ b/package/lua/Config.in @@ -0,0 +1,71 @@ +config BR2_PACKAGE_LUA + bool "lua" + select BR2_PACKAGE_HAS_LUAINTERPRETER + help + Lua is a powerful, fast, light-weight, embeddable scripting language. + + http://www.lua.org/ + +if BR2_PACKAGE_LUA + +config BR2_PACKAGE_PROVIDES_LUAINTERPRETER + default "lua" + +choice + prompt "Lua Version" + default BR2_PACKAGE_LUA_5_3 + help + Select the version of Lua API/ABI you wish to use. + + config BR2_PACKAGE_LUA_5_1 + bool "Lua 5.1.x" + + config BR2_PACKAGE_LUA_5_2 + bool "Lua 5.2.x" + + config BR2_PACKAGE_LUA_5_3 + bool "Lua 5.3.x" + +endchoice + +config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION + default "5.1" if BR2_PACKAGE_LUA_5_1 + default "5.2" if BR2_PACKAGE_LUA_5_2 + default "5.3" if BR2_PACKAGE_LUA_5_3 + +if BR2_PACKAGE_LUA_5_3 +config BR2_PACKAGE_LUA_32BITS + bool "Use 32 bit numbers" + default y if !BR2_ARCH_IS_64 + help + Use a 32 bit data type for numbers / integers instead of the + default 64 bit type. This option is particularly attractive + for small machines and embedded systems. + +endif + +choice + prompt "Lua command-line editing" + default BR2_PACKAGE_LUA_EDITING_NONE + +config BR2_PACKAGE_LUA_EDITING_NONE + bool "none" + help + None. + +config BR2_PACKAGE_LUA_READLINE + bool "readline support" + select BR2_PACKAGE_READLINE + select BR2_PACKAGE_NCURSES + help + Enables command-line editing in the Lua interpreter. + +config BR2_PACKAGE_LUA_LINENOISE + bool "linenoise support" + select BR2_PACKAGE_LINENOISE + help + Enables command-line editing in the Lua interpreter. + +endchoice + +endif diff --git a/package/lua/lua.hash b/package/lua/lua.hash new file mode 100644 index 0000000000..8f0242e02d --- /dev/null +++ b/package/lua/lua.hash @@ -0,0 +1,9 @@ +# Hashes from: http://www.lua.org/ftp/ +md5 33278c2ab5ee3c1a875be8d55c1ca2a1 lua-5.3.2.tar.gz +sha1 7a47adef554fdca7d0c5536148de34579134a973 lua-5.3.2.tar.gz + +md5 913fdb32207046b273fdb17aad70be13 lua-5.2.4.tar.gz +sha1 ef15259421197e3d85b7d6e4871b8c26fd82c1cf lua-5.2.4.tar.gz + +md5 2e115fe26e435e33b0d5c022e4490567 lua-5.1.5.tar.gz +sha1 b3882111ad02ecc6b972f8c1241647905cb2e3fc lua-5.1.5.tar.gz diff --git a/package/lua/lua.mk b/package/lua/lua.mk new file mode 100644 index 0000000000..37992f26ab --- /dev/null +++ b/package/lua/lua.mk @@ -0,0 +1,106 @@ +################################################################################ +# +# lua +# +################################################################################ + +ifeq ($(BR2_PACKAGE_LUA_5_3),y) +LUA_VERSION = 5.3.2 +else +ifeq ($(BR2_PACKAGE_LUA_5_2),y) +LUA_VERSION = 5.2.4 +else +LUA_VERSION = 5.1.5 +endif +endif +LUA_SITE = http://www.lua.org/ftp +LUA_INSTALL_STAGING = YES +LUA_LICENSE = MIT +ifeq ($(BR2_PACKAGE_LUA_5_1),y) +LUA_LICENSE_FILES = COPYRIGHT +else +LUA_LICENSE_FILES = doc/readme.html +endif + +LUA_PROVIDES = luainterpreter + +LUA_CFLAGS = -Wall -fPIC -DLUA_USE_POSIX + +ifeq ($(BR2_PACKAGE_LUA_5_2),y) +LUA_CFLAGS += -DLUA_COMPAT_ALL +endif + +ifeq ($(BR2_PACKAGE_LUA_5_3),y) +LUA_CFLAGS += -DLUA_COMPAT_5_2 +endif + +ifeq ($(BR2_STATIC_LIBS),y) +LUA_BUILDMODE = static +else +LUA_BUILDMODE = dynamic +LUA_CFLAGS += -DLUA_USE_DLOPEN +LUA_MYLIBS += -ldl +endif + +ifeq ($(BR2_PACKAGE_LUA_READLINE),y) +LUA_DEPENDENCIES = readline ncurses +LUA_MYLIBS += -lreadline -lhistory -lncurses +LUA_CFLAGS += -DLUA_USE_READLINE +else +ifeq ($(BR2_PACKAGE_LUA_LINENOISE),y) +LUA_DEPENDENCIES = linenoise +LUA_MYLIBS += -llinenoise +LUA_CFLAGS += -DLUA_USE_LINENOISE +endif +endif + +ifeq ($(BR2_PACKAGE_LUA_32BITS),y) +define LUA_32BITS_LUACONF + $(SED) 's/\/\* #define LUA_32BITS \*\//#define LUA_32BITS/' $(@D)/src/luaconf.h +endef + +LUA_POST_PATCH_HOOKS += LUA_32BITS_LUACONF +endif + +# We never want to have host-readline and host-ncurses as dependencies +# of host-lua. +HOST_LUA_DEPENDENCIES = +HOST_LUA_CFLAGS = -Wall -fPIC -DLUA_USE_DLOPEN -DLUA_USE_POSIX +HOST_LUA_MYLIBS = -ldl + +define LUA_BUILD_CMDS + $(MAKE) \ + CC="$(TARGET_CC)" RANLIB="$(TARGET_RANLIB)" \ + CFLAGS="$(TARGET_CFLAGS) $(LUA_CFLAGS)" \ + MYLIBS="$(LUA_MYLIBS)" AR="$(TARGET_CROSS)ar rcu" \ + BUILDMODE=$(LUA_BUILDMODE) \ + PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all +endef + +define HOST_LUA_BUILD_CMDS + $(MAKE) \ + CFLAGS="$(HOST_LUA_CFLAGS)" \ + MYLDFLAGS="$(HOST_LDFLAGS)" \ + MYLIBS="$(HOST_LUA_MYLIBS)" \ + BUILDMODE=static \ + PKG_VERSION=$(LUA_VERSION) -C $(@D)/src all +endef + +define LUA_INSTALL_STAGING_CMDS + $(MAKE) INSTALL_TOP="$(STAGING_DIR)/usr" -C $(@D) install + $(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/lua.pc +endef + +define LUA_INSTALL_TARGET_CMDS + $(MAKE) INSTALL_TOP="$(TARGET_DIR)/usr" -C $(@D) install +endef + +define HOST_LUA_INSTALL_CMDS + $(MAKE) INSTALL_TOP="$(HOST_DIR)/usr" -C $(@D) install + $(INSTALL) -m 0644 -D $(@D)/etc/lua.pc \ + $(HOST_DIR)/usr/lib/pkgconfig/lua.pc +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/luabitop/Config.in b/package/luabitop/Config.in new file mode 100644 index 0000000000..26442fc910 --- /dev/null +++ b/package/luabitop/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LUABITOP + bool "luabitop" + depends on !BR2_PACKAGE_LUA_5_3 + help + Lua BitOp is a C extension module for Lua 5.1/5.2 which adds bitwise + operations on numbers. + + http://bitop.luajit.org + +comment "luabitop needs a Lua 5.1/5.2 interpreter" + depends on BR2_PACKAGE_LUA_5_3 diff --git a/package/luabitop/luabitop.hash b/package/luabitop/luabitop.hash new file mode 100644 index 0000000000..78110205a2 --- /dev/null +++ b/package/luabitop/luabitop.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 fc7a8065a57462ee13bed7f95b0ab13f94ecd1bf846108c61ccf2c75548af26e luabitop-1.0.2-1.src.rock diff --git a/package/luabitop/luabitop.mk b/package/luabitop/luabitop.mk new file mode 100644 index 0000000000..5ced99b327 --- /dev/null +++ b/package/luabitop/luabitop.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# luabitop +# +################################################################################ + +LUABITOP_VERSION_UPSTREAM = 1.0.2 +LUABITOP_VERSION = $(LUABITOP_VERSION_UPSTREAM)-1 +LUABITOP_SUBDIR = LuaBitOp-$(LUABITOP_VERSION_UPSTREAM) +LUABITOP_LICENSE = MIT +LUABITOP_LICENSE_FILES = $(LUABITOP_SUBDIR)/README + +$(eval $(luarocks-package)) diff --git a/package/luacrypto/Config.in b/package/luacrypto/Config.in new file mode 100644 index 0000000000..8d13eec6b5 --- /dev/null +++ b/package/luacrypto/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LUACRYPTO + bool "luacrypto" + select BR2_PACKAGE_OPENSSL + help + LuaCrypto provides a Lua frontend to the OpenSSL cryptographic + library. + The OpenSSL features that are currently exposed are digests (MD5, + SHA-1, HMAC, and more) and crypto-grade random number generators + communication. + + http://luacrypto.luaforge.net diff --git a/package/luacrypto/luacrypto.hash b/package/luacrypto/luacrypto.hash new file mode 100644 index 0000000000..5c577672e2 --- /dev/null +++ b/package/luacrypto/luacrypto.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 dc935c923b8851208d5d504b343448a9d5bd3e537bb8657875f12d72155600b8 luacrypto-0.3.2-1.src.rock diff --git a/package/luacrypto/luacrypto.mk b/package/luacrypto/luacrypto.mk new file mode 100644 index 0000000000..b0e972c629 --- /dev/null +++ b/package/luacrypto/luacrypto.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# luacrypto +# +################################################################################ + +LUACRYPTO_VERSION_UPSTREAM = 0.3.2 +LUACRYPTO_VERSION = $(LUACRYPTO_VERSION_UPSTREAM)-1 +LUACRYPTO_SUBDIR = luacrypto-$(LUACRYPTO_VERSION_UPSTREAM) +LUACRYPTO_LICENSE = MIT +LUACRYPTO_LICENSE_FILES = $(LUACRYPTO_SUBDIR)/COPYING +LUACRYPTO_DEPENDENCIES = openssl + +$(eval $(luarocks-package)) diff --git a/package/luaexpat/Config.in b/package/luaexpat/Config.in new file mode 100644 index 0000000000..6976e40c67 --- /dev/null +++ b/package/luaexpat/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LUAEXPAT + bool "luaexpat" + select BR2_PACKAGE_EXPAT + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + help + LuaExpat is a SAX XML parser based on the Expat library. + + http://matthewwild.co.uk/projects/luaexpat/ diff --git a/package/luaexpat/luaexpat.hash b/package/luaexpat/luaexpat.hash new file mode 100644 index 0000000000..27f6ed0342 --- /dev/null +++ b/package/luaexpat/luaexpat.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 aa7883a0d44f500e32ef306c04632546f97f33159fffa7bcdc3f451170f95896 luaexpat-1.3.0-1.src.rock diff --git a/package/luaexpat/luaexpat.mk b/package/luaexpat/luaexpat.mk new file mode 100644 index 0000000000..c6768dcc18 --- /dev/null +++ b/package/luaexpat/luaexpat.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# luaexpat +# +################################################################################ + +LUAEXPAT_VERSION = 1.3.0-1 +LUAEXPAT_DEPENDENCIES = expat +LUAEXPAT_LICENSE = MIT + +$(eval $(luarocks-package)) diff --git a/package/luaexpatutils/Config.in b/package/luaexpatutils/Config.in new file mode 100644 index 0000000000..cb2887acaa --- /dev/null +++ b/package/luaexpatutils/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LUAEXPATUTILS + bool "luaexpatutils" + select BR2_PACKAGE_LUAEXPAT + help + lxp.doc is a module that provides useful features for working with + XML formats in LOM format as used by the LuaExpat project from Kepler. + + https://github.com/stevedonovan/LuaExpatUtils diff --git a/package/luaexpatutils/luaexpatutils.mk b/package/luaexpatutils/luaexpatutils.mk new file mode 100644 index 0000000000..9bfc654716 --- /dev/null +++ b/package/luaexpatutils/luaexpatutils.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# luaexpatutils +# +################################################################################ + +LUAEXPATUTILS_VERSION = 88c228365b084224c911d34aff06002634b38b50 +LUAEXPATUTILS_SITE = $(call github,stevedonovan,LuaExpatUtils,$(LUAEXPATUTILS_VERSION)) +LUAEXPATUTILS_LICENSE = Public Domain +LUAEXPATUTILS_DEPENDENCIES = luaexpat + +define LUAEXPATUTILS_INSTALL_TARGET_CMDS + $(INSTALL) -m 0644 -D $(@D)/lua/doc.lua \ + $(TARGET_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER)/lxp/doc.lua +endef + +$(eval $(generic-package)) diff --git a/package/luafilesystem/Config.in b/package/luafilesystem/Config.in new file mode 100644 index 0000000000..50e7975b92 --- /dev/null +++ b/package/luafilesystem/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LUAFILESYSTEM + bool "luafilesystem" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + help + LuaFileSystem offers a portable way to access + the underlying directory structure and file attributes. + + http://keplerproject.github.com/luafilesystem/ diff --git a/package/luafilesystem/luafilesystem.hash b/package/luafilesystem/luafilesystem.hash new file mode 100644 index 0000000000..e91f9d6688 --- /dev/null +++ b/package/luafilesystem/luafilesystem.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 70121e78b8ef9365265b85027729d0520c1163f5609abfa9554b215a672f4e7a luafilesystem-1.6.3-1.src.rock diff --git a/package/luafilesystem/luafilesystem.mk b/package/luafilesystem/luafilesystem.mk new file mode 100644 index 0000000000..5826e1efa3 --- /dev/null +++ b/package/luafilesystem/luafilesystem.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# luafilesystem +# +################################################################################ + +LUAFILESYSTEM_VERSION = 1.6.3-1 +LUAFILESYSTEM_LICENSE = MIT +LUAFILESYSTEM_SUBDIR = luafilesystem + +$(eval $(luarocks-package)) diff --git a/package/luainterpreter/Config.in b/package/luainterpreter/Config.in new file mode 100644 index 0000000000..e89a9b84d2 --- /dev/null +++ b/package/luainterpreter/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HAS_LUAINTERPRETER + bool + +config BR2_PACKAGE_PROVIDES_LUAINTERPRETER + string + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + +config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION + string diff --git a/package/luainterpreter/luainterpreter.mk b/package/luainterpreter/luainterpreter.mk new file mode 100644 index 0000000000..a6c98ab992 --- /dev/null +++ b/package/luainterpreter/luainterpreter.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# luainterpreter +# +################################################################################ + +LUAINTERPRETER_ABIVER = $(call qstrip,$(BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION)) + +$(eval $(virtual-package)) +$(eval $(host-virtual-package)) + +LUA_RUN = $(HOST_DIR)/usr/bin/$(call qstrip,$(BR2_PACKAGE_PROVIDES_LUAINTERPRETER)) diff --git a/package/luajit/0001-no-bin-symlink.patch b/package/luajit/0001-no-bin-symlink.patch new file mode 100644 index 0000000000..37298dd7c7 --- /dev/null +++ b/package/luajit/0001-no-bin-symlink.patch @@ -0,0 +1,26 @@ +Do not use a symlink for the binary, simply name it luajit + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -43,8 +43,7 @@ + INSTALL_MAN= $(INSTALL_SHARE)/man/man1 + INSTALL_PKGCONFIG= $(INSTALL_LIB)/pkgconfig + +-INSTALL_TNAME= luajit-$(VERSION) +-INSTALL_TSYMNAME= luajit ++INSTALL_TNAME= luajit + INSTALL_ANAME= libluajit-$(ABIVER).a + INSTALL_SONAME= libluajit-$(ABIVER).so.$(MAJVER).$(MINVER).$(RELVER) + INSTALL_SOSHORT= libluajit-$(ABIVER).so +@@ -58,7 +57,6 @@ + INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT) + INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT) + INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME) +-INSTALL_TSYM= $(INSTALL_BIN)/$(INSTALL_TSYMNAME) + INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME) + + INSTALL_DIRS= $(INSTALL_BIN) $(INSTALL_LIB) $(INSTALL_INC) $(INSTALL_MAN) \ diff --git a/package/luajit/0002-install-inc.patch b/package/luajit/0002-install-inc.patch new file mode 100644 index 0000000000..86b766dfc4 --- /dev/null +++ b/package/luajit/0002-install-inc.patch @@ -0,0 +1,17 @@ +Install includes like lua's ones + +Signed-off-by: Francois Perrad + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -32,7 +32,7 @@ + INSTALL_BIN= $(DPREFIX)/bin + INSTALL_LIB= $(DPREFIX)/$(MULTILIB) + INSTALL_SHARE= $(DPREFIX)/share +-INSTALL_INC= $(DPREFIX)/include/luajit-$(MAJVER).$(MINVER) ++INSTALL_INC= $(DPREFIX)/include + + INSTALL_LJLIBD= $(INSTALL_SHARE)/luajit-$(VERSION) + INSTALL_JITLIB= $(INSTALL_LJLIBD)/jit diff --git a/package/luajit/0003-install-so.patch b/package/luajit/0003-install-so.patch new file mode 100644 index 0000000000..5929595abe --- /dev/null +++ b/package/luajit/0003-install-so.patch @@ -0,0 +1,22 @@ +fix the following runtime error : + luajit: error while loading shared libraries: libluajit-5.1.so.2: cannot open shared object file: No such file or directory + +by creating two symbolic links: + libluajit-5.1.so -> libluajit-5.1.so.2.0.3 + libluajit-5.1.so.2 -> libluajit-5.1.so.2.0.3 + +Signed-off-by: Francois Perrad + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -55,7 +55,7 @@ + INSTALL_STATIC= $(INSTALL_LIB)/$(INSTALL_ANAME) + INSTALL_DYN= $(INSTALL_LIB)/$(INSTALL_SONAME) + INSTALL_SHORT1= $(INSTALL_LIB)/$(INSTALL_SOSHORT) +-INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT) ++INSTALL_SHORT2= $(INSTALL_LIB)/$(INSTALL_SOSHORT).$(MAJVER) + INSTALL_T= $(INSTALL_BIN)/$(INSTALL_TNAME) + INSTALL_PC= $(INSTALL_PKGCONFIG)/$(INSTALL_PCNAME) + diff --git a/package/luajit/Config.in b/package/luajit/Config.in new file mode 100644 index 0000000000..8ce528b2cf --- /dev/null +++ b/package/luajit/Config.in @@ -0,0 +1,38 @@ +config BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS + bool + default y if BR2_i386 || \ + (BR2_x86_64 && BR2_HOSTARCH='x86_64') || \ + BR2_powerpc || BR2_arm || BR2_armeb || \ + ((BR2_mips || BR2_mipsel) && !BR2_MIPS_SOFT_FLOAT) + +config BR2_PACKAGE_LUAJIT + bool "luajit" + select BR2_PACKAGE_HAS_LUAINTERPRETER + depends on !BR2_STATIC_LIBS # dlopen + # Luajit is only available for some target architectures, and + # has some complexity wrt 32/64. See luajit.mk for details. + depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS + # luajit.mk uses the "-m32" compiler option to build 32bit + # binaries, so check if that option is supported. See + # luajit.mk for details. + select BR2_HOSTARCH_NEEDS_IA32_COMPILER if !BR2_ARCH_IS_64 + help + LuaJIT implements the full set of language features defined + by Lua 5.1. The virtual machine (VM) is API- and + ABI-compatible to the standard Lua interpreter and can be + deployed as a drop-in replacement. + + http://luajit.org/ + +if BR2_PACKAGE_LUAJIT + +config BR2_PACKAGE_PROVIDES_LUAINTERPRETER + default "luajit" + +config BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION + default "5.1" + +endif + +comment "luajit needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/luajit/luajit.hash b/package/luajit/luajit.hash new file mode 100644 index 0000000000..086bef0199 --- /dev/null +++ b/package/luajit/luajit.hash @@ -0,0 +1,2 @@ +# Hashes from: http://luajit.org/download.html +md5 dd9c38307f2223a504cbfb96e477eca0 LuaJIT-2.0.4.tar.gz diff --git a/package/luajit/luajit.mk b/package/luajit/luajit.mk new file mode 100644 index 0000000000..81a26603cb --- /dev/null +++ b/package/luajit/luajit.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# luajit +# +################################################################################ + +LUAJIT_VERSION = 2.0.4 +LUAJIT_SOURCE = LuaJIT-$(LUAJIT_VERSION).tar.gz +LUAJIT_SITE = http://luajit.org/download +LUAJIT_LICENSE = MIT +LUAJIT_LICENSE_FILES = COPYRIGHT + +LUAJIT_INSTALL_STAGING = YES + +LUAJIT_PROVIDES = luainterpreter + +ifeq ($(BR2_STATIC_LIBS),y) +LUAJIT_BUILDMODE = static +else +LUAJIT_BUILDMODE = dynamic +endif + +# The luajit build procedure requires the host compiler to have the +# same bitness as the target compiler. Therefore, on a x86 build +# machine, we can't build luajit for x86_64, which is checked in +# Config.in. When the target is a 32 bits target, we pass -m32 to +# ensure that even on 64 bits build machines, a compiler of the same +# bitness is used. Of course, this assumes that the 32 bits multilib +# libraries are installed. +ifeq ($(BR2_ARCH_IS_64),y) +LUAJIT_HOST_CC = $(HOSTCC) +else +LUAJIT_HOST_CC = $(HOSTCC) -m32 +endif + +# We unfortunately can't use TARGET_CONFIGURE_OPTS, because the luajit +# build system uses non conventional variable names. +define LUAJIT_BUILD_CMDS + $(MAKE) PREFIX="/usr" \ + STATIC_CC="$(TARGET_CC)" \ + DYNAMIC_CC="$(TARGET_CC) -fPIC" \ + TARGET_LD="$(TARGET_CC)" \ + TARGET_AR="$(TARGET_AR) rcus" \ + TARGET_STRIP=true \ + TARGET_CFLAGS="$(TARGET_CFLAGS)" \ + TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \ + HOST_CC="$(LUAJIT_HOST_CC)" \ + HOST_CFLAGS="$(HOST_CFLAGS)" \ + HOST_LDFLAGS="$(HOST_LDFLAGS)" \ + BUILDMODE=$(LUAJIT_BUILDMODE) \ + -C $(@D) amalg +endef + +define LUAJIT_INSTALL_STAGING_CMDS + $(MAKE) PREFIX="/usr" DESTDIR="$(STAGING_DIR)" LDCONFIG=true -C $(@D) install +endef + +define LUAJIT_INSTALL_TARGET_CMDS + $(MAKE) PREFIX="/usr" DESTDIR="$(TARGET_DIR)" LDCONFIG=true -C $(@D) install +endef + +define LUAJIT_INSTALL_SYMLINK + ln -fs luajit $(TARGET_DIR)/usr/bin/lua +endef +LUAJIT_POST_INSTALL_TARGET_HOOKS += LUAJIT_INSTALL_SYMLINK + +# host-efl package needs host-luajit to be linked dynamically. +define HOST_LUAJIT_BUILD_CMDS + $(MAKE) PREFIX="$(HOST_DIR)/usr" BUILDMODE=dynamic \ + TARGET_LDFLAGS="$(HOST_LDFLAGS)" \ + -C $(@D) amalg +endef + +define HOST_LUAJIT_INSTALL_CMDS + $(MAKE) PREFIX="$(HOST_DIR)/usr" LDCONFIG=true -C $(@D) install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/luajson/Config.in b/package/luajson/Config.in new file mode 100644 index 0000000000..c04aa7f008 --- /dev/null +++ b/package/luajson/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LUAJSON + bool "luajson" + # run-time dependency + select BR2_PACKAGE_LPEG + help + LuaJSON is a customizable JSON decoder/encoder + using LPEG for parsing. + + http://github.com/harningt/luajson diff --git a/package/luajson/luajson.hash b/package/luajson/luajson.hash new file mode 100644 index 0000000000..deda5efd6f --- /dev/null +++ b/package/luajson/luajson.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 4898e5575713b37a1eb9badbd3968e15ec1856115daaed9819acf39113616619 luajson-1.3.3-1.src.rock diff --git a/package/luajson/luajson.mk b/package/luajson/luajson.mk new file mode 100644 index 0000000000..67bc266444 --- /dev/null +++ b/package/luajson/luajson.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# luajson +# +################################################################################ + +LUAJSON_VERSION = 1.3.3-1 +LUAJSON_SUBDIR = luajson +LUAJSON_LICENSE = MIT +LUAJSON_LICENSE_FILES = $(LUAJSON_SUBDIR)/LICENSE + +$(eval $(luarocks-package)) diff --git a/package/lualogging/Config.in b/package/lualogging/Config.in new file mode 100644 index 0000000000..37d701522f --- /dev/null +++ b/package/lualogging/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LUALOGGING + bool "lualogging" + help + LuaLogging provides a simple API to use logging features in Lua. + Its design was based on log4j. LuaLogging currently supports, + through the use of appenders, console, file, rolling file, email, + socket and SQL outputs. + + http://www.keplerproject.org/lualogging/ diff --git a/package/lualogging/lualogging.hash b/package/lualogging/lualogging.hash new file mode 100644 index 0000000000..8a6211ec37 --- /dev/null +++ b/package/lualogging/lualogging.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 6ca3827c4903814626b96011e17ad99b42ecfa983b605aa75bf58f17e90ed58d lualogging-1.3.0-1.src.rock diff --git a/package/lualogging/lualogging.mk b/package/lualogging/lualogging.mk new file mode 100644 index 0000000000..3444a29886 --- /dev/null +++ b/package/lualogging/lualogging.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# lualogging +# +################################################################################ + +LUALOGGING_VERSION = 1.3.0-1 +LUALOGGING_SUBDIR = lualogging +LUALOGGING_LICENSE = MIT +LUALOGGING_LICENSE_FILES = $(LUALOGGING_SUBDIR)/COPYRIGHT + +$(eval $(luarocks-package)) diff --git a/package/luaposix/Config.in b/package/luaposix/Config.in new file mode 100644 index 0000000000..9707cdeeff --- /dev/null +++ b/package/luaposix/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LUAPOSIX + bool "luaposix" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + select BR2_PACKAGE_LUABITOP if BR2_PACKAGE_LUA_5_1 + # LuaBitOp is already included in LuaJIT + help + This is a POSIX binding for LuaJIT, Lua 5.1, 5.2 and 5.3; + like most libraries it simply binds to C APIs on the + underlying system, so it won't work on non-POSIX systems. + However, it does try to detect the level of POSIX conformance + of the underlying system and bind only available APIs. + + https://github.com/luaposix/luaposix diff --git a/package/luaposix/luaposix.mk b/package/luaposix/luaposix.mk new file mode 100644 index 0000000000..ea3af16fb3 --- /dev/null +++ b/package/luaposix/luaposix.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# luaposix +# +################################################################################ + +LUAPOSIX_VERSION = 33.4.0 +LUAPOSIX_SITE = $(call github,luaposix,luaposix,release-v$(LUAPOSIX_VERSION)) +LUAPOSIX_LICENSE = MIT +LUAPOSIX_LICENSE_FILES = COPYING +LUAPOSIX_DEPENDENCIES = luainterpreter host-lua +LUAPOSIX_CONF_OPTS = --libdir="/usr/lib/lua/$(LUAINTERPRETER_ABIVER)" --datarootdir="/usr/share/lua/$(LUAINTERPRETER_ABIVER)" + +$(eval $(autotools-package)) diff --git a/package/luarocks/luarocks.hash b/package/luarocks/luarocks.hash new file mode 100644 index 0000000000..4d9840a348 --- /dev/null +++ b/package/luarocks/luarocks.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 68e38feeb66052e29ad1935a71b875194ed8b9c67c2223af5f4d4e3e2464ed97 luarocks-2.3.0.tar.gz diff --git a/package/luarocks/luarocks.mk b/package/luarocks/luarocks.mk new file mode 100644 index 0000000000..656b832b9b --- /dev/null +++ b/package/luarocks/luarocks.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# luarocks +# +################################################################################ + +LUAROCKS_VERSION = 2.3.0 +LUAROCKS_SITE = http://luarocks.org/releases +LUAROCKS_LICENSE = MIT +LUAROCKS_LICENSE_FILES = COPYING + +HOST_LUAROCKS_DEPENDENCIES = host-luainterpreter + +LUAROCKS_CONFIG_DIR = $(HOST_DIR)/usr/etc/luarocks +LUAROCKS_CONFIG_FILE = $(LUAROCKS_CONFIG_DIR)/config-$(LUAINTERPRETER_ABIVER).lua +LUAROCKS_CFLAGS = $(TARGET_CFLAGS) -fPIC +ifeq ($(BR2_PACKAGE_LUA_5_3),y) +LUAROCKS_CFLAGS += -DLUA_COMPAT_5_2 +endif + +HOST_LUAROCKS_CONF_OPTS = \ + --prefix=$(HOST_DIR)/usr \ + --sysconfdir=$(LUAROCKS_CONFIG_DIR) \ + --with-lua=$(HOST_DIR)/usr + +ifeq ($(BR2_PACKAGE_LUAJIT),y) +HOST_LUAROCKS_CONF_OPTS += --lua-suffix=jit +endif + +define HOST_LUAROCKS_CONFIGURE_CMDS + cd $(@D) && ./configure $(HOST_LUAROCKS_CONF_OPTS) +endef + +define HOST_LUAROCKS_INSTALL_CMDS + rm -f $(LUAROCKS_CONFIG_FILE) + $(MAKE1) -C $(@D) install \ + PREFIX=$(HOST_DIR)/usr + echo "-- BR cross-compilation" >> $(LUAROCKS_CONFIG_FILE) + echo "variables = {" >> $(LUAROCKS_CONFIG_FILE) + echo " LUA_INCDIR = [[$(STAGING_DIR)/usr/include]]," >> $(LUAROCKS_CONFIG_FILE) + echo " LUA_LIBDIR = [[$(STAGING_DIR)/usr/lib]]," >> $(LUAROCKS_CONFIG_FILE) + echo " CC = [[$(TARGET_CC)]]," >> $(LUAROCKS_CONFIG_FILE) + echo " LD = [[$(TARGET_CC)]]," >> $(LUAROCKS_CONFIG_FILE) + echo " CFLAGS = [[$(LUAROCKS_CFLAGS)]]," >> $(LUAROCKS_CONFIG_FILE) + echo " LIBFLAG = [[-shared $(TARGET_LDFLAGS)]]," >> $(LUAROCKS_CONFIG_FILE) + echo "}" >> $(LUAROCKS_CONFIG_FILE) + echo "external_deps_dirs = { [[$(STAGING_DIR)/usr]] }" >> $(LUAROCKS_CONFIG_FILE) + echo "gcc_rpath = false" >> $(LUAROCKS_CONFIG_FILE) + echo "rocks_trees = { [[$(TARGET_DIR)/usr]] }" >> $(LUAROCKS_CONFIG_FILE) + echo "wrap_bin_scripts = false" >> $(LUAROCKS_CONFIG_FILE) + echo "deps_mode = [[none]]" >> $(LUAROCKS_CONFIG_FILE) +endef + +$(eval $(host-generic-package)) + +LUAROCKS_RUN_ENV = LUA_PATH="$(HOST_DIR)/usr/share/lua/$(LUAINTERPRETER_ABIVER)/?.lua" +LUAROCKS_RUN_CMD = $(LUA_RUN) $(HOST_DIR)/usr/bin/luarocks + +define LUAROCKS_FINALIZE_TARGET + rm -rf $(TARGET_DIR)/usr/lib/luarocks +endef + +TARGET_FINALIZE_HOOKS += LUAROCKS_FINALIZE_TARGET + diff --git a/package/luasec/Config.in b/package/luasec/Config.in new file mode 100644 index 0000000000..a8cc9c977e --- /dev/null +++ b/package/luasec/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LUASEC + bool "luasec" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LUASOCKET + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + help + LuaSec is a binding for OpenSSL library to provide TLS/SSL + communication. + + http://www.inf.puc-rio.br/~brunoos/luasec/ diff --git a/package/luasec/luasec.hash b/package/luasec/luasec.hash new file mode 100644 index 0000000000..1e9f70ad6f --- /dev/null +++ b/package/luasec/luasec.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d2198cc39b3fa55bd5020046742b34093b6efcb619cf4032948b8c8556202a32 luasec-0.5-2.src.rock diff --git a/package/luasec/luasec.mk b/package/luasec/luasec.mk new file mode 100644 index 0000000000..fd1f1cdbb7 --- /dev/null +++ b/package/luasec/luasec.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# luasec +# +################################################################################ + +LUASEC_VERSION_UPSTREAM = 0.5 +LUASEC_VERSION = $(LUASEC_VERSION_UPSTREAM)-2 +LUASEC_SUBDIR = luasec +LUASEC_LICENSE = MIT +LUASEC_LICENSE_FILES = $(LUASEC_SUBDIR)/LICENSE +LUASEC_DEPENDENCIES = openssl + +$(eval $(luarocks-package)) diff --git a/package/luasocket/Config.in b/package/luasocket/Config.in new file mode 100644 index 0000000000..45f959e8d0 --- /dev/null +++ b/package/luasocket/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LUASOCKET + bool "luasocket" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + help + LuaSocket is the most comprehensive networking support library + for the Lua language. + It provides easy access to TCP, UDP, DNS, SMTP, + FTP, HTTP, MIME and much more. + + http://luaforge.net/projects/luasocket/ diff --git a/package/luasocket/luasocket.hash b/package/luasocket/luasocket.hash new file mode 100644 index 0000000000..ad91f44205 --- /dev/null +++ b/package/luasocket/luasocket.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 453fc1d0e9b6a44bbada4290d565f840a5e96ba2d1b47562ba38bd9c7e82195a luasocket-3.0rc1-1.src.rock diff --git a/package/luasocket/luasocket.mk b/package/luasocket/luasocket.mk new file mode 100644 index 0000000000..20927fc1d6 --- /dev/null +++ b/package/luasocket/luasocket.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# luasocket +# +################################################################################ + +LUASOCKET_VERSION = 3.0rc1-1 +LUASOCKET_SUBDIR = luasocket-3.0-rc1 +LUASOCKET_LICENSE = MIT +LUASOCKET_LICENSE_FILES = $(LUASOCKET_SUBDIR)/LICENSE + +$(eval $(luarocks-package)) diff --git a/package/luasql-sqlite3/Config.in b/package/luasql-sqlite3/Config.in new file mode 100644 index 0000000000..3bd73f3ba5 --- /dev/null +++ b/package/luasql-sqlite3/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_LUASQL_SQLITE3 + bool "luasql-sqlite3" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + select BR2_PACKAGE_SQLITE + help + LuaSQL is a simple interface from Lua to a DBMS. + + http://www.keplerproject.org/luasql + diff --git a/package/luasql-sqlite3/luasql-sqlite3.hash b/package/luasql-sqlite3/luasql-sqlite3.hash new file mode 100644 index 0000000000..5728c8db04 --- /dev/null +++ b/package/luasql-sqlite3/luasql-sqlite3.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 e98d4e997682097f5bc2859596b9615f4cb87438db23ceb4af5e36b4424524ab luasql-sqlite3-2.3.0-1.src.rock diff --git a/package/luasql-sqlite3/luasql-sqlite3.mk b/package/luasql-sqlite3/luasql-sqlite3.mk new file mode 100644 index 0000000000..23983a84fc --- /dev/null +++ b/package/luasql-sqlite3/luasql-sqlite3.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# luasql-sqlite3 +# +################################################################################ + +LUASQL_SQLITE3_VERSION = 2.3.0-1 +LUASQL_SQLITE3_SUBDIR = luasql +LUASQL_SQLITE3_LICENSE = MIT +LUASQL_SQLITE3_LICENSE_FILES = $(LUASQL_SQLITE3_SUBDIR)/README +LUASQL_SQLITE3_DEPENDENCIES = sqlite + +$(eval $(luarocks-package)) diff --git a/package/lunit/Config.in b/package/lunit/Config.in new file mode 100644 index 0000000000..d6c2c6b157 --- /dev/null +++ b/package/lunit/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_LUNIT + bool "lunit" + depends on BR2_PACKAGE_LUA_5_1 || BR2_PACKAGE_LUAJIT + help + A unit testing framework for Lua. + + http://www.mroth.net/lunit/ + +comment "lunit needs a Lua 5.1 interpreter" + depends on !BR2_PACKAGE_LUA_5_1 + depends on !BR2_PACKAGE_LUAJIT diff --git a/package/lunit/lunit.hash b/package/lunit/lunit.hash new file mode 100644 index 0000000000..9c8d53c5ed --- /dev/null +++ b/package/lunit/lunit.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 b19854c685337ddcec2fe9c22113d2cd14715d52ccd2676abe2fa49b61a2ec4d lunit-0.5-2.src.rock diff --git a/package/lunit/lunit.mk b/package/lunit/lunit.mk new file mode 100644 index 0000000000..3c557f8748 --- /dev/null +++ b/package/lunit/lunit.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# lunit +# +################################################################################ + +LUNIT_VERSION_UPSTREAM = 0.5 +LUNIT_VERSION = $(LUNIT_VERSION_UPSTREAM)-2 +LUNIT_SUBDIR = lunit-$(LUNIT_VERSION_UPSTREAM) +LUNIT_LICENSE = MIT +LUNIT_LICENSE_FILES = $(LUNIT_SUBDIR)/LICENSE + +$(eval $(luarocks-package)) diff --git a/package/lutok/Config.in b/package/lutok/Config.in new file mode 100644 index 0000000000..d6c87cf586 --- /dev/null +++ b/package/lutok/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_LUTOK + bool "lutok" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + depends on !BR2_PACKAGE_LUAJIT + help + Lutok is a lightweight C++ API library for Lua. + + https://github.com/jmmv/lutok + +comment "lutok needs a toolchain w/ C++ and full Lua" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_PACKAGE_LUAJIT + depends on BR2_PACKAGE_HAS_LUAINTERPRETER diff --git a/package/lutok/lutok.hash b/package/lutok/lutok.hash new file mode 100644 index 0000000000..0ec8988073 --- /dev/null +++ b/package/lutok/lutok.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 2cec51efa0c8d65ace8b21eaa08384b77abc5087b46e785f78de1c21fb754cd5 lutok-0.4.tar.gz diff --git a/package/lutok/lutok.mk b/package/lutok/lutok.mk new file mode 100644 index 0000000000..6ee198b402 --- /dev/null +++ b/package/lutok/lutok.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# lutok +# +################################################################################ + +LUTOK_VERSION = 0.4 +LUTOK_SITE = https://github.com/jmmv/lutok/releases/download/lutok-$(LUTOK_VERSION) +LUTOK_INSTALL_STAGING = YES +LUTOK_DEPENDENCIES = host-pkgconf lua +# --without-atf disables the atf-based lutok tests +LUTOK_CONF_OPTS = --without-doxygen --without-atf +LUTOK_LICENSE = BSD-3c +LUTOK_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/luv/Config.in b/package/luv/Config.in new file mode 100644 index 0000000000..787d16269b --- /dev/null +++ b/package/luv/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_LUV + bool "luv" + select BR2_PACKAGE_LIBUV + depends on BR2_TOOLCHAIN_HAS_THREADS # libuv + depends on BR2_USE_MMU # libuv + depends on !BR2_STATIC_LIBS # libuv + help + libuv bindings for LuaJIT and Lua. + + https://github.com/luvit/luv + +comment "luv needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on BR2_USE_MMU diff --git a/package/luv/luv.hash b/package/luv/luv.hash new file mode 100644 index 0000000000..30646d90b8 --- /dev/null +++ b/package/luv/luv.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 fab5ba54f141711afc432216d03f3664710798204c78a2a7414479f10b2b2d83 luv-1.9.0-1.tar.gz diff --git a/package/luv/luv.mk b/package/luv/luv.mk new file mode 100644 index 0000000000..5e4d04819e --- /dev/null +++ b/package/luv/luv.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# luv +# +################################################################################ + +LUV_VERSION = 1.9.0-1 +LUV_SITE = https://github.com/luvit/luv/releases/download/$(LUV_VERSION) +LUV_LICENSE = Apache-2.0 +LUV_LICENSE_FILES = LICENSE.txt +LUV_DEPENDENCIES = libuv +LUV_INSTALL_STAGING = YES + +LUV_CONF_OPTS += \ + -DBUILD_MODULE=OFF \ + -DWITH_SHARED_LIBUV=ON \ + -DLUA_BUILD_TYPE=System + +ifeq ($(BR2_PACKAGE_LUAJIT),y) +LUV_DEPENDENCIES += luajit +LUV_CONF_OPTS += \ + -DWITH_LUA_ENGINE=LuaJIT +else +LUV_DEPENDENCIES += lua +LUV_CONF_OPTS += \ + -DWITH_LUA_ENGINE=Lua +endif + +$(eval $(cmake-package)) diff --git a/package/luvi/Config.in b/package/luvi/Config.in new file mode 100644 index 0000000000..2f01f5c2fa --- /dev/null +++ b/package/luvi/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_LUVI + bool "luvi" + depends on BR2_TOOLCHAIN_HAS_THREADS # libuv + depends on BR2_USE_MMU # libuv + depends on !BR2_STATIC_LIBS # libuv + depends on BR2_PACKAGE_LUAJIT + select BR2_PACKAGE_LIBUV + select BR2_PACKAGE_LUV + help + A project in-between luv and luvit. The goal of this is to make + building luvit and derivatives much easier. + + luvi extends LuaJIT with asynchronous I/O and several optional + modules to run Lua applications and build self-contained binaries + on systems that don't have a compiler. + + The luvi core can be extended with several Lua modules by adding its + bundled Lua binding libraries. To get the Lua module... + * 'rex' select PCRE (BR2_PACKAGE_PCRE) + * 'ssl' select OpenSSL (BR2_PACKAGE_OPENSSL) + * 'zlib' select zlib (BR2_PACKAGE_ZLIB) + + https://github.com/luvit/luvi + +comment "luvi needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on BR2_USE_MMU + +comment "luvi needs LuaJIT" + depends on !BR2_PACKAGE_LUAJIT diff --git a/package/luvi/luvi.hash b/package/luvi/luvi.hash new file mode 100644 index 0000000000..7aa099fa31 --- /dev/null +++ b/package/luvi/luvi.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 1177fcc69b1bd74696d7f106e1632462b7331ef7816bbcada91a530ef19235ea luvi-src-v2.7.0.tar.gz +sha256 0269504ebd6fe73948bd2314199e686701c6de882fab84a48b8317c0671e84c5 35c3961d10d3f9e3752102ea8e8bb8c187b32241.patch diff --git a/package/luvi/luvi.mk b/package/luvi/luvi.mk new file mode 100644 index 0000000000..c5cfed6056 --- /dev/null +++ b/package/luvi/luvi.mk @@ -0,0 +1,63 @@ +################################################################################ +# +# luvi +# +################################################################################ + +LUVI_VERSION = v2.7.0 +LUVI_SOURCE = luvi-src-$(LUVI_VERSION).tar.gz +LUVI_SITE = https://github.com/luvit/luvi/releases/download/$(LUVI_VERSION) +LUVI_LICENSE = Apache-2.0 +LUVI_LICENSE_FILES = LICENSE.txt +LUVI_DEPENDENCIES = libuv luajit luv host-luajit +LUVI_PATCH = https://github.com/luvit/luvi/commit/35c3961d10d3f9e3752102ea8e8bb8c187b32241.patch + +# Dispatch all architectures of LuaJIT +ifeq ($(BR2_i386),y) +LUVI_TARGET_ARCH = x86 +else ifeq ($(BR2_x86_64),y) +LUVI_TARGET_ARCH = x64 +else ifeq ($(BR2_powerpc),y) +LUVI_TARGET_ARCH = ppc +else ifeq ($(BR2_arm)$(BR2_armeb),y) +LUVI_TARGET_ARCH = arm +else ifeq ($(BR2_mips),y) +LUVI_TARGET_ARCH = mips +else ifeq ($(BR2_mipsel),y) +LUVI_TARGET_ARCH = mipsel +else +LUVI_TARGET_ARCH = $(BR2_ARCH) +endif + +# Bundled lua bindings have to be linked statically into the luvi executable +LUVI_CONF_OPTS = \ + -DBUILD_SHARED_LIBS=OFF \ + -DWithSharedLibluv=ON \ + -DTARGET_ARCH=$(LUVI_TARGET_ARCH) \ + -DLUA_PATH=$(HOST_DIR)/usr/share/luajit-2.0.4/?.lua + +# Add "rex" module (PCRE via bundled lrexlib) +ifeq ($(BR2_PACKAGE_PCRE),y) +LUVI_DEPENDENCIES += pcre +LUVI_CONF_OPTS += -DWithPCRE=ON -DWithSharedPCRE=ON +else +LUVI_CONF_OPTS += -DWithPCRE=OFF -DWithSharedPCRE=OFF +endif + +# Add "ssl" module (via bundled lua-openssl) +ifeq ($(BR2_PACKAGE_OPENSSL),y) +LUVI_DEPENDENCIES += openssl +LUVI_CONF_OPTS += -DWithOpenSSL=ON -DWithOpenSSLASM=ON -DWithSharedOpenSSL=ON +else +LUVI_CONF_OPTS += -DWithOpenSSL=OFF -DWithOpenSSLASM=OFF -DWithSharedOpenSSL=OFF +endif + +# Add "zlib" module (via bundled lua-zlib) +ifeq ($(BR2_PACKAGE_ZLIB),y) +LUVI_DEPENDENCIES += zlib +LUVI_CONF_OPTS += -DWithZLIB=ON -DWithSharedZLIB=ON +else +LUVI_CONF_OPTS += -DWithZLIB=OFF -DWithSharedZLIB=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/lvm2/Config.in b/package/lvm2/Config.in new file mode 100644 index 0000000000..b3a6593609 --- /dev/null +++ b/package/lvm2/Config.in @@ -0,0 +1,39 @@ +config BR2_PACKAGE_LVM2 + bool "lvm2 & device mapper" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # needs fork() + depends on !BR2_STATIC_LIBS # It fails to build statically + help + This is LVM2, the rewrite of The Linux Logical Volume Manager. + LVM supports enterprise level volume management of disk and disk + subsystems by grouping arbitrary disks into volume groups. The total + capacity of volume groups can be allocated to logical volumes, which + are accessed as regular block devices. + + The Linux Kernel Device Mapper is the LVM + (Linux Logical Volume Management) Team's implementation of a + minimalistic kernel-space driver that handles volume management, + while keeping knowledge of the underlying device layout in + user-space. This makes it useful for not only LVM, but EVMS, + software raid, and other drivers that create "virtual" block devices. + +if BR2_PACKAGE_LVM2 + +config BR2_PACKAGE_LVM2_STANDARD_INSTALL + bool "standard install instead of only dmsetup" + default y if !BR2_PACKAGE_LVM2_DMSETUP_ONLY # legacy 2013.11 + help + Install the standard suite of lvm2 programs. When this option is not + set, only dmsetup is installed. + +config BR2_PACKAGE_LVM2_APP_LIBRARY + bool "install application library" + select BR2_PACKAGE_LVM2_STANDARD_INSTALL + help + Install application library (liblvm2app). + +endif + +comment "lvm2 needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/lvm2/lvm2.hash b/package/lvm2/lvm2.hash new file mode 100644 index 0000000000..2aa7d78ba2 --- /dev/null +++ b/package/lvm2/lvm2.hash @@ -0,0 +1,2 @@ +# From ftp://sources.redhat.com/pub/lvm2/releases/sha512.sum +sha512 1c1c3f95ab76e23629ee54b87d36536f887d8a30976413206491a3a13101b717948b3ab4a7778cb1e74f258f429871076f0b9d098785835c4885eb61def793ca LVM2.2.02.153.tgz diff --git a/package/lvm2/lvm2.mk b/package/lvm2/lvm2.mk new file mode 100644 index 0000000000..d45a108f37 --- /dev/null +++ b/package/lvm2/lvm2.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# lvm2 +# +################################################################################ + +LVM2_VERSION = 2.02.153 +LVM2_SOURCE = LVM2.$(LVM2_VERSION).tgz +LVM2_SITE = ftp://sources.redhat.com/pub/lvm2/releases +LVM2_INSTALL_STAGING = YES +LVM2_LICENSE = GPLv2, LGPLv2.1 +LVM2_LICENSE_FILES = COPYING COPYING.LIB + +# Make sure that binaries and libraries are installed with write +# permissions for the owner. +LVM2_CONF_OPTS += \ + --enable-write_install \ + --enable-pkgconfig \ + --enable-cmdlib \ + --enable-dmeventd + +# LVM2 uses autoconf, but not automake, and the build system does not +# take into account the CC passed at configure time. +LVM2_MAKE_ENV = CC="$(TARGET_CC)" + +ifeq ($(BR2_PACKAGE_READLINE),y) +LVM2_DEPENDENCIES += readline +else +# v2.02.44: disable readline usage, or binaries are linked against provider +# of "tgetent" (=> ncurses) even if it's not used.. +LVM2_CONF_OPTS += --disable-readline +endif + +ifeq ($(BR2_PACKAGE_LVM2_STANDARD_INSTALL),) +LVM2_MAKE_OPTS = device-mapper +LVM2_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install_device-mapper +LVM2_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install_device-mapper +endif + +ifeq ($(BR2_PACKAGE_LVM2_APP_LIBRARY),y) +LVM2_CONF_OPTS += --enable-applib +else +LVM2_CONF_OPTS += --disable-applib +endif + +ifeq ($(BR2_arc),y) +LVM2_CONF_ENV += ac_cv_flag_HAVE_PIE=no +endif + +$(eval $(autotools-package)) diff --git a/package/lxc/0001-drop-werror.patch b/package/lxc/0001-drop-werror.patch new file mode 100644 index 0000000000..d2a8673a86 --- /dev/null +++ b/package/lxc/0001-drop-werror.patch @@ -0,0 +1,16 @@ +Don't do -Werror it breaks builds on some scenarios with trivialities. + +Signed-off-by: Gustavo Zacarias + +diff -Nura lxc-lxc-1.0.4/configure.ac lxc-lxc-1.0.4.orig/configure.ac +--- lxc-lxc-1.0.4.orig/configure.ac 2014-07-04 10:31:19.821029891 -0300 ++++ lxc-lxc-1.0.4/configure.ac 2014-06-13 14:07:45.000000000 -0300 +@@ -560,7 +560,7 @@ + LXC_CHECK_TLS + + if test "x$GCC" = "xyes"; then +- CFLAGS="$CFLAGS -Wall -Werror" ++ CFLAGS="$CFLAGS -Wall" + fi + + # Files requiring some variable expansion diff --git a/package/lxc/0002-Fix-redefinition-of-struct-in6_addr.patch b/package/lxc/0002-Fix-redefinition-of-struct-in6_addr.patch new file mode 100644 index 0000000000..b48ece38f6 --- /dev/null +++ b/package/lxc/0002-Fix-redefinition-of-struct-in6_addr.patch @@ -0,0 +1,43 @@ +From 245bba9aadf8e7aea487b6fbd851f86c75524552 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Thu, 19 May 2016 21:51:27 +0200 +Subject: [PATCH] Fix redefinition of struct in6_addr +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +struct in6_addr is both defined in the C library header +and the Linux kernel header . + +lxc_user_nic.c includes both and . The +later one includes . + +This breaks build with the musl libc: + error: redefinition of ‘struct in6_addr’ + +As lxc_user_nic.c does not use any references from it +is safe to remove this header. + +Upstream status: Pending +https://github.com/lxc/lxc/pull/1029 + +Signed-off-by: Jörg Krause +--- + src/lxc/lxc_user_nic.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/lxc/lxc_user_nic.c b/src/lxc/lxc_user_nic.c +index 87780ca..0cb38ba 100644 +--- a/src/lxc/lxc_user_nic.c ++++ b/src/lxc/lxc_user_nic.c +@@ -41,7 +41,6 @@ + #include + #include + #include +-#include + #include + #include + #include +-- +2.8.2 + diff --git a/package/lxc/Config.in b/package/lxc/Config.in new file mode 100644 index 0000000000..6a39d2eb7f --- /dev/null +++ b/package/lxc/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_LXC + bool "lxc" + select BR2_PACKAGE_LIBCAP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + # build system forcefully builds a shared library + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # setns() system call + help + Linux Containers (LXC), provides the ability to group and isolate + of a set of processes in a jail by virtualizing and accounting the + kernel resources. It is similar to Linux-Vserver or Openvz. + + https://linuxcontainers.org/ + +comment "lxc needs a toolchain w/ threads, headers >= 3.0, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 \ + || BR2_STATIC_LIBS diff --git a/package/lxc/lxc.hash b/package/lxc/lxc.hash new file mode 100644 index 0000000000..747010162c --- /dev/null +++ b/package/lxc/lxc.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9588ad1b04e114ee7370f690c65131e28098b28d2521d97c73557d11897ed0be lxc-1.1.5.tar.gz diff --git a/package/lxc/lxc.mk b/package/lxc/lxc.mk new file mode 100644 index 0000000000..819096959a --- /dev/null +++ b/package/lxc/lxc.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# lxc +# +################################################################################ + +LXC_VERSION = 1.1.5 +LXC_SITE = https://linuxcontainers.org/downloads/lxc +LXC_LICENSE = LGPLv2.1+ +LXC_LICENSE_FILES = COPYING +LXC_DEPENDENCIES = libcap host-pkgconf +# we're patching configure.ac +LXC_AUTORECONF = YES +LXC_CONF_OPTS = --disable-apparmor --with-distro=buildroot \ + --disable-lua --disable-python \ + $(if $(BR2_PACKAGE_BASH),,--disable-bash) + +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) +LXC_CONF_OPTS += --enable-seccomp +LXC_DEPENDENCIES += libseccomp +else +LXC_CONF_OPTS += --disable-seccomp +endif + +$(eval $(autotools-package)) diff --git a/package/lz4/Config.in b/package/lz4/Config.in new file mode 100644 index 0000000000..4a00a70365 --- /dev/null +++ b/package/lz4/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LZ4 + bool "lz4" + help + LZ4 is a very fast lossless compression algorithm, providing + compression speed at 400 MB/s per core, scalable with multi-cores + CPU. It also features an extremely fast decoder, with speed + in multiple GB/s per core, typically reaching RAM speed limits + on multi-core systems. + + http://www.lz4.org/ diff --git a/package/lz4/lz4.hash b/package/lz4/lz4.hash new file mode 100644 index 0000000000..1281284697 --- /dev/null +++ b/package/lz4/lz4.hash @@ -0,0 +1,2 @@ +# sha256 locally computed +sha256 9d4d00614d6b9dec3114b33d1224b6262b99ace24434c53487a0c8fd0b18cfed lz4-r131.tar.gz diff --git a/package/lz4/lz4.mk b/package/lz4/lz4.mk new file mode 100644 index 0000000000..a5a41d359c --- /dev/null +++ b/package/lz4/lz4.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# lz4 +# +################################################################################ + +LZ4_VERSION = r131 +LZ4_SITE = $(call github,Cyan4973,lz4,$(LZ4_VERSION)) +LZ4_INSTALL_STAGING = YES +LZ4_LICENSE = BSD-2c (library), GPLv2+ (programs) +LZ4_LICENSE_FILES = lib/LICENSE programs/COPYING + +ifeq ($(BR2_STATIC_LIBS),y) +define LZ4_DISABLE_SHARED + $(SED) '/SHARED/d' $(@D)/lib/Makefile +endef +LZ4_POST_PATCH_HOOKS += LZ4_DISABLE_SHARED +endif + +define HOST_LZ4_BUILD_CMDS + $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) +endef + +define HOST_LZ4_INSTALL_CMDS + $(MAKE) $(HOST_CONFIGURE_OPTS) PREFIX=$(HOST_DIR)/usr \ + install -C $(@D) +endef + +define LZ4_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/lib +endef + +define LZ4_INSTALL_STAGING_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(STAGING_DIR) \ + PREFIX=/usr install -C $(@D) +endef + +define LZ4_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) DESTDIR=$(TARGET_DIR) \ + PREFIX=/usr install -C $(@D)/lib +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/lzip/Config.in b/package/lzip/Config.in new file mode 100644 index 0000000000..f20d0e5daa --- /dev/null +++ b/package/lzip/Config.in @@ -0,0 +1,14 @@ +comment "lzip needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_LZIP + bool "lzip" + depends on BR2_INSTALL_LIBSTDCPP + help + Lzip is a lossless data compressor with a user interface similar + to the one of gzip or bzip2. + Lzip is about as fast as gzip, compresses most files more than + bzip2, and is better than both from a data recovery perspective. + Lzip is a clean implementation of the LZMA algorithm. + + http://savannah.nongnu.org/projects/lzip diff --git a/package/lzip/lzip.hash b/package/lzip/lzip.hash new file mode 100644 index 0000000000..7b83e3e6a2 --- /dev/null +++ b/package/lzip/lzip.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 7cd3fcda68fc9900efcf7784313e3bdd1303fef1a0546db9723f5e5564dd05b6 lzip-1.15.tar.gz diff --git a/package/lzip/lzip.mk b/package/lzip/lzip.mk new file mode 100644 index 0000000000..7b1fdf48af --- /dev/null +++ b/package/lzip/lzip.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# lzip +# +################################################################################ + +LZIP_VERSION = 1.15 +LZIP_SITE = http://download.savannah.gnu.org/releases/lzip +LZIP_LICENSE = GPLv3+ +LZIP_LICENSE_FILES = COPYING + +define LZIP_CONFIGURE_CMDS + (cd $(@D); ./configure --prefix=/usr \ + $(TARGET_CONFIGURE_OPTS) ) +endef + +define HOST_LZIP_CONFIGURE_CMDS + (cd $(@D); ./configure --prefix=/usr \ + $(HOST_CONFIGURE_OPTS) ) +endef + +define LZIP_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define HOST_LZIP_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define LZIP_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +define HOST_LZIP_INSTALL_CMDS + $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR) install +endef + +# It's not autotools-based +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/lzlib/Config.in b/package/lzlib/Config.in new file mode 100644 index 0000000000..32328c5ec7 --- /dev/null +++ b/package/lzlib/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_LZLIB + bool "lzlib" + select BR2_PACKAGE_ZLIB + depends on BR2_PACKAGE_LUA + help + This package provides a library to access zlib library + functions and also to read/write gzip files using an + interface similar to the base io package. + + https://github.com/LuaDist/lzlib diff --git a/package/lzlib/lzlib.hash b/package/lzlib/lzlib.hash new file mode 100644 index 0000000000..f983862e41 --- /dev/null +++ b/package/lzlib/lzlib.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 cbb0cac5825e940b4ea2f31a336d2aaf6db39847d456920afd8e443804420dbb lzlib-0.4.3.tar.gz diff --git a/package/lzlib/lzlib.mk b/package/lzlib/lzlib.mk new file mode 100644 index 0000000000..91f380afa2 --- /dev/null +++ b/package/lzlib/lzlib.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# lzlib +# +################################################################################ + +LZLIB_VERSION = 0.4.3 +LZLIB_SITE = $(call github,LuaDist,lzlib,$(LZLIB_VERSION)) +LZLIB_DEPENDENCIES = zlib +LZLIB_LICENSE = MIT +LZLIB_CONF_OPTS = -DINSTALL_CMOD="/usr/lib/lua/$(LUAINTERPRETER_ABIVER)" \ + -DINSTALL_LMOD="/usr/share/lua/$(LUAINTERPRETER_ABIVER)" + +$(eval $(cmake-package)) diff --git a/package/lzma/0001-Remove-static-from-LDFLAGS.patch b/package/lzma/0001-Remove-static-from-LDFLAGS.patch new file mode 100644 index 0000000000..9a33e44b8d --- /dev/null +++ b/package/lzma/0001-Remove-static-from-LDFLAGS.patch @@ -0,0 +1,68 @@ +From 1b33f6d13e5c25a2500ee312068c08a3d3811a5f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= +Date: Wed, 3 Dec 2014 21:32:02 +0100 +Subject: [PATCH] Remove -static from LDFLAGS +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Buildroot does not enable static libraries by default for host builds. Having +-static hardcoded in the LDFLAGS breaks the build, so remove it. + +Signed-off-by: Vincent Stehlé +--- + src/lzmadec/Makefile.am | 1 - + src/lzmadec/Makefile.in | 1 - + src/lzmainfo/Makefile.am | 1 - + src/lzmainfo/Makefile.in | 1 - + 4 files changed, 4 deletions(-) + +diff --git a/src/lzmadec/Makefile.am b/src/lzmadec/Makefile.am +index 7322b2a..13edec8 100644 +--- a/src/lzmadec/Makefile.am ++++ b/src/lzmadec/Makefile.am +@@ -2,6 +2,5 @@ bin_PROGRAMS = lzmadec + lzmadec_SOURCES = lzmadec.c + lzmadec_LDADD = @top_builddir@/src/liblzmadec/liblzmadec.la + AM_CPPFLAGS = -I@top_srcdir@/src/liblzmadec +-AM_LDFLAGS = -static + + dist_man_MANS = lzmadec.1 +diff --git a/src/lzmadec/Makefile.in b/src/lzmadec/Makefile.in +index 5af9240..4ed1de1 100644 +--- a/src/lzmadec/Makefile.in ++++ b/src/lzmadec/Makefile.in +@@ -185,7 +185,6 @@ top_srcdir = @top_srcdir@ + lzmadec_SOURCES = lzmadec.c + lzmadec_LDADD = @top_builddir@/src/liblzmadec/liblzmadec.la + AM_CPPFLAGS = -I@top_srcdir@/src/liblzmadec +-AM_LDFLAGS = -static + dist_man_MANS = lzmadec.1 + all: all-am + +diff --git a/src/lzmainfo/Makefile.am b/src/lzmainfo/Makefile.am +index b5b01ec..e280bff 100644 +--- a/src/lzmainfo/Makefile.am ++++ b/src/lzmainfo/Makefile.am +@@ -2,6 +2,5 @@ bin_PROGRAMS = lzmainfo + lzmainfo_SOURCES = lzmainfo.c + lzmainfo_LDADD = @top_builddir@/src/liblzmadec/liblzmadec.la + AM_CPPFLAGS = -I@top_srcdir@/src/liblzmadec +-AM_LDFLAGS = -static + + dist_man_MANS = lzmainfo.1 +diff --git a/src/lzmainfo/Makefile.in b/src/lzmainfo/Makefile.in +index 6a2127a..f1f3441 100644 +--- a/src/lzmainfo/Makefile.in ++++ b/src/lzmainfo/Makefile.in +@@ -185,7 +185,6 @@ top_srcdir = @top_srcdir@ + lzmainfo_SOURCES = lzmainfo.c + lzmainfo_LDADD = @top_builddir@/src/liblzmadec/liblzmadec.la + AM_CPPFLAGS = -I@top_srcdir@/src/liblzmadec +-AM_LDFLAGS = -static + dist_man_MANS = lzmainfo.1 + all: all-am + +-- +2.1.3 + diff --git a/package/lzma/lzma.hash b/package/lzma/lzma.hash new file mode 100644 index 0000000000..e73517ca57 --- /dev/null +++ b/package/lzma/lzma.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 02aa57f995d15b7acb7c2496d88a39fb0124ea00bf027cc61dd24eddb5942dff lzma-4.32.7.tar.xz diff --git a/package/lzma/lzma.mk b/package/lzma/lzma.mk new file mode 100644 index 0000000000..90f0771780 --- /dev/null +++ b/package/lzma/lzma.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# lzma +# +################################################################################ + +LZMA_VERSION = 4.32.7 +LZMA_SOURCE = lzma-$(LZMA_VERSION).tar.xz +LZMA_SITE = http://tukaani.org/lzma + +$(eval $(host-autotools-package)) + +LZMA = $(HOST_DIR)/usr/bin/lzma diff --git a/package/lzo/Config.in b/package/lzo/Config.in new file mode 100644 index 0000000000..1b6f80bd86 --- /dev/null +++ b/package/lzo/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_LZO + bool "lzo" + help + Portable lossless data compression library written in ANSI C. + + http://www.oberhumer.com/opensource/lzo/ diff --git a/package/lzo/lzo.hash b/package/lzo/lzo.hash new file mode 100644 index 0000000000..415ed99dad --- /dev/null +++ b/package/lzo/lzo.hash @@ -0,0 +1,2 @@ +# From http://www.oberhumer.com/opensource/lzo/ +sha1 e2a60aca818836181e7e6f8c4f2c323aca6ac057 lzo-2.09.tar.gz diff --git a/package/lzo/lzo.mk b/package/lzo/lzo.mk new file mode 100644 index 0000000000..ec7c749f8d --- /dev/null +++ b/package/lzo/lzo.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# lzo +# +################################################################################ + +LZO_VERSION = 2.09 +LZO_SITE = http://www.oberhumer.com/opensource/lzo/download +LZO_LICENSE = GPLv2+ +LZO_LICENSE_FILES = COPYING +LZO_INSTALL_STAGING = YES +# Ships a beta libtool version hence our patch doesn't apply. +# Run autoreconf to regenerate ltmain.sh. +LZO_AUTORECONF = YES + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/lzop/Config.in b/package/lzop/Config.in new file mode 100644 index 0000000000..c91182373b --- /dev/null +++ b/package/lzop/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_LZOP + bool "lzop" + select BR2_PACKAGE_LZO + help + lzop is a file compressor which is very similar to gzip. + lzop uses the LZO data compression library for compression services. + + http://www.lzop.org/ diff --git a/package/lzop/lzop.hash b/package/lzop/lzop.hash new file mode 100644 index 0000000000..a484e7f262 --- /dev/null +++ b/package/lzop/lzop.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c1425b8c77d49f5a679d5a126c90ea6ad99585a55e335a613cae59e909dbb2c9 lzop-1.03.tar.gz diff --git a/package/lzop/lzop.mk b/package/lzop/lzop.mk new file mode 100644 index 0000000000..1b6a7e177c --- /dev/null +++ b/package/lzop/lzop.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# lzop +# +################################################################################ + +LZOP_VERSION = 1.03 +LZOP_SITE = http://www.lzop.org/download +LZOP_LICENSE = GPLv2+ +LZOP_LICENSE_FILES = COPYING +LZOP_DEPENDENCIES = lzo + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +LZOP = $(HOST_DIR)/usr/bin/lzop diff --git a/package/m4/m4.hash b/package/m4/m4.hash new file mode 100644 index 0000000000..38214dc967 --- /dev/null +++ b/package/m4/m4.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 f0543c3beb51fa6b3337d8025331591e0e18d8ec2886ed391f1aade43477d508 m4-1.4.17.tar.xz diff --git a/package/m4/m4.mk b/package/m4/m4.mk new file mode 100644 index 0000000000..9b5d2d1fa9 --- /dev/null +++ b/package/m4/m4.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# m4 +# +################################################################################ + +M4_VERSION = 1.4.17 +M4_SOURCE = m4-$(M4_VERSION).tar.xz +M4_SITE = $(BR2_GNU_MIRROR)/m4 +M4_LICENSE = GPLv3+ +M4_LICENSE_FILES = COPYING +HOST_M4_CONF_OPTS = --disable-static + +$(eval $(host-autotools-package)) diff --git a/package/macchanger/0001-Fix-missing-include-for-caddr_t.patch b/package/macchanger/0001-Fix-missing-include-for-caddr_t.patch new file mode 100644 index 0000000000..cf5ade8c2c --- /dev/null +++ b/package/macchanger/0001-Fix-missing-include-for-caddr_t.patch @@ -0,0 +1,35 @@ +From 4eeb901b7aadb167e44f476fd665f7fedf491e51 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Fri, 6 May 2016 09:28:36 +0200 +Subject: [PATCH] Fix missing include for caddr_t +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +caddr_t is defined in . This header file must be included to fix +build with the musl C library: + +netinfo.c: In function 'mc_net_info_get_permanent_mac': +netinfo.c:116:28: error: 'caddr_t' undeclared (first use in this function) + req.ifr_data = (caddr_t)epa; + +Signed-off-by: Jörg Krause +--- + src/netinfo.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/netinfo.c b/src/netinfo.c +index 3525123..1aa3293 100644 +--- a/src/netinfo.c ++++ b/src/netinfo.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + #include +-- +2.8.2 + diff --git a/package/macchanger/Config.in b/package/macchanger/Config.in new file mode 100644 index 0000000000..a9ebc8ee24 --- /dev/null +++ b/package/macchanger/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_MACCHANGER + bool "macchanger" + help + A GNU/Linux utility for viewing/manipulating the MAC address of + network interfaces + + http://www.gnu.org/software/macchanger diff --git a/package/macchanger/macchanger.hash b/package/macchanger/macchanger.hash new file mode 100644 index 0000000000..ce3a7f569d --- /dev/null +++ b/package/macchanger/macchanger.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 dae2717c270fd5f62d790dbf80c19793c651b1b26b62c101b82d5fdf25a845bf macchanger-1.7.0.tar.gz diff --git a/package/macchanger/macchanger.mk b/package/macchanger/macchanger.mk new file mode 100644 index 0000000000..2e716d982f --- /dev/null +++ b/package/macchanger/macchanger.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# macchanger +# +################################################################################ + +MACCHANGER_VERSION = 1.7.0 +MACCHANGER_SITE = https://github.com/alobbs/macchanger/releases/download/$(MACCHANGER_VERSION) +MACCHANGER_LICENSE = GPLv2+ +MACCHANGER_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/madplay/0001-switch-to-new-alsa-api.patch b/package/madplay/0001-switch-to-new-alsa-api.patch new file mode 100644 index 0000000000..60d7bd3799 --- /dev/null +++ b/package/madplay/0001-switch-to-new-alsa-api.patch @@ -0,0 +1,173 @@ +Switch madplay to the new API. This is done thanks to a patch written +by Micha Nelissen and available at +http://article.gmane.org/gmane.comp.audio.mad.devel/729. + +--- madplay-0.15.2b/audio_alsa.c 2008-10-18 15:10:16.000000000 +0200 ++++ madplay-0.15.2b/audio_alsa.c.new 2008-10-18 15:03:27.000000000 +0200 +@@ -28,31 +28,30 @@ + + #include + +-#define ALSA_PCM_OLD_HW_PARAMS_API +-#define ALSA_PCM_OLD_SW_PARAMS_API + #include + + #include + + #include "audio.h" + +-char *buf = NULL; +-int paused = 0; ++#define BUFFER_TIME_MAX 500000 + +-int rate = -1; +-int channels = -1; +-int bitdepth = -1; +-int sample_size = -1; +- +-int buffer_time = 500000; +-int period_time = 100000; +-char *defaultdev = "plughw:0,0"; ++unsigned char *buf = NULL; ++int paused = 0; ++ ++unsigned int rate = 0; ++unsigned int channels = -1; ++unsigned int bitdepth = -1; ++unsigned int sample_size = -1; ++ ++unsigned int buffer_time; ++unsigned int period_time; ++char *defaultdev = "plughw:0,0"; + + snd_pcm_hw_params_t *alsa_hwparams; + snd_pcm_sw_params_t *alsa_swparams; + +-snd_pcm_sframes_t buffer_size; +-snd_pcm_sframes_t period_size; ++snd_pcm_uframes_t buffer_size; + + snd_pcm_format_t alsa_format = -1; + snd_pcm_access_t alsa_access = SND_PCM_ACCESS_MMAP_INTERLEAVED; +@@ -66,14 +65,20 @@ + snd_pcm_hw_params_t *params, + snd_pcm_access_t access) + { +- int err, dir; +- ++ int err; ++ + /* choose all parameters */ + err = snd_pcm_hw_params_any(handle,params); + if (err < 0) { + printf("Access type not available for playback: %s\n", snd_strerror(err)); + return err; + } ++ /* set the access type */ ++ err = snd_pcm_hw_params_set_access(handle, params, alsa_access); ++ if (err < 0) { ++ printf("Sample format not available for playback: %s\n", snd_strerror(err)); ++ return err; ++ } + /* set the sample format */ + err = snd_pcm_hw_params_set_format(handle, params, alsa_format); + if (err < 0) { +@@ -87,29 +92,38 @@ + return err; + } + /* set the stream rate */ +- err = snd_pcm_hw_params_set_rate_near(handle, params, rate, 0); ++ err = snd_pcm_hw_params_set_rate(handle, params, rate, 0); + if (err < 0) { + printf("Rate %iHz not available for playback: %s\n", rate, snd_strerror(err)); + return err; + } +- if (err != rate) { +- printf("Rate doesn't match (requested %iHz, get %iHz)\n", rate, err); +- return -EINVAL; +- } ++ err = snd_pcm_hw_params_get_buffer_time_max(params, &buffer_time, NULL); ++ if (err < 0) { ++ printf("Unable to retrieve buffer time: %s\n", snd_strerror(err)); ++ return err; ++ } ++ if (buffer_time > BUFFER_TIME_MAX) ++ buffer_time = BUFFER_TIME_MAX; + /* set buffer time */ +- err = snd_pcm_hw_params_set_buffer_time_near(handle, params, buffer_time, &dir); ++ err = snd_pcm_hw_params_set_buffer_time_near(handle, params, &buffer_time, 0); + if (err < 0) { + printf("Unable to set buffer time %i for playback: %s\n", buffer_time, snd_strerror(err)); + return err; + } +- buffer_size = snd_pcm_hw_params_get_buffer_size(params); ++ if (period_time * 4 > buffer_time) ++ period_time = buffer_time / 4; + /* set period time */ +- err = snd_pcm_hw_params_set_period_time_near(handle, params, period_time, &dir); ++ err = snd_pcm_hw_params_set_period_time_near(handle, params, &period_time, NULL); + if (err < 0) { + printf("Unable to set period time %i for playback: %s\n", period_time, snd_strerror(err)); + return err; + } +- period_size = snd_pcm_hw_params_get_period_size(params, &dir); ++ /* retrieve buffer size */ ++ err = snd_pcm_hw_params_get_buffer_size(params, &buffer_size); ++ if (err < 0) { ++ printf("Unable to retrieve buffer size: %s\n", snd_strerror(err)); ++ return err; ++ } + /* write the parameters to device */ + err = snd_pcm_hw_params(handle, params); + if (err < 0) { +@@ -123,6 +137,7 @@ + int set_swparams(snd_pcm_t *handle, + snd_pcm_sw_params_t *params) + { ++ unsigned int start_threshold; + int err; + + /* get current swparams */ +@@ -136,13 +151,7 @@ + if (err < 0) { + printf("Unable to set start threshold mode for playback: %s\n", snd_strerror(err)); + return err; +- } +- /* allow transfer when at least period_size samples can be processed */ +- err = snd_pcm_sw_params_set_avail_min(handle, params, period_size); +- if (err < 0) { +- printf("Unable to set avail min for playback: %s\n", snd_strerror(err)); +- return err; +- } ++ } + /* align all transfers to 1 samples */ + err = snd_pcm_sw_params_set_xfer_align(handle, params, 1); + if (err < 0) { +@@ -190,7 +199,7 @@ + rate = config->speed; + + if ( bitdepth == 0 ) +- config->precision = bitdepth = 32; ++ config->precision = bitdepth = 16; + + switch (bitdepth) + { +@@ -241,7 +250,7 @@ + return -1; + } + +- buf = malloc(buffer_size); ++ buf = malloc(buffer_size * sample_size); + if (buf == NULL) { + audio_error="unable to allocate output buffer table"; + return -1; +@@ -279,7 +288,7 @@ + int play(struct audio_play *play) + { + int err, len; +- char *ptr; ++ unsigned char *ptr; + + ptr = buf; + len = play->nsamples; + diff --git a/package/madplay/Config.in b/package/madplay/Config.in new file mode 100644 index 0000000000..d83fac6d1f --- /dev/null +++ b/package/madplay/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_MADPLAY + bool "madplay" + select BR2_PACKAGE_LIBMAD + select BR2_PACKAGE_LIBID3TAG + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + Command-line front-end to libmad, a high-quality MPEG audio decoder. + It currently supports MPEG-1 and the MPEG-2 extension to lower + sampling frequencies, as well as the de facto MPEG 2.5 format. All + three audio layers — Layer I, Layer II, and Layer III (i.e. MP3) — + are fully implemented. + + http://www.underbit.com/products/mad/ + +if BR2_PACKAGE_MADPLAY + +config BR2_PACKAGE_MADPLAY_ALSA + bool + default y + depends on BR2_PACKAGE_ALSA_LIB + +endif diff --git a/package/madplay/madplay.hash b/package/madplay/madplay.hash new file mode 100644 index 0000000000..99487b5ecd --- /dev/null +++ b/package/madplay/madplay.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 5a79c7516ff7560dffc6a14399a389432bc619c905b13d3b73da22fa65acede0 madplay-0.15.2b.tar.gz diff --git a/package/madplay/madplay.mk b/package/madplay/madplay.mk new file mode 100644 index 0000000000..2606ac8d66 --- /dev/null +++ b/package/madplay/madplay.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# madplay +# +################################################################################ + +MADPLAY_VERSION = 0.15.2b +MADPLAY_SITE = http://downloads.sourceforge.net/project/mad/madplay/$(MADPLAY_VERSION) +MADPLAY_LICENSE = GPLv2+ +MADPLAY_LICENSE_FILES = COPYING COPYRIGHT +MADPLAY_LIBTOOL_PATCH = NO +MADPLAY_DEPENDENCIES = libmad libid3tag $(if $(BR2_PACKAGE_GETTEXT),gettext) + +# Check if ALSA is built, then we should configure after alsa-lib so +# ./configure can find alsa-lib. +ifeq ($(BR2_PACKAGE_MADPLAY_ALSA),y) +MADPLAY_CONF_OPTS += --with-alsa +MADPLAY_DEPENDENCIES += host-pkgconf alsa-lib +MADPLAY_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs alsa`" +endif + +$(eval $(autotools-package)) diff --git a/package/make/Config.in b/package/make/Config.in new file mode 100644 index 0000000000..f576b7b5a3 --- /dev/null +++ b/package/make/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_MAKE + bool "make" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + A tool which controls the generation of executables and other + non-source files of a program from the program's source files. + + While Buildroot no longer supports building a toolchain for + the target, we keep a make package that is for example + useful to run the uClibc test suite on the target. + + http://www.gnu.org/software/make/ diff --git a/package/make/make.hash b/package/make/make.hash new file mode 100644 index 0000000000..db95c60191 --- /dev/null +++ b/package/make/make.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking signature +sha256 0bc7613389650ee6a24554b52572a272f7356164fd2c4132b0bcf13123e4fca5 make-4.1.tar.bz2 diff --git a/package/make/make.mk b/package/make/make.mk new file mode 100644 index 0000000000..20702dc237 --- /dev/null +++ b/package/make/make.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# make +# +################################################################################ + +MAKE_VERSION = 4.1 +MAKE_SOURCE = make-$(MAKE_VERSION).tar.bz2 +MAKE_SITE = $(BR2_GNU_MIRROR)/make +MAKE_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +MAKE_LICENSE = GPLv3+ +MAKE_LICENSE_FILES = COPYING + +MAKE_CONF_OPTS = --without-guile + +# Disable the 'load' operation for static builds since it needs dlopen +ifeq ($(BR2_STATIC_LIBS),y) +MAKE_CONF_OPTS += --disable-load +endif + +$(eval $(autotools-package)) diff --git a/package/makedevs/Config.in b/package/makedevs/Config.in new file mode 100644 index 0000000000..923150dd6d --- /dev/null +++ b/package/makedevs/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_MAKEDEVS + bool "makedevs" + help + The makedevs utility allows to create a set of device files + according to a configuration file. diff --git a/package/makedevs/README b/package/makedevs/README new file mode 100644 index 0000000000..70844bf802 --- /dev/null +++ b/package/makedevs/README @@ -0,0 +1,35 @@ +When building a target filesystem, it is desirable to not have to +become root and then run 'mknod' a thousand times. Using a device +table you can create device nodes and directories "on the fly". + +You can do all sorts of interesting things with a device table file. +For example, if you want to adjust the permissions on a particular +file you can just add an entry like: + + /sbin/foobar f 2755 0 0 - - - - - + +and (assuming the file /sbin/foobar exists) it will be made setuid +root (regardless of what its permissions are on the host filesystem. + +Furthermore, you can use a single table entry to create a many device +minors. For example, if I wanted to create /dev/hda and +/dev/hda[0-15] I could just use the following two table entries: + + /dev/hda b 640 0 0 3 0 0 0 - + /dev/hda b 640 0 0 3 1 1 1 15 + +Device table entries take the form of: + + + +where name is the file name, type can be one of: + + f: A regular file + d: Directory + c: Character special device file + b: Block special device file + p: Fifo (named pipe) + +uid is the user id for the target file, gid is the group id for the +target file. The rest of the entries (major, minor, etc) apply only +to device special files. diff --git a/package/makedevs/makedevs.c b/package/makedevs/makedevs.c new file mode 100644 index 0000000000..e5ef16413e --- /dev/null +++ b/package/makedevs/makedevs.c @@ -0,0 +1,593 @@ +/* vi: set sw=4 ts=4: */ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * 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 Library 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. + * + */ + +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef __APPLE__ +#include /* major() and minor() */ +#endif +#include + +const char *bb_applet_name; +uid_t recursive_uid; +gid_t recursive_gid; +unsigned int recursive_mode; +#define PASSWD_PATH "etc/passwd" /* MUST be relative */ +#define GROUP_PATH "etc/group" /* MUST be relative */ + +void bb_verror_msg(const char *s, va_list p) +{ + fflush(stdout); + fprintf(stderr, "%s: ", bb_applet_name); + vfprintf(stderr, s, p); +} + +void bb_error_msg(const char *s, ...) +{ + va_list p; + + va_start(p, s); + bb_verror_msg(s, p); + va_end(p); + putc('\n', stderr); +} + +void bb_error_msg_and_die(const char *s, ...) +{ + va_list p; + + va_start(p, s); + bb_verror_msg(s, p); + va_end(p); + putc('\n', stderr); + exit(1); +} + +void bb_vperror_msg(const char *s, va_list p) +{ + int err=errno; + if(s == 0) s = ""; + bb_verror_msg(s, p); + if (*s) s = ": "; + fprintf(stderr, "%s%s\n", s, strerror(err)); +} + +void bb_perror_msg(const char *s, ...) +{ + va_list p; + + va_start(p, s); + bb_vperror_msg(s, p); + va_end(p); +} + +void bb_perror_msg_and_die(const char *s, ...) +{ + va_list p; + + va_start(p, s); + bb_vperror_msg(s, p); + va_end(p); + exit(1); +} + +FILE *bb_xfopen(const char *path, const char *mode) +{ + FILE *fp; + if ((fp = fopen(path, mode)) == NULL) + bb_perror_msg_and_die("%s", path); + return fp; +} + +enum { + FILEUTILS_PRESERVE_STATUS = 1, + FILEUTILS_DEREFERENCE = 2, + FILEUTILS_RECUR = 4, + FILEUTILS_FORCE = 8, + FILEUTILS_INTERACTIVE = 16 +}; +int bb_make_directory (char *path, long mode, int flags) +{ + mode_t mask; + const char *fail_msg; + char *s = path; + char c; + struct stat st; + + mask = umask(0); + if (mode == -1) { + umask(mask); + mode = (S_IXUSR | S_IXGRP | S_IXOTH | + S_IWUSR | S_IWGRP | S_IWOTH | + S_IRUSR | S_IRGRP | S_IROTH) & ~mask; + } else { + umask(mask & ~0300); + } + + do { + c = 0; + + if (flags & FILEUTILS_RECUR) { /* Get the parent. */ + /* Bypass leading non-'/'s and then subsequent '/'s. */ + while (*s) { + if (*s == '/') { + do { + ++s; + } while (*s == '/'); + c = *s; /* Save the current char */ + *s = 0; /* and replace it with nul. */ + break; + } + ++s; + } + } + + if (mkdir(path, 0777) < 0) { + /* If we failed for any other reason than the directory + * already exists, output a diagnostic and return -1.*/ + if ((errno != EEXIST && errno != EISDIR) + || !(flags & FILEUTILS_RECUR) + || (stat(path, &st) < 0 || !S_ISDIR(st.st_mode))) { + fail_msg = "create"; + umask(mask); + break; + } + /* Since the directory exists, don't attempt to change + * permissions if it was the full target. Note that + * this is not an error conditon. */ + if (!c) { + umask(mask); + return 0; + } + } + + if (!c) { + /* Done. If necessary, updated perms on the newly + * created directory. Failure to update here _is_ + * an error.*/ + umask(mask); + if ((mode != -1) && (chmod(path, mode) < 0)){ + fail_msg = "set permissions of"; + break; + } + return 0; + } + + /* Remove any inserted nul from the path (recursive mode). */ + *s = c; + + } while (1); + + bb_perror_msg ("Cannot %s directory `%s'", fail_msg, path); + return -1; +} + +const char * const bb_msg_memory_exhausted = "memory exhausted"; + +void *xmalloc(size_t size) +{ + void *ptr = malloc(size); + if (ptr == NULL && size != 0) + bb_error_msg_and_die(bb_msg_memory_exhausted); + return ptr; +} + +void *xcalloc(size_t nmemb, size_t size) +{ + void *ptr = calloc(nmemb, size); + if (ptr == NULL && nmemb != 0 && size != 0) + bb_error_msg_and_die(bb_msg_memory_exhausted); + return ptr; +} + +void *xrealloc(void *ptr, size_t size) +{ + ptr = realloc(ptr, size); + if (ptr == NULL && size != 0) + bb_error_msg_and_die(bb_msg_memory_exhausted); + return ptr; +} + +char *private_get_line_from_file(FILE *file, int c) +{ +#define GROWBY (80) /* how large we will grow strings by */ + + int ch; + int idx = 0; + char *linebuf = NULL; + int linebufsz = 0; + + while ((ch = getc(file)) != EOF) { + /* grow the line buffer as necessary */ + if (idx > linebufsz - 2) { + linebuf = xrealloc(linebuf, linebufsz += GROWBY); + } + linebuf[idx++] = (char)ch; + if (!ch) return linebuf; + if (c<2 && ch == '\n') { + if (c) { + --idx; + } + break; + } + } + if (linebuf) { + if (ferror(file)) { + free(linebuf); + return NULL; + } + linebuf[idx] = 0; + } + return linebuf; +} + +char *bb_get_chomped_line_from_file(FILE *file) +{ + return private_get_line_from_file(file, 1); +} + +long my_getpwnam(const char *name) +{ + struct passwd *myuser; + FILE *stream; + + stream = bb_xfopen(PASSWD_PATH, "r"); + while(1) { + errno = 0; + myuser = fgetpwent(stream); + if (myuser == NULL) + bb_error_msg_and_die("unknown user name: %s", name); + if (errno) + bb_perror_msg_and_die("fgetpwent"); + if (!strcmp(name, myuser->pw_name)) + break; + } + fclose(stream); + + return myuser->pw_uid; +} + +long my_getgrnam(const char *name) +{ + struct group *mygroup; + FILE *stream; + + stream = bb_xfopen(GROUP_PATH, "r"); + while(1) { + errno = 0; + mygroup = fgetgrent(stream); + if (mygroup == NULL) + bb_error_msg_and_die("unknown group name: %s", name); + if (errno) + bb_perror_msg_and_die("fgetgrent"); + if (!strcmp(name, mygroup->gr_name)) + break; + } + fclose(stream); + + return mygroup->gr_gid; +} + +unsigned long get_ug_id(const char *s, long (*my_getxxnam)(const char *)) +{ + unsigned long r; + char *p; + + r = strtoul(s, &p, 10); + if (*p || (s == p)) { + r = my_getxxnam(s); + } + + return r; +} + +char * last_char_is(const char *s, int c) +{ + char *sret = (char *)s; + if (sret) { + sret = strrchr(sret, c); + if(sret != NULL && *(sret+1) != 0) + sret = NULL; + } + return sret; +} + +void bb_xasprintf(char **string_ptr, const char *format, ...) +{ + va_list p; + int r; + + va_start(p, format); + r = vasprintf(string_ptr, format, p); + va_end(p); + + if (r < 0) { + bb_perror_msg_and_die("bb_xasprintf"); + } +} + +char *concat_path_file(const char *path, const char *filename) +{ + char *outbuf; + char *lc; + + if (!path) + path = ""; + lc = last_char_is(path, '/'); + while (*filename == '/') + filename++; + bb_xasprintf(&outbuf, "%s%s%s", path, (lc==NULL ? "/" : ""), filename); + + return outbuf; +} + +void bb_show_usage(void) +{ + fprintf(stderr, "%s: [-d device_table] rootdir\n\n", bb_applet_name); + fprintf(stderr, "Creates a batch of special files as specified in a device table.\n"); + fprintf(stderr, "Device table entries take the form of:\n"); + fprintf(stderr, "name type mode user group major minor start increment count\n\n"); + fprintf(stderr, "Where name is the file name, type can be one of:\n"); + fprintf(stderr, " f A regular file\n"); + fprintf(stderr, " d Directory\n"); + fprintf(stderr, " r Directory recursively\n"); + fprintf(stderr, " c Character special device file\n"); + fprintf(stderr, " b Block special device file\n"); + fprintf(stderr, " p Fifo (named pipe)\n"); + fprintf(stderr, "uid is the user id for the target file, gid is the group id for the\n"); + fprintf(stderr, "target file. The rest of the entries (major, minor, etc) apply to\n"); + fprintf(stderr, "to device special files. A '-' may be used for blank entries.\n\n"); + fprintf(stderr, "For example:\n"); + fprintf(stderr, " \n"); + fprintf(stderr, "/dev d 755 0 0 - - - - -\n"); + fprintf(stderr, "/dev/console c 666 0 0 5 1 - - -\n"); + fprintf(stderr, "/dev/null c 666 0 0 1 3 0 0 -\n"); + fprintf(stderr, "/dev/zero c 666 0 0 1 5 0 0 -\n"); + fprintf(stderr, "/dev/hda b 640 0 0 3 0 0 0 -\n"); + fprintf(stderr, "/dev/hda b 640 0 0 3 1 1 1 15\n"); + fprintf(stderr, "/dev/rtp b 640 0 0 250 0 0 1 5\n"); + fprintf(stderr, "/dev/gps b 640 0 0 251 0 1 1 5\n"); + fprintf(stderr, "/dev/uio b 640 0 0 252 0 1 2 5\n"); + fprintf(stderr, "/dev/uio b 640 0 0 252 1 6 2 5\n\n"); + fprintf(stderr, "Will Produce:\n"); + fprintf(stderr, "/dev\n"); + fprintf(stderr, "/dev/console\n"); + fprintf(stderr, "/dev/null\n"); + fprintf(stderr, "/dev/zero\n"); + fprintf(stderr, "/dev/hda\n"); + fprintf(stderr, "/dev/hda[1-15] with minor numbers [1-15]\n"); + fprintf(stderr, "/dev/rtp[0-4] with minor numbers [0-4]\n"); + fprintf(stderr, "/dev/gps[1-5] with minor numbers [0-4]\n"); + fprintf(stderr, "/dev/uio[1-5] with minor numbers 0,2,4,6,8\n"); + fprintf(stderr, "/dev/uio[6-10] with minor numbers 1,3,5,7,9\n"); + exit(1); +} + +int bb_recursive(const char *fpath, const struct stat *sb, + int tflag, struct FTW *ftwbuf){ + + if (chown(fpath, recursive_uid, recursive_gid) == -1) { + bb_perror_msg("chown failed for %s", fpath); + return -1; + } + if (recursive_mode != -1) { + if (chmod(fpath, recursive_mode) < 0) { + bb_perror_msg("chmod failed for %s", fpath); + return -1; + } + } + + return 0; +} + +int main(int argc, char **argv) +{ + int opt; + FILE *table = stdin; + char *rootdir = NULL; + char *line = NULL; + int linenum = 0; + int ret = EXIT_SUCCESS; + + bb_applet_name = basename(argv[0]); + + while ((opt = getopt(argc, argv, "d:")) != -1) { + switch(opt) { + case 'd': + table = bb_xfopen((line=optarg), "r"); + break; + default: + bb_show_usage(); + } + } + + if (optind >= argc || (rootdir=argv[optind])==NULL) { + bb_error_msg_and_die("root directory not speficied"); + } + + if (chdir(rootdir) != 0) { + bb_perror_msg_and_die("Couldnt chdir to %s", rootdir); + } + + umask(0); + + printf("rootdir=%s\n", rootdir); + if (line) { + printf("table='%s'\n", line); + } else { + printf("table=\n"); + } + + while ((line = bb_get_chomped_line_from_file(table))) { + char type; + unsigned int mode = 0755; + unsigned int major = 0; + unsigned int minor = 0; + unsigned int count = 0; + unsigned int increment = 0; + unsigned int start = 0; + char name[4096]; + char user[41]; + char group[41]; + char *full_name; + uid_t uid; + gid_t gid; + + linenum++; + + if ((2 > sscanf(line, "%4095s %c %o %40s %40s %u %u %u %u %u", name, + &type, &mode, user, group, &major, + &minor, &start, &increment, &count)) || + ((major | minor | start | count | increment) > 0xfffff)) + { + if (*line=='\0' || *line=='#' || isspace(*line)) + continue; + bb_error_msg("line %d invalid: '%s'\n", linenum, line); + ret = EXIT_FAILURE; + continue; + } + if (name[0] == '#') { + continue; + } + if (*group) { + gid = get_ug_id(group, my_getgrnam); + } else { + gid = getgid(); + } + if (*user) { + uid = get_ug_id(user, my_getpwnam); + } else { + uid = getuid(); + } + full_name = concat_path_file(rootdir, name); + + if (type == 'd') { + bb_make_directory(full_name, mode | S_IFDIR, FILEUTILS_RECUR); + if (chown(full_name, uid, gid) == -1) { + bb_perror_msg("line %d: chown failed for %s", linenum, full_name); + ret = EXIT_FAILURE; + goto loop; + } + if ((mode != -1) && (chmod(full_name, mode) < 0)){ + bb_perror_msg("line %d: chmod failed for %s", linenum, full_name); + ret = EXIT_FAILURE; + goto loop; + } + } else if (type == 'f') { + struct stat st; + if ((stat(full_name, &st) < 0 || !S_ISREG(st.st_mode))) { + bb_perror_msg("line %d: regular file '%s' does not exist", linenum, full_name); + ret = EXIT_FAILURE; + goto loop; + } + if (chown(full_name, uid, gid) == -1) { + bb_perror_msg("line %d: chown failed for %s", linenum, full_name); + ret = EXIT_FAILURE; + goto loop; + } + if ((mode != -1) && (chmod(full_name, mode) < 0)){ + bb_perror_msg("line %d: chmod failed for %s", linenum, full_name); + ret = EXIT_FAILURE; + goto loop; + } + } else if (type == 'r') { + recursive_uid = uid; + recursive_gid = gid; + recursive_mode = mode; + if (nftw(full_name, bb_recursive, 20, FTW_MOUNT | FTW_PHYS) < 0) { + bb_perror_msg("line %d: recursive failed for %s", linenum, full_name); + ret = EXIT_FAILURE; + goto loop; + } + } else + { + dev_t rdev; + + if (type == 'p') { + mode |= S_IFIFO; + } + else if (type == 'c') { + mode |= S_IFCHR; + } + else if (type == 'b') { + mode |= S_IFBLK; + } else { + bb_error_msg("line %d: Unsupported file type %c", linenum, type); + ret = EXIT_FAILURE; + goto loop; + } + + if (count > 0) { + int i; + char *full_name_inc; + + full_name_inc = xmalloc(strlen(full_name) + 8); + for (i = 0; i < count; i++) { + sprintf(full_name_inc, "%s%d", full_name, start + i); + rdev = makedev(major, minor + i * increment); + if (mknod(full_name_inc, mode, rdev) == -1) { + bb_perror_msg("line %d: Couldnt create node %s", linenum, full_name_inc); + ret = EXIT_FAILURE; + } + else if (chown(full_name_inc, uid, gid) == -1) { + bb_perror_msg("line %d: chown failed for %s", linenum, full_name_inc); + ret = EXIT_FAILURE; + } + if ((mode != -1) && (chmod(full_name_inc, mode) < 0)){ + bb_perror_msg("line %d: chmod failed for %s", linenum, full_name_inc); + ret = EXIT_FAILURE; + } + } + free(full_name_inc); + } else { + rdev = makedev(major, minor); + if (mknod(full_name, mode, rdev) == -1) { + bb_perror_msg("line %d: Couldnt create node %s", linenum, full_name); + ret = EXIT_FAILURE; + } + else if (chown(full_name, uid, gid) == -1) { + bb_perror_msg("line %d: chown failed for %s", linenum, full_name); + ret = EXIT_FAILURE; + } + if ((mode != -1) && (chmod(full_name, mode) < 0)){ + bb_perror_msg("line %d: chmod failed for %s", linenum, full_name); + ret = EXIT_FAILURE; + } + } + } +loop: + free(line); + free(full_name); + } + fclose(table); + + return ret; +} diff --git a/package/makedevs/makedevs.mk b/package/makedevs/makedevs.mk new file mode 100644 index 0000000000..fa8e753cbd --- /dev/null +++ b/package/makedevs/makedevs.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# makedevs +# +################################################################################ + +# source included in buildroot +MAKEDEVS_SOURCE = +HOST_MAKEDEVS_SOURCE = + +MAKEDEVS_VERSION = buildroot-$(BR2_VERSION) +MAKEDEVS_LICENSE = GPLv2 + +define MAKEDEVS_BUILD_CMDS + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ + package/makedevs/makedevs.c -o $(@D)/makedevs +endef + +define MAKEDEVS_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/makedevs $(TARGET_DIR)/usr/sbin/makedevs +endef + +define HOST_MAKEDEVS_BUILD_CMDS + $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \ + package/makedevs/makedevs.c -o $(@D)/makedevs +endef + +define HOST_MAKEDEVS_INSTALL_CMDS + $(INSTALL) -D -m 755 $(@D)/makedevs $(HOST_DIR)/usr/bin/makedevs +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/mali-t76x/Config.in b/package/mali-t76x/Config.in new file mode 100644 index 0000000000..6c2ae4eb85 --- /dev/null +++ b/package/mali-t76x/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_MALI_T76X + bool "mali-t76x" + select BR2_PACKAGE_MESA3D_HEADERS + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_ARM_EABIHF + depends on BR2_arm + help + Install the binary user-space components for the ARM Mali Midgard + T76X GPU. This package requires a kernel with the ARM Mali Midgard + GPU Kernel Drivers enabled. + + Source: http://malideveloper.arm.com/resources/drivers/ + +if BR2_PACKAGE_MALI_T76X + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "mali-t76x" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "mali-t76x" + +endif + +comment "mali-t76x needs an (e)glibc toolchain with armhf enabled" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_ARM_EABIHF diff --git a/package/mali-t76x/egl.pc b/package/mali-t76x/egl.pc new file mode 100644 index 0000000000..614b700d64 --- /dev/null +++ b/package/mali-t76x/egl.pc @@ -0,0 +1,11 @@ +prefix=/usr/ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: egl +Description: ARM Mali implementation of EGL +Version: 1.5 +Requires: +Libs: -L${libdir} -lEGL -lGLESv2 +Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERS diff --git a/package/mali-t76x/glesv2.pc b/package/mali-t76x/glesv2.pc new file mode 100644 index 0000000000..5997eac63f --- /dev/null +++ b/package/mali-t76x/glesv2.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: glesv2 +Description: ARM Mali implementation of OpenGL ESv2 +Version: 2.0 +Requires: +Libs: -L${libdir} -lGLESv2 -lGLESv1_CM +Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERS diff --git a/package/mali-t76x/mali-t76x.hash b/package/mali-t76x/mali-t76x.hash new file mode 100644 index 0000000000..a754b98074 --- /dev/null +++ b/package/mali-t76x/mali-t76x.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 5a0b00438edc8066b374481d3332a43c07ec2bd3bc73265983a968970f754902 mali-t76x_r5p0-06rel0_linux_1+fbdev.tar.gz diff --git a/package/mali-t76x/mali-t76x.mk b/package/mali-t76x/mali-t76x.mk new file mode 100644 index 0000000000..387685c033 --- /dev/null +++ b/package/mali-t76x/mali-t76x.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# mali-t76x +# +################################################################################ + +MALI_T76X_VERSION = r5p0-06rel0 +MALI_T76X_SOURCE = mali-t76x_$(MALI_T76X_VERSION)_linux_1+fbdev.tar.gz +MALI_T76X_SITE = http://malideveloper.arm.com/downloads/drivers/binary/$(MALI_T76X_VERSION) +MALI_T76X_DEPENDENCIES = mesa3d-headers +MALI_T76X_INSTALL_STAGING = YES +MALI_T76X_PROVIDES = libegl libgles + +define MALI_T76X_INSTALL_STAGING_CMDS + $(INSTALL) -m 755 $(@D)/*.so $(STAGING_DIR)/usr/lib/ + + $(INSTALL) -D -m 0644 package/mali-t76x/egl.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + $(INSTALL) -D -m 0644 package/mali-t76x/glesv2.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef + +define MALI_T76X_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 $(@D)/*.so $(TARGET_DIR)/usr/lib/ +endef + +$(eval $(generic-package)) diff --git a/package/matchbox-common/Config.in b/package/matchbox-common/Config.in new file mode 100644 index 0000000000..5a038e17da --- /dev/null +++ b/package/matchbox-common/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_MATCHBOX_COMMON + bool "matchbox-common" + select BR2_PACKAGE_MATCHBOX_LIB + depends on BR2_PACKAGE_MATCHBOX_PANEL || BR2_PACKAGE_MATCHBOX_DESKTOP + help + Common desktop folders and matchbox-session script. + +config BR2_PACKAGE_MATCHBOX_COMMON_PDA + bool "PDA style app folder" + depends on BR2_PACKAGE_MATCHBOX_COMMON diff --git a/package/matchbox-common/matchbox-common.hash b/package/matchbox-common/matchbox-common.hash new file mode 100644 index 0000000000..619d8473c0 --- /dev/null +++ b/package/matchbox-common/matchbox-common.hash @@ -0,0 +1,2 @@ +# From http://downloads.yoctoproject.org/releases/matchbox/matchbox-common/0.9/matchbox-common-0.9.1.tar.bz2.md5 +md5 8e8ba0ee170a9ac78fdc583b00ccf76b matchbox-common-0.9.1.tar.bz2 diff --git a/package/matchbox-common/matchbox-common.mk b/package/matchbox-common/matchbox-common.mk new file mode 100644 index 0000000000..038dd5943d --- /dev/null +++ b/package/matchbox-common/matchbox-common.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# matchbox-common +# +################################################################################ + +MATCHBOX_COMMON_VERSION_MAJOR = 0.9 +MATCHBOX_COMMON_VERSION = $(MATCHBOX_COMMON_VERSION_MAJOR).1 +MATCHBOX_COMMON_SOURCE = matchbox-common-$(MATCHBOX_COMMON_VERSION).tar.bz2 +MATCHBOX_COMMON_SITE = http://downloads.yoctoproject.org/releases/matchbox/matchbox-common/$(MATCHBOX_COMMON_VERSION_MAJOR) +MATCHBOX_COMMON_LICENSE = GPLv2+ +MATCHBOX_COMMON_LICENSE_FILES = COPYING +MATCHBOX_COMMON_DEPENDENCIES = matchbox-lib + +ifeq ($(strip $(BR2_PACKAGE_MATCHBOX_COMMON_PDA)),y) +MATCHBOX_COMMON_CONF_OPTS += --enable-pda-folders +else +MATCHBOX_COMMON_CONF_OPTS += --disable-pda-folders +endif + +$(eval $(autotools-package)) diff --git a/package/matchbox-desktop/Config.in b/package/matchbox-desktop/Config.in new file mode 100644 index 0000000000..22c568bc1a --- /dev/null +++ b/package/matchbox-desktop/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_MATCHBOX_DESKTOP + bool "matchbox-desktop" + select BR2_PACKAGE_MATCHBOX_LIB + select BR2_PACKAGE_ZLIB + help + A PDA style application launcher or 'item browser'. diff --git a/package/matchbox-desktop/matchbox-desktop.hash b/package/matchbox-desktop/matchbox-desktop.hash new file mode 100644 index 0000000000..e48a4a955c --- /dev/null +++ b/package/matchbox-desktop/matchbox-desktop.hash @@ -0,0 +1,2 @@ +# From http://downloads.yoctoproject.org/releases/matchbox/matchbox-desktop/0.9/matchbox-desktop-0.9.1.tar.bz2.md5 +md5 3335a30b1a1aacfb39f23b505254765c matchbox-desktop-0.9.1.tar.bz2 diff --git a/package/matchbox-desktop/matchbox-desktop.mk b/package/matchbox-desktop/matchbox-desktop.mk new file mode 100644 index 0000000000..a703a18e55 --- /dev/null +++ b/package/matchbox-desktop/matchbox-desktop.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# matchbox-desktop +# +################################################################################ + +MATCHBOX_DESKTOP_VERSION_MAJOR = 0.9 +MATCHBOX_DESKTOP_VERSION = $(MATCHBOX_DESKTOP_VERSION_MAJOR).1 +MATCHBOX_DESKTOP_SOURCE = matchbox-desktop-$(MATCHBOX_DESKTOP_VERSION).tar.bz2 +MATCHBOX_DESKTOP_SITE = http://downloads.yoctoproject.org/releases/matchbox/matchbox-desktop/$(MATCHBOX_DESKTOP_VERSION_MAJOR) +MATCHBOX_DESKTOP_LICENSE = GPLv2+ +MATCHBOX_DESKTOP_LICENSE_FILES = COPYING +MATCHBOX_DESKTOP_DEPENDENCIES = matchbox-lib zlib +MATCHBOX_DESKTOP_CONF_OPTS = --enable-expat + +# The bundled configure script does not properly replace LIBADD_DL, so +# we force an autoreconf even if we don't have any patches touching +# configure.ac/Makefile.am. +MATCHBOX_DESKTOP_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_STARTUP_NOTIFICATION),y) +MATCHBOX_DESKTOP_CONF_OPTS += --enable-startup-notification +MATCHBOX_DESKTOP_DEPENDENCIES += startup-notification +else +MATCHBOX_DESKTOP_CONF_OPTS += --disable-startup-notification +endif + +$(eval $(autotools-package)) diff --git a/package/matchbox-fakekey/Config.in b/package/matchbox-fakekey/Config.in new file mode 100644 index 0000000000..1a1f1341ec --- /dev/null +++ b/package/matchbox-fakekey/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_MATCHBOX_FAKEKEY + bool "matchbox-fakekey" + select BR2_PACKAGE_MATCHBOX_LIB + select BR2_PACKAGE_XLIB_LIBXTST + help + Library for simulating key press events under X11. diff --git a/package/matchbox-fakekey/matchbox-fakekey.hash b/package/matchbox-fakekey/matchbox-fakekey.hash new file mode 100644 index 0000000000..3e8778a6e1 --- /dev/null +++ b/package/matchbox-fakekey/matchbox-fakekey.hash @@ -0,0 +1,2 @@ +# From http://downloads.yoctoproject.org/releases/matchbox/libfakekey/0.1/libfakekey-0.1.tar.bz2.md5 +md5 83dbde4d77e8baf0176fe4291d8a2303 libfakekey-0.1.tar.bz2 diff --git a/package/matchbox-fakekey/matchbox-fakekey.mk b/package/matchbox-fakekey/matchbox-fakekey.mk new file mode 100644 index 0000000000..ea8e6dcd61 --- /dev/null +++ b/package/matchbox-fakekey/matchbox-fakekey.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# matchbox-fakekey +# +################################################################################ + +MATCHBOX_FAKEKEY_VERSION = 0.1 +MATCHBOX_FAKEKEY_SOURCE = libfakekey-$(MATCHBOX_FAKEKEY_VERSION).tar.bz2 +MATCHBOX_FAKEKEY_SITE = http://downloads.yoctoproject.org/releases/matchbox/libfakekey/$(MATCHBOX_FAKEKEY_VERSION) +MATCHBOX_FAKEKEY_LICENSE = GPLv2+ +MATCHBOX_FAKEKEY_LICENSE_FILES = COPYING +MATCHBOX_FAKEKEY_INSTALL_STAGING = YES +MATCHBOX_FAKEKEY_DEPENDENCIES = matchbox-lib xlib_libXtst +MATCHBOX_FAKEKEY_CONF_OPTS = --enable-expat + +define MATCHBOX_FAKEKEY_POST_CONFIGURE_FIXES + $(SED) 's:-I[^$$].*/usr/include/freetype2:-I/usr/include/freetype2:' $(STAGING_DIR)/usr/lib/pkgconfig/libmb.pc + $(SED) 's:^SUBDIRS = fakekey src tests.*:SUBDIRS = fakekey src:g' $(MATCHBOX_FAKEKEY_DIR)/Makefile +endef + +MATCHBOX_FAKEKEY_POST_CONFIGURE_HOOKS += MATCHBOX_FAKEKEY_POST_CONFIGURE_FIXES + +$(eval $(autotools-package)) diff --git a/package/matchbox-keyboard/Config.in b/package/matchbox-keyboard/Config.in new file mode 100644 index 0000000000..8bd2a7972c --- /dev/null +++ b/package/matchbox-keyboard/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_MATCHBOX_KEYBOARD + bool "matchbox-keyboard" + select BR2_PACKAGE_XLIB_LIBXTST + select BR2_PACKAGE_XLIB_LIBXFT if !BR2_PACKAGE_CAIRO + select BR2_PACKAGE_MATCHBOX_FAKEKEY + select BR2_PACKAGE_MATCHBOX_LIB + help + Virtual Keyboard diff --git a/package/matchbox-keyboard/matchbox-keyboard.hash b/package/matchbox-keyboard/matchbox-keyboard.hash new file mode 100644 index 0000000000..76997b0da3 --- /dev/null +++ b/package/matchbox-keyboard/matchbox-keyboard.hash @@ -0,0 +1,2 @@ +# From http://downloads.yoctoproject.org/releases/matchbox/matchbox-keyboard/0.1/matchbox-keyboard-0.1.tar.bz2.md5 +md5 50940321d59fee23b38a4941100abf25 matchbox-keyboard-0.1.tar.bz2 diff --git a/package/matchbox-keyboard/matchbox-keyboard.mk b/package/matchbox-keyboard/matchbox-keyboard.mk new file mode 100644 index 0000000000..3ffaca66f9 --- /dev/null +++ b/package/matchbox-keyboard/matchbox-keyboard.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# matchbox-keyboard +# +################################################################################ + +MATCHBOX_KEYBOARD_VERSION = 0.1 +MATCHBOX_KEYBOARD_SOURCE = matchbox-keyboard-$(MATCHBOX_KEYBOARD_VERSION).tar.bz2 +MATCHBOX_KEYBOARD_SITE = http://downloads.yoctoproject.org/releases/matchbox/matchbox-keyboard/$(MATCHBOX_KEYBOARD_VERSION) +MATCHBOX_KEYBOARD_LICENSE = GPLv2+ +MATCHBOX_KEYBOARD_LICENSE_FILES = COPYING +MATCHBOX_KEYBOARD_DEPENDENCIES = host-pkgconf matchbox-lib matchbox-fakekey expat + +# Workaround bug in configure script +MATCHBOX_KEYBOARD_CONF_ENV = expat=yes + +define MATCHBOX_KEYBOARD_POST_INSTALL_FIXES + $(INSTALL) -D -m 0755 package/matchbox-keyboard/mb-applet-kbd-wrapper.sh \ + $(TARGET_DIR)/usr/bin/mb-applet-kbd-wrapper.sh +endef + +MATCHBOX_KEYBOARD_POST_INSTALL_TARGET_HOOKS += MATCHBOX_KEYBOARD_POST_INSTALL_FIXES + +ifeq ($(BR2_PACKAGE_CAIRO),y) +MATCHBOX_KEYBOARD_CONF_OPTS += --enable-cairo +MATCHBOX_KEYBOARD_DEPENDENCIES += cairo +else +MATCHBOX_KEYBOARD_CONF_OPTS += --disable-cairo +MATCHBOX_KEYBOARD_DEPENDENCIES += xlib_libXft +endif + +$(eval $(autotools-package)) diff --git a/package/matchbox-keyboard/mb-applet-kbd-wrapper.sh b/package/matchbox-keyboard/mb-applet-kbd-wrapper.sh new file mode 100644 index 0000000000..be202b5d65 --- /dev/null +++ b/package/matchbox-keyboard/mb-applet-kbd-wrapper.sh @@ -0,0 +1,8 @@ +#!/bin/sh +# + +killall matchbox-keyboard +if [ ! $? -eq 0 ] +then + matchbox-keyboard & +fi diff --git a/package/matchbox-lib/0001-index-is-legacy.patch b/package/matchbox-lib/0001-index-is-legacy.patch new file mode 100644 index 0000000000..b486fb18d4 --- /dev/null +++ b/package/matchbox-lib/0001-index-is-legacy.patch @@ -0,0 +1,35 @@ +index() is a legacy function, not implemented in some uClibc +configurations. + +Signed-off-by: Thomas Petazzoni +--- + libmb/mbexp.c | 2 +- + libmb/mbmenu.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: libmatchbox-1.9/libmb/mbexp.c +=================================================================== +--- libmatchbox-1.9.orig/libmb/mbexp.c ++++ libmatchbox-1.9/libmb/mbexp.c +@@ -492,7 +492,7 @@ + + /* get the family */ + +- if (index(spec, ',') != NULL || index(spec, '-') != NULL) ++ if (strchr(spec, ',') != NULL || strchr(spec, '-') != NULL) + has_comma_delim = True; + + while (!got_family) { +Index: libmatchbox-1.9/libmb/mbmenu.c +=================================================================== +--- libmatchbox-1.9.orig/libmb/mbmenu.c ++++ libmatchbox-1.9/libmb/mbmenu.c +@@ -433,7 +433,7 @@ + { + s = p; + found = NULL; +- while(index("/\0", *p) == NULL) p++; ++ while(strchr("/\0", *p) == NULL) p++; + if (*p != '\0') { *p = '\0'; p++; }; + + item = current->items; diff --git a/package/matchbox-lib/0002-libpng15.patch b/package/matchbox-lib/0002-libpng15.patch new file mode 100644 index 0000000000..3d68573b5f --- /dev/null +++ b/package/matchbox-lib/0002-libpng15.patch @@ -0,0 +1,26 @@ +Support for libpng 1.5+ shamelessly taken from Gentoo. + +Signed-off-by: Gustavo Zacarias + +--- a/libmb/mbpixbuf.c ++++ b/libmb/mbpixbuf.c +@@ -247,7 +247,7 @@ + return NULL; + } + +- if ( setjmp( png_ptr->jmpbuf ) ) { ++ if ( setjmp( png_jmpbuf(png_ptr) ) ) { + png_destroy_read_struct( &png_ptr, &info_ptr, NULL); + fclose(fd); + return NULL; +@@ -269,8 +269,8 @@ + ( color_type == PNG_COLOR_TYPE_GRAY_ALPHA )) + png_set_gray_to_rgb(png_ptr); + +- if ( info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA +- || info_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA ++ if ( color_type == PNG_COLOR_TYPE_RGB_ALPHA ++ || color_type == PNG_COLOR_TYPE_GRAY_ALPHA + ) + *has_alpha = 1; + else diff --git a/package/matchbox-lib/0003-include-setjmp-h.patch b/package/matchbox-lib/0003-include-setjmp-h.patch new file mode 100644 index 0000000000..72e1e45d8f --- /dev/null +++ b/package/matchbox-lib/0003-include-setjmp-h.patch @@ -0,0 +1,17 @@ +matchbox-lib: include setjmp.h + +Based on this upstream patch: + + http://git.yoctoproject.org/cgit/cgit.cgi/libmatchbox/commit/?id=9315bcce1f01e7d6c00161442d61d3c676794d9d + +Signed-off-by: Vicente Olivert Riera +--- libmatchbox-1.9/libmb/mbpixbuf.c.orig 2014-02-21 12:45:46.867035956 +0000 ++++ libmatchbox-1.9/libmb/mbpixbuf.c 2014-02-21 12:46:43.482949583 +0000 +@@ -22,6 +22,7 @@ + + #include + #include "mbpixbuf.h" ++#include + + #define BYTE_ORD_24_RGB 0 + #define BYTE_ORD_24_RBG 1 diff --git a/package/matchbox-lib/Config.in b/package/matchbox-lib/Config.in new file mode 100644 index 0000000000..e50a5436c1 --- /dev/null +++ b/package/matchbox-lib/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_MATCHBOX_LIB + bool "matchbox-lib" + help + Matchbox common functionality library. diff --git a/package/matchbox-lib/matchbox-lib.hash b/package/matchbox-lib/matchbox-lib.hash new file mode 100644 index 0000000000..6f3a6531ee --- /dev/null +++ b/package/matchbox-lib/matchbox-lib.hash @@ -0,0 +1,2 @@ +# From http://downloads.yoctoproject.org/releases/matchbox/libmatchbox/1.9/libmatchbox-1.9.tar.bz2.md5 +md5 9f73e7515cc4679171a5db180dc1343b libmatchbox-1.9.tar.bz2 diff --git a/package/matchbox-lib/matchbox-lib.mk b/package/matchbox-lib/matchbox-lib.mk new file mode 100644 index 0000000000..d43e2b8c3b --- /dev/null +++ b/package/matchbox-lib/matchbox-lib.mk @@ -0,0 +1,58 @@ +################################################################################ +# +# matchbox-lib +# +################################################################################ + +MATCHBOX_LIB_VERSION = 1.9 +MATCHBOX_LIB_SOURCE = libmatchbox-$(MATCHBOX_LIB_VERSION).tar.bz2 +MATCHBOX_LIB_SITE = http://downloads.yoctoproject.org/releases/matchbox/libmatchbox/$(MATCHBOX_LIB_VERSION) +MATCHBOX_LIB_LICENSE = LGPLv2.1+ +MATCHBOX_LIB_LICENSE_FILES = COPYING +MATCHBOX_LIB_INSTALL_STAGING = YES +MATCHBOX_LIB_DEPENDENCIES = host-pkgconf expat xlib_libXext +MATCHBOX_LIB_CONF_OPTS = --enable-expat --disable-doxygen-docs +MATCHBOX_LIB_CONF_ENV = LIBS="-lX11" + +define MATCHBOX_LIB_POST_INSTALL_FIXES + $(SED) 's:-I[^$$].*/usr/include/freetype2:-I/usr/include/freetype2:' \ + $(STAGING_DIR)/usr/lib/pkgconfig/libmb.pc +endef + +MATCHBOX_LIB_POST_INSTALL_STAGING_HOOKS += MATCHBOX_LIB_POST_INSTALL_FIXES + +ifeq ($(BR2_PACKAGE_X11R7_LIBXCOMPOSITE),y) +ifeq ($(BR2_PACKAGE_X11R7_LIBXPM),y) +MATCHBOX_LIB_DEPENDENCIES += xlib_libXpm +endif +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +MATCHBOX_LIB_CONF_OPTS += --enable-jpeg +MATCHBOX_LIB_DEPENDENCIES += jpeg +else +MATCHBOX_LIB_CONF_OPTS += --disable-jpeg +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +MATCHBOX_LIB_CONF_OPTS += --enable-png +MATCHBOX_LIB_DEPENDENCIES += libpng +else +MATCHBOX_LIB_CONF_OPTS += --disable-png +endif + +ifeq ($(BR2_PACKAGE_PANGO)$(BR2_PACKAGE_XLIB_LIBXFT)$(BR2_PACKAGE_XLIB_LIBXRENDER),yyy) +MATCHBOX_LIB_CONF_OPTS += --enable-pango +MATCHBOX_LIB_DEPENDENCIES += pango +else +MATCHBOX_LIB_CONF_OPTS += --disable-pango +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFT),y) +MATCHBOX_LIB_CONF_OPTS += --enable-xft +MATCHBOX_LIB_DEPENDENCIES += xlib_libXft +else +MATCHBOX_LIB_CONF_OPTS += --disable-xft +endif + +$(eval $(autotools-package)) diff --git a/package/matchbox-panel/0001-index-is-legacy.patch b/package/matchbox-panel/0001-index-is-legacy.patch new file mode 100644 index 0000000000..925c326e71 --- /dev/null +++ b/package/matchbox-panel/0001-index-is-legacy.patch @@ -0,0 +1,20 @@ +Replace the legacy index() with strchr() + +Signed-off-by: Thomas Petazzoni +--- + applets/mb-applet-menu-launcher.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: matchbox-panel-0.9.3/applets/mb-applet-menu-launcher.c +=================================================================== +--- matchbox-panel-0.9.3.orig/applets/mb-applet-menu-launcher.c ++++ matchbox-panel-0.9.3/applets/mb-applet-menu-launcher.c +@@ -280,7 +280,7 @@ + DBG("\tkey %s ", key); + if (*(++p) == '"') { p++; tc = sc; } /* skip "'s */ + val = p; +- while(index(tc,*p) == NULL) ++ while(strchr(tc,*p) == NULL) + { + if (*p == '\\' && *(p+1) == '"') p++; /* skip \" */ + p++; diff --git a/package/matchbox-panel/0002-mb-applet-wireless.patch b/package/matchbox-panel/0002-mb-applet-wireless.patch new file mode 100644 index 0000000000..93633b367e --- /dev/null +++ b/package/matchbox-panel/0002-mb-applet-wireless.patch @@ -0,0 +1,34 @@ +mb-applet-wireless: fix undefined reference to `log' and `lrint' + +mb-applet-wireless.o: In function `update_wireless': +.. matchbox-panel-0.9.3/applets/mb-applet-wireless.c:143: undefined reference to `log' +.. matchbox-panel-0.9.3/applets/mb-applet-wireless.c:143: undefined reference to `lrint' + +Signed-off-by: Jean-Paul Etienne +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +[arnout: add description and Signed-off-by] +--- +diff -rup matchbox-panel-0.9.3.orig/applets/Makefile.in matchbox-panel-0.9.3/applets/Makefile.in +--- matchbox-panel-0.9.3.orig/applets/Makefile.in 2015-01-23 00:16:47.594850985 +0100 ++++ matchbox-panel-0.9.3/applets/Makefile.in 2015-01-23 00:15:18.458694947 +0100 +@@ -198,7 +198,7 @@ WANT_SMALL_ICONS_FALSE = @WANT_SMALL_ICO + WANT_SMALL_ICONS_TRUE = @WANT_SMALL_ICONS_TRUE@ + WANT_WIFI_FALSE = @WANT_WIFI_FALSE@ + WANT_WIFI_TRUE = @WANT_WIFI_TRUE@ +-WIRELESS_LIBS = @WIRELESS_LIBS@ ++WIRELESS_LIBS = @WIRELESS_LIBS@ -lm + XGETTEXT = @XGETTEXT@ + ac_ct_CC = @ac_ct_CC@ + ac_ct_STRIP = @ac_ct_STRIP@ +diff -rup matchbox-panel-0.9.3.orig/applets/mb-applet-wireless.c matchbox-panel-0.9.3/applets/mb-applet-wireless.c +--- matchbox-panel-0.9.3.orig/applets/mb-applet-wireless.c 2015-01-23 00:16:31.531822865 +0100 ++++ matchbox-panel-0.9.3/applets/mb-applet-wireless.c 2015-01-23 00:03:43.067563827 +0100 +@@ -50,6 +50,8 @@ + + #endif + ++#include ++ + #ifdef MB_HAVE_PNG + #define IMG_EXT "png" + #else diff --git a/package/matchbox-panel/0003-mb-applet-battery.patch b/package/matchbox-panel/0003-mb-applet-battery.patch new file mode 100644 index 0000000000..585eb39166 --- /dev/null +++ b/package/matchbox-panel/0003-mb-applet-battery.patch @@ -0,0 +1,21 @@ +mb-applet-battery: don't declare line_parse as static + +Fix this build failure: + mb-applet-battery.c: In function 'read_apm': + mb-applet-battery.c:181:2: error: invalid storage class for function 'line_parse' + +Reported-by: Arnout Vandecappelle +Signed-off-by: "Yann E. MORIN" + +diff -durN matchbox-panel-0.9.3.orig/applets/mb-applet-battery.c matchbox-panel-0.9.3/applets/mb-applet-battery.c +--- matchbox-panel-0.9.3.orig/applets/mb-applet-battery.c 2006-02-07 23:27:24.000000000 +0100 ++++ matchbox-panel-0.9.3/applets/mb-applet-battery.c 2015-05-02 17:13:00.843578796 +0200 +@@ -177,7 +177,7 @@ + unsigned long present_rate; + }; + +- static int ++ int + line_parse(char *line, struct entry *e) + { + char *ptr; diff --git a/package/matchbox-panel/Config.in b/package/matchbox-panel/Config.in new file mode 100644 index 0000000000..47bd10ad7e --- /dev/null +++ b/package/matchbox-panel/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_MATCHBOX_PANEL + bool "matchbox-panel" + select BR2_PACKAGE_MATCHBOX_LIB + help + A flexible always present 'window bar' for holding + application launchers. diff --git a/package/matchbox-panel/matchbox-panel.hash b/package/matchbox-panel/matchbox-panel.hash new file mode 100644 index 0000000000..82802a9982 --- /dev/null +++ b/package/matchbox-panel/matchbox-panel.hash @@ -0,0 +1,2 @@ +# From http://downloads.yoctoproject.org/releases/matchbox/matchbox-panel/0.9/matchbox-panel-0.9.3.tar.bz2.md5 +md5 56d1807636f3919e22e51896ab7ccd2e matchbox-panel-0.9.3.tar.bz2 diff --git a/package/matchbox-panel/matchbox-panel.mk b/package/matchbox-panel/matchbox-panel.mk new file mode 100644 index 0000000000..aa2d417922 --- /dev/null +++ b/package/matchbox-panel/matchbox-panel.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# matchbox-panel +# +################################################################################ + +MATCHBOX_PANEL_VERSION_MAJOR = 0.9 +MATCHBOX_PANEL_VERSION = $(MATCHBOX_PANEL_VERSION_MAJOR).3 +MATCHBOX_PANEL_SOURCE = matchbox-panel-$(MATCHBOX_PANEL_VERSION).tar.bz2 +MATCHBOX_PANEL_SITE = http://downloads.yoctoproject.org/releases/matchbox/matchbox-panel/$(MATCHBOX_PANEL_VERSION_MAJOR) +MATCHBOX_PANEL_LICENSE = GPLv2+ +MATCHBOX_PANEL_LICENSE_FILES = COPYING +MATCHBOX_PANEL_DEPENDENCIES = matchbox-lib +MATCHBOX_PANEL_CONF_OPTS = --enable-expat --enable-dnotify + +ifeq ($(BR2_PACKAGE_MATCHBOX_STARTUP_MONITOR),y) +MATCHBOX_PANEL_CONF_OPTS += --enable-startup-notification +MATCHBOX_PANEL_DEPENDENCIES += matchbox-startup-monitor +else +MATCHBOX_PANEL_CONF_OPTS += --disable-startup-notification +endif + +# Using ACPI is only possible on x86 (32- or 64-bit) or AArch64 +ifeq ($(BR2_aarch64)$(BR2_i386)$(BR2_x86_64),y) +MATCHBOX_PANEL_CONF_OPTS += --enable-acpi-linux +else +MATCHBOX_PANEL_CONF_OPTS += --disable-acpi-linux +endif + +ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_LIB),y) +MATCHBOX_PANEL_DEPENDENCIES += wireless_tools +endif + +$(eval $(autotools-package)) diff --git a/package/matchbox-startup-monitor/0001-true-false.patch b/package/matchbox-startup-monitor/0001-true-false.patch new file mode 100644 index 0000000000..c92a0776b0 --- /dev/null +++ b/package/matchbox-startup-monitor/0001-true-false.patch @@ -0,0 +1,21 @@ +mbmonitor uses TRUE / FALSE without defining them + +Signed-off-by: Peter Korsgaard +--- + mbmonitor.c | 3 +++ + 1 file changed, 3 insertions(+) + +Index: mb-applet-startup-monitor-0.1/mbmonitor.c +=================================================================== +--- mb-applet-startup-monitor-0.1.orig/mbmonitor.c ++++ mb-applet-startup-monitor-0.1/mbmonitor.c +@@ -43,6 +43,9 @@ + #define POLLTIME 10 + #define HOURGLASS_N_FRAMES 8 + ++#define FALSE 0 ++#define TRUE 1 ++ + typedef struct LaunchList LaunchList; + + struct LaunchList diff --git a/package/matchbox-startup-monitor/Config.in b/package/matchbox-startup-monitor/Config.in new file mode 100644 index 0000000000..9dce60ea12 --- /dev/null +++ b/package/matchbox-startup-monitor/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_MATCHBOX_STARTUP_MONITOR + bool "matchbox-startup-monitor" + select BR2_PACKAGE_MATCHBOX_LIB + select BR2_PACKAGE_STARTUP_NOTIFICATION + help + Matchbox Panel Startup Monitor Applet. diff --git a/package/matchbox-startup-monitor/matchbox-startup-monitor.hash b/package/matchbox-startup-monitor/matchbox-startup-monitor.hash new file mode 100644 index 0000000000..b08e228912 --- /dev/null +++ b/package/matchbox-startup-monitor/matchbox-startup-monitor.hash @@ -0,0 +1,2 @@ +# From http://downloads.yoctoproject.org/releases/matchbox/mb-applet-startup-monitor/0.1/mb-applet-startup-monitor-0.1.tar.bz2.md5 +md5 ea4b3c1ebee3f731b77a2d4bf8e9aa3c mb-applet-startup-monitor-0.1.tar.bz2 diff --git a/package/matchbox-startup-monitor/matchbox-startup-monitor.mk b/package/matchbox-startup-monitor/matchbox-startup-monitor.mk new file mode 100644 index 0000000000..be572396d8 --- /dev/null +++ b/package/matchbox-startup-monitor/matchbox-startup-monitor.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# matchbox-startup-monitor +# +################################################################################ + +MATCHBOX_STARTUP_MONITOR_VERSION = 0.1 +MATCHBOX_STARTUP_MONITOR_SOURCE = mb-applet-startup-monitor-$(MATCHBOX_STARTUP_MONITOR_VERSION).tar.bz2 +MATCHBOX_STARTUP_MONITOR_SITE = http://downloads.yoctoproject.org/releases/matchbox/mb-applet-startup-monitor/$(MATCHBOX_STARTUP_MONITOR_VERSION) +MATCHBOX_STARTUP_MONITOR_LICENSE = GPLv2+ +MATCHBOX_STARTUP_MONITOR_LICENSE_FILES = COPYING +MATCHBOX_STARTUP_MONITOR_DEPENDENCIES = matchbox-lib startup-notification + +$(eval $(autotools-package)) diff --git a/package/matchbox/0001-defaulttheme.patch b/package/matchbox/0001-defaulttheme.patch new file mode 100644 index 0000000000..b4da66409c --- /dev/null +++ b/package/matchbox/0001-defaulttheme.patch @@ -0,0 +1,47 @@ +[PATCH] fix mbtheme build issue when png support is disabled + +DEFAULTTHEME{,NAME} is not defined when png support is disabled, leading +to compile errors in mbtheme.c: + +mbtheme.c: In function 'show_parse_error': +mbtheme.c:2422:28: error: 'DEFAULTTHEME' undeclared (first use in this function) +mbtheme.c:2422:28: note: each undeclared identifier is reported only once for each function it appears in +mbtheme.c: In function 'mbtheme_init': +mbtheme.c:2448:30: error: 'DEFAULTTHEME' undeclared (first use in this function) +mbtheme.c:2470:25: error: 'DEFAULTTHEMENAME' undeclared (first use in this function) + +Fix it by unconditionally defining them as the values used are the same +in png / !png cases anyway. + +Signed-off-by: Peter Korsgaard +--- + src/structs.h | 9 --------- + 1 file changed, 9 deletions(-) + +Index: matchbox-window-manager-1.2/src/structs.h +=================================================================== +--- matchbox-window-manager-1.2.orig/src/structs.h ++++ matchbox-window-manager-1.2/src/structs.h +@@ -81,8 +81,6 @@ + + #define GENERIC_ICON PKGDATADIR "/mbnoapp.xpm" + +-#ifdef MB_HAVE_PNG +- + #define DEFAULT_THEME DATADIR "/themes/Default/matchbox/theme.xml" + + #define DEFAULTTHEME DATADIR "/themes/Default/matchbox/theme.xml" +@@ -91,13 +89,6 @@ + + #define DEFAULTTHEMENAME "Default" + +-#else +- +-#define DEFAULT_THEME DATADIR "/themes/Default/matchbox/theme.xml" +-#define DEFAULT_THEME_NAME "Default" +- +-#endif +- + #define CONFDEFAULTS PKGDATADIR "/defaults" + + /* Simple Macros */ diff --git a/package/matchbox/Config.in b/package/matchbox/Config.in new file mode 100644 index 0000000000..3a9f118f4a --- /dev/null +++ b/package/matchbox/Config.in @@ -0,0 +1,34 @@ +menuconfig BR2_PACKAGE_MATCHBOX + bool "matchbox" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_MATCHBOX_LIB + help + Matchbox is an Open Source base environment for the X Window + System running on non-desktop embedded platforms such as + handhelds, set-top boxes, kiosks and anything else for which + screen space, input mechanisms or system resources are limited. + + https://www.yoctoproject.org/tools-resources/projects/matchbox + +if BR2_PACKAGE_MATCHBOX + +config BR2_PACKAGE_MATCHBOX_SM + bool "session manager" + select BR2_PACKAGE_XLIB_LIBSM + help + Enable support for the Session Manager. + +comment "matchbox utilities" + +source "package/matchbox-common/Config.in" +source "package/matchbox-desktop/Config.in" +source "package/matchbox-fakekey/Config.in" +source "package/matchbox-keyboard/Config.in" +source "package/matchbox-lib/Config.in" +source "package/matchbox-panel/Config.in" +source "package/matchbox-startup-monitor/Config.in" + +endif diff --git a/package/matchbox/matchbox.hash b/package/matchbox/matchbox.hash new file mode 100644 index 0000000000..f00ed4e4f3 --- /dev/null +++ b/package/matchbox/matchbox.hash @@ -0,0 +1,2 @@ +# From http://downloads.yoctoproject.org/releases/matchbox/matchbox-window-manager/1.2/matchbox-window-manager-1.2.tar.bz2.md5 +md5 3e158dcf57823b55c926d95b245500fb matchbox-window-manager-1.2.tar.bz2 diff --git a/package/matchbox/matchbox.mk b/package/matchbox/matchbox.mk new file mode 100644 index 0000000000..9094b1ec63 --- /dev/null +++ b/package/matchbox/matchbox.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# matchbox +# +################################################################################ + +MATCHBOX_VERSION = 1.2 +MATCHBOX_SOURCE = matchbox-window-manager-$(MATCHBOX_VERSION).tar.bz2 +MATCHBOX_SITE = http://downloads.yoctoproject.org/releases/matchbox/matchbox-window-manager/$(MATCHBOX_VERSION) +MATCHBOX_LICENSE = GPLv2+ +MATCHBOX_LICENSE_FILES = COPYING + +MATCHBOX_DEPENDENCIES = matchbox-lib +MATCHBOX_CONF_OPTS = \ + --enable-expat \ + --disable-gconf \ + --disable-composite \ + --disable-standalone \ + --disable-standalone-xft + +# Workaround bug in configure script +MATCHBOX_CONF_ENV = expat=yes + +ifeq ($(BR2_PACKAGE_STARTUP_NOTIFICATION),y) +MATCHBOX_CONF_OPTS += --enable-startup-notification +MATCHBOX_DEPENDENCIES += startup-notification +else +MATCHBOX_CONF_OPTS += --disable-startup-notification +endif + +ifeq ($(BR2_PACKAGE_MATCHBOX_SM),y) +MATCHBOX_CONF_OPTS += --enable-session +MATCHBOX_DEPENDENCIES += xlib_libSM +else +MATCHBOX_CONF_OPTS += --disable-session +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +MATCHBOX_DEPENDENCIES += xlib_libXcursor +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y) +MATCHBOX_DEPENDENCIES += xlib_libXfixes +endif + +$(eval $(autotools-package)) diff --git a/package/mbedtls/Config.in b/package/mbedtls/Config.in new file mode 100644 index 0000000000..24f0f489d4 --- /dev/null +++ b/package/mbedtls/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_MBEDTLS + bool "mbedtls" + help + mbed TLS (formerly known as PolarSSL) makes it trivially easy + for developers to include cryptographic and SSL/TLS + capabilities in their (embedded) products, facilitating this + functionality with a minimal coding footprint. + + https://tls.mbed.org/ + +if BR2_PACKAGE_MBEDTLS + +config BR2_PACKAGE_MBEDTLS_PROGRAMS + bool "mbedtls programs" + depends on BR2_USE_MMU # fork() + help + This option enables the installation and the build of + mbed TLS companion programs. + +endif diff --git a/package/mbedtls/mbedtls.hash b/package/mbedtls/mbedtls.hash new file mode 100644 index 0000000000..eebbfe8561 --- /dev/null +++ b/package/mbedtls/mbedtls.hash @@ -0,0 +1,2 @@ +# From https://tls.mbed.org/tech-updates/releases/mbedtls-2.2.1-2.1.4-1.3.16-and-polarssl.1.2.19-released +sha256 6ddd5ca2e7dfb43d2fd750400856246fc1c98344dabf01b1594eb2f9880ef7ce mbedtls-2.2.1-apache.tgz diff --git a/package/mbedtls/mbedtls.mk b/package/mbedtls/mbedtls.mk new file mode 100644 index 0000000000..994a3f40a8 --- /dev/null +++ b/package/mbedtls/mbedtls.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# mbedtls +# +################################################################################ + +MBEDTLS_SITE = https://tls.mbed.org/code/releases +MBEDTLS_VERSION = 2.2.1 +MBEDTLS_SOURCE = mbedtls-$(MBEDTLS_VERSION)-apache.tgz +MBEDTLS_CONF_OPTS = \ + -DENABLE_PROGRAMS=$(if $(BR2_PACKAGE_MBEDTLS_PROGRAMS),ON,OFF) \ + -DENABLE_TESTING=OFF +MBEDTLS_INSTALL_STAGING = YES +MBEDTLS_LICENSE = Apache-2.0 +MBEDTLS_LICENSE_FILES = apache-2.0.txt + +# This is mandatory for hiawatha +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +define MBEDTLS_ENABLE_THREADING + $(SED) "s://#define MBEDTLS_THREADING_C:#define MBEDTLS_THREADING_C:" \ + $(@D)/include/mbedtls/config.h + $(SED) "s://#define MBEDTLS_THREADING_PTHREAD:#define MBEDTLS_THREADING_PTHREAD:" \ + $(@D)/include/mbedtls/config.h +endef +MBEDTLS_POST_PATCH_HOOKS += MBEDTLS_ENABLE_THREADING +ifeq ($(BR2_STATIC_LIBS),y) +MBEDTLS_CONF_OPTS += -DLINK_WITH_PTHREAD=ON +endif +endif + +ifeq ($(BR2_STATIC_LIBS),y) +MBEDTLS_CONF_OPTS += \ + -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +MBEDTLS_CONF_OPTS += \ + -DUSE_SHARED_MBEDTLS_LIBRARY=ON -DUSE_STATIC_MBEDTLS_LIBRARY=ON +else ifeq ($(BR2_SHARED_LIBS),y) +MBEDTLS_CONF_OPTS += \ + -DUSE_SHARED_MBEDTLS_LIBRARY=ON -DUSE_STATIC_MBEDTLS_LIBRARY=OFF +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +MBEDTLS_CONF_OPTS += -DENABLE_ZLIB_SUPPORT=ON +MBEDTLS_DEPENDENCIES += zlib +else +MBEDTLS_CONF_OPTS += -DENABLE_ZLIB_SUPPORT=OFF +endif + +define MBEDTLS_DISABLE_ASM + $(SED) '/^#define MBEDTLS_AESNI_C/d' \ + $(@D)/include/mbedtls/config.h + $(SED) '/^#define MBEDTLS_HAVE_ASM/d' \ + $(@D)/include/mbedtls/config.h + $(SED) '/^#define MBEDTLS_PADLOCK_C/d' \ + $(@D)/include/mbedtls/config.h +endef + +# ARM in thumb mode breaks debugging with asm optimizations +# Microblaze asm optimizations are broken in general +# MIPS R6 asm is not yet supported +ifeq ($(BR2_ENABLE_DEBUG)$(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_ARM_INSTRUCTIONS_THUMB2),yy) +MBEDTLS_POST_CONFIGURE_HOOKS += MBEDTLS_DISABLE_ASM +else ifeq ($(BR2_microblaze)$(BR2_mips_32r6)$(BR2_mips_64r6),y) +MBEDTLS_POST_CONFIGURE_HOOKS += MBEDTLS_DISABLE_ASM +endif + +$(eval $(cmake-package)) diff --git a/package/mc/Config.in b/package/mc/Config.in new file mode 100644 index 0000000000..7030b5f1a2 --- /dev/null +++ b/package/mc/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_MC + bool "mc" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2, slang + select BR2_PACKAGE_LIBGLIB2 + # mc prefers slang, but can use ncurses too + select BR2_PACKAGE_SLANG if !BR2_PACKAGE_NCURSES + help + GNU Midnight Commander is a visual file manager, licensed under + GNU General Public License. It can use either SLang (preferred) + or ncurses for screen handling; if neither is enabled SLang + will be automatically chosen. + + https://www.midnight-commander.org + +comment "mc needs a toolchain w/ threads, wchar" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + depends on BR2_USE_MMU diff --git a/package/mc/mc.hash b/package/mc/mc.hash new file mode 100644 index 0000000000..0d22d80cd8 --- /dev/null +++ b/package/mc/mc.hash @@ -0,0 +1,2 @@ +# Hash from http://ftp.midnight-commander.org/mc-4.8.17.sha256: +sha256 0447bdddc0baa81866e66f50f9a545d29d6eebb68b0ab46c98d8fddd2bf4e44d mc-4.8.17.tar.xz diff --git a/package/mc/mc.mk b/package/mc/mc.mk new file mode 100644 index 0000000000..808f81c351 --- /dev/null +++ b/package/mc/mc.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# mc +# +################################################################################ + +MC_VERSION = 4.8.17 +MC_SOURCE = mc-$(MC_VERSION).tar.xz +MC_SITE = http://ftp.midnight-commander.org +MC_LICENSE = GPLv3+ +MC_LICENSE_FILES = COPYING +MC_DEPENDENCIES = libglib2 host-pkgconf + +ifeq ($(BR2_PACKAGE_LIBSSH2),y) +MC_CONF_OPTS += --enable-vfs-sftp +MC_DEPENDENCIES += libssh2 +else +MC_CONF_OPTS += --disable-vfs-sftp +endif + +# mc prefers slang, so use that if enabled, otherwise +# fallback to using ncurses. +# Either or both will be enabled, but we prefer slang. +ifeq ($(BR2_PACKAGE_SLANG),y) +MC_DEPENDENCIES += slang +MC_CONF_OPTS += --with-screen=slang +else +MC_DEPENDENCIES += ncurses +MC_CONF_OPTS += --with-screen=ncurses +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +MC_CONF_OPTS += --with-x +MC_DEPENDENCIES += xlib_libX11 +else +MC_CONF_OPTS += --without-x +endif + +$(eval $(autotools-package)) diff --git a/package/mcelog/Config.in b/package/mcelog/Config.in new file mode 100644 index 0000000000..f3ccc71e8a --- /dev/null +++ b/package/mcelog/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_MCELOG + bool "mcelog" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_USE_MMU # fork() + help + mcelog processes machine checks (in particular memory and CPU hardware + errors) on modern x86 Linux systems. + + http://www.mcelog.org/ diff --git a/package/mcelog/mcelog.mk b/package/mcelog/mcelog.mk new file mode 100644 index 0000000000..1290e349ad --- /dev/null +++ b/package/mcelog/mcelog.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# mcelog +# +################################################################################ + +MCELOG_VERSION = v111 +MCELOG_SITE = $(BR2_KERNEL_MIRROR)/scm/utils/cpu/mce/mcelog.git +MCELOG_SITE_METHOD = git +MCELOG_LICENSE = GPLv2 +MCELOG_LICENSE_FILES = README + +define MCELOG_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all +endef + +define MCELOG_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/mcrypt/0001-CVE-2012-4409.patch b/package/mcrypt/0001-CVE-2012-4409.patch new file mode 100644 index 0000000000..97c658bb2d --- /dev/null +++ b/package/mcrypt/0001-CVE-2012-4409.patch @@ -0,0 +1,25 @@ +From 3efb40e17ce4f76717ae17a1ce1e1f747ddf59fd Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev +Date: Sat, 22 Dec 2012 22:37:06 +0200 +Subject: [PATCH] cleanup: buffer overflow + +--- + src/extra.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/src/extra.c b/src/extra.c +index 3082f82..c7a1ac0 100644 +--- a/src/extra.c ++++ b/src/extra.c +@@ -241,6 +241,8 @@ int check_file_head(FILE * fstream, char *algorithm, char *mode, + if (m_getbit(6, flags) == 1) { /* if the salt bit is set */ + if (m_getbit(0, sflag) != 0) { /* if the first bit is set */ + *salt_size = m_setbit(0, sflag, 0); ++ if (*salt_size > sizeof(tmp_buf)) ++ err_quit(_("Salt is too long\n")); + if (*salt_size > 0) { + fread(tmp_buf, 1, *salt_size, + fstream); +-- +1.7.8.6 + diff --git a/package/mcrypt/0002-CVE-2012-4426.patch b/package/mcrypt/0002-CVE-2012-4426.patch new file mode 100644 index 0000000000..708d4a579e --- /dev/null +++ b/package/mcrypt/0002-CVE-2012-4426.patch @@ -0,0 +1,35 @@ +Patch taken from gentoo. + +Signed-off-by: Gustavo Zacarias + +--- a/src/errors.c ++++ b/src/errors.c +@@ -25,24 +25,24 @@ + + void err_quit(char *errmsg) + { +- fprintf(stderr, errmsg); ++ fprintf(stderr, "%s", errmsg); + exit(-1); + } + + void err_warn(char *errmsg) + { + if (quiet <= 1) +- fprintf(stderr, errmsg); ++ fprintf(stderr, "%s", errmsg); + } + + void err_info(char *errmsg) + { + if (quiet == 0) +- fprintf(stderr, errmsg); ++ fprintf(stderr, "%s", errmsg); + } + + void err_crit(char *errmsg) + { + if (quiet <= 2) +- fprintf(stderr, errmsg); ++ fprintf(stderr, "%s", errmsg); + } diff --git a/package/mcrypt/0003-CVE-2012-4527.patch b/package/mcrypt/0003-CVE-2012-4527.patch new file mode 100644 index 0000000000..a8cf6f449a --- /dev/null +++ b/package/mcrypt/0003-CVE-2012-4527.patch @@ -0,0 +1,99 @@ +Fix for CVE-2012-4527. +Authored by Attila Bogar and Jean-Michel Vourgère + +Signed-off-by: Gustavo Zacarias + +diff -Nura mcrypt-2.6.8.orig/src/mcrypt.c mcrypt-2.6.8/src/mcrypt.c +--- mcrypt-2.6.8.orig/src/mcrypt.c 2013-01-14 19:15:49.465925072 -0300 ++++ mcrypt-2.6.8/src/mcrypt.c 2013-01-14 19:28:13.711478000 -0300 +@@ -44,7 +44,9 @@ + static char rcsid[] = + "$Id: mcrypt.c,v 1.2 2007/11/07 17:10:21 nmav Exp $"; + +-char tmperr[128]; ++/* Temporary error message can contain one file name and 1k of text */ ++#define ERRWIDTH ((PATH_MAX)+1024) ++char tmperr[ERRWIDTH]; + unsigned int stream_flag = FALSE; + char *keymode = NULL; + char *mode = NULL; +@@ -482,7 +484,7 @@ + #ifdef HAVE_STAT + if (stream_flag == FALSE) { + if (is_normal_file(file[i]) == FALSE) { +- sprintf(tmperr, ++ snprintf(tmperr, ERRWIDTH, + _ + ("%s: %s is not a regular file. Skipping...\n"), + program_name, file[i]); +@@ -501,7 +503,7 @@ + dinfile = file[i]; + if ((isatty(fileno((FILE *) (stdin))) == 1) + && (stream_flag == TRUE) && (force == 0)) { /* not a tty */ +- sprintf(tmperr, ++ snprintf(tmperr, ERRWIDTH, + _ + ("%s: Encrypted data will not be read from a terminal.\n"), + program_name); +@@ -520,7 +522,7 @@ + einfile = file[i]; + if ((isatty(fileno((FILE *) (stdout))) == 1) + && (stream_flag == TRUE) && (force == 0)) { /* not a tty */ +- sprintf(tmperr, ++ snprintf(tmperr, ERRWIDTH, + _ + ("%s: Encrypted data will not be written to a terminal.\n"), + program_name); +@@ -544,7 +546,7 @@ + strcpy(outfile, einfile); + /* if file has already the .nc ignore it */ + if (strstr(outfile, ".nc") != NULL) { +- sprintf(tmperr, ++ snprintf(tmperr, ERRWIDTH, + _ + ("%s: file %s has the .nc suffix... skipping...\n"), + program_name, outfile); +@@ -590,10 +592,10 @@ + + if (x == 0) { + if (stream_flag == FALSE) { +- sprintf(tmperr, _("File %s was decrypted.\n"), dinfile); ++ snprintf(tmperr, ERRWIDTH, _("File %s was decrypted.\n"), dinfile); + err_warn(tmperr); + } else { +- sprintf(tmperr, _("Stdin was decrypted.\n")); ++ snprintf(tmperr, ERRWIDTH, _("Stdin was decrypted.\n")); + err_warn(tmperr); + } + #ifdef HAVE_STAT +@@ -610,7 +612,7 @@ + + } else { + if (stream_flag == FALSE) { +- sprintf(tmperr, ++ snprintf(tmperr, ERRWIDTH, + _ + ("File %s was NOT decrypted successfully.\n"), + dinfile); +@@ -636,10 +638,10 @@ + + if (x == 0) { + if (stream_flag == FALSE) { +- sprintf(tmperr, _("File %s was encrypted.\n"), einfile); ++ snprintf(tmperr, ERRWIDTH, _("File %s was encrypted.\n"), einfile); + err_warn(tmperr); + } else { +- sprintf(tmperr, _("Stdin was encrypted.\n")); ++ snprintf(tmperr, ERRWIDTH, _("Stdin was encrypted.\n")); + err_warn(tmperr); + } + #ifdef HAVE_STAT +@@ -655,7 +657,7 @@ + + } else { + if (stream_flag == FALSE) { +- sprintf(tmperr, ++ snprintf(tmperr, ERRWIDTH, + _ + ("File %s was NOT encrypted successfully.\n"), + einfile); diff --git a/package/mcrypt/0004-no-rpath.patch b/package/mcrypt/0004-no-rpath.patch new file mode 100644 index 0000000000..a0813bcf00 --- /dev/null +++ b/package/mcrypt/0004-no-rpath.patch @@ -0,0 +1,17 @@ +Patch out rpath hardcoding since it completely ignores --disable-rpath +and other configure ways. + +Signed-off-by: Gustavo Zacarias + +diff -Nura mcrypt-2.6.8.orig/config.rpath mcrypt-2.6.8/config.rpath +--- mcrypt-2.6.8.orig/config.rpath 2013-01-07 13:05:22.626883480 -0300 ++++ mcrypt-2.6.8/config.rpath 2013-01-07 13:12:47.196090608 -0300 +@@ -153,7 +153,7 @@ + # here allows them to be overridden if necessary. + # Unlike libtool, we use -rpath here, not --rpath, since the documented + # option of GNU ld is called -rpath, not --rpath. +- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' ++ hardcode_libdir_flag_spec= + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken diff --git a/package/mcrypt/Config.in b/package/mcrypt/Config.in new file mode 100644 index 0000000000..58567cd751 --- /dev/null +++ b/package/mcrypt/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_MCRYPT + bool "mcrypt" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBMCRYPT + select BR2_PACKAGE_LIBMHASH + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + MCrypt is a replacement for the old crypt() package and crypt(1) + command, with extensions. + It allows developers to use a wide range of encryption functions, + without making drastic changes to their code. + + http://mcrypt.sourceforge.net/ diff --git a/package/mcrypt/mcrypt.hash b/package/mcrypt/mcrypt.hash new file mode 100644 index 0000000000..cf29eaa9f6 --- /dev/null +++ b/package/mcrypt/mcrypt.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 5145aa844e54cca89ddab6fb7dd9e5952811d8d787c4f4bf27eb261e6c182098 mcrypt-2.6.8.tar.gz diff --git a/package/mcrypt/mcrypt.mk b/package/mcrypt/mcrypt.mk new file mode 100644 index 0000000000..b413ffa37d --- /dev/null +++ b/package/mcrypt/mcrypt.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# mcrypt +# +################################################################################ + +MCRYPT_VERSION = 2.6.8 +MCRYPT_SITE = http://downloads.sourceforge.net/project/mcrypt/MCrypt/$(MCRYPT_VERSION) +MCRYPT_DEPENDENCIES = libmcrypt libmhash \ + $(if $(BR2_PACKAGE_ZLIB),zlib) \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +MCRYPT_CONF_OPTS = --with-libmcrypt-prefix=$(STAGING_DIR)/usr +MCRYPT_LICENSE = GPLv3 +MCRYPT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/mdadm/0010-add-install-targets-for-mdadm-and-mdmon.patch b/package/mdadm/0010-add-install-targets-for-mdadm-and-mdmon.patch new file mode 100644 index 0000000000..15df7557e7 --- /dev/null +++ b/package/mdadm/0010-add-install-targets-for-mdadm-and-mdmon.patch @@ -0,0 +1,32 @@ +From a1a9243671b1e23123f57e879890325154b8e00d Mon Sep 17 00:00:00 2001 +From: Christophe Vu-Brugier +Date: Wed, 6 Mar 2013 16:03:14 +0100 +Subject: [PATCH] Add install targets for mdadm and mdmon + + +Signed-off-by: Christophe Vu-Brugier +--- + Makefile | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 315455b..27d8eeb 100644 +--- a/Makefile ++++ b/Makefile +@@ -231,8 +231,12 @@ $(MON_OBJS) : $(INCL) mdmon.h + sha1.o : sha1.c sha1.h md5.h + $(CC) $(CFLAGS) -DHAVE_STDINT_H -o sha1.o -c sha1.c + +-install : mdadm mdmon install-man install-udev ++install : install-mdadm install-mdmon install-man install-udev ++ ++install-mdadm : + $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm ++ ++install-mdmon : + $(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon + + install-static : mdadm.static install-man +-- +1.7.10.4 + diff --git a/package/mdadm/Config.in b/package/mdadm/Config.in new file mode 100644 index 0000000000..e0d606b5ec --- /dev/null +++ b/package/mdadm/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_MDADM + bool "mdadm" + depends on BR2_USE_MMU # fork() + help + Utility for managing Linux Software RAID arrays. + + http://neil.brown.name/blog/mdadm diff --git a/package/mdadm/mdadm.hash b/package/mdadm/mdadm.hash new file mode 100644 index 0000000000..7f228d99dc --- /dev/null +++ b/package/mdadm/mdadm.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/raid/mdadm/sha256sums.asc +sha256 8ae5f45306b873190e91f410709b00e51997b633c072b33f8efd9f7df022ca68 mdadm-3.3.4.tar.xz diff --git a/package/mdadm/mdadm.mk b/package/mdadm/mdadm.mk new file mode 100644 index 0000000000..7558c18ad8 --- /dev/null +++ b/package/mdadm/mdadm.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# mdadm +# +################################################################################ + +MDADM_VERSION = 3.3.4 +MDADM_SOURCE = mdadm-$(MDADM_VERSION).tar.xz +MDADM_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/raid/mdadm +MDADM_LICENSE = GPLv2+ +MDADM_LICENSE_FILES = COPYING + +MDADM_MAKE_OPTS = \ + CFLAGS="$(TARGET_CFLAGS)" CC="$(TARGET_CC)" CHECK_RUN_DIR=0 -C $(MDADM_DIR) mdadm + +MDADM_INSTALL_TARGET_OPTS = \ + DESTDIR=$(TARGET_DIR)/usr -C $(MDADM_DIR) install-mdadm + +define MDADM_CONFIGURE_CMDS + # Do nothing +endef + +$(eval $(autotools-package)) diff --git a/package/mediastreamer/Config.in b/package/mediastreamer/Config.in new file mode 100644 index 0000000000..396f7e464c --- /dev/null +++ b/package/mediastreamer/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_MEDIASTREAMER + bool "mediastreamer" + select BR2_PACKAGE_ORTP + depends on BR2_INSTALL_LIBSTDCPP # until fixed + depends on BR2_TOOLCHAIN_HAS_THREADS # ortp + help + Mediastreamer is a powerful and lightweighted streaming + engine specialized for voice/video telephony applications. + + It is the library that is responsible for all the receiving + and sending of multimedia streams in linphone, including + voice/video capture, encoding and decoding, and rendering. + + http://www.linphone.org/eng/documentation/dev/mediastreamer2.html + +comment "mediastreamer needs a toolchain w/ threads, C++" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/mediastreamer/mediastreamer.hash b/package/mediastreamer/mediastreamer.hash new file mode 100644 index 0000000000..21964a864e --- /dev/null +++ b/package/mediastreamer/mediastreamer.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 0dbf8d4f721a04db9ec0982e98a4e852ad2d3acbcbd25edd96a66164a980f2e7 mediastreamer-2.12.1.tar.gz diff --git a/package/mediastreamer/mediastreamer.mk b/package/mediastreamer/mediastreamer.mk new file mode 100644 index 0000000000..a12bfb4b2d --- /dev/null +++ b/package/mediastreamer/mediastreamer.mk @@ -0,0 +1,109 @@ +################################################################################ +# +# mediastreamer +# +################################################################################ + +MEDIASTREAMER_VERSION = 2.12.1 +MEDIASTREAMER_SITE = http://download.savannah.nongnu.org/releases/linphone/mediastreamer +MEDIASTREAMER_INSTALL_STAGING = YES +MEDIASTREAMER_DEPENDENCIES = host-intltool host-pkgconf ortp host-gettext +# tests fail linking on some architectures, so disable them +MEDIASTREAMER_CONF_OPTS = --disable-tests --disable-glx --disable-strict +MEDIASTREAMER_LICENSE = GPLv2+ +MEDIASTREAMER_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_ALSA_LIB_MIXER)$(BR2_PACKAGE_ALSA_LIB_PCM),yy) +MEDIASTREAMER_CONF_OPTS += --enable-alsa +MEDIASTREAMER_DEPENDENCIES += alsa-lib +else +MEDIASTREAMER_CONF_OPTS += --disable-alsa +endif + +ifeq ($(BR2_PACKAGE_LIBUPNP),y) +MEDIASTREAMER_CONF_OPTS += --enable-upnp +MEDIASTREAMER_DEPENDENCIES += libupnp +else +MEDIASTREAMER_CONF_OPTS += --disable-upnp +endif + +ifeq ($(BR2_PACKAGE_LIBVPX),y) +MEDIASTREAMER_CONF_OPTS += --enable-vp8 +MEDIASTREAMER_DEPENDENCIES += libvpx +else +MEDIASTREAMER_CONF_OPTS += --disable-vp8 +endif + +ifeq ($(BR2_PACKAGE_OPUS),y) +MEDIASTREAMER_CONF_OPTS += --enable-opus +MEDIASTREAMER_DEPENDENCIES += opus +else +MEDIASTREAMER_CONF_OPTS += --disable-opus +endif + +# portaudio backend needs speex as well +ifeq ($(BR2_PACKAGE_PORTAUDIO)$(BR2_PACKAGE_SPEEX),yy) +MEDIASTREAMER_CONF_OPTS += --enable-portaudio +MEDIASTREAMER_DEPENDENCIES += portaudio speex +else +MEDIASTREAMER_CONF_OPTS += --disable-portaudio +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +MEDIASTREAMER_CONF_OPTS += --enable-pulseaudio +MEDIASTREAMER_DEPENDENCIES += pulseaudio +else +MEDIASTREAMER_CONF_OPTS += --disable-pulseaudio +endif + +ifeq ($(BR2_PACKAGE_SPEEX),y) +MEDIASTREAMER_CONF_OPTS += --enable-speex +MEDIASTREAMER_DEPENDENCIES += speex +else +MEDIASTREAMER_CONF_OPTS += --disable-speex +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y) +MEDIASTREAMER_CONF_OPTS += --enable-ffmpeg +MEDIASTREAMER_DEPENDENCIES += ffmpeg +else +MEDIASTREAMER_CONF_OPTS += --disable-ffmpeg +endif + +ifeq ($(BR2_PACKAGE_SDL),y) +MEDIASTREAMER_CONF_OPTS += --enable-sdl +MEDIASTREAMER_DEPENDENCIES += sdl +else +MEDIASTREAMER_CONF_OPTS += --disable-sdl +endif + +# mediastreamer assumes SDL has X11 support if --enable-x11 (and X11 support +# is only used for SDL output) +ifeq ($(BR2_PACKAGE_SDL_X11),y) +MEDIASTREAMER_CONF_OPTS += --enable-x11 +else +MEDIASTREAMER_CONF_OPTS += --disable-x11 +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXV),y) +MEDIASTREAMER_CONF_OPTS += --enable-xv +MEDIASTREAMER_DEPENDENCIES += xlib_libXv +else +MEDIASTREAMER_CONF_OPTS += --disable-xv +endif + +ifeq ($(BR2_PACKAGE_LIBTHEORA),y) +MEDIASTREAMER_CONF_OPTS += --enable-theora +MEDIASTREAMER_DEPENDENCIES += libtheora +else +MEDIASTREAMER_CONF_OPTS += --disable-theora +endif + +ifeq ($(BR2_PACKAGE_LIBV4L),y) +MEDIASTREAMER_CONF_OPTS += --enable-libv4l1 --enable-libv4l2 +MEDIASTREAMER_DEPENDENCIES += libv4l +else +MEDIASTREAMER_CONF_OPTS += --disable-libv4l1 --disable-libv4l2 +endif + +$(eval $(autotools-package)) diff --git a/package/memcached/0001-fix-build-with-musl-libc.patch b/package/memcached/0001-fix-build-with-musl-libc.patch new file mode 100644 index 0000000000..068382051c --- /dev/null +++ b/package/memcached/0001-fix-build-with-musl-libc.patch @@ -0,0 +1,78 @@ +From 2137a608c77c467200d73469f723ba97ff6b3511 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Mon, 18 Jan 2016 12:11:48 +0100 +Subject: [PATCH] fix build with musl libc + +musl libc will warn if you include sys/signal.h instead of signal.h as +specified by posix. Build will fail due to -Werror explicitly beeing +set. + +Fix it by use the posix location. + +fixes #138 + +Signed-off-by: Baruch Siach +--- +Patch status: pending (https://github.com/memcached/memcached/pull/139) + + assoc.c | 2 +- + items.c | 2 +- + slabs.c | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/assoc.c b/assoc.c +index e6cf09b64e8c..9fff38fe01d6 100644 +--- a/assoc.c ++++ b/assoc.c +@@ -14,8 +14,8 @@ + #include "memcached.h" + #include + #include +-#include + #include ++#include + #include + #include + #include +diff --git a/items.c b/items.c +index 199dc9fa6e6b..7040777ab0fb 100644 +--- a/items.c ++++ b/items.c +@@ -2,13 +2,13 @@ + #include "memcached.h" + #include + #include +-#include + #include + #include + #include + #include + #include + #include ++#include + #include + #include + #include +diff --git a/slabs.c b/slabs.c +index 31e85f6ec21d..bfafe5d0fdde 100644 +--- a/slabs.c ++++ b/slabs.c +@@ -10,7 +10,6 @@ + #include "memcached.h" + #include + #include +-#include + #include + #include + #include +@@ -18,6 +17,7 @@ + #include + #include + #include ++#include + #include + #include + +-- +2.8.0.rc3 + diff --git a/package/memcached/Config.in b/package/memcached/Config.in new file mode 100644 index 0000000000..e011d0890a --- /dev/null +++ b/package/memcached/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_MEMCACHED + bool "memcached" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBEVENT + help + Memcached is an in-memory key-value store for small chunks + of arbitrary data (strings, objects) from results of database calls, + API calls, or page rendering. + + http://www.memcached.org/ + +comment "memcached needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/memcached/memcached.hash b/package/memcached/memcached.hash new file mode 100644 index 0000000000..ed330cff1d --- /dev/null +++ b/package/memcached/memcached.hash @@ -0,0 +1,4 @@ +# From http://www.memcached.org/files/memcached-1.4.25.tar.gz.sha1 +sha1 7fd0ba9283c61204f196638ecf2e9295688b2314 memcached-1.4.25.tar.gz +# Calculated based on the hash above +sha256 f058437b3c224d321919a9a6bb4e3eedb2312ed718c0caf087ff2f04ab795dda memcached-1.4.25.tar.gz diff --git a/package/memcached/memcached.mk b/package/memcached/memcached.mk new file mode 100644 index 0000000000..b0753e4a32 --- /dev/null +++ b/package/memcached/memcached.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# memcached +# +################################################################################ + +MEMCACHED_VERSION = 1.4.25 +MEMCACHED_SITE = http://www.memcached.org/files +MEMCACHED_DEPENDENCIES = libevent +MEMCACHED_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' +MEMCACHED_CONF_OPTS = --disable-coverage +MEMCACHED_LICENSE = BSD-3c +MEMCACHED_LICENSE_FILES = COPYING + +ifeq ($(BR2_ENDIAN),"BIG") +MEMCACHED_CONF_ENV += ac_cv_c_endian=big +else +MEMCACHED_CONF_ENV += ac_cv_c_endian=little +endif + +$(eval $(autotools-package)) diff --git a/package/memstat/0001-PATH_MAX.patch b/package/memstat/0001-PATH_MAX.patch new file mode 100644 index 0000000000..0c3617a61b --- /dev/null +++ b/package/memstat/0001-PATH_MAX.patch @@ -0,0 +1,14 @@ +Add missing #include for PATH_MAX + +Signed-off-by: Maarten ter Huurne + +--- memstat-0.8.org/memstat.c 2009-06-08 14:38:05.000000000 +0200 ++++ memstat-0.8/memstat.c 2014-09-12 03:55:43.096035374 +0200 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + /* blacklist devices that just map physical memory */ + char *blacklist[] = { "/dev/mem", diff --git a/package/memstat/Config.in b/package/memstat/Config.in new file mode 100644 index 0000000000..b790612472 --- /dev/null +++ b/package/memstat/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_MEMSTAT + bool "memstat" + help + Memstat lists all the processes, executables, and shared + libraries that are using up virtual memory. It's helpful to + see how the shared memory is used and which 'old' libs are + loaded. + + http://sourceforge.net/projects/memstattool diff --git a/package/memstat/memstat.hash b/package/memstat/memstat.hash new file mode 100644 index 0000000000..f27e7d25f3 --- /dev/null +++ b/package/memstat/memstat.hash @@ -0,0 +1,2 @@ +# From http://sourceforge.net/projects/memstattool/files/ +sha1 26071dbc30a2796c0503c7d8060a548ca36f8df9 memstat_1.0.tar.gz diff --git a/package/memstat/memstat.mk b/package/memstat/memstat.mk new file mode 100644 index 0000000000..7ee4d6081d --- /dev/null +++ b/package/memstat/memstat.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# memstat +# +################################################################################ + +MEMSTAT_VERSION = 1.0 +MEMSTAT_SITE = http://downloads.sourceforge.net/project/memstattool +MEMSTAT_SOURCE = memstat_$(MEMSTAT_VERSION).tar.gz +MEMSTAT_LICENSE = GPL +MEMSTAT_LICENSE_FILES = debian/copyright + +define MEMSTAT_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" CFLAGS="$(TARGET_CFLAGS)" \ + -C $(@D) memstat +endef + +define MEMSTAT_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/memstat.conf -m 0644 \ + $(TARGET_DIR)/etc/memstat.conf + $(INSTALL) -D $(@D)/memstat $(TARGET_DIR)/usr/bin/memstat +endef + +$(eval $(generic-package)) diff --git a/package/memtest86/Config.in b/package/memtest86/Config.in new file mode 100644 index 0000000000..3a684b63c8 --- /dev/null +++ b/package/memtest86/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_MEMTEST86 + bool "memtest86" + depends on BR2_i386 || BR2_x86_64 + help + Memtest86+ is a bootable standalone memory test program. + + Buildroot does not support packages with a '+' sign in their + name, which explains why it is named memtest86 and not + memtest86+. + + Memtest86+ is a utility designed to test whether your memory + is in working order. It repeatedly writes an enormous amount + of different patterns to all memory locations and reads them + back again and verifies whether the result of the read is the + same as what was written to memory. + + Memtest86+ will only work on 32-bit or 64-bit x86 targets. + It boots as an i486 program and autodetects hardware. It can + be added to the grub2 boot menu by adding the following lines + to the bottom of /boot/grub/grub.cfg - note the use of linux16. + + menuentry "Memtest86+" { + linux16 /boot/memtest86+.bin + } + + Other boot loaders will have similar requirements. + + http://www.memtest.org diff --git a/package/memtest86/memtest86.hash b/package/memtest86/memtest86.hash new file mode 100644 index 0000000000..81ad98e72e --- /dev/null +++ b/package/memtest86/memtest86.hash @@ -0,0 +1,2 @@ +# locally computed using sha256sum +sha256 142127b7953fbd829b1057fb64a78d3340c2b771484230a7347e94530a0d9039 memtest86+-5.01.tar.gz diff --git a/package/memtest86/memtest86.mk b/package/memtest86/memtest86.mk new file mode 100644 index 0000000000..d2ec1a7992 --- /dev/null +++ b/package/memtest86/memtest86.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# memtest86 +# +################################################################################ + +MEMTEST86_VERSION = 5.01 +MEMTEST86_SOURCE = memtest86+-$(MEMTEST86_VERSION).tar.gz +MEMTEST86_SITE = http://www.memtest.org/download/$(MEMTEST86_VERSION) +MEMTEST86_LICENSE = GPLv2 +MEMTEST86_LICENSE_FILES = README + +# memtest86+ is sensitive to toolchain changes, use the shipped binary version +define MEMTEST86_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/precomp.bin $(TARGET_DIR)/boot/memtest86+.bin +endef + +$(eval $(generic-package)) diff --git a/package/memtester/0001-makefile-fix.patch b/package/memtester/0001-makefile-fix.patch new file mode 100644 index 0000000000..6f1481beca --- /dev/null +++ b/package/memtester/0001-makefile-fix.patch @@ -0,0 +1,23 @@ +The a/{b,c} construct doesn't work within make, so let's split the +creation of the installation directories in two commands. + +Signed-off-by: Thomas Petazzoni +--- + Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: memtester-4.2.1/Makefile +=================================================================== +--- memtester-4.2.1.orig/Makefile ++++ memtester-4.2.1/Makefile +@@ -25,8 +25,9 @@ + all: memtester + + install: all +- mkdir -m 755 -p $(INSTALLPATH)/{bin,man/man8} ++ mkdir -m 755 -p $(INSTALLPATH)/bin + install -m 755 memtester $(INSTALLPATH)/bin/ ++ mkdir -m 755 -p $(INSTALLPATH)/man/man8 + gzip -c memtester.8 >memtester.8.gz ; install -m 644 memtester.8.gz $(INSTALLPATH)/man/man8/ + + auto-ccld.sh: \ diff --git a/package/memtester/Config.in b/package/memtester/Config.in new file mode 100644 index 0000000000..7a504dc1b7 --- /dev/null +++ b/package/memtester/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_MEMTESTER + bool "memtester" + help + A userspace utility for testing the memory subsystem for faults. + + http://pyropus.ca/software/memtester/ diff --git a/package/memtester/memtester.hash b/package/memtester/memtester.hash new file mode 100644 index 0000000000..2d9ef3977f --- /dev/null +++ b/package/memtester/memtester.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 f9dfe2fd737c38fad6535bbab327da9a21f7ce4ea6f18c7b3339adef6bf5fd88 memtester-4.3.0.tar.gz diff --git a/package/memtester/memtester.mk b/package/memtester/memtester.mk new file mode 100644 index 0000000000..d12babca30 --- /dev/null +++ b/package/memtester/memtester.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# memtester +# +################################################################################ + +MEMTESTER_VERSION = 4.3.0 +MEMTESTER_SITE = http://pyropus.ca/software/memtester/old-versions +MEMTESTER_LICENSE = GPLv2 +MEMTESTER_LICENSE_FILES = COPYING + +MEMTESTER_TARGET_INSTALL_OPTS = INSTALLPATH=$(TARGET_DIR)/usr + +define MEMTESTER_BUILD_CMDS + $(SED) "s,^cc,$(TARGET_CC)," $(@D)/conf-* + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define MEMTESTER_INSTALL_TARGET_CMDS + $(MAKE) $(MEMTESTER_TARGET_INSTALL_OPTS) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/menu-cache/Config.in b/package/menu-cache/Config.in new file mode 100644 index 0000000000..b75c8ec054 --- /dev/null +++ b/package/menu-cache/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_MENU_CACHE + bool "menu-cache" + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBFM_EXTRA + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + help + Small library from LXDE project used for application menu + integration + + http://wiki.lxde.org/ + +comment "menu-cache needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/menu-cache/menu-cache.hash b/package/menu-cache/menu-cache.hash new file mode 100644 index 0000000000..3b9e5c42c2 --- /dev/null +++ b/package/menu-cache/menu-cache.hash @@ -0,0 +1,2 @@ +# From http://blog.lxde.org/?p=1299 +sha1 e7b3854109f9826472cf9795e924acebe5e27861 menu-cache-1.0.0.tar.xz diff --git a/package/menu-cache/menu-cache.mk b/package/menu-cache/menu-cache.mk new file mode 100644 index 0000000000..9d4386434d --- /dev/null +++ b/package/menu-cache/menu-cache.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# menu-cache +# +################################################################################ + +MENU_CACHE_VERSION_MAJOR = 1.0 +MENU_CACHE_VERSION = $(MENU_CACHE_VERSION_MAJOR).0 +MENU_CACHE_SOURCE = menu-cache-$(MENU_CACHE_VERSION).tar.xz +MENU_CACHE_SITE = http://sourceforge.net/projects/lxde/files/menu-cache/$(MENU_CACHE_VERSION_MAJOR) +MENU_CACHE_DEPENDENCIES = libfm-extra libglib2 +MENU_CACHE_LICENSE = LGPLv2.1 +MENU_CACHE_LICENSE_FILES = COPYING +MENU_CACHE_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/mesa3d-demos/0001-demos-optional-gl.patch b/package/mesa3d-demos/0001-demos-optional-gl.patch new file mode 100644 index 0000000000..6470e9d8d9 --- /dev/null +++ b/package/mesa3d-demos/0001-demos-optional-gl.patch @@ -0,0 +1,74 @@ +This patches makes opengl an optional component. + +Signed-off-by: Spenser Gilliland +--- +Index: mesa3d-demos-8.1.0/configure.ac +=================================================================== +--- mesa3d-demos-8.1.0.orig/configure.ac ++++ mesa3d-demos-8.1.0/configure.ac +@@ -51,6 +51,14 @@ + ACLOCAL="aclocal -I/other/macro/dir" before running autoreconf.])]) + PKG_PROG_PKG_CONFIG() + ++AC_ARG_ENABLE([gl], ++ [AS_HELP_STRING([--enable-gl], ++ [enable GL library @<:@default=no@:>@])], ++ [gl_enabled="$enableval"], ++ [gl_enabled=auto]) ++ ++if test "x$gl_enabled" != "xno"; then ++ + dnl Get the pkg-config definitions for libGL. We include a fallback + dnl path for GL implementation that don't provide a .pc file + PKG_CHECK_MODULES(GL, [gl], [], [ +@@ -113,6 +121,8 @@ + DEMO_CFLAGS="$DEMO_CFLAGS $GLU_CFLAGS" + DEMO_LIBS="$DEMO_LIBS $GLU_LIBS" + ++fi ++ + AC_ARG_ENABLE([egl], + [AS_HELP_STRING([--enable-egl], + [enable EGL library @<:@default=auto@:>@])], +@@ -303,7 +313,7 @@ + AC_SUBST([WAYLAND_CFLAGS]) + AC_SUBST([WAYLAND_LIBS]) + +- ++AM_CONDITIONAL(HAVE_GL, test "x$gl_enabled" = "xyes") + AM_CONDITIONAL(HAVE_EGL, test "x$egl_enabled" = "xyes") + AM_CONDITIONAL(HAVE_GLESV1, test "x$glesv1_enabled" = "xyes") + AM_CONDITIONAL(HAVE_GLESV2, test "x$glesv2_enabled" = "xyes") +Index: mesa3d-demos-8.1.0/src/egl/opengl/Makefile.am +=================================================================== +--- mesa3d-demos-8.1.0.orig/src/egl/opengl/Makefile.am ++++ mesa3d-demos-8.1.0/src/egl/opengl/Makefile.am +@@ -50,12 +50,14 @@ + endif + + if HAVE_EGL ++if HAVE_GL + noinst_PROGRAMS = \ + eglinfo \ + peglgears \ + $(EGL_DRM_DEMOS) \ + $(EGL_X11_DEMOS) + endif ++endif + + egltri_x11_SOURCES = egltri.c + eglgears_x11_SOURCES = eglgears.c +Index: mesa3d-demos-8.1.0/src/util/Makefile.am +=================================================================== +--- mesa3d-demos-8.1.0.orig/src/util/Makefile.am ++++ mesa3d-demos-8.1.0/src/util/Makefile.am +@@ -27,7 +27,9 @@ AM_CFLAGS = \ + AM_LDFLAGS = \ + $(DEMO_LIBS) + ++if HAVE_GL + noinst_LTLIBRARIES = libutil.la ++endif + + if HAVE_GLUT + AM_CFLAGS += \ diff --git a/package/mesa3d-demos/Config.in b/package/mesa3d-demos/Config.in new file mode 100644 index 0000000000..f22c0dee91 --- /dev/null +++ b/package/mesa3d-demos/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_MESA3D_DEMOS + bool "mesa3d-demos" + select BR2_PACKAGE_LIBGLEW if BR2_PACKAGE_XORG7 && BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_LIBGLU if BR2_PACKAGE_XORG7 && BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 && BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 && BR2_PACKAGE_HAS_LIBGL + depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES \ + || BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBOPENVG + help + OpenGL demos from the Mesa 3D project. + + http://mesa3d.org diff --git a/package/mesa3d-demos/mesa3d-demos.hash b/package/mesa3d-demos/mesa3d-demos.hash new file mode 100644 index 0000000000..a50a3a1e0c --- /dev/null +++ b/package/mesa3d-demos/mesa3d-demos.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/mesa-announce/2015-December/000191.html +sha256 c173154bbd0d5fb53d732471984def42fb1b14ac85fcb834138fb9518b3e0bef mesa-demos-8.3.0.tar.bz2 diff --git a/package/mesa3d-demos/mesa3d-demos.mk b/package/mesa3d-demos/mesa3d-demos.mk new file mode 100644 index 0000000000..cbc15c3b69 --- /dev/null +++ b/package/mesa3d-demos/mesa3d-demos.mk @@ -0,0 +1,80 @@ +################################################################################ +# +# mesa3d-demos +# +################################################################################ + +MESA3D_DEMOS_VERSION = 8.3.0 +MESA3D_DEMOS_SOURCE = mesa-demos-$(MESA3D_DEMOS_VERSION).tar.bz2 +MESA3D_DEMOS_SITE = ftp://ftp.freedesktop.org/pub/mesa/demos/$(MESA3D_DEMOS_VERSION) +MESA3D_DEMOS_AUTORECONF = YES +MESA3D_DEMOS_DEPENDENCIES = host-pkgconf +MESA3D_DEMOS_LICENSE = MIT + +MESA3D_DEMOS_CONF_OPTS += \ + --disable-osmesa \ + --disable-gles1 + +ifeq ($(BR2_PACKAGE_XORG7)$(BR2_PACKAGE_HAS_LIBGL),yy) +MESA3D_DEMOS_DEPENDENCIES += libgl libglew libglu xlib_libX11 xlib_libXext +MESA3D_DEMOS_CONF_OPTS += --enable-gl --enable-x11 +else +MESA3D_DEMOS_CONF_OPTS += --disable-gl --disable-x11 +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y) +MESA3D_DEMOS_DEPENDENCIES += libegl +MESA3D_DEMOS_CONF_OPTS += --enable-egl +else +MESA3D_DEMOS_CONF_OPTS += --disable-egl +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +MESA3D_DEMOS_DEPENDENCIES += libgles +MESA3D_DEMOS_CONF_OPTS += --enable-gles2 +else +MESA3D_DEMOS_CONF_OPTS += --disable-gles2 +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y) +MESA3D_DEMOS_DEPENDENCIES += libopenvg +MESA3D_DEMOS_CONF_OPTS += --enable-vg +else +MESA3D_DEMOS_CONF_OPTS += --disable-vg +endif + +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y) +MESA3D_DEMOS_DEPENDENCIES += mesa3d +MESA3D_DEMOS_CONF_OPTS += --enable-gbm +else +MESA3D_DEMOS_CONF_OPTS += --disable-gbm +endif + +ifeq ($(BR2_PACKAGE_FREETYPE),y) +MESA3D_DEMOS_DEPENDENCIES += freetype +MESA3D_DEMOS_CONF_OPTS += --enable-freetype2 +else +MESA3D_DEMOS_CONF_OPTS += --disable-freetype2 +endif + +ifeq ($(BR2_PACKAGE_LIBFREEGLUT),y) +MESA3D_DEMOS_DEPENDENCIES += libfreeglut +MESA3D_DEMOS_CONF_OPTS += --with-glut=$(STAGING_DIR)/usr +# osmesa support depends on glut +ifeq ($(BR2_PACKAGE_MESA3D_OSMESA),y) +MESA3D_DEMOS_CONF_OPTS += --enable-osmesa +else +MESA3D_DEMOS_CONF_OPTS += --disable-osmesa +endif +else +MESA3D_DEMOS_CONF_OPTS += --without-glut --disable-osmesa +endif + +ifeq ($(BR2_PACKAGE_WAYLAND),y) +MESA3D_DEMOS_DEPENDENCIES += wayland +MESA3D_DEMOS_CONF_OPTS += --enable-wayland +else +MESA3D_DEMOS_CONF_OPTS += --disable-wayland +endif + +$(eval $(autotools-package)) diff --git a/package/mesa3d-headers/Config.in b/package/mesa3d-headers/Config.in new file mode 100644 index 0000000000..c4efab673f --- /dev/null +++ b/package/mesa3d-headers/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_MESA3D_HEADERS + bool + help + Mesa 3D, an open-source implementation of the OpenGL + specification. + + This package only installs headers needed by other packages. + + http://mesa3d.org diff --git a/package/mesa3d-headers/mesa3d-headers.hash b/package/mesa3d-headers/mesa3d-headers.hash new file mode 120000 index 0000000000..137d0bea9c --- /dev/null +++ b/package/mesa3d-headers/mesa3d-headers.hash @@ -0,0 +1 @@ +../mesa3d/mesa3d.hash \ No newline at end of file diff --git a/package/mesa3d-headers/mesa3d-headers.mk b/package/mesa3d-headers/mesa3d-headers.mk new file mode 100644 index 0000000000..11e79cbd46 --- /dev/null +++ b/package/mesa3d-headers/mesa3d-headers.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# mesa3d-headers +# +################################################################################ + +# mesa3d-headers is inherently incompatible with mesa3d, so error out +# if both are enabled. +ifeq ($(BR2_PACKAGE_MESA3D)$(BR2_PACKAGE_MESA3D_HEADERS),yy) +$(error mesa3d-headers enabled, but mesa3d enabled too) +endif + +# Not possible to directly refer to mesa3d variables, because of +# first/second expansion trickery... +MESA3D_HEADERS_VERSION = 11.2.2 +MESA3D_HEADERS_SOURCE = mesa-$(MESA3D_HEADERS_VERSION).tar.xz +MESA3D_HEADERS_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_HEADERS_VERSION) +MESA3D_HEADERS_LICENSE = MIT, SGI, Khronos +MESA3D_HEADERS_LICENSE_FILES = docs/license.html + +# Only installs header files +MESA3D_HEADERS_INSTALL_STAGING = YES +MESA3D_HEADERS_INSTALL_TARGET = NO + +MESA3D_HEADERS_DIRS = KHR + +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) + +MESA3D_HEADERS_DIRS += GL + +ifeq ($(BR2_PACKAGE_XORG7),y) + +# Not using $(SED) because we do not want to work in-place, and $(SED) +# contains -i. +define MESA3D_HEADERS_BUILD_DRI_PC + sed -e 's:@\(exec_\)\?prefix@:/usr:' \ + -e 's:@libdir@:${exec_prefix}/lib:' \ + -e 's:@includedir@:${prefix}/include:' \ + -e 's:@DRI_DRIVER_INSTALL_DIR@:${libdir}/dri:' \ + -e 's:@VERSION@:$(MESA3D_HEADERS_VERSION):' \ + -e 's:@DRI_PC_REQ_PRIV@::' \ + $(@D)/src/mesa/drivers/dri/dri.pc.in \ + >$(@D)/src/mesa/drivers/dri/dri.pc +endef + +define MESA3D_HEADERS_INSTALL_DRI_PC + $(INSTALL) -D -m 0644 $(@D)/include/GL/internal/dri_interface.h \ + $(STAGING_DIR)/usr/include/GL/internal/dri_interface.h + $(INSTALL) -D -m 0644 $(@D)/src/mesa/drivers/dri/dri.pc \ + $(STAGING_DIR)/usr/lib/pkg-config/dri.pc +endef + +endif # Xorg + +endif # OpenGL + +ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y) +MESA3D_HEADERS_DIRS += EGL +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +MESA3D_HEADERS_DIRS += GLES GLES2 +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBOPENVG),y) +MESA3D_HEADERS_DIRS += VG +endif + +define MESA3D_HEADERS_BUILD_CMDS + $(MESA3D_HEADERS_BUILD_DRI_PC) +endef + +define MESA3D_HEADERS_INSTALL_STAGING_CMDS + $(foreach d,$(MESA3D_HEADERS_DIRS),\ + cp -dpfr $(@D)/include/$(d) $(STAGING_DIR)/usr/include/ || exit 1$(sep)) + $(MESA3D_HEADERS_INSTALL_DRI_PC) +endef + +$(eval $(generic-package)) diff --git a/package/mesa3d/0001-Fix-khrplatform.h-not-installed-if-EGL-is-disabled.patch b/package/mesa3d/0001-Fix-khrplatform.h-not-installed-if-EGL-is-disabled.patch new file mode 100644 index 0000000000..ab773f85a4 --- /dev/null +++ b/package/mesa3d/0001-Fix-khrplatform.h-not-installed-if-EGL-is-disabled.patch @@ -0,0 +1,39 @@ +From 83a1afd73f2d0aff9aa11c1754d6d407983afa7d Mon Sep 17 00:00:00 2001 +From: Eric Le Bihan +Date: Wed, 9 Apr 2014 12:48:36 +0200 +Subject: [PATCH] Fix khrplatform.h not installed if EGL is disabled. + +KHR/khrplatform.h is required by the EGL, GLES and VG headers, but is +only installed if Mesa3d is compiled with EGL support. + +This patch installs this header file unconditionally. + +Patch sent upstream: https://bugs.freedesktop.org/show_bug.cgi?id=77240 + +Signed-off-by: Eric Le Bihan +Signed-off-by: Bernd Kuhls (rebased for mesa3d 10.3) + +diff -uNr Mesa-10.3.0-rc2.org/src/egl/main/Makefile.am Mesa-10.3.0-rc2/src/egl/main/Makefile.am +--- Mesa-10.3.0-rc2.org/src/egl/Makefile.am 2014-08-29 00:00:57.000000000 +0200 ++++ Mesa-10.3.0-rc2/src/egl/Makefile.am 2014-09-02 21:35:52.548071820 +0200 +@@ -85,9 +85,6 @@ + + pkgconfig_DATA = egl.pc + +-khrdir = $(includedir)/KHR +-khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h +- + egldir = $(includedir)/EGL + egl_HEADERS = \ + $(top_srcdir)/include/EGL/eglext.h \ +diff -uNr Mesa-10.3.0-rc2.org/src/mapi/Makefile.am Mesa-10.3.0-rc2/src/mapi/Makefile.am +--- Mesa-10.3.0-rc2.org/src/mapi/Makefile.am 2014-09-01 01:22:12.000000000 +0200 ++++ Mesa-10.3.0-rc2/src/mapi/Makefile.am 2014-09-02 21:36:22.891686861 +0200 +@@ -211,4 +211,7 @@ + SUBDIRS += vgapi + endif + ++khrdir = $(includedir)/KHR ++khr_HEADERS = $(top_srcdir)/include/KHR/khrplatform.h ++ + include $(top_srcdir)/install-lib-links.mk diff --git a/package/mesa3d/0002-Fix-runtime-error-with-uClibc.patch b/package/mesa3d/0002-Fix-runtime-error-with-uClibc.patch new file mode 100644 index 0000000000..59627beff6 --- /dev/null +++ b/package/mesa3d/0002-Fix-runtime-error-with-uClibc.patch @@ -0,0 +1,48 @@ +Fix runtime error with uClibc + +Patch inspired by +https://www.winehq.org/pipermail/wine-bugs/2011-September/288987.html +http://git.alpinelinux.org/cgit/aports/tree/main/wine/uclibc-fmaxf-fminf.patch?id=c9b491b6099eec02a835ffd05539b5c783c6c43a + +Starting an app using mesa3d 10.5.x, Kodi for example, fails: + +/usr/lib/kodi/kodi.bin: symbol 'fminf': can't resolve symbol in lib '/usr/lib/dri/i965_dri.so'. +libGL error: unable to load driver: i965_dri.so +libGL error: driver pointer missing +libGL error: failed to load driver: i965 +libGL error: unable to load driver: swrast_dri.so +libGL error: failed to load driver: swrast + +This patch was rejected by upstream mesa3d: +http://lists.freedesktop.org/archives/mesa-dev/2015-March/079436.html + +The real fix was committed to uClibc: +http://git.uclibc.org/uClibc/commit/?id=6c4538905e65ceb203f59aaa9a61728e81c6bc0a + +Until the external toolchains do not contain this uClibc patch we keep this +patch: http://lists.busybox.net/pipermail/buildroot/2015-March/123410.html + +Signed-off-by: Bernd Kuhls +--- +diff -uNr mesa-10.5.3.org/src/glsl/nir/nir_constant_expressions.c mesa-10.5.3/src/glsl/nir/nir_constant_expressions.c +--- mesa-10.5.3.org/src/compiler/nir/nir_constant_expressions.c 2015-04-12 23:31:29.000000000 +0200 ++++ mesa-10.5.3/src/compiler/nir/nir_constant_expressions.c 2015-04-13 19:59:37.819786541 +0200 +@@ -48,6 +48,18 @@ + } + #endif + ++#ifdef __UCLIBC__ ++float fmaxf(float a, float b) ++{ ++ return (a > b) ? a : b; ++} ++ ++float fminf(float a, float b) ++{ ++ return (a < b) ? a : b; ++} ++#endif ++ + /** + * Evaluate one component of packSnorm4x8. + */ diff --git a/package/mesa3d/0003-musl.patch b/package/mesa3d/0003-musl.patch new file mode 100644 index 0000000000..8f7ba773aa --- /dev/null +++ b/package/mesa3d/0003-musl.patch @@ -0,0 +1,18 @@ +Fix musl build + +Downloaded from +http://git.alpinelinux.org/cgit/aports/plain/main/mesa/musl-fixes.patch + +Signed-off-by: Bernd Kuhls + +--- ./src/gallium/winsys/svga/drm/vmw_screen.h.orig ++++ ./src/gallium/winsys/svga/drm/vmw_screen.h +@@ -34,7 +34,7 @@ + #ifndef VMW_SCREEN_H_ + #define VMW_SCREEN_H_ + +- ++#include + #include "pipe/p_compiler.h" + #include "pipe/p_state.h" + diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in new file mode 100644 index 0000000000..45ca69c4fc --- /dev/null +++ b/package/mesa3d/Config.in @@ -0,0 +1,177 @@ +menuconfig BR2_PACKAGE_MESA3D + bool "mesa3d" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_SYNC_1 + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_XPROTO_DRI2PROTO if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XPROTO_GLPROTO if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XPROTO_XF86DRIPROTO if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXFIXES if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_LIBXCB if BR2_PACKAGE_XORG7 + help + Mesa 3D, an open-source implementation of the OpenGL specification. + + http://mesa3d.org + +if BR2_PACKAGE_MESA3D + +# inform the .mk file of gallium or dri driver selection +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_DRIVER + bool + +config BR2_PACKAGE_MESA3D_DRI_DRIVER + select BR2_PACKAGE_MESA3D_DRIVER + select BR2_PACKAGE_HAS_LIBGL if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XPROTO_DRI3PROTO + select BR2_PACKAGE_XPROTO_PRESENTPROTO if BR2_PACKAGE_XPROTO_DRI3PROTO + bool + +config BR2_PACKAGE_PROVIDES_LIBGL + default "mesa3d" if BR2_PACKAGE_MESA3D_DRI_DRIVER && \ + BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_MESA3D_DRIVER + bool + +config BR2_PACKAGE_MESA3D_NEEDS_XA + bool + +comment "Gallium drivers" + +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU + bool "Gallium nouveau driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_NOUVEAU + select BR2_PACKAGE_MESA3D_NEEDS_XA + help + Supports all Nvidia GPUs. + +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600 + bool "Gallium Radeon R600 driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_RADEON + select BR2_PACKAGE_MESA3D_NEEDS_XA + help + Driver for ATI/AMD Radeon R600/R700/HD5000/HD6000 GPUs. + +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA + bool "Gallium vmware svga driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_VMWGFX + select BR2_PACKAGE_MESA3D_NEEDS_XA + help + This is a virtual GPU driver for VMWare virtual machines. + +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST + bool "Gallium swrast driver" + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + help + This is a software opengl implementation using the Gallium3D + infrastructure. + +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4 + bool "Gallium vc4 driver" + depends on BR2_arm + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_LIBDRM_VC4 + select BR2_PACKAGE_MESA3D_NEEDS_XA + help + Driver for Broadcom VC4 (rpi2/3) GPUs. + It requires a vanilla 4.5+ kernel with drm vc4 (open) support. + +config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL + bool "Gallium virgl driver" + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER + select BR2_PACKAGE_MESA3D_OPENGL_EGL + help + virgl is the 3D acceleration backend for the virtio-gpu + shipping with qemu. + +comment "DRI drivers" + +config BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST + bool "DRI swrast driver" + select BR2_PACKAGE_MESA3D_DRI_DRIVER + help + This is a software opengl implementation using the DRI + infrastructure. + +config BR2_PACKAGE_MESA3D_DRI_DRIVER_I915 + bool "DRI i915 driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_DRI_DRIVER + select BR2_PACKAGE_LIBDRM_INTEL + help + Support for i915-based Intel GPUs. + +config BR2_PACKAGE_MESA3D_DRI_DRIVER_I965 + bool "DRI i965 driver" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_DRI_DRIVER + select BR2_PACKAGE_LIBDRM_INTEL + help + Support for i965-based Intel GPUs. + +config BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU + bool "DRI nouveau driver" + select BR2_PACKAGE_MESA3D_DRI_DRIVER + select BR2_PACKAGE_LIBDRM_NOUVEAU + help + Support for Nvidia-based GPUs. + +config BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON + bool "DRI radeon driver" + select BR2_PACKAGE_MESA3D_DRI_DRIVER + select BR2_PACKAGE_LIBDRM_RADEON + help + Legacy Radeon driver for R100 series GPUs. + +comment "Off-screen Rendering" + +config BR2_PACKAGE_MESA3D_OSMESA + bool "OSMesa library" + help + The OSMesa API provides functions for making off-screen renderings. + +if BR2_PACKAGE_MESA3D_DRIVER + +comment "Additional API Support" + +config BR2_PACKAGE_MESA3D_OPENGL_EGL + bool "OpenGL EGL" + select BR2_PACKAGE_HAS_LIBEGL + help + Use the Khronos EGL APIs. EGL is a window manager for OpenGL applications + similar to GLX, for X, and WGL, for Windows. + +config BR2_PACKAGE_MESA3D_OPENGL_ES + bool "OpenGL ES" + select BR2_PACKAGE_HAS_LIBGLES + help + Use the Khronos OpenGL ES APIs. This is commonly used on embedded + systems and represents a subset of the OpenGL API. + +endif # BR2_PACKAGE_MESA3D_DRIVER + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_EGL + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "mesa3d" if BR2_PACKAGE_MESA3D_OPENGL_ES + +endif # BR2_PACKAGE_MESA3D + +comment "mesa3d needs a toolchain w/ C++, NPTL, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_SYNC_1 diff --git a/package/mesa3d/mesa3d.hash b/package/mesa3d/mesa3d.hash new file mode 100644 index 0000000000..fa06593b2d --- /dev/null +++ b/package/mesa3d/mesa3d.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/mesa-announce/2016-April/000209.html +sha256 40e148812388ec7c6d7b6657d5a16e2e8dabba8b97ddfceea5197947647bdfb4 mesa-11.2.2.tar.xz diff --git a/package/mesa3d/mesa3d.mk b/package/mesa3d/mesa3d.mk new file mode 100644 index 0000000000..15ba42299d --- /dev/null +++ b/package/mesa3d/mesa3d.mk @@ -0,0 +1,179 @@ +################################################################################ +# +# mesa3d +# +################################################################################ + +# When updating the version, please also update mesa3d-headers +MESA3D_VERSION = 11.2.2 +MESA3D_SOURCE = mesa-$(MESA3D_VERSION).tar.xz +MESA3D_SITE = ftp://ftp.freedesktop.org/pub/mesa/$(MESA3D_VERSION) +MESA3D_LICENSE = MIT, SGI, Khronos +MESA3D_LICENSE_FILES = docs/license.html +MESA3D_AUTORECONF = YES + +MESA3D_INSTALL_STAGING = YES + +MESA3D_PROVIDES = + +MESA3D_DEPENDENCIES = \ + host-bison \ + host-flex \ + expat \ + libdrm + +# The Sourcery MIPS toolchain has a special (non-upstream) feature to +# have "compact exception handling", which unfortunately breaks with +# mesa3d, so we disable it here by passing -mno-compact-eh. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS),y) +MESA3D_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -mno-compact-eh" +MESA3D_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -mno-compact-eh" +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +MESA3D_DEPENDENCIES += openssl +MESA3D_CONF_OPTS += --with-sha1=libcrypto +else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +MESA3D_DEPENDENCIES += libgcrypt +MESA3D_CONF_OPTS += --with-sha1=libgcrypt +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBUDEV),y) +MESA3D_DEPENDENCIES += udev +MESA3D_CONF_OPTS += --disable-sysfs +else +MESA3D_CONF_OPTS += --enable-sysfs +endif + +ifeq ($(BR2_PACKAGE_XORG7),y) +MESA3D_DEPENDENCIES += \ + xproto_xf86driproto \ + xproto_dri2proto \ + xproto_glproto \ + xlib_libX11 \ + xlib_libXext \ + xlib_libXdamage \ + xlib_libXfixes \ + libxcb +MESA3D_CONF_OPTS += --enable-glx --disable-mangling +# quote from mesa3d configure "Building xa requires at least one non swrast gallium driver." +ifeq ($(BR2_PACKAGE_MESA3D_NEEDS_XA),y) +MESA3D_CONF_OPTS += --enable-xa +else +MESA3D_CONF_OPTS += --disable-xa +endif +else +MESA3D_CONF_OPTS += \ + --disable-glx \ + --disable-xa +endif + +# Drivers + +#Gallium Drivers +MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU) += nouveau +MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600) += r600 +MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA) += svga +MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST) += swrast +MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4) += vc4 +MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL) += virgl +# DRI Drivers +MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST) += swrast +MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I915) += i915 +MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_I965) += i965 +MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU) += nouveau +MESA3D_DRI_DRIVERS-$(BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON) += radeon + +ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER),) +MESA3D_CONF_OPTS += \ + --without-gallium-drivers +else +MESA3D_CONF_OPTS += \ + --enable-shared-glapi \ + --with-gallium-drivers=$(subst $(space),$(comma),$(MESA3D_GALLIUM_DRIVERS-y)) +endif + +define MESA3D_REMOVE_OPENGL_PC + rm -f $(STAGING_DIR)/usr/lib/pkgconfig/dri.pc + rm -f $(STAGING_DIR)/usr/lib/pkgconfig/gl.pc + rm -rf $(STAGING_DIR)/usr/include/GL/ +endef + +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) +MESA3D_CONF_OPTS += \ + --without-dri-drivers --disable-dri3 +MESA3D_POST_INSTALL_STAGING_HOOKS += MESA3D_REMOVE_OPENGL_PC +else +ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO),y) +MESA3D_DEPENDENCIES += xlib_libxshmfence xproto_dri3proto xproto_presentproto +MESA3D_CONF_OPTS += --enable-dri3 +else +MESA3D_CONF_OPTS += --disable-dri3 +endif +ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y) +MESA3D_DEPENDENCIES += xlib_libXxf86vm +endif +# libGL is only provided for a full xorg stack +ifeq ($(BR2_PACKAGE_XORG7),y) +MESA3D_PROVIDES += libgl +else +MESA3D_POST_INSTALL_STAGING_HOOKS += MESA3D_REMOVE_OPENGL_PC +endif +MESA3D_CONF_OPTS += \ + --enable-shared-glapi \ + --enable-driglx-direct \ + --with-dri-drivers=$(subst $(space),$(comma),$(MESA3D_DRI_DRIVERS-y)) +endif + +# APIs + +ifeq ($(BR2_PACKAGE_MESA3D_OSMESA),y) +MESA3D_CONF_OPTS += --enable-osmesa +else +MESA3D_CONF_OPTS += --disable-osmesa +endif + +# Always enable OpenGL: +# - it is needed for GLES (mesa3d's ./configure is a bit weird) +# - but if no DRI driver is enabled, then libgl is not built, +# remove dri.pc and gl.pc in this case (MESA3D_REMOVE_OPENGL_PC) +MESA3D_CONF_OPTS += --enable-opengl --enable-dri + +# libva and mesa3d have a circular dependency +# we do not need libva support in mesa3d, therefore disable this option +MESA3D_CONF_OPTS += --disable-va + +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y) +MESA3D_PROVIDES += libegl +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y) +MESA3D_EGL_PLATFORMS = drm +else ifeq ($(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL),y) +MESA3D_EGL_PLATFORMS = drm +endif +ifeq ($(BR2_PACKAGE_WAYLAND),y) +MESA3D_DEPENDENCIES += wayland +MESA3D_EGL_PLATFORMS += wayland +endif +ifeq ($(BR2_PACKAGE_XORG7),y) +MESA3D_EGL_PLATFORMS += x11 +endif +MESA3D_CONF_OPTS += \ + --enable-gbm \ + --enable-egl \ + --with-egl-platforms=$(subst $(space),$(comma),$(MESA3D_EGL_PLATFORMS)) +else +MESA3D_CONF_OPTS += \ + --disable-egl +endif + +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_ES),y) +MESA3D_PROVIDES += libgles +MESA3D_CONF_OPTS += --enable-gles1 --enable-gles2 +else +MESA3D_CONF_OPTS += --disable-gles1 --disable-gles2 +endif + +# Avoid automatic search of llvm-config +MESA3D_CONF_OPTS += --with-llvm-prefix=$(STAGING_DIR)/usr/bin + +$(eval $(autotools-package)) diff --git a/package/metacity/0001-add-libm-reference.patch b/package/metacity/0001-add-libm-reference.patch new file mode 100644 index 0000000000..628501726a --- /dev/null +++ b/package/metacity/0001-add-libm-reference.patch @@ -0,0 +1,51 @@ +Upstream fix to link metacity itself against libm + +The upstream fix is modified to also include the changes on the +configure script directly, so that autoreconfiguring is not +needed. Autoreconfiguring cannot be done easily on metacity, due to +missing AM_GCONF_SOURCE_2 and AM_NLS macros. + +http://git.gnome.org/browse/metacity/commit/configure.in?id=9cb0b6ff520ea69bdff6c328a21787202aee1bcc + +Signed-off-by: Thomas Petazzoni + +From 9cb0b6ff520ea69bdff6c328a21787202aee1bcc Mon Sep 17 00:00:00 2001 +From: Götz Waschk +Date: Wed, 22 Oct 2008 12:08:48 +0000 +Subject: add libm reference. Closes #557357. + +2008-10-22 Götz Waschk + + * configure.in: add libm reference. Closes #557357. + + +svn path=/trunk/; revision=3984 +--- +(limited to 'configure.in') + +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -413,7 +413,7 @@ + AC_DEFINE(HAVE_XSYNC, , [Have the Xsync extension library]) + fi + +-METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" ++METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm" + METACITY_MESSAGE_LIBS="$METACITY_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + METACITY_WINDOW_DEMO_LIBS="$METACITY_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + METACITY_PROPS_LIBS="$METACITY_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" +Index: b/configure +=================================================================== +--- a/configure ++++ b/configure +@@ -29509,7 +29509,7 @@ + + fi + +-METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" ++METACITY_LIBS="$METACITY_LIBS $XSYNC_LIBS $RANDR_LIBS $SHAPE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS -lm" + METACITY_MESSAGE_LIBS="$METACITY_MESSAGE_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + METACITY_WINDOW_DEMO_LIBS="$METACITY_WINDOW_DEMO_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" + METACITY_PROPS_LIBS="$METACITY_PROPS_LIBS $X_LIBS $X_PRE_LIBS -lX11 $X_EXTRA_LIBS" diff --git a/package/metacity/0002-gconf.patch b/package/metacity/0002-gconf.patch new file mode 100644 index 0000000000..939ef7ef98 --- /dev/null +++ b/package/metacity/0002-gconf.patch @@ -0,0 +1,30 @@ +[PATCH] fix build with --disable-gconf + +src/core/prefs.c still contain a call to gconf_client_set_bool() when +built with --disable-gconf, breaking the build. + +Signed-off-by: Peter Korsgaard +--- + src/core/prefs.c | 2 ++ + 1 file changed, 2 insertions(+) + +Index: metacity-2.25.1/src/core/prefs.c +=================================================================== +--- metacity-2.25.1.orig/src/core/prefs.c ++++ metacity-2.25.1/src/core/prefs.c +@@ -2949,6 +2949,7 @@ + void + meta_prefs_set_compositing_manager (gboolean whether) + { ++#if HAVE_GCONF + GError *err = NULL; + + gconf_client_set_bool (default_client, +@@ -2962,6 +2963,7 @@ + err->message); + g_error_free (err); + } ++#endif + } + + #ifndef HAVE_GCONF diff --git a/package/metacity/0003-mag-add-libm-reference.patch b/package/metacity/0003-mag-add-libm-reference.patch new file mode 100644 index 0000000000..d47d807558 --- /dev/null +++ b/package/metacity/0003-mag-add-libm-reference.patch @@ -0,0 +1,45 @@ +Upstream patch to fix link against libm + +The upstream patch is modified to also include the necessary +Makefile.in, which avoids the need for autoreconfiguring the +package. Autoreconfiguring the package unfortunately doesn't work, due +to AM_GCONF_SOURCE_2 and AM_NLS macros being missing. + +http://git.gnome.org/browse/metacity/commit/src/tools/Makefile.am?id=13d0d52eb885598885b6ff4b73c795c8f29c2a6b + +Signed-off-by: Thomas Petazzoni + +From 13d0d52eb885598885b6ff4b73c795c8f29c2a6b Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Sun, 02 May 2010 14:50:42 +0000 +Subject: fails to link with pedantic linkers + +--- +(limited to 'src/tools/Makefile.am') + +Index: b/src/tools/Makefile.am +=================================================================== +--- a/src/tools/Makefile.am ++++ b/src/tools/Makefile.am +@@ -26,7 +26,7 @@ + + metacity_message_LDADD= @METACITY_MESSAGE_LIBS@ + metacity_window_demo_LDADD= @METACITY_WINDOW_DEMO_LIBS@ +-metacity_mag_LDADD= @METACITY_WINDOW_DEMO_LIBS@ ++metacity_mag_LDADD= @METACITY_WINDOW_DEMO_LIBS@ -lm + metacity_grayscale_LDADD = @METACITY_WINDOW_DEMO_LIBS@ + + EXTRA_DIST=$(icon_DATA) +Index: b/src/tools/Makefile.in +=================================================================== +--- a/src/tools/Makefile.in ++++ b/src/tools/Makefile.in +@@ -281,7 +281,7 @@ + + metacity_message_LDADD = @METACITY_MESSAGE_LIBS@ + metacity_window_demo_LDADD = @METACITY_WINDOW_DEMO_LIBS@ +-metacity_mag_LDADD = @METACITY_WINDOW_DEMO_LIBS@ ++metacity_mag_LDADD = @METACITY_WINDOW_DEMO_LIBS@ -lm + metacity_grayscale_LDADD = @METACITY_WINDOW_DEMO_LIBS@ + EXTRA_DIST = $(icon_DATA) + all: all-am diff --git a/package/metacity/Config.in b/package/metacity/Config.in new file mode 100644 index 0000000000..833a091e7f --- /dev/null +++ b/package/metacity/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_METACITY + bool "metacity" + depends on BR2_PACKAGE_LIBGTK2 + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + # Metacity configure.ac pretends it can be built without + # Composite, but in reality, it doesn't build. + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXDAMAGE + # We do not directly depend on Xft, but they are needed to get + # Xft support in Pango, which we require. + select BR2_PACKAGE_XLIB_LIBXFT + help + Metacity is a window manager for the X Window System. diff --git a/package/metacity/Xsession b/package/metacity/Xsession new file mode 100755 index 0000000000..7225921a07 --- /dev/null +++ b/package/metacity/Xsession @@ -0,0 +1,6 @@ +#!/bin/sh +export GDK_USE_XFT=1 +export LANG="en_US.UTF-8" +export LC_ALL="en_US.UTF-8" +/usr/bin/X11/rxvt -bg black -fg gray90 & +exec /bin/metacity diff --git a/package/metacity/metacity.hash b/package/metacity/metacity.hash new file mode 100644 index 0000000000..49450160fe --- /dev/null +++ b/package/metacity/metacity.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/metacity/2.25/metacity-2.25.1.sha256sum +sha256 fb2ede4ac02d7da08d3c3323fb76afaf945c8cccc07cb2d3a4b7f44fb49f1c47 metacity-2.25.1.tar.bz2 diff --git a/package/metacity/metacity.mk b/package/metacity/metacity.mk new file mode 100644 index 0000000000..d889779140 --- /dev/null +++ b/package/metacity/metacity.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# metacity +# +################################################################################ + +# newer versions need libcanberra-gtk and gnome-doc-utils +METACITY_VERSION_MAJOR = 2.25 +METACITY_VERSION = $(METACITY_VERSION_MAJOR).1 +METACITY_SOURCE = metacity-$(METACITY_VERSION).tar.bz2 +METACITY_SITE = http://ftp.gnome.org/pub/gnome/sources/metacity/$(METACITY_VERSION_MAJOR) +METACITY_LICENSE = GPLv2+ +METACITY_LICENSE_FILES = COPYING + +METACITY_CONF_OPTS = \ + --x-includes=$(STAGING_DIR)/usr/include/X11 \ + --x-libraries=$(STAGING_DIR)/usr/lib \ + --disable-glibtest \ + --disable-gconf \ + --disable-sm \ + --disable-startup-notification + +METACITY_DEPENDENCIES = libgtk2 \ + xlib_libX11 \ + host-libxml-parser-perl \ + xlib_libXcomposite \ + xlib_libXfixes \ + xlib_libXrender \ + xlib_libXdamage + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +METACITY_DEPENDENCIES += xlib_libXcursor +endif + +define METACITY_INSTALL_XSESSION + $(INSTALL) -D package/metacity/Xsession $(TARGET_DIR)/etc/X11/Xsession +endef + +METACITY_POST_INSTALL_TARGET_HOOKS += METACITY_INSTALL_XSESSION + +$(eval $(autotools-package)) diff --git a/package/micropython-lib/Config.in b/package/micropython-lib/Config.in new file mode 100644 index 0000000000..a7e017be76 --- /dev/null +++ b/package/micropython-lib/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_MICROPYTHON_LIB + bool "micropython-lib" + depends on BR2_PACKAGE_MICROPYTHON + help + Core Python libraries ported to MicroPython. + + http://micropython.org diff --git a/package/micropython-lib/micropython-lib.hash b/package/micropython-lib/micropython-lib.hash new file mode 100644 index 0000000000..30d0cf8882 --- /dev/null +++ b/package/micropython-lib/micropython-lib.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 e659444fadd755c1b5dbff091aa1b23a835e7361da3a32f38774bd39a15937ad micropython-lib-v1.0.tar.gz diff --git a/package/micropython-lib/micropython-lib.mk b/package/micropython-lib/micropython-lib.mk new file mode 100644 index 0000000000..4ed2120a7e --- /dev/null +++ b/package/micropython-lib/micropython-lib.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# micropython-lib +# +################################################################################ + +MICROPYTHON_LIB_VERSION = v1.0 +MICROPYTHON_LIB_SITE = $(call github,micropython,micropython-lib,$(MICROPYTHON_LIB_VERSION)) +MICROPYTHON_LIB_LICENSE = Python software foundation license v2 (some modules), MIT (everything else) +MICROPYTHON_LIB_LICENSE_FILES = LICENSE + +define MICROPYTHON_LIB_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + PREFIX=$(TARGET_DIR)/usr/lib/micropython \ + install +endef + +$(eval $(generic-package)) diff --git a/package/micropython/0001-fix-version.patch b/package/micropython/0001-fix-version.patch new file mode 100644 index 0000000000..1bf2992169 --- /dev/null +++ b/package/micropython/0001-fix-version.patch @@ -0,0 +1,22 @@ +Always use the fallback behaviour for determining the version number + +When built from within buildroot the micropython build process detects +that it is inside a git repository and ends up using the buildroot +version number instead of the correct micropython version number. + +Signed-off-by: Chris Packham +--- +diff -Naur micropython-v1.4.5-old/py/makeversionhdr.py micropython-v1.4.5/py/makeversionhdr.py +--- micropython-v1.4.5-old/py/makeversionhdr.py 2015-08-12 00:42:30.000000000 +1200 ++++ micropython-v1.4.5/py/makeversionhdr.py 2015-09-16 10:21:06.698962836 +1200 +@@ -70,9 +70,7 @@ + + def make_version_header(filename): + # Get version info using git, with fallback to docs/conf.py +- info = get_version_info_from_git() +- if info is None: +- info = get_version_info_from_docs_conf() ++ info = get_version_info_from_docs_conf() + + git_tag, git_hash, ver = info + diff --git a/package/micropython/Config.in b/package/micropython/Config.in new file mode 100644 index 0000000000..ed65d6ab30 --- /dev/null +++ b/package/micropython/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_MICROPYTHON + bool "micropython" + select BR2_PACKAGE_LIBFFI + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + # libffi doesn't provide the closure implementation on Blackfin + depends on !BR2_bfin + help + Micro Python is a lean and fast implementation of the Python 3 + programming language that is optimised to run on a microcontroller. + + http://micropython.org + +comment "micropython needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on !BR2_bfin diff --git a/package/micropython/micropython.hash b/package/micropython/micropython.hash new file mode 100644 index 0000000000..b3a7c22ccc --- /dev/null +++ b/package/micropython/micropython.hash @@ -0,0 +1,2 @@ +#locally computed +sha256 f8ea3faffa797de1a06c16c8f57c784c665b318ca08ac17f74dcbc95322d47de micropython-v1.6.tar.gz diff --git a/package/micropython/micropython.mk b/package/micropython/micropython.mk new file mode 100644 index 0000000000..853caa2c3e --- /dev/null +++ b/package/micropython/micropython.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# micropython +# +################################################################################ + +MICROPYTHON_VERSION = v1.6 +MICROPYTHON_SITE = $(call github,micropython,micropython,$(MICROPYTHON_VERSION)) +MICROPYTHON_LICENSE = MIT +MICROPYTHON_LICENSE_FILES = LICENSE +MICROPYTHON_DEPENDENCIES = host-pkgconf libffi + +# Use fallback implementation for exception handling on architectures that don't +# have explicit support. +ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb),) +MICROPYTHON_CFLAGS = -DMICROPY_GCREGS_SETJMP=1 +endif + +define MICROPYTHON_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/unix \ + CROSS_COMPILE=$(TARGET_CROSS) \ + CFLAGS_EXTRA=$(MICROPYTHON_CFLAGS) +endef + +define MICROPYTHON_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/unix \ + DESTDIR=$(TARGET_DIR) \ + PREFIX=$(TARGET_DIR)/usr \ + install +endef + +$(eval $(generic-package)) diff --git a/package/midori/0001-fix-bug-1492932.patch b/package/midori/0001-fix-bug-1492932.patch new file mode 100644 index 0000000000..27ad283a58 --- /dev/null +++ b/package/midori/0001-fix-bug-1492932.patch @@ -0,0 +1,44 @@ +Fix for https://bugs.launchpad.net/midori/+bug/1492932 +Patch status: upstream + +Signed-off-by: Gustavo Zacarias + +--- a/midori/midori-browser.c 2015-07-11 16:03:43 +0000 ++++ b/midori/midori-browser.c 2015-09-25 21:30:31 +0000 +@@ -5953,11 +5953,6 @@ + G_CALLBACK (midori_browser_destroy_cb), NULL); + gtk_window_set_role (GTK_WINDOW (browser), "browser"); + gtk_window_set_icon_name (GTK_WINDOW (browser), MIDORI_STOCK_WEB_BROWSER); +- #if GTK_CHECK_VERSION (3, 4, 0) +- #ifndef HAVE_GRANITE +- gtk_window_set_hide_titlebar_when_maximized (GTK_WINDOW (browser), TRUE); +- #endif +- #endif + vbox = gtk_vbox_new (FALSE, 0); + /* gtk_container_add (GTK_CONTAINER (browser), vbox); + gtk_widget_show (vbox); */ + +--- a/midori/midori-view.c 2015-07-06 21:26:46 +0000 ++++ b/midori/midori-view.c 2015-09-25 21:30:31 +0000 +@@ -3495,9 +3495,6 @@ + } + else + gtk_window_set_icon_name (GTK_WINDOW (window), icon_name); +- #if GTK_CHECK_VERSION (3, 4, 0) +- gtk_window_set_hide_titlebar_when_maximized (GTK_WINDOW (window), TRUE); +- #endif + gtk_widget_set_size_request (GTK_WIDGET (inspector_view), 700, 100); + #if GTK_CHECK_VERSION (3, 0, 0) + scrolled = gtk_scrolled_window_new (NULL, NULL); + +--- a/midori/midori-window.vala 2015-08-16 00:14:26 +0000 ++++ b/midori/midori-window.vala 2015-09-25 21:30:31 +0000 +@@ -28,7 +28,6 @@ + toolbar.show_arrow = true; + #if HAVE_GTK3 + toolbar.get_style_context ().add_class ("primary-toolbar"); +- hide_titlebar_when_maximized = true; + #endif + toolbar.popup_context_menu.connect ((x, y, button) => { + return button == 3 && context_menu (toolbar); }); + diff --git a/package/midori/0002-gcr-for-x11-only.patch b/package/midori/0002-gcr-for-x11-only.patch new file mode 100644 index 0000000000..85e769765f --- /dev/null +++ b/package/midori/0002-gcr-for-x11-only.patch @@ -0,0 +1,32 @@ +GCR support only works/is useful with X11 support. + +Reported upstream: https://bugs.launchpad.net/midori/+bug/1515985 + +Signed-off-by: Gustavo Zacarias + +diff -Nura midori-0.5.11.orig/CMakeLists.txt midori-0.5.11/CMakeLists.txt +--- midori-0.5.11.orig/CMakeLists.txt 2015-11-12 13:41:02.045898814 -0300 ++++ midori-0.5.11/CMakeLists.txt 2015-11-12 14:00:09.765545018 -0300 +@@ -175,18 +175,14 @@ + set(PKGS ${PKGS} zeitgeist-2.0) + endif() + +-if (WIN32) +- add_definitions("-DGCR_VERSION=\"No\"") +-else () +- if (USE_GTK3) +- pkg_check_modules(GCR REQUIRED gcr-3>=2.32) +- else () +- pkg_check_modules(GCR REQUIRED gcr-base-3>=2.32) +- endif () ++if (USE_GTK3 AND X11) ++ pkg_check_modules(GCR REQUIRED gcr-3>=2.32) + add_definitions("-DGCR_VERSION=\"${GCR_VERSION}\"") + add_definitions("-DHAVE_GCR") + set(OPTS_INCLUDE_DIRS ${OPTS_INCLUDE_DIRS} ${GCR_INCLUDE_DIRS}) + set(OPTS_LIBRARIES ${OPTS_LIBRARIES} ${GCR_LIBRARIES}) ++else () ++ add_definitions("-DGCR_VERSION=\"No\"") + endif () + + if (HALF_BRO_INCOM_WEBKIT2) diff --git a/package/midori/Config.in b/package/midori/Config.in new file mode 100644 index 0000000000..9751f33eac --- /dev/null +++ b/package/midori/Config.in @@ -0,0 +1,26 @@ +comment "midori needs libgtk3 and an (e)glibc toolchain w/ C++, gcc >= 4.9" + depends on BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_PACKAGE_LIBGTK3 \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_MIDORI + bool "midori" + # GCR can only be used with the X11 backend + select BR2_PACKAGE_GCR if BR2_PACKAGE_LIBGTK3_X11 + select BR2_PACKAGE_GRANITE + select BR2_PACKAGE_LIBSOUP + select BR2_PACKAGE_LIBSOUP_GNOME + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_WEBKITGTK + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on BR2_PACKAGE_LIBGTK3 + depends on BR2_INSTALL_LIBSTDCPP # webkitgtk + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # webkitgtk + depends on BR2_TOOLCHAIN_USES_GLIBC # webkitgtk + depends on BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS + help + Midori is a lightweight web browser based on WebKit + + http://www.midori-browser.org/ diff --git a/package/midori/midori.hash b/package/midori/midori.hash new file mode 100644 index 0000000000..f548c427fb --- /dev/null +++ b/package/midori/midori.hash @@ -0,0 +1,2 @@ +# From download link @ http://midori-browser.org/download/source/ +sha1 64c86935028feb5f89d799c2acacaad67764da6f midori_0.5.11_all_.tar.bz2 diff --git a/package/midori/midori.mk b/package/midori/midori.mk new file mode 100644 index 0000000000..5aa83c6fcf --- /dev/null +++ b/package/midori/midori.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# midori +# +################################################################################ + +MIDORI_VERSION = 0.5.11 +MIDORI_SOURCE = midori_$(MIDORI_VERSION)_all_.tar.bz2 +MIDORI_SITE = http://midori-browser.org/downloads +MIDORI_LICENSE = LGPLv2.1+ +MIDORI_LICENSE_FILES = COPYING +MIDORI_DEPENDENCIES = \ + host-intltool \ + host-librsvg \ + host-pkgconf \ + host-vala \ + host-python \ + $(if $(BR2_PACKAGE_LIBGTK3_X11),gcr) \ + granite \ + libgtk3 \ + libsoup \ + libxml2 \ + sqlite \ + webkitgtk \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +MIDORI_CONF_OPTS = \ + -DHALF_BRO_INCOM_WEBKIT2=ON \ + -DUSE_GRANITE=ON \ + -DUSE_GTK3=ON \ + -DUSE_ZEITGEIST=OFF + +$(eval $(cmake-package)) diff --git a/package/mii-diag/0001-strchr.patch b/package/mii-diag/0001-strchr.patch new file mode 100644 index 0000000000..fcfeb3c73e --- /dev/null +++ b/package/mii-diag/0001-strchr.patch @@ -0,0 +1,23 @@ +Use the strrchr() function instead of the deprecated rindex() +function. + +--- mii-diag-2.11.orig/mii-diag.c.orig 2008-06-25 11:08:52.000000000 +1000 ++++ mii-diag-2.11.orig/mii-diag.c 2005-03-27 03:56:33.000000000 +1000 +@@ -174,7 +174,7 @@ + { + int c, errflag = 0; + char **spp, *ifname; +- char *progname = rindex(argv[0], '/') ? rindex(argv[0], '/')+1 : argv[0]; ++ char *progname = strrchr(argv[0], '/') ? strrchr(argv[0], '/')+1 : argv[0]; + + while ((c = getopt_long(argc, argv, shortopts, longopts, 0)) != EOF) + switch (c) { +@@ -310,7 +310,7 @@ + str = endstr+1; + else { + fprintf(stderr, "Invalid driver parameter '%s'.\n", str); +- str = index(str, ','); ++ str = strchr(str, ','); + } + } else if (endstr[0] == ',') { + data32[i] = newval; diff --git a/package/mii-diag/Config.in b/package/mii-diag/Config.in new file mode 100644 index 0000000000..ca48ba216f --- /dev/null +++ b/package/mii-diag/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_MII_DIAG + bool "mii-diag" + help + mii-diag allows you to manipulate the MII registers of + network cards. diff --git a/package/mii-diag/mii-diag.hash b/package/mii-diag/mii-diag.hash new file mode 100644 index 0000000000..22c69e3e57 --- /dev/null +++ b/package/mii-diag/mii-diag.hash @@ -0,0 +1,3 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/m/mii-diag/mii-diag_2.11-3.dsc +sha256 c690e87e6010607593c1cc2ccd5c481eb3be179387220ad445d8ab83d73ad41c mii-diag_2.11.orig.tar.gz +sha256 b49fd3e7c0c446a949c3ca246cc441824d7ef5a61530f884756a82b0b2997190 mii-diag_2.11-3.diff.gz diff --git a/package/mii-diag/mii-diag.mk b/package/mii-diag/mii-diag.mk new file mode 100644 index 0000000000..ae8defd9df --- /dev/null +++ b/package/mii-diag/mii-diag.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# mii-diag +# +################################################################################ + +MII_DIAG_VERSION = 2.11 +MII_DIAG_SOURCE = mii-diag_$(MII_DIAG_VERSION).orig.tar.gz +MII_DIAG_PATCH = mii-diag_$(MII_DIAG_VERSION)-3.diff.gz +MII_DIAG_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/m/mii-diag +MII_DIAG_LICENSE = GPL # No version specified +MII_DIAG_LICENSE_FILES = mii-diag.c + +MII_DIAG_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) + +define MII_DIAG_DEBIAN_PATCHES + if [ -d $(@D)/debian/patches ]; then \ + $(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*.patch; \ + fi +endef + +MII_DIAG_POST_PATCH_HOOKS = MII_DIAG_DEBIAN_PATCHES + +define MII_DIAG_BUILD_CMDS + $(MAKE) $(MII_DIAG_MAKE_OPTS) -C $(@D) mii-diag +endef + +define MII_DIAG_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install-mii-diag +endef + +$(eval $(generic-package)) diff --git a/package/minicom/0001-musl-libc-compile-fix.patch b/package/minicom/0001-musl-libc-compile-fix.patch new file mode 100644 index 0000000000..94c0da06a5 --- /dev/null +++ b/package/minicom/0001-musl-libc-compile-fix.patch @@ -0,0 +1,28 @@ +# HG changeset patch +# User Adam Lackorzynski +# Date 1432407431 -7200 +# Sat May 23 20:57:11 2015 +0200 +# Node ID 8bf81e6a8e60e37c2dec9577a1be6357b8d56165 +# Parent 8c784c80c17aa7a346d982db23bca5df67302cda +musl-libc compile fix + +By Felix Janda : +VC_MUSIC is enabled by default on linux and in dial.c the +necessary header are only included for glibc. (The wrong conditional +include has likely been introduced by the 2003-03-30 GNU/Hurd patch.) + +Signed-off-by: Bernd Kuhls +[Taken from upstream Mercurial commit 8bf81e6a8e60] + +diff -r 8c784c80c17a -r 8bf81e6a8e60 src/dial.c +--- a/src/dial.c Sat May 23 20:56:29 2015 +0200 ++++ b/src/dial.c Sat May 23 20:57:11 2015 +0200 +@@ -39,7 +39,7 @@ + #include "intl.h" + + #ifdef VC_MUSIC +-# if defined(__GLIBC__) ++# if defined(__linux__) || defined(__GLIBC__) + # include + # include + # include diff --git a/package/minicom/0002-change-maxnamlen-to-posixs-name-max.patch b/package/minicom/0002-change-maxnamlen-to-posixs-name-max.patch new file mode 100644 index 0000000000..83e1530600 --- /dev/null +++ b/package/minicom/0002-change-maxnamlen-to-posixs-name-max.patch @@ -0,0 +1,51 @@ +# HG changeset patch +# User Adam Lackorzynski +# Date 1432407475 -7200 +# Sat May 23 20:57:55 2015 +0200 +# Node ID 93e5dd955c8bd944fd64bb04fd117c963c3758bc +# Parent 8bf81e6a8e60e37c2dec9577a1be6357b8d56165 +Change MAXNAMLEN to POSIX's NAME_MAX + +By Felix Janda : +MAXNAMLEN is usually defined in but it is +better to use the equivalent POSIX NAME_MAX. + +Signed-off-by: Bernd Kuhls +[Taken from upstream Mercurial commit 93e5dd955c8b] + +diff -r 8bf81e6a8e60 -r 93e5dd955c8b src/getsdir.c +--- a/src/getsdir.c Sat May 23 20:57:11 2015 +0200 ++++ b/src/getsdir.c Sat May 23 20:57:55 2015 +0200 +@@ -145,7 +145,7 @@ + * + * The data will be in the form: + * typedef struct dirEntry { +- * char fname[MAXNAMLEN + 1]; ++ * char fname[NAME_MAX + 1]; + * time_t time; + * mode_t mode; + * } GETSDIR_ENTRY; +@@ -232,7 +232,7 @@ + } + + /* copy the filename */ +- strncpy((*datptr)[cnt].fname, dp->d_name, MAXNAMLEN); ++ strncpy((*datptr)[cnt].fname, dp->d_name, NAME_MAX); + + /* get information about the directory entry */ + snprintf(fpath, sizeof(fpath), "%s/%s", dirpath, dp->d_name); +diff -r 8bf81e6a8e60 -r 93e5dd955c8b src/getsdir.h +--- a/src/getsdir.h Sat May 23 20:57:11 2015 +0200 ++++ b/src/getsdir.h Sat May 23 20:57:55 2015 +0200 +@@ -23,9 +23,10 @@ + */ + + #include ++#include + + typedef struct dirEntry { /* structure of data item */ +- char fname[MAXNAMLEN + 1]; /* filename + terminating null */ ++ char fname[NAME_MAX + 1]; /* filename + terminating null */ + time_t time; /* last modification date */ + mode_t mode; /* file mode (dir? etc.) */ + ushort cflags; /* caller field for convenience */ diff --git a/package/minicom/Config.in b/package/minicom/Config.in new file mode 100644 index 0000000000..c41c188570 --- /dev/null +++ b/package/minicom/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_MINICOM + bool "minicom" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_NCURSES + help + Minicom is a menu driven communications program. It emulates + ANSI and VT102 terminals. It has a dialing directory and auto + zmodem download. + + http://alioth.debian.org/projects/minicom/ + +comment "minicom needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/minicom/minicom.hash b/package/minicom/minicom.hash new file mode 100644 index 0000000000..33ba4ef10c --- /dev/null +++ b/package/minicom/minicom.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9ac3a663b82f4f5df64114b4792b9926b536c85f59de0f2d2b321c7626a904f4 minicom-2.7.tar.gz diff --git a/package/minicom/minicom.mk b/package/minicom/minicom.mk new file mode 100644 index 0000000000..94a4628659 --- /dev/null +++ b/package/minicom/minicom.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# minicom +# +################################################################################ + +MINICOM_VERSION = 2.7 +MINICOM_SITE = https://alioth.debian.org/frs/download.php/file/3977 +MINICOM_LICENSE = GPLv2+ +MINICOM_LICENSE_FILES = COPYING + +# pkg-config is only used to check for liblockdev, which we don't have +# in BR, so instead of adding host-pkgconf as a dependency, simply make +# sure the host version isn't used so we don't end up with problems if +# people have liblockdev1-dev installed +MINICOM_CONF_ENV = PKG_CONFIG=/bin/false + +MINICOM_DEPENDENCIES = ncurses $(if $(BR2_ENABLE_LOCALE),,libiconv) + +$(eval $(autotools-package)) diff --git a/package/minidlna/Config.in b/package/minidlna/Config.in new file mode 100644 index 0000000000..c900143f75 --- /dev/null +++ b/package/minidlna/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_MINIDLNA + bool "minidlna" + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR # flac + depends on BR2_USE_MMU # fork + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FLAC + select BR2_PACKAGE_LIBVORBIS # selects libogg + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBID3TAG # selects zlib + select BR2_PACKAGE_LIBEXIF + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + MiniDLNA (aka ReadyDLNA) is server software with the aim of being + fully compliant with DLNA/UPnP-AV clients. + + http://minidlna.sourceforge.net/ + +comment "minidlna needs a toolchain w/ dynamic library, threads, wchar" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \ + BR2_STATIC_LIBS diff --git a/package/minidlna/S60minidlnad b/package/minidlna/S60minidlnad new file mode 100644 index 0000000000..9b158afd98 --- /dev/null +++ b/package/minidlna/S60minidlnad @@ -0,0 +1,43 @@ +#!/bin/sh +# +# minidlnad Starts minidlnad. +# + +start() { + printf "Starting minidlna: " + umask 077 + start-stop-daemon -S -q -p /var/run/minidlna/minidlna.pid \ + --exec /usr/sbin/minidlnad -- "$@" + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +stop() { + printf "Stopping minidlna: " + start-stop-daemon -K -q -p /var/run/minidlna/minidlna.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +restart() { + stop + # Sleep needed for minidlna to restart properly + sleep 1 + start "$@" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + force-reload) + restart -R + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" + exit 1 +esac + +exit $? diff --git a/package/minidlna/minidlna.hash b/package/minidlna/minidlna.hash new file mode 100644 index 0000000000..d1ed4b9184 --- /dev/null +++ b/package/minidlna/minidlna.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/minidlna/files/minidlna/1.1.5/ +md5 1970e553a1eb8a3e7e302e2ce292cbc4 minidlna-1.1.5.tar.gz +sha1 8185337621f5f9111118d8a4bca1e8cfcdd19505 minidlna-1.1.5.tar.gz diff --git a/package/minidlna/minidlna.mk b/package/minidlna/minidlna.mk new file mode 100644 index 0000000000..0e765e80f7 --- /dev/null +++ b/package/minidlna/minidlna.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# minidlna +# +################################################################################ + +MINIDLNA_VERSION = 1.1.5 +MINIDLNA_SITE = http://downloads.sourceforge.net/project/minidlna/minidlna/$(MINIDLNA_VERSION) +MINIDLNA_LICENSE = GPLv2, BSD-3c +MINIDLNA_LICENSE_FILES = COPYING LICENCE.miniupnpd + +MINIDLNA_DEPENDENCIES = \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) host-gettext \ + ffmpeg flac libvorbis libogg libid3tag libexif jpeg sqlite \ + host-xutil_makedepend + +MINIDLNA_CONF_OPTS = \ + --disable-static + +define MINIDLNA_INSTALL_CONF + $(INSTALL) -D -m 644 $(@D)/minidlna.conf $(TARGET_DIR)/etc/minidlna.conf +endef + +MINIDLNA_POST_INSTALL_TARGET_HOOKS += MINIDLNA_INSTALL_CONF + +define MINIDLNA_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/minidlna/S60minidlnad \ + $(TARGET_DIR)/etc/init.d/S60minidlnad +endef + +define MINIDLNA_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0755 package/minidlna/minidlnad.service \ + $(TARGET_DIR)/usr/lib/systemd/system/minidlnad.service + + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + + ln -fs ../../../../usr/lib/systemd/system/minidlnad.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/minidlnad.service +endef + +$(eval $(autotools-package)) diff --git a/package/minidlna/minidlnad.service b/package/minidlna/minidlnad.service new file mode 100644 index 0000000000..f69476b303 --- /dev/null +++ b/package/minidlna/minidlnad.service @@ -0,0 +1,11 @@ +[Unit] +Description=minidlna server +After=network.target + +[Service] +Type=forking +ExecStart=/usr/sbin/minidlnad +PIDFile=/var/run/minidlna/minidlna.pid + +[Install] +WantedBy=multi-user.target diff --git a/package/minizip/Config.in b/package/minizip/Config.in new file mode 100644 index 0000000000..7205e0007e --- /dev/null +++ b/package/minizip/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_MINIZIP + bool "minizip" + select BR2_PACKAGE_ZLIB + help + Enables to extract files from a .zip archive file. + It is compatible with PKZip 2.04g, WinZip, InfoZip, + MimarSinan Codex Suite 2002 tools, and compatible sofware. + + https://github.com/nmoinvaz/minizip + +config BR2_PACKAGE_MINIZIP_DEMOS + bool "miniunzip/minizip" + depends on BR2_PACKAGE_MINIZIP + help + Enable miniunzip/minizip binary tools. diff --git a/package/minizip/minizip.hash b/package/minizip/minizip.hash new file mode 100644 index 0000000000..a303b2c718 --- /dev/null +++ b/package/minizip/minizip.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 b39158bdf3d8bf81d3a7412dc761851fda398bc93d8989d5e940ed4ae5bbb52c minizip-977afb22966e6ab0ee401293a8e85fe808133f9a.tar.gz diff --git a/package/minizip/minizip.mk b/package/minizip/minizip.mk new file mode 100644 index 0000000000..5b8778615a --- /dev/null +++ b/package/minizip/minizip.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# minizip +# +################################################################################ + +MINIZIP_VERSION = 977afb22966e6ab0ee401293a8e85fe808133f9a +MINIZIP_SITE = $(call github,nmoinvaz,minizip,$(MINIZIP_VERSION)) +MINIZIP_DEPENDENCIES = zlib +MINIZIP_AUTORECONF = YES +MINIZIP_INSTALL_STAGING = YES +MINIZIP_CONF_OPTS = $(if $(BR2_PACKAGE_MINIZIP_DEMOS),--enable-demos) +MINIZIP_LICENSE = zlib license +MINIZIP_LICENSE_FILES = LICENSE + +$(eval $(autotools-package)) diff --git a/package/miraclecast/Config.in b/package/miraclecast/Config.in new file mode 100644 index 0000000000..4c6a8aaa07 --- /dev/null +++ b/package/miraclecast/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_MIRACLECAST + bool "miraclecast" + depends on BR2_PACKAGE_SYSTEMD + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_READLINE + select BR2_PACKAGE_SYSTEMD_KDBUS + help + The MiracleCast project provides software to connect external + monitors to your system via Wifi. It is compatible to the + Wifi-Display specification also known as Miracast. MiracleCast + implements the Display-Source as well as Display-Sink side. + + https://github.com/albfan/miraclecast + +comment "miraclecast needs systemd and a glibc toolchain w/ threads and wchar" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_USE_WCHAR \ + || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_SYSTEMD diff --git a/package/miraclecast/miraclecast.hash b/package/miraclecast/miraclecast.hash new file mode 100644 index 0000000000..2a92cbf045 --- /dev/null +++ b/package/miraclecast/miraclecast.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 deef87155ed07bcf737260c29599e886bd248b573e72ba167369df93acb1fa61 miraclecast-8b61f733da124ccbfd1b85e188581fad1c41c1e1.tar.gz diff --git a/package/miraclecast/miraclecast.mk b/package/miraclecast/miraclecast.mk new file mode 100644 index 0000000000..598dbd5e4e --- /dev/null +++ b/package/miraclecast/miraclecast.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# miraclecast +# +################################################################################ + +MIRACLECAST_VERSION = 8b61f733da124ccbfd1b85e188581fad1c41c1e1 +MIRACLECAST_SITE = $(call github,albfan,miraclecast,$(MIRACLECAST_VERSION)) +MIRACLECAST_LICENSE = LGPLv2.1+, GPLv2 (gdhcp) +MIRACLECAST_LICENSE_FILES = COPYING LICENSE_gdhcp LICENSE_htable LICENSE_lgpl +MIRACLECAST_DEPENDENCIES = host-pkgconf systemd gstreamer1 \ + readline libglib2 +# Straight out the repository, no ./configure +MIRACLECAST_AUTORECONF = YES + +define MIRACLECAST_INSTALL_DBUS_POLICY + $(INSTALL) -m 0644 -D \ + $(@D)/res/org.freedesktop.miracle.conf \ + $(TARGET_DIR)/etc/dbus-1/system.d/org.freedesktop.miracle.conf +endef +MIRACLECAST_POST_INSTALL_TARGET_HOOKS += MIRACLECAST_INSTALL_DBUS_POLICY + +$(eval $(autotools-package)) diff --git a/package/mjpegtools/Config.in b/package/mjpegtools/Config.in new file mode 100644 index 0000000000..6a36109da2 --- /dev/null +++ b/package/mjpegtools/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_MJPEGTOOLS + bool "mjpegtools" + select BR2_PACKAGE_JPEG + depends on BR2_USE_MMU # fork + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + The mjpegtools programs are a set of tools + that can do recording of videos and playback, + simple cut-and-paste editing and the MPEG + compression of audio and video under Linux. + + http://mjpeg.sourceforge.net + +comment "mjpegtools needs a toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/mjpegtools/mjpegtools.hash b/package/mjpegtools/mjpegtools.hash new file mode 100644 index 0000000000..db184f784d --- /dev/null +++ b/package/mjpegtools/mjpegtools.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/mjpeg/files/mjpegtools/2.1.0/ +md5 57bf5dd78976ca9bac972a6511b236f3 mjpegtools-2.1.0.tar.gz +sha1 b9effa86280e23d67369e842e5cb645948583097 mjpegtools-2.1.0.tar.gz diff --git a/package/mjpegtools/mjpegtools.mk b/package/mjpegtools/mjpegtools.mk new file mode 100644 index 0000000000..76ae968d99 --- /dev/null +++ b/package/mjpegtools/mjpegtools.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# mjpegtools +# +################################################################################ + +MJPEGTOOLS_VERSION = 2.1.0 +MJPEGTOOLS_SITE = http://sourceforge.net/projects/mjpeg/files/mjpegtools/$(MJPEGTOOLS_VERSION) +MJPEGTOOLS_DEPENDENCIES = host-pkgconf jpeg +MJPEGTOOLS_LICENSE = GPLv2+ +MJPEGTOOLS_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +MJPEGTOOLS_CONF_OPTS += --with-libpng +MJPEGTOOLS_DEPENDENCIES += libpng +else +MJPEGTOOLS_CONF_OPTS += --without-libpng +endif + +# expects X11 backend in sdl +ifeq ($(BR2_PACKAGE_SDL_X11),y) +MJPEGTOOLS_CONF_OPTS += --with-libsdl +MJPEGTOOLS_DEPENDENCIES += sdl +else +MJPEGTOOLS_CONF_OPTS += --without-libsdl +endif + +ifeq ($(BR2_PACKAGE_SDL_GFX),y) +MJPEGTOOLS_CONF_OPTS += --with-sdlgfx +MJPEGTOOLS_DEPENDENCIES += sdl_gfx +else +MJPEGTOOLS_CONF_OPTS += --without-sdlgfx +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +MJPEGTOOLS_CONF_OPTS += --with-x +MJPEGTOOLS_DEPENDENCIES += xlib_libX11 +else +MJPEGTOOLS_CONF_OPTS += --without-x +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86DGA),y) +MJPEGTOOLS_CONF_OPTS += --with-dga +MJPEGTOOLS_DEPENDENCIES += xlib_libXxf86dga +else +MJPEGTOOLS_CONF_OPTS += --without-dga +endif + +ifeq ($(BR2_PACKAGE_LIBGTK2),y) +MJPEGTOOLS_CONF_OPTS += --with-gtk +MJPEGTOOLS_DEPENDENCIES += libgtk2 +else +MJPEGTOOLS_CONF_OPTS += --without-gtk +endif + +$(eval $(autotools-package)) diff --git a/package/mjpg-streamer/0001-musl-pthread.patch b/package/mjpg-streamer/0001-musl-pthread.patch new file mode 100644 index 0000000000..9e76e760d8 --- /dev/null +++ b/package/mjpg-streamer/0001-musl-pthread.patch @@ -0,0 +1,18 @@ +Fix musl build + +Patch written by Thomas Petazzoni: +http://patchwork.ozlabs.org/patch/572309/ + +Signed-off-by: Bernd Kuhls + +diff -uNr mjpg-streamer-bbf32fddfd02a9e072e89e83a5b33e6ca0a7bd4b.org/plugins/input.h mjpg-streamer-bbf32fddfd02a9e072e89e83a5b33e6ca0a7bd4b/plugins/input.h +--- mjpg-streamer-bbf32fddfd02a9e072e89e83a5b33e6ca0a7bd4b.org/plugins/input.h 2015-11-09 15:56:47.000000000 +0100 ++++ mjpg-streamer-bbf32fddfd02a9e072e89e83a5b33e6ca0a7bd4b/plugins/input.h 2016-01-26 20:19:05.884349502 +0100 +@@ -20,6 +20,7 @@ + # # + *******************************************************************************/ + ++#include + #include + #include "../mjpg_streamer.h" + #define INPUT_PLUGIN_PREFIX " i: " diff --git a/package/mjpg-streamer/Config.in b/package/mjpg-streamer/Config.in new file mode 100644 index 0000000000..f42c2a50db --- /dev/null +++ b/package/mjpg-streamer/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_MJPG_STREAMER + bool "mjpg-streamer" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # linux/uvcvideo.h + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # plugins need dlopen() + select BR2_PACKAGE_JPEG + help + MJPG-streamer takes JPGs from Linux-UVC compatible webcams, + filesystem or other input plugins and streams them as + M-JPEG via HTTP to webbrowsers, VLC and other software. + + http://mjpg-streamer.sourceforge.net + +comment "mjpg-streamer needs a toolchain w/ threads, headers >= 3.0, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 || BR2_STATIC_LIBS diff --git a/package/mjpg-streamer/mjpg-streamer.hash b/package/mjpg-streamer/mjpg-streamer.hash new file mode 100644 index 0000000000..8bbac29e33 --- /dev/null +++ b/package/mjpg-streamer/mjpg-streamer.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 756a60cbc3404ac21109bb66091774ac8e1d64ebf60e2bf2c0d08a06d1abb9be mjpg-streamer-bbf32fddfd02a9e072e89e83a5b33e6ca0a7bd4b.tar.gz diff --git a/package/mjpg-streamer/mjpg-streamer.mk b/package/mjpg-streamer/mjpg-streamer.mk new file mode 100644 index 0000000000..a710af6fc7 --- /dev/null +++ b/package/mjpg-streamer/mjpg-streamer.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# mjpg-streamer +# +################################################################################ + +# Original source is located at +# http://sourceforge.net/p/mjpg-streamer/code/commit_browser +# oliv3r forked the repo to add support for 3.16 and 3.17 kernels: +# http://sourceforge.net/p/mjpg-streamer/patches/14/ +MJPG_STREAMER_VERSION = bbf32fddfd02a9e072e89e83a5b33e6ca0a7bd4b +MJPG_STREAMER_SITE = $(call github,oliv3r,mjpg-streamer,$(MJPG_STREAMER_VERSION)) +MJPG_STREAMER_LICENSE = GPLv2+ +MJPG_STREAMER_LICENSE_FILES = LICENSE +MJPG_STREAMER_DEPENDENCIES = jpeg + +ifeq ($(BR2_PACKAGE_LIBV4L),y) +MJPG_STREAMER_DEPENDENCIES += libv4l +MJPG_STREAMER_USE_LIBV4L += USE_LIBV4L2=true +endif + +define MJPG_STREAMER_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" -C $(@D) $(MJPG_STREAMER_USE_LIBV4L) +endef + +define MJPG_STREAMER_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR)/usr install +endef + +$(eval $(generic-package)) diff --git a/package/mke2img/Config.in.host b/package/mke2img/Config.in.host new file mode 100644 index 0000000000..b5bcb8455f --- /dev/null +++ b/package/mke2img/Config.in.host @@ -0,0 +1,11 @@ +config BR2_PACKAGE_HOST_MKE2IMG + bool "host mke2img" + select BR2_PACKAGE_HOST_E2FSPROGS + select BR2_PACKAGE_HOST_GENEXT2FS + help + Easily create filesystems of the extend familly: ext2/3/4. + + This tool is bundled by, and specific to Buildroot. However, it can + be used from post-images scripts is needed. + + https://code.google.com/p/mke2img/ diff --git a/package/mke2img/mke2img b/package/mke2img/mke2img new file mode 100755 index 0000000000..c2e0d02b73 --- /dev/null +++ b/package/mke2img/mke2img @@ -0,0 +1,214 @@ +#!/usr/bin/env bash + +# Buildroot wrapper to the collection of ext2/3/4 filesystem tools: +# - genext2fs, to generate ext2 filesystem images +# - tune2fs, to modify an ext2/3/4 filesystem (possibly in an image file) +# - e2fsck, to check and fix an ext2/3/4 filesystem (possibly in an image file) + +set -e + +main() { + local OPT OPTARG + local nb_blocks nb_inodes nb_res_blocks root_dir image gen rev label uuid + local -a genext2fs_opts + local -a tune2fs_opts + local tune2fs_O_opts + + # Default values + gen=2 + rev=1 + nb_extra_blocks=0 + nb_extra_inodes=0 + + while getopts :hb:B:i:I:r:d:o:G:R:l:u: OPT; do + case "${OPT}" in + h) help; exit 0;; + b) nb_blocks=${OPTARG};; + B) nb_extra_blocks=${OPTARG};; + i) nb_inodes=${OPTARG};; + I) nb_extra_inodes=${OPTARG};; + r) nb_res_blocks=${OPTARG};; + d) root_dir="${OPTARG}";; + o) image="${OPTARG}";; + G) gen=${OPTARG};; + R) rev=${OPTARG};; + l) label="${OPTARG}";; + u) uuid="${OPTARG}";; + :) error "option '%s' expects a mandatory argument\n" "${OPTARG}";; + \?) error "unknown option '%s'\n" "${OPTARG}";; + esac + done + + # Sanity checks + if [ -z "${root_dir}" ]; then + error "you must specify a root directory with '-d'\n" + fi + if [ -z "${image}" ]; then + error "you must specify an output image file with '-o'\n" + fi + case "${gen}:${rev}" in + 2:0|2:1|3:1|4:1) + ;; + 3:0|4:0) + error "revision 0 is invalid for ext3 and ext4\n" + ;; + *) error "unknown ext generation '%s' and/or revision '%s'\n" \ + "${gen}" "${rev}" + ;; + esac + + # calculate needed inodes + if [ -z "${nb_inodes}" ]; then + nb_inodes=$(find "${root_dir}" | wc -l) + nb_inodes=$((nb_inodes+400)) + fi + nb_inodes=$((nb_inodes+nb_extra_inodes)) + + # calculate needed blocks + if [ -z "${nb_blocks}" ]; then + # size ~= superblock, block+inode bitmaps, inodes (8 per block), + # blocks; we scale inodes / blocks with 10% to compensate for + # bitmaps size + slack + nb_blocks=$(du -s -k "${root_dir}" |sed -r -e 's/[[:space:]]+.*$//') + nb_blocks=$((500+(nb_blocks+nb_inodes/8)*11/10)) + if [ ${gen} -ge 3 ]; then + # we add 1300 blocks (a bit more than 1 MiB, assuming 1KiB blocks) + # for the journal + # Note: I came to 1300 blocks after trial-and-error checks. YMMV. + nb_blocks=$((nb_blocks+1300)) + fi + fi + nb_blocks=$((nb_blocks+nb_extra_blocks)) + + # Upgrade to rev1 if needed + if [ ${rev} -ge 1 ]; then + tune2fs_O_opts+=",filetype,sparse_super" + fi + + # Add a journal for ext3 and above + if [ ${gen} -ge 3 ]; then + tune2fs_opts+=( -j -J size=1 ) + fi + + # Add ext4 specific features + if [ ${gen} -ge 4 ]; then + tune2fs_O_opts+=",extents,uninit_bg,dir_index" + fi + + # Add our -O options (there will be at most one leading comma, remove it) + if [ -n "${tune2fs_O_opts}" ]; then + tune2fs_opts+=( -O "${tune2fs_O_opts#,}" ) + fi + + # Add the label if specified + if [ -n "${label}" ]; then + tune2fs_opts+=( -L "${label}" ) + fi + + # Generate the filesystem + genext2fs_opts=( -z -b ${nb_blocks} -N ${nb_inodes} -d "${root_dir}" ) + if [ -n "${nb_res_blocks}" ]; then + genext2fs_opts+=( -m ${nb_res_blocks} ) + fi + genext2fs "${genext2fs_opts[@]}" "${image}" + + # genext2fs does not generate a UUID, but fsck will whine if one + # is missing, so we need to add a UUID. + # Of course, this has to happen _before_ we run fsck. + # Also, some ext4 metadata are based on the UUID, so we must + # set it before we can convert the filesystem to ext4. + # If the user did not specify a UUID, we generate a random one. + # Although a random UUID may seem bad for reproducibility, there + # already are so many things that are not reproducible in a + # filesystem: file dates, file ordering, content of the files... + tune2fs -U "${uuid:-random}" "${image}" + + # Upgrade the filesystem + if [ ${#tune2fs_opts[@]} -ne 0 ]; then + tune2fs "${tune2fs_opts[@]}" "${image}" + fi + + # After changing filesystem options, running fsck is required + # (see: man tune2fs). Running e2fsck in other cases will ensure + # coherency of the filesystem, although it is not required. + # 'e2fsck -pDf' means: + # - automatically repair + # - optimise and check for duplicate entries + # - force checking + # Sending output to oblivion, as e2fsck can be *very* verbose, + # especially with filesystems generated by genext2fs. + # Exit codes 1 & 2 are OK, it means fs errors were successfully + # corrected, hence our little trick with $ret. + ret=0 + e2fsck -pDf "${image}" >/dev/null || ret=$? + case ${ret} in + 0|1|2) ;; + *) errorN ${ret} "failed to run e2fsck on '%s' (ext%d)\n" \ + "${image}" ${gen} + esac + printf "\n" + trace "e2fsck was successfully run on '%s' (ext%d)\n" "${image}" ${gen} + printf "\n" + + # Remove count- and time-based checks, they are not welcome + # on embedded devices, where they can cause serious boot-time + # issues by tremendously slowing down the boot. + tune2fs -c 0 -i 0 "${image}" +} + +help() { + cat <<_EOF_ +NAME + ${my_name} - Create an ext2/3/4 filesystem image + +SYNOPSIS + ${my_name} [OPTION]... + +DESCRIPTION + Create ext2/3/4 filesystem image from the content of a directory. + + -b BLOCKS + Create a filesystem of BLOCKS 1024-byte blocs. The default is to + compute the required number of blocks. + + -i INODES + Create a filesystem with INODES inodes. The default is to compute + the required number of inodes. + + -r RES_BLOCKS + Create a filesystem with RES_BLOCKS reserved blocks. The default + is to reserve 0 block. + + -d ROOT_DIR + Create a filesystem, using the content of ROOT_DIR as the content + of the root of the filesystem. Mandatory. + + -o FILE + Create the filesystem in FILE. Madatory. + + -G GEN -R REV + Create a filesystem of generation GEN (2, 3 or 4), and revision + REV (0 or 1). The default is to generate an ext2 revision 1 + filesystem; revision 0 is invalid for ext3 and ext4. + + -l LABEL + Create a filesystem with label LABEL. The default is to not set + a label. + + -u UUID + Create filesystem with uuid UUID. The default is to set a random + UUID. + + Exit status: + 0 if OK + !0 in case of error +_EOF_ +} + +trace() { local msg="${1}"; shift; printf "%s: ${msg}" "${my_name}" "${@}"; } +warn() { trace "${@}" >&2; } +errorN() { local ret="${1}"; shift; warn "${@}"; exit ${ret}; } +error() { errorN 1 "${@}"; } + +my_name="${0##*/}" +main "$@" diff --git a/package/mke2img/mke2img.mk b/package/mke2img/mke2img.mk new file mode 100644 index 0000000000..04aaa8f1bf --- /dev/null +++ b/package/mke2img/mke2img.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# mke2img +# +################################################################################ + +HOST_MKE2IMG_SOURCE = +HOST_MKE2IMG_DEPENDENCIES = host-genext2fs host-e2fsprogs + +define HOST_MKE2IMG_INSTALL_CMDS + $(INSTALL) -D -m 0755 package/mke2img/mke2img $(HOST_DIR)/usr/bin/mke2img +endef + +$(eval $(host-generic-package)) diff --git a/package/mkpasswd/config.h b/package/mkpasswd/config.h new file mode 100644 index 0000000000..f345074121 --- /dev/null +++ b/package/mkpasswd/config.h @@ -0,0 +1,95 @@ +/* Program version */ +#define VERSION "5.0.26" + +/* Configurable features */ + +/* Always hide legal disclaimers */ +#undef ALWAYS_HIDE_DISCL + +/* Default server */ +#define DEFAULTSERVER "whois.arin.net" + +/* Configuration file */ +/* +#define CONFIG_FILE "/etc/whois.conf" +*/ + + +/* autoconf in cpp macros */ +#ifdef linux +# define ENABLE_NLS +#endif + +#ifdef __FreeBSD__ +/* which versions? */ +# define HAVE_GETOPT_LONG +# define HAVE_GETADDRINFO +# define ENABLE_NLS +# ifndef LOCALEDIR +# define LOCALEDIR "/usr/local/share/locale" +# endif +#endif + +/* needs unistd.h */ +#if defined _POSIX_C_SOURCE && _POSIX_C_SOURCE >= 200112L +# define HAVE_GETADDRINFO +# define HAVE_REGEXEC +#endif + +#if defined __APPLE__ && defined __MACH__ +# define HAVE_GETOPT_LONG +# define HAVE_GETADDRINFO +#endif + +#if defined __GLIBC__ +# define HAVE_GETOPT_LONG +# if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 +# define HAVE_GETADDRINFO +# endif +# if __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 7 +# define HAVE_SHA_CRYPT +# endif +#endif + +/* Unknown versions of Solaris */ +#if defined __SVR4 && defined __sun +# define HAVE_SHA_CRYPT +# define HAVE_SOLARIS_CRYPT_GENSALT +#endif + +/* FIXME: which systems lack this? */ +#define HAVE_GETTIMEOFDAY +/* FIXME: disabled because it does not parse addresses with a netmask length. + * The code using it needs to be either fixed or removed. +#define HAVE_INET_PTON +*/ + +/* + * Please send patches to correctly ignore old releases which lack a RNG + * and add more systems which have one. + */ +#ifdef RANDOM_DEVICE +#elif defined __GLIBC__ \ + || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ \ + /* AIX >= 5.2? */ \ + || defined _AIX52 \ + /* HP-UX >= B.11.11.09? */ \ + || defined __hpux \ + /* OS X: */ \ + || (defined __APPLE__ && defined __MACH__) \ + /* Solaris >= 9 (this is >= 7): */ \ + || (defined __SVR4 && defined __sun && defined SUSv2) \ + /* Tru64 UNIX >= 5.1B? */ \ + || defined __osf +# define RANDOM_DEVICE "/dev/urandom" +#endif + +#ifdef ENABLE_NLS +# ifndef NLS_CAT_NAME +# define NLS_CAT_NAME "whois" +# endif +# ifndef LOCALEDIR +# define LOCALEDIR "/usr/share/locale" +# endif +#endif + diff --git a/package/mkpasswd/mkpasswd.c b/package/mkpasswd/mkpasswd.c new file mode 100644 index 0000000000..5820f32501 --- /dev/null +++ b/package/mkpasswd/mkpasswd.c @@ -0,0 +1,456 @@ +/* + * Copyright (C) 2001-2008 Marco d'Itri + * + * 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 + */ + +/* for crypt, snprintf and strcasecmp */ +#define _XOPEN_SOURCE +#define _BSD_SOURCE + +/* System library */ +#include +#include +#include +#include "config.h" +#ifdef HAVE_GETOPT_LONG +#include +#endif +#include +#include +#include +#include +#ifdef HAVE_XCRYPT +#include +#include +#endif +#ifdef HAVE_LINUX_CRYPT_GENSALT +#define _OW_SOURCE +#include +#endif +#ifdef HAVE_GETTIMEOFDAY +#include +#endif + +/* Application-specific */ +#include "utils.h" + +/* Global variables */ +#ifdef HAVE_GETOPT_LONG +static const struct option longopts[] = { + {"method", optional_argument, NULL, 'm'}, + /* for backward compatibility with versions < 4.7.25 (< 20080321): */ + {"hash", optional_argument, NULL, 'H'}, + {"help", no_argument, NULL, 'h'}, + {"password-fd", required_argument, NULL, 'P'}, + {"stdin", no_argument, NULL, 's'}, + {"salt", required_argument, NULL, 'S'}, + {"rounds", required_argument, NULL, 'R'}, + {"version", no_argument, NULL, 'V'}, + {NULL, 0, NULL, 0 } +}; +#else +extern char *optarg; +extern int optind; +#endif + +static const char valid_salts[] = "abcdefghijklmnopqrstuvwxyz" +"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789./"; + +struct crypt_method { + const char *method; /* short name used by the command line option */ + const char *prefix; /* salt prefix */ + const unsigned int minlen; /* minimum salt length */ + const unsigned int maxlen; /* maximum salt length */ + const unsigned int rounds; /* supports a variable number of rounds */ + const char *desc; /* long description for the methods list */ +}; + +static const struct crypt_method methods[] = { + /* method prefix minlen, maxlen rounds description */ + { "des", "", 2, 2, 0, + N_("standard 56 bit DES-based crypt(3)") }, + { "md5", "$1$", 8, 8, 0, "MD5" }, +#if defined OpenBSD || defined FreeBSD || (defined __SVR4 && defined __sun) + { "bf", "$2a$", 22, 22, 1, "Blowfish" }, +#endif +#if defined HAVE_LINUX_CRYPT_GENSALT + { "bf", "$2a$", 22, 22, 1, "Blowfish, system-specific on 8-bit chars" }, + /* algorithm 2y fixes CVE-2011-2483 */ + { "bfy", "$2y$", 22, 22, 1, "Blowfish, correct handling of 8-bit chars" }, +#endif +#if defined FreeBSD + { "nt", "$3$", 0, 0, 0, "NT-Hash" }, +#endif +#if defined HAVE_SHA_CRYPT + /* http://people.redhat.com/drepper/SHA-crypt.txt */ + { "sha-256", "$5$", 8, 16, 1, "SHA-256" }, + { "sha-512", "$6$", 8, 16, 1, "SHA-512" }, +#endif + /* http://www.crypticide.com/dropsafe/article/1389 */ + /* + * Actually the maximum salt length is arbitrary, but Solaris by default + * always uses 8 characters: + * http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/ \ + * usr/src/lib/crypt_modules/sunmd5/sunmd5.c#crypt_gensalt_impl + */ +#if defined __SVR4 && defined __sun + { "sunmd5", "$md5$", 8, 8, 1, "SunMD5" }, +#endif + { NULL, NULL, 0, 0, 0, NULL } +}; + +void generate_salt(char *const buf, const unsigned int len); +void *get_random_bytes(const int len); +void display_help(int error); +void display_version(void); +void display_methods(void); + +int main(int argc, char *argv[]) +{ + int ch, i; + int password_fd = -1; + unsigned int salt_minlen = 0; + unsigned int salt_maxlen = 0; + unsigned int rounds_support = 0; + const char *salt_prefix = NULL; + const char *salt_arg = NULL; + unsigned int rounds = 0; + char *salt = NULL; + char rounds_str[30]; + char *password = NULL; + +#ifdef ENABLE_NLS + setlocale(LC_ALL, ""); + bindtextdomain(NLS_CAT_NAME, LOCALEDIR); + textdomain(NLS_CAT_NAME); +#endif + + /* prepend options from environment */ + argv = merge_args(getenv("MKPASSWD_OPTIONS"), argv, &argc); + + while ((ch = GETOPT_LONGISH(argc, argv, "hH:m:5P:R:sS:V", longopts, 0)) + > 0) { + switch (ch) { + case '5': + optarg = (char *) "md5"; + /* fall through */ + case 'm': + case 'H': + if (!optarg || strcaseeq("help", optarg)) { + display_methods(); + exit(0); + } + for (i = 0; methods[i].method != NULL; i++) + if (strcaseeq(methods[i].method, optarg)) { + salt_prefix = methods[i].prefix; + salt_minlen = methods[i].minlen; + salt_maxlen = methods[i].maxlen; + rounds_support = methods[i].rounds; + break; + } + if (!salt_prefix) { + fprintf(stderr, _("Invalid method '%s'.\n"), optarg); + exit(1); + } + break; + case 'P': + { + char *p; + password_fd = strtol(optarg, &p, 10); + if (p == NULL || *p != '\0' || password_fd < 0) { + fprintf(stderr, _("Invalid number '%s'.\n"), optarg); + exit(1); + } + } + break; + case 'R': + { + char *p; + rounds = strtol(optarg, &p, 10); + if (p == NULL || *p != '\0' || rounds < 0) { + fprintf(stderr, _("Invalid number '%s'.\n"), optarg); + exit(1); + } + } + break; + case 's': + password_fd = 0; + break; + case 'S': + salt_arg = optarg; + break; + case 'V': + display_version(); + exit(0); + case 'h': + display_help(EXIT_SUCCESS); + default: + fprintf(stderr, _("Try '%s --help' for more information.\n"), + argv[0]); + exit(1); + } + } + argc -= optind; + argv += optind; + + if (argc == 2 && !salt_arg) { + password = argv[0]; + salt_arg = argv[1]; + } else if (argc == 1) { + password = argv[0]; + } else if (argc == 0) { + } else { + display_help(EXIT_FAILURE); + } + + /* default: DES password */ + if (!salt_prefix) { + salt_minlen = methods[0].minlen; + salt_maxlen = methods[0].maxlen; + salt_prefix = methods[0].prefix; + } + + if (streq(salt_prefix, "$2a$") || streq(salt_prefix, "$2y$")) { + /* OpenBSD Blowfish and derivatives */ + if (rounds <= 5) + rounds = 5; + /* actually for 2a/2y it is the logarithm of the number of rounds */ + snprintf(rounds_str, sizeof(rounds_str), "%02u$", rounds); + } else if (rounds_support && rounds) + snprintf(rounds_str, sizeof(rounds_str), "rounds=%u$", rounds); + else + rounds_str[0] = '\0'; + + if (salt_arg) { + unsigned int c = strlen(salt_arg); + if (c < salt_minlen || c > salt_maxlen) { + if (salt_minlen == salt_maxlen) + fprintf(stderr, ngettext( + "Wrong salt length: %d byte when %d expected.\n", + "Wrong salt length: %d bytes when %d expected.\n", c), + c, salt_maxlen); + else + fprintf(stderr, ngettext( + "Wrong salt length: %d byte when %d <= n <= %d" + " expected.\n", + "Wrong salt length: %d bytes when %d <= n <= %d" + " expected.\n", c), + c, salt_minlen, salt_maxlen); + exit(1); + } + while (c-- > 0) { + if (strchr(valid_salts, salt_arg[c]) == NULL) { + fprintf(stderr, _("Illegal salt character '%c'.\n"), + salt_arg[c]); + exit(1); + } + } + + salt = NOFAIL(malloc(strlen(salt_prefix) + strlen(rounds_str) + + strlen(salt_arg) + 1)); + *salt = '\0'; + strcat(salt, salt_prefix); + strcat(salt, rounds_str); + strcat(salt, salt_arg); + } else { +#ifdef HAVE_SOLARIS_CRYPT_GENSALT +#error "This code path is untested on Solaris. Please send a patch." + salt = crypt_gensalt(salt_prefix, NULL); + if (!salt) + perror(stderr, "crypt_gensalt"); +#elif defined HAVE_LINUX_CRYPT_GENSALT + void *entropy = get_random_bytes(64); + + salt = crypt_gensalt(salt_prefix, rounds, entropy, 64); + if (!salt) { + fprintf(stderr, "crypt_gensalt failed.\n"); + exit(2); + } + free(entropy); +#else + unsigned int salt_len = salt_maxlen; + + if (salt_minlen != salt_maxlen) { /* salt length can vary */ + srand(time(NULL) + getpid()); + salt_len = rand() % (salt_maxlen - salt_minlen + 1) + salt_minlen; + } + + salt = NOFAIL(malloc(strlen(salt_prefix) + strlen(rounds_str) + + salt_len + 1)); + *salt = '\0'; + strcat(salt, salt_prefix); + strcat(salt, rounds_str); + generate_salt(salt + strlen(salt), salt_len); +#endif + } + + if (password) { + } else if (password_fd != -1) { + FILE *fp; + char *p; + + if (isatty(password_fd)) + fprintf(stderr, _("Password: ")); + password = NOFAIL(malloc(128)); + fp = fdopen(password_fd, "r"); + if (!fp) { + perror("fdopen"); + exit(2); + } + if (!fgets(password, 128, fp)) { + perror("fgets"); + exit(2); + } + + p = strpbrk(password, "\n\r"); + if (p) + *p = '\0'; + } else { + password = getpass(_("Password: ")); + if (!password) { + perror("getpass"); + exit(2); + } + } + + { + const char *result; + result = crypt(password, salt); + /* xcrypt returns "*0" on errors */ + if (!result || result[0] == '*') { + fprintf(stderr, "crypt failed.\n"); + exit(2); + } + /* yes, using strlen(salt_prefix) on salt. It's not + * documented whether crypt_gensalt may change the prefix */ + if (!strneq(result, salt, strlen(salt_prefix))) { + fprintf(stderr, _("Method not supported by crypt(3).\n")); + exit(2); + } + printf("%s\n", result); + } + + exit(0); +} + +#ifdef RANDOM_DEVICE +void* get_random_bytes(const int count) +{ + char *buf; + int fd; + + buf = NOFAIL(malloc(count)); + fd = open(RANDOM_DEVICE, O_RDONLY); + if (fd < 0) { + perror("open(" RANDOM_DEVICE ")"); + exit(2); + } + if (read(fd, buf, count) != count) { + if (count < 0) + perror("read(" RANDOM_DEVICE ")"); + else + fprintf(stderr, "Short read of %s.\n", RANDOM_DEVICE); + exit(2); + } + close(fd); + + return buf; +} +#endif + +#ifdef RANDOM_DEVICE + +void generate_salt(char *const buf, const unsigned int len) +{ + unsigned int i; + + unsigned char *entropy = get_random_bytes(len * sizeof(unsigned char)); + for (i = 0; i < len; i++) + buf[i] = valid_salts[entropy[i] % (sizeof valid_salts - 1)]; + buf[i] = '\0'; +} + +#else /* RANDOM_DEVICE */ + +void generate_salt(char *const buf, const unsigned int len) +{ + unsigned int i; + +# ifdef HAVE_GETTIMEOFDAY + struct timeval tv; + + gettimeofday(&tv, NULL); + srand(tv.tv_sec ^ tv.tv_usec); + +# else /* HAVE_GETTIMEOFDAY */ +# warning "This system lacks a strong enough random numbers generator!" + + /* + * The possible values of time over one year are 31536000, which is + * two orders of magnitude less than the allowed entropy range (2^32). + */ + srand(time(NULL) + getpid()); + +# endif /* HAVE_GETTIMEOFDAY */ + + for (i = 0; i < len; i++) + buf[i] = valid_salts[rand() % (sizeof valid_salts - 1)]; + buf[i] = '\0'; +} + +#endif /* RANDOM_DEVICE */ + +void display_help(int error) +{ + fprintf((EXIT_SUCCESS == error) ? stdout : stderr, + _("Usage: mkpasswd [OPTIONS]... [PASSWORD [SALT]]\n" + "Crypts the PASSWORD using crypt(3).\n\n")); + fprintf(stderr, _( +" -m, --method=TYPE select method TYPE\n" +" -5 like --method=md5\n" +" -S, --salt=SALT use the specified SALT\n" +" -R, --rounds=NUMBER use the specified NUMBER of rounds\n" +" -P, --password-fd=NUM read the password from file descriptor NUM\n" +" instead of /dev/tty\n" +" -s, --stdin like --password-fd=0\n" +" -h, --help display this help and exit\n" +" -V, --version output version information and exit\n" +"\n" +"If PASSWORD is missing then it is asked interactively.\n" +"If no SALT is specified, a random one is generated.\n" +"If TYPE is 'help', available methods are printed.\n" +"\n" +"Report bugs to %s.\n"), ""); + exit(error); +} + +void display_version(void) +{ + printf("mkpasswd %s\n\n", VERSION); + puts("Copyright (C) 2001-2008 Marco d'Itri\n" +"This is free software; see the source for copying conditions. There is NO\n" +"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); +} + +void display_methods(void) +{ + unsigned int i; + + printf(_("Available methods:\n")); + for (i = 0; methods[i].method != NULL; i++) + printf("%s\t%s\n", methods[i].method, methods[i].desc); +} + diff --git a/package/mkpasswd/mkpasswd.mk b/package/mkpasswd/mkpasswd.mk new file mode 100644 index 0000000000..0447ecc9a0 --- /dev/null +++ b/package/mkpasswd/mkpasswd.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# mkpasswd +# +################################################################################ + +# source included in buildroot, taken from +# https://github.com/rfc1036/whois/blob/master/ +# at revision 5a0f08500fa51608b6d3b73ee338be38c692eadb +HOST_MKPASSWD_SOURCE = +HOST_MKPASSWD_LICENSE = GPLv2+ + +HOST_MKPASSWD_VERSION = buildroot-$(BR2_VERSION) + +define HOST_MKPASSWD_BUILD_CMDS + $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \ + package/mkpasswd/mkpasswd.c package/mkpasswd/utils.c \ + -o $(@D)/mkpasswd -lcrypt +endef + +define HOST_MKPASSWD_INSTALL_CMDS + $(INSTALL) -D -m 755 $(@D)/mkpasswd $(HOST_DIR)/usr/bin/mkpasswd +endef + +$(eval $(host-generic-package)) + +MKPASSWD = $(HOST_DIR)/usr/bin/mkpasswd diff --git a/package/mkpasswd/utils.c b/package/mkpasswd/utils.c new file mode 100644 index 0000000000..254bf2ac68 --- /dev/null +++ b/package/mkpasswd/utils.c @@ -0,0 +1,96 @@ +/* + * Copyright 1999-2008 by Marco d'Itri . + * + * do_nofail and merge_args come from the module-init-tools package. + * Copyright 2001 by Rusty Russell. + * Copyright 2002, 2003 by Rusty Russell, IBM Corporation. + * + * 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. + */ + +/* for strdup */ +#define _XOPEN_SOURCE 500 + +/* System library */ +#include +#include +#include +#include +#include + +/* Application-specific */ +#include "utils.h" + +void *do_nofail(void *ptr, const char *file, const int line) +{ + if (ptr) + return ptr; + + err_quit("Memory allocation failure at %s:%d.", file, line); +} + +/* Prepend options from a string. */ +char **merge_args(char *args, char *argv[], int *argc) +{ + char *arg, *argstring; + char **newargs = NULL; + unsigned int i, num_env = 0; + + if (!args) + return argv; + + argstring = NOFAIL(strdup(args)); + for (arg = strtok(argstring, " "); arg; arg = strtok(NULL, " ")) { + num_env++; + newargs = NOFAIL(realloc(newargs, + sizeof(newargs[0]) * (num_env + *argc + 1))); + newargs[num_env] = arg; + } + + if (!newargs) + return argv; + + /* Append commandline args */ + newargs[0] = argv[0]; + for (i = 1; i <= *argc; i++) + newargs[num_env + i] = argv[i]; + + *argc += num_env; + return newargs; +} + +/* Error routines */ +void err_sys(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + fprintf(stderr, ": %s\n", strerror(errno)); + va_end(ap); + exit(2); +} + +void err_quit(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + vfprintf(stderr, fmt, ap); + fputs("\n", stderr); + va_end(ap); + exit(2); +} + diff --git a/package/mkpasswd/utils.h b/package/mkpasswd/utils.h new file mode 100644 index 0000000000..0f226aee2f --- /dev/null +++ b/package/mkpasswd/utils.h @@ -0,0 +1,56 @@ +#ifndef WHOIS_UTILS_H +#define WHOIS_UTILS_H + +/* Convenience macros */ +#define streq(a, b) (strcmp(a, b) == 0) +#define strcaseeq(a, b) (strcasecmp(a, b) == 0) +#define strneq(a, b, n) (strncmp(a, b, n) == 0) +#define strncaseeq(a, b, n) (strncasecmp(a, b, n) == 0) + +#define NOFAIL(ptr) do_nofail((ptr), __FILE__, __LINE__) + +/* Portability macros */ +#ifdef __GNUC__ +# define NORETURN __attribute__((noreturn)) +#else +# define NORETURN +#endif + +#ifndef AI_IDN +# define AI_IDN 0 +#endif + +#ifndef AI_ADDRCONFIG +# define AI_ADDRCONFIG 0 +#endif + +#ifdef HAVE_GETOPT_LONG +# define GETOPT_LONGISH(c, v, o, l, i) getopt_long(c, v, o, l, i) +#else +# define GETOPT_LONGISH(c, v, o, l, i) getopt(c, v, o) +#endif + +#ifdef ENABLE_NLS +# include +# include +# define _(a) (gettext(a)) +# ifdef gettext_noop +# define N_(a) gettext_noop(a) +# else +# define N_(a) (a) +# endif +#else +# define _(a) (a) +# define N_(a) (a) +# define ngettext(a, b, c) ((c==1) ? (a) : (b)) +#endif + + +/* Prototypes */ +void *do_nofail(void *ptr, const char *file, const int line); +char **merge_args(char *args, char *argv[], int *argc); + +void err_quit(const char *fmt, ...) NORETURN; +void err_sys(const char *fmt, ...) NORETURN; + +#endif diff --git a/package/mkpimage/mkpimage.c b/package/mkpimage/mkpimage.c new file mode 100644 index 0000000000..1a7a66d988 --- /dev/null +++ b/package/mkpimage/mkpimage.c @@ -0,0 +1,287 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define VALIDATION_WORD 0x31305341 + +#define MAX_IMAGE_SIZE (60 * 1024 - 4) + +static int add_barebox_header; + +struct socfpga_header { + uint8_t validation_word[4]; + uint8_t version; + uint8_t flags; + uint8_t program_length[2]; + uint8_t spare[2]; + uint8_t checksum[2]; +}; + +static uint32_t bb_header[] = { + 0xea00007e, /* b 0x200 */ + 0xeafffffe, /* 1: b 1b */ + 0xeafffffe, /* 1: b 1b */ + 0xeafffffe, /* 1: b 1b */ + 0xeafffffe, /* 1: b 1b */ + 0xeafffffe, /* 1: b 1b */ + 0xeafffffe, /* 1: b 1b */ + 0xeafffffe, /* 1: b 1b */ + 0x65726162, /* 'bare' */ + 0x00786f62, /* 'box\0' */ + 0x00000000, /* padding */ + 0x00000000, /* padding */ + 0x00000000, /* padding */ + 0x00000000, /* padding */ + 0x00000000, /* padding */ + 0x00000000, /* padding */ + 0x00000000, /* socfpga header */ + 0x00000000, /* socfpga header */ + 0x00000000, /* socfpga header */ + 0xea00006b, /* entry. b 0x200 */ +}; + +static int read_full(int fd, void *buf, size_t size) +{ + size_t insize = size; + int now; + int total = 0; + + while (size) { + now = read(fd, buf, size); + if (now == 0) + return total; + if (now < 0) + return now; + total += now; + size -= now; + buf += now; + } + + return insize; +} + +static int write_full(int fd, void *buf, size_t size) +{ + size_t insize = size; + int now; + + while (size) { + now = write(fd, buf, size); + if (now <= 0) + return now; + size -= now; + buf += now; + } + + return insize; +} + +static uint32_t crc_table[256] = { + 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, + 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61, + 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7, + 0x4593e01e, 0x4152fda9, 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75, + 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3, + 0x709f7b7a, 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039, + 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, 0xbaea46ef, + 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d, + 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, 0xc7361b4c, 0xc3f706fb, + 0xceb42022, 0xca753d95, 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1, + 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0, + 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072, + 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, 0x054bf6a4, + 0x0808d07d, 0x0cc9cdca, 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde, + 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08, + 0x571d7dd1, 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba, + 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, 0xbb60adfc, + 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6, + 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, 0xe0b41de7, 0xe4750050, + 0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2, + 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34, + 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637, + 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x4f040d56, 0x4bc510e1, + 0x46863638, 0x42472b8f, 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53, + 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5, + 0x3f9b762c, 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff, + 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e, 0xf5ee4bb9, + 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b, + 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd, + 0xcda1f604, 0xc960ebb3, 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7, + 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71, + 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3, + 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x4e8ee645, 0x4a4ffbf2, + 0x470cdd2b, 0x43cdc09c, 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8, + 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e, + 0x18197087, 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec, + 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, 0x2056cd3a, + 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0, + 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, 0xe3a1cbc1, 0xe760d676, + 0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4, + 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662, + 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668, + 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4 +}; + +uint32_t crc32(uint32_t crc, void *_buf, int length) +{ + uint8_t *buf = _buf; + + while (length--) + crc = crc << 8 ^ crc_table[(crc >> 24 ^ *(buf++)) & 0xff]; + + return crc; +} + +static int add_socfpga_header(void *buf, int size) +{ + struct socfpga_header *header = buf + 0x40; + uint8_t *buf_header = buf + 0x40; + uint32_t *crc; + unsigned checksum; + int length = size >> 2; + int i; + + if (size & 0x3) { + fprintf(stderr, "%s: size must be multiple of 4\n", __func__); + return -EINVAL; + } + + header->validation_word[0] = VALIDATION_WORD & 0xff; + header->validation_word[1] = (VALIDATION_WORD >> 8) & 0xff; + header->validation_word[2] = (VALIDATION_WORD >> 16) & 0xff; + header->validation_word[3] = (VALIDATION_WORD >> 24) & 0xff; + header->version = 0; + header->flags = 0; + header->program_length[0] = length & 0xff; + header->program_length[1] = (length >> 8) & 0xff; + header->spare[0] = 0; + header->spare[1] = 0; + + checksum = 0; + for (i = 0; i < sizeof(*header) - 2; i++) + checksum += buf_header[i]; + + header->checksum[0] = checksum & 0xff;; + header->checksum[1] = (checksum >> 8) & 0xff;; + + crc = buf + size - sizeof(uint32_t); + + *crc = crc32(0xffffffff, buf, size - sizeof(uint32_t)); + *crc ^= 0xffffffff; + + return 0; +} + +static void usage(const char *prgname) +{ + fprintf(stderr, "usage: %s [OPTIONS] \n", prgname); +} + +int main(int argc, char *argv[]) +{ + int opt, ret; + const char *outfile = NULL, *infile; + struct stat s; + void *buf; + int fd; + int min_image_size = 80; + int max_image_size = MAX_IMAGE_SIZE; + int addsize = 0, pad; + + while ((opt = getopt(argc, argv, "o:hb")) != -1) { + switch (opt) { + case 'b': + add_barebox_header = 1; + min_image_size = 0; + max_image_size = MAX_IMAGE_SIZE - 512; + addsize = 512; + break; + case 'h': + usage(argv[0]); + exit(0); + case 'o': + outfile = optarg; + break; + default: + exit(1); + } + } + + if (optind == argc) { + usage(argv[0]); + exit(1); + } + + infile = argv[optind]; + + ret = stat(infile, &s); + if (ret) { + perror("stat"); + exit(1); + } + + if (s.st_size < min_image_size) { + fprintf(stderr, "input image too small. Minimum is 80 bytes\n"); + exit(1); + } + + if (s.st_size > max_image_size) { + fprintf(stderr, "input image too big. Maximum is %d bytes, got %ld bytes\n", + max_image_size, s.st_size); + exit(1); + } + + fd = open(infile, O_RDONLY); + if (fd < 0) { + perror("open infile"); + exit(1); + } + + pad = s.st_size & 0x3; + if (pad) + pad = 4 - pad; + + buf = calloc(s.st_size + 4 + addsize + pad, 1); + if (!buf) { + perror("malloc"); + exit(1); + } + + ret = read_full(fd, buf + addsize, s.st_size); + if (ret < 0) { + perror("read infile"); + exit(1); + } + + close(fd); + + if (add_barebox_header) { + memcpy(buf, bb_header, sizeof(bb_header)); + } + + ret = add_socfpga_header(buf, s.st_size + 4 + addsize + pad); + if (ret) + exit(1); + + fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (fd < 0) { + perror("open outfile"); + exit(1); + } + + ret = write_full(fd, buf, s.st_size + 4 + addsize + pad); + if (ret < 0) { + perror("write outfile"); + exit(1); + } + + exit(0); +} diff --git a/package/mkpimage/mkpimage.mk b/package/mkpimage/mkpimage.mk new file mode 100644 index 0000000000..6360902539 --- /dev/null +++ b/package/mkpimage/mkpimage.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# mkpimage +# +################################################################################ + +# source included in the package +# came from barebox's repository: +# http://git.pengutronix.de/?p=barebox.git;a=blob;f=scripts/socfpga_mkimage.c;h=1a7a66d98841e9f52c3ea49c651286aa1412c9a5;hb=HEAD +HOST_MKPIMAGE_SOURCE = +HOST_MKPIMAGE_LICENSE = GPLv2 + +define HOST_MKPIMAGE_BUILD_CMDS + $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) \ + package/mkpimage/mkpimage.c -o $(@D)/mkpimage +endef + +define HOST_MKPIMAGE_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/mkpimage $(HOST_DIR)/usr/bin/mkpimage +endef + +$(eval $(host-generic-package)) diff --git a/package/mmc-utils/0001-fix-mmc-h-includes.patch b/package/mmc-utils/0001-fix-mmc-h-includes.patch new file mode 100644 index 0000000000..8d0b2eb233 --- /dev/null +++ b/package/mmc-utils/0001-fix-mmc-h-includes.patch @@ -0,0 +1,41 @@ +mmc-utils: fix mmc.h includes + +Some toolchains include asm-generic/int-l64.h from their asm/types.h +file for certain 64-bit architectures. This causes a conflict between +types like this one: + +asm-generic/int-l64.h:28:25: error: conflicting types for '__s64' + typedef __signed__ long __s64; + ^ +In file included from mmc.h:17:0, + from mmc_cmds.c:30: +asm-generic/int-ll64.h:29:44: note: previous declaration of '__s64' was +here + __extension__ typedef __signed__ long long __s64; + +[Ryan: added include of linux/types.h because mmc/ioctl.h does not + include it in kernel version before 3.4] + +Signed-off-by: Vicente Olivert Riera +Signed-off-by: Ryan Barnett +--- + mmc.h | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) +diff --git a/mmc.h b/mmc.h +index 9871d62..2d54ec5 100644 +--- a/mmc.h ++++ b/mmc.h +@@ -14,9 +14,12 @@ + * Boston, MA 021110-1307, USA. + */ + +-#include ++#include + #include + #include ++#ifndef _ASM_GENERIC_INT_L64_H ++#include ++#endif + + #define CHECK(expr, msg, err_stmt) { if (expr) { fprintf(stderr, msg); err_stmt; } } + diff --git a/package/mmc-utils/Config.in b/package/mmc-utils/Config.in new file mode 100644 index 0000000000..850aeac445 --- /dev/null +++ b/package/mmc-utils/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_MMC_UTILS + bool "mmc-utils" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + help + MMC utils + + https://git.kernel.org/cgit/linux/kernel/git/cjb/mmc-utils.git + +comment "mmc-utils needs a toolchain w/ headers >= 3.0" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 diff --git a/package/mmc-utils/mmc-utils.mk b/package/mmc-utils/mmc-utils.mk new file mode 100644 index 0000000000..82468bcc28 --- /dev/null +++ b/package/mmc-utils/mmc-utils.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# mmc-utils +# +################################################################################ + +MMC_UTILS_VERSION = d0b46442b50794217e53b2455c1344c548d9d088 +MMC_UTILS_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git +MMC_UTILS_LICENSE = GPLv2 + +define MMC_UTILS_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define MMC_UTILS_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/mmc $(TARGET_DIR)/usr/bin/mmc +endef + +$(eval $(generic-package)) diff --git a/package/moarvm/Config.in b/package/moarvm/Config.in new file mode 100644 index 0000000000..3e0a1045ec --- /dev/null +++ b/package/moarvm/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_MOARVM + bool "moarvm" + depends on BR2_TOOLCHAIN_HAS_THREADS # libuv + depends on !BR2_STATIC_LIBS # libuv + depends on BR2_USE_MMU # libuv + depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS # libatomic_ops + # needs AO_fetch_compare_and_swap, not implemented for sparcv8/sparcv9 + depends on !BR2_sparc64 && !BR2_sparc + select BR2_PACKAGE_LIBUV + select BR2_PACKAGE_LIBTOMMATH + select BR2_PACKAGE_LIBATOMIC_OPS + help + Short for "Metamodel On A Runtime", MoarVM is a virtual machine + built especially for Rakudo Perl 6 and the NQP Compiler Toolchain. + + http://moarvm.com + +comment "moarvm needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on BR2_USE_MMU + depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS + depends on !BR2_sparc64 && !BR2_sparc + diff --git a/package/moarvm/moarvm.hash b/package/moarvm/moarvm.hash new file mode 100644 index 0000000000..f045f4fac7 --- /dev/null +++ b/package/moarvm/moarvm.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 6fe9000daada59535747f2557cc73573241ba8a6044271caf1647aa37be33c6d MoarVM-2016.04.tar.gz diff --git a/package/moarvm/moarvm.mk b/package/moarvm/moarvm.mk new file mode 100644 index 0000000000..ee58f76600 --- /dev/null +++ b/package/moarvm/moarvm.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# moarvm +# +################################################################################ + +MOARVM_VERSION = 2016.04 +MOARVM_SITE = http://moarvm.com/releases +MOARVM_SOURCE = MoarVM-$(MOARVM_VERSION).tar.gz +MOARVM_LICENSE = Artistic-2.0 +MOARVM_LICENSE_FILES = Artistic2.txt +MOARVM_INSTALL_STAGING = YES +MOARVM_DEPENDENCIES = host-luajit libuv libtommath libatomic_ops + +MOARVM_CONF_OPTS = \ + --build=$(GNU_HOST_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --ar="$(TARGET_AR)" \ + --cc="$(TARGET_CC)" \ + --ld="$(TARGET_CC)" \ + --prefix="/usr" \ + --lua=$(HOST_DIR)/usr/bin/luajit \ + --has-libuv \ + --has-libtommath \ + --has-libatomic + +ifeq ($(BR2_ENDIAN),"BIG") +MOARVM_CONF_OPTS += --big-endian +endif + +define MOARVM_CONFIGURE_CMDS + (cd $(@D); perl Configure.pl $(MOARVM_CONF_OPTS)) +endef + +define MOARVM_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define MOARVM_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install +endef + +define MOARVM_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/mobile-broadband-provider-info/Config.in b/package/mobile-broadband-provider-info/Config.in new file mode 100644 index 0000000000..dda71056e1 --- /dev/null +++ b/package/mobile-broadband-provider-info/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_MOBILE_BROADBAND_PROVIDER_INFO + bool "mobile-broadband-provider-info" + help + Mobile broadband provider database. + + http://live.gnome.org/NetworkManager/MobileBroadband/ServiceProviders diff --git a/package/mobile-broadband-provider-info/mobile-broadband-provider-info.hash b/package/mobile-broadband-provider-info/mobile-broadband-provider-info.hash new file mode 100644 index 0000000000..54c7a99d27 --- /dev/null +++ b/package/mobile-broadband-provider-info/mobile-broadband-provider-info.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/mobile-broadband-provider-info/20120614/mobile-broadband-provider-info-20120614.sha256sum +sha256 72507a732e0cd16cf27424bb094b1c7a03e2206c119ad124722a283e587755f1 mobile-broadband-provider-info-20120614.tar.xz diff --git a/package/mobile-broadband-provider-info/mobile-broadband-provider-info.mk b/package/mobile-broadband-provider-info/mobile-broadband-provider-info.mk new file mode 100644 index 0000000000..f2a113635b --- /dev/null +++ b/package/mobile-broadband-provider-info/mobile-broadband-provider-info.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# mobile-broadband-provider-info +# +################################################################################ + +MOBILE_BROADBAND_PROVIDER_INFO_VERSION = 20120614 +MOBILE_BROADBAND_PROVIDER_INFO_SITE = http://ftp.gnome.org/pub/GNOME/sources/mobile-broadband-provider-info/$(MOBILE_BROADBAND_PROVIDER_INFO_VERSION) +MOBILE_BROADBAND_PROVIDER_INFO_SOURCE = mobile-broadband-provider-info-$(MOBILE_BROADBAND_PROVIDER_INFO_VERSION).tar.xz +MOBILE_BROADBAND_PROVIDER_INFO_LICENSE = Public domain +MOBILE_BROADBAND_PROVIDER_INFO_LICENSE_FILES = COPYING +MOBILE_BROADBAND_PROVIDER_INFO_INSTALL_STAGING = YES +MOBILE_BROADBAND_PROVIDER_INFO_DEPENDENCIES = host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/modem-manager/Config.in b/package/modem-manager/Config.in new file mode 100644 index 0000000000..aa7ed1e2fa --- /dev/null +++ b/package/modem-manager/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_MODEM_MANAGER + bool "modemmanager" + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_USE_WCHAR # libglib2 and gnutls + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2 + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_DBUS_GLIB + select BR2_PACKAGE_LIBGUDEV + help + ModemManager is a DBus-activated daemon which controls mobile + broadband (2G/3G/4G) devices and connections. + + http://www.freedesktop.org/wiki/Software/ModemManager/ + +if BR2_PACKAGE_MODEM_MANAGER + +config BR2_PACKAGE_MODEM_MANAGER_LIBMBIM + bool "MBIM support" + select BR2_PACKAGE_LIBMBIM + help + This option enables support for MBIM protocol + +config BR2_PACKAGE_MODEM_MANAGER_LIBQMI + bool "QMI support" + select BR2_PACKAGE_LIBQMI + help + This option enables support for QMI protocol +endif + +comment "modemmanager needs udev /dev management and a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_PACKAGE_HAS_UDEV + depends on BR2_USE_MMU diff --git a/package/modem-manager/S44modem-manager b/package/modem-manager/S44modem-manager new file mode 100755 index 0000000000..cf6d89601d --- /dev/null +++ b/package/modem-manager/S44modem-manager @@ -0,0 +1,42 @@ +#!/bin/sh +# +# Starts ModemManager +# + +PIDFILE=/var/run/ModemManager.pid + +[ -x $MODEMMANAGER_BIN ] || exit 0 + +start() { + printf "Starting ModemManager: " + umask 077 + start-stop-daemon -S -q -b -m -p $PIDFILE \ + --exec /usr/sbin/ModemManager + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +stop() { + printf "Stopping ModemManager: " + start-stop-daemon -K -q -p $PIDFILE + [ $? = 0 ] && { echo "OK"; rm -f $PIDFILE; } || echo "FAIL" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $ret diff --git a/package/modem-manager/modem-manager.hash b/package/modem-manager/modem-manager.hash new file mode 100644 index 0000000000..5299c84e85 --- /dev/null +++ b/package/modem-manager/modem-manager.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 abe6cdd515a774bcba3afdcdb1e504569801e79282ccdf26099f33cbb8731ba2 ModemManager-1.4.14.tar.xz diff --git a/package/modem-manager/modem-manager.mk b/package/modem-manager/modem-manager.mk new file mode 100644 index 0000000000..6d91afcb82 --- /dev/null +++ b/package/modem-manager/modem-manager.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# modem-manager +# +################################################################################ + +MODEM_MANAGER_VERSION = 1.4.14 +MODEM_MANAGER_SOURCE = ModemManager-$(MODEM_MANAGER_VERSION).tar.xz +MODEM_MANAGER_SITE = http://www.freedesktop.org/software/ModemManager +MODEM_MANAGER_LICENSE = GPLv2+ (programs, plugins), LGPLv2+ (libmm-glib) +MODEM_MANAGER_LICENSE_FILES = COPYING +MODEM_MANAGER_DEPENDENCIES = host-pkgconf udev dbus-glib host-intltool libgudev +MODEM_MANAGER_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_MODEM_MANAGER_LIBQMI),y) +MODEM_MANAGER_DEPENDENCIES += libqmi +MODEM_MANAGER_CONF_OPTS += --with-qmi +else +MODEM_MANAGER_CONF_OPTS += --without-qmi +endif + +ifeq ($(BR2_PACKAGE_MODEM_MANAGER_LIBMBIM),y) +MODEM_MANAGER_DEPENDENCIES += libmbim +MODEM_MANAGER_CONF_OPTS += --with-mbim +else +MODEM_MANAGER_CONF_OPTS += --without-mbim +endif + +define MODEM_MANAGER_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/modem-manager/S44modem-manager \ + $(TARGET_DIR)/etc/init.d/S44modem-manager +endef + +$(eval $(autotools-package)) diff --git a/package/modplugtools/Config.in b/package/modplugtools/Config.in new file mode 100644 index 0000000000..89c32206fb --- /dev/null +++ b/package/modplugtools/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_MODPLUGTOOLS + bool "modplugtools" + depends on BR2_INSTALL_LIBSTDCPP # libmodplug + select BR2_PACKAGE_LIBAO + select BR2_PACKAGE_LIBMODPLUG + help + This installs the 'modplug123' command line tool to play music files + in the tracker formats supported by libmodplug: MOD, S3M, XM etc. + Audio output is handled by libao. + + http://modplug-xmms.sourceforge.net/ + +comment "modplugtools needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/modplugtools/modplugtools.hash b/package/modplugtools/modplugtools.hash new file mode 100644 index 0000000000..e29eda90e0 --- /dev/null +++ b/package/modplugtools/modplugtools.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 0122d44ea0513b928cf9d463acc886d08a2664579aa96ddeeb270d5c81193a4e modplugtools-0.5.3.tar.gz diff --git a/package/modplugtools/modplugtools.mk b/package/modplugtools/modplugtools.mk new file mode 100644 index 0000000000..e8d73afeff --- /dev/null +++ b/package/modplugtools/modplugtools.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# modplugtools +# +################################################################################ + +MODPLUGTOOLS_VERSION = 0.5.3 +MODPLUGTOOLS_SITE = http://downloads.sourceforge.net/project/modplug-xmms/modplug-tools +MODPLUGTOOLS_LICENSE = GPLv3 +MODPLUGTOOLS_LICENSE_FILES = COPYING + +MODPLUGTOOLS_DEPENDENCIES = libao libmodplug + +# Only build the 'mp123' subdir, which contains 'modplug123' that plays through +# various backends via libao. This excludes the 'mpplay' subdir, which contains +# 'modplugplay' that can play only through the deprecated OSS interface. +MODPLUGTOOLS_MAKE_OPTS = SUBDIRS=mp123 +MODPLUGTOOLS_INSTALL_TARGET_OPTS = SUBDIRS=mp123 DESTDIR=$(TARGET_DIR) install + +$(eval $(autotools-package)) diff --git a/package/mongodb/Config.in b/package/mongodb/Config.in new file mode 100644 index 0000000000..2f6876a199 --- /dev/null +++ b/package/mongodb/Config.in @@ -0,0 +1,29 @@ +# from src/mongo/platform/bits.h +config BR2_PACKAGE_MONGODB_ARCH_SUPPORTS + bool + # ARM needs LDREX/STREX, so ARMv6+ + default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5 + default y if BR2_aarch64 || BR2_i386 || BR2_powerpc64 || BR2_x86_64 + +config BR2_PACKAGE_MONGODB + bool "mongodb" + depends on BR2_PACKAGE_MONGODB_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_USES_GLIBC # needs glibc malloc_usable_size + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + help + MongoDB is a cross-platform document-oriented database (NoSQL). + + It uses JSON-like documents with dynamic schemas (BSON), making + the integration of data in certain types of applications easier + and faster. + + https://www.mongodb.org/ + +comment "mongodb needs a (e)glibc toolchain w/ wchar, threads, C++, gcc >= 4.8" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + depends on BR2_PACKAGE_MONGODB_ARCH_SUPPORTS diff --git a/package/mongodb/mongodb.hash b/package/mongodb/mongodb.hash new file mode 100644 index 0000000000..b01ad53ab5 --- /dev/null +++ b/package/mongodb/mongodb.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 4764945631bca4ac5c2b239e04e91db00e39716915204349170c37cb7897c564 mongodb-r3.3.4.tar.gz diff --git a/package/mongodb/mongodb.mk b/package/mongodb/mongodb.mk new file mode 100644 index 0000000000..f5b2c01db3 --- /dev/null +++ b/package/mongodb/mongodb.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# mongodb +# +################################################################################ + +MONGODB_VERSION_BASE = 3.3.4 +MONGODB_VERSION = r$(MONGODB_VERSION_BASE) +MONGODB_SITE = $(call github,mongodb,mongo,$(MONGODB_VERSION)) + +MONGODB_LICENSE = AGPLv3, Apache-2.0 +MONGODB_LICENSE_FILES = GNU-AGPL-3.0.txt APACHE-2.0.txt + +MONGODB_DEPENDENCIES = host-scons + +MONGODB_SCONS_TARGETS = mongod mongos + +MONGODB_SCONS_ENV = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" \ + -j"$(PARALLEL_JOBS)" + +MONGODB_SCONS_OPTS = --disable-warnings-as-errors + +# need to pass mongo version when not building from git repo +MONGODB_SCONS_OPTS += MONGO_VERSION=$(MONGODB_VERSION_BASE)- + +# WiredTiger database storage engine only supported on 64 bits +ifeq ($(BR2_ARCH_IS_64),y) +MONGODB_SCONS_OPTS += --wiredtiger=on +else +MONGODB_SCONS_OPTS += --wiredtiger=off +endif + +# JavaScript scripting engine and tcmalloc supported only on +# x86/x86-64 systems. Mongo target is a shell interface that +# depends on the javascript engine, so it will also only be +# built on x86/x86-64 systems. +ifeq ($(BR2_i386)$(BR2_x86_64),y) +MONGODB_SCONS_OPTS += --js-engine=mozjs --allocator=tcmalloc +MONGODB_SCONS_TARGETS += mongo +else +MONGODB_SCONS_OPTS += --js-engine=none --allocator=system +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +MONGODB_DEPENDENCIES += openssl +MONGODB_SCONS_OPTS += --ssl=SSL +endif + +define MONGODB_BUILD_CMDS + (cd $(@D); \ + $(SCONS) \ + $(MONGODB_SCONS_ENV) \ + $(MONGODB_SCONS_OPTS) \ + $(MONGODB_SCONS_TARGETS)) +endef + +define MONGODB_INSTALL_TARGET_CMDS + (cd $(@D); \ + $(SCONS) \ + $(MONGODB_SCONS_ENV) \ + $(MONGODB_SCONS_OPTS) \ + --prefix=$(TARGET_DIR)/usr \ + install) +endef + +$(eval $(generic-package)) diff --git a/package/mongoose/Config.in b/package/mongoose/Config.in new file mode 100644 index 0000000000..22b385d457 --- /dev/null +++ b/package/mongoose/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_MONGOOSE + bool "mongoose" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Mongoose is an embedded networking library, which can turn + anything into a web server + + https://github.com/cesanta/mongoose + +comment "mongoose needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/mongoose/mongoose.hash b/package/mongoose/mongoose.hash new file mode 100644 index 0000000000..c131e48c41 --- /dev/null +++ b/package/mongoose/mongoose.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 94b934da083afe8abb1c0af5abb8f25294050011793f048166b12f000f9433a0 mongoose-6.2.tar.gz diff --git a/package/mongoose/mongoose.mk b/package/mongoose/mongoose.mk new file mode 100644 index 0000000000..98f6525500 --- /dev/null +++ b/package/mongoose/mongoose.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# mongoose +# +################################################################################ + +MONGOOSE_VERSION = 6.2 +MONGOOSE_SITE = $(call github,cesanta,mongoose,$(MONGOOSE_VERSION)) +MONGOOSE_LICENSE = GPLv2 +MONGOOSE_LICENSE_FILES = LICENSE +MONGOOSE_INSTALL_STAGING = YES + +MONGOOSE_CFLAGS = $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -DMONGOOSE_NO_DL + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +MONGOOSE_DEPENDENCIES += openssl +# directly linked +MONGOOSE_CFLAGS += -DNS_ENABLE_SSL -lssl -lcrypto -lz +endif + +define MONGOOSE_BUILD_CMDS + $(TARGET_CC) -c $(@D)/mongoose.c $(MONGOOSE_CFLAGS) -o $(@D)/mongoose.o + $(TARGET_AR) rcs $(@D)/libmongoose.a $(@D)/mongoose.o +endef + +define MONGOOSE_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 644 $(@D)/libmongoose.a \ + $(STAGING_DIR)/usr/lib/libmongoose.a + $(INSTALL) -D -m 644 $(@D)/mongoose.h \ + $(STAGING_DIR)/usr/include/mongoose.h +endef + +$(eval $(generic-package)) diff --git a/package/mongrel2/0002-Do-not-run-tests.patch b/package/mongrel2/0002-Do-not-run-tests.patch new file mode 100644 index 0000000000..557c27edd8 --- /dev/null +++ b/package/mongrel2/0002-Do-not-run-tests.patch @@ -0,0 +1,43 @@ +From 3cbef2195533f357c8a80c2840108662461273b7 Mon Sep 17 00:00:00 2001 +From: Lionel Orry +Date: Wed, 27 Mar 2013 14:48:19 +0100 +Subject: [PATCH 4/4] Do not run tests. + +This patch is specific to cross-compiled environments and avoids running +the tests on the host. It is not meant to be applied upstream. + +Signed-off-by: Lionel Orry +--- + Makefile | 2 +- + tools/m2sh/Makefile | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 7dc4089..ca72630 100644 +--- a/Makefile ++++ b/Makefile +@@ -16,7 +16,7 @@ TEST_SRC=$(wildcard tests/*_tests.c) + TESTS=$(patsubst %.c,%,${TEST_SRC}) + MAKEOPTS=OPTFLAGS="${NOEXTCFLAGS} ${OPTFLAGS}" OPTLIBS="${OPTLIBS}" LIBS="${LIBS}" DESTDIR="${DESTDIR}" PREFIX="${PREFIX}" + +-all: bin/mongrel2 tests m2sh procer ++all: bin/mongrel2 m2sh procer filters config_modules + + dev: CFLAGS=-g -Wall -Isrc -Wall -Wextra $(OPTFLAGS) -D_FILE_OFFSET_BITS=64 + dev: all +diff --git a/tools/m2sh/Makefile b/tools/m2sh/Makefile +index b50d8a0..334e4da 100644 +--- a/tools/m2sh/Makefile ++++ b/tools/m2sh/Makefile +@@ -9,7 +9,7 @@ TESTS=$(patsubst %.c,%,${TEST_SRC}) + LIB_SRC=$(filter-out src/m2sh.c,${SOURCES}) + LIB_OBJ=$(filter-out src/m2sh.o,${OBJECTS}) + +-all: ../lemon/lemon tests build/m2sh ++all: ../lemon/lemon build/m2sh + + dev: CFLAGS=-g -Wall -Wextra -Isrc -I../../src $(OPTFLAGS) + dev: all +-- +1.8.1.4 + diff --git a/package/mongrel2/0003-Fix-Makefiles-for-cross-compilation.patch b/package/mongrel2/0003-Fix-Makefiles-for-cross-compilation.patch new file mode 100644 index 0000000000..730d8ebfc0 --- /dev/null +++ b/package/mongrel2/0003-Fix-Makefiles-for-cross-compilation.patch @@ -0,0 +1,75 @@ +From 298356c44a7df2b34c4e307c531d2010e2cb4b79 Mon Sep 17 00:00:00 2001 +From: Lionel Orry +Date: Wed, 27 Mar 2013 15:56:56 +0100 +Subject: [PATCH 1/1] Fix Makefiles for cross-compilation + +The CFLAGS handling in mongrel2 is really messy and it is hard to make +it behave correctly with cross-compiling environments. This patch +restricts the Makefiles syntax to GNU Make, but help cross-compiling. + +This is not meant to be applied upstream. + +Signed-off-by: Lionel Orry +--- + Makefile | 2 +- + tools/config_modules/Makefile | 2 +- + tools/filters/Makefile | 2 +- + tools/m2sh/Makefile | 2 +- + tools/procer/Makefile | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/Makefile b/Makefile +index 6dce4a6..d48e05e 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS=-g -O2 -Wall -Wextra -Isrc -Isrc/polarssl/include -pthread -rdynamic -DNDEBUG $(OPTFLAGS) -D_FILE_OFFSET_BITS=64 ++override CFLAGS += -g -O2 -Wall -Wextra -Isrc -Isrc/polarssl/include -pthread -rdynamic -DNDEBUG $(OPTFLAGS) -D_FILE_OFFSET_BITS=64 + LIBS=-lzmq -ldl -lsqlite3 $(OPTLIBS) + PREFIX?=/usr/local + +diff --git a/tools/config_modules/Makefile b/tools/config_modules/Makefile +index 398490c..53f2255 100644 +--- a/tools/config_modules/Makefile ++++ b/tools/config_modules/Makefile +@@ -1,5 +1,5 @@ + PREFIX?=/usr/local +-CFLAGS=-I../../src -I../../src/polarssl/include $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build ++override CFLAGS += -I../../src -I../../src/polarssl/include $(OPTFLAGS) -fPIC -shared -nostartfiles -L../../build + LDFLAGS=$(OPTLIBS) + + MONGO_SRC = mongo-c-driver/src/bson.c \ +diff --git a/tools/filters/Makefile b/tools/filters/Makefile +index f9f4556..6077b79 100644 +--- a/tools/filters/Makefile ++++ b/tools/filters/Makefile +@@ -1,5 +1,5 @@ + PREFIX?=/usr/local +-CFLAGS=-I../../src -I../../src/polarssl/include $(OPTFLAGS) -g -fPIC -shared -nostartfiles -L../../build ++ override CFLAGS += -I../../src -I../../src/polarssl/include $(OPTFLAGS) -g -fPIC -shared -nostartfiles -L../../build + LDFLAGS=$(OPTLIBS) + + all: null.so +diff --git a/tools/m2sh/Makefile b/tools/m2sh/Makefile +index b50d8a0..ba378c5 100644 +--- a/tools/m2sh/Makefile ++++ b/tools/m2sh/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS=-DNDEBUG -DNO_LINENOS -pthread -g -I../../src -Isrc -Wall $(OPTFLAGS) ++override CFLAGS += -DNDEBUG -DNO_LINENOS -pthread -g -I../../src -Isrc -Wall $(OPTFLAGS) + LIBS=-lzmq -lsqlite3 ../../build/libm2.a $(OPTLIBS) + + PREFIX?=/usr/local +diff --git a/tools/procer/Makefile b/tools/procer/Makefile +index d0d7de0..629b2e9 100644 +--- a/tools/procer/Makefile ++++ b/tools/procer/Makefile +@@ -1,4 +1,4 @@ +-CFLAGS=-DNDEBUG -pthread -g -I../../src -Wall $(OPTFLAGS) ++override CFLAGS += -DNDEBUG -pthread -g -I../../src -Wall $(OPTFLAGS) + PREFIX?=/usr/local + LIBS?=-lzmq + SOURCES=$(wildcard *.c) +-- +1.8.1.4 + diff --git a/package/mongrel2/0004-Rename-symbol-to-prevent-conflict.patch b/package/mongrel2/0004-Rename-symbol-to-prevent-conflict.patch new file mode 100644 index 0000000000..83698164fd --- /dev/null +++ b/package/mongrel2/0004-Rename-symbol-to-prevent-conflict.patch @@ -0,0 +1,45 @@ +From 8d0bc79f38913b1a55e7d151b32bbc9462c24b47 Mon Sep 17 00:00:00 2001 +From: Jason Miller +Date: Fri, 14 Aug 2015 19:03:09 -0700 +Subject: [PATCH] Rename symbol to prevent conflict + +One of the standard headers defines max_align_t on some versions of linux. + +[Backported from upstream commit +https://github.com/mongrel2/mongrel2/commit/563bac8c59b9b32205164d237cf1ec0cb48d189f.] + +Signed-off-by: Rodrigo Rebello +--- + src/mem/align.h | 2 +- + src/mem/halloc.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/mem/align.h b/src/mem/align.h +index 4c6e183..03a4999 100644 +--- a/src/mem/align.h ++++ b/src/mem/align.h +@@ -30,7 +30,7 @@ union max_align + void (*q)(void); + }; + +-typedef union max_align max_align_t; ++typedef union max_align h_max_align_t; + + #endif + +diff --git a/src/mem/halloc.c b/src/mem/halloc.c +index b097d1f..40d0c09 100644 +--- a/src/mem/halloc.c ++++ b/src/mem/halloc.c +@@ -34,7 +34,7 @@ typedef struct hblock + #endif + hlist_item_t siblings; /* 2 pointers */ + hlist_head_t children; /* 1 pointer */ +- max_align_t data[1]; /* not allocated, see below */ ++ h_max_align_t data[1]; /* not allocated, see below */ + + } hblock_t; + +-- +2.1.4 + diff --git a/package/mongrel2/Config.in b/package/mongrel2/Config.in new file mode 100644 index 0000000000..49dd6fd97d --- /dev/null +++ b/package/mongrel2/Config.in @@ -0,0 +1,33 @@ +# mongrel2 uses {get,make,swap}context() functions, which are +# available in glibc for all architectures and in uClibc only for a +# subset of the architectures +config BR2_PACKAGE_MONGREL2_LIBC_SUPPORTS + bool + default y if BR2_TOOLCHAIN_USES_GLIBC + default y if BR2_TOOLCHAIN_USES_UCLIBC && \ + (BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || BR2_x86_64) + +comment "mongrel2 needs a uClibc or glibc toolchain w/ C++, threads, wchar, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \ + BR2_STATIC_LIBS || !BR2_PACKAGE_MONGREL2_LIBC_SUPPORTS + +config BR2_PACKAGE_MONGREL2 + bool "mongrel2" + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_ZEROMQ + depends on BR2_INSTALL_LIBSTDCPP # zeromq + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + depends on BR2_USE_WCHAR # zeromq -> util-linux + depends on !BR2_STATIC_LIBS # uses dlopen() + depends on BR2_PACKAGE_MONGREL2_LIBC_SUPPORTS + help + Mongrel2 is an application, language, and network architecture + agnostic web server that focuses on web applications using + modern browser technologies. + + Mongrel2 supports 17 languages and platforms, HTTP, Flash + sockets, WebSockets, Long Polling, and many ways to deploy + and hack on it. + + http://www.mongrel2.org diff --git a/package/mongrel2/mongrel2.hash b/package/mongrel2/mongrel2.hash new file mode 100644 index 0000000000..b8f8de3d76 --- /dev/null +++ b/package/mongrel2/mongrel2.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 543553c3082f2b992649a975f6cb7324ae2aea93af05288ea4f2c1262a7f63b2 mongrel2-v1.9.2.tar.bz2 diff --git a/package/mongrel2/mongrel2.mk b/package/mongrel2/mongrel2.mk new file mode 100644 index 0000000000..d0640c9680 --- /dev/null +++ b/package/mongrel2/mongrel2.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# mongrel2 +# +################################################################################ + +MONGREL2_VERSION = 1.9.2 +MONGREL2_SOURCE = mongrel2-v$(MONGREL2_VERSION).tar.bz2 +# Do not use the github helper here, the generated tarball is *NOT* the same +# as the one uploaded by upstream for the release. +MONGREL2_SITE = https://github.com/mongrel2/mongrel2/releases/download/$(MONGREL2_VERSION) +MONGREL2_LICENSE = BSD-3c +MONGREL2_LICENSE_FILES = LICENSE +MONGREL2_DEPENDENCIES = sqlite zeromq + +define MONGREL2_POLARSSL_DISABLE_ASM + $(SED) '/^#define POLARSSL_HAVE_ASM/d' $(@D)/src/polarssl/include/polarssl/config.h +endef + +# ARM in thumb mode breaks debugging with asm optimizations +# Microblaze asm optimizations are broken in general +# MIPS R6 asm is not yet supported +ifeq ($(BR2_ENABLE_DEBUG)$(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_ARM_INSTRUCTIONS_THUMB2),yy) +MONGREL2_POST_CONFIGURE_HOOKS += MONGREL2_POLARSSL_DISABLE_ASM +else ifeq ($(BR2_microblaze),y) +MONGREL2_POST_CONFIGURE_HOOKS += MONGREL2_POLARSSL_DISABLE_ASM +else ifeq ($(BR2_mips_32r6)$(BR2_mips_64r6),y) +MONGREL2_POST_CONFIGURE_HOOKS += MONGREL2_POLARSSL_DISABLE_ASM +endif + +define MONGREL2_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + PREFIX=/usr all +endef + +define MONGREL2_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + PREFIX=/usr DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/monit/0001-no-force-static.patch b/package/monit/0001-no-force-static.patch new file mode 100644 index 0000000000..edb619b541 --- /dev/null +++ b/package/monit/0001-no-force-static.patch @@ -0,0 +1,20 @@ +Do not force building a statically-linked binary + +Statically-linked binary do not work well with glibc, because it +still dlopen()s the NSS libraries. + +Reported-by: Peter Kümmel +Signed-off-by: "Yann E. MORIN" + +diff -durN monit-5.7.orig/Makefile.am monit-5.7/Makefile.am +--- monit-5.7.orig/Makefile.am 2014-02-20 09:00:42.000000000 +0100 ++++ monit-5.7/Makefile.am 2014-09-05 12:49:43.711104001 +0200 +@@ -85,7 +85,7 @@ + src/process/sysdep_@ARCH@.c + + monit_LDADD = libmonit/libmonit.la +-monit_LDFLAGS = -static $(EXTLDFLAGS) ++monit_LDFLAGS = $(EXTLDFLAGS) + + man_MANS = monit.1 + diff --git a/package/monit/Config.in b/package/monit/Config.in new file mode 100644 index 0000000000..9f80858f8a --- /dev/null +++ b/package/monit/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_MONIT + bool "monit" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Monit is a free open source utility for managing and + monitoring, processes, programs, files, directories and + filesystems on a UNIX system. Monit conducts automatic + maintenance and repair and can execute meaningful causal + actions in error situations. + + http://mmonit.com/monit/ + +comment "monit needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/monit/monit.hash b/package/monit/monit.hash new file mode 100644 index 0000000000..04f87901eb --- /dev/null +++ b/package/monit/monit.hash @@ -0,0 +1,2 @@ +# From https://mmonit.com/monit/dist/monit-5.17.tar.gz.sha256: +sha256 2fbcdea79ae39228791a0aaa685ebbf650f2b58d086eaf77a33226e972cb216e monit-5.17.tar.gz diff --git a/package/monit/monit.mk b/package/monit/monit.mk new file mode 100644 index 0000000000..1d5904b64d --- /dev/null +++ b/package/monit/monit.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# monit +# +################################################################################ + +MONIT_VERSION = 5.17 +MONIT_SITE = http://mmonit.com/monit/dist +MONIT_LICENSE = AGPLv3 with OpenSSL exception +MONIT_LICENSE_FILES = COPYING +# +# Touching Makefile.am: +MONIT_AUTORECONF = YES + +MONIT_CONF_ENV = \ + libmonit_cv_setjmp_available=yes \ + libmonit_cv_vsnprintf_c99_conformant=yes + +MONIT_CONF_OPTS += \ + --without-pam \ + --with-largefiles + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +MONIT_CONF_OPTS += --with-ssl=$(STAGING_DIR)/usr +MONIT_DEPENDENCIES += openssl +else +MONIT_CONF_OPTS += --without-ssl +endif + +$(eval $(autotools-package)) diff --git a/package/monkey/Config.in b/package/monkey/Config.in new file mode 100644 index 0000000000..001c415351 --- /dev/null +++ b/package/monkey/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_MONKEY + bool "monkey" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # dlopen() + depends on BR2_USE_MMU # fork() + help + Monkey Server is a fast and lightweight web server for Linux platforms. + + http://monkey-project.com/ + +if BR2_PACKAGE_MONKEY + +config BR2_PACKAGE_MONKEY_SHARED + bool "install shared library" + help + Build Monkey as a shared library in addition to stand-alone + server + +endif + +comment "monkey needs an toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/monkey/monkey.hash b/package/monkey/monkey.hash new file mode 100644 index 0000000000..6c7eada8c0 --- /dev/null +++ b/package/monkey/monkey.hash @@ -0,0 +1,3 @@ +# md5 from http://monkey-project.com/releases/1.5/monkey-1.5.6.tar.gz.md5, sha256 locally computed: +md5 9699e4c9ea6ce6b989907c252ae80254 monkey-1.5.6.tar.gz +sha256 7c3d845306aa74ee6effd7ab6169d16ac4e6450e564954d0d0baa2d1e9be1a22 monkey-1.5.6.tar.gz diff --git a/package/monkey/monkey.mk b/package/monkey/monkey.mk new file mode 100644 index 0000000000..02c26c99f4 --- /dev/null +++ b/package/monkey/monkey.mk @@ -0,0 +1,68 @@ +################################################################################ +# +# monkey +# +################################################################################ + +MONKEY_VERSION_MAJOR = 1.5 +MONKEY_VERSION = $(MONKEY_VERSION_MAJOR).6 +MONKEY_SITE = http://monkey-project.com/releases/$(MONKEY_VERSION_MAJOR) +MONKEY_LICENSE = Apache-2.0 +MONKEY_LICENSE_FILES = LICENSE + +# This package has a configure script, but it's not using +# autoconf/automake, so we're using the generic-package +# infrastructure. + +MONKEY_CONF_OPTS = \ + --prefix=/usr \ + --sysconfdir=/etc/monkey \ + --datadir=/var/www \ + --mandir=/usr/share/man \ + --logdir=/var/log \ + --pidfile=/var/run \ + --plugdir=/usr/lib/monkey \ + --malloc-libc + +# --uclib-mode is not a typo +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +MONKEY_CONF_OPTS += --uclib-mode --no-backtrace +endif + +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +MONKEY_CONF_OPTS += --musl-mode --no-backtrace +endif + +ifeq ($(BR2_PACKAGE_MONKEY_SHARED),y) +MONKEY_CONF_OPTS += --enable-shared +MONKEY_INSTALL_STAGING = YES +else +# Even without --enable-shared, the monkey build system leaves a +# broken libmonkey.so symbolic link. +define MONKEY_REMOVE_DANGLING_SYMLINK + $(RM) -f $(TARGET_DIR)/usr/lib/libmonkey.so +endef +MONKEY_POST_INSTALL_TARGET_HOOKS += MONKEY_REMOVE_DANGLING_SYMLINK +endif + +ifeq ($(BR2_ENABLE_DEBUG),y) +MONKEY_CONF_OPTS += --debug +endif + +define MONKEY_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure $(MONKEY_CONF_OPTS)) +endef + +define MONKEY_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define MONKEY_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install +endef + +define MONKEY_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/mono-gtksharp3/Config.in b/package/mono-gtksharp3/Config.in new file mode 100644 index 0000000000..570b62c3c9 --- /dev/null +++ b/package/mono-gtksharp3/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_MONO_GTKSHARP3 + bool "gtk# 3" + depends on BR2_PACKAGE_LIBGTK3 + help + Gtk# is a .NET language binding for the GTK+ toolkit. + This package provides version 3 of the bindings. + + http://www.mono-project.com/docs/gui/gtksharp/ diff --git a/package/mono-gtksharp3/mono-gtksharp3.hash b/package/mono-gtksharp3/mono-gtksharp3.hash new file mode 100644 index 0000000000..4005051b10 --- /dev/null +++ b/package/mono-gtksharp3/mono-gtksharp3.hash @@ -0,0 +1,2 @@ +# sha256 from https://download.gnome.org/sources/gtk-sharp/2.99/gtk-sharp-2.99.3.sha256sum +sha256 6440f571416267ae0cb5698071d087b31e3084693fa2c829b1db37ca7ea2c3a2 gtk-sharp-2.99.3.tar.xz diff --git a/package/mono-gtksharp3/mono-gtksharp3.mk b/package/mono-gtksharp3/mono-gtksharp3.mk new file mode 100644 index 0000000000..cccfcde126 --- /dev/null +++ b/package/mono-gtksharp3/mono-gtksharp3.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# gtksharp3 +# +################################################################################ + +MONO_GTKSHARP3_VERSION_MAJOR = 2.99 +MONO_GTKSHARP3_VERSION = $(MONO_GTKSHARP3_VERSION_MAJOR).3 +MONO_GTKSHARP3_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/$(MONO_GTKSHARP3_VERSION_MAJOR) +MONO_GTKSHARP3_SOURCE = gtk-sharp-$(MONO_GTKSHARP3_VERSION).tar.xz +MONO_GTKSHARP3_LICENSE = LGPLv2, MIT (cairo) +MONO_GTKSHARP3_LICENSE_FILES = COPYING +MONO_GTKSHARP3_INSTALL_STAGING = YES +MONO_GTKSHARP3_DEPENDENCIES = mono libgtk3 +MONO_GTKSHARP3_CONF_OPTS += CSC=$(HOST_DIR)/usr/bin/mcs + +$(eval $(autotools-package)) diff --git a/package/mono/0001-Disable-backtrace-on-not-supported-uclibc.patch b/package/mono/0001-Disable-backtrace-on-not-supported-uclibc.patch new file mode 100644 index 0000000000..7bc7384ad0 --- /dev/null +++ b/package/mono/0001-Disable-backtrace-on-not-supported-uclibc.patch @@ -0,0 +1,27 @@ +From 5232ec11c74eb49fb220a7e2df80e46ac621e941 Mon Sep 17 00:00:00 2001 +From: Angelo Compagnucci +Date: Sat, 7 Feb 2015 09:49:37 +0100 +Subject: [PATCH] Disable backtrace on not supported uclibc + +Signed-off-by: Angelo Compagnucci +Signed-off-by: Thomas Petazzoni +--- + libgc/include/gc.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgc/include/gc.h b/libgc/include/gc.h +index 2265fdb..6485fc0 100644 +--- a/libgc/include/gc.h ++++ b/libgc/include/gc.h +@@ -500,7 +500,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb)); + #if defined(__linux__) || defined(__GLIBC__) + # include + # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \ +- && !defined(__ia64__) ++ && !defined(__ia64__) && !defined(__UCLIBC__) + # ifndef GC_HAVE_BUILTIN_BACKTRACE + # define GC_HAVE_BUILTIN_BACKTRACE + # endif +-- +2.1.0 + diff --git a/package/mono/0002-Adjust-libc.so-path-depending-on-C-library-being-use.patch b/package/mono/0002-Adjust-libc.so-path-depending-on-C-library-being-use.patch new file mode 100644 index 0000000000..4c1d522429 --- /dev/null +++ b/package/mono/0002-Adjust-libc.so-path-depending-on-C-library-being-use.patch @@ -0,0 +1,34 @@ +From 6f8346438e0257259867b5dca6bb6db54eb96705 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 7 Feb 2015 09:50:24 +0100 +Subject: [PATCH] Adjust libc.so path depending on C library being used + +By default, on Linux systems, Mono assumes that the C library is +libc.so.6. While this is true for glibc, it is not true for uClibc and +Musl based systems. This patch adds support for such systems. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 5d9961a..f6a7909 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2978,6 +2978,12 @@ case "$host" in + SQLITE="libsqlite.so" + SQLITE3="libsqlite3.so" + ;; ++ *-*-*uclibc*) ++ LIBC="libc.so.0" ++ ;; ++ *-*-*musl*) ++ LIBC="libc.so" ++ ;; + *-*-*linux*) + AC_PATH_X + dlsearch_path=`(libtool --config ; echo eval echo \\$sys_lib_dlsearch_path_spec) | sh` +-- +2.1.0 + diff --git a/package/mono/0004-fixing-initialization-of-have-vasprintf.patch b/package/mono/0004-fixing-initialization-of-have-vasprintf.patch new file mode 100644 index 0000000000..55648593a5 --- /dev/null +++ b/package/mono/0004-fixing-initialization-of-have-vasprintf.patch @@ -0,0 +1,29 @@ +From 1c3d615d93b20d10c2729478d5104977dd9af23f Mon Sep 17 00:00:00 2001 +From: Angelo Compagnucci +Date: Wed, 5 Aug 2015 12:59:45 +0200 +Subject: [PATCH] Fixing initialization of have_vasprintf + +This patch initialize properly have_vasprintf in case vasprint function is found. +Solves multiple definition of `vasprintf' error in case vasprint is not properly detected. + +Patch is upstream: + + https://github.com/mono/mono/commit/40c171799b671718969ee28a02f92884d7fd181e + +Signed-off-by: Angelo Compagnucci +--- + eglib/configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/eglib/configure.ac b/eglib/configure.ac +index 5281419..4bf91e5 100644 +--- a/eglib/configure.ac ++++ b/eglib/configure.ac +@@ -135,6 +135,7 @@ AC_CHECK_SIZEOF(void *) + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(long long) + AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf) ++AC_CHECK_FUNC(vasprintf, have_vasprintf=yes) + AC_CHECK_FUNCS(getrlimit) + + # diff --git a/package/mono/0005-eglib-checking-for-locale_charset-function.patch b/package/mono/0005-eglib-checking-for-locale_charset-function.patch new file mode 100644 index 0000000000..52d5638451 --- /dev/null +++ b/package/mono/0005-eglib-checking-for-locale_charset-function.patch @@ -0,0 +1,28 @@ +From 026a8c44d332b3595814ce0aceba255467cd7b6d Mon Sep 17 00:00:00 2001 +From: Angelo Compagnucci +Date: Sat, 5 Sep 2015 08:57:21 +0200 +Subject: [PATCH] eglib: checking for locale_charset function + +This patch checks if locale_charset function is availabe in +libiconv or libcharset and changes the linking options accordingly. + +Signed-off-by: Angelo Compagnucci +--- + eglib/configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/eglib/configure.ac b/eglib/configure.ac +index 9d094ea..5ea220e 100644 +--- a/eglib/configure.ac ++++ b/eglib/configure.ac +@@ -182,6 +182,7 @@ fi + AC_SUBST(G_HAVE_ISO_VARARGS) + + AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h sys/resource.h) ++AC_CHECK_LIB([iconv], [locale_charset],[],[AC_CHECK_LIB([charset], [locale_charset],[LIBS+="-liconv -lcharset"])]) + AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0]) + AC_SUBST(HAVE_ALLOCA_H) + +-- +1.9.1 + diff --git a/package/mono/0006-Remove-unit-tests-from-mono-compilation.patch b/package/mono/0006-Remove-unit-tests-from-mono-compilation.patch new file mode 100644 index 0000000000..3714b65821 --- /dev/null +++ b/package/mono/0006-Remove-unit-tests-from-mono-compilation.patch @@ -0,0 +1,29 @@ +From 155f96953d1b898f04a4e708c9ebc1e450b2f63e Mon Sep 17 00:00:00 2001 +From: Angelo Compagnucci +Date: Tue, 24 Nov 2015 23:11:10 +0100 +Subject: [PATCH] Remove unit-tests from mono compilation + +This patch fixes compiling errors with unit-tests under linux. + +Signed-off-by: Angelo Compagnucci +--- + mono/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mono/Makefile.am b/mono/Makefile.am +index ef41dfe..7129507 100644 +--- a/mono/Makefile.am ++++ b/mono/Makefile.am +@@ -30,7 +30,7 @@ monotouch-do-clean: + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$target); \ + done; + else +-SUBDIRS = arch utils io-layer cil metadata $(sgen_dirs) mini dis tests unit-tests benchmark profiler ++SUBDIRS = arch utils io-layer cil metadata $(sgen_dirs) mini dis tests benchmark profiler + endif + endif +-DIST_SUBDIRS = arch utils io-layer cil metadata $(sgen_dirs) mini dis tests unit-tests benchmark profiler ++DIST_SUBDIRS = arch utils io-layer cil metadata $(sgen_dirs) mini dis tests benchmark profiler +-- +1.9.1 + diff --git a/package/mono/0007-config.in-fixing-wrong-MonoPosixHelper-location.patch b/package/mono/0007-config.in-fixing-wrong-MonoPosixHelper-location.patch new file mode 100644 index 0000000000..6ebb802adf --- /dev/null +++ b/package/mono/0007-config.in-fixing-wrong-MonoPosixHelper-location.patch @@ -0,0 +1,28 @@ +From 76aa4fb62a433e61dc35eefcc3077f0463182d2f Mon Sep 17 00:00:00 2001 +From: Angelo Compagnucci +Date: Tue, 23 Feb 2016 22:43:39 +0100 +Subject: [PATCH] config.in: fixing wrong MonoPosixHelper location + +This patch remove a wrong prefix for libMonoPosixHelper + +Signed-off-by: Angelo Compagnucci +--- + data/config.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/data/config.in b/data/config.in +index b760176..41495b9 100644 +--- a/data/config.in ++++ b/data/config.in +@@ -10,7 +10,7 @@ + + + +- ++ + + + +-- +1.9.1 + diff --git a/package/mono/0008-monodoc-Fixing-wrong-monodoc-search-path.patch b/package/mono/0008-monodoc-Fixing-wrong-monodoc-search-path.patch new file mode 100644 index 0000000000..58fa3238d3 --- /dev/null +++ b/package/mono/0008-monodoc-Fixing-wrong-monodoc-search-path.patch @@ -0,0 +1,29 @@ +From 18bba65adf58d54645398de26eac24081d48f793 Mon Sep 17 00:00:00 2001 +From: Angelo Compagnucci +Date: Thu, 25 Feb 2016 22:19:31 +0100 +Subject: [PATCH] mcs/class/monodoc/Makefile: Fixing wrong monodoc search path + +mono_libdir actually leaks host compiler path, fixing +by hardcoding correct path for our usecase. + +Signed-off-by: Angelo Compagnucci +--- + mcs/class/monodoc/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mcs/class/monodoc/Makefile b/mcs/class/monodoc/Makefile +index 3ebba80..ddc2098 100644 +--- a/mcs/class/monodoc/Makefile ++++ b/mcs/class/monodoc/Makefile +@@ -135,7 +135,7 @@ test-local: setup-doc-sources + dist-local: Monodoc.Ecma/EcmaUrlParser.cs + + $(the_lib).config: Makefile monodoc.dll.config.in +- sed 's,@monodoc_refdir@,$(mono_libdir)/monodoc,g' monodoc.dll.config.in > $@ ++ sed 's,@monodoc_refdir@,/usr/lib/monodoc,g' monodoc.dll.config.in > $@ + + Monodoc.Ecma/EcmaUrlParser.cs: Monodoc.Ecma/EcmaUrlParser.jay $(topdir)/jay/skeleton.cs jay.sh + $(topdir)/$(thisdir)/jay.sh $(topdir) $< $@ $(JAY_FLAGS) +-- +1.9.1 + diff --git a/package/mono/Config.in b/package/mono/Config.in new file mode 100644 index 0000000000..d45ad376fe --- /dev/null +++ b/package/mono/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_MONO_ARCH_SUPPORTS + bool + default y if (BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || \ + BR2_mipsel || BR2_powerpc || BR2_x86_64) + +config BR2_PACKAGE_MONO + bool "mono" + depends on BR2_PACKAGE_MONO_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + An open source, cross-platform, implementation of C# + and the CLR that is binary compatible with Microsoft.NET. + + http://download.mono-project.com/sources/mono/ + +comment "mono needs a toolchain w/ threads, dynamic library" + depends on BR2_PACKAGE_MONO_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/mono/mono.hash b/package/mono/mono.hash new file mode 100644 index 0000000000..d1277c55d7 --- /dev/null +++ b/package/mono/mono.hash @@ -0,0 +1,2 @@ +# sha256 locally computed +sha256 4703d390416a6e9977585f13711f59a6d54431086c2dbacee49888dcc31937be mono-4.2.3.4.tar.bz2 diff --git a/package/mono/mono.mk b/package/mono/mono.mk new file mode 100644 index 0000000000..0b9cb4623f --- /dev/null +++ b/package/mono/mono.mk @@ -0,0 +1,68 @@ +################################################################################ +# +# mono +# +################################################################################ + +MONO_VERSION = 4.2.3.4 +MONO_SITE = http://download.mono-project.com/sources/mono +MONO_SOURCE = mono-$(MONO_VERSION).tar.bz2 +MONO_LICENSE = GPLv2 or MIT (compiler, tools), LGPLv2 (runtime libs), MIT (class libs) or commercial +MONO_LICENSE_FILES = LICENSE COPYING.LIB mcs/COPYING.LIB mcs/COPYING \ + eglib/COPYING external/Newtonsoft.Json/Tools/7-zip/copying.txt +MONO_INSTALL_STAGING = YES + +## Mono native + +# patching configure.ac +MONO_AUTORECONF = YES + +# Disable managed code (mcs folder) from building +MONO_CONF_OPTS = --disable-gtk-doc \ + --with-mcs-docs=no \ + --with-moonlight=no \ + --with-ikvm-native=no \ + --enable-minimal=aot,profiler,debug \ + --disable-mcs-build \ + --enable-static + +# The libraries have been built by the host-mono build. Since they are +# architecture-independent, we simply copy them to the target. +define MONO_INSTALL_LIBS + rsync -av --exclude=*.so --exclude=*.mdb \ + $(HOST_DIR)/usr/lib/mono $(TARGET_DIR)/usr/lib/ + rsync -av $(HOST_DIR)/etc/mono $(TARGET_DIR)/etc +endef + +MONO_POST_INSTALL_TARGET_HOOKS += MONO_INSTALL_LIBS + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +MONO_DEPENDENCIES += libiconv +endif + +MONO_DEPENDENCIES += host-mono + +## Mono managed + +HOST_MONO_CONF_OPTS = --disable-gtk-doc \ + --with-mcs-docs=no \ + --with-moonlight=no \ + --disable-libraries \ + --with-ikvm-native=no \ + --enable-minimal=aot,profiler,debug \ + --enable-static + +# ensure monolite is used +HOST_MONO_MAKE_OPTS += EXTERNAL_MCS=false + +HOST_MONO_DEPENDENCIES = host-monolite host-gettext + +define HOST_MONO_SETUP_MONOLITE + rm -rf $(@D)/mcs/class/lib/monolite + (cd $(@D)/mcs/class/lib; ln -s $(HOST_DIR)/usr/lib/monolite monolite) +endef + +HOST_MONO_POST_CONFIGURE_HOOKS += HOST_MONO_SETUP_MONOLITE + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/monolite/monolite.hash b/package/monolite/monolite.hash new file mode 100644 index 0000000000..fa098e266d --- /dev/null +++ b/package/monolite/monolite.hash @@ -0,0 +1,2 @@ +# sha256 locally computed +sha256 0cf7aeafb22daeb7ed3398057f0ac88015440901f480ef84cba2431a753f8c1e monolite-138-latest.tar.gz diff --git a/package/monolite/monolite.mk b/package/monolite/monolite.mk new file mode 100644 index 0000000000..761e776ab8 --- /dev/null +++ b/package/monolite/monolite.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# monolite +# +################################################################################ + +MONOLITE_VERSION = 138 +MONOLITE_SITE = http://download.mono-project.com/monolite/ +MONOLITE_SOURCE = monolite-$(MONOLITE_VERSION)-latest.tar.gz +MONOLITE_LICENSE = LGPLv2 or commercial + +define HOST_MONOLITE_INSTALL_CMDS + mkdir -p $(HOST_DIR)/usr/lib/monolite + cp $(@D)/* $(HOST_DIR)/usr/lib/monolite +endef + +$(eval $(host-generic-package)) diff --git a/package/mosh/Config.in b/package/mosh/Config.in new file mode 100644 index 0000000000..b4189ee10d --- /dev/null +++ b/package/mosh/Config.in @@ -0,0 +1,24 @@ +comment "mosh needs a toolchain w/ C++, threads, dynamic library, wchar" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP \ + || BR2_STATIC_LIBS || !BR2_USE_WCHAR + depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS + +config BR2_PACKAGE_MOSH + bool "mosh" + depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS + depends on BR2_INSTALL_LIBSTDCPP # protobuf + depends on BR2_TOOLCHAIN_HAS_THREADS # protobuf + depends on !BR2_STATIC_LIBS # protobuf + depends on BR2_USE_WCHAR + select BR2_PACKAGE_PROTOBUF + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + # runtime dependency + select BR2_PACKAGE_OPENSSH if !BR2_PACKAGE_DROPBEAR_CLIENT + help + Remote terminal application that supports intermittent connectivity, + allows roaming, and provides speculative local echo and line editing + of user keystrokes. + + https://mosh.mit.edu diff --git a/package/mosh/mosh.hash b/package/mosh/mosh.hash new file mode 100644 index 0000000000..ab925b5126 --- /dev/null +++ b/package/mosh/mosh.hash @@ -0,0 +1,2 @@ +# From: http://mailman.mit.edu/pipermail/mosh-users/2015-July/000283.html +sha256 1af809e5d747c333a852fbf7acdbf4d354dc4bbc2839e3afe5cf798190074be3 mosh-1.2.5.tar.gz diff --git a/package/mosh/mosh.mk b/package/mosh/mosh.mk new file mode 100644 index 0000000000..f8c45e8ccd --- /dev/null +++ b/package/mosh/mosh.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# mosh +# +################################################################################ + +MOSH_VERSION = 1.2.5 +MOSH_SITE = https://mosh.mit.edu +MOSH_DEPENDENCIES = zlib ncurses protobuf openssl host-pkgconf +MOSH_LICENSE = GPLv3+ with exception +MOSH_LICENSE_FILES = COPYING COPYING.iOS + +# help the detection of the SSP support: mosh configure.ac doesn't do +# a link test, so it doesn't detect when the toolchain doesn't have +# libssp. +ifeq ($(BR2_TOOLCHAIN_HAS_SSP),) +MOSH_CONF_ENV += \ + ax_cv_check_cflags__Werror___fstack_protector_all=no \ + ax_cv_check_cxxflags__Werror___fstack_protector_all=no +endif + +$(eval $(autotools-package)) diff --git a/package/mosquitto/Config.in b/package/mosquitto/Config.in new file mode 100644 index 0000000000..50937d0554 --- /dev/null +++ b/package/mosquitto/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_MOSQUITTO + bool "mosquitto" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # builds .so + help + Mosquitto is an open source message broker that implements + the MQ Telemetry Transport protocol versions 3.1 and + 3.1.1. MQTT provides a lightweight method of carrying out + messaging using a publish/subscribe model. This makes it + suitable for "machine to machine" messaging such as with low + power sensors or mobile devices such as phones, embedded + computers or microcontrollers like the Arduino. + + http://mosquitto.org/ + +comment "mosquitto needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/mosquitto/S50mosquitto b/package/mosquitto/S50mosquitto new file mode 100644 index 0000000000..5241a071d7 --- /dev/null +++ b/package/mosquitto/S50mosquitto @@ -0,0 +1,35 @@ +#!/bin/sh + +start() { + printf "Starting mosquitto: " + start-stop-daemon -S -q -m -b -p /var/run/mosquitto.pid \ + --exec /usr/sbin/mosquitto \ + -- -c /etc/mosquitto/mosquitto.conf + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +stop() { + printf "Stopping mosquitto: " + start-stop-daemon -K -q -p /var/run/mosquitto.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/mosquitto/mosquitto.hash b/package/mosquitto/mosquitto.hash new file mode 100644 index 0000000000..861136b6ad --- /dev/null +++ b/package/mosquitto/mosquitto.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 d96eb5610e57cc3e273f4527d3f54358ab7711459941a9e64bc4d0a85c2acfda mosquitto-1.4.8.tar.gz diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk new file mode 100644 index 0000000000..dfef6e509d --- /dev/null +++ b/package/mosquitto/mosquitto.mk @@ -0,0 +1,98 @@ +################################################################################ +# +# mosquitto +# +################################################################################ + +MOSQUITTO_VERSION = 1.4.8 +MOSQUITTO_SITE = http://mosquitto.org/files/source +MOSQUITTO_LICENSE = EPLv1.0 or EDLv1.0 +MOSQUITTO_LICENSE_FILES = LICENSE.txt epl-v10 edl-v10 +MOSQUITTO_INSTALL_STAGING = YES + +MOSQUITTO_MAKE_OPTS = \ + UNAME=Linux \ + STRIP=true \ + prefix=/usr \ + WITH_WRAP=no \ + WITH_DOCS=no + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +MOSQUITTO_MAKE_OPTS += WITH_THREADING=yes +else +MOSQUITTO_MAKE_OPTS += WITH_THREADING=no +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +MOSQUITTO_DEPENDENCIES += openssl +MOSQUITTO_MAKE_OPTS += WITH_TLS=yes +else +MOSQUITTO_MAKE_OPTS += WITH_TLS=no +endif + +ifeq ($(BR2_PACKAGE_C_ARES),y) +MOSQUITTO_DEPENDENCIES += c-ares +MOSQUITTO_MAKE_OPTS += WITH_SRV=yes +else +MOSQUITTO_MAKE_OPTS += WITH_SRV=no +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +MOSQUITTO_DEPENDENCIES += util-linux +MOSQUITTO_MAKE_OPTS += WITH_UUID=yes +else +MOSQUITTO_MAKE_OPTS += WITH_UUID=no +endif + +ifeq ($(BR2_PACKAGE_LIBWEBSOCKETS),y) +MOSQUITTO_DEPENDENCIES += libwebsockets +MOSQUITTO_MAKE_OPTS += WITH_WEBSOCKETS=yes +else +MOSQUITTO_MAKE_OPTS += WITH_WEBSOCKETS=no +endif + +# C++ support is only used to create a wrapper library +ifneq ($(BR2_INSTALL_LIBSTDCPP),y) +define MOSQUITTO_DISABLE_CPP + $(SED) '/-C cpp/d' $(@D)/lib/Makefile +endef + +MOSQUITTO_POST_PATCH_HOOKS += MOSQUITTO_DISABLE_CPP +endif + +define MOSQUITTO_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + $(MOSQUITTO_MAKE_OPTS) +endef + +define MOSQUITTO_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + $(MOSQUITTO_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install +endef + +define MOSQUITTO_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + $(MOSQUITTO_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install + rm -f $(TARGET_DIR)/etc/mosquitto/*.example + $(INSTALL) -D -m 0644 $(@D)/mosquitto.conf \ + $(TARGET_DIR)/etc/mosquitto/mosquitto.conf +endef + +define MOSQUITTO_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/mosquitto/S50mosquitto \ + $(TARGET_DIR)/etc/init.d/S50mosquitto +endef + +define MOSQUITTO_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/mosquitto/mosquitto.service \ + $(TARGET_DIR)/usr/lib/systemd/system/mosquitto.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/mosquitto.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/mosquitto.service +endef + +define MOSQUITTO_USERS + mosquitto -1 nogroup -1 * - - - Mosquitto user +endef + +$(eval $(generic-package)) diff --git a/package/mosquitto/mosquitto.service b/package/mosquitto/mosquitto.service new file mode 100644 index 0000000000..2d1939d1c7 --- /dev/null +++ b/package/mosquitto/mosquitto.service @@ -0,0 +1,10 @@ +[Unit] +Description=Mosquitto MQTT broker + +[Service] +ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf +ExecReload=/bin/kill -HUP $MAINPID +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/mp4v2/Config.in b/package/mp4v2/Config.in new file mode 100644 index 0000000000..42315a2272 --- /dev/null +++ b/package/mp4v2/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_MP4V2 + bool "mp4v2" + depends on BR2_INSTALL_LIBSTDCPP + help + The MP4v2 library provides functions to read, create, and + modify mp4 files. + + https://code.google.com/p/mp4v2/ + +if BR2_PACKAGE_MP4V2 + +config BR2_PACKAGE_MP4V2_UTIL + bool "Install mp4 command line tools" + help + Enable to install the mp4 command line tools mp4art, + mp4chaps, mp4extract, mp4info, mp4subtitle, mp4tags, and + mp4trackdump. + +endif + +comment "mp4v2 needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/mp4v2/mp4v2.hash b/package/mp4v2/mp4v2.hash new file mode 100644 index 0000000000..d5a49c44ce --- /dev/null +++ b/package/mp4v2/mp4v2.hash @@ -0,0 +1,2 @@ +# From https://code.google.com/p/mp4v2/downloads/detail?name=mp4v2-2.0.0.tar.bz2 +sha1 193260cfb7201e6ec250137bcca1468d4d20e2f0 mp4v2-2.0.0.tar.bz2 diff --git a/package/mp4v2/mp4v2.mk b/package/mp4v2/mp4v2.mk new file mode 100644 index 0000000000..2acbb4ea74 --- /dev/null +++ b/package/mp4v2/mp4v2.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# mp4v2 +# +################################################################################ + +MP4V2_VERSION = 2.0.0 +MP4V2_SOURCE = mp4v2-$(MP4V2_VERSION).tar.bz2 +MP4V2_SITE = https://mp4v2.googlecode.com/files +MP4V2_INSTALL_STAGING = YES +MP4V2_LICENSE = MPLv1.1 +MP4V2_LICENSE_FILES = COPYING + +# help2man expects to be able to run utilities on the build machine to +# grab --help output which doesn't work when cross compiling, so +# disable it +MP4V2_CONF_ENV = ac_cv_prog_FOUND_HELP2MAN=no + +ifeq ($(BR2_PACKAGE_MP4V2_UTIL),y) +MP4V2_CONF_OPTS += --enable-util +else +MP4V2_CONF_OPTS += --disable-util +endif + +$(eval $(autotools-package)) diff --git a/package/mpc/Config.in b/package/mpc/Config.in new file mode 100644 index 0000000000..83770133e5 --- /dev/null +++ b/package/mpc/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_MPC + bool "mpc" + select BR2_PACKAGE_MPFR + select BR2_PACKAGE_GMP + help + Mpc is a C library for the arithmetic of complex numbers with + arbitrarily high precision and correct rounding of the result. + It is built upon and follows the same principles as Mpfr. + + http://www.multiprecision.org/ diff --git a/package/mpc/mpc.hash b/package/mpc/mpc.hash new file mode 100644 index 0000000000..98f1447a0d --- /dev/null +++ b/package/mpc/mpc.hash @@ -0,0 +1,2 @@ +# From http://www.multiprecision.org/index.php?prog=mpc&page=download +sha1 b8be66396c726fdc36ebb0f692ed8a8cca3bcc66 mpc-1.0.3.tar.gz diff --git a/package/mpc/mpc.mk b/package/mpc/mpc.mk new file mode 100644 index 0000000000..bc26599520 --- /dev/null +++ b/package/mpc/mpc.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# mpc +# +################################################################################ + +MPC_VERSION = 1.0.3 +MPC_SITE = $(BR2_GNU_MIRROR)/mpc +MPC_LICENSE = LGPLv3+ +MPC_LICENSE_FILES = COPYING.LESSER +MPC_INSTALL_STAGING = YES +MPC_DEPENDENCIES = gmp mpfr + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/mpd-mpc/Config.in b/package/mpd-mpc/Config.in new file mode 100644 index 0000000000..1debc839a2 --- /dev/null +++ b/package/mpd-mpc/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_MPD_MPC + bool "mpd-mpc" + select BR2_PACKAGE_LIBMPDCLIENT + help + A minimalist command line interface to MPD. + + http://www.musicpd.org/clients/mpc/ diff --git a/package/mpd-mpc/mpd-mpc.hash b/package/mpd-mpc/mpd-mpc.hash new file mode 100644 index 0000000000..b4003867e9 --- /dev/null +++ b/package/mpd-mpc/mpd-mpc.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 45a2be0a6dea65ed43f631294c24e74b83c8ee66d1ba6ab47d0744ddb1e62064 mpc-0.27.tar.xz diff --git a/package/mpd-mpc/mpd-mpc.mk b/package/mpd-mpc/mpd-mpc.mk new file mode 100644 index 0000000000..f5e95999c3 --- /dev/null +++ b/package/mpd-mpc/mpd-mpc.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# mpd-mpc +# +################################################################################ + +MPD_MPC_VERSION_MAJOR = 0 +MPD_MPC_VERSION = $(MPD_MPC_VERSION_MAJOR).27 +MPD_MPC_SITE = http://www.musicpd.org/download/mpc/$(MPD_MPC_VERSION_MAJOR) +MPD_MPC_SOURCE = mpc-$(MPD_MPC_VERSION).tar.xz +MPD_MPC_LICENSE = GPLv2+ +MPD_MPC_LICENSE_FILES = COPYING +MPD_MPC_DEPENDENCIES = host-pkgconf libmpdclient +MPD_MPC_CONF_ENV = ac_cv_prog_cc_c99='-std=c99' + +$(eval $(autotools-package)) diff --git a/package/mpd/0001-configure.ac-check-if-libatomic-is-needed.patch b/package/mpd/0001-configure.ac-check-if-libatomic-is-needed.patch new file mode 100644 index 0000000000..a9873a741f --- /dev/null +++ b/package/mpd/0001-configure.ac-check-if-libatomic-is-needed.patch @@ -0,0 +1,40 @@ +From 8eaf14a17244aaf000b4d19e4fde4a637576939f Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 7 Feb 2016 21:40:47 +0100 +Subject: [PATCH] configure.ac: check if libatomic is needed + +The mpd source code uses the C++11 functionality, which +internally is implemented using the __atomic_*() gcc built-ins. On +certain architectures, the __atomic_*() built-ins are implemented in +the libatomic library that comes with the rest of the gcc runtime. Due +to this, code using might need to link against libatomic, +otherwise one hits build issues such as: + +GlobalEvents.cxx:(.text._ZN12GlobalEvents4EmitENS_5EventE+0x14): undefined reference to `__atomic_fetch_or_4' + +on an architecture like SPARC. + +To solve this, a configure.ac check is added to know if we need to +link against libatomic or not. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 107b45a..8e6fab7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -233,6 +233,8 @@ if test x$have_pthread_setname_np = xyes; then + AC_DEFINE(HAVE_PTHREAD_SETNAME_NP, 1, [Is pthread_setname_np() available?]) + fi + ++AC_SEARCH_LIBS([__atomic_load_4], [atomic]) ++ + dnl --------------------------------------------------------------------------- + dnl Event loop selection + dnl --------------------------------------------------------------------------- +-- +2.6.4 + diff --git a/package/mpd/0002-thread-Name-include-stdio.h-for-prctl-as-well.patch b/package/mpd/0002-thread-Name-include-stdio.h-for-prctl-as-well.patch new file mode 100644 index 0000000000..1943623edb --- /dev/null +++ b/package/mpd/0002-thread-Name-include-stdio.h-for-prctl-as-well.patch @@ -0,0 +1,28 @@ +From a0a9fed68126eb24e04af924c0d46351ff5eeb0f Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Mon, 26 Jan 2015 09:55:04 -0300 +Subject: [PATCH] thread/Name: include stdio.h for prctl as well + +We're still using snprintf so we need it, otherwise it leads to build +failure. + +Signed-off-by: Gustavo Zacarias +--- + src/thread/Name.hxx | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/thread/Name.hxx b/src/thread/Name.hxx +index a99208d..8f9d7d3 100644 +--- a/src/thread/Name.hxx ++++ b/src/thread/Name.hxx +@@ -25,6 +25,7 @@ + # include + #elif defined(HAVE_PRCTL) + # include ++# include + # ifdef PR_SET_NAME + # define HAVE_THREAD_NAME + # endif +-- +2.6.4 + diff --git a/package/mpd/Config.in b/package/mpd/Config.in new file mode 100644 index 0000000000..31be8bb774 --- /dev/null +++ b/package/mpd/Config.in @@ -0,0 +1,318 @@ +menuconfig BR2_PACKAGE_MPD + bool "mpd" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # libglib2, flac + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_ATOMIC + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_MPD_TREMOR if !(BR2_PACKAGE_MPD_MAD || BR2_PACKAGE_MPD_MPG123 || BR2_PACKAGE_MPD_VORBIS || BR2_PACKAGE_MPD_WAVPACK || BR2_PACKAGE_MPD_FLAC || BR2_PACKAGE_MPD_MUSEPACK || BR2_PACKAGE_MPD_FFMPEG) + help + MPD is a flexible, powerful, server-side application + for playing music. Through plugins and libraries + it can play a variety of sound files while being + controlled by its network protocol. + + http://www.musicpd.org + +if BR2_PACKAGE_MPD + +comment "Archive plugins" + +config BR2_PACKAGE_MPD_BZIP2 + bool "bzip2" + select BR2_PACKAGE_BZIP2 + help + Enable bzip2 archive support. + +config BR2_PACKAGE_MPD_SQLITE + bool "sqlite" + select BR2_PACKAGE_SQLITE + help + Enable sqlite database support. + If you don't use sqlite it will use an ASCII database. + +comment "Converter plugins" + +config BR2_PACKAGE_MPD_LIBSAMPLERATE + bool "libsamplerate" + select BR2_PACKAGE_LIBSAMPLERATE + help + Enable libsamplerate input support. + Select this for software sample rate conversion. + +config BR2_PACKAGE_MPD_LIBSOXR + bool "libsoxr" + select BR2_PACKAGE_LIBSOXR + help + Enable libsoxr resampler support. + The SoX Resampler library performs software sample-rate + conversion. + +comment "Decoder plugins" + +config BR2_PACKAGE_MPD_AUDIOFILE + bool "audiofile" + select BR2_PACKAGE_AUDIOFILE + help + Enable audiofile input/streaming support. + Select this if you want to play back WAV files. + +config BR2_PACKAGE_MPD_DSD + bool "dsd" + help + Enable Digital Speech Decoder (DSD) support to play audio + files encoded in a digital speech format. + +config BR2_PACKAGE_MPD_FAAD2 + bool "faad2" + select BR2_PACKAGE_FAAD2 + help + Enable faad2 input support. + Select this if you want to play back MP4/AAC files. + +config BR2_PACKAGE_MPD_FFMPEG + bool "ffmpeg" + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + select BR2_PACKAGE_FFMPEG + help + Enable ffmpeg input support. + Select this if you want to play back files supported by + ffmpeg. + +config BR2_PACKAGE_MPD_FLAC + bool "flac" + select BR2_PACKAGE_FLAC + help + Enable flac input/streaming support. + Select this if you want to play back FLAC files. + +config BR2_PACKAGE_MPD_LIBSNDFILE + bool "libsndfile" + select BR2_PACKAGE_LIBSNDFILE + help + Enable libsndfile input/streaming support. + Select this if you want to play back WAV files. + +config BR2_PACKAGE_MPD_MAD + bool "mad" + default y + select BR2_PACKAGE_LIBID3TAG + select BR2_PACKAGE_LIBMAD + help + Enable mad input support. + Select this if you want to play back MP3 files. + +config BR2_PACKAGE_MPD_MPG123 + bool "mpg123" + select BR2_PACKAGE_LIBID3TAG + select BR2_PACKAGE_MPG123 + help + Enable mpg123 input support. + Select this if you want to play back MP3 files. + +config BR2_PACKAGE_MPD_MUSEPACK + bool "musepack" + select BR2_PACKAGE_LIBCUEFILE + select BR2_PACKAGE_LIBREPLAYGAIN + select BR2_PACKAGE_MUSEPACK + help + Enable musepack input support. + Select this if you want to play back MPC files. + +config BR2_PACKAGE_MPD_OPUS + bool "opus" + select BR2_PACKAGE_OPUS + select BR2_PACKAGE_LIBOGG + help + Enable opus input support. + Select this if you want to play back OPUS encoded files. + +config BR2_PACKAGE_MPD_TREMOR + bool "tremor" + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_TREMOR + help + Enable vorbis input support. + Select this if you want to play back OGG files on softfloat + targets. + +config BR2_PACKAGE_MPD_VORBIS + bool "vorbis" + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBVORBIS + help + Enable vorbis input/streaming support. + Select this if you want to play back OGG files on hardfloat + targets. + +config BR2_PACKAGE_MPD_WAVPACK + bool "wavpack" + select BR2_PACKAGE_WAVPACK + help + Enable wavpack input support. + Select this if you want to play back WV files. + +comment "Encoder plugins" + +config BR2_PACKAGE_MPD_LAME + bool "lame" + select BR2_PACKAGE_LAME + help + Enable lame (mp3) encoding support. + +config BR2_PACKAGE_MPD_TWOLAME + bool "twolame" + select BR2_PACKAGE_TWOLAME + help + Enable TwoLAME mp2 encoding. + +comment "Input plugins" + +config BR2_PACKAGE_MPD_CURL + bool "curl" + select BR2_PACKAGE_LIBCURL + help + Enable curl streaming (http) support. + +config BR2_PACKAGE_MPD_LIBNFS + bool "nfs" + # libnfs -> libtirpc + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBNFS + help + Enable Network File System (NFS) support. + +comment "nfs support needs a toolchain w/ threads support" + depends on !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC) + +comment "samba support needs an (e)glibc toolchain w/ dynamic library, RPC" + depends on !BR2_nios2 + depends on !BR2_TOOLCHAIN_USES_GLIBC || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_NATIVE_RPC + +config BR2_PACKAGE_MPD_LIBSMBCLIENT + bool "samba" + depends on !BR2_nios2 # samba + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_SAMBA4 + help + Enable Samba support. + +config BR2_PACKAGE_MPD_SOUNDCLOUD + bool "soundcloud" + select BR2_PACKAGE_YAJL + help + Enable soundcloud.com playlist support. + +comment "Output plugins" + +config BR2_PACKAGE_MPD_ALSA + bool "alsa" + default y + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_ALSA_LIB_PCM + select BR2_PACKAGE_ALSA_LIB_MIXER + help + Enable alsa output support. + +config BR2_PACKAGE_MPD_AO + bool "ao" + select BR2_PACKAGE_LIBAO + help + Enable libao output support. + +config BR2_PACKAGE_MPD_HTTPD_OUTPUT + bool "httpd output" + help + Enable httpd output support. + +config BR2_PACKAGE_MPD_JACK2 + bool "jack2" + depends on !BR2_STATIC_LIBS # jack2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_JACK2 + help + Enable jack output support. + +comment "jack support needs a toolchain w/ dynamic library" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_MPD_OSS + bool "oss" + help + Enable OSS (Open Sound System) output support. + +config BR2_PACKAGE_MPD_PULSEAUDIO + bool "pulseaudio" + depends on !BR2_STATIC_LIBS # pulseaudio + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pulseaudio -> json-c + select BR2_PACKAGE_PULSEAUDIO + help + Enable pulseaudio output support. + +comment "pulseaudio support needs a toolchain w/ dynamic library" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_STATIC_LIBS + +comment "Miscellaneous plugins" + +config BR2_PACKAGE_MPD_AVAHI_SUPPORT + bool "avahi (zeroconf) support" + depends on !BR2_STATIC_LIBS # avahi + select BR2_PACKAGE_AVAHI + select BR2_PACKAGE_AVAHI_DAEMON + select BR2_PACKAGE_AVAHI_LIBDNSSD_COMPATIBILITY + help + Enable Avahi (zeroconf) support. + Select this for multicast DNS/DNS-SD service discovery + support. This allows MPD to publish service information on a + local network. + +comment "avahi support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_MPD_NEIGHBOR_DISCOVERY_SUPPORT + bool "neighbor discovery support" + depends on BR2_PACKAGE_MPD_LIBSMBCLIENT || BR2_PACKAGE_MPD_UPNP + help + Enable support for neighbor discovery. + This option can be used in conjunction with the smbclient + plugin to provide a list of SMB/CIFS servers or with the + UPnP plugin to provide a list of UPnP servers on the local + network. The neighbor plugin needs configuration in + mpd.conf. For further information take a look at the MPD + documentation. + +config BR2_PACKAGE_MPD_TCP + bool "tcp sockets" + default y + help + Enable MPD to listen on tcp sockets. + + You want this on if MPD and the client(s) work + on different machines (the usual scenario). + +config BR2_PACKAGE_MPD_UPNP + bool "UPnP" + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_LIBUPNP + help + Enable MPD UPnP client support. + +endif + +comment "mpd needs a toolchain w/ C++, threads, wchar, gcc >= 4.6" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 diff --git a/package/mpd/S95mpd b/package/mpd/S95mpd new file mode 100644 index 0000000000..9f68b45837 --- /dev/null +++ b/package/mpd/S95mpd @@ -0,0 +1,34 @@ +#!/bin/sh + +# Sanity checks +test -f /usr/bin/mpd || exit 0 +test -f /etc/mpd.conf || exit 0 + +start() { + printf "Starting mpd: " + start-stop-daemon --start --quiet --background --exec /usr/bin/mpd \ + && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping mpd: " + start-stop-daemon --stop --quiet --pidfile /var/run/mpd.pid \ + && echo "OK" || echo "FAIL" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + sleep 1 + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/mpd/mpd.conf b/package/mpd/mpd.conf new file mode 100644 index 0000000000..5956b75e24 --- /dev/null +++ b/package/mpd/mpd.conf @@ -0,0 +1,32 @@ +# +# Sample configuration file for mpd +# This is a minimal configuration, see the manpage for more options +# + +# Directory where the music is stored +music_directory "/var/lib/mpd/music" + +# Directory where user-made playlists are stored (RW) +playlist_directory "/var/lib/mpd/playlists" + +# Database file (RW) +db_file "/var/lib/mpd/database" + +# Log file (RW) +log_file "/var/log/mpd.log" + +# Process ID file (RW) +pid_file "/var/run/mpd.pid" + +# State file (RW) +state_file "/var/lib/mpd/state" + +# User id to run the daemon as +#user "nobody" + +# TCP socket binding +bind_to_address "any" +#bind_to_address "localhost" + +# Unix socket to listen on +bind_to_address "/var/lib/mpd/socket" diff --git a/package/mpd/mpd.hash b/package/mpd/mpd.hash new file mode 100644 index 0000000000..2d35aaeb62 --- /dev/null +++ b/package/mpd/mpd.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 0cb9a223894b038ce966ce6d651d9b3ea3bdc7d7b9bec8d1e9e7e091cbc29b8b mpd-0.19.15.tar.xz diff --git a/package/mpd/mpd.mk b/package/mpd/mpd.mk new file mode 100644 index 0000000000..6247d15d39 --- /dev/null +++ b/package/mpd/mpd.mk @@ -0,0 +1,260 @@ +################################################################################ +# +# mpd +# +################################################################################ + +MPD_VERSION_MAJOR = 0.19 +MPD_VERSION = $(MPD_VERSION_MAJOR).15 +MPD_SOURCE = mpd-$(MPD_VERSION).tar.xz +MPD_SITE = http://www.musicpd.org/download/mpd/$(MPD_VERSION_MAJOR) +MPD_DEPENDENCIES = host-pkgconf boost libglib2 +MPD_LICENSE = GPLv2+ +MPD_LICENSE_FILES = COPYING +MPD_AUTORECONF = YES + +# Some options need an explicit --disable or --enable + +# Zeroconf support depends on libdns_sd from avahi. +ifeq ($(BR2_PACKAGE_MPD_AVAHI_SUPPORT),y) +MPD_DEPENDENCIES += avahi +MPD_CONF_OPTS += --with-zeroconf=avahi +else +MPD_CONF_OPTS += --with-zeroconf=no +endif + +# MPD prefers libicu for utf8 collation instead of libglib2. +ifeq ($(BR2_PACKAGE_ICU),y) +MPD_DEPENDENCIES += icu +MPD_CONF_OPTS += --enable-icu +else +MPD_CONF_OPTS += --disable-icu +endif + +ifeq ($(BR2_PACKAGE_MPD_ALSA),y) +MPD_DEPENDENCIES += alsa-lib +MPD_CONF_OPTS += --enable-alsa +else +MPD_CONF_OPTS += --disable-alsa +endif + +ifeq ($(BR2_PACKAGE_MPD_AO),y) +MPD_DEPENDENCIES += libao +MPD_CONF_OPTS += --enable-ao +else +MPD_CONF_OPTS += --disable-ao +endif + +ifeq ($(BR2_PACKAGE_MPD_AUDIOFILE),y) +MPD_DEPENDENCIES += audiofile +MPD_CONF_OPTS += --enable-audiofile +else +MPD_CONF_OPTS += --disable-audiofile +endif + +ifeq ($(BR2_PACKAGE_MPD_BZIP2),y) +MPD_DEPENDENCIES += bzip2 +MPD_CONF_OPTS += --enable-bzip2 +else +MPD_CONF_OPTS += --disable-bzip2 +endif + +ifeq ($(BR2_PACKAGE_MPD_CURL),y) +MPD_DEPENDENCIES += libcurl +MPD_CONF_OPTS += --enable-curl +else +MPD_CONF_OPTS += --disable-curl +endif + +ifeq ($(BR2_PACKAGE_MPD_DSD),y) +MPD_CONF_OPTS += --enable-dsd +else +MPD_CONF_OPTS += --disable-dsd +endif + +ifeq ($(BR2_PACKAGE_MPD_FAAD2),y) +MPD_DEPENDENCIES += faad2 +MPD_CONF_OPTS += --enable-aac +else +MPD_CONF_OPTS += --disable-aac +endif + +ifeq ($(BR2_PACKAGE_MPD_FFMPEG),y) +MPD_DEPENDENCIES += ffmpeg +MPD_CONF_OPTS += --enable-ffmpeg +else +MPD_CONF_OPTS += --disable-ffmpeg +endif + +ifeq ($(BR2_PACKAGE_MPD_FLAC),y) +MPD_DEPENDENCIES += flac +MPD_CONF_OPTS += --enable-flac +else +MPD_CONF_OPTS += --disable-flac +endif + +ifeq ($(BR2_PACKAGE_MPD_HTTPD_OUTPUT),y) +MPD_CONF_OPTS += --enable-httpd-output +else +MPD_CONF_OPTS += --disable-httpd-output +endif + +ifeq ($(BR2_PACKAGE_MPD_JACK2),y) +MPD_DEPENDENCIES += jack2 +MPD_CONF_OPTS += --enable-jack +else +MPD_CONF_OPTS += --disable-jack +endif + +ifeq ($(BR2_PACKAGE_MPD_LAME),y) +MPD_DEPENDENCIES += lame +MPD_CONF_OPTS += --enable-lame-encoder +else +MPD_CONF_OPTS += --disable-lame-encoder +endif + +ifeq ($(BR2_PACKAGE_MPD_LIBNFS),y) +MPD_DEPENDENCIES += libnfs +MPD_CONF_OPTS += --enable-nfs +else +MPD_CONF_OPTS += --disable-nfs +endif + +ifeq ($(BR2_PACKAGE_MPD_LIBSMBCLIENT),y) +MPD_DEPENDENCIES += samba4 +MPD_CONF_OPTS += --enable-smbclient +else +MPD_CONF_OPTS += --disable-smbclient +endif + +ifeq ($(BR2_PACKAGE_MPD_LIBSAMPLERATE),y) +MPD_DEPENDENCIES += libsamplerate +MPD_CONF_OPTS += --enable-lsr +else +MPD_CONF_OPTS += --disable-lsr +endif + +ifeq ($(BR2_PACKAGE_MPD_LIBSNDFILE),y) +MPD_DEPENDENCIES += libsndfile +MPD_CONF_OPTS += --enable-sndfile +else +MPD_CONF_OPTS += --disable-sndfile +endif + +ifeq ($(BR2_PACKAGE_MPD_LIBSOXR),y) +MPD_DEPENDENCIES += libsoxr +MPD_CONF_OPTS += --enable-soxr +else +MPD_CONF_OPTS += --disable-soxr +endif + +ifeq ($(BR2_PACKAGE_MPD_MAD),y) +MPD_DEPENDENCIES += libid3tag libmad +MPD_CONF_OPTS += --enable-mad +else +MPD_CONF_OPTS += --disable-mad +endif + +ifeq ($(BR2_PACKAGE_MPD_MPG123),y) +MPD_DEPENDENCIES += libid3tag mpg123 +MPD_CONF_OPTS += --enable-mpg123 +else +MPD_CONF_OPTS += --disable-mpg123 +endif + +ifeq ($(BR2_PACKAGE_MPD_MUSEPACK),y) +MPD_DEPENDENCIES += musepack +MPD_CONF_OPTS += --enable-mpc +else +MPD_CONF_OPTS += --disable-mpc +endif + +ifeq ($(BR2_PACKAGE_MPD_NEIGHBOR_DISCOVERY_SUPPORT),y) +MPD_CONF_OPTS += --enable-neighbor-plugins +else +MPD_CONF_OPTS += --disable-neighbor-plugins +endif + +ifeq ($(BR2_PACKAGE_MPD_OPUS),y) +MPD_DEPENDENCIES += opus libogg +MPD_CONF_OPTS += --enable-opus +else +MPD_CONF_OPTS += --disable-opus +endif + +ifeq ($(BR2_PACKAGE_MPD_OSS),y) +MPD_CONF_OPTS += --enable-oss +else +MPD_CONF_OPTS += --disable-oss +endif + +ifeq ($(BR2_PACKAGE_MPD_PULSEAUDIO),y) +MPD_DEPENDENCIES += pulseaudio +MPD_CONF_OPTS += --enable-pulse +else +MPD_CONF_OPTS += --disable-pulse +endif + +ifeq ($(BR2_PACKAGE_MPD_SOUNDCLOUD),y) +MPD_DEPENDENCIES += yajl +MPD_CONF_OPTS += --enable-soundcloud +else +MPD_CONF_OPTS += --disable-soundcloud +endif + +ifeq ($(BR2_PACKAGE_MPD_SQLITE),y) +MPD_DEPENDENCIES += sqlite +MPD_CONF_OPTS += --enable-sqlite +else +MPD_CONF_OPTS += --disable-sqlite +endif + +ifneq ($(BR2_PACKAGE_MPD_TCP),y) +MPD_CONF_OPTS += --disable-tcp +endif + +ifeq ($(BR2_PACKAGE_MPD_TREMOR),y) +MPD_DEPENDENCIES += tremor +MPD_CONF_OPTS += --with-tremor +endif + +ifeq ($(BR2_PACKAGE_MPD_TWOLAME),y) +MPD_DEPENDENCIES += twolame +MPD_CONF_OPTS += --enable-twolame-encoder +else +MPD_CONF_OPTS += --disable-twolame-encoder +endif + +ifeq ($(BR2_PACKAGE_MPD_UPNP),y) +MPD_DEPENDENCIES += expat libupnp +MPD_CONF_OPTS += --enable-upnp +else +MPD_CONF_OPTS += --disable-upnp +endif + +ifeq ($(BR2_PACKAGE_MPD_VORBIS),y) +MPD_DEPENDENCIES += libvorbis +MPD_CONF_OPTS += --enable-vorbis --enable-vorbis-encoder +else +MPD_CONF_OPTS += --disable-vorbis --disable-vorbis-encoder +endif + +ifeq ($(BR2_PACKAGE_MPD_WAVPACK),y) +MPD_DEPENDENCIES += wavpack +MPD_CONF_OPTS += --enable-wavpack +else +MPD_CONF_OPTS += --disable-wavpack +endif + +define MPD_INSTALL_EXTRA_FILES + $(INSTALL) -m 0644 -D package/mpd/mpd.conf $(TARGET_DIR)/etc/mpd.conf +endef + +MPD_POST_INSTALL_TARGET_HOOKS += MPD_INSTALL_EXTRA_FILES + +define MPD_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/mpd/S95mpd \ + $(TARGET_DIR)/etc/init.d/S95mpd +endef + +$(eval $(autotools-package)) diff --git a/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch b/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch new file mode 100644 index 0000000000..630bbd6642 --- /dev/null +++ b/package/mpdecimal/0001-Add-minimal-support-for-enable-disable-shared-static.patch @@ -0,0 +1,101 @@ +From c349964887901848fb4cd5db53a5bcb6dae27aaa Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 23 Nov 2014 10:16:33 +0100 +Subject: [PATCH] Add minimal support for --{enable,disable}-{shared,static} + +mpdecimal uses autoconf, but not automake or libtool, so this commit +adds some basic handling of --{enable,disable}-{shared,static}, so +that building the shared library can be disabled in pure static +library contexts. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.in | 6 ++++++ + configure.ac | 13 +++++++++++++ + libmpdec/Makefile.in | 11 ++++++++++- + 3 files changed, 29 insertions(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 2c91891..0c44f36 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -9,6 +9,8 @@ LIBSTATIC = @LIBSTATIC@ + LIBSONAME = @LIBSONAME@ + LIBSHARED = @LIBSHARED@ + INSTALL = @INSTALL@ ++BUILD_SHARED = @BUILD_SHARED@ ++BUILD_STATIC = @BUILD_STATIC@ + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +@@ -32,9 +34,13 @@ install: FORCE + $(INSTALL) -d -m 755 $(DESTDIR)$(includedir) + $(INSTALL) -m 644 libmpdec/mpdecimal.h $(DESTDIR)$(includedir) + $(INSTALL) -d -m 755 $(DESTDIR)$(libdir) ++ifeq ($(BUILD_STATIC),yes) + $(INSTALL) -m 644 libmpdec/$(LIBSTATIC) $(DESTDIR)$(libdir) ++endif ++ifeq ($(BUILD_SHARED),yes) + $(INSTALL) -m 755 libmpdec/$(LIBSHARED) $(DESTDIR)$(libdir) + cd $(DESTDIR)$(libdir) && ln -sf $(LIBSHARED) $(LIBSONAME) && ln -sf $(LIBSHARED) libmpdec.so ++endif + $(INSTALL) -d -m 755 $(DESTDIR)$(docdir) + cp -R doc/* $(DESTDIR)$(docdir) + +diff --git a/configure.ac b/configure.ac +index 7ee8f86..2b3e505 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -88,6 +88,19 @@ CFLAGS="$saved_cflags" + AC_PROG_INSTALL + AC_SUBST(INSTALL) + ++AC_ARG_ENABLE([shared], ++ [AS_HELP_STRING([--enable-shared], [build shared library])], ++ [BUILD_SHARED=$enableval], ++ [BUILD_SHARED=yes]) ++ ++AC_ARG_ENABLE([static], ++ [AS_HELP_STRING([--enable-static], [build static library])], ++ [BUILD_STATIC=$enableval], ++ [BUILD_STATIC=yes]) ++ ++AC_SUBST(BUILD_SHARED) ++AC_SUBST(BUILD_STATIC) ++ + # _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect: + # http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html + AC_MSG_CHECKING(for glibc _FORTIFY_SOURCE/memmove bug) +diff --git a/libmpdec/Makefile.in b/libmpdec/Makefile.in +index d9619a3..985c73c 100644 +--- a/libmpdec/Makefile.in ++++ b/libmpdec/Makefile.in +@@ -7,6 +7,8 @@ + LIBSTATIC = @LIBSTATIC@ + LIBSONAME = @LIBSONAME@ + LIBSHARED = @LIBSHARED@ ++BUILD_SHARED = @BUILD_SHARED@ ++BUILD_STATIC = @BUILD_STATIC@ + + CC = @CC@ + LD = @LD@ +@@ -32,8 +34,15 @@ ifeq ($(MAKECMDGOALS), profile_use) + MPD_LDFLAGS += $(MPD_PUSE) + endif + ++ifeq ($(BUILD_SHARED),yes) ++TARGETS += $(LIBSHARED) ++endif ++ ++ifeq ($(BUILD_STATIC),yes) ++TARGETS += $(LIBSTATIC) ++endif + +-default: $(LIBSTATIC) $(LIBSHARED) ++default: $(TARGETS) + + + OBJS := basearith.o context.o constants.o convolute.o crt.o mpdecimal.o \ +-- +2.1.0 + diff --git a/package/mpdecimal/Config.in b/package/mpdecimal/Config.in new file mode 100644 index 0000000000..929d415143 --- /dev/null +++ b/package/mpdecimal/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_MPDECIMAL + bool "mpdecimal" + help + mpdecimal is a package for correctly-rounded arbitrary + precision decimal floating point arithmetic. Starting from + version 2.4, mpdecimal includes only the libmpdec + library. Further mpdecimal development will focus + exclusively on libmpdec. + + http://www.bytereef.org/mpdecimal/ diff --git a/package/mpdecimal/mpdecimal.hash b/package/mpdecimal/mpdecimal.hash new file mode 100644 index 0000000000..bc443d1cd9 --- /dev/null +++ b/package/mpdecimal/mpdecimal.hash @@ -0,0 +1,2 @@ +# From http://www.bytereef.org/mpdecimal/download.html +sha256 da74d3cfab559971a4fbd4fb506e1b4498636eb77d0fd09e44f8e546d18ac068 mpdecimal-2.4.1.tar.gz diff --git a/package/mpdecimal/mpdecimal.mk b/package/mpdecimal/mpdecimal.mk new file mode 100644 index 0000000000..9b13def523 --- /dev/null +++ b/package/mpdecimal/mpdecimal.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# mpdecimal +# +################################################################################ + +MPDECIMAL_SITE = http://www.bytereef.org/software/mpdecimal/releases +MPDECIMAL_VERSION = 2.4.1 +MPDECIMAL_INSTALL_STAGING = YES +MPDECIMAL_LICENSE = BSD-2c +MPDECIMAL_LICENSE_FILES = LICENSE.txt +MPDECIMAL_CONF_OPTS = LD="$(TARGET_CC)" +MPDECIMAL_AUTORECONF = YES + +# On i386, by default, mpdecimal tries to uses which is not +# available in musl/uclibc. So in this case, we tell mpdecimal to use +# the generic 32 bits code, which is anyway the one used on ARM, +# PowerPC, etc. +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),) +ifeq ($(BR2_i386),y) +MPDECIMAL_CONF_ENV += MACHINE=ansi32 +endif +endif + +$(eval $(autotools-package)) diff --git a/package/mpfr/Config.in b/package/mpfr/Config.in new file mode 100644 index 0000000000..e02511f8f1 --- /dev/null +++ b/package/mpfr/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_MPFR + bool "mpfr" + select BR2_PACKAGE_GMP + help + C library for multiple-precision floating-point computations + with exact rounding. + + http://www.mpfr.org/ diff --git a/package/mpfr/mpfr.hash b/package/mpfr/mpfr.hash new file mode 100644 index 0000000000..a8b642bebc --- /dev/null +++ b/package/mpfr/mpfr.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 761413b16d749c53e2bfd2b1dfaa3b027b0e793e404b90b5fbaeef60af6517f5 mpfr-3.1.4.tar.xz diff --git a/package/mpfr/mpfr.mk b/package/mpfr/mpfr.mk new file mode 100644 index 0000000000..5c3a6ef54f --- /dev/null +++ b/package/mpfr/mpfr.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# mpfr +# +################################################################################ + +MPFR_VERSION = 3.1.4 +MPFR_SITE = http://www.mpfr.org/mpfr-$(MPFR_VERSION) +MPFR_SOURCE = mpfr-$(MPFR_VERSION).tar.xz +MPFR_LICENSE = LGPLv3+ +MPFR_LICENSE_FILES = COPYING.LESSER +MPFR_INSTALL_STAGING = YES +MPFR_DEPENDENCIES = gmp +MPFR_MAKE_OPTS = RANLIB=$(TARGET_RANLIB) + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/mpg123/0001-Makefile.am-don-t-override-LIBS.patch b/package/mpg123/0001-Makefile.am-don-t-override-LIBS.patch new file mode 100644 index 0000000000..a5bfe80094 --- /dev/null +++ b/package/mpg123/0001-Makefile.am-don-t-override-LIBS.patch @@ -0,0 +1,46 @@ +From 25c2e71c9ce762561eeacd35bf432c6692c0fb44 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Tue, 24 May 2016 17:34:32 +0200 +Subject: [PATCH] Makefile.am: don't override LIBS + +Patch status: posted upstream +https://sourceforge.net/p/mpg123/mailman/message/35111696/ + +The recent build system change broke custom LIBS handling. As opposed to the +other internal variables, LIBS can be provided by the user when running +configure, E.G.: + +LIBS="-lfoo -lbar" ./configure .. + +This is correctly used by the configure checks, but doesn't end up in the +Makefile any more because of this override - Breaking static builds where +the configure script needs a bit of help to link with -lpthread when +alsa/portaudio is used (as those use pthreads internally). + +Fixes the following build issues from the Buildroot autobuilders: + +http://autobuild.buildroot.net/?reason=mpg123-1.23.3 + +(see https://git.buildroot.net/buildroot/tree/package/mpg123/mpg123.mk for +the build logic) + +Signed-off-by: Peter Korsgaard +--- + Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index d695a3b..863f59f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -9,7 +9,6 @@ + ACLOCAL_AMFLAGS = -I m4 + bin_PROGRAMS = + EXTRA_PROGRAMS = +-LIBS = + EXTRA_DIST = + pkglib_LTLIBRARIES = + lib_LTLIBRARIES = +-- +2.7.0 + diff --git a/package/mpg123/Config.in b/package/mpg123/Config.in new file mode 100644 index 0000000000..eacefada5d --- /dev/null +++ b/package/mpg123/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_MPG123 + bool "mpg123" + depends on BR2_USE_MMU # fork - in the application + help + Fast, free and portable MPEG audio player for Unix. It supports + MPEG 1.0/2.0 layers 1, 2 and 3. + + http://www.mpg123.de/ diff --git a/package/mpg123/mpg123.hash b/package/mpg123/mpg123.hash new file mode 100644 index 0000000000..a6424d3604 --- /dev/null +++ b/package/mpg123/mpg123.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 5c431da7e7446fae586c9207772dc0038ce2bfe75f0274a7933d1b4a7d84e6c6 mpg123-1.23.3.tar.bz2 diff --git a/package/mpg123/mpg123.mk b/package/mpg123/mpg123.mk new file mode 100644 index 0000000000..19a0de11e9 --- /dev/null +++ b/package/mpg123/mpg123.mk @@ -0,0 +1,85 @@ +################################################################################ +# +# mpg123 +# +################################################################################ + +MPG123_VERSION = 1.23.3 +MPG123_SOURCE = mpg123-$(MPG123_VERSION).tar.bz2 +MPG123_SITE = http://downloads.sourceforge.net/project/mpg123/mpg123/$(MPG123_VERSION) +MPG123_CONF_OPTS = --disable-lfs-alias +MPG123_INSTALL_STAGING = YES +MPG123_LICENSE = LGPLv2.1 +MPG123_LICENSE_FILES = COPYING +MPG123_DEPENDENCIES = host-pkgconf +# 0001-Makefile.am-don-t-override-LIBS.patch patches Makefile.am +MPG123_AUTORECONF = YES + +MPG123_CPU = $(if $(BR2_SOFT_FLOAT),generic_nofpu,generic_fpu) + +ifeq ($(BR2_aarch64),y) +MPG123_CPU = aarch64 +endif + +ifeq ($(BR2_arm),y) +ifeq ($(or $(BR2_ARM_CPU_HAS_NEON),$(BR2_ARM_CPU_HAS_VFPV2)),y) +MPG123_CPU = arm_fpu +else +MPG123_CPU = arm_nofpu +endif +endif + +ifeq ($(BR2_i386),y) +MPG123_CPU = x86 +endif + +ifeq ($(BR2_powerpc),y) +ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y) +MPG123_CPU = altivec +endif +ifeq ($(BR2_SOFT_FLOAT),y) +MPG123_CPU = ppc_nofpu +endif +endif # powerpc + +ifeq ($(BR2_x86_64),y) +MPG123_CPU = x86-64 +endif + +MPG123_CONF_OPTS += --with-cpu=$(MPG123_CPU) + +MPG123_AUDIO = dummy oss + +ifeq ($(BR2_PACKAGE_PORTAUDIO),y) +MPG123_AUDIO += portaudio +MPG123_CONF_OPTS += --with-default-audio=portaudio +MPG123_DEPENDENCIES += portaudio +# configure script does NOT use pkg-config to figure out how to link +# with portaudio, breaking static linking as portaudio uses pthreads +MPG123_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs portaudio-2.0`" +endif + +ifeq ($(BR2_PACKAGE_SDL),y) +MPG123_AUDIO += sdl +MPG123_CONF_OPTS += --with-default-audio=sdl +MPG123_DEPENDENCIES += sdl +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +MPG123_AUDIO += alsa +MPG123_CONF_OPTS += --with-default-audio=alsa +MPG123_DEPENDENCIES += alsa-lib +# configure script does NOT use pkg-config to figure out how to link +# with alsa, breaking static linking as alsa uses pthreads +MPG123_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs alsa`" +endif + +MPG123_CONF_OPTS += --with-audio=$(subst $(space),$(comma),$(MPG123_AUDIO)) + +ifeq ($(BR2_PACKAGE_LIBTOOL),y) +MPG123_DEPENDENCIES += libtool +# .la files gets stripped , so directly load .so files rather than .la +MPG123_CONF_OPTS += --with-modules --with-module-suffix=.so +endif + +$(eval $(autotools-package)) diff --git a/package/mplayer/0001-disable-install-strip.patch b/package/mplayer/0001-disable-install-strip.patch new file mode 100644 index 0000000000..1bd1dc00ae --- /dev/null +++ b/package/mplayer/0001-disable-install-strip.patch @@ -0,0 +1,23 @@ +Disable stripping on installation + +Using the -s option of install does not work, as it uses the host +strip instead of the cross strip. So, get rid of it, and let Buildroot +handle the stripping. + +[Vincent: tweak patch for version 1.2] + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Vicente Olivert Riera + +diff -Nrua a/configure b/configure +--- a/configure 2015-10-02 21:29:04.000000000 +0100 ++++ b/configure 2015-10-06 13:28:37.245349592 +0100 +@@ -2780,7 +2780,7 @@ + + + # Checking for CFLAGS +-_install_strip="-s" ++_install_strip= + if test -z "$CFLAGS" || test "$_profile" != "" || test "$_debug" != ""; then + if test "$cc_vendor" = "intel" ; then + CFLAGS="-O2 $_march $_mcpu $_pipe -fomit-frame-pointer" diff --git a/package/mplayer/0002-mpdemux-live555-async-interface.patch b/package/mplayer/0002-mpdemux-live555-async-interface.patch new file mode 100644 index 0000000000..5a62a18710 --- /dev/null +++ b/package/mplayer/0002-mpdemux-live555-async-interface.patch @@ -0,0 +1,126 @@ +From d3195ea13f4a9aae546ff996e53681349a1a3cdb Mon Sep 17 00:00:00 2001 +From: sherpya +Date: Fri, 14 Jun 2013 05:25:38 +0200 +Subject: [PATCH 25/27] mpdemux: live555 async interface + +From: https://raw.github.com/sherpya/mplayer-be/master/patches/mp/0025-mpdemux-live555-async-interface.patch + +Adjust live555 interface code for modern versions of live555. + +Signed-off-by: Peter Korsgaard +--- + libmpdemux/demux_rtp.cpp | 51 ++++++++++++++++++++++++++++++++---------------- + 2 files changed, 35 insertions(+), 22 deletions(-) + +diff --git a/libmpdemux/demux_rtp.cpp b/libmpdemux/demux_rtp.cpp +index ad7a7f1..05d06e0 100644 +--- a/libmpdemux/demux_rtp.cpp ++++ b/libmpdemux/demux_rtp.cpp +@@ -19,8 +19,6 @@ + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +-#define RTSPCLIENT_SYNCHRONOUS_INTERFACE 1 +- + extern "C" { + // on MinGW, we must include windows.h before the things it conflicts + #ifdef __MINGW32__ // with. they are each protected from +@@ -94,15 +92,6 @@ struct RTPState { + + extern "C" char* network_username; + extern "C" char* network_password; +-static char* openURL_rtsp(RTSPClient* client, char const* url) { +- // If we were given a user name (and optional password), then use them: +- if (network_username != NULL) { +- char const* password = network_password == NULL ? "" : network_password; +- return client->describeWithPassword(url, network_username, password); +- } else { +- return client->describeURL(url); +- } +-} + + static char* openURL_sip(SIPClient* client, char const* url) { + // If we were given a user name (and optional password), then use them: +@@ -118,6 +107,19 @@ static char* openURL_sip(SIPClient* client, char const* url) { + extern AVCodecContext *avcctx; + #endif + ++static char fWatchVariableForSyncInterface; ++static char* fResultString; ++static int fResultCode; ++ ++static void responseHandlerForSyncInterface(RTSPClient* rtspClient, int responseCode, char* responseString) { ++ // Set result values: ++ fResultCode = responseCode; ++ fResultString = responseString; ++ ++ // Signal a break from the event loop (thereby returning from the blocking command): ++ fWatchVariableForSyncInterface = ~0; ++} ++ + extern "C" int audio_id, video_id, dvdsub_id; + extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) { + Boolean success = False; +@@ -146,13 +148,19 @@ extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) { + rtsp_transport_http = demuxer->stream->streaming_ctrl->url->port; + rtsp_transport_tcp = 1; + } +- rtspClient = RTSPClient::createNew(*env, verbose, "MPlayer", rtsp_transport_http); ++ rtspClient = RTSPClient::createNew(*env, url, verbose, "MPlayer", rtsp_transport_http); + if (rtspClient == NULL) { + fprintf(stderr, "Failed to create RTSP client: %s\n", + env->getResultMsg()); + break; + } +- sdpDescription = openURL_rtsp(rtspClient, url); ++ fWatchVariableForSyncInterface = 0; ++ rtspClient->sendDescribeCommand(responseHandlerForSyncInterface); ++ env->taskScheduler().doEventLoop(&fWatchVariableForSyncInterface); ++ if (fResultCode == 0) ++ sdpDescription = fResultString; ++ else ++ delete[] fResultString; + } else { // SIP + unsigned char desiredAudioType = 0; // PCMU (use 3 for GSM) + sipClient = SIPClient::createNew(*env, desiredAudioType, NULL, +@@ -236,8 +244,12 @@ extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) { + + if (rtspClient != NULL) { + // Issue a RTSP "SETUP" command on the chosen subsession: +- if (!rtspClient->setupMediaSubsession(*subsession, False, +- rtsp_transport_tcp)) break; ++ fWatchVariableForSyncInterface = 0; ++ rtspClient->sendSetupCommand(*subsession, responseHandlerForSyncInterface, False, rtsp_transport_tcp); ++ env->taskScheduler().doEventLoop(&fWatchVariableForSyncInterface); ++ delete[] fResultString; ++ if (fResultCode != 0) break; ++ + if (!strcmp(subsession->mediumName(), "audio")) + audiofound = 1; + if (!strcmp(subsession->mediumName(), "video")) +@@ -248,7 +260,11 @@ extern "C" demuxer_t* demux_open_rtp(demuxer_t* demuxer) { + + if (rtspClient != NULL) { + // Issue a RTSP aggregate "PLAY" command on the whole session: +- if (!rtspClient->playMediaSession(*mediaSession)) break; ++ fWatchVariableForSyncInterface = 0; ++ rtspClient->sendPlayCommand(*mediaSession, responseHandlerForSyncInterface); ++ env->taskScheduler().doEventLoop(&fWatchVariableForSyncInterface); ++ delete[] fResultString; ++ if (fResultCode != 0) break; + } else if (sipClient != NULL) { + sipClient->sendACK(); // to start the stream flowing + } +@@ -637,7 +653,8 @@ static void teardownRTSPorSIPSession(RTPState* rtpState) { + MediaSession* mediaSession = rtpState->mediaSession; + if (mediaSession == NULL) return; + if (rtpState->rtspClient != NULL) { +- rtpState->rtspClient->teardownMediaSession(*mediaSession); ++ fWatchVariableForSyncInterface = 0; ++ rtpState->rtspClient->sendTeardownCommand(*mediaSession, NULL); + } else if (rtpState->sipClient != NULL) { + rtpState->sipClient->sendBYE(); + } +-- +1.8.5.2 + diff --git a/package/mplayer/0003-configure-armv8.patch b/package/mplayer/0003-configure-armv8.patch new file mode 100644 index 0000000000..98686433fb --- /dev/null +++ b/package/mplayer/0003-configure-armv8.patch @@ -0,0 +1,43 @@ +Fix aarch64 compile by adding HAVE_ARMV8 define + +Fixes build errors seen on the buildroot autobuilders: +http://autobuild.buildroot.net/results/5f8/5f85c32eb89aac48ae8da892d9800bd13274cd3e/build-end.log + +libavutil/aarch64/cpu.c: In function 'ff_get_cpu_flags_aarch64': +libavutil/aarch64/cpu.c:25:32: error: 'HAVE_ARMV8' undeclared (first use in this function) + return AV_CPU_FLAG_ARMV8 * HAVE_ARMV8 | + +Signed-off-by: Bernd Kuhls +(patch sent upstream: + http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2016-May/073496.html) + +Index: configure +=================================================================== +--- a/configure (revision 37871) ++++ b/configure (working copy) +@@ -1445,6 +1445,8 @@ + --disable-armv6) _armv6=no ;; + --enable-armv6t2) _armv6t2=yes ;; + --disable-armv6t2) _armv6t2=no ;; ++ --enable-armv8) _armv8=yes ;; ++ --disable-armv8) _armv8=no ;; + --enable-armvfp) _armvfp=yes ;; + --disable-armvfp) _armvfp=no ;; + --enable-vfpv3) vfpv3=yes ;; +@@ -3261,7 +3263,7 @@ + echores "$_iwmmxt" + fi + +-cpuexts_all='ALTIVEC XOP AVX AVX2 FMA3 FMA4 MMX MMX2 MMXEXT AMD3DNOW AMD3DNOWEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 FAST_CMOV I686 FAST_CLZ ARMV5TE ARMV6 ARMV6T2 VFP VFPV3 SETEND NEON IWMMXT MMI VIS MVI' ++cpuexts_all='ALTIVEC XOP AVX AVX2 FMA3 FMA4 MMX MMX2 MMXEXT AMD3DNOW AMD3DNOWEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 FAST_CMOV I686 FAST_CLZ ARMV5TE ARMV6 ARMV6T2 ARMV8 VFP VFPV3 SETEND NEON IWMMXT MMI VIS MVI' + test "$_altivec" = yes && cpuexts="ALTIVEC $cpuexts" + test "$_mmx" = yes && cpuexts="MMX $cpuexts" + test "$_mmxext" = yes && cpuexts="MMX2 $cpuexts" +@@ -3285,6 +3287,7 @@ + test "$_armv5te" = yes && cpuexts="ARMV5TE $cpuexts" + test "$_armv6" = yes && cpuexts="ARMV6 $cpuexts" + test "$_armv6t2" = yes && cpuexts="ARMV6T2 $cpuexts" ++test "$_armv8" = yes && cpuexts="ARMV8 $cpuexts" + test "$_armvfp" = yes && cpuexts="VFP $cpuexts" + test "$vfpv3" = yes && cpuexts="VFPV3 $cpuexts" + test "$setend" = yes && cpuexts="SETEND $cpuexts" diff --git a/package/mplayer/Config.in b/package/mplayer/Config.in new file mode 100644 index 0000000000..686b3b0143 --- /dev/null +++ b/package/mplayer/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_MPLAYER_ARCH_SUPPORTS + bool + default y + # Those architectures are not supported by MPlayer + depends on !(BR2_bfin || BR2_sh2a || BR2_sh4a || BR2_sh4aeb \ + || BR2_microblaze || BR2_nios2) + # Broken support for +Date: Wed, 20 Apr 2016 09:39:30 -0300 +Subject: [PATCH] wscript: don't check for fork() on POSIX checks + +It's not being used, and in fact prevents mpv from being built in nommu +architectures (cortex M, blackfin, ...) + +Signed-off-by: Gustavo Zacarias +--- +Status: pull request https://github.com/mpv-player/mpv/pull/3068 + + wscript | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wscript b/wscript +index a4ffce6..40328e4 100644 +--- a/wscript ++++ b/wscript +@@ -127,7 +127,7 @@ main_dependencies = [ + 'desc': 'POSIX environment', + # This should be good enough. + 'func': check_statement(['poll.h', 'unistd.h', 'sys/mman.h'], +- 'struct pollfd pfd; poll(&pfd, 1, 0); fork(); int f[2]; pipe(f); munmap(f,0)'), ++ 'struct pollfd pfd; poll(&pfd, 1, 0); int f[2]; pipe(f); munmap(f,0)'), + }, { + 'name': 'posix-or-mingw', + 'desc': 'development environment', +-- +2.7.3 + diff --git a/package/mpv/Config.in b/package/mpv/Config.in new file mode 100644 index 0000000000..1cef6c5009 --- /dev/null +++ b/package/mpv/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_MPV + bool "mpv" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_SWSCALE + select BR2_PACKAGE_ZLIB + # Select xkbcommon for wayland to avoid being mysterious + select BR2_PACKAGE_LIBXKBCOMMON if BR2_PACKAGE_WAYLAND + help + mpv is a fork of mplayer2 and MPlayer. It shares some features + with the former projects while introducing many more. + + https://mpv.io/ + +comment "mpv needs a toolchain w/ threads" + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/mpv/mpv.hash b/package/mpv/mpv.hash new file mode 100644 index 0000000000..da51f3ab1a --- /dev/null +++ b/package/mpv/mpv.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 602cd2b0f5fc7e43473234fbb96e3f7bbb6418f15eb8fa720d9433cce31eba6e v0.17.0.tar.gz +sha256 01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b waf-1.8.12 diff --git a/package/mpv/mpv.mk b/package/mpv/mpv.mk new file mode 100644 index 0000000000..cd8c31bd8f --- /dev/null +++ b/package/mpv/mpv.mk @@ -0,0 +1,263 @@ +################################################################################ +# +# mpv +# +################################################################################ + +MPV_VERSION = 0.17.0 +MPV_WAF_VERSION = 1.8.12 +MPV_SITE = https://github.com/mpv-player/mpv/archive +MPV_SOURCE = v$(MPV_VERSION).tar.gz +MPV_EXTRA_DOWNLOADS = https://waf.io/waf-$(MPV_WAF_VERSION) +MPV_DEPENDENCIES = \ + host-pkgconf ffmpeg zlib \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) +MPV_LICENSE = GPLv2+ +MPV_LICENSE_FILES = LICENSE + +# Some of these options need testing and/or tweaks +MPV_CONF_OPTS = \ + --prefix=/usr \ + --disable-android \ + --disable-caca \ + --disable-cdda \ + --disable-cocoa \ + --disable-coreaudio \ + --disable-gpl3 \ + --disable-libguess \ + --disable-libv4l2 \ + --disable-opensles \ + --disable-rpi \ + --disable-rsound \ + --disable-rubberband \ + --disable-uchardet \ + --disable-vapoursynth \ + --disable-vapoursynth-lazy \ + --disable-vdpau + +# ALSA support requires pcm+mixer +ifeq ($(BR2_PACKAGE_ALSA_LIB_MIXER)$(BR2_PACKAGE_ALSA_LIB_PCM),yy) +MPV_CONF_OPTS += --enable-alsa +MPV_DEPENDENCIES += alsa-lib +else +MPV_CONF_OPTS += --disable-alsa +endif + +# GBM support is provided by mesa3d when EGL=y +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y) +MPV_CONF_OPTS += --enable-gbm +MPV_DEPENDENIES += mesa3d +else +MPV_CONF_OPTS += --disable-gbm +endif + +# jack support +# It also requires 64-bit sync intrinsics +ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_8)$(BR2_PACKAGE_JACK2),yy) +MPV_CONF_OPTS += --enable-jack +MPV_DEPENDENCIES += jack2 +else +MPV_CONF_OPTS += --disable-jack +endif + +# jpeg support +ifeq ($(BR2_PACKAGE_JPEG),y) +MPV_CONF_OPTS += --enable-jpeg +MPV_DEPENDENCIES += jpeg +else +MPV_CONF_OPTS += --disable-jpeg +endif + +# lcms2 support +ifeq ($(BR2_PACKAGE_LCMS2),y) +MPV_CONF_OPTS += --enable-lcms2 +MPV_DEPENDENCIES += lcms2 +else +MPV_CONF_OPTS += --disable-lcms2 +endif + +# libarchive support +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +MPV_CONF_OPTS += --enable-libarchive +MPV_DEPENDENCIES += libarchive +else +MPV_CONF_OPTS += --disable-libarchive +endif + +# libass subtitle support +ifeq ($(BR2_PACKAGE_LIBASS),y) +MPV_CONF_OPTS += --enable-libass +MPV_DEPENDENCIES += libass +else +MPV_CONF_OPTS += --disable-libass +endif + +# bluray support +ifeq ($(BR2_PACKAGE_LIBBLURAY),y) +MPV_CONF_OPTS += --enable-libbluray +MPV_DEPENDENCIES += libbluray +else +MPV_CONF_OPTS += --disable-libbluray +endif + +# libdvdnav +ifeq ($(BR2_PACKAGE_LIBDVDNAV),y) +MPV_CONF_OPTS += --enable-dvdnav +MPV_DEPENDENCIES += libdvdnav +else +MPV_CONF_OPTS += --disable-dvdnav +endif + +# libdvdread +ifeq ($(BR2_PACKAGE_LIBDVDREAD),y) +MPV_CONF_OPTS += --enable-dvdread +MPV_DEPENDENCIES += libdvdread +else +MPV_CONF_OPTS += --disable-dvdread +endif + +# libdrm +ifeq ($(BR2_PACKAGE_LIBDRM),y) +MPV_CONF_OPTS += --enable-drm +MPV_DEPENDENCIES += libdrm +else +MPV_CONF_OPTS += --disable-drm +endif + +# libenca support +ifeq ($(BR2_PACKAGE_LIBENCA),y) +MPV_CONF_OPTS += --enable-enca +MPV_DEPENDENCIES += libenca +else +MPV_CONF_OPTS += --disable-enca +endif + +# LUA support, only for lua51/lua52/luajit +# This enables the controller (OSD) together with libass +ifeq ($(BR2_PACKAGE_LUA_5_1)$(BR2_PACKAGE_LUA_5_2)$(BR2_PACKAGE_LUAJIT),y) +MPV_CONF_OPTS += --enable-lua +MPV_DEPENDENCIES += luainterpreter +else +MPV_CONF_OPTS += --disable-lua +endif + +# OpenGL support +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) +MPV_CONF_OPTS += --enable-gl --enable-standard-gl +MPV_DEPENDENCIES += libgl +else +MPV_CONF_OPTS += --disable-gl --disable-standard-gl +endif + +# pulseaudio support +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +MPV_CONF_OPTS += --enable-pulse +MPV_DEPENDENCIES += pulseaudio +else +MPV_CONF_OPTS += --disable-pulse +endif + +# samba support +ifeq ($(BR2_PACKAGE_SAMBA4),y) +MPV_CONF_OPTS += --enable-libsmbclient +MPV_DEPENDENCIES += samba4 +else +MPV_CONF_OPTS += --disable-libsmbclient +endif + +# SDL support +# Both can't be used at the same time, prefer newer API +# It also requires 64-bit sync intrinsics +ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_8)$(BR2_PACKAGE_SDL2),yy) +MPV_CONF_OPTS += --enable-sdl2 --disable-sdl1 +MPV_DEPENDENCIES += sdl2 +else ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_8)$(BR2_PACKAGE_SDL),yy) +MPV_CONF_OPTS += --enable-sdl1 --disable-sdl2 +MPV_DEPENDENCIES += sdl +else +MPV_CONF_OPTS += --disable-sdl1 --disable-sdl2 +endif + +# va-api support +# This requires one or more of the egl-drm, wayland, x11 backends +# For now we support wayland and x11 +ifeq ($(BR2_PACKAGE_LIBVA),y) +ifneq ($(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_XLIB_LIBX11),) +MPV_CONF_OPTS += --enable-vaapi +MPV_DEPENDENCIES += libva +else +MPV_CONF_OPTS += --disable-vaapi +endif +else +MPV_CONF_OPTS += --disable-vaapi +endif + +# wayland support +ifeq ($(BR2_PACKAGE_WAYLAND),y) +MPV_CONF_OPTS += --enable-wayland +MPV_DEPENDENCIES += libxkbcommon wayland +else +MPV_CONF_OPTS += --disable-wayland +endif + +# Base X11 support +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +MPV_CONF_OPTS += --enable-x11 --disable-xss +MPV_DEPENDENCIES += xlib_libX11 +# xext +ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y) +MPV_CONF_OPTS += --enable-xext +MPV_DEPENDENCIES += xlib_libXext +else +MPV_CONF_OPTS += --disable-xext +endif +# xinerama +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +MPV_CONF_OPTS += --enable-xinerama +MPV_DEPENDENCIES += xlib_libXinerama +else +MPV_CONF_OPTS += --disable-xinerama +endif +# xrandr +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +MPV_CONF_OPTS += --enable-xrandr +MPV_DEPENDENCIES += xlib_libXrandr +else +MPV_CONF_OPTS += --disable-xrandr +endif +# XVideo +ifeq ($(BR2_PACKAGE_XLIB_LIBXV),y) +MPV_CONF_OPTS += --enable-xv +MPV_DEPENDENCIES += xlib_libXv +else +MPV_CONF_OPTS += --disable-xv +endif +else +MPV_CONF_OPTS += --disable-x11 +endif + +define MPV_COPY_WAF + $(INSTALL) -m 0755 $(DL_DIR)/waf-$(MPV_WAF_VERSION) $(@D)/waf +endef +MPV_POST_EXTRACT_HOOKS += MPV_COPY_WAF + +define MPV_CONFIGURE_CMDS + cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./waf configure $(MPV_CONF_OPTS) +endef + +define MPV_BUILD_CMDS + cd $(@D); \ + $(TARGET_MAKE_ENV) \ + ./waf build +endef + +define MPV_INSTALL_TARGET_CMDS + cd $(@D); \ + $(TARGET_MAKE_ENV) \ + DESTDIR=$(TARGET_DIR) \ + ./waf install +endef + +$(eval $(generic-package)) diff --git a/package/mraa/Config.in b/package/mraa/Config.in new file mode 100644 index 0000000000..2e5d3b128c --- /dev/null +++ b/package/mraa/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_MRAA + bool "mraa" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_arm || BR2_i386 || BR2_x86_64 + help + mraa is a C/C++ library with bindings to javascript & python + to interface with the IO on Galileo, Edison & other platforms, + with a structured and sane API where port names/numbering matches + the board that you are on. + + http://iotdk.intel.com/docs/master/mraa + +comment "mraa needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/mraa/mraa.mk b/package/mraa/mraa.mk new file mode 100644 index 0000000000..42cc2e3356 --- /dev/null +++ b/package/mraa/mraa.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# mraa +# +################################################################################ + +MRAA_VERSION = v0.9.1 +MRAA_SITE = $(call github,intel-iot-devkit,mraa,$(MRAA_VERSION)) +MRAA_LICENSE = MIT +MRAA_LICENSE_FILES = COPYING +MRAA_INSTALL_STAGING = YES + +# USBPLAT only makes sense with FTDI4222, which requires the ftd2xx library, +# which doesn't exist in buildroot + +MRAA_CONF_OPTS += \ + -DBUILDSWIG=OFF \ + -DUSBPLAT=OFF \ + -DFTDI4222=OFF \ + -DIPK=OFF \ + -DRPM=OFF \ + -DENABLEEXAMPLES=OFF \ + -DBUILDTESTS=OFF + +$(eval $(cmake-package)) diff --git a/package/mrouted/0001-DVMRP-report-missing-subnet.patch b/package/mrouted/0001-DVMRP-report-missing-subnet.patch new file mode 100644 index 0000000000..023c8cfd8d --- /dev/null +++ b/package/mrouted/0001-DVMRP-report-missing-subnet.patch @@ -0,0 +1,35 @@ +From 687f41680d51585e9a5a135e39efee330588bea7 Mon Sep 17 00:00:00 2001 +From: Matt Weber +Date: Fri, 11 Sep 2015 12:49:30 -0500 +Subject: [PATCH 1/1] DVMRP report missing subnet + +Accepted upstream and will be included in 3.9.8. +https://github.com/troglobit/mrouted/commit/512af5ffe0f48ffa2ba3b45898c66c2a561a5c2d + +A subnet is missing in the DVMRP report sent to it's neighbor after +the initial probe occurs. The issue was with the traversal of a double +linked list from end to start. Once the traversing pointer reaches +the start of routing table for loop (condition) it would break and +always drop the first subnet. + +Signed-off-by: Matt Weber +--- + route.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/route.c b/route.c +index f74e601..9fe779d 100644 +--- a/route.c ++++ b/route.c +@@ -1193,7 +1193,7 @@ static int report_chunk(int which_routes, struct rtentry *start_rt, vifi_t vifi, + + p = send_buf + MIN_IP_HEADER_LEN + IGMP_MINLEN; + +- for (r = start_rt; r != routing_table; r = r->rt_prev) { ++ for (r = start_rt; r != NULL; r = r->rt_prev) { + if (which_routes == CHANGED_ROUTES && !(r->rt_flags & RTF_CHANGED)) { + nrt++; + continue; +-- +1.9.1 + diff --git a/package/mrouted/Config.in b/package/mrouted/Config.in new file mode 100644 index 0000000000..bf4614d4af --- /dev/null +++ b/package/mrouted/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_MROUTED + bool "mrouted" + depends on BR2_USE_MMU # fork() + help + An implementation of the DVMRP multicast routing protocol. + + If built with uClibc, then UCLIBC_SUPPORT_AI_ADDRCONFIG is + needed in uClibc configuration. + + http://github.com/troglobit/mrouted diff --git a/package/mrouted/mrouted.mk b/package/mrouted/mrouted.mk new file mode 100644 index 0000000000..01b4a9f303 --- /dev/null +++ b/package/mrouted/mrouted.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# mrouted +# +################################################################################ + +MROUTED_VERSION = 3.9.7 +MROUTED_SITE = $(call github,troglobit,mrouted,$(MROUTED_VERSION)) +MROUTED_DEPENDENCIES = host-bison +MROUTED_LICENSE = BSD-3c +MROUTED_LICENSE_FILES = LICENSE + +define MROUTED_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_MAKE_ENV) $(@D)/configure --enable-rsrr \ + ) +endef + +define MROUTED_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define MROUTED_INSTALL_TARGET_CMDS + $(MAKE) prefix=/usr DESTDIR=$(TARGET_DIR) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/msgpack/Config.in b/package/msgpack/Config.in new file mode 100644 index 0000000000..b8e82138fa --- /dev/null +++ b/package/msgpack/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_MSGPACK + bool "msgpack" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + help + MessagePack is an efficient binary serialization format. + + It lets you exchange data among multiple languages like JSON but + it's faster and smaller. + + http://msgpack.org/ + +comment "msgpack needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_SYNC_4 diff --git a/package/msgpack/msgpack.hash b/package/msgpack/msgpack.hash new file mode 100644 index 0000000000..8cd8cb6599 --- /dev/null +++ b/package/msgpack/msgpack.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 97a371ef950c89f48e8dba6abeccab07f1887e9ba6dab921de0f985c7d5075fe msgpack-0.5.4.tar.gz diff --git a/package/msgpack/msgpack.mk b/package/msgpack/msgpack.mk new file mode 100644 index 0000000000..9e23948608 --- /dev/null +++ b/package/msgpack/msgpack.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# msgpack +# +################################################################################ + +MSGPACK_VERSION = 0.5.4 +MSGPACK_SITE = http://downloads.sourceforge.net/project/msgpack/msgpack/cpp +MSGPACK_LICENSE = Apache-2.0 +MSGPACK_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/msmtp/Config.in b/package/msmtp/Config.in new file mode 100644 index 0000000000..46bb1985e3 --- /dev/null +++ b/package/msmtp/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_MSMTP + bool "msmtp" + help + msmtp is an SMTP client. In the default mode, it transmits a + mail to an SMTP server (for example at a free mail provider) + which takes care of further delivery. + + http://msmtp.sourceforge.net/ diff --git a/package/msmtp/msmtp.hash b/package/msmtp/msmtp.hash new file mode 100644 index 0000000000..fb03e05a0d --- /dev/null +++ b/package/msmtp/msmtp.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/msmtp/files/msmtp/1.6.2/ +md5 3baca93c7e5f1aa9d36a2e5b38739ab9 msmtp-1.6.2.tar.xz +sha1 2d2272d04851b9bc806a77f47344e61840185329 msmtp-1.6.2.tar.xz diff --git a/package/msmtp/msmtp.mk b/package/msmtp/msmtp.mk new file mode 100644 index 0000000000..7c8261e704 --- /dev/null +++ b/package/msmtp/msmtp.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# msmtp +# +################################################################################ + +MSMTP_VERSION = 1.6.2 +MSMTP_SITE = http://downloads.sourceforge.net/project/msmtp/msmtp/$(MSMTP_VERSION) +MSMTP_SOURCE = msmtp-$(MSMTP_VERSION).tar.xz +MSMTP_DEPENDENCIES = host-pkgconf +MSMTP_CONF_OPTS = \ + --without-libidn \ + --disable-gai-idn \ + --without-libgsasl +MSMTP_LICENSE = GPLv3+ +MSMTP_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBSECRET),y) +MSMTP_CONF_OPTS += --with-libsecret +MSMTP_DEPENDENCIES += libsecret +else +MSMTP_CONF_OPTS += --without-libsecret +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +MSMTP_CONF_OPTS += --with-ssl=openssl +MSMTP_DEPENDENCIES += openssl +ifeq ($(BR2_STATIC_LIBS),y) +# openssl uses zlib, so we need to explicitly link with it when static +MSMTP_CONF_ENV += LIBS=-lz +endif +else ifeq ($(BR2_PACKAGE_GNUTLS),y) +MSMTP_CONF_OPTS += --with-ssl=gnutls +MSMTP_DEPENDENCIES += gnutls +else +MSMTP_CONF_OPTS += --with-ssl=no +endif + +$(eval $(autotools-package)) diff --git a/package/msr-tools/Config.in b/package/msr-tools/Config.in new file mode 100644 index 0000000000..dde19f7897 --- /dev/null +++ b/package/msr-tools/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_MSR_TOOLS + bool "msr-tools" + depends on BR2_i386 || BR2_x86_64 + help + The MSR Tools project provides utilities to access x86 + processor MSRs and CPU ID directly. + + Those tools access the hardware through the + /dev/cpu//msr and /dev/cpu//cpuid devices. This + necessitates msr and cpuid support in the kernel, which + means you need a kernel compiled with configuration options + CONFIG_X86_CPUID and CONFIG_X86_MSR enabled. + + https://01.org/msr-tools diff --git a/package/msr-tools/msr-tools.hash b/package/msr-tools/msr-tools.hash new file mode 100644 index 0000000000..18146df51e --- /dev/null +++ b/package/msr-tools/msr-tools.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 9b87245ee091a798184e447066e9e0d7709b7c81f5e6ad55f2b958c1aa50c4a3 msr-tools-1.3.tar.gz diff --git a/package/msr-tools/msr-tools.mk b/package/msr-tools/msr-tools.mk new file mode 100644 index 0000000000..4f84a288d2 --- /dev/null +++ b/package/msr-tools/msr-tools.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# msr-tools +# +################################################################################ + +MSR_TOOLS_VERSION = 1.3 +MSR_TOOLS_SITE = $(call github,01org,msr-tools,msr-tools-$(MSR_TOOLS_VERSION)) +MSR_TOOLS_LICENSE = GPLv2 +MSR_TOOLS_LICENSE_FILES = cpuid.c + +define MSR_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define MSR_TOOLS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) install \ + sbindir="$(TARGET_DIR)/usr/sbin" +endef + +$(eval $(generic-package)) diff --git a/package/mtd/0001-mtd-utils-ubinize-Always-return-error-code-at-least-.patch b/package/mtd/0001-mtd-utils-ubinize-Always-return-error-code-at-least-.patch new file mode 100644 index 0000000000..077ca0c6a9 --- /dev/null +++ b/package/mtd/0001-mtd-utils-ubinize-Always-return-error-code-at-least-.patch @@ -0,0 +1,64 @@ +From 5f50207231414bfdbac8f0f974a2824f24177d6e Mon Sep 17 00:00:00 2001 +From: Enrico Jorns +Date: Fri, 11 Sep 2015 15:28:13 +0200 +Subject: [PATCH] mtd-utils: ubinize: Always return error code (at least -1) in + case of an error + +ubinize should not fail silenty, this can be very annoying when using +it from other tools that rely on the exit code for determining the +success of their operation. + +Signed-off-by: Enrico Jorns +Signed-off-by: Brian Norris +Signed-off-by: Luca Ceresoli +--- + ubi-utils/ubinize.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/ubi-utils/ubinize.c b/ubi-utils/ubinize.c +index 34f465a..60bbd9a 100644 +--- a/ubi-utils/ubinize.c ++++ b/ubi-utils/ubinize.c +@@ -519,6 +519,7 @@ int main(int argc, char * const argv[]) + */ + seek = ui.peb_size * 2; + if (lseek(args.out_fd, seek, SEEK_SET) != seek) { ++ err = -1; + sys_errmsg("cannot seek file \"%s\"", args.f_out); + goto out_free; + } +@@ -530,6 +531,7 @@ int main(int argc, char * const argv[]) + int fd, j; + + if (!sname) { ++ err = -1; + errmsg("ini-file parsing error (iniparser_getsecname)"); + goto out_free; + } +@@ -550,6 +552,7 @@ int main(int argc, char * const argv[]) + */ + for (j = 0; j < i; j++) { + if (vi[i].id == vi[j].id) { ++ err = -1; + errmsg("volume IDs must be unique, but ID %d " + "in section \"%s\" is not", + vi[i].id, sname); +@@ -557,6 +560,7 @@ int main(int argc, char * const argv[]) + } + + if (!strcmp(vi[i].name, vi[j].name)) { ++ err = -1; + errmsg("volume name must be unique, but name " + "\"%s\" in section \"%s\" is not", + vi[i].name, sname); +@@ -580,6 +584,7 @@ int main(int argc, char * const argv[]) + if (img) { + fd = open(img, O_RDONLY); + if (fd == -1) { ++ err = fd; + sys_errmsg("cannot open \"%s\"", img); + goto out_free; + } +-- +1.9.1 + diff --git a/package/mtd/Config.in b/package/mtd/Config.in new file mode 100644 index 0000000000..6e4346f298 --- /dev/null +++ b/package/mtd/Config.in @@ -0,0 +1,162 @@ +config BR2_PACKAGE_MTD + bool "mtd, jffs2 and ubi/ubifs tools" + help + Build mtd, jffs2 and ubi/ubifs tools + + http://www.linux-mtd.infradead.org/ + +if BR2_PACKAGE_MTD +comment "MTD tools selection" + +config BR2_PACKAGE_MTD_DOCFDISK + bool "docfdisk" + +config BR2_PACKAGE_MTD_DOC_LOADBIOS + bool "doc_loadbios" + +config BR2_PACKAGE_MTD_FLASHCP + bool "flashcp" + default y + +config BR2_PACKAGE_MTD_FLASH_ERASE + bool "flash_erase" + default y + +config BR2_PACKAGE_MTD_FLASH_LOCK + bool "flash_lock" + default y + +config BR2_PACKAGE_MTD_FLASH_OTP_DUMP + bool "flash_otp_dump" + +config BR2_PACKAGE_MTD_FLASH_OTP_INFO + bool "flash_otp_info" + +config BR2_PACKAGE_MTD_FLASH_OTP_LOCK + bool "flash_otp_lock" + +config BR2_PACKAGE_MTD_FLASH_OTP_WRITE + bool "flash_otp_write" + +config BR2_PACKAGE_MTD_FLASH_UNLOCK + bool "flash_unlock" + default y + +config BR2_PACKAGE_MTD_FTL_CHECK + bool "ftl_check" + +config BR2_PACKAGE_MTD_FTL_FORMAT + bool "ftl_format" + +config BR2_PACKAGE_MTD_JFFS2DUMP + bool "jffs2dump" + +config BR2_PACKAGE_MTD_MKFSJFFS2 + bool "mkfs.jffs2" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LZO + +config BR2_PACKAGE_MTD_MKFSUBIFS + bool "mkfs.ubifs" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LZO + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + depends on BR2_USE_WCHAR # util-linux + +comment "mkfs.ubifs needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_MTD_MTD_DEBUG + bool "mtd_debug" + default y + +config BR2_PACKAGE_MTD_MTDPART + bool "mtdpart" + +config BR2_PACKAGE_MTD_NANDDUMP + bool "nanddump" + default y + +config BR2_PACKAGE_MTD_NANDTEST + bool "nandtest" + default y + +config BR2_PACKAGE_MTD_NANDWRITE + bool "nandwrite" + default y + +config BR2_PACKAGE_MTD_NFTLDUMP + bool "nftldump" + +config BR2_PACKAGE_MTD_NFTL_FORMAT + bool "nftl_format" + +config BR2_PACKAGE_MTD_RECV_IMAGE + bool "recv_image" + +config BR2_PACKAGE_MTD_RFDDUMP + bool "rfddump" + +config BR2_PACKAGE_MTD_RFDFORMAT + bool "rfdformat" + +config BR2_PACKAGE_MTD_SERVE_IMAGE + bool "serve_image" + +config BR2_PACKAGE_MTD_SUMTOOL + bool "sumtool" + +config BR2_PACKAGE_MTD_MTDINFO + bool "mtdinfo" + default y + +config BR2_PACKAGE_MTD_UBIATTACH + bool "ubiattach" + default y + +config BR2_PACKAGE_MTD_UBICRC32 + bool "ubicrc32" + default y + +config BR2_PACKAGE_MTD_UBIDETACH + bool "ubidetach" + default y + +config BR2_PACKAGE_MTD_UBIFORMAT + bool "ubiformat" + default y + +config BR2_PACKAGE_MTD_UBIMKVOL + bool "ubimkvol" + default y + +config BR2_PACKAGE_MTD_UBINFO + bool "ubinfo" + default y + +config BR2_PACKAGE_MTD_UBINIZE + bool "ubinize" + default y + +config BR2_PACKAGE_MTD_UBIRENAME + bool "ubirename" + default y + +config BR2_PACKAGE_MTD_UBIRMVOL + bool "ubirmvol" + default y + +config BR2_PACKAGE_MTD_UBIRSVOL + bool "ubirsvol" + default y + +config BR2_PACKAGE_MTD_UBIUPDATEVOL + bool "ubiupdatevol" + default y + +config BR2_PACKAGE_MTD_UBIBLOCK + bool "ubiblock" + default y + +endif diff --git a/package/mtd/Config.in.host b/package/mtd/Config.in.host new file mode 100644 index 0000000000..3752266156 --- /dev/null +++ b/package/mtd/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_MTD + bool "host mtd, jffs2 and ubi/ubifs tools" + help + Build mtd, jffs2 and ubi/ubifs tools + + http://www.linux-mtd.infradead.org/ diff --git a/package/mtd/mtd.hash b/package/mtd/mtd.hash new file mode 100644 index 0000000000..a99e04e51c --- /dev/null +++ b/package/mtd/mtd.hash @@ -0,0 +1,3 @@ +# Locally calculated after checking pgp signature +# ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.5.2.tar.bz2.asc +sha256 5db57389280a3abaec5dd23af2590988b70f213fa3929c12a2642c8f9a86f400 mtd-utils-1.5.2.tar.bz2 diff --git a/package/mtd/mtd.mk b/package/mtd/mtd.mk new file mode 100644 index 0000000000..bf90212f5c --- /dev/null +++ b/package/mtd/mtd.mk @@ -0,0 +1,122 @@ +################################################################################ +# +# mtd +# +################################################################################ + +MTD_VERSION = 1.5.2 +MTD_SOURCE = mtd-utils-$(MTD_VERSION).tar.bz2 +MTD_SITE = ftp://ftp.infradead.org/pub/mtd-utils +MTD_LICENSE = GPLv2 +MTD_LICENSE_FILES = COPYING + +MTD_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_MTD_MKFSJFFS2),y) +MTD_DEPENDENCIES = zlib lzo +endif + +ifeq ($(BR2_PACKAGE_MTD_MKFSUBIFS),y) +MTD_DEPENDENCIES += util-linux zlib lzo host-pkgconf +define MTD_ADD_MISSING_LINTL + $(SED) "/^LDLIBS_mkfs\.ubifs/ s%$$% `$(PKG_CONFIG_HOST_BINARY) --libs uuid`%" \ + $(@D)/Makefile +endef +MTD_POST_PATCH_HOOKS += MTD_ADD_MISSING_LINTL +endif + +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +MTD_DEPENDENCIES += busybox +endif + +# If extended attributes are required, the acl package must +# also be enabled which will also include the attr package. +ifeq ($(BR2_PACKAGE_ACL),y) +MTD_DEPENDENCIES += acl +MTD_MAKE_OPTS += WITHOUT_XATTR=0 +else +MTD_MAKE_OPTS += WITHOUT_XATTR=1 +endif + +HOST_MTD_DEPENDENCIES = host-zlib host-lzo host-e2fsprogs + +define HOST_MTD_BUILD_CMDS + $(HOST_CONFIGURE_OPTS) $(MAKE1) \ + CROSS= BUILDDIR=$(@D) WITHOUT_XATTR=1 -C $(@D) +endef + +define HOST_MTD_INSTALL_CMDS + $(MAKE1) BUILDDIR=$(@D) DESTDIR=$(HOST_DIR) -C $(@D) install +endef + +MKFS_JFFS2 = $(HOST_DIR)/usr/sbin/mkfs.jffs2 +SUMTOOL = $(HOST_DIR)/usr/sbin/sumtool + +MTD_STAGING_y = lib/libmtd.a ubi-utils/libubi.a +MTD_TARGETS_$(BR2_PACKAGE_MTD_DOCFDISK) += docfdisk +MTD_TARGETS_$(BR2_PACKAGE_MTD_DOC_LOADBIOS) += doc_loadbios +MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASHCP) += flashcp +MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_ERASE) += flash_erase +MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_LOCK) += flash_lock +MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_OTP_DUMP) += flash_otp_dump +MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_OTP_INFO) += flash_otp_info +MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_OTP_LOCK) += flash_otp_lock +MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_OTP_WRITE) += flash_otp_write +MTD_TARGETS_$(BR2_PACKAGE_MTD_FLASH_UNLOCK) += flash_unlock +MTD_TARGETS_$(BR2_PACKAGE_MTD_FTL_CHECK) += ftl_check +MTD_TARGETS_$(BR2_PACKAGE_MTD_FTL_FORMAT) += ftl_format +MTD_TARGETS_$(BR2_PACKAGE_MTD_JFFS2DUMP) += jffs2dump +MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSJFFS2) += mkfs.jffs2 +MTD_TARGETS_$(BR2_PACKAGE_MTD_MTD_DEBUG) += mtd_debug +MTD_TARGETS_$(BR2_PACKAGE_MTD_MTDPART) += mtdpart +MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDDUMP) += nanddump +MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDTEST) += nandtest +MTD_TARGETS_$(BR2_PACKAGE_MTD_NANDWRITE) += nandwrite +MTD_TARGETS_$(BR2_PACKAGE_MTD_NFTLDUMP) += nftldump +MTD_TARGETS_$(BR2_PACKAGE_MTD_NFTL_FORMAT) += nftl_format +MTD_TARGETS_$(BR2_PACKAGE_MTD_RECV_IMAGE) += recv_image +MTD_TARGETS_$(BR2_PACKAGE_MTD_RFDDUMP) += rfddump +MTD_TARGETS_$(BR2_PACKAGE_MTD_RFDFORMAT) += rfdformat +MTD_TARGETS_$(BR2_PACKAGE_MTD_SERVE_IMAGE) += serve_image +MTD_TARGETS_$(BR2_PACKAGE_MTD_SUMTOOL) += sumtool + +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_MTDINFO) += mtdinfo +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIATTACH) += ubiattach +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBICRC32) += ubicrc32 +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIDETACH) += ubidetach +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIFORMAT) += ubiformat +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIMKVOL) += ubimkvol +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBINFO) += ubinfo +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBINIZE) += ubinize +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIRENAME) += ubirename +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIRMVOL) += ubirmvol +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIRSVOL) += ubirsvol +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIUPDATEVOL) += ubiupdatevol +MTD_TARGETS_UBI_$(BR2_PACKAGE_MTD_UBIBLOCK) += ubiblock + +MTD_TARGETS_y += $(addprefix ubi-utils/,$(MTD_TARGETS_UBI_y)) +MTD_TARGETS_$(BR2_PACKAGE_MTD_MKFSUBIFS) += mkfs.ubifs/mkfs.ubifs + +define MTD_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE1) CROSS=$(TARGET_CROSS) \ + BUILDDIR=$(@D) $(MTD_MAKE_OPTS) -C $(@D) \ + $(addprefix $(@D)/,$(MTD_TARGETS_y)) \ + $(addprefix $(@D)/,$(MTD_STAGING_y)) +endef + +define MTD_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/lib/libmtd.a $(STAGING_DIR)/usr/lib/libmtd.a + $(INSTALL) -D -m 0755 $(@D)/ubi-utils/libubi.a $(STAGING_DIR)/usr/lib/libubi.a + $(INSTALL) -D -m 0644 $(@D)/include/libmtd.h $(STAGING_DIR)/usr/include/mtd/libmtd.h + $(INSTALL) -D -m 0644 $(@D)/ubi-utils/include/libubi.h $(STAGING_DIR)/usr/include/mtd/libubi.h + $(INSTALL) -D -m 0644 $(@D)/include/mtd/ubi-media.h $(STAGING_DIR)/usr/include/mtd/ubi-media.h +endef + +define MTD_INSTALL_TARGET_CMDS + for f in $(MTD_TARGETS_y) ; do \ + $(INSTALL) -D -m 0755 $(@D)/$$f $(TARGET_DIR)/usr/sbin/$${f##*/} ; \ + done +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/mtdev/Config.in b/package/mtdev/Config.in new file mode 100644 index 0000000000..afdd7dca6b --- /dev/null +++ b/package/mtdev/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_MTDEV + bool "mtdev" + help + The mtdev is a stand-alone library which transforms all + variants of kernel MT events to the slotted type B protocol. + + http://bitmath.org/code/mtdev/ diff --git a/package/mtdev/mtdev.hash b/package/mtdev/mtdev.hash new file mode 100644 index 0000000000..7ba5ffdf52 --- /dev/null +++ b/package/mtdev/mtdev.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 6b59b055ff22f2b91d4284187c2515826c338b81f6f33bd90f6bedc7c1fb9a38 mtdev-1.1.4.tar.bz2 diff --git a/package/mtdev/mtdev.mk b/package/mtdev/mtdev.mk new file mode 100644 index 0000000000..fc6ee4c46b --- /dev/null +++ b/package/mtdev/mtdev.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# mtdev +# +################################################################################ + +MTDEV_VERSION = 1.1.4 +MTDEV_SOURCE = mtdev-$(MTDEV_VERSION).tar.bz2 +MTDEV_SITE = http://bitmath.org/code/mtdev + +MTDEV_LICENSE = MIT +MTDEV_LICENSE_FILES = COPYING +MTDEV_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/mtdev2tuio/0001-Fix-build-with-musl-libc.patch b/package/mtdev2tuio/0001-Fix-build-with-musl-libc.patch new file mode 100644 index 0000000000..810b66c61b --- /dev/null +++ b/package/mtdev2tuio/0001-Fix-build-with-musl-libc.patch @@ -0,0 +1,30 @@ +From f974bb1f92603973711bea36a7869dfa8358aae0 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sun, 31 Jan 2016 09:04:46 +0100 +Subject: [PATCH 1/1] Fix build with musl libc + +Include missing header to prevent build error detected by buildroot: +http://autobuild.buildroot.net/results/aee/aee411047265bf205f8990a3d0d2310decb5fd19/build-end.log + +Signed-off-by: Bernd Kuhls +--- +Patch sent upstream: https://github.com/olivopaolo/mtdev2tuio/pull/2 + + mtdev2tuio.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/mtdev2tuio.c b/mtdev2tuio.c +index 3a9174f..f2c98d5 100644 +--- a/mtdev2tuio.c ++++ b/mtdev2tuio.c +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + + #define NSEC_PER_USEC 1000L + #define NSEC_PER_SEC 1000000000L +-- +2.7.0.rc3 + diff --git a/package/mtdev2tuio/Config.in b/package/mtdev2tuio/Config.in new file mode 100644 index 0000000000..4195ecfeeb --- /dev/null +++ b/package/mtdev2tuio/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_MTDEV2TUIO + bool "mtdev2tuio" + select BR2_PACKAGE_LIBLO + select BR2_PACKAGE_MTDEV + depends on BR2_TOOLCHAIN_HAS_THREADS # liblo + help + mtdev2tuio is a simple application for converting touch + events captured from libmtdev to TUIO 1.1 + + https://github.com/olivopaolo/mtdev2tuio + +comment "mtdev2tuio needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/mtdev2tuio/mtdev2tuio.mk b/package/mtdev2tuio/mtdev2tuio.mk new file mode 100644 index 0000000000..7b00221c6a --- /dev/null +++ b/package/mtdev2tuio/mtdev2tuio.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# mtdev2tuio +# +################################################################################ + +MTDEV2TUIO_VERSION = e1e7378d86abe751158e743586133022f32fa4d1 +MTDEV2TUIO_SITE = $(call github,olivopaolo,mtdev2tuio,$(MTDEV2TUIO_VERSION)) +MTDEV2TUIO_DEPENDENCIES = mtdev liblo +MTDEV2TUIO_LICENSE = GPLv3+ +MTDEV2TUIO_LICENSE_FILES = COPYING + +# mtdev2tuio Makefile misuses $(LD) as gcc, so we need to override LD +# here. Liblo uses log(3), so we need to link with -lm +define MTDEV2TUIO_BUILD_CMDS + $(MAKE) \ + $(TARGET_CONFIGURE_OPTS) \ + LD="$(TARGET_CC)" \ + LIBS="-lmtdev -llo -lm" \ + -C $(@D) +endef + +define MTDEV2TUIO_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/mtdev2tuio $(TARGET_DIR)/usr/bin/mtdev2tuio +endef + +$(eval $(generic-package)) diff --git a/package/mtools/Config.in b/package/mtools/Config.in new file mode 100644 index 0000000000..e51bac121c --- /dev/null +++ b/package/mtools/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_MTOOLS + bool "mtools" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + help + Mtools is a collection of utilities to access MS-DOS disks from + Unix without mounting them. It supports Win'95 style long file + names, OS/2 Xdf disks and 2m disks (store up to 1992k on a high + density 3 1/2 disk). + + http://www.gnu.org/software/mtools/ + +comment "mtools needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + depends on BR2_USE_MMU diff --git a/package/mtools/Config.in.host b/package/mtools/Config.in.host new file mode 100644 index 0000000000..96b332b039 --- /dev/null +++ b/package/mtools/Config.in.host @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_MTOOLS + bool "host mtools" + help + Mtools is a collection of utilities to access MS-DOS disks from + Unix without mounting them. It supports Win'95 style long file + names, OS/2 Xdf disks and 2m disks (store up to 1992k on a high + density 3 1/2 disk). + + http://www.gnu.org/software/mtools/ diff --git a/package/mtools/mtools.hash b/package/mtools/mtools.hash new file mode 100644 index 0000000000..5d86498cdc --- /dev/null +++ b/package/mtools/mtools.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 59e9cf80885399c4f229e5d87e49c0c2bfeec044e1386d59fcd0b0aead6b2f85 mtools-4.0.18.tar.bz2 diff --git a/package/mtools/mtools.mk b/package/mtools/mtools.mk new file mode 100644 index 0000000000..fc145c0832 --- /dev/null +++ b/package/mtools/mtools.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# mtools +# +################################################################################ + +MTOOLS_VERSION = 4.0.18 +MTOOLS_SOURCE = mtools-$(MTOOLS_VERSION).tar.bz2 +MTOOLS_SITE = $(BR2_GNU_MIRROR)/mtools +MTOOLS_LICENSE = GPLv3+ +MTOOLS_LICENSE_FILES = COPYING +MTOOLS_CONF_OPTS = --without-x +# info documentation not needed +MTOOLS_CONF_ENV = \ + ac_cv_func_setpgrp_void=yes \ + ac_cv_path_INSTALL_INFO= + +HOST_MTOOLS_CONF_ENV = \ + ac_cv_path_INSTALL_INFO= + +# link with iconv if enabled +ifeq ($(BR2_PACKAGE_LIBICONV),y) +MTOOLS_DEPENDENCIES += libiconv +MTOOLS_CONF_ENV += LIBS=-liconv +# We have no host dependencies +HOST_MTOOLS_DEPENDENCIES = +endif + +# Package does not build in parallel due to improper make rules +MTOOLS_MAKE = $(MAKE1) + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/mtr/Config.in b/package/mtr/Config.in new file mode 100644 index 0000000000..ec83e25cb1 --- /dev/null +++ b/package/mtr/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_MTR + bool "mtr" + depends on BR2_USE_MMU # fork() + help + mtr combines the functionality of the 'traceroute' and 'ping' + programs in a single network diagnostic tool. + + http://www.bitwizard.nl/mtr/ diff --git a/package/mtr/mtr.hash b/package/mtr/mtr.hash new file mode 100644 index 0000000000..f3df81f42a --- /dev/null +++ b/package/mtr/mtr.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 12a6a94c0ec04d508de27eda5f5ba91f50d4b5fe74a98aca0973e2c16a42555a mtr-66de3ecbab28b054b868a73fbb57f30549d770ac.tar.gz diff --git a/package/mtr/mtr.mk b/package/mtr/mtr.mk new file mode 100644 index 0000000000..5ee61249eb --- /dev/null +++ b/package/mtr/mtr.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# mtr +# +################################################################################ + +MTR_VERSION = 66de3ecbab28b054b868a73fbb57f30549d770ac +MTR_SITE = $(call github,traviscross,mtr,$(MTR_VERSION)) +MTR_AUTORECONF = YES +MTR_CONF_OPTS = --without-gtk +MTR_DEPENDENCIES = host-pkgconf $(if $(BR2_PACKAGE_NCURSES),ncurses) +MTR_LICENSE = GPLv2 +MTR_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/multicat/0001-Fix-missing-pthread.patch b/package/multicat/0001-Fix-missing-pthread.patch new file mode 100644 index 0000000000..1ad2c98772 --- /dev/null +++ b/package/multicat/0001-Fix-missing-pthread.patch @@ -0,0 +1,20 @@ +Makefile: link with pthread + +Otherwise building multicat in a static context fails: + aggregartp.c:381: undefined reference to `pthread_self' + +Signed-off-by: Jörg Krause +Sent upstream: https://mailman.videolan.org/pipermail/multicat-devel/2016-March/000125.html + +diff -purN multicat-2.1.orig/Makefile multicat-2.1/Makefile +--- multicat-2.1.orig/Makefile 2015-10-05 18:36:29.000000000 +0200 ++++ multicat-2.1/Makefile 2016-03-19 21:47:59.467745127 +0100 +@@ -4,7 +4,7 @@ VERSION = 2.1 + CFLAGS += -Wall -Wformat-security -O3 -fomit-frame-pointer -D_FILE_OFFSET_BITS=64 -D_ISOC99_SOURCE -D_BSD_SOURCE + CFLAGS += -g + # Comment out the following line for Mac OS X build +-LDLIBS += -lrt ++LDLIBS += -lrt -pthread + + OBJ_MULTICAT = multicat.o util.o + OBJ_INGESTS = ingests.o util.o diff --git a/package/multicat/0002-Fix-musl-build.patch b/package/multicat/0002-Fix-musl-build.patch new file mode 100644 index 0000000000..07e15a353a --- /dev/null +++ b/package/multicat/0002-Fix-musl-build.patch @@ -0,0 +1,47 @@ +Fix musl build + +Defining _GNU_SOURCE is required to get proper member names in `struct udphdr` +when building against musl. Build error: + + util.c: In function 'RawFillHeaders': + util.c:481:9: error: 'struct udphdr' has no member named 'source' + udph->source = htons(portsrc); + ^ + util.c:482:9: error: 'struct udphdr' has no member named 'dest' + udph->dest = htons(portdst); + ^ + util.c:483:9: error: 'struct udphdr' has no member named 'len' + udph->len = htons(sizeof(struct udphdr) + len); + ^ + util.c:484:9: error: 'struct udphdr' has no member named 'check' + udph->check = 0; + +Including in needed for mode_t, otherwise musl build fails: + util.h:91:1: error: unknown type name 'mode_t' + +Signed-off-by: Jörg Krause +Sent upstream: https://mailman.videolan.org/pipermail/multicat-devel/2016-March/000126.html + +diff -purN multicat-2.1.orig/util.c multicat-2.1/util.c +--- multicat-2.1.orig/util.c 2015-07-17 18:03:17.000000000 +0200 ++++ multicat-2.1/util.c 2016-03-19 22:21:01.110178772 +0100 +@@ -21,6 +21,8 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + *****************************************************************************/ + ++#define _GNU_SOURCE ++ + #include + #include + #include +diff -purN multicat-2.1.orig/util.h multicat-2.1/util.h +--- multicat-2.1.orig/util.h 2015-07-15 22:47:39.000000000 +0200 ++++ multicat-2.1/util.h 2016-03-19 22:21:58.649834990 +0100 +@@ -21,6 +21,7 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. + *****************************************************************************/ + ++#include + #include + #include + diff --git a/package/multicat/0003-Fix-have-clock-nanosleep-with-uclibc.patch b/package/multicat/0003-Fix-have-clock-nanosleep-with-uclibc.patch new file mode 100644 index 0000000000..108fb0b85b --- /dev/null +++ b/package/multicat/0003-Fix-have-clock-nanosleep-with-uclibc.patch @@ -0,0 +1,24 @@ +uClibc may be configured without support for clock_nanosleep(). The function is +only available with uClibc if the C library is build with NPTL support (sets +__UCLIBC_HAS_THREADS_NATIVE__) and __UCLIBC_HAS_ADVANCED_REALTIME__ set. + +Upstream status: Pending +https://mailman.videolan.org/pipermail/multicat-devel/2016-March/000129.html + +Signed-off-by: Jörg Krause + +diff -purN multicat-2.1.orig/util.h multicat-2.1/util.h +--- multicat-2.1.orig/util.h 2015-07-15 22:47:39.000000000 +0200 ++++ multicat-2.1/util.h 2016-03-20 18:13:51.899780405 +0100 +@@ -26,7 +26,10 @@ + + #ifdef __APPLE__ + #define POLLRDHUP 0 +-#else ++/* uClibc may not have clock_nanosleep() available */ ++#elif !defined (__UCLIBC__) || \ ++ defined (__UCLIBC__) && defined (__UCLIBC_HAS_THREADS_NATIVE__) \ ++ && defined (__UCLIBC_HAS_ADVANCED_REALTIME__) + #define HAVE_CLOCK_NANOSLEEP + #endif + diff --git a/package/multicat/Config.in b/package/multicat/Config.in new file mode 100644 index 0000000000..8dfb6c134a --- /dev/null +++ b/package/multicat/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_MULTICAT + bool "multicat" + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_BITSTREAM + help + Simple and efficient multicast and transport stream manipulation. + + http://www.videolan.org/projects/multicat.html + +comment 'multicat needs a toolchain w/ threads' + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/multicat/multicat.hash b/package/multicat/multicat.hash new file mode 100644 index 0000000000..38cf9d7dc4 --- /dev/null +++ b/package/multicat/multicat.hash @@ -0,0 +1,4 @@ +# from https://get.videolan.org/multicat/2.1/multicat-2.1.tar.bz2.md5 +md5 2e3ecd8dee64f5bd32a61733d4cc2226 multicat-2.1.tar.bz2 +# locally calculated +sha256 5eabe8d9a3dde452b2d348683cc7da213680551a9d4059c356f7319c6aa9b3d1 multicat-2.1.tar.bz2 diff --git a/package/multicat/multicat.mk b/package/multicat/multicat.mk new file mode 100644 index 0000000000..cc6eb78d24 --- /dev/null +++ b/package/multicat/multicat.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# multicat +# +################################################################################ + +MULTICAT_VERSION = 2.1 +MULTICAT_SOURCE = multicat-$(MULTICAT_VERSION).tar.bz2 +MULTICAT_SITE = https://get.videolan.org/multicat/$(MULTICAT_VERSION) +MULTICAT_LICENSE = GPLv2+ +MULTICAT_LICENSE_FILES = COPYING + +MULTICAT_DEPENDENCIES = bitstream + +MULTICAT_MAKE_ENV = $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) + +define MULTICAT_BUILD_CMDS + $(MULTICAT_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define MULTICAT_INSTALL_TARGET_CMDS + $(MULTICAT_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) PREFIX=/usr install +endef + +$(eval $(generic-package)) diff --git a/package/musepack/0001-shared.patch b/package/musepack/0001-shared.patch new file mode 100644 index 0000000000..d8c788db7c --- /dev/null +++ b/package/musepack/0001-shared.patch @@ -0,0 +1,24 @@ +Fixup installation of shared mpcdec library. +Based on gentoo patch. + +Signed-off-by: Gustavo Zacarias +--- + +diff -Nura musepack_src_r475.orig/libmpcdec/CMakeLists.txt musepack_src_r475/libmpcdec/CMakeLists.txt +--- musepack_src_r475.orig/libmpcdec/CMakeLists.txt 2010-08-21 12:55:01.000000000 -0300 ++++ musepack_src_r475/libmpcdec/CMakeLists.txt 2011-08-17 15:53:06.126873408 -0300 +@@ -1,7 +1,12 @@ + include_directories(${libmpc_SOURCE_DIR}/include) + if(SHARED) +- add_library(mpcdec SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32) ++ add_library(mpcdec_shared SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32) ++ set_target_properties(mpcdec_shared PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1 VERSION 7.0.1 SOVERSION 7) ++ target_link_libraries(mpcdec_shared m) ++ install(TARGETS mpcdec_shared LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}") + else(SHARED) + add_library(mpcdec_static STATIC huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32) ++ set_target_properties(mpcdec_static PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1) ++ target_link_libraries(mpcdec_static m) ++ install(TARGETS mpcdec_static LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}") + endif(SHARED) +- diff --git a/package/musepack/0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch b/package/musepack/0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file mode 100644 index 0000000000..4bfeca0a04 --- /dev/null +++ b/package/musepack/0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch @@ -0,0 +1,43 @@ +From d2f01ba6fa2a065156fad686d1849309c661e527 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 31 Aug 2014 12:07:31 +0200 +Subject: [PATCH 2/2] cmake: use the standard CMake flag to drive the shared + object build + +If BUILD_SHARED_LIBS is set and SHARED undefined, then drive SHARED with +the BUILD_SHARED_LIBS value. + +Signed-off-by: Samuel Martin +--- + CMakeLists.txt | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index b13f78c..db75510 100755 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,11 +7,16 @@ project(libmpc C) + set(CMAKE_VERBOSE_MAKEFILE false) + TEST_BIG_ENDIAN(MPC_ENDIANNESS) + +-if(WIN32) +- option(SHARED "Use shared libmpcdec" OFF) +-else(WIN32) +- option(SHARED "Use shared libmpcdec" ON) +-endif(WIN32) ++# Use the standard CMake flag to drive the shared object build. ++if(DEFINED BUILD_SHARED_LIBS AND NOT DEFINED SHARED) ++ set(SHARED ${BUILD_SHARED_LIBS}) ++else() ++ if(WIN32) ++ option(SHARED "Use shared libmpcdec" OFF) ++ else(WIN32) ++ option(SHARED "Use shared libmpcdec" ON) ++ endif(WIN32) ++endif() + + add_definitions(-DFAST_MATH -DCVD_FASTLOG) + +-- +2.1.0 + diff --git a/package/musepack/0003-include-fpu-control-with-glibc-only.patch b/package/musepack/0003-include-fpu-control-with-glibc-only.patch new file mode 100644 index 0000000000..6f50155781 --- /dev/null +++ b/package/musepack/0003-include-fpu-control-with-glibc-only.patch @@ -0,0 +1,26 @@ +Include only on glibc systems + +The header provides _FPU_*() macros, which the +Init_FPU() function uses only on i386, and only when they are +defined. Since is not available, this causes a build +failure with C libraries such as musl. By simply including + explicitly on glibc systems, we avoid the build +failure, since mpcenc.c already conditionally uses the +macros only if they are defined. + +Signed-off-by: Bernd Kuhls +[Thomas: better commit log.] +Signed-off-by: Thomas Petazzoni + +diff -uNr musepack_src_r475.org/mpcenc/mpcenc.h musepack_src_r475/mpcenc/mpcenc.h +--- musepack_src_r475.org/mpcenc/mpcenc.h 2009-02-23 19:15:46.000000000 +0100 ++++ musepack_src_r475/mpcenc/mpcenc.h 2016-01-30 09:29:08.000000000 +0100 +@@ -50,7 +51,7 @@ + # include + #endif + +-#if defined __linux__ ++#if defined __GLIBC__ + # include + #elif defined __FreeBSD__ + # include diff --git a/package/musepack/0004-missing-sys-select.patch b/package/musepack/0004-missing-sys-select.patch new file mode 100644 index 0000000000..1e3a4b1140 --- /dev/null +++ b/package/musepack/0004-missing-sys-select.patch @@ -0,0 +1,21 @@ +Add missing include + +This header is needed when types like fd_set are used. This fixes a +build issue occuring on the musl C library. + +Signed-off-by: Bernd Kuhls +[Thomas: better commit log.] +Signed-off-by: Thomas Petazzoni + +Index: b/mpcenc/mpcenc.h +=================================================================== +--- a/mpcenc/mpcenc.h ++++ b/mpcenc/mpcenc.h +@@ -34,6 +34,7 @@ + //// portable system includes ////////////////////////////////////// + #include + #include ++#include + + //// system dependent system includes ////////////////////////////// + // low level I/O, where are prototypes and constants? diff --git a/package/musepack/Config.in b/package/musepack/Config.in new file mode 100644 index 0000000000..2a966a473c --- /dev/null +++ b/package/musepack/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_MUSEPACK + bool "musepack" + select BR2_PACKAGE_LIBCUEFILE + select BR2_PACKAGE_LIBREPLAYGAIN + help + Musepack is an audio compression format with a strong emphasis + on high quality. It's not lossless, but it is designed + for transparency, so that you won't be able to hear differences + between the original wave file and the much smaller MPC file. + + http://www.musepack.net/ diff --git a/package/musepack/musepack.hash b/package/musepack/musepack.hash new file mode 100644 index 0000000000..b1bd73ca89 --- /dev/null +++ b/package/musepack/musepack.hash @@ -0,0 +1,4 @@ +# From https://www.musepack.net/index.php?pg=src +md5 754d67be67f713e54baf70fcfdb2817e musepack_src_r475.tar.gz +# Calculated based on the hash above +sha256 a4b1742f997f83e1056142d556a8c20845ba764b70365ff9ccf2e3f81c427b2b musepack_src_r475.tar.gz diff --git a/package/musepack/musepack.mk b/package/musepack/musepack.mk new file mode 100644 index 0000000000..db613a0a08 --- /dev/null +++ b/package/musepack/musepack.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# musepack +# +################################################################################ + +MUSEPACK_VERSION = r475 +MUSEPACK_SITE = http://files.musepack.net/source +MUSEPACK_SOURCE = musepack_src_$(MUSEPACK_VERSION).tar.gz +MUSEPACK_DEPENDENCIES = libcuefile libreplaygain +MUSEPACK_INSTALL_STAGING = YES +MUSEPACK_MAKE = $(MAKE1) +MUSEPACK_LICENSE = BSD-3c (*mpcdec), LGPLv2.1+ (*mpcenc) +MUSEPACK_LICENSE_FILES = libmpcdec/COPYING libmpcenc/quant.c + +$(eval $(cmake-package)) diff --git a/package/musl/Config.in b/package/musl/Config.in new file mode 100644 index 0000000000..c263006a29 --- /dev/null +++ b/package/musl/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_MUSL + bool + depends on BR2_TOOLCHAIN_USES_MUSL + default y + select BR2_PACKAGE_LINUX_HEADERS + select BR2_PACKAGE_NETBSD_QUEUE + select BR2_TOOLCHAIN_HAS_SSP diff --git a/package/musl/musl.hash b/package/musl/musl.hash new file mode 100644 index 0000000000..907e9c6bd5 --- /dev/null +++ b/package/musl/musl.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 35f6c00c84a6091bd5dab29eedde7508dae755ead92dcc0239f3677d1055b9b5 musl-1.1.14.tar.gz diff --git a/package/musl/musl.mk b/package/musl/musl.mk new file mode 100644 index 0000000000..733f940db2 --- /dev/null +++ b/package/musl/musl.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# musl +# +################################################################################ + +MUSL_VERSION = 1.1.14 +MUSL_SITE = http://www.musl-libc.org/releases +MUSL_LICENSE = MIT +MUSL_LICENSE_FILES = COPYRIGHT + +# Before musl is configured, we must have the first stage +# cross-compiler and the kernel headers +MUSL_DEPENDENCIES = host-gcc-initial linux-headers + +# musl does not provide a sys/queue.h implementation, so add the +# netbsd-queue package that will install a sys/queue.h file in the +# staging directory based on the NetBSD implementation. +MUSL_DEPENDENCIES += netbsd-queue + +# musl is part of the toolchain so disable the toolchain dependency +MUSL_ADD_TOOLCHAIN_DEPENDENCY = NO + +MUSL_INSTALL_STAGING = YES + +# Thumb build is broken, build in ARM mode, since all architectures +# that support Thumb1 also support ARM. +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) +MUSL_EXTRA_CFLAGS += -marm +endif + +define MUSL_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CFLAGS)) $(MUSL_EXTRA_CFLAGS)" \ + CPPFLAGS="$(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64,$(TARGET_CPPFLAGS))" \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --prefix=/usr \ + --libdir=/lib \ + --disable-gcc-wrapper \ + --enable-static \ + $(if $(BR2_STATIC_LIBS),--disable-shared,--enable-shared)) +endef + +define MUSL_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define MUSL_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + DESTDIR=$(STAGING_DIR) install-libs install-tools install-headers +endef + +define MUSL_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + DESTDIR=$(TARGET_DIR) install-libs + $(RM) $(addprefix $(TARGET_DIR)/lib/,crt1.o crtn.o crti.o Scrt1.o) +endef + +$(eval $(generic-package)) diff --git a/package/mutt/0001-nodoc.patch b/package/mutt/0001-nodoc.patch new file mode 100644 index 0000000000..6fd556dcbc --- /dev/null +++ b/package/mutt/0001-nodoc.patch @@ -0,0 +1,21 @@ +Disable the documentation build + +The documentation tool is compiled for the target, but executed on the +host. We don't bother fixing this, as we don't care of the +documentation in Buildroot. + +Signed-off-by: Thomas Petazzoni + +Index: mutt-1.5.17+20080114/Makefile.am +=================================================================== +--- mutt-1.5.17+20080114.orig/Makefile.am 2010-05-15 18:15:08.000000000 +0200 ++++ mutt-1.5.17+20080114/Makefile.am 2010-05-15 18:15:17.000000000 +0200 +@@ -9,7 +9,7 @@ + IMAP_INCLUDES = -I$(top_srcdir)/imap + endif + +-SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR) ++SUBDIRS = m4 po intl contrib $(IMAP_SUBDIR) + + bin_SCRIPTS = muttbug flea @SMIMEAUX_TARGET@ + diff --git a/package/mutt/Config.in b/package/mutt/Config.in new file mode 100644 index 0000000000..d85c1a7f7d --- /dev/null +++ b/package/mutt/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_MUTT + bool "mutt" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + Mutt is a sophisticated text-based Mail User Agent (MUA) + + http://www.mutt.org/ + +if BR2_PACKAGE_MUTT + +config BR2_PACKAGE_MUTT_IMAP + bool "imap" + help + IMAP support + +config BR2_PACKAGE_MUTT_POP3 + bool "pop3" + help + POP3 support + +endif # BR2_PACKAGE_MUTT + +comment "mutt needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/mutt/mutt.hash b/package/mutt/mutt.hash new file mode 100644 index 0000000000..baee620692 --- /dev/null +++ b/package/mutt/mutt.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 98b26cecc6b1713082fc880344fa345c20bd7ded6459abe18c84429c7cf8ed20 mutt-1.6.1.tar.gz diff --git a/package/mutt/mutt.mk b/package/mutt/mutt.mk new file mode 100644 index 0000000000..e6ea6e4000 --- /dev/null +++ b/package/mutt/mutt.mk @@ -0,0 +1,74 @@ +################################################################################ +# +# mutt +# +################################################################################ + +MUTT_VERSION = 1.6.1 +MUTT_SITE = https://bitbucket.org/mutt/mutt/downloads +MUTT_LICENSE = GPLv2+ +MUTT_LICENSE_FILES = GPL +MUTT_DEPENDENCIES = ncurses +MUTT_CONF_OPTS = --disable-smtp +MUTT_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +MUTT_DEPENDENCIES += libiconv +MUTT_CONF_OPTS += --enable-iconv +endif + +ifeq ($(BR2_PACKAGE_LIBIDN),y) +MUTT_DEPENDENCIES += libidn +MUTT_CONF_OPTS += --with-idn +else +MUTT_CONF_OPTS += --without-idn +endif + +ifeq ($(BR2_PACKAGE_MUTT_IMAP),y) +MUTT_CONF_OPTS += --enable-imap +else +MUTT_CONF_OPTS += --disable-imap +endif + +ifeq ($(BR2_PACKAGE_MUTT_POP3),y) +MUTT_CONF_OPTS += --enable-pop +else +MUTT_CONF_OPTS += --disable-pop +endif + +# SSL support is only used by imap or pop3 module +ifneq ($(BR2_PACKAGET_MUTT_IMAP)$(BR2_PACKAGE_MUTT_POP3),) +ifeq ($(BR2_PACKAGE_OPENSSL),y) +MUTT_DEPENDENCIES += openssl +MUTT_CONF_OPTS += --with-ssl=$(STAGING_DIR)/usr +else +MUTT_CONF_OPTS += --without-ssl +endif +else +MUTT_CONF_OPTS += --without-ssl +endif + +# Avoid running tests to check for: +# - target system is *BSD +# - C99 conformance (snprintf, vsnprintf) +# - behaviour of the regex library +# - if mail spool directory is world/group writable +# - we have a working libiconv +MUTT_CONF_ENV += \ + mutt_cv_bsdish=no \ + mutt_cv_c99_snprintf=yes \ + mutt_cv_c99_vsnprintf=yes \ + mutt_cv_regex_broken=no \ + mutt_cv_worldwrite=yes \ + mutt_cv_groupwrite=yes \ + mutt_cv_iconv_good=yes \ + mutt_cv_iconv_nontrans=no + +MUTT_CONF_OPTS += --with-mailpath=/var/mail + +define MUTT_VAR_MAIL + ln -sf /tmp $(TARGET_DIR)/var/mail +endef +MUTT_POST_INSTALL_TARGET_HOOKS += MUTT_VAR_MAIL + +$(eval $(autotools-package)) diff --git a/package/mxml/0001-fix-cross-target-installation.patch b/package/mxml/0001-fix-cross-target-installation.patch new file mode 100644 index 0000000000..3a9fa0c0cf --- /dev/null +++ b/package/mxml/0001-fix-cross-target-installation.patch @@ -0,0 +1,55 @@ +From: Baruch Siach +Subject: [PATCH] mxml: workaround for cross build + +The added patch is a workaround for cross build as follows: + + * disable run of a test binary at build time + * disable generation of documentation using the mxmldoc binary + * remove now non-existent entries from the install target + * disable strip when running install + +Signed-off-by: Baruch Siach +--- +diff -Nuar mxml-2.7-orig/Makefile.in mxml-2.7/Makefile.in +--- mxml-2.7-orig/Makefile.in 2011-04-13 18:43:32.000000000 +0300 ++++ mxml-2.7/Makefile.in 2012-05-16 07:21:42.677220980 +0300 +@@ -57,7 +57,7 @@ + # Install commands... + # + +-INSTALL_BIN = $(LIBTOOL) $(INSTALL) -m 755 -s ++INSTALL_BIN = $(LIBTOOL) $(INSTALL) -m 755 + INSTALL_DATA = $(INSTALL) -m 644 + INSTALL_DIR = $(INSTALL) -d + INSTALL_LIB = $(LIBTOOL) $(INSTALL) -m 755 +@@ -88,7 +88,7 @@ + mxml-index.o mxml-node.o mxml-search.o mxml-set.o + LIBOBJS = $(PUBLIBOBJS) mxml-private.o mxml-string.o + OBJS = mxmldoc.o testmxml.o $(LIBOBJS) +-TARGETS = $(LIBMXML) mxmldoc testmxml mxml.xml doc/mxml.man ++TARGETS = $(LIBMXML) libmxml.a + + + # +@@ -140,9 +140,6 @@ + # + + install: $(TARGETS) install-$(LIBMXML) install-libmxml.a +- echo Installing mxmldoc in $(BUILDROOT)$(bindir)... +- $(INSTALL_DIR) $(BUILDROOT)$(bindir) +- $(INSTALL_BIN) mxmldoc $(BUILDROOT)$(bindir) + echo Installing documentation in $(BUILDROOT)$(docdir)... + $(INSTALL_DIR) $(BUILDROOT)$(docdir) + for file in $(DOCFILES); do \ +@@ -154,11 +151,6 @@ + echo Installing pkgconfig files in $(BUILDROOT)$(libdir)/pkgconfig... + $(INSTALL_DIR) $(BUILDROOT)$(libdir)/pkgconfig + $(INSTALL_DATA) mxml.pc $(BUILDROOT)$(libdir)/pkgconfig +- echo Installing man pages in $(BUILDROOT)$(mandir)... +- $(INSTALL_DIR) $(BUILDROOT)$(mandir)/man1 +- $(INSTALL_MAN) doc/mxmldoc.man $(BUILDROOT)$(mandir)/man1/mxmldoc.1 +- $(INSTALL_DIR) $(BUILDROOT)$(mandir)/man3 +- $(INSTALL_MAN) doc/mxml.man $(BUILDROOT)$(mandir)/man3/mxml.3 + + install-libmxml.a: + echo Installing libmxml.a to $(BUILDROOT)$(libdir)... diff --git a/package/mxml/Config.in b/package/mxml/Config.in new file mode 100644 index 0000000000..d3202b4bc9 --- /dev/null +++ b/package/mxml/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_MXML + bool "Mini-XML" + help + Lightweight XML Library + + http://www.minixml.org diff --git a/package/mxml/mxml.hash b/package/mxml/mxml.hash new file mode 100644 index 0000000000..310e2cae0a --- /dev/null +++ b/package/mxml/mxml.hash @@ -0,0 +1,4 @@ +# From http://www.msweet.org/downloads.php?L+Z3 +md5 e21cad0f7aacd18f942aa0568a8dee19 mxml-2.9.tar.gz +# Locally computed +sha256 cded54653c584b24c4a78a7fa1b3b4377d49ac4f451ddf170ebbc8161d85ff92 mxml-2.9.tar.gz diff --git a/package/mxml/mxml.mk b/package/mxml/mxml.mk new file mode 100644 index 0000000000..7e9b4d6c89 --- /dev/null +++ b/package/mxml/mxml.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# mxml +# +################################################################################ + +MXML_VERSION = 2.9 +MXML_SITE = http://www.msweet.org/files/project3 +MXML_LICENSE = LGPLv2+ with exceptions +MXML_LICENSE_FILES = COPYING +MXML_INSTALL_STAGING = YES + +MXML_INSTALL_STAGING_OPTS = DSTROOT=$(STAGING_DIR) install +MXML_INSTALL_TARGET_OPTS = DSTROOT=$(TARGET_DIR) install + +$(eval $(autotools-package)) diff --git a/package/mysql/0000-ac_cache_check.patch b/package/mysql/0000-ac_cache_check.patch new file mode 100644 index 0000000000..c3b55ba8d3 --- /dev/null +++ b/package/mysql/0000-ac_cache_check.patch @@ -0,0 +1,156 @@ +Patch borrowed from +http://code.google.com/p/minimyth/source/browse/trunk/gar-minimyth/script/db/mysql/files/mysql-5.1.47-ac_cache_check.patch?r=6493. + +It allows to override through ac_cv_* variables various checks that +cannot be performed when cross-compiling. + +Signed-off-by: Thomas Petazzoni + +--- + storage/innodb_plugin/plug.in | 59 ++++++++++++++++++++++++++++-------------- + 1 file changed, 40 insertions(+), 19 deletions(-) + +Index: mysql-5.1.53/storage/innodb_plugin/plug.in +=================================================================== +--- mysql-5.1.53.orig/storage/innodb_plugin/plug.in ++++ mysql-5.1.53/storage/innodb_plugin/plug.in +@@ -53,9 +53,10 @@ + esac + AC_SUBST(INNODB_DYNAMIC_CFLAGS) + +- AC_MSG_CHECKING(whether GCC atomic builtins are available) ++ AC_CACHE_CHECK([whether GCC atomic builtins are available], ++ [ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS], + # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not +- AC_TRY_RUN( ++ [AC_TRY_RUN( + [ + int main() + { +@@ -95,18 +96,23 @@ + } + ], + [ +- AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1], +- [GCC atomic builtins are available]) + AC_MSG_RESULT(yes) ++ ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes + ], + [ + AC_MSG_RESULT(no) ++ ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=no + ] +- ) ++ )]) ++ if test "x$ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS"= "xyes" ; then ++ AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1], ++ [GCC atomic builtins are available]) ++ fi + +- AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins) ++ AC_CACHE_CHECK([whether pthread_t can be used by GCC atomic builtins], ++ [ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC], + # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not +- AC_TRY_RUN( ++ [AC_TRY_RUN( + [ + #include + #include +@@ -126,14 +132,18 @@ + } + ], + [ +- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1], +- [pthread_t can be used by GCC atomic builtins]) + AC_MSG_RESULT(yes) ++ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes + ], + [ + AC_MSG_RESULT(no) ++ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=no + ] +- ) ++ )]) ++ if test "x$ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC"= "xyes" ; then ++ AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1], ++ [pthread_t can be used by GCC atomic builtins]) ++ fi + + AC_MSG_CHECKING(whether Solaris libc atomic functions are available) + # either define HAVE_IB_SOLARIS_ATOMICS or not +@@ -148,9 +158,10 @@ + are available]) + ) + +- AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions) ++ AC_CACHE_CHECK([whether pthread_t can be used by Solaris libc atomic functions], ++ [ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], + # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not +- AC_TRY_RUN( ++ [AC_TRY_RUN( + [ + #include + #include +@@ -181,28 +192,33 @@ + } + ], + [ +- AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1], +- [pthread_t can be used by solaris atomics]) + AC_MSG_RESULT(yes) ++ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=yes + ], + [ + AC_MSG_RESULT(no) ++ ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no + ] +- ) ++ )]) ++ if test "x$ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS"= "xyes" ; then ++ AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS], [1], ++ [pthread_t can be used by solaris atomics]) ++ fi + + # this is needed to know which one of atomic_cas_32() or atomic_cas_64() + # to use in the source + AC_CHECK_SIZEOF([pthread_t], [], [#include ]) + + # Check for x86 PAUSE instruction +- AC_MSG_CHECKING(for x86 PAUSE instruction) ++ AC_CACHE_CHECK([for x86 PAUSE instruction], ++ [ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION], + # We have to actually try running the test program, because of a bug + # in Solaris on x86_64, where it wrongly reports that PAUSE is not + # supported when trying to run an application. See + # http://bugs.opensolaris.org/bugdatabase/printableBug.do?bug_id=6478684 + # We use ib_ prefix to avoid collisoins if this code is added to + # mysql's configure.in. +- AC_TRY_RUN( ++ [AC_TRY_RUN( + [ + int main() { + __asm__ __volatile__ ("pause"); +@@ -210,16 +226,21 @@ + } + ], + [ +- AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist]) + AC_MSG_RESULT(yes) ++ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=yes + ], + [ + AC_MSG_RESULT(no) ++ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no + ], + [ + AC_MSG_RESULT(no) ++ ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION=no + ] +- ) ++ )]) ++ if test "x$ac_cv_have_decl_HAVE_IB_PAUSE_INSTRUCTION"= "xyes" ; then ++ AC_DEFINE([HAVE_IB_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist]) ++ fi + ]) + + # vim: set ft=config: diff --git a/package/mysql/0001-configure-ps-cache-check.patch b/package/mysql/0001-configure-ps-cache-check.patch new file mode 100644 index 0000000000..336e80e0b7 --- /dev/null +++ b/package/mysql/0001-configure-ps-cache-check.patch @@ -0,0 +1,39 @@ +Patch borrowed from +http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/mysql/files/configure-ps-cache-check.patch + +It allows to specify through ac_cv_FIND_PROC how ps should be used on +the target to find the PID of a program. + +Signed-off-by: Thomas Petazzoni + +--- + configure.in | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +Index: mysql-5.1.53/configure.in +=================================================================== +--- mysql-5.1.53.orig/configure.in ++++ mysql-5.1.53/configure.in +@@ -462,8 +462,8 @@ + # then Make, then shell. The autoconf substitution uses single quotes, so + # no unprotected single quotes should appear in the expression. + AC_PATH_PROG(PS, ps, ps) +-AC_MSG_CHECKING("how to check if pid exists") +-PS=$ac_cv_path_PS ++AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC], ++[ + # Linux style + if $PS wwwp $$ 2> /dev/null | grep -- "$0" > /dev/null + then +@@ -502,8 +502,9 @@ + AC_MSG_ERROR([Could not find the right ps and/or grep switches. Which OS is this? See the Installation chapter in the Reference Manual.]) + esac + fi +-AC_SUBST(FIND_PROC) +-AC_MSG_RESULT("$FIND_PROC") ++ac_cv_FIND_PROC="$FIND_PROC" ++]) ++AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC]) + + # Check if a pid is valid + AC_PATH_PROG(KILL, kill, kill) diff --git a/package/mysql/0002-use-new-readline-iface.patch b/package/mysql/0002-use-new-readline-iface.patch new file mode 100644 index 0000000000..c5906563ce --- /dev/null +++ b/package/mysql/0002-use-new-readline-iface.patch @@ -0,0 +1,21 @@ +Tell MySQL to use the new readline interface even when an external +readline is being used. + +Signed-off-by: Thomas Petazzoni + +--- + configure.in | 1 + + 1 file changed, 1 insertion(+) + +Index: mysql-5.1.53/configure.in +=================================================================== +--- mysql-5.1.53.orig/configure.in ++++ mysql-5.1.53/configure.in +@@ -2689,6 +2689,7 @@ + # this way we avoid linking commercial source with GPL readline + readline_link="-lreadline" + want_to_use_readline="yes" ++ AC_DEFINE_UNQUOTED(USE_NEW_READLINE_INTERFACE, 1) + elif [test "$mysql_cv_libedit_interface" = "yes"] + then + # Use libedit diff --git a/package/mysql/0003-ac_stack_direction-is-unset.patch b/package/mysql/0003-ac_stack_direction-is-unset.patch new file mode 100644 index 0000000000..6fef0a9acf --- /dev/null +++ b/package/mysql/0003-ac_stack_direction-is-unset.patch @@ -0,0 +1,15 @@ +misc.m4: ac_cv_c_stack_direction is unset. + +Signed-off-by: Marcelo Gutierrez (UTN/FRH) + +--- mysql-5.1.70.orig/config/ac-macros/misc.m4 ++++ mysql-5.1.70/config/ac-macros/misc.m4 +@@ -477,7 +477,7 @@ + exit(ptr_f(&a) < 0); + } + ], ac_cv_c_stack_direction=1, ac_cv_c_stack_direction=-1, +- ac_cv_c_stack_direction=)]) ++ ac_cv_c_stack_direction=0)]) + AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) + ])dnl + diff --git a/package/mysql/0004-Fix-gen_lex_hash-execution.patch b/package/mysql/0004-Fix-gen_lex_hash-execution.patch new file mode 100644 index 0000000000..b91ed4fef9 --- /dev/null +++ b/package/mysql/0004-Fix-gen_lex_hash-execution.patch @@ -0,0 +1,32 @@ +Makefile: fix cross-compiling the server + +MySQL Makefile believes it can run code it just compiled, to +generate a header. This does not work for cross-compilation. + +Instead, use a pre-installed host-version of the required tool. + +Signed-off-by: Marcelo Gutierrez (UTN/FRH) + +--- mysql-5.1.70/sql/Makefile.am ++++ mysql-5.1.70.patch/sql/Makefile.am +@@ -177,7 +177,7 @@ + # this avoid the rebuild of the built files in a source dist + lex_hash.h: gen_lex_hash.cc lex.h + $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT) +- ./gen_lex_hash$(EXEEXT) > $@-t ++ gen_lex_hash$(EXEEXT) > $@-t + $(MV) $@-t $@ + + # For testing of udf_example.so + +--- mysql-5.1.70/sql/Makefile.in ++++ mysql-5.1.70.patch/sql/Makefile.in +@@ -1310,7 +1310,7 @@ + # this avoid the rebuild of the built files in a source dist + lex_hash.h: gen_lex_hash.cc lex.h + $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT) +- ./gen_lex_hash$(EXEEXT) > $@-t ++ gen_lex_hash$(EXEEXT) > $@-t + $(MV) $@-t $@ + + # We might have some stuff not built in this build, but that we want to install diff --git a/package/mysql/0005-bison_3_breaks_mysql_server_build.patch b/package/mysql/0005-bison_3_breaks_mysql_server_build.patch new file mode 100644 index 0000000000..918fe2456a --- /dev/null +++ b/package/mysql/0005-bison_3_breaks_mysql_server_build.patch @@ -0,0 +1,3310 @@ +fix the yacc code in mysql + +Signed-off-by: Marcelo Gutierrez (UTN/FRH) +--- +diff -uNr mysql-5.1.73.orig/sql/sql_lex.cc mysql-5.1.73/sql/sql_lex.cc +--- mysql-5.1.73.orig/sql/sql_lex.cc 2013-11-04 18:52:27.000000000 +0000 ++++ mysql-5.1.73/sql/sql_lex.cc 2014-02-12 14:12:04.244111625 +0000 +@@ -775,14 +775,13 @@ + (which can't be followed by a signed number) + */ + +-int MYSQLlex(void *arg, void *yythd) ++int MYSQLlex(void *arg, THD *thd) + { + reg1 uchar c= 0; + bool comment_closed; + int tokval, result_state; + uint length; + enum my_lex_states state; +- THD *thd= (THD *)yythd; + Lex_input_stream *lip= & thd->m_parser_state->m_lip; + LEX *lex= thd->lex; + YYSTYPE *yylval=(YYSTYPE*) arg; +diff -uNr mysql-5.1.73.orig/sql/sql_lex.h mysql-5.1.73/sql/sql_lex.h +--- mysql-5.1.73.orig/sql/sql_lex.h 2013-11-04 18:52:27.000000000 +0000 ++++ mysql-5.1.73/sql/sql_lex.h 2014-02-12 14:17:19.424106423 +0000 +@@ -2072,7 +2072,7 @@ + extern void lex_free(void); + extern void lex_start(THD *thd); + extern void lex_end(LEX *lex); +-extern int MYSQLlex(void *arg, void *yythd); ++extern int MYSQLlex(void *arg, THD *thd); + + extern void trim_whitespace(CHARSET_INFO *cs, LEX_STRING *str); + +diff -uNr mysql-5.1.73.orig/sql/sql_parse.cc mysql-5.1.73/sql/sql_parse.cc +--- mysql-5.1.73.orig/sql/sql_parse.cc 2013-11-04 18:52:27.000000000 +0000 ++++ mysql-5.1.73/sql/sql_parse.cc 2014-02-12 14:19:20.424104427 +0000 +@@ -8012,7 +8012,7 @@ + } + + +-extern int MYSQLparse(void *thd); // from sql_yacc.cc ++extern int MYSQLparse(THD *thd); // from sql_yacc.cc + + + /** +diff -uNr mysql-5.1.73.orig/sql/sql_yacc.yy mysql-5.1.73/sql/sql_yacc.yy +--- mysql-5.1.73.orig/sql/sql_yacc.yy 2013-11-04 18:52:27.000000000 +0000 ++++ mysql-5.1.73/sql/sql_yacc.yy 2014-02-12 20:17:06.707750140 +0000 +@@ -23,19 +23,13 @@ + */ + + %{ +-/* thd is passed as an argument to yyparse(), and subsequently to yylex(). +-** The type will be void*, so it must be cast to (THD*) when used. +-** Use the YYTHD macro for this. +-*/ +-#define YYPARSE_PARAM yythd +-#define YYLEX_PARAM yythd +-#define YYTHD ((THD *)yythd) +-#define YYLIP (& YYTHD->m_parser_state->m_lip) ++ ++#define YYLIP (& thd->m_parser_state->m_lip) + + #define MYSQL_YACC + #define YYINITDEPTH 100 + #define YYMAXDEPTH 3200 /* Because of 64K stack */ +-#define Lex (YYTHD->lex) ++#define Lex (thd->lex) + #define Select Lex->current_select + #include "mysql_priv.h" + #include "slave.h" +@@ -55,7 +49,7 @@ + #pragma warning (disable : 4065) + #endif + +-int yylex(void *yylval, void *yythd); ++int yylex(void *yylval, THD *thd); + + const LEX_STRING null_lex_str= {0,0}; + +@@ -64,7 +58,7 @@ + ulong val= *(F); \ + if (my_yyoverflow((B), (D), &val)) \ + { \ +- yyerror((char*) (A)); \ ++ yyerror(current_thd, (char*) (A)); \ + return 2; \ + } \ + else \ +@@ -76,7 +70,7 @@ + #define MYSQL_YYABORT \ + do \ + { \ +- LEX::cleanup_lex_after_parse_error(YYTHD);\ ++ LEX::cleanup_lex_after_parse_error(thd);\ + YYABORT; \ + } while (0) + +@@ -159,9 +153,8 @@ + to abort from the parser. + */ + +-void MYSQLerror(const char *s) ++void MYSQLerror(THD *thd, const char *s) + { +- THD *thd= current_thd; + + /* + Restore the original LEX if it was replaced when parsing +@@ -675,7 +668,10 @@ + bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); + %} + +-%pure_parser /* We have threads */ ++/* We have threads */ ++%define api.pure ++%parse-param { THD *thd } ++%lex-param { THD *thd } + /* + Currently there are 169 shift/reduce conflicts. + We should not introduce new conflicts any more. +@@ -1516,7 +1512,6 @@ + query: + END_OF_INPUT + { +- THD *thd= YYTHD; + if (!thd->bootstrap && + (!(thd->lex->select_lex.options & OPTION_FOUND_COMMENT))) + { +@@ -1530,7 +1525,7 @@ + { + Lex_input_stream *lip = YYLIP; + +- if ((YYTHD->client_capabilities & CLIENT_MULTI_QUERIES) && ++ if ((thd->client_capabilities & CLIENT_MULTI_QUERIES) && + ! lip->stmt_prepare_mode && + ! lip->eof()) + { +@@ -1626,7 +1621,6 @@ + deallocate: + deallocate_or_drop PREPARE_SYM ident + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + lex->sql_command= SQLCOM_DEALLOCATE_PREPARE; + lex->prepared_stmt_name= $3; +@@ -1641,7 +1635,6 @@ + prepare: + PREPARE_SYM ident FROM prepare_src + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + lex->sql_command= SQLCOM_PREPARE; + lex->prepared_stmt_name= $2; +@@ -1651,14 +1644,12 @@ + prepare_src: + TEXT_STRING_sys + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + lex->prepared_stmt_code= $1; + lex->prepared_stmt_code_is_varref= FALSE; + } + | '@' ident_or_text + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + lex->prepared_stmt_code= $2; + lex->prepared_stmt_code_is_varref= TRUE; +@@ -1668,7 +1659,6 @@ + execute: + EXECUTE_SYM ident + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + lex->sql_command= SQLCOM_EXECUTE; + lex->prepared_stmt_name= $2; +@@ -1826,7 +1816,6 @@ + create: + CREATE opt_table_options TABLE_SYM opt_if_not_exists table_ident + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + lex->sql_command= SQLCOM_CREATE_TABLE; + if (!lex->select_lex.add_table_to_list(thd, $5, NULL, +@@ -1844,13 +1833,13 @@ + } + create2 + { +- LEX *lex= YYTHD->lex; ++ LEX *lex= thd->lex; + lex->current_select= &lex->select_lex; + if ((lex->create_info.used_fields & HA_CREATE_USED_ENGINE) && + !lex->create_info.db_type) + { +- lex->create_info.db_type= ha_default_handlerton(YYTHD); +- push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN, ++ lex->create_info.db_type= ha_default_handlerton(thd); ++ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_WARN_USING_OTHER_HANDLER, + ER(ER_WARN_USING_OTHER_HANDLER), + ha_resolve_storage_engine_name(lex->create_info.db_type), +@@ -1979,7 +1968,7 @@ + event_tail: + remember_name EVENT_SYM opt_if_not_exists sp_name + { +- THD *thd= YYTHD; ++ THD *thd= thd; + LEX *lex=Lex; + + lex->stmt_definition_begin= $1; +@@ -2046,7 +2035,7 @@ + ev_starts: + /* empty */ + { +- Item *item= new (YYTHD->mem_root) Item_func_now_local(); ++ Item *item= new (thd->mem_root) Item_func_now_local(); + if (item == NULL) + MYSQL_YYABORT; + Lex->event_parse_data->item_starts= item; +@@ -2096,7 +2085,6 @@ + + ev_sql_stmt: + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= YYLIP; + +@@ -2139,7 +2127,6 @@ + } + ev_sql_stmt_inner + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + + /* return back to the original memory root ASAP */ +@@ -2198,11 +2185,10 @@ + $$= new sp_name($1, $3, true); + if ($$ == NULL) + MYSQL_YYABORT; +- $$->init_qname(YYTHD); ++ $$->init_qname(thd); + } + | ident + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + LEX_STRING db; + if (check_routine_name(&$1)) +@@ -2272,7 +2258,7 @@ + lex->sql_command= SQLCOM_CALL; + lex->spname= $2; + lex->value_list.empty(); +- sp_add_used_routine(lex, YYTHD, $2, TYPE_ENUM_PROCEDURE); ++ sp_add_used_routine(lex, thd, $2, TYPE_ENUM_PROCEDURE); + } + opt_sp_cparam_list {} + ; +@@ -2345,7 +2331,7 @@ + (enum enum_field_types)$3, + sp_param_in); + +- if (lex->sphead->fill_field_definition(YYTHD, lex, ++ if (lex->sphead->fill_field_definition(thd, lex, + (enum enum_field_types) $3, + &spvar->field_def)) + { +@@ -2382,7 +2368,7 @@ + (enum enum_field_types)$4, + (sp_param_mode_t)$1); + +- if (lex->sphead->fill_field_definition(YYTHD, lex, ++ if (lex->sphead->fill_field_definition(thd, lex, + (enum enum_field_types) $4, + &spvar->field_def)) + { +@@ -2445,13 +2431,12 @@ + { + LEX *lex= Lex; + +- lex->sphead->reset_lex(YYTHD); ++ lex->sphead->reset_lex(thd); + lex->spcont->declare_var_boundary($2); + } + type + sp_opt_default + { +- THD *thd= YYTHD; + LEX *lex= Lex; + sp_pcontext *pctx= lex->spcont; + uint num_vars= pctx->context_var_count(); +@@ -2477,7 +2462,7 @@ + spvar->type= var_type; + spvar->dflt= dflt_value_item; + +- if (lex->sphead->fill_field_definition(YYTHD, lex, var_type, ++ if (lex->sphead->fill_field_definition(thd, lex, var_type, + &spvar->field_def)) + { + MYSQL_YYABORT; +@@ -2501,7 +2486,7 @@ + } + + pctx->declare_var_boundary(0); +- if (lex->sphead->restore_lex(YYTHD)) ++ if (lex->sphead->restore_lex(thd)) + MYSQL_YYABORT; + $$.vars= $2; + $$.conds= $$.hndlrs= $$.curs= 0; +@@ -2516,7 +2501,7 @@ + my_error(ER_SP_DUP_COND, MYF(0), $2.str); + MYSQL_YYABORT; + } +- if(YYTHD->lex->spcont->push_cond(&$2, $5)) ++ if(thd->lex->spcont->push_cond(&$2, $5)) + MYSQL_YYABORT; + $$.vars= $$.hndlrs= $$.curs= 0; + $$.conds= 1; +@@ -2602,7 +2587,7 @@ + + sp_cursor_stmt: + { +- Lex->sphead->reset_lex(YYTHD); ++ Lex->sphead->reset_lex(thd); + } + select + { +@@ -2618,7 +2603,7 @@ + } + lex->sp_lex_in_use= TRUE; + $$= lex; +- if (lex->sphead->restore_lex(YYTHD)) ++ if (lex->sphead->restore_lex(thd)) + MYSQL_YYABORT; + } + ; +@@ -2662,7 +2647,7 @@ + sp_cond: + ulong_num + { /* mysql errno */ +- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t)); ++ $$= (sp_cond_type_t *)thd->alloc(sizeof(sp_cond_type_t)); + if ($$ == NULL) + MYSQL_YYABORT; + $$->type= sp_cond_type_t::number; +@@ -2675,7 +2660,7 @@ + my_error(ER_SP_BAD_SQLSTATE, MYF(0), $3.str); + MYSQL_YYABORT; + } +- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t)); ++ $$= (sp_cond_type_t *)thd->alloc(sizeof(sp_cond_type_t)); + if ($$ == NULL) + MYSQL_YYABORT; + $$->type= sp_cond_type_t::state; +@@ -2705,21 +2690,21 @@ + } + | SQLWARNING_SYM /* SQLSTATEs 01??? */ + { +- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t)); ++ $$= (sp_cond_type_t *)thd->alloc(sizeof(sp_cond_type_t)); + if ($$ == NULL) + MYSQL_YYABORT; + $$->type= sp_cond_type_t::warning; + } + | not FOUND_SYM /* SQLSTATEs 02??? */ + { +- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t)); ++ $$= (sp_cond_type_t *)thd->alloc(sizeof(sp_cond_type_t)); + if ($$ == NULL) + MYSQL_YYABORT; + $$->type= sp_cond_type_t::notfound; + } + | SQLEXCEPTION_SYM /* All other SQLSTATEs */ + { +- $$= (sp_cond_type_t *)YYTHD->alloc(sizeof(sp_cond_type_t)); ++ $$= (sp_cond_type_t *)thd->alloc(sizeof(sp_cond_type_t)); + if ($$ == NULL) + MYSQL_YYABORT; + $$->type= sp_cond_type_t::exception; +@@ -2789,7 +2774,6 @@ + + sp_proc_stmt_statement: + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= YYLIP; + +@@ -2798,7 +2782,6 @@ + } + statement + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= YYLIP; + sp_head *sp= lex->sphead; +@@ -2845,7 +2828,7 @@ + + sp_proc_stmt_return: + RETURN_SYM +- { Lex->sphead->reset_lex(YYTHD); } ++ { Lex->sphead->reset_lex(thd); } + expr + { + LEX *lex= Lex; +@@ -2867,7 +2850,7 @@ + MYSQL_YYABORT; + sp->m_flags|= sp_head::HAS_RETURN; + } +- if (sp->restore_lex(YYTHD)) ++ if (sp->restore_lex(thd)) + MYSQL_YYABORT; + } + ; +@@ -3094,7 +3077,7 @@ + ; + + sp_if: +- { Lex->sphead->reset_lex(YYTHD); } ++ { Lex->sphead->reset_lex(thd); } + expr THEN_SYM + { + LEX *lex= Lex; +@@ -3108,7 +3091,7 @@ + sp->add_cont_backpatch(i) || + sp->add_instr(i)) + MYSQL_YYABORT; +- if (sp->restore_lex(YYTHD)) ++ if (sp->restore_lex(thd)) + MYSQL_YYABORT; + } + sp_proc_stmts1 +@@ -3147,7 +3130,7 @@ + { + LEX *lex= Lex; + case_stmt_action_case(lex); +- lex->sphead->reset_lex(YYTHD); /* For expr $3 */ ++ lex->sphead->reset_lex(thd); /* For expr $3 */ + } + expr + { +@@ -3156,7 +3139,7 @@ + MYSQL_YYABORT; + + /* For expr $3 */ +- if (lex->sphead->restore_lex(YYTHD)) ++ if (lex->sphead->restore_lex(thd)) + MYSQL_YYABORT; + } + simple_when_clause_list +@@ -3198,7 +3181,7 @@ + simple_when_clause: + WHEN_SYM + { +- Lex->sphead->reset_lex(YYTHD); /* For expr $3 */ ++ Lex->sphead->reset_lex(thd); /* For expr $3 */ + } + expr + { +@@ -3208,7 +3191,7 @@ + if (case_stmt_action_when(lex, $3, true)) + MYSQL_YYABORT; + /* For expr $3 */ +- if (lex->sphead->restore_lex(YYTHD)) ++ if (lex->sphead->restore_lex(thd)) + MYSQL_YYABORT; + } + THEN_SYM +@@ -3223,7 +3206,7 @@ + searched_when_clause: + WHEN_SYM + { +- Lex->sphead->reset_lex(YYTHD); /* For expr $3 */ ++ Lex->sphead->reset_lex(thd); /* For expr $3 */ + } + expr + { +@@ -3231,7 +3214,7 @@ + if (case_stmt_action_when(lex, $3, false)) + MYSQL_YYABORT; + /* For expr $3 */ +- if (lex->sphead->restore_lex(YYTHD)) ++ if (lex->sphead->restore_lex(thd)) + MYSQL_YYABORT; + } + THEN_SYM +@@ -3395,7 +3378,7 @@ + MYSQL_YYABORT; + } + | WHILE_SYM +- { Lex->sphead->reset_lex(YYTHD); } ++ { Lex->sphead->reset_lex(thd); } + expr DO_SYM + { + LEX *lex= Lex; +@@ -3409,7 +3392,7 @@ + sp->new_cont_backpatch(i) || + sp->add_instr(i)) + MYSQL_YYABORT; +- if (sp->restore_lex(YYTHD)) ++ if (sp->restore_lex(thd)) + MYSQL_YYABORT; + } + sp_proc_stmts1 END WHILE_SYM +@@ -3424,7 +3407,7 @@ + lex->sphead->do_cont_backpatch(); + } + | REPEAT_SYM sp_proc_stmts1 UNTIL_SYM +- { Lex->sphead->reset_lex(YYTHD); } ++ { Lex->sphead->reset_lex(thd); } + expr END REPEAT_SYM + { + LEX *lex= Lex; +@@ -3436,7 +3419,7 @@ + if (i == NULL || + lex->sphead->add_instr(i)) + MYSQL_YYABORT; +- if (lex->sphead->restore_lex(YYTHD)) ++ if (lex->sphead->restore_lex(thd)) + MYSQL_YYABORT; + /* We can shortcut the cont_backpatch here */ + i->m_cont_dest= ip+1; +@@ -3859,7 +3842,6 @@ + create3 {} + | LIKE table_ident + { +- THD *thd= YYTHD; + TABLE_LIST *src_table; + LEX *lex= thd->lex; + +@@ -3873,7 +3855,6 @@ + } + | '(' LIKE table_ident ')' + { +- THD *thd= YYTHD; + TABLE_LIST *src_table; + LEX *lex= thd->lex; + +@@ -4342,7 +4323,6 @@ + bit_expr + { + Item *part_expr= $1; +- THD *thd= YYTHD; + LEX *lex= thd->lex; + Name_resolution_context *context= &lex->current_select->context; + TABLE_LIST *save_list= context->table_list; +@@ -4364,7 +4344,7 @@ + my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0)); + MYSQL_YYABORT; + } +- if (part_expr->fix_fields(YYTHD, (Item**)0) || ++ if (part_expr->fix_fields(thd, (Item**)0) || + ((context->table_list= save_list), FALSE) || + (!part_expr->const_item()) || + (!lex->safe_to_cache_query)) +@@ -4629,7 +4609,7 @@ + | TYPE_SYM opt_equal storage_engines + { + Lex->create_info.db_type= $3; +- WARN_DEPRECATED(yythd, "6.0", "TYPE=storage_engine", ++ WARN_DEPRECATED(thd, "6.0", "TYPE=storage_engine", + "'ENGINE=storage_engine'"); + Lex->create_info.used_fields|= HA_CREATE_USED_ENGINE; + } +@@ -4791,19 +4771,19 @@ + storage_engines: + ident_or_text + { +- plugin_ref plugin= ha_resolve_by_name(YYTHD, &$1); ++ plugin_ref plugin= ha_resolve_by_name(thd, &$1); + + if (plugin) + $$= plugin_data(plugin, handlerton*); + else + { +- if (YYTHD->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION) ++ if (thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION) + { + my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), $1.str); + MYSQL_YYABORT; + } + $$= 0; +- push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN, ++ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_WARN, + ER_UNKNOWN_STORAGE_ENGINE, + ER(ER_UNKNOWN_STORAGE_ENGINE), + $1.str); +@@ -4815,7 +4795,7 @@ + ident_or_text + { + plugin_ref plugin; +- if ((plugin= ha_resolve_by_name(YYTHD, &$1))) ++ if ((plugin= ha_resolve_by_name(thd, &$1))) + $$= plugin_data(plugin, handlerton*); + else + { +@@ -5043,7 +5023,7 @@ + { + char buff[sizeof("YEAR()") + MY_INT64_NUM_DECIMAL_DIGITS + 1]; + my_snprintf(buff, sizeof(buff), "YEAR(%lu)", length); +- push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_NOTE, ++ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, + ER_WARN_DEPRECATED_SYNTAX, + ER(ER_WARN_DEPRECATED_SYNTAX), + buff, "YEAR(4)"); +@@ -5057,7 +5037,7 @@ + { $$=MYSQL_TYPE_TIME; } + | TIMESTAMP opt_field_length + { +- if (YYTHD->variables.sql_mode & MODE_MAXDB) ++ if (thd->variables.sql_mode & MODE_MAXDB) + $$=MYSQL_TYPE_DATETIME; + else + { +@@ -5189,7 +5169,7 @@ + real_type: + REAL + { +- $$= YYTHD->variables.sql_mode & MODE_REAL_AS_FLOAT ? ++ $$= thd->variables.sql_mode & MODE_REAL_AS_FLOAT ? + MYSQL_TYPE_FLOAT : MYSQL_TYPE_DOUBLE; + } + | DOUBLE_SYM +@@ -5263,7 +5243,7 @@ + | DEFAULT now_or_signed_literal { Lex->default_value=$2; } + | ON UPDATE_SYM NOW_SYM optional_braces + { +- Item *item= new (YYTHD->mem_root) Item_func_now_local(); ++ Item *item= new (thd->mem_root) Item_func_now_local(); + if (item == NULL) + MYSQL_YYABORT; + Lex->on_update_value= item; +@@ -5312,7 +5292,7 @@ + now_or_signed_literal: + NOW_SYM optional_braces + { +- $$= new (YYTHD->mem_root) Item_func_now_local(); ++ $$= new (thd->mem_root) Item_func_now_local(); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -5673,7 +5653,6 @@ + alter: + ALTER opt_ignore TABLE_SYM table_ident + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + lex->name.str= 0; + lex->name.length= 0; +@@ -5799,7 +5778,7 @@ + Event_parse_data. + */ + +- if (!(Lex->event_parse_data= Event_parse_data::new_instance(YYTHD))) ++ if (!(Lex->event_parse_data= Event_parse_data::new_instance(thd))) + MYSQL_YYABORT; + Lex->event_parse_data->identifier= $4; + +@@ -6192,7 +6171,6 @@ + { + if (!$4) + { +- THD *thd= YYTHD; + $4= thd->variables.collation_database; + } + $5= $5 ? $5 : $4; +@@ -6556,7 +6534,7 @@ + assign_to_keycache: + table_ident cache_keys_spec + { +- if (!Select->add_table_to_list(YYTHD, $1, NULL, 0, TL_READ, ++ if (!Select->add_table_to_list(thd, $1, NULL, 0, TL_READ, + Select->pop_index_hints())) + MYSQL_YYABORT; + } +@@ -6585,7 +6563,7 @@ + preload_keys: + table_ident cache_keys_spec opt_ignore_leaves + { +- if (!Select->add_table_to_list(YYTHD, $1, NULL, $3, TL_READ, ++ if (!Select->add_table_to_list(thd, $1, NULL, $3, TL_READ, + Select->pop_index_hints())) + MYSQL_YYABORT; + } +@@ -6593,7 +6571,7 @@ + + cache_keys_spec: + { +- Lex->select_lex.alloc_index_hints(YYTHD); ++ Lex->select_lex.alloc_index_hints(thd); + Select->set_index_hint_type(INDEX_HINT_USE, + global_system_variables.old_mode ? + INDEX_HINT_MASK_JOIN : +@@ -6813,7 +6791,6 @@ + | select_item + | '*' + { +- THD *thd= YYTHD; + Item *item= new (thd->mem_root) + Item_field(&thd->lex->current_select->context, + NULL, NULL, "*"); +@@ -6828,7 +6805,6 @@ + select_item: + remember_name select_item2 remember_end select_alias + { +- THD *thd= YYTHD; + DBUG_ASSERT($1 < $3); + + if (add_item_to_list(thd, $2)) +@@ -6929,7 +6905,7 @@ + else + { + /* X OR Y */ +- $$ = new (YYTHD->mem_root) Item_cond_or($1, $3); ++ $$ = new (thd->mem_root) Item_cond_or($1, $3); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -6937,7 +6913,7 @@ + | expr XOR expr %prec XOR + { + /* XOR is a proprietary extension */ +- $$ = new (YYTHD->mem_root) Item_cond_xor($1, $3); ++ $$ = new (thd->mem_root) Item_cond_xor($1, $3); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -6979,50 +6955,50 @@ + else + { + /* X AND Y */ +- $$ = new (YYTHD->mem_root) Item_cond_and($1, $3); ++ $$ = new (thd->mem_root) Item_cond_and($1, $3); + if ($$ == NULL) + MYSQL_YYABORT; + } + } + | NOT_SYM expr %prec NOT_SYM + { +- $$= negate_expression(YYTHD, $2); ++ $$= negate_expression(thd, $2); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bool_pri IS TRUE_SYM %prec IS + { +- $$= new (YYTHD->mem_root) Item_func_istrue($1); ++ $$= new (thd->mem_root) Item_func_istrue($1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bool_pri IS not TRUE_SYM %prec IS + { +- $$= new (YYTHD->mem_root) Item_func_isnottrue($1); ++ $$= new (thd->mem_root) Item_func_isnottrue($1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bool_pri IS FALSE_SYM %prec IS + { +- $$= new (YYTHD->mem_root) Item_func_isfalse($1); ++ $$= new (thd->mem_root) Item_func_isfalse($1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bool_pri IS not FALSE_SYM %prec IS + { +- $$= new (YYTHD->mem_root) Item_func_isnotfalse($1); ++ $$= new (thd->mem_root) Item_func_isnotfalse($1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bool_pri IS UNKNOWN_SYM %prec IS + { +- $$= new (YYTHD->mem_root) Item_func_isnull($1); ++ $$= new (thd->mem_root) Item_func_isnull($1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bool_pri IS not UNKNOWN_SYM %prec IS + { +- $$= new (YYTHD->mem_root) Item_func_isnotnull($1); ++ $$= new (thd->mem_root) Item_func_isnotnull($1); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7032,19 +7008,19 @@ + bool_pri: + bool_pri IS NULL_SYM %prec IS + { +- $$= new (YYTHD->mem_root) Item_func_isnull($1); ++ $$= new (thd->mem_root) Item_func_isnull($1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bool_pri IS not NULL_SYM %prec IS + { +- $$= new (YYTHD->mem_root) Item_func_isnotnull($1); ++ $$= new (thd->mem_root) Item_func_isnotnull($1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bool_pri EQUAL_SYM predicate %prec EQUAL_SYM + { +- $$= new (YYTHD->mem_root) Item_func_equal($1,$3); ++ $$= new (thd->mem_root) Item_func_equal($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7066,13 +7042,12 @@ + predicate: + bit_expr IN_SYM '(' subselect ')' + { +- $$= new (YYTHD->mem_root) Item_in_subselect($1, $4); ++ $$= new (thd->mem_root) Item_in_subselect($1, $4); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr not IN_SYM '(' subselect ')' + { +- THD *thd= YYTHD; + Item *item= new (thd->mem_root) Item_in_subselect($1, $5); + if (item == NULL) + MYSQL_YYABORT; +@@ -7082,7 +7057,7 @@ + } + | bit_expr IN_SYM '(' expr ')' + { +- $$= handle_sql2003_note184_exception(YYTHD, $1, true, $4); ++ $$= handle_sql2003_note184_exception(thd, $1, true, $4); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7090,13 +7065,13 @@ + { + $6->push_front($4); + $6->push_front($1); +- $$= new (YYTHD->mem_root) Item_func_in(*$6); ++ $$= new (thd->mem_root) Item_func_in(*$6); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr not IN_SYM '(' expr ')' + { +- $$= handle_sql2003_note184_exception(YYTHD, $1, false, $5); ++ $$= handle_sql2003_note184_exception(thd, $1, false, $5); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7104,7 +7079,7 @@ + { + $7->push_front($5); + $7->push_front($1); +- Item_func_in *item = new (YYTHD->mem_root) Item_func_in(*$7); ++ Item_func_in *item = new (thd->mem_root) Item_func_in(*$7); + if (item == NULL) + MYSQL_YYABORT; + item->negate(); +@@ -7112,14 +7087,14 @@ + } + | bit_expr BETWEEN_SYM bit_expr AND_SYM predicate + { +- $$= new (YYTHD->mem_root) Item_func_between($1,$3,$5); ++ $$= new (thd->mem_root) Item_func_between($1,$3,$5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr not BETWEEN_SYM bit_expr AND_SYM predicate + { + Item_func_between *item; +- item= new (YYTHD->mem_root) Item_func_between($1,$4,$6); ++ item= new (thd->mem_root) Item_func_between($1,$4,$6); + if (item == NULL) + MYSQL_YYABORT; + item->negate(); +@@ -7127,42 +7102,42 @@ + } + | bit_expr SOUNDS_SYM LIKE bit_expr + { +- Item *item1= new (YYTHD->mem_root) Item_func_soundex($1); +- Item *item4= new (YYTHD->mem_root) Item_func_soundex($4); ++ Item *item1= new (thd->mem_root) Item_func_soundex($1); ++ Item *item4= new (thd->mem_root) Item_func_soundex($4); + if ((item1 == NULL) || (item4 == NULL)) + MYSQL_YYABORT; +- $$= new (YYTHD->mem_root) Item_func_eq(item1, item4); ++ $$= new (thd->mem_root) Item_func_eq(item1, item4); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr LIKE simple_expr opt_escape + { +- $$= new (YYTHD->mem_root) Item_func_like($1,$3,$4,Lex->escape_used); ++ $$= new (thd->mem_root) Item_func_like($1,$3,$4,Lex->escape_used); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr not LIKE simple_expr opt_escape + { +- Item *item= new (YYTHD->mem_root) Item_func_like($1,$4,$5, ++ Item *item= new (thd->mem_root) Item_func_like($1,$4,$5, + Lex->escape_used); + if (item == NULL) + MYSQL_YYABORT; +- $$= new (YYTHD->mem_root) Item_func_not(item); ++ $$= new (thd->mem_root) Item_func_not(item); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr REGEXP bit_expr + { +- $$= new (YYTHD->mem_root) Item_func_regex($1,$3); ++ $$= new (thd->mem_root) Item_func_regex($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr not REGEXP bit_expr + { +- Item *item= new (YYTHD->mem_root) Item_func_regex($1,$4); ++ Item *item= new (thd->mem_root) Item_func_regex($1,$4); + if (item == NULL) + MYSQL_YYABORT; +- $$= negate_expression(YYTHD, item); ++ $$= negate_expression(thd, item); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7172,85 +7147,85 @@ + bit_expr: + bit_expr '|' bit_expr %prec '|' + { +- $$= new (YYTHD->mem_root) Item_func_bit_or($1,$3); ++ $$= new (thd->mem_root) Item_func_bit_or($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr '&' bit_expr %prec '&' + { +- $$= new (YYTHD->mem_root) Item_func_bit_and($1,$3); ++ $$= new (thd->mem_root) Item_func_bit_and($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr SHIFT_LEFT bit_expr %prec SHIFT_LEFT + { +- $$= new (YYTHD->mem_root) Item_func_shift_left($1,$3); ++ $$= new (thd->mem_root) Item_func_shift_left($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr SHIFT_RIGHT bit_expr %prec SHIFT_RIGHT + { +- $$= new (YYTHD->mem_root) Item_func_shift_right($1,$3); ++ $$= new (thd->mem_root) Item_func_shift_right($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr '+' bit_expr %prec '+' + { +- $$= new (YYTHD->mem_root) Item_func_plus($1,$3); ++ $$= new (thd->mem_root) Item_func_plus($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr '-' bit_expr %prec '-' + { +- $$= new (YYTHD->mem_root) Item_func_minus($1,$3); ++ $$= new (thd->mem_root) Item_func_minus($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr '+' INTERVAL_SYM expr interval %prec '+' + { +- $$= new (YYTHD->mem_root) Item_date_add_interval($1,$4,$5,0); ++ $$= new (thd->mem_root) Item_date_add_interval($1,$4,$5,0); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr '-' INTERVAL_SYM expr interval %prec '-' + { +- $$= new (YYTHD->mem_root) Item_date_add_interval($1,$4,$5,1); ++ $$= new (thd->mem_root) Item_date_add_interval($1,$4,$5,1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr '*' bit_expr %prec '*' + { +- $$= new (YYTHD->mem_root) Item_func_mul($1,$3); ++ $$= new (thd->mem_root) Item_func_mul($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr '/' bit_expr %prec '/' + { +- $$= new (YYTHD->mem_root) Item_func_div($1,$3); ++ $$= new (thd->mem_root) Item_func_div($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr '%' bit_expr %prec '%' + { +- $$= new (YYTHD->mem_root) Item_func_mod($1,$3); ++ $$= new (thd->mem_root) Item_func_mod($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr DIV_SYM bit_expr %prec DIV_SYM + { +- $$= new (YYTHD->mem_root) Item_func_int_div($1,$3); ++ $$= new (thd->mem_root) Item_func_int_div($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr MOD_SYM bit_expr %prec MOD_SYM + { +- $$= new (YYTHD->mem_root) Item_func_mod($1,$3); ++ $$= new (thd->mem_root) Item_func_mod($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | bit_expr '^' bit_expr + { +- $$= new (YYTHD->mem_root) Item_func_bit_xor($1,$3); ++ $$= new (thd->mem_root) Item_func_bit_xor($1,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7299,7 +7274,6 @@ + | function_call_conflict + | simple_expr COLLATE_SYM ident_or_text %prec NEG + { +- THD *thd= YYTHD; + Item *i1= new (thd->mem_root) Item_string($3.str, + $3.length, + thd->charset()); +@@ -7315,7 +7289,7 @@ + | sum_expr + | simple_expr OR_OR_SYM simple_expr + { +- $$= new (YYTHD->mem_root) Item_func_concat($1, $3); ++ $$= new (thd->mem_root) Item_func_concat($1, $3); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7325,25 +7299,25 @@ + } + | '-' simple_expr %prec NEG + { +- $$= new (YYTHD->mem_root) Item_func_neg($2); ++ $$= new (thd->mem_root) Item_func_neg($2); + if ($$ == NULL) + MYSQL_YYABORT; + } + | '~' simple_expr %prec NEG + { +- $$= new (YYTHD->mem_root) Item_func_bit_neg($2); ++ $$= new (thd->mem_root) Item_func_bit_neg($2); + if ($$ == NULL) + MYSQL_YYABORT; + } + | not2 simple_expr %prec NEG + { +- $$= negate_expression(YYTHD, $2); ++ $$= negate_expression(thd, $2); + if ($$ == NULL) + MYSQL_YYABORT; + } + | '(' subselect ')' + { +- $$= new (YYTHD->mem_root) Item_singlerow_subselect($2); ++ $$= new (thd->mem_root) Item_singlerow_subselect($2); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7352,20 +7326,20 @@ + | '(' expr ',' expr_list ')' + { + $4->push_front($2); +- $$= new (YYTHD->mem_root) Item_row(*$4); ++ $$= new (thd->mem_root) Item_row(*$4); + if ($$ == NULL) + MYSQL_YYABORT; + } + | ROW_SYM '(' expr ',' expr_list ')' + { + $5->push_front($3); +- $$= new (YYTHD->mem_root) Item_row(*$5); ++ $$= new (thd->mem_root) Item_row(*$5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | EXISTS '(' subselect ')' + { +- $$= new (YYTHD->mem_root) Item_exists_subselect($3); ++ $$= new (thd->mem_root) Item_exists_subselect($3); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7374,7 +7348,7 @@ + | MATCH ident_list_arg AGAINST '(' bit_expr fulltext_options ')' + { + $2->push_front($5); +- Item_func_match *i1= new (YYTHD->mem_root) Item_func_match(*$2, $6); ++ Item_func_match *i1= new (thd->mem_root) Item_func_match(*$2, $6); + if (i1 == NULL) + MYSQL_YYABORT; + Select->add_ftfunc_to_list(i1); +@@ -7382,7 +7356,7 @@ + } + | BINARY simple_expr %prec NEG + { +- $$= create_func_cast(YYTHD, $2, ITEM_CAST_CHAR, NULL, NULL, ++ $$= create_func_cast(thd, $2, ITEM_CAST_CHAR, NULL, NULL, + &my_charset_bin); + if ($$ == NULL) + MYSQL_YYABORT; +@@ -7390,27 +7364,27 @@ + | CAST_SYM '(' expr AS cast_type ')' + { + LEX *lex= Lex; +- $$= create_func_cast(YYTHD, $3, $5, lex->length, lex->dec, ++ $$= create_func_cast(thd, $3, $5, lex->length, lex->dec, + lex->charset); + if ($$ == NULL) + MYSQL_YYABORT; + } + | CASE_SYM opt_expr when_list opt_else END + { +- $$= new (YYTHD->mem_root) Item_func_case(* $3, $2, $4 ); ++ $$= new (thd->mem_root) Item_func_case(* $3, $2, $4 ); + if ($$ == NULL) + MYSQL_YYABORT; + } + | CONVERT_SYM '(' expr ',' cast_type ')' + { +- $$= create_func_cast(YYTHD, $3, $5, Lex->length, Lex->dec, ++ $$= create_func_cast(thd, $3, $5, Lex->length, Lex->dec, + Lex->charset); + if ($$ == NULL) + MYSQL_YYABORT; + } + | CONVERT_SYM '(' expr USING charset_name ')' + { +- $$= new (YYTHD->mem_root) Item_func_conv_charset($3,$5); ++ $$= new (thd->mem_root) Item_func_conv_charset($3,$5); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7423,14 +7397,14 @@ + my_error(ER_WRONG_COLUMN_NAME, MYF(0), il->my_name()->str); + MYSQL_YYABORT; + } +- $$= new (YYTHD->mem_root) Item_default_value(Lex->current_context(), ++ $$= new (thd->mem_root) Item_default_value(Lex->current_context(), + $3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | VALUES '(' simple_ident_nospvar ')' + { +- $$= new (YYTHD->mem_root) Item_insert_value(Lex->current_context(), ++ $$= new (thd->mem_root) Item_insert_value(Lex->current_context(), + $3); + if ($$ == NULL) + MYSQL_YYABORT; +@@ -7438,7 +7412,7 @@ + | INTERVAL_SYM expr interval '+' expr %prec INTERVAL_SYM + /* we cannot put interval before - */ + { +- $$= new (YYTHD->mem_root) Item_date_add_interval($5,$2,$3,0); ++ $$= new (thd->mem_root) Item_date_add_interval($5,$2,$3,0); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7453,19 +7427,19 @@ + function_call_keyword: + CHAR_SYM '(' expr_list ')' + { +- $$= new (YYTHD->mem_root) Item_func_char(*$3); ++ $$= new (thd->mem_root) Item_func_char(*$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | CHAR_SYM '(' expr_list USING charset_name ')' + { +- $$= new (YYTHD->mem_root) Item_func_char(*$3, $5); ++ $$= new (thd->mem_root) Item_func_char(*$3, $5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | CURRENT_USER optional_braces + { +- $$= new (YYTHD->mem_root) Item_func_current_user(Lex->current_context()); ++ $$= new (thd->mem_root) Item_func_current_user(Lex->current_context()); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->set_stmt_unsafe(); +@@ -7473,31 +7447,30 @@ + } + | DATE_SYM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_date_typecast($3); ++ $$= new (thd->mem_root) Item_date_typecast($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | DAY_SYM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_dayofmonth($3); ++ $$= new (thd->mem_root) Item_func_dayofmonth($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | HOUR_SYM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_hour($3); ++ $$= new (thd->mem_root) Item_func_hour($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | INSERT '(' expr ',' expr ',' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_insert($3,$5,$7,$9); ++ $$= new (thd->mem_root) Item_func_insert($3,$5,$7,$9); + if ($$ == NULL) + MYSQL_YYABORT; + } + | INTERVAL_SYM '(' expr ',' expr ')' %prec INTERVAL_SYM + { +- THD *thd= YYTHD; + List *list= new (thd->mem_root) List; + if (list == NULL) + MYSQL_YYABORT; +@@ -7512,7 +7485,6 @@ + } + | INTERVAL_SYM '(' expr ',' expr ',' expr_list ')' %prec INTERVAL_SYM + { +- THD *thd= YYTHD; + $7->push_front($5); + $7->push_front($3); + Item_row *item= new (thd->mem_root) Item_row(*$7); +@@ -7524,103 +7496,103 @@ + } + | LEFT '(' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_left($3,$5); ++ $$= new (thd->mem_root) Item_func_left($3,$5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | MINUTE_SYM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_minute($3); ++ $$= new (thd->mem_root) Item_func_minute($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | MONTH_SYM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_month($3); ++ $$= new (thd->mem_root) Item_func_month($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | RIGHT '(' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_right($3,$5); ++ $$= new (thd->mem_root) Item_func_right($3,$5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | SECOND_SYM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_second($3); ++ $$= new (thd->mem_root) Item_func_second($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TIME_SYM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_time_typecast($3); ++ $$= new (thd->mem_root) Item_time_typecast($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TIMESTAMP '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_datetime_typecast($3); ++ $$= new (thd->mem_root) Item_datetime_typecast($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TIMESTAMP '(' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_add_time($3, $5, 1, 0); ++ $$= new (thd->mem_root) Item_func_add_time($3, $5, 1, 0); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TRIM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_trim($3); ++ $$= new (thd->mem_root) Item_func_trim($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TRIM '(' LEADING expr FROM expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_ltrim($6,$4); ++ $$= new (thd->mem_root) Item_func_ltrim($6,$4); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TRIM '(' TRAILING expr FROM expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_rtrim($6,$4); ++ $$= new (thd->mem_root) Item_func_rtrim($6,$4); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TRIM '(' BOTH expr FROM expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_trim($6,$4); ++ $$= new (thd->mem_root) Item_func_trim($6,$4); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TRIM '(' LEADING FROM expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_ltrim($5); ++ $$= new (thd->mem_root) Item_func_ltrim($5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TRIM '(' TRAILING FROM expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_rtrim($5); ++ $$= new (thd->mem_root) Item_func_rtrim($5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TRIM '(' BOTH FROM expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_trim($5); ++ $$= new (thd->mem_root) Item_func_trim($5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TRIM '(' expr FROM expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_trim($5,$3); ++ $$= new (thd->mem_root) Item_func_trim($5,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | USER '(' ')' + { +- $$= new (YYTHD->mem_root) Item_func_user(); ++ $$= new (thd->mem_root) Item_func_user(); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->set_stmt_unsafe(); +@@ -7628,7 +7600,7 @@ + } + | YEAR_SYM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_year($3); ++ $$= new (thd->mem_root) Item_func_year($3); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7649,34 +7621,34 @@ + function_call_nonkeyword: + ADDDATE_SYM '(' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_date_add_interval($3, $5, ++ $$= new (thd->mem_root) Item_date_add_interval($3, $5, + INTERVAL_DAY, 0); + if ($$ == NULL) + MYSQL_YYABORT; + } + | ADDDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' + { +- $$= new (YYTHD->mem_root) Item_date_add_interval($3, $6, $7, 0); ++ $$= new (thd->mem_root) Item_date_add_interval($3, $6, $7, 0); + if ($$ == NULL) + MYSQL_YYABORT; + } + | CURDATE optional_braces + { +- $$= new (YYTHD->mem_root) Item_func_curdate_local(); ++ $$= new (thd->mem_root) Item_func_curdate_local(); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->safe_to_cache_query=0; + } + | CURTIME optional_braces + { +- $$= new (YYTHD->mem_root) Item_func_curtime_local(); ++ $$= new (thd->mem_root) Item_func_curtime_local(); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->safe_to_cache_query=0; + } + | CURTIME '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_curtime_local($3); ++ $$= new (thd->mem_root) Item_func_curtime_local($3); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->safe_to_cache_query=0; +@@ -7684,83 +7656,83 @@ + | DATE_ADD_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' + %prec INTERVAL_SYM + { +- $$= new (YYTHD->mem_root) Item_date_add_interval($3,$6,$7,0); ++ $$= new (thd->mem_root) Item_date_add_interval($3,$6,$7,0); + if ($$ == NULL) + MYSQL_YYABORT; + } + | DATE_SUB_INTERVAL '(' expr ',' INTERVAL_SYM expr interval ')' + %prec INTERVAL_SYM + { +- $$= new (YYTHD->mem_root) Item_date_add_interval($3,$6,$7,1); ++ $$= new (thd->mem_root) Item_date_add_interval($3,$6,$7,1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | EXTRACT_SYM '(' interval FROM expr ')' + { +- $$=new (YYTHD->mem_root) Item_extract( $3, $5); ++ $$=new (thd->mem_root) Item_extract( $3, $5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | GET_FORMAT '(' date_time_type ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_get_format($3, $5); ++ $$= new (thd->mem_root) Item_func_get_format($3, $5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | NOW_SYM optional_braces + { +- $$= new (YYTHD->mem_root) Item_func_now_local(); ++ $$= new (thd->mem_root) Item_func_now_local(); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->safe_to_cache_query=0; + } + | NOW_SYM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_now_local($3); ++ $$= new (thd->mem_root) Item_func_now_local($3); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->safe_to_cache_query=0; + } + | POSITION_SYM '(' bit_expr IN_SYM expr ')' + { +- $$ = new (YYTHD->mem_root) Item_func_locate($5,$3); ++ $$ = new (thd->mem_root) Item_func_locate($5,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | SUBDATE_SYM '(' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_date_add_interval($3, $5, ++ $$= new (thd->mem_root) Item_date_add_interval($3, $5, + INTERVAL_DAY, 1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | SUBDATE_SYM '(' expr ',' INTERVAL_SYM expr interval ')' + { +- $$= new (YYTHD->mem_root) Item_date_add_interval($3, $6, $7, 1); ++ $$= new (thd->mem_root) Item_date_add_interval($3, $6, $7, 1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | SUBSTRING '(' expr ',' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_substr($3,$5,$7); ++ $$= new (thd->mem_root) Item_func_substr($3,$5,$7); + if ($$ == NULL) + MYSQL_YYABORT; + } + | SUBSTRING '(' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_substr($3,$5); ++ $$= new (thd->mem_root) Item_func_substr($3,$5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | SUBSTRING '(' expr FROM expr FOR_SYM expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_substr($3,$5,$7); ++ $$= new (thd->mem_root) Item_func_substr($3,$5,$7); + if ($$ == NULL) + MYSQL_YYABORT; + } + | SUBSTRING '(' expr FROM expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_substr($3,$5); ++ $$= new (thd->mem_root) Item_func_substr($3,$5); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7775,9 +7747,9 @@ + */ + Lex->set_stmt_unsafe(); + if (global_system_variables.sysdate_is_now == 0) +- $$= new (YYTHD->mem_root) Item_func_sysdate_local(); ++ $$= new (thd->mem_root) Item_func_sysdate_local(); + else +- $$= new (YYTHD->mem_root) Item_func_now_local(); ++ $$= new (thd->mem_root) Item_func_now_local(); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->safe_to_cache_query=0; +@@ -7785,42 +7757,42 @@ + | SYSDATE '(' expr ')' + { + if (global_system_variables.sysdate_is_now == 0) +- $$= new (YYTHD->mem_root) Item_func_sysdate_local($3); ++ $$= new (thd->mem_root) Item_func_sysdate_local($3); + else +- $$= new (YYTHD->mem_root) Item_func_now_local($3); ++ $$= new (thd->mem_root) Item_func_now_local($3); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->safe_to_cache_query=0; + } + | TIMESTAMP_ADD '(' interval_time_stamp ',' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_date_add_interval($7,$5,$3,0); ++ $$= new (thd->mem_root) Item_date_add_interval($7,$5,$3,0); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TIMESTAMP_DIFF '(' interval_time_stamp ',' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_timestamp_diff($5,$7,$3); ++ $$= new (thd->mem_root) Item_func_timestamp_diff($5,$7,$3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | UTC_DATE_SYM optional_braces + { +- $$= new (YYTHD->mem_root) Item_func_curdate_utc(); ++ $$= new (thd->mem_root) Item_func_curdate_utc(); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->safe_to_cache_query=0; + } + | UTC_TIME_SYM optional_braces + { +- $$= new (YYTHD->mem_root) Item_func_curtime_utc(); ++ $$= new (thd->mem_root) Item_func_curtime_utc(); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->safe_to_cache_query=0; + } + | UTC_TIMESTAMP_SYM optional_braces + { +- $$= new (YYTHD->mem_root) Item_func_now_utc(); ++ $$= new (thd->mem_root) Item_func_now_utc(); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->safe_to_cache_query=0; +@@ -7835,62 +7807,61 @@ + function_call_conflict: + ASCII_SYM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_ascii($3); ++ $$= new (thd->mem_root) Item_func_ascii($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | CHARSET '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_charset($3); ++ $$= new (thd->mem_root) Item_func_charset($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | COALESCE '(' expr_list ')' + { +- $$= new (YYTHD->mem_root) Item_func_coalesce(* $3); ++ $$= new (thd->mem_root) Item_func_coalesce(* $3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | COLLATION_SYM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_collation($3); ++ $$= new (thd->mem_root) Item_func_collation($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | DATABASE '(' ')' + { +- $$= new (YYTHD->mem_root) Item_func_database(); ++ $$= new (thd->mem_root) Item_func_database(); + if ($$ == NULL) + MYSQL_YYABORT; + Lex->safe_to_cache_query=0; + } + | IF '(' expr ',' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_if($3,$5,$7); ++ $$= new (thd->mem_root) Item_func_if($3,$5,$7); + if ($$ == NULL) + MYSQL_YYABORT; + } + | MICROSECOND_SYM '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_microsecond($3); ++ $$= new (thd->mem_root) Item_func_microsecond($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | MOD_SYM '(' expr ',' expr ')' + { +- $$ = new (YYTHD->mem_root) Item_func_mod($3, $5); ++ $$ = new (thd->mem_root) Item_func_mod($3, $5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | OLD_PASSWORD '(' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_old_password($3); ++ $$= new (thd->mem_root) Item_func_old_password($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | PASSWORD '(' expr ')' + { +- THD *thd= YYTHD; + Item* i1; + if (thd->variables.old_passwords) + i1= new (thd->mem_root) Item_func_old_password($3); +@@ -7902,31 +7873,30 @@ + } + | QUARTER_SYM '(' expr ')' + { +- $$ = new (YYTHD->mem_root) Item_func_quarter($3); ++ $$ = new (thd->mem_root) Item_func_quarter($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | REPEAT_SYM '(' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_repeat($3,$5); ++ $$= new (thd->mem_root) Item_func_repeat($3,$5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | REPLACE '(' expr ',' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_replace($3,$5,$7); ++ $$= new (thd->mem_root) Item_func_replace($3,$5,$7); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TRUNCATE_SYM '(' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_round($3,$5,1); ++ $$= new (thd->mem_root) Item_func_round($3,$5,1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | WEEK_SYM '(' expr ')' + { +- THD *thd= YYTHD; + Item *i1= new (thd->mem_root) Item_int((char*) "0", + thd->variables.default_week_format, + 1); +@@ -7938,7 +7908,7 @@ + } + | WEEK_SYM '(' expr ',' expr ')' + { +- $$= new (YYTHD->mem_root) Item_func_week($3,$5); ++ $$= new (thd->mem_root) Item_func_week($3,$5); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -7960,52 +7930,52 @@ + geometry_function: + CONTAINS_SYM '(' expr ',' expr ')' + { +- $$= GEOM_NEW(YYTHD, ++ $$= GEOM_NEW(thd, + Item_func_spatial_rel($3, $5, + Item_func::SP_CONTAINS_FUNC)); + } + | GEOMETRYCOLLECTION '(' expr_list ')' + { +- $$= GEOM_NEW(YYTHD, ++ $$= GEOM_NEW(thd, + Item_func_spatial_collection(* $3, + Geometry::wkb_geometrycollection, + Geometry::wkb_point)); + } + | LINESTRING '(' expr_list ')' + { +- $$= GEOM_NEW(YYTHD, ++ $$= GEOM_NEW(thd, + Item_func_spatial_collection(* $3, + Geometry::wkb_linestring, + Geometry::wkb_point)); + } + | MULTILINESTRING '(' expr_list ')' + { +- $$= GEOM_NEW(YYTHD, ++ $$= GEOM_NEW(thd, + Item_func_spatial_collection(* $3, + Geometry::wkb_multilinestring, + Geometry::wkb_linestring)); + } + | MULTIPOINT '(' expr_list ')' + { +- $$= GEOM_NEW(YYTHD, ++ $$= GEOM_NEW(thd, + Item_func_spatial_collection(* $3, + Geometry::wkb_multipoint, + Geometry::wkb_point)); + } + | MULTIPOLYGON '(' expr_list ')' + { +- $$= GEOM_NEW(YYTHD, ++ $$= GEOM_NEW(thd, + Item_func_spatial_collection(* $3, + Geometry::wkb_multipolygon, + Geometry::wkb_polygon)); + } + | POINT_SYM '(' expr ',' expr ')' + { +- $$= GEOM_NEW(YYTHD, Item_func_point($3,$5)); ++ $$= GEOM_NEW(thd, Item_func_point($3,$5)); + } + | POLYGON '(' expr_list ')' + { +- $$= GEOM_NEW(YYTHD, ++ $$= GEOM_NEW(thd, + Item_func_spatial_collection(* $3, + Geometry::wkb_polygon, + Geometry::wkb_linestring)); +@@ -8043,7 +8013,6 @@ + } + opt_udf_expr_list ')' + { +- THD *thd= YYTHD; + Create_func *builder; + Item *item= NULL; + +@@ -8097,7 +8066,6 @@ + } + | ident '.' ident '(' opt_expr_list ')' + { +- THD *thd= YYTHD; + Create_qfunc *builder; + Item *item= NULL; + +@@ -8161,7 +8129,7 @@ + udf_expr_list: + udf_expr + { +- $$= new (YYTHD->mem_root) List; ++ $$= new (thd->mem_root) List; + if ($$ == NULL) + MYSQL_YYABORT; + $$->push_back($1); +@@ -8194,7 +8162,7 @@ + remember_name we may get quoted or escaped names. + */ + else if ($2->type() != Item::FIELD_ITEM) +- $2->set_name($1, (uint) ($3 - $1), YYTHD->charset()); ++ $2->set_name($1, (uint) ($3 - $1), thd->charset()); + $$= $2; + } + ; +@@ -8202,46 +8170,46 @@ + sum_expr: + AVG_SYM '(' in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_avg($3); ++ $$= new (thd->mem_root) Item_sum_avg($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | AVG_SYM '(' DISTINCT in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_avg_distinct($4); ++ $$= new (thd->mem_root) Item_sum_avg_distinct($4); + if ($$ == NULL) + MYSQL_YYABORT; + } + | BIT_AND '(' in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_and($3); ++ $$= new (thd->mem_root) Item_sum_and($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | BIT_OR '(' in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_or($3); ++ $$= new (thd->mem_root) Item_sum_or($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | BIT_XOR '(' in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_xor($3); ++ $$= new (thd->mem_root) Item_sum_xor($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | COUNT_SYM '(' opt_all '*' ')' + { +- Item *item= new (YYTHD->mem_root) Item_int((int32) 0L,1); ++ Item *item= new (thd->mem_root) Item_int((int32) 0L,1); + if (item == NULL) + MYSQL_YYABORT; +- $$= new (YYTHD->mem_root) Item_sum_count(item); ++ $$= new (thd->mem_root) Item_sum_count(item); + if ($$ == NULL) + MYSQL_YYABORT; + } + | COUNT_SYM '(' in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_count($3); ++ $$= new (thd->mem_root) Item_sum_count($3); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -8251,13 +8219,13 @@ + { Select->in_sum_expr--; } + ')' + { +- $$= new (YYTHD->mem_root) Item_sum_count_distinct(* $5); ++ $$= new (thd->mem_root) Item_sum_count_distinct(* $5); + if ($$ == NULL) + MYSQL_YYABORT; + } + | MIN_SYM '(' in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_min($3); ++ $$= new (thd->mem_root) Item_sum_min($3); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -8268,55 +8236,55 @@ + */ + | MIN_SYM '(' DISTINCT in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_min($4); ++ $$= new (thd->mem_root) Item_sum_min($4); + if ($$ == NULL) + MYSQL_YYABORT; + } + | MAX_SYM '(' in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_max($3); ++ $$= new (thd->mem_root) Item_sum_max($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | MAX_SYM '(' DISTINCT in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_max($4); ++ $$= new (thd->mem_root) Item_sum_max($4); + if ($$ == NULL) + MYSQL_YYABORT; + } + | STD_SYM '(' in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_std($3, 0); ++ $$= new (thd->mem_root) Item_sum_std($3, 0); + if ($$ == NULL) + MYSQL_YYABORT; + } + | VARIANCE_SYM '(' in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_variance($3, 0); ++ $$= new (thd->mem_root) Item_sum_variance($3, 0); + if ($$ == NULL) + MYSQL_YYABORT; + } + | STDDEV_SAMP_SYM '(' in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_std($3, 1); ++ $$= new (thd->mem_root) Item_sum_std($3, 1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | VAR_SAMP_SYM '(' in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_variance($3, 1); ++ $$= new (thd->mem_root) Item_sum_variance($3, 1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | SUM_SYM '(' in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_sum($3); ++ $$= new (thd->mem_root) Item_sum_sum($3); + if ($$ == NULL) + MYSQL_YYABORT; + } + | SUM_SYM '(' DISTINCT in_sum_expr ')' + { +- $$= new (YYTHD->mem_root) Item_sum_sum_distinct($4); ++ $$= new (thd->mem_root) Item_sum_sum_distinct($4); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -8328,7 +8296,7 @@ + { + SELECT_LEX *sel= Select; + sel->in_sum_expr--; +- $$= new (YYTHD->mem_root) ++ $$= new (thd->mem_root) + Item_func_group_concat(Lex->current_context(), $3, $5, + sel->gorder_list, $7); + if ($$ == NULL) +@@ -8357,7 +8325,7 @@ + ident_or_text SET_VAR expr + { + Item_func_set_user_var *item; +- $$= item= new (YYTHD->mem_root) Item_func_set_user_var($1, $3); ++ $$= item= new (thd->mem_root) Item_func_set_user_var($1, $3); + if ($$ == NULL) + MYSQL_YYABORT; + LEX *lex= Lex; +@@ -8366,7 +8334,7 @@ + } + | ident_or_text + { +- $$= new (YYTHD->mem_root) Item_func_get_user_var($1); ++ $$= new (thd->mem_root) Item_func_get_user_var($1); + if ($$ == NULL) + MYSQL_YYABORT; + LEX *lex= Lex; +@@ -8380,7 +8348,7 @@ + my_parse_error(ER(ER_SYNTAX_ERROR)); + MYSQL_YYABORT; + } +- if (!($$= get_system_var(YYTHD, $2, $3, $4))) ++ if (!($$= get_system_var(thd, $2, $3, $4))) + MYSQL_YYABORT; + if (!((Item_func_get_system_var*) $$)->is_written_to_binlog()) + Lex->set_stmt_unsafe(); +@@ -8395,7 +8363,7 @@ + opt_gconcat_separator: + /* empty */ + { +- $$= new (YYTHD->mem_root) String(",", 1, &my_charset_latin1); ++ $$= new (thd->mem_root) String(",", 1, &my_charset_latin1); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -8422,9 +8390,9 @@ + + gorder_list: + gorder_list ',' order_ident order_dir +- { if (add_gorder_to_list(YYTHD, $3,(bool) $4)) MYSQL_YYABORT; } ++ { if (add_gorder_to_list(thd, $3,(bool) $4)) MYSQL_YYABORT; } + | order_ident order_dir +- { if (add_gorder_to_list(YYTHD, $1,(bool) $2)) MYSQL_YYABORT; } ++ { if (add_gorder_to_list(thd, $1,(bool) $2)) MYSQL_YYABORT; } + ; + + in_sum_expr: +@@ -8477,7 +8445,7 @@ + expr_list: + expr + { +- $$= new (YYTHD->mem_root) List; ++ $$= new (thd->mem_root) List; + if ($$ == NULL) + MYSQL_YYABORT; + $$->push_back($1); +@@ -8497,7 +8465,7 @@ + ident_list: + simple_ident + { +- $$= new (YYTHD->mem_root) List; ++ $$= new (thd->mem_root) List; + if ($$ == NULL) + MYSQL_YYABORT; + $$->push_back($1); +@@ -8595,7 +8563,7 @@ + { + MYSQL_YYABORT_UNLESS($1 && $3); + /* Change the current name resolution context to a local context. */ +- if (push_new_name_resolution_context(YYTHD, $1, $3)) ++ if (push_new_name_resolution_context(thd, $1, $3)) + MYSQL_YYABORT; + Select->parsing_place= IN_ON; + } +@@ -8610,7 +8578,7 @@ + { + MYSQL_YYABORT_UNLESS($1 && $3); + /* Change the current name resolution context to a local context. */ +- if (push_new_name_resolution_context(YYTHD, $1, $3)) ++ if (push_new_name_resolution_context(thd, $1, $3)) + MYSQL_YYABORT; + Select->parsing_place= IN_ON; + } +@@ -8640,7 +8608,7 @@ + { + MYSQL_YYABORT_UNLESS($1 && $5); + /* Change the current name resolution context to a local context. */ +- if (push_new_name_resolution_context(YYTHD, $1, $5)) ++ if (push_new_name_resolution_context(thd, $1, $5)) + MYSQL_YYABORT; + Select->parsing_place= IN_ON; + } +@@ -8676,7 +8644,7 @@ + { + MYSQL_YYABORT_UNLESS($1 && $5); + /* Change the current name resolution context to a local context. */ +- if (push_new_name_resolution_context(YYTHD, $1, $5)) ++ if (push_new_name_resolution_context(thd, $1, $5)) + MYSQL_YYABORT; + Select->parsing_place= IN_ON; + } +@@ -8724,7 +8692,7 @@ + } + table_ident opt_table_alias opt_key_definition + { +- if (!($$= Select->add_table_to_list(YYTHD, $2, $3, ++ if (!($$= Select->add_table_to_list(thd, $2, $3, + Select->get_table_join_options(), + Lex->lock_option, + Select->pop_index_hints()))) +@@ -8922,7 +8890,7 @@ + + opt_index_hints_list: + /* empty */ +- | { Select->alloc_index_hints(YYTHD); } index_hints_list ++ | { Select->alloc_index_hints(thd); } index_hints_list + ; + + opt_key_definition: +@@ -8931,15 +8899,15 @@ + ; + + opt_key_usage_list: +- /* empty */ { Select->add_index_hint(YYTHD, NULL, 0); } ++ /* empty */ { Select->add_index_hint(thd, NULL, 0); } + | key_usage_list {} + ; + + key_usage_element: + ident +- { Select->add_index_hint(YYTHD, $1.str, $1.length); } ++ { Select->add_index_hint(thd, $1.str, $1.length); } + | PRIMARY_SYM +- { Select->add_index_hint(YYTHD, (char *)"PRIMARY", 7); } ++ { Select->add_index_hint(thd, (char *)"PRIMARY", 7); } + ; + + key_usage_list: +@@ -8952,7 +8920,7 @@ + { + if (!($$= new List)) + MYSQL_YYABORT; +- String *s= new (YYTHD->mem_root) String((const char *) $1.str, ++ String *s= new (thd->mem_root) String((const char *) $1.str, + $1.length, + system_charset_info); + if (s == NULL) +@@ -8961,7 +8929,7 @@ + } + | using_list ',' ident + { +- String *s= new (YYTHD->mem_root) String((const char *) $3.str, ++ String *s= new (thd->mem_root) String((const char *) $3.str, + $3.length, + system_charset_info); + if (s == NULL) +@@ -9002,7 +8970,7 @@ + implementation without changing its + resolution. + */ +- WARN_DEPRECATED(yythd, VER_CELOSIA, "FRAC_SECOND", "MICROSECOND"); ++ WARN_DEPRECATED(thd, VER_CELOSIA, "FRAC_SECOND", "MICROSECOND"); + } + ; + +@@ -9086,7 +9054,6 @@ + } + | /* empty */ + { +- THD *thd= YYTHD; + Lex->escape_used= FALSE; + $$= ((thd->variables.sql_mode & MODE_NO_BACKSLASH_ESCAPES) ? + new (thd->mem_root) Item_string("", 0, &my_charset_latin1) : +@@ -9107,9 +9074,9 @@ + + group_list: + group_list ',' order_ident order_dir +- { if (add_group_to_list(YYTHD, $3,(bool) $4)) MYSQL_YYABORT; } ++ { if (add_group_to_list(thd, $3,(bool) $4)) MYSQL_YYABORT; } + | order_ident order_dir +- { if (add_group_to_list(YYTHD, $1,(bool) $2)) MYSQL_YYABORT; } ++ { if (add_group_to_list(thd, $1,(bool) $2)) MYSQL_YYABORT; } + ; + + olap_opt: +@@ -9156,7 +9123,6 @@ + alter_order_item: + simple_ident_nospvar order_dir + { +- THD *thd= YYTHD; + bool ascending= ($2 == 1) ? true : false; + if (add_order_to_list(thd, $1, ascending)) + MYSQL_YYABORT; +@@ -9209,9 +9175,9 @@ + + order_list: + order_list ',' order_ident order_dir +- { if (add_order_to_list(YYTHD, $3,(bool) $4)) MYSQL_YYABORT; } ++ { if (add_order_to_list(thd, $3,(bool) $4)) MYSQL_YYABORT; } + | order_ident order_dir +- { if (add_order_to_list(YYTHD, $1,(bool) $2)) MYSQL_YYABORT; } ++ { if (add_order_to_list(thd, $1,(bool) $2)) MYSQL_YYABORT; } + ; + + order_dir: +@@ -9271,19 +9237,19 @@ + } + | ULONGLONG_NUM + { +- $$= new (YYTHD->mem_root) Item_uint($1.str, $1.length); ++ $$= new (thd->mem_root) Item_uint($1.str, $1.length); + if ($$ == NULL) + MYSQL_YYABORT; + } + | LONG_NUM + { +- $$= new (YYTHD->mem_root) Item_uint($1.str, $1.length); ++ $$= new (thd->mem_root) Item_uint($1.str, $1.length); + if ($$ == NULL) + MYSQL_YYABORT; + } + | NUM + { +- $$= new (YYTHD->mem_root) Item_uint($1.str, $1.length); ++ $$= new (thd->mem_root) Item_uint($1.str, $1.length); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -9365,7 +9331,7 @@ + lex->proc_list.elements=0; + lex->proc_list.first=0; + lex->proc_list.next= &lex->proc_list.first; +- Item_field *item= new (YYTHD->mem_root) ++ Item_field *item= new (thd->mem_root) + Item_field(&lex->current_select->context, + NULL, NULL, $2.str); + if (item == NULL) +@@ -9390,8 +9356,7 @@ + procedure_item: + remember_name expr remember_end + { +- THD *thd= YYTHD; +- ++ + if (add_proc_to_list(thd, $2)) + MYSQL_YYABORT; + if (!$2->name) +@@ -9560,7 +9525,6 @@ + } + | DROP FUNCTION_SYM if_exists ident '.' ident + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + sp_name *spname; + if ($4.str && check_db_name(&$4)) +@@ -9583,7 +9547,6 @@ + } + | DROP FUNCTION_SYM if_exists ident + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + LEX_STRING db= {0, 0}; + sp_name *spname; +@@ -9664,7 +9627,7 @@ + table_name: + table_ident + { +- if (!Select->add_table_to_list(YYTHD, $1, NULL, TL_OPTION_UPDATING)) ++ if (!Select->add_table_to_list(thd, $1, NULL, TL_OPTION_UPDATING)) + MYSQL_YYABORT; + } + ; +@@ -9677,7 +9640,7 @@ + table_alias_ref: + table_ident_opt_wild + { +- if (!Select->add_table_to_list(YYTHD, $1, NULL, ++ if (!Select->add_table_to_list(thd, $1, NULL, + TL_OPTION_UPDATING | TL_OPTION_ALIAS, + Lex->lock_option )) + MYSQL_YYABORT; +@@ -9868,7 +9831,7 @@ + expr { $$= $1;} + | DEFAULT + { +- $$= new (YYTHD->mem_root) Item_default_value(Lex->current_context()); ++ $$= new (thd->mem_root) Item_default_value(Lex->current_context()); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -9922,7 +9885,7 @@ + update_elem: + simple_ident_nospvar equal expr_or_default + { +- if (add_item_to_list(YYTHD, $1) || add_value_to_list(YYTHD, $3)) ++ if (add_item_to_list(thd, $1) || add_value_to_list(thd, $3)) + MYSQL_YYABORT; + } + ; +@@ -9965,7 +9928,7 @@ + single_multi: + FROM table_ident + { +- if (!Select->add_table_to_list(YYTHD, $2, NULL, TL_OPTION_UPDATING, ++ if (!Select->add_table_to_list(thd, $2, NULL, TL_OPTION_UPDATING, + Lex->lock_option)) + MYSQL_YYABORT; + } +@@ -9998,7 +9961,7 @@ + Table_ident *ti= new Table_ident($1); + if (ti == NULL) + MYSQL_YYABORT; +- if (!Select->add_table_to_list(YYTHD, ++ if (!Select->add_table_to_list(thd, + ti, + $3, + TL_OPTION_UPDATING | TL_OPTION_ALIAS, +@@ -10007,10 +9970,10 @@ + } + | ident '.' ident opt_wild opt_table_alias + { +- Table_ident *ti= new Table_ident(YYTHD, $1, $3, 0); ++ Table_ident *ti= new Table_ident(thd, $1, $3, 0); + if (ti == NULL) + MYSQL_YYABORT; +- if (!Select->add_table_to_list(YYTHD, ++ if (!Select->add_table_to_list(thd, + ti, + $5, + TL_OPTION_UPDATING | TL_OPTION_ALIAS, +@@ -10130,7 +10093,7 @@ + { + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_DATABASES; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_SCHEMATA)) ++ if (prepare_schema_table(thd, lex, 0, SCH_SCHEMATA)) + MYSQL_YYABORT; + } + | opt_full TABLES opt_db wild_and_where +@@ -10138,7 +10101,7 @@ + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_TABLES; + lex->select_lex.db= $3; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLE_NAMES)) ++ if (prepare_schema_table(thd, lex, 0, SCH_TABLE_NAMES)) + MYSQL_YYABORT; + } + | opt_full TRIGGERS_SYM opt_db wild_and_where +@@ -10146,7 +10109,7 @@ + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_TRIGGERS; + lex->select_lex.db= $3; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_TRIGGERS)) ++ if (prepare_schema_table(thd, lex, 0, SCH_TRIGGERS)) + MYSQL_YYABORT; + } + | EVENTS_SYM opt_db wild_and_where +@@ -10154,7 +10117,7 @@ + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_EVENTS; + lex->select_lex.db= $2; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_EVENTS)) ++ if (prepare_schema_table(thd, lex, 0, SCH_EVENTS)) + MYSQL_YYABORT; + } + | TABLE_SYM STATUS_SYM opt_db wild_and_where +@@ -10162,7 +10125,7 @@ + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_TABLE_STATUS; + lex->select_lex.db= $3; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLES)) ++ if (prepare_schema_table(thd, lex, 0, SCH_TABLES)) + MYSQL_YYABORT; + } + | OPEN_SYM TABLES opt_db wild_and_where +@@ -10170,22 +10133,22 @@ + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_OPEN_TABLES; + lex->select_lex.db= $3; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_OPEN_TABLES)) ++ if (prepare_schema_table(thd, lex, 0, SCH_OPEN_TABLES)) + MYSQL_YYABORT; + } + | opt_full PLUGIN_SYM + { + LEX *lex= Lex; +- WARN_DEPRECATED(yythd, "6.0", "SHOW PLUGIN", "'SHOW PLUGINS'"); ++ WARN_DEPRECATED(thd, "6.0", "SHOW PLUGIN", "'SHOW PLUGINS'"); + lex->sql_command= SQLCOM_SHOW_PLUGINS; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_PLUGINS)) ++ if (prepare_schema_table(thd, lex, 0, SCH_PLUGINS)) + MYSQL_YYABORT; + } + | PLUGINS_SYM + { + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_PLUGINS; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_PLUGINS)) ++ if (prepare_schema_table(thd, lex, 0, SCH_PLUGINS)) + MYSQL_YYABORT; + } + | ENGINE_SYM known_storage_engines show_engine_param +@@ -10198,7 +10161,7 @@ + lex->sql_command= SQLCOM_SHOW_FIELDS; + if ($5) + $4->change_db($5); +- if (prepare_schema_table(YYTHD, lex, $4, SCH_COLUMNS)) ++ if (prepare_schema_table(thd, lex, $4, SCH_COLUMNS)) + MYSQL_YYABORT; + } + | NEW_SYM MASTER_SYM FOR_SYM SLAVE +@@ -10233,7 +10196,7 @@ + lex->sql_command= SQLCOM_SHOW_KEYS; + if ($4) + $3->change_db($4); +- if (prepare_schema_table(YYTHD, lex, $3, SCH_STATISTICS)) ++ if (prepare_schema_table(thd, lex, $3, SCH_STATISTICS)) + MYSQL_YYABORT; + } + | COLUMN_SYM TYPES_SYM +@@ -10245,15 +10208,15 @@ + { + LEX *lex=Lex; + lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES; +- WARN_DEPRECATED(yythd, "6.0", "SHOW TABLE TYPES", "'SHOW [STORAGE] ENGINES'"); +- if (prepare_schema_table(YYTHD, lex, 0, SCH_ENGINES)) ++ WARN_DEPRECATED(thd, "6.0", "SHOW TABLE TYPES", "'SHOW [STORAGE] ENGINES'"); ++ if (prepare_schema_table(thd, lex, 0, SCH_ENGINES)) + MYSQL_YYABORT; + } + | opt_storage ENGINES_SYM + { + LEX *lex=Lex; + lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_ENGINES)) ++ if (prepare_schema_table(thd, lex, 0, SCH_ENGINES)) + MYSQL_YYABORT; + } + | AUTHORS_SYM +@@ -10285,7 +10248,7 @@ + { + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_PROFILE; +- if (prepare_schema_table(YYTHD, lex, NULL, SCH_PROFILES) != 0) ++ if (prepare_schema_table(thd, lex, NULL, SCH_PROFILES) != 0) + YYABORT; + } + | opt_var_type STATUS_SYM wild_and_where +@@ -10293,7 +10256,7 @@ + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_STATUS; + lex->option_type= $1; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_STATUS)) ++ if (prepare_schema_table(thd, lex, 0, SCH_STATUS)) + MYSQL_YYABORT; + } + | INNOBASE_SYM STATUS_SYM +@@ -10301,24 +10264,24 @@ + LEX *lex= Lex; + lex->sql_command = SQLCOM_SHOW_ENGINE_STATUS; + if (!(lex->create_info.db_type= +- ha_resolve_by_legacy_type(YYTHD, DB_TYPE_INNODB))) ++ ha_resolve_by_legacy_type(thd, DB_TYPE_INNODB))) + { + my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "InnoDB"); + MYSQL_YYABORT; + } +- WARN_DEPRECATED(yythd, "6.0", "SHOW INNODB STATUS", "'SHOW ENGINE INNODB STATUS'"); ++ WARN_DEPRECATED(thd, "6.0", "SHOW INNODB STATUS", "'SHOW ENGINE INNODB STATUS'"); + } + | MUTEX_SYM STATUS_SYM + { + LEX *lex= Lex; + lex->sql_command = SQLCOM_SHOW_ENGINE_MUTEX; + if (!(lex->create_info.db_type= +- ha_resolve_by_legacy_type(YYTHD, DB_TYPE_INNODB))) ++ ha_resolve_by_legacy_type(thd, DB_TYPE_INNODB))) + { + my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), "InnoDB"); + MYSQL_YYABORT; + } +- WARN_DEPRECATED(yythd, "6.0", "SHOW MUTEX STATUS", "'SHOW ENGINE INNODB MUTEX'"); ++ WARN_DEPRECATED(thd, "6.0", "SHOW MUTEX STATUS", "'SHOW ENGINE INNODB MUTEX'"); + } + | opt_full PROCESSLIST_SYM + { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;} +@@ -10327,21 +10290,21 @@ + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_VARIABLES; + lex->option_type= $1; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_VARIABLES)) ++ if (prepare_schema_table(thd, lex, 0, SCH_VARIABLES)) + MYSQL_YYABORT; + } + | charset wild_and_where + { + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_CHARSETS; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_CHARSETS)) ++ if (prepare_schema_table(thd, lex, 0, SCH_CHARSETS)) + MYSQL_YYABORT; + } + | COLLATION_SYM wild_and_where + { + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_COLLATIONS; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_COLLATIONS)) ++ if (prepare_schema_table(thd, lex, 0, SCH_COLLATIONS)) + MYSQL_YYABORT; + } + | GRANTS +@@ -10371,7 +10334,7 @@ + { + LEX *lex= Lex; + lex->sql_command = SQLCOM_SHOW_CREATE; +- if (!lex->select_lex.add_table_to_list(YYTHD, $3, NULL,0)) ++ if (!lex->select_lex.add_table_to_list(thd, $3, NULL,0)) + MYSQL_YYABORT; + lex->only_view= 0; + lex->create_info.storage_media= HA_SM_DEFAULT; +@@ -10380,7 +10343,7 @@ + { + LEX *lex= Lex; + lex->sql_command = SQLCOM_SHOW_CREATE; +- if (!lex->select_lex.add_table_to_list(YYTHD, $3, NULL, 0)) ++ if (!lex->select_lex.add_table_to_list(thd, $3, NULL, 0)) + MYSQL_YYABORT; + lex->only_view= 1; + } +@@ -10416,14 +10379,14 @@ + { + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_STATUS_PROC; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_PROCEDURES)) ++ if (prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)) + MYSQL_YYABORT; + } + | FUNCTION_SYM STATUS_SYM wild_and_where + { + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_STATUS_FUNC; +- if (prepare_schema_table(YYTHD, lex, 0, SCH_PROCEDURES)) ++ if (prepare_schema_table(thd, lex, 0, SCH_PROCEDURES)) + MYSQL_YYABORT; + } + | PROCEDURE CODE_SYM sp_name +@@ -10501,7 +10464,7 @@ + /* empty */ + | LIKE TEXT_STRING_sys + { +- Lex->wild= new (YYTHD->mem_root) String($2.str, $2.length, ++ Lex->wild= new (thd->mem_root) String($2.str, $2.length, + system_charset_info); + if (Lex->wild == NULL) + MYSQL_YYABORT; +@@ -10525,7 +10488,7 @@ + lex->sql_command= SQLCOM_SHOW_FIELDS; + lex->select_lex.db= 0; + lex->verbose= 0; +- if (prepare_schema_table(YYTHD, lex, $2, SCH_COLUMNS)) ++ if (prepare_schema_table(thd, lex, $2, SCH_COLUMNS)) + MYSQL_YYABORT; + } + opt_describe_column {} +@@ -10554,7 +10517,7 @@ + | text_string { Lex->wild= $1; } + | ident + { +- Lex->wild= new (YYTHD->mem_root) String((const char*) $1.str, ++ Lex->wild= new (thd->mem_root) String((const char*) $1.str, + $1.length, + system_charset_info); + if (Lex->wild == NULL) +@@ -10697,7 +10660,6 @@ + load: + LOAD DATA_SYM + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + + if (lex->sphead) +@@ -10711,7 +10673,7 @@ + | LOAD TABLE_SYM table_ident FROM MASTER_SYM + { + LEX *lex=Lex; +- WARN_DEPRECATED(yythd, "6.0", "LOAD TABLE FROM MASTER", ++ WARN_DEPRECATED(thd, "6.0", "LOAD TABLE FROM MASTER", + "MySQL Administrator (mysqldump, mysql)"); + if (lex->sphead) + { +@@ -10719,7 +10681,7 @@ + MYSQL_YYABORT; + } + lex->sql_command = SQLCOM_LOAD_MASTER_TABLE; +- if (!Select->add_table_to_list(YYTHD, $3, NULL, TL_OPTION_UPDATING)) ++ if (!Select->add_table_to_list(thd, $3, NULL, TL_OPTION_UPDATING)) + MYSQL_YYABORT; + } + ; +@@ -10739,7 +10701,7 @@ + opt_duplicate INTO TABLE_SYM table_ident + { + LEX *lex=Lex; +- if (!Select->add_table_to_list(YYTHD, $9, NULL, TL_OPTION_UPDATING, ++ if (!Select->add_table_to_list(thd, $9, NULL, TL_OPTION_UPDATING, + lex->lock_option)) + MYSQL_YYABORT; + lex->field_list.empty(); +@@ -10754,7 +10716,7 @@ + | FROM MASTER_SYM + { + Lex->sql_command = SQLCOM_LOAD_MASTER_DATA; +- WARN_DEPRECATED(yythd, "6.0", "LOAD DATA FROM MASTER", ++ WARN_DEPRECATED(thd, "6.0", "LOAD DATA FROM MASTER", + "mysqldump or future " + "BACKUP/RESTORE DATABASE facility"); + } +@@ -10872,7 +10834,7 @@ + simple_ident_nospvar {$$= $1;} + | '@' ident_or_text + { +- $$= new (YYTHD->mem_root) Item_user_var_as_out_param($2); ++ $$= new (thd->mem_root) Item_user_var_as_out_param($2); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -10889,7 +10851,6 @@ + TEXT_STRING + { + LEX_STRING tmp; +- THD *thd= YYTHD; + CHARSET_INFO *cs_con= thd->variables.collation_connection; + CHARSET_INFO *cs_cli= thd->variables.character_set_client; + uint repertoire= thd->lex->text_string_is_7bit && +@@ -10915,7 +10876,7 @@ + uint repertoire= Lex->text_string_is_7bit ? + MY_REPERTOIRE_ASCII : MY_REPERTOIRE_UNICODE30; + DBUG_ASSERT(my_charset_is_ascii_based(national_charset_info)); +- $$= new (YYTHD->mem_root) Item_string($1.str, $1.length, ++ $$= new (thd->mem_root) Item_string($1.str, $1.length, + national_charset_info, + DERIVATION_COERCIBLE, + repertoire); +@@ -10924,7 +10885,7 @@ + } + | UNDERSCORE_CHARSET TEXT_STRING + { +- Item_string *str= new (YYTHD->mem_root) Item_string($2.str, ++ Item_string *str= new (thd->mem_root) Item_string($2.str, + $2.length, $1); + if (str == NULL) + MYSQL_YYABORT; +@@ -10943,7 +10904,7 @@ + If the string has been pure ASCII so far, + check the new part. + */ +- CHARSET_INFO *cs= YYTHD->variables.collation_connection; ++ CHARSET_INFO *cs= thd->variables.collation_connection; + item->collation.repertoire|= my_string_repertoire(cs, + $2.str, + $2.length); +@@ -10954,15 +10915,15 @@ + text_string: + TEXT_STRING_literal + { +- $$= new (YYTHD->mem_root) String($1.str, ++ $$= new (thd->mem_root) String($1.str, + $1.length, +- YYTHD->variables.collation_connection); ++ thd->variables.collation_connection); + if ($$ == NULL) + MYSQL_YYABORT; + } + | HEX_NUM + { +- Item *tmp= new (YYTHD->mem_root) Item_hex_string($1.str, $1.length); ++ Item *tmp= new (thd->mem_root) Item_hex_string($1.str, $1.length); + if (tmp == NULL) + MYSQL_YYABORT; + /* +@@ -10974,7 +10935,7 @@ + } + | BIN_NUM + { +- Item *tmp= new (YYTHD->mem_root) Item_bin_string($1.str, $1.length); ++ Item *tmp= new (thd->mem_root) Item_bin_string($1.str, $1.length); + if (tmp == NULL) + MYSQL_YYABORT; + /* +@@ -10989,7 +10950,6 @@ + param_marker: + PARAM_MARKER + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= YYLIP; + Item_param *item; +@@ -11022,38 +10982,38 @@ + | NUM_literal { $$ = $1; } + | NULL_SYM + { +- $$ = new (YYTHD->mem_root) Item_null(); ++ $$ = new (thd->mem_root) Item_null(); + if ($$ == NULL) + MYSQL_YYABORT; + YYLIP->next_state= MY_LEX_OPERATOR_OR_IDENT; + } + | FALSE_SYM + { +- $$= new (YYTHD->mem_root) Item_int((char*) "FALSE",0,1); ++ $$= new (thd->mem_root) Item_int((char*) "FALSE",0,1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | TRUE_SYM + { +- $$= new (YYTHD->mem_root) Item_int((char*) "TRUE",1,1); ++ $$= new (thd->mem_root) Item_int((char*) "TRUE",1,1); + if ($$ == NULL) + MYSQL_YYABORT; + } + | HEX_NUM + { +- $$ = new (YYTHD->mem_root) Item_hex_string($1.str, $1.length); ++ $$ = new (thd->mem_root) Item_hex_string($1.str, $1.length); + if ($$ == NULL) + MYSQL_YYABORT; + } + | BIN_NUM + { +- $$= new (YYTHD->mem_root) Item_bin_string($1.str, $1.length); ++ $$= new (thd->mem_root) Item_bin_string($1.str, $1.length); + if ($$ == NULL) + MYSQL_YYABORT; + } + | UNDERSCORE_CHARSET HEX_NUM + { +- Item *tmp= new (YYTHD->mem_root) Item_hex_string($2.str, $2.length); ++ Item *tmp= new (thd->mem_root) Item_hex_string($2.str, $2.length); + if (tmp == NULL) + MYSQL_YYABORT; + /* +@@ -11064,7 +11024,7 @@ + String *str= tmp->val_str((String*) 0); + + Item_string *item_str; +- item_str= new (YYTHD->mem_root) ++ item_str= new (thd->mem_root) + Item_string(NULL, /* name will be set in select_item */ + str ? str->ptr() : "", + str ? str->length() : 0, +@@ -11082,7 +11042,7 @@ + } + | UNDERSCORE_CHARSET BIN_NUM + { +- Item *tmp= new (YYTHD->mem_root) Item_bin_string($2.str, $2.length); ++ Item *tmp= new (thd->mem_root) Item_bin_string($2.str, $2.length); + if (tmp == NULL) + MYSQL_YYABORT; + /* +@@ -11093,7 +11053,7 @@ + String *str= tmp->val_str((String*) 0); + + Item_string *item_str; +- item_str= new (YYTHD->mem_root) ++ item_str= new (thd->mem_root) + Item_string(NULL, /* name will be set in select_item */ + str ? str->ptr() : "", + str ? str->length() : 0, +@@ -11117,7 +11077,7 @@ + NUM + { + int error; +- $$= new (YYTHD->mem_root) ++ $$= new (thd->mem_root) + Item_int($1.str, + (longlong) my_strtoll10($1.str, NULL, &error), + $1.length); +@@ -11127,7 +11087,7 @@ + | LONG_NUM + { + int error; +- $$= new (YYTHD->mem_root) ++ $$= new (thd->mem_root) + Item_int($1.str, + (longlong) my_strtoll10($1.str, NULL, &error), + $1.length); +@@ -11136,23 +11096,23 @@ + } + | ULONGLONG_NUM + { +- $$= new (YYTHD->mem_root) Item_uint($1.str, $1.length); ++ $$= new (thd->mem_root) Item_uint($1.str, $1.length); + if ($$ == NULL) + MYSQL_YYABORT; + } + | DECIMAL_NUM + { +- $$= new (YYTHD->mem_root) Item_decimal($1.str, $1.length, +- YYTHD->charset()); +- if (($$ == NULL) || (YYTHD->is_error())) ++ $$= new (thd->mem_root) Item_decimal($1.str, $1.length, ++ thd->charset()); ++ if (($$ == NULL) || (thd->is_error())) + { + MYSQL_YYABORT; + } + } + | FLOAT_NUM + { +- $$= new (YYTHD->mem_root) Item_float($1.str, $1.length); +- if (($$ == NULL) || (YYTHD->is_error())) ++ $$= new (thd->mem_root) Item_float($1.str, $1.length); ++ if (($$ == NULL) || (thd->is_error())) + { + MYSQL_YYABORT; + } +@@ -11172,7 +11132,7 @@ + ident '.' '*' + { + SELECT_LEX *sel= Select; +- $$= new (YYTHD->mem_root) Item_field(Lex->current_context(), ++ $$= new (thd->mem_root) Item_field(Lex->current_context(), + NullS, $1.str, "*"); + if ($$ == NULL) + MYSQL_YYABORT; +@@ -11180,7 +11140,6 @@ + } + | ident '.' ident '.' '*' + { +- THD *thd= YYTHD; + SELECT_LEX *sel= Select; + const char* schema= thd->client_capabilities & CLIENT_NO_SCHEMA ? + NullS : $1.str; +@@ -11200,7 +11159,6 @@ + simple_ident: + ident + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= YYLIP; + sp_variable_t *spv; +@@ -11251,7 +11209,6 @@ + simple_ident_nospvar: + ident + { +- THD *thd= YYTHD; + SELECT_LEX *sel=Select; + if ((sel->parsing_place != IN_HAVING) || + (sel->get_in_sum_expr() > 0)) +@@ -11273,7 +11230,6 @@ + simple_ident_q: + ident '.' ident + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + + /* +@@ -11352,7 +11308,6 @@ + } + | '.' ident '.' ident + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + SELECT_LEX *sel= lex->current_select; + if (sel->no_table_names_allowed) +@@ -11377,7 +11332,6 @@ + } + | ident '.' ident '.' ident + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + SELECT_LEX *sel= lex->current_select; + const char* schema= (thd->client_capabilities & CLIENT_NO_SCHEMA ? +@@ -11445,7 +11399,7 @@ + } + | ident '.' ident + { +- $$= new Table_ident(YYTHD, $1,$3,0); ++ $$= new Table_ident(thd, $1,$3,0); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -11467,7 +11421,7 @@ + } + | ident '.' ident opt_wild + { +- $$= new Table_ident(YYTHD, $1,$3,0); ++ $$= new Table_ident(thd, $1,$3,0); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -11477,7 +11431,7 @@ + ident + { + LEX_STRING db={(char*) any_db,3}; +- $$= new Table_ident(YYTHD, db,$1,0); ++ $$= new Table_ident(thd, db,$1,0); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -11487,8 +11441,7 @@ + IDENT { $$= $1; } + | IDENT_QUOTED + { +- THD *thd= YYTHD; +- ++ + if (thd->charset_is_system_charset) + { + CHARSET_INFO *cs= system_charset_info; +@@ -11516,8 +11469,6 @@ + TEXT_STRING_sys: + TEXT_STRING + { +- THD *thd= YYTHD; +- + if (thd->charset_is_system_charset) + $$= $1; + else +@@ -11532,8 +11483,6 @@ + TEXT_STRING_literal: + TEXT_STRING + { +- THD *thd= YYTHD; +- + if (thd->charset_is_collation_connection) + $$= $1; + else +@@ -11548,8 +11497,6 @@ + TEXT_STRING_filesystem: + TEXT_STRING + { +- THD *thd= YYTHD; +- + if (thd->charset_is_character_set_filesystem) + $$= $1; + else +@@ -11566,7 +11513,6 @@ + IDENT_sys { $$=$1; } + | keyword + { +- THD *thd= YYTHD; + $$.str= thd->strmake($1.str, $1.length); + if ($$.str == NULL) + MYSQL_YYABORT; +@@ -11578,7 +11524,6 @@ + IDENT_sys { $$=$1; } + | keyword_sp + { +- THD *thd= YYTHD; + $$.str= thd->strmake($1.str, $1.length); + if ($$.str == NULL) + MYSQL_YYABORT; +@@ -11595,7 +11540,6 @@ + user: + ident_or_text + { +- THD *thd= YYTHD; + if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) + MYSQL_YYABORT; + $$->user = $1; +@@ -11609,7 +11553,6 @@ + } + | ident_or_text '@' ident_or_text + { +- THD *thd= YYTHD; + if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) + MYSQL_YYABORT; + $$->user = $1; $$->host=$3; +@@ -11628,7 +11571,7 @@ + } + | CURRENT_USER optional_braces + { +- if (!($$=(LEX_USER*) YYTHD->alloc(sizeof(st_lex_user)))) ++ if (!($$=(LEX_USER*) thd->alloc(sizeof(st_lex_user)))) + MYSQL_YYABORT; + /* + empty LEX_USER means current_user and +@@ -11991,7 +11934,6 @@ + + option_type_value: + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= YYLIP; + +@@ -12022,7 +11964,6 @@ + } + ext_option_value + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= YYLIP; + +@@ -12105,7 +12046,6 @@ + sys_option_value: + option_type internal_variable_name equal set_expr_or_default + { +- THD *thd= YYTHD; + LEX *lex= Lex; + LEX_STRING *name= &$2.base_name; + +@@ -12117,7 +12057,7 @@ + my_parse_error(ER(ER_SYNTAX_ERROR)); + MYSQL_YYABORT; + } +- if (set_trigger_new_row(YYTHD, name, $4)) ++ if (set_trigger_new_row(thd, name, $4)) + MYSQL_YYABORT; + } + else if ($2.var) +@@ -12147,7 +12087,6 @@ + } + | option_type TRANSACTION_SYM ISOLATION LEVEL_SYM isolation_types + { +- THD *thd= YYTHD; + LEX *lex=Lex; + lex->option_type= $1; + Item *item= new (thd->mem_root) Item_int((int32) $5); +@@ -12167,7 +12106,7 @@ + '@' ident_or_text equal expr + { + Item_func_set_user_var *item; +- item= new (YYTHD->mem_root) Item_func_set_user_var($2, $4); ++ item= new (thd->mem_root) Item_func_set_user_var($2, $4); + if (item == NULL) + MYSQL_YYABORT; + set_var_user *var= new set_var_user(item); +@@ -12177,7 +12116,6 @@ + } + | '@' '@' opt_var_ident_type internal_variable_name equal set_expr_or_default + { +- THD *thd= YYTHD; + struct sys_var_with_base tmp= $4; + /* Lookup if necessary: must be a system variable. */ + if (tmp.var == NULL) +@@ -12190,7 +12128,6 @@ + } + | charset old_or_new_charset_name_or_default + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + CHARSET_INFO *cs2; + cs2= $2 ? $2: global_system_variables.character_set_client; +@@ -12238,7 +12175,6 @@ + } + | PASSWORD equal text_or_password + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + LEX_USER *user; + sp_pcontext *spc= lex->spcont; +@@ -12278,7 +12214,6 @@ + internal_variable_name: + ident + { +- THD *thd= YYTHD; + sp_pcontext *spc= thd->lex->spcont; + sp_variable_t *spv; + +@@ -12337,7 +12272,7 @@ + } + else + { +- sys_var *tmp=find_sys_var(YYTHD, $3.str, $3.length); ++ sys_var *tmp=find_sys_var(thd, $3.str, $3.length); + if (!tmp) + MYSQL_YYABORT; + if (!tmp->is_struct()) +@@ -12348,7 +12283,7 @@ + } + | DEFAULT '.' ident + { +- sys_var *tmp=find_sys_var(YYTHD, $3.str, $3.length); ++ sys_var *tmp=find_sys_var(thd, $3.str, $3.length); + if (!tmp) + MYSQL_YYABORT; + if (!tmp->is_struct()) +@@ -12370,16 +12305,16 @@ + TEXT_STRING { $$=$1.str;} + | PASSWORD '(' TEXT_STRING ')' + { +- $$= $3.length ? YYTHD->variables.old_passwords ? +- Item_func_old_password::alloc(YYTHD, $3.str, $3.length) : +- Item_func_password::alloc(YYTHD, $3.str, $3.length) : ++ $$= $3.length ? thd->variables.old_passwords ? ++ Item_func_old_password::alloc(thd, $3.str, $3.length) : ++ Item_func_password::alloc(thd, $3.str, $3.length) : + $3.str; + if ($$ == NULL) + MYSQL_YYABORT; + } + | OLD_PASSWORD '(' TEXT_STRING ')' + { +- $$= $3.length ? Item_func_old_password::alloc(YYTHD, $3.str, ++ $$= $3.length ? Item_func_old_password::alloc(thd, $3.str, + $3.length) : + $3.str; + if ($$ == NULL) +@@ -12393,19 +12328,19 @@ + | DEFAULT { $$=0; } + | ON + { +- $$=new (YYTHD->mem_root) Item_string("ON", 2, system_charset_info); ++ $$=new (thd->mem_root) Item_string("ON", 2, system_charset_info); + if ($$ == NULL) + MYSQL_YYABORT; + } + | ALL + { +- $$=new (YYTHD->mem_root) Item_string("ALL", 3, system_charset_info); ++ $$=new (thd->mem_root) Item_string("ALL", 3, system_charset_info); + if ($$ == NULL) + MYSQL_YYABORT; + } + | BINARY + { +- $$=new (YYTHD->mem_root) Item_string("binary", 6, system_charset_info); ++ $$=new (thd->mem_root) Item_string("binary", 6, system_charset_info); + if ($$ == NULL) + MYSQL_YYABORT; + } +@@ -12443,7 +12378,7 @@ + table_ident opt_table_alias lock_option + { + thr_lock_type lock_type= (thr_lock_type) $3; +- if (!Select->add_table_to_list(YYTHD, $1, $2, 0, lock_type)) ++ if (!Select->add_table_to_list(thd, $1, $2, 0, lock_type)) + MYSQL_YYABORT; + /* If table is to be write locked, protect from a impending GRL. */ + if (lock_type >= TL_WRITE_ALLOW_WRITE) +@@ -12514,7 +12449,7 @@ + lex->expr_allows_subselect= FALSE; + lex->sql_command = SQLCOM_HA_READ; + lex->ha_rkey_mode= HA_READ_KEY_EXACT; /* Avoid purify warnings */ +- Item *one= new (YYTHD->mem_root) Item_int((int32) 1); ++ Item *one= new (thd->mem_root) Item_int((int32) 1); + if (one == NULL) + MYSQL_YYABORT; + lex->current_select->select_limit= one; +@@ -12836,10 +12771,10 @@ + $$=$1; $1->password=$4; + if ($4.length) + { +- if (YYTHD->variables.old_passwords) ++ if (thd->variables.old_passwords) + { + char *buff= +- (char *) YYTHD->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH_323+1); ++ (char *) thd->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH_323+1); + if (buff == NULL) + MYSQL_YYABORT; + my_make_scrambled_password_323(buff, $4.str, $4.length); +@@ -12849,7 +12784,7 @@ + else + { + char *buff= +- (char *) YYTHD->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH+1); ++ (char *) thd->alloc(SCRAMBLED_PASSWORD_CHAR_LENGTH+1); + if (buff == NULL) + MYSQL_YYABORT; + my_make_scrambled_password(buff, $4.str, $4.length); +@@ -12881,7 +12816,7 @@ + column_list_id: + ident + { +- String *new_str = new (YYTHD->mem_root) String((const char*) $1.str,$1.length,system_charset_info); ++ String *new_str = new (thd->mem_root) String((const char*) $1.str,$1.length,system_charset_info); + if (new_str == NULL) + MYSQL_YYABORT; + List_iterator iter(Lex->columns); +@@ -12981,14 +12916,14 @@ + + opt_chain: + /* empty */ +- { $$= (YYTHD->variables.completion_type == 1); } ++ { $$= (thd->variables.completion_type == 1); } + | AND_SYM NO_SYM CHAIN_SYM { $$=0; } + | AND_SYM CHAIN_SYM { $$=1; } + ; + + opt_release: + /* empty */ +- { $$= (YYTHD->variables.completion_type == 2); } ++ { $$= (thd->variables.completion_type == 2); } + | RELEASE_SYM { $$=1; } + | NO_SYM RELEASE_SYM { $$=0; } + ; +@@ -13102,7 +13037,6 @@ + + union_order_or_limit: + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + DBUG_ASSERT(lex->current_select->linkage != GLOBAL_OPTIONS_TYPE); + SELECT_LEX *sel= lex->current_select; +@@ -13118,7 +13052,6 @@ + } + order_or_limit + { +- THD *thd= YYTHD; + thd->lex->current_select->no_table_names_allowed= 0; + thd->where= ""; + } +@@ -13255,14 +13188,14 @@ + from older master servers (i.e. to create non-suid trigger in this + case). + */ +- YYTHD->lex->definer= 0; ++ thd->lex->definer= 0; + } + ; + + definer: + DEFINER_SYM EQ user + { +- YYTHD->lex->definer= get_current_user(YYTHD, $3); ++ thd->lex->definer= get_current_user(thd, $3); + } + ; + +@@ -13307,7 +13240,6 @@ + view_tail: + view_suid VIEW_SYM table_ident + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + lex->sql_command= SQLCOM_CREATE_VIEW; + /* first table in list is target VIEW name */ +@@ -13347,7 +13279,6 @@ + } + view_select_aux view_check_option + { +- THD *thd= YYTHD; + LEX *lex= Lex; + uint len= YYLIP->get_cpp_ptr() - lex->create_view_select.str; + void *create_view_select= thd->memdup(lex->create_view_select.str, len); +@@ -13403,7 +13334,6 @@ + EACH_SYM + ROW_SYM + { /* $15 */ +- THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= YYLIP; + sp_head *sp; +@@ -13437,8 +13367,8 @@ + sp_head *sp= lex->sphead; + + lex->sql_command= SQLCOM_CREATE_TRIGGER; +- sp->set_stmt_end(YYTHD); +- sp->restore_thd_mem_root(YYTHD); ++ sp->set_stmt_end(thd); ++ sp->restore_thd_mem_root(thd); + + if (sp->is_not_allowed_in_function("trigger")) + MYSQL_YYABORT; +@@ -13448,7 +13378,7 @@ + sp_proc_stmt alternatives are not saving/restoring LEX, so + lex->query_tables can be wiped out. + */ +- if (!lex->select_lex.add_table_to_list(YYTHD, $9, ++ if (!lex->select_lex.add_table_to_list(thd, $9, + (LEX_STRING*) 0, + TL_OPTION_UPDATING, + TL_IGNORE)) +@@ -13466,7 +13396,6 @@ + AGGREGATE_SYM remember_name FUNCTION_SYM ident + RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + if (is_native_function(thd, & $4)) + { +@@ -13484,7 +13413,6 @@ + | remember_name FUNCTION_SYM ident + RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + if (is_native_function(thd, & $3)) + { +@@ -13507,7 +13435,6 @@ + sp_name /* $3 */ + '(' /* $4 */ + { /* $5 */ +- THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= YYLIP; + sp_head *sp; +@@ -13565,7 +13492,7 @@ + MYSQL_YYABORT; + } + +- if (sp->fill_field_definition(YYTHD, lex, ++ if (sp->fill_field_definition(thd, lex, + (enum enum_field_types) $11, + &sp->m_return_field_def)) + MYSQL_YYABORT; +@@ -13574,7 +13501,6 @@ + } + sp_c_chistics /* $13 */ + { /* $14 */ +- THD *thd= YYTHD; + LEX *lex= thd->lex; + Lex_input_stream *lip= YYLIP; + +@@ -13583,7 +13509,6 @@ + } + sp_proc_stmt /* $15 */ + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + sp_head *sp= lex->sphead; + +@@ -13654,10 +13579,10 @@ + sp= new sp_head(); + if (sp == NULL) + MYSQL_YYABORT; +- sp->reset_thd_mem_root(YYTHD); ++ sp->reset_thd_mem_root(thd); + sp->init(lex); + sp->m_type= TYPE_ENUM_PROCEDURE; +- sp->init_sp_name(YYTHD, $3); ++ sp->init_sp_name(thd, $3); + + lex->sphead= sp; + } +@@ -13672,7 +13597,6 @@ + sp_pdparam_list + ')' + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + + lex->sphead->m_param_end= YYLIP->get_cpp_tok_start(); +@@ -13680,7 +13604,6 @@ + } + sp_c_chistics + { +- THD *thd= YYTHD; + LEX *lex= thd->lex; + + lex->sphead->m_chistics= &lex->sp_chistics; +@@ -13691,9 +13614,9 @@ + LEX *lex= Lex; + sp_head *sp= lex->sphead; + +- sp->set_stmt_end(YYTHD); ++ sp->set_stmt_end(thd); + lex->sql_command= SQLCOM_CREATE_PROCEDURE; +- sp->restore_thd_mem_root(YYTHD); ++ sp->restore_thd_mem_root(thd); + } + ; + +@@ -13730,21 +13653,21 @@ + text_string + { + MYSQL_YYABORT_UNLESS($1->length() <= MAXGTRIDSIZE); +- if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID)))) ++ if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) + MYSQL_YYABORT; + Lex->xid->set(1L, $1->ptr(), $1->length(), 0, 0); + } + | text_string ',' text_string + { + MYSQL_YYABORT_UNLESS($1->length() <= MAXGTRIDSIZE && $3->length() <= MAXBQUALSIZE); +- if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID)))) ++ if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) + MYSQL_YYABORT; + Lex->xid->set(1L, $1->ptr(), $1->length(), $3->ptr(), $3->length()); + } + | text_string ',' text_string ',' ulong_num + { + MYSQL_YYABORT_UNLESS($1->length() <= MAXGTRIDSIZE && $3->length() <= MAXBQUALSIZE); +- if (!(Lex->xid=(XID *)YYTHD->alloc(sizeof(XID)))) ++ if (!(Lex->xid=(XID *)thd->alloc(sizeof(XID)))) + MYSQL_YYABORT; + Lex->xid->set($5, $1->ptr(), $1->length(), $3->ptr(), $3->length()); + } diff --git a/package/mysql/0006-no-force-static-build.patch b/package/mysql/0006-no-force-static-build.patch new file mode 100644 index 0000000000..8172a9848e --- /dev/null +++ b/package/mysql/0006-no-force-static-build.patch @@ -0,0 +1,18 @@ +configure: do not force a static link for non-installed programs + +Otherwise, it tries to link against a static libz, which may not exist +in a shared-only system. + +Signed-off-by: "Yann E. MORIN" + +diff -durN mysql-5.1.73.orig/configure.in mysql-5.1.73/configure.in +--- mysql-5.1.73.orig/configure.in 2014-12-22 00:04:46.550508208 +0100 ++++ mysql-5.1.73/configure.in 2014-12-22 00:05:56.415307480 +0100 +@@ -562,7 +562,6 @@ + AC_MSG_ERROR([MySQL requires an ANSI C compiler (and a C++ compiler). Try gcc. See the Installation chapter in the Reference Manual.]) + fi + +-NOINST_LDFLAGS="-static" + + static_nss="" + STATIC_NSS_FLAGS="" diff --git a/package/mysql/0007-dont-install-in-mysql-directory.patch b/package/mysql/0007-dont-install-in-mysql-directory.patch new file mode 100644 index 0000000000..971b9ceeb5 --- /dev/null +++ b/package/mysql/0007-dont-install-in-mysql-directory.patch @@ -0,0 +1,182 @@ +Don't install in mysql directory + +Installing libraries in a subdirectory of /usr/lib leads to no end of +trouble. It requires either setting a RUN_PATH in the ELF files linked +with it or adding the path to ld.so.conf and calling ldconfig on the +target. + +So to simplify things, put everything in /usr/lib instead of +/usr/lib/mysql + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) + +diff -Nrup mysql-5.1.73.orig/dbug/Makefile.am mysql-5.1.73/dbug/Makefile.am +--- mysql-5.1.73.orig/dbug/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/dbug/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -17,7 +17,7 @@ + + INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include + LDADD = libdbug.a ../mysys/libmysys.a ../strings/libmystrings.a +-pkglib_LIBRARIES = libdbug.a ++lib_LIBRARIES = libdbug.a + noinst_HEADERS = dbug_long.h + libdbug_a_SOURCES = dbug.c sanity.c + EXTRA_DIST = CMakeLists.txt example1.c example2.c example3.c \ +diff -Nrup mysql-5.1.73.orig/libmysql/Makefile.shared mysql-5.1.73/libmysql/Makefile.shared +--- mysql-5.1.73.orig/libmysql/Makefile.shared 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/libmysql/Makefile.shared 2015-12-14 00:34:58.567937603 +0100 +@@ -25,7 +25,7 @@ MYSQLBASEdir= $(prefix) + ## We'll use CLIENT_EXTRA_LDFLAGS for threaded and non-threaded + ## until someone complains that they need separate options. + LDADD = @CLIENT_EXTRA_LDFLAGS@ $(target) +-pkglib_LTLIBRARIES = $(target) ++lib_LTLIBRARIES = $(target) + + noinst_PROGRAMS = conf_to_src + +diff -Nrup mysql-5.1.73.orig/libmysqld/Makefile.am mysql-5.1.73/libmysqld/Makefile.am +--- mysql-5.1.73.orig/libmysqld/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/libmysqld/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -38,7 +38,7 @@ INCLUDES= -I$(top_builddir)/include -I$ + @condition_dependent_plugin_includes@ + + noinst_LIBRARIES = libmysqld_int.a +-pkglib_LIBRARIES = libmysqld.a ++lib_LIBRARIES = libmysqld.a + SUBDIRS = . examples + libmysqld_sources= libmysqld.c lib_sql.cc emb_qcache.cc + libmysqlsources = errmsg.c get_password.c libmysql.c client.c pack.c \ +diff -Nrup mysql-5.1.73.orig/mysys/Makefile.am mysql-5.1.73/mysys/Makefile.am +--- mysql-5.1.73.orig/mysys/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/mysys/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -18,7 +18,7 @@ MYSQLSHAREdir = $(pkgdatadir) + MYSQLBASEdir= $(prefix) + INCLUDES = @ZLIB_INCLUDES@ -I$(top_builddir)/include \ + -I$(top_srcdir)/include -I$(srcdir) +-pkglib_LIBRARIES = libmysys.a ++lib_LIBRARIES = libmysys.a + LDADD = libmysys.a $(top_builddir)/strings/libmystrings.a $(top_builddir)/dbug/libdbug.a + noinst_HEADERS = mysys_priv.h my_static.h my_handler_errors.h + libmysys_a_SOURCES = my_init.c my_getwd.c mf_getdate.c my_mmap.c \ +diff -Nrup mysql-5.1.73.orig/storage/csv/Makefile.am mysql-5.1.73/storage/csv/Makefile.am +--- mysql-5.1.73.orig/storage/csv/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/storage/csv/Makefile.am 2015-12-14 00:34:58.563937596 +0100 +@@ -30,7 +30,7 @@ DEFS = @DEFS@ + noinst_HEADERS = ha_tina.h transparent_file.h + + EXTRA_LTLIBRARIES = ha_csv.la +-pkglib_LTLIBRARIES = @plugin_csv_shared_target@ ++lib_LTLIBRARIES = @plugin_csv_shared_target@ + ha_csv_la_LDFLAGS = -module -rpath $(MYSQLLIBdir) + ha_csv_la_CXXFLAGS = $(AM_CXXFLAGS) -DMYSQL_PLUGIN + ha_csv_la_SOURCES = transparent_file.cc ha_tina.cc +diff -Nrup mysql-5.1.73.orig/storage/heap/Makefile.am mysql-5.1.73/storage/heap/Makefile.am +--- mysql-5.1.73.orig/storage/heap/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/storage/heap/Makefile.am 2015-12-14 00:34:58.563937596 +0100 +@@ -26,7 +26,7 @@ WRAPLIBS= + LDADD = + + DEFS = @DEFS@ +-pkglib_LIBRARIES = libheap.a ++lib_LIBRARIES = libheap.a + noinst_PROGRAMS = hp_test1 hp_test2 + noinst_LIBRARIES = libheap.a + hp_test1_LDFLAGS = @NOINST_LDFLAGS@ +diff -Nrup mysql-5.1.73.orig/storage/myisam/Makefile.am mysql-5.1.73/storage/myisam/Makefile.am +--- mysql-5.1.73.orig/storage/myisam/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/storage/myisam/Makefile.am 2015-12-14 00:34:58.563937596 +0100 +@@ -30,7 +30,7 @@ DEFS = @DEFS@ + EXTRA_DIST = mi_test_all.sh mi_test_all.res ft_stem.c CMakeLists.txt plug.in + pkgdata_DATA = mi_test_all mi_test_all.res + +-pkglib_LIBRARIES = libmyisam.a ++lib_LIBRARIES = libmyisam.a + bin_PROGRAMS = myisamchk myisamlog myisampack myisam_ftdump + myisamchk_DEPENDENCIES= $(LIBRARIES) + myisamchk_LDADD= @CLIENT_EXTRA_LDFLAGS@ libmyisam.a \ +diff -Nrup mysql-5.1.73.orig/storage/myisammrg/Makefile.am mysql-5.1.73/storage/myisammrg/Makefile.am +--- mysql-5.1.73.orig/storage/myisammrg/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/storage/myisammrg/Makefile.am 2015-12-14 00:34:58.563937596 +0100 +@@ -26,7 +26,7 @@ WRAPLIBS= + LDADD = + + DEFS = @DEFS@ +-pkglib_LIBRARIES = libmyisammrg.a ++lib_LIBRARIES = libmyisammrg.a + noinst_HEADERS = myrg_def.h ha_myisammrg.h + noinst_LIBRARIES = libmyisammrg.a + libmyisammrg_a_SOURCES = myrg_open.c myrg_extra.c myrg_info.c myrg_locking.c \ +diff -Nrup mysql-5.1.73.orig/strings/Makefile.am mysql-5.1.73/strings/Makefile.am +--- mysql-5.1.73.orig/strings/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/strings/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -16,7 +16,7 @@ + # This file is public domain and comes with NO WARRANTY of any kind + + INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include +-pkglib_LIBRARIES = libmystrings.a ++lib_LIBRARIES = libmystrings.a + + # Exact one of ASSEMBLER_X + if ASSEMBLER_x86 +@@ -69,15 +69,15 @@ conf_to_src_LDFLAGS= @NOINST_LDFLAGS@ + + FLAGS=$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) @NOINST_LDFLAGS@ + +-str_test: str_test.c $(pkglib_LIBRARIES) +- $(LINK) $(FLAGS) -DMAIN $(INCLUDES) $(srcdir)/str_test.c $(LDADD) $(pkglib_LIBRARIES) ++str_test: str_test.c $(lib_LIBRARIES) ++ $(LINK) $(FLAGS) -DMAIN $(INCLUDES) $(srcdir)/str_test.c $(LDADD) $(lib_LIBRARIES) + + uctypedump: uctypedump.c + $(LINK) $(INCLUDES) $(srcdir)/uctypedump.c + +-test_decimal$(EXEEXT): decimal.c $(pkglib_LIBRARIES) ++test_decimal$(EXEEXT): decimal.c $(lib_LIBRARIES) + $(CP) $(srcdir)/decimal.c ./test_decimal.c +- $(LINK) $(FLAGS) -DMAIN ./test_decimal.c $(LDADD) $(pkglib_LIBRARIES) ++ $(LINK) $(FLAGS) -DMAIN ./test_decimal.c $(LDADD) $(lib_LIBRARIES) + $(RM) -f ./test_decimal.c + + # Don't update the files from bitkeeper +diff -Nrup mysql-5.1.73.orig/tests/Makefile.am mysql-5.1.73/tests/Makefile.am +--- mysql-5.1.73.orig/tests/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/tests/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -51,11 +51,11 @@ mysql_client_test.o: mysql_client_fw.c + + insert_test_SOURCES= insert_test.c + select_test_SOURCES= select_test.c +-insert_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) +-select_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) ++insert_test_DEPENDENCIES= $(LIBRARIES) $(lib_LTLIBRARIES) ++select_test_DEPENDENCIES= $(LIBRARIES) $(lib_LTLIBRARIES) + + bug25714_SOURCES= bug25714.c +-bug25714_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) ++bug25714_DEPENDENCIES= $(LIBRARIES) $(lib_LTLIBRARIES) + + # Fix for mit-threads + DEFS = -DMYSQL_CLIENT_NO_THREADS +diff -Nrup mysql-5.1.73.orig/vio/Makefile.am mysql-5.1.73/vio/Makefile.am +--- mysql-5.1.73.orig/vio/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/vio/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -16,7 +16,7 @@ + INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \ + $(openssl_includes) + LDADD = @CLIENT_EXTRA_LDFLAGS@ $(openssl_libs) $(yassl_libs) +-pkglib_LIBRARIES = libvio.a ++lib_LIBRARIES = libvio.a + + noinst_HEADERS = vio_priv.h + +diff -Nrup mysql-5.1.73.orig/zlib/Makefile.am mysql-5.1.73/zlib/Makefile.am +--- mysql-5.1.73.orig/zlib/Makefile.am 2013-11-04 19:52:27.000000000 +0100 ++++ mysql-5.1.73/zlib/Makefile.am 2015-12-14 00:34:58.567937603 +0100 +@@ -19,7 +19,7 @@ INCLUDES= -I$(top_builddir)/include -I$ + + LIBS= $(NON_THREADED_LIBS) + +-pkglib_LTLIBRARIES = libz.la ++lib_LTLIBRARIES = libz.la + noinst_LTLIBRARIES = libzlt.la + + libz_la_LDFLAGS = -static diff --git a/package/mysql/Config.in b/package/mysql/Config.in new file mode 100644 index 0000000000..7133892bb7 --- /dev/null +++ b/package/mysql/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_MYSQL + bool "MySQL" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + help + The MySQL Open Source Database System + + http://www.mysql.com/ + +if BR2_PACKAGE_MYSQL + +config BR2_PACKAGE_MYSQL_SERVER + bool "MySQL server" + help + Install the MySQL server on the target. + +endif + +comment "MySQL needs a toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/mysql/S97mysqld b/package/mysql/S97mysqld new file mode 100644 index 0000000000..1d87e68d96 --- /dev/null +++ b/package/mysql/S97mysqld @@ -0,0 +1,34 @@ +#!/bin/sh + +case "$1" in + start) + if [ ! -d /var/mysql/mysql ] ; then + echo "Creating MySQL system tables..." + mysql_install_db --user=mysql --ldata=/var/mysql + fi + + # mysqld runs as user mysql, but /run is only writable by root + # so create a subdirectory for mysql. + install -d -o mysql -g root -m 0700 /run/mysql + + # We don't use start-stop-daemon because mysqld has + # its own wrapper script. + printf "Starting mysql..." + /usr/bin/mysqld_safe --pid-file=/run/mysql/mysqld.pid & + echo "done." + ;; + stop) + printf "Stopping mysql..." + if test -f /run/mysql/mysqld.pid ; then + kill `cat /run/mysql/mysqld.pid` + fi + echo "done." + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: /etc/init.d/mysqld {start|stop|restart}" + ;; +esac diff --git a/package/mysql/mysql.hash b/package/mysql/mysql.hash new file mode 100644 index 0000000000..84f3361502 --- /dev/null +++ b/package/mysql/mysql.hash @@ -0,0 +1,2 @@ +# From https://downloads.mariadb.com/archives/mysql-5.1/mysql-5.1.73.tar.gz.md5 +md5 887f869bcc757957067b9198f707f32f mysql-5.1.73.tar.gz diff --git a/package/mysql/mysql.mk b/package/mysql/mysql.mk new file mode 100644 index 0000000000..534bd97d25 --- /dev/null +++ b/package/mysql/mysql.mk @@ -0,0 +1,131 @@ +################################################################################ +# +# mysql +# +################################################################################ + +MYSQL_VERSION_MAJOR = 5.1 +MYSQL_VERSION = $(MYSQL_VERSION_MAJOR).73 +MYSQL_SOURCE = mysql-$(MYSQL_VERSION).tar.gz +MYSQL_SITE = http://downloads.skysql.com/archives/mysql-$(MYSQL_VERSION_MAJOR) +MYSQL_INSTALL_STAGING = YES +MYSQL_DEPENDENCIES = readline ncurses +MYSQL_AUTORECONF = YES +MYSQL_LICENSE = GPLv2 +MYSQL_LICENSE_FILES = README COPYING + +MYSQL_CONF_ENV = \ + ac_cv_sys_restartable_syscalls=yes \ + ac_cv_path_PS=/bin/ps \ + ac_cv_FIND_PROC="/bin/ps p \$\$PID | grep -v grep | grep mysqld > /dev/null" \ + ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_GCC=yes \ + ac_cv_have_decl_HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS=no \ + ac_cv_have_decl_HAVE_IB_GCC_ATOMIC_BUILTINS=yes \ + mysql_cv_new_rl_interface=yes + +MYSQL_CONF_OPTS = \ + --without-ndb-binlog \ + --without-docs \ + --without-man \ + --without-libedit \ + --without-readline \ + --with-low-memory \ + --enable-thread-safe-client \ + --disable-mysql-maintainer-mode + +# host-mysql only installs what is needed to build mysql, i.e. the +# gen_lex_hash tool, and it only builds the parts that are needed to +# create this tool +HOST_MYSQL_DEPENDENCIES = host-zlib host-ncurses + +HOST_MYSQL_CONF_OPTS = \ + --with-embedded-server \ + --disable-mysql-maintainer-mode + +define HOST_MYSQL_BUILD_CMDS + $(MAKE) -C $(@D)/include my_config.h + $(MAKE) -C $(@D)/mysys libmysys.a + $(MAKE) -C $(@D)/strings libmystrings.a + $(MAKE) -C $(@D)/vio libvio.a + $(MAKE) -C $(@D)/dbug libdbug.a + $(MAKE) -C $(@D)/regex libregex.a + $(MAKE) -C $(@D)/sql gen_lex_hash +endef + +define HOST_MYSQL_INSTALL_CMDS + $(INSTALL) -m 0755 $(@D)/sql/gen_lex_hash $(HOST_DIR)/usr/bin/ +endef + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +MYSQL_DEPENDENCIES += openssl +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +MYSQL_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_MYSQL_SERVER),y) +MYSQL_DEPENDENCIES += host-mysql host-bison + +MYSQL_CONF_OPTS += \ + --localstatedir=/var/mysql \ + --with-atomic-ops=up \ + --with-embedded-server \ + --without-query-cache \ + --without-plugin-partition \ + --without-plugin-daemon_example \ + --without-plugin-ftexample \ + --without-plugin-archive \ + --without-plugin-blackhole \ + --without-plugin-example \ + --without-plugin-federated \ + --without-plugin-ibmdb2i \ + --without-plugin-innobase \ + --without-plugin-innodb_plugin \ + --without-plugin-ndbcluster + +# Debugging is only available for the server, so no need for +# this if-block outside of the server if-block +ifeq ($(BR2_ENABLE_DEBUG),y) +MYSQL_CONF_OPTS += --with-debug=full +else +MYSQL_CONF_OPTS += --without-debug +endif + +define MYSQL_USERS + mysql -1 nogroup -1 * /var/mysql - - MySQL daemon +endef + +define MYSQL_ADD_FOLDER + $(INSTALL) -d $(TARGET_DIR)/var/mysql +endef + +MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_ADD_FOLDER + +define MYSQL_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/mysql/S97mysqld \ + $(TARGET_DIR)/etc/init.d/S97mysqld +endef + +define MYSQL_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/mysql/mysqld.service \ + $(TARGET_DIR)/usr/lib/systemd/system/mysqld.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/mysqld.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/mysqld.service +endef + +else +MYSQL_CONF_OPTS += \ + --without-server +endif + + +define MYSQL_REMOVE_TEST_PROGS + rm -rf $(TARGET_DIR)/usr/mysql-test $(TARGET_DIR)/usr/sql-bench +endef + +MYSQL_POST_INSTALL_TARGET_HOOKS += MYSQL_REMOVE_TEST_PROGS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/mysql/mysqld.service b/package/mysql/mysqld.service new file mode 100644 index 0000000000..2ded9c2728 --- /dev/null +++ b/package/mysql/mysqld.service @@ -0,0 +1,10 @@ +[Unit] +Description=MySQL database server + +[Service] +ExecStartPre=/bin/sh -c 'test -d /var/mysql/mysql || mysql_install_db --user=mysql --ldata=/var/mysql' +ExecStart=/usr/bin/mysqld_safe +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/nano/Config.in b/package/nano/Config.in new file mode 100644 index 0000000000..4b340ff5b8 --- /dev/null +++ b/package/nano/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_NANO + bool "nano" + depends on BR2_USE_WCHAR + # full version uses fork() + select BR2_PACKAGE_NANO_TINY if !BR2_USE_MMU + select BR2_PACKAGE_NCURSES + help + A nice ncurses-based editor. Started out as a clone of pico. + Great editor for new users. + + http://www.nano-editor.org/ + +if BR2_PACKAGE_NANO + +config BR2_PACKAGE_NANO_TINY + bool "optimize for size" + default y + help + Disable all features for the sake of size. + +endif + +comment "nano needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/nano/nano.hash b/package/nano/nano.hash new file mode 100644 index 0000000000..eb6a9fc646 --- /dev/null +++ b/package/nano/nano.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 b2b060129b9feff2d4870d803a441178c96531de9aed144ec0b83bd63ccb12ee nano-2.5.3.tar.gz diff --git a/package/nano/nano.mk b/package/nano/nano.mk new file mode 100644 index 0000000000..be6ea24da5 --- /dev/null +++ b/package/nano/nano.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# nano +# +################################################################################ + +NANO_VERSION = 2.5.3 +NANO_SITE = $(BR2_GNU_MIRROR)/nano +NANO_LICENSE = GPLv3+ +NANO_LICENSE_FILES = COPYING +NANO_CONF_OPTS = \ + --without-slang \ + --with-wordbounds +NANO_DEPENDENCIES = ncurses + +ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y) +NANO_CONF_ENV += ac_cv_prog_NCURSESW_CONFIG=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS) +else +NANO_CONF_ENV += ac_cv_prog_NCURSESW_CONFIG=false +NANO_MAKE_ENV += CURSES_LIB="-lncurses" +endif + +ifeq ($(BR2_PACKAGE_FILE),y) +NANO_DEPENDENCIES += file +else +NANO_CONF_ENV += ac_cv_lib_magic_magic_open=no +endif + +ifeq ($(BR2_PACKAGE_NANO_TINY),y) +NANO_CONF_OPTS += --enable-tiny +define NANO_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/src/nano $(TARGET_DIR)/usr/bin/nano +endef +endif + +$(eval $(autotools-package)) diff --git a/package/nanocom/Config.in b/package/nanocom/Config.in new file mode 100644 index 0000000000..51d628aec5 --- /dev/null +++ b/package/nanocom/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_NANOCOM + bool "nanocom" + help + Nanocom is based upon microcom (http://microcom.port5.com/) but + removes the scripting and logging features while introducing support + for setting local/remote echo, parity and stop bits. It also follows + a more standard command line style using the getopt function. + Internally much of the code has been rewritten and reformatted, the + menu system in particular is almost entirely different. + + http://nanocom.sourceforge.net/ diff --git a/package/nanocom/nanocom.hash b/package/nanocom/nanocom.hash new file mode 100644 index 0000000000..7e7016c25b --- /dev/null +++ b/package/nanocom/nanocom.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 5cb26e3e232cfc4a7cb16da432db532b775c5ebdb887ac9d39df5632f2c9a5e5 nanocom.tar.gz diff --git a/package/nanocom/nanocom.mk b/package/nanocom/nanocom.mk new file mode 100644 index 0000000000..293dd091fc --- /dev/null +++ b/package/nanocom/nanocom.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# nanocom +# +################################################################################ + +NANOCOM_VERSION = 1.0 +NANOCOM_SOURCE = nanocom.tar.gz +NANOCOM_SITE = http://downloads.sourceforge.net/project/nanocom/nanocom/v$(NANOCOM_VERSION) +NANOCOM_STRIP_COMPONENTS = 0 +NANOCOM_LICENSE = GPLv2+ +NANOCOM_LICENSE_FILES = COPYING + +define NANOCOM_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" -C $(@D) +endef + +define NANOCOM_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/nanocom $(TARGET_DIR)/usr/bin/nanocom +endef + +$(eval $(generic-package)) diff --git a/package/nasm/nasm.hash b/package/nasm/nasm.hash new file mode 100644 index 0000000000..4ec185336e --- /dev/null +++ b/package/nasm/nasm.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9dbba1ce620512e435ba57e69e811fe8e07d04359e47e0a0b5e94a5dd8367489 nasm-2.12.01.tar.xz diff --git a/package/nasm/nasm.mk b/package/nasm/nasm.mk new file mode 100644 index 0000000000..e9343beec4 --- /dev/null +++ b/package/nasm/nasm.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# nasm +# +################################################################################ + +NASM_VERSION = 2.12.01 +NASM_SOURCE = nasm-$(NASM_VERSION).tar.xz +NASM_SITE = http://www.nasm.us/pub/nasm/releasebuilds/$(NASM_VERSION) +NASM_LICENSE = BSD-2c +NASM_LICENSE_FILES = LICENSE + +$(eval $(host-autotools-package)) diff --git a/package/nbd/0001-avoid-name-clashing.patch b/package/nbd/0001-avoid-name-clashing.patch new file mode 100644 index 0000000000..b3ea9c99c5 --- /dev/null +++ b/package/nbd/0001-avoid-name-clashing.patch @@ -0,0 +1,28 @@ +rename err() function to avoid clashing with err() form C library + +err() is a function available in the C library, so when static linking, +there is a clash at link timebecause the function is provided both by +nbd and the C library: + http://autobuild.buildroot.org/results/aa8/aa8a1ac35a93e1c8b9fddbc2b5d66ecaa921f31e/build-end.log + +Fix that by renaming err() to nbd_err() and providing a small maco +wrapper to avoid touching the many call sites. + +Signed-off-by: "Yann E. MORIN" + +--- +Upstream status: hack, not submitted. + +diff -durN nbd-3.11.orig/cliserv.h nbd-3.11/cliserv.h +--- nbd-3.11.orig/cliserv.h 2015-05-25 12:27:56.000000000 +0200 ++++ nbd-3.11/cliserv.h 2015-08-13 19:28:21.609467505 +0200 +@@ -75,7 +75,8 @@ + void setmysockopt(int sock); + void err_nonfatal(const char *s); + +-void err(const char *s) G_GNUC_NORETURN; ++void nbd_err(const char *s) G_GNUC_NORETURN; ++#define err(S) nbd_err(S) + + void logging(const char* name); + diff --git a/package/nbd/Config.in b/package/nbd/Config.in new file mode 100644 index 0000000000..a5ded2984b --- /dev/null +++ b/package/nbd/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_NBD + bool "nbd" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + help + NBD is a set of utilities to configure network block devices, + allowing access to remote block devices over TCP/IP network. + + http://nbd.sf.net/ + +if BR2_PACKAGE_NBD + +config BR2_NBD_CLIENT + bool "nbd client" + default y + help + the client part of NBD. + +config BR2_NBD_SERVER + bool "nbd server" + help + the server part of NBD. + +endif + +comment "nbd needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/nbd/nbd.hash b/package/nbd/nbd.hash new file mode 100644 index 0000000000..c90682f481 --- /dev/null +++ b/package/nbd/nbd.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/nbd/files/nbd/3.13/ +md5 784be37497cc2f9a53c67c8c77d1676d nbd-3.13.tar.xz +sha1 e43674a2d2b42d20719cba3149748e8f5683e554 nbd-3.13.tar.xz diff --git a/package/nbd/nbd.mk b/package/nbd/nbd.mk new file mode 100644 index 0000000000..d91c2d717e --- /dev/null +++ b/package/nbd/nbd.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# nbd +# +################################################################################ + +NBD_VERSION = 3.13 +NBD_SOURCE = nbd-$(NBD_VERSION).tar.xz +NBD_SITE = http://downloads.sourceforge.net/project/nbd/nbd/$(NBD_VERSION) +NBD_CONF_OPTS = --enable-lfs +NBD_DEPENDENCIES = libglib2 +NBD_LICENSE = GPLv2 +NBD_LICENSE_FILES = COPYING + +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +# We have linux/falloc.h +# but uClibc lacks fallocate(2) which is a glibc-ism +NBD_CONF_ENV = ac_cv_header_linux_falloc_h=no +endif + +ifneq ($(BR2_NBD_CLIENT),y) +NBD_TOREMOVE += nbd-client +endif +ifneq ($(BR2_NBD_SERVER),y) +NBD_TOREMOVE += nbd-server +endif + +define NBD_CLEANUP_AFTER_INSTALL + rm -f $(addprefix $(TARGET_DIR)/usr/sbin/, $(NBD_TOREMOVE)) +endef + +NBD_POST_INSTALL_TARGET_HOOKS += NBD_CLEANUP_AFTER_INSTALL + +$(eval $(autotools-package)) diff --git a/package/ncdu/Config.in b/package/ncdu/Config.in new file mode 100644 index 0000000000..dac744410b --- /dev/null +++ b/package/ncdu/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_NCDU + bool "ncdu" + select BR2_PACKAGE_NCURSES + help + ncdu is a disk usage analyzer with an ncurses interface + + http://dev.yorhel.nl/ncdu diff --git a/package/ncdu/ncdu.hash b/package/ncdu/ncdu.hash new file mode 100644 index 0000000000..7985c995a1 --- /dev/null +++ b/package/ncdu/ncdu.hash @@ -0,0 +1,3 @@ +# From http://dev.yorhel.nl/download/ncdu-1.9.tar.gz.{md5,sha1} +md5 93258079db897d28bb8890e2db89b1fb ncdu-1.9.tar.gz +sha1 27cb5464b192db8ffdf0a894fe51d29985348eb0 ncdu-1.9.tar.gz diff --git a/package/ncdu/ncdu.mk b/package/ncdu/ncdu.mk new file mode 100644 index 0000000000..03519707e2 --- /dev/null +++ b/package/ncdu/ncdu.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# ncdu +# +################################################################################ + +NCDU_VERSION = 1.9 +NCDU_SITE = http://dev.yorhel.nl/download + +NCDU_DEPENDENCIES = ncurses + +NCDU_LICENSE = MIT +NCDU_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/ncftp/Config.in b/package/ncftp/Config.in new file mode 100644 index 0000000000..57586e7ba2 --- /dev/null +++ b/package/ncftp/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_NCFTP + bool "ncftp" + # fork() + depends on BR2_USE_MMU + help + NcFTP Client (also known as just NcFTP) is a set of FREE application + programs implementing the File Transfer Protocol (FTP). + + http://www.ncftp.com/ncftp/ + +if BR2_PACKAGE_NCFTP + +menu "ncFTP tools selection" + +config BR2_PACKAGE_NCFTP_GET + bool "NcFTPGet - command-line utility program" + default y + +config BR2_PACKAGE_NCFTP_PUT + bool "NcFTPPut - command-line utility program" + default y + +config BR2_PACKAGE_NCFTP_LS + bool "NcFTPLs - command-line utility program" + default y + +config BR2_PACKAGE_NCFTP_BATCH + bool "NcFTPBatch & NcFTPSpooler - background FTP program for individual users" + default y + +config BR2_PACKAGE_NCFTP_BOOKMARKS + bool "NcFTPBookmarks - ncurses based Bookmark Editor" + select BR2_PACKAGE_NCURSES + +endmenu + +endif diff --git a/package/ncftp/ncftp.hash b/package/ncftp/ncftp.hash new file mode 100644 index 0000000000..11695894f2 --- /dev/null +++ b/package/ncftp/ncftp.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 b4ebe2415761a5137cd1d313c8fc1352f26d8963cc9e9e354e29720aa2089d42 ncftp-3.2.5-src.tar.bz2 diff --git a/package/ncftp/ncftp.mk b/package/ncftp/ncftp.mk new file mode 100644 index 0000000000..28b03b8800 --- /dev/null +++ b/package/ncftp/ncftp.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# ncftp +# +################################################################################ + +NCFTP_VERSION = 3.2.5 +NCFTP_SOURCE = ncftp-$(NCFTP_VERSION)-src.tar.bz2 +NCFTP_SITE = ftp://ftp.ncftp.com/ncftp +NCFTP_TARGET_BINS = ncftp +NCFTP_LICENSE = Clarified Artistic License +NCFTP_LICENSE_FILES = doc/LICENSE.txt + +NCFTP_DEPENDENCIES = host-autoconf + +# The bundled configure script is generated by autoconf 2.13 and doesn't +# detect cross-compilation correctly. Therefore, we have to regenerate it. +# We need to pass -I because of the non-standard m4 directory name, and +# none of the other autotools are used, so the below is the easiest. +define NCFTP_RUN_AUTOCONF + (cd $(@D); $(HOST_DIR)/usr/bin/autoconf -I$(@D)/autoconf_local/) +endef +NCFTP_PRE_CONFIGURE_HOOKS += NCFTP_RUN_AUTOCONF + +ifeq ($(BR2_PACKAGE_NCFTP_GET),y) +NCFTP_TARGET_BINS += ncftpget +endif + +ifeq ($(BR2_PACKAGE_NCFTP_PUT),y) +NCFTP_TARGET_BINS += ncftpput +endif + +ifeq ($(BR2_PACKAGE_NCFTP_LS),y) +NCFTP_TARGET_BINS += ncftpls +endif + +ifeq ($(BR2_PACKAGE_NCFTP_BATCH),y) +NCFTP_TARGET_BINS += ncftpbatch +NCFTP_INSTALL_NCFTP_BATCH = \ + ln -sf /usr/bin/ncftpbatch $(TARGET_DIR)/usr/bin/ncftpspooler +endif + +ifeq ($(BR2_PACKAGE_NCFTP_BOOKMARKS),y) +NCFTP_TARGET_BINS += ncftpbookmarks +NCFTP_DEPENDENCIES += ncurses +endif + +define NCFTP_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(addprefix $(NCFTP_DIR)/bin/, $(NCFTP_TARGET_BINS)) $(TARGET_DIR)/usr/bin + $(NCFTP_INSTALL_NCFTP_BATCH) +endef + +$(eval $(autotools-package)) diff --git a/package/ncmpc/Config.in b/package/ncmpc/Config.in new file mode 100644 index 0000000000..324d8f7c2a --- /dev/null +++ b/package/ncmpc/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_NCMPC + bool "ncmpc" + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR # libglib2 -> gettext + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBMPDCLIENT + select BR2_PACKAGE_NCURSES + help + ncmpc is a fully featured MPD client, which runs in a terminal + (using ncurses). Its goal is to provide a keyboard oriented + and consistent interface to MPD, without wasting resources. + + http://www.musicpd.org/clients/ncmpc/ + +comment "ncmpc needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ncmpc/ncmpc.hash b/package/ncmpc/ncmpc.hash new file mode 100644 index 0000000000..1acc64dc10 --- /dev/null +++ b/package/ncmpc/ncmpc.hash @@ -0,0 +1,2 @@ +# Calculated locally +sha256 0e6f76b2b11449cfa479d2830ac681f4e3bff54a95a9134b069dd5a173b4c3e9 ncmpc-0.24.tar.xz diff --git a/package/ncmpc/ncmpc.mk b/package/ncmpc/ncmpc.mk new file mode 100644 index 0000000000..050b6b8343 --- /dev/null +++ b/package/ncmpc/ncmpc.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# ncmpc +# +################################################################################ + +NCMPC_VERSION_MAJOR = 0 +NCMPC_VERSION = $(NCMPC_VERSION_MAJOR).24 +NCMPC_SOURCE = ncmpc-$(NCMPC_VERSION).tar.xz +NCMPC_SITE = http://www.musicpd.org/download/ncmpc/$(NCMPC_VERSION_MAJOR) +NCMPC_DEPENDENCIES = host-pkgconf libglib2 libmpdclient ncurses +NCMPC_LICENSE = GPLv2+ +NCMPC_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/ncurses/0001-fixup-pkg-config-handling.patch b/package/ncurses/0001-fixup-pkg-config-handling.patch new file mode 100644 index 0000000000..e1cfc75164 --- /dev/null +++ b/package/ncurses/0001-fixup-pkg-config-handling.patch @@ -0,0 +1,89 @@ +Change handling of PKG_CONFIG_LIBDIR + +When PKG_CONFIG_LIBDIR was unset in the environment, the configure +script was deducing the PKG_CONFIG_LIBDIR from the location of the +pkg-config binary, which doesn't make a lot of sense, and isn't done +by other autotools based packages. + +Also, the configure script was checking that the directory really +exists. This forced to create the directory *and* provide an absolute +path in PKG_CONFIG_LIBDIR, which didn't play well with the fact that +at installation time, PKG_CONFIG_LIBDIR is suffixed to DESTDIR, which +means that we got two times the staging directory location. + +This patch fixes both of those issues. Also, since ncurses uses a fork +of autoconf 2.13, we can't simply use _AUTORECONF=YES, so we also fix +the configure script in this patch. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure +=================================================================== +--- a/configure ++++ b/configure +@@ -3623,27 +3623,20 @@ + + # Leave this as something that can be overridden in the environment. + if test -z "$PKG_CONFIG_LIBDIR" ; then +- PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig ++ PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig" + fi ++ + PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'` +- if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then + +-# Check whether --enable-pc-files or --disable-pc-files was given. +-if test "${enable_pc_files+set}" = set; then +- enableval="$enable_pc_files" +- enable_pc_files=$enableval +-else +- enable_pc_files=no +-fi; +- echo "$as_me:3638: result: $enable_pc_files" >&5 +-echo "${ECHO_T}$enable_pc_files" >&6 ++ # Check whether --enable-pc-files or --disable-pc-files was given. ++ if test "${enable_pc_files+set}" = set; then ++ enableval="$enable_pc_files" ++ enable_pc_files=$enableval + else +- echo "$as_me:3641: result: no" >&5 +-echo "${ECHO_T}no" >&6 +- { echo "$as_me:3643: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5 +-echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;} +- enable_pc_files=no +- fi ++ enable_pc_files=no ++ fi; ++ echo "$as_me:3638: result: $enable_pc_files" >&5 ++ echo "${ECHO_T}$enable_pc_files" >&6 + fi + + echo "$as_me:3649: checking if we should assume mixed-case filenames" >&5 +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -174,20 +174,14 @@ + + # Leave this as something that can be overridden in the environment. + if test -z "$PKG_CONFIG_LIBDIR" ; then +- PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[[^/]]*/[[^/]]*$,,'`/lib/pkgconfig ++ PKG_CONFIG_LIBDIR="/usr/lib/pkgconfig" + fi + PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'` +- if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then +- AC_ARG_ENABLE(pc-files, ++ AC_ARG_ENABLE(pc-files, + [ --enable-pc-files generate and install .pc files for pkg-config], + [enable_pc_files=$enableval], + [enable_pc_files=no]) +- AC_MSG_RESULT($enable_pc_files) +- else +- AC_MSG_RESULT(no) +- AC_MSG_WARN(did not find library $PKG_CONFIG_LIBDIR) +- enable_pc_files=no +- fi ++ AC_MSG_RESULT($enable_pc_files) + fi + AC_SUBST(PKG_CONFIG_LIBDIR) + diff --git a/package/ncurses/0002-gcc-5.x-MKlib_gen.patch b/package/ncurses/0002-gcc-5.x-MKlib_gen.patch new file mode 100644 index 0000000000..25c2bd02d1 --- /dev/null +++ b/package/ncurses/0002-gcc-5.x-MKlib_gen.patch @@ -0,0 +1,43 @@ +Fix gcc 5.x build failure + +Extracted from upstream commit +http://ncurses.scripts.mit.edu/?p=ncurses.git;a=commit;h=97bb4678dc03e753290b39bbff30ba2825df9517. + ++ modify MKlib_gen.sh to work around change in development version of + gcc introduced here: + https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html + https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html + (reports by Marcus Shawcroft, Maohui Lei). + +Original author: Thomas E. Dickey +Signed-off-by: Mikhail Peselnik + +--- a/ncurses/base/MKlib_gen.sh.orig 2015-07-23 21:52:32.239481505 +0300 ++++ b/ncurses/base/MKlib_gen.sh 2015-07-23 21:53:20.772966587 +0300 +@@ -437,11 +437,22 @@ + -e 's/gen_$//' \ + -e 's/ / /g' >>$TMP + ++cat >$ED1 < $ED2 ++cat $ED2 >$TMP ++ + $preprocessor $TMP 2>/dev/null \ +-| sed \ +- -e 's/ / /g' \ +- -e 's/^ //' \ +- -e 's/_Bool/NCURSES_BOOL/g' \ ++| sed -f $ED1 \ + | $AWK -f $AW2 \ + | sed -f $ED3 \ + | sed \ diff --git a/package/ncurses/Config.in b/package/ncurses/Config.in new file mode 100644 index 0000000000..44713f9e30 --- /dev/null +++ b/package/ncurses/Config.in @@ -0,0 +1,41 @@ +config BR2_PACKAGE_NCURSES + bool "ncurses" + help + The Ncurses (new curses) library is a free software emulation of + curses in System V Release 4.0, and more. + + This package installs only a few vital termcap entries + + http://www.gnu.org/software/ncurses/ + +if BR2_PACKAGE_NCURSES + +config BR2_PACKAGE_NCURSES_WCHAR + bool "enable wide char support" + depends on BR2_USE_WCHAR + # Build broken @ curses.priv.h with bad declarations + depends on !(BR2_bfin && BR2_BINFMT_FLAT) + help + Enable wide char & UTF-8 support in ncurses libraries + +config BR2_PACKAGE_NCURSES_TARGET_PANEL + bool "ncurses libpanel in target" + help + Includes ncurses dynamic libpanel in target + +config BR2_PACKAGE_NCURSES_TARGET_FORM + bool "ncurses libform in target" + help + Includes ncurses dynamic libform in target + +config BR2_PACKAGE_NCURSES_TARGET_MENU + bool "ncurses libmenu in target" + help + Includes ncurses dynamic libmenu in target + +config BR2_PACKAGE_NCURSES_TARGET_PROGS + bool "ncurses programs" + help + Include ncurses programs in target (clear, reset, tput, ...) + +endif diff --git a/package/ncurses/ncurses.hash b/package/ncurses/ncurses.hash new file mode 100644 index 0000000000..482b2d4853 --- /dev/null +++ b/package/ncurses/ncurses.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 9046298fb440324c9d4135ecea7879ffed8546dd1b58e59430ea07a4633f563b ncurses-5.9.tar.gz diff --git a/package/ncurses/ncurses.mk b/package/ncurses/ncurses.mk new file mode 100644 index 0000000000..8368c690b6 --- /dev/null +++ b/package/ncurses/ncurses.mk @@ -0,0 +1,186 @@ +################################################################################ +# +# ncurses +# +################################################################################ + +NCURSES_VERSION = 5.9 +NCURSES_SITE = $(BR2_GNU_MIRROR)/ncurses +NCURSES_INSTALL_STAGING = YES +NCURSES_DEPENDENCIES = host-ncurses +HOST_NCURSES_DEPENDENCIES = +NCURSES_PROGS = clear infocmp tabs tic toe tput tset +NCURSES_LICENSE = MIT with advertising clause +NCURSES_LICENSE_FILES = README +NCURSES_CONFIG_SCRIPTS = ncurses$(NCURSES_LIB_SUFFIX)$(NCURSES_ABI_VERSION)-config + +NCURSES_CONF_OPTS = \ + --without-cxx \ + --without-cxx-binding \ + --without-ada \ + --without-tests \ + --disable-big-core \ + --without-profile \ + --disable-rpath \ + --disable-rpath-hack \ + --enable-echo \ + --enable-const \ + --enable-overwrite \ + --enable-pc-files \ + $(if $(BR2_PACKAGE_NCURSES_TARGET_PROGS),,--without-progs) \ + --without-manpages + +# Install after busybox for the full-blown versions +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +NCURSES_DEPENDENCIES += busybox +endif + +ifeq ($(BR2_STATIC_LIBS),y) +NCURSES_CONF_OPTS += --without-shared --with-normal +else ifeq ($(BR2_SHARED_LIBS),y) +NCURSES_CONF_OPTS += --with-shared --without-normal +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +NCURSES_CONF_OPTS += --with-shared --with-normal +endif + +# configure can't find the soname for libgpm when cross compiling +ifeq ($(BR2_PACKAGE_GPM),y) +NCURSES_CONF_OPTS += --with-gpm=libgpm.so.2 +NCURSES_DEPENDENCIES += gpm +else +NCURSES_CONF_OPTS += --without-gpm +endif + +NCURSES_LIBS-y = ncurses +NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_MENU) += menu +NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_PANEL) += panel +NCURSES_LIBS-$(BR2_PACKAGE_NCURSES_TARGET_FORM) += form + +ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y) +NCURSES_CONF_OPTS += --enable-widec +NCURSES_LIB_SUFFIX = w + +define NCURSES_LINK_LIBS_STATIC + for lib in $(NCURSES_LIBS-y:%=lib%); do \ + ln -sf $${lib}$(NCURSES_LIB_SUFFIX).a \ + $(1)/usr/lib/$${lib}.a; \ + done + ln -sf libncurses$(NCURSES_LIB_SUFFIX).a \ + $(1)/usr/lib/libcurses.a +endef + +define NCURSES_LINK_LIBS_SHARED + for lib in $(NCURSES_LIBS-y:%=lib%); do \ + ln -sf $${lib}$(NCURSES_LIB_SUFFIX).so \ + $(1)/usr/lib/$${lib}.so; \ + done + ln -sf libncurses$(NCURSES_LIB_SUFFIX).so \ + $(1)/usr/lib/libcurses.so +endef + +define NCURSES_LINK_PC + for pc in $(NCURSES_LIBS-y); do \ + ln -sf $${pc}$(NCURSES_LIB_SUFFIX).pc \ + $(1)/usr/lib/pkgconfig/$${pc}.pc; \ + done +endef + +NCURSES_LINK_TARGET_LIBS = \ + $(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_STATIC,$(TARGET_DIR));) \ + $(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_SHARED,$(TARGET_DIR))) +NCURSES_LINK_STAGING_LIBS = \ + $(if $(BR2_STATIC_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_STATIC,$(STAGING_DIR));) \ + $(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),$(call NCURSES_LINK_LIBS_SHARED,$(STAGING_DIR))) + +NCURSES_LINK_STAGING_PC = $(call NCURSES_LINK_PC,$(STAGING_DIR)) + +NCURSES_CONF_OPTS += --enable-ext-colors +NCURSES_ABI_VERSION = 6 +define NCURSES_INSTALL_TARGET_256_COLORS_TERMINFO + cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm+256color $(TARGET_DIR)/usr/share/terminfo/x + cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-256color $(TARGET_DIR)/usr/share/terminfo/x +endef + +NCURSES_POST_INSTALL_STAGING_HOOKS += NCURSES_LINK_STAGING_LIBS +NCURSES_POST_INSTALL_STAGING_HOOKS += NCURSES_LINK_STAGING_PC + +else # BR2_PACKAGE_NCURSES_WCHAR +NCURSES_ABI_VERSION = 5 +endif # BR2_PACKAGE_NCURSES_WCHAR + +ifneq ($(BR2_ENABLE_DEBUG),y) +NCURSES_CONF_OPTS += --without-debug +endif + +# ncurses breaks with parallel build, but takes quite a while to +# build single threaded. Work around it similar to how Gentoo does +define NCURSES_BUILD_CMDS + $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) sources + rm -rf $(@D)/misc/pc-files + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) +endef + +ifneq ($(BR2_STATIC_LIBS),y) +define NCURSES_INSTALL_TARGET_LIBS + for lib in $(NCURSES_LIBS-y:%=lib%); do \ + cp -dpf $(NCURSES_DIR)/lib/$${lib}$(NCURSES_LIB_SUFFIX).so* \ + $(TARGET_DIR)/usr/lib/; \ + done +endef +endif + +ifeq ($(BR2_PACKAGE_NCURSES_TARGET_PROGS),y) +define NCURSES_INSTALL_TARGET_PROGS + for x in $(NCURSES_PROGS); do \ + $(INSTALL) -m 0755 $(NCURSES_DIR)/progs/$$x \ + $(TARGET_DIR)/usr/bin/$$x; \ + done + ln -sf tset $(TARGET_DIR)/usr/bin/reset +endef +endif + +define NCURSES_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/lib + $(NCURSES_INSTALL_TARGET_LIBS) + $(NCURSES_LINK_TARGET_LIBS) + $(NCURSES_INSTALL_TARGET_PROGS) + ln -snf /usr/share/terminfo $(TARGET_DIR)/usr/lib/terminfo + mkdir -p $(TARGET_DIR)/usr/share/terminfo/x + cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm $(TARGET_DIR)/usr/share/terminfo/x + cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-color $(TARGET_DIR)/usr/share/terminfo/x + cp -dpf $(STAGING_DIR)/usr/share/terminfo/x/xterm-xfree86 $(TARGET_DIR)/usr/share/terminfo/x + $(NCURSES_INSTALL_TARGET_256_COLORS_TERMINFO) + mkdir -p $(TARGET_DIR)/usr/share/terminfo/v + cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt100 $(TARGET_DIR)/usr/share/terminfo/v + cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt102 $(TARGET_DIR)/usr/share/terminfo/v + cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt200 $(TARGET_DIR)/usr/share/terminfo/v + cp -dpf $(STAGING_DIR)/usr/share/terminfo/v/vt220 $(TARGET_DIR)/usr/share/terminfo/v + mkdir -p $(TARGET_DIR)/usr/share/terminfo/a + cp -dpf $(STAGING_DIR)/usr/share/terminfo/a/ansi $(TARGET_DIR)/usr/share/terminfo/a + mkdir -p $(TARGET_DIR)/usr/share/terminfo/l + cp -dpf $(STAGING_DIR)/usr/share/terminfo/l/linux $(TARGET_DIR)/usr/share/terminfo/l + mkdir -p $(TARGET_DIR)/usr/share/terminfo/s + cp -dpf $(STAGING_DIR)/usr/share/terminfo/s/screen $(TARGET_DIR)/usr/share/terminfo/s +endef # NCURSES_INSTALL_TARGET_CMDS + +# +# On systems with an older version of tic, the installation of ncurses hangs +# forever. To resolve the problem, build a static version of tic on host +# ourselves, and use that during installation. +# +define HOST_NCURSES_BUILD_CMDS + $(MAKE1) -C $(@D) sources + $(MAKE) -C $(@D)/progs tic +endef + +HOST_NCURSES_CONF_OPTS = \ + --with-shared \ + --without-gpm \ + --without-manpages \ + --without-cxx \ + --without-cxx-binding \ + --without-ada \ + --without-normal + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/ndisc6/0001-trace-tcp-upd-uClibc-fix.patch b/package/ndisc6/0001-trace-tcp-upd-uClibc-fix.patch new file mode 100644 index 0000000000..f84719cf36 --- /dev/null +++ b/package/ndisc6/0001-trace-tcp-upd-uClibc-fix.patch @@ -0,0 +1,64 @@ +From 0be2fe3a750b62cafca9794e37f040624d3a59de Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Thu, 26 Apr 2012 23:45:25 +0200 +Subject: [PATCH] trace-{tcp,udp}.c: fix build on uClibc + +Selection of the BSD variant of struct tcphdr/udphdr on uClibc fails +because of config.h. This is caused by config.h setting _GNU_SOURCE +and the compat handling (uClibc doesn't have inet6_rth_*) including +sys/types.h which in term includes features.h, which figures out +what bsd/gnu/posix variant to use because of: + + /* If _BSD_SOURCE was defined by the user, favor BSD over POSIX. */ + #if defined _BSD_SOURCE && \ + !(defined _POSIX_SOURCE || defined _POSIX_C_SOURCE || \ + defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED || \ + defined _GNU_SOURCE || defined _SVID_SOURCE) + # define __FAVOR_BSD 1 + #endif + +The current workaround of undefining _GNU_SOURCE after config.h doesn't +work as features.h has already been evaluated by then. Instead, simply +don't include config.h as it isn't needed in these two files. + +Signed-off-by: Peter Korsgaard +--- + src/trace-tcp.c | 5 ----- + src/trace-udp.c | 5 ----- + 2 files changed, 10 deletions(-) + +diff --git a/src/trace-tcp.c b/src/trace-tcp.c +index 6a7732d..91b64c2 100644 +--- a/src/trace-tcp.c ++++ b/src/trace-tcp.c +@@ -17,11 +17,6 @@ + * along with this program. If not, see . * + *************************************************************************/ + +-#ifdef HAVE_CONFIG_H +-# include +-#endif +- +-#undef _GNU_SOURCE + #define _BSD_SOURCE 1 + + #include +diff --git a/src/trace-udp.c b/src/trace-udp.c +index 821c24c..1754338 100644 +--- a/src/trace-udp.c ++++ b/src/trace-udp.c +@@ -17,11 +17,6 @@ + * along with this program. If not, see . * + *************************************************************************/ + +-#ifdef HAVE_CONFIG_H +-# include +-#endif +- +-#undef _GNU_SOURCE + #define _BSD_SOURCE 1 + + #include +-- +1.7.10 + diff --git a/package/ndisc6/Config.in b/package/ndisc6/Config.in new file mode 100644 index 0000000000..321bfbc963 --- /dev/null +++ b/package/ndisc6/Config.in @@ -0,0 +1,47 @@ +config BR2_PACKAGE_NDISC6 + bool "ndisc6 tools" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + NDisc6 is a small collection of useful tools for IPv6 networking + + http://www.remlab.net/ndisc6/ + +if BR2_PACKAGE_NDISC6 + +config BR2_PACKAGE_NDISC6_NAME2ADDR + bool "name2addr" + help + name2addr perform DNS lookups from scripts. + +config BR2_PACKAGE_NDISC6_NDISC6 + bool "ndisc6" + help + ndisc6 performs ICMPv6 Neighbor Discovery in userland. + +config BR2_PACKAGE_NDISC6_RDISC6 + bool "rdisc6" + help + rdisc6 performs ICMPv6 Router Discovery in userland. + +config BR2_PACKAGE_NDISC6_RDNSSD + bool "rdnssd" + help + IPv6 Recursive DNS Server discovery Daemon. + +config BR2_PACKAGE_NDISC6_RLTRACEROUTE6 + bool "rltraceroute6" + help + rltraceroute6 is an IPv6 traceroute implementation. + +config BR2_PACKAGE_NDISC6_TCPTRACEROUTE6 + bool "tcptraceroute6" + help + tcptraceroute6 is an TCP/IPv6 traceroute implementation. + +config BR2_PACKAGE_NDISC6_TCPSPRAY + bool "tcpspray" + help + TCP/IP bandwidth measurement tool (Discard and Echo client). + +endif diff --git a/package/ndisc6/ndisc6.hash b/package/ndisc6/ndisc6.hash new file mode 100644 index 0000000000..8d71bdeaf1 --- /dev/null +++ b/package/ndisc6/ndisc6.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 6acec8a0cb9efa3ac98456f46c3016aeec0598b0c7557c95242b5228ad62ca7a ndisc6-1.0.2.tar.bz2 diff --git a/package/ndisc6/ndisc6.mk b/package/ndisc6/ndisc6.mk new file mode 100644 index 0000000000..f431035cd3 --- /dev/null +++ b/package/ndisc6/ndisc6.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# ndisc6 +# +################################################################################ + +NDISC6_VERSION = 1.0.2 +NDISC6_SOURCE = ndisc6-$(NDISC6_VERSION).tar.bz2 +NDISC6_SITE = http://www.remlab.net/files/ndisc6 +NDISC6_CONF_ENV = CC="$(TARGET_CC) -std=gnu99" +NDISC6_CONF_OPTS = --disable-rpath --disable-suid-install +NDISC6_LICENSE = GPLv2 or GPLv3 +NDISC6_LICENSE_FILES = COPYING + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +NDISC6_DEPENDENCIES += gettext +NDISC6_CONF_ENV += LIBS="-lintl" +endif + +NDISC6_BIN_ += dnssort # perl script +NDISC6_BIN_$(BR2_PACKAGE_NDISC6_NAME2ADDR) += name2addr addr2name +NDISC6_BIN_$(BR2_PACKAGE_NDISC6_TCPSPRAY) += tcpspray tcpspray6 + +NDISC6_SBIN_$(BR2_PACKAGE_NDISC6_NDISC6) += ndisc6 +NDISC6_SBIN_$(BR2_PACKAGE_NDISC6_RDISC6) += rdisc6 +NDISC6_SBIN_$(BR2_PACKAGE_NDISC6_RDNSSD) += rdnssd +NDISC6_SBIN_$(BR2_PACKAGE_NDISC6_RLTRACEROUTE6) += rltraceroute6 tracert6 +NDISC6_SBIN_$(BR2_PACKAGE_NDISC6_TCPTRACEROUTE6) += tcptraceroute6 + +define NDISC6_REMOVE_UNNEEDED + rm -rf $(addprefix $(TARGET_DIR)/usr/bin/,$(NDISC6_BIN_)) \ + $(addprefix $(TARGET_DIR)/usr/sbin/,$(NDISC6_SBIN_)) + $(if $(BR2_PACKAGE_NDISC6_RDNSSD),,\ + rm -rf $(TARGET_DIR)/etc/rdnssd $(TARGET_DIR)/var/run/rdnssd) +endef + +NDISC6_POST_INSTALL_TARGET_HOOKS += NDISC6_REMOVE_UNNEEDED + +$(eval $(autotools-package)) diff --git a/package/ne10/0001-CMakeLists-don-t-hard-code-thumb-code-generation.patch b/package/ne10/0001-CMakeLists-don-t-hard-code-thumb-code-generation.patch new file mode 100644 index 0000000000..f140a60441 --- /dev/null +++ b/package/ne10/0001-CMakeLists-don-t-hard-code-thumb-code-generation.patch @@ -0,0 +1,29 @@ +From 9ff39800cec5f1dabba246b253794582d611bc6d Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Fri, 20 Feb 2015 10:44:15 -0600 +Subject: [PATCH] CMakeLists: don't hard code thumb code generation + +Migrating to version 1.2.0 + +Signed-off-by: Baruch Siach +Signed-off-by: Clayton Shotwell +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fdf01ec..34ae26e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -84,7 +84,7 @@ if(ANDROID_PLATFORM) + ${ANDROID_TOOLCHAIN_PATH}/arm-linux-androideabi-ar + ${ANDROID_TOOLCHAIN_PATH}/arm-linux-androideabi-ranlib") + elseif(GNULINUX_PLATFORM) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -march=armv7-a -mfpu=vfp3") + set(CMAKE_ASM_FLAGS "${CMAKE_C_FLAGS} -mthumb-interwork -mthumb -march=armv7-a -mfpu=neon") + elseif(IOS_PLATFORM) + #set minimal target ios version.If not provided this option, Xcode +-- +1.9.1 + diff --git a/package/ne10/Config.in b/package/ne10/Config.in new file mode 100644 index 0000000000..8d375793db --- /dev/null +++ b/package/ne10/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_NE10 + bool "ne10" + depends on BR2_arm + depends on BR2_ARM_FPU_NEON || BR2_ARM_FPU_NEON_VFPV4 + help + The Ne10 project has been set up to provide a set of common, + useful functions which have been heavily optimized for the + ARM Architecture and provide consistent well tested behavior + that can be easily incorporated into applications. C + interfaces to the functions are provided for both assembler + and NEON implementations. + + http://projectne10.github.io/Ne10/ + +comment "ne10 needs a toolchain w/ neon" + depends on BR2_arm + depends on !(BR2_ARM_FPU_NEON || BR2_ARM_FPU_NEON_VFPV4) diff --git a/package/ne10/ne10.mk b/package/ne10/ne10.mk new file mode 100644 index 0000000000..aeaa0413b5 --- /dev/null +++ b/package/ne10/ne10.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# ne10 +# +################################################################################ + +NE10_VERSION = v1.2.0 +NE10_SITE = $(call github,projectNe10,Ne10,$(NE10_VERSION)) +NE10_LICENSE = BSD-3c or Apache-2.0 +NE10_LICENSE_FILES = doc/LICENSE +NE10_INSTALL_STAGING = YES + +NE10_CONF_OPTS = -DGNULINUX_PLATFORM=ON + +ifeq ($(BR2_STATIC_LIBS),) +NE10_CONF_OPTS += \ + -DNE10_BUILD_SHARED=ON +endif + +# The package does not have any install target, so have to provide +# INSTALL_STAGING_CMDS and INSTALL_TARGET_CMDS. + +ifeq ($(BR2_STATIC_LIBS),) +define NE10_INSTALL_STAGING_SHARED_LIB + cp -dpf $(@D)/modules/libNE10*.so* $(STAGING_DIR)/usr/lib/ +endef +endif + +define NE10_INSTALL_STAGING_CMDS + cp -dpf $(@D)/inc/NE10*h $(STAGING_DIR)/usr/include/ + cp -dpf $(@D)/modules/libNE10.a $(STAGING_DIR)/usr/lib/ + $(NE10_INSTALL_STAGING_SHARED_LIB) +endef + + +define NE10_INSTALL_TARGET_CMDS + cp -dpf $(@D)/modules/libNE10*.so* $(TARGET_DIR)/usr/lib/ +endef + +$(eval $(cmake-package)) diff --git a/package/neard/Config.in b/package/neard/Config.in new file mode 100644 index 0000000000..8571e7c9a2 --- /dev/null +++ b/package/neard/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_NEARD + bool "neard" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl, dbus, libglib2 + depends on BR2_USE_MMU # dbus, libglib2 + depends on !BR2_STATIC_LIBS # dlopen + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBNL + help + Near Field Communication (NFC) manager. This userspace daemon is + a part of the NFC stack provided by the Linux NFC project. + + http://git.kernel.org/?p=network/nfc/neard.git;a=summary + + https://01.org/linux-nfc/documentation/how-start-linux-nfc-code... + +if BR2_PACKAGE_NEARD + +config BR2_PACKAGE_NEARD_TOOLS + bool "neard tools" + help + Build and install neard tools. + +endif + +comment "neard needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/neard/S53neard b/package/neard/S53neard new file mode 100755 index 0000000000..f515668389 --- /dev/null +++ b/package/neard/S53neard @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Starts neard +# + +NAME=neard +DAEMON=/usr/libexec/nfc/$NAME + +# Exit gracefully if the package has been removed +[ -x $DAEMON ] || exit 0 + +case "$1" in + start) + printf "Starting $NAME: " + start-stop-daemon -S -q -p /var/run/${NAME}.pid -x $DAEMON -- -d '*' + echo "OK" + ;; + stop) + printf "Stopping $NAME: " + start-stop-daemon -K -q -p /var/run/${NAME}.pid + echo "OK" + ;; + restart|reload) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/neard/neard.hash b/package/neard/neard.hash new file mode 100644 index 0000000000..7517093176 --- /dev/null +++ b/package/neard/neard.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/network/nfc/sha256sums.asc +sha256 6ea724b443d39d679168fc7776a965d1f64727c3735391df2c01469ee7cd8cca neard-0.14.tar.xz diff --git a/package/neard/neard.mk b/package/neard/neard.mk new file mode 100644 index 0000000000..ed2c6b1555 --- /dev/null +++ b/package/neard/neard.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# neard +# +################################################################################ + +NEARD_VERSION = 0.14 +NEARD_SOURCE = neard-$(NEARD_VERSION).tar.xz +NEARD_SITE = $(BR2_KERNEL_MIRROR)/linux/network/nfc +NEARD_LICENSE = GPLv2 +NEARD_LICENSE_FILES = COPYING + +NEARD_DEPENDENCIES = host-pkgconf dbus libglib2 libnl +NEARD_CONF_OPTS = --disable-traces + +ifeq ($(BR2_PACKAGE_NEARD_TOOLS),y) +NEARD_CONF_OPTS += --enable-tools +endif + +define NEARD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/neard/S53neard \ + $(TARGET_DIR)/etc/init.d/S53neard +endef + +$(eval $(autotools-package)) diff --git a/package/neardal/Config.in b/package/neardal/Config.in new file mode 100644 index 0000000000..c729283380 --- /dev/null +++ b/package/neardal/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_NEARDAL + bool "neardal" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, glib2 + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_DBUS_GLIB + select BR2_PACKAGE_READLINE if !BR2_PACKAGE_LIBEDIT + help + Provides a simple C API to exchange data with the neard NFC + manager daemon. + + https://github.com/connectivity/neardal + +if BR2_PACKAGE_NEARDAL + +config BR2_PACKAGE_NEARDAL_NCL + bool "ncl tool" + help + Build and install neardal ncl command line interpreter tool. + +endif + +comment "neardal needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/neardal/neardal.mk b/package/neardal/neardal.mk new file mode 100644 index 0000000000..c3164ef0da --- /dev/null +++ b/package/neardal/neardal.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# neardal +# +################################################################################ + +NEARDAL_VERSION = 33b54a55032b047fd885a5eb3592c169c0056c49 +NEARDAL_SITE = $(call github,connectivity,neardal,$(NEARDAL_VERSION)) +NEARDAL_INSTALL_STAGING = YES +NEARDAL_LICENSE = GPLv2 +NEARDAL_LICENSE_FILES = COPYING + +NEARDAL_DEPENDENCIES = host-pkgconf dbus dbus-glib +NEARDAL_AUTORECONF = YES + +# Either readline or libedit are needed, and the Config.in file +# guarantees at least one of them is enabled +ifeq ($(BR2_PACKAGE_READLINE),y) +NEARDAL_DEPENDENCIES += readline +else ifeq ($(BR2_PACKAGE_LIBEDIT),y) +NEARDAL_DEPENDENCIES += libedit +endif + +# Both readline and libedit link with ncurses but the configure script +# forgets to take that into account, causing the detection to fail +# when linking statically +ifeq ($(BR2_STATIC_LIBS),y) +NEARDAL_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs ncurses`" +endif + +define NEARDAL_INSTALL_NCL + $(INSTALL) -m 0755 -D $(@D)/ncl/ncl $(TARGET_DIR)/usr/bin/ncl +endef + +ifeq ($(BR2_PACKAGE_NEARDAL_NCL),y) +NEARDAL_POST_INSTALL_TARGET_HOOKS += NEARDAL_INSTALL_NCL +endif + +$(eval $(autotools-package)) diff --git a/package/neon/Config.in b/package/neon/Config.in new file mode 100644 index 0000000000..e76278c37e --- /dev/null +++ b/package/neon/Config.in @@ -0,0 +1,41 @@ +config BR2_PACKAGE_NEON + bool "libneon" + help + HTTP and WebDAV client library, with a C interface. + + http://www.webdav.org/neon/ + +if BR2_PACKAGE_NEON + +config BR2_PACKAGE_NEON_ZLIB + bool "ZLIB support" + select BR2_PACKAGE_ZLIB + help + build with ZLIB support + +config BR2_PACKAGE_NEON_SSL + bool "SSL support" + select BR2_PACKAGE_OPENSSL + help + build with SSL support + +# This is an hidden symbol other packages can select to ensure that +# Neon has XML support, either provided by Expat or libxml2. +config BR2_PACKAGE_NEON_XML + bool + select BR2_PACKAGE_NEON_EXPAT if !BR2_PACKAGE_NEON_LIBXML2 + +config BR2_PACKAGE_NEON_EXPAT + bool "XML support with expat" + select BR2_PACKAGE_EXPAT + depends on !BR2_PACKAGE_NEON_LIBXML2 + help + Enable XML support in neon, using the Expat XML library. + +config BR2_PACKAGE_NEON_LIBXML2 + bool "XML support with libxml2" + select BR2_PACKAGE_LIBXML2 + help + Enable XML support in neon, using the libxml2 XML library. + +endif diff --git a/package/neon/neon.hash b/package/neon/neon.hash new file mode 100644 index 0000000000..9db5f82e88 --- /dev/null +++ b/package/neon/neon.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 2962cfcb5d30f3272e3d2fa0e473434419770a3801afe3d46e5d1650787990c2 neon-0.30.0.tar.gz diff --git a/package/neon/neon.mk b/package/neon/neon.mk new file mode 100644 index 0000000000..0cff1a26f8 --- /dev/null +++ b/package/neon/neon.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# neon +# +################################################################################ + +NEON_VERSION = 0.30.0 +NEON_SITE = http://www.webdav.org/neon +NEON_LICENSE = LGPLv2+ (library), GPLv2+ (manual and tests) +NEON_LICENSE_FILES = src/COPYING.LIB test/COPYING README +NEON_INSTALL_STAGING = YES +NEON_CONF_OPTS = --without-gssapi --disable-rpath +NEON_CONFIG_SCRIPTS = neon-config +NEON_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_NEON_ZLIB),y) +NEON_CONF_OPTS += --with-zlib=$(STAGING_DIR) +NEON_DEPENDENCIES += zlib +else +NEON_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_NEON_SSL),y) +NEON_CONF_OPTS += --with-ssl +NEON_DEPENDENCIES += openssl +else +NEON_CONF_OPTS += --without-ssl +endif + +ifeq ($(BR2_PACKAGE_NEON_EXPAT),y) +NEON_CONF_OPTS += --with-expat=$(STAGING_DIR)/usr/lib/libexpat.la +NEON_DEPENDENCIES += expat +else +NEON_CONF_OPTS += --with-expat=no +endif + +ifeq ($(BR2_PACKAGE_NEON_LIBXML2),y) +NEON_CONF_OPTS += --with-libxml2=yes +NEON_CONF_ENV += ac_cv_prog_XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config +NEON_DEPENDENCIES += libxml2 +else +NEON_CONF_OPTS += --with-libxml2=no +endif + +ifeq ($(BR2_PACKAGE_NEON_EXPAT)$(BR2_PACKAGE_NEON_LIBXML2),) +# webdav needs xml support +NEON_CONF_OPTS += --disable-webdav +endif + +$(eval $(autotools-package)) diff --git a/package/net-tools/0001-Makefile-fix-static-linking-issue-with-lintl.patch b/package/net-tools/0001-Makefile-fix-static-linking-issue-with-lintl.patch new file mode 100644 index 0000000000..a2d674e81d --- /dev/null +++ b/package/net-tools/0001-Makefile-fix-static-linking-issue-with-lintl.patch @@ -0,0 +1,79 @@ +From a2076079a409141704701ec17a205d89e5b24052 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 28 May 2016 20:45:02 +0200 +Subject: [PATCH] Makefile: fix static linking issue with lintl + +When net-tools are build with uClibc-ng and statically linked, +some tools like hostname and route needs to link with -lintl. + +Adding -lintl in LDFLAGS place the library before object files: +arm-linux-gcc -O2 -g -Wall -fno-strict-aliasing -static -lintl -Llib -o hostname hostname.o + +Add $(LIBS) after object files in the Makefile to place -lintl correctly. + +Fixes: +http://autobuild.buildroot.net/results/134/1345b6d366125320b89512e7ce7f142f1a03acf8 + +Ref: +http://lists.busybox.net/pipermail/buildroot/2016-May/162216.html + +Signed-off-by: Romain Naour +--- + Makefile | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +diff --git a/Makefile b/Makefile +index 171123d..a2baf79 100644 +--- a/Makefile ++++ b/Makefile +@@ -158,37 +158,37 @@ subdirs: libdir + @for i in $(SUBDIRS:$(NET_LIB_PATH)/=); do $(MAKE) -C $$i || exit $$? ; done + + ifconfig: $(NET_LIB) ifconfig.o +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ifconfig.o $(NLIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ifconfig.o $(LIBS) $(NLIB) + + nameif: $(NET_LIB) nameif.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ nameif.o $(NLIB) + + hostname: hostname.o +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(DNLIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ hostname.o $(LIBS) $(DNLIB) + + route: $(NET_LIB) route.o +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(NLIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ route.o $(LIBS) $(NLIB) + + arp: $(NET_LIB) arp.o +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ arp.o $(NLIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ arp.o $(LIBS) $(NLIB) + + rarp: $(NET_LIB) rarp.o +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rarp.o $(NLIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rarp.o $(LIBS) $(NLIB) + + slattach: $(NET_LIB) slattach.o +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ slattach.o $(NLIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ slattach.o $(LIBS) $(NLIB) + + plipconfig: $(NET_LIB) plipconfig.o +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ plipconfig.o $(NLIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ plipconfig.o $(LIBS) $(NLIB) + + netstat: $(NET_LIB) netstat.o statistics.o +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ netstat.o statistics.o $(NLIB) $(SELIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ netstat.o statistics.o $(LIBS) $(NLIB) $(SELIB) + + iptunnel: $(NET_LIB) iptunnel.o +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ iptunnel.o $(NLIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ iptunnel.o $(LIBS) $(NLIB) + + ipmaddr: $(NET_LIB) ipmaddr.o +- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ipmaddr.o $(NLIB) ++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ipmaddr.o $(LIBS) $(NLIB) + + mii-tool: $(NET_LIB) mii-tool.o + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mii-tool.o $(NLIB) +-- +2.5.5 + diff --git a/package/net-tools/Config.in b/package/net-tools/Config.in new file mode 100644 index 0000000000..f98dca0557 --- /dev/null +++ b/package/net-tools/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_NET_TOOLS + bool "net-tools" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + A collection of programs that form the base set of the NET-3 + networking distribution for the Linux operating system. + Includes: arp, hostname, ifconfig, netstat, rarp, route, + plipconfig, slattach, mii-tool, iptunnel and ipmaddr. + + http://sourceforge.net/projects/net-tools/ diff --git a/package/net-tools/net-tools.mk b/package/net-tools/net-tools.mk new file mode 100644 index 0000000000..08d55bb27c --- /dev/null +++ b/package/net-tools/net-tools.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# net-tools +# +################################################################################ + +NET_TOOLS_VERSION = 3f170bff115303e92319791cbd56371e33dcbf6d +NET_TOOLS_SITE = git://git.code.sf.net/p/net-tools/code +NET_TOOLS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +NET_TOOLS_LICENSE = GPLv2+ +NET_TOOLS_LICENSE_FILES = COPYING + +# Install after busybox for the full-blown versions +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +NET_TOOLS_DEPENDENCIES += busybox +endif + +define NET_TOOLS_CONFIGURE_CMDS + (cd $(@D); yes "" | ./configure.sh config.in ) +endef + +# Enable I18N when appropiate +ifeq ($(BR2_ENABLE_LOCALE),y) +define NET_TOOLS_ENABLE_I18N + $(SED) 's:I18N 0:I18N 1:' $(@D)/config.h +endef +endif + +# Enable IPv6 +define NET_TOOLS_ENABLE_IPV6 + $(SED) 's:_AFINET6 0:_AFINET6 1:' $(@D)/config.h +endef + +NET_TOOLS_POST_CONFIGURE_HOOKS += NET_TOOLS_ENABLE_I18N NET_TOOLS_ENABLE_IPV6 + +define NET_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) AR="$(TARGET_AR)" CC="$(TARGET_CC)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + LIBS="$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),-lintl)" \ + $(MAKE) -C $(@D) +endef + +# install renames conflicting binaries, update does not +# ifconfig & route reside in /sbin for busybox +define NET_TOOLS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) update + mv -f $(TARGET_DIR)/bin/ifconfig $(TARGET_DIR)/sbin/ifconfig + mv -f $(TARGET_DIR)/bin/route $(TARGET_DIR)/sbin/route +endef + +$(eval $(generic-package)) diff --git a/package/netatalk/0001-Fix-setting-of-LD_LIBRARY_FLAGS-shlibpath_var.patch b/package/netatalk/0001-Fix-setting-of-LD_LIBRARY_FLAGS-shlibpath_var.patch new file mode 100644 index 0000000000..01d5776596 --- /dev/null +++ b/package/netatalk/0001-Fix-setting-of-LD_LIBRARY_FLAGS-shlibpath_var.patch @@ -0,0 +1,48 @@ +From 60d100713b5289948e9cdf5b0646ff3cdd2c206b Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Mon, 17 Dec 2012 22:32:44 +0100 +Subject: [PATCH] Fix setting of LD_LIBRARY_FLAGS ($shlibpath_var). + +LD_LIBRARY_PATH should not be set when cross-compiling, because it +adds the cross-libraries to the build's LD-path. + +Also the restoring of LD_LIBRARY_PATH was done incorrectly: it would +set LD_LIBRARY_PATH=LD_LIBRARY_PATH. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + macros/db3-check.m4 | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/macros/db3-check.m4 b/macros/db3-check.m4 +index 902220b..d5a5446 100644 +--- a/macros/db3-check.m4 ++++ b/macros/db3-check.m4 +@@ -94,7 +94,7 @@ if test "x$bdb_required" = "xyes"; then + savedldflags="$LDFLAGS" + savedcppflags="$CPPFLAGS" + savedlibs="$LIBS" +- saved_shlibpath_var=$shlibpath_var ++ eval saved_shlibpath_var=\$$shlibpath_var + + dnl required BDB version: 4.6, because of cursor API change + DB_MAJOR_REQ=4 +@@ -148,7 +148,7 @@ if test "x$bdb_required" = "xyes"; then + dnl -- LD_LIBRARY_PATH on many platforms. This will be fairly + dnl -- portable hopefully. Reference: + dnl -- http://lists.gnu.org/archive/html/autoconf/2009-03/msg00040.html +- eval export $shlibpath_var=$bdblibdir ++ test "$cross_compiling" = yes || eval export $shlibpath_var=$bdblibdir + NETATALK_BDB_TRY_LINK + eval export $shlibpath_var=$saved_shlibpath_var + +@@ -171,7 +171,7 @@ if test "x$bdb_required" = "xyes"; then + CPPFLAGS="-I${bdbdir}/include${subdir} $CPPFLAGS" + LDFLAGS="-L$bdblibdir $LDFLAGS" + +- eval export $shlibpath_var=$bdblibdir ++ test "$cross_compiling" = yes || eval export $shlibpath_var=$bdblibdir + NETATALK_BDB_TRY_LINK + eval export $shlibpath_var=$saved_shlibpath_var + +-- diff --git a/package/netatalk/0002-no-acl.patch b/package/netatalk/0002-no-acl.patch new file mode 100644 index 0000000000..165141b472 --- /dev/null +++ b/package/netatalk/0002-no-acl.patch @@ -0,0 +1,15 @@ +Fix builds without acl, from http://sourceforge.net/p/netatalk/bugs/574/ + +Signed-off-by: Gustavo Zacarias + +diff -Nura netatalk-3.1.7.orig/include/atalk/acl.h netatalk-3.1.7/include/atalk/acl.h +--- netatalk-3.1.7.orig/include/atalk/acl.h 2014-12-03 17:34:49.895524464 -0300 ++++ netatalk-3.1.7/include/atalk/acl.h 2014-12-03 17:34:58.735243283 -0300 +@@ -61,6 +61,7 @@ + #else /* HAVE_ACLS=no */ + + #define O_NETATALK_ACL 0 ++#define O_IGNORE 0 + #define chmod_acl chmod + + #endif /* HAVE_ACLS */ diff --git a/package/netatalk/Config.in b/package/netatalk/Config.in new file mode 100644 index 0000000000..ec6ec2c15d --- /dev/null +++ b/package/netatalk/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_NETATALK + bool "netatalk" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_BERKELEYDB + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBGPG_ERROR + help + Netatalk can be used to turn a *NIX machine into an extremely + high-performance and reliable file server for Macintosh computers. + + http://netatalk.sourceforge.net/ + +comment "netatalk needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/netatalk/S50netatalk b/package/netatalk/S50netatalk new file mode 100755 index 0000000000..287b20d774 --- /dev/null +++ b/package/netatalk/S50netatalk @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Start netatalk +# + +start() { + echo "Starting Netatalk" + start-stop-daemon -S -q -p /var/run/netatalk.pid --exec /usr/sbin/netatalk +} + +stop(){ + echo "Stopping Netatalk" + start-stop-daemon -K -q -p /var/run/netatalk.pid +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + start + stop + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/netatalk/netatalk.hash b/package/netatalk/netatalk.hash new file mode 100644 index 0000000000..955ffd4018 --- /dev/null +++ b/package/netatalk/netatalk.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/netatalk/files/netatalk/3.1.8/ +md5 9cab934ca32b8979f389da52d44c69c2 netatalk-3.1.8.tar.bz2 +sha1 00518461a311e6c17c95738ac214c8f06f863b4b netatalk-3.1.8.tar.bz2 diff --git a/package/netatalk/netatalk.mk b/package/netatalk/netatalk.mk new file mode 100644 index 0000000000..dbe13a9404 --- /dev/null +++ b/package/netatalk/netatalk.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# netatalk +# +################################################################################ + +NETATALK_VERSION = 3.1.8 +NETATALK_SITE = http://downloads.sourceforge.net/project/netatalk/netatalk/$(NETATALK_VERSION) +NETATALK_SOURCE = netatalk-$(NETATALK_VERSION).tar.bz2 +# For 0001-Fix-setting-of-LD_LIBRARY_FLAGS-shlibpath_var.patch +NETATALK_AUTORECONF = YES +NETATALK_CONFIG_SCRIPTS = netatalk-config +NETATALK_DEPENDENCIES = host-pkgconf openssl berkeleydb libgcrypt libgpg-error \ + libevent +NETATALK_LICENSE = GPLv2+, LGPLv3+, MIT-like +NETATALK_LICENSE_FILES = COPYING COPYRIGHT + +# Don't run ldconfig! +NETATALK_CONF_ENV += CC="$(TARGET_CC) -std=gnu99" \ + ac_cv_path_NETA_LDCONFIG="" +NETATALK_CONF_OPTS += \ + --with-cnid-cdb-backend \ + --with-bdb=$(STAGING_DIR)/usr \ + --with-ssl-dir=$(STAGING_DIR)/usr \ + --with-libgcrypt-dir=$(STAGING_DIR)/usr \ + --with-shadow \ + --disable-shell-check \ + --without-kerberos \ + --without-pam \ + --with-libevent=no \ + --with-dtrace=no \ + --with-mysql-config=no + +ifeq ($(BR2_PACKAGE_ACL),y) +NETATALK_DEPENDENCIES += acl +else +NETATALK_CONF_OPTS += --with-acls=no +endif + +ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy) +NETATALK_DEPENDENCIES += avahi +NETATALK_CONF_OPTS += --enable-zeroconf=$(STAGING_DIR)/usr +else +NETATALK_CONF_OPTS += --disable-zeroconf +endif + +ifeq ($(BR2_PACKAGE_CUPS),y) +NETATALK_DEPENDENCIES += cups +NETATALK_CONF_ENV += ac_cv_path_CUPS_CONFIG=$(STAGING_DIR)/usr/bin/cups-config +NETATALK_CONF_OPTS += --enable-cups +else +NETATALK_CONF_OPTS += --disable-cups +endif + +define NETATALK_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/netatalk/S50netatalk \ + $(TARGET_DIR)/etc/init.d/S50netatalk +endef + +$(eval $(autotools-package)) diff --git a/package/netbsd-queue/Config.in b/package/netbsd-queue/Config.in new file mode 100644 index 0000000000..7837f4cd7f --- /dev/null +++ b/package/netbsd-queue/Config.in @@ -0,0 +1,2 @@ +config BR2_PACKAGE_NETBSD_QUEUE + bool diff --git a/package/netbsd-queue/netbsd-queue.hash b/package/netbsd-queue/netbsd-queue.hash new file mode 100644 index 0000000000..f8e2a6c598 --- /dev/null +++ b/package/netbsd-queue/netbsd-queue.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c13407edd0e33be73cae72514cb234f8612e1c0e54401c9448daffd3a240158b queue.h?rev=1.70 diff --git a/package/netbsd-queue/netbsd-queue.mk b/package/netbsd-queue/netbsd-queue.mk new file mode 100644 index 0000000000..5fd926bba1 --- /dev/null +++ b/package/netbsd-queue/netbsd-queue.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# netbsd-queue +# +################################################################################ + +NETBSD_QUEUE_VERSION = 1.70 +NETBSD_QUEUE_SITE = http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys +NETBSD_QUEUE_SOURCE = queue.h?rev=$(NETBSD_QUEUE_VERSION) +NETBSD_QUEUE_LICENSE = BSD-3c + +NETBSD_QUEUE_ADD_TOOLCHAIN_DEPENDENCY = NO +NETBSD_QUEUE_INSTALL_STAGING = YES + +define NETBSD_QUEUE_EXTRACT_CMDS + cp $(DL_DIR)/$(NETBSD_QUEUE_SOURCE) $(@D)/queue.h +endef + +define NETBSD_QUEUE_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0644 $(@D)/queue.h \ + $(STAGING_DIR)/usr/include/sys/queue.h +endef + +$(eval $(generic-package)) diff --git a/package/netcat-openbsd/Config.in b/package/netcat-openbsd/Config.in new file mode 100644 index 0000000000..346561a856 --- /dev/null +++ b/package/netcat-openbsd/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_NETCAT_OPENBSD + bool "netcat-openbsd" + select BR2_PACKAGE_LIBBSD + depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_USES_GLIBC + help + A simple Unix utility which reads and writes data across network + connections using TCP or UDP protocol. It is designed to be a + reliable "back-end" tool that can be used directly or easily driven + by other programs and scripts. At the same time it is a feature-rich + network debugging and exploration tool, since it can create almost + any kind of connection you would need and has several interesting + built-in capabilities. + + This package contains the OpenBSD rewrite of netcat, including + support for IPv6, proxies, and Unix sockets. + + https://packages.debian.org/sid/netcat-openbsd + +comment "netcat-openbsd needs an (e)glibc toolchain w/ threads" + depends on BR2_PACKAGE_LIBBSD_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_USES_GLIBC +~ diff --git a/package/netcat-openbsd/netcat-openbsd.mk b/package/netcat-openbsd/netcat-openbsd.mk new file mode 100644 index 0000000000..5abfc7e165 --- /dev/null +++ b/package/netcat-openbsd/netcat-openbsd.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# netcat-openbsd +# +################################################################################ + +NETCAT_OPENBSD_VERSION = debian/1.105-7 +NETCAT_OPENBSD_SITE = git://anonscm.debian.org/collab-maint/netcat-openbsd +NETCAT_OPENBSD_LICENSE = BSD-3c +NETCAT_OPENBSD_LICENSE_FILES = debian/copyright +NETCAT_OPENBSD_DEPENDENCIES = host-pkgconf libbsd + +# Ensure Busybox gets built/installed before, so that this package +# overrides Busybox nc. +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +NETCAT_OPENBSD_DEPENDENCIES += busybox +endif + +define NETCAT_OPENBSD_APPLY_DEBIAN_PATCHES + if [ -d $(@D)/debian/patches ]; then \ + $(APPLY_PATCHES) $(@D) $(@D)/debian/patches *.dpatch; \ + fi +endef + +NETCAT_OPENBSD_POST_PATCH_HOOKS += NETCAT_OPENBSD_APPLY_DEBIAN_PATCHES + +define NETCAT_OPENBSD_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define NETCAT_OPENBSD_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/nc $(TARGET_DIR)/usr/bin/nc +endef + +$(eval $(generic-package)) diff --git a/package/netcat/0001-signed-bit-counting.patch b/package/netcat/0001-signed-bit-counting.patch new file mode 100644 index 0000000000..e29da311a9 --- /dev/null +++ b/package/netcat/0001-signed-bit-counting.patch @@ -0,0 +1,30 @@ +# Fix the endian-specific bit-counting code so that it works. +# SF:1068324 "netcat_flag_count() fix" +# http://sourceforge.net/tracker/?func=detail&aid=1205729&group_id=52204&atid=466046 +# SF:1205729 "doen't work on arm linux platform": +# http://sourceforge.net/tracker/?func=detail&aid=1068324&group_id=52204&atid=466046 + +Index: netcat-0.7.1/src/flagset.c +=================================================================== +--- netcat-0.7.1.orig/src/flagset.c 2010-07-19 13:51:46.000000000 +0100 ++++ netcat-0.7.1/src/flagset.c 2010-07-19 13:52:27.000000000 +0100 +@@ -134,7 +134,7 @@ + + int netcat_flag_count(void) + { +- register char c; ++ register unsigned char c; + register int i; + int ret = 0; + +@@ -154,8 +154,8 @@ + Assumed that the bit number 1 is the sign, and that we will shift the + bit 1 (or the bit that takes its place later) until the the most right, + WHY it has to keep the wrong sign? */ +- ret -= (c >> 7); +- c <<= 1; ++ ret += c&1; ++ c>>=1; + } + } + diff --git a/package/netcat/Config.in b/package/netcat/Config.in new file mode 100644 index 0000000000..88273ffd50 --- /dev/null +++ b/package/netcat/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_NETCAT + bool "netcat" + help + Netcat is a featured networking utility which reads and writes data + across network connections, using the TCP/IP protocol. + It is designed to be a reliable "back-end" tool that can be used + directly or easily driven by other programs and scripts. At the + same time, it is a feature-rich network debugging and exploration + tool, since it can create almost any kind of connection you would + need and has several interesting built-in capabilities. + + http://netcat.sourceforge.net/download.php diff --git a/package/netcat/netcat.hash b/package/netcat/netcat.hash new file mode 100644 index 0000000000..e20c4c297a --- /dev/null +++ b/package/netcat/netcat.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 30719c9a4ffbcf15676b8f528233ccc54ee6cba96cb4590975f5fd60c68a066f netcat-0.7.1.tar.gz diff --git a/package/netcat/netcat.mk b/package/netcat/netcat.mk new file mode 100644 index 0000000000..5d01ebbad6 --- /dev/null +++ b/package/netcat/netcat.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# netcat +# +################################################################################ + +NETCAT_VERSION = 0.7.1 +NETCAT_SITE = http://downloads.sourceforge.net/project/netcat/netcat/$(NETCAT_VERSION) +NETCAT_LICENSE = GPLv2+ +NETCAT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/netperf/Config.in b/package/netperf/Config.in new file mode 100644 index 0000000000..2f36b1b0da --- /dev/null +++ b/package/netperf/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_NETPERF + bool "netperf" + help + Network performance benchmark tool + + http://www.netperf.org/ diff --git a/package/netperf/netperf.hash b/package/netperf/netperf.hash new file mode 100644 index 0000000000..f97274015c --- /dev/null +++ b/package/netperf/netperf.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 842af17655835c8be7203808c3393e6cb327a8067f3ed1f1053eb78b4e40375a netperf-2.7.0.tar.bz2 diff --git a/package/netperf/netperf.mk b/package/netperf/netperf.mk new file mode 100644 index 0000000000..8b2280830f --- /dev/null +++ b/package/netperf/netperf.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# netperf +# +################################################################################ + +NETPERF_VERSION = 2.7.0 +NETPERF_SITE = ftp://ftp.netperf.org/netperf +NETPERF_SOURCE = netperf-$(NETPERF_VERSION).tar.bz2 +# gcc 5+ defaults to gnu99 which breaks netperf +NETPERF_CONF_ENV = \ + ac_cv_func_setpgrp_void=set \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu89" +NETPERF_CONF_OPTS = --enable-demo=yes +NETPERF_LICENSE = netperf license +NETPERF_LICENSE_FILES = COPYING + +define NETPERF_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/src/netperf \ + $(TARGET_DIR)/usr/bin/netperf + $(INSTALL) -m 0755 $(@D)/src/netserver \ + $(TARGET_DIR)/usr/bin/netserver +endef + +$(eval $(autotools-package)) diff --git a/package/netplug/0001-makefile-flags.patch b/package/netplug/0001-makefile-flags.patch new file mode 100644 index 0000000000..b2468f8c84 --- /dev/null +++ b/package/netplug/0001-makefile-flags.patch @@ -0,0 +1,21 @@ +Preserve the cflags settings, because buildroot clobbers them. + +--- a/Makefile 2010-10-05 00:06:38.000000000 -0700 ++++ b/Makefile 2010-10-05 00:15:27.000000000 -0700 +@@ -11,11 +11,14 @@ mandir ?= $(prefix)/usr/share/man + + install_opts := + +-CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \ ++NETPLUG_CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \ + -DNP_SCRIPT_DIR='"$(scriptdir)"' -ggdb3 -O3 -DNP_VERSION='"$(version)"' + ++%.o: %.c ++ $(CC) $(NETPLUG_CFLAGS) $(CFLAGS) -c -o $@ $< ++ + netplugd: config.o netlink.o lib.o if_info.o main.o +- $(CC) $(LDFLAGS) -o $@ $^ ++ $(CC) $(LDFLAGS) -o $@ $(NETPLUG_CFLAGS) $^ + + install: + install -d $(install_opts) -m 755 \ diff --git a/package/netplug/Config.in b/package/netplug/Config.in new file mode 100644 index 0000000000..593c08a948 --- /dev/null +++ b/package/netplug/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_NETPLUG + bool "netplug" + depends on BR2_USE_MMU # fork() + help + A Linux daemon that manages network interfaces in + response to network cables being plugged in and out. + + http://www.red-bean.com/~bos/ diff --git a/package/netplug/S29netplug b/package/netplug/S29netplug new file mode 100755 index 0000000000..88f933d556 --- /dev/null +++ b/package/netplug/S29netplug @@ -0,0 +1,69 @@ +#!/bin/sh +# +# netplugd This shell script takes care of starting and stopping +# the network plug management daemon. +# +# chkconfig: - 11 89 +# description: netplugd is a daemon for managing non-static network \ +# interfaces. +# processname: netplugd +# pidfile: /var/run/netplugd.pid + +# Copyright 2003 Key Research, Inc. + +# Source function library. +if [ -f /etc/init.d/functions ]; then + . /etc/init.d/functions +elif [ -f /etc/rc.d/init.d/functions ]; then + . /etc/rc.d/init.d/functions +fi + +# Source networking configuration. +if [ -f /etc/sysconfig/network ]; then + . /etc/sysconfig/network + + # Check that networking is up. + [ ${NETWORKING} = "no" ] && exit 0 +elif [ ! -f /etc/network/interfaces ]; then + # No network support + exit 0 +fi + +[ -x /sbin/netplugd ] || exit 0 + +if [ -f /etc/sysconfig/netplugd ]; then + . /etc/sysconfig/netplugd +fi + +# See how we were called. +case "$1" in + start) + # Start daemon. + printf "Starting network plug daemon: " + start-stop-daemon -S -q -p /var/run/netplugd.pid -x /sbin/netplugd ${NETPLUGDARGS} + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/netplugd + ;; + stop) + # Stop daemon. + printf "Shutting down network plug daemon: " + start-stop-daemon -K -n netplugd + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/netplugd + ;; + restart|reload) + $0 stop + $0 start + ;; + condrestart) + [ -f /var/lock/subsys/netplugd ] && $0 restart || : + ;; + *) + echo "Usage: $0 {start|stop|restart}" + RETVAL=1 + ;; +esac + +exit $RETVAL diff --git a/package/netplug/netplug-script b/package/netplug/netplug-script new file mode 100755 index 0000000000..1af714d69b --- /dev/null +++ b/package/netplug/netplug-script @@ -0,0 +1,57 @@ +#!/bin/sh +# +# netplug - policy agent for netplugd +# +# Copyright 2003 Key Research, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License, version 2, as +# published by the Free Software Foundation. You are forbidden from +# redistributing or modifying it under the terms of any other license, +# including other versions of the GNU General Public License. +# +# 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. + + +PATH=/usr/bin:/bin:/usr/sbin:/sbin +export PATH + +dev="$1" +action="$2" + +case "$action" in +in) + if [ -x /sbin/ifup ]; then + exec /sbin/ifup $dev + else + echo "Please teach me how to plug in an interface!" 1>&2 + exit 1 + fi + ;; +out) + if [ -x /sbin/ifdown ]; then + # At least on Fedora Core 1, the call to ip addr flush infloops + # /sbin/ifdown $dev && exec /sbin/ip addr flush $dev + exec /sbin/ifdown $dev + else + echo "Please teach me how to unplug an interface!" 1>&2 + exit 1 + fi + ;; +probe) + # exec /sbin/ip link set $dev up >/dev/null 2>&1 + if [ -x /sbin/ifconfig ]; then + exec /sbin/ifconfig $dev up >/dev/null 2>&1 + else + echo "Failed to probe an interface!" 1>&2 + exit 1 + fi + ;; +*) + echo "I have been called with a funny action of '%s'!" 1>&2 + exit 1 + ;; +esac diff --git a/package/netplug/netplug.hash b/package/netplug/netplug.hash new file mode 100644 index 0000000000..16a98b7d66 --- /dev/null +++ b/package/netplug/netplug.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 5180dfd9a7d3d0633a027b0a04f01b45a6a64623813cd48bd54423b90814864e netplug-1.2.9.2.tar.bz2 diff --git a/package/netplug/netplug.mk b/package/netplug/netplug.mk new file mode 100644 index 0000000000..aeebcad2ee --- /dev/null +++ b/package/netplug/netplug.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# netplug +# +################################################################################ + +NETPLUG_VERSION = 1.2.9.2 +NETPLUG_SOURCE = netplug-$(NETPLUG_VERSION).tar.bz2 +NETPLUG_SITE = http://www.red-bean.com/~bos/netplug +NETPLUG_LICENSE = GPLv2 +NETPLUG_LICENSE_FILES = COPYING + +define NETPLUG_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define NETPLUG_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install +endef + +define NETPLUG_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/netplug/S29netplug \ + $(TARGET_DIR)/etc/init.d/S29netplug +endef + +define NETPLUG_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/netplug/netplug.service \ + $(TARGET_DIR)/usr/lib/systemd/system/netplug.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/netplug.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/netplug.service +endef + +$(eval $(generic-package)) diff --git a/package/netplug/netplug.service b/package/netplug/netplug.service new file mode 100644 index 0000000000..017a21f3f0 --- /dev/null +++ b/package/netplug/netplug.service @@ -0,0 +1,10 @@ +[Unit] +Description=Network cable hotplug management daemon +After=syslog.target network.target + +[Service] +ExecStart=/sbin/netplugd -F +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/netsniff-ng/Config.in b/package/netsniff-ng/Config.in new file mode 100644 index 0000000000..5d2f5dfebb --- /dev/null +++ b/package/netsniff-ng/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_NETSNIFF_NG + bool "netsniff-ng" + select BR2_PACKAGE_LIBNL + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBCLI + select BR2_PACKAGE_LIBNETFILTER_CONNTRACK + select BR2_PACKAGE_LIBURCU + select BR2_PACKAGE_LIBNET + # Build with uClibc fails due to missing ceill() + # Build with musl fails due to various header issues + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS + help + netsniff-ng is a free, performant Linux network analyzer and + networking toolkit. If you will, the Swiss army knife for + network packets. + +comment "netsniff-ng needs an (e)glibc toolchain w/ threads, headers >= 3.0" + depends on BR2_PACKAGE_LIBURCU_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_USES_GLIBC \ + || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 diff --git a/package/netsniff-ng/netsniff-ng.hash b/package/netsniff-ng/netsniff-ng.hash new file mode 100644 index 0000000000..52124977ed --- /dev/null +++ b/package/netsniff-ng/netsniff-ng.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 902661bcdbc129c6a6c1f69a72f921fffc9e765d005568dc153f09ca0097c180 netsniff-ng-v0.6.1.tar.gz diff --git a/package/netsniff-ng/netsniff-ng.mk b/package/netsniff-ng/netsniff-ng.mk new file mode 100644 index 0000000000..ad97a887e4 --- /dev/null +++ b/package/netsniff-ng/netsniff-ng.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# netsniff-ng +# +################################################################################ + +NETSNIFF_NG_VERSION = v0.6.1 +NETSNIFF_NG_SITE = $(call github,netsniff-ng,netsniff-ng,$(NETSNIFF_NG_VERSION)) +NETSNIFF_NG_LICENSE = GPLv2 +NETSNIFF_NG_LICENSE_FILES = README COPYING +# Prevent netsniff-ng configure script from finding a host installed nacl +NETSNIFF_NG_CONF_ENV = \ + NACL_INC_DIR=/dev/null \ + NACL_LIB_DIR=/dev/null +NETSNIFF_NG_DEPENDENCIES = \ + libnl libpcap libcli libnetfilter_conntrack \ + liburcu libnet + +ifeq ($(BR2_PACKAGE_GEOIP),y) +NETSNIFF_NG_DEPENDENCIES += geoip +endif + +ifeq ($(BR2_PACKAGE_NCURSES),y) +NETSNIFF_NG_DEPENDENCIES += ncurses +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +NETSNIFF_NG_DEPENDENCIES += zlib +endif + +# hand-written configure script and makefile +define NETSNIFF_NG_CONFIGURE_CMDS + (cd $(@D); \ + $(NETSNIFF_NG_CONF_ENV) \ + $(TARGET_CONFIGURE_ARGS) \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure \ + --prefix=$(TARGET_DIR)/usr \ + ) +endef + +define NETSNIFF_NG_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define NETSNIFF_NG_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + PREFIX=$(TARGET_DIR)/usr ETCDIR=$(TARGET_DIR)/etc install -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/netsnmp/Config.in b/package/netsnmp/Config.in new file mode 100644 index 0000000000..57cc6b93fd --- /dev/null +++ b/package/netsnmp/Config.in @@ -0,0 +1,60 @@ +config BR2_PACKAGE_NETSNMP + bool "netsnmp" + depends on BR2_USE_MMU # fork() + help + Suite of applications used to implement SNMP v1, SNMP v2c, and + SNMP v3 using both IPv4 and IPv6. + + http://net-snmp.sourceforge.net/ + +if BR2_PACKAGE_NETSNMP + +config BR2_PACKAGE_NETSNMP_SERVER + bool "server" + default y + help + The snmpd server. + +config BR2_PACKAGE_NETSNMP_CLIENTS + bool "clients" + default y + help + The net-snmp clients (snmpget, snmpwalk, etc). + +config BR2_PACKAGE_NETSNMP_ENABLE_MIBS + bool "Install MIB files on target and enable MIB loading code" + default y + help + The net-snmp package contains a selection of MIB files. + Say yes if you want those MIB files installed on the target + and enable the code that parses the MIB files. + +config BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES + string "Build with these MIB modules" + default "host ucd-snmp/dlmod agentx" if !BR2_STATIC_LIBS + default "host agentx" if BR2_STATIC_LIBS + help + Specify which MIB modules to include. + +config BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES + string "Build without these MIB modules" + default "disman/event disman/schedule utilities" + help + Specify which MIB modules to exclude. + +config BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING + bool "Enable debugging code" + help + By default net-snmp is compiled without debugging support + (--disable-debugging). Enable this options if you need debugging + support, including the ability to log with DEBUGMSG(), + DEBUGMSGTL() and companion macros. + +config BR2_PACKAGE_NETSNMP_OPENSSL_INTERNAL + bool "Enable minimal internal OpenSSL code" + depends on !BR2_PACKAGE_OPENSSL + help + Enable a minimal internal copy of OpenSSL usable for USM + security. It will not enable the usage of SNMP over (D)TLS. + +endif diff --git a/package/netsnmp/S59snmpd b/package/netsnmp/S59snmpd new file mode 100755 index 0000000000..4eea512291 --- /dev/null +++ b/package/netsnmp/S59snmpd @@ -0,0 +1,93 @@ +#! /bin/sh -e +### BEGIN INIT INFO +# Provides: snmpd snmptrapd +# Required-Start: $network $local_fs +# Required-Stop: $network $local_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 6 +# Short-Description: SNMP agents +# Description: NET SNMP (Simple Network Management Protocol) Agents +### END INIT INFO +# +# Author: Jochen Friedrich +# +set -e + +export PATH=/sbin:/usr/sbin:/bin:/usr/bin + +test -x /usr/sbin/snmpd || exit 0 +test -x /usr/sbin/snmptrapd || exit 0 + +# Defaults +export MIBDIRS=/usr/share/snmp/mibs +SNMPDRUN=yes +SNMPDOPTS='-Lsd -Lf /dev/null -p /var/run/snmpd.pid 127.0.0.1' +TRAPDRUN=no +TRAPDOPTS='-Lsd -p /var/run/snmptrapd.pid' + +# Reads config file (will override defaults above) +[ -r /etc/default/snmpd ] && . /etc/default/snmpd + +ssd_oknodo="-o" + +# Cd to / before starting any daemons. +cd / + +# Create compatibility link to old AgentX socket location +if [ "$SNMPDCOMPAT" = "yes" ]; then + ln -sf /var/agentx/master /var/run/agentx +fi + +case "$1" in + start) + printf "Starting network management services:" + if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then + start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS + printf " snmpd" + fi + if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then + start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS + printf " snmptrapd" + fi + echo "." + ;; + stop) + printf "Stopping network management services:" + start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd + printf " snmpd" + start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd + printf " snmptrapd" + echo "." + ;; + restart) + printf "Restarting network management services:" + start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmpd + start-stop-daemon -q -K $ssd_oknodo -x /usr/sbin/snmptrapd + # Allow the daemons time to exit completely. + sleep 2 + if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then + start-stop-daemon -q -S -x /usr/sbin/snmpd -- $SNMPDOPTS + printf " snmpd" + fi + if [ "$TRAPDRUN" = "yes" -a -f /etc/snmp/snmptrapd.conf ]; then + # Allow snmpd time to start up. + sleep 1 + start-stop-daemon -q -S -x /usr/sbin/snmptrapd -- $TRAPDOPTS + printf " snmptrapd" + fi + echo "." + ;; + reload|force-reload) + printf "Reloading network management services:" + if [ "$SNMPDRUN" = "yes" -a -f /etc/snmp/snmpd.conf ]; then + start-stop-daemon -q -K -s 1 -p /var/run/snmpd.pid -x /usr/sbin/snmpd + printf " snmpd" + fi + echo "." + ;; + *) + echo "Usage: /etc/init.d/snmpd {start|stop|restart|reload|force-reload}" + exit 1 +esac + +exit 0 diff --git a/package/netsnmp/netsnmp.hash b/package/netsnmp/netsnmp.hash new file mode 100644 index 0000000000..2c18441fed --- /dev/null +++ b/package/netsnmp/netsnmp.hash @@ -0,0 +1,4 @@ +# From http://sourceforge.net/projects/net-snmp/files/net-snmp/5.7.3/ +md5 d4a3459e1577d0efa8d96ca70a885e53 net-snmp-5.7.3.tar.gz +sha1 97dc25077257680815de44e34128d365c76bd839 net-snmp-5.7.3.tar.gz + diff --git a/package/netsnmp/netsnmp.mk b/package/netsnmp/netsnmp.mk new file mode 100644 index 0000000000..48273b51bc --- /dev/null +++ b/package/netsnmp/netsnmp.mk @@ -0,0 +1,119 @@ +################################################################################ +# +# netsnmp +# +################################################################################ + +NETSNMP_VERSION = 5.7.3 +NETSNMP_SITE = http://downloads.sourceforge.net/project/net-snmp/net-snmp/$(NETSNMP_VERSION) +NETSNMP_SOURCE = net-snmp-$(NETSNMP_VERSION).tar.gz +NETSNMP_LICENSE = Various BSD-like +NETSNMP_LICENSE_FILES = COPYING +NETSNMP_INSTALL_STAGING = YES +NETSNMP_CONF_ENV = ac_cv_NETSNMP_CAN_USE_SYSCTL=no +NETSNMP_CONF_OPTS = \ + --with-persistent-directory=/var/lib/snmp \ + --with-defaults \ + --enable-mini-agent \ + --without-rpm \ + --with-logfile=none \ + --without-kmem-usage \ + --enable-as-needed \ + --without-perl-modules \ + --disable-embedded-perl \ + --disable-perl-cc-checks \ + --disable-scripts \ + --with-default-snmp-version="1" \ + --enable-silent-libtool \ + --enable-mfd-rewrites \ + --with-sys-contact="root@localhost" \ + --with-sys-location="Unknown" \ + --with-mib-modules="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITH_MIB_MODULES))" \ + --with-out-mib-modules="$(call qstrip,$(BR2_PACKAGE_NETSNMP_WITHOUT_MIB_MODULES))" \ + --with-out-transports="Unix" \ + --disable-manuals +NETSNMP_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LIB_LDCONFIG_CMD=true install +NETSNMP_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) LIB_LDCONFIG_CMD=true install +NETSNMP_MAKE = $(MAKE1) +NETSNMP_CONFIG_SCRIPTS = net-snmp-config + +NETSNMP_BLOAT_MIBS = BRIDGE DISMAN-EVENT DISMAN-SCHEDULE DISMAN-SCRIPT EtherLike RFC-1215 RFC1155-SMI RFC1213 SCTP SMUX + +ifeq ($(BR2_ENDIAN),"BIG") +NETSNMP_CONF_OPTS += --with-endianness=big +else +NETSNMP_CONF_OPTS += --with-endianness=little +endif + +# OpenSSL +ifeq ($(BR2_PACKAGE_OPENSSL),y) +NETSNMP_DEPENDENCIES += openssl +NETSNMP_CONF_OPTS += \ + --with-openssl=$(STAGING_DIR)/usr/include/openssl \ + --with-security-modules="tsm,usm" \ + --with-transports="DTLSUDP,TLSTCP" +ifeq ($(BR2_STATIC_LIBS),y) +# openssl uses zlib, so we need to explicitly link with it when static +NETSNMP_CONF_ENV += LIBS=-lz +endif +else ifeq ($(BR2_PACKAGE_NETSNMP_OPENSSL_INTERNAL),y) +NETSNMP_CONF_OPTS += --with-openssl=internal +else +NETSNMP_CONF_OPTS += --without-openssl +endif + +# There's no option to forcibly enable or disable it +ifeq ($(BR2_PACKAGE_PCIUTILS),y) +NETSNMP_DEPENDENCIES += pciutils +endif + +# For ucd-snmp/lmsensorsMib +ifeq ($(BR2_PACKAGE_LM_SENSORS),y) +NETSNMP_DEPENDENCIES += lm-sensors +endif + +ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_MIBS),y) +NETSNMP_CONF_OPTS += --disable-mib-loading +NETSNMP_CONF_OPTS += --disable-mibs +endif + +ifneq ($(BR2_PACKAGE_NETSNMP_ENABLE_DEBUGGING),y) +NETSNMP_CONF_OPTS += --disable-debugging +endif + +ifeq ($(BR2_PACKAGE_NETSNMP_SERVER),y) +NETSNMP_CONF_OPTS += --enable-agent +else +NETSNMP_CONF_OPTS += --disable-agent +endif + +ifeq ($(BR2_PACKAGE_NETSNMP_CLIENTS),y) +NETSNMP_CONF_OPTS += --enable-applications +else +NETSNMP_CONF_OPTS += --disable-applications +endif + +define NETSNMP_REMOVE_BLOAT_MIBS + for mib in $(NETSNMP_BLOAT_MIBS); do \ + rm -f $(TARGET_DIR)/usr/share/snmp/mibs/$$mib-MIB.txt; \ + done +endef + +NETSNMP_POST_INSTALL_TARGET_HOOKS += NETSNMP_REMOVE_BLOAT_MIBS + +ifeq ($(BR2_PACKAGE_NETSNMP_SERVER),y) +define NETSNMP_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/netsnmp/S59snmpd \ + $(TARGET_DIR)/etc/init.d/S59snmpd +endef +endif + +define NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP + $(SED) "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \ + -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \ + $(STAGING_DIR)/usr/bin/net-snmp-config +endef + +NETSNMP_POST_INSTALL_STAGING_HOOKS += NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP + +$(eval $(autotools-package)) diff --git a/package/netstat-nat/Config.in b/package/netstat-nat/Config.in new file mode 100644 index 0000000000..6afcf89e3b --- /dev/null +++ b/package/netstat-nat/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_NETSTAT_NAT + bool "netstat-nat" + help + Displays NAT connections + + http://tweegy.nl/projects/netstat-nat/ diff --git a/package/netstat-nat/netstat-nat.hash b/package/netstat-nat/netstat-nat.hash new file mode 100644 index 0000000000..924da129f7 --- /dev/null +++ b/package/netstat-nat/netstat-nat.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 e945faa283a49f33af15de915a949c9273a230fc17154925364c547adab676ca netstat-nat-1.4.10.tar.gz diff --git a/package/netstat-nat/netstat-nat.mk b/package/netstat-nat/netstat-nat.mk new file mode 100644 index 0000000000..9a60f123b6 --- /dev/null +++ b/package/netstat-nat/netstat-nat.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# netstat-nat +# +################################################################################ + +NETSTAT_NAT_VERSION = 1.4.10 +NETSTAT_NAT_SITE = http://tweegy.nl/download +NETSTAT_NAT_LICENSE = GPLv2+ +NETSTAT_NAT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/netsurf-buildsystem/netsurf-buildsystem.mk b/package/netsurf-buildsystem/netsurf-buildsystem.mk new file mode 100644 index 0000000000..347885072a --- /dev/null +++ b/package/netsurf-buildsystem/netsurf-buildsystem.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# netsurf-buildsystem +# +################################################################################ + +NETSURF_BUILDSYSTEM_VERSION = 7574b41345968b5f7e9ca5875faccb1478ce0555 +NETSURF_BUILDSYSTEM_SITE = http://git.netsurf-browser.org/buildsystem.git +NETSURF_BUILDSYSTEM_SITE_METHOD = git +NETSURF_BUILDSYSTEM_LICENSE = MIT, BSD-3c (for llvm/* files) +NETSURF_BUILDSYSTEM_LICENSE_FILES = llvm/LICENSE.TXT + +NETSURF_BUILDSYSTEM_INSTALL_DIR = $(HOST_DIR)/usr/share/netsurf-buildsystem + +define HOST_NETSURF_BUILDSYSTEM_INSTALL_CMDS + mkdir -p $(NETSURF_BUILDSYSTEM_INSTALL_DIR) + cp -dpfr $(@D)/* $(NETSURF_BUILDSYSTEM_INSTALL_DIR) +endef + +$(eval $(host-generic-package)) diff --git a/package/nettle/0001-disable-testsuite-examples.patch b/package/nettle/0001-disable-testsuite-examples.patch new file mode 100644 index 0000000000..82d97d5d21 --- /dev/null +++ b/package/nettle/0001-disable-testsuite-examples.patch @@ -0,0 +1,20 @@ +Makefile: disable testsuite and example + +We do not need them in the context of Buildroot. + +Also, they break for a shared-only build (but it's fixed in patch 0001). + +Signed-off-by: "Yann E. MORIN" + +diff -durN nettle-2.7.1.orig/Makefile.in nettle-2.7.1/Makefile.in +--- nettle-2.7.1.orig/Makefile.in 2013-05-28 16:21:54.000000000 +0200 ++++ nettle-2.7.1/Makefile.in 2014-12-12 19:57:12.499805574 +0100 +@@ -16,7 +16,7 @@ + + OPT_ASM_SOURCES = @OPT_ASM_SOURCES@ + +-SUBDIRS = tools testsuite examples ++SUBDIRS = tools + + include config.make + diff --git a/package/nettle/Config.in b/package/nettle/Config.in new file mode 100644 index 0000000000..55776216e4 --- /dev/null +++ b/package/nettle/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_NETTLE + bool "nettle" + select BR2_PACKAGE_GMP + help + Nettle is a cryptographic library that is designed to fit easily + in more or less any context: In crypto toolkits for object-oriented + languages, in applications like LSH or GNUPG, or even in kernel space + + http://www.lysator.liu.se/~nisse/nettle/ diff --git a/package/nettle/nettle.hash b/package/nettle/nettle.hash new file mode 100644 index 0000000000..6332e13a63 --- /dev/null +++ b/package/nettle/nettle.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 ea4283def236413edab5a4cf9cf32adf540c8df1b9b67641cfc2302fca849d97 nettle-3.2.tar.gz diff --git a/package/nettle/nettle.mk b/package/nettle/nettle.mk new file mode 100644 index 0000000000..c133839e52 --- /dev/null +++ b/package/nettle/nettle.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# nettle +# +################################################################################ + +NETTLE_VERSION = 3.2 +NETTLE_SITE = http://www.lysator.liu.se/~nisse/archive +NETTLE_DEPENDENCIES = gmp +NETTLE_INSTALL_STAGING = YES +NETTLE_LICENSE = Dual GPLv2+/LGPLv3+ +NETTLE_LICENSE_FILES = COPYING.LESSERv3 COPYINGv2 +# don't include openssl support for (unused) examples as it has problems +# with static linking +NETTLE_CONF_OPTS = --disable-openssl + +# ARM assembly requires v6+ ISA +ifeq ($(BR2_ARM_CPU_ARMV4)$(BR2_ARM_CPU_ARMV5),y) +NETTLE_CONF_OPTS += --disable-assembler +endif + +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +NETTLE_CONF_OPTS += --enable-arm-neon +else +NETTLE_CONF_OPTS += --disable-arm-neon +endif + +$(eval $(autotools-package)) diff --git a/package/network-manager/0001-platform-move-link_get_user_ipv6ll_enabled-to-nm-platform-linux.patch b/package/network-manager/0001-platform-move-link_get_user_ipv6ll_enabled-to-nm-platform-linux.patch new file mode 100644 index 0000000000..4aebaef820 --- /dev/null +++ b/package/network-manager/0001-platform-move-link_get_user_ipv6ll_enabled-to-nm-platform-linux.patch @@ -0,0 +1,87 @@ +From: Lubomir Rintel +Date: Mon, 20 Jul 2015 11:01:04 +0200 +Subject: [PATCH] platform: move link_get_user_ipv6ll_enabled() to nm-platform-linux +Source: https://mail.gnome.org/archives/networkmanager-list/2015-July/msg00028.html + +This fixes build error kernels headers < 3.17. + +Reported-by: Petr Vorel +Signed-off-by: Lubomir Rintel +Signed-off-by: Petr Vorel +--- + src/platform/nm-linux-platform.c | 16 ++++++++++++++++ + src/platform/nm-platform.c | 11 ++--------- + src/platform/nm-platform.h | 1 + + 3 files changed, 19 insertions(+), 9 deletions(-) + +diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c +index f3a9254..b6b8e33 100644 +--- a/src/platform/nm-linux-platform.c ++++ b/src/platform/nm-linux-platform.c +@@ -2987,6 +2987,21 @@ link_set_user_ipv6ll_enabled (NMPlatform *platform, int ifindex, gboolean enable + } + + static gboolean ++link_get_user_ipv6ll_enabled (NMPlatform *platform, int ifindex) ++{ ++#if HAVE_LIBNL_INET6_ADDR_GEN_MODE ++ { ++ const NMPlatformLink *pllink; ++ ++ pllink = nm_platform_link_get (platform, ifindex); ++ if (pllink && pllink->inet6_addr_gen_mode_inv) ++ return _nm_platform_uint8_inv (pllink->inet6_addr_gen_mode_inv) == IN6_ADDR_GEN_MODE_NONE; ++ } ++#endif ++ return FALSE; ++} ++ ++static gboolean + link_supports_carrier_detect (NMPlatform *platform, int ifindex) + { + const char *name = nm_platform_link_get_name (platform, ifindex); +@@ -4968,6 +4968,7 @@ + platform_class->link_get_udev_device = link_get_udev_device; + + platform_class->link_set_user_ipv6ll_enabled = link_set_user_ipv6ll_enabled; ++ platform_class->link_get_user_ipv6ll_enabled = link_get_user_ipv6ll_enabled; + + platform_class->link_set_address = link_set_address; + platform_class->link_get_permanent_address = link_get_permanent_address; + +diff --git a/src/platform/nm-platform.c b/src/platform/nm-platform.c +index 8803377..ee4b1a1 100644 +--- a/src/platform/nm-platform.c ++++ b/src/platform/nm-platform.c +@@ -965,15 +965,8 @@ + + g_return_val_if_fail (ifindex >= 0, FALSE); + +-#if HAVE_LIBNL_INET6_ADDR_GEN_MODE +- { +- const NMPlatformLink *pllink; +- +- pllink = nm_platform_link_get (self, ifindex); +- if (pllink && pllink->inet6_addr_gen_mode_inv) +- return _nm_platform_uint8_inv (pllink->inet6_addr_gen_mode_inv) == IN6_ADDR_GEN_MODE_NONE; +- } +-#endif ++ if (klass->link_get_user_ipv6ll_enabled) ++ return klass->link_get_user_ipv6ll_enabled (self, ifindex); + return FALSE; + } + +diff --git a/src/platform/nm-platform.h b/src/platform/nm-platform.h +index 16eb351..9ef4080 100644 +--- a/src/platform/nm-platform.h ++++ b/src/platform/nm-platform.h +@@ -446,6 +446,7 @@ + GObject *(*link_get_udev_device) (NMPlatform *self, int ifindex); + + gboolean (*link_set_user_ipv6ll_enabled) (NMPlatform *, int ifindex, gboolean enabled); ++ gboolean (*link_get_user_ipv6ll_enabled) (NMPlatform *, int ifindex); + + gboolean (*link_get_permanent_address) (NMPlatform *, + int ifindex, +-- +2.4.3 diff --git a/package/network-manager/Config.in b/package/network-manager/Config.in new file mode 100644 index 0000000000..8b4607c7ce --- /dev/null +++ b/package/network-manager/Config.in @@ -0,0 +1,58 @@ +config BR2_PACKAGE_NETWORK_MANAGER + bool "networkmanager" + depends on BR2_USE_MMU # dbus + depends on BR2_PACKAGE_HAS_UDEV + # Tested with 3.2, but may even work with earlier versions + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + depends on BR2_TOOLCHAIN_USES_GLIBC # CLOCK_BOOTTIME, IPTOS_CLASS_* + select BR2_PACKAGE_DHCPCD if !BR2_PACKAGE_DHCP_CLIENT + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_DBUS_GLIB + select BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBNL + select BR2_PACKAGE_LIBGUDEV + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_WIRELESS_TOOLS + select BR2_PACKAGE_WIRELESS_TOOLS_LIB + select BR2_PACKAGE_READLINE + select BR2_PACKAGE_LIBNDP + help + NetworkManager is a set of co-operative tools that make networking + simple and straightforward. Whether WiFi, wired, 3G, or Bluetooth, + NetworkManager allows you to quickly move from one network to + another: once a network has been configured and joined once, it + can be detected and re-joined automatically the next time it's + available. + + http://projects.gnome.org/NetworkManager/ + +if BR2_PACKAGE_NETWORK_MANAGER + +config BR2_PACKAGE_NETWORK_MANAGER_TUI + bool "nmtui support" + select BR2_PACKAGE_NEWT + help + This option enables terminal based UI + +config BR2_PACKAGE_NETWORK_MANAGER_MODEM_MANAGER + bool "modem-manager support" + select BR2_PACKAGE_MODEM_MANAGER + select BR2_PACKAGE_MODEM_MANAGER_LIBMBIM + select BR2_PACKAGE_MODEM_MANAGER_LIBQMI + help + This option enables support for ModemManager + +config BR2_PACKAGE_NETWORK_MANAGER_PPPD + bool "pppd support" + select BR2_PACKAGE_PPPD + help + This option enables support for PPPD daemon +endif + +comment "NetworkManager needs udev /dev management and a (e)glibc toolchain w/ headers >= 3.7" + depends on BR2_USE_MMU + depends on !BR2_PACKAGE_HAS_UDEV || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 || \ + !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/network-manager/S45network-manager b/package/network-manager/S45network-manager new file mode 100755 index 0000000000..f39e20d73b --- /dev/null +++ b/package/network-manager/S45network-manager @@ -0,0 +1,46 @@ +#!/bin/sh + +prefix=/usr +exec_prefix=/usr +sbindir=${exec_prefix}/sbin + +NETWORKMANAGER_BIN=${sbindir}/NetworkManager + +[ -x $NETWORKMANAGER_BIN ] || exit 0 + +PID=`pidof NetworkManager` +case "$1" in + start) + printf "Starting NetworkManager ... " + [ ! -d /var/run/NetworkManager ] && install -d /var/run/NetworkManager + if [ -z "$PID" ]; then + $NETWORKMANAGER_BIN + fi + if [ ! -z "$PID" -o $? -gt 0 ]; then + echo "failed!" + else + echo "done." + fi + ;; + stop) + printf "Stopping NetworkManager ... " + [ ! -z "$PID" ] && kill $PID > /dev/null 2>&1 + if [ $? -gt 0 ]; then + echo "failed!" + else + echo "done." + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart|sleep|wake}" + ;; +esac +exit 0 + + + diff --git a/package/network-manager/network-manager.hash b/package/network-manager/network-manager.hash new file mode 100644 index 0000000000..ab601bc16b --- /dev/null +++ b/package/network-manager/network-manager.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/1.0/NetworkManager-1.0.12.sha256sum +sha256 3a470f8c60109b1acb5784ddc2423501706b5fe34c793a6faee87e591eb04a9e NetworkManager-1.0.12.tar.xz diff --git a/package/network-manager/network-manager.mk b/package/network-manager/network-manager.mk new file mode 100644 index 0000000000..12b8f3c51b --- /dev/null +++ b/package/network-manager/network-manager.mk @@ -0,0 +1,88 @@ +################################################################################ +# +# network-manager +# +################################################################################ + +NETWORK_MANAGER_VERSION_MAJOR = 1.0 +NETWORK_MANAGER_VERSION = $(NETWORK_MANAGER_VERSION_MAJOR).12 +NETWORK_MANAGER_SOURCE = NetworkManager-$(NETWORK_MANAGER_VERSION).tar.xz +NETWORK_MANAGER_SITE = http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/$(NETWORK_MANAGER_VERSION_MAJOR) +NETWORK_MANAGER_INSTALL_STAGING = YES +NETWORK_MANAGER_DEPENDENCIES = host-pkgconf udev dbus-glib libnl gnutls \ + libgcrypt wireless_tools util-linux host-intltool readline libndp libgudev +NETWORK_MANAGER_LICENSE = GPLv2+ (app), LGPLv2+ (libnm-util) +NETWORK_MANAGER_LICENSE_FILES = COPYING libnm-util/COPYING + +NETWORK_MANAGER_CONF_ENV = \ + ac_cv_path_LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config \ + ac_cv_file__etc_fedora_release=no \ + ac_cv_file__etc_mandriva_release=no \ + ac_cv_file__etc_debian_version=no \ + ac_cv_file__etc_redhat_release=no \ + ac_cv_file__etc_SuSE_release=no + + +NETWORK_MANAGER_CONF_OPTS = \ + --mandir=$(STAGING_DIR)/usr/man/ \ + --disable-tests \ + --disable-qt \ + --disable-more-warnings \ + --without-docs \ + --with-crypto=gnutls \ + --with-iptables=/usr/sbin/iptables \ + --disable-ifupdown \ + --disable-ifnet + +ifeq ($(BR2_PACKAGE_NETWORK_MANAGER_TUI),y) +NETWORK_MANAGER_DEPENDENCIES += newt +NETWORK_MANAGER_CONF_OPTS += --with-nmtui=yes +else +NETWORK_MANAGER_CONF_OPTS += --with-nmtui=no +endif + +ifeq ($(BR2_PACKAGE_NETWORK_MANAGER_PPPD),y) +NETWORK_MANAGER_DEPENDENCIES += pppd +NETWORK_MANAGER_CONF_OPTS += --enable-ppp +else +NETWORK_MANAGER_CONF_OPTS += --disable-ppp +endif + +ifeq ($(BR2_PACKAGE_NETWORK_MANAGER_MODEM_MANAGER),y) +NETWORK_MANAGER_DEPENDENCIES += modem-manager +NETWORK_MANAGER_CONF_OPTS += --with-modem-manager-1 +else +NETWORK_MANAGER_CONF_OPTS += --without-modem-manager-1 +endif + +ifeq ($(BR2_PACKAGE_DHCP_CLIENT),y) +NETWORK_MANAGER_CONF_OPTS += --with-dhclient=/sbin/dhclient +endif + +ifeq ($(BR2_PACKAGE_DHCPCD),y) +NETWORK_MANAGER_CONF_OPTS += --with-dhcpcd=/sbin/dhcpcd +endif + +# uClibc by default doesn't have backtrace support, so don't use it +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +NETWORK_MANAGER_CONF_OPTS += --disable-crashtrace +endif + +define NETWORK_MANAGER_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/network-manager/S45network-manager $(TARGET_DIR)/etc/init.d/S45network-manager +endef + +define NETWORK_MANAGER_INSTALL_INIT_SYSTEMD + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + + ln -sf /usr/lib/systemd/system/NetworkManager.service \ + $(TARGET_DIR)/etc/systemd/system/dbus-org.freedesktop.NetworkManager.service + + ln -sf /usr/lib/systemd/system/NetworkManager.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/NetworkManager.service + + ln -sf /usr/lib/systemd/system/NetworkManager-dispatcher.service \ + $(TARGET_DIR)/etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service +endef + +$(eval $(autotools-package)) diff --git a/package/newt/0001-Use-CC-instead-of-CPP-to-generate-.depend-files.patch b/package/newt/0001-Use-CC-instead-of-CPP-to-generate-.depend-files.patch new file mode 100644 index 0000000000..853472bfcd --- /dev/null +++ b/package/newt/0001-Use-CC-instead-of-CPP-to-generate-.depend-files.patch @@ -0,0 +1,38 @@ +From 65754effe16506a7a0a04069c8b6e1281811604d Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sat, 10 Jan 2015 11:54:10 +0100 +Subject: [PATCH newt 1/2] Use $(CC) instead of $(CPP) to generate .depend + files + +Use $(CC) instead of $(CPP) to generate .depend file because '$(CPP) +-M' call does not support multiple input files. This avoid the +following error: + +make[1]: Entering directory `/opt/br/output/build/newt-0.51.0' +/opt/br/output/host/usr/bin/arm-none-linux-gnueabi-cpp -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -M newt.c button.c form.c checkbox.c entry.c label.c listbox.c scrollbar.c textbox.c scale.c grid.c windows.c buttonbar.c checkboxtree.c > .depend +arm-none-linux-gnueabi-cpp: too many input files +make[1]: *** [depend] Error 1 + +Signed-off-by: Samuel Martin +Signed-off-by: Yegor Yefremov +Signed-off-by: Thomas Petazzoni +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 7989203..17853e0 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -121,7 +121,7 @@ clean: + $(SHAREDDIR)/*.o *.$(SOEXT)* + + depend: +- $(CPP) $(CFLAGS) $(CPPFLAGS) -M $(SOURCES) > .depend ++ $(CC) $(CFLAGS) $(CPPFLAGS) -M $(SOURCES) > .depend + + $(SHAREDDIR): + mkdir -p $(SHAREDDIR) +-- +2.1.0 + diff --git a/package/newt/0002-Remove-bogus-I-usr-include-slang-from-CPPFLAGS.patch b/package/newt/0002-Remove-bogus-I-usr-include-slang-from-CPPFLAGS.patch new file mode 100644 index 0000000000..eb445dd8f9 --- /dev/null +++ b/package/newt/0002-Remove-bogus-I-usr-include-slang-from-CPPFLAGS.patch @@ -0,0 +1,33 @@ +From 28145b46649165b94666ee585d064b41306e10fd Mon Sep 17 00:00:00 2001 +From: Alex Suykov +Date: Sat, 10 Jan 2015 11:55:32 +0100 +Subject: [PATCH newt 2/2] Remove bogus -I/usr/include/slang from CPPFLAGS + +Hardcoding -I/usr/include/slang in CPPFLAGS is bogus for +cross-compilation. With recent versions of slang, the headers are +installed in ${sysroot}/usr/include directly, so there is no need for +an additional flag. And if one was needed, it should be added by the +configure script, after detecting the right header location. + +Signed-off-by: Alex Suykov +Signed-off-by: Thomas Petazzoni +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 17853e0..d32d784 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -5,7 +5,7 @@ CC = @CC@ + CPP = @CPP@ + CFLAGS = @CFLAGS@ + LDFLAGS = @LDFLAGS@ +-CPPFLAGS = -D_GNU_SOURCE -I/usr/include/slang @CPPFLAGS@ ++CPPFLAGS = -D_GNU_SOURCE @CPPFLAGS@ + GNU_LD = @GNU_LD@ + + VERSION = @VERSION@ +-- +2.1.0 + diff --git a/package/newt/Config.in b/package/newt/Config.in new file mode 100644 index 0000000000..a2216155bf --- /dev/null +++ b/package/newt/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_NEWT + bool "newt" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # slang + depends on !BR2_STATIC_LIBS # unconditionally creates .so + select BR2_PACKAGE_SLANG + select BR2_PACKAGE_POPT + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + Programming library for color text mode, widget based user interfaces. + + http://www.redhat.com/ + +comment "newt needs a toolchain w/ wchar, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS diff --git a/package/newt/newt.hash b/package/newt/newt.hash new file mode 100644 index 0000000000..ca64f41f62 --- /dev/null +++ b/package/newt/newt.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 771b0e634ede56ae6a6acd910728bb5832ac13ddb0d1d27919d2498dab70c91e newt-0.52.18.tar.gz diff --git a/package/newt/newt.mk b/package/newt/newt.mk new file mode 100644 index 0000000000..4c5d2418bb --- /dev/null +++ b/package/newt/newt.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# newt +# +################################################################################ + +NEWT_VERSION = 0.52.18 +NEWT_SITE = https://fedorahosted.org/releases/n/e/newt +NEWT_INSTALL_STAGING = YES +NEWT_DEPENDENCIES = popt slang \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +NEWT_CONF_OPTS = --without-python --without-tcl +NEWT_MAKE = $(MAKE1) +NEWT_LICENSE = GPLv2 +NEWT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/nfacct/0001-uclinux.patch b/package/nfacct/0001-uclinux.patch new file mode 100644 index 0000000000..295a370b46 --- /dev/null +++ b/package/nfacct/0001-uclinux.patch @@ -0,0 +1,26 @@ +From da1a0c186232d1bca9c723bd47d11a6e3807ae29 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 10 Sep 2013 16:16:48 -0300 +Subject: [PATCH] configure: uclinux is also linux + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 9679112..9a34bdc 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -15,7 +15,7 @@ AC_PROG_INSTALL + AC_PROG_LN_S + + case "$host" in +-*-*-linux*) ;; ++*-*-linux* | *-*-uclinux*) ;; + *) AC_MSG_ERROR([Linux only, dude!]);; + esac + +-- +1.8.1.5 + diff --git a/package/nfacct/Config.in b/package/nfacct/Config.in new file mode 100644 index 0000000000..e30d2d997b --- /dev/null +++ b/package/nfacct/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_NFACCT + bool "nfacct" + select BR2_PACKAGE_LIBNETFILTER_ACCT + help + nfacct is the command line tool to create/retrieve/delete + netfilter accounting objects. + + http://www.netfilter.org/projects/nfacct/ diff --git a/package/nfacct/nfacct.hash b/package/nfacct/nfacct.hash new file mode 100644 index 0000000000..48561abcd7 --- /dev/null +++ b/package/nfacct/nfacct.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/nfacct/nfacct-1.0.1.tar.bz2.{md5sum,sha1sum} +md5 992e863409d144350dbc8f0554a0f478 nfacct-1.0.1.tar.bz2 +sha1 57c5fa68a172b30b6c5ea6cb36be685e207312ef nfacct-1.0.1.tar.bz2 diff --git a/package/nfacct/nfacct.mk b/package/nfacct/nfacct.mk new file mode 100644 index 0000000000..7e42160957 --- /dev/null +++ b/package/nfacct/nfacct.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# nfacct +# +################################################################################ + +NFACCT_VERSION = 1.0.1 +NFACCT_SOURCE = nfacct-$(NFACCT_VERSION).tar.bz2 +NFACCT_SITE = http://www.netfilter.org/projects/nfacct/files +NFACCT_DEPENDENCIES = host-pkgconf \ + libnetfilter_acct +NFACCT_AUTORECONF = YES +NFACCT_LICENSE = GPLv2 +NFACCT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/nfs-utils/0001-Patch-taken-from-Gentoo.patch b/package/nfs-utils/0001-Patch-taken-from-Gentoo.patch new file mode 100644 index 0000000000..47bf9db40d --- /dev/null +++ b/package/nfs-utils/0001-Patch-taken-from-Gentoo.patch @@ -0,0 +1,60 @@ +From 5796ca01e33596d4102dd714349c908fecc331c0 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Sat, 10 Nov 2012 18:56:12 +0100 +Subject: [PATCH] Patch taken from Gentoo + +Signed-off-by: Gustavo Zacarias +--- + tools/locktest/Makefile.am | 7 +++---- + tools/rpcgen/Makefile.am | 8 +++----- + 2 files changed, 6 insertions(+), 9 deletions(-) + +diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am +index 3156815..efe6fcd 100644 +--- a/tools/locktest/Makefile.am ++++ b/tools/locktest/Makefile.am +@@ -1,12 +1,11 @@ + ## Process this file with automake to produce Makefile.in + + CC=$(CC_FOR_BUILD) +-LIBTOOL = @LIBTOOL@ --tag=CC ++CFLAGS=$(CFLAGS_FOR_BUILD) ++CPPFLAGS=$(CPPFLAGS_FOR_BUILD) ++LDFLAGS=$(LDFLAGS_FOR_BUILD) + + noinst_PROGRAMS = testlk + testlk_SOURCES = testlk.c +-testlk_CFLAGS=$(CFLAGS_FOR_BUILD) +-testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) +-testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD) + + MAINTAINERCLEANFILES = Makefile.in +diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am +index 8a9ec89..5a5b4d3 100644 +--- a/tools/rpcgen/Makefile.am ++++ b/tools/rpcgen/Makefile.am +@@ -1,7 +1,9 @@ + ## Process this file with automake to produce Makefile.in + + CC=$(CC_FOR_BUILD) +-LIBTOOL = @LIBTOOL@ --tag=CC ++CFLAGS=$(CFLAGS_FOR_BUILD) ++CPPFLAGS=$(CPPFLAGS_FOR_BUILD) ++LDFLAGS=$(LDFLAGS_FOR_BUILD) + + noinst_PROGRAMS = rpcgen + rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \ +@@ -9,10 +11,6 @@ rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \ + rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \ + rpc_scan.h rpc_util.h + +-rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD) +-rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD) +-rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD) +-rpcgen_LDADD=$(LIBTIRPC) + + MAINTAINERCLEANFILES = Makefile.in + +-- +2.1.0 + diff --git a/package/nfs-utils/0002-Switch-legacy-index-in-favour-of-strchr.patch b/package/nfs-utils/0002-Switch-legacy-index-in-favour-of-strchr.patch new file mode 100644 index 0000000000..655d534253 --- /dev/null +++ b/package/nfs-utils/0002-Switch-legacy-index-in-favour-of-strchr.patch @@ -0,0 +1,72 @@ +From a1d45736286939b822fcc7b9c74843f6f90a747e Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Sat, 10 Nov 2012 18:58:15 +0100 +Subject: [PATCH] Switch legacy index() in favour of strchr() Updated for 1.2.6 + from the previous patch by Frederik Pasch. + +Signed-off-by: Gustavo Zacarias +--- + support/nfs/nfs_mntent.c | 6 +++--- + utils/mount/error.c | 2 +- + utils/mountd/fsloc.c | 2 +- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/support/nfs/nfs_mntent.c b/support/nfs/nfs_mntent.c +index a2118a2..7496ed6 100644 +--- a/support/nfs/nfs_mntent.c ++++ b/support/nfs/nfs_mntent.c +@@ -9,7 +9,7 @@ + */ + + #include +-#include /* for index */ ++#include /* for strchr */ + #include /* for isdigit */ + #include /* for umask */ + #include /* for ftruncate */ +@@ -172,7 +172,7 @@ nfs_getmntent (mntFILE *mfp) { + return NULL; + + mfp->mntent_lineno++; +- s = index (buf, '\n'); ++ s = strchr (buf, '\n'); + if (s == NULL) { + /* Missing final newline? Otherwise extremely */ + /* long line - assume file was corrupted */ +@@ -180,7 +180,7 @@ nfs_getmntent (mntFILE *mfp) { + fprintf(stderr, _("[mntent]: warning: no final " + "newline at the end of %s\n"), + mfp->mntent_file); +- s = index (buf, 0); ++ s = strchr (buf, 0); + } else { + mfp->mntent_errs = 1; + goto err; +diff --git a/utils/mount/error.c b/utils/mount/error.c +index e06f598..7bd1d27 100644 +--- a/utils/mount/error.c ++++ b/utils/mount/error.c +@@ -62,7 +62,7 @@ static int rpc_strerror(int spos) + char *tmp; + + if (estr) { +- if ((ptr = index(estr, ':'))) ++ if ((ptr = strchr(estr, ':'))) + estr = ++ptr; + + tmp = &errbuf[spos]; +diff --git a/utils/mountd/fsloc.c b/utils/mountd/fsloc.c +index bc737d1..ddbe92f 100644 +--- a/utils/mountd/fsloc.c ++++ b/utils/mountd/fsloc.c +@@ -127,7 +127,7 @@ static struct servers *method_list(char *data) + bool v6esc = false; + + xlog(L_NOTICE, "method_list(%s)", data); +- for (ptr--, listsize=1; ptr; ptr=index(ptr, ':'), listsize++) ++ for (ptr--, listsize=1; ptr; ptr=strchr(ptr, ':'), listsize++) + ptr++; + list = malloc(listsize * sizeof(char *)); + copy = strdup(data); +-- +2.1.0 diff --git a/package/nfs-utils/0003-Let-the-configure-script-find-getrpcbynumber-in-libt.patch b/package/nfs-utils/0003-Let-the-configure-script-find-getrpcbynumber-in-libt.patch new file mode 100644 index 0000000000..dca44f6dbf --- /dev/null +++ b/package/nfs-utils/0003-Let-the-configure-script-find-getrpcbynumber-in-libt.patch @@ -0,0 +1,46 @@ +From 87f88b28ac01b6449463f00b660fe7416d7f9a55 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 18:53:03 +0100 +Subject: [PATCH] Let the configure script find getrpcbynumber in libtirpc + +The getrpcbynumber() function may not be available in the C library, +but only in the libtirpc library. Take this into account when checking +for the existence of getrpcbynumber() and getrpcbynumber_r(). + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 8e427e3..6e42c96 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -433,11 +433,23 @@ AC_FUNC_STAT + AC_FUNC_VPRINTF + AC_CHECK_FUNCS([alarm atexit dup2 fdatasync ftruncate getcwd \ + gethostbyaddr gethostbyname gethostname getmntent \ +- getnameinfo getrpcbyname getrpcbynumber getrpcbynumber_r getifaddrs \ ++ getnameinfo getrpcbyname getifaddrs \ + gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \ + ppoll realpath rmdir select socket strcasecmp strchr strdup \ + strerror strrchr strtol strtoul sigprocmask name_to_handle_at]) + ++save_CFLAGS=$CFLAGS ++save_LIBS=$LIBS ++CFLAGS="$CFLAGS $AM_CPPFLAGS" ++LIBS="$LIBS $LIBTIRPC" ++AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r]) ++CFLAGS=$save_CFLAGS ++LIBS=$save_LIBS ++ ++if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then ++ AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available]) ++fi ++ + dnl ************************************************************* + dnl Check for data sizes + dnl ************************************************************* +-- +2.1.0 + diff --git a/package/nfs-utils/0004-mountd-Add-check-for-struct-file_handle.patch b/package/nfs-utils/0004-mountd-Add-check-for-struct-file_handle.patch new file mode 100644 index 0000000000..7aca266977 --- /dev/null +++ b/package/nfs-utils/0004-mountd-Add-check-for-struct-file_handle.patch @@ -0,0 +1,46 @@ +From 3c23b3ea7f5069e8fd4d5758704cd968504f1079 Mon Sep 17 00:00:00 2001 +From: Maxime Hadjinlian +Date: Tue, 2 Feb 2016 10:07:22 +0100 +Subject: [PATCH] mountd: Add check for 'struct file_handle' + +The code to check if name_to_handle_at() is implemented generates only a +warning but with some toolchain it doesn't fail to link (the function must be +implemented somewhere). +However the "struct file_handle" type is not available. + +So, this patch adds a check for this struct. + +Signed-off-by: Maxime Hadjinlian +--- + configure.ac | 1 + + utils/mountd/cache.c | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 25d2ba4..913a86f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -425,6 +425,7 @@ AC_TYPE_PID_T + AC_TYPE_SIZE_T + AC_HEADER_TIME + AC_STRUCT_TM ++AC_CHECK_TYPES([struct file_handle]) + + dnl ************************************************************* + dnl Check for functions +diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c +index 7847446..dc64f6d 100644 +--- a/utils/mountd/cache.c ++++ b/utils/mountd/cache.c +@@ -424,7 +424,7 @@ static int same_path(char *child, char *parent, int len) + if (count_slashes(p) != count_slashes(parent)) + return 0; + +-#if HAVE_NAME_TO_HANDLE_AT ++#if defined(HAVE_NAME_TO_HANDLE_AT) && defined(HAVE_STRUCT_FILE_HANDLE) + struct { + struct file_handle fh; + unsigned char handle[128]; +-- +2.7.0 + diff --git a/package/nfs-utils/Config.in b/package/nfs-utils/Config.in new file mode 100644 index 0000000000..1273092775 --- /dev/null +++ b/package/nfs-utils/Config.in @@ -0,0 +1,37 @@ +comment "nfs-utils needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_NFS_UTILS + bool "nfs-utils" + depends on BR2_TOOLCHAIN_HAS_THREADS # libtirpc, rpcbind + select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_PACKAGE_RPCBIND # runtime + depends on BR2_USE_MMU # fork() + help + The NFS Linux kernel server. + + http://sourceforge.net/projects/nfs + +if BR2_PACKAGE_NFS_UTILS + +menu "NFS utilities selection" + +config BR2_PACKAGE_NFS_UTILS_RPCDEBUG + bool "rpcdebug" + help + The RPC debugging utility + +config BR2_PACKAGE_NFS_UTILS_RPC_LOCKD + bool "rpc.lockd" + help + NFS lock manager for Linux kernels older than 2.4 + +config BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD + bool "rpc.rquotad" + help + NFS remote quota server + +endmenu + +endif diff --git a/package/nfs-utils/S60nfs b/package/nfs-utils/S60nfs new file mode 100755 index 0000000000..5639b8f7e2 --- /dev/null +++ b/package/nfs-utils/S60nfs @@ -0,0 +1,88 @@ +#!/bin/sh +# +# nfs This shell script takes care of starting and stopping +# the NFS services. Stolen from RedHat FC5. + +[ -x /usr/sbin/rpc.statd ] || exit 0 +[ -x /usr/sbin/rpc.nfsd ] || exit 0 +[ -x /usr/sbin/rpc.mountd ] || exit 0 +[ -x /usr/sbin/exportfs ] || exit 0 + +mkdir -p /var/lock/subsys +mkdir -p /run/nfs/sm +mkdir -p /run/nfs/sm.bak +touch /run/nfs/rmtab + +CFG_FILE=/etc/default/nfsd + +NR_THREADS=2 +if [ -f "${CFG_FILE}" ]; then + . "${CFG_FILE}" +fi + + +start() { + # Start daemons. + printf "Starting NFS statd: " + rpc.statd + touch /var/lock/subsys/nfslock + echo "done" + + printf "Starting NFS services: " + /usr/sbin/exportfs -r + echo "done" + + printf "Starting NFS daemon: " + rpc.nfsd ${NR_THREADS} + echo "done" + + printf "Starting NFS mountd: " + rpc.mountd + echo "done" + touch /var/lock/subsys/nfs +} + +stop() { + # Stop daemons. + printf "Shutting down NFS mountd: " + killall -q rpc.mountd + echo "done" + + printf "Shutting down NFS daemon: " + kill -9 `pidof nfsd` 2>/dev/null + echo "done" + + printf "Shutting down NFS services: " + /usr/sbin/exportfs -au + rm -f /var/lock/subsys/nfs + killall -q rpc.statd + echo "done" + + printf "Stopping NFS statd: " + killall -q rpc.statd + echo "done" + rm -f /var/lock/subsys/nfslock +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + start + ;; + reload) + /usr/sbin/exportfs -r + touch /var/lock/subsys/nfs + ;; + *) + echo "Usage: nfs {start|stop|reload}" + exit 1 +esac + +exit 0 diff --git a/package/nfs-utils/nfs-utils.hash b/package/nfs-utils/nfs-utils.hash new file mode 100644 index 0000000000..2bd5121186 --- /dev/null +++ b/package/nfs-utils/nfs-utils.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/nfs-utils/1.3.3/sha256sums.asc +sha256 700d689c5622c87953c34102e5befafc4d3c811e676852238f0dd79c9c0c084d nfs-utils-1.3.3.tar.xz diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk new file mode 100644 index 0000000000..179009dc5f --- /dev/null +++ b/package/nfs-utils/nfs-utils.mk @@ -0,0 +1,92 @@ +################################################################################ +# +# nfs-utils +# +################################################################################ + +NFS_UTILS_VERSION = 1.3.3 +NFS_UTILS_SOURCE = nfs-utils-$(NFS_UTILS_VERSION).tar.xz +NFS_UTILS_SITE = https://www.kernel.org/pub/linux/utils/nfs-utils/$(NFS_UTILS_VERSION) +NFS_UTILS_LICENSE = GPLv2+ +NFS_UTILS_LICENSE_FILES = COPYING +NFS_UTILS_AUTORECONF = YES +NFS_UTILS_DEPENDENCIES = host-pkgconf + +NFS_UTILS_CONF_ENV = knfsd_cv_bsd_signals=no + +NFS_UTILS_CONF_OPTS = \ + --disable-nfsv4 \ + --disable-nfsv41 \ + --disable-gss \ + --disable-uuid \ + --disable-ipv6 \ + --without-tcp-wrappers \ + --with-statedir=/run/nfs \ + --with-rpcgen=internal + +NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPCDEBUG) += usr/sbin/rpcdebug +NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_LOCKD) += usr/sbin/rpc.lockd +NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD) += usr/sbin/rpc.rquotad + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +NFS_UTILS_CONF_OPTS += --enable-caps +NFS_UTILS_DEPENDENCIES += libcap +else +NFS_UTILS_CONF_OPTS += --disable-caps +endif + +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +NFS_UTILS_CONF_OPTS += --enable-tirpc +NFS_UTILS_DEPENDENCIES += libtirpc +else +NFS_UTILS_CONF_OPTS += --disable-tirpc +endif + +define NFS_UTILS_INSTALL_FIXUP + rm -f $(NFS_UTILS_TARGETS_) + touch $(TARGET_DIR)/etc/exports + $(INSTALL) -D -m 644 \ + $(@D)/utils/mount/nfsmount.conf $(TARGET_DIR)/etc/nfsmount.conf +endef +NFS_UTILS_POST_INSTALL_TARGET_HOOKS += NFS_UTILS_INSTALL_FIXUP + +ifeq ($(BR2_INIT_SYSTEMD),y) +NFS_UTILS_CONF_OPTS += --with-systemd=/usr/lib/systemd/system +NFS_UTILS_DEPENDENCIES += systemd +else +NFS_UTILS_CONF_OPTS += --without-systemd +endif + +define NFS_UTILS_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \ + $(TARGET_DIR)/etc/init.d/S60nfs +endef + +define NFS_UTILS_INSTALL_INIT_SYSTEMD + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + + ln -fs ../../../../usr/lib/systemd/system/nfs-server.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-server.service + ln -fs ../../../../usr/lib/systemd/system/nfs-client.target \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nfs-client.target + + mkdir -p $(TARGET_DIR)/etc/systemd/system/remote-fs.target.wants + + ln -fs ../../../../usr/lib/systemd/system/nfs-client.target \ + $(TARGET_DIR)/etc/systemd/system/remote-fs.target.wants/nfs-client.target + + $(INSTALL) -D -m 0755 package/nfs-utils/nfs-utils_env.sh \ + $(TARGET_DIR)/usr/lib/systemd/scripts/nfs-utils_env.sh + + $(INSTALL) -D -m 0644 package/nfs-utils/nfs-utils_tmpfiles.conf \ + $(TARGET_DIR)/usr/lib/tmpfiles.d/nfs-utils.conf +endef + +define NFS_UTILS_REMOVE_NFSIOSTAT + rm -f $(TARGET_DIR)/usr/sbin/nfsiostat +endef + +# nfsiostat is interpreted python, so remove it unless it's in the target +NFS_UTILS_POST_INSTALL_TARGET_HOOKS += $(if $(BR2_PACKAGE_PYTHON),,NFS_UTILS_REMOVE_NFSIOSTAT) + +$(eval $(autotools-package)) diff --git a/package/nfs-utils/nfs-utils_env.sh b/package/nfs-utils/nfs-utils_env.sh new file mode 100755 index 0000000000..82284cef93 --- /dev/null +++ b/package/nfs-utils/nfs-utils_env.sh @@ -0,0 +1,3 @@ +#!/bin/sh +# This script is empty, it simply needs to exist to make the +# nfs-config.service happy. diff --git a/package/nfs-utils/nfs-utils_tmpfiles.conf b/package/nfs-utils/nfs-utils_tmpfiles.conf new file mode 100644 index 0000000000..f87939fe2d --- /dev/null +++ b/package/nfs-utils/nfs-utils_tmpfiles.conf @@ -0,0 +1,4 @@ +d /run/nfs/sm 0700 root root - +d /run/nfs/sm.bak 0700 root root - +f /run/nfs/rmtab 0644 root root - +f /run/nfs/etab 0644 root root - diff --git a/package/nftables/Config.in b/package/nftables/Config.in new file mode 100644 index 0000000000..9b20b90557 --- /dev/null +++ b/package/nftables/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_NFTABLES + bool "nftables" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + select BR2_PACKAGE_GMP + select BR2_PACKAGE_LIBMNL + select BR2_PACKAGE_LIBNFTNL + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + help + nftables is the project that aims to replace the existing + {ip,ip6,arp,eb}tables framework. + Basically, this project provides a new packet filtering framework, + a new userspace utility and also a compatibility layer + for {ip,ip6}tables. + + http://www.netfilter.org/projects/nftables/index.html + +comment "nftables needs a toolchain w/ wchar, headers >= 3.4" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 diff --git a/package/nftables/nftables.hash b/package/nftables/nftables.hash new file mode 100644 index 0000000000..04ecf7d7b6 --- /dev/null +++ b/package/nftables/nftables.hash @@ -0,0 +1,2 @@ +# From http://www.netfilter.org/projects/nftables/downloads.html#nftables-0.5 +sha1 34cfe1daa33d7fd7087dd63199f64854dfb54064 nftables-0.5.tar.bz2 diff --git a/package/nftables/nftables.mk b/package/nftables/nftables.mk new file mode 100644 index 0000000000..ccdbcd4b15 --- /dev/null +++ b/package/nftables/nftables.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# nftables +# +################################################################################ + +NFTABLES_VERSION = 0.5 +NFTABLES_SOURCE = nftables-$(NFTABLES_VERSION).tar.bz2 +NFTABLES_SITE = http://www.netfilter.org/projects/nftables/files +NFTABLES_DEPENDENCIES = gmp libmnl libnftnl host-bison host-flex \ + host-pkgconf $(if $(BR2_NEEDS_GETTEXT),gettext) +NFTABLES_LICENSE = GPLv2 +NFTABLES_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_READLINE),y) +NFTABLES_DEPENDENCIES += readline +NFTABLES_LIBS += -lncurses +else +NFTABLES_CONF_OPTS = --without-cli +endif + +ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_LIBNFTNL_JSON),yy) +NFTABLES_LIBS += -ljansson -lm +endif +ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_LIBNFTNL_XML),yy) +NFTABLES_LIBS += -lmxml -lpthread +endif + +NFTABLES_CONF_ENV = \ + ac_cv_prog_CONFIG_PDF=no \ + LIBS="$(NFTABLES_LIBS)" \ + DBLATEX=no \ + DOCBOOK2X_MAN=no \ + DOCBOOK2MAN=no \ + DB2X_DOCBOOK2MAN=no + +$(eval $(autotools-package)) diff --git a/package/nginx/0001-auto-type-sizeof-rework-autotest-to-be-cross-compila.patch b/package/nginx/0001-auto-type-sizeof-rework-autotest-to-be-cross-compila.patch new file mode 100644 index 0000000000..603f7292da --- /dev/null +++ b/package/nginx/0001-auto-type-sizeof-rework-autotest-to-be-cross-compila.patch @@ -0,0 +1,87 @@ +From fe05ccf80afe5de33d4f9c5e5545390c450bcd2d Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Thu, 24 Apr 2014 23:27:32 +0200 +Subject: [PATCH] auto/type/sizeof: rework autotest to be cross-compilation + friendly + +Rework the sizeof test to do the checks at compile time instead of at +runtime. This way, it does not break when cross-compiling for a +different CPU architecture. + +Signed-off-by: Samuel Martin + +Refresh for 1.8.0. + +Signed-off-by: Danomi Manchego +[martin@barkynet.com: Updated for 1.10.0] +Signed-off-by: Martin Bark +--- + auto/types/sizeof | 42 ++++++++++++++++++++++++++++-------------- + 1 file changed, 28 insertions(+), 14 deletions(-) + +diff --git a/auto/types/sizeof b/auto/types/sizeof +index a5f66bb..c6f31ec 100644 +--- a/auto/types/sizeof ++++ b/auto/types/sizeof +@@ -14,7 +14,7 @@ END + + ngx_size= + +-cat << END > $NGX_AUTOTEST.c ++cat << _EOF > $NGX_AUTOTEST.c + + #include + #include +@@ -25,22 +25,40 @@ $NGX_INCLUDE_UNISTD_H + $NGX_INCLUDE_INTTYPES_H + $NGX_INCLUDE_AUTO_CONFIG_H + +-int main() { +- printf("%d", (int) sizeof($ngx_type)); ++#if !defined( PASTE) ++#define PASTE2( x, y) x##y ++#define PASTE( x, y) PASTE2( x, y) ++#endif /* PASTE */ ++ ++#define SAY_IF_SIZEOF( typename, type, size) \\ ++ static char PASTE( PASTE( PASTE( sizeof_, typename), _is_), size) \\ ++ [(sizeof(type) == (size)) ? 1 : -1] ++ ++SAY_IF_SIZEOF(TEST_TYPENAME, TEST_TYPE, TEST_SIZE); ++ ++int main(void) ++{ + return 0; + } + +-END +- ++_EOF + +-ngx_test="$CC $CC_TEST_FLAGS $CC_AUX_FLAGS \ +- -o $NGX_AUTOTEST $NGX_AUTOTEST.c $NGX_LD_OPT $ngx_feature_libs" ++_ngx_typename=`echo "$ngx_type" | sed 's/ /_/g;s/\*/p/'` ++ngx_size="-1" ++ngx_size=`for i in 1 2 4 8 16 ; do \ ++ $CC $CC_TEST_FLAGS $CC_AUX_FLAGS \ ++ -DTEST_TYPENAME="$_ngx_typename" -DTEST_TYPE="$ngx_type" -DTEST_SIZE="$i" \ ++ $NGX_AUTOTEST.c -o $NGX_AUTOTEST \ ++ $NGX_LD_OPT $ngx_feature_libs >/dev/null 2>&1 || continue ;\ ++ echo $i ; break ; done` + +-eval "$ngx_test >> $NGX_AUTOCONF_ERR 2>&1" ++rm -rf $NGX_AUTOTEST* + ++if test -z $ngx_size ; then ++ ngx_size=-1 ++fi + +-if [ -x $NGX_AUTOTEST ]; then +- ngx_size=`$NGX_AUTOTEST` ++if [ $ngx_size -gt 0 ]; then + echo " $ngx_size bytes" + fi + +-- +1.9.1 + diff --git a/package/nginx/0002-auto-feature-add-mechanism-allowing-to-force-feature.patch b/package/nginx/0002-auto-feature-add-mechanism-allowing-to-force-feature.patch new file mode 100644 index 0000000000..13bef5ffdb --- /dev/null +++ b/package/nginx/0002-auto-feature-add-mechanism-allowing-to-force-feature.patch @@ -0,0 +1,135 @@ +From ef72be22ad6d58e230f75553d80b470b80c3303a Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 4 May 2014 00:40:49 +0200 +Subject: [PATCH] auto/feature: add mechanism allowing to force feature run + test result + +Whenever a feature needs to run a test, the ngx_feature_run_force_result +variable can be set to the desired test result, and thus skip the test. + +Therefore, the generated config.h file will honor these presets. + +This mechanism aims to make easier cross-compilation support. + +Signed-off-by: Samuel Martin +--- + auto/feature | 80 ++++++++++++++++++++++++++++++++++++++++++++---------------- + 1 file changed, 59 insertions(+), 21 deletions(-) + +diff --git a/auto/feature b/auto/feature +index 1145f28..a194b85 100644 +--- a/auto/feature ++++ b/auto/feature +@@ -52,50 +52,88 @@ if [ -x $NGX_AUTOTEST ]; then + case "$ngx_feature_run" in + + yes) +- # /bin/sh is used to intercept "Killed" or "Abort trap" messages +- if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then +- echo " found" ++ if test -n "$ngx_feature_run_force_result" ; then ++ echo " not tested (maybe cross-compiling)" ++ if test -n "$ngx_feature_name" ; then ++ if test "$ngx_feature_run_force_result" = "yes" ; then ++ have=$ngx_have_feature . auto/have ++ fi ++ fi + ngx_found=yes ++ else + +- if test -n "$ngx_feature_name"; then +- have=$ngx_have_feature . auto/have ++ # /bin/sh is used to intercept "Killed" or "Abort trap" messages ++ if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then ++ echo " found" ++ ngx_found=yes ++ ++ if test -n "$ngx_feature_name"; then ++ have=$ngx_have_feature . auto/have ++ fi ++ ++ else ++ echo " found but is not working" + fi + +- else +- echo " found but is not working" + fi + ;; + + value) +- # /bin/sh is used to intercept "Killed" or "Abort trap" messages +- if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then +- echo " found" ++ if test -n "$ngx_feature_run_force_result" ; then ++ echo " not tested (maybe cross-compiling)" ++ cat << END >> $NGX_AUTO_CONFIG_H ++ ++#ifndef $ngx_feature_name ++#define $ngx_feature_name $ngx_feature_run_force_result ++#endif ++ ++END + ngx_found=yes ++ else + +- cat << END >> $NGX_AUTO_CONFIG_H ++ # /bin/sh is used to intercept "Killed" or "Abort trap" messages ++ if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then ++ echo " found" ++ ngx_found=yes ++ ++ cat << END >> $NGX_AUTO_CONFIG_H + + #ifndef $ngx_feature_name + #define $ngx_feature_name `$NGX_AUTOTEST` + #endif + + END +- else +- echo " found but is not working" ++ else ++ echo " found but is not working" ++ fi ++ + fi + ;; + + bug) +- # /bin/sh is used to intercept "Killed" or "Abort trap" messages +- if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then +- echo " not found" +- +- else +- echo " found" ++ if test -n "$ngx_feature_run_force_result" ; then ++ echo " not tested (maybe cross-compiling)" ++ if test -n "$ngx_feature_name"; then ++ if test "$ngx_feature_run_force_result" = "yes" ; then ++ have=$ngx_have_feature . auto/have ++ fi ++ fi + ngx_found=yes ++ else + +- if test -n "$ngx_feature_name"; then +- have=$ngx_have_feature . auto/have ++ # /bin/sh is used to intercept "Killed" or "Abort trap" messages ++ if /bin/sh -c $NGX_AUTOTEST >> $NGX_AUTOCONF_ERR 2>&1; then ++ echo " not found" ++ ++ else ++ echo " found" ++ ngx_found=yes ++ ++ if test -n "$ngx_feature_name"; then ++ have=$ngx_have_feature . auto/have ++ fi + fi ++ + fi + ;; + +-- +1.9.2 + diff --git a/package/nginx/0003-auto-set-ngx_feature_run_force_result-for-each-featu.patch b/package/nginx/0003-auto-set-ngx_feature_run_force_result-for-each-featu.patch new file mode 100644 index 0000000000..ed67a67944 --- /dev/null +++ b/package/nginx/0003-auto-set-ngx_feature_run_force_result-for-each-featu.patch @@ -0,0 +1,213 @@ +From 71939b727a8fa9f722934700948a5b68960f6183 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Thu, 29 May 2014 18:52:10 +0200 +Subject: [PATCH] auto/*: set ngx_feature_run_force_result for each feature + requiring run test + +Each feature requiring a run test has a matching preset variable (called +ngx_force_*) used to set ngx_feature_run_force_result. + +These ngx_force_* variables are passed through the environment at configure +time. + +Signed-off-by: Samuel Martin + +Refresh for 1.8.0. + +Signed-off-by: Danomi Manchego +--- + auto/cc/conf | 3 +++ + auto/cc/name | 1 + + auto/lib/libatomic/conf | 1 + + auto/os/darwin | 3 +++ + auto/os/linux | 4 ++++ + auto/unix | 8 ++++++++ + 6 files changed, 20 insertions(+) + +diff --git a/auto/cc/conf b/auto/cc/conf +index edc6d74..a61ade4 100644 +--- a/auto/cc/conf ++++ b/auto/cc/conf +@@ -159,6 +159,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then + ngx_feature="gcc builtin atomic operations" + ngx_feature_name=NGX_HAVE_GCC_ATOMIC + ngx_feature_run=yes ++ ngx_feature_run_force_result="$ngx_force_gcc_have_atomic" + ngx_feature_incs= + ngx_feature_path= + ngx_feature_libs= +@@ -179,6 +180,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then + ngx_feature="C99 variadic macros" + ngx_feature_name="NGX_HAVE_C99_VARIADIC_MACROS" + ngx_feature_run=yes ++ ngx_feature_run_force_result="$ngx_force_c99_have_variadic_macros" + ngx_feature_incs="#include + #define var(dummy, ...) sprintf(__VA_ARGS__)" + ngx_feature_path= +@@ -193,6 +195,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then + ngx_feature="gcc variadic macros" + ngx_feature_name="NGX_HAVE_GCC_VARIADIC_MACROS" + ngx_feature_run=yes ++ ngx_feature_run_force_result="$ngx_force_gcc_have_variadic_macros" + ngx_feature_incs="#include + #define var(dummy, args...) sprintf(args)" + ngx_feature_path= +diff --git a/auto/cc/name b/auto/cc/name +index 51a7ed9..d237d47 100644 +--- a/auto/cc/name ++++ b/auto/cc/name +@@ -8,6 +8,7 @@ if [ "$NGX_PLATFORM" != win32 ]; then + ngx_feature="C compiler" + ngx_feature_name= + ngx_feature_run=yes ++ ngx_feature_run_force_result="$ngx_force_c_compiler" + ngx_feature_incs= + ngx_feature_path= + ngx_feature_libs= +diff --git a/auto/lib/libatomic/conf b/auto/lib/libatomic/conf +index d1e484a..3724916 100644 +--- a/auto/lib/libatomic/conf ++++ b/auto/lib/libatomic/conf +@@ -15,6 +15,7 @@ else + ngx_feature="atomic_ops library" + ngx_feature_name=NGX_HAVE_LIBATOMIC + ngx_feature_run=yes ++ ngx_feature_run_force_result="$ngx_force_have_libatomic" + ngx_feature_incs="#define AO_REQUIRE_CAS + #include " + ngx_feature_path= +diff --git a/auto/os/darwin b/auto/os/darwin +index 1d3e3d3..11b7276 100644 +--- a/auto/os/darwin ++++ b/auto/os/darwin +@@ -27,6 +27,7 @@ NGX_KQUEUE_CHECKED=YES + ngx_feature="kqueue's EVFILT_TIMER" + ngx_feature_name="NGX_HAVE_TIMER_EVENT" + ngx_feature_run=yes ++ngx_feature_run_force_result="$ngx_force_have_timer_event" + ngx_feature_incs="#include + #include " + ngx_feature_path= +@@ -57,6 +58,7 @@ ngx_feature_test="int kq; + ngx_feature="Darwin 64-bit kqueue millisecond timeout bug" + ngx_feature_name=NGX_DARWIN_KEVENT_BUG + ngx_feature_run=bug ++ngx_feature_run_force_result="$ngx_force_kevent_bug" + ngx_feature_incs="#include + #include " + ngx_feature_path= +@@ -87,6 +89,7 @@ CC_AUX_FLAGS="$CC_AUX_FLAGS" + ngx_feature="sendfile()" + ngx_feature_name="NGX_HAVE_SENDFILE" + ngx_feature_run=yes ++ngx_feature_run_force_result="$ngx_force_have_sendfile" + ngx_feature_incs="#include + #include + #include +diff --git a/auto/os/linux b/auto/os/linux +index 19bf832..16848b2 100644 +--- a/auto/os/linux ++++ b/auto/os/linux +@@ -49,6 +49,7 @@ fi + ngx_feature="epoll" + ngx_feature_name="NGX_HAVE_EPOLL" + ngx_feature_run=yes ++ngx_feature_run_force_result="$ngx_force_have_epoll" + ngx_feature_incs="#include " + ngx_feature_path= + ngx_feature_libs= +@@ -106,6 +107,7 @@ CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE" + ngx_feature="sendfile()" + ngx_feature_name="NGX_HAVE_SENDFILE" + ngx_feature_run=yes ++ngx_feature_run_force_result="$ngx_force_have_sendfile" + ngx_feature_incs="#include + #include " + ngx_feature_path= +@@ -127,6 +129,7 @@ CC_AUX_FLAGS="$cc_aux_flags -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64" + ngx_feature="sendfile64()" + ngx_feature_name="NGX_HAVE_SENDFILE64" + ngx_feature_run=yes ++ngx_feature_run_force_result="$ngx_force_have_sendfile64" + ngx_feature_incs="#include + #include " + ngx_feature_path= +@@ -145,6 +148,7 @@ ngx_include="sys/prctl.h"; . auto/include + ngx_feature="prctl(PR_SET_DUMPABLE)" + ngx_feature_name="NGX_HAVE_PR_SET_DUMPABLE" + ngx_feature_run=yes ++ngx_feature_run_force_result="$ngx_force_have_pr_set_dumpable" + ngx_feature_incs="#include " + ngx_feature_path= + ngx_feature_libs= +diff --git a/auto/unix b/auto/unix +index 6e54531..7dbf9d1 100755 +--- a/auto/unix ++++ b/auto/unix +@@ -99,6 +99,7 @@ if test -z "$NGX_KQUEUE_CHECKED"; then + ngx_feature="kqueue's EVFILT_TIMER" + ngx_feature_name="NGX_HAVE_TIMER_EVENT" + ngx_feature_run=yes ++ ngx_feature_run_force_result="$ngx_force_have_timer_event" + ngx_feature_incs="#include + #include " + ngx_feature_path= +@@ -589,6 +590,7 @@ ngx_feature_test="char buf[1]; ssize_t n; n = pwrite(1, buf, 1, 0); + ngx_feature="sys_nerr" + ngx_feature_name="NGX_SYS_NERR" + ngx_feature_run=value ++ngx_feature_run_force_result="$ngx_force_sys_nerr" + ngx_feature_incs='#include + #include ' + ngx_feature_path= +@@ -603,6 +605,7 @@ if [ $ngx_found = no ]; then + ngx_feature="_sys_nerr" + ngx_feature_name="NGX_SYS_NERR" + ngx_feature_run=value ++ ngx_feature_run_force_result="$ngx_force_sys_nerr" + ngx_feature_incs='#include + #include ' + ngx_feature_path= +@@ -618,6 +621,7 @@ if [ $ngx_found = no ]; then + ngx_feature='maximum errno' + ngx_feature_name=NGX_SYS_NERR + ngx_feature_run=value ++ ngx_feature_run_force_result="$ngx_force_sys_nerr" + ngx_feature_incs='#include + #include + #include ' +@@ -676,6 +680,7 @@ ngx_feature_test="void *p; p = memalign(4096, 4096); + ngx_feature="mmap(MAP_ANON|MAP_SHARED)" + ngx_feature_name="NGX_HAVE_MAP_ANON" + ngx_feature_run=yes ++ngx_feature_run_force_result="$ngx_force_have_map_anon" + ngx_feature_incs="#include " + ngx_feature_path= + ngx_feature_libs= +@@ -689,6 +694,7 @@ ngx_feature_test="void *p; + ngx_feature='mmap("/dev/zero", MAP_SHARED)' + ngx_feature_name="NGX_HAVE_MAP_DEVZERO" + ngx_feature_run=yes ++ngx_feature_run_force_result="$ngx_force_have_map_devzero" + ngx_feature_incs="#include + #include + #include " +@@ -704,6 +710,7 @@ ngx_feature_test='void *p; int fd; + ngx_feature="System V shared memory" + ngx_feature_name="NGX_HAVE_SYSVSHM" + ngx_feature_run=yes ++ngx_feature_run_force_result="$ngx_force_have_sysvshm" + ngx_feature_incs="#include + #include " + ngx_feature_path= +@@ -718,6 +725,7 @@ ngx_feature_test="int id; + ngx_feature="POSIX semaphores" + ngx_feature_name="NGX_HAVE_POSIX_SEM" + ngx_feature_run=yes ++ngx_feature_run_force_result="$ngx_force_have_posix_sem" + ngx_feature_incs="#include " + ngx_feature_path= + ngx_feature_libs= +-- +1.9.1 + diff --git a/package/nginx/0004-auto-lib-libxslt-conf-use-pkg-config.patch b/package/nginx/0004-auto-lib-libxslt-conf-use-pkg-config.patch new file mode 100644 index 0000000000..b315909c34 --- /dev/null +++ b/package/nginx/0004-auto-lib-libxslt-conf-use-pkg-config.patch @@ -0,0 +1,31 @@ +From 211b9f19a3a62826fadef55d2f89d6f66fbf4aa6 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Thu, 29 May 2014 19:22:27 +0200 +Subject: [PATCH] auto/lib/libxslt/conf: use pkg-config + +Change to using pkg-config to find the path to libxslt and its +dependencies. + +Signed-off-by: Martin Bark +--- + auto/lib/libxslt/conf | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/auto/lib/libxslt/conf b/auto/lib/libxslt/conf +index 3a0f37b..3c2a60e 100644 +--- a/auto/lib/libxslt/conf ++++ b/auto/lib/libxslt/conf +@@ -12,8 +12,8 @@ + #include + #include + #include " +- ngx_feature_path="/usr/include/libxml2" +- ngx_feature_libs="-lxml2 -lxslt" ++ ngx_feature_path="$(${PKG_CONFIG:=pkg-config} --cflags-only-I libxslt|sed 's/-I//g')" ++ ngx_feature_libs="$(${PKG_CONFIG:=pkg-config} --libs libxslt)" + ngx_feature_test="xmlParserCtxtPtr ctxt = NULL; + xsltStylesheetPtr sheet = NULL; + xmlDocPtr doc; +-- +2.8.2 + diff --git a/package/nginx/0005-auto-unix-make-sys_nerr-guessing-cross-friendly.patch b/package/nginx/0005-auto-unix-make-sys_nerr-guessing-cross-friendly.patch new file mode 100644 index 0000000000..2242d13363 --- /dev/null +++ b/package/nginx/0005-auto-unix-make-sys_nerr-guessing-cross-friendly.patch @@ -0,0 +1,138 @@ +From 08617a8d29ee22831175697555558fec8f52772c Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 1 Jun 2014 16:05:04 +0200 +Subject: [PATCH] auto/unix: make sys_nerr guessing cross-friendly + +This patch replaces the default sys_nerr runtest with a test done at +buildtime. + +The idea behind this buildtime test is finding the value of the ERR_MAX +macro if defined, or the EHWPOISON (which is currently the last errno) +otherwise. + +Signed-off-by: Samuel Martin + +Refresh for 1.8.0. + +Signed-off-by: Danomi Manchego +--- + auto/os/sys_nerr | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + auto/unix | 10 ++++++++ + 2 files changed, 88 insertions(+) + create mode 100644 auto/os/sys_nerr + +diff --git a/auto/os/sys_nerr b/auto/os/sys_nerr +new file mode 100644 +index 0000000..8970f5f +--- /dev/null ++++ b/auto/os/sys_nerr +@@ -0,0 +1,78 @@ ++ ++# Copyright (C) Samuel Martin ++ ++ ++echo $ngx_n "checking for sys_nerr value...$ngx_c" ++ ++# sys_nerr guessing is done using a (very) poor (but working) ++# heuristics, by checking for the value of ERR_MAX if defined, or ++# EHWPOISON otherwise. ++ ++cat << END >> $NGX_AUTOCONF_ERR ++ ++---------------------------------------- ++checking for sys_nerr value ++ ++END ++ ++ngx_sys_nerr= ++ ++cat << _EOF > $NGX_AUTOTEST.c ++ ++#include ++#include ++ ++static char sys_nerr_test[ERR_MAX]; ++int main(void) ++{ ++ return 0; ++} ++ ++_EOF ++ ++if $CC $CC_TEST_FLAGS $CC_AUX_FLAGS \ ++ $NGX_AUTOTEST.c -o $NGX_AUTOTEST \ ++ $NGX_LD_OPT $ngx_feature_libs >/dev/null 2>&1 ; then ++ _ngx_max_err_macro=ERR_MAX ++else ++ # the +2 has been empirically found! ++ _ngx_max_err_macro="EHWPOISON + 2" ++fi ++ ++cat << _EOF > $NGX_AUTOTEST.c ++ ++#include ++#include ++ ++static char sys_nerr_test[(TEST_ERR_MAX == $_ngx_max_err_macro) ? 1 : -1]; ++int main(void) ++{ ++ return 0; ++} ++ ++_EOF ++ ++ ++ngx_sys_nerr=`for i in $(seq 0 2000) ; do \ ++ $CC $CC_TEST_FLAGS $CC_AUX_FLAGS \ ++ -DTEST_ERR_MAX="$i" \ ++ $NGX_AUTOTEST.c -o $NGX_AUTOTEST \ ++ $NGX_LD_OPT $ngx_feature_libs >/dev/null 2>&1 || continue ;\ ++ echo $i ; break ; done` ++ ++rm -rf $NGX_AUTOTEST* ++ ++if test -z $ngx_sys_nerr ; then ++ ngx_size=0 ++ ngx_sys_nerr=0 ++fi ++ ++cat << END >> $NGX_AUTO_CONFIG_H ++ ++#ifndef $ngx_feature_name ++#define $ngx_feature_name $ngx_sys_nerr ++#endif ++ ++END ++ ++echo " $ngx_sys_nerr" +diff --git a/auto/unix b/auto/unix +index 7dbf9d1..00a7370 100755 +--- a/auto/unix ++++ b/auto/unix +@@ -595,6 +595,10 @@ ngx_feature_incs='#include + #include ' + ngx_feature_path= + ngx_feature_libs= ++ ++if false ; then ++# Disabled because only valid for native build. ++ + ngx_feature_test='printf("%d", sys_nerr);' + . auto/feature + +@@ -643,6 +647,12 @@ if [ $ngx_found = no ]; then + . auto/feature + fi + ++else ++ # Cross-compilation support ++ . auto/os/sys_nerr ++ ++fi ++ + + ngx_feature="localtime_r()" + ngx_feature_name="NGX_HAVE_LOCALTIME_R" +-- +1.9.1 + diff --git a/package/nginx/0006-auto-lib-openssl-conf-use-pkg-config.patch b/package/nginx/0006-auto-lib-openssl-conf-use-pkg-config.patch new file mode 100644 index 0000000000..b826a3c8e7 --- /dev/null +++ b/package/nginx/0006-auto-lib-openssl-conf-use-pkg-config.patch @@ -0,0 +1,31 @@ +From 756556d127da291cad8a2c007a89124a692aef7f Mon Sep 17 00:00:00 2001 +From: Martin Bark +Date: Fri, 6 May 2016 14:48:31 +0100 +Subject: [PATCH] auto/lib/openssl/conf: use pkg-config + +Change to using pkg-config to find the path to openssl and its +dependencies. + +Signed-off-by: Martin Bark +--- + auto/lib/openssl/conf | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf +index 39d9602..995c6f3 100644 +--- a/auto/lib/openssl/conf ++++ b/auto/lib/openssl/conf +@@ -50,8 +50,8 @@ else + ngx_feature_name="NGX_OPENSSL" + ngx_feature_run=no + ngx_feature_incs="#include " +- ngx_feature_path= +- ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL" ++ ngx_feature_path="$(${PKG_CONFIG:=pkg-config} --cflags-only-I openssl|sed 's/-I//g')" ++ ngx_feature_libs="$(${PKG_CONFIG:=pkg-config} --libs openssl)" + ngx_feature_test="SSL_CTX_set_options(NULL, 0)" + . auto/feature + +-- +2.8.2 + diff --git a/package/nginx/0007-auto-lib-libgd-conf-use-pkg-config.patch b/package/nginx/0007-auto-lib-libgd-conf-use-pkg-config.patch new file mode 100644 index 0000000000..34e7981c8f --- /dev/null +++ b/package/nginx/0007-auto-lib-libgd-conf-use-pkg-config.patch @@ -0,0 +1,31 @@ +From fd9885fe5fef5826034547ca6be7299863f99769 Mon Sep 17 00:00:00 2001 +From: Martin Bark +Date: Fri, 6 May 2016 14:48:49 +0100 +Subject: [PATCH] auto/lib/libgd/conf: use pkg-config + +Change to using pkg-config to find the path to libgd and its +dependencies. + +Signed-off-by: Martin Bark +--- + auto/lib/libgd/conf | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/auto/lib/libgd/conf b/auto/lib/libgd/conf +index 6e4e91c..1c536a2 100644 +--- a/auto/lib/libgd/conf ++++ b/auto/lib/libgd/conf +@@ -7,8 +7,8 @@ + ngx_feature_name= + ngx_feature_run=no + ngx_feature_incs="#include " +- ngx_feature_path= +- ngx_feature_libs="-lgd" ++ ngx_feature_path="$(${GDLIB_CONFIG:=gdlib-config} --includedir)" ++ ngx_feature_libs="$(${GDLIB_CONFIG:=gdlib-config} --libs)" + ngx_feature_test="gdImagePtr img = gdImageCreateFromGifPtr(1, NULL);" + . auto/feature + +-- +2.8.2 + diff --git a/package/nginx/0008-src-os-unix-ngx_linux_config.h-only-include-dlfcn.h-.patch b/package/nginx/0008-src-os-unix-ngx_linux_config.h-only-include-dlfcn.h-.patch new file mode 100644 index 0000000000..c10fcd11c9 --- /dev/null +++ b/package/nginx/0008-src-os-unix-ngx_linux_config.h-only-include-dlfcn.h-.patch @@ -0,0 +1,33 @@ +From 8dc9dffc1f99ac951865f3135dfb5061a08d1f85 Mon Sep 17 00:00:00 2001 +From: Martin Bark +Date: Fri, 6 May 2016 16:29:17 +0100 +Subject: [PATCH] src/os/unix/ngx_linux_config.h: only include dlfcn.h if + available + +Signed-off-by: Martin Bark +--- + src/os/unix/ngx_linux_config.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/os/unix/ngx_linux_config.h b/src/os/unix/ngx_linux_config.h +index 2f6129d..4244086 100644 +--- a/src/os/unix/ngx_linux_config.h ++++ b/src/os/unix/ngx_linux_config.h +@@ -55,10 +55,12 @@ + #include + #include /* uname() */ + +-#include ++#include + + +-#include ++#if (NGX_HAVE_DLOPEN) ++#include ++#endif + + + #if (NGX_HAVE_POSIX_SEM) +-- +2.8.2 + diff --git a/package/nginx/Config.in b/package/nginx/Config.in new file mode 100644 index 0000000000..e6f2d96d34 --- /dev/null +++ b/package/nginx/Config.in @@ -0,0 +1,383 @@ +menuconfig BR2_PACKAGE_NGINX + bool "nginx" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBATOMIC_OPS if BR2_sparc_v8 || BR2_sparc_leon3 + help + nginx is an HTTP and reverse proxy server, as well as a mail proxy + server. + + http://nginx.org/ + +if BR2_PACKAGE_NGINX + +config BR2_PACKAGE_NGINX_FILE_AIO + bool "file AIO support" + # Does not build, because nginx hardcodes using SYS_eventfd, + # but it's available on neither AArch64 nor ARC where only + # eventfd() is available. See + # https://bugs.launchpad.net/linaro-aarch64/+bug/1160013 + depends on !BR2_aarch64 + depends on !BR2_arc + +config BR2_PACKAGE_NGINX_THREADS + bool "thread pool support" + depends on BR2_TOOLCHAIN_HAS_THREADS + +comment "thread pool support needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_NGINX_HTTP + bool "http server" + default y + +if BR2_PACKAGE_NGINX_HTTP + +config BR2_PACKAGE_NGINX_HTTP_CACHE + bool "http cache support" + select BR2_PACKAGE_OPENSSL + +comment "http modules" + +config BR2_PACKAGE_NGINX_HTTP_SSL_MODULE + bool "ngx_http_ssl_module" + select BR2_PACKAGE_OPENSSL + help + Enable ngx_http_ssl_module + +config BR2_PACKAGE_NGINX_HTTP_V2_MODULE + bool "ngx_http_v2_module" + select BR2_PACKAGE_ZLIB + help + Enable ngx_http_spdy_module + +config BR2_PACKAGE_NGINX_HTTP_REALIP_MODULE + bool "ngx_http_realip_module" + help + Enable ngx_http_realip_module + +config BR2_PACKAGE_NGINX_HTTP_ADDITION_MODULE + bool "ngx_http_addition_module" + help + Enable ngx_http_addition_module + +config BR2_PACKAGE_NGINX_HTTP_XSLT_MODULE + bool "ngx_http_xslt_module" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBXSLT + help + Enable ngx_http_xslt_module + +config BR2_PACKAGE_NGINX_HTTP_IMAGE_FILTER_MODULE + bool "ngx_http_image_filter_module" + select BR2_PACKAGE_GD + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBPNG + help + Enable ngx_http_image_filter_module + +config BR2_PACKAGE_NGINX_HTTP_SUB_MODULE + bool "ngx_http_sub_module" + help + Enable ngx_http_sub_module + +config BR2_PACKAGE_NGINX_HTTP_DAV_MODULE + bool "ngx_http_dav_module" + help + Enable ngx_http_dav_module + +config BR2_PACKAGE_NGINX_HTTP_FLV_MODULE + bool "ngx_http_flv_module" + help + Enable ngx_http_flv_module + +config BR2_PACKAGE_NGINX_HTTP_MP4_MODULE + bool "ngx_http_mp4_module" + help + Enable ngx_http_mp4_module + +config BR2_PACKAGE_NGINX_HTTP_GUNZIP_MODULE + bool "ngx_http_gunzip_module" + select BR2_PACKAGE_ZLIB + help + Enable ngx_http_gunzip_module + +config BR2_PACKAGE_NGINX_HTTP_GZIP_STATIC_MODULE + bool "ngx_http_gzip_static_module" + select BR2_PACKAGE_ZLIB + help + Enable ngx_http_gzip_static_module + +config BR2_PACKAGE_NGINX_HTTP_AUTH_REQUEST_MODULE + bool "ngx_http_auth_request_module" + help + Enable ngx_http_auth_request_module + +config BR2_PACKAGE_NGINX_HTTP_RANDOM_INDEX_MODULE + bool "ngx_http_random_index_module" + help + Enable ngx_http_random_index_module + +config BR2_PACKAGE_NGINX_HTTP_SECURE_LINK_MODULE + bool "ngx_http_secure_link_module" + select BR2_PACKAGE_OPENSSL + help + Enable ngx_http_secure_link_module + +config BR2_PACKAGE_NGINX_HTTP_DEGRADATION_MODULE + bool "ngx_http_degradation_module" + help + Enable ngx_http_degradation_module + +config BR2_PACKAGE_NGINX_HTTP_STUB_STATUS_MODULE + bool "ngx_http_stub_status_module" + help + Enable ngx_http_stub_status_module + +config BR2_PACKAGE_NGINX_HTTP_CHARSET_MODULE + bool "ngx_http_charset_module" + default y + help + Enable ngx_http_charset_module + +config BR2_PACKAGE_NGINX_HTTP_GZIP_MODULE + bool "ngx_http_gzip_module" + select BR2_PACKAGE_ZLIB + default y + help + Enable ngx_http_gzip_module + +config BR2_PACKAGE_NGINX_HTTP_SSI_MODULE + bool "ngx_http_ssi_module" + default y + help + Enable ngx_http_ssi_module + +config BR2_PACKAGE_NGINX_HTTP_USERID_MODULE + bool "ngx_http_userid_module" + default y + help + Enable ngx_http_userid_module + +config BR2_PACKAGE_NGINX_HTTP_ACCESS_MODULE + bool "ngx_http_access_module" + default y + help + Enable ngx_http_access_module + +config BR2_PACKAGE_NGINX_HTTP_AUTH_BASIC_MODULE + bool "ngx_http_auth_basic_module" + default y + help + Enable ngx_http_auth_basic_module + +config BR2_PACKAGE_NGINX_HTTP_AUTOINDEX_MODULE + bool "ngx_http_autoindex_module" + default y + help + Enable ngx_http_autoindex_module + +config BR2_PACKAGE_NGINX_HTTP_GEO_MODULE + bool "ngx_http_geo_module" + default y + help + Enable ngx_http_geo_module + +config BR2_PACKAGE_NGINX_HTTP_MAP_MODULE + bool "ngx_http_map_module" + default y + help + Enable ngx_http_map_module + +config BR2_PACKAGE_NGINX_HTTP_SPLIT_CLIENTS_MODULE + bool "ngx_http_split_clients_module" + default y + help + Enable ngx_http_split_clients_module + +config BR2_PACKAGE_NGINX_HTTP_REFERER_MODULE + bool "ngx_http_referer_module" + default y + help + Enable ngx_http_referer_module + +config BR2_PACKAGE_NGINX_HTTP_REWRITE_MODULE + bool "ngx_http_rewrite_module" + select BR2_PACKAGE_PCRE + default y + help + Enable ngx_http_rewrite_module + +config BR2_PACKAGE_NGINX_HTTP_PROXY_MODULE + bool "ngx_http_proxy_module" + default y + help + Enable ngx_http_proxy_module + +config BR2_PACKAGE_NGINX_HTTP_FASTCGI_MODULE + bool "ngx_http_fastcgi_module" + default y + help + Enable ngx_http_fastcgi_module + +config BR2_PACKAGE_NGINX_HTTP_UWSGI_MODULE + bool "ngx_http_uwsgi_module" + default y + help + Enable ngx_http_uwsgi_module + +config BR2_PACKAGE_NGINX_HTTP_SCGI_MODULE + bool "ngx_http_scgi_module" + default y + help + Enable ngx_http_scgi_module + +config BR2_PACKAGE_NGINX_HTTP_MEMCACHED_MODULE + bool "ngx_http_memcached_module" + default y + help + Enable ngx_http_memcached_module + +config BR2_PACKAGE_NGINX_HTTP_LIMIT_CONN_MODULE + bool "ngx_http_limit_conn_module" + default y + help + Enable ngx_http_limit_conn_module + +config BR2_PACKAGE_NGINX_HTTP_LIMIT_REQ_MODULE + bool "ngx_http_limit_req_module" + default y + help + Enable ngx_http_limit_req_module + +config BR2_PACKAGE_NGINX_HTTP_EMPTY_GIF_MODULE + bool "ngx_http_empty_gif_module" + default y + help + Enable ngx_http_empty_gif_module + +config BR2_PACKAGE_NGINX_HTTP_BROWSER_MODULE + bool "ngx_http_browser_module" + default y + help + Enable ngx_http_browser_module + +config BR2_PACKAGE_NGINX_HTTP_UPSTREAM_IP_HASH_MODULE + bool "ngx_http_upstream_ip_hash_module" + default y + help + Enable ngx_http_upstream_ip_hash_module + +config BR2_PACKAGE_NGINX_HTTP_UPSTREAM_LEAST_CONN_MODULE + bool "ngx_http_upstream_least_conn_module" + default y + help + Enable ngx_http_upstream_least_conn_module + +config BR2_PACKAGE_NGINX_HTTP_UPSTREAM_KEEPALIVE_MODULE + bool "ngx_http_upstream_keepalive_module" + default y + help + Enable ngx_http_upstream_keepalive_module + +endif #BR2_PACKAGE_NGINX_HTTP + +config BR2_PACKAGE_NGINX_MAIL + bool "mail proxy modules" + +if BR2_PACKAGE_NGINX_MAIL + +config BR2_PACKAGE_NGINX_MAIL_SSL_MODULE + bool "ngx_mail_ssl_module" + select BR2_PACKAGE_OPENSSL + help + Enable ngx_mail_ssl_module + +config BR2_PACKAGE_NGINX_MAIL_POP3_MODULE + bool "ngx_mail_pop3_module" + default y + help + Enable ngx_mail_pop3_module + +config BR2_PACKAGE_NGINX_MAIL_IMAP_MODULE + bool "ngx_mail_imap_module" + default y + help + Enable ngx_mail_imap_module + +config BR2_PACKAGE_NGINX_MAIL_SMTP_MODULE + bool "ngx_mail_smtp_module" + default y + help + Enable ngx_mail_smtp_module + +endif #BR2_PACKAGE_NGINX_MAIL + +config BR2_PACKAGE_NGINX_STREAM + bool "stream proxy modules" + +if BR2_PACKAGE_NGINX_STREAM + +config BR2_PACKAGE_NGINX_STREAM_SSL_MODULE + bool "ngx_stream_ssl_module" + select BR2_PACKAGE_OPENSSL + help + Enable ngx_stream_ssl_module + +config BR2_PACKAGE_NGINX_STREAM_LIMIT_CONN_MODULE + bool "ngx_stream_limit_conn_module" + default y + help + Enable ngx_stream_limit_conn_module + +config BR2_PACKAGE_NGINX_STREAM_ACCESS_MODULE + bool "ngx_stream_access_module" + default y + help + Enable ngx_stream_access_module + +config BR2_PACKAGE_NGINX_STREAM_UPSTREAM_HASH_MODULE + bool "ngx_stream_upstream_hash_module" + default y + help + Enable ngx_stream_upstream_hash_module + +config BR2_PACKAGE_NGINX_STREAM_UPSTREAM_LEAST_CONN_MODULE + bool "ngx_stream_upstream_least_conn_module" + default y + help + Enable ngx_stream_upstream_least_conn_module + +config BR2_PACKAGE_NGINX_STREAM_UPSTREAM_ZONE_MODULE + bool "ngx_stream_upstream_zone_module" + default y + help + Enable ngx_stream_upstream_zone_module + +endif #BR2_PACKAGE_NGINX_STREAM + +config BR2_PACKAGE_NGINX_DEBUG + bool "debug logging" + help + Enable debug logging. The debug level should be set with + the error_log directive. For example + + error_log /var/log/nginx/error.log debug; + +comment "misc. modules" + +config BR2_PACKAGE_NGINX_SELECT_MODULE + bool "ngx_select_module" + help + Enable ngx_select_module + +config BR2_PACKAGE_NGINX_POLL_MODULE + bool "ngx_poll_module" + help + Enable ngx_poll_module + +config BR2_PACKAGE_NGINX_ADD_MODULES + string "additional modules" + help + Space separated list of urls of the additional modules + +endif diff --git a/package/nginx/S50nginx b/package/nginx/S50nginx new file mode 100755 index 0000000000..b2f8b80855 --- /dev/null +++ b/package/nginx/S50nginx @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Start/stop nginx +# + +PIDFILE=/var/run/nginx.pid + +case "$1" in + start) + echo "Starting nginx..." + mkdir -p /var/log/nginx /var/tmp/nginx + start-stop-daemon -S -x /usr/sbin/nginx -p $PIDFILE + ;; + stop) + printf "Stopping nginx..." + start-stop-daemon -K -o -p $PIDFILE + ;; + restart|reload) + "$0" stop + "$0" start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/nginx/nginx.hash b/package/nginx/nginx.hash new file mode 100644 index 0000000000..394f4d2c80 --- /dev/null +++ b/package/nginx/nginx.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 8ed647c3dd65bc4ced03b0e0f6bf9e633eff6b01bac772bcf97077d58bc2be4d nginx-1.10.0.tar.gz diff --git a/package/nginx/nginx.logrotate b/package/nginx/nginx.logrotate new file mode 100644 index 0000000000..e0fa9ec4ce --- /dev/null +++ b/package/nginx/nginx.logrotate @@ -0,0 +1,9 @@ +/var/log/nginx/*log { + missingok + create 640 http log + sharedscripts + compress + postrotate + test ! -r /var/run/nginx.pid || kill -USR1 `cat /var/run/nginx.pid` + endscript +} diff --git a/package/nginx/nginx.mk b/package/nginx/nginx.mk new file mode 100644 index 0000000000..fecef7b8f7 --- /dev/null +++ b/package/nginx/nginx.mk @@ -0,0 +1,280 @@ +################################################################################ +# +# nginx +# +################################################################################ + +NGINX_VERSION = 1.10.0 +NGINX_SITE = http://nginx.org/download +NGINX_LICENSE = BSD-2c +NGINX_LICENSE_FILES = LICENSE +NGINX_DEPENDENCIES = host-pkgconf + +NGINX_CONF_OPTS = \ + --crossbuild=Linux::$(BR2_ARCH) \ + --with-cc="$(TARGET_CC)" \ + --with-cpp="$(TARGET_CC)" \ + --with-ld-opt="$(TARGET_LDFLAGS)" \ + --with-ipv6 + +# www-data user and group are used for nginx. Because these user and group +# are already set by buildroot, it is not necessary to redefine them. +# See system/skeleton/etc/passwd +# username: www-data uid: 33 +# groupname: www-data gid: 33 +# +# So, we just need to create the directories used by nginx with the right +# ownership. +define NGINX_PERMISSIONS + /var/lib/nginx d 755 33 33 - - - - - +endef + +# disable external libatomic_ops because its detection fails. +NGINX_CONF_ENV += \ + ngx_force_c_compiler=yes \ + ngx_force_c99_have_variadic_macros=yes \ + ngx_force_gcc_have_variadic_macros=yes \ + ngx_force_gcc_have_atomic=yes \ + ngx_force_have_epoll=yes \ + ngx_force_have_sendfile=yes \ + ngx_force_have_sendfile64=yes \ + ngx_force_have_pr_set_dumpable=yes \ + ngx_force_have_timer_event=yes \ + ngx_force_have_map_anon=yes \ + ngx_force_have_map_devzero=yes \ + ngx_force_have_sysvshm=yes \ + ngx_force_have_posix_sem=yes + +# prefix: nginx root configuration location +NGINX_CONF_OPTS += \ + --prefix=/usr \ + --conf-path=/etc/nginx/nginx.conf \ + --sbin-path=/usr/sbin/nginx \ + --pid-path=/var/run/nginx.pid \ + --lock-path=/var/run/lock/nginx.lock \ + --user=www-data \ + --group=www-data \ + --error-log-path=/var/log/nginx/error.log \ + --http-log-path=/var/log/nginx/access.log \ + --http-client-body-temp-path=/var/tmp/nginx/client-body \ + --http-proxy-temp-path=/var/tmp/nginx/proxy \ + --http-fastcgi-temp-path=/var/tmp/nginx/fastcgi \ + --http-scgi-temp-path=/var/tmp/nginx/scgi \ + --http-uwsgi-temp-path=/var/tmp/nginx/uwsgi + +NGINX_CONF_OPTS += \ + $(if $(BR2_PACKAGE_NGINX_FILE_AIO),--with-file-aio) \ + $(if $(BR2_PACKAGE_NGINX_THREADS),--with-threads) + +ifeq ($(BR2_PACKAGE_LIBATOMIC_OPS),y) +NGINX_DEPENDENCIES += libatomic_ops +NGINX_CONF_OPTS += --with-libatomic +NGINX_CONF_ENV += ngx_force_have_libatomic=yes +ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y) +NGINX_CFLAGS += "-DAO_NO_SPARC_V9" +endif +else +NGINX_CONF_ENV += ngx_force_have_libatomic=no +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +NGINX_DEPENDENCIES += pcre +NGINX_CONF_OPTS += --with-pcre +else +NGINX_CONF_OPTS += --without-pcre +endif + +# modules disabled or not activated because of missing dependencies: +# - google_perftools (googleperftools) +# - http_geoip_module (geoip) +# - http_perl_module (host-perl) +# - pcre-jit (want to rebuild pcre) + +# Notes: +# * Feature/module option are *not* symetric. +# If a feature is on by default, only its --without-xxx option exists; +# if a feature is off by default, only its --with-xxx option exists. +# * The configure script fails if unknown options are passed on the command +# line. + +# misc. modules +NGINX_CONF_OPTS += \ + $(if $(BR2_PACKAGE_NGINX_SELECT_MODULE),--with-select_module,--without-select_module) \ + $(if $(BR2_PACKAGE_NGINX_POLL_MODULE),--with-poll_module,--without-poll_module) + +ifneq ($(BR2_PACKAGE_NGINX_ADD_MODULES),) +NGINX_CONF_OPTS += \ + $(addprefix --add-module=,$(call qstrip,$(BR2_PACKAGE_NGINX_ADD_MODULES))) +endif + +# http server modules +ifeq ($(BR2_PACKAGE_NGINX_HTTP),y) +ifeq ($(BR2_PACKAGE_NGINX_HTTP_CACHE),y) +NGINX_DEPENDENCIES += openssl +else +NGINX_CONF_OPTS += --without-http-cache +endif + +ifeq ($(BR2_PACKAGE_NGINX_HTTP_V2_MODULE),y) +NGINX_DEPENDENCIES += zlib +NGINX_CONF_OPTS += --with-http_v2_module +endif + +ifeq ($(BR2_PACKAGE_NGINX_HTTP_SSL_MODULE),y) +NGINX_DEPENDENCIES += openssl +NGINX_CONF_OPTS += --with-http_ssl_module +endif + +ifeq ($(BR2_PACKAGE_NGINX_HTTP_XSLT_MODULE),y) +NGINX_DEPENDENCIES += libxml2 libxslt +NGINX_CONF_OPTS += --with-http_xslt_module +endif + +ifeq ($(BR2_PACKAGE_NGINX_HTTP_IMAGE_FILTER_MODULE),y) +NGINX_DEPENDENCIES += gd jpeg libpng +NGINX_CONF_OPTS += --with-http_image_filter_module +endif + +ifeq ($(BR2_PACKAGE_NGINX_HTTP_GUNZIP_MODULE),y) +NGINX_DEPENDENCIES += zlib +NGINX_CONF_OPTS += --with-http_gunzip_module +endif + +ifeq ($(BR2_PACKAGE_NGINX_HTTP_GZIP_STATIC_MODULE),y) +NGINX_DEPENDENCIES += zlib +NGINX_CONF_OPTS += --with-http_gzip_static_module +endif + +ifeq ($(BR2_PACKAGE_NGINX_HTTP_SECURE_LINK_MODULE),y) +NGINX_DEPENDENCIES += openssl +NGINX_CONF_OPTS += --with-http_secure_link_module +endif + +ifeq ($(BR2_PACKAGE_NGINX_HTTP_GZIP_MODULE),y) +NGINX_DEPENDENCIES += zlib +else +NGINX_CONF_OPTS += --without-http_gzip_module +endif + +ifeq ($(BR2_PACKAGE_NGINX_HTTP_REWRITE_MODULE),y) +NGINX_DEPENDENCIES += pcre +else +NGINX_CONF_OPTS += --without-http_rewrite_module +endif + +NGINX_CONF_OPTS += \ + $(if $(BR2_PACKAGE_NGINX_HTTP_REALIP_MODULE),--with-http_realip_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_ADDITION_MODULE),--with-http_addition_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_SUB_MODULE),--with-http_sub_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_DAV_MODULE),--with-http_dav_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_FLV_MODULE),--with-http_flv_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_MP4_MODULE),--with-http_mp4_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_AUTH_REQUEST_MODULE),--with-http_auth_request_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_RANDOM_INDEX_MODULE),--with-http_random_index_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_DEGRADATION_MODULE),--with-http_degradation_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_STUB_STATUS_MODULE),--with-http_stub_status_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_CHARSET_MODULE),,--without-http_charset_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_SSI_MODULE),,--without-http_ssi_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_USERID_MODULE),,--without-http_userid_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_ACCESS_MODULE),,--without-http_access_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_AUTH_BASIC_MODULE),,--without-http_auth_basic_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_AUTOINDEX_MODULE),,--without-http_autoindex_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_GEO_MODULE),,--without-http_geo_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_MAP_MODULE),,--without-http_map_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_SPLIT_CLIENTS_MODULE),,--without-http_split_clients_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_REFERER_MODULE),,--without-http_referer_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_PROXY_MODULE),,--without-http_proxy_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_FASTCGI_MODULE),,--without-http_fastcgi_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_UWSGI_MODULE),,--without-http_uwsgi_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_SCGI_MODULE),,--without-http_scgi_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_MEMCACHED_MODULE),,--without-http_memcached_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_LIMIT_CONN_MODULE),,--without-http_limit_conn_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_LIMIT_REQ_MODULE),,--without-http_limit_req_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_EMPTY_GIF_MODULE),,--without-http_empty_gif_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_BROWSER_MODULE),,--without-http_browser_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_UPSTREAM_IP_HASH_MODULE),,--without-http_upstream_ip_hash_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_UPSTREAM_LEAST_CONN_MODULE),,--without-http_upstream_least_conn_module) \ + $(if $(BR2_PACKAGE_NGINX_HTTP_UPSTREAM_KEEPALIVE_MODULE),,--without-http_upstream_keepalive_module) + +else # !BR2_PACKAGE_NGINX_HTTP +NGINX_CONF_OPTS += --without-http +endif # BR2_PACKAGE_NGINX_HTTP + +# mail modules +ifeq ($(BR2_PACKAGE_NGINX_MAIL),y) +NGINX_CONF_OPTS += --with-mail + +ifeq ($(BR2_PACKAGE_NGINX_MAIL_SSL_MODULE),y) +NGINX_DEPENDENCIES += openssl +NGINX_CONF_OPTS += --with-mail_ssl_module +endif + +NGINX_CONF_OPTS += \ + $(if $(BR2_PACKAGE_NGINX_MAIL_POP3_MODULE),,--without-mail_pop3_module) \ + $(if $(BR2_PACKAGE_NGINX_MAIL_IMAP_MODULE),,--without-mail_imap_module) \ + $(if $(BR2_PACKAGE_NGINX_MAIL_SMTP_MODULE),,--without-mail_smtp_module) + +endif # BR2_PACKAGE_NGINX_MAIL + +# stream modules +ifeq ($(BR2_PACKAGE_NGINX_STREAM),y) +NGINX_CONF_OPTS += --with-stream + +ifeq ($(BR2_PACKAGE_NGINX_STREAM_SSL_MODULE),y) +NGINX_DEPENDENCIES += openssl +NGINX_CONF_OPTS += --with-stream_ssl_module +endif + +NGINX_CONF_OPTS += \ + $(if $(BR2_PACKAGE_NGINX_STREAM_LIMIT_CONN_MODULE),,--without-stream_limit_conn_module) \ + $(if $(BR2_PACKAGE_NGINX_STREAM_ACCESS_MODULE),,--without-stream_access_module) \ + $(if $(BR2_PACKAGE_NGINX_STREAM_UPSTREAM_HASH_MODULE),,--without-stream_upstream_hash_module) \ + $(if $(BR2_PACKAGE_NGINX_STREAM_UPSTREAM_LEAST_CONN_MODULE),,--without-stream_upstream_least_conn_module) \ + $(if $(BR2_PACKAGE_NGINX_STREAM_UPSTREAM_ZONE_MODULE),,--without-stream_upstream_zone_module) + +endif # BR2_PACKAGE_NGINX_STREAM + +# Debug logging +NGINX_CONF_OPTS += $(if $(BR2_PACKAGE_NGINX_DEBUG),--with-debug) + +define NGINX_DISABLE_WERROR + $(SED) 's/-Werror//g' -i $(@D)/auto/cc/* +endef + +NGINX_PRE_CONFIGURE_HOOKS += NGINX_DISABLE_WERROR + +define NGINX_CONFIGURE_CMDS + cd $(@D) ; $(NGINX_CONF_ENV) \ + PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + GDLIB_CONFIG=$(STAGING_DIR)/usr/bin/gdlib-config \ + ./configure $(NGINX_CONF_OPTS) \ + --with-cc-opt="$(TARGET_CFLAGS) $(NGINX_CFLAGS)" +endef + +define NGINX_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define NGINX_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + $(RM) $(TARGET_DIR)/usr/sbin/nginx.old + $(INSTALL) -D -m 0664 package/nginx/nginx.logrotate \ + $(TARGET_DIR)/etc/logrotate.d/nginx +endef + +define NGINX_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/nginx/nginx.service \ + $(TARGET_DIR)/usr/lib/systemd/system/nginx.service + + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + + ln -fs ../../../../usr/lib/systemd/system/nginx.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nginx.service +endef + +define NGINX_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/nginx/S50nginx \ + $(TARGET_DIR)/etc/init.d/S50nginx +endef + +$(eval $(generic-package)) diff --git a/package/nginx/nginx.service b/package/nginx/nginx.service new file mode 100644 index 0000000000..320df9a80e --- /dev/null +++ b/package/nginx/nginx.service @@ -0,0 +1,16 @@ +[Unit] +Description=A high performance web server and a reverse proxy server +After=syslog.target network.target + +[Service] +Type=forking +PIDFile=/var/run/nginx.pid +ExecStartPre=/usr/bin/mkdir -p /var/log/nginx /var/tmp/nginx +ExecStartPre=/usr/sbin/nginx -t -q -g 'pid /var/run/nginx.pid; daemon on; master_process on;' +ExecStart=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;' +ExecReload=/usr/sbin/nginx -g 'pid /var/run/nginx.pid; daemon on; master_process on;' -s reload +ExecStop=/usr/sbin/nginx -g 'pid /var/run/nginx.pid;' -s quit +PrivateDevices=yes + +[Install] +WantedBy=multi-user.target diff --git a/package/ngircd/Config.in b/package/ngircd/Config.in new file mode 100644 index 0000000000..f1d8bea904 --- /dev/null +++ b/package/ngircd/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_NGIRCD + bool "ngircd" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_ZLIB + help + Next Generation IRC server deamon. + + http://ngircd.barton.de diff --git a/package/ngircd/ngircd.hash b/package/ngircd/ngircd.hash new file mode 100644 index 0000000000..45e2d9e825 --- /dev/null +++ b/package/ngircd/ngircd.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 93f953b2785ff0e6e29b8b3794ba5a64754b86251ce71bf39fc27f4f5074eada ngircd-20.3.tar.xz diff --git a/package/ngircd/ngircd.mk b/package/ngircd/ngircd.mk new file mode 100644 index 0000000000..927474c8f3 --- /dev/null +++ b/package/ngircd/ngircd.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# ngircd +# +################################################################################ + +NGIRCD_VERSION = 20.3 +NGIRCD_SOURCE = ngircd-$(NGIRCD_VERSION).tar.xz +NGIRCD_SITE = http://arthur.barton.de/pub/ngircd +NGIRCD_DEPENDENCIES = zlib +NGIRCD_LICENSE = GPLv2+ +NGIRCD_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/ngrep/0001-make-objs.patch b/package/ngrep/0001-make-objs.patch new file mode 100644 index 0000000000..8b55e3f456 --- /dev/null +++ b/package/ngrep/0001-make-objs.patch @@ -0,0 +1,23 @@ +ngrep: don't include regex objects since we're using pcre + +Signed-off-by: Wade Berrier + +--- ngrep-1.45/Makefile.in.orig 2006-11-28 06:35:37.000000000 -0700 ++++ ngrep-1.45/Makefile.in 2011-06-29 14:05:27.000000000 -0600 +@@ -32,13 +32,13 @@ + + INSTALL = ./install-sh + +-REGEX_DIR=@REGEX_DIR@ +-REGEX_OBJS=@REGEX_OBJS@ ++REGEX_DIR= ++REGEX_OBJS= + + + all: $(TARGET) + +-$(TARGET): $(REGEX_OBJS) $(OBJS) ++$(TARGET): $(OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) $(STRIPFLAG) -o $(TARGET) $(OBJS) $(REGEX_OBJS) $(LIBS) + + debug: $(REGEX_OBJS) $(OBJS) diff --git a/package/ngrep/0002-pcre-header.patch b/package/ngrep/0002-pcre-header.patch new file mode 100644 index 0000000000..40b9234dbc --- /dev/null +++ b/package/ngrep/0002-pcre-header.patch @@ -0,0 +1,16 @@ +ngrep: don't use versioned header + +Signed-off-by: Wade Berrier + +diff -ur ngrep-1.45/ngrep.c ngrep-1.45.mod/ngrep.c +--- ngrep-1.45/ngrep.c Tue Nov 28 15:38:43 2006 ++++ ngrep-1.45.mod/ngrep.c Sat May 19 10:21:27 2007 +@@ -92,7 +92,7 @@ + #endif + + #if USE_PCRE +-#include "pcre-5.0/pcre.h" ++#include "pcre.h" + #else + #include "regex-0.12/regex.h" + #endif diff --git a/package/ngrep/0003-fix-static-link.patch b/package/ngrep/0003-fix-static-link.patch new file mode 100644 index 0000000000..98c262696d --- /dev/null +++ b/package/ngrep/0003-fix-static-link.patch @@ -0,0 +1,25 @@ +ngrep: fix static link with pcre + +Libraries must be placed after object files. + +Signed-off-by: Romain Naour +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 2ae4506..761d7d9 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -11,7 +11,7 @@ CFLAGS=@CFLAGS@ -D@OS@ @DEFS@ @EXTRA_DEFINES@ + INCLUDES=-I@srcdir@ @PCAP_INCLUDE@ @EXTRA_INCLUDES@ + + LDFLAGS=@LDFLAGS@ @PCAP_LINK@ +-LIBS=-lpcap @EXTRA_LIBS@ ++LIBS=@LIBS@ @EXTRA_LIBS@ + + STRIPFLAG=@STRIPFLAG@ + +-- +1.8.1.4 + diff --git a/package/ngrep/Config.in b/package/ngrep/Config.in new file mode 100644 index 0000000000..cd91225791 --- /dev/null +++ b/package/ngrep/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_NGREP + bool "ngrep" + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_PCRE + help + Network grep. + + http://ngrep.sourceforge.net/ diff --git a/package/ngrep/ngrep.hash b/package/ngrep/ngrep.hash new file mode 100644 index 0000000000..e0a6a2580b --- /dev/null +++ b/package/ngrep/ngrep.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 aea6dd337da8781847c75b3b5b876e4de9c58520e0d77310679a979fc6402fa7 ngrep-1.45.tar.bz2 diff --git a/package/ngrep/ngrep.mk b/package/ngrep/ngrep.mk new file mode 100644 index 0000000000..c4ad528292 --- /dev/null +++ b/package/ngrep/ngrep.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# ngrep +# +################################################################################ + +NGREP_VERSION = 1.45 +NGREP_SOURCE = ngrep-$(NGREP_VERSION).tar.bz2 +NGREP_SITE = http://downloads.sourceforge.net/project/ngrep/ngrep/$(NGREP_VERSION) +NGREP_LICENSE = BSD-4c-like +NGREP_LICENSE_FILES = LICENSE.txt +NGREP_INSTALL_STAGING = YES + +NGREP_LIBS = -lpcap -lpcre +ifeq ($(BR2_STATIC_LIBS),y) +NGREP_LIBS += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs` +endif +NGREP_CONF_ENV += LIBS+="$(NGREP_LIBS)" + +NGREP_CONF_OPTS = \ + --with-pcap-includes=$(STAGING_DIR)/usr/include/pcap \ + --enable-pcre \ + --with-pcre=$(STAGING_DIR)/usr \ + --disable-dropprivs + +NGREP_DEPENDENCIES = libpcap pcre + +$(eval $(autotools-package)) diff --git a/package/nload/Config.in b/package/nload/Config.in new file mode 100644 index 0000000000..68ddbe6ca7 --- /dev/null +++ b/package/nload/Config.in @@ -0,0 +1,16 @@ +comment "nload needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_NLOAD + bool "nload" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_NCURSES_TARGET_FORM + help + nload is a console application which monitors network traffic + and bandwidth usage in real time. It visualizes the in- and + outgoing traffic using two graphs and provides additional info + like total amount of transfered data and min/max network + usage. + + http://www.roland-riegel.de/nload/ diff --git a/package/nload/nload.hash b/package/nload/nload.hash new file mode 100644 index 0000000000..4a8a09d394 --- /dev/null +++ b/package/nload/nload.hash @@ -0,0 +1,3 @@ +# From https://sourceforge.net/projects/nload/files/nload/0.7.4/ +md5 3c733c528f244ca5a4f76bf185729c39 nload-0.7.4.tar.gz +sha1 bb0a168c93c588ad4fd5e3a653b3620b79ada1e8 nload-0.7.4.tar.gz diff --git a/package/nload/nload.mk b/package/nload/nload.mk new file mode 100644 index 0000000000..1ead61ca0f --- /dev/null +++ b/package/nload/nload.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# nload +# +################################################################################ + +NLOAD_VERSION = 0.7.4 +NLOAD_SITE = http://www.roland-riegel.de/nload +NLOAD_DEPENDENCIES = ncurses +NLOAD_LICENSE = GPLv2+ +NLOAD_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/nmap/0001-libdnet-wrapper-configure.patch b/package/nmap/0001-libdnet-wrapper-configure.patch new file mode 100644 index 0000000000..a85242ad94 --- /dev/null +++ b/package/nmap/0001-libdnet-wrapper-configure.patch @@ -0,0 +1,11 @@ +libdnet: always build a static library + +Signed-off-by: "Yann E. MORIN" + +diff --git a/libdnet-stripped/configure.gnu b/libdnet-stripped/configure.gnu +--- /dev/null ++++ b/libdnet-stripped/configure.gnu +@@ -0,0 +1,3 @@ ++#!/bin/sh ++ ++exec "${0%.gnu}" "${@}" --enable-static --disable-shared diff --git a/package/nmap/Config.in b/package/nmap/Config.in new file mode 100644 index 0000000000..79f587afd1 --- /dev/null +++ b/package/nmap/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_NMAP + bool "nmap" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_PCRE + help + Nmap ("Network Mapper") is a free and open source (license) + utility for network discovery and security auditing. + + http://nmap.org + +comment "nmap needs a toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/nmap/nmap.hash b/package/nmap/nmap.hash new file mode 100644 index 0000000000..448a19b37d --- /dev/null +++ b/package/nmap/nmap.hash @@ -0,0 +1,2 @@ +# From https://nmap.org/dist/sigs/nmap-7.12.tar.bz2.digest.txt +sha256 63df082a87c95a189865d37304357405160fc6333addcf5b84204c95e0539b04 nmap-7.12.tar.bz2 diff --git a/package/nmap/nmap.mk b/package/nmap/nmap.mk new file mode 100644 index 0000000000..46c6232744 --- /dev/null +++ b/package/nmap/nmap.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# nmap +# +################################################################################ + +NMAP_VERSION = 7.12 +NMAP_SITE = http://nmap.org/dist +NMAP_SOURCE = nmap-$(NMAP_VERSION).tar.bz2 +NMAP_DEPENDENCIES = libpcap pcre +NMAP_CONF_OPTS = --without-liblua --without-zenmap \ + --with-libdnet=included --with-liblinear=included \ + --with-libpcre="$(STAGING_DIR)/usr" --without-ncat +NMAP_LICENSE = GPLv2 +NMAP_LICENSE_FILES = COPYING + +# needed by libpcap +NMAP_LIBS_FOR_STATIC_LINK += `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs` + +ifeq ($(BR2_STATIC_LIBS),y) +NMAP_CONF_ENV += LIBS="$(NMAP_LIBS_FOR_STATIC_LINK)" +endif + +# for 0001-libdnet-wrapper-configure.patch +define NMAP_WRAPPER_EXEC + chmod +x $(@D)/libdnet-stripped/configure.gnu +endef +NMAP_POST_PATCH_HOOKS += NMAP_WRAPPER_EXEC + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +NMAP_CONF_OPTS += --with-openssl="$(STAGING_DIR)/usr" +NMAP_DEPENDENCIES += host-pkgconf openssl +NMAP_LIBS_FOR_STATIC_LINK += `$(PKG_CONFIG_HOST_BINARY) --libs openssl` +else +NMAP_CONF_OPTS += --without-openssl +endif + +# ndiff only works with python2.x +ifeq ($(BR2_PACKAGE_PYTHON),y) +NMAP_DEPENDENCIES += python +else +NMAP_CONF_OPTS += --without-ndiff +endif + +$(eval $(autotools-package)) diff --git a/package/nodejs/0.10.45/0001-remove-python-bz2-dependency.patch b/package/nodejs/0.10.45/0001-remove-python-bz2-dependency.patch new file mode 100644 index 0000000000..75fe437502 --- /dev/null +++ b/package/nodejs/0.10.45/0001-remove-python-bz2-dependency.patch @@ -0,0 +1,27 @@ +Remove dependency on Python bz2 module + +The Python bz2 module is only needed in certain cases, so only import +it when needed. In the normal nodejs build, this allows to remove the +dependency on this module. + +Signed-off-by: Thomas Petazzoni +Index: b/deps/v8/tools/js2c.py +=================================================================== +--- a/deps/v8/tools/js2c.py ++++ b/deps/v8/tools/js2c.py +@@ -33,7 +33,6 @@ + + import os, re, sys, string + import jsmin +-import bz2 + + + def ToCAsciiArray(lines): +@@ -344,6 +343,7 @@ + else: + raw_sources_declaration = RAW_SOURCES_COMPRESSION_DECLARATION + if env['COMPRESSION'] == 'bz2': ++ import bz2 + all_sources = bz2.compress("".join(all_sources)) + total_length = len(all_sources) + sources_data = ToCArray(all_sources) diff --git a/package/nodejs/0.10.45/0002-gyp-force-link-command-to-use-CXX.patch b/package/nodejs/0.10.45/0002-gyp-force-link-command-to-use-CXX.patch new file mode 100644 index 0000000000..a2f02abf34 --- /dev/null +++ b/package/nodejs/0.10.45/0002-gyp-force-link-command-to-use-CXX.patch @@ -0,0 +1,26 @@ +From 00d809e9305241f8636a2d75e22c493293e6971a Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 20 Apr 2014 15:03:01 +0200 +Subject: [PATCH] gyp: force link command to use CXX + +Signed-off-by: Samuel Martin +--- + tools/gyp/pylib/gyp/generator/make.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py +index 0de510e..54e4c96 100644 +--- a/tools/gyp/pylib/gyp/generator/make.py ++++ b/tools/gyp/pylib/gyp/generator/make.py +@@ -134,7 +134,7 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) + # special "figure out circular dependencies" flags around the entire + # input list during linking. + quiet_cmd_link = LINK($(TOOLSET)) $@ +-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) ++cmd_link = $(CXX.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) + + # We support two kinds of shared objects (.so): + # 1) shared_library, which is just bundling together many dependent libraries +-- +1.9.2 + diff --git a/package/nodejs/0.10.45/0003-fix-musl-USE-MISC-build-issue.patch b/package/nodejs/0.10.45/0003-fix-musl-USE-MISC-build-issue.patch new file mode 100644 index 0000000000..128058df29 --- /dev/null +++ b/package/nodejs/0.10.45/0003-fix-musl-USE-MISC-build-issue.patch @@ -0,0 +1,47 @@ +From 0bc482abeb814573251ecafb5a1e045c885b13a2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Mon, 25 May 2015 16:22:57 +0200 +Subject: [PATCH 1/1] Fix musl __USE_MISC issue +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The musl C library does not define __USE_MISC and so libuv (built-in dependency) +does not use the correct struct stat definition for musl. + +The feature test macro __USE_MISC is defined by glibc if _BSD_SOURCE or +_SVID_SOURCE is defined. + +The libuv build system enables the feature test macro _GNU_SOURCE for linux +builds. + +Since glibc 2.19, defining _GNU_SOURCE also has the effect of implicitly +defining _DEFAULT_SOURCE - the replacement for _BSD_SOURCE and _SVID_SOURCE. + +In glibc versions before 2.20, defining _GNU_SOURCE also had the effect of +implicitly defining _BSD_SOURCE and _SVID_SOURCE. This is also true for uClibc. + +Alltogether, we can safely replace __USE_MISC by _GNU_SOURCE to support building +nodejs 0.10.x with the musl C library. + +Signed-off-by: Jörg Krause +--- + deps/uv/src/fs-poll.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/deps/uv/src/fs-poll.c b/deps/uv/src/fs-poll.c +index ad27f18..094447e 100644 +--- a/deps/uv/src/fs-poll.c ++++ b/deps/uv/src/fs-poll.c +@@ -198,7 +198,7 @@ static int statbuf_eq(const uv_statbuf_t* a, const uv_statbuf_t* b) { + + /* Jump through a few hoops to get sub-second granularity on Linux. */ + # if defined(__linux__) +-# if defined(__USE_MISC) /* _BSD_SOURCE || _SVID_SOURCE */ ++# if defined(_GNU_SOURCE) /* _BSD_SOURCE || _SVID_SOURCE */ + if (a->st_ctim.tv_nsec != b->st_ctim.tv_nsec) return 0; + if (a->st_mtim.tv_nsec != b->st_mtim.tv_nsec) return 0; + # else +-- +2.4.1 + diff --git a/package/nodejs/0.10.45/0004-Fix-support-for-uClibc-ng.patch b/package/nodejs/0.10.45/0004-Fix-support-for-uClibc-ng.patch new file mode 100644 index 0000000000..59b9d5044c --- /dev/null +++ b/package/nodejs/0.10.45/0004-Fix-support-for-uClibc-ng.patch @@ -0,0 +1,33 @@ +From 1cc08f6ceacbb0e5ba1f4638ca3a97ac002d7792 Mon Sep 17 00:00:00 2001 +From: "Bark, Martin" +Date: Mon, 14 Dec 2015 13:26:10 +0000 +Subject: [PATCH 2/2] Fix support for uClibc-ng + +uClibc-ng is currently at v1.0.9. The patch corrects the uClibc +version test so that HAVE_IFADDRS_H is defined for uClibc versions +after v0.9.32. + +Submitted upstream to libuv and accepted, see +https://github.com/libuv/libuv/pull/653 and +https://github.com/libuv/libuv/commit/c861972 + +Signed-off-by: Bark, Martin +--- + deps/uv/src/unix/linux-core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/deps/uv/src/unix/linux-core.c b/deps/uv/src/unix/linux-core.c +index e6e6828..6cbbb71 100644 +--- a/deps/uv/src/unix/linux-core.c ++++ b/deps/uv/src/unix/linux-core.c +@@ -39,7 +39,7 @@ + #define HAVE_IFADDRS_H 1 + + #ifdef __UCLIBC__ +-# if __UCLIBC_MAJOR__ < 0 || __UCLIBC_MINOR__ < 9 || __UCLIBC_SUBLEVEL__ < 32 ++# if __UCLIBC_MAJOR__ < 0 && __UCLIBC_MINOR__ < 9 && __UCLIBC_SUBLEVEL__ < 32 + # undef HAVE_IFADDRS_H + # endif + #endif +-- +2.6.2 diff --git a/package/nodejs/6.1.0/0001-gyp-force-link-command-to-use-CXX.patch b/package/nodejs/6.1.0/0001-gyp-force-link-command-to-use-CXX.patch new file mode 100644 index 0000000000..5746582c14 --- /dev/null +++ b/package/nodejs/6.1.0/0001-gyp-force-link-command-to-use-CXX.patch @@ -0,0 +1,29 @@ +From 90a3c113c19ec615249ab880c45c6c0a8d369098 Mon Sep 17 00:00:00 2001 +From: Martin Bark +Date: Tue, 30 Jun 2015 09:43:47 +0100 +Subject: [PATCH 2/4] gyp: force link command to use CXX + +Signed-off-by: Samuel Martin +Signed-off-by: Martin Bark +[yann.morin.1998@free.fr: adapt to 4.1.2] +Signed-off-by: "Yann E. MORIN" +--- + tools/gyp/pylib/gyp/generator/make.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/gyp/pylib/gyp/generator/make.py b/tools/gyp/pylib/gyp/generator/make.py +index b88a433..0a1f2e0 100644 +--- a/tools/gyp/pylib/gyp/generator/make.py ++++ b/tools/gyp/pylib/gyp/generator/make.py +@@ -142,7 +142,7 @@ cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^) + # special "figure out circular dependencies" flags around the entire + # input list during linking. + quiet_cmd_link = LINK($(TOOLSET)) $@ +-cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) ++cmd_link = $(CXX.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ -Wl,--start-group $(LD_INPUTS) -Wl,--end-group $(LIBS) + + # We support two kinds of shared objects (.so): + # 1) shared_library, which is just bundling together many dependent libraries +-- +2.1.4 + diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in new file mode 100644 index 0000000000..70dacc800c --- /dev/null +++ b/package/nodejs/Config.in @@ -0,0 +1,107 @@ +comment "nodejs needs a toolchain w/ C++, dynamic library, threads, gcc >= 4.8, wchar" + depends on BR2_USE_MMU + depends on BR2_arm || BR2_i386 || BR2_x86_64 || BR2_mipsel + depends on !BR2_MIPS_SOFT_FLOAT + depends on !BR2_ARM_CPU_ARMV4 + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_HOST_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR + +config BR2_PACKAGE_NODEJS + bool "nodejs" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_arm || BR2_i386 || BR2_x86_64 || BR2_mipsel + depends on !BR2_MIPS_SOFT_FLOAT + # ARM needs BLX, so v5t+ + depends on !BR2_ARM_CPU_ARMV4 + # 0.10.x could be built without the following toolchain dependencies but + # simplify things by requiring these basic dependencies for all versions. + depends on BR2_HOST_GCC_AT_LEAST_4_8 + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + depends on BR2_USE_WCHAR + # uses fork() + depends on BR2_USE_MMU + # uses dlopen(). On ARMv5, we could technically support static + # linking, but that's too much of a corner case to support it. + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_ZLIB + help + Event-driven I/O server-side JavaScript environment based on V8. + + http://nodejs.org/ + +if BR2_PACKAGE_NODEJS + +# Starting with 0.12.x, on ARM, V8 (the JS engine) +# now requires an armv6+ and a VFPv2+. +config BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS + bool + # On supported architectures other than ARM, no special requirement + default y if !BR2_arm + # On ARM, at least ARMv6+ with VFPv2+ is needed + default y if !BR2_ARM_CPU_ARMV5 && BR2_ARM_CPU_HAS_VFPV2 + +config BR2_PACKAGE_NODEJS_VERSION_STRING + string + default "6.1.0" if BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS + default "0.10.45" + +menu "Module Selection" + +config BR2_PACKAGE_NODEJS_NPM + bool "NPM for the target" + select BR2_PACKAGE_OPENSSL + help + NPM is the package manager for the Node JavaScript platform. + Note that enabling NPM on the target also selects OpenSSL for the + target. + + http://www.npmjs.org + + Note that NPM is always built for the buildroot host. + +config BR2_PACKAGE_NODEJS_MODULES_EXPRESS + bool "Express web application framework" + help + Express is a minimal and flexible node.js web application + framework, providing a robust set of features for building + single and multi-page, and hybrid web applications. + + http://www.expressjs.com + https://github.com/visionmedia/express + +config BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT + bool "CoffeeScript" + help + CoffeeScript is a little language that compiles into JavaScript. + + http://www.coffeescript.org + +config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL + string "Additional modules" + help + List of space-separated nodejs modules to install via npm. + See https://npmjs.org/ to find modules and 'npm help install' + for available installation methods. For repeatable builds, + download and save tgz files or clone git repos for the + components you care about. + + Example: serialport uglify-js@1.3.4 /my/module/mymodule.tgz git://github.com/someuser/somemodule.git#v1.2 + + This would install the serialport module (at the newest version), + the uglify-js module at 1.3.4, a module from a filesystem path, + and a module from a git repository. + +config BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS + string "Additional module dependencies" + help + List of space-separated buildroot recipes which must be built before + your npms can be installed. For example, if in 'Additional modules' + you specified 'node-curl' (see: + https://github.com/jiangmiao/node-curl), you could then specify + 'libcurl' here, to ensure that buildroot builds the libcurl package, + and does so before building your node modules. + +endmenu + +endif diff --git a/package/nodejs/nodejs.hash b/package/nodejs/nodejs.hash new file mode 100644 index 0000000000..f417df2075 --- /dev/null +++ b/package/nodejs/nodejs.hash @@ -0,0 +1,5 @@ +# From upstream URL: http://nodejs.org/dist/v0.10.45/SHASUMS256.txt +sha256 a71070ea7aece9c94450b45102f2d1be42f0add168dd9c9701e9032d363bd4fa node-v0.10.45.tar.xz + +# From upstream URL: http://nodejs.org/dist/v6.1.0/SHASUMS256.txt +sha256 c7940301917232527490a166df78f9d3d58e70e10fd502f73889d936763cfe84 node-v6.1.0.tar.xz diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk new file mode 100644 index 0000000000..b0661ed986 --- /dev/null +++ b/package/nodejs/nodejs.mk @@ -0,0 +1,161 @@ +################################################################################ +# +# nodejs +# +################################################################################ + +NODEJS_VERSION = $(call qstrip,$(BR2_PACKAGE_NODEJS_VERSION_STRING)) +NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.xz +NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION) +NODEJS_DEPENDENCIES = host-python host-nodejs zlib \ + $(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL_DEPS)) +HOST_NODEJS_DEPENDENCIES = host-python host-zlib +NODEJS_LICENSE = MIT (core code); MIT, Apache and BSD family licenses (Bundled components) +NODEJS_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +NODEJS_DEPENDENCIES += openssl +endif + +# nodejs build system is based on python, but only support python-2.6 or +# python-2.7. So, we have to enforce PYTHON interpreter to be python2. +define HOST_NODEJS_CONFIGURE_CMDS + # The build system directly calls python. Work around this by forcing python2 + # into PATH. See https://github.com/nodejs/node/issues/2735 + mkdir -p $(@D)/bin + ln -sf $(HOST_DIR)/usr/bin/python2 $(@D)/bin/python + + # Build with the static, built-in OpenSSL which is supplied as part of + # the nodejs source distribution. This is needed on the host because + # NPM is non-functional without it, and host-openssl isn't part of + # buildroot. + (cd $(@D); \ + $(HOST_CONFIGURE_OPTS) \ + PATH=$(@D)/bin:$(BR_PATH) \ + PYTHON=$(HOST_DIR)/usr/bin/python2 \ + $(HOST_DIR)/usr/bin/python2 ./configure \ + --prefix=$(HOST_DIR)/usr \ + --without-snapshot \ + --without-dtrace \ + --without-etw \ + --shared-zlib \ + ) +endef + +define HOST_NODEJS_BUILD_CMDS + $(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 \ + $(MAKE) -C $(@D) \ + $(HOST_CONFIGURE_OPTS) \ + PATH=$(@D)/bin:$(BR_PATH) +endef + +define HOST_NODEJS_INSTALL_CMDS + $(HOST_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 \ + $(MAKE) -C $(@D) install \ + $(HOST_CONFIGURE_OPTS) \ + PATH=$(@D)/bin:$(BR_PATH) +endef + +ifeq ($(BR2_i386),y) +NODEJS_CPU = ia32 +else ifeq ($(BR2_x86_64),y) +NODEJS_CPU = x64 +else ifeq ($(BR2_mips),y) +NODEJS_CPU = mips +else ifeq ($(BR2_mipsel),y) +NODEJS_CPU = mipsel +else ifeq ($(BR2_arm),y) +NODEJS_CPU = arm +# V8 needs to know what floating point ABI the target is using. +NODEJS_ARM_FP = $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) +endif + +# MIPS architecture specific options +ifeq ($(BR2_mips)$(BR2_mipsel),y) +ifeq ($(BR2_mips_32r6),y) +NODEJS_MIPS_ARCH_VARIANT = r6 +NODEJS_MIPS_FPU_MODE = fp64 +else ifeq ($(BR2_mips_32r2),y) +NODEJS_MIPS_ARCH_VARIANT = r2 +else ifeq ($(BR2_mips_32),y) +NODEJS_MIPS_ARCH_VARIANT = r1 +endif +endif + +define NODEJS_CONFIGURE_CMDS + mkdir -p $(@D)/bin + ln -sf $(HOST_DIR)/usr/bin/python2 $(@D)/bin/python + + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + PATH=$(@D)/bin:$(BR_PATH) \ + LD="$(TARGET_CXX)" \ + PYTHON=$(HOST_DIR)/usr/bin/python2 \ + $(HOST_DIR)/usr/bin/python2 ./configure \ + --prefix=/usr \ + --without-snapshot \ + --shared-zlib \ + $(if $(BR2_PACKAGE_OPENSSL),--shared-openssl,--without-ssl) \ + $(if $(BR2_PACKAGE_NODEJS_NPM),,--without-npm) \ + --without-dtrace \ + --without-etw \ + --dest-cpu=$(NODEJS_CPU) \ + $(if $(NODEJS_ARM_FP),--with-arm-float-abi=$(NODEJS_ARM_FP)) \ + $(if $(NODEJS_MIPS_ARCH_VARIANT),--with-mips-arch-variant=$(NODEJS_MIPS_ARCH_VARIANT)) \ + $(if $(NODEJS_MIPS_FPU_MODE),--with-mips-fpu-mode=$(NODEJS_MIPS_FPU_MODE)) \ + --dest-os=linux \ + ) +endef + +define NODEJS_BUILD_CMDS + $(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 \ + $(MAKE) -C $(@D) \ + $(TARGET_CONFIGURE_OPTS) \ + PATH=$(@D)/bin:$(BR_PATH) \ + LD="$(TARGET_CXX)" +endef + +# +# Build the list of modules to install based on the booleans for +# popular modules, as well as the "additional modules" list. +# +NODEJS_MODULES_LIST= $(call qstrip,\ + $(if $(BR2_PACKAGE_NODEJS_MODULES_EXPRESS),express) \ + $(if $(BR2_PACKAGE_NODEJS_MODULES_COFFEESCRIPT),coffee-script) \ + $(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL)) + +# Define NPM for other packages to use +NPM = $(TARGET_CONFIGURE_OPTS) \ + LD="$(TARGET_CXX)" \ + npm_config_arch=$(NODEJS_CPU) \ + npm_config_target_arch=$(NODEJS_CPU) \ + npm_config_build_from_source=true \ + npm_config_nodedir=$(BUILD_DIR)/nodejs-$(NODEJS_VERSION) \ + npm_config_prefix=$(TARGET_DIR)/usr \ + $(HOST_DIR)/usr/bin/npm + +# +# We can only call NPM if there's something to install. +# +ifneq ($(NODEJS_MODULES_LIST),) +define NODEJS_INSTALL_MODULES + # If you're having trouble with module installation, adding -d to the + # npm install call below and setting npm_config_rollback=false can both + # help in diagnosing the problem. + $(NPM) install -g $(NODEJS_MODULES_LIST) +endef +endif + +define NODEJS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) PYTHON=$(HOST_DIR)/usr/bin/python2 \ + $(MAKE) -C $(@D) install \ + DESTDIR=$(TARGET_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + PATH=$(@D)/bin:$(BR_PATH) \ + LD="$(TARGET_CXX)" + $(NODEJS_INSTALL_MODULES) +endef + +# node.js configure is a Python script and does not use autotools +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/noip/Config.in b/package/noip/Config.in new file mode 100644 index 0000000000..aea5deb99b --- /dev/null +++ b/package/noip/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_NOIP + bool "noip" + depends on BR2_USE_MMU # fork() + help + Dynamic DNS update client for no-ip.com + + http://www.no-ip.com/downloads.php diff --git a/package/noip/noip.hash b/package/noip/noip.hash new file mode 100644 index 0000000000..166438db48 --- /dev/null +++ b/package/noip/noip.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 82b9bafab96a0c53b21aaef688bf70b3572e26217b5e2072bdb09da3c4a6f593 noip-duc-linux.tar.gz diff --git a/package/noip/noip.mk b/package/noip/noip.mk new file mode 100644 index 0000000000..a61d141832 --- /dev/null +++ b/package/noip/noip.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# noip +# +################################################################################ + +NOIP_VERSION = 2.1.9 +NOIP_SITE = http://www.no-ip.com/client/linux +NOIP_SOURCE = noip-duc-linux.tar.gz +NOIP_LICENSE = GPLv2+ +NOIP_LICENSE_FILES = COPYING + +define NOIP_BUILD_CMDS + $(SED) "/^#define CONFIG_FILENAME/ s/PREFIX//" $(@D)/noip2.c + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" PREFIX=/usr CONFDIR=/etc +endef + +define NOIP_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/noip2 $(TARGET_DIR)/usr/sbin/noip2 +endef + +$(eval $(generic-package)) diff --git a/package/norm/0001-fix-bigendian-build.patch b/package/norm/0001-fix-bigendian-build.patch new file mode 100644 index 0000000000..cf999c27cf --- /dev/null +++ b/package/norm/0001-fix-bigendian-build.patch @@ -0,0 +1,17 @@ +Fix big-endian build breakage in protolib. +Patch status: submitted to author via email. + +Signed-off-by: Gustavo Zacarias + +diff -Nura norm-1.5r6.orig/protolib/include/protoSpace.h norm-1.5r6/protolib/include/protoSpace.h +--- norm-1.5r6.orig/protolib/include/protoSpace.h 2016-03-08 19:48:21.326357963 -0300 ++++ norm-1.5r6/protolib/include/protoSpace.h 2016-03-08 19:48:46.647234075 -0300 +@@ -89,7 +89,7 @@ + } + #else + ProtoTree::Endian GetEndian() const +- return ProtoTree::ENDIAN_BIG; ++ {return ProtoTree::ENDIAN_BIG;} + void SetNode(Node* theNode) + {memcpy(key+sizeof(double), &theNode, sizeof(Node*));} + Node* GetNode() const diff --git a/package/norm/0002-protolib-drop-linux-version-check.patch b/package/norm/0002-protolib-drop-linux-version-check.patch new file mode 100644 index 0000000000..7852a30a37 --- /dev/null +++ b/package/norm/0002-protolib-drop-linux-version-check.patch @@ -0,0 +1,38 @@ +The char * to unsigned char * change happened for the libnetfilter_queue +1.0.0 release, not the linux headers. +So drop the linux headers version check since it causes more harm than +good by trying the old API when the toolchain uses old linux headers +with a new-enough libnetfilter_queue. + +Signed-off-by: Gustavo Zacarias + +diff -Nura norm-1.5r6.orig/protolib/src/linux/linuxDetour.cpp norm-1.5r6/protolib/src/linux/linuxDetour.cpp +--- norm-1.5r6.orig/protolib/src/linux/linuxDetour.cpp 2016-03-31 10:17:20.674745597 -0300 ++++ norm-1.5r6/protolib/src/linux/linuxDetour.cpp 2016-03-31 10:36:58.923084395 -0300 +@@ -16,8 +16,6 @@ + #include // for ETH_P_IP + #include // for ARPHRD_ETHER + +-#include // for LINUX_VERSION_CODE +- + /** NOTES: + * + * 1) This newer implementation of LinuxDetour uses netfilter_queue +@@ -591,17 +589,7 @@ + + // Finally record packet length and cache pointer to IP packet data + +- // A change to the nfq_get_payload() prototype seemed to kick in around Linux header files +- // version 3.6? (This will probably need to be fine tuned for the right version threshold.) +- +-#define LINUX_VERSION_MAJOR (LINUX_VERSION_CODE/65536) +-#define LINUX_VERSION_MINOR ((LINUX_VERSION_CODE - (LINUX_VERSION_MAJOR*65536)) / 256) +- +-#if ((LINUX_VERSION_MAJOR > 3) || ((LINUX_VERSION_MAJOR == 3) && (LINUX_VERSION_MINOR > 5))) + linuxDetour->nfq_pkt_len = nfq_get_payload(nfqData, (unsigned char**)(&linuxDetour->nfq_pkt_data)); +-#else +- linuxDetour->nfq_pkt_len = nfq_get_payload(nfqData, &linuxDetour->nfq_pkt_data); +-#endif // + return 0; + } // end LinuxDetour::NfqCallback() + diff --git a/package/norm/Config.in b/package/norm/Config.in new file mode 100644 index 0000000000..494463344c --- /dev/null +++ b/package/norm/Config.in @@ -0,0 +1,15 @@ +comment "norm needs a toolchain w/ C++, threads, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_NORM + bool "norm" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + The NORM protocol is designed to provide end-to-end reliable + transport of bulk data objects or streams over generic IP + multicast routing and forwarding services. + + http://www.nrl.navy.mil/itd/ncs/products/norm diff --git a/package/norm/norm.hash b/package/norm/norm.hash new file mode 100644 index 0000000000..4693eed6bf --- /dev/null +++ b/package/norm/norm.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 20ea2e8dd5d5e1ff1ff91dc7dab6db53a77d7b7183d8cf2425c215fd294f22a7 src-norm-1.5r6.tgz diff --git a/package/norm/norm.mk b/package/norm/norm.mk new file mode 100644 index 0000000000..e1b3a5fcc2 --- /dev/null +++ b/package/norm/norm.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# norm +# +################################################################################ + +NORM_VERSION = 1.5r6 +NORM_SITE = http://downloads.pf.itd.nrl.navy.mil/norm/archive +NORM_SOURCE = src-norm-$(NORM_VERSION).tgz +NORM_INSTALL_STAGING = YES +NORM_LICENSE = NRL License +NORM_LICENSE_FILES = LICENSE.TXT + +ifeq ($(BR2_PACKAGE_LIBNETFILTER_QUEUE),y) +NORM_DEPENDENCIES += libnetfilter_queue +endif + +define NORM_CONFIGURE_CMDS + cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./waf configure --prefix=/usr +endef + +define NORM_BUILD_CMDS + cd $(@D); \ + $(TARGET_MAKE_ENV) \ + ./waf build +endef + +# install target doesn't install headers unfortunately... +define NORM_INSTALL_STAGING_CMDS + cd $(@D); \ + $(TARGET_MAKE_ENV) \ + DESTDIR=$(STAGING_DIR) \ + ./waf install + cp -f $(@D)/include/norm* $(STAGING_DIR)/usr/include +endef + +define NORM_INSTALL_TARGET_CMDS + cd $(@D); \ + $(TARGET_MAKE_ENV) \ + DESTDIR=$(TARGET_DIR) \ + ./waf install +endef + +$(eval $(generic-package)) diff --git a/package/nss-mdns/Config.in b/package/nss-mdns/Config.in new file mode 100644 index 0000000000..0192cc2862 --- /dev/null +++ b/package/nss-mdns/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_NSS_MDNS + bool "nss-mdns" + # libdaemon->avahi uses fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_AVAHI_DAEMON + help + nss-mdns is a plugin for the GNU Name Service Switch (NSS) + functionality of the GNU C Library (glibc) providing host + name resolution via Multicast DNS (aka Zeroconf, aka Apple + Rendezvous, aka Apple Bonjour), effectively allowing name + resolution by common Unix/Linux programs in the ad-hoc + mDNS domain .local. + + http://0pointer.de/lennart/projects/nss-mdns/ + +comment "nss-mdns needs an (e)glibc toolchain" + depends on BR2_USE_MMU && BR2_PACKAGE_AVAHI_DAEMON + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/nss-mdns/nss-mdns.hash b/package/nss-mdns/nss-mdns.hash new file mode 100644 index 0000000000..169c497bbe --- /dev/null +++ b/package/nss-mdns/nss-mdns.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 1e683c2e7c3921814706d62fbbd3e9cbf493a75fa00255e0e715508d8134fa6d nss-mdns-0.10.tar.gz diff --git a/package/nss-mdns/nss-mdns.mk b/package/nss-mdns/nss-mdns.mk new file mode 100644 index 0000000000..9ec9c1af43 --- /dev/null +++ b/package/nss-mdns/nss-mdns.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# nss-mdns +# +################################################################################ + +NSS_MDNS_VERSION = 0.10 +NSS_MDNS_SITE = http://0pointer.de/lennart/projects/nss-mdns +NSS_MDNS_LICENSE = LGPLv2.1+ +NSS_MDNS_LICENSE_FILES = LICENSE + +define NSS_MDNS_INSTALL_CONFIG + if [ ! -f "$(TARGET_DIR)/etc/nsswitch.conf" ]; then \ + $(INSTALL) -D -m 0644 package/glibc/nsswitch.conf $(TARGET_DIR)/etc/nsswitch.conf ; \ + fi + sed -r -i -e 's/^(hosts:[[:space:]]+).*/\1files mdns4_minimal [NOTFOUND=return] dns mdns4/' \ + $(TARGET_DIR)/etc/nsswitch.conf +endef + +NSS_MDNS_POST_INSTALL_TARGET_HOOKS += NSS_MDNS_INSTALL_CONFIG + +$(eval $(autotools-package)) diff --git a/package/nss-pam-ldapd/Config.in b/package/nss-pam-ldapd/Config.in new file mode 100644 index 0000000000..da6d331b8a --- /dev/null +++ b/package/nss-pam-ldapd/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_NSS_PAM_LDAPD + bool "nss-pam-ldapd" + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_OPENLDAP + help + Name Service Switch (NSS) module that allows your LDAP + server to provide user account, group, host name, alias, + netgroup, and basically any other information that you would + normally get from /etc flat files or NIS. It also provides a + Pluggable Authentication Module (PAM) to do authentication + to an LDAP server. + + http://arthurdejong.org/nss-pam-ldapd/ + +if BR2_PACKAGE_NSS_PAM_LDAPD + +config BR2_PACKAGE_NSS_PAM_LDAPD_UTILITIES + bool "nss-pam-ldapd utilities" + help + Build/Install command-line utilities. + +endif + +comment "nss-pam-ldapd needs an (e)glibc toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/nss-pam-ldapd/S45nslcd b/package/nss-pam-ldapd/S45nslcd new file mode 100644 index 0000000000..cd3e4d0f20 --- /dev/null +++ b/package/nss-pam-ldapd/S45nslcd @@ -0,0 +1,25 @@ +#!/bin/sh + +NAME="nslcd" +DAEMON="/usr/sbin/${NAME}" + +case "$1" in +start) + echo -n "Starting ${NAME}: " + start-stop-daemon -S -x ${DAEMON} + [ $? -eq 0 ] && echo "OK" || echo "FAIL" + ;; +stop) + echo -n "Stopping ${NAME}: " + start-stop-daemon -K -x ${DAEMON} + [ $? -eq 0 ] && echo "OK" || echo "FAIL" + ;; +restart|reload) + $0 stop + $0 start + ;; +*) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac + diff --git a/package/nss-pam-ldapd/nslcd.service b/package/nss-pam-ldapd/nslcd.service new file mode 100644 index 0000000000..6c0d71b241 --- /dev/null +++ b/package/nss-pam-ldapd/nslcd.service @@ -0,0 +1,11 @@ +[Unit] +Description=Naming services LDAP client daemon. +After=syslog.target network.target + +[Service] +Type=forking +PIDFile=/var/run/nslcd/nslcd.pid +ExecStart=/usr/sbin/nslcd + +[Install] +WantedBy=multi-user.target diff --git a/package/nss-pam-ldapd/nss-pam-ldapd.hash b/package/nss-pam-ldapd/nss-pam-ldapd.hash new file mode 100644 index 0000000000..b931e6fc12 --- /dev/null +++ b/package/nss-pam-ldapd/nss-pam-ldapd.hash @@ -0,0 +1,4 @@ +# From http://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-0.9.6.tar.gz.md5 +md5 fa5ec49cb54428d6c73e244a11021695 nss-pam-ldapd-0.9.6.tar.gz +# Locally computed: +sha256 101d5a7fa10549cc77be48d07f2b8141f59182f10f2cc0fea93efd13c3a5a6f2 nss-pam-ldapd-0.9.5.tar.gz diff --git a/package/nss-pam-ldapd/nss-pam-ldapd.mk b/package/nss-pam-ldapd/nss-pam-ldapd.mk new file mode 100644 index 0000000000..ba250829bb --- /dev/null +++ b/package/nss-pam-ldapd/nss-pam-ldapd.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# nss-pam-ldapd +# +################################################################################ + +NSS_PAM_LDAPD_VERSION = 0.9.6 +NSS_PAM_LDAPD_SITE = http://arthurdejong.org/nss-pam-ldapd +NSS_PAM_LDAPD_LICENSE = LGPLv2.1+ +NSS_PAM_LDAPD_LICENSE_FILES = COPYING +NSS_PAM_LDAPD_INSTALL_STAGING = YES + +NSS_PAM_LDAPD_CONF_OPTS = --disable-sasl +NSS_PAM_LDAPD_DEPENDENCIES = openldap + +ifeq ($(BR2_PACKAGE_NSS_PAM_LDAPD_UTILITIES),y) +NSS_PAM_LDAPD_CONF_OPTS += --enable-utils +else +NSS_PAM_LDAPD_CONF_OPTS += --disable-utils +endif + +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +NSS_PAM_LDAPD_CONF_OPTS += --enable-pam +NSS_PAM_LDAPD_DEPENDENCIES += linux-pam +else +NSS_PAM_LDAPD_CONF_OPTS += --disable-pam +endif + +define NSS_PAM_LDAPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -m 755 -D package/nss-pam-ldapd/nslcd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/nslcd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/nslcd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nslcd.service +endef + +define NSS_PAM_LDAPD_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/nss-pam-ldapd/S45nslcd \ + $(TARGET_DIR)/etc/init.d/S45nslcd +endef + +define NSS_PAM_LDAPD_USERS + nslcd -1 nslcd -1 * - - - nslcd user +endef + +$(eval $(autotools-package)) diff --git a/package/ntfs-3g/Config.in b/package/ntfs-3g/Config.in new file mode 100644 index 0000000000..d6d1481ad2 --- /dev/null +++ b/package/ntfs-3g/Config.in @@ -0,0 +1,35 @@ +config BR2_PACKAGE_NTFS_3G + bool "ntfs-3g" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + help + The NTFS-3G driver is an open source, freely available + read/write NTFS driver for Linux, FreeBSD, Mac OS X, NetBSD, + and Haiku. It provides safe and fast handling of the Windows + XP, Windows Server 2003, Windows 2000 and Windows Vista file + systems. Most POSIX file system operations are supported, with + the exception of full file ownership and access right support. + + http://www.ntfs-3g.org/ + +if BR2_PACKAGE_NTFS_3G + +config BR2_PACKAGE_NTFS_3G_ENCRYPTED + bool "encrypted volumes" + select BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_LIBGCRYPT + help + Enable support for NTFS encrypted volumes. + +config BR2_PACKAGE_NTFS_3G_NTFSPROGS + bool "ntfsprogs" + help + Install NTFS utilities. + +endif + +comment "ntfs-3g needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/ntfs-3g/ntfs-3g.hash b/package/ntfs-3g/ntfs-3g.hash new file mode 100644 index 0000000000..4875cc47bc --- /dev/null +++ b/package/ntfs-3g/ntfs-3g.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d7b72c05e4b3493e6095be789a760c9f5f2b141812d5b885f3190c98802f1ea0 ntfs-3g_ntfsprogs-2016.2.22.tgz diff --git a/package/ntfs-3g/ntfs-3g.mk b/package/ntfs-3g/ntfs-3g.mk new file mode 100644 index 0000000000..b59e335bcb --- /dev/null +++ b/package/ntfs-3g/ntfs-3g.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# ntfs-3g +# +################################################################################ + +NTFS_3G_VERSION = 2016.2.22 +NTFS_3G_SOURCE = ntfs-3g_ntfsprogs-$(NTFS_3G_VERSION).tgz +NTFS_3G_SITE = http://tuxera.com/opensource +NTFS_3G_CONF_OPTS = --disable-ldconfig +NTFS_3G_INSTALL_STAGING = YES +NTFS_3G_DEPENDENCIES = host-pkgconf +NTFS_3G_LICENSE = GPLv2+, LGPLv2+ +NTFS_3G_LICENSE_FILES = COPYING COPYING.LIB + +ifeq ($(BR2_PACKAGE_LIBFUSE),y) +NTFS_3G_CONF_OPTS += --with-fuse=external +NTFS_3G_DEPENDENCIES += libfuse +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +NTFS_3G_DEPENDENCIES += util-linux +endif + +ifeq ($(BR2_PACKAGE_NTFS_3G_ENCRYPTED),y) +NTFS_3G_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +NTFS_3G_CONF_OPTS += --enable-crypto +NTFS_3G_DEPENDENCIES += gnutls libgcrypt +endif + +ifneq ($(BR2_PACKAGE_NTFS_3G_NTFSPROGS),y) +NTFS_3G_CONF_OPTS += --disable-ntfsprogs +endif + +$(eval $(autotools-package)) diff --git a/package/ntp/0001-nano.patch b/package/ntp/0001-nano.patch new file mode 100644 index 0000000000..bce3478261 --- /dev/null +++ b/package/ntp/0001-nano.patch @@ -0,0 +1,28 @@ +Fixes issues with glibc header files, see +http://bugs.gentoo.org/show_bug.cgi?id=270483 + +Signed-off-by: Gustavo Zacarias + +Rebase to apply cleanly. + +Signed-off-by: Danomi Manchego + + +diff -purN a/include/ntp_syscall.h b/include/ntp_syscall.h +--- a/include/ntp_syscall.h 2015-02-11 08:42:37.794576469 -0500 ++++ b/include/ntp_syscall.h 2015-02-11 08:43:03.216957279 -0500 +@@ -10,6 +10,14 @@ + # include + #endif + ++#if defined(ADJ_NANO) && !defined(MOD_NANO) ++#define MOD_NANO ADJ_NANO ++#endif ++ ++#if defined(ADJ_TAI) && !defined(MOD_TAI) ++#define MOD_TAI ADJ_TAI ++#endif ++ + #ifndef NTP_SYSCALLS_LIBC + # ifdef NTP_SYSCALLS_STD + # define ntp_adjtime(t) syscall(SYS_ntp_adjtime, (t)) diff --git a/package/ntp/0002-ntp-syscalls-fallback.patch b/package/ntp/0002-ntp-syscalls-fallback.patch new file mode 100644 index 0000000000..535fc93dfd --- /dev/null +++ b/package/ntp/0002-ntp-syscalls-fallback.patch @@ -0,0 +1,27 @@ +inline ntp syscalls fallback + +Reference: + https://bugs.ntp.org/show_bug.cgi?id=769 + +Signed-off-by: James Knight +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -1523,11 +1523,11 @@ AC_CACHE_CHECK( + [ntp_cv_var_ntp_syscalls], + [ + ntp_cv_var_ntp_syscalls=no +- case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime$ac_cv_func___adjtimex" in ++ case "$ac_cv_func_ntp_adjtime$ac_cv_func_ntp_gettime$ac_cv_func___adjtimex$ac_cv_func_adjtimex" in + yesyes*) + ntp_cv_var_ntp_syscalls=libc + ;; +- *yes) ++ *yesyes | *yesno | *noyes) + ntp_cv_var_ntp_syscalls=inline + ;; + *) diff --git a/package/ntp/Config.in b/package/ntp/Config.in new file mode 100644 index 0000000000..1763225f44 --- /dev/null +++ b/package/ntp/Config.in @@ -0,0 +1,89 @@ +config BR2_PACKAGE_NTP + bool "ntp" + select BR2_PACKAGE_LIBEVENT + help + Network Time Protocol suite/programs. + Provides things like ntpd, ntpdate, ntpq, etc... + + http://www.ntp.org/ + +if BR2_PACKAGE_NTP + +config BR2_PACKAGE_NTP_SNTP + bool "sntp" + help + Simple network time protocol program + +config BR2_PACKAGE_NTP_NTP_KEYGEN + bool "ntp-keygen" + help + Create a NTP host key + +config BR2_PACKAGE_NTP_NTP_WAIT + bool "ntp-wait" + depends on BR2_PACKAGE_PERL + help + ntp-wait waits until the locally running ntpd is in state 4 + (synchronized). This could be useful at boot time, to delay the + boot sequence until after "ntpd -g" has set the time. + +config BR2_PACKAGE_NTP_NTPD + bool "ntpd" + default y + help + ntpd is the time synchronization daemon keeping your local + system date and time in sync and optionally serving time and date + information on the network via the NTP protocol. + +config BR2_PACKAGE_NTP_NTPD_ATOM_PPS + bool "PPS support" + depends on BR2_PACKAGE_NTP_NTPD + select BR2_PACKAGE_PPS_TOOLS + help + Compile ntpd with the ability to use an ATOM PPS source. + +config BR2_PACKAGE_NTP_NTPDATE + bool "ntpdate" + help + The ntpdate utility program is used to set the local date and time + from an NTP server given as an argument. + +config BR2_PACKAGE_NTP_NTPDC + bool "ntpdc" + help + The ntpdc utility program is used to query an NTP daemon about + its current state and to request changes in that state. + +config BR2_PACKAGE_NTP_NTPQ + bool "ntpq" + help + The ntpq utility program is used to query NTP servers requesting + information about current state and/or changes in that state. + +config BR2_PACKAGE_NTP_NTPSNMPD + bool "ntpsnmpd" + depends on BR2_USE_MMU # netsnmp fork() + select BR2_PACKAGE_NETSNMP + help + Install ntpsnmpd NTP SNMP MIB agent. + +config BR2_PACKAGE_NTP_NTPTIME + bool "ntptime" + help + The ntptime utility program is used to read and set kernel time + variables. + +config BR2_PACKAGE_NTP_NTPTRACE + bool "ntptrace" + depends on BR2_PACKAGE_PERL + help + ntptrace is a perl script that uses the ntpq utility program to + follow the chain of NTP servers from a given host back to the + primary time source + +config BR2_PACKAGE_NTP_TICKADJ + bool "tickadj" + help + set time-related kernel variables + +endif diff --git a/package/ntp/S49ntp b/package/ntp/S49ntp new file mode 100755 index 0000000000..b4047fceda --- /dev/null +++ b/package/ntp/S49ntp @@ -0,0 +1,38 @@ +#! /bin/sh + +NAME=ntpd +DAEMON=/usr/sbin/$NAME + +# Gracefully exit if the package has been removed. +test -x $DAEMON || exit 0 + +# Read config file if it is present. +if [ -r /etc/default/$NAME ] +then + . /etc/default/$NAME +fi + +case "$1" in + start) + printf "Starting $NAME: " + start-stop-daemon -S -q -x $DAEMON -- -g + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping $NAME: " + start-stop-daemon -K -q -n $NAME + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart|reload) + echo "Restarting $NAME: " + $0 stop + sleep 1 + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/package/ntp/ntp.hash b/package/ntp/ntp.hash new file mode 100644 index 0000000000..6be52aa78f --- /dev/null +++ b/package/ntp/ntp.hash @@ -0,0 +1,4 @@ +# From http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2/ntp-4.2.8p7.tar.gz.md5 +md5 46dfba933c3e4bc924d8e55068797578 ntp-4.2.8p7.tar.gz +# Calculated based on the hash above +sha256 81d20c06a0b01abe3b84fac092185bf014252d38fe5e7b2758f604680a0220dc ntp-4.2.8p7.tar.gz diff --git a/package/ntp/ntp.mk b/package/ntp/ntp.mk new file mode 100644 index 0000000000..d8ac534414 --- /dev/null +++ b/package/ntp/ntp.mk @@ -0,0 +1,75 @@ +################################################################################ +# +# ntp +# +################################################################################ + +NTP_VERSION_MAJOR = 4.2 +NTP_VERSION = $(NTP_VERSION_MAJOR).8p7 +NTP_SITE = http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-$(NTP_VERSION_MAJOR) +NTP_DEPENDENCIES = host-pkgconf libevent $(if $(BR2_PACKAGE_BUSYBOX),busybox) +NTP_LICENSE = ntp license +NTP_LICENSE_FILES = COPYRIGHT +NTP_CONF_ENV = ac_cv_lib_md5_MD5Init=no +NTP_CONF_OPTS = \ + --with-shared \ + --program-transform-name=s,,, \ + --disable-tickadj \ + --with-yielding-select=yes \ + --disable-local-libevent +# 0002-ntp-syscalls-fallback.patch +NTP_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +NTP_CONF_OPTS += --with-crypto +NTP_DEPENDENCIES += openssl +else +NTP_CONF_OPTS += --without-crypto --disable-openssl-random +endif + +ifeq ($(BR2_PACKAGE_NTP_NTPSNMPD),y) +NTP_CONF_OPTS += \ + --with-net-snmp-config=$(STAGING_DIR)/usr/bin/net-snmp-config +NTP_DEPENDENCIES += netsnmp +else +NTP_CONF_OPTS += --without-ntpsnmpd +endif + +ifeq ($(BR2_PACKAGE_NTP_NTPD_ATOM_PPS),y) +NTP_CONF_OPTS += --enable-ATOM +NTP_DEPENDENCIES += pps-tools +else +NTP_CONF_OPTS += --disable-ATOM +endif + +NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTP_KEYGEN) += util/ntp-keygen +NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTP_WAIT) += scripts/ntp-wait/ntp-wait +NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPDATE) += ntpdate/ntpdate +NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPDC) += ntpdc/ntpdc +NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPQ) += ntpq/ntpq +NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPSNMPD) += ntpsnmpd/ntpsnmpd +NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPTIME) += util/ntptime +NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_NTPTRACE) += scripts/ntptrace/ntptrace +NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_SNTP) += sntp/sntp +NTP_INSTALL_FILES_$(BR2_PACKAGE_NTP_TICKADJ) += util/tickadj + +define NTP_INSTALL_TARGET_CMDS + $(if $(BR2_PACKAGE_NTP_NTPD), install -m 755 $(@D)/ntpd/ntpd $(TARGET_DIR)/usr/sbin/ntpd) + test -z "$(NTP_INSTALL_FILES_y)" || install -m 755 $(addprefix $(@D)/,$(NTP_INSTALL_FILES_y)) $(TARGET_DIR)/usr/bin/ + $(INSTALL) -m 644 package/ntp/ntpd.etc.conf $(TARGET_DIR)/etc/ntp.conf +endef + +ifeq ($(BR2_PACKAGE_NTP_NTPD),y) +define NTP_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/ntp/S49ntp $(TARGET_DIR)/etc/init.d/S49ntp +endef + +define NTP_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/ntp/ntpd.service $(TARGET_DIR)/usr/lib/systemd/system/ntpd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/ntpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service +endef +endif + +$(eval $(autotools-package)) diff --git a/package/ntp/ntpd.etc.conf b/package/ntp/ntpd.etc.conf new file mode 100644 index 0000000000..c451aa9bb2 --- /dev/null +++ b/package/ntp/ntpd.etc.conf @@ -0,0 +1,10 @@ +server 0.pool.ntp.org iburst +server 1.pool.ntp.org iburst +server 2.pool.ntp.org iburst +server 3.pool.ntp.org iburst + +# Allow only time queries, at a limited rate, sending KoD when in excess. +# Allow all local queries (IPv4, IPv6) +restrict default nomodify nopeer noquery limited kod +restrict 127.0.0.1 +restrict [::1] diff --git a/package/ntp/ntpd.service b/package/ntp/ntpd.service new file mode 100644 index 0000000000..7964c5389b --- /dev/null +++ b/package/ntp/ntpd.service @@ -0,0 +1,11 @@ +[Unit] +Description=Network Time Service +After=network.target + +[Service] +Type=forking +PIDFile=/run/ntpd.pid +ExecStart=/usr/sbin/ntpd -g -p /run/ntpd.pid + +[Install] +WantedBy=multi-user.target diff --git a/package/numactl/Config.in b/package/numactl/Config.in new file mode 100644 index 0000000000..f18e28d9ff --- /dev/null +++ b/package/numactl/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_NUMACTL + bool "numactl" + # numactl uses some system calls that are not available on all + # architectures. + depends on BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_mips64 || BR2_mips64el || BR2_powerpc || BR2_x86_64 + help + numactl allows you to run your application on specific cpus + and memory nodes. It does this by supplying a NUMA memory + policy to the operating system before running your program. + + http://oss.sgi.com/projects/libnuma/ diff --git a/package/numactl/numactl.hash b/package/numactl/numactl.hash new file mode 100644 index 0000000000..77ccfae6fd --- /dev/null +++ b/package/numactl/numactl.hash @@ -0,0 +1,4 @@ +# Locally calculated +sha256 450c091235f891ee874a8651b179c30f57a1391ca5c4673354740ba65e527861 numactl-2.0.11.tar.gz +sha256 1f4c813cc8c81fa4dfd0be959457a5c3de8fc3316bbc80de3aa1d9ef9992b2b6 3770bdc4fa7b9059db5cd2aa8bb09b50fa15e456.patch +sha256 0c4cb6550b46976f2a21087490420b218e62ead7d9b178120ad782d53a7ad3a6 31dc2951c758698bff060aeae8ffd8854616183b.patch diff --git a/package/numactl/numactl.mk b/package/numactl/numactl.mk new file mode 100644 index 0000000000..e2d2590cde --- /dev/null +++ b/package/numactl/numactl.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# numactl +# +################################################################################ + +NUMACTL_VERSION = 2.0.11 +NUMACTL_SITE = ftp://oss.sgi.com/www/projects/libnuma/download +NUMACTL_PATCH = \ + https://github.com/numactl/numactl/commit/3770bdc4fa7b9059db5cd2aa8bb09b50fa15e456.patch \ + https://github.com/numactl/numactl/commit/31dc2951c758698bff060aeae8ffd8854616183b.patch +NUMACTL_LICENSE = LGPLv2.1 (libnuma), GPLv2 (programs) +NUMACTL_LICENSE_FILES = README +NUMACTL_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/nut/0001-foo-config.patch b/package/nut/0001-foo-config.patch new file mode 100644 index 0000000000..7202f139cc --- /dev/null +++ b/package/nut/0001-foo-config.patch @@ -0,0 +1,72 @@ +configure: fix calls to {gdlib,net-snmp}-config + +nut directly calls to {gdlib,net-snmp}-config. In Buildroot, +those are not in the PATH, and nut would catch those of the +system (if they are installed), or miss them entirely. + +Fix that by using environment variables that will tell where +to look for them. + +Note: libusb also uses libusb-config, but only as a fallback +if pkg-config fails. Since we ensure that pkg-config exists, +and libusb is properly installed before we build nut, there +is no need to fix the libusb-config calls, since they won't +be called at all. + +Signed-off-by: "Yann E. MORIN" + +diff -durN nut-2.6.5.orig/m4/nut_check_libgd.m4 nut-2.6.5/m4/nut_check_libgd.m4 +--- nut-2.6.5.orig/m4/nut_check_libgd.m4 2012-07-31 19:38:56.000000000 +0200 ++++ nut-2.6.5/m4/nut_check_libgd.m4 2013-11-01 16:24:02.626549810 +0100 +@@ -20,7 +20,7 @@ + LIBS="-lgd -lpng -lz -ljpeg -lfreetype -lm -lXpm -lX11" + + AC_MSG_CHECKING(for gd version via gdlib-config) +- GD_VERSION=`gdlib-config --version 2>/dev/null` ++ GD_VERSION=`${GDLIB_CONFIG} --version 2>/dev/null` + if test "$?" != "0" -o -z "${GD_VERSION}"; then + GD_VERSION="none" + fi +@@ -34,9 +34,9 @@ + AC_MSG_WARN([[If gd detection fails, upgrade gd or use --with-gd-includes and --with-gd-libs]]) + ;; + *) +- CFLAGS="`gdlib-config --includes 2>/dev/null`" +- LDFLAGS="`gdlib-config --ldflags 2>/dev/null`" +- LIBS="`gdlib-config --libs 2>/dev/null`" ++ CFLAGS="`${GDLIB_CONFIG} --includes 2>/dev/null`" ++ LDFLAGS="`${GDLIB_CONFIG} --ldflags 2>/dev/null`" ++ LIBS="`${GDLIB_CONFIG} --libs 2>/dev/null`" + ;; + esac + +diff -durN nut-2.6.5.orig/m4/nut_check_libnetsnmp.m4 nut-2.6.5/m4/nut_check_libnetsnmp.m4 +--- nut-2.6.5.orig/m4/nut_check_libnetsnmp.m4 2012-07-31 19:38:56.000000000 +0200 ++++ nut-2.6.5/m4/nut_check_libnetsnmp.m4 2013-11-01 16:30:07.398282923 +0100 +@@ -15,7 +15,7 @@ + + dnl See which version of the Net-SNMP library (if any) is installed + AC_MSG_CHECKING(for Net-SNMP version via net-snmp-config) +- SNMP_VERSION=`net-snmp-config --version 2>/dev/null` ++ SNMP_VERSION=`${NET_SNMP_CONFIG} --version 2>/dev/null` + if test "$?" != "0" -o -z "${SNMP_VERSION}"; then + SNMP_VERSION="none" + fi +@@ -33,7 +33,7 @@ + CFLAGS="${withval}" + ;; + esac +- ], [CFLAGS="`net-snmp-config --base-cflags 2>/dev/null`"]) ++ ], [CFLAGS="`${NET_SNMP_CONFIG} --base-cflags 2>/dev/null`"]) + AC_MSG_RESULT([${CFLAGS}]) + + AC_MSG_CHECKING(for Net-SNMP libs) +@@ -48,7 +48,7 @@ + LIBS="${withval}" + ;; + esac +- ], [LIBS="`net-snmp-config --libs 2>/dev/null`"]) ++ ], [LIBS="`${NET_SNMP_CONFIG} --libs 2>/dev/null`"]) + AC_MSG_RESULT([${LIBS}]) + + dnl Check if the Net-SNMP library is usable diff --git a/package/nut/0002-parallel-build.patch b/package/nut/0002-parallel-build.patch new file mode 100644 index 0000000000..f979c19da9 --- /dev/null +++ b/package/nut/0002-parallel-build.patch @@ -0,0 +1,24 @@ +conf: fix parallel install + +Do not reference the upsmon.conf.sample twice, otherwise install, with +a high number of make jobs, may fail, like so: + http://autobuild.buildroot.net/results/256/2567e13cd5bc702bc3a38a1d6fc8e34022cc7db5/build-end.log + +Signed-off-by: "Yann E. MORIN" + +--- +Upstream status: + https://github.com/networkupstools/nut/pull/147 + +diff -durB nut-2.7.2.orig/conf/Makefile.am nut-2.7.2/conf/Makefile.am +--- nut-2.7.2.orig/conf/Makefile.am 2014-02-14 09:56:53.000000000 +0100 ++++ nut-2.7.2/conf/Makefile.am 2014-08-17 11:33:46.804439240 +0200 +@@ -2,7 +2,7 @@ + + INSTALL_0600 = $(INSTALL) -m 0600 + +-SECFILES = upsmon.conf.sample upsd.conf.sample upsd.users.sample ++SECFILES = upsd.conf.sample upsd.users.sample + PUBFILES = nut.conf.sample ups.conf.sample + CGIPUB = hosts.conf.sample upsset.conf.sample upsstats.html.sample \ + upsstats-single.html.sample diff --git a/package/nut/Config.in b/package/nut/Config.in new file mode 100644 index 0000000000..659c9586f5 --- /dev/null +++ b/package/nut/Config.in @@ -0,0 +1,26 @@ +comment "nut needs a toolchain w/ C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_NUT + bool "nut" + depends on BR2_USE_MMU # fork() + depends on BR2_INSTALL_LIBSTDCPP + help + Network UPS tools + + The primary goal of the Network UPS Tools (NUT) project is to provide + support for Power Devices, such as Uninterruptible Power Supplies, + Power Distribution Units and Solar Controllers. + + http://www.networkupstools.org/ + +if BR2_PACKAGE_NUT + +config BR2_PACKAGE_NUT_DRIVERS + string "drivers" + help + Select the individual drivers to enable, in a comma-separated list. + Leave empty for all. + +endif # BR2_PACKAGE_NUT diff --git a/package/nut/nut.hash b/package/nut/nut.hash new file mode 100644 index 0000000000..0174366bcc --- /dev/null +++ b/package/nut/nut.hash @@ -0,0 +1,2 @@ +# From http://www.networkupstools.org/source/2.7/nut-2.7.2.tar.gz.sha256 +sha256 4d5365359b059d96dfcb77458f361a114d26c84f1297ffcd0c6c166f7200376d nut-2.7.2.tar.gz diff --git a/package/nut/nut.mk b/package/nut/nut.mk new file mode 100644 index 0000000000..b0a92ca660 --- /dev/null +++ b/package/nut/nut.mk @@ -0,0 +1,92 @@ +################################################################################ +# +# nut +# +################################################################################ + +NUT_VERSION_MAJOR = 2.7 +NUT_VERSION = $(NUT_VERSION_MAJOR).2 +NUT_SITE = http://www.networkupstools.org/source/$(NUT_VERSION_MAJOR) +NUT_LICENSE = GPLv2+, GPLv3+ (python scripts), GPL/Artistic (perl client) +NUT_LICENSE_FILES = COPYING LICENSE-GPL2 LICENSE-GPL3 +NUT_DEPENDENCIES = host-pkgconf + +# Our patch changes m4 macros, so we need to autoreconf +NUT_AUTORECONF = YES + +# Put the PID files in a read-write place (/var/run is a tmpfs) +# since the default location (/var/state/ups) maybe readonly. +NUT_CONF_OPTS = \ + --with-altpidpath=/var/run/upsd \ + --without-hal + +NUT_CONF_ENV = \ + GDLIB_CONFIG=$(STAGING_DIR)/usr/bin/gdlib-config \ + NET_SNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config + +# For uClibc-based toolchains, nut forgets to link with -lm +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +NUT_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lm" +endif + +ifeq ($(call qstrip,$(BR2_PACKAGE_NUT_DRIVERS)),) +NUT_CONF_OPTS += --with-drivers=all +else +NUT_CONF_OPTS += --with-drivers=$(BR2_PACKAGE_NUT_DRIVERS) +endif + +ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_DBUS),yy) +NUT_DEPENDENCIES += avahi dbus +NUT_CONF_OPTS += --with-avahi +else +NUT_CONF_OPTS += --without-avahi +endif + +# gd with support for png is required for the CGI +ifeq ($(BR2_PACKAGE_GD)$(BR2_PACKAGE_LIBPNG),yy) +NUT_DEPENDENCIES += gd libpng +NUT_CONF_OPTS += --with-cgi +else +NUT_CONF_OPTS += --without-cgi +endif + +# nut-scanner needs libltdl, which is a wrapper arounf dlopen/dlsym, +# so is not available for static-only builds. +# There is no flag to directly enable/disable nut-scanner, it's done +# via the --enable/disable-libltdl flag. +ifeq ($(BR2_STATIC_LIBS):$(BR2_PACKAGE_LIBTOOL),:y) +NUT_DEPENDENCIES += libtool +NUT_CONF_OPTS += --with-libltdl +else +NUT_CONF_OPTS += --without-libltdl +endif + +ifeq ($(BR2_PACKAGE_LIBUSB_COMPAT),y) +NUT_DEPENDENCIES += libusb-compat +NUT_CONF_OPTS += --with-usb +else +NUT_CONF_OPTS += --without-usb +endif + +ifeq ($(BR2_PACKAGE_NEON_EXPAT)$(BR2_PACKAGE_NEON_LIBXML2),y) +NUT_DEPENDENCIES += neon +NUT_CONF_OPTS += --with-neon +else +NUT_CONF_OPTS += --without-neon +endif + +ifeq ($(BR2_PACKAGE_NETSNMP),y) +NUT_DEPENDENCIES += netsnmp +NUT_CONF_OPTS += --with-snmp +else +NUT_CONF_OPTS += --without-snmp +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +NUT_DEPENDENCIES += openssl +NUT_CONF_OPTS += --with-ssl +else +NUT_CONF_OPTS += --without-ssl +endif + +$(eval $(autotools-package)) diff --git a/package/nuttcp/0001-susv3-legacy.patch b/package/nuttcp/0001-susv3-legacy.patch new file mode 100644 index 0000000000..9a215f8a86 --- /dev/null +++ b/package/nuttcp/0001-susv3-legacy.patch @@ -0,0 +1,264 @@ +[PATCH] Replace susv3 legacy function with modern equivalents + +Signed-off-by: Peter Korsgaard +--- + nuttcp-6.1.2.c | 90 ++++++++++++++++++++++++++++----------------------------- + 1 file changed, 45 insertions(+), 45 deletions(-) + +Index: nuttcp-6.1.2/nuttcp-6.1.2.c +=================================================================== +--- nuttcp-6.1.2.orig/nuttcp-6.1.2.c ++++ nuttcp-6.1.2/nuttcp-6.1.2.c +@@ -1925,11 +1925,11 @@ + if (udp && !haverateopt) + rate = DEFAULT_UDP_RATE; + +- bzero((char *)&frominet, sizeof(frominet)); +- bzero((char *)&clientaddr, sizeof(clientaddr)); ++ memset((char *)&frominet, 0, sizeof(frominet)); ++ memset((char *)&clientaddr, 0, sizeof(clientaddr)); + + #ifdef AF_INET6 +- bzero((char *)&clientaddr6, sizeof(clientaddr6)); ++ memset((char *)&clientaddr6, 0, sizeof(clientaddr6)); + clientscope6 = 0; + #endif + +@@ -1985,7 +1985,7 @@ + } + + while (stream_idx <= nstream) { +- bzero(&hints, sizeof(hints)); ++ memset(&hints, 0, sizeof(hints)); + res[stream_idx] = NULL; + if (explicitaf) hints.ai_family = af; + if ((cp2 = strchr(cp1, '/'))) { +@@ -3013,12 +3013,12 @@ + if ((stream_idx > 0) && skip_data) + break; + +- bzero((char *)&sinme[stream_idx], sizeof(sinme[stream_idx])); +- bzero((char *)&sinhim[stream_idx], sizeof(sinhim[stream_idx])); ++ memset((char *)&sinme[stream_idx], 0, sizeof(sinme[stream_idx])); ++ memset((char *)&sinhim[stream_idx], 0, sizeof(sinhim[stream_idx])); + + #ifdef AF_INET6 +- bzero((char *)&sinme6[stream_idx], sizeof(sinme6[stream_idx])); +- bzero((char *)&sinhim6[stream_idx], sizeof(sinhim6[stream_idx])); ++ memset((char *)&sinme6[stream_idx], 0, sizeof(sinme6[stream_idx])); ++ memset((char *)&sinhim6[stream_idx], 0, sizeof(sinhim6[stream_idx])); + #endif + + if (((trans && !reverse) && (stream_idx > 0)) || +@@ -3028,15 +3028,15 @@ + if (client) { + if (af == AF_INET) { + sinhim[stream_idx].sin_family = af; +- bcopy((char *)&(((struct sockaddr_in *)res[stream_idx]->ai_addr)->sin_addr), +- (char *)&sinhim[stream_idx].sin_addr.s_addr, ++ memcpy((char *)&sinhim[stream_idx].sin_addr.s_addr, ++ (char *)&(((struct sockaddr_in *)res[stream_idx]->ai_addr)->sin_addr), + sizeof(sinhim[stream_idx].sin_addr.s_addr)); + } + #ifdef AF_INET6 + else if (af == AF_INET6) { + sinhim6[stream_idx].sin6_family = af; +- bcopy((char *)&(((struct sockaddr_in6 *)res[stream_idx]->ai_addr)->sin6_addr), +- (char *)&sinhim6[stream_idx].sin6_addr.s6_addr, ++ memcpy((char *)&sinhim6[stream_idx].sin6_addr.s6_addr, ++ (char *)&(((struct sockaddr_in6 *)res[stream_idx]->ai_addr)->sin6_addr), + sizeof(sinhim6[stream_idx].sin6_addr.s6_addr)); + sinhim6[stream_idx].sin6_scope_id = ((struct sockaddr_in6 *)res[stream_idx]->ai_addr)->sin6_scope_id; + } +@@ -3113,8 +3113,8 @@ + * to the multicast group + */ + if (af == AF_INET) { +- bcopy((char *)&sinhim[1].sin_addr.s_addr, +- (char *)&save_sinhim.sin_addr.s_addr, ++ memcpy((char *)&save_sinhim.sin_addr.s_addr, ++ (char *)&sinhim[1].sin_addr.s_addr, + sizeof(struct in_addr)); + if (!client && (irvers >= 50505)) { + struct sockaddr_in peer; +@@ -3124,8 +3124,8 @@ + &peerlen) < 0) { + err("getpeername"); + } +- bcopy((char *)&peer.sin_addr.s_addr, +- (char *)&sinhim[1].sin_addr.s_addr, ++ memcpy((char *)&sinhim[1].sin_addr.s_addr, ++ (char *)&peer.sin_addr.s_addr, + sizeof(struct in_addr)); + } + else { +@@ -3136,8 +3136,8 @@ + &melen) < 0) { + err("getsockname"); + } +- bcopy((char *)&me.sin_addr.s_addr, +- (char *)&sinhim[1].sin_addr.s_addr, ++ memcpy((char *)&sinhim[1].sin_addr.s_addr, ++ (char *)&me.sin_addr.s_addr, + sizeof(struct in_addr)); + } + sinhim[1].sin_addr.s_addr &= +@@ -4197,13 +4197,13 @@ + &melen) < 0) { + err("getsockname"); + } +- bcopy((char *)&me.sin_addr.s_addr, +- (char *)&mc_group.imr_multiaddr.s_addr, ++ memcpy((char *)&mc_group.imr_multiaddr.s_addr, ++ (char *)&me.sin_addr.s_addr, + sizeof(struct in_addr)); + } + else { +- bcopy((char *)&peer.sin_addr.s_addr, +- (char *)&mc_group.imr_multiaddr.s_addr, ++ memcpy((char *)&mc_group.imr_multiaddr.s_addr, ++ (char *)&peer.sin_addr.s_addr, + sizeof(struct in_addr)); + } + mc_group.imr_multiaddr.s_addr &= htonl(0xFFFFFF); +@@ -4330,12 +4330,12 @@ + if(udp) { + strcpy(buf, "BOD0"); + if (multicast) { +- bcopy((char *)&sinhim[1].sin_addr.s_addr, +- (char *)&save_mc.sin_addr.s_addr, +- sizeof(struct in_addr)); +- bcopy((char *)&save_sinhim.sin_addr.s_addr, ++ memcpy((char *)&save_mc.sin_addr.s_addr, + (char *)&sinhim[1].sin_addr.s_addr, + sizeof(struct in_addr)); ++ memcpy((char *)&sinhim[1].sin_addr.s_addr, ++ (char *)&save_sinhim.sin_addr.s_addr, ++ sizeof(struct in_addr)); + } + (void)Nwrite( fd[stream_idx + 1], buf, 4 ); /* rcvr start */ + if (two_bod) { +@@ -4344,8 +4344,8 @@ + (void)Nwrite( fd[stream_idx + 1], buf, 4 ); /* rcvr start */ + } + if (multicast) { +- bcopy((char *)&save_mc.sin_addr.s_addr, +- (char *)&sinhim[1].sin_addr.s_addr, ++ memcpy((char *)&sinhim[1].sin_addr.s_addr, ++ (char *)&save_mc.sin_addr.s_addr, + sizeof(struct in_addr)); + } + if (timeout) +@@ -4361,7 +4361,7 @@ + fflush(stdout); + } + if (udplossinfo) +- bcopy(&nbytes, buf + 24, 8); ++ memcpy(buf + 24, &nbytes, 8); + if (!udp && interval && !(format & NORETRANS) && + ((retransinfo == 1) || + ((retransinfo >= 2) && +@@ -4372,13 +4372,13 @@ + tmp = 0x5254524Eu; /* "RTRN" */ + else + tmp = 0x48525452u; /* "HRTR" */ +- bcopy(&nretrans, buf + 24, 4); +- bcopy(&tmp, buf + 28, 4); ++ memcpy(buf + 24, &nretrans, 4); ++ memcpy(buf + 28, &tmp, 4); + } + else { + send_retrans = 0; + if (!udp) +- bzero(buf + 24, 8); ++ memset(buf + 24, 0, 8); + } + if (nbuf == INT_MAX) + nbuf = ULLONG_MAX; +@@ -4423,12 +4423,12 @@ + nbytes += buflen; + cnt = 0; + if (udplossinfo) +- bcopy(&nbytes, buf + 24, 8); ++ memcpy(buf + 24, &nbytes, 8); + if (send_retrans) { + nretrans = get_retrans( + fd[stream_idx + 1]); + nretrans -= iretrans; +- bcopy(&nretrans, buf + 24, 4); ++ memcpy(buf + 24, &nretrans, 4); + } + stream_idx++; + stream_idx = stream_idx % nstream; +@@ -4523,8 +4523,8 @@ + nbytes += cnt; + if(udp) { + if (multicast) +- bcopy((char *)&save_sinhim.sin_addr.s_addr, +- (char *)&sinhim[1].sin_addr.s_addr, ++ memcpy((char *)&sinhim[1].sin_addr.s_addr, ++ (char *)&save_sinhim.sin_addr.s_addr, + sizeof(struct in_addr)); + strcpy(buf, "EOD0"); + (void)Nwrite( fd[stream_idx + 1], buf, 4 ); /* rcvr end */ +@@ -4532,7 +4532,7 @@ + } else { + first_read = 1; + need_swap = 0; +- bzero(buf + 24, 8); ++ memset(buf + 24, 0, 8); + if (udp) { + ntbytesc = 0; + got_eod0 = 0; +@@ -4584,7 +4584,7 @@ + * goes off right here */ + if (udplossinfo) { + if (first_read) { +- bcopy(buf + 24, &ntbytesc, ++ memcpy(&ntbytesc, buf + 24, + 8); + first_read = 0; + if (ntbytesc > 0x100000000ull) +@@ -4598,7 +4598,7 @@ + } + } + if (!need_swap) +- bcopy(buf + 24, &ntbytesc, ++ memcpy(&ntbytesc, buf + 24, + 8); + else { + cp1 = (char *)&ntbytesc; +@@ -4627,8 +4627,8 @@ + uint32_t tmp; + + first_read = 0; +- bcopy(buf + 24, &nretrans, 4); +- bcopy(buf + 28, &tmp, 4); ++ memcpy(&nretrans, buf + 24, 4); ++ memcpy(&tmp, buf + 28, 4); + if (tmp == 0x5254524Eu) { + /* "RTRN" */ + retransinfo = 1; +@@ -4661,7 +4661,7 @@ + } + if (read_retrans) { + if (!need_swap) +- bcopy(buf + 24, &nretrans, ++ memcpy(&nretrans, buf + 24, + 4); + else { + cp1 = (char *)&nretrans; +@@ -5327,10 +5327,10 @@ + itimer.it_interval.tv_usec = 0; + setitimer(ITIMER_REAL, &itimer, 0); + signal(SIGALRM, SIG_DFL); +- bzero((char *)&frominet, sizeof(frominet)); +- bzero((char *)&clientaddr, sizeof(clientaddr)); ++ memset((char *)&frominet, 0, sizeof(frominet)); ++ memset((char *)&clientaddr, 0, sizeof(clientaddr)); + #ifdef AF_INET6 +- bzero((char *)&clientaddr6, sizeof(clientaddr)); ++ memset((char *)&clientaddr6, 0, sizeof(clientaddr)); + clientscope6 = 0; + #endif + cput = 0.000001; diff --git a/package/nuttcp/Config.in b/package/nuttcp/Config.in new file mode 100644 index 0000000000..0b5f0811a5 --- /dev/null +++ b/package/nuttcp/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_NUTTCP + bool "nuttcp" + depends on BR2_USE_MMU # fork() + help + nuttcp is a TCP/UDP network testing tool, much like iperf + + http://nuttcp.net diff --git a/package/nuttcp/nuttcp.hash b/package/nuttcp/nuttcp.hash new file mode 100644 index 0000000000..88310a31d6 --- /dev/null +++ b/package/nuttcp/nuttcp.hash @@ -0,0 +1,2 @@ +# From http://lists.freebsd.org/pipermail/freebsd-ports-bugs/2009-August/170685.html +sha256 054e96d9d68fe917df6f25fab15c7755bdd480f6420d7d48d9194a1a52378169 nuttcp-6.1.2.tar.bz2 diff --git a/package/nuttcp/nuttcp.mk b/package/nuttcp/nuttcp.mk new file mode 100644 index 0000000000..455875a823 --- /dev/null +++ b/package/nuttcp/nuttcp.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# nuttcp +# +################################################################################ + +NUTTCP_VERSION = 6.1.2 +NUTTCP_SITE = http://nuttcp.net/nuttcp +NUTTCP_SOURCE = nuttcp-$(NUTTCP_VERSION).tar.bz2 +NUTTCP_LICENSE = GPLv2 +NUTTCP_LICENSE_FILES = LICENSE + +define NUTTCP_BUILD_CMDS + $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ + -C $(@D) all +endef + +define NUTTCP_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/nuttcp-$(NUTTCP_VERSION) \ + $(TARGET_DIR)/usr/bin/nuttcp +endef + +$(eval $(generic-package)) diff --git a/package/nvidia-driver/Config.in b/package/nvidia-driver/Config.in new file mode 100644 index 0000000000..30763c5a63 --- /dev/null +++ b/package/nvidia-driver/Config.in @@ -0,0 +1,88 @@ +comment "nvidia-driver needs an (e)glibc toolchain" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_NVIDIA_DRIVER + bool "nvidia-driver" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_TOOLCHAIN_USES_GLIBC + help + The binary-only driver blob for NVidia cards. + This is the userland part only. + + http://www.nvidia.com/ + +if BR2_PACKAGE_NVIDIA_DRIVER + +comment "nvidia-driver X.org drivers needs a modular Xorg server" + depends on !BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + +config BR2_PACKAGE_NVIDIA_DRIVER_XORG + bool "X.org drivers" + default y + depends on BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + select BR2_PACKAGE_MESA3D_HEADERS + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + +if BR2_PACKAGE_NVIDIA_DRIVER_XORG + +config BR2_PACKAGE_PROVIDES_LIBGL + default "nvidia-driver" + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "nvidia-driver" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "nvidia-driver" + +config BR2_PACKAGE_NVIDIA_DRIVER_PRIVATE_LIBS + bool "Install private libraries" + help + Two libraries require special agreement with NVidia to + develop code linking to those libraries: libnvidia-ifr.so + and libnvidia-fbc.so (to grab and encode an OpenGL buffer or + an X framebuffer.) + + Say 'y' here if you plan on running a program that uses + those private libraries. + +endif # BR2_PACKAGE_NVIDIA_DRIVER_XORG + +config BR2_PACKAGE_NVIDIA_DRIVER_CUDA + bool "CUDA support" + +if BR2_PACKAGE_NVIDIA_DRIVER_CUDA + +config BR2_PACKAGE_NVIDIA_DRIVER_OPENCL + bool "OpenCL support" + +config BR2_PACKAGE_NVIDIA_DRIVER_CUDA_PROGS + bool "CUDA MPS server and control" + depends on BR2_x86_64 + help + Say 'y' here if you need to run more than one program + doing CUDA at the same time. The MPS server will be + launched automatically when needed. + +endif # BR2_PACKAGE_NVIDIA_DRIVER_CUDA + +comment "nvidia kernel module needs a kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_NVIDIA_DRIVER_MODULE + bool "nvidia kernel module" + depends on BR2_LINUX_KERNEL + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra + help + Build the nvidia.ko kernel module. + + If CUDA support (above) is set, and the target is x86_64, then + this will also build the nvidia-uvm.ko kernel module, which + provides Unified Memory access to the GPU and CPU memories for + CUDA programs. + +endif # BR2_PACKAGE_NVIDIA_DRIVER diff --git a/package/nvidia-driver/gl.pc b/package/nvidia-driver/gl.pc new file mode 100644 index 0000000000..d822763f57 --- /dev/null +++ b/package/nvidia-driver/gl.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: gl +Description: Nvidia OpenGL library +Version: 10.4.2 +Libs: -L${libdir} -lGL -lm -lXext -lX11 -ldl +Cflags: -I${includedir} -DMESA_EGL_NO_X11_HEADERS +glx_tls: no diff --git a/package/nvidia-driver/nvidia-driver.hash b/package/nvidia-driver/nvidia-driver.hash new file mode 100644 index 0000000000..ba2f5554bf --- /dev/null +++ b/package/nvidia-driver/nvidia-driver.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 d3a2842cbfb1163e20c658fbfaf5a235d5c9f035cd2d657f15df8a14b3fe80b1 NVIDIA-Linux-x86-358.16.run +sha256 a942cdb29ed715ff1ce25beb06b6c2490126b98ef8bee5d9973967b557596bf2 NVIDIA-Linux-x86_64-358.16.run diff --git a/package/nvidia-driver/nvidia-driver.mk b/package/nvidia-driver/nvidia-driver.mk new file mode 100644 index 0000000000..7e670206e0 --- /dev/null +++ b/package/nvidia-driver/nvidia-driver.mk @@ -0,0 +1,183 @@ +################################################################################ +# +# nvidia-driver +# +################################################################################ + +NVIDIA_DRIVER_VERSION = 358.16 +NVIDIA_DRIVER_SUFFIX = $(if $(BR2_x86_64),_64) +NVIDIA_DRIVER_SITE = ftp://download.nvidia.com/XFree86/Linux-x86$(NVIDIA_DRIVER_SUFFIX)/$(NVIDIA_DRIVER_VERSION) +NVIDIA_DRIVER_SOURCE = NVIDIA-Linux-x86$(NVIDIA_DRIVER_SUFFIX)-$(NVIDIA_DRIVER_VERSION).run +NVIDIA_DRIVER_LICENSE = NVIDIA Software License +NVIDIA_DRIVER_LICENSE_FILES = LICENSE +NVIDIA_DRIVER_REDISTRIBUTE = NO +NVIDIA_DRIVER_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_XORG),y) + +# Since nvidia-driver are binary blobs, the below dependencies are not +# strictly speaking build dependencies of nvidia-driver. However, they +# are build dependencies of packages that depend on nvidia-driver, so +# they should be built prior to those packages, and the only simple +# way to do so is to make nvidia-driver depend on them. +NVIDIA_DRIVER_DEPENDENCIES = mesa3d-headers xlib_libX11 xlib_libXext +NVIDIA_DRIVER_PROVIDES = libgl libegl libgles + +# We have two variables that contains a list of libraries to install: +# NVIDIA_DRIVER_LIBS +# contains the libraries whose filename end up in .so.$(VERSION); rather +# than duplicate the version string for all of them, we just store their +# basename, and append the version string below. +# NVIDIA_DRIVER_LIBS_NO_VERSION +# contains all libraries the do not use the NVidia version; since there +# is currently only one such library, we store its full name. + +# Each line corresponds to a specific set of libraries +NVIDIA_DRIVER_LIBS = \ + libEGL libGLESv1_CM libGLESv2 libGL \ + libnvidia-glcore libnvidia-eglcore libnvidia-glsi \ + tls/libnvidia-tls \ + libvdpau libvdpau_nvidia \ + libnvidia-ml + +# Install the gl.pc file +define NVIDIA_DRIVER_INSTALL_GL_DEV + $(INSTALL) -D -m 0644 $(@D)/libGL.la $(STAGING_DIR)/usr/lib/libGL.la + $(SED) 's:__GENERATED_BY__:Buildroot:' $(STAGING_DIR)/usr/lib/libGL.la + $(SED) 's:__LIBGL_PATH__:/usr/lib:' $(STAGING_DIR)/usr/lib/libGL.la + $(SED) 's:-L[^[:space:]]\+::' $(STAGING_DIR)/usr/lib/libGL.la + $(INSTALL) -D -m 0644 package/nvidia-driver/gl.pc $(STAGING_DIR)/usr/lib/pkgconfig/gl.pc +endef + +# Those libraries are 'private' libraries requiring an agreement with +# NVidia to develop code for those libs. There seems to be no restriction +# on using those libraries (e.g. if the user has such an agreement, or +# wants to run a third-party program developped under such an agreement). +ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_PRIVATE_LIBS),y) +NVIDIA_DRIVER_LIBS += libnvidia-ifr libnvidia-fbc +endif + +# We refer to the destination path; the origin file has no directory component +NVIDIA_DRIVER_X_MODS = drivers/nvidia_drv.so \ + extensions/libglx.so.$(NVIDIA_DRIVER_VERSION) \ + libnvidia-wfb.so.$(NVIDIA_DRIVER_VERSION) + +endif # X drivers + +ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_CUDA),y) +NVIDIA_DRIVER_LIBS += libcuda libnvidia-compiler libnvcuvid libnvidia-encode +ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_CUDA_PROGS),y) +NVIDIA_DRIVER_PROGS = nvidia-cuda-mps-control nvidia-cuda-mps-server +endif +endif + +ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_OPENCL),y) +NVIDIA_DRIVER_LIBS_NO_VERSION += libOpenCL.so.1.0.0 +NVIDIA_DRIVER_LIBS += libnvidia-opencl +endif + +# The downloaded archive is in fact an auto-extract script. So, it can run +# virtually everywhere, and it is fine enough to provide useful options. +# Except it can't extract into an existing (even empty) directory. +define NVIDIA_DRIVER_EXTRACT_CMDS + $(SHELL) $(DL_DIR)/$(NVIDIA_DRIVER_SOURCE) --extract-only --target \ + $(@D)/tmp-extract + mv $(@D)/tmp-extract/* $(@D)/tmp-extract/.manifest $(@D) + rm -rf $(@D)/tmp-extract +endef + +# Build and install the kernel modules if needed +ifeq ($(BR2_PACKAGE_NVIDIA_DRIVER_MODULE),y) + +NVIDIA_DRIVER_DEPENDENCIES += linux + +# NVidia uses the legacy naming scheme for the x86 architecture, when i386 +# and x86_64 were still considered two separate architectures in the Linux +# kernel. +NVIDIA_DRIVER_ARCH = $(if $(BR2_i386),i386,$(BR2_ARCH)) + +NVIDIA_DRIVER_MOD_DIRS = kernel +NVIDIA_DRIVER_MOD_FILES = kernel/nvidia.ko +# nvidia-uvm.ko only available for x86_64 +ifeq ($(BR2_x86_64)$(BR2_PACKAGE_NVIDIA_DRIVER_CUDA),yy) +NVIDIA_DRIVER_MOD_DIRS += kernel/uvm +NVIDIA_DRIVER_MOD_FILES += kernel/uvm/nvidia-uvm.ko +endif + +# We can not use '$(MAKE) -C $(@D)/$${dir}' because NVidia's uses its own +# Makefile to build a kernel module, which includes a lot of assumptions +# on where to find its own sub-Makefile fragments, and fails if make is +# not run from the directory where the module's source files are. Hence +# our little trick to cd in there first. +# That's also the reason why we do not use LINUX_MAKE_FLAGS or the other +# linux-specific variables, since NVidia's Makefile does not understand +# them. +define NVIDIA_DRIVER_BUILD_CMDS + for dir in $(NVIDIA_DRIVER_MOD_DIRS); do \ + (cd $(@D)/$${dir} && \ + $(MAKE) SYSSRC="$(LINUX_DIR)" SYSOUT="$(LINUX_DIR)" \ + CC="$(TARGET_CC)" LD="$(TARGET_LD)" HOSTCC="$(HOSTCC)" \ + ARCH=$(NVIDIA_DRIVER_ARCH) module) || exit 1; \ + done +endef + +# We do not use module-install because NVidia's Makefile requires root. +# Also, we do not install it in the expected location (in nvidia/ rather +# than in kernel/drivers/video/) +define NVIDIA_DRIVER_INSTALL_KERNEL_MODULE + for mod in $(NVIDIA_DRIVER_MOD_FILES); do \ + $(INSTALL) -D -m 0644 $(@D)/$${mod} \ + $(TARGET_DIR)/lib/modules/$(LINUX_VERSION_PROBED)/nvidia/$${mod##*/} \ + || exit 1; \ + done + $(HOST_DIR)/sbin/depmod -a -b $(TARGET_DIR) $(LINUX_VERSION_PROBED) +endef + +endif # BR2_PACKAGE_NVIDIA_DRIVER_MODULE == y + +# Helper to install libraries +# $1: destination directory (target or staging) +# +# For all libraries that need it, we append the NVidia version string. +# Then for all libraries, we install them and create a symlink using +# their SONAME, so we can link to them at runtime; we also create the +# no-version symlink, so we can link to them at build time. +define NVIDIA_DRIVER_INSTALL_LIBS + for libpath in $(addsuffix .so.$(NVIDIA_DRIVER_VERSION),$(NVIDIA_DRIVER_LIBS)) \ + $(NVIDIA_DRIVER_LIBS_NO_VERSION); \ + do \ + libname="$${libpath##*/}"; \ + $(INSTALL) -D -m 0644 $(@D)/$${libpath} $(1)/usr/lib/$${libname}; \ + libsoname="$$( $(TARGET_READELF) -d "$(@D)/$${libpath}" \ + |sed -r -e '/.*\(SONAME\).*\[(.*)\]$$/!d; s//\1/;' )"; \ + if [ -n "$${libsoname}" -a "$${libsoname}" != "$${libname}" ]; then \ + ln -sf $${libname} $(1)/usr/lib/$${libsoname}; \ + fi; \ + baseso="$${libname/.so*}.so"; \ + if [ -n "$${baseso}" -a "$${baseso}" != "$${libname}" ]; then \ + ln -sf $${libname} $(1)/usr/lib/$${baseso}; \ + fi; \ + done +endef + +# For staging, install libraries and development files +define NVIDIA_DRIVER_INSTALL_STAGING_CMDS + $(call NVIDIA_DRIVER_INSTALL_LIBS,$(STAGING_DIR)) + $(NVIDIA_DRIVER_INSTALL_GL_DEV) +endef + +# For target, install libraries and X.org modules +define NVIDIA_DRIVER_INSTALL_TARGET_CMDS + $(call NVIDIA_DRIVER_INSTALL_LIBS,$(TARGET_DIR)) + for m in $(NVIDIA_DRIVER_X_MODS); do \ + $(INSTALL) -D -m 0644 $(@D)/$${m##*/} \ + $(TARGET_DIR)/usr/lib/xorg/modules/$${m}; \ + done + for p in $(NVIDIA_DRIVER_PROGS); do \ + $(INSTALL) -D -m 0755 $(@D)/$${p} \ + $(TARGET_DIR)/usr/bin/$${p}; \ + done + $(NVIDIA_DRIVER_INSTALL_KERNEL_MODULE) +endef + +$(eval $(generic-package)) diff --git a/package/nvidia-tegra23/Config.in b/package/nvidia-tegra23/Config.in new file mode 100644 index 0000000000..eb33581d08 --- /dev/null +++ b/package/nvidia-tegra23/Config.in @@ -0,0 +1,38 @@ +menuconfig BR2_PACKAGE_NVIDIA_TEGRA23 + bool "nvidia-tegra23" + depends on BR2_cortex_a9 + depends on BR2_ARM_EABIHF && BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_XORG7 + depends on BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_14 + help + Install NVidia proprietary blobs to drive Tegra2 or Tegra3 + GPUs found in some mobile-targeted ARM SoCs. + +if BR2_PACKAGE_NVIDIA_TEGRA23 + +choice + prompt "Tegra platform" + help + Select the SOC platform. + +config BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA2 + bool "Tegra 2" + help + NVIDIA Tegra 2 is a dual-core Cortex-A9 without NEON. + +config BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA3 + bool "Tegra 3" + depends on BR2_ARM_CPU_HAS_NEON + help + NVIDIA Tegra 3 is a quad-core Cortex-A9 with NEON. + +endchoice + +source "package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in" +source "package/nvidia-tegra23/nvidia-tegra23-codecs/Config.in" +endif + +comment "nvidia-tegra23 needs Xorg <= 1.14 and a (e)glibc toolchain w/ EABIhf" + depends on BR2_cortex_a9 + depends on !BR2_ARM_EABIHF || !BR2_TOOLCHAIN_USES_GLIBC \ + || !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_14 diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in b/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in new file mode 100644 index 0000000000..573ab90bea --- /dev/null +++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/Config.in @@ -0,0 +1,42 @@ +config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES + bool "nvidia-tegra23 binaries" + select BR2_PACKAGE_MESA3D_HEADERS + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + select BR2_PACKAGE_HAS_LIBOPENMAX + help + Those packages provide libraries, drivers and firmware that comes from + NVIDIA Linux For Tegra. + + https://developer.nvidia.com/linux-tegra + +if BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "nvidia-tegra23-binaries" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "nvidia-tegra23-binaries" + +config BR2_PACKAGE_PROVIDES_LIBOPENMAX + default "nvidia-tegra23-binaries" + +config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS + bool "GStreamer 0.10.x plugins" + depends on BR2_PACKAGE_GSTREAMER # Run-time only + select BR2_PACKAGE_XLIB_LIBXV + help + GStreamer 0.10.x plugins + +config BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_NV_SAMPLE_APPS + bool "NVIDIA multimedia sample apps" + depends on BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS + help + nvgstplayer and nvgstcapture multimedia test applications. + +comment "GStreamer 0.10.x plugins need GStreamer 0.10" + depends on !BR2_PACKAGE_GSTREAMER + +endif diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc b/package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc new file mode 100644 index 0000000000..3af7eecc01 --- /dev/null +++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/egl.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=/usr/lib +includedir=/usr/include + +Name: egl +Description: EGL implementation +Version: 1 +Cflags: -I${includedir}/EGL +Libs: -L${libdir} -lEGL diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc b/package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc new file mode 100644 index 0000000000..91387c9793 --- /dev/null +++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/gles.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=/usr/lib +includedir=/usr/include + +Name: glesv2 +Description: OpenGL ES 1.1 implementation +Version: 1.1 +Cflags: -I${includedir}/GLES +Libs: -L${libdir} -lGLESv1_CM diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc b/package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc new file mode 100644 index 0000000000..356a1cba4f --- /dev/null +++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/glesv2.pc @@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=/usr/lib +includedir=/usr/include + +Name: glesv2 +Description: OpenGL ES 2 implementation +Version: 2 +Cflags: -I${includedir}/GLESv2 +Libs: -L${libdir} -lGLESv2 diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.hash b/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.hash new file mode 100644 index 0000000000..50c3cda645 --- /dev/null +++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.hash @@ -0,0 +1,3 @@ +# From https://developer.nvidia.com/linux-tegra-rel-16 +sha1 295dcd63b2f122c2d99f07fcc083db9adb8ac178 Tegra20_Linux_R16.5_armhf.tbz2 +sha1 6be645c20d81d518856bc8520ef4c2472d57eaef Tegra30_Linux_R16.5_armhf.tbz2 diff --git a/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk b/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk new file mode 100644 index 0000000000..4f7cdcf6d6 --- /dev/null +++ b/package/nvidia-tegra23/nvidia-tegra23-binaries/nvidia-tegra23-binaries.mk @@ -0,0 +1,95 @@ +################################################################################ +# +# nvidia-tegra23-binaries +# +################################################################################ + +NVIDIA_TEGRA23_BINARIES_VERSION = $(NVIDIA_TEGRA23_VERSION) +NVIDIA_TEGRA23_BINARIES_SITE = $(NVIDIA_TEGRA23_SITE) +NVIDIA_TEGRA23_BINARIES_SOURCE = $(NVIDIA_TEGRA23_BASE)_R$(NVIDIA_TEGRA23_BINARIES_VERSION)_armhf.tbz2 + +NVIDIA_TEGRA23_BINARIES_LICENSE = License For Customer Use of NVIDIA Software +NVIDIA_TEGRA23_BINARIES_LICENSE_FILES = nv_tegra/LICENSE +ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS),y) +NVIDIA_TEGRA23_BINARIES_LICENSE += LGPLv2.1 +NVIDIA_TEGRA23_BINARIES_LICENSE_FILES += nv_tegra/nv_sample_apps/LICENSE.gst-openmax +endif + +NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING = YES + +# Those are not really needed to build nvidia-tegra23-binaries, but +# will be needed by packages who link against libraries provided by +# nvidia-tegra23-binaries. + +NVIDIA_TEGRA23_BINARIES_DEPENDENCIES = mesa3d-headers \ + xlib_libX11 xlib_libXext + +ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS),y) +NVIDIA_TEGRA23_BINARIES_DEPENDENCIES += xlib_libXv +endif + +NVIDIA_TEGRA23_BINARIES_PROVIDES = libegl libgles libopenmax + +NVIDIA_TEGRA23_BINARIES_DRV = \ + nv_tegra/nvidia_drivers/usr/lib/xorg/modules/drivers/tegra_drv.abi$(BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI).so + +define NVIDIA_TEGRA23_BINARIES_EXTRACT_FURTHER + $(INSTALL) -d $(@D)/nv_tegra/nvidia_drivers + $(call suitable-extractor,$(@D)/nv_tegra/nvidia_drivers.tbz2) \ + $(@D)/nv_tegra/nvidia_drivers.tbz2 | \ + $(TAR) --strip-components=0 -C $(@D)/nv_tegra/nvidia_drivers/ $(TAR_OPTIONS) - + $(INSTALL) -d $(@D)/nv_tegra/nv_sample_apps/nvgstapps + $(call suitable-extractor,$(@D)/nv_tegra/nv_sample_apps/nvgstapps.tbz2) \ + $(@D)/nv_tegra/nv_sample_apps/nvgstapps.tbz2 | \ + $(TAR) --strip-components=0 -C $(@D)/nv_tegra/nv_sample_apps/nvgstapps/ $(TAR_OPTIONS) - +endef +NVIDIA_TEGRA23_BINARIES_POST_EXTRACT_HOOKS += NVIDIA_TEGRA23_BINARIES_EXTRACT_FURTHER + +define NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS + mkdir -p $(1)/usr/lib + cp -dpfr $(@D)/nv_tegra/nvidia_drivers/usr/lib/*.so $(1)/usr/lib/ + (cd $(1)/usr/lib; \ + ln -sf libGLESv2.so.2 libGLESv2.so; \ + ln -sf libGLESv1_CM.so.1 libGLESv1_CM.so; \ + ln -sf libEGL.so.1 libEGL.so \ + ) +endef + +ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_GSTREAMER_PLUGINS),y) +define NVIDIA_TEGRA23_BINARIES_INSTALL_GST_PLUGINS + mkdir -p $(1)/usr/lib/gstreamer-0.10/ + cp -dpfr $(@D)/nv_tegra/nv_sample_apps/nvgstapps/usr/lib/gstreamer-0.10/*.so \ + $(1)/usr/lib/gstreamer-0.10/ +endef +endif + +ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES_NV_SAMPLE_APPS),y) +define NVIDIA_TEGRA23_BINARIES_INSTALL_APPS + mkdir -p $(TARGET_DIR)/usr/bin/ + cp -dpfr $(@D)/nv_tegra/nv_sample_apps/nvgstapps/usr/bin/* \ + $(TARGET_DIR)/usr/bin/ +endef +endif + +define NVIDIA_TEGRA23_BINARIES_INSTALL_STAGING_CMDS + $(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(STAGING_DIR)) + mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig/ + cp -dpfr package/nvidia-tegra23/nvidia-tegra23-binaries/*.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/ + $(call NVIDIA_TEGRA23_BINARIES_INSTALL_GST_PLUGINS,$(STAGING_DIR)) +endef + +define NVIDIA_TEGRA23_BINARIES_INSTALL_TARGET_CMDS + $(call NVIDIA_TEGRA23_BINARIES_INSTALL_LIBS,$(TARGET_DIR)) + mkdir -p $(TARGET_DIR)/lib/firmware/ + cp -dpfr $(@D)/nv_tegra/nvidia_drivers/lib/firmware/*.bin \ + $(TARGET_DIR)/lib/firmware/ + $(INSTALL) -D -m 0644 $(@D)/nv_tegra/nvidia_drivers/etc/nv_tegra_release \ + $(TARGET_DIR)/etc/nv_tegra_release + $(INSTALL) -D -m 0644 $(@D)/$(NVIDIA_TEGRA23_BINARIES_DRV) \ + $(TARGET_DIR)/usr/lib/xorg/modules/drivers/tegra_drv.so + $(call NVIDIA_TEGRA23_BINARIES_INSTALL_GST_PLUGINS,$(TARGET_DIR)) + $(NVIDIA_TEGRA23_BINARIES_INSTALL_APPS) +endef + +$(eval $(generic-package)) diff --git a/package/nvidia-tegra23/nvidia-tegra23-codecs/Config.in b/package/nvidia-tegra23/nvidia-tegra23-codecs/Config.in new file mode 100644 index 0000000000..df9de69dc4 --- /dev/null +++ b/package/nvidia-tegra23/nvidia-tegra23-codecs/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_NVIDIA_TEGRA23_CODECS + bool "nvidia-tegra23 codecs" + depends on BR2_PACKAGE_NVIDIA_TEGRA23_BINARIES + help + NVIDIA Tegra restricted codecs from Linux For Tegra 16.5. + + https://developer.nvidia.com/linux-tegra-rel-16 diff --git a/package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.hash b/package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.hash new file mode 100644 index 0000000000..9b5c61496f --- /dev/null +++ b/package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.hash @@ -0,0 +1,3 @@ +# From https://developer.nvidia.com/linux-tegra-rel-16 +sha1 540e89d5462537cd59c8a86efdb786b3b4310868 Tegra20_Linux-codecs_R16.5_armhf.tbz2 +sha1 3637efe808f25594e3cdc2756aef6e0274ab70f4 Tegra30_Linux-codecs_R16.5_armhf.tbz2 diff --git a/package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.mk b/package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.mk new file mode 100644 index 0000000000..5514643416 --- /dev/null +++ b/package/nvidia-tegra23/nvidia-tegra23-codecs/nvidia-tegra23-codecs.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# nvidia-tegra23-codecs +# +################################################################################ + +NVIDIA_TEGRA23_CODECS_VERSION = $(NVIDIA_TEGRA23_VERSION) +NVIDIA_TEGRA23_CODECS_SOURCE = $(NVIDIA_TEGRA23_BASE)-codecs_R$(NVIDIA_TEGRA23_CODECS_VERSION)_armhf.tbz2 +NVIDIA_TEGRA23_CODECS_SITE = $(NVIDIA_TEGRA23_SITE) +NVIDIA_TEGRA23_CODECS_LICENSE = NVIDIA(r) Tegra(r) Software License Agreement +NVIDIA_TEGRA23_CODECS_LICENSE_FILES = Tegra_Software_License_Agreement-Tegra-Linux-codecs.txt +NVIDIA_TEGRA23_CODECS_REDISTRIBUTE = NO + +# The archive contains an archive with the firmware codecs +define NVIDIA_TEGRA23_CODECS_EXTRACT_CMDS + $(INSTALL) -d $(@D) + $(call suitable-extractor,$(NVIDIA_TEGRA23_CODECS_SOURCE)) \ + $(DL_DIR)/$(NVIDIA_TEGRA23_CODECS_SOURCE) | \ + $(TAR) --strip-components=0 -C $(@D) $(TAR_OPTIONS) - + $(INSTALL) -d $(@D)/restricted_codecs + $(call suitable-extractor,$(@D)/restricted_codecs.tbz2) \ + $(@D)/restricted_codecs.tbz2 | \ + $(TAR) --strip-components=0 -C $(@D)/restricted_codecs/ $(TAR_OPTIONS) - +endef + +define NVIDIA_TEGRA23_CODECS_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/lib/firmware/ + cp -dpfr $(@D)/restricted_codecs/lib/firmware/*.axf \ + $(TARGET_DIR)/lib/firmware/ +endef + +$(eval $(generic-package)) diff --git a/package/nvidia-tegra23/nvidia-tegra23.mk b/package/nvidia-tegra23/nvidia-tegra23.mk new file mode 100644 index 0000000000..b97d0ccac4 --- /dev/null +++ b/package/nvidia-tegra23/nvidia-tegra23.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# nvidia-tegra23 +# +################################################################################ + +NVIDIA_TEGRA23_VERSION = 16.5 + +ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA2),y) +NVIDIA_TEGRA23_SITE = http://developer.download.nvidia.com/mobile/tegra/l4t/r16.5.0/ventana_release_armhf +NVIDIA_TEGRA23_BASE = Tegra20_Linux +endif +ifeq ($(BR2_PACKAGE_NVIDIA_TEGRA23_TEGRA3),y) +NVIDIA_TEGRA23_SITE = http://developer.download.nvidia.com/mobile/tegra/l4t/r16.5.0/cardhu_release_armhf +NVIDIA_TEGRA23_BASE = Tegra30_Linux +endif + +include $(sort $(wildcard package/nvidia-tegra23/*/*.mk)) diff --git a/package/nvme/Config.in b/package/nvme/Config.in new file mode 100644 index 0000000000..dd8655fa1a --- /dev/null +++ b/package/nvme/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_NVME + bool "nvme" + help + NVME utility, a utility for interacting with standard NVM + Express (optimized PCI Express SSD interface) devices. + + https://github.com/linux-nvme/nvme-cli diff --git a/package/nvme/nvme.hash b/package/nvme/nvme.hash new file mode 100644 index 0000000000..b299041960 --- /dev/null +++ b/package/nvme/nvme.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 c631e90dd4d411cdb618b26bc36b06706e6f1f2d3db38874bcfe48f4bc15aac4 nvme-v0.3.tar.gz diff --git a/package/nvme/nvme.mk b/package/nvme/nvme.mk new file mode 100755 index 0000000000..b745025fdf --- /dev/null +++ b/package/nvme/nvme.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# nvme +# +################################################################################ + +NVME_VERSION = v0.3 +NVME_SITE = $(call github,linux-nvme,nvme-cli,$(NVME_VERSION)) +NVME_LICENSE = GPLv2+ +NVME_LICENSE_FILES = LICENSE + +# Yes LIBUDEV=0 means udev support enabled, LIBUDEV=1 means udev +# support disabled. +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +NVME_DEPENDENCIES += udev +NVME_MAKE_OPTS += LIBUDEV=0 +else +NVME_MAKE_OPTS += LIBUDEV=1 +endif + +# LIBUDEV=1 means that libudev is _disabled_ +define NVME_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \ + $(NVME_MAKE_OPTS) -C $(@D) +endef + +define NVME_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \ + PREFIX=/usr install-bin +endef + +$(eval $(generic-package)) diff --git a/package/obsidian-cursors/Config.in b/package/obsidian-cursors/Config.in new file mode 100644 index 0000000000..49ec310170 --- /dev/null +++ b/package/obsidian-cursors/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_OBSIDIAN_CURSORS + bool "obsidian-cursors" + help + Obsidian Cursors is a shiny and clean cursor set. + + http://kde-look.org/content/show.php/Obsidian+Cursors?content=73135 diff --git a/package/obsidian-cursors/obsidian-cursors.hash b/package/obsidian-cursors/obsidian-cursors.hash new file mode 100644 index 0000000000..8f1775e8a4 --- /dev/null +++ b/package/obsidian-cursors/obsidian-cursors.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3d38fe875f6feae8b7772e02cfda530fcf669479807915cd2c12c149da17cfb9 73135-Obsidian.tar.bz2 diff --git a/package/obsidian-cursors/obsidian-cursors.mk b/package/obsidian-cursors/obsidian-cursors.mk new file mode 100644 index 0000000000..87a8d62f3e --- /dev/null +++ b/package/obsidian-cursors/obsidian-cursors.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# obsidian-cursors +# +################################################################################ + +OBSIDIAN_CURSORS_VERSION = 1.0 +OBSIDIAN_CURSORS_SITE = http://kde-look.org/CONTENT/content-files +OBSIDIAN_CURSORS_SOURCE = 73135-Obsidian.tar.bz2 +OBSIDIAN_CURSORS_LICENSE = GPL + +define OBSIDIAN_CURSORS_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/share/cursors/xorg-x11/Obsidian + cp -a $(@D)/cursors \ + $(TARGET_DIR)/usr/share/cursors/xorg-x11/Obsidian +endef + +$(eval $(generic-package)) diff --git a/package/ocf-linux/ocf-linux.hash b/package/ocf-linux/ocf-linux.hash new file mode 100644 index 0000000000..0bd0ea19df --- /dev/null +++ b/package/ocf-linux/ocf-linux.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 5113609d2c2c43fde962bec1238fe5a81211a751ebb0337b54a9804d40cfef53 ocf-linux-20120127.tar.gz diff --git a/package/ocf-linux/ocf-linux.mk b/package/ocf-linux/ocf-linux.mk new file mode 100644 index 0000000000..35968d5edc --- /dev/null +++ b/package/ocf-linux/ocf-linux.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# ocf-linux +# +################################################################################ + +OCF_LINUX_VERSION = 20120127 +OCF_LINUX_SITE = http://downloads.sourceforge.net/project/ocf-linux/ocf-linux/$(OCF_LINUX_VERSION) +OCF_LINUX_INSTALL_STAGING = YES + +OCF_LINUX_MODULE_SUBDIRS = ocf +OCF_LINUX_MODULE_MAKE_OPTS = \ + CONFIG_OCF_OCF=m \ + CONFIG_OCF_CRYPTOSOFT=m \ + CONFIG_OCF_BENCH=m \ + CONFIG_OCF_OCFNULL=m + +define OCF_LINUX_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 644 $(@D)/ocf/cryptodev.h \ + $(STAGING_DIR)/usr/include/crypto/cryptodev.h +endef + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/ocrad/Config.in b/package/ocrad/Config.in new file mode 100644 index 0000000000..38d37c612a --- /dev/null +++ b/package/ocrad/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_OCRAD + bool "ocrad" + depends on BR2_INSTALL_LIBSTDCPP + help + GNU Ocrad is an OCR (Optical Character Recognition) program + based on a feature extraction method. + It reads images in pbm (bitmap), pgm (greyscale) or + ppm (color) formats and produces text in byte (8-bit) or + UTF-8 formats. + + http://www.gnu.org/software/ocrad/ + +comment "ocrad needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/ocrad/ocrad.hash b/package/ocrad/ocrad.hash new file mode 100644 index 0000000000..c40907bcb4 --- /dev/null +++ b/package/ocrad/ocrad.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 4ec711239d6b667bac015ef9908cab3ea9f8fd73f098ae355498810c8e82a8cc ocrad-0.21.tar.gz diff --git a/package/ocrad/ocrad.mk b/package/ocrad/ocrad.mk new file mode 100644 index 0000000000..8a038e2ca2 --- /dev/null +++ b/package/ocrad/ocrad.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# ocrad +# +################################################################################ + +OCRAD_VERSION = 0.21 +OCRAD_SITE = $(BR2_GNU_MIRROR)/ocrad +OCRAD_LICENSE = GPLv3+ +OCRAD_LICENSE_FILES = COPYING +OCRAD_INSTALL_STAGING = YES + +# This is not a true autotools package. +define OCRAD_CONFIGURE_CMDS + cd $(@D) && \ + ./configure --prefix=/usr --sysconfdir=/etc $(TARGET_CONFIGURE_OPTS) +endef + +define OCRAD_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define OCRAD_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install +endef + +define OCRAD_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/odhcp6c/Config.in b/package/odhcp6c/Config.in new file mode 100644 index 0000000000..329b55c1c6 --- /dev/null +++ b/package/odhcp6c/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_ODHCP6C + bool "odhcp6c" + depends on BR2_USE_MMU # fork() + help + odhcp6c is a minimal DHCPv6 and RA-client for use in embedded Linux + systems, especially routers. + + https://github.com/sbyx/odhcp6c diff --git a/package/odhcp6c/odhcp6c.hash b/package/odhcp6c/odhcp6c.hash new file mode 100644 index 0000000000..00a096029d --- /dev/null +++ b/package/odhcp6c/odhcp6c.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 b5f920ed300309d65e431a360cae5f3c2010eca09a4231c9ef907c730d3c0d09 odhcp6c-dc186d6d2b0dd4ad23ca5fc69c00e81f796ff6d9.tar.gz diff --git a/package/odhcp6c/odhcp6c.mk b/package/odhcp6c/odhcp6c.mk new file mode 100644 index 0000000000..c841cd3122 --- /dev/null +++ b/package/odhcp6c/odhcp6c.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# odhcp6c +# +################################################################################ + +ODHCP6C_VERSION = dc186d6d2b0dd4ad23ca5fc69c00e81f796ff6d9 +ODHCP6C_SITE = $(call github,sbyx,odhcp6c,$(ODHCP6C_VERSION)) +ODHCP6C_LICENSE = GPLv2 +ODHCP6C_LICENSE_FILES = COPYING + +define ODHCP6C_INSTALL_SCRIPT + $(INSTALL) -m 0755 -D $(@D)/odhcp6c-example-script.sh \ + $(TARGET_DIR)/usr/sbin/odhcp6c-update +endef + +ODHCP6C_POST_INSTALL_TARGET_HOOKS += ODHCP6C_INSTALL_SCRIPT + +$(eval $(cmake-package)) diff --git a/package/odhcploc/Config.in b/package/odhcploc/Config.in new file mode 100644 index 0000000000..74bf3630be --- /dev/null +++ b/package/odhcploc/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_ODHCPLOC + bool "odhcploc" + help + Open DHCP Locate (ODHCPLoc) is program to locate and + display active DHCP servers on a subnet. + Can be used to scan for rogue DHCP servers. + + http://odhcploc.sourceforge.net/ diff --git a/package/odhcploc/odhcploc.hash b/package/odhcploc/odhcploc.hash new file mode 100644 index 0000000000..201339f97c --- /dev/null +++ b/package/odhcploc/odhcploc.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 b0360a3aece8a29d131531da7bfc36d57c30c6eed30ff1ea360f7cccea1d62d7 odhcploc-20111021.tar.gz diff --git a/package/odhcploc/odhcploc.mk b/package/odhcploc/odhcploc.mk new file mode 100644 index 0000000000..3995551927 --- /dev/null +++ b/package/odhcploc/odhcploc.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# odhcploc +# +################################################################################ + +ODHCPLOC_VERSION = 20111021 +ODHCPLOC_SITE = http://downloads.sourceforge.net/project/odhcploc/$(ODHCPLOC_VERSION) +ODHCPLOC_LICENSE = ISC +ODHCPLOC_LICENSE_FILES = COPYING + +define ODHCPLOC_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all +endef + +define ODHCPLOC_INSTALL_TARGET_CMDS + $(MAKE) PREFIX=/usr DESTDIR=$(TARGET_DIR) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/ofono/0001-uclibc-backtrace.patch b/package/ofono/0001-uclibc-backtrace.patch new file mode 100644 index 0000000000..3ce7bf8cbc --- /dev/null +++ b/package/ofono/0001-uclibc-backtrace.patch @@ -0,0 +1,49 @@ +[PATCH] fix build on uClibc without UCLIBC_HAS_BACKTRACE + +Backtrace support is only used for logging on signal errors, which +isn't really critical, so simply remove backtrace info if not +available in uClibc. + +NOTE: based on patch from Peter Korsgaard + +Signed-off-by: Petr Vorel +--- +--- ofono-1.7.orig/src/log.c ++++ ofono-1.7/src/log.c +@@ -30,7 +30,8 @@ + #include + #include + #include +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && !(defined(__UCLIBC__) && !defined (__UCLIBC_HAS_BACKTRACE__)) ++#define HAVE_BACKTRACE + #include + #endif + #include +@@ -115,7 +116,7 @@ + va_end(ap); + } + +-#ifdef __GLIBC__ ++#ifdef HAVE_BACKTRACE + static void print_backtrace(unsigned int offset) + { + void *frames[99]; +@@ -309,7 +310,7 @@ + if (detach == FALSE) + option |= LOG_PERROR; + +-#ifdef __GLIBC__ ++#ifdef HAVE_BACKTRACE + signal_setup(signal_handler); + #endif + +@@ -326,7 +327,7 @@ + + closelog(); + +-#ifdef __GLIBC__ ++#ifdef HAVE_BACKTRACE + signal_setup(SIG_DFL); + #endif + diff --git a/package/ofono/Config.in b/package/ofono/Config.in new file mode 100644 index 0000000000..70daef7a1b --- /dev/null +++ b/package/ofono/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_OFONO + bool "ofono" + depends on BR2_USE_WCHAR # gettext, libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2 + depends on BR2_USE_MMU # dbus, libglib2 + depends on !BR2_STATIC_LIBS # dlopen() + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_LIBCAP_NG + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_MOBILE_BROADBAND_PROVIDER_INFO + help + oFono is a free, open source project for mobile telephony + (GSM/UMTS) applications. It uses high-level D-Bus API for + use by telephony applications. It uses 3GPP standard. + + http://ofono.org/ + +comment "ofono needs a toolchain w/ dynamic library, wchar, threads" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ofono/S46ofono b/package/ofono/S46ofono new file mode 100755 index 0000000000..7eb2fca3b8 --- /dev/null +++ b/package/ofono/S46ofono @@ -0,0 +1,22 @@ +#!/bin/sh + +case "$1" in + start) + printf "Starting ofono ... " + start-stop-daemon -S -q -m -b -p /var/run/ofonod.pid --exec /usr/sbin/ofonod -- -n + echo "done." + ;; + stop) + printf "Stopping ofono ..." + start-stop-daemon -K -q -p /var/run/ofonod.pid + echo "done." + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" + ;; +esac diff --git a/package/ofono/ofono.hash b/package/ofono/ofono.hash new file mode 100644 index 0000000000..50c92ede65 --- /dev/null +++ b/package/ofono/ofono.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/network/ofono/sha256sums.asc +sha256 cbf20f07fd15253c682b23c1786d517f505c3688f7c4ea93da777e1523b89635 ofono-1.17.tar.xz diff --git a/package/ofono/ofono.mk b/package/ofono/ofono.mk new file mode 100644 index 0000000000..588c9cd62b --- /dev/null +++ b/package/ofono/ofono.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# ofono +# +################################################################################ + +OFONO_VERSION = 1.17 +OFONO_SOURCE = ofono-$(OFONO_VERSION).tar.xz +OFONO_SITE = $(BR2_KERNEL_MIRROR)/linux/network/ofono +OFONO_LICENSE = GPLv2 +OFONO_LICENSE_FILES = COPYING +OFONO_DEPENDENCIES = \ + host-pkgconf \ + dbus \ + libglib2 \ + libcap-ng \ + mobile-broadband-provider-info + +OFONO_CONF_OPTS = \ + --disable-test \ + --with-dbusconfdir=/etc \ + $(if $(BR2_INIT_SYSTEMD),--with-systemdunitdir=/usr/lib/systemd/system) + +# N.B. Qualcomm QMI modem support requires O_CLOEXEC; so +# make sure that it is defined. +OFONO_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +define OFONO_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/ofono/S46ofono $(TARGET_DIR)/etc/init.d/S46ofono +endef + +define OFONO_INSTALL_INIT_SYSTEMD + mkdir -p $(TARGET_DIR)/etc/systemd/systemd/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/ofono.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants +endef + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +OFONO_CONF_OPTS += --enable-udev +OFONO_DEPENDENCIES += udev +else +OFONO_CONF_OPTS += --disable-udev +endif + +ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y) +OFONO_CONF_OPTS += --enable-bluetooth +OFONO_DEPENDENCIES += bluez_utils +else +OFONO_CONF_OPTS += --disable-bluetooth +endif + +$(eval $(autotools-package)) diff --git a/package/ola/0001-Remove-fvisibiliy-inlines-hidden.patch b/package/ola/0001-Remove-fvisibiliy-inlines-hidden.patch new file mode 100644 index 0000000000..f2bf247c2e --- /dev/null +++ b/package/ola/0001-Remove-fvisibiliy-inlines-hidden.patch @@ -0,0 +1,26 @@ +From cd4f5d9d8a10c368584e8e714ebb0f9695267063 Mon Sep 17 00:00:00 2001 +From: Simon Marchi +Date: Mon, 10 Aug 2015 15:01:42 -0400 +Subject: [PATCH] Remove -fvisibiliy-inlines-hidden + +Signed-off-by: Simon Marchi +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 714e435..17a23e2 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -32,7 +32,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS = --enable-python-libs + COMMON_CXXFLAGS_ONLY_WARNINGS = \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/include \ +- -Wall -Wformat -W -fvisibility-inlines-hidden \ ++ -Wall -Wformat -W \ + $(libprotobuf_CFLAGS) + + COMMON_CXXFLAGS = $(COMMON_CXXFLAGS_ONLY_WARNINGS) +-- +2.5.0 + diff --git a/package/ola/Config.in b/package/ola/Config.in new file mode 100644 index 0000000000..55cea65d87 --- /dev/null +++ b/package/ola/Config.in @@ -0,0 +1,135 @@ +comment "ola needs a toolchain w/ C++, threads, wchar, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \ + || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS + +config BR2_PACKAGE_OLA + bool "ola (open lighting architecture)" + select BR2_PACKAGE_PROTOBUF + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX + depends on BR2_INSTALL_LIBSTDCPP # protobuf + depends on !BR2_STATIC_LIBS # protobuf + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS + help + Open Lighting Architecture provides applications + with a mechanism to send and receive DMX512 & RDM + commands using hardware devices and DMX over IP protocols. + + http://www.opendmx.net/index.php/OLA + +if BR2_PACKAGE_OLA + +menu "bindings and interface" + +config BR2_PACKAGE_OLA_WEB + bool "http interface" + select BR2_PACKAGE_LIBMICROHTTPD + help + Build OLA with browser interface. + +config BR2_PACKAGE_OLA_PYTHON_BINDINGS + bool "python bindings" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_PROTOBUF + help + Build OLA with support for the Python language. + +config BR2_PACKAGE_OLA_SLP + bool "slp tools" + help + Build OLA with slp tools. + +endmenu + +menu "tests and examples" + +config BR2_PACKAGE_OLA_EXAMPLES + bool "examples" + select BR2_PACKAGE_NCURSES + help + Build OLA examples. + +config BR2_PACKAGE_OLA_RDM_TESTS + bool "rdm tests" + depends on BR2_PACKAGE_OLA_PYTHON_BINDINGS + help + Build OLA RDM tests. + +endmenu + +menu "plugin selections" + +config BR2_PACKAGE_OLA_PLUGIN_E131 + bool "acn E131" + help + Build ACN E131 plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_ARTNET + bool "artnet" + help + Build Artnet plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_OPENDMX + bool "DMX4Linux" + help + Build DMX4Linux plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_DUMMY + bool "dummy" + help + Build Dummy plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_ESPNET + bool "espnet" + help + Build EspNet plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_KINET + bool "kinet" + help + Build KiNet plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_MILINT + bool "Milford Instruments" + help + Build Milford Instruments 1-463 plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_OSC + bool "osc" + select BR2_PACKAGE_LIBLO + help + Build Open Sound Control plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_PATHPORT + bool "pathport" + help + Build Pathport plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_SANDNET + bool "sandnet" + help + Build SandNet plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_SHOWNET + bool "shownet" + help + Build ShowNet plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_STAGEPROFI + bool "stageprofi" + select BR2_PACKAGE_LIBUSB + help + Build StageProfi plugin for OLA. + +config BR2_PACKAGE_OLA_PLUGIN_USBPRO + bool "usbpro" + select BR2_PACKAGE_LIBUSB + help + Build UsbPro plugin for OLA. + +endmenu + +endif diff --git a/package/ola/ola.hash b/package/ola/ola.hash new file mode 100644 index 0000000000..628b525280 --- /dev/null +++ b/package/ola/ola.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 74baba18c5b62aba15e27e6b7882c6eac22043c8e7b297e4d2f6eb05dd1a33b0 ola-0.10.0.tar.gz +sha256 32a8a7a00c7db7647710c84ed02611f2eba99669f2de4da7aceae9d4444f53a3 34999c70dcbe2d38bf13d57c9cfbdc63f0899b9a.patch diff --git a/package/ola/ola.mk b/package/ola/ola.mk new file mode 100644 index 0000000000..a983459aee --- /dev/null +++ b/package/ola/ola.mk @@ -0,0 +1,175 @@ +################################################################################ +# +# ola +# +################################################################################ + +OLA_VERSION = 0.10.0 +OLA_SITE = $(call github,OpenLightingProject,ola,$(OLA_VERSION)) +OLA_PATCH = https://github.com/OpenLightingProject/ola/commit/34999c70dcbe2d38bf13d57c9cfbdc63f0899b9a.patch +OLA_LICENSE = LGPLv2.1+ (libola, libolacommon, Python bindings), GPLv2+ (libolaserver, olad, Python examples and tests) +OLA_LICENSE_FILES = LICENCE GPL LGPL +OLA_INSTALL_STAGING = YES +OLA_AUTORECONF = YES + +# util-linux provides uuid lib +OLA_DEPENDENCIES = protobuf util-linux host-bison host-flex host-ola + +OLA_CONF_OPTS = \ + ac_cv_have_pymod_google_protobuf=yes \ + --disable-gcov \ + --disable-tcmalloc \ + --disable-unittests \ + --disable-root-check \ + --disable-java-libs \ + --disable-fatal-warnings \ + --with-ola-protoc-plugin=$(HOST_DIR)/usr/bin/ola_protoc_plugin + +HOST_OLA_DEPENDENCIES = host-util-linux host-protobuf + +# When building the host part, disable as much as possible to speed up +# the configure step and avoid missing host dependencies. +HOST_OLA_CONF_OPTS = \ + --disable-all-plugins \ + --disable-slp \ + --disable-osc \ + --disable-uart \ + --disable-libusb \ + --disable-libftdi \ + --disable-http \ + --disable-examples \ + --disable-unittests \ + --disable-doxygen-html \ + --disable-doxygen-doc + +# On the host side, we only need ola_protoc_plugin, so build and install this +# only. +HOST_OLA_MAKE_OPTS = protoc/ola_protoc_plugin +define HOST_OLA_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/protoc/ola_protoc_plugin $(HOST_DIR)/usr/bin/ola_protoc_plugin +endef + +# sets where to find python libs built for target and required by ola +OLA_CONF_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages +OLA_MAKE_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages + +## OLA Bindings and Interface selections + +ifeq ($(BR2_PACKAGE_OLA_WEB),y) +OLA_CONF_OPTS += --enable-http +OLA_DEPENDENCIES += libmicrohttpd +else +OLA_CONF_OPTS += --disable-http +endif + +ifeq ($(BR2_PACKAGE_OLA_SLP),y) +OLA_CONF_OPTS += --enable-slp +else +OLA_CONF_OPTS += --disable-slp +endif + +ifeq ($(BR2_PACKAGE_OLA_PYTHON_BINDINGS),y) +OLA_CONF_OPTS += --enable-python-libs +OLA_DEPENDENCIES += python python-protobuf +else +OLA_CONF_OPTS += --disable-python-libs +endif + +## OLA Examples and Tests + +ifeq ($(BR2_PACKAGE_OLA_EXAMPLES),y) +OLA_CONF_OPTS += --enable-examples +OLA_DEPENDENCIES += ncurses +else +OLA_CONF_OPTS += --disable-examples +endif + +ifeq ($(BR2_PACKAGE_OLA_RDM_TESTS),y) +OLA_CONF_OPTS += --enable-rdm-tests +else +OLA_CONF_OPTS += --disable-rdm-tests +endif + +## OLA Plugin selections + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_E131),y) +OLA_CONF_OPTS += --enable-e131 +else +OLA_CONF_OPTS += --disable-e131 +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_ARTNET),y) +OLA_CONF_OPTS += --enable-artnet +else +OLA_CONF_OPTS += --disable-artnet +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_OPENDMX),y) +OLA_CONF_OPTS += --enable-opendmx +else +OLA_CONF_OPTS += --disable-opendmx +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_DUMMY),y) +OLA_CONF_OPTS += --enable-dummy +else +OLA_CONF_OPTS += --disable-dummy +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_ESPNET),y) +OLA_CONF_OPTS += --enable-espnet +else +OLA_CONF_OPTS += --disable-espnet +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_KINET),y) +OLA_CONF_OPTS += --enable-kinet +else +OLA_CONF_OPTS += --disable-kinet +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_OSC),y) +OLA_CONF_OPTS += --enable-osc +OLA_DEPENDENCIES += liblo +else +OLA_CONF_OPTS += --disable-osc +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_MILINT),y) +OLA_CONF_OPTS += --enable-milinst +else +OLA_CONF_OPTS += --disable-milinst +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_PATHPORT),y) +OLA_CONF_OPTS += --enable-pathport +else +OLA_CONF_OPTS += --disable-pathport +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_SANDNET),y) +OLA_CONF_OPTS += --enable-sandnet +else +OLA_CONF_OPTS += --disable-sandnet +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_SHOWNET),y) +OLA_CONF_OPTS += --enable-shownet +else +OLA_CONF_OPTS += --disable-shownet +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_STAGEPROFI),y) +OLA_CONF_OPTS += --enable-stageprofi --enable-libusb +else +OLA_CONF_OPTS += --disable-stageprofi +endif + +ifeq ($(BR2_PACKAGE_OLA_PLUGIN_USBPRO),y) +OLA_CONF_OPTS += --enable-usbpro --enable-libusb +else +OLA_CONF_OPTS += --disable-usbpro +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/olsr/0001-configurable-ldconfig.patch b/package/olsr/0001-configurable-ldconfig.patch new file mode 100644 index 0000000000..73fff7eecf --- /dev/null +++ b/package/olsr/0001-configurable-ldconfig.patch @@ -0,0 +1,33 @@ +Make ldconfig configurable + +In a cross-compilation set up, running /sbin/ldconfig is useless, so +we make the path to ldconfig configurable through the environment/make +command line. This allows to pass LDCONFIG=/bin/true when doing +cross-compilation. + +[Gustavo: update patch for olsr 0.6.4] +Signed-off-by: Thomas Petazzoni + +diff -Nura olsrd-0.6.4.orig/make/Makefile.linux olsrd-0.6.4/make/Makefile.linux +--- olsrd-0.6.4.orig/make/Makefile.linux 2013-01-29 09:00:18.041356389 -0300 ++++ olsrd-0.6.4/make/Makefile.linux 2013-01-29 09:01:51.598226624 -0300 +@@ -3,6 +3,7 @@ + # + + ARCH := $(shell uname -m) ++LDCONFIG ?= /sbin/ldconfig + + DESTDIR ?= + prefix ?= /usr/local +@@ -26,9 +27,9 @@ + PLUGIN_SONAME ?= lib$(PLUGIN_NAME).so + PLUGIN_FULLNAME ?= $(PLUGIN_NAME).so.$(PLUGIN_VER) + INSTALL_LIB = install -D -m 755 $(PLUGIN_FULLNAME) $(LIBDIR)/$(PLUGIN_FULLNAME); \ +- /sbin/ldconfig -n $(LIBDIR) ++ $(LDCONFIG) -n $(LIBDIR) + UNINSTALL_LIB = rm -f $(LIBDIR)/$(PLUGIN_FULLNAME); \ +- /sbin/ldconfig -n $(LIBDIR) ++ $(LDCONFIG) -n $(LIBDIR) + + ifdef OLSRD_PLUGIN + GENERATE_PIC = true diff --git a/package/olsr/Config.in b/package/olsr/Config.in new file mode 100644 index 0000000000..a49c4e0f10 --- /dev/null +++ b/package/olsr/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_OLSR + bool "olsrd" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + The Optimized Link State Routing protocol (OLSR) is a + routing protocol that is optimised for mobile ad-hoc + networks, sometimes called wireless mesh networks. It is a + proactive link-state routing protocol that floods a full + topology table to all nodes in the network which then + compute optimal forwarding paths locally. + + http://www.olsr.org/ + +comment "olsr needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/olsr/S50olsr b/package/olsr/S50olsr new file mode 100755 index 0000000000..fa1324facd --- /dev/null +++ b/package/olsr/S50olsr @@ -0,0 +1,23 @@ +#!/bin/sh + +case "$1" in + start) + printf "Starting oslrd daemon: " + start-stop-daemon -S -q -x /usr/sbin/olsrd -- -d 0 -pidfile /run/olsrd.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping olsrd daemon: " + start-stop-daemon -K -q -p /run/olsrd.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/olsr/olsr.hash b/package/olsr/olsr.hash new file mode 100644 index 0000000000..e14d52cd9e --- /dev/null +++ b/package/olsr/olsr.hash @@ -0,0 +1,2 @@ +# From http://www.olsr.org/releases/0.9/SHA256SUM-0.9.0.2 +sha256 cc464b29c7740354d815d5faa753fd27c0677d71e8eb42e78abc382996892845 olsrd-0.9.0.2.tar.bz2 diff --git a/package/olsr/olsr.mk b/package/olsr/olsr.mk new file mode 100644 index 0000000000..60c80988d0 --- /dev/null +++ b/package/olsr/olsr.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# olsr +# +################################################################################ + +OLSR_VERSION_MAJOR = 0.9 +OLSR_VERSION = $(OLSR_VERSION_MAJOR).0.2 +OLSR_SOURCE = olsrd-$(OLSR_VERSION).tar.bz2 +OLSR_SITE = http://www.olsr.org/releases/$(OLSR_VERSION_MAJOR) +OLSR_PLUGINS = arprefresh bmf dot_draw dyn_gw dyn_gw_plain httpinfo jsoninfo \ + mdns nameservice p2pd pgraph secure txtinfo watchdog +# Doesn't really need quagga but not very useful without it +OLSR_PLUGINS += $(if $(BR2_PACKAGE_QUAGGA),quagga) +OLSR_LICENSE = BSD-3c, LGPLv2.1+ +OLSR_LICENSE_FILES = license.txt lib/pud/nmealib/LICENSE +OLSR_DEPENDENCIES = host-flex host-bison + +define OLSR_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) ARCH=$(KERNEL_ARCH) -C $(@D) olsrd + for p in $(OLSR_PLUGINS) ; do \ + $(TARGET_CONFIGURE_OPTS) $(MAKE) ARCH=$(KERNEL_ARCH) -C $(@D)/lib/$$p ; \ + done +endef + +define OLSR_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \ + prefix="/usr" install_bin + for p in $(OLSR_PLUGINS) ; do \ + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/lib/$$p \ + LDCONFIG=/bin/true DESTDIR=$(TARGET_DIR) \ + prefix="/usr" install ; \ + done + $(INSTALL) -D -m 0644 $(@D)/files/olsrd.conf.default.lq \ + $(TARGET_DIR)/etc/olsrd/olsrd.conf +endef + +define OLSR_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/olsr/S50olsr \ + $(TARGET_DIR)/etc/init.d/S50olsr +endef + +define OLSR_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/olsr/olsr.service \ + $(TARGET_DIR)/usr/lib/systemd/system/olsr.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/olsr.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/olsr.service +endef + +$(eval $(generic-package)) diff --git a/package/olsr/olsr.service b/package/olsr/olsr.service new file mode 100644 index 0000000000..9ec8930352 --- /dev/null +++ b/package/olsr/olsr.service @@ -0,0 +1,10 @@ +[Unit] +Description=Ad-hoc wireless mesh routing daemon +After=network.target + +[Service] +ExecStart=/usr/sbin/olsrd -nofork +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/omap-u-boot-utils/Config.in.host b/package/omap-u-boot-utils/Config.in.host new file mode 100644 index 0000000000..87dcc06938 --- /dev/null +++ b/package/omap-u-boot-utils/Config.in.host @@ -0,0 +1,9 @@ +config BR2_PACKAGE_HOST_OMAP_U_BOOT_UTILS + bool "host omap-u-boot-utils" + depends on BR2_arm || BR2_armeb + help + U-Boot Utilities for Texas Instrument's OMAP platforms. + This is a set of tools to control U-Boot from scripts, generate + OMAP-specific signed image files and more. + + https://github.com/nmenon/omap-u-boot-utils diff --git a/package/omap-u-boot-utils/omap-u-boot-utils.mk b/package/omap-u-boot-utils/omap-u-boot-utils.mk new file mode 100644 index 0000000000..7cfed65088 --- /dev/null +++ b/package/omap-u-boot-utils/omap-u-boot-utils.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# omap-u-boot-utils +# +################################################################################ + +OMAP_U_BOOT_UTILS_VERSION = 3f07426cddc0be9e24702e7aacc7574ddd7fba28 +OMAP_U_BOOT_UTILS_SITE = $(call github,nmenon,omap-u-boot-utils,$(OMAP_U_BOOT_UTILS_VERSION)) +OMAP_U_BOOT_UTILS_LICENSE = GPLv2, GPLv2+ +OMAP_U_BOOT_UTILS_LICENSE_FILES = COPYING + +define HOST_OMAP_U_BOOT_UTILS_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define HOST_OMAP_U_BOOT_UTILS_INSTALL_CMDS + for f in gpsign pserial tagger ucmd ukermit ; do \ + $(INSTALL) -D -m 755 $(@D)/$$f $(HOST_DIR)/usr/bin/$$f ; \ + done +endef + +$(eval $(host-generic-package)) diff --git a/package/omniorb/Config.in b/package/omniorb/Config.in new file mode 100644 index 0000000000..b8c4e0a59e --- /dev/null +++ b/package/omniorb/Config.in @@ -0,0 +1,26 @@ + +comment "omniORB needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_OMNIORB + bool "omniorb" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + omniORB is a robust high performance CORBA ORB for C++ and Python. + omniORB is largely CORBA 2.6 compliant. omniORB is one of only + three ORBs to have been awarded the Open Group's Open Brand for + CORBA. This means that omniORB has been tested and certified + CORBA compliant, to version 2.1 of the CORBA specification. + + http://omniorb.sourceforge.net/ + +if BR2_PACKAGE_OMNIORB + +config BR2_PACKAGE_OMNIORB_WITH_APPS + bool "Enable Apps and Services" + help + omniORB applications and services disabled by default + embedded system build configuration. + +endif diff --git a/package/omniorb/omniorb.hash b/package/omniorb/omniorb.hash new file mode 100644 index 0000000000..3d98b46619 --- /dev/null +++ b/package/omniorb/omniorb.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/omniorb/files/omniORB/omniORB-4.2.1/ +sha1 cf0f3ca7caab901c9485ca8afd85087c080c9684 omniORB-4.2.1.tar.bz2 +md5 dbe349d2bd929d349083b303bb4317e5 omniORB-4.2.1.tar.bz2 diff --git a/package/omniorb/omniorb.mk b/package/omniorb/omniorb.mk new file mode 100644 index 0000000000..98bae20a71 --- /dev/null +++ b/package/omniorb/omniorb.mk @@ -0,0 +1,75 @@ +################################################################################ +# +# omniorb +# +################################################################################ + +OMNIORB_VERSION = 4.2.1 +OMNIORB_SITE = http://downloads.sourceforge.net/project/omniorb/omniORB/omniORB-$(OMNIORB_VERSION) +OMNIORB_SOURCE = omniORB-$(OMNIORB_VERSION).tar.bz2 +OMNIORB_INSTALL_STAGING = YES +OMNIORB_LICENSE = GPL2+, LGPLv2.1+ +OMNIORB_LICENSE_FILES = COPYING COPYING.LIB +OMNIORB_DEPENDENCIES = host-omniorb +HOST_OMNIORB_DEPENDENCIES = host-python + +# omniorb is not python3 friendly, so force the python interpreter +OMNIORB_CONF_OPTS = ac_cv_path_PYTHON=$(HOST_DIR)/usr/bin/python2 +HOST_OMNIORB_CONF_OPTS = ac_cv_path_PYTHON=$(HOST_DIR)/usr/bin/python2 + +# Defaulting long double support to a safe option for the +# mix of embedded targets, this could later be automated +# based on checking the capability of the cross toolchain +# for "__LONG_DOUBLE_128__". Currently the host and target +# need to match because of the code generation done by the +# host tools during the target compile (ie headers generated +# on host are used in target build). +OMNIORB_CONF_OPTS += --disable-longdouble +HOST_OMNIORB_CONF_OPTS += --disable-longdouble + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +OMNIORB_CONF_OPTS += --with-openssl +OMNIORB_DEPENDENCIES += openssl +else +OMNIORB_CONF_OPTS += --without-openssl +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +OMNIORB_DEPENDENCIES += zlib +endif + +# The EmbeddedSystem define (set below in OMNIORB_ADJUST_TOOLDIR) +# enables building of just the lib and disables building of +# tools/apps/services. In some cases the apps/services are still +# required. The tools however are host related and should never +# be required on target. +define OMNIORB_ENABLE_EXTRA_APPS + $(SED) 's:SUBDIRS += lib:SUBDIRS += lib appl services:g' $(@D)/src/dir.mk +endef + +ifeq ($(BR2_PACKAGE_OMNIORB_WITH_APPS),y) +OMNIORB_POST_PATCH_HOOKS += OMNIORB_ENABLE_EXTRA_APPS +endif + +ifeq ($(BR2_STATIC_LIBS),y) +define OMNIORB_DISABLE_SHARED + echo "BuildSharedLibrary =" >> $(@D)/mk/beforeauto.mk +endef +OMNIORB_POST_CONFIGURE_HOOKS += OMNIORB_DISABLE_SHARED +endif + +# omniORB is not completely cross-compile friendly and has some +# assumptions where a couple host tools must be built and then +# used by the target build. The host tools generate code from +# the IDL description language, which is then built into the +# cross compiled target OMNIORB application. +define OMNIORB_ADJUST_TOOLDIR + # Point to the host folder to get HOST_OMNIORB tools + $(SED) 's:TOOLBINDIR = $$(TOP)/$$(BINDIR):TOOLBINDIR = $(HOST_DIR)/usr/bin:g' $(@D)/mk/beforeauto.mk + # Disables OMNIORB app/service/tool building + echo "EmbeddedSystem=1" >> $(@D)/mk/beforeauto.mk +endef +OMNIORB_POST_CONFIGURE_HOOKS += OMNIORB_ADJUST_TOOLDIR + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/on2-8170-libs/Config.in b/package/on2-8170-libs/Config.in new file mode 100644 index 0000000000..36f0b5c28b --- /dev/null +++ b/package/on2-8170-libs/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_ON2_8170_LIBS + #This is a binary only package which has been compiled for glibc + depends on BR2_arm926t + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_LINUX_KERNEL # on2-8170-modules + select BR2_PACKAGE_ON2_8170_MODULES # runtime + bool "on2-8170-libs" + help + Libraries for Hantro X170 video decoder + + http://www.at91.com/linux4sam/bin/view/Linux4SAM/SAM9M10Gstreamer + +comment "on2-8170-libs needs an (e)glibc toolchain and a Linux kernel to be built" + depends on BR2_arm926t + depends on !BR2_LINUX_KERNEL || !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/on2-8170-libs/on2-8170-libs.mk b/package/on2-8170-libs/on2-8170-libs.mk new file mode 100644 index 0000000000..db68f021fa --- /dev/null +++ b/package/on2-8170-libs/on2-8170-libs.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# on2-8170-libs +# +################################################################################ + +ON2_8170_LIBS_VERSION = 1.0 +ON2_8170_LIBS_SITE = ftp://ftp.linux4sam.org/pub/demo/linux4sam_1.9/codec + +ON2_8170_LICENSE = PROPRIETARY +# No license file is included in the archive + +ON2_8170_LIBS_INSTALL_STAGING = YES + +define ON2_8170_LIBS_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/lib $(STAGING_DIR)/usr/include + cp -dpf $(@D)/*.a $(@D)/*.so $(STAGING_DIR)/usr/lib + cp -dpf $(@D)/*.h $(STAGING_DIR)/usr/include +endef + +define ON2_8170_LIBS_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/lib + cp -dpf $(@D)/*.so $(TARGET_DIR)/usr/lib +endef + +$(eval $(generic-package)) diff --git a/package/on2-8170-modules/Config.in b/package/on2-8170-modules/Config.in new file mode 100644 index 0000000000..06ce992fb4 --- /dev/null +++ b/package/on2-8170-modules/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_ON2_8170_MODULES + bool "on2-8170-modules" + depends on BR2_LINUX_KERNEL + depends on BR2_arm926t + help + Kernel modules for Hantro x170 hardware video decompression support. + + http://www.at91.com/linux4sam/bin/view/Linux4SAM/SAM9M10Gstreamer + +comment "on2-8170-modules needs a Linux kernel to be built" + depends on BR2_arm926t + depends on !BR2_LINUX_KERNEL diff --git a/package/on2-8170-modules/on2-8170-modules.mk b/package/on2-8170-modules/on2-8170-modules.mk new file mode 100644 index 0000000000..b40ed86cf9 --- /dev/null +++ b/package/on2-8170-modules/on2-8170-modules.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# on2-8170-modules +# +################################################################################ + +ON2_8170_MODULES_VERSION = 73b08061d30789178e692bc332b73d1d9922bf39 +ON2_8170_MODULES_SITE = $(call github,alexandrebelloni,on2-8170-modules,$(ON2_8170_MODULES_VERSION)) + +ON2_8170_MODULES_LICENSE = GPLv2+ +#There is no license file + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/open-plc-utils/0001-Remove-OWNER-and-GROUPS-parameters-to-install.patch b/package/open-plc-utils/0001-Remove-OWNER-and-GROUPS-parameters-to-install.patch new file mode 100644 index 0000000000..9fc30a969f --- /dev/null +++ b/package/open-plc-utils/0001-Remove-OWNER-and-GROUPS-parameters-to-install.patch @@ -0,0 +1,298 @@ +From fdfeac7e77382ddd0e3fb4f2abeae84f0a31584f Mon Sep 17 00:00:00 2001 +From: Maxime Hadjinlian +Date: Tue, 30 Sep 2014 13:46:59 +0200 +Subject: [PATCH] Remove OWNER and GROUPS parameters to install + +The Install tries to change the owner and groups of the binary. In +Buildroot we don't want that, since fakeroot will do its job when we +finalize the rootfs. + +Signed-off-by: Maxime Hadjinlian +--- + docbook/Makefile | 4 ++-- + ether/Makefile | 8 ++++---- + iso15118/Makefile | 8 ++++---- + key/Makefile | 8 ++++---- + mdio/Makefile | 8 ++++---- + mme/Makefile | 8 ++++---- + nvm/Makefile | 8 ++++---- + pib/Makefile | 8 ++++---- + plc/Makefile | 8 ++++---- + ram/Makefile | 8 ++++---- + scripts/Makefile | 4 ++-- + serial/Makefile | 8 ++++---- + slac/Makefile | 8 ++++---- + tools/Makefile | 2 +- + 14 files changed, 49 insertions(+), 49 deletions(-) + +diff --git a/docbook/Makefile b/docbook/Makefile +index d630822..23a9b5a 100755 +--- a/docbook/Makefile ++++ b/docbook/Makefile +@@ -32,9 +32,9 @@ manuals: + ${SHELL} ../docbook/manuals + scripts: + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${LIBRARY} ++ install -m ${DIR_PERM} -d ${LIBRARY} + install: library +- if [ -d ${LIBRARY} ]; then install -m ${WWW_PERM} -o ${OWNER} -g ${GROUP} *.html *.css *.png ${LIBRARY}; fi ++ if [ -d ${LIBRARY} ]; then install -m ${WWW_PERM} *.html *.css *.png ${LIBRARY}; fi + uninstall: + rm -f ${LIBRARY}/*.c.html ${LIBRARY}/*.h.html ${LIBRARY}/*.1.html + setup: +diff --git a/ether/Makefile b/ether/Makefile +index 807cbcb..574050a 100755 +--- a/ether/Makefile ++++ b/ether/Makefile +@@ -27,13 +27,13 @@ compact: compile + if [ ! -z ${STRIP} ]; then ${STRIP} ${TOOLS}; fi + if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${BIN} ++ install -m ${DIR_PERM} -d ${BIN} + scripts: + manuals: +- test -d ${MAN} || install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${MAN} +- install -m ${MAN_PERM} -o ${OWNER} -g ${GROUP} ${PAGES} ${MAN} ++ test -d ${MAN} || install -m ${DIR_PERM} -d ${MAN} ++ install -m ${MAN_PERM} ${PAGES} ${MAN} + install: $(TOOLS) library +- install -m ${SUID_PERM} -o ${OWNER} -g ${GROUP} ${TOOLS} ${BIN} ++ install -m ${SUID_PERM} ${TOOLS} ${BIN} + uninstall: + cd ${BIN}; rm -f ${TOOLS} + check: +diff --git a/iso15118/Makefile b/iso15118/Makefile +index 72afdc4..da11a1c 100755 +--- a/iso15118/Makefile ++++ b/iso15118/Makefile +@@ -27,13 +27,13 @@ compact: compile + if [ ! -z ${STRIP} ]; then ${STRIP} ${TOOLS}; fi + if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${BIN} ++ install -m ${DIR_PERM} -d ${BIN} + scripts: + manuals: +- if [ ! -d ${MAN} ]; then install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${MAN}; fi +- install -m ${MAN_PERM} -o ${OWNER} -g ${GROUP} ${PAGES} ${MAN} ++ if [ ! -d ${MAN} ]; then install -m ${DIR_PERM} -d ${MAN}; fi ++ install -m ${MAN_PERM} ${PAGES} ${MAN} + install: compile library +- install -m ${SUID_PERM} -o ${OWNER} -g ${GROUP} ${TOOLS} ${BIN} ++ install -m ${SUID_PERM} ${TOOLS} ${BIN} + uninstall: + cd ${BIN}; rm -f plc ${TOOLS} + cd ${MAN}; rm -f plc ${PAGES} +diff --git a/key/Makefile b/key/Makefile +index 7de75ff..ee8968c 100755 +--- a/key/Makefile ++++ b/key/Makefile +@@ -28,13 +28,13 @@ compact: compile + if [ ! -z ${STRIP} ]; then ${STRIP} ${TOOLS}; fi + if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${BIN} ++ install -m ${DIR_PERM} -d ${BIN} + scripts: + manuals: +- test -d ${MAN} || install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${MAN} +- install -m ${MAN_PERM} -o ${OWNER} -g ${GROUP} ${PAGES} ${MAN} ++ test -d ${MAN} || install -m ${DIR_PERM} -d ${MAN} ++ install -m ${MAN_PERM} ${PAGES} ${MAN} + install: $(TOOLS) +- install -m ${BIN_PERM} -o ${OWNER} -g ${GROUP} ${TOOLS} ${BIN} ++ install -m ${BIN_PERM} ${TOOLS} ${BIN} + uninstall: + cd ${BIN}; rm -f ${TOOLS} + cd ${MAN}; rm -f ${PAGES} +diff --git a/mdio/Makefile b/mdio/Makefile +index 60a75a9..062d858 100755 +--- a/mdio/Makefile ++++ b/mdio/Makefile +@@ -27,13 +27,13 @@ compact: compile + if [ ! -z ${STRIP} ]; then ${STRIP} ${TOOLS}; fi + if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${BIN} ++ install -m ${DIR_PERM} -d ${BIN} + scripts: + manuals: +- test -d ${MAN} || install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${MAN} +- install -m ${MAN_PERM} -o ${OWNER} -g ${GROUP} ${PAGES} ${MAN} ++ test -d ${MAN} || install -m ${DIR_PERM} -d ${MAN} ++ install -m ${MAN_PERM} ${PAGES} ${MAN} + install: $(TOOLS) library +- install -m ${BIN_PERM} -o ${OWNER} -g ${GROUP} ${TOOLS} ${BIN} ++ install -m ${BIN_PERM} ${TOOLS} ${BIN} + uninstall: + cd ${BIN}; rm -f int6k ${TOOLS} + cd ${MAN}; rm -f int6k ${PAGES} +diff --git a/mme/Makefile b/mme/Makefile +index d6a9132..23f4775 100755 +--- a/mme/Makefile ++++ b/mme/Makefile +@@ -27,13 +27,13 @@ compact: compile + if [ ! -z ${STRIP} ]; then ${STRIP} ${TOOLS}; fi + if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${BIN} ++ install -m ${DIR_PERM} -d ${BIN} + scripts: + manuals: +- test -d ${MAN} || install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${MAN} +- install -m ${MAN_PERM} -o ${OWNER} -g ${GROUP} ${PAGES} ${MAN} ++ test -d ${MAN} || install -m ${DIR_PERM} -d ${MAN} ++ install -m ${MAN_PERM} ${PAGES} ${MAN} + install: $(TOOLS) library +- install -m ${BIN_PERM} -o ${OWNER} -g ${GROUP} ${TOOLS} ${BIN} ++ install -m ${BIN_PERM} ${TOOLS} ${BIN} + uninstall: + cd ${BIN}; rm -f ${TOOLS} + check: +diff --git a/nvm/Makefile b/nvm/Makefile +index 5ae47d2..d7f4037 100755 +--- a/nvm/Makefile ++++ b/nvm/Makefile +@@ -28,12 +28,12 @@ compact: compile + if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi + scripts: + manuals: +- test -d ${MAN} || install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${MAN} +- install -m ${MAN_PERM} -o ${OWNER} -g ${GROUP} ${PAGES} ${MAN} ++ test -d ${MAN} || install -m ${DIR_PERM} -d ${MAN} ++ install -m ${MAN_PERM} ${PAGES} ${MAN} + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${BIN} ++ install -m ${DIR_PERM} -d ${BIN} + install: $(TOOLS) library +- install -m ${BIN_PERM} -o ${OWNER} -g ${GROUP} ${TOOLS} ${BIN} ++ install -m ${BIN_PERM} ${TOOLS} ${BIN} + uninstall: + cd ${BIN}; rm -f ${TOOLS} + check: +diff --git a/pib/Makefile b/pib/Makefile +index 3af94c8..908b03a 100644 +--- a/pib/Makefile ++++ b/pib/Makefile +@@ -30,12 +30,12 @@ compact: compile + if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi + scripts: + manuals: +- test -d ${MAN} || install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${MAN} +- install -m ${MAN_PERM} -o ${OWNER} -g ${GROUP} ${PAGES} ${MAN} ++ test -d ${MAN} || install -m ${DIR_PERM} -d ${MAN} ++ install -m ${MAN_PERM} ${PAGES} ${MAN} + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${BIN} ++ install -m ${DIR_PERM} -d ${BIN} + install: $(TOOLS) library +- install -m ${BIN_PERM} -o ${OWNER} -g ${GROUP} ${TOOLS} ${BIN} ++ install -m ${BIN_PERM} ${TOOLS} ${BIN} + uninstall: + cd ${BIN}; rm -f ${TOOLS} + check: +diff --git a/plc/Makefile b/plc/Makefile +index bd8b806..5b41c0b 100644 +--- a/plc/Makefile ++++ b/plc/Makefile +@@ -32,13 +32,13 @@ compact: compile + if [ ! -z ${STRIP} ]; then ${STRIP} ${TOOLS}; fi + if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${BIN} ++ install -m ${DIR_PERM} -d ${BIN} + scripts: + manuals: +- test -d ${MAN} || install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${MAN} +- install -m ${MAN_PERM} -o ${OWNER} -g ${GROUP} ${PAGES} ${MAN} ++ test -d ${MAN} || install -m ${DIR_PERM} -d ${MAN} ++ install -m ${MAN_PERM} ${PAGES} ${MAN} + install: $(TOOLS) library +- install -m ${SUID_PERM} -o ${OWNER} -g ${GROUP} ${TOOLS} ${BIN} ++ install -m ${SUID_PERM} ${TOOLS} ${BIN} + uninstall: + cd ${BIN}; rm -f int6k ${TOOLS} + cd ${MAN}; rm -f int6k ${PAGES} +diff --git a/ram/Makefile b/ram/Makefile +index 60b9bb3..c951218 100755 +--- a/ram/Makefile ++++ b/ram/Makefile +@@ -27,13 +27,13 @@ compact: compile + if [ ! -z ${STRIP} ]; then ${STRIP} ${TOOLS}; fi + if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${BIN} ++ install -m ${DIR_PERM} -d ${BIN} + scripts: + manuals: +- test -d ${MAN} || install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${MAN} +- install -m ${MAN_PERM} -o ${OWNER} -g ${GROUP} ${PAGES} ${MAN} ++ test -d ${MAN} || install -m ${DIR_PERM} -d ${MAN} ++ install -m ${MAN_PERM} ${PAGES} ${MAN} + install: $(TOOLS) library +- install -m ${BIN_PERM} -o ${OWNER} -g ${GROUP} ${TOOLS} ${BIN} ++ install -m ${BIN_PERM} ${TOOLS} ${BIN} + uninstall: + cd ${BIN}; rm -f ${TOOLS} + cd ${MAN}; rm -f ${PAGES} +diff --git a/serial/Makefile b/serial/Makefile +index c25f1a6..6420d4a 100755 +--- a/serial/Makefile ++++ b/serial/Makefile +@@ -27,13 +27,13 @@ compact: compile + if [ ! -z ${STRIP} ]; then ${STRIP} ${TOOLS}; fi + if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${BIN} ++ install -m ${DIR_PERM} -d ${BIN} + scripts: + manuals: +- test -d ${MAN} || install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${MAN} +- install -m ${MAN_PERM} -o ${OWNER} -g ${GROUP} ${PAGES} ${MAN} ++ test -d ${MAN} || install -m ${DIR_PERM} -d ${MAN} ++ install -m ${MAN_PERM} ${PAGES} ${MAN} + install: $(TOOLS) library +- install -m ${BIN_PERM} -o ${OWNER} -g ${GROUP} ${TOOLS} ${BIN} ++ install -m ${BIN_PERM} ${TOOLS} ${BIN} + uninstall: + cd ${BIN}; rm -f int6k ${TOOLS} + cd ${MAN}; rm -f int6k ${PAGES} +diff --git a/slac/Makefile b/slac/Makefile +index d69da17..449f20a 100755 +--- a/slac/Makefile ++++ b/slac/Makefile +@@ -27,13 +27,13 @@ compact: compile + if [ ! -z ${STRIP} ]; then ${STRIP} ${TOOLS}; fi + if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${BIN} ++ install -m ${DIR_PERM} -d ${BIN} + scripts: + manuals: +- if [ ! -d ${MAN} ]; then install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${MAN}; fi +- install -m ${MAN_PERM} -o ${OWNER} -g ${GROUP} ${PAGES} ${MAN} ++ if [ ! -d ${MAN} ]; then install -m ${DIR_PERM} -d ${MAN}; fi ++ install -m ${MAN_PERM} ${PAGES} ${MAN} + install: compile library +- install -m ${SUID_PERM} -o ${OWNER} -g ${GROUP} ${TOOLS} ${BIN} ++ install -m ${SUID_PERM} ${TOOLS} ${BIN} + uninstall: + cd ${BIN}; rm -f plc ${TOOLS} + cd ${MAN}; rm -f plc ${PAGES} +diff --git a/tools/Makefile b/tools/Makefile +index 1d992cf..f17db3d 100755 +--- a/tools/Makefile ++++ b/tools/Makefile +@@ -27,7 +27,7 @@ compact: compile + if [ ! -z ${STRIP} ]; then ${STRIP} ${TOOLS}; fi + if [ -x /usr/local/bin/upx ]; then upx --best ${TOOLS}; fi + library: +- install -m ${DIR_PERM} -o ${OWNER} -g ${GROUP} -d ${BIN} ++ install -m ${DIR_PERM} -d ${BIN} + scripts: + manuals: + # install -m ${MAN_PERM} -o ${OWNER} -g ${GROUP} ${PAGES} ${MAN} +-- +2.1.0 diff --git a/package/open-plc-utils/Config.in b/package/open-plc-utils/Config.in new file mode 100644 index 0000000000..8ae3504c9c --- /dev/null +++ b/package/open-plc-utils/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_OPEN_PLC_UTILS + bool "open-plc-utils" + depends on BR2_USE_MMU # fork() + help + Open version of the Qualcomm Atheros Powerline Toolkit + + https://github.com/qca/open-plc-utils diff --git a/package/open-plc-utils/open-plc-utils.mk b/package/open-plc-utils/open-plc-utils.mk new file mode 100644 index 0000000000..a674372454 --- /dev/null +++ b/package/open-plc-utils/open-plc-utils.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# open-plc-utils +# +################################################################################ + +OPEN_PLC_UTILS_VERSION = 05ef40c0a2949cfaf1c3230e10679fbcf912d174 +OPEN_PLC_UTILS_SITE = $(call github,qca,open-plc-utils,$(OPEN_PLC_UTILS_VERSION)) +OPEN_PLC_UTILS_LICENSE = BSD-3c +OPEN_PLC_UTILS_LICENSE_FILES = LICENSE + +# We unfortunately can't use TARGET_CONFIGURE_OPTS, as it would +# override the package CFLAGS, LDFLAGS and CXXFLAGS definitions. +# +# Yes, we're passing __UCLIBC__ in EXTRA_CFLAGS, as it fixes a build +# issue for non-uClibc toolchains. It is the very crappy solution +# suggested at https://github.com/qca/open-plc-utils/issues/36. +define OPEN_PLC_UTILS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) CROSS=$(TARGET_CROSS) EXTRA_CFLAGS="-D__UCLIBC__" -C $(@D) +endef + +define OPEN_PLC_UTILS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) ROOTFS=$(TARGET_DIR) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/open2300/0001-fix-makefile.patch b/package/open2300/0001-fix-makefile.patch new file mode 100644 index 0000000000..c3bb252368 --- /dev/null +++ b/package/open2300/0001-fix-makefile.patch @@ -0,0 +1,52 @@ +From b0a1f12349bee43040a889c7e74873cfb253b9d8 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Thu, 6 Feb 2014 21:42:50 +0100 +Subject: [PATCH] fix makefile + +- allow to extend CFLAGS and CC_LDFLAGS +- remove hard-coded include dirs. and lib. dirs. (which pointed to some + location in the host system) + +Signed-off-by: Samuel Martin +--- + Makefile | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/Makefile b/Makefile +index 92a2cc0..1b54175 100755 +--- a/Makefile ++++ b/Makefile +@@ -37,9 +37,9 @@ MYSQLHISTLOGOBJ = mysqlhistlog2300.o rw2300.o linux2300.o win2300.o + + VERSION = 1.11 + +-CFLAGS = -Wall -O3 -DVERSION=\"$(VERSION)\" +-CC_LDFLAGS = -lm +-CC_WINFLAG = ++override CFLAGS += -Wall -O3 -DVERSION=\"$(VERSION)\" ++override CC_LDFLAGS += -lm ++CC_WINFLAG = + # For Windows - comment the two line above and un-comment the two lines below. + #CC_LDFLAGS = -lm -lwsock32 + #CC_WINFLAG = -mwindows +@@ -80,7 +80,7 @@ xml2300 : $(XMLOBJ) + $(CC) $(CFLAGS) -o $@ $(XMLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) + + mysql2300: +- $(CC) $(CFLAGS) -o mysql2300 mysql2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient ++ $(CC) $(CFLAGS) -o mysql2300 mysql2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) + + pgsql2300: $(PGSQLOBJ) + $(CC) $(CFLAGS) -o $@ $(PGSQLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/pgsql -L/usr/lib/pgsql -lpq +@@ -95,7 +95,7 @@ minmax2300: $(MINMAXOBJ) + $(CC) $(CFLAGS) -o $@ $(MINMAXOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) + + mysqlhistlog2300 : +- $(CC) $(CFLAGS) -o mysqlhistlog2300 mysqlhistlog2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient ++ $(CC) $(CFLAGS) -o mysqlhistlog2300 mysqlhistlog2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) + + + install: +-- +1.8.5.3 + diff --git a/package/open2300/Config.in b/package/open2300/Config.in new file mode 100644 index 0000000000..df0a969fa6 --- /dev/null +++ b/package/open2300/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_OPEN2300 + bool "open2300" + help + open2300 reads (and writes) data from a Lacrosse + WS2300/WS2305/WS2310/WS2315 Weather Station + + http://www.lavrsen.dk/foswiki/bin/view/Open2300/WebHome diff --git a/package/open2300/open2300.mk b/package/open2300/open2300.mk new file mode 100644 index 0000000000..73db2a0023 --- /dev/null +++ b/package/open2300/open2300.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# open2300 +# +################################################################################ + +OPEN2300_SITE = http://www.lavrsen.dk/svn/open2300/trunk +OPEN2300_SITE_METHOD = svn +OPEN2300_VERSION = 12 +OPEN2300_LICENSE = GPLv2 +OPEN2300_LICENSE_FILES = COPYING + +OPEN2300_BINS = \ + open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 \ + histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 +OPEN2300_CFLAGS = $(TARGET_CFLAGS) +OPEN2300_LDFLAGS = $(TARGET_LDFLAGS) + +ifeq ($(BR2_PACKAGE_MYSQL),y) +OPEN2300_DEPENDENCIES += mysql +OPEN2300_BINS += mysql2300 mysqlhistlog2300 +OPEN2300_CFLAGS += -I$(STAGING_DIR)/usr/include/mysql +OPEN2300_LDFLAGS += -L$(STAGING_DIR)/usr/lib/mysql -lmysqlclient +endif + +define OPEN2300_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" \ + CFLAGS="$(OPEN2300_CFLAGS)" CC_LDFLAGS="$(OPEN2300_LDFLAGS)" \ + -C $(@D) $(OPEN2300_BINS) +endef + +define OPEN2300_INSTALL_TARGET_CMDS + for prog in $(OPEN2300_BINS); do \ + $(INSTALL) -D -m 0755 $(@D)/$$prog $(TARGET_DIR)/usr/bin/$$prog ; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/openal/0001-Fix-detection-of-C11-atomics.patch b/package/openal/0001-Fix-detection-of-C11-atomics.patch new file mode 100644 index 0000000000..c6b9840908 --- /dev/null +++ b/package/openal/0001-Fix-detection-of-C11-atomics.patch @@ -0,0 +1,53 @@ +From 10fee6d71a1f7d6e6319005196562b4a30b4e8ff Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 2 Feb 2016 14:58:52 +0100 +Subject: [PATCH] Fix detection of C11 atomics + +Currently, the CMakeLists.txt logic to detect the availability of C11 +atomics is based on building a small program that uses the +atomic_load(). + +However, atomic_load() does not need to use any function from +libatomic (part of the gcc runtime). So even if libatomic is missing, +this test concludes that C11 atomic support is available. For example +on SPARC, the example program builds fine without linking to +libatomic, but calling other functions of the atomic_*() APIs fail +without linking to libatomic. + +So, this patch adjusts the CMakeLists.txt test to use a function that +is known to require the libatomic run-time library (on architectures +where it is needed). This way, openal will only use the __atomic_*() +built-ins when they are actually functional. + +Signed-off-by: Thomas Petazzoni +--- + CMakeLists.txt | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5784d35..a53f996 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -209,14 +209,17 @@ CHECK_C_SOURCE_COMPILES( + HAVE_C11_ALIGNAS) + + # Check if we have C11 _Atomic ++set(OLD_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}) ++set(CMAKE_REQUIRED_LIBRARIES ${EXTRA_LIBS}) + CHECK_C_SOURCE_COMPILES( + "#include +- const int _Atomic foo = ATOMIC_VAR_INIT(~0); ++ int _Atomic foo = ATOMIC_VAR_INIT(~0); + int main() + { +- return atomic_load(&foo); ++ return atomic_fetch_add(&foo, 2); + }" + HAVE_C11_ATOMIC) ++set(CMAKE_REQUIRED_LIBRARIES ${OLD_REQUIRED_LIBRARIES}) + + # Add definitions, compiler switches, etc. + INCLUDE_DIRECTORIES("${OpenAL_SOURCE_DIR}/include" "${OpenAL_BINARY_DIR}") +-- +2.6.4 + diff --git a/package/openal/Config.in b/package/openal/Config.in new file mode 100644 index 0000000000..a564156555 --- /dev/null +++ b/package/openal/Config.in @@ -0,0 +1,32 @@ +# openal can: +# - use __atomic_*() intrinsics when available +# - otherwise use __sync_*() intrinsics when available. It needs the +# 4-byte ones on 32 bits architectures, and the 4-byte and 8-byte +# one on 64 bits architecture +# - it also provides its one implementation of atomic operations on +# x86 and x86_64, but we dont take those into account since in most +# situations __atomic_*() or __sync_*() will be available, and not +# all x86 CPUs provide the necessary assembly instructions. +config BR2_PACKAGE_OPENAL_ARCH_SUPPORTS + bool + default y if BR2_TOOLCHAIN_HAS_ATOMIC + default y if BR2_TOOLCHAIN_HAS_SYNC_4 && !BR2_ARCH_IS_64 + default y if BR2_TOOLCHAIN_HAS_SYNC_4 && BR2_TOOLCHAIN_HAS_SYNC_8 && BR2_ARCH_IS_64 + +config BR2_PACKAGE_OPENAL + bool "openal" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS + help + OpenAL provides capabilities for playing audio in a virtual + 3D environment. Distance attenuation, doppler shift, and + directional sound emitters are among the features handled by + the API. + + http://kcat.strangesoft.net/openal.html + +comment "openal needs a toolchain w/ NPTL, C++" + depends on BR2_PACKAGE_OPENAL_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL \ + || !BR2_INSTALL_LIBSTDCPP diff --git a/package/openal/openal.hash b/package/openal/openal.hash new file mode 100644 index 0000000000..260f1b7807 --- /dev/null +++ b/package/openal/openal.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 a341f8542f1f0b8c65241a17da13d073f18ec06658e1a1606a8ecc8bbc2b3314 openal-soft-1.17.2.tar.bz2 diff --git a/package/openal/openal.mk b/package/openal/openal.mk new file mode 100644 index 0000000000..2916aa607f --- /dev/null +++ b/package/openal/openal.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# openal +# +################################################################################ + +OPENAL_VERSION = 1.17.2 +OPENAL_SOURCE = openal-soft-$(OPENAL_VERSION).tar.bz2 +OPENAL_SITE = http://kcat.strangesoft.net/openal-releases +OPENAL_LICENSE = LGPLv2+ +OPENAL_LICENSE_FILES = COPYING +OPENAL_INSTALL_STAGING = YES + +# We don't need the utilities, Distros don't ship them either +OPENAL_CONF_OPTS += -DALSOFT_UTILS=OFF + +ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_8),y) +OPENAL_CONF_OPTS += -DEXTRA_LIBS=atomic +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +OPENAL_DEPENDENCIES += alsa-lib +OPENAL_CONF_OPTS += -DALSOFT_REQUIRE_ALSA=ON +else +OPENAL_CONF_OPTS += -DALSOFT_REQUIRE_ALSA=OFF +endif + +ifeq ($(BR2_PACKAGE_JACK2),y) +OPENAL_DEPENDENCIES += jack2 +OPENAL_CONF_OPTS += -DALSOFT_REQUIRE_JACK=ON +else +OPENAL_CONF_OPTS += -DALSOFT_REQUIRE_JACK=OFF +endif + +ifeq ($(BR2_PACKAGE_PORTAUDIO),y) +OPENAL_DEPENDENCIES += portaudio +OPENAL_CONF_OPTS += -DALSOFT_REQUIRE_PORTAUDIO=ON +else +OPENAL_CONF_OPTS += -DALSOFT_REQUIRE_PORTAUDIO=OFF +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +OPENAL_DEPENDENCIES += pulseaudio +OPENAL_CONF_OPTS += -DALSOFT_REQUIRE_PULSEAUDIO=ON +else +OPENAL_CONF_OPTS += -DALSOFT_REQUIRE_PULSEAUDIO=OFF +endif + +ifeq ($(BR2_STATIC_LIBS),y) +OPENAL_CONF_OPTS += -DLIBTYPE=STATIC +endif + +$(eval $(cmake-package)) diff --git a/package/openbox/Config.in b/package/openbox/Config.in new file mode 100644 index 0000000000..3ddd376803 --- /dev/null +++ b/package/openbox/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_OPENBOX + bool "openbox" + depends on BR2_PACKAGE_XORG7 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango -> harfbuzz + depends on BR2_INSTALL_LIBSTDCPP # pango -> freetype + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_PANGO + select BR2_PACKAGE_XLIB_LIBX11 + # libxft and libxrender are needed to get xft support in pango + select BR2_PACKAGE_XLIB_LIBXFT + select BR2_PACKAGE_XLIB_LIBXRENDER + help + Openbox is a highly configurable, next generation window + manager with extensive standards support. + + http://openbox.org + +comment "openbox needs a toolchain w/ C++, threads, wchar" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || \ + !BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_XORG7 diff --git a/package/openbox/openbox.hash b/package/openbox/openbox.hash new file mode 100644 index 0000000000..a8696b3f87 --- /dev/null +++ b/package/openbox/openbox.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 abe75855cc5616554ffd47134ad15291fe37ebbebf1a80b69cbde9d670f0e26d openbox-3.6.1.tar.xz diff --git a/package/openbox/openbox.mk b/package/openbox/openbox.mk new file mode 100644 index 0000000000..b5148e00e8 --- /dev/null +++ b/package/openbox/openbox.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# openbox +# +################################################################################ + +OPENBOX_VERSION = 3.6.1 +OPENBOX_SOURCE = openbox-$(OPENBOX_VERSION).tar.xz +OPENBOX_SITE = http://openbox.org/dist/openbox +OPENBOX_LICENSE = GPLv2+ +OPENBOX_LICENSE_FILES = COPYING + +OPENBOX_CONF_OPTS = \ + --x-includes=$(STAGING_DIR)/usr/include/X11 \ + --x-libraries=$(STAGING_DIR)/usr/lib + +OPENBOX_DEPENDENCIES = xlib_libX11 libxml2 libglib2 pango host-pkgconf + +ifeq ($(BR2_PACKAGE_IMLIB2_X),y) +OPENBOX_CONF_OPTS += --enable-imlib2 +OPENBOX_DEPENDENCIES += imlib2 +else +OPENBOX_CONF_OPTS += --disable-imlib2 +endif + +ifeq ($(BR2_PACKAGE_STARTUP_NOTIFICATION),y) +OPENBOX_CONF_OPTS += --enable-startup-notification +OPENBOX_DEPENDENCIES += startup-notification +else +OPENBOX_CONF_OPTS += --disable-startup-notification +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBSM),y) +OPENBOX_CONF_OPTS += --enable-session-management +OPENBOX_DEPENDENCIES += xlib_libSM +else +OPENBOX_CONF_OPTS += --disable-session-management +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +OPENBOX_CONF_OPTS += --enable-xinerama +OPENBOX_DEPENDENCIES += xlib_libXinerama +else +OPENBOX_CONF_OPTS += --disable-xinerama +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +OPENBOX_CONF_OPTS += --enable-xrandr +OPENBOX_DEPENDENCIES += xlib_libXrandr +else +OPENBOX_CONF_OPTS += --disable-xrandr +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +OPENBOX_DEPENDENCIES += xlib_libXcursor +OPENBOX_CONF_OPTS += --enable-xcursor +else +OPENBOX_CONF_OPTS += --disable-xcursor +endif + +$(eval $(autotools-package)) diff --git a/package/opencore-amr/Config.in b/package/opencore-amr/Config.in new file mode 100644 index 0000000000..1ccc631966 --- /dev/null +++ b/package/opencore-amr/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_OPENCORE_AMR + bool "opencore-amr" + depends on BR2_INSTALL_LIBSTDCPP + help + Library of OpenCORE Framework implementation of Adaptive Multi Rate + Narrowband and Wideband (AMR-NB and AMR-WB) speech codec. + + http://opencore-amr.sourceforge.net/ + +comment "opencore-amr needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/opencore-amr/opencore-amr.hash b/package/opencore-amr/opencore-amr.hash new file mode 100644 index 0000000000..a984514d0f --- /dev/null +++ b/package/opencore-amr/opencore-amr.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 106bf811c1f36444d7671d8fd2589f8b2e0cca58a2c764da62ffc4a070595385 opencore-amr-0.1.3.tar.gz diff --git a/package/opencore-amr/opencore-amr.mk b/package/opencore-amr/opencore-amr.mk new file mode 100644 index 0000000000..8b6aa29a96 --- /dev/null +++ b/package/opencore-amr/opencore-amr.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# opencore-amr +# +################################################################################ + +OPENCORE_AMR_VERSION = 0.1.3 +OPENCORE_AMR_SITE = http://downloads.sourceforge.net/project/opencore-amr/opencore-amr +OPENCORE_AMR_INSTALL_STAGING = YES +OPENCORE_AMR_LICENSE = Apache-2.0 +OPENCORE_AMR_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/opencv/0001-ffmpeg30.patch b/package/opencv/0001-ffmpeg30.patch new file mode 100644 index 0000000000..70b6510b15 --- /dev/null +++ b/package/opencv/0001-ffmpeg30.patch @@ -0,0 +1,638 @@ +From a61b19b524cd2b66a7c43e67edd7cc780bf46cbb Mon Sep 17 00:00:00 2001 +From: Alexander Alekhin +Date: Wed, 2 Mar 2016 17:54:17 +0300 +Subject: [PATCH] backport ffmpeg fixes + +Signed-off-by: Bernd Kuhls +Downloaded from upstream commit: +https://github.com/Itseez/opencv/commit/a61b19b524cd2b66a7c43e67edd7cc780bf46cbb +--- + modules/highgui/src/cap_ffmpeg_impl.hpp | 364 +++++++++++++++++++++++++++----- + 1 file changed, 314 insertions(+), 50 deletions(-) + +diff --git a/modules/highgui/src/cap_ffmpeg_impl.hpp b/modules/highgui/src/cap_ffmpeg_impl.hpp +index 1b79870..6df542a 100644 +--- a/modules/highgui/src/cap_ffmpeg_impl.hpp ++++ b/modules/highgui/src/cap_ffmpeg_impl.hpp +@@ -118,11 +118,6 @@ extern "C" { + #define CV_WARN(message) fprintf(stderr, "warning: %s (%s:%d)\n", message, __FILE__, __LINE__) + #endif + +-/* PIX_FMT_RGBA32 macro changed in newer ffmpeg versions */ +-#ifndef PIX_FMT_RGBA32 +-#define PIX_FMT_RGBA32 PIX_FMT_RGB32 +-#endif +- + #define CALC_FFMPEG_VERSION(a,b,c) ( a<<16 | b<<8 | c ) + + #if defined WIN32 || defined _WIN32 +@@ -132,6 +127,11 @@ extern "C" { + #include + #include + #include ++ #include ++#if defined __APPLE__ ++ #include ++ #include ++#endif + #endif + + #ifndef MIN +@@ -156,6 +156,155 @@ extern "C" { + # define CV_CODEC(name) name + #endif + ++#if LIBAVUTIL_BUILD < (LIBAVUTIL_VERSION_MICRO >= 100 \ ++ ? CALC_FFMPEG_VERSION(51, 74, 100) : CALC_FFMPEG_VERSION(51, 42, 0)) ++#define AVPixelFormat PixelFormat ++#define AV_PIX_FMT_BGR24 PIX_FMT_BGR24 ++#define AV_PIX_FMT_RGB24 PIX_FMT_RGB24 ++#define AV_PIX_FMT_GRAY8 PIX_FMT_GRAY8 ++#define AV_PIX_FMT_YUV422P PIX_FMT_YUV422P ++#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P ++#define AV_PIX_FMT_YUV444P PIX_FMT_YUV444P ++#define AV_PIX_FMT_YUVJ420P PIX_FMT_YUVJ420P ++#define AV_PIX_FMT_GRAY16LE PIX_FMT_GRAY16LE ++#define AV_PIX_FMT_GRAY16BE PIX_FMT_GRAY16BE ++#endif ++ ++#if LIBAVUTIL_BUILD >= (LIBAVUTIL_VERSION_MICRO >= 100 \ ++ ? CALC_FFMPEG_VERSION(52, 38, 100) : CALC_FFMPEG_VERSION(52, 13, 0)) ++#define USE_AV_FRAME_GET_BUFFER 1 ++#else ++#define USE_AV_FRAME_GET_BUFFER 0 ++#ifndef AV_NUM_DATA_POINTERS // required for 0.7.x/0.8.x ffmpeg releases ++#define AV_NUM_DATA_POINTERS 4 ++#endif ++#endif ++ ++ ++#ifndef USE_AV_INTERRUPT_CALLBACK ++#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 21, 0) ++#define USE_AV_INTERRUPT_CALLBACK 1 ++#else ++#define USE_AV_INTERRUPT_CALLBACK 0 ++#endif ++#endif ++ ++#if USE_AV_INTERRUPT_CALLBACK ++#define LIBAVFORMAT_INTERRUPT_TIMEOUT_MS 30000 ++ ++#ifdef WIN32 ++// http://stackoverflow.com/questions/5404277/porting-clock-gettime-to-windows ++ ++static ++inline LARGE_INTEGER get_filetime_offset() ++{ ++ SYSTEMTIME s; ++ FILETIME f; ++ LARGE_INTEGER t; ++ ++ s.wYear = 1970; ++ s.wMonth = 1; ++ s.wDay = 1; ++ s.wHour = 0; ++ s.wMinute = 0; ++ s.wSecond = 0; ++ s.wMilliseconds = 0; ++ SystemTimeToFileTime(&s, &f); ++ t.QuadPart = f.dwHighDateTime; ++ t.QuadPart <<= 32; ++ t.QuadPart |= f.dwLowDateTime; ++ return t; ++} ++ ++static ++inline void get_monotonic_time(timespec *tv) ++{ ++ LARGE_INTEGER t; ++ FILETIME f; ++ double microseconds; ++ static LARGE_INTEGER offset; ++ static double frequencyToMicroseconds; ++ static int initialized = 0; ++ static BOOL usePerformanceCounter = 0; ++ ++ if (!initialized) ++ { ++ LARGE_INTEGER performanceFrequency; ++ initialized = 1; ++ usePerformanceCounter = QueryPerformanceFrequency(&performanceFrequency); ++ if (usePerformanceCounter) ++ { ++ QueryPerformanceCounter(&offset); ++ frequencyToMicroseconds = (double)performanceFrequency.QuadPart / 1000000.; ++ } ++ else ++ { ++ offset = get_filetime_offset(); ++ frequencyToMicroseconds = 10.; ++ } ++ } ++ ++ if (usePerformanceCounter) ++ { ++ QueryPerformanceCounter(&t); ++ } else { ++ GetSystemTimeAsFileTime(&f); ++ t.QuadPart = f.dwHighDateTime; ++ t.QuadPart <<= 32; ++ t.QuadPart |= f.dwLowDateTime; ++ } ++ ++ t.QuadPart -= offset.QuadPart; ++ microseconds = (double)t.QuadPart / frequencyToMicroseconds; ++ t.QuadPart = microseconds; ++ tv->tv_sec = t.QuadPart / 1000000; ++ tv->tv_nsec = (t.QuadPart % 1000000) * 1000; ++} ++#else ++static ++inline void get_monotonic_time(timespec *time) ++{ ++#if defined(__APPLE__) && defined(__MACH__) ++ clock_serv_t cclock; ++ mach_timespec_t mts; ++ host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); ++ clock_get_time(cclock, &mts); ++ mach_port_deallocate(mach_task_self(), cclock); ++ time->tv_sec = mts.tv_sec; ++ time->tv_nsec = mts.tv_nsec; ++#else ++ clock_gettime(CLOCK_MONOTONIC, time); ++#endif ++} ++#endif ++ ++static ++inline timespec get_monotonic_time_diff(timespec start, timespec end) ++{ ++ timespec temp; ++ if (end.tv_nsec - start.tv_nsec < 0) ++ { ++ temp.tv_sec = end.tv_sec - start.tv_sec - 1; ++ temp.tv_nsec = 1000000000 + end.tv_nsec - start.tv_nsec; ++ } ++ else ++ { ++ temp.tv_sec = end.tv_sec - start.tv_sec; ++ temp.tv_nsec = end.tv_nsec - start.tv_nsec; ++ } ++ return temp; ++} ++ ++static ++inline double get_monotonic_time_diff_ms(timespec time1, timespec time2) ++{ ++ timespec delta = get_monotonic_time_diff(time1, time2); ++ double milliseconds = delta.tv_sec * 1000 + (double)delta.tv_nsec / 1000000.0; ++ ++ return milliseconds; ++} ++#endif // USE_AV_INTERRUPT_CALLBACK ++ + static int get_number_of_cpus(void) + { + #if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(52, 111, 0) +@@ -205,12 +354,36 @@ struct Image_FFMPEG + }; + + ++#if USE_AV_INTERRUPT_CALLBACK ++struct AVInterruptCallbackMetadata ++{ ++ timespec value; ++ unsigned int timeout_after_ms; ++ int timeout; ++}; ++ ++static + inline void _opencv_ffmpeg_free(void** ptr) + { + if(*ptr) free(*ptr); + *ptr = 0; + } + ++static ++inline int _opencv_ffmpeg_interrupt_callback(void *ptr) ++{ ++ AVInterruptCallbackMetadata* metadata = (AVInterruptCallbackMetadata*)ptr; ++ assert(metadata); ++ ++ timespec now; ++ get_monotonic_time(&now); ++ ++ metadata->timeout = get_monotonic_time_diff_ms(metadata->value, now) > metadata->timeout_after_ms; ++ ++ return metadata->timeout ? -1 : 0; ++} ++#endif ++ + + struct CvCapture_FFMPEG + { +@@ -264,6 +437,10 @@ struct CvCapture_FFMPEG + #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0) + AVDictionary *dict; + #endif ++ ++#if USE_AV_INTERRUPT_CALLBACK ++ AVInterruptCallbackMetadata interrupt_metadata; ++#endif + }; + + void CvCapture_FFMPEG::init() +@@ -301,8 +478,10 @@ void CvCapture_FFMPEG::close() + + if( picture ) + { +- // FFmpeg and Libav added avcodec_free_frame in different versions. + #if LIBAVCODEC_BUILD >= (LIBAVCODEC_VERSION_MICRO >= 100 \ ++ ? CALC_FFMPEG_VERSION(55, 45, 101) : CALC_FFMPEG_VERSION(55, 28, 1)) ++ av_frame_free(&picture); ++#elif LIBAVCODEC_BUILD >= (LIBAVCODEC_VERSION_MICRO >= 100 \ + ? CALC_FFMPEG_VERSION(54, 59, 100) : CALC_FFMPEG_VERSION(54, 28, 0)) + avcodec_free_frame(&picture); + #else +@@ -333,11 +512,15 @@ void CvCapture_FFMPEG::close() + ic = NULL; + } + ++#if USE_AV_FRAME_GET_BUFFER ++ av_frame_unref(&rgb_picture); ++#else + if( rgb_picture.data[0] ) + { + free( rgb_picture.data[0] ); + rgb_picture.data[0] = 0; + } ++#endif + + // free last packet if exist + if (packet.data) { +@@ -556,6 +739,16 @@ bool CvCapture_FFMPEG::open( const char* _filename ) + + close(); + ++#if USE_AV_INTERRUPT_CALLBACK ++ /* interrupt callback */ ++ interrupt_metadata.timeout_after_ms = LIBAVFORMAT_INTERRUPT_TIMEOUT_MS; ++ get_monotonic_time(&interrupt_metadata.value); ++ ++ ic = avformat_alloc_context(); ++ ic->interrupt_callback.callback = _opencv_ffmpeg_interrupt_callback; ++ ic->interrupt_callback.opaque = &interrupt_metadata; ++#endif ++ + #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(52, 111, 0) + av_dict_set(&dict, "rtsp_transport", "tcp", 0); + int err = avformat_open_input(&ic, _filename, NULL, &dict); +@@ -619,19 +812,18 @@ bool CvCapture_FFMPEG::open( const char* _filename ) + + video_stream = i; + video_st = ic->streams[i]; ++#if LIBAVCODEC_BUILD >= (LIBAVCODEC_VERSION_MICRO >= 100 \ ++ ? CALC_FFMPEG_VERSION(55, 45, 101) : CALC_FFMPEG_VERSION(55, 28, 1)) ++ picture = av_frame_alloc(); ++#else + picture = avcodec_alloc_frame(); +- +- rgb_picture.data[0] = (uint8_t*)malloc( +- avpicture_get_size( PIX_FMT_BGR24, +- enc->width, enc->height )); +- avpicture_fill( (AVPicture*)&rgb_picture, rgb_picture.data[0], +- PIX_FMT_BGR24, enc->width, enc->height ); ++#endif + + frame.width = enc->width; + frame.height = enc->height; + frame.cn = 3; +- frame.step = rgb_picture.linesize[0]; +- frame.data = rgb_picture.data[0]; ++ frame.step = 0; ++ frame.data = NULL; + break; + } + } +@@ -668,6 +860,16 @@ bool CvCapture_FFMPEG::grabFrame() + // get the next frame + while (!valid) + { ++ av_free_packet (&packet); ++ ++#if USE_AV_INTERRUPT_CALLBACK ++ if (interrupt_metadata.timeout) ++ { ++ valid = false; ++ break; ++ } ++#endif ++ + int ret = av_read_frame(ic, &packet); + if (ret == AVERROR(EAGAIN)) continue; + +@@ -703,6 +905,11 @@ bool CvCapture_FFMPEG::grabFrame() + picture_pts = packet.pts != AV_NOPTS_VALUE_ && packet.pts != 0 ? packet.pts : packet.dts; + frame_number++; + valid = true; ++ ++#if USE_AV_INTERRUPT_CALLBACK ++ // update interrupt value ++ get_monotonic_time(&interrupt_metadata.value); ++#endif + } + else + { +@@ -727,38 +934,59 @@ bool CvCapture_FFMPEG::retrieveFrame(int, unsigned char** data, int* step, int* + if( !video_st || !picture->data[0] ) + return false; + +- avpicture_fill((AVPicture*)&rgb_picture, rgb_picture.data[0], PIX_FMT_RGB24, +- video_st->codec->width, video_st->codec->height); +- + if( img_convert_ctx == NULL || + frame.width != video_st->codec->width || +- frame.height != video_st->codec->height ) ++ frame.height != video_st->codec->height || ++ frame.data == NULL ) + { +- if( img_convert_ctx ) +- sws_freeContext(img_convert_ctx); +- +- frame.width = video_st->codec->width; +- frame.height = video_st->codec->height; ++ // Some sws_scale optimizations have some assumptions about alignment of data/step/width/height ++ // Also we use coded_width/height to workaround problem with legacy ffmpeg versions (like n0.8) ++ int buffer_width = video_st->codec->coded_width, buffer_height = video_st->codec->coded_height; + + img_convert_ctx = sws_getCachedContext( +- NULL, +- video_st->codec->width, video_st->codec->height, ++ img_convert_ctx, ++ buffer_width, buffer_height, + video_st->codec->pix_fmt, +- video_st->codec->width, video_st->codec->height, +- PIX_FMT_BGR24, ++ buffer_width, buffer_height, ++ AV_PIX_FMT_BGR24, + SWS_BICUBIC, + NULL, NULL, NULL + ); + + if (img_convert_ctx == NULL) + return false;//CV_Error(0, "Cannot initialize the conversion context!"); ++ ++#if USE_AV_FRAME_GET_BUFFER ++ av_frame_unref(&rgb_picture); ++ rgb_picture.format = AV_PIX_FMT_BGR24; ++ rgb_picture.width = buffer_width; ++ rgb_picture.height = buffer_height; ++ if (0 != av_frame_get_buffer(&rgb_picture, 32)) ++ { ++ CV_WARN("OutOfMemory"); ++ return false; ++ } ++#else ++ int aligns[AV_NUM_DATA_POINTERS]; ++ avcodec_align_dimensions2(video_st->codec, &buffer_width, &buffer_height, aligns); ++ rgb_picture.data[0] = (uint8_t*)realloc(rgb_picture.data[0], ++ avpicture_get_size( AV_PIX_FMT_BGR24, ++ buffer_width, buffer_height )); ++ avpicture_fill( (AVPicture*)&rgb_picture, rgb_picture.data[0], ++ AV_PIX_FMT_BGR24, buffer_width, buffer_height ); ++#endif ++ frame.width = video_st->codec->width; ++ frame.height = video_st->codec->height; ++ frame.cn = 3; ++ frame.data = rgb_picture.data[0]; ++ frame.step = rgb_picture.linesize[0]; + } + + sws_scale( + img_convert_ctx, + picture->data, + picture->linesize, +- 0, video_st->codec->height, ++ 0, video_st->codec->coded_height, + rgb_picture.data, + rgb_picture.linesize + ); +@@ -1099,10 +1327,20 @@ static AVFrame * icv_alloc_picture_FFMPEG(int pix_fmt, int width, int height, bo + uint8_t * picture_buf; + int size; + ++#if LIBAVCODEC_BUILD >= (LIBAVCODEC_VERSION_MICRO >= 100 \ ++ ? CALC_FFMPEG_VERSION(55, 45, 101) : CALC_FFMPEG_VERSION(55, 28, 1)) ++ picture = av_frame_alloc(); ++#else + picture = avcodec_alloc_frame(); ++#endif + if (!picture) + return NULL; +- size = avpicture_get_size( (PixelFormat) pix_fmt, width, height); ++ ++ picture->format = pix_fmt; ++ picture->width = width; ++ picture->height = height; ++ ++ size = avpicture_get_size( (AVPixelFormat) pix_fmt, width, height); + if(alloc){ + picture_buf = (uint8_t *) malloc(size); + if (!picture_buf) +@@ -1111,7 +1349,7 @@ static AVFrame * icv_alloc_picture_FFMPEG(int pix_fmt, int width, int height, bo + return NULL; + } + avpicture_fill((AVPicture *)picture, picture_buf, +- (PixelFormat) pix_fmt, width, height); ++ (AVPixelFormat) pix_fmt, width, height); + } + else { + } +@@ -1211,7 +1449,7 @@ static AVStream *icv_add_video_stream_FFMPEG(AVFormatContext *oc, + #endif + + c->gop_size = 12; /* emit one intra frame every twelve frames at most */ +- c->pix_fmt = (PixelFormat) pixel_format; ++ c->pix_fmt = (AVPixelFormat) pixel_format; + + if (c->codec_id == CV_CODEC(CODEC_ID_MPEG2VIDEO)) { + c->max_b_frames = 2; +@@ -1372,12 +1610,12 @@ bool CvVideoWriter_FFMPEG::writeFrame( const unsigned char* data, int step, int + #endif + + // check parameters +- if (input_pix_fmt == PIX_FMT_BGR24) { ++ if (input_pix_fmt == AV_PIX_FMT_BGR24) { + if (cn != 3) { + return false; + } + } +- else if (input_pix_fmt == PIX_FMT_GRAY8) { ++ else if (input_pix_fmt == AV_PIX_FMT_GRAY8) { + if (cn != 1) { + return false; + } +@@ -1390,13 +1628,13 @@ bool CvVideoWriter_FFMPEG::writeFrame( const unsigned char* data, int step, int + assert( input_picture ); + // let input_picture point to the raw data buffer of 'image' + avpicture_fill((AVPicture *)input_picture, (uint8_t *) data, +- (PixelFormat)input_pix_fmt, width, height); ++ (AVPixelFormat)input_pix_fmt, width, height); + + if( !img_convert_ctx ) + { + img_convert_ctx = sws_getContext(width, + height, +- (PixelFormat)input_pix_fmt, ++ (AVPixelFormat)input_pix_fmt, + c->width, + c->height, + c->pix_fmt, +@@ -1414,7 +1652,7 @@ bool CvVideoWriter_FFMPEG::writeFrame( const unsigned char* data, int step, int + } + else{ + avpicture_fill((AVPicture *)picture, (uint8_t *) data, +- (PixelFormat)input_pix_fmt, width, height); ++ (AVPixelFormat)input_pix_fmt, width, height); + } + + picture->pts = frame_idx; +@@ -1547,10 +1785,10 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc, + + /* determine optimal pixel format */ + if (is_color) { +- input_pix_fmt = PIX_FMT_BGR24; ++ input_pix_fmt = AV_PIX_FMT_BGR24; + } + else { +- input_pix_fmt = PIX_FMT_GRAY8; ++ input_pix_fmt = AV_PIX_FMT_GRAY8; + } + + /* Lookup codec_id for given fourcc */ +@@ -1587,21 +1825,21 @@ bool CvVideoWriter_FFMPEG::open( const char * filename, int fourcc, + break; + #endif + case CV_CODEC(CODEC_ID_HUFFYUV): +- codec_pix_fmt = PIX_FMT_YUV422P; ++ codec_pix_fmt = AV_PIX_FMT_YUV422P; + break; + case CV_CODEC(CODEC_ID_MJPEG): + case CV_CODEC(CODEC_ID_LJPEG): +- codec_pix_fmt = PIX_FMT_YUVJ420P; ++ codec_pix_fmt = AV_PIX_FMT_YUVJ420P; + bitrate_scale = 3; + break; + case CV_CODEC(CODEC_ID_RAWVIDEO): +- codec_pix_fmt = input_pix_fmt == PIX_FMT_GRAY8 || +- input_pix_fmt == PIX_FMT_GRAY16LE || +- input_pix_fmt == PIX_FMT_GRAY16BE ? input_pix_fmt : PIX_FMT_YUV420P; ++ codec_pix_fmt = input_pix_fmt == AV_PIX_FMT_GRAY8 || ++ input_pix_fmt == AV_PIX_FMT_GRAY16LE || ++ input_pix_fmt == AV_PIX_FMT_GRAY16BE ? input_pix_fmt : AV_PIX_FMT_YUV420P; + break; + default: + // good for lossy formats, MPEG, etc. +- codec_pix_fmt = PIX_FMT_YUV420P; ++ codec_pix_fmt = AV_PIX_FMT_YUV420P; + break; + } + +@@ -1826,7 +2064,7 @@ struct OutputMediaStream_FFMPEG + void write(unsigned char* data, int size, int keyFrame); + + // add a video output stream to the container +- static AVStream* addVideoStream(AVFormatContext *oc, CV_CODEC_ID codec_id, int w, int h, int bitrate, double fps, PixelFormat pixel_format); ++ static AVStream* addVideoStream(AVFormatContext *oc, CV_CODEC_ID codec_id, int w, int h, int bitrate, double fps, AVPixelFormat pixel_format); + + AVOutputFormat* fmt_; + AVFormatContext* oc_; +@@ -1873,7 +2111,7 @@ void OutputMediaStream_FFMPEG::close() + } + } + +-AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext *oc, CV_CODEC_ID codec_id, int w, int h, int bitrate, double fps, PixelFormat pixel_format) ++AVStream* OutputMediaStream_FFMPEG::addVideoStream(AVFormatContext *oc, CV_CODEC_ID codec_id, int w, int h, int bitrate, double fps, AVPixelFormat pixel_format) + { + #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 10, 0) + AVStream* st = avformat_new_stream(oc, 0); +@@ -2011,7 +2249,7 @@ bool OutputMediaStream_FFMPEG::open(const char* fileName, int width, int height, + oc_->max_delay = (int)(0.7 * AV_TIME_BASE); // This reduces buffer underrun warnings with MPEG + + // set a few optimal pixel formats for lossless codecs of interest.. +- PixelFormat codec_pix_fmt = PIX_FMT_YUV420P; ++ AVPixelFormat codec_pix_fmt = AV_PIX_FMT_YUV420P; + int bitrate_scale = 64; + + // TODO -- safe to ignore output audio stream? +@@ -2150,6 +2388,10 @@ struct InputMediaStream_FFMPEG + AVFormatContext* ctx_; + int video_stream_id_; + AVPacket pkt_; ++ ++#if USE_AV_INTERRUPT_CALLBACK ++ AVInterruptCallbackMetadata interrupt_metadata; ++#endif + }; + + bool InputMediaStream_FFMPEG::open(const char* fileName, int* codec, int* chroma_format, int* width, int* height) +@@ -2160,6 +2402,16 @@ bool InputMediaStream_FFMPEG::open(const char* fileName, int* codec, int* chroma + video_stream_id_ = -1; + memset(&pkt_, 0, sizeof(AVPacket)); + ++#if USE_AV_INTERRUPT_CALLBACK ++ /* interrupt callback */ ++ interrupt_metadata.timeout_after_ms = LIBAVFORMAT_INTERRUPT_TIMEOUT_MS; ++ get_monotonic_time(&interrupt_metadata.value); ++ ++ ctx_ = avformat_alloc_context(); ++ ctx_->interrupt_callback.callback = _opencv_ffmpeg_interrupt_callback; ++ ctx_->interrupt_callback.opaque = &interrupt_metadata; ++#endif ++ + #if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(53, 13, 0) + avformat_network_init(); + #endif +@@ -2220,15 +2472,15 @@ bool InputMediaStream_FFMPEG::open(const char* fileName, int* codec, int* chroma + + switch (enc->pix_fmt) + { +- case PIX_FMT_YUV420P: ++ case AV_PIX_FMT_YUV420P: + *chroma_format = ::VideoChromaFormat_YUV420; + break; + +- case PIX_FMT_YUV422P: ++ case AV_PIX_FMT_YUV422P: + *chroma_format = ::VideoChromaFormat_YUV422; + break; + +- case PIX_FMT_YUV444P: ++ case AV_PIX_FMT_YUV444P: + *chroma_format = ::VideoChromaFormat_YUV444; + break; + +@@ -2276,11 +2528,23 @@ bool InputMediaStream_FFMPEG::read(unsigned char** data, int* size, int* endOfFi + // get the next frame + for (;;) + { ++#if USE_AV_INTERRUPT_CALLBACK ++ if(interrupt_metadata.timeout) ++ { ++ break; ++ } ++#endif ++ + int ret = av_read_frame(ctx_, &pkt_); + + if (ret == AVERROR(EAGAIN)) + continue; + ++#if USE_AV_INTERRUPT_CALLBACK ++ // update interrupt value ++ get_monotonic_time(&interrupt_metadata.value); ++#endif ++ + if (ret < 0) + { + if (ret == (int)AVERROR_EOF) diff --git a/package/opencv/0002-atomic.patch b/package/opencv/0002-atomic.patch new file mode 100644 index 0000000000..bbe8d433cf --- /dev/null +++ b/package/opencv/0002-atomic.patch @@ -0,0 +1,229 @@ +Bug#714923: opencv FTBFS on sparc64 +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=714923 + +opencv uses functions from , but it wrongly assumes +this functions apply to an int type. While it is true for some +architectures, some architectures are using a long type there. The +correct type to use is _Atomic_word. + +Signed-off-by: Waldemar Brodkorb + +diff -Nur opencv-2.4.12.3.orig/modules/core/include/opencv2/core/core.hpp opencv-2.4.12.3/modules/core/include/opencv2/core/core.hpp +--- opencv-2.4.12.3.orig/modules/core/include/opencv2/core/core.hpp 2015-10-26 08:56:34.000000000 +0100 ++++ opencv-2.4.12.3/modules/core/include/opencv2/core/core.hpp 2016-04-03 00:10:50.455774144 +0200 +@@ -1290,7 +1290,7 @@ + operator const _Tp*() const; + + _Tp* obj; //< the object pointer. +- int* refcount; //< the associated reference counter ++ _Atomic_word* refcount; //< the associated reference counter + }; + + template +@@ -1490,9 +1490,9 @@ + public: + MatAllocator() {} + virtual ~MatAllocator() {} +- virtual void allocate(int dims, const int* sizes, int type, int*& refcount, ++ virtual void allocate(int dims, const int* sizes, int type, _Atomic_word*& refcount, + uchar*& datastart, uchar*& data, size_t* step) = 0; +- virtual void deallocate(int* refcount, uchar* datastart, uchar* data) = 0; ++ virtual void deallocate(_Atomic_word* refcount, uchar* datastart, uchar* data) = 0; + }; + + /*! +@@ -1985,7 +1985,7 @@ + + //! pointer to the reference counter; + // when matrix points to user-allocated data, the pointer is NULL +- int* refcount; ++ _Atomic_word* refcount; + + //! helper fields used in locateROI and adjustROI + uchar* datastart; +@@ -3408,7 +3408,7 @@ + { + Hdr(int _dims, const int* _sizes, int _type); + void clear(); +- int refcount; ++ _Atomic_word refcount; + int dims; + int valueOffset; + size_t nodeSize; +diff -Nur opencv-2.4.12.3.orig/modules/core/include/opencv2/core/gpumat.hpp opencv-2.4.12.3/modules/core/include/opencv2/core/gpumat.hpp +--- opencv-2.4.12.3.orig/modules/core/include/opencv2/core/gpumat.hpp 2015-10-26 08:56:34.000000000 +0100 ++++ opencv-2.4.12.3/modules/core/include/opencv2/core/gpumat.hpp 2016-04-02 23:08:58.116874218 +0200 +@@ -301,7 +301,7 @@ + + //! pointer to the reference counter; + // when GpuMatrix points to user-allocated data, the pointer is NULL +- int* refcount; ++ _Atomic_word* refcount; + + //! helper fields used in locateROI and adjustROI + uchar* datastart; +diff -Nur opencv-2.4.12.3.orig/modules/core/include/opencv2/core/operations.hpp opencv-2.4.12.3/modules/core/include/opencv2/core/operations.hpp +--- opencv-2.4.12.3.orig/modules/core/include/opencv2/core/operations.hpp 2015-10-26 08:56:34.000000000 +0100 ++++ opencv-2.4.12.3/modules/core/include/opencv2/core/operations.hpp 2016-04-02 23:12:59.148385306 +0200 +@@ -2589,7 +2589,7 @@ + { + if(obj) + { +- refcount = (int*)fastMalloc(sizeof(*refcount)); ++ refcount = (_Atomic_word*)fastMalloc(sizeof(*refcount)); + *refcount = 1; + } + else +@@ -2628,7 +2628,7 @@ + { + if (this != &_ptr) + { +- int* _refcount = _ptr.refcount; ++ _Atomic_word* _refcount = _ptr.refcount; + if( _refcount ) + CV_XADD(_refcount, 1); + release(); +diff -Nur opencv-2.4.12.3.orig/modules/core/src/gpumat.cpp opencv-2.4.12.3/modules/core/src/gpumat.cpp +--- opencv-2.4.12.3.orig/modules/core/src/gpumat.cpp 2015-10-26 08:56:34.000000000 +0100 ++++ opencv-2.4.12.3/modules/core/src/gpumat.cpp 2016-04-02 23:14:38.894804300 +0200 +@@ -716,7 +716,7 @@ + datastart = data = static_cast(devPtr); + dataend = data + nettosize; + +- refcount = static_cast(fastMalloc(sizeof(*refcount))); ++ refcount = static_cast<_Atomic_word*>(fastMalloc(sizeof(*refcount))); + *refcount = 1; + } + } +diff -Nur opencv-2.4.12.3.orig/modules/core/src/matrix.cpp opencv-2.4.12.3/modules/core/src/matrix.cpp +--- opencv-2.4.12.3.orig/modules/core/src/matrix.cpp 2015-10-26 08:56:34.000000000 +0100 ++++ opencv-2.4.12.3/modules/core/src/matrix.cpp 2016-04-02 23:59:53.405491031 +0200 +@@ -213,7 +213,7 @@ + { + size_t totalsize = alignSize(step.p[0]*size.p[0], (int)sizeof(*refcount)); + data = datastart = (uchar*)fastMalloc(totalsize + (int)sizeof(*refcount)); +- refcount = (int*)(data + totalsize); ++ refcount = (_Atomic_word*)(data + totalsize); + *refcount = 1; + } + else +@@ -228,7 +228,7 @@ + allocator = 0; + size_t totalSize = alignSize(step.p[0]*size.p[0], (int)sizeof(*refcount)); + data = datastart = (uchar*)fastMalloc(totalSize + (int)sizeof(*refcount)); +- refcount = (int*)(data + totalSize); ++ refcount = (_Atomic_word*)(data + totalSize); + *refcount = 1; + } + #else +diff -Nur opencv-2.4.12.3.orig/modules/core/src/system.cpp opencv-2.4.12.3/modules/core/src/system.cpp +--- opencv-2.4.12.3.orig/modules/core/src/system.cpp 2015-10-26 08:56:34.000000000 +0100 ++++ opencv-2.4.12.3/modules/core/src/system.cpp 2016-04-02 23:33:19.298905578 +0200 +@@ -892,7 +892,7 @@ + void unlock() { LeaveCriticalSection(&cs); } + + CRITICAL_SECTION cs; +- int refcount; ++ _Atomic_word refcount; + }; + + #ifndef __GNUC__ +@@ -920,7 +920,7 @@ + void unlock() { OSSpinLockUnlock(&sl); } + + OSSpinLock sl; +- int refcount; ++ _Atomic_word refcount; + }; + + #elif defined __linux__ && !defined ANDROID && !defined __LINUXTHREADS_OLD__ +@@ -935,7 +935,7 @@ + void unlock() { pthread_spin_unlock(&sl); } + + pthread_spinlock_t sl; +- int refcount; ++ _Atomic_word refcount; + }; + + #else +@@ -950,7 +950,7 @@ + void unlock() { pthread_mutex_unlock(&sl); } + + pthread_mutex_t sl; +- int refcount; ++ _Atomic_word refcount; + }; + + #endif +diff -Nur opencv-2.4.12.3.orig/modules/gpu/include/opencv2/gpu/gpu.hpp opencv-2.4.12.3/modules/gpu/include/opencv2/gpu/gpu.hpp +--- opencv-2.4.12.3.orig/modules/gpu/include/opencv2/gpu/gpu.hpp 2015-10-26 08:56:34.000000000 +0100 ++++ opencv-2.4.12.3/modules/gpu/include/opencv2/gpu/gpu.hpp 2016-04-02 23:16:19.737293785 +0200 +@@ -125,7 +125,7 @@ + size_t step; + + uchar* data; +- int* refcount; ++ _Atomic_word* refcount; + + uchar* datastart; + uchar* dataend; +diff -Nur opencv-2.4.12.3.orig/modules/ocl/include/opencv2/ocl/ocl.hpp opencv-2.4.12.3/modules/ocl/include/opencv2/ocl/ocl.hpp +--- opencv-2.4.12.3.orig/modules/ocl/include/opencv2/ocl/ocl.hpp 2015-10-26 08:56:34.000000000 +0100 ++++ opencv-2.4.12.3/modules/ocl/include/opencv2/ocl/ocl.hpp 2016-04-02 23:18:55.715331443 +0200 +@@ -404,7 +404,7 @@ + + //! pointer to the reference counter; + // when oclMatrix points to user-allocated data, the pointer is NULL +- int *refcount; ++ _Atomic_word *refcount; + + //! helper fields used in locateROI and adjustROI + //datastart and dataend are not used in current version +diff -Nur opencv-2.4.12.3.orig/modules/ocl/src/matrix_operations.cpp opencv-2.4.12.3/modules/ocl/src/matrix_operations.cpp +--- opencv-2.4.12.3.orig/modules/ocl/src/matrix_operations.cpp 2015-10-26 08:56:34.000000000 +0100 ++++ opencv-2.4.12.3/modules/ocl/src/matrix_operations.cpp 2016-04-02 23:19:23.633128033 +0200 +@@ -591,7 +591,7 @@ + datastart = data = (uchar *)dev_ptr; + dataend = data + nettosize; + +- refcount = (int *)fastMalloc(sizeof(*refcount)); ++ refcount = (_Atomic_word *)fastMalloc(sizeof(*refcount)); + *refcount = 1; + } + } +diff -Nur opencv-2.4.12.3.orig/modules/python/src2/cv2.cpp opencv-2.4.12.3/modules/python/src2/cv2.cpp +--- opencv-2.4.12.3.orig/modules/python/src2/cv2.cpp 2015-10-26 08:56:34.000000000 +0100 ++++ opencv-2.4.12.3/modules/python/src2/cv2.cpp 2016-04-02 23:18:34.897991791 +0200 +@@ -157,12 +157,12 @@ + static size_t REFCOUNT_OFFSET = (size_t)&(((PyObject*)0)->ob_refcnt) + + (0x12345678 != *(const size_t*)"\x78\x56\x34\x12\0\0\0\0\0")*sizeof(int); + +-static inline PyObject* pyObjectFromRefcount(const int* refcount) ++static inline PyObject* pyObjectFromRefcount(const _Atomic_word* refcount) + { + return (PyObject*)((size_t)refcount - REFCOUNT_OFFSET); + } + +-static inline int* refcountFromPyObject(const PyObject* obj) ++static inline _Atomic_word* refcountFromPyObject(const PyObject* obj) + { + return (int*)((size_t)obj + REFCOUNT_OFFSET); + } +@@ -173,7 +173,7 @@ + NumpyAllocator() {} + ~NumpyAllocator() {} + +- void allocate(int dims, const int* sizes, int type, int*& refcount, ++ void allocate(int dims, const int* sizes, int type, _Atomic_word*& refcount, + uchar*& datastart, uchar*& data, size_t* step) + { + PyEnsureGIL gil; +@@ -206,7 +206,7 @@ + datastart = data = (uchar*)PyArray_DATA((PyArrayObject*) o); + } + +- void deallocate(int* refcount, uchar*, uchar*) ++ void deallocate(_Atomic_word* refcount, uchar*, uchar*) + { + PyEnsureGIL gil; + if( !refcount ) diff --git a/package/opencv/0003-avoid-sysctl_h.patch b/package/opencv/0003-avoid-sysctl_h.patch new file mode 100644 index 0000000000..603220549e --- /dev/null +++ b/package/opencv/0003-avoid-sysctl_h.patch @@ -0,0 +1,31 @@ +From upstream master branch: +https://github.com/Itseez/opencv/blob/master/modules/core/src/ + +Do not include sysctl.h targeting Linux systems. + +Signed-off-by: Waldemar Brodkorb + +diff -Nur opencv-2.4.12.3.orig/modules/core/src/parallel.cpp opencv-2.4.12.3/modules/core/src/parallel.cpp +--- opencv-2.4.12.3.orig/modules/core/src/parallel.cpp 2015-10-26 08:56:34.000000000 +0100 ++++ opencv-2.4.12.3/modules/core/src/parallel.cpp 2016-04-05 12:59:37.750143762 +0200 +@@ -56,7 +56,7 @@ + #include + #if defined ANDROID + #include +- #else ++ #elif defined __APPLE__ + #include + #endif + #endif +diff -Nur opencv-2.4.12.3.orig/modules/core/src/system.cpp opencv-2.4.12.3/modules/core/src/system.cpp +--- opencv-2.4.12.3.orig/modules/core/src/system.cpp 2015-10-26 08:56:34.000000000 +0100 ++++ opencv-2.4.12.3/modules/core/src/system.cpp 2016-04-05 13:05:22.468323717 +0200 +@@ -163,7 +163,7 @@ + #include + #if defined ANDROID + #include +-#else ++#elif defined __APPLE__ + #include + #endif + #endif diff --git a/package/opencv/Config.in b/package/opencv/Config.in new file mode 100644 index 0000000000..c046baaa4b --- /dev/null +++ b/package/opencv/Config.in @@ -0,0 +1,313 @@ +menuconfig BR2_PACKAGE_OPENCV + bool "opencv-2.4" + select BR2_PACKAGE_ZLIB + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + help + OpenCV (Open Source Computer Vision) is a library of programming + functions for real time computer vision. + + http://opencv.org/ + +if BR2_PACKAGE_OPENCV + +comment "OpenCV modules" + +config BR2_PACKAGE_OPENCV_LIB_CALIB3D + bool "calib3d" + default y + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + help + Include opencv_calib3d module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_CONTRIB + bool "contrib" + default y + select BR2_PACKAGE_OPENCV_LIB_CALIB3D + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_ML + select BR2_PACKAGE_OPENCV_LIB_OBJDETECT + select BR2_PACKAGE_OPENCV_LIB_VIDEO + help + Include opencv_contrib module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_FEATURES2D + bool "features2d" + default y + select BR2_PACKAGE_OPENCV_LIB_FLANN + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + help + Include opencv_features2d module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_FLANN + bool "flann" + default y + # opencv_core dependency is already enabled + help + Include opencv_flann module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_GPU + bool "gpu" + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # opencv libphoto + select BR2_PACKAGE_OPENCV_LIB_CALIB3D + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_LEGACY + select BR2_PACKAGE_OPENCV_LIB_OBJDETECT + select BR2_PACKAGE_OPENCV_LIB_PHOTO + select BR2_PACKAGE_OPENCV_LIB_VIDEO + depends on !BR2_STATIC_LIBS + help + Include opencv_gpu module into the OpenCV build. + +comment "gpu module needs a toolchain w/ dynamic libraries" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_OPENCV_LIB_HIGHGUI + bool "highgui" + default y + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + help + Include opencv_highgui module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_IMGPROC + bool "imgproc" + default y + # opencv_core dependency is already enabled + help + Include opencv_imgproc module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_LEGACY + bool "legacy" + default y + select BR2_PACKAGE_OPENCV_LIB_CALIB3D + select BR2_PACKAGE_OPENCV_LIB_ML + select BR2_PACKAGE_OPENCV_LIB_VIDEO + help + Include opencv_legacy module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_ML + bool "ml (machine learning)" + default y + # opencv_core dependency is already enabled + help + Include opencv_ml module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_NONFREE + bool "nonfree" + select BR2_PACKAGE_OPENCV_LIB_CALIB3D + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + help + Include opencv_nonfree module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_OBJDETECT + bool "objdetect" + default y + # opencv_core dependency is already enabled + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + help + Include opencv_objdetect module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_PHOTO + bool "photo" + default y + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Binutils 2.25 nios2 issue + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + help + Include opencv_photo module into the OpenCV build. + +comment "opencv_python module requires numpy which is not yet available." + +config BR2_PACKAGE_OPENCV_LIB_STITCHING + bool "stitching" + default y + select BR2_PACKAGE_OPENCV_LIB_CALIB3D + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_OBJDETECT + help + Include opencv_stitching module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_SUPERRES + bool "superres" + default y + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_VIDEO + help + Include opencv_superres "super resolution" - module into the OpenCV + build. + +config BR2_PACKAGE_OPENCV_LIB_TS + bool "ts (touchscreen)" + default y + # opencv_core dependency is already enabled + select BR2_PACKAGE_OPENCV_LIB_CALIB3D + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_HIGHGUI + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_VIDEO + help + Include opencv_ts module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_VIDEO + bool "video" + default y + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + help + Include opencv_video module into the OpenCV build. + +config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB + bool "videostab" + default y + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # opencv libphoto + select BR2_PACKAGE_OPENCV_LIB_CALIB3D + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_HIGHGUI + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_PHOTO + select BR2_PACKAGE_OPENCV_LIB_VIDEO + help + Include opencv_videostab module into the OpenCV build. + +if !BR2_STATIC_LIBS + +comment "Test sets" + +config BR2_PACKAGE_OPENCV_BUILD_TESTS + bool "build tests" + +config BR2_PACKAGE_OPENCV_BUILD_PERF_TESTS + bool "build performance tests" + +endif + +comment "Tests sets need a toolchain w/ dynamic libraries" + depends on BR2_STATIC_LIBS + +comment "3rd party support" + +config BR2_PACKAGE_OPENCV_WITH_FFMPEG + bool "ffmpeg support" + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_SWSCALE + help + Use ffmpeg from the target system. + +choice + prompt "gstreamer support" + help + OpenCV prefers gstreamer-1 over gstreamer-0.10. + +config BR2_PACKAGE_OPENCV_WITHOUT_GSTREAMER + bool "none" + +config BR2_PACKAGE_OPENCV_WITH_GSTREAMER + bool "gstreamer-0.10" + depends on BR2_USE_MMU # gstreamer -> libglib2 + depends on BR2_USE_WCHAR # gstreamer -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer -> libglib2 + select BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_GST_PLUGINS_BASE + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP + +comment "gstreamer-0.10 support needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_OPENCV_WITH_GSTREAMER1 + bool "gstreamer-1.x" + depends on BR2_USE_MMU # gstreamer1 -> libglib2 + depends on BR2_USE_WCHAR # gstreamer1 -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer1 -> libglib2 + select BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BASE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP + +comment "gstreamer-1.x support needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +endchoice + +config BR2_PACKAGE_OPENCV_WITH_GTK + bool "gtk support" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_WCHAR # libgtk2 -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> libglib2 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # libgtk2 -> glib2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk2 -> pango -> harfbuzz + depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI + select BR2_PACKAGE_LIBGTK2 + +config BR2_PACKAGE_OPENCV_WITH_JASPER + bool "jpeg2000 support" + select BR2_PACKAGE_JASPER + help + Enable jpeg2000 support. + + Note: this does not use the libjasper bundled with opencv, + but uses the libjasper package installed system-wide by + Buildroot. + +config BR2_PACKAGE_OPENCV_WITH_JPEG + bool "jpeg support" + select BR2_PACKAGE_JPEG + help + Use shared libjpeg from the target system. + +config BR2_PACKAGE_OPENCV_WITH_PNG + bool "png support" + select BR2_PACKAGE_LIBPNG + help + Use shared libpng from the target system. + +config BR2_PACKAGE_OPENCV_WITH_QT + bool "qt backend support" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # qt + depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module + select BR2_PACKAGE_QT + select BR2_PACKAGE_QT_STL + select BR2_PACKAGE_QT_GUI_MODULE + select BR2_PACKAGE_QT_TEST + help + Use Qt with QtTest module and STL support + +comment "qt backend support needs a toolchain not affected by Binutils bug 19405" + depends on BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 + +config BR2_PACKAGE_OPENCV_WITH_TIFF + bool "tiff support" + select BR2_PACKAGE_TIFF + help + Use shared libtiff from the target system. + +config BR2_PACKAGE_OPENCV_WITH_V4L + bool "v4l support" + help + Enable Video 4 Linux support. + + If the package libv4l is enabled, its support is automatically enabled. + +comment "Install options" + +config BR2_PACKAGE_OPENCV_INSTALL_DATA + bool "install extra data" + help + Install various data that is used by cv libraries and/or demo + applications, specifically for haarcascades and lbpcascades + features. + + For further information: see OpenCV documentation. + +endif # BR2_PACKAGE_OPENCV + +comment "opencv needs a toolchain w/ C++, NPTL, wchar" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS_NPTL) diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk new file mode 100644 index 0000000000..2ae95a08b0 --- /dev/null +++ b/package/opencv/opencv.mk @@ -0,0 +1,257 @@ +################################################################################ +# +# opencv +# +################################################################################ + +OPENCV_VERSION = 2.4.12.3 +OPENCV_SITE = $(call github,itseez,opencv,$(OPENCV_VERSION)) +OPENCV_INSTALL_STAGING = YES +OPENCV_LICENSE = BSD-3c +OPENCV_LICENSE_FILES = LICENSE + +# OpenCV component options +OPENCV_CONF_OPTS += \ + -DBUILD_PERF_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_PERF_TESTS),ON,OFF) \ + -DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV_BUILD_TESTS),ON,OFF) \ + -DBUILD_WITH_DEBUG_INFO=OFF + +# OpenCV build options +OPENCV_CONF_OPTS += \ + -DBUILD_WITH_STATIC_CRT=OFF \ + -DENABLE_FAST_MATH=ON \ + -DENABLE_NOISY_WARNINGS=OFF \ + -DENABLE_OMIT_FRAME_POINTER=ON \ + -DENABLE_PRECOMPILED_HEADERS=OFF \ + -DENABLE_PROFILING=OFF \ + -DOPENCV_CAN_BREAK_BINARY_COMPATIBILITY=ON + +# OpenCV link options +OPENCV_CONF_OPTS += \ + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF \ + -DCMAKE_SKIP_RPATH=OFF \ + -DCMAKE_USE_RELATIVE_PATHS=OFF + +# OpenCV packaging options: +OPENCV_CONF_OPTS += \ + -DBUILD_PACKAGE=OFF \ + -DENABLE_SOLUTION_FOLDERS=OFF \ + -DINSTALL_CREATE_DISTRIB=OFF + +# OpenCV module selection +OPENCV_CONF_OPTS += \ + -DBUILD_opencv_androidcamera=OFF \ + -DBUILD_opencv_apps=OFF \ + -DBUILD_opencv_calib3d=$(if $(BR2_PACKAGE_OPENCV_LIB_CALIB3D),ON,OFF) \ + -DBUILD_opencv_contrib=$(if $(BR2_PACKAGE_OPENCV_LIB_CONTRIB),ON,OFF) \ + -DBUILD_opencv_core=ON \ + -DBUILD_opencv_dynamicuda=OFF \ + -DBUILD_opencv_features2d=$(if $(BR2_PACKAGE_OPENCV_LIB_FEATURES2D),ON,OFF) \ + -DBUILD_opencv_flann=$(if $(BR2_PACKAGE_OPENCV_LIB_FLANN),ON,OFF) \ + -DBUILD_opencv_gpu=$(if $(BR2_PACKAGE_OPENCV_LIB_GPU),ON,OFF) \ + -DBUILD_opencv_highgui=$(if $(BR2_PACKAGE_OPENCV_LIB_HIGHGUI),ON,OFF) \ + -DBUILD_opencv_imgproc=$(if $(BR2_PACKAGE_OPENCV_LIB_IMGPROC),ON,OFF) \ + -DBUILD_opencv_java=OFF \ + -DBUILD_opencv_legacy=$(if $(BR2_PACKAGE_OPENCV_LIB_LEGACY),ON,OFF) \ + -DBUILD_opencv_ml=$(if $(BR2_PACKAGE_OPENCV_LIB_ML),ON,OFF) \ + -DBUILD_opencv_nonfree=$(if $(BR2_PACKAGE_OPENCV_LIB_NONFREE),ON,OFF) \ + -DBUILD_opencv_objdetect=$(if $(BR2_PACKAGE_OPENCV_LIB_OBJDETECT),ON,OFF) \ + -DBUILD_opencv_ocl=OFF \ + -DBUILD_opencv_photo=$(if $(BR2_PACKAGE_OPENCV_LIB_PHOTO),ON,OFF) \ + -DBUILD_opencv_python=OFF \ + -DBUILD_opencv_stitching=$(if $(BR2_PACKAGE_OPENCV_LIB_STITCHING),ON,OFF) \ + -DBUILD_opencv_superres=$(if $(BR2_PACKAGE_OPENCV_LIB_SUPERRES),ON,OFF) \ + -DBUILD_opencv_ts=$(if $(BR2_PACKAGE_OPENCV_LIB_TS),ON,OFF) \ + -DBUILD_opencv_video=$(if $(BR2_PACKAGE_OPENCV_LIB_VIDEO),ON,OFF) \ + -DBUILD_opencv_videostab=$(if $(BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB),ON,OFF) \ + -DBUILD_opencv_world=OFF + +# Hardware support options. +# +# * PowerPC support is turned off since its only effect is altering CFLAGS, +# adding '-mcpu=G3 -mtune=G5' to them, which is already handled by Buildroot. +OPENCV_CONF_OPTS += \ + -DENABLE_AVX=$(if $(BR2_X86_CPU_HAS_AVX),ON,OFF) \ + -DENABLE_AVX2=$(if $(BR2_X86_CPU_HAS_AVX2),ON,OFF) \ + -DENABLE_POWERPC=OFF \ + -DENABLE_SSE=$(if $(BR2_X86_CPU_HAS_SSE),ON,OFF) \ + -DENABLE_SSE2=$(if $(BR2_X86_CPU_HAS_SSE2),ON,OFF) \ + -DENABLE_SSE3=$(if $(BR2_X86_CPU_HAS_SSE3),ON,OFF) \ + -DENABLE_SSE41=$(if $(BR2_X86_CPU_HAS_SSE4),ON,OFF) \ + -DENABLE_SSE42=$(if $(BR2_X86_CPU_HAS_SSE42),ON,OFF) \ + -DENABLE_SSSE3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF) + +# Cuda stuff +OPENCV_CONF_OPTS += \ + -DWITH_CUBLAS=OFF \ + -DWITH_CUDA=OFF \ + -DWITH_CUFFT=OFF + +# NVidia stuff +OPENCV_CONF_OPTS += -DWITH_NVCUVID=OFF + +# AMD stuff +OPENCV_CONF_OPTS += \ + -DWITH_OPENCLAMDBLAS=OFF \ + -DWITH_OPENCLAMDFFT=OFF + +# Intel stuff +OPENCV_CONF_OPTS += \ + -DWITH_INTELPERC=OFF \ + -DWITH_IPP=OFF \ + -DWITH_TBB=OFF + +# Smartek stuff +OPENCV_CONF_OPTS += -DWITH_GIGEAPI=OFF + +# Prosilica stuff +OPENCV_CONF_OPTS += -DWITH_PVAPI=OFF + +# Ximea stuff +OPENCV_CONF_OPTS += -DWITH_XIMEA=OFF + +# Non-Linux support (Android options) must remain OFF: +OPENCV_CONF_OPTS += \ + -DBUILD_ANDROID_CAMERA_WRAPPER=OFF \ + -DBUILD_ANDROID_EXAMPLES=OFF \ + -DBUILD_FAT_JAVA_LIB=OFF \ + -DBUILD_JAVA_SUPPORT=OFF \ + -DINSTALL_ANDROID_EXAMPLES=OFF \ + -DWITH_ANDROID_CAMERA=OFF + +# Non-Linux support (Mac OSX options) must remain OFF: +OPENCV_CONF_OPTS += \ + -DWITH_AVFOUNDATION=OFF \ + -DWITH_CARBON=OFF \ + -DWITH_QUICKTIME=OFF + +# Non-Linux support (Windows options) must remain OFF: +OPENCV_CONF_OPTS += \ + -DWITH_CSTRIPES=OFF \ + -DWITH_DSHOW=OFF \ + -DWITH_MSMF=OFF \ + -DWITH_VFW=OFF \ + -DWITH_VIDEOINPUT=OFF \ + -DWITH_WIN32UI=OFF + +# Software/3rd-party support options. +OPENCV_CONF_OPTS += \ + -DBUILD_JASPER=OFF \ + -DBUILD_JPEG=OFF \ + -DBUILD_NEW_PYTHON_SUPPORT=OFF \ + -DBUILD_OPENEXR=OFF \ + -DBUILD_PNG=OFF \ + -DBUILD_TIFF=OFF \ + -DBUILD_ZLIB=OFF \ + -DINSTALL_C_EXAMPLES=OFF \ + -DINSTALL_PYTHON_EXAMPLES=OFF \ + -DINSTALL_TO_MANGLED_PATHS=OFF + +# Disabled features (mostly because they are not available in Buildroot), but +# - eigen: OpenCV does not use it, not take any benefit from it. +OPENCV_CONF_OPTS += \ + -DWITH_1394=OFF \ + -DWITH_EIGEN=OFF \ + -DWITH_IMAGEIO=OFF \ + -DWITH_OPENCL=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENGL=OFF \ + -DWITH_OPENMP=OFF \ + -DWITH_OPENNI=OFF \ + -DWITH_UNICAP=OFF \ + -DWITH_XINE=OFF + +OPENCV_DEPENDENCIES += zlib + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_FFMPEG),y) +OPENCV_CONF_OPTS += -DWITH_FFMPEG=ON +OPENCV_DEPENDENCIES += ffmpeg bzip2 +else +OPENCV_CONF_OPTS += -DWITH_FFMPEG=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER),y) +OPENCV_CONF_OPTS += -DWITH_GSTREAMER_0_10=ON +OPENCV_DEPENDENCIES += gstreamer gst-plugins-base +else +OPENCV_CONF_OPTS += -DWITH_GSTREAMER_0_10=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GSTREAMER1),y) +OPENCV_CONF_OPTS += -DWITH_GSTREAMER=ON +OPENCV_DEPENDENCIES += gstreamer1 gst1-plugins-base +else +OPENCV_CONF_OPTS += -DWITH_GSTREAMER=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_GTK),y) +OPENCV_CONF_OPTS += -DWITH_GTK=ON +OPENCV_DEPENDENCIES += libgtk2 +else +OPENCV_CONF_OPTS += -DWITH_GTK=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_JASPER),y) +OPENCV_CONF_OPTS += -DWITH_JASPER=ON +OPENCV_DEPENDENCIES += jasper +else +OPENCV_CONF_OPTS += -DWITH_JASPER=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_JPEG),y) +OPENCV_CONF_OPTS += -DWITH_JPEG=ON +OPENCV_DEPENDENCIES += jpeg +else +OPENCV_CONF_OPTS += -DWITH_JPEG=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_PNG),y) +OPENCV_CONF_OPTS += -DWITH_PNG=ON +OPENCV_DEPENDENCIES += libpng +else +OPENCV_CONF_OPTS += -DWITH_PNG=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y) +OPENCV_CONF_OPTS += -DWITH_QT=4 +OPENCV_DEPENDENCIES += qt +else +OPENCV_CONF_OPTS += -DWITH_QT=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_TIFF),y) +OPENCV_CONF_OPTS += -DWITH_TIFF=ON +OPENCV_DEPENDENCIES += tiff +else +OPENCV_CONF_OPTS += -DWITH_TIFF=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV_WITH_V4L),y) +OPENCV_CONF_OPTS += \ + -DWITH_LIBV4L=$(if $(BR2_PACKAGE_LIBV4L),ON,OFF) \ + -DWITH_V4L=ON +OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBV4L),libv4l) +else +OPENCV_CONF_OPTS += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF +endif + +# Installation hooks: +define OPENCV_CLEAN_INSTALL_DOC + $(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc +endef +OPENCV_POST_INSTALL_TARGET_HOOKS += OPENCV_CLEAN_INSTALL_DOC + +define OPENCV_CLEAN_INSTALL_CMAKE + $(RM) -f $(TARGET_DIR)/usr/share/OpenCV/OpenCVConfig*.cmake +endef +OPENCV_POST_INSTALL_TARGET_HOOKS += OPENCV_CLEAN_INSTALL_CMAKE + +ifneq ($(BR2_PACKAGE_OPENCV_INSTALL_DATA),y) +define OPENCV_CLEAN_INSTALL_DATA + $(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/haarcascades \ + $(TARGET_DIR)/usr/share/OpenCV/lbpcascades +endef +OPENCV_POST_INSTALL_TARGET_HOOKS += OPENCV_CLEAN_INSTALL_DATA +endif + +$(eval $(cmake-package)) diff --git a/package/opencv3/Config.in b/package/opencv3/Config.in new file mode 100644 index 0000000000..2f4aa7aca8 --- /dev/null +++ b/package/opencv3/Config.in @@ -0,0 +1,341 @@ +menuconfig BR2_PACKAGE_OPENCV3 + bool "opencv3" + select BR2_PACKAGE_ZLIB + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on !BR2_STATIC_LIBS # include dlfcn.h + depends on !BR2_PACKAGE_OPENCV + help + OpenCV (Open Source Computer Vision) is a library of programming + functions for real time computer vision. + + Note that the opencv_core module and the opencv_hal library + are always built and installed, not matter which other + modules are enabled below. + + http://opencv.org/ + +if BR2_PACKAGE_OPENCV3 + +comment "OpenCV modules" + +config BR2_PACKAGE_OPENCV3_LIB_CALIB3D + bool "calib3d" + select BR2_PACKAGE_OPENCV3_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + help + Include opencv_calib3d (camera calibration and 3d reconstruction) module + into the OpenCV build. + +config BR2_PACKAGE_OPENCV3_LIB_FEATURES2D + bool "features2d" + select BR2_PACKAGE_OPENCV3_LIB_FLANN + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + select BR2_PACKAGE_OPENCV3_LIB_ML + help + Include opencv_features2d (2d features framework) module into the OpenCV + build. + +config BR2_PACKAGE_OPENCV3_LIB_FLANN + bool "flann" + # opencv_core dependency is already enabled + help + Include opencv_flann (clustering and search in multi-dimensional spaces) + module into the OpenCV build. + +config BR2_PACKAGE_OPENCV3_LIB_HIGHGUI + bool "highgui" + select BR2_PACKAGE_OPENCV3_LIB_IMGCODECS + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + select BR2_PACKAGE_OPENCV3_LIB_VIDEOIO + help + Include opencv_highgui (high-level gui and media i/o) module into the + OpenCV build. + +if BR2_PACKAGE_OPENCV3_LIB_HIGHGUI + +choice + prompt "gui toolkit" + help + GUI toolkit to be used by the opencv_highgui module. + +config BR2_PACKAGE_OPENCV3_GUI_NONE + bool "none" + +config BR2_PACKAGE_OPENCV3_WITH_GTK + bool "gtk2" + depends on BR2_PACKAGE_LIBGTK2 + +comment "gtk2 support needs libgtk2" + depends on BR2_USE_MMU # libgtk2 -> glib2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_PACKAGE_LIBGTK2 + +config BR2_PACKAGE_OPENCV3_WITH_GTK3 + bool "gtk3" + depends on BR2_PACKAGE_LIBGTK3 + +comment "gtk3 support needs libgtk3" + depends on BR2_USE_MMU # libgtk3 -> glib2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_PACKAGE_LIBGTK3 + +config BR2_PACKAGE_OPENCV3_WITH_QT + bool "qt4" + depends on BR2_PACKAGE_QT + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module + select BR2_PACKAGE_QT_STL + select BR2_PACKAGE_QT_GUI_MODULE + select BR2_PACKAGE_QT_TEST + help + Use Qt4 with QtTest and QtGui modules and STL support, as GUI toolkit. + +comment "qt4 support needs qt and a toolchain not affected by Binutils bug 19405" + depends on BR2_USE_MMU # qt + depends on (!BR2_PACKAGE_QT && !BR2_PACKAGE_QT5) || BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 + +config BR2_PACKAGE_OPENCV3_WITH_QT5 + bool "qt5" + depends on BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_CONCURRENT + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_QT5BASE_WIDGETS + help + Use Qt5 with base, concurrent, test, gui and widgets components, as GUI + toolkit. + +comment "qt5 support needs qt5" + depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5 + +endchoice + +config BR2_PACKAGE_OPENCV3_WITH_OPENGL + bool "opengl support" + # OpenGL support done using Qt5OpenGL, so depends on WITH_QT5 + depends on BR2_PACKAGE_OPENCV3_WITH_QT5 + # OpenGL support requires Qt5OpenGL with GL support, not GLES + depends on BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_QT5BASE_OPENGL + help + Enable OpenGL for UI. + +comment "opengl support needs an OpenGL provider" + depends on BR2_PACKAGE_OPENCV3_WITH_QT5 + depends on !BR2_PACKAGE_QT5_GL_AVAILABLE || \ + !BR2_PACKAGE_HAS_LIBGL + +endif # BR2_PACKAGE_OPENCV3_LIB_HIGHGUI + + +config BR2_PACKAGE_OPENCV3_LIB_IMGCODECS + bool "imgcodecs" + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + help + Include opencv_imgcodecs (image codecs) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV3_LIB_IMGPROC + bool "imgproc" + # opencv_core dependency is already enabled + help + Include opencv_imgproc (image processing) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV3_LIB_ML + bool "ml" + # opencv_core dependency is already enabled + help + Include opencv_ml (machine learning) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV3_LIB_OBJDETECT + bool "objdetect" + # opencv_core dependency is already enabled + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + select BR2_PACKAGE_OPENCV3_LIB_ML + help + Include opencv_objdetect (object detection) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV3_LIB_PHOTO + bool "photo" + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + help + Include opencv_photo (computational photography) module into the OpenCV + build. + +config BR2_PACKAGE_OPENCV3_LIB_PYTHON + bool "python" + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS + select BR2_PACKAGE_PYTHON_NUMPY + help + Include opencv_python module into the OpenCV build. + No python example is installed. + +config BR2_PACKAGE_OPENCV3_LIB_SHAPE + bool "shape" + # opencv_core dependency is already enabled + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + select BR2_PACKAGE_OPENCV3_LIB_VIDEO + help + Include opencv_shape (shape descriptors and matchers) module into the + OpenCV build. + +config BR2_PACKAGE_OPENCV3_LIB_STITCHING + bool "stitching" + select BR2_PACKAGE_OPENCV3_LIB_CALIB3D + select BR2_PACKAGE_OPENCV3_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + select BR2_PACKAGE_OPENCV3_LIB_OBJDETECT + help + Include opencv_stitching (images stitching) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV3_LIB_SUPERRES + bool "superres" + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + select BR2_PACKAGE_OPENCV3_LIB_VIDEO + help + Include opencv_superres (super resolution) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV3_LIB_TS + bool "ts" + # opencv_core dependency is already enabled + select BR2_PACKAGE_OPENCV3_LIB_HIGHGUI + select BR2_PACKAGE_OPENCV3_LIB_IMGCODECS + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + select BR2_PACKAGE_OPENCV3_LIB_VIDEOIO + help + Include opencv_ts (test) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV3_LIB_VIDEOIO + bool "videoio" + select BR2_PACKAGE_OPENCV3_LIB_IMGCODECS + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + help + Include opencv_videoio (media i/o) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV3_LIB_VIDEO + bool "video" + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + help + Include opencv_video (video analysis) module into the OpenCV build. + +config BR2_PACKAGE_OPENCV3_LIB_VIDEOSTAB + bool "videostab" + select BR2_PACKAGE_OPENCV3_LIB_CALIB3D + select BR2_PACKAGE_OPENCV3_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + select BR2_PACKAGE_OPENCV3_LIB_PHOTO + select BR2_PACKAGE_OPENCV3_LIB_VIDEO + help + Include opencv_videostab (video stabilization) module into the OpenCV + build. + +comment "Test sets" +config BR2_PACKAGE_OPENCV3_BUILD_TESTS + bool "build tests" + +config BR2_PACKAGE_OPENCV3_BUILD_PERF_TESTS + bool "build performance tests" + +comment "3rd party support" + +config BR2_PACKAGE_OPENCV3_WITH_FFMPEG + bool "ffmpeg support" + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_AVRESAMPLE + select BR2_PACKAGE_FFMPEG_SWSCALE + help + Use ffmpeg from the target system. + +choice + prompt "gstreamer support" + help + OpenCV prefers gstreamer-1 over gstreamer-0.10. + +config BR2_PACKAGE_OPENCV3_WITHOUT_GSTREAMER + bool "none" + +config BR2_PACKAGE_OPENCV3_WITH_GSTREAMER + bool "gstreamer-0.10" + depends on BR2_USE_MMU # gstreamer -> libglib2 + depends on BR2_USE_WCHAR # gstreamer -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer -> libglib2 + select BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_GST_PLUGINS_BASE + select BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_APP + +comment "gstreamer-0.10 support needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_OPENCV3_WITH_GSTREAMER1 + bool "gstreamer-1.x" + depends on BR2_USE_MMU # gstreamer1 -> libglib2 + depends on BR2_USE_WCHAR # gstreamer1 -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # gstreamer1 -> libglib2 + select BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BASE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP + +comment "gstreamer-1.x support needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +endchoice + +config BR2_PACKAGE_OPENCV3_WITH_JASPER + bool "jpeg2000 support" + select BR2_PACKAGE_JASPER + help + Enable jpeg2000 support. + + Note: this does not use the libjasper bundled with opencv, + but uses the libjasper package installed system-wide by + Buildroot. + +config BR2_PACKAGE_OPENCV3_WITH_JPEG + bool "jpeg support" + select BR2_PACKAGE_JPEG + help + Use shared libjpeg from the target system. + +config BR2_PACKAGE_OPENCV3_WITH_PNG + bool "png support" + select BR2_PACKAGE_LIBPNG + help + Use shared libpng from the target system. + +config BR2_PACKAGE_OPENCV3_WITH_TIFF + bool "tiff support" + select BR2_PACKAGE_TIFF + help + Use shared libtiff from the target system. + +config BR2_PACKAGE_OPENCV3_WITH_V4L + bool "v4l support" + help + Enable Video 4 Linux support. + + If the package libv4l is enabled, its support is automatically enabled. + +comment "Install options" + +config BR2_PACKAGE_OPENCV3_INSTALL_DATA + bool "install extra data" + help + Install various data that is used by cv libraries and/or demo + applications, specifically for haarcascades and lbpcascades + features. + + For further information: see OpenCV documentation. + +endif # BR2_PACKAGE_OPENCV3 + +comment "opencv3 needs a toolchain w/ C++, NPTL, wchar, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || \ + !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + BR2_STATIC_LIBS diff --git a/package/opencv3/opencv3.mk b/package/opencv3/opencv3.mk new file mode 100644 index 0000000000..91cdfe6428 --- /dev/null +++ b/package/opencv3/opencv3.mk @@ -0,0 +1,364 @@ +################################################################################ +# +# opencv3 +# +################################################################################ + +OPENCV3_VERSION = 3.1.0 +OPENCV3_SITE = $(call github,itseez,opencv,$(OPENCV3_VERSION)) +OPENCV3_INSTALL_STAGING = YES +OPENCV3_LICENSE = BSD-3c +OPENCV3_LICENSE_FILES = LICENSE + +# OpenCV component options +OPENCV3_CONF_OPTS += \ + -DBUILD_DOCS=OFF \ + -DBUILD_PERF_TESTS=$(if $(BR2_PACKAGE_OPENCV3_BUILD_PERF_TESTS),ON,OFF) \ + -DBUILD_TESTS=$(if $(BR2_PACKAGE_OPENCV3_BUILD_TESTS),ON,OFF) \ + -DBUILD_WITH_DEBUG_INFO=OFF \ + -DDOWNLOAD_EXTERNAL_TEST_DATA=OFF + +ifeq ($(BR2_PACKAGE_OPENCV3_BUILD_TESTS)$(BR2_PACKAGE_OPENCV3_BUILD_PERF_TESTS),) +OPENCV3_CONF_OPTS += -DINSTALL_TEST=OFF +else +OPENCV3_CONF_OPTS += -DINSTALL_TEST=ON +endif + +# OpenCV build options +OPENCV3_CONF_OPTS += \ + -DBUILD_WITH_STATIC_CRT=OFF \ + -DENABLE_COVERAGE=OFF \ + -DENABLE_FAST_MATH=ON \ + -DENABLE_IMPL_COLLECTION=OFF \ + -DENABLE_NOISY_WARNINGS=OFF \ + -DENABLE_OMIT_FRAME_POINTER=ON \ + -DENABLE_PRECOMPILED_HEADERS=OFF \ + -DENABLE_PROFILING=OFF \ + -DOPENCV3_WARNINGS_ARE_ERRORS=OFF + +# OpenCV link options +OPENCV3_CONF_OPTS += \ + -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=OFF \ + -DCMAKE_SKIP_RPATH=OFF \ + -DCMAKE_USE_RELATIVE_PATHS=OFF + +# OpenCV packaging options: +OPENCV3_CONF_OPTS += \ + -DBUILD_PACKAGE=OFF \ + -DENABLE_SOLUTION_FOLDERS=OFF \ + -DINSTALL_CREATE_DISTRIB=OFF + +# OpenCV module selection +# * Modules on: +# - core: if not set, opencv does not build anything +# - hal: core's dependency +# * Modules off: +# - android*: android stuff +# - apps: programs for training classifiers +# - java: java bindings +# - viz: missing VTK dependency +# - world: all-in-one module +# +# * Contrib modules from [1] are disabled: +# - opencv_contrib package is not available in Buildroot; +# - OPENCV3_EXTRA_MODULES_PATH is not set. +# +# [1] https://github.com/Itseez/opencv_contrib +OPENCV3_CONF_OPTS += \ + -DBUILD_opencv_androidcamera=OFF \ + -DBUILD_opencv_apps=OFF \ + -DBUILD_opencv_calib3d=$(if $(BR2_PACKAGE_OPENCV3_LIB_CALIB3D),ON,OFF) \ + -DBUILD_opencv_core=ON \ + -DBUILD_opencv_features2d=$(if $(BR2_PACKAGE_OPENCV3_LIB_FEATURES2D),ON,OFF) \ + -DBUILD_opencv_flann=$(if $(BR2_PACKAGE_OPENCV3_LIB_FLANN),ON,OFF) \ + -DBUILD_opencv_highgui=$(if $(BR2_PACKAGE_OPENCV3_LIB_HIGHGUI),ON,OFF) \ + -DBUILD_opencv_imgcodecs=$(if $(BR2_PACKAGE_OPENCV3_LIB_IMGCODECS),ON,OFF) \ + -DBUILD_opencv_imgproc=$(if $(BR2_PACKAGE_OPENCV3_LIB_IMGPROC),ON,OFF) \ + -DBUILD_opencv_java=OFF \ + -DBUILD_opencv_ml=$(if $(BR2_PACKAGE_OPENCV3_LIB_ML),ON,OFF) \ + -DBUILD_opencv_objdetect=$(if $(BR2_PACKAGE_OPENCV3_LIB_OBJDETECT),ON,OFF) \ + -DBUILD_opencv_photo=$(if $(BR2_PACKAGE_OPENCV3_LIB_PHOTO),ON,OFF) \ + -DBUILD_opencv_shape=$(if $(BR2_PACKAGE_OPENCV3_LIB_SHAPE),ON,OFF) \ + -DBUILD_opencv_stitching=$(if $(BR2_PACKAGE_OPENCV3_LIB_STITCHING),ON,OFF) \ + -DBUILD_opencv_superres=$(if $(BR2_PACKAGE_OPENCV3_LIB_SUPERRES),ON,OFF) \ + -DBUILD_opencv_ts=$(if $(BR2_PACKAGE_OPENCV3_LIB_TS),ON,OFF) \ + -DBUILD_opencv_video=$(if $(BR2_PACKAGE_OPENCV3_LIB_VIDEO),ON,OFF) \ + -DBUILD_opencv_videoio=$(if $(BR2_PACKAGE_OPENCV3_LIB_VIDEOIO),ON,OFF) \ + -DBUILD_opencv_videostab=$(if $(BR2_PACKAGE_OPENCV3_LIB_VIDEOSTAB),ON,OFF) \ + -DBUILD_opencv_viz=OFF \ + -DBUILD_opencv_world=OFF + +# Hardware support options. +# +# * PowerPC support is turned off since its only effect is altering CFLAGS, +# adding '-mcpu=G3 -mtune=G5' to them, which is already handled by Buildroot. +# * fma3 and popcnt support is disabled because according to gcc manual [2], it +# is only available on x86_64 haswell, broadwell and knl architecture. +# +# [2] https://gcc.gnu.org/onlinedocs/gcc-5.1.0/gcc/x86-Options.html#x86-Options +OPENCV3_CONF_OPTS += \ + -DENABLE_AVX=$(if $(BR2_X86_CPU_HAS_AVX),ON,OFF) \ + -DENABLE_AVX2=$(if $(BR2_X86_CPU_HAS_AVX2),ON,OFF) \ + -DENABLE_FMA3=OFF \ + -DENABLE_POPCNT=OFF \ + -DENABLE_POWERPC=OFF \ + -DENABLE_SSE=$(if $(BR2_X86_CPU_HAS_SSE),ON,OFF) \ + -DENABLE_SSE2=$(if $(BR2_X86_CPU_HAS_SSE2),ON,OFF) \ + -DENABLE_SSE3=$(if $(BR2_X86_CPU_HAS_SSE3),ON,OFF) \ + -DENABLE_SSE41=$(if $(BR2_X86_CPU_HAS_SSE4),ON,OFF) \ + -DENABLE_SSE42=$(if $(BR2_X86_CPU_HAS_SSE42),ON,OFF) \ + -DENABLE_SSSE3=$(if $(BR2_X86_CPU_HAS_SSSE3),ON,OFF) + +# Cuda stuff +OPENCV3_CONF_OPTS += \ + -DBUILD_CUDA_STUBS=OFF \ + -DBUILD_opencv_cudaarithm=OFF \ + -DBUILD_opencv_cudabgsegm=OFF \ + -DBUILD_opencv_cudacodec=OFF \ + -DBUILD_opencv_cudafeatures2d=OFF \ + -DBUILD_opencv_cudafilters=OFF \ + -DBUILD_opencv_cudaimgproc=OFF \ + -DBUILD_opencv_cudalegacy=OFF \ + -DBUILD_opencv_cudaobjdetect=OFF \ + -DBUILD_opencv_cudaoptflow=OFF \ + -DBUILD_opencv_cudastereo=OFF \ + -DBUILD_opencv_cudawarping=OFF \ + -DBUILD_opencv_cudev=OFF \ + -DWITH_CUBLAS=OFF \ + -DWITH_CUDA=OFF \ + -DWITH_CUFFT=OFF + +# NVidia stuff +OPENCV3_CONF_OPTS += -DWITH_NVCUVID=OFF + +# AMD stuff +OPENCV3_CONF_OPTS += \ + -DWITH_OPENCLAMDBLAS=OFF \ + -DWITH_OPENCLAMDFFT=OFF + +# Intel stuff +OPENCV3_CONF_OPTS += \ + -DBUILD_WITH_DYNAMIC_IPP=OFF \ + -DWITH_INTELPERC=OFF \ + -DWITH_IPP=OFF \ + -DWITH_IPP_A=OFF \ + -DWITH_TBB=OFF + +# Smartek stuff +OPENCV3_CONF_OPTS += -DWITH_GIGEAPI=OFF + +# Prosilica stuff +OPENCV3_CONF_OPTS += -DWITH_PVAPI=OFF + +# Ximea stuff +OPENCV3_CONF_OPTS += -DWITH_XIMEA=OFF + +# Non-Linux support (Android options) must remain OFF: +OPENCV3_CONF_OPTS += \ + -DANDROID=OFF \ + -DBUILD_ANDROID_CAMERA_WRAPPER=OFF \ + -DBUILD_ANDROID_EXAMPLES=OFF \ + -DBUILD_ANDROID_SERVICE=OFF \ + -DBUILD_FAT_JAVA_LIB=OFF \ + -DINSTALL_ANDROID_EXAMPLES=OFF \ + -DWITH_ANDROID_CAMERA=OFF + +# Non-Linux support (Mac OSX options) must remain OFF: +OPENCV3_CONF_OPTS += \ + -DWITH_AVFOUNDATION=OFF \ + -DWITH_CARBON=OFF \ + -DWITH_QUICKTIME=OFF + +# Non-Linux support (Windows options) must remain OFF: +OPENCV3_CONF_OPTS += \ + -DWITH_CSTRIPES=OFF \ + -DWITH_DSHOW=OFF \ + -DWITH_MSMF=OFF \ + -DWITH_PTHREADS_PF=OFF \ + -DWITH_VFW=OFF \ + -DWITH_VIDEOINPUT=OFF \ + -DWITH_WIN32UI=OFF + +# Software/3rd-party support options: +# - disable all examples +OPENCV3_CONF_OPTS += \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_JASPER=OFF \ + -DBUILD_JPEG=OFF \ + -DBUILD_OPENEXR=OFF \ + -DBUILD_PNG=OFF \ + -DBUILD_TIFF=OFF \ + -DBUILD_ZLIB=OFF \ + -DINSTALL_C_EXAMPLES=OFF \ + -DINSTALL_PYTHON_EXAMPLES=OFF \ + -DINSTALL_TO_MANGLED_PATHS=OFF + +# Disabled features (mostly because they are not available in Buildroot), but +# - eigen: OpenCV does not use it, not take any benefit from it. +OPENCV3_CONF_OPTS += \ + -DWITH_1394=OFF \ + -DWITH_CLP=OFF \ + -DWITH_EIGEN=OFF \ + -DWITH_GDAL=OFF \ + -DWITH_GPHOTO2=OFF \ + -DWITH_MATLAB=OFF \ + -DWITH_OPENCL=OFF \ + -DWITH_OPENCL_SVM=OFF \ + -DWITH_OPENEXR=OFF \ + -DWITH_OPENNI2=OFF \ + -DWITH_OPENNI=OFF \ + -DWITH_UNICAP=OFF \ + -DWITH_VA=OFF \ + -DWITH_VA_INTEL=OFF \ + -DWITH_VTK=OFF \ + -DWITH_WEBP=OFF \ + -DWITH_XINE=OFF + +OPENCV3_DEPENDENCIES += zlib + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_FFMPEG),y) +OPENCV3_CONF_OPTS += -DWITH_FFMPEG=ON +OPENCV3_DEPENDENCIES += ffmpeg bzip2 +else +OPENCV3_CONF_OPTS += -DWITH_FFMPEG=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_GSTREAMER),y) +OPENCV3_CONF_OPTS += -DWITH_GSTREAMER_0_10=ON +OPENCV3_DEPENDENCIES += gstreamer gst-plugins-base +else +OPENCV3_CONF_OPTS += -DWITH_GSTREAMER_0_10=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_GSTREAMER1),y) +OPENCV3_CONF_OPTS += -DWITH_GSTREAMER=ON +OPENCV3_DEPENDENCIES += gstreamer1 gst1-plugins-base +else +OPENCV3_CONF_OPTS += -DWITH_GSTREAMER=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_GTK)$(BR2_PACKAGE_OPENCV3_WITH_GTK3),) +OPENCV3_CONF_OPTS += -DWITH_GTK=OFF -DWITH_GTK_2_X=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_GTK),y) +OPENCV3_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=ON +OPENCV3_DEPENDENCIES += libgtk2 +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_GTK3),y) +OPENCV3_CONF_OPTS += -DWITH_GTK=ON -DWITH_GTK_2_X=OFF +OPENCV3_DEPENDENCIES += libgtk3 +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_JASPER),y) +OPENCV3_CONF_OPTS += -DWITH_JASPER=ON +OPENCV3_DEPENDENCIES += jasper +else +OPENCV3_CONF_OPTS += -DWITH_JASPER=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_JPEG),y) +OPENCV3_CONF_OPTS += -DWITH_JPEG=ON +OPENCV3_DEPENDENCIES += jpeg +else +OPENCV3_CONF_OPTS += -DWITH_JPEG=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_OPENGL),y) +OPENCV3_CONF_OPTS += -DWITH_OPENGL=ON +OPENCV3_DEPENDENCIES += libgl +else +OPENCV3_CONF_OPTS += -DWITH_OPENGL=OFF +endif + +OPENCV3_CONF_OPTS += -DWITH_OPENMP=$(if $(BR2_GCC_ENABLE_OPENMP),ON,OFF) + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_PNG),y) +OPENCV3_CONF_OPTS += -DWITH_PNG=ON +OPENCV3_DEPENDENCIES += libpng +else +OPENCV3_CONF_OPTS += -DWITH_PNG=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_QT)$(BR2_PACKAGE_OPENCV3_WITH_QT5),) +OPENCV3_CONF_OPTS += -DWITH_QT=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_QT),y) +OPENCV3_CONF_OPTS += -DWITH_QT=4 +OPENCV3_DEPENDENCIES += qt +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_QT5),y) +OPENCV3_CONF_OPTS += -DWITH_QT=5 +OPENCV3_DEPENDENCIES += qt5base +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_TIFF),y) +OPENCV3_CONF_OPTS += -DWITH_TIFF=ON +OPENCV3_DEPENDENCIES += tiff +else +OPENCV3_CONF_OPTS += -DWITH_TIFF=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_WITH_V4L),y) +OPENCV3_CONF_OPTS += \ + -DWITH_LIBV4L=$(if $(BR2_PACKAGE_LIBV4L),ON,OFF) \ + -DWITH_V4L=ON +OPENCV3_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBV4L),libv4l) +else +OPENCV3_CONF_OPTS += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENCV3_LIB_PYTHON),y) +ifeq ($(BR2_PACKAGE_PYTHON),y) +OPENCV3_CONF_OPTS += \ + -DBUILD_opencv_python2=ON \ + -DBUILD_opencv_python3=OFF \ + -DPYTHON2_EXECUTABLE=$(HOST_DIR)/usr/bin/python2 \ + -DPYTHON2_INCLUDE_PATH=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \ + -DPYTHON2_LIBRARIES=$(STAGING_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR).so \ + -DPYTHON2_NUMPY_INCLUDE_DIRS=$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/numpy/core/include \ + -DPYTHON2_PACKAGES_PATH=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + -DPYTHON2_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION) +OPENCV3_DEPENDENCIES += python +else +OPENCV3_CONF_OPTS += \ + -DBUILD_opencv_python2=OFF \ + -DBUILD_opencv_python3=ON \ + -DPYTHON3_EXECUTABLE=$(HOST_DIR)/usr/bin/python3 \ + -DPYTHON3_INCLUDE_PATH=$(STAGING_DIR)/usr/include/python$(PYTHON3_VERSION_MAJOR)m \ + -DPYTHON3_LIBRARIES=$(STAGING_DIR)/usr/lib/libpython$(PYTHON3_VERSION_MAJOR)m.so \ + -DPYTHON3_NUMPY_INCLUDE_DIRS=$(STAGING_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/numpy/core/include \ + -DPYTHON3_PACKAGES_PATH=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages \ + -DPYTHON3_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION) +OPENCV3_DEPENDENCIES += python3 +endif +OPENCV3_DEPENDENCIES += python-numpy +else +OPENCV3_CONF_OPTS += \ + -DBUILD_opencv_python2=OFF \ + -DBUILD_opencv_python3=OFF +endif + +# Installation hooks: +define OPENCV3_CLEAN_INSTALL_DOC + $(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc +endef +OPENCV3_POST_INSTALL_TARGET_HOOKS += OPENCV3_CLEAN_INSTALL_DOC + +define OPENCV3_CLEAN_INSTALL_CMAKE + $(RM) -f $(TARGET_DIR)/usr/share/OpenCV/OpenCVConfig*.cmake +endef +OPENCV3_POST_INSTALL_TARGET_HOOKS += OPENCV3_CLEAN_INSTALL_CMAKE + +ifneq ($(BR2_PACKAGE_OPENCV3_INSTALL_DATA),y) +define OPENCV3_CLEAN_INSTALL_DATA + $(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/haarcascades \ + $(TARGET_DIR)/usr/share/OpenCV/lbpcascades +endef +OPENCV3_POST_INSTALL_TARGET_HOOKS += OPENCV3_CLEAN_INSTALL_DATA +endif + +$(eval $(cmake-package)) diff --git a/package/opengl/Config.in b/package/opengl/Config.in new file mode 100644 index 0000000000..20ee28b06e --- /dev/null +++ b/package/opengl/Config.in @@ -0,0 +1,5 @@ +source "package/opengl/libgl/Config.in" +source "package/opengl/libegl/Config.in" +source "package/opengl/libgles/Config.in" +source "package/opengl/libopenvg/Config.in" +source "package/opengl/libopenmax/Config.in" diff --git a/package/opengl/libegl/Config.in b/package/opengl/libegl/Config.in new file mode 100644 index 0000000000..8401bb22ed --- /dev/null +++ b/package/opengl/libegl/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HAS_LIBEGL + bool + +config BR2_PACKAGE_PROVIDES_LIBEGL + depends on BR2_PACKAGE_HAS_LIBEGL + string diff --git a/package/opengl/libegl/libegl.mk b/package/opengl/libegl/libegl.mk new file mode 100644 index 0000000000..1f5460e643 --- /dev/null +++ b/package/opengl/libegl/libegl.mk @@ -0,0 +1,7 @@ +################################################################################ +# +# libegl +# +################################################################################ + +$(eval $(virtual-package)) diff --git a/package/opengl/libgl/Config.in b/package/opengl/libgl/Config.in new file mode 100644 index 0000000000..8b99e5bdd3 --- /dev/null +++ b/package/opengl/libgl/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HAS_LIBGL + bool + +config BR2_PACKAGE_PROVIDES_LIBGL + depends on BR2_PACKAGE_HAS_LIBGL + string diff --git a/package/opengl/libgl/libgl.mk b/package/opengl/libgl/libgl.mk new file mode 100644 index 0000000000..7abc13d637 --- /dev/null +++ b/package/opengl/libgl/libgl.mk @@ -0,0 +1,7 @@ +################################################################################ +# +# libgl +# +################################################################################ + +$(eval $(virtual-package)) diff --git a/package/opengl/libgles/Config.in b/package/opengl/libgles/Config.in new file mode 100644 index 0000000000..b7b800f3f2 --- /dev/null +++ b/package/opengl/libgles/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HAS_LIBGLES + bool + +config BR2_PACKAGE_PROVIDES_LIBGLES + depends on BR2_PACKAGE_HAS_LIBGLES + string diff --git a/package/opengl/libgles/libgles.mk b/package/opengl/libgles/libgles.mk new file mode 100644 index 0000000000..407f8f92ba --- /dev/null +++ b/package/opengl/libgles/libgles.mk @@ -0,0 +1,7 @@ +################################################################################ +# +# libgles +# +################################################################################ + +$(eval $(virtual-package)) diff --git a/package/opengl/libopenmax/Config.in b/package/opengl/libopenmax/Config.in new file mode 100644 index 0000000000..d50f2ced1f --- /dev/null +++ b/package/opengl/libopenmax/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HAS_LIBOPENMAX + bool + +config BR2_PACKAGE_PROVIDES_LIBOPENMAX + depends on BR2_PACKAGE_HAS_LIBOPENMAX + string diff --git a/package/opengl/libopenmax/libopenmax.mk b/package/opengl/libopenmax/libopenmax.mk new file mode 100644 index 0000000000..bc2e7f88e4 --- /dev/null +++ b/package/opengl/libopenmax/libopenmax.mk @@ -0,0 +1,7 @@ +################################################################################ +# +# libopenmax +# +################################################################################ + +$(eval $(virtual-package)) diff --git a/package/opengl/libopenvg/Config.in b/package/opengl/libopenvg/Config.in new file mode 100644 index 0000000000..53cde6a88c --- /dev/null +++ b/package/opengl/libopenvg/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HAS_LIBOPENVG + bool + +config BR2_PACKAGE_PROVIDES_LIBOPENVG + depends on BR2_PACKAGE_HAS_LIBOPENVG + string diff --git a/package/opengl/libopenvg/libopenvg.mk b/package/opengl/libopenvg/libopenvg.mk new file mode 100644 index 0000000000..3ce85a1637 --- /dev/null +++ b/package/opengl/libopenvg/libopenvg.mk @@ -0,0 +1,7 @@ +################################################################################ +# +# libopenvg +# +################################################################################ + +$(eval $(virtual-package)) diff --git a/package/opengl/opengl.mk b/package/opengl/opengl.mk new file mode 100644 index 0000000000..abf96d5c70 --- /dev/null +++ b/package/opengl/opengl.mk @@ -0,0 +1 @@ +include $(sort $(wildcard package/opengl/*/*.mk)) diff --git a/package/openipmi/0001-Avoid-searching-host-library-path.patch b/package/openipmi/0001-Avoid-searching-host-library-path.patch new file mode 100644 index 0000000000..9a51d97e27 --- /dev/null +++ b/package/openipmi/0001-Avoid-searching-host-library-path.patch @@ -0,0 +1,52 @@ +From ca6e99d9fa4bf503a883407e964eaad5e18d51c7 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Wed, 22 Jul 2015 07:04:33 +0300 +Subject: [PATCH] Avoid searching host library path + +The $(libdir) variable points to the location of the directory on the target +system, /usr/lib by default. When cross compiling this directory contains the +host libraries which may be different than target libraries. Don't use +$(libdir) in the library search path. + +Signed-off-by: Baruch Siach +--- + cmdlang/Makefile.am | 2 +- + unix/Makefile.am | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/cmdlang/Makefile.am b/cmdlang/Makefile.am +index e80090dd0c6f..b59ff244b9a8 100644 +--- a/cmdlang/Makefile.am ++++ b/cmdlang/Makefile.am +@@ -16,7 +16,7 @@ libOpenIPMIcmdlang_la_LIBADD = -lm \ + $(top_builddir)/utils/libOpenIPMIutils.la \ + $(top_builddir)/lib/libOpenIPMI.la + libOpenIPMIcmdlang_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \ +- -Wl,-Map -Wl,libOpenIPMIcmdlang.map -L$(libdir) ++ -Wl,-Map -Wl,libOpenIPMIcmdlang.map + + bin_PROGRAMS = openipmish + +diff --git a/unix/Makefile.am b/unix/Makefile.am +index a7921477e1c4..a108bc679c9a 100644 +--- a/unix/Makefile.am ++++ b/unix/Makefile.am +@@ -11,13 +11,13 @@ libOpenIPMIpthread_la_SOURCES = posix_thread_os_hnd.c selector.c + libOpenIPMIpthread_la_LIBADD = -lpthread $(GDBM_LIB) \ + $(top_builddir)/utils/libOpenIPMIutils.la + libOpenIPMIpthread_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \ +- -Wl,-Map -Wl,libOpenIPMIpthread.map -L$(libdir) ++ -Wl,-Map -Wl,libOpenIPMIpthread.map + + libOpenIPMIposix_la_SOURCES = posix_os_hnd.c selector.c + libOpenIPMIposix_la_LIBADD = $(top_builddir)/utils/libOpenIPMIutils.la \ + $(GDBM_LIB) + libOpenIPMIposix_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \ +- -Wl,-Map -Wl,libOpenIPMIposix.map -L$(libdir) ++ -Wl,-Map -Wl,libOpenIPMIposix.map + + noinst_HEADERS = heap.h + +-- +2.1.4 + diff --git a/package/openipmi/0002-configure.ac-detect-lrt-requirement-for-clock_gettim.patch b/package/openipmi/0002-configure.ac-detect-lrt-requirement-for-clock_gettim.patch new file mode 100644 index 0000000000..d58ffd7caf --- /dev/null +++ b/package/openipmi/0002-configure.ac-detect-lrt-requirement-for-clock_gettim.patch @@ -0,0 +1,57 @@ +From d3be03464be7fa3844dfe0837a7e2c920c107836 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Thu, 23 Jul 2015 13:35:35 +0300 +Subject: [PATCH] configure.ac: detect -lrt requirement for clock_gettime + +glibc versions before 2.17 require link with -lrt. + +Upstream status: sent, stuck in moderator's queue + +Signed-off-by: Baruch Siach +--- + configure.ac | 8 ++++++++ + unix/Makefile.am | 4 ++-- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 18401f161d45..6b350a41a916 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -854,6 +854,14 @@ OPENIPMI_SWIG_SO="${PYTHON_POSIX_SO}:\$(top_builddir)/lib/.libs/libOpenIPMI.so:\ + AC_SUBST(OPENIPMI_SWIG_LIBS) + AC_SUBST(OPENIPMI_SWIG_SO) + ++LIB_CLOCK_GETTIME= ++clk_saved_libs=$LIBS ++AC_SEARCH_LIBS([clock_gettime], [rt], ++ [test "$ac_cv_search_clock_gettime" = "none required" || ++ LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime]) ++AC_SUBST([LIB_CLOCK_GETTIME]) ++LIBS=$clk_saved_libs ++ + # Everything from here to AC_OUTPUT is for libedit + + # AC_PROG_LIBTOOL runs AC_CANONICAL_HOST +diff --git a/unix/Makefile.am b/unix/Makefile.am +index a108bc679c9a..fb60242d5d3b 100644 +--- a/unix/Makefile.am ++++ b/unix/Makefile.am +@@ -9,13 +9,13 @@ lib_LTLIBRARIES = libOpenIPMIposix.la libOpenIPMIpthread.la + + libOpenIPMIpthread_la_SOURCES = posix_thread_os_hnd.c selector.c + libOpenIPMIpthread_la_LIBADD = -lpthread $(GDBM_LIB) \ +- $(top_builddir)/utils/libOpenIPMIutils.la ++ $(top_builddir)/utils/libOpenIPMIutils.la $(LIB_CLOCK_GETTIME) + libOpenIPMIpthread_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \ + -Wl,-Map -Wl,libOpenIPMIpthread.map + + libOpenIPMIposix_la_SOURCES = posix_os_hnd.c selector.c + libOpenIPMIposix_la_LIBADD = $(top_builddir)/utils/libOpenIPMIutils.la \ +- $(GDBM_LIB) ++ $(GDBM_LIB) $(LIB_CLOCK_GETTIME) + libOpenIPMIposix_la_LDFLAGS = -rdynamic -version-info $(LD_VERSION) \ + -Wl,-Map -Wl,libOpenIPMIposix.map + +-- +2.1.4 + diff --git a/package/openipmi/Config.in b/package/openipmi/Config.in new file mode 100644 index 0000000000..da886578f8 --- /dev/null +++ b/package/openipmi/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_OPENIPMI + bool "openipmi" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # dlopen() + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_POPT + select BR2_PACKAGE_NCURSES + help + IPMI allows remote monitoring and remote management of + devices. OpenIPMI provides a library and command line tools + to interact with IPMI enabled devices. OpenIPMI also provides + an IPMI BMC simulator. + + http://openipmi.sourceforge.net + +comment "openipmi needs a toolchain w/ dynamic library, threads" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/openipmi/openipmi.hash b/package/openipmi/openipmi.hash new file mode 100644 index 0000000000..e6fafe48ab --- /dev/null +++ b/package/openipmi/openipmi.hash @@ -0,0 +1,4 @@ +# From http://sourceforge.net/projects/openipmi/files/OpenIPMI%202.0%20Library/ +sha1 54f63ab7fe09f6a4b0b718601fe9c61014aa220b OpenIPMI-2.0.21.tar.gz +# Locally computed +sha256 0eafaa502ccf752899c5089159574081067d0c4ac53ea0ace33a5087f33ea32a 0001-ui-use-standard-uint32_t.patch diff --git a/package/openipmi/openipmi.mk b/package/openipmi/openipmi.mk new file mode 100644 index 0000000000..ea46e191da --- /dev/null +++ b/package/openipmi/openipmi.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# openipmi +# +################################################################################ + +OPENIPMI_VERSION = 2.0.21 +OPENIPMI_SITE = http://sourceforge.net/projects/openipmi/files/OpenIPMI%202.0%20Library +OPENIPMI_SOURCE = OpenIPMI-2.0.21.tar.gz +OPENIPMI_PATCH = \ + http://sourceforge.net/p/openipmi/patches/26/attachment/0001-ui-use-standard-uint32_t.patch +OPENIPMI_LICENSE = LGPLv2+, GPLv2+, BSD-3c +OPENIPMI_LICENSE_FILES = COPYING.LIB COPYING COPYING.BSD +OPENIPMI_DEPENDENCIES = popt ncurses host-pkgconf +# Patching Makefile.am +OPENIPMI_AUTORECONF = YES +OPENIPMI_CONF_ENV = ac_cv_path_pkgprog="$(PKG_CONFIG_HOST_BINARY)" +OPENIPMI_CONF_OPTS = \ + --with-glib=no \ + --with-glib12=no \ + --with-tcl=no \ + --with-perl=no \ + --with-python=no \ + --with-swig=no + +ifeq ($(BR2_PACKAGE_GDBM),y) +OPENIPMI_DEPENDENCIES += gdbm +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +OPENIPMI_DEPENDENCIES += openssl +OPENIPMI_CONF_OPTS += --with-openssl=yes +else +OPENIPMI_CONF_OPTS += --with-openssl=no +endif + +ifeq ($(BR2_PACKAGE_NETSNMP),y) +OPENIPMI_DEPENDENCIES += netsnmp +OPENIPMI_CONF_OPTS += --with-ucdsnmp=yes +else +OPENIPMI_CONF_OPTS += --with-ucdsnmp=no +endif + +$(eval $(autotools-package)) diff --git a/package/openjpeg/Config.in b/package/openjpeg/Config.in new file mode 100644 index 0000000000..738999fed7 --- /dev/null +++ b/package/openjpeg/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_OPENJPEG + bool "openjpeg" + help + The OpenJPEG library is an open-source JPEG 2000 codec + written in C. + + http://www.openjpeg.org diff --git a/package/openjpeg/openjpeg.hash b/package/openjpeg/openjpeg.hash new file mode 100644 index 0000000000..a8695c102c --- /dev/null +++ b/package/openjpeg/openjpeg.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 15df7b194a5d8dba0052cd21c17a4dc761149a770a907d73fffb972078c28a87 openjpeg-1.5.2.tar.gz diff --git a/package/openjpeg/openjpeg.mk b/package/openjpeg/openjpeg.mk new file mode 100644 index 0000000000..c613ba817e --- /dev/null +++ b/package/openjpeg/openjpeg.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# openjpeg +# +################################################################################ + +OPENJPEG_VERSION = 1.5.2 +OPENJPEG_SITE = http://downloads.sourceforge.net/project/openjpeg.mirror/$(OPENJPEG_VERSION) +OPENJPEG_LICENSE = BSD-2c +OPENJPEG_LICENSE_FILES = LICENSE +# tarball does not contain the generated files +OPENJPEG_AUTORECONF = YES +OPENJPEG_INSTALL_STAGING = YES +OPENJPEG_DEPENDENCIES = host-pkgconf +OPENJPEG_CONF_OPTS = --disable-lcms1 + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +OPENJPEG_DEPENDENCIES += libpng +OPENJPEG_CONF_OPTS += --enable-png +else +OPENJPEG_CONF_OPTS += --disable-png +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) +OPENJPEG_DEPENDENCIES += tiff +OPENJPEG_CONF_OPTS += --enable-tiff +else +OPENJPEG_CONF_OPTS += --disable-tiff +endif + +ifeq ($(BR2_PACKAGE_LCMS2),y) +OPENJPEG_DEPENDENCIES += lcms2 +OPENJPEG_CONF_OPTS += --enable-lcms2 +else +OPENJPEG_CONF_OPTS += --disable-lcms2 +endif + +$(eval $(autotools-package)) diff --git a/package/openldap/0001-fix_cross_strip.patch b/package/openldap/0001-fix_cross_strip.patch new file mode 100644 index 0000000000..ed4964e44b --- /dev/null +++ b/package/openldap/0001-fix_cross_strip.patch @@ -0,0 +1,74 @@ +Fix stripping when cross-compiling + +Probably-Signed-off-by: Dave Bender +[yann.morin.1998@free.fr: patch was made by Dave, but he + forgot his SoB line, so I added it] +Signed-off-by: "Yann E. MORIN" + +diff -rupN openldap-2.4.40/build/shtool openldap-2.4.40-br/build/shtool +--- openldap-2.4.40/build/shtool 2014-09-18 21:48:49.000000000 -0400 ++++ openldap-2.4.40-br/build/shtool 2015-01-21 13:21:35.689829372 -0500 +@@ -981,7 +981,7 @@ install ) + if [ ".$opt_t" = .yes ]; then + echo "strip $dsttmp" 1>&2 + fi +- strip $dsttmp || shtool_exit $? ++ $STRIP $dsttmp || shtool_exit $? + fi + if [ ".$opt_o" != . ]; then + if [ ".$opt_t" = .yes ]; then +diff -rupN openldap-2.4.40/build/top.mk openldap-2.4.40-br/build/top.mk +--- openldap-2.4.40/build/top.mk 2014-09-18 21:48:49.000000000 -0400 ++++ openldap-2.4.40-br/build/top.mk 2015-01-21 13:23:41.027810097 -0500 +@@ -59,7 +59,7 @@ INSTALL_PROGRAM = $(INSTALL) + INSTALL_DATA = $(INSTALL) -m 644 + INSTALL_SCRIPT = $(INSTALL) + +-STRIP = -s ++STRIP_OPTS = -s + + LINT = lint + 5LINT = 5lint +diff -rupN openldap-2.4.40/clients/tools/Makefile.in openldap-2.4.40-br/clients/tools/Makefile.in +--- openldap-2.4.40/clients/tools/Makefile.in 2014-09-18 21:48:49.000000000 -0400 ++++ openldap-2.4.40-br/clients/tools/Makefile.in 2015-01-21 13:23:35.827727946 -0500 +@@ -120,7 +120,7 @@ install-local: FORCE + -$(MKDIR) $(DESTDIR)$(bindir) + @( \ + for prg in $(PROGRAMS); do \ +- $(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 $$prg$(EXEEXT) \ ++ $(LTINSTALL) $(INSTALLFLAGS) $(STRIP_OPTS) -m 755 $$prg$(EXEEXT) \ + $(DESTDIR)$(bindir); \ + done \ + ) +diff -rupN openldap-2.4.40/configure.in openldap-2.4.40-br/configure.in +--- openldap-2.4.40/configure.in 2014-09-18 21:48:49.000000000 -0400 ++++ openldap-2.4.40-br/configure.in 2015-01-16 15:50:48.874816786 -0500 +@@ -669,6 +669,15 @@ if test -z "${AR}"; then + fi + fi + ++if test -z "${STRIP}"; then ++ AC_CHECK_PROGS(STRIP,strip,missing) ++ ++ if test "${STRIP}" = "missing" ; then ++ AC_MSG_ERROR([Unable to locate strip(1) or suitable replacement. Check PATH or set STRIP.]) ++ fi ++fi ++ ++ + AC_LIBTOOL_WIN32_DLL + AC_LIBTOOL_DLOPEN + AC_PROG_LIBTOOL +diff -rupN openldap-2.4.40/servers/slapd/Makefile.in openldap-2.4.40-br/servers/slapd/Makefile.in +--- openldap-2.4.40/servers/slapd/Makefile.in 2015-01-16 15:04:52.507473256 -0500 ++++ openldap-2.4.40-br/servers/slapd/Makefile.in 2015-01-16 15:05:02.299627229 -0500 +@@ -378,7 +378,7 @@ install-local-srv: install-slapd install + install-slapd: FORCE + -$(MKDIR) $(DESTDIR)$(libexecdir) + -$(MKDIR) $(DESTDIR)$(localstatedir)/run +- $(LTINSTALL) $(INSTALLFLAGS) $(STRIP) -m 755 \ ++ $(LTINSTALL) $(INSTALLFLAGS) $(STRIP_OPTS) -m 755 \ + slapd$(EXEEXT) $(DESTDIR)$(libexecdir) + @for i in $(SUBDIRS); do \ + if test -d $$i && test -f $$i/Makefile ; then \ diff --git a/package/openldap/0002-fix-bignum.patch b/package/openldap/0002-fix-bignum.patch new file mode 100644 index 0000000000..d3dc88fc37 --- /dev/null +++ b/package/openldap/0002-fix-bignum.patch @@ -0,0 +1,38 @@ +configure: correctly detect bignum + +Building with bignum is currently not possible, since we're checking +ol_with_tls against a value it is never assigned in any case. + +Since bignum is from openssl, and openssl is the preferred TLS +implementation, if the bignum headers are found, it means we do have +TLS and it is opensl. + +So, keep the check for the bignum header, but check against ol_link_tls +which means that openssl is enabled when we find the bignum headers. + +Signed-off-by: "Yann E. MORIN" + +diff -durN openldap-2.4.40.orig/configure openldap-2.4.40/configure +--- openldap-2.4.40.orig/configure 2014-09-19 03:48:49.000000000 +0200 ++++ openldap-2.4.40/configure 2015-01-25 18:44:54.216879362 +0100 +@@ -23478,7 +23478,7 @@ + + if test "$ac_cv_header_openssl_bn_h" = "yes" && + test "$ac_cv_header_openssl_crypto_h" = "yes" && +- test "$ol_with_tls" = "found" ; then ++ test "$ol_link_tls" = "yes" ; then + ol_with_mp=bignum + + $as_echo "#define USE_MP_BIGNUM 1" >>confdefs.h +diff -durN openldap-2.4.40.orig/configure.in openldap-2.4.40/configure.in +--- openldap-2.4.40.orig/configure.in 2014-09-19 03:48:49.000000000 +0200 ++++ openldap-2.4.40/configure.in 2015-01-25 18:44:37.628676446 +0100 +@@ -2367,7 +2367,7 @@ + AC_CHECK_HEADERS(openssl/crypto.h) + if test "$ac_cv_header_openssl_bn_h" = "yes" && + test "$ac_cv_header_openssl_crypto_h" = "yes" && +- test "$ol_with_tls" = "found" ; then ++ test "$ol_link_tls" = "yes" ; then + ol_with_mp=bignum + AC_DEFINE(USE_MP_BIGNUM,1,[define to use OpenSSL BIGNUM for MP]) + elif test $ol_with_mp = bignum ; then diff --git a/package/openldap/0003-disable-docs.patch b/package/openldap/0003-disable-docs.patch new file mode 100644 index 0000000000..7ce61e6526 --- /dev/null +++ b/package/openldap/0003-disable-docs.patch @@ -0,0 +1,23 @@ +doc: do not build + +Building the documentation fails on some autobuilders, +so disable it as we're not interested in it. + +Fixes: + http://autobuild.buildroot.org/results/1dc/1dc17a54e57130bffd19d360c9a7faae440b8916/ + http://autobuild.buildroot.org/results/407/40797597024cbb9054fdda8bdf4d011bba966b06/ + +Signed-off-by: "Yann E. MORIN" + +diff -durN openldap-2.4.40.orig/Makefile.in openldap-2.4.40/Makefile.in +--- openldap-2.4.40.orig/Makefile.in 2014-09-19 03:48:49.000000000 +0200 ++++ openldap-2.4.40/Makefile.in 2015-01-31 23:12:54.347678913 +0100 +@@ -13,7 +13,7 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + +-SUBDIRS= include libraries clients servers tests doc ++SUBDIRS= include libraries clients servers tests + CLEANDIRS= + INSTALLDIRS= + diff --git a/package/openldap/Config.in b/package/openldap/Config.in new file mode 100644 index 0000000000..3085a5c87e --- /dev/null +++ b/package/openldap/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_OPENLDAP + bool "openldap" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # needs fork() + help + OpenLDAP Software is an open source implementation of + the Lightweight Directory Access Protocol. + + This only installs client-side support. + + http://www.openldap.org/ + +if BR2_PACKAGE_OPENLDAP + +config BR2_PACKAGE_OPENLDAP_CLIENTS + bool "openldap client binaries" + default y + help + Install the OpenLDAP client tools (ldapadd, ldapcompare, ldapdelete, + ldapexop, ldapmodify, ldapmodrdn, ldappasswd, ldapsearch, ldapurl, + ldapwhoami) + +endif + +comment "openldap needs a toolchain w/ wchar" + depends on BR2_USE_MMU # needs fork() + depends on !BR2_USE_WCHAR diff --git a/package/openldap/openldap.hash b/package/openldap/openldap.hash new file mode 100644 index 0000000000..785c4897f5 --- /dev/null +++ b/package/openldap/openldap.hash @@ -0,0 +1,4 @@ +# From http://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.44.md5 +md5 693ac26de86231f8dcae2b4e9d768e51 openldap-2.4.44.tgz +# From http://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.44.sha1 +sha1 016a738d050a68d388602a74b5e991035cdba149 openldap-2.4.44.tgz diff --git a/package/openldap/openldap.mk b/package/openldap/openldap.mk new file mode 100644 index 0000000000..2f738e51de --- /dev/null +++ b/package/openldap/openldap.mk @@ -0,0 +1,72 @@ +################################################################################ +# +# openldap +# +################################################################################ + +OPENLDAP_VERSION = 2.4.44 +OPENLDAP_SOURCE = openldap-$(OPENLDAP_VERSION).tgz +OPENLDAP_SITE = http://www.openldap.org/software/download/OpenLDAP/openldap-release +OPENLDAP_LICENSE = OpenLDAP Public License +OPENLDAP_LICENSE_FILES = LICENSE +OPENLDAP_INSTALL_STAGING = YES +OPENLDAP_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +OPENLDAP_TLS = openssl +OPENLDAP_DEPENDENCIES += openssl +else ifeq ($(BR2_PACKAGE_GNUTLS),y) +OPENLDAP_TLS = gnutls +OPENLDAP_DEPENDENCIES += gnutls +else ifeq ($(BR2_PACKAGE_LIBNSS),y) +OPENLDAP_TLS = moznss +OPENLDAP_DEPENDENCIES += libnss +OPENLDAP_CPPFLAGS = \ + -I$(STAGING_DIR)/usr/include/nss \ + -I$(STAGING_DIR)/usr/include/nspr +else +OPENLDAP_TLS = no +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +OPENLDAP_MP = bignum +OPENLDAP_DEPENDENCIES += openssl +OPENLDAP_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`" +else ifeq ($(BR2_PACKAGE_GMP),y) +OPENLDAP_MP = gmp +OPENLDAP_DEPENDENCIES += gmp +else +OPENLDAP_MP = longlong +endif + +OPENLDAP_CONF_ENV += ac_cv_func_memcmp_working=yes + +OPENLDAP_CONF_OPTS += \ + --enable-syslog \ + --disable-proctitle \ + --disable-slapd \ + --with-yielding-select \ + --sysconfdir=/etc \ + --enable-dynamic=$(if $(BR2_STATIC_LIBS),no,yes) \ + --with-tls=$(OPENLDAP_TLS) \ + --with-mp=$(OPENLDAP_MP) \ + CPPFLAGS="$(TARGET_CPPFLAGS) $(OPENLDAP_CPPFLAGS)" + +# Somehow, ${STRIP} does not percolates through to the shtool script +# used to install the executables; thus, that script tries to run the +# executable it is supposed to install, resulting in an error. +OPENLDAP_MAKE_ENV = STRIP="$(TARGET_STRIP)" + +ifeq ($(BR2_PACKAGE_OPENLDAP_CLIENTS),) +OPENLDAP_CLIENTS = \ + ldapurl ldapexop ldapcompare ldapwhoami \ + ldappasswd ldapmodrdn ldapdelete ldapmodify \ + ldapsearch +define OPENLDAP_REMOVE_CLIENTS + $(RM) -f $(foreach p,$(OPENLDAP_CLIENTS),$(TARGET_DIR)/usr/bin/$(p)) + $(RM) -rf $(TARGET_DIR)/etc/openldap +endef +OPENLDAP_POST_INSTALL_TARGET_HOOKS += OPENLDAP_REMOVE_CLIENTS +endif + +$(eval $(autotools-package)) diff --git a/package/openntpd/Config.in b/package/openntpd/Config.in new file mode 100644 index 0000000000..1433b0979a --- /dev/null +++ b/package/openntpd/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_OPENNTPD + bool "openntpd" + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_USE_MMU # fork () + depends on !BR2_PACKAGE_NTP # conflicting binaries + help + OpenNTPD is an easy to use implementation of the Network Time + Protocol. It provides the ability to sync the local clock + to remote NTP servers and can act as NTP server itself, + redistributing the local clock. It just works. + + http://www.openntpd.org/ + +comment "openntpd needs a toolchain w/ NPTL" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL diff --git a/package/openntpd/S49ntp b/package/openntpd/S49ntp new file mode 100755 index 0000000000..c211ac835e --- /dev/null +++ b/package/openntpd/S49ntp @@ -0,0 +1,25 @@ +#!/bin/sh + +[ -x /usr/sbin/ntpd ] || exit 0 +[ -f /etc/ntpd.conf ] || exit 0 + +case "$1" in + start) + printf "Starting openntpd: " + start-stop-daemon -S -x /usr/sbin/ntpd -- -s -p /run/ntpd.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping openntpd: " + start-stop-daemon -K -q -p /run/ntpd.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart) + "$0" stop + sleep 1 + "$0" start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + ;; +esac diff --git a/package/openntpd/ntpd.service b/package/openntpd/ntpd.service new file mode 100644 index 0000000000..a4ffa7318c --- /dev/null +++ b/package/openntpd/ntpd.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenNTP Daemon +After=network.target +Conflicts=systemd-timesyncd.service + +[Service] +Type=simple +ExecStart=/usr/sbin/ntpd -s -d + +[Install] +WantedBy=multi-user.target diff --git a/package/openntpd/openntpd.hash b/package/openntpd/openntpd.hash new file mode 100644 index 0000000000..e066904cfd --- /dev/null +++ b/package/openntpd/openntpd.hash @@ -0,0 +1,2 @@ +# From ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/SHA256 +sha256 a993d95976e375acc0ab1a677fd268f55024477835633c8ae404895046bccb23 openntpd-5.7p4.tar.gz diff --git a/package/openntpd/openntpd.mk b/package/openntpd/openntpd.mk new file mode 100644 index 0000000000..40bb1bf7e0 --- /dev/null +++ b/package/openntpd/openntpd.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# openntpd +# +################################################################################ + +OPENNTPD_VERSION = 5.7p4 +OPENNTPD_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenNTPD +OPENNTPD_LICENSE = MIT-like, BSD-2c, BSD-3c +OPENNTPD_LICENSE_FILES = COPYING + +# openntpd uses pthread functions for arc4random emulation but forgets +# to use -pthread +OPENNTPD_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -pthread" + +define OPENNTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/openntpd/ntpd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/ntpd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/ntpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ntpd.service +endef + +define OPENNTPD_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/openntpd/S49ntp \ + $(TARGET_DIR)/etc/init.d/S49ntp +endef + +define OPENNTPD_USERS + _ntp -1 _ntp -1 * - - - Network Time Protocol daemon +endef + +$(eval $(autotools-package)) diff --git a/package/openobex/0001-libusb_check_when_cross-compiling.patch b/package/openobex/0001-libusb_check_when_cross-compiling.patch new file mode 100644 index 0000000000..7b8056afcc --- /dev/null +++ b/package/openobex/0001-libusb_check_when_cross-compiling.patch @@ -0,0 +1,18 @@ +Fix libusb check when cross-compiling. + +Signed-off-by: Julien Boibessot +Signed-off-by: Samuel Martin + +Index: openobex-1.5/acinclude.m4 +=================================================================== +--- openobex-1.5.orig/acinclude.m4 2010-06-16 10:32:47.000000000 +0200 ++++ openobex-1.5/acinclude.m4 2010-06-16 10:35:33.000000000 +0200 +@@ -158,7 +158,7 @@ + ;; + *) + PKG_CHECK_MODULES(USB, libusb, usb_lib_found=yes, AC_MSG_RESULT(no)) +- AC_CHECK_FILE(${prefix}/lib/pkgconfig/libusb.pc, REQUIRES="libusb") ++ REQUIRES="libusb" + ;; + esac + AC_SUBST(USB_CFLAGS) diff --git a/package/openobex/0002-replace_deprecated_functions.patch b/package/openobex/0002-replace_deprecated_functions.patch new file mode 100644 index 0000000000..17274d385b --- /dev/null +++ b/package/openobex/0002-replace_deprecated_functions.patch @@ -0,0 +1,30 @@ +obex_test_cable.c: avoid to use SuSv3 LEGACY APIs + +Signed-off-by: Julien Boibessot +Signed-off-by: Samuel Martin + +Index: openobex-1.5/apps/obex_test_cable.c +=================================================================== +--- openobex-1.5.orig/apps/obex_test_cable.c 2009-02-08 19:30:22.000000000 +0100 ++++ openobex-1.5/apps/obex_test_cable.c 2010-06-16 11:11:05.000000000 +0200 +@@ -113,9 +113,9 @@ + if(total == sizeof(tmpbuf)) + return -1; + +- if( (answer = index(tmpbuf, '\n')) ) { ++ if( (answer = strchr(tmpbuf, '\n')) ) { + // Remove first line (echo) +- if( (answer_end = index(answer+1, '\n')) ) { ++ if( (answer_end = strchr(answer+1, '\n')) ) { + // Found end of answer + done = 1; + } +@@ -178,7 +178,7 @@ + } + + tcgetattr(gt->ttyfd, >->oldtio); +- bzero(>->newtio, sizeof(struct termios)); ++ memset(>->newtio, 0, sizeof(struct termios)); + gt->newtio.c_cflag = B115200 | CS8 | CREAD | CRTSCTS; + gt->newtio.c_iflag = IGNPAR; + gt->newtio.c_oflag = 0; diff --git a/package/openobex/Config.in b/package/openobex/Config.in new file mode 100644 index 0000000000..ed1b81fe42 --- /dev/null +++ b/package/openobex/Config.in @@ -0,0 +1,43 @@ +config BR2_PACKAGE_OPENOBEX + bool "openobex" + help + Free open source implementation of the Object Exchange (OBEX) + protocol. + + http://sourceforge.net/projects/openobex + +if BR2_PACKAGE_OPENOBEX + +config BR2_PACKAGE_OPENOBEX_BLUEZ + bool "enable bluez support" + depends on !BR2_STATIC_LIBS # bluez_utils + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib, libglib2 + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_BLUEZ_UTILS + +comment "bluez support needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_OPENOBEX_LIBUSB + bool "enable libusb support" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + +comment "libusb support needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_OPENOBEX_APPS + bool "install test applications" + help + Also install the openobex test applications on target. + +config BR2_PACKAGE_OPENOBEX_SYSLOG + bool "enable debugging to the system logger" + +config BR2_PACKAGE_OPENOBEX_DUMP + bool "enable protocol dumping for debugging" + +endif diff --git a/package/openobex/openobex.hash b/package/openobex/openobex.hash new file mode 100644 index 0000000000..2aef98194b --- /dev/null +++ b/package/openobex/openobex.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/openobex/files/openobex/1.5/ +sha1 5332ef95bc8b321bda675cdb74379804c6c1a83f openobex-1.5.0-Source.zip +md5 f6d87af55a1d702d582173c81619176e openobex-1.5.0-Source.zip diff --git a/package/openobex/openobex.mk b/package/openobex/openobex.mk new file mode 100644 index 0000000000..6a1a10ba4f --- /dev/null +++ b/package/openobex/openobex.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# openobex +# +################################################################################ + +OPENOBEX_VERSION_MAJOR = 1.5 +OPENOBEX_VERSION = $(OPENOBEX_VERSION_MAJOR).0 +OPENOBEX_SITE = http://downloads.sourceforge.net/project/openobex/openobex/$(OPENOBEX_VERSION_MAJOR) +OPENOBEX_SOURCE = openobex-$(OPENOBEX_VERSION)-Source.zip +# Libraries seems to be released under LGPLv2.1+, +# while other material is under GPLv2+. +OPENOBEX_LICENSE = GPLv2+/LGPLv2.1+ +OPENOBEX_LICENSE_FILES = COPYING COPYING.LIB + +OPENOBEX_DEPENDENCIES = host-pkgconf +OPENOBEX_AUTORECONF = YES +OPENOBEX_INSTALL_STAGING = YES + +define OPENOBEX_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(DL_DIR)/$(OPENOBEX_SOURCE) + mv $(@D)/openobex-$(OPENOBEX_VERSION)-Source/* $(@D) + $(RM) -r $(@D)/openobex-$(OPENOBEX_VERSION)-Source +endef + +OPENOBEX_CONF_OPTS += \ + $(if $(BR2_PACKAGE_OPENOBEX_APPS),--enable-apps) \ + $(if $(BR2_PACKAGE_OPENOBEX_SYSLOG),--enable-syslog) \ + $(if $(BR2_PACKAGE_OPENOBEX_DUMP),--enable-dump) + +ifeq ($(BR2_PACKAGE_OPENOBEX_BLUEZ),y) +OPENOBEX_DEPENDENCIES += bluez_utils +OPENOBEX_CONF_OPTS += --with-bluez=$(STAGING_DIR) +else +OPENOBEX_CONF_OPTS += --disable-bluetooth +endif + +ifeq ($(BR2_PACKAGE_OPENOBEX_LIBUSB),y) +OPENOBEX_DEPENDENCIES += libusb-compat +OPENOBEX_CONF_OPTS += --with-usb=$(STAGING_DIR) +else +OPENOBEX_CONF_OPTS += --disable-usb +endif + +$(eval $(autotools-package)) diff --git a/package/openocd/0002-Fix-jimtcl-auto-configuration-to-force-static-librar.patch b/package/openocd/0002-Fix-jimtcl-auto-configuration-to-force-static-librar.patch new file mode 100644 index 0000000000..fd3cfa469a --- /dev/null +++ b/package/openocd/0002-Fix-jimtcl-auto-configuration-to-force-static-librar.patch @@ -0,0 +1,27 @@ +From 3bef159779c8fd39a070ec5c8191e18ba2efa79d Mon Sep 17 00:00:00 2001 +From: Claudio Laurita +Date: Sun, 30 Nov 2014 18:21:58 +0100 +Subject: [PATCH 2/2] Fix jimtcl auto configuration to force static library + only. jimtcl ignores a --disable-shared option if a previous --enable-shared + option was given. This breaks openocd compilation if shared was the preferred + option in buildroot project. + +Signed-off-by: Claudio Laurita + +--- a/jimtcl/auto.def ++++ b/jimtcl/auto.def +@@ -194,12 +194,8 @@ + msg-result "Enabling references" + define JIM_REFERENCES + } +-if {[opt-bool shared with-jim-shared]} { +- msg-result "Building shared library" +-} else { +- msg-result "Building static library" +- define JIM_STATICLIB +-} ++msg-result "Building static library" ++define JIM_STATICLIB + define LIBSOEXT [format [get-define SH_SOEXTVER] [format %.2f [expr {[get-define JIM_VERSION] / 100.0}]]] + define JIM_INSTALL [opt-bool install-jim] + define JIM_DOCS [opt-bool docs] diff --git a/package/openocd/Config.in b/package/openocd/Config.in new file mode 100644 index 0000000000..231367154e --- /dev/null +++ b/package/openocd/Config.in @@ -0,0 +1,214 @@ +config BR2_PACKAGE_OPENOCD + bool "openocd" + help + OpenOCD - Open On-Chip Debugger + + http://openocd.sourceforge.net/ + +if BR2_PACKAGE_OPENOCD + +comment "Adapters" + +config BR2_PACKAGE_OPENOCD_FTDI + bool "MPSSE mode of FTDI based devices" + select BR2_PACKAGE_LIBUSB + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + help + Enable building support for the MPSSE mode of FTDI + (FT2xxx/FT4xxx) based devices (default is auto) + +config BR2_PACKAGE_OPENOCD_STLINK + bool "ST-Link JTAG Programmer" + select BR2_PACKAGE_LIBUSB + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + help + Enable building support for the ST-Link JTAG + Programmer (default is auto) + +config BR2_PACKAGE_OPENOCD_TI_ICDI + bool "TI ICDI JTAG Programmer" + select BR2_PACKAGE_LIBUSB + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + help + Enable building support for the TI ICDI JTAG + Programmer (default is auto) + +config BR2_PACKAGE_OPENOCD_ULINK + bool "Keil ULINK JTAG Programmer" + select BR2_PACKAGE_LIBUSB + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + help + Enable building support for the Keil ULINK JTAG + Programmer (default is auto) + +config BR2_PACKAGE_OPENOCD_UBLASTER2 + bool "Altera USB-Blaster II Compatible" + select BR2_PACKAGE_LIBUSB + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + help + Enable building support for the Altera USB-Blaster + II Compatible (default is auto) + +config BR2_PACKAGE_OPENOCD_JLINK + bool "Segger J-Link JTAG Programmer" + select BR2_PACKAGE_LIBUSB + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + help + Segger J-Link JTAG Programmer and clone such as Atmel + SAM-ICE + +config BR2_PACKAGE_OPENOCD_OSDBM + bool "OSDBM JTAG (only) Programmer" + select BR2_PACKAGE_LIBUSB + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + help + Enable building support for the OSBDM (JTAG only) + Programmer (default is auto) + +config BR2_PACKAGE_OPENOCD_OPENDOUS + bool "eStick/opendous JTAG Programmer" + select BR2_PACKAGE_LIBUSB + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + help + Enable building support for the eStick/opendous JTAG + Programmer (default is auto) + +config BR2_PACKAGE_OPENOCD_AICE + bool "Andes JTAG Programmer" + select BR2_PACKAGE_LIBUSB + depends on BR2_USE_MMU # use fork() + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + help + Enable building support for the Andes JTAG + Programmer (default is auto) + +config BR2_PACKAGE_OPENOCD_VSLLINK + bool "Versaloon-Link JTAG Programmer" + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb-compat -> libusb + help + Enable building support for the Versaloon-Link JTAG + Programmer (default is auto) + +config BR2_PACKAGE_OPENOCD_USBPROG + bool "USBProg JTAG Programmer" + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb-compat -> libusb + help + Enable building support for the USBProg JTAG + Programmer (default is auto) + +config BR2_PACKAGE_OPENOCD_RLINK + bool "Raisonance RLink JTAG Programmer" + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb-compat -> libusb + help + Enable building support for the Raisonance RLink + JTAG Programmer (default is auto) + +config BR2_PACKAGE_OPENOCD_ARMEW + bool "Olimex ARM-JTAG-EW Programmer" + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb-compat -> libusb + help + Enable building support for the Olimex ARM-JTAG-EW + Programmer (default is auto) + +config BR2_PACKAGE_OPENOCD_PARPORT + bool "pc parallel port driver" + help + Enable building the pc parallel port driver + +config BR2_PACKAGE_OPENOCD_FT2XXX + bool "FT2232 based devices (DEPRECATED)" + select BR2_PACKAGE_LIBFTDI1 + depends on BR2_TOOLCHAIN_HAS_THREADS # libftdi -> libusb + help + (DEPRECATED) Enable building support for FT2232 + based devices using the libftdi library + +config BR2_PACKAGE_OPENOCD_VPI + bool "JTAG VPI" + help + Enable building support for JTAG VPI + +config BR2_PACKAGE_OPENOCD_UBLASTER + bool "Altera USB-Blaster" + select BR2_PACKAGE_LIBFTDI1 + depends on BR2_TOOLCHAIN_HAS_THREADS # libftdi -> libusb + help + Enable building support for the Altera USB-Blaster + using the libftdi driver, opensource alternate of + FTD2XX + +config BR2_PACKAGE_OPENOCD_AMTJT + bool "Amontec JTAG-Accelerator" + help + Enable building the Amontec JTAG-Accelerator driver + +if BR2_arm + +config BR2_PACKAGE_OPENOCD_EP93XX + bool "EP93xx based SBCs" + help + Enable building support for EP93xx based SBCs + +config BR2_PACKAGE_OPENOCD_AT91RM + bool "AT91RM9200 based SBCs" + help + Enable building support for AT91RM9200 based SBCs + +config BR2_PACKAGE_OPENOCD_BCM2835 + bool "bitbanging on BCM2835" + help + Enable building support for bitbanging on BCM2835 + (as found in Raspberry Pi) + +endif # BR2_arm + +config BR2_PACKAGE_OPENOCD_GW16012 + bool "Gateworks GW16012 JTAG Programmer" + help + Enable building support for the Gateworks GW16012 + JTAG Programmer + +config BR2_PACKAGE_OPENOCD_PRESTO + bool "ASIX Presto Programmer" + select BR2_PACKAGE_LIBFTDI1 + depends on BR2_TOOLCHAIN_HAS_THREADS # libftdi -> libusb + help + Enable building support for ASIX Presto Programmer + using the libftdi driver + +config BR2_PACKAGE_OPENOCD_OPENJTAG + bool "OpenJTAG Programmer" + select BR2_PACKAGE_LIBFTDI1 + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT # needs usb.h + depends on BR2_TOOLCHAIN_HAS_THREADS # libftdi -> libusb + help + Enable building support for the OpenJTAG Programmer + with ftdi driver + +config BR2_PACKAGE_OPENOCD_BUSPIRATE + bool "Buspirate" + help + Enable building support for the Buspirate + +config BR2_PACKAGE_OPENOCD_SYSFS + bool "programming via sysfs gpios" + help + Enable building support for programming driven via + sysfs gpios. + +# Many adapters need libusb or libusb-compat, which require threads, +# but we don't want to duplicate this comment for all adapters that +# select libusb or libusb-compat. +comment "many openocd adapters needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +endif # BR2_PACKAGE_OPENOCD diff --git a/package/openocd/Config.in.host b/package/openocd/Config.in.host new file mode 100644 index 0000000000..e1d0e63308 --- /dev/null +++ b/package/openocd/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_OPENOCD + bool "host openocd" + help + OpenOCD - Open On-Chip Debugger + + http://openocd.org/ diff --git a/package/openocd/openocd.hash b/package/openocd/openocd.hash new file mode 100644 index 0000000000..4ca11e206e --- /dev/null +++ b/package/openocd/openocd.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/openocd/files/openocd/0.9.0/ +sha1 bcf99bb21f09513065b2c9ece148ace7d16cdd0c openocd-0.9.0.tar.bz2 +md5 665cc98ae9e7297e09ec6ac7235fee49 openocd-0.9.0.tar.bz2 diff --git a/package/openocd/openocd.mk b/package/openocd/openocd.mk new file mode 100644 index 0000000000..21a302ff25 --- /dev/null +++ b/package/openocd/openocd.mk @@ -0,0 +1,103 @@ +################################################################################ +# +# openocd +# +################################################################################ + +OPENOCD_VERSION = 0.9.0 +OPENOCD_SOURCE = openocd-$(OPENOCD_VERSION).tar.bz2 +OPENOCD_SITE = http://sourceforge.net/projects/openocd/files/openocd/$(OPENOCD_VERSION) + +OPENOCD_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu99" + +OPENOCD_CONF_OPTS = \ + --oldincludedir=$(STAGING_DIR)/usr/include \ + --includedir=$(STAGING_DIR)/usr/include \ + --disable-doxygen-html \ + --with-jim-shared=no \ + --disable-shared \ + --enable-dummy \ + --disable-werror + +# Rely on the Config.in options of each individual adapter selecting +# the dependencies they need. + +OPENOCD_DEPENDENCIES = \ + $(if $(BR2_PACKAGE_LIBFTDI1),libftdi1) \ + $(if $(BR2_PACKAGE_LIBUSB),libusb) \ + $(if $(BR2_PACKAGE_LIBUSB_COMPAT),libusb-compat) \ + $(if $(BR2_PACKAGE_LIBHID),libhid) + +# Adapters +OPENOCD_CONF_OPTS += \ + $(if $(BR2_PACKAGE_OPENOCD_FTDI),--enable-ftdi,--disable-ftdi) \ + $(if $(BR2_PACKAGE_OPENOCD_STLINK),--enable-stlink,--disable-stlink) \ + $(if $(BR2_PACKAGE_OPENOCD_TI_ICDI),--enable-ti-icdi,--disable-ti-icdi) \ + $(if $(BR2_PACKAGE_OPENOCD_ULINK),--enable-ulink,--disable-ulink) \ + $(if $(BR2_PACKAGE_OPENOCD_UBLASTER2),--enable-usb-blaster-2,--disable-usb-blaster-2) \ + $(if $(BR2_PACKAGE_OPENOCD_JLINK),--enable-jlink,--disable-jlink) \ + $(if $(BR2_PACKAGE_OPENOCD_OSDBM),--enable-osbdm,--disable-osbdm) \ + $(if $(BR2_PACKAGE_OPENOCD_OPENDOUS),--enable-opendous,--disable-opendous) \ + $(if $(BR2_PACKAGE_OPENOCD_AICE),--enable-aice,--disable-aice) \ + $(if $(BR2_PACKAGE_OPENOCD_VSLLINK),--enable-vsllink,--disable-vsllink) \ + $(if $(BR2_PACKAGE_OPENOCD_USBPROG),--enable-usbprog,--disable-usbprog) \ + $(if $(BR2_PACKAGE_OPENOCD_RLINK),--enable-rlink,--disable-rlink) \ + $(if $(BR2_PACKAGE_OPENOCD_ARMEW),--enable-armjtagew,--disable-armjtagew) \ + $(if $(BR2_PACKAGE_OPENOCD_CMSIS_DAP),--enable-cmsis-dap,--disable-cmsis-dap) \ + $(if $(BR2_PACKAGE_OPENOCD_PARPORT),--enable-parport,--disable-parport) \ + $(if $(BR2_PACKAGE_OPENOCD_FT2XXX),--enable-legacy-ft2232_libftdi,--disable-legacy-ft2232_libftdi) \ + $(if $(BR2_PACKAGE_OPENOCD_VPI),--enable-jtag_vpi,--disable-jtag_vpi) \ + $(if $(BR2_PACKAGE_OPENOCD_UBLASTER),--enable-usb_blaster_libftdi,--disable-usb_blaster_libftdi) \ + $(if $(BR2_PACKAGE_OPENOCD_AMTJT),--enable-amtjtagaccel,--disable-amjtagaccel) \ + $(if $(BR2_PACKAGE_OPENOCD_ZY1000_MASTER),--enable-zy1000-master,--disable-zy1000-master) \ + $(if $(BR2_PACKAGE_OPENOCD_ZY1000),--enable-zy1000,--disable-zy1000) \ + $(if $(BR2_PACKAGE_OPENOCD_EP93XX),--enable-ep93xx,--disable-ep93xx) \ + $(if $(BR2_PACKAGE_OPENOCD_AT91RM),--enable-at91rm9200,--disable-at91rm9200) \ + $(if $(BR2_PACKAGE_OPENOCD_BCM2835),--enable-bcm2835gpio,--disable-bcm2835gpio) \ + $(if $(BR2_PACKAGE_OPENOCD_GW16012),--enable-gw16012,--disable-gw16012) \ + $(if $(BR2_PACKAGE_OPENOCD_PRESTO),--enable-presto_libftdi,--disable-presto_libftdi) \ + $(if $(BR2_PACKAGE_OPENOCD_OPENJTAG),--enable-openjtag_ftdi,--disable-openjtag_ftdi) \ + $(if $(BR2_PACKAGE_OPENOCD_BUSPIRATE),--enable-buspirate,--disable-buspirate) \ + $(if $(BR2_PACKAGE_OPENOCD_SYSFS),--enable-sysfsgpio,--disable-sysfsgpio) + +# Enable all configuration options for host build. +# +# Note that deprecated options have been removed. CMSIS_DAP needs +# hidapi (currently not included in buildroot) and zy1000 stuff fails +# to build, so they've been removed too. +# +HOST_OPENOCD_CONF_OPTS = \ + --enable-ftdi \ + --enable-stlink \ + --enable-ti-icdi \ + --enable-ulink \ + --enable-usb-blaster-2 \ + --enable-jlink \ + --enable-osbdm \ + --enable-opendous \ + --enable-aice \ + --enable-vsllink \ + --enable-usbprog \ + --enable-rlink \ + --enable-armjtagew \ + --enable-parport \ + --enable-jtag_vpi \ + --enable-usb_blaster_libftdi \ + --enable-amtjtagaccel \ + --enable-gw16012 \ + --enable-presto_libftdi \ + --enable-openjtag_ftdi \ + --enable-buspirate \ + --enable-sysfsgpio \ + --oldincludedir=$(HOST_DIR)/usr/include \ + --includedir=$(HOST_DIR)/usr/include \ + --disable-doxygen-html \ + --with-jim-shared=no \ + --disable-shared \ + --enable-dummy \ + --disable-werror + +HOST_OPENOCD_DEPENDENCIES = host-libftdi host-libusb host-libusb-compat + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/openpgm/0001-version_generator.py-make-it-python3-compliant.patch b/package/openpgm/0001-version_generator.py-make-it-python3-compliant.patch new file mode 100644 index 0000000000..97cff29df0 --- /dev/null +++ b/package/openpgm/0001-version_generator.py-make-it-python3-compliant.patch @@ -0,0 +1,42 @@ +From e04f5c20fc1536f8e6d4faf32f2f4657d441f7c8 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Mon, 14 Apr 2014 17:54:37 +0200 +Subject: [PATCH] version_generator.py: make it python3 compliant + +Signed-off-by: Samuel Martin +--- + openpgm/pgm/version_generator.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/openpgm/pgm/version_generator.py b/openpgm/pgm/version_generator.py +index 2265480..c31376f 100755 +--- a/openpgm/pgm/version_generator.py ++++ b/openpgm/pgm/version_generator.py +@@ -1,5 +1,7 @@ + #!/usr/bin/python + ++from __future__ import print_function ++ + import os + import platform + import time +@@ -8,7 +10,7 @@ build_date = time.strftime ("%Y-%m-%d") + build_time = time.strftime ("%H:%M:%S") + build_rev = filter (str.isdigit, "$Revision: 1369 $") + +-print """ ++print(""" + /* vim:ts=8:sts=8:sw=4:noai:noexpandtab + * + * OpenPGM version. +@@ -47,6 +49,6 @@ const char* pgm_build_revision = "%s"; + + + /* eof */ +-"""%(build_date, build_time, platform.system(), platform.machine(), build_rev) ++"""%(build_date, build_time, platform.system(), platform.machine(), build_rev)) + + # end of file +-- +1.9.2 + diff --git a/package/openpgm/0002-cross-compile.patch b/package/openpgm/0002-cross-compile.patch new file mode 100644 index 0000000000..07a24492e5 --- /dev/null +++ b/package/openpgm/0002-cross-compile.patch @@ -0,0 +1,38 @@ +configure.ac: cross-compilation fix + +This patch enables to configure the package when cross-compiling in a way +recommended by Autoconf manual (see manual for version 2.69, Section 6.6 +Checking Runtime Behavior). + +Signed-off-by: Alexander Lukichev + +--- a/openpgm/pgm/configure.ac 2011-09-27 20:59:08.000000000 +0300 ++++ b/openpgm/pgm/configure.ac 2013-02-12 10:33:53.000000000 +0200 +@@ -272,14 +272,19 @@ uint32_t add32_with_carry (uint32_t a, u + ;; + esac + # ticket spinlock friendly: unaligned pointers & atomic ops (excl. Sun Pro) +-AC_MSG_CHECKING([for unaligned pointers]) +-AC_RUN_IFELSE( +- [AC_LANG_PROGRAM([[char* nezumi = "mouse";]], +- [[short x = *(short*)(nezumi + 2)]])], +- [AC_MSG_RESULT([yes]) +- pgm_unaligned_pointers=yes], +- [AC_MSG_RESULT([no]) +- pgm_unaligned_pointers=no]) ++AC_CACHE_CHECK([if unaligned access fails], [ac_cv_lbl_unaligned_fail], ++ [AC_RUN_IFELSE( ++ [AC_LANG_PROGRAM([[char* nezumi = "mouse";]], ++ [[short x = *(short*)(nezumi + 2)]])], ++ [ac_cv_lbl_unaligned_fail=no], ++ [ac_cv_lbl_unaligned_fail=yes], ++ [ac_cv_lbl_unaligned_fail=yes]) ++ ]) ++if test "$ac_cv_lbl_unaligned_fail" = yes; then ++ pgm_unaligned_pointers=no ++else ++ pgm_unaligned_pointers=yes ++fi + AC_MSG_CHECKING([for intrinsic atomic ops]) + # AC_PREPROC_IFELSE not always portable + AC_COMPILE_IFELSE( diff --git a/package/openpgm/0003-Rework-headers-includes-to-fix-build-with-musl-libc.patch b/package/openpgm/0003-Rework-headers-includes-to-fix-build-with-musl-libc.patch new file mode 100644 index 0000000000..4d700fb4d6 --- /dev/null +++ b/package/openpgm/0003-Rework-headers-includes-to-fix-build-with-musl-libc.patch @@ -0,0 +1,55 @@ +From 01128a2d8ad3288e8b96a908888049f186d156ee Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 21 May 2016 19:44:48 +0200 +Subject: [PATCH 1/1] Rework headers includes to fix build with musl libc + +Downloaded patch from +http://git.alpinelinux.org/cgit/aports/plain/main/openpgm/openpgm-fix-includes.patch +and adjusted paths by prefixing with "openpgm/pgm/" + +A build log with the compile error can be found here: +http://autobuild.buildroot.net/results/854/854554827ead82f29b293ddceced6eb7fbfeec27/build-end.log + +Signed-off-by: Bernd Kuhls +(Patch sent upstream: https://github.com/steve-o/openpgm/pull/44) +--- + openpgm/pgm/include/impl/security.h | 3 ++- + openpgm/pgm/include/pgm/types.h | 1 + + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/openpgm/pgm/include/impl/security.h b/openpgm/pgm/include/impl/security.h +index c2b3e3d..896316f 100644 +--- a/openpgm/pgm/include/impl/security.h ++++ b/openpgm/pgm/include/impl/security.h +@@ -33,7 +33,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -41,6 +40,8 @@ + PGM_BEGIN_DECLS + + #ifdef HAVE_FTIME ++#include ++ + static inline + errno_t + # if !defined( _WIN32 ) +diff --git a/openpgm/pgm/include/pgm/types.h b/openpgm/pgm/include/pgm/types.h +index 4e41261..58731a3 100644 +--- a/openpgm/pgm/include/pgm/types.h ++++ b/openpgm/pgm/include/pgm/types.h +@@ -27,6 +27,7 @@ + + #ifndef _MSC_VER + # include ++# include + #endif + #include + +-- +2.8.1 + diff --git a/package/openpgm/Config.in b/package/openpgm/Config.in new file mode 100644 index 0000000000..e37edfe964 --- /dev/null +++ b/package/openpgm/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_OPENPGM + bool "openpgm" + depends on BR2_TOOLCHAIN_HAS_SYNC_2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR + help + OpenPGM is an open source implementation of the Pragmatic + General Multicast (PGM) specification in RFC 3208 available at + www.ietf.org. PGM is a reliable and scalable multicast + protocol that enables receivers to detect loss, request + retransmission of lost data, or notify an application of + unrecoverable loss. + + https://github.com/steve-o/openpgm/ + +comment "openpgm needs a toolchain w/ wchar, threads" + depends on BR2_TOOLCHAIN_HAS_SYNC_2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !(BR2_TOOLCHAIN_HAS_THREADS && BR2_USE_WCHAR) diff --git a/package/openpgm/openpgm.hash b/package/openpgm/openpgm.hash new file mode 100644 index 0000000000..f20e02a7fb --- /dev/null +++ b/package/openpgm/openpgm.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 ecd48fd0bcfd8351ce6dcf31b063dd8fe83d3dab41bca62a6ebd6880a88c4a69 openpgm-release-5-2-122.tar.gz diff --git a/package/openpgm/openpgm.mk b/package/openpgm/openpgm.mk new file mode 100644 index 0000000000..42b0a5d809 --- /dev/null +++ b/package/openpgm/openpgm.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# openpgm +# +################################################################################ + +OPENPGM_VERSION = release-5-2-122 +OPENPGM_SITE = $(call github,steve-o,openpgm,$(OPENPGM_VERSION)) +OPENPGM_LICENSE = LGPLv2.1+ +OPENPGM_LICENSE_FILES = openpgm/pgm/LICENSE +OPENPGM_INSTALL_STAGING = YES +OPENPGM_SUBDIR = openpgm/pgm +OPENPGM_AUTORECONF = YES + +# We need to create the m4 directory to make sure that autoreconf will +# start calling libtoolize. Otherwise it will start with aclocal and it +# will fail because the m4 directory doesn't exist. +define OPENPGM_CREATE_M4_DIR + mkdir -p $(@D)/$(OPENPGM_SUBDIR)/m4 +endef +OPENPGM_POST_PATCH_HOOKS += OPENPGM_CREATE_M4_DIR + +OPENPGM_CONF_ENV = \ + ac_cv_file__proc_cpuinfo=yes \ + ac_cv_file__dev_rtc=no \ + ac_cv_file__dev_hpet=no + +$(eval $(autotools-package)) diff --git a/package/openpowerlink/0001-install-the-stack-libraries-to-lib-subdirectory.patch b/package/openpowerlink/0001-install-the-stack-libraries-to-lib-subdirectory.patch new file mode 100644 index 0000000000..e46cbf7423 --- /dev/null +++ b/package/openpowerlink/0001-install-the-stack-libraries-to-lib-subdirectory.patch @@ -0,0 +1,133 @@ +From ebc5aeff65aeda610d9e23ecf4b26b79f9305a0e Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 1 May 2015 12:19:34 +0200 +Subject: [PATCH] install the stack libraries to "lib" subdirectory + +Using '.' to install the stack libraries is not correct since +it will install them to /usr/. + +ls /usr/liboplkmnapp-kernelintf.so + +Fix this by using 'lib' instead of '.' + +The problem with the openpowerlink build system is that it expect +the stack directory to be a "local staging" directory which +contains headers and libraries. So the libraries build by the +stack project are installed in stack/lib by default. + +This is wrong to do that because it becomes difficult to package +openpowerlink for normal Linux systems. + +Buildroot like others build system expect from a packaged software +to install libraries and headers build/provided in a staging +directory. + +It seems that CMAKE_INSTALL_PREFIX is misused by the default value +"${CMAKE_CURRENT_SOURCE_DIR}/lib/${SYSTEM_NAME_DIR}/${SYSTEM_PROCESSOR_DIR}" +since it already contains the lib directory and therefore the +entire build system is messed up. + +It seems that the openpowerlink's build system doesn't allow/support +CMAKE_INSTALL_PREFIX to be set externally +(which is the standard approach). + +The issue has been reported [1] upstream and a build system +refactoring is needed to fix this properly. + +[1] http://sourceforge.net/p/openpowerlink/discussion/newbie/thread/3f13af65/#8f80/a50a/4649/f07c + +Signed-off-by: Romain Naour +--- + stack/proj/linux/liboplkcn/CMakeLists.txt | 2 +- + stack/proj/linux/liboplkcnapp-kernelintf/CMakeLists.txt | 2 +- + stack/proj/linux/liboplkcnapp-userintf/CMakeLists.txt | 2 +- + stack/proj/linux/liboplkcndrv-pcap/CMakeLists.txt | 2 +- + stack/proj/linux/liboplkmn/CMakeLists.txt | 2 +- + stack/proj/linux/liboplkmnapp-kernelintf/CMakeLists.txt | 2 +- + stack/proj/linux/liboplkmnapp-userintf/CMakeLists.txt | 2 +- + stack/proj/linux/liboplkmndrv-pcap/CMakeLists.txt | 2 +- + 8 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/stack/proj/linux/liboplkcn/CMakeLists.txt b/stack/proj/linux/liboplkcn/CMakeLists.txt +index b7c73e6..23e3112 100644 +--- a/stack/proj/linux/liboplkcn/CMakeLists.txt ++++ b/stack/proj/linux/liboplkcn/CMakeLists.txt +@@ -88,4 +88,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES}) + TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d") +-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .) ++INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +diff --git a/stack/proj/linux/liboplkcnapp-kernelintf/CMakeLists.txt b/stack/proj/linux/liboplkcnapp-kernelintf/CMakeLists.txt +index 6c3bec6..a6f9271 100644 +--- a/stack/proj/linux/liboplkcnapp-kernelintf/CMakeLists.txt ++++ b/stack/proj/linux/liboplkcnapp-kernelintf/CMakeLists.txt +@@ -81,4 +81,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES}) + TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d") +-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .) ++INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +diff --git a/stack/proj/linux/liboplkcnapp-userintf/CMakeLists.txt b/stack/proj/linux/liboplkcnapp-userintf/CMakeLists.txt +index fdf6fd4..6df8bb7 100644 +--- a/stack/proj/linux/liboplkcnapp-userintf/CMakeLists.txt ++++ b/stack/proj/linux/liboplkcnapp-userintf/CMakeLists.txt +@@ -81,4 +81,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES}) + TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d") +-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .) ++INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +diff --git a/stack/proj/linux/liboplkcndrv-pcap/CMakeLists.txt b/stack/proj/linux/liboplkcndrv-pcap/CMakeLists.txt +index 440f02c..6ffcbe9 100644 +--- a/stack/proj/linux/liboplkcndrv-pcap/CMakeLists.txt ++++ b/stack/proj/linux/liboplkcndrv-pcap/CMakeLists.txt +@@ -77,4 +77,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES}) + TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d") +-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .) ++INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +diff --git a/stack/proj/linux/liboplkmn/CMakeLists.txt b/stack/proj/linux/liboplkmn/CMakeLists.txt +index 8f97144..e29f795 100644 +--- a/stack/proj/linux/liboplkmn/CMakeLists.txt ++++ b/stack/proj/linux/liboplkmn/CMakeLists.txt +@@ -92,4 +92,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES}) + TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d") +-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .) ++INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +diff --git a/stack/proj/linux/liboplkmnapp-kernelintf/CMakeLists.txt b/stack/proj/linux/liboplkmnapp-kernelintf/CMakeLists.txt +index df74265..2ba1cd1 100644 +--- a/stack/proj/linux/liboplkmnapp-kernelintf/CMakeLists.txt ++++ b/stack/proj/linux/liboplkmnapp-kernelintf/CMakeLists.txt +@@ -85,4 +85,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES}) + TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d") +-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .) ++INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +diff --git a/stack/proj/linux/liboplkmnapp-userintf/CMakeLists.txt b/stack/proj/linux/liboplkmnapp-userintf/CMakeLists.txt +index 98835c7..12b3dc6 100644 +--- a/stack/proj/linux/liboplkmnapp-userintf/CMakeLists.txt ++++ b/stack/proj/linux/liboplkmnapp-userintf/CMakeLists.txt +@@ -85,4 +85,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES}) + TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d") +-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .) ++INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +diff --git a/stack/proj/linux/liboplkmndrv-pcap/CMakeLists.txt b/stack/proj/linux/liboplkmndrv-pcap/CMakeLists.txt +index b4dd41b..cf875ca 100644 +--- a/stack/proj/linux/liboplkmndrv-pcap/CMakeLists.txt ++++ b/stack/proj/linux/liboplkmndrv-pcap/CMakeLists.txt +@@ -80,4 +80,4 @@ ADD_LIBRARY(${LIB_NAME} ${LIB_TYPE} ${LIB_SOURCES}) + TARGET_LINK_LIBRARIES(${LIB_NAME} ${ARCH_LIBRARIES}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEBUG_LVL=${CFG_DEBUG_LVL}) + SET_PROPERTY(TARGET ${LIB_NAME} PROPERTY DEBUG_POSTFIX "_d") +-INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION . LIBRARY DESTINATION .) ++INSTALL(TARGETS ${LIB_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib) +-- +2.4.3 + diff --git a/package/openpowerlink/0002-cmake-install-oplk-headers-files.patch b/package/openpowerlink/0002-cmake-install-oplk-headers-files.patch new file mode 100644 index 0000000000..7553c30eb6 --- /dev/null +++ b/package/openpowerlink/0002-cmake-install-oplk-headers-files.patch @@ -0,0 +1,32 @@ +From c904fb6ce3c29e77d51d8bcbbbdd48b8d22c754b Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Mon, 4 May 2015 11:47:05 +0200 +Subject: [PATCH] cmake: install oplk headers files + +In order to be able to link a third party application +with openpowerlink libraries, we need to install the +oplk headers files related to openpowerlink stack. + +Install all headers file from STACK_INCLUDE_DIR/oplk. + +Signed-off-by: Romain Naour +--- + stack/CMakeLists.txt | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/stack/CMakeLists.txt b/stack/CMakeLists.txt +index 9ff13f4..f4614cd 100644 +--- a/stack/CMakeLists.txt ++++ b/stack/CMakeLists.txt +@@ -103,3 +103,8 @@ ELSEIF((CMAKE_SYSTEM_NAME STREQUAL "Generic") AND (CMAKE_SYSTEM_PROCESSOR STREQU + ELSE() + MESSAGE(FATAL_ERROR "Unknown Platform and processor combination ${CMAKE_SYSTEM_NAME} and ${CMAKE_SYSTEM_PROCESSOR}!!") + ENDIF() ++ ++################################################################################ ++# Install oplk headers files ++################################################################################ ++INSTALL(DIRECTORY ${STACK_INCLUDE_DIR}/oplk DESTINATION "include") +-- +2.4.3 + diff --git a/package/openpowerlink/0003-cmake-use-CMAKE_CURRENT_SOURCE_DIR-instead-of-CM.patch b/package/openpowerlink/0003-cmake-use-CMAKE_CURRENT_SOURCE_DIR-instead-of-CM.patch new file mode 100644 index 0000000000..668c907b3c --- /dev/null +++ b/package/openpowerlink/0003-cmake-use-CMAKE_CURRENT_SOURCE_DIR-instead-of-CM.patch @@ -0,0 +1,154 @@ +From c354e8d9599aa02566c8acc341f3a2c73281483b Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Wed, 17 Sep 2014 13:27:44 +0200 +Subject: [PATCH] cmake: use CMAKE_CURRENT_SOURCE_DIR instead of + CMAKE_SOURCE_DIR + +The aim of this patch is to be able to call each subproject's CMakeLists.txt +from a top-level CMakeLists.txt. + +This will help to build automatically the epl libraries, epl driver, unittests +and demos. + +This patch has been submitted upstream: +https://github.com/openPOWERLINK/openPOWERLINK_V2/pull/57 + +Signed-off-by: Romain Naour +--- + drivers/linux/drv_daemon_pcap/CMakeLists.txt | 6 +++--- + drivers/linux/drv_kernelmod_edrv/CMakeLists.txt | 8 ++++---- + hardware/CMakeLists.txt | 4 ++-- + hardware/drivers/hostinterface/CMakeLists.txt | 2 +- + hardware/drivers/openmac/CMakeLists.txt | 4 ++-- + unittests/CMakeLists.txt | 4 ++-- + 6 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/drivers/linux/drv_daemon_pcap/CMakeLists.txt b/drivers/linux/drv_daemon_pcap/CMakeLists.txt +index 4c3f933..9041e4d 100644 +--- a/drivers/linux/drv_daemon_pcap/CMakeLists.txt ++++ b/drivers/linux/drv_daemon_pcap/CMakeLists.txt +@@ -57,8 +57,8 @@ MESSAGE(STATUS "Configuring ${EXE_NAME}") + ############################################################################### + # Set global directories + ############################################################################### +-SET(OPLK_BASE_DIR ${CMAKE_SOURCE_DIR}/../../..) +-SET(DRV_SOURCE_DIR ${CMAKE_SOURCE_DIR}) ++SET(OPLK_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..) ++SET(DRV_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) + SET(CONTRIB_SOURCE_DIR ${OPLK_BASE_DIR}/contrib) + SET(OPLK_INCLUDE_DIR ${OPLK_BASE_DIR}/stack/include) + SET(TOOLS_DIR ${OPLK_BASE_DIR}/tools) +@@ -66,7 +66,7 @@ SET(TOOLS_DIR ${OPLK_BASE_DIR}/tools) + ############################################################################### + # Include CMake Modules + ############################################################################### +-SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../../cmake ${CMAKE_MODULE_PATH}) ++SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../../cmake ${CMAKE_MODULE_PATH}) + + # include standard cmake modules + INCLUDE(CMakeDependentOption) +diff --git a/drivers/linux/drv_kernelmod_edrv/CMakeLists.txt b/drivers/linux/drv_kernelmod_edrv/CMakeLists.txt +index 2ad1a0d..af85f86 100644 +--- a/drivers/linux/drv_kernelmod_edrv/CMakeLists.txt ++++ b/drivers/linux/drv_kernelmod_edrv/CMakeLists.txt +@@ -75,7 +75,7 @@ SET_PROPERTY(CACHE CFG_POWERLINK_EDRV PROPERTY STRINGS 8139 82573 8255x i210 811 + ################################################################################ + # Set global directories + ################################################################################ +-SET(OPLK_BASE_DIR ${CMAKE_SOURCE_DIR}/../../..) ++SET(OPLK_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../..) + SET(CONTRIB_SOURCE_DIR ${OPLK_BASE_DIR}/contrib) + SET(STACK_SOURCE_DIR ${OPLK_BASE_DIR}/stack/src) + SET(COMMON_SOURCE_DIR ${OPLK_BASE_DIR}/stack/src/common) +@@ -152,10 +152,10 @@ IF(CFG_OPLK_MN) + ENDIF() + SET(MODULE_DEFS "${MODULE_DEFS} -DCONFIG_MN") + SET(MODULE_NAME "${MODULE_NAME}mn") +- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/proj/mn) ++ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/proj/mn) + ELSE() + SET(MODULE_NAME "${MODULE_NAME}cn") +- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/proj/cn) ++ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/proj/cn) + ENDIF() + + ############################################################################### +@@ -189,7 +189,7 @@ ENDFOREACH() + # + SET(MODULE_SOURCE_FILES + ${MODULE_SOURCE_FILES} +- ${CMAKE_SOURCE_DIR}/main.c ++ ${CMAKE_CURRENT_SOURCE_DIR}/main.c + ${CONTRIB_SOURCE_DIR}/trace/trace-printk.c + ${EDRV_SOURCE_DIR}/edrvcyclic.c + ${KERNEL_SOURCE_DIR}/ctrl/ctrlk.c +diff --git a/hardware/CMakeLists.txt b/hardware/CMakeLists.txt +index 218c4eb..3ba85ca 100644 +--- a/hardware/CMakeLists.txt ++++ b/hardware/CMakeLists.txt +@@ -40,7 +40,7 @@ INCLUDE(reduceboardname) + + ################################################################################ + # Set paths +-SET(OPLK_BASE_DIR ${CMAKE_SOURCE_DIR}/..) ++SET(OPLK_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) + SET(OMETHLIB_BASE_DIR ${PROJECT_SOURCE_DIR}/drivers/openmac) + SET(OMETHLIB_BUILD_DIR ${PROJECT_BINARY_DIR}/drivers/openmac) + SET(HOSTIF_BASE_DIR ${PROJECT_SOURCE_DIR}/drivers/hostinterface) +@@ -56,7 +56,7 @@ STRING(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSTEM_PROCESSOR_DIR) + + IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + SET(CMAKE_INSTALL_PREFIX +- ${CMAKE_SOURCE_DIR}/lib/${SYSTEM_NAME_DIR}/${SYSTEM_PROCESSOR_DIR} CACHE PATH "openPOWERLINK hardware install prefix" FORCE ++ ${CMAKE_CURRENT_SOURCE_DIR}/lib/${SYSTEM_NAME_DIR}/${SYSTEM_PROCESSOR_DIR} CACHE PATH "openPOWERLINK hardware install prefix" FORCE + ) + ENDIF() + +diff --git a/hardware/drivers/hostinterface/CMakeLists.txt b/hardware/drivers/hostinterface/CMakeLists.txt +index 1a9d2aa..9c56c16 100644 +--- a/hardware/drivers/hostinterface/CMakeLists.txt ++++ b/hardware/drivers/hostinterface/CMakeLists.txt +@@ -71,7 +71,7 @@ ELSE() + SET( HOSTIF_LIB_NAME "${HOSTIF_NAME}") + ENDIF() + +-SET(BOARDS_COMMON_DIR ${CMAKE_SOURCE_DIR}/boards/${BOARD_NAME}/common) ++SET(BOARDS_COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD_NAME}/common) + SET(EXAMPLE_BINARY_DIR ${CMAKE_BINARY_DIR}/boards/${BOARD_NAME}/${EXAMPLE_NAME}) + + ######################################################################## +diff --git a/hardware/drivers/openmac/CMakeLists.txt b/hardware/drivers/openmac/CMakeLists.txt +index 560c0d9..d532996 100644 +--- a/hardware/drivers/openmac/CMakeLists.txt ++++ b/hardware/drivers/openmac/CMakeLists.txt +@@ -55,8 +55,8 @@ ELSE() + SET(OMETH_LIB_NAME "${OMETH_NAME}") + ENDIF() + +-SET(BOARD_EXAMPLE_DIR ${CMAKE_SOURCE_DIR}/boards/${BOARD_NAME}/${EXAMPLE_NAME}) +-SET(BOARDS_COMMON_DIR ${CMAKE_SOURCE_DIR}/boards/${BOARD_NAME}/common) ++SET(BOARD_EXAMPLE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD_NAME}/${EXAMPLE_NAME}) ++SET(BOARDS_COMMON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/boards/${BOARD_NAME}/common) + SET(EXAMPLE_BINARY_DIR ${CMAKE_BINARY_DIR}/boards/${BOARD_NAME}/${EXAMPLE_NAME}) + + ######################################################################## +diff --git a/unittests/CMakeLists.txt b/unittests/CMakeLists.txt +index 533d4e7..4460c2e 100644 +--- a/unittests/CMakeLists.txt ++++ b/unittests/CMakeLists.txt +@@ -55,10 +55,10 @@ ENDMACRO(ADD_UNIT_TEST) + + ################################################################################ + # Set general directories +-SET(OPLK_BASE_DIR ${CMAKE_SOURCE_DIR}/..) ++SET(OPLK_BASE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/..) + SET(OPLK_SOURCE_DIR ${OPLK_BASE_DIR}/stack/src) + SET(OPLK_INCLUDE_DIR ${OPLK_BASE_DIR}/stack/include) +-SET(TEST_COMMON_SOURCE_DIR ${CMAKE_SOURCE_DIR}/common) ++SET(TEST_COMMON_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/common) + + # We need a oplkcfg.h file for compiling the sources + # We are using the project for the complete MN library +-- +2.4.3 + diff --git a/package/openpowerlink/0004-Use-PROJECT_NAME-instead-of-CMAKE_PROJECT_NAME.patch b/package/openpowerlink/0004-Use-PROJECT_NAME-instead-of-CMAKE_PROJECT_NAME.patch new file mode 100644 index 0000000000..3957cd1ebd --- /dev/null +++ b/package/openpowerlink/0004-Use-PROJECT_NAME-instead-of-CMAKE_PROJECT_NAME.patch @@ -0,0 +1,125 @@ +From 7aace6a9d28b02c4325610255dc8afe198f02c4d Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Wed, 12 Aug 2015 10:54:32 +0200 +Subject: [PATCH] Use PROJECT_NAME instead of CMAKE_PROJECT_NAME + +In order to support a top level CMakeLists.txt, use the current project +name instead of the top level one. + +This patch has been submitted upstream: +https://github.com/openPOWERLINK/openPOWERLINK_V2/pull/57 + +Signed-off-by: Romain Naour +--- + apps/demo_cn_console/CMakeLists.txt | 2 +- + apps/demo_cn_console/linux.cmake | 2 +- + apps/demo_mn_console/CMakeLists.txt | 4 ++-- + apps/demo_mn_console/linux.cmake | 2 +- + apps/demo_mn_qt/CMakeLists.txt | 4 ++-- + apps/demo_mn_qt/linux.cmake | 2 +- + drivers/linux/drv_daemon_pcap/CMakeLists.txt | 2 +- + drivers/linux/drv_kernelmod_edrv/CMakeLists.txt | 10 +++++----- + 8 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/apps/demo_cn_console/CMakeLists.txt b/apps/demo_cn_console/CMakeLists.txt +index cd3b418..c5a47a8 100644 +--- a/apps/demo_cn_console/CMakeLists.txt ++++ b/apps/demo_cn_console/CMakeLists.txt +@@ -112,6 +112,6 @@ TARGET_LINK_LIBRARIES(demo_cn_console ${ARCH_LIBRARIES}) + ################################################################################ + # Installation rules + +-INSTALL(TARGETS demo_cn_console RUNTIME DESTINATION ${CMAKE_PROJECT_NAME}) ++INSTALL(TARGETS demo_cn_console RUNTIME DESTINATION ${PROJECT_NAME}) + + +diff --git a/apps/demo_cn_console/linux.cmake b/apps/demo_cn_console/linux.cmake +index 409bf11..76e381d 100644 +--- a/apps/demo_cn_console/linux.cmake ++++ b/apps/demo_cn_console/linux.cmake +@@ -53,5 +53,5 @@ SET (ARCH_LIBRARIES ${ARCH_LIBRARIES} pthread rt) + ################################################################################ + # Set architecture specific installation files + +-INSTALL(PROGRAMS ${TOOLS_DIR}/linux/set_prio DESTINATION ${CMAKE_PROJECT_NAME}) ++INSTALL(PROGRAMS ${TOOLS_DIR}/linux/set_prio DESTINATION ${PROJECT_NAME}) + +diff --git a/apps/demo_mn_console/CMakeLists.txt b/apps/demo_mn_console/CMakeLists.txt +index 0c54a98..d8df68e 100644 +--- a/apps/demo_mn_console/CMakeLists.txt ++++ b/apps/demo_mn_console/CMakeLists.txt +@@ -120,6 +120,6 @@ TARGET_LINK_LIBRARIES(demo_mn_console ${ARCH_LIBRARIES}) + ################################################################################ + # Installation rules + +-INSTALL(TARGETS demo_mn_console RUNTIME DESTINATION ${CMAKE_PROJECT_NAME}) +-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mnobd.cdc DESTINATION ${CMAKE_PROJECT_NAME}) ++INSTALL(TARGETS demo_mn_console RUNTIME DESTINATION ${PROJECT_NAME}) ++INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mnobd.cdc DESTINATION ${PROJECT_NAME}) + +diff --git a/apps/demo_mn_console/linux.cmake b/apps/demo_mn_console/linux.cmake +index a9e9072..a994928 100644 +--- a/apps/demo_mn_console/linux.cmake ++++ b/apps/demo_mn_console/linux.cmake +@@ -53,5 +53,5 @@ SET (ARCH_LIBRARIES ${ARCH_LIBRARIES} pthread rt) + ################################################################################ + # Set architecture specific installation files + +-INSTALL(PROGRAMS ${TOOLS_DIR}/linux/set_prio DESTINATION ${CMAKE_PROJECT_NAME}) ++INSTALL(PROGRAMS ${TOOLS_DIR}/linux/set_prio DESTINATION ${PROJECT_NAME}) + +diff --git a/apps/demo_mn_qt/CMakeLists.txt b/apps/demo_mn_qt/CMakeLists.txt +index ff3a9aa..282a9d8 100644 +--- a/apps/demo_mn_qt/CMakeLists.txt ++++ b/apps/demo_mn_qt/CMakeLists.txt +@@ -161,5 +161,5 @@ TARGET_LINK_LIBRARIES(demo_mn_qt ${ARCH_LIBRARIES} ${QT_LIBRARIES}) + ################################################################################ + # Installation rules + +-INSTALL(TARGETS demo_mn_qt RUNTIME DESTINATION ${CMAKE_PROJECT_NAME}) +-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mnobd.cdc DESTINATION ${CMAKE_PROJECT_NAME}) ++INSTALL(TARGETS demo_mn_qt RUNTIME DESTINATION ${PROJECT_NAME}) ++INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mnobd.cdc DESTINATION ${PROJECT_NAME}) +diff --git a/apps/demo_mn_qt/linux.cmake b/apps/demo_mn_qt/linux.cmake +index 6f19ff2..6ed75ee 100644 +--- a/apps/demo_mn_qt/linux.cmake ++++ b/apps/demo_mn_qt/linux.cmake +@@ -45,5 +45,5 @@ SET(ARCH_LIBRARIES ${ARCH_LIBRARIES} pthread rt) + ################################################################################ + # Set architecture specific installation files + +-INSTALL(PROGRAMS ${TOOLS_DIR}/linux/set_prio DESTINATION ${CMAKE_PROJECT_NAME}) ++INSTALL(PROGRAMS ${TOOLS_DIR}/linux/set_prio DESTINATION ${PROJECT_NAME}) + +diff --git a/drivers/linux/drv_daemon_pcap/CMakeLists.txt b/drivers/linux/drv_daemon_pcap/CMakeLists.txt +index 9041e4d..2702abd 100644 +--- a/drivers/linux/drv_daemon_pcap/CMakeLists.txt ++++ b/drivers/linux/drv_daemon_pcap/CMakeLists.txt +@@ -136,5 +136,5 @@ SET_PROPERTY(TARGET ${EXE_NAME} PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG;DEF_DEB + TARGET_LINK_LIBRARIES(${EXE_NAME} ${OPLKLIB} ${ARCH_LIBRARIES}) + + # add installation rules +-INSTALL(TARGETS ${EXE_NAME} RUNTIME DESTINATION ${CMAKE_PROJECT_NAME}) ++INSTALL(TARGETS ${EXE_NAME} RUNTIME DESTINATION ${PROJECT_NAME}) + +diff --git a/drivers/linux/drv_kernelmod_edrv/CMakeLists.txt b/drivers/linux/drv_kernelmod_edrv/CMakeLists.txt +index af85f86..59400c0 100644 +--- a/drivers/linux/drv_kernelmod_edrv/CMakeLists.txt ++++ b/drivers/linux/drv_kernelmod_edrv/CMakeLists.txt +@@ -301,8 +301,8 @@ ADD_CUSTOM_TARGET( + ################################################################################ + # add installation rules + +-INSTALL(FILES ${MODULE_OUTPUT_DIR}/${MODULE_NAME}.ko DESTINATION ${CMAKE_PROJECT_NAME}) +-INSTALL(FILES ${TOOLS_DIR}/linux/50-openPOWERLINK.rules DESTINATION ${CMAKE_PROJECT_NAME}) +-INSTALL(PROGRAMS ${TOOLS_DIR}/linux/plkload DESTINATION ${CMAKE_PROJECT_NAME}) +-INSTALL(PROGRAMS ${TOOLS_DIR}/linux/plkunload DESTINATION ${CMAKE_PROJECT_NAME}) +-INSTALL(PROGRAMS ${TOOLS_DIR}/linux/devices.txt DESTINATION ${CMAKE_PROJECT_NAME}) ++INSTALL(FILES ${MODULE_OUTPUT_DIR}/${MODULE_NAME}.ko DESTINATION ${PROJECT_NAME}) ++INSTALL(FILES ${TOOLS_DIR}/linux/50-openPOWERLINK.rules DESTINATION ${PROJECT_NAME}) ++INSTALL(PROGRAMS ${TOOLS_DIR}/linux/plkload DESTINATION ${PROJECT_NAME}) ++INSTALL(PROGRAMS ${TOOLS_DIR}/linux/plkunload DESTINATION ${PROJECT_NAME}) ++INSTALL(PROGRAMS ${TOOLS_DIR}/linux/devices.txt DESTINATION ${PROJECT_NAME}) +-- +2.4.3 + diff --git a/package/openpowerlink/0005-Add-top-level-CMakeLists.txt.patch b/package/openpowerlink/0005-Add-top-level-CMakeLists.txt.patch new file mode 100644 index 0000000000..259a81a40d --- /dev/null +++ b/package/openpowerlink/0005-Add-top-level-CMakeLists.txt.patch @@ -0,0 +1,193 @@ +From 6f4bcf829efe5ce31592003e049606ae1de05e90 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Wed, 12 Aug 2015 11:24:24 +0200 +Subject: [PATCH] Add top level CMakeLists.txt + +This CMakeLists.txt can be used to build openpowerlink +using a automated build system. + +Don't use FIND_LIBRARY when the stack is built from a top +level build (ie CFG_OPLK_LIB is ON). +For a top level build, CMake will automatically add a build +dependency on oplk libraries for building demos applications. + +Also replace OPLKLIB_DEBUG by OPLKLIB in OPLK_LINK_LIBRARIES macro +if CMAKE_BUILD_TYPE is "Debug", otherwise TARGET_LINK_LIBRARIES can't +find the openpowerlink library. +This issue may be related to: +https://github.com/OpenAutomationTechnologies/openPOWERLINK_V2/issues/109 + +Fixes: +http://autobuild.buildroot.net/results/da4/da445b65cb136d71577f04e3a17fdb2ef6302a9b + +This patch has not been accepted by upstream: +https://github.com/openPOWERLINK/openPOWERLINK_V2/pull/57 + +Signed-off-by: Romain Naour +--- + CMakeLists.txt | 36 +++++++++++++++ + apps/common/cmake/findoplklib.cmake | 68 +++++++++++++++------------- + apps/common/cmake/linkoplklib.cmake | 2 +- + drivers/linux/drv_daemon_pcap/CMakeLists.txt | 12 +++-- + 4 files changed, 83 insertions(+), 35 deletions(-) + create mode 100644 CMakeLists.txt + +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..96e3d0f +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,36 @@ ++ ++CMAKE_MINIMUM_REQUIRED (VERSION 2.8.7) ++ ++#### LIB #### ++ ++IF (CFG_OPLK_LIB) ++ ADD_SUBDIRECTORY("stack") ++ENDIF (CFG_OPLK_LIB) ++ ++#### Linux kernel module #### ++ ++IF (CFG_KERNEL_DRIVERS) ++ ADD_SUBDIRECTORY("drivers/linux/drv_kernelmod_edrv") ++ENDIF (CFG_KERNEL_DRIVERS) ++ ++#### Pcap userspace driver #### ++ ++IF (CFG_PCAP_DAEMON) ++ ADD_SUBDIRECTORY("drivers/linux/drv_daemon_pcap") ++ENDIF (CFG_PCAP_DAEMON) ++ ++#### OpenPowerLink Demos #### ++ ++# Add subdirectory of CN console demo application ++IF (CFG_DEMO_CN_CONSOLE) ++ ADD_SUBDIRECTORY("apps/demo_cn_console") ++ENDIF (CFG_DEMO_CN_CONSOLE) ++ ++# Add subdirectory of MN console demo application ++IF (CFG_DEMO_MN_CONSOLE) ++ ADD_SUBDIRECTORY("apps/demo_mn_console") ++ENDIF (CFG_DEMO_MN_CONSOLE) ++ ++IF (CFG_DEMO_MN_QT) ++ ADD_SUBDIRECTORY("apps/demo_mn_qt") ++ENDIF (CFG_DEMO_MN_QT) +diff --git a/apps/common/cmake/findoplklib.cmake b/apps/common/cmake/findoplklib.cmake +index 1bf570e..79ea35b 100644 +--- a/apps/common/cmake/findoplklib.cmake ++++ b/apps/common/cmake/findoplklib.cmake +@@ -81,36 +81,42 @@ MACRO(FIND_OPLK_LIBRARY OPLK_NODE_TYPE) + # Set oplk library directory + SET(OPLKLIB_DIR ${OPLK_BASE_DIR}/stack/lib/${SYSTEM_NAME_DIR}/${SYSTEM_PROCESSOR_DIR}) + +- IF((CMAKE_GENERATOR MATCHES "Visual Studio") OR (CMAKE_BUILD_TYPE STREQUAL "Release")) +- # Search for release library +- UNSET(OPLKLIB CACHE) +- MESSAGE(STATUS "Searching for LIBRARY ${OPLKLIB_NAME} in ${OPLKLIB_DIR}") +- FIND_LIBRARY(OPLKLIB NAME ${OPLKLIB_NAME} +- HINTS ${OPLKLIB_DIR} ${OPLKLIB_DIR}/${CFG_DEMO_BOARD_NAME}/${CFG_DEMO_NAME}) +- +- IF(CMAKE_SYSTEM_NAME STREQUAL "Windows") +- +- UNSET(OPLKDLL CACHE) +- FIND_PROGRAM(OPLKDLL NAME ${OPLKLIB_NAME}.dll +- HINTS ${OPLKLIB_DIR}) +- +- ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Windows") +- ENDIF() +- +- IF((CMAKE_GENERATOR MATCHES "Visual Studio") OR (CMAKE_BUILD_TYPE STREQUAL "Debug")) +- # Search for debug library +- UNSET(OPLKLIB_DEBUG CACHE) +- MESSAGE(STATUS "Searching for LIBRARY ${OPLKLIB_DEBUG_NAME} in ${OPLKLIB_DIR}") +- FIND_LIBRARY(OPLKLIB_DEBUG NAME ${OPLKLIB_DEBUG_NAME} +- HINTS ${OPLKLIB_DIR} ${OPLKLIB_DIR}/${CFG_DEMO_BOARD_NAME}/${CFG_DEMO_NAME}) +- +- IF(CMAKE_SYSTEM_NAME STREQUAL "Windows") +- +- UNSET(OPLKDLL_DEBUG CACHE) +- FIND_PROGRAM(OPLKDLL_DEBUG NAME ${OPLKLIB_DEBUG_NAME}.dll +- HINTS ${OPLKLIB_DIR}) +- +- ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Windows") +- ENDIF() ++ # Don't look for oplk libraries for a top level build ++ IF(CFG_OPLK_LIB) ++ SET(OPLKLIB ${OPLKLIB_NAME}) ++ SET(OPLKLIB_DEBUG ${OPLKLIB_DEBUG_NAME}) ++ ELSE(CFG_OPLK_LIB) ++ IF((CMAKE_GENERATOR MATCHES "Visual Studio") OR (CMAKE_BUILD_TYPE STREQUAL "Release")) ++ # Search for release library ++ UNSET(OPLKLIB CACHE) ++ MESSAGE(STATUS "Searching for LIBRARY ${OPLKLIB_NAME} in ${OPLKLIB_DIR}") ++ FIND_LIBRARY(OPLKLIB NAME ${OPLKLIB_NAME} ++ HINTS ${OPLKLIB_DIR} ${OPLKLIB_DIR}/${CFG_DEMO_BOARD_NAME}/${CFG_DEMO_NAME}) ++ ++ IF(CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ ++ UNSET(OPLKDLL CACHE) ++ FIND_PROGRAM(OPLKDLL NAME ${OPLKLIB_NAME}.dll ++ HINTS ${OPLKLIB_DIR}) ++ ++ ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ ENDIF() ++ ++ IF((CMAKE_GENERATOR MATCHES "Visual Studio") OR (CMAKE_BUILD_TYPE STREQUAL "Debug")) ++ # Search for debug library ++ UNSET(OPLKLIB_DEBUG CACHE) ++ MESSAGE(STATUS "Searching for LIBRARY ${OPLKLIB_DEBUG_NAME} in ${OPLKLIB_DIR}") ++ FIND_LIBRARY(OPLKLIB_DEBUG NAME ${OPLKLIB_DEBUG_NAME} ++ HINTS ${OPLKLIB_DIR} ${OPLKLIB_DIR}/${CFG_DEMO_BOARD_NAME}/${CFG_DEMO_NAME}) ++ ++ IF(CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ ++ UNSET(OPLKDLL_DEBUG CACHE) ++ FIND_PROGRAM(OPLKDLL_DEBUG NAME ${OPLKLIB_DEBUG_NAME}.dll ++ HINTS ${OPLKLIB_DIR}) ++ ++ ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Windows") ++ ENDIF() ++ ENDIF(CFG_OPLK_LIB) + + ENDMACRO(FIND_OPLK_LIBRARY) +diff --git a/apps/common/cmake/linkoplklib.cmake b/apps/common/cmake/linkoplklib.cmake +index 49aab66..d9fd418 100644 +--- a/apps/common/cmake/linkoplklib.cmake ++++ b/apps/common/cmake/linkoplklib.cmake +@@ -33,7 +33,7 @@ MACRO(OPLK_LINK_LIBRARIES EXECUTABLE_NAME) + TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} optimized ${OPLKLIB} debug ${OPLKLIB_DEBUG}) + ELSE() + IF(${CMAKE_BUILD_TYPE} STREQUAL "Debug") +- TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} debug ${OPLKLIB_DEBUG}) ++ TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} debug ${OPLKLIB}) + ELSE () + TARGET_LINK_LIBRARIES(${EXECUTABLE_NAME} optimized ${OPLKLIB}) + ENDIF() +diff --git a/drivers/linux/drv_daemon_pcap/CMakeLists.txt b/drivers/linux/drv_daemon_pcap/CMakeLists.txt +index 2702abd..81bb598 100644 +--- a/drivers/linux/drv_daemon_pcap/CMakeLists.txt ++++ b/drivers/linux/drv_daemon_pcap/CMakeLists.txt +@@ -104,9 +104,15 @@ ENDIF() + SET(OPLKLIB_DIR ${OPLK_BASE_DIR}/stack/lib/${SYSTEM_NAME_DIR}/${SYSTEM_PROCESSOR_DIR}) + SET(OPLKLIB_INCDIR ${OPLK_BASE_DIR}/stack/proj/${SYSTEM_NAME_DIR}/lib${LIB_NAME}) + +-UNSET(OPLKLIB CACHE) +-FIND_LIBRARY(OPLKLIB NAME ${LIB_NAME}${BUILD_TYPE_EXT} +- HINTS ${OPLKLIB_DIR}) ++# Don't look for oplk libraries for a top level build ++IF(CFG_OPLK_LIB) ++ SET(OPLKLIB ${LIB_NAME}${BUILD_TYPE_EXT}) ++ELSE(CFG_OPLK_LIB) ++ UNSET(OPLKLIB CACHE) ++ FIND_LIBRARY(OPLKLIB NAME ${LIB_NAME}${BUILD_TYPE_EXT} ++ HINTS ${OPLKLIB_DIR}) ++ENDIF(CFG_OPLK_LIB) ++ + INCLUDE_DIRECTORIES(${OPLKLIB_INCDIR}) + + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -std=c99 -pthread -fno-strict-aliasing") +-- +2.5.5 + diff --git a/package/openpowerlink/0006-veth-avoid-kernel-header-issue-with-musl.patch b/package/openpowerlink/0006-veth-avoid-kernel-header-issue-with-musl.patch new file mode 100644 index 0000000000..383f047588 --- /dev/null +++ b/package/openpowerlink/0006-veth-avoid-kernel-header-issue-with-musl.patch @@ -0,0 +1,91 @@ +From 42a95209c5650662b86d222678ec14e7edfae156 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Wed, 25 May 2016 13:26:49 +0200 +Subject: [PATCH] veth: avoid kernel header issue with musl + +The Virtual Ethernet driver doesn't build when the musl libc is used on the +system. As stated in the musl wiki [1], the userspace and kernel headers are +mixed leading to a "clash" with the definitions provided by musl. + +Remove netinet/if_ether.h userspace header and replace ETHER_ADDR_LEN by +ETH_ALEN [2] and ETHERMTU by ETH_DATA_LEN [3] in veth-linuxuser.c. + +Fixes: +http://autobuild.buildroot.org/results/2ca/2ca04bb046263e479e7597867b56469893d3c11d/build-end.log + +Upsteam status: pending +https://github.com/OpenAutomationTechnologies/openPOWERLINK_V2/pull/120 + +[Rebase on v2.2.2] +[1] http://wiki.musl-libc.org/wiki/FAQ#Q:_why_am_i_getting_.22error:_redefinition_of_struct_ethhdr.2Ftcphdr.2Fetc.22_.3F +[2] https://git.musl-libc.org/cgit/musl/tree/include/net/ethernet.h?h=v1.1.14#n35 +[3] https://git.musl-libc.org/cgit/musl/tree/include/net/ethernet.h?h=v1.1.14#n48 + +Signed-off-by: Romain Naour +--- + stack/src/kernel/veth/veth-linuxuser.c | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +diff --git a/stack/src/kernel/veth/veth-linuxuser.c b/stack/src/kernel/veth/veth-linuxuser.c +index 2a0bdd0..2bfaa87 100644 +--- a/stack/src/kernel/veth/veth-linuxuser.c ++++ b/stack/src/kernel/veth/veth-linuxuser.c +@@ -61,7 +61,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + #include + #include +-#include + + //============================================================================// + // G L O B A L D E F I N I T I O N S // +@@ -248,7 +247,7 @@ static void getMacAdrs(UINT8* pMac_p) + + close(sock); + +- OPLK_MEMCPY(pMac_p, &ifr.ifr_hwaddr.sa_data[0], ETHER_ADDR_LEN); ++ OPLK_MEMCPY(pMac_p, &ifr.ifr_hwaddr.sa_data[0], ETH_ALEN); + } + + //------------------------------------------------------------------------------ +@@ -272,9 +271,9 @@ static tOplkError veth_receiveFrame(tFrameInfo* pFrameInfo_p, + + // replace the MAC address of the POWERLINK Ethernet interface with virtual + // Ethernet MAC address before forwarding it into the virtual Ethernet interface +- if (OPLK_MEMCMP(pFrameInfo_p->pFrame->aDstMac, vethInstance_l.macAdrs, ETHER_ADDR_LEN) == 0) ++ if (OPLK_MEMCMP(pFrameInfo_p->pFrame->aDstMac, vethInstance_l.macAdrs, ETH_ALEN) == 0) + { +- OPLK_MEMCPY(pFrameInfo_p->pFrame->aDstMac, vethInstance_l.tapMacAdrs, ETHER_ADDR_LEN); ++ OPLK_MEMCPY(pFrameInfo_p->pFrame->aDstMac, vethInstance_l.tapMacAdrs, ETH_ALEN); + } + + nwrite = write(vethInstance_l.fd, pFrameInfo_p->pFrame, pFrameInfo_p->frameSize); +@@ -302,7 +301,7 @@ to be used as a thread which does a blocking read in a while loop. + //------------------------------------------------------------------------------ + static void* vethRecvThread(void* pArg_p) + { +- UINT8 buffer[ETHERMTU]; ++ UINT8 buffer[ETH_DATA_LEN]; + UINT nread; + tFrameInfo frameInfo; + tOplkError ret = kErrorOk; +@@ -331,7 +330,7 @@ static void* vethRecvThread(void* pArg_p) + break; + + default: // data from tun/tap ready for read +- nread = read(pInstance->fd, buffer, ETHERMTU); ++ nread = read(pInstance->fd, buffer, ETH_DATA_LEN); + if (nread > 0) + { + DEBUG_LVL_VETH_TRACE("VETH:Read %d bytes from the tap interface\n", nread); +@@ -340,7 +339,7 @@ static void* vethRecvThread(void* pArg_p) + DEBUG_LVL_VETH_TRACE("DST MAC: %02X:%02X:%02x:%02X:%02X:%02x\n", + buffer[0], buffer[1], buffer[2], buffer[3], buffer[4], buffer[5]); + // replace src MAC address with MAC address of virtual Ethernet interface +- OPLK_MEMCPY(&buffer[6], pInstance->macAdrs, ETHER_ADDR_LEN); ++ OPLK_MEMCPY(&buffer[6], pInstance->macAdrs, ETH_ALEN); + + frameInfo.pFrame = (tPlkFrame *)buffer; + frameInfo.frameSize = nread; +-- +2.5.5 + diff --git a/package/openpowerlink/Config.in b/package/openpowerlink/Config.in new file mode 100644 index 0000000000..e6b41c3289 --- /dev/null +++ b/package/openpowerlink/Config.in @@ -0,0 +1,112 @@ +comment "openpowerlink needs a toolchain w/ C++, threads" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_OPENPOWERLINK + bool "openpowerlink" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_i386 || BR2_x86_64 + help + openPOWERLINK is an Open Source Industrial Ethernet stack + implementing the POWERLINK protocol for Managing Node (MN, + POWERLINK Master) and Controlled Node (CN, POWERLINK Slave). + + It is provided by + SYSTEC electronic (http://www.systec-electronic.com), + B&R (http://www.br-automation.com) and + Kalycito (http://www.kalycito.com). + + http://openpowerlink.sourceforge.net/web/ + +if BR2_PACKAGE_OPENPOWERLINK + +choice + prompt "MN/CN mode" + +config BR2_PACKAGE_OPENPOWERLINK_MN + bool "Managing Node" + help + Enable Managing Node (master) mode + +config BR2_PACKAGE_OPENPOWERLINK_CN + bool "Controlled Node" + help + Enable Controlled Node (slave) mode + +endchoice + +choice + prompt "stack type" + +config BR2_PACKAGE_OPENPOWERLINK_STACK_MONOLITHIC_USER_STACK_LIB + bool "linked into application" + select BR2_PACKAGE_LIBPCAP + help + Compile a monolithic openPOWERLINK library. The library + contains an Ethernet driver which is using the PCAP library + for accessing the network. No kernel-side driver is needed. + +config BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB + bool "user-space pcap daemon" + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_OPENPOWERLINK_PCAP_DAEMON + help + Compile openPOWERLINK application library which contains the + interface to a Linux user space driver, and the Linux user + space driver. It is used for implementing a multi-process + solution where the openPOWERLINK layer is running as a + separate Linux user space daemon (i.e. a PCAP based user + space daemon). No kernel-side stack is needed. + +config BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB + bool "kernel-space driver" + depends on BR2_LINUX_KERNEL + help + Compile openPOWERLINK application library which contains the + interface to a Linux kernel space driver. This will also + build and install a Linux kernel module openPOWERLINK + driver. + +comment "openpowerlink kernel stack needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +endchoice + +if BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB + +choice + prompt "select Ethernet Powerlink Driver" + +config BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_82573 + bool "Intel 82573" + +config BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_8255x + bool "Intel 8255x" + +config BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_I210 + bool "Intel I210" + +config BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_RTL8111 + bool "Realtek RTL-8111/8168" + +config BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_RTL8139 + bool "Realtek RTL-8139" + +endchoice + +endif # BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB + +menu "demos" + +config BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE + bool "console MN demo" + depends on BR2_PACKAGE_OPENPOWERLINK_MN + +config BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE + bool "console CN demo" + depends on BR2_PACKAGE_OPENPOWERLINK_CN + +endmenu + +endif # BR2_PACKAGE_OPENPOWERLINK diff --git a/package/openpowerlink/openpowerlink.hash b/package/openpowerlink/openpowerlink.hash new file mode 100644 index 0000000000..6b28be81c4 --- /dev/null +++ b/package/openpowerlink/openpowerlink.hash @@ -0,0 +1,5 @@ +# From http://sourceforge.net/projects/openpowerlink/files/openPOWERLINK/V2.2.2/ +md5 d7f2b08d332b36fed5427ebc5ec118f2 openPOWERLINK_V2.2.2.tar.gz +sha1 f565c6a8e10ba320325d120f6030158f4c4278f8 openPOWERLINK_V2.2.2.tar.gz +# sha256 locally computed +sha256 4de00eaf8af1ff3877bfa2e878a59989873406845fc8031bd6fc58cb1f7cf7e7 openPOWERLINK_V2.2.2.tar.gz diff --git a/package/openpowerlink/openpowerlink.mk b/package/openpowerlink/openpowerlink.mk new file mode 100644 index 0000000000..d9ceca4d53 --- /dev/null +++ b/package/openpowerlink/openpowerlink.mk @@ -0,0 +1,125 @@ +################################################################################ +# +# openpowerlink +# +################################################################################ + +OPENPOWERLINK_VERSION = V2.2.2 +OPENPOWERLINK_SITE = http://downloads.sourceforge.net/project/openpowerlink/openPOWERLINK/$(OPENPOWERLINK_VERSION) +OPENPOWERLINK_SOURCE = openPOWERLINK_$(OPENPOWERLINK_VERSION).tar.gz +OPENPOWERLINK_LICENSE = BSD-2c, GPLv2 +OPENPOWERLINK_LICENSE_FILES = license.md + +OPENPOWERLINK_INSTALL_STAGING = YES + +# The archive has no leading component. +OPENPOWERLINK_STRIP_COMPONENTS = 0 + +OPENPOWERLINK_MN_ONOFF = $(if $(BR2_PACKAGE_OPENPOWERLINK_MN),ON,OFF) +OPENPOWERLINK_CN_ONOFF = $(if $(BR2_PACKAGE_OPENPOWERLINK_CN),ON,OFF) + +#### OPLK LIBRARY #### + +# Always build a oplk stack +OPENPOWERLINK_CONF_OPTS += -DCFG_OPLK_LIB=ON + +# All option are ON by default +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_MONOLITHIC_USER_STACK_LIB),y) +OPENPOWERLINK_DEPENDENCIES += libpcap +OPENPOWERLINK_CONF_OPTS += \ + -DCFG_COMPILE_LIB_MN=$(OPENPOWERLINK_MN_ONOFF) \ + -DCFG_COMPILE_LIB_MNAPP_USERINTF=OFF \ + -DCFG_COMPILE_LIB_MNAPP_KERNELINTF=OFF \ + -DCFG_COMPILE_LIB_MNDRV_PCAP=OFF \ + -DCFG_COMPILE_LIB_CN=$(OPENPOWERLINK_CN_ONOFF) \ + -DCFG_COMPILE_LIB_CNAPP_USERINTF=OFF \ + -DCFG_COMPILE_LIB_CNAPP_KERNELINTF=OFF \ + -DCFG_COMPILE_LIB_CNDRV_PCAP=OFF +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB),y) +OPENPOWERLINK_DEPENDENCIES += libpcap +OPENPOWERLINK_CONF_OPTS += \ + -DCFG_COMPILE_LIB_MN=OFF \ + -DCFG_COMPILE_LIB_MNAPP_USERINTF=$(OPENPOWERLINK_MN_ONOFF) \ + -DCFG_COMPILE_LIB_MNAPP_KERNELINTF=OFF \ + -DCFG_COMPILE_LIB_MNDRV_PCAP=$(OPENPOWERLINK_MN_ONOFF) \ + -DCFG_COMPILE_LIB_CN=OFF \ + -DCFG_COMPILE_LIB_CNAPP_USERINTF=$(OPENPOWERLINK_CN_ONOFF) \ + -DCFG_COMPILE_LIB_CNAPP_KERNELINTF=OFF \ + -DCFG_COMPILE_LIB_CNDRV_PCAP=$(OPENPOWERLINK_CN_ONOFF) +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB),y) +OPENPOWERLINK_CONF_OPTS += \ + -DCFG_COMPILE_LIB_MN=OFF \ + -DCFG_COMPILE_LIB_MNAPP_USERINTF=OFF \ + -DCFG_COMPILE_LIB_MNAPP_KERNELINTF=$(OPENPOWERLINK_MN_ONOFF) \ + -DCFG_COMPILE_LIB_MNDRV_PCAP=OFF \ + -DCFG_COMPILE_LIB_CN=OFF \ + -DCFG_COMPILE_LIB_CNAPP_USERINTF=OFF \ + -DCFG_COMPILE_LIB_CNAPP_KERNELINTF=$(OPENPOWERLINK_CN_ONOFF) \ + -DCFG_COMPILE_LIB_CNDRV_PCAP=OFF +endif + +OPENPOWERLINK_CONF_OPTS += \ + -DCFG_COMPILE_SHARED_LIBRARY=$(if $(BR2_STATIC_LIBS),OFF,ON) + +#### OPLK KERNEL DRIVERS #### + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB),y) +OPENPOWERLINK_DEPENDENCIES += linux + +OPENPOWERLINK_CONF_OPTS += \ + -DCFG_KERNEL_DRIVERS=ON \ + -DCFG_KERNEL_DIR="$(LINUX_DIR)" \ + -DCMAKE_SYSTEM_VERSION="$(LINUX_VERSION)" \ + -DCFG_OPLK_MN="$(OPENPOWERLINK_MN_ONOFF)" \ + -DMAKE_KERNEL_ARCH="$(KERNEL_ARCH)" \ + -DMAKE_KERNEL_CROSS_COMPILE="$(CCACHE) $(TARGET_CROSS)" + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_82573),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_POWERLINK_EDRV=82573 +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_8255x),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_POWERLINK_EDRV=8255x +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_I210),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_POWERLINK_EDRV=i210 +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_RTL8111),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_POWERLINK_EDRV=8111 +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_KERNEL_DRIVER_RTL8139),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_POWERLINK_EDRV=8139 +endif +endif + +#### OPLK PCAP DAEMON #### + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB),y) +OPENPOWERLINK_CONF_OPTS += \ + -DCFG_PCAP_DAEMON=ON \ + -DCFG_OPLK_MN=$(OPENPOWERLINK_MN_ONOFF) +endif + +#### OPLK DEMO APPS #### + +# See apps/common/cmake/configure-linux.cmake for available options list. +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_MONOLITHIC_USER_STACK_LIB),y) +OPENPOWERLINK_CONF_OPTS += \ + -DCFG_BUILD_KERNEL_STACK="Link to Application" +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_USERSPACE_DAEMON_LIB),y) +OPENPOWERLINK_CONF_OPTS += \ + -DCFG_BUILD_KERNEL_STACK="Linux Userspace Daemon" +else ifeq ($(BR2_PACKAGE_OPENPOWERLINK_STACK_KERNEL_STACK_LIB),y) +OPENPOWERLINK_CONF_OPTS += \ + -DCFG_BUILD_KERNEL_STACK="Linux Kernel Module" +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_MN_CONSOLE),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_DEMO_MN_CONSOLE=ON \ + -DCFG_DEMO_MN_CONSOLE_USE_SYNCTHREAD=ON +else +OPENPOWERLINK_CONF_OPTS += -DCFG_DEMO_MN_CONSOLE=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENPOWERLINK_DEMO_CN_CONSOLE),y) +OPENPOWERLINK_CONF_OPTS += -DCFG_DEMO_CN_CONSOLE=ON +else +OPENPOWERLINK_CONF_OPTS += -DCFG_DEMO_CN_CONSOLE=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/openssh/0001-fix-pam-uclibc-pthreads-clash.patch b/package/openssh/0001-fix-pam-uclibc-pthreads-clash.patch new file mode 100644 index 0000000000..d9bc6e5d0c --- /dev/null +++ b/package/openssh/0001-fix-pam-uclibc-pthreads-clash.patch @@ -0,0 +1,44 @@ +When PAM is enabled, openssh makes its own static versions of pthreads +functions. But when built with a uclibc toolchain, pthreads.h gets +indirectly included. The clashing exported and static definitions of +the pthreads functions then cause a compile error. This patch fixes +the problem by changing the static pthread function names with macros +when the static functions are defined. + +Signed-off-by: Danomi Manchego + +diff -urN openssh-6.1p1.orig/auth-pam.c openssh-6.1p1/auth-pam.c +--- openssh-6.1p1.orig/auth-pam.c 2009-07-12 08:07:21.000000000 -0400 ++++ openssh-6.1p1/auth-pam.c 2012-09-15 19:49:47.677288199 -0400 +@@ -166,6 +166,7 @@ + sigdie("PAM: authentication thread exited uncleanly"); + } + ++#define pthread_exit pthread_exit_AVOID_UCLIBC_PTHREAD_CLASH + /* ARGSUSED */ + static void + pthread_exit(void *value) +@@ -173,6 +174,7 @@ + _exit(0); + } + ++#define pthread_create pthread_create_AVOID_UCLIBC_PTHREAD_CLASH + /* ARGSUSED */ + static int + pthread_create(sp_pthread_t *thread, const void *attr, +@@ -200,6 +202,7 @@ + } + } + ++#define pthread_cancel pthread_cancel_AVOID_UCLIBC_PTHREAD_CLASH + static int + pthread_cancel(sp_pthread_t thread) + { +@@ -207,6 +210,7 @@ + return (kill(thread, SIGTERM)); + } + ++#define pthread_join pthread_join_AVOID_UCLIBC_PTHREAD_CLASH + /* ARGSUSED */ + static int + pthread_join(sp_pthread_t thread, void **value) diff --git a/package/openssh/0002-fix-howmany-include.patch b/package/openssh/0002-fix-howmany-include.patch new file mode 100644 index 0000000000..7a2a8e3202 --- /dev/null +++ b/package/openssh/0002-fix-howmany-include.patch @@ -0,0 +1,49 @@ +Update patch from 2fea21799223d41605556858a95b55e69e9960ca to openssh +version 6.8p1 + +Signed-off-by: Gustavo Zacarias + +diff -Nura openssh-6.8p1.orig/openbsd-compat/bsd-poll.c openssh-6.8p1/openbsd-compat/bsd-poll.c +--- openssh-6.8p1.orig/openbsd-compat/bsd-poll.c 2015-03-18 07:11:46.184620677 -0300 ++++ openssh-6.8p1/openbsd-compat/bsd-poll.c 2015-03-18 07:12:29.120094555 -0300 +@@ -19,6 +19,7 @@ + #include "includes.h" + #if !defined(HAVE_POLL) + ++#include + #include + #include + #ifdef HAVE_SYS_SELECT_H +diff -Nura openssh-6.8p1.orig/sshd.c openssh-6.8p1/sshd.c +--- openssh-6.8p1.orig/sshd.c 2015-03-18 07:11:46.187620780 -0300 ++++ openssh-6.8p1/sshd.c 2015-03-18 07:13:11.889562735 -0300 +@@ -44,6 +44,7 @@ + + #include "includes.h" + ++#include + #include + #include + #include +diff -Nura openssh-6.8p1.orig/ssh-keyscan.c openssh-6.8p1/ssh-keyscan.c +--- openssh-6.8p1.orig/ssh-keyscan.c 2015-03-18 07:11:46.180620539 -0300 ++++ openssh-6.8p1/ssh-keyscan.c 2015-03-18 07:13:32.092256248 -0300 +@@ -9,6 +9,7 @@ + + #include "includes.h" + ++#include + #include + #include "openbsd-compat/sys-queue.h" + #include +diff -Nura openssh-6.8p1.orig/ssh-pkcs11-helper.c openssh-6.8p1/ssh-pkcs11-helper.c +--- openssh-6.8p1.orig/ssh-pkcs11-helper.c 2015-03-18 07:11:46.182620608 -0300 ++++ openssh-6.8p1/ssh-pkcs11-helper.c 2015-03-18 07:13:43.620651993 -0300 +@@ -17,6 +17,7 @@ + + #include "includes.h" + ++#include + #include + #ifdef HAVE_SYS_TIME_H + # include diff --git a/package/openssh/Config.in b/package/openssh/Config.in new file mode 100644 index 0000000000..75911402ae --- /dev/null +++ b/package/openssh/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_OPENSSH + bool "openssh" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + A free version of the SSH protocol suite of network connectivity + tools. The standard 'ssh', 'sshd', 'scp', and friends. + + http://www.openssh.com/ diff --git a/package/openssh/S50sshd b/package/openssh/S50sshd new file mode 100644 index 0000000000..c15114257f --- /dev/null +++ b/package/openssh/S50sshd @@ -0,0 +1,47 @@ +#!/bin/sh +# +# sshd Starts sshd. +# + +# Make sure the ssh-keygen progam exists +[ -f /usr/bin/ssh-keygen ] || exit 0 + +# Create any missing keys +/usr/bin/ssh-keygen -A + +umask 077 + +start() { + printf "Starting sshd: " + /usr/sbin/sshd + touch /var/lock/sshd + echo "OK" +} +stop() { + printf "Stopping sshd: " + killall sshd + rm -f /var/lock/sshd + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/openssh/openssh.hash b/package/openssh/openssh.hash new file mode 100644 index 0000000000..46d9f9be27 --- /dev/null +++ b/package/openssh/openssh.hash @@ -0,0 +1,3 @@ +# Locally calculated after checking pgp signature +# Also from http://www.openssh.com/txt/release-7.2 +sha256 a72781d1a043876a224ff1b0032daa4094d87565a68528759c1c2cab5482548c openssh-7.2p2.tar.gz diff --git a/package/openssh/openssh.mk b/package/openssh/openssh.mk new file mode 100644 index 0000000000..dd20fd2122 --- /dev/null +++ b/package/openssh/openssh.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# openssh +# +################################################################################ + +OPENSSH_VERSION = 7.2p2 +OPENSSH_SITE = http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable +OPENSSH_LICENSE = BSD-3c BSD-2c Public Domain +OPENSSH_LICENSE_FILES = LICENCE +OPENSSH_CONF_ENV = LD="$(TARGET_CC)" LDFLAGS="$(TARGET_CFLAGS)" +OPENSSH_CONF_OPTS = \ + --sysconfdir=/data/etc \ + --disable-lastlog \ + --disable-utmp \ + --disable-utmpx \ + --disable-wtmp \ + --disable-wtmpx \ + --disable-strip + +define OPENSSH_USERS + sshd -1 sshd -1 * - - - SSH drop priv user +endef + +# uClibc toolchain for ARC doesn't support PIE at the moment +ifeq ($(BR2_arc),y) +OPENSSH_CONF_OPTS += --without-pie +endif +# PIE and static does not work on Linux +ifeq ($(BR2_STATIC_LIBS),y) +OPENSSH_CONF_OPTS += --without-pie +endif + +OPENSSH_DEPENDENCIES = zlib openssl + +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +define OPENSSH_INSTALL_PAM_CONF + $(INSTALL) -D -m 644 $(@D)/contrib/sshd.pam.generic $(TARGET_DIR)/etc/pam.d/sshd + $(SED) '\%password required /lib/security/pam_cracklib.so%d' $(TARGET_DIR)/etc/pam.d/sshd + $(SED) 's/\#UsePAM no/UsePAM yes/' $(TARGET_DIR)/etc/ssh/sshd_config +endef + +OPENSSH_DEPENDENCIES += linux-pam +OPENSSH_CONF_OPTS += --with-pam +OPENSSH_POST_INSTALL_TARGET_HOOKS += OPENSSH_INSTALL_PAM_CONF +else +OPENSSH_CONF_OPTS += --without-pam +endif + +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +OPENSSH_DEPENDENCIES += libselinux +OPENSSH_CONF_OPTS += --with-selinux +else +OPENSSH_CONF_OPTS += --without-selinux +endif + +define OPENSSH_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/openssh/sshd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/sshd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/sshd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/sshd.service +endef + +define OPENSSH_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/openssh/S50sshd \ + $(TARGET_DIR)/etc/init.d/S50sshd +endef + +$(eval $(autotools-package)) diff --git a/package/openssh/sshd.service b/package/openssh/sshd.service new file mode 100644 index 0000000000..b5e96b3a25 --- /dev/null +++ b/package/openssh/sshd.service @@ -0,0 +1,11 @@ +[Unit] +Description=OpenSSH server daemon +After=syslog.target network.target auditd.service + +[Service] +ExecStartPre=/usr/bin/ssh-keygen -A +ExecStart=/usr/sbin/sshd -D -e +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=multi-user.target diff --git a/package/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch b/package/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch new file mode 100644 index 0000000000..10d2b7526c --- /dev/null +++ b/package/openssl/0001-Dont-waste-time-building-manpages-if-we-re-not-going.patch @@ -0,0 +1,27 @@ +From 389efb564fa1453a9da835393eec9006bfae2a52 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Sat, 16 May 2015 18:53:51 +0200 +Subject: Dont waste time building manpages if we're not going to use em. + +Signed-off-by: Ryan Barnett +[Gustavo: update for parallel-build] +--- + Makefile.org | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.org b/Makefile.org +index 60f07cc..976ceaf 100644 +--- a/Makefile.org ++++ b/Makefile.org +@@ -527,7 +527,7 @@ dist: + dist_pem_h: + (cd crypto/pem; $(MAKE) -e $(BUILDENV) pem.h; $(MAKE) clean) + +-install: install_docs install_sw ++install: install_sw + + install_sw: + @$(PERL) $(TOP)/util/mkdir-p.pl $(INSTALL_PREFIX)$(INSTALLTOP)/bin \ +-- +1.9.1 + diff --git a/package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch b/package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch new file mode 100644 index 0000000000..47295500c0 --- /dev/null +++ b/package/openssl/0002-cryptodev-Fix-issue-with-signature-generation.patch @@ -0,0 +1,450 @@ +From 90fd7e8f1a316cda86ee442b43fcd7d5e5baeede Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Sat, 16 May 2015 18:55:08 +0200 +Subject: cryptodev: Fix issue with signature generation + +Forward port of 0001-cryptodev-Fix-issue-with-signature-generation.patch +from http://rt.openssl.org/Ticket/Display.html?id=2770&user=guest&pass=guest +It was originally targetted at 1.0.2-beta3. + +Without this patch digest acceleration via cryptodev is broken. + +Signed-off-by: Gustavo Zacarias +Signed-off-by: Ryan Barnett +--- + crypto/engine/eng_cryptodev.c | 195 +++++++++++++++++++++++++++++++----------- + 1 file changed, 146 insertions(+), 49 deletions(-) + +diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c +index 926d95c..7021d9a 100644 +--- a/crypto/engine/eng_cryptodev.c ++++ b/crypto/engine/eng_cryptodev.c +@@ -2,6 +2,7 @@ + * Copyright (c) 2002 Bob Beck + * Copyright (c) 2002 Theo de Raadt + * Copyright (c) 2002 Markus Friedl ++ * Copyright (c) 2012 Nikos Mavrogiannopoulos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without +@@ -72,7 +73,6 @@ struct dev_crypto_state { + struct session_op d_sess; + int d_fd; + # ifdef USE_CRYPTODEV_DIGESTS +- char dummy_mac_key[HASH_MAX_LEN]; + unsigned char digest_res[HASH_MAX_LEN]; + char *mac_data; + int mac_len; +@@ -189,8 +189,10 @@ static struct { + static struct { + int id; + int nid; +- int keylen; ++ int digestlen; + } digests[] = { ++#if 0 ++ /* HMAC is not supported */ + { + CRYPTO_MD5_HMAC, NID_hmacWithMD5, 16 + }, +@@ -198,15 +200,15 @@ static struct { + CRYPTO_SHA1_HMAC, NID_hmacWithSHA1, 20 + }, + { +- CRYPTO_RIPEMD160_HMAC, NID_ripemd160, 16 +- /* ? */ ++ CRYPTO_SHA2_256_HMAC, NID_hmacWithSHA256, 32 + }, + { +- CRYPTO_MD5_KPDK, NID_undef, 0 ++ CRYPTO_SHA2_384_HMAC, NID_hmacWithSHA384, 48 + }, + { +- CRYPTO_SHA1_KPDK, NID_undef, 0 ++ CRYPTO_SHA2_512_HMAC, NID_hmacWithSHA512, 64 + }, ++#endif + { + CRYPTO_MD5, NID_md5, 16 + }, +@@ -214,6 +216,15 @@ static struct { + CRYPTO_SHA1, NID_sha1, 20 + }, + { ++ CRYPTO_SHA2_256, NID_sha256, 32 ++ }, ++ { ++ CRYPTO_SHA2_384, NID_sha384, 48 ++ }, ++ { ++ CRYPTO_SHA2_512, NID_sha512, 64 ++ }, ++ { + 0, NID_undef, 0 + }, + }; +@@ -288,13 +299,14 @@ static int get_cryptodev_ciphers(const int **cnids) + static int nids[CRYPTO_ALGORITHM_MAX]; + struct session_op sess; + int fd, i, count = 0; ++ unsigned char fake_key[CRYPTO_CIPHER_MAX_KEY_LEN]; + + if ((fd = get_dev_crypto()) < 0) { + *cnids = NULL; + return (0); + } + memset(&sess, 0, sizeof(sess)); +- sess.key = (caddr_t) "123456789abcdefghijklmno"; ++ sess.key = (void*)fake_key; + + for (i = 0; ciphers[i].id && count < CRYPTO_ALGORITHM_MAX; i++) { + if (ciphers[i].nid == NID_undef) +@@ -327,18 +339,19 @@ static int get_cryptodev_digests(const int **cnids) + static int nids[CRYPTO_ALGORITHM_MAX]; + struct session_op sess; + int fd, i, count = 0; ++ unsigned char fake_key[CRYPTO_CIPHER_MAX_KEY_LEN]; + + if ((fd = get_dev_crypto()) < 0) { + *cnids = NULL; + return (0); + } + memset(&sess, 0, sizeof(sess)); +- sess.mackey = (caddr_t) "123456789abcdefghijklmno"; ++ sess.mackey = fake_key; + for (i = 0; digests[i].id && count < CRYPTO_ALGORITHM_MAX; i++) { + if (digests[i].nid == NID_undef) + continue; + sess.mac = digests[i].id; +- sess.mackeylen = digests[i].keylen; ++ sess.mackeylen = 8; + sess.cipher = 0; + if (ioctl(fd, CIOCGSESSION, &sess) != -1 && + ioctl(fd, CIOCFSESSION, &sess.ses) != -1) +@@ -424,14 +437,14 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, + cryp.ses = sess->ses; + cryp.flags = 0; + cryp.len = inl; +- cryp.src = (caddr_t) in; +- cryp.dst = (caddr_t) out; ++ cryp.src = (void*) in; ++ cryp.dst = (void*) out; + cryp.mac = 0; + + cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; + + if (ctx->cipher->iv_len) { +- cryp.iv = (caddr_t) ctx->iv; ++ cryp.iv = (void*) ctx->iv; + if (!ctx->encrypt) { + iiv = in + inl - ctx->cipher->iv_len; + memcpy(save_iv, iiv, ctx->cipher->iv_len); +@@ -483,7 +496,7 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, + if ((state->d_fd = get_dev_crypto()) < 0) + return (0); + +- sess->key = (caddr_t) key; ++ sess->key = (void*)key; + sess->keylen = ctx->key_len; + sess->cipher = cipher; + +@@ -749,16 +762,6 @@ static int digest_nid_to_cryptodev(int nid) + return (0); + } + +-static int digest_key_length(int nid) +-{ +- int i; +- +- for (i = 0; digests[i].id; i++) +- if (digests[i].nid == nid) +- return digests[i].keylen; +- return (0); +-} +- + static int cryptodev_digest_init(EVP_MD_CTX *ctx) + { + struct dev_crypto_state *state = ctx->md_data; +@@ -769,7 +772,6 @@ static int cryptodev_digest_init(EVP_MD_CTX *ctx) + printf("cryptodev_digest_init: Can't get digest \n"); + return (0); + } +- + memset(state, 0, sizeof(struct dev_crypto_state)); + + if ((state->d_fd = get_dev_crypto()) < 0) { +@@ -777,8 +779,8 @@ static int cryptodev_digest_init(EVP_MD_CTX *ctx) + return (0); + } + +- sess->mackey = state->dummy_mac_key; +- sess->mackeylen = digest_key_length(ctx->digest->type); ++ sess->mackey = NULL; ++ sess->mackeylen = 0; + sess->mac = digest; + + if (ioctl(state->d_fd, CIOCGSESSION, sess) < 0) { +@@ -794,8 +796,8 @@ static int cryptodev_digest_init(EVP_MD_CTX *ctx) + static int cryptodev_digest_update(EVP_MD_CTX *ctx, const void *data, + size_t count) + { +- struct crypt_op cryp; + struct dev_crypto_state *state = ctx->md_data; ++ struct crypt_op cryp; + struct session_op *sess = &state->d_sess; + + if (!data || state->d_fd < 0) { +@@ -804,7 +806,7 @@ static int cryptodev_digest_update(EVP_MD_CTX *ctx, const void *data, + } + + if (!count) { +- return (0); ++ return (1); + } + + if (!(ctx->flags & EVP_MD_CTX_FLAG_ONESHOT)) { +@@ -828,9 +830,9 @@ static int cryptodev_digest_update(EVP_MD_CTX *ctx, const void *data, + cryp.ses = sess->ses; + cryp.flags = 0; + cryp.len = count; +- cryp.src = (caddr_t) data; ++ cryp.src = (void*) data; + cryp.dst = NULL; +- cryp.mac = (caddr_t) state->digest_res; ++ cryp.mac = (void*) state->digest_res; + if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) { + printf("cryptodev_digest_update: digest failed\n"); + return (0); +@@ -844,8 +846,6 @@ static int cryptodev_digest_final(EVP_MD_CTX *ctx, unsigned char *md) + struct dev_crypto_state *state = ctx->md_data; + struct session_op *sess = &state->d_sess; + +- int ret = 1; +- + if (!md || state->d_fd < 0) { + printf("cryptodev_digest_final: illegal input\n"); + return (0); +@@ -859,7 +859,7 @@ static int cryptodev_digest_final(EVP_MD_CTX *ctx, unsigned char *md) + cryp.len = state->mac_len; + cryp.src = state->mac_data; + cryp.dst = NULL; +- cryp.mac = (caddr_t) md; ++ cryp.mac = (void*)md; + if (ioctl(state->d_fd, CIOCCRYPT, &cryp) < 0) { + printf("cryptodev_digest_final: digest failed\n"); + return (0); +@@ -870,7 +870,7 @@ static int cryptodev_digest_final(EVP_MD_CTX *ctx, unsigned char *md) + + memcpy(md, state->digest_res, ctx->digest->md_size); + +- return (ret); ++ return 1; + } + + static int cryptodev_digest_cleanup(EVP_MD_CTX *ctx) +@@ -921,8 +921,8 @@ static int cryptodev_digest_copy(EVP_MD_CTX *to, const EVP_MD_CTX *from) + + digest = digest_nid_to_cryptodev(to->digest->type); + +- sess->mackey = dstate->dummy_mac_key; +- sess->mackeylen = digest_key_length(to->digest->type); ++ sess->mackey = NULL; ++ sess->mackeylen = 0; + sess->mac = digest; + + dstate->d_fd = get_dev_crypto(); +@@ -947,32 +947,116 @@ static int cryptodev_digest_copy(EVP_MD_CTX *to, const EVP_MD_CTX *from) + + const EVP_MD cryptodev_sha1 = { + NID_sha1, +- NID_undef, ++ NID_sha1WithRSAEncryption, + SHA_DIGEST_LENGTH, ++#if defined(EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) && defined(EVP_MD_FLAG_DIGALGID_ABSENT) ++ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE| ++ EVP_MD_FLAG_DIGALGID_ABSENT| ++#endif + EVP_MD_FLAG_ONESHOT, + cryptodev_digest_init, + cryptodev_digest_update, + cryptodev_digest_final, + cryptodev_digest_copy, + cryptodev_digest_cleanup, +- EVP_PKEY_NULL_method, ++ EVP_PKEY_RSA_method, + SHA_CBLOCK, +- sizeof(struct dev_crypto_state), ++ sizeof(EVP_MD *)+sizeof(struct dev_crypto_state), + }; + +-const EVP_MD cryptodev_md5 = { ++static const EVP_MD cryptodev_sha256 = { ++ NID_sha256, ++ NID_sha256WithRSAEncryption, ++ SHA256_DIGEST_LENGTH, ++#if defined(EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) && defined(EVP_MD_FLAG_DIGALGID_ABSENT) ++ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE| ++ EVP_MD_FLAG_DIGALGID_ABSENT| ++#endif ++ EVP_MD_FLAG_ONESHOT, ++ cryptodev_digest_init, ++ cryptodev_digest_update, ++ cryptodev_digest_final, ++ cryptodev_digest_copy, ++ cryptodev_digest_cleanup, ++ EVP_PKEY_RSA_method, ++ SHA256_CBLOCK, ++ sizeof(EVP_MD *)+sizeof(struct dev_crypto_state), ++}; ++ ++static const EVP_MD cryptodev_sha224 = { ++ NID_sha224, ++ NID_sha224WithRSAEncryption, ++ SHA224_DIGEST_LENGTH, ++#if defined(EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) && defined(EVP_MD_FLAG_DIGALGID_ABSENT) ++ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE| ++ EVP_MD_FLAG_DIGALGID_ABSENT| ++#endif ++ EVP_MD_FLAG_ONESHOT, ++ cryptodev_digest_init, ++ cryptodev_digest_update, ++ cryptodev_digest_final, ++ cryptodev_digest_copy, ++ cryptodev_digest_cleanup, ++ EVP_PKEY_RSA_method, ++ SHA256_CBLOCK, ++ sizeof(EVP_MD *)+sizeof(struct dev_crypto_state), ++}; ++ ++static const EVP_MD cryptodev_sha384 = { ++ NID_sha384, ++ NID_sha384WithRSAEncryption, ++ SHA384_DIGEST_LENGTH, ++#if defined(EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) && defined(EVP_MD_FLAG_DIGALGID_ABSENT) ++ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE| ++ EVP_MD_FLAG_DIGALGID_ABSENT| ++#endif ++ EVP_MD_FLAG_ONESHOT, ++ cryptodev_digest_init, ++ cryptodev_digest_update, ++ cryptodev_digest_final, ++ cryptodev_digest_copy, ++ cryptodev_digest_cleanup, ++ EVP_PKEY_RSA_method, ++ SHA512_CBLOCK, ++ sizeof(EVP_MD *)+sizeof(struct dev_crypto_state), ++}; ++ ++static const EVP_MD cryptodev_sha512 = { ++ NID_sha512, ++ NID_sha512WithRSAEncryption, ++ SHA512_DIGEST_LENGTH, ++#if defined(EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) && defined(EVP_MD_FLAG_DIGALGID_ABSENT) ++ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE| ++ EVP_MD_FLAG_DIGALGID_ABSENT| ++#endif ++ EVP_MD_FLAG_ONESHOT, ++ cryptodev_digest_init, ++ cryptodev_digest_update, ++ cryptodev_digest_final, ++ cryptodev_digest_copy, ++ cryptodev_digest_cleanup, ++ EVP_PKEY_RSA_method, ++ SHA512_CBLOCK, ++ sizeof(EVP_MD *)+sizeof(struct dev_crypto_state), ++}; ++ ++static const EVP_MD cryptodev_md5 = { + NID_md5, +- NID_undef, ++ NID_md5WithRSAEncryption, + 16 /* MD5_DIGEST_LENGTH */ , ++#if defined(EVP_MD_FLAG_PKEY_METHOD_SIGNATURE) && defined(EVP_MD_FLAG_DIGALGID_ABSENT) ++ EVP_MD_FLAG_PKEY_METHOD_SIGNATURE| ++ EVP_MD_FLAG_DIGALGID_ABSENT| ++#endif + EVP_MD_FLAG_ONESHOT, + cryptodev_digest_init, + cryptodev_digest_update, + cryptodev_digest_final, + cryptodev_digest_copy, + cryptodev_digest_cleanup, +- EVP_PKEY_NULL_method, ++ EVP_PKEY_RSA_method, + 64 /* MD5_CBLOCK */ , +- sizeof(struct dev_crypto_state), ++ sizeof(EVP_MD *)+sizeof(struct dev_crypto_state), + }; + + # endif /* USE_CRYPTODEV_DIGESTS */ +@@ -992,6 +1076,18 @@ cryptodev_engine_digests(ENGINE *e, const EVP_MD **digest, + case NID_sha1: + *digest = &cryptodev_sha1; + break; ++ case NID_sha224: ++ *digest = &cryptodev_sha224; ++ break; ++ case NID_sha256: ++ *digest = &cryptodev_sha256; ++ break; ++ case NID_sha384: ++ *digest = &cryptodev_sha384; ++ break; ++ case NID_sha512: ++ *digest = &cryptodev_sha512; ++ break; + default: + # endif /* USE_CRYPTODEV_DIGESTS */ + *digest = NULL; +@@ -1022,7 +1118,7 @@ static int bn2crparam(const BIGNUM *a, struct crparam *crp) + return (1); + memset(b, 0, bytes); + +- crp->crp_p = (caddr_t) b; ++ crp->crp_p = (void*) b; + crp->crp_nbits = bits; + + for (i = 0, j = 0; i < a->top; i++) { +@@ -1277,7 +1373,7 @@ static DSA_SIG *cryptodev_dsa_do_sign(const unsigned char *dgst, int dlen, + kop.crk_op = CRK_DSA_SIGN; + + /* inputs: dgst dsa->p dsa->q dsa->g dsa->priv_key */ +- kop.crk_param[0].crp_p = (caddr_t) dgst; ++ kop.crk_param[0].crp_p = (void*)dgst; + kop.crk_param[0].crp_nbits = dlen * 8; + if (bn2crparam(dsa->p, &kop.crk_param[1])) + goto err; +@@ -1317,7 +1413,7 @@ cryptodev_dsa_verify(const unsigned char *dgst, int dlen, + kop.crk_op = CRK_DSA_VERIFY; + + /* inputs: dgst dsa->p dsa->q dsa->g dsa->pub_key sig->r sig->s */ +- kop.crk_param[0].crp_p = (caddr_t) dgst; ++ kop.crk_param[0].crp_p = (void*)dgst; + kop.crk_param[0].crp_nbits = dlen * 8; + if (bn2crparam(dsa->p, &kop.crk_param[1])) + goto err; +@@ -1398,9 +1494,10 @@ cryptodev_dh_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) + goto err; + kop.crk_iparams = 3; + +- kop.crk_param[3].crp_p = (caddr_t) key; +- kop.crk_param[3].crp_nbits = keylen * 8; ++ kop.crk_param[3].crp_p = (void*) key; ++ kop.crk_param[3].crp_nbits = keylen; + kop.crk_oparams = 1; ++ dhret = keylen / 8; + + if (ioctl(fd, CIOCKEY, &kop) == -1) { + const DH_METHOD *meth = DH_OpenSSL(); +@@ -1470,7 +1567,7 @@ void ENGINE_load_cryptodev(void) + put_dev_crypto(fd); + + if (!ENGINE_set_id(engine, "cryptodev") || +- !ENGINE_set_name(engine, "BSD cryptodev engine") || ++ !ENGINE_set_name(engine, "cryptodev engine") || + !ENGINE_set_ciphers(engine, cryptodev_engine_ciphers) || + !ENGINE_set_digests(engine, cryptodev_engine_digests) || + !ENGINE_set_ctrl_function(engine, cryptodev_ctrl) || +-- +1.9.1 + diff --git a/package/openssl/Config.in b/package/openssl/Config.in new file mode 100644 index 0000000000..e08b648ba4 --- /dev/null +++ b/package/openssl/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_OPENSSL + bool "openssl" + select BR2_PACKAGE_ZLIB + help + A collaborative effort to develop a robust, commercial-grade, fully + featured, and Open Source toolkit implementing the Secure Sockets + Layer (SSL v2/v3) and Transport Security (TLS v1) as well as a + full-strength general-purpose cryptography library. + + http://www.openssl.org/ + + Note: Some helper scripts need perl. + +if BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_OPENSSL_BIN + bool "openssl binary" + help + Install the openssl binary and the associated helper scripts to the + target file system. This is a command line tool for doing various + cryptographic stuff. + +config BR2_PACKAGE_OPENSSL_ENGINES + bool "openssl additional engines" + help + Install additional encryption engine libraries. + +endif diff --git a/package/openssl/openssl.hash b/package/openssl/openssl.hash new file mode 100644 index 0000000000..edbce8e276 --- /dev/null +++ b/package/openssl/openssl.hash @@ -0,0 +1,7 @@ +# From https://www.openssl.org/source/openssl-1.0.2h.tar.gz.sha256 +sha256 1d4007e53aad94a5b2002fe045ee7bb0b3d98f1a47f8b2bc851dcd1c74332919 openssl-1.0.2h.tar.gz +# Locally computed +sha256 eddd8a5123748052c598214487ac178e4bfa4e31ba2ec520c70d59c8c5bfa2e9 openssl-1.0.2a-parallel-install-dirs.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d +sha256 147c3eeaad614c044749ea527cb433eae5e2d5cad34a78c6ba61cd967bfbe01f openssl-1.0.2a-parallel-obj-headers.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d +sha256 30cb49489de5041841a74da9155cd4fabfbce33237262ba7cd23974314ae2956 openssl-1.0.2a-parallel-symlinking.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d +sha256 deaf6f3af41874ecc6d63841ea14b8e6c71cea81d4a511a754bc90c9a993147f openssl-1.0.2d-parallel-build.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d diff --git a/package/openssl/openssl.mk b/package/openssl/openssl.mk new file mode 100644 index 0000000000..2368aa913c --- /dev/null +++ b/package/openssl/openssl.mk @@ -0,0 +1,168 @@ +################################################################################ +# +# openssl +# +################################################################################ + +OPENSSL_VERSION = 1.0.2h +OPENSSL_SITE = http://www.openssl.org/source +OPENSSL_LICENSE = OpenSSL or SSLeay +OPENSSL_LICENSE_FILES = LICENSE +OPENSSL_INSTALL_STAGING = YES +OPENSSL_DEPENDENCIES = zlib +HOST_OPENSSL_DEPENDENCIES = host-zlib +OPENSSL_TARGET_ARCH = generic32 +OPENSSL_CFLAGS = $(TARGET_CFLAGS) +OPENSSL_PATCH = \ + https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2d-parallel-build.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d \ + https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2a-parallel-obj-headers.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d \ + https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2a-parallel-install-dirs.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d \ + https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-libs/openssl/files/openssl-1.0.2a-parallel-symlinking.patch?id=c8abcbe8de5d3b6cdd68c162f398c011ff6e2d9d + +ifeq ($(BR2_USE_MMU),) +OPENSSL_CFLAGS += -DHAVE_FORK=0 +endif + +ifeq ($(BR2_PACKAGE_CRYPTODEV_LINUX),y) +OPENSSL_CFLAGS += -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS +OPENSSL_DEPENDENCIES += cryptodev-linux +endif + +ifeq ($(BR2_PACKAGE_OCF_LINUX),y) +OPENSSL_CFLAGS += -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS +OPENSSL_DEPENDENCIES += ocf-linux +endif + +# Some architectures are optimized in OpenSSL +ifeq ($(ARCH),arm) +OPENSSL_TARGET_ARCH = armv4 +endif +ifeq ($(ARCH),aarch64) +OPENSSL_TARGET_ARCH = aarch64 +endif +ifeq ($(ARCH),powerpc) +# 4xx cores seem to have trouble with openssl's ASM optimizations +ifeq ($(BR2_powerpc_401)$(BR2_powerpc_403)$(BR2_powerpc_405)$(BR2_powerpc_405fp)$(BR2_powerpc_440)$(BR2_powerpc_440fp),) +OPENSSL_TARGET_ARCH = ppc +endif +endif +ifeq ($(ARCH),powerpc64) +OPENSSL_TARGET_ARCH = ppc64 +endif +ifeq ($(ARCH),powerpc64le) +OPENSSL_TARGET_ARCH = ppc64le +endif +ifeq ($(ARCH),x86_64) +OPENSSL_TARGET_ARCH = x86_64 +endif + +define HOST_OPENSSL_CONFIGURE_CMDS + (cd $(@D); \ + $(HOST_CONFIGURE_OPTS) \ + ./config \ + --prefix=$(HOST_DIR)/usr \ + --openssldir=$(HOST_DIR)/etc/ssl \ + --libdir=/lib \ + shared \ + zlib-dynamic \ + ) + $(SED) "s#-O[0-9]#$(HOST_CFLAGS)#" $(@D)/Makefile +endef + +define OPENSSL_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_ARGS) \ + $(TARGET_CONFIGURE_OPTS) \ + ./Configure \ + linux-$(OPENSSL_TARGET_ARCH) \ + --prefix=/usr \ + --openssldir=/etc/ssl \ + --libdir=/lib \ + $(if $(BR2_TOOLCHAIN_HAS_THREADS),threads,no-threads) \ + $(if $(BR2_STATIC_LIBS),no-shared,shared) \ + no-rc5 \ + enable-camellia \ + enable-mdc2 \ + enable-tlsext \ + $(if $(BR2_STATIC_LIBS),zlib,zlib-dynamic) \ + $(if $(BR2_STATIC_LIBS),no-dso) \ + ) + $(SED) "s#-march=[-a-z0-9] ##" -e "s#-mcpu=[-a-z0-9] ##g" $(@D)/Makefile + $(SED) "s#-O[0-9]#$(OPENSSL_CFLAGS)#" $(@D)/Makefile + $(SED) "s# build_tests##" $(@D)/Makefile +endef + +# libdl is not available in a static build, and this is not implied by no-dso +ifeq ($(BR2_STATIC_LIBS),y) +define OPENSSL_FIXUP_STATIC_MAKEFILE + $(SED) 's#-ldl##g' $(@D)/Makefile +endef +OPENSSL_POST_CONFIGURE_HOOKS += OPENSSL_FIXUP_STATIC_MAKEFILE +endif + +define HOST_OPENSSL_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define OPENSSL_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define OPENSSL_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) INSTALL_PREFIX=$(STAGING_DIR) install +endef + +define HOST_OPENSSL_INSTALL_CMDS + $(MAKE) -C $(@D) install +endef + +define OPENSSL_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) INSTALL_PREFIX=$(TARGET_DIR) install + rm -rf $(TARGET_DIR)/usr/lib/ssl + rm -f $(TARGET_DIR)/usr/bin/c_rehash +endef + +# libdl has no business in a static build +ifeq ($(BR2_STATIC_LIBS),y) +define OPENSSL_FIXUP_STATIC_PKGCONFIG + $(SED) 's#-ldl##' $(STAGING_DIR)/usr/lib/pkgconfig/libcrypto.pc + $(SED) 's#-ldl##' $(STAGING_DIR)/usr/lib/pkgconfig/libssl.pc + $(SED) 's#-ldl##' $(STAGING_DIR)/usr/lib/pkgconfig/openssl.pc +endef +OPENSSL_POST_INSTALL_STAGING_HOOKS += OPENSSL_FIXUP_STATIC_PKGCONFIG +endif + +ifneq ($(BR2_STATIC_LIBS),y) +# libraries gets installed read only, so strip fails +define OPENSSL_INSTALL_FIXUPS_SHARED + chmod +w $(TARGET_DIR)/usr/lib/engines/lib*.so + for i in $(addprefix $(TARGET_DIR)/usr/lib/,libcrypto.so.* libssl.so.*); \ + do chmod +w $$i; done +endef +OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_INSTALL_FIXUPS_SHARED +endif + +ifeq ($(BR2_PACKAGE_PERL),) +define OPENSSL_REMOVE_PERL_SCRIPTS + $(RM) -f $(TARGET_DIR)/etc/ssl/misc/{CA.pl,tsget} +endef +OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_REMOVE_PERL_SCRIPTS +endif + +ifeq ($(BR2_PACKAGE_OPENSSL_BIN),) +define OPENSSL_REMOVE_BIN + $(RM) -f $(TARGET_DIR)/usr/bin/openssl + $(RM) -f $(TARGET_DIR)/etc/ssl/misc/{CA.*,c_*} +endef +OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_REMOVE_BIN +endif + +ifneq ($(BR2_PACKAGE_OPENSSL_ENGINES),y) +define OPENSSL_REMOVE_OPENSSL_ENGINES + rm -rf $(TARGET_DIR)/usr/lib/engines +endef +OPENSSL_POST_INSTALL_TARGET_HOOKS += OPENSSL_REMOVE_OPENSSL_ENGINES +endif + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/openswan/Config.in b/package/openswan/Config.in new file mode 100644 index 0000000000..0370143ed1 --- /dev/null +++ b/package/openswan/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_OPENSWAN + bool "openswan" + depends on BR2_USE_MMU # iproute2 + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # iproute2 + select BR2_PACKAGE_GMP + select BR2_PACKAGE_IPROUTE2 + help + Openswan is an implementation of IPsec for Linux + + http://www.openswan.org + +comment "openswan needs a toolchain w/ headers >= 3.0" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 diff --git a/package/openswan/openswan.hash b/package/openswan/openswan.hash new file mode 100644 index 0000000000..5929f8d190 --- /dev/null +++ b/package/openswan/openswan.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c1605c96d3c3cf357cefea7622f3acbc7a02d6a3cebfb76979327b566084a5ea openswan-2.6.46.tar.gz diff --git a/package/openswan/openswan.mk b/package/openswan/openswan.mk new file mode 100644 index 0000000000..54bd4b3eff --- /dev/null +++ b/package/openswan/openswan.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# openswan +# +################################################################################ + +OPENSWAN_VERSION = 2.6.46 +OPENSWAN_SITE = http://download.openswan.org/openswan +OPENSWAN_LICENSE = GPLv2+, BSD-3c +OPENSWAN_LICENSE_FILES = COPYING LICENSE + +OPENSWAN_DEPENDENCIES = host-bison host-flex gmp iproute2 +OPENSWAN_MAKE_OPTS = ARCH=$(BR2_ARCH) CC="$(TARGET_CC)" \ + USERCOMPILE="$(TARGET_CFLAGS) $(if $(BR2_STATIC_LIBS),,-fPIE)" \ + USERLINK="$(TARGET_LDFLAGS) $(if $(BR2_STATIC_LIBS),,-fPIE)" \ + INC_USRLOCAL=/usr USE_KLIPS=false USE_MAST=false USE_NM=false + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +OPENSWAN_DEPENDENCIES += libcurl +OPENSWAN_MAKE_OPTS += USE_LIBCURL=true +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +OPENSWAN_DEPENDENCIES += openssl +OPENSWAN_MAKE_OPTS += HAVE_OPENSSL=true +ifeq ($(BR2_PACKAGE_OCF_LINUX),y) +OPENSWAN_MAKE_OPTS += HAVE_OCF=true +endif +endif + +define OPENSWAN_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) \ + $(OPENSWAN_MAKE_OPTS) programs +endef + +define OPENSWAN_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) \ + $(OPENSWAN_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/opentyrian-data/Config.in b/package/opentyrian-data/Config.in new file mode 100644 index 0000000000..df25c218ea --- /dev/null +++ b/package/opentyrian-data/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_OPENTYRIAN_DATA + bool "OpenTyrian data" + depends on BR2_PACKAGE_OPENTYRIAN + help + Data files to use with OpenTyrian game. Currently only the original + Tyrian 2.1 data files, that have been released as Freeware in 2004, + are compatible. + + http://code.google.com/p/opentyrian/wiki/FAQ diff --git a/package/opentyrian-data/opentyrian-data.hash b/package/opentyrian-data/opentyrian-data.hash new file mode 100644 index 0000000000..9a7079c4ae --- /dev/null +++ b/package/opentyrian-data/opentyrian-data.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7790d09a2a3addcd33c66ef063d5900eb81cc9c342f4807eb8356364dd1d9277 tyrian21.zip diff --git a/package/opentyrian-data/opentyrian-data.mk b/package/opentyrian-data/opentyrian-data.mk new file mode 100644 index 0000000000..4b879df1c3 --- /dev/null +++ b/package/opentyrian-data/opentyrian-data.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# opentyrian-data +# +################################################################################ + +OPENTYRIAN_DATA_VERSION = 2.1 +OPENTYRIAN_DATA_SITE = http://www.camanis.net/opentyrian +OPENTYRIAN_DATA_SOURCE = tyrian21.zip +OPENTYRIAN_DATA_LICENSE = Freeware + +define OPENTYRIAN_DATA_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(DL_DIR)/$(OPENTYRIAN_DATA_SOURCE) +endef + +define OPENTYRIAN_DATA_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/share/opentyrian/data/ + cp $(@D)/tyrian21/* $(TARGET_DIR)/usr/share/opentyrian/data/ + rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.doc + rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.exe +endef + +$(eval $(generic-package)) diff --git a/package/opentyrian/Config.in b/package/opentyrian/Config.in new file mode 100644 index 0000000000..b0c519fae8 --- /dev/null +++ b/package/opentyrian/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_OPENTYRIAN + bool "OpenTyrian" + select BR2_PACKAGE_SDL + select BR2_PACKAGE_OPENTYRIAN_DATA + help + OpenTyrian is a port of the DOS shoot-em-up Tyrian. It uses SDL, + making it easily cross-platform. + It requires the original data files to run. + A display with minimum 640x480 resolution and a keyboard are needed + to play the game. + If you want some sound, activate ALSA with OSS emulation. + + https://bitbucket.org/opentyrian/opentyrian/wiki/Home + +if BR2_PACKAGE_OPENTYRIAN + +config BR2_PACKAGE_OPENTYRIAN_NET + bool "network support" + default y + select BR2_PACKAGE_SDL_NET + help + Activates network support in OpenTyrian. Will add SDL_net. + +endif diff --git a/package/opentyrian/opentyrian.mk b/package/opentyrian/opentyrian.mk new file mode 100644 index 0000000000..b74e4cf3f2 --- /dev/null +++ b/package/opentyrian/opentyrian.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# opentyrian +# +################################################################################ + +OPENTYRIAN_VERSION = 9c9f0ec3532b +OPENTYRIAN_SITE = https://bitbucket.org/opentyrian/opentyrian +OPENTYRIAN_SITE_METHOD = hg +OPENTYRIAN_LICENSE = GPLv2+ +OPENTYRIAN_LICENSE_FILES = COPYING + +OPENTYRIAN_DEPENDENCIES = sdl + +ifeq ($(BR2_PACKAGE_OPENTYRIAN_NET),y) +OPENTYRIAN_DEPENDENCIES += sdl_net +OPENTYRIAN_NETWORK = true +else +OPENTYRIAN_NETWORK = false +endif + +define OPENTYRIAN_BUILD_CMDS + $(MAKE) PLATFORM=UNIX \ + CC="$(TARGET_CC)" \ + STRIP="/bin/true" \ + SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \ + LDFLAGS="-lm" \ + WITH_NETWORK="$(OPENTYRIAN_NETWORK)" \ + -C $(@D) release +endef + +define OPENTYRIAN_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/opentyrian $(TARGET_DIR)/usr/bin/opentyrian +endef + +$(eval $(generic-package)) diff --git a/package/openvmtools/0001-has_bsd_printf.patch b/package/openvmtools/0001-has_bsd_printf.patch new file mode 100644 index 0000000000..df23f00414 --- /dev/null +++ b/package/openvmtools/0001-has_bsd_printf.patch @@ -0,0 +1,26 @@ +lib/misc/msgList.c: missing #ifdef + +This macro checks for BSD style printf(), which is not present +when compiling for uClibc. The linked functions are unnecessary in +this case, and they break compilation. + +Signed-off-by: Karoly Kasza + +--- openvmtools-stable-9.10.0.orig/open-vm-tools/lib/misc/msgList.c 2015-06-17 10:01:00.000000000 +0200 ++++ openvmtools-stable-9.10.0/open-vm-tools/lib/misc/msgList.c 2015-06-17 10:01:00.000000000 +0200 +@@ -487,6 +487,7 @@ + return messages->id; + } + ++#ifdef HAS_BSD_PRINTF + + /* + *---------------------------------------------------------------------- +@@ -566,6 +567,7 @@ + } + } + ++#endif + + /* + *---------------------------------------------------------------------- diff --git a/package/openvmtools/0002-no_cflags_werror.patch b/package/openvmtools/0002-no_cflags_werror.patch new file mode 100644 index 0000000000..1621574f81 --- /dev/null +++ b/package/openvmtools/0002-no_cflags_werror.patch @@ -0,0 +1,18 @@ +configure.ac: disable -Werror + +Disable the mandatory flag -Werror in configure.ac. + +Signed-off-by: Karoly Kasza + +--- openvmtools-stable-9.10.0.orig/open-vm-tools/configure.ac 2015-06-17 10:02:00.000000000 +0200 ++++ openvmtools-stable-9.10.0/open-vm-tools/configure.ac 2015-06-17 10:02:00.000000000 +0200 +@@ -935,7 +935,7 @@ + + ### General flags / actions + CFLAGS="$CFLAGS -Wall" +-CFLAGS="$CFLAGS -Werror" ++# CFLAGS="$CFLAGS -Werror" + + # -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident' + # in Xlib.h on OpenSolaris. + diff --git a/package/openvmtools/0003-dont-force-cppflags.patch b/package/openvmtools/0003-dont-force-cppflags.patch new file mode 100644 index 0000000000..c8fa6b17c1 --- /dev/null +++ b/package/openvmtools/0003-dont-force-cppflags.patch @@ -0,0 +1,21 @@ +m4: do not force -I/usr/include in CPPFLAGS + +This is so horribly broken for cross-compilation. :-( + +Signed-off-by: "Yann E. MORIN" + +--- openvmtools-stable-9.10.0.orig/open-vm-tools/m4/vmtools.m4 2015-06-17 10:03:00.000000000 +0200 ++++ openvmtools-stable-9.10.0/open-vm-tools/m4/vmtools.m4 2015-06-17 10:03:00.000000000 +0200 +@@ -281,10 +281,10 @@ + if test "$os" = freebsd; then + CUSTOM_$1_CPPFLAGS="-I/usr/local/include" + else +- CUSTOM_$1_CPPFLAGS="-I/usr/include" ++ CUSTOM_$1_CPPFLAGS=" " + fi + if test -n "$2"; then +- CUSTOM_$1_CPPFLAGS="${CUSTOM_$1_CPPFLAGS}/$2" ++ : CUSTOM_$1_CPPFLAGS="${CUSTOM_$1_CPPFLAGS}/$2" + fi + fi + ]) diff --git a/package/openvmtools/0004-uclibc_secure_getenv.patch b/package/openvmtools/0004-uclibc_secure_getenv.patch new file mode 100644 index 0000000000..6fb9ebd723 --- /dev/null +++ b/package/openvmtools/0004-uclibc_secure_getenv.patch @@ -0,0 +1,18 @@ +lib/misc/idLinux.c: add uClibc support + +uClibc does not have a secure_getenv function, so we use the +Android method. + +Signed-off-by: Karoly Kasza + +--- openvmtools-stable-9.10.0.orig/open-vm-tools/lib/misc/idLinux.c 2015-06-17 10:04:00.000000000 +0200 ++++ openvmtools-stable-9.10.0/open-vm-tools/lib/misc/idLinux.c 2015-06-17 10:04:00.000000000 +0200 +@@ -997,7 +997,7 @@ + static Bool + IdIsSetUGid(void) + { +-#if defined(__ANDROID__) ++#if defined(__ANDROID__) || defined(__UCLIBC__) + /* Android does not have a secure_getenv, so be conservative. */ + return TRUE; + #else diff --git a/package/openvmtools/Config.in b/package/openvmtools/Config.in new file mode 100644 index 0000000000..64bf65c5c9 --- /dev/null +++ b/package/openvmtools/Config.in @@ -0,0 +1,54 @@ +config BR2_PACKAGE_OPENVMTOOLS + bool "openvmtools" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_USE_MMU # libglib2 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + depends on BR2_ENABLE_LOCALE + depends on !BR2_TOOLCHAIN_USES_UCLIBC + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBDNET + help + Open Virtual Machine Tools for VMware guest OS + + http://open-vm-tools.sourceforge.net/ + + ICU locales, Xerces, and X11 tools are currently not supported. + + NOTE: Support for vmblock-fuse will be enabled in openvmtools if the + libfuse package is selected. + +if BR2_PACKAGE_OPENVMTOOLS + +config BR2_PACKAGE_OPENVMTOOLS_PROCPS + bool "procps support" + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_PROCPS_NG + help + Enable support for procps / meminfo + +comment "procps support needs BR2_PACKAGE_BUSYBOX_SHOW_OTHERS" + depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + +config BR2_PACKAGE_OPENVMTOOLS_PAM + bool "PAM support" + select BR2_PACKAGE_LINUX_PAM + # linux-pam needs locale and wchar, but we already have this + # dependency on the main symbol, above. + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + help + Support for PAM in openvmtools + +comment "PAM support needs an (e)glibc toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + +endif + +comment "openvmtools needs an (e)glibc or musl toolchain w/ wchar, threads, RPC, locale" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_HAS_NATIVE_RPC || !BR2_ENABLE_LOCALE || \ + BR2_TOOLCHAIN_USES_UCLIBC diff --git a/package/openvmtools/S10vmtoolsd b/package/openvmtools/S10vmtoolsd new file mode 100644 index 0000000000..6afb9ca08a --- /dev/null +++ b/package/openvmtools/S10vmtoolsd @@ -0,0 +1,33 @@ +#!/bin/sh +# +# Starts vmtoolsd for openvmtools +# + +EXEC="/usr/bin/vmtoolsd" +ARGS="-b" +PID="/var/run/vmtoolsd.pid" + +case "$1" in + start) + printf "Starting vmtoolsd: " + start-stop-daemon -S -q -x $EXEC -- $ARGS $PID + if [ $? != 0 ]; then + echo "FAILED" + exit 1 + else + echo "OK" + fi + ;; + stop) + printf "Stopping vmtoolsd: " + start-stop-daemon -K -q -p $PID + echo "OK" + ;; + restart|reload) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/openvmtools/openvmtools.mk b/package/openvmtools/openvmtools.mk new file mode 100644 index 0000000000..40a7dac098 --- /dev/null +++ b/package/openvmtools/openvmtools.mk @@ -0,0 +1,81 @@ +################################################################################ +# +# openvmtools +# +################################################################################ + +OPENVMTOOLS_VERSION = stable-9.10.2 +OPENVMTOOLS_SITE = $(call github,vmware,open-vm-tools,$(OPENVMTOOLS_VERSION)) +OPENVMTOOLS_SUBDIR = open-vm-tools +OPENVMTOOLS_LICENSE = LGPLv2.1 +OPENVMTOOLS_LICENSE_FILES = $(OPENVMTOOLS_SUBDIR)/COPYING +# Autoreconf needed or config/missing will run configure again at buildtime +OPENVMTOOLS_AUTORECONF = YES +OPENVMTOOLS_CONF_OPTS = --with-dnet \ + --without-icu --without-x --without-gtk2 \ + --without-gtkmm --without-kernel-modules \ + --disable-deploypkg --without-xerces +OPENVMTOOLS_CONF_ENV += CUSTOM_DNET_CPPFLAGS=" " +OPENVMTOOLS_DEPENDENCIES = libglib2 libdnet + +# When libfuse is available, openvmtools can build vmblock-fuse, so +# make sure that libfuse gets built first +ifeq ($(BR2_PACKAGE_LIBFUSE),y) +OPENVMTOOLS_DEPENDENCIES += libfuse +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +OPENVMTOOLS_CONF_OPTS += --with-ssl +OPENVMTOOLS_DEPENDENCIES += openssl +else +OPENVMTOOLS_CONF_OPTS += --without-ssl +endif + +ifeq ($(BR2_PACKAGE_OPENVMTOOLS_PROCPS),y) +OPENVMTOOLS_CONF_OPTS += --with-procps +OPENVMTOOLS_DEPENDENCIES += procps-ng +else +OPENVMTOOLS_CONF_OPTS += --without-procps +endif + +ifeq ($(BR2_PACKAGE_OPENVMTOOLS_PAM),y) +OPENVMTOOLS_CONF_OPTS += --with-pam +OPENVMTOOLS_DEPENDENCIES += linux-pam +else +OPENVMTOOLS_CONF_OPTS += --without-pam +endif + +# configure needs execution permission +define OPENVMTOOLS_PRE_CONFIGURE_CHMOD + chmod 0755 $(@D)/$(OPENVMTOOLS_SUBDIR)/configure +endef + +OPENVMTOOLS_PRE_CONFIGURE_HOOKS += OPENVMTOOLS_PRE_CONFIGURE_CHMOD + +# symlink needed by lib/system/systemLinux.c (or will cry in /var/log/messages) +# defined in lib/misc/hostinfoPosix.c +# /sbin/shutdown needed for Guest OS restart/shutdown from hypervisor +define OPENVMTOOLS_POST_INSTALL_TARGET_THINGIES + ln -fs os-release $(TARGET_DIR)/etc/lfs-release + if [ ! -e $(TARGET_DIR)/sbin/shutdown ]; then \ + $(INSTALL) -D -m 755 package/openvmtools/shutdown \ + $(TARGET_DIR)/sbin/shutdown; \ + fi +endef + +OPENVMTOOLS_POST_INSTALL_TARGET_HOOKS += OPENVMTOOLS_POST_INSTALL_TARGET_THINGIES + +define OPENVMTOOLS_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/openvmtools/S10vmtoolsd \ + $(TARGET_DIR)/etc/init.d/S10vmtoolsd +endef + +define OPENVMTOOLS_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/openvmtools/vmtoolsd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/vmtoolsd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/vmtoolsd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/vmtoolsd.service +endef + +$(eval $(autotools-package)) diff --git a/package/openvmtools/shutdown b/package/openvmtools/shutdown new file mode 100644 index 0000000000..bca9765a38 --- /dev/null +++ b/package/openvmtools/shutdown @@ -0,0 +1,7 @@ +#!/bin/sh +#compatibility script for openvmtools +if [ "$1" == "-r" ]; then +/sbin/reboot +else +/sbin/poweroff +fi diff --git a/package/openvmtools/vmtoolsd.service b/package/openvmtools/vmtoolsd.service new file mode 100644 index 0000000000..17a4df44c2 --- /dev/null +++ b/package/openvmtools/vmtoolsd.service @@ -0,0 +1,14 @@ +[Unit] +Description=vmtoolsd for openvmtools +After=syslog.target network.target + +[Service] +Type=forking +PIDFile=/var/run/vmtoolsd.pid +ExecStart=/usr/bin/vmtoolsd -b /var/run/vmtoolsd.pid +Restart=on-failure +KillMode=process +KillSignal=SIGKILL + +[Install] +WantedBy=multi-user.target diff --git a/package/openvpn/Config.in b/package/openvpn/Config.in new file mode 100644 index 0000000000..8ba4ea197f --- /dev/null +++ b/package/openvpn/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_OPENVPN + bool "openvpn" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_OPENSSL + help + OpenVPN is a full-featured SSL VPN solution which can + accomodate a wide range of configurations, including road + warrior access, home/office/campus telecommuting, WiFi + security, secure branch office linking, and enterprise-scale + remote access solutions with load balancing, failover, and + fine-grained access-controls. + + http://openvpn.net/ + +if BR2_PACKAGE_OPENVPN + +config BR2_PACKAGE_OPENVPN_LZO + bool "LZO compression" + default y + select BR2_PACKAGE_LZO + help + Enable LZO compression. + +config BR2_PACKAGE_OPENVPN_SMALL + bool "Optimize for small size" + help + Make OpenVPN as small as possible. + You loose eurephia, debugging info, help messages and more. + It saves around 100 KiB in binary file size. + +config BR2_PACKAGE_OPENVPN_PWSAVE + bool "Allow passwords in files" + help + Allow --askpass and --auth-user-pass passwords to be read + from a file. + +endif diff --git a/package/openvpn/S60openvpn b/package/openvpn/S60openvpn new file mode 100755 index 0000000000..de82a5095e --- /dev/null +++ b/package/openvpn/S60openvpn @@ -0,0 +1,103 @@ +#!/bin/sh -e +# +# Original version by Robert Leslie +# , edited by iwj and cs +# Modified for openvpn by Alberto Gonzalez Iniesta +# Modified for restarting / starting / stopping single tunnels by Richard Mueller + +test $DEBIAN_SCRIPT_DEBUG && set -v -x + +DAEMON=/usr/sbin/openvpn +CONFIG_DIR=/etc/openvpn +test -x $DAEMON || exit 0 +test -d $CONFIG_DIR || exit 0 + +start_vpn () { + $DAEMON --daemon --writepid /var/run/openvpn.$NAME.pid \ + --config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || printf " FAILED->" + printf " $NAME" +} +stop_vpn () { + kill `cat $PIDFILE` || true + rm $PIDFILE +} + +case "$1" in +start) + printf "Starting openvpn:" + + if test -z $2 ; then + for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do + NAME=${CONFIG%%.conf} + start_vpn + done + else + if test -e $CONFIG_DIR/$2.conf ; then + NAME=$2 + start_vpn + else + printf " No such VPN: $2" + fi + fi + echo "." + + ;; +stop) + printf "Stopping openvpn:" + + if test -z $2 ; then + for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do + NAME=`echo $PIDFILE | cut -c18-` + NAME=${NAME%%.pid} + stop_vpn + printf " $NAME" + done + else + if test -e /var/run/openvpn.$2.pid ; then + PIDFILE=`ls /var/run/openvpn.$2.pid 2> /dev/null` + NAME=`echo $PIDFILE | cut -c18-` + NAME=${NAME%%.pid} + stop_vpn + printf " $NAME" + else + printf " No such VPN: $2" + fi + fi + echo "." + ;; +# We only 'reload' for running VPNs. New ones will only start with 'start' or 'restart'. +reload|force-reload) + printf "Reloading openvpn:" + for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do + NAME=`echo $PIDFILE | cut -c18-` + NAME=${NAME%%.pid} +# If openvpn if running under a different user than root we'll need to restart + if egrep '^( |\t)*user' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then + stop_vpn + sleep 1 + start_vpn + printf "(restarted)" + else + kill -HUP `cat $PIDFILE` || true +# start-stop-daemon --stop --signal HUP --quiet --oknodo \ +# --exec $DAEMON --pidfile $PIDFILE + printf " $NAME" + fi + done + echo "." + ;; + +restart) + $0 stop $2 + sleep 1 + $0 start $2 + ;; +*) + echo "Usage: $0 {start|stop|reload|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 + +# vim:set ai et sts=2 sw=2 tw=0: diff --git a/package/openvpn/openvpn.hash b/package/openvpn/openvpn.hash new file mode 100644 index 0000000000..179198e50e --- /dev/null +++ b/package/openvpn/openvpn.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 0f5f1ca1dc5743fa166d93dd4ec952f014b5f33bafd88f0ea34b455cae1434a7 openvpn-2.3.11.tar.xz diff --git a/package/openvpn/openvpn.mk b/package/openvpn/openvpn.mk new file mode 100644 index 0000000000..f3985cd2ef --- /dev/null +++ b/package/openvpn/openvpn.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# openvpn +# +################################################################################ + +OPENVPN_VERSION = 2.3.11 +OPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz +OPENVPN_SITE = http://swupdate.openvpn.net/community/releases +OPENVPN_DEPENDENCIES = host-pkgconf openssl +OPENVPN_LICENSE = GPLv2 +OPENVPN_LICENSE_FILES = COPYRIGHT.GPL +OPENVPN_CONF_OPTS = \ + --disable-plugin-auth-pam \ + --enable-iproute2 \ + --with-crypto-library=openssl \ + $(if $(BR2_STATIC_LIBS),--disable-plugins) +OPENVPN_CONF_ENV = IFCONFIG=/sbin/ifconfig \ + NETSTAT=/bin/netstat \ + ROUTE=/sbin/route + +ifeq ($(BR2_PACKAGE_OPENVPN_SMALL),y) +OPENVPN_CONF_OPTS += \ + --enable-small \ + --disable-plugins \ + --disable-eurephia +endif + +# BusyBox 1.21+ places the ip applet in the "correct" place +# but previous versions didn't. +ifeq ($(BR2_PACKAGE_IPROUTE2),y) +OPENVPN_CONF_ENV += IPROUTE=/sbin/ip +else ifeq ($(BR2_BUSYBOX_VERSION_1_19_X)$(BR2_BUSYBOX_VERSION_1_20_X),y) +OPENVPN_CONF_ENV += IPROUTE=/bin/ip +else +OPENVPN_CONF_ENV += IPROUTE=/sbin/ip +endif + +ifeq ($(BR2_PACKAGE_OPENVPN_LZO),y) +OPENVPN_DEPENDENCIES += lzo +else +OPENVPN_CONF_OPTS += --disable-lzo +endif + +ifeq ($(BR2_PACKAGE_OPENVPN_PWSAVE),y) +OPENVPN_CONF_OPTS += --enable-password-save +else +OPENVPN_CONF_OPTS += --disable-password-save +endif + +define OPENVPN_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 $(@D)/src/openvpn/openvpn \ + $(TARGET_DIR)/usr/sbin/openvpn +endef + +define OPENVPN_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/openvpn/S60openvpn \ + $(TARGET_DIR)/etc/init.d/S60openvpn +endef + +$(eval $(autotools-package)) diff --git a/package/opkg/Config.in b/package/opkg/Config.in new file mode 100644 index 0000000000..495ce91f3e --- /dev/null +++ b/package/opkg/Config.in @@ -0,0 +1,31 @@ +comment "opkg needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_OPKG + bool "opkg" + select BR2_PACKAGE_LIBARCHIVE + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR # libarchive + help + Opkg is a lightweight package management system, based on ipkg. It is + written in C and resembles apt/dpkg in operation. It is intended for + use on embedded Linux devices. + Opkg is maintained, stable, robust and conservative in its memory + usage, despite its buggy ipkg ancestry. As best it can, opkg + maintains backwards compatibility with ipkg and conforms to a subset + of debian's policy manual regarding control files. + + http://code.google.com/p/opkg/ + +if BR2_PACKAGE_OPKG + +config BR2_PACKAGE_OPKG_GPG_SIGN + bool "gnupg support" + select BR2_PACKAGE_LIBGPGME + select BR2_PACKAGE_LIBGPG_ERROR + help + Enable opkg package signature checking support using + gnupg/libgpgme. + +endif diff --git a/package/opkg/opkg.mk b/package/opkg/opkg.mk new file mode 100644 index 0000000000..bf19a60fbf --- /dev/null +++ b/package/opkg/opkg.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# opkg +# +################################################################################ + +OPKG_VERSION = v0.3.1 +OPKG_SITE = http://git.yoctoproject.org/git/opkg +OPKG_SITE_METHOD = git +# Uses PKG_CHECK_MODULES() in configure.ac +OPKG_DEPENDENCIES = host-pkgconf libarchive +OPKG_LICENSE = GPLv2+ +OPKG_LICENSE_FILES = COPYING +OPKG_INSTALL_STAGING = YES +OPKG_CONF_OPTS = --disable-curl +OPKG_AUTORECONF = YES + +# Ensure directory for lockfile exists +define OPKG_CREATE_LOCKDIR + mkdir -p $(TARGET_DIR)/usr/lib/opkg +endef + +ifeq ($(BR2_PACKAGE_OPKG_GPG_SIGN),y) +OPKG_CONF_OPTS += --enable-gpg +OPKG_CONF_ENV += \ + ac_cv_path_GPGME_CONFIG=$(STAGING_DIR)/usr/bin/gpgme-config \ + ac_cv_path_GPGERR_CONFIG=$(STAGING_DIR)/usr/bin/gpg-error-config +OPKG_DEPENDENCIES += libgpgme libgpg-error +else +OPKG_CONF_OPTS += --disable-gpg +endif + +OPKG_POST_INSTALL_TARGET_HOOKS += OPKG_CREATE_LOCKDIR + +$(eval $(autotools-package)) diff --git a/package/oprofile/0001-musl.patch b/package/oprofile/0001-musl.patch new file mode 100644 index 0000000000..094cd1647a --- /dev/null +++ b/package/oprofile/0001-musl.patch @@ -0,0 +1,48 @@ +Remove non-Posix use of FTW_ACTIONRETVAL + +The musl implementation of nftw doesn't support the glibc extension +FTW_ACTIONRETVAL. Since none of the features of FTW_ACTIONRETVAL are +used here, just use the normal nftw return value. + +Downloaded from: +https://github.com/openwrt-mirror/openwrt/blob/f22d5e25660106a48727c7aa5d1a73e4171a7987/package/devel/oprofile/patches/100-musl.patch +after I found a hint for the patch here: +http://patchwork.openembedded.org/patch/112675/ + +Removed unneeded patch for libop/op_events.c. + +Because openwrt removed the oprofile package from their repo last week +https://github.com/openwrt-mirror/openwrt/commit/aaf46a8524e138e1673a398e8d2dd9357405b313#diff-fe14456f94abf436d997e2c01c10f3bd +I decided to put this patch into the buildroot repo instead of adding +_PATCH to oprofile.mk + +Signed-off-by: Bernd Kuhls + +--- a/pe_profiling/operf.cpp ++++ b/pe_profiling/operf.cpp +@@ -857,11 +857,14 @@ static int __delete_old_previous_sample_ + int tflag __attribute__((unused)), + struct FTW *ftwbuf __attribute__((unused))) + { ++ int err; ++ + if (remove(fpath)) { ++ err = errno; + perror("sample data removal error"); +- return FTW_STOP; ++ return err; + } else { +- return FTW_CONTINUE; ++ return 0; + } + } + +@@ -896,7 +899,7 @@ static void convert_sample_data(void) + return; + + if (!operf_options::append) { +- int flags = FTW_DEPTH | FTW_ACTIONRETVAL; ++ int flags = FTW_DEPTH; + errno = 0; + if (nftw(previous_sampledir.c_str(), __delete_old_previous_sample_data, 32, flags) !=0 && + errno != ENOENT) { diff --git a/package/oprofile/Config.in b/package/oprofile/Config.in new file mode 100644 index 0000000000..7a88e4a87a --- /dev/null +++ b/package/oprofile/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_OPROFILE + bool "oprofile" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_POPT + select BR2_PACKAGE_BINUTILS + select BR2_PACKAGE_LIBPFM4 if BR2_powerpc + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_aarch64 && !BR2_nios2 # binutils + depends on BR2_USE_WCHAR # binutils + # no memory barrier functions + depends on !BR2_xtensa && !BR2_microblaze + # libpfm4 is needed on PowerPC, and requires thread support + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_powerpc + help + OProfile is a system-wide profiler for Linux systems, + capable of profiling all running code at low overhead. + OProfile is released under the GNU GPL. + + It consists of a kernel driver and a daemon for collecting + sample data, and several post-profiling tools for turning + data into information. + + OProfile leverages the hardware performance counters of the + CPU to enable profiling of a wide variety of interesting + statistics, which can also be used for basic time-spent + profiling. All code is profiled: hardware and software + interrupt handlers, kernel modules, the kernel, shared + libraries, and applications. + +comment "oprofile needs a toolchain w/ C++, wchar" + depends on BR2_USE_MMU + depends on !BR2_aarch64 && !BR2_nios2 && !BR2_xtensa && !BR2_microblaze + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR + +comment "oprofile needs a toolchain w/ NPTL on PPC" + depends on BR2_USE_MMU && BR2_powerpc + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL diff --git a/package/oprofile/oprofile.hash b/package/oprofile/oprofile.hash new file mode 100644 index 0000000000..cc15ed1100 --- /dev/null +++ b/package/oprofile/oprofile.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/oprofile/files/oprofile/oprofile-1.1.0/ +sha1 38c0d8812fe605f6ddd1cd183a482aa7605c0e81 oprofile-1.1.0.tar.gz +md5 248c4c069f9476f427fa7195563f9867 oprofile-1.1.0.tar.gz diff --git a/package/oprofile/oprofile.mk b/package/oprofile/oprofile.mk new file mode 100644 index 0000000000..d91ddab7f7 --- /dev/null +++ b/package/oprofile/oprofile.mk @@ -0,0 +1,69 @@ +################################################################################ +# +# oprofile +# +################################################################################ + +OPROFILE_VERSION = 1.1.0 +OPROFILE_SITE = http://downloads.sourceforge.net/project/oprofile/oprofile/oprofile-$(OPROFILE_VERSION) +OPROFILE_LICENSE = GPLv2+ +OPROFILE_LICENSE_FILES = COPYING +OPROFILE_CONF_OPTS = \ + --disable-account-check \ + --enable-gui=no \ + --with-kernel=$(STAGING_DIR)/usr + +OPROFILE_BINARIES = \ + utils/ophelp pp/opannotate pp/oparchive pp/opgprof \ + pp/opreport opjitconv/opjitconv \ + utils/op-check-perfevents libabi/opimport \ + pe_counting/ocount + +ifeq ($(BR2_i386),y) +OPROFILE_ARCH = i386 +endif +ifeq ($(BR2_mipsel),y) +OPROFILE_ARCH = mips +endif +ifeq ($(BR2_powerpc),y) +OPROFILE_ARCH = ppc +endif +ifeq ($(BR2_x86_64),y) +OPROFILE_ARCH = x86-64 +endif +ifeq ($(OPROFILE_ARCH),) +OPROFILE_ARCH = $(BR2_ARCH) +endif + +OPROFILE_DEPENDENCIES = popt binutils host-pkgconf + +ifeq ($(BR2_PACKAGE_LIBPFM4),y) +OPROFILE_DEPENDENCIES += libpfm4 +endif + +# When gettext is enabled, popt links with -lintl, specifies it in its +# popt.pc and has done so for the past 6+ years. But oprofile does not +# use pkconfig to find popt, so misses -lintl, which is important for +# a static build. We have to do the call to pkgconfig manually... +OPROFILE_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs popt`" + +ifeq ($(BR2_STATIC_LIBS),) +define OPROFILE_INSTALL_SHARED_LIBRARY + $(INSTALL) -m 755 $(@D)/libopagent/.libs/*.so* $(TARGET_DIR)/usr/lib/oprofile +endef +endif + +define OPROFILE_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/bin + $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/share/oprofile + $(INSTALL) -d -m 755 $(TARGET_DIR)/usr/lib/oprofile + if [ -d $(@D)/events/$(OPROFILE_ARCH) ]; then \ + cp -dpfr $(@D)/events/$(OPROFILE_ARCH) \ + $(TARGET_DIR)/usr/share/oprofile; \ + fi + $(INSTALL) -m 644 $(@D)/libregex/stl.pat $(TARGET_DIR)/usr/share/oprofile + $(INSTALL) -m 755 $(addprefix $(@D)/, $(OPROFILE_BINARIES)) $(TARGET_DIR)/usr/bin + $(OPROFILE_INSTALL_SHARED_LIBRARY) +endef + +$(eval $(autotools-package)) diff --git a/package/opus-tools/Config.in b/package/opus-tools/Config.in new file mode 100644 index 0000000000..2552d19515 --- /dev/null +++ b/package/opus-tools/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_OPUS_TOOLS + bool "opus-tools" + select BR2_PACKAGE_OPUS + select BR2_PACKAGE_LIBOGG + help + Opus codec command line tools. This package provides the + reference implementations of encoder and decoder utilities + for libopus. + + http://opus-codec.org diff --git a/package/opus-tools/opus-tools.hash b/package/opus-tools/opus-tools.hash new file mode 100644 index 0000000000..486384c31d --- /dev/null +++ b/package/opus-tools/opus-tools.hash @@ -0,0 +1,2 @@ +# From http://downloads.xiph.org/releases/opus/SHA256SUMS.txt +sha256 b1873dd78c7fbc98cf65d6e10cfddb5c2c03b3af93f922139a2104baedb4643a opus-tools-0.1.9.tar.gz diff --git a/package/opus-tools/opus-tools.mk b/package/opus-tools/opus-tools.mk new file mode 100644 index 0000000000..de1b4399e3 --- /dev/null +++ b/package/opus-tools/opus-tools.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# opus-tools +# +################################################################################ + +OPUS_TOOLS_VERSION = 0.1.9 +OPUS_TOOLS_SITE = http://downloads.xiph.org/releases/opus +OPUS_TOOLS_LICENSE = BSD-2c +OPUS_TOOLS_LICENSE_FILES = COPYING +OPUS_TOOLS_CONF_OPTS = --disable-oggtest --disable-opustest +OPUS_TOOLS_DEPENDENCIES = opus libogg host-pkgconf + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +OPUS_TOOLS_DEPENDENCIES += libpcap +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE),y) +OPUS_TOOLS_CONF_OPTS += --enable-sse +else +OPUS_TOOLS_CONF_OPTS += --disable-sse +endif + +ifeq ($(BR2_PACKAGE_FLAC),y) +OPUS_TOOLS_DEPENDENCIES += flac +else +OPUS_TOOLS_CONF_OPTS += --without-flac +endif + +$(eval $(autotools-package)) diff --git a/package/opus/Config.in b/package/opus/Config.in new file mode 100644 index 0000000000..22e7a5534b --- /dev/null +++ b/package/opus/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_OPUS + bool "opus" + help + The Opus codec is designed for interactive speech and audio + transmission over the Internet. It is designed by the IETF + Codec Working Group and incorporates technology from Skype's + SILK codec and Xiph.Org's CELT codec. + + It is intended to suit a wide range of interactive audio + applications, including Voice over IP, videoconferencing, + in-game chat, and even remote live music performances. It + can scale from low bit-rate narrowband speech to very high + quality stereo music. + + http://opus-codec.org + +if BR2_PACKAGE_OPUS + +config BR2_PACKAGE_OPUS_FIXED_POINT + bool "use fixed-point" if !BR2_SOFT_FLOAT + default y if BR2_SOFT_FLOAT + help + Compile without floating point operations (for machines + without a fast enough FPU). + +endif diff --git a/package/opus/opus.hash b/package/opus/opus.hash new file mode 100644 index 0000000000..1d483987fd --- /dev/null +++ b/package/opus/opus.hash @@ -0,0 +1,2 @@ +# From http://downloads.xiph.org/releases/opus/SHA256SUMS.txt +sha256 0e290078e31211baa7b5886bcc8ab6bc048b9fc83882532da4a1a45e58e907fd opus-1.1.2.tar.gz diff --git a/package/opus/opus.mk b/package/opus/opus.mk new file mode 100644 index 0000000000..eb082e38b1 --- /dev/null +++ b/package/opus/opus.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# opus +# +################################################################################ + +OPUS_VERSION = 1.1.2 +OPUS_SITE = http://downloads.xiph.org/releases/opus +OPUS_LICENSE = BSD-3c +OPUS_LICENSE_FILES = COPYING +OPUS_INSTALL_STAGING = YES +OPUS_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_OPUS_FIXED_POINT),y) +OPUS_CONF_OPTS += --enable-fixed-point +endif + +$(eval $(autotools-package)) diff --git a/package/opusfile/Config.in b/package/opusfile/Config.in new file mode 100644 index 0000000000..fe8a1b9ce1 --- /dev/null +++ b/package/opusfile/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_OPUSFILE + bool "opusfile" + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_OPUS + help + A convenient high-level API for decoding and basic manipulation + of all Ogg Opus audio streams. + + http://opus-codec.org diff --git a/package/opusfile/opusfile.hash b/package/opusfile/opusfile.hash new file mode 100644 index 0000000000..2da4bab53e --- /dev/null +++ b/package/opusfile/opusfile.hash @@ -0,0 +1,2 @@ +# From http://downloads.xiph.org/releases/opus/SHA256SUMS.txt +sha256 9e2bed13bc729058591a0f1cab2505e8cfd8e7ac460bf10a78bcc3b125e7c301 opusfile-0.7.tar.gz diff --git a/package/opusfile/opusfile.mk b/package/opusfile/opusfile.mk new file mode 100644 index 0000000000..c8108d33eb --- /dev/null +++ b/package/opusfile/opusfile.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# opusfile +# +################################################################################ + +OPUSFILE_VERSION = 0.7 +OPUSFILE_SITE = http://downloads.xiph.org/releases/opus +OPUSFILE_DEPENDENCIES = host-pkgconf libogg opus +OPUSFILE_LICENSE = BSD-3c +OPUSFILE_LICENSE_FILES = COPYING +OPUSFILE_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +OPUSFILE_DEPENDENCIES += openssl +else +OPUSFILE_CONF_OPTS += --disable-http +endif + +# Use the same as opus package since it's a dep and we can't mix +ifeq ($(BR2_PACKAGE_OPUS_FIXED_POINT),y) +OPUSFILE_CONF_OPTS += --enable-fixed-point +endif + +$(eval $(autotools-package)) diff --git a/package/orbit/Config.in b/package/orbit/Config.in new file mode 100644 index 0000000000..556c46eaa3 --- /dev/null +++ b/package/orbit/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_ORBIT + bool "orbit" + # These are runtime dependencies + select BR2_PACKAGE_WSAPI + select BR2_PACKAGE_LUAFILESYSTEM + help + An MVC web framework for Lua. The design is inspired by lightweight + Ruby frameworks such as Camping + + http://keplerproject.github.com/orbit diff --git a/package/orbit/orbit.hash b/package/orbit/orbit.hash new file mode 100644 index 0000000000..91eba3c63d --- /dev/null +++ b/package/orbit/orbit.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 42b0357041b4bdb051cb1a56cf73e3c2b2a2be207d431f70b4955465ad94b6a6 orbit-2.2.3-1.src.rock diff --git a/package/orbit/orbit.mk b/package/orbit/orbit.mk new file mode 100644 index 0000000000..fa30f38427 --- /dev/null +++ b/package/orbit/orbit.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# orbit +# +################################################################################ + +ORBIT_VERSION_UPSTREAM = 2.2.3 +ORBIT_VERSION = $(ORBIT_VERSION_UPSTREAM)-1 +ORBIT_SUBDIR = orbit +ORBIT_LICENSE = MIT +ORBIT_LICENSE_FILES = $(ORBIT_SUBDIR)/doc/us/license.md + +$(eval $(luarocks-package)) diff --git a/package/orc/Config.in b/package/orc/Config.in new file mode 100644 index 0000000000..2470d99284 --- /dev/null +++ b/package/orc/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_ORC + bool "orc" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_BINFMT_FLAT # configure doesn't know uclinux + help + Orc is a library and set of tools for compiling and executing + very simple programs that operate on arrays of data. + + http://code.entropywave.com/projects/orc/ + +comment "orc needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_BINFMT_FLAT diff --git a/package/orc/orc.hash b/package/orc/orc.hash new file mode 100644 index 0000000000..178d374151 --- /dev/null +++ b/package/orc/orc.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/gstreamer-devel/2016-March/057056.html +sha256 c1b1d54a58f26d483f0b3881538984789fe5d5460ab8fab74a1cacbd3d1c53d1 orc-0.4.25.tar.xz diff --git a/package/orc/orc.mk b/package/orc/orc.mk new file mode 100644 index 0000000000..5a49cbaefe --- /dev/null +++ b/package/orc/orc.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# orc +# +################################################################################ + +ORC_VERSION = 0.4.25 +ORC_SOURCE = orc-$(ORC_VERSION).tar.xz +ORC_SITE = http://gstreamer.freedesktop.org/data/src/orc +ORC_LICENSE = BSD-2c, BSD-3c +ORC_LICENSE_FILES = COPYING +ORC_INSTALL_STAGING = YES +ORC_DEPENDENCIES = host-orc + +define ORC_REMOVE_BUGREPORT + rm -f $(TARGET_DIR)/usr/bin/orc-bugreport +endef + +define ORC_REMOVE_DEVFILES + rm -f $(TARGET_DIR)/usr/bin/orcc +endef + +ORC_POST_INSTALL_TARGET_HOOKS += ORC_REMOVE_BUGREPORT +ORC_POST_INSTALL_TARGET_HOOKS += ORC_REMOVE_DEVFILES + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/ortp/Config.in b/package/ortp/Config.in new file mode 100644 index 0000000000..2de3c91f92 --- /dev/null +++ b/package/ortp/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_ORTP + bool "oRTP" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + oRTP, a Real-time Transport Protocol (RTP,RFC3550) library + + http://www.linphone.org/eng/documentation/dev/ortp.html + +comment "ortp needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/ortp/ortp.hash b/package/ortp/ortp.hash new file mode 100644 index 0000000000..8b099a705d --- /dev/null +++ b/package/ortp/ortp.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 0deb826b79b1fd329f7638821d5439dc343bc55bb122daa6c90d19116cfe8d9a ortp-0.25.0.tar.gz diff --git a/package/ortp/ortp.mk b/package/ortp/ortp.mk new file mode 100644 index 0000000000..ca4a90d6d7 --- /dev/null +++ b/package/ortp/ortp.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# ortp +# +################################################################################ + +ORTP_VERSION = 0.25.0 +ORTP_SITE = http://download.savannah.nongnu.org/releases/linphone/ortp/sources + +ORTP_CONF_OPTS = --disable-strict +ORTP_INSTALL_STAGING = YES +ORTP_LICENSE = LGPLv2.1+ +ORTP_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/owfs/0001-configure.ac-check-for-localtime_r.patch b/package/owfs/0001-configure.ac-check-for-localtime_r.patch new file mode 100644 index 0000000000..c4c384457f --- /dev/null +++ b/package/owfs/0001-configure.ac-check-for-localtime_r.patch @@ -0,0 +1,33 @@ +From 75e92438bcdb78a90912366b07bf503646806686 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Sun, 21 Feb 2016 17:02:06 +0100 +Subject: [PATCH] configure.ac: check for localtime_r + +HAVE_LOCALTIME_R is used in owftp.c, so it should be checked for. + +Without this, static build fails because localtime_r is defined twice. + +Upstream-Status: Submitted +https://sourceforge.net/p/owfs/mailman/message/34873667/ + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index c22dde9..12fdd18 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1529,7 +1529,7 @@ AC_FUNC_SELECT_ARGTYPES + AC_FUNC_STRFTIME + AC_FUNC_STRTOD + AC_TYPE_SIGNAL +-AC_CHECK_FUNCS([accept daemon getaddrinfo freeaddrinfo gethostbyname2_r gethostbyaddr_r gethostbyname_r getservbyname_r getopt getopt_long gettimeofday inet_ntop inet_pton memchr memset select socket strcasecmp strchr strdup strncasecmp strtol strtoul twalk tsearch tfind tdelete tdestroy vasprintf strsep vsprintf vsnprintf writev getline]) ++AC_CHECK_FUNCS([accept daemon getaddrinfo freeaddrinfo gethostbyname2_r gethostbyaddr_r gethostbyname_r getservbyname_r getopt getopt_long gettimeofday inet_ntop inet_pton memchr memset select socket strcasecmp strchr strdup strncasecmp strtol strtoul twalk tsearch tfind tdelete tdestroy vasprintf strsep vsprintf vsnprintf writev getline localtime_r]) + + if test "${ENABLE_ZERO}" = "true" ; then + AC_SEARCH_LIBS(dlopen, dl, AC_DEFINE(HAVE_DLOPEN, 1, [Define if you have dlopen])) +-- +2.7.0 + diff --git a/package/owfs/0002-compat.h-only-include-compat_netdb.h-if-needed.patch b/package/owfs/0002-compat.h-only-include-compat_netdb.h-if-needed.patch new file mode 100644 index 0000000000..7ae79325f4 --- /dev/null +++ b/package/owfs/0002-compat.h-only-include-compat_netdb.h-if-needed.patch @@ -0,0 +1,58 @@ +From d24e63eea4f4d234f313145e40668a5e2f64e49c Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Wed, 9 Mar 2016 23:20:11 +0100 +Subject: [PATCH] compat.h: only include compat_netdb.h if needed + +compat_netdb.h is added for only one reason: to provide the definitions +for getaddrinfo, in case it is not provided by the system. +compat_netdb.h is just a copy from an old glibc version, but that makes +it incompatible with other standard C libraries. For example, uClibc +without RPC support doesn't have the rpc/netdb.h header. This leads to +build errors. + +To work around this, only include compat_netdb.h when needed, i.e. +when getaddrinfo isn't provided natively. + +Note that this getaddrinfo compat was introduced in commit bc54c431 to +support Solaris 7. Starting from Solaris 8, however, getaddrinfo is +available natively, and it's available on MacOS, Windows and any other +POSIX-2001 compliant system as well. So it may be worhtwhile to remove +it altogether. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + module/owlib/src/include/compat.h | 2 ++ + module/ownet/c/src/include/compat.h | 2 ++ + 2 files changed, 4 insertions(+) + +diff --git a/module/owlib/src/include/compat.h b/module/owlib/src/include/compat.h +index c55bc96..e95e16f 100644 +--- a/module/owlib/src/include/compat.h ++++ b/module/owlib/src/include/compat.h +@@ -57,7 +57,9 @@ + #include + #endif + ++#ifndef HAVE_GETADDRINFO + #include "compat_netdb.h" ++#endif + #include "compat_getopt.h" + + #ifndef HAVE_STRSEP +diff --git a/module/ownet/c/src/include/compat.h b/module/ownet/c/src/include/compat.h +index c45d852..f8ae759 100644 +--- a/module/ownet/c/src/include/compat.h ++++ b/module/ownet/c/src/include/compat.h +@@ -58,7 +58,9 @@ $Id$ + #include + #endif + ++#ifndef HAVE_GETADDRINFO + #include "compat_netdb.h" ++#endif + #include "compat_getopt.h" + + #ifndef HAVE_STRSEP +-- +2.7.0 + diff --git a/package/owfs/Config.in b/package/owfs/Config.in new file mode 100644 index 0000000000..802d1e4609 --- /dev/null +++ b/package/owfs/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_OWFS + bool "owfs" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + OWFS is an easy way to use the powerful 1-wire system of + Dallas/Maxim. + + OWFS is a simple and flexible program to monitor and control + the physical environment. You can write scripts to read + temperature, flash lights, write to an LCD, log and graph, + etc. + + http://owfs.org/ + +comment "owfs needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/owfs/S25owserver b/package/owfs/S25owserver new file mode 100755 index 0000000000..b8da768e96 --- /dev/null +++ b/package/owfs/S25owserver @@ -0,0 +1,31 @@ +NAME="owserver" +DAEMON="/usr/bin/${NAME}" +PID_F="/run/${NAME}.pid" + +OWSERVER_ARGS= +[ -r /etc/default/${NAME} ] && . /etc/default/${NAME} + +case "$1" in +start) + printf "Starting ${NAME}: " + if [ -z "${OWSERVER_ARGS}" ]; then + echo "OWSERVER_ARGS must be set in defaults file" 1>&2 + exit 1 + fi + start-stop-daemon -S -x ${DAEMON} -- \ + --pid_file ${PID_F} ${OWSERVER_ARGS} + [ $? -eq 0 ] && echo "OK" || echo "FAIL" + ;; +stop) + printf "Stopping ${NAME}: " + start-stop-daemon -K -p ${PID_F} + [ $? -eq 0 ] && echo "OK" || echo "FAIL" + ;; +restart|reload) + $0 stop + $0 start + ;; +*) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/owfs/S30owfs b/package/owfs/S30owfs new file mode 100755 index 0000000000..feed676f8a --- /dev/null +++ b/package/owfs/S30owfs @@ -0,0 +1,33 @@ +NAME="owfs" +DAEMON="/usr/bin/${NAME}" +PID_F="/run/${NAME}.pid" +OWFS_MOUNTPOINT="/dev/1wire" +OWFS_DEVICES="-s localhost:4304" +OWFS_ARGS="" + +[ -r /etc/default/${NAME} ] && . /etc/default/${NAME} + +case "$1" in +start) + printf "Starting ${NAME}: " + # Fuse may be in a module, so try to load it + modprobe -q fuse && printf "[fuse] " + mkdir -p ${OWFS_MOUNTPOINT} + start-stop-daemon -S -x ${DAEMON} -- \ + --pid_file ${PID_F} -m ${OWFS_MOUNTPOINT} ${OWFS_DEVICES} \ + ${OWFS_ARGS} + [ $? -eq 0 ] && echo "OK" || echo "FAIL" + ;; +stop) + printf "Stopping ${NAME}: " + start-stop-daemon -K -p ${PID_F} + [ $? -eq 0 ] && echo "OK" || echo "FAIL" + ;; +restart|reload) + $0 stop + $0 start + ;; +*) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/owfs/owfs.hash b/package/owfs/owfs.hash new file mode 100644 index 0000000000..3991eec930 --- /dev/null +++ b/package/owfs/owfs.hash @@ -0,0 +1,4 @@ +# From https://sourceforge.net/projects/owfs/files/owfs/3.1p1/ +sha1 80892ca3e72fef2979b8f0a04db15fd24a2cbda6 owfs-3.1p1.tar.gz +# Locally calculated +sha256 e69421ae534565c1f8530a2447f583401f4d0d4b1cf3cb8cf399a57133ed7f81 owfs-3.1p1.tar.gz diff --git a/package/owfs/owfs.mk b/package/owfs/owfs.mk new file mode 100644 index 0000000000..0092603fbf --- /dev/null +++ b/package/owfs/owfs.mk @@ -0,0 +1,87 @@ +################################################################################ +# +# owfs +# +################################################################################ + +OWFS_VERSION = 3.1p1 +OWFS_SITE = http://downloads.sourceforge.net/project/owfs/owfs/$(OWFS_VERSION) +OWFS_DEPENDENCIES = host-pkgconf +OWFS_CONF_OPTS = --disable-owperl --without-perl5 --disable-owtcl --without-tcl + +# 0001-configure.ac-check-for-localtime_r.patch touches configure.ac +OWFS_AUTORECONF = YES + +# owtcl license is declared in module/ownet/c/src/include/ow_functions.h +OWFS_LICENSE = GPLv2+, LGPLv2 (owtcl) +OWFS_LICENSE_FILES = COPYING COPYING.LIB +OWFS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_LIBFUSE),y) +OWFS_DEPENDENCIES += libfuse +OWFS_CONF_OPTS += \ + --enable-owfs \ + --with-fuseinclude=$(STAGING_DIR)/usr/include \ + --with-fuselib=$(STAGING_DIR)/usr/lib +define OWFS_INSTALL_FUSE_INIT_SYSV + $(INSTALL) -D -m 0755 $(OWFS_PKGDIR)S30owfs \ + $(TARGET_DIR)/etc/init.d/S30owfs +endef +define OWFS_CREATE_MOUNTPOINT + mkdir -p $(TARGET_DIR)/dev/1wire +endef +OWFS_POST_INSTALL_TARGET_HOOKS += OWFS_CREATE_MOUNTPOINT +else +OWFS_CONF_OPTS += --disable-owfs +endif + +ifeq ($(BR2_PACKAGE_LIBUSB),y) +OWFS_CONF_OPTS += --enable-usb +OWFS_DEPENDENCIES += libusb +else +OWFS_CONF_OPTS += --disable-usb +endif + +ifeq ($(BR2_PACKAGE_AVAHI),y) +OWFS_CONF_OPTS += --enable-avahi +OWFS_DEPENDENCIES += avahi +else +OWFS_CONF_OPTS += --disable-avahi +endif + +ifeq ($(BR2_PACKAGE_PHP),y) +OWFS_CONF_OPTS += --enable-owphp --with-php --with-phpconfig=$(STAGING_DIR)/usr/bin/php-config +OWFS_DEPENDENCIES += php host-swig +else +OWFS_CONF_OPTS += --disable-owphp --without-php +endif + +# setup.py isn't python3 compliant +ifeq ($(BR2_PACKAGE_PYTHON),y) +OWFS_CONF_OPTS += \ + --enable-owpython \ + --with-python \ + --with-pythonconfig=$(STAGING_DIR)/usr/bin/python-config +OWFS_MAKE_ENV += \ + CC="$(TARGET_CC)" \ + PYTHONPATH="$(PYTHON_PATH)" \ + _python_sysroot=$(STAGING_DIR) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr +OWFS_DEPENDENCIES += python host-swig +else +OWFS_CONF_OPTS += --disable-owpython --without-python +endif + +ifeq ($(BR2_STATIC_LIBS),y) +# zeroconf support uses dlopen() +OWFS_CONF_OPTS += --disable-zero +endif + +define OWFS_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 $(OWFS_PKGDIR)S25owserver \ + $(TARGET_DIR)/etc/init.d/S25owserver + $(OWFS_INSTALL_FUSE_INIT_SYSV) +endef + +$(eval $(autotools-package)) diff --git a/package/owl-linux/0001-fix-for-linux-3.3.x.patch b/package/owl-linux/0001-fix-for-linux-3.3.x.patch new file mode 100644 index 0000000000..831ac7fd11 --- /dev/null +++ b/package/owl-linux/0001-fix-for-linux-3.3.x.patch @@ -0,0 +1,21 @@ +Kernel commit b81693d9149c598302e8eb9c20cb20330d922c8e changed the +net_device_ops structure, removing the ndo_set_multicast_list callback. The +ndo_set_rx_mode has also been added to this structure. + +The upshot of these changes is that owl-linux fails to compile with 3.3.x +and later kernels. + +Signed-off-by: Simon Dawson +diff -Nurp a/owl_net.c b/owl_net.c +--- a/owl_net.c 2012-06-14 10:51:45.000000000 +0100 ++++ b/owl_net.c 2012-07-20 13:16:28.772351464 +0100 +@@ -384,7 +384,9 @@ static const struct net_device_ops netde + #endif /* OWL_CONFIG_IFUPDOWN */ + .ndo_start_xmit = owl_net_tx, + .ndo_get_stats = owl_net_get_stats, ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) + .ndo_set_multicast_list = NULL, ++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) */ + .ndo_tx_timeout = owl_net_tx_timeout, + .ndo_set_mac_address = NULL, + }; diff --git a/package/owl-linux/Config.in b/package/owl-linux/Config.in new file mode 100644 index 0000000000..595a1db798 --- /dev/null +++ b/package/owl-linux/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_OWL_LINUX + bool "owl-linux" + depends on BR2_LINUX_KERNEL + depends on (BR2_arm920t || BR2_arm922t || BR2_arm926t) + help + Linux kernel driver for the H&D Wireless SPB104 SD-card WiFi SIP. + + owl-linux requires the hidden kernel option WIRELESS_EXT enabled. + + http://linux.hd-wireless.se/bin/view/Linux/GettingStarted + +comment "owl-linux needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + depends on BR2_arm || BR2_armeb + +comment "owl-linux is only supported on ARM9 architecture" + depends on !(BR2_arm920t || BR2_arm922t || BR2_arm926t) + depends on BR2_arm || BR2_armeb diff --git a/package/owl-linux/owl-linux.mk b/package/owl-linux/owl-linux.mk new file mode 100644 index 0000000000..1262425249 --- /dev/null +++ b/package/owl-linux/owl-linux.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# owl-linux +# +################################################################################ + +OWL_LINUX_VERSION = 1.0.7 +OWL_LINUX_SITE = http://linux.hd-wireless.se/pub/Linux/DownloadDrivers +OWL_LINUX_LICENSE = PROPRIETARY +OWL_LINUX_LICENSE_FILES = LICENSE +OWL_LINUX_REDISTRIBUTE = NO + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/p11-kit/0001-Fix-build-against-older-pthreads-implementations.patch b/package/p11-kit/0001-Fix-build-against-older-pthreads-implementations.patch new file mode 100644 index 0000000000..3562f3c2b6 --- /dev/null +++ b/package/p11-kit/0001-Fix-build-against-older-pthreads-implementations.patch @@ -0,0 +1,64 @@ +From 05b6a7550756ffdced25a6c51cf2222bad9e59e7 Mon Sep 17 00:00:00 2001 +Message-Id: <05b6a7550756ffdced25a6c51cf2222bad9e59e7.1399285491.git.baruch@tkos.co.il> +From: Baruch Siach +Date: Mon, 5 May 2014 09:32:23 +0300 +Subject: [PATCH] Fix build against older pthreads implementations + +Older pthreads implementations like glibc NPTL prior to version 2.12, and +uClibc linuxthreads (both), need _XOPEN_SOURCE to expose +pthread_mutexattr_settype() and THREAD_MUTEX_DEFAULT. The value 600 (SuSv3, +POSIX.1-2001) is equivalent to _POSIX_C_SOURCE 200112L. + +Fixes the following build error: + + CC compat.lo +compat.c: In function 'p11_mutex_init': +compat.c:164:2: warning: implicit declaration of function 'pthread_mutexattr_settype' [-Wimplicit-function-declaration] +compat.c:164:2: warning: nested extern declaration of 'pthread_mutexattr_settype' [-Wnested-externs] +compat.c:164:36: error: 'PTHREAD_MUTEX_DEFAULT' undeclared (first use in this function) + +Patch status: sent upstream + +Signed-off-by: Baruch Siach +--- + common/compat.h | 6 ++++++ + common/message.c | 6 ------ + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/common/compat.h b/common/compat.h +index d7fe414a46bf..fbc1dc1d4f0f 100644 +--- a/common/compat.h ++++ b/common/compat.h +@@ -37,6 +37,12 @@ + + #include "config.h" + ++/* ++ * Oh god. glibc is nasty. Changes behavior and definitions of POSIX ++ * functions to completely different signatures depending on defines ++ */ ++#define _XOPEN_SOURCE 600 ++ + #include + #include + +diff --git a/common/message.c b/common/message.c +index 35f2764487a9..e68dfac561c8 100644 +--- a/common/message.c ++++ b/common/message.c +@@ -37,12 +37,6 @@ + + #include "config.h" + +-/* +- * Oh god. glibc is nasty. Changes behavior and definitions of POSIX +- * functions to completely different signatures depending on defines +- */ +-#define _POSIX_C_SOURCE 200112L +- + #include "compat.h" + #define P11_DEBUG_FLAG P11_DEBUG_LIB + #include "debug.h" +-- +2.0.0.rc0 + diff --git a/package/p11-kit/Config.in b/package/p11-kit/Config.in new file mode 100644 index 0000000000..a6b7261886 --- /dev/null +++ b/package/p11-kit/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_P11_KIT + bool "p11-kit" + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_LIBTASN1 + help + Provides a way to load and enumerate PKCS#11 modules. + Provides a standard configuration setup for installing PKCS#11 + modules in such a way that they're discoverable. + + http://p11-glue.freedesktop.org/p11-kit.html + +comment "p11-kit needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/p11-kit/p11-kit.hash b/package/p11-kit/p11-kit.hash new file mode 100644 index 0000000000..c0182eb4ce --- /dev/null +++ b/package/p11-kit/p11-kit.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 ba726ea8303c97467a33fca50ee79b7b35212964be808ecf9b145e9042fdfaf0 p11-kit-0.23.2.tar.gz diff --git a/package/p11-kit/p11-kit.mk b/package/p11-kit/p11-kit.mk new file mode 100644 index 0000000000..e856cac092 --- /dev/null +++ b/package/p11-kit/p11-kit.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# p11-kit +# +################################################################################ + +P11_KIT_VERSION = 0.23.2 +P11_KIT_SITE = http://p11-glue.freedesktop.org/releases +P11_KIT_DEPENDENCIES = host-pkgconf libffi libtasn1 +P11_KIT_INSTALL_STAGING = YES +P11_KIT_CONF_OPTS = --disable-static +P11_KIT_CONF_ENV = ac_cv_have_decl_program_invocation_short_name=yes \ + ac_cv_have_decl___progname=no +P11_KIT_LICENSE = BSD-3c +P11_KIT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/p910nd/Config.in b/package/p910nd/Config.in new file mode 100644 index 0000000000..33f6cf8a5d --- /dev/null +++ b/package/p910nd/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_P910ND + bool "p910nd" + depends on BR2_USE_MMU # fork() + help + p910nd is a small printer daemon intended for diskless + workstations. Using ports 9100-9102, it accepts + print jobs and passes them directly to a USB printer. + + http://p910nd.sourceforge.net/ diff --git a/package/p910nd/p910nd.hash b/package/p910nd/p910nd.hash new file mode 100644 index 0000000000..1b952c8e12 --- /dev/null +++ b/package/p910nd/p910nd.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 4ac980a3ae24babae6f70f0a692625ece03a4a92c357fbb10d2e368386c3c26f p910nd-0.97.tar.bz2 diff --git a/package/p910nd/p910nd.mk b/package/p910nd/p910nd.mk new file mode 100644 index 0000000000..73667d7c13 --- /dev/null +++ b/package/p910nd/p910nd.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# p910nd +# +################################################################################ + +P910ND_VERSION = 0.97 +P910ND_SITE = http://downloads.sourceforge.net/project/p910nd/p910nd/$(P910ND_VERSION) +P910ND_SOURCE = p910nd-$(P910ND_VERSION).tar.bz2 +P910ND_LICENSE = GPLv2 +P910ND_LICENSE_FILES = COPYING + +define P910ND_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define P910ND_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/p910nd $(TARGET_DIR)/usr/sbin/p910nd +endef + +$(eval $(generic-package)) diff --git a/package/pango/0001-no-tests.patch b/package/pango/0001-no-tests.patch new file mode 100644 index 0000000000..734409db68 --- /dev/null +++ b/package/pango/0001-no-tests.patch @@ -0,0 +1,30 @@ +Prevent Pango to build tests. + +Updated to Pango 1.36.3 by Hadrien Boutteville. + +Signed-off-by: Hadrien Boutteville +[Gustavo: update for 1.38.1] + +diff -Nura pango-1.38.1.orig/Makefile.am pango-1.38.1/Makefile.am +--- pango-1.38.1.orig/Makefile.am 2015-10-14 15:41:27.620016974 +0000 ++++ pango-1.38.1/Makefile.am 2015-10-14 15:41:54.431240793 +0000 +@@ -1,6 +1,6 @@ + ## Process this file with automake to create Makefile.in. + +-SUBDIRS= pango pango-view examples docs tools tests build ++SUBDIRS= pango pango-view examples docs tools build + + EXTRA_DIST = \ + autogen.sh \ +diff -Nura pango-1.38.1.orig/Makefile.in pango-1.38.1/Makefile.in +--- pango-1.38.1.orig/Makefile.in 2015-10-14 15:41:27.630016685 +0000 ++++ pango-1.38.1/Makefile.in 2015-10-14 15:41:58.753115676 +0000 +@@ -417,7 +417,7 @@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-SUBDIRS = pango pango-view examples docs tools tests build ++SUBDIRS = pango pango-view examples docs tools build + EXTRA_DIST = \ + autogen.sh \ + pango.pc.in \ diff --git a/package/pango/0002-no-gtk-doc.patch b/package/pango/0002-no-gtk-doc.patch new file mode 100644 index 0000000000..926a263f1b --- /dev/null +++ b/package/pango/0002-no-gtk-doc.patch @@ -0,0 +1,25 @@ +Same patch as for systemd in commit +7144f2f04b705538a893e538a6b851f536f433b6: + +Fix deactivation of gtk-doc + +The tarball contains the Makefile for building documentation with gtk-doc, +Unfortunately the AM_CONDITIONAL variable is not the correct one, which +results in an error when running autoreconf. + +This patch fixes this issue. + +Signed-off-by: Eric Le Bihan +Signed-off-by: Hadrien Boutteville + +--- a/gtk-doc.make ++++ b/gtk-doc.make +@@ -267,7 +267,7 @@ + # + # Require gtk-doc when making dist + # +-if HAVE_GTK_DOC ++if ENABLE_GTK_DOC + dist-check-gtkdoc: docs + else + dist-check-gtkdoc: diff --git a/package/pango/Config.in b/package/pango/Config.in new file mode 100644 index 0000000000..7813c4ebaf --- /dev/null +++ b/package/pango/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_PANGO + bool "pango" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + depends on BR2_INSTALL_LIBSTDCPP # freetype support + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # harfbuzz + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_HARFBUZZ + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + help + Pango is a library for laying out and rendering of text, with an + emphasis on internationalization. Pango can be used anywhere that + text layout is needed, though most of the work on Pango so far has + been done in the context of the GTK+ widget toolkit. Pango forms the + core of text and font handling for GTK+-2.x. + + http://www.pango.org/ + +comment "pango needs a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_INSTALL_LIBSTDCPP diff --git a/package/pango/pango.hash b/package/pango/pango.hash new file mode 100644 index 0000000000..67b67f0444 --- /dev/null +++ b/package/pango/pango.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/GNOME/sources/pango/1.36/pango-1.40.1.sha256sum +sha256 e27af54172c72b3ac6be53c9a4c67053e16c905e02addcf3a603ceb2005c1a40 pango-1.40.1.tar.xz diff --git a/package/pango/pango.mk b/package/pango/pango.mk new file mode 100644 index 0000000000..bdad8c689d --- /dev/null +++ b/package/pango/pango.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# pango +# +################################################################################ + +PANGO_VERSION_MAJOR = 1.40 +PANGO_VERSION = $(PANGO_VERSION_MAJOR).1 +PANGO_SOURCE = pango-$(PANGO_VERSION).tar.xz +PANGO_SITE = http://ftp.gnome.org/pub/GNOME/sources/pango/$(PANGO_VERSION_MAJOR) +PANGO_AUTORECONF = YES +PANGO_INSTALL_STAGING = YES +PANGO_LICENSE = LGPLv2+ +PANGO_LICENSE_FILES = COPYING + +PANGO_CONF_OPTS = --enable-explicit-deps=no +HOST_PANGO_CONF_OPTS = --enable-explicit-deps=no + +PANGO_DEPENDENCIES = \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + host-pkgconf \ + libglib2 \ + cairo \ + harfbuzz \ + fontconfig \ + freetype +HOST_PANGO_DEPENDENCIES = \ + host-pkgconf \ + host-libglib2 \ + host-cairo \ + host-harfbuzz \ + host-fontconfig \ + host-freetype + +ifeq ($(BR2_PACKAGE_XORG7),y) +PANGO_CONF_OPTS += \ + --x-includes=$(STAGING_DIR)/usr/include/X11 \ + --x-libraries=$(STAGING_DIR)/usr/lib +PANGO_DEPENDENCIES += xlib_libX11 +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFT)$(BR2_PACKAGE_XLIB_LIBXRENDER),yy) +PANGO_DEPENDENCIES += xlib_libXft xlib_libXrender +PANGO_CONF_OPTS += --with-xft +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/pangomm/Config.in b/package/pangomm/Config.in new file mode 100644 index 0000000000..a7c41a008f --- /dev/null +++ b/package/pangomm/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_PANGOMM + bool "pangomm" + select BR2_PACKAGE_CAIROMM + select BR2_PACKAGE_GLIBMM + select BR2_PACKAGE_PANGO + select BR2_PACKAGE_LIBSIGC + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango -> harfbuzz + depends on BR2_INSTALL_LIBSTDCPP # glibmm/pango + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 + depends on BR2_TOOLCHAIN_HAS_THREADS # *mm/pango -> libglib2 + depends on BR2_USE_MMU # *mm/pango -> libglib2 + depends on BR2_USE_WCHAR # *mm/pango -> libglib2 + help + The pangomm package is a set of C++ bindings for Pango. + + http://www.gtkmm.org/ + +comment "pangomm needs a toolchain w/ C++, wchar, threads, gcc >= 4.8" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR \ + || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/pangomm/pangomm.hash b/package/pangomm/pangomm.hash new file mode 100644 index 0000000000..4f39e51501 --- /dev/null +++ b/package/pangomm/pangomm.hash @@ -0,0 +1,2 @@ +# From http://ftp.gnome.org/pub/gnome/sources/pangomm/2.40/pangomm-2.40.0.sha256sum +sha256 7dd0afa9dcce57cdb0aad77da9ea46823ee8515d5f3ffd895b9ede7365c3d70d pangomm-2.40.0.tar.xz diff --git a/package/pangomm/pangomm.mk b/package/pangomm/pangomm.mk new file mode 100644 index 0000000000..2db7890022 --- /dev/null +++ b/package/pangomm/pangomm.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# pangomm +# +################################################################################ + +PANGOMM_VERSION_MAJOR = 2.40 +PANGOMM_VERSION = $(PANGOMM_VERSION_MAJOR).0 +PANGOMM_SOURCE = pangomm-$(PANGOMM_VERSION).tar.xz +PANGOMM_SITE = http://ftp.gnome.org/pub/gnome/sources/pangomm/$(PANGOMM_VERSION_MAJOR) +PANGOMM_LICENSE = LGPLv2.1+ (library), GPLv2+ (tools) +PANGOMM_LICENSE_FILES = COPYING COPYING.tools +PANGOMM_INSTALL_STAGING = YES +PANGOMM_DEPENDENCIES = glibmm cairomm libsigc pango host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/parted/0001-readline-deprecated.patch b/package/parted/0001-readline-deprecated.patch new file mode 100644 index 0000000000..a3f40c8df6 --- /dev/null +++ b/package/parted/0001-readline-deprecated.patch @@ -0,0 +1,19 @@ +The CPPFunction typedef (among others) have been deprecated in favour of +specific prototyped typedefs since readline 4.2. +It's been working since because compatibility typedefs have been +in place until they were removed in readline 6.3. + +Signed-off-by: Gustavo Zacarias + +diff -Nura parted-3.1.orig/parted/ui.c parted-3.1/parted/ui.c +--- parted-3.1.orig/parted/ui.c 2014-03-01 16:11:41.970827134 -0300 ++++ parted-3.1/parted/ui.c 2014-03-01 16:11:55.540259786 -0300 +@@ -1474,7 +1474,7 @@ + #ifdef HAVE_LIBREADLINE + if (!opt_script_mode) { + rl_initialize (); +- rl_attempted_completion_function = (CPPFunction*) complete_function; ++ rl_attempted_completion_function = (rl_completion_func_t *) complete_function; + readline_state.in_readline = 0; + } + #endif diff --git a/package/parted/0002-configure.ac-uclinux-is-also-linux.patch b/package/parted/0002-configure.ac-uclinux-is-also-linux.patch new file mode 100644 index 0000000000..b2119bcdd7 --- /dev/null +++ b/package/parted/0002-configure.ac-uclinux-is-also-linux.patch @@ -0,0 +1,33 @@ +From b3958317c5ee2940e7024bec2e7f288b5a6a26c3 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Mon, 30 Jun 2014 10:09:04 -0300 +Subject: [PATCH] configure.ac: uclinux is also linux + +uclinux is used in the tuple for some noMMU linux builds like Blackfin +FLAT output, so accept it as linux too. + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 436d0e2..50ad478 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -58,10 +58,10 @@ AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. + + AC_CANONICAL_HOST + case "$host_os" in +- linux*) OS=linux ;; ++ linux*|uclinux*) OS=linux ;; + gnu*) OS=gnu ;; + beos*) OS=beos ;; +- *) AC_MSG_ERROR([Unknown or unsupported OS "$host_os". Only "linux", "gnu" and "beos" are supported in this version of GNU Parted.]) ;; ++ *) AC_MSG_ERROR([Unknown or unsupported OS "$host_os". Only "linux", "uclinux", "gnu" and "beos" are supported in this version of GNU Parted.]) ;; + esac + AC_SUBST([OS]) + +-- +1.8.5.5 + diff --git a/package/parted/0003-fix-static-link-uuid.patch b/package/parted/0003-fix-static-link-uuid.patch new file mode 100644 index 0000000000..d6ec2cf365 --- /dev/null +++ b/package/parted/0003-fix-static-link-uuid.patch @@ -0,0 +1,48 @@ +configure: use pkg-config to find libuuid + +In some conditions, libuuid may be linked with -lintl. This can be the +case on uClibc when locales are enabled. + +When doing a shared link, this dependency is automatically pulled in via +a DT_NEEDED ELF tag + +For a static link, there is no such mechanism to pull in dependent +libraries. + +Currently, the check for libuuid is done with AC_CHECK_LIB, but this +does not handle dependencies, and thus a stattic build fails. + +Use pkg-config to find libuuid, that automatically pulls in the +dependencies of libuuid, if any. + +Signed-off-by: "Yann E. MORIN" + +--- +Note: of course, that relies on the fact that libuuid installs a proper +.pc file; a patch will be submitted upstream shortly. + +But even considering the current situation, where libuuid does not +provide a proper .pc file (yet), this patch does not change the +behaviour we've had so far; it is a bet on the future! ;-) + +diff -durN parted-3.1.orig/configure.ac parted-3.1/configure.ac +--- parted-3.1.orig/configure.ac 2014-11-29 16:27:49.520560137 +0100 ++++ parted-3.1/configure.ac 2014-11-29 16:32:50.799702049 +0100 +@@ -313,16 +313,7 @@ + AC_SUBST([DL_LIBS]) + + dnl Check for libuuid +-UUID_LIBS="" +-AC_CHECK_LIB([uuid], [uuid_generate], [UUID_LIBS="-luuid"], +- [AC_MSG_ERROR(dnl +-[GNU Parted requires libuuid - a part of the util-linux-ng package (but +-usually distributed separately in libuuid-devel, uuid-dev or similar) +-This can probably be found on your distribution's CD or FTP site or at: +- http://userweb.kernel.org/~kzak/util-linux-ng/ +-Note: originally, libuuid was part of the e2fsprogs package. Later, it +-moved to util-linux-ng-2.16, and that package is now the preferred source.])]) +-AC_SUBST([UUID_LIBS]) ++PKG_CHECK_MODULES([UUID],[uuid]) + + dnl Check for libdevmapper + DM_LIBS= diff --git a/package/parted/0004-fix-includes-for-musl.patch b/package/parted/0004-fix-includes-for-musl.patch new file mode 100644 index 0000000000..28c94ace7c --- /dev/null +++ b/package/parted/0004-fix-includes-for-musl.patch @@ -0,0 +1,18 @@ +Include to get loff_t definition + +Patch borrowed from Alpine Linux at +http://git.alpinelinux.org/cgit/aports/plain/main/parted/fix-includes.patch. Solves +build with musl. + +Signed-off-by: Thomas Petazzoni + +--- parted-3.1.orig/libparted/fs/xfs/platform_defs.h ++++ parted-3.1/libparted/fs/xfs/platform_defs.h +@@ -35,6 +35,7 @@ + #define __XFS_PLATFORM_DEFS_H__ + + #include ++#include + #include + #include + #include diff --git a/package/parted/Config.in b/package/parted/Config.in new file mode 100644 index 0000000000..9d78f0f1f9 --- /dev/null +++ b/package/parted/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PARTED + bool "parted" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + parted, the GNU partition resizing program + + http://www.gnu.org/software/parted/ + +comment "parted needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/parted/Config.in.host b/package/parted/Config.in.host new file mode 100644 index 0000000000..f5d7acc2a2 --- /dev/null +++ b/package/parted/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_PARTED + bool "host parted" + help + parted, the GNU partition resizing program + + http://www.gnu.org/software/parted/ diff --git a/package/parted/parted.hash b/package/parted/parted.hash new file mode 100644 index 0000000000..297b5d7bbd --- /dev/null +++ b/package/parted/parted.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 5e9cc1f91eaf016e5033d85b9b893fd6d3ffaca532a48de1082df9b94225ca15 parted-3.1.tar.xz diff --git a/package/parted/parted.mk b/package/parted/parted.mk new file mode 100644 index 0000000000..dc7ff2bd74 --- /dev/null +++ b/package/parted/parted.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# parted +# +################################################################################ + +PARTED_VERSION = 3.1 +PARTED_SOURCE = parted-$(PARTED_VERSION).tar.xz +PARTED_SITE = $(BR2_GNU_MIRROR)/parted +PARTED_DEPENDENCIES = host-pkgconf util-linux +PARTED_INSTALL_STAGING = YES +# For uclinux patch +PARTED_AUTORECONF = YES +PARTED_GETTEXTIZE = YES +PARTED_LICENSE = GPLv3+ +PARTED_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_READLINE),y) +PARTED_DEPENDENCIES += readline +PARTED_CONF_OPTS += --with-readline +else +PARTED_CONF_OPTS += --without-readline +endif + +ifeq ($(BR2_PACKAGE_LVM2),y) +PARTED_DEPENDENCIES += lvm2 +PARTED_CONF_OPTS += --enable-device-mapper +else +PARTED_CONF_OPTS += --disable-device-mapper +endif + +ifeq ($(BR2_STATIC_LIBS),y) +PARTED_CONF_OPTS += --disable-dynamic-loading +endif + +HOST_PARTED_DEPENDENCIES = host-pkgconf host-util-linux +HOST_PARTED_CONF_OPTS += \ + --without-readline \ + --disable-device-mapper \ + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/patch/Config.in b/package/patch/Config.in new file mode 100644 index 0000000000..887c84d4d9 --- /dev/null +++ b/package/patch/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PATCH + bool "patch" + depends on BR2_USE_WCHAR + help + Take patch files (containing difference listings) and apply them + to original files, producing patched versions. + + http://www.gnu.org/software/patch/ + +comment "patch needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/patch/patch.hash b/package/patch/patch.hash new file mode 100644 index 0000000000..d6e3a2d261 --- /dev/null +++ b/package/patch/patch.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 fd95153655d6b95567e623843a0e77b81612d502ecf78a489a4aed7867caa299 patch-2.7.5.tar.xz diff --git a/package/patch/patch.mk b/package/patch/patch.mk new file mode 100644 index 0000000000..3a942524f0 --- /dev/null +++ b/package/patch/patch.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# patch +# +################################################################################ + +PATCH_VERSION = 2.7.5 +PATCH_SOURCE = patch-$(PATCH_VERSION).tar.xz +PATCH_SITE = $(BR2_GNU_MIRROR)/patch +PATCH_LICENSE = GPLv3+ +PATCH_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_ATTR),y) +PATCH_CONF_OPTS += --enable-attr +PATCH_DEPENDENCIES += attr +else +PATCH_CONF_OPTS += --disable-attr +endif + +$(eval $(autotools-package)) diff --git a/package/patchelf/Config.in.host b/package/patchelf/Config.in.host new file mode 100644 index 0000000000..d1c8375704 --- /dev/null +++ b/package/patchelf/Config.in.host @@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_PATCHELF + bool "host patchelf" + help + PatchELF is a small utility to modify the dynamic linker + and RPATH of ELF executables. + + http://nixos.org/patchelf.html diff --git a/package/patchelf/patchelf.hash b/package/patchelf/patchelf.hash new file mode 100644 index 0000000000..0da413e6ca --- /dev/null +++ b/package/patchelf/patchelf.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 14af06a2da688d577d64ff8dac065bb8903bbffbe01d30c62df7af9bf4ce72fe patchelf-0.8.tar.gz diff --git a/package/patchelf/patchelf.mk b/package/patchelf/patchelf.mk new file mode 100644 index 0000000000..043224dab2 --- /dev/null +++ b/package/patchelf/patchelf.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# patchelf +# +################################################################################ + +PATCHELF_VERSION = 0.8 +PATCHELF_SITE = http://releases.nixos.org/patchelf/patchelf-0.8 +PATCHELF_LICENSE = GPLv3+ +PATCHELF_LICENSE_FILES = COPYING + +$(eval $(host-autotools-package)) diff --git a/package/pax-utils/Config.in b/package/pax-utils/Config.in new file mode 100644 index 0000000000..e61d9b31f7 --- /dev/null +++ b/package/pax-utils/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PAX_UTILS + bool "pax-utils" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 # needs PR_SET_NO_NEW_PRIVS + help + ELF related utils for ELF 32/64 binaries that can check files + for security relevant properties. + + http://www.gentoo.org/proj/en/hardened/pax-utils.xml + +comment "pax-utils needs a toolchain w/ headers >= 3.5" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 diff --git a/package/pax-utils/pax-utils.hash b/package/pax-utils/pax-utils.hash new file mode 100644 index 0000000000..399bae40da --- /dev/null +++ b/package/pax-utils/pax-utils.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 796860fbd48c5f811e699e8492dc1110459bad0a62efa8d346b74a4f6f556414 pax-utils-1.1.4.tar.xz diff --git a/package/pax-utils/pax-utils.mk b/package/pax-utils/pax-utils.mk new file mode 100644 index 0000000000..747c2bb114 --- /dev/null +++ b/package/pax-utils/pax-utils.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# pax-utils +# +################################################################################ + +PAX_UTILS_VERSION = 1.1.4 +PAX_UTILS_SITE = http://distfiles.gentoo.org/distfiles +PAX_UTILS_SOURCE = pax-utils-$(PAX_UTILS_VERSION).tar.xz +PAX_UTILS_LICENSE = GPLv2 +PAX_UTILS_LICENSE_FILES = COPYING + +PAX_UTILS_DEPENDENCIES = host-pkgconf +PAX_UTILS_CONF_OPTS = --without-python + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +PAX_UTILS_DEPENDENCIES += libcap +PAX_UTILS_CONF_OPTS += --with-caps +else +PAX_UTILS_CONF_OPTS += --without-caps +endif + +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) +PAX_UTILS_DEPENDENCIES += libseccomp +PAX_UTILS_CONF_OPTS += --with-seccomp +else +PAX_UTILS_CONF_OPTS += --without-seccomp +endif + +# libcap is only useful for pspax (a running system) +HOST_PAX_UTILS_DEPENDENCIES = + +# lddtree and symtree need bash +ifeq ($(BR2_PACKAGE_BASH),) +define PAX_UTILS_REMOVE_BASH_TOOLS + rm -f $(TARGET_DIR)/usr/bin/{lddtree,symtree} +endef +endif +PAX_UTILS_POST_INSTALL_TARGET_HOOKS += PAX_UTILS_REMOVE_BASH_TOOLS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/pciutils/Config.in b/package/pciutils/Config.in new file mode 100644 index 0000000000..d46df6c0d6 --- /dev/null +++ b/package/pciutils/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PCIUTILS + bool "pciutils" + # PCI not supported on Blackfin + depends on !BR2_bfin + help + Various utilities dealing with the PCI bus. + Provides things like setpci and lspci. + + http://atrey.karlin.mff.cuni.cz/~mj/pciutils.html diff --git a/package/pciutils/pciutils.hash b/package/pciutils/pciutils.hash new file mode 100644 index 0000000000..dd75e426fe --- /dev/null +++ b/package/pciutils/pciutils.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/software/utils/pciutils/sha256sums.asc +sha256 865554cc5604d1644bd8da38d94845405e2a319a6d5acabc6a0296417684a82a pciutils-3.4.1.tar.xz diff --git a/package/pciutils/pciutils.mk b/package/pciutils/pciutils.mk new file mode 100644 index 0000000000..d3a0e2072c --- /dev/null +++ b/package/pciutils/pciutils.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# pciutils +# +################################################################################ + +PCIUTILS_VERSION = 3.4.1 +PCIUTILS_SITE = $(BR2_KERNEL_MIRROR)/software/utils/pciutils +PCIUTILS_SOURCE = pciutils-$(PCIUTILS_VERSION).tar.xz +PCIUTILS_INSTALL_STAGING = YES +PCIUTILS_LICENSE = GPLv2+ +PCIUTILS_LICENSE_FILES = COPYING +PCIUTILS_MAKE_OPTS = \ + CC="$(TARGET_CC)" \ + HOST="$(KERNEL_ARCH)-linux" \ + OPT="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + RANLIB=$(TARGET_RANLIB) \ + AR=$(TARGET_AR) \ + DNS=no + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +PCIUTILS_DEPENDENCIES += udev +PCIUTILS_MAKE_OPTS += HWDB=yes +else +PCIUTILS_MAKE_OPTS += HWDB=no +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +PCIUTILS_MAKE_OPTS += ZLIB=yes +PCIUTILS_DEPENDENCIES += zlib +else +PCIUTILS_MAKE_OPTS += ZLIB=no +endif + +ifeq ($(BR2_PACKAGE_KMOD),y) +PCIUTILS_DEPENDENCIES += kmod +PCIUTILS_MAKE_OPTS += LIBKMOD=yes +else +PCIUTILS_MAKE_OPTS += LIBKMOD=no +endif + +ifeq ($(BR2_STATIC_LIBS),y) +PCIUTILS_MAKE_OPTS += SHARED=no +else +PCIUTILS_MAKE_OPTS += SHARED=yes +endif + +# Build after busybox since it's got a lightweight lspci +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +PCIUTILS_DEPENDENCIES += busybox +endif + +define PCIUTILS_CONFIGURE_CMDS + $(SED) 's/wget --no-timestamping/wget/' $(PCIUTILS_DIR)/update-pciids.sh + $(SED) 's/uname -s/echo Linux/' \ + -e 's/uname -r/echo $(LINUX_HEADERS_VERSION)/' \ + $(PCIUTILS_DIR)/lib/configure + $(SED) 's/^STRIP/#STRIP/' $(PCIUTILS_DIR)/Makefile +endef + +define PCIUTILS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(PCIUTILS_MAKE_OPTS) \ + PREFIX=/usr +endef + +define PCIUTILS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) $(PCIUTILS_MAKE_OPTS) \ + PREFIX=$(TARGET_DIR)/usr SBINDIR=$(TARGET_DIR)/usr/bin \ + install install-lib install-pcilib +endef + +define PCIUTILS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE1) -C $(@D) $(PCIUTILS_MAKE_OPTS) \ + PREFIX=$(STAGING_DIR)/usr SBINDIR=$(STAGING_DIR)/usr/bin \ + install install-lib install-pcilib +endef + +$(eval $(generic-package)) diff --git a/package/pcmanfm/Config.in b/package/pcmanfm/Config.in new file mode 100644 index 0000000000..149a595448 --- /dev/null +++ b/package/pcmanfm/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_PCMANFM + bool "pcmanfm" + select BR2_PACKAGE_LIBFM + select BR2_PACKAGE_MENU_CACHE + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBGTK2 + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + depends on BR2_INSTALL_LIBSTDCPP # libgtk2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk2 -> pango -> harfbuzz + help + PCMan File Manager (PCManFM) is a file manager application developed + by Hong Jen Yee from Taiwan which is meant to be a replacement for + Nautilus, Konqueror and Thunar. + + http://wiki.lxde.org/en/PCManFM + +comment "pcmanfm needs X.org and a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_XORG7 diff --git a/package/pcmanfm/pcmanfm.hash b/package/pcmanfm/pcmanfm.hash new file mode 100644 index 0000000000..a3b7653b01 --- /dev/null +++ b/package/pcmanfm/pcmanfm.hash @@ -0,0 +1,2 @@ +# From http://blog.lxde.org/?p=1280 +sha1 0a195301de31c82f1c169e620be7cea8b91813b5 pcmanfm-1.2.3.tar.xz diff --git a/package/pcmanfm/pcmanfm.mk b/package/pcmanfm/pcmanfm.mk new file mode 100644 index 0000000000..62d86186f6 --- /dev/null +++ b/package/pcmanfm/pcmanfm.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# pcmanfm +# +################################################################################ + +PCMANFM_VERSION = 1.2.3 +PCMANFM_SOURCE = pcmanfm-$(PCMANFM_VERSION).tar.xz +PCMANFM_SITE = http://sourceforge.net/projects/pcmanfm/files +PCMANFM_DEPENDENCIES = libgtk2 libglib2 menu-cache libfm +PCMANFM_LICENSE = GPLv2+ +PCMANFM_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/pcre/0001-no-compat.patch b/package/pcre/0001-no-compat.patch new file mode 100644 index 0000000000..7099727737 --- /dev/null +++ b/package/pcre/0001-no-compat.patch @@ -0,0 +1,31 @@ +Kill ABI compatibility bits, we don't need them. +Fixes build failures on non-ELF (blackfin) targets. + +Signed-off-by: Gustavo Zacarias + +diff -Nura pcre-8.32.orig/pcrecpp.cc pcre-8.32/pcrecpp.cc +--- pcre-8.32.orig/pcrecpp.cc 2012-12-28 08:32:10.193847937 -0300 ++++ pcre-8.32/pcrecpp.cc 2012-12-28 08:32:26.924376180 -0300 +@@ -58,22 +58,6 @@ + // Special object that stands-in for no argument + Arg RE::no_arg((void*)NULL); + +-// This is for ABI compatibility with old versions of pcre (pre-7.6), +-// which defined a global no_arg variable instead of putting it in the +-// RE class. This works on GCC >= 3, at least. It definitely works +-// for ELF, but may not for other object formats (Mach-O, for +-// instance, does not support aliases.) We could probably have a more +-// inclusive test if we ever needed it. (Note that not only the +-// __attribute__ syntax, but also __USER_LABEL_PREFIX__, are +-// gnu-specific.) +-#if defined(__GNUC__) && __GNUC__ >= 3 && defined(__ELF__) +-# define ULP_AS_STRING(x) ULP_AS_STRING_INTERNAL(x) +-# define ULP_AS_STRING_INTERNAL(x) #x +-# define USER_LABEL_PREFIX_STR ULP_AS_STRING(__USER_LABEL_PREFIX__) +-extern Arg no_arg +- __attribute__((alias(USER_LABEL_PREFIX_STR "_ZN7pcrecpp2RE6no_argE"))); +-#endif +- + // If a regular expression has no error, its error_ field points here + static const string empty_string; + diff --git a/package/pcre/0002-no-cpp-tests.patch b/package/pcre/0002-no-cpp-tests.patch new file mode 100644 index 0000000000..0255028fb6 --- /dev/null +++ b/package/pcre/0002-no-cpp-tests.patch @@ -0,0 +1,31 @@ +Disable PCRE C++ unit tests, they fail to build on static scenarios +and they're not installed. + +Signed-off-by: Gustavo Zacarias + +diff -Nura pcre-8.33.orig/Makefile.in pcre-8.33/Makefile.in +--- pcre-8.33.orig/Makefile.in 2013-05-28 06:09:27.000000000 -0300 ++++ pcre-8.33/Makefile.in 2013-09-03 11:28:28.398198832 -0300 +@@ -123,12 +123,6 @@ + @WITH_PCRE8_TRUE@am__append_20 = libpcreposix.la + @WITH_GCOV_TRUE@@WITH_PCRE8_TRUE@am__append_21 = $(GCOV_CFLAGS) + @WITH_PCRE_CPP_TRUE@am__append_22 = libpcrecpp.la +-@WITH_PCRE_CPP_TRUE@am__append_23 = pcrecpp_unittest \ +-@WITH_PCRE_CPP_TRUE@ pcre_scanner_unittest \ +-@WITH_PCRE_CPP_TRUE@ pcre_stringpiece_unittest +-@WITH_PCRE_CPP_TRUE@am__append_24 = pcrecpp_unittest \ +-@WITH_PCRE_CPP_TRUE@ pcre_scanner_unittest \ +-@WITH_PCRE_CPP_TRUE@ pcre_stringpiece_unittest + @WITH_GCOV_TRUE@@WITH_PCRE_CPP_TRUE@am__append_25 = $(GCOV_CXXFLAGS) + @WITH_GCOV_TRUE@@WITH_PCRE_CPP_TRUE@am__append_26 = $(GCOV_LIBS) + @WITH_GCOV_TRUE@@WITH_PCRE_CPP_TRUE@am__append_27 = $(GCOV_LIBS) +@@ -360,9 +354,6 @@ + @WITH_PCRE8_TRUE@am__EXEEXT_1 = pcregrep$(EXEEXT) + @WITH_REBUILD_CHARTABLES_TRUE@am__EXEEXT_2 = dftables$(EXEEXT) + @WITH_JIT_TRUE@am__EXEEXT_3 = pcre_jit_test$(EXEEXT) +-@WITH_PCRE_CPP_TRUE@am__EXEEXT_4 = pcrecpp_unittest$(EXEEXT) \ +-@WITH_PCRE_CPP_TRUE@ pcre_scanner_unittest$(EXEEXT) \ +-@WITH_PCRE_CPP_TRUE@ pcre_stringpiece_unittest$(EXEEXT) + PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) + am__dftables_SOURCES_DIST = dftables.c + @WITH_REBUILD_CHARTABLES_TRUE@am_dftables_OBJECTS = \ diff --git a/package/pcre/Config.in b/package/pcre/Config.in new file mode 100644 index 0000000000..9d3a143365 --- /dev/null +++ b/package/pcre/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_PCRE + bool "pcre" + help + Perl Compatible Regular Expressions. By default, only the + 8-bits libpcre is built. To get the 16-bits and/or 32-bits + variants libpcre16/libpcre32, use the package sub-options. + + http://www.pcre.org/ + +if BR2_PACKAGE_PCRE + +config BR2_PACKAGE_PCRE_16 + bool "16-bit pcre" + help + This option builds the 16-bits pcre library, i.e 'libpcre16' + +config BR2_PACKAGE_PCRE_32 + bool "32-bit pcre" + help + This option builds the 32-bits pcre library, i.e 'libpcre32' + +config BR2_PACKAGE_PCRE_UTF + bool "UTF-8/16/32 support in pcre" + help + This option builds the pcre library with UTF-8/16/32 support + +config BR2_PACKAGE_PCRE_UCP + bool "Unicode properties support in pcre" + select BR2_PACKAGE_PCRE_UTF + help + This option builds the pcre library with Unicode properties + support (implies UTF-8/16/32 support)' + +endif diff --git a/package/pcre/pcre.hash b/package/pcre/pcre.hash new file mode 100644 index 0000000000..5b580a74c9 --- /dev/null +++ b/package/pcre/pcre.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 b9e02d36e23024d6c02a2e5b25204b3a4fa6ade43e0a5f869f254f49535079df pcre-8.38.tar.bz2 diff --git a/package/pcre/pcre.mk b/package/pcre/pcre.mk new file mode 100644 index 0000000000..7fcc592a14 --- /dev/null +++ b/package/pcre/pcre.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# pcre +# +################################################################################ + +PCRE_VERSION = 8.38 +PCRE_SITE = ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre +PCRE_SOURCE = pcre-$(PCRE_VERSION).tar.bz2 +PCRE_LICENSE = BSD-3c +PCRE_LICENSE_FILES = LICENCE +PCRE_INSTALL_STAGING = YES +PCRE_CONFIG_SCRIPTS = pcre-config + +# They're required for host-libglib2 +HOST_PCRE_CONF_OPTS = --enable-unicode-properties + +ifneq ($(BR2_INSTALL_LIBSTDCPP),y) +# pcre will use the host g++ if a cross version isn't available +PCRE_CONF_OPTS = --disable-cpp +endif + +PCRE_CONF_OPTS += --enable-pcre8 +PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_16),--enable-pcre16,--disable-pcre16) +PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_32),--enable-pcre32,--disable-pcre32) +PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_UTF),--enable-utf,--disable-utf) +PCRE_CONF_OPTS += $(if $(BR2_PACKAGE_PCRE_UCP),--enable-unicode-properties,--disable-unicode-properties) + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/pcsc-lite/0001-pthread-needed-for-libusb.patch b/package/pcsc-lite/0001-pthread-needed-for-libusb.patch new file mode 100644 index 0000000000..acb777aa44 --- /dev/null +++ b/package/pcsc-lite/0001-pthread-needed-for-libusb.patch @@ -0,0 +1,29 @@ +configure.ac: explicitly add pthread cflags/libs in the libusb test + +If libusb-config does not exist, LIBUSB_CFLAGS and PTHREAD_CFLAGS will be +empty, and the test for libusb will be performed without additional flags. +However, when libusb needs threads, some extra flags are needed (depending +on the platform), like -pthreads, -lpthread, etc. Without these flags, the +test for libusb_init() will fail to link correctly, and pcsc-lite will fail +detecting libusb. + +Signed-off-by: Thomas De Schampheleire + +Upstream-status: will be submitted + +--- + +diff --git a/configure.ac b/configure.ac +--- a/configure.ac ++++ b/configure.ac +@@ -254,8 +254,8 @@ if test "x$use_libusb" != xno ; then + saved_CPPFLAGS="$CPPFLAGS" + saved_LIBS="$LIBS" + +- CPPFLAGS="$CPPFLAGS $LIBUSB_CFLAGS" +- LIBS="$LDFLAGS $LIBUSB_LIBS" ++ CPPFLAGS="$CPPFLAGS $LIBUSB_CFLAGS $PTHREAD_CFLAGS" ++ LIBS="$LDFLAGS $LIBUSB_LIBS $PTHREAD_LIBS" + + AC_CHECK_HEADERS(libusb.h, [], + [ AC_MSG_ERROR([libusb.h not found, use ./configure LIBUSB_CFLAGS=...]) ]) diff --git a/package/pcsc-lite/Config.in b/package/pcsc-lite/Config.in new file mode 100644 index 0000000000..658ebe3068 --- /dev/null +++ b/package/pcsc-lite/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_PCSC_LITE + bool "pcsc-lite" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + help + Middleware to access smart card using SCard API (PC/SC). + + http://pcsclite.alioth.debian.org/ + +if BR2_PACKAGE_PCSC_LITE + +config BR2_PACKAGE_PCSC_LITE_FORCE_LIBUSB + bool "use libusb" + depends on !BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_LIBUSB + help + Select Y if you want to support usb smart card readers. + +config BR2_PACKAGE_PCSC_LITE_DEBUGATR + bool "enable ATR debug messages" + help + Enable ATR debug messages from pcscd. + +config BR2_PACKAGE_PCSC_LITE_EMBEDDED + bool "enable embedded mode" + help + Limit RAM and CPU resources by disabling logs. + +endif + +comment "pcsc-lite needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/pcsc-lite/pcsc-lite.hash b/package/pcsc-lite/pcsc-lite.hash new file mode 100644 index 0000000000..3adb865245 --- /dev/null +++ b/package/pcsc-lite/pcsc-lite.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 607c4bd730526d282a63edb2ba4ee043f497877be642c5c647e37995e21f2612 pcsc-lite-1.8.10.tar.bz2 diff --git a/package/pcsc-lite/pcsc-lite.mk b/package/pcsc-lite/pcsc-lite.mk new file mode 100644 index 0000000000..e53c004e8b --- /dev/null +++ b/package/pcsc-lite/pcsc-lite.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# pcsc-lite +# +################################################################################ + +PCSC_LITE_VERSION = 1.8.10 +PCSC_LITE_SOURCE = pcsc-lite-$(PCSC_LITE_VERSION).tar.bz2 +PCSC_LITE_SITE = http://alioth.debian.org/frs/download.php/file/3963 +PCSC_LITE_INSTALL_STAGING = YES +PCSC_LITE_DEPENDENCIES = host-pkgconf +PCSC_LITE_LICENSE = BSD-3c +PCSC_LITE_LICENSE_FILES = COPYING +PCSC_LITE_AUTORECONF = YES + +# - libudev and libusb are optional +# - libudev and libusb can't be used together +# - libudev has a priority over libusb + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +PCSC_LITE_CONF_OPTS += --enable-libudev --disable-libusb +PCSC_LITE_DEPENDENCIES += udev +else +ifeq ($(BR2_PACKAGE_LIBUSB),y) +PCSC_LITE_CONF_OPTS += --enable-libusb --disable-libudev +PCSC_LITE_DEPENDENCIES += libusb +else +PCSC_LITE_CONF_OPTS += --disable-libusb --disable-libudev +endif +endif + +ifeq ($(PACKAGE_PCSC_LITE_DEBUGATR),y) +PCSC_LITE_CONF_OPTS += --enable-debugatr +endif + +ifeq ($(PACKAGE_PCSC_LITE_EMBEDDED),y) +PCSC_LITE_CONF_OPTS += --enable-embedded +endif + +$(eval $(autotools-package)) diff --git a/package/perl-crypt-openssl-random/Config.in b/package/perl-crypt-openssl-random/Config.in new file mode 100644 index 0000000000..2ceb78dfd6 --- /dev/null +++ b/package/perl-crypt-openssl-random/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PERL_CRYPT_OPENSSL_RANDOM + bool "perl-crypt-openssl-random" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_OPENSSL + help + OpenSSL/LibreSSL pseudo-random number generator access + + http://sourceforge.net/projects/perl-openssl/ + +comment "perl-crypt-openssl-random needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-crypt-openssl-random/perl-crypt-openssl-random.hash b/package/perl-crypt-openssl-random/perl-crypt-openssl-random.hash new file mode 100644 index 0000000000..caacdc9015 --- /dev/null +++ b/package/perl-crypt-openssl-random/perl-crypt-openssl-random.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 5d71337503e0356ce1ce1481504e5885 Crypt-OpenSSL-Random-0.11.tar.gz +sha256 bb8c81c6a39b9b13a22d818ee9a746242f136f0fadceb6b9776ae615e7524c7a Crypt-OpenSSL-Random-0.11.tar.gz diff --git a/package/perl-crypt-openssl-random/perl-crypt-openssl-random.mk b/package/perl-crypt-openssl-random/perl-crypt-openssl-random.mk new file mode 100644 index 0000000000..615282106b --- /dev/null +++ b/package/perl-crypt-openssl-random/perl-crypt-openssl-random.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-crypt-openssl-random +# +################################################################################ + +PERL_CRYPT_OPENSSL_RANDOM_VERSION = 0.11 +PERL_CRYPT_OPENSSL_RANDOM_SOURCE = Crypt-OpenSSL-Random-$(PERL_CRYPT_OPENSSL_RANDOM_VERSION).tar.gz +PERL_CRYPT_OPENSSL_RANDOM_SITE = $(BR2_CPAN_MIRROR)/authors/id/R/RU/RURBAN +PERL_CRYPT_OPENSSL_RANDOM_DEPENDENCIES = openssl +PERL_CRYPT_OPENSSL_RANDOM_LICENSE = Artistic or GPLv1+ +PERL_CRYPT_OPENSSL_RANDOM_LICENSE_FILES = LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-crypt-openssl-rsa/Config.in b/package/perl-crypt-openssl-rsa/Config.in new file mode 100644 index 0000000000..1fa1fd9881 --- /dev/null +++ b/package/perl-crypt-openssl-rsa/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PERL_CRYPT_OPENSSL_RSA + bool "perl-crypt-openssl-rsa" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_PERL_CRYPT_OPENSSL_RANDOM + help + RSA encoding and decoding, using the openSSL libraries + + https://metacpan.org/release/Crypt-OpenSSL-RSA + +comment "perl-crypt-openssl-rsa needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.hash b/package/perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.hash new file mode 100644 index 0000000000..6e060ce672 --- /dev/null +++ b/package/perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 86217a5036fc63779c30420b5fd84129 Crypt-OpenSSL-RSA-0.28.tar.gz +sha256 5357f977464bb3a8184cf2d3341851a10d5515b4b2b0dfb88bf78995c0ded7be Crypt-OpenSSL-RSA-0.28.tar.gz diff --git a/package/perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.mk b/package/perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.mk new file mode 100644 index 0000000000..7a4e31ee1a --- /dev/null +++ b/package/perl-crypt-openssl-rsa/perl-crypt-openssl-rsa.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-crypt-openssl-rsa +# +################################################################################ + +PERL_CRYPT_OPENSSL_RSA_VERSION = 0.28 +PERL_CRYPT_OPENSSL_RSA_SOURCE = Crypt-OpenSSL-RSA-$(PERL_CRYPT_OPENSSL_RSA_VERSION).tar.gz +PERL_CRYPT_OPENSSL_RSA_SITE = $(BR2_CPAN_MIRROR)/authors/id/P/PE/PERLER +PERL_CRYPT_OPENSSL_RSA_DEPENDENCIES = perl-crypt-openssl-random +PERL_CRYPT_OPENSSL_RSA_LICENSE = Artistic or GPLv1+ +PERL_CRYPT_OPENSSL_RSA_LICENSE_FILES = LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-datetime-tiny/Config.in b/package/perl-datetime-tiny/Config.in new file mode 100644 index 0000000000..e84db8b7cb --- /dev/null +++ b/package/perl-datetime-tiny/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_DATETIME_TINY + bool "perl-datetime-tiny" + help + A datetime object with as little code as possible + + https://metacpan.org/release/DateTime-Tiny diff --git a/package/perl-datetime-tiny/perl-datetime-tiny.hash b/package/perl-datetime-tiny/perl-datetime-tiny.hash new file mode 100644 index 0000000000..e498edb3a9 --- /dev/null +++ b/package/perl-datetime-tiny/perl-datetime-tiny.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 9e7e4fe588445023763df113d3f2345f DateTime-Tiny-1.04.tar.gz +sha256 68137c8ab3ca2a7f8a5fcea20f94b2f82bc2c7c36bb45063dbd81faadf0c7881 DateTime-Tiny-1.04.tar.gz diff --git a/package/perl-datetime-tiny/perl-datetime-tiny.mk b/package/perl-datetime-tiny/perl-datetime-tiny.mk new file mode 100644 index 0000000000..bf3b7d97a1 --- /dev/null +++ b/package/perl-datetime-tiny/perl-datetime-tiny.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-datetime-tiny +# +################################################################################ + +PERL_DATETIME_TINY_VERSION = 1.04 +PERL_DATETIME_TINY_SOURCE = DateTime-Tiny-$(PERL_DATETIME_TINY_VERSION).tar.gz +PERL_DATETIME_TINY_SITE = $(BR2_CPAN_MIRROR)/authors/id/A/AD/ADAMK +PERL_DATETIME_TINY_LICENSE = Artistic or GPLv1+ +PERL_DATETIME_TINY_LICENSE_FILES = LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-db-file/Config.in b/package/perl-db-file/Config.in new file mode 100644 index 0000000000..f07e5df483 --- /dev/null +++ b/package/perl-db-file/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PERL_DB_FILE + bool "perl-db-file" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_BERKELEYDB + help + Perl5 access to Berkeley DB version 1.x or 2.x. + + https://metacpan.org/release/DB_File + +comment "perl-db-file needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-db-file/perl-db-file.hash b/package/perl-db-file/perl-db-file.hash new file mode 100644 index 0000000000..df0113c8b9 --- /dev/null +++ b/package/perl-db-file/perl-db-file.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 0ae7910cabc31a44e50b713a8a475514 DB_File-1.835.tar.gz +sha256 41206f39a1bac49db8c1595e300b04c70e1393b2d78ccb9ef15c5c0b81037cfc DB_File-1.835.tar.gz diff --git a/package/perl-db-file/perl-db-file.mk b/package/perl-db-file/perl-db-file.mk new file mode 100644 index 0000000000..3db8c563cb --- /dev/null +++ b/package/perl-db-file/perl-db-file.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# perl-db-file +# +################################################################################ + +PERL_DB_FILE_VERSION = 1.835 +PERL_DB_FILE_SOURCE = DB_File-$(PERL_DB_FILE_VERSION).tar.gz +PERL_DB_FILE_SITE = $(BR2_CPAN_MIRROR)/authors/id/P/PM/PMQS +PERL_DB_FILE_DEPENDENCIES = berkeleydb +PERL_DB_FILE_LICENSE = Artistic or GPLv1+ +PERL_DB_FILE_LICENSE_FILES = README + +define PERL_DB_FILE_FIX_CONFIG_IN + $(SED) 's%^INCLUDE.*%INCLUDE = $(STAGING_DIR)/usr/include%' \ + $(@D)/config.in + $(SED) 's%^LIB.*%LIB = $(STAGING_DIR)/usr/lib%' \ + $(@D)/config.in +endef +PERL_DB_FILE_POST_PATCH_HOOKS += PERL_DB_FILE_FIX_CONFIG_IN + +$(eval $(perl-package)) diff --git a/package/perl-digest-hmac/Config.in b/package/perl-digest-hmac/Config.in new file mode 100644 index 0000000000..733a53d8ae --- /dev/null +++ b/package/perl-digest-hmac/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_DIGEST_HMAC + bool "perl-digest-hmac" + help + Digest::HMAC - Keyed-Hashing for Message Authentication + + https://github.com/gisle/digest-hmac diff --git a/package/perl-digest-hmac/perl-digest-hmac.hash b/package/perl-digest-hmac/perl-digest-hmac.hash new file mode 100644 index 0000000000..018e4eb0ab --- /dev/null +++ b/package/perl-digest-hmac/perl-digest-hmac.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 e6a5d6f552da16eacb5157ea4369ff9d Digest-HMAC-1.03.tar.gz +sha256 3bc72c6d3ff144d73aefb90e9a78d33612d58cf1cd1631ecfb8985ba96da4a59 Digest-HMAC-1.03.tar.gz diff --git a/package/perl-digest-hmac/perl-digest-hmac.mk b/package/perl-digest-hmac/perl-digest-hmac.mk new file mode 100644 index 0000000000..bee32f4449 --- /dev/null +++ b/package/perl-digest-hmac/perl-digest-hmac.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-digest-hmac +# +################################################################################ + +PERL_DIGEST_HMAC_VERSION = 1.03 +PERL_DIGEST_HMAC_SOURCE = Digest-HMAC-$(PERL_DIGEST_HMAC_VERSION).tar.gz +PERL_DIGEST_HMAC_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_DIGEST_HMAC_LICENSE = Artistic or GPLv1+ +PERL_DIGEST_HMAC_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-digest-sha1/Config.in b/package/perl-digest-sha1/Config.in new file mode 100644 index 0000000000..b72a4ae938 --- /dev/null +++ b/package/perl-digest-sha1/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PERL_DIGEST_SHA1 + bool "perl-digest-sha1" + depends on !BR2_STATIC_LIBS + help + Perl interface to the SHA-1 algorithm + + https://metacpan.org/release/Digest-SHA1 + +comment "perl-digest-sha1 needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-digest-sha1/perl-digest-sha1.hash b/package/perl-digest-sha1/perl-digest-sha1.hash new file mode 100644 index 0000000000..d24d5ab668 --- /dev/null +++ b/package/perl-digest-sha1/perl-digest-sha1.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 bd22388f268434f2b24f64e28bf1aa35 Digest-SHA1-2.13.tar.gz +sha256 68c1dac2187421f0eb7abf71452a06f190181b8fc4b28ededf5b90296fb943cc Digest-SHA1-2.13.tar.gz diff --git a/package/perl-digest-sha1/perl-digest-sha1.mk b/package/perl-digest-sha1/perl-digest-sha1.mk new file mode 100644 index 0000000000..52b9ec355e --- /dev/null +++ b/package/perl-digest-sha1/perl-digest-sha1.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-digest-sha1 +# +################################################################################ + +PERL_DIGEST_SHA1_VERSION = 2.13 +PERL_DIGEST_SHA1_SOURCE = Digest-SHA1-$(PERL_DIGEST_SHA1_VERSION).tar.gz +PERL_DIGEST_SHA1_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_DIGEST_SHA1_LICENSE = Artistic or GPLv1+ +PERL_DIGEST_SHA1_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-encode-detect/Config.in b/package/perl-encode-detect/Config.in new file mode 100644 index 0000000000..63ea432917 --- /dev/null +++ b/package/perl-encode-detect/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PERL_ENCODE_DETECT + bool "perl-encode-detect" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + help + An Encode::Encoding subclass that detects the encoding of + data. + + https://metacpan.org/release/Encode-Detect + +comment "perl-encode-detect needs a toolchain w/ C++, dynamic library" + depends on BR2_STATIC_LIBS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/perl-encode-detect/perl-encode-detect.hash b/package/perl-encode-detect/perl-encode-detect.hash new file mode 100644 index 0000000000..c727a44912 --- /dev/null +++ b/package/perl-encode-detect/perl-encode-detect.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 ee9faf55d7105c97b02b8ebe590819c7 Encode-Detect-1.01.tar.gz +sha256 834d893aa7db6ce3f158afbd0e432d6ed15a276e0940db0a74be13fd9c4bbbf1 Encode-Detect-1.01.tar.gz diff --git a/package/perl-encode-detect/perl-encode-detect.mk b/package/perl-encode-detect/perl-encode-detect.mk new file mode 100644 index 0000000000..732fba8db5 --- /dev/null +++ b/package/perl-encode-detect/perl-encode-detect.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-encode-detect +# +################################################################################ + +PERL_ENCODE_DETECT_VERSION = 1.01 +PERL_ENCODE_DETECT_SOURCE = Encode-Detect-$(PERL_ENCODE_DETECT_VERSION).tar.gz +PERL_ENCODE_DETECT_SITE = $(BR2_CPAN_MIRROR)/authors/id/J/JG/JGMYERS +PERL_ENCODE_DETECT_DEPENDENCIES = host-perl-module-build +PERL_ENCODE_DETECT_LICENSE = MPL-1.1 +PERL_ENCODE_DETECT_LICENSE_FILES = LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-encode-locale/Config.in b/package/perl-encode-locale/Config.in new file mode 100644 index 0000000000..d15aecbdfa --- /dev/null +++ b/package/perl-encode-locale/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_ENCODE_LOCALE + bool "perl-encode-locale" + help + Determine the locale encoding + + https://github.com/gisle/encode-locale diff --git a/package/perl-encode-locale/perl-encode-locale.hash b/package/perl-encode-locale/perl-encode-locale.hash new file mode 100644 index 0000000000..1b6a6bcbc9 --- /dev/null +++ b/package/perl-encode-locale/perl-encode-locale.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 fcfdb8e4ee34bcf62aed429b4a23db27 Encode-Locale-1.05.tar.gz +sha256 176fa02771f542a4efb1dbc2a4c928e8f4391bf4078473bd6040d8f11adb0ec1 Encode-Locale-1.05.tar.gz diff --git a/package/perl-encode-locale/perl-encode-locale.mk b/package/perl-encode-locale/perl-encode-locale.mk new file mode 100644 index 0000000000..2544b16fdb --- /dev/null +++ b/package/perl-encode-locale/perl-encode-locale.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-encode-locale +# +################################################################################ + +PERL_ENCODE_LOCALE_VERSION = 1.05 +PERL_ENCODE_LOCALE_SOURCE = Encode-Locale-$(PERL_ENCODE_LOCALE_VERSION).tar.gz +PERL_ENCODE_LOCALE_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_ENCODE_LOCALE_LICENSE = Artistic or GPLv1+ +PERL_ENCODE_LOCALE_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-file-listing/Config.in b/package/perl-file-listing/Config.in new file mode 100644 index 0000000000..85f8e2eb1d --- /dev/null +++ b/package/perl-file-listing/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PERL_FILE_LISTING + bool "perl-file-listing" + select BR2_PACKAGE_PERL_HTTP_DATE + help + Module to parse directoy listings + + https://github.com/gisle/file-listing diff --git a/package/perl-file-listing/perl-file-listing.hash b/package/perl-file-listing/perl-file-listing.hash new file mode 100644 index 0000000000..1549c5af17 --- /dev/null +++ b/package/perl-file-listing/perl-file-listing.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 83f636b477741f3a014585bb9cc079a6 File-Listing-6.04.tar.gz +sha256 1e0050fcd6789a2179ec0db282bf1e90fb92be35d1171588bd9c47d52d959cf5 File-Listing-6.04.tar.gz diff --git a/package/perl-file-listing/perl-file-listing.mk b/package/perl-file-listing/perl-file-listing.mk new file mode 100644 index 0000000000..a9d8cede72 --- /dev/null +++ b/package/perl-file-listing/perl-file-listing.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-file-listing +# +################################################################################ + +PERL_FILE_LISTING_VERSION = 6.04 +PERL_FILE_LISTING_SOURCE = File-Listing-$(PERL_FILE_LISTING_VERSION).tar.gz +PERL_FILE_LISTING_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_FILE_LISTING_DEPENDENCIES = perl-http-date +PERL_FILE_LISTING_LICENSE = Artistic or GPLv1+ +PERL_FILE_LISTING_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-file-util/Config.in b/package/perl-file-util/Config.in new file mode 100644 index 0000000000..871be988af --- /dev/null +++ b/package/perl-file-util/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_FILE_UTIL + bool "perl-file-util" + help + Easy, versatile, portable file handling + + https://github.com/tommybutler/file-util/wiki diff --git a/package/perl-file-util/perl-file-util.hash b/package/perl-file-util/perl-file-util.hash new file mode 100644 index 0000000000..1e613dc01f --- /dev/null +++ b/package/perl-file-util/perl-file-util.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 93c572b4c54743a7ef383486dd2c4014 File-Util-4.132140.tar.gz +sha256 4233c493468da8b34f2df19b191aaa400f328d877c8c023605e43385976a99d1 File-Util-4.132140.tar.gz diff --git a/package/perl-file-util/perl-file-util.mk b/package/perl-file-util/perl-file-util.mk new file mode 100644 index 0000000000..7026515e66 --- /dev/null +++ b/package/perl-file-util/perl-file-util.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# perl-file-util +# +################################################################################ + +PERL_FILE_UTIL_VERSION = 4.132140 +PERL_FILE_UTIL_SOURCE = File-Util-$(PERL_FILE_UTIL_VERSION).tar.gz +PERL_FILE_UTIL_SITE = $(BR2_CPAN_MIRROR)/authors/id/T/TO/TOMMY +PERL_FILE_UTIL_DEPENDENCIES = host-perl-module-build +PERL_FILE_UTIL_LICENSE = Artistic or GPLv1+ +PERL_FILE_UTIL_LICENSE_FILES = COPYING LICENSE +HOST_PERL_FILE_UTIL_DEPENDENCIES = host-perl-module-build + +$(eval $(perl-package)) +$(eval $(host-perl-package)) diff --git a/package/perl-gd/0001-getoptions.patch b/package/perl-gd/0001-getoptions.patch new file mode 100644 index 0000000000..74f055bead --- /dev/null +++ b/package/perl-gd/0001-getoptions.patch @@ -0,0 +1,43 @@ +fix option handling in Makefile.PL + +the call to GetOptions() must be unique. + +Signed-off-by: Francois Perrad +see https://github.com/lstein/Perl-GD/pull/6 + +Index: b/Makefile.PL +=================================================================== +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -24,7 +24,15 @@ + my ($options,$lib_gd_path,$lib_ft_path,$lib_png_path,$lib_jpeg_path,$lib_xpm_path,$lib_zlib_path,$force); + + use Getopt::Long; +-GetOptions("ignore_missing_gd" => \$force); ++my $result = GetOptions("options=s" => \$options, ++ "lib_gd_path=s" => \$lib_gd_path, ++ "lib_ft_path=s" => \$lib_ft_path, ++ "lib_png_path=s" => \$lib_png_path, ++ "lib_jpeg_path=s" => \$lib_jpeg_path, ++ "lib_xpm_path=s" => \$lib_xpm_path, ++ "lib_zlib_path=s" => \$lib_zlib_path, ++ "ignore_missing_gd" => \$force, ++ ); + + unless (try_to_autoconfigure(\$options,\$lib_gd_path,\@INC,\@LIBPATH,\@LIBS) || $force) { + die < \$options, +- "lib_gd_path=s" => \$lib_gd_path, +- "lib_ft_path=s" => \$lib_ft_path, +- "lib_png_path=s" => \$lib_png_path, +- "lib_jpeg_path=s" => \$lib_jpeg_path, +- "lib_xpm_path=s" => \$lib_xpm_path, +- "lib_zlib_path=s" => \$lib_zlib_path, +- ); + unless ($result) { + print STDERR < +see https://github.com/lstein/Perl-GD/pull/7 + +Index: b/Makefile.PL +=================================================================== +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -34,9 +34,9 @@ + END + } + ++push @LIBS, "-lgd"; + @INC = qw(-I/usr/include -I/usr/include/gd) unless @INC; + @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib) unless @LIBPATH; +-@LIBS = qw(-lgd) unless @LIBS; + + # support for AMD64 libraries + if (-d '/usr/lib64') { +@@ -291,7 +291,6 @@ + @$LIBPATH = map {s/^-L// && "-L$_"} split /\s+/,$ldflags; + @$LIBS = split /\s+/,$libs; + +- push @$LIBS,"-lgd"; + push @$LIBPATH,"-L$libdir"; + ($$lib_gd_path = $libdir) =~ s!/[^/]+$!!; + $$options = $features; diff --git a/package/perl-gd/0003-force.patch b/package/perl-gd/0003-force.patch new file mode 100644 index 0000000000..0a121a994e --- /dev/null +++ b/package/perl-gd/0003-force.patch @@ -0,0 +1,32 @@ +let @INC and @LIBPATH empty when ignore_missing_gd + +Signed-off-by: Francois Perrad +see https://github.com/lstein/Perl-GD/pull/7 + +Index: b/Makefile.PL +=================================================================== +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -35,13 +35,15 @@ + } + + push @LIBS, "-lgd"; +-@INC = qw(-I/usr/include -I/usr/include/gd) unless @INC; +-@LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib) unless @LIBPATH; +- +-# support for AMD64 libraries +-if (-d '/usr/lib64') { +- my @libs64 = map {my $a = $_; $a=~ s/lib$/lib64/; $a} @LIBPATH; +- @LIBPATH = (@LIBPATH,@libs64); ++unless ($force) { ++ @INC = qw(-I/usr/include -I/usr/include/gd) unless @INC; ++ @LIBPATH = qw(-L/usr/lib/X11 -L/usr/X11R6/lib -L/usr/X11/lib -L/usr/lib) unless @LIBPATH; ++ ++ # support for AMD64 libraries ++ if (-d '/usr/lib64') { ++ my @libs64 = map {my $a = $_; $a=~ s/lib$/lib64/; $a} @LIBPATH; ++ @LIBPATH = (@LIBPATH,@libs64); ++ } + } + + ############################################################################################# diff --git a/package/perl-gd/0004-gdlib-config-is-now-configurable.patch b/package/perl-gd/0004-gdlib-config-is-now-configurable.patch new file mode 100644 index 0000000000..dea61261f6 --- /dev/null +++ b/package/perl-gd/0004-gdlib-config-is-now-configurable.patch @@ -0,0 +1,67 @@ +From f417f38929fe558d388b9a9343da9b2c0e6984aa Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 20 Dec 2014 23:22:41 +0100 +Subject: [PATCH] Makefile.PL: gdlib-config is now configurable + +Signed-off-by: Romain Naour +--- + Makefile.PL | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/Makefile.PL b/Makefile.PL +index dfe8ad7..0fa6ef3 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -21,7 +21,7 @@ END + my (@INC,@LIBPATH,@LIBS); + my $AUTOCONFIG = 0; # global set by try_to_autoconfigure() below + +-my ($options,$lib_gd_path,$lib_ft_path,$lib_png_path,$lib_jpeg_path,$lib_xpm_path,$lib_zlib_path,$force); ++my ($options,$lib_gd_path,$lib_ft_path,$lib_png_path,$lib_jpeg_path,$lib_xpm_path,$lib_zlib_path,$force,$gdlib_config_path); + + use Getopt::Long; + my $result = GetOptions("options=s" => \$options, +@@ -32,6 +32,7 @@ my $result = GetOptions("options=s" => \$options, + "lib_xpm_path=s" => \$lib_xpm_path, + "lib_zlib_path=s" => \$lib_zlib_path, + "ignore_missing_gd" => \$force, ++ "gdlib_config_path=s" => \$gdlib_config_path, + ); + + unless (try_to_autoconfigure(\$options,\$lib_gd_path,\@INC,\@LIBPATH,\@LIBS) || $force) { +@@ -72,6 +73,7 @@ Configure GD module. + -lib_xpm_path path path to libxpm + -lib_zlib_path path path to libpng + -ignore_missing_gd Ignore missing or old libgd installations and try to compile anyway ++ -gdlib_config_path path path to gdlib-config + + If no options are passed on the command line. The program will + attempt to autoconfigure itself with the gdlib-config program (present +@@ -118,6 +120,15 @@ if( defined($lib_zlib_path) ) + @INC = ("-I$lib_zlib_path/include", @INC); + @LIBPATH = ("-L$lib_zlib_path/lib", @LIBPATH); + } ++if( defined($gdlib_config_path) ) ++{ ++ print "gdlib-config used: $gdlib_config_path\n"; ++} ++else ++{ ++ $gdlib_config_path = "gdlib-config"; ++ print "$gdlib_config_path used from the PATH\n"; ++} + ############################################################################################# + + if ($^O eq 'VMS'){ +@@ -275,7 +286,7 @@ exit 0; + + sub try_to_autoconfigure { + my ($options,$lib_gd_path,$INC,$LIBPATH,$LIBS) = @_; +- my $config = `gdlib-config --all`; ++ my $config = `$gdlib_config_path --all`; + return unless $config; + $AUTOCONFIG++; + +-- +1.9.3 + diff --git a/package/perl-gd/Config.in b/package/perl-gd/Config.in new file mode 100644 index 0000000000..61f7e5dadc --- /dev/null +++ b/package/perl-gd/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_PERL_GD + bool "perl-gd" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_GD + help + Interface to Gd Graphics Library + + https://metacpan.org/release/GD + +comment "perl-gd needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-gd/perl-gd.hash b/package/perl-gd/perl-gd.hash new file mode 100644 index 0000000000..c6822aeaf1 --- /dev/null +++ b/package/perl-gd/perl-gd.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 d2c9b18123bcaff8672eb50f2eb37ed3 GD-2.53.tar.gz +sha256 d05d01fe95e581adb3468cf05ab5d405db7497c0fb3ec7ecf23d023705fab7aa GD-2.53.tar.gz diff --git a/package/perl-gd/perl-gd.mk b/package/perl-gd/perl-gd.mk new file mode 100644 index 0000000000..99568cbf1d --- /dev/null +++ b/package/perl-gd/perl-gd.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# perl-gd +# +################################################################################ + +PERL_GD_VERSION = 2.53 +PERL_GD_SOURCE = GD-$(PERL_GD_VERSION).tar.gz +PERL_GD_SITE = $(BR2_CPAN_MIRROR)/authors/id/L/LD/LDS +PERL_GD_DEPENDENCIES = zlib libpng freetype gd +PERL_GD_LICENSE = Artistic-2.0 or GPLv1+ +PERL_GD_LICENSE_FILES = LICENSE + +PERL_GD_CONF_OPTS = \ + -options=FT,PNG \ + -lib_gd_path=$(STAGING_DIR)/usr \ + -lib_ft_path=$(STAGING_DIR)/usr \ + -lib_png_path=$(STAGING_DIR)/usr \ + -lib_zlib_path=$(STAGING_DIR)/usr \ + -ignore_missing_gd \ + -gdlib=$(STAGING_DIR)/usr/bin/gdlib-config + +$(eval $(perl-package)) diff --git a/package/perl-gdgraph/Config.in b/package/perl-gdgraph/Config.in new file mode 100644 index 0000000000..10b3cd0323 --- /dev/null +++ b/package/perl-gdgraph/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PERL_GDGRAPH + bool "perl-gdgraph" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_PERL_GD + select BR2_PACKAGE_PERL_GDTEXTUTIL + help + Produces charts with GD + + https://metacpan.org/release/GDGraph + +comment "perl-gdgraph needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-gdgraph/perl-gdgraph.hash b/package/perl-gdgraph/perl-gdgraph.hash new file mode 100644 index 0000000000..7005cc92d1 --- /dev/null +++ b/package/perl-gdgraph/perl-gdgraph.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 8bb270a30fea27491302b39b701b3d4e GDGraph-1.49.tar.gz +sha256 d26538c827e35c1d4b27f3c045b60f1ab6b45401c54a87e86103cd7c2374cff5 GDGraph-1.49.tar.gz diff --git a/package/perl-gdgraph/perl-gdgraph.mk b/package/perl-gdgraph/perl-gdgraph.mk new file mode 100644 index 0000000000..dbc789e1b4 --- /dev/null +++ b/package/perl-gdgraph/perl-gdgraph.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-gdgraph +# +################################################################################ + +PERL_GDGRAPH_VERSION = 1.49 +PERL_GDGRAPH_SOURCE = GDGraph-$(PERL_GDGRAPH_VERSION).tar.gz +PERL_GDGRAPH_SITE = $(BR2_CPAN_MIRROR)/authors/id/R/RU/RUZ +PERL_GDGRAPH_DEPENDENCIES = perl-gd perl-gdtextutil +PERL_GDGRAPH_LICENSE = Artistic or GPLv1+ +PERL_GDGRAPH_LICENSE_FILES = Dustismo.LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-gdtextutil/Config.in b/package/perl-gdtextutil/Config.in new file mode 100644 index 0000000000..9baf0a078b --- /dev/null +++ b/package/perl-gdtextutil/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_GDTEXTUTIL + bool "perl-gdtextutil" + help + Text utilities for use with GD + + https://metacpan.org/release/GDTextUtil diff --git a/package/perl-gdtextutil/perl-gdtextutil.hash b/package/perl-gdtextutil/perl-gdtextutil.hash new file mode 100644 index 0000000000..7996ed9d3d --- /dev/null +++ b/package/perl-gdtextutil/perl-gdtextutil.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 941ad06eadc86b47f3a32da405665c41 GDTextUtil-0.86.tar.gz +sha256 886ecbf85cfe94f4135ee5689c4847a9ae783ecb99e6759e12c734f2dd6116bc GDTextUtil-0.86.tar.gz diff --git a/package/perl-gdtextutil/perl-gdtextutil.mk b/package/perl-gdtextutil/perl-gdtextutil.mk new file mode 100644 index 0000000000..087102a749 --- /dev/null +++ b/package/perl-gdtextutil/perl-gdtextutil.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# perl-gdtextutil +# +################################################################################ + +PERL_GDTEXTUTIL_VERSION = 0.86 +PERL_GDTEXTUTIL_SOURCE = GDTextUtil-$(PERL_GDTEXTUTIL_VERSION).tar.gz +PERL_GDTEXTUTIL_SITE = $(BR2_CPAN_MIRROR)/authors/id/M/MV/MVERB +PERL_GDTEXTUTIL_LICENSE_FILES = Dustismo.LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-html-parser/Config.in b/package/perl-html-parser/Config.in new file mode 100644 index 0000000000..8a725f1dbd --- /dev/null +++ b/package/perl-html-parser/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PERL_HTML_PARSER + bool "perl-html-parser" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_PERL_HTML_TAGSET + help + The HTML-Parser distribution is is a collection of modules that parse + and extract information from HTML documents + + http://github.com/gisle/html-parser + +comment "perl-html-parser needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-html-parser/perl-html-parser.hash b/package/perl-html-parser/perl-html-parser.hash new file mode 100644 index 0000000000..eed22b7a24 --- /dev/null +++ b/package/perl-html-parser/perl-html-parser.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 9128a45893097dfa3bf03301b19c5efe HTML-Parser-3.71.tar.gz +sha256 be918b3749d3ff93627f72ee4b825683332ecb4c81c67a3a8d72b0435ffbd802 HTML-Parser-3.71.tar.gz diff --git a/package/perl-html-parser/perl-html-parser.mk b/package/perl-html-parser/perl-html-parser.mk new file mode 100644 index 0000000000..18d25c58d2 --- /dev/null +++ b/package/perl-html-parser/perl-html-parser.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-html-parser +# +################################################################################ + +PERL_HTML_PARSER_VERSION = 3.71 +PERL_HTML_PARSER_SOURCE = HTML-Parser-$(PERL_HTML_PARSER_VERSION).tar.gz +PERL_HTML_PARSER_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_HTML_PARSER_DEPENDENCIES = perl-html-tagset +PERL_HTML_PARSER_LICENSE = Artistic or GPLv1+ +PERL_HTML_PARSER_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-html-tagset/Config.in b/package/perl-html-tagset/Config.in new file mode 100644 index 0000000000..a39bc651f2 --- /dev/null +++ b/package/perl-html-tagset/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_HTML_TAGSET + bool "perl-html-tagset" + help + HTML::Tagset - data tables useful in parsing HTML + + http://www.cpan.org/modules/by-authors/id/P/PE/PETDANCE/ diff --git a/package/perl-html-tagset/perl-html-tagset.hash b/package/perl-html-tagset/perl-html-tagset.hash new file mode 100644 index 0000000000..a4cf09082c --- /dev/null +++ b/package/perl-html-tagset/perl-html-tagset.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 d2bfa18fe1904df7f683e96611e87437 HTML-Tagset-3.20.tar.gz +sha256 adb17dac9e36cd011f5243881c9739417fd102fce760f8de4e9be4c7131108e2 HTML-Tagset-3.20.tar.gz diff --git a/package/perl-html-tagset/perl-html-tagset.mk b/package/perl-html-tagset/perl-html-tagset.mk new file mode 100644 index 0000000000..d18d6a63c3 --- /dev/null +++ b/package/perl-html-tagset/perl-html-tagset.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-html-tagset +# +################################################################################ + +PERL_HTML_TAGSET_VERSION = 3.20 +PERL_HTML_TAGSET_SOURCE = HTML-Tagset-$(PERL_HTML_TAGSET_VERSION).tar.gz +PERL_HTML_TAGSET_SITE = $(BR2_CPAN_MIRROR)/authors/id/P/PE/PETDANCE +PERL_HTML_TAGSET_LICENSE = Artistic or GPLv1+ +PERL_HTML_TAGSET_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-http-cookies/Config.in b/package/perl-http-cookies/Config.in new file mode 100644 index 0000000000..cb5a3c1fa9 --- /dev/null +++ b/package/perl-http-cookies/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PERL_HTTP_COOKIES + bool "perl-http-cookies" + select BR2_PACKAGE_PERL_HTTP_DATE + select BR2_PACKAGE_PERL_HTTP_MESSAGE + help + Objects that represent a "cookie jar" + + http://github.com/gisle/http-cookies diff --git a/package/perl-http-cookies/perl-http-cookies.hash b/package/perl-http-cookies/perl-http-cookies.hash new file mode 100644 index 0000000000..94e5f31c29 --- /dev/null +++ b/package/perl-http-cookies/perl-http-cookies.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 ecfd0eeb88512033352c2f13c9580f03 HTTP-Cookies-6.01.tar.gz +sha256 f5d3ade383ce6389d80cb0d0356b643af80435bb036afd8edce335215ec5eb20 HTTP-Cookies-6.01.tar.gz diff --git a/package/perl-http-cookies/perl-http-cookies.mk b/package/perl-http-cookies/perl-http-cookies.mk new file mode 100644 index 0000000000..52ee74a568 --- /dev/null +++ b/package/perl-http-cookies/perl-http-cookies.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-http-cookies +# +################################################################################ + +PERL_HTTP_COOKIES_VERSION = 6.01 +PERL_HTTP_COOKIES_SOURCE = HTTP-Cookies-$(PERL_HTTP_COOKIES_VERSION).tar.gz +PERL_HTTP_COOKIES_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_HTTP_COOKIES_DEPENDENCIES = perl-http-date perl-http-message +PERL_HTTP_COOKIES_LICENSE = Artistic or GPLv1+ +PERL_HTTP_COOKIES_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-http-daemon/Config.in b/package/perl-http-daemon/Config.in new file mode 100644 index 0000000000..e09328c963 --- /dev/null +++ b/package/perl-http-daemon/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PERL_HTTP_DAEMON + bool "perl-http-daemon" + select BR2_PACKAGE_PERL_HTTP_DATE + select BR2_PACKAGE_PERL_HTTP_MESSAGE + select BR2_PACKAGE_PERL_LWP_MEDIATYPES + help + Instances of the `HTTP::Daemon' class are HTTP/1.1 servers that listen + on a socket for incoming requests. + + http://github.com/gisle/http-daemon diff --git a/package/perl-http-daemon/perl-http-daemon.hash b/package/perl-http-daemon/perl-http-daemon.hash new file mode 100644 index 0000000000..f4f6023083 --- /dev/null +++ b/package/perl-http-daemon/perl-http-daemon.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 ed0ae02d25d7f1e89456d4d69732adc2 HTTP-Daemon-6.01.tar.gz +sha256 43fd867742701a3f9fcc7bd59838ab72c6490c0ebaf66901068ec6997514adc2 HTTP-Daemon-6.01.tar.gz diff --git a/package/perl-http-daemon/perl-http-daemon.mk b/package/perl-http-daemon/perl-http-daemon.mk new file mode 100644 index 0000000000..56dbd7846d --- /dev/null +++ b/package/perl-http-daemon/perl-http-daemon.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-http-daemon +# +################################################################################ + +PERL_HTTP_DAEMON_VERSION = 6.01 +PERL_HTTP_DAEMON_SOURCE = HTTP-Daemon-$(PERL_HTTP_DAEMON_VERSION).tar.gz +PERL_HTTP_DAEMON_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_HTTP_DAEMON_DEPENDENCIES = perl-http-date perl-http-message perl-lwp-mediatypes +PERL_HTTP_DAEMON_LICENSE = Artistic or GPLv1+ +PERL_HTTP_DAEMON_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-http-date/Config.in b/package/perl-http-date/Config.in new file mode 100644 index 0000000000..c45335fb23 --- /dev/null +++ b/package/perl-http-date/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PERL_HTTP_DATE + bool "perl-http-date" + help + This module provides functions that deal the date formats used by the + HTTP protocol (and then some more) + + https://github.com/gisle/http-date diff --git a/package/perl-http-date/perl-http-date.hash b/package/perl-http-date/perl-http-date.hash new file mode 100644 index 0000000000..db85cd061c --- /dev/null +++ b/package/perl-http-date/perl-http-date.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 52b7a0d5982d61be1edb217751d7daba HTTP-Date-6.02.tar.gz +sha256 e8b9941da0f9f0c9c01068401a5e81341f0e3707d1c754f8e11f42a7e629e333 HTTP-Date-6.02.tar.gz diff --git a/package/perl-http-date/perl-http-date.mk b/package/perl-http-date/perl-http-date.mk new file mode 100644 index 0000000000..bb5f4dc2fc --- /dev/null +++ b/package/perl-http-date/perl-http-date.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-http-date +# +################################################################################ + +PERL_HTTP_DATE_VERSION = 6.02 +PERL_HTTP_DATE_SOURCE = HTTP-Date-$(PERL_HTTP_DATE_VERSION).tar.gz +PERL_HTTP_DATE_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_HTTP_DATE_LICENSE = Artistic or GPLv1+ +PERL_HTTP_DATE_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-http-message/Config.in b/package/perl-http-message/Config.in new file mode 100644 index 0000000000..9dda1ee3f1 --- /dev/null +++ b/package/perl-http-message/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PERL_HTTP_MESSAGE + bool "perl-http-message" + select BR2_PACKAGE_PERL_ENCODE_LOCALE + select BR2_PACKAGE_PERL_HTTP_DATE + select BR2_PACKAGE_PERL_IO_HTML + select BR2_PACKAGE_PERL_LWP_MEDIATYPES + select BR2_PACKAGE_PERL_URI + help + The HTTP-Message distribution contains classes useful for representing + the messages passed in HTTP style communication. + + https://github.com/libwww-perl/http-message diff --git a/package/perl-http-message/perl-http-message.hash b/package/perl-http-message/perl-http-message.hash new file mode 100644 index 0000000000..f57fec273a --- /dev/null +++ b/package/perl-http-message/perl-http-message.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 4ed7add10daea3ab30abfeab6d03872f HTTP-Message-6.11.tar.gz +sha256 e7b368077ae6a188d99920411d8f52a8e5acfb39574d4f5c24f46fd22533d81b HTTP-Message-6.11.tar.gz diff --git a/package/perl-http-message/perl-http-message.mk b/package/perl-http-message/perl-http-message.mk new file mode 100644 index 0000000000..77213fa1d6 --- /dev/null +++ b/package/perl-http-message/perl-http-message.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-http-message +# +################################################################################ + +PERL_HTTP_MESSAGE_VERSION = 6.11 +PERL_HTTP_MESSAGE_SOURCE = HTTP-Message-$(PERL_HTTP_MESSAGE_VERSION).tar.gz +PERL_HTTP_MESSAGE_SITE = $(BR2_CPAN_MIRROR)/authors/id/E/ET/ETHER +PERL_HTTP_MESSAGE_DEPENDENCIES = perl-encode-locale perl-http-date perl-io-html perl-lwp-mediatypes perl-uri +PERL_HTTP_MESSAGE_LICENSE = Artistic or GPLv1+ +PERL_HTTP_MESSAGE_LICENSE_FILES = LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-http-negotiate/Config.in b/package/perl-http-negotiate/Config.in new file mode 100644 index 0000000000..2b7f7b9b9a --- /dev/null +++ b/package/perl-http-negotiate/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PERL_HTTP_NEGOTIATE + bool "perl-http-negotiate" + select BR2_PACKAGE_PERL_HTTP_MESSAGE + help + This module provides a complete implementation of the HTTP content + negotiation algorithm specified in draft-ietf-http-v11-spec-00.ps + chapter 12. + + http://github.com/gisle/http-negotiate diff --git a/package/perl-http-negotiate/perl-http-negotiate.hash b/package/perl-http-negotiate/perl-http-negotiate.hash new file mode 100644 index 0000000000..f1db2fff65 --- /dev/null +++ b/package/perl-http-negotiate/perl-http-negotiate.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 1236195250e264d7436e7bb02031671b HTTP-Negotiate-6.01.tar.gz +sha256 1c729c1ea63100e878405cda7d66f9adfd3ed4f1d6cacaca0ee9152df728e016 HTTP-Negotiate-6.01.tar.gz diff --git a/package/perl-http-negotiate/perl-http-negotiate.mk b/package/perl-http-negotiate/perl-http-negotiate.mk new file mode 100644 index 0000000000..569ed2b1f7 --- /dev/null +++ b/package/perl-http-negotiate/perl-http-negotiate.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-http-negotiate +# +################################################################################ + +PERL_HTTP_NEGOTIATE_VERSION = 6.01 +PERL_HTTP_NEGOTIATE_SOURCE = HTTP-Negotiate-$(PERL_HTTP_NEGOTIATE_VERSION).tar.gz +PERL_HTTP_NEGOTIATE_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_HTTP_NEGOTIATE_DEPENDENCIES = perl-http-message +PERL_HTTP_NEGOTIATE_LICENSE = Artistic or GPLv1+ +PERL_HTTP_NEGOTIATE_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-io-html/Config.in b/package/perl-io-html/Config.in new file mode 100644 index 0000000000..69770226b3 --- /dev/null +++ b/package/perl-io-html/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_IO_HTML + bool "perl-io-html" + help + Perl module that opens a file and performs automatic charset detection + + https://github.com/madsen/io-html diff --git a/package/perl-io-html/perl-io-html.hash b/package/perl-io-html/perl-io-html.hash new file mode 100644 index 0000000000..8d8c48d433 --- /dev/null +++ b/package/perl-io-html/perl-io-html.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 3f8958718844dc96b9f6946f21d70d22 IO-HTML-1.001.tar.gz +sha256 ea78d2d743794adc028bc9589538eb867174b4e165d7d8b5f63486e6b828e7e0 IO-HTML-1.001.tar.gz diff --git a/package/perl-io-html/perl-io-html.mk b/package/perl-io-html/perl-io-html.mk new file mode 100644 index 0000000000..4bdcc8dc38 --- /dev/null +++ b/package/perl-io-html/perl-io-html.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-io-html +# +################################################################################ + +PERL_IO_HTML_VERSION = 1.001 +PERL_IO_HTML_SOURCE = IO-HTML-$(PERL_IO_HTML_VERSION).tar.gz +PERL_IO_HTML_SITE = $(BR2_CPAN_MIRROR)/authors/id/C/CJ/CJM +PERL_IO_HTML_LICENSE = Artistic or GPLv1+ +PERL_IO_HTML_LICENSE_FILES = LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-io-socket-ssl/Config.in b/package/perl-io-socket-ssl/Config.in new file mode 100644 index 0000000000..d24e568bc5 --- /dev/null +++ b/package/perl-io-socket-ssl/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PERL_IO_SOCKET_SSL + bool "perl-io-socket-ssl" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_PERL_NET_SSLEAY + help + Nearly transparent SSL encapsulation for IO::Socket::INET. + + https://github.com/noxxi/p5-io-socket-ssl + +comment "perl-io-socket-ssl needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-io-socket-ssl/perl-io-socket-ssl.hash b/package/perl-io-socket-ssl/perl-io-socket-ssl.hash new file mode 100644 index 0000000000..852eb8d728 --- /dev/null +++ b/package/perl-io-socket-ssl/perl-io-socket-ssl.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 a5f284d543aec4a6fcd595eb5fc8898b IO-Socket-SSL-2.022.tar.gz +sha256 651c4e5e2762ca780f2743986639b64557295bb326fddaff32f3adc0eac4f806 IO-Socket-SSL-2.022.tar.gz diff --git a/package/perl-io-socket-ssl/perl-io-socket-ssl.mk b/package/perl-io-socket-ssl/perl-io-socket-ssl.mk new file mode 100644 index 0000000000..5bbd0c6819 --- /dev/null +++ b/package/perl-io-socket-ssl/perl-io-socket-ssl.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-io-socket-ssl +# +################################################################################ + +PERL_IO_SOCKET_SSL_VERSION = 2.022 +PERL_IO_SOCKET_SSL_SOURCE = IO-Socket-SSL-$(PERL_IO_SOCKET_SSL_VERSION).tar.gz +PERL_IO_SOCKET_SSL_SITE = $(BR2_CPAN_MIRROR)/authors/id/S/SU/SULLR +PERL_IO_SOCKET_SSL_DEPENDENCIES = perl-net-ssleay +PERL_IO_SOCKET_SSL_LICENSE = Artistic or GPLv1+ +PERL_IO_SOCKET_SSL_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-json-tiny/Config.in b/package/perl-json-tiny/Config.in new file mode 100644 index 0000000000..ce943cae18 --- /dev/null +++ b/package/perl-json-tiny/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_JSON_TINY + bool "perl-json-tiny" + help + Minimalistic JSON. No dependencies. + + https://metacpan.org/release/JSON-Tiny diff --git a/package/perl-json-tiny/perl-json-tiny.hash b/package/perl-json-tiny/perl-json-tiny.hash new file mode 100644 index 0000000000..0a1e7cacd8 --- /dev/null +++ b/package/perl-json-tiny/perl-json-tiny.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 70957d3df2ea67f8e2c760166fce7b24 JSON-Tiny-0.53.tar.gz +sha256 37e547c5b5b7f4dd9adf00db7c77454f3451f79c1be93ef11d4f2ddc9c10aad9 JSON-Tiny-0.53.tar.gz diff --git a/package/perl-json-tiny/perl-json-tiny.mk b/package/perl-json-tiny/perl-json-tiny.mk new file mode 100644 index 0000000000..7a2a42e048 --- /dev/null +++ b/package/perl-json-tiny/perl-json-tiny.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-json-tiny +# +################################################################################ + +PERL_JSON_TINY_VERSION = 0.53 +PERL_JSON_TINY_SOURCE = JSON-Tiny-$(PERL_JSON_TINY_VERSION).tar.gz +PERL_JSON_TINY_SITE = $(BR2_CPAN_MIRROR)/authors/id/D/DA/DAVIDO +PERL_JSON_TINY_LICENSE = Artistic-2.0 +PERL_JSON_TINY_LICENSE_FILES = LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-libwww-perl/Config.in b/package/perl-libwww-perl/Config.in new file mode 100644 index 0000000000..fc46bf1dff --- /dev/null +++ b/package/perl-libwww-perl/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_PERL_LIBWWW_PERL + bool "perl-libwww-perl" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_PERL_ENCODE_LOCALE + select BR2_PACKAGE_PERL_FILE_LISTING + select BR2_PACKAGE_PERL_HTML_PARSER + select BR2_PACKAGE_PERL_HTTP_COOKIES + select BR2_PACKAGE_PERL_HTTP_DAEMON + select BR2_PACKAGE_PERL_HTTP_DATE + select BR2_PACKAGE_PERL_HTTP_MESSAGE + select BR2_PACKAGE_PERL_HTTP_NEGOTIATE + select BR2_PACKAGE_PERL_LWP_MEDIATYPES + select BR2_PACKAGE_PERL_NET_HTTP + select BR2_PACKAGE_PERL_URI + select BR2_PACKAGE_PERL_WWW_ROBOTRULES + help + The World-Wide Web library for Perl + + https://metacpan.org/release/libwww-perl + +comment "perl-libwww-perl needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-libwww-perl/perl-libwww-perl.hash b/package/perl-libwww-perl/perl-libwww-perl.hash new file mode 100644 index 0000000000..ffc180f86d --- /dev/null +++ b/package/perl-libwww-perl/perl-libwww-perl.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 6888c9d8728cd6f3ea3c9754461c9f94 libwww-perl-6.15.tar.gz +sha256 6f349d45c21b1ec0501c4437dfcb70570940e6c3d5bff783bd91d4cddead8322 libwww-perl-6.15.tar.gz diff --git a/package/perl-libwww-perl/perl-libwww-perl.mk b/package/perl-libwww-perl/perl-libwww-perl.mk new file mode 100644 index 0000000000..594eb7d6cb --- /dev/null +++ b/package/perl-libwww-perl/perl-libwww-perl.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# perl-libwww-perl +# +################################################################################ + +PERL_LIBWWW_PERL_VERSION = 6.15 +PERL_LIBWWW_PERL_SOURCE = libwww-perl-$(PERL_LIBWWW_PERL_VERSION).tar.gz +PERL_LIBWWW_PERL_SITE = $(BR2_CPAN_MIRROR)/authors/id/E/ET/ETHER +PERL_LIBWWW_PERL_LICENSE = Artistic or GPLv1+ +PERL_LIBWWW_LICENSE_FILES = README +PERL_LIBWWW_PERL_DEPENDENCIES = \ + perl-encode-locale \ + perl-file-listing \ + perl-html-parser \ + perl-http-cookies \ + perl-http-daemon \ + perl-http-date \ + perl-http-message \ + perl-http-negotiate \ + perl-lwp-mediatypes \ + perl-net-http \ + perl-uri \ + perl-www-robotrules + +$(eval $(perl-package)) diff --git a/package/perl-lwp-mediatypes/Config.in b/package/perl-lwp-mediatypes/Config.in new file mode 100644 index 0000000000..b362e9c13b --- /dev/null +++ b/package/perl-lwp-mediatypes/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PERL_LWP_MEDIATYPES + bool "perl-lwp-mediatypes" + help + This module provides functions for handling media (also known as MIME) + types and encodings. + + https://github.com/gisle/lwp-mediatypes diff --git a/package/perl-lwp-mediatypes/perl-lwp-mediatypes.hash b/package/perl-lwp-mediatypes/perl-lwp-mediatypes.hash new file mode 100644 index 0000000000..0f6fee9230 --- /dev/null +++ b/package/perl-lwp-mediatypes/perl-lwp-mediatypes.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 8c5f25fb64b974d22aff424476ba13c9 LWP-MediaTypes-6.02.tar.gz +sha256 18790b0cc5f0a51468495c3847b16738f785a2d460403595001e0b932e5db676 LWP-MediaTypes-6.02.tar.gz diff --git a/package/perl-lwp-mediatypes/perl-lwp-mediatypes.mk b/package/perl-lwp-mediatypes/perl-lwp-mediatypes.mk new file mode 100644 index 0000000000..cd7c75a49d --- /dev/null +++ b/package/perl-lwp-mediatypes/perl-lwp-mediatypes.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-lwp-mediatypes +# +################################################################################ + +PERL_LWP_MEDIATYPES_VERSION = 6.02 +PERL_LWP_MEDIATYPES_SOURCE = LWP-MediaTypes-$(PERL_LWP_MEDIATYPES_VERSION).tar.gz +PERL_LWP_MEDIATYPES_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_LWP_MEDIATYPES_LICENSE = Artistic or GPLv1+ +PERL_LWP_MEDIATYPES_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-mail-dkim/Config.in b/package/perl-mail-dkim/Config.in new file mode 100644 index 0000000000..3db54f3c39 --- /dev/null +++ b/package/perl-mail-dkim/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_PERL_MAIL_DKIM + bool "perl-mail-dkim" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_PERL_CRYPT_OPENSSL_RSA + select BR2_PACKAGE_PERL_MAILTOOLS + select BR2_PACKAGE_PERL_NET_DNS + help + Signs/verifies Internet mail with DKIM/DomainKey signatures + + https://metacpan.org/release/Mail-DKIM + +comment "perl-mail-dkim needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-mail-dkim/perl-mail-dkim.hash b/package/perl-mail-dkim/perl-mail-dkim.hash new file mode 100644 index 0000000000..b6bb545abe --- /dev/null +++ b/package/perl-mail-dkim/perl-mail-dkim.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 9ceb8a0397aff83928e7a9760b1b190f Mail-DKIM-0.40.tar.gz +sha256 3c5ea0c3a2028a5a2c3b64bbcd6bd9de6a5fa5ee4e16046dd8875c4796aaa6f1 Mail-DKIM-0.40.tar.gz diff --git a/package/perl-mail-dkim/perl-mail-dkim.mk b/package/perl-mail-dkim/perl-mail-dkim.mk new file mode 100644 index 0000000000..03a3b7442d --- /dev/null +++ b/package/perl-mail-dkim/perl-mail-dkim.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-mail-dkim +# +################################################################################ + +PERL_MAIL_DKIM_VERSION = 0.40 +PERL_MAIL_DKIM_SOURCE = Mail-DKIM-$(PERL_MAIL_DKIM_VERSION).tar.gz +PERL_MAIL_DKIM_SITE = $(BR2_CPAN_MIRROR)/authors/id/J/JA/JASLONG +PERL_MAIL_DKIM_DEPENDENCIES = perl-crypt-openssl-rsa perl-mailtools perl-net-dns +PERL_MAIL_DKIM_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-mailtools/Config.in b/package/perl-mailtools/Config.in new file mode 100644 index 0000000000..e02d3cba6b --- /dev/null +++ b/package/perl-mailtools/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PERL_MAILTOOLS + bool "perl-mailtools" + select BR2_PACKAGE_PERL_TIMEDATE + help + Various e-mail related modules + + https://metacpan.org/release/MailTools diff --git a/package/perl-mailtools/perl-mailtools.hash b/package/perl-mailtools/perl-mailtools.hash new file mode 100644 index 0000000000..b67867a43c --- /dev/null +++ b/package/perl-mailtools/perl-mailtools.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 813ae849683367bb75e6be89e4e8cc46 MailTools-2.14.tar.gz +sha256 4b7c7ef674b2ef75ea793f053cd067c6a4b33e58e3adf08a89c8ea4c56b3dff8 MailTools-2.14.tar.gz diff --git a/package/perl-mailtools/perl-mailtools.mk b/package/perl-mailtools/perl-mailtools.mk new file mode 100644 index 0000000000..d3c049d597 --- /dev/null +++ b/package/perl-mailtools/perl-mailtools.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-mailtools +# +################################################################################ + +PERL_MAILTOOLS_VERSION = 2.14 +PERL_MAILTOOLS_SOURCE = MailTools-$(PERL_MAILTOOLS_VERSION).tar.gz +PERL_MAILTOOLS_SITE = $(BR2_CPAN_MIRROR)/authors/id/M/MA/MARKOV +PERL_MAILTOOLS_DEPENDENCIES = perl-timedate +PERL_MAILTOOLS_LICENSE = Artistic or GPLv1+ +PERL_MAILTOOLS_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-mime-base64/Config.in b/package/perl-mime-base64/Config.in new file mode 100644 index 0000000000..22563dd5ad --- /dev/null +++ b/package/perl-mime-base64/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PERL_MIME_BASE64 + bool "perl-mime-base64" + depends on !BR2_STATIC_LIBS + help + This package contains a base64 encoder/decoder and a quoted-printable + encoder/decoder. + + http://github.com/gisle/mime-base64 + +comment "perl-mime-base64 needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-mime-base64/perl-mime-base64.hash b/package/perl-mime-base64/perl-mime-base64.hash new file mode 100644 index 0000000000..0cfe598c89 --- /dev/null +++ b/package/perl-mime-base64/perl-mime-base64.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 ef958dc2bf96be5f759391c6ac1debd4 MIME-Base64-3.15.tar.gz +sha256 7f863566a6a9cb93eda93beadb77d9aa04b9304d769cea3bb921b9a91b3a1eb9 MIME-Base64-3.15.tar.gz diff --git a/package/perl-mime-base64/perl-mime-base64.mk b/package/perl-mime-base64/perl-mime-base64.mk new file mode 100644 index 0000000000..d06433772a --- /dev/null +++ b/package/perl-mime-base64/perl-mime-base64.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-mime-base64 +# +################################################################################ + +PERL_MIME_BASE64_VERSION = 3.15 +PERL_MIME_BASE64_SOURCE = MIME-Base64-$(PERL_MIME_BASE64_VERSION).tar.gz +PERL_MIME_BASE64_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_MIME_BASE64_LICENSE = Artistic or GPLv1+ +PERL_MIME_BASE64_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-module-build/perl-module-build.hash b/package/perl-module-build/perl-module-build.hash new file mode 100644 index 0000000000..558434bf8b --- /dev/null +++ b/package/perl-module-build/perl-module-build.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 7b7ca5a47bef48c50c8b5906ca3ac7fb Module-Build-0.4214.tar.gz +sha256 c579488918cf4db84954a550c475272b3c25f5100c739339e91a65d7c055dc3f Module-Build-0.4214.tar.gz diff --git a/package/perl-module-build/perl-module-build.mk b/package/perl-module-build/perl-module-build.mk new file mode 100644 index 0000000000..3caf302c7a --- /dev/null +++ b/package/perl-module-build/perl-module-build.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-module-build +# +################################################################################ + +PERL_MODULE_BUILD_VERSION = 0.4214 +PERL_MODULE_BUILD_SOURCE = Module-Build-$(PERL_MODULE_BUILD_VERSION).tar.gz +PERL_MODULE_BUILD_SITE = $(BR2_CPAN_MIRROR)/authors/id/L/LE/LEONT +PERL_MODULE_BUILD_LICENSE = Artistic or GPLv1+ +PERL_MODULE_BUILD_LICENSE_FILES = LICENSE + +$(eval $(host-perl-package)) diff --git a/package/perl-mojolicious/Config.in b/package/perl-mojolicious/Config.in new file mode 100644 index 0000000000..766d109594 --- /dev/null +++ b/package/perl-mojolicious/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_MOJOLICIOUS + bool "perl-mojolicious" + help + Real-time web framework + + http://mojolicio.us diff --git a/package/perl-mojolicious/perl-mojolicious.hash b/package/perl-mojolicious/perl-mojolicious.hash new file mode 100644 index 0000000000..289f1f3c6f --- /dev/null +++ b/package/perl-mojolicious/perl-mojolicious.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 8c189aed47bbe330584fb335251b3380 Mojolicious-6.25.tar.gz +sha256 2e34d665a505ca9cbd4c55f010b17d184533b9ba2f92431d7c4126e0edc3a41a Mojolicious-6.25.tar.gz diff --git a/package/perl-mojolicious/perl-mojolicious.mk b/package/perl-mojolicious/perl-mojolicious.mk new file mode 100644 index 0000000000..3ea828bd96 --- /dev/null +++ b/package/perl-mojolicious/perl-mojolicious.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-mojolicious +# +################################################################################ + +PERL_MOJOLICIOUS_VERSION = 6.25 +PERL_MOJOLICIOUS_SOURCE = Mojolicious-$(PERL_MOJOLICIOUS_VERSION).tar.gz +PERL_MOJOLICIOUS_SITE = $(BR2_CPAN_MIRROR)/authors/id/S/SR/SRI +PERL_MOJOLICIOUS_LICENSE = Artistic-2.0 +PERL_MOJOLICIOUS_LICENSE_FILES = LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-net-dns/Config.in b/package/perl-net-dns/Config.in new file mode 100644 index 0000000000..24ce481a69 --- /dev/null +++ b/package/perl-net-dns/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PERL_NET_DNS + bool "perl-net-dns" + select BR2_PACKAGE_PERL_DIGEST_HMAC + help + Net::DNS is a DNS resolver implemented in Perl. + + http://www.net-dns.org diff --git a/package/perl-net-dns/perl-net-dns.hash b/package/perl-net-dns/perl-net-dns.hash new file mode 100644 index 0000000000..bb1fdfa22b --- /dev/null +++ b/package/perl-net-dns/perl-net-dns.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 5a6f6e6811d6bf8eefd84ce778c2bc2e Net-DNS-1.04.tar.gz +sha256 4b9f220304c5722658fbdbe4db31ab77486b5f0aaada78c9d1b528e4b0680965 Net-DNS-1.04.tar.gz diff --git a/package/perl-net-dns/perl-net-dns.mk b/package/perl-net-dns/perl-net-dns.mk new file mode 100644 index 0000000000..6337612829 --- /dev/null +++ b/package/perl-net-dns/perl-net-dns.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-net-dns +# +################################################################################ + +PERL_NET_DNS_VERSION = 1.04 +PERL_NET_DNS_SOURCE = Net-DNS-$(PERL_NET_DNS_VERSION).tar.gz +PERL_NET_DNS_SITE = $(BR2_CPAN_MIRROR)/authors/id/N/NL/NLNETLABS +PERL_NET_DNS_DEPENDENCIES = perl-digest-hmac +PERL_NET_DNS_LICENSE = MIT +PERL_NET_DNS_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-net-http/Config.in b/package/perl-net-http/Config.in new file mode 100644 index 0000000000..6f18dd5a7d --- /dev/null +++ b/package/perl-net-http/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PERL_NET_HTTP + bool "perl-net-http" + select BR2_PACKAGE_PERL_URI + help + The `Net::HTTP' class is a low-level HTTP client. + + http://github.com/libwww-perl/net-http diff --git a/package/perl-net-http/perl-net-http.hash b/package/perl-net-http/perl-net-http.hash new file mode 100644 index 0000000000..79f43c5fd5 --- /dev/null +++ b/package/perl-net-http/perl-net-http.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 3d84d17f64c7316d69e7eb7b4e292b9a Net-HTTP-6.09.tar.gz +sha256 52762b939d84806908ba544581c5708375f7938c3c0e496c128ca3fbc425e58d Net-HTTP-6.09.tar.gz diff --git a/package/perl-net-http/perl-net-http.mk b/package/perl-net-http/perl-net-http.mk new file mode 100644 index 0000000000..9dbc4ab450 --- /dev/null +++ b/package/perl-net-http/perl-net-http.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-net-http +# +################################################################################ + +PERL_NET_HTTP_VERSION = 6.09 +PERL_NET_HTTP_SOURCE = Net-HTTP-$(PERL_NET_HTTP_VERSION).tar.gz +PERL_NET_HTTP_SITE = $(BR2_CPAN_MIRROR)/authors/id/E/ET/ETHER +PERL_NET_HTTP_DEPENDENCIES = perl-uri +PERL_NET_HTTP_LICENSE = Artistic or GPLv1+ +PERL_NET_HTTP_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-net-ssleay/0001-fix-build-system.patch b/package/perl-net-ssleay/0001-fix-build-system.patch new file mode 100644 index 0000000000..a6cd0f9ceb --- /dev/null +++ b/package/perl-net-ssleay/0001-fix-build-system.patch @@ -0,0 +1,36 @@ +buildsystem: fix for cross-compilation + +Avoid running the openssl binary, since it would break for +cross-compilation. Buildroot has a supported version, anyway. + +Also, avoid adding hard-coded includes and libraries search +paths, since they are missing the destdir; Buildroot compilers +and linkers already know where to search, anyway. + +Signed-off-by: "Yann E. MORIN" + +diff -durN perl-net-ssleay-1.64.orig/inc/Module/Install/PRIVATE/Net/SSLeay.pm perl-net-ssleay-1.64/inc/Module/Install/PRIVATE/Net/SSLeay.pm +--- perl-net-ssleay-1.64.orig/inc/Module/Install/PRIVATE/Net/SSLeay.pm 2014-04-01 08:08:37.000000000 +0200 ++++ perl-net-ssleay-1.64/inc/Module/Install/PRIVATE/Net/SSLeay.pm 2014-07-13 00:38:46.281380282 +0200 +@@ -37,14 +37,18 @@ + exit 0; # according http://wiki.cpantesters.org/wiki/CPANAuthorNotes this is best-practice when "missing library" + } + +- $self->check_openssl_version($prefix, $exec); ++# Does not work for cross-compilation. ++# In Buildroot, we do have a supported version. ++# $self->check_openssl_version($prefix, $exec); + my $opts = $self->ssleay_get_build_opts($prefix, $exec); + + $self->makemaker_args( + CCCDLFLAGS => $opts->{cccdlflags}, + OPTIMIZE => $opts->{optimize}, +- INC => join(' ', map {"-I$_"} @{$opts->{inc_paths}}), +- LIBS => join(' ', (map {"-L$_"} @{$opts->{lib_paths}}), (map {"-l$_"} @{$opts->{lib_links}})), ++# Buildroot already has the correct include and library search paths. ++# INC => join(' ', map {"-I$_"} @{$opts->{inc_paths}}), ++# LIBS => join(' ', (map {"-L$_"} @{$opts->{lib_paths}}), (map {"-l$_"} @{$opts->{lib_links}})), ++ LIBS => join(' ', (map {"-l$_"} @{$opts->{lib_links}})), + ); + + if ( $self->prompt( diff --git a/package/perl-net-ssleay/Config.in b/package/perl-net-ssleay/Config.in new file mode 100644 index 0000000000..80178e0b98 --- /dev/null +++ b/package/perl-net-ssleay/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PERL_NET_SSLEAY + bool "perl-net-ssleay" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_OPENSSL + help + Perl extension for using OpenSSL + + https://metacpan.org/release/Net-SSLeay + +comment "perl-net-ssleay needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-net-ssleay/perl-net-ssleay.hash b/package/perl-net-ssleay/perl-net-ssleay.hash new file mode 100644 index 0000000000..556aea7d5e --- /dev/null +++ b/package/perl-net-ssleay/perl-net-ssleay.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 a740d7792dbac8ca8c4eb38d3b8fbd01 Net-SSLeay-1.72.tar.gz +sha256 1baac39f0f12cee515d8bec633175bb5916ca542e5356e26420437bd6195d2f4 Net-SSLeay-1.72.tar.gz diff --git a/package/perl-net-ssleay/perl-net-ssleay.mk b/package/perl-net-ssleay/perl-net-ssleay.mk new file mode 100644 index 0000000000..03a039e064 --- /dev/null +++ b/package/perl-net-ssleay/perl-net-ssleay.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# perl-net-ssleay +# +################################################################################ + +PERL_NET_SSLEAY_VERSION = 1.72 +PERL_NET_SSLEAY_SOURCE = Net-SSLeay-$(PERL_NET_SSLEAY_VERSION).tar.gz +PERL_NET_SSLEAY_SITE = $(BR2_CPAN_MIRROR)/authors/id/M/MI/MIKEM +PERL_NET_SSLEAY_DEPENDENCIES = openssl +PERL_NET_SSLEAY_LICENSE = OpenSSL +PERL_NET_SSLEAY_LICENSE_FILES = LICENSE + +# Try as hard as possible to remedy to the brain-damage their build-system +# suffers from: don't search for openssl, they pick the host-system one. +PERL_NET_SSLEAY_CONF_ENV = OPENSSL_PREFIX=$(STAGING_DIR)/usr + +# Remove problematic single quotes in LDDLFLAGS, CCFLAGS & OPTIMIZE definition +define PERL_NET_SSLEAY_FIX_MAKEFILE + $(SED) "s/^LDDLFLAGS = '\(.*\)'/LDDLFLAGS = \1/" $(@D)/Makefile + $(SED) "s/^CCFLAGS = '\(.*\)'/CCFLAGS = \1/" $(@D)/Makefile + $(SED) "s/^OPTIMIZE = '\(.*\)'/OPTIMIZE = \1/" $(@D)/Makefile +endef +PERL_NET_SSLEAY_POST_CONFIGURE_HOOKS += PERL_NET_SSLEAY_FIX_MAKEFILE + +$(eval $(perl-package)) diff --git a/package/perl-netaddr-ip/Config.in b/package/perl-netaddr-ip/Config.in new file mode 100644 index 0000000000..1525830083 --- /dev/null +++ b/package/perl-netaddr-ip/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PERL_NETADDR_IP + bool "perl-netaddr-ip" + help + Manages IPv4 and IPv6 addresses and subnets + + https://metacpan.org/release/NetAddr-IP + diff --git a/package/perl-netaddr-ip/perl-netaddr-ip.hash b/package/perl-netaddr-ip/perl-netaddr-ip.hash new file mode 100644 index 0000000000..19bba20836 --- /dev/null +++ b/package/perl-netaddr-ip/perl-netaddr-ip.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 bca8406520b6535a3f9661d385705d97 NetAddr-IP-4.078.tar.gz +sha256 b9a12294e58dcece0189630ddb6926e37169cbbb24c76091f1e604e426c19614 NetAddr-IP-4.078.tar.gz diff --git a/package/perl-netaddr-ip/perl-netaddr-ip.mk b/package/perl-netaddr-ip/perl-netaddr-ip.mk new file mode 100644 index 0000000000..f2eec6c0d5 --- /dev/null +++ b/package/perl-netaddr-ip/perl-netaddr-ip.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# perl-netaddr-ip +# +################################################################################ + +PERL_NETADDR_IP_VERSION = 4.078 +PERL_NETADDR_IP_SOURCE = NetAddr-IP-$(PERL_NETADDR_IP_VERSION).tar.gz +PERL_NETADDR_IP_SITE = $(BR2_CPAN_MIRROR)/authors/id/M/MI/MIKER +PERL_NETADDR_IP_LICENSE = Artistic or GPLv1+ +PERL_NETADDR_IP_LICENSE_FILES = Artistic Copying + +# we always build the Pure Perl version. +# the build of the native part of NetAddr::IP::Util is buggy. +PERL_NETADDR_IP_CONF_OPTS = -noxs + +$(eval $(perl-package)) diff --git a/package/perl-path-tiny/Config.in b/package/perl-path-tiny/Config.in new file mode 100644 index 0000000000..f85e792dd9 --- /dev/null +++ b/package/perl-path-tiny/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_PATH_TINY + bool "perl-path-tiny" + help + File path utility + + https://github.com/dagolden/Path-Tiny diff --git a/package/perl-path-tiny/perl-path-tiny.hash b/package/perl-path-tiny/perl-path-tiny.hash new file mode 100644 index 0000000000..a62c165394 --- /dev/null +++ b/package/perl-path-tiny/perl-path-tiny.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 840696b295230682c727297c87fe42d6 Path-Tiny-0.072.tar.gz +sha256 d7507c7822d4f7f60a5329d26c8afce31022cd92d02b011e367cc6a1eeae6981 Path-Tiny-0.072.tar.gz diff --git a/package/perl-path-tiny/perl-path-tiny.mk b/package/perl-path-tiny/perl-path-tiny.mk new file mode 100644 index 0000000000..0af84fdd61 --- /dev/null +++ b/package/perl-path-tiny/perl-path-tiny.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-path-tiny +# +################################################################################ + +PERL_PATH_TINY_VERSION = 0.072 +PERL_PATH_TINY_SOURCE = Path-Tiny-$(PERL_PATH_TINY_VERSION).tar.gz +PERL_PATH_TINY_SITE = $(BR2_CPAN_MIRROR)/authors/id/D/DA/DAGOLDEN +PERL_PATH_TINY_LICENSE = Apache-2.0 +PERL_PATH_TINY_LICENSE_FILES = LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-time-hires/Config.in b/package/perl-time-hires/Config.in new file mode 100644 index 0000000000..37bad71d85 --- /dev/null +++ b/package/perl-time-hires/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PERL_TIME_HIRES + bool "perl-time-hires" + depends on !BR2_STATIC_LIBS + help + High resolution alarm, sleep, gettimeofday, interval timers + + http://search.cpan.org/dist/Time-HiRes/HiRes.pm + +comment "perl-time-hires needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-time-hires/perl-time-hires.hash b/package/perl-time-hires/perl-time-hires.hash new file mode 100644 index 0000000000..1852340456 --- /dev/null +++ b/package/perl-time-hires/perl-time-hires.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 077e5d7eda1349f98c564026603f8a0a Time-HiRes-1.9726.tar.gz +sha256 ff662ad9b1f6c75a149db7fa1bfc7a161ac8b271e5f3980345e08b734769109e Time-HiRes-1.9726.tar.gz diff --git a/package/perl-time-hires/perl-time-hires.mk b/package/perl-time-hires/perl-time-hires.mk new file mode 100644 index 0000000000..7436d96de3 --- /dev/null +++ b/package/perl-time-hires/perl-time-hires.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-time-hires +# +################################################################################ + +PERL_TIME_HIRES_VERSION = 1.9726 +PERL_TIME_HIRES_SOURCE = Time-HiRes-$(PERL_TIME_HIRES_VERSION).tar.gz +PERL_TIME_HIRES_SITE = $(BR2_CPAN_MIRROR)/authors/id/Z/ZE/ZEFRAM +PERL_TIME_HIRES_LICENSE = Artistic or GPLv1+ +PERL_TIME_HIRES_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-timedate/Config.in b/package/perl-timedate/Config.in new file mode 100644 index 0000000000..7ce9de1a7d --- /dev/null +++ b/package/perl-timedate/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_TIMEDATE + bool "perl-timedate" + help + Date formating subroutines + + https://metacpan.org/release/TimeDate diff --git a/package/perl-timedate/perl-timedate.hash b/package/perl-timedate/perl-timedate.hash new file mode 100644 index 0000000000..28a9f078d0 --- /dev/null +++ b/package/perl-timedate/perl-timedate.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 b1d91153ac971347aee84292ed886c1c TimeDate-2.30.tar.gz +sha256 75bd254871cb5853a6aa0403ac0be270cdd75c9d1b6639f18ecba63c15298e86 TimeDate-2.30.tar.gz diff --git a/package/perl-timedate/perl-timedate.mk b/package/perl-timedate/perl-timedate.mk new file mode 100644 index 0000000000..4c594fb799 --- /dev/null +++ b/package/perl-timedate/perl-timedate.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-timedate +# +################################################################################ + +PERL_TIMEDATE_VERSION = 2.30 +PERL_TIMEDATE_SOURCE = TimeDate-$(PERL_TIMEDATE_VERSION).tar.gz +PERL_TIMEDATE_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GB/GBARR +PERL_TIMEDATE_LICENSE = Artistic or GPLv1+ +PERL_TIMEDATE_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-try-tiny/Config.in b/package/perl-try-tiny/Config.in new file mode 100644 index 0000000000..7bd5396feb --- /dev/null +++ b/package/perl-try-tiny/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_TRY_TINY + bool "perl-try-tiny" + help + minimal try/catch with proper preservation of $@ + + http://metacpan.org/release/Try-Tiny diff --git a/package/perl-try-tiny/perl-try-tiny.hash b/package/perl-try-tiny/perl-try-tiny.hash new file mode 100644 index 0000000000..bff911f2c1 --- /dev/null +++ b/package/perl-try-tiny/perl-try-tiny.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 6769658bfbca241a470206c9a8819ff2 Try-Tiny-0.22.tar.gz +sha256 60fba46f4693d33d54539104f9001df008dabb400b6837e9605c39a6ee6a1b19 Try-Tiny-0.22.tar.gz diff --git a/package/perl-try-tiny/perl-try-tiny.mk b/package/perl-try-tiny/perl-try-tiny.mk new file mode 100644 index 0000000000..05cea542bc --- /dev/null +++ b/package/perl-try-tiny/perl-try-tiny.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-try-tiny +# +################################################################################ + +PERL_TRY_TINY_VERSION = 0.22 +PERL_TRY_TINY_SOURCE = Try-Tiny-$(PERL_TRY_TINY_VERSION).tar.gz +PERL_TRY_TINY_SITE = $(BR2_CPAN_MIRROR)/authors/id/D/DO/DOY +PERL_TRY_TINY_LICENSE = MIT +PERL_TRY_TINY_LICENSE_FILES = LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-uri/Config.in b/package/perl-uri/Config.in new file mode 100644 index 0000000000..62a53f248a --- /dev/null +++ b/package/perl-uri/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PERL_URI + bool "perl-uri" + help + The module implements the URI class. Objects of this class represent + Uniform Resource Identifier references as specified in RFC 2396 and + updated by RFC 2732. + + https://github.com/libwww-perl/uri diff --git a/package/perl-uri/perl-uri.hash b/package/perl-uri/perl-uri.hash new file mode 100644 index 0000000000..8a265bfcb0 --- /dev/null +++ b/package/perl-uri/perl-uri.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 247c3da29a794f72730e01aa5a715daf URI-1.71.tar.gz +sha256 9c8eca0d7f39e74bbc14706293e653b699238eeb1a7690cc9c136fb8c2644115 URI-1.71.tar.gz diff --git a/package/perl-uri/perl-uri.mk b/package/perl-uri/perl-uri.mk new file mode 100644 index 0000000000..e7118fceed --- /dev/null +++ b/package/perl-uri/perl-uri.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-uri +# +################################################################################ + +PERL_URI_VERSION = 1.71 +PERL_URI_SOURCE = URI-$(PERL_URI_VERSION).tar.gz +PERL_URI_SITE = $(BR2_CPAN_MIRROR)/authors/id/E/ET/ETHER +PERL_URI_LICENSE = Artistic or GPLv1+ +PERL_URI_LICENSE_FILES = LICENSE + +$(eval $(perl-package)) diff --git a/package/perl-www-robotrules/Config.in b/package/perl-www-robotrules/Config.in new file mode 100644 index 0000000000..e80f5a0d9d --- /dev/null +++ b/package/perl-www-robotrules/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PERL_WWW_ROBOTRULES + bool "perl-www-robotrules" + select BR2_PACKAGE_PERL_URI + help + This module provides functions that deal the date formats used by the + HTTP protocol (and then some more) + + http://github.com/gisle/www-robotrules diff --git a/package/perl-www-robotrules/perl-www-robotrules.hash b/package/perl-www-robotrules/perl-www-robotrules.hash new file mode 100644 index 0000000000..9091a29659 --- /dev/null +++ b/package/perl-www-robotrules/perl-www-robotrules.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 b7186e8b8b3701e70c22abf430742403 WWW-RobotRules-6.02.tar.gz +sha256 46b502e7a288d559429891eeb5d979461dd3ecc6a5c491ead85d165b6e03a51e WWW-RobotRules-6.02.tar.gz diff --git a/package/perl-www-robotrules/perl-www-robotrules.mk b/package/perl-www-robotrules/perl-www-robotrules.mk new file mode 100644 index 0000000000..0c68b98a3a --- /dev/null +++ b/package/perl-www-robotrules/perl-www-robotrules.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-www-robotrules +# +################################################################################ + +PERL_WWW_ROBOTRULES_VERSION = 6.02 +PERL_WWW_ROBOTRULES_SOURCE = WWW-RobotRules-$(PERL_WWW_ROBOTRULES_VERSION).tar.gz +PERL_WWW_ROBOTRULES_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GA/GAAS +PERL_WWW_ROBOTRULES_DEPENDENCIES = perl-uri +PERL_WWW_ROBOTRULES_LICENSE = Artistic or GPLv1+ +PERL_WWW_ROBOTRULES_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-xml-libxml/0001-Makefile-PL.patch b/package/perl-xml-libxml/0001-Makefile-PL.patch new file mode 100644 index 0000000000..e043c6d24c --- /dev/null +++ b/package/perl-xml-libxml/0001-Makefile-PL.patch @@ -0,0 +1,18 @@ +fake check_lib for cross-compilation + +Signed-off-by: Francois Perrad + +Index: b/Makefile.PL +=================================================================== +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -88,8 +88,7 @@ + # -------------------------------------------------------------------------- # + # -------------------------------------------------------------------------- # + +-use lib qw(inc); +-use Devel::CheckLib; ++sub check_lib { return 1; } + + # Prompt the user here for any paths and other configuration + diff --git a/package/perl-xml-libxml/Config.in b/package/perl-xml-libxml/Config.in new file mode 100644 index 0000000000..44fe7102d9 --- /dev/null +++ b/package/perl-xml-libxml/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_PERL_XML_LIBXML + bool "perl-xml-libxml" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_PERL_XML_NAMESPACESUPPORT + select BR2_PACKAGE_PERL_XML_SAX + help + Interface to Gnome libxml2 xml parsing and DOM library + + https://bitbucket.org/shlomif/perl-xml-libxml + +comment "perl-xml-libxml needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/perl-xml-libxml/perl-xml-libxml.hash b/package/perl-xml-libxml/perl-xml-libxml.hash new file mode 100644 index 0000000000..782cf5c067 --- /dev/null +++ b/package/perl-xml-libxml/perl-xml-libxml.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 c9eb502f8aa2586c4a4dce3c784a2a0b XML-LibXML-2.0123.tar.gz +sha256 0525a2491f152cadee8c63550c79a380fb393851fdfc4c1e6cd5f0f92614f7c4 XML-LibXML-2.0123.tar.gz diff --git a/package/perl-xml-libxml/perl-xml-libxml.mk b/package/perl-xml-libxml/perl-xml-libxml.mk new file mode 100644 index 0000000000..9d7216aac8 --- /dev/null +++ b/package/perl-xml-libxml/perl-xml-libxml.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# perl-xml-libxml +# +################################################################################ + +PERL_XML_LIBXML_VERSION = 2.0123 +PERL_XML_LIBXML_SOURCE = XML-LibXML-$(PERL_XML_LIBXML_VERSION).tar.gz +PERL_XML_LIBXML_SITE = $(BR2_CPAN_MIRROR)/authors/id/S/SH/SHLOMIF +PERL_XML_LIBXML_DEPENDENCIES = zlib libxml2 perl-xml-sax perl-xml-namespacesupport +PERL_XML_LIBXML_LICENSE = Artistic or GPLv1+ +PERL_XML_LIBXML_LICENSE_FILES = LICENSE + +PERL_XML_LIBXML_CONF_OPTS = \ + LIBS="-L $(STAGING_DIR)/usr/lib" \ + INC="-I $(STAGING_DIR)/usr/include/libxml2" \ + NO_THREADS + +$(eval $(perl-package)) diff --git a/package/perl-xml-namespacesupport/Config.in b/package/perl-xml-namespacesupport/Config.in new file mode 100644 index 0000000000..bc67d47904 --- /dev/null +++ b/package/perl-xml-namespacesupport/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_XML_NAMESPACESUPPORT + bool "perl-xml-namespacesupport" + help + a simple generic namespace support class + + https://metacpan.org/release/XML-NamespaceSupport diff --git a/package/perl-xml-namespacesupport/perl-xml-namespacesupport.hash b/package/perl-xml-namespacesupport/perl-xml-namespacesupport.hash new file mode 100644 index 0000000000..9389601d0f --- /dev/null +++ b/package/perl-xml-namespacesupport/perl-xml-namespacesupport.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 222cca76161cd956d724286d36b607da XML-NamespaceSupport-1.11.tar.gz +sha256 6d8151f0a3f102313d76b64bfd1c2d9ed46bfe63a16f038e7d860fda287b74ea XML-NamespaceSupport-1.11.tar.gz diff --git a/package/perl-xml-namespacesupport/perl-xml-namespacesupport.mk b/package/perl-xml-namespacesupport/perl-xml-namespacesupport.mk new file mode 100644 index 0000000000..31b71c13e5 --- /dev/null +++ b/package/perl-xml-namespacesupport/perl-xml-namespacesupport.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-xml-namespacesupport +# +################################################################################ + +PERL_XML_NAMESPACESUPPORT_VERSION = 1.11 +PERL_XML_NAMESPACESUPPORT_SOURCE = XML-NamespaceSupport-$(PERL_XML_NAMESPACESUPPORT_VERSION).tar.gz +PERL_XML_NAMESPACESUPPORT_SITE = $(BR2_CPAN_MIRROR)/authors/id/P/PE/PERIGRIN +PERL_XML_NAMESPACESUPPORT_LICENSE = Artistic or GPLv1+ +PERL_XML_NAMESPACESUPPORT_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-xml-sax-base/Config.in b/package/perl-xml-sax-base/Config.in new file mode 100644 index 0000000000..2ad25ac39b --- /dev/null +++ b/package/perl-xml-sax-base/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PERL_XML_SAX_BASE + bool "perl-xml-sax-base" + help + Base class for SAX Drivers and Filters + + https://metacpan.org/release/XML-SAX-Base diff --git a/package/perl-xml-sax-base/perl-xml-sax-base.hash b/package/perl-xml-sax-base/perl-xml-sax-base.hash new file mode 100644 index 0000000000..6822e1844a --- /dev/null +++ b/package/perl-xml-sax-base/perl-xml-sax-base.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 38c8c3247dfd080712596118d70dbe32 XML-SAX-Base-1.08.tar.gz +sha256 666270318b15f88b8427e585198abbc19bc2e6ccb36dc4c0a4f2d9807330219e XML-SAX-Base-1.08.tar.gz diff --git a/package/perl-xml-sax-base/perl-xml-sax-base.mk b/package/perl-xml-sax-base/perl-xml-sax-base.mk new file mode 100644 index 0000000000..60dec31695 --- /dev/null +++ b/package/perl-xml-sax-base/perl-xml-sax-base.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# perl-xml-sax-base +# +################################################################################ + +PERL_XML_SAX_BASE_VERSION = 1.08 +PERL_XML_SAX_BASE_SOURCE = XML-SAX-Base-$(PERL_XML_SAX_BASE_VERSION).tar.gz +PERL_XML_SAX_BASE_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GR/GRANTM +PERL_XML_SAX_BASE_LICENSE = Artistic or GPLv1+ +PERL_XML_SAX_BASE_LICENSE_FILES = README + +$(eval $(perl-package)) diff --git a/package/perl-xml-sax/Config.in b/package/perl-xml-sax/Config.in new file mode 100644 index 0000000000..4f5567e251 --- /dev/null +++ b/package/perl-xml-sax/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PERL_XML_SAX + bool "perl-xml-sax" + select BR2_PACKAGE_PERL_XML_NAMESPACESUPPORT + select BR2_PACKAGE_PERL_XML_SAX_BASE + help + Simple API for XML + + https://metacpan.org/release/XML-SAX diff --git a/package/perl-xml-sax/perl-xml-sax.hash b/package/perl-xml-sax/perl-xml-sax.hash new file mode 100644 index 0000000000..6aa543c002 --- /dev/null +++ b/package/perl-xml-sax/perl-xml-sax.hash @@ -0,0 +1,3 @@ +# retrieved by scancpan from http://cpan.metacpan.org/ +md5 290f5375ae87fdebfdb5bc3854019f24 XML-SAX-0.99.tar.gz +sha256 32b04b8e36b6cc4cfc486de2d859d87af5386dd930f2383c49347050d6f5ad84 XML-SAX-0.99.tar.gz diff --git a/package/perl-xml-sax/perl-xml-sax.mk b/package/perl-xml-sax/perl-xml-sax.mk new file mode 100644 index 0000000000..f6d03729dc --- /dev/null +++ b/package/perl-xml-sax/perl-xml-sax.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# perl-xml-sax +# +################################################################################ + +PERL_XML_SAX_VERSION = 0.99 +PERL_XML_SAX_SOURCE = XML-SAX-$(PERL_XML_SAX_VERSION).tar.gz +PERL_XML_SAX_SITE = $(BR2_CPAN_MIRROR)/authors/id/G/GR/GRANTM +PERL_XML_SAX_DEPENDENCIES = perl-xml-namespacesupport perl-xml-sax-base +PERL_XML_SAX_LICENSE = Artistic or GPLv1+ +PERL_XML_SAX_LICENSE_FILES = LICENSE + +$(eval $(perl-package)) diff --git a/package/perl/Config.in b/package/perl/Config.in new file mode 100644 index 0000000000..cdd5aaba20 --- /dev/null +++ b/package/perl/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_PERL + bool "perl" + depends on BR2_USE_MMU # fork() + help + Larry Wall's Practical Extraction and Report Language + An interpreted scripting language, known among some as "Unix's Swiss + Army Chainsaw". + + http://www.perl.org/ + +if BR2_PACKAGE_PERL + +config BR2_PACKAGE_PERL_MODULES + string "custom module selection" + help + List of space-separated perl modules (without .pm) to copy to the + rootfs. + + Examples: constant Getopt/Std Time/Local + + Module dependencies on external libraries are not automatic so + check your needs. + + Leave empty for all modules (as far as the external libraries + are available). + +endif diff --git a/package/perl/perl.hash b/package/perl/perl.hash new file mode 100644 index 0000000000..4afbd06d67 --- /dev/null +++ b/package/perl/perl.hash @@ -0,0 +1,7 @@ +# Hashes from: http://www.cpan.org/src/5.0/perl-5.22.2.tar.bz2.{md5,sha1,sha256}.txt +md5 24ec0b41fdd1a4cce0e66811ae1f5e1b perl-5.22.2.tar.bz2 +sha1 e2f465446dcd45a7fa3da696037f9ebe73e78e55 perl-5.22.2.tar.bz2 +sha256 f2322b9b04fe0cdbca9fe755360da04892cb6483d44959457cfebc0bcddc8058 perl-5.22.2.tar.bz2 + +# No upstream hashes for the following +sha256 250ab6e6c034a8b7ae447fa2b453fa0b61ebb7db4d039eba60c52e44ab5899bd perl-5.22.1-cross-1.0.2.tar.gz diff --git a/package/perl/perl.mk b/package/perl/perl.mk new file mode 100644 index 0000000000..11b10ff5e4 --- /dev/null +++ b/package/perl/perl.mk @@ -0,0 +1,126 @@ +################################################################################ +# +# perl +# +################################################################################ + +PERL_VERSION_MAJOR = 22 +PERL_VERSION = 5.$(PERL_VERSION_MAJOR).2 +PERL_SITE = http://www.cpan.org/src/5.0 +PERL_SOURCE = perl-$(PERL_VERSION).tar.bz2 +PERL_LICENSE = Artistic or GPLv1+ +PERL_LICENSE_FILES = Artistic Copying README +PERL_INSTALL_STAGING = YES + +PERL_CROSS_VERSION = 1.0.2 +PERL_CROSS_BASE_VERSION = 5.$(PERL_VERSION_MAJOR).1 +# DO NOT refactor with the github helper (the result is not the same) +PERL_CROSS_SITE = https://github.com/arsv/perl-cross/releases/download/$(PERL_CROSS_VERSION) +PERL_CROSS_SOURCE = perl-$(PERL_CROSS_BASE_VERSION)-cross-$(PERL_CROSS_VERSION).tar.gz +PERL_EXTRA_DOWNLOADS = $(PERL_CROSS_SITE)/$(PERL_CROSS_SOURCE) + +PERL_CROSS_OLD_POD = perl$(subst .,,$(PERL_CROSS_BASE_VERSION))delta.pod +PERL_CROSS_NEW_POD = perl$(subst .,,$(PERL_VERSION))delta.pod + +# We use the perlcross hack to cross-compile perl. It should +# be extracted over the perl sources, so we don't define that +# as a separate package. Instead, it is downloaded and extracted +# together with perl +define PERL_CROSS_EXTRACT + $(call suitable-extractor,$(PERL_CROSS_SOURCE)) $(DL_DIR)/$(PERL_CROSS_SOURCE) | \ + $(TAR) --strip-components=1 -C $(@D) $(TAR_OPTIONS) - +endef +PERL_POST_EXTRACT_HOOKS += PERL_CROSS_EXTRACT + +define PERL_CROSS_SET_POD + $(SED) s/$(PERL_CROSS_OLD_POD)/$(PERL_CROSS_NEW_POD)/g $(@D)/Makefile +endef +PERL_POST_PATCH_HOOKS += PERL_CROSS_SET_POD + +ifeq ($(BR2_PACKAGE_BERKELEYDB),y) +PERL_DEPENDENCIES += berkeleydb +endif +ifeq ($(BR2_PACKAGE_GDBM),y) +PERL_DEPENDENCIES += gdbm +endif + +# We have to override LD, because an external multilib toolchain ld is not +# wrapped to provide the required sysroot options. +PERL_CONF_OPTS = \ + --target=$(GNU_TARGET_NAME) \ + --target-tools-prefix=$(TARGET_CROSS) \ + --prefix=/usr \ + -Dld="$(TARGET_CC)" \ + -Dccflags="$(TARGET_CFLAGS)" \ + -Dldflags="$(TARGET_LDFLAGS) -lm" \ + -Dmydomain="" \ + -Dmyhostname="$(BR2_TARGET_GENERIC_HOSTNAME)" \ + -Dmyuname="Buildroot $(BR2_VERSION_FULL)" \ + -Dosname=linux \ + -Dosvers=$(LINUX_VERSION) \ + -Dperladmin=root + +ifeq ($(shell expr $(PERL_VERSION_MAJOR) % 2), 1) +PERL_CONF_OPTS += -Dusedevel +endif + +ifeq ($(BR2_STATIC_LIBS),y) +PERL_CONF_OPTS += --all-static --no-dynaloader +endif + +PERL_MODULES = $(call qstrip,$(BR2_PACKAGE_PERL_MODULES)) +ifneq ($(PERL_MODULES),) +PERL_CONF_OPTS += --only-mod=$(subst $(space),$(comma),$(PERL_MODULES)) +endif + +define PERL_CONFIGURE_CMDS + (cd $(@D); HOSTCC='$(HOSTCC_NOCCACHE)' ./configure $(PERL_CONF_OPTS)) + $(SED) 's/UNKNOWN-/Buildroot $(BR2_VERSION_FULL) /' $(@D)/patchlevel.h +endef + +define PERL_BUILD_CMDS + $(MAKE1) -C $(@D) all +endef + +define PERL_INSTALL_STAGING_CMDS + $(MAKE1) -C $(@D) DESTDIR="$(STAGING_DIR)" install.perl +endef + +define PERL_INSTALL_TARGET_CMDS + $(MAKE1) -C $(@D) DESTDIR="$(TARGET_DIR)" install.perl +endef + +# We never want to have host-berkeleydb or host-gdbm as dependencies +# of host-perl. +HOST_PERL_DEPENDENCIES = + +HOST_PERL_CONF_OPTS = \ + -des \ + -Dprefix="$(HOST_DIR)/usr" \ + -Dcc="$(HOSTCC)" + +define HOST_PERL_CONFIGURE_CMDS + (cd $(@D); HOSTCC='$(HOSTCC_NOCCACHE)' ./Configure $(HOST_PERL_CONF_OPTS)) +endef + +define HOST_PERL_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define HOST_PERL_INSTALL_CMDS + $(MAKE) -C $(@D) INSTALL_DEPENDENCE='' install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) + +ifeq ($(BR2_PACKAGE_PERL),y) +define PERL_FINALIZE_TARGET + rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/pod + rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE + find $(TARGET_DIR)/usr/lib/perl5/ -name 'extralibs.ld' -print0 | xargs -0 rm -f + find $(TARGET_DIR)/usr/lib/perl5/ -name '*.bs' -print0 | xargs -0 rm -f + find $(TARGET_DIR)/usr/lib/perl5/ -name '.packlist' -print0 | xargs -0 rm -f +endef +TARGET_FINALIZE_HOOKS += PERL_FINALIZE_TARGET +endif diff --git a/package/phidgetwebservice/Config.in b/package/phidgetwebservice/Config.in new file mode 100644 index 0000000000..db7577d744 --- /dev/null +++ b/package/phidgetwebservice/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_PHIDGETWEBSERVICE + bool "phidgetwebservice" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb, libphidget + depends on !BR2_STATIC_LIBS # libphidget + select BR2_PACKAGE_LIBPHIDGET + help + phidgetwebservice (the Phidget WebService) provides an HTTP + front-end to the libphidget device control API. This provides + an alternative to the libphidget C linkage interface for + controlling locally attached Phidgets USB devices and it also + allows you to control Phidget USB devices remotely when the host + running the phidgetwebservice has an exposed network interface. + + The phidgetwebservice client program uses the libphidget HTTP + functions to send commands to the phidgetwebservice. + + http://phidgets.com/ + +comment "phidgetwebservice needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_STATIC_LIBS diff --git a/package/phidgetwebservice/phidgetwebservice.mk b/package/phidgetwebservice/phidgetwebservice.mk new file mode 100644 index 0000000000..f7d1b48411 --- /dev/null +++ b/package/phidgetwebservice/phidgetwebservice.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# phidgetwebservice +# +################################################################################ + +PHIDGETWEBSERVICE_VERSION = 2.1.8.20140319 +PHIDGETWEBSERVICE_SOURCE = phidgetwebservice_$(PHIDGETWEBSERVICE_VERSION).tar.gz +PHIDGETWEBSERVICE_SITE = http://www.phidgets.com/downloads/libraries +PHIDGETWEBSERVICE_DEPENDENCIES = libphidget +PHIDGETWEBSERVICE_LICENSE = LGPLv3 +PHIDGETWEBSERVICE_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/php-geoip/Config.in b/package/php-geoip/Config.in new file mode 100644 index 0000000000..adb20466fc --- /dev/null +++ b/package/php-geoip/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PHP_GEOIP + bool "php-geoip" + depends on BR2_PACKAGE_PHP + select BR2_PACKAGE_GEOIP + help + PHP GeoIP-based IP address mapper to geographical places. + + http://pecl.php.net/package/geoip diff --git a/package/php-geoip/php-geoip.hash b/package/php-geoip/php-geoip.hash new file mode 100644 index 0000000000..61945cfd57 --- /dev/null +++ b/package/php-geoip/php-geoip.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 8b5e8dec6353c437809e58d798627927ae659682b5bbdad023e9e569c278bfed php-geoip-1fd53288458100e9e30acf5a62bc9ef8426513d3.tar.gz diff --git a/package/php-geoip/php-geoip.mk b/package/php-geoip/php-geoip.mk new file mode 100644 index 0000000000..cda8d4ecee --- /dev/null +++ b/package/php-geoip/php-geoip.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# php-geoip +# +################################################################################ + +PHP_GEOIP_VERSION = 1fd53288458100e9e30acf5a62bc9ef8426513d3 +PHP_GEOIP_SITE = $(call github,php7-extensions,ext-php7-geoip,$(PHP_GEOIP_VERSION)) +PHP_GEOIP_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \ + --with-geoip=$(STAGING_DIR)/usr +# phpize does the autoconf magic +PHP_GEOIP_DEPENDENCIES = geoip php host-autoconf +PHP_GEOIP_LICENSE = PHP +PHP_GEOIP_LICENSE_FILES = geoip.c + +define PHP_GEOIP_PHPIZE + (cd $(@D); \ + PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \ + PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \ + $(STAGING_DIR)/usr/bin/phpize) +endef + +PHP_GEOIP_PRE_CONFIGURE_HOOKS += PHP_GEOIP_PHPIZE + +$(eval $(autotools-package)) diff --git a/package/php-gnupg/Config.in b/package/php-gnupg/Config.in new file mode 100644 index 0000000000..49fb43b5eb --- /dev/null +++ b/package/php-gnupg/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PHP_GNUPG + bool "php-gnupg" + depends on BR2_PACKAGE_PHP + depends on BR2_USE_MMU # libassuan + select BR2_PACKAGE_LIBGPGME + help + PHP wrapper around the gpgme library. + + http://pecl.php.net/package/gnupg diff --git a/package/php-gnupg/php-gnupg.hash b/package/php-gnupg/php-gnupg.hash new file mode 100644 index 0000000000..ef066a506b --- /dev/null +++ b/package/php-gnupg/php-gnupg.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 50065cb81f1ac3ec5fcd796e58c8433071ff24cc14900e6077682717f5239307 gnupg-1.3.6.tgz diff --git a/package/php-gnupg/php-gnupg.mk b/package/php-gnupg/php-gnupg.mk new file mode 100644 index 0000000000..c5964c21c4 --- /dev/null +++ b/package/php-gnupg/php-gnupg.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# php-gnupg +# +################################################################################ + +PHP_GNUPG_VERSION = 1.3.6 +PHP_GNUPG_SOURCE = gnupg-$(PHP_GNUPG_VERSION).tgz +PHP_GNUPG_SITE = http://pecl.php.net/get +# phpize does the autoconf magic +PHP_GNUPG_DEPENDENCIES = php libgpgme host-autoconf host-pkgconf +PHP_GNUPG_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \ + --with-gnupg=$(STAGING_DIR)/usr/include --with-gpg=/usr/bin/gpg +PHP_GNUPG_LICENSE = BSD-2c +PHP_GNUPG_LICENSE_FILES = LICENSE + +define PHP_GNUPG_PHPIZE + (cd $(@D); \ + PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \ + PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \ + $(STAGING_DIR)/usr/bin/phpize) +endef + +PHP_GNUPG_PRE_CONFIGURE_HOOKS += PHP_GNUPG_PHPIZE + +$(eval $(autotools-package)) diff --git a/package/php-imagick/Config.in b/package/php-imagick/Config.in new file mode 100644 index 0000000000..f759eea2f5 --- /dev/null +++ b/package/php-imagick/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_PHP_IMAGICK + bool "php-imagick" + depends on BR2_PACKAGE_PHP + depends on BR2_USE_MMU # imagemagick + depends on BR2_TOOLCHAIN_HAS_THREADS # imagemagick + select BR2_PACKAGE_IMAGEMAGICK + help + PHP wrapper to the ImageMagick library. + + http://pecl.php.net/package/imagick + +comment "php-imagemagick needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_PHP + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/php-imagick/php-imagick.hash b/package/php-imagick/php-imagick.hash new file mode 100644 index 0000000000..551bed62c9 --- /dev/null +++ b/package/php-imagick/php-imagick.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 a729fbd69e0aa145824d61dc9225bfb636dcd8421874a5667ac3822e609449e1 imagick-3.4.1.tgz diff --git a/package/php-imagick/php-imagick.mk b/package/php-imagick/php-imagick.mk new file mode 100644 index 0000000000..84cc3119d6 --- /dev/null +++ b/package/php-imagick/php-imagick.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# php-imagick +# +################################################################################ + +PHP_IMAGICK_VERSION = 3.4.1 +PHP_IMAGICK_SOURCE = imagick-$(PHP_IMAGICK_VERSION).tgz +PHP_IMAGICK_SITE = http://pecl.php.net/get +PHP_IMAGICK_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \ + --with-imagick=$(STAGING_DIR)/usr +# phpize does the autoconf magic +PHP_IMAGICK_DEPENDENCIES = imagemagick php host-autoconf +PHP_IMAGICK_LICENSE = PHP +PHP_IMAGICK_LICENSE_FILES = LICENSE + +define PHP_IMAGICK_PHPIZE + (cd $(@D); \ + PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \ + PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \ + $(STAGING_DIR)/usr/bin/phpize) +endef + +PHP_IMAGICK_PRE_CONFIGURE_HOOKS += PHP_IMAGICK_PHPIZE + +$(eval $(autotools-package)) diff --git a/package/php-memcached/Config.in b/package/php-memcached/Config.in new file mode 100644 index 0000000000..cd97c15285 --- /dev/null +++ b/package/php-memcached/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_PHP_MEMCACHED + bool "php-memcached" + depends on BR2_INSTALL_LIBSTDCPP # libmemcached + depends on BR2_TOOLCHAIN_HAS_THREADS # libmemcached + select BR2_PACKAGE_PHP_EXT_SESSION + select BR2_PACKAGE_LIBMEMCACHED + select BR2_PACKAGE_ZLIB + help + PHP extension for interfacing with memcached via + libmemcached library. + + http://pecl.php.net/package/memcached + +comment "php-memcached needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/php-memcached/php-memcached.hash b/package/php-memcached/php-memcached.hash new file mode 100644 index 0000000000..bc2e97acd3 --- /dev/null +++ b/package/php-memcached/php-memcached.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 17b9600f6d4c807f23a3f5c45fcd8775ca2e61d6eda70370af2bef4c6e159f58 memcached-2.2.0.tgz diff --git a/package/php-memcached/php-memcached.mk b/package/php-memcached/php-memcached.mk new file mode 100644 index 0000000000..599e22e615 --- /dev/null +++ b/package/php-memcached/php-memcached.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# php-memcached +# +################################################################################ + +PHP_MEMCACHED_VERSION = 2.2.0 +PHP_MEMCACHED_SOURCE = memcached-$(PHP_MEMCACHED_VERSION).tgz +# pecl.php.net returns html with db connect failed +PHP_MEMCACHED_SITE = http://sources.buildroot.net +PHP_MEMCACHED_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \ + --disable-memcached-sasl \ + --with-libmemcached-dir=$(STAGING_DIR)/usr \ + --with-zlib-dir=$(STAGING_DIR)/usr +# phpize does the autoconf magic +PHP_MEMCACHED_DEPENDENCIES = libmemcached php zlib host-autoconf host-pkgconf +PHP_MEMCACHED_LICENSE = MIT +PHP_MEMCACHED_LICENSE_FILES = LICENSE + +define PHP_MEMCACHED_PHPIZE + (cd $(@D); \ + PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \ + PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \ + $(STAGING_DIR)/usr/bin/phpize) +endef + +PHP_MEMCACHED_PRE_CONFIGURE_HOOKS += PHP_MEMCACHED_PHPIZE + +$(eval $(autotools-package)) diff --git a/package/php-ssh2/Config.in b/package/php-ssh2/Config.in new file mode 100644 index 0000000000..b457900740 --- /dev/null +++ b/package/php-ssh2/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PHP_SSH2 + bool "php-ssh2" + depends on BR2_PACKAGE_PHP + select BR2_PACKAGE_LIBSSH2 + help + PHP bindings for the libssh2 library. + + http://pecl.php.net/package/ssh2 diff --git a/package/php-ssh2/php-ssh2.hash b/package/php-ssh2/php-ssh2.hash new file mode 100644 index 0000000000..d599662fa4 --- /dev/null +++ b/package/php-ssh2/php-ssh2.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 600c82d2393acf3642f19914f06a7afea57ee05cb8c10e8a5510b32188b97f99 ssh2-0.12.tgz diff --git a/package/php-ssh2/php-ssh2.mk b/package/php-ssh2/php-ssh2.mk new file mode 100644 index 0000000000..ace68e01fd --- /dev/null +++ b/package/php-ssh2/php-ssh2.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# php-ssh2 +# +################################################################################ + +PHP_SSH2_VERSION = 0.12 +PHP_SSH2_SOURCE = ssh2-$(PHP_SSH2_VERSION).tgz +# pecl.php.net returns html with db connect failed +PHP_SSH2_SITE = http://sources.buildroot.net +PHP_SSH2_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \ + --with-ssh2=$(STAGING_DIR)/usr +# phpize does the autoconf magic +PHP_SSH2_DEPENDENCIES = libssh2 php host-autoconf +PHP_SSH2_LICENSE = PHP +PHP_SSH2_LICENSE_FILES = LICENSE + +define PHP_SSH2_PHPIZE + (cd $(@D); \ + PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \ + PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \ + $(STAGING_DIR)/usr/bin/phpize) +endef + +PHP_SSH2_PRE_CONFIGURE_HOOKS += PHP_SSH2_PHPIZE + +$(eval $(autotools-package)) diff --git a/package/php-yaml/Config.in b/package/php-yaml/Config.in new file mode 100644 index 0000000000..8d09ce28f3 --- /dev/null +++ b/package/php-yaml/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PHP_YAML + bool "php-yaml" + depends on BR2_PACKAGE_PHP + select BR2_PACKAGE_LIBYAML + help + PHP YAML-1.1 parser and emitter. + + http://pecl.php.net/package/yaml diff --git a/package/php-yaml/php-yaml.hash b/package/php-yaml/php-yaml.hash new file mode 100644 index 0000000000..e4f22a6a5e --- /dev/null +++ b/package/php-yaml/php-yaml.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 762ec3d9eb163ac0d063118df8c5e2ee6746dbe8566d32055e7e066e590937c3 yaml-1.1.1.tgz diff --git a/package/php-yaml/php-yaml.mk b/package/php-yaml/php-yaml.mk new file mode 100644 index 0000000000..b6f259df7b --- /dev/null +++ b/package/php-yaml/php-yaml.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# php-yaml +# +################################################################################ + +PHP_YAML_VERSION = 1.1.1 +PHP_YAML_SOURCE = yaml-$(PHP_YAML_VERSION).tgz +# pecl.php.net returns html with db connect failed +PHP_YAML_SITE = http://sources.buildroot.net +PHP_YAML_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config \ + --with-yaml=$(STAGING_DIR)/usr +# phpize does the autoconf magic +PHP_YAML_DEPENDENCIES = libyaml php host-autoconf +PHP_YAML_LICENSE = MIT +PHP_YAML_LICENSE_FILES = LICENSE + +define PHP_YAML_PHPIZE + (cd $(@D); \ + PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \ + PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \ + $(STAGING_DIR)/usr/bin/phpize) +endef + +PHP_YAML_PRE_CONFIGURE_HOOKS += PHP_YAML_PHPIZE + +$(eval $(autotools-package)) diff --git a/package/php-zmq/Config.in b/package/php-zmq/Config.in new file mode 100644 index 0000000000..c258272560 --- /dev/null +++ b/package/php-zmq/Config.in @@ -0,0 +1,15 @@ +comment "php-zmq needs a toolchain w/ C++, wchar, threads" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR \ + && BR2_TOOLCHAIN_HAS_THREADS) + +config BR2_PACKAGE_PHP_ZMQ + bool "php-zmq" + depends on BR2_PACKAGE_PHP + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_ZEROMQ + help + ZeroMQ messaging bindings for PHP + + http://pecl.php.net/package/zmq diff --git a/package/php-zmq/php-zmq.hash b/package/php-zmq/php-zmq.hash new file mode 100644 index 0000000000..c99e351edc --- /dev/null +++ b/package/php-zmq/php-zmq.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c492375818bd51b355352798fb94f04d6828c6aeda41ba813849624af74144ce zmq-1.1.3.tgz diff --git a/package/php-zmq/php-zmq.mk b/package/php-zmq/php-zmq.mk new file mode 100644 index 0000000000..2730996d4c --- /dev/null +++ b/package/php-zmq/php-zmq.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# php-zmq +# +################################################################################ + +PHP_ZMQ_VERSION = 1.1.3 +PHP_ZMQ_SOURCE = zmq-$(PHP_ZMQ_VERSION).tgz +PHP_ZMQ_SITE = https://pecl.php.net/get +# phpize does the autoconf magic +PHP_ZMQ_DEPENDENCIES = php zeromq host-autoconf host-pkgconf +PHP_ZMQ_CONF_OPTS = --with-php-config=$(STAGING_DIR)/usr/bin/php-config +PHP_ZMQ_LICENSE = BSD-3c +PHP_ZMQ_LICENSE_FILES = LICENSE + +define PHP_ZMQ_PHPIZE + (cd $(@D); \ + PHP_AUTOCONF=$(HOST_DIR)/usr/bin/autoconf \ + PHP_AUTOHEADER=$(HOST_DIR)/usr/bin/autoheader \ + $(STAGING_DIR)/usr/bin/phpize) +endef + +PHP_ZMQ_PRE_CONFIGURE_HOOKS += PHP_ZMQ_PHPIZE + +$(eval $(autotools-package)) diff --git a/package/php/0001-ditch-unset.patch b/package/php/0001-ditch-unset.patch new file mode 100644 index 0000000000..eda83c95a3 --- /dev/null +++ b/package/php/0001-ditch-unset.patch @@ -0,0 +1,26 @@ +Unsetting ac_cv_{func,lib}_* is bad, you can't feed the configure cache. +Terminate them with extreme prejudice. + +Signed-off-by: Gustavo Zacarias + +diff -Nura php-5.6.8.orig/acinclude.m4 php-5.6.8/acinclude.m4 +--- php-5.6.8.orig/acinclude.m4 2015-04-15 20:05:57.000000000 +0200 ++++ php-5.6.8/acinclude.m4 2015-05-18 20:03:50.833099001 +0200 +@@ -1897,8 +1897,6 @@ + dnl + AC_DEFUN([PHP_CHECK_FUNC_LIB],[ + ifelse($2,,:,[ +- unset ac_cv_lib_$2[]_$1 +- unset ac_cv_lib_$2[]___$1 + unset found + AC_CHECK_LIB($2, $1, [found=yes], [ + AC_CHECK_LIB($2, __$1, [found=yes], [found=no]) +@@ -1930,8 +1928,6 @@ + dnl Defines HAVE_func and HAVE_library if found and adds the library to LIBS. + dnl + AC_DEFUN([PHP_CHECK_FUNC],[ +- unset ac_cv_func_$1 +- unset ac_cv_func___$1 + unset found + + AC_CHECK_FUNC($1, [found=yes],[ AC_CHECK_FUNC(__$1,[found=yes],[found=no]) ]) diff --git a/package/php/0002-no-iconv-search.patch b/package/php/0002-no-iconv-search.patch new file mode 100644 index 0000000000..32aa7f5f88 --- /dev/null +++ b/package/php/0002-no-iconv-search.patch @@ -0,0 +1,55 @@ +Tweak PHP_SETUP_ICONV from aclocal/acinclude.m4 to not +PHP_ADD_INCLUDE $ICONV_DIR/include since the tests use +test instead of AC_TRY_LINK to find headers which is bad, +specially when adding /usr and /usr/local to the mix. +Do basically the same with ext/iconv/config.m4 by tweaking +PHP_ICONV_H_PATH which, again, uses test and absolute paths. + +Signed-off-by: Gustavo Zacarias +[Gustavo: convert to nice m4 instead of patching configure] +[Gustavo: update for 5.6.10] + +diff -Nura php-5.6.10.orig/acinclude.m4 php-5.6.10/acinclude.m4 +--- php-5.6.10.orig/acinclude.m4 2015-06-12 16:09:06.274355813 -0300 ++++ php-5.6.10/acinclude.m4 2015-06-12 16:10:10.884544865 -0300 +@@ -2474,7 +2474,7 @@ + dnl + if test "$found_iconv" = "no"; then + +- for i in $PHP_ICONV /usr/local /usr; do ++ for i in $PHP_ICONV; do + if test -r $i/include/giconv.h; then + AC_DEFINE(HAVE_GICONV_H, 1, [ ]) + ICONV_DIR=$i +diff -Nura php-5.6.10.orig/ext/iconv/config.m4 php-5.6.10/ext/iconv/config.m4 +--- php-5.6.10.orig/ext/iconv/config.m4 2015-06-12 16:09:07.792407246 -0300 ++++ php-5.6.10/ext/iconv/config.m4 2015-06-12 16:11:07.752471600 -0300 +@@ -14,28 +14,6 @@ + ]) + + if test "$iconv_avail" != "no"; then +- if test -z "$ICONV_DIR"; then +- for i in /usr/local /usr; do +- if test -f "$i/include/iconv.h" || test -f "$i/include/giconv.h"; then +- PHP_ICONV_PREFIX="$i" +- break +- fi +- done +- if test -z "$PHP_ICONV_PREFIX"; then +- PHP_ICONV_PREFIX="/usr" +- fi +- else +- PHP_ICONV_PREFIX="$ICONV_DIR" +- fi +- +- CFLAGS="-I$PHP_ICONV_PREFIX/include $CFLAGS" +- LDFLAGS="-L$PHP_ICONV_PREFIX/$PHP_LIBDIR $LDFLAGS" +- +- if test -r "$PHP_ICONV_PREFIX/include/giconv.h"; then +- PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/giconv.h" +- else +- PHP_ICONV_H_PATH="$PHP_ICONV_PREFIX/include/iconv.h" +- fi + + AC_MSG_CHECKING([if iconv is glibc's]) + AC_TRY_LINK([#include ],[gnu_get_libc_version();], diff --git a/package/php/0003-disable-pharcmd.patch b/package/php/0003-disable-pharcmd.patch new file mode 100644 index 0000000000..bfcc956343 --- /dev/null +++ b/package/php/0003-disable-pharcmd.patch @@ -0,0 +1,27 @@ +Disable the 'phar' command-line tool build/installation since it requires +php to run and pack up phar itself in phar format. This would require +a host-php instance and really probably nobody needs the phar tool +on the target. + +Signed-off-by: Gustavo Zacarias +[Gustavo: update for autoreconf/configure.in] + +diff -Nura php-5.6.7.orig/configure.in php-5.6.7/configure.in +--- php-5.6.7.orig/configure.in 2015-04-08 11:08:10.815835010 -0300 ++++ php-5.6.7/configure.in 2015-04-08 11:16:20.460467444 -0300 +@@ -1437,13 +1437,8 @@ + INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag" + CXXFLAGS="$CXXFLAGS $standard_libtool_flag" + +-if test "$PHP_PHAR" != "no" && test "$PHP_CLI" != "no"; then +- pharcmd=pharcmd +- pharcmd_install=install-pharcmd +-else +- pharcmd= +- pharcmd_install= +-fi; ++pharcmd= ++pharcmd_install= + + all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_ZEND_EX) \$(PHP_BINARIES) $pharcmd" + install_targets="$install_sapi $install_modules $install_binaries install-build install-headers install-programs $install_pear $pharcmd_install" diff --git a/package/php/0004-flock-type-linux.patch b/package/php/0004-flock-type-linux.patch new file mode 100644 index 0000000000..a03c2624a7 --- /dev/null +++ b/package/php/0004-flock-type-linux.patch @@ -0,0 +1,48 @@ +OPcache: flock mechanism is obviously linux so force it. + +Signed-off-by: Gustavo Zacarias + +diff -Nura php-5.6.7.orig/ext/opcache/config.m4 php-5.6.7/ext/opcache/config.m4 +--- php-5.6.7.orig/ext/opcache/config.m4 2015-04-08 11:08:11.125845540 -0300 ++++ php-5.6.7/ext/opcache/config.m4 2015-04-08 11:57:23.648831436 -0300 +@@ -326,38 +326,8 @@ + msg=yes,msg=no,msg=no) + AC_MSG_RESULT([$msg]) + +-flock_type=unknown +-AC_MSG_CHECKING("whether flock struct is linux ordered") +-AC_TRY_RUN([ +- #include +- struct flock lock = { 1, 2, 3, 4, 5 }; +- int main() { +- if(lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) { +- return 0; +- } +- return 1; +- } +-], [ +- flock_type=linux +- AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) +- AC_MSG_RESULT("yes") +-], AC_MSG_RESULT("no") ) +- +-AC_MSG_CHECKING("whether flock struct is BSD ordered") +-AC_TRY_RUN([ +- #include +- struct flock lock = { 1, 2, 3, 4, 5 }; +- int main() { +- if(lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) { +- return 0; +- } +- return 1; +- } +-], [ +- flock_type=bsd +- AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) +- AC_MSG_RESULT("yes") +-], AC_MSG_RESULT("no") ) ++flock_type=linux ++AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) + + if test "$flock_type" == "unknown"; then + AC_MSG_ERROR([Don't know how to define struct flock on this system[,] set --enable-opcache=no]) diff --git a/package/php/0005-ac-cache-strcasestr.patch b/package/php/0005-ac-cache-strcasestr.patch new file mode 100644 index 0000000000..8a8c5d86ff --- /dev/null +++ b/package/php/0005-ac-cache-strcasestr.patch @@ -0,0 +1,24 @@ +Allow cache answer for strcasestr discovery. + +Signed-off-by: Gustavo Zacarias + +diff -Nura php-5.6.7.orig/ext/fileinfo/config.m4 php-5.6.7/ext/fileinfo/config.m4 +--- php-5.6.7.orig/ext/fileinfo/config.m4 2015-04-08 22:19:45.798770792 -0300 ++++ php-5.6.7/ext/fileinfo/config.m4 2015-04-08 22:26:33.110654338 -0300 +@@ -14,6 +14,7 @@ + libmagic/readcdf.c libmagic/softmagic.c" + + AC_MSG_CHECKING([for strcasestr]) ++ AC_CACHE_VAL(ac_cv_func_strcasestr, + AC_TRY_RUN([ + #include + #include +@@ -46,7 +47,7 @@ + AC_MSG_RESULT(no) + AC_MSG_NOTICE(using libmagic strcasestr implementation) + libmagic_sources="$libmagic_sources libmagic/strcasestr.c" +- ]) ++ ])) + + PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic) + PHP_ADD_BUILD_DIR($ext_builddir/libmagic) diff --git a/package/php/0006-fix-php-fpm.service.in.patch b/package/php/0006-fix-php-fpm.service.in.patch new file mode 100644 index 0000000000..a182a2528b --- /dev/null +++ b/package/php/0006-fix-php-fpm.service.in.patch @@ -0,0 +1,35 @@ +From bb19125781c0794da9a63fee62e263ff4efff661 Mon Sep 17 00:00:00 2001 +From: Floris Bos +Date: Fri, 1 May 2015 15:28:55 +0200 +Subject: [PATCH] Fix php-fpm.service.in + +- Expand file paths. +- Remove obsolete After=syslog.target. Syslog is socket activated nowadays. + +Signed-off-by: Floris Bos +--- + sapi/fpm/php-fpm.service.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sapi/fpm/php-fpm.service.in b/sapi/fpm/php-fpm.service.in +index a2df30e..c135f04 100644 +--- a/sapi/fpm/php-fpm.service.in ++++ b/sapi/fpm/php-fpm.service.in +@@ -1,11 +1,11 @@ + [Unit] + Description=The PHP FastCGI Process Manager +-After=syslog.target network.target ++After=network.target + + [Service] + Type=@php_fpm_systemd@ +-PIDFile=@localstatedir@/run/php-fpm.pid +-ExecStart=@sbindir@/php-fpm --nodaemonize --fpm-config @sysconfdir@/php-fpm.conf ++PIDFile=@EXPANDED_LOCALSTATEDIR@/run/php-fpm.pid ++ExecStart=@EXPANDED_SBINDIR@/php-fpm --nodaemonize --fpm-config @EXPANDED_SYSCONFDIR@/php-fpm.conf + ExecReload=/bin/kill -USR2 $MAINPID + + [Install] +-- +2.1.4 + diff --git a/package/php/Config.ext b/package/php/Config.ext new file mode 100644 index 0000000000..ee51030ab7 --- /dev/null +++ b/package/php/Config.ext @@ -0,0 +1,402 @@ +menu "Extensions" + +config BR2_PACKAGE_PHP_EXT_CALENDAR + bool "Calendar" + help + Calendar and event support + +config BR2_PACKAGE_PHP_EXT_FILEINFO + bool "Fileinfo" + help + File Information support + +config BR2_PACKAGE_PHP_EXT_OPCACHE + bool "OPcache" + help + Enable the Zend OPcache accelerator. + +comment "Readline needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_PHP_EXT_READLINE + bool "Readline" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + help + Readline support + +config BR2_PACKAGE_PHP_EXT_SESSION + bool "Session" + default y + help + Session support + +comment "Compression extensions" + +config BR2_PACKAGE_PHP_EXT_BZIP2 + bool "bzip2" + select BR2_PACKAGE_BZIP2 + help + bzip2 read/write support + +config BR2_PACKAGE_PHP_EXT_PHAR + bool "phar" + help + PHP Archive support + +config BR2_PACKAGE_PHP_EXT_ZIP + bool "zip" + select BR2_PACKAGE_ZLIB + help + Zip read/write support + +config BR2_PACKAGE_PHP_EXT_ZLIB + bool "zlib" + select BR2_PACKAGE_ZLIB + default y + help + zlib support + +comment "Cryptography extensions" + +config BR2_PACKAGE_PHP_EXT_HASH + bool "hash" + help + HASH message digest framework + +config BR2_PACKAGE_PHP_EXT_MCRYPT + bool "mcrypt" + select BR2_PACKAGE_LIBMCRYPT + help + mcrypt support + +config BR2_PACKAGE_PHP_EXT_OPENSSL + bool "openssl" + select BR2_PACKAGE_OPENSSL + help + openssl support + +comment "Database extensions" + +config BR2_PACKAGE_PHP_EXT_DBA + bool "DBA" + help + Database Abstraction Layer + +if BR2_PACKAGE_PHP_EXT_DBA + +config BR2_PACKAGE_PHP_EXT_DBA_CDB + bool "cdb" + help + CDB handler + +config BR2_PACKAGE_PHP_EXT_DBA_DB4 + bool "db4/5" + select BR2_PACKAGE_BERKELEYDB + help + BerkeleyDB version 4/5 handler + +config BR2_PACKAGE_PHP_EXT_DBA_FLAT + bool "flat" + default y + help + Flat file handler + +config BR2_PACKAGE_PHP_EXT_DBA_INI + bool "ini" + default y + help + INI file handler + +endif + +config BR2_PACKAGE_PHP_EXT_MYSQL + bool "Mysql" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # mysql + depends on BR2_TOOLCHAIN_HAS_THREADS # mysql + select BR2_PACKAGE_MYSQL + help + MySQL support + +config BR2_PACKAGE_PHP_EXT_MYSQLI + bool "Mysqli" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # mysql + depends on BR2_TOOLCHAIN_HAS_THREADS # mysql + select BR2_PACKAGE_MYSQL + select BR2_PACKAGE_PHP_EXT_MYSQL + help + MySQL Improved extension support + +config BR2_PACKAGE_PHP_EXT_SQLITE + bool "SQLite3" + select BR2_PACKAGE_SQLITE + help + SQLite3 support + +config BR2_PACKAGE_PHP_EXT_PDO + bool "PDO" + help + PHP Data Objects support + +if BR2_PACKAGE_PHP_EXT_PDO + +config BR2_PACKAGE_PHP_EXT_PDO_MYSQL + bool "MySQL" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # mysql + depends on BR2_TOOLCHAIN_HAS_THREADS # mysql + select BR2_PACKAGE_MYSQL + help + PDO driver for MySQL + +comment "MySQL drivers need a toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_PHP_EXT_PDO_POSTGRESQL + bool "PostgreSQL" + select BR2_PACKAGE_POSTGRESQL + depends on BR2_USE_MMU # postgresql + depends on !BR2_STATIC_LIBS + help + PDO driver for PostgreSQL + +comment "PostgreSQL drivers need a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_PHP_EXT_PDO_SQLITE + bool "SQLite3" + select BR2_PACKAGE_SQLITE + help + SQLite3 driver for PDO + +config BR2_PACKAGE_PHP_EXT_PDO_UNIXODBC + bool "unixODBC" + select BR2_PACKAGE_UNIXODBC + help + unixODBC driver for PDO + +endif + +comment "Human language and character encoding support" + +config BR2_PACKAGE_PHP_EXT_GETTEXT + bool "Gettext" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + depends on BR2_USE_WCHAR + help + Gettext support + +comment "Gettext support needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_PHP_EXT_ICONV + bool "iconv" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + iconv character set conversion support + +config BR2_PACKAGE_PHP_EXT_INTL + bool "intl" + select BR2_PACKAGE_ICU + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on !BR2_BINFMT_FLAT # icu + depends on BR2_TOOLCHAIN_HAS_THREADS # icu + help + Internationalization support + +comment "intl support needs a toolchain w/ C++, wchar, threads" + depends on !BR2_BINFMT_FLAT + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_PHP_EXT_MBSTRING + bool "mbstring" + help + multibyte string support + +comment "Image processing" + +config BR2_PACKAGE_PHP_EXT_EXIF + bool "EXIF" + help + EXIF support + +config BR2_PACKAGE_PHP_EXT_GD + bool "GD" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBPNG + help + GD support + +comment "Mathematical extensions" + +config BR2_PACKAGE_PHP_EXT_BCMATH + bool "BC math" + help + BCMath arbitrary precision mathematics support + +config BR2_PACKAGE_PHP_EXT_GMP + bool "GMP" + select BR2_PACKAGE_GMP + help + GNU Multiple Precision support + +comment "Other basic extensions" + +config BR2_PACKAGE_PHP_EXT_JSON + bool "JSON" + help + JavaScript Object Serialization support + +config BR2_PACKAGE_PHP_EXT_TOKENIZER + bool "Tokenizer" + help + Tokenizer functions support + +comment "Other services" + +config BR2_PACKAGE_PHP_EXT_CURL + bool "cURL" + select BR2_PACKAGE_LIBCURL + help + cURL for URL streams + +config BR2_PACKAGE_PHP_EXT_FTP + bool "FTP" + help + FTP support + +config BR2_PACKAGE_PHP_EXT_SNMP + bool "SNMP" + depends on BR2_USE_MMU # netsnmp fork() + select BR2_PACKAGE_NETSNMP + select BR2_PACKAGE_NETSNMP_ENABLE_MIBS + help + SNMP support + +config BR2_PACKAGE_PHP_EXT_SOCKETS + bool "sockets" + help + Sockets support + +comment "Process Control" + +config BR2_PACKAGE_PHP_EXT_PCNTL + bool "PCNTL" + depends on BR2_USE_MMU # fork() + help + Process control support + +config BR2_PACKAGE_PHP_EXT_POSIX + bool "Posix" + default y + help + POSIX.1 (IEEE 1003.1) function support + +config BR2_PACKAGE_PHP_EXT_SHMOP + bool "shmop" + help + Shared memory support + +config BR2_PACKAGE_PHP_EXT_SYSVMSG + bool "sysvmsg" + help + System V message queue support + +config BR2_PACKAGE_PHP_EXT_SYSVSEM + bool "sysvsem" + help + System V semaphore support + +config BR2_PACKAGE_PHP_EXT_SYSVSHM + bool "sysvshm" + help + System V shared memory support + +comment "Variable and Type related" + +config BR2_PACKAGE_PHP_EXT_CTYPE + bool "Ctype" + help + Character type checking support + +config BR2_PACKAGE_PHP_EXT_FILTER + bool "Filter" + help + Input filter support + +comment "Web services" + +config BR2_PACKAGE_PHP_EXT_SOAP + bool "SOAP" + select BR2_PACKAGE_PHP_EXT_LIBXML2 + help + SOAP support + +config BR2_PACKAGE_PHP_EXT_XMLRPC + bool "XML-RPC" + select BR2_PACKAGE_PHP_EXT_LIBXML2 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + XML-RPC support + +comment "XML manipulation" + +config BR2_PACKAGE_PHP_EXT_DOM + bool "DOM" + select BR2_PACKAGE_PHP_EXT_LIBXML2 + help + Document Object Model support + +config BR2_PACKAGE_PHP_EXT_LIBXML2 + bool "libxml" + select BR2_PACKAGE_LIBXML2 + help + libxml2 support + +config BR2_PACKAGE_PHP_EXT_SIMPLEXML + bool "SimpleXML" + select BR2_PACKAGE_PHP_EXT_LIBXML2 + help + SimpleXML support + +config BR2_PACKAGE_PHP_EXT_WDDX + bool "WDDX" + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_PHP_EXT_LIBXML2 + help + WDDX support + +config BR2_PACKAGE_PHP_EXT_XML + bool "XML Parser" + select BR2_PACKAGE_PHP_EXT_LIBXML2 + help + XML Parser support + +config BR2_PACKAGE_PHP_EXT_XMLREADER + bool "XMLReader" + select BR2_PACKAGE_PHP_EXT_LIBXML2 + help + XMLReader support + +config BR2_PACKAGE_PHP_EXT_XMLWRITER + bool "XMLWriter" + select BR2_PACKAGE_PHP_EXT_LIBXML2 + help + XMLWriter support + +config BR2_PACKAGE_PHP_EXT_XSL + bool "XSL" + select BR2_PACKAGE_PHP_EXT_DOM + select BR2_PACKAGE_PHP_EXT_LIBXML2 + select BR2_PACKAGE_LIBXSLT + help + XSL transformation support + +endmenu diff --git a/package/php/Config.in b/package/php/Config.in new file mode 100644 index 0000000000..32faa322fe --- /dev/null +++ b/package/php/Config.in @@ -0,0 +1,69 @@ +config BR2_PACKAGE_PHP + bool "php" + help + PHP is a widely-used general-purpose scripting + language that is especially suited for Web development + and can be embedded into HTML. + + http://www.php.net + +if BR2_PACKAGE_PHP + +source "package/php/Config.ext" + +config BR2_PACKAGE_PHP_CLI + bool + +config BR2_PACKAGE_PHP_CGI + bool + +config BR2_PACKAGE_PHP_FPM + bool + +choice + prompt "Interface" + default BR2_PACKAGE_PHP_SAPI_CGI + help + Select the PHP interface(s). + +config BR2_PACKAGE_PHP_SAPI_CGI + bool "CGI" + # CGI uses fork() + depends on BR2_USE_MMU + select BR2_PACKAGE_PHP_CGI + help + Common Gateway Interface + +config BR2_PACKAGE_PHP_SAPI_CLI + bool "CLI" + select BR2_PACKAGE_PHP_CLI + help + Command Line Interface + +config BR2_PACKAGE_PHP_SAPI_FPM + bool "FPM" + depends on BR2_USE_MMU + select BR2_PACKAGE_PHP_FPM + help + PHP-FPM (FastCGI Process Manager) + +config BR2_PACKAGE_PHP_SAPI_CLI_CGI + bool "CGI and CLI" + # CGI uses fork() + depends on BR2_USE_MMU + select BR2_PACKAGE_PHP_CLI + select BR2_PACKAGE_PHP_CGI + help + Command line and Common gateway interfaces + +config BR2_PACKAGE_PHP_SAPI_CLI_FPM + bool "FPM and CLI" + depends on BR2_USE_MMU + select BR2_PACKAGE_PHP_CLI + select BR2_PACKAGE_PHP_FPM + help + Command line and PHP-FPM (FastCGI Process Manager) + +endchoice + +endif diff --git a/package/php/php-fpm.conf b/package/php/php-fpm.conf new file mode 100644 index 0000000000..b75a58fefc --- /dev/null +++ b/package/php/php-fpm.conf @@ -0,0 +1,14 @@ +[www] +# Only start children when there are requests to be processed +pm = ondemand +# Terminate them again after there haven't been any for 2 minutes +pm.process_idle_timeout = 120s +# Maximum number of children processing PHP requests concurrently +pm.max_children = 5 + +listen = /var/run/php-fpm.sock +listen.owner = www-data +listen.group = www-data +user = www-data +group = www-data + diff --git a/package/php/php.hash b/package/php/php.hash new file mode 100644 index 0000000000..f97baea7bf --- /dev/null +++ b/package/php/php.hash @@ -0,0 +1,2 @@ +# From http://php.net/downloads.php +sha256 c96980d7de1d66c821a4ee5809df0076f925b2fe0b8c362d234d92f2f0a178e2 php-5.6.22.tar.xz diff --git a/package/php/php.mk b/package/php/php.mk new file mode 100644 index 0000000000..90633eff6a --- /dev/null +++ b/package/php/php.mk @@ -0,0 +1,337 @@ +################################################################################ +# +# php +# +################################################################################ + +PHP_VERSION = 5.6.22 +PHP_SITE = http://www.php.net/distributions +PHP_SOURCE = php-$(PHP_VERSION).tar.xz +PHP_INSTALL_STAGING = YES +PHP_INSTALL_STAGING_OPTS = INSTALL_ROOT=$(STAGING_DIR) install +PHP_INSTALL_TARGET_OPTS = INSTALL_ROOT=$(TARGET_DIR) install +PHP_DEPENDENCIES = host-pkgconf +PHP_LICENSE = PHP +PHP_LICENSE_FILES = LICENSE +PHP_CONF_OPTS = \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-all \ + --without-pear \ + --with-config-file-path=/etc \ + --disable-rpath +PHP_CONF_ENV = \ + ac_cv_func_strcasestr=yes \ + EXTRA_LIBS="$(PHP_EXTRA_LIBS)" + +ifeq ($(BR2_STATIC_LIBS),y) +PHP_CONF_ENV += LIBS="$(PHP_STATIC_LIBS)" +endif + +ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_HAS_THREADS),yy) +PHP_STATIC_LIBS += -lpthread +endif + +ifeq ($(BR2_TARGET_LOCALTIME),) +PHP_LOCALTIME = UTC +else +PHP_LOCALTIME = $(BR2_TARGET_LOCALTIME) +endif + +# PHP can't be AUTORECONFed the standard way unfortunately +PHP_DEPENDENCIES += host-autoconf host-automake host-libtool +define PHP_BUILDCONF + cd $(@D) ; $(TARGET_MAKE_ENV) ./buildconf --force +endef +PHP_PRE_CONFIGURE_HOOKS += PHP_BUILDCONF + +ifeq ($(BR2_ENDIAN),"BIG") +PHP_CONF_ENV += ac_cv_c_bigendian_php=yes +else +PHP_CONF_ENV += ac_cv_c_bigendian_php=no +endif +PHP_CONFIG_SCRIPTS = php-config + +PHP_CFLAGS = $(TARGET_CFLAGS) + +# The OPcache extension isn't cross-compile friendly +# Throw some defines here to avoid patching heavily +ifeq ($(BR2_PACKAGE_PHP_EXT_OPCACHE),y) +PHP_CONF_OPTS += --enable-opcache +PHP_CONF_ENV += ac_cv_func_mprotect=yes +PHP_CFLAGS += \ + -DHAVE_SHM_IPC \ + -DHAVE_SHM_MMAP_ANON \ + -DHAVE_SHM_MMAP_ZERO \ + -DHAVE_SHM_MMAP_POSIX \ + -DHAVE_SHM_MMAP_FILE +endif + +# We need to force dl "detection" +ifeq ($(BR2_STATIC_LIBS),) +PHP_CONF_ENV += ac_cv_func_dlopen=yes ac_cv_lib_dl_dlopen=yes +PHP_EXTRA_LIBS += -ldl +else +PHP_CONF_ENV += ac_cv_func_dlopen=no ac_cv_lib_dl_dlopen=no +endif + +PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_CLI),,--disable-cli) +PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_CGI),,--disable-cgi) +PHP_CONF_OPTS += $(if $(BR2_PACKAGE_PHP_FPM),--enable-fpm,--disable-fpm) + +### Extensions +PHP_CONF_OPTS += \ + $(if $(BR2_PACKAGE_PHP_EXT_SOCKETS),--enable-sockets) \ + $(if $(BR2_PACKAGE_PHP_EXT_POSIX),--enable-posix) \ + $(if $(BR2_PACKAGE_PHP_EXT_SESSION),--enable-session) \ + $(if $(BR2_PACKAGE_PHP_EXT_HASH),--enable-hash) \ + $(if $(BR2_PACKAGE_PHP_EXT_DOM),--enable-dom) \ + $(if $(BR2_PACKAGE_PHP_EXT_SIMPLEXML),--enable-simplexml) \ + $(if $(BR2_PACKAGE_PHP_EXT_SOAP),--enable-soap) \ + $(if $(BR2_PACKAGE_PHP_EXT_XML),--enable-xml) \ + $(if $(BR2_PACKAGE_PHP_EXT_XMLREADER),--enable-xmlreader) \ + $(if $(BR2_PACKAGE_PHP_EXT_XMLWRITER),--enable-xmlwriter) \ + $(if $(BR2_PACKAGE_PHP_EXT_EXIF),--enable-exif) \ + $(if $(BR2_PACKAGE_PHP_EXT_FTP),--enable-ftp) \ + $(if $(BR2_PACKAGE_PHP_EXT_JSON),--enable-json) \ + $(if $(BR2_PACKAGE_PHP_EXT_TOKENIZER),--enable-tokenizer) \ + $(if $(BR2_PACKAGE_PHP_EXT_PCNTL),--enable-pcntl) \ + $(if $(BR2_PACKAGE_PHP_EXT_SHMOP),--enable-shmop) \ + $(if $(BR2_PACKAGE_PHP_EXT_SYSVMSG),--enable-sysvmsg) \ + $(if $(BR2_PACKAGE_PHP_EXT_SYSVSEM),--enable-sysvsem) \ + $(if $(BR2_PACKAGE_PHP_EXT_SYSVSHM),--enable-sysvshm) \ + $(if $(BR2_PACKAGE_PHP_EXT_ZIP),--enable-zip) \ + $(if $(BR2_PACKAGE_PHP_EXT_CTYPE),--enable-ctype) \ + $(if $(BR2_PACKAGE_PHP_EXT_FILTER),--enable-filter) \ + $(if $(BR2_PACKAGE_PHP_EXT_CALENDAR),--enable-calendar) \ + $(if $(BR2_PACKAGE_PHP_EXT_FILEINFO),--enable-fileinfo) \ + $(if $(BR2_PACKAGE_PHP_EXT_BCMATH),--enable-bcmath) \ + $(if $(BR2_PACKAGE_PHP_EXT_MBSTRING),--enable-mbstring) \ + $(if $(BR2_PACKAGE_PHP_EXT_PHAR),--enable-phar) + +ifeq ($(BR2_PACKAGE_PHP_EXT_MCRYPT),y) +PHP_CONF_OPTS += --with-mcrypt=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += libmcrypt +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_OPENSSL),y) +PHP_CONF_OPTS += --with-openssl=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += openssl +# openssl needs zlib, but the configure script forgets to link against +# it causing detection failures with static linking +PHP_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs openssl` +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_LIBXML2),y) +PHP_CONF_ENV += php_cv_libxml_build_works=yes +PHP_CONF_OPTS += --enable-libxml --with-libxml-dir=${STAGING_DIR}/usr +PHP_DEPENDENCIES += libxml2 +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_WDDX),y) +PHP_CONF_OPTS += --enable-wddx --with-libexpat-dir=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += expat +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_XMLRPC),y) +PHP_CONF_OPTS += \ + --with-xmlrpc \ + $(if $(BR2_PACKAGE_LIBICONV),--with-iconv-dir=$(STAGING_DIR)/usr) +PHP_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv) +endif + +ifneq ($(BR2_PACKAGE_PHP_EXT_ZLIB)$(BR2_PACKAGE_PHP_EXT_ZIP),) +PHP_CONF_OPTS += --with-zlib=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_GETTEXT),y) +PHP_CONF_OPTS += --with-gettext=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += $(if $(BR2_NEEDS_GETTEXT),gettext) +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_ICONV),y) +ifeq ($(BR2_PACKAGE_LIBICONV),y) +PHP_CONF_OPTS += --with-iconv=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += libiconv +else +PHP_CONF_OPTS += --with-iconv +endif +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_INTL),y) +PHP_CONF_OPTS += --enable-intl --with-icu-dir=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += icu +# The intl module is implemented in C++, but PHP fails to use +# g++ as the compiler for the final link. As a workaround, +# tell it to link libstdc++. +PHP_EXTRA_LIBS += -lstdc++ +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_GMP),y) +PHP_CONF_OPTS += --with-gmp=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += gmp +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_READLINE),y) +PHP_CONF_OPTS += --with-readline=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += readline +endif + +### Native MySQL extensions +ifeq ($(BR2_PACKAGE_PHP_EXT_MYSQL),y) +PHP_CONF_OPTS += --with-mysql=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += mysql +endif +ifeq ($(BR2_PACKAGE_PHP_EXT_MYSQLI),y) +PHP_CONF_OPTS += --with-mysqli=$(STAGING_DIR)/usr/bin/mysql_config +PHP_DEPENDENCIES += mysql +endif +ifeq ($(BR2_PACKAGE_PHP_EXT_SQLITE),y) +PHP_CONF_OPTS += --with-sqlite3=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += sqlite +PHP_STATIC_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs sqlite3` +endif + +### PDO +ifeq ($(BR2_PACKAGE_PHP_EXT_PDO),y) +PHP_CONF_OPTS += --enable-pdo +ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_SQLITE),y) +PHP_CONF_OPTS += --with-pdo-sqlite=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += sqlite +PHP_CFLAGS += -DSQLITE_OMIT_LOAD_EXTENSION +endif +ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_MYSQL),y) +PHP_CONF_OPTS += --with-pdo-mysql=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += mysql +endif +ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_POSTGRESQL),y) +PHP_CONF_OPTS += --with-pdo-pgsql=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += postgresql +endif +ifeq ($(BR2_PACKAGE_PHP_EXT_PDO_UNIXODBC),y) +PHP_CONF_OPTS += --with-pdo-odbc=unixODBC,$(STAGING_DIR)/usr +PHP_DEPENDENCIES += unixodbc +endif +endif + +define PHP_DISABLE_PCRE_JIT + $(SED) '/^#define SUPPORT_JIT/d' $(@D)/ext/pcre/pcrelib/config.h +endef + +### Use external PCRE if it's available +ifeq ($(BR2_PACKAGE_PCRE),y) +PHP_CONF_OPTS += --with-pcre-regex=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += pcre +else +# The bundled pcre library is not configurable through ./configure options, +# and by default is configured to be thread-safe, so it wants pthreads. So +# we must explicitly tell it when we don't have threads. +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +PHP_CFLAGS += -DSLJIT_SINGLE_THREADED=1 +endif +# check ext/pcre/pcrelib/sljit/sljitConfigInternal.h for supported archs +ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_arm)$(BR2_armeb)$(BR2_aarch64)$(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el)$(BR2_powerpc)$(BR2_sparc),) +PHP_POST_CONFIGURE_HOOKS += PHP_DISABLE_PCRE_JIT +endif +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_CURL),y) +PHP_CONF_OPTS += --with-curl=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += libcurl +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_XSL),y) +PHP_CONF_OPTS += --with-xsl=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += libxslt +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_BZIP2),y) +PHP_CONF_OPTS += --with-bz2=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += bzip2 +endif + +### DBA +ifeq ($(BR2_PACKAGE_PHP_EXT_DBA),y) +PHP_CONF_OPTS += --enable-dba +ifneq ($(BR2_PACKAGE_PHP_EXT_DBA_CDB),y) +PHP_CONF_OPTS += --without-cdb +endif +ifneq ($(BR2_PACKAGE_PHP_EXT_DBA_FLAT),y) +PHP_CONF_OPTS += --without-flatfile +endif +ifneq ($(BR2_PACKAGE_PHP_EXT_DBA_INI),y) +PHP_CONF_OPTS += --without-inifile +endif +ifeq ($(BR2_PACKAGE_PHP_EXT_DBA_DB4),y) +PHP_CONF_OPTS += --with-db4=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += berkeleydb +endif +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_SNMP),y) +PHP_CONF_OPTS += --with-snmp=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += netsnmp +endif + +ifeq ($(BR2_PACKAGE_PHP_EXT_GD),y) +PHP_CONF_OPTS += \ + --with-gd \ + --with-jpeg-dir=$(STAGING_DIR)/usr \ + --with-png-dir=$(STAGING_DIR)/usr \ + --with-zlib-dir=$(STAGING_DIR)/usr \ + --with-freetype-dir=$(STAGING_DIR)/usr +PHP_DEPENDENCIES += jpeg libpng freetype +endif + +ifeq ($(BR2_PACKAGE_PHP_FPM),y) +define PHP_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 $(@D)/sapi/fpm/init.d.php-fpm \ + $(TARGET_DIR)/etc/init.d/S49php-fpm +endef + +define PHP_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 $(@D)/sapi/fpm/php-fpm.service \ + $(TARGET_DIR)/usr/lib/systemd/system/php-fpm.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/php-fpm.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/php-fpm.service +endef + +define PHP_INSTALL_FPM_CONF + $(INSTALL) -D -m 0644 package/php/php-fpm.conf \ + $(TARGET_DIR)/etc/php-fpm.conf + rm -f $(TARGET_DIR)/etc/php-fpm.conf.default + # remove unused sample status page /usr/php/php/fpm/status.html + rm -rf $(TARGET_DIR)/usr/php +endef + +PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FPM_CONF +endif + +define PHP_EXTENSIONS_FIXUP + $(SED) "/prefix/ s:/usr:$(STAGING_DIR)/usr:" \ + $(STAGING_DIR)/usr/bin/phpize + $(SED) "/extension_dir/ s:/usr:$(TARGET_DIR)/usr:" \ + $(STAGING_DIR)/usr/bin/php-config +endef + +PHP_POST_INSTALL_TARGET_HOOKS += PHP_EXTENSIONS_FIXUP + +define PHP_INSTALL_FIXUP + rm -rf $(TARGET_DIR)/usr/lib/php/build + rm -f $(TARGET_DIR)/usr/bin/phpize + $(INSTALL) -D -m 0755 $(PHP_DIR)/php.ini-production \ + $(TARGET_DIR)/etc/php.ini + $(SED) 's%;date.timezone =.*%date.timezone = $(PHP_LOCALTIME)%' \ + $(TARGET_DIR)/etc/php.ini + $(if $(BR2_PACKAGE_PHP_EXT_OPCACHE), + $(SED) '/;extension=php_xsl.dll/azend_extension=opcache.so' \ + $(TARGET_DIR)/etc/php.ini) +endef + +PHP_POST_INSTALL_TARGET_HOOKS += PHP_INSTALL_FIXUP + +PHP_CONF_ENV += CFLAGS="$(PHP_CFLAGS)" + +$(eval $(autotools-package)) diff --git a/package/picocom/Config.in b/package/picocom/Config.in new file mode 100644 index 0000000000..671d01fb5a --- /dev/null +++ b/package/picocom/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PICOCOM + bool "picocom" + depends on BR2_USE_MMU # fork() + help + picocom is a minimal dumb-terminal emulation program. It is, in + principle, very much like minicom, only it's pico instead of mini! + + https://github.com/npat-efault/picocom/ diff --git a/package/picocom/picocom.hash b/package/picocom/picocom.hash new file mode 100644 index 0000000000..674b6209d3 --- /dev/null +++ b/package/picocom/picocom.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 6b152fc5f816eaef6b86336a4cec7cf1496b7c712061e5aea5a36f143a0b09ed picocom-2.1.tar.gz diff --git a/package/picocom/picocom.mk b/package/picocom/picocom.mk new file mode 100644 index 0000000000..59a749fba1 --- /dev/null +++ b/package/picocom/picocom.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# picocom +# +################################################################################ + +PICOCOM_VERSION = 2.1 +PICOCOM_SITE = $(call github,npat-efault,picocom,$(PICOCOM_VERSION)) +PICOCOM_LICENSE = GPLv2+ +PICOCOM_LICENSE_FILES = LICENSE.txt + +define PICOCOM_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define PICOCOM_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/picocom $(TARGET_DIR)/usr/bin/picocom +endef + +$(eval $(generic-package)) diff --git a/package/pifmrds/0001-Makefile-cross-compile-friendly.patch b/package/pifmrds/0001-Makefile-cross-compile-friendly.patch new file mode 100644 index 0000000000..414d97c115 --- /dev/null +++ b/package/pifmrds/0001-Makefile-cross-compile-friendly.patch @@ -0,0 +1,37 @@ +Makefile: make it cross-compile (and Buildroot) friendly. + +The current Makefile makes heavy assumptions that it is doing native +compilation on the RPi, as it checks that `uname -m` is an ARM machine. + +This is wrong in the cross-compilation case. + +Remove the conditional altogether, and do not override the CFLAGS +as passed in the environment (Buildroot passes proper CFLAGS). + +[intial patch by: Eric Limpens ] +Signed-off-by: "Yann E. MORIN" + +diff -durN pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1.orig/src/Makefile pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile +--- pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1.orig/src/Makefile 2014-05-04 18:21:40.000000000 +0200 ++++ pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile 2014-06-21 16:38:31.971804343 +0200 +@@ -1,20 +1,8 @@ + CC = gcc +-STD_CFLAGS = -Wall -std=gnu99 -c -g -O3 + +-# Enable ARM-specific options only on ARM, and compilation of the app only on ARM +-UNAME := $(shell uname -m) +- +-ifeq ($(UNAME), armv6l) +- CFLAGS = $(STD_CFLAGS) -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math +- + app: rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o + $(CC) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lm -lsndfile + +-else +- CFLAGS = $(STD_CFLAGS) +-endif +- +- + rds_wav: rds.o waveforms.o rds_wav.o fm_mpx.o + $(CC) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lm -lsndfile + diff --git a/package/pifmrds/0002-Makefile-use-LDFLAGS.patch b/package/pifmrds/0002-Makefile-use-LDFLAGS.patch new file mode 100644 index 0000000000..54c142701b --- /dev/null +++ b/package/pifmrds/0002-Makefile-use-LDFLAGS.patch @@ -0,0 +1,20 @@ +Makefile: use LDFLAGS when linking + +Signed-off-by: "Yann E. MORIN" + +diff -durN pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1.orig/src/Makefile pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile +--- pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1.orig/src/Makefile 2014-06-21 16:46:49.101118754 +0200 ++++ pifmrds-c67306ea9b8d827f45e0d90279d367e97119bcb1/src/Makefile 2014-06-21 16:47:47.801745683 +0200 +@@ -1,10 +1,10 @@ + CC = gcc + + app: rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o +- $(CC) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lm -lsndfile ++ $(CC) $(LDFLAGS) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lm -lsndfile + + rds_wav: rds.o waveforms.o rds_wav.o fm_mpx.o +- $(CC) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lm -lsndfile ++ $(CC) $(LDFLAGS) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lm -lsndfile + + rds.o: rds.c waveforms.h + $(CC) $(CFLAGS) rds.c diff --git a/package/pifmrds/0003-Makefile-fix-static-link.patch b/package/pifmrds/0003-Makefile-fix-static-link.patch new file mode 100644 index 0000000000..ecd7c4fc4c --- /dev/null +++ b/package/pifmrds/0003-Makefile-fix-static-link.patch @@ -0,0 +1,23 @@ +Makefile: Fix static linking + +Since libsndfile uses funtions from libm, the -lm should be specified +after libsndfile for static linking. + +Signed-off-by: "Eric Limpens" + +diff -purN pifmrds-0bf57f9ce0d954365a38d8af8e7be6f28521c3f2.orig/src/Makefile pifmrds-0bf57f9ce0d954365a38d8af8e7be6f28521c3f2/src/Makefile +--- pifmrds-0bf57f9ce0d954365a38d8af8e7be6f28521c3f2.orig/src/Makefile 2016-02-26 08:06:43.102962592 +0100 ++++ pifmrds-0bf57f9ce0d954365a38d8af8e7be6f28521c3f2/src/Makefile 2016-02-26 08:27:11.069148203 +0100 +@@ -1,10 +1,10 @@ + CC = gcc + + app: rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o +- $(CC) $(LDFLAGS) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lm -lsndfile ++ $(CC) $(LDFLAGS) -o pi_fm_rds rds.o waveforms.o pi_fm_rds.o fm_mpx.o control_pipe.o -lsndfile -lm + + rds_wav: rds.o waveforms.o rds_wav.o fm_mpx.o +- $(CC) $(LDFLAGS) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lm -lsndfile ++ $(CC) $(LDFLAGS) -o rds_wav rds_wav.o rds.o waveforms.o fm_mpx.o -lsndfile -lm + + rds.o: rds.c waveforms.h + $(CC) $(CFLAGS) rds.c diff --git a/package/pifmrds/Config.in b/package/pifmrds/Config.in new file mode 100644 index 0000000000..6d492683d5 --- /dev/null +++ b/package/pifmrds/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PIFMRDS + bool "pifmrds" + depends on BR2_arm + select BR2_PACKAGE_LIBSNDFILE + help + pifmrds, FM-RDS transmitter using the Raspberry Pi's PWM + + https://github.com/ChristopheJacquet/PiFmRds diff --git a/package/pifmrds/pifmrds.mk b/package/pifmrds/pifmrds.mk new file mode 100644 index 0000000000..51797152fc --- /dev/null +++ b/package/pifmrds/pifmrds.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# pifmrds +# +################################################################################ + +PIFMRDS_VERSION = 0bf57f9ce0d954365a38d8af8e7be6f28521c3f2 +PIFMRDS_SITE = $(call github,ChristopheJacquet,PiFmRds,$(PIFMRDS_VERSION)) +PIFMRDS_DEPENDENCIES = libsndfile +PIFMRDS_LICENSE = GPLv3+ +PIFMRDS_LICENSE_FILES = LICENSE + +define PIFMRDS_BUILD_CMDS + $(MAKE) -C $(@D)/src CC="$(TARGET_CC)" LDFLAGS="$(TARGET_LDFLAGS)" \ + CFLAGS="$(TARGET_CFLAGS) -std=gnu99 -ffast-math -c" \ + app rds_wav +endef + +define PIFMRDS_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/src/pi_fm_rds $(TARGET_DIR)/usr/bin/pi_fm_rds + $(INSTALL) -D -m 0755 $(@D)/src/rds_wav $(TARGET_DIR)/usr/bin/rds_wav +endef + +$(eval $(generic-package)) diff --git a/package/pinentry/0001-remove-hard-wired-ncursesw-include-path.patch b/package/pinentry/0001-remove-hard-wired-ncursesw-include-path.patch new file mode 100644 index 0000000000..c9903c4573 --- /dev/null +++ b/package/pinentry/0001-remove-hard-wired-ncursesw-include-path.patch @@ -0,0 +1,32 @@ +From cf84bf3ef505059d42184b22cf38f89336bec43d Mon Sep 17 00:00:00 2001 +From: Gergely Imreh +Date: Mon, 22 Jun 2015 07:51:17 +0000 +Subject: [PATCH 1/1] remove hard-wired ncursesw include path + +Don't assume that the ncursesw headers are in ../usr/include/ncursesw/.., +and pkg-config finds the correct include path anyways. + +Signed-off-by: Gergely Imreh +--- + pinentry/pinentry-curses.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/pinentry/pinentry-curses.c b/pinentry/pinentry-curses.c +index 235435a..bdcd0f4 100644 +--- a/pinentry/pinentry-curses.c ++++ b/pinentry/pinentry-curses.c +@@ -22,11 +22,7 @@ + #include + #endif + #include +-#ifdef HAVE_NCURSESW +-#include +-#else + #include +-#endif + #include + #include + #include +-- +1.9.1 + diff --git a/package/pinentry/Config.in b/package/pinentry/Config.in new file mode 100644 index 0000000000..682af9f3f2 --- /dev/null +++ b/package/pinentry/Config.in @@ -0,0 +1,56 @@ +menuconfig BR2_PACKAGE_PINENTRY + bool "pinentry" + # At least one backend is needed to avoid build breakage + select BR2_PACKAGE_PINENTRY_NCURSES if !BR2_PACKAGE_PINENTRY_GTK2 && !BR2_PACKAGE_PINENTRY_QT4 + help + A collection of simple PIN or pass-phrase entry dialogs + + https://www.gnupg.org/related_software/pinentry/ + +if BR2_PACKAGE_PINENTRY + +config BR2_PACKAGE_PINENTRY_NCURSES + bool "pinentry-ncurses" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + The pinentry-ncurses tool + +config BR2_PACKAGE_PINENTRY_GTK2 + bool "pinentry-gtk2" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk2 -> pango -> harfbuzz + select BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + The pinentry-gtk2 tool + +comment "pinentry-gtk2 needs X and a toolchain w/ wchar, threads, C++" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_PACKAGE_XORG7 || !BR2_USE_WCHAR || \ + !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_PINENTRY_QT4 + bool "pinentry-qt4" + depends on BR2_USE_MMU # fork + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module + select BR2_PACKAGE_QT + select BR2_PACKAGE_QT_GUI_MODULE + help + The pinentry-qt4 tool + +comment "pinentry-qt4 support needs a toolchain not affected by Binutils bug 19405" + depends on BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 + +comment "pinentry-qt4 needs a toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +endif diff --git a/package/pinentry/pinentry.hash b/package/pinentry/pinentry.hash new file mode 100644 index 0000000000..d544efd7f0 --- /dev/null +++ b/package/pinentry/pinentry.hash @@ -0,0 +1,2 @@ +# From https://www.gnupg.org/download/integrity_check.html +sha1 0c47f0ddea4631bcba01ebbeca8bffe0bf43e440 pinentry-0.9.4.tar.bz2 diff --git a/package/pinentry/pinentry.mk b/package/pinentry/pinentry.mk new file mode 100644 index 0000000000..09a7705c27 --- /dev/null +++ b/package/pinentry/pinentry.mk @@ -0,0 +1,58 @@ +################################################################################ +# +# pinentry +# +################################################################################ + +PINENTRY_VERSION = 0.9.4 +PINENTRY_SOURCE = pinentry-$(PINENTRY_VERSION).tar.bz2 +PINENTRY_SITE = ftp://ftp.gnupg.org/gcrypt/pinentry +PINENTRY_LICENSE = GPLv2+ +PINENTRY_LICENSE_FILES = COPYING +PINENTRY_DEPENDENCIES = \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) \ + host-pkgconf +PINENTRY_CONF_OPTS += --without-libcap # requires PAM + +# build with X if available +ifeq ($(BR2_PACKAGE_XORG7),y) +PINENTRY_CONF_OPTS += --with-x +else +PINENTRY_CONF_OPTS += --without-x +endif + +ifeq ($(BR2_PACKAGE_LIBSECRET),y) +PINENTRY_CONF_OPTS += --enable-libsecret +PINENTRY_DEPENDENCIES += libsecret +else +PINENTRY_CONF_OPTS += --disable-libsecret +endif + +# pinentry-ncurses backend +ifeq ($(BR2_PACKAGE_PINENTRY_NCURSES),y) +PINENTRY_CONF_OPTS += --enable-ncurses --with-ncurses-include-dir=none +PINENTRY_DEPENDENCIES += ncurses +else +PINENTRY_CONF_OPTS += --disable-ncurses +endif + +# pinentry-gtk2 backend +ifeq ($(BR2_PACKAGE_PINENTRY_GTK2),y) +PINENTRY_CONF_OPTS += --enable-pinentry-gtk2 +PINENTRY_DEPENDENCIES += libgtk2 +else +PINENTRY_CONF_OPTS += --disable-pinentry-gtk2 +endif + +# pinentry-qt4 backend +ifeq ($(BR2_PACKAGE_PINENTRY_QT4),y) +# -pthread needs to be passed for certain toolchains +# http://autobuild.buildroot.net/results/6be/6be109ccedec603a67cebdb31b55865dcce0e128/ +PINENTRY_CONF_OPTS += LIBS=-pthread MOC=$(HOST_DIR)/usr/bin/moc +PINENTRY_CONF_OPTS += --enable-pinentry-qt4 +PINENTRY_DEPENDENCIES += qt +else +PINENTRY_CONF_OPTS += --disable-pinentry-qt4 +endif + +$(eval $(autotools-package)) diff --git a/package/pixman/0001-Disable-tests.patch b/package/pixman/0001-Disable-tests.patch new file mode 100644 index 0000000000..dfadd69a67 --- /dev/null +++ b/package/pixman/0001-Disable-tests.patch @@ -0,0 +1,29 @@ +From 9b8132738c364fc3c886e81e7d383aaff80dc867 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sat, 5 Dec 2015 12:00:53 +0100 +Subject: [PATCH] Disable tests + +Tests are causing build failures on some architectures that are missing +a proper fenv.h, so just disable them. + +Signed-off-by: "Yann E. MORIN" + +--- +Status: Buildroot specific, not suitable for upstream in this state. +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 5137c9e..eae79fd 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,4 +1,4 @@ +-SUBDIRS = pixman demos test ++SUBDIRS = pixman demos + + pkgconfigdir=$(libdir)/pkgconfig + pkgconfig_DATA=pixman-1.pc +-- +1.9.1 + diff --git a/package/pixman/0002-pixman-private-include-float.h-only-in-C-code.patch b/package/pixman/0002-pixman-private-include-float.h-only-in-C-code.patch new file mode 100644 index 0000000000..455cebb265 --- /dev/null +++ b/package/pixman/0002-pixman-private-include-float.h-only-in-C-code.patch @@ -0,0 +1,46 @@ +From 2a5b33fe5cb921993573392afac19185e224b49a Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 17 Jan 2016 14:14:28 +0100 +Subject: [PATCH] pixman-private: include only in C code + + is included unconditionally by pixman-private.h, which in +turn gets included by assembler files. Unfortunately, with certain C +libraries (like the musl C library), cannot be included in +assembler files: + + CCLD libpixman-arm-simd.la +/home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h: Assembler messages: +/home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h:8: Error: bad instruction `int __flt_rounds(void)' +/home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h: Assembler messages: +/home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h:8: Error: bad instruction `int __flt_rounds(void)' + +It turns out however that is not needed by assembly files, +so we move its inclusion within the #ifndef __ASSEMBLER__ condition, +which solves the problem. + +Signed-off-by: Thomas Petazzoni +--- + pixman/pixman-private.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h +index 73108a0..73a5414 100644 +--- a/pixman/pixman-private.h ++++ b/pixman/pixman-private.h +@@ -1,5 +1,3 @@ +-#include +- + #ifndef PIXMAN_PRIVATE_H + #define PIXMAN_PRIVATE_H + +@@ -30,6 +28,7 @@ + #include + #include + #include ++#include + + #include "pixman-compiler.h" + +-- +2.6.4 + diff --git a/package/pixman/Config.in b/package/pixman/Config.in new file mode 100644 index 0000000000..aa2a68f625 --- /dev/null +++ b/package/pixman/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PIXMAN + bool "pixman" + help + Cairo pixel manager + + http://cairographics.org/releases/ diff --git a/package/pixman/pixman.hash b/package/pixman/pixman.hash new file mode 100644 index 0000000000..d5b8934e46 --- /dev/null +++ b/package/pixman/pixman.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2016-January/002672.html +sha1 367698744e74d6d4f363041482965b9ea7fbe4a5 pixman-0.34.0.tar.bz2 diff --git a/package/pixman/pixman.mk b/package/pixman/pixman.mk new file mode 100644 index 0000000000..ae8d62c589 --- /dev/null +++ b/package/pixman/pixman.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# pixman +# +################################################################################ + +PIXMAN_VERSION = 0.34.0 +PIXMAN_SOURCE = pixman-$(PIXMAN_VERSION).tar.bz2 +PIXMAN_SITE = http://xorg.freedesktop.org/releases/individual/lib +PIXMAN_LICENSE = MIT +PIXMAN_LICENSE_FILES = COPYING + +PIXMAN_INSTALL_STAGING = YES +PIXMAN_DEPENDENCIES = host-pkgconf + +# For 0001-Disable-tests.patch +PIXMAN_AUTORECONF = YES + +# don't build gtk based demos +PIXMAN_CONF_OPTS = --disable-gtk + +# disable iwmmxt support for CPU's that don't have +# this feature +ifneq ($(BR2_iwmmxt),y) +PIXMAN_CONF_OPTS += --disable-arm-iwmmxt +endif + +# toolchain gets confused about TLS access through GOT (PIC), so disable TLS +# movhi r4, %got_hiadj(%tls_ldo(fast_path_cache)) +# {standard input}:172: Error: bad expression +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII),y) +PIXMAN_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -DPIXMAN_NO_TLS" +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk new file mode 100644 index 0000000000..502eeea6aa --- /dev/null +++ b/package/pkg-autotools.mk @@ -0,0 +1,324 @@ +################################################################################ +# Autotools package infrastructure +# +# This file implements an infrastructure that eases development of +# package .mk files for autotools packages. It should be used for all +# packages that use the autotools as their build system. +# +# See the Buildroot documentation for details on the usage of this +# infrastructure +# +# In terms of implementation, this autotools infrastructure requires +# the .mk file to only specify metadata information about the +# package: name, version, download URL, etc. +# +# We still allow the package .mk file to override what the different +# steps are doing, if needed. For example, if _BUILD_CMDS is +# already defined, it is used as the list of commands to perform to +# build the package, instead of the default autotools behaviour. The +# package can also define some post operation hooks. +# +################################################################################ + + +# +# Utility function to upgrade config.sub and config.guess files +# +# argument 1 : directory into which config.guess and config.sub need +# to be updated. Note that config.sub and config.guess are searched +# recursively in this directory. +# +define CONFIG_UPDATE + for file in config.guess config.sub; do \ + for i in $$(find $(1) -name $$file); do \ + cp support/gnuconfig/$$file $$i; \ + done; \ + done +endef + +# This function generates the ac_cv_file_ value for a given +# filename. This is needed to convince configure script doing +# AC_CHECK_FILE() tests that the file actually exists, since such +# tests cannot be done in a cross-compilation context. This function +# takes as argument the path of the file. An example usage is: +# +# FOOBAR_CONF_ENV = \ +# $(call AUTOCONF_AC_CHECK_FILE_VAL,/dev/random)=yes +AUTOCONF_AC_CHECK_FILE_VAL = ac_cv_file_$(subst -,_,$(subst /,_,$(subst .,_,$(1)))) + +# +# Hook to update config.sub and config.guess if needed +# +define UPDATE_CONFIG_HOOK + @$(call MESSAGE,"Updating config.sub and config.guess") + $(call CONFIG_UPDATE,$(@D)) +endef + +# +# Hook to patch libtool to make it work properly for cross-compilation +# +define LIBTOOL_PATCH_HOOK + @$(call MESSAGE,"Patching libtool") + $(Q)for i in `find $($(PKG)_SRCDIR) -name ltmain.sh`; do \ + ltmain_version=`sed -n '/^[ \t]*VERSION=/{s/^[ \t]*VERSION=//;p;q;}' $$i | \ + sed -e 's/\([0-9]*\.[0-9]*\).*/\1/' -e 's/\"//'`; \ + ltmain_patchlevel=`sed -n '/^[ \t]*VERSION=/{s/^[ \t]*VERSION=//;p;q;}' $$i | \ + sed -e 's/\([0-9]*\.[0-9]*\.*\)\([0-9]*\).*/\2/' -e 's/\"//'`; \ + if test $${ltmain_version} = '1.5'; then \ + $(APPLY_PATCHES) $${i%/*} support/libtool buildroot-libtool-v1.5.patch; \ + elif test $${ltmain_version} = "2.2"; then\ + $(APPLY_PATCHES) $${i%/*} support/libtool buildroot-libtool-v2.2.patch; \ + elif test $${ltmain_version} = "2.4"; then\ + if test $${ltmain_patchlevel:-0} -gt 2; then\ + $(APPLY_PATCHES) $${i%/*} support/libtool buildroot-libtool-v2.4.4.patch; \ + else \ + $(APPLY_PATCHES) $${i%/*} support/libtool buildroot-libtool-v2.4.patch; \ + fi \ + fi \ + done +endef + +# +# Hook to gettextize the package if needed +# +define GETTEXTIZE_HOOK + @$(call MESSAGE,"Gettextizing") + $(Q)cd $($(PKG)_SRCDIR) && $(GETTEXTIZE) $($(PKG)_GETTEXTIZE_OPTS) +endef + +# +# Hook to autoreconf the package if needed +# +define AUTORECONF_HOOK + @$(call MESSAGE,"Autoreconfiguring") + $(Q)cd $($(PKG)_SRCDIR) && $($(PKG)_AUTORECONF_ENV) $(AUTORECONF) $($(PKG)_AUTORECONF_OPTS) +endef + +################################################################################ +# inner-autotools-package -- defines how the configuration, compilation and +# installation of an autotools package should be done, implements a +# few hooks to tune the build process for autotools specifities and +# calls the generic package infrastructure to generate the necessary +# make targets +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including a HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the type (target or host) +################################################################################ + +define inner-autotools-package + +ifndef $(2)_LIBTOOL_PATCH + ifdef $(3)_LIBTOOL_PATCH + $(2)_LIBTOOL_PATCH = $$($(3)_LIBTOOL_PATCH) + else + $(2)_LIBTOOL_PATCH ?= YES + endif +endif + +ifndef $(2)_MAKE + ifdef $(3)_MAKE + $(2)_MAKE = $$($(3)_MAKE) + else + $(2)_MAKE ?= $$(MAKE) + endif +endif + +ifndef $(2)_AUTORECONF + ifdef $(3)_AUTORECONF + $(2)_AUTORECONF = $$($(3)_AUTORECONF) + else + $(2)_AUTORECONF ?= NO + endif +endif + +ifndef $(2)_GETTEXTIZE + ifdef $(3)_GETTEXTIZE + $(2)_GETTEXTIZE = $$($(3)_GETTEXTIZE) + else + $(2)_GETTEXTIZE ?= NO + endif +endif + +ifeq ($(4),host) + $(2)_GETTEXTIZE_OPTS ?= $$($(3)_GETTEXTIZE_OPTS) +endif + +ifeq ($(4),host) + $(2)_AUTORECONF_OPTS ?= $$($(3)_AUTORECONF_OPTS) +endif + +$(2)_CONF_ENV ?= +$(2)_CONF_OPTS ?= +$(2)_MAKE_ENV ?= +$(2)_MAKE_OPTS ?= +$(2)_INSTALL_OPTS ?= install +$(2)_INSTALL_STAGING_OPTS ?= DESTDIR=$$(STAGING_DIR) install +$(2)_INSTALL_TARGET_OPTS ?= DESTDIR=$$(TARGET_DIR) install + +# This must be repeated from inner-generic-package, otherwise we get an empty +# _DEPENDENCIES if _AUTORECONF is YES. Also filter the result of _AUTORECONF +# and _GETTEXTIZE away from the non-host rule +ifeq ($(4),host) +$(2)_DEPENDENCIES ?= $$(filter-out host-automake host-autoconf host-libtool \ + host-gettext host-skeleton host-toolchain $(1),\ + $$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES)))) +endif + +# +# Configure step. Only define it if not already defined by the package +# .mk file. And take care of the differences between host and target +# packages. +# +ifndef $(2)_CONFIGURE_CMDS +ifeq ($(4),target) + +# Configure package for target +define $(2)_CONFIGURE_CMDS + (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache && \ + $$(TARGET_CONFIGURE_OPTS) \ + $$(TARGET_CONFIGURE_ARGS) \ + $$($$(PKG)_CONF_ENV) \ + CONFIG_SITE=/dev/null \ + ./configure \ + --target=$$(GNU_TARGET_NAME) \ + --host=$$(GNU_TARGET_NAME) \ + --build=$$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --program-prefix="" \ + --disable-gtk-doc \ + --disable-gtk-doc-html \ + --disable-doc \ + --disable-docs \ + --disable-documentation \ + --with-xmlto=no \ + --with-fop=no \ + --disable-dependency-tracking \ + --enable-ipv6 \ + $$(DISABLE_NLS) \ + $$(SHARED_STATIC_LIBS_OPTS) \ + $$(QUIET) $$($$(PKG)_CONF_OPTS) \ + ) +endef +else + +# Configure package for host +# disable all kind of documentation generation in the process, +# because it often relies on host tools which may or may not be +# installed. +define $(2)_CONFIGURE_CMDS + (cd $$($$(PKG)_SRCDIR) && rm -rf config.cache; \ + $$(HOST_CONFIGURE_OPTS) \ + CFLAGS="$$(HOST_CFLAGS)" \ + LDFLAGS="$$(HOST_LDFLAGS)" \ + $$($$(PKG)_CONF_ENV) \ + CONFIG_SITE=/dev/null \ + ./configure \ + --prefix="$$(HOST_DIR)/usr" \ + --sysconfdir="$$(HOST_DIR)/etc" \ + --localstatedir="$$(HOST_DIR)/var" \ + --enable-shared --disable-static \ + --disable-gtk-doc \ + --disable-gtk-doc-html \ + --disable-doc \ + --disable-docs \ + --disable-documentation \ + --disable-debug \ + --with-xmlto=no \ + --with-fop=no \ + --disable-dependency-tracking \ + $$(QUIET) $$($$(PKG)_CONF_OPTS) \ + ) +endef +endif +endif + +$(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK + +ifeq ($$($(2)_AUTORECONF),YES) + +# This has to come before autoreconf +ifeq ($$($(2)_GETTEXTIZE),YES) +$(2)_PRE_CONFIGURE_HOOKS += GETTEXTIZE_HOOK +$(2)_DEPENDENCIES += host-gettext +endif +$(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK +# default values are not evaluated yet, so don't rely on this defaulting to YES +ifneq ($$($(2)_LIBTOOL_PATCH),NO) +$(2)_PRE_CONFIGURE_HOOKS += LIBTOOL_PATCH_HOOK +endif +$(2)_DEPENDENCIES += host-automake host-autoconf host-libtool + +else # ! AUTORECONF = YES + +# default values are not evaluated yet, so don't rely on this defaulting to YES +ifneq ($$($(2)_LIBTOOL_PATCH),NO) +$(2)_POST_PATCH_HOOKS += LIBTOOL_PATCH_HOOK +endif + +endif + +# +# Build step. Only define it if not already defined by the package .mk +# file. +# +ifndef $(2)_BUILD_CMDS +ifeq ($(4),target) +define $(2)_BUILD_CMDS + $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) -C $$($$(PKG)_SRCDIR) +endef +else +define $(2)_BUILD_CMDS + $$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) -C $$($$(PKG)_SRCDIR) +endef +endif +endif + +# +# Host installation step. Only define it if not already defined by the +# package .mk file. +# +ifndef $(2)_INSTALL_CMDS +define $(2)_INSTALL_CMDS + $$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_OPTS) -C $$($$(PKG)_SRCDIR) +endef +endif + +# +# Staging installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_STAGING_CMDS +define $(2)_INSTALL_STAGING_CMDS + $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_STAGING_OPTS) -C $$($$(PKG)_SRCDIR) +endef +endif + +# +# Target installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_TARGET_CMDS +define $(2)_INSTALL_TARGET_CMDS + $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_INSTALL_TARGET_OPTS) -C $$($$(PKG)_SRCDIR) +endef +endif + +# Call the generic package infrastructure to generate the necessary +# make targets +$(call inner-generic-package,$(1),$(2),$(3),$(4)) + +endef + +################################################################################ +# autotools-package -- the target generator macro for autotools packages +################################################################################ + +autotools-package = $(call inner-autotools-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target) +host-autotools-package = $(call inner-autotools-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host) diff --git a/package/pkg-cmake.mk b/package/pkg-cmake.mk new file mode 100644 index 0000000000..81dcfcce16 --- /dev/null +++ b/package/pkg-cmake.mk @@ -0,0 +1,251 @@ +################################################################################ +# CMake package infrastructure +# +# This file implements an infrastructure that eases development of +# package .mk files for CMake packages. It should be used for all +# packages that use CMake as their build system. +# +# See the Buildroot documentation for details on the usage of this +# infrastructure +# +# In terms of implementation, this CMake infrastructure requires +# the .mk file to only specify metadata information about the +# package: name, version, download URL, etc. +# +# We still allow the package .mk file to override what the different +# steps are doing, if needed. For example, if _BUILD_CMDS is +# already defined, it is used as the list of commands to perform to +# build the package, instead of the default CMake behaviour. The +# package can also define some post operation hooks. +# +################################################################################ + +# Set compiler variables. +ifeq ($(BR2_CCACHE),y) +CMAKE_HOST_C_COMPILER = $(HOST_DIR)/usr/bin/ccache +CMAKE_HOST_CXX_COMPILER = $(HOST_DIR)/usr/bin/ccache +CMAKE_HOST_C_COMPILER_ARG1 = $(HOSTCC_NOCCACHE) +CMAKE_HOST_CXX_COMPILER_ARG1 = $(HOSTCXX_NOCCACHE) +else +CMAKE_HOST_C_COMPILER = $(HOSTCC) +CMAKE_HOST_CXX_COMPILER = $(HOSTCXX) +endif + +ifneq ($(QUIET),) +CMAKE_QUIET = -DCMAKE_RULE_MESSAGES=OFF -DCMAKE_INSTALL_MESSAGE=NEVER +endif + +################################################################################ +# inner-cmake-package -- defines how the configuration, compilation and +# installation of a CMake package should be done, implements a few hooks to +# tune the build process and calls the generic package infrastructure to +# generate the necessary make targets +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including a HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the type (target or host) +################################################################################ + +define inner-cmake-package + +$(2)_CONF_ENV ?= +$(2)_CONF_OPTS ?= +$(2)_MAKE ?= $$(MAKE) +$(2)_MAKE_ENV ?= +$(2)_MAKE_OPTS ?= +$(2)_INSTALL_OPTS ?= install +$(2)_INSTALL_STAGING_OPTS ?= DESTDIR=$$(STAGING_DIR) install/fast +$(2)_INSTALL_TARGET_OPTS ?= DESTDIR=$$(TARGET_DIR) install/fast + +$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR) + +$(3)_SUPPORTS_IN_SOURCE_BUILD ?= YES + + +ifeq ($$($(3)_SUPPORTS_IN_SOURCE_BUILD),YES) +$(2)_BUILDDIR = $$($(2)_SRCDIR) +else +$(2)_BUILDDIR = $$($(2)_SRCDIR)/buildroot-build +endif + +# +# Configure step. Only define it if not already defined by the package +# .mk file. And take care of the differences between host and target +# packages. +# +ifndef $(2)_CONFIGURE_CMDS +ifeq ($(4),target) + +# Configure package for target +define $(2)_CONFIGURE_CMDS + (mkdir -p $$($$(PKG)_BUILDDIR) && \ + cd $$($$(PKG)_BUILDDIR) && \ + rm -f CMakeCache.txt && \ + PATH=$$(BR_PATH) \ + $$($$(PKG)_CONF_ENV) $$(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ + -DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \ + -DCMAKE_BUILD_TYPE=$$(if $$(BR2_ENABLE_DEBUG),Debug,Release) \ + -DCMAKE_INSTALL_PREFIX="/usr" \ + -DCMAKE_COLOR_MAKEFILE=OFF \ + -DBUILD_DOC=OFF \ + -DBUILD_DOCS=OFF \ + -DBUILD_EXAMPLE=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_TEST=OFF \ + -DBUILD_TESTS=OFF \ + -DBUILD_TESTING=OFF \ + -DBUILD_SHARED_LIBS=$$(if $$(BR2_STATIC_LIBS),OFF,ON) \ + $$(CMAKE_QUIET) \ + $$($$(PKG)_CONF_OPTS) \ + ) +endef +else + +# Configure package for host +define $(2)_CONFIGURE_CMDS + (mkdir -p $$($$(PKG)_BUILDDIR) && \ + cd $$($$(PKG)_BUILDDIR) && \ + rm -f CMakeCache.txt && \ + PATH=$$(BR_PATH) \ + $$(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \ + -DCMAKE_INSTALL_SO_NO_EXE=0 \ + -DCMAKE_FIND_ROOT_PATH="$$(HOST_DIR)" \ + -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM="BOTH" \ + -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY="BOTH" \ + -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE="BOTH" \ + -DCMAKE_INSTALL_PREFIX="$$(HOST_DIR)/usr" \ + -DCMAKE_C_FLAGS="$$(HOST_CFLAGS)" \ + -DCMAKE_CXX_FLAGS="$$(HOST_CXXFLAGS)" \ + -DCMAKE_EXE_LINKER_FLAGS="$$(HOST_LDFLAGS)" \ + -DCMAKE_ASM_COMPILER="$$(HOSTAS)" \ + -DCMAKE_C_COMPILER="$$(CMAKE_HOST_C_COMPILER)" \ + -DCMAKE_CXX_COMPILER="$$(CMAKE_HOST_CXX_COMPILER)" \ + $(if $$(CMAKE_HOST_C_COMPILER_ARG1),\ + -DCMAKE_C_COMPILER_ARG1="$$(CMAKE_HOST_C_COMPILER_ARG1)" \ + -DCMAKE_CXX_COMPILER_ARG1="$$(CMAKE_HOST_CXX_COMPILER_ARG1)" \ + ) \ + -DCMAKE_COLOR_MAKEFILE=OFF \ + -DBUILD_DOC=OFF \ + -DBUILD_DOCS=OFF \ + -DBUILD_EXAMPLE=OFF \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_TEST=OFF \ + -DBUILD_TESTS=OFF \ + -DBUILD_TESTING=OFF \ + $$(CMAKE_QUIET) \ + $$($$(PKG)_CONF_OPTS) \ + ) +endef +endif +endif + +# This must be repeated from inner-generic-package, otherwise we only get +# host-cmake in _DEPENDENCIES because of the following line +ifeq ($(4),host) +$(2)_DEPENDENCIES ?= $$(filter-out host-skeleton host-toolchain $(1),\ + $$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES)))) +endif + +$(2)_DEPENDENCIES += host-cmake + +# +# Build step. Only define it if not already defined by the package .mk +# file. +# +ifndef $(2)_BUILD_CMDS +ifeq ($(4),target) +define $(2)_BUILD_CMDS + $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) -C $$($$(PKG)_BUILDDIR) +endef +else +define $(2)_BUILD_CMDS + $$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) -C $$($$(PKG)_BUILDDIR) +endef +endif +endif + +# +# Host installation step. Only define it if not already defined by the +# package .mk file. +# +ifndef $(2)_INSTALL_CMDS +define $(2)_INSTALL_CMDS + $$(HOST_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) $$($$(PKG)_INSTALL_OPTS) -C $$($$(PKG)_BUILDDIR) +endef +endif + +# +# Staging installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_STAGING_CMDS +define $(2)_INSTALL_STAGING_CMDS + $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) $$($$(PKG)_INSTALL_STAGING_OPTS) -C $$($$(PKG)_BUILDDIR) +endef +endif + +# +# Target installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_TARGET_CMDS +define $(2)_INSTALL_TARGET_CMDS + $$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPTS) $$($$(PKG)_INSTALL_TARGET_OPTS) -C $$($$(PKG)_BUILDDIR) +endef +endif + +# Call the generic package infrastructure to generate the necessary +# make targets +$(call inner-generic-package,$(1),$(2),$(3),$(4)) + +endef + +################################################################################ +# cmake-package -- the target generator macro for CMake packages +################################################################################ + +cmake-package = $(call inner-cmake-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target) +host-cmake-package = $(call inner-cmake-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host) + +################################################################################ +# Generation of the CMake toolchain file +################################################################################ + +# CMAKE_SYSTEM_PROCESSOR should match uname -m +ifeq ($(BR2_ARM_CPU_ARMV4),y) +CMAKE_SYSTEM_PROCESSOR_ARM_VARIANT = armv4 +else ifeq ($(BR2_ARM_CPU_ARMV5),y) +CMAKE_SYSTEM_PROCESSOR_ARM_VARIANT = armv5 +else ifeq ($(BR2_ARM_CPU_ARMV6),y) +CMAKE_SYSTEM_PROCESSOR_ARM_VARIANT = armv6 +else ifeq ($(BR2_ARM_CPU_ARMV7A),y) +CMAKE_SYSTEM_PROCESSOR_ARM_VARIANT = armv7 +endif + +ifeq ($(BR2_arm),y) +CMAKE_SYSTEM_PROCESSOR = $(CMAKE_SYSTEM_PROCESSOR_ARM_VARIANT)l +else ifeq ($(BR2_armeb),y) +CMAKE_SYSTEM_PROCESSOR = $(CMAKE_SYSTEM_PROCESSOR_ARM_VARIANT)b +else +CMAKE_SYSTEM_PROCESSOR = $(BR2_ARCH) +endif + +# In order to allow the toolchain to be relocated, we calculate the HOST_DIR +# based on the toolchainfile.cmake file's location: $(HOST_DIR)/usr/share/buildroot +# In all the other variables, HOST_DIR will be replaced by RELOCATED_HOST_DIR, +# so we have to strip "$(HOST_DIR)/" from the paths that contain it. +$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake: + @mkdir -p $(@D) + sed \ + -e 's#@@STAGING_SUBDIR@@#$(call qstrip,$(STAGING_SUBDIR))#' \ + -e 's#@@TARGET_CFLAGS@@#$(call qstrip,$(TARGET_CFLAGS))#' \ + -e 's#@@TARGET_CXXFLAGS@@#$(call qstrip,$(TARGET_CXXFLAGS))#' \ + -e 's#@@TARGET_LDFLAGS@@#$(call qstrip,$(TARGET_LDFLAGS))#' \ + -e 's#@@TARGET_CC@@#$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_CC)))#' \ + -e 's#@@TARGET_CXX@@#$(subst $(HOST_DIR)/,,$(call qstrip,$(TARGET_CXX)))#' \ + -e 's#@@CMAKE_SYSTEM_PROCESSOR@@#$(call qstrip,$(CMAKE_SYSTEM_PROCESSOR))#' \ + $(TOPDIR)/support/misc/toolchainfile.cmake.in \ + > $@ diff --git a/package/pkg-download.mk b/package/pkg-download.mk new file mode 100644 index 0000000000..a0f694d0fd --- /dev/null +++ b/package/pkg-download.mk @@ -0,0 +1,242 @@ +################################################################################ +# +# This file contains the download helpers for the various package +# infrastructures. It is used to handle downloads from HTTP servers, +# FTP servers, Git repositories, Subversion repositories, Mercurial +# repositories, Bazaar repositories, and SCP servers. +# +################################################################################ + +# Download method commands +export WGET := $(call qstrip,$(BR2_WGET)) +export SVN := $(call qstrip,$(BR2_SVN)) +export CVS := $(call qstrip,$(BR2_CVS)) +export BZR := $(call qstrip,$(BR2_BZR)) +export GIT := $(call qstrip,$(BR2_GIT)) +export HG := $(call qstrip,$(BR2_HG)) +export SCP := $(call qstrip,$(BR2_SCP)) +SSH := $(call qstrip,$(BR2_SSH)) +export LOCALFILES := $(call qstrip,$(BR2_LOCALFILES)) + +DL_WRAPPER = support/download/dl-wrapper + +# DL_DIR may have been set already from the environment +ifeq ($(origin DL_DIR),undefined) +DL_DIR ?= $(call qstrip,$(BR2_DL_DIR)) +ifeq ($(DL_DIR),) +DL_DIR := $(TOPDIR)/dl +endif +else +# Restore the BR2_DL_DIR that was overridden by the .config file +BR2_DL_DIR = $(DL_DIR) +endif + +# ensure it exists and a absolute path +DL_DIR := $(shell mkdir -p $(DL_DIR) && cd $(DL_DIR) >/dev/null && pwd) + +# +# URI scheme helper functions +# Example URIs: +# * http://www.example.com/dir/file +# * scp://www.example.com:dir/file (with domainseparator :) +# +# geturischeme: http +geturischeme = $(firstword $(subst ://, ,$(call qstrip,$(1)))) +# stripurischeme: www.example.com/dir/file +stripurischeme = $(lastword $(subst ://, ,$(call qstrip,$(1)))) +# domain: www.example.com +domain = $(firstword $(subst $(call domainseparator,$(2)), ,$(call stripurischeme,$(1)))) +# notdomain: dir/file +notdomain = $(patsubst $(call domain,$(1),$(2))$(call domainseparator,$(2))%,%,$(call stripurischeme,$(1))) +# +# default domainseparator is /, specify alternative value as first argument +domainseparator = $(if $(1),$(1),/) + +# github(user,package,version): returns site of GitHub repository +github = https://github.com/$(1)/$(2)/archive/$(3) + +# Expressly do not check hashes for those files +# Exported variables default to immediately expanded in some versions of +# make, but we need it to be recursively-epxanded, so explicitly assign it. +export BR_NO_CHECK_HASH_FOR = + +################################################################################ +# The DOWNLOAD_* helpers are in charge of getting a working copy +# of the source repository for their corresponding SCM, +# checking out the requested version / commit / tag, and create an +# archive out of it. DOWNLOAD_SCP uses scp to obtain a remote file with +# ssh authentication. DOWNLOAD_WGET is the normal wget-based download +# mechanism. +# +# The SOURCE_CHECK_* helpers are in charge of simply checking that the source +# is available for download. This can be used to make sure one will be able +# to get all the sources needed for one's build configuration. +################################################################################ + +define DOWNLOAD_GIT + $(EXTRA_ENV) $(DL_WRAPPER) -b git \ + -o $(DL_DIR)/$($(PKG)_SOURCE) \ + $(QUIET) \ + -- \ + $($(PKG)_SITE) \ + $($(PKG)_DL_VERSION) \ + $($(PKG)_BASE_NAME) +endef + +# TODO: improve to check that the given PKG_DL_VERSION exists on the remote +# repository +define SOURCE_CHECK_GIT + $(GIT) ls-remote --heads $($(PKG)_SITE) > /dev/null +endef + +define DOWNLOAD_BZR + $(EXTRA_ENV) $(DL_WRAPPER) -b bzr \ + -o $(DL_DIR)/$($(PKG)_SOURCE) \ + $(QUIET) \ + -- \ + $($(PKG)_SITE) \ + $($(PKG)_DL_VERSION) \ + $($(PKG)_BASE_NAME) +endef + +define SOURCE_CHECK_BZR + $(BZR) ls --quiet $($(PKG)_SITE) > /dev/null +endef + +define DOWNLOAD_CVS + $(EXTRA_ENV) $(DL_WRAPPER) -b cvs \ + -o $(DL_DIR)/$($(PKG)_SOURCE) \ + $(QUIET) \ + -- \ + $(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) \ + $($(PKG)_DL_VERSION) \ + $($(PKG)_RAWNAME) \ + $($(PKG)_BASE_NAME) +endef + +# Not all CVS servers support ls/rls, use login to see if we can connect +define SOURCE_CHECK_CVS + $(CVS) -d:pserver:anonymous:@$(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) login +endef + +define DOWNLOAD_SVN + $(EXTRA_ENV) $(DL_WRAPPER) -b svn \ + -o $(DL_DIR)/$($(PKG)_SOURCE) \ + $(QUIET) \ + -- \ + $($(PKG)_SITE) \ + $($(PKG)_DL_VERSION) \ + $($(PKG)_BASE_NAME) +endef + +define SOURCE_CHECK_SVN + $(SVN) ls $($(PKG)_SITE)@$($(PKG)_DL_VERSION) > /dev/null +endef + +# SCP URIs should be of the form scp://[user@]host:filepath +# Note that filepath is relative to the user's home directory, so you may want +# to prepend the path with a slash: scp://[user@]host:/absolutepath +define DOWNLOAD_SCP + $(EXTRA_ENV) $(DL_WRAPPER) -b scp \ + -o $(DL_DIR)/$(2) \ + -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ + $(QUIET) \ + -- \ + '$(call stripurischeme,$(call qstrip,$(1)))' +endef + +define SOURCE_CHECK_SCP + $(SSH) $(call domain,$(1),:) ls '$(call notdomain,$(1),:)' > /dev/null +endef + +define DOWNLOAD_HG + $(EXTRA_ENV) $(DL_WRAPPER) -b hg \ + -o $(DL_DIR)/$($(PKG)_SOURCE) \ + $(QUIET) \ + -- \ + $($(PKG)_SITE) \ + $($(PKG)_DL_VERSION) \ + $($(PKG)_BASE_NAME) +endef + +# TODO: improve to check that the given PKG_DL_VERSION exists on the remote +# repository +define SOURCE_CHECK_HG + $(HG) incoming --force -l1 $($(PKG)_SITE) > /dev/null +endef + +define DOWNLOAD_WGET + $(EXTRA_ENV) $(DL_WRAPPER) -b wget \ + -o $(DL_DIR)/$(2) \ + -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ + $(QUIET) \ + -- \ + '$(call qstrip,$(1))' +endef + +define SOURCE_CHECK_WGET + $(WGET) --spider '$(call qstrip,$(1))' +endef + +define DOWNLOAD_LOCALFILES + $(EXTRA_ENV) $(DL_WRAPPER) -b cp \ + -o $(DL_DIR)/$(2) \ + -H $(PKGDIR)/$($(PKG)_RAWNAME).hash \ + $(QUIET) \ + -- \ + $(call stripurischeme,$(call qstrip,$(1))) +endef + +define SOURCE_CHECK_LOCALFILES + test -e $(call stripurischeme,$(call qstrip,$(1))) +endef + +################################################################################ +# DOWNLOAD -- Download helper. Will try to download source from: +# 1) BR2_PRIMARY_SITE if enabled +# 2) Download site, unless BR2_PRIMARY_SITE_ONLY is set +# 3) BR2_BACKUP_SITE if enabled, unless BR2_PRIMARY_SITE_ONLY is set +# +# Argument 1 is the source location +# +# E.G. use like this: +# $(call DOWNLOAD,$(FOO_SITE)) +################################################################################ + +define DOWNLOAD + $(call DOWNLOAD_INNER,$(1),$(notdir $(1)),DOWNLOAD) +endef + +define SOURCE_CHECK + $(call DOWNLOAD_INNER,$(1),$(notdir $(1)),SOURCE_CHECK) +endef + +define DOWNLOAD_INNER + $(Q)$(if $(filter bzr cvs git hg svn,$($(PKG)_SITE_METHOD)),export BR_NO_CHECK_HASH_FOR=$(2);) \ + if test -n "$(call qstrip,$(BR2_PRIMARY_SITE))" ; then \ + case "$(call geturischeme,$(BR2_PRIMARY_SITE))" in \ + file) $(call $(3)_LOCALFILES,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \ + scp) $(call $(3)_SCP,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \ + *) $(call $(3)_WGET,$(BR2_PRIMARY_SITE)/$(2),$(2)) && exit ;; \ + esac ; \ + fi ; \ + if test "$(BR2_PRIMARY_SITE_ONLY)" = "y" ; then \ + exit 1 ; \ + fi ; \ + if test -n "$(1)" ; then \ + case "$($(PKG)_SITE_METHOD)" in \ + git) $($(3)_GIT) && exit ;; \ + svn) $($(3)_SVN) && exit ;; \ + cvs) $($(3)_CVS) && exit ;; \ + bzr) $($(3)_BZR) && exit ;; \ + file) $($(3)_LOCALFILES) && exit ;; \ + scp) $($(3)_SCP) && exit ;; \ + hg) $($(3)_HG) && exit ;; \ + *) $(call $(3)_WGET,$(1),$(2)) && exit ;; \ + esac ; \ + fi ; \ + if test -n "$(call qstrip,$(BR2_BACKUP_SITE))" ; then \ + $(call $(3)_WGET,$(BR2_BACKUP_SITE)/$(2),$(2)) && exit ; \ + fi ; \ + exit 1 +endef diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk new file mode 100644 index 0000000000..3904c09043 --- /dev/null +++ b/package/pkg-generic.mk @@ -0,0 +1,925 @@ +################################################################################ +# Generic package infrastructure +# +# This file implements an infrastructure that eases development of +# package .mk files. It should be used for packages that do not rely +# on a well-known build system for which Buildroot has a dedicated +# infrastructure (so far, Buildroot has special support for +# autotools-based and CMake-based packages). +# +# See the Buildroot documentation for details on the usage of this +# infrastructure +# +# In terms of implementation, this generic infrastructure requires the +# .mk file to specify: +# +# 1. Metadata information about the package: name, version, +# download URL, etc. +# +# 2. Description of the commands to be executed to configure, build +# and install the package +################################################################################ + +################################################################################ +# Helper functions to catch start/end of each step +################################################################################ + +# Those two functions are called by each step below. +# They are responsible for calling all hooks defined in +# $(GLOBAL_INSTRUMENTATION_HOOKS) and pass each of them +# three arguments: +# $1: either 'start' or 'end' +# $2: the name of the step +# $3: the name of the package + +# Start step +# $1: step name +define step_start + $(foreach hook,$(GLOBAL_INSTRUMENTATION_HOOKS),$(call $(hook),start,$(1),$($(PKG)_NAME))$(sep)) +endef + +# End step +# $1: step name +define step_end + $(foreach hook,$(GLOBAL_INSTRUMENTATION_HOOKS),$(call $(hook),end,$(1),$($(PKG)_NAME))$(sep)) +endef + +####################################### +# Actual steps hooks + +# Time steps +define step_time + printf "%s:%-5.5s:%-20.20s: %s\n" \ + "$$(date +%s)" "$(1)" "$(2)" "$(3)" \ + >>"$(BUILD_DIR)/build-time.log" +endef +GLOBAL_INSTRUMENTATION_HOOKS += step_time + +# Hooks to collect statistics about installed files + +# This hook will be called before the target installation of a +# package. We store in a file named .br_filelist_before the list of +# files currently installed in the target. Note that the MD5 is also +# stored, in order to identify if the files are overwritten. +define step_pkg_size_start + (cd $(TARGET_DIR) ; find . -type f -print0 | xargs -0 md5sum) | sort > \ + $($(PKG)_DIR)/.br_filelist_before +endef + +# This hook will be called after the target installation of a +# package. We store in a file named .br_filelist_after the list of +# files (and their MD5) currently installed in the target. We then do +# a diff with the .br_filelist_before to compute the list of files +# installed by this package. +define step_pkg_size_end + (cd $(TARGET_DIR); find . -type f -print0 | xargs -0 md5sum) | sort > \ + $($(PKG)_DIR)/.br_filelist_after + comm -13 $($(PKG)_DIR)/.br_filelist_before $($(PKG)_DIR)/.br_filelist_after | \ + while read hash file ; do \ + echo "$(1),$${file}" >> $(BUILD_DIR)/packages-file-list.txt ; \ + done +endef + +define step_pkg_size + $(if $(filter install-target,$(2)),\ + $(if $(filter start,$(1)),$(call step_pkg_size_start,$(3))) \ + $(if $(filter end,$(1)),$(call step_pkg_size_end,$(3)))) +endef +GLOBAL_INSTRUMENTATION_HOOKS += step_pkg_size + +# This hook checks that host packages that need libraries that we build +# have a proper DT_RPATH or DT_RUNPATH tag +define check_host_rpath + $(if $(filter install-host,$(2)),\ + $(if $(filter end,$(1)),support/scripts/check-host-rpath $(3) $(HOST_DIR))) +endef +GLOBAL_INSTRUMENTATION_HOOKS += check_host_rpath + +# User-supplied script +ifneq ($(BR2_INSTRUMENTATION_SCRIPTS),) +define step_user + @$(foreach user_hook, $(BR2_INSTRUMENTATION_SCRIPTS), \ + $(EXTRA_ENV) $(user_hook) "$(1)" "$(2)" "$(3)"$(sep)) +endef +GLOBAL_INSTRUMENTATION_HOOKS += step_user +endif + +################################################################################ +# Implicit targets -- produce a stamp file for each step of a package build +################################################################################ + +# Retrieve the archive +$(BUILD_DIR)/%/.stamp_downloaded: + $(foreach hook,$($(PKG)_PRE_DOWNLOAD_HOOKS),$(call $(hook))$(sep)) +# Only show the download message if it isn't already downloaded + $(Q)for p in $($(PKG)_ALL_DOWNLOADS); do \ + if test ! -e $(DL_DIR)/`basename $$p` ; then \ + $(call MESSAGE,"Downloading") ; \ + break ; \ + fi ; \ + done + $(foreach p,$($(PKG)_ALL_DOWNLOADS),$(call DOWNLOAD,$(p))$(sep)) + $(foreach hook,$($(PKG)_POST_DOWNLOAD_HOOKS),$(call $(hook))$(sep)) + $(Q)mkdir -p $(@D) + $(Q)touch $@ + +# Unpack the archive +$(BUILD_DIR)/%/.stamp_extracted: + @$(call step_start,extract) + @$(call MESSAGE,"Extracting") + $(foreach hook,$($(PKG)_PRE_EXTRACT_HOOKS),$(call $(hook))$(sep)) + $(Q)mkdir -p $(@D) + $($(PKG)_EXTRACT_CMDS) +# some packages have messed up permissions inside + $(Q)chmod -R +rw $(@D) + $(foreach hook,$($(PKG)_POST_EXTRACT_HOOKS),$(call $(hook))$(sep)) + @$(call step_end,extract) + $(Q)touch $@ + +# Rsync the source directory if the _OVERRIDE_SRCDIR feature is +# used. +$(BUILD_DIR)/%/.stamp_rsynced: + @$(call MESSAGE,"Syncing from source dir $(SRCDIR)") + @test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1) + $(foreach hook,$($(PKG)_PRE_RSYNC_HOOKS),$(call $(hook))$(sep)) + rsync -au --chmod=u=rwX,go=rX $(RSYNC_VCS_EXCLUSIONS) $(call qstrip,$(SRCDIR))/ $(@D) + $(foreach hook,$($(PKG)_POST_RSYNC_HOOKS),$(call $(hook))$(sep)) + $(Q)touch $@ + +# Patch +# +# The RAWNAME variable is the lowercased package name, which allows to +# find the package directory (typically package/) and the +# prefix of the patches +# +# For BR2_GLOBAL_PATCH_DIR, only generate if it is defined +$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS = $(PKGDIR) +$(BUILD_DIR)/%/.stamp_patched: PATCH_BASE_DIRS += $(addsuffix /$(RAWNAME),$(call qstrip,$(BR2_GLOBAL_PATCH_DIR))) +$(BUILD_DIR)/%/.stamp_patched: + @$(call step_start,patch) + @$(call MESSAGE,"Patching") + $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep)) + $(foreach p,$($(PKG)_PATCH),$(APPLY_PATCHES) $(@D) $(DL_DIR) $(notdir $(p))$(sep)) + $(Q)( \ + for D in $(PATCH_BASE_DIRS); do \ + if test -d $${D}; then \ + if test -d $${D}/$($(PKG)_VERSION); then \ + $(APPLY_PATCHES) $(@D) $${D}/$($(PKG)_VERSION) \*.patch \*.patch.$(ARCH) || exit 1; \ + else \ + $(APPLY_PATCHES) $(@D) $${D} \*.patch \*.patch.$(ARCH) || exit 1; \ + fi; \ + fi; \ + done; \ + ) + $(foreach hook,$($(PKG)_POST_PATCH_HOOKS),$(call $(hook))$(sep)) + @$(call step_end,patch) + $(Q)touch $@ + +# Check that all directories specified in BR2_GLOBAL_PATCH_DIR exist. +$(foreach dir,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR)),\ + $(if $(wildcard $(dir)),,\ + $(error BR2_GLOBAL_PATCH_DIR contains nonexistent directory $(dir)))) + +# Configure +$(BUILD_DIR)/%/.stamp_configured: + @$(call step_start,configure) + @$(call MESSAGE,"Configuring") + $(foreach hook,$($(PKG)_PRE_CONFIGURE_HOOKS),$(call $(hook))$(sep)) + $($(PKG)_CONFIGURE_CMDS) + $(foreach hook,$($(PKG)_POST_CONFIGURE_HOOKS),$(call $(hook))$(sep)) + @$(call step_end,configure) + $(Q)touch $@ + +# Build +$(BUILD_DIR)/%/.stamp_built:: + @$(call step_start,build) + @$(call MESSAGE,"Building") + $(foreach hook,$($(PKG)_PRE_BUILD_HOOKS),$(call $(hook))$(sep)) + +$($(PKG)_BUILD_CMDS) + $(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep)) + @$(call step_end,build) + $(Q)touch $@ + +# Install to host dir +$(BUILD_DIR)/%/.stamp_host_installed: + @$(call step_start,install-host) + @$(call MESSAGE,"Installing to host directory") + $(foreach hook,$($(PKG)_PRE_INSTALL_HOOKS),$(call $(hook))$(sep)) + +$($(PKG)_INSTALL_CMDS) + $(foreach hook,$($(PKG)_POST_INSTALL_HOOKS),$(call $(hook))$(sep)) + @$(call step_end,install-host) + $(Q)touch $@ + +# Install to staging dir +# +# Some packages install libtool .la files alongside any installed +# libraries. These .la files sometimes refer to paths relative to the +# sysroot, which libtool will interpret as absolute paths to host +# libraries instead of the target libraries. Since this is not what we +# want, these paths are fixed by prefixing them with $(STAGING_DIR). +# As we configure with --prefix=/usr, this fix needs to be applied to +# any path that starts with /usr. +# +# To protect against the case that the output or staging directories or +# the pre-installed external toolchain themselves are under /usr, we first +# substitute away any occurrences of these directories with @BASE_DIR@, +# @STAGING_DIR@ and @TOOLCHAIN_EXTERNAL_INSTALL_DIR@ respectively. +# +# Note that STAGING_DIR can be outside BASE_DIR when the user sets +# BR2_HOST_DIR to a custom value. Note that TOOLCHAIN_EXTERNAL_INSTALL_DIR +# can be under @BASE_DIR@ when it's a downloaded toolchain, and can be +# empty when we use an internal toolchain. +# +$(BUILD_DIR)/%/.stamp_staging_installed: + @$(call step_start,install-staging) + @$(call MESSAGE,"Installing to staging directory") + $(foreach hook,$($(PKG)_PRE_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep)) + +$($(PKG)_INSTALL_STAGING_CMDS) + $(foreach hook,$($(PKG)_POST_INSTALL_STAGING_HOOKS),$(call $(hook))$(sep)) + $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ + $(call MESSAGE,"Fixing package configuration files") ;\ + $(SED) "s,$(BASE_DIR),@BASE_DIR@,g" \ + -e "s,$(STAGING_DIR),@STAGING_DIR@,g" \ + -e "s,^\(exec_\)\?prefix=.*,\1prefix=@STAGING_DIR@/usr,g" \ + -e "s,-I/usr/,-I@STAGING_DIR@/usr/,g" \ + -e "s,-L/usr/,-L@STAGING_DIR@/usr/,g" \ + -e "s,@STAGING_DIR@,$(STAGING_DIR),g" \ + -e "s,@BASE_DIR@,$(BASE_DIR),g" \ + $(addprefix $(STAGING_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ;\ + fi + @$(call MESSAGE,"Fixing libtool files") + $(Q)find $(STAGING_DIR)/usr/lib* -name "*.la" | xargs --no-run-if-empty \ + $(SED) "s:$(BASE_DIR):@BASE_DIR@:g" \ + -e "s:$(STAGING_DIR):@STAGING_DIR@:g" \ + $(if $(TOOLCHAIN_EXTERNAL_INSTALL_DIR),\ + -e "s:$(TOOLCHAIN_EXTERNAL_INSTALL_DIR):@TOOLCHAIN_EXTERNAL_INSTALL_DIR@:g") \ + -e "s:\(['= ]\)/usr:\\1@STAGING_DIR@/usr:g" \ + $(if $(TOOLCHAIN_EXTERNAL_INSTALL_DIR),\ + -e "s:@TOOLCHAIN_EXTERNAL_INSTALL_DIR@:$(TOOLCHAIN_EXTERNAL_INSTALL_DIR):g") \ + -e "s:@STAGING_DIR@:$(STAGING_DIR):g" \ + -e "s:@BASE_DIR@:$(BASE_DIR):g" + @$(call step_end,install-staging) + $(Q)touch $@ + +# Install to images dir +$(BUILD_DIR)/%/.stamp_images_installed: + @$(call step_start,install-image) + $(foreach hook,$($(PKG)_PRE_INSTALL_IMAGES_HOOKS),$(call $(hook))$(sep)) + @$(call MESSAGE,"Installing to images directory") + +$($(PKG)_INSTALL_IMAGES_CMDS) + $(foreach hook,$($(PKG)_POST_INSTALL_IMAGES_HOOKS),$(call $(hook))$(sep)) + @$(call step_end,install-image) + $(Q)touch $@ + +# Install to target dir +$(BUILD_DIR)/%/.stamp_target_installed: + @$(call step_start,install-target) + @$(call MESSAGE,"Installing to target") + $(foreach hook,$($(PKG)_PRE_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep)) + +$($(PKG)_INSTALL_TARGET_CMDS) + $(if $(BR2_INIT_SYSTEMD),\ + $($(PKG)_INSTALL_INIT_SYSTEMD)) + $(if $(BR2_INIT_SYSV)$(BR2_INIT_BUSYBOX),\ + $($(PKG)_INSTALL_INIT_SYSV)) + $(foreach hook,$($(PKG)_POST_INSTALL_TARGET_HOOKS),$(call $(hook))$(sep)) + $(Q)if test -n "$($(PKG)_CONFIG_SCRIPTS)" ; then \ + $(RM) -f $(addprefix $(TARGET_DIR)/usr/bin/,$($(PKG)_CONFIG_SCRIPTS)) ; \ + fi + @$(call step_end,install-target) + $(Q)touch $@ + +# Remove package sources +$(BUILD_DIR)/%/.stamp_dircleaned: + rm -Rf $(@D) + +################################################################################ +# virt-provides-single -- check that provider-pkg is the declared provider for +# the virtual package virt-pkg +# +# argument 1 is the lower-case name of the virtual package +# argument 2 is the upper-case name of the virtual package +# argument 3 is the lower-case name of the provider +# +# example: +# $(call virt-provides-single,libegl,LIBEGL,rpi-userland) +################################################################################ +define virt-provides-single +ifneq ($$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2))),$(3)) +$$(error Configuration error: both "$(3)" and $$(BR2_PACKAGE_PROVIDES_$(2))\ +are selected as providers for virtual package "$(1)". Only one provider can\ +be selected at a time. Please fix your configuration) +endif +endef + +################################################################################ +# inner-generic-package -- generates the make targets needed to build a +# generic package +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including a HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the type (target or host) +# +# Note about variable and function references: inside all blocks that are +# evaluated with $(eval), which includes all 'inner-xxx-package' blocks, +# specific rules apply with respect to variable and function references. +# - Numbered variables (parameters to the block) can be referenced with a single +# dollar sign: $(1), $(2), $(3), etc. +# - pkgdir and pkgname should be referenced with a single dollar sign too. These +# functions rely on 'the most recently parsed makefile' which is supposed to +# be the package .mk file. If we defer the evaluation of these functions using +# double dollar signs, then they may be evaluated too late, when other +# makefiles have already been parsed. One specific case is when $$(pkgdir) is +# assigned to a variable using deferred evaluation with '=' and this variable +# is used in a target rule outside the eval'ed inner block. In this case, the +# pkgdir will be that of the last makefile parsed by buildroot, which is not +# the expected value. This mechanism is for example used for the TARGET_PATCH +# rule. +# - All other variables should be referenced with a double dollar sign: +# $$(TARGET_DIR), $$($(2)_VERSION), etc. Also all make functions should be +# referenced with a double dollar sign: $$(subst), $$(call), $$(filter-out), +# etc. This rule ensures that these variables and functions are only expanded +# during the $(eval) step, and not earlier. Otherwise, unintuitive and +# undesired behavior occurs with respect to these variables and functions. +# +################################################################################ + +define inner-generic-package + +# Ensure the package is only declared once, i.e. do not accept that a +# package be re-defined by a br2-external tree +ifneq ($(call strip,$(filter $(1),$(PACKAGES_ALL))),) +$$(error Package '$(1)' defined a second time in '$(pkgdir)'; \ + previous definition was in '$$($(2)_PKGDIR)') +endif +PACKAGES_ALL += $(1) + +# Define default values for various package-related variables, if not +# already defined. For some variables (version, source, site and +# subdir), if they are undefined, we try to see if a variable without +# the HOST_ prefix is defined. If so, we use such a variable, so that +# this information has only to be specified once, for both the +# target and host packages of a given .mk file. + +$(2)_TYPE = $(4) +$(2)_NAME = $(1) +$(2)_RAWNAME = $$(patsubst host-%,%,$(1)) +$(2)_PKGDIR = $(pkgdir) + +# Keep the package version that may contain forward slashes in the _DL_VERSION +# variable, then replace all forward slashes ('/') by underscores ('_') to +# sanitize the package version that is used in paths, directory and file names. +# Forward slashes may appear in the package's version when pointing to a +# version control system branch or tag, for example remotes/origin/1_10_stable. +# Similar for spaces and colons (:) that may appear in date-based revisions for +# CVS. +ifndef $(2)_VERSION + ifdef $(3)_DL_VERSION + $(2)_DL_VERSION := $$($(3)_DL_VERSION) + else ifdef $(3)_VERSION + $(2)_DL_VERSION := $$($(3)_VERSION) + else + $(2)_DL_VERSION = undefined + endif +else + $(2)_DL_VERSION := $$(strip $$($(2)_VERSION)) +endif +$(2)_VERSION := $$(call sanitize,$$($(2)_DL_VERSION)) + +ifdef $(3)_OVERRIDE_SRCDIR + $(2)_OVERRIDE_SRCDIR ?= $$($(3)_OVERRIDE_SRCDIR) +endif + +$(2)_BASE_NAME = $(1)-$$($(2)_VERSION) +$(2)_DL_DIR = $$(DL_DIR)/$$($(2)_BASE_NAME) +$(2)_DIR = $$(BUILD_DIR)/$$($(2)_BASE_NAME) + +ifndef $(2)_SUBDIR + ifdef $(3)_SUBDIR + $(2)_SUBDIR = $$($(3)_SUBDIR) + else + $(2)_SUBDIR ?= + endif +endif + +ifndef $(2)_STRIP_COMPONENTS + ifdef $(3)_STRIP_COMPONENTS + $(2)_STRIP_COMPONENTS = $$($(3)_STRIP_COMPONENTS) + else + $(2)_STRIP_COMPONENTS ?= 1 + endif +endif + +$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR) +$(2)_BUILDDIR ?= $$($(2)_SRCDIR) + +ifneq ($$($(2)_OVERRIDE_SRCDIR),) +$(2)_VERSION = custom +endif + +ifndef $(2)_SOURCE + ifdef $(3)_SOURCE + $(2)_SOURCE = $$($(3)_SOURCE) + else + $(2)_SOURCE ?= $$($(2)_RAWNAME)-$$($(2)_VERSION).tar.gz + endif +endif + +ifndef $(2)_PATCH + ifdef $(3)_PATCH + $(2)_PATCH = $$($(3)_PATCH) + endif +endif + +$(2)_ALL_DOWNLOADS = \ + $$(foreach p,$$($(2)_SOURCE) $$($(2)_PATCH) $$($(2)_EXTRA_DOWNLOADS),\ + $$(if $$(findstring ://,$$(p)),$$(p),\ + $$($(2)_SITE)/$$(p))) + +ifndef $(2)_SITE + ifdef $(3)_SITE + $(2)_SITE = $$($(3)_SITE) + endif +endif + +ifndef $(2)_SITE_METHOD + ifdef $(3)_SITE_METHOD + $(2)_SITE_METHOD = $$($(3)_SITE_METHOD) + else + # Try automatic detection using the scheme part of the URI + $(2)_SITE_METHOD = $$(call geturischeme,$$($(2)_SITE)) + endif +endif + +ifeq ($$($(2)_SITE_METHOD),local) +ifeq ($$($(2)_OVERRIDE_SRCDIR),) +$(2)_OVERRIDE_SRCDIR = $$($(2)_SITE) +endif +endif + +ifndef $(2)_LICENSE + ifdef $(3)_LICENSE + $(2)_LICENSE = $$($(3)_LICENSE) + endif +endif + +$(2)_LICENSE ?= unknown + +ifndef $(2)_LICENSE_FILES + ifdef $(3)_LICENSE_FILES + $(2)_LICENSE_FILES = $$($(3)_LICENSE_FILES) + endif +endif + +ifndef $(2)_REDISTRIBUTE + ifdef $(3)_REDISTRIBUTE + $(2)_REDISTRIBUTE = $$($(3)_REDISTRIBUTE) + endif +endif + +$(2)_REDISTRIBUTE ?= YES + +# When a target package is a toolchain dependency set this variable to +# 'NO' so the 'toolchain' dependency is not added to prevent a circular +# dependency +$(2)_ADD_TOOLCHAIN_DEPENDENCY ?= YES + +ifeq ($(4),host) +$(2)_DEPENDENCIES ?= $$(filter-out host-skeleton host-toolchain $(1),\ + $$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES)))) +endif +ifeq ($(4),target) +ifneq ($(1),skeleton) +$(2)_DEPENDENCIES += skeleton +endif +ifeq ($$($(2)_ADD_TOOLCHAIN_DEPENDENCY),YES) +$(2)_DEPENDENCIES += toolchain +endif +endif + +# Eliminate duplicates in dependencies +$(2)_FINAL_DEPENDENCIES = $$(sort $$($(2)_DEPENDENCIES)) +$(2)_FINAL_PATCH_DEPENDENCIES = $$(sort $$($(2)_PATCH_DEPENDENCIES)) +$(2)_FINAL_ALL_DEPENDENCIES = $$(sort $$($(2)_FINAL_DEPENDENCIES) $$($(2)_FINAL_PATCH_DEPENDENCIES)) + +$(2)_INSTALL_STAGING ?= NO +$(2)_INSTALL_IMAGES ?= NO +$(2)_INSTALL_TARGET ?= YES + +# define sub-target stamps +$(2)_TARGET_INSTALL_TARGET = $$($(2)_DIR)/.stamp_target_installed +$(2)_TARGET_INSTALL_STAGING = $$($(2)_DIR)/.stamp_staging_installed +$(2)_TARGET_INSTALL_IMAGES = $$($(2)_DIR)/.stamp_images_installed +$(2)_TARGET_INSTALL_HOST = $$($(2)_DIR)/.stamp_host_installed +$(2)_TARGET_BUILD = $$($(2)_DIR)/.stamp_built +$(2)_TARGET_CONFIGURE = $$($(2)_DIR)/.stamp_configured +$(2)_TARGET_RSYNC = $$($(2)_DIR)/.stamp_rsynced +$(2)_TARGET_PATCH = $$($(2)_DIR)/.stamp_patched +$(2)_TARGET_EXTRACT = $$($(2)_DIR)/.stamp_extracted +$(2)_TARGET_SOURCE = $$($(2)_DIR)/.stamp_downloaded +$(2)_TARGET_DIRCLEAN = $$($(2)_DIR)/.stamp_dircleaned + +# default extract command +$(2)_EXTRACT_CMDS ?= \ + $$(if $$($(2)_SOURCE),$$(INFLATE$$(suffix $$($(2)_SOURCE))) $$(DL_DIR)/$$($(2)_SOURCE) | \ + $$(TAR) --strip-components=$$($(2)_STRIP_COMPONENTS) \ + -C $$($(2)_DIR) \ + $$(foreach x,$$($(2)_EXCLUDES),--exclude='$$(x)' ) \ + $$(TAR_OPTIONS) -) + +# pre/post-steps hooks +$(2)_PRE_DOWNLOAD_HOOKS ?= +$(2)_POST_DOWNLOAD_HOOKS ?= +$(2)_PRE_EXTRACT_HOOKS ?= +$(2)_POST_EXTRACT_HOOKS ?= +$(2)_PRE_RSYNC_HOOKS ?= +$(2)_POST_RSYNC_HOOKS ?= +$(2)_PRE_PATCH_HOOKS ?= +$(2)_POST_PATCH_HOOKS ?= +$(2)_PRE_CONFIGURE_HOOKS ?= +$(2)_POST_CONFIGURE_HOOKS ?= +$(2)_PRE_BUILD_HOOKS ?= +$(2)_POST_BUILD_HOOKS ?= +$(2)_PRE_INSTALL_HOOKS ?= +$(2)_POST_INSTALL_HOOKS ?= +$(2)_PRE_INSTALL_STAGING_HOOKS ?= +$(2)_POST_INSTALL_STAGING_HOOKS ?= +$(2)_PRE_INSTALL_TARGET_HOOKS ?= +$(2)_POST_INSTALL_TARGET_HOOKS ?= +$(2)_PRE_INSTALL_IMAGES_HOOKS ?= +$(2)_POST_INSTALL_IMAGES_HOOKS ?= +$(2)_PRE_LEGAL_INFO_HOOKS ?= +$(2)_POST_LEGAL_INFO_HOOKS ?= + +# human-friendly targets and target sequencing +$(1): $(1)-install + +ifeq ($$($(2)_TYPE),host) +$(1)-install: $(1)-install-host +else +$(1)-install: $(1)-install-staging $(1)-install-target $(1)-install-images +endif + +ifeq ($$($(2)_INSTALL_TARGET),YES) +$(1)-install-target: $$($(2)_TARGET_INSTALL_TARGET) +$$($(2)_TARGET_INSTALL_TARGET): $$($(2)_TARGET_BUILD) +else +$(1)-install-target: +endif + +ifeq ($$($(2)_INSTALL_STAGING),YES) +$(1)-install-staging: $$($(2)_TARGET_INSTALL_STAGING) +$$($(2)_TARGET_INSTALL_STAGING): $$($(2)_TARGET_BUILD) +# Some packages use install-staging stuff for install-target +$$($(2)_TARGET_INSTALL_TARGET): $$($(2)_TARGET_INSTALL_STAGING) +else +$(1)-install-staging: +endif + +ifeq ($$($(2)_INSTALL_IMAGES),YES) +$(1)-install-images: $$($(2)_TARGET_INSTALL_IMAGES) +$$($(2)_TARGET_INSTALL_IMAGES): $$($(2)_TARGET_BUILD) +else +$(1)-install-images: +endif + +$(1)-install-host: $$($(2)_TARGET_INSTALL_HOST) +$$($(2)_TARGET_INSTALL_HOST): $$($(2)_TARGET_BUILD) + +$(1)-build: $$($(2)_TARGET_BUILD) +$$($(2)_TARGET_BUILD): $$($(2)_TARGET_CONFIGURE) + +# Since $(2)_FINAL_DEPENDENCIES are phony targets, they are always "newer" +# than $(2)_TARGET_CONFIGURE. This would force the configure step (and +# therefore the other steps as well) to be re-executed with every +# invocation of make. Therefore, make $(2)_FINAL_DEPENDENCIES an order-only +# dependency by using |. + +$(1)-configure: $$($(2)_TARGET_CONFIGURE) +$$($(2)_TARGET_CONFIGURE): | $$($(2)_FINAL_DEPENDENCIES) + +$$($(2)_TARGET_SOURCE) $$($(2)_TARGET_RSYNC): | dirs prepare +ifeq ($$(filter $(1),$$(DEPENDENCIES_HOST_PREREQ)),) +$$($(2)_TARGET_SOURCE) $$($(2)_TARGET_RSYNC): | dependencies +endif + +ifeq ($$($(2)_OVERRIDE_SRCDIR),) +# In the normal case (no package override), the sequence of steps is +# source, by downloading +# depends +# extract +# patch +# configure +$$($(2)_TARGET_CONFIGURE): $$($(2)_TARGET_PATCH) + +$(1)-patch: $$($(2)_TARGET_PATCH) +$$($(2)_TARGET_PATCH): $$($(2)_TARGET_EXTRACT) +# Order-only dependency +$$($(2)_TARGET_PATCH): | $$(patsubst %,%-patch,$$($(2)_FINAL_PATCH_DEPENDENCIES)) + +$(1)-extract: $$($(2)_TARGET_EXTRACT) +$$($(2)_TARGET_EXTRACT): $$($(2)_TARGET_SOURCE) + +$(1)-depends: $$($(2)_FINAL_DEPENDENCIES) + +$(1)-source: $$($(2)_TARGET_SOURCE) + +$(1)-source-check: + $$(foreach p,$$($(2)_ALL_DOWNLOADS),$$(call SOURCE_CHECK,$$(p))$$(sep)) + +$(1)-external-deps: + @for p in $$($(2)_SOURCE) $$($(2)_PATCH) $$($(2)_EXTRA_DOWNLOADS) ; do \ + echo `basename $$$$p` ; \ + done +else +# In the package override case, the sequence of steps +# source, by rsyncing +# depends +# configure + +# Use an order-only dependency so the "-clean-for-rebuild" rule +# can remove the stamp file without triggering the configure step. +$$($(2)_TARGET_CONFIGURE): | $$($(2)_TARGET_RSYNC) + +$(1)-depends: $$($(2)_FINAL_DEPENDENCIES) + +$(1)-patch: $(1)-rsync +$(1)-extract: $(1)-rsync + +$(1)-rsync: $$($(2)_TARGET_RSYNC) + +$(1)-source: + +$(1)-source-check: + test -d $$($(2)_OVERRIDE_SRCDIR) + +$(1)-external-deps: + @echo "file://$$($(2)_OVERRIDE_SRCDIR)" +endif + +$(1)-show-version: + @echo $$($(2)_VERSION) + +$(1)-show-depends: + @echo $$($(2)_FINAL_ALL_DEPENDENCIES) + +$(1)-graph-depends: graph-depends-requirements + @$$(INSTALL) -d $$(GRAPHS_DIR) + @cd "$$(CONFIG_DIR)"; \ + $$(TOPDIR)/support/scripts/graph-depends $$(BR2_GRAPH_DEPS_OPTS) \ + -p $(1) -o $$(GRAPHS_DIR)/$$(@).dot + dot $$(BR2_GRAPH_DOT_OPTS) -T$$(BR_GRAPH_OUT) \ + -o $$(GRAPHS_DIR)/$$(@).$$(BR_GRAPH_OUT) \ + $$(GRAPHS_DIR)/$$(@).dot + +$(1)-all-source: $(1)-source +$(1)-all-source: $$(foreach p,$$($(2)_FINAL_ALL_DEPENDENCIES),$$(p)-all-source) + +$(1)-all-source-check: $(1)-source-check +$(1)-all-source-check: $$(foreach p,$$($(2)_FINAL_ALL_DEPENDENCIES),$$(p)-all-source-check) + +$(1)-all-external-deps: $(1)-external-deps +$(1)-all-external-deps: $$(foreach p,$$($(2)_FINAL_ALL_DEPENDENCIES),$$(p)-all-external-deps) + +$(1)-all-legal-info: $(1)-legal-info +$(1)-all-legal-info: $$(foreach p,$$($(2)_FINAL_ALL_DEPENDENCIES),$$(p)-all-legal-info) + +$(1)-dirclean: $$($(2)_TARGET_DIRCLEAN) + +$(1)-clean-for-reinstall: +ifneq ($$($(2)_OVERRIDE_SRCDIR),) + rm -f $$($(2)_TARGET_RSYNC) +endif + rm -f $$($(2)_TARGET_INSTALL_STAGING) + rm -f $$($(2)_TARGET_INSTALL_TARGET) + rm -f $$($(2)_TARGET_INSTALL_IMAGES) + rm -f $$($(2)_TARGET_INSTALL_HOST) + +$(1)-reinstall: $(1)-clean-for-reinstall $(1) + +$(1)-clean-for-rebuild: $(1)-clean-for-reinstall + rm -f $$($(2)_TARGET_BUILD) + +$(1)-rebuild: $(1)-clean-for-rebuild $(1) + +$(1)-clean-for-reconfigure: $(1)-clean-for-rebuild + rm -f $$($(2)_TARGET_CONFIGURE) + +$(1)-reconfigure: $(1)-clean-for-reconfigure $(1) + +# define the PKG variable for all targets, containing the +# uppercase package variable prefix +$$($(2)_TARGET_INSTALL_TARGET): PKG=$(2) +$$($(2)_TARGET_INSTALL_STAGING): PKG=$(2) +$$($(2)_TARGET_INSTALL_IMAGES): PKG=$(2) +$$($(2)_TARGET_INSTALL_HOST): PKG=$(2) +$$($(2)_TARGET_BUILD): PKG=$(2) +$$($(2)_TARGET_CONFIGURE): PKG=$(2) +$$($(2)_TARGET_RSYNC): SRCDIR=$$($(2)_OVERRIDE_SRCDIR) +$$($(2)_TARGET_RSYNC): PKG=$(2) +$$($(2)_TARGET_PATCH): PKG=$(2) +$$($(2)_TARGET_PATCH): RAWNAME=$$(patsubst host-%,%,$(1)) +$$($(2)_TARGET_PATCH): PKGDIR=$(pkgdir) +$$($(2)_TARGET_EXTRACT): PKG=$(2) +$$($(2)_TARGET_SOURCE): PKG=$(2) +$$($(2)_TARGET_SOURCE): PKGDIR=$(pkgdir) +$$($(2)_TARGET_DIRCLEAN): PKG=$(2) + +# Compute the name of the Kconfig option that correspond to the +# package being enabled. We handle three cases: the special Linux +# kernel case, the bootloaders case, and the normal packages case. +ifeq ($(1),linux) +$(2)_KCONFIG_VAR = BR2_LINUX_KERNEL +else ifneq ($$(filter boot/% $(BR2_EXTERNAL)/boot/%,$(pkgdir)),) +$(2)_KCONFIG_VAR = BR2_TARGET_$(2) +else ifneq ($$(filter toolchain/% $(BR2_EXTERNAL)/toolchain/%,$(pkgdir)),) +$(2)_KCONFIG_VAR = BR2_$(2) +else +$(2)_KCONFIG_VAR = BR2_PACKAGE_$(2) +endif + +# legal-info: declare dependencies and set values used later for the manifest +ifneq ($$($(2)_LICENSE_FILES),) +$(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES) +endif +$(2)_MANIFEST_LICENSE_FILES ?= not saved + +# If the package declares _LICENSE_FILES, we need to extract it, +# for overriden, local or normal remote packages alike, whether +# we want to redistribute it or not. +ifneq ($$($(2)_LICENSE_FILES),) +$(1)-legal-info: $(1)-patch +endif + +# We only save the sources of packages we want to redistribute, that are +# non-overriden (local or true override). +ifeq ($$($(2)_REDISTRIBUTE),YES) +ifeq ($$($(2)_OVERRIDE_SRCDIR),) +# Packages that have a tarball need it downloaded beforehand +$(1)-legal-info: $(1)-source $$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4))) +endif +endif + +# If FOO_ACTUAL_SOURCE_TARBALL is explicitly defined, it means FOO_SOURCE is +# indeed a binary (e.g. external toolchain) and FOO_ACTUAL_SOURCE_TARBALL/_SITE +# point to the actual sources tarball. Use the actual sources for legal-info. +# For most packages the FOO_SITE/FOO_SOURCE pair points to real source code, +# so these are the defaults for FOO_ACTUAL_*. +$(2)_ACTUAL_SOURCE_TARBALL ?= $$($(2)_SOURCE) +$(2)_ACTUAL_SOURCE_SITE ?= $$(call qstrip,$$($(2)_SITE)) + +# legal-info: produce legally relevant info. +$(1)-legal-info: +# Packages without a source are assumed to be part of Buildroot, skip them. + $$(foreach hook,$$($(2)_PRE_LEGAL_INFO_HOOKS),$$(call $$(hook))$$(sep)) +ifneq ($$(call qstrip,$$($(2)_SOURCE)),) + +# Save license files if defined +# We save the license files for any kind of package: normal, local, +# overridden, or non-redistributable alike. +# The reason to save license files even for no-redistribute packages +# is that the license still applies to the files distributed as part +# of the rootfs, even if the sources are not themselves redistributed. +ifeq ($$(call qstrip,$$($(2)_LICENSE_FILES)),) + @$$(call legal-license-nofiles,$$($(2)_RAWNAME),$$(call UPPERCASE,$(4))) + @$$(call legal-warning-pkg,$$($(2)_RAWNAME),cannot save license ($(2)_LICENSE_FILES not defined)) +else + @$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAWNAME),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep)) +endif # license files + +ifeq ($$($(2)_SITE_METHOD),local) +# Packages without a tarball: don't save and warn + @$$(call legal-warning-nosource,$$($(2)_RAWNAME),local) + +else ifneq ($$($(2)_OVERRIDE_SRCDIR),) + @$$(call legal-warning-nosource,$$($(2)_RAWNAME),override) + +else +# Other packages + +ifeq ($$($(2)_REDISTRIBUTE),YES) +ifneq ($$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_SOURCE)) + $$(call DOWNLOAD,$$($(2)_ACTUAL_SOURCE_SITE)/$$($(2)_ACTUAL_SOURCE_TARBALL)) +endif +# Copy the source tarball (just hardlink if possible) + @cp -l $$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) $$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4))) 2>/dev/null || \ + cp $$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) $$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4))) +endif # redistribute + +endif # other packages + @$$(call legal-manifest,$$($(2)_RAWNAME),$$($(2)_VERSION),$$($(2)_LICENSE),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_ACTUAL_SOURCE_SITE),$$(call UPPERCASE,$(4))) +endif # ifneq ($$(call qstrip,$$($(2)_SOURCE)),) + $$(foreach hook,$$($(2)_POST_LEGAL_INFO_HOOKS),$$(call $$(hook))$$(sep)) + +# add package to the general list of targets if requested by the buildroot +# configuration +ifeq ($$($$($(2)_KCONFIG_VAR)),y) + +# Ensure the calling package is the declared provider for all the virtual +# packages it claims to be an implementation of. +ifneq ($$($(2)_PROVIDES),) +$$(foreach pkg,$$($(2)_PROVIDES),\ + $$(eval $$(call virt-provides-single,$$(pkg),$$(call UPPERCASE,$$(pkg)),$(1))$$(sep))) +endif + +# Ensure unified variable name conventions between all packages Some +# of the variables are used by more than one infrastructure; so, +# rather than duplicating the checks in each infrastructure, we check +# all variables here in pkg-generic, even though pkg-generic should +# have no knowledge of infra-specific variables. +$(eval $(call check-deprecated-variable,$(2)_MAKE_OPT,$(2)_MAKE_OPTS)) +$(eval $(call check-deprecated-variable,$(2)_INSTALL_OPT,$(2)_INSTALL_OPTS)) +$(eval $(call check-deprecated-variable,$(2)_INSTALL_TARGET_OPT,$(2)_INSTALL_TARGET_OPTS)) +$(eval $(call check-deprecated-variable,$(2)_INSTALL_STAGING_OPT,$(2)_INSTALL_STAGING_OPTS)) +$(eval $(call check-deprecated-variable,$(2)_INSTALL_HOST_OPT,$(2)_INSTALL_HOST_OPTS)) +$(eval $(call check-deprecated-variable,$(2)_AUTORECONF_OPT,$(2)_AUTORECONF_OPTS)) +$(eval $(call check-deprecated-variable,$(2)_CONF_OPT,$(2)_CONF_OPTS)) +$(eval $(call check-deprecated-variable,$(2)_BUILD_OPT,$(2)_BUILD_OPTS)) +$(eval $(call check-deprecated-variable,$(2)_GETTEXTIZE_OPT,$(2)_GETTEXTIZE_OPTS)) +$(eval $(call check-deprecated-variable,$(2)_KCONFIG_OPT,$(2)_KCONFIG_OPTS)) + +PACKAGES += $(1) + +ifneq ($$($(2)_PERMISSIONS),) +PACKAGES_PERMISSIONS_TABLE += $$($(2)_PERMISSIONS)$$(sep) +endif +ifneq ($$($(2)_DEVICES),) +PACKAGES_DEVICES_TABLE += $$($(2)_DEVICES)$$(sep) +endif +ifneq ($$($(2)_USERS),) +PACKAGES_USERS += $$($(2)_USERS)$$(sep) +endif + +ifeq ($$($(2)_SITE_METHOD),svn) +DL_TOOLS_DEPENDENCIES += svn +else ifeq ($$($(2)_SITE_METHOD),git) +DL_TOOLS_DEPENDENCIES += git +else ifeq ($$($(2)_SITE_METHOD),bzr) +DL_TOOLS_DEPENDENCIES += bzr +else ifeq ($$($(2)_SITE_METHOD),scp) +DL_TOOLS_DEPENDENCIES += scp ssh +else ifeq ($$($(2)_SITE_METHOD),hg) +DL_TOOLS_DEPENDENCIES += hg +else ifeq ($$($(2)_SITE_METHOD),cvs) +DL_TOOLS_DEPENDENCIES += cvs +endif # SITE_METHOD + +# $(firstword) is used here because the extractor can have arguments, like +# ZCAT="gzip -d -c", and to check for the dependency we only want 'gzip'. +# Do not add xzcat to the list of required dependencies, as it gets built +# automatically if it isn't found. +ifneq ($$(call suitable-extractor,$$($(2)_SOURCE)),$$(XZCAT)) +DL_TOOLS_DEPENDENCIES += $$(firstword $$(call suitable-extractor,$$($(2)_SOURCE))) +endif + +# Ensure all virtual targets are PHONY. Listed alphabetically. +.PHONY: $(1) \ + $(1)-all-external-deps \ + $(1)-all-legal-info \ + $(1)-all-source \ + $(1)-all-source-check \ + $(1)-build \ + $(1)-clean-for-rebuild \ + $(1)-clean-for-reconfigure \ + $(1)-clean-for-reinstall \ + $(1)-configure \ + $(1)-depends \ + $(1)-dirclean \ + $(1)-external-deps \ + $(1)-extract \ + $(1)-graph-depends \ + $(1)-install \ + $(1)-install-host \ + $(1)-install-images \ + $(1)-install-staging \ + $(1)-install-target \ + $(1)-legal-info \ + $(1)-patch \ + $(1)-rebuild \ + $(1)-reconfigure \ + $(1)-reinstall \ + $(1)-rsync \ + $(1)-show-depends \ + $(1)-show-version \ + $(1)-source \ + $(1)-source-check + +ifeq ($$(patsubst %/,ERROR,$$($(2)_SITE)),ERROR) +$$(error $(2)_SITE ($$($(2)_SITE)) cannot have a trailing slash) +endif + +endif # $(2)_KCONFIG_VAR +endef # inner-generic-package + +################################################################################ +# generic-package -- the target generator macro for generic packages +################################################################################ + +# In the case of target packages, keep the package name "pkg" +generic-package = $(call inner-generic-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target) +# In the case of host packages, turn the package name "pkg" into "host-pkg" +host-generic-package = $(call inner-generic-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host) + +# :mode=makefile: diff --git a/package/pkg-kconfig.mk b/package/pkg-kconfig.mk new file mode 100644 index 0000000000..b0f51789c3 --- /dev/null +++ b/package/pkg-kconfig.mk @@ -0,0 +1,236 @@ +################################################################################ +# Kconfig package infrastructure +# +# This file implements an infrastructure that eases development of +# package .mk files for packages that use kconfig for configuration files. +# It is based on the generic-package infrastructure, and inherits all of its +# features. +# +# See the Buildroot documentation for details on the usage of this +# infrastructure. +# +################################################################################ + +################################################################################ +# inner-kconfig-package -- generates the make targets needed to support a +# kconfig package +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including a HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the type (target or host) +################################################################################ + +define inner-kconfig-package + +# Call the generic package infrastructure to generate the necessary +# make targets. +# Note: this must be done _before_ attempting to use $$($(2)_DIR) in a +# dependency expression +$(call inner-generic-package,$(1),$(2),$(3),$(4)) + +# Default values +$(2)_KCONFIG_EDITORS ?= menuconfig +$(2)_KCONFIG_OPTS ?= +$(2)_KCONFIG_FIXUP_CMDS ?= +$(2)_KCONFIG_FRAGMENT_FILES ?= + +# The config file as well as the fragments could be in-tree, so before +# depending on them the package should be extracted (and patched) first. +# +# Since those files only have a order-only dependency, make would treat +# any missing one as a "force" target: +# https://www.gnu.org/software/make/manual/make.html#Force-Targets +# and would forcibly any rule that depend on those files, causing a +# rebuild of the kernel each time make is called. +# +# So, we provide a recipe that checks all of those files exist, to +# overcome that standard make behaviour. +# +$$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES): | $(1)-patch + for f in $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES); do \ + if [ ! -f "$$$${f}" ]; then \ + printf "Kconfig fragment '%s' for '%s' does not exist\n" "$$$${f}" "$(1)"; \ + exit 1; \ + fi; \ + done + +$(2)_KCONFIG_MAKE = \ + $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) $$($(2)_KCONFIG_OPTS) + +# $(2)_KCONFIG_MAKE may already rely on shell expansion. As the $() syntax +# of the shell conflicts with Make's own syntax, this means that backticks +# are used with those shell constructs. Unfortunately, the backtick syntax +# does not nest, and we need to use Make instead of the shell to handle +# conditions. + +# A recursively expanded variable is necessary, to be sure that the shell +# command is called when the rule is processed during the build and not +# when the rule is created when parsing all packages. +$(2)_KCONFIG_RULES = \ + $$(shell $$($(2)_KCONFIG_MAKE) -pn config 2>/dev/null | \ + sed 's/^\([_0-9a-zA-Z]*config\):.*/\1/ p; d') + +# The correct way to regenerate a .config file is to use 'make olddefconfig'. +# For historical reasons, the target name is 'oldnoconfig' between Linux kernel +# versions 2.6.36 and 3.6, and remains as an alias in later versions. +# In older versions, and in some other projects that use kconfig, the target is +# not supported at all, and we use 'yes "" | make oldconfig' as a fallback +# only, as this can fail in complex cases. +define $(2)_REGEN_DOT_CONFIG + $$(if $$(filter olddefconfig,$$($(2)_KCONFIG_RULES)), + $$(Q)$$($(2)_KCONFIG_MAKE) olddefconfig, + $$(if $$(filter oldnoconfig,$$($(2)_KCONFIG_RULES)), + $$(Q)$$($(2)_KCONFIG_MAKE) oldnoconfig, + $$(Q)(yes "" | $$($(2)_KCONFIG_MAKE) oldconfig))) +endef + +# The specified source configuration file and any additional configuration file +# fragments are merged together to .config, after the package has been patched. +# Since the file could be a defconfig file it needs to be expanded to a +# full .config first. +$$($(2)_DIR)/.config: $$($(2)_KCONFIG_FILE) $$($(2)_KCONFIG_FRAGMENT_FILES) + $$(Q)$$(if $$($(2)_KCONFIG_DEFCONFIG), \ + $$($(2)_KCONFIG_MAKE) $$($(2)_KCONFIG_DEFCONFIG), \ + cp $$($(2)_KCONFIG_FILE) $$(@)) + $$(Q)support/kconfig/merge_config.sh -m -O $$(@D) \ + $$(@) $$($(2)_KCONFIG_FRAGMENT_FILES) + $$($(2)_REGEN_DOT_CONFIG) + +# If _KCONFIG_FILE or _KCONFIG_FRAGMENT_FILES exists, this dependency is +# already implied, but if we only have a _KCONFIG_DEFCONFIG we have to add +# it explicitly. It doesn't hurt to always have it though. +$$($(2)_DIR)/.config: | $(1)-patch + +# In order to get a usable, consistent configuration, some fixup may be needed. +# The exact rules are specified by the package .mk file. +define $(2)_FIXUP_DOT_CONFIG + $$($(2)_KCONFIG_FIXUP_CMDS) + $$($(2)_REGEN_DOT_CONFIG) + $$(Q)touch $$($(2)_DIR)/.stamp_kconfig_fixup_done +endef + +$$($(2)_DIR)/.stamp_kconfig_fixup_done: $$($(2)_DIR)/.config + $$($(2)_FIXUP_DOT_CONFIG) + +# Before running configure, the configuration file should be present and fixed +$$($(2)_TARGET_CONFIGURE): $$($(2)_DIR)/.stamp_kconfig_fixup_done + +# Only enable the foo-*config targets when the package is actually enabled. +# Note: the variable $(2)_KCONFIG_VAR is not related to the kconfig +# infrastructure, but defined by pkg-generic.mk. The generic infrastructure is +# already called above, so we can effectively use this variable. +ifeq ($$($$($(2)_KCONFIG_VAR)),y) + +ifeq ($$(BR_BUILDING),y) +# Either FOO_KCONFIG_FILE or FOO_KCONFIG_DEFCONFIG is required... +ifeq ($$(or $$($(2)_KCONFIG_FILE),$$($(2)_KCONFIG_DEFCONFIG)),) +$$(error Internal error: no value specified for $(2)_KCONFIG_FILE or $(2)_KCONFIG_DEFCONFIG) +endif +# ... but not both: +ifneq ($$(and $$($(2)_KCONFIG_FILE),$$($(2)_KCONFIG_DEFCONFIG)),) +$$(error Internal error: $(2)_KCONFIG_FILE and $(2)_KCONFIG_DEFCONFIG are mutually exclusive but both are defined) +endif +endif + +# For the configurators, we do want to use the system-provided host +# tools, not the ones we build. This is particularly true for +# pkg-config; if we use our pkg-config (from host-pkgconf), then it +# would not look for the .pc from the host, but we do need them, +# especially to find ncurses, GTK+, Qt (resp. for menuconfig and +# nconfig, gconfig, xconfig). +# So we simply remove our PATH and PKG_CONFIG_* variables. +$(2)_CONFIGURATOR_MAKE_ENV = \ + $$(filter-out PATH=% PKG_CONFIG=% PKG_CONFIG_SYSROOT_DIR=% PKG_CONFIG_LIBDIR=%,$$($(2)_MAKE_ENV)) \ + PKG_CONFIG_PATH="$(HOST_PKG_CONFIG_PATH)" + +# Configuration editors (menuconfig, ...) +# +# We need to apply the configuration fixups right after a configuration +# editor exits, so that it is possible to save the configuration right +# after exiting an editor, and so the user always sees a .config file +# that is clean wrt. our requirements. +# +# Because commands in $(1)_FIXUP_KCONFIG are probably using $(@D), we +# need to have a valid @D set. But, because the configurators rules are +# not real files and do not contain the path to the package build dir, +# @D would be just '.' in this case. So, we use an intermediate rule +# with a stamp-like file which path is in the package build dir, so we +# end up having a valid @D. +# +$$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)): $(1)-%: $$($(2)_DIR)/.kconfig_editor_% +$$($(2)_DIR)/.kconfig_editor_%: $$($(2)_DIR)/.stamp_kconfig_fixup_done + $$($(2)_CONFIGURATOR_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \ + $$($(2)_KCONFIG_OPTS) $$(*) + rm -f $$($(2)_DIR)/.stamp_{kconfig_fixup_done,configured,built} + rm -f $$($(2)_DIR)/.stamp_{target,staging,images}_installed + $$($(2)_FIXUP_DOT_CONFIG) + +# Saving back the configuration +# +# Ideally, that should directly depend on $$($(2)_DIR)/.stamp_kconfig_fixup_done, +# but that breaks the use-case in PR-8156 (from a clean tree): +# make menuconfig <- enable kernel, use an in-tree defconfig, save and exit +# make linux-menuconfig <- enable/disable whatever option, save and exit +# make menuconfig <- change to use a custom defconfig file, set a path, save and exit +# make linux-update-config <- should save to the new custom defconfig file +# +# Because of that use-case, saving the configuration can *not* directly +# depend on the stamp file, because it itself depends on the .config, +# which in turn depends on the (newly-set an non-existent) custom +# defconfig file. +# +# Instead, we use an PHONY rule that will catch that situation. +# +$(1)-check-configuration-done: + @if [ ! -f $$($(2)_DIR)/.stamp_kconfig_fixup_done ]; then \ + echo "$(1) is not yet configured"; \ + exit 1; \ + fi + +$(1)-savedefconfig: $(1)-check-configuration-done + $$($(2)_MAKE_ENV) $$(MAKE) -C $$($(2)_DIR) \ + $$($(2)_KCONFIG_OPTS) savedefconfig + +# Target to copy back the configuration to the source configuration file +# Even though we could use 'cp --preserve-timestamps' here, the separate +# cp and 'touch --reference' is used for symmetry with $(1)-update-defconfig. +$(1)-update-config: $(1)-check-configuration-done + @$$(if $$($(2)_KCONFIG_FRAGMENT_FILES), \ + echo "Unable to perform $(1)-update-config when fragment files are set"; exit 1) + @$$(if $$($(2)_KCONFIG_DEFCONFIG), \ + echo "Unable to perform $(1)-update-config when using a defconfig rule"; exit 1) + cp -f $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE) + touch --reference $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE) + +# Note: make sure the timestamp of the stored configuration is not newer than +# the .config to avoid a useless rebuild. Note that, contrary to +# $(1)-update-config, the reference for 'touch' is _not_ the file from which +# we copy. +$(1)-update-defconfig: $(1)-savedefconfig + @$$(if $$($(2)_KCONFIG_FRAGMENT_FILES), \ + echo "Unable to perform $(1)-update-defconfig when fragment files are set"; exit 1) + @$$(if $$($(2)_KCONFIG_DEFCONFIG), \ + echo "Unable to perform $(1)-update-defconfig when using a defconfig rule"; exit 1) + cp -f $$($(2)_DIR)/defconfig $$($(2)_KCONFIG_FILE) + touch --reference $$($(2)_DIR)/.config $$($(2)_KCONFIG_FILE) + +endif # package enabled + +.PHONY: \ + $(1)-update-config \ + $(1)-update-defconfig \ + $(1)-savedefconfig \ + $(1)-check-configuration-done \ + $$($(2)_DIR)/.kconfig_editor_% \ + $$(addprefix $(1)-,$$($(2)_KCONFIG_EDITORS)) + +endef # inner-kconfig-package + +################################################################################ +# kconfig-package -- the target generator macro for kconfig packages +################################################################################ + +kconfig-package = $(call inner-kconfig-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target) diff --git a/package/pkg-kernel-module.mk b/package/pkg-kernel-module.mk new file mode 100644 index 0000000000..200c91dfef --- /dev/null +++ b/package/pkg-kernel-module.mk @@ -0,0 +1,101 @@ +################################################################################ +# kernel module infrastructure for building Linux kernel modules +# +# This file implements an infrastructure that eases development of package +# .mk files for out-of-tree Linux kernel modules. It should be used for all +# packages that build a Linux kernel module using the kernel's out-of-tree +# buildsystem, unless they use a complex custom buildsystem. +# +# The kernel-module infrastructure requires the packages that use it to also +# use another package infrastructure. kernel-module only defines post-build +# and post-install hooks. This allows the package to build both kernel +# modules and/or user-space components (with any of the other *-package +# infra). +# +# As such, it is to be used in conjunction with another *-package infra, +# like so: +# +# $(eval $(kernel-module)) +# $(eval $(generic-package)) +# +# Note: if the caller needs access to the kernel modules (either after they +# are built or after they are installed), it will have to define its own +# post-build/install hooks *after* calling kernel-module, but *before* +# calling the other *-package infra, like so: +# +# $(eval $(kernel-module)) +# define FOO_MOD_TWEAK +# # do something +# endef +# FOO_POST_BUILD_HOOKS += FOO_MOD_TWEAK +# $(eval $(generic-package)) +# +# Note: this infra does not check that the kernel is enabled; it is expected +# to be enforced at the Kconfig level with proper 'depends on'. +################################################################################ + +################################################################################ +# inner-kernel-module -- generates the make targets needed to support building +# a kernel module +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name +################################################################################ + +define inner-kernel-module + +# If the package is enabled, ensure the kernel will support modules +ifeq ($$(BR2_PACKAGE_$(2)),y) +LINUX_NEEDS_MODULES = y +endif + +# The kernel must be built first. +$(2)_DEPENDENCIES += linux + +# This is only defined in some infrastructures (e.g. autotools, cmake), +# but not in others (e.g. generic). So define it here as well. +$(2)_MAKE ?= $$(MAKE) + +# If not specified, consider the source of the kernel module to be at +# the root of the package. +$(2)_MODULE_SUBDIRS ?= . + +# Build the kernel module(s) +# Force PWD for those packages that want to use it to find their +# includes and other support files (Booo!) +define $(2)_KERNEL_MODULES_BUILD + @$$(call MESSAGE,"Building kernel module(s)") + $$(foreach d,$$($(2)_MODULE_SUBDIRS), \ + $$(LINUX_MAKE_ENV) $$($$(PKG)_MAKE) \ + -C $$(LINUX_DIR) \ + $$(LINUX_MAKE_FLAGS) \ + $$($(2)_MODULE_MAKE_OPTS) \ + PWD=$$(@D)/$$(d) \ + M=$$(@D)/$$(d) \ + modules$$(sep)) +endef +$(2)_POST_BUILD_HOOKS += $(2)_KERNEL_MODULES_BUILD + +# Install the kernel module(s) +# Force PWD for those packages that want to use it to find their +# includes and other support files (Booo!) +define $(2)_KERNEL_MODULES_INSTALL + @$$(call MESSAGE,"Installing kernel module(s)") + $$(foreach d,$$($(2)_MODULE_SUBDIRS), \ + $$(LINUX_MAKE_ENV) $$($$(PKG)_MAKE) \ + -C $$(LINUX_DIR) \ + $$(LINUX_MAKE_FLAGS) \ + $$($(2)_MODULE_MAKE_OPTS) \ + PWD=$$(@D)/$$(d) \ + M=$$(@D)/$$(d) \ + modules_install$$(sep)) +endef +$(2)_POST_INSTALL_TARGET_HOOKS += $(2)_KERNEL_MODULES_INSTALL + +endef + +################################################################################ +# kernel-module -- the target generator macro for kernel module packages +################################################################################ + +kernel-module = $(call inner-kernel-module,$(pkgname),$(call UPPERCASE,$(pkgname))) diff --git a/package/pkg-luarocks.mk b/package/pkg-luarocks.mk new file mode 100644 index 0000000000..da5c912c81 --- /dev/null +++ b/package/pkg-luarocks.mk @@ -0,0 +1,81 @@ +################################################################################ +# LuaRocks package infrastructure +# see http://luarocks.org/ +# +# This file implements an infrastructure that eases development of +# package .mk files for LuaRocks packages. +# LuaRocks supports various build.type : builtin, make, cmake. +# This luarocks infrastructure supports only the builtin mode, +# the make & cmake modes could be directly handled by generic & cmake infrastructure. +# +# See the Buildroot documentation for details on the usage of this +# infrastructure +# +# In terms of implementation, this LuaRocks infrastructure requires +# the .mk file to only specify metadata information about the +# package: name, version, etc. +# +################################################################################ + +################################################################################ +# inner-luarocks-package -- defines how the configuration, compilation and +# installation of a LuaRocks package should be done, implements a few hooks to +# tune the build process and calls the generic package infrastructure to +# generate the necessary make targets +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including a HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the type (target or host) +################################################################################ + +define inner-luarocks-package + +$(2)_BUILD_OPTS ?= +$(2)_SUBDIR ?= $(1)-$$(shell echo "$$($(3)_VERSION)" | sed -e "s/-[0-9]$$$$//") +$(2)_ROCKSPEC ?= $(1)-$$($(3)_VERSION).rockspec +$(2)_SOURCE ?= $(1)-$$($(3)_VERSION).src.rock +$(2)_SITE ?= $$(call qstrip,$$(BR2_LUAROCKS_MIRROR)) + +# Since we do not support host-luarocks-package, we know this is +# a target package, and can just add the required dependencies +$(2)_DEPENDENCIES += host-luarocks luainterpreter + +# +# Extract step +# +ifndef $(2)_EXTRACT_CMDS +define $(2)_EXTRACT_CMDS + cd $$($(2)_DIR)/.. && \ + $$(LUAROCKS_RUN_ENV) $$(LUAROCKS_RUN_CMD) unpack --force $$(DL_DIR)/$$($(2)_SOURCE) +endef +endif + +# +# Build/install step. +# +ifndef $(2)_INSTALL_TARGET_CMDS +define $(2)_INSTALL_TARGET_CMDS + cd $$($(2)_SRCDIR) && $$(LUAROCKS_RUN_ENV) flock $$(TARGET_DIR) \ + $$(LUAROCKS_RUN_CMD) make --keep $$($(2)_ROCKSPEC) $$($(2)_BUILD_OPTS) +endef +endif + +# Call the generic package infrastructure to generate the necessary +# make targets +$(call inner-generic-package,$(1),$(2),$(3),$(4)) + +# $(2)_DEPENDENCIES are handled for configure step (too late) +# but host-luarocks is required to do the extract +$$($(2)_TARGET_EXTRACT): | host-luarocks + +endef + +################################################################################ +# luarocks-package -- the target generator macro for LuaRocks packages +################################################################################ + +luarocks-package = $(call inner-luarocks-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target) +# host-luarocks-package not supported diff --git a/package/pkg-perl.mk b/package/pkg-perl.mk new file mode 100644 index 0000000000..a027810156 --- /dev/null +++ b/package/pkg-perl.mk @@ -0,0 +1,199 @@ +################################################################################ +# Perl package infrastructure +# +# This file implements an infrastructure that eases development of +# package .mk files for Perl packages. +# +# See the Buildroot documentation for details on the usage of this +# infrastructure +# +# In terms of implementation, this perl infrastructure requires +# the .mk file to only specify metadata information about the +# package: name, version, download URL, etc. +# +# We still allow the package .mk file to override what the different +# steps are doing, if needed. For example, if _BUILD_CMDS is +# already defined, it is used as the list of commands to perform to +# build the package, instead of the default perl behaviour. The +# package can also define some post operation hooks. +# +################################################################################ + +PERL_ARCHNAME = $(ARCH)-linux +PERL_RUN = PERL5LIB= $(HOST_DIR)/usr/bin/perl + +################################################################################ +# inner-perl-package -- defines how the configuration, compilation and +# installation of a perl package should be done, implements a +# few hooks to tune the build process for perl specifities and +# calls the generic package infrastructure to generate the necessary +# make targets +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including a HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the type (target or host) +################################################################################ + +define inner-perl-package + +# Target packages need both the perl interpreter on the target (for +# runtime) and the perl interpreter on the host (for +# compilation). However, host packages only need the perl +# interpreter on the host. +ifeq ($(4),target) +$(2)_DEPENDENCIES += host-perl perl +else +$(2)_DEPENDENCIES += host-perl +endif + +# +# Configure step. Only define it if not already defined by the package +# .mk file. And take care of the differences between host and target +# packages. +# +ifndef $(2)_CONFIGURE_CMDS +ifeq ($(4),target) + +# Configure package for target +define $(2)_CONFIGURE_CMDS + cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ + $$($(2)_CONF_ENV) \ + PERL_MM_USE_DEFAULT=1 \ + $$(PERL_RUN) Build.PL \ + --config ar="$$(TARGET_AR)" \ + --config full_ar="$$(TARGET_AR)" \ + --config cc="$$(TARGET_CC)" \ + --config ccflags="$$(TARGET_CFLAGS)" \ + --config optimize=" " \ + --config ld="$$(TARGET_CC)" \ + --config lddlflags="-shared $$(TARGET_LDFLAGS)" \ + --config ldflags="$$(TARGET_LDFLAGS)" \ + --include_dirs $$(STAGING_DIR)/usr/lib/perl5/$$(PERL_VERSION)/$$(PERL_ARCHNAME)/CORE \ + --destdir $$(TARGET_DIR) \ + --installdirs vendor \ + --install_path lib=/usr/lib/perl5/site_perl/$$(PERL_VERSION) \ + --install_path arch=/usr/lib/perl5/site_perl/$$(PERL_VERSION)/$$(PERL_ARCHNAME) \ + --install_path bin=/usr/bin \ + --install_path script=/usr/bin \ + --install_path bindoc=/usr/share/man/man1 \ + --install_path libdoc=/usr/share/man/man3 \ + $$($(2)_CONF_OPTS); \ + else \ + $$($(2)_CONF_ENV) \ + PERL_MM_USE_DEFAULT=1 \ + PERL_AUTOINSTALL=--skipdeps \ + $$(PERL_RUN) Makefile.PL \ + AR="$$(TARGET_AR)" \ + FULL_AR="$$(TARGET_AR)" \ + CC="$$(TARGET_CC)" \ + CCFLAGS="$$(TARGET_CFLAGS)" \ + OPTIMIZE=" " \ + LD="$$(TARGET_CC)" \ + LDDLFLAGS="-shared $$(TARGET_LDFLAGS)" \ + LDFLAGS="$$(TARGET_LDFLAGS)" \ + DESTDIR=$$(TARGET_DIR) \ + INSTALLDIRS=vendor \ + INSTALLVENDORLIB=/usr/lib/perl5/site_perl/$$(PERL_VERSION) \ + INSTALLVENDORARCH=/usr/lib/perl5/site_perl/$$(PERL_VERSION)/$$(PERL_ARCHNAME) \ + INSTALLVENDORBIN=/usr/bin \ + INSTALLVENDORSCRIPT=/usr/bin \ + INSTALLVENDORMAN1DIR=/usr/share/man/man1 \ + INSTALLVENDORMAN3DIR=/usr/share/man/man3 \ + $$($(2)_CONF_OPTS); \ + fi +endef +else + +# Configure package for host +define $(2)_CONFIGURE_CMDS + cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ + $$($(2)_CONF_ENV) \ + PERL_MM_USE_DEFAULT=1 \ + $$(PERL_RUN) Build.PL \ + $$($(2)_CONF_OPTS); \ + else \ + $$($(2)_CONF_ENV) \ + PERL_MM_USE_DEFAULT=1 \ + PERL_AUTOINSTALL=--skipdeps \ + $$(PERL_RUN) Makefile.PL \ + $$($(2)_CONF_OPTS); \ + fi +endef +endif +endif + +# +# Build step. Only define it if not already defined by the package .mk +# file. And take care of the differences between host and target +# packages. +# +ifndef $(2)_BUILD_CMDS +ifeq ($(4),target) + +# Build package for target +define $(2)_BUILD_CMDS + cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ + $$(PERL_RUN) Build $$($(2)_BUILD_OPTS) build; \ + else \ + $$(MAKE1) \ + PERL_INC=$$(STAGING_DIR)/usr/lib/perl5/$$(PERL_VERSION)/$$(PERL_ARCHNAME)/CORE \ + FIXIN=: \ + $$($(2)_BUILD_OPTS) pure_all; \ + fi +endef +else + +# Build package for host +define $(2)_BUILD_CMDS + cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ + $$(PERL_RUN) Build $$($(2)_BUILD_OPTS) build; \ + else \ + $$(MAKE1) $$($(2)_BUILD_OPTS) pure_all; \ + fi +endef +endif +endif + +# +# Host installation step. Only define it if not already defined by the +# package .mk file. +# +ifndef $(2)_INSTALL_CMDS +define $(2)_INSTALL_CMDS + cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ + $$(PERL_RUN) Build $$($(2)_INSTALL_TARGET_OPTS) install; \ + else \ + $$(MAKE1) $$($(2)_INSTALL_TARGET_OPTS) pure_install; \ + fi +endef +endif + +# +# Target installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_TARGET_CMDS +define $(2)_INSTALL_TARGET_CMDS + cd $$($$(PKG)_SRCDIR) && if [ -f Build.PL ] ; then \ + $$(PERL_RUN) Build $$($(2)_INSTALL_TARGET_OPTS) install; \ + else \ + $$(MAKE1) $$($(2)_INSTALL_TARGET_OPTS) pure_install; \ + fi +endef +endif + +# Call the generic package infrastructure to generate the necessary +# make targets +$(call inner-generic-package,$(1),$(2),$(3),$(4)) + +endef + +################################################################################ +# perl-package -- the target generator macro for Perl packages +################################################################################ + +perl-package = $(call inner-perl-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target) +host-perl-package = $(call inner-perl-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host) diff --git a/package/pkg-python.mk b/package/pkg-python.mk new file mode 100644 index 0000000000..b7a702d0f7 --- /dev/null +++ b/package/pkg-python.mk @@ -0,0 +1,287 @@ +################################################################################ +# Python package infrastructure +# +# This file implements an infrastructure that eases development of +# package .mk files for Python packages. It should be used for all +# packages that use Python setup.py/setuptools as their build system. +# +# See the Buildroot documentation for details on the usage of this +# infrastructure +# +# In terms of implementation, this Python infrastructure requires the +# .mk file to only specify metadata information about the package: +# name, version, download URL, etc. +# +# We still allow the package .mk file to override what the different +# steps are doing, if needed. For example, if _BUILD_CMDS is +# already defined, it is used as the list of commands to perform to +# build the package, instead of the default Python behaviour. The +# package can also define some post operation hooks. +# +################################################################################ + +# Target distutils-based packages +PKG_PYTHON_DISTUTILS_ENV = \ + PATH=$(BR_PATH) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + LDSHARED="$(TARGET_CROSS)gcc -shared" \ + PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \ + _python_sysroot=$(STAGING_DIR) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr + +PKG_PYTHON_DISTUTILS_BUILD_OPTS = \ + --executable=/usr/bin/python + +PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS = \ + --prefix=$(TARGET_DIR)/usr + +PKG_PYTHON_DISTUTILS_INSTALL_STAGING_OPTS = \ + --prefix=$(STAGING_DIR)/usr + +# Host distutils-based packages +HOST_PKG_PYTHON_DISTUTILS_ENV = \ + PATH=$(BR_PATH) + +HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS = \ + --prefix=$(HOST_DIR)/usr + +# Target setuptools-based packages +PKG_PYTHON_SETUPTOOLS_ENV = \ + PATH=$(BR_PATH) \ + PYTHONPATH="$(if $(BR2_PACKAGE_PYTHON3),$(PYTHON3_PATH),$(PYTHON_PATH))" \ + _python_sysroot=$(STAGING_DIR) \ + _python_prefix=/usr \ + _python_exec_prefix=/usr + +PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS = \ + --prefix=$(TARGET_DIR)/usr \ + --executable=/usr/bin/python \ + --single-version-externally-managed \ + --root=/ + +PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_OPTS = \ + --prefix=$(STAGING_DIR)/usr \ + --executable=/usr/bin/python \ + --single-version-externally-managed \ + --root=/ + +# Host setuptools-based packages +HOST_PKG_PYTHON_SETUPTOOLS_ENV = \ + PATH=$(BR_PATH) + +HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS = \ + --prefix=$(HOST_DIR)/usr + +################################################################################ +# inner-python-package -- defines how the configuration, compilation +# and installation of a Python package should be done, implements a +# few hooks to tune the build process and calls the generic package +# infrastructure to generate the necessary make targets +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including a HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the type (target or host) +################################################################################ + +define inner-python-package + +$(2)_SRCDIR = $$($(2)_DIR)/$$($(2)_SUBDIR) +$(2)_BUILDDIR = $$($(2)_SRCDIR) + +$(2)_ENV ?= +$(2)_BUILD_OPTS ?= +$(2)_INSTALL_OPTS ?= + +ifndef $(2)_SETUP_TYPE + ifdef $(3)_SETUP_TYPE + $(2)_SETUP_TYPE = $$($(3)_SETUP_TYPE) + else + $$(error "$(2)_SETUP_TYPE must be set") + endif +endif + +# Distutils +ifeq ($$($(2)_SETUP_TYPE),distutils) +ifeq ($(4),target) +$(2)_BASE_ENV = $$(PKG_PYTHON_DISTUTILS_ENV) +$(2)_BASE_BUILD_TGT = build +$(2)_BASE_BUILD_OPTS = $$(PKG_PYTHON_DISTUTILS_BUILD_OPTS) +$(2)_BASE_INSTALL_TARGET_OPTS = $$(PKG_PYTHON_DISTUTILS_INSTALL_TARGET_OPTS) +$(2)_BASE_INSTALL_STAGING_OPTS = $$(PKG_PYTHON_DISTUTILS_INSTALL_STAGING_OPTS) +else +$(2)_BASE_ENV = $$(HOST_PKG_PYTHON_DISTUTILS_ENV) +$(2)_BASE_BUILD_TGT = build +$(2)_BASE_BUILD_OPTS = +$(2)_BASE_INSTALL_OPTS = $$(HOST_PKG_PYTHON_DISTUTILS_INSTALL_OPTS) +endif +# Setuptools +else ifeq ($$($(2)_SETUP_TYPE),setuptools) +ifeq ($(4),target) +$(2)_BASE_ENV = $$(PKG_PYTHON_SETUPTOOLS_ENV) +$(2)_BASE_BUILD_TGT = build +$(2)_BASE_BUILD_OPTS = +$(2)_BASE_INSTALL_TARGET_OPTS = $$(PKG_PYTHON_SETUPTOOLS_INSTALL_TARGET_OPTS) +$(2)_BASE_INSTALL_STAGING_OPTS = $$(PKG_PYTHON_SETUPTOOLS_INSTALL_STAGING_OPTS) +else +$(2)_BASE_ENV = $$(HOST_PKG_PYTHON_SETUPTOOLS_ENV) +$(2)_BASE_BUILD_TGT = build +$(2)_BASE_BUILD_OPTS = +$(2)_BASE_INSTALL_OPTS = $$(HOST_PKG_PYTHON_SETUPTOOLS_INSTALL_OPTS) +endif +else +$$(error "Invalid $(2)_SETUP_TYPE. Valid options are 'distutils' or 'setuptools'") +endif + +# The below statement intends to calculate the dependencies of host +# packages by derivating them from the dependencies of the +# corresponding target package, after adding the 'host-' prefix in +# front of the dependencies. +# +# However it must be repeated from inner-generic-package, as we need +# to exclude the python, host-python and host-python-setuptools +# packages, which are added below in the list of dependencies +# depending on the package characteristics, and shouldn't be derived +# automatically from the dependencies of the corresponding target +# package. +ifeq ($(4),host) +$(2)_DEPENDENCIES ?= $$(filter-out host-python host-python3 host-python-setuptools host-skeleton host-toolchain $(1),$$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES)))) +endif + +# Target packages need both the python interpreter on the target (for +# runtime) and the python interpreter on the host (for +# compilation). However, host packages only need the python +# interpreter on the host, whose version may be enforced by setting +# the *_NEEDS_HOST_PYTHON variable. +# +# So: +# - for target packages, we always depend on the default python interpreter +# (the one selected by the config); +# - for host packages: +# - if *_NEEDS_HOST_PYTHON is not set, then we depend on use the default +# interperter; +# - otherwise, we depend on the one requested by *_NEEDS_HOST_PYTHON. +# +ifeq ($(4),target) +$(2)_DEPENDENCIES += $$(if $$(BR2_PACKAGE_PYTHON3),host-python3 python3,host-python python) +else +ifeq ($$($(2)_NEEDS_HOST_PYTHON),) +$(2)_DEPENDENCIES += $$(if $$(BR2_PACKAGE_PYTHON3),host-python3,host-python) +else +ifeq ($$($(2)_NEEDS_HOST_PYTHON),python2) +$(2)_DEPENDENCIES += host-python +else ifeq ($$($(2)_NEEDS_HOST_PYTHON),python3) +$(2)_DEPENDENCIES += host-python3 +else +$$(error Incorrect value '$$($(2)_NEEDS_HOST_PYTHON)' for $(2)_NEEDS_HOST_PYTHON) +endif +endif # ($$($(2)_NEEDS_HOST_PYTHON),) +endif # ($(4),target) + +# Setuptools based packages will need host-python-setuptools (both +# host and target). We need to have a special exclusion for the +# host-setuptools package itself: it is setuptools-based, but +# shouldn't depend on host-setuptools (because it would otherwise +# depend on itself!). +ifeq ($$($(2)_SETUP_TYPE),setuptools) +ifneq ($(2),HOST_PYTHON_SETUPTOOLS) +$(2)_DEPENDENCIES += host-python-setuptools +endif +endif + +# Python interpreter to use for building the package. +# +# We may want to specify the python interpreter to be used for building a +# package, especially for host-packages (target packages must be built using +# the same version of the interpreter as the one installed on the target). +# +# So: +# - for target packages, we always use the default python interpreter (which +# is the same version as the one built and installed on the target); +# - for host packages: +# - if *_NEEDS_HOST_PYTHON is not set, then we use use the default +# interperter; +# - otherwise, we use the one requested by *_NEEDS_HOST_PYTHON. +# +ifeq ($(4),target) +$(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/usr/bin/python +else +ifeq ($$($(2)_NEEDS_HOST_PYTHON),) +$(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/usr/bin/python +else +$(2)_PYTHON_INTERPRETER = $$(HOST_DIR)/usr/bin/$$($(2)_NEEDS_HOST_PYTHON) +endif +endif + +# +# Build step. Only define it if not already defined by the package .mk +# file. +# +ifndef $(2)_BUILD_CMDS +define $(2)_BUILD_CMDS + (cd $$($$(PKG)_BUILDDIR)/; \ + $$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \ + $$($(2)_PYTHON_INTERPRETER) setup.py \ + $$($$(PKG)_BASE_BUILD_TGT) \ + $$($$(PKG)_BASE_BUILD_OPTS) $$($$(PKG)_BUILD_OPTS)) +endef +endif + +# +# Host installation step. Only define it if not already defined by the +# package .mk file. +# +ifndef $(2)_INSTALL_CMDS +define $(2)_INSTALL_CMDS + (cd $$($$(PKG)_BUILDDIR)/; \ + $$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \ + $$($(2)_PYTHON_INTERPRETER) setup.py install \ + $$($$(PKG)_BASE_INSTALL_OPTS) $$($$(PKG)_INSTALL_OPTS)) +endef +endif + +# +# Target installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_TARGET_CMDS +define $(2)_INSTALL_TARGET_CMDS + (cd $$($$(PKG)_BUILDDIR)/; \ + $$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \ + $$($(2)_PYTHON_INTERPRETER) setup.py install \ + $$($$(PKG)_BASE_INSTALL_TARGET_OPTS) \ + $$($$(PKG)_INSTALL_TARGET_OPTS)) +endef +endif + +# +# Staging installation step. Only define it if not already defined by +# the package .mk file. +# +ifndef $(2)_INSTALL_STAGING_CMDS +define $(2)_INSTALL_STAGING_CMDS + (cd $$($$(PKG)_BUILDDIR)/; \ + $$($$(PKG)_BASE_ENV) $$($$(PKG)_ENV) \ + $$($(2)_PYTHON_INTERPRETER) setup.py install \ + $$($$(PKG)_BASE_INSTALL_STAGING_OPTS) \ + $$($$(PKG)_INSTALL_STAGING_OPTS)) +endef +endif + +# Call the generic package infrastructure to generate the necessary +# make targets +$(call inner-generic-package,$(1),$(2),$(3),$(4)) + +endef + +################################################################################ +# python-package -- the target generator macro for Python packages +################################################################################ + +python-package = $(call inner-python-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target) +host-python-package = $(call inner-python-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host) diff --git a/package/pkg-rebar.mk b/package/pkg-rebar.mk new file mode 100644 index 0000000000..44c6d6c8d2 --- /dev/null +++ b/package/pkg-rebar.mk @@ -0,0 +1,255 @@ +################################################################################ +# rebar package infrastructure for Erlang packages +# +# This file implements an infrastructure that eases development of +# package .mk files for rebar packages. It should be used for all +# packages that use rebar as their build system. +# +# In terms of implementation, this rebar infrastructure requires the +# .mk file to only specify metadata information about the package: +# name, version, download URL, etc. +# +# We still allow the package .mk file to override what the different +# steps are doing, if needed. For example, if _BUILD_CMDS is +# already defined, it is used as the list of commands to perform to +# build the package, instead of the default rebar behaviour. The +# package can also define some post operation hooks. +# +################################################################################ + +# Directories to store rebar dependencies in. +# +# These directories actually only contain symbolic links to Erlang +# applications in either $(HOST_DIR) or $(STAGING_DIR). One needs +# them to avoid rebar complaining about missing dependencies, as this +# infrastructure tells rebar to NOT download dependencies during +# the build stage. +# +REBAR_HOST_DEPS_DIR = $(HOST_DIR)/usr/share/rebar/deps +REBAR_TARGET_DEPS_DIR = $(STAGING_DIR)/usr/share/rebar/deps + +# Tell rebar where to find the dependencies +# +REBAR_HOST_DEPS_ENV = \ + ERL_COMPILER_OPTIONS='{i, "$(REBAR_HOST_DEPS_DIR)"}' \ + ERL_EI_LIBDIR=$(HOST_DIR)/usr/lib/erlang/lib/erl_interface-$(ERLANG_EI_VSN)/lib +REBAR_TARGET_DEPS_ENV = \ + ERL_COMPILER_OPTIONS='{i, "$(REBAR_TARGET_DEPS_DIR)"}' \ + ERL_EI_LIBDIR=$(STAGING_DIR)/usr/lib/erlang/lib/erl_interface-$(ERLANG_EI_VSN)/lib + +################################################################################ +# Helper functions +################################################################################ + +# Install an Erlang application from $(@D). +# +# i.e., define a recipe that installs the "bin ebin priv $(2)" directories +# from $(@D) to $(1)$($(PKG)_ERLANG_LIBDIR). +# +# argument 1 should typically be $(HOST_DIR), $(TARGET_DIR), +# or $(STAGING_DIR). +# argument 2 is typically empty when installing in $(TARGET_DIR) and +# "include" when installing in $(HOST_DIR) or +# $(STAGING_DIR). +# +# Note: calling this function must be done with $$(call ...) because it +# expands package-related variables. +# +define install-erlang-directories + $(INSTALL) -d $(1)/$($(PKG)_ERLANG_LIBDIR) + for dir in bin ebin priv $(2); do \ + if test -d $(@D)/$$dir; then \ + cp -r $(@D)/$$dir $(1)$($(PKG)_ERLANG_LIBDIR); \ + fi; \ + done +endef + +# Setup a symbolic link in rebar's deps_dir to the actual location +# where an Erlang application is installed. +# +# i.e., define a recipe that creates a symbolic link +# from $($(PKG)_REBAR_DEPS_DIR)/$($(PKG)_ERLANG_APP) +# to $(1)$($(PKG)_ERLANG_LIBDIR). +# +# For target packages for example, one uses this to setup symbolic +# links from $(STAGING_DIR)/usr/share/rebar/deps/ to +# $(STAGING_DIR)/usr/lib/erlang/lib/-. This +# infrastructure points rebar at the former in order to tell rebar to +# NOT download dependencies during the build stage, and instead use +# the already available dependencies. +# +# Therefore, +# argument 1 is $(HOST_DIR) (for host packages) or +# $(STAGING_DIR) (for target packages). +# +# argument 2 is HOST (for host packages) or +# TARGET (for target packages). +# +# Note: calling this function must be done with $$(call ...) because it +# expands package-related variables. +# +define install-rebar-deps + $(INSTALL) -d $(REBAR_$(2)_DEPS_DIR) + ln -f -s $(1)/$($(PKG)_ERLANG_LIBDIR) \ + $(REBAR_$(2)_DEPS_DIR)/$($(PKG)_ERLANG_APP) +endef + +################################################################################ +# inner-rebar-package -- defines how the configuration, compilation +# and installation of a rebar package should be done, implements a few +# hooks to tune the build process according to rebar specifities, and +# calls the generic package infrastructure to generate the necessary +# make targets. +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including a HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the type (target or host) +# +################################################################################ + +define inner-rebar-package + +# Extract just the raw package name, lowercase without the leading +# erlang- or host- prefix, as this is used by rebar to find the +# dependencies a package specifies. +# +$(2)_ERLANG_APP = $(subst -,_,$(patsubst erlang-%,%,$(patsubst host-%,%,$(1)))) + +# Path where to store the package's libs, relative to either $(HOST_DIR) +# for host packages, or $(STAGING_DIR) for target packages. +# +$(2)_ERLANG_LIBDIR = \ + /usr/lib/erlang/lib/$$($$(PKG)_ERLANG_APP)-$$($$(PKG)_VERSION) + +# If a host package, inherit _USE_BUNDLED_REBAR from the target +# package, if not explicitly defined. Otherwise, default to NO. +ifndef $(2)_USE_BUNDLED_REBAR + ifdef $(3)_USE_BUNDLED_REBAR + $(2)_USE_BUNDLED_REBAR = $$($(3)_USE_BUNDLED_REBAR) + else + $(2)_USE_BUNDLED_REBAR ?= NO + endif +endif + +# If a host package, inherit _USE_AUTOCONF from the target +# package, if not explicitly defined. Otherwise, default to NO. +ifndef $(2)_USE_AUTOCONF + ifdef $(3)_USE_AUTOCONF + $(2)_USE_AUTOCONF = $$($(3)_USE_AUTOCONF) + else + $(2)_USE_AUTOCONF ?= NO + endif +endif + +# Define the build and install commands +# +ifeq ($(4),target) + +# Target packages need the erlang interpreter on the target +$(2)_DEPENDENCIES += erlang + +# Used only if the package uses autotools underneath; otherwise, ignored +$(2)_CONF_ENV += $$(REBAR_TARGET_DEPS_ENV) + +ifndef $(2)_BUILD_CMDS +define $(2)_BUILD_CMDS + (cd $$(@D); \ + CC="$$(TARGET_CC)" \ + CXX="$$(TARGET_CXX)" \ + CFLAGS="$$(TARGET_CFLAGS)" \ + CXXFLAGS="$$(TARGET_CXXFLAGS)" \ + LDFLAGS="$$(TARGET_LDFLAGS)" \ + $$(REBAR_TARGET_DEPS_ENV) \ + $$(TARGET_MAKE_ENV) \ + $$($$(PKG)_REBAR_ENV) $$($$(PKG)_REBAR) deps_dir=$$(REBAR_TARGET_DEPS_DIR) compile \ + ) +endef +endif + +# We need to double-$ the 'call' because it wants to expand +# package-related variables +ifndef $(2)_INSTALL_STAGING_CMDS +define $(2)_INSTALL_STAGING_CMDS + $$(call install-erlang-directories,$$(STAGING_DIR),include) + $$(call install-rebar-deps,$$(STAGING_DIR),TARGET) +endef +endif + +# We need to double-$ the 'call' because it wants to expand +# package-related variables +ifndef $(2)_INSTALL_TARGET_CMDS +define $(2)_INSTALL_TARGET_CMDS + $$(call install-erlang-directories,$$(TARGET_DIR)) +endef +endif + +else # !target + +ifeq ($$($(2)_USE_AUTOCONF),YES) +# This must be repeated from inner-autotools-package, otherwise we get +# an empty _DEPENDENCIES if _AUTORECONF is YES or _USE_BUNDLED_REBAR +# is NO. Also filter the result of _AUTORECONF and _GETTEXTIZE away +# from the non-host rule +$(2)_DEPENDENCIES ?= $$(filter-out host-automake host-autoconf host-libtool \ + host-gettext host-skeleton host-toolchain host-erlang-rebar $(1),\ + $$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES)))) +else +# Same deal, if _USE_BUNDLED_REBAR is NO. +$(2)_DEPENDENCIES ?= $$(filter-out host-skeleton host-toolchain host-erlang-rebar $(1),\ + $$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES)))) +endif + +# Host packages need the erlang interpreter on the host +$(2)_DEPENDENCIES += host-erlang + +# Used only if the package uses autotools underneath; otherwise, ignored +$(2)_CONF_ENV += $$(REBAR_HOST_DEPS_ENV) + +ifndef $(2)_BUILD_CMDS +define $(2)_BUILD_CMDS + (cd $$(@D); \ + CC="$$(HOSTCC)" \ + CFLAGS="$$(HOST_CFLAGS)" \ + LDFLAGS="$$(HOST_LDFLAGS)" \ + $$(REBAR_HOST_DEPS_ENV) \ + $$(HOST_MAKE_ENV) \ + $$($$(PKG)_REBAR_ENV) $$($$(PKG)_REBAR) deps_dir=$$(REBAR_HOST_DEPS_DIR) compile \ + ) +endef +endif + +# We need to double-$ the 'call' because it wants to expand +# package-related variables +ifndef $(2)_INSTALL_CMDS +define $(2)_INSTALL_CMDS + $$(call install-erlang-directories,$$(HOST_DIR),include) + $$(call install-rebar-deps,$$(HOST_DIR),HOST) +endef +endif + +endif # !target + +# Whether to use the generic rebar or the package's bundled rebar +# +ifeq ($$($(2)_USE_BUNDLED_REBAR),YES) +$(2)_REBAR = ./rebar +else +$(2)_REBAR = rebar +$(2)_DEPENDENCIES += host-erlang-rebar +endif + +# The package sub-infra to use +# +ifeq ($$($(2)_USE_AUTOCONF),YES) +$(call inner-autotools-package,$(1),$(2),$(3),$(4)) +else +$(call inner-generic-package,$(1),$(2),$(3),$(4)) +endif + +endef # inner-rebar-package + +rebar-package = $(call inner-rebar-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target) +host-rebar-package = $(call inner-rebar-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host) diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk new file mode 100644 index 0000000000..f88313ab53 --- /dev/null +++ b/package/pkg-utils.mk @@ -0,0 +1,152 @@ +################################################################################ +# +# This file contains various utility functions used by the package +# infrastructure, or by the packages themselves. +# +################################################################################ + +# Case conversion macros. This is inspired by the 'up' macro from gmsl +# (http://gmsl.sf.net). It is optimised very heavily because these macros +# are used a lot. It is about 5 times faster than forking a shell and tr. +# +# The caseconvert-helper creates a definition of the case conversion macro. +# After expansion by the outer $(eval ), the UPPERCASE macro is defined as: +# $(strip $(eval __tmp := $(1)) $(eval __tmp := $(subst a,A,$(__tmp))) ... ) +# In other words, every letter is substituted one by one. +# +# The caseconvert-helper allows us to create this definition out of the +# [FROM] and [TO] lists, so we don't need to write down every substition +# manually. The uses of $ and $$ quoting are chosen in order to do as +# much expansion as possible up-front. +# +# Note that it would be possible to conceive a slightly more optimal +# implementation that avoids the use of __tmp, but that would be even +# more unreadable and is not worth the effort. + +[FROM] := a b c d e f g h i j k l m n o p q r s t u v w x y z - . +[TO] := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z _ _ + +define caseconvert-helper +$(1) = $$(strip \ + $$(eval __tmp := $$(1))\ + $(foreach c, $(2),\ + $$(eval __tmp := $$(subst $(word 1,$(subst :, ,$c)),$(word 2,$(subst :, ,$c)),$$(__tmp))))\ + $$(__tmp)) +endef + +$(eval $(call caseconvert-helper,UPPERCASE,$(join $(addsuffix :,$([FROM])),$([TO])))) +$(eval $(call caseconvert-helper,LOWERCASE,$(join $(addsuffix :,$([TO])),$([FROM])))) + +# Sanitize macro cleans up generic strings so it can be used as a filename +# and in rules. Particularly useful for VCS version strings, that can contain +# slashes, colons (OK in filenames but not in rules), and spaces. +sanitize = $(subst $(space),_,$(subst :,_,$(subst /,_,$(strip $(1))))) + +# +# Manipulation of .config files based on the Kconfig +# infrastructure. Used by the BusyBox package, the Linux kernel +# package, and more. +# + +define KCONFIG_ENABLE_OPT # (option, file) + $(SED) "/\\<$(1)\\>/d" $(2) + echo '$(1)=y' >> $(2) +endef + +define KCONFIG_SET_OPT # (option, value, file) + $(SED) "/\\<$(1)\\>/d" $(3) + echo '$(1)=$(2)' >> $(3) +endef + +define KCONFIG_DISABLE_OPT # (option, file) + $(SED) "/\\<$(1)\\>/d" $(2) + echo '# $(1) is not set' >> $(2) +endef + +# Helper functions to determine the name of a package and its +# directory from its makefile directory, using the $(MAKEFILE_LIST) +# variable provided by make. This is used by the *-package macros to +# automagically find where the package is located. +pkgdir = $(dir $(lastword $(MAKEFILE_LIST))) +pkgname = $(lastword $(subst /, ,$(pkgdir))) + +# Define extractors for different archive suffixes +INFLATE.bz2 = $(BZCAT) +INFLATE.gz = $(ZCAT) +INFLATE.lzma = $(XZCAT) +INFLATE.tbz = $(BZCAT) +INFLATE.tbz2 = $(BZCAT) +INFLATE.tgz = $(ZCAT) +INFLATE.xz = $(XZCAT) +INFLATE.tar = cat +# suitable-extractor(filename): returns extractor based on suffix +suitable-extractor = $(INFLATE$(suffix $(1))) + +# MESSAGE Macro -- display a message in bold type +MESSAGE = echo "$(TERM_BOLD)>>> $($(PKG)_NAME) $($(PKG)_VERSION) $(call qstrip,$(1))$(TERM_RESET)" +TERM_BOLD := $(shell tput smso 2>/dev/null) +TERM_RESET := $(shell tput rmso 2>/dev/null) + +# Utility functions for 'find' +# findfileclauses(filelist) => -name 'X' -o -name 'Y' +findfileclauses = $(call notfirstword,$(patsubst %,-o -name '%',$(1))) +# finddirclauses(base, dirlist) => -path 'base/dirX' -o -path 'base/dirY' +finddirclauses = $(call notfirstword,$(patsubst %,-o -path '$(1)/%',$(2))) + +# Miscellaneous utility functions +# notfirstword(wordlist): returns all but the first word in wordlist +notfirstword = $(wordlist 2,$(words $(1)),$(1)) + +# Needed for the foreach loops to loop over the list of hooks, so that +# each hook call is properly separated by a newline. +define sep + + +endef + +# check-deprecated-variable -- throw an error on deprecated variables +# example: +# $(eval $(call check-deprecated-variable,FOO_MAKE_OPT,FOO_MAKE_OPTS)) +define check-deprecated-variable # (deprecated var, new var) +ifneq ($$(origin $(1)),undefined) +$$(error Package error: use $(2) instead of $(1). Please fix your .mk file) +endif +endef + +# +# legal-info helper functions +# +LEGAL_INFO_SEPARATOR = "::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" + +define legal-warning # text + echo "WARNING: $(1)" >>$(LEGAL_WARNINGS) +endef + +define legal-warning-pkg # pkg, text + echo "WARNING: $(1): $(2)" >>$(LEGAL_WARNINGS) +endef + +define legal-warning-nosource # pkg, {local|override} + $(call legal-warning-pkg,$(1),sources not saved ($(2) packages not handled)) +endef + +define legal-manifest # pkg, version, license, license-files, source, url, {HOST|TARGET} + echo '"$(1)","$(2)","$(3)","$(4)","$(5)","$(6)"' >>$(LEGAL_MANIFEST_CSV_$(7)) +endef + +define legal-license-header # pkg, license-file, {HOST|TARGET} + printf "$(LEGAL_INFO_SEPARATOR)\n\t$(1):\ + $(2)\n$(LEGAL_INFO_SEPARATOR)\n\n\n" >>$(LEGAL_LICENSES_TXT_$(3)) +endef + +define legal-license-nofiles # pkg, {HOST|TARGET} + $(call legal-license-header,$(1),unknown license file(s),$(2)) +endef + +define legal-license-file # pkg, filename, file-fullpath, {HOST|TARGET} + $(call legal-license-header,$(1),$(2) file,$(4)) && \ + cat $(3) >>$(LEGAL_LICENSES_TXT_$(4)) && \ + echo >>$(LEGAL_LICENSES_TXT_$(4)) && \ + mkdir -p $(LICENSE_FILES_DIR_$(4))/$(1)/$(dir $(2)) && \ + cp $(3) $(LICENSE_FILES_DIR_$(4))/$(1)/$(2) +endef diff --git a/package/pkg-virtual.mk b/package/pkg-virtual.mk new file mode 100644 index 0000000000..244c1d0420 --- /dev/null +++ b/package/pkg-virtual.mk @@ -0,0 +1,73 @@ +################################################################################ +# Virtual package infrastructure +# +# This file implements an infrastructure that eases development of +# package .mk files for virtual packages. It should be used for all +# virtual packages. +# +# See the Buildroot documentation for details on the usage of this +# infrastructure +# +# In terms of implementation, this virtual infrastructure requires +# the .mk file to only call the 'virtual-package' macro. +# +################################################################################ + + +################################################################################ +# inner-virtual-package -- defines the dependency rules of the virtual +# package against its provider. +# +# argument 1 is the lowercase package name +# argument 2 is the uppercase package name, including a HOST_ prefix +# for host packages +# argument 3 is the uppercase package name, without the HOST_ prefix +# for host packages +# argument 4 is the type (target or host) +################################################################################ + +# Note: putting this comment here rather than in the define block, otherwise +# make would try to expand the $(error ...) in the comment, which is not +# really what we want. +# We need to use second-expansion for the $(error ...) call, below, +# so it is not evaluated now, but as part of the generated make code. + +define inner-virtual-package + +# Ensure the virtual package has an implementation defined. +ifeq ($$(BR2_PACKAGE_HAS_$(2)),y) +ifeq ($$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2))),) +$$(error No implementation selected for virtual package $(1). Configuration error) +endif +endif + +$(2)_IS_VIRTUAL = YES + +# A virtual package does not have any source associated +$(2)_SOURCE = + +# Fake a version string, so it looks nicer in the build log +$(2)_VERSION = virtual + +# This must be repeated from inner-generic-package, otherwise we get an empty +# _DEPENDENCIES +ifeq ($(4),host) +$(2)_DEPENDENCIES ?= $$(filter-out host-skeleton host-toolchain $(1),\ + $$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES)))) +endif + +# Add dependency against the provider +$(2)_DEPENDENCIES += $$(call qstrip,$$(BR2_PACKAGE_PROVIDES_$(2))) + +# Call the generic package infrastructure to generate the necessary +# make targets +$(call inner-generic-package,$(1),$(2),$(3),$(4)) + +endef + +################################################################################ +# virtual-package -- the target generator macro for virtual packages +################################################################################ + +virtual-package = $(call inner-virtual-package,$(pkgname),$(call UPPERCASE,$(pkgname)),$(call UPPERCASE,$(pkgname)),target) +host-virtual-package = $(call inner-virtual-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host) diff --git a/package/pkgconf/0001-Fix-all-variables-sysroot-prefix-problem.patch b/package/pkgconf/0001-Fix-all-variables-sysroot-prefix-problem.patch new file mode 100644 index 0000000000..bac9f6208b --- /dev/null +++ b/package/pkgconf/0001-Fix-all-variables-sysroot-prefix-problem.patch @@ -0,0 +1,58 @@ +From abc7a780f2a52a1aa3ee288e17140b817b545cc3 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Mon, 2 Nov 2015 18:38:00 -0300 +Subject: [PATCH] Fix all-variables sysroot prefix problem + +According to the pkg-config specifications (or rather documentation) +only the -L/-I directory entries should be sysroot-prefixed. + +We also need to prefix the mapdir/sdkdir variables since they're used by +xorg and expected that way. + +Also allow prefixing for includedir and libdir since in some silly cases +the directories may be requested barebones via pkg-config +--variable=includedir libfool for example. + +Signed-off-by: Gustavo Zacarias +--- + main.c | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/main.c b/main.c +index 6947126..52d16c2 100644 +--- a/main.c ++++ b/main.c +@@ -313,9 +313,12 @@ print_variable(pkg_t *pkg, void *data, unsigned int flags) + memset(req->buf, 0, sizeof(req->buf)); + + if (*var == '/' && (flags & PKGF_MUNGE_SYSROOT_PREFIX) && +- (sysroot_dir != NULL && strncmp(var, sysroot_dir, strlen(sysroot_dir)))) +- strlcat(req->buf, sysroot_dir, sizeof(req->buf)); +- ++ (sysroot_dir != NULL && strncmp(var, sysroot_dir, strlen(sysroot_dir))) && ++ (!strcmp(req->variable, "includedir") || \ ++ !strcmp(req->variable, "libdir") || \ ++ !strcmp(req->variable, "mapdir") || \ ++ !strcmp(req->variable, "sdkdir"))) ++ strlcat(req->buf, sysroot_dir, sizeof(req->buf)); + strlcat(req->buf, var, sizeof(req->buf)); + return; + } +@@ -323,8 +326,12 @@ print_variable(pkg_t *pkg, void *data, unsigned int flags) + strlcat(req->buf, " ", sizeof(req->buf)); + + if (*var == '/' && (flags & PKGF_MUNGE_SYSROOT_PREFIX) && +- (sysroot_dir != NULL && strncmp(var, sysroot_dir, strlen(sysroot_dir)))) +- strlcat(req->buf, sysroot_dir, sizeof(req->buf)); ++ (sysroot_dir != NULL && strncmp(var, sysroot_dir, strlen(sysroot_dir))) && ++ (!strcmp(req->variable, "includedir") || \ ++ !strcmp(req->variable, "libdir") || \ ++ !strcmp(req->variable, "mapdir") || \ ++ !strcmp(req->variable, "sdkdir"))) ++ strlcat(req->buf, sysroot_dir, sizeof(req->buf)); + + strlcat(req->buf, var, sizeof(req->buf)); + } +-- +2.4.10 + diff --git a/package/pkgconf/Config.in b/package/pkgconf/Config.in new file mode 100644 index 0000000000..f95847fa3c --- /dev/null +++ b/package/pkgconf/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PKGCONF + bool "pkgconf" + help + pkgconf is a program which helps to configure compiler and linker + flags for development frameworks. It is similar to pkg-config, + but was written from scratch in the summer of 2011 to replace + pkg-config, which now needs itself to build itself + + https://github.com/nenolod/pkgconf diff --git a/package/pkgconf/pkg-config.in b/package/pkgconf/pkg-config.in new file mode 100644 index 0000000000..4dec48789a --- /dev/null +++ b/package/pkgconf/pkg-config.in @@ -0,0 +1,2 @@ +#!/bin/sh +PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-@PKG_CONFIG_LIBDIR@} PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR:-@STAGING_DIR@} $(dirname $0)/pkgconf @STATIC@ $@ diff --git a/package/pkgconf/pkgconf.hash b/package/pkgconf/pkgconf.hash new file mode 100644 index 0000000000..79191bc94e --- /dev/null +++ b/package/pkgconf/pkgconf.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7ec8b516e655e247f4ba976837cee808134785819ab8f538f652fe919cc6c09f pkgconf-0.9.12.tar.bz2 diff --git a/package/pkgconf/pkgconf.mk b/package/pkgconf/pkgconf.mk new file mode 100644 index 0000000000..c8b0cbaf51 --- /dev/null +++ b/package/pkgconf/pkgconf.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# pkgconf +# +################################################################################ + +PKGCONF_VERSION = 0.9.12 +PKGCONF_SITE = https://github.com/pkgconf/pkgconf/releases/download/pkgconf-$(PKGCONF_VERSION) +PKGCONF_SOURCE = pkgconf-$(PKGCONF_VERSION).tar.bz2 +PKGCONF_LICENSE = pkgconf license +PKGCONF_LICENSE_FILES = COPYING + +PKG_CONFIG_HOST_BINARY = $(HOST_DIR)/usr/bin/pkg-config + +define PKGCONF_LINK_PKGCONFIG + ln -sf pkgconf $(TARGET_DIR)/usr/bin/pkg-config +endef + +define HOST_PKGCONF_INSTALL_WRAPPER + $(INSTALL) -m 0755 -D package/pkgconf/pkg-config.in \ + $(HOST_DIR)/usr/bin/pkg-config + $(SED) 's,@PKG_CONFIG_LIBDIR@,$(STAGING_DIR)/usr/lib/pkgconfig:$(STAGING_DIR)/usr/share/pkgconfig,' \ + -e 's,@STAGING_DIR@,$(STAGING_DIR),' \ + $(HOST_DIR)/usr/bin/pkg-config +endef + +define HOST_PKGCONF_STATIC + $(SED) 's,@STATIC@,--static,' $(HOST_DIR)/usr/bin/pkg-config +endef + +define HOST_PKGCONF_SHARED + $(SED) 's,@STATIC@,,' $(HOST_DIR)/usr/bin/pkg-config +endef + +PKGCONF_POST_INSTALL_TARGET_HOOKS += PKGCONF_LINK_PKGCONFIG +HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_INSTALL_WRAPPER + +ifeq ($(BR2_STATIC_LIBS),y) +HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_STATIC +else +HOST_PKGCONF_POST_INSTALL_HOOKS += HOST_PKGCONF_SHARED +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/poco/0001-poco-add-the-staging-path-to-search-path.patch b/package/poco/0001-poco-add-the-staging-path-to-search-path.patch new file mode 100644 index 0000000000..5695b62618 --- /dev/null +++ b/package/poco/0001-poco-add-the-staging-path-to-search-path.patch @@ -0,0 +1,38 @@ +From b8417607ec8840e6a1e27cf03b6958c794a33e49 Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Tue, 4 Aug 2015 10:14:00 +0200 +Subject: [PATCH 1/2] poco: add the staging path to search path +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add the mysql headers and client libraries to the search path of the +preprocessor and the linker. The $MYSQL_LIBDIR / $MYSQL_INCIDR variables +must be set from the make command line. + +[Peter: Remove host dirs, add MYSQL_INCDIR] +Signed-off-by: Baruch Siach +[Jörg: Update to version 1.6.1 from github] +Signed-off-by: Jörg Krause +--- + Data/MySQL/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Data/MySQL/Makefile b/Data/MySQL/Makefile +index 0b18ca5..094e807 100644 +--- a/Data/MySQL/Makefile ++++ b/Data/MySQL/Makefile +@@ -8,8 +8,8 @@ + + include $(POCO_BASE)/build/rules/global + +-SYSLIBS += -L/usr/local/lib$(LIB64SUFFIX)/mysql -L/usr/lib$(LIB64SUFFIX)/mysql -L/usr/mysql/lib$(LIB64SUFFIX) -L/usr/mysql/lib$(LIB64SUFFIX)/mysql -L/usr/local/mysql/lib$(LIB64SUFFIX) -lmysqlclient +-INCLUDE += -I/usr/local/include/mysql/ -I/usr/include/mysql/ -I/usr/mysql/include/mysql -I/usr/local/mysql/include ++SYSLIBS += -L$(MYSQL_LIBDIR) -lmysqlclient ++INCLUDE += -I$(MYSQL_INCDIR) + SYSFLAGS += -DTHREADSAFE -DNO_TCL + + objects = Binder Extractor SessionImpl Connector \ +-- +2.5.0 + diff --git a/package/poco/Config.in b/package/poco/Config.in new file mode 100644 index 0000000000..dfdc8d17c3 --- /dev/null +++ b/package/poco/Config.in @@ -0,0 +1,68 @@ +config BR2_PACKAGE_POCO + bool "poco" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # dlopen() + depends on !(BR2_arc || BR2_bfin || BR2_microblaze || BR2_mipsel \ + || BR2_xtensa) + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_PCRE + help + The C++ Portable Components Libraries + + http://pocoproject.org + +if BR2_PACKAGE_POCO + +comment "poco components" + +config BR2_PACKAGE_POCO_XML + bool "xml" + select BR2_PACKAGE_EXPAT + +config BR2_PACKAGE_POCO_UTIL + bool "util" + select BR2_PACKAGE_POCO_XML + +config BR2_PACKAGE_POCO_NET + bool "net" + +config BR2_PACKAGE_POCO_CRYPTO + bool "crypto" + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_POCO_NETSSL_OPENSSL + bool "netssl_openssl" + select BR2_PACKAGE_POCO_NET + select BR2_PACKAGE_POCO_CRYPTO + select BR2_PACKAGE_POCO_UTIL + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_POCO_ZIP + bool "zip" + select BR2_PACKAGE_POCO_XML + select BR2_PACKAGE_POCO_NET + select BR2_PACKAGE_POCO_UTIL + +config BR2_PACKAGE_POCO_DATA + bool + +config BR2_PACKAGE_POCO_DATA_SQLITE + bool "sqlite" + select BR2_PACKAGE_POCO_DATA + select BR2_PACKAGE_SQLITE + +config BR2_PACKAGE_POCO_DATA_MYSQL + bool "mysql" + depends on BR2_USE_MMU # mysql + select BR2_PACKAGE_POCO_DATA + select BR2_PACKAGE_MYSQL + +endif # BR2_PACKAGE_POCO + +comment "poco needs a toolchain w/ wchar, threads, C++, dynamic library" + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on !(BR2_arc || BR2_bfin || BR2_microblaze || BR2_mipsel \ + || BR2_xtensa) diff --git a/package/poco/poco.hash b/package/poco/poco.hash new file mode 100644 index 0000000000..1730f1c287 --- /dev/null +++ b/package/poco/poco.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 cfd311ecbc9e58accf1c4ea70170af88f92f88e73dd14944e528e7f6229e6cab poco-poco-1.7.2-release.tar.gz +sha256 32182791e7eac00ba367d2f22dd1dd5bfce0b6d6f76fd52f853364f98402dda3 30159aea4b3f6421da9d74a8bf22aad6d3bf26b4.patch diff --git a/package/poco/poco.mk b/package/poco/poco.mk new file mode 100644 index 0000000000..79452c02fb --- /dev/null +++ b/package/poco/poco.mk @@ -0,0 +1,77 @@ +################################################################################ +# +# poco +# +################################################################################ + +POCO_VERSION = poco-1.7.2-release +POCO_SITE = $(call github,pocoproject,poco,$(POCO_VERSION)) +POCO_LICENSE = Boost-v1.0 +POCO_LICENSE_FILES = LICENSE +POCO_INSTALL_STAGING = YES +POCO_PATCH = https://github.com/pocoproject/poco/commit/30159aea4b3f6421da9d74a8bf22aad6d3bf26b4.patch + +POCO_DEPENDENCIES = zlib pcre \ + $(if $(BR2_PACKAGE_POCO_XML),expat) \ + $(if $(BR2_PACKAGE_POCO_CRYPTO),openssl) \ + $(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),openssl) \ + $(if $(BR2_PACKAGE_POCO_DATA_SQLITE),sqlite) \ + $(if $(BR2_PACKAGE_POCO_DATA_MYSQL),mysql) + +POCO_OMIT = Data/ODBC PageCompiler \ + $(if $(BR2_PACKAGE_POCO_XML),,XML) \ + $(if $(BR2_PACKAGE_POCO_UTIL),,Util) \ + $(if $(BR2_PACKAGE_POCO_NET),,Net) \ + $(if $(BR2_PACKAGE_POCO_NETSSL_OPENSSL),,NetSSL_OpenSSL) \ + $(if $(BR2_PACKAGE_POCO_CRYPTO),,Crypto) \ + $(if $(BR2_PACKAGE_POCO_ZIP),,Zip) \ + $(if $(BR2_PACKAGE_POCO_DATA),,Data) \ + $(if $(BR2_PACKAGE_POCO_DATA_MYSQL),,Data/MySQL) \ + $(if $(BR2_PACKAGE_POCO_DATA_SQLITE),,Data/SQLite) + +ifeq ($(LIBC),uclibc) +POCO_CONF_OPTS += --no-fpenvironment --no-wstring +endif + +# architectures missing some FE_* in their fenv.h +ifeq ($(BR2_sh4a)$(BR2_nios2),y) +POCO_CONF_OPTS += --no-fpenvironment +endif + +ifeq ($(BR2_STATIC_LIBS),y) +POCO_MAKE_TARGET = static_release +else ifeq ($(BR2_SHARED_LIBS),y) +POCO_MAKE_TARGET = shared_release +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +POCO_MAKE_TARGET = all_release +endif + +define POCO_CONFIGURE_CMDS + (cd $(@D); ./configure \ + --config=Linux \ + --prefix=/usr \ + --omit="$(POCO_OMIT)" \ + $(POCO_CONF_OPTS) \ + --unbundled \ + --no-tests \ + --no-samples) +endef + +define POCO_BUILD_CMDS + $(MAKE) POCO_TARGET_OSARCH=$(ARCH) CROSS_COMPILE=$(TARGET_CROSS) \ + MYSQL_LIBDIR=$(STAGING_DIR)/usr/lib/mysql \ + MYSQL_INCDIR=$(STAGING_DIR)/usr/include/mysql \ + DEFAULT_TARGET=$(POCO_MAKE_TARGET) -C $(@D) +endef + +define POCO_INSTALL_STAGING_CMDS + $(MAKE) DESTDIR=$(STAGING_DIR) POCO_TARGET_OSARCH=$(ARCH) \ + DEFAULT_TARGET=$(POCO_MAKE_TARGET) install -C $(@D) +endef + +define POCO_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) POCO_TARGET_OSARCH=$(ARCH) \ + DEFAULT_TARGET=$(POCO_MAKE_TARGET) install -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/polarssl/0001-no-test-suite.patch b/package/polarssl/0001-no-test-suite.patch new file mode 100644 index 0000000000..4c8552a948 --- /dev/null +++ b/package/polarssl/0001-no-test-suite.patch @@ -0,0 +1,27 @@ +Add BUILD_TESTS option to disable test suite + +By default, PolarSSL builds a fairly extensive test suite to validate +the library. In the context of Buildroot, building this test suite is +not really useful, so we add a BUILD_TESTS to disable its build. + +[Gustavo: update for 1.2.11] +Signed-off-by: Thomas Petazzoni +Signed-off-by: Gustavo Zacarias + +diff -Nura polarssl-1.2.11.orig/CMakeLists.txt polarssl-1.2.11/CMakeLists.txt +--- polarssl-1.2.11.orig/CMakeLists.txt 2014-07-11 17:14:43.414651327 -0300 ++++ polarssl-1.2.11/CMakeLists.txt 2014-07-11 17:23:00.573498626 -0300 +@@ -49,9 +49,11 @@ + add_subdirectory(library) + add_subdirectory(include) + +-if(CMAKE_COMPILER_IS_GNUCC) ++option(BUILD_TESTS "Build tests." ON) ++ ++if(CMAKE_COMPILER_IS_GNUCC AND BUILD_TESTS) + add_subdirectory(tests) +-endif(CMAKE_COMPILER_IS_GNUCC) ++endif(CMAKE_COMPILER_IS_GNUCC AND BUILD_TESTS) + if(CMAKE_COMPILER_IS_CLANG) + add_subdirectory(tests) + endif(CMAKE_COMPILER_IS_CLANG) diff --git a/package/polarssl/0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch b/package/polarssl/0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file mode 100644 index 0000000000..d241ae264b --- /dev/null +++ b/package/polarssl/0002-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch @@ -0,0 +1,39 @@ +From a14028b0878c1ba27f7c7a6d0962874d0f7f3801 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 31 Aug 2014 11:54:37 +0200 +Subject: [PATCH 3/3] cmake: use the standard CMake flag to drive the shared + object build + +If BUILD_SHARED_LIBS is set and not USE_SHARED_POLARSSL_LIBRARY, then +drive USE_SHARED_POLARSSL_LIBRARY with the BUILD_SHARED_LIBS value. + +Signed-off-by: Samuel Martin +--- + library/CMakeLists.txt | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt +index 27bd2e0..2ae0aba 100644 +--- a/library/CMakeLists.txt ++++ b/library/CMakeLists.txt +@@ -1,5 +1,15 @@ +-option(USE_STATIC_POLARSSL_LIBRARY "Build PolarSSL static library." ON) +-option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL shared library." OFF) ++# Use the standard CMake flag to drive the shared object build. ++if(DEFINED BUILD_SHARED_LIBS AND NOT DEFINED USE_STATIC_POLARSSL_LIBRARY AND NOT DEFINED USE_SHARED_POLARSSL_LIBRARY) ++ set(USE_STATIC_POLARSSL_LIBRARY ON) ++ if(BUILD_SHARED_LIBS) ++ set(USE_SHARED_POLARSSL_LIBRARY ON) ++ else() ++ set(USE_SHARED_POLARSSL_LIBRARY OFF) ++ endif() ++else() ++ option(USE_STATIC_POLARSSL_LIBRARY "Build PolarSSL static library." ON) ++ option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL shared library." OFF) ++endif() + + set(src + aes.c +-- +2.1.0 + diff --git a/package/polarssl/Config.in b/package/polarssl/Config.in new file mode 100644 index 0000000000..17125a3cd8 --- /dev/null +++ b/package/polarssl/Config.in @@ -0,0 +1,32 @@ +config BR2_PACKAGE_POLARSSL + bool "polarssl" + help + PolarSSL is an SSL library written in ANSI C. PolarSSL makes + it easy for developers to include cryptographic and SSL/TLS + capabilities in their (embedded) products with as little + hassle as possible. It is designed to be readable, + documented, tested, loosely coupled and portable. + + Warning: PolarSSL is licensed under the GPL. If you want to + use it in your own proprietary applications, you have to + purchase a commercial license. + + https://tls.mbed.org/ + +if BR2_PACKAGE_POLARSSL + +config BR2_PACKAGE_POLARSSL_PROGRAMS + bool "polarssl programs" + depends on BR2_USE_MMU # fork() + help + This option enables the installation and the build of + PolarSSL companion programs: aescrypt2, benchmark, cert_app, + crl_app, crypt_and_hash, dh_client, dh_genprime, dh_server, + gen_entropy, generic_sum, gen_random_ctr_drbg, + gen_random_havege, hello, key_app, md5sum, mpi_demo, + rsa_decrypt, rsa_encrypt, rsa_genkey, rsa_sign, rsa_verify, + selftest, sha1sum, sha2sum, ssi-cgi, ssl_cert_test, + ssl_client1, ssl_client2, ssl_fork_server, ssl_mail_client, + ssl_server, ssl_test + +endif diff --git a/package/polarssl/polarssl.hash b/package/polarssl/polarssl.hash new file mode 100644 index 0000000000..3f1871c8f4 --- /dev/null +++ b/package/polarssl/polarssl.hash @@ -0,0 +1,2 @@ +# From https://tls.mbed.org/tech-updates/releases/mbedtls-2.2.1-2.1.4-1.3.16-and-polarssl.1.2.19-released +sha256 24cb1608a160101ead3c7240f35fc447fe7880cd60f7ed6c9db7a1d773ccd4b8 polarssl-1.2.19-gpl.tgz diff --git a/package/polarssl/polarssl.mk b/package/polarssl/polarssl.mk new file mode 100644 index 0000000000..9199f28a07 --- /dev/null +++ b/package/polarssl/polarssl.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# polarssl +# +################################################################################ + +POLARSSL_SITE = https://tls.mbed.org/code/releases +POLARSSL_VERSION = 1.2.19 +POLARSSL_SOURCE = polarssl-$(POLARSSL_VERSION)-gpl.tgz +POLARSSL_CONF_OPTS = \ + -DENABLE_PROGRAMS=$(if $(BR2_PACKAGE_POLARSSL_PROGRAMS),ON,OFF) + +POLARSSL_INSTALL_STAGING = YES +POLARSSL_LICENSE = GPLv2 +POLARSSL_LICENSE_FILES = LICENSE + +define POLARSSL_DISABLE_ASM + $(SED) '/^#define POLARSSL_HAVE_ASM/d' $(@D)/include/polarssl/config.h +endef + +# ARM in thumb mode breaks debugging with asm optimizations +# Microblaze asm optimizations are broken in general +# MIPS R6 asm is not yet supported +ifeq ($(BR2_ENABLE_DEBUG)$(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_ARM_INSTRUCTIONS_THUMB2),yy) +POLARSSL_POST_CONFIGURE_HOOKS += POLARSSL_DISABLE_ASM +else ifeq ($(BR2_microblaze),y) +POLARSSL_POST_CONFIGURE_HOOKS += POLARSSL_DISABLE_ASM +else ifeq ($(BR2_mips_32r6)$(BR2_mips_64r6),y) +POLARSSL_POST_CONFIGURE_HOOKS += POLARSSL_DISABLE_ASM +endif + +$(eval $(cmake-package)) diff --git a/package/polkit/Config.in b/package/polkit/Config.in new file mode 100644 index 0000000000..debd1d9daf --- /dev/null +++ b/package/polkit/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_POLKIT + bool "polkit" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_EXPAT + help + PolicyKit is a toolkit for defining and handling + authorizations. It is used for allowing unprivileged + processes to speak to privileged processes. + + http://www.freedesktop.org/wiki/Software/polkit + +comment "polkit needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/polkit/polkit.hash b/package/polkit/polkit.hash new file mode 100644 index 0000000000..5e133b43e2 --- /dev/null +++ b/package/polkit/polkit.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 36607c8ce576980ee55bd12bab1944f13217eb8e9d04ab56022545861ece3bc5 polkit-0.103.tar.gz diff --git a/package/polkit/polkit.mk b/package/polkit/polkit.mk new file mode 100644 index 0000000000..f31387ec6b --- /dev/null +++ b/package/polkit/polkit.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# polkit +# +################################################################################ + +POLKIT_VERSION = 0.103 +POLKIT_SITE = http://www.freedesktop.org/software/polkit/releases +POLKIT_LICENSE = GPLv2 +POLKIT_LICENSE_FILES = COPYING + +POLKIT_INSTALL_STAGING = YES + +POLKIT_DEPENDENCIES = libglib2 host-intltool expat + +# We could also support --with-authfw=pam +POLKIT_CONF_OPTS = \ + --with-authfw=shadow \ + --with-os-type=unknown \ + --disable-man-pages \ + --disable-examples + +$(eval $(autotools-package)) diff --git a/package/poppler/0001-Fix-invalid-shell-comparaison-in-libtiff-test.patch b/package/poppler/0001-Fix-invalid-shell-comparaison-in-libtiff-test.patch new file mode 100644 index 0000000000..f40bee1dd4 --- /dev/null +++ b/package/poppler/0001-Fix-invalid-shell-comparaison-in-libtiff-test.patch @@ -0,0 +1,23 @@ +Fix syntax issue in configure script + +The change is not done in configure.ac, because the package doesn't +autoreconf properly. + +Patch on configure.ac submitted upstream at +https://bugs.freedesktop.org/show_bug.cgi?id=90292. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure +=================================================================== +--- a/configure ++++ b/configure +@@ -19738,7 +19738,7 @@ + CXXFLAGS="$CXXFLAGS $LIBTIFF_CFLAGS" + LIBS="$LIBS $LIBTIFF_LIBS" + if test x$enable_libtiff = xyes; then +- if test x"$LIBTIFF_LIBS" != ; then ++ if test x"$LIBTIFF_LIBS" != x; then + ac_fn_cxx_check_func "$LINENO" "TIFFOpen" "ac_cv_func_TIFFOpen" + if test "x$ac_cv_func_TIFFOpen" = xyes; then : + diff --git a/package/poppler/Config.in b/package/poppler/Config.in new file mode 100644 index 0000000000..2ca3ff62b5 --- /dev/null +++ b/package/poppler/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_POPPLER + bool "poppler" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_XORG7 + help + Poppler is a PDF rendering library based on the xpdf-3.0 code base. + + http://poppler.freedesktop.org/ + +if BR2_PACKAGE_POPPLER + +config BR2_PACKAGE_POPPLER_QT + bool "Qt support" + depends on BR2_PACKAGE_QT + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module + select BR2_PACKAGE_QT_GUI_MODULE + select BR2_PACKAGE_QT_XML + help + Build Qt support into the Poppler library + +comment "poppler Qt support needs a toolchain not affected by Binutils bug 19405" + depends on BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 + +endif + +comment "poppler needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/poppler/poppler.hash b/package/poppler/poppler.hash new file mode 100644 index 0000000000..c4c7f661b3 --- /dev/null +++ b/package/poppler/poppler.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 4963e31ba5e17530a87b16588e22928bc044e8d28d02303dded981bff6725b98 poppler-0.32.0.tar.xz diff --git a/package/poppler/poppler.mk b/package/poppler/poppler.mk new file mode 100644 index 0000000000..1113e4bd28 --- /dev/null +++ b/package/poppler/poppler.mk @@ -0,0 +1,83 @@ +################################################################################ +# +# poppler +# +################################################################################ + +POPPLER_VERSION = 0.32.0 +POPPLER_SOURCE = poppler-$(POPPLER_VERSION).tar.xz +POPPLER_SITE = http://poppler.freedesktop.org +POPPLER_DEPENDENCIES = fontconfig host-pkgconf +POPPLER_LICENSE = GPLv2+ +POPPLER_LICENSE_FILES = COPYING +POPPLER_INSTALL_STAGING = YES +POPPLER_CONF_OPTS = --with-font-configuration=fontconfig \ + --enable-xpdf-headers + +ifeq ($(BR2_PACKAGE_LCMS2),y) +POPPLER_CONF_OPTS += --enable-cms=lcms2 +POPPLER_DEPENDENCIES += lcms2 +else +POPPLER_CONF_OPTS += --enable-cms=none +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) +POPPLER_CONF_OPTS += --enable-libtiff +# Help poppler to find libtiff in static linking scenarios +POPPLER_CONF_ENV += \ + LIBTIFF_LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtiff-4`" +POPPLER_DEPENDENCIES += tiff +else +POPPLER_CONF_OPTS += --disable-libtiff +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +POPPLER_CONF_OPTS += --enable-libjpeg +POPPLER_DEPENDENCIES += jpeg +else +POPPLER_CONF_OPTS += --disable-libjpeg +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +POPPLER_CONF_OPTS += --enable-libpng +POPPLER_DEPENDENCIES += libpng +else +POPPLER_CONF_OPTS += --disable-libpng +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +POPPLER_CONF_OPTS += --enable-zlib +POPPLER_DEPENDENCIES += zlib +else +POPPLER_CONF_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_POPPLER_LIBCURL),y) +POPPLER_CONF_OPTS += --enable-libcurl +POPPLER_DEPENDENCIES += libcurl +else +POPPLER_CONF_OPTS += --disable-libcurl +endif + +ifeq ($(BR2_PACKAGE_XORG7),y) +POPPLER_CONF_OPTS += --with-x +POPPLER_DEPENDENCIES += xlib_libX11 xlib_libXext +else +POPPLER_CONF_OPTS += --without-x +endif + +ifeq ($(BR2_PACKAGE_POPPLER_QT),y) +POPPLER_DEPENDENCIES += qt +POPPLER_CONF_OPTS += --enable-poppler-qt4 +else +POPPLER_CONF_OPTS += --disable-poppler-qt4 +endif + +ifeq ($(BR2_PACKAGE_OPENJPEG),y) +POPPLER_DEPENDENCIES += openjpeg +POPPLER_CONF_OPTS += --enable-libopenjpeg=openjpeg1 +else +POPPLER_CONF_OPTS += --enable-libopenjpeg=none +endif + +$(eval $(autotools-package)) diff --git a/package/popt/0001-no-wchar.patch b/package/popt/0001-no-wchar.patch new file mode 100644 index 0000000000..161165e72c --- /dev/null +++ b/package/popt/0001-no-wchar.patch @@ -0,0 +1,12 @@ +diff -ru popt-1.14_vanilla/popthelp.c popt-1.14_no-wchar/popthelp.c +--- popt-1.14_vanilla/popthelp.c 2008-03-27 17:33:08.000000000 +0000 ++++ popt-1.14_no-wchar/popthelp.c 2008-04-10 05:44:43.000000000 +0000 +@@ -15,7 +15,7 @@ + #include + #endif + +-#define POPT_WCHAR_HACK ++/* #define POPT_WCHAR_HACK */ + #ifdef POPT_WCHAR_HACK + #include /* for mbsrtowcs */ + /*@access mbstate_t @*/ diff --git a/package/popt/0002-fix-autoreconf.patch b/package/popt/0002-fix-autoreconf.patch new file mode 100644 index 0000000000..f1fcc57a85 --- /dev/null +++ b/package/popt/0002-fix-autoreconf.patch @@ -0,0 +1,38 @@ +Make sure we can autoreconfigure popt + +This commit makes a few changes in the popt build system to allow it +to be autoreconfigured with modern autotools: + + - the TESTS variable shouldn't be using $(top_srcdir), and since we + don't care about tests in Buildroot, we just disable it. + + - the AM_C_PROTOTYPES macro is deprecated and should no longer be + used, causes an error with autoconf/automake. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.am +=================================================================== +--- a/Makefile.am ++++ b/Makefile.am +@@ -37,8 +37,6 @@ + TESTS_ENVIRONMENT = \ + test1="$(top_builddir)/test1" + +-TESTS = $(top_srcdir)/testit.sh +- + include_HEADERS = popt.h + + usrlibdir = $(libdir) +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -46,7 +46,6 @@ + AC_SYS_LARGEFILE + + AC_ISC_POSIX +-AM_C_PROTOTYPES + + AC_CHECK_HEADERS(float.h fnmatch.h glob.h langinfo.h libintl.h mcheck.h unistd.h) + diff --git a/package/popt/0003-glob-detection.patch b/package/popt/0003-glob-detection.patch new file mode 100644 index 0000000000..7bdce7d717 --- /dev/null +++ b/package/popt/0003-glob-detection.patch @@ -0,0 +1,41 @@ +Detect glob_pattern_p() + +The current popt build system tests the existence of , and +then assumes that if __GLIBC__ is defined, then glob_pattern_p() must +be available. Unfortunately, that's not true with uClibc: may +be installed, but not necessarily the GNU glob extensions... and +uClibc defines __GLIBC__. This is causing build issues with certain +uClibc toolchains that do not have GNU glob extensions enabled. + +To fix this, this patch adds an AC_CHECK_FUNCS() test for +glob_pattern_p, and uses that to find out whether glob_pattern_p() is +available or not. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -81,7 +81,7 @@ + AC_CHECK_FUNC(setreuid, [], [ + AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi]) + ]) +-AC_CHECK_FUNCS(getuid geteuid iconv mtrace __secure_getenv setregid stpcpy strerror vasprintf srandom) ++AC_CHECK_FUNCS(getuid geteuid iconv mtrace __secure_getenv setregid stpcpy strerror vasprintf srandom glob_pattern_p) + + AM_GNU_GETTEXT([external]) + AM_ICONV_LINK +Index: b/poptconfig.c +=================================================================== +--- a/poptconfig.c ++++ b/poptconfig.c +@@ -42,7 +42,7 @@ + /*@=declundef =exportheader =incondefs =protoparammatch =redecl =type @*/ + #endif /* __LCLINT__ */ + +-#if !defined(__GLIBC__) ++#if !defined(HAVE_GLOB_PATTERN_P) + /* Return nonzero if PATTERN contains any metacharacters. + Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ + static int diff --git a/package/popt/0004-popt.pc-add-the-libintl-library-to-the-Libs.private-.patch b/package/popt/0004-popt.pc-add-the-libintl-library-to-the-Libs.private-.patch new file mode 100644 index 0000000000..9b0b07e383 --- /dev/null +++ b/package/popt/0004-popt.pc-add-the-libintl-library-to-the-Libs.private-.patch @@ -0,0 +1,47 @@ +From 470755ccc353b59107c957972d908cbde4942c8d Mon Sep 17 00:00:00 2001 +From: Fabio Porcedda +Date: Sun, 1 Mar 2015 21:13:48 +0100 +Subject: [PATCH] popt.pc: add the libintl library to the Libs.private field + +If static linking and libintl is used, the program that uses the popt +library needs to link to the libintl library too so add the libintl +library to the libs.private field because is useful for programs that call + pkg-config --static --libs popt +they get the libintl library too: + -L<...> -lpopt -lintl + +This patch was already sent upstream: +http://rpm5.org/community/popt-devel/0294.html + +Signed-off-by: Fabio Porcedda +--- + configure.ac | 1 + + popt.pc.in | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index e8eb238..816d272 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -90,6 +90,7 @@ popt_sysconfdir="${sysconfdir}" + eval "popt_sysconfdir=\"${popt_sysconfdir}\"" # expand contained ${prefix} + AC_DEFINE_UNQUOTED([POPT_SYSCONFDIR], ["$popt_sysconfdir"], [Full path to default POPT configuration directory]) + ++AC_SUBST([POPT_PKGCONFIG_LIBS_PRIVATE],"$LIBINTL") + + # Define a (hope) portable Libs pkgconfig directive that + # - Don't harm if the default library search path include ${libdir} +diff --git a/popt.pc.in b/popt.pc.in +index a86437c..0acfdb9 100644 +--- a/popt.pc.in ++++ b/popt.pc.in +@@ -6,5 +6,6 @@ includedir=@includedir@ + Name: popt + Version: @VERSION@ + Description: popt library. ++Libs.private: @POPT_PKGCONFIG_LIBS_PRIVATE@ + Libs: @POPT_PKGCONFIG_LIBS@ + Cflags: -I${includedir} +-- +2.3.1 + diff --git a/package/popt/Config.in b/package/popt/Config.in new file mode 100644 index 0000000000..cbcdc15dc0 --- /dev/null +++ b/package/popt/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_POPT + bool "popt" + help + Popt is a C library for parsing command line parameters. + + http://rpm5.org diff --git a/package/popt/popt.hash b/package/popt/popt.hash new file mode 100644 index 0000000000..875bbae7a3 --- /dev/null +++ b/package/popt/popt.hash @@ -0,0 +1,2 @@ +# Locally calculated: +sha256 e728ed296fe9f069a0e005003c3d6b2dde3d9cad453422a10d6558616d304cc8 popt-1.16.tar.gz diff --git a/package/popt/popt.mk b/package/popt/popt.mk new file mode 100644 index 0000000000..863a47a658 --- /dev/null +++ b/package/popt/popt.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# popt +# +################################################################################ + +POPT_VERSION = 1.16 +POPT_SITE = http://rpm5.org/files/popt +POPT_INSTALL_STAGING = YES +POPT_LICENSE = MIT +POPT_LICENSE_FILES = COPYING +POPT_AUTORECONF = YES +POPT_GETTEXTIZE = YES + +ifeq ($(BR2_PACKAGE_GETTEXT),y) +POPT_DEPENDENCIES += gettext +endif + +POPT_CONF_ENV = ac_cv_va_copy=yes + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +POPT_CONF_ENV += am_cv_lib_iconv=yes +POPT_CONF_OPTS += --with-libiconv-prefix=$(STAGING_DIR)/usr +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/portaudio/Config.in b/package/portaudio/Config.in new file mode 100644 index 0000000000..252a92a650 --- /dev/null +++ b/package/portaudio/Config.in @@ -0,0 +1,33 @@ +comment "portaudio needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_PORTAUDIO + bool "portaudio" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + PortAudio is a free, cross-platform, open-source, + audio I/O library. + + http://www.portaudio.com/ + +if BR2_PACKAGE_PORTAUDIO + +config BR2_PACKAGE_PORTAUDIO_ALSA + bool "alsa support" + select BR2_PACKAGE_ALSA_LIB + default y + help + Compile with ALSA support. + +config BR2_PACKAGE_PORTAUDIO_OSS + bool "oss support" + help + Compile with OSS support. + +config BR2_PACKAGE_PORTAUDIO_CXX + bool "C++ bindings" + depends on BR2_INSTALL_LIBSTDCPP + help + Enables C++ bindings. + +endif # BR2_PACKAGE_PORTAUDIO diff --git a/package/portaudio/portaudio.hash b/package/portaudio/portaudio.hash new file mode 100644 index 0000000000..2a1931634e --- /dev/null +++ b/package/portaudio/portaudio.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 8fe024a5f0681e112c6979808f684c3516061cc51d3acc0b726af98fc96c8d57 pa_stable_v19_20140130.tgz diff --git a/package/portaudio/portaudio.mk b/package/portaudio/portaudio.mk new file mode 100644 index 0000000000..d1ef07a260 --- /dev/null +++ b/package/portaudio/portaudio.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# portaudio +# +################################################################################ + +PORTAUDIO_VERSION = v19_20140130 +PORTAUDIO_SITE = http://www.portaudio.com/archives +PORTAUDIO_SOURCE = pa_stable_$(PORTAUDIO_VERSION).tgz +PORTAUDIO_INSTALL_STAGING = YES +PORTAUDIO_MAKE = $(MAKE1) +PORTAUDIO_LICENSE = portaudio license (MIT-like plus special clause) +PORTAUDIO_LICENSE_FILES = LICENSE.txt + +PORTAUDIO_DEPENDENCIES = \ + $(if $(BR2_PACKAGE_PORTAUDIO_ALSA),alsa-lib) + +PORTAUDIO_CONF_OPTS = \ + $(if $(BR2_PACKAGE_PORTAUDIO_ALSA),--with-alsa,--without-alsa) \ + $(if $(BR2_PACKAGE_PORTAUDIO_OSS),--with-oss,--without-oss) \ + $(if $(BR2_PACKAGE_PORTAUDIO_CXX),--enable-cxx,--disable-cxx) + +$(eval $(autotools-package)) diff --git a/package/portmap/0001-README-fix-typo-in-tcp-wrapper-doc.patch b/package/portmap/0001-README-fix-typo-in-tcp-wrapper-doc.patch new file mode 100644 index 0000000000..01aa7bf849 --- /dev/null +++ b/package/portmap/0001-README-fix-typo-in-tcp-wrapper-doc.patch @@ -0,0 +1,26 @@ +From af4a27a17bbdbe941f2462e116c2e4c8ade110e3 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 19 Nov 2010 23:35:20 -0500 +Subject: [PATCH 1/4] README: fix typo in tcp wrapper doc + +Signed-off-by: Mike Frysinger +--- + README | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/README b/README +index 0da54cc..916de7e 100644 +--- a/README ++++ b/README +@@ -18,7 +18,7 @@ There is no "./configure", just use "make". + + Some make variable can be used to control compilation. + +- NO_TCP_WRAPPER= if non-empty, doen't use tcp_wrappers ++ NO_TCP_WRAPPER= if non-empty, don't use tcp_wrappers + USE_DNS= if set, tcp_wrappers can check peers based on hostname + as well as IP address. This should only be used if you + are certain that gethostbyname will never trigger a +-- +1.7.3.1 + diff --git a/package/portmap/0002-NO_PIE-make-PIE-support-controllable.patch b/package/portmap/0002-NO_PIE-make-PIE-support-controllable.patch new file mode 100644 index 0000000000..6e544bfaf0 --- /dev/null +++ b/package/portmap/0002-NO_PIE-make-PIE-support-controllable.patch @@ -0,0 +1,53 @@ +From 087874b15367a04fd482541d1832696d7163d1ac Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 19 Nov 2010 23:35:47 -0500 +Subject: [PATCH 2/4] NO_PIE: make PIE support controllable + +Signed-off-by: Mike Frysinger +--- + Makefile | 8 ++++++-- + README | 1 + + 2 files changed, 7 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 5343428..cfcfdbb 100644 +--- a/Makefile ++++ b/Makefile +@@ -106,6 +106,10 @@ CPPFLAGS += -DIGNORE_SIGCHLD # AIX 4.x, HP-UX 9.x + # + # LDLIBS += -m + # CFLAGS += -arch m68k -arch i386 -arch hppa ++ifeq ($(NO_PIE),) ++CFLAGS_PIE = -fpie ++LDFLAGS_PIE = -pie ++endif + + # Auxiliary libraries that you may have to specify + # +@@ -125,9 +129,9 @@ CFLAGS += -Wall -Wstrict-prototypes + all: portmap pmap_dump pmap_set portmap.man + + CPPFLAGS += $(HOSTS_ACCESS) +-portmap: CFLAGS += -fpie ++portmap: CFLAGS += $(CFLAGS_PIE) + portmap: LDLIBS += $(WRAP_LIB) +-portmap: LDFLAGS += -pie ++portmap: LDFLAGS += $(LDFLAGS_PIE) + portmap: portmap.o pmap_check.o from_local.o + + from_local: CPPFLAGS += -DTEST +diff --git a/README b/README +index 916de7e..e0b561a 100644 +--- a/README ++++ b/README +@@ -18,6 +18,7 @@ There is no "./configure", just use "make". + + Some make variable can be used to control compilation. + ++ NO_PIE= if non-empty, don't build portmap as a PIE + NO_TCP_WRAPPER= if non-empty, don't use tcp_wrappers + USE_DNS= if set, tcp_wrappers can check peers based on hostname + as well as IP address. This should only be used if you +-- +1.7.3.1 + diff --git a/package/portmap/0003-NO_FORK-control-usage-of-fork-for-nommu-systems.patch b/package/portmap/0003-NO_FORK-control-usage-of-fork-for-nommu-systems.patch new file mode 100644 index 0000000000..41396b6631 --- /dev/null +++ b/package/portmap/0003-NO_FORK-control-usage-of-fork-for-nommu-systems.patch @@ -0,0 +1,95 @@ +From b3afea5757af1a7356ba30d2e0a7d5909ca18121 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 19 Nov 2010 23:48:20 -0500 +Subject: [PATCH 3/4] NO_FORK: control usage of fork() for nommu systems + +nommu systems lack a fork() function, so add a NO_FORK flag to control +its usage. We don't lose a ton of functionality in doing so, and on an +embedded system, this is OK. + +Signed-off-by: Mike Frysinger +--- + Makefile | 5 +++++ + README | 1 + + pmap_check.c | 6 ++++-- + portmap.c | 6 ++++++ + 4 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index cfcfdbb..9df5574 100644 +--- a/Makefile ++++ b/Makefile +@@ -27,6 +27,11 @@ MAN_SED += -e 's/USE_DNS/yes/' + endif + endif + ++# For no-mmu systems, we have to disable the fork() functions. ++ifneq ($(NO_FORK),) ++CPPFLAGS += -DNO_FORK ++endif ++ + # Comment out if your RPC library does not allocate privileged ports for + # requests from processes with root privilege, or the new portmap will + # always reject requests to register/unregister services on privileged +diff --git a/README b/README +index e0b561a..bda1707 100644 +--- a/README ++++ b/README +@@ -18,6 +18,7 @@ There is no "./configure", just use "make". + + Some make variable can be used to control compilation. + ++ NO_FORK= if non-empty, don't use fork (good for nommu systems) + NO_PIE= if non-empty, don't build portmap as a PIE + NO_TCP_WRAPPER= if non-empty, don't use tcp_wrappers + USE_DNS= if set, tcp_wrappers can check peers based on hostname +diff --git a/pmap_check.c b/pmap_check.c +index 6b3e490..983414e 100644 +--- a/pmap_check.c ++++ b/pmap_check.c +@@ -302,8 +302,10 @@ static void logit(int severity, struct sockaddr_in *addr, + * getrpcbynumber() or syslog() does its thing. + */ + +- if (fork() == 0) { +- ++#ifndef NO_FORK ++ if (fork() == 0) ++#endif ++ { + /* Try to map program number to name. */ + + if (prognum == 0) { +diff --git a/portmap.c b/portmap.c +index 2a98881..94abc64 100644 +--- a/portmap.c ++++ b/portmap.c +@@ -753,6 +755,7 @@ static void callit(struct svc_req *rqstp, SVCXPRT *xprt) + if ((pml = find_service(a.rmt_prog, a.rmt_vers, + (u_long)IPPROTO_UDP)) == NULL) + return; ++#ifndef NO_FORK + /* + * fork a child to do the work. Parent immediately returns. + * Child exits upon completion. +@@ -763,6 +766,7 @@ static void callit(struct svc_req *rqstp, SVCXPRT *xprt) + a.rmt_prog); + return; + } ++#endif + port = pml->pml_map.pm_port; + get_myaddress(&me); + me.sin_port = htons(port); +@@ -783,7 +787,9 @@ static void callit(struct svc_req *rqstp, SVCXPRT *xprt) + clnt_destroy(client); + } + (void)close(so); ++#ifndef NO_FORK + exit(0); ++#endif + } + + #ifndef IGNORE_SIGCHLD /* Lionel Cons */ +-- +1.7.3.1 + diff --git a/package/portmap/0004-NO_PERROR-control-overriding-of-perror-symbol.patch b/package/portmap/0004-NO_PERROR-control-overriding-of-perror-symbol.patch new file mode 100644 index 0000000000..665d6a1f99 --- /dev/null +++ b/package/portmap/0004-NO_PERROR-control-overriding-of-perror-symbol.patch @@ -0,0 +1,65 @@ +From 8cea0778f0fb838a7bd764be08f15e1494e5a0b2 Mon Sep 17 00:00:00 2001 +From: Mike Frysinger +Date: Fri, 19 Nov 2010 23:50:27 -0500 +Subject: [PATCH 4/4] NO_PERROR: control overriding of perror() symbol + +Doing static builds of portmap might fail when the C library's perror() +function is pulled in and collides with portmap's definition. So add a +flag to control the local override. + +Signed-off-by: Mike Frysinger +--- + Makefile | 5 +++++ + README | 1 + + 2 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/Makefile b/Makefile +index 9df5574..1635107 100644 +--- a/Makefile ++++ b/Makefile +@@ -32,6 +32,11 @@ ifneq ($(NO_FORK),) + CPPFLAGS += -DNO_FORK + endif + ++# For static builds, we might hit perror() symbol clashes ++ifneq ($(NO_PERROR),) ++CPPFLAGS += -DNO_PERROR ++endif ++ + # Comment out if your RPC library does not allocate privileged ports for + # requests from processes with root privilege, or the new portmap will + # always reject requests to register/unregister services on privileged +diff --git a/README b/README +index bda1707..05861a8 100644 +--- a/README ++++ b/README +@@ -19,6 +19,7 @@ There is no "./configure", just use "make". + Some make variable can be used to control compilation. + + NO_FORK= if non-empty, don't use fork (good for nommu systems) ++ NO_PERROR= if non-empty, don't override the perror() func + NO_PIE= if non-empty, don't build portmap as a PIE + NO_TCP_WRAPPER= if non-empty, don't use tcp_wrappers + USE_DNS= if set, tcp_wrappers can check peers based on hostname +diff --git a/portmap.c b/portmap.c +index 2a98881..94abc64 100644 +--- a/portmap.c ++++ b/portmap.c +@@ -391,12 +391,14 @@ main(int argc, char **argv) + abort(); + } + ++#ifndef NO_PERROR + /* need to override perror calls in rpc library */ + void perror(const char *what) + { + + syslog(LOG_ERR, "%s: %m", what); + } ++#endif + + static struct pmaplist * + find_service(u_long prog, u_long vers, u_long prot) +-- +1.7.3.1 + diff --git a/package/portmap/0005-tcpd.patch b/package/portmap/0005-tcpd.patch new file mode 100644 index 0000000000..c6af8f8c80 --- /dev/null +++ b/package/portmap/0005-tcpd.patch @@ -0,0 +1,18 @@ +Enable compile without tcp-wrappers + +Patch by Timothy Redaelli + +http://bugs.gentoo.org/178242 + +--- portmap_6.0/pmap_check.c ++++ portmap_6.0/pmap_check.c +@@ -44,7 +44,9 @@ + #include + #include + #endif ++#ifdef HOSTS_ACCESS + #include ++#endif + #include + #include + diff --git a/package/portmap/Config.in b/package/portmap/Config.in new file mode 100644 index 0000000000..d960690d7b --- /dev/null +++ b/package/portmap/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_PORTMAP + bool "portmap" + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + # portmap and rpcbind provide the same feature, so they are + # mutually exclusive. rpcbind is the newer, preferred + # implementation. + depends on !BR2_PACKAGE_RPCBIND + help + The standard portmapper for RPC services. + + Note that portmap is being deprecated in favour of rpcbind. + + http://neil.brown.name/portmap/ + +comment "portmap needs a toolchain w/ RPC" + depends on !BR2_TOOLCHAIN_HAS_NATIVE_RPC diff --git a/package/portmap/S13portmap b/package/portmap/S13portmap new file mode 100755 index 0000000000..9aa6adfc5b --- /dev/null +++ b/package/portmap/S13portmap @@ -0,0 +1,44 @@ +#! /bin/sh + +[ -f /sbin/portmap ] || exit 0 + +start() { + printf "Starting portmap: " + portmap + mkdir -p /var/lock/subsys + touch /var/lock/subsys/portmap + echo "done" +} + + +stop() { + printf "Stopping portmap: " + echo + killall portmap + rm -rf /var/lock/subsys + echo "done" +} + +restart() { + stop + start + rm -f /var/run/portmap.state +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|reload|restart}" + exit 1 +esac + +exit $? diff --git a/package/portmap/portmap.hash b/package/portmap/portmap.hash new file mode 100644 index 0000000000..e542b2d981 --- /dev/null +++ b/package/portmap/portmap.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de portmap-6.0.tgz diff --git a/package/portmap/portmap.mk b/package/portmap/portmap.mk new file mode 100644 index 0000000000..5caf54cb21 --- /dev/null +++ b/package/portmap/portmap.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# portmap +# +################################################################################ + +PORTMAP_VERSION = 6.0 +PORTMAP_SOURCE = portmap-$(PORTMAP_VERSION).tgz +PORTMAP_SITE = http://neil.brown.name/portmap +PORTMAP_LICENSE = BSD-4c (portmap.c) SunRPC License (portmap.c from_local.c) +PORTMAP_LICENSE_FILES = portmap.c from_local.c +PORTMAP_SBINS = portmap pmap_dump pmap_set + +PORTMAP_FLAGS = NO_TCP_WRAPPER=1 NO_PIE=1 NO_PERROR=1 +ifeq ($(BR2_USE_MMU),) +PORTMAP_FLAGS += NO_FORK=1 +endif + +define PORTMAP_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(PORTMAP_FLAGS) +endef + +define PORTMAP_INSTALL_TARGET_CMDS + for sbin in $(PORTMAP_SBINS); do \ + $(INSTALL) -D -m 0755 $(@D)/$$sbin $(TARGET_DIR)/sbin/$$sbin || exit 1; \ + done +endef + +define PORTMAP_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/portmap/S13portmap $(TARGET_DIR)/etc/init.d/S13portmap +endef + +$(eval $(generic-package)) diff --git a/package/postgresql/Config.in b/package/postgresql/Config.in new file mode 100644 index 0000000000..e9b8f48d4a --- /dev/null +++ b/package/postgresql/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_POSTGRESQL + bool "postgresql" + depends on BR2_USE_MMU # fork() + # fails to build in a pure static linking scenario, and + # postgresql is unlikely to be used in a pure statically + # linked environment. + depends on !BR2_STATIC_LIBS + help + PostgreSQL is a powerful, open source object-relational + database system. + + Enable the readline package to gain readline support in + pgsql (the command line interpreter), which offers + command history and edit functions. + + Enable the zlib package to gain builtin compression for + archives with pg_dump and pg_restore. + + http://www.postgresql.org + +comment "postgresql needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/postgresql/S50postgresql b/package/postgresql/S50postgresql new file mode 100644 index 0000000000..1ece4fca9e --- /dev/null +++ b/package/postgresql/S50postgresql @@ -0,0 +1,44 @@ +#!/bin/sh +# +# start postgresql +# + +umask 077 + +if [ ! -f /var/lib/pgsql/PG_VERSION ]; then + echo "Initializing postgresql data base..." + su - postgres -c '/usr/bin/pg_ctl initdb -D /var/lib/pgsql' + echo "done" +fi + +start() { + printf "Starting postgresql: " + su - postgres -c '/usr/bin/pg_ctl start -w -D /var/lib/pgsql -l logfile' + echo "OK" +} +stop() { + printf "Stopping postgresql: " + su - postgres -c '/usr/bin/pg_ctl stop -D /var/lib/pgsql -m fast' + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/postgresql/pg_config b/package/postgresql/pg_config new file mode 100644 index 0000000000..85c0e63ddb --- /dev/null +++ b/package/postgresql/pg_config @@ -0,0 +1,19 @@ +#!/bin/sh + +# +# Minimal pg_config implementation as replacement for the native pg_config application +# Only implements --includedir and --libdir +# + +prefix=/usr + +case "$1" in + --includedir) + echo "$prefix/include" + ;; + --libdir) + echo "$prefix/lib" + ;; + *) + echo "Usage: $0 {--includedir|--libdir}" +esac diff --git a/package/postgresql/postgresql.hash b/package/postgresql/postgresql.hash new file mode 100644 index 0000000000..4e4adcb333 --- /dev/null +++ b/package/postgresql/postgresql.hash @@ -0,0 +1,2 @@ +# From https://ftp.postgresql.org/pub/source/v9.5.2/postgresql-9.5.2.tar.bz2.sha256 +sha256 f8d132e464506b551ef498719f18cfe9d777709c7a1589dc360afc0b20e47c41 postgresql-9.5.2.tar.bz2 diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk new file mode 100644 index 0000000000..584ab47bf5 --- /dev/null +++ b/package/postgresql/postgresql.mk @@ -0,0 +1,91 @@ +################################################################################ +# +# postgresql +# +################################################################################ + +POSTGRESQL_VERSION = 9.5.2 +POSTGRESQL_SOURCE = postgresql-$(POSTGRESQL_VERSION).tar.bz2 +POSTGRESQL_SITE = http://ftp.postgresql.org/pub/source/v$(POSTGRESQL_VERSION) +POSTGRESQL_LICENSE = PostgreSQL +POSTGRESQL_LICENSE_FILES = COPYRIGHT +POSTGRESQL_INSTALL_STAGING = YES +POSTGRESQL_CONFIG_SCRIPTS = pg_config +POSTGRESQL_CONF_ENV = ac_cv_type_struct_sockaddr_in6=yes \ + pgac_cv_snprintf_long_long_int_modifier="%lld" \ + pgac_cv_snprintf_size_t_support=yes +POSTGRESQL_CONF_OPTS = --disable-rpath + +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +# PostgreSQL does not build against uClibc with locales +# enabled, due to an uClibc bug, see +# http://lists.uclibc.org/pipermail/uclibc/2014-April/048326.html +# so overwrite automatic detection and disable locale support +POSTGRESQL_CONF_ENV += pgac_cv_type_locale_t=no +endif + +ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +POSTGRESQL_CONF_OPTS += --disable-thread-safety +endif + +ifeq ($(BR2_arcle)$(BR2_arceb)$(BR2_microblazeel)$(BR2_microblazebe)$(BR2_nios2)$(BR2_xtensa),y) +POSTGRESQL_CONF_OPTS += --disable-spinlocks +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +POSTGRESQL_DEPENDENCIES += readline +else +POSTGRESQL_CONF_OPTS += --without-readline +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +POSTGRESQL_DEPENDENCIES += zlib +else +POSTGRESQL_CONF_OPTS += --without-zlib +endif + +ifeq ($(BR2_PACKAGE_TZDATA),y) +POSTGRESQL_DEPENDENCIES += tzdata +POSTGRESQL_CONF_OPTS += --with-system-tzdata=/usr/share/zoneinfo +else +POSTGRESQL_DEPENDENCIES += host-zic +POSTGRESQL_CONF_ENV += ZIC="$(ZIC)" +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +POSTGRESQL_DEPENDENCIES += openssl +POSTGRESQL_CONF_OPTS += --with-openssl +endif + +define POSTGRESQL_USERS + postgres -1 postgres -1 * /var/lib/pgsql /bin/sh - PostgreSQL Server +endef + +define POSTGRESQL_INSTALL_TARGET_FIXUP + $(INSTALL) -dm 0700 $(TARGET_DIR)/var/lib/pgsql + $(RM) -rf $(TARGET_DIR)/usr/lib/postgresql/pgxs +endef + +POSTGRESQL_POST_INSTALL_TARGET_HOOKS += POSTGRESQL_INSTALL_TARGET_FIXUP + +define POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG + $(INSTALL) -m 0755 -D package/postgresql/pg_config \ + $(STAGING_DIR)/usr/bin/pg_config +endef + +POSTGRESQL_POST_INSTALL_STAGING_HOOKS += POSTGRESQL_INSTALL_CUSTOM_PG_CONFIG + +define POSTGRESQL_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/postgresql/S50postgresql \ + $(TARGET_DIR)/etc/init.d/S50postgresql +endef + +define POSTGRESQL_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/postgresql/postgresql.service \ + $(TARGET_DIR)/usr/lib/systemd/system/postgresql.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/postgresql.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/postgresql.service +endef + +$(eval $(autotools-package)) diff --git a/package/postgresql/postgresql.service b/package/postgresql/postgresql.service new file mode 100644 index 0000000000..4a96258684 --- /dev/null +++ b/package/postgresql/postgresql.service @@ -0,0 +1,24 @@ +[Unit] +Description=PostgreSQL database server +After=network.target + +[Service] +Type=forking + +# start timeout disabled because initdb may run a little +# longer (eg. 5 minutes on RaspberryPi) +TimeoutStartSec=0 + +User=postgres +Group=postgres + +SyslogIdentifier=postgres +PIDFile=/var/lib/pgsql/postmaster.pid + +ExecStartPre=/bin/sh -c "if [ ! -f /var/lib/pgsql/PG_VERSION ]; then /usr/bin/pg_ctl initdb -D /var/lib/pgsql; fi" +ExecStart=/usr/bin/pg_ctl start -D /var/lib/pgsql -w -l /var/lib/pgsql/logfile +ExecReload=/usr/bin/pg_ctl reload -D /var/lib/pgsql +ExecStop=/usr/bin/pg_ctl stop -D /var/lib/pgsql -m fast + +[Install] +WantedBy=multi-user.target diff --git a/package/pound/Config.in b/package/pound/Config.in new file mode 100644 index 0000000000..91c29ea7a6 --- /dev/null +++ b/package/pound/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_POUND + bool "pound" + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_OPENSSL + help + The Pound program is a reverse proxy, load balancer and HTTPS + front-end for Web server(s). Pound was developed to enable + distributing the load among several Web-servers and to allow + for a convenient SSL wrapper for those Web servers that do not + offer it natively. + + http://www.apsis.ch/pound + +comment "pound needs a toolchain w/ dynamic library, threads" + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/pound/pound.hash b/package/pound/pound.hash new file mode 100644 index 0000000000..6908b9060c --- /dev/null +++ b/package/pound/pound.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 cdfbf5a7e8dc8fbbe0d6c1e83cd3bd3f2472160aac65684bb01ef661c626a8e4 Pound-2.7.tgz diff --git a/package/pound/pound.mk b/package/pound/pound.mk new file mode 100644 index 0000000000..408664214b --- /dev/null +++ b/package/pound/pound.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# pound +# +################################################################################ + +POUND_VERSION = 2.7 +POUND_SITE = http://www.apsis.ch/pound +POUND_SOURCE = Pound-$(POUND_VERSION).tgz +POUND_LICENSE = GPLv3+ +POUND_LICENSE_FILES = GPL.txt +POUND_DEPENDENCIES = openssl + +# Force owner/group to us, otherwise it will try proxy:proxy by +# default. +POUND_CONF_OPTS = \ + --with-owner=$(shell id -un) \ + --with-group=$(shell id -gn) + +ifeq ($(BR2_PACKAGE_PCRE),y) +POUND_DEPENDENCIES += pcre +endif + +$(eval $(autotools-package)) diff --git a/package/powerpc-utils/Config.in b/package/powerpc-utils/Config.in new file mode 100644 index 0000000000..4037c55c61 --- /dev/null +++ b/package/powerpc-utils/Config.in @@ -0,0 +1,34 @@ +comment "powerpc-utils tools needs a toolchain w/ dynamic library" + depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_POWERPC_UTILS + bool "powerpc-utils" + depends on !BR2_STATIC_LIBS # dlfcn.h + depends on BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le + select BR2_PACKAGE_ZLIB + help + System utilities for PowerPC machines. + + https://github.com/nfont/powerpc-utils + +if BR2_PACKAGE_POWERPC_UTILS + +config BR2_PACKAGE_POWERPC_UTILS_RTAS + bool "RTAS support" + select BR2_PACKAGE_LIBRTAS + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Enable support for functions that require RTAS. + + This adds a dependency on librtas and provides the following + additional features at the cost of increasing the installed + package size from about 0.5MB to about 2MB: + ppc64_cpu --run-mode, uesensor, set_poweron_time, drmgr, + lsslot, activate_firmware, rtas_ibm_get_vpd, serv_config, + rtas_event_decode, sys_ident. + +comment "RTAS support needs an (e)glibc toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC + +endif diff --git a/package/powerpc-utils/powerpc-utils.hash b/package/powerpc-utils/powerpc-utils.hash new file mode 100644 index 0000000000..9e299da38a --- /dev/null +++ b/package/powerpc-utils/powerpc-utils.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 657790a4aea7f3e4649a454b4c384e255145bff9b9c5e40402170603980a6736 powerpc-utils-v1.3.1.tar.gz diff --git a/package/powerpc-utils/powerpc-utils.mk b/package/powerpc-utils/powerpc-utils.mk new file mode 100644 index 0000000000..036be52dc3 --- /dev/null +++ b/package/powerpc-utils/powerpc-utils.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# powerpc-utils +# +################################################################################ + +POWERPC_UTILS_VERSION = v1.3.1 +POWERPC_UTILS_SITE = $(call github,nfont,powerpc-utils,$(POWERPC_UTILS_VERSION)) +POWERPC_UTILS_DEPENDENCIES = zlib +POWERPC_UTILS_AUTORECONF = YES +POWERPC_UTILS_LICENSE = GPLv2+ +POWERPC_UTILS_LICENSE_FILES = COPYING + +POWERPC_UTILS_CONF_ENV = \ + ax_cv_check_cflags___fstack_protector_all=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) + +ifeq ($(BR2_PACKAGE_POWERPC_UTILS_RTAS),y) +POWERPC_UTILS_DEPENDENCIES += librtas +POWERPC_UTILS_CONF_OPTS = --with-librtas +else +POWERPC_UTILS_CONF_OPTS = --without-librtas +endif + +$(eval $(autotools-package)) diff --git a/package/powertop/0001-autotune-fix-use-after-close.patch b/package/powertop/0001-autotune-fix-use-after-close.patch new file mode 100644 index 0000000000..f2b3dff102 --- /dev/null +++ b/package/powertop/0001-autotune-fix-use-after-close.patch @@ -0,0 +1,15 @@ +Patch pulled from https://projects.archlinux.org/svntogit/community.git/tree/trunk?h=packages/powertop&id=37469c47b885c50365f57044e4ad72e0e3512b91 + +Fixes a use-after-close bug in create_all_devfreq_devices(). + +Signed-off-by: Steven Noonan + +--- a/src/devices/devfreq.cpp ++++ b/src/devices/devfreq.cpp +@@ -247,6 +247,7 @@ void create_all_devfreq_devices(void) + fprintf(stderr, "Devfreq not enabled\n"); + is_enabled = false; + closedir(dir); ++ dir = NULL; + return; + } diff --git a/package/powertop/0002-dont-force-stack-smashing-protection.patch b/package/powertop/0002-dont-force-stack-smashing-protection.patch new file mode 100644 index 0000000000..75ed2d1c24 --- /dev/null +++ b/package/powertop/0002-dont-force-stack-smashing-protection.patch @@ -0,0 +1,18 @@ +Do not pass -fstack-protector unconditionally + +Using -fstack-protector only works when the toolchain has SSP support. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/Makefile.am +=================================================================== +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -127,7 +127,6 @@ + -Wformat \ + -Wshadow \ + -fno-omit-frame-pointer \ +- -fstack-protector \ + $(GLIB2_CFLAGS) \ + $(LIBNL_CFLAGS) \ + $(NCURSES_CFLAGS) \ diff --git a/package/powertop/0003-add-missing-sys-time.h-header.patch b/package/powertop/0003-add-missing-sys-time.h-header.patch new file mode 100644 index 0000000000..7156e4256a --- /dev/null +++ b/package/powertop/0003-add-missing-sys-time.h-header.patch @@ -0,0 +1,35 @@ +From 283cab667a9ac3ae3a675b5e5d1a42191188699f Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 8 Aug 2015 18:24:48 +0200 +Subject: [PATCH] add missing sys/time.h header +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +struct timeval is defined in sys/time.h with a musl toolchain. + +Fixes: +In file included from devices/devfreq.cpp:35:0: +devices/devfreq.h:35:18: error: field ‘stamp_before’ has incomplete type ‘timeval’ + struct timeval stamp_before, stamp_after; + +Signed-off-by: Romain Naour +--- + src/devices/devfreq.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/devices/devfreq.h b/src/devices/devfreq.h +index 16a60fb..4a8983b 100644 +--- a/src/devices/devfreq.h ++++ b/src/devices/devfreq.h +@@ -27,6 +27,7 @@ + + #include "device.h" + #include "../parameters/parameters.h" ++#include + + struct frequency; + +-- +2.4.3 + diff --git a/package/powertop/0004-add-missing-stdio.h-header.patch b/package/powertop/0004-add-missing-stdio.h-header.patch new file mode 100644 index 0000000000..7619cca131 --- /dev/null +++ b/package/powertop/0004-add-missing-stdio.h-header.patch @@ -0,0 +1,35 @@ +From e6cfd977c81b335664db1d5d3d6b5488c245e30f Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sat, 8 Aug 2015 18:26:15 +0200 +Subject: [PATCH] add missing stdio.h header +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +snprinf is defined in stdio.h. + +Fixes: +perf/perf_bundle.cpp: In function ‘void parse_event_format(const char*)’: +perf/perf_bundle.cpp:141:75: error: ‘sprintf’ was not declared in this scope + sprintf(file, "/sys/kernel/debug/tracing/events/%s/%s/format", sys, event); + +Signed-off-by: Romain Naour +--- + src/perf/perf_bundle.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/perf/perf_bundle.cpp b/src/perf/perf_bundle.cpp +index cf1ae11..3d216ff 100644 +--- a/src/perf/perf_bundle.cpp ++++ b/src/perf/perf_bundle.cpp +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include "perf_bundle.h" + #include "perf_event.h" +-- +2.4.3 + diff --git a/package/powertop/Config.in b/package/powertop/Config.in new file mode 100644 index 0000000000..a532302a64 --- /dev/null +++ b/package/powertop/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_POWERTOP + bool "powertop" + depends on !BR2_bfin # pciutils + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + depends on BR2_USE_WCHAR + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_PCIUTILS + select BR2_PACKAGE_LIBNL + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + help + A tool to diagnose issues with power consumption and power management + + https://01.org/powertop/ + +comment "powertop needs a toolchain w/ C++, threads, wchar" + depends on !BR2_bfin + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_USE_WCHAR diff --git a/package/powertop/powertop.hash b/package/powertop/powertop.hash new file mode 100644 index 0000000000..b64981ea7a --- /dev/null +++ b/package/powertop/powertop.hash @@ -0,0 +1,2 @@ +# Locally-generated hash +sha256 8d4b1490e2baad4467c0ded3c423db4472dcbf7b2dd8f8f2a928f54047c678ca powertop-2.7.tar.gz diff --git a/package/powertop/powertop.mk b/package/powertop/powertop.mk new file mode 100644 index 0000000000..53be483a6d --- /dev/null +++ b/package/powertop/powertop.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# powertop +# +################################################################################ + +POWERTOP_VERSION = 2.7 +POWERTOP_SITE = https://01.org/sites/default/files/downloads/powertop +POWERTOP_DEPENDENCIES = pciutils ncurses libnl host-gettext host-pkgconf +POWERTOP_LICENSE = GPLv2 +POWERTOP_LICENSE_FILES = COPYING +# We're patching Makefile.am +POWERTOP_AUTORECONF = YES +POWERTOP_GETTEXTIZE = YES + +ifeq ($(BR2_NEEDS_GETTEXT),y) +POWERTOP_DEPENDENCIES += gettext +POWERTOP_CONF_ENV += LIBS='-lintl' +endif + +# Help powertop at finding the right ncurses library depending on +# which one is available. +ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y) +POWERTOP_CONF_ENV += ac_cv_search_delwin="-lncursesw" +else +POWERTOP_CONF_ENV += ac_cv_search_delwin="-lncurses" +endif + +$(eval $(autotools-package)) diff --git a/package/powervr/Config.in b/package/powervr/Config.in new file mode 100644 index 0000000000..746e15b291 --- /dev/null +++ b/package/powervr/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HAS_POWERVR + bool + +config BR2_PACKAGE_PROVIDES_POWERVR + depends on BR2_PACKAGE_HAS_POWERVR + string diff --git a/package/powervr/powervr.mk b/package/powervr/powervr.mk new file mode 100644 index 0000000000..5a55860556 --- /dev/null +++ b/package/powervr/powervr.mk @@ -0,0 +1,7 @@ +################################################################################ +# +# powervr +# +################################################################################ + +$(eval $(virtual-package)) diff --git a/package/pppd/Config.in b/package/pppd/Config.in new file mode 100644 index 0000000000..b77d7b03da --- /dev/null +++ b/package/pppd/Config.in @@ -0,0 +1,29 @@ +config BR2_PACKAGE_PPPD + bool "pppd" + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU + help + An implementation of the Point-to-point protocol. + + http://www.samba.org/ppp/ + +if BR2_PACKAGE_PPPD + +config BR2_PACKAGE_PPPD_FILTER + select BR2_PACKAGE_LIBPCAP + bool "filtering" + help + Packet filtering abilities for pppd. If enabled, + the pppd active-filter and pass-filter options + are available. + +config BR2_PACKAGE_PPPD_RADIUS + bool "radius" + help + Install RADIUS support for pppd + +endif + +comment "pppd needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + depends on BR2_USE_MMU diff --git a/package/pppd/pppd.hash b/package/pppd/pppd.hash new file mode 100644 index 0000000000..2bc248d89f --- /dev/null +++ b/package/pppd/pppd.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 02e0a3dd3e4799e33103f70ec7df75348c8540966ee7c948e4ed8a42bbccfb30 ppp-2.4.7.tar.gz diff --git a/package/pppd/pppd.mk b/package/pppd/pppd.mk new file mode 100644 index 0000000000..92897be9d9 --- /dev/null +++ b/package/pppd/pppd.mk @@ -0,0 +1,110 @@ +################################################################################ +# +# pppd +# +################################################################################ + +PPPD_VERSION = 2.4.7 +PPPD_SOURCE = ppp-$(PPPD_VERSION).tar.gz +PPPD_SITE = https://download.samba.org/pub/ppp +PPPD_LICENSE = LGPLv2+, LGPL, BSD-4c, BSD-3c, GPLv2+ +PPPD_LICENSE_FILES = \ + pppd/tdb.c pppd/plugins/pppoatm/COPYING \ + pppdump/bsd-comp.c pppd/ccp.c pppd/plugins/passprompt.c + +PPPD_MAKE_OPTS = HAVE_INET6=y +PPPD_INSTALL_STAGING = YES +PPPD_TARGET_BINS = chat pppd pppdump pppstats +PPPD_RADIUS_CONF = \ + dictionary dictionary.ascend dictionary.compat \ + dictionary.merit dictionary.microsoft \ + issue port-id-map realms server radiusclient.conf + +ifeq ($(BR2_PACKAGE_PPPD_FILTER),y) +PPPD_DEPENDENCIES += libpcap +PPPD_MAKE_OPTS += FILTER=y +endif + +# pppd bundles some but not all of the needed kernel headers. The embedded +# if_pppol2tp.h is unfortunately not compatible with kernel headers > 2.6.34, +# and has been part of the kernel headers since 2.6.23, so drop it +define PPPD_DROP_INTERNAL_IF_PPOL2TP_H + $(RM) $(@D)/include/linux/if_pppol2tp.h +endef + +PPPD_POST_EXTRACT_HOOKS += PPPD_DROP_INTERNAL_IF_PPOL2TP_H + +# pppd defaults to /etc/ppp/resolv.conf, which not be writable and is +# definitely not useful since the C library only uses +# /etc/resolv.conf. Therefore, we change pppd to use /etc/resolv.conf +# instead. +define PPPD_SET_RESOLV_CONF + $(SED) 's,ppp/resolv.conf,resolv.conf,' $(@D)/pppd/pathnames.h +endef +PPPD_POST_EXTRACT_HOOKS += PPPD_SET_RESOLV_CONF + +define PPPD_CONFIGURE_CMDS + $(SED) 's/FILTER=y/#FILTER=y/' $(PPPD_DIR)/pppd/Makefile.linux + $(SED) 's/ifneq ($$(wildcard \/usr\/include\/pcap-bpf.h),)/ifdef FILTER/' $(PPPD_DIR)/*/Makefile.linux + ( cd $(@D); ./configure --prefix=/usr ) +endef + +define PPPD_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" COPTS="$(TARGET_CFLAGS)" \ + -C $(@D) $(PPPD_MAKE_OPTS) +endef + +ifeq ($(BR2_PACKAGE_PPPD_RADIUS),y) +define PPPD_INSTALL_RADIUS + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radattr.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radattr.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radius.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radius.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/radius/radrealms.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/radrealms.so + for m in $(PPPD_RADIUS_CONF); do \ + $(INSTALL) -m 644 -D $(PPPD_DIR)/pppd/plugins/radius/etc/$$m \ + $(TARGET_DIR)/etc/ppp/radius/$$m; \ + done + $(SED) 's:/usr/local/etc:/etc:' \ + $(TARGET_DIR)/etc/ppp/radius/radiusclient.conf + $(SED) 's:/usr/local/sbin:/usr/sbin:' \ + $(TARGET_DIR)/etc/ppp/radius/radiusclient.conf + $(SED) 's:/etc/radiusclient:/etc/ppp/radius:g' \ + $(TARGET_DIR)/etc/ppp/radius/* +endef +endif + +define PPPD_INSTALL_TARGET_CMDS + for sbin in $(PPPD_TARGET_BINS); do \ + $(INSTALL) -D $(PPPD_DIR)/$$sbin/$$sbin \ + $(TARGET_DIR)/usr/sbin/$$sbin; \ + done + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/minconn.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/minconn.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/passprompt.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/passprompt.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/passwordfd.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/passwordfd.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppoatm/pppoatm.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/pppoatm.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/rp-pppoe/rp-pppoe.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/rp-pppoe.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/rp-pppoe/pppoe-discovery \ + $(TARGET_DIR)/usr/sbin/pppoe-discovery + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/winbind.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/winbind.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppol2tp/openl2tp.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/openl2tp.so + $(INSTALL) -D $(PPPD_DIR)/pppd/plugins/pppol2tp/pppol2tp.so \ + $(TARGET_DIR)/usr/lib/pppd/$(PPPD_VERSION)/pppol2tp.so + $(INSTALL) -D -m 0755 $(PPPD_DIR)/scripts/pon $(TARGET_DIR)/usr/bin/pon + $(INSTALL) -D -m 0755 $(PPPD_DIR)/scripts/poff $(TARGET_DIR)/usr/bin/poff + $(PPPD_INSTALL_RADIUS) +endef + +define PPPD_INSTALL_STAGING_CMDS + $(MAKE) INSTROOT=$(STAGING_DIR)/ -C $(@D) $(PPPD_MAKE_OPTS) install-devel +endef + +$(eval $(generic-package)) diff --git a/package/pps-tools/Config.in b/package/pps-tools/Config.in new file mode 100644 index 0000000000..83308f4f32 --- /dev/null +++ b/package/pps-tools/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PPS_TOOLS + bool "pps-tools" + help + Pulse per second tools. Provides timepps.h and other PPS utilities. + + https://github.com/ago/pps-tools/ diff --git a/package/pps-tools/pps-tools.mk b/package/pps-tools/pps-tools.mk new file mode 100644 index 0000000000..48feea9f21 --- /dev/null +++ b/package/pps-tools/pps-tools.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# pps-tools +# +################################################################################ + +PPS_TOOLS_VERSION = 0deb9c7e135e9380a6d09e9d2e938a146bb698c8 +PPS_TOOLS_SITE = $(call github,ago,pps-tools,$(PPS_TOOLS_VERSION)) +PPS_TOOLS_INSTALL_STAGING = YES +PPS_TOOLS_LICENSE = GPLv2+ +PPS_TOOLS_LICENSE_FILES = COPYING + +define PPS_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) all +endef + +define PPS_TOOLS_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/include/sys $(STAGING_DIR)/usr/bin + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + DESTDIR=$(STAGING_DIR) -C $(@D) install +endef + +define PPS_TOOLS_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/usr/include/sys $(TARGET_DIR)/usr/bin + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + DESTDIR=$(TARGET_DIR) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/pptp-linux/0001-susv3-legacy.patch b/package/pptp-linux/0001-susv3-legacy.patch new file mode 100644 index 0000000000..5cc9f57809 --- /dev/null +++ b/package/pptp-linux/0001-susv3-legacy.patch @@ -0,0 +1,29 @@ +bzero is deprecated in POSIX.1-2001 and removed for POSIX.1-2008 so +switch to memset instead. + +Signed-off-by: Gustavo Zacarias + +diff -Nura pptp-1.8.0.orig/pptp_callmgr.c pptp-1.8.0/pptp_callmgr.c +--- pptp-1.8.0.orig/pptp_callmgr.c 2013-10-23 05:10:46.000000000 -0300 ++++ pptp-1.8.0/pptp_callmgr.c 2014-03-31 16:47:42.617643298 -0300 +@@ -340,7 +340,7 @@ + } + #endif + if (localbind.s_addr != INADDR_NONE) { +- bzero(&src, sizeof(src)); ++ memset(&src, 0, sizeof(src)); + src.i.sin_family = AF_INET; + src.i.sin_addr = localbind; + if (bind(s, &src.a, sizeof(src.i)) != 0) { +diff -Nura pptp-1.8.0.orig/pptp_gre.c pptp-1.8.0/pptp_gre.c +--- pptp-1.8.0.orig/pptp_gre.c 2013-10-23 05:10:46.000000000 -0300 ++++ pptp-1.8.0/pptp_gre.c 2014-03-31 16:47:30.745249066 -0300 +@@ -103,7 +103,7 @@ + } + #endif + if (localbind.s_addr != INADDR_NONE) { +- bzero(&loc_addr, sizeof(loc_addr)); ++ memset(&loc_addr, 0, sizeof(loc_addr)); + loc_addr.i.sin_family = AF_INET; + loc_addr.i.sin_addr = localbind; + if (bind(s, &loc_addr.a, sizeof(loc_addr.i)) != 0) { diff --git a/package/pptp-linux/0002-fix-parallel-build.patch b/package/pptp-linux/0002-fix-parallel-build.patch new file mode 100644 index 0000000000..04a797743f --- /dev/null +++ b/package/pptp-linux/0002-fix-parallel-build.patch @@ -0,0 +1,23 @@ +Fix parallel build issue + +The config.h header file must be created before being used to build +source files that include it, especially version.c. In order for this +to happen even in highly-parallel builds, we add a dependency of all +object files on config.h, in order to ensure it gets generated before +make attempts to build the object files. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -37,6 +37,8 @@ + + all: config.h $(PPTP_BIN) pptpsetup.8 + ++$(PPTP_OBJS): config.h ++ + $(PPTP_BIN): $(PPTP_OBJS) $(PPTP_DEPS) + $(CC) -o $(PPTP_BIN) $(PPTP_OBJS) $(LDFLAGS) $(LIBS) + diff --git a/package/pptp-linux/0003-pqueue.h-include-sys-types.h.patch b/package/pptp-linux/0003-pqueue.h-include-sys-types.h.patch new file mode 100644 index 0000000000..d6b5445fa9 --- /dev/null +++ b/package/pptp-linux/0003-pqueue.h-include-sys-types.h.patch @@ -0,0 +1,30 @@ +From 060ad28b9ca5e99d7c6e8010132da58a3a8a0585 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Fri, 22 Jan 2016 10:19:18 -0300 +Subject: [PATCH] pqueue.h: include sys/types.h + +We're using u_int32_t here, this breaks on musl libc builds otherwise. + +Signed-off-by: Gustavo Zacarias +--- +Patch status: sent upstream to the devel mailing list +(moderated, no archive link yet) + + pqueue.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/pqueue.h b/pqueue.h +index a56590f..8c60c62 100644 +--- a/pqueue.h ++++ b/pqueue.h +@@ -3,6 +3,7 @@ + + #include + #include ++#include + + /* wait this many seconds for missing packets before forgetting about them */ + #define DEFAULT_PACKET_TIMEOUT 0.3 +-- +2.4.10 + diff --git a/package/pptp-linux/Config.in b/package/pptp-linux/Config.in new file mode 100644 index 0000000000..e03a906efd --- /dev/null +++ b/package/pptp-linux/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PPTP_LINUX + bool "pptp-linux" + depends on BR2_USE_MMU # fork() + help + An implementation of the Point-to-point protocol client. + + http://pptpclient.sourceforge.net/ diff --git a/package/pptp-linux/pptp-linux.hash b/package/pptp-linux/pptp-linux.hash new file mode 100644 index 0000000000..839d0bf84f --- /dev/null +++ b/package/pptp-linux/pptp-linux.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/pptpclient/files/pptp/pptp-1.8.0/ +md5 4efce9f263e2c3f38d79d9df222476de pptp-1.8.0.tar.gz +sha1 6289953812ac986c7234e83aefb10b5e279dc613 pptp-1.8.0.tar.gz diff --git a/package/pptp-linux/pptp-linux.mk b/package/pptp-linux/pptp-linux.mk new file mode 100644 index 0000000000..d7edf6cd06 --- /dev/null +++ b/package/pptp-linux/pptp-linux.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# pptp-linux +# +################################################################################ + +PPTP_LINUX_VERSION = 1.8.0 +PPTP_LINUX_SITE = http://downloads.sourceforge.net/project/pptpclient/pptp/pptp-$(PPTP_LINUX_VERSION) +PPTP_LINUX_SOURCE = pptp-$(PPTP_LINUX_VERSION).tar.gz +PPTP_LINUX_MAKE = $(MAKE1) +PPTP_LINUX_LICENSE = GPLv2+ +PPTP_LINUX_LICENSE_FILES = COPYING + +define PPTP_LINUX_BUILD_CMDS + $(MAKE) -C $(@D) OPTIMIZE= DEBUG= \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + IP=/sbin/ip +endef + +define PPTP_LINUX_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/pptp $(TARGET_DIR)/usr/sbin/pptp +endef + +$(eval $(generic-package)) diff --git a/package/prboom/0001-libpng-1.4.patch b/package/prboom/0001-libpng-1.4.patch new file mode 100644 index 0000000000..0d2a3a5ba8 --- /dev/null +++ b/package/prboom/0001-libpng-1.4.patch @@ -0,0 +1,32 @@ +[PATCH] fix build with libpng 1.4.x + +In 1.4.x the png_*_NULL defines are gone. Replace them with a normal +NULL instead. + +Signed-off-by: Peter Korsgaard +--- + src/SDL/i_sshot.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: prboom-2.5.0/src/SDL/i_sshot.c +=================================================================== +--- prboom-2.5.0.orig/src/SDL/i_sshot.c ++++ prboom-2.5.0/src/SDL/i_sshot.c +@@ -231,7 +231,7 @@ int I_ScreenShot (const char *fname) + if (fp) + { + png_struct *png_ptr = png_create_write_struct( +- PNG_LIBPNG_VER_STRING, png_error_ptr_NULL, error_fn, warning_fn); ++ PNG_LIBPNG_VER_STRING, NULL, error_fn, warning_fn); + + if (png_ptr) + { +@@ -279,7 +279,7 @@ int I_ScreenShot (const char *fname) + break; + } + } +- png_destroy_write_struct(&png_ptr, png_infopp_NULL); ++ png_destroy_write_struct(&png_ptr, NULL); + } + fclose(fp); + } diff --git a/package/prboom/Config.in b/package/prboom/Config.in new file mode 100644 index 0000000000..6884f31e46 --- /dev/null +++ b/package/prboom/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_PRBOOM + bool "prboom" + # These result in internal compiler error + depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH + select BR2_PACKAGE_SDL + select BR2_PACKAGE_SDL_MIXER + select BR2_PACKAGE_SDL_NET + help + PrBoom is a Doom client which allows you to play the good old game on + newer hardware. It even supports higher resolution and better + rendering, while still keeping the old style alive. + + http://prboom.sourceforge.net/ diff --git a/package/prboom/prboom.hash b/package/prboom/prboom.hash new file mode 100644 index 0000000000..0d80349a61 --- /dev/null +++ b/package/prboom/prboom.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 226c1c470f8cc983327536404f405a1d026cf0a5188c694a1243cc8630014bae prboom-2.5.0.tar.gz diff --git a/package/prboom/prboom.mk b/package/prboom/prboom.mk new file mode 100644 index 0000000000..5f5e7fb677 --- /dev/null +++ b/package/prboom/prboom.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# prboom +# +################################################################################ + +PRBOOM_VERSION = 2.5.0 +PRBOOM_SITE = http://downloads.sourceforge.net/project/prboom/prboom%20stable/$(PRBOOM_VERSION) +PRBOOM_CONF_ENV = ac_cv_type_uid_t=yes +PRBOOM_DEPENDENCIES = sdl sdl_net sdl_mixer +PRBOOM_LICENSE = GPLv2+ +PRBOOM_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +PRBOOM_DEPENDENCIES += libpng +endif + +ifeq ($(BR2_STATIC_LIBS),y) +# SDL_mixer uses symbols from SDL, but ends up after it on the link +# cmdline. Fix it by forcing the SDL libs at the very end +PRBOOM_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/sdl-config --static-libs`" +endif + +PRBOOM_CONF_OPTS = \ + --oldincludedir=$(STAGING_DIR)/usr/include \ + --with-sdl-prefix=$(STAGING_DIR)/usr \ + --with-sdl-exec-prefix=$(STAGING_DIR)/usr \ + --disable-cpu-opt \ + --disable-sdltest \ + --disable-gl + +# endianness detection isn't used when cross compiling +define PRBOOM_BIG_ENDIAN_FIXUP + $(SED) 's,.*#undef WORDS_BIGENDIAN.*,#define WORDS_BIGENDIAN 1,g' \ + $(PRBOOM_DIR)/config.h +endef + +ifeq ($(BR2_ENDIAN),"BIG") +PRBOOM_POST_CONFIGURE_HOOKS += PRBOOM_BIG_ENDIAN_FIXUP +endif + +define PRBOOM_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/src/prboom $(TARGET_DIR)/usr/games/prboom + $(INSTALL) -D $(@D)/src/prboom-game-server $(TARGET_DIR)/usr/games/prboom-game-server + $(INSTALL) -D $(@D)/data/prboom.wad $(TARGET_DIR)/usr/share/games/doom/prboom.wad +endef + +$(eval $(autotools-package)) diff --git a/package/privoxy/Config.in b/package/privoxy/Config.in new file mode 100644 index 0000000000..8d8d01a73f --- /dev/null +++ b/package/privoxy/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PRIVOXY + bool "privoxy" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_ZLIB + help + A non-caching web proxy with advanced filtering capabilities + for enhancing privacy, modifying web page data and HTTP + headers, controlling access, and removing ads and other + obnoxious Internet junk. + + http://www.privoxy.org/ diff --git a/package/privoxy/privoxy.hash b/package/privoxy/privoxy.hash new file mode 100644 index 0000000000..aea8f2d587 --- /dev/null +++ b/package/privoxy/privoxy.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/ijbswa/files/Sources/3.0.24%20%28stable%29/ +md5 44a47d1a5000db8cccd61ace0e25e7f7 privoxy-3.0.24-stable-src.tar.gz +sha1 343c547a9e795ff029a78310963e0c04448975ee privoxy-3.0.24-stable-src.tar.gz diff --git a/package/privoxy/privoxy.mk b/package/privoxy/privoxy.mk new file mode 100644 index 0000000000..4b5a1a6d30 --- /dev/null +++ b/package/privoxy/privoxy.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# privoxy +# +################################################################################ + +PRIVOXY_VERSION = 3.0.24 +PRIVOXY_SITE = http://downloads.sourceforge.net/project/ijbswa/Sources/$(PRIVOXY_VERSION)%20%28stable%29 +PRIVOXY_SOURCE = privoxy-$(PRIVOXY_VERSION)-stable-src.tar.gz +# configure not shipped +PRIVOXY_AUTORECONF = YES +PRIVOXY_DEPENDENCIES = pcre zlib +PRIVOXY_LICENSE = GPLv2+ +PRIVOXY_LICENSE_FILES = LICENSE + +$(eval $(autotools-package)) diff --git a/package/procps-ng/0001-remove-index.patch b/package/procps-ng/0001-remove-index.patch new file mode 100644 index 0000000000..1d85b31cb5 --- /dev/null +++ b/package/procps-ng/0001-remove-index.patch @@ -0,0 +1,16 @@ +sysctl: remove use of legacy index() + +[yann.morin.1998@free.fr: adapt to procps-ng] +Signed-off-by: "Yann E. MORIN" +diff -durN procps-v3.3.9.orig/sysctl.c procps-v3.3.9/sysctl.c +--- procps-v3.3.9.orig/sysctl.c 2013-12-03 12:16:18.000000000 +0100 ++++ procps-v3.3.9/sysctl.c 2014-05-31 00:45:00.869748741 +0200 +@@ -794,7 +794,7 @@ + program_invocation_short_name); + + for ( ; *argv; argv++) { +- if (WriteMode || index(*argv, '=')) ++ if (WriteMode || strchr(*argv, '=')) + ReturnCode += WriteSetting(*argv); + else + ReturnCode += ReadSetting(*argv); diff --git a/package/procps-ng/0002-use-pkgconfig-for-ncursesw-cflags.patch b/package/procps-ng/0002-use-pkgconfig-for-ncursesw-cflags.patch new file mode 100644 index 0000000000..c25da3b278 --- /dev/null +++ b/package/procps-ng/0002-use-pkgconfig-for-ncursesw-cflags.patch @@ -0,0 +1,57 @@ +Don't assume ncursesw headers are in ../usr/include/ncursesw/.. +On a pure build/system without legacy ncurses that may not be true. +Since we're using pkg-config let it provide the correct include path. + +Status: contacted one of the maintainers on sf.net +(ticket submission closed to the public, no other way of contacting them). + +Signed-off-by: Gustavo Zacarias +[Bernd: Rebased for version 3.3.11] + +diff -Nura procps-ng-3.3.10.orig/configure.ac procps-ng-3.3.10/configure.ac +--- procps-ng-3.3.10.orig/configure.ac 2015-04-07 19:21:55.729819952 -0300 ++++ procps-ng-3.3.10/configure.ac 2015-04-07 19:32:09.511706653 -0300 +@@ -138,7 +138,8 @@ + ]) + AM_CONDITIONAL(WITH_NCURSES, true) + if test "$enable_watch8bit" = yes; then +- PKG_CHECK_MODULES([NCURSESW], [ncursesw], [WATCH_NCURSES_LIBS="$NCURSESW_LIBS"], [ ++ PKG_CHECK_MODULES([NCURSESW], [ncursesw], [WATCH_NCURSES_LIBS="$NCURSESW_LIBS"] ++ [WATCH_NCURSES_CFLAGS="$NCURSESW_CFLAGS"], [ + AC_CHECK_LIB([ncursesw], [addwstr], [WATCH_NCURSES_LIBS=-lncursesw], + [AC_MSG_ERROR([Cannot find ncurses wide library ncursesw with --enable-watch8bit])]) + ]) +@@ -148,6 +149,7 @@ + fi + AC_SUBST([NCURSES_LIBS]) + AC_SUBST([WATCH_NCURSES_LIBS]) ++AC_SUBST([WATCH_NCURSES_CFLAGS]) + + AC_ARG_WITH([systemd], + [AS_HELP_STRING([--with-systemd], [enable systemd support])], +diff -Nura procps-ng-3.3.10.orig/Makefile.am procps-ng-3.3.10/Makefile.am +--- procps-ng-3.3.10.orig/Makefile.am 2015-04-07 19:21:55.655817434 -0300 ++++ procps-ng-3.3.10/Makefile.am 2015-04-07 19:32:54.516238136 -0300 +@@ -97,6 +97,7 @@ + slabtop_LDADD = $(LDADD) @NCURSES_LIBS@ + watch_SOURCES = watch.c lib/strutils.c lib/fileutils.c + watch_LDADD = $(LDADD) @WATCH_NCURSES_LIBS@ ++watch_CFLAGS = @WATCH_NCURSES_CFLAGS@ + top_top_SOURCES = \ + top/top.h \ + top/top.c \ +diff -Nura procps-ng-3.3.10.orig/watch.c procps-ng-3.3.10/watch.c +--- procps-ng-3.3.10.orig/watch.c 2015-04-07 19:21:55.707819203 -0300 ++++ procps-ng-3.3.10/watch.c 2015-04-07 19:22:27.323895083 -0300 +@@ -51,10 +51,8 @@ + #ifdef WITH_WATCH8BIT + # include + # include +-# include +-#else +-# include + #endif /* WITH_WATCH8BIT */ ++#include + + #ifdef FORCE_8BIT + # undef isprint diff --git a/package/procps-ng/Config.in b/package/procps-ng/Config.in new file mode 100644 index 0000000000..43e8758a15 --- /dev/null +++ b/package/procps-ng/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PROCPS_NG + bool "procps-ng" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + Standard informational utilities and process-handling tools. + Provides things like kill, ps, uptime, free, top, etc... + + http://sourceforge.net/projects/procps-ng/ diff --git a/package/procps-ng/procps-ng.hash b/package/procps-ng/procps-ng.hash new file mode 100644 index 0000000000..c98fb14e69 --- /dev/null +++ b/package/procps-ng/procps-ng.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/procps-ng/files/Production/ +md5 6cc5b94c1c5b8cbc89ad345a7b522f74 procps-ng-3.3.11.tar.xz +sha1 1bdca65547df9ed019bd83649b0f8b8eaa017e25 procps-ng-3.3.11.tar.xz diff --git a/package/procps-ng/procps-ng.mk b/package/procps-ng/procps-ng.mk new file mode 100644 index 0000000000..51a70a5dc5 --- /dev/null +++ b/package/procps-ng/procps-ng.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# procps-ng +# +################################################################################ + +PROCPS_NG_VERSION = 3.3.11 +PROCPS_NG_SOURCE = procps-ng-$(PROCPS_NG_VERSION).tar.xz +PROCPS_NG_SITE = http://downloads.sourceforge.net/project/procps-ng/Production +PROCPS_NG_LICENSE = GPLv2+, libproc and libps LGPLv2+ +PROCPS_NG_LICENSE_FILES = COPYING COPYING.LIB +PROCPS_NG_INSTALL_STAGING = YES +PROCPS_NG_DEPENDENCIES = ncurses host-pkgconf +# For 0002-use-pkgconfig-for-ncursesw-cflags.patch +PROCPS_NG_AUTORECONF = YES +PROCPS_NG_GETTEXTIZE = YES + +# If both procps-ng and busybox are selected, make certain procps-ng +# wins the fight over who gets to have their utils actually installed. +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +PROCPS_NG_DEPENDENCIES += busybox +endif + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +PROCPS_NG_DEPENDENCIES += gettext +PROCPS_NG_CONF_OPTS += LIBS=-lintl +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +PROCPS_NG_DEPENDENCIES += systemd +PROCPS_NG_CONF_OPTS += --with-systemd +else +PROCPS_NG_CONF_OPTS += --without-systemd +endif + +# Make sure binaries get installed in /bin, so that they overwrite +# their busybox counterparts. +# Make sure libprocps.pc is installed in STAGING_DIR/usr/lib/pkgconfig/ +# otherwise it's installed in STAGING_DIR/lib/pkgconfig/ breaking +# pkg-config --libs libprocps. +PROCPS_NG_CONF_OPTS += --exec-prefix=/ \ + --libdir=/usr/lib + +# Allows unicode characters to show in 'watch' +ifeq ($(BR2_PACKAGE_NCURSES_WCHAR),y) +PROCPS_NG_CONF_OPTS += \ + --enable-watch8bit +endif + +$(eval $(autotools-package)) diff --git a/package/procrank_linux/Config.in b/package/procrank_linux/Config.in new file mode 100644 index 0000000000..59d462b6d4 --- /dev/null +++ b/package/procrank_linux/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PROCRANK_LINUX + bool "procrank_linux" + help + procrank is a tool commonly used by Android platform + developers to find out how much memory is really being used. + + https://github.com/csimmonds/procrank_linux diff --git a/package/procrank_linux/procrank_linux.hash b/package/procrank_linux/procrank_linux.hash new file mode 100644 index 0000000000..b28a8e3683 --- /dev/null +++ b/package/procrank_linux/procrank_linux.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 1c3592b549b6793b29ab561568f493d0edbfe288ea2aed59afa689eaa26b5d9e procrank_linux-21c30ab4514a5b15ac6e813e21bee0d3d714cb08.tar.gz diff --git a/package/procrank_linux/procrank_linux.mk b/package/procrank_linux/procrank_linux.mk new file mode 100644 index 0000000000..7e743194fc --- /dev/null +++ b/package/procrank_linux/procrank_linux.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# procrank_linux +# +################################################################################ + +PROCRANK_LINUX_VERSION = 21c30ab4514a5b15ac6e813e21bee0d3d714cb08 +PROCRANK_LINUX_SITE = $(call github,csimmonds,procrank_linux,$(PROCRANK_LINUX_VERSION)) +PROCRANK_LINUX_LICENSE = Apache-2.0 +PROCRANK_LINUX_LICENSE_FILES = NOTICE + +define PROCRANK_LINUX_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE="$(TARGET_CROSS)" +endef + +define PROCRANK_LINUX_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/procrank \ + $(TARGET_DIR)/usr/bin/procrank +endef + +$(eval $(generic-package)) diff --git a/package/proftpd/0001-fix-kernel-header-capability-version.patch b/package/proftpd/0001-fix-kernel-header-capability-version.patch new file mode 100644 index 0000000000..4401c9aeaf --- /dev/null +++ b/package/proftpd/0001-fix-kernel-header-capability-version.patch @@ -0,0 +1,12 @@ +--- a/lib/libcap/libcap.h 2008-08-22 19:49:48.000000000 -0700 ++++ b/lib/libcap/libcap.h 2010-10-06 15:31:11.000000000 -0700 +@@ -65,7 +65,8 @@ struct _cap_struct { + */ + + #if !defined(_LINUX_CAPABILITY_VERSION_1) || \ +- (_LINUX_CAPABILITY_VERSION_1 != 0x19980330) ++ ((_LINUX_CAPABILITY_VERSION_1 != 0x19980330) && \ ++ (_LINUX_CAPABILITY_VERSION_1 != 0x20071026)) + + # error "Kernel does not match library" + # error "file "libcap.h" --> fix and recompile libcap" diff --git a/package/proftpd/0002-__mempcpy.patch b/package/proftpd/0002-__mempcpy.patch new file mode 100644 index 0000000000..1b8f0b0bd3 --- /dev/null +++ b/package/proftpd/0002-__mempcpy.patch @@ -0,0 +1,54 @@ +[PATCH] pr_fnmatch.c: use mempcpy, not __mempcpy to fix linker issue with uClibc + +The standard name (as checked for by configure) for the function is mempcpy, +not __mempcpy, so use that instead. + +The existing code happens to work on glibc, as that provides an __mempcpy +alias, but other C libraries (E.G. uClibc) don't: + +./host/usr/bin/arm-linux-nm -D ./staging/lib/libuClibc-0.9.33.2.so | grep mempcpy +00035d2c W mempcpy +00036cf8 W wmempcpy + +vs + +./host/usr/bin/arm-none-linux-gnueabi-nm -D staging/lib/libc-2.18.so | grep mempcpy +0007d140 T mempcpy +0007d140 T __mempcpy +000e15f0 T __mempcpy_chk +00081828 T __mempcpy_small +00083148 W wmempcpy +000e4e3c T __wmempcpy_chk + +Signed-off-by: Peter Korsgaard +--- + lib/pr_fnmatch.c | 2 +- + lib/pr_fnmatch_loop.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +Index: proftpd-1.3.4d/lib/pr_fnmatch.c +=================================================================== +--- proftpd-1.3.4d.orig/lib/pr_fnmatch.c ++++ proftpd-1.3.4d/lib/pr_fnmatch.c +@@ -250,7 +250,7 @@ + # endif + # define STRLEN(S) strlen (S) + # define STRCAT(D, S) strcat (D, S) +-# define MEMPCPY(D, S, N) __mempcpy (D, S, N) ++# define MEMPCPY(D, S, N) mempcpy (D, S, N) + # define MEMCHR(S, C, N) memchr (S, C, N) + # define STRCOLL(S1, S2) strcoll (S1, S2) + # include "pr_fnmatch_loop.c" +Index: proftpd-1.3.4d/lib/pr_fnmatch_loop.c +=================================================================== +--- proftpd-1.3.4d.orig/lib/pr_fnmatch_loop.c ++++ proftpd-1.3.4d/lib/pr_fnmatch_loop.c +@@ -54,7 +54,7 @@ + /* Copy N bytes of SRC to DEST, return pointer to bytes after the + last written byte. */ + static void * +-__mempcpy (void *dest, const void *src, size_t n) ++mempcpy (void *dest, const void *src, size_t n) + { + return (char *) memcpy (dest, src, n) + n; + } diff --git a/package/proftpd/Config.in b/package/proftpd/Config.in new file mode 100644 index 0000000000..dd87eb45aa --- /dev/null +++ b/package/proftpd/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_PROFTPD + bool "proftpd" + depends on BR2_USE_MMU # fork() + help + ProFTPD, a highly configurable FTP server. + + http://www.proftpd.org/ + +if BR2_PACKAGE_PROFTPD + +config BR2_PACKAGE_PROFTPD_MOD_REWRITE + bool "mod_rewrite support" + help + Compile ProFTPD with mod_rewrite support + +endif diff --git a/package/proftpd/S50proftpd b/package/proftpd/S50proftpd new file mode 100755 index 0000000000..336680a456 --- /dev/null +++ b/package/proftpd/S50proftpd @@ -0,0 +1,47 @@ +#!/bin/sh + +DAEMON=/usr/sbin/proftpd +trap "" HUP +trap "" TERM +test -f $DAEMON || exit 0 +[ ! -d /var/run/proftpd ] && mkdir /var/run/proftpd +[ ! -f /var/log/wtmp ] && touch /var/log/wtmp + +start() { + printf "Starting ProFTPD: " + $DAEMON + if [ $? != 0 ]; then + echo "FAILED" + exit 1 + else + echo "done" + fi +} + +stop() { + printf "Stopping ProFTPD: " + killall proftpd + echo "done" +} + +case "$1" in + start) + start + ;; + + stop) + stop + ;; + + restart) + stop + start + ;; + + *) + echo "Usage: /etc/init.d/S50proftpd {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 diff --git a/package/proftpd/proftpd.hash b/package/proftpd/proftpd.hash new file mode 100644 index 0000000000..0735340480 --- /dev/null +++ b/package/proftpd/proftpd.hash @@ -0,0 +1,4 @@ +# From ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.5b.tar.gz.md5 +md5 f7b8e3a383b34a894c2502db74ccccde proftpd-1.3.5b.tar.gz +# Locally calculated +sha256 afc1789f2478acf88dfdc7d70da90a4fa2786d628218e9574273295d044b4fc8 proftpd-1.3.5b.tar.gz diff --git a/package/proftpd/proftpd.mk b/package/proftpd/proftpd.mk new file mode 100644 index 0000000000..a70f41ef79 --- /dev/null +++ b/package/proftpd/proftpd.mk @@ -0,0 +1,70 @@ +################################################################################ +# +# proftpd +# +################################################################################ + +PROFTPD_VERSION = 1.3.5b +PROFTPD_SOURCE = proftpd-$(PROFTPD_VERSION).tar.gz +PROFTPD_SITE = ftp://ftp.proftpd.org/distrib/source +PROFTPD_LICENSE = GPLv2+ +PROFTPD_LICENSE_FILES = COPYING + +PROFTPD_CONF_ENV = \ + ac_cv_func_setpgrp_void=yes \ + ac_cv_func_setgrent_void=yes + +PROFTPD_CONF_OPTS = \ + --localstatedir=/var/run \ + --disable-static \ + --disable-curses \ + --disable-ncurses \ + --disable-facl \ + --disable-dso \ + --enable-shadow \ + --with-gnu-ld + +ifeq ($(BR2_PACKAGE_PROFTPD_MOD_REWRITE),y) +PROFTPD_CONF_OPTS += --with-modules=mod_rewrite +endif + +# configure script doesn't handle detection of %llu format string +# support for printing the file size when cross compiling, breaking +# access for large files. +# We unfortunately cannot AUTORECONF the package, so instead force it +# on if we know we support it +define PROFTPD_USE_LLU + $(SED) 's/HAVE_LU/HAVE_LLU/' $(@D)/configure +endef +PROFTPD_PRE_CONFIGURE_HOOKS += PROFTPD_USE_LLU + +define PROFTPD_MAKENAMES + $(MAKE1) CC="$(HOSTCC)" CFLAGS="" LDFLAGS="" -C $(@D)/lib/libcap _makenames +endef + +PROFTPD_POST_CONFIGURE_HOOKS = PROFTPD_MAKENAMES + +PROFTPD_MAKE = $(MAKE1) + +define PROFTPD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/proftpd $(TARGET_DIR)/usr/sbin/proftpd + $(INSTALL) -m 0644 -D $(@D)/sample-configurations/basic.conf $(TARGET_DIR)/etc/proftpd.conf +endef + +define PROFTPD_USERS + ftp -1 ftp -1 * /home/ftp - - Anonymous FTP User +endef + +define PROFTPD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/proftpd/S50proftpd $(TARGET_DIR)/etc/init.d/S50proftpd +endef + +define PROFTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/proftpd/proftpd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/proftpd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/proftpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/proftpd.service +endef + +$(eval $(autotools-package)) diff --git a/package/proftpd/proftpd.service b/package/proftpd/proftpd.service new file mode 100644 index 0000000000..1c730e5161 --- /dev/null +++ b/package/proftpd/proftpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=FTP server +After=syslog.target network.target + +[Service] +ExecStart=/usr/sbin/proftpd -n -q +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/protobuf-c/Config.in b/package/protobuf-c/Config.in new file mode 100644 index 0000000000..28555502f9 --- /dev/null +++ b/package/protobuf-c/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_PROTOBUF_C + bool "protobuf-c" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + # host-protobuf only builds on certain architectures + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + help + Code generator and runtime libraries to use Protocol Buffers + from pure C (not C++). + + http://code.google.com/p/protobuf-c/ + +comment "protobuf-c needs a toolchain w/ C++, threads" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" diff --git a/package/protobuf-c/protobuf-c.hash b/package/protobuf-c/protobuf-c.hash new file mode 100644 index 0000000000..7584058e95 --- /dev/null +++ b/package/protobuf-c/protobuf-c.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 49340784ca0f8657f38547088731fff3bfe8084adb89bf5e8dbc19ac43339aa6 protobuf-c-v1.1.1.tar.gz diff --git a/package/protobuf-c/protobuf-c.mk b/package/protobuf-c/protobuf-c.mk new file mode 100644 index 0000000000..ee4500ee0d --- /dev/null +++ b/package/protobuf-c/protobuf-c.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# protobuf-c +# +################################################################################ + +PROTOBUF_C_VERSION = v1.1.1 +PROTOBUF_C_SITE = $(call github,protobuf-c,protobuf-c,$(PROTOBUF_C_VERSION)) +PROTOBUF_C_DEPENDENCIES = host-protobuf-c +HOST_PROTOBUF_C_DEPENDENCIES = host-protobuf host-pkgconf +PROTOBUF_C_MAKE = $(MAKE1) +PROTOBUF_C_CONF_OPTS = --disable-protoc +PROTOBUF_C_INSTALL_STAGING = YES +PROTOBUF_C_LICENSE = BSD-2c +PROTOBUF_C_LICENSE_FILES = LICENSE +PROTOBUF_C_AUTORECONF = YES +HOST_PROTOBUF_C_AUTORECONF = YES + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/protobuf/0001-Fix-GOOGLE_PROTOBUF_ATOMICOPS_ERROR-syntax-error.patch b/package/protobuf/0001-Fix-GOOGLE_PROTOBUF_ATOMICOPS_ERROR-syntax-error.patch new file mode 100644 index 0000000000..c271ea45d7 --- /dev/null +++ b/package/protobuf/0001-Fix-GOOGLE_PROTOBUF_ATOMICOPS_ERROR-syntax-error.patch @@ -0,0 +1,61 @@ +From 50982f711de6ad58f6e0bef01a75d2b9cf35f5dc Mon Sep 17 00:00:00 2001 +From: George Redivo +Date: Mon, 6 Jul 2015 16:56:41 -0300 +Subject: [PATCH 1/2] Fix GOOGLE_PROTOBUF_ATOMICOPS_ERROR syntax error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It's not possible to define "#error" inside a define. +It causes 'error: stray ‘#’ in program' compilation error. + +Now the define GOOGLE_PROTOBUF_ATOMICOPS_ERROR is the error message +and it's used along the code together "#error". +--- + src/google/protobuf/stubs/atomicops.h | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/google/protobuf/stubs/atomicops.h b/src/google/protobuf/stubs/atomicops.h +index b1336e3..a130b38 100644 +--- a/src/google/protobuf/stubs/atomicops.h ++++ b/src/google/protobuf/stubs/atomicops.h +@@ -162,7 +162,7 @@ Atomic64 Release_Load(volatile const Atomic64* ptr); + + // Include our platform specific implementation. + #define GOOGLE_PROTOBUF_ATOMICOPS_ERROR \ +-#error "Atomic operations are not supported on your platform" ++"Atomic operations are not supported on your platform" + + // ThreadSanitizer, http://clang.llvm.org/docs/ThreadSanitizer.html. + #if defined(THREAD_SANITIZER) +@@ -172,7 +172,7 @@ Atomic64 Release_Load(volatile const Atomic64* ptr); + #if defined(GOOGLE_PROTOBUF_ARCH_IA32) || defined(GOOGLE_PROTOBUF_ARCH_X64) + #include + #else +-GOOGLE_PROTOBUF_ATOMICOPS_ERROR ++#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR + #endif + + // Solaris +@@ -203,15 +203,15 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR + #if __has_extension(c_atomic) + #include + #else +-GOOGLE_PROTOBUF_ATOMICOPS_ERROR ++#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR + #endif + #else +-GOOGLE_PROTOBUF_ATOMICOPS_ERROR ++#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR + #endif + + // Unknown. + #else +-GOOGLE_PROTOBUF_ATOMICOPS_ERROR ++#error GOOGLE_PROTOBUF_ATOMICOPS_ERROR + #endif + + // On some platforms we need additional declarations to make AtomicWord +-- +2.5.0 + diff --git a/package/protobuf/0002-configure.ac-check-if-libatomic-is-needed.patch b/package/protobuf/0002-configure.ac-check-if-libatomic-is-needed.patch new file mode 100644 index 0000000000..a70a23e74e --- /dev/null +++ b/package/protobuf/0002-configure.ac-check-if-libatomic-is-needed.patch @@ -0,0 +1,34 @@ +From f020fe05a20dfcd16cd7df833dcf3cdeef770538 Mon Sep 17 00:00:00 2001 +From: Carlos Santos +Date: Thu, 11 Feb 2016 10:58:35 -0200 +Subject: [PATCH 2/2] configure.ac: check if libatomic is needed + +Compilation of protobuf for PowerPC and SPARC may fail due to missing +references to __atomic_fetch_add_4 and __atomic_compare_exchange_4. + +The __atomic_*() intrinsics for all sizes are provided by libatomic when +gcc is >= 4.8. This can be achieved by adding this to configure.ac: + + AC_SEARCH_LIBS([__atomic_fetch_add_4], [atomic]) + +Signed-off-by: Carlos Santos +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index c07067c..88d4a0d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -139,6 +139,8 @@ AM_CONDITIONAL([USE_EXTERNAL_PROTOC], [test "$with_protoc" != "no"]) + ACX_PTHREAD + AC_CXX_STL_HASH + ++AC_SEARCH_LIBS([__atomic_load_4], [atomic]) ++ + case "$target_os" in + mingw* | cygwin* | win*) + ;; +-- +2.5.0 + diff --git a/package/protobuf/Config.in b/package/protobuf/Config.in new file mode 100644 index 0000000000..3215a075f1 --- /dev/null +++ b/package/protobuf/Config.in @@ -0,0 +1,46 @@ +# See src/google/protobuf/stubs/platform_macros.h for supported archs. +# +# On PowerPC, the __atomic_*() built-ins for 1-byte, 2-byte and 4-byte +# types are available built-in. However, the __atomic_*() built-ins for +# 8-byte types is implemented via libatomic, so only available since gcc +# 4.8. +# +# In Buildroot, to simplify things, we've decided to simply require gcc +# 4.8 as soon as the architectures has at least one __atomic_*() built-in +# variant that requires libatomic. +# +# Since protobuf most likely only uses the 1, 2 and 4-byte variants, it +# *could* technically build with gcc 4.7. This is probably not a big deal, +# and we can live with requiring gcc 4.8 on PowerPC to build protobuf. +# +# The SPARC64 build fails due to a missing definition of Atomic64. This +# has been fixed on the master branch but the build still breaks due to +# undefined references to internal NoBarrier_Atomic*() functions. +# +# host-protobuf only builds on certain architectures +config BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS + bool + default y if BR2_arm + default y if BR2_i386 + default y if BR2_mipsel + default y if BR2_x86_64 + default y if BR2_TOOLCHAIN_HAS_ATOMIC + depends on !BR2_sparc64 # missing definition of Atomic64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + +config BR2_PACKAGE_PROTOBUF + bool "protobuf" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS + depends on !BR2_STATIC_LIBS + help + Protocol buffers are Google's language-neutral, platform-neutral, + extensible mechanism for serializing structured data. + + https://developers.google.com/protocol-buffers + +comment "protobuf needs a toolchain w/ C++, threads, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS \ + || BR2_STATIC_LIBS + depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS diff --git a/package/protobuf/protobuf.hash b/package/protobuf/protobuf.hash new file mode 100644 index 0000000000..78285b72d2 --- /dev/null +++ b/package/protobuf/protobuf.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 2667b7cda4a6bc8a09e5463adf3b5984e08d94e72338277affa8594d8b6e5cd1 protobuf-v2.6.1.tar.gz diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk new file mode 100644 index 0000000000..3eeadfc454 --- /dev/null +++ b/package/protobuf/protobuf.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# protobuf +# +################################################################################ + +PROTOBUF_VERSION = v2.6.1 +PROTOBUF_SITE = $(call github,google,protobuf,$(PROTOBUF_VERSION)) +PROTOBUF_LICENSE = BSD-3c +PROTOBUF_LICENSE_FILES = LICENSE +# no configure script +PROTOBUF_AUTORECONF = YES + +# N.B. Need to use host protoc during cross compilation. +PROTOBUF_DEPENDENCIES = host-protobuf +PROTOBUF_CONF_OPTS = --with-protoc=$(HOST_DIR)/usr/bin/protoc + +PROTOBUF_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_ZLIB),y) +PROTOBUF_DEPENDENCIES += zlib +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/proxychains-ng/Config.in b/package/proxychains-ng/Config.in new file mode 100644 index 0000000000..1f89b1317f --- /dev/null +++ b/package/proxychains-ng/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PROXYCHAINS_NG + bool "proxychains-ng" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + Force any tcp connections to flow through a proxy (or proxy chain) + + https://github.com/rofl0r/proxychains + +comment "proxychains-ng needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/proxychains-ng/proxychains-ng.hash b/package/proxychains-ng/proxychains-ng.hash new file mode 100644 index 0000000000..e2e8c01af0 --- /dev/null +++ b/package/proxychains-ng/proxychains-ng.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 859a717e18ed88c9291078a6ed8748dfe95c61220993203890fef8a04d28dda5 proxychains-4.6.tar.bz2 diff --git a/package/proxychains-ng/proxychains-ng.mk b/package/proxychains-ng/proxychains-ng.mk new file mode 100644 index 0000000000..ca2664ef8c --- /dev/null +++ b/package/proxychains-ng/proxychains-ng.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# proxychains-ng +# +################################################################################ + +PROXYCHAINS_NG_VERSION = 4.6 +PROXYCHAINS_NG_SOURCE = proxychains-$(PROXYCHAINS_NG_VERSION).tar.bz2 +PROXYCHAINS_NG_SITE = http://downloads.sourceforge.net/project/proxychains-ng +PROXYCHAINS_NG_LICENSE = GPLv2+ +PROXYCHAINS_NG_LICENSE_FILES = COPYING + +define PROXYCHAINS_NG_CONFIGURE_CMDS + cd $(@D) && \ + $(TARGET_CONFIGURE_OPTS) ./configure --prefix=/usr --sysconfdir=/etc +endef + +define PROXYCHAINS_NG_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define PROXYCHAINS_NG_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install install-config +endef + +$(eval $(generic-package)) diff --git a/package/psmisc/0001-link-against-libintl.patch b/package/psmisc/0001-link-against-libintl.patch new file mode 100644 index 0000000000..907e7e75bd --- /dev/null +++ b/package/psmisc/0001-link-against-libintl.patch @@ -0,0 +1,33 @@ +Link against libintl if needed + +When built against a C library that has locale support, but for which +intl support is provided by an external libintl library, psmisc +forgets to link against this library, even though the configure script +properly checks that. + +This patch therefore ensure that we link against libintl when needed, +thanks to the @INTLLIBS@ variable provided by the configure script. + +We do not modify the Makefile.am file, because autoreconfiguring this +package doesn't work: because of its usage of gettext, it wants to run +the "autopoint" program, which itself depends on CVS being installed, +for some strange reasons. That's the reason why we fall back to the +hacky solution of modifying the Makefile.in file. + +Forward-ported Thomas's patch to psmisc 22.16 +from commit f066ed70cd6939838d4057f66798cbc1d972cc73 + +Signed-off-by: Gustavo Zacarias + +diff -Nura psmisc-22.16.orig/src/Makefile.in psmisc-22.16/src/Makefile.in +--- psmisc-22.16.orig/src/Makefile.in 2012-03-28 22:27:33.106660358 -0300 ++++ psmisc-22.16/src/Makefile.in 2012-03-28 22:28:55.752219349 -0300 +@@ -76,7 +76,7 @@ + killall_DEPENDENCIES = + am_peekfd_OBJECTS = peekfd.$(OBJEXT) + peekfd_OBJECTS = $(am_peekfd_OBJECTS) +-peekfd_LDADD = $(LDADD) ++peekfd_LDADD = $(LDADD) @LIBINTL@ + am_prtstat_OBJECTS = prtstat.$(OBJEXT) + prtstat_OBJECTS = $(am_prtstat_OBJECTS) + prtstat_DEPENDENCIES = diff --git a/package/psmisc/0002-no-__progname.patch b/package/psmisc/0002-no-__progname.patch new file mode 100644 index 0000000000..51096571cb --- /dev/null +++ b/package/psmisc/0002-no-__progname.patch @@ -0,0 +1,47 @@ +[PATCH]: pstree: don't use glibc-specific __progname + +uclibc (per default) doesn't implement __progname, and the pstree.x11 +stuff isn't that critical, so just disable it. + +Signed-off-by: Peter Korsgaard +Signed-off-by: Gustavo Zacarias +Signed-off-by: Thomas Petazzoni + +Index: psmisc-22.13/src/pstree.c +=================================================================== +--- psmisc-22.13.orig/src/pstree.c 2010-07-12 13:10:03.000000000 +0200 ++++ psmisc-22.13/src/pstree.c 2011-05-21 16:33:37.456530775 +0200 +@@ -49,8 +49,6 @@ + #include + #endif /*WITH_SELINUX */ + +-extern const char *__progname; +- + #define PROC_BASE "/proc" + + /* UTF-8 defines by Johan Myreen, updated by Ben Winslow */ +@@ -854,9 +852,6 @@ + textdomain(PACKAGE); + #endif + +- if (!strcmp(__progname, "pstree.x11")) +- wait_end = 1; +- + /* + * Attempt to figure out a good default symbol set. Will be overriden by + * command-line options, if given. +Index: psmisc-22.13/src/Makefile.in +=================================================================== +--- psmisc-22.13.orig/src/Makefile.in 2011-05-21 16:33:42.748530777 +0200 ++++ psmisc-22.13/src/Makefile.in 2011-05-21 16:33:47.360530782 +0200 +@@ -557,10 +557,6 @@ + grep '^{ 1,"HUP" },$$' signames.h >/dev/null || \ + { rm -f signames.h; exit 1; } + +-install-exec-hook: +- cd $(DESTDIR)$(bindir) && \ +- ( [ -h pstree.x11 ] || $(LN_S) pstree pstree.x11) +- + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/package/psmisc/Config.in b/package/psmisc/Config.in new file mode 100644 index 0000000000..cc8420b7bb --- /dev/null +++ b/package/psmisc/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PSMISC + bool "psmisc" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + Helpful /proc related utilities such as pstree, fuser, and killall + + http://psmisc.sourceforge.net/ diff --git a/package/psmisc/psmisc.hash b/package/psmisc/psmisc.hash new file mode 100644 index 0000000000..5e489ed34c --- /dev/null +++ b/package/psmisc/psmisc.hash @@ -0,0 +1,3 @@ +# Locally computed: +sha256 97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a psmisc-22.21.tar.gz +sha256 4f1cb11c7182ad96e682ec50a2d9a6a22079a2b11dffde3bb3cb67823b679422 e7203c36a2a4dc10cd8268a5dc036fc9c2a73b6c.diff diff --git a/package/psmisc/psmisc.mk b/package/psmisc/psmisc.mk new file mode 100644 index 0000000000..2f83b7d8c9 --- /dev/null +++ b/package/psmisc/psmisc.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# psmisc +# +################################################################################ + +PSMISC_VERSION = 22.21 +PSMISC_SITE = http://downloads.sourceforge.net/project/psmisc/psmisc +PSMISC_PATCH = \ + https://gitlab.com/psmisc/psmisc/commit/e7203c36a2a4dc10cd8268a5dc036fc9c2a73b6c.diff +PSMISC_LICENSE = GPLv2 +PSMISC_LICENSE_FILES = COPYING +PSMISC_DEPENDENCIES = ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) + +ifeq ($(BR2_TOOLCHAIN_HAS_SSP),) +# Don't force -fstack-protector when SSP is not available in toolchain +PSMISC_CONF_OPTS = --disable-harden-flags +endif + +# build after busybox, we prefer fat versions while we're at it +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +PSMISC_DEPENDENCIES += busybox +endif + +$(eval $(autotools-package)) diff --git a/package/psplash/Config.in b/package/psplash/Config.in new file mode 100644 index 0000000000..d68aaa210f --- /dev/null +++ b/package/psplash/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_PSPLASH + bool "psplash" + depends on BR2_USE_WCHAR + help + PSplash is a userspace graphical boot splash screen for mainly + embedded Linux devices supporting a 16bpp or 32bpp framebuffer. + It has few dependencies (just libc), supports basic images and + text and handles rotation. Its visual look is configurable by + basic source changes. + + Also included is a 'client' command utility for sending + information to psplash such as boot progress information. + + Start the drawing process with 'psplash -n&' as early as possible. + Note: psplash creates a FIFO in /tmp for communication with + psplash-write. + + Usage: + * Set progress bar to 50 percent: + psplash-write "PROGRESS 50" + + * Display message "foobar" above progress bar: + psplash-write "MSG foobar" + + * Terminate psplash: + psplash-write "QUIT" + + http://git.yoctoproject.org/cgit/cgit.cgi/psplash/ + +comment "psplash needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/psplash/psplash-quit.service b/package/psplash/psplash-quit.service new file mode 100644 index 0000000000..14bd4994b5 --- /dev/null +++ b/package/psplash/psplash-quit.service @@ -0,0 +1,11 @@ +[Unit] +Description=Terminate Psplash Boot Screen +After=psplash-start.service + +[Service] +Type=oneshot +ExecStart=/usr/bin/psplash-write QUIT +TimeoutSec=20 + +[Install] +WantedBy=multi-user.target diff --git a/package/psplash/psplash-start.service b/package/psplash/psplash-start.service new file mode 100644 index 0000000000..2de3cfce22 --- /dev/null +++ b/package/psplash/psplash-start.service @@ -0,0 +1,11 @@ +[Unit] +Description=Starts Psplash Boot screen +Wants=systemd-vconsole-setup.service +After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service +DefaultDependencies=no + +[Service] +ExecStart=/usr/bin/psplash -n + +[Install] +WantedBy=sysinit.target diff --git a/package/psplash/psplash.mk b/package/psplash/psplash.mk new file mode 100644 index 0000000000..4e365c53e4 --- /dev/null +++ b/package/psplash/psplash.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# psplash +# +################################################################################ + +PSPLASH_VERSION = 14c8f7b705de944beb4de3f296506d80871e410f +PSPLASH_SITE = git://git.yoctoproject.org/psplash +PSPLASH_LICENSE = GPLv2+ +PSPLASH_AUTORECONF = YES + +define PSPLASH_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/psplash/psplash-start.service \ + $(TARGET_DIR)/usr/lib/systemd/system/psplash-start.service + $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants + ln -sf ../../../../usr/lib/systemd/system/psplash-start.service \ + $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/ + + $(INSTALL) -D -m 644 package/psplash/psplash-quit.service \ + $(TARGET_DIR)/usr/lib/systemd/system/psplash-quit.service + $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/psplash-quit.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ +endef + +$(eval $(autotools-package)) diff --git a/package/ptpd/Config.in b/package/ptpd/Config.in new file mode 100644 index 0000000000..2d87ca31bb --- /dev/null +++ b/package/ptpd/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PTPD + bool "ptpd" + help + The PTP daemon (PTPd) implements the Precision Time protocol + (PTP) as defined by the IEEE-1588-2002. + + http://ptpd.sourceforge.net/ diff --git a/package/ptpd/S65ptpd b/package/ptpd/S65ptpd new file mode 100755 index 0000000000..89914e96bc --- /dev/null +++ b/package/ptpd/S65ptpd @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Start ptpd +# + +case "$1" in + start) + printf "Starting ptpd: " + start-stop-daemon -S -q -x /usr/sbin/ptpd -- -S + if [ $? != 0 ]; then + echo "FAILED" + exit 1 + else + echo "OK" + fi + ;; + stop) + printf "Stopping ptpd: " + start-stop-daemon -K -q -x /usr/sbin/ptpd + echo "OK" + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/ptpd/ptpd.hash b/package/ptpd/ptpd.hash new file mode 100644 index 0000000000..ccd1d84c31 --- /dev/null +++ b/package/ptpd/ptpd.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 a7c6ea83bd53da75ae04a7b7a25fe7c597b4e9ff1f93d46f4502e3fa8a2cb950 ptpd-1.1.0.tar.gz diff --git a/package/ptpd/ptpd.mk b/package/ptpd/ptpd.mk new file mode 100644 index 0000000000..dad8ccfe10 --- /dev/null +++ b/package/ptpd/ptpd.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# ptpd +# +################################################################################ + +PTPD_VERSION = 1.1.0 +PTPD_SITE = http://downloads.sourceforge.net/project/ptpd/ptpd/$(PTPD_VERSION) +PTPD_LICENSE = BSD +PTPD_LICENSE_FILES = COPYRIGHT + +define PTPD_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/src +endef + +define PTPD_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/src/ptpd $(TARGET_DIR)/usr/sbin/ptpd +endef + +define PTPD_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/ptpd/S65ptpd \ + $(TARGET_DIR)/etc/init.d/S65ptpd +endef + +define PTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/ptpd/ptpd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/ptpd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/ptpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ptpd.service +endef + +$(eval $(generic-package)) diff --git a/package/ptpd/ptpd.service b/package/ptpd/ptpd.service new file mode 100644 index 0000000000..c9da3f422c --- /dev/null +++ b/package/ptpd/ptpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Precision Time Protocol daemon +After=syslog.target network.target + +[Service] +ExecStart=/usr/sbin/ptpd -c +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/ptpd2/0001-musl.patch b/package/ptpd2/0001-musl.patch new file mode 100644 index 0000000000..2e214b2188 --- /dev/null +++ b/package/ptpd2/0001-musl.patch @@ -0,0 +1,15 @@ +Fix musl build + +Signed-off-by: Bernd Kuhls + +diff -uNr ptpd-ptpd-2.3.1.org/src/dep/net.c ptpd-ptpd-2.3.1/src/dep/net.c +--- ptpd-ptpd-2.3.1.org/src/dep/net.c 2015-06-29 17:13:29.000000000 +0200 ++++ ptpd-ptpd-2.3.1/src/dep/net.c 2016-01-24 00:35:44.509860065 +0100 +@@ -82,7 +82,6 @@ + #ifdef SO_TIMESTAMPING + #include + #include +-#include + #endif /* SO_TIMESTAMPING */ + + /** diff --git a/package/ptpd2/Config.in b/package/ptpd2/Config.in new file mode 100644 index 0000000000..e88a9bb1ac --- /dev/null +++ b/package/ptpd2/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PTPD2 + bool "ptpd2" + select BR2_PACKAGE_LIBPCAP + help + The PTP daemon (PTPd) implements the Precision Time protocol + (PTP) as defined by the IEEE-1588-2008. + + https://github.com/ptpd/ptpd + diff --git a/package/ptpd2/S65ptpd2 b/package/ptpd2/S65ptpd2 new file mode 100755 index 0000000000..f815cb5a7b --- /dev/null +++ b/package/ptpd2/S65ptpd2 @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Start ptpd2 +# + +case "$1" in + start) + printf "Starting ptpd2: " + start-stop-daemon -S -q -x /usr/sbin/ptpd2 -- -g + if [ $? != 0 ]; then + echo "FAILED" + exit 1 + else + echo "OK" + fi + ;; + stop) + printf "Stopping ptpd2: " + start-stop-daemon -K -q -x /usr/sbin/ptpd2 + echo "OK" + ;; + restart|reload) + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/ptpd2/ptpd2.hash b/package/ptpd2/ptpd2.hash new file mode 100644 index 0000000000..af1f78a5a8 --- /dev/null +++ b/package/ptpd2/ptpd2.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 267ad61d09d97069acec5d4878dceda20d0ddbebd27557d80230847848cee6c2 ptpd2-ptpd-2.3.1.tar.gz diff --git a/package/ptpd2/ptpd2.mk b/package/ptpd2/ptpd2.mk new file mode 100644 index 0000000000..da6a10684b --- /dev/null +++ b/package/ptpd2/ptpd2.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# ptpd2 +# +################################################################################ + +PTPD2_VERSION = ptpd-2.3.1 +PTPD2_SITE = $(call github,ptpd,ptpd,$(PTPD2_VERSION)) +PTPD2_DEPENDENCIES = libpcap +PTPD2_CONF_OPTS = --with-pcap-config=$(STAGING_DIR)/usr/bin/pcap-config +# configure not shipped +PTPD2_AUTORECONF = YES +PTPD2_LICENSE = BSD-2c +PTPD2_LICENSE_FILES = COPYRIGHT + +ifeq ($(BR2_STATIC_LIBS),y) +PTPD2_CONF_OPTS += LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`" +endif + +ifeq ($(BR2_PACKAGE_NETSNMP),y) +PTPD2_CONF_ENV += ac_cv_path_PATH_NET_SNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config +PTPD2_DEPENDENCIES += netsnmp +else +PTPD2_CONF_OPTS += --disable-snmp +endif + +define PTPD2_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/ptpd2/S65ptpd2 \ + $(TARGET_DIR)/etc/init.d/S65ptpd2 +endef + +define PTPD2_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/ptpd2/ptpd2.service \ + $(TARGET_DIR)/usr/lib/systemd/system/ptpd2.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/ptpd2.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ptpd2.service +endef + +$(eval $(autotools-package)) diff --git a/package/ptpd2/ptpd2.service b/package/ptpd2/ptpd2.service new file mode 100644 index 0000000000..66e71ce0a4 --- /dev/null +++ b/package/ptpd2/ptpd2.service @@ -0,0 +1,10 @@ +[Unit] +Description=Precision Time Protocol daemon +After=syslog.target network.target + +[Service] +ExecStart=/usr/sbin/ptpd2 -C -g +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch b/package/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch new file mode 100644 index 0000000000..19842fadf0 --- /dev/null +++ b/package/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch @@ -0,0 +1,75 @@ +From f6ab3c3aa7a1841c8add04828029356d2a8c88e7 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 6 Apr 2015 21:56:31 -0700 +Subject: [PATCH] padsp: Make it compile on musl + +break assumptions on glibc and there is no stat64 on non +glibc C libraries + +See pulseaudio bug + +https://bugs.freedesktop.org/show_bug.cgi?id=85319 + +Upstream-Status: Pending +Signed-off-by: Khem Raj +[Bernd: taken from +http://git.alpinelinux.org/cgit/aports/tree/testing/pulseaudio/0001-padsp-Make-it-compile-on-musl.patch, +adjusted paths.] +Signed-off-by: Bernd Kuhls + +--- + src/utils/padsp.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +diff --git a/src/utils/padsp.c b/src/utils/padsp.c +index e61373c..684721a 100644 +--- a/src/utils/padsp.c ++++ b/src/utils/padsp.c +@@ -2368,7 +2368,7 @@ fail: + return ret; + } + +-#ifdef sun ++#ifndef __GLIBC__ + int ioctl(int fd, int request, ...) { + #else + int ioctl(int fd, unsigned long request, ...) { +@@ -2508,10 +2508,13 @@ int stat(const char *pathname, struct stat *buf) { + + return 0; + } +- + #ifdef HAVE_OPEN64 +- ++#undef stat64 ++#ifdef __GLIBC__ + int stat64(const char *pathname, struct stat64 *buf) { ++#else ++int stat64(const char *pathname, struct stat *buf) { ++#endif + struct stat oldbuf; + int ret; + +@@ -2544,7 +2547,7 @@ int stat64(const char *pathname, struct stat64 *buf) { + + return 0; + } +- ++#undef open64 + int open64(const char *filename, int flags, ...) { + va_list args; + mode_t mode = 0; +@@ -2670,8 +2673,8 @@ FILE* fopen(const char *filename, const char *mode) { + } + + #ifdef HAVE_OPEN64 +- +-FILE *fopen64(const char *filename, const char *mode) { ++#undef fopen64 ++FILE *fopen64(const char *__restrict filename, const char *__restrict mode) { + + debug(DEBUG_LEVEL_VERBOSE, __FILE__": fopen64(%s)\n", filename?filename:"NULL"); + +-- +2.1.4 + diff --git a/package/pulseaudio/Config.in b/package/pulseaudio/Config.in new file mode 100644 index 0000000000..20aa374fce --- /dev/null +++ b/package/pulseaudio/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_PULSEAUDIO + bool "pulseaudio" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c + select BR2_PACKAGE_LIBTOOL + select BR2_PACKAGE_JSON_C + select BR2_PACKAGE_LIBSNDFILE + select BR2_PACKAGE_SPEEX + depends on BR2_USE_MMU # fork() + help + PulseAudio is a sound system for POSIX OSes, meaning that it + is a proxy for your sound applications. It allows you to do + advanced operations on your sound data as it passes between + your application and your hardware. Things like transferring + the audio to a different machine, changing the sample format + or channel count and mixing several sounds into one are + easily achieved using a sound server. + + http://pulseaudio.org + +if BR2_PACKAGE_PULSEAUDIO + +config BR2_PACKAGE_PULSEAUDIO_DAEMON + bool "start as a system daemon" + help + PulseAudio can be started as a system daemon. This is not the + recommended way of using PulseAudio unless you are building a + headless system. + +endif + +comment "pulseaudio needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/pulseaudio/S50pulseaudio b/package/pulseaudio/S50pulseaudio new file mode 100755 index 0000000000..c1d88626f4 --- /dev/null +++ b/package/pulseaudio/S50pulseaudio @@ -0,0 +1,39 @@ +#!/bin/sh +# +# Starts pulseaudio. +# + + +start() { + printf "Starting pulseaudio: " + umask 077 + /usr/bin/pulseaudio --system --daemonize + echo "OK" +} +stop() { + printf "Stopping pulseaudio: " + pulseaudio --kill + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/pulseaudio/pulseaudio.hash b/package/pulseaudio/pulseaudio.hash new file mode 100644 index 0000000000..0d1a3d2bda --- /dev/null +++ b/package/pulseaudio/pulseaudio.hash @@ -0,0 +1,3 @@ +# From http://freedesktop.org/software/pulseaudio/releases/pulseaudio-8.0.tar.xz.{md5,sha1} +md5 8678442ba0bb4b4c33ac6f62542962df pulseaudio-8.0.tar.xz +sha1 1399a2f6288ad743184b6c2192129fef033343ac pulseaudio-8.0.tar.xz diff --git a/package/pulseaudio/pulseaudio.mk b/package/pulseaudio/pulseaudio.mk new file mode 100644 index 0000000000..06b0b843c5 --- /dev/null +++ b/package/pulseaudio/pulseaudio.mk @@ -0,0 +1,166 @@ +################################################################################ +# +# pulseaudio +# +################################################################################ + +PULSEAUDIO_VERSION = 8.0 +PULSEAUDIO_SOURCE = pulseaudio-$(PULSEAUDIO_VERSION).tar.xz +PULSEAUDIO_SITE = http://freedesktop.org/software/pulseaudio/releases +PULSEAUDIO_INSTALL_STAGING = YES +PULSEAUDIO_LICENSE = LGPLv2.1+ (specific license for modules, see LICENSE file) +PULSEAUDIO_LICENSE_FILES = LICENSE GPL LGPL +PULSEAUDIO_CONF_OPTS = \ + --disable-default-build-tests \ + --disable-legacy-database-entry-format \ + --disable-manpages + +# Make sure we don't detect libatomic_ops. Indeed, since pulseaudio +# requires json-c, which needs 4 bytes __sync builtins, there should +# be no need for pulseaudio to rely on libatomic_ops. +PULSE_AUDIO_CONF_ENV += \ + ac_cv_header_atomic_ops_h=no + +PULSEAUDIO_DEPENDENCIES = \ + host-pkgconf libtool json-c libsndfile speex host-intltool \ + $(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) \ + $(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib) \ + $(if $(BR2_PACKAGE_LIBGLIB2),libglib2) \ + $(if $(BR2_PACKAGE_AVAHI_DAEMON),avahi) \ + $(if $(BR2_PACKAGE_DBUS),dbus) \ + $(if $(BR2_PACKAGE_BLUEZ_UTILS),bluez_utils) \ + $(if $(BR2_PACKAGE_OPENSSL),openssl) \ + $(if $(BR2_PACKAGE_FFTW),fftw) \ + $(if $(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),webrtc-audio-processing) \ + $(if $(BR2_PACKAGE_SYSTEMD),systemd) + +ifeq ($(BR2_PACKAGE_GDBM),y) +PULSEAUDIO_CONF_OPTS += --with-database=gdbm +PULSEAUDIO_DEPENDENCIES += gdbm +else +PULSEAUDIO_CONF_OPTS += --with-database=simple +endif + +ifeq ($(BR2_PACKAGE_JACK2),y) +PULSEAUDIO_CONF_OPTS += --enable-jack +PULSEAUDIO_DEPENDENCIES += jack2 +else +PULSEAUDIO_CONF_OPTS += --disable-jack +endif + +ifeq ($(BR2_PACKAGE_ORC),y) +PULSEAUDIO_DEPENDENCIES += orc +PULSEAUDIO_CONF_ENV += ORCC=$(HOST_DIR)/usr/bin/orcc +PULSEAUDIO_CONF_OPTS += --enable-orc +else +PULSEAUDIO_CONF_OPTS += --disable-orc +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +PULSEAUDIO_DEPENDENCIES += libcap +PULSEAUDIO_CONF_OPTS += --with-caps +else +PULSEAUDIO_CONF_OPTS += --without-caps +endif + +# gtk3 support needs X11 backend +ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) +PULSEAUDIO_DEPENDENCIES += libgtk3 +PULSEAUDIO_CONF_OPTS += --enable-gtk3 +else +PULSEAUDIO_CONF_OPTS += --disable-gtk3 +endif + +ifeq ($(BR2_PACKAGE_LIBSOXR),y) +PULSEAUDIO_CONF_OPTS += --with-soxr +PULSEAUDIO_DEPENDENCIES += libsoxr +else +PULSEAUDIO_CONF_OPTS += --without-soxr +endif + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +PULSEAUDIO_CONF_OPTS += --enable-libudev +PULSEAUDIO_DEPENDENCIES += udev +else +PULSEAUDIO_CONF_OPTS += --disable-libudev +endif + +ifneq ($(BR2_INSTALL_LIBSTDCPP),y) +# The optional webrtc echo canceller is written in C++, causing auto* to want +# to link module-echo-cancel.so with CXX even if webrtc ISN'T used. +# If we don't have C++ support enabled in BR, CXX will point to /bin/false, +# which makes configure think we aren't able to create C++ .so files +# (arguable true), breaking the build when it tries to install the .so +# workaround it by patching up the libtool invocations to use C mode instead +define PULSEAUDIO_FORCE_CC + $(SED) 's/--tag=CXX/--tag=CC/g' -e 's/(CXXLD)/(CCLD)/g' \ + $(@D)/src/Makefile.in +endef + +PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FORCE_CC +endif + +# neon intrinsics not available with float-abi=soft +ifeq ($(BR2_ARM_SOFT_FLOAT),) +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +PULSEAUDIO_USE_NEON = y +endif +endif + +ifeq ($(PULSEAUDIO_USE_NEON),y) +PULSEAUDIO_CONF_OPTS += --enable-neon-opt=yes +else +PULSEAUDIO_CONF_OPTS += --enable-neon-opt=no +endif + +# pulseaudio alsa backend needs pcm/mixer apis +ifneq ($(BR2_PACKAGE_ALSA_LIB_PCM)$(BR2_PACKAGE_ALSA_LIB_MIXER),yy) +PULSEAUDIO_CONF_OPTS += --disable-alsa +endif + +ifeq ($(BR2_PACKAGE_LIBXCB)$(BR2_PACKAGE_XLIB_LIBSM)$(BR2_PACKAGE_XLIB_LIBXTST),yyy) +PULSEAUDIO_DEPENDENCIES += libxcb xlib_libSM xlib_libXtst + +# .desktop file generation needs nls support, so fake it for !locale builds +# https://bugs.freedesktop.org/show_bug.cgi?id=54658 +ifneq ($(BR2_ENABLE_LOCALE),y) +define PULSEAUDIO_FIXUP_DESKTOP_FILES + cp $(@D)/src/daemon/pulseaudio.desktop.in \ + $(@D)/src/daemon/pulseaudio.desktop + cp $(@D)/src/daemon/pulseaudio-kde.desktop.in \ + $(@D)/src/daemon/pulseaudio-kde.desktop +endef +PULSEAUDIO_POST_PATCH_HOOKS += PULSEAUDIO_FIXUP_DESKTOP_FILES +endif + +else +PULSEAUDIO_CONF_OPTS += --disable-x11 +endif + +define PULSEAUDIO_REMOVE_VALA + rm -rf $(TARGET_DIR)/usr/share/vala +endef + +PULSEAUDIO_POST_INSTALL_TARGET_HOOKS += PULSEAUDIO_REMOVE_VALA + +ifeq ($(BR2_PACKAGE_PULSEAUDIO_DAEMON),y) +define PULSEAUDIO_USERS + pulse -1 pulse -1 * /var/run/pulse - audio,pulse-access +endef + +define PULSEAUDIO_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/pulseaudio/S50pulseaudio \ + $(TARGET_DIR)/etc/init.d/S50pulseaudio +endef + +define PULSEAUDIO_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/pulseaudio/pulseaudio.service \ + $(TARGET_DIR)/usr/lib/systemd/system/pulseaudio.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/pulseaudio.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/pulseaudio.service +endef + +endif + +$(eval $(autotools-package)) diff --git a/package/pulseaudio/pulseaudio.service b/package/pulseaudio/pulseaudio.service new file mode 100644 index 0000000000..fc82f03392 --- /dev/null +++ b/package/pulseaudio/pulseaudio.service @@ -0,0 +1,11 @@ +[Unit] +Description=PulseAudio Sound System +After=syslog.target + +[Service] +UMask=077 +ExecStart=/usr/bin/pulseaudio --system --daemonize=no +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/pulseview/0001-musl.patch b/package/pulseview/0001-musl.patch new file mode 100644 index 0000000000..1acee73719 --- /dev/null +++ b/package/pulseview/0001-musl.patch @@ -0,0 +1,54 @@ +From dcfe0a01f72021aab961245d0ebcc9f8d4504b40 Mon Sep 17 00:00:00 2001 +From: Soeren Apel +Date: Sun, 31 Jan 2016 14:12:44 +0100 +Subject: [PATCH] View: Honor ENABLE_DECODE compiler switch + +Signed-off-by: Soeren Apel +Signed-off-by: Bernd Kuhls +--- +Patch downloaded from upstream git: +http://sigrok.org/gitweb/?p=pulseview.git;a=commitdiff;h=dcfe0a01f72021aab961245d0ebcc9f8d4504b40 +as suggested by upstream: +http://article.gmane.org/gmane.comp.debugging.sigrok.devel/1954 + + pv/view/view.cpp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/pv/view/view.cpp b/pv/view/view.cpp +index c9b08bf..6ad7dea 100644 +--- a/pv/view/view.cpp ++++ b/pv/view/view.cpp +@@ -43,7 +43,6 @@ + #include + + #include "analogsignal.hpp" +-#include "decodetrace.hpp" + #include "header.hpp" + #include "logicsignal.hpp" + #include "ruler.hpp" +@@ -59,6 +58,10 @@ + #include "pv/data/logicsegment.hpp" + #include "pv/util.hpp" + ++#ifdef ENABLE_DECODE ++#include "decodetrace.hpp" ++#endif ++ + using boost::shared_lock; + using boost::shared_mutex; + +@@ -455,9 +458,11 @@ void View::enable_coloured_bg(bool state) + if (l) + l->set_coloured_bg(state); + ++#ifdef ENABLE_DECODE + shared_ptr d = dynamic_pointer_cast(i); + if (d) + d->set_coloured_bg(state); ++#endif + } + + viewport_->update(); +-- +2.6.2 + diff --git a/package/pulseview/0002-cmake-add-check-for-explicit-linking-against-libatom.patch b/package/pulseview/0002-cmake-add-check-for-explicit-linking-against-libatom.patch new file mode 100644 index 0000000000..70549e6d72 --- /dev/null +++ b/package/pulseview/0002-cmake-add-check-for-explicit-linking-against-libatom.patch @@ -0,0 +1,117 @@ +From 71830c804be76cf6abe913ac2fe584947b7a91ea Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Tue, 24 May 2016 23:08:40 +0200 +Subject: [PATCH] cmake: add check for explicit linking against libatomic + +To use atomics functions, some toolchains requires to explicitly add +-latomic to the linker flags (because they are not provided by libc, +but libatomic). + +This change adds a helper function trying to build/link a test program +using atomics, then calls it to: +* first check if atomics are directly available in the libc; +* if not and libatomic has been found, then run the same test with + "-latomic" added to the linker flags. +The pulseview link library list is updated according to the results of +these tests. + +This issue was triggered by the Buildroot farms: + http://autobuild.buildroot.org/results/1e3/1e3101261252d5f30fdf842cc99604e4f4c25eef/build-end.log + +Notes: +1- CMAKE_REQUIRED_* variables are only used in check functions. They + are not automatically forwarded to/handled by the target commands + (such as target_link_library), because the check functions are + implemented as macro in CMake code, whereas many target commands + are native. +2- Because of note #1, CMAKE_REQUIRED_LIBRARIES (or its value) must be + explicitly passed to the target_link_library command when this is + needed. +3- In this implementation, LIBATOMIC_LIBRARY is only set when it is + needed; so, unconditionally appending it to PULSEVIEW_LINK_LIBS + will produce the expected behavior. + +Signed-off-by: Samuel Martin + +--- +changes v1->v2: +- use std::atomic_fetch_add_explicit function instead of + __atomic_fetch_add_4; +- rework code using cmake_*_check_state and find_library helpers; +- quiet-ize checks and clean outputs +- extend the commit log +--- + CMakeLists.txt | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 50 insertions(+) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9dac69f..44f810e 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -107,6 +107,55 @@ endif() + # This will set ${CMAKE_THREAD_LIBS_INIT} to the correct, OS-specific value. + find_package(Threads REQUIRED) + ++ ++# Check for explicit link against libatomic ++# ++# Depending on the toolchain, linking a program using atomic functions may need ++# "-latomic" explicitly passed to the linker ++# ++# This check first tests if atomics are available in the C-library, if not and ++# libatomic exists, then it runs the same test with -latomic added to the ++# linker flags. ++ ++# Helper for checking for atomics ++function(check_working_cxx_atomics varname additional_lib) ++ include(CheckCXXSourceCompiles) ++ include(CMakePushCheckState) ++ cmake_push_check_state() ++ set(CMAKE_REQUIRED_FLAGS "-std=c++11") ++ set(CMAKE_REQUIRED_LIBRARIES "${additional_lib}") ++ set(CMAKE_REQUIRED_QUIET 1) ++ CHECK_CXX_SOURCE_COMPILES(" ++#include ++std::atomic x; ++int main() { ++ return std::atomic_fetch_add_explicit(&x, 1, std::memory_order_seq_cst); ++} ++" ${varname}) ++ cmake_pop_check_state() ++endfunction(check_working_cxx_atomics) ++ ++# First check if atomics work without the library. ++# If not, check if the library exists, and atomics work with it. ++check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITHOUT_LIB "") ++if(HAVE_CXX_ATOMICS_WITHOUT_LIB) ++ message(STATUS "Atomics provided by the C-library - yes") ++else() ++ message(STATUS "Atomics provided by the C-library - no") ++ find_library(LIBATOMIC_LIBRARY NAMES atomic PATH_SUFFIXES lib) ++ if(LIBATOMIC_LIBRARY) ++ check_working_cxx_atomics(HAVE_CXX_ATOMICS_WITH_LIB "${LIBATOMIC_LIBRARY}") ++ if (HAVE_CXX_ATOMICS_WITH_LIB) ++ message(STATUS "Atomics provided by libatomic - yes") ++ else() ++ message(STATUS "Atomics provided by libatomic - no") ++ message(FATAL_ERROR "Compiler must support std::atomic!") ++ endif() ++ else() ++ message(FATAL_ERROR "Compiler appears to require libatomic, but cannot find it.") ++ endif() ++endif() ++ + #=============================================================================== + #= System Introspection + #------------------------------------------------------------------------------- +@@ -387,6 +436,7 @@ set(PULSEVIEW_LINK_LIBS + ${Boost_LIBRARIES} + ${QT_LIBRARIES} + ${CMAKE_THREAD_LIBS_INIT} ++ ${LIBATOMIC_LIBRARY} + ) + + if(STATIC_PKGDEPS_LIBS) +-- +2.8.3 + diff --git a/package/pulseview/Config.in b/package/pulseview/Config.in new file mode 100644 index 0000000000..bbbfd7672e --- /dev/null +++ b/package/pulseview/Config.in @@ -0,0 +1,32 @@ +config BR2_PACKAGE_PULSEVIEW + bool "pulseview" + select BR2_PACKAGE_LIBSIGROK + select BR2_PACKAGE_LIBSIGROKCXX + depends on BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT5BASE_WIDGETS + select BR2_PACKAGE_QT5BASE_PNG + select BR2_PACKAGE_QT5SVG + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_FILESYSTEM + select BR2_PACKAGE_BOOST_SYSTEM + select BR2_PACKAGE_BOOST_THREAD + # libsigrok->libglib2: + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + # libsigrok + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + help + PulseView is a Qt based logic analyzer, oscilloscope + and MSO GUI for sigrok. + + http://sigrok.org/wiki/PulseView + +comment "pulseview needs a toolchain w/ wchar, threads, C++, gcc >= 4.8" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_QT5 + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_USE_WCHAR \ + || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/pulseview/pulseview.hash b/package/pulseview/pulseview.hash new file mode 100644 index 0000000000..dc50ec6149 --- /dev/null +++ b/package/pulseview/pulseview.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 5ffe2cb7a602fcdc60933d400c77bcd66e6ce529bc4f6e97d6a5e5a86f2f530e pulseview-0.3.0.tar.gz +sha256 7de425dfe3b0f76e76e266374dca8b2951510d232380901ef2abda71c7c30bb0 dcfe0a01f72021aab961245d0ebcc9f8d4504b40.patch diff --git a/package/pulseview/pulseview.mk b/package/pulseview/pulseview.mk new file mode 100644 index 0000000000..cc9718712f --- /dev/null +++ b/package/pulseview/pulseview.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# pulseview +# +################################################################################ + +# TODO Pulseview can be built and linked against Qt4 as well. + +PULSEVIEW_VERSION = 0.3.0 +PULSEVIEW_SITE = http://sigrok.org/download/source/pulseview +PULSEVIEW_LICENSE = GPLv3+ +PULSEVIEW_LICENSE_FILES = COPYING +PULSEVIEW_DEPENDENCIES = libsigrok qt5base qt5svg boost +PULSEVIEW_CONF_OPTS = -DDISABLE_WERROR=TRUE + +ifeq ($(BR2_PACKAGE_BOOST_TEST),y) +PULSEVIEW_CONF_OPTS += -DENABLE_TESTS=TRUE +else +PULSEVIEW_CONF_OPTS += -DENABLE_TESTS=FALSE +endif + +ifeq ($(BR2_PACKAGE_LIBSIGROKDECODE),y) +PULSEVIEW_CONF_OPTS += -DENABLE_DECODE=TRUE +PULSEVIEW_DEPENDENCIES += libsigrokdecode +else +PULSEVIEW_CONF_OPTS += -DENABLE_DECODE=FALSE +endif + +$(eval $(cmake-package)) diff --git a/package/pure-ftpd/0001-cross.patch b/package/pure-ftpd/0001-cross.patch new file mode 100644 index 0000000000..f8b1d81da8 --- /dev/null +++ b/package/pure-ftpd/0001-cross.patch @@ -0,0 +1,25 @@ +Do not include host paths when cross-compiling. + +Signed-off-by: Bernd Kuhls + +diff -uNr pure-ftpd-1.0.36.org/configure pure-ftpd-1.0.36/configure +--- pure-ftpd-1.0.36.org/configure 2012-03-16 06:29:23.000000000 +0100 ++++ pure-ftpd-1.0.36/configure 2014-09-28 19:55:56.650529713 +0200 +@@ -6319,17 +6319,6 @@ + + + +-if test -d /usr/local/include; then +- CPPFLAGS="$CPPFLAGS -I/usr/local/include" +-fi +- +-if test -d /usr/kerberos/include; then +- CPPFLAGS="$CPPFLAGS -I/usr/kerberos/include" +-fi +- +-if test -d /usr/local/lib; then +- LDFLAGS="$LDFLAGS -L/usr/local/lib" +-fi + + if uname | fgrep SunOS > /dev/null 2> /dev/null ; then + CPPFLAGS="$CPPFLAGS -D_XPG4_2=1" diff --git a/package/pure-ftpd/Config.in b/package/pure-ftpd/Config.in new file mode 100644 index 0000000000..c1b2529db9 --- /dev/null +++ b/package/pure-ftpd/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PURE_FTPD + bool "pure-ftpd" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on BR2_USE_MMU # fork() + help + Pure-FTPd is a free (BSD), secure, production-quality and standard- + conformant FTP server. It doesn't provide useless bells and whistles, + but focuses on efficiency and ease of use. It provides simple answers + to common needs, plus unique useful features for personal users as + well as hosting providers. + + http://www.pureftpd.org diff --git a/package/pure-ftpd/pure-ftpd.hash b/package/pure-ftpd/pure-ftpd.hash new file mode 100644 index 0000000000..6996290521 --- /dev/null +++ b/package/pure-ftpd/pure-ftpd.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 efd11295998453e31dbeef9159624beabbac2643a338134ae8c2ef529aa2ec10 pure-ftpd-1.0.42.tar.bz2 diff --git a/package/pure-ftpd/pure-ftpd.mk b/package/pure-ftpd/pure-ftpd.mk new file mode 100644 index 0000000000..e1040fa159 --- /dev/null +++ b/package/pure-ftpd/pure-ftpd.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# pure-ftpd +# +################################################################################ + +PURE_FTPD_VERSION = 1.0.42 +PURE_FTPD_SITE = http://download.pureftpd.org/pub/pure-ftpd/releases +PURE_FTPD_SOURCE = pure-ftpd-$(PURE_FTPD_VERSION).tar.bz2 +PURE_FTPD_LICENSE = ISC +PURE_FTPD_LICENSE_FILES = COPYING +PURE_FTPD_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +PURE_FTPD_CONF_OPTS = \ + --with-altlog \ + --with-puredb \ + --with-rfc2640 + +ifeq ($(BR2_PACKAGE_ELFUTILS),y) +PURE_FTPD_DEPENDENCIES += elfutils +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +PURE_FTPD_CONF_OPTS += --with-capabilities +PURE_FTPD_DEPENDENCIES += libcap +else +PURE_FTPD_CONF_OPTS += --without-capabilities +endif + +ifeq ($(BR2_PACKAGE_LIBSODIUM),y) +PURE_FTPD_DEPENDENCIES += libsodium +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +PURE_FTPD_CONF_OPTS += --with-tls +PURE_FTPD_DEPENDENCIES += openssl +ifeq ($(BR2_STATIC_LIBS),y) +PURE_FTPD_CONF_ENV += LIBS='-lssl -lcrypto -lz' +endif +else +PURE_FTPD_CONF_OPTS += --without-tls +endif + +ifeq ($(BR2_arc),y) +PURE_FTPD_CONF_ENV += ax_cv_check_cflags___fPIE=no ax_cv_check_ldflags___fPIE=no +endif + +$(eval $(autotools-package)) diff --git a/package/putty/0001-uxcons-Fix-on-musl-libc.patch b/package/putty/0001-uxcons-Fix-on-musl-libc.patch new file mode 100644 index 0000000000..5f43af0d05 --- /dev/null +++ b/package/putty/0001-uxcons-Fix-on-musl-libc.patch @@ -0,0 +1,29 @@ +From 4ae1577b432c1859704d2763f70a764dee23bd98 Mon Sep 17 00:00:00 2001 +From: Kylie McClain +Date: Thu, 28 Apr 2016 22:40:32 -0400 +Subject: [PATCH] uxcons: Fix on musl libc + +musl libc exports FD_SET and friends in sys/select.h. + +Signed-off-by: Baruch Siach +--- +Patch status: upstream commit 4ae1577b432c + + unix/uxcons.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/unix/uxcons.c b/unix/uxcons.c +index b9fd67fe9274..f2a25f3fed70 100644 +--- a/unix/uxcons.c ++++ b/unix/uxcons.c +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + #include "putty.h" + #include "storage.h" +-- +2.8.1 + diff --git a/package/putty/0002-Fix-__uint128_t-compile-error-on-MinGW.patch b/package/putty/0002-Fix-__uint128_t-compile-error-on-MinGW.patch new file mode 100644 index 0000000000..514b6298d9 --- /dev/null +++ b/package/putty/0002-Fix-__uint128_t-compile-error-on-MinGW.patch @@ -0,0 +1,30 @@ +From 3377ea57f5d333d65d44a1130161396782389e88 Mon Sep 17 00:00:00 2001 +From: Tim Kosse +Date: Tue, 11 Aug 2015 09:43:34 +0200 +Subject: [PATCH] Fix __uint128_t compile error on MinGW. + +MinGW has __uint128_t, but not __uint64_t. + +Signed-off-by: Baruch Siach +--- +Patch status: upstream commit 3377ea57f5 + + sshbn.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sshbn.h b/sshbn.h +index a043241eea67..9366f614ae4c 100644 +--- a/sshbn.h ++++ b/sshbn.h +@@ -26,7 +26,7 @@ + * using the same 'two machine registers' kind of code generation that + * 32-bit targets use for 64-bit ints. If we have one of these, we can + * use a 64-bit BignumInt and a 128-bit BignumDblInt. */ +-typedef __uint64_t BignumInt; ++typedef unsigned long long BignumInt; + typedef __uint128_t BignumDblInt; + #define BIGNUM_INT_MASK 0xFFFFFFFFFFFFFFFFULL + #define BIGNUM_TOP_BIT 0x8000000000000000ULL +-- +2.8.1 + diff --git a/package/putty/Config.in b/package/putty/Config.in new file mode 100644 index 0000000000..fe5b9eb78e --- /dev/null +++ b/package/putty/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PUTTY + bool "putty" + depends on BR2_USE_MMU # fork() + help + PuTTY is a free SSH and Telnet client. Without GTK2 activated, + only the commandline tools plink, pscp, psftp, and puttygen are + built; enable GTK2 for the graphical client. + + http://www.chiark.greenend.org.uk/~sgtatham/putty/ diff --git a/package/putty/putty.hash b/package/putty/putty.hash new file mode 100644 index 0000000000..75990e4176 --- /dev/null +++ b/package/putty/putty.hash @@ -0,0 +1,3 @@ +# Hashes from: http://the.earth.li/~sgtatham/putty/0.67/{sha256,sha512}sums +sha256 80192458e8a46229de512afeca5c757dd8fce09606b3c992fbaeeee29b994a47 putty-0.67.tar.gz +sha512 c2b17da46b8db3fe3837a10cb9cf5dd4b3ef6bfa15cadab83f3b87cf1479ed31fced90b774297ae53bdcbbdf230fc80d5c73d5ff3be6916fb591fd7ce3d35eca putty-0.67.tar.gz diff --git a/package/putty/putty.mk b/package/putty/putty.mk new file mode 100644 index 0000000000..ca86c47052 --- /dev/null +++ b/package/putty/putty.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# putty +# +################################################################################ + +PUTTY_VERSION = 0.67 +PUTTY_SOURCE = putty-$(PUTTY_VERSION).tar.gz +PUTTY_SITE = http://the.earth.li/~sgtatham/putty/$(PUTTY_VERSION) +PUTTY_SUBDIR = unix +PUTTY_LICENSE = MIT +PUTTY_LICENSE_FILES = LICENCE +PUTTY_CONF_OPTS = --disable-gtktest + +ifeq ($(BR2_PACKAGE_LIBGTK2),y) +PUTTY_CONF_OPTS += --with-gtk=2 +PUTTY_DEPENDENCIES += libgtk2 +else +PUTTY_CONF_OPTS += --without-gtk +endif + +$(eval $(autotools-package)) diff --git a/package/pv/Config.in b/package/pv/Config.in new file mode 100644 index 0000000000..d7322963c0 --- /dev/null +++ b/package/pv/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PV + bool "pv" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + Pipe Viewer - is a terminal-based tool for + monitoring the progress of data through a + pipeline. + + http://www.ivarch.com/programs/pv.shtml diff --git a/package/pv/pv.hash b/package/pv/pv.hash new file mode 100644 index 0000000000..291d6dd06f --- /dev/null +++ b/package/pv/pv.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 0ece824e0da27b384d11d1de371f20cafac465e038041adab57fcf4b5036ef8d pv-1.6.0.tar.bz2 diff --git a/package/pv/pv.mk b/package/pv/pv.mk new file mode 100644 index 0000000000..2279805a65 --- /dev/null +++ b/package/pv/pv.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# pv +# +################################################################################ + +PV_VERSION = 1.6.0 +PV_SOURCE = pv-$(PV_VERSION).tar.bz2 +PV_SITE = http://www.ivarch.com/programs/sources +PV_LICENSE = Artistic-2.0 +PV_LICENSE_FILES = doc/COPYING + +# pv configure script is somewhat stupid: if it cannot find the host +# gettext tool msgfmt, it concludes that gettext is not available, and +# provides its own minimal version. Unfortunately, this minimal +# version conflicts with the available target gettext. We fix this by +# ensuring that host-gettext is built if gettext support is enabled; +PV_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext host-gettext) + +# --relax linker option is enabled by default on sparc/sparc64 +# architectures, and it can't be used together with -r option, so +# disable it. +ifeq ($(BR2_sparc)$(BR2_sparc64),y) +PV_LDFLAGS = "-Wl,--no-relax" +endif + +# While 'pv' uses autoconf, it does not use automake for its +# makefiles. It uses $(LD) $(LDFLAGS) to achieve partial linking, but +# using 'ld' directly doesn't work well with some toolchain +# configuration, as the ld default emulation may not necessarily be +# the correct one. By passing the below values for LD and LDFLAGS, we +# ensure that 'gcc' is used to do these partial linking steps. +PV_MAKE_OPTS = \ + LD="$(TARGET_CC)" \ + LDFLAGS="-Wl,-r -nostdlib $(PV_LDFLAGS)" + +$(eval $(autotools-package)) diff --git a/package/pwgen/Config.in b/package/pwgen/Config.in new file mode 100644 index 0000000000..7bbc1d6d55 --- /dev/null +++ b/package/pwgen/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PWGEN + bool "pwgen" + help + Pwgen is a small, GPL'ed password generator which creates passwords + which can be easily memorized by a human. + + http://sourceforge.net/projects/pwgen/ diff --git a/package/pwgen/Config.in.host b/package/pwgen/Config.in.host new file mode 100644 index 0000000000..0c56851dcb --- /dev/null +++ b/package/pwgen/Config.in.host @@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_PWGEN + bool "host pwgen" + help + Pwgen is a small, GPL'ed password generator which creates passwords + which can be easily memorized by a human. + + http://sourceforge.net/projects/pwgen/ diff --git a/package/pwgen/pwgen.hash b/package/pwgen/pwgen.hash new file mode 100644 index 0000000000..2997ed3eb4 --- /dev/null +++ b/package/pwgen/pwgen.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/pwgen/files/pwgen/2.07/ +md5 910b1008cdd86445e9e01305d21ee4c5 pwgen-2.07.tar.gz +sha1 51180f9cd5530d79eea18b2443780dec4ec5ea43 pwgen-2.07.tar.gz diff --git a/package/pwgen/pwgen.mk b/package/pwgen/pwgen.mk new file mode 100644 index 0000000000..9810097e21 --- /dev/null +++ b/package/pwgen/pwgen.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# pwgen +# +################################################################################ + +PWGEN_VERSION = 2.07 +PWGEN_SITE = http://downloads.sourceforge.net/project/pwgen/pwgen/$(PWGEN_VERSION) +PWGEN_LICENSE = GPLv2 +PWGEN_LICENSE_FILES = debian/copyright + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/python-alsaaudio/Config.in b/package/python-alsaaudio/Config.in new file mode 100644 index 0000000000..60523bf70a --- /dev/null +++ b/package/python-alsaaudio/Config.in @@ -0,0 +1,14 @@ +comment "python-alsaaudio needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_PYTHON_ALSAAUDIO + bool "python-alsaaudio" + depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_ALSA_LIB_PCM + select BR2_PACKAGE_ALSA_LIB_MIXER + help + The PyAlsaAudio package contains bindings for the ALSA sound + API. + + http://larsimmisch.github.io/pyalsaaudio/ diff --git a/package/python-alsaaudio/python-alsaaudio.hash b/package/python-alsaaudio/python-alsaaudio.hash new file mode 100644 index 0000000000..92277ec393 --- /dev/null +++ b/package/python-alsaaudio/python-alsaaudio.hash @@ -0,0 +1,4 @@ +# From https://pypi.python.org/pypi?:action=show_md5&digest=1f22415a3d8da4b303182ad81c2d062e +md5 1f22415a3d8da4b303182ad81c2d062e pyalsaaudio-0.8.2.tar.gz +# Locally calculated +sha256 b6df486f1c4035041a5f3800496b86c64e48e4a7d47f94dcbca11b0187aa3a15 pyalsaaudio-0.8.2.tar.gz diff --git a/package/python-alsaaudio/python-alsaaudio.mk b/package/python-alsaaudio/python-alsaaudio.mk new file mode 100644 index 0000000000..92c354e3f8 --- /dev/null +++ b/package/python-alsaaudio/python-alsaaudio.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-alsaaudio +# +################################################################################ + +PYTHON_ALSAAUDIO_VERSION = 0.8.2 +PYTHON_ALSAAUDIO_SOURCE = pyalsaaudio-$(PYTHON_ALSAAUDIO_VERSION).tar.gz +PYTHON_ALSAAUDIO_SITE = https://pypi.python.org/packages/source/p/pyalsaaudio +PYTHON_ALSAAUDIO_SETUP_TYPE = distutils +PYTHON_ALSAAUDIO_LICENSE = Python software foundation license v2 +PYTHON_ALSAAUDIO_LICENSE_FILES = LICENSE +PYTHON_ALSAAUDIO_DEPENDENCIES = alsa-lib + +$(eval $(python-package)) diff --git a/package/python-autobahn/Config.in b/package/python-autobahn/Config.in new file mode 100644 index 0000000000..7e1429cdd7 --- /dev/null +++ b/package/python-autobahn/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_AUTOBAHN + bool "python-autobahn" + select BR2_PACKAGE_PYTHON_SIX # runtime + select BR2_PACKAGE_PYTHON_TXAIO # runtime + help + WebSocket client Hhh server library, WAMP real-time + framework. + + https://pypi.python.org/pypi/autobahn diff --git a/package/python-autobahn/python-autobahn.hash b/package/python-autobahn/python-autobahn.hash new file mode 100644 index 0000000000..8f55ac1301 --- /dev/null +++ b/package/python-autobahn/python-autobahn.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=b4b5445050749c1033b9b58f694f0c64, sha256 locally computed. +md5 b4b5445050749c1033b9b58f694f0c64 autobahn-0.12.1.tar.gz +sha256 664223879e159c88221f42d8d1ac6b8c4268d8b9316d8ab69a02761c5744cd79 autobahn-0.12.1.tar.gz diff --git a/package/python-autobahn/python-autobahn.mk b/package/python-autobahn/python-autobahn.mk new file mode 100644 index 0000000000..1d0286712f --- /dev/null +++ b/package/python-autobahn/python-autobahn.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-autobahn +# +################################################################################ + +PYTHON_AUTOBAHN_VERSION = 0.12.1 +PYTHON_AUTOBAHN_SOURCE = autobahn-$(PYTHON_AUTOBAHN_VERSION).tar.gz +PYTHON_AUTOBAHN_SITE = http://pypi.python.org/packages/source/a/autobahn +PYTHON_AUTOBAHN_LICENSE = MIT +PYTHON_AUTOBAHN_LICENSE_FILES = LICENSE +PYTHON_AUTOBAHN_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-backports-abc/Config.in b/package/python-backports-abc/Config.in new file mode 100644 index 0000000000..26d8cfd98b --- /dev/null +++ b/package/python-backports-abc/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_BACKPORTS_ABC + bool "python-backports-abc" + help + A backport of recent additions to the 'collections.abc' + module. + + https://pypi.python.org/pypi/backports_abc diff --git a/package/python-backports-abc/python-backports-abc.hash b/package/python-backports-abc/python-backports-abc.hash new file mode 100644 index 0000000000..07e954e6cb --- /dev/null +++ b/package/python-backports-abc/python-backports-abc.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=0b65a216ce9dc9c1a7e20a729dd7c05b, sha256 locally computed +md5 0b65a216ce9dc9c1a7e20a729dd7c05b backports_abc-0.4.tar.gz +sha256 8b3e4092ba3d541c7a2f9b7d0d9c0275b21c6a01c53a61c731eba6686939d0a5 backports_abc-0.4.tar.gz diff --git a/package/python-backports-abc/python-backports-abc.mk b/package/python-backports-abc/python-backports-abc.mk new file mode 100644 index 0000000000..1e3a9a6e9c --- /dev/null +++ b/package/python-backports-abc/python-backports-abc.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-backports-abc +# +################################################################################ + +PYTHON_BACKPORTS_ABC_VERSION = 0.4 +PYTHON_BACKPORTS_ABC_SOURCE = backports_abc-$(PYTHON_BACKPORTS_ABC_VERSION).tar.gz +PYTHON_BACKPORTS_ABC_SITE = https://pypi.python.org/packages/source/b/backports_abc +PYTHON_BACKPORTS_ABC_LICENSE = Python Software Foundation License +PYTHON_BACKPORTS_ABC_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-beautifulsoup4/Config.in b/package/python-beautifulsoup4/Config.in new file mode 100644 index 0000000000..76f6d9471c --- /dev/null +++ b/package/python-beautifulsoup4/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_BEAUTIFULSOUP4 + bool "python-beautifulsoup4" + help + Beautiful Soup is a Python library for pulling data out of + HTML and XML files. It works with your favorite parser to + provide idiomatic ways of navigating, searching, and + modifying the parse tree. It commonly saves programmers + hours or days of work. + + http://www.crummy.com/software/BeautifulSoup/bs4/ diff --git a/package/python-beautifulsoup4/python-beautifulsoup4.hash b/package/python-beautifulsoup4/python-beautifulsoup4.hash new file mode 100644 index 0000000000..885c26675d --- /dev/null +++ b/package/python-beautifulsoup4/python-beautifulsoup4.hash @@ -0,0 +1,4 @@ +# md5 from https://pypi.python.org/pypi/beautifulsoup4/json +md5 8fbd9a7cac0704645fa20d1419036815 beautifulsoup4-4.4.1.tar.gz +# sha256 calculated by scanpypi +sha256 87d4013d0625d4789a4f56b8d79a04d5ce6db1152bb65f1d39744f7709a366b4 beautifulsoup4-4.4.1.tar.gz diff --git a/package/python-beautifulsoup4/python-beautifulsoup4.mk b/package/python-beautifulsoup4/python-beautifulsoup4.mk new file mode 100644 index 0000000000..58481b9794 --- /dev/null +++ b/package/python-beautifulsoup4/python-beautifulsoup4.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-beautifulsoup4 +# +################################################################################ + +PYTHON_BEAUTIFULSOUP4_VERSION = 4.4.1 +PYTHON_BEAUTIFULSOUP4_SOURCE = beautifulsoup4-$(PYTHON_BEAUTIFULSOUP4_VERSION).tar.gz +PYTHON_BEAUTIFULSOUP4_SITE = https://pypi.python.org/packages/source/b/beautifulsoup4 +PYTHON_BEAUTIFULSOUP4_SETUP_TYPE = setuptools +PYTHON_BEAUTIFULSOUP4_LICENSE = MIT +PYTHON_BEAUTIFULSOUP4_LICENSE_FILES = COPYING.txt + +$(eval $(python-package)) diff --git a/package/python-bottle/Config.in b/package/python-bottle/Config.in new file mode 100644 index 0000000000..f9b60ca724 --- /dev/null +++ b/package/python-bottle/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_BOTTLE + bool "python-bottle" + help + Bottle is a fast, simple and lightweight WSGI micro web-framework + for Python. It is distributed as a single file module and has no + dependencies other than the Python Standard Library. + + http://bottlepy.org diff --git a/package/python-bottle/python-bottle.hash b/package/python-bottle/python-bottle.hash new file mode 100644 index 0000000000..8c7d4281b1 --- /dev/null +++ b/package/python-bottle/python-bottle.hash @@ -0,0 +1,4 @@ +# From https://pypi.python.org/pypi/bottle/0.12.7 +md5 ed0b83c9dbbdbde784e7c652d61c59f4 bottle-0.12.7.tar.gz +# Calculated based on the hash above +sha256 e3ea2191f06ca51af45bf6ca41ed2d1b2d809ceda0876466879fe205be7b2073 bottle-0.12.7.tar.gz diff --git a/package/python-bottle/python-bottle.mk b/package/python-bottle/python-bottle.mk new file mode 100644 index 0000000000..441419ec81 --- /dev/null +++ b/package/python-bottle/python-bottle.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-bottle +# +################################################################################ + +PYTHON_BOTTLE_VERSION = 0.12.7 +PYTHON_BOTTLE_SOURCE = bottle-$(PYTHON_BOTTLE_VERSION).tar.gz +PYTHON_BOTTLE_SITE = http://pypi.python.org/packages/source/b/bottle +PYTHON_BOTTLE_LICENSE = MIT +# README.rst refers to the file "LICENSE" but it's not included +PYTHON_BOTTLE_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-can/Config.in b/package/python-can/Config.in new file mode 100644 index 0000000000..6b4e0fa76e --- /dev/null +++ b/package/python-can/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_CAN + bool "python-can" + help + This module provides controller area network support for Python. + + https://bitbucket.org/hardbyte/python-can diff --git a/package/python-can/python-can.hash b/package/python-can/python-can.hash new file mode 100644 index 0000000000..a8778622bf --- /dev/null +++ b/package/python-can/python-can.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=b9b556fe6f016c0a3b27cc67790cf821, sha256 locally computed +md5 b9b556fe6f016c0a3b27cc67790cf821 python-can-1.4.3.tar.gz +sha256 2dcd32737cc39fbf39f41521146a9685f594942c99c6183bad7e3c404930198b python-can-1.4.3.tar.gz diff --git a/package/python-can/python-can.mk b/package/python-can/python-can.mk new file mode 100644 index 0000000000..ae9ef1a0ce --- /dev/null +++ b/package/python-can/python-can.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-can +# +################################################################################ + +PYTHON_CAN_VERSION = 1.4.3 +PYTHON_CAN_SITE = https://pypi.python.org/packages/source/p/python-can +PYTHON_CAN_LICENSE = LGPLv3 +PYTHON_CAN_LICENSE_FILES = LICENSE.txt +PYTHON_CAN_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-cbor/Config.in b/package/python-cbor/Config.in new file mode 100644 index 0000000000..2d0962d592 --- /dev/null +++ b/package/python-cbor/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_CBOR + bool "python-cbor" + help + RFC 7049 - Concise Binary Object Representation. + + https://pypi.python.org/pypi/cbor + diff --git a/package/python-cbor/python-cbor.hash b/package/python-cbor/python-cbor.hash new file mode 100644 index 0000000000..6714348b5e --- /dev/null +++ b/package/python-cbor/python-cbor.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=711ee5ecc896595c1e95c1c48356606c, sha256 locally computed. +md5 711ee5ecc896595c1e95c1c48356606c cbor-0.1.25.tar.gz +sha256 e342d425dde88bb93b741e34e3ba092492ba1f6fca94ce356054fb7daa420746 cbor-0.1.25.tar.gz diff --git a/package/python-cbor/python-cbor.mk b/package/python-cbor/python-cbor.mk new file mode 100644 index 0000000000..4c3ce9dba3 --- /dev/null +++ b/package/python-cbor/python-cbor.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-cbor +# +################################################################################ + +PYTHON_CBOR_VERSION = 0.1.25 +PYTHON_CBOR_SOURCE = cbor-$(PYTHON_CBOR_VERSION).tar.gz +PYTHON_CBOR_SITE = http://pypi.python.org/packages/source/c/cbor +PYTHON_CBOR_LICENSE = Apache +PYTHON_CBOR_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-certifi/Config.in b/package/python-certifi/Config.in new file mode 100644 index 0000000000..9390b4f898 --- /dev/null +++ b/package/python-certifi/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_CERTIFI + bool "python-certifi" + help + Python package for providing Mozilla's CA Bundle. + + https://pypi.python.org/pypi/certifi diff --git a/package/python-certifi/python-certifi.hash b/package/python-certifi/python-certifi.hash new file mode 100644 index 0000000000..ade4db38c3 --- /dev/null +++ b/package/python-certifi/python-certifi.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=5d672aa766e1f773c75cfeccd02d3650, sha256 locally computed +md5 5d672aa766e1f773c75cfeccd02d3650 certifi-2016.2.28.tar.gz +sha256 5e8eccf95924658c97b990b50552addb64f55e1e3dfe4880456ac1f287dc79d0 certifi-2016.2.28.tar.gz diff --git a/package/python-certifi/python-certifi.mk b/package/python-certifi/python-certifi.mk new file mode 100644 index 0000000000..84db8ffebc --- /dev/null +++ b/package/python-certifi/python-certifi.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-certifi +# +################################################################################ + +PYTHON_CERTIFI_VERSION = 2016.2.28 +PYTHON_CERTIFI_SOURCE = certifi-$(PYTHON_CERTIFI_VERSION).tar.gz +PYTHON_CERTIFI_SITE = https://pypi.python.org/packages/source/c/certifi +PYTHON_CERTIFI_SETUP_TYPE = setuptools +PYTHON_CERTIFI_LICENSE = ISC (Python code), MPL-2.0 (cacert.pem) +PYTHON_CERTIFI_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-cffi/Config.in b/package/python-cffi/Config.in new file mode 100644 index 0000000000..3805d3d10a --- /dev/null +++ b/package/python-cffi/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_CFFI + bool "python-cffi" + select BR2_PACKAGE_LIBFFI + help + This is the Foreign Function Interface for Python calling C + code. The aim of this project is to provide a convenient + and reliable way of calling C code from Python. + + https://pypi.python.org/pypi/cffi diff --git a/package/python-cffi/python-cffi.hash b/package/python-cffi/python-cffi.hash new file mode 100644 index 0000000000..125c93e893 --- /dev/null +++ b/package/python-cffi/python-cffi.hash @@ -0,0 +1,4 @@ +# From https://pypi.python.org/pypi?:action=show_md5&digest=2fae9160991afefb20ff0fbde3b14faf +md5 2fae9160991afefb20ff0fbde3b14faf cffi-1.6.0.tar.gz +# Calculated based on the hash above +sha256 a7f75c4ef2362c0a0e54657add0a6c509fecbfa3b3807bc0925f5cb1c9f927db cffi-1.6.0.tar.gz diff --git a/package/python-cffi/python-cffi.mk b/package/python-cffi/python-cffi.mk new file mode 100644 index 0000000000..3c2d534955 --- /dev/null +++ b/package/python-cffi/python-cffi.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# python-cffi +# +################################################################################ + +PYTHON_CFFI_VERSION = 1.6.0 +PYTHON_CFFI_SOURCE = cffi-$(PYTHON_CFFI_VERSION).tar.gz +PYTHON_CFFI_SITE = https://pypi.python.org/packages/b6/98/11feff87072e2e640fb8320712b781eccdef05d588618915236b32289d5a +PYTHON_CFFI_SETUP_TYPE = setuptools +PYTHON_CFFI_DEPENDENCIES = host-pkgconf libffi +PYTHON_CFFI_LICENSE = MIT +PYTHON_CFFI_LICENSE_FILES = LICENSE + +# This host package uses pkg-config to find libffi, so we have to +# provide the proper hints for pkg-config to behave properly for host +# packages. +HOST_PYTHON_CFFI_ENV = \ + PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 \ + PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 \ + PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + PKG_CONFIG_SYSROOT_DIR="/" \ + PKG_CONFIG_LIBDIR="$(HOST_DIR)/usr/lib/pkgconfig:$(HOST_DIR)/usr/share/pkgconfig" +HOST_PYTHON_CFFI_DEPENDENCIES = host-pkgconf host-python-pycparser host-libffi + +$(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/package/python-characteristic/Config.in b/package/python-characteristic/Config.in new file mode 100644 index 0000000000..1226fa85e2 --- /dev/null +++ b/package/python-characteristic/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_CHARACTERISTIC + bool "python-characteristic" + help + Python attributes without boilerplate. + + https://pypi.python.org/pypi/characteristic diff --git a/package/python-characteristic/python-characteristic.hash b/package/python-characteristic/python-characteristic.hash new file mode 100644 index 0000000000..41dc18ccae --- /dev/null +++ b/package/python-characteristic/python-characteristic.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=b249368dd021fde1c06b4802867c0913, sha256 locally computed. +md5 b249368dd021fde1c06b4802867c0913 characteristic-14.3.0.tar.gz +sha256 ded68d4e424115ed44e5c83c2a901a0b6157a959079d7591d92106ffd3ada380 characteristic-14.3.0.tar.gz diff --git a/package/python-characteristic/python-characteristic.mk b/package/python-characteristic/python-characteristic.mk new file mode 100644 index 0000000000..dc3e8bb299 --- /dev/null +++ b/package/python-characteristic/python-characteristic.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-characteristic +# +################################################################################ + +PYTHON_CHARACTERISTIC_VERSION = 14.3.0 +PYTHON_CHARACTERISTIC_SOURCE = characteristic-$(PYTHON_CHARACTERISTIC_VERSION).tar.gz +PYTHON_CHARACTERISTIC_SITE = http://pypi.python.org/packages/source/c/characteristic +PYTHON_CHARACTERISTIC_LICENSE = MIT +PYTHON_CHARACTERISTIC_LICENSE_FILES = LICENSE +PYTHON_CHARACTERISTIC_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-cheetah/Config.in b/package/python-cheetah/Config.in new file mode 100644 index 0000000000..e98dc39249 --- /dev/null +++ b/package/python-cheetah/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PYTHON_CHEETAH + bool "python-cheetah" + depends on BR2_PACKAGE_PYTHON + help + Cheetah is an open source template engine and code generation tool. + + It can be used standalone or combined with other tools and frameworks. + Web development is its principle use, but Cheetah is very flexible + and is also being used to generate C++ game code, Java, sql, form + emails and even Python code. + + https://pypi.python.org/pypi/Cheetah/ diff --git a/package/python-cheetah/python-cheetah.hash b/package/python-cheetah/python-cheetah.hash new file mode 100644 index 0000000000..477ee5483a --- /dev/null +++ b/package/python-cheetah/python-cheetah.hash @@ -0,0 +1,4 @@ +# From https://pypi.python.org/pypi/Cheetah/2.4.4 +md5 853917116e731afbc8c8a43c37e6ddba Cheetah-2.4.4.tar.gz +# Calculated based on the hash above +sha256 be308229f0c1e5e5af4f27d7ee06d90bb19e6af3059794e5fd536a6f29a9b550 Cheetah-2.4.4.tar.gz diff --git a/package/python-cheetah/python-cheetah.mk b/package/python-cheetah/python-cheetah.mk new file mode 100644 index 0000000000..af7d1f5494 --- /dev/null +++ b/package/python-cheetah/python-cheetah.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# python-cheetah +# +################################################################################ + +PYTHON_CHEETAH_VERSION = 2.4.4 +PYTHON_CHEETAH_SOURCE = Cheetah-$(PYTHON_CHEETAH_VERSION).tar.gz +PYTHON_CHEETAH_SITE = http://pypi.python.org/packages/source/C/Cheetah +PYTHON_CHEETAH_LICENSE = MIT +PYTHON_CHEETAH_SETUP_TYPE = setuptools + +HOST_PYTHON_CHEETAH_NEEDS_HOST_PYTHON = python2 + +# The dependency on host-python-markdown is needed to prevent +# setuptools from downloading markdown if it is not installed yet. +HOST_PYTHON_CHEETAH_DEPENDENCIES = host-python-markdown + +$(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/package/python-cherrypy/Config.in b/package/python-cherrypy/Config.in new file mode 100644 index 0000000000..6e32ec2a1a --- /dev/null +++ b/package/python-cherrypy/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_CHERRYPY + bool "python-cherrypy" + select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime + select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 # runtime + help + A minimalist web framework + + http://www.cherrypy.org diff --git a/package/python-cherrypy/python-cherrypy.hash b/package/python-cherrypy/python-cherrypy.hash new file mode 100644 index 0000000000..6befa457d8 --- /dev/null +++ b/package/python-cherrypy/python-cherrypy.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=4b765329b0b4b65ec25811e3febb6c93, sha256 locally computed +md5 4b765329b0b4b65ec25811e3febb6c93 CherryPy-4.0.0.tar.gz +sha256 73ad4f8870b5a3e9988a7778b5d3003a390d440527ec3458a0c7e58865d2611a CherryPy-4.0.0.tar.gz diff --git a/package/python-cherrypy/python-cherrypy.mk b/package/python-cherrypy/python-cherrypy.mk new file mode 100644 index 0000000000..754e0a2bec --- /dev/null +++ b/package/python-cherrypy/python-cherrypy.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-cherrypy +# +################################################################################ + +PYTHON_CHERRYPY_VERSION = 4.0.0 +PYTHON_CHERRYPY_SOURCE = CherryPy-$(PYTHON_CHERRYPY_VERSION).tar.gz +PYTHON_CHERRYPY_SITE = http://pypi.python.org/packages/source/C/CherryPy +PYTHON_CHERRYPY_LICENSE = BSD-3c +PYTHON_CHERRYPY_LICENSE_FILES = cherrypy/LICENSE.txt +PYTHON_CHERRYPY_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-click/Config.in b/package/python-click/Config.in new file mode 100644 index 0000000000..c026998677 --- /dev/null +++ b/package/python-click/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_CLICK + bool "python-click" + help + A simple wrapper around optparse for powerful command line + utilities. + + https://pypi.python.org/pypi/click diff --git a/package/python-click/python-click.hash b/package/python-click/python-click.hash new file mode 100644 index 0000000000..c0d0568288 --- /dev/null +++ b/package/python-click/python-click.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=d0b09582123605220ad6977175f3e51d, sha256 locally computed. +md5 d0b09582123605220ad6977175f3e51d click-6.6.tar.gz +sha256 cc6a19da8ebff6e7074f731447ef7e112bd23adf3de5c597cf9989f2fd8defe9 click-6.6.tar.gz diff --git a/package/python-click/python-click.mk b/package/python-click/python-click.mk new file mode 100644 index 0000000000..839a4673f4 --- /dev/null +++ b/package/python-click/python-click.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-click +# +################################################################################ + +PYTHON_CLICK_VERSION = 6.6 +PYTHON_CLICK_SOURCE = click-$(PYTHON_CLICK_VERSION).tar.gz +PYTHON_CLICK_SITE = http://pypi.python.org/packages/source/c/click +PYTHON_CLICK_LICENSE = BSD-3c +PYTHON_CLICK_LICENSE_FILES = LICENSE +PYTHON_CLICK_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-coherence/0001-Fix-twisted-detection.patch b/package/python-coherence/0001-Fix-twisted-detection.patch new file mode 100644 index 0000000000..c0e51b9e31 --- /dev/null +++ b/package/python-coherence/0001-Fix-twisted-detection.patch @@ -0,0 +1,29 @@ +From 3cf8d89cbb44b5c7a0693d0b5d665e68acc3927c Mon Sep 17 00:00:00 2001 +From: Thomas Klausner +Date: Tue, 10 May 2016 00:14:33 +0200 +Subject: [PATCH] Fix twisted detection. + +Addresses https://github.com/coherence-project/Coherence/issues/25 + +Signed-off-by: Thomas Klausner +Signed-off-by: Yegor Yefremov +--- + coherence/__init__.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/coherence/__init__.py b/coherence/__init__.py +index 2e4e8f1..4c4d73d 100644 +--- a/coherence/__init__.py ++++ b/coherence/__init__.py +@@ -24,8 +24,6 @@ try: + if twisted_version < Version("twisted", 2, 5, 0): + raise ImportError("Twisted >= 2.5 is required. Please install it.") + +- if twisted_web_version < Version("twisted.web", 2, 5, 0): +- raise ImportError("Twisted.Web >= 2.5 is required. Please install it") + except ImportError, exc: + # log error to stderr, might be useful for debugging purpose + for arg in exc.args: +-- +2.8.1 + diff --git a/package/python-coherence/Config.in b/package/python-coherence/Config.in new file mode 100644 index 0000000000..71f79f42ee --- /dev/null +++ b/package/python-coherence/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_PYTHON_COHERENCE + bool "python-coherence" + depends on BR2_PACKAGE_PYTHON + depends on BR2_INSTALL_LIBSTDCPP # python-pyasn + select BR2_PACKAGE_PYTHON_TWISTED + select BR2_PACKAGE_PYTHON_ZOPE_INTERFACE + select BR2_PACKAGE_PYTHON_PYASN + help + A DLNA/UPnP Media Server and Framework for the Digital Living. + + http://coherence-project.org/ + +comment "python-coherence needs a toolchain w/ C++" + depends on BR2_PACKAGE_PYTHON + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-coherence/python-coherence.hash b/package/python-coherence/python-coherence.hash new file mode 100644 index 0000000000..f788ca3750 --- /dev/null +++ b/package/python-coherence/python-coherence.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 fd5a2db9661994a57232ace4a90d259b6554c43b8bf5bfbf8ec2518c03627922 python-coherence-0.6.6.2.tar.gz diff --git a/package/python-coherence/python-coherence.mk b/package/python-coherence/python-coherence.mk new file mode 100644 index 0000000000..f9df37c322 --- /dev/null +++ b/package/python-coherence/python-coherence.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-coherence +# +################################################################################ + +PYTHON_COHERENCE_VERSION = 0.6.6.2 +PYTHON_COHERENCE_SITE = $(call github,coherence-project,Coherence,Coherence-$(PYTHON_COHERENCE_VERSION)) +PYTHON_COHERENCE_SETUP_TYPE = setuptools +PYTHON_COHERENCE_LICENSE = MIT +PYTHON_COHERENCE_LICENSE_FILES = LICENCE +PYTHON_COHERENCE_DEPENDENCIES = python-twisted python-zope-interface python-pyasn + +$(eval $(python-package)) diff --git a/package/python-configobj/Config.in b/package/python-configobj/Config.in new file mode 100644 index 0000000000..fc57e26f1c --- /dev/null +++ b/package/python-configobj/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_CONFIGOBJ + bool "python-configobj" + depends on BR2_PACKAGE_PYTHON + help + ConfigObj is a simple but powerful config file reader and + writer: an ini file round tripper. Its main feature is that + it is very easy to use, with a straightforward programmer's + interface and a simple syntax for config files. + + http://www.voidspace.org.uk/python/configobj.html diff --git a/package/python-configobj/python-configobj.hash b/package/python-configobj/python-configobj.hash new file mode 100644 index 0000000000..e4f5c6ca3d --- /dev/null +++ b/package/python-configobj/python-configobj.hash @@ -0,0 +1,4 @@ +# From https://pypi.python.org/pypi/configobj/4.7.2 +md5 201dbaa732a9049c839f9bb6c27fc7b5 configobj-4.7.2.tar.gz +# Calculated based on the hash above +sha256 515ff923462592e8321df8b48c47e3428f8d406ee22b8de77bef969d1af11171 configobj-4.7.2.tar.gz diff --git a/package/python-configobj/python-configobj.mk b/package/python-configobj/python-configobj.mk new file mode 100644 index 0000000000..5211b1d323 --- /dev/null +++ b/package/python-configobj/python-configobj.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-configobj +# +################################################################################ + +PYTHON_CONFIGOBJ_VERSION = 4.7.2 +PYTHON_CONFIGOBJ_SOURCE = configobj-$(PYTHON_CONFIGOBJ_VERSION).tar.gz +PYTHON_CONFIGOBJ_SITE = http://pypi.python.org/packages/source/c/configobj +PYTHON_CONFIGOBJ_LICENSE = BSD-3c +# License only mentioned in the source +PYTHON_CONFIGOBJ_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-configshell-fb/Config.in b/package/python-configshell-fb/Config.in new file mode 100644 index 0000000000..a680ce01f1 --- /dev/null +++ b/package/python-configshell-fb/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PYTHON_CONFIGSHELL_FB + bool "python-configshell-fb" + select BR2_PACKAGE_PYTHON_PYPARSING + select BR2_PACKAGE_PYTHON3_READLINE if BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_READLINE if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_SIX + select BR2_PACKAGE_PYTHON_URWID + help + configshell-fb is a Python library that provides a framework + for building simple but nice CLI-based applications. + + https://github.com/agrover/configshell-fb diff --git a/package/python-configshell-fb/python-configshell-fb.mk b/package/python-configshell-fb/python-configshell-fb.mk new file mode 100644 index 0000000000..d0671d5ec9 --- /dev/null +++ b/package/python-configshell-fb/python-configshell-fb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-configshell-fb +# +################################################################################ + +PYTHON_CONFIGSHELL_FB_VERSION = v1.1.fb18 +PYTHON_CONFIGSHELL_FB_SITE = $(call github,agrover,configshell-fb,$(PYTHON_CONFIGSHELL_FB_VERSION)) +PYTHON_CONFIGSHELL_FB_LICENSE = Apache-2.0 +PYTHON_CONFIGSHELL_FB_LICENSE_FILES = COPYING +PYTHON_CONFIGSHELL_FB_SETUP_TYPE = setuptools +PYTHON_CONFIGSHELL_FB_DEPENDENCIES = python-pyparsing python-six python-urwid + +$(eval $(python-package)) diff --git a/package/python-crc16/Config.in b/package/python-crc16/Config.in new file mode 100644 index 0000000000..3fd8da7a85 --- /dev/null +++ b/package/python-crc16/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PYTHON_CRC16 + bool "python-crc16" + depends on BR2_PACKAGE_PYTHON + help + This library calculates only CRC16 (16-bit codes) and the + only supported variant at the moment is CRC-CCITT (XModem). + CRC is a way of detecting accidental changes in data storage + or transmission. There are many variants of CRC and CRC16, + in particular. + + http://pycrc16.googlecode.com/ diff --git a/package/python-crc16/python-crc16.mk b/package/python-crc16/python-crc16.mk new file mode 100644 index 0000000000..3a292a0ebe --- /dev/null +++ b/package/python-crc16/python-crc16.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-crc16 +# +################################################################################ + +PYTHON_CRC16_VERSION = 0.1.1 +PYTHON_CRC16_SITE = $(call github,gennady,pycrc16,v$(PYTHON_CRC16_VERSION)) +PYTHON_CRC16_LICENSE = LGPLv3+ +PYTHON_CRC16_LICENSE_FILES = COPYING.txt +PYTHON_CRC16_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-crossbar/Config.in b/package/python-crossbar/Config.in new file mode 100644 index 0000000000..4e613db0df --- /dev/null +++ b/package/python-crossbar/Config.in @@ -0,0 +1,43 @@ +config BR2_PACKAGE_PYTHON_CROSSBAR + bool "python-crossbar" + # All the following dependencies are runtime dependencies + select BR2_PACKAGE_PYTHON_AUTOBAHN + select BR2_PACKAGE_PYTHON_CBOR + select BR2_PACKAGE_PYTHON_CLICK + select BR2_PACKAGE_PYTHON_PYCPARSER + select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY + select BR2_PACKAGE_PYTHON_JINJA2 + select BR2_PACKAGE_PYTHON_LMDB + select BR2_PACKAGE_PYTHON_MISTUNE + select BR2_PACKAGE_PYTHON_MSGPACK + select BR2_PACKAGE_PYTHON_NETADDR + select BR2_PACKAGE_PYTHON_PSUTIL + select BR2_PACKAGE_PYTHON_PYASN + select BR2_PACKAGE_PYTHON_PYASN_MODULES + select BR2_PACKAGE_PYTHON_PYGMENTS + select BR2_PACKAGE_PYTHON_PYINOTIFY + select BR2_PACKAGE_PYTHON_PYNACL + select BR2_PACKAGE_PYTHON_PYOPENSSL + select BR2_PACKAGE_PYTHON_PYTRIE + select BR2_PACKAGE_PYTHON_PYYAML + select BR2_PACKAGE_PYTHON_SETUPTOOLS + select BR2_PACKAGE_PYTHON_SERVICE_IDENTITY + select BR2_PACKAGE_PYTHON_SETPROCTITLE + select BR2_PACKAGE_PYTHON_SETUPTOOLS + select BR2_PACKAGE_PYTHON_SHUTILWHICH if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_TREQ + select BR2_PACKAGE_PYTHON_TWISTED + select BR2_PACKAGE_PYTHON_UJSON + select BR2_PACKAGE_PYTHON_WSACCEL + depends on BR2_INSTALL_LIBSTDCPP # python-msgpack -> msgpack + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # python-msgpack -> msgpack + help + Crossbar.io is an open-source WAMP application router that + allows to build advanced applications from loosely-coupled + components that can talk in real-time with each other. + + https://pypi.python.org/pypi/crossbar + +comment "python-crossbar needs a toolchain w/ C++" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-crossbar/python-crossbar.hash b/package/python-crossbar/python-crossbar.hash new file mode 100644 index 0000000000..0690e56d51 --- /dev/null +++ b/package/python-crossbar/python-crossbar.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=cbe9b62a1ec2eebbc0cd0cef887a4993, sha256 locally computed. +md5 cbe9b62a1ec2eebbc0cd0cef887a4993 crossbar-0.12.1.tar.gz +sha256 4919e683bcfa3c633da8207f24189fd196ef8412b647f0365cf74c0bff8b4ada crossbar-0.12.1.tar.gz diff --git a/package/python-crossbar/python-crossbar.mk b/package/python-crossbar/python-crossbar.mk new file mode 100644 index 0000000000..96bc2544f9 --- /dev/null +++ b/package/python-crossbar/python-crossbar.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-crossbar +# +################################################################################ + +PYTHON_CROSSBAR_VERSION = 0.12.1 +PYTHON_CROSSBAR_SOURCE = crossbar-$(PYTHON_CROSSBAR_VERSION).tar.gz +PYTHON_CROSSBAR_SITE = http://pypi.python.org/packages/source/c/crossbar +PYTHON_CROSSBAR_LICENSE = AGPLv3 +PYTHON_CROSSBAR_LICENSE_FILES = LICENSE +PYTHON_CROSSBAR_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-cryptography/Config.in b/package/python-cryptography/Config.in new file mode 100644 index 0000000000..9827cf82b6 --- /dev/null +++ b/package/python-cryptography/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_PYTHON_CRYPTOGRAPHY + bool "python-cryptography" + depends on BR2_INSTALL_LIBSTDCPP # python-pyasn + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_PYTHON_CFFI # runtime + select BR2_PACKAGE_PYTHON_IDNA # runtime + select BR2_PACKAGE_PYTHON_PYASN # runtime + select BR2_PACKAGE_PYTHON_SIX # runtime + select BR2_PACKAGE_PYTHON_ENUM34 if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime + select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 # runtime + select BR2_PACKAGE_PYTHON_SSL if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_SSL if BR2_PACKAGE_PYTHON3 # runtime + select BR2_PACKAGE_PYTHON_IPADDRESS if BR2_PACKAGE_PYTHON # runtime + help + cryptography is a package designed to expose cryptographic + primitives and recipes to Python developers. + + https://cryptography.io + +comment "python-cryptography needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-cryptography/python-cryptography.hash b/package/python-cryptography/python-cryptography.hash new file mode 100644 index 0000000000..fa15fa0583 --- /dev/null +++ b/package/python-cryptography/python-cryptography.hash @@ -0,0 +1,4 @@ +# From https://pypi.python.org/pypi?:action=show_md5&digest=bc8148d2ff2d80fef8ef2d2e856b3a7f +md5 bc8148d2ff2d80fef8ef2d2e856b3a7f cryptography-1.3.1.tar.gz +# Calculated based on the hash above +sha256 b4b36175e0f95ddc88435c26dbe3397edce48e2ff5fe41d504cdb3beddcd53e2 cryptography-1.3.1.tar.gz diff --git a/package/python-cryptography/python-cryptography.mk b/package/python-cryptography/python-cryptography.mk new file mode 100644 index 0000000000..1b5eb9ca84 --- /dev/null +++ b/package/python-cryptography/python-cryptography.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-cryptography +# +################################################################################ + +PYTHON_CRYPTOGRAPHY_VERSION = 1.3.1 +PYTHON_CRYPTOGRAPHY_SOURCE = cryptography-$(PYTHON_CRYPTOGRAPHY_VERSION).tar.gz +PYTHON_CRYPTOGRAPHY_SITE = https://pypi.python.org/packages/source/c/cryptography +PYTHON_CRYPTOGRAPHY_SETUP_TYPE = setuptools +PYTHON_CRYPTOGRAPHY_LICENSE = Apache-2.0 or BSD-3c +PYTHON_CRYPTOGRAPHY_LICENSE_FILES = LICENSE LICENSE.APACHE LICENSE.BSD +PYTHON_CRYPTOGRAPHY_DEPENDENCIES = host-python-cffi openssl + +$(eval $(python-package)) diff --git a/package/python-cssselect/Config.in b/package/python-cssselect/Config.in new file mode 100644 index 0000000000..9c1ffe4610 --- /dev/null +++ b/package/python-cssselect/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_CSSSELECT + bool "python-cssselect" + help + cssselect parses CSS3 Selectors and translates them to XPath 1.0 + + http://packages.python.org/cssselect/ diff --git a/package/python-cssselect/python-cssselect.hash b/package/python-cssselect/python-cssselect.hash new file mode 100644 index 0000000000..08c81e519b --- /dev/null +++ b/package/python-cssselect/python-cssselect.hash @@ -0,0 +1,4 @@ +# md5 from https://pypi.python.org/pypi/cssselect/json +md5 c74f45966277dc7a0f768b9b0f3522ac cssselect-0.9.1.tar.gz +# sha256 calculated by scanpypi +sha256 0535a7e27014874b27ae3a4d33e8749e345bdfa62766195208b7996bf1100682 cssselect-0.9.1.tar.gz diff --git a/package/python-cssselect/python-cssselect.mk b/package/python-cssselect/python-cssselect.mk new file mode 100644 index 0000000000..c6b476b8a7 --- /dev/null +++ b/package/python-cssselect/python-cssselect.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-cssselect +# +################################################################################ + +PYTHON_CSSSELECT_VERSION = 0.9.1 +PYTHON_CSSSELECT_SOURCE = cssselect-$(PYTHON_CSSSELECT_VERSION).tar.gz +PYTHON_CSSSELECT_SITE = https://pypi.python.org/packages/source/c/cssselect +PYTHON_CSSSELECT_SETUP_TYPE = setuptools +PYTHON_CSSSELECT_LICENSE = BSD-3c +PYTHON_CSSSELECT_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-daemon/Config.in b/package/python-daemon/Config.in new file mode 100644 index 0000000000..b3cc8a2d3e --- /dev/null +++ b/package/python-daemon/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_DAEMON + bool "python-daemon" + depends on BR2_PACKAGE_PYTHON + help + Library to implement a well-behaved Unix daemon process. + + https://pypi.python.org/pypi/python-daemon/ diff --git a/package/python-daemon/python-daemon.mk b/package/python-daemon/python-daemon.mk new file mode 100644 index 0000000000..b8b80baa7d --- /dev/null +++ b/package/python-daemon/python-daemon.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-daemon +# +################################################################################ + +PYTHON_DAEMON_VERSION = 1.5.5 +PYTHON_DAEMON_SITE = https://pypi.python.org/packages/source/p/python-daemon +PYTHON_DAEMON_LICENSE = Python-2.0 (library), GPLv2+ (test) +PYTHON_DAEMON_LICENSE_FILES = LICENSE.PSF-2 LICENSE.GPL-2 +PYTHON_DAEMON_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-dialog/Config.in b/package/python-dialog/Config.in new file mode 100644 index 0000000000..c1fdb23723 --- /dev/null +++ b/package/python-dialog/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_DIALOG + bool "python-dialog" + depends on BR2_PACKAGE_PYTHON + depends on BR2_USE_MMU # dialog + select BR2_PACKAGE_DIALOG + help + A Python interface to the UNIX dialog utility and + mostly-compatible programs. + + http://pythondialog.sourceforge.net/ diff --git a/package/python-dialog/python-dialog.hash b/package/python-dialog/python-dialog.hash new file mode 100644 index 0000000000..3cf0eaa3d6 --- /dev/null +++ b/package/python-dialog/python-dialog.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 58466c2f897ef761716b811ff74e035979b5ecefb529ba004b12db117a0f4581 python2-pythondialog-3.0.1.tar.bz2 diff --git a/package/python-dialog/python-dialog.mk b/package/python-dialog/python-dialog.mk new file mode 100644 index 0000000000..b75d19fd9f --- /dev/null +++ b/package/python-dialog/python-dialog.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-dialog +# +################################################################################ + +PYTHON_DIALOG_VERSION = 3.0.1 +PYTHON_DIALOG_SOURCE = python2-pythondialog-$(PYTHON_DIALOG_VERSION).tar.bz2 +PYTHON_DIALOG_SITE = http://downloads.sourceforge.net/project/pythondialog/pythondialog/$(PYTHON_DIALOG_VERSION) +PYTHON_DIALOG_LICENSE = LGPLv2.1+ +PYTHON_DIALOG_LICENSE_FILES = COPYING +PYTHON_DIALOG_SETUP_TYPE = distutils +PYTHON_DIALOG_DEPENDENCIES = dialog + +$(eval $(python-package)) diff --git a/package/python-django/Config.in b/package/python-django/Config.in new file mode 100644 index 0000000000..ff84227593 --- /dev/null +++ b/package/python-django/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_PYTHON_DJANGO + bool "python-django" + select BR2_PACKAGE_PYTHON_UNICODEDATA if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON3_UNICODEDATA if BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 + help + Django is a high-level Python Web framework that encourages + rapid development and clean, pragmatic design. It takes your + Web applications from concept to launch in a matter of hours. + Django takes care of user authentication, content administration, + site maps, RSS feeds, user comments and many more tasks. + Django takes security seriously and helps developers avoid + many common security mistakes + + https://www.djangoproject.com/ diff --git a/package/python-django/python-django.hash b/package/python-django/python-django.hash new file mode 100644 index 0000000000..f51c9b4741 --- /dev/null +++ b/package/python-django/python-django.hash @@ -0,0 +1,2 @@ +# sha256 from https://www.djangoproject.com/m/pgp/Django-1.7.3.checksum.txt +sha256 f226fb8aa438456968d403f6739de1cf2dad128db86f66ee2b41dfebe3645c5b Django-1.7.3.tar.gz diff --git a/package/python-django/python-django.mk b/package/python-django/python-django.mk new file mode 100644 index 0000000000..b67bce4504 --- /dev/null +++ b/package/python-django/python-django.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-django +# +################################################################################ + +PYTHON_DJANGO_VERSION = 1.7.3 +PYTHON_DJANGO_SOURCE = Django-$(PYTHON_DJANGO_VERSION).tar.gz +# The official Django site has an unpractical URL +PYTHON_DJANGO_SITE = https://pypi.python.org/packages/source/D/Django +PYTHON_DJANGO_LICENSE = BSD-3c +PYTHON_DJANGO_LICENSE_FILES = LICENSE +PYTHON_DJANGO_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-docopt/Config.in b/package/python-docopt/Config.in new file mode 100644 index 0000000000..9942d671b3 --- /dev/null +++ b/package/python-docopt/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PYTHON_DOCOPT + bool "python-docopt" + help + docopt helps you create most beautiful command-line + interfaces easily. The option parser is generated based on + the beautiful help message that you write yourself. This way + you don't need to write this stupid repeatable parser-code, + and instead can write only the help message-- the way you + want it. + + https://github.com/docopt/docopt diff --git a/package/python-docopt/python-docopt.mk b/package/python-docopt/python-docopt.mk new file mode 100644 index 0000000000..f87d2f85a6 --- /dev/null +++ b/package/python-docopt/python-docopt.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-docopt +# +################################################################################ + +PYTHON_DOCOPT_VERSION = 0.6.2 +PYTHON_DOCOPT_SITE = $(call github,docopt,docopt,$(PYTHON_DOCOPT_VERSION)) +PYTHON_DOCOPT_LICENSE = MIT +PYTHON_DOCOPT_LICENSE_FILES = LICENSE-MIT +PYTHON_DOCOPT_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-dpkt/Config.in b/package/python-dpkt/Config.in new file mode 100644 index 0000000000..f1e4ddff15 --- /dev/null +++ b/package/python-dpkt/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_DPKT + bool "python-dpkt" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_ZLIB + help + Fast, simple packet creation / parsing, with definitions + for the basic TCP/IP protocols. + + http://code.google.com/p/dpkt/ diff --git a/package/python-dpkt/python-dpkt.mk b/package/python-dpkt/python-dpkt.mk new file mode 100644 index 0000000000..301550247b --- /dev/null +++ b/package/python-dpkt/python-dpkt.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-dpkt +# +################################################################################ + +PYTHON_DPKT_VERSION = 1.8.r98 +PYTHON_DPKT_SITE = $(call github,kbandla,dpkt,$(PYTHON_DPKT_VERSION)) +PYTHON_DPKT_SETUP_TYPE = distutils +PYTHON_DPKT_LICENSE = BSD-3c +PYTHON_DPKT_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-ecdsa/Config.in b/package/python-ecdsa/Config.in new file mode 100644 index 0000000000..ce11910e8b --- /dev/null +++ b/package/python-ecdsa/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_ECDSA + bool "python-ecdsa" + help + ECDSA cryptographic signature library (pure python). + + http://github.com/warner/python-ecdsa diff --git a/package/python-ecdsa/python-ecdsa.hash b/package/python-ecdsa/python-ecdsa.hash new file mode 100644 index 0000000000..b4bd70638d --- /dev/null +++ b/package/python-ecdsa/python-ecdsa.hash @@ -0,0 +1,4 @@ +# md5 from https://pypi.python.org/pypi/ecdsa/json +md5 1f60eda9cb5c46722856db41a3ae6670 ecdsa-0.13.tar.gz +# sha256 calculated by scanpypi +sha256 64cf1ee26d1cde3c73c6d7d107f835fed7c6a2904aef9eac223d57ad800c43fa ecdsa-0.13.tar.gz diff --git a/package/python-ecdsa/python-ecdsa.mk b/package/python-ecdsa/python-ecdsa.mk new file mode 100644 index 0000000000..75b0634e14 --- /dev/null +++ b/package/python-ecdsa/python-ecdsa.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-ecdsa +# +################################################################################ + +PYTHON_ECDSA_VERSION = 0.13 +PYTHON_ECDSA_SOURCE = ecdsa-$(PYTHON_ECDSA_VERSION).tar.gz +PYTHON_ECDSA_SITE = https://pypi.python.org/packages/source/e/ecdsa +PYTHON_ECDSA_SETUP_TYPE = setuptools +PYTHON_ECDSA_LICENSE = MIT +PYTHON_ECDSA_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-enum/Config.in b/package/python-enum/Config.in new file mode 100644 index 0000000000..e26ae8bf97 --- /dev/null +++ b/package/python-enum/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PYTHON_ENUM + bool "python-enum" + depends on BR2_PACKAGE_PYTHON + help + Robust enumerated type support in Python + + An enumeration object is an immutable sequence object built + from a sequence of strings. Each value is also available as + an attribute. Such values are constant. Comparisons and + enumeration are supported. + + https://pypi.python.org/pypi/enum diff --git a/package/python-enum/python-enum.hash b/package/python-enum/python-enum.hash new file mode 100644 index 0000000000..c7c1924abe --- /dev/null +++ b/package/python-enum/python-enum.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=ce75c7c3c86741175a84456cc5bd531e, sha256 locally computed +md5 ce75c7c3c86741175a84456cc5bd531e enum-0.4.4.tar.gz +sha256 9bdfacf543baf2350df7613eb37f598a802f346985ca0dc1548be6494140fdff enum-0.4.4.tar.gz diff --git a/package/python-enum/python-enum.mk b/package/python-enum/python-enum.mk new file mode 100644 index 0000000000..0131be3f9f --- /dev/null +++ b/package/python-enum/python-enum.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-enum +# +################################################################################ + +PYTHON_ENUM_VERSION = 0.4.4 +PYTHON_ENUM_SOURCE = enum-$(PYTHON_ENUM_VERSION).tar.gz +PYTHON_ENUM_SITE = http://pypi.python.org/packages/source/e/enum +PYTHON_ENUM_SETUP_TYPE = setuptools +PYTHON_ENUM_LICENSE = GPLv2+ or Python software foundation license v2 +PYTHON_ENUM_LICENSE_FILES = LICENSE.GPL LICENSE.PSF + +$(eval $(python-package)) diff --git a/package/python-enum34/Config.in b/package/python-enum34/Config.in new file mode 100644 index 0000000000..2511a350e0 --- /dev/null +++ b/package/python-enum34/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PYTHON_ENUM34 + bool "python-enum34" + depends on BR2_PACKAGE_PYTHON + help + Python 3.4 Enum backported to 2.x. + + An enumeration is a set of symbolic names (members) bound to + unique, constant values. Within an enumeration, the members + can be compared by identity, and the enumeration itself can + be iterated over. + + https://pypi.python.org/pypi/enum34 diff --git a/package/python-enum34/python-enum34.hash b/package/python-enum34/python-enum34.hash new file mode 100644 index 0000000000..dd6ce3408d --- /dev/null +++ b/package/python-enum34/python-enum34.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=ac80f432ac9373e7d162834b264034b6, sha256 locally computed +md5 ac80f432ac9373e7d162834b264034b6 enum34-1.0.4.tar.gz +sha256 d3c19f26a6a34629c18c775f59dfc5dd595764c722b57a2da56ebfb69b94e447 enum34-1.0.4.tar.gz diff --git a/package/python-enum34/python-enum34.mk b/package/python-enum34/python-enum34.mk new file mode 100644 index 0000000000..13c529d2f9 --- /dev/null +++ b/package/python-enum34/python-enum34.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-enum34 +# +################################################################################ + +PYTHON_ENUM34_VERSION = 1.0.4 +PYTHON_ENUM34_SOURCE = enum34-$(PYTHON_ENUM34_VERSION).tar.gz +PYTHON_ENUM34_SITE = http://pypi.python.org/packages/source/e/enum34 +PYTHON_ENUM34_SETUP_TYPE = distutils +PYTHON_ENUM34_LICENSE = BSD-3c +PYTHON_ENUM34_LICENSE_FILES = enum/LICENSE + +$(eval $(python-package)) diff --git a/package/python-flask/Config.in b/package/python-flask/Config.in new file mode 100644 index 0000000000..4a955c4585 --- /dev/null +++ b/package/python-flask/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_FLASK + bool "python-flask" + select BR2_PACKAGE_PYTHON_WERKZEUG + select BR2_PACKAGE_PYTHON_JINJA2 + select BR2_PACKAGE_PYTHON_ITSDANGEROUS + help + Flask is a microframework for Python based on Werkzeug, + Jinja 2 and good intentions. + + http://flask.pocoo.org/ diff --git a/package/python-flask/python-flask.hash b/package/python-flask/python-flask.hash new file mode 100644 index 0000000000..55d0a5c584 --- /dev/null +++ b/package/python-flask/python-flask.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=378670fe456957eb3c27ddaef60b2b24, sha256 locally computed +md5 378670fe456957eb3c27ddaef60b2b24 Flask-0.10.1.tar.gz +sha256 4c83829ff83d408b5e1d4995472265411d2c414112298f2eb4b359d9e4563373 Flask-0.10.1.tar.gz diff --git a/package/python-flask/python-flask.mk b/package/python-flask/python-flask.mk new file mode 100644 index 0000000000..8aa675e2fb --- /dev/null +++ b/package/python-flask/python-flask.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-flask +# +################################################################################ + +PYTHON_FLASK_VERSION = 0.10.1 +PYTHON_FLASK_SOURCE = Flask-$(PYTHON_FLASK_VERSION).tar.gz +PYTHON_FLASK_SITE = http://pypi.python.org/packages/source/F/Flask +PYTHON_FLASK_SETUP_TYPE = setuptools +PYTHON_FLASK_LICENSE = BSD-3c +PYTHON_FLASK_LICENSE_FILES = LICENSE +PYTHON_FLASK_DEPENDENCIES = python-werkzeug python-jinja2 python-itsdangerous + +$(eval $(python-package)) diff --git a/package/python-flup/Config.in b/package/python-flup/Config.in new file mode 100644 index 0000000000..2c21323515 --- /dev/null +++ b/package/python-flup/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_FLUP + bool "python-flup" + depends on BR2_PACKAGE_PYTHON + help + flup provides of a collection of WSGI modules for Python. + It allows a webserver to use scgi-mod and fastcgi-mod + with python. + + https://pypi.python.org/pypi/flup diff --git a/package/python-flup/python-flup.hash b/package/python-flup/python-flup.hash new file mode 100644 index 0000000000..50a0381d3b --- /dev/null +++ b/package/python-flup/python-flup.hash @@ -0,0 +1,4 @@ +# From https://pypi.python.org/pypi/flup/1.0.3.dev-20110405 +md5 a005b072d144fc0e44b0fa4c5a9ba029 flup-1.0.3.dev-20110405.tar.gz +# Calculated based on the hash above +sha256 6649cf41854ea8782c795cdde64fdf79a90db821533d3652f91d21b0a7f39c79 flup-1.0.3.dev-20110405.tar.gz diff --git a/package/python-flup/python-flup.mk b/package/python-flup/python-flup.mk new file mode 100644 index 0000000000..5e612bb357 --- /dev/null +++ b/package/python-flup/python-flup.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-flup +# +################################################################################ + +PYTHON_FLUP_VERSION = 1.0.3.dev-20110405 +PYTHON_FLUP_SOURCE = flup-$(PYTHON_FLUP_VERSION).tar.gz +PYTHON_FLUP_SITE = http://pypi.python.org/packages/source/f/flup + +PYTHON_FLUP_LICENSE = BSD-2c, MIT + +PYTHON_FLUP_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-gobject/0001-add-PYTHON_INCLUDES-override.patch b/package/python-gobject/0001-add-PYTHON_INCLUDES-override.patch new file mode 100644 index 0000000000..d883f60ddf --- /dev/null +++ b/package/python-gobject/0001-add-PYTHON_INCLUDES-override.patch @@ -0,0 +1,32 @@ +[PATCH] m4/python.m4: add PYTHON_INCLUDES override for cross compilation + +As the configure script mixes up host/target python. Equivalent to the +similar code in dbus-python. + +Signed-off-by: Peter Korsgaard +--- + m4/python.m4 | 4 ++++ + 1 file changed, 4 insertions(+) + +Index: python-gobject-2.28.6/m4/python.m4 +=================================================================== +--- python-gobject-2.28.6.orig/m4/python.m4 ++++ python-gobject-2.28.6/m4/python.m4 +@@ -43,6 +43,9 @@ + [AC_REQUIRE([AM_PATH_PYTHON]) + AC_MSG_CHECKING(for headers required to compile python extensions) + dnl deduce PYTHON_INCLUDES ++if test "${PYTHON_INCLUDES+set}" = set; then ++ AC_MSG_NOTICE([PYTHON_INCLUDES overridden to: $PYTHON_INCLUDES]) ++else + py_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.prefix)"` + py_exec_prefix=`$PYTHON -c "import sys; sys.stdout.write(sys.exec_prefix)"` + PYTHON_CONFIG=`which $PYTHON`-config +@@ -54,6 +57,7 @@ + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" + fi + fi ++fi + AC_SUBST(PYTHON_INCLUDES) + dnl check if the headers exist: + save_CPPFLAGS="$CPPFLAGS" diff --git a/package/python-gobject/Config.in b/package/python-gobject/Config.in new file mode 100644 index 0000000000..475ff25185 --- /dev/null +++ b/package/python-gobject/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_GOBJECT + bool "python-gobject" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + select BR2_PACKAGE_LIBGLIB2 + help + Python bindings for the GLib/GObject library + + https://wiki.gnome.org/action/show/Projects/PyGObject + +comment "python-gobject needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/python-gobject/python-gobject.hash b/package/python-gobject/python-gobject.hash new file mode 100644 index 0000000000..024419e965 --- /dev/null +++ b/package/python-gobject/python-gobject.hash @@ -0,0 +1,2 @@ +# from http://ftp.gnome.org/pub/GNOME/sources/pygobject/2.28/pygobject-2.28.6.sha256sum +sha256 fb8a1d4f665130a125011659bd347c7339c944232163dbb9a34fd0686577adb8 pygobject-2.28.6.tar.xz diff --git a/package/python-gobject/python-gobject.mk b/package/python-gobject/python-gobject.mk new file mode 100644 index 0000000000..74cb0540cc --- /dev/null +++ b/package/python-gobject/python-gobject.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# python-gobject +# +################################################################################ + +PYTHON_GOBJECT_VERSION_MAJOR = 2.28 +PYTHON_GOBJECT_VERSION = $(PYTHON_GOBJECT_VERSION_MAJOR).6 +PYTHON_GOBJECT_SOURCE = pygobject-$(PYTHON_GOBJECT_VERSION).tar.xz +PYTHON_GOBJECT_SITE = http://ftp.gnome.org/pub/gnome/sources/pygobject/$(PYTHON_GOBJECT_VERSION_MAJOR) +PYTHON_GOBJECT_LICENSE = LGPLv2.1+ +PYTHON_GOBJECT_LICENSE_FILES = COPYING +PYTHON_GOBJECT_DEPENDENCIES = host-pkgconf libglib2 +PYTHON_GOBJECT_CONF_OPTS = --disable-introspection +# for 0001-add-PYTHON_INCLUDES-override.patch +PYTHON_GOBJECT_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_PYTHON),y) +PYTHON_GOBJECT_DEPENDENCIES += python host-python + +PYTHON_GOBJECT_CONF_ENV = \ + PYTHON=$(HOST_DIR)/usr/bin/python2 \ + PYTHON_INCLUDES="`$(STAGING_DIR)/usr/bin/python2-config --includes`" +else +PYTHON_GOBJECT_DEPENDENCIES += python3 host-python3 + +PYTHON_GOBJECT_CONF_ENV = \ + PYTHON=$(HOST_DIR)/usr/bin/python3 \ + PYTHON_INCLUDES="`$(STAGING_DIR)/usr/bin/python3-config --includes`" +endif + +ifeq ($(BR2_PACKAGE_LIBFFI),y) +PYTHON_GOBJECT_CONF_OPTS += --with-ffi +PYTHON_GOBJECT_DEPENDENCIES += libffi +else +PYTHON_GOBJECT_CONF_OPTS += --without-ffi +endif + +$(eval $(autotools-package)) diff --git a/package/python-html5lib/Config.in b/package/python-html5lib/Config.in new file mode 100644 index 0000000000..c3e9f2a859 --- /dev/null +++ b/package/python-html5lib/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_HTML5LIB + bool "python-html5lib" + help + HTML parser based on the WHATWG HTML specification. + + https://github.com/html5lib/html5lib-python diff --git a/package/python-html5lib/python-html5lib.hash b/package/python-html5lib/python-html5lib.hash new file mode 100644 index 0000000000..0ec712a1e5 --- /dev/null +++ b/package/python-html5lib/python-html5lib.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=ef43cb05e9e799f25d65d1135838a96f, sha256 locally computed +md5 ef43cb05e9e799f25d65d1135838a96f html5lib-0.9999999.tar.gz +sha256 2612a191a8d5842bfa057e41ba50bbb9dcb722419d2408c78cff4758d0754868 html5lib-0.9999999.tar.gz diff --git a/package/python-html5lib/python-html5lib.mk b/package/python-html5lib/python-html5lib.mk new file mode 100644 index 0000000000..93eef9a617 --- /dev/null +++ b/package/python-html5lib/python-html5lib.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-html5lib +# +################################################################################ + +PYTHON_HTML5LIB_VERSION = 0.9999999 +PYTHON_HTML5LIB_SOURCE = html5lib-$(PYTHON_HTML5LIB_VERSION).tar.gz +PYTHON_HTML5LIB_SITE = https://pypi.python.org/packages/source/h/html5lib +PYTHON_HTML5LIB_LICENSE = MIT +PYTHON_HTML5LIB_LICENSE_FILES = LICENSE +PYTHON_HTML5LIB_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-httplib2/Config.in b/package/python-httplib2/Config.in new file mode 100644 index 0000000000..e42f5132b7 --- /dev/null +++ b/package/python-httplib2/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PYTHON_HTTPLIB2 + bool "python-httplib2" + select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_SSL if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON3_SSL if BR2_PACKAGE_PYTHON3 + help + httplib2 is a comprehensive HTTP client library, httplib2.py + supports many features left out of other HTTP libraries. + + https://pypi.python.org/pypi/httplib2 diff --git a/package/python-httplib2/python-httplib2.hash b/package/python-httplib2/python-httplib2.hash new file mode 100644 index 0000000000..879f18b9d2 --- /dev/null +++ b/package/python-httplib2/python-httplib2.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=bd1b1445b3b2dfa7276b09b1a07b7f0e, sha256 locally computed +md5 bd1b1445b3b2dfa7276b09b1a07b7f0e httplib2-0.9.2.tar.gz +sha256 c3aba1c9539711551f4d83e857b316b5134a1c4ddce98a875b7027be7dd6d988 httplib2-0.9.2.tar.gz diff --git a/package/python-httplib2/python-httplib2.mk b/package/python-httplib2/python-httplib2.mk new file mode 100644 index 0000000000..adeddd33b2 --- /dev/null +++ b/package/python-httplib2/python-httplib2.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-httplib2 +# +################################################################################ + +PYTHON_HTTPLIB2_VERSION = 0.9.2 +PYTHON_HTTPLIB2_SOURCE = httplib2-$(PYTHON_HTTPLIB2_VERSION).tar.gz +PYTHON_HTTPLIB2_SITE = http://pypi.python.org/packages/source/h/httplib2 +PYTHON_HTTPLIB2_SETUP_TYPE = setuptools +PYTHON_HTTPLIB2_LICENSE = MIT +PYTHON_HTTPLIB2_LICENSE_FILES = PKG-INFO + +$(eval $(python-package)) diff --git a/package/python-id3/Config.in b/package/python-id3/Config.in new file mode 100644 index 0000000000..6ddfd541bd --- /dev/null +++ b/package/python-id3/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_ID3 + bool "python-id3" + depends on BR2_PACKAGE_PYTHON + help + This module allows one to read and manipulate so-called ID3 + informational tags on MP3 files through an object-oriented + Python interface. + + http://id3-py.sourceforge.net/ diff --git a/package/python-id3/python-id3.hash b/package/python-id3/python-id3.hash new file mode 100644 index 0000000000..28b58e8954 --- /dev/null +++ b/package/python-id3/python-id3.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 ba612342b59a49cbf9a7eb23a646667757ffda96dc23b67245fc6cd8d90c2022 id3-py_1.2.tar.gz diff --git a/package/python-id3/python-id3.mk b/package/python-id3/python-id3.mk new file mode 100644 index 0000000000..157576e6c8 --- /dev/null +++ b/package/python-id3/python-id3.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-id3 +# +################################################################################ + +PYTHON_ID3_VERSION = 1.2 +PYTHON_ID3_SOURCE = id3-py_$(PYTHON_ID3_VERSION).tar.gz +PYTHON_ID3_SITE = http://downloads.sourceforge.net/project/id3-py/id3-py/$(PYTHON_ID3_VERSION) +PYTHON_ID3_SETUP_TYPE = distutils +PYTHON_ID3_LICENSE = GPLv2+ +PYTHON_ID3_LICENSE_FILES = COPYING + +$(eval $(python-package)) diff --git a/package/python-idna/Config.in b/package/python-idna/Config.in new file mode 100644 index 0000000000..4ff4581d53 --- /dev/null +++ b/package/python-idna/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_IDNA + bool "python-idna" + help + A library to support the Internationalised Domain Names in + Applications (IDNA) protocol as specified in RFC 5891. This + version of the protocol is often referred to as “IDNA2008†+ and can produce different results from the earlier standard + from 2003. + + https://github.com/kjd/idna diff --git a/package/python-idna/python-idna.hash b/package/python-idna/python-idna.hash new file mode 100644 index 0000000000..4e4c6771bf --- /dev/null +++ b/package/python-idna/python-idna.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=f6473caa9c5e0cc1ad3fd5d04c3c114b, sha256 locally computed +md5 f6473caa9c5e0cc1ad3fd5d04c3c114b idna-2.1.tar.gz +sha256 ed36f281aebf3cd0797f163bb165d84c31507cedd15928b095b1675e2d04c676 idna-2.1.tar.gz diff --git a/package/python-idna/python-idna.mk b/package/python-idna/python-idna.mk new file mode 100644 index 0000000000..3f9f109372 --- /dev/null +++ b/package/python-idna/python-idna.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-idna +# +################################################################################ + +PYTHON_IDNA_VERSION = 2.1 +PYTHON_IDNA_SOURCE = idna-$(PYTHON_IDNA_VERSION).tar.gz +PYTHON_IDNA_SITE = https://pypi.python.org/packages/source/i/idna +PYTHON_IDNA_LICENSE = BSD-3c +PYTHON_IDNA_LICENSE_FILES = LICENSE.rst +PYTHON_IDNA_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-iniparse/Config.in b/package/python-iniparse/Config.in new file mode 100644 index 0000000000..65c1064927 --- /dev/null +++ b/package/python-iniparse/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PYTHON_INIPARSE + bool "python-iniparse" + depends on BR2_PACKAGE_PYTHON + help + iniparse is an INI parser for Python which is API compatible + with the standard library's ConfigParser, preserves + structure of INI files (order of sections & options, + indentation, comments, and blank lines are preserved when + data is updated), and is more convenient to use. + + https://pypi.python.org/pypi/iniparse diff --git a/package/python-iniparse/python-iniparse.hash b/package/python-iniparse/python-iniparse.hash new file mode 100644 index 0000000000..d7d8e9336d --- /dev/null +++ b/package/python-iniparse/python-iniparse.hash @@ -0,0 +1,4 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=5e573e9e9733d97623881ce9bbe5eca6, sha256 locally computed +md5 5e573e9e9733d97623881ce9bbe5eca6 iniparse-0.4.tar.gz +sha256 abc1ee12d2cfb2506109072d6c21e40b6c75a3fe90a9c924327d80bc0d99c054 iniparse-0.4.tar.gz + diff --git a/package/python-iniparse/python-iniparse.mk b/package/python-iniparse/python-iniparse.mk new file mode 100644 index 0000000000..b00e0c4ae1 --- /dev/null +++ b/package/python-iniparse/python-iniparse.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-iniparse +# +################################################################################ + +PYTHON_INIPARSE_VERSION = 0.4 +PYTHON_INIPARSE_SOURCE = iniparse-$(PYTHON_INIPARSE_VERSION).tar.gz +PYTHON_INIPARSE_SITE = https://pypi.python.org/packages/source/i/iniparse +PYTHON_INIPARSE_LICENSE = Python software foundation license v2, MIT +PYTHON_INIPARSE_LICENSE_FILES = LICENSE-PSF LICENSE +PYTHON_INIPARSE_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-iowait/Config.in b/package/python-iowait/Config.in new file mode 100644 index 0000000000..ebe96db13d --- /dev/null +++ b/package/python-iowait/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_IOWAIT + bool "python-iowait" + help + Platform-independent module for I/O completion events. + + https://launchpad.net/python-iowait diff --git a/package/python-iowait/python-iowait.hash b/package/python-iowait/python-iowait.hash new file mode 100644 index 0000000000..67dac15f4a --- /dev/null +++ b/package/python-iowait/python-iowait.hash @@ -0,0 +1,4 @@ +# md5 from https://pypi.python.org/pypi/iowait/json +md5 f49ca7766fe4a67e03a731e575614f87 iowait-0.2.tar.gz +# sha256 calculated by scanpypi +sha256 ab1bc2eb84c22ccf61f17a0024f9fb6df781b39f1852764a66a7769d5adfb299 iowait-0.2.tar.gz diff --git a/package/python-iowait/python-iowait.mk b/package/python-iowait/python-iowait.mk new file mode 100644 index 0000000000..99c292287b --- /dev/null +++ b/package/python-iowait/python-iowait.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-iowait +# +################################################################################ + +PYTHON_IOWAIT_VERSION = 0.2 +PYTHON_IOWAIT_SOURCE = iowait-$(PYTHON_IOWAIT_VERSION).tar.gz +PYTHON_IOWAIT_SITE = https://pypi.python.org/packages/65/30/e953673fe9619938e9c74408401cf865f37716da89f61f6e5d9328c0f71e +PYTHON_IOWAIT_SETUP_TYPE = distutils +PYTHON_IOWAIT_LICENSE = LGPLv3+ +PYTHON_IOWAIT_LICENSE_FILES = COPYING.LESSER + +$(eval $(python-package)) diff --git a/package/python-ipaddr/Config.in b/package/python-ipaddr/Config.in new file mode 100644 index 0000000000..746d720d86 --- /dev/null +++ b/package/python-ipaddr/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_IPADDR + depends on BR2_PACKAGE_PYTHON # included since python3.3 + bool "python-ipaddr" + help + An IPv4/IPv6 manipulation library in Python. This library is + used to create/poke/manipulate IPv4 and IPv6 addresses and + prefixes. + + https://code.google.com/p/ipaddr-py/ diff --git a/package/python-ipaddr/python-ipaddr.hash b/package/python-ipaddr/python-ipaddr.hash new file mode 100644 index 0000000000..99e1ca9415 --- /dev/null +++ b/package/python-ipaddr/python-ipaddr.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=f2c7852f95862715f92e7d089dc3f2cf, sha256 locally computed +md5 f2c7852f95862715f92e7d089dc3f2cf ipaddr-2.1.11.tar.gz +sha256 1b555b8a8800134fdafe32b7d0cb52f5bdbfdd093707c3dd484c5ea59f1d98b7 ipaddr-2.1.11.tar.gz diff --git a/package/python-ipaddr/python-ipaddr.mk b/package/python-ipaddr/python-ipaddr.mk new file mode 100644 index 0000000000..8bfb543791 --- /dev/null +++ b/package/python-ipaddr/python-ipaddr.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-ipaddr +# +################################################################################ + +PYTHON_IPADDR_VERSION = 2.1.11 +PYTHON_IPADDR_SOURCE = ipaddr-$(PYTHON_IPADDR_VERSION).tar.gz +PYTHON_IPADDR_SITE = http://pypi.python.org/packages/source/i/ipaddr +PYTHON_IPADDR_SETUP_TYPE = distutils +PYTHON_IPADDR_LICENSE = Apache-2.0 +PYTHON_IPADDR_LICENSE_FILES = COPYING + +$(eval $(python-package)) diff --git a/package/python-ipaddress/Config.in b/package/python-ipaddress/Config.in new file mode 100644 index 0000000000..b2b9f0b1c3 --- /dev/null +++ b/package/python-ipaddress/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_IPADDRESS + bool "python-ipaddress" + depends on BR2_PACKAGE_PYTHON + help + Python 3.3's ipaddress for older Python versions. + + https://github.com/phihag/ipaddress diff --git a/package/python-ipaddress/python-ipaddress.hash b/package/python-ipaddress/python-ipaddress.hash new file mode 100644 index 0000000000..21bc37318a --- /dev/null +++ b/package/python-ipaddress/python-ipaddress.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=12915e923b738107e47827478d553ba1, sha256 locally computed +md5 12915e923b738107e47827478d553ba1 ipaddress-1.0.15.tar.gz +sha256 af6c85cfc9cdb12b861655e6b9f2f59618bf3088cbde858727b2c0a98e9f6636 ipaddress-1.0.15.tar.gz diff --git a/package/python-ipaddress/python-ipaddress.mk b/package/python-ipaddress/python-ipaddress.mk new file mode 100644 index 0000000000..8019aa8a88 --- /dev/null +++ b/package/python-ipaddress/python-ipaddress.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-ipaddress +# +################################################################################ + +PYTHON_IPADDRESS_VERSION = 1.0.15 +PYTHON_IPADDRESS_SOURCE = ipaddress-$(PYTHON_IPADDRESS_VERSION).tar.gz +PYTHON_IPADDRESS_SITE = https://pypi.python.org/packages/source/i/ipaddress +PYTHON_IPADDRESS_LICENSE = Python software foundation license +PYTHON_IPADDRESS_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-ipy/Config.in b/package/python-ipy/Config.in new file mode 100644 index 0000000000..bead932da8 --- /dev/null +++ b/package/python-ipy/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_IPY + bool "python-ipy" + depends on BR2_PACKAGE_PYTHON + help + IPy - class and tools for handling of IPv4 and + IPv6 addresses and networks. + + https://github.com/haypo/python-ipy/ diff --git a/package/python-ipy/python-ipy.mk b/package/python-ipy/python-ipy.mk new file mode 100644 index 0000000000..6773aafe44 --- /dev/null +++ b/package/python-ipy/python-ipy.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-ipy +# +################################################################################ + +PYTHON_IPY_VERSION = IPy-0.82a +PYTHON_IPY_SITE = $(call github,haypo,python-ipy,$(PYTHON_IPY_VERSION)) +PYTHON_IPY_LICENSE = BSD-3c +PYTHON_IPY_LICENSE_FILES = COPYING +PYTHON_IPY_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-ipython/0001-set-correct-python-executable-path.patch b/package/python-ipython/0001-set-correct-python-executable-path.patch new file mode 100644 index 0000000000..0fbd5a1c8e --- /dev/null +++ b/package/python-ipython/0001-set-correct-python-executable-path.patch @@ -0,0 +1,15 @@ +Set correct Python executable path + +Signed-off-by: Philippe Proulx + +--- python-ipython-2.1.0/setupbase.py 2014-05-21 15:19:12.000000000 -0400 ++++ python-ipython-2.1.0-new/setupbase.py 2014-07-23 23:34:32.892030423 -0400 +@@ -394,7 +394,7 @@ class build_scripts_entrypt(build_script + + mod, func = entrypt.split(':') + with open(outfile, 'w') as f: +- f.write(script_src.format(executable=sys.executable, ++ f.write(script_src.format(executable='/usr/bin/env python', + mod=mod, func=func)) + + return outfiles, outfiles diff --git a/package/python-ipython/Config.in b/package/python-ipython/Config.in new file mode 100644 index 0000000000..1d92873f82 --- /dev/null +++ b/package/python-ipython/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_IPYTHON + bool "python-ipython" + help + IPython is a command shell for interactive computing in multiple + programming languages, originally developed for the Python + programming language, that offers enhanced introspection, rich + media, additional shell syntax, tab completion, and rich history. + + http://ipython.org/ diff --git a/package/python-ipython/python-ipython.mk b/package/python-ipython/python-ipython.mk new file mode 100644 index 0000000000..236462a561 --- /dev/null +++ b/package/python-ipython/python-ipython.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-ipython +# +################################################################################ + +PYTHON_IPYTHON_VERSION = 2.1.0 +PYTHON_IPYTHON_SOURCE = ipython-$(PYTHON_IPYTHON_VERSION).tar.gz +PYTHON_IPYTHON_SITE = https://pypi.python.org/packages/source/i/ipython +PYTHON_IPYTHON_LICENSE = BSD-3c +PYTHON_IPYTHON_LICENSE_FILES = COPYING.rst +PYTHON_IPYTHON_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-itsdangerous/Config.in b/package/python-itsdangerous/Config.in new file mode 100644 index 0000000000..39ec0b7725 --- /dev/null +++ b/package/python-itsdangerous/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_ITSDANGEROUS + bool "python-itsdangerous" + select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime + help + Itsdangerous contains various helpers to pass data to + untrusted environments and to get it back safe and sound. + + http://pythonhosted.org/itsdangerous/ diff --git a/package/python-itsdangerous/python-itsdangerous.mk b/package/python-itsdangerous/python-itsdangerous.mk new file mode 100644 index 0000000000..8b055d6da6 --- /dev/null +++ b/package/python-itsdangerous/python-itsdangerous.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-itsdangerous +# +################################################################################ + +PYTHON_ITSDANGEROUS_VERSION = 0.24 +PYTHON_ITSDANGEROUS_SITE = $(call github,mitsuhiko,itsdangerous,$(PYTHON_ITSDANGEROUS_VERSION)) +PYTHON_ITSDANGEROUS_SETUP_TYPE = setuptools +PYTHON_ITSDANGEROUS_LICENSE = BSD-3c +PYTHON_ITSDANGEROUS_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-jinja2/Config.in b/package/python-jinja2/Config.in new file mode 100644 index 0000000000..a1900e94d5 --- /dev/null +++ b/package/python-jinja2/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_JINJA2 + bool "python-jinja2" + select BR2_PACKAGE_PYTHON_MARKUPSAFE # runtime + help + Jinja2 is a template engine written in pure Python. It + provides a Django inspired non-XML syntax but supports + inline expressions and an optional sandboxed environment. + + http://jinja.pocoo.org/ diff --git a/package/python-jinja2/python-jinja2.hash b/package/python-jinja2/python-jinja2.hash new file mode 100644 index 0000000000..04fcbc86c1 --- /dev/null +++ b/package/python-jinja2/python-jinja2.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=edb51693fe22c53cee5403775c71a99e, sha256 locally computed. +md5 edb51693fe22c53cee5403775c71a99e Jinja2-2.8.tar.gz +sha256 bc1ff2ff88dbfacefde4ddde471d1417d3b304e8df103a7a9437d47269201bf4 Jinja2-2.8.tar.gz diff --git a/package/python-jinja2/python-jinja2.mk b/package/python-jinja2/python-jinja2.mk new file mode 100644 index 0000000000..ce6e2b9c5f --- /dev/null +++ b/package/python-jinja2/python-jinja2.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# python-jinja2 +# +################################################################################ + +PYTHON_JINJA2_VERSION = 2.8 +PYTHON_JINJA2_SOURCE = Jinja2-$(PYTHON_JINJA2_VERSION).tar.gz +PYTHON_JINJA2_SITE = http://pypi.python.org/packages/source/J/Jinja2 +PYTHON_JINJA2_SETUP_TYPE = setuptools +PYTHON_JINJA2_LICENSE = BSD-3c +PYTHON_JINJA2_LICENSE_FILES = LICENSE +# In host build, setup.py tries to download markupsafe if it is not installed +HOST_PYTHON_JINJA2_DEPENDENCIES = host-python-markupsafe + +$(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/package/python-json-schema-validator/Config.in b/package/python-json-schema-validator/Config.in new file mode 100644 index 0000000000..6ae1eb162a --- /dev/null +++ b/package/python-json-schema-validator/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_JSON_SCHEMA_VALIDATOR + bool "python-json-schema-validator" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_VERSIONTOOLS + help + JSON Schema Validator + + https://pypi.python.org/pypi/json-schema-validator diff --git a/package/python-json-schema-validator/python-json-schema-validator.mk b/package/python-json-schema-validator/python-json-schema-validator.mk new file mode 100644 index 0000000000..0ff5554b74 --- /dev/null +++ b/package/python-json-schema-validator/python-json-schema-validator.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-json-schema-validator +# +################################################################################ + +PYTHON_JSON_SCHEMA_VALIDATOR_VERSION = 2.3 +PYTHON_JSON_SCHEMA_VALIDATOR_SOURCE = json-schema-validator-$(PYTHON_JSON_SCHEMA_VALIDATOR_VERSION).tar.gz +PYTHON_JSON_SCHEMA_VALIDATOR_SITE = http://pypi.python.org/packages/source/j/json-schema-validator +PYTHON_JSON_SCHEMA_VALIDATOR_LICENSE = LGPLv3 +PYTHON_JSON_SCHEMA_VALIDATOR_SETUP_TYPE = setuptools +PYTHON_JSON_SCHEMA_VALIDATOR_DEPENDENCIES = python-versiontools + +$(eval $(python-package)) diff --git a/package/python-keyring/Config.in b/package/python-keyring/Config.in new file mode 100644 index 0000000000..a6eacf52a5 --- /dev/null +++ b/package/python-keyring/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_KEYRING + bool "python-keyring" + depends on BR2_PACKAGE_PYTHON + help + The Python keyring lib provides a easy way to access the + system keyring service from Python. + + https://pypi.python.org/pypi/keyring diff --git a/package/python-keyring/python-keyring.mk b/package/python-keyring/python-keyring.mk new file mode 100644 index 0000000000..ef8b8af261 --- /dev/null +++ b/package/python-keyring/python-keyring.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# python-keyring +# +################################################################################ + +PYTHON_KEYRING_VERSION = 3.0.5 +PYTHON_KEYRING_SOURCE = keyring-$(PYTHON_KEYRING_VERSION).zip +PYTHON_KEYRING_SITE = http://pypi.python.org/packages/source/k/keyring +PYTHON_KEYRING_SETUP_TYPE = setuptools +PYTHON_KEYRING_LICENSE = python software foundation license + +define PYTHON_KEYRING_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(DL_DIR)/$(PYTHON_KEYRING_SOURCE) + mv $(@D)/keyring-$(PYTHON_KEYRING_VERSION)/* $(@D) + $(RM) -r $(@D)/keyring-$(PYTHON_KEYRING_VERSION) +endef + +$(eval $(python-package)) diff --git a/package/python-libconfig/Config.in b/package/python-libconfig/Config.in new file mode 100644 index 0000000000..b49aa268a8 --- /dev/null +++ b/package/python-libconfig/Config.in @@ -0,0 +1,22 @@ +comment "python-libconfig needs a toolchain w/ C++, threads" + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_PYTHON_LIBCONFIG + bool "python-libconfig" + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_PYTHON + select BR2_PACKAGE_LIBCONFIG + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + help + Python bindings to the C++ library libconfig + + Libconfig is a simple library for manipulating structured + configuration files. The file format is more compact and more + readable than XML. And unlike XML, it is type-aware, so it is + not necessary to do string parsing in application code. + http://www.hyperrealm.com/libconfig/ + + https://github.com/cnangel/python-libconfig diff --git a/package/python-libconfig/python-libconfig.mk b/package/python-libconfig/python-libconfig.mk new file mode 100644 index 0000000000..3f5984b665 --- /dev/null +++ b/package/python-libconfig/python-libconfig.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# python-libconfig +# +################################################################################ + +PYTHON_LIBCONFIG_VERSION = b271c3d9dac938ad5cd29b67bd08cc5536a5a391 +PYTHON_LIBCONFIG_SITE = $(call github,cnangel,python-libconfig,$(PYTHON_LIBCONFIG_VERSION)) + +PYTHON_LIBCONFIG_LICENSE = BSD +PYTHON_LIBCONFIG_LICENSE_FILES = README + +PYTHON_LIBCONFIG_SETUP_TYPE = setuptools + +PYTHON_LIBCONFIG_DEPENDENCIES = libconfig boost + +$(eval $(python-package)) diff --git a/package/python-lmdb/Config.in b/package/python-lmdb/Config.in new file mode 100644 index 0000000000..baf9bce5ac --- /dev/null +++ b/package/python-lmdb/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_LMDB + bool "python-lmdb" + select BR2_PACKAGE_PYTHON_CFFI # runtime + help + Universal Python binding for the LMDB 'Lightning' Database. + + https://pypi.python.org/pypi/lmdb diff --git a/package/python-lmdb/python-lmdb.hash b/package/python-lmdb/python-lmdb.hash new file mode 100644 index 0000000000..7c2946044d --- /dev/null +++ b/package/python-lmdb/python-lmdb.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 abd2b2ae9ecf2fd1e1bc55ef4e8463b5910722fcd70a1bbf34a3e669a74a41a4 python-lmdb-py-lmdb_0.89.tar.gz diff --git a/package/python-lmdb/python-lmdb.mk b/package/python-lmdb/python-lmdb.mk new file mode 100644 index 0000000000..62fb0465b1 --- /dev/null +++ b/package/python-lmdb/python-lmdb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-lmdb +# +################################################################################ + +PYTHON_LMDB_VERSION = py-lmdb_0.89 +PYTHON_LMDB_SITE = $(call github,dw,py-lmdb,$(PYTHON_LMDB_VERSION)) +PYTHON_LMDB_LICENSE = OLDAP-2.8 +PYTHON_LMDB_LICENSE_FILES = LICENSE +PYTHON_LMDB_SETUP_TYPE = setuptools +PYTHON_LMDB_DEPENDENCIES = host-python-cffi + +$(eval $(python-package)) diff --git a/package/python-lxml/Config.in b/package/python-lxml/Config.in new file mode 100644 index 0000000000..1ccaa5e387 --- /dev/null +++ b/package/python-lxml/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_LXML + bool "python-lxml" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBXSLT + select BR2_PACKAGE_ZLIB + help + The lxml XML toolkit is a Pythonic binding for the C libraries + libxml2 and libxslt. + + http://lxml.de/ diff --git a/package/python-lxml/python-lxml.hash b/package/python-lxml/python-lxml.hash new file mode 100644 index 0000000000..4cace8e02b --- /dev/null +++ b/package/python-lxml/python-lxml.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 9c74ca28a7f0c30dca8872281b3c47705e21217c8bc63912d95c9e2a7cac6bdf lxml-3.6.0.tgz diff --git a/package/python-lxml/python-lxml.mk b/package/python-lxml/python-lxml.mk new file mode 100644 index 0000000000..039fadd1c6 --- /dev/null +++ b/package/python-lxml/python-lxml.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# python-lxml +# +################################################################################ + +PYTHON_LXML_VERSION = 3.6.0 +PYTHON_LXML_SITE = http://lxml.de/files +PYTHON_LXML_SOURCE = lxml-$(PYTHON_LXML_VERSION).tgz + +# Not including the GPL, because it is used only for the test scripts. +PYTHON_LXML_LICENSE = BSD-3c, Others +PYTHON_LXML_LICENSE_FILES = \ + LICENSES.txt \ + doc/licenses/BSD.txt \ + doc/licenses/elementtree.txt \ + src/lxml/isoschematron/resources/rng/iso-schematron.rng + +# python-lxml can use either setuptools, or distutils as a fallback. +# So, we use setuptools. +PYTHON_LXML_SETUP_TYPE = setuptools + +PYTHON_LXML_DEPENDENCIES = libxml2 libxslt zlib + +# python-lxml needs these scripts in order to properly detect libxml2 and +# libxslt compiler and linker flags +PYTHON_LXML_BUILD_OPTS = \ + --with-xslt-config=$(STAGING_DIR)/usr/bin/xslt-config \ + --with-xml2-config=$(STAGING_DIR)/usr/bin/xml2-config + +$(eval $(python-package)) diff --git a/package/python-mad/Config.in b/package/python-mad/Config.in new file mode 100644 index 0000000000..25354213d6 --- /dev/null +++ b/package/python-mad/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_MAD + bool "python-mad" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_LIBMAD + help + python-mad is a Python binding for the MAD library, a + high-quality integer-only MPEG decoder. + + http://spacepants.org/src/pymad/ diff --git a/package/python-mad/python-mad.mk b/package/python-mad/python-mad.mk new file mode 100644 index 0000000000..5a49887a82 --- /dev/null +++ b/package/python-mad/python-mad.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# python-mad +# +################################################################################ + +PYTHON_MAD_VERSION = 0.6 +PYTHON_MAD_SOURCE = pymad-$(PYTHON_MAD_VERSION).tar.gz +PYTHON_MAD_SITE = http://spacepants.org/src/pymad/download +PYTHON_MAD_SETUP_TYPE = distutils +PYTHON_MAD_LICENSE = GPLv2+ +PYTHON_MAD_LICENSE_FILES = COPYING + +PYTHON_MAD_DEPENDENCIES = libmad + +ifeq ($(BR2_ENDIAN),"LITTLE") +PYTHON_MAD_ENDIAN = little +else +PYTHON_MAD_ENDIAN = big +endif + +define PYTHON_MAD_CONFIGURE_CMDS + echo "endian = $(PYTHON_MAD_ENDIAN)" > $(@D)/Setup + echo "mad_libs = mad" >> $(@D)/Setup + echo "mad_lib_dir = $(STAGING_DIR)/usr/lib" >> $(@D)/Setup + echo "mad_include_dir = $(STAGING_DIR)/usr/include" >> $(@D)/Setup +endef + +$(eval $(python-package)) diff --git a/package/python-mako/Config.in b/package/python-mako/Config.in new file mode 100644 index 0000000000..442e290efa --- /dev/null +++ b/package/python-mako/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_MAKO + bool "python-mako" + help + Mako is a template library written in Python. It provides a + familiar, non-XML syntax which compiles into Python modules + for maximum performance. + + https://pypi.python.org/pypi/Mako diff --git a/package/python-mako/python-mako.hash b/package/python-mako/python-mako.hash new file mode 100644 index 0000000000..374be1a1f7 --- /dev/null +++ b/package/python-mako/python-mako.hash @@ -0,0 +1,4 @@ +# From https://pypi.python.org/pypi/Mako/1.0.3 +md5 a78f20f6366a8a0659ce5532f8614e53 Mako-1.0.3.tar.gz +# Locally computed +sha256 7644bc0ee35965d2e146dde31827b8982ed70a58281085fac42869a09764d38c Mako-1.0.3.tar.gz diff --git a/package/python-mako/python-mako.mk b/package/python-mako/python-mako.mk new file mode 100644 index 0000000000..52679e0518 --- /dev/null +++ b/package/python-mako/python-mako.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# python-mako +# +################################################################################ + +PYTHON_MAKO_VERSION = 1.0.3 +PYTHON_MAKO_SOURCE = Mako-$(PYTHON_MAKO_VERSION).tar.gz +PYTHON_MAKO_SITE = https://pypi.python.org/packages/source/M/Mako +PYTHON_MAKO_SETUP_TYPE = setuptools +PYTHON_MAKO_LICENSE = MIT +PYTHON_MAKO_LICENSE_FILES = LICENSE + +# In host build, setup.py tries to download markupsafe if it is not installed +HOST_PYTHON_MAKO_DEPENDENCIES = host-python-markupsafe + +$(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/package/python-markdown/Config.in b/package/python-markdown/Config.in new file mode 100644 index 0000000000..6706684142 --- /dev/null +++ b/package/python-markdown/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_MARKDOWN + bool "python-markdown" + # runtime dependency on Python's xml module + select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 + help + This is a Python implementation of John Gruber's Markdown + + https://pypi.python.org/pypi/Markdown diff --git a/package/python-markdown/python-markdown.mk b/package/python-markdown/python-markdown.mk new file mode 100644 index 0000000000..3b2217ecaa --- /dev/null +++ b/package/python-markdown/python-markdown.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-markdown +# +################################################################################ + +PYTHON_MARKDOWN_VERSION = 2.5.2 +PYTHON_MARKDOWN_SOURCE = Markdown-$(PYTHON_MARKDOWN_VERSION).tar.gz +PYTHON_MARKDOWN_SITE = http://pypi.python.org/packages/source/M/Markdown +PYTHON_MARKDOWN_LICENSE = BSD-3c +PYTHON_MARKDOWN_LICENSE_FILES = LICENSE.md +PYTHON_MARKDOWN_SETUP_TYPE = distutils + +$(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/package/python-markupsafe/Config.in b/package/python-markupsafe/Config.in new file mode 100644 index 0000000000..48421e0a32 --- /dev/null +++ b/package/python-markupsafe/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_MARKUPSAFE + bool "python-markupsafe" + help + MarkupSafe implements a XML/HTML/XHTML Markup safe string + for Python. + + https://github.com/mitsuhiko/markupsafe diff --git a/package/python-markupsafe/python-markupsafe.hash b/package/python-markupsafe/python-markupsafe.hash new file mode 100644 index 0000000000..448252b0d0 --- /dev/null +++ b/package/python-markupsafe/python-markupsafe.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=f5ab3deee4c37cd6a922fb81e730da6e, sha256 locally computed +md5 f5ab3deee4c37cd6a922fb81e730da6e MarkupSafe-0.23.tar.gz +sha256 a4ec1aff59b95a14b45eb2e23761a0179e98319da5a7eb76b56ea8cdc7b871c3 MarkupSafe-0.23.tar.gz diff --git a/package/python-markupsafe/python-markupsafe.mk b/package/python-markupsafe/python-markupsafe.mk new file mode 100644 index 0000000000..c815728cd5 --- /dev/null +++ b/package/python-markupsafe/python-markupsafe.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-markupsafe +# +################################################################################ + +PYTHON_MARKUPSAFE_VERSION = 0.23 +PYTHON_MARKUPSAFE_SOURCE = MarkupSafe-$(PYTHON_MARKUPSAFE_VERSION).tar.gz +PYTHON_MARKUPSAFE_SITE = http://pypi.python.org/packages/source/M/MarkupSafe +PYTHON_MARKUPSAFE_SETUP_TYPE = setuptools +PYTHON_MARKUPSAFE_LICENSE = BSD-3c +PYTHON_MARKUPSAFE_LICENSE_FILES = LICENSE + +$(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/package/python-meld3/Config.in b/package/python-meld3/Config.in new file mode 100644 index 0000000000..8dee723e02 --- /dev/null +++ b/package/python-meld3/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_MELD3 + bool "python-meld3" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_PYEXPAT + help + A HTML/XML templating system. + + https://github.com/supervisor/meld3 diff --git a/package/python-meld3/python-meld3.mk b/package/python-meld3/python-meld3.mk new file mode 100644 index 0000000000..3c8acbc78e --- /dev/null +++ b/package/python-meld3/python-meld3.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-meld3 +# +################################################################################ + +PYTHON_MELD3_VERSION = 0.6.8 +PYTHON_MELD3_SOURCE = meld3-$(PYTHON_MELD3_VERSION).tar.gz +PYTHON_MELD3_SITE = http://pypi.python.org/packages/source/m/meld3 +PYTHON_MELD3_LICENSE = ZPLv2.1 +PYTHON_MELD3_LICENSE_FILES = COPYRIGHT.txt LICENSE.txt +PYTHON_MELD3_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-mistune/Config.in b/package/python-mistune/Config.in new file mode 100644 index 0000000000..e62689d0a7 --- /dev/null +++ b/package/python-mistune/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_MISTUNE + bool "python-mistune" + help + The fastest markdown parser in pure Python with renderer + features, inspired by marked. + + https://pypi.python.org/pypi/mistune diff --git a/package/python-mistune/python-mistune.hash b/package/python-mistune/python-mistune.hash new file mode 100644 index 0000000000..85096069c6 --- /dev/null +++ b/package/python-mistune/python-mistune.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=ed9ac03c99261bd1803e44ddaa4f87cb, sha256 locally computed. +md5 ed9ac03c99261bd1803e44ddaa4f87cb mistune-0.7.2.tar.gz +sha256 626f2516adcde4af608eaf83635ff20ff7e577c1898ad4d0f0fcd8c094399840 mistune-0.7.2.tar.gz diff --git a/package/python-mistune/python-mistune.mk b/package/python-mistune/python-mistune.mk new file mode 100644 index 0000000000..f0301a7ecf --- /dev/null +++ b/package/python-mistune/python-mistune.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-mistune +# +################################################################################ + +PYTHON_MISTUNE_VERSION = 0.7.2 +PYTHON_MISTUNE_SOURCE = mistune-$(PYTHON_MISTUNE_VERSION).tar.gz +PYTHON_MISTUNE_SITE = http://pypi.python.org/packages/source/m/mistune +PYTHON_MISTUNE_LICENSE = BSD-3c +PYTHON_MISTUNE_LICENSE_FILES = LICENSE +PYTHON_MISTUNE_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-msgpack/Config.in b/package/python-msgpack/Config.in new file mode 100644 index 0000000000..7dfe8e81f1 --- /dev/null +++ b/package/python-msgpack/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_PYTHON_MSGPACK + bool "python-msgpack" + select BR2_PACKAGE_MSGPACK + depends on BR2_INSTALL_LIBSTDCPP # msgpack + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # msgpack + help + MessagePack (http://msgpack.org/) is a fast, compact binary + serialization format, suitable for similar data to JSON. + This package provides CPython bindings for reading and + writing MessagePack data. + + https://pypi.python.org/pypi/msgpack-python/ + +comment "python-msgpack needs a toolchain w/ C++" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-msgpack/python-msgpack.hash b/package/python-msgpack/python-msgpack.hash new file mode 100644 index 0000000000..636aa905e2 --- /dev/null +++ b/package/python-msgpack/python-msgpack.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=eb2aad1081534ef3a9f32a0ecd350b9b, sha356 locally computed. +md5 eb2aad1081534ef3a9f32a0ecd350b9b msgpack-python-0.4.7.tar.gz +sha256 5e001229a54180a02dcdd59db23c9978351af55b1290c27bc549e381f43acd6b msgpack-python-0.4.7.tar.gz diff --git a/package/python-msgpack/python-msgpack.mk b/package/python-msgpack/python-msgpack.mk new file mode 100644 index 0000000000..344b7bf150 --- /dev/null +++ b/package/python-msgpack/python-msgpack.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-msgpack +# +################################################################################ + +PYTHON_MSGPACK_VERSION = 0.4.7 +PYTHON_MSGPACK_SOURCE = msgpack-python-$(PYTHON_MSGPACK_VERSION).tar.gz +PYTHON_MSGPACK_SITE = https://pypi.python.org/packages/source/m/msgpack-python +PYTHON_MSGPACK_LICENSE = Apache-2.0 +PYTHON_MSGPACK_LICENSE_FILES = COPYING +PYTHON_MSGPACK_SETUP_TYPE = setuptools +PYTHON_MSGPACK_DEPENDENCIES = msgpack + +$(eval $(python-package)) diff --git a/package/python-netaddr/Config.in b/package/python-netaddr/Config.in new file mode 100644 index 0000000000..534d136f06 --- /dev/null +++ b/package/python-netaddr/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_NETADDR + bool "python-netaddr" + help + A network address manipulation library for Python. + + https://pypi.python.org/pypi/netaddr diff --git a/package/python-netaddr/python-netaddr.hash b/package/python-netaddr/python-netaddr.hash new file mode 100644 index 0000000000..5fcdda4539 --- /dev/null +++ b/package/python-netaddr/python-netaddr.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=c65bb34f8bedfbbca0b316c490cd13a0, sha256 locally computed. +md5 c65bb34f8bedfbbca0b316c490cd13a0 netaddr-0.7.18.tar.gz +sha256 a1f5c9fcf75ac2579b9995c843dade33009543c04f218ff7c007b3c81695bd19 netaddr-0.7.18.tar.gz diff --git a/package/python-netaddr/python-netaddr.mk b/package/python-netaddr/python-netaddr.mk new file mode 100644 index 0000000000..c68b24fca1 --- /dev/null +++ b/package/python-netaddr/python-netaddr.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-netaddr +# +################################################################################ + +PYTHON_NETADDR_VERSION = 0.7.18 +PYTHON_NETADDR_SOURCE = netaddr-$(PYTHON_NETADDR_VERSION).tar.gz +PYTHON_NETADDR_SITE = http://pypi.python.org/packages/source/n/netaddr +PYTHON_NETADDR_LICENSE = BSD-3c +PYTHON_NETADDR_LICENSE_FILES = LICENSE +PYTHON_NETADDR_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-netifaces/Config.in b/package/python-netifaces/Config.in new file mode 100644 index 0000000000..1f54f4bd18 --- /dev/null +++ b/package/python-netifaces/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_NETIFACES + bool "python-netifaces" + help + Portable access to network interfaces from Python. + + http://alastairs-place.net/projects/netifaces diff --git a/package/python-netifaces/python-netifaces.hash b/package/python-netifaces/python-netifaces.hash new file mode 100644 index 0000000000..aebfdf6694 --- /dev/null +++ b/package/python-netifaces/python-netifaces.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=36da76e2cfadd24cc7510c2c0012eb1e, sha256 locally computed +md5 36da76e2cfadd24cc7510c2c0012eb1e netifaces-0.10.4.tar.gz +sha256 9656a169cb83da34d732b0eb72b39373d48774aee009a3d1272b7ea2ce109cde netifaces-0.10.4.tar.gz diff --git a/package/python-netifaces/python-netifaces.mk b/package/python-netifaces/python-netifaces.mk new file mode 100644 index 0000000000..2c51ce0689 --- /dev/null +++ b/package/python-netifaces/python-netifaces.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-netifaces +# +################################################################################ + +PYTHON_NETIFACES_VERSION = 0.10.4 +PYTHON_NETIFACES_SOURCE = netifaces-$(PYTHON_NETIFACES_VERSION).tar.gz +PYTHON_NETIFACES_SITE = https://pypi.python.org/packages/source/n/netifaces +PYTHON_NETIFACES_LICENSE = MIT +PYTHON_NETIFACES_LICENSE_FILES = README.rst +PYTHON_NETIFACES_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-networkmanager/Config.in b/package/python-networkmanager/Config.in new file mode 100644 index 0000000000..fcbce5748d --- /dev/null +++ b/package/python-networkmanager/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_PYTHON_NETWORKMANAGER + bool "python-networkmanager" + depends on BR2_PACKAGE_NETWORK_MANAGER # runtime + depends on BR2_USE_WCHAR # dbus-python + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus-python + depends on BR2_PACKAGE_DBUS # dbus-python + select BR2_PACKAGE_DBUS_PYTHON + help + python-networkmanager wraps NetworkManagers D-Bus interface + so you can be less verbose when talking to NetworkManager + from python. All interfaces have been wrapped in classes, + properties are exposed as python properties and function + calls are forwarded to the correct interface. + + https://pypi.python.org/pypi/python-networkmanager/ diff --git a/package/python-networkmanager/python-networkmanager.hash b/package/python-networkmanager/python-networkmanager.hash new file mode 100644 index 0000000000..00d31d00d7 --- /dev/null +++ b/package/python-networkmanager/python-networkmanager.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=d7f0337b8e58c193c574ceae984cc65f, sha256 locally computed +md5 d7f0337b8e58c193c574ceae984cc65f python-networkmanager-1.0.1.tar.gz +sha256 6eb4073a0d6572fe0bba8cbfe8423f6a8a51c4504a33e0eb4f1b1eadf54c4cee python-networkmanager-1.0.1.tar.gz diff --git a/package/python-networkmanager/python-networkmanager.mk b/package/python-networkmanager/python-networkmanager.mk new file mode 100644 index 0000000000..04a2702133 --- /dev/null +++ b/package/python-networkmanager/python-networkmanager.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-networkmanager +# +################################################################################ + +PYTHON_NETWORKMANAGER_VERSION = 1.0.1 +PYTHON_NETWORKMANAGER_SITE = http://pypi.python.org/packages/source/p/python-networkmanager +PYTHON_NETWORKMANAGER_SETUP_TYPE = distutils +PYTHON_NETWORKMANAGER_LICENSE = GPLv3+ +PYTHON_NETWORKMANAGER_LICENSE_FILES = COPYING +PYTHON_NETWORKMANAGER_DEPENDENCIES = dbus-python + +$(eval $(python-package)) diff --git a/package/python-nfc/0001-add-setup-py.patch b/package/python-nfc/0001-add-setup-py.patch new file mode 100644 index 0000000000..5a5145271b --- /dev/null +++ b/package/python-nfc/0001-add-setup-py.patch @@ -0,0 +1,26 @@ +Add simple setup.py + +Having a setup.py allows to easily get the .py files compiled into +.pyc, which is good because by default, Buildroot only keeps .pyc +files on the target. + +Signed-off-by: Thomas Petazzoni + +Index: b/setup.py +=================================================================== +--- /dev/null ++++ b/setup.py +@@ -0,0 +1,13 @@ ++#!/usr/bin/env python ++ ++from distutils.core import setup ++ ++setup(name='NFC', ++ version='1.0', ++ description='Python NFC', ++ author='Stephen Tiedemann', ++ author_email='stephen.tiedemann@googlemail.com', ++ url='https://launchpad.net/nfcpy', ++ packages=['nfc', 'nfc/dev', 'nfc/llcp', 'nfc/ndef', ++ 'nfc/snep'], ++ ) diff --git a/package/python-nfc/Config.in b/package/python-nfc/Config.in new file mode 100644 index 0000000000..9a8102c23c --- /dev/null +++ b/package/python-nfc/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_NFC + bool "python-nfc" + depends on BR2_PACKAGE_PYTHON + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + help + Python module for near field communication. + + https://launchpad.net/nfcpy + +comment "python-nfc needs a toolchain w/ threads" + depends on BR2_PACKAGE_PYTHON + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/python-nfc/python-nfc.mk b/package/python-nfc/python-nfc.mk new file mode 100644 index 0000000000..87db577b22 --- /dev/null +++ b/package/python-nfc/python-nfc.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-nfc +# +################################################################################ + +PYTHON_NFC_VERSION = 212 +PYTHON_NFC_SITE = https://launchpad.net/nfcpy +PYTHON_NFC_SITE_METHOD = bzr +PYTHON_NFC_DEPENDENCIES = libusb libusb-compat +PYTHON_NFC_SETUP_TYPE = distutils +PYTHON_NFC_LICENSE = EUPLv1.1+ + +$(eval $(python-package)) diff --git a/package/python-numpy/0001-no-fenv-on-uclibc.patch b/package/python-numpy/0001-no-fenv-on-uclibc.patch new file mode 100644 index 0000000000..633dbcdff4 --- /dev/null +++ b/package/python-numpy/0001-no-fenv-on-uclibc.patch @@ -0,0 +1,79 @@ +Don't use on uClibc + +The python-numpy code already has provisions to not use when +not available. However, it uses __GLIBC__ to know whether fenv.h is +available or not, but uClibc defines __GLIBC__, so python-numpy thinks +fenv.h is available. + +This patch fixes that by changing all defined(__GLIBC__) occurences by +(defined(__GLIBC__) && !defined(__UCLIBC__)). + +Signed-off-by: Thomas Petazzoni + +Index: b/numpy/core/include/numpy/ufuncobject.h +=================================================================== +--- a/numpy/core/include/numpy/ufuncobject.h ++++ b/numpy/core/include/numpy/ufuncobject.h +@@ -413,11 +413,11 @@ + (void) fpsetsticky(0); \ + } + +-#elif defined(__GLIBC__) || defined(__APPLE__) || \ ++#elif (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \ + defined(__CYGWIN__) || defined(__MINGW32__) || \ + (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) + +-#if defined(__GLIBC__) || defined(__APPLE__) || \ ++#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \ + defined(__MINGW32__) || defined(__FreeBSD__) + #include + #elif defined(__CYGWIN__) +Index: b/numpy/core/src/npymath/ieee754.c.src +=================================================================== +--- a/numpy/core/src/npymath/ieee754.c.src ++++ b/numpy/core/src/npymath/ieee754.c.src +@@ -586,11 +586,11 @@ + } + + +-#elif defined(__GLIBC__) || defined(__APPLE__) || \ ++#elif (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \ + defined(__CYGWIN__) || defined(__MINGW32__) || \ + (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) + +-# if defined(__GLIBC__) || defined(__APPLE__) || \ ++# if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || \ + defined(__MINGW32__) || defined(__FreeBSD__) + # include + # elif defined(__CYGWIN__) +Index: b/numpy/numarray/_capi.c +=================================================================== +--- a/numpy/numarray/_capi.c ++++ b/numpy/numarray/_capi.c +@@ -10,7 +10,7 @@ + #include + #endif + +-#if defined(__GLIBC__) || defined(__APPLE__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) ++#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) + #include + #elif defined(__CYGWIN__) + #include "numpy/fenv/fenv.h" +@@ -258,7 +258,7 @@ + } + + /* Likewise for Integer overflows */ +-#if defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) ++#if (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) + static int int_overflow_error(Float64 value) { /* For x86_64 */ + feraiseexcept(FE_OVERFLOW); + return (int) value; +@@ -3007,7 +3007,7 @@ + return retstatus; + } + +-#elif defined(__GLIBC__) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) ++#elif (defined(__GLIBC__) && !defined(__UCLIBC__)) || defined(__APPLE__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__FreeBSD__) && (__FreeBSD_version >= 502114)) + + static int + NA_checkFPErrors(void) diff --git a/package/python-numpy/0002-Don-t-blindly-enable-frexpl-and-ldexpl-for-uClibc.patch b/package/python-numpy/0002-Don-t-blindly-enable-frexpl-and-ldexpl-for-uClibc.patch new file mode 100644 index 0000000000..42d194182f --- /dev/null +++ b/package/python-numpy/0002-Don-t-blindly-enable-frexpl-and-ldexpl-for-uClibc.patch @@ -0,0 +1,33 @@ +From b0a1b9628d17251bb417a063ec6c6e09f32393c2 Mon Sep 17 00:00:00 2001 +From: "Arnout Vandecappelle (Essensium/Mind)" +Date: Tue, 6 Oct 2015 01:20:48 +0100 +Subject: [PATCH] Don't blindly enable frexpl and ldexpl for uClibc + +When the size of double and long double are equal, numpy blindly +assumes that frexpl and ldexpl will be available as well. But for +uClibc, that's not true: it only defines the long double functions +when long double "exists" on the architecture. + +So make an exception for uClibc. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- + numpy/core/src/private/npy_config.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/numpy/core/src/private/npy_config.h b/numpy/core/src/private/npy_config.h +index 453dbd0..7ecf72c 100644 +--- a/numpy/core/src/private/npy_config.h ++++ b/numpy/core/src/private/npy_config.h +@@ -11,7 +11,7 @@ + #endif + + /* Safe to use ldexp and frexp for long double for MSVC builds */ +-#if (NPY_SIZEOF_LONGDOUBLE == NPY_SIZEOF_DOUBLE) || defined(_MSC_VER) ++#if ((NPY_SIZEOF_LONGDOUBLE == NPY_SIZEOF_DOUBLE) && !defined(__UCLIBC__)) || defined(_MSC_VER) + #ifdef HAVE_LDEXP + #define HAVE_LDEXPL 1 + #endif +-- +2.5.3 + diff --git a/package/python-numpy/Config.in b/package/python-numpy/Config.in new file mode 100644 index 0000000000..f7822efc79 --- /dev/null +++ b/package/python-numpy/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS + bool + # Numpy has some CPU specific code + default y if BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 \ + || BR2_mips || BR2_mipsel || BR2_powerpc || BR2_powerpc64 \ + || BR2_sh || BR2_x86_64 + +config BR2_PACKAGE_PYTHON_NUMPY + bool "python-numpy" + depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS + help + NumPy is the fundamental package for scientific computing + with Python. + + Note that NumPy needs fenv.h fully supported by the + C library. + + http://www.numpy.org/ diff --git a/package/python-numpy/python-numpy.hash b/package/python-numpy/python-numpy.hash new file mode 100644 index 0000000000..39b134be5b --- /dev/null +++ b/package/python-numpy/python-numpy.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 2764d0819acc77e9ff81b060fe7f69530b0d85c26ac9d162639b787cb227d253 numpy-1.8.0.tar.gz diff --git a/package/python-numpy/python-numpy.mk b/package/python-numpy/python-numpy.mk new file mode 100644 index 0000000000..0ab58b0000 --- /dev/null +++ b/package/python-numpy/python-numpy.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# python-numpy +# +################################################################################ + +PYTHON_NUMPY_VERSION = 1.8.0 +PYTHON_NUMPY_SOURCE = numpy-$(PYTHON_NUMPY_VERSION).tar.gz +PYTHON_NUMPY_SITE = http://downloads.sourceforge.net/numpy +PYTHON_NUMPY_LICENSE = BSD-3c +PYTHON_NUMPY_LICENSE_FILES = LICENSE.txt +PYTHON_NUMPY_SETUP_TYPE = distutils + +ifeq ($(BR2_PACKAGE_CLAPACK),y) +PYTHON_NUMPY_DEPENDENCIES += clapack +PYTHON_NUMPY_SITE_CFG_LIBS += blas lapack +endif + +PYTHON_NUMPY_BUILD_OPTS = --fcompiler=None + +define PYTHON_NUMPY_CONFIGURE_CMDS + -rm -f $(@D)/site.cfg + echo "[DEFAULT]" >> $(@D)/site.cfg + echo "library_dirs = $(STAGING_DIR)/usr/lib" >> $(@D)/site.cfg + echo "include_dirs = $(STAGING_DIR)/usr/include" >> $(@D)/site.cfg + echo "libraries =" $(subst $(space),$(comma),$(PYTHON_NUMPY_SITE_CFG_LIBS)) >> $(@D)/site.cfg +endef + +# Some package may include few headers from NumPy, so let's install it +# in the staging area. +PYTHON_NUMPY_INSTALL_STAGING = YES + +$(eval $(python-package)) diff --git a/package/python-paho-mqtt/Config.in b/package/python-paho-mqtt/Config.in new file mode 100644 index 0000000000..79d8b3319c --- /dev/null +++ b/package/python-paho-mqtt/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_PAHO_MQTT + bool "python-paho-mqtt" + help + The Paho Python Client provides a client class with support + for both MQTT v3.1 and v3.1.1 on Python 2.7 or 3.x. It also + provides some helper functions to make publishing messages + to an MQTT server very straightforward. + + https://pypi.python.org/pypi/paho-mqtt diff --git a/package/python-paho-mqtt/python-paho-mqtt.hash b/package/python-paho-mqtt/python-paho-mqtt.hash new file mode 100644 index 0000000000..52729ccd34 --- /dev/null +++ b/package/python-paho-mqtt/python-paho-mqtt.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=a6407b74eb5e5411e157be1de5c11366, sha256 locally computed +md5 a6407b74eb5e5411e157be1de5c11366 paho-mqtt-1.1.tar.gz +sha256 0f7a629efe6e3a2c61b59d3550aa9f2c4529b5689a65fde45e6f1ac36b9a261e paho-mqtt-1.1.tar.gz diff --git a/package/python-paho-mqtt/python-paho-mqtt.mk b/package/python-paho-mqtt/python-paho-mqtt.mk new file mode 100644 index 0000000000..01da2b3d77 --- /dev/null +++ b/package/python-paho-mqtt/python-paho-mqtt.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-paho-mqtt +# +################################################################################ + +PYTHON_PAHO_MQTT_VERSION = 1.1 +PYTHON_PAHO_MQTT_SOURCE = paho-mqtt-$(PYTHON_PAHO_MQTT_VERSION).tar.gz +PYTHON_PAHO_MQTT_SITE = https://pypi.python.org/packages/source/p/paho-mqtt +PYTHON_PAHO_MQTT_LICENSE = EPLv1.0 or EDLv1.0 +PYTHON_PAHO_MQTT_LICENSE_FILES = LICENSE.txt edl-v10 epl-v10 +PYTHON_PAHO_MQTT_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-pam/0001-dealloc.patch b/package/python-pam/0001-dealloc.patch new file mode 100644 index 0000000000..dd4f9610c7 --- /dev/null +++ b/package/python-pam/0001-dealloc.patch @@ -0,0 +1,25 @@ +[PATCH] fix two bugs in the PAM object deallocation + +Fixes https://bugzilla.redhat.com/show_bug.cgi?id=658955 + +Downloaded from: +http://pkgs.fedoraproject.org/cgit/PyPAM.git/plain/PyPAM-0.5.0-dealloc.patch + +Signed-off-by: Peter Korsgaard +diff -up PyPAM-0.5.0/PAMmodule.c.dealloc PyPAM-0.5.0/PAMmodule.c +--- PyPAM-0.5.0/PAMmodule.c.dealloc 2011-01-17 22:48:22.000000000 +0100 ++++ PyPAM-0.5.0/PAMmodule.c 2011-01-18 21:24:59.000000000 +0100 +@@ -538,10 +538,11 @@ static void PyPAM_dealloc(PyPAMObject *s + free(self->service); + free(self->user); + free(self->conv); +- pam_end(self->pamh, PAM_SUCCESS); ++ if (self->pamh) ++ pam_end(self->pamh, PAM_SUCCESS); + dlclose(self->dlh2); + dlclose(self->dlh1); +- PyMem_DEL(self); ++ PyObject_Del(self); + } + + static PyObject * PyPAM_getattr(PyPAMObject *self, char *name) diff --git a/package/python-pam/0002-nofree.patch b/package/python-pam/0002-nofree.patch new file mode 100644 index 0000000000..7de8801707 --- /dev/null +++ b/package/python-pam/0002-nofree.patch @@ -0,0 +1,68 @@ +[PATCH] deallocate the conversation response only in case of error + +Fixes https://bugzilla.redhat.com/show_bug.cgi?id=679714 + +Downloaded from: +http://pkgs.fedoraproject.org/cgit/PyPAM.git/plain/PyPAM-0.5.0-nofree.patch + +Signed-off-by: Peter Korsgaard +diff --git a/PAMmodule.c b/PAMmodule.c +index 03cb799..a7ff8a5 100644 +--- a/PAMmodule.c ++++ b/PAMmodule.c +@@ -24,8 +24,6 @@ typedef struct { + char *service; + char *user; + PyObject *callback; +- struct pam_response *response_data; +- int response_len; + PyObject *user_data; + void *dlh1, *dlh2; + } PyPAMObject; +@@ -54,15 +52,6 @@ static int PyPAM_conv(int num_msg, const struct pam_message **msg, + + Py_INCREF(self); + +- if (NULL != self->response_data) { +- for (int i = 0; i < self->response_len; i++) { +- free(self->response_data[0].resp); +- } +- free(self->response_data); +- self->response_data = NULL; +- self->response_len = 0; +- } +- + PyObject* msgList = PyList_New(num_msg); + + for (int i = 0; i < num_msg; i++) { +@@ -92,6 +81,10 @@ static int PyPAM_conv(int num_msg, const struct pam_message **msg, + char* resp_text; + int resp_retcode = 0; + if (!PyArg_ParseTuple(respTuple, "si", &resp_text, &resp_retcode)) { ++ while (i > 0) { ++ free((--spr)->resp); ++ --i; ++ } + free(*resp); + Py_DECREF(respList); + return PAM_CONV_ERR; +@@ -100,10 +93,6 @@ static int PyPAM_conv(int num_msg, const struct pam_message **msg, + spr->resp_retcode = resp_retcode; + Py_DECREF(respTuple); + } +- +- // Save this so we can free it later. +- self->response_data = *resp; +- self->response_len = PyList_Size(respList); + + Py_DECREF(respList); + +@@ -144,8 +133,6 @@ static PyObject * PyPAM_pam(PyObject *self, PyObject *args) + p->user = NULL; + Py_INCREF(Py_None); + p->callback = Py_None; +- p->response_data = NULL; +- p->response_len = 0; + Py_INCREF(Py_None); + p->user_data = Py_None; + diff --git a/package/python-pam/0003-memory-errors-CVE2012-1502.patch b/package/python-pam/0003-memory-errors-CVE2012-1502.patch new file mode 100644 index 0000000000..62405db058 --- /dev/null +++ b/package/python-pam/0003-memory-errors-CVE2012-1502.patch @@ -0,0 +1,136 @@ +[PATCH] Fix Double Free Corruption (CVE2012-1502) + +Downloaded from: +http://pkgs.fedoraproject.org/cgit/PyPAM.git/plain/PyPAM-0.5.0-memory-errors.patch + +For details, see: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-1502 + +Signed-off-by: Peter Korsgaard +diff -up PyPAM-0.5.0/PAMmodule.c.memory PyPAM-0.5.0/PAMmodule.c +--- PyPAM-0.5.0/PAMmodule.c.memory 2012-05-07 17:22:54.503914026 +0200 ++++ PyPAM-0.5.0/PAMmodule.c 2012-05-07 17:23:15.644381942 +0200 +@@ -37,33 +37,48 @@ static void PyPAM_Err(PyPAMObject *self, + + err_msg = pam_strerror(self->pamh, result); + error = Py_BuildValue("(si)", err_msg, result); +- Py_INCREF(PyPAM_Error); + PyErr_SetObject(PyPAM_Error, error); ++ Py_XDECREF(error); + } + + static int PyPAM_conv(int num_msg, const struct pam_message **msg, + struct pam_response **resp, void *appdata_ptr) + { +- PyObject *args; +- ++ PyObject *args, *msgList, *respList, *item; ++ struct pam_response *response, *spr; + PyPAMObject* self = (PyPAMObject *) appdata_ptr; ++ + if (self->callback == NULL) + return PAM_CONV_ERR; + + Py_INCREF(self); + +- PyObject* msgList = PyList_New(num_msg); +- ++ msgList = PyList_New(num_msg); ++ if (msgList == NULL) { ++ Py_DECREF(self); ++ return PAM_CONV_ERR; ++ } ++ + for (int i = 0; i < num_msg; i++) { +- PyList_SetItem(msgList, i, +- Py_BuildValue("(si)", msg[i]->msg, msg[i]->msg_style)); ++ item = Py_BuildValue("(si)", msg[i]->msg, msg[i]->msg_style); ++ if (item == NULL) { ++ Py_DECREF(msgList); ++ Py_DECREF(self); ++ return PAM_CONV_ERR; ++ } ++ PyList_SetItem(msgList, i, item); + } +- ++ + args = Py_BuildValue("(OO)", self, msgList); +- PyObject* respList = PyEval_CallObject(self->callback, args); ++ if (args == NULL) { ++ Py_DECREF(self); ++ Py_DECREF(msgList); ++ return PAM_CONV_ERR; ++ } ++ respList = PyEval_CallObject(self->callback, args); + Py_DECREF(args); + Py_DECREF(self); +- ++ + if (respList == NULL) + return PAM_CONV_ERR; + +@@ -71,11 +86,15 @@ static int PyPAM_conv(int num_msg, const + Py_DECREF(respList); + return PAM_CONV_ERR; + } +- +- *resp = (struct pam_response *) malloc( ++ ++ response = (struct pam_response *) malloc( + PyList_Size(respList) * sizeof(struct pam_response)); ++ if (response == NULL) { ++ Py_DECREF(respList); ++ return PAM_CONV_ERR; ++ } ++ spr = response; + +- struct pam_response* spr = *resp; + for (int i = 0; i < PyList_Size(respList); i++, spr++) { + PyObject* respTuple = PyList_GetItem(respList, i); + char* resp_text; +@@ -85,7 +104,7 @@ static int PyPAM_conv(int num_msg, const + free((--spr)->resp); + --i; + } +- free(*resp); ++ free(response); + Py_DECREF(respList); + return PAM_CONV_ERR; + } +@@ -95,7 +114,8 @@ static int PyPAM_conv(int num_msg, const + } + + Py_DECREF(respList); +- ++ *resp = response; ++ + return PAM_SUCCESS; + } + +@@ -122,7 +142,11 @@ static PyObject * PyPAM_pam(PyObject *se + PyPAMObject_Type.ob_type = &PyType_Type; + p = (PyPAMObject *) PyObject_NEW(PyPAMObject, &PyPAMObject_Type); + ++ if (p == NULL) ++ return NULL; ++ + if ((spc = (struct pam_conv *) malloc(sizeof(struct pam_conv))) == NULL) { ++ Py_DECREF((PyObject *)p); + PyErr_SetString(PyExc_MemoryError, "out of memory"); + return NULL; + } +@@ -455,9 +479,15 @@ static PyObject * PyPAM_getenvlist(PyObj + } + + retval = PyList_New(0); ++ if (retval == NULL) ++ return NULL; + + while ((cp = *(result++)) != NULL) { + entry = Py_BuildValue("s", cp); ++ if (entry == NULL) { ++ Py_DECREF(retval); ++ return NULL; ++ } + PyList_Append(retval, entry); + Py_DECREF(entry); + } diff --git a/package/python-pam/Config.in b/package/python-pam/Config.in new file mode 100644 index 0000000000..b23a8e0172 --- /dev/null +++ b/package/python-pam/Config.in @@ -0,0 +1,17 @@ +comment "python-pam needs a uClibc or (e)glibc toolchain w/ wchar, locale, dynamic library" + depends on BR2_PACKAGE_PYTHON + depends on !BR2_ENABLE_LOCALE || !BR2_USE_WCHAR || BR2_STATIC_LIBS || \ + BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_PYTHON_PAM + bool "python-pam" + depends on BR2_PACKAGE_PYTHON # C extension not compatible with python3 + depends on BR2_ENABLE_LOCALE # linux-pam + depends on BR2_USE_WCHAR # linux-pam + depends on !BR2_STATIC_LIBS # linux-pam + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + select BR2_PACKAGE_LINUX_PAM + help + PAM (Pluggable Authentication Module) bindings for Python. + + https://admin.fedoraproject.org/pkgdb/package/PyPAM/ diff --git a/package/python-pam/python-pam.mk b/package/python-pam/python-pam.mk new file mode 100644 index 0000000000..d737291c4b --- /dev/null +++ b/package/python-pam/python-pam.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# python-pam +# +################################################################################ + +PYTHON_PAM_VERSION = 0.5.0 +PYTHON_PAM_SOURCE = PyPAM-$(PYTHON_PAM_VERSION).tar.gz +# pangalactic.org gone +PYTHON_PAM_SITE = http://pkgs.fedoraproject.org/repo/pkgs/PyPAM/PyPAM-0.5.0.tar.gz/f1e7c2c56421dda28a75ace59a3c8871 +PYTHON_PAM_SETUP_TYPE = distutils +PYTHON_PAM_LICENSE = LGPLv2.1 +PYTHON_PAM_LICENSE_FILES = COPYING +PYTHON_PAM_DEPENDENCIES = linux-pam + +$(eval $(python-package)) diff --git a/package/python-paramiko/Config.in b/package/python-paramiko/Config.in new file mode 100644 index 0000000000..4c16a9a696 --- /dev/null +++ b/package/python-paramiko/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_PARAMIKO + bool "python-paramiko" + select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime + select BR2_PACKAGE_PYTHON_PYCRYPTO # runtime + select BR2_PACKAGE_PYTHON_ECDSA # runtime + help + SSH2 protocol library. + + https://github.com/paramiko/paramiko/ diff --git a/package/python-paramiko/python-paramiko.hash b/package/python-paramiko/python-paramiko.hash new file mode 100644 index 0000000000..29af27d1f4 --- /dev/null +++ b/package/python-paramiko/python-paramiko.hash @@ -0,0 +1,4 @@ +# md5 from https://pypi.python.org/pypi/paramiko/json +md5 7e1203f5ffeb7d2bc2bffc4feb804216 paramiko-1.16.0.tar.gz +# sha256 calculated by scanpypi +sha256 3297ebd3cd072f573772f7c7426939a443c62c458d54bb632ff30fd6ecf96892 paramiko-1.16.0.tar.gz diff --git a/package/python-paramiko/python-paramiko.mk b/package/python-paramiko/python-paramiko.mk new file mode 100644 index 0000000000..52822bb298 --- /dev/null +++ b/package/python-paramiko/python-paramiko.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-paramiko +# +################################################################################ + +PYTHON_PARAMIKO_VERSION = 1.16.0 +PYTHON_PARAMIKO_SOURCE = paramiko-$(PYTHON_PARAMIKO_VERSION).tar.gz +PYTHON_PARAMIKO_SITE = https://pypi.python.org/packages/source/p/paramiko +PYTHON_PARAMIKO_SETUP_TYPE = setuptools +PYTHON_PARAMIKO_LICENSE = LGPLv2.1+ +PYTHON_PARAMIKO_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-pexpect/Config.in b/package/python-pexpect/Config.in new file mode 100644 index 0000000000..58a3af5783 --- /dev/null +++ b/package/python-pexpect/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PYTHON_PEXPECT + bool "python-pexpect" + select BR2_PACKAGE_PYTHON_PTYPROCESS # runtime + help + Pexpect is a pure Python module for spawning child + applications; controlling them; and responding to expected + patterns in their output. Pexpect works like Don Libes’ + Expect. Pexpect allows your script to spawn a child + application and control it as if a human were typing + commands. + + https://pexpect.readthedocs.org diff --git a/package/python-pexpect/python-pexpect.hash b/package/python-pexpect/python-pexpect.hash new file mode 100644 index 0000000000..29cf892add --- /dev/null +++ b/package/python-pexpect/python-pexpect.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org, sha256 locally computed +md5 056df81e6ca7081f1015b4b147b977b7 pexpect-4.0.1.tar.gz +sha256 232795ebcaaf2e120396dbbaa3a129eda51757eeaae1911558f4ef8ee414fc6c pexpect-4.0.1.tar.gz diff --git a/package/python-pexpect/python-pexpect.mk b/package/python-pexpect/python-pexpect.mk new file mode 100644 index 0000000000..b74bf83510 --- /dev/null +++ b/package/python-pexpect/python-pexpect.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pexpect +# +################################################################################ + +PYTHON_PEXPECT_VERSION = 4.0.1 +PYTHON_PEXPECT_SITE = https://pypi.python.org/packages/source/p/pexpect +PYTHON_PEXPECT_SOURCE = pexpect-$(PYTHON_PEXPECT_VERSION).tar.gz +PYTHON_PEXPECT_LICENSE = ISC +PYTHON_PEXPECT_LICENSE_FILES = LICENSE +PYTHON_PEXPECT_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-picamera/Config.in b/package/python-picamera/Config.in new file mode 100644 index 0000000000..d2317c1e47 --- /dev/null +++ b/package/python-picamera/Config.in @@ -0,0 +1,2 @@ +config BR2_PACKAGE_PYTHON_PICAMERA + bool "python-picamera" diff --git a/package/python-picamera/python-picamera.mk b/package/python-picamera/python-picamera.mk new file mode 100644 index 0000000000..ef2a1a48a5 --- /dev/null +++ b/package/python-picamera/python-picamera.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# python-picamera +# +################################################################################ + +PYTHON_PICAMERA_VERSION = 1.12 +PYTHON_PICAMERA_SOURCE = picamera-$(PYTHON_PICAMERA_VERSION).tar.gz +PYTHON_PICAMERA_SITE = https://pypi.python.org/packages/ab/53/54a20f53e61df5c329480207fb0b6e6e25c64d16e82e899de335e08df7d9 +PYTHON_PICAMERA_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-pillow/Config.in b/package/python-pillow/Config.in new file mode 100644 index 0000000000..bbab470b69 --- /dev/null +++ b/package/python-pillow/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_PYTHON_PILLOW + bool "python-pillow" + select BR2_PACKAGE_DISTRIBUTE + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_JPEG_LIBRARY + select BR2_PACKAGE_TIFF + help + Pillow is the "friendly" PIL fork by Alex Clark and Contributors. PIL is + the Python Imaging Library by Fredrik Lundh and Contributors. + + https://pypi.python.org/pypi/Pillow/ + diff --git a/package/python-pillow/python-pillow-01-crosscompiling.patch b/package/python-pillow/python-pillow-01-crosscompiling.patch new file mode 100644 index 0000000000..0a7da3d74c --- /dev/null +++ b/package/python-pillow/python-pillow-01-crosscompiling.patch @@ -0,0 +1,94 @@ +diff -Naur python-pillow-2.4.0.orig/setup.cfg python-pillow-2.4.0.new/setup.cfg +--- python-pillow-2.4.0.orig/setup.cfg 2014-04-01 18:34:28.000000000 +0300 ++++ python-pillow-2.4.0.new/setup.cfg 2014-06-26 16:15:43.711930729 +0300 +@@ -3,3 +3,12 @@ + tag_date = 0 + tag_svn_revision = 0 + ++[build_ext] ++plat-name = linux-arm ++disable-webp = ++disable-lcms = ++disable-freetype = ++disable-jpeg2000 = ++disable-tcl = ++disable-webpmux = ++disable-tiff = " +diff -Naur python-pillow-2.4.0.orig/setup.py python-pillow-2.4.0.new/setup.py +--- python-pillow-2.4.0.orig/setup.py 2014-04-01 18:21:44.000000000 +0300 ++++ python-pillow-2.4.0.new/setup.py 2014-06-26 16:20:38.494366591 +0300 +@@ -225,60 +225,6 @@ + _add_directory(library_dirs, "/usr/X11/lib") + _add_directory(include_dirs, "/usr/X11/include") + +- elif sys.platform.startswith("linux"): +- arch_tp = (plat.processor(), plat.architecture()[0]) +- if arch_tp == ("x86_64","32bit"): +- # 32 bit build on 64 bit machine. +- _add_directory(library_dirs, "/usr/lib/i386-linux-gnu") +- else: +- for platform_ in arch_tp: +- +- if not platform_: +- continue +- +- if platform_ in ["x86_64", "64bit"]: +- _add_directory(library_dirs, "/lib64") +- _add_directory(library_dirs, "/usr/lib64") +- _add_directory(library_dirs, "/usr/lib/x86_64-linux-gnu") +- break +- elif platform_ in ["i386", "i686", "32bit"]: +- _add_directory(library_dirs, "/usr/lib/i386-linux-gnu") +- break +- elif platform_ in ["aarch64"]: +- _add_directory(library_dirs, "/usr/lib64") +- _add_directory(library_dirs, "/usr/lib/aarch64-linux-gnu") +- break +- elif platform_ in ["arm", "armv7l"]: +- _add_directory(library_dirs, "/usr/lib/arm-linux-gnueabi") +- break +- elif platform_ in ["ppc64"]: +- _add_directory(library_dirs, "/usr/lib64") +- _add_directory(library_dirs, "/usr/lib/ppc64-linux-gnu") +- _add_directory(library_dirs, "/usr/lib/powerpc64-linux-gnu") +- break +- elif platform_ in ["ppc"]: +- _add_directory(library_dirs, "/usr/lib/ppc-linux-gnu") +- _add_directory(library_dirs, "/usr/lib/powerpc-linux-gnu") +- break +- elif platform_ in ["s390x"]: +- _add_directory(library_dirs, "/usr/lib64") +- _add_directory(library_dirs, "/usr/lib/s390x-linux-gnu") +- break +- elif platform_ in ["s390"]: +- _add_directory(library_dirs, "/usr/lib/s390-linux-gnu") +- break +- else: +- raise ValueError( +- "Unable to identify Linux platform: `%s`" % platform_) +- +- # XXX Kludge. Above /\ we brute force support multiarch. Here we +- # try Barry's more general approach. Afterward, something should +- # work ;-) +- self.add_multiarch_paths() +- +- elif sys.platform.startswith("gnu"): +- self.add_multiarch_paths() +- + elif sys.platform.startswith("netbsd"): + _add_directory(library_dirs, "/usr/pkg/lib") + _add_directory(include_dirs, "/usr/pkg/include") +@@ -323,13 +269,6 @@ + if os.path.isfile(os.path.join(tcl_dir, "tk.h")): + _add_directory(include_dirs, tcl_dir) + +- # standard locations +- _add_directory(library_dirs, "/usr/local/lib") +- _add_directory(include_dirs, "/usr/local/include") +- +- _add_directory(library_dirs, "/usr/lib") +- _add_directory(include_dirs, "/usr/include") +- + # on Windows, look for the OpenJPEG libraries in the location that + # the official installed puts them + if sys.platform == "win32": diff --git a/package/python-pillow/python-pillow.mk b/package/python-pillow/python-pillow.mk new file mode 100644 index 0000000000..b4824c5eba --- /dev/null +++ b/package/python-pillow/python-pillow.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# python-pillow +# +################################################################################ + +PYTHON_PILLOW_VERSION = 2.4.0 +PYTHON_PILLOW_SOURCE = Pillow-$(PYTHON_PILLOW_VERSION).zip +PYTHON_PILLOW_SITE = https://pypi.python.org/packages/source/P/Pillow +PYTHON_PILLOW_DEPENDENCIES = python zlib freetype jpeg host-python-setuptools +PYTHON_PILLOW_SETUP_TYPE = setuptools + +define PYTHON_PILLOW_EXTRACT_CMDS + (unzip -o $(DL_DIR)/$(PYTHON_PILLOW_SOURCE) -d $(BUILD_DIR); \ + mv $(BUILD_DIR)/Pillow-$(PYTHON_PILLOW_VERSION)/* $(@D)) +# echo "[build_ext]" >> $(@D)/setup.cfg +# echo "disable-webp = " >> $(@D)/setup.cfg +# echo "disable-lcms = " >> $(@D)/setup.cfg +# echo "disable-freetype = " >> $(@D)/setup.cfg +# echo "disable-jpeg2000 = " >> $(@D)/setup.cfg +# echo "disable-tcl = " >> $(@D)/setup.cfg +# echo "disable-webpmux = " >> $(@D)/setup.cfg +# echo "disable-tiff = " >> $(@D)/setup.cfg +endef + +define PYTHON_PILLOW_BUILD_CMDS__ + (cd $(@D); \ + PYTHONXCPREFIX="$(STAGING_DIR)/usr/" \ + LDFLAGS="-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib" \ + $(HOST_DIR)/usr/bin/python setup.py build build_ext --disable-lcms --disable-webp) +endef + +define PYTHON_PILLOW_INSTALL_TARGET_CMDS____ + (cd $(@D); \ + PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages \ + $(HOST_DIR)/usr/bin/python setup.py install \ + --single-version-externally-managed --root=/ --prefix=$(TARGET_DIR)/usr) +endef + +$(eval $(python-package)) diff --git a/package/python-posix-ipc/Config.in b/package/python-posix-ipc/Config.in new file mode 100644 index 0000000000..eba36edd7b --- /dev/null +++ b/package/python-posix-ipc/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_POSIX_IPC + bool "python-posix-ipc" + depends on BR2_PACKAGE_PYTHON + depends on BR2_TOOLCHAIN_HAS_THREADS + help + The Python extension module posix_ipc gives access to POSIX + inter-process semaphores, shared memory and message queues + on systems that support the POSIX Realtime Extensions + a.k.a. POSIX 1003.1b-1993. + + http://semanchuk.com/philip/posix_ipc/ + +comment "python-posix-ipc needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/python-posix-ipc/python-posix-ipc.mk b/package/python-posix-ipc/python-posix-ipc.mk new file mode 100644 index 0000000000..5fa7471eba --- /dev/null +++ b/package/python-posix-ipc/python-posix-ipc.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-posix-ipc +# +################################################################################ + +PYTHON_POSIX_IPC_VERSION = 0.9.6 +PYTHON_POSIX_IPC_SOURCE = posix_ipc-$(PYTHON_POSIX_IPC_VERSION).tar.gz +PYTHON_POSIX_IPC_SITE = http://semanchuk.com/philip/posix_ipc +PYTHON_POSIX_IPC_LICENSE = BSD-3c +PYTHON_POSIX_IPC_LICENSE_FILES = LICENSE +PYTHON_POSIX_IPC_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-protobuf/0001-disable-unneeded-build-dependencies.patch b/package/python-protobuf/0001-disable-unneeded-build-dependencies.patch new file mode 100644 index 0000000000..3f0eabd23a --- /dev/null +++ b/package/python-protobuf/0001-disable-unneeded-build-dependencies.patch @@ -0,0 +1,37 @@ +From 7e7db7225e227905acabfa2149152ece21c93e70 Mon Sep 17 00:00:00 2001 +From: Steven Noonan +Date: Sun, 8 Nov 2015 09:03:00 -0800 +Subject: [PATCH] python-protobuf: don't require google-apputils + +This dependency is totally superfluous for successfully building/running +python-protobuf. It's only "required" at build time and is not staged into the +install directory, but it isn't even really required for a successful build. + +Signed-off-by: Steven Noonan +--- + python/setup.py | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/python/setup.py b/python/setup.py +index 2450a77..db6f497 100755 +--- a/python/setup.py ++++ b/python/setup.py +@@ -160,7 +160,6 @@ if __name__ == '__main__': + packages = [ 'google' ], + namespace_packages = [ 'google' ], + test_suite = 'setup.MakeTestSuite', +- google_test_dir = "google/protobuf/internal", + # Must list modules explicitly so that we don't install tests. + py_modules = [ + 'google.protobuf.internal.api_implementation', +@@ -189,7 +188,6 @@ if __name__ == '__main__': + 'google.protobuf.text_format'], + cmdclass = { 'clean': clean, 'build_py': build_py }, + install_requires = ['setuptools'], +- setup_requires = ['google-apputils'], + ext_modules = ext_module_list, + url = 'https://developers.google.com/protocol-buffers/', + maintainer = maintainer_email, +-- +2.6.2 + diff --git a/package/python-protobuf/Config.in b/package/python-protobuf/Config.in new file mode 100644 index 0000000000..6649dfc094 --- /dev/null +++ b/package/python-protobuf/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PYTHON_PROTOBUF + bool "python-protobuf" + depends on BR2_PACKAGE_PYTHON + # host-protobuf only builds on certain architectures + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + help + Python implementation of the Google Protocol Buffers. + + Protocol buffers are Google's language-neutral, platform-neutral, + extensible mechanism for serializing structured data. + + http://code.google.com/p/protobuf/ diff --git a/package/python-protobuf/python-protobuf.mk b/package/python-protobuf/python-protobuf.mk new file mode 100644 index 0000000000..d8be76dd70 --- /dev/null +++ b/package/python-protobuf/python-protobuf.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# python-protobuf +# +################################################################################ + +PYTHON_PROTOBUF_VERSION = $(PROTOBUF_VERSION) +PYTHON_PROTOBUF_SOURCE = $(PROTOBUF_SOURCE) +PYTHON_PROTOBUF_SITE = $(PROTOBUF_SITE) +PYTHON_PROTOBUF_LICENSE = BSD-3c +PYTHON_PROTOBUF_LICENSE_FILES = LICENSE +PYTHON_PROTOBUF_DEPENDENCIES = host-protobuf +PYTHON_PROTOBUF_SETUP_TYPE = setuptools +PYTHON_PROTOBUF_SUBDIR = python + +$(eval $(python-package)) diff --git a/package/python-psutil/Config.in b/package/python-psutil/Config.in new file mode 100644 index 0000000000..c64eeeed64 --- /dev/null +++ b/package/python-psutil/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_PSUTIL + bool "python-psutil" + help + psutil is a cross-platform library for retrieving + information on running processes and system utilization + (CPU, memory, disks, network) in Python. + + https://pypi.python.org/pypi/psutil diff --git a/package/python-psutil/python-psutil.hash b/package/python-psutil/python-psutil.hash new file mode 100644 index 0000000000..21de357b4d --- /dev/null +++ b/package/python-psutil/python-psutil.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=53d18a5a2aff970d5658c22921c2bbe6, sha256 locally computed +md5 53d18a5a2aff970d5658c22921c2bbe6 psutil-3.4.2.tar.gz +sha256 b17fa01aa766daa388362d0eda5c215d77e03a8d37676b68971f37bf3913b725 psutil-3.4.2.tar.gz diff --git a/package/python-psutil/python-psutil.mk b/package/python-psutil/python-psutil.mk new file mode 100644 index 0000000000..3570ff4fe4 --- /dev/null +++ b/package/python-psutil/python-psutil.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-psutil +# +################################################################################ + +PYTHON_PSUTIL_VERSION = 3.4.2 +PYTHON_PSUTIL_SOURCE = psutil-$(PYTHON_PSUTIL_VERSION).tar.gz +PYTHON_PSUTIL_SITE = http://pypi.python.org/packages/source/p/psutil +PYTHON_PSUTIL_SETUP_TYPE = setuptools +PYTHON_PSUTIL_LICENSE = BSD-3c +PYTHON_PSUTIL_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-ptyprocess/Config.in b/package/python-ptyprocess/Config.in new file mode 100644 index 0000000000..b95dacbd35 --- /dev/null +++ b/package/python-ptyprocess/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_PTYPROCESS + bool "python-ptyprocess" + help + Launch a subprocess in a pseudo terminal (pty), and interact + with both the process and its pty. + + https://github.com/pexpect/ptyprocess diff --git a/package/python-ptyprocess/python-ptyprocess.hash b/package/python-ptyprocess/python-ptyprocess.hash new file mode 100644 index 0000000000..0e2e0aeda4 --- /dev/null +++ b/package/python-ptyprocess/python-ptyprocess.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org, sha256 locally computed +md5 94e537122914cc9ec9c1eadcd36e73a1 ptyprocess-0.5.1.tar.gz +sha256 0530ce63a9295bfae7bd06edc02b6aa935619f486f0f1dc0972f516265ee81a6 ptyprocess-0.5.1.tar.gz diff --git a/package/python-ptyprocess/python-ptyprocess.mk b/package/python-ptyprocess/python-ptyprocess.mk new file mode 100644 index 0000000000..59329d01e0 --- /dev/null +++ b/package/python-ptyprocess/python-ptyprocess.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-ptyprocess +# +################################################################################ + +PYTHON_PTYPROCESS_VERSION = 0.5.1 +PYTHON_PTYPROCESS_SITE = https://pypi.python.org/packages/source/p/ptyprocess +PYTHON_PTYPROCESS_SOURCE = ptyprocess-$(PYTHON_PTYPROCESS_VERSION).tar.gz +PYTHON_PTYPROCESS_LICENSE = ISC +PYTHON_PTYPROCESS_LICENSE_FILES = LICENSE +PYTHON_PTYPROCESS_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-pyasn-modules/Config.in b/package/python-pyasn-modules/Config.in new file mode 100644 index 0000000000..387020d9d6 --- /dev/null +++ b/package/python-pyasn-modules/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PYTHON_PYASN_MODULES + bool "python-pyasn-modules" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_PYASN # runtime + help + A collection of ASN.1-based protocols modules. + + https://pypi.python.org/pypi/pyasn1-modules + +comment "python-pyasn-modules needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-pyasn-modules/python-pyasn-modules.hash b/package/python-pyasn-modules/python-pyasn-modules.hash new file mode 100644 index 0000000000..6d9a707931 --- /dev/null +++ b/package/python-pyasn-modules/python-pyasn-modules.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=178129bc7fbf07215c25230c5f053f81, sha256 locally computed. +md5 178129bc7fbf07215c25230c5f053f81 pyasn1-modules-0.0.8.tar.gz +sha256 10561934f1829bcc455c7ecdcdacdb4be5ffd3696f26f468eb6eb41e107f3837 pyasn1-modules-0.0.8.tar.gz diff --git a/package/python-pyasn-modules/python-pyasn-modules.mk b/package/python-pyasn-modules/python-pyasn-modules.mk new file mode 100644 index 0000000000..bb32227a20 --- /dev/null +++ b/package/python-pyasn-modules/python-pyasn-modules.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyasn-modules +# +################################################################################ + +PYTHON_PYASN_MODULES_VERSION = 0.0.8 +PYTHON_PYASN_MODULES_SOURCE = pyasn1-modules-$(PYTHON_PYASN_MODULES_VERSION).tar.gz +PYTHON_PYASN_MODULES_SITE = http://pypi.python.org/packages/source/p/pyasn1-modules +PYTHON_PYASN_MODULES_LICENSE = BSD-2c +PYTHON_PYASN_MODULES_LICENSE_FILES = LICENSE.txt +PYTHON_PYASN_MODULES_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-pyasn/Config.in b/package/python-pyasn/Config.in new file mode 100644 index 0000000000..997b737f5b --- /dev/null +++ b/package/python-pyasn/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_PYASN + bool "python-pyasn" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON + help + PyASN is a Python extension module that enables you to + perform very fast IP address to Autonomous System Number + lookups. + + https://code.google.com/p/pyasn/ + +comment "python-pyasn needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-pyasn/python-pyasn.hash b/package/python-pyasn/python-pyasn.hash new file mode 100644 index 0000000000..59c90a832b --- /dev/null +++ b/package/python-pyasn/python-pyasn.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=f00a02a631d4016818659d1cc38d229a, sha256 locally computed +md5 f00a02a631d4016818659d1cc38d229a pyasn1-0.1.9.tar.gz +sha256 853cacd96d1f701ddd67aa03ecc05f51890135b7262e922710112f12a2ed2a7f pyasn1-0.1.9.tar.gz diff --git a/package/python-pyasn/python-pyasn.mk b/package/python-pyasn/python-pyasn.mk new file mode 100644 index 0000000000..80d18cd135 --- /dev/null +++ b/package/python-pyasn/python-pyasn.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyasn +# +################################################################################ + +PYTHON_PYASN_VERSION = 0.1.9 +PYTHON_PYASN_SOURCE = pyasn1-$(PYTHON_PYASN_VERSION).tar.gz +PYTHON_PYASN_SITE = https://pypi.python.org/packages/source/p/pyasn1 +PYTHON_PYASN_LICENSE = BSD-2c +PYTHON_PYASN_LICENSE_FILES = LICENSE.txt +PYTHON_PYASN_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-pycli/Config.in b/package/python-pycli/Config.in new file mode 100644 index 0000000000..e1ce3b99a6 --- /dev/null +++ b/package/python-pycli/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_PYCLI + bool "python-pycli" + help + The cli package is a framework for making simple, correct + command line applications in Python. + + https://pythonhosted.org/pyCLI/ diff --git a/package/python-pycli/python-pycli.hash b/package/python-pycli/python-pycli.hash new file mode 100644 index 0000000000..8be31787be --- /dev/null +++ b/package/python-pycli/python-pycli.hash @@ -0,0 +1,4 @@ +# From https://pypi.python.org/pypi?:action=show_md5&digest=5cad880168f3423a1235b396735c1360 +md5 5cad880168f3423a1235b396735c1360 pyCLI-devel.tar.gz +# Locally calculated +sha256 d7dc3245d79ef00ba5c0d6b008eb3d1a519c0df4cfa4467eee5160a80c6ddc0a pyCLI-devel.tar.gz diff --git a/package/python-pycli/python-pycli.mk b/package/python-pycli/python-pycli.mk new file mode 100644 index 0000000000..8e48a065bc --- /dev/null +++ b/package/python-pycli/python-pycli.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pycli +# +################################################################################ + +PYTHON_PYCLI_VERSION = devel +PYTHON_PYCLI_SOURCE = pyCLI-$(PYTHON_PYCLI_VERSION).tar.gz +PYTHON_PYCLI_SITE = https://pypi.python.org/packages/source/p/pyCLI +PYTHON_PYCLI_LICENSE = ISC-like +PYTHON_PYCLI_LICENSE_FILES = lib/cli/__init__.py +PYTHON_PYCLI_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-pycparser/Config.in b/package/python-pycparser/Config.in new file mode 100644 index 0000000000..49190c3405 --- /dev/null +++ b/package/python-pycparser/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_PYCPARSER + bool "python-pycparser" + help + C parser in Python + + https://github.com/eliben/pycparser diff --git a/package/python-pycparser/python-pycparser.hash b/package/python-pycparser/python-pycparser.hash new file mode 100644 index 0000000000..a87bfd44c7 --- /dev/null +++ b/package/python-pycparser/python-pycparser.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=a2bc8d28c923b4fe2b2c3b4b51a4f935, sha256 locally computed +md5 a2bc8d28c923b4fe2b2c3b4b51a4f935 pycparser-2.14.tar.gz +sha256 7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73 pycparser-2.14.tar.gz diff --git a/package/python-pycparser/python-pycparser.mk b/package/python-pycparser/python-pycparser.mk new file mode 100644 index 0000000000..a32f1aa2a4 --- /dev/null +++ b/package/python-pycparser/python-pycparser.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-pycparser +# +################################################################################ + +PYTHON_PYCPARSER_VERSION = 2.14 +PYTHON_PYCPARSER_SOURCE = pycparser-$(PYTHON_PYCPARSER_VERSION).tar.gz +PYTHON_PYCPARSER_SITE = https://pypi.python.org/packages/source/p/pycparser +PYTHON_PYCPARSER_SETUP_TYPE = setuptools +PYTHON_PYCPARSER_LICENSE = BSD-3c +PYTHON_PYCPARSER_LICENSE_FILES = LICENSE + +$(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/package/python-pycrypto/0001-remove-incorrect-header-path.patch b/package/python-pycrypto/0001-remove-incorrect-header-path.patch new file mode 100644 index 0000000000..9268d311d5 --- /dev/null +++ b/package/python-pycrypto/0001-remove-incorrect-header-path.patch @@ -0,0 +1,21 @@ +Do not use /usr/include for headers + +Using /usr/include is wrong when doing cross-compilation, so get rid +of it, and rely on the compiler to use the appropriate default paths +for headers. + +Signed-off-by: Thomas Petazzoni + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -370,7 +370,7 @@ + 'ext_modules': plat_ext + [ + # _fastmath (uses GNU mp library) + Extension("Crypto.PublicKey._fastmath", +- include_dirs=['src/','/usr/include/'], ++ include_dirs=['src/'], + libraries=['gmp'], + sources=["src/_fastmath.c"]), + diff --git a/package/python-pycrypto/Config.in b/package/python-pycrypto/Config.in new file mode 100644 index 0000000000..e998ecf89c --- /dev/null +++ b/package/python-pycrypto/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_PYCRYPTO + bool "python-pycrypto" + select BR2_PACKAGE_GMP + help + PyCrypto is a collection of cryptographic algorithms and + protocols, implemented for use from Python. + + http://www.pycrypto.org/ diff --git a/package/python-pycrypto/python-pycrypto.hash b/package/python-pycrypto/python-pycrypto.hash new file mode 100644 index 0000000000..46378945d8 --- /dev/null +++ b/package/python-pycrypto/python-pycrypto.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 f2ce1e989b272cfcb677616763e0a2e7ec659effa67a88aa92b3a65528f60a3c pycrypto-2.6.1.tar.gz diff --git a/package/python-pycrypto/python-pycrypto.mk b/package/python-pycrypto/python-pycrypto.mk new file mode 100644 index 0000000000..71943fa2cd --- /dev/null +++ b/package/python-pycrypto/python-pycrypto.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# python-pycrypto +# +################################################################################ + +PYTHON_PYCRYPTO_VERSION = 2.6.1 +PYTHON_PYCRYPTO_SOURCE = pycrypto-$(PYTHON_PYCRYPTO_VERSION).tar.gz +PYTHON_PYCRYPTO_SITE = http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto +PYTHON_PYCRYPTO_SETUP_TYPE = distutils + +PYTHON_PYCRYPTO_LICENSE = Public Domain, Python 2.2 License (HMAC.py, setup.py) +PYTHON_PYCRYPTO_LICENSE_FILES = \ + COPYRIGHT LEGAL/copy/LICENSE.libtom \ + LEGAL/copy/LICENSE.python-2.2 + +# The pycrypto package contains a LICENSE.orig file, but our patching +# infrastrucure removes all .orig file, so we must rename that license +# file prior to patching, so it is still available to the legal-info +# infrastructure +define PYTHON_PYCRYPTO_RENAME_LICENSE + mv $(@D)/LEGAL/copy/LICENSE.orig $(@D)/LEGAL/copy/LICENSE.original +endef +PYTHON_PYCRYPTO_POST_EXTRACT_HOOKS += PYTHON_PYCRYPTO_RENAME_LICENSE +HOST_PYTHON_PYCRYPTO_POST_EXTRACT_HOOKS += PYTHON_PYCRYPTO_RENAME_LICENSE +PYTHON_PYCRYPTO_LICENSE_FILES += LEGAL/copy/LICENSE.original + +PYTHON_PYCRYPTO_DEPENDENCIES = gmp + +# The configure step needs to be run outside of the setup.py since it isn't +# run correctly for cross-compiling +define PYTHON_PYCRYPTO_CONFIGURE_CMDS + (cd $(@D) && \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + ./configure \ + --target=$(GNU_TARGET_NAME) \ + --host=$(GNU_TARGET_NAME) \ + --build=$(GNU_HOST_NAME) \ + --prefix=/usr \ + --exec-prefix=/usr \ + --sysconfdir=/etc \ + --program-prefix="" \ + ) +endef + +$(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/package/python-pycurl/0001-link-with-crypto.patch b/package/python-pycurl/0001-link-with-crypto.patch new file mode 100644 index 0000000000..be4ebe39c4 --- /dev/null +++ b/package/python-pycurl/0001-link-with-crypto.patch @@ -0,0 +1,12 @@ +diff -uNr pycurl-7.19.5.1-orig/setup.py pycurl-7.19.5.1-new/setup.py +--- pycurl-7.19.5.1-orig/setup.py 2015-01-07 05:37:47.000000000 +0200 ++++ pycurl-7.19.5.1-new/setup.py 2015-04-05 11:44:25.356335107 +0300 +@@ -56,7 +56,7 @@ + self.include_dirs = [] + self.define_macros = [("PYCURL_VERSION", '"%s"' % VERSION)] + self.library_dirs = [] +- self.libraries = [] ++ self.libraries = ['crypto'] + self.runtime_library_dirs = [] + self.extra_objects = [] + self.extra_compile_args = [] diff --git a/package/python-pycurl/Config.in b/package/python-pycurl/Config.in new file mode 100644 index 0000000000..787018779a --- /dev/null +++ b/package/python-pycurl/Config.in @@ -0,0 +1,3 @@ +config BR2_PACKAGE_PYTHON_PYCURL + bool "python-pycurl" + diff --git a/package/python-pycurl/python-pycurl.mk b/package/python-pycurl/python-pycurl.mk new file mode 100644 index 0000000000..0cd7c72d77 --- /dev/null +++ b/package/python-pycurl/python-pycurl.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pycurl +# +################################################################################ + +PYTHON_PYCURL_VERSION = 7.19.5.1 +PYTHON_PYCURL_SOURCE = pycurl-$(PYTHON_PYCURL_VERSION).tar.gz +PYTHON_PYCURL_SITE = http://pypi.python.org/packages/source/p/pycurl +PYTHON_PYCURL_SETUP_TYPE = distutils +PYTHON_PYCURL_BUILD_OPTS = --curl-config=$(STAGING_DIR)/usr/bin/curl-config --with-ssl +PYTHON_PYCURL_ENV = PATH=$(STAGING_DIR)/usr/bin + +$(eval $(python-package)) diff --git a/package/python-pydal/Config.in b/package/python-pydal/Config.in new file mode 100644 index 0000000000..f1c97f91a0 --- /dev/null +++ b/package/python-pydal/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_PYTHON_PYDAL + bool python-pydal + help + pyDAL is a pure Python Database Abstraction Layer. It + dynamically generates the SQL in real time using the + specified dialect for the database back end, so that you do + not have to write SQL code or learn different SQL dialects + (the term SQL is used generically), and your code will be + portable among different types of databases. + + pyDAL comes from the original web2py's DAL, with the aim of + being wide-compatible. pyDAL doesn't require web2py and can + be used in any Python context. + + https://github.com/web2py/pydal diff --git a/package/python-pydal/python-pydal.mk b/package/python-pydal/python-pydal.mk new file mode 100644 index 0000000000..4c5da419c0 --- /dev/null +++ b/package/python-pydal/python-pydal.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pydal +# +################################################################################ + +PYTHON_PYDAL_VERSION = v15.07 +PYTHON_PYDAL_SITE = $(call github,web2py,pydal,$(PYTHON_PYDAL_VERSION)) +PYTHON_PYDAL_LICENSE = BSD-3c +PYTHON_PYDAL_LICENSE_FILES = LICENSE +PYTHON_PYDAL_SETUP_TYPE = setuptools + +$(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/package/python-pyftpdlib/Config.in b/package/python-pyftpdlib/Config.in new file mode 100644 index 0000000000..e25c34e5a3 --- /dev/null +++ b/package/python-pyftpdlib/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_PYFTPDLIB + bool "python-pyftpdlib" + help + Extremely fast and scalable Python FTP server library. + + https://github.com/giampaolo/pyftpdlib diff --git a/package/python-pyftpdlib/python-pyftpdlib.hash b/package/python-pyftpdlib/python-pyftpdlib.hash new file mode 100644 index 0000000000..b6d0cca416 --- /dev/null +++ b/package/python-pyftpdlib/python-pyftpdlib.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=0c6f7c447fb702af4d5ca0123003c9fd, sha256 locally computed +md5 0c6f7c447fb702af4d5ca0123003c9fd pyftpdlib-1.5.0.tar.gz +sha256 0111127418e9012a8e9e6c05a0c64af1acef8c31128834805fb0f9a49c746261 pyftpdlib-1.5.0.tar.gz diff --git a/package/python-pyftpdlib/python-pyftpdlib.mk b/package/python-pyftpdlib/python-pyftpdlib.mk new file mode 100644 index 0000000000..11e24e21c9 --- /dev/null +++ b/package/python-pyftpdlib/python-pyftpdlib.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyftpdlib +# +################################################################################ + +PYTHON_PYFTPDLIB_VERSION = 1.5.0 +PYTHON_PYFTPDLIB_SOURCE = pyftpdlib-$(PYTHON_PYFTPDLIB_VERSION).tar.gz +PYTHON_PYFTPDLIB_SITE = https://pypi.python.org/packages/source/p/pyftpdlib +PYTHON_PYFTPDLIB_SETUP_TYPE = setuptools +PYTHON_PYFTPDLIB_LICENSE = MIT +PYTHON_PYFTPDLIB_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-pygame/Config.in b/package/python-pygame/Config.in new file mode 100644 index 0000000000..932b0f1229 --- /dev/null +++ b/package/python-pygame/Config.in @@ -0,0 +1,54 @@ +config BR2_PACKAGE_PYTHON_PYGAME + bool "python-pygame" + select BR2_PACKAGE_SDL + help + Pygame is a cross-platfrom library designed to make it easy to write + multimedia software, such as games, in Python. Pygame requires the + Python language and SDL multimedia library. + It can also make use of several other popular libraries. + + http://www.pygame.org/ + +if BR2_PACKAGE_PYTHON_PYGAME +config BR2_PACKAGE_PYTHON_PYGAME_IMAGE + bool "pygame.image" + select BR2_PACKAGE_SDL_IMAGE + select BR2_PACKAGE_SDL_IMAGE_PNG + select BR2_PACKAGE_SDL_IMAGE_JPEG + help + pygame module for loading, saving and transfering images. + Will autoselect sdl_image with png and jpeg support. + +config BR2_PACKAGE_PYTHON_PYGAME_EXAMPLES + bool "pygame.examples" + help + Include examples. + Selecting this option adds about 1.5 MB to the target file system. + +config BR2_PACKAGE_PYTHON_PYGAME_FONT + bool "pygame.font" + select BR2_PACKAGE_SDL_TTF + help + pygame module for loading and rendering fonts. + Will autoselect sdl_ttf. + +config BR2_PACKAGE_PYTHON_PYGAME_MIXER + bool "pygame.mixer" + select BR2_PACKAGE_SDL_MIXER + help + pygame module for loading and playing sounds. + Will autoselect sdl_mixer. + +config BR2_PACKAGE_PYTHON_PYGAME_MIXER_MUSIC + bool "pygame.mixer.music" + depends on BR2_PACKAGE_PYTHON_PYGAME_MIXER + help + pygame module for controlling streamed audio + +config BR2_PACKAGE_PYTHON_PYGAME_SCRAP + bool "pygame.scrap" + depends on BR2_PACKAGE_SDL_X11 + help + pygame module for clipboard support (X11 needed) + +endif diff --git a/package/python-pygame/python-pygame.mk b/package/python-pygame/python-pygame.mk new file mode 100644 index 0000000000..995f80ad79 --- /dev/null +++ b/package/python-pygame/python-pygame.mk @@ -0,0 +1,106 @@ +################################################################################ +# +# python-pygame +# +################################################################################ + +# stable 1.9.1 release requires V4L which has been wiped out of recent Linux +# kernels, so use latest mercurial revision until next stable release is out. +PYTHON_PYGAME_VERSION = f0bb4a4b365d +PYTHON_PYGAME_SOURCE = pygame-$(PYTHON_PYGAME_VERSION).tar.gz +PYTHON_PYGAME_SITE = https://bitbucket.org/pygame/pygame +PYTHON_PYGAME_SITE_METHOD = hg +PYTHON_PYGAME_SETUP_TYPE = distutils +PYTHON_PYGAME_LICENSE = LGPLv2.1+ +PYTHON_PYGAME_LICENSE_FILES = LGPL + +ifeq ($(BR2_PACKAGE_PYTHON_PYGAME_IMAGE),y) +PYTHON_PYGAME_OPT_DEPENDS += sdl_image +endif + +ifeq ($(BR2_PACKAGE_PYTHON_PYGAME_FONT),y) +PYTHON_PYGAME_OPT_DEPENDS += sdl_ttf +endif + +ifeq ($(BR2_PACKAGE_PYTHON_PYGAME_MIXER),y) +PYTHON_PYGAME_OPT_DEPENDS += sdl_mixer +endif + +PYTHON_PYGAME_DEPENDENCIES = sdl $(PYTHON_PYGAME_OPT_DEPENDS) + +ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_IMAGE),y) +define PYTHON_PYGAME_UNCONFIGURE_IMAGE + $(SED) 's/^imageext/#imageext/' $(@D)/Setup +endef +endif + +ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_FONT),y) +define PYTHON_PYGAME_UNCONFIGURE_FONT + $(SED) 's/^font/#font/' $(@D)/Setup +endef +endif + +ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_MIXER),y) +define PYTHON_PYGAME_UNCONFIGURE_MIXER + $(SED) 's/^mixer/#mixer/g' $(@D)/Setup +endef +endif + +# Both require numpy or numeric python module +define PYTHON_PYGAME_UNCONFIGURE_SNDARRAY + $(SED) 's/^_numericsndarray/#_numericsndarray/' $(@D)/Setup +endef + +define PYTHON_PYGAME_UNCONFIGURE_SURFARRAY + $(SED) 's/^_numericsurfarray/#_numericsurfarray/' $(@D)/Setup +endef + +# Requires smpeg +define PYTHON_PYGAME_UNCONFIGURE_MOVIE + $(SED) 's/^movie/#movie/' $(@D)/Setup +endef + +ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_SCRAP),y) +define PYTHON_PYGAME_UNCONFIGURE_SCRAP + $(SED) 's/^scrap/#scrap/' $(@D)/Setup +endef +endif + +PYTHON_PYGAME_SDL_FLAGS = `$(STAGING_DIR)/usr/bin/sdl-config --cflags` +PYTHON_PYGAME_SDL_FLAGS += `$(STAGING_DIR)/usr/bin/sdl-config --libs` + +# Pygame needs a Setup file where options should be commented out if +# dependencies are not available +define PYTHON_PYGAME_CONFIGURE_CMDS + cp -f $(@D)/Setup.in $(@D)/Setup + $(SED) "s~^SDL = ~SDL = $(PYTHON_PYGAME_SDL_FLAGS) \n#~" $(@D)/Setup + $(SED) 's/^pypm/#pypm/' $(@D)/Setup + $(PYTHON_PYGAME_UNCONFIGURE_IMAGE) + $(PYTHON_PYGAME_UNCONFIGURE_FONT) + $(PYTHON_PYGAME_UNCONFIGURE_MIXER) + $(PYTHON_PYGAME_UNCONFIGURE_SNDARRAY) + $(PYTHON_PYGAME_UNCONFIGURE_SURFARRAY) + $(PYTHON_PYGAME_UNCONFIGURE_MOVIE) + $(PYTHON_PYGAME_UNCONFIGURE_SCRAP) +endef + +define PYTHON_PYGAME_REMOVE_DOC + rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/pygame/docs +endef + +PYTHON_PYGAME_POST_INSTALL_TARGET_HOOKS += PYTHON_PYGAME_REMOVE_DOC + +define PYTHON_PYGAME_REMOVE_TESTS + rm -rf $(TARGET_DIR)/usr/lib/python*/site-packages/pygame/tests +endef + +PYTHON_PYGAME_POST_INSTALL_TARGET_HOOKS += PYTHON_PYGAME_REMOVE_TESTS + +ifneq ($(BR2_PACKAGE_PYTHON_PYGAME_EXAMPLES),y) +define PYTHON_PYGAME_REMOVE_EXAMPLES + rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/pygame/examples +endef +PYTHON_PYGAME_POST_INSTALL_TARGET_HOOKS += PYTHON_PYGAME_REMOVE_EXAMPLES +endif + +$(eval $(python-package)) diff --git a/package/python-pygments/Config.in b/package/python-pygments/Config.in new file mode 100644 index 0000000000..f097c52397 --- /dev/null +++ b/package/python-pygments/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_PYGMENTS + bool "python-pygments" + help + Pygments is a syntax highlighting package written in Python. + + https://pypi.python.org/pypi/Pygments diff --git a/package/python-pygments/python-pygments.hash b/package/python-pygments/python-pygments.hash new file mode 100644 index 0000000000..bb954dd551 --- /dev/null +++ b/package/python-pygments/python-pygments.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=84533d22f72de894f6d3907c3ca9eddf, sha256 locally computed. +md5 84533d22f72de894f6d3907c3ca9eddf Pygments-2.1.tar.gz +sha256 13a0ef5fafd7b16cf995bc28fe7aab0780dab1b2fda0fc89e033709af8b8a47b Pygments-2.1.tar.gz diff --git a/package/python-pygments/python-pygments.mk b/package/python-pygments/python-pygments.mk new file mode 100644 index 0000000000..eafd77590b --- /dev/null +++ b/package/python-pygments/python-pygments.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pygments +# +################################################################################ + +PYTHON_PYGMENTS_VERSION = 2.1 +PYTHON_PYGMENTS_SOURCE = Pygments-$(PYTHON_PYGMENTS_VERSION).tar.gz +PYTHON_PYGMENTS_SITE = http://pypi.python.org/packages/source/P/Pygments +PYTHON_PYGMENTS_LICENSE = BSD-2c +PYTHON_PYGMENTS_LICENSE_FILES = LICENSE +PYTHON_PYGMENTS_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-pyinotify/Config.in b/package/python-pyinotify/Config.in new file mode 100644 index 0000000000..b3e74e13b1 --- /dev/null +++ b/package/python-pyinotify/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_PYINOTIFY + bool "python-pyinotify" + help + Monitoring filesystems events with inotify on Linux. + + https://github.com/seb-m/pyinotify diff --git a/package/python-pyinotify/python-pyinotify.mk b/package/python-pyinotify/python-pyinotify.mk new file mode 100644 index 0000000000..b4ea66299d --- /dev/null +++ b/package/python-pyinotify/python-pyinotify.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-pyinotify +# +################################################################################ + +PYTHON_PYINOTIFY_VERSION = 0.9.6 +PYTHON_PYINOTIFY_SITE = $(call github,seb-m,pyinotify,$(PYTHON_PYINOTIFY_VERSION)) +PYTHON_PYINOTIFY_SETUP_TYPE = setuptools +PYTHON_PYINOTIFY_LICENSE = MIT +PYTHON_PYINOTIFY_LICENSE_FILES = COPYING + +$(eval $(python-package)) diff --git a/package/python-pymysql/Config.in b/package/python-pymysql/Config.in new file mode 100644 index 0000000000..75b447cbd1 --- /dev/null +++ b/package/python-pymysql/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_PYMYSQL + bool "python-pymysql" + help + PyMySQL is a pure-Python MySQL client library. It follows + the DB-API 2.0. + + https://pypi.python.org/pypi/PyMySQL/ diff --git a/package/python-pymysql/python-pymysql.hash b/package/python-pymysql/python-pymysql.hash new file mode 100644 index 0000000000..fc7e5e3ece --- /dev/null +++ b/package/python-pymysql/python-pymysql.hash @@ -0,0 +1,4 @@ +#md5 from https://pypi.python.org/pypi?:action=show_md5&digest=6d757cda8bfbd312714207f7c0bef5c7 +md5 6d757cda8bfbd312714207f7c0bef5c7 PyMySQL-0.7.2.tar.gz +# Locally calculated: +sha256 bd7acb4990dbf097fae3417641f93e25c690e01ed25c3ed32ea638d6c3ac04ba PyMySQL-0.7.2.tar.gz diff --git a/package/python-pymysql/python-pymysql.mk b/package/python-pymysql/python-pymysql.mk new file mode 100644 index 0000000000..e58ff7e8bf --- /dev/null +++ b/package/python-pymysql/python-pymysql.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pymysql +# +################################################################################ + +PYTHON_PYMYSQL_VERSION = 0.7.2 +PYTHON_PYMYSQL_SOURCE = PyMySQL-$(PYTHON_PYMYSQL_VERSION).tar.gz +PYTHON_PYMYSQL_SITE = https://pypi.python.org/packages/source/P/PyMySQL +PYTHON_PYMYSQL_LICENSE = MIT +PYTHON_PYMYSQL_LICENSE_FILES = LICENSE +PYTHON_PYMYSQL_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-pynacl/Config.in b/package/python-pynacl/Config.in new file mode 100644 index 0000000000..5a53648cb9 --- /dev/null +++ b/package/python-pynacl/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_PYNACL + bool "python-pynacl" + select BR2_PACKAGE_LIBSODIUM + select BR2_PACKAGE_PYTHON_SIX # runtime + select BR2_PACKAGE_PYTHON_CFFI # runtime + help + Python binding to the Networking and Cryptography (NaCl) library. + + https://pypi.python.org/pypi/PyNaCl diff --git a/package/python-pynacl/python-pynacl.hash b/package/python-pynacl/python-pynacl.hash new file mode 100644 index 0000000000..7035ac7637 --- /dev/null +++ b/package/python-pynacl/python-pynacl.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=12fd03d8ce64e0318cb1c69272f17704, sha256 locally computed. +md5 12fd03d8ce64e0318cb1c69272f17704 PyNaCl-1.0.1.tar.gz +sha256 d21d7a7358a85fb9b9ddadfbd1176c40fe199334fe2202881255e77f6d3773f4 PyNaCl-1.0.1.tar.gz diff --git a/package/python-pynacl/python-pynacl.mk b/package/python-pynacl/python-pynacl.mk new file mode 100644 index 0000000000..e1769b8f70 --- /dev/null +++ b/package/python-pynacl/python-pynacl.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# python-pynacl +# +################################################################################ + +PYTHON_PYNACL_VERSION = 1.0.1 +PYTHON_PYNACL_SOURCE = PyNaCl-$(PYTHON_PYNACL_VERSION).tar.gz +PYTHON_PYNACL_SITE = http://pypi.python.org/packages/source/P/PyNaCl +PYTHON_PYNACL_LICENSE = Apache-2.0 +PYTHON_PYNACL_LICENSE_FILES = LICENSE +PYTHON_PYNACL_SETUP_TYPE = setuptools +PYTHON_PYNACL_DEPENDENCIES = libsodium host-python-cffi +PYTHON_PYNACL_ENV = SODIUM_INSTALL=system + +$(eval $(python-package)) diff --git a/package/python-pyopenssl/Config.in b/package/python-pyopenssl/Config.in new file mode 100644 index 0000000000..c32e211e17 --- /dev/null +++ b/package/python-pyopenssl/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PYTHON_PYOPENSSL + bool "python-pyopenssl" + depends on BR2_INSTALL_LIBSTDCPP # python-cryptography + select BR2_PACKAGE_PYTHON_CRYPTOGRAPHY # runtime + select BR2_PACKAGE_PYTHON_SIX # runtime + help + Python wrapper module around the OpenSSL library. + + https://github.com/pyca/pyopenssl + +comment "python-pyopenssl needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-pyopenssl/python-pyopenssl.hash b/package/python-pyopenssl/python-pyopenssl.hash new file mode 100644 index 0000000000..27427d2a15 --- /dev/null +++ b/package/python-pyopenssl/python-pyopenssl.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=9587d813dcf656e9f2760e41a3682dc3, sha256 locally computed +md5 9587d813dcf656e9f2760e41a3682dc3 pyOpenSSL-16.0.0.tar.gz +sha256 363d10ee43d062285facf4e465f4f5163f9f702f9134f0a5896f134cbb92d17d pyOpenSSL-16.0.0.tar.gz diff --git a/package/python-pyopenssl/python-pyopenssl.mk b/package/python-pyopenssl/python-pyopenssl.mk new file mode 100644 index 0000000000..7606411155 --- /dev/null +++ b/package/python-pyopenssl/python-pyopenssl.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyopenssl +# +################################################################################ + +PYTHON_PYOPENSSL_VERSION = 16.0.0 +PYTHON_PYOPENSSL_SOURCE = pyOpenSSL-$(PYTHON_PYOPENSSL_VERSION).tar.gz +PYTHON_PYOPENSSL_SITE = https://pypi.python.org/packages/source/p/pyOpenSSL +PYTHON_PYOPENSSL_LICENSE = Apache-2.0 +PYTHON_PYOPENSSL_LICENSE_FILES = LICENSE +PYTHON_PYOPENSSL_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-pyparsing/Config.in b/package/python-pyparsing/Config.in new file mode 100644 index 0000000000..b926286cc4 --- /dev/null +++ b/package/python-pyparsing/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_PYPARSING + bool "python-pyparsing" + help + The pyparsing module is an alternative approach to creating and + executing simple grammars, vs. the traditional lex/yacc approach, + or the use of regular expressions. The pyparsing module provides + a library of classes that client code uses to construct the grammar + directly in Python code. + + http://pyparsing.wikispaces.com/ diff --git a/package/python-pyparsing/python-pyparsing.hash b/package/python-pyparsing/python-pyparsing.hash new file mode 100644 index 0000000000..93a08458df --- /dev/null +++ b/package/python-pyparsing/python-pyparsing.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi/pyparsing/2.0.3, sha256 locally computed +md5 0fe479be09fc2cf005f753d3acc35939 pyparsing-2.0.3.tar.gz +sha256 06e729e1cbf5274703b1f47b6135ed8335999d547f9d8cf048b210fb8ebf844f pyparsing-2.0.3.tar.gz diff --git a/package/python-pyparsing/python-pyparsing.mk b/package/python-pyparsing/python-pyparsing.mk new file mode 100644 index 0000000000..ad066b8f9e --- /dev/null +++ b/package/python-pyparsing/python-pyparsing.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyparsing +# +################################################################################ + +PYTHON_PYPARSING_VERSION = 2.0.3 +PYTHON_PYPARSING_SOURCE = pyparsing-$(PYTHON_PYPARSING_VERSION).tar.gz +PYTHON_PYPARSING_SITE = https://pypi.python.org/packages/source/p/pyparsing +PYTHON_PYPARSING_LICENSE = MIT +PYTHON_PYPARSING_LICENSE_FILES = LICENSE +PYTHON_PYPARSING_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-pyparted/Config.in b/package/python-pyparted/Config.in new file mode 100644 index 0000000000..150159559b --- /dev/null +++ b/package/python-pyparted/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PYTHON_PYPARTED + bool "python-pyparted" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_PYTHON_CFFI # runtime + select BR2_PACKAGE_PARTED + help + Python bindings for GNU parted (libparted). + + https://github.com/rhinstaller/pyparted + +comment "pyparted needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/python-pyparted/python-pyparted.hash b/package/python-pyparted/python-pyparted.hash new file mode 100644 index 0000000000..a2adc41083 --- /dev/null +++ b/package/python-pyparted/python-pyparted.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 5914e3a60437fe3e3758a9e86ee4a539dfa46cfe18e3df386a5cf1f75a963431 python-pyparted-v3.10.7.tar.gz diff --git a/package/python-pyparted/python-pyparted.mk b/package/python-pyparted/python-pyparted.mk new file mode 100644 index 0000000000..4bf58c49eb --- /dev/null +++ b/package/python-pyparted/python-pyparted.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyparted +# +################################################################################ + +PYTHON_PYPARTED_VERSION = v3.10.7 +PYTHON_PYPARTED_SITE = $(call github,rhinstaller,pyparted,$(PYTHON_PYPARTED_VERSION)) +PYTHON_PYPARTED_SETUP_TYPE = distutils +PYTHON_PYPARTED_LICENSE = GPLv2+ +PYTHON_PYPARTED_LICENSE_FILES = COPYING +PYTHON_PYPARTED_DEPENDENCIES = host-python-cffi parted + +$(eval $(python-package)) diff --git a/package/python-pypcap/Config.in b/package/python-pypcap/Config.in new file mode 100644 index 0000000000..ed336ca356 --- /dev/null +++ b/package/python-pypcap/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_PYPCAP + bool "python-pypcap" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_LIBPCAP + help + The pypcap module is an object-oriented wrapper of the C libpcap library. + + https://code.google.com/p/pypcap/ diff --git a/package/python-pypcap/python-pypcap.mk b/package/python-pypcap/python-pypcap.mk new file mode 100644 index 0000000000..97d07f8658 --- /dev/null +++ b/package/python-pypcap/python-pypcap.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# python-pypcap +# +################################################################################ + +PYTHON_PYPCAP_VERSION = 6f46e7bf29a648256ddc732a7d0ec83d3ffca390 +PYTHON_PYPCAP_SITE = $(call github,dugsong,pypcap,$(PYTHON_PYPCAP_VERSION)) +PYTHON_PYPCAP_LICENSE = BSD-3c +PYTHON_PYPCAP_LICENSE_FILES = LICENSE +PYTHON_PYPCAP_SETUP_TYPE = distutils +PYTHON_PYPCAP_DEPENDENCIES = host-python-pyrex libpcap + +define PYTHON_PYPCAP_CONFIGURE_CMDS + $(HOST_DIR)/usr/bin/python2 $(HOST_DIR)/usr/bin/pyrexc $(@D)/pcap.pyx + (cd $(@D); \ + $(HOST_DIR)/usr/bin/python setup.py \ + config --with-pcap=$(STAGING_DIR)/usr) +endef + +$(eval $(python-package)) diff --git a/package/python-pyqt/0001-configure-skip-qtdetail.patch b/package/python-pyqt/0001-configure-skip-qtdetail.patch new file mode 100644 index 0000000000..08e99d026c --- /dev/null +++ b/package/python-pyqt/0001-configure-skip-qtdetail.patch @@ -0,0 +1,29 @@ +Do not run qtdetail + +qtdetail is a tool that generates qtdetail.out. Since this program is +cross-compiled, it's not possible to run it on the host. + +Consequently, python-pyqt.mk generates the qtdetail.out file before +calling configure-ng.py. + +Therefore, this patch makes sure that the pre-generated qtdetail.out +file is kept, and that qtdetail is not executed. + +Signed-off-by: Gwenhael Goavec-Merou +Signed-off-by: Sergey Kostanbaev +--- +Index: PyQt-x11-gpl-4.11.3/configure-ng.py +=================================================================== +--- PyQt-x11-gpl-4.11.3.orig/configure-ng.py ++++ PyQt-x11-gpl-4.11.3/configure-ng.py +@@ -672,10 +672,6 @@ int main(int argc, char **argv) + if cmd is None: + error("Failed to determine the detail of your Qt installation. Try again using the --verbose flag to see more detail about the problem.") + +- # Create the output file, first making sure it doesn't exist. +- remove_file(out_file) +- run_command(cmd, verbose) +- + if not os.access(out_file, os.F_OK): + error("%s failed to create %s. Make sure your Qt installation is correct." % (cmd, out_file)) + diff --git a/package/python-pyqt/0002-configure-set-qws.patch b/package/python-pyqt/0002-configure-set-qws.patch new file mode 100644 index 0000000000..33a5648bee --- /dev/null +++ b/package/python-pyqt/0002-configure-set-qws.patch @@ -0,0 +1,43 @@ +Add support for several Qt flavors + +Qt has two flavors: X11 and embedded (QWS). QWS has some limitations +compared to X11. This patch adds an option to select which version to +use. + +Signed-off-by: Gwenhael Goavec-Merou +--- +Index: PyQt-x11-gpl-4.11.3/configure-ng.py +=================================================================== +--- PyQt-x11-gpl-4.11.3.orig/configure-ng.py ++++ PyQt-x11-gpl-4.11.3/configure-ng.py +@@ -960,6 +960,9 @@ int main(int argc, char **argv) + if opts.vendlibdir is not None: + self.vend_lib_dir = opts.vendlibdir + ++ if opts.qtflavor is not None: ++ self.qt_flavor = opts.qtflavor ++ + # Handle any conflicts. + if self.qt_shared: + if len(self.static_plugins) != 0: +@@ -1177,6 +1180,11 @@ def create_optparser(target_config): + dest="notools", + help="disable the building of pyuic5, pyrcc5 and pylupdate5 " + "[default: enabled]") ++ g.add_option("--qt-flavor", dest='qtflavor', type='string', ++ default="WS_X11", metavar='QTFLAVOR', action='store', ++ help="select Qt flavor beetween WS_X11 and WS_QWS " ++ "only available on Linux)" ++ "[default: WS_X11]") + p.add_option_group(g) + + # Vendor ID. +@@ -2088,7 +2096,7 @@ def get_sip_flags(target_config): + elif target_config.py_platform == 'darwin': + plattag = 'WS_MACX' + else: +- plattag = 'WS_X11' ++ plattag = target_config.qt_flavor + + sip_flags.append('-t') + sip_flags.append(plattag) diff --git a/package/python-pyqt/0003-sip-add_qws.patch b/package/python-pyqt/0003-sip-add_qws.patch new file mode 100644 index 0000000000..1ff706f624 --- /dev/null +++ b/package/python-pyqt/0003-sip-add_qws.patch @@ -0,0 +1,44 @@ +Add WS_QWS in the Platforms variable and to define some types + +Signed-off-by: Gwenhael Goavec-Merou +Signed-off-by: Sergey Kostanbaev +--- +Index: PyQt-x11-gpl-4.11.3/sip/QtCore/QtCoremod.sip +=================================================================== +--- PyQt-x11-gpl-4.11.3.orig/sip/QtCore/QtCoremod.sip ++++ PyQt-x11-gpl-4.11.3/sip/QtCore/QtCoremod.sip +@@ -29,7 +29,7 @@ + + %Timeline {Qt_4_1_0 Qt_4_1_1 Qt_4_1_2 Qt_4_1_3 Qt_4_2_0 Qt_4_2_1 Qt_4_2_2 Qt_4_2_3 Qt_4_3_0 Qt_4_3_1 Qt_4_3_2 Qt_4_3_3 Qt_4_3_4 Qt_4_4_0 Qt_4_4_1 Qt_4_4_2 Qt_4_5_0 Qt_4_5_1 Qt_4_5_2 Qt_4_5_3 Qt_4_6_0 Qt_4_6_1 Qt_4_6_2 Qt_4_6_3 Qt_4_7_0 Qt_4_7_1 Qt_4_7_2 Qt_4_7_3 Qt_4_7_4 Qt_4_8_0 Qt_4_8_1 Qt_4_8_2 Qt_4_8_3 Qt_4_8_4 Qt_4_8_5 Qt_4_8_6 Qt_5_0_0} + +-%Platforms {WS_X11 WS_WIN WS_MACX} ++%Platforms {WS_X11 WS_QWS WS_WIN WS_MACX} + + %Feature PyQt_Accessibility + %Feature PyQt_SessionManager +Index: PyQt-x11-gpl-4.11.3/sip/QtCore/qprocess.sip +=================================================================== +--- PyQt-x11-gpl-4.11.3.orig/sip/QtCore/qprocess.sip ++++ PyQt-x11-gpl-4.11.3/sip/QtCore/qprocess.sip +@@ -28,7 +28,7 @@ + %If (WS_WIN) + typedef void *Q_PID; + %End +-%If (WS_X11 || WS_MACX) ++%If (WS_X11 || WS_QWS || WS_MACX) + typedef qint64 Q_PID; + %End + +Index: PyQt-x11-gpl-4.11.3/sip/QtGui/qwindowdefs.sip +=================================================================== +--- PyQt-x11-gpl-4.11.3.orig/sip/QtGui/qwindowdefs.sip ++++ PyQt-x11-gpl-4.11.3/sip/QtGui/qwindowdefs.sip +@@ -27,7 +27,7 @@ + + typedef QList QWidgetList; + %If (- Qt_5_0_0) +-%If (WS_X11) ++%If (WS_X11 || WS_QWS) + // X11 specific definitions. + typedef unsigned long WId; + %End diff --git a/package/python-pyqt/0004-sip-QtGuit-hide-qfont-cachestatistics.patch b/package/python-pyqt/0004-sip-QtGuit-hide-qfont-cachestatistics.patch new file mode 100644 index 0000000000..c07bea777f --- /dev/null +++ b/package/python-pyqt/0004-sip-QtGuit-hide-qfont-cachestatistics.patch @@ -0,0 +1,18 @@ +Hide QFont::cacheStatistics which isn't available in QWS + +Signed-off-by: Sergey Kostanbaev +--- + +diff -ur PyQt-x11-gpl-4.9.6/sip/QtGui/qfont.sip pyqt-4.9.6/sip/QtGui/qfont.sip +--- PyQt-x11-gpl-4.9.6/sip/QtGui/qfont.sip 2012-12-08 13:51:38.000000000 +0400 ++++ pyqt-4.9.6/sip/QtGui/qfont.sip 2013-05-22 14:06:38.335000022 +0400 +@@ -185,7 +185,9 @@ + %End + static void initialize(); + static void cleanup(); ++%If (!WS_QWS) + static void cacheStatistics(); ++%End + QString defaultFamily() const; + QString lastResortFamily() const; + QString lastResortFont() const; diff --git a/package/python-pyqt/0005-sip-fix_qws_handle.patch b/package/python-pyqt/0005-sip-fix_qws_handle.patch new file mode 100644 index 0000000000..80623d112a --- /dev/null +++ b/package/python-pyqt/0005-sip-fix_qws_handle.patch @@ -0,0 +1,24 @@ +Fix build issue in QWS flavor + +Change HANDLE to void* to get rid of : +buildroot/output/build/python-pyqt-4.11.3/QtCore/sipQtCoreQThread.cpp:318:50: +error: invalid conversion from 'Qt::HANDLE {aka void*}' to 'long +unsigned int' [-fpermissive] error during compilation. + +Signed-off-by: Gwenhael Goavec-Merou +Signed-off-by: Sergey Kostanbaev +--- +Index: PyQt-x11-gpl-4.11.3/sip/QtCore/qnamespace.sip +=================================================================== +--- PyQt-x11-gpl-4.11.3.orig/sip/QtCore/qnamespace.sip ++++ PyQt-x11-gpl-4.11.3/sip/QtCore/qnamespace.sip +@@ -1673,6 +1673,9 @@ namespace Qt + %If (WS_X11) + typedef unsigned long HANDLE; + %End ++%If (WS_QWS) ++ typedef void* HANDLE; ++%End + %End + %If (PyQt_Deprecated_5_0) + typedef Qt::WindowFlags WFlags; diff --git a/package/python-pyqt/Config.in b/package/python-pyqt/Config.in new file mode 100644 index 0000000000..a50cb74a43 --- /dev/null +++ b/package/python-pyqt/Config.in @@ -0,0 +1,25 @@ +comment "python-pyqt needs a toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_PYTHON_PYQT + bool "python-pyqt" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # qt + depends on BR2_USE_MMU # qt + select BR2_PACKAGE_QT + select BR2_PACKAGE_PYTHON_SIP + help + PyQt4 for Qt Embedded 4 bindings. + + http://www.riverbankcomputing.com/software/pyqt/ + +if BR2_PACKAGE_PYTHON_PYQT + +config BR2_PACKAGE_PYTHON_PYQT_ARCH_USES_QREAL_FLOAT + bool + default y if BR2_arm || BR2_armeb + default y if BR2_sh4 || BR2_sh4eb || BR2_sh4a || BR2_sh4aeb + default y if (BR2_mipsel || BR2_mips) && BR2_PACKAGE_QT_EMBEDDED + +endif diff --git a/package/python-pyqt/python-pyqt.hash b/package/python-pyqt/python-pyqt.hash new file mode 100644 index 0000000000..1709b66ab8 --- /dev/null +++ b/package/python-pyqt/python-pyqt.hash @@ -0,0 +1,5 @@ +# From http://http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.11.3/ +md5 997c3e443165a89a559e0d96b061bf70 PyQt-x11-gpl-4.11.3.tar.gz + +# Locally calculated: +sha256 853780dcdbe2e6ba785d703d059b096e1fc49369d3e8d41a060be874b8745686 PyQt-x11-gpl-4.11.3.tar.gz diff --git a/package/python-pyqt/python-pyqt.mk b/package/python-pyqt/python-pyqt.mk new file mode 100644 index 0000000000..fa298c480f --- /dev/null +++ b/package/python-pyqt/python-pyqt.mk @@ -0,0 +1,116 @@ +################################################################################ +# +# python-pyqt +# +################################################################################ + +PYTHON_PYQT_VERSION = 4.11.3 +PYTHON_PYQT_SOURCE = PyQt-x11-gpl-$(PYTHON_PYQT_VERSION).tar.gz +PYTHON_PYQT_SITE = http://downloads.sourceforge.net/project/pyqt/PyQt4/PyQt-$(PYTHON_PYQT_VERSION) +PYTHON_PYQT_LICENSE = GPLv2 or GPLv3 +PYTHON_PYQT_LICENSE_FILES = LICENSE.GPL2 LICENSE.GPL3 + +PYTHON_PYQT_DEPENDENCIES = python-sip host-python-sip qt + +ifeq ($(BR2_PACKAGE_PYTHON),y) +PYTHON_PYQT_PYTHON_DIR = python$(PYTHON_VERSION_MAJOR) +PYTHON_PYQT_RM_PORT_BASE = port_v3 +else ifeq ($(BR2_PACKAGE_PYTHON3),y) +PYTHON_PYQT_PYTHON_DIR = python$(PYTHON3_VERSION_MAJOR) +PYTHON_PYQT_RM_PORT_BASE = port_v2 +endif + +ifeq ($(BR2_PACKAGE_QT_EMBEDDED),y) +PYTHON_PYQT_QTFLAVOR = WS_QWS +else +PYTHON_PYQT_QTFLAVOR = WS_X11 +endif + +PYTHON_PYQT_QTDETAIL_LICENSE = Open Source + +ifeq ($(BR2_PACKAGE_QT_SHARED),y) +PYTHON_PYQT_QTDETAIL_TYPE = shared +endif + +# Turn off features that aren't available in QWS and current qt +# configuration. +PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES = \ + PyQt_Accessibility PyQt_SessionManager \ + PyQt_Shortcut PyQt_RawFont + +ifeq ($(BR2_PACKAGE_QT_OPENSSL),) +PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES += PyQt_OpenSSL +endif + +# Yes, this looks a bit weird: when OpenGL ES is available, we have to +# disable the feature that consists in not having OpenGL ES support. +ifeq ($(BR2_PACKAGE_QT_OPENGL_ES),y) +PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES += PyQt_NoOpenGLES +endif + +# PyQt_qreal_double must be disabled on a number of architectures that +# use float for qreal. +ifeq ($(BR2_PACKAGE_PYTHON_PYQT_ARCH_USES_QREAL_FLOAT),y) +PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES += PyQt_qreal_double +endif + +define PYTHON_PYQT_QTDETAIL + echo $(1) >> $(2)/qtdetail.out +endef + +# Since we can't run generate qtdetail.out by running qtdetail on target device +# we must generate the configuration. +define PYTHON_PYQT_GENERATE_QTDETAIL + $(RM) -f $(1)/qtdetail.out + $(call PYTHON_PYQT_QTDETAIL,$(PYTHON_PYQT_QTDETAIL_LICENSE),$(1)) + $(call PYTHON_PYQT_QTDETAIL,$(PYTHON_PYQT_QTDETAIL_TYPE),$(1)) + $(foreach f,$(PYTHON_PYQT_QTDETAIL_DISABLE_FEATURES), + $(call PYTHON_PYQT_QTDETAIL,$(f),$(1)) \ + ) +endef + +PYTHON_PYQT_CONF_OPTS = \ + --bindir $(TARGET_DIR)/usr/bin \ + --destdir $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages \ + --qmake $(HOST_DIR)/usr/bin/qmake \ + --sysroot $(STAGING_DIR)/usr \ + -w --confirm-license \ + --no-designer-plugin \ + --no-docstrings \ + --no-sip-files \ + --qt-flavor=$(PYTHON_PYQT_QTFLAVOR) + +# The VendorID related information is only needed for Python 2.x, not +# Python 3.x. +ifeq ($(BR2_PACKAGE_PYTHON),y) +PYTHON_PYQT_CONF_OPTS += \ + --vendorid-incdir $(STAGING_DIR)/usr/include/$(PYTHON_PYQT_PYTHON_DIR) \ + --vendorid-libdir $(STAGING_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/config +endif + +define PYTHON_PYQT_CONFIGURE_CMDS + $(call PYTHON_PYQT_GENERATE_QTDETAIL,$(@D)) + (cd $(@D); \ + $(TARGET_MAKE_ENV) \ + $(TARGET_CONFIGURE_OPTS) \ + $(HOST_DIR)/usr/bin/python configure-ng.py \ + $(PYTHON_PYQT_CONF_OPTS) \ + ) +endef + +define PYTHON_PYQT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +# __init__.py is needed to import PyQt4 +# __init__.pyc is needed if BR2_PACKAGE_PYTHON_PYC_ONLY is set +define PYTHON_PYQT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) install + touch $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages/PyQt4/__init__.py + $(RM) -rf $(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages/PyQt4/uic/$(PYTHON_PYQT_RM_PORT_BASE) + PYTHONPATH="$(PYTHON_PATH)" \ + $(HOST_DIR)/usr/bin/python -c "import compileall; \ + compileall.compile_dir('$(TARGET_DIR)/usr/lib/$(PYTHON_PYQT_PYTHON_DIR)/site-packages/PyQt4')" +endef + +$(eval $(generic-package)) diff --git a/package/python-pyratemp/Config.in b/package/python-pyratemp/Config.in new file mode 100644 index 0000000000..9a299d1aee --- /dev/null +++ b/package/python-pyratemp/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_PYRATEMP + bool "python-pyratemp" + help + python-pyratemp is a Python library for doing html + templates. written entirely in Python, that is designed to + be very easy to use and very like writing Python. + + https://pypi.python.org/pypi/pyratemp/ diff --git a/package/python-pyratemp/python-pyratemp.hash b/package/python-pyratemp/python-pyratemp.hash new file mode 100644 index 0000000000..f3f29a39a8 --- /dev/null +++ b/package/python-pyratemp/python-pyratemp.hash @@ -0,0 +1,4 @@ +#md5 from https://pypi.python.org/pypi?:action=show_md5&digest=e4bbe5d4a98016efef882b2b2f47defb +md5 e4bbe5d4a98016efef882b2b2f47defb pyratemp-0.3.2.tgz +# Locally calculated: +sha256 c45ed656ada482a02fe780495f37a695e7671accb04f918f7e7f18abf877bc71 pyratemp-0.3.2.tgz diff --git a/package/python-pyratemp/python-pyratemp.mk b/package/python-pyratemp/python-pyratemp.mk new file mode 100644 index 0000000000..055fb3049c --- /dev/null +++ b/package/python-pyratemp/python-pyratemp.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyratemp +# +################################################################################ + +PYTHON_PYRATEMP_VERSION = 0.3.2 +PYTHON_PYRATEMP_SOURCE = pyratemp-$(PYTHON_PYRATEMP_VERSION).tgz +PYTHON_PYRATEMP_SITE = https://pypi.python.org/packages/source/p/pyratemp +PYTHON_PYRATEMP_LICENSE = MIT +PYTHON_PYRATEMP_LICENSE_FILES = LICENSE +PYTHON_PYRATEMP_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-pyrex/python-pyrex.hash b/package/python-pyrex/python-pyrex.hash new file mode 100644 index 0000000000..607d30360b --- /dev/null +++ b/package/python-pyrex/python-pyrex.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 5f87df06831d0b3412eb4bc9d3fc2ee7bfae1b913d7da8c23ab2bf5699fb6b50 Pyrex-0.9.9.tar.gz diff --git a/package/python-pyrex/python-pyrex.mk b/package/python-pyrex/python-pyrex.mk new file mode 100644 index 0000000000..6ddb2dcf37 --- /dev/null +++ b/package/python-pyrex/python-pyrex.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-pyrex +# +################################################################################ + +PYTHON_PYREX_VERSION = 0.9.9 +PYTHON_PYREX_SOURCE = Pyrex-$(PYTHON_PYREX_VERSION).tar.gz +PYTHON_PYREX_SITE = http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex +PYTHON_PYREX_LICENSE = Apache-v2 +PYTHON_PYREX_LICENSE_FILES = LICENSE.txt +PYTHON_PYREX_SETUP_TYPE = distutils +HOST_PYTHON_PYREX_NEEDS_HOST_PYTHON = python2 + +$(eval $(host-python-package)) diff --git a/package/python-pyro/Config.in b/package/python-pyro/Config.in new file mode 100644 index 0000000000..eb998c3970 --- /dev/null +++ b/package/python-pyro/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_PYRO + bool "python-pyro" + depends on BR2_PACKAGE_PYTHON + help + python-pyro is a Python library stands for PYthon Remote Objects. + It is an advanced and powerful Distributed Object Technology system + written entirely in Python, that is designed to be very easy to use.. + + https://pypi.python.org/pypi/Pyro/ diff --git a/package/python-pyro/python-pyro.mk b/package/python-pyro/python-pyro.mk new file mode 100644 index 0000000000..26c026e87c --- /dev/null +++ b/package/python-pyro/python-pyro.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyro +# +################################################################################ + +PYTHON_PYRO_VERSION = 3.14 +PYTHON_PYRO_SOURCE = Pyro-$(PYTHON_PYRO_VERSION).tar.gz +PYTHON_PYRO_SITE = https://pypi.python.org/packages/source/P/Pyro +PYTHON_PYRO_LICENSE = MIT +PYTHON_PYRO_LICENSE_FILES = LICENSE +PYTHON_PYRO_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-pyroute2/Config.in b/package/python-pyroute2/Config.in new file mode 100644 index 0000000000..4f13ab2c7b --- /dev/null +++ b/package/python-pyroute2/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_PYROUTE2 + bool "python-pyroute2" + help + Python netlink library - Linux network / netns / wireless / + ipset configuration. + + https://github.com/svinota/pyroute2 diff --git a/package/python-pyroute2/python-pyroute2.hash b/package/python-pyroute2/python-pyroute2.hash new file mode 100644 index 0000000000..df9ff02cce --- /dev/null +++ b/package/python-pyroute2/python-pyroute2.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=459b4020073b767cc129e360dabbd2d7, sha256 locally computed +md5 459b4020073b767cc129e360dabbd2d7 pyroute2-0.3.20.tar.gz +sha256 ed28856753b941d4277b2f14b89c9edec35be4c97e1831f900fe4ce6fc12161b pyroute2-0.3.20.tar.gz diff --git a/package/python-pyroute2/python-pyroute2.mk b/package/python-pyroute2/python-pyroute2.mk new file mode 100644 index 0000000000..2e9e0ddff4 --- /dev/null +++ b/package/python-pyroute2/python-pyroute2.mk @@ -0,0 +1,14 @@ +############################################################# +# +# python-pyroute2 +# +############################################################# + +PYTHON_PYROUTE2_VERSION = 0.3.20 +PYTHON_PYROUTE2_SOURCE = pyroute2-$(PYTHON_PYROUTE2_VERSION).tar.gz +PYTHON_PYROUTE2_SITE = https://pypi.python.org/packages/source/p/pyroute2 +PYTHON_PYROUTE2_LICENSE = Apache-2.0 or GPLv2+ +PYTHON_PYROUTE2_LICENSE_FILES = LICENSE.Apache.v2 LICENSE.GPL.v2 README.license.md +PYTHON_PYROUTE2_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-pysendfile/Config.in b/package/python-pysendfile/Config.in new file mode 100644 index 0000000000..5a919dd979 --- /dev/null +++ b/package/python-pysendfile/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_PYSENDFILE + bool "python-pysendfile" + help + A Python interface to sendfile(2) syscall + + https://github.com/giampaolo/pysendfile diff --git a/package/python-pysendfile/python-pysendfile.hash b/package/python-pysendfile/python-pysendfile.hash new file mode 100644 index 0000000000..755be50364 --- /dev/null +++ b/package/python-pysendfile/python-pysendfile.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 f4ca8a7f0be67e3d710c0633dd9aadab6881203c31cb9eb9be4f10361ad3f937 python-pysendfile-2.0.1.tar.gz diff --git a/package/python-pysendfile/python-pysendfile.mk b/package/python-pysendfile/python-pysendfile.mk new file mode 100644 index 0000000000..bb8f057d3d --- /dev/null +++ b/package/python-pysendfile/python-pysendfile.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-pysendfile +# +################################################################################ + +PYTHON_PYSENDFILE_VERSION = 2.0.1 +PYTHON_PYSENDFILE_SITE = $(call github,giampaolo,pysendfile,release-$(PYTHON_PYSENDFILE_VERSION)) +PYTHON_PYSENDFILE_SETUP_TYPE = setuptools +PYTHON_PYSENDFILE_LICENSE = MIT +PYTHON_PYSENDFILE_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-pysmb/Config.in b/package/python-pysmb/Config.in new file mode 100644 index 0000000000..42a9984ef7 --- /dev/null +++ b/package/python-pysmb/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_PYTHON_PYSMB + bool "python-pysmb" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_PYTHON_PYASN + help + pysmb is an experimental SMB/CIFS library written in Python. + It implements the client-side SMB/CIFS protocol (SMB1 and SMB2) + which allows your Python application to access and transfer files + to/from SMB/CIFS shared folders like your Windows file sharing and + Samba folders. + + https://miketeo.net/wp/index.php/projects/pysmb + +comment "python-pysmb needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-pysmb/python-pysmb.hash b/package/python-pysmb/python-pysmb.hash new file mode 100644 index 0000000000..4c410689a1 --- /dev/null +++ b/package/python-pysmb/python-pysmb.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=9fe70cbc812b2e789915bedea7e45b1a, sha256 locally computed +md5 9fe70cbc812b2e789915bedea7e45b1a pysmb-1.1.18.tar.gz +sha256 580f7dcf8048656d2924c2f78731feaeaf6f9fa8ef5c251fc6964d39bfd3a6b9 pysmb-1.1.18.tar.gz diff --git a/package/python-pysmb/python-pysmb.mk b/package/python-pysmb/python-pysmb.mk new file mode 100644 index 0000000000..51df91da3c --- /dev/null +++ b/package/python-pysmb/python-pysmb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pysmb +# +################################################################################ + +PYTHON_PYSMB_VERSION = 1.1.18 +PYTHON_PYSMB_SOURCE = pysmb-$(PYTHON_PYSMB_VERSION).tar.gz +PYTHON_PYSMB_SITE = https://pypi.python.org/packages/source/p/pysmb +PYTHON_PYSMB_LICENSE = libpng license +PYTHON_PYSMB_LICENSE_FILES = LICENSE +PYTHON_PYSMB_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-pysnmp-apps/Config.in b/package/python-pysnmp-apps/Config.in new file mode 100644 index 0000000000..b032eba1fe --- /dev/null +++ b/package/python-pysnmp-apps/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PYTHON_PYSNMP_APPS + bool "python-pysnmp-apps" + select BR2_PACKAGE_PYTHON_PYSNMP + depends on BR2_INSTALL_LIBSTDCPP # pysnmp -> pyasn + help + A collection of command-line tools for SNMP management + purposes built on top of the PySNMP package. + + http://pysnmp.sf.net + +comment "python-pysnmp-apps needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-pysnmp-apps/python-pysnmp-apps.mk b/package/python-pysnmp-apps/python-pysnmp-apps.mk new file mode 100644 index 0000000000..d6e9db2d79 --- /dev/null +++ b/package/python-pysnmp-apps/python-pysnmp-apps.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# python-pysnmp-apps +# +################################################################################ + +PYTHON_PYSNMP_APPS_VERSION = 0.3.3 +PYTHON_PYSNMP_APPS_SOURCE = pysnmp-apps-$(PYTHON_PYSNMP_APPS_VERSION).tar.gz +PYTHON_PYSNMP_APPS_SITE = https://pypi.python.org/packages/source/p/pysnmp-apps +PYTHON_PYSNMP_APPS_SETUP_TYPE = setuptools +PYTHON_PYSNMP_APPS_LICENSE = BSD-3c +PYTHON_PYSNMP_APPS_LICENSE_FILES = LICENSE + +PYTHON_PYSNMP_APPS_DEPENDENCIES = python-pysnmp + +$(eval $(python-package)) diff --git a/package/python-pysnmp-mibs/Config.in b/package/python-pysnmp-mibs/Config.in new file mode 100644 index 0000000000..eca17d26aa --- /dev/null +++ b/package/python-pysnmp-mibs/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_PYTHON_PYSNMP_MIBS + bool "python-pysnmp-mibs" + select BR2_PACKAGE_PYTHON_PYSNMP + depends on BR2_INSTALL_LIBSTDCPP # pysnmp -> pyasn + help + PySNMP MIBs is a set of IETF & IANA MIBs pre-compiled and + packaged to simplify their use with the PySNMP library. + + http://pysnmp.sf.net + +comment "python-pysnmp-libs needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-pysnmp-mibs/python-pysnmp-mibs.mk b/package/python-pysnmp-mibs/python-pysnmp-mibs.mk new file mode 100644 index 0000000000..21b9673764 --- /dev/null +++ b/package/python-pysnmp-mibs/python-pysnmp-mibs.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# python-pysnmp-mibs +# +################################################################################ + +PYTHON_PYSNMP_MIBS_VERSION = 0.1.4 +PYTHON_PYSNMP_MIBS_SOURCE = pysnmp-mibs-$(PYTHON_PYSNMP_MIBS_VERSION).tar.gz +PYTHON_PYSNMP_MIBS_SITE = https://pypi.python.org/packages/source/p/pysnmp-mibs +PYTHON_PYSNMP_MIBS_SETUP_TYPE = setuptools +PYTHON_PYSNMP_MIBS_LICENSE = BSD-3c +PYTHON_PYSNMP_MIBS_LICENSE_FILES = LICENSE + +PYTHON_PYSNMP_MIBS_DEPENDENCIES = python-pysnmp + +$(eval $(python-package)) diff --git a/package/python-pysnmp/Config.in b/package/python-pysnmp/Config.in new file mode 100644 index 0000000000..c7cdf3892d --- /dev/null +++ b/package/python-pysnmp/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_PYTHON_PYSNMP + bool "python-pysnmp" + depends on BR2_INSTALL_LIBSTDCPP # pyasn + select BR2_PACKAGE_PYTHON_PYASN + select BR2_PACKAGE_PYTHON_PYCRYPTO + help + PySNMP is a cross-platform, pure-Python SNMP engine + implementation. + + http://pysnmp.sf.net + +comment "python-pysnmp needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-pysnmp/python-pysnmp.mk b/package/python-pysnmp/python-pysnmp.mk new file mode 100644 index 0000000000..3d0f3b52cd --- /dev/null +++ b/package/python-pysnmp/python-pysnmp.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# python-pysnmp +# +################################################################################ + +PYTHON_PYSNMP_VERSION = 4.2.4 +PYTHON_PYSNMP_SOURCE = pysnmp-$(PYTHON_PYSNMP_VERSION).tar.gz +PYTHON_PYSNMP_SITE = https://pypi.python.org/packages/source/p/pysnmp +PYTHON_PYSNMP_SETUP_TYPE = setuptools + +PYTHON_PYSNMP_LICENSE = BSD-3c +PYTHON_PYSNMP_LICENSE_FILES = LICENSE + +PYTHON_PYSNMP_DEPENDENCIES = python-pyasn python-pycrypto + +$(eval $(python-package)) diff --git a/package/python-pysocks/Config.in b/package/python-pysocks/Config.in new file mode 100644 index 0000000000..cd38d4d3bc --- /dev/null +++ b/package/python-pysocks/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_PYSOCKS + bool "python-pysocks" + help + A Python SOCKS client module. + + https://github.com/Anorov/PySocks diff --git a/package/python-pysocks/python-pysocks.hash b/package/python-pysocks/python-pysocks.hash new file mode 100644 index 0000000000..9388c42dac --- /dev/null +++ b/package/python-pysocks/python-pysocks.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=c825c7c52b2c79dde73cac8d04bd25cb, sha256 locally computed +md5 c825c7c52b2c79dde73cac8d04bd25cb PySocks-1.5.6.tar.gz +sha256 a62b35b13968ba3642a973d115ae6a11be886b5f5ae0841a3ecad4b4f1d7deb1 PySocks-1.5.6.tar.gz diff --git a/package/python-pysocks/python-pysocks.mk b/package/python-pysocks/python-pysocks.mk new file mode 100644 index 0000000000..a556ced8b4 --- /dev/null +++ b/package/python-pysocks/python-pysocks.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pysocks +# +################################################################################ + +PYTHON_PYSOCKS_VERSION = 1.5.6 +PYTHON_PYSOCKS_SOURCE = PySocks-$(PYTHON_PYSOCKS_VERSION).tar.gz +PYTHON_PYSOCKS_SITE = https://pypi.python.org/packages/source/P/PySocks +PYTHON_PYSOCKS_LICENSE = BSD-3c +PYTHON_PYSOCKS_LICENSE_FILES = socks.py +PYTHON_PYSOCKS_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-pytrie/Config.in b/package/python-pytrie/Config.in new file mode 100644 index 0000000000..fb1df41d0a --- /dev/null +++ b/package/python-pytrie/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_PYTRIE + bool "python-pytrie" + help + A pure Python implementation of the trie data structure. + + https://pypi.python.org/pypi/PyTrie diff --git a/package/python-pytrie/python-pytrie.hash b/package/python-pytrie/python-pytrie.hash new file mode 100644 index 0000000000..88d2542a8d --- /dev/null +++ b/package/python-pytrie/python-pytrie.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=5997b46c854a68bc588f4527c987663a, sha256 locally computed. +md5 5997b46c854a68bc588f4527c987663a PyTrie-0.2.tar.gz +sha256 b272021351efadc6757591aac03ed4794bdfd091122204a4673e94bfb66cc500 PyTrie-0.2.tar.gz diff --git a/package/python-pytrie/python-pytrie.mk b/package/python-pytrie/python-pytrie.mk new file mode 100644 index 0000000000..e3bea4f690 --- /dev/null +++ b/package/python-pytrie/python-pytrie.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pytrie +# +################################################################################ + +PYTHON_PYTRIE_VERSION = 0.2 +PYTHON_PYTRIE_SITE = http://pypi.python.org/packages/source/P/PyTrie +PYTHON_PYTRIE_SOURCE = PyTrie-$(PYTHON_PYTRIE_VERSION).tar.gz +PYTHON_PYTRIE_LICENSE = BSD-3c +PYTHON_PYTRIE_LICENSE_FILES = LICENSE +PYTHON_PYTRIE_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-pytz/Config.in b/package/python-pytz/Config.in new file mode 100644 index 0000000000..0f51232334 --- /dev/null +++ b/package/python-pytz/Config.in @@ -0,0 +1,3 @@ +config BR2_PACKAGE_PYTHON_PYTZ + bool "python-pytz" + depends on BR2_PACKAGE_PYTHON diff --git a/package/python-pytz/python-pytz.mk b/package/python-pytz/python-pytz.mk new file mode 100644 index 0000000000..79d0033934 --- /dev/null +++ b/package/python-pytz/python-pytz.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# python-pytz +# +################################################################################ + +PYTHON_PYTZ_VERSION = 2014.2 +PYTHON_PYTZ_SOURCE = pytz-$(PYTHON_PYTZ_VERSION).tar.gz +PYTHON_PYTZ_SITE = http://pypi.python.org/packages/source/p/pytz +PYTHON_PYTZ_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-pyudev/0001-Workaround-finding-libudev-on-systems-without-ldconf.patch b/package/python-pyudev/0001-Workaround-finding-libudev-on-systems-without-ldconf.patch new file mode 100644 index 0000000000..93b9568593 --- /dev/null +++ b/package/python-pyudev/0001-Workaround-finding-libudev-on-systems-without-ldconf.patch @@ -0,0 +1,47 @@ +From e86a1c199d45c9751da67f947af202927dee07f8 Mon Sep 17 00:00:00 2001 +From: Yegor Yefremov +Date: Thu, 10 Dec 2015 08:44:55 +0100 +Subject: [PATCH] Workaround finding libudev on systems without ldconf + +This patch tries to load libudev.so directly without relying on +Python's find_library(). find_library() fails on systems +without library cache mechanism. + +Taken from pyudev issue 117 discussion: +https://github.com/pyudev/pyudev/pull/117 + +Signed-off-by: Yegor Yefremov +--- + src/pyudev/_libudev.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/pyudev/_libudev.py b/src/pyudev/_libudev.py +index a0de8fb..1348d17 100644 +--- a/src/pyudev/_libudev.py ++++ b/src/pyudev/_libudev.py +@@ -30,7 +30,7 @@ + from __future__ import (print_function, division, unicode_literals, + absolute_import) + +-from ctypes import (CDLL, Structure, POINTER, ++from ctypes import (cdll, CDLL, Structure, POINTER, + c_char, c_char_p, c_int, c_uint, c_ulonglong) + from ctypes.util import find_library + +@@ -265,10 +265,10 @@ def load_udev_library(): + + Raise :exc:`~exceptions.ImportError`, if the udev library was not found. + """ +- udev_library_name = find_library('udev') +- if not udev_library_name: ++ try: ++ libudev = cdll.LoadLibrary('libudev.so') ++ except OSError: + raise ImportError('No library named udev') +- libudev = CDLL(udev_library_name, use_errno=True) + # context function signature + for namespace, members in SIGNATURES.items(): + for funcname in members: +-- +2.1.4 + diff --git a/package/python-pyudev/Config.in b/package/python-pyudev/Config.in new file mode 100644 index 0000000000..137a983ae7 --- /dev/null +++ b/package/python-pyudev/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_PYUDEV + bool "python-pyudev" + depends on BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime + select BR2_PACKAGE_PYTHON_SIX # runtime + help + pyudev is a LGPL licenced, pure Python 2/3 binding to libudev, + the device and hardware management and information library of Linux. + + https://github.com/pyudev/pyudev + +comment "python-pyudev needs udev /dev management" + depends on !BR2_PACKAGE_HAS_UDEV diff --git a/package/python-pyudev/python-pyudev.hash b/package/python-pyudev/python-pyudev.hash new file mode 100644 index 0000000000..adda9a4d25 --- /dev/null +++ b/package/python-pyudev/python-pyudev.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=07a60f5f7a6028e83725f759a1b9490a, sha256 locally computed +md5 07a60f5f7a6028e83725f759a1b9490a pyudev-0.18.tar.gz +sha256 83b315f74e29c3a4aa6ea38b6cf73b0bb7e37066d7a5d70972ac418a80aed62a pyudev-0.18.tar.gz diff --git a/package/python-pyudev/python-pyudev.mk b/package/python-pyudev/python-pyudev.mk new file mode 100644 index 0000000000..70c4faf8de --- /dev/null +++ b/package/python-pyudev/python-pyudev.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyudev +# +################################################################################ + +PYTHON_PYUDEV_VERSION = 0.18 +PYTHON_PYUDEV_SOURCE = pyudev-$(PYTHON_PYUDEV_VERSION).tar.gz +PYTHON_PYUDEV_SITE = https://pypi.python.org/packages/source/p/pyudev +PYTHON_PYUDEV_LICENSE = LGPLv2.1+ +PYTHON_PYUDEV_LICENSE_FILES = COPYING +PYTHON_PYUDEV_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-pyusb/Config.in b/package/python-pyusb/Config.in new file mode 100644 index 0000000000..de5b487014 --- /dev/null +++ b/package/python-pyusb/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_PYUSB + bool "python-pyusb" + depends on BR2_PACKAGE_PYTHON + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + help + The PyUSB module provides easy access to the Universal + Serial Bus (USB) from Python. + + http://sourceforge.net/apps/trac/pyusb/ + +comment "python-pyusb needs a toolchain w/ threads" + depends on BR2_PACKAGE_PYTHON + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/python-pyusb/python-pyusb.mk b/package/python-pyusb/python-pyusb.mk new file mode 100644 index 0000000000..ae69026f4e --- /dev/null +++ b/package/python-pyusb/python-pyusb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-pyusb +# +################################################################################ + +PYTHON_PYUSB_VERSION = 1.0.0b2 +PYTHON_PYUSB_SITE = $(call github,walac,pyusb,$(PYTHON_PYUSB_VERSION)) +PYTHON_PYUSB_LICENSE = BSD-3c +PYTHON_PYUSB_LICENSE_FILES = LICENSE +PYTHON_PYUSB_SETUP_TYPE = distutils +PYTHON_PYUSB_DEPENDENCIES = libusb + +$(eval $(python-package)) diff --git a/package/python-pyxb/Config.in b/package/python-pyxb/Config.in new file mode 100644 index 0000000000..f1226717ab --- /dev/null +++ b/package/python-pyxb/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_PYXB + bool "python-pyxb" + help + PyXB is a pure Python package that generates Python code + for classes that correspond to data structures defined by XMLSchema. + + http://pyxb.sourceforge.net/ diff --git a/package/python-pyxb/python-pyxb.hash b/package/python-pyxb/python-pyxb.hash new file mode 100644 index 0000000000..d8b43f8c45 --- /dev/null +++ b/package/python-pyxb/python-pyxb.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 14ced19ecce51e7cd26434446f9bd6b4e309e91806f1f6fc5e21f4ac736aa0de python-pyxb-1.2.4.tar.gz diff --git a/package/python-pyxb/python-pyxb.mk b/package/python-pyxb/python-pyxb.mk new file mode 100644 index 0000000000..eb9ffcebb2 --- /dev/null +++ b/package/python-pyxb/python-pyxb.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-pyxb +# +################################################################################ + +PYTHON_PYXB_VERSION = 1.2.4 +PYTHON_PYXB_SITE = $(call github,pabigot,pyxb,PyXB-$(PYTHON_PYXB_VERSION)) +PYTHON_PYXB_LICENSE = Apache-2.0 +PYTHON_PYXB_LICENSE_FILES = LICENSE +PYTHON_PYXB_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-pyyaml/Config.in b/package/python-pyyaml/Config.in new file mode 100644 index 0000000000..45e818b7e7 --- /dev/null +++ b/package/python-pyyaml/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_PYYAML + bool "python-pyyaml" + select BR2_PACKAGE_LIBYAML + help + The PyYAML package contains binding to the libyaml API. + + http://pyyaml.org/ diff --git a/package/python-pyyaml/python-pyyaml.hash b/package/python-pyyaml/python-pyyaml.hash new file mode 100644 index 0000000000..a6d9a776a0 --- /dev/null +++ b/package/python-pyyaml/python-pyyaml.hash @@ -0,0 +1,4 @@ +# From https://pypi.python.org/pypi?:action=show_md5&digest=f50e08ef0fe55178479d3a618efe21db +md5 f50e08ef0fe55178479d3a618efe21db PyYAML-3.11.tar.gz +# Locally computed +sha256 c36c938a872e5ff494938b33b14aaa156cb439ec67548fcab3535bb78b0846e8 PyYAML-3.11.tar.gz diff --git a/package/python-pyyaml/python-pyyaml.mk b/package/python-pyyaml/python-pyyaml.mk new file mode 100644 index 0000000000..f3d72833db --- /dev/null +++ b/package/python-pyyaml/python-pyyaml.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-pyyaml +# +################################################################################ + +PYTHON_PYYAML_VERSION = 3.11 +PYTHON_PYYAML_SOURCE = PyYAML-$(PYTHON_PYYAML_VERSION).tar.gz +PYTHON_PYYAML_SITE = https://pypi.python.org/packages/source/P/PyYAML +PYTHON_PYYAML_SETUP_TYPE = distutils +PYTHON_PYYAML_LICENSE = Python software foundation license v2 +PYTHON_PYYAML_LICENSE_FILES = LICENSE +PYTHON_PYYAML_DEPENDENCIES = libyaml + +$(eval $(python-package)) diff --git a/package/python-pyzmq/0001-use-buildroot-zmq-version-instead-of-detect.patch b/package/python-pyzmq/0001-use-buildroot-zmq-version-instead-of-detect.patch new file mode 100644 index 0000000000..560606989e --- /dev/null +++ b/package/python-pyzmq/0001-use-buildroot-zmq-version-instead-of-detect.patch @@ -0,0 +1,43 @@ +detect.py: fix the ZMQ version check to the ZMQ version of the buildroot + +The setup.py script tries to compile a test C program and runs it, to +retrieve a version string for the installed ZMQ library, but if the cross +compiler links it together, the result cannot be run on the host, due to +different architectures and libraries. + +And if the host compiler would compile/link it, it would not link with the +library version inside buildroot but with the library from the host, possibly returning a wrong version number. + +Instead of trying to run the compiled test program to get the version +dynamically, return the version of the buildroot environment. + +Signed-off-by: Michael Rommel + +--- pyzmq-13.0.2/buildutils/detect.py.orig 2013-08-10 00:49:28.242557978 +0200 ++++ pyzmq-13.0.2/buildutils/detect.py 2013-08-10 00:44:35.197572704 +0200 +@@ -119,15 +119,17 @@ def detect_zmq(basedir, compiler=None, * + + efile = test_compilation(cfile, compiler=compiler, **compiler_attrs) + +- result = Popen(efile, stdout=PIPE, stderr=PIPE) +- so, se = result.communicate() ++ # result = Popen(efile, stdout=PIPE, stderr=PIPE) ++ # so, se = result.communicate() + # for py3k: +- so = so.decode() +- se = se.decode() +- if result.returncode: +- msg = "Error running version detection script:\n%s\n%s" % (so,se) +- logging.error(msg) +- raise IOError(msg) ++ #so = so.decode() ++ #se = se.decode() ++ #if result.returncode: ++ # msg = "Error running version detection script:\n%s\n%s" % (so,se) ++ # logging.error(msg) ++ # raise IOError(msg) ++ ++ so = "vers: ##ZEROMQ_VERSION##" + + handlers = {'vers': lambda val: tuple(int(v) for v in val.split('.'))} + diff --git a/package/python-pyzmq/Config.in b/package/python-pyzmq/Config.in new file mode 100644 index 0000000000..af4467fa7c --- /dev/null +++ b/package/python-pyzmq/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_PYTHON_PYZMQ + bool "python-pyzmq" + depends on BR2_USE_WCHAR # zeromq + depends on BR2_INSTALL_LIBSTDCPP # zeromq + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + select BR2_PACKAGE_ZEROMQ + help + This package contains the python language binding for zeromq. + + http://zeromq.org/bindings:python + +comment "python-pyzmq needs a toolchain w/ C++, wchar, threads" + depends on BR2_PACKAGE_PYTHON + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && \ + BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/python-pyzmq/python-pyzmq.mk b/package/python-pyzmq/python-pyzmq.mk new file mode 100644 index 0000000000..0e787b1d22 --- /dev/null +++ b/package/python-pyzmq/python-pyzmq.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# python-pyzmq +# +################################################################################ + +PYTHON_PYZMQ_VERSION = 14.3.1 +PYTHON_PYZMQ_SOURCE = pyzmq-$(PYTHON_PYZMQ_VERSION).tar.gz +PYTHON_PYZMQ_SITE = http://pypi.python.org/packages/source/p/pyzmq +PYTHON_PYZMQ_LICENSE = LGPLv3+, BSD-3c, Apache-2.0 +# Apache license only online: http://www.apache.org/licenses/LICENSE-2.0 +PYTHON_PYZMQ_LICENSE_FILES = COPYING.LESSER COPYING.BSD +PYTHON_PYZMQ_DEPENDENCIES = zeromq +PYTHON_PYZMQ_SETUP_TYPE = distutils +PYTHON_PYZMQ_BUILD_OPTS = --zmq=$(STAGING_DIR)/usr + +# Due to issues with cross-compiling, hardcode to the zeromq in BR +define PYTHON_PYZMQ_PATCH_ZEROMQ_VERSION + $(SED) 's/##ZEROMQ_VERSION##/$(ZEROMQ_VERSION)/' \ + $(@D)/buildutils/detect.py +endef + +PYTHON_PYZMQ_POST_PATCH_HOOKS += PYTHON_PYZMQ_PATCH_ZEROMQ_VERSION + +$(eval $(python-package)) diff --git a/package/python-requests/Config.in b/package/python-requests/Config.in new file mode 100644 index 0000000000..23ab3092d5 --- /dev/null +++ b/package/python-requests/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_REQUESTS + bool "python-requests" + select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime + help + Requests is an Apache2 Licensed HTTP library, written in + Python, for human beings. + + http://www.python-requests.org/ diff --git a/package/python-requests/python-requests.hash b/package/python-requests/python-requests.hash new file mode 100644 index 0000000000..b567fe6adc --- /dev/null +++ b/package/python-requests/python-requests.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=0b7f480d19012ec52bab78292efd976d, sha256 locally computed +md5 0b7f480d19012ec52bab78292efd976d requests-2.9.1.tar.gz +sha256 c577815dd00f1394203fc44eb979724b098f88264a9ef898ee45b8e5e9cf587f requests-2.9.1.tar.gz diff --git a/package/python-requests/python-requests.mk b/package/python-requests/python-requests.mk new file mode 100644 index 0000000000..8cda2c5148 --- /dev/null +++ b/package/python-requests/python-requests.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-requests +# +################################################################################ + +PYTHON_REQUESTS_VERSION = 2.9.1 +PYTHON_REQUESTS_SOURCE = requests-$(PYTHON_REQUESTS_VERSION).tar.gz +PYTHON_REQUESTS_SITE = http://pypi.python.org/packages/source/r/requests +PYTHON_REQUESTS_SETUP_TYPE = setuptools +PYTHON_REQUESTS_LICENSE = Apache-2.0 +PYTHON_REQUESTS_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-rpi-gpio/Config.in b/package/python-rpi-gpio/Config.in new file mode 100755 index 0000000000..4f59ebdb06 --- /dev/null +++ b/package/python-rpi-gpio/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_RPI_GPIO + bool "python-rpi-gpio" + depends on BR2_arm + help + A Python module to control the GPIO on a Raspberry Pi. + + http://sourceforge.net/p/raspberry-gpio-python diff --git a/package/python-rpi-gpio/python-rpi-gpio.hash b/package/python-rpi-gpio/python-rpi-gpio.hash new file mode 100755 index 0000000000..8b498f1f13 --- /dev/null +++ b/package/python-rpi-gpio/python-rpi-gpio.hash @@ -0,0 +1,3 @@ +# md5sum from http://sourceforge.net/projects/raspberry-gpio-python/files/, sha256 calculated locally +md5 254d0443a436eb241367c487274e7197 RPi.GPIO-0.6.1.tar.gz +sha256 54e5fb06d9ea1a1389a497fb5a06dfa950c86303b0f4ba89b68c55999d1df064 RPi.GPIO-0.6.1.tar.gz diff --git a/package/python-rpi-gpio/python-rpi-gpio.mk b/package/python-rpi-gpio/python-rpi-gpio.mk new file mode 100755 index 0000000000..106b8dd153 --- /dev/null +++ b/package/python-rpi-gpio/python-rpi-gpio.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-rpi-gpio +# +################################################################################ + +PYTHON_RPI_GPIO_VERSION = 0.6.1 +PYTHON_RPI_GPIO_SOURCE = RPi.GPIO-$(PYTHON_RPI_GPIO_VERSION).tar.gz +PYTHON_RPI_GPIO_SITE = http://sourceforge.net/projects/raspberry-gpio-python/files +PYTHON_RPI_GPIO_LICENSE = MIT +PYTHON_RPI_GPIO_LICENSE_FILES = LICENCE.txt +PYTHON_RPI_GPIO_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-rtslib-fb/Config.in b/package/python-rtslib-fb/Config.in new file mode 100644 index 0000000000..7bae560409 --- /dev/null +++ b/package/python-rtslib-fb/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_RTSLIB_FB + bool "python-rtslib-fb" + select BR2_PACKAGE_PYTHON_SIX + help + rtslib-fb is an object-based Python library for configuring + the LIO generic SCSI target, present in 3.x Linux kernel + versions. + + https://github.com/agrover/rtslib-fb diff --git a/package/python-rtslib-fb/python-rtslib-fb.mk b/package/python-rtslib-fb/python-rtslib-fb.mk new file mode 100644 index 0000000000..85bee0ba75 --- /dev/null +++ b/package/python-rtslib-fb/python-rtslib-fb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-rtslib-fb +# +################################################################################ + +PYTHON_RTSLIB_FB_VERSION = v2.1.fb57 +PYTHON_RTSLIB_FB_SITE = $(call github,agrover,rtslib-fb,$(PYTHON_RTSLIB_FB_VERSION)) +PYTHON_RTSLIB_FB_LICENSE = Apache-2.0 +PYTHON_RTSLIB_FB_LICENSE_FILES = COPYING +PYTHON_RTSLIB_FB_SETUP_TYPE = setuptools +PYTHON_RTSLIB_FB_DEPENDENCIES = python-six + +$(eval $(python-package)) diff --git a/package/python-serial/Config.in b/package/python-serial/Config.in new file mode 100644 index 0000000000..ca12d12e6e --- /dev/null +++ b/package/python-serial/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_SERIAL + bool "python-serial" + help + python-serial is a Python library to access serial ports. + + https://github.com/pyserial/pyserial diff --git a/package/python-serial/python-serial.hash b/package/python-serial/python-serial.hash new file mode 100644 index 0000000000..74006243a8 --- /dev/null +++ b/package/python-serial/python-serial.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=f94bc6e141d60f17edc7bf8757c4d922, sha256 locally computed +md5 f94bc6e141d60f17edc7bf8757c4d922 pyserial-3.0.tar.gz +sha256 056c2d96c83c009d8d04aad43a90f91f10f6a97d42c0d9656c2655c63fb8ff07 pyserial-3.0.tar.gz diff --git a/package/python-serial/python-serial.mk b/package/python-serial/python-serial.mk new file mode 100644 index 0000000000..ba871eade2 --- /dev/null +++ b/package/python-serial/python-serial.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-serial +# +################################################################################ + +PYTHON_SERIAL_VERSION = 3.0 +PYTHON_SERIAL_SOURCE = pyserial-$(PYTHON_SERIAL_VERSION).tar.gz +PYTHON_SERIAL_SITE = http://pypi.python.org/packages/source/p/pyserial +PYTHON_SERIAL_LICENSE = Python Software Foundation License +PYTHON_SERIAL_LICENSE_FILES = LICENSE.txt +PYTHON_SERIAL_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-service-identity/Config.in b/package/python-service-identity/Config.in new file mode 100644 index 0000000000..c9cbb6cca1 --- /dev/null +++ b/package/python-service-identity/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_PYTHON_SERVICE_IDENTITY + bool "python-service-identity" + select BR2_PACKAGE_PYTHON_CHARACTERISTIC # runtime + select BR2_PACKAGE_PYTHON_PYASN # runtime + select BR2_PACKAGE_PYTHON_PYASN_MODULES # runtime + select BR2_PACKAGE_PYTHON_PYOPENSSL # runtime + depends on BR2_INSTALL_LIBSTDCPP # python-pyopenssl, python-pyasn + help + Service identity verification for pyOpenSSL. + + https://pypi.python.org/pypi/service_identity + +comment "python-service-identify needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-service-identity/python-service-identity.hash b/package/python-service-identity/python-service-identity.hash new file mode 100644 index 0000000000..caf29dc462 --- /dev/null +++ b/package/python-service-identity/python-service-identity.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=cea0b0156d73b025ecef660fb51f0d9a, sha256 locally computed. +md5 cea0b0156d73b025ecef660fb51f0d9a service_identity-14.0.0.tar.gz +sha256 3105a319a7c558490666694f599be0c377ad54824eefb404cde4ce49e74a4f5a service_identity-14.0.0.tar.gz diff --git a/package/python-service-identity/python-service-identity.mk b/package/python-service-identity/python-service-identity.mk new file mode 100644 index 0000000000..9eca3c1da0 --- /dev/null +++ b/package/python-service-identity/python-service-identity.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-service-identity +# +################################################################################ + +PYTHON_SERVICE_IDENTITY_VERSION = 14.0.0 +PYTHON_SERVICE_IDENTITY_SOURCE = service_identity-$(PYTHON_SERVICE_IDENTITY_VERSION).tar.gz +PYTHON_SERVICE_IDENTITY_SITE = http://pypi.python.org/packages/source/s/service_identity +PYTHON_SERVICE_IDENTITY_LICENSE = MIT +PYTHON_SERVICE_IDENTITY_LICENSE_FILES = LICENSE +PYTHON_SERVICE_IDENTITY_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-setproctitle/Config.in b/package/python-setproctitle/Config.in new file mode 100644 index 0000000000..d13afaa401 --- /dev/null +++ b/package/python-setproctitle/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_SETPROCTITLE + bool "python-setproctitle" + help + A Python module to customize the process title. + + https://pypi.python.org/pypi/setproctitle diff --git a/package/python-setproctitle/python-setproctitle.hash b/package/python-setproctitle/python-setproctitle.hash new file mode 100644 index 0000000000..3b0fd71c3a --- /dev/null +++ b/package/python-setproctitle/python-setproctitle.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=95d9e56c69437246460a20804961d70d, sha256 locally computed. +md5 95d9e56c69437246460a20804961d70d setproctitle-1.1.9.tar.gz +sha256 1c3414d18f9cacdab78b0ffd8e886d56ad45f22e55001a72aaa0b2aeb56a0ad7 setproctitle-1.1.9.tar.gz diff --git a/package/python-setproctitle/python-setproctitle.mk b/package/python-setproctitle/python-setproctitle.mk new file mode 100644 index 0000000000..63dfad0cf5 --- /dev/null +++ b/package/python-setproctitle/python-setproctitle.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-setproctitle +# +################################################################################ + +PYTHON_SETPROCTITLE_VERSION = 1.1.9 +PYTHON_SETPROCTITLE_SOURCE = setproctitle-$(PYTHON_SETPROCTITLE_VERSION).tar.gz +PYTHON_SETPROCTITLE_SITE = http://pypi.python.org/packages/source/s/setproctitle +PYTHON_SETPROCTITLE_LICENSE = BSD-3c +PYTHON_SETPROCTITLE_LICENSE_FILES = COPYRIGHT +PYTHON_SETPROCTITLE_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-setuptools/0001-add-executable.patch b/package/python-setuptools/0001-add-executable.patch new file mode 100644 index 0000000000..1f8714eaeb --- /dev/null +++ b/package/python-setuptools/0001-add-executable.patch @@ -0,0 +1,72 @@ +From 9b3d307f8f6a1af88f3f810f5a6cf0835830e1e8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Mon, 7 Dec 2015 01:14:33 +0100 +Subject: [PATCH 1/1] add executable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Add a new --executable option to distribute so that we can +force the shebang line in installed python scripts. + +[Thomas: refresh for setuptools 5.8.] +[Jörg: refresh for setuptools 18.7.1] + +Signed-off-by: Gustavo Zacarias +Signed-off-by: Thomas Petazzoni +Signed-off-by: Jörg Krause +--- + setuptools/command/install.py | 2 ++ + setuptools/command/install_scripts.py | 9 +++++++++ + 2 files changed, 11 insertions(+) + +diff --git a/setuptools/command/install.py b/setuptools/command/install.py +index d2bca2e..b60ef19 100644 +--- a/setuptools/command/install.py ++++ b/setuptools/command/install.py +@@ -16,6 +16,7 @@ class install(orig.install): + """Use easy_install to install the package, w/dependencies""" + + user_options = orig.install.user_options + [ ++ ('executable=', 'e', "specify final destination interpreter path"), + ('old-and-unmanageable', None, "Try not to use this!"), + ('single-version-externally-managed', None, + "used by system package builders to create 'flat' eggs"), +@@ -31,6 +32,7 @@ class install(orig.install): + + def initialize_options(self): + orig.install.initialize_options(self) ++ self.executable = None + self.old_and_unmanageable = None + self.single_version_externally_managed = None + +diff --git a/setuptools/command/install_scripts.py b/setuptools/command/install_scripts.py +index be66cb2..07afaf8 100755 +--- a/setuptools/command/install_scripts.py ++++ b/setuptools/command/install_scripts.py +@@ -11,6 +11,13 @@ class install_scripts(orig.install_scripts): + def initialize_options(self): + orig.install_scripts.initialize_options(self) + self.no_ep = False ++ self.executable = None ++ ++ def finalize_options(self): ++ orig.install_scripts.finalize_options(self) ++ self.set_undefined_options('install', ++ ('executable','executable') ++ ) + + def run(self): + import setuptools.command.easy_install as ei +@@ -31,6 +38,8 @@ class install_scripts(orig.install_scripts): + ) + bs_cmd = self.get_finalized_command('build_scripts') + exec_param = getattr(bs_cmd, 'executable', None) ++ if self.executable is not None: ++ exec_param = self.executable + bw_cmd = self.get_finalized_command("bdist_wininst") + is_wininst = getattr(bw_cmd, '_is_running', False) + writer = ei.ScriptWriter +-- +2.6.3 + diff --git a/package/python-setuptools/Config.in b/package/python-setuptools/Config.in new file mode 100644 index 0000000000..c72c59fbc8 --- /dev/null +++ b/package/python-setuptools/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_SETUPTOOLS + bool "python-setuptools" + select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime + select BR2_PACKAGE_PYTHON_PYEXPAT if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_PYEXPAT if BR2_PACKAGE_PYTHON3 # runtime + help + Download, build, install, upgrade, and uninstall Python packages. + + http://pypi.python.org/pypi/setuptools diff --git a/package/python-setuptools/python-setuptools.hash b/package/python-setuptools/python-setuptools.hash new file mode 100644 index 0000000000..88113fa1f9 --- /dev/null +++ b/package/python-setuptools/python-setuptools.hash @@ -0,0 +1,4 @@ +# From https://pypi.python.org/pypi/setuptools/18.7.1 +md5 a0984da9cd8d7b582e1fd7de67dfdbcc setuptools-18.7.1.tar.gz +# Locally calculated +sha256 aff36c95035e0b311eacb1434e3f7e85f5ccaad477773847e582978f8f45bd74 setuptools-18.7.1.tar.gz diff --git a/package/python-setuptools/python-setuptools.mk b/package/python-setuptools/python-setuptools.mk new file mode 100644 index 0000000000..15edc6fd07 --- /dev/null +++ b/package/python-setuptools/python-setuptools.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-setuptools +# +################################################################################ + +PYTHON_SETUPTOOLS_VERSION = 18.7.1 +PYTHON_SETUPTOOLS_SOURCE = setuptools-$(PYTHON_SETUPTOOLS_VERSION).tar.gz +PYTHON_SETUPTOOLS_SITE = http://pypi.python.org/packages/source/s/setuptools +PYTHON_SETUPTOOLS_LICENSE = Python Software Foundation or Zope Public License +PYTHON_SETUPTOOLS_LICENSE_FILES = PKG-INFO +PYTHON_SETUPTOOLS_SETUP_TYPE = setuptools + +$(eval $(python-package)) +$(eval $(host-python-package)) diff --git a/package/python-shutilwhich/Config.in b/package/python-shutilwhich/Config.in new file mode 100644 index 0000000000..abdc8d77a1 --- /dev/null +++ b/package/python-shutilwhich/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_SHUTILWHICH + bool "python-shutilwhich" + depends on BR2_PACKAGE_PYTHON + help + shutil.which for those not using Python 3.3 yet. + + https://pypi.python.org/pypi/shutilwhich/ diff --git a/package/python-shutilwhich/python-shutilwhich.hash b/package/python-shutilwhich/python-shutilwhich.hash new file mode 100644 index 0000000000..b1a2c7854f --- /dev/null +++ b/package/python-shutilwhich/python-shutilwhich.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=915947c5cdae7afd748ac715ee547adb, sha256 locally computed. +md5 915947c5cdae7afd748ac715ee547adb shutilwhich-1.1.0.tar.gz +sha256 db1f39c6461e42f630fa617bb8c79090f7711c9ca493e615e43d0610ecb64dc6 shutilwhich-1.1.0.tar.gz diff --git a/package/python-shutilwhich/python-shutilwhich.mk b/package/python-shutilwhich/python-shutilwhich.mk new file mode 100644 index 0000000000..0497e1b6d0 --- /dev/null +++ b/package/python-shutilwhich/python-shutilwhich.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-shutilwhich +# +################################################################################ + +PYTHON_SHUTILWHICH_VERSION = 1.1.0 +PYTHON_SHUTILWHICH_SOURCE = shutilwhich-$(PYTHON_SHUTILWHICH_VERSION).tar.gz +PYTHON_SHUTILWHICH_SITE = http://pypi.python.org/packages/source/s/shutilwhich +PYTHON_SHUTILWHICH_LICENSE = Python Software Foundation License +PYTHON_SHUTILWHICH_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-simplejson/Config.in b/package/python-simplejson/Config.in new file mode 100644 index 0000000000..be0ee8f929 --- /dev/null +++ b/package/python-simplejson/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_SIMPLEJSON + bool "python-simplejson" + depends on BR2_PACKAGE_PYTHON + help + Simple, fast, extensible JSON encoder/decoder for Python + + https://pypi.python.org/pypi/simplejson/ diff --git a/package/python-simplejson/python-simplejson.mk b/package/python-simplejson/python-simplejson.mk new file mode 100644 index 0000000000..61283b717d --- /dev/null +++ b/package/python-simplejson/python-simplejson.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-simplejson +# +################################################################################ + +PYTHON_SIMPLEJSON_VERSION = 3.5.3 +PYTHON_SIMPLEJSON_SOURCE = simplejson-$(PYTHON_SIMPLEJSON_VERSION).tar.gz +PYTHON_SIMPLEJSON_SITE = http://pypi.python.org/packages/source/s/simplejson +PYTHON_SIMPLEJSON_LICENSE = MIT +PYTHON_SIMPLEJSON_LICENSE_FILES = LICENSE.txt +PYTHON_SIMPLEJSON_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/python-singledispatch/Config.in b/package/python-singledispatch/Config.in new file mode 100644 index 0000000000..4abc219f95 --- /dev/null +++ b/package/python-singledispatch/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_SINGLEDISPATCH + bool "python-singledispatch" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_SIX # runtime + help + This library brings functools.singledispatch from + Python 3.4 to Python 2.6-3.3 + + https://pypi.python.org/pypi/singledispatch diff --git a/package/python-singledispatch/python-singledispatch.hash b/package/python-singledispatch/python-singledispatch.hash new file mode 100644 index 0000000000..8a96d21a95 --- /dev/null +++ b/package/python-singledispatch/python-singledispatch.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=af2fc6a3d6cc5a02d0bf54d909785fcb, sha256 locally computed +md5 af2fc6a3d6cc5a02d0bf54d909785fcb singledispatch-3.4.0.3.tar.gz +sha256 5b06af87df13818d14f08a028e42f566640aef80805c3b50c5056b086e3c2b9c singledispatch-3.4.0.3.tar.gz diff --git a/package/python-singledispatch/python-singledispatch.mk b/package/python-singledispatch/python-singledispatch.mk new file mode 100644 index 0000000000..7e1d5ac8e0 --- /dev/null +++ b/package/python-singledispatch/python-singledispatch.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-singledispatch +# +################################################################################ + +PYTHON_SINGLEDISPATCH_VERSION = 3.4.0.3 +PYTHON_SINGLEDISPATCH_SOURCE = singledispatch-$(PYTHON_SINGLEDISPATCH_VERSION).tar.gz +PYTHON_SINGLEDISPATCH_SITE = https://pypi.python.org/packages/source/s/singledispatch +PYTHON_SINGLEDISPATCH_LICENSE = MIT +PYTHON_SINGLEDISPATCH_LICENSE_FILES = setup.py +PYTHON_SINGLEDISPATCH_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-sip/Config.in b/package/python-sip/Config.in new file mode 100644 index 0000000000..45e48ad00e --- /dev/null +++ b/package/python-sip/Config.in @@ -0,0 +1,24 @@ +comment "python-sip needs a toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_PYTHON_SIP + bool "python-sip" + depends on BR2_INSTALL_LIBSTDCPP # qt + depends on BR2_TOOLCHAIN_HAS_THREADS # qt + depends on BR2_USE_MMU # qt + select BR2_PACKAGE_QT + help + SIP is a tool that makes it very easy to create Python + bindings for C and C++ libraries. It was originally + developed to create PyQt, the Python bindings for the Qt + toolkit, but can be used to create bindings for any C or C++ + library. + + SIP comprises a code generator and a Python module. The code + generator processes a set of specification files and + generates C or C++ code which is then compiled to create the + bindings extension module. The SIP Python module provides + support functions to the automatically generated code. + + http://www.riverbankcomputing.com/software/sip/intro diff --git a/package/python-sip/python-sip.hash b/package/python-sip/python-sip.hash new file mode 100644 index 0000000000..aba54708da --- /dev/null +++ b/package/python-sip/python-sip.hash @@ -0,0 +1,4 @@ +# From http://sourceforge.net/projects/pyqt/files/sip/sip-4.16.7/ +md5 32abc003980599d33ffd789734de4c36 sip-4.16.7.tar.gz +# Locally calculated: +sha256 4caa8d52e4403bae5c4c64f44de03a2cfd0bb10b6d96c5fb771133516df9abbd sip-4.16.7.tar.gz diff --git a/package/python-sip/python-sip.mk b/package/python-sip/python-sip.mk new file mode 100644 index 0000000000..4651186615 --- /dev/null +++ b/package/python-sip/python-sip.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# python-sip +# +################################################################################ + +PYTHON_SIP_VERSION = 4.16.7 +PYTHON_SIP_SOURCE = sip-$(PYTHON_SIP_VERSION).tar.gz +PYTHON_SIP_SITE = http://downloads.sourceforge.net/project/pyqt/sip/sip-$(PYTHON_SIP_VERSION) +PYTHON_SIP_LICENSE = SIP license or GPLv2 or GPLv3 +PYTHON_SIP_LICENSE_FILES = LICENSE LICENSE-GPL2 LICENSE-GPL3 + +PYTHON_SIP_DEPENDENCIES = qt + +ifeq ($(BR2_PACKAGE_PYTHON),y) +PYTHON_SIP_DEPENDENCIES += python +HOST_PYTHON_SIP_DEPENDENCIES += host-python +PYTHON_SIP_LIB_DIR = usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages +PYTHON_SIP_INCLUDE_DIR = usr/include/python$(PYTHON_VERSION_MAJOR) +else ifeq ($(BR2_PACKAGE_PYTHON3),y) +PYTHON_SIP_DEPENDENCIES += python3 +HOST_PYTHON_SIP_DEPENDENCIES += host-python3 +PYTHON_SIP_LIB_DIR = usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages +PYTHON_SIP_INCLUDE_DIR = usr/include/python$(PYTHON3_VERSION_MAJOR)m +endif + +define HOST_PYTHON_SIP_CONFIGURE_CMDS + (cd $(@D); \ + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(HOST_DIR)/usr/bin/python configure.py) +endef + +define HOST_PYTHON_SIP_BUILD_CMDS + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define HOST_PYTHON_SIP_INSTALL_CMDS + $(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) $(MAKE) install -C $(@D) +endef + +define PYTHON_SIP_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(HOST_DIR)/usr/bin/python configure.py \ + --bindir $(TARGET_DIR)/usr/bin \ + --destdir $(TARGET_DIR)/$(PYTHON_SIP_LIB_DIR) \ + --incdir $(STAGING_DIR)/$(PYTHON_SIP_INCLUDE_DIR) \ + --sipdir $(TARGET_DIR)/usr/share/sip \ + --sysroot $(STAGING_DIR)/usr \ + --use-qmake && \ + $(HOST_DIR)/usr/bin/qmake) +endef + +define PYTHON_SIP_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define PYTHON_SIP_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) install -C $(@D) +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/python-six/Config.in b/package/python-six/Config.in new file mode 100644 index 0000000000..0a8b69ace6 --- /dev/null +++ b/package/python-six/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_SIX + bool "python-six" + help + Six is a Python 2 and 3 compatibility library. It provides + utility functions for smoothing over the differences between + the Python versions with the goal of writing Python code that + is compatible on both Python versions. + + http://pythonhosted.org/six diff --git a/package/python-six/python-six.hash b/package/python-six/python-six.hash new file mode 100644 index 0000000000..a90c79b75c --- /dev/null +++ b/package/python-six/python-six.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a six-1.10.0.tar.gz diff --git a/package/python-six/python-six.mk b/package/python-six/python-six.mk new file mode 100644 index 0000000000..0edefe346f --- /dev/null +++ b/package/python-six/python-six.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-six +# +################################################################################ + +PYTHON_SIX_VERSION = 1.10.0 +PYTHON_SIX_SOURCE = six-$(PYTHON_SIX_VERSION).tar.gz +PYTHON_SIX_SITE = https://pypi.python.org/packages/source/s/six +PYTHON_SIX_SETUP_TYPE = setuptools +PYTHON_SIX_LICENSE = MIT +PYTHON_SIX_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-smbus-cffi/Config.in b/package/python-smbus-cffi/Config.in new file mode 100644 index 0000000000..32f005c096 --- /dev/null +++ b/package/python-smbus-cffi/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_PYTHON_SMBUS_CFFI + bool "python-smbus-cffi" + select BR2_PACKAGE_PYTHON_CFFI + help + This Python module allows SMBus access through the I2C /dev + interface on Linux hosts. The host kernel must have I2C + support, I2C device interface support, and a bus adapter + driver. + + https://github.com/bivab/smbus-cffi diff --git a/package/python-smbus-cffi/python-smbus-cffi.hash b/package/python-smbus-cffi/python-smbus-cffi.hash new file mode 100644 index 0000000000..1e28df99b7 --- /dev/null +++ b/package/python-smbus-cffi/python-smbus-cffi.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=f621c871bd658ee665751ad78e3b2df9, sha256 locally computed +md5 f621c871bd658ee665751ad78e3b2df9 smbus-cffi-0.5.1.tar.gz +sha256 fb4195aaabfc01586863f60d3190b5cb1bf8f12622fd597e23e48768dad6bde8 smbus-cffi-0.5.1.tar.gz diff --git a/package/python-smbus-cffi/python-smbus-cffi.mk b/package/python-smbus-cffi/python-smbus-cffi.mk new file mode 100644 index 0000000000..5fd9558e87 --- /dev/null +++ b/package/python-smbus-cffi/python-smbus-cffi.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-smbus-cffi +# +################################################################################ + +PYTHON_SMBUS_CFFI_VERSION = 0.5.1 +PYTHON_SMBUS_CFFI_SOURCE = smbus-cffi-$(PYTHON_SMBUS_CFFI_VERSION).tar.gz +PYTHON_SMBUS_CFFI_SITE = https://pypi.python.org/packages/source/s/smbus-cffi +PYTHON_SMBUS_CFFI_SETUP_TYPE = setuptools +PYTHON_SMBUS_CFFI_LICENSE = GPLv2 +PYTHON_SMBUS_CFFI_LICENSE_FILES = LICENSE +PYTHON_SMBUS_CFFI_DEPENDENCIES = host-python-cffi + +$(eval $(python-package)) diff --git a/package/python-spidev/0001-Fix-build-with-musl-libc.patch b/package/python-spidev/0001-Fix-build-with-musl-libc.patch new file mode 100644 index 0000000000..b22a73aa67 --- /dev/null +++ b/package/python-spidev/0001-Fix-build-with-musl-libc.patch @@ -0,0 +1,43 @@ +From 3d6e59bff088783f249a60a5f1c900c7f99f933b Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sun, 31 Jan 2016 15:03:50 +0100 +Subject: [PATCH 1/1] Fix build with musl libc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Include missing header to prevent build error: + +spidev_module.c: In function ‘SpiDev_xfer’: +spidev_module.c:330:27: error: ‘_IOC_SIZEBITS’ undeclared (first use in this function) + status = ioctl(self->fd, SPI_IOC_MESSAGE(1), &xfer); + ^ +spidev_module.c:330:27: note: each undeclared identifier is reported only once for each function it appears in +spidev_module.c: In function ‘SpiDev_xfer2’: +spidev_module.c:421:27: error: ‘_IOC_SIZEBITS’ undeclared (first use in this function) + status = ioctl(self->fd, SPI_IOC_MESSAGE(1), &xfer); + ^ + +Signed-off-by: Bernd Kuhls bernd.kuhls@t-online.de +Signed-off-by: Bernd Kuhls +--- +Patch sent upstream: https://github.com/doceme/py-spidev/pull/39 + + spidev_module.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/spidev_module.c b/spidev_module.c +index d58ef07..bccaacf 100644 +--- a/spidev_module.c ++++ b/spidev_module.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #define SPIDEV_MAXPATH 4096 + +-- +2.7.0 + diff --git a/package/python-spidev/Config.in b/package/python-spidev/Config.in new file mode 100644 index 0000000000..8540d55469 --- /dev/null +++ b/package/python-spidev/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_SPIDEV + bool "python-spidev" + help + Python module for interfacing with SPI devices from user + space via the spidev linux kernel driver. + + https://pypi.python.org/pypi/spidev diff --git a/package/python-spidev/python-spidev.hash b/package/python-spidev/python-spidev.hash new file mode 100644 index 0000000000..49e8db8a86 --- /dev/null +++ b/package/python-spidev/python-spidev.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 355391e9ad3024950590626b080324394c12e75bb21923dbd56a978a1eac6ac7 spidev-3.1.tar.gz diff --git a/package/python-spidev/python-spidev.mk b/package/python-spidev/python-spidev.mk new file mode 100644 index 0000000000..0a8dd15646 --- /dev/null +++ b/package/python-spidev/python-spidev.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-spidev +# +################################################################################ + +PYTHON_SPIDEV_VERSION = 3.1 +PYTHON_SPIDEV_SOURCE = spidev-$(PYTHON_SPIDEV_VERSION).tar.gz +PYTHON_SPIDEV_SITE = https://pypi.python.org/packages/source/s/spidev +PYTHON_SPIDEV_SETUP_TYPE = distutils +PYTHON_SPIDEV_LICENSE = GPLv2 +PYTHON_SPIDEV_LICENSE_FILES = LICENSE.md + +$(eval $(python-package)) diff --git a/package/python-thrift/Config.in b/package/python-thrift/Config.in new file mode 100644 index 0000000000..94a75900fe --- /dev/null +++ b/package/python-thrift/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_THRIFT + bool "python-thrift" + depends on BR2_PACKAGE_PYTHON + help + python-thrift is a Python bindings for the Apache Thrift RPC system. + + http://thrift.apache.org/ diff --git a/package/python-thrift/python-thrift.hash b/package/python-thrift/python-thrift.hash new file mode 100644 index 0000000000..811aa988e3 --- /dev/null +++ b/package/python-thrift/python-thrift.hash @@ -0,0 +1,2 @@ +# From https://www.apache.org/dist/thrift/0.9.2/thrift-0.9.2.tar.gz.md5 +md5 89f63cc4d0100912f4a1f8a9dee63678 thrift-0.9.2.tar.gz diff --git a/package/python-thrift/python-thrift.mk b/package/python-thrift/python-thrift.mk new file mode 100644 index 0000000000..99641b8b4b --- /dev/null +++ b/package/python-thrift/python-thrift.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# python-thrift +# +################################################################################ + +PYTHON_THRIFT_VERSION = 0.9.2 +PYTHON_THRIFT_SOURCE = thrift-$(PYTHON_THRIFT_VERSION).tar.gz +PYTHON_THRIFT_SITE = http://www.us.apache.org/dist/thrift/$(PYTHON_THRIFT_VERSION) +PYTHON_THRIFT_LICENSE = Apache-2.0 +PYTHON_THRIFT_LICENSE_FILES = LICENSE +PYTHON_THRIFT_SETUP_TYPE = setuptools +PYTHON_THRIFT_SUBDIR = lib/py + +$(eval $(python-package)) diff --git a/package/python-tornado/Config.in b/package/python-tornado/Config.in new file mode 100644 index 0000000000..ac866824ec --- /dev/null +++ b/package/python-tornado/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_PYTHON_TORNADO + bool "python-tornado" + select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime + select BR2_PACKAGE_PYTHON_SINGLEDISPATCH if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON_BACKPORTS_ABC # runtime + help + Tornado is a Python web framework and asynchronous networking + library, originally developed at FriendFeed. + + http://www.tornadoweb.org diff --git a/package/python-tornado/python-tornado.hash b/package/python-tornado/python-tornado.hash new file mode 100644 index 0000000000..e0f3c39a94 --- /dev/null +++ b/package/python-tornado/python-tornado.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=c548d7b77a11d523c3d7255bd7fd6df8, sha256 locally computed +md5 d13a99dc0b60ba69f5f8ec1235e5b232 tornado-4.3.tar.gz +sha256 c9c2d32593d16eedf2cec1b6a41893626a2649b40b21ca9c4cac4243bde2efbf tornado-4.3.tar.gz diff --git a/package/python-tornado/python-tornado.mk b/package/python-tornado/python-tornado.mk new file mode 100644 index 0000000000..64809b7902 --- /dev/null +++ b/package/python-tornado/python-tornado.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-tornado +# +################################################################################ + +PYTHON_TORNADO_VERSION = 4.3 +PYTHON_TORNADO_SOURCE = tornado-$(PYTHON_TORNADO_VERSION).tar.gz +PYTHON_TORNADO_SITE = https://pypi.python.org/packages/source/t/tornado +PYTHON_TORNADO_LICENSE = Apache-2.0 +PYTHON_TORNADO_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-treq/Config.in b/package/python-treq/Config.in new file mode 100644 index 0000000000..4a237373d1 --- /dev/null +++ b/package/python-treq/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_PYTHON_TREQ + bool "python-treq" + select BR2_PACKAGE_PYTHON_REQUESTS # runtime + select BR2_PACKAGE_PYTHON_SERVICE_IDENTITY # runtime + select BR2_PACKAGE_PYTHON_SIX # runtime + select BR2_PACKAGE_PYTHON_TWISTED # runtime + select BR2_PACKAGE_PYTHON_PYOPENSSL # runtime + depends on BR2_INSTALL_LIBSTDCPP # python-pyopenssl + help + treq is an HTTP library inspired by requests but written on + top of Twisted's Agents. It provides a simple, higher level + API for making HTTP requests when using Twisted. + + https://github.com/twisted/treq + +comment "python-treq needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/python-treq/python-treq.hash b/package/python-treq/python-treq.hash new file mode 100644 index 0000000000..f4cc4d6f11 --- /dev/null +++ b/package/python-treq/python-treq.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=b1fb60759ad5a885cb8ea562553f2d4c, sha256 locally computed +md5 b1fb60759ad5a885cb8ea562553f2d4c treq-15.1.0.tar.gz +sha256 425a47d5d52a993d51211028fb6ade252e5fbea094e878bb4b644096a7322de8 treq-15.1.0.tar.gz diff --git a/package/python-treq/python-treq.mk b/package/python-treq/python-treq.mk new file mode 100644 index 0000000000..dbf0e148a7 --- /dev/null +++ b/package/python-treq/python-treq.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-treq +# +################################################################################ + +PYTHON_TREQ_VERSION = 15.1.0 +PYTHON_TREQ_SOURCE = treq-$(PYTHON_TREQ_VERSION).tar.gz +PYTHON_TREQ_SITE = http://pypi.python.org/packages/source/t/treq +PYTHON_TREQ_LICENSE = MIT +PYTHON_TREQ_LICENSE_FILES = LICENSE +PYTHON_TREQ_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-twisted/Config.in b/package/python-twisted/Config.in new file mode 100644 index 0000000000..1221fc25bd --- /dev/null +++ b/package/python-twisted/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_TWISTED + bool "python-twisted" + select BR2_PACKAGE_PYTHON_ZOPE_INTERFACE # runtime + help + Twisted is an event-driven networking engine written in Python. + + https://twistedmatrix.com/trac/ diff --git a/package/python-twisted/python-twisted.hash b/package/python-twisted/python-twisted.hash new file mode 100644 index 0000000000..275cea89c6 --- /dev/null +++ b/package/python-twisted/python-twisted.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=266a085f5ce3fbc060818bd00bd6a888, sha256 locally computed +md5 266a085f5ce3fbc060818bd00bd6a888 Twisted-16.1.1.tar.bz2 +sha256 fe7d001d9a803ed26cd0fd2f69fa4212ff025f3af6ef1a559d905fe551ab04e9 Twisted-16.1.1.tar.bz2 diff --git a/package/python-twisted/python-twisted.mk b/package/python-twisted/python-twisted.mk new file mode 100644 index 0000000000..e98e03fa36 --- /dev/null +++ b/package/python-twisted/python-twisted.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-twisted +# +################################################################################ + +PYTHON_TWISTED_VERSION = 16.1.1 +PYTHON_TWISTED_SOURCE = Twisted-$(PYTHON_TWISTED_VERSION).tar.bz2 +PYTHON_TWISTED_SITE = https://pypi.python.org/packages/source/T/Twisted +PYTHON_TWISTED_SETUP_TYPE = setuptools +PYTHON_TWISTED_LICENSE = MIT +PYTHON_TWISTED_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-txaio/Config.in b/package/python-txaio/Config.in new file mode 100644 index 0000000000..9d4238215e --- /dev/null +++ b/package/python-txaio/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_TXAIO + bool "python-txaio" + select BR2_PACKAGE_PYTHON_SIX # runtime + help + Compatibility API between asyncio/Twisted/Trollius. + + https://pypi.python.org/pypi/txaio diff --git a/package/python-txaio/python-txaio.hash b/package/python-txaio/python-txaio.hash new file mode 100644 index 0000000000..5d9e6cf097 --- /dev/null +++ b/package/python-txaio/python-txaio.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=c2a7e6ebfdf8987c3938e40e39a3c5e7, sha256 locally computed +md5 c2a7e6ebfdf8987c3938e40e39a3c5e7 txaio-2.2.1.tar.gz +sha256 6eee00c397d8193d15313dfc36da3eac8d64edf0b92fe3b67cd5a735ffc3074b txaio-2.2.1.tar.gz diff --git a/package/python-txaio/python-txaio.mk b/package/python-txaio/python-txaio.mk new file mode 100644 index 0000000000..127bc62770 --- /dev/null +++ b/package/python-txaio/python-txaio.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-txaio +# +################################################################################ + +PYTHON_TXAIO_VERSION = 2.2.1 +PYTHON_TXAIO_SOURCE = txaio-$(PYTHON_TXAIO_VERSION).tar.gz +PYTHON_TXAIO_SITE = http://pypi.python.org/packages/source/t/txaio +PYTHON_TXAIO_LICENSE = MIT +PYTHON_TXAIO_LICENSE_FILES = LICENSE +PYTHON_TXAIO_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-ujson/Config.in b/package/python-ujson/Config.in new file mode 100644 index 0000000000..d185c98532 --- /dev/null +++ b/package/python-ujson/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_UJSON + bool "python-ujson" + help + UltraJSON is an ultra fast JSON encoder and decoder written + in pure C with bindings for Python 2.5+ and 3. + + https://pypi.python.org/pypi/ujson diff --git a/package/python-ujson/python-ujson.hash b/package/python-ujson/python-ujson.hash new file mode 100644 index 0000000000..21320346a1 --- /dev/null +++ b/package/python-ujson/python-ujson.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=42f77b0cce686dfa4da2e68480b1dd24,sha256 locally computed. +md5 42f77b0cce686dfa4da2e68480b1dd24 ujson-1.35.tar.gz +sha256 f66073e5506e91d204ab0c614a148d5aa938bdbf104751be66f8ad7a222f5f86 ujson-1.35.tar.gz diff --git a/package/python-ujson/python-ujson.mk b/package/python-ujson/python-ujson.mk new file mode 100644 index 0000000000..8d4a12b811 --- /dev/null +++ b/package/python-ujson/python-ujson.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-ujson +# +################################################################################ + +PYTHON_UJSON_VERSION = 1.35 +PYTHON_UJSON_SOURCE = ujson-$(PYTHON_UJSON_VERSION).tar.gz +PYTHON_UJSON_SITE = http://pypi.python.org/packages/source/u/ujson +PYTHON_UJSON_LICENSE = BSD-3c +PYTHON_UJSON_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-urllib3/Config.in b/package/python-urllib3/Config.in new file mode 100644 index 0000000000..21d3f6748e --- /dev/null +++ b/package/python-urllib3/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_URLLIB3 + bool "python-urllib3" + select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime + help + Python HTTP library with thread-safe connection pooling, file + post support, sanity friendly, and more. + + http://urllib3.readthedocs.org/ diff --git a/package/python-urllib3/python-urllib3.hash b/package/python-urllib3/python-urllib3.hash new file mode 100644 index 0000000000..266b8e9023 --- /dev/null +++ b/package/python-urllib3/python-urllib3.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=5e1407428ac33b521c71a7ac273b3847, sha256 locally computed +md5 5e1407428ac33b521c71a7ac273b3847 urllib3-1.14.tar.gz +sha256 dd4fb13a4ce50b18338c7e4d665b21fd38632c5d4b1d9f1a1379276bd3c08d37 urllib3-1.14.tar.gz diff --git a/package/python-urllib3/python-urllib3.mk b/package/python-urllib3/python-urllib3.mk new file mode 100644 index 0000000000..0101053e9c --- /dev/null +++ b/package/python-urllib3/python-urllib3.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-urllib3 +# +################################################################################ + +PYTHON_URLLIB3_VERSION = 1.14 +PYTHON_URLLIB3_SOURCE = urllib3-$(PYTHON_URLLIB3_VERSION).tar.gz +PYTHON_URLLIB3_SITE = https://pypi.python.org/packages/source/u/urllib3 +PYTHON_URLLIB3_LICENSE = MIT +PYTHON_URLLIB3_LICENSE_FILES = LICENSE.txt +PYTHON_URLLIB3_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-urwid/Config.in b/package/python-urwid/Config.in new file mode 100644 index 0000000000..f584a9258d --- /dev/null +++ b/package/python-urwid/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_URWID + bool "python-urwid" + help + Urwid is a console user interface library for Python + + http://urwid.org/ diff --git a/package/python-urwid/python-urwid.hash b/package/python-urwid/python-urwid.hash new file mode 100644 index 0000000000..eceed9d555 --- /dev/null +++ b/package/python-urwid/python-urwid.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi/urwid/1.3.0, sha256 locally computed +md5 a989acd54f4ff1a554add464803a9175 urwid-1.3.0.tar.gz +sha256 29f04fad3bf0a79c5491f7ebec2d50fa086e9d16359896c9204c6a92bc07aba2 urwid-1.3.0.tar.gz diff --git a/package/python-urwid/python-urwid.mk b/package/python-urwid/python-urwid.mk new file mode 100644 index 0000000000..1cd3022072 --- /dev/null +++ b/package/python-urwid/python-urwid.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-urwid +# +################################################################################ + +PYTHON_URWID_VERSION = 1.3.0 +PYTHON_URWID_SOURCE = urwid-$(PYTHON_URWID_VERSION).tar.gz +PYTHON_URWID_SITE = https://pypi.python.org/packages/source/u/urwid +PYTHON_URWID_LICENSE = LGPLv2.1+ +PYTHON_URWID_LICENSE_FILES = COPYING +PYTHON_URWID_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-versiontools/Config.in b/package/python-versiontools/Config.in new file mode 100644 index 0000000000..cb260c1fbd --- /dev/null +++ b/package/python-versiontools/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_VERSIONTOOLS + bool "python-versiontools" + depends on BR2_PACKAGE_PYTHON + help + Smart replacement for plain tuple used in __version__. + + https://pypi.python.org/pypi/versiontools diff --git a/package/python-versiontools/python-versiontools.mk b/package/python-versiontools/python-versiontools.mk new file mode 100644 index 0000000000..4f763db1ff --- /dev/null +++ b/package/python-versiontools/python-versiontools.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-versiontools +# +################################################################################ + +PYTHON_VERSIONTOOLS_VERSION = 1.9.1 +PYTHON_VERSIONTOOLS_SOURCE = versiontools-$(PYTHON_VERSIONTOOLS_VERSION).tar.gz +PYTHON_VERSIONTOOLS_SITE = http://pypi.python.org/packages/source/v/versiontools +PYTHON_VERSIONTOOLS_SETUP_TYPE = setuptools +PYTHON_VERSIONTOOLS_LICENSE = LGPLv3 + +$(eval $(python-package)) diff --git a/package/python-web2py/Config.in b/package/python-web2py/Config.in new file mode 100644 index 0000000000..b10d3a48a5 --- /dev/null +++ b/package/python-web2py/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_PYTHON_WEB2PY + bool "python-web2py" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_PYDAL + select BR2_PACKAGE_PYTHON_ZLIB + select BR2_PACKAGE_PYTHON_PYEXPAT + select BR2_PACKAGE_PYTHON_SQLITE + help + web2py is a free open source full-stack framework for rapid + development of fast, scalable, secure and portable + database-driven web-based applications. + + http://web2py.com + +if BR2_PACKAGE_PYTHON_WEB2PY + +config BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD + string "admin panel password" + default web2py + help + Set the admin panel password. + +endif diff --git a/package/python-web2py/S51web2py b/package/python-web2py/S51web2py new file mode 100644 index 0000000000..8d229e16cf --- /dev/null +++ b/package/python-web2py/S51web2py @@ -0,0 +1,25 @@ +#!/bin/sh + +case "$1" in + start) + printf "Starting web2py: " + start-stop-daemon -S -q -m -p /run/web2py.pid \ + -c www-data \ + -b -x /var/www/web2py/web2py.py \ + -- --nogui -a '""' -i 0.0.0.0 -p 8000 + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping web2py: " + start-stop-daemon -K -q -p /run/web2py.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart) + "$0" stop + sleep 1 + "$0" start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + ;; +esac diff --git a/package/python-web2py/python-web2py.hash b/package/python-web2py/python-web2py.hash new file mode 100644 index 0000000000..3de8dbf4de --- /dev/null +++ b/package/python-web2py/python-web2py.hash @@ -0,0 +1,2 @@ +# sha256 locally computed +sha256 7e22a5624d8d2909e165110f0bec6b43ee36ff6834d689f4027e06dece662031 python-web2py-R-2.12.3.tar.gz diff --git a/package/python-web2py/python-web2py.mk b/package/python-web2py/python-web2py.mk new file mode 100644 index 0000000000..38faabc55d --- /dev/null +++ b/package/python-web2py/python-web2py.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# python-web2py +# +################################################################################ + +PYTHON_WEB2PY_VERSION = R-2.12.3 +PYTHON_WEB2PY_SITE = $(call github,web2py,web2py,$(PYTHON_WEB2PY_VERSION)) +PYTHON_WEB2PY_LICENSE = LGPLv3 +PYTHON_WEB2PY_LICENSE_FILES = LICENSE +PYTHON_WEB2PY_DEPENDENCIES = python python-pydal host-python-pydal + +define PYTHON_WEB2PY_INSTALL_TARGET_CMDS + $(HOST_DIR)/usr/bin/python2 -c 'import os; \ + os.chdir("$(@D)"); \ + from gluon.main import save_password; \ + save_password($(BR2_PACKAGE_PYTHON_WEB2PY_PASSWORD),8000)' + mkdir -p $(TARGET_DIR)/var/www/web2py + cp -dpfr $(@D)/* $(TARGET_DIR)/var/www/web2py +endef + +define PYTHON_WEB2PY_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/python-web2py/S51web2py \ + $(TARGET_DIR)/etc/init.d/S51web2py +endef + +define PYTHON_WEB2PY_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/python-web2py/web2py.service \ + $(TARGET_DIR)/usr/lib/systemd/system/web2py.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib//systemd/system/web2py.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/web2py.service +endef + +# www-data user and group are used for web2py. Because these user and group +# are already set by buildroot, it is not necessary to redefine them. +# See system/skeleton/etc/passwd +# username: www-data uid: 33 +# groupname: www-data gid: 33 +# +# So, we just need to create the directories used by web2py with the right +# ownership. +define PYTHON_WEB2PY_PERMISSIONS + /var/www/web2py r 750 33 33 - - - - - +endef + +$(eval $(generic-package)) diff --git a/package/python-web2py/web2py.service b/package/python-web2py/web2py.service new file mode 100644 index 0000000000..0274bd8c53 --- /dev/null +++ b/package/python-web2py/web2py.service @@ -0,0 +1,11 @@ +[Unit] +Description=Web2py daemon +After=network.target + +[Service] +Type=simple +ExecStart=/var/www/web2py/web2py.py --nogui -a '' -i 0.0.0.0 -p 8000 +User=www-data + +[Install] +WantedBy=multi-user.target diff --git a/package/python-webpy/Config.in b/package/python-webpy/Config.in new file mode 100644 index 0000000000..e9a51217fa --- /dev/null +++ b/package/python-webpy/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_PYTHON_WEBPY + bool "python-webpy" + depends on BR2_PACKAGE_PYTHON + help + web.py is a web framework for Python that is as simple as it is + powerful. + + http://webpy.org/ diff --git a/package/python-webpy/python-webpy.hash b/package/python-webpy/python-webpy.hash new file mode 100644 index 0000000000..0e0a8d0fb8 --- /dev/null +++ b/package/python-webpy/python-webpy.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 c3cb8930739294103b1ad109e5fd1d0efae67c06d5b6d59fce5b5a2ee6b21624 python-webpy-webpy-0.37.tar.gz diff --git a/package/python-webpy/python-webpy.mk b/package/python-webpy/python-webpy.mk new file mode 100644 index 0000000000..8bcc8ec37f --- /dev/null +++ b/package/python-webpy/python-webpy.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-webpy +# +################################################################################ + +PYTHON_WEBPY_VERSION = webpy-0.37 +PYTHON_WEBPY_SITE = $(call github,webpy,webpy,$(PYTHON_WEBPY_VERSION)) +PYTHON_WEBPY_SETUP_TYPE = distutils +PYTHON_WEBPY_LICENSE = Public Domain, CherryPy License +PYTHON_WEBPY_LICENSE_FILES = LICENSE.txt web/wsgiserver/LICENSE.txt + +$(eval $(python-package)) diff --git a/package/python-werkzeug/Config.in b/package/python-werkzeug/Config.in new file mode 100644 index 0000000000..79e9a4561e --- /dev/null +++ b/package/python-werkzeug/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_WERKZEUG + bool "python-werkzeug" + select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON # runtime + select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3 # runtime + help + Werkzeug is a WSGI utility library for Python. It's widely + used and BSD licensed. + + http://werkzeug.pocoo.org/ diff --git a/package/python-werkzeug/python-werkzeug.hash b/package/python-werkzeug/python-werkzeug.hash new file mode 100644 index 0000000000..f833b89a4d --- /dev/null +++ b/package/python-werkzeug/python-werkzeug.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=9479bc7ea6a42c2d0d82929d3926df67, sha256 locally computed +md5 9479bc7ea6a42c2d0d82929d3926df67 Werkzeug-0.11.3.tar.gz +sha256 eb5f700a9bfc96420b055635af9002d3662e43d80c3ffd31f224c25bc0d5f462 Werkzeug-0.11.3.tar.gz diff --git a/package/python-werkzeug/python-werkzeug.mk b/package/python-werkzeug/python-werkzeug.mk new file mode 100644 index 0000000000..3df481a635 --- /dev/null +++ b/package/python-werkzeug/python-werkzeug.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-werkzeug +# +################################################################################ + +PYTHON_WERKZEUG_VERSION = 0.11.3 +PYTHON_WERKZEUG_SOURCE = Werkzeug-$(PYTHON_WERKZEUG_VERSION).tar.gz +PYTHON_WERKZEUG_SITE = http://pypi.python.org/packages/source/W/Werkzeug +PYTHON_WERKZEUG_SETUP_TYPE = setuptools +PYTHON_WERKZEUG_LICENSE = BSD-3c +PYTHON_WERKZEUG_LICENSE_FILES = LICENSE + +$(eval $(python-package)) diff --git a/package/python-ws4py/Config.in b/package/python-ws4py/Config.in new file mode 100644 index 0000000000..f4763a8027 --- /dev/null +++ b/package/python-ws4py/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_PYTHON_WS4PY + bool "python-ws4py" + help + ws4py is a Python package implementing the WebSocket protocol + as defined in RFC 6455. + + https://ws4py.readthedocs.org diff --git a/package/python-ws4py/python-ws4py.hash b/package/python-ws4py/python-ws4py.hash new file mode 100644 index 0000000000..e58e14aaf3 --- /dev/null +++ b/package/python-ws4py/python-ws4py.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=6b47e33cbd13f5c134b04f2a44a480ad, sha256 locally computed +md5 6b47e33cbd13f5c134b04f2a44a480ad ws4py-0.3.4.tar.gz +sha256 85d5c01bb0d031e151a32fad56094caf54e20c2ddb51cf25b5709421ff92d007 ws4py-0.3.4.tar.gz diff --git a/package/python-ws4py/python-ws4py.mk b/package/python-ws4py/python-ws4py.mk new file mode 100644 index 0000000000..f332d15078 --- /dev/null +++ b/package/python-ws4py/python-ws4py.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-ws4py +# +################################################################################ + +PYTHON_WS4PY_VERSION = 0.3.4 +PYTHON_WS4PY_SOURCE = ws4py-$(PYTHON_WS4PY_VERSION).tar.gz +PYTHON_WS4PY_SITE = https://pypi.python.org/packages/source/w/ws4py +PYTHON_WS4PY_SETUP_TYPE = setuptools +PYTHON_WS4PY_LICENSE = BSD-3c +PYTHON_WS4PY_LICENSE_FILES = ws4py/__init__.py + +$(eval $(python-package)) diff --git a/package/python-wsaccel/Config.in b/package/python-wsaccel/Config.in new file mode 100644 index 0000000000..ee61e8a07a --- /dev/null +++ b/package/python-wsaccel/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_PYTHON_WSACCEL + bool "python-wsaccel" + help + Accelerator for ws4py and AutobahnPython. + + https://pypi.python.org/pypi/wsaccel diff --git a/package/python-wsaccel/python-wsaccel.hash b/package/python-wsaccel/python-wsaccel.hash new file mode 100644 index 0000000000..a02b5a8712 --- /dev/null +++ b/package/python-wsaccel/python-wsaccel.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=2b4ea3d6847855c0587d37fca9db0557, sha256 locally computed. +md5 2b4ea3d6847855c0587d37fca9db0557 wsaccel-0.6.2.tar.gz +sha256 425706acf0724d2f6bfa391ec37b4ef121d3432c956029de3cea4e101c218e0c wsaccel-0.6.2.tar.gz diff --git a/package/python-wsaccel/python-wsaccel.mk b/package/python-wsaccel/python-wsaccel.mk new file mode 100644 index 0000000000..3e7b3324b9 --- /dev/null +++ b/package/python-wsaccel/python-wsaccel.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# python-wsaccel +# +################################################################################ + +PYTHON_WSACCEL_VERSION = 0.6.2 +PYTHON_WSACCEL_SOURCE = wsaccel-$(PYTHON_WSACCEL_VERSION).tar.gz +PYTHON_WSACCEL_SITE = http://pypi.python.org/packages/source/w/wsaccel +PYTHON_WSACCEL_LICENSE = Apache-2.0 +PYTHON_WSACCEL_SETUP_TYPE = setuptools + +$(eval $(python-package)) diff --git a/package/python-zope-interface/Config.in b/package/python-zope-interface/Config.in new file mode 100644 index 0000000000..01f4a94cdb --- /dev/null +++ b/package/python-zope-interface/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_PYTHON_ZOPE_INTERFACE + bool "python-zope-interface" + help + This package provides an implementation of "object interfaces" for + Python. Interfaces are a mechanism for labeling objects as conforming + to a given API or contract. So, this package can be considered as + implementation of the Design By Contract methodology support in Python. + + http://docs.zope.org/zope.interface/ diff --git a/package/python-zope-interface/python-zope-interface.hash b/package/python-zope-interface/python-zope-interface.hash new file mode 100644 index 0000000000..2c161f3766 --- /dev/null +++ b/package/python-zope-interface/python-zope-interface.hash @@ -0,0 +1,3 @@ +# md5 from https://pypi.python.org/pypi?:action=show_md5&digest=9ae3d24c0c7415deb249dd1a132f0f79, sha256 locally computed +md5 9ae3d24c0c7415deb249dd1a132f0f79 zope.interface-4.1.3.tar.gz +sha256 2e221a9eec7ccc58889a278ea13dcfed5ef939d80b07819a9a8b3cb1c681484f zope.interface-4.1.3.tar.gz diff --git a/package/python-zope-interface/python-zope-interface.mk b/package/python-zope-interface/python-zope-interface.mk new file mode 100644 index 0000000000..ac3c230149 --- /dev/null +++ b/package/python-zope-interface/python-zope-interface.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# python-zope-interface +# +################################################################################ + +PYTHON_ZOPE_INTERFACE_VERSION = 4.1.3 +PYTHON_ZOPE_INTERFACE_SOURCE = zope.interface-$(PYTHON_ZOPE_INTERFACE_VERSION).tar.gz +PYTHON_ZOPE_INTERFACE_SITE = https://pypi.python.org/packages/source/z/zope.interface +PYTHON_ZOPE_INTERFACE_SETUP_TYPE = setuptools +PYTHON_ZOPE_INTERFACE_LICENSE = ZPLv2.1 +PYTHON_ZOPE_INTERFACE_LICENSE_FILES = LICENSE.txt + +$(eval $(python-package)) diff --git a/package/python/001-remove-host-header-path.patch b/package/python/001-remove-host-header-path.patch new file mode 100644 index 0000000000..dfb84ffa1e --- /dev/null +++ b/package/python/001-remove-host-header-path.patch @@ -0,0 +1,32 @@ +setup.py: do not add invalid header locations + +This piece of code incorrectly adds /usr/include to +self.compiler.include_dirs, and results in the following invalid +compilation line: + +/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc -fPIC \ + -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \ + -pipe -Os -DNDEBUG -g -O3 -Wall -Wstrict-prototypes \ + -I/usr/include -I. -IInclude -I./Include \ + -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include \ + -I/home/thomas/projets/buildroot/output/build/python-2.7.6/Include \ + -I/home/thomas/projets/buildroot/output/build/python-2.7.6 \ + -c /home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/mathmodule.c \ + -o build/temp.linux2-arm-2.7/home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/mathmodule.o +cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories] +[...] + +Signed-off-by: Thomas Petazzoni +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -480,7 +480,7 @@ + for directory in reversed(options.dirs): + add_dir_to_list(dir_list, directory) + +- if os.path.normpath(sys.prefix) != '/usr' \ ++ if False and os.path.normpath(sys.prefix) != '/usr' \ + and not sysconfig.get_config_var('PYTHONFRAMEWORK'): + # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework + # (PYTHONFRAMEWORK is set) to avoid # linking problems when diff --git a/package/python/002-fix-get-python-inc.patch b/package/python/002-fix-get-python-inc.patch new file mode 100644 index 0000000000..bfee03aaac --- /dev/null +++ b/package/python/002-fix-get-python-inc.patch @@ -0,0 +1,36 @@ +Fix get_python_inc() for cross-compilation + +When we are cross compiling, doing os.path.dirname(sys.executable) to +get the build directory is incorrect, because we're executing the host +Python to build things for the target. Instead, we should use the +project_base variable. + +This fixes cross-compilation, which was adding incorrect header paths +pointing to the location where the host Python was built: + +/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc -fPIC -fno-strict-aliasing \ + -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os -DNDEBUG -g -O3 -Wall -Wstrict-prototypes \ + -I/usr/include -I. -IInclude -I./Include -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include \ + -I/home/thomas/projets/buildroot/output/host/usr/bin/Include -I/home/thomas/projets/buildroot/output/host/usr/bin \ + -c /home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/_struct.c \ + -o build/temp.linux2-arm-2.7/home/thomas/projets/buildroot/output/build/python-2.7.6/Modules/_struct.o + +This patch allows to fix the +/home/thomas/projets/buildroot/output/host/usr/bin/Include and +/home/thomas/projets/buildroot/output/host/usr/bin paths that are +incorrectly added to the header paths. + +Signed-off-by: Thomas Petazzoni +Index: b/Lib/distutils/sysconfig.py +=================================================================== +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -79,7 +79,7 @@ + + if os.name == "posix": + if python_build: +- buildir = os.path.dirname(sys.executable) ++ buildir = project_base + if plat_specific: + # python.h is located in the buildir + inc_dir = buildir diff --git a/package/python/004-sysconfigdata-install-location.patch b/package/python/004-sysconfigdata-install-location.patch new file mode 100644 index 0000000000..edf7120e12 --- /dev/null +++ b/package/python/004-sysconfigdata-install-location.patch @@ -0,0 +1,76 @@ +Change the install location of _sysconfigdata.py + +The _sysconfigdata.py module contains definitions that are needed when +building Python modules. In cross-compilation mode, when building +Python extensions for the target, we need to use the _sysconfigdata.py +of the target Python while executing the host Python. + +However until now, the _sysconfigdata.py module was installed in +build/lib.- directory, together with a number of +architecture-specific shared objects, which cannot be used with the +host Python. + +To solve this problem, this patch moves _sysconfigdata.py to a +separate location, build/sysconfigdata.-/, and only +this directory gets added to the PYTHONPATH of the host Python +interpreter when building Python modules for the target. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -462,6 +462,9 @@ + rm -f ./pybuilddir.txt ; \ + exit 1 ; \ + fi ++ echo `cat pybuilddir.txt`/sysconfigdata > pysysconfigdatadir.txt ++ mkdir -p `cat pysysconfigdatadir.txt` ++ cp `cat pybuilddir.txt`/_sysconfigdata.py `cat pysysconfigdatadir.txt` + + # Build the shared modules + # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for +@@ -1002,7 +1005,7 @@ + else true; \ + fi; \ + done +- @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \ ++ @for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc $(srcdir)/Lib/*.egg-info ; \ + do \ + if test -x $$i; then \ + $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \ +@@ -1012,6 +1015,11 @@ + echo $(INSTALL_DATA) $$i $(LIBDEST); \ + fi; \ + done ++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \ ++ $(DESTDIR)$(LIBDEST) ++ mkdir -p $(DESTDIR)$(LIBDEST)/sysconfigdata ++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \ ++ $(DESTDIR)$(LIBDEST)/sysconfigdata + @for d in $(LIBSUBDIRS); \ + do \ + a=$(srcdir)/Lib/$$d; \ +@@ -1337,7 +1345,7 @@ + Modules/Setup Modules/Setup.local Modules/Setup.config \ + Modules/ld_so_aix Modules/python.exp Misc/python.pc + -rm -f python*-gdb.py +- -rm -f pybuilddir.txt ++ -rm -f pybuilddir.txt pysysconfigdatadir.txt + find $(srcdir)/[a-zA-Z]* '(' -name '*.fdc' -o -name '*~' \ + -o -name '[@,#]*' -o -name '*.old' \ + -o -name '*.orig' -o -name '*.rej' \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -33,7 +33,7 @@ + AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) + fi + AC_MSG_RESULT($interp) +- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp ++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pysysconfigdatadir.txt && echo $(abs_builddir)/`cat pysysconfigdatadir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp + fi + elif test "$cross_compiling" = maybe; then + AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) diff --git a/package/python/005-pyc-pyo-conditional.patch b/package/python/005-pyc-pyo-conditional.patch new file mode 100644 index 0000000000..1b677dfb11 --- /dev/null +++ b/package/python/005-pyc-pyo-conditional.patch @@ -0,0 +1,59 @@ +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1050,24 +1050,32 @@ + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi ++ifeq (@PYC_BUILD@,yes) + PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) ++endif ++ifeq (@PYO_BUILD@,yes) + PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) ++endif ++ifeq (@PYC_BUILD@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages ++endif ++ifeq (@PYO_BUILD@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages ++endif + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -739,6 +739,17 @@ + ;; + esac + ++AC_SUBST(PYC_BUILD) ++ ++AC_ARG_ENABLE(pyc-build, ++ AS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]), ++ [ PYC_BUILD="${enableval}" ], [ PYC_BUILD=yes ]) ++ ++AC_SUBST(PYO_BUILD) ++ ++AC_ARG_ENABLE(pyo-build, ++ AS_HELP_STRING([--disable-pyo-build], [disable build of pyo files]), ++ [ PYO_BUILD="${enableval}" ], [ PYO_BUILD=yes ]) + + AC_SUBST(LIBRARY) + AC_MSG_CHECKING(LIBRARY) diff --git a/package/python/006-cross-compile-getaddrinfo.patch b/package/python/006-cross-compile-getaddrinfo.patch new file mode 100644 index 0000000000..dd44ec1558 --- /dev/null +++ b/package/python/006-cross-compile-getaddrinfo.patch @@ -0,0 +1,13 @@ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -3353,7 +3353,7 @@ + + AC_MSG_RESULT($ac_cv_buggy_getaddrinfo) + +-if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes ++if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes + then + if test $ipv6 = yes + then diff --git a/package/python/007-disable-extensions.patch b/package/python/007-disable-extensions.patch new file mode 100644 index 0000000000..9365cb1f5b --- /dev/null +++ b/package/python/007-disable-extensions.patch @@ -0,0 +1,60 @@ +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -156,6 +156,8 @@ + # configure script arguments + CONFIG_ARGS= @CONFIG_ARGS@ + ++# disabled extensions ++DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@ + + # Subdirectories with code + SRCDIRS= @SRCDIRS@ +@@ -477,6 +479,7 @@ + esac; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ ++ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + + # Build static library +@@ -1191,7 +1194,8 @@ + # Install the dynamically loadable modules + # This goes into $(exec_prefix) + sharedinstall: sharedmods +- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ ++ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ ++ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2290,6 +2290,8 @@ + + PKG_PROG_PKG_CONFIG + ++AC_SUBST(DISABLED_EXTENSIONS) ++ + # Check for use of the system expat library + AC_MSG_CHECKING(for --with-system-expat) + AC_ARG_WITH(system_expat, +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -33,7 +33,10 @@ + COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) + + # This global variable is used to hold the list of modules to be disabled. +-disabled_module_list = [] ++try: ++ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ") ++except KeyError: ++ disabled_module_list = list() + + def add_dir_to_list(dirlist, dir): + """Add the directory 'dir' to the list 'dirlist' (at the front) if diff --git a/package/python/008-distutils-use-python-sysroot.patch b/package/python/008-distutils-use-python-sysroot.patch new file mode 100644 index 0000000000..7cd748761a --- /dev/null +++ b/package/python/008-distutils-use-python-sysroot.patch @@ -0,0 +1,54 @@ +Adjust library/header paths for cross-compilation + +When cross-compiling third-party extensions, the get_python_inc() or +get_python_lib() can be called, to return the path to headers or +libraries. However, they use the sys.prefix of the host Python, which +returns incorrect paths when cross-compiling (paths pointing to host +headers and libraries). + +In order to fix this, we introduce the _python_sysroot, _python_prefix +and _python_exec_prefix variables, that allow to override these +values, and get correct header/library paths when cross-compiling +third-party Python modules. + +The _python_sysroot variable is also used to prefix the LIBDIR value +taken from the sysconfigdata module. + +Signed-off-by: Thomas Petazzoni + +Index: b/Lib/distutils/sysconfig.py +=================================================================== +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -19,8 +19,13 @@ + from distutils.errors import DistutilsPlatformError + + # These are needed in a couple of spots, so just compute them once. +-PREFIX = os.path.normpath(sys.prefix) +-EXEC_PREFIX = os.path.normpath(sys.exec_prefix) ++if "_python_sysroot" in os.environ: ++ _sysroot=os.environ.get('_python_sysroot') ++ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) ++ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) ++else: ++ PREFIX = os.path.normpath(sys.prefix) ++ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) + + # Path to the base directory of the project. On Windows the binary may + # live in project/PCBuild9. If we're dealing with an x64 Windows build, +Index: b/Lib/distutils/command/build_ext.py +=================================================================== +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -237,7 +237,10 @@ + if (sysconfig.get_config_var('Py_ENABLE_SHARED')): + if not sysconfig.python_build: + # building third party extensions +- self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) ++ libdir = sysconfig.get_config_var('LIBDIR') ++ if "_python_sysroot" in os.environ: ++ libdir = os.environ.get("_python_sysroot") + libdir ++ self.library_dirs.append(libdir) + else: + # building python standard extensions + self.library_dirs.append('.') diff --git a/package/python/009-no-termcap-host-path.patch b/package/python/009-no-termcap-host-path.patch new file mode 100644 index 0000000000..781e17952f --- /dev/null +++ b/package/python/009-no-termcap-host-path.patch @@ -0,0 +1,23 @@ +Don't look in /usr/lib/termcap for libraries + +Signed-off-by: Thomas Petazzoni + + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -764,12 +764,9 @@ + pass # Issue 7384: Already linked against curses or tinfo. + elif curses_library: + readline_libs.append(curses_library) +- elif self.compiler.find_library_file(lib_dirs + +- ['/usr/lib/termcap'], +- 'termcap'): ++ elif self.compiler.find_library_file(lib_dirs, 'termcap'): + readline_libs.append('termcap') + exts.append( Extension('readline', ['readline.c'], +- library_dirs=['/usr/lib/termcap'], + extra_link_args=readline_extra_link_args, + libraries=readline_libs) ) + else: diff --git a/package/python/010-fix-python-config.patch b/package/python/010-fix-python-config.patch new file mode 100644 index 0000000000..1266f3d3af --- /dev/null +++ b/package/python/010-fix-python-config.patch @@ -0,0 +1,208 @@ +Add a backport of http://bugs.python.org/issue16235 so we can use +python-config for cross builds. +This basically replaces the python version of python-config with a pure-shell +version that's already preprocessed when installed and doesn't depend +on the sysconfig import that usually leads to bad data/results. + +Signed-off-by: Gustavo Zacarias + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -885,6 +885,7 @@ + + # Other platforms follow + if test $enable_shared = "yes"; then ++ PY_ENABLE_SHARED=1 + AC_DEFINE(Py_ENABLE_SHARED, 1, [Defined if Python is built as a shared library.]) + case $ac_sys_system in + BeOS*) +@@ -945,6 +946,7 @@ + + esac + else # shared is disabled ++ PY_ENABLE_SHARED=0 + case $ac_sys_system in + CYGWIN*) + BLDLIBRARY='$(LIBRARY)' +@@ -1921,6 +1923,9 @@ + AC_SUBST(BLDSHARED) + AC_SUBST(CCSHARED) + AC_SUBST(LINKFORSHARED) ++AC_SUBST(PY_ENABLE_SHARED) ++LIBPL="${prefix}/lib/python${VERSION}/config" ++AC_SUBST(LIBPL) + # SO is the extension of shared libraries `(including the dot!) + # -- usually .so, .sl on HP-UX, .dll on Cygwin + AC_MSG_CHECKING(SO) +@@ -4588,7 +4593,7 @@ + AC_SUBST(ENSUREPIP) + + # generate output files +-AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc) ++AC_CONFIG_FILES(Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh) + AC_CONFIG_FILES([Modules/ld_so_aix], [chmod +x Modules/ld_so_aix]) + AC_OUTPUT + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -166,7 +166,7 @@ + SUBDIRSTOO= Include Lib Misc Demo + + # Files and directories to be distributed +-CONFIGFILES= configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in ++CONFIGFILES= configure configure.ac acconfig.h pyconfig.h.in Makefile.pre.in Misc/python-config.sh + DISTFILES= README ChangeLog $(CONFIGFILES) + DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy + DIST= $(DISTFILES) $(DISTDIRS) +@@ -410,7 +410,7 @@ + + # Default target + all: build_all +-build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks ++build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks python-config + + # Compile a binary with gcc profile guided optimization. + profile-opt: +@@ -1101,10 +1101,12 @@ + fi; \ + cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen + +-python-config: $(srcdir)/Misc/python-config.in ++python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh + # Substitution happens here, as the completely-expanded BINDIR + # is not available in configure +- sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config ++ sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config.py ++ # Replace makefile compat. variable references with shell script compat. ones; $(VAR) -> ${VAR} ++ sed -e 's,\$$(\([A-Za-z0-9_]*\)),\$$\{\1\},g' Misc/python-config.sh >python-config + + # Install the include files + INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY) +@@ -1163,7 +1165,7 @@ + $(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup + $(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh + $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config +- rm python-config ++ $(INSTALL_SCRIPT) python-config.py $(DESTDIR)$(LIBPL)/python-config.py + @if [ -s Modules/python.exp -a \ + "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ + echo; echo "Installing support files for building shared extension modules on AIX:"; \ +@@ -1345,6 +1347,7 @@ + config.cache config.log pyconfig.h Modules/config.c + -rm -rf build platform + -rm -rf $(PYTHONFRAMEWORKDIR) ++ -rm -f python-config.py python-config + + # Make things extra clean, before making a distribution: + # remove all generated files, even Makefile[.pre] +Index: b/Misc/python-config.sh.in +=================================================================== +--- /dev/null ++++ b/Misc/python-config.sh.in +@@ -0,0 +1,102 @@ ++#!/bin/sh ++ ++exit_with_usage () ++{ ++ echo "Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir" ++ exit $1 ++} ++ ++if [ "$1" = "" ] ; then ++ exit_with_usage 1 ++fi ++ ++# Returns the actual prefix where this script was installed to. ++installed_prefix () ++{ ++ RESULT=$(dirname $(cd $(dirname "$1") && pwd -P)) ++ if which readlink >/dev/null 2>&1 ; then ++ RESULT=$(readlink -f "$RESULT") ++ fi ++ echo $RESULT ++} ++ ++prefix_build="@prefix@" ++prefix_real=$(installed_prefix "$0") ++ ++# Use sed to fix paths from their built to locations to their installed to locations. ++prefix=$(echo "$prefix_build" | sed "s#$prefix_build#$prefix_real#") ++exec_prefix_build="@exec_prefix@" ++exec_prefix=$(echo "$exec_prefix_build" | sed "s#$exec_prefix_build#$prefix_real#") ++includedir=$(echo "@includedir@") ++libdir=$(echo "@libdir@" | sed "s#$prefix_build#$prefix_real#") ++CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix_build#$prefix_real#") ++VERSION="@VERSION@" ++LIBM="@LIBM@" ++LIBC="@LIBC@" ++SYSLIBS="$LIBM $LIBC" ++LIBS="@LIBS@ $SYSLIBS -lpython${VERSION}" ++BASECFLAGS="@BASECFLAGS@" ++LDLIBRARY="@LDLIBRARY@" ++LINKFORSHARED="@LINKFORSHARED@" ++OPT="@OPT@" ++PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" ++LDVERSION="@LDVERSION@" ++LIBDEST=${prefix}/lib/python${VERSION} ++LIBPL=$(echo "@LIBPL@" | sed "s#$prefix_build#$prefix_real#") ++SO="@SO@" ++PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" ++INCDIR="-I$includedir/python${VERSION}" ++PLATINCDIR="-I$includedir/python${VERSION}" ++ ++# Scan for --help or unknown argument. ++for ARG in $* ++do ++ case $ARG in ++ --help) ++ exit_with_usage 0 ++ ;; ++ --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--abiflags|--configdir) ++ ;; ++ *) ++ exit_with_usage 1 ++ ;; ++esac ++done ++ ++for ARG in "$@" ++do ++ case "$ARG" in ++ --prefix) ++ echo "$prefix" ++ ;; ++ --exec-prefix) ++ echo "$exec_prefix" ++ ;; ++ --includes) ++ echo "$INCDIR $PLATINCDIR" ++ ;; ++ --cflags) ++ echo "$INCDIR $PLATINCDIR $BASECFLAGS $CFLAGS $OPT" ++ ;; ++ --libs) ++ echo "$LIBS" ++ ;; ++ --ldflags) ++ LINKFORSHAREDUSED= ++ if [ -z "$PYTHONFRAMEWORK" ] ; then ++ LINKFORSHAREDUSED=$LINKFORSHARED ++ fi ++ LIBPLUSED= ++ if [ "$PY_ENABLE_SHARED" = "0" ] ; then ++ LIBPLUSED="-L$LIBPL" ++ fi ++ echo "$LIBPLUSED -L$libdir $LIBS $LINKFORSHAREDUSED" ++ ;; ++ --extension-suffix) ++ echo "$SO" ++ ;; ++ --configdir) ++ echo "$LIBPL" ++ ;; ++esac ++done diff --git a/package/python/011-remove-python-symlink.patch b/package/python/011-remove-python-symlink.patch new file mode 100644 index 0000000000..b0548c31df --- /dev/null +++ b/package/python/011-remove-python-symlink.patch @@ -0,0 +1,30 @@ +Remove the python symlink install rules. + +The python symlink installation will be handled by Buildroot itself, because +Buildroot needs to control to what python interpreter (python2 or python3) the +python symlink points to. + +Signed-off-by: Samuel Martin + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -890,17 +890,10 @@ + # $(PYTHON) -> python2 -> python$(VERSION)) + # Also create equivalent chains for other installed files + bininstall: altbininstall +- -if test -f $(DESTDIR)$(BINDIR)/$(PYTHON) -o -h $(DESTDIR)$(BINDIR)/$(PYTHON); \ +- then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \ +- else true; \ +- fi +- (cd $(DESTDIR)$(BINDIR); $(LN) -s python2$(EXE) $(PYTHON)) + -rm -f $(DESTDIR)$(BINDIR)/python2$(EXE) + (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(EXE) python2$(EXE)) + -rm -f $(DESTDIR)$(BINDIR)/python2-config + (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python2-config) +- -rm -f $(DESTDIR)$(BINDIR)/python-config +- (cd $(DESTDIR)$(BINDIR); $(LN) -s python2-config python-config) + -test -d $(DESTDIR)$(LIBPC) || $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC) + -rm -f $(DESTDIR)$(LIBPC)/python2.pc + (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python2.pc) diff --git a/package/python/013-dont-add-multiarch-path.patch b/package/python/013-dont-add-multiarch-path.patch new file mode 100644 index 0000000000..94fcb0f7fb --- /dev/null +++ b/package/python/013-dont-add-multiarch-path.patch @@ -0,0 +1,27 @@ +Don't add multiarch paths + +The add_multiarch_paths() function leads, in certain build +environments, to the addition of host header paths to the CFLAGS, +which is not appropriate for cross-compilation. This patch fixes that +by simply removing the call to add_multiarch_paths() when we're +cross-compiling. + +Investigation done by David . + +Signed-off-by: Thomas Petazzoni + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -445,9 +445,9 @@ + if not cross_compiling: + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') ++ self.add_multiarch_paths() + if cross_compiling: + self.add_gcc_paths() +- self.add_multiarch_paths() + + # Add paths specified in the environment variables LDFLAGS and + # CPPFLAGS for header and library files. diff --git a/package/python/014-abort-on-failed-modules.patch b/package/python/014-abort-on-failed-modules.patch new file mode 100644 index 0000000000..4bceeb62d7 --- /dev/null +++ b/package/python/014-abort-on-failed-modules.patch @@ -0,0 +1,21 @@ +Abort on failed module build + +When building a Python module fails, the setup.py script currently +doesn't exit with an error, and simply continues. This is not a really +nice behavior, so this patch changes setup.py to abort with an error, +so that the build issue is clearly noticeable. + +Signed-off-by: Thomas Petazzoni + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -283,6 +283,7 @@ + print "Failed to build these modules:" + print_three_column(failed) + print ++ sys.exit(1) + + def build_extension(self, ext): + diff --git a/package/python/015-fix-sqlite-without-threads.patch b/package/python/015-fix-sqlite-without-threads.patch new file mode 100644 index 0000000000..f51c37b372 --- /dev/null +++ b/package/python/015-fix-sqlite-without-threads.patch @@ -0,0 +1,49 @@ +sqlite3: fix build when threads are not used/available + +When threads are not used/available, a function in the sqlite3 extension +ends up with a label at the end: + + void _pysqlite_final_callback(sqlite3_context* context) + { + PyObject* function_result; + PyObject** aggregate_instance; + int ok; + + #ifdef WITH_THREAD + PyGILState_STATE threadstate; + + threadstate = PyGILState_Ensure(); + #endif + + aggregate_instance = (PyObject**)sqlite3_aggregate_context(context, sizeof(PyObject*)); + if (!*aggregate_instance) { + goto error; + } + + [......] + + error: + #ifdef WITH_THREAD + PyGILState_Release(threadstate); + #endif + } + +This is not valid, and gcc complains. + +Fix that by adding a dummy statement after the label, so that the label +is never the last statement of the function. + +Signed-off-by: "Yann E. MORIN" + +Index: b/Modules/_sqlite/connection.c +=================================================================== +--- a/Modules/_sqlite/connection.c ++++ b/Modules/_sqlite/connection.c +@@ -786,6 +786,7 @@ + #ifdef WITH_THREAD + PyGILState_Release(threadstate); + #endif ++ ; /* Make gcc happy: a label can't be at the end of a function */ + } + + static void _pysqlite_drop_unused_statement_references(pysqlite_Connection* self) diff --git a/package/python/016-serial-ioctl-workaround.patch b/package/python/016-serial-ioctl-workaround.patch new file mode 100644 index 0000000000..80ed65e39a --- /dev/null +++ b/package/python/016-serial-ioctl-workaround.patch @@ -0,0 +1,24 @@ +Serial ioctl() workaround + +The ioctls.h of some architectures (notably xtensa) references structs from +linux/serial.h. Make sure to include this header as well. + +Also, undef TIOCTTYGSTRUCT that require reference to internal kernel tty_struct, +but isn't actually referenced in modern kernels. + +Signed-off-by: Baruch Siach +--- +Index: b/Modules/termios.c +=================================================================== +--- a/Modules/termios.c ++++ b/Modules/termios.c +@@ -16,7 +16,9 @@ + * so this needs to be included first on that platform. */ + #include + #endif ++#include + #include ++#undef TIOCTTYGSTRUCT + + /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR, + * MDTR, MRI, and MRTS (appearantly used internally by some things diff --git a/package/python/017-distutils-scripts-dont-adjust-shebang.patch b/package/python/017-distutils-scripts-dont-adjust-shebang.patch new file mode 100644 index 0000000000..da4dc36df5 --- /dev/null +++ b/package/python/017-distutils-scripts-dont-adjust-shebang.patch @@ -0,0 +1,25 @@ +Do not adjust the shebang of Python scripts for cross-compilation + +The copy_scripts() method in distutils copies the scripts listed in +the setup file and adjusts the first line to refer to the current +Python interpreter. When cross-compiling, this means that the adjusted +shebang refers to the host Python interpreter. + +This patch modifies copy_scripts() to preserve the shebang when +cross-compilation is detected. + +Signed-off-by: Christophe Vu-Brugier + +Index: b/Lib/distutils/command/build_scripts.py +=================================================================== +--- a/Lib/distutils/command/build_scripts.py ++++ b/Lib/distutils/command/build_scripts.py +@@ -89,7 +89,7 @@ + adjust = 1 + post_interp = match.group(1) or '' + +- if adjust: ++ if adjust and not '_python_sysroot' in os.environ: + log.info("copying and adjusting %s -> %s", script, + self.build_dir) + if not self.dry_run: diff --git a/package/python/018-fix-add-gcc-paths-logic.patch b/package/python/018-fix-add-gcc-paths-logic.patch new file mode 100644 index 0000000000..af6efcc38c --- /dev/null +++ b/package/python/018-fix-add-gcc-paths-logic.patch @@ -0,0 +1,27 @@ +Override system locale and set to default when adding gcc paths + +Forces the use of the default locale in the function +add_gcc_paths, which is called when cross compiling to add the +include and library paths. This is necessary because otherwise +the gcc output is localized and the output parsing fails, which +results in no paths added and detect_modules not able to find +any system library (eg. libz, libssl, etc.) + +[Thomas: patch taken from https://bugs.python.org/issue23767.] + +Signed-off-by: Samuel Cabrero +Signed-off-by: Thomas Petazzoni + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -414,7 +414,7 @@ + tmpfile = os.path.join(self.build_temp, 'gccpaths') + if not os.path.exists(self.build_temp): + os.makedirs(self.build_temp) +- ret = os.system('%s -E -v - %s 1>/dev/null' % (gcc, tmpfile)) ++ ret = os.system('LC_ALL=C %s -E -v - %s 1>/dev/null' % (gcc, tmpfile)) + is_gcc = False + in_incdirs = False + inc_dirs = [] diff --git a/package/python/100-optional-test-modules.patch b/package/python/100-optional-test-modules.patch new file mode 100644 index 0000000000..3de6f2669d --- /dev/null +++ b/package/python/100-optional-test-modules.patch @@ -0,0 +1,94 @@ +Add an option to disable installation of test modules + +The Python standard distribution comes with many test modules, that +are not necessarly useful on embedded targets. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 40 +++++++++++++++++++++++++++------------- + configure.in | 6 ++++++ + 2 files changed, 33 insertions(+), 13 deletions(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -960,27 +960,43 @@ + plat-mac/lib-scriptpackages/SystemEvents \ + plat-mac/lib-scriptpackages/Terminal + PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages +-LIBSUBDIRS= lib-tk lib-tk/test lib-tk/test/test_tkinter \ +- lib-tk/test/test_ttk site-packages test test/audiodata test/capath \ +- test/data test/cjkencodings test/decimaltestdata test/xmltestdata \ +- test/imghdrdata \ +- test/subprocessdata \ +- test/tracedmodules \ ++LIBSUBDIRS= lib-tk site-packages \ + encodings compiler hotshot \ +- email email/mime email/test email/test/data \ ++ email email/mime \ + ensurepip ensurepip/_bundled \ +- json json/tests \ +- sqlite3 sqlite3/test \ +- logging bsddb bsddb/test csv importlib wsgiref \ +- lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \ +- lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \ +- ctypes ctypes/test ctypes/macholib \ +- idlelib idlelib/Icons idlelib/idle_test \ +- distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ ++ json \ ++ sqlite3 \ ++ logging bsddb csv importlib wsgiref \ ++ lib2to3 lib2to3/fixes lib2to3/pgen2 \ ++ ctypes ctypes/macholib \ ++ idlelib idlelib/Icons \ ++ distutils distutils/command $(XMLLIBSUBDIRS) \ + multiprocessing multiprocessing/dummy \ +- unittest unittest/test \ ++ unittest \ + lib-old \ + curses pydoc_data $(MACHDEPS) ++ ++TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \ ++ lib-tk/test/test_ttk test test/audiodata test/capath test/data \ ++ test/cjkencodings test/decimaltestdata test/xmltestdata \ ++ test/imghdrdata \ ++ test/subprocessdata \ ++ test/tracedmodules \ ++ email/test email/test/data \ ++ json/tests \ ++ sqlite3/test \ ++ bsddb/test \ ++ lib2to3/tests \ ++ lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \ ++ ctypes/test \ ++ idlelib/idle_test \ ++ distutils/tests \ ++ unittest/test ++ ++ifeq (@TEST_MODULES@,yes) ++LIBSUBDIRS += $(TESTSUBDIRS) ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2634,6 +2634,12 @@ + fi + + ++AC_SUBST(TEST_MODULES) ++ ++AC_ARG_ENABLE(test-modules, ++ AS_HELP_STRING([--disable-test-modules], [disable test modules]), ++ [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ]) ++ + # Check for enable-ipv6 + AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified]) + AC_MSG_CHECKING([if --enable-ipv6 is specified]) diff --git a/package/python/101-optional-pydoc.patch b/package/python/101-optional-pydoc.patch new file mode 100644 index 0000000000..143e11ab92 --- /dev/null +++ b/package/python/101-optional-pydoc.patch @@ -0,0 +1,82 @@ +Add an option to disable pydoc + +It removes 0.5 MB of data from the target plus the pydoc script +itself. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 6 +++++- + configure.in | 5 +++++ + setup.py | 10 +++++++--- + 3 files changed, 17 insertions(+), 4 deletions(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -974,7 +974,7 @@ + multiprocessing multiprocessing/dummy \ + unittest \ + lib-old \ +- curses pydoc_data $(MACHDEPS) ++ curses $(MACHDEPS) + + TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \ + lib-tk/test/test_ttk test test/audiodata test/capath test/data \ +@@ -997,6 +997,10 @@ + LIBSUBDIRS += $(TESTSUBDIRS) + endif + ++ifeq (@PYDOC@,yes) ++LIBSUBDIRS += pydoc_data ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2633,6 +2633,11 @@ + AC_CHECK_FUNCS(pthread_atfork) + fi + ++AC_SUBST(PYDOC) ++ ++AC_ARG_ENABLE(pydoc, ++ AS_HELP_STRING([--disable-pydoc], [disable pydoc]), ++ [ PYDOC="${enableval}" ], [ PYDOC=yes ]) + + AC_SUBST(TEST_MODULES) + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -2211,6 +2211,12 @@ + # turn off warnings when deprecated modules are imported + import warnings + warnings.filterwarnings("ignore",category=DeprecationWarning) ++ ++ scripts = ['Tools/scripts/idle', 'Tools/scripts/2to3', ++ 'Lib/smtpd.py'] ++ if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"): ++ scripts += [ 'Tools/scripts/pydoc' ] ++ + setup(# PyPI Metadata (PEP 301) + name = "Python", + version = sys.version.split()[0], +@@ -2231,9 +2237,7 @@ + ext_modules=[Extension('_struct', ['_struct.c'])], + + # Scripts to install +- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle', +- 'Tools/scripts/2to3', +- 'Lib/smtpd.py'] ++ scripts = scripts, + ) + + # --install-platlib diff --git a/package/python/102-optional-2to3.patch b/package/python/102-optional-2to3.patch new file mode 100644 index 0000000000..100c417a21 --- /dev/null +++ b/package/python/102-optional-2to3.patch @@ -0,0 +1,85 @@ +Add an option to disable lib2to3 + +lib2to3 is a library to convert Python 2.x code to Python 3.x. As +such, it is probably not very useful on embedded system targets. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 24 +++++++++++++++++------- + configure.in | 6 ++++++ + setup.py | 5 +++-- + 3 files changed, 26 insertions(+), 9 deletions(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -967,7 +967,6 @@ + json \ + sqlite3 \ + logging bsddb csv importlib wsgiref \ +- lib2to3 lib2to3/fixes lib2to3/pgen2 \ + ctypes ctypes/macholib \ + idlelib idlelib/Icons \ + distutils distutils/command $(XMLLIBSUBDIRS) \ +@@ -986,8 +985,6 @@ + json/tests \ + sqlite3/test \ + bsddb/test \ +- lib2to3/tests \ +- lib2to3/tests/data lib2to3/tests/data/fixers lib2to3/tests/data/fixers/myfixes \ + ctypes/test \ + idlelib/idle_test \ + distutils/tests \ +@@ -1001,6 +998,14 @@ + LIBSUBDIRS += pydoc_data + endif + ++ifeq (@LIB2TO3@,yes) ++LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2 ++TESTSUBDIRS += lib2to3/tests \ ++ lib2to3/tests/data \ ++ lib2to3/tests/data/fixers \ ++ lib2to3/tests/data/fixers/myfixes ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2645,6 +2645,12 @@ + AS_HELP_STRING([--disable-test-modules], [disable test modules]), + [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ]) + ++AC_SUBST(LIB2TO3) ++ ++AC_ARG_ENABLE(lib2to3, ++ AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]), ++ [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ]) ++ + # Check for enable-ipv6 + AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified]) + AC_MSG_CHECKING([if --enable-ipv6 is specified]) +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -2212,10 +2212,11 @@ + import warnings + warnings.filterwarnings("ignore",category=DeprecationWarning) + +- scripts = ['Tools/scripts/idle', 'Tools/scripts/2to3', +- 'Lib/smtpd.py'] ++ scripts = ['Tools/scripts/idle', 'Lib/smtpd.py'] + if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"): + scripts += [ 'Tools/scripts/pydoc' ] ++ if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"): ++ scripts += [ 'Tools/scripts/2to3' ] + + setup(# PyPI Metadata (PEP 301) + name = "Python", diff --git a/package/python/103-optional-sqlite.patch b/package/python/103-optional-sqlite.patch new file mode 100644 index 0000000000..3a48011919 --- /dev/null +++ b/package/python/103-optional-sqlite.patch @@ -0,0 +1,62 @@ +Add option to disable the sqlite3 module + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 24 +++++++++++++++++------- + configure.in | 9 +++++++++ + 2 file changed, 9 insertions(+) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2633,6 +2633,15 @@ + AC_CHECK_FUNCS(pthread_atfork) + fi + ++AC_SUBST(SQLITE3) ++AC_ARG_ENABLE(sqlite3, ++ AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]), ++ [ SQLITE3="${enableval}" ], [ SQLITE3=yes ]) ++ ++if test "$SQLITE3" = "no" ; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" ++fi ++ + AC_SUBST(PYDOC) + + AC_ARG_ENABLE(pydoc, +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -965,7 +965,6 @@ + email email/mime \ + ensurepip ensurepip/_bundled \ + json \ +- sqlite3 \ + logging bsddb csv importlib wsgiref \ + ctypes ctypes/macholib \ + idlelib idlelib/Icons \ +@@ -983,7 +982,6 @@ + test/tracedmodules \ + email/test email/test/data \ + json/tests \ +- sqlite3/test \ + bsddb/test \ + ctypes/test \ + idlelib/idle_test \ +@@ -1006,6 +1004,11 @@ + lib2to3/tests/data/fixers/myfixes + endif + ++ifeq (@SQLITE3@,yes) ++LIBSUBDIRS += sqlite3 ++TESTSUBDIRS += sqlite3/test ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ diff --git a/package/python/104-optional-tk.patch b/package/python/104-optional-tk.patch new file mode 100644 index 0000000000..18024d3a1e --- /dev/null +++ b/package/python/104-optional-tk.patch @@ -0,0 +1,66 @@ +Add an option to disable the tk module + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 14 ++++++++++---- + configure.in | 9 +++++++++ + 2 files changed, 19 insertions(+), 4 deletions(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -960,7 +960,7 @@ + plat-mac/lib-scriptpackages/SystemEvents \ + plat-mac/lib-scriptpackages/Terminal + PLATMACPATH=:plat-mac:plat-mac/lib-scriptpackages +-LIBSUBDIRS= lib-tk site-packages \ ++LIBSUBDIRS= site-packages \ + encodings compiler hotshot \ + email email/mime \ + ensurepip ensurepip/_bundled \ +@@ -974,8 +974,7 @@ + lib-old \ + curses $(MACHDEPS) + +-TESTSUBDIRS = lib-tk/test lib-tk/test/test_tkinter \ +- lib-tk/test/test_ttk test test/audiodata test/capath test/data \ ++TESTSUBDIRS = test test/audiodata test/capath test/data \ + test/cjkencodings test/decimaltestdata test/xmltestdata \ + test/imghdrdata \ + test/subprocessdata \ +@@ -1009,6 +1008,12 @@ + TESTSUBDIRS += sqlite3/test + endif + ++ifeq (@TK@,yes) ++LIBSUBDIRS += lib-tk ++TESTSUBDIRS += lib-tk/test lib-tk/test/test_tkinter \ ++ lib-tk/test/test_ttk ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2642,6 +2642,15 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" + fi + ++AC_SUBST(TK) ++AC_ARG_ENABLE(tk, ++ AS_HELP_STRING([--disable-tk], [disable tk]), ++ [ TK="${enableval}" ], [ TK=yes ]) ++ ++if test "$TK" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" ++fi ++ + AC_SUBST(PYDOC) + + AC_ARG_ENABLE(pydoc, diff --git a/package/python/105-optional-curses.patch b/package/python/105-optional-curses.patch new file mode 100644 index 0000000000..9e1ac5ad54 --- /dev/null +++ b/package/python/105-optional-curses.patch @@ -0,0 +1,54 @@ +Add an option to disable the curses module + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 6 +++++- + configure.in | 9 +++++++++ + 2 files changed, 14 insertions(+), 1 deletion(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -972,7 +972,7 @@ + multiprocessing multiprocessing/dummy \ + unittest \ + lib-old \ +- curses $(MACHDEPS) ++ $(MACHDEPS) + + TESTSUBDIRS = test test/audiodata test/capath test/data \ + test/cjkencodings test/decimaltestdata test/xmltestdata \ +@@ -1014,6 +1014,10 @@ + lib-tk/test/test_ttk + endif + ++ifeq (@CURSES@,yes) ++LIBSUBDIRS += curses ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2651,6 +2651,15 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" + fi + ++AC_SUBST(CURSES) ++AC_ARG_ENABLE(curses, ++ AS_HELP_STRING([--disable-curses], [disable curses]), ++ [ CURSES="${enableval}" ], [ CURSES=yes ]) ++ ++if test "$CURSES" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel" ++fi ++ + AC_SUBST(PYDOC) + + AC_ARG_ENABLE(pydoc, diff --git a/package/python/106-optional-expat.patch b/package/python/106-optional-expat.patch new file mode 100644 index 0000000000..6ebaf166d1 --- /dev/null +++ b/package/python/106-optional-expat.patch @@ -0,0 +1,85 @@ +Add an option to disable expat + +This patch replaces the existing --with-system-expat option with a +--with-expat={system,builtin,none} option, which allows to tell Python +whether we want to use the system expat (already installed), the expat +builtin the Python sources, or no expat at all (which disables the +installation of XML modules). + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 6 +++++- + configure.in | 18 +++++++++++++----- + setup.py | 2 +- + 3 files changed, 19 insertions(+), 7 deletions(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -968,7 +968,7 @@ + logging bsddb csv importlib wsgiref \ + ctypes ctypes/macholib \ + idlelib idlelib/Icons \ +- distutils distutils/command $(XMLLIBSUBDIRS) \ ++ distutils distutils/command \ + multiprocessing multiprocessing/dummy \ + unittest \ + lib-old \ +@@ -1018,6 +1018,10 @@ + LIBSUBDIRS += curses + endif + ++ifeq (@EXPAT@,yes) ++LIBSUBDIRS += $(XMLLIBSUBDIRS) ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2298,13 +2298,21 @@ + AC_SUBST(DISABLED_EXTENSIONS) + + # Check for use of the system expat library +-AC_MSG_CHECKING(for --with-system-expat) +-AC_ARG_WITH(system_expat, +- AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library]), ++AC_MSG_CHECKING(for --with-expat) ++AC_ARG_WITH(expat, ++ AS_HELP_STRING([--with-expat], [select which expat version to use: system, builtin, none]), + [], +- [with_system_expat="no"]) ++ [with_expat="builtin"]) + +-AC_MSG_RESULT($with_system_expat) ++AC_MSG_RESULT($with_expat) ++ ++if test "$with_expat" != "none"; then ++ EXPAT=yes ++else ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} pyexpat" ++ EXPAT=no ++fi ++AC_SUBST(EXPAT) + + # Check for use of the system libffi library + AC_MSG_CHECKING(for --with-system-ffi) +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -1463,7 +1463,7 @@ + # + # More information on Expat can be found at www.libexpat.org. + # +- if '--with-system-expat' in sysconfig.get_config_var("CONFIG_ARGS"): ++ if '--with-expat=system' in sysconfig.get_config_var("CONFIG_ARGS"): + expat_inc = [] + define_macros = [] + expat_lib = ['expat'] diff --git a/package/python/107-optional-codecs-cjk.patch b/package/python/107-optional-codecs-cjk.patch new file mode 100644 index 0000000000..22a2fed8b8 --- /dev/null +++ b/package/python/107-optional-codecs-cjk.patch @@ -0,0 +1,25 @@ +Add an option to disable CJK codecs + +Signed-off-by: Thomas Petazzoni + +--- + configure.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2650,6 +2650,12 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" + fi + ++AC_ARG_ENABLE(codecs-cjk, ++ AS_HELP_STRING([--disable-codecs-cjk], [disable CJK codecs]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk" ++ fi]) ++ + AC_SUBST(TK) + AC_ARG_ENABLE(tk, + AS_HELP_STRING([--disable-tk], [disable tk]), diff --git a/package/python/108-optional-nis.patch b/package/python/108-optional-nis.patch new file mode 100644 index 0000000000..d19ebe1e07 --- /dev/null +++ b/package/python/108-optional-nis.patch @@ -0,0 +1,28 @@ +Add an option to disable NIS + +NIS is not necessarily available in uClibc, so we need an option to +not compile support for it. + +Signed-off-by: Thomas Petazzoni + +--- + configure.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2656,6 +2656,12 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk" + fi]) + ++AC_ARG_ENABLE(nis, ++ AS_HELP_STRING([--disable-nis], [disable NIS]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" ++ fi]) ++ + AC_SUBST(TK) + AC_ARG_ENABLE(tk, + AS_HELP_STRING([--disable-tk], [disable tk]), diff --git a/package/python/109-optional-unicodedata.patch b/package/python/109-optional-unicodedata.patch new file mode 100644 index 0000000000..841f2a77b5 --- /dev/null +++ b/package/python/109-optional-unicodedata.patch @@ -0,0 +1,25 @@ +Add an option to disable unicodedata + +Signed-off-by: Thomas Petazzoni + +--- + configure.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2662,6 +2662,12 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" + fi]) + ++AC_ARG_ENABLE(unicodedata, ++ AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata" ++ fi]) ++ + AC_SUBST(TK) + AC_ARG_ENABLE(tk, + AS_HELP_STRING([--disable-tk], [disable tk]), diff --git a/package/python/110-optional-db.patch b/package/python/110-optional-db.patch new file mode 100644 index 0000000000..b8c454c90b --- /dev/null +++ b/package/python/110-optional-db.patch @@ -0,0 +1,80 @@ +Add an option to disable bsddb + +bsddb has an external dependency on Berkeley DB. Since we want to be +able to build Python without it, this patch adds an option to disable +the build/installation of this Python module. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin + +--- + Makefile.pre.in | 10 ++++++++-- + configure.in | 22 ++++++++++++++++++++++ + 2 files changed, 30 insertions(+), 2 deletions(-) + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -965,7 +965,7 @@ + email email/mime \ + ensurepip ensurepip/_bundled \ + json \ +- logging bsddb csv importlib wsgiref \ ++ logging csv importlib wsgiref \ + ctypes ctypes/macholib \ + idlelib idlelib/Icons \ + distutils distutils/command \ +@@ -981,7 +981,6 @@ + test/tracedmodules \ + email/test email/test/data \ + json/tests \ +- bsddb/test \ + ctypes/test \ + idlelib/idle_test \ + distutils/tests \ +@@ -1022,6 +1021,11 @@ + LIBSUBDIRS += $(XMLLIBSUBDIRS) + endif + ++ifeq (@BSDDB@,yes) ++LIBSUBDIRS += bsddb ++TESTSUBDIRS += bsddb/test ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2662,6 +2662,28 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" + fi]) + ++AC_ARG_ENABLE(dbm, ++ AS_HELP_STRING([--disable-dbm], [disable DBM]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} dbm" ++ fi]) ++ ++AC_ARG_ENABLE(gdbm, ++ AS_HELP_STRING([--disable-gdbm], [disable GDBM]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} gdbm" ++ fi]) ++ ++AC_SUBST(BSDDB) ++AC_ARG_ENABLE(bsddb, ++ AS_HELP_STRING([--disable-bsddb], [disable BerkeyleyDB]), ++ [ if test "$enableval" = "no"; then ++ BSDDB=no ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _bsddb" ++ else ++ BSDDB=yes ++ fi], [ BSDDB=yes ]) ++ + AC_ARG_ENABLE(unicodedata, + AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]), + [ if test "$enableval" = "no"; then diff --git a/package/python/111-optional-ssl.patch b/package/python/111-optional-ssl.patch new file mode 100644 index 0000000000..956d2a0726 --- /dev/null +++ b/package/python/111-optional-ssl.patch @@ -0,0 +1,25 @@ +Add an option to disable the ssl module + +Signed-off-by: Thomas Petazzoni + +--- + configure.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2662,6 +2662,12 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" + fi]) + ++AC_ARG_ENABLE(ssl, ++ AS_HELP_STRING([--disable-ssl], [disable SSL]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl" ++ fi]) ++ + AC_ARG_ENABLE(dbm, + AS_HELP_STRING([--disable-dbm], [disable DBM]), + [ if test "$enableval" = "no"; then diff --git a/package/python/112-optional-bzip2.patch b/package/python/112-optional-bzip2.patch new file mode 100644 index 0000000000..99fe83ca69 --- /dev/null +++ b/package/python/112-optional-bzip2.patch @@ -0,0 +1,24 @@ +Add an option to disable the bz2 module + +Signed-off-by: Thomas Petazzoni +--- + configure.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2668,6 +2668,12 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ssl" + fi]) + ++AC_ARG_ENABLE(bz2, ++ AS_HELP_STRING([--disable-bz2], [disable BZIP2]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} bz2" ++ fi]) ++ + AC_ARG_ENABLE(dbm, + AS_HELP_STRING([--disable-dbm], [disable DBM]), + [ if test "$enableval" = "no"; then diff --git a/package/python/113-optional-zlib.patch b/package/python/113-optional-zlib.patch new file mode 100644 index 0000000000..652a586eae --- /dev/null +++ b/package/python/113-optional-zlib.patch @@ -0,0 +1,24 @@ +Add an option to disable the zlib module + +Signed-off-by: Thomas Petazzoni +--- + configure.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2674,6 +2674,12 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} bz2" + fi]) + ++AC_ARG_ENABLE(zlib, ++ AS_HELP_STRING([--disable-zlib], [disable ZLIB]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} zlib" ++ fi]) ++ + AC_ARG_ENABLE(dbm, + AS_HELP_STRING([--disable-dbm], [disable DBM]), + [ if test "$enableval" = "no"; then diff --git a/package/python/114-remove-idle-editor.patch b/package/python/114-remove-idle-editor.patch new file mode 100644 index 0000000000..512eedcb5f --- /dev/null +++ b/package/python/114-remove-idle-editor.patch @@ -0,0 +1,43 @@ +Do not install the idle editor + +IDLE is the Python IDE built with the tkinter GUI toolkit. Since it's +highly unlikely to ever be useful in an embedded Linux system +generated by Buildroot, this patch simply disables the installation of +idle and the related Python modules. It saves 800 KB-900 KB of +installed .pyc files. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.pre.in +=================================================================== +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -967,7 +967,6 @@ + json \ + logging csv importlib wsgiref \ + ctypes ctypes/macholib \ +- idlelib idlelib/Icons \ + distutils distutils/command \ + multiprocessing multiprocessing/dummy \ + unittest \ +@@ -982,7 +981,6 @@ + email/test email/test/data \ + json/tests \ + ctypes/test \ +- idlelib/idle_test \ + distutils/tests \ + unittest/test + +Index: b/setup.py +=================================================================== +--- a/setup.py ++++ b/setup.py +@@ -2212,7 +2212,7 @@ + import warnings + warnings.filterwarnings("ignore",category=DeprecationWarning) + +- scripts = ['Tools/scripts/idle', 'Lib/smtpd.py'] ++ scripts = ['Lib/smtpd.py'] + if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"): + scripts += [ 'Tools/scripts/pydoc' ] + if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"): diff --git a/package/python/115-optional-ossaudiodev.patch b/package/python/115-optional-ossaudiodev.patch new file mode 100644 index 0000000000..89335ba2d0 --- /dev/null +++ b/package/python/115-optional-ossaudiodev.patch @@ -0,0 +1,27 @@ +From 30351d9b41a03c43d627d52d46e49ab91bfe342d Mon Sep 17 00:00:00 2001 +From: Zoltan Gyarmati +Date: Thu, 8 Jan 2015 11:41:40 +0100 +Subject: [PATCH 1/1] Add an option to disable the ossaudiodev module + +Signed-off-by: Zoltan Gyarmati +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -2726,6 +2726,12 @@ + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel" + fi + ++AC_ARG_ENABLE(ossaudiodev, ++ AS_HELP_STRING([--disable-ossaudiodev], [disable OSSAUDIODEV]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ossaudiodev" ++ fi]) ++ + AC_SUBST(PYDOC) + + AC_ARG_ENABLE(pydoc, diff --git a/package/python/Config.in b/package/python/Config.in new file mode 100644 index 0000000000..fa83e7774a --- /dev/null +++ b/package/python/Config.in @@ -0,0 +1,132 @@ +comment "python needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_PYTHON + bool "python" + depends on BR2_USE_WCHAR + # uses fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS # libffi + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_LIBFFI + help + The python language interpreter. + + http://www.python.org/ + +if BR2_PACKAGE_PYTHON + +choice + prompt "python module format to install" + default BR2_PACKAGE_PYTHON_PYC_ONLY + help + Select Python module format to install on target (py, pyc or both) + +config BR2_PACKAGE_PYTHON_PY_ONLY + bool ".py sources only" + +config BR2_PACKAGE_PYTHON_PYC_ONLY + bool ".pyc compiled sources only" + +config BR2_PACKAGE_PYTHON_PY_PYC + bool ".py sources and .pyc compiled" + +endchoice + +menu "core python modules" + +comment "The following modules are unusual or require extra libraries" + +config BR2_PACKAGE_PYTHON_BZIP2 + select BR2_PACKAGE_BZIP2 + bool "bzip2 module" + help + bzip2 module for Python + +config BR2_PACKAGE_PYTHON_BSDDB + select BR2_PACKAGE_BERKELEYDB + bool "bsddb module" + help + bsddb module for Python. + +config BR2_PACKAGE_PYTHON_CODECSCJK + bool "codecscjk module" + help + Chinese/Japanese/Korean codecs module for Python (large). + +config BR2_PACKAGE_PYTHON_CURSES + select BR2_PACKAGE_NCURSES + bool "curses module" + help + curses module for Python. + +config BR2_PACKAGE_PYTHON_OSSAUDIODEV + bool "ossaudiodev module" + help + ossaudiodev module for Python. + +config BR2_PACKAGE_PYTHON_READLINE + select BR2_PACKAGE_READLINE + bool "readline" + help + readline module for Python (required for command-line + editing in the Python shell). + +config BR2_PACKAGE_PYTHON_SSL + select BR2_PACKAGE_OPENSSL + bool "ssl" + help + _ssl module for Python (required for https in urllib etc). + +config BR2_PACKAGE_PYTHON_UNICODEDATA + bool "unicodedata module" + default y + help + Unicode character database (used by stringprep module) (large). + +if BR2_PACKAGE_PYTHON_UNICODEDATA + +choice + prompt "Python unicode database format" + default BR2_PACKAGE_PYTHON_UCS2 + help + Select Python unicode database format for target + +config BR2_PACKAGE_PYTHON_UCS2 + bool "Universal Character Set 2-byte (UCS2)" + +config BR2_PACKAGE_PYTHON_UCS4 + bool "Universal Character Set 4-byte (UCS4)" + +endchoice + +endif + +config BR2_PACKAGE_PYTHON_SQLITE + bool "sqlite module" + select BR2_PACKAGE_SQLITE + help + SQLite database support + +config BR2_PACKAGE_PYTHON_PYEXPAT + select BR2_PACKAGE_EXPAT + bool "xml module" + help + pyexpat and xml libraries for Python + +config BR2_PACKAGE_PYTHON_ZLIB + bool "zlib module" + select BR2_PACKAGE_ZLIB + help + zlib support in Python + +config BR2_PACKAGE_PYTHON_HASHLIB + bool "hashlib module" + select BR2_PACKAGE_OPENSSL + help + hashlib support in Python + +endmenu + +endif diff --git a/package/python/python.hash b/package/python/python.hash new file mode 100644 index 0000000000..d1cf1ba021 --- /dev/null +++ b/package/python/python.hash @@ -0,0 +1,4 @@ +# From https://www.python.org/downloads/release/python-2711/ +md5 1dbcc848b4cd8399a8199d000f9f823c Python-2.7.11.tar.xz +# Locally calculated +sha256 962b4c45af50124ea61f11a30deb4342fc0bc21126790fa1d7f6c79809413f46 Python-2.7.11.tar.xz diff --git a/package/python/python.mk b/package/python/python.mk new file mode 100644 index 0000000000..4ecd0d1d89 --- /dev/null +++ b/package/python/python.mk @@ -0,0 +1,232 @@ +################################################################################ +# +# python +# +################################################################################ + +PYTHON_VERSION_MAJOR = 2.7 +PYTHON_VERSION = $(PYTHON_VERSION_MAJOR).11 +PYTHON_SOURCE = Python-$(PYTHON_VERSION).tar.xz +PYTHON_SITE = http://python.org/ftp/python/$(PYTHON_VERSION) +PYTHON_LICENSE = Python software foundation license v2, others +PYTHON_LICENSE_FILES = LICENSE +PYTHON_LIBTOOL_PATCH = NO + +# Python needs itself to be built, so in order to cross-compile +# Python, we need to build a host Python first. This host Python is +# also installed in $(HOST_DIR), as it is needed when cross-compiling +# third-party Python modules. + +HOST_PYTHON_CONF_OPTS += \ + --enable-static \ + --without-cxx-main \ + --disable-sqlite3 \ + --disable-tk \ + --with-expat=system \ + --disable-curses \ + --disable-codecs-cjk \ + --disable-nis \ + --enable-unicodedata \ + --disable-dbm \ + --disable-gdbm \ + --disable-bsddb \ + --disable-test-modules \ + --disable-bz2 \ + --disable-ssl \ + --disable-ossaudiodev \ + --disable-pyo-build + +# Make sure that LD_LIBRARY_PATH overrides -rpath. +# This is needed because libpython may be installed at the same time that +# python is called. +HOST_PYTHON_CONF_ENV += \ + LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" + +# Building host python in parallel sometimes triggers a "Bus error" +# during the execution of "./python setup.py build" in the +# installation step. It is probably due to the installation of a +# shared library taking place in parallel to the execution of +# ./python, causing spurious Bus error. Building host-python with +# MAKE1 has shown to workaround the problem. +HOST_PYTHON_MAKE = $(MAKE1) + +PYTHON_DEPENDENCIES = host-python libffi + +HOST_PYTHON_DEPENDENCIES = host-expat host-zlib + +PYTHON_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_PYTHON_READLINE),y) +PYTHON_DEPENDENCIES += readline +endif + +ifeq ($(BR2_PACKAGE_PYTHON_CURSES),y) +PYTHON_DEPENDENCIES += ncurses +else +PYTHON_CONF_OPTS += --disable-curses +endif + +ifeq ($(BR2_PACKAGE_PYTHON_PYEXPAT),y) +PYTHON_DEPENDENCIES += expat +PYTHON_CONF_OPTS += --with-expat=system +else +PYTHON_CONF_OPTS += --with-expat=none +endif + +ifeq ($(BR2_PACKAGE_PYTHON_BSDDB),y) +PYTHON_DEPENDENCIES += berkeleydb +else +PYTHON_CONF_OPTS += --disable-bsddb +endif + +ifeq ($(BR2_PACKAGE_PYTHON_SQLITE),y) +PYTHON_DEPENDENCIES += sqlite +else +PYTHON_CONF_OPTS += --disable-sqlite3 +endif + +ifeq ($(BR2_PACKAGE_PYTHON_SSL),y) +PYTHON_DEPENDENCIES += openssl +else +PYTHON_CONF_OPTS += --disable-ssl +endif + +ifneq ($(BR2_PACKAGE_PYTHON_CODECSCJK),y) +PYTHON_CONF_OPTS += --disable-codecs-cjk +endif + +ifneq ($(BR2_PACKAGE_PYTHON_UNICODEDATA),y) +PYTHON_CONF_OPTS += --disable-unicodedata +endif + +# Default is UCS2 w/o a conf opt +ifeq ($(BR2_PACKAGE_PYTHON_UCS4),y) +PYTHON_CONF_OPTS += --enable-unicode=ucs4 +endif + +ifeq ($(BR2_PACKAGE_PYTHON_BZIP2),y) +PYTHON_DEPENDENCIES += bzip2 +else +PYTHON_CONF_OPTS += --disable-bz2 +endif + +ifeq ($(BR2_PACKAGE_PYTHON_ZLIB),y) +PYTHON_DEPENDENCIES += zlib +else +PYTHON_CONF_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_PYTHON_HASHLIB),y) +PYTHON_DEPENDENCIES += openssl +endif + +ifeq ($(BR2_PACKAGE_PYTHON_OSSAUDIODEV),y) +PYTHON_CONF_OPTS += --enable-ossaudiodev +else +PYTHON_CONF_OPTS += --disable-ossaudiodev +endif + +PYTHON_CONF_ENV += \ + ac_cv_have_long_long_format=yes \ + ac_cv_file__dev_ptmx=yes \ + ac_cv_file__dev_ptc=yes \ + ac_cv_working_tzset=yes + +PYTHON_CONF_OPTS += \ + --without-cxx-main \ + --without-doc-strings \ + --with-system-ffi \ + --disable-pydoc \ + --disable-test-modules \ + --disable-lib2to3 \ + --disable-gdbm \ + --disable-tk \ + --disable-nis \ + --disable-dbm \ + --disable-pyo-build + +# This is needed to make sure the Python build process doesn't try to +# regenerate those files with the pgen program. Otherwise, it builds +# pgen for the target, and tries to run it on the host. + +define PYTHON_TOUCH_GRAMMAR_FILES + touch $(@D)/Include/graminit.h $(@D)/Python/graminit.c +endef + +PYTHON_POST_PATCH_HOOKS += PYTHON_TOUCH_GRAMMAR_FILES + +# +# Remove useless files. In the config/ directory, only the Makefile +# and the pyconfig.h files are needed at runtime. +# +# idle & smtpd.py have bad shebangs and are mostly samples +# +define PYTHON_REMOVE_USELESS_FILES + rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR)-config + rm -f $(TARGET_DIR)/usr/bin/python2-config + rm -f $(TARGET_DIR)/usr/bin/python-config + rm -f $(TARGET_DIR)/usr/bin/smtpd.py + for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/config/ \ + -type f -not -name pyconfig.h -a -not -name Makefile` ; do \ + rm -f $$i ; \ + done +endef + +PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_REMOVE_USELESS_FILES + +# +# Make sure libpython gets stripped out on target +# +define PYTHON_ENSURE_LIBPYTHON_STRIPPED + chmod u+w $(TARGET_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR)*.so +endef + +PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_ENSURE_LIBPYTHON_STRIPPED + +# Always install the python symlink in the target tree +define PYTHON_INSTALL_TARGET_PYTHON_SYMLINK + ln -sf python2 $(TARGET_DIR)/usr/bin/python +endef + +PYTHON_POST_INSTALL_TARGET_HOOKS += PYTHON_INSTALL_TARGET_PYTHON_SYMLINK + +# Always install the python-config symlink in the staging tree +define PYTHON_INSTALL_STAGING_PYTHON_CONFIG_SYMLINK + ln -sf python2-config $(STAGING_DIR)/usr/bin/python-config +endef + +PYTHON_POST_INSTALL_STAGING_HOOKS += PYTHON_INSTALL_STAGING_PYTHON_CONFIG_SYMLINK + +PYTHON_AUTORECONF = YES + +# Some packages may have build scripts requiring python2. +# Only install the python symlink in the host tree if python3 is not enabled +# for the target, otherwise the default python program may be missing. +ifneq ($(BR2_PACKAGE_PYTHON3),y) +define HOST_PYTHON_INSTALL_PYTHON_SYMLINK + ln -sf python2 $(HOST_DIR)/usr/bin/python + ln -sf python2-config $(HOST_DIR)/usr/bin/python-config +endef + +HOST_PYTHON_POST_INSTALL_HOOKS += HOST_PYTHON_INSTALL_PYTHON_SYMLINK +endif + +# Provided to other packages +PYTHON_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/sysconfigdata/:$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/ + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y) +define PYTHON_FINALIZE_TARGET + find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) -name '*.py' -print0 | xargs -0 rm -f +endef +endif + +ifeq ($(BR2_PACKAGE_PYTHON_PY_ONLY),y) +define PYTHON_FINALIZE_TARGET + find $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR) -name '*.pyc' -print0 | xargs -0 rm -f +endef +endif + +TARGET_FINALIZE_HOOKS += PYTHON_FINALIZE_TARGET diff --git a/package/python3/0001-setup.py-do-not-add-invalid-header-locations.patch b/package/python3/0001-setup.py-do-not-add-invalid-header-locations.patch new file mode 100644 index 0000000000..3fafd903a1 --- /dev/null +++ b/package/python3/0001-setup.py-do-not-add-invalid-header-locations.patch @@ -0,0 +1,46 @@ +From 03a4c313f42ea1bbdfc4c64a285b3930766c2b23 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:28:34 +0100 +Subject: [PATCH] setup.py: do not add invalid header locations + +This piece of code incorrectly adds /usr/include to +self.compiler.include_dirs, and results in the following invalid +compilation line: + +/home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc + -fPIC -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g + -O3 -Wall -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE + -D_FILE_OFFSET_BITS=64 -pipe -Os + -I./Include -I/usr/include -I. -IInclude + -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include + -I/home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Include + -I/home/thomas/projets/buildroot/output/build/python3-3.4.0b1 + -c /home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Modules/_struct.c + -o build/temp.linux-arm-3.4/home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Modules/_struct.o +cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories] + +The -I/usr/include is wrong when cross compiling, so we disable adding +INCLUDEDIR and LIBDIR from the host when cross compiling. + +Signed-off-by: Thomas Petazzoni +--- + setup.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 2779658..d3bf8e5 100644 +--- a/setup.py ++++ b/setup.py +@@ -493,7 +493,8 @@ class PyBuildExt(build_ext): + add_dir_to_list(dir_list, directory) + + if os.path.normpath(sys.base_prefix) != '/usr' \ +- and not sysconfig.get_config_var('PYTHONFRAMEWORK'): ++ and not sysconfig.get_config_var('PYTHONFRAMEWORK') \ ++ and not cross_compiling: + # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework + # (PYTHONFRAMEWORK is set) to avoid # linking problems when + # building a framework with different architectures than +-- +2.6.4 + diff --git a/package/python3/0002-Change-the-install-location-of-_sysconfigdata.py.patch b/package/python3/0002-Change-the-install-location-of-_sysconfigdata.py.patch new file mode 100644 index 0000000000..57b55fb12c --- /dev/null +++ b/package/python3/0002-Change-the-install-location-of-_sysconfigdata.py.patch @@ -0,0 +1,86 @@ +From 2f706a2ba92c88f1c8288e34d1937b6ba0e0214c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:29:04 +0100 +Subject: [PATCH] Change the install location of _sysconfigdata.py + +The _sysconfigdata.py module contains definitions that are needed when +building Python modules. In cross-compilation mode, when building +Python extensions for the target, we need to use the _sysconfigdata.py +of the target Python while executing the host Python. + +However until now, the _sysconfigdata.py module was installed in +build/lib.- directory, together with a number of +architecture-specific shared objects, which cannot be used with the +host Python. + +To solve this problem, this patch moves _sysconfigdata.py to a +separate location, build/sysconfigdata.-/, and only +this directory gets added to the PYTHONPATH of the host Python +interpreter when building Python modules for the target. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.pre.in | 12 ++++++++++-- + configure.ac | 2 +- + 2 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 76aef28..58dab28 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -559,6 +559,9 @@ pybuilddir.txt: $(BUILDPYTHON) + rm -f ./pybuilddir.txt ; \ + exit 1 ; \ + fi ++ echo `cat pybuilddir.txt`/sysconfigdata > pysysconfigdatadir.txt ++ mkdir -p `cat pysysconfigdatadir.txt` ++ cp `cat pybuilddir.txt`/_sysconfigdata.py `cat pysysconfigdatadir.txt` + + # Build the shared modules + # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for +@@ -1197,7 +1200,7 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + else true; \ + fi; \ + done +- @for i in $(srcdir)/Lib/*.py `cat pybuilddir.txt`/_sysconfigdata.py; \ ++ @for i in $(srcdir)/Lib/*.py ; \ + do \ + if test -x $$i; then \ + $(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \ +@@ -1207,6 +1210,11 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + echo $(INSTALL_DATA) $$i $(LIBDEST); \ + fi; \ + done ++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \ ++ $(DESTDIR)$(LIBDEST) ++ mkdir -p $(DESTDIR)$(LIBDEST)/sysconfigdata ++ $(INSTALL_DATA) `cat pysysconfigdatadir.txt`/_sysconfigdata.py \ ++ $(DESTDIR)$(LIBDEST)/sysconfigdata + @for d in $(LIBSUBDIRS); \ + do \ + a=$(srcdir)/Lib/$$d; \ +@@ -1533,7 +1541,7 @@ clean: pycremoval + find build -name 'fficonfig.h' -exec rm -f {} ';' || true + find build -name '*.py' -exec rm -f {} ';' || true + find build -name '*.py[co]' -exec rm -f {} ';' || true +- -rm -f pybuilddir.txt ++ -rm -f pybuilddir.txt pysysconfigdatadir.txt + -rm -f Lib/lib2to3/*Grammar*.pickle + -rm -f Modules/_testembed Modules/_freeze_importlib + +diff --git a/configure.ac b/configure.ac +index a0d0afa..7b491b4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -70,7 +70,7 @@ if test "$cross_compiling" = yes; then + AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found]) + fi + AC_MSG_RESULT($interp) +- PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp ++ PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pysysconfigdatadir.txt && echo $(abs_builddir)/`cat pysysconfigdatadir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp + fi + elif test "$cross_compiling" = maybe; then + AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) +-- +2.6.4 + diff --git a/package/python3/0003-Make-the-build-of-pyc-and-pyo-files-conditional.patch b/package/python3/0003-Make-the-build-of-pyc-and-pyo-files-conditional.patch new file mode 100644 index 0000000000..03684afec5 --- /dev/null +++ b/package/python3/0003-Make-the-build-of-pyc-and-pyo-files-conditional.patch @@ -0,0 +1,78 @@ +From 7c5338161263c290f18b1ff90859084d314be98c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:29:35 +0100 +Subject: [PATCH] Make the build of pyc and pyo files conditional + +This commit adds two new configure options: --disable-pyc-build and +--disable-pyo-build to disable the compilation of pyc and pyo files +respectively. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.pre.in | 8 ++++++++ + configure.ac | 12 ++++++++++++ + 2 files changed, 20 insertions(+) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 58dab28..f1bdd99 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1245,24 +1245,32 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ + $(DESTDIR)$(LIBDEST)/distutils/tests ; \ + fi ++ifeq (@PYC_BUILD@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) ++endif ++ifeq (@PYO_BUILD@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST) -f \ + -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ + $(DESTDIR)$(LIBDEST) ++endif ++ifeq (@PYC_BUILD@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages ++endif ++ifeq (@PYO_BUILD@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \ + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages ++endif + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ +diff --git a/configure.ac b/configure.ac +index 7b491b4..f2c4705 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -922,6 +922,18 @@ fi + + AC_MSG_CHECKING(LDLIBRARY) + ++AC_SUBST(PYC_BUILD) ++ ++AC_ARG_ENABLE(pyc-build, ++ AS_HELP_STRING([--disable-pyc-build], [disable build of pyc files]), ++ [ PYC_BUILD="${enableval}" ], [ PYC_BUILD=yes ]) ++ ++AC_SUBST(PYO_BUILD) ++ ++AC_ARG_ENABLE(pyo-build, ++ AS_HELP_STRING([--disable-pyo-build], [disable build of pyo files]), ++ [ PYO_BUILD="${enableval}" ], [ PYO_BUILD=yes ]) ++ + # MacOSX framework builds need more magic. LDLIBRARY is the dynamic + # library that we build, but we do not want to link against it (we + # will find it with a -framework option). For this reason there is an +-- +2.6.4 + diff --git a/package/python3/0004-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch b/package/python3/0004-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch new file mode 100644 index 0000000000..da2a65bc2f --- /dev/null +++ b/package/python3/0004-Disable-buggy_getaddrinfo-configure-test-when-cross-.patch @@ -0,0 +1,27 @@ +From ef95d6a49f17522ed120def8093fa2fc0b86cbc8 Mon Sep 17 00:00:00 2001 +From: Vanya Sergeev +Date: Wed, 23 Dec 2015 11:30:33 +0100 +Subject: [PATCH] Disable buggy_getaddrinfo configure test when cross-compiling + with IPv6 support + +Signed-off-by: Vanya Sergeev +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index f2c4705..6342b81 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3415,7 +3415,7 @@ fi + + AC_MSG_RESULT($ac_cv_buggy_getaddrinfo) + +-if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes ++if test $have_getaddrinfo = no || test "$cross_compiling" != "yes" -a "$ac_cv_buggy_getaddrinfo" = yes + then + if test $ipv6 = yes + then +-- +2.6.4 + diff --git a/package/python3/0005-Add-infrastructure-to-disable-the-build-of-certain-e.patch b/package/python3/0005-Add-infrastructure-to-disable-the-build-of-certain-e.patch new file mode 100644 index 0000000000..4a32bb191b --- /dev/null +++ b/package/python3/0005-Add-infrastructure-to-disable-the-build-of-certain-e.patch @@ -0,0 +1,106 @@ +From 9eb1076b61e83647028a2f6b665b6f9afcb793b0 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:31:08 +0100 +Subject: [PATCH] Add infrastructure to disable the build of certain extensions + +Some of the extensions part of the Python core have dependencies on +external libraries (sqlite, tk, etc.) or are relatively big and not +necessarly always useful (CJK codecs for example). By extensions, we +mean part of Python modules that are written in C and therefore +compiled to binary code. + +Therefore, we introduce a small infrastructure that allows to disable +some of those extensions. This can be done inside the configure.ac by +adding values to the DISABLED_EXTENSIONS variable (which is a +word-separated list of extensions). + +The implementation works as follow : + + * configure.ac defines a DISABLED_EXTENSIONS variable, which is + substituted (so that when Makefile.pre is generated from + Makefile.pre.in, the value of the variable is substituted). For + now, this DISABLED_EXTENSIONS variable is empty, later patches will + use it. + + * Makefile.pre.in passes the DISABLED_EXTENSIONS value down to the + variables passed in the environment when calling the setup.py + script that actually builds and installs those extensions. + + * setup.py is modified so that the existing "disabled_module_list" is + filled with those pre-disabled extensions listed in + DISABLED_EXTENSIONS. + +Patch ported to python2.7 by Maxime Ripard , and +then extended by Thomas Petazzoni +. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.pre.in | 6 +++++- + configure.ac | 2 ++ + setup.py | 5 ++++- + 3 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index f1bdd99..e0f9e0f 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -177,6 +177,8 @@ FILEMODE= 644 + # configure script arguments + CONFIG_ARGS= @CONFIG_ARGS@ + ++# disabled extensions ++DISABLED_EXTENSIONS= @DISABLED_EXTENSIONS@ + + # Subdirectories with code + SRCDIRS= @SRCDIRS@ +@@ -574,6 +576,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt + esac; \ + $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \ + _TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \ ++ DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ + $(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build + + # Build static library +@@ -1384,7 +1387,8 @@ libainstall: all python-config + # Install the dynamically loadable modules + # This goes into $(exec_prefix) + sharedinstall: sharedmods +- $(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ ++ $(RUNSHARED) DISABLED_EXTENSIONS="$(DISABLED_EXTENSIONS)" \ ++ $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \ + --prefix=$(prefix) \ + --install-scripts=$(BINDIR) \ + --install-platlib=$(DESTSHARED) \ +diff --git a/configure.ac b/configure.ac +index 6342b81..a3026b8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2352,6 +2352,8 @@ LIBS="$withval $LIBS" + + PKG_PROG_PKG_CONFIG + ++AC_SUBST(DISABLED_EXTENSIONS) ++ + # Check for use of the system expat library + AC_MSG_CHECKING(for --with-system-expat) + AC_ARG_WITH(system_expat, +diff --git a/setup.py b/setup.py +index d3bf8e5..2a504d2 100644 +--- a/setup.py ++++ b/setup.py +@@ -39,7 +39,10 @@ host_platform = get_platform() + COMPILED_WITH_PYDEBUG = ('--with-pydebug' in sysconfig.get_config_var("CONFIG_ARGS")) + + # This global variable is used to hold the list of modules to be disabled. +-disabled_module_list = [] ++try: ++ disabled_module_list = sysconfig.get_config_var("DISABLED_EXTENSIONS").split(" ") ++except KeyError: ++ disabled_module_list = list() + + def add_dir_to_list(dirlist, dir): + """Add the directory 'dir' to the list 'dirlist' (after any relative +-- +2.6.4 + diff --git a/package/python3/0006-distutils-sysconfig-use-sysconfigdata.patch b/package/python3/0006-distutils-sysconfig-use-sysconfigdata.patch new file mode 100644 index 0000000000..dcf32d6fec --- /dev/null +++ b/package/python3/0006-distutils-sysconfig-use-sysconfigdata.patch @@ -0,0 +1,65 @@ +From bdb9cccdc2993e43af1e57ad3b8b0055bab64ba0 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:32:23 +0100 +Subject: [PATCH] distutils/sysconfig: use sysconfigdata + +In order to make the use of sysconfig cross-compilation compatible, +use _sysconfigdata. + +Signed-off-by: Thomas Petazzoni +--- + Lib/distutils/sysconfig.py | 37 ++++--------------------------------- + 1 file changed, 4 insertions(+), 33 deletions(-) + +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index a1452fe..1df20ad 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -423,40 +423,11 @@ def expand_makefile_vars(s, vars): + _config_vars = None + + def _init_posix(): +- """Initialize the module as appropriate for POSIX systems.""" +- g = {} +- # load the installed Makefile: +- try: +- filename = get_makefile_filename() +- parse_makefile(filename, g) +- except OSError as msg: +- my_msg = "invalid Python installation: unable to open %s" % filename +- if hasattr(msg, "strerror"): +- my_msg = my_msg + " (%s)" % msg.strerror +- +- raise DistutilsPlatformError(my_msg) +- +- # load the installed pyconfig.h: +- try: +- filename = get_config_h_filename() +- with open(filename) as file: +- parse_config_h(file, g) +- except OSError as msg: +- my_msg = "invalid Python installation: unable to open %s" % filename +- if hasattr(msg, "strerror"): +- my_msg = my_msg + " (%s)" % msg.strerror +- +- raise DistutilsPlatformError(my_msg) +- +- # On AIX, there are wrong paths to the linker scripts in the Makefile +- # -- these paths are relative to the Python source, but when installed +- # the scripts are in another directory. +- if python_build: +- g['LDSHARED'] = g['BLDSHARED'] +- ++ # _sysconfigdata is generated at build time, see the sysconfig module ++ from _sysconfigdata import build_time_vars + global _config_vars +- _config_vars = g +- ++ _config_vars = {} ++ _config_vars.update(build_time_vars) + + def _init_nt(): + """Initialize the module as appropriate for NT""" +-- +2.6.4 + diff --git a/package/python3/0007-Adjust-library-header-paths-for-cross-compilation.patch b/package/python3/0007-Adjust-library-header-paths-for-cross-compilation.patch new file mode 100644 index 0000000000..59d4ccd6d2 --- /dev/null +++ b/package/python3/0007-Adjust-library-header-paths-for-cross-compilation.patch @@ -0,0 +1,67 @@ +From 678143ce6161379a3eebc20db6634f0c247f8605 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:33:14 +0100 +Subject: [PATCH] Adjust library/header paths for cross-compilation + +When cross-compiling third-party extensions, the get_python_inc() or +get_python_lib() can be called, to return the path to headers or +libraries. However, they use the sys.prefix of the host Python, which +returns incorrect paths when cross-compiling (paths pointing to host +headers and libraries). + +In order to fix this, we introduce the _python_sysroot, _python_prefix +and _python_exec_prefix variables, that allow to override these +values, and get correct header/library paths when cross-compiling +third-party Python modules. + +Signed-off-by: Thomas Petazzoni +--- + Lib/distutils/command/build_ext.py | 5 ++++- + Lib/distutils/sysconfig.py | 15 +++++++++++---- + 2 files changed, 15 insertions(+), 5 deletions(-) + +diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py +index acbe648..494a8c9 100644 +--- a/Lib/distutils/command/build_ext.py ++++ b/Lib/distutils/command/build_ext.py +@@ -239,7 +239,10 @@ class build_ext(Command): + if (sysconfig.get_config_var('Py_ENABLE_SHARED')): + if not sysconfig.python_build: + # building third party extensions +- self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) ++ libdir = sysconfig.get_config_var('LIBDIR') ++ if "_python_sysroot" in os.environ: ++ libdir = os.environ.get("_python_sysroot") + libdir ++ self.library_dirs.append(libdir) + else: + # building python standard extensions + self.library_dirs.append('.') +diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py +index 1df20ad..905d280 100644 +--- a/Lib/distutils/sysconfig.py ++++ b/Lib/distutils/sysconfig.py +@@ -16,10 +16,17 @@ import sys + from .errors import DistutilsPlatformError + + # These are needed in a couple of spots, so just compute them once. +-PREFIX = os.path.normpath(sys.prefix) +-EXEC_PREFIX = os.path.normpath(sys.exec_prefix) +-BASE_PREFIX = os.path.normpath(sys.base_prefix) +-BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) ++if "_python_sysroot" in os.environ: ++ _sysroot=os.environ.get('_python_sysroot') ++ PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_prefix')) ++ EXEC_PREFIX = os.path.normpath(_sysroot + os.environ.get('_python_exec_prefix')) ++ BASE_PREFIX = PREFIX ++ BASE_EXEC_PREFIX = EXEC_PREFIX ++else: ++ PREFIX = os.path.normpath(sys.prefix) ++ EXEC_PREFIX = os.path.normpath(sys.exec_prefix) ++ BASE_PREFIX = os.path.normpath(sys.base_prefix) ++ BASE_EXEC_PREFIX = os.path.normpath(sys.base_exec_prefix) + + # Path to the base directory of the project. On Windows the binary may + # live in project/PCBuild9. If we're dealing with an x64 Windows build, +-- +2.6.4 + diff --git a/package/python3/0008-Don-t-look-in-usr-lib-termcap-for-libraries.patch b/package/python3/0008-Don-t-look-in-usr-lib-termcap-for-libraries.patch new file mode 100644 index 0000000000..19a76cfc85 --- /dev/null +++ b/package/python3/0008-Don-t-look-in-usr-lib-termcap-for-libraries.patch @@ -0,0 +1,31 @@ +From 3ef1e30b88c4166f22220812b68e14f39f7ed15b Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:36:00 +0100 +Subject: [PATCH] Don't look in /usr/lib/termcap for libraries + +Signed-off-by: Thomas Petazzoni +--- + setup.py | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/setup.py b/setup.py +index 2a504d2..acc4ad0 100644 +--- a/setup.py ++++ b/setup.py +@@ -733,12 +733,9 @@ class PyBuildExt(build_ext): + pass # Issue 7384: Already linked against curses or tinfo. + elif curses_library: + readline_libs.append(curses_library) +- elif self.compiler.find_library_file(lib_dirs + +- ['/usr/lib/termcap'], +- 'termcap'): ++ elif self.compiler.find_library_file(lib_dirs, 'termcap'): + readline_libs.append('termcap') + exts.append( Extension('readline', ['readline.c'], +- library_dirs=['/usr/lib/termcap'], + extra_link_args=readline_extra_link_args, + libraries=readline_libs) ) + else: +-- +2.6.4 + diff --git a/package/python3/0009-Don-t-add-multiarch-paths.patch b/package/python3/0009-Don-t-add-multiarch-paths.patch new file mode 100644 index 0000000000..693ab6a508 --- /dev/null +++ b/package/python3/0009-Don-t-add-multiarch-paths.patch @@ -0,0 +1,37 @@ +From b910b3a6e61afcaa6f77b533a5cb4290c528f439 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:36:27 +0100 +Subject: [PATCH] Don't add multiarch paths + +The add_multiarch_paths() function leads, in certain build +environments, to the addition of host header paths to the CFLAGS, +which is not appropriate for cross-compilation. This patch fixes that +by simply removing the call to add_multiarch_paths() when we're +cross-compiling. + +Investigation done by David . + +Signed-off-by: Thomas Petazzoni +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index acc4ad0..eab709e 100644 +--- a/setup.py ++++ b/setup.py +@@ -456,10 +456,10 @@ class PyBuildExt(build_ext): + if not cross_compiling: + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') ++ self.add_multiarch_paths() + # only change this for cross builds for 3.3, issues on Mageia + if cross_compiling: + self.add_gcc_paths() +- self.add_multiarch_paths() + + # Add paths specified in the environment variables LDFLAGS and + # CPPFLAGS for header and library files. +-- +2.6.4 + diff --git a/package/python3/0010-Abort-on-failed-module-build.patch b/package/python3/0010-Abort-on-failed-module-build.patch new file mode 100644 index 0000000000..d2e98224cc --- /dev/null +++ b/package/python3/0010-Abort-on-failed-module-build.patch @@ -0,0 +1,30 @@ +From 420e08fc9e77b650d11ce420f85257ce1710b70d Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:43:24 +0100 +Subject: [PATCH] Abort on failed module build + +When building a Python module fails, the setup.py script currently +doesn't exit with an error, and simply continues. This is not a really +nice behavior, so this patch changes setup.py to abort with an error, +so that the build issue is clearly noticeable. + +Signed-off-by: Thomas Petazzoni +--- + setup.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/setup.py b/setup.py +index eab709e..86758ce 100644 +--- a/setup.py ++++ b/setup.py +@@ -284,6 +284,7 @@ class PyBuildExt(build_ext): + print("Failed to build these modules:") + print_three_column(failed) + print() ++ sys.exit(1) + + def build_extension(self, ext): + +-- +2.6.4 + diff --git a/package/python3/0011-Serial-ioctl-workaround.patch b/package/python3/0011-Serial-ioctl-workaround.patch new file mode 100644 index 0000000000..f1db62b6f2 --- /dev/null +++ b/package/python3/0011-Serial-ioctl-workaround.patch @@ -0,0 +1,33 @@ +From f67b0073a30eb83d42a2ead0a62020dfe5db8d1e Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Wed, 23 Dec 2015 11:44:02 +0100 +Subject: [PATCH] Serial ioctl() workaround + +The ioctls.h of some architectures (notably xtensa) references structs from +linux/serial.h. Make sure to include this header as well. + +Also, undef TIOCTTYGSTRUCT that require reference to internal kernel tty_struct, +but isn't actually referenced in modern kernels. + +Signed-off-by: Baruch Siach +--- + Modules/termios.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Modules/termios.c b/Modules/termios.c +index b78d33e..58b0444 100644 +--- a/Modules/termios.c ++++ b/Modules/termios.c +@@ -9,7 +9,9 @@ + #endif + + #include ++#include + #include ++#undef TIOCTTYGSTRUCT + + /* HP-UX requires that this be included to pick up MDCD, MCTS, MDSR, + * MDTR, MRI, and MRTS (appearantly used internally by some things +-- +2.6.4 + diff --git a/package/python3/0012-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch b/package/python3/0012-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch new file mode 100644 index 0000000000..e4fbf4e4d6 --- /dev/null +++ b/package/python3/0012-Do-not-adjust-the-shebang-of-Python-scripts-for-cros.patch @@ -0,0 +1,35 @@ +From 2cac07af643d989b352cccc3b96d86ed269df9b1 Mon Sep 17 00:00:00 2001 +From: Christophe Vu-Brugier +Date: Wed, 23 Dec 2015 11:44:30 +0100 +Subject: [PATCH] Do not adjust the shebang of Python scripts for + cross-compilation + +The copy_scripts() method in distutils copies the scripts listed in +the setup file and adjusts the first line to refer to the current +Python interpreter. When cross-compiling, this means that the adjusted +shebang refers to the host Python interpreter. + +This patch modifies copy_scripts() to preserve the shebang when +cross-compilation is detected. + +Signed-off-by: Christophe Vu-Brugier +--- + Lib/distutils/command/build_scripts.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Lib/distutils/command/build_scripts.py b/Lib/distutils/command/build_scripts.py +index 90a8380..bdf4cf1 100644 +--- a/Lib/distutils/command/build_scripts.py ++++ b/Lib/distutils/command/build_scripts.py +@@ -91,7 +91,7 @@ class build_scripts(Command): + adjust = True + post_interp = match.group(1) or b'' + +- if adjust: ++ if adjust and not '_python_sysroot' in os.environ: + log.info("copying and adjusting %s -> %s", script, + self.build_dir) + updated_files.append(outfile) +-- +2.6.4 + diff --git a/package/python3/0013-Misc-python-config.sh.in-ensure-sed-invocations-only.patch b/package/python3/0013-Misc-python-config.sh.in-ensure-sed-invocations-only.patch new file mode 100644 index 0000000000..f9c7225726 --- /dev/null +++ b/package/python3/0013-Misc-python-config.sh.in-ensure-sed-invocations-only.patch @@ -0,0 +1,60 @@ +From 4c0893221e2978854174806f7e14f7643eea32e7 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Thu, 20 Nov 2014 13:24:59 +0100 +Subject: [PATCH] Misc/python-config.sh.in: ensure sed invocations only match + beginning of strings + +The build/real prefix handling using sed breaks if build != real and the +standard include / lib directories are used ($prefix/include and $prefix/lib). + +E.G. + +prefix_build="/usr", libdir="$prefix/lib", includedir="$prefix/include". + +If this gets installed with make DESTDIR="/foo" install, then we end up with +prefix_real = prefix = "/foo/usr" as expected, but +includedir="/foo/foo/usr/include" and libdir="/foo/foo/usr/lib" because of +the double sed invocation (prefix is already expanded). Work around it by +ensuring we only match the beginning of the string. + +Submitted upstream: http://bugs.python.org/issue22907 + +Signed-off-by: Peter Korsgaard +--- + Misc/python-config.sh.in | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in +index 64c81e5..f75eec5 100644 +--- a/Misc/python-config.sh.in ++++ b/Misc/python-config.sh.in +@@ -29,12 +29,12 @@ prefix_real=$(installed_prefix "$0") + + # Use sed to fix paths from their built-to locations to their installed-to + # locations. +-prefix=$(echo "$prefix_build" | sed "s#$prefix_build#$prefix_real#") ++prefix=$(echo "$prefix_build" | sed "s#^$prefix_build#$prefix_real#") + exec_prefix_build="@exec_prefix@" +-exec_prefix=$(echo "$exec_prefix_build" | sed "s#$exec_prefix_build#$prefix_real#") +-includedir=$(echo "@includedir@" | sed "s#$prefix_build#$prefix_real#") +-libdir=$(echo "@libdir@" | sed "s#$prefix_build#$prefix_real#") +-CFLAGS=$(echo "@CFLAGS@" | sed "s#$prefix_build#$prefix_real#") ++exec_prefix=$(echo "$exec_prefix_build" | sed "s#^$exec_prefix_build#$prefix_real#") ++includedir=$(echo "@includedir@" | sed "s#^$prefix_build#$prefix_real#") ++libdir=$(echo "@libdir@" | sed "s#^$prefix_build#$prefix_real#") ++CFLAGS=$(echo "@CFLAGS@" | sed "s#^$prefix_build#$prefix_real#") + VERSION="@VERSION@" + LIBM="@LIBM@" + LIBC="@LIBC@" +@@ -48,7 +48,7 @@ OPT="@OPT@" + PY_ENABLE_SHARED="@PY_ENABLE_SHARED@" + LDVERSION="@LDVERSION@" + LIBDEST=${prefix}/lib/python${VERSION} +-LIBPL=$(echo "@LIBPL@" | sed "s#$prefix_build#$prefix_real#") ++LIBPL=$(echo "@LIBPL@" | sed "s#^$prefix_build#$prefix_real#") + SO="@SO@" + PYTHONFRAMEWORK="@PYTHONFRAMEWORK@" + INCDIR="-I$includedir/python${VERSION}${ABIFLAGS}" +-- +2.6.4 + diff --git a/package/python3/0014-Do-not-harcode-invalid-path-to-ncursesw-headers.patch b/package/python3/0014-Do-not-harcode-invalid-path-to-ncursesw-headers.patch new file mode 100644 index 0000000000..4a64427579 --- /dev/null +++ b/package/python3/0014-Do-not-harcode-invalid-path-to-ncursesw-headers.patch @@ -0,0 +1,30 @@ +From a87f08318cf40a27d41957dcc7312c3b3083ba86 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:45:13 +0100 +Subject: [PATCH] Do not harcode invalid path to ncursesw headers + +Adding /usr/include/ncursesw is obviously invalid when +cross-compiling. Since the ncursesw headers are no longer installed in +usr/include/ncursesw/, but directly in usr/include, there is anyway no +need for a special header path. + +Signed-off-by: Thomas Petazzoni +--- + setup.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 86758ce..565c304 100644 +--- a/setup.py ++++ b/setup.py +@@ -1276,7 +1276,6 @@ class PyBuildExt(build_ext): + panel_library = 'panel' + if curses_library == 'ncursesw': + curses_defines.append(('HAVE_NCURSESW', '1')) +- curses_includes.append('/usr/include/ncursesw') + # Bug 1464056: If _curses.so links with ncursesw, + # _curses_panel.so must link with panelw. + panel_library = 'panelw' +-- +2.6.4 + diff --git a/package/python3/0015-Override-system-locale-and-set-to-default-when-addin.patch b/package/python3/0015-Override-system-locale-and-set-to-default-when-addin.patch new file mode 100644 index 0000000000..e358e44462 --- /dev/null +++ b/package/python3/0015-Override-system-locale-and-set-to-default-when-addin.patch @@ -0,0 +1,37 @@ +From 807357dc50a5a97016ce22646b5eb6a5b64a1a5d Mon Sep 17 00:00:00 2001 +From: Samuel Cabrero +Date: Wed, 23 Dec 2015 11:45:48 +0100 +Subject: [PATCH] Override system locale and set to default when adding gcc + paths + +Forces the use of the default locale in the function +add_gcc_paths, which is called when cross compiling to add the +include and library paths. This is necessary because otherwise +the gcc output is localized and the output parsing fails, which +results in no paths added and detect_modules not able to find +any system library (eg. libz, libssl, etc.) + +[Thomas: patch taken from https://bugs.python.org/issue23767.] + +Signed-off-by: Samuel Cabrero +Signed-off-by: Thomas Petazzoni +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index 565c304..8966779 100644 +--- a/setup.py ++++ b/setup.py +@@ -423,7 +423,7 @@ class PyBuildExt(build_ext): + tmpfile = os.path.join(self.build_temp, 'gccpaths') + if not os.path.exists(self.build_temp): + os.makedirs(self.build_temp) +- ret = os.system('%s -E -v - %s 1>/dev/null' % (gcc, tmpfile)) ++ ret = os.system('LC_ALL=C %s -E -v - %s 1>/dev/null' % (gcc, tmpfile)) + is_gcc = False + in_incdirs = False + inc_dirs = [] +-- +2.6.4 + diff --git a/package/python3/0016-Add-importlib-fix-for-PEP-3147-issue.patch b/package/python3/0016-Add-importlib-fix-for-PEP-3147-issue.patch new file mode 100644 index 0000000000..02f1d164f7 --- /dev/null +++ b/package/python3/0016-Add-importlib-fix-for-PEP-3147-issue.patch @@ -0,0 +1,79 @@ +From 1153f503a38daf6388021575f1ad6ce8b702911b Mon Sep 17 00:00:00 2001 +From: Christophe Vu-Brugier +Date: Wed, 23 Dec 2015 11:46:14 +0100 +Subject: [PATCH] Add importlib fix for PEP 3147 issue + +Python 3 has a new standard for installing .pyc file, called PEP +3147. Unfortunately, this standard requires both the .py and .pyc +files to be installed for a Python module to be found. This is quite +annoying on space-constrained embedded systems, since the .py file is +technically not required for execution. + +This patch changes cache_from_source() and source_from_cache() in +importlib to get rid of the "__pycache__" directory. +This effectively disables PEP 3147 for: + +* The python standard library +* Packages built with distutils or setuptools +* Packages built with automake that use the `py-compile` helper + +Signed-off-by: Christophe Vu-Brugier +--- + Lib/importlib/_bootstrap.py | 26 +++++--------------------- + 1 file changed, 5 insertions(+), 21 deletions(-) + +diff --git a/Lib/importlib/_bootstrap.py b/Lib/importlib/_bootstrap.py +index 5b91c05..a1755ec 100644 +--- a/Lib/importlib/_bootstrap.py ++++ b/Lib/importlib/_bootstrap.py +@@ -444,8 +444,6 @@ def cache_from_source(path, debug_override=None): + If debug_override is not None, then it must be a boolean and is used in + place of sys.flags.optimize. + +- If sys.implementation.cache_tag is None then NotImplementedError is raised. +- + """ + debug = not sys.flags.optimize if debug_override is None else debug_override + if debug: +@@ -454,33 +452,19 @@ def cache_from_source(path, debug_override=None): + suffixes = OPTIMIZED_BYTECODE_SUFFIXES + head, tail = _path_split(path) + base, sep, rest = tail.rpartition('.') +- tag = sys.implementation.cache_tag +- if tag is None: +- raise NotImplementedError('sys.implementation.cache_tag is None') +- filename = ''.join([(base if base else rest), sep, tag, suffixes[0]]) +- return _path_join(head, _PYCACHE, filename) ++ filename = ''.join([(base if base else rest), suffixes[0]]) ++ return _path_join(head, filename) + + + def source_from_cache(path): + """Given the path to a .pyc./.pyo file, return the path to its .py file. + + The .pyc/.pyo file does not need to exist; this simply returns the path to +- the .py file calculated to correspond to the .pyc/.pyo file. If path does +- not conform to PEP 3147 format, ValueError will be raised. If +- sys.implementation.cache_tag is None then NotImplementedError is raised. ++ the .py file calculated to correspond to the .pyc/.pyo file. + + """ +- if sys.implementation.cache_tag is None: +- raise NotImplementedError('sys.implementation.cache_tag is None') +- head, pycache_filename = _path_split(path) +- head, pycache = _path_split(head) +- if pycache != _PYCACHE: +- raise ValueError('{} not bottom-level directory in ' +- '{!r}'.format(_PYCACHE, path)) +- if pycache_filename.count('.') != 2: +- raise ValueError('expected only 2 dots in ' +- '{!r}'.format(pycache_filename)) +- base_filename = pycache_filename.partition('.')[0] ++ head, filename = _path_split(path) ++ base_filename = filename.partition('.')[0] + return _path_join(head, base_filename + SOURCE_SUFFIXES[0]) + + +-- +2.6.4 + diff --git a/package/python3/0017-Add-an-option-to-disable-installation-of-test-module.patch b/package/python3/0017-Add-an-option-to-disable-installation-of-test-module.patch new file mode 100644 index 0000000000..6e0f07c87e --- /dev/null +++ b/package/python3/0017-Add-an-option-to-disable-installation-of-test-module.patch @@ -0,0 +1,113 @@ +From 3cdd905ad1ff001713d20b768c001b5299a2e72c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:47:00 +0100 +Subject: [PATCH] Add an option to disable installation of test modules + +The Python standard distribution comes with many test modules, that +are not necessarly useful on embedded targets. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin +--- + Makefile.pre.in | 56 ++++++++++++++++++++++++++++++++++++-------------------- + configure.ac | 6 ++++++ + 2 files changed, 42 insertions(+), 20 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index e0f9e0f..12fae84 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1133,8 +1133,30 @@ PLATDIR= plat-$(MACHDEP) + EXTRAPLATDIR= @EXTRAPLATDIR@ + MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR) + XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax +-LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ +- tkinter/test/test_ttk site-packages test \ ++LIBSUBDIRS= tkinter \ ++ site-packages \ ++ asyncio \ ++ collections concurrent concurrent/futures encodings \ ++ email email/mime \ ++ ensurepip ensurepip/_bundled \ ++ html json http dbm xmlrpc \ ++ sqlite3 \ ++ logging csv wsgiref urllib \ ++ lib2to3 lib2to3/fixes lib2to3/pgen2 \ ++ ctypes ctypes/macholib \ ++ idlelib idlelib/Icons \ ++ distutils distutils/command $(XMLLIBSUBDIRS) \ ++ importlib \ ++ turtledemo \ ++ multiprocessing multiprocessing/dummy \ ++ unittest \ ++ venv venv/scripts venv/scripts/posix \ ++ curses pydoc_data $(MACHDEPS) ++ ++TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \ ++ test test/test_asyncio \ ++ test/test_email test/test_email/data \ ++ test/test_json \ + test/audiodata \ + test/capath test/data \ + test/cjkencodings test/decimaltestdata test/xmltestdata \ +@@ -1161,28 +1183,22 @@ LIBSUBDIRS= tkinter tkinter/test tkinter/test/test_tkinter \ + test/test_importlib/namespace_pkgs/project3/parent/child \ + test/test_importlib/namespace_pkgs/module_and_namespace_package \ + test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \ +- asyncio \ +- test/test_asyncio \ +- collections concurrent concurrent/futures encodings \ +- email email/mime test/test_email test/test_email/data \ +- ensurepip ensurepip/_bundled \ +- html json test/test_json http dbm xmlrpc \ +- sqlite3 sqlite3/test \ +- logging csv wsgiref urllib \ +- lib2to3 lib2to3/fixes lib2to3/pgen2 lib2to3/tests \ ++ sqlite3/test \ ++ lib2to3/tests \ + lib2to3/tests/data lib2to3/tests/data/fixers \ + lib2to3/tests/data/fixers/myfixes \ +- ctypes ctypes/test ctypes/macholib \ +- idlelib idlelib/Icons idlelib/idle_test \ +- distutils distutils/command distutils/tests $(XMLLIBSUBDIRS) \ +- importlib test/test_importlib test/test_importlib/builtin \ ++ ctypes/test \ ++ idlelib/idle_test \ ++ distutils/tests \ ++ test/test_importlib test/test_importlib/builtin \ + test/test_importlib/extension test/test_importlib/frozen \ + test/test_importlib/import_ test/test_importlib/source \ +- turtledemo \ +- multiprocessing multiprocessing/dummy \ +- unittest unittest/test unittest/test/testmock \ +- venv venv/scripts venv/scripts/posix \ +- curses pydoc_data $(MACHDEPS) ++ unittest/test unittest/test/testmock ++ ++ifeq (@TEST_MODULES@,yes) ++LIBSUBDIRS += $(TESTSUBDIRS) ++endif ++ + libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c + @for i in $(SCRIPTDIR) $(LIBDEST); \ + do \ +diff --git a/configure.ac b/configure.ac +index a3026b8..b7a8836 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2659,6 +2659,12 @@ if test "$posix_threads" = "yes"; then + fi + + ++AC_SUBST(TEST_MODULES) ++ ++AC_ARG_ENABLE(test-modules, ++ AS_HELP_STRING([--disable-test-modules], [disable test modules]), ++ [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ]) ++ + # Check for enable-ipv6 + AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified]) + AC_MSG_CHECKING([if --enable-ipv6 is specified]) +-- +2.6.4 + diff --git a/package/python3/0018-Add-an-option-to-disable-pydoc.patch b/package/python3/0018-Add-an-option-to-disable-pydoc.patch new file mode 100644 index 0000000000..22f194a555 --- /dev/null +++ b/package/python3/0018-Add-an-option-to-disable-pydoc.patch @@ -0,0 +1,96 @@ +From 99ef88cb47a396e2c7005e59e50d34e0a60dd3cb Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:47:11 +0100 +Subject: [PATCH] Add an option to disable pydoc + +It removes 0.5 MB of data from the target plus the pydoc script +itself. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin +--- + Makefile.pre.in | 8 +++++++- + configure.ac | 5 +++++ + setup.py | 9 +++++++-- + 3 files changed, 19 insertions(+), 3 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 12fae84..5e2333e 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1100,7 +1100,9 @@ bininstall: altbininstall + -rm -f $(DESTDIR)$(BINDIR)/idle3 + (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3) + -rm -f $(DESTDIR)$(BINDIR)/pydoc3 ++ifeq (@PYDOC@,yes) + (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) ++endif + -rm -f $(DESTDIR)$(BINDIR)/2to3 + (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3) + -rm -f $(DESTDIR)$(BINDIR)/pyvenv +@@ -1151,7 +1153,7 @@ LIBSUBDIRS= tkinter \ + multiprocessing multiprocessing/dummy \ + unittest \ + venv venv/scripts venv/scripts/posix \ +- curses pydoc_data $(MACHDEPS) ++ curses $(MACHDEPS) + + TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \ + test test/test_asyncio \ +@@ -1195,6 +1197,10 @@ TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \ + test/test_importlib/import_ test/test_importlib/source \ + unittest/test unittest/test/testmock + ++ifeq (@PYDOC@,yes) ++LIBSUBDIRS += pydoc_data ++endif ++ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +diff --git a/configure.ac b/configure.ac +index b7a8836..2e75345 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2658,6 +2658,11 @@ if test "$posix_threads" = "yes"; then + AC_CHECK_FUNCS(pthread_atfork) + fi + ++AC_SUBST(PYDOC) ++ ++AC_ARG_ENABLE(pydoc, ++ AS_HELP_STRING([--disable-pydoc], [disable pydoc]), ++ [ PYDOC="${enableval}" ], [ PYDOC=yes ]) + + AC_SUBST(TEST_MODULES) + +diff --git a/setup.py b/setup.py +index 8966779..69198db 100644 +--- a/setup.py ++++ b/setup.py +@@ -2200,6 +2200,12 @@ def main(): + # turn off warnings when deprecated modules are imported + import warnings + warnings.filterwarnings("ignore",category=DeprecationWarning) ++ ++ scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3', ++ 'Lib/smtpd.py'] ++ if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"): ++ scripts += [ 'Tools/scripts/pydoc3' ] ++ + setup(# PyPI Metadata (PEP 301) + name = "Python", + version = sys.version.split()[0], +@@ -2224,8 +2230,7 @@ def main(): + # If you change the scripts installed here, you also need to + # check the PyBuildScripts command above, and change the links + # created by the bininstall target in Makefile.pre.in +- scripts = ["Tools/scripts/pydoc3", "Tools/scripts/idle3", +- "Tools/scripts/2to3", "Tools/scripts/pyvenv"] ++ scripts = scripts, + ) + + # --install-platlib +-- +2.6.4 + diff --git a/package/python3/0019-Add-an-option-to-disable-lib2to3.patch b/package/python3/0019-Add-an-option-to-disable-lib2to3.patch new file mode 100644 index 0000000000..8a22c0f26e --- /dev/null +++ b/package/python3/0019-Add-an-option-to-disable-lib2to3.patch @@ -0,0 +1,114 @@ +From 4d6bc8497ab740ae23a7091ff91dba06a63ba877 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:48:44 +0100 +Subject: [PATCH] Add an option to disable lib2to3 + +lib2to3 is a library to convert Python 2.x code to Python 3.x. As +such, it is probably not very useful on embedded system targets. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin +--- + Makefile.pre.in | 16 ++++++++++++---- + configure.ac | 6 ++++++ + setup.py | 5 +++-- + 3 files changed, 21 insertions(+), 6 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 5e2333e..6656f48 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1104,7 +1104,9 @@ ifeq (@PYDOC@,yes) + (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) + endif + -rm -f $(DESTDIR)$(BINDIR)/2to3 ++ifeq (@LIB2TO3@,yes) + (cd $(DESTDIR)$(BINDIR); $(LN) -s 2to3-$(VERSION) 2to3) ++endif + -rm -f $(DESTDIR)$(BINDIR)/pyvenv + (cd $(DESTDIR)$(BINDIR); $(LN) -s pyvenv-$(VERSION) pyvenv) + if test "x$(LIPO_32BIT_FLAGS)" != "x" ; then \ +@@ -1144,7 +1146,6 @@ LIBSUBDIRS= tkinter \ + html json http dbm xmlrpc \ + sqlite3 \ + logging csv wsgiref urllib \ +- lib2to3 lib2to3/fixes lib2to3/pgen2 \ + ctypes ctypes/macholib \ + idlelib idlelib/Icons \ + distutils distutils/command $(XMLLIBSUBDIRS) \ +@@ -1186,9 +1187,6 @@ TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \ + test/test_importlib/namespace_pkgs/module_and_namespace_package \ + test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \ + sqlite3/test \ +- lib2to3/tests \ +- lib2to3/tests/data lib2to3/tests/data/fixers \ +- lib2to3/tests/data/fixers/myfixes \ + ctypes/test \ + idlelib/idle_test \ + distutils/tests \ +@@ -1201,6 +1199,14 @@ ifeq (@PYDOC@,yes) + LIBSUBDIRS += pydoc_data + endif + ++ifeq (@LIB2TO3@,yes) ++LIBSUBDIRS += lib2to3 lib2to3/fixes lib2to3/pgen2 ++TESTSUBDIRS += lib2to3/tests \ ++ lib2to3/tests/data \ ++ lib2to3/tests/data/fixers \ ++ lib2to3/tests/data/fixers/myfixes ++endif ++ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +@@ -1296,10 +1302,12 @@ ifeq (@PYO_BUILD@,yes) + -d $(LIBDEST)/site-packages -f \ + -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages + endif ++ifeq (@LIB2TO3@,yes) + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt + -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ + $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt ++endif + + # Create the PLATDIR source directory, if one wasn't distributed.. + $(srcdir)/Lib/$(PLATDIR): +diff --git a/configure.ac b/configure.ac +index 2e75345..0ed6b17 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2670,6 +2670,12 @@ AC_ARG_ENABLE(test-modules, + AS_HELP_STRING([--disable-test-modules], [disable test modules]), + [ TEST_MODULES="${enableval}" ], [ TEST_MODULES=yes ]) + ++AC_SUBST(LIB2TO3) ++ ++AC_ARG_ENABLE(lib2to3, ++ AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]), ++ [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ]) ++ + # Check for enable-ipv6 + AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified]) + AC_MSG_CHECKING([if --enable-ipv6 is specified]) +diff --git a/setup.py b/setup.py +index 69198db..a2bf05a 100644 +--- a/setup.py ++++ b/setup.py +@@ -2201,10 +2201,11 @@ def main(): + import warnings + warnings.filterwarnings("ignore",category=DeprecationWarning) + +- scripts = ['Tools/scripts/idle3', 'Tools/scripts/2to3', +- 'Lib/smtpd.py'] ++ scripts = ['Tools/scripts/idle3', 'Lib/smtpd.py'] + if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"): + scripts += [ 'Tools/scripts/pydoc3' ] ++ if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"): ++ scripts += [ 'Tools/scripts/2to3' ] + + setup(# PyPI Metadata (PEP 301) + name = "Python", +-- +2.6.4 + diff --git a/package/python3/0020-Add-option-to-disable-the-sqlite3-module.patch b/package/python3/0020-Add-option-to-disable-the-sqlite3-module.patch new file mode 100644 index 0000000000..26a7b34c3b --- /dev/null +++ b/package/python3/0020-Add-option-to-disable-the-sqlite3-module.patch @@ -0,0 +1,67 @@ +From f218ef22019d4c03427113982edc42beddd05683 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:49:01 +0100 +Subject: [PATCH] Add option to disable the sqlite3 module + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin +--- + Makefile.pre.in | 7 +++++-- + configure.ac | 9 +++++++++ + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 6656f48..433cac1 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1144,7 +1144,6 @@ LIBSUBDIRS= tkinter \ + email email/mime \ + ensurepip ensurepip/_bundled \ + html json http dbm xmlrpc \ +- sqlite3 \ + logging csv wsgiref urllib \ + ctypes ctypes/macholib \ + idlelib idlelib/Icons \ +@@ -1186,7 +1185,6 @@ TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \ + test/test_importlib/namespace_pkgs/project3/parent/child \ + test/test_importlib/namespace_pkgs/module_and_namespace_package \ + test/test_importlib/namespace_pkgs/module_and_namespace_package/a_test \ +- sqlite3/test \ + ctypes/test \ + idlelib/idle_test \ + distutils/tests \ +@@ -1207,6 +1205,11 @@ TESTSUBDIRS += lib2to3/tests \ + lib2to3/tests/data/fixers/myfixes + endif + ++ifeq (@SQLITE3@,yes) ++LIBSUBDIRS += sqlite3 ++TESTSUBDIRS += sqlite3/test ++endif ++ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +diff --git a/configure.ac b/configure.ac +index 0ed6b17..aaffbd6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2658,6 +2658,15 @@ if test "$posix_threads" = "yes"; then + AC_CHECK_FUNCS(pthread_atfork) + fi + ++AC_SUBST(SQLITE3) ++AC_ARG_ENABLE(sqlite3, ++ AS_HELP_STRING([--disable-sqlite3], [disable sqlite3]), ++ [ SQLITE3="${enableval}" ], [ SQLITE3=yes ]) ++ ++if test "$SQLITE3" = "no" ; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" ++fi ++ + AC_SUBST(PYDOC) + + AC_ARG_ENABLE(pydoc, +-- +2.6.4 + diff --git a/package/python3/0021-Add-an-option-to-disable-the-tk-module.patch b/package/python3/0021-Add-an-option-to-disable-the-tk-module.patch new file mode 100644 index 0000000000..fc3c9b431c --- /dev/null +++ b/package/python3/0021-Add-an-option-to-disable-the-tk-module.patch @@ -0,0 +1,71 @@ +From 006bf215734ad63007de044fe7803f66f83a4d19 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:49:14 +0100 +Subject: [PATCH] Add an option to disable the tk module + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin +--- + Makefile.pre.in | 11 ++++++++--- + configure.ac | 9 +++++++++ + 2 files changed, 17 insertions(+), 3 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 433cac1..e492d7b 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1137,7 +1137,7 @@ PLATDIR= plat-$(MACHDEP) + EXTRAPLATDIR= @EXTRAPLATDIR@ + MACHDEPS= $(PLATDIR) $(EXTRAPLATDIR) + XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax +-LIBSUBDIRS= tkinter \ ++LIBSUBDIRS= \ + site-packages \ + asyncio \ + collections concurrent concurrent/futures encodings \ +@@ -1155,8 +1155,7 @@ LIBSUBDIRS= tkinter \ + venv venv/scripts venv/scripts/posix \ + curses $(MACHDEPS) + +-TESTSUBDIRS = tkinter/test tkinter/test/test_tkinter tkinter/test/test_ttk \ +- test test/test_asyncio \ ++TESTSUBDIRS = test test/test_asyncio \ + test/test_email test/test_email/data \ + test/test_json \ + test/audiodata \ +@@ -1210,6 +1209,12 @@ LIBSUBDIRS += sqlite3 + TESTSUBDIRS += sqlite3/test + endif + ++ifeq (@TK@,yes) ++LIBSUBDIRS += tkinter ++TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \ ++ tkinter/test/test_ttk ++endif ++ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +diff --git a/configure.ac b/configure.ac +index aaffbd6..7efd54f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2667,6 +2667,15 @@ if test "$SQLITE3" = "no" ; then + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" + fi + ++AC_SUBST(TK) ++AC_ARG_ENABLE(tk, ++ AS_HELP_STRING([--disable-tk], [disable tk]), ++ [ TK="${enableval}" ], [ TK=yes ]) ++ ++if test "$TK" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" ++fi ++ + AC_SUBST(PYDOC) + + AC_ARG_ENABLE(pydoc, +-- +2.6.4 + diff --git a/package/python3/0022-Add-an-option-to-disable-the-curses-module.patch b/package/python3/0022-Add-an-option-to-disable-the-curses-module.patch new file mode 100644 index 0000000000..de78bb0608 --- /dev/null +++ b/package/python3/0022-Add-an-option-to-disable-the-curses-module.patch @@ -0,0 +1,59 @@ +From 42725aef353df06f760f0a47b80001187d04d8b4 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:49:30 +0100 +Subject: [PATCH] Add an option to disable the curses module + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin +--- + Makefile.pre.in | 6 +++++- + configure.ac | 9 +++++++++ + 2 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index e492d7b..66b2c45 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1153,7 +1153,7 @@ LIBSUBDIRS= \ + multiprocessing multiprocessing/dummy \ + unittest \ + venv venv/scripts venv/scripts/posix \ +- curses $(MACHDEPS) ++ $(MACHDEPS) + + TESTSUBDIRS = test test/test_asyncio \ + test/test_email test/test_email/data \ +@@ -1215,6 +1215,10 @@ TESTSUBDIRS += tkinter/test tkinter/test/test_tkinter \ + tkinter/test/test_ttk + endif + ++ifeq (@CURSES@,yes) ++LIBSUBDIRS += curses ++endif ++ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +diff --git a/configure.ac b/configure.ac +index 7efd54f..e48f38e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2676,6 +2676,15 @@ if test "$TK" = "no"; then + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _tkinter" + fi + ++AC_SUBST(CURSES) ++AC_ARG_ENABLE(curses, ++ AS_HELP_STRING([--disable-curses], [disable curses]), ++ [ CURSES="${enableval}" ], [ CURSES=yes ]) ++ ++if test "$CURSES" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _curses _curses_panel" ++fi ++ + AC_SUBST(PYDOC) + + AC_ARG_ENABLE(pydoc, +-- +2.6.4 + diff --git a/package/python3/0023-Add-an-option-to-disable-expat.patch b/package/python3/0023-Add-an-option-to-disable-expat.patch new file mode 100644 index 0000000000..9cb0799c5d --- /dev/null +++ b/package/python3/0023-Add-an-option-to-disable-expat.patch @@ -0,0 +1,90 @@ +From f98b83bca09882d27bb04d7dbcd50f9979ad0569 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:49:42 +0100 +Subject: [PATCH] Add an option to disable expat + +This patch replaces the existing --with-system-expat option with a +--with-expat={system,builtin,none} option, which allows to tell Python +whether we want to use the system expat (already installed), the expat +builtin the Python sources, or no expat at all (which disables the +installation of XML modules). + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Samuel Martin +--- + Makefile.pre.in | 6 +++++- + configure.ac | 18 +++++++++++++----- + setup.py | 2 +- + 3 files changed, 19 insertions(+), 7 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 66b2c45..884d5aa 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1147,7 +1147,7 @@ LIBSUBDIRS= \ + logging csv wsgiref urllib \ + ctypes ctypes/macholib \ + idlelib idlelib/Icons \ +- distutils distutils/command $(XMLLIBSUBDIRS) \ ++ distutils distutils/command \ + importlib \ + turtledemo \ + multiprocessing multiprocessing/dummy \ +@@ -1219,6 +1219,10 @@ ifeq (@CURSES@,yes) + LIBSUBDIRS += curses + endif + ++ifeq (@EXPAT@,yes) ++LIBSUBDIRS += $(XMLLIBSUBDIRS) ++endif ++ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +diff --git a/configure.ac b/configure.ac +index e48f38e..4bbd597 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2355,13 +2355,21 @@ PKG_PROG_PKG_CONFIG + AC_SUBST(DISABLED_EXTENSIONS) + + # Check for use of the system expat library +-AC_MSG_CHECKING(for --with-system-expat) +-AC_ARG_WITH(system_expat, +- AS_HELP_STRING([--with-system-expat], [build pyexpat module using an installed expat library]), ++AC_MSG_CHECKING(for --with-expat) ++AC_ARG_WITH(expat, ++ AS_HELP_STRING([--with-expat], [select which expat version to use: system, builtin, none]), + [], +- [with_system_expat="no"]) ++ [with_expat="builtin"]) + +-AC_MSG_RESULT($with_system_expat) ++AC_MSG_RESULT($with_expat) ++ ++if test "$with_expat" != "none"; then ++ EXPAT=yes ++else ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} pyexpat" ++ EXPAT=no ++fi ++AC_SUBST(EXPAT) + + # Check for use of the system libffi library + AC_MSG_CHECKING(for --with-system-ffi) +diff --git a/setup.py b/setup.py +index a2bf05a..fd3ac65 100644 +--- a/setup.py ++++ b/setup.py +@@ -1414,7 +1414,7 @@ class PyBuildExt(build_ext): + # + # More information on Expat can be found at www.libexpat.org. + # +- if '--with-system-expat' in sysconfig.get_config_var("CONFIG_ARGS"): ++ if '--with-expat=system' in sysconfig.get_config_var("CONFIG_ARGS"): + expat_inc = [] + define_macros = [] + expat_lib = ['expat'] +-- +2.6.4 + diff --git a/package/python3/0024-Add-an-option-to-disable-CJK-codecs.patch b/package/python3/0024-Add-an-option-to-disable-CJK-codecs.patch new file mode 100644 index 0000000000..b4d77849e3 --- /dev/null +++ b/package/python3/0024-Add-an-option-to-disable-CJK-codecs.patch @@ -0,0 +1,30 @@ +From cf731841e1209c6faa99e2db4cf4c890e7c28080 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:49:55 +0100 +Subject: [PATCH] Add an option to disable CJK codecs + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 4bbd597..05817f0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2675,6 +2675,12 @@ if test "$SQLITE3" = "no" ; then + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _sqlite3" + fi + ++AC_ARG_ENABLE(codecs-cjk, ++ AS_HELP_STRING([--disable-codecs-cjk], [disable CJK codecs]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022" ++ fi]) ++ + AC_SUBST(TK) + AC_ARG_ENABLE(tk, + AS_HELP_STRING([--disable-tk], [disable tk]), +-- +2.6.4 + diff --git a/package/python3/0025-Add-an-option-to-disable-NIS.patch b/package/python3/0025-Add-an-option-to-disable-NIS.patch new file mode 100644 index 0000000000..cd6b19d79a --- /dev/null +++ b/package/python3/0025-Add-an-option-to-disable-NIS.patch @@ -0,0 +1,33 @@ +From f99823ef41d6f5c8e67b198b04b289d9b6ef8570 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:50:11 +0100 +Subject: [PATCH] Add an option to disable NIS + +NIS is not necessarily available in uClibc, so we need an option to +not compile support for it. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 05817f0..4fb35a8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2681,6 +2681,12 @@ AC_ARG_ENABLE(codecs-cjk, + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _codecs_kr _codecs_jp _codecs_cn _codecs_tw _codecs_hk _codecs_iso2022" + fi]) + ++AC_ARG_ENABLE(nis, ++ AS_HELP_STRING([--disable-nis], [disable NIS]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" ++ fi]) ++ + AC_SUBST(TK) + AC_ARG_ENABLE(tk, + AS_HELP_STRING([--disable-tk], [disable tk]), +-- +2.6.4 + diff --git a/package/python3/0026-Add-an-option-to-disable-unicodedata.patch b/package/python3/0026-Add-an-option-to-disable-unicodedata.patch new file mode 100644 index 0000000000..a5880f2603 --- /dev/null +++ b/package/python3/0026-Add-an-option-to-disable-unicodedata.patch @@ -0,0 +1,30 @@ +From 4a32e709d128886dab10e59fad60fde005933aff Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:50:27 +0100 +Subject: [PATCH] Add an option to disable unicodedata + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 4fb35a8..58f2dd9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2687,6 +2687,12 @@ AC_ARG_ENABLE(nis, + DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} nis" + fi]) + ++AC_ARG_ENABLE(unicodedata, ++ AS_HELP_STRING([--disable-unicodedata], [disable unicodedata]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} unicodedata" ++ fi]) ++ + AC_SUBST(TK) + AC_ARG_ENABLE(tk, + AS_HELP_STRING([--disable-tk], [disable tk]), +-- +2.6.4 + diff --git a/package/python3/0027-Add-an-option-to-disable-IDLE.patch b/package/python3/0027-Add-an-option-to-disable-IDLE.patch new file mode 100644 index 0000000000..c2b59e8258 --- /dev/null +++ b/package/python3/0027-Add-an-option-to-disable-IDLE.patch @@ -0,0 +1,87 @@ +From 9336cf4eb4ded1eaa83da5549e4aba62b34ef888 Mon Sep 17 00:00:00 2001 +From: Maxime Ripard +Date: Wed, 23 Dec 2015 11:50:42 +0100 +Subject: [PATCH] Add an option to disable IDLE + +IDLE is an IDE embedded into python, written using Tk, so it doesn't make +much sense to have it into our build. + +Signed-off-by: Maxime Ripard +--- + Makefile.pre.in | 7 ++++++- + configure.ac | 6 ++++++ + setup.py | 4 +++- + 3 files changed, 15 insertions(+), 2 deletions(-) + +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 884d5aa..48b4812 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -1098,7 +1098,9 @@ bininstall: altbininstall + -rm -f $(DESTDIR)$(LIBPC)/python3.pc + (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python3.pc) + -rm -f $(DESTDIR)$(BINDIR)/idle3 ++ifeq (@IDLE@,yes) + (cd $(DESTDIR)$(BINDIR); $(LN) -s idle$(VERSION) idle3) ++endif + -rm -f $(DESTDIR)$(BINDIR)/pydoc3 + ifeq (@PYDOC@,yes) + (cd $(DESTDIR)$(BINDIR); $(LN) -s pydoc$(VERSION) pydoc3) +@@ -1146,7 +1148,6 @@ LIBSUBDIRS= \ + html json http dbm xmlrpc \ + logging csv wsgiref urllib \ + ctypes ctypes/macholib \ +- idlelib idlelib/Icons \ + distutils distutils/command \ + importlib \ + turtledemo \ +@@ -1223,6 +1224,10 @@ ifeq (@EXPAT@,yes) + LIBSUBDIRS += $(XMLLIBSUBDIRS) + endif + ++ifeq (@IDLE@,yes) ++LIBSUBDIRS += idlelib idlelib/Icons ++endif ++ + ifeq (@TEST_MODULES@,yes) + LIBSUBDIRS += $(TESTSUBDIRS) + endif +diff --git a/configure.ac b/configure.ac +index 58f2dd9..0ba25e4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2729,6 +2729,12 @@ AC_ARG_ENABLE(lib2to3, + AS_HELP_STRING([--disable-lib2to3], [disable lib2to3]), + [ LIB2TO3="${enableval}" ], [ LIB2TO3=yes ]) + ++AC_SUBST(IDLE) ++ ++AC_ARG_ENABLE(idle3, ++ AS_HELP_STRING([--disable-idle3], [disable idle3 IDE]), ++ [ IDLE="${enableval}" ], [ IDLE=yes ]) ++ + # Check for enable-ipv6 + AH_TEMPLATE(ENABLE_IPV6, [Define if --enable-ipv6 is specified]) + AC_MSG_CHECKING([if --enable-ipv6 is specified]) +diff --git a/setup.py b/setup.py +index fd3ac65..3655e57 100644 +--- a/setup.py ++++ b/setup.py +@@ -2201,11 +2201,13 @@ def main(): + import warnings + warnings.filterwarnings("ignore",category=DeprecationWarning) + +- scripts = ['Tools/scripts/idle3', 'Lib/smtpd.py'] ++ scripts = ['Lib/smtpd.py'] + if not '--disable-pydoc' in sysconfig.get_config_var("CONFIG_ARGS"): + scripts += [ 'Tools/scripts/pydoc3' ] + if not '--disable-lib2to3' in sysconfig.get_config_var("CONFIG_ARGS"): + scripts += [ 'Tools/scripts/2to3' ] ++ if not '--disable-idle3' in sysconfig.get_config_var("CONFIG_ARGS"): ++ scripts += [ 'Tools/scripts/idle3' ] + + setup(# PyPI Metadata (PEP 301) + name = "Python", +-- +2.6.4 + diff --git a/package/python3/0028-Add-an-option-to-disable-decimal.patch b/package/python3/0028-Add-an-option-to-disable-decimal.patch new file mode 100644 index 0000000000..df85325998 --- /dev/null +++ b/package/python3/0028-Add-an-option-to-disable-decimal.patch @@ -0,0 +1,62 @@ +From 8fee92a85c170ac4ce24dda5a960f24b83d6f103 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:51:31 +0100 +Subject: [PATCH] Add an option to disable decimal + +This patch replaces the existing --with-system-libmpdec option with a +--with-libmpdec={system,builtin,none} option, which allows to tell +Python whether we want to use the system libmpdec (already installed), +the libmpdec builtin the Python sources, or no libmpdec at all. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 17 ++++++++++++----- + setup.py | 2 +- + 2 files changed, 13 insertions(+), 6 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 0ba25e4..536b9b2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2388,13 +2388,20 @@ AC_SUBST(LIBFFI_INCLUDEDIR) + AC_MSG_RESULT($with_system_ffi) + + # Check for use of the system libmpdec library +-AC_MSG_CHECKING(for --with-system-libmpdec) +-AC_ARG_WITH(system_libmpdec, +- AS_HELP_STRING([--with-system-libmpdec], [build _decimal module using an installed libmpdec library]), ++AC_MSG_CHECKING(for --with-libmpdec) ++AC_ARG_WITH(libmpdec, ++ AS_HELP_STRING([--with-libmpdec], [select which libmpdec version to use: system, builtin, none]), + [], +- [with_system_libmpdec="no"]) ++ [with_libmpdec="builtin"]) + +-AC_MSG_RESULT($with_system_libmpdec) ++AC_MSG_RESULT($with_libmpdec) ++if test "$with_libmpdec" != "none"; then ++ MPDEC=yes ++else ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} _decimal" ++ MPDEC=no ++fi ++AC_SUBST(MPDEC) + + # Check for support for loadable sqlite extensions + AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions) +diff --git a/setup.py b/setup.py +index 3655e57..7f7627d 100644 +--- a/setup.py ++++ b/setup.py +@@ -1968,7 +1968,7 @@ class PyBuildExt(build_ext): + def _decimal_ext(self): + extra_compile_args = [] + undef_macros = [] +- if '--with-system-libmpdec' in sysconfig.get_config_var("CONFIG_ARGS"): ++ if '--with-libmpdec=system' in sysconfig.get_config_var("CONFIG_ARGS"): + include_dirs = [] + libraries = [':libmpdec.so.2'] + sources = ['_decimal/_decimal.c'] +-- +2.6.4 + diff --git a/package/python3/0029-Add-an-option-to-disable-the-ossaudiodev-module.patch b/package/python3/0029-Add-an-option-to-disable-the-ossaudiodev-module.patch new file mode 100644 index 0000000000..56b6ae1a79 --- /dev/null +++ b/package/python3/0029-Add-an-option-to-disable-the-ossaudiodev-module.patch @@ -0,0 +1,30 @@ +From 53639100c2f7836ce9a51b5e5b9b4ea08ba1dc4e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 23 Dec 2015 11:51:58 +0100 +Subject: [PATCH] Add an option to disable the ossaudiodev module + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 536b9b2..c1ab3a1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2403,6 +2403,12 @@ else + fi + AC_SUBST(MPDEC) + ++AC_ARG_ENABLE(ossaudiodev, ++ AS_HELP_STRING([--disable-ossaudiodev], [disable OSSAUDIODEV]), ++ [ if test "$enableval" = "no"; then ++ DISABLED_EXTENSIONS="${DISABLED_EXTENSIONS} ossaudiodev" ++ fi]) ++ + # Check for support for loadable sqlite extensions + AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions) + AC_ARG_ENABLE(loadable-sqlite-extensions, +-- +2.6.4 + diff --git a/package/python3/Config.in b/package/python3/Config.in new file mode 100644 index 0000000000..0f4fc88a6e --- /dev/null +++ b/package/python3/Config.in @@ -0,0 +1,109 @@ +comment "python3 needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_PYTHON3 + bool "python3" + depends on !BR2_PACKAGE_PYTHON + depends on BR2_USE_WCHAR + # uses fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS # libffi + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_LIBFFI + help + The python language interpreter. + + http://www.python.org/ + +if BR2_PACKAGE_PYTHON3 + +choice + prompt "python3 module format to install" + default BR2_PACKAGE_PYTHON3_PYC_ONLY + help + Select Python module format to install on target (py, pyc or both) + +config BR2_PACKAGE_PYTHON3_PY_ONLY + bool ".py sources only" + +config BR2_PACKAGE_PYTHON3_PYC_ONLY + bool ".pyc compiled sources only" + +config BR2_PACKAGE_PYTHON3_PY_PYC + bool ".py sources and .pyc compiled" + +endchoice + +menu "core python3 modules" + +comment "The following modules are unusual or require extra libraries" + +config BR2_PACKAGE_PYTHON3_BZIP2 + select BR2_PACKAGE_BZIP2 + bool "bz2 module" + help + bzip2 module for Python3 + +config BR2_PACKAGE_PYTHON3_CODECSCJK + bool "codecscjk module" + help + Chinese/Japanese/Korean codecs module for Python (large). + +config BR2_PACKAGE_PYTHON3_CURSES + select BR2_PACKAGE_NCURSES + bool "curses module" + help + curses module for Python3. + +config BR2_PACKAGE_PYTHON3_DECIMAL + select BR2_PACKAGE_MPDECIMAL + bool "decimal module" + help + decimal module for Python3. + +config BR2_PACKAGE_PYTHON3_OSSAUDIODEV + bool "ossaudiodev module" + help + ossaudiodev module for Python3. + +config BR2_PACKAGE_PYTHON3_READLINE + select BR2_PACKAGE_READLINE + bool "readline" + help + readline module for Python3 (required for command-line + editing in the Python shell). + +config BR2_PACKAGE_PYTHON3_SSL + select BR2_PACKAGE_OPENSSL + bool "ssl" + help + _ssl module for Python3 (required for https in urllib etc). + +config BR2_PACKAGE_PYTHON3_UNICODEDATA + bool "unicodedata module" + default y + help + Unicode character database (used by stringprep module) (large). + +config BR2_PACKAGE_PYTHON3_SQLITE + bool "sqlite module" + select BR2_PACKAGE_SQLITE + help + SQLite database support + +config BR2_PACKAGE_PYTHON3_PYEXPAT + select BR2_PACKAGE_EXPAT + bool "xml module" + help + pyexpat and xml libraries for Python3. + +config BR2_PACKAGE_PYTHON3_ZLIB + bool "zlib module" + select BR2_PACKAGE_ZLIB + help + zlib support in Python3 + +endmenu + +endif diff --git a/package/python3/python3.hash b/package/python3/python3.hash new file mode 100644 index 0000000000..60ac23055f --- /dev/null +++ b/package/python3/python3.hash @@ -0,0 +1,4 @@ +# From https://www.python.org/downloads/release/python-343/ +md5 7d092d1bba6e17f0d9bd21b49e441dd5 Python-3.4.3.tar.xz +# Locally computed +sha256 b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8 Python-3.4.3.tar.xz diff --git a/package/python3/python3.mk b/package/python3/python3.mk new file mode 100644 index 0000000000..a37b791a87 --- /dev/null +++ b/package/python3/python3.mk @@ -0,0 +1,233 @@ +################################################################################ +# +# python3 +# +################################################################################ + +PYTHON3_VERSION_MAJOR = 3.4 +PYTHON3_VERSION = $(PYTHON3_VERSION_MAJOR).3 +PYTHON3_SOURCE = Python-$(PYTHON3_VERSION).tar.xz +PYTHON3_SITE = http://python.org/ftp/python/$(PYTHON3_VERSION) +PYTHON3_LICENSE = Python software foundation license v2, others +PYTHON3_LICENSE_FILES = LICENSE + +# Python itself doesn't use libtool, but it includes the source code +# of libffi, which uses libtool. Unfortunately, it uses a beta version +# of libtool for which we don't have a matching patch. However, this +# is not a problem, because we don't use the libffi copy included in +# the Python sources, but instead use an external libffi library. +PYTHON3_LIBTOOL_PATCH = NO + +# Python needs itself and a "pgen" program to build itself, both being +# provided in the Python sources. So in order to cross-compile Python, +# we need to build a host Python first. This host Python is also +# installed in $(HOST_DIR), as it is needed when cross-compiling +# third-party Python modules. + +HOST_PYTHON3_CONF_OPTS += \ + --without-ensurepip \ + --without-cxx-main \ + --disable-sqlite3 \ + --disable-tk \ + --with-expat=system \ + --disable-curses \ + --disable-codecs-cjk \ + --disable-nis \ + --enable-unicodedata \ + --disable-test-modules \ + --disable-idle3 \ + --disable-ossaudiodev \ + --disable-pyo-build + +# Make sure that LD_LIBRARY_PATH overrides -rpath. +# This is needed because libpython may be installed at the same time that +# python is called. +HOST_PYTHON3_CONF_ENV += \ + LDFLAGS="$(HOST_LDFLAGS) -Wl,--enable-new-dtags" + +PYTHON3_DEPENDENCIES = host-python3 libffi + +HOST_PYTHON3_DEPENDENCIES = host-expat host-zlib + +PYTHON3_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_PYTHON3_READLINE),y) +PYTHON3_DEPENDENCIES += readline +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_CURSES),y) +PYTHON3_DEPENDENCIES += ncurses +else +PYTHON3_CONF_OPTS += --disable-curses +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_DECIMAL),y) +PYTHON3_DEPENDENCIES += mpdecimal +PYTHON3_CONF_OPTS += --with-libmpdec=system +else +PYTHON3_CONF_OPTS += --with-libmpdec=none +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_PYEXPAT),y) +PYTHON3_DEPENDENCIES += expat +PYTHON3_CONF_OPTS += --with-expat=system +else +PYTHON3_CONF_OPTS += --with-expat=none +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y) +PYTHON3_CONF_OPTS += --enable-old-stdlib-cache +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_PY_ONLY),y) +PYTHON3_CONF_OPTS += --disable-pyc-build +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_SQLITE),y) +PYTHON3_DEPENDENCIES += sqlite +else +PYTHON3_CONF_OPTS += --disable-sqlite3 +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_SSL),y) +PYTHON3_DEPENDENCIES += openssl +endif + +ifneq ($(BR2_PACKAGE_PYTHON3_CODECSCJK),y) +PYTHON3_CONF_OPTS += --disable-codecs-cjk +endif + +ifneq ($(BR2_PACKAGE_PYTHON3_UNICODEDATA),y) +PYTHON3_CONF_OPTS += --disable-unicodedata +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_BZIP2),y) +PYTHON3_DEPENDENCIES += bzip2 +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_ZLIB),y) +PYTHON3_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_OSSAUDIODEV),y) +PYTHON3_CONF_OPTS += --enable-ossaudiodev +else +PYTHON3_CONF_OPTS += --disable-ossaudiodev +endif + +PYTHON3_CONF_ENV += \ + ac_cv_have_long_long_format=yes \ + ac_cv_file__dev_ptmx=yes \ + ac_cv_file__dev_ptc=yes \ + ac_cv_working_tzset=yes + +# uClibc is known to have a broken wcsftime() implementation, so tell +# Python 3 to fall back to strftime() instead. +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) +PYTHON3_CONF_ENV += ac_cv_func_wcsftime=no +endif + +PYTHON3_CONF_OPTS += \ + --without-ensurepip \ + --without-cxx-main \ + --with-system-ffi \ + --disable-pydoc \ + --disable-test-modules \ + --disable-lib2to3 \ + --disable-tk \ + --disable-nis \ + --disable-idle3 \ + --disable-pyo-build + +# This is needed to make sure the Python build process doesn't try to +# regenerate those files with the pgen program. Otherwise, it builds +# pgen for the target, and tries to run it on the host. + +define PYTHON3_TOUCH_GRAMMAR_FILES + touch $(@D)/Include/graminit.h $(@D)/Python/graminit.c +endef + +# This prevents the Python Makefile from regenerating the +# Python/importlib.h header if Lib/importlib/_bootstrap.py has changed +# because its generation is broken in a cross-compilation environment +# and importlib.h is not used. + +define PYTHON3_TOUCH_IMPORTLIB_H + touch $(@D)/Python/importlib.h +endef + +PYTHON3_POST_PATCH_HOOKS += PYTHON3_TOUCH_GRAMMAR_FILES +PYTHON3_POST_PATCH_HOOKS += PYTHON3_TOUCH_IMPORTLIB_H + +# +# Remove useless files. In the config/ directory, only the Makefile +# and the pyconfig.h files are needed at runtime. +# +define PYTHON3_REMOVE_USELESS_FILES + rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)-config + rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)m-config + rm -f $(TARGET_DIR)/usr/bin/python3-config + rm -f $(TARGET_DIR)/usr/bin/smtpd.py.3 + for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m/ \ + -type f -not -name pyconfig.h -a -not -name Makefile` ; do \ + rm -f $$i ; \ + done + rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/__pycache__/ + rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/lib-dynload/sysconfigdata/__pycache__ + rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/collections/__pycache__ + rm -rf $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/importlib/__pycache__ +endef + +PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_REMOVE_USELESS_FILES + +# +# Make sure libpython gets stripped out on target +# +define PYTHON3_ENSURE_LIBPYTHON_STRIPPED + chmod u+w $(TARGET_DIR)/usr/lib/libpython$(PYTHON3_VERSION_MAJOR)*.so +endef + +PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_ENSURE_LIBPYTHON_STRIPPED + +PYTHON3_AUTORECONF = YES + +define PYTHON3_INSTALL_SYMLINK + ln -fs python3 $(TARGET_DIR)/usr/bin/python +endef + +ifneq ($(BR2_PACKAGE_PYTHON),y) +PYTHON3_POST_INSTALL_TARGET_HOOKS += PYTHON3_INSTALL_SYMLINK +endif + +# Some packages may have build scripts requiring python3, whatever is the +# python version chosen for the target. +# Only install the python symlink in the host tree if python3 is enabled +# for the target. +ifeq ($(BR2_PACKAGE_PYTHON3),y) +define HOST_PYTHON3_INSTALL_SYMLINK + ln -fs python3 $(HOST_DIR)/usr/bin/python + ln -fs python3-config $(HOST_DIR)/usr/bin/python-config +endef + +HOST_PYTHON3_POST_INSTALL_HOOKS += HOST_PYTHON3_INSTALL_SYMLINK +endif + +# Provided to other packages +PYTHON3_PATH = $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/sysconfigdata/:$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/ + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY),y) +define PYTHON3_FINALIZE_TARGET + find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) -name '*.py' -print0 | xargs -0 rm -f +endef +endif + +ifeq ($(BR2_PACKAGE_PYTHON3_PY_ONLY),y) +define PYTHON3_FINALIZE_TARGET + find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR) -name '*.pyc' -print0 | xargs -0 rm -f +endef +endif + +TARGET_FINALIZE_HOOKS += PYTHON3_FINALIZE_TARGET diff --git a/package/qdecoder/0001-fix-make-install.patch b/package/qdecoder/0001-fix-make-install.patch new file mode 100644 index 0000000000..f353566839 --- /dev/null +++ b/package/qdecoder/0001-fix-make-install.patch @@ -0,0 +1,40 @@ +[PATCH] fix make install to respect DESTDIR + +And also ensure destination directories exist. + +Signed-off-by: Peter Korsgaard +--- + src/Makefile.in | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +Index: qdecoder-r12.0.5/src/Makefile.in +=================================================================== +--- qdecoder-r12.0.5.orig/src/Makefile.in ++++ qdecoder-r12.0.5/src/Makefile.in +@@ -78,17 +78,18 @@ + ${LN_S} -f ${SLIBREALNAME} ${SLIBNAME} + + install: all +- ${INSTALL_DATA} qdecoder.h ${HEADERDIR}/qdecoder.h +- ${INSTALL_DATA} ${LIBNAME} ${LIBDIR}/${LIBNAME} +- ${INSTALL_DATA} ${SLIBREALNAME} ${LIBDIR}/${SLIBREALNAME} +- ( cd ${LIBDIR}; ${LN_S} -f ${SLIBREALNAME} ${SLIBNAME} ) ++ mkdir -p ${DESTDIR}/${HEADERDIR} ${DESTDIR}/${LIBDIR} ++ ${INSTALL_DATA} qdecoder.h ${DESTDIR}/${HEADERDIR}/qdecoder.h ++ ${INSTALL_DATA} ${LIBNAME} ${DESTDIR}/${LIBDIR}/${LIBNAME} ++ ${INSTALL_DATA} ${SLIBREALNAME} ${DESTDIR}/${LIBDIR}/${SLIBREALNAME} ++ ( cd ${DESTDIR}/${LIBDIR}; ${LN_S} -f ${SLIBREALNAME} ${SLIBNAME} ) + + deinstall: uninstall + uninstall: +- ${RM} -f ${HEADERDIR}/qdecoder.h +- ${RM} -f ${LIBDIR}/${LIBNAME} +- ${RM} -f ${LIBDIR}/${SLIBREALNAME} +- ${RM} -f ${LIBDIR}/${SLIBNAME} ++ ${RM} -f ${DESTDIR}/${HEADERDIR}/qdecoder.h ++ ${RM} -f ${DESTDIR}/${LIBDIR}/${LIBNAME} ++ ${RM} -f ${DESTDIR}/${LIBDIR}/${SLIBREALNAME} ++ ${RM} -f ${DESTDIR}/${LIBDIR}/${SLIBNAME} + + doc: + doxygen doxygen.conf diff --git a/package/qdecoder/0002-configure.ac-drop-hardcoded-paths.patch b/package/qdecoder/0002-configure.ac-drop-hardcoded-paths.patch new file mode 100644 index 0000000000..689d1d9124 --- /dev/null +++ b/package/qdecoder/0002-configure.ac-drop-hardcoded-paths.patch @@ -0,0 +1,25 @@ +[PATCH] configure.ac: drop hardcoded paths + +Causing problems with cross compilation. + +Signed-off-by: Peter Korsgaard +--- + configure.ac | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +Index: qdecoder-r12.0.5/configure.ac +=================================================================== +--- qdecoder-r12.0.5.orig/configure.ac ++++ qdecoder-r12.0.5/configure.ac +@@ -81,10 +81,7 @@ + AC_CONFIG_HEADER([config.h]) + AC_CONFIG_FILES([Makefile src/Makefile examples/Makefile]) + +-## Set path +-PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" +-CPPFLAGS="$CPPFLAGS -I/usr/include -I/usr/local/include -I./ -D_GNU_SOURCE" +-LDFLAGS="$LDFLAGS -L/usr/lib -L/usr/local/lib" ++CPPFLAGS="$CPPFLAGS -I./ -D_GNU_SOURCE" + + ## Set autoconf setting + #AC_CANONICAL_TARGET diff --git a/package/qdecoder/0003-errno.patch b/package/qdecoder/0003-errno.patch new file mode 100644 index 0000000000..71d5cfd662 --- /dev/null +++ b/package/qdecoder/0003-errno.patch @@ -0,0 +1,34 @@ +Fixes build error + +qcgireq.c: In function '_parse_multipart_value_into_disk': +qcgireq.c:738:60: error: 'errno' undeclared (first use in this function) + DEBUG("I/O error. (errno=%d)", (ioerror == true) ? errno : 0); + +Patch downloaded from upstream repo: +https://github.com/wolkykim/qdecoder/commit/574f0216a51e3e852cd94e2a0a3b52dc64e74548 + +Signed-off-by: Bernd Kuhls + + +From 574f0216a51e3e852cd94e2a0a3b52dc64e74548 Mon Sep 17 00:00:00 2001 +From: nyov +Date: Fri, 5 Sep 2014 18:41:10 +0000 +Subject: [PATCH] add missing header include + +fixes #7 +--- + src/qcgireq.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/qcgireq.c b/src/qcgireq.c +index dcb8c57..d34ff83 100644 +--- a/src/qcgireq.c ++++ b/src/qcgireq.c +@@ -139,6 +139,7 @@ + #ifndef _WIN32 + #include + #endif ++#include + #include "qdecoder.h" + #include "internal.h" + diff --git a/package/qdecoder/Config.in b/package/qdecoder/Config.in new file mode 100644 index 0000000000..4873877693 --- /dev/null +++ b/package/qdecoder/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_QDECODER + bool "qdecoder" + depends on !BR2_STATIC_LIBS + help + qDecoder is a simple and powerful CGI library + for the C/C++ programming language. + + http://wolkykim.github.io/qdecoder diff --git a/package/qdecoder/qdecoder.mk b/package/qdecoder/qdecoder.mk new file mode 100644 index 0000000000..bbbf42a98c --- /dev/null +++ b/package/qdecoder/qdecoder.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# qdecoder +# +################################################################################ + +QDECODER_VERSION = r12.0.5 +QDECODER_SITE = $(call github,wolkykim,qdecoder,$(QDECODER_VERSION)) +QDECODER_LICENSE = BSD-2 +QDECODER_LICENSE_FILES = COPYING +# we patch configure.ac +QDECODER_AUTORECONF = YES +QDECODER_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' + +QDECODER_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/qemu/Config.in b/package/qemu/Config.in new file mode 100644 index 0000000000..ea6b94605c --- /dev/null +++ b/package/qemu/Config.in @@ -0,0 +1,109 @@ +config BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET + bool + # Only tested on these architectures + default y if BR2_aarch64 || BR2_i386 || BR2_mips || BR2_mipsel \ + || BR2_x86_64 || BR2_arm + +comment "QEMU requires a toolchain with wchar, threads" + depends on BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET + depends on BR2_USE_MMU + depends on !(BR2_TOOLCHAIN_HAS_THREADS && BR2_USE_WCHAR) + +config BR2_PACKAGE_QEMU + bool "QEMU" + depends on BR2_PACKAGE_QEMU_ARCH_SUPPORTS_TARGET + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR # gettext + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_ZLIB + help + QEMU is a generic and open source machine emulator and virtualizer. + + When used as a machine emulator, QEMU can run OSes and programs made + for one machine (e.g. an ARM board) on a different machine (e.g. + your own PC). By using dynamic translation, it achieves very good + performance. + + When used as a virtualizer, QEMU achieves near native performances + by executing the guest code directly on the host CPU. QEMU supports + virtualization when executing under the Xen hypervisor or using the + KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, + server and embedded PowerPC, and S390 guests. + + http://qemu.org/ + +if BR2_PACKAGE_QEMU + +comment "Emulators selection" + +config BR2_PACKAGE_QEMU_CUSTOM_TARGETS + string "Enable specific targets" + help + Enter here the list of QEMU targets you want to build. For example: + + System emulation | User-land emulation + ----------------------+----------------------- + i386-softmmu | i386-linux-user + arm-softmmu | ppc-linux-user + x86_64-softmmu | sparc-bsd-user + ... | ... + +config QEMU_FOO + bool # To break the indentation + +if BR2_PACKAGE_QEMU_CUSTOM_TARGETS = "" + +comment "... or you can select emulator families to enable, below:" + +config BR2_PACKAGE_QEMU_SYSTEM + bool "Enable all systems emulation" + depends on !BR2_STATIC_LIBS # dtc + select BR2_PACKAGE_QEMU_FDT + help + Say 'y' to build all system emulators/virtualisers that QEMU supports. + +comment "systems emulation needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_QEMU_LINUX_USER + bool "Enable all Linux user-land emulation" + help + Say 'y' to build all Linux user-land emulators that QEMU supports. + +# Note: bsd-user can not be build on Linux + +endif # BR2_PACKAGE_QEMU_CUSTOM_TARGETS == "" + +config BR2_PACKAGE_QEMU_HAS_EMULS + def_bool y + depends on BR2_PACKAGE_QEMU_SYSTEM || BR2_PACKAGE_QEMU_LINUX_USER || BR2_PACKAGE_QEMU_CUSTOM_TARGETS != "" + +if BR2_PACKAGE_QEMU_HAS_EMULS + +comment "Frontends" + +config BR2_PACKAGE_QEMU_SDL + bool "Enable SDL frontend" + select BR2_PACKAGE_SDL + help + Say 'y' to enable the SDL frontend, that is, a graphical window + presenting the VM's display. + +comment "Misc. features" + +config BR2_PACKAGE_QEMU_FDT + bool "Enable FDT" + depends on !BR2_STATIC_LIBS # dtc + select BR2_PACKAGE_DTC + help + Say 'y' here to have QEMU capable of constructing Device Trees, + and passing them to the VMs. + +comment "FDT support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +endif # BR2_PACKAGE_QEMU_HAS_EMULS + +endif # BR2_PACKAGE_QEMU diff --git a/package/qemu/Config.in.host b/package/qemu/Config.in.host new file mode 100644 index 0000000000..c5c3f05e9f --- /dev/null +++ b/package/qemu/Config.in.host @@ -0,0 +1,17 @@ +config BR2_PACKAGE_HOST_QEMU + bool "host qemu" + # So far, we only build the user mode emulation, so this list + # of architecture dependencies only takes into account this + # emulation mode. + depends on BR2_arm || BR2_armeb || BR2_aarch64 || \ + BR2_i386 || BR2_m68k || BR2_microblazeel || \ + BR2_microblazebe || BR2_mips || BR2_mipsel || \ + BR2_mips64 || BR2_mips64el || BR2_powerpc || \ + BR2_powerpc64 || BR2_powerpc64le || BR2_sh || \ + BR2_sparc || BR2_x86_64 + help + QEMU is a generic and open source machine emulator and virtualizer. + + This option builds a user emulator for your selected architecture. + + http://www.qemu.org diff --git a/package/qemu/qemu.hash b/package/qemu/qemu.hash new file mode 100644 index 0000000000..d35960a4eb --- /dev/null +++ b/package/qemu/qemu.hash @@ -0,0 +1,2 @@ +# Locally computed, tarball verified with GPG signature +sha256 28d9946e43765a44ccccca3cba5f4f9034f2759ec1f2ce16594ddb6776c8efe6 qemu-2.5.1.1.tar.bz2 diff --git a/package/qemu/qemu.mk b/package/qemu/qemu.mk new file mode 100644 index 0000000000..5fa95bbd2e --- /dev/null +++ b/package/qemu/qemu.mk @@ -0,0 +1,224 @@ +################################################################################ +# +# qemu +# +################################################################################ + +QEMU_VERSION = 2.5.1.1 +QEMU_SOURCE = qemu-$(QEMU_VERSION).tar.bz2 +QEMU_SITE = http://wiki.qemu.org/download +QEMU_LICENSE = GPLv2, LGPLv2.1, MIT, BSD-3c, BSD-2c, Others/BSD-1c +QEMU_LICENSE_FILES = COPYING COPYING.LIB +# NOTE: there is no top-level license file for non-(L)GPL licenses; +# the non-(L)GPL license texts are specified in the affected +# individual source files. + +#------------------------------------------------------------- +# Host-qemu + +HOST_QEMU_DEPENDENCIES = host-pkgconf host-python host-zlib host-libglib2 host-pixman + +# BR ARCH qemu +# ------- ---- +# arm arm +# armeb armeb +# bfin not supported +# i486 i386 +# i586 i386 +# i686 i386 +# x86_64 x86_64 +# m68k m68k +# microblaze microblaze +# mips mips +# mipsel mipsel +# mips64 mips64 +# mips64el mips64el +# powerpc ppc +# sh2a not supported +# sh4 sh4 +# sh4eb sh4eb +# sh4a sh4 +# sh4aeb sh4eb +# sh64 not supported +# sparc sparc + +HOST_QEMU_ARCH = $(ARCH) +ifeq ($(HOST_QEMU_ARCH),i486) +HOST_QEMU_ARCH = i386 +endif +ifeq ($(HOST_QEMU_ARCH),i586) +HOST_QEMU_ARCH = i386 +endif +ifeq ($(HOST_QEMU_ARCH),i686) +HOST_QEMU_ARCH = i386 +endif +ifeq ($(HOST_QEMU_ARCH),powerpc) +HOST_QEMU_ARCH = ppc +endif +ifeq ($(HOST_QEMU_ARCH),sh4a) +HOST_QEMU_ARCH = sh4 +endif +ifeq ($(HOST_QEMU_ARCH),sh4aeb) +HOST_QEMU_ARCH = sh4eb +endif +HOST_QEMU_TARGETS = $(HOST_QEMU_ARCH)-linux-user + +ifeq ($(BR2_PACKAGE_HOST_QEMU),y) +HOST_QEMU_HOST_SYSTEM_TYPE = $(shell uname -s) +ifneq ($(HOST_QEMU_HOST_SYSTEM_TYPE),Linux) +$(error "qemu-user can only be used on Linux hosts") +endif + +# kernel version as major*256 + minor +HOST_QEMU_HOST_SYSTEM_VERSION = $(shell uname -r | awk -F. '{ print $$1 * 256 + $$2 }') +HOST_QEMU_TARGET_SYSTEM_VERSION = $(shell echo $(BR2_TOOLCHAIN_HEADERS_AT_LEAST) | awk -F. '{ print $$1 * 256 + $$2 }') +HOST_QEMU_COMPARE_VERSION = $(shell test $(HOST_QEMU_HOST_SYSTEM_VERSION) -ge $(HOST_QEMU_TARGET_SYSTEM_VERSION) && echo OK) + +# +# The principle of qemu-user is that it emulates the instructions of +# the target architecture when running the binary, and then when this +# binary does a system call, it converts this system call into a +# system call on the host machine. This mechanism makes an assumption: +# that the target binary will not do system calls that do not exist on +# the host. This basically requires that the target binary should be +# built with kernel headers that are older or the same as the kernel +# version running on the host machine. +# +ifeq ($(BR_BUILDING),y) +ifneq ($(HOST_QEMU_COMPARE_VERSION),OK) +$(error "Refusing to build qemu-user: target Linux version newer than host's.") +endif +endif +endif + +define HOST_QEMU_CONFIGURE_CMDS + cd $(@D); $(HOST_CONFIGURE_OPTS) ./configure \ + --target-list="$(HOST_QEMU_TARGETS)" \ + --prefix="$(HOST_DIR)/usr" \ + --interp-prefix=$(STAGING_DIR) \ + --cc="$(HOSTCC)" \ + --host-cc="$(HOSTCC)" \ + --python=$(HOST_DIR)/usr/bin/python2 \ + --extra-cflags="$(HOST_CFLAGS)" \ + --extra-ldflags="$(HOST_LDFLAGS)" +endef + +define HOST_QEMU_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define HOST_QEMU_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +$(eval $(host-generic-package)) + +# variable used by other packages +QEMU_USER = $(HOST_DIR)/usr/bin/qemu-$(HOST_QEMU_ARCH) + +#------------------------------------------------------------- +# Target-qemu + +QEMU_DEPENDENCIES = host-pkgconf host-python libglib2 zlib pixman + +# Need the LIBS variable because librt and libm are +# not automatically pulled. :-( +QEMU_LIBS = -lrt -lm + +QEMU_OPTS = + +QEMU_VARS = \ + LIBTOOL=$(HOST_DIR)/usr/bin/libtool \ + PYTHON=$(HOST_DIR)/usr/bin/python2 \ + PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages + +# If we want to specify only a subset of targets, we must still enable all +# of them, so that QEMU properly builds its list of default targets, from +# which it then checks if the specified sub-set is valid. That's what we +# do in the first part of the if-clause. +# Otherwise, if we do not want to pass a sub-set of targets, we then need +# to either enable or disable -user and/or -system emulation appropriately. +# That's what we do in the else-clause. +ifneq ($(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS)),) +QEMU_OPTS += --enable-system --enable-linux-user +QEMU_OPTS += --target-list="$(call qstrip,$(BR2_PACKAGE_QEMU_CUSTOM_TARGETS))" +else + +ifeq ($(BR2_PACKAGE_QEMU_SYSTEM),y) +QEMU_OPTS += --enable-system +else +QEMU_OPTS += --disable-system +endif + +ifeq ($(BR2_PACKAGE_QEMU_LINUX_USER),y) +QEMU_OPTS += --enable-linux-user +else +QEMU_OPTS += --disable-linux-user +endif + +endif + +ifeq ($(BR2_PACKAGE_QEMU_SDL),y) +QEMU_OPTS += --enable-sdl +QEMU_DEPENDENCIES += sdl +QEMU_VARS += SDL_CONFIG=$(BR2_STAGING_DIR)/usr/bin/sdl-config +else +QEMU_OPTS += --disable-sdl +endif + +ifeq ($(BR2_PACKAGE_QEMU_FDT),y) +QEMU_OPTS += --enable-fdt +QEMU_DEPENDENCIES += dtc +else +QEMU_OPTS += --disable-fdt +endif + +define QEMU_CONFIGURE_CMDS + ( cd $(@D); \ + LIBS='$(QEMU_LIBS)' \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + $(QEMU_VARS) \ + ./configure \ + --prefix=/usr \ + --cross-prefix=$(TARGET_CROSS) \ + --with-system-pixman \ + --audio-drv-list= \ + --enable-kvm \ + --enable-attr \ + --enable-vhost-net \ + --disable-bsd-user \ + --disable-xen \ + --disable-slirp \ + --disable-vnc \ + --disable-virtfs \ + --disable-brlapi \ + --disable-curses \ + --disable-curl \ + --disable-bluez \ + --disable-uuid \ + --disable-vde \ + --disable-linux-aio \ + --disable-cap-ng \ + --disable-docs \ + --disable-spice \ + --disable-rbd \ + --disable-libiscsi \ + --disable-usb-redir \ + --disable-strip \ + --disable-seccomp \ + --disable-sparse \ + --disable-tools \ + $(QEMU_OPTS) \ + ) +endef + +define QEMU_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QEMU_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(QEMU_MAKE_ENV) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/qextserialport/0001-gui.patch b/package/qextserialport/0001-gui.patch new file mode 100644 index 0000000000..d3dedae824 --- /dev/null +++ b/package/qextserialport/0001-gui.patch @@ -0,0 +1,16 @@ +Don't require Qt GUI module + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) +--- +diff -Nrup qextserialport-f83b4e7ca922e53.orig/qextserialport.pro qextserialport-f83b4e7ca922e53/qextserialport.pro +--- qextserialport-f83b4e7ca922e53.orig/qextserialport.pro 2012-10-17 09:13:53.000000000 +0200 ++++ qextserialport-f83b4e7ca922e53/qextserialport.pro 2012-11-13 22:48:29.249431510 +0100 +@@ -41,6 +41,8 @@ macx:qesp_mac_framework { + + win32|mac:!wince*:!win32-msvc:!macx-xcode:CONFIG += debug_and_release build_all + ++!win32*:!wince*:QT -= gui ++ + #generate proper library name + greaterThan(QT_MAJOR_VERSION, 4) { + QESP_LIB_BASENAME = QtExtSerialPort diff --git a/package/qextserialport/0002-main-include.patch b/package/qextserialport/0002-main-include.patch new file mode 100644 index 0000000000..858f3354d5 --- /dev/null +++ b/package/qextserialport/0002-main-include.patch @@ -0,0 +1,15 @@ +Create a main include file QExtSerialPort + +This main include file will be installed in + so that Qt applications can use this +library by including header files in a Qt-like style. + +Signed-off-by: Thomas Petazzoni + +Index: qextserialport-ef4af2a2ee3f/src/QExtSerialPort +=================================================================== +--- /dev/null ++++ qextserialport-ef4af2a2ee3f/src/QExtSerialPort +@@ -0,0 +1,2 @@ ++#include "qextserialport.h" ++#include "qextserialenumerator.h" diff --git a/package/qextserialport/0003-pkgconfig.patch b/package/qextserialport/0003-pkgconfig.patch new file mode 100644 index 0000000000..d67f3fcbb3 --- /dev/null +++ b/package/qextserialport/0003-pkgconfig.patch @@ -0,0 +1,19 @@ +Add a pkgconfig file to ease usage with applications + +Signed-off-by: Thomas Petazzoni + +Index: qextserialport-ef4af2a2ee3f/qextserialport.pc +=================================================================== +--- /dev/null ++++ qextserialport-ef4af2a2ee3f/qextserialport.pc +@@ -0,0 +1,10 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${prefix}/lib ++includedir=${prefix}/include/QExtSerialPort ++ ++Name: QtExtSerialPort ++Description: QtExtSerialPort library ++Version: 1.2.0 ++Libs: -L${libdir} -lqextserialport ++Cflags: -I${includedir} diff --git a/package/qextserialport/Config.in b/package/qextserialport/Config.in new file mode 100644 index 0000000000..ab05920b20 --- /dev/null +++ b/package/qextserialport/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_QEXTSERIALPORT + bool "qextserialport" + depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5 + help + A Qt library to manage serial ports + + http://code.google.com/p/qextserialport/ diff --git a/package/qextserialport/qextserialport.mk b/package/qextserialport/qextserialport.mk new file mode 100644 index 0000000000..39e04075b7 --- /dev/null +++ b/package/qextserialport/qextserialport.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# qextserialport +# +################################################################################ + +QEXTSERIALPORT_VERSION = ada321a9ee463f628e7b781b8ed00ff219152158 +QEXTSERIALPORT_SITE = $(call github,qextserialport,qextserialport,$(QEXTSERIALPORT_VERSION)) +QEXTSERIALPORT_LICENSE = MIT +QEXTSERIALPORT_LICENSE_FILES = LICENSE.md +QEXTSERIALPORT_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT),y) +QEXTSERIALPORT_DEPENDENCIES += qt +define QEXTSERIALPORT_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(QT_QMAKE)) +endef +else ifeq ($(BR2_PACKAGE_QT5),y) +QEXTSERIALPORT_DEPENDENCIES += qt5base +define QEXTSERIALPORT_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE)) +endef +endif + +define QEXTSERIALPORT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QEXTSERIALPORT_INSTALL_STAGING_CMDS + mkdir -p $(STAGING_DIR)/usr/include/QExtSerialPort + cp $(@D)/src/*.h $(STAGING_DIR)/usr/include/QExtSerialPort/ + cp $(@D)/src/QExtSerialPort $(STAGING_DIR)/usr/include/QExtSerialPort/ + cp -a $(@D)/*.so* $(STAGING_DIR)/usr/lib/ + cp $(@D)/qextserialport.pc $(STAGING_DIR)/usr/lib/pkgconfig/ +endef + +define QEXTSERIALPORT_INSTALL_TARGET_CMDS + cp -a $(@D)/*.so.* $(TARGET_DIR)/usr/lib +endef + +$(eval $(generic-package)) diff --git a/package/qhull/Config.in b/package/qhull/Config.in new file mode 100644 index 0000000000..0a4b60ffbe --- /dev/null +++ b/package/qhull/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_QHULL + bool "qhull" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 # needs gcc >= 4.4 + help + Qhull computes the convex hull, Delaunay triangulation, + Voronoi diagram, halfspace intersection about a point, + furthest-site Delaunay triangulation, and furthest-site + Voronoi diagram. The source code runs in 2-d, 3-d, 4-d, and + higher dimensions. Qhull implements the Quickhull algorithm + for computing the convex hull. It handles roundoff errors + from floating point arithmetic. It computes volumes, surface + areas, and approximations to the convex hull. + + http://www.qhull.org + +comment "qhull needs a toolchain w/ C++, dynamic library, gcc >= 4.4" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 diff --git a/package/qhull/qhull.hash b/package/qhull/qhull.hash new file mode 100644 index 0000000000..4f059f2b5b --- /dev/null +++ b/package/qhull/qhull.hash @@ -0,0 +1,4 @@ +# From http://www.qhull.org/download/qhull-2015.2.md5sum +md5 e6270733a826a6a7c32b796e005ec3dc qhull-2015-src-7.2.0.tgz +# Locally computed +sha256 78b010925c3b577adc3d58278787d7df08f7c8fb02c3490e375eab91bb58a436 qhull-2015-src-7.2.0.tgz diff --git a/package/qhull/qhull.mk b/package/qhull/qhull.mk new file mode 100644 index 0000000000..8ea38f01ad --- /dev/null +++ b/package/qhull/qhull.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# qhull +# +################################################################################ + +QHULL_VERSION = 7.2.0 +QHULL_SITE = http://www.qhull.org/download +QHULL_SOURCE = qhull-2015-src-$(QHULL_VERSION).tgz +QHULL_INSTALL_STAGING = YES +QHULL_LICENSE = BSD-Style +QHULL_LICENSE_FILES = COPYING.txt + +$(eval $(cmake-package)) diff --git a/package/qjson/0001-fix-Qt4-package-error-in-CMakeLists.txt.patch b/package/qjson/0001-fix-Qt4-package-error-in-CMakeLists.txt.patch new file mode 100644 index 0000000000..6f7a9ba237 --- /dev/null +++ b/package/qjson/0001-fix-Qt4-package-error-in-CMakeLists.txt.patch @@ -0,0 +1,29 @@ +From 45ec86156819c0872d023b05001682a8d2d2dc25 Mon Sep 17 00:00:00 2001 +From: Zoltan Gyarmati +Date: Sat, 6 Apr 2013 16:54:25 +0200 +Subject: [PATCH] fix Qt4 package error in CMakeLists.txt + +Avoid checking for uic executable by cmake as it results configure +time error if QtGui isn't installed. + +Signed-off-by: Zoltan Gyarmati +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index adb65e9..81854b1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -52,7 +52,7 @@ IF (Qt5Core_FOUND) + ELSE() + MESSAGE ("Qt5 not found, searching for Qt4") + # Find Qt4 +- FIND_PACKAGE( Qt4 REQUIRED ) ++ FIND_PACKAGE( Qt4 COMPONENTS QtCore REQUIRED ) + + # Include the cmake file needed to use qt4 + INCLUDE( ${QT_USE_FILE} ) +-- +2.1.1 + diff --git a/package/qjson/Config.in b/package/qjson/Config.in new file mode 100644 index 0000000000..0f0cc0983e --- /dev/null +++ b/package/qjson/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_QJSON + bool "qjson" + depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5 + help + QJson is a Qt-based library that maps JSON data to + QVariant objects and vice versa. + + http://qjson.sourceforge.net diff --git a/package/qjson/qjson.mk b/package/qjson/qjson.mk new file mode 100644 index 0000000000..6a1661733d --- /dev/null +++ b/package/qjson/qjson.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# qjson +# +################################################################################ + +QJSON_VERSION = ba273682a9d33a7b3090e74f4742b5f3bf6c9b02 +QJSON_SITE = $(call github,flavio,qjson,$(QJSON_VERSION)) +QJSON_INSTALL_STAGING = YES +QJSON_DEPENDENCIES = \ + $(if $(BR2_PACKAGE_QT),qt) \ + $(if $(BR2_PACKAGE_QT5),qt5base) +QJSON_LICENSE = LGPLv2.1 +QJSON_LICENSE_FILES = COPYING.lib + +$(eval $(cmake-package)) diff --git a/package/qlibc/0001-remove-absolute-paths.patch b/package/qlibc/0001-remove-absolute-paths.patch new file mode 100644 index 0000000000..5976c3c4db --- /dev/null +++ b/package/qlibc/0001-remove-absolute-paths.patch @@ -0,0 +1,19 @@ +Remove absolute paths to host locations + +Signed-off-by: Sagaert Johan + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -85,10 +85,8 @@ + + ## Set path + PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" +-CPPFLAGS="$CPPFLAGS -I/usr/include -I/usr/local/include" + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" + CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +-LDFLAGS="$LDFLAGS -L/usr/lib -L/usr/local/lib" + + ## Set autoconf setting + #AC_CANONICAL_TARGET diff --git a/package/qlibc/0002-obey-destdir.patch b/package/qlibc/0002-obey-destdir.patch new file mode 100644 index 0000000000..02b0bc490f --- /dev/null +++ b/package/qlibc/0002-obey-destdir.patch @@ -0,0 +1,90 @@ +Make sure the Makefile obeys $(DESTDIR) + +Signed-off-by: Thomas Petazzoni + +Index: b/src/Makefile.in +=================================================================== +--- a/src/Makefile.in ++++ b/src/Makefile.in +@@ -120,48 +120,48 @@ + install: ${INSTALL_TARGETS} + + install-qlibc: qlibc +- ${MKDIR_P} ${INST_INCDIR}/qlibc +- ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibc.h ${INST_INCDIR}/qlibc/qlibc.h +- ${MKDIR_P} ${INST_LIBDIR} +- ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBC_LIBNAME} ${INST_LIBDIR}/${QLIBC_LIBNAME} +- ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBC_SLIBREALNAME} ${INST_LIBDIR}/${QLIBC_SLIBREALNAME} +- ( cd ${INST_LIBDIR}; ${LN_S} -f ${QLIBC_SLIBREALNAME} ${QLIBC_SLIBNAME} ) ++ ${MKDIR_P} ${DESTDIR}/${INST_INCDIR}/qlibc ++ ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibc.h ${DESTDIR}/${INST_INCDIR}/qlibc/qlibc.h ++ ${MKDIR_P} ${DESTDIR}/${INST_LIBDIR} ++ ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBC_LIBNAME} ${DESTDIR}/${INST_LIBDIR}/${QLIBC_LIBNAME} ++ ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBC_SLIBREALNAME} ${DESTDIR}/${INST_LIBDIR}/${QLIBC_SLIBREALNAME} ++ ( cd ${DESTDIR}/${INST_LIBDIR}; ${LN_S} -f ${QLIBC_SLIBREALNAME} ${QLIBC_SLIBNAME} ) + + uninstall-qlibc: +- ${RM} -f ${INST_INCDIR}/qlibc/qlibc.h +- ${RM} -f ${INST_LIBDIR}/${QLIBC_LIBNAME} +- ${RM} -f ${INST_LIBDIR}/${QLIBC_SLIBREALNAME} +- ${RM} -f ${INST_LIBDIR}/${QLIBC_SLIBNAME} ++ ${RM} -f ${DESTDIR}/${INST_INCDIR}/qlibc/qlibc.h ++ ${RM} -f ${DESTDIR}/${INST_LIBDIR}/${QLIBC_LIBNAME} ++ ${RM} -f ${DESTDIR}/${INST_LIBDIR}/${QLIBC_SLIBREALNAME} ++ ${RM} -f ${DESTDIR}/${INST_LIBDIR}/${QLIBC_SLIBNAME} + + install-qlibcext: qlibcext +- ${MKDIR_P} ${INST_INCDIR}/qlibc +- ${MKDIR_P} ${INST_INCDIR}/qlibc/qlibcext/ +- ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext.h ${INST_INCDIR}/qlibc/qlibcext.h +- ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext/qconfig.h ${INST_INCDIR}/qlibc/qlibcext/qconfig.h +- ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext/qaconf.h ${INST_INCDIR}/qlibc/qlibcext/qaconf.h +- ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext/qlog.h ${INST_INCDIR}/qlibc/qlibcext/qlog.h +- ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext/qhttpclient.h ${INST_INCDIR}/qlibc/qlibcext/qhttpclient.h +- ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext/qdatabase.h ${INST_INCDIR}/qlibc/qlibcext/qdatabase.h +- ${MKDIR_P} ${INST_LIBDIR} +- ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBCEXT_LIBNAME} ${INST_LIBDIR}/${QLIBCEXT_LIBNAME} +- ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBCEXT_SLIBREALNAME} ${INST_LIBDIR}/${QLIBCEXT_SLIBREALNAME} +- ( cd ${INST_LIBDIR}; ${LN_S} -f ${QLIBCEXT_SLIBREALNAME} ${QLIBCEXT_SLIBNAME} ) ++ ${MKDIR_P} ${DESTDIR}/${INST_INCDIR}/qlibc ++ ${MKDIR_P} ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext/ ++ ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext.h ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext.h ++ ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext/qconfig.h ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext/qconfig.h ++ ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext/qaconf.h ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext/qaconf.h ++ ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext/qlog.h ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext/qlog.h ++ ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext/qhttpclient.h ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext/qhttpclient.h ++ ${INSTALL_DATA} ${QLIBC_INCDIR}/qlibcext/qdatabase.h ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext/qdatabase.h ++ ${MKDIR_P} ${DESTDIR}/${INST_LIBDIR} ++ ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBCEXT_LIBNAME} ${DESTDIR}/${INST_LIBDIR}/${QLIBCEXT_LIBNAME} ++ ${INSTALL_DATA} ${QLIBC_LIBDIR}/${QLIBCEXT_SLIBREALNAME} ${DESTDIR}/${INST_LIBDIR}/${QLIBCEXT_SLIBREALNAME} ++ ( cd ${DESTDIR}/${INST_LIBDIR}; ${LN_S} -f ${QLIBCEXT_SLIBREALNAME} ${QLIBCEXT_SLIBNAME} ) + + uninstall-qlibcext: +- ${RM} -f ${INST_INCDIR}/qlibc/qlibcext.h +- ${RM} -f ${INST_INCDIR}/qlibc/qlibcext/qconfig.h +- ${RM} -f ${INST_INCDIR}/qlibc/qlibcext/qaconf.h +- ${RM} -f ${INST_INCDIR}/qlibc/qlibcext/qlog.h +- ${RM} -f ${INST_INCDIR}/qlibc/qlibcext/qhttpclient.h +- ${RM} -f ${INST_INCDIR}/qlibc/qlibcext/qdatabase.h +- ${RM} -f ${INST_LIBDIR}/${QLIBCEXT_LIBNAME} +- ${RM} -f ${INST_LIBDIR}/${QLIBCEXT_SLIBREALNAME} +- ${RM} -f ${INST_LIBDIR}/${QLIBCEXT_SLIBNAME} ++ ${RM} -f ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext.h ++ ${RM} -f ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext/qconfig.h ++ ${RM} -f ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext/qaconf.h ++ ${RM} -f ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext/qlog.h ++ ${RM} -f ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext/qhttpclient.h ++ ${RM} -f ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext/qdatabase.h ++ ${RM} -f ${DESTDIR}/${INST_LIBDIR}/${QLIBCEXT_LIBNAME} ++ ${RM} -f ${DESTDIR}/${INST_LIBDIR}/${QLIBCEXT_SLIBREALNAME} ++ ${RM} -f ${DESTDIR}/${INST_LIBDIR}/${QLIBCEXT_SLIBNAME} + + deinstall: uninstall + uninstall: uninstall-qlibc uninstall-qlibcext +- ${RMDIR} ${INST_INCDIR}/qlibc/qlibcext +- ${RMDIR} ${INST_INCDIR}/qlibc ++ ${RMDIR} ${DESTDIR}/${INST_INCDIR}/qlibc/qlibcext ++ ${RMDIR} ${DESTDIR}/${INST_INCDIR}/qlibc + + clean: + ${RM} -f ${QLIBC_OBJS} diff --git a/package/qlibc/0003-fix-openssl-mysql-checks.patch b/package/qlibc/0003-fix-openssl-mysql-checks.patch new file mode 100644 index 0000000000..bb609b2446 --- /dev/null +++ b/package/qlibc/0003-fix-openssl-mysql-checks.patch @@ -0,0 +1,36 @@ +Allow to explicitly disable openssl and mysql + +AC_ARG_WITH() is being incorrectly used: the third argument indicates +the action that needs to be taken when a value was passed, when not +the option is enabled. Therefore, the result of the existing code was +that when you passed --without-mysql or --without-openssl, the +$withval variable would get the value 'yes', which is obviously wrong. + +Instead, we simply empty this third argument, because $withval is +already properly filled with 'yes' or 'no' by the AC_ARG_WITH() +function. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -170,7 +170,7 @@ + ## --with section + ## + +-AC_ARG_WITH([openssl],[AS_HELP_STRING([--with-openssl], [This will enable HTTPS support in qhttpclient extension API. When it's enabled, user applications will need to link openssl library with -lssl option.])],[withval=yes],[withval=no]) ++AC_ARG_WITH([openssl],[AS_HELP_STRING([--with-openssl], [This will enable HTTPS support in qhttpclient extension API. When it's enabled, user applications will need to link openssl library with -lssl option.])],[],[withval=no]) + if test "$withval" = yes; then + if test "$with_openssl" = yes; then + with_openssl="/usr/include" +@@ -185,7 +185,7 @@ + fi + fi + +-AC_ARG_WITH([mysql],[AS_HELP_STRING([--with-mysql], [This will enable MySQL database support in qdatabase extension API. When it's enabled, user applications need to link mysql client library. (ex: -lmysqlclient)])],[withval=yes],[withval=no]) ++AC_ARG_WITH([mysql],[AS_HELP_STRING([--with-mysql], [This will enable MySQL database support in qdatabase extension API. When it's enabled, user applications need to link mysql client library. (ex: -lmysqlclient)])],[],[withval=no]) + if test "$withval" = yes; then + if test "$with_mysql" = yes; then + with_mysql="/usr/include/mysql" diff --git a/package/qlibc/0004-md5-fix-musl-build-by-removing-usage-of-internal-gli.patch b/package/qlibc/0004-md5-fix-musl-build-by-removing-usage-of-internal-gli.patch new file mode 100644 index 0000000000..2ce37572c0 --- /dev/null +++ b/package/qlibc/0004-md5-fix-musl-build-by-removing-usage-of-internal-gli.patch @@ -0,0 +1,60 @@ +From fe45b18f777b1414aee908f08f56a5730a00dbb5 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 21 May 2016 09:59:56 +0200 +Subject: [PATCH 1/1] md5: fix musl build by removing usage of internal glibc + header sys/cdefs.h + +As suggested in musl FAQ: +http://wiki.musl-libc.org/wiki/FAQ#Q:_I.27m_trying_to_compile_something_against_musl_and_I_get_error_messages_about_sys.2Fcdefs.h + +Signed-off-by: Bernd Kuhls +(Patch for master branch sent upstream: + https://github.com/wolkykim/qlibc/pull/53, + this patch is a backport for v2.1.6) +--- + src/internal/md5/md5.h | 10 ++++++---- + src/internal/md5/md5c.c | 1 - + 2 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/src/internal/md5/md5.h b/src/internal/md5/md5.h +index cbfa7ca..8e726fe 100644 +--- a/src/internal/md5/md5.h ++++ b/src/internal/md5/md5.h +@@ -35,9 +35,9 @@ typedef struct MD5Context { + unsigned char buffer[64]; /* input buffer */ + } MD5_CTX; + +-#include +- +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + void MD5Init (MD5_CTX *); + void MD5Update (MD5_CTX *, const unsigned char *, unsigned int); + void MD5Final (unsigned char[16], MD5_CTX *); +@@ -45,6 +45,8 @@ char * MD5End(MD5_CTX *, char *); + char * MD5File(const char *, char *); + char * MD5FileChunk(const char *, char *, off_t, off_t); + char * MD5Data(const unsigned char *, unsigned int, char *); +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* Q_MD5_H */ +diff --git a/src/internal/md5/md5c.c b/src/internal/md5/md5c.c +index de9e47f..040bf5e 100644 +--- a/src/internal/md5/md5c.c ++++ b/src/internal/md5/md5c.c +@@ -26,7 +26,6 @@ + * edited for clarity and style only. + */ + +-#include + #include + #include + #include "md5.h" +-- +2.8.1 + diff --git a/package/qlibc/Config.in b/package/qlibc/Config.in new file mode 100644 index 0000000000..170da4940f --- /dev/null +++ b/package/qlibc/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_QLIBC + bool "qlibc" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR + depends on !BR2_STATIC_LIBS + help + qLibc is currently one of the most functionally complete + public licensed C/C++ libraries. The C/C++ library which + includes all kinds of containers and general library + routines. It provides ready-made set of common container + APIs with consistant API look. + + https://github.com/wolkykim/qlibc + +comment "qlibc needs a toolchain w/ threads, wchar, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR || BR2_STATIC_LIBS diff --git a/package/qlibc/qlibc.mk b/package/qlibc/qlibc.mk new file mode 100644 index 0000000000..6a747e4e62 --- /dev/null +++ b/package/qlibc/qlibc.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# qlibc +# +################################################################################ + +QLIBC_VERSION = v2.1.6 +QLIBC_SITE = $(call github,wolkykim,qlibc,$(QLIBC_VERSION)) +QLIBC_LICENSE = BSD-2c +QLIBC_LICENSE_FILES = COPYING + +# We're patching configure.ac +QLIBC_AUTORECONF = YES +QLIBC_INSTALL_STAGING = YES +QLIBC_DEPENDENCIES = $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +# The configure.ac checks for these use AC_CHECK_FILE() which doesn't +# work for cross-compilation. If someone wants to enable the support +# for OpenSSL or MySQL, some changes to the configure.ac will be +# needed. +QLIBC_CONF_OPTS = --without-mysql --without-openssl + +$(eval $(autotools-package)) diff --git a/package/qpdf/Config.in b/package/qpdf/Config.in new file mode 100644 index 0000000000..e8ab9ba969 --- /dev/null +++ b/package/qpdf/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_QPDF + bool "qpdf" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_ZLIB + help + QPDF is a command-line program that does structural, content- + preserving transformations on PDF files. It could have been called + something like pdf-to-pdf. It also provides many useful capabilities + to developers of PDF-producing software or for people who just want + to look at the innards of a PDF file to learn more about how they + work. + + http://qpdf.sourceforge.net/ + +comment "qpdf needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/qpdf/qpdf.hash b/package/qpdf/qpdf.hash new file mode 100644 index 0000000000..c882708b52 --- /dev/null +++ b/package/qpdf/qpdf.hash @@ -0,0 +1,4 @@ +# From http://sourceforge.net/projects/qpdf/files/qpdf/6.0.0/qpdf-6.0.0.sha1/download +sha1 15ebe09d9b9ddd2309a67e4295693fcf82494e33 qpdf-6.0.0.tar.gz +# Locally computed +sha256 a9fdc7e94d38fcd3831f37b6e0fe36492bf79aa6d54f8f66062cf7f9c4155233 qpdf-6.0.0.tar.gz diff --git a/package/qpdf/qpdf.mk b/package/qpdf/qpdf.mk new file mode 100644 index 0000000000..9601f98542 --- /dev/null +++ b/package/qpdf/qpdf.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# qpdf +# +################################################################################ + +QPDF_VERSION = 6.0.0 +QPDF_SITE = http://downloads.sourceforge.net/project/qpdf/qpdf/$(QPDF_VERSION) +QPDF_INSTALL_STAGING = YES +QPDF_LICENSE = Artistic-2.0 +QPDF_LICENSE_FILES = Artistic-2.0 +QPDF_DEPENDENCIES = pcre zlib + +QPDF_CONF_OPTS = --without-random + +$(eval $(autotools-package)) diff --git a/package/qpid-proton/Config.in b/package/qpid-proton/Config.in new file mode 100644 index 0000000000..f8aaf395fa --- /dev/null +++ b/package/qpid-proton/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_QPID_PROTON + bool "qpid-proton" + depends on !BR2_STATIC_LIBS # build a shared library + depends on BR2_USE_WCHAR # util-linux + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + The AMQP messaging toolkit + + Qpid Proton is a high-performance, lightweight messaging library. + It can be used in the widest range of messaging applications, + including brokers, client libraries, routers, bridges, proxies, and + more. + + https://qpid.apache.org/proton/ + +comment "qpid-proton needs a toolchain w/ dynamic library, wchar" + depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR diff --git a/package/qpid-proton/qpid-proton.hash b/package/qpid-proton/qpid-proton.hash new file mode 100644 index 0000000000..8c2cc4f350 --- /dev/null +++ b/package/qpid-proton/qpid-proton.hash @@ -0,0 +1,2 @@ +# Hash from: http://www.apache.org/dist/qpid/proton/0.9.1/qpid-proton-0.9.1.tar.gz.sha +sha1 98008d90acd0d47cbd7ac1572a2bb50b452338ed qpid-proton-0.9.1.tar.gz diff --git a/package/qpid-proton/qpid-proton.mk b/package/qpid-proton/qpid-proton.mk new file mode 100644 index 0000000000..2e8c1d0e92 --- /dev/null +++ b/package/qpid-proton/qpid-proton.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# qpid-proton +# +################################################################################ + +QPID_PROTON_VERSION = 0.9.1 +QPID_PROTON_SITE = http://apache.panu.it/qpid/proton/$(QPID_PROTON_VERSION) +QPID_PROTON_STRIP_COMPONENTS = 2 +QPID_PROTON_LICENSE = Apache-2.0 +QPID_PROTON_LICENSE_FILES = LICENSE +QPID_PROTON_INSTALL_STAGING = YES +QPID_PROTON_DEPENDENCIES = \ + host-python \ + util-linux \ + $(if $(BR2_PACKAGE_OPENSSL),openssl) + +# Language bindings are enabled when host-swig tool is present in HOST_DIR. +# For now, disable all of them. +QPID_PROTON_CONF_OPTS = \ + -DBUILD_JAVA=OFF \ + -DBUILD_JAVASCRIPT=OFF \ + -DBUILD_PERL=OFF \ + -DBUILD_PHP=OFF \ + -DBUILD_PYTHON=OFF \ + -DBUILD_RUBY=OFF \ + -DENABLE_VALGRIND=OFF \ + -DENABLE_WARNING_ERROR=OFF \ + -DPYTHON_EXECUTABLE=$(HOST_DIR)/usr/bin/python2 + +define QPID_PROTON_REMOVE_USELESS_FILES + rm -fr $(TARGET_DIR)/usr/share/proton-*/ +endef + +QPID_PROTON_POST_INSTALL_TARGET_HOOKS += QPID_PROTON_REMOVE_USELESS_FILES + +$(eval $(cmake-package)) diff --git a/package/qt-webkit-kiosk/Config.in b/package/qt-webkit-kiosk/Config.in new file mode 100644 index 0000000000..32952d7c50 --- /dev/null +++ b/package/qt-webkit-kiosk/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_QT_WEBKIT_KIOSK + bool "qt-webkit-kiosk" + depends on BR2_PACKAGE_QT5 + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_QT5BASE_WIDGETS + select BR2_PACKAGE_QT5WEBKIT + select BR2_PACKAGE_QT5MULTIMEDIA + depends on !BR2_STATIC_LIBS # qt5webkit + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE # qt5webkit + depends on !BR2_BINFMT_FLAT # qt5webkit + help + Simple kiosk-mode browser powered by Qt5Webkit + +if BR2_PACKAGE_QT_WEBKIT_KIOSK + +config BR2_PACKAGE_QT_WEBKIT_KIOSK_SOUNDS + bool "Install browser sound files" + help + Deploy browser sound files on target + +endif diff --git a/package/qt-webkit-kiosk/qt-webkit-kiosk.mk b/package/qt-webkit-kiosk/qt-webkit-kiosk.mk new file mode 100644 index 0000000000..d54c8d5eb7 --- /dev/null +++ b/package/qt-webkit-kiosk/qt-webkit-kiosk.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# qt-webkit-kiosk +# +################################################################################ + +QT_WEBKIT_KIOSK_VERSION = 7fe40a350abfbe5ec194e7c6c740f7099e8704cd +QT_WEBKIT_KIOSK_SITE = https://github.com/sergey-dryabzhinsky/qt-webkit-kiosk.git +QT_WEBKIT_KIOSK_SITE_METHOD = git +QT_WEBKIT_KIOSK_DEPENDENCIES = qt5webkit qt5multimedia +QT_WEBKIT_KIOSK_LICENSE = LGPLv3 +QT_WEBKIT_KIOSK_LICENSE_FILES = doc/lgpl.html + +define QT_WEBKIT_KIOSK_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE) PREFIX=/usr) +endef + +define QT_WEBKIT_KIOSK_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT_WEBKIT_KIOSK_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src -f Makefile.qt-webkit-kiosk \ + INSTALL_ROOT=$(TARGET_DIR) \ + install_target + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + INSTALL_ROOT=$(TARGET_DIR) \ + install_config \ + $(if $(BR2_PACKAGE_QT_WEBKIT_KIOSK_SOUNDS),install_sound) +endef + +$(eval $(generic-package)) diff --git a/package/qt/0001-configure.patch b/package/qt/0001-configure.patch new file mode 100644 index 0000000000..07c9630c90 --- /dev/null +++ b/package/qt/0001-configure.patch @@ -0,0 +1,52 @@ +Fix -hostprefix behaviour + +When -hostprefix ./configure option is used, Qt installs all its +headers, libraries and binaries inside the given host prefix, instead +of the prefix. This is used by Buildroot to make sure that all Qt +libraries and headers are installed in $(STAGING_DIR). + +Qt ./configure script also allows to tune the installation location of +various elements, for examples the plugins through the -plugindir +option. Unfortunately, this option only impact the installation path +on the target, but not on the host when -hostprefix is used. + +This patch modifies Qt ./configure script so that HOST_*PATH_STR +variables are composed of the host prefix concatenated with the path +of installation on the target. This way, the plugin installation local +in the $(STAGING_DIR) and on the target remains the same. + +Signed-off-by: Thomas Petazzoni + +--- + configure | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +Index: qt-everywhere-opensource-src-4.8.1/configure +=================================================================== +--- qt-everywhere-opensource-src-4.8.1.orig/configure ++++ qt-everywhere-opensource-src-4.8.1/configure +@@ -4661,15 +4661,15 @@ + + + if [ ! -z "$QT_HOST_PREFIX" ]; then +- HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX"` +- HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/doc"` +- HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/include"` +- HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/lib"` +- HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/bin"` +- HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/plugins"` +- HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/IMPORTS"` +- HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX"` +- HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/translations"` ++ HOSTPREFIX_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_prfxpath=$QT_HOST_PREFIX/$QT_INSTALL_PREFIX"` ++ HOSTDOCUMENTATION_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_docspath=$QT_HOST_PREFIX/$QT_INSTALL_DOCS"` ++ HOSTHEADERS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_hdrspath=$QT_HOST_PREFIX/$QT_INSTALL_HEADERS"` ++ HOSTLIBRARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_libspath=$QT_HOST_PREFIX/$QT_INSTALL_LIBS"` ++ HOSTBINARIES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_binspath=$QT_HOST_PREFIX/$QT_INSTALL_BINS"` ++ HOSTPLUGINS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_plugpath=$QT_HOST_PREFIX/$QT_INSTALL_PLUGINS"` ++ HOSTIMPORTS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_impspath=$QT_HOST_PREFIX/$QT_INSTALL_IMPORTS"` ++ HOSTDATA_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_datapath=$QT_HOST_PREFIX/$QT_INSTALL_DATA"` ++ HOSTTRANSLATIONS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_trnspath=$QT_HOST_PREFIX/$QT_INSTALL_TRANSLATIONS"` + HOSTSETTINGS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_stngpath=$QT_INSTALL_SETTINGS"` + HOSTEXAMPLES_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_xmplpath=$QT_INSTALL_EXAMPLES"` + HOSTDEMOS_PATH_STR=`"$relpath/config.tests/unix/padstring" 268 "qt_demopath=$QT_INSTALL_DEMOS"` diff --git a/package/qt/0002-eglwsegl-use-system.patch b/package/qt/0002-eglwsegl-use-system.patch new file mode 100644 index 0000000000..cb3038138f --- /dev/null +++ b/package/qt/0002-eglwsegl-use-system.patch @@ -0,0 +1,802 @@ +Patch to remove obsolete powervr headers and instead use the headers provided +on the system. + +Signed-off-by: Spenser Gilliland +--- +Index: qt-4.8.5/src/3rdparty/powervr/pvr2d.h +=================================================================== +--- qt-4.8.5.orig/src/3rdparty/powervr/pvr2d.h 2013-07-08 11:24:33.010516867 -0500 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,502 +0,0 @@ +-/*!**************************************************************************** +-@File pvr2d.h +-@Title PVR2D external header file +-@Author Imagination Technologies +-@Copyright Copyright (c) by Imagination Technologies Limited. +- This specification is protected by copyright laws and contains +- material proprietary to Imagination Technologies Limited. +- You may use and distribute this specification free of charge for implementing +- the functionality therein, without altering or removing any trademark, copyright, +- or other notice from the specification. +-@Platform Generic +-@Description PVR2D definitions for PVR2D clients +-******************************************************************************/ +- +- +-/****************************************************************************** +-Modifications :- +-$Log: pvr2d.h $ +-******************************************************************************/ +- +-#ifndef _PVR2D_H_ +-#define _PVR2D_H_ +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-/* PVR2D Platform-specific definitions */ +-#define PVR2D_EXPORT +-#define PVR2D_IMPORT +- +- +-#define PVR2D_REV_MAJOR 2 +-#define PVR2D_REV_MINOR 1 +- +-typedef enum +-{ +- PVR2D_FALSE = 0, +- PVR2D_TRUE +-} PVR2D_BOOL; +- +- +-/* error codes */ +-typedef enum +-{ +- PVR2D_OK = 0, +- PVR2DERROR_INVALID_PARAMETER = -1, +- PVR2DERROR_DEVICE_UNAVAILABLE = -2, +- PVR2DERROR_INVALID_CONTEXT = -3, +- PVR2DERROR_MEMORY_UNAVAILABLE = -4, +- PVR2DERROR_DEVICE_NOT_PRESENT = -5, +- PVR2DERROR_IOCTL_ERROR = -6, +- PVR2DERROR_GENERIC_ERROR = -7, +- PVR2DERROR_BLT_NOTCOMPLETE = -8, +- PVR2DERROR_HW_FEATURE_NOT_SUPPORTED = -9, +- PVR2DERROR_NOT_YET_IMPLEMENTED = -10, +- PVR2DERROR_MAPPING_FAILED = -11 +-}PVR2DERROR; +- +- +-/* pixel formats */ +-typedef enum +-{ +- PVR2D_1BPP = 0, +- PVR2D_RGB565, +- PVR2D_ARGB4444, +- PVR2D_RGB888, +- PVR2D_ARGB8888, +- PVR2D_ARGB1555, +- PVR2D_ALPHA8, +- PVR2D_ALPHA4, +- PVR2D_PAL2, +- PVR2D_PAL4, +- PVR2D_PAL8, +- PVR2D_VGAEMU +- +-}PVR2DFORMAT; +- +- +-/* wrap surface type */ +-typedef enum +-{ +- PVR2D_WRAPFLAG_NONCONTIGUOUS = 0, +- PVR2D_WRAPFLAG_CONTIGUOUS = 1, +- +-}PVR2DWRAPFLAGS; +- +-/* flags for control information of additional blits */ +-typedef enum +-{ +- PVR2D_BLIT_DISABLE_ALL = 0x0000, /* disable all additional controls */ +- PVR2D_BLIT_CK_ENABLE = 0x0001, /* enable colour key */ +- PVR2D_BLIT_GLOBAL_ALPHA_ENABLE = 0x0002, /* enable standard global alpha */ +- PVR2D_BLIT_PERPIXEL_ALPHABLEND_ENABLE = 0x0004, /* enable per-pixel alpha bleding */ +- PVR2D_BLIT_PAT_SURFACE_ENABLE = 0x0008, /* enable pattern surf (disable fill) */ +- PVR2D_BLIT_FULLY_SPECIFIED_ALPHA_ENABLE = 0x0010, /* enable fully specified alpha */ +- PVR2D_BLIT_ROT_90 = 0x0020, /* apply 90 degree rotation to the blt */ +- PVR2D_BLIT_ROT_180 = 0x0040, /* apply 180 degree rotation to the blt */ +- PVR2D_BLIT_ROT_270 = 0x0080, /* apply 270 degree rotation to the blt */ +- PVR2D_BLIT_COPYORDER_TL2BR = 0x0100, /* copy order overrides */ +- PVR2D_BLIT_COPYORDER_BR2TL = 0x0200, +- PVR2D_BLIT_COPYORDER_TR2BL = 0x0400, +- PVR2D_BLIT_COPYORDER_BL2TR = 0x0800, +- PVR2D_BLIT_COLKEY_SOURCE = 0x1000, /* Key colour is on the source surface */ +- PVR2D_BLIT_COLKEY_DEST = 0x2000 /* Key colour is on the destination surface */ +- +-} PVR2DBLITFLAGS; +- +-/* standard alpha-blending functions, AlphaBlendingFunc field of PVR2DBLTINFO */ +-typedef enum +-{ +- PVR2D_ALPHA_OP_SRC_DSTINV = 1, /* source alpha : Cdst = Csrc*Asrc + Cdst*(1-Asrc) */ +- PVR2D_ALPHA_OP_SRCP_DSTINV = 2 /* premultiplied source alpha : Cdst = Csrc + Cdst*(1-Asrc) */ +-} PVR2D_ALPHABLENDFUNC; +- +-/* blend ops for fully specified alpha */ +-typedef enum +-{ +- PVR2D_BLEND_OP_ZERO = 0, +- PVR2D_BLEND_OP_ONE = 1, +- PVR2D_BLEND_OP_SRC = 2, +- PVR2D_BLEND_OP_DST = 3, +- PVR2D_BLEND_OP_GLOBAL = 4, +- PVR2D_BLEND_OP_SRC_PLUS_GLOBAL = 5, +- PVR2D_BLEND_OP_DST_PLUS_GLOBAL = 6 +-}PVR2D_BLEND_OP; +- +- +-typedef void* PVR2D_HANDLE; +- +- +-/* Fully specified alpha blend : pAlpha field of PVR2DBLTINFO structure */ +-/* a fully specified Alpha Blend operation is defined as */ +-/* DST (ALPHA) = (ALPHA_1 * SRC (ALPHA)) + (ALPHA_3 * DST (ALPHA)) */ +-/* DST (RGB) = (ALPHA_2 * SRC (RGB)) + (ALPHA_4 * DST (RGB)) */ +-/* if the pre-multiplication stage is enabled then the equations become the following: */ +-/* PRE_MUL = ((SRC(A)) * (Global Alpha Value)) */ +-/* DST (ALPHA) = (ALPHA_1 * SRC (ALPHA)) + (PRE_MUL * DST (ALPHA)) */ +-/* DST (RGB) = (ALPHA_2 * SRC (RGB)) + (PRE_MUL * DST (RGB)) */ +-/* if the transparent source alpha stage is enabled then a source alpha of zero forces the */ +-/* source to be transparent for that pixel regardless of the blend equation being used. */ +-typedef struct _PVR2D_ALPHABLT +-{ +- PVR2D_BLEND_OP eAlpha1; +- PVR2D_BOOL bAlpha1Invert; +- PVR2D_BLEND_OP eAlpha2; +- PVR2D_BOOL bAlpha2Invert; +- PVR2D_BLEND_OP eAlpha3; +- PVR2D_BOOL bAlpha3Invert; +- PVR2D_BLEND_OP eAlpha4; +- PVR2D_BOOL bAlpha4Invert; +- PVR2D_BOOL bPremulAlpha; /* enable pre-multiplication stage */ +- PVR2D_BOOL bTransAlpha; /* enable transparent source alpha stage */ +- PVR2D_BOOL bUpdateAlphaLookup; /* enable and update the 1555-Lookup alpha table */ +- unsigned char uAlphaLookup0; /* 8 bit alpha when A=0 in a 1555-Lookup surface */ +- unsigned char uAlphaLookup1; /* 8 bit alpha when A=1 in a 1555-Lookup surface */ +- unsigned char uGlobalRGB; /* Global Alpha Value for RGB, 0=transparent 255=opaque */ +- unsigned char uGlobalA; /* Global Alpha Value for Alpha */ +- +-} PVR2D_ALPHABLT, *PPVR2D_ALPHABLT; +- +- +-/* surface memory info structure */ +-typedef struct _PVR2DMEMINFO +-{ +- void *pBase; +- unsigned long ui32MemSize; +- unsigned long ui32DevAddr; +- unsigned long ulFlags; +- void *hPrivateData; +- void *hPrivateMapData; +- +-}PVR2DMEMINFO, *PPVR2DMEMINFO; +- +- +-#define PVR2D_MAX_DEVICE_NAME 20 +- +-typedef struct _PVR2DDEVICEINFO +-{ +- unsigned long ulDevID; +- char szDeviceName[PVR2D_MAX_DEVICE_NAME]; +-}PVR2DDEVICEINFO; +- +- +-typedef struct _PVR2DISPLAYINFO +-{ +- unsigned long ulMaxFlipChains; +- unsigned long ulMaxBuffersInChain; +- PVR2DFORMAT eFormat; +- unsigned long ulWidth; +- unsigned long ulHeight; +- long lStride; +- unsigned long ulMinFlipInterval; +- unsigned long ulMaxFlipInterval; +- +-}PVR2DDISPLAYINFO; +- +- +-typedef struct _PVR2DBLTINFO +-{ +- unsigned long CopyCode; /* rop code */ +- unsigned long Colour; /* fill colour */ +- unsigned long ColourKey; /* colour key */ +- unsigned char GlobalAlphaValue; /* global alpha blending */ +- unsigned char AlphaBlendingFunc; /* per-pixel alpha-blending function */ +- +- PVR2DBLITFLAGS BlitFlags; /* additional blit control information */ +- +- PVR2DMEMINFO *pDstMemInfo; /* destination memory */ +- unsigned long DstOffset; /* byte offset from start of allocation to destination surface pixel 0,0 */ +- long DstStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */ +- long DstX, DstY; /* pixel offset from start of dest surface to start of blt rectangle */ +- long DSizeX,DSizeY; /* blt size */ +- PVR2DFORMAT DstFormat; /* dest format */ +- unsigned long DstSurfWidth; /* size of dest surface in pixels */ +- unsigned long DstSurfHeight; /* size of dest surface in pixels */ +- +- PVR2DMEMINFO *pSrcMemInfo; /* source mem, (source fields are also used for patterns) */ +- unsigned long SrcOffset; /* byte offset from start of allocation to src/pat surface pixel 0,0 */ +- long SrcStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */ +- long SrcX, SrcY; /* pixel offset from start of surface to start of source rectangle */ +- /* for patterns this is the start offset within the pattern */ +- long SizeX,SizeY; /* source rectangle size or pattern size in pixels */ +- PVR2DFORMAT SrcFormat; /* source/pattern format */ +- PVR2DMEMINFO *pPalMemInfo; /* source/pattern palette memory containing argb8888 colour table */ +- unsigned long PalOffset; /* byte offset from start of allocation to start of palette */ +- unsigned long SrcSurfWidth; /* size of source surface in pixels */ +- unsigned long SrcSurfHeight; /* size of source surface in pixels */ +- +- PVR2DMEMINFO *pMaskMemInfo; /* mask memory, 1bpp format implied */ +- unsigned long MaskOffset; /* byte offset from start of allocation to mask surface pixel 0,0 */ +- long MaskStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */ +- long MaskX, MaskY; /* mask rect top left (mask size = blt size) */ +- unsigned long MaskSurfWidth; /* size of mask surface in pixels */ +- unsigned long MaskSurfHeight; /* size of mask surface in pixels */ +- +- PPVR2D_ALPHABLT pAlpha; /* fully specified alpha blend */ +- +-}PVR2DBLTINFO, *PPVR2DBLTINFO; +- +-typedef struct _PVR2DRECT +-{ +- long left, top; +- long right, bottom; +-} PVR2DRECT; +- +-typedef struct +-{ +- PVR2DMEMINFO *pSurfMemInfo; /* surface memory */ +- unsigned long SurfOffset; /* byte offset from start of allocation to destination surface pixel 0,0 */ +- long Stride; /* signed stride */ +- PVR2DFORMAT Format; +- unsigned long SurfWidth; /* surface size in pixels */ +- unsigned long SurfHeight; +- +-} PVR2D_SURFACE, *PPVR2D_SURFACE; +- +-typedef struct +-{ +- unsigned long *pUseCode; /* USSE code */ +- unsigned long UseCodeSize; /* usse code size in bytes */ +- +-} PVR2D_USECODE, *PPVR2D_USECODE; +- +-typedef struct +-{ +- PVR2D_SURFACE sDst; /* destination surface */ +- PVR2D_SURFACE sSrc; /* source surface */ +- PVR2DRECT rcDest; /* destination rectangle */ +- PVR2DRECT rcSource; /* source rectangle */ +- PVR2D_HANDLE hUseCode; /* custom USE code (NULL implies source copy) */ +- unsigned long UseParams[2]; /* per-blt params for use code */ +- +-} PVR2D_3DBLT, *PPVR2D_3DBLT; +- +- +-#define MAKE_COPY_BLIT(src,soff,dest,doff,sx,sy,dx,dy,sz) +- +-typedef void* PVR2DCONTEXTHANDLE; +-typedef void* PVR2DFLIPCHAINHANDLE; +- +- +-// CopyCode field of PVR2DBLTINFO structure: +-// the CopyCode field of the PVR2DBLTINFO structure should contain a rop3 or rop4 code. +-// a rop3 is an 8 bit code that describes a blt with three inputs : source dest and pattern +-// rop4 is a 16 bit code that describes a blt with four inputs : source dest pattern and mask +-// common rop3 codes are defined below +-// a colour fill blt is processed in the pattern channel as a constant colour with a rop code of 0xF0 +-// PVR2D_BLIT_PAT_SURFACE_ENABLE defines whether the pattern channel is a surface or a fill colour. +-// a rop4 is defined by two rop3 codes, and the 1 bit-per-pixel mask surface defines which is used. +-// a common rop4 is 0xAAF0 which is the mask copy blt used for text glyphs. +-// CopyCode is taken to be a rop4 when pMaskMemInfo is non zero, otherwise it is assumed to be a rop3 +-// use the PVR2DMASKROP4 macro below to construct a rop4 from two rop3's +-// rop3a is the rop used when mask pixel = 1, and rop3b when mask = 0 +-#define PVR2DROP4(rop3b, rop3a) ((rop3b<<8)|rop3a) +- +-/* common rop codes */ +-#define PVR2DROPclear 0x00 /* 0 (whiteness) */ +-#define PVR2DROPset 0xFF /* 1 (blackness) */ +-#define PVR2DROPnoop 0xAA /* dst (used for masked blts) */ +- +-/* source and dest rop codes */ +-#define PVR2DROPand 0x88 /* src AND dst */ +-#define PVR2DROPandReverse 0x44 /* src AND NOT dst */ +-#define PVR2DROPcopy 0xCC /* src (used for source copy and alpha blts) */ +-#define PVR2DROPandInverted 0x22 /* NOT src AND dst */ +-#define PVR2DROPxor 0x66 /* src XOR dst */ +-#define PVR2DROPor 0xEE /* src OR dst */ +-#define PVR2DROPnor 0x11 /* NOT src AND NOT dst */ +-#define PVR2DROPequiv 0x99 /* NOT src XOR dst */ +-#define PVR2DROPinvert 0x55 /* NOT dst */ +-#define PVR2DROPorReverse 0xDD /* src OR NOT dst */ +-#define PVR2DROPcopyInverted 0x33 /* NOT src */ +-#define PVR2DROPorInverted 0xBB /* NOT src OR dst */ +-#define PVR2DROPnand 0x77 /* NOT src OR NOT dst */ +- +-/* pattern rop codes */ +-#define PVR2DPATROPand 0xA0 /* pat AND dst */ +-#define PVR2DPATROPandReverse 0x50 /* pat AND NOT dst */ +-#define PVR2DPATROPcopy 0xF0 /* pat (used for solid color fills and pattern blts) */ +-#define PVR2DPATROPandInverted 0x0A /* NOT pat AND dst */ +-#define PVR2DPATROPxor 0x5A /* pat XOR dst */ +-#define PVR2DPATROPor 0xFA /* pat OR dst */ +-#define PVR2DPATROPnor 0x05 /* NOT pat AND NOT dst */ +-#define PVR2DPATROPequiv 0xA5 /* NOT pat XOR dst */ +-#define PVR2DPATROPinvert 0x55 /* NOT dst */ +-#define PVR2DPATROPorReverse 0xF5 /* pat OR NOT dst */ +-#define PVR2DPATROPcopyInverted 0x0F /* NOT pat */ +-#define PVR2DPATROPorInverted 0xAF /* NOT pat OR dst */ +-#define PVR2DPATROPnand 0x5F /* NOT pat OR NOT dst */ +- +-/* common rop4 codes */ +-#define PVR2DROP4MaskedCopy PVR2DROP4(PVR2DROPnoop,PVR2DROPcopy) /* masked source copy blt (used for rounded window corners etc) */ +-#define PVR2DROP4MaskedFill PVR2DROP4(PVR2DROPnoop,PVR2DPATROPcopy) /* masked colour fill blt (used for text) */ +- +-/* Legacy support */ +-#define PVR2DROP3_PATMASK PVR2DPATROPcopy +-#define PVR2DROP3_SRCMASK PVR2DROPcopy +- +-/* pixmap memory alignment */ +-#define PVR2D_ALIGNMENT_4 4 /* DWORD alignment */ +-#define PVR2D_ALIGNMENT_ANY 0 /* no alignment */ +-#define PVR2D_ALIGNMENT_PALETTE 16 /* 16 byte alignment is required for palettes */ +- +-/* Heap number for PVR2DGetFrameBuffer */ +-#define PVR2D_FB_PRIMARY_SURFACE 0 +- +-#define PVR2D_PRESENT_PROPERTY_SRCSTRIDE (1 << 0) +-#define PVR2D_PRESENT_PROPERTY_DSTSIZE (1 << 1) +-#define PVR2D_PRESENT_PROPERTY_DSTPOS (1 << 2) +-#define PVR2D_PRESENT_PROPERTY_CLIPRECTS (1 << 3) +-#define PVR2D_PRESENT_PROPERTY_INTERVAL (1 << 4) +- +- +-#define PVR2D_CREATE_FLIPCHAIN_SHARED (1 << 0) +-#define PVR2D_CREATE_FLIPCHAIN_QUERY (1 << 1) +- +-/* Functions that the library exports */ +- +-PVR2D_IMPORT +-int PVR2DEnumerateDevices(PVR2DDEVICEINFO *pDevInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DCreateDeviceContext(unsigned long ulDevID, +- PVR2DCONTEXTHANDLE* phContext, +- unsigned long ulFlags); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DDestroyDeviceContext(PVR2DCONTEXTHANDLE hContext); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DGetDeviceInfo(PVR2DCONTEXTHANDLE hContext, +- PVR2DDISPLAYINFO *pDisplayInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DGetScreenMode(PVR2DCONTEXTHANDLE hContext, +- PVR2DFORMAT *pFormat, +- long *plWidth, +- long *plHeight, +- long *plStride, +- int *piRefreshRate); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DGetFrameBuffer(PVR2DCONTEXTHANDLE hContext, +- int nHeap, +- PVR2DMEMINFO **ppsMemInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DMemAlloc(PVR2DCONTEXTHANDLE hContext, +- unsigned long ulBytes, +- unsigned long ulAlign, +- unsigned long ulFlags, +- PVR2DMEMINFO **ppsMemInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DMemWrap(PVR2DCONTEXTHANDLE hContext, +- void *pMem, +- unsigned long ulFlags, +- unsigned long ulBytes, +- unsigned long alPageAddress[], +- PVR2DMEMINFO **ppsMemInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DMemMap(PVR2DCONTEXTHANDLE hContext, +- unsigned long ulFlags, +- void *hPrivateMapData, +- PVR2DMEMINFO **ppsDstMem); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DMemFree(PVR2DCONTEXTHANDLE hContext, +- PVR2DMEMINFO *psMemInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DBlt(PVR2DCONTEXTHANDLE hContext, +- PVR2DBLTINFO *pBltInfo); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DBltClipped(PVR2DCONTEXTHANDLE hContext, +- PVR2DBLTINFO *pBltInfo, +- unsigned long ulNumClipRects, +- PVR2DRECT *pClipRects); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DQueryBlitsComplete(PVR2DCONTEXTHANDLE hContext, +- PVR2DMEMINFO *pMemInfo, +- unsigned int uiWaitForComplete); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DSetPresentBltProperties(PVR2DCONTEXTHANDLE hContext, +- unsigned long ulPropertyMask, +- long lSrcStride, +- unsigned long ulDstWidth, +- unsigned long ulDstHeight, +- long lDstXPos, +- long lDstYPos, +- unsigned long ulNumClipRects, +- PVR2DRECT *pClipRects, +- unsigned long ulSwapInterval); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DPresentBlt(PVR2DCONTEXTHANDLE hContext, +- PVR2DMEMINFO *pMemInfo, +- long lRenderID); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DCreateFlipChain(PVR2DCONTEXTHANDLE hContext, +- unsigned long ulFlags, +- unsigned long ulNumBuffers, +- unsigned long ulWidth, +- unsigned long ulHeight, +- PVR2DFORMAT eFormat, +- long *plStride, +- unsigned long *pulFlipChainID, +- PVR2DFLIPCHAINHANDLE *phFlipChain); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DDestroyFlipChain(PVR2DCONTEXTHANDLE hContext, +- PVR2DFLIPCHAINHANDLE hFlipChain); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DGetFlipChainBuffers(PVR2DCONTEXTHANDLE hContext, +- PVR2DFLIPCHAINHANDLE hFlipChain, +- unsigned long *pulNumBuffers, +- PVR2DMEMINFO *psMemInfo[]); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DSetPresentFlipProperties(PVR2DCONTEXTHANDLE hContext, +- PVR2DFLIPCHAINHANDLE hFlipChain, +- unsigned long ulPropertyMask, +- long lDstXPos, +- long lDstYPos, +- unsigned long ulNumClipRects, +- PVR2DRECT *pClipRects, +- unsigned long ulSwapInterval); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DPresentFlip(PVR2DCONTEXTHANDLE hContext, +- PVR2DFLIPCHAINHANDLE hFlipChain, +- PVR2DMEMINFO *psMemInfo, +- long lRenderID); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DGetAPIRev(long *lRevMajor, long *lRevMinor); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DLoadUseCode (const PVR2DCONTEXTHANDLE hContext, const unsigned char *pUseCode, +- const unsigned long UseCodeSize, PVR2D_HANDLE *pUseCodeHandle); +-PVR2D_IMPORT +-PVR2DERROR PVR2DFreeUseCode (const PVR2DCONTEXTHANDLE hContext, const PVR2D_HANDLE hUseCodeHandle); +- +-PVR2D_IMPORT +-PVR2DERROR PVR2DBlt3D (const PVR2DCONTEXTHANDLE hContext, const PPVR2D_3DBLT pBlt3D); +- +-#ifdef __cplusplus +-} +-#endif +- +-#endif /* _PVR2D_H_ */ +- +-/****************************************************************************** +- End of file (pvr2d.h) +-******************************************************************************/ +Index: qt-4.8.5/src/3rdparty/powervr/wsegl.h +=================================================================== +--- qt-4.8.5.orig/src/3rdparty/powervr/wsegl.h 2013-07-08 11:24:33.010516867 -0500 ++++ /dev/null 1970-01-01 00:00:00.000000000 +0000 +@@ -1,240 +0,0 @@ +-/****************************************************************************** +- Name : wsegl.h +- Copyright : Copyright (c) Imagination Technologies Limited. +- This specification is protected by copyright laws and contains +- material proprietary to Imagination Technologies Limited. +- You may use and distribute this specification free of charge for implementing +- the functionality therein, without altering or removing any trademark, copyright, +- or other notice from the specification. +- Platform : ANSI +-*****************************************************************************/ +- +- +-#if !defined(__WSEGL_H__) +-#define __WSEGL_H__ +- +-#ifdef __cplusplus +-extern "C" { +-#endif +- +-/* +-// WSEGL Platform-specific definitions +-*/ +-#define WSEGL_EXPORT +-#define WSEGL_IMPORT +- +-/* +-// WSEGL API Version Number +-*/ +- +-#define WSEGL_VERSION 1 +-#define WSEGL_DEFAULT_DISPLAY 0 +-#define WSEGL_DEFAULT_NATIVE_ENGINE 0 +- +-#define WSEGL_FALSE 0 +-#define WSEGL_TRUE 1 +-#define WSEGL_NULL 0 +- +-#define WSEGL_UNREFERENCED_PARAMETER(param) (param) = (param) +- +-/* +-// WSEGL handles +-*/ +-typedef void *WSEGLDisplayHandle; +-typedef void *WSEGLDrawableHandle; +- +-/* +-// Display capability type +-*/ +-typedef enum WSEGLCapsType_TAG +-{ +- WSEGL_NO_CAPS = 0, +- WSEGL_CAP_MIN_SWAP_INTERVAL = 1, /* System default value = 1 */ +- WSEGL_CAP_MAX_SWAP_INTERVAL = 2, /* System default value = 1 */ +- WSEGL_CAP_WINDOWS_USE_HW_SYNC = 3, /* System default value = 0 (FALSE) */ +- WSEGL_CAP_PIXMAPS_USE_HW_SYNC = 4, /* System default value = 0 (FALSE) */ +- +-} WSEGLCapsType; +- +-/* +-// Display capability +-*/ +-typedef struct WSEGLCaps_TAG +-{ +- WSEGLCapsType eCapsType; +- unsigned long ui32CapsValue; +- +-} WSEGLCaps; +- +-/* +-// Drawable type +-*/ +-#define WSEGL_NO_DRAWABLE 0x0 +-#define WSEGL_DRAWABLE_WINDOW 0x1 +-#define WSEGL_DRAWABLE_PIXMAP 0x2 +- +- +-/* +-// Pixel format of display/drawable +-*/ +-typedef enum WSEGLPixelFormat_TAG +-{ +- WSEGL_PIXELFORMAT_565 = 0, +- WSEGL_PIXELFORMAT_4444 = 1, +- WSEGL_PIXELFORMAT_8888 = 2, +- WSEGL_PIXELFORMAT_1555 = 3 +- +-} WSEGLPixelFormat; +- +-/* +-// Transparent of display/drawable +-*/ +-typedef enum WSEGLTransparentType_TAG +-{ +- WSEGL_OPAQUE = 0, +- WSEGL_COLOR_KEY = 1, +- +-} WSEGLTransparentType; +- +-/* +-// Display/drawable configuration +-*/ +-typedef struct WSEGLConfig_TAG +-{ +- /* +- // Type of drawables this configuration applies to - +- // OR'd values of drawable types. +- */ +- unsigned long ui32DrawableType; +- +- /* Pixel format */ +- WSEGLPixelFormat ePixelFormat; +- +- /* Native Renderable - set to WSEGL_TRUE if native renderable */ +- unsigned long ulNativeRenderable; +- +- /* FrameBuffer Level Parameter */ +- unsigned long ulFrameBufferLevel; +- +- /* Native Visual ID */ +- unsigned long ulNativeVisualID; +- +- /* Native Visual */ +- void *hNativeVisual; +- +- /* Transparent Type */ +- WSEGLTransparentType eTransparentType; +- +- /* Transparent Color - only used if transparent type is COLOR_KEY */ +- unsigned long ulTransparentColor; /* packed as 0x00RRGGBB */ +- +- +-} WSEGLConfig; +- +-/* +-// WSEGL errors +-*/ +-typedef enum WSEGLError_TAG +-{ +- WSEGL_SUCCESS = 0, +- WSEGL_CANNOT_INITIALISE = 1, +- WSEGL_BAD_NATIVE_DISPLAY = 2, +- WSEGL_BAD_NATIVE_WINDOW = 3, +- WSEGL_BAD_NATIVE_PIXMAP = 4, +- WSEGL_BAD_NATIVE_ENGINE = 5, +- WSEGL_BAD_DRAWABLE = 6, +- WSEGL_BAD_CONFIG = 7, +- WSEGL_OUT_OF_MEMORY = 8 +- +-} WSEGLError; +- +-/* +-// Drawable orientation (in degrees anti-clockwise) +-*/ +-typedef enum WSEGLRotationAngle_TAG +-{ +- WSEGL_ROTATE_0 = 0, +- WSEGL_ROTATE_90 = 1, +- WSEGL_ROTATE_180 = 2, +- WSEGL_ROTATE_270 = 3 +- +-} WSEGLRotationAngle; +- +-/* +-// Drawable information required by OpenGL-ES driver +-*/ +-typedef struct WSEGLDrawableParams_TAG +-{ +- /* Width in pixels of the drawable */ +- unsigned long ui32Width; +- +- /* Height in pixels of the drawable */ +- unsigned long ui32Height; +- +- /* Stride in pixels of the drawable */ +- unsigned long ui32Stride; +- +- /* Pixel format of the drawable */ +- WSEGLPixelFormat ePixelFormat; +- +- /* User space cpu virtual address of the drawable */ +- void *pvLinearAddress; +- +- /* HW address of the drawable */ +- unsigned long ui32HWAddress; +- +- /* Private data for the drawable */ +- void *hPrivateData; +- +-} WSEGLDrawableParams; +- +- +-/* +-// Table of function pointers that is returned by WSEGL_GetFunctionTablePointer() +-// +-// The first entry in the table is the version number of the wsegl.h header file that +-// the module has been written against, and should therefore be set to WSEGL_VERSION +-*/ +-typedef struct WSEGL_FunctionTable_TAG +-{ +- unsigned long ui32WSEGLVersion; +- +- WSEGLError (*pfnWSEGL_IsDisplayValid)(NativeDisplayType); +- +- WSEGLError (*pfnWSEGL_InitialiseDisplay)(NativeDisplayType, WSEGLDisplayHandle *, const WSEGLCaps **, WSEGLConfig **); +- +- WSEGLError (*pfnWSEGL_CloseDisplay)(WSEGLDisplayHandle); +- +- WSEGLError (*pfnWSEGL_CreateWindowDrawable)(WSEGLDisplayHandle, WSEGLConfig *, WSEGLDrawableHandle *, NativeWindowType, WSEGLRotationAngle *); +- +- WSEGLError (*pfnWSEGL_CreatePixmapDrawable)(WSEGLDisplayHandle, WSEGLConfig *, WSEGLDrawableHandle *, NativePixmapType, WSEGLRotationAngle *); +- +- WSEGLError (*pfnWSEGL_DeleteDrawable)(WSEGLDrawableHandle); +- +- WSEGLError (*pfnWSEGL_SwapDrawable)(WSEGLDrawableHandle, unsigned long); +- +- WSEGLError (*pfnWSEGL_SwapControlInterval)(WSEGLDrawableHandle, unsigned long); +- +- WSEGLError (*pfnWSEGL_WaitNative)(WSEGLDrawableHandle, unsigned long); +- +- WSEGLError (*pfnWSEGL_CopyFromDrawable)(WSEGLDrawableHandle, NativePixmapType); +- +- WSEGLError (*pfnWSEGL_CopyFromPBuffer)(void *, unsigned long, unsigned long, unsigned long, WSEGLPixelFormat, NativePixmapType); +- +- WSEGLError (*pfnWSEGL_GetDrawableParameters)(WSEGLDrawableHandle, WSEGLDrawableParams *, WSEGLDrawableParams *); +- +- +-} WSEGL_FunctionTable; +- +- +-WSEGL_IMPORT const WSEGL_FunctionTable *WSEGL_GetFunctionTablePointer(void); +- +-#ifdef __cplusplus +-} +-#endif +- +-#endif /* __WSEGL_H__ */ +- +-/****************************************************************************** +- End of file (wsegl.h) +-******************************************************************************/ +Index: qt-4.8.5/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c +=================================================================== +--- qt-4.8.5.orig/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c 2013-07-08 11:24:33.010516867 -0500 ++++ qt-4.8.5/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c 2013-07-08 11:28:26.142521123 -0500 +@@ -39,7 +39,7 @@ + ** + ****************************************************************************/ + +-#include ++#include + #include + #include + #include +@@ -379,6 +379,20 @@ + return WSEGL_SUCCESS; + } + ++/* Function stub for ConnectDrawable() */ ++static WSEGLError wseglConnectDrawable(WSEGLDrawableHandle hDrawable) ++{ ++ WSEGL_UNREFERENCED_PARAMETER(hDrawable); ++ return WSEGL_SUCCESS; ++} ++ ++/* Function stub for DisconnectDrawable() */ ++static WSEGLError wseglDisconnectDrawable(WSEGLDrawableHandle hDrawable) ++{ ++ WSEGL_UNREFERENCED_PARAMETER(hDrawable); ++ return WSEGL_SUCCESS; ++} ++ + static WSEGL_FunctionTable const wseglFunctions = { + WSEGL_VERSION, + wseglIsDisplayValid, +@@ -392,7 +406,9 @@ + wseglWaitNative, + wseglCopyFromDrawable, + wseglCopyFromPBuffer, +- wseglGetDrawableParameters ++ wseglGetDrawableParameters, ++ wseglConnectDrawable, ++ wseglDisconnectDrawable + }; + + /* Return the table of WSEGL functions to the EGL implementation */ diff --git a/package/qt/0003-fix-const-atomics.patch b/package/qt/0003-fix-const-atomics.patch new file mode 100644 index 0000000000..64853565e8 --- /dev/null +++ b/package/qt/0003-fix-const-atomics.patch @@ -0,0 +1,50 @@ +From d4d07dac01796b2aa0fb501c14865cab7e42b3a9 Mon Sep 17 00:00:00 2001 +From: Mischa Jonker +Date: Sun, 4 Nov 2012 11:42:04 +0100 +Subject: [PATCH] Fix const-related build error in generic atomic ops + +It's still not entirely const-correct though. In all other architectures +this is obfuscated through the use of inline asm (which the compiler +doesn't check). This patch obfuscates through const_cast +--- + src/corelib/arch/generic/qatomic_generic_unix.cpp | 8 ++++---- + src/corelib/arch/qatomic_generic.h | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/corelib/arch/generic/qatomic_generic_unix.cpp b/src/corelib/arch/generic/qatomic_generic_unix.cpp +index 1c6cbf0..6fce81d 100644 +--- a/src/corelib/arch/generic/qatomic_generic_unix.cpp ++++ b/src/corelib/arch/generic/qatomic_generic_unix.cpp +@@ -85,13 +85,13 @@ int QBasicAtomicInt_fetchAndAddOrdered(volatile int *_q_value, int valueToAdd) + + Q_CORE_EXPORT + bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *_q_value, +- void *expectedValue, +- void *newValue) ++ const void *expectedValue, ++ const void *newValue) + { + bool returnValue = false; + pthread_mutex_lock(&qAtomicMutex); + if (*_q_value == expectedValue) { +- *_q_value = newValue; ++ *_q_value = const_cast(newValue); + returnValue = true; + } + pthread_mutex_unlock(&qAtomicMutex); +diff --git a/src/corelib/arch/qatomic_generic.h b/src/corelib/arch/qatomic_generic.h +index 621a767..4c14679 100644 +--- a/src/corelib/arch/qatomic_generic.h ++++ b/src/corelib/arch/qatomic_generic.h +@@ -105,7 +105,7 @@ Q_CORE_EXPORT bool QBasicAtomicInt_testAndSetOrdered(volatile int *, int, int); + Q_CORE_EXPORT int QBasicAtomicInt_fetchAndStoreOrdered(volatile int *, int); + Q_CORE_EXPORT int QBasicAtomicInt_fetchAndAddOrdered(volatile int *, int); + +-Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *, void *, void *); ++Q_CORE_EXPORT bool QBasicAtomicPointer_testAndSetOrdered(void * volatile *, const void *, const void *); + Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndStoreOrdered(void * volatile *, void *); + Q_CORE_EXPORT void *QBasicAtomicPointer_fetchAndAddOrdered(void * volatile *, qptrdiff); + +-- +1.7.0.4 + diff --git a/package/qt/0004-pthread_getattr_np.patch b/package/qt/0004-pthread_getattr_np.patch new file mode 100644 index 0000000000..28f0c8411b --- /dev/null +++ b/package/qt/0004-pthread_getattr_np.patch @@ -0,0 +1,107 @@ +Add pthred_getattr_np / phread_attr_getstrack alternatives for uClibc + +Based on https://dev.openwrt.org/log/packages/Xorg/lib/qt4/patches/100-fix-webkit-for-uclibc.patch?rev=20371 + +Signed-off-by: Johan Sagaert +--- + src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp | 61 ++++++++++ + 1 file changed, 61 insertions(+) + +Index: qt-everywhere-opensource-src-4.8.1/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp +=================================================================== +--- qt-everywhere-opensource-src-4.8.1.orig/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp ++++ qt-everywhere-opensource-src-4.8.1/src/3rdparty/javascriptcore/JavaScriptCore/runtime/Collector.cpp +@@ -70,6 +70,23 @@ + #endif + #include + ++#if defined(QT_LINUXBASE) ++#include ++#endif ++ ++#if defined(__UCLIBC__) ++// versions of uClibc 0.9.32 and below with linuxthreads.old do not have ++// pthread_getattr_np or pthread_attr_getstack. ++#if __UCLIBC_MAJOR__ == 0 && \ ++ (__UCLIBC_MINOR__ < 9 || \ ++ (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ <= 32)) && \ ++ defined(__LINUXTHREADS_OLD__) ++#define UCLIBC_USE_PROC_SELF_MAPS 1 ++#include ++extern int *__libc_stack_end; ++#endif ++#endif ++ + #if OS(SOLARIS) + #include + #else +@@ -648,6 +665,37 @@ + get_thread_info(find_thread(NULL), &threadInfo); + return threadInfo.stack_end; + #elif OS(UNIX) ++#ifdef UCLIBC_USE_PROC_SELF_MAPS ++ // Read /proc/self/maps and locate the line whose address ++ // range contains __libc_stack_end. ++ FILE *file = fopen("/proc/self/maps", "r"); ++ if (!file) ++ return 0; ++ __fsetlocking(file, FSETLOCKING_BYCALLER); ++ char *line = NULL; ++ size_t lineLen = 0; ++ while (!feof_unlocked(file)) { ++ if (getdelim(&line, &lineLen, '\n', file) <= 0) ++ break; ++ ++ long from; ++ long to; ++ if (sscanf (line, "%lx-%lx", &from, &to) != 2) ++ continue; ++ if (from <= (long)__libc_stack_end && (long)__libc_stack_end < to) { ++ fclose(file); ++ free(line); ++#ifdef _STACK_GROWS_UP ++ return (void *)from; ++#else ++ return (void *)to; ++#endif ++ } ++ } ++ fclose(file); ++ free(line); ++ return 0; ++#else + AtomicallyInitializedStatic(Mutex&, mutex = *new Mutex); + MutexLocker locker(mutex); + static void* stackBase = 0; +@@ -655,11 +703,23 @@ + static pthread_t stackThread; + pthread_t thread = pthread_self(); + if (stackBase == 0 || thread != stackThread) { ++ ++#if defined(QT_LINUXBASE) ++ // LinuxBase is missing pthread_getattr_np - resolve it once at runtime instead ++ // see http://bugs.linuxbase.org/show_bug.cgi?id=2364 ++ typedef int (*GetAttrPtr)(pthread_t, pthread_attr_t *); ++ static int (*pthread_getattr_np_ptr)(pthread_t, pthread_attr_t *) = 0; ++ if (!pthread_getattr_np_ptr) ++ *(void **)&pthread_getattr_np_ptr = dlsym(RTLD_DEFAULT, "pthread_getattr_np"); ++#endif + pthread_attr_t sattr; + pthread_attr_init(&sattr); + #if HAVE(PTHREAD_NP_H) || OS(NETBSD) + // e.g. on FreeBSD 5.4, neundorf@kde.org + pthread_attr_get_np(thread, &sattr); ++#elif defined(QT_LINUXBASE) ++ if (pthread_getattr_np_ptr) ++ pthread_getattr_np_ptr(thread, &sattr); + #else + // FIXME: this function is non-portable; other POSIX systems may have different np alternatives + pthread_getattr_np(thread, &sattr); +@@ -671,6 +731,7 @@ + stackThread = thread; + } + return static_cast(stackBase) + stackSize; ++#endif + #else + #error Need a way to get the stack base on this platform + #endif diff --git a/package/qt/0005-script-qtdbus-no-gui.patch b/package/qt/0005-script-qtdbus-no-gui.patch new file mode 100644 index 0000000000..e29e9e4a1b --- /dev/null +++ b/package/qt/0005-script-qtdbus-no-gui.patch @@ -0,0 +1,22 @@ +[PATCH] fix build with script+dbus enabled, but no gui + +The script/qtdbus plugin doesn't need gui support, so don't try to +link it against libQtGui. + +Signed-off-by: Peter Korsgaard +--- + src/plugins/script/qtdbus/qtdbus.pro | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: qt-4.7.3/src/plugins/script/qtdbus/qtdbus.pro +=================================================================== +--- qt-4.7.3.orig/src/plugins/script/qtdbus/qtdbus.pro ++++ qt-4.7.3/src/plugins/script/qtdbus/qtdbus.pro +@@ -1,6 +1,6 @@ + TARGET = qtscriptdbus + include(../../qpluginbase.pri) +-QT = core gui script ++QT = core script + CONFIG += qdbus + + SOURCES += main.cpp diff --git a/package/qt/0006-Add-initial-support-of-ARC-architecture.patch b/package/qt/0006-Add-initial-support-of-ARC-architecture.patch new file mode 100644 index 0000000000..4470d3b0df --- /dev/null +++ b/package/qt/0006-Add-initial-support-of-ARC-architecture.patch @@ -0,0 +1,183 @@ +From a695eec2ef21240bbc6cd8cd1bdbab76f8da8dfd Mon Sep 17 00:00:00 2001 +From: Vineet Gupta +Date: Wed, 20 May 2015 10:37:25 +0300 +Subject: [PATCH 1/2] Add initial support of ARC architecture + +DesignWare ARC 700 and ARC HS38 are families of 32-bit CPUs +developed by Synopsys, Inc. + +This change implements following: + [1] Defines ARC as one embedded targets + [2] Defines default tools prefixed for ARC like + arc-linux-g++ etc + [3] Defines "inotify" syscall numbers for ARC + (note ARC fully compliant to Linux UAPI headers) + [4] Disables 16-bit aligned data access + +For now we're using generic atomic ops even though it may +introduce performance panalty. + +Change-Id: I91e879ac55c2f3643a544f97cd59671a81ccc3c2 + +This patch was submited in upstream Qt4 and if it ever gets accepted, +it should be removed from Buildroot. + +https://codereview.qt-project.org/#/c/112667 +--- + configure | 6 ++++ + mkspecs/qws/linux-arc-g++/qmake.conf | 21 ++++++++++++++ + mkspecs/qws/linux-arc-g++/qplatformdefs.h | 42 +++++++++++++++++++++++++++ + src/corelib/arch/qatomic_arch.h | 2 ++ + src/corelib/io/qfilesystemwatcher_inotify.cpp | 5 ++++ + src/gui/painting/qblendfunctions.cpp | 4 +-- + 6 files changed, 78 insertions(+), 2 deletions(-) + create mode 100644 mkspecs/qws/linux-arc-g++/qmake.conf + create mode 100644 mkspecs/qws/linux-arc-g++/qplatformdefs.h + +diff --git a/configure b/configure +index 10ad7ca..c7ef074 100755 +--- a/configure ++++ b/configure +@@ -2829,6 +2829,9 @@ if [ "$CFG_EMBEDDED" != "no" ]; then + *86_64) + CFG_EMBEDDED=x86_64 + ;; ++ *arc) ++ CFG_EMBEDDED=arc ++ ;; + *) + CFG_EMBEDDED=generic + ;; +@@ -3309,6 +3312,9 @@ if [ "$PLATFORM" != "$XPLATFORM" -a "$CFG_EMBEDDED" != "no" ]; then + arm*) + CFG_ARCH=arm + ;; ++ arc) ++ CFG_ARCH=arc ++ ;; + *) + CFG_ARCH="$CFG_EMBEDDED" + ;; +diff --git a/mkspecs/qws/linux-arc-g++/qmake.conf b/mkspecs/qws/linux-arc-g++/qmake.conf +new file mode 100644 +index 0000000..a14587b +--- /dev/null ++++ b/mkspecs/qws/linux-arc-g++/qmake.conf +@@ -0,0 +1,21 @@ ++# ++# qmake configuration for building with arc-linux-g++ ++# ++ ++include(../../common/linux.conf) ++include(../../common/gcc-base-unix.conf) ++include(../../common/g++-unix.conf) ++include(../../common/qws.conf) ++ ++# modifications to g++.conf ++QMAKE_CC = arc-linux-gcc ++QMAKE_CXX = arc-linux-g++ ++QMAKE_LINK = arc-linux-g++ ++QMAKE_LINK_SHLIB = arc-linux-g++ ++ ++# modifications to linux.conf ++QMAKE_AR = arc-linux-ar cqs ++QMAKE_OBJCOPY = arc-linux-objcopy ++QMAKE_STRIP = arc-linux-strip ++ ++load(qt_config) +diff --git a/mkspecs/qws/linux-arc-g++/qplatformdefs.h b/mkspecs/qws/linux-arc-g++/qplatformdefs.h +new file mode 100644 +index 0000000..a654aa7 +--- /dev/null ++++ b/mkspecs/qws/linux-arc-g++/qplatformdefs.h +@@ -0,0 +1,42 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Contact: http://www.qt.io/licensing/ ++** ++** This file is part of the qmake spec of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and The Qt Company. For licensing terms ++** and conditions see http://www.qt.io/terms-conditions. For further ++** information use the contact form at http://www.qt.io/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 or version 3 as published by the Free ++** Software Foundation and appearing in the file LICENSE.LGPLv21 and ++** LICENSE.LGPLv3 included in the packaging of this file. Please review the ++** following information to ensure the GNU Lesser General Public License ++** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ++** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** As a special exception, The Qt Company gives you certain additional ++** rights. These rights are described in The Qt Company LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** GNU General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU ++** General Public License version 3.0 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. Please review the following information to ++** ensure the GNU General Public License version 3.0 requirements will be ++** met: http://www.gnu.org/copyleft/gpl.html. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#include "../../linux-g++/qplatformdefs.h" +diff --git a/src/corelib/arch/qatomic_arch.h b/src/corelib/arch/qatomic_arch.h +index d154b7e..a48c42a 100644 +--- a/src/corelib/arch/qatomic_arch.h ++++ b/src/corelib/arch/qatomic_arch.h +@@ -94,6 +94,8 @@ QT_BEGIN_HEADER + # include "QtCore/qatomic_sh4a.h" + #elif defined(QT_ARCH_NACL) + # include "QtCore/qatomic_generic.h" ++#elif defined(QT_ARCH_ARC) ++# include "QtCore/qatomic_generic.h" + #else + # error "Qt has not been ported to this architecture" + #endif +diff --git a/src/corelib/io/qfilesystemwatcher_inotify.cpp b/src/corelib/io/qfilesystemwatcher_inotify.cpp +index 8bca422..e3e2565 100644 +--- a/src/corelib/io/qfilesystemwatcher_inotify.cpp ++++ b/src/corelib/io/qfilesystemwatcher_inotify.cpp +@@ -143,6 +143,11 @@ + # define __NR_inotify_add_watch 27 + # define __NR_inotify_rm_watch 28 + // no inotify_init for aarch64 ++#elif defined (__arc__) ++# define __NR_inotify_init 1043 ++# define __NR_inotify_add_watch 27 ++# define __NR_inotify_rm_watch 28 ++# define __NR_inotify_init1 26 + #else + # error "This architecture is not supported. Please talk to qt-bugs@trolltech.com" + #endif +diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp +index de8790a..cc2f5b6 100644 +--- a/src/gui/painting/qblendfunctions.cpp ++++ b/src/gui/painting/qblendfunctions.cpp +@@ -309,9 +309,9 @@ template void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl, + const uchar *src = srcPixels + y * sbpl; + const uchar *srcEnd = src + srcOffset; + while (src < srcEnd) { +-#if defined(QT_ARCH_ARMV5) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_)) || (defined(QT_ARCH_SPARC) && defined(Q_CC_GNU)) || (defined(QT_ARCH_INTEGRITY) && !defined(_X86_)) ++#if defined(QT_ARCH_ARMV5) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_)) || (defined(QT_ARCH_SPARC) && defined(Q_CC_GNU)) || (defined(QT_ARCH_INTEGRITY) && !defined(_X86_)) || defined(QT_ARCH_ARC) + // non-16-bit aligned memory access is not possible on PowerPC, +- // ARM +Date: Wed, 20 May 2015 10:53:59 +0300 +Subject: [PATCH 2/2] Prevent unaligned access on ARC + +As many other architectures ARC cores by default don't support +unaligned word access to data. + +Even though it's possible to enable unaligned access to data in +ARC HS38 core (we're talking about configuration of core design) +to make sure Qt could be executed on any flavour of ARC fall-back +to byte-accesses is used. + +Change-Id: I96068d40b449f11ba987ed1e5d5e44f493d1eb5f + +This patch was submited in upstream Qt4 and if it ever gets accepted, +it should be removed from Buildroot. + +https://codereview.qt-project.org/#/c/112668 +--- + src/3rdparty/webkit/Source/JavaScriptCore/runtime/UString.h | 2 +- + src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h | 13 ++++++++++++- + .../webkit/Source/JavaScriptCore/wtf/text/AtomicString.cpp | 2 +- + .../webkit/Source/JavaScriptCore/wtf/text/StringHash.h | 2 +- + 4 files changed, 15 insertions(+), 4 deletions(-) + +diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/UString.h b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/UString.h +index 2d76809..ee9b7f0 100644 +--- a/src/3rdparty/webkit/Source/JavaScriptCore/runtime/UString.h ++++ b/src/3rdparty/webkit/Source/JavaScriptCore/runtime/UString.h +@@ -202,7 +202,7 @@ struct UStringHash { + + // FIXME: perhaps we should have a more abstract macro that indicates when + // going 4 bytes at a time is unsafe +-#if CPU(ARM) || CPU(SH4) || CPU(MIPS) || CPU(SPARC) ++#if CPU(ARM) || CPU(SH4) || CPU(MIPS) || CPU(SPARC) || CPU(ARC) + const UChar* aChars = a->characters(); + const UChar* bChars = b->characters(); + for (unsigned i = 0; i != aLength; ++i) { +diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h +index e8b03be..cd17e9c 100644 +--- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h ++++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h +@@ -369,7 +369,18 @@ + + #endif /* ARM */ + +-#if CPU(ARM) || CPU(MIPS) || CPU(SH4) ++/* CPU(ARC) - ARC, any version*/ ++#if defined(arc) \ ++ || defined(__arc__) \ ++ || defined(ARC) \ ++ || defined(_ARC_) ++#define WTF_CPU_ARC 1 ++#if defined(__BIG_ENDIAN__) ++#define WTF_CPU_BIG_ENDIAN 1 ++#endif ++#endif ++ ++#if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(ARC) + #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1 + #endif + +diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/AtomicString.cpp b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/AtomicString.cpp +index 9dd655e..bd3ab95 100644 +--- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/AtomicString.cpp ++++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/AtomicString.cpp +@@ -142,7 +142,7 @@ static inline bool equal(StringImpl* string, const UChar* characters, unsigned l + + // FIXME: perhaps we should have a more abstract macro that indicates when + // going 4 bytes at a time is unsafe +-#if CPU(ARM) || CPU(SH4) || CPU(MIPS) || CPU(SPARC) ++#if CPU(ARM) || CPU(SH4) || CPU(MIPS) || CPU(SPARC) || CPU(ARC) + const UChar* stringCharacters = string->characters(); + for (unsigned i = 0; i != length; ++i) { + if (*stringCharacters++ != *characters++) +diff --git a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringHash.h b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringHash.h +index 4637c3d..91cef81 100644 +--- a/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringHash.h ++++ b/src/3rdparty/webkit/Source/JavaScriptCore/wtf/text/StringHash.h +@@ -55,7 +55,7 @@ namespace WTF { + + // FIXME: perhaps we should have a more abstract macro that indicates when + // going 4 bytes at a time is unsafe +-#if CPU(ARM) || CPU(SH4) || CPU(MIPS) || CPU(SPARC) ++#if CPU(ARM) || CPU(SH4) || CPU(MIPS) || CPU(SPARC) || CPU(ARC) + const UChar* aChars = a->characters(); + const UChar* bChars = b->characters(); + for (unsigned i = 0; i != aLength; ++i) { +-- +2.1.0 + diff --git a/package/qt/0008-Fix-conversion-constructor-error-for-legacy-c-compil.patch b/package/qt/0008-Fix-conversion-constructor-error-for-legacy-c-compil.patch new file mode 100644 index 0000000000..d7d387a78d --- /dev/null +++ b/package/qt/0008-Fix-conversion-constructor-error-for-legacy-c-compil.patch @@ -0,0 +1,163 @@ +From ea46f47fb3c475ba2d7581c15185b8d43e63b8c2 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Fri, 27 Feb 2015 21:30:52 +0100 +Subject: [PATCH] Fix conversion/constructor error for legacy c++ compiler. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes the following compile error with legacy c++ compiler: + +error: in C++98 ‘blitRect’ must be initialized by constructor, not by ‘{...}’ + +Signed-off-by: Peter Seiderer +--- + src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp | 14 +++++++------- + src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp | 6 +++--- + src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp | 6 +++--- + src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 2 +- + 4 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +index 876d0c2..ed69386 100644 +--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp ++++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +@@ -942,7 +942,7 @@ void QDirectFBPaintEngine::drawBufferSpan(const uint *buffer, int bufsize, + IDirectFBSurface *src = d->surfaceCache->getSurface(buffer, bufsize); + // ### how does this play with setDFBColor + src->SetColor(src, 0, 0, 0, const_alpha); +- const DFBRectangle rect = { 0, 0, length, 1 }; ++ const DFBRectangle rect = (DFBRectangle_C){ 0, 0, length, 1 }; + d->surface->Blit(d->surface, src, &rect, x, y); + } + +@@ -1223,14 +1223,14 @@ void QDirectFBPaintEnginePrivate::blit(const QRectF &dest, IDirectFBSurface *s, + const QRect dr = engine->state()->matrix.mapRect(dest).toRect(); + if (dr.isEmpty()) + return; +- const DFBRectangle sRect = { sr.x(), sr.y(), sr.width(), sr.height() }; ++ const DFBRectangle sRect = (DFBRectangle_C){ sr.x(), sr.y(), sr.width(), sr.height() }; + DFBResult result; + + if (dr.size() == sr.size()) { + result = surface->Blit(surface, s, &sRect, dr.x(), dr.y()); + } else { + Q_ASSERT(supportsStretchBlit()); +- const DFBRectangle dRect = { dr.x(), dr.y(), dr.width(), dr.height() }; ++ const DFBRectangle dRect = (DFBRectangle_C){ dr.x(), dr.y(), dr.width(), dr.height() }; + result = surface->StretchBlit(surface, s, &sRect, &dRect); + } + if (result != DFB_OK) +@@ -1261,7 +1261,7 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix + if (newClip.isNull()) + return; + +- const DFBRegion clip = { ++ const DFBRegion clip = (DFBRegion_C){ + newClip.x(), + newClip.y(), + newClip.right(), +@@ -1295,7 +1295,7 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix + while (y <= destinationRect.bottom()) { + qreal x = startX; + while (x <= destinationRect.right()) { +- const DFBRectangle destination = { qRound(x), qRound(y), mappedSize.width(), mappedSize.height() }; ++ const DFBRectangle destination = (DFBRectangle_C){ qRound(x), qRound(y), (int)mappedSize.width(), (int)mappedSize.height() }; + surface->StretchBlit(surface, sourceSurface, 0, &destination); + x += mappedSize.width(); + } +@@ -1337,7 +1337,7 @@ void QDirectFBPaintEnginePrivate::drawTiledPixmap(const QRectF &dest, const QPix + if (currentClip.isEmpty()) { + surface->SetClip(surface, 0); + } else { +- const DFBRegion clip = { ++ const DFBRegion clip = (DFBRegion_C){ + currentClip.x(), + currentClip.y(), + currentClip.right(), +@@ -1356,7 +1356,7 @@ void QDirectFBPaintEnginePrivate::updateClip() + surface->SetClip(surface, NULL); + clipType = NoClip; + } else if (clipData->hasRectClip) { +- const DFBRegion r = { ++ const DFBRegion r = (DFBRegion_C){ + clipData->clipRect.x(), + clipData->clipRect.y(), + clipData->clipRect.right(), +diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +index 412e684..c59c47d 100644 +--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp ++++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +@@ -363,7 +363,7 @@ void QDirectFBPixmapData::copy(const QPixmapData *data, const QRect &rect) + } else { + dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX); + } +- const DFBRectangle blitRect = { rect.x(), rect.y(), ++ const DFBRectangle blitRect = (DFBRectangle_C){ rect.x(), rect.y(), + rect.width(), rect.height() }; + w = rect.width(); + h = rect.height(); +@@ -465,7 +465,7 @@ QPixmap QDirectFBPixmapData::transformed(const QTransform &transform, + } + data->dfbSurface->SetBlittingFlags(data->dfbSurface, flags); + +- const DFBRectangle destRect = { 0, 0, size.width(), size.height() }; ++ const DFBRectangle destRect = (DFBRectangle_C){ 0, 0, size.width(), size.height() }; + data->dfbSurface->StretchBlit(data->dfbSurface, dfbSurface, 0, &destRect); + data->w = size.width(); + data->h = size.height(); +@@ -551,7 +551,7 @@ bool QDirectFBPixmapData::scroll(int dx, int dy, const QRect &rect) + return false; + } + +- const DFBRectangle source = { rect.x(), rect.y(), rect.width(), rect.height() }; ++ const DFBRectangle source = (DFBRectangle_C){ rect.x(), rect.y(), rect.width(), rect.height() }; + result = dfbSurface->Blit(dfbSurface, dfbSurface, &source, source.x + dx, source.y + dy); + if (result != DFB_OK) { + DirectFBError("QDirectFBPixmapData::scroll", result); +diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +index eab9580..d26e5bf 100644 +--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp ++++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +@@ -1635,7 +1635,7 @@ void QDirectFBScreen::solidFill(const QColor &color, const QRegion ®ion) + static inline void clearRect(IDirectFBSurface *surface, const QColor &color, const QRect &rect) + { + Q_ASSERT(surface); +- const DFBRegion region = { rect.left(), rect.top(), rect.right(), rect.bottom() }; ++ const DFBRegion region = (DFBRegion_C){ rect.left(), rect.top(), rect.right(), rect.bottom() }; + // could just reinterpret_cast this to a DFBRegion + surface->SetClip(surface, ®ion); + surface->Clear(surface, color.red(), color.green(), color.blue(), color.alpha()); +@@ -1716,14 +1716,14 @@ void QDirectFBScreen::flipSurface(IDirectFBSurface *surface, DFBSurfaceFlipFlags + const DFBSurfaceFlipFlags nonWaitFlags = flipFlags & ~DSFLIP_WAIT; + for (int i=0; iFlip(surface, &dfbReg, i + 1 < rects.size() ? nonWaitFlags : flipFlags); + } + } else { + const QRect r = region.boundingRect(); +- const DFBRegion dfbReg = { r.x() + offset.x(), r.y() + offset.y(), ++ const DFBRegion dfbReg = (DFBRegion_C){ r.x() + offset.x(), r.y() + offset.y(), + r.right() + offset.x(), + r.bottom() + offset.y() }; + surface->Flip(surface, &dfbReg, flipFlags); +diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +index 4dff907..25ad06b 100644 +--- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp ++++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +@@ -333,7 +333,7 @@ bool QDirectFBWindowSurface::scroll(const QRegion ®ion, int dx, int dy) + } + dfbSurface->SetBlittingFlags(dfbSurface, DSBLIT_NOFX); + const QRect r = region.boundingRect(); +- const DFBRectangle rect = { r.x(), r.y(), r.width(), r.height() }; ++ const DFBRectangle rect = (DFBRectangle_C){ r.x(), r.y(), r.width(), r.height() }; + dfbSurface->Blit(dfbSurface, dfbSurface, &rect, r.x() + dx, r.y() + dy); + return true; + } +-- +2.1.4 + diff --git a/package/qt/0009-Fix-library-inclusion-order-when-building-statically.patch b/package/qt/0009-Fix-library-inclusion-order-when-building-statically.patch new file mode 100644 index 0000000000..f6163fa0d2 --- /dev/null +++ b/package/qt/0009-Fix-library-inclusion-order-when-building-statically.patch @@ -0,0 +1,105 @@ +From 7a912823158a4113256c3113a34c38d6b241d275 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Wed, 13 Jan 2016 20:15:36 +0300 +Subject: [PATCH] Fix library inclusion order when building statically + +When building application statically it's important to keep +libraries we're linking against in order. Otherwise if libA depends on +libB but it is mentioned after libB in linker command line +there will be unresolved symbols. + +Consider real example - configuration of Qt with glib for static build. +Initially reported by Buildroot autobuilder here: +http://autobuild.buildroot.net/results/174/174c6e47eb761f9897275b6fedff742ace2f3081 + +What happens here: + +[1] Qt's configuration script tries to build glib test app + (in config.tests/unix/glib) + +[2] For that it first asks which libs to use during linkage this way: + QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null` + + In our case we're getting something like this: + -L/.../sysroot/usr/lib -lintl -lgthread-2.0 -pthread -lglib-2.0 \ + -lintl -pthread -lintl + + Note "-lintl" is mentioned 3 times because libgthread depends on + libthread and both of them plus libglib all depend on libintl - so + we're getting "lintl" for each separate library mentioned above. + +[3] Now we execute "compileTest" for real heavy lifting this way: + compileTest unix/glib "Glib" $QT_CFLAGS_GLIB $QT_LIBS_GLIB ... + +[4] compileTest (the one for unix) parses command-line passed to it + groups all entries with "-l" prefix and puts them in LFLAGS + variable. And finally executes qmake passing it that kind of + construction: + $OUTDIR/bin/qmake ..."LIBS*=$LFLAGS" + +[5] When qmake sees construction "MYVAR*=MYVAL" it populates MYVAR with + unique values from MYVAL string. + +[6] As a result qmake generated Makefile with the following: + LIBS = $(SUBLIBS) -pthread -L/.../sysroot/usr/lib -lintl -lgthread-2.0 \ + -lglib-2.0 + +[7] And essentially on attempt to link glib test app a failure happens + because libglib needs libintl, i.e. "-lintl" must follow "-lglib-2.0": +-------------------->8------------------ +linking glib + +g++ -static -Wl,-O1 -o glib glib.o -pthread -L/.../sysroot/usr/lib \ +-lintl -lgthread-2.0 -lglib-2.0 + +/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function '_g_dgettext_should_translate': +ggettext.c:(.text+0x28): undefined reference to `libintl_textdomain' +ggettext.c:(.text+0x36): undefined reference to `libintl_gettext' +/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function `ensure_gettext_initialized': +ggettext.c:(.text+0xe6): undefined reference to `libintl_bindtextdomain' +ggettext.c:(.text+0xf6): undefined reference to `libintl_bind_textdomain_codeset' +/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function `g_dgettext': +ggettext.c:(.text+0x148): undefined reference to `libintl_dgettext' +/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function `g_dcgettext': +ggettext.c:(.text+0x2dc): undefined reference to `libintl_dcgettext' +/.../sysroot/usr/lib/libglib-2.0.a(libglib_2_0_la-ggettext.o): In function `g_dngettext': +ggettext.c:(.text+0x32a): undefined reference to `libintl_dngettext' +collect2: error: ld returned 1 exit status +Makefile:99: recipe for target 'glib' failed +make: *** [glib] Error 1 + +Glib disabled. +Glib support cannot be enabled due to functionality tests! + Turn on verbose messaging (-v) to ./configure to see the final report. + If you believe this message is in error you may use the continue + switch (-continue) to ./configure to continue. +-------------------->8------------------ + +Solution to this problem is simple we have to pass all libraries exactly +in order of their initial mention by upper layers. + +Change-Id: I7ff00901031a8eb85b4fbd7889b0e0c02be806bb + +This fix was sent to Qt Gerrit for review here: +https://codereview.qt-project.org/#/c/145967/ + +--- + config.tests/unix/compile.test | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test +index f484f03..dac0a4f 100755 +--- a/config.tests/unix/compile.test ++++ b/config.tests/unix/compile.test +@@ -73,7 +73,7 @@ test -r Makefile && $MAKE distclean >/dev/null 2>&1 + rm -f "$EXE" "${EXE}.exe" + + echo "QT_BUILD_TREE = $OUTDIR" > "$OUTDIR/$TEST/.qmake.cache" +-"$OUTDIR/bin/qmake" -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" ++"$OUTDIR/bin/qmake" -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "CONFIG-=debug_and_release" "LIBS=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile" + + if [ "$VERBOSE" = "yes" ]; then + $MAKE +-- +2.4.3 + diff --git a/package/qt/0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch b/package/qt/0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch new file mode 100644 index 0000000000..9b1655322a --- /dev/null +++ b/package/qt/0010-Fix-for-platform-socklen_t-on-other-C-libraries-than.patch @@ -0,0 +1,43 @@ +From 0bf90de93b9fe21df32319e27b2507154fa8a21d Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Fri, 15 Apr 2016 00:37:26 +0200 +Subject: [PATCH] Fix for platform socklen_t on other C libraries than glibc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This helps to make sure that QT_SOCKLEN_T is defined to be 'int' +only when its glibc < 2 and not also for the libraries which may define +it as per standards but are not glibc, e.g. musl. + +This patch is adapted from Qt5 [1]. + +[1] +https://github.com/qtproject/qtbase/commit/813f468a14fb84af43c1f8fc0a1430277358eba2 + +Signed-off-by: Jörg Krause +--- + mkspecs/linux-g++/qplatformdefs.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h +index de751dd..d4146ed 100644 +--- a/mkspecs/linux-g++/qplatformdefs.h ++++ b/mkspecs/linux-g++/qplatformdefs.h +@@ -86,10 +86,10 @@ + + #undef QT_SOCKLEN_T + +-#if defined(__GLIBC__) && (__GLIBC__ >= 2) +-#define QT_SOCKLEN_T socklen_t +-#else ++#if defined(__GLIBC__) && (__GLIBC__ < 2) + #define QT_SOCKLEN_T int ++#else ++#define QT_SOCKLEN_T socklen_t + #endif + + #if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE >= 500) +-- +2.8.0 + diff --git a/package/qt/0011-Link-with-ldl-option-only-when-it-is-supported.patch b/package/qt/0011-Link-with-ldl-option-only-when-it-is-supported.patch new file mode 100644 index 0000000000..f3d47f754e --- /dev/null +++ b/package/qt/0011-Link-with-ldl-option-only-when-it-is-supported.patch @@ -0,0 +1,116 @@ +From 438f088ad520ac91ae47dba9a515ab0d1088c89c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Fri, 15 Apr 2016 03:32:02 +0200 +Subject: [PATCH] Link with -ldl option only when it is supported +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +`-ldl` option is used unconditionally in `QMAKE_LIBS_DYNLOAD` while libdl is +not supported when libc is static. As the value of `QMAKE_LIBS_DYNLOAD` goes +into 'Libs.private' field of the pkgconfig files created by qmake, static +linking with qt will fail with: + /usr/bin/ld: cannot find -ldl + +Fix this issue by adding a build test to configure to check if libdl is +supported. `QMAKE_LIBS_DYNLOAD` in "src/corelib/plugin/plugin.pri" is now used +only if libdl is available. + +Backported from Qt5: +https://github.com/qtproject/qtbase/commit/f669ea0d54302de31456d57286aa0e4ca1443e98 + +Signed-off-by: Jörg Krause +--- + config.tests/unix/libdl/libdl.cpp | 39 +++++++++++++++++++++++++++++++++++++++ + config.tests/unix/libdl/libdl.pro | 3 +++ + configure | 6 ++++++ + src/corelib/plugin/plugin.pri | 2 +- + 4 files changed, 49 insertions(+), 1 deletion(-) + create mode 100644 config.tests/unix/libdl/libdl.cpp + create mode 100644 config.tests/unix/libdl/libdl.pro + +diff --git a/config.tests/unix/libdl/libdl.cpp b/config.tests/unix/libdl/libdl.cpp +new file mode 100644 +index 0000000..28a8233 +--- /dev/null ++++ b/config.tests/unix/libdl/libdl.cpp +@@ -0,0 +1,39 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2015 The Qt Company Ltd. ++** Contact: http://www.qt.io/licensing/ ++** ++** This file is part of the config.tests of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:LGPL21$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and The Qt Company. For licensing terms ++** and conditions see http://www.qt.io/terms-conditions. For further ++** information use the contact form at http://www.qt.io/contact-us. ++** ++** GNU Lesser General Public License Usage ++** Alternatively, this file may be used under the terms of the GNU Lesser ++** General Public License version 2.1 or version 3 as published by the Free ++** Software Foundation and appearing in the file LICENSE.LGPLv21 and ++** LICENSE.LGPLv3 included in the packaging of this file. Please review the ++** following information to ensure the GNU Lesser General Public License ++** requirements will be met: https://www.gnu.org/licenses/lgpl.html and ++** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ++** ++** As a special exception, The Qt Company gives you certain additional ++** rights. These rights are described in The Qt Company LGPL Exception ++** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++#include ++ ++int main(int, char **) ++{ ++ dlopen(0, 0); ++} +diff --git a/config.tests/unix/libdl/libdl.pro b/config.tests/unix/libdl/libdl.pro +new file mode 100644 +index 0000000..a643934 +--- /dev/null ++++ b/config.tests/unix/libdl/libdl.pro +@@ -0,0 +1,3 @@ ++SOURCES = libdl.cpp ++CONFIG -= qt dylib ++LIBS += -ldl +\ No newline at end of file +diff --git a/configure b/configure +index 10ad7ca..1c70691 100755 +--- a/configure ++++ b/configure +@@ -5506,6 +5506,12 @@ if [ "$CFG_LIBPNG" = "auto" ]; then + fi + fi + ++# detect dl ++if ! compileTest unix/libdl "libdl"; then ++ QMakeVar add DEFINES QT_NO_DYNAMIC_LIBRARY ++ QMAKE_CONFIG="$QMAKE_CONFIG no-libdl" ++fi ++ + # detect accessibility + if [ "$CFG_ACCESSIBILITY" = "auto" ]; then + if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then +diff --git a/src/corelib/plugin/plugin.pri b/src/corelib/plugin/plugin.pri +index eb7a7f7..c342f2e 100644 +--- a/src/corelib/plugin/plugin.pri ++++ b/src/corelib/plugin/plugin.pri +@@ -32,4 +32,4 @@ integrity { + SOURCES += plugin/qlibrary_unix.cpp + } + +-LIBS_PRIVATE += $$QMAKE_LIBS_DYNLOAD ++!no-libdl: LIBS_PRIVATE += $$QMAKE_LIBS_DYNLOAD +-- +2.8.0 + diff --git a/package/qt/Config.gfx.in b/package/qt/Config.gfx.in new file mode 100644 index 0000000000..70adeef2ff --- /dev/null +++ b/package/qt/Config.gfx.in @@ -0,0 +1,31 @@ +menu "Graphics drivers" + +config BR2_PACKAGE_QT_GFX_LINUXFB + bool "Linux Framebuffer" + default y + +config BR2_PACKAGE_QT_GFX_TRANSFORMED + bool "Transformed" + +config BR2_PACKAGE_QT_GFX_QVFB + bool "Qt Virtual Framebuffer" + +config BR2_PACKAGE_QT_GFX_VNC + bool "VNC" + +config BR2_PACKAGE_QT_GFX_MULTISCREEN + bool "multiscreen" + +comment "directfb Qt driver not available (need directfb)" + depends on !BR2_PACKAGE_DIRECTFB + +config BR2_PACKAGE_QT_GFX_DIRECTFB + depends on BR2_PACKAGE_DIRECTFB + bool "directFB" + +config BR2_PACKAGE_QT_GFX_POWERVR + depends on BR2_PACKAGE_QT_OPENGL_ES + depends on BR2_PACKAGE_HAS_POWERVR + bool "powervr" + +endmenu diff --git a/package/qt/Config.in b/package/qt/Config.in new file mode 100644 index 0000000000..0ab8417b86 --- /dev/null +++ b/package/qt/Config.in @@ -0,0 +1,508 @@ +comment "qt needs a toolchain w/ C++, threads" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS + +menuconfig BR2_PACKAGE_QT + bool "Qt" + depends on BR2_USE_MMU # fork + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Qt is a cross-platform application and UI framework for + developers using C++. + + http://qt-project.org + +if BR2_PACKAGE_QT + +choice + prompt "Qt installation" + help + Selects the type of installation: standard or embedded + +config BR2_PACKAGE_QT_EMBEDDED + bool "Qt embedded" + help + The embedded Qt installation targets embedded systems without X.org. + Provides backends for framebuffer. + If unsure, say Y. + +comment "Qt standard (X11) not available (need X.org)" + depends on !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_QT_X11 + bool "Qt standard (X11)" + depends on BR2_PACKAGE_XORG7 + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_XLIB_LIBXI + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXCURSOR + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXV + select BR2_PACKAGE_QT_SYSTEMFREETYPE + select BR2_PACKAGE_QT_GUI_MODULE + help + The standard Qt installation provides X.org backend. If you don't want to + use X.org, say N. + +endchoice + +config BR2_PACKAGE_QT_DEBUG + bool "Compile with debug support" + help + If unsure, say N. + +config BR2_PACKAGE_QT_DEMOS + bool "Compile and install Qt demos (with code)" + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module + select BR2_PACKAGE_QT_GUI_MODULE + help + If unsure, say N. + +config BR2_PACKAGE_QT_TRANSLATION_FILES + bool "Install translation files" + help + Install binary .qm translation files. + Say y if you need these files. They will take about 8 MB + on the target root filesystem. + +config BR2_PACKAGE_QT_EXAMPLES + bool "Compile and install Qt examples (with code)" + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # Qt GUI module + select BR2_PACKAGE_QT_GUI_MODULE + help + If unsure, say N. + +choice + prompt "Library type" + help + Selects the library type: Shared or Static + +config BR2_PACKAGE_QT_SHARED + bool "Shared library" + depends on !BR2_STATIC_LIBS + help + Create and use shared Qt libraries. + If you have multiple programs that depend on Qt or intend to use + plugins, say Y. + +config BR2_PACKAGE_QT_STATIC + bool "Static Library" + help + Create and use static Qt libraries. + If you don't have multiple programs on the target that depends on + Qt, then this will save you quite some of storage space. + If unsure, say Y. + +endchoice + +config BR2_PACKAGE_QT_LICENSE_APPROVED + bool "Approve free license" + help + Select this if you approve one of the available free licenses for the + Qt4 library. + By doing this you will not be asked while the library is compiled. + Please read and understand the license terms before approving this. + + LGPL v2.1: http://doc.trolltech.com/4.5/lgpl.html + GPL v3.0: http://doc.trolltech.com/4.5/gpl.html + +config BR2_PACKAGE_QT_CONFIG_FILE + string "Config file" + help + Configure options allow to set which modules are being + compiled or not in Qt, but Qt also provide a more + fine-grained mechanism to configure which features should be + enabled or disabled, through a header file. Examples of such + header files can be found in src/corelib/global/qconfig-*.h + in the Qt sources. + + This option allows to set the path of such a configuration + file, which Buildroot will give to Qt at compile time. + +config BR2_PACKAGE_QT_QT3SUPPORT + bool "Compatibility with Qt3" + depends on BR2_PACKAGE_QT_GUI_MODULE + help + Turns on support for older Qt3. This will create an additional + library with proxy code and increase the space required on target. + If unsure say n. + +config BR2_PACKAGE_QT_GUI_MODULE + bool "Gui Module" + depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # nios2 Binutils 2.25.1 bug + select BR2_PACKAGE_QT_NETWORK + default y + help + Turns on support for Gui applications. If your board doesn't have + video output, or you don't require Qt GUI, say n. + +comment "Qt Gui Module needs a toolchain not affected by Binutils bug 19405" + depends on BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 + +if BR2_PACKAGE_QT_GUI_MODULE + +if BR2_PACKAGE_QT_EMBEDDED + +menu "Pixel depths" +comment "Deselecting each option leads to Qt's default (8,16,32)" + +config BR2_PACKAGE_QT_PIXEL_DEPTH_1 + bool "1 bpp, black/white" + +config BR2_PACKAGE_QT_PIXEL_DEPTH_4 + bool "4 bpp, grayscale" + +config BR2_PACKAGE_QT_PIXEL_DEPTH_8 + bool "8 bpp, paletted" + default y + +config BR2_PACKAGE_QT_PIXEL_DEPTH_12 + bool "12 bpp, rgb 4-4-4" + +config BR2_PACKAGE_QT_PIXEL_DEPTH_15 + bool "15 bpp, rgb 5-5-5" + +config BR2_PACKAGE_QT_PIXEL_DEPTH_16 + bool "16 bpp, rgb 5-6-5" + default y + +config BR2_PACKAGE_QT_PIXEL_DEPTH_18 + bool "18 bpp, rgb 6-6-6" + +config BR2_PACKAGE_QT_PIXEL_DEPTH_24 + bool "24 bpp, rgb 8-8-8" + +config BR2_PACKAGE_QT_PIXEL_DEPTH_32 + bool "32 bpp, argb 8-8-8-8 and rgb 8-8-8" + default y + +endmenu + +menu "Fonts" + +config BR2_PACKAGE_QT_FONT_MICRO + bool "micro" + default y + +config BR2_PACKAGE_QT_FONT_FIXED + bool "fixed" + default y + +config BR2_PACKAGE_QT_FONT_HELVETICA + bool "helvetica" + default y + +config BR2_PACKAGE_QT_FONT_JAPANESE + bool "japanese" + +config BR2_PACKAGE_QT_FONT_UNIFONT + bool "unicode" + +endmenu + +endif # BR2_PACKAGE_QT_EMBEDDED + +choice + prompt "freetype2 support" + default BR2_PACKAGE_QT_NOFREETYPE + help + Select freetype2 support. + +config BR2_PACKAGE_QT_NOFREETYPE + bool "no freetype2 support" + depends on BR2_PACKAGE_QT_EMBEDDED + help + Do not compile in Freetype2 support. + +comment "Qt freetype2 needs Qt embedded" + depends on BR2_PACKAGE_QT_X11 + +config BR2_PACKAGE_QT_QTFREETYPE + bool "Qt freetype2" + depends on BR2_PACKAGE_QT_EMBEDDED + help + Use the libfreetype bundled with Qt. + +config BR2_PACKAGE_QT_SYSTEMFREETYPE + bool "System freetype2" + select BR2_PACKAGE_FREETYPE + help + Use shared libfreetype from the target system. + See http://www.freetype.org/ +endchoice + +config BR2_PACKAGE_QT_GIF + bool "Enable GIF support" + help + This compiles and installs the plugin for GIF reading support. + +config BR2_PACKAGE_QT_LIBMNG + bool "Enable libmng support" + help + This compiles and installs the plugin for MNG support. + +choice + prompt "JPEG support" + default BR2_PACKAGE_QT_NOJPEG + help + Select libjpeg support. + +config BR2_PACKAGE_QT_NOJPEG + bool "No jpeg support" + help + Disable JPEG support + +config BR2_PACKAGE_QT_SYSTEMJPEG + select BR2_PACKAGE_JPEG + bool "System libjpeg" + help + Link against system libjpeg + +config BR2_PACKAGE_QT_QTJPEG + bool "Use Qt bundled libjpeg" + help + Link against libjpeg proveded with Qt +endchoice + +choice + prompt "PNG support" + default BR2_PACKAGE_QT_NOPNG + help + Select which library to use if PNG support should be enabled. + +config BR2_PACKAGE_QT_NOPNG + bool "No PNG support" + +config BR2_PACKAGE_QT_SYSTEMPNG + bool "System libpng" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_QT_QTPNG + bool "Use Qt bundled libpng" +endchoice + +choice + prompt "TIFF support" + default BR2_PACKAGE_QT_NOTIFF + help + Select which library to use if TIFF support should be enabled. + +config BR2_PACKAGE_QT_NOTIFF + bool "No TIFF support" + +config BR2_PACKAGE_QT_SYSTEMTIFF + bool "System libtiff" + select BR2_PACKAGE_TIFF + +config BR2_PACKAGE_QT_QTTIFF + bool "Use Qt bundled libtiff" +endchoice + +endif # BR2_PACKAGE_QT_GUI_MODULE + +choice + prompt "zlib support" + default BR2_PACKAGE_QT_QTZLIB + help + Select zlib support. + +config BR2_PACKAGE_QT_QTZLIB + bool "Qt zlib" + help + Use the zlib bundled with Qt. + +config BR2_PACKAGE_QT_SYSTEMZLIB + bool "System zlib" + select BR2_PACKAGE_ZLIB + help + Use the shared zlib from the system. +endchoice + +source "package/qt/Config.sql.in" +if BR2_PACKAGE_QT_GUI_MODULE +if BR2_PACKAGE_QT_EMBEDDED +source "package/qt/Config.gfx.in" +source "package/qt/Config.mouse.in" +source "package/qt/Config.keyboard.in" +endif + +config BR2_PACKAGE_QT_PHONON + bool "Phonon Module" + depends on BR2_PACKAGE_GSTREAMER + select BR2_PACKAGE_GST_PLUGINS_BASE + default y + help + Build the Phonon module. Support for different audio/video + formats can be configured at the GStreamer package. + If unsure, say n. + +comment "Phonon module needs gstreamer" + depends on !BR2_PACKAGE_GSTREAMER + +config BR2_PACKAGE_QT_PHONON_BACKEND + bool "Phonon Module Backend" + depends on BR2_PACKAGE_QT_PHONON + help + Build the platform Phonon plugin. + If unsure, say n. + +config BR2_PACKAGE_QT_OPENGL_ES + bool "OpenGL ES v2.x support" + depends on BR2_PACKAGE_HAS_LIBGLES + depends on BR2_PACKAGE_HAS_LIBEGL + help + Enable the OpenGL ES v2.x support. + +endif + +config BR2_PACKAGE_QT_DBUS + bool "DBus Module" + select BR2_PACKAGE_DBUS + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus + depends on BR2_USE_MMU # dbus + help + Build the Qt DBus module. + +comment "DBus Module needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_QT_XML + bool "XML Module" + default y + help + Build the XML module. + +config BR2_PACKAGE_QT_XMLPATTERNS + bool "XML Patterns Module" + depends on BR2_PACKAGE_QT_XML + help + Build QtXmlPatterns module. + If unsure, say n + +config BR2_PACKAGE_QT_MULTIMEDIA + bool "Multimedia Module" + depends on BR2_PACKAGE_QT_GUI_MODULE + help + Build QtMultimedia module. + +config BR2_PACKAGE_QT_AUDIO_BACKEND + bool "QtMultimedia Audio backend" + depends on BR2_PACKAGE_QT_MULTIMEDIA + select BR2_PACKAGE_ALSA_LIB + depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib + help + Build the ALSA audio backend into QtMultimedia + +config BR2_PACKAGE_QT_SVG + bool "SVG Module" + depends on BR2_PACKAGE_QT_GUI_MODULE + help + Build the SVG module. + If unsure, say n + +config BR2_PACKAGE_QT_NETWORK + bool "Network Module" + default y + help + Install the Network module. + if unsure, say y + +config BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT + bool + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + # see src/3rdparty/webkit/Source/JavaScriptCore/wtf/Platform.h + # see http://lists.busybox.net/pipermail/buildroot/2014-November/112605.html + default y if BR2_arc || BR2_arm || BR2_armeb || BR2_i386 || BR2_microblazeel || \ + BR2_microblazebe || BR2_mips || BR2_mipsel || \ + (BR2_mips64 || BR2_mips64el) && !BR2_MIPS_NABI32 || BR2_powerpc || \ + BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64 + # The CodeSourcery SuperH toolchain fails to build Webkit, + # with an assertion failure in binutils. + default y if (BR2_sh4 || BR2_sh4eb || BR2_sh4a || BR2_sh4aeb) && \ + !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH + +config BR2_PACKAGE_QT_WEBKIT + bool "WebKit Module" + depends on BR2_PACKAGE_QT_SCRIPT + depends on BR2_PACKAGE_QT_SHARED + depends on BR2_PACKAGE_QT_GUI_MODULE + depends on BR2_PACKAGE_QT_NETWORK + depends on BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # needs pthread_getattr_np() + help + Build the WebKit module. + If unsure, say n. + +comment "WebKit needs shared library/NPTL toolchain/script/gui/network support" + depends on !(BR2_PACKAGE_QT_SCRIPT && BR2_PACKAGE_QT_SHARED && \ + BR2_PACKAGE_QT_GUI_MODULE && BR2_PACKAGE_QT_NETWORK) + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_PACKAGE_QT_ARCH_SUPPORTS_WEBKIT + +config BR2_PACKAGE_QT_STL + bool "STL support" + help + Compile STL support. + If unsure, say n. + +config BR2_PACKAGE_QT_OPENSSL + bool "Enable OpenSSL support" + depends on BR2_PACKAGE_QT_NETWORK + select BR2_PACKAGE_OPENSSL + help + Enable support for the OpenSSL encryption library. If you use + QSslSocket say y here, otherwise, say no to save space on the + target. + If unsure, say n. + +config BR2_PACKAGE_QT_ARCH_SUPPORTS_SCRIPT + bool + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + # see http://lists.busybox.net/pipermail/buildroot/2014-November/112605.html + default y if BR2_arc || BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || \ + BR2_microblazeel || BR2_microblazebe || BR2_mips || BR2_mipsel || \ + BR2_mips64 || BR2_mips64el || BR2_nios2 || BR2_powerpc || \ + BR2_powerpc64 || BR2_powerpc64le || BR2_sh4 || BR2_sh4eb || \ + BR2_sh4a || BR2_sh4aeb || BR2_x86_64 + +config BR2_PACKAGE_QT_SCRIPT + bool "Script Module" + depends on BR2_PACKAGE_QT_ARCH_SUPPORTS_SCRIPT + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # needs pthread_getattr_np() + default y + help + Build the Qt Script module. + if unsure, say y. + +comment "Script Module needs a toolchain with NPTL" + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_PACKAGE_QT_ARCH_SUPPORTS_SCRIPT + +config BR2_PACKAGE_QT_SCRIPTTOOLS + bool "Script Tools Module" + depends on BR2_PACKAGE_QT_SCRIPT + depends on BR2_PACKAGE_QT_GUI_MODULE + help + Build the Qt Script Tools module. + if unsure, say n. + +config BR2_PACKAGE_QT_DECLARATIVE + bool "Declarative module" + depends on BR2_PACKAGE_QT_SCRIPT + depends on BR2_PACKAGE_QT_GUI_MODULE + depends on BR2_PACKAGE_QT_SQL_MODULE + help + Build the Qt Declarative Module for qml support + if unsure, say n. + +config BR2_PACKAGE_QT_TEST + bool "Test Module" + help + Install the Test module. + +endif # BR2_PACKAGE_QT diff --git a/package/qt/Config.keyboard.in b/package/qt/Config.keyboard.in new file mode 100644 index 0000000000..b0425471ed --- /dev/null +++ b/package/qt/Config.keyboard.in @@ -0,0 +1,12 @@ +menu "Keyboard drivers" + +config BR2_PACKAGE_QT_KEYBOARD_TTY + bool "tty" + +config BR2_PACKAGE_QT_KEYBOARD_LINUXINPUT + bool "linux input" + +config BR2_PACKAGE_QT_KEYBOARD_QVFB + bool "qvfb" + +endmenu diff --git a/package/qt/Config.mouse.in b/package/qt/Config.mouse.in new file mode 100644 index 0000000000..11da956f62 --- /dev/null +++ b/package/qt/Config.mouse.in @@ -0,0 +1,30 @@ +menu "Mouse drivers" + +config BR2_PACKAGE_QT_MOUSE_PC + bool "pc" + +config BR2_PACKAGE_QT_MOUSE_LINUXTP + bool "linuxtp" + +config BR2_PACKAGE_QT_MOUSE_LINUXINPUT + bool "linux input" + +config BR2_PACKAGE_QT_MOUSE_TSLIB + bool "tslib" + select BR2_PACKAGE_TSLIB + depends on !BR2_STATIC_LIBS # tslib + +comment "tslib support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_QT_MOUSE_QVFB + bool "qvfb" + +comment "Mouse Options" + +config BR2_PACKAGE_QT_MOUSE_NO_QWS_CURSOR + bool "Hide the mouse cursor" + help + Do not show the mouse cursor in QWS. + +endmenu diff --git a/package/qt/Config.sql.in b/package/qt/Config.sql.in new file mode 100644 index 0000000000..452edd5133 --- /dev/null +++ b/package/qt/Config.sql.in @@ -0,0 +1,66 @@ +menuconfig BR2_PACKAGE_QT_SQL_MODULE + bool "SQL Module" + help + Compile Qt SQL Module + +if BR2_PACKAGE_QT_SQL_MODULE +config BR2_PACKAGE_QT_MYSQL + bool "MySQL Driver" + select BR2_PACKAGE_MYSQL + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + depends on BR2_USE_MMU # mysql + help + Build MySQL driver + If unsure, say n. + +config BR2_PACKAGE_QT_IBASE + bool "iBase Driver" + depends on BROKEN # libfbclient not in BR + help + Build iBase driver + If unsure, say n. + +config BR2_PACKAGE_QT_ODBC + bool "ODBC Driver" + select BR2_PACKAGE_UNIXODBC + help + Build ODBC driver + If unsure, say n. + +config BR2_PACKAGE_QT_PSQL + bool "PostgreSQL Driver" + select BR2_PACKAGE_POSTGRESQL + depends on !BR2_STATIC_LIBS + help + Build PostgreSQL driver + If unsure, say n. + +comment "PostgreSQL driver needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +choice + prompt "SQLite 3 support" + default BR2_PACKAGE_QT_SQLITE_NONE + help + Select SQLite support. + +config BR2_PACKAGE_QT_SQLITE_NONE + bool "No sqlite support" + help + Do not compile any kind of SQLite support. + +config BR2_PACKAGE_QT_SQLITE_QT + bool "Qt SQLite" + help + Use Qt bundled SQLite support. + +config BR2_PACKAGE_QT_SQLITE_SYSTEM + bool "System SQLite" + select BR2_PACKAGE_SQLITE + help + Use system SQLite. + +endchoice + +endif diff --git a/package/qt/powervr.ini b/package/qt/powervr.ini new file mode 100644 index 0000000000..57863ebc44 --- /dev/null +++ b/package/qt/powervr.ini @@ -0,0 +1,2 @@ +[default] +WindowSystem=libpvrQWSWSEGL.so.1 diff --git a/package/qt/qt.hash b/package/qt/qt.hash new file mode 100644 index 0000000000..301010cae1 --- /dev/null +++ b/package/qt/qt.hash @@ -0,0 +1,3 @@ +# md5 http://download.qt.io/official_releases/qt/4.8/4.8.7/md5sums-4.8.7, sha256 locally computed: +md5 d990ee66bf7ab0c785589776f35ba6ad qt-everywhere-opensource-src-4.8.7.tar.gz +sha256 e2882295097e47fe089f8ac741a95fef47e0a73a3f3cdf21b56990638f626ea0 qt-everywhere-opensource-src-4.8.7.tar.gz diff --git a/package/qt/qt.mk b/package/qt/qt.mk new file mode 100644 index 0000000000..f29a6714bc --- /dev/null +++ b/package/qt/qt.mk @@ -0,0 +1,718 @@ +################################################################################ +# +# Qt Embedded for Linux +# +# This makefile was originally composed by Thomas Lundquist +# Later heavily modified by buildroot developers +# +# BTW, this uses alot of FPU calls and it's pretty slow if you use +# the kernels FPU emulation so it's better to choose soft float in the +# buildroot config (and uClibc.config of course, if you have your own.) +# +################################################################################ + +QT_VERSION_MAJOR = 4.8 +QT_VERSION = $(QT_VERSION_MAJOR).7 +QT_SOURCE = qt-everywhere-opensource-src-$(QT_VERSION).tar.gz +QT_SITE = http://download.qt-project.org/official_releases/qt/$(QT_VERSION_MAJOR)/$(QT_VERSION) +QT_DEPENDENCIES = host-pkgconf +QT_INSTALL_STAGING = YES + +QT_LICENSE := LGPLv2.1 with exceptions or GPLv3 +ifneq ($(BR2_PACKAGE_QT_LICENSE_APPROVED),y) +QT_LICENSE := $(QT_LICENSE) or Digia Qt Commercial license +endif +QT_LICENSE_FILES = LICENSE.LGPL LGPL_EXCEPTION.txt LICENSE.GPL3 + +ifeq ($(BR2_PACKAGE_QT_LICENSE_APPROVED),y) +QT_CONFIGURE_OPTS += -opensource -confirm-license +endif + +QT_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_QT_CONFIG_FILE)) + +ifneq ($(QT_CONFIG_FILE),) +QT_CONFIGURE_OPTS += -qconfig buildroot +endif + +QT_CFLAGS = $(TARGET_CFLAGS) +QT_CXXFLAGS = $(TARGET_CXXFLAGS) +QT_LDFLAGS = $(TARGET_LDFLAGS) + +# Qt has some assembly function that are not present in thumb1 mode: +# Error: selected processor does not support Thumb mode `swp r3,r7,[r4]' +# so, we desactivate thumb mode +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y) +QT_CFLAGS += -marm +QT_CXXFLAGS += -marm +endif + +ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT),y) +QT_CONFIGURE_OPTS += -qt3support +else +QT_CONFIGURE_OPTS += -no-qt3support +endif + +ifeq ($(BR2_PACKAGE_QT_DEMOS),y) +QT_CONFIGURE_OPTS += -demosdir $(TARGET_DIR)/usr/share/qt/demos +else +QT_CONFIGURE_OPTS += -nomake demos +endif +ifeq ($(BR2_PACKAGE_QT_EXAMPLES),y) +QT_CONFIGURE_OPTS += -examplesdir $(TARGET_DIR)/usr/share/qt/examples +else +QT_CONFIGURE_OPTS += -nomake examples +endif + +# ensure glib is built first if enabled for Qt's glib support +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +QT_CONFIGURE_OPTS += -glib +QT_DEPENDENCIES += libglib2 +else +QT_CONFIGURE_OPTS += -no-glib +endif + + +### Pixel depths +QT_PIXEL_DEPTHS = # empty +ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_1),y) +QT_PIXEL_DEPTHS += 1 +endif +ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_4),y) +QT_PIXEL_DEPTHS += 4 +endif +ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_8),y) +QT_PIXEL_DEPTHS += 8 +endif +ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_12),y) +QT_PIXEL_DEPTHS += 12 +endif +ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_15),y) +QT_PIXEL_DEPTHS += 15 +endif +ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_16),y) +QT_PIXEL_DEPTHS += 16 +endif +ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_18),y) +QT_PIXEL_DEPTHS += 18 +endif +ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_24),y) +QT_PIXEL_DEPTHS += 24 +endif +ifeq ($(BR2_PACKAGE_QT_PIXEL_DEPTH_32),y) +QT_PIXEL_DEPTHS += 32 +endif +ifneq ($(QT_PIXEL_DEPTHS),) +QT_CONFIGURE_OPTS += -depths $(subst $(space),$(comma),$(strip $(QT_PIXEL_DEPTHS))) +endif + +### Display drivers +ifeq ($(BR2_PACKAGE_QT_GFX_LINUXFB),y) +QT_CONFIGURE_OPTS += -qt-gfx-linuxfb +else +QT_CONFIGURE_OPTS += -no-gfx-linuxfb +endif +ifeq ($(BR2_PACKAGE_QT_GFX_TRANSFORMED),y) +QT_CONFIGURE_OPTS += -qt-gfx-transformed +else +QT_CONFIGURE_OPTS += -no-gfx-transformed +endif +ifeq ($(BR2_PACKAGE_QT_GFX_QVFB),y) +QT_CONFIGURE_OPTS += -qt-gfx-qvfb +else +QT_CONFIGURE_OPTS += -no-gfx-qvfb +endif +ifeq ($(BR2_PACKAGE_QT_GFX_VNC),y) +QT_CONFIGURE_OPTS += -qt-gfx-vnc +else +QT_CONFIGURE_OPTS += -no-gfx-vnc +endif +ifeq ($(BR2_PACKAGE_QT_GFX_MULTISCREEN),y) +QT_CONFIGURE_OPTS += -qt-gfx-multiscreen +else +QT_CONFIGURE_OPTS += -no-gfx-multiscreen +endif +ifeq ($(BR2_PACKAGE_QT_GFX_DIRECTFB),y) +QT_CONFIGURE_OPTS += -qt-gfx-directfb +QT_DEPENDENCIES += directfb +else +QT_CONFIGURE_OPTS += -no-gfx-directfb +endif +ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR),y) +QT_CONFIGURE_OPTS += \ + -plugin-gfx-powervr -D QT_NO_QWS_CURSOR -D QT_QWS_CLIENTBLIT +QT_DEPENDENCIES += powervr +endif + +### Mouse drivers +ifeq ($(BR2_PACKAGE_QT_MOUSE_PC),y) +QT_CONFIGURE_OPTS += -qt-mouse-pc +else +QT_CONFIGURE_OPTS += -no-mouse-pc +endif +ifeq ($(BR2_PACKAGE_QT_MOUSE_LINUXTP),y) +QT_CONFIGURE_OPTS += -qt-mouse-linuxtp +else +QT_CONFIGURE_OPTS += -no-mouse-linuxtp +endif +ifeq ($(BR2_PACKAGE_QT_MOUSE_LINUXINPUT),y) +QT_CONFIGURE_OPTS += -qt-mouse-linuxinput +else +QT_CONFIGURE_OPTS += -no-mouse-linuxinput +endif +ifeq ($(BR2_PACKAGE_QT_MOUSE_TSLIB),y) +QT_CONFIGURE_OPTS += -qt-mouse-tslib +QT_DEPENDENCIES += tslib +else +QT_CONFIGURE_OPTS += -no-mouse-tslib +endif +ifeq ($(BR2_PACKAGE_QT_MOUSE_QVFB),y) +QT_CONFIGURE_OPTS += -qt-mouse-qvfb +else +QT_CONFIGURE_OPTS += -no-mouse-qvfb +endif +ifeq ($(BR2_PACKAGE_QT_MOUSE_NO_QWS_CURSOR),y) +QT_CONFIGURE_OPTS += -D QT_NO_QWS_CURSOR +endif + +### Keyboard drivers +ifeq ($(BR2_PACKAGE_QT_KEYBOARD_TTY),y) +QT_CONFIGURE_OPTS += -qt-kbd-tty +else +QT_CONFIGURE_OPTS += -no-kbd-tty +endif +ifeq ($(BR2_PACKAGE_QT_KEYBOARD_LINUXINPUT),y) +QT_CONFIGURE_OPTS += -qt-kbd-linuxinput +else +QT_CONFIGURE_OPTS += -no-kbd-linuxinput +endif +ifeq ($(BR2_PACKAGE_QT_KEYBOARD_QVFB),y) +QT_CONFIGURE_OPTS += -qt-kbd-qvfb +else +QT_CONFIGURE_OPTS += -no-kbd-qvfb +endif + +ifeq ($(BR2_PACKAGE_QT_DEBUG),y) +QT_CONFIGURE_OPTS += -debug +else +QT_CONFIGURE_OPTS += -release +endif + +ifeq ($(BR2_PACKAGE_QT_SHARED),y) +QT_CONFIGURE_OPTS += -shared +else +QT_CONFIGURE_OPTS += -static +endif + +ifeq ($(BR2_STATIC_LIBS),y) +QT_CONFIGURE_OPTS += -D QT_NO_DYNAMIC_LIBRARY +endif + +ifeq ($(BR2_ENDIAN),"LITTLE") +QT_CONFIGURE_OPTS += -little-endian +else +QT_CONFIGURE_OPTS += -big-endian +endif + +ifeq ($(BR2_arm)$(BR2_armeb),y) +QT_EMB_PLATFORM = arm +else ifeq ($(BR2_i386),y) +QT_EMB_PLATFORM = x86 +else ifeq ($(BR2_x86_64),y) +QT_EMB_PLATFORM = x86_64 +else ifeq ($(BR2_mips)$(BR2_mipsel),y) +QT_EMB_PLATFORM = mips +else ifeq ($(BR2_powerpc),y) +QT_EMB_PLATFORM = powerpc +else ifeq ($(BR2_sh4)$(BR2_sh4eb)$(BR2_sh4a)$(BR2_sh4aeb),y) +QT_EMB_PLATFORM = sh +else +QT_EMB_PLATFORM = generic +endif + +ifeq ($(BR2_PACKAGE_QT_X11),y) +QT_DEPENDENCIES += fontconfig xlib_libXi xlib_libX11 xlib_libXrender \ + xlib_libXcursor xlib_libXrandr xlib_libXext xlib_libXv +# Using pkg-config avoids us some logic to redefine and sed again mkspecs files +# to add X11 include path and link options +QT_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags x11` +QT_CXXFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags x11` +QT_LDFLAGS += `$(PKG_CONFIG_HOST_BINARY) --libs x11 xext` +QT_CONFIGURE_OPTS += -arch $(QT_EMB_PLATFORM) \ + -xplatform qws/linux-$(QT_EMB_PLATFORM)-g++ -x11 -no-gtkstyle -no-sm \ + -no-openvg +else # if BR2_PACKAGE_QT_EMBEDDED +QT_CONFIGURE_OPTS += -embedded $(QT_EMB_PLATFORM) +endif + +ifneq ($(BR2_PACKAGE_QT_GUI_MODULE),y) +QT_CONFIGURE_OPTS += -no-gui +endif + +ifneq ($(BR2_PACKAGE_QT_GIF),y) +QT_CONFIGURE_OPTS += -no-gif +endif + +ifeq ($(BR2_PACKAGE_QT_LIBMNG),y) +QT_CONFIGURE_OPTS += -qt-libmng +else +QT_CONFIGURE_OPTS += -no-libmng +endif + +ifeq ($(BR2_PACKAGE_QT_QTZLIB),y) +QT_CONFIGURE_OPTS += -qt-zlib +else +ifeq ($(BR2_PACKAGE_QT_SYSTEMZLIB),y) +QT_CONFIGURE_OPTS += -system-zlib +QT_DEPENDENCIES += zlib +endif +endif + +ifeq ($(BR2_PACKAGE_QT_QTJPEG),y) +QT_CONFIGURE_OPTS += -qt-libjpeg +else +ifeq ($(BR2_PACKAGE_QT_SYSTEMJPEG),y) +QT_CONFIGURE_OPTS += -system-libjpeg +QT_DEPENDENCIES += jpeg +else +QT_CONFIGURE_OPTS += -no-libjpeg +endif +endif + +ifeq ($(BR2_PACKAGE_QT_QTPNG),y) +QT_CONFIGURE_OPTS += -qt-libpng +else +ifeq ($(BR2_PACKAGE_QT_SYSTEMPNG),y) +QT_CONFIGURE_OPTS += -system-libpng +QT_DEPENDENCIES += libpng +else +QT_CONFIGURE_OPTS += -no-libpng +endif +endif + +ifeq ($(BR2_PACKAGE_QT_QTTIFF),y) +QT_CONFIGURE_OPTS += -qt-libtiff +else +ifeq ($(BR2_PACKAGE_QT_SYSTEMTIFF),y) +QT_CONFIGURE_OPTS += -system-libtiff +QT_DEPENDENCIES += tiff +else +QT_CONFIGURE_OPTS += -no-libtiff +endif +endif + +QT_FONTS = $(addprefix $(STAGING_DIR)/usr/lib/fonts/, $(addsuffix *.qpf, \ + $(if $(BR2_PACKAGE_QT_FONT_MICRO),micro) \ + $(if $(BR2_PACKAGE_QT_FONT_FIXED),fixed) \ + $(if $(BR2_PACKAGE_QT_FONT_HELVETICA),helvetica) \ + $(if $(BR2_PACKAGE_QT_FONT_JAPANESE),japanese) \ + $(if $(BR2_PACKAGE_QT_FONT_UNIFONT),unifont))) + +ifeq ($(BR2_PACKAGE_QT_QTFREETYPE),y) +QT_CONFIGURE_OPTS += -qt-freetype +else +ifeq ($(BR2_PACKAGE_QT_SYSTEMFREETYPE),y) +QT_CONFIGURE_OPTS += -system-freetype +QT_CONFIGURE_OPTS += -I $(STAGING_DIR)/usr/include/freetype2/ +QT_DEPENDENCIES += freetype +else +QT_CONFIGURE_OPTS += -no-freetype +endif +endif + +ifeq ($(BR2_PACKAGE_QT_DBUS),y) +QT_DEPENDENCIES += dbus +endif + +ifeq ($(BR2_PACKAGE_QT_OPENSSL),y) +QT_CONFIGURE_OPTS += -openssl +QT_DEPENDENCIES += openssl +else +QT_CONFIGURE_OPTS += -no-openssl +endif + +ifeq ($(BR2_PACKAGE_QT_OPENGL_ES),y) +QT_CONFIGURE_OPTS += -opengl es2 -egl +QT_DEPENDENCIES += libgles libegl +QT_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags egl` +QT_CXXFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags egl` +QT_LDFLAGS += `$(PKG_CONFIG_HOST_BINARY) --libs egl` +else +QT_CONFIGURE_OPTS += -no-opengl +endif + +# Qt SQL Drivers +ifeq ($(BR2_PACKAGE_QT_SQL_MODULE),y) +ifeq ($(BR2_PACKAGE_QT_IBASE),y) +QT_CONFIGURE_OPTS += -qt-sql-ibase +endif +ifeq ($(BR2_PACKAGE_QT_MYSQL),y) +QT_CONFIGURE_OPTS += -qt-sql-mysql -mysql_config $(STAGING_DIR)/usr/bin/mysql_config +QT_DEPENDENCIES += mysql +endif +ifeq ($(BR2_PACKAGE_QT_ODBC),y) +QT_CONFIGURE_OPTS += -qt-sql-odbc +QT_DEPENDENCIES += unixodbc +endif +ifeq ($(BR2_PACKAGE_QT_PSQL),y) +QT_CONFIGURE_OPTS += -qt-sql-psql -psql_config $(STAGING_DIR)/usr/bin/pg_config +QT_DEPENDENCIES += postgresql +endif +ifeq ($(BR2_PACKAGE_QT_SQLITE_QT),y) +QT_CONFIGURE_OPTS += -qt-sql-sqlite +else +ifeq ($(BR2_PACKAGE_QT_SQLITE_SYSTEM),y) +QT_CONFIGURE_OPTS += -system-sqlite +QT_DEPENDENCIES += sqlite +else +QT_CONFIGURE_OPTS += -no-sql-sqlite +endif +endif +ifeq ($(BR2_PACKAGE_QT_SQLITE2),y) +QT_CONFIGURE_OPTS += -qt-sql-sqlite2 +endif +else +# By default, no SQL driver is turned on by configure. +# but it seems sqlite isn't disabled despite what says +# configure --help +QT_CONFIGURE_OPTS += -no-sql-sqlite +endif + +ifeq ($(BR2_PACKAGE_QT_XMLPATTERNS),y) +QT_CONFIGURE_OPTS += -xmlpatterns -exceptions +else +QT_CONFIGURE_OPTS += -no-xmlpatterns +endif + +ifeq ($(BR2_PACKAGE_QT_MULTIMEDIA),y) +QT_CONFIGURE_OPTS += -multimedia +else +QT_CONFIGURE_OPTS += -no-multimedia +endif + +ifeq ($(BR2_PACKAGE_QT_AUDIO_BACKEND),y) +QT_CONFIGURE_OPTS += -audio-backend +QT_DEPENDENCIES += alsa-lib +else +QT_CONFIGURE_OPTS += -no-audio-backend +endif + +ifeq ($(BR2_PACKAGE_QT_PHONON),y) +QT_CONFIGURE_OPTS += -phonon +QT_DEPENDENCIES += gstreamer gst-plugins-base +else +QT_CONFIGURE_OPTS += -no-phonon +endif + +ifeq ($(BR2_PACKAGE_QT_PHONON_BACKEND),y) +QT_CONFIGURE_OPTS += -phonon-backend +else +QT_CONFIGURE_OPTS += -no-phonon-backend +endif + +ifeq ($(BR2_PACKAGE_QT_SVG),y) +QT_CONFIGURE_OPTS += -svg +else +QT_CONFIGURE_OPTS += -no-svg +endif + +ifeq ($(BR2_PACKAGE_QT_WEBKIT),y) +QT_CONFIGURE_OPTS += -webkit +else +QT_CONFIGURE_OPTS += -no-webkit +endif + +ifeq ($(BR2_PACKAGE_QT_SCRIPT),y) +QT_CONFIGURE_OPTS += -script +else +QT_CONFIGURE_OPTS += -no-script +endif + +ifeq ($(BR2_PACKAGE_QT_SCRIPTTOOLS),y) +QT_CONFIGURE_OPTS += -scripttools +else +QT_CONFIGURE_OPTS += -no-scripttools +endif + +ifeq ($(BR2_PACKAGE_QT_STL),y) +QT_CONFIGURE_OPTS += -stl +else +QT_CONFIGURE_OPTS += -no-stl +endif + +ifeq ($(BR2_PACKAGE_QT_DECLARATIVE),y) +QT_CONFIGURE_OPTS += -declarative +else +QT_CONFIGURE_OPTS += -no-declarative +endif + +# -no-pch is needed to workaround the issue described at +# http://comments.gmane.org/gmane.comp.lib.qt.devel/5933. +# In addition, ccache and precompiled headers don't play well together +QT_CONFIGURE_OPTS += -no-pch + +# x86x86fix +# Workaround Qt Embedded bug when crosscompiling for x86 under x86 with linux +# host. It's unclear if this would happen on other hosts. +ifneq ($(findstring linux,$(GNU_HOST_NAME)),) +ifneq ($(findstring x86,$(QT_EMB_PLATFORM)),) +QT_CONFIGURE_OPTS += -platform linux-g++ +endif +endif +# End of workaround. + +# Variable for other Qt applications to use +QT_QMAKE = $(HOST_DIR)/usr/bin/qmake -spec qws/linux-$(QT_EMB_PLATFORM)-g++ + +################################################################################ +# QT_QMAKE_SET -- helper macro to set = in +# the qmake.conf file. Will remove existing variable declaration if +# available. +# +# Argument 1 is the variable name +# Argument 2 is the value to set variable to +# Argument 3 is the base source directory of Qt +# +# E.G. use like this: +# $(call QT_QMAKE_SET,variable,value,directory) +################################################################################ +define QT_QMAKE_SET + $(SED) '/$(1)/d' $(3)/mkspecs/qws/linux-$(QT_EMB_PLATFORM)-g++/qmake.conf + $(SED) "/include.*qws.conf/a$(1) = $(2)" $(3)/mkspecs/qws/linux-$(QT_EMB_PLATFORM)-g++/qmake.conf +endef + +ifneq ($(QT_CONFIG_FILE),) +define QT_CONFIGURE_CONFIG_FILE + cp $(QT_CONFIG_FILE) $(@D)/src/corelib/global/qconfig-buildroot.h +endef +endif + +define QT_CONFIGURE_CMDS + -[ -f $(@D)/Makefile ] && $(MAKE) -C $(@D) confclean + $(QT_CONFIGURE_IPV6) + $(QT_CONFIGURE_CONFIG_FILE) + # Fix compiler path + $(call QT_QMAKE_SET,QMAKE_CC,$(TARGET_CC),$(@D)) + $(call QT_QMAKE_SET,QMAKE_CXX,$(TARGET_CXX),$(@D)) + $(call QT_QMAKE_SET,QMAKE_LINK,$(TARGET_CXX),$(@D)) + $(call QT_QMAKE_SET,QMAKE_LINK_SHLIB,$(TARGET_CXX),$(@D)) + $(call QT_QMAKE_SET,QMAKE_AR,$(TARGET_AR) cqs,$(@D)) + $(call QT_QMAKE_SET,QMAKE_OBJCOPY,$(TARGET_OBJCOPY),$(@D)) + $(call QT_QMAKE_SET,QMAKE_RANLIB,$(TARGET_RANLIB),$(@D)) + $(call QT_QMAKE_SET,QMAKE_STRIP,$(TARGET_STRIP),$(@D)) + $(call QT_QMAKE_SET,QMAKE_CFLAGS,$(QT_CFLAGS),$(@D)) + $(call QT_QMAKE_SET,QMAKE_CXXFLAGS,$(QT_CXXFLAGS),$(@D)) + $(call QT_QMAKE_SET,QMAKE_LFLAGS,$(QT_LDFLAGS),$(@D)) + $(call QT_QMAKE_SET,PKG_CONFIG,$(HOST_DIR)/usr/bin/pkg-config,$(@D)) +# Don't use TARGET_CONFIGURE_OPTS here, qmake would be compiled for the target +# instead of the host then. So set PKG_CONFIG* manually. + (cd $(@D); \ + PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \ + PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \ + $(QT_CONFIGURE_ENV) \ + MAKEFLAGS="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" ./configure \ + $(if $(VERBOSE),-verbose,-silent) \ + -force-pkg-config \ + $(QT_CONFIGURE_OPTS) \ + -no-xinerama \ + -no-cups \ + -no-nis \ + -no-accessibility \ + -no-separate-debug-info \ + -prefix /usr \ + -plugindir /usr/lib/qt/plugins \ + -importdir /usr/lib/qt/imports \ + -translationdir /usr/share/qt/translations \ + -hostprefix $(STAGING_DIR) \ + -fast \ + -no-rpath \ + ) +endef + +define QT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + + +# Build the list of libraries and plugins to install to the target + +QT_INSTALL_LIBS += QtCore +QT_HOST_PROGRAMS += moc rcc qmake lrelease + +ifeq ($(BR2_PACKAGE_QT_GUI_MODULE),y) +QT_INSTALL_LIBS += QtGui +QT_HOST_PROGRAMS += uic +endif +ifeq ($(BR2_PACKAGE_QT_SQL_MODULE),y) +QT_INSTALL_LIBS += QtSql +endif +ifeq ($(BR2_PACKAGE_QT_MULTIMEDIA),y) +QT_INSTALL_LIBS += QtMultimedia +endif +ifeq ($(BR2_PACKAGE_QT_PHONON),y) +QT_INSTALL_LIBS += phonon +endif +ifeq ($(BR2_PACKAGE_QT_SVG),y) +QT_INSTALL_LIBS += QtSvg +endif +ifeq ($(BR2_PACKAGE_QT_NETWORK),y) +QT_INSTALL_LIBS += QtNetwork +endif +ifeq ($(BR2_PACKAGE_QT_WEBKIT),y) +QT_INSTALL_LIBS += QtWebKit +endif +ifeq ($(BR2_PACKAGE_QT_XML),y) +QT_INSTALL_LIBS += QtXml +endif +ifeq ($(BR2_PACKAGE_QT_DBUS),y) +QT_INSTALL_LIBS += QtDBus +endif +ifeq ($(BR2_PACKAGE_QT_XMLPATTERNS),y) +QT_INSTALL_LIBS += QtXmlPatterns +endif +ifeq ($(BR2_PACKAGE_QT_SCRIPT),y) +QT_INSTALL_LIBS += QtScript +endif +ifeq ($(BR2_PACKAGE_QT_SCRIPTTOOLS),y) +QT_INSTALL_LIBS += QtScriptTools +endif +ifeq ($(BR2_PACKAGE_QT_DECLARATIVE),y) +QT_INSTALL_LIBS += QtDeclarative +endif +ifeq ($(BR2_PACKAGE_QT_QT3SUPPORT),y) +QT_INSTALL_LIBS += Qt3Support +endif +ifeq ($(BR2_PACKAGE_QT_OPENGL_ES),y) +QT_INSTALL_LIBS += QtOpenGL +endif +ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR),y) +QT_INSTALL_LIBS += pvrQWSWSEGL +endif +ifeq ($(BR2_PACKAGE_QT_TEST),y) +QT_INSTALL_LIBS += QtTest +endif + +QT_CONF_FILE = $(HOST_DIR)/usr/bin/qt.conf + +# Since host programs and spec files have been moved to $(HOST_DIR), +# we need to tell qmake the new location of the various elements, +# through a qt.conf file. +define QT_INSTALL_QT_CONF + mkdir -p $(dir $(QT_CONF_FILE)) + echo "[Paths]" > $(QT_CONF_FILE) + echo "Prefix=$(HOST_DIR)/usr" >> $(QT_CONF_FILE) + echo "Headers=$(STAGING_DIR)/usr/include" >> $(QT_CONF_FILE) + echo "Libraries=$(STAGING_DIR)/usr/lib" >> $(QT_CONF_FILE) + echo "Data=$(HOST_DIR)/usr" >> $(QT_CONF_FILE) + echo "Binaries=$(HOST_DIR)/usr/bin" >> $(QT_CONF_FILE) +endef + +# After running Qt normal installation process (which installs +# everything in the STAGING_DIR), we move host programs such as qmake, +# rcc or uic to the HOST_DIR so that they are available at the usual +# location. A qt.conf file is generated to make sure that all host +# programs still find all files they need. The .pc files are tuned to +# remove the sysroot path from them, since pkg-config already adds it +# automatically. +define QT_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) install + mkdir -p $(HOST_DIR)/usr/bin + mv $(addprefix $(STAGING_DIR)/usr/bin/,$(QT_HOST_PROGRAMS)) $(HOST_DIR)/usr/bin + ln -sf $(STAGING_DIR)/usr/mkspecs $(HOST_DIR)/usr/mkspecs + $(QT_INSTALL_QT_CONF) + for i in moc uic rcc lupdate lrelease ; do \ + $(SED) "s,^$${i}_location=.*,$${i}_location=$(HOST_DIR)/usr/bin/$${i}," \ + $(STAGING_DIR)/usr/lib/pkgconfig/Qt*.pc ; \ + done + $(SED) "s,$(STAGING_DIR)/,,g" $(STAGING_DIR)/usr/lib/pkgconfig/Qt*.pc +endef + +# Library installation +ifeq ($(BR2_PACKAGE_QT_SHARED),y) +define QT_INSTALL_TARGET_LIBS + mkdir -p $(TARGET_DIR)/usr/lib + for lib in $(QT_INSTALL_LIBS); do \ + cp -dpf $(STAGING_DIR)/usr/lib/lib$${lib}.so.* $(TARGET_DIR)/usr/lib ; \ + done +endef +endif + +# Plugin installation +define QT_INSTALL_TARGET_PLUGINS + if [ -d $(STAGING_DIR)/usr/lib/qt/plugins/ ] ; then \ + mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins ; \ + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins ; \ + fi +endef + +# Import installation +define QT_INSTALL_TARGET_IMPORTS + if [ -d $(STAGING_DIR)/usr/lib/qt/imports/ ] ; then \ + mkdir -p $(TARGET_DIR)/usr/lib/qt/imports ; \ + cp -dpfr $(STAGING_DIR)/usr/lib/qt/imports/* $(TARGET_DIR)/usr/lib/qt/imports ; \ + fi +endef + +# Fonts installation +ifeq ($(BR2_PACKAGE_QT_EMBEDDED),y) +ifneq ($(QT_FONTS),) +define QT_INSTALL_TARGET_FONTS + mkdir -p $(TARGET_DIR)/usr/lib/fonts + cp -dpf $(QT_FONTS) $(TARGET_DIR)/usr/lib/fonts +endef +ifneq ($(BR2_PACKAGE_QT_FONT_MICRO)$(BR2_PACKAGE_QT_FONT_FIXED),) +# as stated in the font source src/3rdparty/fonts/micro.bdf +# source src/3rdparty/fonts/5x7.bdf and source src/3rdparty/fonts/6x13.bdf +QT_LICENSE := $(QT_LICENSE), Public Domain (Micro/Fixed font) +endif +ifneq ($(BR2_PACKAGE_QT_FONT_HELVETICA)$(BR2_PACKAGE_QT_FONT_JAPANESE),) +QT_LICENSE := $(QT_LICENSE), Adobe Helvetica license (Helvetica/Japanese fonts) +QT_LICENSE_FILES += src/3rdparty/fonts/COPYING.Helvetica +endif +ifeq ($(BR2_PACKAGE_QT_FONT_UNIFONT),y) +QT_LICENSE := $(QT_LICENSE), Freeware (Unifont font) +QT_LICENSE_FILES += src/3rdparty/fonts/COPYRIGHT.Unifont +endif +endif # QT_FONTS + +ifeq ($(BR2_PACKAGE_QT_QTFREETYPE)$(BR2_PACKAGE_QT_SYSTEMFREETYPE),y) +define QT_INSTALL_TARGET_FONTS_TTF + mkdir -p $(TARGET_DIR)/usr/lib/fonts + cp -dpf $(STAGING_DIR)/usr/lib/fonts/*.ttf $(TARGET_DIR)/usr/lib/fonts +endef +QT_LICENSE := $(QT_LICENSE), Bitstream license (DejaVu/Vera TrueType fonts) +QT_LICENSE_FILES += src/3rdparty/fonts/COPYRIGHT.DejaVu \ + src/3rdparty/fonts/README.DejaVu \ + src/3rdparty/fonts/COPYRIGHT.Vera +endif +endif # BR2_PACKAGE_QT_EMBEDDED + +ifeq ($(BR2_PACKAGE_QT_GFX_POWERVR),y) +define QT_INSTALL_TARGET_POWERVR + # Note: this overwrites the default powervr.ini provided by the ti-gfx + # package. + $(INSTALL) -D -m 0644 package/qt/powervr.ini \ + $(TARGET_DIR)/etc/powervr.ini +endef +endif + +ifeq ($(BR2_PACKAGE_QT_TRANSLATION_FILES),y) +define QT_INSTALL_TARGET_TRANSLATIONS + if [ -d $(STAGING_DIR)/usr/share/qt/translations/ ] ; then \ + mkdir -p $(TARGET_DIR)/usr/share/qt/translations ; \ + cp -dpfr $(STAGING_DIR)/usr/share/qt/translations/* $(TARGET_DIR)/usr/share/qt/translations ; \ + fi +endef +endif + +define QT_INSTALL_TARGET_CMDS + $(QT_INSTALL_TARGET_LIBS) + $(QT_INSTALL_TARGET_PLUGINS) + $(QT_INSTALL_TARGET_IMPORTS) + $(QT_INSTALL_TARGET_FONTS) + $(QT_INSTALL_TARGET_FONTS_TTF) + $(QT_INSTALL_TARGET_POWERVR) + $(QT_INSTALL_TARGET_TRANSLATIONS) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/Config.in b/package/qt5/Config.in new file mode 100644 index 0000000000..84cbb0fbe6 --- /dev/null +++ b/package/qt5/Config.in @@ -0,0 +1,58 @@ +config BR2_PACKAGE_QT5_GL_AVAILABLE + bool + depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES + default y + +config BR2_PACKAGE_QT5_JSCORE_AVAILABLE + bool + # Javascript engine is only available on certain architectures + depends on BR2_arm || BR2_i386 || BR2_x86_64 || BR2_mipsel + # ARM needs BLX, so v5t+ + depends on !BR2_ARM_CPU_ARMV4 + default y + +comment "Qt5 needs a toolchain w/ wchar, NPTL, C++, dynamic library" + depends on !BR2_PACKAGE_QT + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS + +menuconfig BR2_PACKAGE_QT5 + bool "Qt5" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on !BR2_STATIC_LIBS + depends on !BR2_PACKAGE_QT + select BR2_PACKAGE_QT5BASE + help + This option enables the Qt5 framework. Sub-options allow to + select which modules should be built. + + http://qt.io + +if BR2_PACKAGE_QT5 +source "package/qt5/qt5base/Config.in" +source "package/qt5/qt53d/Config.in" +source "package/qt5/qt5canvas3d/Config.in" +source "package/qt5/qt5connectivity/Config.in" +source "package/qt5/qt5declarative/Config.in" +source "package/qt5/qt5enginio/Config.in" +source "package/qt5/qt5graphicaleffects/Config.in" +source "package/qt5/qt5imageformats/Config.in" +source "package/qt5/qt5location/Config.in" +source "package/qt5/qt5multimedia/Config.in" +source "package/qt5/qt5quickcontrols/Config.in" +source "package/qt5/qt5sensors/Config.in" +source "package/qt5/qt5serialbus/Config.in" +source "package/qt5/qt5serialport/Config.in" +source "package/qt5/qt5svg/Config.in" +source "package/qt5/qt5tools/Config.in" +source "package/qt5/qt5webchannel/Config.in" +source "package/qt5/qt5websockets/Config.in" +source "package/qt5/qt5x11extras/Config.in" +source "package/qt5/qt5xmlpatterns/Config.in" +comment "technology preview" +source "package/qt5/qt5quickcontrols2/Config.in" +comment "legacy compatibility" +source "package/qt5/qt5script/Config.in" +source "package/qt5/qt5webkit/Config.in" +endif diff --git a/package/qt5/qt5.mk b/package/qt5/qt5.mk new file mode 100644 index 0000000000..e43795f0c2 --- /dev/null +++ b/package/qt5/qt5.mk @@ -0,0 +1,22 @@ +QT5_VERSION_MAJOR = 5.6 +QT5_VERSION = $(QT5_VERSION_MAJOR).0 +QT5_SITE = http://download.qt.io/official_releases/qt/$(QT5_VERSION_MAJOR)/$(QT5_VERSION)/submodules +include $(sort $(wildcard package/qt5/*/*.mk)) + +define QT5_LA_PRL_FILES_FIXUP + for i in $$(find $(STAGING_DIR)/usr/lib* -name "libQt5*.la"); do \ + $(SED) "s:$(BASE_DIR):@BASE_DIR@:g" \ + -e "s:$(STAGING_DIR):@STAGING_DIR@:g" \ + -e "s:\(['= ]\)/usr:\\1@STAGING_DIR@/usr:g" \ + -e "s:@STAGING_DIR@:$(STAGING_DIR):g" \ + -e "s:@BASE_DIR@:$(BASE_DIR):g" \ + $$i ; \ + $(SED) "/^dependency_libs=/s%-L/usr/lib %%g" $$i ; \ + done + for i in $$(find $(STAGING_DIR)/usr/lib* -name "libQt5*.prl"); do \ + $(SED) "s%-L/usr/lib%%" $$i; \ + done +endef + +# Variable for other Qt applications to use +QT5_QMAKE = $(HOST_DIR)/usr/bin/qmake -spec devices/linux-buildroot-g++ diff --git a/package/qt5/qt53d/Config.in b/package/qt5/qt53d/Config.in new file mode 100644 index 0000000000..ff50204fc8 --- /dev/null +++ b/package/qt5/qt53d/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_QT53D + bool "qt53d" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_QT5DECLARATIVE + select BR2_PACKAGE_QT5DECLARATIVE_QUICK + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE # qt5declarative + depends on BR2_PACKAGE_QT5_GL_AVAILABLE # qt5declarative_quick + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt53d module. + + Enable the assimp package to gain the assimp sceneparser plugin. + + http://doc.qt.io/qt-5/qt3d-index.html + +comment "qt53d module needs an OpenGL-capable backend" + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + depends on !BR2_PACKAGE_QT5_GL_AVAILABLE diff --git a/package/qt5/qt53d/qt53d.hash b/package/qt5/qt53d/qt53d.hash new file mode 100644 index 0000000000..8d9a3d68f0 --- /dev/null +++ b/package/qt5/qt53d/qt53d.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qt3d-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 b961789daecebed030ad36568301d1fe6c1ad97e9a2726fad5bd96ad603f439d qt3d-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt53d/qt53d.mk b/package/qt5/qt53d/qt53d.mk new file mode 100644 index 0000000000..5dac5b0b62 --- /dev/null +++ b/package/qt5/qt53d/qt53d.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# qt53d +# +################################################################################ + +QT53D_VERSION = $(QT5_VERSION) +QT53D_SITE = $(QT5_SITE) +QT53D_SOURCE = qt3d-opensource-src-$(QT5SVG_VERSION).tar.xz +QT53D_DEPENDENCIES = qt5base qt5declarative +QT53D_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_ASSIMP),y) +QT53D_DEPENDENCIES += assimp +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT53D_LICENSE = GPLv2 or GPLv3 or LGPLv3 +QT53D_LICENSE_FILES = LICENSE.GPL LICENSE.GPLv3 LICENSE.LGPLv3 +else +QT53D_LICENSE = Commercial license +QT53D_REDISTRIBUTE = NO +endif + +define QT53D_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT53D_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT53D_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_STATIC_LIBS),) +define QT53D_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt53D*.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/sceneparsers $(TARGET_DIR)/usr/lib/qt/plugins + cp -dpfr $(STAGING_DIR)/usr/qml/Qt3D $(TARGET_DIR)/usr/qml +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5base/0001-Disable-c-standard-compiler-flags-for-the-host-build.patch b/package/qt5/qt5base/0001-Disable-c-standard-compiler-flags-for-the-host-build.patch new file mode 100644 index 0000000000..54e4db8e67 --- /dev/null +++ b/package/qt5/qt5base/0001-Disable-c-standard-compiler-flags-for-the-host-build.patch @@ -0,0 +1,44 @@ +From e69e69519661954716d59bfa5bbd0626515cfda9 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 3 Mar 2016 15:17:31 +0100 +Subject: [PATCH] Disable c++ standard compiler flags for the host build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +There is no test for c++ standard support for the host build +(only for the target compiler/build) which leads to trouble +in some cross compiling environments (old host compiler, new +cross compiler): + + g++: error: unrecognized command line option ‘-std=c++1z’ + +So disable c++ standard compiler flags unconditionally for host builds. + +Task-number: QTBUG-51644 +Change-Id: Ifb3042e125fe199a7e081740d1171d26ccacf0c5 +Reviewed-by: Oswald Buddenhagen +Signed-off-by: Yegor Yefremov +--- + mkspecs/features/default_post.prf | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf +index cd8d885..561c8f4 100644 +--- a/mkspecs/features/default_post.prf ++++ b/mkspecs/features/default_post.prf +@@ -95,7 +95,10 @@ breakpad { + !isEmpty(QMAKE_STRIP):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t)$$quote($$QMAKE_STRIP $$DEBUGFILENAME) + } + +-c++11|c++14|c++1z { ++# Disable special compiler flags for host builds (needs to be changed for 5.7 ++# to fall back to c++11 because since 5.7 c++11 is required everywhere, ++# including host builds). ++if(!host_build|!cross_compile):if(c++11|c++14|c++1z) { + c++1z: cxxstd = CXX1Z + else: c++14: cxxstd = CXX14 + else: cxxstd = CXX11 +-- +2.1.4 + diff --git a/package/qt5/qt5base/0006-eglfs-rasp-pi-header-inclusion.patch b/package/qt5/qt5base/0006-eglfs-rasp-pi-header-inclusion.patch new file mode 100644 index 0000000000..f1f6d9b0b7 --- /dev/null +++ b/package/qt5/qt5base/0006-eglfs-rasp-pi-header-inclusion.patch @@ -0,0 +1,45 @@ +From 91c3b111e45dd476aba057836b1b618eacf90f3f Mon Sep 17 00:00:00 2001 +From: Julien Corjon +Date: Tue, 21 Jul 2015 09:58:14 +0200 +Subject: [PATCH] eglfs - fix rasp-pi header inclusion + +eglplateform.h include headers for low level instruction and fail on brcm +headers inclusion + For the brcm presence test we use egl pkg-config file + For the eglfs-plugin compilation we use the egl configuration + +Upstream-Status: https://bugreports.qt.io/browse/QTBUG-47339 +Signed-off-by: Julien Corjon +--- + config.tests/qpa/eglfs-brcm/eglfs-brcm.pro | 2 ++ + src/plugins/platforms/eglfs/eglfs-plugin.pro | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro +index ce16a3a..192a8ad 100644 +--- a/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro ++++ b/config.tests/qpa/eglfs-brcm/eglfs-brcm.pro +@@ -1,6 +1,8 @@ + SOURCES = eglfs-brcm.cpp + + CONFIG -= qt ++CONFIG += link_pkgconfig ++PKGCONFIG += egl + + INCLUDEPATH += $$QMAKE_INCDIR_EGL + +diff --git a/src/plugins/platforms/eglfs/eglfs-plugin.pro b/src/plugins/platforms/eglfs/eglfs-plugin.pro +index 0f493fd..8479496 100644 +--- a/src/plugins/platforms/eglfs/eglfs-plugin.pro ++++ b/src/plugins/platforms/eglfs/eglfs-plugin.pro +@@ -6,6 +6,7 @@ PLUGIN_CLASS_NAME = QEglFSIntegrationPlugin + load(qt_plugin) + + QT += platformsupport-private eglfs_device_lib-private ++CONFIG += egl + + SOURCES += $$PWD/qeglfsmain.cpp + +-- +2.1.0 + diff --git a/package/qt5/qt5base/0007-build-with-explicitlib-after-all.patch b/package/qt5/qt5base/0007-build-with-explicitlib-after-all.patch new file mode 100644 index 0000000000..a878ba6451 --- /dev/null +++ b/package/qt5/qt5base/0007-build-with-explicitlib-after-all.patch @@ -0,0 +1,51 @@ +From 523c7e3fd55c853dd424d57f28e225d57439cf89 Mon Sep 17 00:00:00 2001 +From: Oswald Buddenhagen +Date: Thu, 3 Mar 2016 14:12:16 +0100 +Subject: [PATCH] build with explicitlib after all + +unlike speculated in 2fe363514, this is not a workaround at all: it +causes that libraries' public link interfaces (LIBS) are exported in the +first place. unlike with staticlib, this does not export LIBS_PRIVATE, +so it wouldn't even be a particularly effective workaround for rpath +brokenness anyway. + +the problem was pretty well hidden by the qt module system, which at the +level of libraries is pretty redundant with the .prl file handling, +which shows just how stupid the whole "design" is. + +unlike before, we now enable explicitlib for all libraries, not just qt +modules - we enable create_prl for all of them as well, after all. + +an immediate effect of this change is that it fixes linking on RaspPI: +the qtcore headers make the user code require linking libatomic, so we +must add it to our public link interface. + +Task-number: QTBUG-51621 +Change-Id: I5742c88694db8e8a9b79d17222dc6df2b38e5ab2 +Reviewed-by: Joerg Bornemann +Reviewed-by: Allan Sandfeld Jensen + +Upstream: https://codereview.qt-project.org/gitweb?p=qt%2Fqtbase.git;a=commit;h=523c7e3fd55c853dd424d57f28e225d57439cf89 +Signed-off: Peter Seiderer +--- + mkspecs/features/qt_build_config.prf | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/mkspecs/features/qt_build_config.prf b/mkspecs/features/qt_build_config.prf +index 518fd93..b3081b9 100644 +--- a/mkspecs/features/qt_build_config.prf ++++ b/mkspecs/features/qt_build_config.prf +@@ -72,6 +72,10 @@ CONFIG += \ + # However, testcases should be still built with exceptions. + exceptions_off testcase_exceptions + ++# Under Windows, this is neither necessary (transitive deps are automatically ++# resolved), nor functional (.res files end up in .prl files and break things). ++unix: CONFIG += explicitlib ++ + + defineTest(qtBuildPart) { + bp = $$eval($$upper($$section(_QMAKE_CONF_, /, -2, -2))_BUILD_PARTS) +-- +2.7.4 + diff --git a/package/qt5/qt5base/Config.in b/package/qt5/qt5base/Config.in new file mode 100644 index 0000000000..64a7f65386 --- /dev/null +++ b/package/qt5/qt5base/Config.in @@ -0,0 +1,277 @@ +config BR2_PACKAGE_QT5BASE + bool "qt5base" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_PCRE_16 + select BR2_PACKAGE_PCRE_UTF + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5base module, which + contains the base Qt libraries: QtCore, QtNetwork, QtGui, + QtWidgets, etc. + + http://qt.io + +if BR2_PACKAGE_QT5BASE + +config BR2_PACKAGE_QT5BASE_LICENSE_APPROVED + bool "Approve free license" + help + Select this if you approve one of the available free licenses for the + Qt5 library. + By doing this you will not be asked while the library is compiled. + Please read and understand the license terms before approving this. + + LGPL: http://doc.qt.io/qt-5/lgpl.html + + See also http://doc.qt.io/qt-5/licensing.html + +config BR2_PACKAGE_QT5BASE_CONFIG_FILE + string "Config file" + help + Configure options allow to set which modules are being + compiled or not in Qt, but Qt also provide a more + fine-grained mechanism to configure which features should be + enabled or disabled, through a header file. Examples of such + header files can be found in src/corelib/global/qconfig-*.h + in the Qt sources. + + This option allows to set the path of such a configuration + file, which Buildroot will give to Qt at compile time. + +config BR2_PACKAGE_QT5BASE_EXAMPLES + bool "Compile and install examples (with code)" + select BR2_PACKAGE_QT5BASE_NETWORK + select BR2_PACKAGE_QT5BASE_XML + help + If unsure, say N. + +config BR2_PACKAGE_QT5BASE_NETWORK + def_bool y + +config BR2_PACKAGE_QT5BASE_CONCURRENT + bool "concurrent module" + help + This options enables the Qt5Concurrent library. + +config BR2_PACKAGE_QT5BASE_SQL + def_bool y + +if BR2_PACKAGE_QT5BASE_SQL +config BR2_PACKAGE_QT5BASE_MYSQL + bool "MySQL Plugin" + select BR2_PACKAGE_MYSQL + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + depends on BR2_USE_MMU # mysql + help + Build MySQL plugin + If unsure, say n. + +config BR2_PACKAGE_QT5BASE_PSQL + bool "PostgreSQL Plugin" + select BR2_PACKAGE_POSTGRESQL + depends on BR2_USE_MMU # postgresql + depends on !BR2_STATIC_LIBS + help + Build PostgreSQL plugin + If unsure, say n. + +comment "PostgreSQL plugin needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS + +choice + prompt "SQLite 3 support" + default BR2_PACKAGE_QT5BASE_SQLITE_NONE + help + Select SQLite support. + +config BR2_PACKAGE_QT5BASE_SQLITE_NONE + bool "No sqlite support" + help + Do not compile any kind of SQLite support. + +config BR2_PACKAGE_QT5BASE_SQLITE_QT + bool "Qt SQLite" + help + Use Qt bundled SQLite support. + +config BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM + bool "System SQLite" + select BR2_PACKAGE_SQLITE + help + Use system SQLite. + +endchoice + +endif + +config BR2_PACKAGE_QT5BASE_TEST + def_bool y + +config BR2_PACKAGE_QT5BASE_XML + def_bool y + +config BR2_PACKAGE_QT5BASE_GUI + bool "gui module" + # At least one graphic backend must be enabled, so enable + # linuxfb if nothing is enabled. + select BR2_PACKAGE_QT5BASE_LINUXFB if \ + !BR2_PACKAGE_QT5BASE_DIRECTFB && \ + !BR2_PACKAGE_QT5BASE_XCB && \ + !BR2_PACKAGE_QT5BASE_EGLFS + help + This option enables the Qt5Gui library. + +if BR2_PACKAGE_QT5BASE_GUI + +config BR2_PACKAGE_QT5BASE_WIDGETS + bool "widgets module" + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_QT5BASE_XCB + help + This option enables the Qt5Widgets library. + +comment "OpenGL support needs an OpenGL-capable backend" + depends on !BR2_PACKAGE_QT5_GL_AVAILABLE + +config BR2_PACKAGE_QT5BASE_OPENGL + bool "OpenGL support" + depends on BR2_PACKAGE_QT5_GL_AVAILABLE + help + This option enables OpenGL support. + +if BR2_PACKAGE_QT5BASE_OPENGL + +choice + prompt "OpenGL API" + help + Select OpenGL API. + +config BR2_PACKAGE_QT5BASE_OPENGL_DESKTOP + bool "Desktop OpenGL" + depends on BR2_PACKAGE_HAS_LIBGL + help + Use desktop OpenGL. + +config BR2_PACKAGE_QT5BASE_OPENGL_ES2 + bool "OpenGL ES 2.0+" + depends on BR2_PACKAGE_HAS_LIBGLES + help + Use OpenGL ES 2.0 and later versions. + +endchoice + +config BR2_PACKAGE_QT5BASE_OPENGL_LIB + bool "opengl module" + select BR2_PACKAGE_QT5BASE_WIDGETS + help + This option enables the Qt5OpenGL library. This library includes + OpenGL support classes provided to ease porting from Qt 4.x. + +endif + +config BR2_PACKAGE_QT5BASE_LINUXFB + bool "linuxfb support" + +config BR2_PACKAGE_QT5BASE_DIRECTFB + bool "directfb support" + depends on BR2_PACKAGE_DIRECTFB + +comment "directfb backend if directb is enabled" + depends on !BR2_PACKAGE_DIRECTFB + +config BR2_PACKAGE_QT5BASE_XCB + bool "X.org XCB support" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL_IMAGE + select BR2_PACKAGE_XCB_UTIL_KEYSYMS + select BR2_PACKAGE_XCB_UTIL_WM + select BR2_PACKAGE_LIBXKBCOMMON + +comment "X.org XCB backend available if X.org is enabled" + depends on !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_QT5BASE_EGLFS + bool "eglfs support" + select BR2_PACKAGE_QT5BASE_OPENGL + depends on BR2_PACKAGE_HAS_LIBEGL + depends on BR2_PACKAGE_QT5_GL_AVAILABLE + +comment "eglfs backend available if OpenGL and EGL are enabled" + depends on !BR2_PACKAGE_HAS_LIBEGL || !BR2_PACKAGE_QT5_GL_AVAILABLE + +config BR2_PACKAGE_QT5BASE_DEFAULT_QPA + string "Default graphical platform" + help + Choose the default platform abstraction to use for graphical + applications (e.g xcb, linuxfb, eglfs, ...). If this is empty, the + default for your architecture will be used (usually this is eglfs). + + You can get a list of supported platforms by running a Qt application + with the option "-platform help" on your target. You can choose a + different platform at runtime with the -platform option. + +config BR2_PACKAGE_QT5BASE_PRINTSUPPORT + depends on BR2_PACKAGE_QT5BASE_WIDGETS + def_bool y + +config BR2_PACKAGE_QT5BASE_FONTCONFIG + bool "fontconfig support" + select BR2_PACKAGE_FONTCONFIG + help + This option enables Fontconfig and Freetype support using + the system fontconfig and freetype2 libraries. + +config BR2_PACKAGE_QT5BASE_GIF + bool "GIF support" + help + This compiles and installs the plugin for GIF reading support. + +config BR2_PACKAGE_QT5BASE_JPEG + bool "JPEG support" + select BR2_PACKAGE_JPEG + help + This option enables JPEG support using the system libjpeg + library. + +config BR2_PACKAGE_QT5BASE_PNG + bool "PNG support" + select BR2_PACKAGE_LIBPNG + help + This option enables PNG support using the system libpng + library. + +endif + +config BR2_PACKAGE_QT5BASE_DBUS + bool "DBus module" + select BR2_PACKAGE_DBUS + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + help + This option enables the D-Bus module. + +config BR2_PACKAGE_QT5BASE_ICU + bool "Enable ICU support" + select BR2_PACKAGE_ICU + depends on !BR2_BINFMT_FLAT # icu + help + This option enables ICU support in Qt5. This is for example + needed for Qt5Webkit. + +config BR2_PACKAGE_QT5BASE_TSLIB + bool "Enable Tslib support" + depends on !BR2_STATIC_LIBS # dlopen + select BR2_PACKAGE_TSLIB + help + This options enables the Tslib plugin + +comment "tslib support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +endif diff --git a/package/qt5/qt5base/qmake.conf b/package/qt5/qt5base/qmake.conf new file mode 100644 index 0000000000..2152d3c7a4 --- /dev/null +++ b/package/qt5/qt5base/qmake.conf @@ -0,0 +1,24 @@ +# Qt5 has a mechanism to support "device" profiles, so that people can +# specify the compiler, compiler flags and so on for a specific device. + +# We leverage this mechanism in the Buildroot packaging of qt5 to +# simplify cross-compilation: we have our own "device" definition, which +# allows us to easily pass the cross-compiler paths and flags from our +# qt5.mk. + +include(../common/linux_device_pre.conf) + +# modifications to g++-unix.conf +QMAKE_CC = $${CROSS_COMPILE}gcc +QMAKE_CXX = $${CROSS_COMPILE}g++ + +# modifications to gcc-base.conf +QMAKE_CFLAGS += $${BR_COMPILER_CFLAGS} +QMAKE_CXXFLAGS += $${BR_COMPILER_CXXFLAGS} +QMAKE_CXXFLAGS_RELEASE += -O3 +CONFIG += nostrip + +QMAKE_LIBS += -lrt -lpthread -ldl + +include(../common/linux_device_post.conf) +load(qt_config) diff --git a/package/qt5/qt5base/qplatformdefs.h b/package/qt5/qt5base/qplatformdefs.h new file mode 100644 index 0000000000..99e9a27923 --- /dev/null +++ b/package/qt5/qt5base/qplatformdefs.h @@ -0,0 +1 @@ +#include "../../linux-g++/qplatformdefs.h" diff --git a/package/qt5/qt5base/qt5base.hash b/package/qt5/qt5base/qt5base.hash new file mode 100644 index 0000000000..934fb5db16 --- /dev/null +++ b/package/qt5/qt5base/qt5base.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtbase-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 6efa8a5c559e92b2e526d48034e858023d5fd3c39115ac1bfd3bb65834dbd67a qtbase-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk new file mode 100644 index 0000000000..9ff7af167f --- /dev/null +++ b/package/qt5/qt5base/qt5base.mk @@ -0,0 +1,257 @@ +################################################################################ +# +# qt5base +# +################################################################################ + +QT5BASE_VERSION = $(QT5_VERSION) +QT5BASE_SITE = $(QT5_SITE) +QT5BASE_SOURCE = qtbase-opensource-src-$(QT5BASE_VERSION).tar.xz + +QT5BASE_DEPENDENCIES = host-pkgconf zlib pcre +QT5BASE_INSTALL_STAGING = YES + +# A few comments: +# * -no-pch to workaround the issue described at +# http://comments.gmane.org/gmane.comp.lib.qt.devel/5933. +# * -system-zlib because zlib is mandatory for Qt build, and we +# want to use the Buildroot packaged zlib +# * -system-pcre because pcre is mandatory to build Qt, and we +# want to use the one packaged in Buildroot +QT5BASE_CONFIGURE_OPTS += \ + -optimized-qmake \ + -no-kms \ + -no-cups \ + -no-nis \ + -no-iconv \ + -system-zlib \ + -system-pcre \ + -no-pch \ + -shared + +ifeq ($(BR2_ENABLE_DEBUG),y) +QT5BASE_CONFIGURE_OPTS += -debug +else +QT5BASE_CONFIGURE_OPTS += -release +endif + +QT5BASE_CONFIGURE_OPTS += -largefile + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5BASE_CONFIGURE_OPTS += -opensource -confirm-license +QT5BASE_LICENSE = GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5BASE_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5BASE_LICENSE = Commercial license +QT5BASE_REDISTRIBUTE = NO +endif + +QT5BASE_CONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_QT5BASE_CONFIG_FILE)) + +ifneq ($(QT5BASE_CONFIG_FILE),) +QT5BASE_CONFIGURE_OPTS += -qconfig buildroot +endif + +# Qt5 SQL Plugins +ifeq ($(BR2_PACKAGE_QT5BASE_SQL),y) +ifeq ($(BR2_PACKAGE_QT5BASE_MYSQL),y) +QT5BASE_CONFIGURE_OPTS += -plugin-sql-mysql -mysql_config $(STAGING_DIR)/usr/bin/mysql_config +QT5BASE_DEPENDENCIES += mysql +else +QT5BASE_CONFIGURE_OPTS += -no-sql-mysql +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_PSQL),y) +QT5BASE_CONFIGURE_OPTS += -plugin-sql-psql -psql_config $(STAGING_DIR)/usr/bin/pg_config +QT5BASE_DEPENDENCIES += postgresql +else +QT5BASE_CONFIGURE_OPTS += -no-sql-psql +endif + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_QT),-plugin-sql-sqlite) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),-system-sqlite) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_SYSTEM),sqlite) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_SQLITE_NONE),-no-sql-sqlite) +endif + +# We have to use --enable-linuxfb, otherwise Qt thinks that -linuxfb +# is to add a link against the "inuxfb" library. +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GUI),-gui,-no-gui) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_WIDGETS),-widgets,-no-widgets) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_LINUXFB),--enable-linuxfb,-no-linuxfb) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),-directfb,-no-directfb) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_DIRECTFB),directfb) + +ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y) +QT5BASE_CONFIGURE_OPTS += -xcb -system-xkbcommon +QT5BASE_DEPENDENCIES += \ + libxcb \ + xcb-util-wm \ + xcb-util-image \ + xcb-util-keysyms \ + xlib_libX11 \ + libxkbcommon +ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS),y) +QT5BASE_DEPENDENCIES += xlib_libXext +endif +else +QT5BASE_CONFIGURE_OPTS += -no-xcb +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_OPENGL_DESKTOP),y) +QT5BASE_CONFIGURE_OPTS += -opengl desktop +QT5BASE_DEPENDENCIES += libgl +else ifeq ($(BR2_PACKAGE_QT5BASE_OPENGL_ES2),y) +QT5BASE_CONFIGURE_OPTS += -opengl es2 +QT5BASE_DEPENDENCIES += libgles +else +QT5BASE_CONFIGURE_OPTS += -no-opengl +endif + +QT5BASE_DEFAULT_QPA = $(call qstrip,$(BR2_PACKAGE_QT5BASE_DEFAULT_QPA)) +QT5BASE_CONFIGURE_OPTS += $(if $(QT5BASE_DEFAULT_QPA),-qpa $(QT5BASE_DEFAULT_QPA)) + +ifeq ($(BR2_PACKAGE_QT5BASE_EGLFS),y) +QT5BASE_CONFIGURE_OPTS += -eglfs +QT5BASE_DEPENDENCIES += libegl +else +QT5BASE_CONFIGURE_OPTS += -no-eglfs +endif + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_OPENSSL),-openssl,-no-openssl) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_OPENSSL),openssl) + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_FONTCONFIG),-fontconfig,-no-fontconfig) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_FONTCONFIG),fontconfig) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_GIF),,-no-gif) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_JPEG),-system-libjpeg,-no-libjpeg) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_JPEG),jpeg) +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_PNG),-system-libpng,-no-libpng) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_PNG),libpng) + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_DBUS),-dbus,-no-dbus) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_DBUS),dbus) + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_TSLIB),-tslib,-no-tslib) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_TSLIB),tslib) + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_LIBGLIB2),-glib,-no-glib) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBGLIB2),libglib2) + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_ICU),-icu,-no-icu) +QT5BASE_DEPENDENCIES += $(if $(BR2_PACKAGE_QT5BASE_ICU),icu) + +QT5BASE_CONFIGURE_OPTS += $(if $(BR2_PACKAGE_QT5BASE_EXAMPLES),-make,-nomake) examples + +# gstreamer 0.10 support is broken in qt5multimedia +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE),y) +QT5BASE_CONFIGURE_OPTS += -gstreamer 1.0 +QT5BASE_DEPENDENCIES += gst1-plugins-base +else +QT5BASE_CONFIGURE_OPTS += -no-gstreamer +endif + +# Build the list of libraries to be installed on the target +QT5BASE_INSTALL_LIBS_y += Qt5Core +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_XCB) += Qt5XcbQpa +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_NETWORK) += Qt5Network +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_CONCURRENT) += Qt5Concurrent +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_SQL) += Qt5Sql +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_TEST) += Qt5Test +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_XML) += Qt5Xml +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_OPENGL_LIB) += Qt5OpenGL +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglDeviceIntegration + +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_GUI) += Qt5Gui +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_WIDGETS) += Qt5Widgets +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_PRINTSUPPORT) += Qt5PrintSupport + +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_DBUS) += Qt5DBus + +ifneq ($(QT5BASE_CONFIG_FILE),) +define QT5BASE_CONFIGURE_CONFIG_FILE + cp $(QT5BASE_CONFIG_FILE) $(@D)/src/corelib/global/qconfig-buildroot.h +endef +endif + +define QT5BASE_CONFIGURE_CMDS + $(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qmake.conf \ + $(@D)/mkspecs/devices/linux-buildroot-g++/qmake.conf + $(INSTALL) -m 0644 -D $(QT5BASE_PKGDIR)/qplatformdefs.h \ + $(@D)/mkspecs/devices/linux-buildroot-g++/qplatformdefs.h + $(QT5BASE_CONFIGURE_CONFIG_FILE) + (cd $(@D); \ + $(TARGET_MAKE_ENV) \ + PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" \ + PKG_CONFIG_LIBDIR="$(STAGING_DIR)/usr/lib/pkgconfig" \ + PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \ + MAKEFLAGS="$(MAKEFLAGS) -j$(PARALLEL_JOBS)" \ + ./configure \ + -v \ + -prefix /usr \ + -hostprefix $(HOST_DIR)/usr \ + -headerdir /usr/include/qt5 \ + -sysroot $(STAGING_DIR) \ + -plugindir /usr/lib/qt/plugins \ + -examplesdir /usr/lib/qt/examples \ + -no-rpath \ + -nomake tests \ + -device buildroot \ + -device-option CROSS_COMPILE="$(TARGET_CROSS)" \ + -device-option BR_COMPILER_CFLAGS="$(TARGET_CFLAGS) $(QT5BASE_EXTRA_CFLAGS)" \ + -device-option BR_COMPILER_CXXFLAGS="$(TARGET_CXXFLAGS) $(QT5BASE_EXTRA_CFLAGS)" \ + $(QT5BASE_CONFIGURE_OPTS) \ + ) +endef + +define QT5BASE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5BASE_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +define QT5BASE_INSTALL_TARGET_LIBS + for lib in $(QT5BASE_INSTALL_LIBS_y); do \ + cp -dpf $(STAGING_DIR)/usr/lib/lib$${lib}.so.* $(TARGET_DIR)/usr/lib || exit 1 ; \ + done +endef + +define QT5BASE_INSTALL_TARGET_PLUGINS + if [ -d $(STAGING_DIR)/usr/lib/qt/plugins/ ] ; then \ + mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins ; \ + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins ; \ + fi +endef + +define QT5BASE_INSTALL_TARGET_FONTS + if [ -d $(STAGING_DIR)/usr/lib/fonts/ ] ; then \ + mkdir -p $(TARGET_DIR)/usr/lib/fonts ; \ + cp -dpfr $(STAGING_DIR)/usr/lib/fonts/* $(TARGET_DIR)/usr/lib/fonts ; \ + fi +endef + +define QT5BASE_INSTALL_TARGET_EXAMPLES + if [ -d $(STAGING_DIR)/usr/lib/qt/examples/ ] ; then \ + mkdir -p $(TARGET_DIR)/usr/lib/qt/examples ; \ + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/* $(TARGET_DIR)/usr/lib/qt/examples ; \ + fi +endef + +ifeq ($(BR2_STATIC_LIBS),y) +define QT5BASE_INSTALL_TARGET_CMDS + $(QT5BASE_INSTALL_TARGET_FONTS) + $(QT5BASE_INSTALL_TARGET_EXAMPLES) +endef +else +define QT5BASE_INSTALL_TARGET_CMDS + $(QT5BASE_INSTALL_TARGET_LIBS) + $(QT5BASE_INSTALL_TARGET_PLUGINS) + $(QT5BASE_INSTALL_TARGET_FONTS) + $(QT5BASE_INSTALL_TARGET_EXAMPLES) +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5canvas3d/Config.in b/package/qt5/qt5canvas3d/Config.in new file mode 100644 index 0000000000..3ae5192844 --- /dev/null +++ b/package/qt5/qt5canvas3d/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_QT5CANVAS3D + bool "qt5canvas3d" + select BR2_PACKAGE_QT5DECLARATIVE + select BR2_PACKAGE_QT5DECLARATIVE_QUICK + depends on BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5canvas3d module. + + http://qt.io + +comment "qt5canvas3d needs an OpenGL-capable backend" + depends on !BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE diff --git a/package/qt5/qt5canvas3d/qt5canvas3d.hash b/package/qt5/qt5canvas3d/qt5canvas3d.hash new file mode 100644 index 0000000000..57ae4d739d --- /dev/null +++ b/package/qt5/qt5canvas3d/qt5canvas3d.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtcanvas3d-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 66add59e826a0161f4a4dc3ec0b44c17fad1451390b4f7c67af23ee7429d9ecf qtcanvas3d-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5canvas3d/qt5canvas3d.mk b/package/qt5/qt5canvas3d/qt5canvas3d.mk new file mode 100644 index 0000000000..3f605ab031 --- /dev/null +++ b/package/qt5/qt5canvas3d/qt5canvas3d.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# qt5canvas3d +# +################################################################################ + +QT5CANVAS3D_VERSION = $(QT5_VERSION) +QT5CANVAS3D_SITE = $(QT5_SITE) +QT5CANVAS3D_SOURCE = qtcanvas3d-opensource-src-$(QT5CANVAS3D_VERSION).tar.xz +QT5CANVAS3D_DEPENDENCIES = qt5base qt5declarative +QT5CANVAS3D_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5CANVAS3D_LICENSE = GPLv2 or GPLv3 or LGPLv3 +QT5CANVAS3D_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3 +else +QT5CANVAS3D_LICENSE = Commercial license +QT5CANVAS3D_REDISTRIBUTE = NO +endif + +define QT5CANVAS3D_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5CANVAS3D_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5CANVAS3D_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +define QT5CANVAS3D_INSTALL_TARGET_CMDS + cp -dpfr $(STAGING_DIR)/usr/qml/QtCanvas3D $(TARGET_DIR)/usr/qml/ +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5connectivity/Config.in b/package/qt5/qt5connectivity/Config.in new file mode 100644 index 0000000000..d529ea7f85 --- /dev/null +++ b/package/qt5/qt5connectivity/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_QT5CONNECTIVITY + bool "qt5connectivity" + select BR2_PACKAGE_BLUEZ_UTILS + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_CONCURRENT + select BR2_PACKAGE_QT5BASE_DBUS + depends on !BR2_STATIC_LIBS # bluez_utils + depends on BR2_USE_WCHAR # bluez_utils + depends on BR2_TOOLCHAIN_HAS_THREADS # bluez_utils + depends on BR2_USE_MMU # bluez_utils + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5connectivity module. + + http://qt.io + +comment "qt5connectivity needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/qt5/qt5connectivity/qt5connectivity.hash b/package/qt5/qt5connectivity/qt5connectivity.hash new file mode 100644 index 0000000000..a8676a9dd4 --- /dev/null +++ b/package/qt5/qt5connectivity/qt5connectivity.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtconnectivity-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 0c5cb0c100006759b6954a36e7dc66f8f1ac2b61b3f639152cf6ecb8d48a40eb qtconnectivity-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5connectivity/qt5connectivity.mk b/package/qt5/qt5connectivity/qt5connectivity.mk new file mode 100644 index 0000000000..936bc6f63c --- /dev/null +++ b/package/qt5/qt5connectivity/qt5connectivity.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# qt5connectivity +# +################################################################################ + +QT5CONNECTIVITY_VERSION = $(QT5_VERSION) +QT5CONNECTIVITY_SITE = $(QT5_SITE) +QT5CONNECTIVITY_SOURCE = qtconnectivity-opensource-src-$(QT5CONNECTIVITY_VERSION).tar.xz +QT5CONNECTIVITY_DEPENDENCIES = bluez_utils qt5base +QT5CONNECTIVITY_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5CONNECTIVITY_LICENSE = GPLv2 or GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5CONNECTIVITY_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5CONNECTIVITY_LICENSE = Commercial license +QT5CONNECTIVITY_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5CONNECTIVITY_DEPENDENCIES += qt5declarative +endif + +define QT5CONNECTIVITY_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5CONNECTIVITY_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5CONNECTIVITY_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y) +define QT5CONNECTIVITY_INSTALL_TARGET_QMLS + cp -dpfr $(STAGING_DIR)/usr/qml/QtBluetooth $(TARGET_DIR)/usr/qml/ +endef +endif + +define QT5CONNECTIVITY_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Bluetooth.so.* $(TARGET_DIR)/usr/lib + cp -dpf $(STAGING_DIR)/usr/bin/sdpscanner $(TARGET_DIR)/usr/bin + $(QT5CONNECTIVITY_INSTALL_TARGET_QMLS) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5declarative/Config.in b/package/qt5/qt5declarative/Config.in new file mode 100644 index 0000000000..eba4c8d61d --- /dev/null +++ b/package/qt5/qt5declarative/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_QT5DECLARATIVE + bool "qt5declarative" + select BR2_PACKAGE_QT5XMLPATTERNS + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_GUI + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5declarative module. + + http://qt.io + +if BR2_PACKAGE_QT5DECLARATIVE + +comment "quick module needs an OpenGL-capable backend" + depends on !BR2_PACKAGE_QT5_GL_AVAILABLE + +config BR2_PACKAGE_QT5DECLARATIVE_QUICK + bool "quick module" + select BR2_PACKAGE_QT5BASE_OPENGL + depends on BR2_PACKAGE_QT5_GL_AVAILABLE + +endif diff --git a/package/qt5/qt5declarative/qt5declarative.hash b/package/qt5/qt5declarative/qt5declarative.hash new file mode 100644 index 0000000000..830e18f9e2 --- /dev/null +++ b/package/qt5/qt5declarative/qt5declarative.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtdeclarative-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 8c55f053f0e348577b56da541af74d02d0f2b61c9a6c15152b03dad03dfde04c qtdeclarative-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5declarative/qt5declarative.mk b/package/qt5/qt5declarative/qt5declarative.mk new file mode 100644 index 0000000000..be3a7b7d7a --- /dev/null +++ b/package/qt5/qt5declarative/qt5declarative.mk @@ -0,0 +1,59 @@ +################################################################################ +# +# qt5declarative +# +################################################################################ + +QT5DECLARATIVE_VERSION = $(QT5_VERSION) +QT5DECLARATIVE_SITE = $(QT5_SITE) +QT5DECLARATIVE_SOURCE = qtdeclarative-opensource-src-$(QT5DECLARATIVE_VERSION).tar.xz +QT5DECLARATIVE_DEPENDENCIES = qt5base qt5xmlpatterns +QT5DECLARATIVE_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5DECLARATIVE_LICENSE = GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5DECLARATIVE_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5DECLARATIVE_LICENSE = Commercial license +QT5DECLARATIVE_REDISTRIBUTE = NO +endif + +define QT5DECLARATIVE_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5DECLARATIVE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + sub-src-all sub-tools-all +endef + +define QT5DECLARATIVE_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + sub-src-install_subtargets \ + sub-tools-install_subtargets + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_STATIC_LIBS),) + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y) +define QT5DECLARATIVE_INSTALL_TARGET_QUICK_LIBS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Quick*.so.* $(TARGET_DIR)/usr/lib +endef +endif + +define QT5DECLARATIVE_INSTALL_TARGET_LIBS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Qml*.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/qml* $(TARGET_DIR)/usr/lib/qt/plugins + $(QT5DECLARATIVE_INSTALL_TARGET_QUICK_LIBS) +endef + +endif + +define QT5DECLARATIVE_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/bin/qml* $(TARGET_DIR)/usr/bin + cp -dpfr $(STAGING_DIR)/usr/qml $(TARGET_DIR)/usr + $(QT5DECLARATIVE_INSTALL_TARGET_LIBS) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5enginio/Config.in b/package/qt5/qt5enginio/Config.in new file mode 100644 index 0000000000..fcb866cd6d --- /dev/null +++ b/package/qt5/qt5enginio/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_QT5ENGINIO + bool "qt5enginio" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_QT5BASE_NETWORK + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5enginio module. + + http://qt.io diff --git a/package/qt5/qt5enginio/qt5enginio.hash b/package/qt5/qt5enginio/qt5enginio.hash new file mode 100644 index 0000000000..3f66ee0a2a --- /dev/null +++ b/package/qt5/qt5enginio/qt5enginio.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtenginio-opensource-src-1.6.0.tar.xz.mirrorlist +sha256 627ddcfbbfc3ec1a83c9dbb5f24287b5cd6cb5d3b9d09af4d1c444c6ac147f0c qtenginio-opensource-src-1.6.0.tar.xz diff --git a/package/qt5/qt5enginio/qt5enginio.mk b/package/qt5/qt5enginio/qt5enginio.mk new file mode 100644 index 0000000000..b858d1cbbf --- /dev/null +++ b/package/qt5/qt5enginio/qt5enginio.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# qt5enginio +# +################################################################################ + +# Qt5Enginio does not follow Qt versionning +# see https://bugreports.qt.io/browse/QTBUG-50111 +QT5ENGINIO_VERSION = 1.6.0 +QT5ENGINIO_SITE = $(QT5_SITE) +QT5ENGINIO_SOURCE = qtenginio-opensource-src-$(QT5ENGINIO_VERSION).tar.xz +QT5ENGINIO_DEPENDENCIES = openssl qt5base +QT5ENGINIO_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5ENGINIO_LICENSE = GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5ENGINIO_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5ENGINIO_LICENSE = Commercial license +QT5ENGINIO_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5ENGINIO_DEPENDENCIES += qt5declarative +endif + +define QT5ENGINIO_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5ENGINIO_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5ENGINIO_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y) +define QT5ENGINIO_INSTALL_TARGET_QMLS + cp -dpfr $(STAGING_DIR)/usr/qml/Enginio $(TARGET_DIR)/usr/qml/ +endef +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5ENGINIO_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/enginio $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif + +ifneq ($(BR2_STATIC_LIBS),y) +define QT5ENGINIO_INSTALL_TARGET_LIBS + cp -dpf $(STAGING_DIR)/usr/lib/libEnginio.so.* $(TARGET_DIR)/usr/lib +endef +endif + +define QT5ENGINIO_INSTALL_TARGET_CMDS + $(QT5ENGINIO_INSTALL_TARGET_LIBS) + $(QT5ENGINIO_INSTALL_TARGET_QMLS) + $(QT5ENGINIO_INSTALL_TARGET_EXAMPLES) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5graphicaleffects/Config.in b/package/qt5/qt5graphicaleffects/Config.in new file mode 100644 index 0000000000..a42e1f8f2a --- /dev/null +++ b/package/qt5/qt5graphicaleffects/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_QT5GRAPHICALEFFECTS + bool "qt5graphicaleffects" + select BR2_PACKAGE_QT5DECLARATIVE + select BR2_PACKAGE_QT5DECLARATIVE_QUICK + depends on BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5graphicaleffects module. + + http://qt.io + +comment "qt5graphicaleffects needs an OpenGL-capable backend" + depends on !BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE diff --git a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.hash b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.hash new file mode 100644 index 0000000000..847458eac6 --- /dev/null +++ b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtgraphicaleffects-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 01e911fdcf85a13b927cba341d15a0baeead3eba85c4532b1b45bb5c334416e8 qtgraphicaleffects-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk new file mode 100644 index 0000000000..223374a27c --- /dev/null +++ b/package/qt5/qt5graphicaleffects/qt5graphicaleffects.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# qt5graphicaleffects +# +################################################################################ + +QT5GRAPHICALEFFECTS_VERSION = $(QT5_VERSION) +QT5GRAPHICALEFFECTS_SITE = $(QT5_SITE) +QT5GRAPHICALEFFECTS_SOURCE = qtgraphicaleffects-opensource-src-$(QT5GRAPHICALEFFECTS_VERSION).tar.xz +QT5GRAPHICALEFFECTS_DEPENDENCIES = qt5base qt5declarative +QT5GRAPHICALEFFECTS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5GRAPHICALEFFECTS_LICENSE = GPLv2 or GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5GRAPHICALEFFECTS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5GRAPHICALEFFECTS_LICENSE = Commercial license +QT5GRAPHICALEFFECTS_REDISTRIBUTE = NO +endif + +define QT5GRAPHICALEFFECTS_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5GRAPHICALEFFECTS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5GRAPHICALEFFECTS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +define QT5GRAPHICALEFFECTS_INSTALL_TARGET_CMDS + cp -dpfr $(STAGING_DIR)/usr/qml/QtGraphicalEffects $(TARGET_DIR)/usr/qml +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5imageformats/Config.in b/package/qt5/qt5imageformats/Config.in new file mode 100644 index 0000000000..4dd848e41f --- /dev/null +++ b/package/qt5/qt5imageformats/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_QT5IMAGEFORMATS + bool "qt5imageformats" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_GUI + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5imageformats module. + + http://qt.io diff --git a/package/qt5/qt5imageformats/qt5imageformats.hash b/package/qt5/qt5imageformats/qt5imageformats.hash new file mode 100644 index 0000000000..05b8cbc60c --- /dev/null +++ b/package/qt5/qt5imageformats/qt5imageformats.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtimageformats-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 2c854275a689a513ba24f4266cc6017d76875336671c2c8801b4b7289081bada qtimageformats-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5imageformats/qt5imageformats.mk b/package/qt5/qt5imageformats/qt5imageformats.mk new file mode 100644 index 0000000000..921656d0aa --- /dev/null +++ b/package/qt5/qt5imageformats/qt5imageformats.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# qt5imageformats +# +################################################################################ + +QT5IMAGEFORMATS_VERSION = $(QT5_VERSION) +QT5IMAGEFORMATS_SITE = $(QT5_SITE) +QT5IMAGEFORMATS_SOURCE = qtimageformats-opensource-src-$(QT5IMAGEFORMATS_VERSION).tar.xz +QT5IMAGEFORMATS_DEPENDENCIES = qt5base +QT5IMAGEFORMATS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5IMAGEFORMATS_LICENSE = GPLv2 or GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5IMAGEFORMATS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5IMAGEFORMATS_LICENSE = Commercial license +QT5IMAGEFORMATS_REDISTRIBUTE = NO +endif + +define QT5IMAGEFORMATS_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5IMAGEFORMATS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5IMAGEFORMATS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +ifeq ($(BR2_STATIC_LIBS),) +define QT5IMAGEFORMATS_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/imageformats/*.so $(TARGET_DIR)/usr/lib/qt/plugins/imageformats/ +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5location/Config.in b/package/qt5/qt5location/Config.in new file mode 100644 index 0000000000..209d134215 --- /dev/null +++ b/package/qt5/qt5location/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_QT5LOCATION + bool "qt5location" + select BR2_PACKAGE_QT5BASE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5location module. + + http://qt.io diff --git a/package/qt5/qt5location/qt5location.hash b/package/qt5/qt5location/qt5location.hash new file mode 100644 index 0000000000..e078ec5cb6 --- /dev/null +++ b/package/qt5/qt5location/qt5location.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtlocation-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 360e1519d0fcafe4f86923d224e76d56dd785dfb0e1a19fd2e2b0016799653c9 qtlocation-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5location/qt5location.mk b/package/qt5/qt5location/qt5location.mk new file mode 100644 index 0000000000..358b1621c5 --- /dev/null +++ b/package/qt5/qt5location/qt5location.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# qt5location +# +################################################################################ + +QT5LOCATION_VERSION = $(QT5_VERSION) +QT5LOCATION_SITE = $(QT5_SITE) +QT5LOCATION_SOURCE = qtlocation-opensource-src-$(QT5LOCATION_VERSION).tar.xz +QT5LOCATION_DEPENDENCIES = qt5base +QT5LOCATION_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5LOCATION_LICENSE = GPLv2 or GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5LOCATION_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5LOCATION_LICENSE = Commercial license +QT5LOCATION_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5LOCATION_DEPENDENCIES += qt5declarative +endif + +define QT5LOCATION_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5LOCATION_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5LOCATION_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y) +define QT5LOCATION_INSTALL_TARGET_QMLS + cp -dpfr $(STAGING_DIR)/usr/qml/QtPositioning $(TARGET_DIR)/usr/qml/ + cp -dpfr $(STAGING_DIR)/usr/qml/QtLocation $(TARGET_DIR)/usr/qml/ +endef +define QT5LOCATION_INSTALL_TARGET_LOCATION + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Location.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/geoservices $(TARGET_DIR)/usr/lib/qt/plugins/ +endef +endif + +define QT5LOCATION_INSTALL_TARGET_POSITION + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Positioning.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/position $(TARGET_DIR)/usr/lib/qt/plugins/ +endef + +define QT5LOCATION_INSTALL_TARGET_CMDS + $(QT5LOCATION_INSTALL_TARGET_POSITION) + $(QT5LOCATION_INSTALL_TARGET_LOCATION) + $(QT5LOCATION_INSTALL_TARGET_QMLS) +endef + + +$(eval $(generic-package)) diff --git a/package/qt5/qt5multimedia/Config.in b/package/qt5/qt5multimedia/Config.in new file mode 100644 index 0000000000..7549b35192 --- /dev/null +++ b/package/qt5/qt5multimedia/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_QT5MULTIMEDIA + bool "qt5multimedia" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_QT5BASE_NETWORK + select BR2_PACKAGE_QT5BASE_OPENGL_LIB if BR2_PACKAGE_QT5BASE_OPENGL + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5multimedia module. + + http://qt.io diff --git a/package/qt5/qt5multimedia/qt5multimedia.hash b/package/qt5/qt5multimedia/qt5multimedia.hash new file mode 100644 index 0000000000..f988666291 --- /dev/null +++ b/package/qt5/qt5multimedia/qt5multimedia.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtmultimedia-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 103f99d6cd266f5c4485546a75ef0c6ee7e88dc901a0be21447cf89159370686 qtmultimedia-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5multimedia/qt5multimedia.mk b/package/qt5/qt5multimedia/qt5multimedia.mk new file mode 100644 index 0000000000..67e79686cb --- /dev/null +++ b/package/qt5/qt5multimedia/qt5multimedia.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# qt5multimedia +# +################################################################################ + +QT5MULTIMEDIA_VERSION = $(QT5_VERSION) +QT5MULTIMEDIA_SITE = $(QT5_SITE) +QT5MULTIMEDIA_SOURCE = qtmultimedia-opensource-src-$(QT5MULTIMEDIA_VERSION).tar.xz +QT5MULTIMEDIA_DEPENDENCIES = qt5base +QT5MULTIMEDIA_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5MULTIMEDIA_LICENSE = GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5MULTIMEDIA_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5MULTIMEDIA_LICENSE = Commercial license +QT5MULTIMEDIA_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE),y) +QT5MULTIMEDIA_DEPENDENCIES += gst1-plugins-base +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5MULTIMEDIA_DEPENDENCIES += qt5declarative +endif + +define QT5MULTIMEDIA_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5MULTIMEDIA_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5MULTIMEDIA_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_STATIC_LIBS),) +ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE),y) +define QT5MULTIMEDIA_INSTALL_TARGET_QGSTTOOLS_LIB + cp -dpf $(STAGING_DIR)/usr/lib/libqgsttools*.so.* $(TARGET_DIR)/usr/lib +endef +endif + +define QT5MULTIMEDIA_INSTALL_TARGET_LIBS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Multimedia*.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/* $(TARGET_DIR)/usr/lib/qt/plugins + $(QT5MULTIMEDIA_INSTALL_TARGET_QGSTTOOLS_LIB) +endef +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y) +define QT5MULTIMEDIA_INSTALL_TARGET_QMLS + cp -dpfr $(STAGING_DIR)/usr/qml/QtMultimedia $(TARGET_DIR)/usr/qml/ +endef +endif + +define QT5MULTIMEDIA_INSTALL_TARGET_CMDS + $(QT5MULTIMEDIA_INSTALL_TARGET_LIBS) + $(QT5MULTIMEDIA_INSTALL_TARGET_QMLS) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5quickcontrols/Config.in b/package/qt5/qt5quickcontrols/Config.in new file mode 100644 index 0000000000..0fe8465e2e --- /dev/null +++ b/package/qt5/qt5quickcontrols/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_QT5QUICKCONTROLS + bool "qt5quickcontrols" + select BR2_PACKAGE_QT5DECLARATIVE + select BR2_PACKAGE_QT5DECLARATIVE_QUICK + depends on BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5quickcontrols module. + + http://qt.io + +comment "qt5quickcontrols needs an OpenGL-capable backend" + depends on !BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE diff --git a/package/qt5/qt5quickcontrols/qt5quickcontrols.hash b/package/qt5/qt5quickcontrols/qt5quickcontrols.hash new file mode 100644 index 0000000000..409efde1ec --- /dev/null +++ b/package/qt5/qt5quickcontrols/qt5quickcontrols.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtquickcontrols-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 ec0896792f2a08d109ab3791aa4e47747aab22ebfad281005c4bf8f26f9f788b qtquickcontrols-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5quickcontrols/qt5quickcontrols.mk b/package/qt5/qt5quickcontrols/qt5quickcontrols.mk new file mode 100644 index 0000000000..b33ff1575e --- /dev/null +++ b/package/qt5/qt5quickcontrols/qt5quickcontrols.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# qt5quickcontrols +# +################################################################################ + +QT5QUICKCONTROLS_VERSION = $(QT5_VERSION) +QT5QUICKCONTROLS_SITE = $(QT5_SITE) +QT5QUICKCONTROLS_SOURCE = qtquickcontrols-opensource-src-$(QT5QUICKCONTROLS_VERSION).tar.xz +QT5QUICKCONTROLS_DEPENDENCIES = qt5base qt5declarative +QT5QUICKCONTROLS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5QUICKCONTROLS_LICENSE = GPLv2 or GPLv3 or LGPLv3, GFDLv1.3 (docs) +QT5QUICKCONTROLS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL +else +QT5QUICKCONTROLS_LICENSE = Commercial license +QT5QUICKCONTROLS_REDISTRIBUTE = NO +endif + +define QT5QUICKCONTROLS_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5QUICKCONTROLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5QUICKCONTROLS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +define QT5QUICKCONTROLS_INSTALL_TARGET_CMDS + cp -dpfr $(STAGING_DIR)/usr/qml/QtQuick $(TARGET_DIR)/usr/qml +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5quickcontrols2/Config.in b/package/qt5/qt5quickcontrols2/Config.in new file mode 100644 index 0000000000..1e57674dc8 --- /dev/null +++ b/package/qt5/qt5quickcontrols2/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_QT5QUICKCONTROLS2 + bool "qt5quickcontrols2" + select BR2_PACKAGE_QT5DECLARATIVE + select BR2_PACKAGE_QT5DECLARATIVE_QUICK + depends on BR2_PACKAGE_QT5_GL_AVAILABLE # qt5declarative/quick + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE # qt5declarative/quick + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5quickcontrols2 module. + + http://qt.io + +comment "qt5quickcontrols2 needs an OpenGL-capable backend" + depends on !BR2_PACKAGE_QT5_GL_AVAILABLE + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE diff --git a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.hash b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.hash new file mode 100644 index 0000000000..aaf8fcfa84 --- /dev/null +++ b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtquickcontrols2-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 59ec6ea2282931bc0d0748b3979a52e1a322e7ef8d1e5490b8a34931e8b9fee0 qtquickcontrols2-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk new file mode 100644 index 0000000000..a5ad3f6d4f --- /dev/null +++ b/package/qt5/qt5quickcontrols2/qt5quickcontrols2.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# qt5quickcontrols2 +# +################################################################################ + +QT5QUICKCONTROLS2_VERSION = $(QT5_VERSION) +QT5QUICKCONTROLS2_SITE = $(QT5_SITE) +QT5QUICKCONTROLS2_SOURCE = qtquickcontrols2-opensource-src-$(QT5QUICKCONTROLS2_VERSION).tar.xz +QT5QUICKCONTROLS2_DEPENDENCIES = qt5base qt5declarative +QT5QUICKCONTROLS2_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5QUICKCONTROLS2_LICENSE = GPLv3 or LGPLv3, GFDLv1.3 (docs) +QT5QUICKCONTROLS2_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL +else +QT5QUICKCONTROLS2_LICENSE = Commercial license +QT5QUICKCONTROLS2_REDISTRIBUTE = NO +endif + +define QT5QUICKCONTROLS2_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5QUICKCONTROLS2_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5QUICKCONTROLS2_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install +endef + +define QT5QUICKCONTROLS2_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5LabsTemplates.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/controls $(TARGET_DIR)/usr/qml/Qt/labs + cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/calendar $(TARGET_DIR)/usr/qml/Qt/labs + cp -dpfr $(STAGING_DIR)/usr/qml/Qt/labs/templates $(TARGET_DIR)/usr/qml/Qt/labs +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5script/Config.in b/package/qt5/qt5script/Config.in new file mode 100644 index 0000000000..0d15ef265c --- /dev/null +++ b/package/qt5/qt5script/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_QT5SCRIPT + bool "qt5script" + select BR2_PACKAGE_QT5BASE + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5script module. + + This package has been tagged as deprecated since version + 5.5.0 and should be replaced by Qt QML module in new + design. + + http://qt.io diff --git a/package/qt5/qt5script/qt5script.hash b/package/qt5/qt5script/qt5script.hash new file mode 100644 index 0000000000..cc32efc13b --- /dev/null +++ b/package/qt5/qt5script/qt5script.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtscript-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 ac7475197d9a0f3c7284f002390e2427fef84ec90dc590630431a848099c5042 qtscript-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5script/qt5script.mk b/package/qt5/qt5script/qt5script.mk new file mode 100644 index 0000000000..57ba6f0072 --- /dev/null +++ b/package/qt5/qt5script/qt5script.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# qt5script +# +################################################################################ + +QT5SCRIPT_VERSION = $(QT5_VERSION) +QT5SCRIPT_SITE = $(QT5_SITE) +QT5SCRIPT_SOURCE = qtscript-opensource-src-$(QT5SCRIPT_VERSION).tar.xz +QT5SCRIPT_DEPENDENCIES = qt5base +QT5SCRIPT_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5SCRIPT_LICENSE = GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5SCRIPT_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5SCRIPT_LICENSE = Commercial license +QT5SCRIPT_REDISTRIBUTE = NO +endif + +define QT5SCRIPT_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5SCRIPT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5SCRIPT_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_STATIC_LIBS),) +define QT5SCRIPT_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Script*.so.* $(TARGET_DIR)/usr/lib +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5sensors/Config.in b/package/qt5/qt5sensors/Config.in new file mode 100644 index 0000000000..741ebba142 --- /dev/null +++ b/package/qt5/qt5sensors/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_QT5SENSORS + bool "qt5sensors" + select BR2_PACKAGE_QT5BASE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5sensors module. + + http://qt.io diff --git a/package/qt5/qt5sensors/qt5sensors.hash b/package/qt5/qt5sensors/qt5sensors.hash new file mode 100644 index 0000000000..4f23af0037 --- /dev/null +++ b/package/qt5/qt5sensors/qt5sensors.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtsensors-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 518f392fec5e01aaa7f95e9141678cc99b02ed067ebbd24c38c1420067c59c2e qtsensors-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5sensors/qt5sensors.mk b/package/qt5/qt5sensors/qt5sensors.mk new file mode 100644 index 0000000000..0dd952a4ca --- /dev/null +++ b/package/qt5/qt5sensors/qt5sensors.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# qt5sensors +# +################################################################################ + +QT5SENSORS_VERSION = $(QT5_VERSION) +QT5SENSORS_SITE = $(QT5_SITE) +QT5SENSORS_SOURCE = qtsensors-opensource-src-$(QT5SENSORS_VERSION).tar.xz +QT5SENSORS_DEPENDENCIES = qt5base +QT5SENSORS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5SENSORS_LICENSE = GPLv2 or GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5SENSORS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5SENSORS_LICENSE = Commercial license +QT5SENSORS_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5SENSORS_DEPENDENCIES += qt5declarative +endif + +define QT5SENSORS_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5SENSORS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5SENSORS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_STATIC_LIBS),) +define QT5SENSORS_INSTALL_TARGET_LIBS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Sensors.so.* $(TARGET_DIR)/usr/lib + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/sensor* $(TARGET_DIR)/usr/lib/qt/plugins +endef +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y) +define QT5SENSORS_INSTALL_TARGET_QMLS + cp -dpfr $(STAGING_DIR)/usr/qml/QtSensors $(TARGET_DIR)/usr/qml +endef +endif + +define QT5SENSORS_INSTALL_TARGET_CMDS + $(QT5SENSORS_INSTALL_TARGET_LIBS) + $(QT5SENSORS_INSTALL_TARGET_QMLS) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5serialbus/Config.in b/package/qt5/qt5serialbus/Config.in new file mode 100644 index 0000000000..f5b713dbae --- /dev/null +++ b/package/qt5/qt5serialbus/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_QT5SERIALBUS + bool "qt5serialbus" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 # CAN FD + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5SERIALPORT + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5serialbus module. + + http://qt.io + +comment "qt5serialbus needs headers >= 3.6" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 diff --git a/package/qt5/qt5serialbus/qt5serialbus.hash b/package/qt5/qt5serialbus/qt5serialbus.hash new file mode 100644 index 0000000000..da46e766a3 --- /dev/null +++ b/package/qt5/qt5serialbus/qt5serialbus.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtserialbus-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 8cca530ee53f19672f57ffee6f2f28866d5c84b8cb3dbbd67c05d27893ac0b8e qtserialbus-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5serialbus/qt5serialbus.mk b/package/qt5/qt5serialbus/qt5serialbus.mk new file mode 100644 index 0000000000..b188f5d85d --- /dev/null +++ b/package/qt5/qt5serialbus/qt5serialbus.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# qt5serialbus +# +################################################################################ + +QT5SERIALBUS_VERSION = $(QT5_VERSION) +QT5SERIALBUS_SITE = $(QT5_SITE) +QT5SERIALBUS_SOURCE = qtserialbus-opensource-src-$(QT5SERIALBUS_VERSION).tar.xz +QT5SERIALBUS_DEPENDENCIES = qt5base qt5serialport +QT5SERIALBUS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5SERIALBUS_LICENSE = GPLv2 or GPLv3 or LGPLv3, GFDLv1.3 (docs) +QT5SERIALBUS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv3 LICENSE.FDL +else +QT5SERIALBUS_LICENSE = Commercial license +QT5SERIALBUS_REDISTRIBUTE = NO +endif + +define QT5SERIALBUS_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5SERIALBUS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5SERIALBUS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_STATIC_LIBS),) +define QT5SERIALBUS_INSTALL_TARGET_LIBS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5SerialBus.so.* \ + $(TARGET_DIR)/usr/lib + mkdir -p $(TARGET_DIR)/usr/lib/qt/plugins/canbus + cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/canbus/*.so \ + $(TARGET_DIR)/usr/lib/qt/plugins/canbus +endef +endif + +define QT5SERIALBUS_INSTALL_TARGET_CMDS + $(QT5SERIALBUS_INSTALL_TARGET_LIBS) + $(INSTALL) -m 0755 -D $(@D)/bin/canbusutil \ + $(TARGET_DIR)/usr/bin/canbusutil +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5serialport/Config.in b/package/qt5/qt5serialport/Config.in new file mode 100644 index 0000000000..c419d17dd0 --- /dev/null +++ b/package/qt5/qt5serialport/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_QT5SERIALPORT + bool "qt5serialport" + select BR2_PACKAGE_QT5BASE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5serialport module. + + http://qt.io diff --git a/package/qt5/qt5serialport/qt5serialport.hash b/package/qt5/qt5serialport/qt5serialport.hash new file mode 100644 index 0000000000..f2f0fe90d3 --- /dev/null +++ b/package/qt5/qt5serialport/qt5serialport.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtserialport-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 16ee7fb66bb997df674a12a7a5a1450e2a2b860c8d34d237f3631d9f60853c1f qtserialport-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5serialport/qt5serialport.mk b/package/qt5/qt5serialport/qt5serialport.mk new file mode 100644 index 0000000000..04df021b52 --- /dev/null +++ b/package/qt5/qt5serialport/qt5serialport.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# qt5serialport +# +################################################################################ + +QT5SERIALPORT_VERSION = $(QT5_VERSION) +QT5SERIALPORT_SITE = $(QT5_SITE) +QT5SERIALPORT_SOURCE = qtserialport-opensource-src-$(QT5SERIALPORT_VERSION).tar.xz +QT5SERIALPORT_DEPENDENCIES = qt5base +QT5SERIALPORT_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5SERIALPORT_LICENSE = GPLv2 or GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5SERIALPORT_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5SERIALPORT_LICENSE = Commercial license +QT5SERIALPORT_REDISTRIBUTE = NO +endif + +define QT5SERIALPORT_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5SERIALPORT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5SERIALPORT_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_STATIC_LIBS),) +define QT5SERIALPORT_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5SerialPort.so.* $(TARGET_DIR)/usr/lib +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5svg/Config.in b/package/qt5/qt5svg/Config.in new file mode 100644 index 0000000000..e1acafbfea --- /dev/null +++ b/package/qt5/qt5svg/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_QT5SVG + bool "qt5svg" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_GUI + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5svg module. + + http://qt.io diff --git a/package/qt5/qt5svg/qt5svg.hash b/package/qt5/qt5svg/qt5svg.hash new file mode 100644 index 0000000000..56043cfc49 --- /dev/null +++ b/package/qt5/qt5svg/qt5svg.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtsvg-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 798799319138bb40b6187f4ecc1099956a0d62148f78512e9cb085d1fa5f641f qtsvg-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5svg/qt5svg.mk b/package/qt5/qt5svg/qt5svg.mk new file mode 100644 index 0000000000..ebd5cba802 --- /dev/null +++ b/package/qt5/qt5svg/qt5svg.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# qt5svg +# +################################################################################ + +QT5SVG_VERSION = $(QT5_VERSION) +QT5SVG_SITE = $(QT5_SITE) +QT5SVG_SOURCE = qtsvg-opensource-src-$(QT5SVG_VERSION).tar.xz +QT5SVG_DEPENDENCIES = qt5base +QT5SVG_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5SVG_LICENSE = GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5SVG_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5SVG_LICENSE = Commercial license +QT5SVG_REDISTRIBUTE = NO +endif + +define QT5SVG_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5SVG_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5SVG_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS),y) +define QT5SVG_INSTALL_ICONENGINES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/plugins/iconengines $(TARGET_DIR)/usr/lib/qt/plugins +endef +endif + +ifeq ($(BR2_STATIC_LIBS),) +define QT5SVG_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5Svg*.so.* $(TARGET_DIR)/usr/lib + cp -dpf $(STAGING_DIR)/usr/lib/qt/plugins/imageformats/libqsvg.so $(TARGET_DIR)/usr/lib/qt/plugins/imageformats/ + $(QT5SVG_INSTALL_ICONENGINES) +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5tools/0001-Disable-qdoc-needs-qtdeclarative.patch b/package/qt5/qt5tools/0001-Disable-qdoc-needs-qtdeclarative.patch new file mode 100644 index 0000000000..61cbdfe6a1 --- /dev/null +++ b/package/qt5/qt5tools/0001-Disable-qdoc-needs-qtdeclarative.patch @@ -0,0 +1,30 @@ +From acdb24783322bb6e69df61cf04df2b2e47a06ad2 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Tue, 29 Mar 2016 13:37:09 +0200 +Subject: [PATCH] Disable qdoc (needs qtdeclarative). + +Fixes: + + Project ERROR: Unknown module(s) in QT: qmldevtools-private + Makefile:63: recipe for target 'sub-qdoc-qmake_all' failed + +Signed-off-by: Peter Seiderer +--- + src/src.pro | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/src.pro b/src/src.pro +index 387d54f..494898f 100644 +--- a/src/src.pro ++++ b/src/src.pro +@@ -14,7 +14,6 @@ qtHaveModule(widgets) { + } + + SUBDIRS += linguist \ +- qdoc \ + qtplugininfo + if(!android|android_app):!ios: SUBDIRS += qtpaths + +-- +2.1.4 + diff --git a/package/qt5/qt5tools/Config.in b/package/qt5/qt5tools/Config.in new file mode 100644 index 0000000000..453913b8ad --- /dev/null +++ b/package/qt5/qt5tools/Config.in @@ -0,0 +1,43 @@ +config BR2_PACKAGE_QT5TOOLS + bool "qt5tools" + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5tools module. + + http://qt.io + +if BR2_PACKAGE_QT5TOOLS + +config BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS + bool "Linguist host tools (lconvert, lrelease, lupdate)" + help + This option enables the linguist host tools + lconvert, lrelease and lupdate. + +config BR2_PACKAGE_QT5TOOLS_PIXELTOOL + bool "pixeltool" + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_QT5BASE_WIDGETS + select BR2_PACKAGE_QT5BASE_PNG # saving png images + help + Compile and install the pixeltool program. + +config BR2_PACKAGE_QT5TOOLS_QTDIAG + bool "qtdiag" + select BR2_PACKAGE_QT5BASE_GUI + help + Compile and install the qtdiag program. + +config BR2_PACKAGE_QT5TOOLS_QTPATHS + bool "qtpaths" + help + Compile and install the qtpaths program. + +config BR2_PACKAGE_QT5TOOLS_QTPLUGININFO + bool "qtplugininfo" + help + Compile and install the qtplugininfo program. + +endif diff --git a/package/qt5/qt5tools/qt5tools.hash b/package/qt5/qt5tools/qt5tools.hash new file mode 100644 index 0000000000..84be92d68b --- /dev/null +++ b/package/qt5/qt5tools/qt5tools.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qttools-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 0d244c61bbe5505cb94310e980b06ef13dd573511e80ccbdc060f71d5462219d qttools-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5tools/qt5tools.mk b/package/qt5/qt5tools/qt5tools.mk new file mode 100644 index 0000000000..6befb8b2ce --- /dev/null +++ b/package/qt5/qt5tools/qt5tools.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# qt5tools +# +################################################################################ + +QT5TOOLS_VERSION = $(QT5_VERSION) +QT5TOOLS_SITE = $(QT5_SITE) +QT5TOOLS_SOURCE = qttools-opensource-src-$(QT5BASE_VERSION).tar.xz + +QT5TOOLS_DEPENDENCIES = qt5base +QT5TOOLS_INSTALL_STAGING = YES + +# linguist tools compile conditionally on qtHaveModule(qmldevtools-private), +# but the condition is used only used to decide if lupdate will support +# parsing qml files (via setting QT_NO_QML define), no linking against +# target qt5 will happen +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5TOOLS_DEPENDENCIES += qt5declarative +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5TOOLS_LICENSE = GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5TOOLS_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5TOOLS_LICENSE = Commercial license +QT5TOOLS_REDISTRIBUTE = NO +endif + +QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS) += \ + linguist/lconvert linguist/lrelease linguist/lupdate +ifeq ($(BR2_PACKAGE_QT5TOOLS_LINGUIST_TOOLS),y) +# use install target to copy cmake module files +define QT5TOOLS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/linguist install +endef +endif + +QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_PIXELTOOL) += pixeltool +QT5TOOLS_INSTALL_TARGET_$(BR2_PACKAGE_QT5TOOLS_PIXELTOOL) += pixeltool + +QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTDIAG) += qtdiag +QT5TOOLS_INSTALL_TARGET_$(BR2_PACKAGE_QT5TOOLS_QTDIAG) += qtdiag + +QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTPATHS) += qtpaths +QT5TOOLS_INSTALL_TARGET_$(BR2_PACKAGE_QT5TOOLS_QTPATHS) += qtpaths + +QT5TOOLS_BUILD_DIRS_$(BR2_PACKAGE_QT5TOOLS_QTPLUGININFO) += qtplugininfo +QT5TOOLS_INSTALL_TARGET_$(BR2_PACKAGE_QT5TOOLS_QTPLUGININFO) += qtplugininfo + +define QT5TOOLS_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) sub-src-qmake_all + $(foreach p,$(QT5TOOLS_BUILD_DIRS_y), \ + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src/$(p)$(sep)) +endef + +define QT5TOOLS_INSTALL_TARGET_CMDS + $(foreach p,$(QT5TOOLS_INSTALL_TARGET_y), \ + $(INSTALL) -D -m0755 $(@D)/bin/$(p) $(TARGET_DIR)/usr/bin/$(p)$(sep)) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5webchannel/Config.in b/package/qt5/qt5webchannel/Config.in new file mode 100644 index 0000000000..218629a7cc --- /dev/null +++ b/package/qt5/qt5webchannel/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_QT5WEBCHANNEL + bool "qt5webchannel" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5WEBSOCKETS + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5webchannel module. + + http://qt.io diff --git a/package/qt5/qt5webchannel/qt5webchannel.hash b/package/qt5/qt5webchannel/qt5webchannel.hash new file mode 100644 index 0000000000..4f93cdbe22 --- /dev/null +++ b/package/qt5/qt5webchannel/qt5webchannel.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtwebchannel-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 c25424935e866e77f31e5ebc50fc97eaedd4d77f6e967bfc59ce7fa6a7b4c14f qtwebchannel-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5webchannel/qt5webchannel.mk b/package/qt5/qt5webchannel/qt5webchannel.mk new file mode 100644 index 0000000000..9e94914b90 --- /dev/null +++ b/package/qt5/qt5webchannel/qt5webchannel.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# qt5webchannel +# +################################################################################ + +QT5WEBCHANNEL_VERSION = $(QT5_VERSION) +QT5WEBCHANNEL_SITE = $(QT5_SITE) +QT5WEBCHANNEL_SOURCE = qtwebchannel-opensource-src-$(QT5WEBCHANNEL_VERSION).tar.xz +QT5WEBCHANNEL_DEPENDENCIES = qt5base qt5websockets +QT5WEBCHANNEL_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5WEBCHANNEL_LICENSE = GPLv2 or GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5WEBCHANNEL_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5WEBCHANNEL_LICENSE = Commercial license +QT5WEBCHANNEL_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5WEBCHANNEL_DEPENDENCIES += qt5declarative +endif + +define QT5WEBCHANNEL_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5WEBCHANNEL_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5WEBCHANNEL_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +define QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT + $(INSTALL) -m 0644 -D $(@D)/src/webchannel/qwebchannel.js \ + $(TARGET_DIR)/var/www/qwebchannel.js +endef + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y) +define QT5WEBCHANNEL_INSTALL_TARGET_QMLS + cp -dpfr $(STAGING_DIR)/usr/qml/QtWebChannel $(TARGET_DIR)/usr/qml/ +endef +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5WEBCHANNEL_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/webchannel $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif + +ifneq ($(BR2_STATIC_LIBS),y) +define QT5WEBCHANNEL_INSTALL_TARGET_LIBS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebChannel.so.* $(TARGET_DIR)/usr/lib +endef +endif + +define QT5WEBCHANNEL_INSTALL_TARGET_CMDS + $(QT5WEBCHANNEL_INSTALL_TARGET_LIBS) + $(QT5WEBCHANNEL_INSTALL_TARGET_QMLS) + $(QT5WEBCHANNEL_INSTALL_TARGET_JAVASCRIPT) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch b/package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch new file mode 100644 index 0000000000..669c7e6aa2 --- /dev/null +++ b/package/qt5/qt5webkit/0001-qtwebkit-fix-QA-issue-bad-RPATH.patch @@ -0,0 +1,36 @@ +From 1735a8484ef9ae336f8d607b56bda64c8af10c79 Mon Sep 17 00:00:00 2001 +From: Trevor Woerner +Date: Fri, 7 Feb 2014 04:07:17 +0100 +Subject: [PATCH] qtwebkit: fix QA issue (bad RPATH) + +Building qtwebkit causes a QA issue such that QtWebPluginProcess and +QtWebProcess contain bad RPATHs which point into the build location. This fix +adds a patch to not include the rpath.prf which causes this problem. + +Signed-off-by: Trevor Woerner +Signed-off-by: Martin Jansa + +Downloaded from: +https://github.com/meta-qt5/meta-qt5/blob/krogoth/recipes-qt/qt5/qtwebkit/ +0001-qtwebkit-fix-QA-issue-bad-RPATH.patch + +Signed-off-by: Gary Bisson +--- + Tools/qmake/mkspecs/features/unix/default_post.prf | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Tools/qmake/mkspecs/features/unix/default_post.prf b/Tools/qmake/mkspecs/features/unix/default_post.prf +index fd66af6..ef754c3 100644 +--- a/Tools/qmake/mkspecs/features/unix/default_post.prf ++++ b/Tools/qmake/mkspecs/features/unix/default_post.prf +@@ -61,7 +61,6 @@ linux-*g++* { + } + } + +-contains(TEMPLATE, app): CONFIG += rpath + + CONFIG(debug, debug|release)|force_debug_info { + # Make ld not cache the symbol tables of input files in memory to avoid memory exhaustion during the linking phase. +-- +2.7.0 + diff --git a/package/qt5/qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch b/package/qt5/qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch new file mode 100644 index 0000000000..14352a160c --- /dev/null +++ b/package/qt5/qt5webkit/0002-Remove-TEXTREL-tag-in-x86.patch @@ -0,0 +1,85 @@ +From ae16ce17cc7060274a0b0c165b953fc32540f977 Mon Sep 17 00:00:00 2001 +From: Magnus Granberg +Date: Fri, 27 Feb 2015 11:55:09 +0100 +Subject: [PATCH] Remove TEXTREL tag in x86 + +Fix textrel QA warnings when building qtwebkit for x86: + + WARNING: QA Issue: ELF binary '/home/andre/rdk/rdk-master/build-vbox32/tmp/work/core2-32-rdk-linux/qtwebkit/5.4.0-r0/packages-split/qtwebkit/usr/lib/libQt5WebKit.so.5.4.0' has relocations in .text [textrel] + +Patch from upstream webkit: + + https://bugs.webkit.org/show_bug.cgi?id=70610 + +Minor refresh required to apply cleanly to the older webkit sources used +by qtwebkit. Specifically, the patch needed to be modified to account +for PLATFORM(MAC) -> OS(DARWIN) renaming in recent webkit which is not +part of qtwebkit yet ( https://bugs.webkit.org/show_bug.cgi?id=99683 ). + +Upstream status [webkit] : backport +Upstream status [qtwebkit] : unclear + +Bug: https://bugs.webkit.org/show_bug.cgi?id=70610 +Signed-off-by: Martin Jansa + +Downloaded from: +https://github.com/meta-qt5/meta-qt5/blob/krogoth/recipes-qt/qt5/qtwebkit/ +0002-Remove-TEXTREL-tag-in-x86.patch + +Signed-off-by: Gary Bisson +--- + Source/JavaScriptCore/jit/ThunkGenerators.cpp | 24 ++++++++++++++++++++++++ + Source/WTF/wtf/InlineASM.h | 2 ++ + 2 files changed, 26 insertions(+) + +diff --git a/Source/JavaScriptCore/jit/ThunkGenerators.cpp b/Source/JavaScriptCore/jit/ThunkGenerators.cpp +index 9684df2..8af82d8 100644 +--- a/Source/JavaScriptCore/jit/ThunkGenerators.cpp ++++ b/Source/JavaScriptCore/jit/ThunkGenerators.cpp +@@ -524,6 +524,30 @@ double jsRound(double d) + } \ + static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk; + ++#elif CPU(X86) && COMPILER(GCC) && OS(LINUX) && defined(__PIC__) ++#define defineUnaryDoubleOpWrapper(function) \ ++ asm( \ ++ ".text\n" \ ++ ".globl " SYMBOL_STRING(function##Thunk) "\n" \ ++ HIDE_SYMBOL(function##Thunk) "\n" \ ++ SYMBOL_STRING(function##Thunk) ":" "\n" \ ++ "pushl %ebx\n" \ ++ "subl $20, %esp\n" \ ++ "movsd %xmm0, (%esp) \n" \ ++ "call __x86.get_pc_thunk.bx\n" \ ++ "addl $_GLOBAL_OFFSET_TABLE_, %ebx\n" \ ++ "call " GLOBAL_REFERENCE(function) "\n" \ ++ "fstpl (%esp) \n" \ ++ "movsd (%esp), %xmm0 \n" \ ++ "addl $20, %esp\n" \ ++ "popl %ebx\n" \ ++ "ret\n" \ ++ );\ ++ extern "C" { \ ++ MathThunkCallingConvention function##Thunk(MathThunkCallingConvention); \ ++ } \ ++ static MathThunk UnaryDoubleOpWrapper(function) = &function##Thunk; ++ + #elif CPU(X86) && COMPILER(GCC) && (PLATFORM(MAC) || OS(LINUX)) + #define defineUnaryDoubleOpWrapper(function) \ + asm( \ +diff --git a/Source/WTF/wtf/InlineASM.h b/Source/WTF/wtf/InlineASM.h +index 0a2fe78..2dc40ef 100644 +--- a/Source/WTF/wtf/InlineASM.h ++++ b/Source/WTF/wtf/InlineASM.h +@@ -46,6 +46,8 @@ + #define GLOBAL_REFERENCE(name) #name "@plt" + #elif CPU(X86) && COMPILER(MINGW) + #define GLOBAL_REFERENCE(name) "@" #name "@4" ++#elif OS(LINUX) && CPU(X86) && defined(__PIC__) ++#define GLOBAL_REFERENCE(name) SYMBOL_STRING(name) "@plt" + #else + #define GLOBAL_REFERENCE(name) SYMBOL_STRING(name) + #endif +-- +2.7.0 + diff --git a/package/qt5/qt5webkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch b/package/qt5/qt5webkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch new file mode 100644 index 0000000000..a2597a54bb --- /dev/null +++ b/package/qt5/qt5webkit/0003-Exclude-backtrace-API-for-non-glibc-libraries.patch @@ -0,0 +1,44 @@ +From 6c36f0ff8c1f5852c33d2b23714f9f187cc6ff26 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 5 Jun 2015 19:55:05 -0700 +Subject: [PATCH] Exclude backtrace() API for non-glibc libraries + +It was excluding musl with current checks, so lets make it such that it +considers only glibc when using backtrace API + +Signed-off-by: Khem Raj + +Downloaded from: +https://github.com/meta-qt5/meta-qt5/blob/krogoth/recipes-qt/qt5/qtwebkit/ +0003-Exclude-backtrace-API-for-non-glibc-libraries.patch + +Signed-off-by: Gary Bisson +--- + Source/WTF/wtf/Assertions.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Source/WTF/wtf/Assertions.cpp b/Source/WTF/wtf/Assertions.cpp +index 1b2091f..ba03a28 100644 +--- a/Source/WTF/wtf/Assertions.cpp ++++ b/Source/WTF/wtf/Assertions.cpp +@@ -61,7 +61,7 @@ + #include + #endif + +-#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID) ++#if (OS(DARWIN) || (OS(LINUX) && defined (__GLIBC__) && !defined(__UCLIBC__))) && !OS(ANDROID) + #include + #include + #include +@@ -245,7 +245,7 @@ void WTFReportArgumentAssertionFailure(const char* file, int line, const char* f + + void WTFGetBacktrace(void** stack, int* size) + { +-#if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID) ++#if (OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))) && !OS(ANDROID) + *size = backtrace(stack, *size); + #elif OS(WINDOWS) && !OS(WINCE) + // The CaptureStackBackTrace function is available in XP, but it is not defined +-- +2.7.0 + diff --git a/package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch b/package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch new file mode 100644 index 0000000000..b7b6791ab7 --- /dev/null +++ b/package/qt5/qt5webkit/0004-Fix-linking-with-libpthread.patch @@ -0,0 +1,34 @@ +From 5dd4bb67cfce812fd7686e43616e2069f354a7df Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Mon, 22 Feb 2016 10:57:32 +0100 +Subject: [PATCH] Fix linking with libpthread + +WebKit use libpthread directly but is depending on other qt modules +causing it to be linked against, which might break unless -lpthread +is last. Instead just add it explicitly after the static libraries. + +Upstream-Status: Backport from 5.7 branch + +Change-Id: I2b95cff2c96373f8dce6f95052c4fccbe1982b33 +Reviewed-by: Simon Hausmann +Signed-off-by: Jonathan Liu +Signed-off-by: Gary Bisson +--- + Tools/qmake/mkspecs/features/default_post.prf | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Tools/qmake/mkspecs/features/default_post.prf b/Tools/qmake/mkspecs/features/default_post.prf +index 67276b7..39bb3f7 100644 +--- a/Tools/qmake/mkspecs/features/default_post.prf ++++ b/Tools/qmake/mkspecs/features/default_post.prf +@@ -201,6 +201,7 @@ needToLink() { + linkAgainstLibrary($$library, $$eval(WEBKIT.$${library_identifier}.root_source_dir)) + LIBS += $$eval(WEBKIT.$${library_identifier}.dependent_libs) + } ++ posix:!darwin: LIBS += -lpthread + } + + creating_module { +-- +2.7.1 + diff --git a/package/qt5/qt5webkit/Config.in b/package/qt5/qt5webkit/Config.in new file mode 100644 index 0000000000..7add5f95a9 --- /dev/null +++ b/package/qt5/qt5webkit/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_QT5WEBKIT + bool "qt5webkit" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_ICU + select BR2_PACKAGE_QT5BASE_GUI + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_XLIB_LIBXEXT if BR2_PACKAGE_QT5BASE_XCB + select BR2_PACKAGE_XLIB_LIBXRENDER if BR2_PACKAGE_QT5BASE_XCB + depends on !BR2_STATIC_LIBS + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + depends on !BR2_BINFMT_FLAT # icu + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5webkit module. + + This package has been removed from the official release packages + since Qt5.6.0, but it is still available for users to build it + from source. This is useful for platforms without GPU since the + successor (QtWebEngine) requires OpenGL support. + + http://qt.io + +comment "qt5webkit needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + depends on !BR2_BINFMT_FLAT diff --git a/package/qt5/qt5webkit/qt5webkit.hash b/package/qt5/qt5webkit/qt5webkit.hash new file mode 100644 index 0000000000..d2ac7bbcc3 --- /dev/null +++ b/package/qt5/qt5webkit/qt5webkit.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 1c79843ef32313312290d4fe0b87256a9129dc44d62b01789a692981edf4d8ab qt5webkit-d2ff5a085572b1ee24dcb42ae107063f3142d14e.tar.gz diff --git a/package/qt5/qt5webkit/qt5webkit.mk b/package/qt5/qt5webkit/qt5webkit.mk new file mode 100644 index 0000000000..629e40a3ec --- /dev/null +++ b/package/qt5/qt5webkit/qt5webkit.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# qt5webkit +# +################################################################################ + +QT5WEBKIT_VERSION = d2ff5a085572b1ee24dcb42ae107063f3142d14e +# Using GitHub since it supports downloading tarballs from random commits. +# The http://code.qt.io/cgit/qt/qtwebkit.git/ repo doesn't allow to do so. +QT5WEBKIT_SITE = $(call github,qtproject,qtwebkit,$(QT5WEBKIT_VERSION)) +QT5WEBKIT_DEPENDENCIES = qt5base sqlite host-ruby host-gperf host-bison host-flex +QT5WEBKIT_INSTALL_STAGING = YES + +QT5WEBKIT_LICENSE_FILES = Source/WebCore/LICENSE-LGPL-2 Source/WebCore/LICENSE-LGPL-2.1 + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5WEBKIT_LICENSE = LGPLv2.1+, BSD-3c, BSD-2c +# Source files contain references to LGPL_EXCEPTION.txt but it is not included +# in the archive. +QT5WEBKIT_LICENSE_FILES += LICENSE.LGPLv21 +else +QT5WEBKIT_LICENSE = LGPLv2.1+ (WebCore), Commercial license +QT5WEBKIT_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_XCB),y) +QT5WEBKIT_DEPENDENCIES += xlib_libXext xlib_libXrender +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5WEBKIT_DEPENDENCIES += qt5declarative +endif + +# Since we get the source from git, generated header files are not included. +# qmake detects that header file generation (using the syncqt tool) must be +# done based on the existence of a .git directory (cfr. the git_build config +# option which is set in qt_build_paths.prf). +# So, to make sure that qmake detects that header files must be generated, +# create an empty .git directory. +define QT5WEBKIT_CONFIGURE_CMDS + mkdir -p $(@D)/.git + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5WEBKIT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5WEBKIT_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y) +define QT5WEBKIT_INSTALL_TARGET_QMLS + cp -dpfr $(STAGING_DIR)/usr/qml/QtWebKit $(TARGET_DIR)/usr/qml/ +endef +endif + +define QT5WEBKIT_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebKit*.so.* $(TARGET_DIR)/usr/lib + cp -dpf $(@D)/bin/* $(TARGET_DIR)/usr/bin/ + $(QT5WEBKIT_INSTALL_TARGET_QMLS) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5websockets/Config.in b/package/qt5/qt5websockets/Config.in new file mode 100644 index 0000000000..385a07c9fa --- /dev/null +++ b/package/qt5/qt5websockets/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_QT5WEBSOCKETS + bool "qt5websockets" + select BR2_PACKAGE_QT5BASE + select BR2_PACKAGE_QT5BASE_NETWORK + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5websockets module. + + http://qt.io diff --git a/package/qt5/qt5websockets/qt5websockets.hash b/package/qt5/qt5websockets/qt5websockets.hash new file mode 100644 index 0000000000..d803285575 --- /dev/null +++ b/package/qt5/qt5websockets/qt5websockets.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtwebsockets-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 268ab869fe3d0d22abd9668851155db79aff2f386bc448051b6ef477841d719f qtwebsockets-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5websockets/qt5websockets.mk b/package/qt5/qt5websockets/qt5websockets.mk new file mode 100644 index 0000000000..f1200c283a --- /dev/null +++ b/package/qt5/qt5websockets/qt5websockets.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# qt5websockets +# +################################################################################ + +QT5WEBSOCKETS_VERSION = $(QT5_VERSION) +QT5WEBSOCKETS_SITE = $(QT5_SITE) +QT5WEBSOCKETS_SOURCE = qtwebsockets-opensource-src-$(QT5WEBSOCKETS_VERSION).tar.xz +QT5WEBSOCKETS_DEPENDENCIES = qt5base +QT5WEBSOCKETS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5WEBSOCKETS_LICENSE = GPLv3 or LGPLv2.1 with exception or LGPLv3 +QT5WEBSOCKETS_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 +else +QT5WEBSOCKETS_LICENSE = Commercial license +QT5WEBSOCKETS_REDISTRIBUTE = NO +endif + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE),y) +QT5WEBSOCKETS_DEPENDENCIES += qt5declarative +endif + +define QT5WEBSOCKETS_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5WEBSOCKETS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5WEBSOCKETS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_PACKAGE_QT5DECLARATIVE_QUICK),y) +define QT5WEBSOCKETS_INSTALL_TARGET_QMLS + cp -dpfr $(STAGING_DIR)/usr/qml/Qt/WebSockets $(TARGET_DIR)/usr/qml/Qt/ +endef +endif + +ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y) +define QT5WEBSOCKETS_INSTALL_TARGET_EXAMPLES + cp -dpfr $(STAGING_DIR)/usr/lib/qt/examples/websockets $(TARGET_DIR)/usr/lib/qt/examples/ +endef +endif + +ifneq ($(BR2_STATIC_LIBS),y) +define QT5WEBSOCKETS_INSTALL_TARGET_LIBS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5WebSockets.so.* $(TARGET_DIR)/usr/lib +endef +endif + +define QT5WEBSOCKETS_INSTALL_TARGET_CMDS + $(QT5WEBSOCKETS_INSTALL_TARGET_LIBS) + $(QT5WEBSOCKETS_INSTALL_TARGET_QMLS) +endef + +$(eval $(generic-package)) diff --git a/package/qt5/qt5x11extras/Config.in b/package/qt5/qt5x11extras/Config.in new file mode 100644 index 0000000000..6fc2c0ade6 --- /dev/null +++ b/package/qt5/qt5x11extras/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_QT5X11EXTRAS + bool "qt5x11extras" + select BR2_PACKAGE_QT5BASE_WIDGETS + depends on BR2_PACKAGE_QT5BASE_XCB + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5x11extras module. + + http://qt.io diff --git a/package/qt5/qt5x11extras/qt5x11extras.hash b/package/qt5/qt5x11extras/qt5x11extras.hash new file mode 100644 index 0000000000..5f5481e0bd --- /dev/null +++ b/package/qt5/qt5x11extras/qt5x11extras.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtx11extras-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 47ed768d02bc09edfa20332bc58c4188b9529235cdb616802ef775d6e7613425 qtx11extras-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5x11extras/qt5x11extras.mk b/package/qt5/qt5x11extras/qt5x11extras.mk new file mode 100644 index 0000000000..a0e1209868 --- /dev/null +++ b/package/qt5/qt5x11extras/qt5x11extras.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# qt5x11extras +# +################################################################################ + +QT5X11EXTRAS_VERSION = $(QT5_VERSION) +QT5X11EXTRAS_SITE = $(QT5_SITE) +QT5X11EXTRAS_SOURCE = qtx11extras-opensource-src-$(QT5X11EXTRAS_VERSION).tar.xz +QT5X11EXTRAS_DEPENDENCIES = qt5base +QT5X11EXTRAS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5X11EXTRAS_LICENSE = GPLv2 or GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5X11EXTRAS_LICENSE_FILES = LICENSE.GPLv2 LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5X11EXTRAS_LICENSE = Commercial license +QT5X11EXTRAS_REDISTRIBUTE = NO +endif + +define QT5X11EXTRAS_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5X11EXTRAS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5X11EXTRAS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_STATIC_LIBS),) +define QT5X11EXTRAS_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5X11Extras.so.* $(TARGET_DIR)/usr/lib +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5/qt5xmlpatterns/Config.in b/package/qt5/qt5xmlpatterns/Config.in new file mode 100644 index 0000000000..8c82656c5d --- /dev/null +++ b/package/qt5/qt5xmlpatterns/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_QT5XMLPATTERNS + bool "qt5xmlpatterns" + select BR2_PACKAGE_QT5BASE + help + Qt is a cross-platform application and UI framework for + developers using C++. + + This package corresponds to the qt5xmlpatterns module. + + http://qt.io diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.hash b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.hash new file mode 100644 index 0000000000..ffe2a4049a --- /dev/null +++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.hash @@ -0,0 +1,2 @@ +# Hash from: http://download.qt.io/official_releases/qt/5.6/5.6.0/submodules/qtxmlpatterns-opensource-src-5.6.0.tar.xz.mirrorlist +sha256 baed1b3bd3f010b8c4a96b4ca7a595b665d43d2e5758b55a364dbc9f2ac819d4 qtxmlpatterns-opensource-src-5.6.0.tar.xz diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk new file mode 100644 index 0000000000..31477a7c0b --- /dev/null +++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# qt5xmlpatterns +# +################################################################################ + +QT5XMLPATTERNS_VERSION = $(QT5_VERSION) +QT5XMLPATTERNS_SITE = $(QT5_SITE) +QT5XMLPATTERNS_SOURCE = qtxmlpatterns-opensource-src-$(QT5XMLPATTERNS_VERSION).tar.xz +QT5XMLPATTERNS_DEPENDENCIES = qt5base +QT5XMLPATTERNS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_QT5BASE_LICENSE_APPROVED),y) +QT5XMLPATTERNS_LICENSE = GPLv3 or LGPLv2.1 with exception or LGPLv3, GFDLv1.3 (docs) +QT5XMLPATTERNS_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL +else +QT5XMLPATTERNS_LICENSE = Commercial license +QT5XMLPATTERNS_REDISTRIBUTE = NO +endif + +define QT5XMLPATTERNS_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake) +endef + +define QT5XMLPATTERNS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QT5XMLPATTERNS_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install + $(QT5_LA_PRL_FILES_FIXUP) +endef + +ifeq ($(BR2_STATIC_LIBS),) +define QT5XMLPATTERNS_INSTALL_TARGET_CMDS + cp -dpf $(STAGING_DIR)/usr/lib/libQt5XmlPatterns*.so.* $(TARGET_DIR)/usr/lib +endef +endif + +$(eval $(generic-package)) diff --git a/package/qt5cinex/0001-Fix-execution-problem-with-Qt5.3.patch b/package/qt5cinex/0001-Fix-execution-problem-with-Qt5.3.patch new file mode 100644 index 0000000000..ceae8cc898 --- /dev/null +++ b/package/qt5cinex/0001-Fix-execution-problem-with-Qt5.3.patch @@ -0,0 +1,64 @@ +From 9b045ee7988daf3bb4c7cbe1ed1b9d744820e82b Mon Sep 17 00:00:00 2001 +From: Pierre Le Magourou +Date: Mon, 15 Dec 2014 11:54:51 +0100 +Subject: [PATCH] Fix execution problem with Qt5.3. + +This patch has been inspired from Open Embedded meta-qt5. + +Signed-off-by: Pierre Le Magourou +--- + content/SettingsView.qml | 4 ++-- + content/Switch.qml | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/content/SettingsView.qml b/content/SettingsView.qml +index 7944803..a0ddcc8 100644 +--- a/content/SettingsView.qml ++++ b/content/SettingsView.qml +@@ -127,8 +127,8 @@ Item { + Switch { + text: "Do you l-o-v-e colors?" + checked: settings.showColors +- onText: "Yes" +- offText: "No!" ++ textON: "Yes" ++ textOFF: "No!" + onCheckedChanged: { + settings.showColors = checked; + } +diff --git a/content/Switch.qml b/content/Switch.qml +index 967c03f..66955fc 100644 +--- a/content/Switch.qml ++++ b/content/Switch.qml +@@ -6,8 +6,8 @@ Item { + + property alias text: textItem.text + property bool checked: false +- property string onText: "On" +- property string offText: "Off" ++ property string textON: "On" ++ property string textOFF: "Off" + + QtObject { + id: priv +@@ -120,7 +120,7 @@ Item { + color: "#000000" + font.pixelSize: 18 + font.bold: true +- text: onText ++ text: textON + } + Text { + anchors.verticalCenter: parent.verticalCenter +@@ -129,7 +129,7 @@ Item { + color: "#ffffff" + font.pixelSize: 18 + font.bold: true +- text: offText ++ text: textOFF + } + + Image { +-- +2.1.3 + diff --git a/package/qt5cinex/CinematicExperience-demo b/package/qt5cinex/CinematicExperience-demo new file mode 100755 index 0000000000..919958fa7b --- /dev/null +++ b/package/qt5cinex/CinematicExperience-demo @@ -0,0 +1,2 @@ +#!/bin/sh +exec /usr/share/Qt5/CinematicExperience/Qt5_CinematicExperience "$@" diff --git a/package/qt5cinex/Config.in b/package/qt5cinex/Config.in new file mode 100644 index 0000000000..b273231be5 --- /dev/null +++ b/package/qt5cinex/Config.in @@ -0,0 +1,34 @@ +comment "qt5cinex needs an Open(E)GL-capable backend" + depends on BR2_PACKAGE_QT5 + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + depends on !BR2_PACKAGE_QT5_GL_AVAILABLE || !BR2_PACKAGE_HAS_LIBEGL + +config BR2_PACKAGE_QT5CINEX + bool "qt5cinex" + depends on BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT5BASE_NETWORK + select BR2_PACKAGE_QT5BASE_PNG + select BR2_PACKAGE_QT5BASE_WIDGETS + select BR2_PACKAGE_QT5BASE_EGLFS + select BR2_PACKAGE_QT5GRAPHICALEFFECTS + depends on BR2_PACKAGE_HAS_LIBEGL # qt5base-eglfs + depends on BR2_PACKAGE_QT5_GL_AVAILABLE + # No comment needed for this option, it's an architecture + # dependency. + depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE + help + This application demonstrates the power of Qt5 and few of the new + additions available in QtQuick 2.0. + + http://quitcoding.com/?page=work#cinex + +if BR2_PACKAGE_QT5CINEX + +config BR2_PACKAGE_QT5CINEX_HD + bool "High-definition version (aka RPi Edition)" + help + High definition version (1920x1080 resolution) of the + application, optimised for Raspberry PI cards. This version + can also be run on any platform supported by Qt5. + +endif diff --git a/package/qt5cinex/qt5cinex.hash b/package/qt5cinex/qt5cinex.hash new file mode 100644 index 0000000000..637f388b73 --- /dev/null +++ b/package/qt5cinex/qt5cinex.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 0dd602983ced5f7c0cfd5ad0fbfe2b0b7e3c9ff715e4ef23eef818ccc2b6c60b Qt5_CinematicExperience_rpi_1.0.tgz +sha256 0e547e0259667915a24e84ade5efdcd0c553f81786734452c2c8dbce19a19f44 Qt5_CinematicExperience_1.0.tgz diff --git a/package/qt5cinex/qt5cinex.mk b/package/qt5cinex/qt5cinex.mk new file mode 100644 index 0000000000..bfe14ce74e --- /dev/null +++ b/package/qt5cinex/qt5cinex.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# qt5cinex +# +################################################################################ + +QT5CINEX_VERSION = 1.0 +QT5CINEX_SITE = http://quitcoding.com/download + +ifeq ($(BR2_PACKAGE_QT5CINEX_HD),y) +QT5CINEX_HD = "rpi_" +endif + +QT5CINEX_SOURCE = Qt5_CinematicExperience_$(QT5CINEX_HD)$(QT5CINEX_VERSION).tgz +QT5CINEX_DEPENDENCIES = qt5base qt5declarative + +QT5CINEX_LICENSE = CC-BY-3.0 +QT5CINEX_LICENSE_FILES = README + +define QT5CINEX_CONFIGURE_CMDS + cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/usr/bin/qmake +endef + +define QT5CINEX_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +# In addition to the Cinematic Experience itself, we also install a +# wrapper shell script to /usr/bin: the Cinematic Experience binary +# wants its resource files to be available directly under a contents/ +# sub-directory, which isn't very practical to install in /usr/bin/. +define QT5CINEX_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/Qt5_CinematicExperience \ + $(TARGET_DIR)/usr/share/Qt5/CinematicExperience/Qt5_CinematicExperience + $(INSTALL) -D -m 0664 $(@D)/Qt5_CinematicExperience.qml \ + $(TARGET_DIR)/usr/share/Qt5/CinematicExperience/Qt5_CinematicExperience.qml + cp -dpfr $(@D)/content $(TARGET_DIR)/usr/share/Qt5/CinematicExperience/content + $(INSTALL) -m 0755 -D package/qt5cinex/CinematicExperience-demo \ + $(TARGET_DIR)/usr/bin/CinematicExperience-demo +endef + +$(eval $(generic-package)) diff --git a/package/qtuio/0001-TuioServer.cpp-add-missing-include.patch b/package/qtuio/0001-TuioServer.cpp-add-missing-include.patch new file mode 100644 index 0000000000..99337026df --- /dev/null +++ b/package/qtuio/0001-TuioServer.cpp-add-missing-include.patch @@ -0,0 +1,28 @@ +From 4dd7cad8c95484a882eaa2aeaa74595a3dd93a07 Mon Sep 17 00:00:00 2001 +From: Stephan Hoffmann +Date: Sun, 2 Dec 2012 13:36:41 +0100 +Subject: [PATCH] TuioServer.cpp: add missing include + +If usleep() is used the header has to be included + +Signed-off-by: Stephan Hoffmann +--- + src/3rdparty/tuio/TuioServer.cpp | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/src/3rdparty/tuio/TuioServer.cpp b/src/3rdparty/tuio/TuioServer.cpp +index f17bef9..851144c 100644 +--- a/src/3rdparty/tuio/TuioServer.cpp ++++ b/src/3rdparty/tuio/TuioServer.cpp +@@ -25,6 +25,8 @@ using namespace TUIO; + using namespace osc; + + #ifndef WIN32 ++#include ++ + static void* ThreadFunc( void* obj ) + #else + static DWORD WINAPI ThreadFunc( LPVOID obj ) +-- +1.7.0.4 + diff --git a/package/qtuio/0002-dont-append-_d-for-debug.patch b/package/qtuio/0002-dont-append-_d-for-debug.patch new file mode 100644 index 0000000000..fbaaf19222 --- /dev/null +++ b/package/qtuio/0002-dont-append-_d-for-debug.patch @@ -0,0 +1,29 @@ +[PATCH] don't append _d to library name when Qt is built with debug support + +qtuio appends _d to the library name when Qt was built with debug support, +breaking linking step for examples and staging/target install. + +There's no real advantage to the _d suffix, so simply fix it by removing +the logic appending _d. + +Signed-off-by: Peter Korsgaard +--- + src/qTUIO.pro | 5 ----- + 1 file changed, 5 deletions(-) + +Index: qtuio-abe4973ff6/src/qTUIO.pro +=================================================================== +--- qtuio-abe4973ff6.orig/src/qTUIO.pro ++++ qtuio-abe4973ff6/src/qTUIO.pro +@@ -16,11 +16,6 @@ + win32:LIBS += ws2_32.lib \ + winmm.lib + +-# Changes the name of the target, when is debug mode +-CONFIG( debug, debug|release ) { +- TARGET = $${TARGET}_d +- BUILD_NAME = debug +-} + CONFIG( release, debug|release ):BUILD_NAME = release + + # Temporary folders for the auxiliar files diff --git a/package/qtuio/Config.in b/package/qtuio/Config.in new file mode 100644 index 0000000000..f46f1dd407 --- /dev/null +++ b/package/qtuio/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_QTUIO + bool "qtuio" + depends on BR2_PACKAGE_QT + depends on BR2_PACKAGE_QT_GUI_MODULE + help + Implementation of an interface connecting TUIO messages + and QT events + + https://github.com/x29a/qTUIO + +if BR2_PACKAGE_QTUIO + +config BR2_QTUIO_EXAMPLES + bool "qtuio examples" + help + Build and install qtuio examples + +endif + +comment "qtuio depends on QT gui module" + depends on BR2_PACKAGE_QT + depends on !BR2_PACKAGE_QT_GUI_MODULE diff --git a/package/qtuio/qtuio.mk b/package/qtuio/qtuio.mk new file mode 100644 index 0000000000..5fa10a76b7 --- /dev/null +++ b/package/qtuio/qtuio.mk @@ -0,0 +1,72 @@ +################################################################################ +# +# qtuio +# +################################################################################ + +QTUIO_VERSION = abe4973ff60654aad9df7037c4ca15c45f811d24 +QTUIO_SITE = $(call github,x29a,qTUIO,$(QTUIO_VERSION)) +QTUIO_INSTALL_STAGING = YES +QTUIO_DEPENDENCIES = qt + +QTUIO_LICENSE = GPLv3+ +QTUIO_LICENSE_FILES = COPYING + +# The pong example needs QtOpenGL support, which might become available +# some time in the future. Then add pong to the list of examples. +QTUIO_EXAMPLES = dials fingerpaint knobs pinchzoom + +ifeq ($(BR2_QTUIO_EXAMPLES),y) +define QTUIO_CONFIGURE_EXAMPLES + for example in $(QTUIO_EXAMPLES) ; do \ + (cd $(@D)/examples/$${example} && $(TARGET_MAKE_ENV) $(QT_QMAKE)) || exit 1; \ + done +endef +endif + +define QTUIO_CONFIGURE_CMDS + cd $(@D)/src && $(TARGET_MAKE_ENV) $(QT_QMAKE) + $(QTUIO_CONFIGURE_EXAMPLES) +endef + +ifeq ($(BR2_QTUIO_EXAMPLES),y) +define QTUIO_BUILD_EXAMPLES + for example in $(QTUIO_EXAMPLES) ; do \ + $(MAKE) -C $(@D)/examples/$${example} || exit 1; \ + done +endef +endif + +define QTUIO_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/src + $(QTUIO_BUILD_EXAMPLES) +endef + +# Unfortunately, there is no working "install" target available +ifeq ($(BR2_QTUIO_EXAMPLES),y) +define QTUIO_INSTALL_EXAMPLES + for example in $(QTUIO_EXAMPLES) ; do \ + $(INSTALL) -D -m 0755 $(@D)/examples/$${example}/$${example} $(TARGET_DIR)/usr/share/qtuio/$${example} || exit 1 ; \ + done +endef +endif + +ifeq ($(BR2_PACKAGE_QT_STATIC),y) +QTUIO_LIBRARY = libqTUIO.a +else +QTUIO_LIBRARY = libqTUIO.so* +define QTUIO_INSTALL_TARGET_LIBRARY + cp -dpf $(@D)/lib/$(QTUIO_LIBRARY) $(TARGET_DIR)/usr/lib +endef +endif + +define QTUIO_INSTALL_TARGET_CMDS + $(QTUIO_INSTALL_TARGET_LIBRARY) + $(QTUIO_INSTALL_EXAMPLES) +endef + +define QTUIO_INSTALL_STAGING_CMDS + cp -dpf $(@D)/lib/$(QTUIO_LIBRARY) $(STAGING_DIR)/usr/lib +endef + +$(eval $(generic-package)) diff --git a/package/quagga/0001-fix-ipctl-forwarding.patch b/package/quagga/0001-fix-ipctl-forwarding.patch new file mode 100644 index 0000000000..e2e3421edb --- /dev/null +++ b/package/quagga/0001-fix-ipctl-forwarding.patch @@ -0,0 +1,27 @@ +Add definitions for IPCTL_FORWARDING and IP6CTL_FORWARDING. + +Inspired from +http://svn.gnumonks.org/trunk/grouter/build/src/quagga/quagga/quagga-0.99.1-forward_sysctl-2.6.14.patch + +Signed-off-by: Thomas Petazzoni + +Index: quagga-0.99.16/zebra/ipforward_sysctl.c +=================================================================== +--- quagga-0.99.16.orig/zebra/ipforward_sysctl.c 2010-06-20 23:40:45.000000000 +0200 ++++ quagga-0.99.16/zebra/ipforward_sysctl.c 2010-06-20 23:41:37.000000000 +0200 +@@ -31,6 +31,15 @@ + + #define MIB_SIZ 4 + ++/* Fix for recent (2.6.14) kernel headers */ ++#ifndef IPCTL_FORWARDING ++#define IPCTL_FORWARDING NET_IPV4_FORWARD ++#endif ++ ++#ifndef IP6CTL_FORWARDING ++#define IP6CTL_FORWARDING NET_IPV6_FORWARDING ++#endif ++ + extern struct zebra_privs_t zserv_privs; + + /* IPv4 forwarding control MIB. */ diff --git a/package/quagga/0002-configure-fix-static-linking-with-readline.patch b/package/quagga/0002-configure-fix-static-linking-with-readline.patch new file mode 100644 index 0000000000..243dfaf75d --- /dev/null +++ b/package/quagga/0002-configure-fix-static-linking-with-readline.patch @@ -0,0 +1,41 @@ +From 62ede7482da15d276b880f6d8540dce400dc50a7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 26 Nov 2015 15:59:07 +0100 +Subject: [PATCH] configure: fix static linking with readline + +When static linking is used, the order of the libraries is important, +and the libraries using a symbol from another library should be listed +*before* the library providing that symbol (see +http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking) +for details. + +When vtysh is linked statically, the command line contains "-lcurses +-lreadline", which causes a build failure due to unresolved +symbols. This is because readline is using symbols from the curses +library: the order should be the opposite. + +This patch fixes that problem by putting the -lreadline at the +beginning of the LIBREADLINE variable calcualted by the configure +script. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 3003e62..290953d 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -652,7 +652,7 @@ dnl [TODO] on Linux, and in [TODO] on Solaris. + )] + )] + ) +- AC_CHECK_LIB(readline, main, LIBREADLINE="$LIBREADLINE -lreadline",, ++ AC_CHECK_LIB(readline, main, LIBREADLINE="-lreadline $LIBREADLINE",, + "$LIBREADLINE") + if test $ac_cv_lib_readline_main = no; then + AC_MSG_ERROR([vtysh needs libreadline but was not found and usable on your system.]) +-- +2.6.3 + diff --git a/package/quagga/Config.in b/package/quagga/Config.in new file mode 100644 index 0000000000..56b8cad93c --- /dev/null +++ b/package/quagga/Config.in @@ -0,0 +1,87 @@ +config BR2_PACKAGE_QUAGGA + bool "quagga" + depends on BR2_USE_MMU # fork() + help + Routing software suite, providing implementations of + OSPFv2, OSPFv3 (IPv6), RIP v1 and v2, RIPng (IPv6) and BGPv4+. + + http://www.quagga.net/ + +if BR2_PACKAGE_QUAGGA + +config BR2_PACKAGE_QUAGGA_ZEBRA + bool "zebra daemon" + help + Build zebra daemon. + +config BR2_PACKAGE_QUAGGA_TCP_ZEBRA + bool "Use TCP sockets between zebra and protocol daemons" + depends on BR2_PACKAGE_QUAGGA_ZEBRA + help + Use a TCP socket to communicate between zebra (supervisor) and + the different protocol daemons. + + You'll want this enabled if zebra and the protocol daemon(s) run + on different hosts. + +config BR2_PACKAGE_QUAGGA_BGPD + bool "BPGv4+ protocol" + help + Build bpgd daemon. + +config BR2_PACKAGE_QUAGGA_BGP_ANNOUNCE + bool "BGP route announcement" + depends on BR2_PACKAGE_QUAGGA_BGPD + +config BR2_PACKAGE_QUAGGA_ISISD + bool "IS-IS protocol" + help + Enable isisd support in quagga. + +config BR2_PACKAGE_QUAGGA_OSPFD + bool "OSPFv2 protocol" + help + Build ospfd daemon. + +config BR2_PACKAGE_QUAGGA_OSPF6D + bool "OSPFv3 (IPv6) protocol" + help + Build ospf6d daemon. + +config BR2_PACKAGE_QUAGGA_RIPD + bool "RIPv2/v3 protocol" + help + Build ripd daemon. + +config BR2_PACKAGE_QUAGGA_RIPNGD + bool "RIPng (IPv6) protocol" + help + Build ripngd daemon. + +config BR2_PACKAGE_QUAGGA_PIMD + bool "PIMd protocol" + help + Provides IPv4 PIM-SSM multicast routing. + +config BR2_PACKAGE_QUAGGA_WATCHQUAGGA + bool "Build watchquagga" + help + Build and install watchquagga, a zebra/protocol daemon supervisor. + +config BR2_PACKAGE_QUAGGA_VTYSH + bool "Build vtysh" + select BR2_PACKAGE_READLINE + help + Build and install vtysh, a vty shell for Quagga. + +config BR2_PACKAGE_QUAGGA_SNMP + bool "SNMP support" + depends on BR2_USE_MMU # net-snmp + select BR2_PACKAGE_NETSNMP + help + Make quagga information available via SNMP SMUX. + +comment "AgentX support must be enabled in net-snmp or the build will break" + depends on BR2_PACKAGE_QUAGGA_SNMP + +endif diff --git a/package/quagga/quagga.hash b/package/quagga/quagga.hash new file mode 100644 index 0000000000..23a0a8245b --- /dev/null +++ b/package/quagga/quagga.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 d284af5dd875dbba90ab875d40db5d68fdc9ede17a76f2af525f85344be56767 quagga-1.0.20160315.tar.xz diff --git a/package/quagga/quagga.mk b/package/quagga/quagga.mk new file mode 100644 index 0000000000..22e90add2c --- /dev/null +++ b/package/quagga/quagga.mk @@ -0,0 +1,80 @@ +################################################################################ +# +# quagga +# +################################################################################ + +QUAGGA_VERSION = 1.0.20160315 +QUAGGA_SOURCE = quagga-$(QUAGGA_VERSION).tar.xz +QUAGGA_SITE = http://download.savannah.gnu.org/releases/quagga +QUAGGA_DEPENDENCIES = host-gawk +QUAGGA_LICENSE = GPLv2+ +QUAGGA_LICENSE_FILES = COPYING + +# We need to override the sysconf and localstate directories so that +# quagga can create files as the quagga user without extra +# intervention +QUAGGA_CONF_OPTS = \ + --program-transform-name='' \ + --sysconfdir=/etc/quagga \ + --localstatedir=/var/run/quagga + +# 0002-configure-fix-static-linking-with-readline.patch +QUAGGA_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +QUAGGA_CONF_OPTS += --enable-capabilities +QUAGGA_DEPENDENCIES += libcap +else +QUAGGA_CONF_OPTS += --disable-capabilities +endif + +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_ZEBRA),--enable-zebra,--disable-zebra) +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_BGPD),--enable-bgpd,--disable-bgpd) +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_RIPD),--enable-ripd,--disable-ripd) +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_RIPNGD),--enable-ripngd,--disable-ripngd) +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_OSPFD),--enable-ospfd,--disable-ospfd --disable-ospfapi) +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_OSPF6D),--enable-ospf6d,--disable-ospf6d) +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_PIMD),--enable-pimd,--disable-pimd) +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_WATCHQUAGGA),--enable-watchquagga,--disable-watchquagga) +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_ISISD),--enable-isisd,--disable-isisd) +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_BGP_ANNOUNCE),--enable-bgp-announce,--disable-bgp-announce) +QUAGGA_CONF_OPTS += $(if $(BR2_PACKAGE_QUAGGA_TCP_ZERBRA),--enable-tcp-zebra,--disable-tcp-zebra) + +define QUAGGA_USERS + quagga -1 quagga -1 * - - - Quagga priv drop user +endef + +# Set the permissions of /etc/quagga such that quagga (through vtysh) +# can save the configuration - set the folder recursively as the files +# need to be 600, and then set the folder (non-recursively) to 755 so +# it can used. Quagga also needs to write to the folder as it moves +# and creates, rather than overwriting. +define QUAGGA_PERMISSIONS + /etc/quagga r 600 quagga quagga - - - - - + /etc/quagga d 755 quagga quagga - - - - - +endef + +ifeq ($(BR2_PACKAGE_QUAGGA_SNMP),y) +QUAGGA_CONF_ENV += ac_cv_path_NETSNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config +QUAGGA_CONF_OPTS += --enable-snmp=agentx +QUAGGA_DEPENDENCIES += netsnmp +endif + +ifeq ($(BR2_PACKAGE_QUAGGA_VTYSH),y) +QUAGGA_CONF_OPTS += --enable-vtysh +QUAGGA_DEPENDENCIES += readline +else +QUAGGA_CONF_OPTS += --disable-vtysh +endif + +ifeq ($(BR2_arc),y) +QUAGGA_CONF_OPTS += --disable-pie +endif + +define QUAGGA_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/quagga/quagga_tmpfiles.conf \ + $(TARGET_DIR)/usr/lib/tmpfiles.d/quagga.conf +endef + +$(eval $(autotools-package)) diff --git a/package/quagga/quagga_tmpfiles.conf b/package/quagga/quagga_tmpfiles.conf new file mode 100644 index 0000000000..e16c475fd4 --- /dev/null +++ b/package/quagga/quagga_tmpfiles.conf @@ -0,0 +1 @@ +d /var/run/quagga/ 1755 quagga quagga - diff --git a/package/quazip/Config.in b/package/quazip/Config.in new file mode 100644 index 0000000000..83537d4613 --- /dev/null +++ b/package/quazip/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_QUAZIP + bool "quazip" + select BR2_PACKAGE_ZLIB + help + QuaZIP is a simple C++ wrapper over Gilles Vollant's + ZIP/UNZIP package that can be used to access ZIP + archives. It uses the Qt toolkit. + + http://quazip.sourceforge.net diff --git a/package/quazip/quazip.hash b/package/quazip/quazip.hash new file mode 100644 index 0000000000..2f73c459c6 --- /dev/null +++ b/package/quazip/quazip.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 91d827fbcafd099ae814cc18a8dd3bb709da6b8a27c918ee1c6c03b3f29440f4 quazip-0.7.2.tar.gz diff --git a/package/quazip/quazip.mk b/package/quazip/quazip.mk new file mode 100644 index 0000000000..91b2f56328 --- /dev/null +++ b/package/quazip/quazip.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# quazip +# +################################################################################ + +QUAZIP_VERSION = 0.7.2 +QUAZIP_SITE = http://sourceforge.net/projects/quazip/files/quazip/$(QUAZIP_VERSION) +QUAZIP_INSTALL_STAGING = YES +QUAZIP_DEPENDENCIES = \ + zlib \ + $(if $(BR2_PACKAGE_QT),qt) \ + $(if $(BR2_PACKAGE_QT5),qt5base) +QUAZIP_LICENSE = LGPLv2.1 +QUAZIP_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_QT5),y) +QUAZIP_QMAKE = $(QT5_QMAKE) +else +QUAZIP_QMAKE = $(QT_QMAKE) +endif + +define QUAZIP_CONFIGURE_CMDS + (cd $(@D); $(TARGET_MAKE_ENV) $(QUAZIP_QMAKE) PREFIX=/usr) +endef + +define QUAZIP_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define QUAZIP_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install INSTALL_ROOT=$(STAGING_DIR) +endef + +define QUAZIP_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install INSTALL_ROOT=$(TARGET_DIR) +endef + +$(eval $(generic-package)) diff --git a/package/quota/0001-tools-getrpcbynumber.patch b/package/quota/0001-tools-getrpcbynumber.patch new file mode 100644 index 0000000000..899db914f0 --- /dev/null +++ b/package/quota/0001-tools-getrpcbynumber.patch @@ -0,0 +1,42 @@ +allow usage of getrpcbynumber() instead of getrpcbynumber_r() + +libtirpc does not implement the reentrant function getrpcbynumber_r(), +so allow quota to use the non-reentrant version getrpcbynumber(). This +should not be a problem as quota tools are not multi-threaded. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.in +=================================================================== +--- a/configure.in ++++ b/configure.in +@@ -182,6 +182,12 @@ + AC_C_CONST + AC_C_INLINE + ++AC_CHECK_FUNCS([getrpcbynumber getrpcbynumber_r]) ++ ++if test "$ac_cv_func_getrpcbynumber_r" != "yes" -a "$ac_cv_func_getrpcbynumber" != "yes"; then ++ AC_MSG_ERROR([Neither getrpcbynumber_r nor getrpcbynumber are available]) ++fi ++ + AC_ARG_ENABLE(rpc, + [ --enable-rpc=[yes/no] Enable RPC support [default=yes].], + , +Index: b/svc_socket.c +=================================================================== +--- a/svc_socket.c ++++ b/svc_socket.c +@@ -55,7 +55,12 @@ + addr.sin_family = AF_INET; + + if (!port) { ++#if HAVE_GETRPCBYNUMBER_R + ret = getrpcbynumber_r(number, &rpcbuf, rpcdata, sizeof(rpcdata), &rpcp); ++#else ++ rpcp = getrpcbynumber(number); ++ ret = 0; ++#endif + if (ret == 0 && rpcp != NULL) { + /* First try name */ + ret = getservbyname_r(rpcp->r_name, proto, &servbuf, servdata, diff --git a/package/quota/0002-fix-static-linking.patch b/package/quota/0002-fix-static-linking.patch new file mode 100644 index 0000000000..fd73f64eb6 --- /dev/null +++ b/package/quota/0002-fix-static-linking.patch @@ -0,0 +1,55 @@ +Use $(LIBS) properly + +This patch makes sure the quota build system uses $(LIBS) where +appropriate, so that it can be used to link with additional libraries, +which is needed when linking statically. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.in +=================================================================== +--- a/Makefile.in ++++ b/Makefile.in +@@ -105,30 +105,40 @@ + -$(INSTALL) -m $(DEF_MAN_MODE) *.8 $(ROOTDIR)$(mandir)/man8 + + quotaon: quotaon.o quotaon_xfs.o $(LIBOBJS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + + quotacheck: quotacheck.o quotacheck_v1.o quotacheck_v2.o quotaops.o $(LIBOBJS) +- $(CC) $(LDFLAGS) -o $@ $^ $(EXT2LIBS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(EXT2LIBS) $(LIBS) + + quota: quota.o quotaops.o $(LIBOBJS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + + quotasync: quotasync.o $(LIBOBJS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + + quot: quot.o $(LIBOBJS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + + repquota: repquota.o $(LIBOBJS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + + warnquota: warnquota.o $(LIBOBJS) +- $(CC) $(LDFLAGS) -o $@ $^ $(LDAPLIBS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(LDAPLIBS) $(LIBS) + + quotastats: quotastats.o common.o pot.o ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + + xqmstats: xqmstats.o common.o pot.o ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + + edquota: edquota.o quotaops.o $(LIBOBJS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + + setquota: setquota.o quotaops.o $(LIBOBJS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + + convertquota: convertquota.o $(LIBOBJS) ++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) + + rpc.rquotad: rquota_server.o rquota_svc.o svc_socket.o $(LIBOBJS) + $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) diff --git a/package/quota/Config.in b/package/quota/Config.in new file mode 100644 index 0000000000..c8ab0d7ed3 --- /dev/null +++ b/package/quota/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_QUOTA + bool "quota" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC || BR2_TOOLCHAIN_HAS_THREADS # libtirpc + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_LIBTIRPC if !BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Implementation of the disk quota system. + + http://sourceforge.net/projects/linuxquota/ + +comment "quota needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || \ + !(BR2_TOOLCHAIN_HAS_THREADS || BR2_TOOLCHAIN_HAS_NATIVE_RPC) diff --git a/package/quota/quota.hash b/package/quota/quota.hash new file mode 100644 index 0000000000..5e49693646 --- /dev/null +++ b/package/quota/quota.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/linuxquota/files/quota-tools/4.01/ (click on info button) +md5 5c2c31e321d2e1322ce12d69ae5c66d6 quota-4.01.tar.gz +sha1 64d2ab8b039cfea1aa4bd9e77e8c373488a7f0bf quota-4.01.tar.gz diff --git a/package/quota/quota.mk b/package/quota/quota.mk new file mode 100644 index 0000000000..c30a2bd85e --- /dev/null +++ b/package/quota/quota.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# quota +# +################################################################################ + +QUOTA_VERSION = 4.01 +QUOTA_SITE = http://downloads.sourceforge.net/project/linuxquota/quota-tools/$(QUOTA_VERSION) +QUOTA_DEPENDENCIES = host-gettext +QUOTA_AUTORECONF = YES +QUOTA_LICENSE = GPLv2+ +QUOTA_CONF_OPTS = --disable-strip-binaries + +QUOTA_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +QUOTA_DEPENDENCIES += gettext +QUOTA_LIBS += -lintl +endif + +ifeq ($(BR2_PACKAGE_E2FSPROGS),y) +QUOTA_DEPENDENCIES += e2fsprogs +QUOTA_CONF_OPTS += --enable-ext2direct +else +QUOTA_CONF_OPTS += --disable-ext2direct +endif + +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +QUOTA_DEPENDENCIES += libtirpc host-pkgconf +QUOTA_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc` +QUOTA_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc` +endif + +QUOTA_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) CFLAGS="$(QUOTA_CFLAGS) -D_GNU_SOURCE" LIBS="$(QUOTA_LIBS)" +QUOTA_CONF_ENV = \ + CFLAGS="$(QUOTA_CFLAGS) -D_GNU_SOURCE" LIBS="$(QUOTA_LIBS)" + +# Package uses autoconf but not automake. +QUOTA_INSTALL_TARGET_OPTS = \ + ROOTDIR=$(TARGET_DIR) \ + install + +$(eval $(autotools-package)) diff --git a/package/qwt/Config.in b/package/qwt/Config.in new file mode 100644 index 0000000000..810bd754ba --- /dev/null +++ b/package/qwt/Config.in @@ -0,0 +1,35 @@ +comment "qwt needs a toolchain not affected by Binutils bug 19405" + depends on BR2_PACKAGE_QT && BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 + +config BR2_PACKAGE_QWT + bool "qwt" + depends on (BR2_PACKAGE_QT && !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405) || \ + BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_QT + select BR2_PACKAGE_QT5BASE_GUI if BR2_PACKAGE_QT5 + select BR2_PACKAGE_QT5BASE_WIDGETS if BR2_PACKAGE_QT5 # printsupport + select BR2_PACKAGE_QT5BASE_CONCURRENT if BR2_PACKAGE_QT5 + help + Qwt is a graphics extension to the Qt GUI application + framework. It provides a 2D plotting widget and more. + + http://qwt.sourceforge.net/ + +if BR2_PACKAGE_QWT + +config BR2_PACKAGE_QWT_SVG + bool "SVG support" + select BR2_PACKAGE_QT_SVG if BR2_PACKAGE_QT + select BR2_PACKAGE_QT5SVG if BR2_PACKAGE_QT5 + +config BR2_PACKAGE_QWT_MATHML + bool "MathML support" + +config BR2_PACKAGE_QWT_OPENGL + bool "OpenGL support" + depends on (BR2_PACKAGE_HAS_LIBGLES && BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_QT) || \ + (BR2_PACKAGE_QT5_GL_AVAILABLE && BR2_PACKAGE_QT5) + select BR2_PACKAGE_QT_OPENGL_ES if BR2_PACKAGE_QT + select BR2_PACKAGE_QT5BASE_OPENGL_LIB if BR2_PACKAGE_QT5 + +endif diff --git a/package/qwt/qwt.hash b/package/qwt/qwt.hash new file mode 100644 index 0000000000..fc78b753b4 --- /dev/null +++ b/package/qwt/qwt.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 2b08f18d1d3970e7c3c6096d850f17aea6b54459389731d3ce715d193e243d0c qwt-6.1.2.tar.bz2 diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk new file mode 100644 index 0000000000..0bea5f35a3 --- /dev/null +++ b/package/qwt/qwt.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# qwt +# +################################################################################ + +QWT_VERSION = 6.1.2 +QWT_SOURCE = qwt-$(QWT_VERSION).tar.bz2 +QWT_SITE = http://downloads.sourceforge.net/project/qwt/qwt/$(QWT_VERSION) +QWT_INSTALL_STAGING = YES +ifeq ($(BR2_PACKAGE_QT),y) +QWT_DEPENDENCIES = qt +QWT_QMAKE = $(QT_QMAKE) +else ifeq ($(BR2_PACKAGE_QT5),y) +QWT_DEPENDENCIES += qt5base +QWT_QMAKE = $(QT5_QMAKE) +endif + +QWT_LICENSE = LGPLv2.1 with exceptions +QWT_LICENSE_FILES = COPYING + +QWT_CONFIG = 's%QWT_INSTALL_PREFIX.*/usr/local/.*%QWT_INSTALL_PREFIX = /usr%' +QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDesigner.*$$/\# QWT_CONFIG += QwtDesigner/' +QWT_CONFIG += -e 's%/features%/mkspecs/features%' + +ifeq ($(BR2_PACKAGE_QWT_SVG),y) +QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/QWT_CONFIG += QwtSvg/' +else +QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtSvg.*$$/\# QWT_CONFIG += QwtSvg/' +endif + +ifeq ($(BR2_PACKAGE_QWT_MATHML),y) +QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtMathML.*$$/QWT_CONFIG += QwtMathML/' +else +QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtMathML.*$$/\# QWT_CONFIG += QwtMathML/' +endif + +ifeq ($(BR2_PACKAGE_QWT_OPENGL),y) +QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtOpenGL.*$$/QWT_CONFIG += QwtOpenGL/' +else +QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtOpenGL.*$$/\# QWT_CONFIG += QwtOpenGL/' +endif + +define QWT_CONFIGURE_CMDS + $(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri + (cd $(@D); $(TARGET_MAKE_ENV) $(QWT_QMAKE)) +endef + +define QWT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +# After installation, we fixup the INSTALL_PREFIX in qwtconfig.pri so +# that when building with qmake, -L$(STAGING_DIR)/usr/lib is used and +# not -L/usr/lib. +define QWT_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) install INSTALL_ROOT=$(STAGING_DIR) + $(SED) "s%QWT_INSTALL_PREFIX = .*%QWT_INSTALL_PREFIX = $(STAGING_DIR)/usr%" \ + $(STAGING_DIR)/usr/mkspecs/features/qwtconfig.pri +endef + +define QWT_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) install INSTALL_ROOT=$(TARGET_DIR) + rm -Rf $(TARGET_DIR)/usr/mkspecs +endef + +$(eval $(generic-package)) diff --git a/package/rabbitmq-c/Config.in b/package/rabbitmq-c/Config.in new file mode 100644 index 0000000000..0d08233a70 --- /dev/null +++ b/package/rabbitmq-c/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_RABBITMQ_C + bool "rabbitmq-c" + depends on BR2_TOOLCHAIN_HAS_THREADS + # too old uClibc, not providing posix_spawn functions + # http://autobuild.buildroot.net/results/a6c3e79c61c5a535970d03bf37b068349f766a7f/ + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX + help + This is a C-language AMQP client library for use with v2.0+ + of the RabbitMQ broker. + + https://github.com/alanxz/rabbitmq-c + +comment "rabbitmq-c needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX diff --git a/package/rabbitmq-c/rabbitmq-c.hash b/package/rabbitmq-c/rabbitmq-c.hash new file mode 100644 index 0000000000..45e8cbd822 --- /dev/null +++ b/package/rabbitmq-c/rabbitmq-c.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d8ed9dcb49903d83d79d7b227da35ef68c60e5e0b08d0fc1fb4e4dc577b8802b rabbitmq-c-v0.8.0.tar.gz diff --git a/package/rabbitmq-c/rabbitmq-c.mk b/package/rabbitmq-c/rabbitmq-c.mk new file mode 100644 index 0000000000..1ca35ad00c --- /dev/null +++ b/package/rabbitmq-c/rabbitmq-c.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# rabbitmq-c +# +################################################################################ + +RABBITMQ_C_VERSION = v0.8.0 +RABBITMQ_C_SITE = $(call github,alanxz,rabbitmq-c,$(RABBITMQ_C_VERSION)) +RABBITMQ_C_LICENSE = MIT +RABBITMQ_C_LICENSE_FILES = LICENSE-MIT +RABBITMQ_C_INSTALL_STAGING = YES +RABBITMQ_C_CONF_OPTS = \ + -DBUILD_API_DOCS=OFF \ + -DBUILD_TOOLS_DOCS=OFF + +ifeq ($(BR2_STATIC_LIBS),y) +RABBITMQ_C_CONF_OPTS += -DBUILD_SHARED_LIBS=OFF -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +RABBITMQ_C_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=ON +else ifeq ($(BR2_SHARED_LIBS),y) +RABBITMQ_C_CONF_OPTS += -DBUILD_SHARED_LIBS=ON -DBUILD_STATIC_LIBS=OFF +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +RABBITMQ_C_CONF_OPTS += -DENABLE_SSL_SUPPORT=ON +RABBITMQ_C_DEPENDENCIES += openssl +else +RABBITMQ_C_CONF_OPTS += -DENABLE_SSL_SUPPORT=OFF +endif + +ifeq ($(BR2_PACKAGE_POPT), y) +RABBITMQ_C_CONF_OPTS += -DBUILD_TOOLS=ON +RABBITMQ_C_DEPENDENCIES += popt +else +RABBITMQ_C_CONF_OPTS += -DBUILD_TOOLS=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/racehound/0001-Fix-module-install-path-lib-instead-of-usr-lib-prefi.patch b/package/racehound/0001-Fix-module-install-path-lib-instead-of-usr-lib-prefi.patch new file mode 100644 index 0000000000..6cac55d3eb --- /dev/null +++ b/package/racehound/0001-Fix-module-install-path-lib-instead-of-usr-lib-prefi.patch @@ -0,0 +1,26 @@ +From 4f8ed39ddaf17c7dd4ddbdb88e67097f00c98173 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 16 Jul 2015 23:11:25 +0200 +Subject: [PATCH] Fix module install path (/lib instead of /usr/lib prefix) + +Signed-off-by: Peter Seiderer +--- + cmake/modules/path_prefixes.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/modules/path_prefixes.cmake b/cmake/modules/path_prefixes.cmake +index 3cb1fe2..9dc50a4 100644 +--- a/cmake/modules/path_prefixes.cmake ++++ b/cmake/modules/path_prefixes.cmake +@@ -113,7 +113,7 @@ set(RH_INSTALL_PREFIX_DOC + # Set derivative prefixes + + # additional, 1 +-set(RH_INSTALL_PREFIX_KMODULE "${RH_INSTALL_PREFIX_LIB}/modules/${KBUILD_VERSION_STRING}/misc") ++set(RH_INSTALL_PREFIX_KMODULE "/lib/modules/${KBUILD_VERSION_STRING}/misc") + # Another variant + #"${RH_INSTALL_PREFIX_LIB}/modules/${KBUILD_VERSION_STRING}/extra") + # additional, 2 +-- +2.1.4 + diff --git a/package/racehound/Config.in b/package/racehound/Config.in new file mode 100644 index 0000000000..6f62f81c55 --- /dev/null +++ b/package/racehound/Config.in @@ -0,0 +1,35 @@ +config BR2_PACKAGE_RACEHOUND + bool "racehound" + depends on BR2_LINUX_KERNEL + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # elfutils + depends on !BR2_STATIC_LIBS # elfutils + depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils + # only x86/x86_64 supported + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_ELFUTILS + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra + help + RaceHound can be used to detect data races in the Linux + kernel on x86. + + RaceHound needs the following kernel configurations enabled: + - CONFIG_X86_32 or CONFIG_X86_64 + - CONFIG_MODULES + - CONFIG_MODULE_UNLOAD + - CONFIG_SYSFS + - CONFIG_DEBUG_FS + - CONFIG_KALLSYMS + - CONFIG_KALLSYMS_ALL + - CONFIG_KPROBES + + https://github.com/winnukem/racehound + +comment "racehound needs an Linux kernel >= 3.14 to be built" + depends on !BR2_LINUX_KERNEL + depends on BR2_i386 || BR2_x86_64 + +comment "racehound needs a uClibc or (e)glibc toolchain w/ C++, wchar, dynamic library" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || BR2_STATIC_LIBS \ + || !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) diff --git a/package/racehound/racehound.mk b/package/racehound/racehound.mk new file mode 100644 index 0000000000..8e282c1e9b --- /dev/null +++ b/package/racehound/racehound.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# racehound +# +################################################################################ + +RACEHOUND_VERSION = f09f06fcc3c77c8c5541be3ba5be80aa8148ce0c +RACEHOUND_SITE = $(call github,winnukem,racehound,$(RACEHOUND_VERSION)) +RACEHOUND_LICENSE = GPLv2 +RACEHOUND_LICENSE_FILES = LICENSE +RACEHOUND_SUPPORTS_IN_SOURCE_BUILD = NO + +RACEHOUND_DEPENDENCIES = elfutils linux + +# override auto detection (uses host parameters, not cross compile +# ready) +RACEHOUND_CONF_OPTS += \ + -DKERNEL_VERSION_OK=YES \ + -DMODULE_BUILD_SUPPORTED=YES \ + -DKERNEL_CONFIG_OK=YES \ + -DKBUILD_BUILD_DIR=$(LINUX_DIR) \ + -DKBUILD_VERSION_STRING=$(LINUX_VERSION_PROBED) + +# cross compile environment for linux kernel module +RACEHOUND_MAKE_ENV = $(LINUX_MAKE_FLAGS) + +$(eval $(cmake-package)) diff --git a/package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch b/package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch new file mode 100644 index 0000000000..44768086cc --- /dev/null +++ b/package/radvd/0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch @@ -0,0 +1,27 @@ +From 324e1ebc7b86f68f49fb4f1c34a4de60d18dd3c1 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Sun, 23 Nov 2014 12:17:11 +0100 +Subject: [PATCH 2/3] Don't force -fstack-protector, the toolchain might lack + support for it + +Signed-off-by: Gustavo Zacarias +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 80633e7..8b5a2e4 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -43,7 +43,6 @@ DISABLE_WARNINGS = \ + + AM_CFLAGS = \ + -fno-strict-aliasing \ +- -fstack-protector \ + $(ENABLE_WARNINGS) \ + $(DISABLE_WARNINGS) + +-- +2.1.0 + diff --git a/package/radvd/Config.in b/package/radvd/Config.in new file mode 100644 index 0000000000..48aeedc08f --- /dev/null +++ b/package/radvd/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_RADVD + bool "radvd" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_FLEX + help + IPv6 Router Advertisement Daemon. + + http://www.litech.org/radvd/ diff --git a/package/radvd/S50radvd b/package/radvd/S50radvd new file mode 100755 index 0000000000..9f1407c95a --- /dev/null +++ b/package/radvd/S50radvd @@ -0,0 +1,18 @@ +#!/bin/sh + +RADVD=/usr/sbin/radvd + +echo "1" > /proc/sys/net/ipv6/conf/all/forwarding + +printf "Starting radvd: " +if [ ! -x "${RADVD}" ]; then + echo "missing" + exit 1 +fi + +if ${RADVD} ; then + echo "done" +else + echo "failed" + exit 1 +fi diff --git a/package/radvd/radvd.hash b/package/radvd/radvd.hash new file mode 100644 index 0000000000..ac6014b776 --- /dev/null +++ b/package/radvd/radvd.hash @@ -0,0 +1,2 @@ +# From http://www.litech.org/radvd/dist/radvd-2.12.tar.gz.sha256 +sha256 b070e77238e789e298a82cba2b1bfb0b0180b4ebc1adfc4e75058adfdbff747b radvd-2.12.tar.xz diff --git a/package/radvd/radvd.mk b/package/radvd/radvd.mk new file mode 100644 index 0000000000..8b6e5b2d01 --- /dev/null +++ b/package/radvd/radvd.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# radvd +# +################################################################################ + +RADVD_VERSION = 2.12 +RADVD_SOURCE = radvd-$(RADVD_VERSION).tar.xz +RADVD_SITE = http://www.litech.org/radvd/dist +RADVD_DEPENDENCIES = host-bison flex host-flex host-pkgconf +RADVD_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' +# For 0002-Don-t-force-fstack-protector-the-toolchain-might-lac.patch +RADVD_AUTORECONF = YES +RADVD_LICENSE = BSD-4c-like +RADVD_LICENSE_FILES = COPYRIGHT + +define RADVD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/radvd/S50radvd $(TARGET_DIR)/etc/init.d/S50radvd +endef + +$(eval $(autotools-package)) diff --git a/package/ramsmp/Config.in b/package/ramsmp/Config.in new file mode 100644 index 0000000000..ecab6a46ad --- /dev/null +++ b/package/ramsmp/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_RAMSMP + bool "ramspeed/smp" + depends on BR2_USE_MMU # fork() + help + RAMspeed/SMP is a free open source command line utility + to measure cache and memory performance of multiprocessor machines. + + http://alasir.com/software/ramspeed/ diff --git a/package/ramsmp/Makefile b/package/ramsmp/Makefile new file mode 100644 index 0000000000..5cd76e09d9 --- /dev/null +++ b/package/ramsmp/Makefile @@ -0,0 +1,14 @@ + +all: generic + +generic: ramsmp.c fltmem.c fltmark.c intmem.c intmark.c + $(CC) $(CFLAGS) $(LDFLAGS) $^ -o ramsmp + +i386: ramsmp.c i386/*.s i386/cpuinfo/*.s + $(CC) $(CFLAGS) -DI386_ASM $(LDFLAGS) $^ -o ramsmp + +x86_64: ramsmp.c amd64/*.s + $(CC) $(CFLAGS) -DAMD64_ASM $(LDFLAGS) $^ -o ramsmp + +clean: + rm -f *.o ramsmp diff --git a/package/ramsmp/ramsmp.hash b/package/ramsmp/ramsmp.hash new file mode 100644 index 0000000000..46aa3f10e7 --- /dev/null +++ b/package/ramsmp/ramsmp.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 39fb15493fb3c293575746d56f6ab9faaa1d876d8b1f0d8e5a4042d2ace95839 ramsmp-3.5.0.tar.gz diff --git a/package/ramsmp/ramsmp.mk b/package/ramsmp/ramsmp.mk new file mode 100644 index 0000000000..6098376da5 --- /dev/null +++ b/package/ramsmp/ramsmp.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# ramsmp +# +################################################################################ + +RAMSMP_VERSION = 3.5.0 +RAMSMP_SITE = http://www.alasir.com/software/ramspeed +RAMSMP_ARCH = $(if $(BR2_i386),i386)$(if $(BR2_x86_64),x86_64) +RAMSMP_LICENSE = Alasir License +RAMSMP_LICENSE_FILES = LICENCE + +define RAMSMP_BUILD_CMDS + cp -f package/ramsmp/Makefile $(@D) + $(TARGET_CONFIGURE_OPTS) make -C $(@D) $(RAMSMP_ARCH) +endef + +define RAMSMP_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/ramsmp $(TARGET_DIR)/usr/bin/ramsmp +endef + +$(eval $(generic-package)) diff --git a/package/ramspeed/Config.in b/package/ramspeed/Config.in new file mode 100644 index 0000000000..b236329a84 --- /dev/null +++ b/package/ramspeed/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_RAMSPEED + bool "ramspeed" + help + RAMspeed is a free open source command line utility + to measure cache and memory performance. + + http://alasir.com/software/ramspeed/ diff --git a/package/ramspeed/Makefile b/package/ramspeed/Makefile new file mode 100644 index 0000000000..f4a4de6a1e --- /dev/null +++ b/package/ramspeed/Makefile @@ -0,0 +1,14 @@ + +all: generic + +generic: ramspeed.c fltmem.c fltmark.c intmem.c intmark.c + $(CC) $(CFLAGS) $(LDFLAGS) $^ -o ramspeed + +i386: ramspeed.c i386/*.s i386/cpuinfo/*.s + $(CC) $(CFLAGS) -DI386_ASM $(LDFLAGS) $^ -o ramspeed + +x86_64: ramspeed.c amd64/*.s + $(CC) $(CFLAGS) -DAMD64_ASM $(LDFLAGS) $^ -o ramspeed + +clean: + rm -f *.o ramspeed diff --git a/package/ramspeed/ramspeed.hash b/package/ramspeed/ramspeed.hash new file mode 100644 index 0000000000..71052a3491 --- /dev/null +++ b/package/ramspeed/ramspeed.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 f84e2e42b2b6b221ef9b586f6ae63d863db4ff21858e0ce7c84622a7c9522950 ramspeed-2.6.0.tar.gz diff --git a/package/ramspeed/ramspeed.mk b/package/ramspeed/ramspeed.mk new file mode 100644 index 0000000000..7dc4faae7c --- /dev/null +++ b/package/ramspeed/ramspeed.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# ramspeed +# +################################################################################ + +RAMSPEED_VERSION = 2.6.0 +RAMSPEED_SITE = http://www.alasir.com/software/ramspeed +RAMSPEED_ARCH = $(if $(BR2_i386),i386)$(if $(BR2_x86_64),x86_64) +RAMSPEED_LICENSE = Alasir License +RAMSPEED_LICENSE_FILES = LICENCE + +define RAMSPEED_BUILD_CMDS + cp -f package/ramspeed/Makefile $(@D) + $(TARGET_CONFIGURE_OPTS) make -C $(@D) $(RAMSPEED_ARCH) +endef + +define RAMSPEED_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/ramspeed $(TARGET_DIR)/usr/bin/ramspeed +endef + +$(eval $(generic-package)) diff --git a/package/ranger/0001-colorscheme-check-for-compiled-python-files.patch b/package/ranger/0001-colorscheme-check-for-compiled-python-files.patch new file mode 100644 index 0000000000..bde3fee035 --- /dev/null +++ b/package/ranger/0001-colorscheme-check-for-compiled-python-files.patch @@ -0,0 +1,31 @@ +From 654e3116825c4d12340613196279fb13a5662113 Mon Sep 17 00:00:00 2001 +From: Thijs Vermeir +Date: Tue, 20 Oct 2015 18:13:36 +0200 +Subject: [PATCH] colorscheme: check for compiled python files + +Some systems only provide *.pyc files + +Patch accepted upstream: +https://github.com/hut/ranger/commit/d69f1ed3207c785d1a39ddd2992f6abb021b7540 + +Signed-off-by: Thijs Vermeir +--- + ranger/gui/colorscheme.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ranger/gui/colorscheme.py b/ranger/gui/colorscheme.py +index d6afcac..d2b3b2d 100644 +--- a/ranger/gui/colorscheme.py ++++ b/ranger/gui/colorscheme.py +@@ -86,7 +86,7 @@ def _colorscheme_name_to_class(signal): + usecustom = not ranger.arg.clean + + def exists(colorscheme): +- return os.path.exists(colorscheme + '.py') ++ return os.path.exists(colorscheme + '.py') or os.path.exists(colorscheme + '.pyc') + + def is_scheme(x): + try: +-- +2.6.1 + diff --git a/package/ranger/Config.in b/package/ranger/Config.in new file mode 100644 index 0000000000..ee0ffecd13 --- /dev/null +++ b/package/ranger/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_RANGER + bool "ranger" + depends on BR2_USE_MMU # python3 + depends on BR2_USE_WCHAR # python3 + depends on BR2_TOOLCHAIN_HAS_THREADS # python3 + depends on !BR2_STATIC_LIBS # python3 + select BR2_PACKAGE_PYTHON3 if !BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_CURSES if BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON3_CURSES if BR2_PACKAGE_PYTHON3 + help + ranger is a console file manager with VI key bindings. It + provides a minimalistic and nice curses interface with a + view on the directory hierarchy. It ships with "rifle", a + file launcher that is good at automatically finding out + which program to use for what file type. + + http://ranger.nongnu.org + +comment "ranger needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/ranger/ranger.hash b/package/ranger/ranger.hash new file mode 100644 index 0000000000..30bdbede04 --- /dev/null +++ b/package/ranger/ranger.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 94f6e342daee4445f15db5a7440a11138487c49cc25da0c473bbf1b8978f5b79 ranger-1.7.2.tar.gz diff --git a/package/ranger/ranger.mk b/package/ranger/ranger.mk new file mode 100644 index 0000000000..fd6809a660 --- /dev/null +++ b/package/ranger/ranger.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# ranger +# +################################################################################ + +RANGER_VERSION = 1.7.2 +RANGER_SITE = http://ranger.nongnu.org +RANGER_SETUP_TYPE = distutils +RANGER_LICENSE = GPLv3 +RANGER_LICENSE_FILES = AUTHORS + +# The ranger script request python to be called with -O (optimize generated +# bytecode slightly; also PYTHONOPTIMIZE=x). This implicitly requires the python +# source files to be present. Therefore, the -O flag is removed when only the .pyc +# files are installed. + +define RANGER_DO_NOT_GENERATE_BYTECODE_AT_RUNTIME + $(SED) 's%/usr/bin/python -O%/usr/bin/python%g' $(@D)/scripts/ranger +endef + +ifeq ($(BR2_PACKAGE_PYTHON3_PYC_ONLY)$(BR2_PACKAGE_PYTHON_PYC_ONLY),y) +RANGER_POST_PATCH_HOOKS += RANGER_DO_NOT_GENERATE_BYTECODE_AT_RUNTIME +endif + +$(eval $(python-package)) diff --git a/package/rapidjson/Config.in b/package/rapidjson/Config.in new file mode 100644 index 0000000000..b8c8bcf6a6 --- /dev/null +++ b/package/rapidjson/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_RAPIDJSON + bool "rapidjson" + help + A fast JSON parser/generator for C++ with both SAX/DOM style API. + + http://rapidjson.org/ diff --git a/package/rapidjson/rapidjson.mk b/package/rapidjson/rapidjson.mk new file mode 100644 index 0000000000..5da407b79f --- /dev/null +++ b/package/rapidjson/rapidjson.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# rapidjson +# +################################################################################ + +RAPIDJSON_VERSION = v1.0.2 +RAPIDJSON_SITE = $(call github,miloyip,rapidjson,$(RAPIDJSON_VERSION)) +RAPIDJSON_LICENSE = MIT +RAPIDJSON_LICENSE_FILES = license.txt + +# rapidjson is a header-only C++ library +RAPIDJSON_INSTALL_TARGET = NO +RAPIDJSON_INSTALL_STAGING = YES + +define RAPIDJSON_INSTALL_STAGING_CMDS + cp -dpfr $(@D)/include/* $(STAGING_DIR)/usr/include +endef + +$(eval $(generic-package)) diff --git a/package/rapidxml/Config.in b/package/rapidxml/Config.in new file mode 100644 index 0000000000..76b2248ec2 --- /dev/null +++ b/package/rapidxml/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_RAPIDXML + bool "rapidxml" + help + RapidXml is an attempt to create the fastest XML parser + possible, while retaining useability, portability and + reasonable W3C compatibility. It is an in-situ parser with + parsing speed approaching speed of strlen function executed + on the same data. + + http://sourceforge.net/projects/rapidxml/ + https://en.wikipedia.org/wiki/RapidXml diff --git a/package/rapidxml/rapidxml.hash b/package/rapidxml/rapidxml.hash new file mode 100644 index 0000000000..81919f0373 --- /dev/null +++ b/package/rapidxml/rapidxml.hash @@ -0,0 +1,6 @@ +# From https://sourceforge.net/projects/rapidxml/files/rapidxml/rapidxml%201.13/ +sha1 f5fd4fbc5ad7e96045313697811d65ea8089a950 rapidxml-1.13.zip +md5 7b4b42c9331c90aded23bb55dc725d6a rapidxml-1.13.zip + +# Locally calculated +sha256 c3f0b886374981bb20fabcf323d755db4be6dba42064599481da64a85f5b3571 rapidxml-1.13.zip diff --git a/package/rapidxml/rapidxml.mk b/package/rapidxml/rapidxml.mk new file mode 100644 index 0000000000..a76a21b4f5 --- /dev/null +++ b/package/rapidxml/rapidxml.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# rapidxml +# +################################################################################ + +RAPIDXML_VERSION = 1.13 +RAPIDXML_SOURCE = rapidxml-$(RAPIDXML_VERSION).zip +RAPIDXML_SITE = http://downloads.sourceforge.net/project/rapidxml/rapidxml/rapidxml%20$(RAPIDXML_VERSION) +RAPIDXML_LICENSE = Boost Software License 1.0 or MIT +RAPIDXML_LICENSE_FILES = license.txt + +# C++ headers only +RAPIDXML_INSTALL_TARGET = NO +RAPIDXML_INSTALL_STAGING = YES + +define RAPIDXML_EXTRACT_CMDS + $(UNZIP) -d $(@D) $(DL_DIR)/$(RAPIDXML_SOURCE) + mv $(@D)/rapidxml-$(RAPIDXML_VERSION)/* $(@D)/ + rmdir $(@D)/rapidxml-$(RAPIDXML_VERSION) +endef + +define RAPIDXML_INSTALL_STAGING_CMDS + cp -dpfr $(@D)/*hpp $(STAGING_DIR)/usr/include +endef + +$(eval $(generic-package)) diff --git a/package/raptor/0001-configure.ac-remove-conditional-lib-inclusion.patch b/package/raptor/0001-configure.ac-remove-conditional-lib-inclusion.patch new file mode 100644 index 0000000000..7367ad2332 --- /dev/null +++ b/package/raptor/0001-configure.ac-remove-conditional-lib-inclusion.patch @@ -0,0 +1,21 @@ +Removed header Include path from the configure file as path was +from the host, which is wrong for the cross compilation. +Upstream: None + +Signed-off-by: Nitin Mendiratta + +diff --git a/configure.ac b/configure.ac +index 10ff870..27b9957 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1145,9 +1145,7 @@ have_lininn=no + have_inn_parsedate=no + + oCPPFLAGS="$CPPFLAGS" +-if test -d /usr/include/inn; then +- CPPFLAGS="$CPPFLAGS -I/usr/include/inn" +-fi ++ + AC_CHECK_HEADER(libinn.h) + CPPFLAGS="$oCPPFLAGS" + diff --git a/package/raptor/Config.in b/package/raptor/Config.in new file mode 100644 index 0000000000..65979a2b1f --- /dev/null +++ b/package/raptor/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_RAPTOR + bool "raptor" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBXSLT + help + A C library that provides a set of parsers and + serializers that generate Resource Description + Framework (RDF) triples by parsing syntaxes or + serialize the triples into a syntax. + + http://librdf.org/raptor/ diff --git a/package/raptor/raptor.hash b/package/raptor/raptor.hash new file mode 100644 index 0000000000..ee7a71b4cf --- /dev/null +++ b/package/raptor/raptor.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed raptor2-2.0.15.tar.gz diff --git a/package/raptor/raptor.mk b/package/raptor/raptor.mk new file mode 100644 index 0000000000..aea14e393f --- /dev/null +++ b/package/raptor/raptor.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# raptor +# +################################################################################ + +RAPTOR_VERSION = 2.0.15 +RAPTOR_SOURCE = raptor2-$(RAPTOR_VERSION).tar.gz +RAPTOR_SITE = http://download.librdf.org/source +RAPTOR_DEPENDENCIES = libxml2 libxslt +RAPTOR_LICENSE = GPLv2+ or LGPLv2.1+ or Apache-2.0+ +RAPTOR_LICENSE_FILES = LICENSE.txt + +# Flag is added to make sure the patch is applied for the configure.ac of raptor. +RAPTOR_AUTORECONF = YES + +RAPTOR_CONF_OPTS =\ + --with-xml2-config=$(STAGING_DIR)/usr/bin/xml2-config \ + --with-xslt-config=$(STAGING_DIR)/usr/bin/xslt-config + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +RAPTOR_DEPENDENCIES += libcurl +RAPTOR_CONF_OPTS += --with-curl-config=$(STAGING_DIR)/usr/bin/curl-config +else +RAPTOR_CONF_OPTS += --with-curl-config=no +endif + +ifeq ($(BR2_PACKAGE_YAJL),y) +RAPTOR_DEPENDENCIES += yajl +RAPTOR_CONF_ENV += LIBS="-lm" +RAPTOR_CONF_OPTS += --with-yajl=$(STAGING_DIR)/usr +else +RAPTOR_CONF_OPTS += --with-yajl=no +endif + +ifeq ($(BR2_PACKAGE_ICU),y) +RAPTOR_DEPENDENCIES += icu +RAPTOR_CONF_OPTS += --with-icu-config=$(STAGING_DIR)/usr/bin/icu-config +else +RAPTOR_CONF_OPTS += --with-icu-config=no +endif + +$(eval $(autotools-package)) diff --git a/package/rdesktop/0001-8bit-colors.patch b/package/rdesktop/0001-8bit-colors.patch new file mode 100644 index 0000000000..710f8debef --- /dev/null +++ b/package/rdesktop/0001-8bit-colors.patch @@ -0,0 +1,21 @@ +diff -urpN rdesktop-1.5.0-orig/xwin.c rdesktop-1.5.0/xwin.c +--- rdesktop-1.5.0-orig/xwin.c 2007-01-17 12:01:18.000000000 +0100 ++++ rdesktop-1.5.0/xwin.c 2007-01-17 12:05:02.000000000 +0100 +@@ -1461,7 +1461,7 @@ select_visual(int screen_num) + } + + /* we use a colourmap, so the default visual should do */ +- g_owncolmap = True; ++// g_owncolmap = True; + g_visual = vmatches[0].visual; + g_depth = vmatches[0].depth; + } +@@ -1568,7 +1568,7 @@ ui_init(void) + { + g_xcolmap = + XCreateColormap(g_display, RootWindowOfScreen(g_screen), g_visual, +- AllocNone); ++ (g_depth <= 8) ? AllocAll : AllocNone); + if (g_depth <= 8) + warning("Display colour depth is %d bit: you may want to use -C for a private colourmap.\n", g_depth); + } diff --git a/package/rdesktop/Config.in b/package/rdesktop/Config.in new file mode 100644 index 0000000000..f683ed314e --- /dev/null +++ b/package/rdesktop/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_RDESKTOP + bool "rdesktop" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXT + depends on BR2_PACKAGE_XORG7 + help + rdesktop is an open source client for Windows NT Terminal + Server and Windows 2000/2003 Terminal Services, capable of + natively speaking Remote Desktop Protocol (RDP) in order to + present the user's NT desktop. + + http://rdesktop.sf.net/ diff --git a/package/rdesktop/rdesktop.hash b/package/rdesktop/rdesktop.hash new file mode 100644 index 0000000000..cc1f55b771 --- /dev/null +++ b/package/rdesktop/rdesktop.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/rdesktop/files/rdesktop/1.8.3/ +md5 86e8b368a7c715e74ded92e0d7912dc5 rdesktop-1.8.3.tar.gz +sha1 aa1e56043782e04a0121357b24874e3ad6ae7b1d rdesktop-1.8.3.tar.gz diff --git a/package/rdesktop/rdesktop.mk b/package/rdesktop/rdesktop.mk new file mode 100644 index 0000000000..79187b5c37 --- /dev/null +++ b/package/rdesktop/rdesktop.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# rdesktop +# +################################################################################ + +RDESKTOP_VERSION = 1.8.3 +RDESKTOP_SITE = http://downloads.sourceforge.net/project/rdesktop/rdesktop/$(RDESKTOP_VERSION) +RDESKTOP_DEPENDENCIES = host-pkgconf openssl xlib_libX11 xlib_libXt \ + $(if $(BR2_PACKAGE_ALSA_LIB_PCM),alsa-lib) \ + $(if $(BR2_PACKAGE_LIBAO),libao) \ + $(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate) +RDESKTOP_CONF_OPTS = --with-openssl=$(STAGING_DIR)/usr --disable-credssp +RDESKTOP_LICENSE = GPLv3+ +RDESKTOP_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_PCSC_LITE),y) +RDESKTOP_DEPENDENCIES += pcsc-lite +else +RDESKTOP_CONF_OPTS += --disable-smartcard +endif + +$(eval $(autotools-package)) diff --git a/package/read-edid/0001-Fix-install-file-list.patch b/package/read-edid/0001-Fix-install-file-list.patch new file mode 100644 index 0000000000..622e97daa8 --- /dev/null +++ b/package/read-edid/0001-Fix-install-file-list.patch @@ -0,0 +1,29 @@ +From 562f48bee3443bda0ac257f2b0c52a72208163e0 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Mon, 7 Dec 2015 21:20:38 +0100 +Subject: [PATCH] Fix install file list. + +Fixes: + CMake Error at cmake_install.cmake:40 (file): + file INSTALL cannot find + ".../build/read-edid-3.0.2/COPYING". + +Signed-off-by: Peter Seiderer +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7bf4561..2b9bc86 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -13,5 +13,5 @@ endif () + add_subdirectory (parse-edid) + + INSTALL(FILES get-edid.1 DESTINATION share/man/man1) +-INSTALL(FILES AUTHORS ChangeLog COPYING README DESTINATION ++INSTALL(FILES AUTHORS ChangeLog README DESTINATION + share/doc/read-edid) +-- +2.1.4 + diff --git a/package/read-edid/0002-Fix-compiler-check.patch b/package/read-edid/0002-Fix-compiler-check.patch new file mode 100644 index 0000000000..6c5f58c0bd --- /dev/null +++ b/package/read-edid/0002-Fix-compiler-check.patch @@ -0,0 +1,19 @@ +Fix compiler check + +By default CMake looks for c++ which the project does not need. + +Patch by Thomas: +http://lists.busybox.net/pipermail/buildroot/2015-December/146865.html + +Signed-off-by: Bernd Kuhls + +diff -uNr read-edid-3.0.2.org/CMakeLists.txt read-edid-3.0.2/CMakeLists.txt +--- read-edid-3.0.2.org/CMakeLists.txt 2014-02-05 17:27:26.000000000 +0100 ++++ read-edid-3.0.2/CMakeLists.txt 2015-12-13 16:08:43.000000000 +0100 +@@ -1,5 +1,5 @@ + cmake_minimum_required (VERSION 2.6) +-project (read-edid) ++project (read-edid C) + + option(I2CBUILD "Build I2C get-edid implementation" ON) + option(CLASSICBUILD "Build VBE get-edid implementation" ON) diff --git a/package/read-edid/Config.in b/package/read-edid/Config.in new file mode 100644 index 0000000000..c830e17f1f --- /dev/null +++ b/package/read-edid/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_READ_EDID + bool "read-edid" + help + Read-edid is a pair of tools for reading the EDID from a + monitor. It should work with most monitors made since 1996 + (except for newer ones with 256-byte EDID's - WiP), assuming + the video card supports the standard read commands (most + do). Read-edid is a set of two tools - get-edid, which gets + the raw edid information from the monitor, and parse-edid, + which turns the raw binary information into an + XF86Config-compatible monitor section. + + http://polypux.org/projects/read-edid/ diff --git a/package/read-edid/read-edid.hash b/package/read-edid/read-edid.hash new file mode 100644 index 0000000000..30052171e1 --- /dev/null +++ b/package/read-edid/read-edid.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c7c6d8440f5b90f98e276829271ccea5b2ff5a3413df8a0f87ec09f834af186f read-edid-3.0.2.tar.gz diff --git a/package/read-edid/read-edid.mk b/package/read-edid/read-edid.mk new file mode 100644 index 0000000000..3e38f503fd --- /dev/null +++ b/package/read-edid/read-edid.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# read-edid +# +################################################################################ + +READ_EDID_VERSION = 3.0.2 +READ_EDID_SITE = http://www.polypux.org/projects/read-edid +READ_EDID_LICENSE = BSD-like +READ_EDID_LICENSE_FILES = LICENSE + +# disable classic get-edid support (needs libx86) +READ_EDID_CONF_OPTS += -DCLASSICBUILD=OFF + +$(eval $(cmake-package)) diff --git a/package/readline/0000-curses-link.patch b/package/readline/0000-curses-link.patch new file mode 100644 index 0000000000..56b4770220 --- /dev/null +++ b/package/readline/0000-curses-link.patch @@ -0,0 +1,16 @@ +link readline directly to ncurses since it needs symbols from it + +upstream readline does this on purpose (no direct linking), but +it doesn't make much sense in a Linux world + +--- a/support/shobj-conf ++++ b/support/shobj-conf +@@ -42,7 +42,7 @@ + SHOBJ_LIBS= + + SHLIB_XLDFLAGS= +-SHLIB_LIBS= ++SHLIB_LIBS=-lncurses + + SHLIB_DOT='.' + SHLIB_LIBPREF='lib' diff --git a/package/readline/0001-patchlevel-1.patch b/package/readline/0001-patchlevel-1.patch new file mode 100644 index 0000000000..8593073b9b --- /dev/null +++ b/package/readline/0001-patchlevel-1.patch @@ -0,0 +1,47 @@ +From http://ftp.gnu.org/pub/gnu/readline/readline-6.3-patches/readline63-001 + +Signed-off-by: Gustavo Zacarias + + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-001 + +Bug-Reported-by: Daan van Rossum +Bug-Reference-ID: <20140307072523.GA14250@flash.uchicago.edu> +Bug-Reference-URL: + +Bug-Description: + +The `.' command in vi mode cannot undo multi-key commands beginning with +`c', `d', and `y' (command plus motion specifier). + +Patch (apply with `patch -p0'): + +*** a/readline-6.3/readline.c 2013-10-28 14:58:06.000000000 -0400 +--- b/readline.c 2014-03-07 15:20:33.000000000 -0500 +*************** +*** 965,969 **** + if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap && + key != ANYOTHERKEY && +! rl_key_sequence_length == 1 && /* XXX */ + _rl_vi_textmod_command (key)) + _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign); +--- 965,969 ---- + if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap && + key != ANYOTHERKEY && +! _rl_dispatching_keymap == vi_movement_keymap && + _rl_vi_textmod_command (key)) + _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign); +*** a/readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- b/patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 5 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 1 diff --git a/package/readline/0002-patchlevel-2.patch b/package/readline/0002-patchlevel-2.patch new file mode 100644 index 0000000000..a8a94e0810 --- /dev/null +++ b/package/readline/0002-patchlevel-2.patch @@ -0,0 +1,48 @@ +From http://ftp.gnu.org/pub/gnu/readline/readline-6.3-patches/readline63-002 + +Signed-off-by: Gustavo Zacarias + + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-002 + +Bug-Reported-by: Anatol Pomozov +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00010.html + +Bug-Description: + +When in callback mode, some readline commands can cause readline to seg +fault by passing invalid contexts to callback functions. + +Patch (apply with `patch -p0'): + +*** a/readline-6.3/readline.c 2013-10-28 14:58:06.000000000 -0400 +--- b/readline.c 2014-03-10 14:15:02.000000000 -0400 +*************** +*** 745,749 **** + + RL_CHECK_SIGNALS (); +! if (r == 0) /* success! */ + { + _rl_keyseq_chain_dispose (); +--- 745,750 ---- + + RL_CHECK_SIGNALS (); +! /* We only treat values < 0 specially to simulate recursion. */ +! if (r >= 0 || (r == -1 && (cxt->flags & KSEQ_SUBSEQ) == 0)) /* success! or failure! */ + { + _rl_keyseq_chain_dispose (); +*** a/readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- b/patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 1 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 2 diff --git a/package/readline/0003-patchlevel-3.patch b/package/readline/0003-patchlevel-3.patch new file mode 100644 index 0000000000..195ed554e9 --- /dev/null +++ b/package/readline/0003-patchlevel-3.patch @@ -0,0 +1,51 @@ +From http://ftp.gnu.org/pub/gnu/readline/readline-6.3-patches/readline63-003 + +Signed-off-by: Gustavo Zacarias + + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-003 + +Bug-Reported-by: +Bug-Reference-ID: +Bug-Reference-URL: + +Bug-Description: + +There are debugging functions in the readline release that are theoretically +exploitable as security problems. They are not public functions, but have +global linkage. + +Patch (apply with `patch -p0'): + +*** a/readline-6.3/util.c 2013-09-02 13:36:12.000000000 -0400 +--- b/util.c 2014-03-20 10:25:53.000000000 -0400 +*************** +*** 477,480 **** +--- 479,483 ---- + } + ++ #if defined (DEBUG) + #if defined (USE_VARARGS) + static FILE *_rl_tracefp; +*************** +*** 539,542 **** +--- 542,546 ---- + } + #endif ++ #endif /* DEBUG */ + + +*** a/readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- b/patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 2 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 3 diff --git a/package/readline/0004-patchlevel-4.patch b/package/readline/0004-patchlevel-4.patch new file mode 100644 index 0000000000..86ab3d5079 --- /dev/null +++ b/package/readline/0004-patchlevel-4.patch @@ -0,0 +1,49 @@ +From http://ftp.gnu.org/pub/gnu/readline/readline-6.3-patches/readline63-004 + +Signed-off-by: Gustavo Zacarias + + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-004 + +Bug-Reported-by: Egmont Koblinger +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00153.html + +Bug-Description: + +The signal handling changes to bash and readline (to avoid running any code +in a signal handler context) cause the cursor to be placed on the wrong +line of a multi-line command after a ^C interrupts editing. + +Patch (apply with `patch -p0'): + +*** a/readline-6.3-patched/display.c 2013-12-27 13:10:56.000000000 -0500 +--- b/display.c 2014-03-27 11:52:45.000000000 -0400 +*************** +*** 2678,2682 **** + if (_rl_echoing_p) + { +! _rl_move_vert (_rl_vis_botlin); + _rl_vis_botlin = 0; + fflush (rl_outstream); +--- 2678,2683 ---- + if (_rl_echoing_p) + { +! if (_rl_vis_botlin > 0) /* minor optimization plus bug fix */ +! _rl_move_vert (_rl_vis_botlin); + _rl_vis_botlin = 0; + fflush (rl_outstream); +*** a/readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- b/patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 3 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 4 diff --git a/package/readline/0005-patchlevel-5.patch b/package/readline/0005-patchlevel-5.patch new file mode 100644 index 0000000000..6e73c7f263 --- /dev/null +++ b/package/readline/0005-patchlevel-5.patch @@ -0,0 +1,62 @@ +From http://ftp.gnu.org/pub/gnu/readline/readline-6.3-patches/readline63-005 + +Signed-off-by: Gustavo Zacarias + + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-005 + +Bug-Reported-by: Juergen Daubert +Bug-Reference-ID: <20140303180430.GA7346@jue.netz> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00002.html + +Bug-Description: + +There are still applications using the deprecated Function/VFunction/etc. +typedefs in rltypedefs.h. This patch restores the typedefs, but attempts +to mark them as deprecated using gcc/clang attributes. Thanks to Max Horn +for the suggestion. + +Patch (apply with `patch -p0'): + +*** a/readline-6.3-patched/rltypedefs.h 2011-03-26 14:53:31.000000000 -0400 +--- b/rltypedefs.h 2014-04-10 11:30:45.000000000 -0400 +*************** +*** 27,30 **** +--- 27,49 ---- + #endif + ++ /* Old-style, attempt to mark as deprecated in some way people will notice. */ ++ ++ #if !defined (_FUNCTION_DEF) ++ # define _FUNCTION_DEF ++ ++ #if defined(__GNUC__) || defined(__clang__) ++ typedef int Function () __attribute__ ((deprecated)); ++ typedef void VFunction () __attribute__ ((deprecated)); ++ typedef char *CPFunction () __attribute__ ((deprecated)); ++ typedef char **CPPFunction () __attribute__ ((deprecated)); ++ #else ++ typedef int Function (); ++ typedef void VFunction (); ++ typedef char *CPFunction (); ++ typedef char **CPPFunction (); ++ #endif ++ ++ #endif /* _FUNCTION_DEF */ ++ + /* New style. */ + +*** a/readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- b/patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 4 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 5 diff --git a/package/readline/0006-patchlevel-6.patch b/package/readline/0006-patchlevel-6.patch new file mode 100644 index 0000000000..b28b53c7ab --- /dev/null +++ b/package/readline/0006-patchlevel-6.patch @@ -0,0 +1,67 @@ +From http://ftp.gnu.org/pub/gnu/readline/readline-6.3-patches/readline63-006 + +Signed-off-by: Gustavo Zacarias + + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-006 + +Bug-Reported-by: +Bug-Reference-ID: +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-04/msg00069.html + +Bug-Description: + +Using reverse-i-search when horizontal scrolling is enabled does not redisplay +the entire line containing the successful search results. + +Patch (apply with `patch -p0'): + +*** a/readline-6.3-patched/display.c 2014-04-08 18:19:36.000000000 -0400 +--- b/display.c 2014-04-20 18:32:52.000000000 -0400 +*************** +*** 1638,1642 **** + the spot of first difference is before the end of the invisible chars, + lendiff needs to be adjusted. */ +! if (current_line == 0 && !_rl_horizontal_scroll_mode && + current_invis_chars != visible_wrap_offset) + { +--- 1638,1642 ---- + the spot of first difference is before the end of the invisible chars, + lendiff needs to be adjusted. */ +! if (current_line == 0 && /* !_rl_horizontal_scroll_mode && */ + current_invis_chars != visible_wrap_offset) + { +*************** +*** 1826,1831 **** + _rl_last_c_pos += bytes_to_insert; + + if (_rl_horizontal_scroll_mode && ((oe-old) > (ne-new))) +! goto clear_rest_of_line; + } + } +--- 1826,1836 ---- + _rl_last_c_pos += bytes_to_insert; + ++ /* XXX - we only want to do this if we are at the end of the line ++ so we move there with _rl_move_cursor_relative */ + if (_rl_horizontal_scroll_mode && ((oe-old) > (ne-new))) +! { +! _rl_move_cursor_relative (ne-new, new); +! goto clear_rest_of_line; +! } + } + } +*** a/readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- b/patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 5 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 6 diff --git a/package/readline/0007-patchlevel-7.patch b/package/readline/0007-patchlevel-7.patch new file mode 100644 index 0000000000..4c6f59cd24 --- /dev/null +++ b/package/readline/0007-patchlevel-7.patch @@ -0,0 +1,51 @@ +From http://ftp.gnu.org/pub/gnu/readline/readline-6.3-patches/readline63-007 + +Signed-off-by: Gustavo Zacarias + + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-007 + +Bug-Reported-by: John Lenton +Bug-Reference-ID: +Bug-Reference-URL: https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1317476 + +Bug-Description: + +Readline should allow SIGALRM and SIGVTALRM (if available) to `interrupt' +rl_getc and cause the handler to run when not in a signal handling context. + +Patch (apply with `patch -p0'): + +*** a/readline-6.3-patched/input.c 2014-01-10 15:07:08.000000000 -0500 +--- b/input.c 2014-05-30 16:20:56.000000000 -0400 +*************** +*** 535,540 **** +--- 538,551 ---- + else if (_rl_caught_signal == SIGHUP || _rl_caught_signal == SIGTERM) + return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF); ++ /* keyboard-generated signals of interest */ + else if (_rl_caught_signal == SIGINT || _rl_caught_signal == SIGQUIT) + RL_CHECK_SIGNALS (); ++ /* non-keyboard-generated signals of interest */ ++ else if (_rl_caught_signal == SIGALRM ++ #if defined (SIGVTALRM) ++ || _rl_caught_signal == SIGVTALRM ++ #endif ++ ) ++ RL_CHECK_SIGNALS (); + + if (rl_signal_event_hook) +*** a/readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- b/patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 6 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 7 diff --git a/package/readline/0008-patchlevel-8.patch b/package/readline/0008-patchlevel-8.patch new file mode 100644 index 0000000000..412ba352d6 --- /dev/null +++ b/package/readline/0008-patchlevel-8.patch @@ -0,0 +1,51 @@ +From http://ftp.gnu.org/pub/gnu/readline/readline-6.3-patches/readline63-008 + +Signed-off-by: Gustavo Zacarias + + READLINE PATCH REPORT + ===================== + +Readline-Release: 6.3 +Patch-ID: readline63-008 + +Bug-Reported-by: Jared Yanovich +Bug-Reference-ID: <20140625225019.GJ17044@nightderanger.psc.edu> +Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-06/msg00070.html + +Bug-Description: + +When the readline `revert-all-at-newline' option is set, pressing newline +when the current line is one retrieved from history results in a double free +and a segmentation fault. + +Patch (apply with `patch -p0'): + +*** a/readline-6.3-patched/misc.c 2012-09-01 18:03:11.000000000 -0400 +--- b/misc.c 2014-06-30 13:41:19.000000000 -0400 +*************** +*** 462,465 **** +--- 462,466 ---- + /* Set up rl_line_buffer and other variables from history entry */ + rl_replace_from_history (entry, 0); /* entry->line is now current */ ++ entry->data = 0; /* entry->data is now current undo list */ + /* Undo all changes to this history entry */ + while (rl_undo_list) +*************** +*** 469,473 **** + FREE (entry->line); + entry->line = savestring (rl_line_buffer); +- entry->data = 0; + } + entry = previous_history (); +--- 470,473 ---- +*** a/readline-6.3/patchlevel 2013-11-15 08:11:11.000000000 -0500 +--- b/patchlevel 2014-03-21 08:28:40.000000000 -0400 +*************** +*** 1,3 **** + # Do not edit -- exists only for use by patch + +! 7 +--- 1,3 ---- + # Do not edit -- exists only for use by patch + +! 8 diff --git a/package/readline/Config.in b/package/readline/Config.in new file mode 100644 index 0000000000..fbebf18a8a --- /dev/null +++ b/package/readline/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_READLINE + bool "readline" + select BR2_PACKAGE_NCURSES + help + The GNU Readline library provides a set of functions for use + by applications that allow users to edit command lines + as they are typed in. diff --git a/package/readline/inputrc b/package/readline/inputrc new file mode 100644 index 0000000000..2f1cb601a5 --- /dev/null +++ b/package/readline/inputrc @@ -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, ) +#"\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 + diff --git a/package/readline/readline.hash b/package/readline/readline.hash new file mode 100644 index 0000000000..d8833e9192 --- /dev/null +++ b/package/readline/readline.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43 readline-6.3.tar.gz diff --git a/package/readline/readline.mk b/package/readline/readline.mk new file mode 100644 index 0000000000..763197085e --- /dev/null +++ b/package/readline/readline.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# readline +# +################################################################################ + +READLINE_VERSION = 6.3 +READLINE_SITE = $(BR2_GNU_MIRROR)/readline +READLINE_INSTALL_STAGING = YES +READLINE_DEPENDENCIES = ncurses +HOST_READLINE_DEPENDENCIES = host-ncurses +READLINE_CONF_ENV = bash_cv_func_sigsetjmp=yes \ + bash_cv_wcwidth_broken=no +READLINE_LICENSE = GPLv3+ +READLINE_LICENSE_FILES = COPYING + +define READLINE_PURGE_EXAMPLES + rm -rf $(TARGET_DIR)/usr/share/readline +endef +READLINE_POST_INSTALL_TARGET_HOOKS += READLINE_PURGE_EXAMPLES + +define READLINE_INSTALL_INPUTRC + $(INSTALL) -D -m 644 package/readline/inputrc $(TARGET_DIR)/etc/inputrc +endef +READLINE_POST_INSTALL_TARGET_HOOKS += READLINE_INSTALL_INPUTRC + +ifneq ($(BR2_STATIC_LIBS),y) +# libraries get installed read only, so strip fails +define READLINE_INSTALL_FIXUPS_SHARED + chmod +w $(addprefix $(TARGET_DIR)/usr/lib/,libhistory.so.* libreadline.so.*) +endef +READLINE_POST_INSTALL_TARGET_HOOKS += READLINE_INSTALL_FIXUPS_SHARED +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/redis/0001-uclibc.patch b/package/redis/0001-uclibc.patch new file mode 100644 index 0000000000..a0534d5748 --- /dev/null +++ b/package/redis/0001-uclibc.patch @@ -0,0 +1,23 @@ +redis-001-uclibc.patch: This patch fixes redis so that it can be compiled +against uclibc. Patch originates from: + + Support cross-compiling for uClibc targets + https://github.com/antirez/redis/pull/537 + Mike Steinert, mike.steinert@gmail.com + +Signed-off-by: Daniel Price +[Martin: adapt to 3.0.3] +Signed-off-by: Martin Bark + +========================================================================= +diff -ur old/src/config.h new/src/config.h +--- old/src/config.h 2012-10-26 07:20:24.000000000 -0700 ++++ new/src/config.h 2012-10-31 13:41:51.206309564 -0700 +@@ -62,7 +62,7 @@ + #endif + + /* Test for backtrace() */ +-#if defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__)) ++#if defined(__APPLE__) || (defined(__linux__) && defined(__GLIBC__) && !defined(__UCLIBC__)) + #define HAVE_BACKTRACE 1 + #endif diff --git a/package/redis/0002-largefile-conditional-define.patch b/package/redis/0002-largefile-conditional-define.patch new file mode 100644 index 0000000000..747e0552b3 --- /dev/null +++ b/package/redis/0002-largefile-conditional-define.patch @@ -0,0 +1,32 @@ +Define _LARGEFILE_SOURCE and _FILE_OFFSET_BITS conditionally + +In order to avoid ugly warnings at compile time, only define +_LARGEFILE_SOURCE and _FILE_OFFSET_BITS if they have not already been +defined through the build command line. + +Avoids: + + In file included from redis.h:33:0, + from migrate.c:1: + fmacros.h:45:0: warning: "_LARGEFILE_SOURCE" redefined + :0:0: note: this is the location of the previous definition + +Signed-off-by: Thomas Petazzoni + +Index: redis-2.6.11/src/fmacros.h +=================================================================== +--- redis-2.6.11.orig/src/fmacros.h 2013-03-25 22:09:15.000000000 +0100 ++++ redis-2.6.11/src/fmacros.h 2013-03-25 22:09:40.000000000 +0100 +@@ -42,7 +42,12 @@ + #define _XOPEN_SOURCE + #endif + ++#ifndef _LARGEFILE_SOURCE + #define _LARGEFILE_SOURCE ++#endif ++ ++#ifndef _FILE_OFFSET_BITS + #define _FILE_OFFSET_BITS 64 ++#endif + + #endif diff --git a/package/redis/0003-redis.conf-sane-defaults.patch b/package/redis/0003-redis.conf-sane-defaults.patch new file mode 100644 index 0000000000..6ee3f210ca --- /dev/null +++ b/package/redis/0003-redis.conf-sane-defaults.patch @@ -0,0 +1,37 @@ +Taken from archlinux redis package +See https://projects.archlinux.org/svntogit/community.git/tree/trunk/redis.conf-sane-defaults.patch?h=packages/redis&id=5b2491ea61b746f289acebd12bc66e337d7e5b88 + +Signed-off-by: Martin Bark + +========================================================================= +diff --git a/redis.conf b/redis.conf +index 6efb6ac..344e021 100644 +--- a/redis.conf ++++ b/redis.conf +@@ -61,7 +61,7 @@ tcp-backlog 511 + # Examples: + # + # bind 192.168.1.100 10.0.0.1 +-# bind 127.0.0.1 ++bind 127.0.0.1 + + # Specify the path for the Unix socket that will be used to listen for + # incoming connections. There is no default, so Redis will not listen +@@ -87,7 +87,7 @@ timeout 0 + # On other kernels the period depends on the kernel configuration. + # + # A reasonable value for this option is 60 seconds. +-tcp-keepalive 0 ++tcp-keepalive 60 + + # Specify the server verbosity level. + # This can be one of: +@@ -184,7 +184,7 @@ dbfilename dump.rdb + # The Append Only File will also be created inside this directory. + # + # Note that you must specify a directory here, not a file name. +-dir ./ ++dir /var/lib/redis/ + + ################################# REPLICATION ################################# + diff --git a/package/redis/Config.in b/package/redis/Config.in new file mode 100644 index 0000000000..5d7edd8139 --- /dev/null +++ b/package/redis/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_REDIS + bool "redis" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Redis is an open source, advanced key-value store. It is + often referred to as a data structure server since keys can + contain strings, hashes, lists, sets and sorted sets. + + http://www.redis.io + +comment "redis needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/redis/S50redis b/package/redis/S50redis new file mode 100644 index 0000000000..ae2a34174d --- /dev/null +++ b/package/redis/S50redis @@ -0,0 +1,38 @@ +#!/bin/sh +# +# start redis +# + +start() { + printf "Starting redis: " + umask 077 + start-stop-daemon -S -q -c redis:redis -b \ + --exec /usr/bin/redis-server -- /etc/redis.conf + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +stop() { + printf "Stopping redis: " + /usr/bin/redis-cli shutdown + [ $? = 0 ] && echo "OK" || echo "FAIL" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/redis/redis.hash b/package/redis/redis.hash new file mode 100644 index 0000000000..07783f545f --- /dev/null +++ b/package/redis/redis.hash @@ -0,0 +1,4 @@ +# From https://github.com/antirez/redis-hashes/blob/master/README +sha1 e56b4b7e033ae8dbf311f9191cf6fdf3ae974d1c redis-3.0.7.tar.gz +# Calculated based on the hash above +sha256 b2a791c4ea3bb7268795c45c6321ea5abcc24457178373e6a6e3be6372737f23 redis-3.0.7.tar.gz diff --git a/package/redis/redis.mk b/package/redis/redis.mk new file mode 100644 index 0000000000..a9df6e712f --- /dev/null +++ b/package/redis/redis.mk @@ -0,0 +1,52 @@ +################################################################################ +# +# redis +# +################################################################################ + +REDIS_VERSION = 3.0.7 +REDIS_SITE = http://download.redis.io/releases +REDIS_LICENSE = BSD-3c (core); MIT and BSD family licenses (Bundled components) +REDIS_LICENSE_FILES = COPYING + +define REDIS_USERS + redis -1 redis -1 * /var/lib/redis /bin/false - Redis Server +endef + +# Uses __atomic_fetch_add_4 +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +REDIS_LIBATOMIC = -latomic +endif + +# Redis doesn't support DESTDIR (yet, see +# https://github.com/antirez/redis/pull/609). We set PREFIX +# instead. +REDIS_BUILDOPTS = $(TARGET_CONFIGURE_OPTS) \ + LDFLAGS="$(TARGET_LDFLAGS) $(REDIS_LIBATOMIC)" \ + PREFIX=$(TARGET_DIR)/usr MALLOC=libc \ + +define REDIS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(REDIS_BUILDOPTS) -C $(@D) +endef + +define REDIS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(REDIS_BUILDOPTS) -C $(@D) \ + LDCONFIG=true install + $(INSTALL) -D -m 0644 $(@D)/redis.conf \ + $(TARGET_DIR)/etc/redis.conf +endef + +define REDIS_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/redis/S50redis \ + $(TARGET_DIR)/etc/init.d/S50redis +endef + +define REDIS_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/redis/redis.service \ + $(TARGET_DIR)/usr/lib/systemd/system/redis.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/redis.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/redis.service +endef + +$(eval $(generic-package)) diff --git a/package/redis/redis.service b/package/redis/redis.service new file mode 100644 index 0000000000..0a8162b8ab --- /dev/null +++ b/package/redis/redis.service @@ -0,0 +1,22 @@ +[Unit] +Description=Advanced key-value store +After=network.target + +[Service] +Type=simple +User=redis +Group=redis +ExecStart=/usr/bin/redis-server /etc/redis.conf +ExecStop=/usr/bin/redis-cli shutdown +CapabilityBoundingSet= +PrivateTmp=true +PrivateDevices=true +ProtectSystem=full +ProtectHome=true +NoNewPrivileges=true +RuntimeDirectory=redis +RuntimeDirectoryMode=755 +LimitNOFILE=10032 + +[Install] +WantedBy=multi-user.target diff --git a/package/rfkill/Config.in b/package/rfkill/Config.in new file mode 100644 index 0000000000..0d079138b8 --- /dev/null +++ b/package/rfkill/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_RFKILL + bool "rfkill" + help + rfkill is a small userspace tool to query the state of the + rfkill switches. + + https://wireless.wiki.kernel.org/en/users/documentation/rfkill diff --git a/package/rfkill/rfkill.hash b/package/rfkill/rfkill.hash new file mode 100644 index 0000000000..21be0a2074 --- /dev/null +++ b/package/rfkill/rfkill.hash @@ -0,0 +1,2 @@ +# From: https://www.kernel.org/pub/software/network/rfkill/sha256sums.asc +sha256 e0ae3004215e39a6c5c36e0726558740728d16f67ebdb8bea621250f6091d86a rfkill-0.5.tar.xz diff --git a/package/rfkill/rfkill.mk b/package/rfkill/rfkill.mk new file mode 100644 index 0000000000..2f9fe9f9a1 --- /dev/null +++ b/package/rfkill/rfkill.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# rfkill +# +################################################################################ + +RFKILL_VERSION = 0.5 +RFKILL_SOURCE = rfkill-$(RFKILL_VERSION).tar.xz +RFKILL_SITE = https://www.kernel.org/pub/software/network/rfkill +RFKILL_LICENSE = ISC +RFKILL_LICENSE_FILES = COPYING + +define RFKILL_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + VERSION_SUFFIX="br" +endef + +define RFKILL_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/rings/Config.in b/package/rings/Config.in new file mode 100644 index 0000000000..87ade07cb1 --- /dev/null +++ b/package/rings/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_RINGS + bool "rings" + depends on BR2_PACKAGE_HAS_LUAINTERPRETER + help + Provides a way to create new Lua states from within Lua. + + http://github.com/keplerproject/rings diff --git a/package/rings/rings.hash b/package/rings/rings.hash new file mode 100644 index 0000000000..59da2fa32c --- /dev/null +++ b/package/rings/rings.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 627ac55d4a420fab766e6870fcd82cb39da12fb4ec8efddc7220b188a4ad4bc3 rings-1.3.0-1.src.rock diff --git a/package/rings/rings.mk b/package/rings/rings.mk new file mode 100644 index 0000000000..151546aeaa --- /dev/null +++ b/package/rings/rings.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# rings +# +################################################################################ + +RINGS_VERSION_MAJOR = 1.3.0 +RINGS_VERSION = $(RINGS_VERSION_MAJOR)-1 +RINGS_SUBDIR = rings-v_$(subst .,_,$(RINGS_VERSION_MAJOR)) +RINGS_LICENSE = MIT + +$(eval $(luarocks-package)) diff --git a/package/rng-tools/0001-rngd-exit-code.patch b/package/rng-tools/0001-rngd-exit-code.patch new file mode 100644 index 0000000000..709e20c70d --- /dev/null +++ b/package/rng-tools/0001-rngd-exit-code.patch @@ -0,0 +1,22 @@ +Exit with a special value when RNG modules are not available + +Instead of returning with an error, exit with a special value when the +RNG kernel modules are not present in the kernel. This is not really a +hard failure. + +Patch borrowed from Fedora, at +http://pkgs.fedoraproject.org/cgit/rng-tools.git/tree/rngd-exit-code.patch. + +Signed-off-by: Maxim Mikityanskiy + +--- a/rngd.c ++++ b/rngd.c +@@ -319,7 +319,7 @@ int main(int argc, char **argv) + message(LOG_DAEMON|LOG_ERR, + "Maybe RNG device modules are not loaded\n"); + } +- return 1; ++ return 66; + } + + if (arguments->verbose) { diff --git a/package/rng-tools/Config.in b/package/rng-tools/Config.in new file mode 100644 index 0000000000..469b60e89b --- /dev/null +++ b/package/rng-tools/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_RNG_TOOLS + bool "rng-tools" + select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_MUSL + # For rdrand ligcrypt is required and it's not obvious to users + select BR2_PACKAGE_LIBGCRYPT if BR2_i386 || BR2_x86_64 + help + Daemon to use hardware random number generators. + + http://sourceforge.net/projects/gkernel/ diff --git a/package/rng-tools/S21rngd b/package/rng-tools/S21rngd new file mode 100755 index 0000000000..b38be5a507 --- /dev/null +++ b/package/rng-tools/S21rngd @@ -0,0 +1,48 @@ +#!/bin/sh + +NAME="rngd" +DAEMON="/usr/sbin/${NAME}" +DAEMON_ARGS="" +CFG_FILE="/etc/default/${NAME}" +PID_FILE="/var/run/${NAME}.pid" + +# Read configuration variable file if it is present +[ -r "${CFG_FILE}" ] && . "${CFG_FILE}" + +start() +{ + printf "Starting ${NAME}: " + start-stop-daemon -S -q -x "${DAEMON}" -- ${DAEMON_ARGS} + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() +{ + printf "Stopping ${NAME}: " + # This daemon does not exit properly with the default TERM signal unless + # it's forced to work by something reading /dev/random. Killing it and + # removing its PID file is more straightforward. + if start-stop-daemon -K -q -s KILL -p "${PID_FILE}" -n "${NAME}"; then + rm -f "${PID_FILE}" + echo "OK" + else + echo "FAIL" + fi +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" >&2 + exit 1 + ;; +esac diff --git a/package/rng-tools/rng-tools.hash b/package/rng-tools/rng-tools.hash new file mode 100644 index 0000000000..09769e4622 --- /dev/null +++ b/package/rng-tools/rng-tools.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/gkernel/files/rng-tools/5/ +md5 6726cdc6fae1f5122463f24ae980dd68 rng-tools-5.tar.gz +sha1 3092768ac45315a5dcc0170d05566d1d00dbad96 rng-tools-5.tar.gz diff --git a/package/rng-tools/rng-tools.mk b/package/rng-tools/rng-tools.mk new file mode 100644 index 0000000000..cc07bdf15c --- /dev/null +++ b/package/rng-tools/rng-tools.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# rng-tools +# +################################################################################ + +RNG_TOOLS_VERSION = 5 +RNG_TOOLS_SITE = http://downloads.sourceforge.net/project/gkernel/rng-tools/$(RNG_TOOLS_VERSION) +RNG_TOOLS_LICENSE = GPLv2 +RNG_TOOLS_LICENSE_FILES = COPYING + +# Work around for uClibc or musl toolchains which lack argp_*() +# functions. +ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y) +RNG_TOOLS_CONF_ENV += LIBS="-largp" +RNG_TOOLS_DEPENDENCIES += argp-standalone +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +RNG_TOOLS_DEPENDENCIES += libgcrypt +else +RNG_TOOLS_CONF_OPTS += --without-libgcrypt +endif + +define RNG_TOOLS_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/rng-tools/S21rngd \ + $(TARGET_DIR)/etc/init.d/S21rngd +endef + +define RNG_TOOLS_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/rng-tools/rngd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/rngd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/rngd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/rngd.service +endef + +$(eval $(autotools-package)) diff --git a/package/rng-tools/rngd.service b/package/rng-tools/rngd.service new file mode 100644 index 0000000000..c0bcffe59e --- /dev/null +++ b/package/rng-tools/rngd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Hardware RNG Entropy Gatherer Daemon + +[Service] +ExecStart=/usr/sbin/rngd -f $DAEMON_ARGS +SuccessExitStatus=66 +EnvironmentFile=-/etc/default/rngd + +[Install] +WantedBy=multi-user.target diff --git a/package/rp-pppoe/0002-krn-plugin.patch b/package/rp-pppoe/0002-krn-plugin.patch new file mode 100644 index 0000000000..d364e8684c --- /dev/null +++ b/package/rp-pppoe/0002-krn-plugin.patch @@ -0,0 +1,25 @@ +diff -Nura rp-pppoe-3.11.orig/src/configure rp-pppoe-3.11/src/configure +--- rp-pppoe-3.11.orig/src/configure 2012-08-21 10:01:10.536440032 -0300 ++++ rp-pppoe-3.11/src/configure 2012-08-21 10:01:45.353442397 -0300 +@@ -4517,7 +4517,7 @@ + modprobe pppoe > /dev/null 2>&1 + fi + if test "$cross_compiling" = yes; then : +- ac_cv_linux_kernel_pppoe=no; $ECHO "cross-compiling, default: " ++ ac_cv_linux_kernel_pppoe=yes; $ECHO "cross-compiling, default: " + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ +diff -Nura rp-pppoe-3.11.orig/src/pppoe-server.c rp-pppoe-3.11/src/pppoe-server.c +--- rp-pppoe-3.11.orig/src/pppoe-server.c 2012-08-21 10:01:10.535440032 -0300 ++++ rp-pppoe-3.11/src/pppoe-server.c 2012-08-21 10:02:02.597443569 -0300 +@@ -20,6 +20,9 @@ + + #include "config.h" + ++/* Patched hack to make this cross compile */ ++#define HAVE_LINUX_KERNEL_PPPOE 1 ++ + #if defined(HAVE_NETPACKET_PACKET_H) || defined(HAVE_LINUX_IF_PACKET_H) + #define _POSIX_SOURCE 1 /* For sigaction defines */ + #endif diff --git a/package/rp-pppoe/Config.in b/package/rp-pppoe/Config.in new file mode 100644 index 0000000000..7f6afe27ea --- /dev/null +++ b/package/rp-pppoe/Config.in @@ -0,0 +1,17 @@ +comment "rp-pppoe needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + depends on BR2_USE_MMU + +config BR2_PACKAGE_RP_PPPOE + bool "rp-pppoe" + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_PPPD + help + An implementation of the Point-to-point protocol over Ethernet. + Has userspace client and server deamons. You likely only need + this package if you are implementing the pppoe server that will + service other pppoe client devices. Otherwise the normal client + functionality already exists in the pppd package (and kernel). + + http://www.roaringpenguin.com/pppoe.html diff --git a/package/rp-pppoe/rp-pppoe.hash b/package/rp-pppoe/rp-pppoe.hash new file mode 100644 index 0000000000..0cf85a089a --- /dev/null +++ b/package/rp-pppoe/rp-pppoe.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 00794e04031546b0e9b8cf286f2a6d1ccfc4a621b2a3abb2d7ef2a7ab7cc86c2 rp-pppoe-3.12.tar.gz diff --git a/package/rp-pppoe/rp-pppoe.mk b/package/rp-pppoe/rp-pppoe.mk new file mode 100644 index 0000000000..43062549b8 --- /dev/null +++ b/package/rp-pppoe/rp-pppoe.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# rp-pppoe +# +################################################################################ + +RP_PPPOE_VERSION = 3.12 +RP_PPPOE_SITE = http://www.roaringpenguin.com/files/download +RP_PPPOE_LICENSE = GPLv2 +RP_PPPOE_LICENSE_FILES = doc/LICENSE +RP_PPPOE_DEPENDENCIES = pppd +RP_PPPOE_SUBDIR = src +RP_PPPOE_TARGET_FILES = pppoe pppoe-server pppoe-relay pppoe-sniff +RP_PPPOE_TARGET_SCRIPTS = pppoe-connect pppoe-init pppoe-setup pppoe-start \ + pppoe-status pppoe-stop +RP_PPPOE_MAKE_OPTS = PLUGIN_DIR=/usr/lib/pppd/$(PPPD_VERSION) +RP_PPPOE_CONF_OPTS = --disable-debugging +RP_PPPOE_CONF_ENV = \ + rpppoe_cv_pack_bitfields=normal \ + PPPD_H=$(PPPD_DIR)/pppd/pppd.h + +define RP_PPPOE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0644 $(@D)/configs/pppoe.conf \ + $(TARGET_DIR)/etc/ppp/pppoe.conf + for ff in $(RP_PPPOE_TARGET_FILES); do \ + $(INSTALL) -m 0755 $(@D)/src/$$ff $(TARGET_DIR)/usr/sbin/$$ff || exit 1; \ + done + for ff in $(RP_PPPOE_TARGET_SCRIPTS); do \ + $(INSTALL) -m 0755 $(@D)/scripts/$$ff $(TARGET_DIR)/usr/sbin/$$ff || exit 1; \ + done +endef + +$(eval $(autotools-package)) diff --git a/package/rpcbind/0001-Remove-yellow-pages-support.patch b/package/rpcbind/0001-Remove-yellow-pages-support.patch new file mode 100644 index 0000000000..314e32e9c8 --- /dev/null +++ b/package/rpcbind/0001-Remove-yellow-pages-support.patch @@ -0,0 +1,56 @@ +From 226b9c57ff403b407dbf1ff8a615da455a4cbd23 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 10 Nov 2012 22:03:43 +0100 +Subject: [PATCH] Remove yellow pages support + +This support requires yellow pages support in libtirpc, which isn't +available. As most Buildroot users are most likely never going to need +such feature, get rid of it. + +Signed-off-by: Thomas Petazzoni +--- + src/security.c | 18 ------------------ + 1 file changed, 18 deletions(-) + +diff --git a/src/security.c b/src/security.c +index 0c9453f..abc81bb 100644 +--- a/src/security.c ++++ b/src/security.c +@@ -24,9 +24,6 @@ + #include + #include + #include +-#include +-#include +-#include + #else + # define MOUNTPROC_MNT 1 + # define MOUNTPROC_UMNT 3 +@@ -325,24 +322,9 @@ check_callit(SVCXPRT *xprt, struct r_rmtcall_args *args, int versnum /*__unused* + args->rmt_proc != MOUNTPROC_UMNT) + break; + goto deny; +- case YPBINDPROG: +- if (args->rmt_proc != YPBINDPROC_SETDOM) +- break; +- /* FALLTHROUGH */ +- case YPPASSWDPROG: + case NFS_PROGRAM: + case RQUOTAPROG: + goto deny; +- case YPPROG: +- switch (args->rmt_proc) { +- case YPPROC_ALL: +- case YPPROC_MATCH: +- case YPPROC_FIRST: +- case YPPROC_NEXT: +- goto deny; +- default: +- break; +- } + default: + break; + } +-- +2.4.5 + diff --git a/package/rpcbind/0002-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch b/package/rpcbind/0002-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch new file mode 100644 index 0000000000..6145514bea --- /dev/null +++ b/package/rpcbind/0002-handle_reply-Don-t-use-the-xp_auth-pointer-directly.patch @@ -0,0 +1,42 @@ +From 9194122389f2a56b1cd1f935e64307e2e963c2da Mon Sep 17 00:00:00 2001 +From: Steve Dickson +Date: Mon, 2 Nov 2015 17:05:18 -0500 +Subject: [PATCH] handle_reply: Don't use the xp_auth pointer directly + +In the latest libtirpc version to access the xp_auth +one must use the SVC_XP_AUTH macro. To be backwards +compatible a couple ifdefs were added to use the +macro when it exists. + +Signed-off-by: Steve Dickson +[peda@axentia.se: backport from upstream] +Signed-off-by: Peter Rosin +--- + src/rpcb_svc_com.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c +index 4ae93f1..22d6c84 100644 +--- a/src/rpcb_svc_com.c ++++ b/src/rpcb_svc_com.c +@@ -1295,10 +1295,17 @@ handle_reply(int fd, SVCXPRT *xprt) + a.rmt_localvers = fi->versnum; + + xprt_set_caller(xprt, fi); ++#if defined(SVC_XP_AUTH) ++ SVC_XP_AUTH(xprt) = svc_auth_none; ++#else + xprt->xp_auth = &svc_auth_none; ++#endif + svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a); ++#if !defined(SVC_XP_AUTH) + SVCAUTH_DESTROY(xprt->xp_auth); + xprt->xp_auth = NULL; ++#endif ++ + done: + if (buffer) + free(buffer); +-- +2.5.3 + diff --git a/package/rpcbind/Config.in b/package/rpcbind/Config.in new file mode 100644 index 0000000000..9ff64a589c --- /dev/null +++ b/package/rpcbind/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_RPCBIND + bool "rpcbind" + # We really need libtirpc and can't work with the native RPC + # implementation of toolchains. + depends on BR2_TOOLCHAIN_HAS_THREADS # libtirpc + select BR2_PACKAGE_LIBTIRPC + # fork() + depends on BR2_USE_MMU + help + The rpcbind utility is a server that converts RPC program numbers + into universal addresses. + +comment "rpcbind needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/rpcbind/S30rpcbind b/package/rpcbind/S30rpcbind new file mode 100644 index 0000000000..532d3f8866 --- /dev/null +++ b/package/rpcbind/S30rpcbind @@ -0,0 +1,38 @@ +#!/bin/sh +# +# Starts rpcbind. +# + +start() { + printf "Starting rpcbind: " + umask 077 + start-stop-daemon -S -q -p /var/run/rpcbind.pid --exec /usr/bin/rpcbind + echo "OK" +} +stop() { + printf "Stopping rpcbind daemon: " + start-stop-daemon -K -q -p /var/run/rpcbind.pid + echo "OK" +} +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/package/rpcbind/rpcbind.hash b/package/rpcbind/rpcbind.hash new file mode 100644 index 0000000000..5c9ecd1429 --- /dev/null +++ b/package/rpcbind/rpcbind.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 9897823a9d820ea011d9ea02054d5ab99469b9ca5346265fee380713c8fed27b rpcbind-0.2.3.tar.bz2 diff --git a/package/rpcbind/rpcbind.mk b/package/rpcbind/rpcbind.mk new file mode 100644 index 0000000000..4360d1f47a --- /dev/null +++ b/package/rpcbind/rpcbind.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# rpcbind +# +################################################################################ + +RPCBIND_VERSION = 0.2.3 +RPCBIND_SITE = http://downloads.sourceforge.net/project/rpcbind/rpcbind/$(RPCBIND_VERSION) +RPCBIND_SOURCE = rpcbind-$(RPCBIND_VERSION).tar.bz2 +RPCBIND_LICENSE = BSD-3c +RPCBIND_LICENSE_FILES = COPYING + +RPCBIND_CONF_ENV += \ + CFLAGS="$(TARGET_CFLAGS) `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" +RPCBIND_DEPENDENCIES += libtirpc host-pkgconf +RPCBIND_CONF_OPTS += --with-rpcuser=root + +ifeq ($(BR2_INIT_SYSTEMD),y) +RPCBIND_CONF_OPTS += --with-systemdsystemunitdir=/usr/lib/systemd/system +else +RPCBIND_CONF_OPTS += --with-systemdsystemunitdir=no +endif + +define RPCBIND_INSTALL_INIT_SYSTEMD + $(INSTALL) -m 0755 -D package/rpcbind/rpcbind.service \ + $(TARGET_DIR)/usr/lib/systemd/system/rpcbind.service + $(INSTALL) -m 0755 -D package/rpcbind/rpcbind.socket \ + $(TARGET_DIR)/usr/lib/systemd/system/rpcbind.socket + mkdir -p $(TARGET_DIR)/etc/systemd/system/sockets.target.wants + ln -fs ../../../../usr/lib/systemd/system/rpcbind.socket \ + $(TARGET_DIR)/etc/systemd/system/sockets.target.wants/rpcbind.socket +endef + +define RPCBIND_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/rpcbind/S30rpcbind \ + $(TARGET_DIR)/etc/init.d/S30rpcbind +endef + + +$(eval $(autotools-package)) diff --git a/package/rpcbind/rpcbind.service b/package/rpcbind/rpcbind.service new file mode 100644 index 0000000000..b7a32a19d0 --- /dev/null +++ b/package/rpcbind/rpcbind.service @@ -0,0 +1,10 @@ +[Unit] +Description=RPC bind service +Requires=rpcbind.socket + +[Service] +Type=forking +ExecStart=/usr/bin/rpcbind + +[Install] +Also=rpcbind.socket diff --git a/package/rpcbind/rpcbind.socket b/package/rpcbind/rpcbind.socket new file mode 100644 index 0000000000..d63c1d9720 --- /dev/null +++ b/package/rpcbind/rpcbind.socket @@ -0,0 +1,8 @@ +[Unit] +Description=RPCbind Server Activation Socket + +[Socket] +ListenStream=/var/run/rpcbind.sock + +[Install] +WantedBy=sockets.target diff --git a/package/rpi-armmem/Config.in b/package/rpi-armmem/Config.in new file mode 100644 index 0000000000..6435ea89f5 --- /dev/null +++ b/package/rpi-armmem/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_RPI_ARMMEM + bool "rpi-armmem" + depends on BR2_arm && BR2_PACKAGE_RPI_FIRMWARE && BR2_PACKAGE_RPI_USERLAND + help + A replacement for memcpy and memset functionality for the + Raspberry Pi with the intention of gaining greater performance. + + https://github.com/bavison/arm-mem/ + diff --git a/package/rpi-armmem/rpi-armmem.mk b/package/rpi-armmem/rpi-armmem.mk new file mode 100644 index 0000000000..95607f012c --- /dev/null +++ b/package/rpi-armmem/rpi-armmem.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# rpi-armmem +# +################################################################################ + +RPI_ARMMEM_VERSION = 3aee5f40c201b9fd50d6f79b8db89f4343820f2c +RPI_ARMMEM_SITE = $(call github,bavison,arm-mem,$(RPI_ARMMEM_VERSION)) +CFLAGS = -fPIC -std=gnu99 -O2 + +define RPI_ARMMEM_BUILD_CMDS + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" CFLAGS="$(CFLAGS)" libarmmem.so -C $(@D) +endef + +define RPI_ARMMEM_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/libarmmem.so $(TARGET_DIR)/usr/lib/libarmmem.so +endef + +$(eval $(generic-package)) + diff --git a/package/rpi-firmware/Config.in b/package/rpi-firmware/Config.in new file mode 100644 index 0000000000..405674f423 --- /dev/null +++ b/package/rpi-firmware/Config.in @@ -0,0 +1,79 @@ +config BR2_PACKAGE_RPI_FIRMWARE + bool "rpi-firmware" + depends on BR2_arm + help + RaspberryPi Firmware + Pre-compiled binaries of the current bootloader and GPU firmware + + https://github.com/raspberrypi/firmware + +if BR2_PACKAGE_RPI_FIRMWARE + +choice + bool "Firmware to boot" + default BR2_PACKAGE_RPI_FIRMWARE_DEFAULT + help + There are three different firmware files: + - the default firmware, that enables standard GPU features; + - the extended firmware, that enables additional GPU features + (eg. more audio/video codecs); + - the cut-down firmware, for emergency situations, with only + features required to boot a Linux kernel. + +config BR2_PACKAGE_RPI_FIRMWARE_DEFAULT + bool "default" + help + The default firmware, that enables standard GPU features. + +config BR2_PACKAGE_RPI_FIRMWARE_X + bool "extended ('x', more codecs)" + help + The extended firmware, that enables additional GPU features + (eg. more audio/video codecs). + +config BR2_PACKAGE_RPI_FIRMWARE_CD + bool "cut-down ('cd', emergency)" + help + The cut-down firmware, for emergency situations, with only + features required to boot a Linux kernel. + +endchoice + +config BR2_PACKAGE_RPI_FIRMWARE_BOOT + string + default "" if BR2_PACKAGE_RPI_FIRMWARE_DEFAULT + default "_x" if BR2_PACKAGE_RPI_FIRMWARE_X + default "_cd" if BR2_PACKAGE_RPI_FIRMWARE_CD + +config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS + bool "Install Device Tree Blobs (DTBs)" + depends on !BR2_LINUX_KERNEL_DTS_SUPPORT + default y + help + If you are using a Linux kernel <= 3.18, you should say 'y' here. + + If you are using a Linux kernel >= 3.19, you should say 'n' here, + and enable BR2_LINUX_KERNEL_DTS_SUPPORT to let the kernel build + the DTB. + +config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS + bool "Install DTB overlays" + depends on BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS \ + || BR2_LINUX_KERNEL_DTS_SUPPORT + default y + help + Say 'y' here if you need to load one or more of the DTB overlays, + to support HATs (Hardware Attached on Top, add-on modules). + +config BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG + bool "vcdbg" + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_INSTALL_LIBSTDCPP # rpi-userland + select BR2_PACKAGE_RPI_USERLAND + help + Install vcdbg, to help debug communication with the GPU. + +comment "vcdbg needs an (e)glibc toolchain w/ C++" + depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP + +endif # BR2_PACKAGE_RPI_FIRMWARE diff --git a/package/rpi-firmware/cmdline.txt b/package/rpi-firmware/cmdline.txt new file mode 100644 index 0000000000..38aa378262 --- /dev/null +++ b/package/rpi-firmware/cmdline.txt @@ -0,0 +1 @@ +root=/dev/mmcblk0p2 rootwait diff --git a/package/rpi-firmware/config.txt b/package/rpi-firmware/config.txt new file mode 100644 index 0000000000..58cc966a87 --- /dev/null +++ b/package/rpi-firmware/config.txt @@ -0,0 +1,20 @@ +# Please note that this is only a sample, we recommend you to change it to fit +# your needs. +# You should override this file using a post-build script. +# See http://buildroot.org/manual.html#rootfs-custom +# and http://elinux.org/RPiconfig for a description of config.txt syntax + +kernel=zImage + +# To use an external initramfs file +#initramfs rootfs.cpio.gz + +# Disable overscan assuming the display supports displaying the full resolution +# If the text shown on the screen disappears off the edge, comment this out +disable_overscan=1 + +# How much memory in MB to assign to the GPU on Pi models having +# 256, 512 or 1024 MB total memory +gpu_mem_256=100 +gpu_mem_512=100 +gpu_mem_1024=100 diff --git a/package/rpi-firmware/mkknlimg b/package/rpi-firmware/mkknlimg new file mode 100644 index 0000000000..33f81874bf --- /dev/null +++ b/package/rpi-firmware/mkknlimg @@ -0,0 +1,299 @@ +#!/usr/bin/env perl +# +# Originaly from: https://github.com/raspberrypi/tools/blob/master/mkimage/mkknlimg +# Original cset : f5642106425d430e1f82ee064121a5fd0e05a386 +# +# ---------------------------------------------------------------------- +# mkknlimg by Phil Elwell for Raspberry Pi +# based on extract-ikconfig by Dick Streefland +# +# (c) 2009,2010 Dick Streefland +# (c) 2014,2015 Raspberry Pi (Trading) Limited +# +# Licensed under the terms of the GNU General Public License. +# ---------------------------------------------------------------------- + +use strict; +use warnings; +use integer; + +use constant FLAG_PI => 1; +use constant FLAG_DTOK => 2; +use constant FLAG_DDTK => 4; +use constant FLAG_283X => 8; + +my $trailer_magic = 'RPTL'; + +my $tmpfile1 = "/tmp/mkknlimg_$$.1"; +my $tmpfile2 = "/tmp/mkknlimg_$$.2"; + +my $dtok = 0; +my $ddtk = 0; +my $is_283x = 0; + +while (@ARGV && ($ARGV[0] =~ /^-/)) +{ + my $arg = shift(@ARGV); + if ($arg eq '--dtok') + { + $dtok = 1; + } + elsif ($arg eq '--ddtk') + { + $ddtk = 1; + } + elsif ($arg eq '--283x') + { + $is_283x = 1; + } + else + { + print ("* Unknown option '$arg'\n"); + usage(); + } +} + +usage() if (@ARGV != 2); + +my $kernel_file = $ARGV[0]; +my $out_file = $ARGV[1]; + +if (! -r $kernel_file) +{ + print ("* File '$kernel_file' not found\n"); + usage(); +} + +my $wanted_configs = +{ + 'CONFIG_BCM2708_DT' => FLAG_PI | FLAG_DTOK, + 'CONFIG_ARCH_BCM2835' => FLAG_PI | FLAG_DTOK | FLAG_283X, +}; + +my $wanted_strings = +{ + 'bcm2708_fb' => FLAG_PI, + 'brcm,bcm2835-mmc' => FLAG_PI, + 'brcm,bcm2835-sdhost' => FLAG_PI, + 'brcm,bcm2708-pinctrl' => FLAG_PI | FLAG_DTOK, + 'brcm,bcm2835-gpio' => FLAG_PI | FLAG_DTOK, + 'brcm,bcm2835-pm-wdt' => FLAG_PI | FLAG_DTOK | FLAG_283X, + 'of_overlay_apply' => FLAG_DTOK | FLAG_DDTK, +}; + +my $res = try_extract($kernel_file, $tmpfile1); +$res ||= try_decompress('\037\213\010', 'xy', 'gunzip', 0, + $kernel_file, $tmpfile1, $tmpfile2); +$res ||= try_decompress('\3757zXZ\000', 'abcde', 'unxz --single-stream', -1, + $kernel_file, $tmpfile1, $tmpfile2); +$res ||= try_decompress('BZh', 'xy', 'bunzip2', 0, + $kernel_file, $tmpfile1, $tmpfile2); +$res ||= try_decompress('\135\0\0\0', 'xxx', 'unlzma', 0, + $kernel_file, $tmpfile1, $tmpfile2); +$res ||= try_decompress('\211\114\132', 'xy', 'lzop -d', 0, + $kernel_file, $tmpfile1, $tmpfile2); +$res ||= try_decompress('\002\041\114\030', 'xy', 'lz4 -d', 1, + $kernel_file, $tmpfile1, $tmpfile2); + +my $append_trailer; +my $trailer; +my $kver = '?'; + +$append_trailer = $dtok; + +if ($res) +{ + $kver = $res->{'kver'} || '?'; + my $flags = $res->{'flags'}; + print("Version: $kver\n"); + + if ($flags & FLAG_PI) + { + $append_trailer = 1; + $dtok ||= ($flags & FLAG_DTOK) != 0; + $is_283x ||= ($flags & FLAG_283X) != 0; + $ddtk ||= ($flags & FLAG_DDTK) != 0; + } + else + { + print ("* This doesn't look like a Raspberry Pi kernel. In pass-through mode.\n"); + } +} +elsif (!$dtok) +{ + print ("* Is this a valid kernel? In pass-through mode.\n"); +} + +if ($append_trailer) +{ + printf("DT: %s\n", $dtok ? "y" : "n"); + printf("DDT: %s\n", $ddtk ? "y" : "n"); + printf("283x: %s\n", $is_283x ? "y" : "n"); + + my @atoms; + + push @atoms, [ $trailer_magic, pack('V', 0) ]; + push @atoms, [ 'KVer', $kver ]; + push @atoms, [ 'DTOK', pack('V', $dtok) ]; + push @atoms, [ 'DDTK', pack('V', $ddtk) ]; + push @atoms, [ '283x', pack('V', $is_283x) ]; + + $trailer = pack_trailer(\@atoms); + $atoms[0]->[1] = pack('V', length($trailer)); + + $trailer = pack_trailer(\@atoms); +} + +my $ofh; +my $total_len = 0; + +if ($out_file eq $kernel_file) +{ + die "* Failed to open '$out_file' for append\n" + if (!open($ofh, '>>', $out_file)); + $total_len = tell($ofh); +} +else +{ + die "* Failed to open '$kernel_file'\n" + if (!open(my $ifh, '<', $kernel_file)); + die "* Failed to create '$out_file'\n" + if (!open($ofh, '>', $out_file)); + + my $copybuf; + while (1) + { + my $bytes = sysread($ifh, $copybuf, 64*1024); + last if (!$bytes); + syswrite($ofh, $copybuf, $bytes); + $total_len += $bytes; + } + close($ifh); +} + +if ($trailer) +{ + # Pad to word-alignment + syswrite($ofh, "\x000\x000\x000", (-$total_len & 0x3)); + syswrite($ofh, $trailer); +} + +close($ofh); + +exit($trailer ? 0 : 1); + +END { + unlink($tmpfile1) if ($tmpfile1); + unlink($tmpfile2) if ($tmpfile2); +} + + +sub usage +{ + print ("Usage: mkknlimg [--dtok] [--283x] \n"); + exit(1); +} + +sub try_extract +{ + my ($knl, $tmp) = @_; + + my $ver = `strings "$knl" | grep -a -E "^Linux version [1-9]"`; + + return undef if (!$ver); + + chomp($ver); + + my $res = { 'kver'=>$ver }; + $res->{'flags'} = strings_to_flags($knl, $wanted_strings) | + configs_to_flags($knl, $tmp, $wanted_configs); + + return $res; +} + + +sub try_decompress +{ + my ($magic, $subst, $zcat, $idx, $knl, $tmp1, $tmp2) = @_; + + my $pos = `tr "$magic\n$subst" "\n$subst=" < "$knl" | grep -abo "^$subst"`; + if ($pos) + { + chomp($pos); + $pos = (split(/[\r\n]+/, $pos))[$idx]; + return undef if (!defined($pos)); + $pos =~ s/:.*[\r\n]*$//s; + my $cmd = "tail -c+$pos \"$knl\" | $zcat > $tmp2 2> /dev/null"; + my $err = (system($cmd) >> 8); + return undef if (($err != 0) && ($err != 2)); + + return try_extract($tmp2, $tmp1); + } + + return undef; +} + + +sub strings_to_flags +{ + my ($knl, $strings) = @_; + my $string_pattern = '^('.join('|', keys(%$strings)).')$'; + my $flags = 0; + + my @matches = `strings \"$knl\" | grep -E \"$string_pattern\"`; + foreach my $match (@matches) + { + chomp($match); + $flags |= $strings->{$match}; + } + + return $flags; +} + +sub configs_to_flags +{ + my ($knl, $tmp, $configs) = @_; + my $config_pattern = '^('.join('|', keys(%$configs)).')=(.*)$'; + my $cf1 = 'IKCFG_ST\037\213\010'; + my $cf2 = '0123456789'; + my $flags = 0; + + my $pos = `tr "$cf1\n$cf2" "\n$cf2=" < "$knl" | grep -abo "^$cf2"`; + if ($pos) + { + $pos =~ s/:.*[\r\n]*$//s; + $pos += 8; + my $err = (system("tail -c+$pos \"$knl\" | zcat > $tmp 2> /dev/null") >> 8); + if (($err == 0) || ($err == 2)) + { + if (open(my $fh, '<', $tmp)) + { + while (my $line = <$fh>) + { + chomp($line); + if (($line =~ /$config_pattern/) && + (($2 eq 'y') || ($2 eq 'm'))) + { + $flags |= $configs->{$1}; + } + } + + close($fh); + } + } + } + + return $flags; +} + +sub pack_trailer +{ + my ($atoms) = @_; + my $trailer = pack('VV', 0, 0); + for (my $i = $#$atoms; $i>=0; $i--) + { + my $atom = $atoms->[$i]; + $trailer .= pack('a*x!4Va4', $atom->[1], length($atom->[1]), $atom->[0]); + } + return $trailer; +} diff --git a/package/rpi-firmware/rpi-firmware.mk b/package/rpi-firmware/rpi-firmware.mk new file mode 100644 index 0000000000..61d1a7cc2b --- /dev/null +++ b/package/rpi-firmware/rpi-firmware.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# rpi-firmware +# +################################################################################ + +RPI_FIRMWARE_VERSION = 2190ebaaab17d690fb4a6aa767ff7755eaf51b12 +RPI_FIRMWARE_SITE = $(call github,raspberrypi,firmware,$(RPI_FIRMWARE_VERSION)) +RPI_FIRMWARE_LICENSE = BSD-3c +RPI_FIRMWARE_LICENSE_FILES = boot/LICENCE.broadcom +RPI_FIRMWARE_INSTALL_TARGET = NO +RPI_FIRMWARE_INSTALL_IMAGES = YES + +RPI_FIRMWARE_DEPENDENCIES += host-rpi-firmware + +ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y) +define RPI_FIRMWARE_INSTALL_DTB + $(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b.dtb + $(INSTALL) -D -m 0644 $(@D)/boot/bcm2708-rpi-b-plus.dtb $(BINARIES_DIR)/rpi-firmware/bcm2708-rpi-b-plus.dtb + $(INSTALL) -D -m 0644 $(@D)/boot/bcm2709-rpi-2-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2709-rpi-2-b.dtb + $(INSTALL) -D -m 0644 $(@D)/boot/bcm2710-rpi-3-b.dtb $(BINARIES_DIR)/rpi-firmware/bcm2710-rpi-3-b.dtb +endef +endif + +ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTB_OVERLAYS),y) +define RPI_FIRMWARE_INSTALL_DTB_OVERLAYS + for ovldtb in $(@D)/boot/overlays/*.dtbo; do \ + $(INSTALL) -D -m 0644 $${ovldtb} $(BINARIES_DIR)/rpi-firmware/overlays/$${ovldtb##*/} || exit 1; \ + done +endef +endif + +ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_VCDBG),y) +define RPI_FIRMWARE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0700 $(@D)/$(if BR2_ARM_EABIHF,hardfp/)opt/vc/bin/vcdbg \ + $(TARGET_DIR)/usr/sbin/vcdbg +endef +endif # INSTALL_VCDBG + +define RPI_FIRMWARE_INSTALL_IMAGES_CMDS + $(INSTALL) -D -m 0644 $(@D)/boot/bootcode.bin $(BINARIES_DIR)/rpi-firmware/bootcode.bin + $(INSTALL) -D -m 0644 $(@D)/boot/start$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).elf $(BINARIES_DIR)/rpi-firmware/start.elf + $(INSTALL) -D -m 0644 $(@D)/boot/fixup$(BR2_PACKAGE_RPI_FIRMWARE_BOOT).dat $(BINARIES_DIR)/rpi-firmware/fixup.dat + $(INSTALL) -D -m 0644 package/rpi-firmware/config.txt $(BINARIES_DIR)/rpi-firmware/config.txt + $(INSTALL) -D -m 0644 package/rpi-firmware/cmdline.txt $(BINARIES_DIR)/rpi-firmware/cmdline.txt + $(RPI_FIRMWARE_INSTALL_DTB) + $(RPI_FIRMWARE_INSTALL_DTB_OVERLAYS) +endef + +# We have no host sources to get, since we already +# bundle the script we want to install. +HOST_RPI_FIRMWARE_SOURCE = +HOST_RPI_FIRMWARE_DEPENDENCIES = + +define HOST_RPI_FIRMWARE_INSTALL_CMDS + $(INSTALL) -D -m 0755 package/rpi-firmware/mkknlimg $(HOST_DIR)/usr/bin/mkknlimg +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/rpi-userland/0001-Add-.pc-files-for-the-OpenGLESv2-EGL-and-bcm_host-li.patch b/package/rpi-userland/0001-Add-.pc-files-for-the-OpenGLESv2-EGL-and-bcm_host-li.patch new file mode 100644 index 0000000000..fb87337111 --- /dev/null +++ b/package/rpi-userland/0001-Add-.pc-files-for-the-OpenGLESv2-EGL-and-bcm_host-li.patch @@ -0,0 +1,107 @@ +From 4824be8986c2b6ef0b0bd2b32bc99c4ba6406640 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sat, 24 Jan 2015 19:44:14 +0100 +Subject: [PATCH] Add .pc files for the OpenGLESv2, EGL and bcm_host libraries + +Those pkg-config files make it easier for Qt5 to find those libraries +and the appropriate link flags. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: "Yann E. MORIN" + +[Rebased for rpi-userland-a1b89e91f393c7134b4cdc36431f863bb3333163] +Signed-off-by: Peter Seiderer +--- + host_applications/linux/libs/bcm_host/CMakeLists.txt | 4 ++++ + host_applications/linux/libs/bcm_host/bcm_host.pc.in | 10 ++++++++++ + interface/khronos/CMakeLists.txt | 8 ++++++++ + interface/khronos/egl/egl.pc.in | 11 +++++++++++ + interface/khronos/glxx/glesv2.pc.in | 10 ++++++++++ + 5 files changed, 43 insertions(+) + create mode 100644 host_applications/linux/libs/bcm_host/bcm_host.pc.in + create mode 100644 interface/khronos/egl/egl.pc.in + create mode 100644 interface/khronos/glxx/glesv2.pc.in + +diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt +index 1edf50a..1f29ead 100644 +--- a/host_applications/linux/libs/bcm_host/CMakeLists.txt ++++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt +@@ -20,3 +20,7 @@ target_link_libraries(bcm_host vcos vchostif) + + install(TARGETS bcm_host DESTINATION lib) + ++configure_file("${CMAKE_CURRENT_SOURCE_DIR}/bcm_host.pc.in" ++ "${CMAKE_CURRENT_BINARY_DIR}/bcm_host.pc" @ONLY) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/bcm_host.pc" ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") +diff --git a/host_applications/linux/libs/bcm_host/bcm_host.pc.in b/host_applications/linux/libs/bcm_host/bcm_host.pc.in +new file mode 100644 +index 0000000..d40d350 +--- /dev/null ++++ b/host_applications/linux/libs/bcm_host/bcm_host.pc.in +@@ -0,0 +1,10 @@ ++prefix=/usr ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: bcm_host ++Description: Broadcom VideoCore host API library ++Version: 1 ++Libs: -L${libdir} -lbcm_host -lvcos -lvchiq_arm ++Cflags: -I${includedir} -I${includedir}/interface/vmcs_host/linux -I${includedir}/interface/vcos/pthreads -DUSE_VCHIQ_ARM +diff --git a/interface/khronos/CMakeLists.txt b/interface/khronos/CMakeLists.txt +index 4231af4..2844ebd 100644 +--- a/interface/khronos/CMakeLists.txt ++++ b/interface/khronos/CMakeLists.txt +@@ -74,6 +74,14 @@ target_link_libraries(OpenVG EGL) + + install(TARGETS EGL GLESv2 OpenVG WFC khrn_client DESTINATION lib) + install(TARGETS EGL_static GLESv2_static khrn_static DESTINATION lib) ++configure_file("${CMAKE_CURRENT_SOURCE_DIR}/egl/egl.pc.in" ++ "${CMAKE_CURRENT_BINARY_DIR}/egl/egl.pc" @ONLY) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/egl/egl.pc" ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") ++configure_file("${CMAKE_CURRENT_SOURCE_DIR}/glxx/glesv2.pc.in" ++ "${CMAKE_CURRENT_BINARY_DIR}/glxx/glesv2.pc" @ONLY) ++install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glxx/glesv2.pc" ++ DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") + + # recommended names to use to avoid conflicts with mesa libs + add_library(brcmEGL ${SHARED} ${EGL_SOURCE}) +diff --git a/interface/khronos/egl/egl.pc.in b/interface/khronos/egl/egl.pc.in +new file mode 100644 +index 0000000..5868706 +--- /dev/null ++++ b/interface/khronos/egl/egl.pc.in +@@ -0,0 +1,11 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: egl ++Description: RasberryPi implementation of EGL ++Version: 10 ++Libs: -L${libdir} -lEGL -lGLESv2 -lbcm_host -lvchostif ++Cflags: -I${includedir}/ -I${includedir}/interface/vcos/pthreads/ \ ++ -I${includedir}/interface/vmcs_host/linux/ +diff --git a/interface/khronos/glxx/glesv2.pc.in b/interface/khronos/glxx/glesv2.pc.in +new file mode 100644 +index 0000000..2f58eed +--- /dev/null ++++ b/interface/khronos/glxx/glesv2.pc.in +@@ -0,0 +1,10 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} ++libdir=${exec_prefix}/lib ++includedir=${prefix}/include ++ ++Name: glesv2 ++Description: RasberryPi implementation of OpenGL ESv2 ++Version: 2.0 ++Libs: -L${libdir} -lGLESv2 ++Cflags: -I${includedir}/ +-- +2.8.1 + diff --git a/package/rpi-userland/0002-interface-remove-faulty-assert-to-make-weston-happy-.patch b/package/rpi-userland/0002-interface-remove-faulty-assert-to-make-weston-happy-.patch new file mode 100644 index 0000000000..0e9dede5eb --- /dev/null +++ b/package/rpi-userland/0002-interface-remove-faulty-assert-to-make-weston-happy-.patch @@ -0,0 +1,35 @@ +From a126ee5a3235792abb58daffd9d4b3e1012f675b Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Sat, 24 Jan 2015 22:07:19 +0100 +Subject: [PATCH] interface: remove faulty assert() to make weston happy at + runtime + +This was removed after a discussion on IRC with the weston guys +('daniels' on irc.freenode.net/#wayland). + +Upstream status: no, will be pushed by weston guys later. +If not, I'll do it. + +Signed-off-by: "Yann E. MORIN" + +[Rebased for rpi-userland-a1b89e91f393c7134b4cdc36431f863bb3333163] +Signed-off-by: Peter Seiderer +--- + interface/vmcs_host/vc_vchi_dispmanx.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/interface/vmcs_host/vc_vchi_dispmanx.c b/interface/vmcs_host/vc_vchi_dispmanx.c +index 133e86d..0c7873c 100755 +--- a/interface/vmcs_host/vc_vchi_dispmanx.c ++++ b/interface/vmcs_host/vc_vchi_dispmanx.c +@@ -1306,7 +1306,6 @@ static void *dispmanx_notify_func( void *arg ) { + // Decrement the use count - the corresponding "use" is in vc_dispmanx_update_submit. + vchi_service_release(dispmanx_client.notify_handle[0]); + if (dispmanx_client.update_callback ) { +- vcos_assert( dispmanx_client.pending_update_handle == handle); + dispmanx_client.update_callback(handle, dispmanx_client.update_callback_param); + } + } else { +-- +2.8.1 + diff --git a/package/rpi-userland/0003-Disable-Werror-everywhere.patch b/package/rpi-userland/0003-Disable-Werror-everywhere.patch new file mode 100644 index 0000000000..64ae8ed254 --- /dev/null +++ b/package/rpi-userland/0003-Disable-Werror-everywhere.patch @@ -0,0 +1,171 @@ +From 67924a43d52862a7b4c9076d49071449313fea85 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Thu, 22 Sep 2016 22:59:11 +0200 +Subject: [PATCH] Disable Werror everywhere + +With gcc-5.1, some constructs that were previously accepted (but wrong) +are now considered warnings, and thus -Werror makes them errors. + +Ditch -Werror altoghether. + +Signed-off-by: "Yann E. MORIN" + +[Rebased for rpi-userland-a1b89e91f393c7134b4cdc36431f863bb3333163] +Signed-off-by: Peter Seiderer +--- + host_applications/android/apps/vidtex/CMakeLists.txt | 2 +- + host_applications/linux/apps/gencmd/CMakeLists.txt | 2 +- + host_applications/linux/apps/raspicam/CMakeLists.txt | 2 +- + host_applications/linux/apps/smem/CMakeLists.txt | 2 +- + host_applications/linux/libs/bcm_host/CMakeLists.txt | 2 +- + host_applications/linux/libs/sm/CMakeLists.txt | 2 +- + interface/mmal/CMakeLists.txt | 2 +- + interface/vcos/CMakeLists.txt | 2 +- + interface/vcos/pthreads/CMakeLists.txt | 2 +- + interface/vmcs_host/CMakeLists.txt | 2 +- + interface/vmcs_host/linux/vcfiled/CMakeLists.txt | 2 +- + 11 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/host_applications/android/apps/vidtex/CMakeLists.txt b/host_applications/android/apps/vidtex/CMakeLists.txt +index 1f705ef..37d037d 100644 +--- a/host_applications/android/apps/vidtex/CMakeLists.txt ++++ b/host_applications/android/apps/vidtex/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_minimum_required(VERSION 2.8) + +-SET(COMPILE_DEFINITIONS -Werror -Wall) ++SET(COMPILE_DEFINITIONS -Wall) + include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/libs/bcm_host/include) + + set (VIDTEX_SOURCES +diff --git a/host_applications/linux/apps/gencmd/CMakeLists.txt b/host_applications/linux/apps/gencmd/CMakeLists.txt +index f95d1a1..034bf20 100644 +--- a/host_applications/linux/apps/gencmd/CMakeLists.txt ++++ b/host_applications/linux/apps/gencmd/CMakeLists.txt +@@ -4,7 +4,7 @@ if (WIN32) + set(VCOS_PLATFORM win32) + else () + set(VCOS_PLATFORM pthreads) +- add_definitions(-Wall -Werror) ++ add_definitions(-Wall ) + endif () + + include_directories( ../../../.. +diff --git a/host_applications/linux/apps/raspicam/CMakeLists.txt b/host_applications/linux/apps/raspicam/CMakeLists.txt +index 2afc145..04e446f 100644 +--- a/host_applications/linux/apps/raspicam/CMakeLists.txt ++++ b/host_applications/linux/apps/raspicam/CMakeLists.txt +@@ -1,7 +1,7 @@ + + # raspistill/raspivid/raspiyuv + +-SET(COMPILE_DEFINITIONS -Werror) ++SET(COMPILE_DEFINITIONS ) + + include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/libs/bcm_host/include) + include_directories(${PROJECT_SOURCE_DIR}/host_applications/linux/apps/raspicam/) +diff --git a/host_applications/linux/apps/smem/CMakeLists.txt b/host_applications/linux/apps/smem/CMakeLists.txt +index 0fa8328..f0d1e77 100644 +--- a/host_applications/linux/apps/smem/CMakeLists.txt ++++ b/host_applications/linux/apps/smem/CMakeLists.txt +@@ -4,7 +4,7 @@ get_filename_component (VIDEOCORE_ROOT ../../../.. ABSOLUTE) + include (${VIDEOCORE_ROOT}/makefiles/cmake/global_settings.cmake) + + if (NOT WIN32) +- add_definitions(-Wall -Werror) ++ add_definitions(-Wall ) + endif () + + include_directories ( +diff --git a/host_applications/linux/libs/bcm_host/CMakeLists.txt b/host_applications/linux/libs/bcm_host/CMakeLists.txt +index 1f29ead..fb78cea 100644 +--- a/host_applications/linux/libs/bcm_host/CMakeLists.txt ++++ b/host_applications/linux/libs/bcm_host/CMakeLists.txt +@@ -3,7 +3,7 @@ if (WIN32) + set(VCOS_PLATFORM win32) + else () + set(VCOS_PLATFORM pthreads) +- add_definitions(-Wall -Werror) ++ add_definitions(-Wall ) + endif () + + include_directories( ../../../.. +diff --git a/host_applications/linux/libs/sm/CMakeLists.txt b/host_applications/linux/libs/sm/CMakeLists.txt +index c6bf764..4bca0b0 100644 +--- a/host_applications/linux/libs/sm/CMakeLists.txt ++++ b/host_applications/linux/libs/sm/CMakeLists.txt +@@ -3,7 +3,7 @@ if (WIN32) + set(VCOS_PLATFORM win32) + else () + set(VCOS_PLATFORM pthreads) +- add_definitions(-Wall -Werror) ++ add_definitions(-Wall ) + endif () + + include_directories( ../../../.. +diff --git a/interface/mmal/CMakeLists.txt b/interface/mmal/CMakeLists.txt +index 37ae757..78b24a9 100644 +--- a/interface/mmal/CMakeLists.txt ++++ b/interface/mmal/CMakeLists.txt +@@ -3,7 +3,7 @@ if (NOT DEFINED LIBRARY_TYPE) + set(LIBRARY_TYPE SHARED) + endif (NOT DEFINED LIBRARY_TYPE) + +-add_definitions(-Wall -Werror) ++add_definitions(-Wall ) + + add_library(mmal SHARED util/mmal_util.c) + +diff --git a/interface/vcos/CMakeLists.txt b/interface/vcos/CMakeLists.txt +index 23a8d72..988b104 100644 +--- a/interface/vcos/CMakeLists.txt ++++ b/interface/vcos/CMakeLists.txt +@@ -43,7 +43,7 @@ foreach (header ${HEADERS}) + endforeach () + + if (CMAKE_COMPILER_IS_GNUCC) +- add_definitions (-ggdb -Werror -Wall) ++ add_definitions (-ggdb -Wall) + endif () + + if (CMAKE_COMPILER_2005) +diff --git a/interface/vcos/pthreads/CMakeLists.txt b/interface/vcos/pthreads/CMakeLists.txt +index 1d81ca3..b35cd8e 100644 +--- a/interface/vcos/pthreads/CMakeLists.txt ++++ b/interface/vcos/pthreads/CMakeLists.txt +@@ -1,7 +1,7 @@ + # MSVC5 does not fully support C99, enabling declaration-after-statement + # warnings allows a common MSVC5 build error to be detected in Linux builds. + if (CMAKE_COMPILER_IS_GNUCC) +- set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wdeclaration-after-statement") ++ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wdeclaration-after-statement") + add_definitions (-D_GNU_SOURCE) + endif () + +diff --git a/interface/vmcs_host/CMakeLists.txt b/interface/vmcs_host/CMakeLists.txt +index 0b3adc9..c5156d8 100755 +--- a/interface/vmcs_host/CMakeLists.txt ++++ b/interface/vmcs_host/CMakeLists.txt +@@ -2,7 +2,7 @@ + # interface/vmcs_host + + # not working in release build +-# add_definitions(-Werror) ++# add_definitions() + + # vc_vchi_gencmd.c has a type-punning problem in vc_gencmd_read_response + add_definitions(-fno-strict-aliasing) +diff --git a/interface/vmcs_host/linux/vcfiled/CMakeLists.txt b/interface/vmcs_host/linux/vcfiled/CMakeLists.txt +index aed0e83..d834b3f 100644 +--- a/interface/vmcs_host/linux/vcfiled/CMakeLists.txt ++++ b/interface/vmcs_host/linux/vcfiled/CMakeLists.txt +@@ -1,5 +1,5 @@ + +-add_definitions(-Werror) ++add_definitions() + + # vcfiled - serves files to videocore. used for media handlers from + # OpenMAX/IL and loading VLLs. +-- +2.8.1 + diff --git a/package/rpi-userland/0004-host-applications-disable-missing-applications.patch b/package/rpi-userland/0004-host-applications-disable-missing-applications.patch new file mode 100644 index 0000000000..08039123a4 --- /dev/null +++ b/package/rpi-userland/0004-host-applications-disable-missing-applications.patch @@ -0,0 +1,34 @@ +From c8d2c332da2a03ed80d62628bbf54187a66f49b6 Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Fri, 24 Jul 2015 20:20:33 +0200 +Subject: [PATCH] host-applications: disable missing applications + +Those applications are missing from the public rpi-firmware package, so +do not even try to build them. + +Signed-off-by: "Yann E. MORIN" + +[Rebased for rpi-userland-a1b89e91f393c7134b4cdc36431f863bb3333163] +Signed-off-by: Peter Seiderer +--- + host_applications/linux/CMakeLists.txt | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/host_applications/linux/CMakeLists.txt b/host_applications/linux/CMakeLists.txt +index 5a648e7..83bb66e 100644 +--- a/host_applications/linux/CMakeLists.txt ++++ b/host_applications/linux/CMakeLists.txt +@@ -12,10 +12,7 @@ add_subdirectory(apps/dtoverlay) + add_subdirectory(apps/dtmerge) + + if(ALL_APPS) +- add_subdirectory(apps/vcdbg) +- add_subdirectory(libs/elftoolchain) + # add_subdirectory(apps/smct) +- add_subdirectory(apps/edid_parser) + add_subdirectory(apps/hello_pi) + endif() + +-- +2.8.1 + diff --git a/package/rpi-userland/0005-dtmerge-add-missing-include-for-va_list.patch b/package/rpi-userland/0005-dtmerge-add-missing-include-for-va_list.patch new file mode 100644 index 0000000000..f028f67bdc --- /dev/null +++ b/package/rpi-userland/0005-dtmerge-add-missing-include-for-va_list.patch @@ -0,0 +1,34 @@ +From 1ffed0e8601afb7e65545bd545772edd0fccc404 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Sat, 23 Apr 2016 17:48:13 +0200 +Subject: [PATCH] dtmerge: add missing include for va_list +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes compile error with uclibc-1.0.14: + + In file included from rpi-userland-52eca998aa43f278314579dba4798a3fe1da46c3/host_applications/linux/apps/dtmerge/dtmerge.c:32:0: + rpi-userland-52eca998aa43f278314579dba4798a3fe1da46c3/helpers/dtoverlay/dtoverlay.h:65:54: error: unknown type name ‘va_list’ + const char *fmt, va_list args); + +Signed-off-by: Peter Seiderer +--- + host_applications/linux/apps/dtmerge/dtmerge.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/host_applications/linux/apps/dtmerge/dtmerge.c b/host_applications/linux/apps/dtmerge/dtmerge.c +index 9243da1..2ac8d39 100644 +--- a/host_applications/linux/apps/dtmerge/dtmerge.c ++++ b/host_applications/linux/apps/dtmerge/dtmerge.c +@@ -28,6 +28,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + #include + #include ++#include + + #include "dtoverlay.h" + +-- +2.8.1 + diff --git a/package/rpi-userland/Config.in b/package/rpi-userland/Config.in new file mode 100644 index 0000000000..9bb2bfc570 --- /dev/null +++ b/package/rpi-userland/Config.in @@ -0,0 +1,51 @@ +config BR2_PACKAGE_RPI_USERLAND + bool "rpi-userland" + depends on BR2_arm + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + select BR2_PACKAGE_HAS_LIBOPENVG + select BR2_PACKAGE_HAS_LIBOPENMAX + help + Raspberry Pi Userland contains the necessary library to use the + VideoCore driver. + + Includes source for the ARM side code to interface to: + EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG. + + https://github.com/raspberrypi/userland/ + +if BR2_PACKAGE_RPI_USERLAND + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "rpi-userland" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "rpi-userland" + +config BR2_PACKAGE_PROVIDES_LIBOPENVG + default "rpi-userland" + +config BR2_PACKAGE_PROVIDES_LIBOPENMAX + default "rpi-userland" + +config BR2_PACKAGE_RPI_USERLAND_START_VCFILED + bool "Start vcfiled" + depends on BR2_INIT_SYSV || BR2_INIT_BUSYBOX + help + vcfiled is a daemon serving files to VideoCore from the host file + system. + +config BR2_PACKAGE_RPI_USERLAND_HELLO + bool "hello_pi examples" + help + Install the hello-pi examples to test the HW (GPU, camera...) + +endif + +comment "rpi-userland needs a toolchain w/ C++, threads, dynamic library" + depends on BR2_arm + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/rpi-userland/S94vcfiled b/package/rpi-userland/S94vcfiled new file mode 100755 index 0000000000..a70e0ae67d --- /dev/null +++ b/package/rpi-userland/S94vcfiled @@ -0,0 +1,47 @@ +#!/bin/sh + +NAME=vcfiled +DESC="VideoCore file server daemon $NAME" +DAEMON="/usr/sbin/$NAME" +DAEMON_ARGS="" +CFGFILE="/etc/default/$NAME" +PIDFILE="/var/run/$NAME.pid" + +# Read configuration variable file if it is present +[ -r "$CFGFILE" ] && . "$CFGFILE" + +start() +{ + echo -n "Starting $DESC: " + start-stop-daemon -S -q -p "$PIDFILE" -x "$DAEMON" -- $DAEMON_ARGS && + echo "done" || echo "failed" +} + +stop() +{ + echo -n "Stopping $DESC: " + if start-stop-daemon -K -q -R TERM/30/KILL/5 -p "$PIDFILE" -n "$NAME"; then + # This daemon does not remove its PID file when it exits. + rm -f "$PIDFILE" + echo "done" + else + echo "failed" + fi +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" >&2 + exit 1 + ;; +esac diff --git a/package/rpi-userland/rpi-userland.mk b/package/rpi-userland/rpi-userland.mk new file mode 100644 index 0000000000..30ea69e8c0 --- /dev/null +++ b/package/rpi-userland/rpi-userland.mk @@ -0,0 +1,63 @@ +################################################################################ +# +# rpi-userland +# +################################################################################ + +RPI_USERLAND_VERSION = 338428cf852c658e39987c06b845cb6332394109 +RPI_USERLAND_SITE = $(call github,raspberrypi,userland,$(RPI_USERLAND_VERSION)) +RPI_USERLAND_LICENSE = BSD-3c +RPI_USERLAND_LICENSE_FILES = LICENCE +RPI_USERLAND_INSTALL_STAGING = YES +RPI_USERLAND_CONF_OPTS = -DVMCS_INSTALL_PREFIX=/usr \ + -DCMAKE_C_FLAGS="-DVCFILED_LOCKFILE=\\\"/var/run/vcfiled.pid\\\"" + +RPI_USERLAND_PROVIDES = libegl libgles libopenmax libopenvg + +ifeq ($(BR2_PACKAGE_RPI_USERLAND_START_VCFILED),y) +define RPI_USERLAND_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/rpi-userland/S94vcfiled \ + $(TARGET_DIR)/etc/init.d/S94vcfiled +endef +define RPI_USERLAND_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/rpi-userland/vcfiled.service \ + $(TARGET_DIR)/usr/lib/systemd/system/vcfiled.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/vcfiled.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/vcfiled.service +endef +endif + +ifeq ($(BR2_PACKAGE_RPI_USERLAND_HELLO),y) + +RPI_USERLAND_CONF_OPTS += -DALL_APPS=ON + +define RPI_USERLAND_EXTRA_LIBS_TARGET + $(INSTALL) -m 0644 -D \ + $(@D)/build/lib/libilclient.so \ + $(TARGET_DIR)/usr/lib/libilclient.so +endef +RPI_USERLAND_POST_INSTALL_TARGET_HOOKS += RPI_USERLAND_EXTRA_LIBS_TARGET + +define RPI_USERLAND_EXTRA_LIBS_STAGING + $(INSTALL) -m 0644 -D \ + $(@D)/build/lib/libilclient.so \ + $(STAGING_DIR)/usr/lib/libilclient.so +endef +RPI_USERLAND_POST_INSTALL_STAGING_HOOKS += RPI_USERLAND_EXTRA_LIBS_STAGING + +else + +RPI_USERLAND_CONF_OPTS += -DALL_APPS=OFF + +endif # BR2_PACKAGE_RPI_USERLAND_HELLO + +define RPI_USERLAND_POST_TARGET_CLEANUP + rm -f $(TARGET_DIR)/etc/init.d/vcfiled + rm -f $(TARGET_DIR)/usr/share/install/vcfiled + rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/share/install + rm -Rf $(TARGET_DIR)/usr/src +endef +RPI_USERLAND_POST_INSTALL_TARGET_HOOKS += RPI_USERLAND_POST_TARGET_CLEANUP + +$(eval $(cmake-package)) diff --git a/package/rpi-userland/vcfiled.service b/package/rpi-userland/vcfiled.service new file mode 100644 index 0000000000..b09aa62774 --- /dev/null +++ b/package/rpi-userland/vcfiled.service @@ -0,0 +1,9 @@ +[Unit] +Description=VideoCore file server daemon + +[Service] +ExecStart=/usr/sbin/vcfiled --foreground +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/rpm/0002-depends-fix.patch b/package/rpm/0002-depends-fix.patch new file mode 100644 index 0000000000..4a92775763 --- /dev/null +++ b/package/rpm/0002-depends-fix.patch @@ -0,0 +1,19 @@ +Bugfix included upstream + +diff -u --new-file --recursive rpm-5.2.0_vanilla/lib/depends.c rpm-5.2.0_depends-fix/lib/depends.c +--- rpm-5.2.0_vanilla/lib/depends.c 2009-05-23 01:23:46.000000000 +0000 ++++ rpm-5.2.0_depends-fix/lib/depends.c 2009-09-22 06:33:37.950783501 +0000 +@@ -2371,11 +2371,11 @@ + + memset(selected, 0, sizeof(*selected) * ts->orderCount); + +- if ((requires = rpmteDS(p, RPMTAG_REQUIRENAME)) != NULL) { +- + /* Avoid narcisstic relations. */ + selected[rpmtsiOc(pi)] = 1; + ++ if ((requires = rpmteDS(p, RPMTAG_REQUIRENAME)) != NULL) { ++ + /* T2. Next "q <- p" relation. */ + + /* First, do pre-requisites. */ diff --git a/package/rpm/0003-exclude-some-tools.patch b/package/rpm/0003-exclude-some-tools.patch new file mode 100644 index 0000000000..2cbc7cbf6a --- /dev/null +++ b/package/rpm/0003-exclude-some-tools.patch @@ -0,0 +1,30 @@ +diff -ru rpm-5.2.0_vanilla/tools/Makefile.am rpm-5.2.0_exclude-some-tools/tools/Makefile.am +--- rpm-5.2.0_vanilla/tools/Makefile.am 2009-06-03 01:24:42.000000000 +0000 ++++ rpm-5.2.0_exclude-some-tools/tools/Makefile.am 2009-12-20 07:47:13.000000000 +0000 +@@ -45,9 +45,7 @@ + bin_PROGRAMS = rpm2cpio + + pkgbindir = @USRLIBRPM@/bin +-pkgbin_PROGRAMS = \ +- rpmcache rpmdigest grep mtree rpmrepo rpmspecdump wget \ +- rpmcmp rpmdeps @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ ++pkgbin_PROGRAMS = + dist_man_MANS = rpmgrep.1 + + debugedit_SOURCES = debugedit.c hashtab.c +diff -ru rpm-5.2.0_vanilla/tools/Makefile.in rpm-5.2.0_exclude-some-tools/tools/Makefile.in +--- rpm-5.2.0_vanilla/tools/Makefile.in 2009-07-07 21:14:06.000000000 +0000 ++++ rpm-5.2.0_exclude-some-tools/tools/Makefile.in 2009-12-20 07:47:37.000000000 +0000 +@@ -39,11 +39,7 @@ + target_triplet = @target@ + EXTRA_PROGRAMS = rpmkey$(EXEEXT) debugedit$(EXEEXT) + bin_PROGRAMS = rpm2cpio$(EXEEXT) +-pkgbin_PROGRAMS = rpmcache$(EXEEXT) rpmdigest$(EXEEXT) grep$(EXEEXT) \ +- mtree$(EXEEXT) rpmrepo$(EXEEXT) rpmspecdump$(EXEEXT) \ +- wget$(EXEEXT) rpmcmp$(EXEEXT) rpmdeps$(EXEEXT) \ +- @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@ $(am__EXEEXT_1) \ +- $(am__EXEEXT_2) ++pkgbin_PROGRAMS = + @WITH_XAR_TRUE@am__append_1 = txar + @WITH_DB_INTERNAL_TRUE@@WITH_DB_TOOLS_INTEGRATED_TRUE@am__append_2 = db_tool + @WITH_DB_INTERNAL_TRUE@@WITH_DB_RPC_TRUE@@WITH_DB_TOOLS_INTEGRATED_TRUE@am__append_3 = \ diff --git a/package/rpm/0004-ignore-shared-mutexes.patch b/package/rpm/0004-ignore-shared-mutexes.patch new file mode 100644 index 0000000000..f19d6b6f32 --- /dev/null +++ b/package/rpm/0004-ignore-shared-mutexes.patch @@ -0,0 +1,12 @@ +diff -ru rpm-5.2.0_vanilla/db/env/env_open.c rpm-5.2.0_test/db/env/env_open.c +--- rpm-5.2.0_vanilla/db/env/env_open.c 2008-05-28 01:23:27.000000000 +0000 ++++ rpm-5.2.0_test/db/env/env_open.c 2009-12-24 14:54:55.000000000 +0000 +@@ -124,7 +124,7 @@ + } + } + +-#ifdef HAVE_MUTEX_THREAD_ONLY ++#ifdef NK_HAVE_MUTEX_THREAD_ONLY + /* + * Currently we support one kind of mutex that is intra-process only, + * POSIX 1003.1 pthreads, because a variety of systems don't support diff --git a/package/rpm/0005-no-parentdirs.patch b/package/rpm/0005-no-parentdirs.patch new file mode 100644 index 0000000000..d05c99ad61 --- /dev/null +++ b/package/rpm/0005-no-parentdirs.patch @@ -0,0 +1,14 @@ +Reduce parentdirs we use, parentdirs are used for ordering +Included upstream +diff -u --new-file --recursive rpm-5.1.9_vanilla/lib/depends.c rpm-5.1.9_no-parentdirs/lib/depends.c +--- rpm-5.1.9_vanilla/lib/depends.c 2009-04-12 19:46:17.000000000 +0000 ++++ rpm-5.1.9_no-parentdirs/lib/depends.c 2009-06-13 15:21:43.504999639 +0000 +@@ -2257,7 +2257,7 @@ + #define isAuto(_x) ((_x) & _autobits) + + /*@unchecked@*/ +-static int slashDepth = 100; /* #slashes pemitted in parentdir deps. */ ++static int slashDepth = 2; /* #slashes pemitted in parentdir deps. */ + + static int countSlashes(const char * dn) + /*@*/ diff --git a/package/rpm/0006-ordering-fix.patch b/package/rpm/0006-ordering-fix.patch new file mode 100644 index 0000000000..a618e1f2c9 --- /dev/null +++ b/package/rpm/0006-ordering-fix.patch @@ -0,0 +1,45 @@ +Included upstream +--- x/lib/depends.c 2009/05/15 13:40:58 1.445 ++++ y/lib/depends.c 2009/08/22 22:12:02 1.446 +@@ -2216,9 +2216,6 @@ + { + rpmte q, qprev; + +- /* Mark the package as queued. */ +- rpmteTSI(p)->tsi_queued = 1; +- + if ((*rp) == NULL) { /* 1st element */ + /*@-dependenttrans@*/ /* FIX: double indirection */ + (*rp) = (*qp) = p; +@@ -2238,6 +2235,12 @@ + /* XXX Insure removed after added. */ + if (rpmteType(p) == TR_REMOVED && rpmteType(p) != rpmteType(q)) + continue; ++ ++ /* XXX Follow all previous generations in the queue. */ ++ if (rpmteTSI(p)->tsi_queued > rpmteTSI(q)->tsi_queued) ++ continue; ++ ++ /* XXX Within a generation, queue behind more "important". */ + if (rpmteTSI(q)->tsi_qcnt <= rpmteTSI(p)->tsi_qcnt) + break; + } +@@ -2521,6 +2524,9 @@ + + if (rpmteTSI(p)->tsi_count != 0) + continue; ++ ++ /* Mark the package as queued. */ ++ rpmteTSI(p)->tsi_queued = orderingCount + 1; + rpmteTSI(p)->tsi_suc = NULL; + addQ(p, &q, &r, prefcolor); + qlen++; +@@ -2584,6 +2590,8 @@ + (void) rpmteSetParent(p, q); + (void) rpmteSetDegree(q, rpmteDegree(q)+1); + ++ /* Mark the package as queued. */ ++ rpmteTSI(p)->tsi_queued = orderingCount + 1; + /* XXX TODO: add control bit. */ + rpmteTSI(p)->tsi_suc = NULL; + /*@-nullstate@*/ /* XXX FIX: rpmteTSI(q)->tsi_suc can be NULL. */ diff --git a/package/rpm/0007-parentdir-vs-requires.patch b/package/rpm/0007-parentdir-vs-requires.patch new file mode 100644 index 0000000000..309ab254e0 --- /dev/null +++ b/package/rpm/0007-parentdir-vs-requires.patch @@ -0,0 +1,37 @@ +Avoid looking up files or directories that this package provides +Included upstream +diff -u --new-file --recursive rpm-5.2.0_vanilla/lib/depends.c rpm-5.2.0_parentdir-vs-requires/lib/depends.c +--- rpm-5.2.0_vanilla/lib/depends.c 2009-05-23 01:23:46.000000000 +0000 ++++ rpm-5.2.0_parentdir-vs-requires/lib/depends.c 2009-09-22 17:00:24.880956271 +0000 +@@ -2095,6 +2095,7 @@ + rpmtsi qi; rpmte q; + tsortInfo tsi; + nsType NSType = rpmdsNSType(requires); ++ const char * N = rpmdsN(requires); + fnpyKey key; + int teType = rpmteType(p); + alKey pkgKey; +@@ -2128,6 +2129,23 @@ + break; + } + ++ /* Avoid looking up files/directories that are "owned" by _THIS_ package. */ ++ if (*N == '/') { ++ rpmfi fi = rpmteFI(p, RPMTAG_BASENAMES); ++ int bingo = 0; ++ ++ fi = rpmfiInit(fi, 0); ++ while (rpmfiNext(fi) >= 0) { ++ const char * fn = rpmfiFN(fi); ++ if (strcmp(N, fn)) ++ continue; ++ bingo = 1; ++ break; ++ } ++ if (bingo) ++ return 0; ++ } ++ + pkgKey = RPMAL_NOMATCH; + key = rpmalSatisfiesDepend(al, requires, &pkgKey); + diff --git a/package/rpm/0008-short-circuit-c99.patch b/package/rpm/0008-short-circuit-c99.patch new file mode 100644 index 0000000000..5d7b53a25d --- /dev/null +++ b/package/rpm/0008-short-circuit-c99.patch @@ -0,0 +1,235 @@ +Buildroot specific +diff -ru rpm-5.1.9_vanilla/xz/configure rpm-5.1.9_short-circuit-c99/xz/configure +--- rpm-5.1.9_vanilla/xz/configure 2009-04-18 16:47:23.000000000 +0000 ++++ rpm-5.1.9_short-circuit-c99/xz/configure 2009-08-04 08:25:59.000000000 +0000 +@@ -4970,214 +4970,7 @@ + am__fastdepCC_FALSE= + fi + +- +- { $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C99" >&5 +-$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } +-if test "${ac_cv_prog_cc_c99+set}" = set; then +- $as_echo_n "(cached) " >&6 +-else +- ac_cv_prog_cc_c99=no +-ac_save_CC=$CC +-cat >conftest.$ac_ext <<_ACEOF +-/* confdefs.h. */ +-_ACEOF +-cat confdefs.h >>conftest.$ac_ext +-cat >>conftest.$ac_ext <<_ACEOF +-/* end confdefs.h. */ +-#include +-#include +-#include +-#include +-#include +- +-// Check varargs macros. These examples are taken from C99 6.10.3.5. +-#define debug(...) fprintf (stderr, __VA_ARGS__) +-#define showlist(...) puts (#__VA_ARGS__) +-#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) +-static void +-test_varargs_macros (void) +-{ +- int x = 1234; +- int y = 5678; +- debug ("Flag"); +- debug ("X = %d\n", x); +- showlist (The first, second, and third items.); +- report (x>y, "x is %d but y is %d", x, y); +-} +- +-// Check long long types. +-#define BIG64 18446744073709551615ull +-#define BIG32 4294967295ul +-#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) +-#if !BIG_OK +- your preprocessor is broken; +-#endif +-#if BIG_OK +-#else +- your preprocessor is broken; +-#endif +-static long long int bignum = -9223372036854775807LL; +-static unsigned long long int ubignum = BIG64; +- +-struct incomplete_array +-{ +- int datasize; +- double data[]; +-}; +- +-struct named_init { +- int number; +- const wchar_t *name; +- double average; +-}; +- +-typedef const char *ccp; +- +-static inline int +-test_restrict (ccp restrict text) +-{ +- // See if C++-style comments work. +- // Iterate through items via the restricted pointer. +- // Also check for declarations in for loops. +- for (unsigned int i = 0; *(text+i) != '\0'; ++i) +- continue; +- return 0; +-} +- +-// Check varargs and va_copy. +-static void +-test_varargs (const char *format, ...) +-{ +- va_list args; +- va_start (args, format); +- va_list args_copy; +- va_copy (args_copy, args); +- +- const char *str; +- int number; +- float fnumber; +- +- while (*format) +- { +- switch (*format++) +- { +- case 's': // string +- str = va_arg (args_copy, const char *); +- break; +- case 'd': // int +- number = va_arg (args_copy, int); +- break; +- case 'f': // float +- fnumber = va_arg (args_copy, double); +- break; +- default: +- break; +- } +- } +- va_end (args_copy); +- va_end (args); +-} +- +-int +-main () +-{ +- +- // Check bool. +- _Bool success = false; +- +- // Check restrict. +- if (test_restrict ("String literal") == 0) +- success = true; +- char *restrict newvar = "Another string"; +- +- // Check varargs. +- test_varargs ("s, d' f .", "string", 65, 34.234); +- test_varargs_macros (); +- +- // Check flexible array members. +- struct incomplete_array *ia = +- malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); +- ia->datasize = 10; +- for (int i = 0; i < ia->datasize; ++i) +- ia->data[i] = i * 1.234; +- +- // Check named initializers. +- struct named_init ni = { +- .number = 34, +- .name = L"Test wide string", +- .average = 543.34343, +- }; +- +- ni.number = 58; +- +- int dynamic_array[ni.number]; +- dynamic_array[ni.number - 1] = 543; +- +- // work around unused variable warnings +- return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' +- || dynamic_array[ni.number - 1] != 543); +- +- ; +- return 0; +-} +-_ACEOF +-for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 +-do +- CC="$ac_save_CC $ac_arg" +- rm -f conftest.$ac_objext +-if { (ac_try="$ac_compile" +-case "(($ac_try" in +- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; +- *) ac_try_echo=$ac_try;; +-esac +-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +-$as_echo "$ac_try_echo") >&5 +- (eval "$ac_compile") 2>conftest.er1 +- ac_status=$? +- grep -v '^ *+' conftest.er1 >conftest.err +- rm -f conftest.er1 +- cat conftest.err >&5 +- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 +- (exit $ac_status); } && { +- test -z "$ac_c_werror_flag" || +- test ! -s conftest.err +- } && test -s conftest.$ac_objext; then +- ac_cv_prog_cc_c99=$ac_arg +-else +- $as_echo "$as_me: failed program was:" >&5 +-sed 's/^/| /' conftest.$ac_ext >&5 +- +- +-fi +- +-rm -f core conftest.err conftest.$ac_objext +- test "x$ac_cv_prog_cc_c99" != "xno" && break +-done +-rm -f conftest.$ac_ext +-CC=$ac_save_CC +- +-fi +-# AC_CACHE_VAL +-case "x$ac_cv_prog_cc_c99" in +- x) +- { $as_echo "$as_me:$LINENO: result: none needed" >&5 +-$as_echo "none needed" >&6; } ;; +- xno) +- { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +-$as_echo "unsupported" >&6; } ;; +- *) +- CC="$CC $ac_cv_prog_cc_c99" +- { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c99" >&5 +-$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; +-esac +- +- +- +-if test x$ac_cv_prog_cc_c99 = xno ; then +- { { $as_echo "$as_me:$LINENO: error: No C99 compiler was found." >&5 +-$as_echo "$as_me: error: No C99 compiler was found." >&2;} +- { (exit 1); exit 1; }; } +-fi ++CC="$CC -std=c99" + + if test "x$CC" != xcc; then + { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 +diff -ru rpm-5.1.9_vanilla/xz/configure.ac rpm-5.1.9_short-circuit-c99/xz/configure.ac +--- rpm-5.1.9_vanilla/xz/configure.ac 2009-02-16 17:07:46.000000000 +0000 ++++ rpm-5.1.9_short-circuit-c99/xz/configure.ac 2009-08-04 08:25:28.000000000 +0000 +@@ -402,10 +402,7 @@ + AM_INIT_AUTOMAKE([1.10 foreign tar-v7 filename-length-max=99]) + AC_PROG_LN_S + +-AC_PROG_CC_C99 +-if test x$ac_cv_prog_cc_c99 = xno ; then +- AC_MSG_ERROR([No C99 compiler was found.]) +-fi ++CC="$CC -std=c99" + + AM_PROG_CC_C_O + AM_PROG_AS diff --git a/package/rpm/Config.in b/package/rpm/Config.in new file mode 100644 index 0000000000..ad8279ef28 --- /dev/null +++ b/package/rpm/Config.in @@ -0,0 +1,26 @@ +comment "rpm needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + +comment "rpm needs a toolchain w/ gcc >= 5" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5 && BR2_sh + +config BR2_PACKAGE_RPM + bool "rpm" + # triggers internal compiler error + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 || !BR2_sh + depends on BR2_TOOLCHAIN_HAS_THREADS # beecrypt + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_BEECRYPT + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_NEON + select BR2_PACKAGE_NEON_SSL + select BR2_PACKAGE_NEON_XML + select BR2_PACKAGE_NEON_ZLIB + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_POPT + select BR2_PACKAGE_ZLIB + help + The RPM package management system. + + http://rpm5.org diff --git a/package/rpm/rpm.hash b/package/rpm/rpm.hash new file mode 100644 index 0000000000..06657464ee --- /dev/null +++ b/package/rpm/rpm.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 34a959c0ed670cadcdc52c6025e822fac6f5d1015e3b75123f53ebe53b923e98 rpm-5.2.0.tar.gz diff --git a/package/rpm/rpm.mk b/package/rpm/rpm.mk new file mode 100644 index 0000000000..7f346b213a --- /dev/null +++ b/package/rpm/rpm.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# rpm +# +################################################################################ + +RPM_VERSION_MAJOR = 5.2 +RPM_VERSION = $(RPM_VERSION_MAJOR).0 +RPM_SITE = http://rpm5.org/files/rpm/rpm-$(RPM_VERSION_MAJOR) +RPM_DEPENDENCIES = host-pkgconf zlib beecrypt neon popt openssl +RPM_LICENSE = LGPLv2.1 +RPM_LICENSE_FILES = COPYING.LIB + +RPM_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/beecrypt -I$(STAGING_DIR)/usr/include/neon -DHAVE_MUTEX_THREAD_ONLY" \ + ac_cv_va_copy=yes + +RPM_CONF_OPTS = \ + --disable-build-versionscript \ + --disable-rpath \ + --without-selinux \ + --without-python \ + --without-perl \ + --with-openssl=external \ + --with-zlib=external \ + --with-libbeecrypt=$(STAGING_DIR) \ + --with-popt=external + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +RPM_DEPENDENCIES += gettext +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +RPM_DEPENDENCIES += pcre +RPM_CONF_OPTS += --with-pcre=external +else +RPM_CONF_OPTS += --with-pcre=none +endif + +ifeq ($(BR2_PACKAGE_FILE),y) +RPM_DEPENDENCIES += file +RPM_CONF_OPTS += --with-file=external +else +RPM_CONF_OPTS += --with-file=none +endif + +# xz payload support needs a toolchain w/ C++ +ifeq ($(BR2_PACKAGE_XZ)$(BR2_INSTALL_LIBSTDCPP),yy) +RPM_DEPENDENCIES += xz +RPM_CONF_OPTS += --with-xz=external +else +RPM_CONF_OPTS += --with-xz=none +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +RPM_CONF_OPTS += --with-bzip2 +RPM_DEPENDENCIES += bzip2 +endif + +RPM_MAKE = $(MAKE1) + +RPM_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) program_transform_name= install + +$(eval $(autotools-package)) diff --git a/package/rrdtool/0001-Add-configure-option-to-disable-documentation.patch b/package/rrdtool/0001-Add-configure-option-to-disable-documentation.patch new file mode 100644 index 0000000000..afb62927de --- /dev/null +++ b/package/rrdtool/0001-Add-configure-option-to-disable-documentation.patch @@ -0,0 +1,71 @@ +From deaef0790f3cbbce826275d3564551fc9568b628 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Wed, 2 Dec 2015 14:31:52 -0300 +Subject: [PATCH] Add configure option to disable documentation + +Signed-off-by: Gustavo Zacarias +--- + Makefile.am | 6 +++++- + configure.ac | 8 ++++++++ + 2 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index f45975c..1f46a9b 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -5,7 +5,11 @@ RSYNC = rsync --rsh=ssh + + # build the following subdirectories + +-SUBDIRS = po src doc bindings tests ++SUBDIRS = po src bindings tests ++ ++if BUILD_DOCS ++SUBDIRS += doc ++endif + + if BUILD_EXAMPLES + SUBDIRS += examples +diff --git a/configure.ac b/configure.ac +index dc70e7d..7460c67 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -100,6 +100,9 @@ AC_ARG_VAR(RRDGRAPH_YLEGEND_ANGLE, + AC_DEFINE_UNQUOTED(RRDGRAPH_YLEGEND_ANGLE,${RRDGRAPH_YLEGEND_ANGLE:-90.0}, + [Vertical label angle: -90.0 (default) or 90.0]) + ++AC_ARG_ENABLE(docs,AS_HELP_STRING([--disable-docs],[disable building documentation]), ++[],[enable_docs=yes]) ++ + AC_ARG_ENABLE(examples,AS_HELP_STRING([--disable-examples],[disable building of examples]), + [],[enable_examples=yes]) + +@@ -115,6 +118,7 @@ AC_ARG_ENABLE(rrd_graph,AS_HELP_STRING([--disable-rrd_graph],[disable all rrd_gr + AC_ARG_ENABLE(rrd_restore,AS_HELP_STRING([--disable-rrd_restore],[disable rrd_restore XML import functions]), + [],[enable_rrd_restore=yes]) + ++AM_CONDITIONAL(BUILD_DOCS,[test $enable_docs != no]) + AM_CONDITIONAL(BUILD_EXAMPLES,[test $enable_examples != no]) + AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no]) + AM_CONDITIONAL(BUILD_RRDCACHED,[test $enable_rrdcached != no]) +@@ -945,6 +949,8 @@ fi + + AC_SUBST(COMP_PYTHON) + ++if test $enable_docs != no; then ++ + dnl Check for nroff + AC_ARG_VAR(NROFF, [path to the local nroff version]) + AC_PATH_PROGS(NROFF, [gnroff nroff]) +@@ -961,6 +967,8 @@ AC_ARG_VAR(RRDDOCDIR, [[DATADIR/doc/PACKAGE-VERSION] Documentation directory]) + if test -z "$RRDDOCDIR"; then + RRDDOCDIR='${datadir}/doc/${PACKAGE}-${VERSION}'; fi + ++fi ++ + # systemd check + PKG_PROG_PKG_CONFIG + AC_ARG_WITH([systemdsystemunitdir], +-- +2.4.10 + diff --git a/package/rrdtool/Config.in b/package/rrdtool/Config.in new file mode 100644 index 0000000000..631ed32847 --- /dev/null +++ b/package/rrdtool/Config.in @@ -0,0 +1,37 @@ +config BR2_PACKAGE_RRDTOOL + bool "rrdtool" + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + select BR2_PACKAGE_LIBGLIB2 + help + RRDtool is the OpenSource industry standard, high performance + data logging and graphing system for time series data. + + http://oss.oetiker.ch/rrdtool/ + +if BR2_PACKAGE_RRDTOOL + +config BR2_PACKAGE_RRDTOOL_RRDGRAPH + bool "rrd_graph" + default y + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango -> harfbuzz + depends on BR2_INSTALL_LIBSTDCPP # freetype support from pango + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PDF + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_CAIRO_PS + select BR2_PACKAGE_CAIRO_SVG + select BR2_PACKAGE_PANGO + help + This enables the graphing capabilities ('rrdgraph'). + Without this it will only act as a database backend. + +comment "rrd_graph support needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +endif + +comment "rrdtool needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/rrdtool/rrdtool.hash b/package/rrdtool/rrdtool.hash new file mode 100644 index 0000000000..97741c916b --- /dev/null +++ b/package/rrdtool/rrdtool.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 9832775479684b8f94767201ee0440a1cacdbbbb7dd6736eb96b9a0750644ce8 rrdtool-1.5.6.tar.gz diff --git a/package/rrdtool/rrdtool.mk b/package/rrdtool/rrdtool.mk new file mode 100644 index 0000000000..6d6ab0c6a1 --- /dev/null +++ b/package/rrdtool/rrdtool.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# rrdtool +# +################################################################################ + +RRDTOOL_VERSION = 1.5.6 +RRDTOOL_SITE = http://oss.oetiker.ch/rrdtool/pub +RRDTOOL_LICENSE = GPLv2+ with FLOSS license exceptions as explained in COPYRIGHT +RRDTOOL_LICENSE_FILES = COPYRIGHT LICENSE +RRDTOOL_DEPENDENCIES = host-pkgconf libglib2 +# For 0001-Add-configure-option-to-disable-documentation.patch +RRDTOOL_AUTORECONF = YES +RRDTOOL_GETTEXTIZE = YES +RRDTOOL_INSTALL_STAGING = YES +RRDTOOL_CONF_OPTS = \ + --disable-examples \ + --disable-libdbi \ + --disable-librados \ + --disable-libwrap \ + --disable-lua \ + --disable-perl \ + --disable-python \ + --disable-ruby \ + --disable-tcl + +ifeq ($(BR2_PACKAGE_RRDTOOL_RRDGRAPH),y) +RRDTOOL_DEPENDENCIES += cairo pango +else +RRDTOOL_CONF_OPTS += --disable-rrd_graph +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +RRDTOOL_DEPENDENCIES += libxml2 +else +RRDTOOL_CONF_OPTS += --disable-rrd_restore +endif + +$(eval $(autotools-package)) diff --git a/package/rsh-redone/Config.in b/package/rsh-redone/Config.in new file mode 100644 index 0000000000..316ff7a1db --- /dev/null +++ b/package/rsh-redone/Config.in @@ -0,0 +1,40 @@ +config BR2_PACKAGE_RSH_REDONE + bool "rsh-redone" + help + Rsh-redone is a reimplementation of the remote shell clients and + servers. It is written from the ground up to avoid the bugs found + in the standard clients and servers. It also fully supports IPv6. + + http://packages.debian.org/source/sid/rsh-redone + +if BR2_PACKAGE_RSH_REDONE + +config BR2_PACKAGE_RSH_REDONE_RLOGIN + bool "rlogin" + +config BR2_PACKAGE_RSH_REDONE_RLOGIND + bool "rlogind" + depends on !BR2_STATIC_LIBS + depends on BR2_ENABLE_LOCALE && BR2_USE_WCHAR + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + select BR2_PACKAGE_LINUX_PAM + +comment "rlogind needs a uClibc or (e)glibc toolchain w/ wchar, locale, dynamic library" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_RSH_REDONE_RSH + bool "rsh" + +config BR2_PACKAGE_RSH_REDONE_RSHD + bool "rshd" + depends on BR2_ENABLE_LOCALE && BR2_USE_WCHAR + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + select BR2_PACKAGE_LINUX_PAM + +comment "rshd needs a uClibc or (e)glibc toolchain w/ wchar, locale, dynamic library" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + +endif diff --git a/package/rsh-redone/rsh-redone.hash b/package/rsh-redone/rsh-redone.hash new file mode 100644 index 0000000000..ba85607df7 --- /dev/null +++ b/package/rsh-redone/rsh-redone.hash @@ -0,0 +1,2 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/r/rsh-redone/rsh-redone_85-2.dsc +sha256 55ac8ee2acacbc3490f073e3922c0cde46ffe4ea3c593e05c48fed4c1e1a8811 rsh-redone_85.orig.tar.gz diff --git a/package/rsh-redone/rsh-redone.mk b/package/rsh-redone/rsh-redone.mk new file mode 100644 index 0000000000..a62c2df193 --- /dev/null +++ b/package/rsh-redone/rsh-redone.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# rsh-redone +# +################################################################################ + +RSH_REDONE_VERSION = 85 +RSH_REDONE_SOURCE = rsh-redone_$(RSH_REDONE_VERSION).orig.tar.gz +RSH_REDONE_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/r/rsh-redone +RSH_REDONE_LICENSE = GPLv2 +RSH_REDONE_LICENSE_FILES = rsh.c + +RSH_REDONE_BINS-y = +RSH_REDONE_BINS-$(BR2_PACKAGE_RSH_REDONE_RLOGIN) += rlogin +RSH_REDONE_BINS-$(BR2_PACKAGE_RSH_REDONE_RSH) += rsh +RSH_REDONE_SBINS-y = +RSH_REDONE_SBINS-$(BR2_PACKAGE_RSH_REDONE_RLOGIND) += in.rlogind +RSH_REDONE_SBINS-$(BR2_PACKAGE_RSH_REDONE_RSHD) += in.rshd + +RSH_REDONE_MAKE_FLAGS = \ + BIN="$(RSH_REDONE_BINS-y)" SBIN="$(RSH_REDONE_SBINS-y)" + +ifneq ($(BR2_PACKAGE_RSH_REDONE_RSHD)$(BR2_PACKAGE_RSH_REDONE_RLOGIND),) +RSH_REDONE_DEPENDENCIES = linux-pam +endif + +define RSH_REDONE_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) $(RSH_REDONE_MAKE_FLAGS) +endef + +define RSH_REDONE_INSTALL_TARGET_CMDS + $(if $(RSH_REDONE_BINS-y)$(RSH_REDONE_SBINS-y), + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(RSH_REDONE_MAKE_FLAGS) DESTDIR=$(TARGET_DIR) \ + $(if $(RSH_REDONE_BINS-y),install-bin) \ + $(if $(RSH_REDONE_SBINS-y),install-sbin)) +endef + +$(eval $(generic-package)) diff --git a/package/rsync/Config.in b/package/rsync/Config.in new file mode 100644 index 0000000000..b952974efb --- /dev/null +++ b/package/rsync/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_RSYNC + bool "rsync" + # fork() + depends on BR2_USE_MMU + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_POPT + help + File transfer program to keep remote files in sync. + + http://rsync.samba.org/ diff --git a/package/rsync/rsync.hash b/package/rsync/rsync.hash new file mode 100644 index 0000000000..6311116141 --- /dev/null +++ b/package/rsync/rsync.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 ecfa62a7fa3c4c18b9eccd8c16eaddee4bd308a76ea50b5c02a5840f09c0a1c2 rsync-3.1.2.tar.gz diff --git a/package/rsync/rsync.mk b/package/rsync/rsync.mk new file mode 100644 index 0000000000..e1e850c440 --- /dev/null +++ b/package/rsync/rsync.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# rsync +# +################################################################################ + +RSYNC_VERSION = 3.1.2 +RSYNC_SITE = http://rsync.samba.org/ftp/rsync/src +RSYNC_LICENSE = GPLv3+ +RSYNC_LICENSE_FILES = COPYING +RSYNC_DEPENDENCIES = zlib popt +RSYNC_CONF_OPTS = \ + --with-included-zlib=no \ + --with-included-popt=no + +ifeq ($(BR2_PACKAGE_ACL),y) +RSYNC_DEPENDENCIES += acl +else +RSYNC_CONF_OPTS += --disable-acl-support +endif + +$(eval $(autotools-package)) diff --git a/package/rsyslog/0001-musl-fcntl-h.patch b/package/rsyslog/0001-musl-fcntl-h.patch new file mode 100644 index 0000000000..5c2daee695 --- /dev/null +++ b/package/rsyslog/0001-musl-fcntl-h.patch @@ -0,0 +1,30 @@ +From 835571774dc519dd2cff7ab1020cf298cc953a8f Mon Sep 17 00:00:00 2001 +From: Thordur Bjornsson +Date: Tue, 7 Jul 2015 12:34:08 +0200 +Subject: [PATCH] omfile: unconditionally include fcntl.h. + +required for open() flags + +Signed-off-by: Thordur Bjornsson +[Bernd: downloaded from upstream commit: + https://github.com/rsyslog/rsyslog/commit/835571774dc519dd2cff7ab1020cf298cc953a8f +Signed-off-by: Bernd Kuhls +--- + tools/omfile.c | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/tools/omfile.c b/tools/omfile.c +index 482e723..4444b97 100644 +--- a/tools/omfile.c ++++ b/tools/omfile.c +@@ -48,9 +48,7 @@ + #include + #include + #include +-#ifdef OS_SOLARIS +-# include +-#endif ++#include + #ifdef HAVE_ATOMIC_BUILTINS + # include + #endif diff --git a/package/rsyslog/Config.in b/package/rsyslog/Config.in new file mode 100644 index 0000000000..35992077a4 --- /dev/null +++ b/package/rsyslog/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_RSYSLOG + bool "rsyslog" + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LIBESTR + select BR2_PACKAGE_LIBLOGGING + select BR2_PACKAGE_JSON_C + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # modules + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c + help + Rsyslog is a powerful and flexible syslog implementation + + http://www.rsyslog.com + +comment "rsyslog needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/rsyslog/S01logging b/package/rsyslog/S01logging new file mode 100644 index 0000000000..8e4a59c2d5 --- /dev/null +++ b/package/rsyslog/S01logging @@ -0,0 +1,36 @@ +#!/bin/sh + +start() { + printf "Starting rsyslog daemon: " + start-stop-daemon -S -q -p /var/run/rsyslogd.pid --exec /usr/sbin/rsyslogd + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping rsyslog daemon: " + start-stop-daemon -K -q -p /var/run/rsyslogd.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +restart() { + stop + sleep 1 + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/rsyslog/rsyslog.hash b/package/rsyslog/rsyslog.hash new file mode 100644 index 0000000000..5f9e0edaab --- /dev/null +++ b/package/rsyslog/rsyslog.hash @@ -0,0 +1,2 @@ +# From http://www.rsyslog.com/downloads/download-v8-stable/ +sha256 eab00e8e758cd9dd33b3e2cf6af80297d1951dc7db37bd723a6488a35d577adc rsyslog-8.9.0.tar.gz diff --git a/package/rsyslog/rsyslog.mk b/package/rsyslog/rsyslog.mk new file mode 100644 index 0000000000..5dde924316 --- /dev/null +++ b/package/rsyslog/rsyslog.mk @@ -0,0 +1,96 @@ +################################################################################ +# +# rsyslog +# +################################################################################ + +RSYSLOG_VERSION = 8.9.0 +RSYSLOG_SITE = http://rsyslog.com/files/download/rsyslog +RSYSLOG_LICENSE = GPLv3, LGPLv3, Apache-2.0 +RSYSLOG_LICENSE_FILES = COPYING COPYING.LESSER COPYING.ASL20 +RSYSLOG_DEPENDENCIES = zlib libestr liblogging json-c host-pkgconf +RSYSLOG_CONF_ENV = ac_cv_prog_cc_c99='-std=c99' +RSYSLOG_PLUGINS = imdiag imfile impstats imptcp \ + mmanon mmaudit mmfields mmjsonparse mmpstrucdata mmsequence mmutf8fix \ + mail omprog omruleset omstdout omuxsock \ + pmaixforwardedfrom pmciscoios pmcisconames pmlastmsg pmsnare +RSYSLOG_CONF_OPTS = --disable-generate-man-pages \ + $(foreach x,$(call qstrip,$(RSYSLOG_PLUGINS)),--enable-$(x)) + +# Build after BusyBox +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +RSYSLOG_DEPENDENCIES += busybox +endif + +ifeq ($(BR2_PACKAGE_LIBEE),y) +RSYSLOG_DEPENDENCIES += libee +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +RSYSLOG_DEPENDENCIES += libgcrypt +RSYSLOG_CONF_ENV += LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +RSYSLOG_CONF_OPTS += --enable-libgcrypt +else +RSYSLOG_CONF_OPTS += --disable-libgcrypt +endif + +ifeq ($(BR2_PACKAGE_MYSQL),y) +RSYSLOG_DEPENDENCIES += mysql +RSYSLOG_CONF_OPTS += --enable-mysql +RSYSLOG_CONF_ENV += ac_cv_prog_MYSQL_CONFIG=$(STAGING_DIR)/usr/bin/mysql_config +else +RSYSLOG_CONF_OPTS += --disable-mysql +endif + +ifeq ($(BR2_PACKAGE_POSTGRESQL),y) +RSYSLOG_DEPENDENCIES += postgresql +RSYSLOG_CONF_OPTS += --enable-pgsql +RSYSLOG_CONF_ENV += ac_cv_prog_PG_CONFIG=$(STAGING_DIR)/usr/bin/pg_config +else +RSYSLOG_CONF_OPTS += --disable-pgsql +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +RSYSLOG_DEPENDENCIES += util-linux +RSYSLOG_CONF_OPTS += --enable-uuid +else +RSYSLOG_CONF_OPTS += --disable-uuid +endif + +ifeq ($(BR2_INIT_SYSTEMD),y) +RSYSLOG_CONF_OPTS += \ + --enable-systemd \ + --with-systemdsystemunitdir=/usr/lib/systemd/system +RSYSLOG_DEPENDENCIES += systemd +else +RSYSLOG_CONF_OPTS += --disable-systemd +endif + +define RSYSLOG_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/rsyslog/S01logging \ + $(TARGET_DIR)/etc/init.d/S01logging +endef + +# The rsyslog.service is installed by rsyslog, but the link is not created +# so the service is not enabled. +# We need to create another link which is due to the fact that the +# rsyslog.service contains an Alias= +# If we were to use systemctl enable to enable the service, it would +# create both, so we mimic that. +define RSYSLOG_INSTALL_INIT_SYSTEMD + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/rsyslog.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/rsyslog.service + ln -sf ../../../../usr/lib/systemd/system/rsyslog.service \ + $(TARGET_DIR)/etc/systemd/system/syslog.service +endef + +define RSYSLOG_INSTALL_CONF + $(INSTALL) -m 0644 -D $(@D)/platform/redhat/rsyslog.conf \ + $(TARGET_DIR)/etc/rsyslog.conf + mkdir -p $(TARGET_DIR)/etc/rsyslog.d +endef + +RSYSLOG_POST_INSTALL_TARGET_HOOKS += RSYSLOG_INSTALL_CONF + +$(eval $(autotools-package)) diff --git a/package/rt-tests/01-fix-build-system.patch b/package/rt-tests/01-fix-build-system.patch new file mode 100644 index 0000000000..36af74776f --- /dev/null +++ b/package/rt-tests/01-fix-build-system.patch @@ -0,0 +1,52 @@ +From f9a55a87af57780ea8940561d22cd6a90f461416 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Mon, 10 Nov 2014 11:44:55 +0300 +Subject: [PATCH] Fix various minor issues with rt-tests build system + +The issues fixed are : + + * Remove the automatic NUMA detection from the host + architecture. This is broken when doing cross-compilation. One can + still set NUMA=1 if NUMA support is desired. + + * Provide a HASPYTHON variable to tell whether the target system has + Python or not. Otherwise, the build system simply tests whether + Python is available on the host. The PYLIB variable is also changed + so that it can be overriden from the environment, in order to + provide the correct Python module location for the target. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Alexey Brodkin +Cc: Peter Korsgaard +--- + Makefile | 10 +++------- + 1 file changed, 3 insertions(+), 7 deletions(-) + +diff --git a/Makefile b/Makefile +index 318a5c6..645d138 100644 +--- a/Makefile ++++ b/Makefile +@@ -14,17 +14,13 @@ bindir ?= $(prefix)/bin + mandir ?= $(prefix)/share/man + srcdir ?= $(prefix)/src + +-machinetype = $(shell $(CC) -dumpmachine | \ +- sed -e 's/-.*//' -e 's/i.86/i386/' -e 's/mips.*/mips/' -e 's/ppc.*/powerpc/') +-ifneq ($(filter x86_64 i386 ia64 mips powerpc,$(machinetype)),) +-NUMA := 1 +-endif +- + CFLAGS ?= -Wall -Wno-nonnull + CPPFLAGS += -D_GNU_SOURCE -Isrc/include + LDFLAGS ?= + +-PYLIB := $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()') ++ifeq ($(HASPYTHON),1) ++PYLIB ?= $(shell python -c 'import distutils.sysconfig; print distutils.sysconfig.get_python_lib()') ++endif + + ifndef DEBUG + CFLAGS += -O2 +-- +1.9.3 + diff --git a/package/rt-tests/02-uclibc.patch b/package/rt-tests/02-uclibc.patch new file mode 100644 index 0000000000..180bdf7c6e --- /dev/null +++ b/package/rt-tests/02-uclibc.patch @@ -0,0 +1,109 @@ +From 713224456f4a3242496af803413f670433f27c74 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Mon, 10 Nov 2014 11:55:27 +0300 +Subject: [PATCH] [PATCH] fix build with uClibc + +Fix two build issues with (modern) uClibc: +- uClibc has clock_nanosleep() if built with UCLIBC_HAS_ADVANCED_REALTIME, + conflicting with emulation function +- uClibc doesn't provide utmpx.h if not built with UCLIBC_HAS_UTMPX, which + is included in several files (but not needed). + +Signed-off-by: Peter Korsgaard +--- + src/backfire/sendme.c | 1 - + src/cyclictest/cyclictest.c | 3 ++- + src/pmqtest/pmqtest.c | 1 - + src/ptsematest/ptsematest.c | 1 - + src/sigwaittest/sigwaittest.c | 2 -- + src/svsematest/svsematest.c | 1 - + 6 files changed, 2 insertions(+), 7 deletions(-) + +diff --git a/src/backfire/sendme.c b/src/backfire/sendme.c +index 8c169dd..b959951 100644 +--- a/src/backfire/sendme.c ++++ b/src/backfire/sendme.c +@@ -32,7 +32,6 @@ + #include "rt-utils.h" + #include "rt-get_cpu.h" + +-#include + #include + #include + #include +diff --git a/src/cyclictest/cyclictest.c b/src/cyclictest/cyclictest.c +index 4547831..343e421 100644 +--- a/src/cyclictest/cyclictest.c ++++ b/src/cyclictest/cyclictest.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -56,7 +57,7 @@ + #define gettid() syscall(__NR_gettid) + #define sigev_notify_thread_id _sigev_un._tid + +-#ifdef __UCLIBC__ ++#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_ADVANCED_REALTIME__) + #define MAKE_PROCESS_CPUCLOCK(pid, clock) \ + ((~(clockid_t) (pid) << 3) | (clockid_t) (clock)) + #define CPUCLOCK_SCHED 2 +diff --git a/src/pmqtest/pmqtest.c b/src/pmqtest/pmqtest.c +index 336a8eb..2e34afe 100644 +--- a/src/pmqtest/pmqtest.c ++++ b/src/pmqtest/pmqtest.c +@@ -33,7 +33,6 @@ + #include + #include + #include +-#include + #include + #include "rt-utils.h" + #include "rt-get_cpu.h" +diff --git a/src/ptsematest/ptsematest.c b/src/ptsematest/ptsematest.c +index 7558a41..5358a65 100644 +--- a/src/ptsematest/ptsematest.c ++++ b/src/ptsematest/ptsematest.c +@@ -33,7 +33,6 @@ + #include + #include + #include +-#include + #include "rt-utils.h" + #include "rt-get_cpu.h" + #include "error.h" +diff --git a/src/sigwaittest/sigwaittest.c b/src/sigwaittest/sigwaittest.c +index 428f5ce..85c32a2 100644 +--- a/src/sigwaittest/sigwaittest.c ++++ b/src/sigwaittest/sigwaittest.c +@@ -31,11 +31,9 @@ + #include + #include + #include +-#include + #include + #include + #include +-#include + #include "rt-utils.h" + #include "rt-get_cpu.h" + +diff --git a/src/svsematest/svsematest.c b/src/svsematest/svsematest.c +index c1128cc..5d02550 100644 +--- a/src/svsematest/svsematest.c ++++ b/src/svsematest/svsematest.c +@@ -31,7 +31,6 @@ + #include + #include + #include +-#include + + #include + +-- +1.9.3 + diff --git a/package/rt-tests/03-fix-non-nptl-buil.patch b/package/rt-tests/03-fix-non-nptl-buil.patch new file mode 100644 index 0000000000..5c65018916 --- /dev/null +++ b/package/rt-tests/03-fix-non-nptl-buil.patch @@ -0,0 +1,55 @@ +From c6920f97be02ca3fba9320b043acd578ce4c62d8 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Mon, 10 Nov 2014 10:00:13 +0300 +Subject: [PATCH] Makefile: allow building selected tests with non-NPTL + toolchain + +Some architectures are still stuck with non-NPTL toolchains. +These are for example ARC, Blackfin, Xtensa etc. + +Still rt-tests are very good benchmarks and it would be good to enable use of +at least selected (those that will be built) tests on those architectures. + +This change makes it possible to only build subset of tests that don't require +NPTL calls. + +By default behavior is not modified - all tests are built, but if one wants +to build with non-NPTL toolchain just add "HAVE_NPTL=no" in command line +or modify "HAVE_NPTL" variable right in Makefile and execute "make". + +This patch was submitted upstream: +https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg762958.html +so as soon as it is accepted with the next version bump this patch should be +removed. + +Signed-off-by: Alexey Brodkin +Cc: Vineet Gupta +Cc: Clark Williams +--- + Makefile | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index 318a5c6..675edf7 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,8 +1,13 @@ + VERSION_STRING = 0.89 + +-sources = cyclictest.c signaltest.c pi_stress.c rt-migrate-test.c \ +- ptsematest.c sigwaittest.c svsematest.c pmqtest.c sendme.c \ +- pip_stress.c hackbench.c ++HAVE_NPTL ?= yes ++ ++ifeq ($(HAVE_NPTL),yes) ++sources = cyclictest.c pi_stress.c pip_stress.c pmqtest.c rt-migrate-test.c ++endif ++ ++sources += signaltest.c ptsematest.c sigwaittest.c svsematest.c sendme.c \ ++ hackbench.c + + TARGETS = $(sources:.c=) + +-- +1.9.3 + diff --git a/package/rt-tests/04-Makefile-fix-tests-dependencies.patch b/package/rt-tests/04-Makefile-fix-tests-dependencies.patch new file mode 100644 index 0000000000..0b2feb16d5 --- /dev/null +++ b/package/rt-tests/04-Makefile-fix-tests-dependencies.patch @@ -0,0 +1,50 @@ +From e464368807211978fe2dfccf081fa8dc7a35b71b Mon Sep 17 00:00:00 2001 +From: Baruch Siach +Date: Fri, 23 Jan 2015 07:52:21 +0200 +Subject: [PATCH] Makefile: fix tests dependencies + +librttest is listed in $(LIBS) so all tests must depend on librttest.a. +Fixes build failures like: + +.../armv7-ctng-linux-gnueabihf-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -o hackbench hackbench.o -lrt -lpthread -lrttest -L. +.../armv7-ctng-linux-gnueabihf/bin/ld: cannot find -lrttest +collect2: error: ld returned 1 exit status + +Signed-off-by: Baruch Siach +--- + Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile b/Makefile +index a3879cea8164..b9a1fed1b920 100644 +--- a/Makefile ++++ b/Makefile +@@ -69,14 +69,14 @@ cyclictest: cyclictest.o librttest.a + signaltest: signaltest.o librttest.a + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + +-pi_stress: pi_stress.o ++pi_stress: pi_stress.o librttest.a + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + + hwlatdetect: src/hwlatdetect/hwlatdetect.py + chmod +x src/hwlatdetect/hwlatdetect.py + ln -s src/hwlatdetect/hwlatdetect.py hwlatdetect + +-rt-migrate-test: rt-migrate-test.o ++rt-migrate-test: rt-migrate-test.o librttest.a + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + + ptsematest: ptsematest.o librttest.a +@@ -97,7 +97,7 @@ sendme: sendme.o librttest.a + pip_stress: pip_stress.o librttest.a + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + +-hackbench: hackbench.o ++hackbench: hackbench.o librttest.a + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS) + + librttest.a: rt-utils.o error.o rt-get_cpu.o +-- +2.1.4 + diff --git a/package/rt-tests/Config.in b/package/rt-tests/Config.in new file mode 100644 index 0000000000..4c57c0f037 --- /dev/null +++ b/package/rt-tests/Config.in @@ -0,0 +1,32 @@ +config BR2_PACKAGE_RT_TESTS + bool "rt-tests" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # dlopen + help + Set of utilities for testing the real-time behaviour of a + Linux system. + + All tools are simple C programs with no dependencies, except + the hwlatdetect utility, which is a Python script and + therefore requires the Python interpreter. It will only be + installed if a Python interpreter has been selected in the + Buildroot configuration. + + Note that this package requires a toolchain built with the + NPTL implementation of the pthread API (this is always the + case with glibc/eglibc toolchains, but may not necessarily + be the case with uClibc toolchains, since the thread + implementation is configurable). + + http://rt.wiki.kernel.org + + +comment "rt-tests may not work on MIPS with an external uClibc toolchain" + depends on BR2_PACKAGE_RT_TESTS + depends on BR2_TOOLCHAIN_EXTERNAL_UCLIBC + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + +comment "rt-tests needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + depends on BR2_USE_MMU diff --git a/package/rt-tests/rt-tests.mk b/package/rt-tests/rt-tests.mk new file mode 100644 index 0000000000..74d7c6dfe8 --- /dev/null +++ b/package/rt-tests/rt-tests.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# rt-tests +# +################################################################################ + +RT_TESTS_SITE = git://git.kernel.org/pub/scm/linux/kernel/git/clrkwllms/rt-tests.git +RT_TESTS_VERSION = v0.89 +RT_TESTS_LICENSE = GPLv2+ +RT_TESTS_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_PYTHON),y) +RT_TESTS_DEPENDENCIES = python +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS_NPTL),y) +RT_TESTS_HAVE_NPTL=yes +else +RT_TESTS_HAVE_NPTL=no +endif + +define RT_TESTS_BUILD_CMDS + $(MAKE) -C $(@D) \ + CC="$(TARGET_CC)" \ + HAVE_NPTL=$(RT_TESTS_HAVE_NPTL) \ + CFLAGS="$(TARGET_CFLAGS)" \ + prefix=/usr +endef + +define RT_TESTS_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) \ + HAVE_NPTL=$(RT_TESTS_HAVE_NPTL) \ + DESTDIR="$(TARGET_DIR)" \ + prefix=/usr \ + $(if $(BR2_PACKAGE_PYTHON),HASPYTHON=1 PYLIB=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/) \ + install +endef + +$(eval $(generic-package)) diff --git a/package/rtai/Config.in b/package/rtai/Config.in new file mode 100644 index 0000000000..14b1854837 --- /dev/null +++ b/package/rtai/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_RTAI + bool "rtai" + depends on BR2_LINUX_KERNEL_EXT_RTAI + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra + help + RTAI - the RealTime Application Interface for Linux. + + http://www.rtai.org diff --git a/package/rtai/rtai.hash b/package/rtai/rtai.hash new file mode 100644 index 0000000000..f0afafbd7c --- /dev/null +++ b/package/rtai/rtai.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 13669da744a0ba411bdb8e47fa47b6e19171646ae42c8dbb2735d12e555fb1a3 rtai-4.0.1.tar.bz2 diff --git a/package/rtai/rtai.mk b/package/rtai/rtai.mk new file mode 100644 index 0000000000..dfd8e0c190 --- /dev/null +++ b/package/rtai/rtai.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# rtai +# +################################################################################ + +RTAI_VERSION = 4.0.1 +RTAI_SOURCE = rtai-$(RTAI_VERSION).tar.bz2 +RTAI_SITE = https://www.rtai.org/userfiles/downloads/RTAI +RTAI_INSTALL_STAGING = YES + +# The _CONFIG_SCRIPTS cannot apply here to the specificities of rtai-config +define RTAI_POST_PATCH_FIXUP + $(SED) 's%^staging=.*%staging=$(STAGING_DIR)%' $(STAGING_DIR)/usr/bin/rtai-config +endef + +RTAI_POST_INSTALL_STAGING_HOOKS += RTAI_POST_PATCH_FIXUP + +RTAI_DEPENDENCIES = linux + +RTAI_CONF_OPTS = \ + --includedir=/usr/include/rtai \ + --with-linux-dir=$(LINUX_DIR) \ + --disable-leds \ + --enable-usi \ + --enable-align-priority \ + --disable-rtailab \ + --with-module-dir=/lib/modules/$(LINUX_VERSION_PROBED)/rtai + +RTAI_MAKE = $(MAKE1) + +$(eval $(autotools-package)) diff --git a/package/rtl8188eu/Config.in b/package/rtl8188eu/Config.in new file mode 100644 index 0000000000..09cde24a0f --- /dev/null +++ b/package/rtl8188eu/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_RTL8188EU + bool "rtl8188eu" + depends on BR2_LINUX_KERNEL + help + A standalone driver for the RTL8188EU USB Wi-Fi adapter. + This is needed only for Linux kernels before 3.12. + Since 3.12, there is a (staging) driver in mainline, with a similar + codebase. + + Make sure your target kernel has the CONFIG_WIRELESS_EXT config + option enabled. + + Note: this package needs a firmware loading mechanism to load the + binary blob for the chip to work. + + https://github.com/lwfinger/rtl8188eu + +comment "rtl8188eu needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL diff --git a/package/rtl8188eu/rtl8188eu.mk b/package/rtl8188eu/rtl8188eu.mk new file mode 100644 index 0000000000..d1034c4ccf --- /dev/null +++ b/package/rtl8188eu/rtl8188eu.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# rtl8188eu +# +################################################################################ + +RTL8188EU_VERSION = 3091828c8f4b4a01cbec6025128bf77e6e7b9f97 +RTL8188EU_SITE = $(call github,lwfinger,rtl8188eu,$(RTL8188EU_VERSION)) +RTL8188EU_LICENSE = GPLv2, proprietary (rtl8188eufw.bin firmware blob) +RTL8188EU_LICENSE_FILES = COPYING +RTL8188EU_MODULE_MAKE_OPTS = CONFIG_RTL8188EU=m + +$(eval $(kernel-module)) + +define RTL8188EU_INSTALL_FIRMWARE + $(INSTALL) -D -m 644 $(@D)/rtl8188eufw.bin \ + $(TARGET_DIR)/lib/firmware/rtlwifi/rtl8188eufw.bin +endef +RTL8188EU_POST_INSTALL_TARGET_HOOKS += RTL8188EU_INSTALL_FIRMWARE + +$(eval $(generic-package)) diff --git a/package/rtl8821au/Config.in b/package/rtl8821au/Config.in new file mode 100644 index 0000000000..9827ad5b94 --- /dev/null +++ b/package/rtl8821au/Config.in @@ -0,0 +1,10 @@ +comment "rtl8821au needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_RTL8821AU + bool "rtl8821au" + depends on BR2_LINUX_KERNEL + help + rtl8821au wifi driver + + https://github.com/paralin/rtl8821au diff --git a/package/rtl8821au/rtl8821au.hash b/package/rtl8821au/rtl8821au.hash new file mode 100644 index 0000000000..2e3c56c375 --- /dev/null +++ b/package/rtl8821au/rtl8821au.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 26e1a72b553a044ec34b57d9264ae7616c008a598a9009faba51331b55285a5b rtl8821au-4c298b160253a7efa507c8ecdb868d1579ad02a7.tar.gz diff --git a/package/rtl8821au/rtl8821au.mk b/package/rtl8821au/rtl8821au.mk new file mode 100644 index 0000000000..58a91da6a7 --- /dev/null +++ b/package/rtl8821au/rtl8821au.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# rtl8821au +# +################################################################################ + +RTL8821AU_VERSION = 4c298b160253a7efa507c8ecdb868d1579ad02a7 +RTL8821AU_SITE = $(call github,ulli-kroll,rtl8821au,$(RTL8821AU_VERSION)) +RTL8821AU_LICENSE = GPLv2, proprietary (rtl8821au.bin firmware) +RTL8821AU_LICENSE_FILES = COPYING + +RTL8821AU_MODULE_MAKE_OPTS = \ + CONFIG_RTL8812AU_8821AU=m \ + KVER=$(LINUX_VERSION_PROBED) \ + USER_EXTRA_CFLAGS=-DCONFIG_$(call qstrip,$(BR2_ENDIAN))_ENDIAN + +define RTL8821AU_FIRMWARE_INSTALL + mkdir -p $(TARGET_DIR)/lib/firmware/rtlwifi/ + $(INSTALL) -D -m 0644 $(@D)/firmware/* $(TARGET_DIR)/lib/firmware/rtlwifi/ +endef + +RTL8821AU_POST_INSTALL_TARGET_HOOKS += RTL8821AU_FIRMWARE_INSTALL + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/rtmpdump/Config.in b/package/rtmpdump/Config.in new file mode 100644 index 0000000000..5e9c50849f --- /dev/null +++ b/package/rtmpdump/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_RTMPDUMP + bool "librtmp" + select BR2_PACKAGE_ZLIB + help + rtmpdump - RTMPDump Real-Time Messaging Protocol API + Only librtmp is installed by this package. + + http://rtmpdump.mplayerhq.hu diff --git a/package/rtmpdump/rtmpdump.mk b/package/rtmpdump/rtmpdump.mk new file mode 100644 index 0000000000..ad4308c5b6 --- /dev/null +++ b/package/rtmpdump/rtmpdump.mk @@ -0,0 +1,56 @@ +################################################################################ +# +# rtmpdump +# +################################################################################ + +RTMPDUMP_VERSION = a107cef9b392616dff54fabfd37f985ee2190a6f +RTMPDUMP_SITE = git://git.ffmpeg.org/rtmpdump +RTMPDUMP_INSTALL_STAGING = YES +# Note that rtmpdump is GPLv2 but librtmp has its own license and since we only +# care about librtmp, it's LGPLv2.1+ +RTMPDUMP_LICENSE = LGPLv2.1+ +RTMPDUMP_LICENSE_FILES = librtmp/COPYING +RTMPDUMP_DEPENDENCIES = zlib + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +RTMPDUMP_DEPENDENCIES += gnutls +RTMPDUMP_CRYPTO = GNUTLS +else ifeq ($(BR2_PACKAGE_OPENSSL),y) +RTMPDUMP_DEPENDENCIES += openssl +RTMPDUMP_CRYPTO = OPENSSL +else +# no crypto +RTMPDUMP_CRYPTO = +endif + +RTMPDUMP_CFLAGS = $(TARGET_CFLAGS) + +ifneq ($(BR2_STATIC_LIBS),y) +RTMPDUMP_CFLAGS += -fPIC +else +RTMPDUMP_SHARED = "SHARED=" +endif + +RTMPDUMP_MAKE_FLAGS = \ + CRYPTO=$(RTMPDUMP_CRYPTO) \ + prefix=/usr \ + $(RTMPDUMP_SHARED) + +define RTMPDUMP_BUILD_CMDS + $(MAKE) $(RTMPDUMP_MAKE_FLAGS) \ + XCFLAGS="$(RTMPDUMP_CFLAGS)" \ + XLDFLAGS="$(TARGET_LDFLAGS)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + -C $(@D)/librtmp +endef + +define RTMPDUMP_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D)/librtmp install DESTDIR=$(STAGING_DIR) $(RTMPDUMP_MAKE_FLAGS) +endef + +define RTMPDUMP_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D)/librtmp install DESTDIR=$(TARGET_DIR) $(RTMPDUMP_MAKE_FLAGS) +endef + +$(eval $(generic-package)) diff --git a/package/rtorrent/0001-cross_compile.patch b/package/rtorrent/0001-cross_compile.patch new file mode 100644 index 0000000000..a8ad696e6d --- /dev/null +++ b/package/rtorrent/0001-cross_compile.patch @@ -0,0 +1,65 @@ +From d62f7474289970d5be3fd658dd6ace4489408bdf Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Mon, 5 Oct 2015 00:52:26 +0100 +Subject: [PATCH] Fix cross compilation, based on OpenWRT patch. + +[Vincent: tweak the patch for version 0.9.6] + +Signed-off-by: Gustavo Zacarias +Signed-off-by: Vicente Olivert Riera +--- + configure.ac | 1 - + scripts/checks.m4 | 2 +- + scripts/common.m4 | 4 ++-- + 3 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ba5bbf2..0821d4e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4,7 +4,6 @@ AC_DEFINE(API_VERSION, 9, api version) + + AM_INIT_AUTOMAKE + AC_CONFIG_HEADERS(config.h) +-AM_PATH_CPPUNIT(1.9.6) + + AC_PROG_CXX + AC_PROG_LIBTOOL +diff --git a/scripts/checks.m4 b/scripts/checks.m4 +index 598f39b..0e5abe0 100644 +--- a/scripts/checks.m4 ++++ b/scripts/checks.m4 +@@ -96,7 +96,7 @@ AC_DEFUN([TORRENT_CHECK_KQUEUE], [ + AC_DEFUN([TORRENT_CHECK_KQUEUE_SOCKET_ONLY], [ + AC_MSG_CHECKING(whether kqueue supports pipes and ptys) + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include + #include + #include +diff --git a/scripts/common.m4 b/scripts/common.m4 +index 5127624..cc68269 100644 +--- a/scripts/common.m4 ++++ b/scripts/common.m4 +@@ -223,7 +223,7 @@ dnl Need to fix this so that it uses the stuff defined by the system. + AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_MSG_CHECKING(for execinfo.h) + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include + int main() { backtrace((void**)0, 0); backtrace_symbols((char**)0, 0); return 0;} + ])], +@@ -238,7 +238,7 @@ AC_DEFUN([TORRENT_CHECK_EXECINFO], [ + AC_DEFUN([TORRENT_CHECK_ALIGNED], [ + AC_MSG_CHECKING(the byte alignment) + +- AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ AC_LINK_IFELSE([AC_LANG_SOURCE([ + #include + int main() { + char buf@<:@8@:>@ = { 0, 0, 0, 0, 1, 0, 0, 0 }; +-- +1.7.1 + diff --git a/package/rtorrent/Config.in b/package/rtorrent/Config.in new file mode 100644 index 0000000000..190e50fe26 --- /dev/null +++ b/package/rtorrent/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_RTORRENT + bool "rtorrent" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_SYNC_1 && BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBTORRENT + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_OPENSSL + help + BitTorrent Client using libtorrent + + https://github.com/rakshasa/rtorrent + +comment "rtorrent needs a toolchain w/ C++, threads, wchar" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_1 && BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/rtorrent/rtorrent.hash b/package/rtorrent/rtorrent.hash new file mode 100644 index 0000000000..15257acf43 --- /dev/null +++ b/package/rtorrent/rtorrent.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 1e69c24f1f26f8f07d58d673480dc392bfc4317818c1115265b08a7813ff5b0e rtorrent-0.9.6.tar.gz diff --git a/package/rtorrent/rtorrent.mk b/package/rtorrent/rtorrent.mk new file mode 100644 index 0000000000..edde02ee4b --- /dev/null +++ b/package/rtorrent/rtorrent.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# rtorrent +# +################################################################################ + +RTORRENT_VERSION = 0.9.6 +RTORRENT_SITE = http://rtorrent.net/downloads +RTORRENT_DEPENDENCIES = host-pkgconf libcurl libtorrent ncurses +RTORRENT_AUTORECONF = YES +RTORRENT_LICENSE = GPLv2 +RTORRENT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/rtptools/0001-host2ip.c-disable-NIS-support-for-toolchains-lacking.patch b/package/rtptools/0001-host2ip.c-disable-NIS-support-for-toolchains-lacking.patch new file mode 100644 index 0000000000..1bf7c13491 --- /dev/null +++ b/package/rtptools/0001-host2ip.c-disable-NIS-support-for-toolchains-lacking.patch @@ -0,0 +1,73 @@ +From f8ffde6c0c0a9008cd65601f6c9712899106e42c Mon Sep 17 00:00:00 2001 +From: "Yann E. MORIN" +Date: Mon, 11 Apr 2016 23:03:48 +0200 +Subject: [PATCH] host2ip.c: disable NIS support for toolchains lacking SUN RPC + +Some toolchains are missing SUN RPC; this is the case for toolchains +based on uClibc, and some glibc-based toolchains (when SUN RPC headers +were taken out of glibc). + +Add a configure check for the required SUN RPC header, and make the code +using SUN RPC conditional on the result. + +Also drop the legacy AM_C_PROTOTYPES: it is no longer supported by +autoconf and breaks autoreconf. + +Signed-off-by: Peter Korsgaard +[yann.morin.1998@free.fr: add the ./configure check; do not include + features.h; do not check specifically for uClibc] +Signed-off-by: "Yann E. MORIN" +--- + configure.in | 3 ++- + host2ip.c | 5 +++++ + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index de394cf..889e6ed 100644 +--- a/configure.in ++++ b/configure.in +@@ -39,9 +39,10 @@ CU_CHECK_LIB(socket, socket) + dnl Checks for header files. + AC_HEADER_STDC + AC_CHECK_HEADERS(search.h sys/time.h unistd.h) ++AC_CHECK_HEADER([rpcsvc/ypclnt.h], ++ [AC_DEFINE([HAVE_YP],[1],[Define to 1 if you have rpcsvc/ypclnt.h])]) + + dnl Checks for typedefs, structures, and compiler characteristics. +-AM_C_PROTOTYPES + AC_C_CONST + AC_C_BIGENDIAN + AC_TYPE_UID_T +diff --git a/host2ip.c b/host2ip.c +index b094343..95014cd 100644 +--- a/host2ip.c ++++ b/host2ip.c +@@ -3,7 +3,10 @@ + #include /* gethostbyname() */ + #include /* sockaddr_in */ + #include /* inet_addr() */ ++#ifdef HAVE_YP + #include /* YP */ ++#endif ++ + #include /* strlen() added by Akira 12/27/01 */ + #include "sysdep.h" + +@@ -28,6 +31,7 @@ struct in_addr host2ip(char *host) + else if ((hep = gethostbyname(host))) { + in = *(struct in_addr *)(hep->h_addr_list[0]); + } ++#ifdef HAVE_YP + /* As a last resort, try YP. */ + else { + static char *domain = 0; /* YP domain */ +@@ -39,5 +43,6 @@ struct in_addr host2ip(char *host) + in.s_addr = inet_addr(value); + } + } ++#endif + return in; + } /* host2ip */ +-- +1.9.1 + diff --git a/package/rtptools/Config.in b/package/rtptools/Config.in new file mode 100644 index 0000000000..80bbb7a7a0 --- /dev/null +++ b/package/rtptools/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_RTPTOOLS + bool "rtptools" + help + The rtptools distribution consists of a number of small + applications that can be used for processing RTP data. + + http://www.cs.columbia.edu/irt/software/rtptools/ diff --git a/package/rtptools/rtptools.hash b/package/rtptools/rtptools.hash new file mode 100644 index 0000000000..bf5b4a6f04 --- /dev/null +++ b/package/rtptools/rtptools.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 99d681f6e328486fa1fc16581b0a5974e31eb2708101683ee9c8a0b6bed31050 rtptools-1.20.tar.gz diff --git a/package/rtptools/rtptools.mk b/package/rtptools/rtptools.mk new file mode 100644 index 0000000000..7990e8f1c6 --- /dev/null +++ b/package/rtptools/rtptools.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# rtptools +# +################################################################################ + +RTPTOOLS_VERSION = 1.20 +RTPTOOLS_SITE = http://www.cs.columbia.edu/irt/software/rtptools/download +RTPTOOLS_LICENSE = MIT-like (research and education only) +RTPTOOLS_LICENSE_FILES = COPYRIGHT +RTPTOOLS_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/rubix/0001-dont-use-legacy-functions.patch b/package/rubix/0001-dont-use-legacy-functions.patch new file mode 100644 index 0000000000..9c34aee6d3 --- /dev/null +++ b/package/rubix/0001-dont-use-legacy-functions.patch @@ -0,0 +1,18 @@ +Use strstr() instead of index(), since index() is a legacy function +and it may not be available in uClibc, depending on the configuration. + +Signed-off-by: Thomas Petazzoni + +Index: rubix-1.0.5/cube.c +=================================================================== +--- rubix-1.0.5.orig/cube.c 2010-02-14 14:19:05.000000000 +0100 ++++ rubix-1.0.5/cube.c 2010-02-14 14:19:14.000000000 +0100 +@@ -257,7 +257,7 @@ + if (i==-1) goto finish; + if (buffer[0]=='%') goto new_section; + buffer[0]=toupper(buffer[0]); +- ptr = index(buffer, '='); ++ ptr = strstr(buffer, '='); + if (ptr) { + ++ptr; + while (isspace(*ptr)) ++ptr; diff --git a/package/rubix/0002-misc-fixes.patch b/package/rubix/0002-misc-fixes.patch new file mode 100644 index 0000000000..3ce6dad220 --- /dev/null +++ b/package/rubix/0002-misc-fixes.patch @@ -0,0 +1,135 @@ +diff -Nrup rubix-1.0.5/fillpoly.c rubix-1.0.5-avr32/fillpoly.c +--- rubix-1.0.5/fillpoly.c 2003-10-12 15:41:43.000000000 -0400 ++++ rubix-1.0.5-avr32/fillpoly.c 2008-02-29 12:39:51.000000000 -0500 +@@ -435,7 +435,7 @@ void fill_lines(device *d, int thecol) + ); + #endif + } +- } else if (d->depth==16) { /* here 16bpp */ ++ } else if ((d->depth==16) | (d->depth==15)) { /* here 16bpp */ + register int i; + #ifndef PC_ARCHI + register int j; +diff -Nrup rubix-1.0.5/line.c rubix-1.0.5-avr32/line.c +--- rubix-1.0.5/line.c 2003-10-12 14:15:19.000000000 -0400 ++++ rubix-1.0.5-avr32/line.c 2008-02-29 12:39:51.000000000 -0500 +@@ -1317,7 +1317,7 @@ void drawline(device *d, line *l) + #endif + if (d->depth==8) + drawline8(d, l); +- else if (d->depth==16) ++ else if ((d->depth==16) | (d->depth==15)) + drawline16(d, l); + else if (d->depth==24) + drawline24(d, l); +diff -Nrup rubix-1.0.5/Makefile rubix-1.0.5-avr32/Makefile +--- rubix-1.0.5/Makefile 2003-12-04 14:27:58.000000000 -0500 ++++ rubix-1.0.5-avr32/Makefile 2008-02-29 12:58:30.000000000 -0500 +@@ -11,21 +11,17 @@ + # Customize to fit your needs (especially if it does not work for now). + + LANGUAGE=ENGLISH +-GAMESDIR=/usr/games + + #architecture=-DPC_ARCHI + + # For Solaris + #EXTRALIBS=-lsocket + +-CC=gcc + CFLAGS=-Wall -O3 -fomit-frame-pointer -ffast-math \ + -DGAMESDIR="\"$(GAMESDIR)\"" \ + -D$(LANGUAGE) $(architecture) + + #CFLAGS=-Wall -g -ffast-math -Iplayer $(architecture) +-XINC=-I/usr/X11R6/include +-XLIB=-L/usr/X11R6/lib -lX11 + + #the following should not be changed. + +@@ -37,7 +33,7 @@ rubix : $(OBJ) + + install : + mkdir -p $(GAMESDIR) +- install -c -s rubix $(GAMESDIR) ++ install -c rubix $(GAMESDIR) + + clean : + rm -f *.o *~ core *.bak *.dat gmon.out +diff -Nrup rubix-1.0.5/screen.c rubix-1.0.5-avr32/screen.c +--- rubix-1.0.5/screen.c 2004-04-26 04:26:05.000000000 -0400 ++++ rubix-1.0.5-avr32/screen.c 2008-02-29 12:39:51.000000000 -0500 +@@ -80,11 +80,17 @@ void error_statement(SCREEN *s) + + int reset_data_buffers(SCREEN *s) + { ++ int temp; + + if (s->im) + XDestroyImage(s->im); ++ if (s->depth == 15) { ++ temp=16; ++ } else { ++ temp=s->depth; ++ } + +- s->buffer=(char *)malloc(((SCREEN_X+7)/8)*SCREEN_Y*s->depth); ++ s->buffer=(char *)malloc(((SCREEN_X+7)/8)*SCREEN_Y*temp); + + if (!s->buffer) { + error_statement(s); +@@ -106,7 +112,7 @@ int reset_data_buffers(SCREEN *s) + */ + /* Sed - december 2003 - no it has to be 8 */ + s->im=XCreateImage(s->d, DefaultVisual(s->d, DefaultScreen(s->d)), +- s->depth==32?24:s->depth, ZPixmap, ++ s->depth, ZPixmap, + 0, s->buffer, SCREEN_X, SCREEN_Y, 8, 0); + + if (!s->im) { +@@ -139,8 +145,8 @@ int init_screen(SCREEN *s) + + s->depth=DefaultDepth(s->d, DefaultScreen(s->d)); + +- if (s->depth!=8 && s->depth!=16 && s->depth!=24) { +- fprintf(stderr, "screen depth not supported (only 8, 16 and 24bpp (which means 32bpp too) handled\n"); ++ if (s->depth!=8 && s->depth!=15 && s->depth!=16 && s->depth!=24) { ++ fprintf(stderr, "screen depth not supported (only 8, 15, 16 and 24bpp (which means 32bpp too) handled\n"); + XCloseDisplay(s->d); + s->d=(Display *)0; + return -1; +@@ -182,10 +188,10 @@ int init_screen(SCREEN *s) + + /* let's create and map our window */ + s->w=XCreateWindow(s->d, DefaultRootWindow(s->d), 0, 0, +- SCREEN_X, SCREEN_Y, 3, s->depth==32?24:s->depth, ++ SCREEN_X, SCREEN_Y, 3, s->depth, + CopyFromParent, CopyFromParent, 0, NULL); + s->h=XCreateWindow(s->d, DefaultRootWindow(s->d), 0, 0, +- HELP_X, HELP_Y, 3, s->depth==32?24:s->depth, ++ HELP_X, HELP_Y, 3, s->depth, + CopyFromParent, CopyFromParent, 0, NULL); + + xch.res_name = "rubix"; +@@ -946,13 +952,18 @@ void close_screen(SCREEN *s) + void clear_screen(SCREEN *s) + { + /* fill s->im with pixel[10], avoid XPutPixel which is rather slow... */ +- int i, w, dw; ++ int i, w, dw, temp; ++ if (s->depth == 15) { ++ temp = 16; ++ } else { ++ temp = s->depth; ++ } + w = (SCREEN_X+7)/8; +- dw = s->depth/8; ++ dw = temp/8; + XPutPixel(s->im, 0, 0, pixel[10]); + for (i=1; i<8*w; i++) + memcpy(s->buffer + i*dw, s->buffer, dw); +- w = w * s->depth; ++ w = w * temp; + for (i=1; ibuffer + i*w, s->buffer, w); + } diff --git a/package/rubix/Config.in b/package/rubix/Config.in new file mode 100644 index 0000000000..7afc0ae7b9 --- /dev/null +++ b/package/rubix/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_RUBIX + bool "rubix" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + help + A 3D rubiks cube game for X + + http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Rubix diff --git a/package/rubix/rubix.hash b/package/rubix/rubix.hash new file mode 100644 index 0000000000..90fc9cd11e --- /dev/null +++ b/package/rubix/rubix.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d3c6bf8bfa891e72baac0250a79d26045ddb4412b72d90de7c46091c07516b43 rubix-1.0.5.tar.bz2 diff --git a/package/rubix/rubix.mk b/package/rubix/rubix.mk new file mode 100644 index 0000000000..b808bc0b87 --- /dev/null +++ b/package/rubix/rubix.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# rubix +# +################################################################################ + +RUBIX_VERSION = 1.0.5 +RUBIX_SOURCE = rubix-$(RUBIX_VERSION).tar.bz2 +RUBIX_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Rubix +RUBIX_LICENSE = Public Domain +RUBIX_LICENSE_FILES = LICENCE +RUBIX_DEPENDENCIES = xlib_libX11 + +RUBIX_MAKE_OPTS = \ + CC="$(TARGET_CC)" \ + XINC="-I$(STAGING_DIR)/usr/include/X11" \ + XLIB="-L$(STAGING_DIR)/usr/lib -lX11" + +RUBIX_INSTALL_TARGET_OPTS = GAMESDIR=$(TARGET_DIR)/usr/games install + +$(eval $(autotools-package)) diff --git a/package/ruby/0001-process.c-fix-rb_spawn_process-for-nommu.patch b/package/ruby/0001-process.c-fix-rb_spawn_process-for-nommu.patch new file mode 100644 index 0000000000..701c1059d2 --- /dev/null +++ b/package/ruby/0001-process.c-fix-rb_spawn_process-for-nommu.patch @@ -0,0 +1,34 @@ +From 24e6d5bcf791a5c3f46191e544731420ff8b1312 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Thu, 19 May 2016 11:10:02 -0300 +Subject: [PATCH] process.c: fix rb_spawn_process() for nommu + +rb_spawn_process() in process.c tries different solutions for when fork +and/or spawnv are/aren't available. +The last resort when both aren't is to use the system() call which +stores the value in the status variable, which isn't declared. + +Signed-off-by: Gustavo Zacarias +--- +Patch status: reported https://bugs.ruby-lang.org/issues/12398 + + process.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/process.c b/process.c +index e196639..40967f7 100644 +--- a/process.c ++++ b/process.c +@@ -3897,6 +3897,9 @@ rb_spawn_process(struct rb_execarg *eargp, char *errmsg, size_t errmsg_buflen) + VALUE prog; + struct rb_execarg sarg; + #endif ++#if !defined HAVE_WORKING_FORK || !USE_SPAWNV ++ int status; ++#endif + + #if defined HAVE_WORKING_FORK && !USE_SPAWNV + pid = rb_fork_async_signal_safe(NULL, rb_exec_atfork, eargp, eargp->redirect_fds, errmsg, errmsg_buflen); +-- +2.7.3 + diff --git a/package/ruby/Config.in b/package/ruby/Config.in new file mode 100644 index 0000000000..141db90140 --- /dev/null +++ b/package/ruby/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_RUBY + bool "ruby" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + Object Oriented Scripting Language. + + http://www.ruby-lang.org/ + +comment "ruby needs a toolchain w/ wchar, threads, dynamic library" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/ruby/ruby.hash b/package/ruby/ruby.hash new file mode 100644 index 0000000000..7e627441a1 --- /dev/null +++ b/package/ruby/ruby.hash @@ -0,0 +1,2 @@ +# From https://www.ruby-lang.org/en/news/2016/04/26/ruby-2-3-1-released/ +sha256 6725b5534d5a3a21ec4f14d6d7b9921a0d00d08acb88fd04cd50b47b70496338 ruby-2.3.1.tar.xz diff --git a/package/ruby/ruby.mk b/package/ruby/ruby.mk new file mode 100644 index 0000000000..3b8310c112 --- /dev/null +++ b/package/ruby/ruby.mk @@ -0,0 +1,91 @@ +################################################################################ +# +# ruby +# +################################################################################ + +RUBY_VERSION_MAJOR = 2.3 +RUBY_VERSION = $(RUBY_VERSION_MAJOR).1 +RUBY_VERSION_EXT = 2.3.0 +RUBY_SITE = http://cache.ruby-lang.org/pub/ruby/$(RUBY_VERSION_MAJOR) +RUBY_SOURCE = ruby-$(RUBY_VERSION).tar.xz +RUBY_DEPENDENCIES = host-pkgconf host-ruby +HOST_RUBY_DEPENDENCIES = host-pkgconf +RUBY_MAKE_ENV = $(TARGET_MAKE_ENV) +RUBY_CONF_OPTS = --disable-install-doc --disable-rpath --disable-rubygems +HOST_RUBY_CONF_OPTS = \ + --disable-install-doc \ + --with-out-ext=curses,openssl,readline \ + --without-gmp +RUBY_LICENSE = Ruby or BSD-2c, BSD-3c, others +RUBY_LICENSE_FILES = LEGAL COPYING BSDL + +RUBY_CFLAGS = $(TARGET_CFLAGS) +# With some SuperH toolchains (like Sourcery CodeBench 2012.09), ruby fails to +# build with 'pcrel too far'. This seems to be caused by the -Os option we pass +# by default. To fix the problem, use standard -O2 optimization instead. +ifeq ($(BR2_sh)$(BR2_sh64),y) +RUBY_CFLAGS += -O2 +endif +RUBY_CONF_ENV = CFLAGS="$(RUBY_CFLAGS)" + +ifeq ($(BR2_bfin),y) +RUBY_CONF_ENV += ac_cv_func_dl_iterate_phdr=no +# Blackfin doesn't have FFI closure support, needed by the fiddle +# extension. +RUBY_CONF_OPTS += --with-out-ext=fiddle +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_SSP),) +RUBY_CONF_ENV += stack_protector=no +endif + +# Force optionals to build before we do +ifeq ($(BR2_PACKAGE_BERKELEYDB),y) +RUBY_DEPENDENCIES += berkeleydb +endif +ifeq ($(BR2_PACKAGE_GDBM),y) +RUBY_DEPENDENCIES += gdbm +endif +ifeq ($(BR2_PACKAGE_LIBYAML),y) +RUBY_DEPENDENCIES += libyaml +endif +ifeq ($(BR2_PACKAGE_NCURSES),y) +RUBY_DEPENDENCIES += ncurses +endif +ifeq ($(BR2_PACKAGE_OPENSSL),y) +RUBY_DEPENDENCIES += openssl +endif +ifeq ($(BR2_PACKAGE_READLINE),y) +RUBY_DEPENDENCIES += readline +endif +ifeq ($(BR2_PACKAGE_ZLIB),y) +RUBY_DEPENDENCIES += zlib +endif +ifeq ($(BR2_PACKAGE_GMP),y) +RUBY_DEPENDENCIES += gmp +RUBY_CONF_OPTS += --with-gmp +else +RUBY_CONF_OPTS += --without-gmp +endif + +# workaround for amazing build failure, see +# http://lists.busybox.net/pipermail/buildroot/2014-December/114273.html +define RUBY_REMOVE_VERCONF_H + rm -f $(@D)/verconf.h +endef +RUBY_POST_CONFIGURE_HOOKS += RUBY_REMOVE_VERCONF_H + +# Remove rubygems and friends, as they need extensions that aren't +# built and a target compiler. +RUBY_EXTENSIONS_REMOVE = rake* rdoc* rubygems* +define RUBY_REMOVE_RUBYGEMS + rm -f $(addprefix $(TARGET_DIR)/usr/bin/, gem rdoc ri rake) + rm -rf $(TARGET_DIR)/usr/lib/ruby/gems + rm -rf $(addprefix $(TARGET_DIR)/usr/lib/ruby/$(RUBY_VERSION_EXT)/, \ + $(RUBY_EXTENSIONS_REMOVE)) +endef +RUBY_POST_INSTALL_TARGET_HOOKS += RUBY_REMOVE_RUBYGEMS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/sam-ba/Config.in.host b/package/sam-ba/Config.in.host new file mode 100644 index 0000000000..6093865e4c --- /dev/null +++ b/package/sam-ba/Config.in.host @@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_SAM_BA + bool "host sam-ba" + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_HOSTARCH_NEEDS_IA32_LIBS + help + Atmel SAM-BA software provides an open set of tools for + programming the Atmel SAM3, SAM7 and SAM9 ARM-based + microcontrollers. + + http://www.at91.com/linux4sam/bin/view/Linux4SAM/SoftwareTools diff --git a/package/sam-ba/sam-ba.mk b/package/sam-ba/sam-ba.mk new file mode 100644 index 0000000000..2a3c2a1aa1 --- /dev/null +++ b/package/sam-ba/sam-ba.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# sam-ba +# +################################################################################ + +SAM_BA_SITE = http://www.atmel.com/dyn/resources/prod_documents +SAM_BA_VERSION = 2.15 +SAM_BA_SOURCE = sam-ba_$(SAM_BA_VERSION).zip +SAM_BA_LICENSE = BSD-like (partly binary-only) +SAM_BA_LICENSE_FILES = doc/readme.txt + +define HOST_SAM_BA_EXTRACT_CMDS + $(UNZIP) -d $(BUILD_DIR) $(DL_DIR)/$(SAM_BA_SOURCE) + mv $(BUILD_DIR)/sam-ba_cdc_linux/* $(@D) + rmdir $(BUILD_DIR)/sam-ba_cdc_linux/ +endef + +# Since it's a prebuilt application and it does not conform to the +# usual Unix hierarchy, we install it in $(HOST_DIR)/opt/sam-ba and +# then create a symbolic link from $(HOST_DIR)/usr/bin to the +# application binary, for easier usage. + +define HOST_SAM_BA_INSTALL_CMDS + mkdir -p $(HOST_DIR)/opt/sam-ba/ + cp -a $(@D)/* $(HOST_DIR)/opt/sam-ba/ + ln -sf ../../opt/sam-ba/sam-ba $(HOST_DIR)/usr/bin/sam-ba +endef + +$(eval $(host-generic-package)) diff --git a/package/samba4/0001-disable-libbsd.patch b/package/samba4/0001-disable-libbsd.patch new file mode 100644 index 0000000000..67f79d0059 --- /dev/null +++ b/package/samba4/0001-disable-libbsd.patch @@ -0,0 +1,26 @@ +Disable libbsd support, samba4 uses a global config.h for its own +codebase and that of heimdal (when building with builtin). +This causes redefinition conflicts for link(2) when both standard unistd.h +and bsd/unistd.h get included. + +Signed-off-by: Gustavo Zacarias + +diff -Nura samba-4.2.0rc1.orig/lib/replace/wscript samba-4.2.0rc1/lib/replace/wscript +--- samba-4.2.0rc1.orig/lib/replace/wscript 2014-10-01 06:17:32.000000000 -0300 ++++ samba-4.2.0rc1/lib/replace/wscript 2014-10-01 07:21:13.559498987 -0300 +@@ -282,15 +282,6 @@ + conf.CHECK_FUNCS('strtouq strtoll __strtoll strtoq memalign posix_memalign') + conf.CHECK_FUNCS('prctl') + +- # libbsd on some platforms provides strlcpy and strlcat +- if not conf.CHECK_FUNCS('strlcpy strlcat'): +- conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', +- checklibc=True) +- if not conf.CHECK_FUNCS('getpeereid'): +- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') +- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): +- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') +- + conf.CHECK_CODE(''' + struct ucred cred; + socklen_t cred_len; diff --git a/package/samba4/Config.in b/package/samba4/Config.in new file mode 100644 index 0000000000..5ae2c366ab --- /dev/null +++ b/package/samba4/Config.in @@ -0,0 +1,48 @@ +comment "samba4 needs a toolchain w/ RPC, wchar, dynamic library, threads" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_NATIVE_RPC \ + || BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + +config BR2_PACKAGE_SAMBA4 + bool "samba4" + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR # e2fsprogs + depends on BR2_TOOLCHAIN_HAS_NATIVE_RPC + depends on BR2_TOOLCHAIN_HAS_THREADS # python -> libffi + depends on !BR2_STATIC_LIBS # python + depends on !BR2_nios2 # binary too large, relocations don't fit + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_E2FSPROGS + select BR2_PACKAGE_POPT + select BR2_PACKAGE_PYTHON + select BR2_PACKAGE_ZLIB + help + Provides secure, stable and fast file and print services + for all clients using the SMB/CIFS protocol, such as all + versions of DOS, Windows, OS/2, Linux and many others. + + http://www.samba.org/ + +if BR2_PACKAGE_SAMBA4 + +config BR2_PACKAGE_SAMBA4_AD_DC + bool "AD DC" + select BR2_PACKAGE_GNUTLS + help + Enable Active Directory Domain Controller functionality. + +config BR2_PACKAGE_SAMBA4_ADS + bool "ADS" + select BR2_PACKAGE_OPENLDAP + help + Enable Active Directory member Server functionality. + +config BR2_PACKAGE_SAMBA4_SMBTORTURE + bool "smbtorture" + help + Install the smbtorture test suite. + It's normally used for validation and stress testing. + Approximately +5 MB of stripped uncompressed target space. + +endif diff --git a/package/samba4/S91smb b/package/samba4/S91smb new file mode 100644 index 0000000000..c8c5fc86a4 --- /dev/null +++ b/package/samba4/S91smb @@ -0,0 +1,56 @@ +#!/bin/sh + +[ -f /etc/samba/smb.conf ] || exit 0 + +mkdir -p /var/log/samba + +start() { + printf "Starting SMB services: " + smbd -D + [ $? = 0 ] && echo "OK" || echo "FAIL" + + printf "Starting NMB services: " + nmbd -D + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + printf "Shutting down SMB services: " + kill -9 `pidof smbd` + [ $? = 0 ] && echo "OK" || echo "FAIL" + + printf "Shutting down NMB services: " + kill -9 `pidof nmbd` + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +restart() { + stop + start +} + +reload() { + printf "Reloading smb.conf file: " + kill -HUP `pidof smbd` + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac + +exit $? diff --git a/package/samba4/samba4-cache.txt b/package/samba4/samba4-cache.txt new file mode 100644 index 0000000000..c9e34b630b --- /dev/null +++ b/package/samba4/samba4-cache.txt @@ -0,0 +1,38 @@ +Checking simple C program: OK +rpath library support: OK +-Wl,--version-script support: OK +Checking getconf LFS_CFLAGS: NO +Checking for large file support without additional flags: OK +Checking for -D_LARGE_FILES: OK +Checking correct behavior of strtoll: NO +Checking for working strptime: OK +Checking for C99 vsnprintf: OK +Checking for HAVE_SHARED_MMAP: OK +Checking for HAVE_MREMAP: OK +Checking for HAVE_INCOHERENT_MMAP: NO +Checking for HAVE_SECURE_MKSTEMP: OK +Checking for HAVE_IFACE_GETIFADDRS: OK +Checking for kernel change notify support: OK +Checking for Linux kernel oplocks: OK +Checking for kernel share modes: OK +Checking if can we convert from CP850 to UCS-2LE: OK +Checking if can we convert from UTF-8 to UCS-2LE: OK +Checking whether we can use Linux thread-specific credentials with 32-bit system calls: OK +Checking whether we can use Linux thread-specific credentials: OK +Checking whether setreuid is available: OK +Checking whether setresuid is available: OK +Checking whether seteuid is available: OK +Checking whether fcntl locking is available: OK +Checking for the maximum value of the 'time_t' type: OK +Checking whether the realpath function allows a NULL argument: OK +Checking whether POSIX capabilities are available: OK +Checking for ftruncate extend: OK +vfs_fileid checking for statfs() and struct statfs.f_fsid: OK +getcwd takes a NULL argument: OK +Checking uname sysname type: "Linux" +Checking uname release type: "3.0.0" +Checking uname version type: "#1 Tue Nov 1 12:34:56 UTC 2013" +Checking value of NSIG: "65" +Checking value of _NSIG: "65" +Checking value of SIGRTMAX: "64" +Checking value of SIGRTMIN: "34" diff --git a/package/samba4/samba4.hash b/package/samba4/samba4.hash new file mode 100644 index 0000000000..042c7db6bd --- /dev/null +++ b/package/samba4/samba4.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 031e6ada6d15deae6850845eed41497af32207fb679d6c6c74f19acc99d437ba samba-4.4.3.tar.gz diff --git a/package/samba4/samba4.mk b/package/samba4/samba4.mk new file mode 100644 index 0000000000..c09706882a --- /dev/null +++ b/package/samba4/samba4.mk @@ -0,0 +1,173 @@ +################################################################################ +# +# samba4 +# +################################################################################ + +SAMBA4_VERSION = 4.4.3 +SAMBA4_SITE = http://ftp.samba.org/pub/samba/stable +SAMBA4_SOURCE = samba-$(SAMBA4_VERSION).tar.gz +SAMBA4_INSTALL_STAGING = YES +SAMBA4_LICENSE = GPLv3+ +SAMBA4_LICENSE_FILES = COPYING +SAMBA4_DEPENDENCIES = \ + host-e2fsprogs host-heimdal host-python \ + e2fsprogs popt python zlib \ + $(if $(BR2_PACKAGE_LIBAIO),libaio) \ + $(if $(BR2_PACKAGE_LIBBSD),libbsd) \ + $(if $(BR2_PACKAGE_LIBCAP),libcap) \ + $(if $(BR2_PACKAGE_READLINE),readline) + +ifeq ($(BR2_PACKAGE_ACL),y) +SAMBA4_CONF_OPTS += --with-acl-support +SAMBA4_DEPENDENCIES += acl +else +SAMBA4_CONF_OPTS += --without-acl-support +endif + +ifeq ($(BR2_PACKAGE_CUPS),y) +SAMBA4_CONF_ENV += CUPS_CONFIG="$(STAGING_DIR)/usr/bin/cups-config" +SAMBA4_CONF_OPTS += --enable-cups +SAMBA4_DEPENDENCIES += cups +else +SAMBA4_CONF_OPTS += --disable-cups +endif + +ifeq ($(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_AVAHI_DAEMON),yy) +SAMBA4_CONF_OPTS += --enable-avahi +SAMBA4_DEPENDENCIES += avahi +else +SAMBA4_CONF_OPTS += --disable-avahi +endif + +ifeq ($(BR2_PACKAGE_GAMIN),y) +SAMBA4_CONF_OPTS += --with-fam +SAMBA4_DEPENDENCIES += gamin +else +SAMBA4_CONF_OPTS += --without-fam +endif + +ifeq ($(BR2_PACKAGE_GETTEXT),y) +SAMBA4_DEPENDENCIES += gettext +else +SAMBA4_CONF_OPTS += --without-gettext +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +SAMBA4_CONF_OPTS += --enable-gnutls +SAMBA4_DEPENDENCIES += gnutls +else +SAMBA4_CONF_OPTS += --disable-gnutls +endif + +ifeq ($(BR2_PACKAGE_NCURSES_TARGET_FORM)$(BR2_PACKAGE_NCURSES_TARGET_MENU)$(BR2_PACKAGE_NCURSES_TARGET_PANEL),yyy) +SAMBA4_CONF_ENV += NCURSES_CONFIG="$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)" +SAMBA4_DEPENDENCIES += ncurses +else +SAMBA4_CONF_OPTS += --without-regedit +endif + +# The ctdb tests (cluster) need bash and take up some space +# They're normally intended for debugging so remove them +define SAMBA4_REMOVE_CTDB_TESTS + rm -rf $(TARGET_DIR)/usr/lib/ctdb-tests + rm -rf $(TARGET_DIR)/usr/share/ctdb-tests + rm -f $(TARGET_DIR)/usr/bin/ctdb_run_*tests +endef +SAMBA4_POST_INSTALL_TARGET_HOOKS += SAMBA4_REMOVE_CTDB_TESTS + +define SAMBA4_CONFIGURE_CMDS + cp package/samba4/samba4-cache.txt $(@D)/cache.txt; + echo 'Checking uname machine type: $(BR2_ARCH)' >>$(@D)/cache.txt; + (cd $(@D); \ + PYTHON_CONFIG="$(STAGING_DIR)/usr/bin/python-config" \ + python_LDFLAGS="" \ + python_LIBDIR="" \ + $(TARGET_CONFIGURE_OPTS) \ + $(SAMBA4_CONF_ENV) \ + ./buildtools/bin/waf configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-libiconv=$(STAGING_DIR)/usr \ + --enable-fhs \ + --cross-compile \ + --cross-answers=$(@D)/cache.txt \ + --hostcc=gcc \ + --disable-rpath \ + --disable-rpath-install \ + --disable-iprint \ + --without-pam \ + --without-dmapi \ + --disable-glusterfs \ + --with-cluster-support \ + --bundled-libraries='!asn1_compile,!compile_et' \ + $(SAMBA4_CONF_OPTS) \ + ) +endef + +define SAMBA4_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define SAMBA4_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(STAGING_DIR) install +endef + +define SAMBA4_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +# Samba just installs .py files so the purge causes problems with some tools +ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY),y) +define SAMBA4_BUILD_PYC_FILES + PYTHONPATH="$(PYTHON_PATH)" \ + $(HOST_DIR)/usr/bin/python -c "import compileall; \ + compileall.compile_dir('$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/samba')" +endef +SAMBA4_POST_INSTALL_TARGET_HOOKS += SAMBA4_BUILD_PYC_FILES +endif + +ifeq ($(BR2_PACKAGE_SAMBA4_AD_DC),) +SAMBA4_CONF_OPTS += --without-ad-dc +endif + +ifeq ($(BR2_PACKAGE_SAMBA4_ADS),y) +SAMBA4_CONF_OPTS += --with-ads --with-ldap --with-shared-modules=idmap_ad +SAMBA4_DEPENDENCIES += openldap +else +SAMBA4_CONF_OPTS += --without-ads --without-ldap +endif + +ifeq ($(BR2_PACKAGE_SAMBA4_SMBTORTURE),) +define SAMBA4_REMOVE_SMBTORTURE + rm -f $(TARGET_DIR)/usr/bin/smbtorture +endef +SAMBA4_POST_INSTALL_TARGET_HOOKS += SAMBA4_REMOVE_SMBTORTURE +endif + +define SAMBA4_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/samba4/S91smb \ + $(TARGET_DIR)/etc/init.d/S91smb +endef + +define SAMBA4_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 $(@D)/packaging/systemd/nmb.service \ + $(TARGET_DIR)/usr/lib/systemd/system/nmb.service + $(INSTALL) -D -m 644 $(@D)/packaging/systemd/smb.service \ + $(TARGET_DIR)/usr/lib/systemd/system/smb.service + $(INSTALL) -D -m 644 $(@D)/packaging/systemd/winbind.service \ + $(TARGET_DIR)/usr/lib/systemd/system/winbind.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/nmb.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/nmb.service + ln -sf ../../../../usr/lib/systemd/system/smb.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/smb.service + ln -sf ../../../../usr/lib/systemd/system/winbind.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/winbind.service + $(INSTALL) -D -m 644 $(@D)/packaging/systemd/samba.conf.tmp \ + $(TARGET_DIR)/etc/tmpfiles.d/samba.conf + printf "d /var/log/samba 755 root root\n" >>$(TARGET_DIR)/etc/tmpfiles.d/samba.conf +endef + +$(eval $(generic-package)) diff --git a/package/sane-backends/0001-qcam-x86.patch b/package/sane-backends/0001-qcam-x86.patch new file mode 100644 index 0000000000..f14dd0e980 --- /dev/null +++ b/package/sane-backends/0001-qcam-x86.patch @@ -0,0 +1,61 @@ +[PATCH] backend/qcam.c: fix build on !x86 + +inb/outb/ioperm are x86 specific interfaces, so replace with noops on +!x86. + +Inspired by similar patch in openwrt: +https://dev.openwrt.org/ticket/5689 + +Signed-off-by: Peter Korsgaard +--- + backend/qcam.c | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +Index: sane-backends-1.0.22/backend/qcam.c +=================================================================== +--- sane-backends-1.0.22.orig/backend/qcam.c ++++ sane-backends-1.0.22/backend/qcam.c +@@ -205,12 +205,20 @@ + + #endif /* || || */ + ++/* inb / outb only exist on x86 */ ++#if defined(__i386__) || defined(__x86_64__) + #define read_lpdata(d) inb ((d)->port) + #define read_lpstatus(d) inb ((d)->port + 1) + #define read_lpcontrol(d) inb ((d)->port + 2) + #define write_lpdata(d,v) outb ((v), (d)->port) + #define write_lpcontrol(d,v) outb ((v), (d)->port + 2) +- ++#else ++#define read_lpdata(d) 0 ++#define read_lpstatus(d) 0 ++#define read_lpcontrol(d) 0 ++#define write_lpdata(d,v) ++#define write_lpcontrol(d,v) ++#endif + + static SANE_Status + enable_ports (QC_Device * q) +@@ -219,8 +227,10 @@ + if (q->port < 0x278 || q->port > 0x3bc) + return SANE_STATUS_INVAL; + ++#if defined(__i386__) || defined(__x86_64__) + if (ioperm (q->port, 3, 1) < 0) + return SANE_STATUS_INVAL; ++#endif + + return SANE_STATUS_GOOD; + } +@@ -228,8 +238,10 @@ + static SANE_Status + disable_ports (QC_Device * q) + { ++#if defined(__i386__) || defined(__x86_64__) + if (ioperm (q->port, 3, 0) < 0) + return SANE_STATUS_INVAL; ++#endif + + return SANE_STATUS_GOOD; + } diff --git a/package/sane-backends/Config.in b/package/sane-backends/Config.in new file mode 100644 index 0000000000..8156e858dc --- /dev/null +++ b/package/sane-backends/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_SANE_BACKENDS + bool "sane-backends" + depends on BR2_USE_MMU # fork() + help + SANE - Scanner Access Now Easy + + http://www.sane-project.org + + Backends are included automatically based on the libraries that have + been selected: libusb, jpeg, tiff, avahi (with dbus and libglib2), + and netsnmp. diff --git a/package/sane-backends/sane-backends.hash b/package/sane-backends/sane-backends.hash new file mode 100644 index 0000000000..a7693e2527 --- /dev/null +++ b/package/sane-backends/sane-backends.hash @@ -0,0 +1,2 @@ +# From http://www.sane-project.org/sane-md5sums.txt +md5 f9ed5405b3c12f07c6ca51ee60225fe7 sane-backends-1.0.25.tar.gz diff --git a/package/sane-backends/sane-backends.mk b/package/sane-backends/sane-backends.mk new file mode 100644 index 0000000000..37e5136c11 --- /dev/null +++ b/package/sane-backends/sane-backends.mk @@ -0,0 +1,78 @@ +################################################################################ +# +# sane-backends +# +################################################################################ + +SANE_BACKENDS_VERSION = 1.0.25 +SANE_BACKENDS_SITE = https://alioth.debian.org/frs/download.php/file/4146 +SANE_BACKENDS_CONFIG_SCRIPTS = sane-config +SANE_BACKENDS_LICENSE = GPLv2+ +SANE_BACKENDS_LICENSE_FILES = COPYING +SANE_BACKENDS_INSTALL_STAGING = YES + +SANE_BACKENDS_CONF_OPTS = \ + $(if $(BR2_TOOLCHAIN_HAS_THREADS),--enable-pthread,--disable-pthread) + +ifeq ($(BR2_INIT_SYSTEMD),y) +SANE_BACKENDS_CONF_OPTS += --with-systemd +SANE_BACKENDS_DEPENDENCIES += systemd +else +SANE_BACKENDS_CONF_OPTS += --without-systemd +endif + +ifeq ($(BR2_PACKAGE_LIBUSB),y) +SANE_BACKENDS_DEPENDENCIES += libusb +SANE_BACKENDS_CONF_OPTS += --enable-libusb_1_0 +else +SANE_BACKENDS_CONF_OPTS += --disable-libusb +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +SANE_BACKENDS_DEPENDENCIES += jpeg +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) +SANE_BACKENDS_DEPENDENCIES += tiff +endif + +ifeq ($(BR2_PACKAGE_LIBV4L),y) +SANE_BACKENDS_DEPENDENCIES += libv4l +endif + +ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_DBUS)$(BR2_PACKAGE_LIBGLIB2),yyy) +SANE_BACKENDS_DEPENDENCIES += avahi +SANE_BACKENDS_CONF_OPTS += --enable-avahi +endif + +ifeq ($(BR2_PACKAGE_NETSNMP),y) +SANE_BACKENDS_CONF_ENV += ac_cv_path_SNMP_CONFIG_PATH=$(STAGING_DIR)/usr/bin/net-snmp-config +SANE_BACKENDS_DEPENDENCIES += netsnmp +else +SANE_BACKENDS_CONF_OPTS += --without-snmp +endif + +define SANE_BACKENDS_DISABLE_DOCS + $(SED) 's/ doc//' $(@D)/Makefile +endef + +SANE_BACKENDS_POST_CONFIGURE_HOOKS += SANE_BACKENDS_DISABLE_DOCS + +define SANE_BACKENDS_USERS + saned -1 saned -1 * /etc/sane.d - - Saned User +endef + +define SANE_BACKENDS_INSTALL_INIT_SYSTEMD + $(INSTALL) -m 0644 -D package/sane-backends/saned.socket \ + $(TARGET_DIR)/usr/lib/systemd/system/saned.socket + mkdir -p $(TARGET_DIR)/etc/systemd/system/socket.target.wants + ln -sf ../../../../usr/lib/systemd/system/saned.socket \ + $(TARGET_DIR)/etc/systemd/system/socket.target.wants/saned.socket + $(INSTALL) -m 0644 -D package/sane-backends/saned@.service \ + $(TARGET_DIR)/usr/lib/systemd/system/saned@.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/saned@.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/saned@.service +endef + +$(eval $(autotools-package)) diff --git a/package/sane-backends/saned.socket b/package/sane-backends/saned.socket new file mode 100644 index 0000000000..1aa19e703c --- /dev/null +++ b/package/sane-backends/saned.socket @@ -0,0 +1,10 @@ +[Unit] +Description=saned incoming socket + +[Socket] +ListenStream=6566 +Accept=yes +MaxConnections=1 + +[Install] +WantedBy=sockets.target diff --git a/package/sane-backends/saned@.service b/package/sane-backends/saned@.service new file mode 100644 index 0000000000..1905dbf5e2 --- /dev/null +++ b/package/sane-backends/saned@.service @@ -0,0 +1,18 @@ +[Unit] +Description=Scanner Service +Requires=saned.socket + +[Service] +ExecStart=/usr/sbin/saned +User=saned +Group=saned +StandardInput=null +StandardOutput=syslog +StandardError=syslog +Environment=SANE_CONFIG_DIR=/etc/sane.d +# If you need to debug your configuration uncomment the next line and +# change it as appropriate to set the desired debug options +# Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_BJNP=5 + +[Install] +Also=saned.socket diff --git a/package/sbc/Config.in b/package/sbc/Config.in new file mode 100644 index 0000000000..f1dbc0ec2c --- /dev/null +++ b/package/sbc/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_SBC + bool "sbc" + select BR2_PACKAGE_LIBSNDFILE + help + An audio codec to connect bluetooth high quality audio + devices like headphones or loudspeakers. + + http://www.bluez.org/ diff --git a/package/sbc/sbc.hash b/package/sbc/sbc.hash new file mode 100644 index 0000000000..be3c8f76f4 --- /dev/null +++ b/package/sbc/sbc.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/bluetooth/sha256sums.asc +sha256 e61022cf576f14190241e7071753fdacdce5d1dea89ffd704110fc50be689309 sbc-1.3.tar.xz diff --git a/package/sbc/sbc.mk b/package/sbc/sbc.mk new file mode 100644 index 0000000000..60ebc74819 --- /dev/null +++ b/package/sbc/sbc.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# sbc +# +################################################################################ + +SBC_VERSION = 1.3 +SBC_SOURCE = sbc-$(SBC_VERSION).tar.xz +SBC_SITE = $(BR2_KERNEL_MIRROR)/linux/bluetooth +SBC_INSTALL_STAGING = YES +SBC_DEPENDENCIES = libsndfile host-pkgconf +SBC_LICENSE = GPLv2+ (programs), LGPLv2.1+ (library) +SBC_LICENSE_FILES = COPYING COPYING.LIB + +$(eval $(autotools-package)) diff --git a/package/sconeserver/Config.in b/package/sconeserver/Config.in new file mode 100644 index 0000000000..4083aa7dce --- /dev/null +++ b/package/sconeserver/Config.in @@ -0,0 +1,106 @@ +menuconfig BR2_PACKAGE_SCONESERVER + bool "sconeserver" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_PACKAGE_PCRE + help + Sconeserver is a modular, object-orientated and extremely versatile + network server framework for GNU/Linux and UNIX-like platforms. + + http://www.sconemad.com/sconeserver/ + +if BR2_PACKAGE_SCONESERVER + +comment "Sconeserver modules" + +config BR2_PACKAGE_SCONESERVER_EXAMPLES + bool "examples" + help + Example modules for Sconeserver + +config BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE + bool "http::sconesite" + select BR2_PACKAGE_LIBXML2 + help + http::sconesite module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE_IMAGE + bool "http::sconesite::image" + depends on BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE + depends on BR2_USE_MMU # imagemagick + select BR2_PACKAGE_IMAGEMAGICK + help + http::sconesite::image module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_MYSQL + bool "mysql" + depends on BR2_USE_MMU # mysql + select BR2_PACKAGE_MYSQL + help + MySQL module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_BLUETOOTH + bool "bluetooth" + depends on BR2_USE_WCHAR # bluez->libglib2 + depends on BR2_USE_MMU # bluez->dbus + depends on BR2_TOOLCHAIN_HAS_THREADS # bluez->dbus, bluez->libglib2 + depends on !BR2_STATIC_LIBS # bluez_utils + select BR2_PACKAGE_BLUEZ_UTILS + help + Bluetooth module for Sconeserver + +comment "bluetooth support needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_SCONESERVER_RSS + bool "rss" + select BR2_PACKAGE_LIBXML2 + help + RSS module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_LOCATION + bool "location" + depends on BR2_USE_MMU # gpsd + depends on BR2_TOOLCHAIN_HAS_THREADS # gpsd + depends on !BR2_STATIC_LIBS # gpsd + select BR2_PACKAGE_GPSD + help + Location module for Sconeserver + +comment "location support needs a toolchain w/ theads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBRARY + +config BR2_PACKAGE_SCONESERVER_LETTUCE + bool "lettuce" + help + Sconeserver module for Lettuce embedded automation platform + + http://www.sconemad.com/lettuce/ + +config BR2_PACKAGE_SCONESERVER_MATHS + bool "maths" + select BR2_PACKAGE_MPFR + help + Mathematics module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_TESTBUILDER + bool "testbuilder" + help + Testbuilder module for Sconeserver + +config BR2_PACKAGE_SCONESERVER_UI + bool "ui" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + help + UI module for Sconeserver + +comment "ui module requires X.org" + depends on !BR2_PACKAGE_XORG7 + +endif # BR2_PACKAGE_SCONESERVER + +comment "sconeserver needs a toolchain w/ C++, NPTL" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS_NPTL) diff --git a/package/sconeserver/sconeserver.hash b/package/sconeserver/sconeserver.hash new file mode 100644 index 0000000000..2e1fe84237 --- /dev/null +++ b/package/sconeserver/sconeserver.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 442c29ae93f615b610983187023ba6c1a9ca69526cb07f69576efba1d29d9daf sconeserver-c4b8e14f6e9e06cbff5b4195f69d6fce9391a1cd.tar.gz diff --git a/package/sconeserver/sconeserver.mk b/package/sconeserver/sconeserver.mk new file mode 100644 index 0000000000..592de22d69 --- /dev/null +++ b/package/sconeserver/sconeserver.mk @@ -0,0 +1,114 @@ +################################################################################ +# +# sconeserver +# +################################################################################ + +SCONESERVER_VERSION = c4b8e14f6e9e06cbff5b4195f69d6fce9391a1cd +SCONESERVER_SITE = $(call github,sconemad,sconeserver,$(SCONESERVER_VERSION)) +SCONESERVER_LICENSE = GPLv2+ +SCONESERVER_LICENSE_FILES = COPYING +# fetching from Git, we need to generate the configure script +SCONESERVER_AUTORECONF = YES +SCONESERVER_DEPENDENCIES += pcre +# disable markdown module because its git submodule cmark +# https://github.com/sconemad/sconeserver/tree/master/markdown +# has no cross-compile support provided by the sconeserver build system +SCONESERVER_CONF_OPTS += --with-ip --with-local --with-ip6 --without-markdown + +# Sconeserver configure script fails to find the libxml2 headers. +ifeq ($(BR2_PACKAGE_LIBXML2),y) +SCONESERVER_CONF_OPTS += \ + --with-xml2-config="$(STAGING_DIR)/usr/bin/xml2-config" +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SCONESERVER_DEPENDENCIES += openssl +SCONESERVER_CONF_OPTS += --with-ssl +ifeq ($(BR2_STATIC_LIBS),y) +SCONESERVER_CONF_ENV += SSL_LIBADD=-lz +endif +else +SCONESERVER_CONF_OPTS += --without-ssl +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_EXAMPLES),y) +SCONESERVER_CONF_OPTS += --with-examples +else +SCONESERVER_CONF_OPTS += --without-examples +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE),y) +SCONESERVER_DEPENDENCIES += libxml2 +SCONESERVER_CONF_OPTS += --with-sconesite +else +SCONESERVER_CONF_OPTS += --without-sconesite +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_HTTP_SCONESITE_IMAGE),y) +SCONESERVER_DEPENDENCIES += imagemagick host-pkgconf +SCONESERVER_CONF_OPTS += \ + --with-sconesite-image \ + --with-Magick++-config="$(STAGING_DIR)/usr/bin/Magick++-config" +else +SCONESERVER_CONF_OPTS += --without-sconesite-image --with-Magick++-config=no +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_MYSQL),y) +SCONESERVER_DEPENDENCIES += mysql +SCONESERVER_CONF_OPTS += \ + --with-mysql \ + --with-mysql_config="$(STAGING_DIR)/usr/bin/mysql_config" \ + LDFLAGS="$(TARGET_LDFLAGS) -L$(STAGING_DIR)/usr/lib/mysql" +else +SCONESERVER_CONF_OPTS += --without-mysql +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_BLUETOOTH),y) +SCONESERVER_DEPENDENCIES += bluez_utils +SCONESERVER_CONF_OPTS += --with-bluetooth +else +SCONESERVER_CONF_OPTS += --without-bluetooth +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_RSS),y) +SCONESERVER_DEPENDENCIES += libxml2 +SCONESERVER_CONF_OPTS += --with-rss +else +SCONESERVER_CONF_OPTS += --without-rss +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_LOCATION),y) +SCONESERVER_DEPENDENCIES += host-pkgconf gpsd +SCONESERVER_CONF_OPTS += --with-location +else +SCONESERVER_CONF_OPTS += --without-location +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_LETTUCE),y) +SCONESERVER_CONF_OPTS += --with-lettuce +else +SCONESERVER_CONF_OPTS += --without-lettuce +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_MATHS),y) +SCONESERVER_DEPENDENCIES += mpfr +SCONESERVER_CONF_OPTS += --with-maths +else +SCONESERVER_CONF_OPTS += --without-maths +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_TESTBUILDER),y) +SCONESERVER_CONF_OPTS += --with-testbuilder +else +SCONESERVER_CONF_OPTS += --without-testbuilder +endif + +ifeq ($(BR2_PACKAGE_SCONESERVER_UI),y) +SCONESERVER_DEPENDENCIES += xlib_libX11 +SCONESERVER_CONF_OPTS += --with-ui +else +SCONESERVER_CONF_OPTS += --without-ui +endif + +$(eval $(autotools-package)) diff --git a/package/scons/scons.hash b/package/scons/scons.hash new file mode 100644 index 0000000000..1b47d6457a --- /dev/null +++ b/package/scons/scons.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 9442069999cf4b2caa94a5886ab4c2c71de1718ed5e9176c18e2b6dbca463b4b scons-2.3.0.tar.gz diff --git a/package/scons/scons.mk b/package/scons/scons.mk new file mode 100644 index 0000000000..39fb258d0d --- /dev/null +++ b/package/scons/scons.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# scons +# +################################################################################ + +SCONS_VERSION = 2.3.0 +SCONS_SITE = http://downloads.sourceforge.net/project/scons/scons/$(SCONS_VERSION) +SCONS_LICENSE = MIT +SCONS_LICENSE_FILES = LICENSE.txt +SCONS_SETUP_TYPE = distutils + +HOST_SCONS_NEEDS_HOST_PYTHON = python2 + +HOST_SCONS_INSTALL_OPTS = \ + --install-lib=$(HOST_DIR)/usr/lib/scons-$(SCONS_VERSION) + +$(eval $(host-python-package)) + +# variables used by other packages +SCONS = $(HOST_DIR)/usr/bin/python2 $(HOST_DIR)/usr/bin/scons $(if $(QUIET),-s) diff --git a/package/screen/0001-compiler-sanity-checks.patch b/package/screen/0001-compiler-sanity-checks.patch new file mode 100644 index 0000000000..fe6c3fdbc1 --- /dev/null +++ b/package/screen/0001-compiler-sanity-checks.patch @@ -0,0 +1,62 @@ +From: Maarten ter Huurne +Date: Sat, 13 Sep 2014 10:27:27 +0200 +Subject: Removed redundant compiler sanity checks + +AC_PROG_CC already performs sanity checks. And unlike the removed +checks, it does so in a way that supports cross compilation. + +Signed-off-by: Maarten ter Huurne +[Ricardo: rebase on top of 4.3.1] +Signed-off-by: Ricardo Martincoski +--- + configure.ac | 27 --------------------------- + 1 file changed, 27 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ffe2e37..27690a6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -48,31 +48,6 @@ AC_PROG_GCC_TRADITIONAL + AC_ISC_POSIX + AC_USE_SYSTEM_EXTENSIONS + +-AC_TRY_RUN(main(){exit(0);},,[ +-if test $CC != cc ; then +-AC_NOTE(Your $CC failed - restarting with CC=cc) +-AC_NOTE() +-CC=cc +-export CC +-exec $0 $configure_args +-fi +-]) +- +-AC_TRY_RUN(main(){exit(0);},, +-exec 5>&2 +-eval $ac_link +-AC_NOTE(CC=$CC; CFLAGS=$CFLAGS; LIBS=$LIBS;) +-AC_NOTE($ac_compile) +-AC_MSG_ERROR(Can't run the compiler - sorry)) +- +-AC_TRY_RUN([ +-main() +-{ +- int __something_strange_(); +- __something_strange_(0); +-} +-],AC_MSG_ERROR(Your compiler does not set the exit status - sorry)) +- + AC_PROG_AWK + + AC_PROG_INSTALL +@@ -1300,8 +1275,6 @@ fi + dnl Ptx bug workaround -- insert -lc after -ltermcap + test -n "$seqptx" && LIBS="-ltermcap -lc -lsocket -linet -lnsl -lsec -lseq" + +-AC_TRY_RUN(main(){exit(0);},,AC_MSG_ERROR(Can't run the compiler - internal error. Sorry.)) +- + ETCSCREENRC= + AC_MSG_CHECKING(for the global screenrc file) + AC_ARG_WITH(sys-screenrc, [ --with-sys-screenrc=path to the global screenrc file], [ ETCSCREENRC="${withval}" ]) +-- +1.8.4.5 + diff --git a/package/screen/0002-no-memcpy-fallback.patch b/package/screen/0002-no-memcpy-fallback.patch new file mode 100644 index 0000000000..f3a6a70d2a --- /dev/null +++ b/package/screen/0002-no-memcpy-fallback.patch @@ -0,0 +1,124 @@ +From: Maarten ter Huurne +Date: Sat, 13 Sep 2014 11:37:59 +0200 +Subject: Do not use memcpy as an alternative for bcopy/memmove + +The configure script runs a small test program to check whether +memcpy can handle overlapping memory areas. However, it is not valid +to conclude that if a single case of overlapping memory is handled +correctly, all cases will be handled correctly. + +Since screen already has its own bcopy implementation as a fallback +for the case that bcopy and memmove are unusable, removing the memcpy +option should not break any systems. + +Signed-off-by: Maarten ter Huurne +[Ricardo: rebase on top of 4.3.1] +Signed-off-by: Ricardo Martincoski +--- + acconfig.h | 3 +-- + configure.ac | 18 +----------------- + os.h | 8 ++------ + osdef.h.in | 10 +--------- + 4 files changed, 5 insertions(+), 34 deletions(-) + +diff --git a/acconfig.h b/acconfig.h +index 2e46985..9b0b9d4 100644 +--- a/acconfig.h ++++ b/acconfig.h +@@ -476,7 +476,7 @@ + #undef GETTTYENT + + /* +- * Define USEBCOPY if the bcopy/memcpy from your system's C library ++ * Define USEBCOPY if the bcopy from your system's C library + * supports the overlapping of source and destination blocks. When + * undefined, screen uses its own (probably slower) version of bcopy(). + * +@@ -487,7 +487,6 @@ + * Their memove fails the test in the configure script. Sigh. (Juergen) + */ + #undef USEBCOPY +-#undef USEMEMCPY + #undef USEMEMMOVE + + /* +diff --git a/configure.ac b/configure.ac +index 27690a6..b8e3bec 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1145,7 +1145,7 @@ AC_TRY_LINK(,[getttyent();], AC_DEFINE(GETTTYENT)) + AC_CHECKING(fdwalk) + AC_TRY_LINK([#include ], [fdwalk(NULL, NULL);],AC_DEFINE(HAVE_FDWALK)) + +-AC_CHECKING(whether memcpy/memmove/bcopy handles overlapping arguments) ++AC_CHECKING(whether memmove/bcopy handles overlapping arguments) + AC_TRY_RUN([ + main() { + char buf[10]; +@@ -1175,22 +1175,6 @@ main() { + exit(0); /* libc version works properly. */ + }], AC_DEFINE(USEMEMMOVE)) + +- +-AC_TRY_RUN([ +-#define bcopy(s,d,l) memcpy(d,s,l) +-main() { +- char buf[10]; +- strcpy(buf, "abcdefghi"); +- bcopy(buf, buf + 2, 3); +- if (strncmp(buf, "ababcf", 6)) +- exit(1); +- strcpy(buf, "abcdefghi"); +- bcopy(buf + 2, buf, 3); +- if (strncmp(buf, "cdedef", 6)) +- exit(1); +- exit(0); /* libc version works properly. */ +-}], AC_DEFINE(USEMEMCPY)) +- + AC_SYS_LONG_FILE_NAMES + + AC_MSG_CHECKING(for vsprintf) +diff --git a/os.h b/os.h +index e827ac9..0b41fb9 100644 +--- a/os.h ++++ b/os.h +@@ -142,12 +142,8 @@ extern int errno; + # ifdef USEMEMMOVE + # define bcopy(s,d,len) memmove(d,s,len) + # else +-# ifdef USEMEMCPY +-# define bcopy(s,d,len) memcpy(d,s,len) +-# else +-# define NEED_OWN_BCOPY +-# define bcopy xbcopy +-# endif ++# define NEED_OWN_BCOPY ++# define bcopy xbcopy + # endif + #endif + +diff --git a/osdef.h.in b/osdef.h.in +index 8687b60..e4057a0 100644 +--- a/osdef.h.in ++++ b/osdef.h.in +@@ -58,16 +58,8 @@ extern int bcmp __P((char *, char *, int)); + extern int killpg __P((int, int)); + #endif + +-#ifndef USEBCOPY +-# ifdef USEMEMCPY +-extern void memcpy __P((char *, char *, int)); +-# else +-# ifdef USEMEMMOVE ++#if defined(USEMEMMOVE) && !defined(USEBCOPY) + extern void memmove __P((char *, char *, int)); +-# else +-extern void bcopy __P((char *, char *, int)); +-# endif +-# endif + #else + extern void bcopy __P((char *, char *, int)); + #endif +-- +1.8.4.5 + diff --git a/package/screen/0003-cross-compilation-AC_TRY_RUN.patch b/package/screen/0003-cross-compilation-AC_TRY_RUN.patch new file mode 100644 index 0000000000..eafe3d5ad1 --- /dev/null +++ b/package/screen/0003-cross-compilation-AC_TRY_RUN.patch @@ -0,0 +1,125 @@ +From: Maarten ter Huurne +Date: Sat, 13 Sep 2014 12:04:41 +0200 +Subject: Provide cross compilation alternatives for all AC_TRY_RUN uses + +Signed-off-by: Maarten ter Huurne +[Ricardo: rebase on top of 4.3.1] +Signed-off-by: Ricardo Martincoski +--- + configure.ac | 30 +++++++++++++++++++----------- + 1 file changed, 19 insertions(+), 11 deletions(-) + +diff --git a/configure.ac b/configure.ac +index b8e3bec..c4b7cd4 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -348,7 +348,8 @@ main() + exit(0); + } + ], AC_NOTE(- your fifos are usable) fifo=1, +-AC_NOTE(- your fifos are not usable)) ++AC_NOTE(- your fifos are not usable), ++AC_NOTE(- skipping check because we are cross compiling; assuming fifos are usable) fifo=1) + rm -f /tmp/conftest* + + if test -n "$fifo"; then +@@ -396,7 +397,8 @@ main() + exit(0); + } + ], AC_NOTE(- your implementation is ok), +-AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1) ++AC_NOTE(- you have a broken implementation) AC_DEFINE(BROKEN_PIPE) fifobr=1, ++AC_NOTE(- skipping check because we are cross compiling; assuming fifo implementation is ok)) + rm -f /tmp/conftest* + fi + +@@ -458,7 +460,8 @@ main() + exit(0); + } + ], AC_NOTE(- your sockets are usable) sock=1, +-AC_NOTE(- your sockets are not usable)) ++AC_NOTE(- your sockets are not usable), ++AC_NOTE(- skipping check because we are cross compiling; assuming sockets are usable) sock=1) + rm -f /tmp/conftest* + + if test -n "$sock"; then +@@ -497,7 +500,8 @@ main() + } + ],AC_NOTE(- you are normal), + AC_NOTE(- unix domain sockets are not kept in the filesystem) +-AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1) ++AC_DEFINE(SOCK_NOT_IN_FS) socknofs=1, ++AC_NOTE(- skipping check because we are cross compiling; assuming sockets are normal)) + rm -f /tmp/conftest* + fi + +@@ -624,7 +628,8 @@ main() + exit(0); + } + ],AC_NOTE(- select is ok), +-AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN)) ++AC_NOTE(- select can't count) AC_DEFINE(SELECT_BROKEN), ++AC_NOTE(- skipping check because we are cross compiling; assuming select is ok)) + + dnl + dnl **** termcap or terminfo **** +@@ -666,7 +671,8 @@ main() + { + exit(strcmp(tgoto("%p1%d", 0, 1), "1") ? 0 : 1); + }], AC_NOTE(- you use the termcap database), +-AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO)) ++AC_NOTE(- you use the terminfo database) AC_DEFINE(TERMINFO), ++AC_NOTE(- skipping check because we are cross compiling; assuming terminfo database is used) AC_DEFINE(TERMINFO)) + AC_CHECKING(ospeed) + AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED)) + +@@ -801,7 +807,8 @@ main() + else + AC_NOTE(- can't determine - assume ptys are world accessable) + fi +- ] ++ ], ++ AC_NOTE(- skipping check because we are cross compiling; assuming ptys are world accessable) + ) + rm -f conftest_grp + fi +@@ -885,7 +892,7 @@ AC_EGREP_CPP(yes, + #endif + ], load=1) + fi +-if test -z "$load" ; then ++if test -z "$load" && test "$cross_compiling" = no ; then + AC_CHECKING(for kernelfile) + for core in /unix /vmunix /dynix /hp-ux /xelos /dev/ksyms /kernel/unix /kernel/genunix /unicos /mach /netbsd /386bsd /dgux /bsd /stand/vmunix; do + if test -f $core || test -c $core; then +@@ -1078,7 +1085,7 @@ main() + #endif + exit(0); + } +-],,AC_DEFINE(SYSVSIGS)) ++],,AC_DEFINE(SYSVSIGS),:) + + fi + +@@ -1158,7 +1165,7 @@ main() { + if (strncmp(buf, "cdedef", 6)) + exit(1); + exit(0); /* libc version works properly. */ +-}], AC_DEFINE(USEBCOPY)) ++}], AC_DEFINE(USEBCOPY),,:) + + AC_TRY_RUN([ + #define bcopy(s,d,l) memmove(d,s,l) +@@ -1173,7 +1180,8 @@ main() { + if (strncmp(buf, "cdedef", 6)) + exit(1); + exit(0); /* libc version works properly. */ +-}], AC_DEFINE(USEMEMMOVE)) ++}], AC_DEFINE(USEMEMMOVE),, ++ AC_NOTE(- skipping check because we are cross compiling; use memmove) AC_DEFINE(USEMEMMOVE)) + + AC_SYS_LONG_FILE_NAMES + +-- +1.8.4.5 + diff --git a/package/screen/0004-cross-compilation-ignore-host-fs.patch b/package/screen/0004-cross-compilation-ignore-host-fs.patch new file mode 100644 index 0000000000..fa698ef1f7 --- /dev/null +++ b/package/screen/0004-cross-compilation-ignore-host-fs.patch @@ -0,0 +1,132 @@ +From: Maarten ter Huurne +Date: Sun, 14 Sep 2014 07:10:59 +0200 +Subject: When cross-compiling, skip checks that look in the host file system + +Signed-off-by: Maarten ter Huurne +[Ricardo: rebase on top of 4.3.1] +Signed-off-by: Ricardo Martincoski +--- + configure.ac | 23 +++++++++++++++++++---- + 1 file changed, 19 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c4b7cd4..9cf7cee 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -85,7 +85,7 @@ AC_ARG_ENABLE(socket-dir, + dnl + dnl **** special unix variants **** + dnl +-if test -n "$ISC"; then ++if test "$cross_compiling" = no && test -n "$ISC" ; then + AC_DEFINE(ISC) LIBS="$LIBS -linet" + fi + +@@ -96,10 +96,11 @@ dnl AC_DEFINE(OSF1) # this disables MIPS again.... + dnl fi + dnl fi + +-if test -f /sysV68 ; then ++if test "$cross_compiling" = no && test -f /sysV68 ; then + AC_DEFINE(sysV68) + fi + ++if test "$cross_compiling" = no ; then + AC_CHECKING(for MIPS) + if test -f /lib/libmld.a || test -f /usr/lib/libmld.a || test -f /usr/lib/cmplrs/cc/libmld.a; then + oldlibs="$LIBS" +@@ -123,6 +124,7 @@ AC_DEFINE(USE_WAIT2) LIBS="$LIBS -lbsd" ; CC="$CC -I/usr/include/bsd" + )) + fi + fi ++fi + + + AC_CHECKING(for Ultrix) +@@ -132,7 +134,7 @@ AC_EGREP_CPP(yes, + #endif + ], ULTRIX=1) + +-if test -f /usr/lib/libpyr.a ; then ++if test "$cross_compiling" = no && test -f /usr/lib/libpyr.a ; then + oldlibs="$LIBS" + LIBS="$LIBS -lpyr" + AC_CHECKING(Pyramid OSX) +@@ -679,17 +681,21 @@ AC_TRY_LINK(extern short ospeed;,ospeed=5;,,AC_DEFINE(NEED_OSPEED)) + dnl + dnl **** PTY specific things **** + dnl ++if test "$cross_compiling" = no ; then + AC_CHECKING(for /dev/ptc) + if test -r /dev/ptc; then + AC_DEFINE(HAVE_DEV_PTC) + fi ++fi + ++if test "$cross_compiling" = no ; then + AC_CHECKING(for SVR4 ptys) + sysvr4ptys= + if test -c /dev/ptmx ; then + AC_TRY_LINK([],[ptsname(0);grantpt(0);unlockpt(0);],[AC_DEFINE(HAVE_SVR4_PTYS) + sysvr4ptys=1]) + fi ++fi + + AC_CHECK_FUNCS(getpt) + +@@ -699,6 +705,7 @@ AC_CHECK_FUNCS(openpty,, + [AC_CHECK_LIB(util,openpty, [AC_DEFINE(HAVE_OPENPTY)] [LIBS="$LIBS -lutil"])]) + fi + ++if test "$cross_compiling" = no ; then + AC_CHECKING(for ptyranges) + if test -d /dev/ptym ; then + pdir='/dev/ptym' +@@ -722,6 +729,7 @@ p1=`echo $ptys | tr ' ' '\012' | sed -e 's/^.*\(.\)$/\1/g' | sort -u | tr -d '\ + AC_DEFINE_UNQUOTED(PTYRANGE0,"$p0") + AC_DEFINE_UNQUOTED(PTYRANGE1,"$p1") + fi ++fi + + dnl **** pty mode/group handling **** + dnl +@@ -869,14 +877,16 @@ fi + dnl + dnl **** loadav **** + dnl ++if test "$cross_compiling" = no ; then + AC_CHECKING(for libutil(s)) + test -f /usr/lib/libutils.a && LIBS="$LIBS -lutils" + test -f /usr/lib/libutil.a && LIBS="$LIBS -lutil" ++fi + + AC_CHECKING(getloadavg) + AC_TRY_LINK(,[getloadavg((double *)0, 0);], + AC_DEFINE(LOADAV_GETLOADAVG) load=1, +-if test -f /usr/lib/libkvm.a ; then ++if test "$cross_compiling" = no && test -f /usr/lib/libkvm.a ; then + olibs="$LIBS" + LIBS="$LIBS -lkvm" + AC_CHECKING(getloadavg with -lkvm) +@@ -1094,13 +1104,18 @@ dnl **** libraries **** + dnl + + AC_CHECKING(for crypt and sec libraries) ++if test "$cross_compiling" = no ; then + test -f /lib/libcrypt_d.a || test -f /usr/lib/libcrypt_d.a && LIBS="$LIBS -lcrypt_d" ++fi + oldlibs="$LIBS" + LIBS="$LIBS -lcrypt" + AC_CHECKING(crypt) + AC_TRY_LINK(,,,LIBS="$oldlibs") ++if test "$cross_compiling" = no ; then + test -f /lib/libsec.a || test -f /usr/lib/libsec.a && LIBS="$LIBS -lsec" + test -f /lib/libshadow.a || test -f /usr/lib/libshadow.a && LIBS="$LIBS -lshadow" ++fi ++ + oldlibs="$LIBS" + LIBS="$LIBS -lsun" + AC_CHECKING(IRIX sun library) +-- +1.8.4.5 + diff --git a/package/screen/0005-avoid-identifying-as-SVR4.patch b/package/screen/0005-avoid-identifying-as-SVR4.patch new file mode 100644 index 0000000000..745ef41931 --- /dev/null +++ b/package/screen/0005-avoid-identifying-as-SVR4.patch @@ -0,0 +1,54 @@ +From: Maarten ter Huurne +Date: Sun, 14 Sep 2014 11:16:58 +0200 +Subject: Avoid mis-identifying systems as SVR4 + +My openSUSE 13.1 Linux system was detected as SVR4 because it had +libelf installed. This leads to linking with libelf, even though no +symbols from that library were actually used, and to a workaround for +a buggy getlogin() being enabled. + +It is not documented which exact SVR4 system had the bug that the +workaround was added for, so all I could do is make an educated guess +at the #defines its compiler would be likely to set. + +Signed-off-by: Maarten ter Huurne +[Ricardo: rebase on top of 4.3.1] +Signed-off-by: Ricardo Martincoski +--- + configure.ac | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 9cf7cee..e09e4cf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -179,14 +179,24 @@ AC_EGREP_CPP(yes, + #endif + ], LIBS="$LIBS -lsocket -linet";seqptx=1) + ++AC_CHECKING(SVR4) ++AC_EGREP_CPP(yes, ++[main () { ++#if defined(SVR4) || defined(__SVR4) ++ yes; ++#endif ++], AC_NOTE(- you have a SVR4 system) AC_DEFINE(SVR4) svr4=1) ++if test -n "$svr4" ; then + oldlibs="$LIBS" + LIBS="$LIBS -lelf" + AC_CHECKING(SVR4) + AC_TRY_LINK([#include + ],, +-[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN), +-[AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) AC_DEFINE(BUGGYGETLOGIN))])] ++[AC_CHECK_HEADER(dwarf.h, AC_DEFINE(BUGGYGETLOGIN), ++[AC_CHECK_HEADER(elf.h, AC_DEFINE(BUGGYGETLOGIN))])] + ,LIBS="$oldlibs") ++fi ++ + AC_CHECK_HEADERS([stropts.h string.h strings.h]) + + AC_CHECKING(for Solaris 2.x) +-- +1.8.4.5 + diff --git a/package/screen/0006-install-no-backup-binary.patch b/package/screen/0006-install-no-backup-binary.patch new file mode 100644 index 0000000000..504862a299 --- /dev/null +++ b/package/screen/0006-install-no-backup-binary.patch @@ -0,0 +1,39 @@ +From: Maarten ter Huurne +Date: Sun, 14 Sep 2014 23:58:34 +0200 +Subject: Do not create backup of old installed binary + +This is a rather unusual feature that packagers will not expect. + +Signed-off-by: Maarten ter Huurne +--- + Makefile.in | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 187a69b..65549e9 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -83,12 +83,9 @@ screen: $(OFILES) + $(OPTIONS) $(CFLAGS) $< + + install_bin: .version screen +- -if [ -f $(DESTDIR)$(bindir)/$(SCREEN) ] && [ ! -f $(DESTDIR)$(bindir)/$(SCREEN).old ]; \ +- then mv $(DESTDIR)$(bindir)/$(SCREEN) $(DESTDIR)$(bindir)/$(SCREEN).old; fi + $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN) + -chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN) + # This doesn't work if $(bindir)/screen is a symlink +- -if [ -f $(DESTDIR)$(bindir)/screen ] && [ ! -f $(DESTDIR)$(bindir)/screen.old ]; then mv $(DESTDIR)$(bindir)/screen $(DESTDIR)$(bindir)/screen.old; fi + rm -f $(DESTDIR)$(bindir)/screen + (cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen) + cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS) +@@ -113,7 +110,6 @@ installdirs: + uninstall: .version + rm -f $(DESTDIR)$(bindir)/$(SCREEN) + rm -f $(DESTDIR)$(bindir)/screen +- -mv $(DESTDIR)$(bindir)/screen.old $(DESTDIR)$(bindir)/screen + rm -f $(DESTDIR)$(ETCSCREENRC) + cd doc; $(MAKE) uninstall + +-- +1.8.4.5 + diff --git a/package/screen/0007-install-always-chmod.patch b/package/screen/0007-install-always-chmod.patch new file mode 100644 index 0000000000..0aa7690b08 --- /dev/null +++ b/package/screen/0007-install-always-chmod.patch @@ -0,0 +1,29 @@ +From: Maarten ter Huurne +Date: Mon, 15 Sep 2014 00:03:05 +0200 +Subject: Change binary permission flags even if chown fails + +Typically when creating a package, the build is not run as root, so +the chown will fail. But the chmod can still be done. + +Signed-off-by: Maarten ter Huurne +--- + Makefile.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 65549e9..3c12fdb 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -84,7 +84,8 @@ screen: $(OFILES) + + install_bin: .version screen + $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN) +- -chown root $(DESTDIR)$(bindir)/$(SCREEN) && chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN) ++ -chown root $(DESTDIR)$(bindir)/$(SCREEN) ++ -chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN) + # This doesn't work if $(bindir)/screen is a symlink + rm -f $(DESTDIR)$(bindir)/screen + (cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen) +-- +1.8.4.5 + diff --git a/package/screen/0008-install-nonversioned-binary.patch b/package/screen/0008-install-nonversioned-binary.patch new file mode 100644 index 0000000000..ecbbd65197 --- /dev/null +++ b/package/screen/0008-install-nonversioned-binary.patch @@ -0,0 +1,31 @@ +From: Maarten ter Huurne +Date: Mon, 15 Sep 2014 00:06:20 +0200 +Subject: Support overriding SCREEN to get a non-versioned binary + +If a packager runs "make install SCREEN=screen", do not create +"screen" as a symlink to itself. + +Signed-off-by: Maarten ter Huurne +--- + Makefile.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile.in b/Makefile.in +index 3c12fdb..860f351 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -86,9 +86,11 @@ install_bin: .version screen + $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN) + -chown root $(DESTDIR)$(bindir)/$(SCREEN) + -chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN) ++ifneq (${SCREEN},screen) + # This doesn't work if $(bindir)/screen is a symlink + rm -f $(DESTDIR)$(bindir)/screen + (cd $(DESTDIR)$(bindir) && ln -f -s $(SCREEN) screen) ++endif + cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS) + + ############################################################################### +-- +1.8.4.5 + diff --git a/package/screen/0009-install-dir-dependency.patch b/package/screen/0009-install-dir-dependency.patch new file mode 100644 index 0000000000..9016cb90be --- /dev/null +++ b/package/screen/0009-install-dir-dependency.patch @@ -0,0 +1,43 @@ +From: Maarten ter Huurne +Date: Mon, 15 Sep 2014 02:27:09 +0200 +Subject: Ensure that installation dirs exist before copying files into them + +Since the "install_bin" target requires the installation directories +to exist, it should depend on the "installdirs" target. The previous +approach of having "install" depend on "installdirs" is not reliable. + +For example, in a parallel build, there was no guarantee that +"installdirs" would be finished before "install_bin" runs. Also if +the user requested only "install_bin" to be made, "installdirs" would +be skipped altogether. + +Signed-off-by: Maarten ter Huurne +--- + Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 860f351..f0fe08d 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -82,7 +82,7 @@ screen: $(OFILES) + $(CC) -c -I. -I$(srcdir) $(M_CFLAGS) $(CPPFLAGS) $(DEFS) \ + $(OPTIONS) $(CFLAGS) $< + +-install_bin: .version screen ++install_bin: .version screen installdirs + $(INSTALL_PROGRAM) screen $(DESTDIR)$(bindir)/$(SCREEN) + -chown root $(DESTDIR)$(bindir)/$(SCREEN) + -chmod 4755 $(DESTDIR)$(bindir)/$(SCREEN) +@@ -94,7 +94,7 @@ endif + cp $(srcdir)/utf8encodings/?? $(DESTDIR)$(SCREENENCODINGS) + + ############################################################################### +-install: installdirs install_bin ++install: install_bin + cd doc ; $(MAKE) install + -if [ -d /usr/lib/terminfo ]; then \ + PATH="$$PATH:/usr/5bin" tic ${srcdir}/terminfo/screeninfo.src; \ +-- +1.8.4.5 + diff --git a/package/screen/0010-rename-sched_h.patch b/package/screen/0010-rename-sched_h.patch new file mode 100644 index 0000000000..cdbb0335f9 --- /dev/null +++ b/package/screen/0010-rename-sched_h.patch @@ -0,0 +1,142 @@ +From: Maarten ter Huurne +Date: Mon, 15 Sep 2014 00:24:41 +0200 +Subject: Renamed sched.h to eventqueue.h + +There is a system header that got shadowed by "sched.h". +While Screen itself doesn't include , other system headers +might include it indirectly. This broke the build when using uClibc +with pthread support. + +Signed-off-by: Maarten ter Huurne +--- + eventqueue.h | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ + sched.h | 48 ------------------------------------------------ + screen.h | 2 +- + 3 files changed, 49 insertions(+), 49 deletions(-) + create mode 100644 eventqueue.h + delete mode 100644 sched.h + +diff --git a/eventqueue.h b/eventqueue.h +new file mode 100644 +index 0000000..fdc3fc4 +--- /dev/null ++++ b/eventqueue.h +@@ -0,0 +1,48 @@ ++/* Copyright (c) 2008, 2009 ++ * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) ++ * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) ++ * Micah Cowan (micah@cowan.name) ++ * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) ++ * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 ++ * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) ++ * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) ++ * Copyright (c) 1987 Oliver Laumann ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 3, 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 (see the file COPYING); if not, see ++ * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA ++ * ++ **************************************************************** ++ * $Id$ GNU ++ */ ++ ++struct event ++{ ++ struct event *next; ++ void (*handler) __P((struct event *, char *)); ++ char *data; ++ int fd; ++ int type; ++ int pri; ++ struct timeval timeout; ++ int queued; /* in evs queue */ ++ int active; /* in fdset */ ++ int *condpos; /* only active if condpos - condneg > 0 */ ++ int *condneg; ++}; ++ ++#define EV_TIMEOUT 0 ++#define EV_READ 1 ++#define EV_WRITE 2 ++#define EV_ALWAYS 3 +diff --git a/sched.h b/sched.h +deleted file mode 100644 +index fdc3fc4..0000000 +--- a/sched.h ++++ /dev/null +@@ -1,48 +0,0 @@ +-/* Copyright (c) 2008, 2009 +- * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) +- * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) +- * Micah Cowan (micah@cowan.name) +- * Sadrul Habib Chowdhury (sadrul@users.sourceforge.net) +- * Copyright (c) 1993-2002, 2003, 2005, 2006, 2007 +- * Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) +- * Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) +- * Copyright (c) 1987 Oliver Laumann +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 3, 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 (see the file COPYING); if not, see +- * http://www.gnu.org/licenses/, or contact Free Software Foundation, Inc., +- * 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA +- * +- **************************************************************** +- * $Id$ GNU +- */ +- +-struct event +-{ +- struct event *next; +- void (*handler) __P((struct event *, char *)); +- char *data; +- int fd; +- int type; +- int pri; +- struct timeval timeout; +- int queued; /* in evs queue */ +- int active; /* in fdset */ +- int *condpos; /* only active if condpos - condneg > 0 */ +- int *condneg; +-}; +- +-#define EV_TIMEOUT 0 +-#define EV_READ 1 +-#define EV_WRITE 2 +-#define EV_ALWAYS 3 +diff --git a/screen.h b/screen.h +index 603ca3f..34238c8 100644 +--- a/screen.h ++++ b/screen.h +@@ -43,7 +43,7 @@ + #include "osdef.h" + + #include "ansi.h" +-#include "sched.h" ++#include "eventqueue.h" + #include "acls.h" + #include "comm.h" + #include "layer.h" +-- +1.8.4.5 + diff --git a/package/screen/Config.in b/package/screen/Config.in new file mode 100644 index 0000000000..b5876e87cf --- /dev/null +++ b/package/screen/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_SCREEN + bool "screen" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + Screen is a full-screen window manager that multiplexes a physical + terminal between several processes, typically interactive shells. + Each virtual terminal provides the functions of the DEC VT100 + terminal and, in addition, several control functions from the ANSI + X3.64 (ISO 6429) and ISO 2022 standards (e.g., insert/delete line + and support for multiple character sets). + + http://www.gnu.org/software/screen/ diff --git a/package/screen/screen.hash b/package/screen/screen.hash new file mode 100644 index 0000000000..10ba21407d --- /dev/null +++ b/package/screen/screen.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 fa4049f8aee283de62e283d427f2cfd35d6c369b40f7f45f947dbfd915699d63 screen-4.3.1.tar.gz diff --git a/package/screen/screen.mk b/package/screen/screen.mk new file mode 100644 index 0000000000..0316e3d266 --- /dev/null +++ b/package/screen/screen.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# screen +# +################################################################################ + +SCREEN_VERSION = 4.3.1 +SCREEN_SITE = $(BR2_GNU_MIRROR)/screen +SCREEN_LICENSE = GPLv3+ +SCREEN_LICENSE_FILES = COPYING +SCREEN_DEPENDENCIES = ncurses +SCREEN_AUTORECONF = YES +SCREEN_CONF_ENV = CFLAGS="$(TARGET_CFLAGS)" +SCREEN_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) SCREEN=screen install_bin + +define SCREEN_INSTALL_SCREENRC + $(INSTALL) -m 0755 -D $(@D)/etc/screenrc $(TARGET_DIR)/etc/screenrc +endef + +SCREEN_POST_INSTALL_TARGET_HOOKS += SCREEN_INSTALL_SCREENRC + +$(eval $(autotools-package)) diff --git a/package/scrub/Config.in b/package/scrub/Config.in new file mode 100644 index 0000000000..84bcc29633 --- /dev/null +++ b/package/scrub/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_SCRUB + bool "scrub" + help + Scrub iteratively writes patterns on files or disk devices + to make retrieving the data more difficult. + + https://github.com/chaos/scrub/ diff --git a/package/scrub/scrub.hash b/package/scrub/scrub.hash new file mode 100644 index 0000000000..0041fd055c --- /dev/null +++ b/package/scrub/scrub.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 838b061b2e1932b342fb9695c5579cdff5d2d72506cb41d6d8032eba18aed969 scrub-2.6.1.tar.gz +sha256 6a129b4e0df6ebe02d449fa481db7b75be5eff08ce518aa77edd74c6b17c5ae4 11d30916dd9c11a26c7c8a0f6db9e6ebca301594.patch diff --git a/package/scrub/scrub.mk b/package/scrub/scrub.mk new file mode 100644 index 0000000000..b816272163 --- /dev/null +++ b/package/scrub/scrub.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# scrub +# +################################################################################ + +SCRUB_VERSION = 2.6.1 +SCRUB_SITE = $(call github,chaos,scrub,$(SCRUB_VERSION)) +SCRUB_LICENSE = GPLv2+ +SCRUB_LICENSE_FILES = COPYING DISCLAIMER +SCRUB_PATCH = https://github.com/chaos/scrub/commit/11d30916dd9c11a26c7c8a0f6db9e6ebca301594.patch + +# Fetching from the git repo, no configure/Makefile generated, and patching +# configure.ac +SCRUB_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/scrypt/Config.in b/package/scrypt/Config.in new file mode 100644 index 0000000000..e6d1ac1a65 --- /dev/null +++ b/package/scrypt/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_SCRYPT + bool "scrypt" + select BR2_PACKAGE_OPENSSL + help + A password-based key derivation function specifically + designed to make it costly to perform large-scale custom + hardware attacks by requiring large amounts of memory. + + http://www.tarsnap.com/scrypt.html diff --git a/package/scrypt/scrypt.hash b/package/scrypt/scrypt.hash new file mode 100644 index 0000000000..6694456763 --- /dev/null +++ b/package/scrypt/scrypt.hash @@ -0,0 +1,2 @@ +# From http://www.tarsnap.com/scrypt/scrypt-sigs-1.2.0.asc +sha256 1754bc89405277c8ac14220377a4c240ddc34b1ce70882aa92cd01bfdc8569d4 scrypt-1.2.0.tgz diff --git a/package/scrypt/scrypt.mk b/package/scrypt/scrypt.mk new file mode 100644 index 0000000000..7ffa7ccf3f --- /dev/null +++ b/package/scrypt/scrypt.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# scrypt +# +################################################################################ + +SCRYPT_VERSION = 1.2.0 +SCRYPT_SOURCE = scrypt-$(SCRYPT_VERSION).tgz +SCRYPT_SITE = http://www.tarsnap.com/scrypt +SCRYPT_LICENSE = BSD-2c +SCRYPT_LICENSE_FILES = main.c +SCRYPT_DEPENDENCIES = openssl +SCRYPT_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/sdl/0001-use-correct-directfb-config.patch b/package/sdl/0001-use-correct-directfb-config.patch new file mode 100644 index 0000000000..ef671a1ddd --- /dev/null +++ b/package/sdl/0001-use-correct-directfb-config.patch @@ -0,0 +1,25 @@ +[PATCH] configure.in: use correct directfb-config in version check + +The configure script has just checked for the correct directfb-config +script, so also use it for the version check instead of whatever +might be in the path. + +Signed-off-by: Peter Korsgaard +--- + configure.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +Index: SDL-1.2.15/configure.in +=================================================================== +--- SDL-1.2.15.orig/configure.in ++++ SDL-1.2.15/configure.in +@@ -1276,7 +1276,7 @@ + else + set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'` + NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3` +- set -- `directfb-config --version | sed 's/\./ /g'` ++ set -- `$DIRECTFBCONFIG --version | sed 's/\./ /g'` + HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3` + if test $HAVE_VERSION -ge $NEED_VERSION; then + DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags` + diff --git a/package/sdl/0002-fix-compilation-with-libx11.patch b/package/sdl/0002-fix-compilation-with-libx11.patch new file mode 100644 index 0000000000..27f244883e --- /dev/null +++ b/package/sdl/0002-fix-compilation-with-libx11.patch @@ -0,0 +1,60 @@ +sdl: Fix compilation with libX11 >= 1.5.99.902 +Signed-off-by: Vicente Olivert Riera + +# HG changeset patch +# User Azamat H. Hackimov +# Date 1370184533 -21600 +# Node ID 91ad7b43317a6387e115ecdf63a49137f47e42c8 +# Parent f7fd5c3951b9ed922fdf696f7182e71b58a13268 +Fix compilation with libX11 >= 1.5.99.902. + +These changes fixes bug #1769 for SDL 1.2 +(http://bugzilla.libsdl.org/show_bug.cgi?id=1769). + +diff -r f7fd5c3951b9 -r 91ad7b43317a configure.in +--- a/configure.in Wed Apr 17 00:56:53 2013 -0700 ++++ b/configure.in Sun Jun 02 20:48:53 2013 +0600 +@@ -1169,6 +1169,17 @@ + if test x$definitely_enable_video_x11_xrandr = xyes; then + AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR) + fi ++ AC_MSG_CHECKING(for const parameter to _XData32) ++ have_const_param_xdata32=no ++ AC_TRY_COMPILE([ ++ #include ++ extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len); ++ ],[ ++ ],[ ++ have_const_param_xdata32=yes ++ AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32) ++ ]) ++ AC_MSG_RESULT($have_const_param_xdata32) + fi + fi + } +diff -r f7fd5c3951b9 -r 91ad7b43317a include/SDL_config.h.in +--- a/include/SDL_config.h.in Wed Apr 17 00:56:53 2013 -0700 ++++ b/include/SDL_config.h.in Sun Jun 02 20:48:53 2013 +0600 +@@ -283,6 +283,7 @@ + #undef SDL_VIDEO_DRIVER_WINDIB + #undef SDL_VIDEO_DRIVER_WSCONS + #undef SDL_VIDEO_DRIVER_X11 ++#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 + #undef SDL_VIDEO_DRIVER_X11_DGAMOUSE + #undef SDL_VIDEO_DRIVER_X11_DYNAMIC + #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT +diff -r f7fd5c3951b9 -r 91ad7b43317a src/video/x11/SDL_x11sym.h +--- a/src/video/x11/SDL_x11sym.h Wed Apr 17 00:56:53 2013 -0700 ++++ b/src/video/x11/SDL_x11sym.h Sun Jun 02 20:48:53 2013 +0600 +@@ -165,7 +165,11 @@ + */ + #ifdef LONG64 + SDL_X11_MODULE(IO_32BIT) ++#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 ++SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return) ++#else + SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) ++#endif + SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),) + #endif + diff --git a/package/sdl/Config.in b/package/sdl/Config.in new file mode 100644 index 0000000000..65ac8a2469 --- /dev/null +++ b/package/sdl/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_SDL + bool "SDL" + help + Simple DirectMedia Layer - SDL is a library that allows + programs portable low level access to a video framebuffer, + audio output, mouse, and keyboard. + + http://www.libsdl.org/ + +if BR2_PACKAGE_SDL + +config BR2_PACKAGE_SDL_FBCON + bool "SDL framebuffer console video driver" + default y + +config BR2_PACKAGE_SDL_DIRECTFB + bool "SDL DirectFB video driver" + depends on BR2_PACKAGE_DIRECTFB + +config BR2_PACKAGE_SDL_QTOPIA + bool "SDL Qtopia video driver" + depends on BR2_PACKAGE_QT + +config BR2_PACKAGE_SDL_X11 + bool "SDL X11 video driver" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + +endif diff --git a/package/sdl/sdl.hash b/package/sdl/sdl.hash new file mode 100644 index 0000000000..ad59b90042 --- /dev/null +++ b/package/sdl/sdl.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 d6d316a793e5e348155f0dd93b979798933fb98aa1edebcc108829d6474aad00 SDL-1.2.15.tar.gz diff --git a/package/sdl/sdl.mk b/package/sdl/sdl.mk new file mode 100644 index 0000000000..38b4b97752 --- /dev/null +++ b/package/sdl/sdl.mk @@ -0,0 +1,101 @@ +################################################################################ +# +# sdl +# +################################################################################ + +SDL_VERSION = 1.2.15 +SDL_SOURCE = SDL-$(SDL_VERSION).tar.gz +SDL_SITE = http://www.libsdl.org/release +SDL_LICENSE = LGPLv2.1+ +SDL_LICENSE_FILES = COPYING +SDL_INSTALL_STAGING = YES + +# we're patching configure.in, but package cannot autoreconf with our version of +# autotools, so we have to do it manually instead of setting SDL_AUTORECONF = YES +define SDL_RUN_AUTOGEN + cd $(@D) && PATH=$(BR_PATH) ./autogen.sh +endef + +SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN +HOST_SDL_PRE_CONFIGURE_HOOKS += SDL_RUN_AUTOGEN + +SDL_DEPENDENCIES += host-automake host-autoconf host-libtool +HOST_SDL_DEPENDENCIES += host-automake host-autoconf host-libtool + +ifeq ($(BR2_PACKAGE_SDL_FBCON),y) +SDL_CONF_OPTS += --enable-video-fbcon=yes +else +SDL_CONF_OPTS += --enable-video-fbcon=no +endif + +ifeq ($(BR2_PACKAGE_SDL_DIRECTFB),y) +SDL_DEPENDENCIES += directfb +SDL_CONF_OPTS += --enable-video-directfb=yes +SDL_CONF_ENV = ac_cv_path_DIRECTFBCONFIG=$(STAGING_DIR)/usr/bin/directfb-config +else +SDL_CONF_OPTS += --enable-video-directfb=no +endif + +ifeq ($(BR2_PACKAGE_SDL_QTOPIA),y) +SDL_CONF_OPTS += --enable-video-qtopia=yes +SDL_DEPENDENCIES += qt +else +SDL_CONF_OPTS += --enable-video-qtopia=no +endif + +ifeq ($(BR2_PACKAGE_SDL_X11),y) +SDL_CONF_OPTS += --enable-video-x11=yes +SDL_DEPENDENCIES += \ + xlib_libX11 xlib_libXext \ + $(if $(BR2_PACKAGE_XLIB_LIBXRENDER), xlib_libXrender) \ + $(if $(BR2_PACKAGE_XLIB_LIBXRANDR), xlib_libXrandr) +else +SDL_CONF_OPTS += --enable-video-x11=no +endif + +ifneq ($(BR2_USE_MMU),y) +SDL_CONF_OPTS += --enable-dga=no +endif + +# overwrite autodection (prevents confusion with host libpth version) +ifeq ($(BR2_PACKAGE_LIBPTHSEM_COMPAT),y) +SDL_CONF_OPTS += --enable-pth +SDL_CONF_ENV += ac_cv_path_PTH_CONFIG=$(STAGING_DIR)/usr/bin/pth-config +SDL_DEPENDENCIES += libpthsem +else +SDL_CONF_OPTS += --disable-pth +endif + +ifeq ($(BR2_PACKAGE_TSLIB),y) +SDL_DEPENDENCIES += tslib +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +SDL_DEPENDENCIES += alsa-lib +endif + +ifeq ($(BR2_PACKAGE_MESA3D),y) +SDL_DEPENDENCIES += mesa3d +endif + +SDL_CONF_OPTS += \ + --disable-rpath \ + --enable-pulseaudio=no \ + --disable-arts \ + --disable-esd \ + --disable-nasm \ + --disable-video-ps3 + +HOST_SDL_CONF_OPTS += \ + --enable-pulseaudio=no \ + --enable-video-x11=no \ + --disable-arts \ + --disable-esd \ + --disable-nasm \ + --disable-video-ps3 + +SDL_CONFIG_SCRIPTS = sdl-config + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/sdl2/Config.in b/package/sdl2/Config.in new file mode 100644 index 0000000000..b73611dbb0 --- /dev/null +++ b/package/sdl2/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_SDL2 + bool "sdl2" + depends on !BR2_STATIC_LIBS + help + Simple DirectMedia Layer 2 - SDL2 is a library that allows + programs portable low level access to a video framebuffer, + audio output, mouse, and keyboard. It is not compatible with + SDL1. + + http://www.libsdl.org/ + +if BR2_PACKAGE_SDL2 + +config BR2_PACKAGE_SDL2_DIRECTFB + bool "DirectFB video driver" + depends on BR2_PACKAGE_DIRECTFB + +comment "DirectFB video driver needs directfb" + depends on !BR2_PACKAGE_DIRECTFB + +config BR2_PACKAGE_SDL2_X11 + bool "X11 video driver" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + +comment "X11 video driver needs X.org" + depends on !BR2_PACKAGE_XORG7 + +endif + +comment "sdl2 needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/sdl2/sdl2.hash b/package/sdl2/sdl2.hash new file mode 100644 index 0000000000..6e8533f6c1 --- /dev/null +++ b/package/sdl2/sdl2.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking http://www.libsdl.org/release/SDL2-2.0.3.tar.gz.sig +sha256 a5a69a6abf80bcce713fa873607735fe712f44276a7f048d60a61bb2f6b3c90c SDL2-2.0.3.tar.gz diff --git a/package/sdl2/sdl2.mk b/package/sdl2/sdl2.mk new file mode 100644 index 0000000000..814cc196e4 --- /dev/null +++ b/package/sdl2/sdl2.mk @@ -0,0 +1,116 @@ +################################################################################ +# +# sdl2 +# +################################################################################ + +SDL2_VERSION = 2.0.3 +SDL2_SOURCE = SDL2-$(SDL2_VERSION).tar.gz +SDL2_SITE = http://www.libsdl.org/release +SDL2_LICENSE = zlib +SDL2_LICENSE_FILES = COPYING.txt +SDL2_INSTALL_STAGING = YES +SDL2_CONFIG_SCRIPTS = sdl2-config + +SDL2_CONF_OPTS += \ + --disable-rpath \ + --disable-arts \ + --disable-esd \ + --disable-dbus \ + --disable-pulseaudio \ + --disable-video-opengl \ + --disable-video-opengles \ + --disable-video-wayland + +# We must enable static build to get compilation successful. +SDL2_CONF_OPTS += --enable-static + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +SDL2_DEPENDENCIES += udev +SDL2_CONF_OPTS += --enable-libudev +else +SDL2_CONF_OPTS += --disable-libudev +endif + +ifeq ($(BR2_PACKAGE_SDL2_DIRECTFB),y) +SDL2_DEPENDENCIES += directfb +SDL2_CONF_OPTS += --enable-video-directfb +SDL2_CONF_ENV = ac_cv_path_DIRECTFBCONFIG=$(STAGING_DIR)/usr/bin/directfb-config +else +SDL2_CONF_OPTS += --disable-video-directfb +endif + +# x-includes and x-libraries must be set for cross-compiling +# By default x_includes and x_libraries contains unsafe paths. +# (/usr/X11R6/include and /usr/X11R6/lib) +ifeq ($(BR2_PACKAGE_SDL2_X11),y) +SDL2_DEPENDENCIES += xlib_libX11 xlib_libXext + +# X11/extensions/shape.h is provided by libXext. +SDL2_CONF_OPTS += --enable-video-x11 \ + --with-x=$(STAGING_DIR) \ + --x-includes=$(STAGING_DIR)/usr/include \ + --x-libraries=$(STAGING_DIR)/usr/lib \ + --enable-video-x11-xshape + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +SDL2_DEPENDENCIES += xlib_libXcursor +SDL2_CONF_OPTS += --enable-video-x11-xcursor +else +SDL2_CONF_OPTS += --disable-video-x11-xcursor +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +SDL2_DEPENDENCIES += xlib_libXinerama +SDL2_CONF_OPTS += --enable-video-x11-xinerama +else +SDL2_CONF_OPTS += --disable-video-x11-xinerama +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y) +SDL2_DEPENDENCIES += xlib_libXi +SDL2_CONF_OPTS += --enable-video-x11-xinput +else +SDL2_CONF_OPTS += --disable-video-x11-xinput +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +SDL2_DEPENDENCIES += xlib_libXrandr +SDL2_CONF_OPTS += --enable-video-x11-xrandr +else +SDL2_CONF_OPTS += --disable-video-x11-xrandr +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXSCRNSAVER),y) +SDL2_DEPENDENCIES += xlib_libXScrnSaver +SDL2_CONF_OPTS += --enable-video-x11-scrnsaver +else +SDL2_CONF_OPTS += --disable-video-x11-scrnsaver +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y) +SDL2_DEPENDENCIES += xlib_libXxf86vm +SDL2_CONF_OPTS += --enable-video-x11-vm +else +SDL2_CONF_OPTS += --disable-video-x11-vm +endif + +else +SDL2_CONF_OPTS += --disable-video-x11 --without-x +endif + +ifeq ($(BR2_PACKAGE_TSLIB),y) +SDL2_DEPENDENCIES += tslib +SDL2_CONF_OPTS += --enable-input-tslib +else +SDL2_CONF_OPTS += --disable-input-tslib +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +SDL2_DEPENDENCIES += alsa-lib +SDL2_CONF_OPTS += --enable-alsa +else +SDL2_CONF_OPTS += --disable-alsa +endif + +$(eval $(autotools-package)) diff --git a/package/sdl_gfx/Config.in b/package/sdl_gfx/Config.in new file mode 100644 index 0000000000..b5d5cac5ad --- /dev/null +++ b/package/sdl_gfx/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_SDL_GFX + bool "SDL_gfx" + depends on BR2_PACKAGE_SDL + help + The SDL_gfx library is an extension to the SDL library which + provides basic antialiased drawing routines such as lines, + circles or polygons, an interpolating rotozoomer for SDL + surfaces, framerate control and MMX image filters. + + http://cms.ferzkopp.net/index.php/software/13-sdl-gfx diff --git a/package/sdl_gfx/sdl_gfx.hash b/package/sdl_gfx/sdl_gfx.hash new file mode 100644 index 0000000000..8c2be96fff --- /dev/null +++ b/package/sdl_gfx/sdl_gfx.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/sdlgfx/files/ +md5 fcc3c4f2d1b4943409bf7e67dd65d03a SDL_gfx-2.0.23.tar.gz +sha1 aae60e7fed539f3f8a0a0bd6da3bbcf625642596 SDL_gfx-2.0.23.tar.gz diff --git a/package/sdl_gfx/sdl_gfx.mk b/package/sdl_gfx/sdl_gfx.mk new file mode 100644 index 0000000000..7f3a2ffec8 --- /dev/null +++ b/package/sdl_gfx/sdl_gfx.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# sdl_gfx +# +################################################################################ + +SDL_GFX_VERSION_MAJOR = 2.0 +SDL_GFX_VERSION = $(SDL_GFX_VERSION_MAJOR).23 +SDL_GFX_SOURCE = SDL_gfx-$(SDL_GFX_VERSION).tar.gz +SDL_GFX_SITE = http://www.ferzkopp.net/Software/SDL_gfx-$(SDL_GFX_VERSION_MAJOR) +SDL_GFX_LICENSE = zlib +SDL_GFX_LICENSE_FILES = COPYING LICENSE +SDL_GFX_INSTALL_STAGING = YES +SDL_GFX_DEPENDENCIES = sdl +SDL_GFX_CONF_OPTS = \ + --with-sdl-prefix=$(STAGING_DIR)/usr \ + --disable-sdltest \ + --enable-static + +# Even though x86_64 processors support MMX, the MMX-specific assembly +# code in sdl_gfx is IA32 specific, and does not build for x86_64. +ifeq ($(BR2_i386)$(BR2_X86_CPU_HAS_MMX),yy) +SDL_GFX_CONF_OPTS += --enable-mmx +else +SDL_GFX_CONF_OPTS += --disable-mmx +endif + +$(eval $(autotools-package)) diff --git a/package/sdl_image/Config.in b/package/sdl_image/Config.in new file mode 100644 index 0000000000..1b98066827 --- /dev/null +++ b/package/sdl_image/Config.in @@ -0,0 +1,61 @@ +config BR2_PACKAGE_SDL_IMAGE + bool "SDL_image" + depends on BR2_PACKAGE_SDL + help + SDL_image is an image file loading library. It loads images + as SDL surfaces, and supports the following formats: + BMP, GIF, JPEG, LBM, PCX, PNG, PNM, TGA, TIFF, XCF, XPM, XV. + + http://www.libsdl.org/projects/SDL_image/ + +if BR2_PACKAGE_SDL_IMAGE + +menu "SDL_image file format support" + +config BR2_PACKAGE_SDL_IMAGE_BMP + bool "enable BMP file format support" + default y + +config BR2_PACKAGE_SDL_IMAGE_GIF + bool "enable GIF file format support" + +config BR2_PACKAGE_SDL_IMAGE_JPEG + bool "enable JPEG file format support" + select BR2_PACKAGE_JPEG + +config BR2_PACKAGE_SDL_IMAGE_LBM + bool "enable LBM file format support" + +config BR2_PACKAGE_SDL_IMAGE_PCX + bool "enable PCX file format support" + +config BR2_PACKAGE_SDL_IMAGE_PNG + bool "enable PNG file format support" + select BR2_PACKAGE_LIBPNG + +config BR2_PACKAGE_SDL_IMAGE_PNM + bool "enable PNM file format support" + +config BR2_PACKAGE_SDL_IMAGE_TARGA + bool "enable TARGA format support" + +config BR2_PACKAGE_SDL_IMAGE_TIFF + bool "enable TIFF file format support" + select BR2_PACKAGE_TIFF + +config BR2_PACKAGE_SDL_IMAGE_WEBP + bool "enable WEBP file format support" + select BR2_PACKAGE_WEBP + +config BR2_PACKAGE_SDL_IMAGE_XCF + bool "enable XCF file format support" + +config BR2_PACKAGE_SDL_IMAGE_XPM + bool "enable XPM format support" + +config BR2_PACKAGE_SDL_IMAGE_XV + bool "enable XV file format support" + +endmenu + +endif diff --git a/package/sdl_image/sdl_image.hash b/package/sdl_image/sdl_image.hash new file mode 100644 index 0000000000..836223489c --- /dev/null +++ b/package/sdl_image/sdl_image.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 0b90722984561004de84847744d566809dbb9daf732a9e503b91a1b5a84e5699 SDL_image-1.2.12.tar.gz diff --git a/package/sdl_image/sdl_image.mk b/package/sdl_image/sdl_image.mk new file mode 100644 index 0000000000..b46fc6440f --- /dev/null +++ b/package/sdl_image/sdl_image.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# sdl_image +# +################################################################################ + +SDL_IMAGE_VERSION = 1.2.12 +SDL_IMAGE_SOURCE = SDL_image-$(SDL_IMAGE_VERSION).tar.gz +SDL_IMAGE_SITE = http://www.libsdl.org/projects/SDL_image/release +SDL_IMAGE_INSTALL_STAGING = YES +SDL_IMAGE_LICENSE = zlib +SDL_IMAGE_LICENSE_FILES = COPYING + +SDL_IMAGE_CONF_OPTS = \ + --with-sdl-prefix=$(STAGING_DIR)/usr \ + --with-sdl-exec-prefix=$(STAGING_DIR)/usr \ + --disable-sdltest \ + --disable-static \ + --enable-bmp=$(if $(BR2_PACKAGE_SDL_IMAGE_BMP),yes,no) \ + --enable-gif=$(if $(BR2_PACKAGE_SDL_IMAGE_GIF),yes,no) \ + --enable-jpg=$(if $(BR2_PACKAGE_SDL_IMAGE_JPEG),yes,no) \ + --enable-lbm=$(if $(BR2_PACKAGE_SDL_IMAGE_LBM),yes,no) \ + --enable-pcx=$(if $(BR2_PACKAGE_SDL_IMAGE_PCX),yes,no) \ + --enable-png=$(if $(BR2_PACKAGE_SDL_IMAGE_PNG),yes,no) \ + --enable-pnm=$(if $(BR2_PACKAGE_SDL_IMAGE_PNM),yes,no) \ + --enable-tga=$(if $(BR2_PACKAGE_SDL_IMAGE_TARGA),yes,no) \ + --enable-tif=$(if $(BR2_PACKAGE_SDL_IMAGE_TIFF),yes,no) \ + --enable-webp=$(if $(BR2_PACKAGE_SDL_IMAGE_WEBP),yes,no) \ + --enable-xcf=$(if $(BR2_PACKAGE_SDL_IMAGE_XCF),yes,no) \ + --enable-xpm=$(if $(BR2_PACKAGE_SDL_IMAGE_XPM),yes,no) \ + --enable-xv=$(if $(BR2_PACKAGE_SDL_IMAGE_XV),yes,no) \ + +SDL_IMAGE_DEPENDENCIES = sdl \ + $(if $(BR2_PACKAGE_SDL_IMAGE_JPEG),jpeg) \ + $(if $(BR2_PACKAGE_SDL_IMAGE_PNG),libpng) \ + $(if $(BR2_PACKAGE_SDL_IMAGE_TIFF),tiff) \ + $(if $(BR2_PACKAGE_SDL_IMAGE_WEBP),webp) + +HOST_SDL_IMAGE_CONF_OPTS = \ + --with-sdl-prefix=$(HOST_DIR)/usr \ + --with-sdl-exec-prefix=$(HOST_DIR)/usr \ + --disable-sdltest \ + --disable-static \ + --disable-jpg-shared \ + --disable-png-shared \ + --disable-tif-shared \ + +HOST_SDL_IMAGE_DEPENDENCIES = host-libjpeg host-libpng host-sdl + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/sdl_mixer/0001-Add-Libs.private-field-to-pkg-config-file.patch b/package/sdl_mixer/0001-Add-Libs.private-field-to-pkg-config-file.patch new file mode 100644 index 0000000000..e0e85710d9 --- /dev/null +++ b/package/sdl_mixer/0001-Add-Libs.private-field-to-pkg-config-file.patch @@ -0,0 +1,64 @@ +From abf3a1b9c9cdacb574c2b9cdbf3f2a5e18c39ab9 Mon Sep 17 00:00:00 2001 +From: Rodrigo Rebello +Date: Mon, 29 Feb 2016 22:53:49 -0300 +Subject: [PATCH 1/1] Add 'Libs.private' field to pkg-config file + +In order to support static linking, SDL_mixer.pc should include a +'Libs.private' field listing all the libraries that SDL_mixer requires. + +This patch adds such a field and also modifies configure.in so that +EXTRA_LDFLAGS (which is now also used as the value of 'Libs.private') +no longer includes SDL_LIBS. This is done so as to prevent libraries +required by SDL from being listed twice when 'pkg-config --libs --static +SDL_mixer' is run (they're already shown because of the 'Requires: sdl' +line in SDL_mixer.pc). Makefile.in is also adjusted accordingly. + +Upstream status: submitted +https://bugzilla.libsdl.org/show_bug.cgi?id=3278 + +Signed-off-by: Rodrigo Rebello +--- + Makefile.in | 2 +- + SDL_mixer.pc.in | 1 + + configure.in | 1 - + 3 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile.in b/Makefile.in +index 3d10565..ce4efd4 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -63,7 +63,7 @@ $(objects): + .PHONY: all install install-hdrs install-lib install-bin uninstall uninstall-hdrs uninstall-lib uninstall-bin clean distclean dist + + $(objects)/$(TARGET): $(OBJECTS) $(VERSION_OBJECTS) +- $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) ++ $(LIBTOOL) --mode=link $(CC) -o $@ $(OBJECTS) $(VERSION_OBJECTS) $(LDFLAGS) $(SDL_LIBS) $(EXTRA_LDFLAGS) $(LT_LDFLAGS) + + $(objects)/playwave$(EXE): $(objects)/playwave.lo $(objects)/$(TARGET) + $(LIBTOOL) --mode=link $(CC) -o $@ $(objects)/playwave.lo $(SDL_CFLAGS) $(SDL_LIBS) $(objects)/$(TARGET) +diff --git a/SDL_mixer.pc.in b/SDL_mixer.pc.in +index 1c4965d..d793521 100644 +--- a/SDL_mixer.pc.in ++++ b/SDL_mixer.pc.in +@@ -8,5 +8,6 @@ Description: mixer library for Simple DirectMedia Layer + Version: @VERSION@ + Requires: sdl >= @SDL_VERSION@ + Libs: -L${libdir} -lSDL_mixer ++Libs.private: @EXTRA_LDFLAGS@ + Cflags: -I${includedir}/SDL + +diff --git a/configure.in b/configure.in +index 2272b29..442eca6 100644 +--- a/configure.in ++++ b/configure.in +@@ -202,7 +202,6 @@ AM_PATH_SDL($SDL_VERSION, + AC_MSG_ERROR([*** SDL version $SDL_VERSION not found!]) + ) + EXTRA_CFLAGS="$EXTRA_CFLAGS $SDL_CFLAGS" +-EXTRA_LDFLAGS="$EXTRA_LDFLAGS $SDL_LIBS" + + dnl Check for math library + AC_CHECK_LIB(m, pow, [LIBM="-lm"]) +-- +2.1.4 + diff --git a/package/sdl_mixer/Config.in b/package/sdl_mixer/Config.in new file mode 100644 index 0000000000..42dfe63c0a --- /dev/null +++ b/package/sdl_mixer/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_SDL_MIXER + bool "SDL_mixer" + depends on BR2_PACKAGE_SDL + help + SDL_mixer is a sample multi-channel audio mixer library. + It supports any number of simultaneously playing channels of + 16 bit stereo audio, plus a single channel of music, mixed + by the popular MikMod MOD, Timidity MIDI, Ogg Vorbis, and + SMPEG MP3 libraries. + + http://www.libsdl.org/projects/SDL_mixer/ diff --git a/package/sdl_mixer/sdl_mixer.hash b/package/sdl_mixer/sdl_mixer.hash new file mode 100644 index 0000000000..cfe8b07cb0 --- /dev/null +++ b/package/sdl_mixer/sdl_mixer.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 1644308279a975799049e4826af2cfc787cad2abb11aa14562e402521f86992a SDL_mixer-1.2.12.tar.gz diff --git a/package/sdl_mixer/sdl_mixer.mk b/package/sdl_mixer/sdl_mixer.mk new file mode 100644 index 0000000000..897b308e9d --- /dev/null +++ b/package/sdl_mixer/sdl_mixer.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# sdl_mixer +# +################################################################################ + +SDL_MIXER_VERSION = 1.2.12 +SDL_MIXER_SOURCE = SDL_mixer-$(SDL_MIXER_VERSION).tar.gz +SDL_MIXER_SITE = http://www.libsdl.org/projects/SDL_mixer/release +SDL_MIXER_LICENSE = zlib +SDL_MIXER_LICENSE_FILES = COPYING + +SDL_MIXER_INSTALL_STAGING = YES +SDL_MIXER_DEPENDENCIES = sdl + +# We're patching configure.in, so we need to autoreconf +SDL_MIXER_AUTORECONF = YES +SDL_MIXER_AUTORECONF_OPTS = -Iacinclude + +SDL_MIXER_CONF_OPTS = \ + --without-x \ + --with-sdl-prefix=$(STAGING_DIR)/usr \ + --disable-music-midi \ + --disable-music-mod \ + --disable-music-mp3 \ + --disable-music-flac # configure script fails when cross compiling + +ifeq ($(BR2_PACKAGE_LIBMAD),y) +SDL_MIXER_CONF_OPTS += --enable-music-mp3-mad-gpl +SDL_MIXER_DEPENDENCIES += libmad +else +SDL_MIXER_CONF_OPTS += --disable-music-mp3-mad-gpl +endif + +ifeq ($(BR2_PACKAGE_LIBVORBIS),y) +SDL_MIXER_CONF_OPTS += --enable-music-ogg +SDL_MIXER_DEPENDENCIES += libvorbis +else +SDL_MIXER_CONF_OPTS += --disable-music-ogg +endif + +$(eval $(autotools-package)) diff --git a/package/sdl_net/Config.in b/package/sdl_net/Config.in new file mode 100644 index 0000000000..2001d230fe --- /dev/null +++ b/package/sdl_net/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_SDL_NET + bool "SDL_net" + depends on BR2_PACKAGE_SDL + help + SDL_net is a small, low-level, cross-platform network library, that + can be used with the Simple DirectMedia Layer library (SDL). + + http://www.libsdl.org/projects/SDL_net/ diff --git a/package/sdl_net/sdl_net.hash b/package/sdl_net/sdl_net.hash new file mode 100644 index 0000000000..56a7484284 --- /dev/null +++ b/package/sdl_net/sdl_net.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 5f4a7a8bb884f793c278ac3f3713be41980c5eedccecff0260411347714facb4 SDL_net-1.2.8.tar.gz diff --git a/package/sdl_net/sdl_net.mk b/package/sdl_net/sdl_net.mk new file mode 100644 index 0000000000..4534dee3a9 --- /dev/null +++ b/package/sdl_net/sdl_net.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# sdl_net +# +################################################################################ + +SDL_NET_VERSION = 1.2.8 +SDL_NET_SITE = http://www.libsdl.org/projects/SDL_net/release +SDL_NET_SOURCE = SDL_net-$(SDL_NET_VERSION).tar.gz +SDL_NET_LICENSE = zlib +SDL_NET_LICENSE_FILES = COPYING + +SDL_NET_CONF_OPTS = \ + --with-sdl-prefix=$(STAGING_DIR)/usr \ + --with-sdl-exec-prefix=$(STAGING_DIR)/usr + +SDL_NET_INSTALL_STAGING = YES + +SDL_NET_DEPENDENCIES = sdl + +$(eval $(autotools-package)) diff --git a/package/sdl_sound/0001-fix-constness.patch b/package/sdl_sound/0001-fix-constness.patch new file mode 100644 index 0000000000..1f27a071dc --- /dev/null +++ b/package/sdl_sound/0001-fix-constness.patch @@ -0,0 +1,16 @@ +decoders/speex: fix constness of speex mode + +Signed-off-by: "Yann E. MORIN" + +diff -durN sdl_sound-1.0.3.orig/decoders/speex.c sdl_sound-1.0.3/decoders/speex.c +--- sdl_sound-1.0.3.orig/decoders/speex.c 2014-11-17 19:40:09.543553556 +0100 ++++ sdl_sound-1.0.3/decoders/speex.c 2014-11-17 19:40:37.119864580 +0100 +@@ -124,7 +124,7 @@ + + static int process_header(speex_t *speex, Sound_Sample *sample) + { +- SpeexMode *mode; ++ const SpeexMode * mode; + SpeexHeader *hptr; + SpeexHeader header; + int enh_enabled = SPEEX_USE_PERCEPTUAL_ENHANCER; diff --git a/package/sdl_sound/0002-remove-werror.patch b/package/sdl_sound/0002-remove-werror.patch new file mode 100644 index 0000000000..c08bbdb893 --- /dev/null +++ b/package/sdl_sound/0002-remove-werror.patch @@ -0,0 +1,29 @@ +Do not add -Werror when --enable-debug is used + +Using -Werror causes some problems due to warnings in the SDL_sound +code, so let's disable it. + +We patch configure directly, because: + + 1/ configure.in doesn't autoreconf properly out of the box. + + 2/ the length of the configure or configure.in patch would be exactly + the same (one line), or maybe more for the configure.in patch if + we want the package to autoreconf properly + + 3/ the patch will never go upstream, because upstream is dead. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure +=================================================================== +--- a/configure ++++ b/configure +@@ -19561,7 +19561,6 @@ + else + CFLAGS="-O0" + fi +- CFLAGS="$CFLAGS -Werror" + + cat >>confdefs.h <<\_ACEOF + #define DEBUG 1 diff --git a/package/sdl_sound/Config.in b/package/sdl_sound/Config.in new file mode 100644 index 0000000000..6da19853e0 --- /dev/null +++ b/package/sdl_sound/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_SDL_SOUND + bool "SDL_sound" + depends on BR2_PACKAGE_SDL + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + SDL_sound is a library that handles the decoding of several + popular sound file formats, such as .WAV and .MP3. + It is meant to make the programmer's sound playback tasks + simpler. The programmer gives SDL_sound a filename, or feeds + it data directly from one of many sources, and then reads the + decoded waveform data back at her leisure. + + http://icculus.org/SDL_sound/ + +if BR2_PACKAGE_SDL_SOUND + +config BR2_PACKAGE_SDL_SOUND_PLAYSOUND + bool "install playsound tool" + help + Enable this option to install the playsound/playsound_simple + tools to target. + +endif diff --git a/package/sdl_sound/sdl_sound.hash b/package/sdl_sound/sdl_sound.hash new file mode 100644 index 0000000000..a548627916 --- /dev/null +++ b/package/sdl_sound/sdl_sound.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3999fd0bbb485289a52be14b2f68b571cb84e380cc43387eadf778f64c79e6df SDL_sound-1.0.3.tar.gz diff --git a/package/sdl_sound/sdl_sound.mk b/package/sdl_sound/sdl_sound.mk new file mode 100644 index 0000000000..4fa7d9be0a --- /dev/null +++ b/package/sdl_sound/sdl_sound.mk @@ -0,0 +1,68 @@ +################################################################################ +# +# sdl_sound +# +################################################################################ + +SDL_SOUND_VERSION = 1.0.3 +SDL_SOUND_SOURCE = SDL_sound-$(SDL_SOUND_VERSION).tar.gz +SDL_SOUND_SITE = http://icculus.org/SDL_sound/downloads +SDL_SOUND_LICENSE = LGPLv2.1+ +SDL_SOUND_LICENSE_FILES = COPYING +SDL_SOUND_INSTALL_STAGING = YES +SDL_SOUND_DEPENDENCIES = sdl + +ifneq ($(BR2_ENABLE_LOCALE),y) +SDL_SOUND_DEPENDENCIES += libiconv +endif + +# optional dependencies +ifeq ($(BR2_PACKAGE_FLAC)$(BR2_PACKAGE_LIBOGG),yy) +SDL_SOUND_CONF_OPTS += --enable-flac +SDL_SOUND_DEPENDENCIES += flac libogg +else +SDL_SOUND_CONF_OPTS += --disable-flac +endif + +ifeq ($(BR2_PACKAGE_LIBMODPLUG),y) +SDL_SOUND_CONF_OPTS += --enable-modplug +SDL_SOUND_DEPENDENCIES += libmodplug +else +SDL_SOUND_CONF_OPTS += --disable-modplug +endif + +ifeq ($(BR2_PACKAGE_LIBVORBIS),y) +SDL_SOUND_CONF_OPTS += --enable-ogg +SDL_SOUND_DEPENDENCIES += libvorbis +else +SDL_SOUND_CONF_OPTS += --disable-ogg +endif + +ifeq ($(BR2_PACKAGE_SPEEX),y) +SDL_SOUND_CONF_OPTS += --enable-speex +SDL_SOUND_DEPENDENCIES += speex +else +SDL_SOUND_CONF_OPTS += --disable-speex +endif + +SDL_SOUND_CONF_OPTS = \ + --with-sdl-prefix=$(STAGING_DIR)/usr \ + --with-sdl-exec-prefix=$(STAGING_DIR)/usr \ + --disable-sdltest \ + --enable-static + +ifeq ($(BR2_X86_CPU_HAS_MMX),y) +SDL_SOUND_CONF_OPTS += --enable-mmx +else +SDL_SOUND_CONF_OPTS += --disable-mmx +endif + +define SDL_SOUND_REMOVE_PLAYSOUND + rm $(addprefix $(TARGET_DIR)/usr/bin/,playsound playsound_simple) +endef + +ifneq ($(BR2_PACKAGE_SDL_SOUND_PLAYSOUND),y) +SDL_SOUND_POST_INSTALL_TARGET_HOOKS += SDL_SOUND_REMOVE_PLAYSOUND +endif + +$(eval $(autotools-package)) diff --git a/package/sdl_ttf/Config.in b/package/sdl_ttf/Config.in new file mode 100644 index 0000000000..efc92e5ad9 --- /dev/null +++ b/package/sdl_ttf/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_SDL_TTF + bool "SDL_TTF" + depends on BR2_PACKAGE_SDL + select BR2_PACKAGE_FREETYPE + help + SDL_ttf is a sample TrueType font library. It allows you to + use TrueType fonts in your SDL applications. + + http://www.libsdl.org/projects/SDL_ttf/ diff --git a/package/sdl_ttf/sdl_ttf.hash b/package/sdl_ttf/sdl_ttf.hash new file mode 100644 index 0000000000..ac7d6a6be0 --- /dev/null +++ b/package/sdl_ttf/sdl_ttf.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 724cd895ecf4da319a3ef164892b72078bd92632a5d812111261cde248ebcdb7 SDL_ttf-2.0.11.tar.gz diff --git a/package/sdl_ttf/sdl_ttf.mk b/package/sdl_ttf/sdl_ttf.mk new file mode 100644 index 0000000000..3e494b4ca2 --- /dev/null +++ b/package/sdl_ttf/sdl_ttf.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# sdl_ttf +# +################################################################################ + +SDL_TTF_VERSION = 2.0.11 +SDL_TTF_SOURCE = SDL_ttf-$(SDL_TTF_VERSION).tar.gz +SDL_TTF_SITE = http://www.libsdl.org/projects/SDL_ttf/release +SDL_TTF_LICENSE = zlib +SDL_TTF_LICENSE_FILES = COPYING + +SDL_TTF_INSTALL_STAGING = YES +SDL_TTF_DEPENDENCIES = sdl freetype +SDL_TTF_CONF_OPTS = \ + --without-x \ + --with-freetype-prefix=$(STAGING_DIR)/usr \ + --with-sdl-prefix=$(STAGING_DIR)/usr + +SDL_TTF_MAKE_OPTS = INCLUDES="-I$(STAGING_DIR)/usr/include/SDL" LDFLAGS="-L$(STAGING_DIR)/usr/lib" +$(eval $(autotools-package)) diff --git a/package/sdparm/Config.in b/package/sdparm/Config.in new file mode 100644 index 0000000000..cec0f840f1 --- /dev/null +++ b/package/sdparm/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_SDPARM + bool "sdparm" + help + Utility to accesses SCSI device parameters. + + http://sg.danny.cz/sg/sdparm.html diff --git a/package/sdparm/sdparm.hash b/package/sdparm/sdparm.hash new file mode 100644 index 0000000000..050785ab71 --- /dev/null +++ b/package/sdparm/sdparm.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7dc9e148cef22744e00809dad21b59ac544e3615001bc1b2399978f73e1d58ca sdparm-1.10.tar.xz diff --git a/package/sdparm/sdparm.mk b/package/sdparm/sdparm.mk new file mode 100644 index 0000000000..ed1606c1cf --- /dev/null +++ b/package/sdparm/sdparm.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# sdparm +# +################################################################################ + +SDPARM_VERSION = 1.10 +SDPARM_SOURCE = sdparm-$(SDPARM_VERSION).tar.xz +SDPARM_SITE = http://sg.danny.cz/sg/p +SDPARM_LICENSE = BSD-3c +SDPARM_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_SG3_UTILS),y) +SDPARM_DEPENDENCIES += sg3_utils +else +SDPARM_CONF_OPTS += --disable-libsgutils +endif + +$(eval $(autotools-package)) diff --git a/package/sed/Config.in b/package/sed/Config.in new file mode 100644 index 0000000000..c6c91df48f --- /dev/null +++ b/package/sed/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_SED + bool "sed" + depends on BR2_USE_WCHAR + help + Super-useful stream editor. + + http://sed.sourceforge.net/ + +comment "sed needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/sed/sed.hash b/package/sed/sed.hash new file mode 100644 index 0000000000..e7f2db591f --- /dev/null +++ b/package/sed/sed.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 fea0a94d4b605894f3e2d5572e3f96e4413bcad3a085aae7367c2cf07908b2ff sed-4.2.2.tar.gz diff --git a/package/sed/sed.mk b/package/sed/sed.mk new file mode 100644 index 0000000000..71c62d0fd2 --- /dev/null +++ b/package/sed/sed.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# sed +# +################################################################################ + +SED_VERSION = 4.2.2 +SED_SITE = $(BR2_GNU_MIRROR)/sed +SED_LICENSE = GPLv3 +SED_LICENSE_FILES = COPYING + +SED_CONF_OPTS = \ + --bindir=/bin \ + --libdir=/lib \ + --libexecdir=/usr/lib \ + --sysconfdir=/etc \ + --datadir=/usr/share \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --include=$(STAGING_DIR)/usr/include + +$(eval $(autotools-package)) diff --git a/package/sepolgen/sepolgen.hash b/package/sepolgen/sepolgen.hash new file mode 100644 index 0000000000..a377c66aef --- /dev/null +++ b/package/sepolgen/sepolgen.hash @@ -0,0 +1,2 @@ +# https://github.com/SELinuxProject/selinux/wiki/Releases +sha256 8a1c6d3a78c9b6ad3555c74def555f65a62950bf21c111c585bfc382fec3a645 sepolgen-1.1.9.tar.gz diff --git a/package/sepolgen/sepolgen.mk b/package/sepolgen/sepolgen.mk new file mode 100644 index 0000000000..7c958662c4 --- /dev/null +++ b/package/sepolgen/sepolgen.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# sepolgen +# +################################################################################ + +SEPOLGEN_VERSION = 1.1.9 +SEPOLGEN_SITE = https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20130423 +SEPOLGEN_LICENSE = GPLv2 +SEPOLGEN_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_PYTHON3),y) +HOST_SEPOLGEN_DEPENDENCIES = host-python3 +HOST_SEPOLGEN_MAKE_CMDS = $(HOST_CONFIGURE_OPTS) \ + PYTHONLIBDIR=/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages +else +HOST_SEPOLGEN_DEPENDENCIES = host-python +HOST_SEPOLGEN_MAKE_CMDS = $(HOST_CONFIGURE_OPTS) \ + PYTHONLIBDIR=/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages +endif + +define HOST_SEPOLGEN_BUILD_CMDS + $(MAKE) -C $(@D) $(HOST_SEPOLGEN_MAKE_CMDS) DESTDIR=$(HOST_DIR) +endef + +define HOST_SEPOLGEN_INSTALL_CMDS + $(MAKE) -C $(@D) $(HOST_SEPOLGEN_MAKE_CMDS) DESTDIR=$(HOST_DIR) install +endef + +$(eval $(host-generic-package)) diff --git a/package/ser2net/0001-Fix-TIOCSRS485-undeclared-error.patch b/package/ser2net/0001-Fix-TIOCSRS485-undeclared-error.patch new file mode 100644 index 0000000000..9c6d1689b7 --- /dev/null +++ b/package/ser2net/0001-Fix-TIOCSRS485-undeclared-error.patch @@ -0,0 +1,65 @@ +ser2net: Fix compilation failures due to missing TIOCSRS485 macro + +Patch sent upstream: + https://sourceforge.net/p/ser2net/mailman/message/32905302/ + +Signed-off-by: Vicente Olivert Riera + +From: Yegor Yefremov + +include fixes compilations for systems, +where won't be included automatically. + +Move special Linux includes to dataxfer.h. + +Signed-off-by: Yegor Yefremov +--- + dataxfer.h | 5 +++-- + devcfg.c | 2 -- + 2 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/dataxfer.h b/dataxfer.h +index bd2665e..c3d7431 100644 +--- a/dataxfer.h ++++ b/dataxfer.h +@@ -20,8 +20,6 @@ + #ifndef DATAXFER + #define DATAXFER + +-#include +- + #include "controller.h" + + #ifdef USE_UUCP_LOCKING +@@ -30,6 +28,9 @@ extern int uucp_locking_enabled; + + #ifdef linux + ++#include ++#include ++ + #define USE_RS485_FEATURE + + /* Check, if the toolchain provides serial_rs485 structure and macros */ +diff --git a/devcfg.c b/devcfg.c +index ab819a6..1f84714 100644 +--- a/devcfg.c ++++ b/devcfg.c +@@ -18,7 +18,6 @@ + */ + + /* This code handles generating the configuration for the serial port. */ +- + #include + #include + #include +@@ -31,7 +30,6 @@ + #include + #include + #include +-#include + + #include "ser2net.h" + #include "selector.h" +-- +1.9.1 diff --git a/package/ser2net/Config.in b/package/ser2net/Config.in new file mode 100644 index 0000000000..3f0d15b30d --- /dev/null +++ b/package/ser2net/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_SER2NET + bool "ser2net" + depends on BR2_USE_MMU # fork() + help + Ser2net provides a way for a user to connect from a network + connection to a serial port.. + + http://ser2net.sourceforge.net diff --git a/package/ser2net/ser2net.hash b/package/ser2net/ser2net.hash new file mode 100644 index 0000000000..4675164e49 --- /dev/null +++ b/package/ser2net/ser2net.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 98f6193225338e25f35302fef5e1f16688693ed43e7b3c3e9e09187eb54547ac ser2net-2.10.0.tar.gz diff --git a/package/ser2net/ser2net.mk b/package/ser2net/ser2net.mk new file mode 100644 index 0000000000..414f1eda32 --- /dev/null +++ b/package/ser2net/ser2net.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# ser2net +# +################################################################################ + +SER2NET_VERSION = 2.10.0 +SER2NET_SITE = http://downloads.sourceforge.net/project/ser2net/ser2net +SER2NET_LICENSE = GPLv2+ +SER2NET_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/setools/0001-cross-compile-fixes.patch b/package/setools/0001-cross-compile-fixes.patch new file mode 100644 index 0000000000..1a4af0ce31 --- /dev/null +++ b/package/setools/0001-cross-compile-fixes.patch @@ -0,0 +1,125 @@ +Correct build issues to enable cross compiling. These changes require the +package to be auto reconfigured. + +These updates were not upsteamed as the 3.3.x version has stablized and they +were only taking bug fixes. Also the 4.0 preview has completely reworked +the build infrastructure which will require this to be revisited. + +Signed-off-by Clayton Shotwell + +diff -urN a/configure.ac b/configure.ac +--- a/configure.ac 2013-01-16 10:36:24.000000000 -0600 ++++ b/configure.ac 2013-07-12 08:22:10.380255248 -0500 +@@ -448,8 +448,9 @@ + sepol_srcdir="") + if test "x${sepol_srcdir}" = "x"; then + sepol_srcdir=${sepol_devel_libdir} +- AC_CHECK_FILE([${sepol_srcdir}/libsepol.a],, +- AC_MSG_ERROR([make sure libsepol-static is installed])) ++ if test ! -f ${sepol_srcdir}/libsepol.a; then ++ AC_MSG_ERROR([could not find precompiled libsepol.a]) ++ fi + else + AC_MSG_CHECKING([for compatible sepol source tree]) + sepol_version=${sepol_srcdir}/VERSION +@@ -484,8 +485,9 @@ + AC_CHECK_HEADER([sepol/policydb/policydb.h], , AC_MSG_ERROR([could not find sepol source tree])) + CFLAGS="${sepol_src_save_CFLAGS}" + CPPFLAGS="${sepol_src_save_CPPFLAGS}" +- AC_CHECK_FILE([${sepol_srcdir}/libsepol.a],, +- AC_MSG_ERROR([could not find precompiled libsepol.a])) ++ if test ! -f ${sepol_srcdir}/libsepol.a; then ++ AC_MSG_ERROR([could not find precompiled libsepol.a]) ++ fi + sepol_devel_incdir="${sepol_srcdir}/../include" + fi + SELINUX_CFLAGS="-I${sepol_devel_incdir} -I${selinux_devel_incdir}" +@@ -578,12 +580,13 @@ + [AC_LANG_SOURCE([ + #include + int main () { +- return expand_module_avrules(NULL, NULL, NULL, NULL, NULL, 0, 0); ++ return expand_module_avrules(NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0); + }])], + AC_MSG_RESULT([yes]), + AC_MSG_ERROR([this version of libsepol is incompatible with SETools])) + fi + sepol_new_expand_boolmap="yes" ++ sepol_new_user_role_mapping="yes" + else + sepol_new_expand_boolmap="no" + fi +@@ -607,7 +610,8 @@ + exit(EXIT_FAILURE); + }])], + sepol_policy_version_max=`cat conftest.data`, +- AC_MSG_FAILURE([could not determine maximum libsepol policy version])) ++ AC_MSG_FAILURE([could not determine maximum libsepol policy version]), ++ sepol_policy_version_max="26") + AC_DEFINE_UNQUOTED(SEPOL_POLICY_VERSION_MAX, ${sepol_policy_version_max}, [maximum policy version supported by libsepol]) + CFLAGS="${sepol_save_CFLAGS}" + CPPFLAGS="${sepol_save_CPPFLAGS}" +@@ -631,7 +635,7 @@ + changequote([,])dnl + selinux_save_CFLAGS="${CFLAGS}" + CFLAGS="${SELINUX_CFLAGS} ${SELINUX_LIB_FLAG} -lselinux -lsepol ${CFLAGS}" +- gcc ${CFLAGS} -o conftest conftest.c >&5 ++ ${CC} ${CFLAGS} -o conftest conftest.c >&5 + selinux_policy_dir=`./conftest` + AC_MSG_RESULT(${selinux_policy_dir}) + CFLAGS="${selinux_save_CFLAGS}" +diff -urN a/libqpol/src/policy_define.c b/libqpol/src/policy_define.c +--- a/libqpol/src/policy_define.c 2013-01-16 10:36:24.000000000 -0600 ++++ b/libqpol/src/policy_define.c 2013-07-12 08:22:10.380255248 -0500 +@@ -2135,7 +2135,7 @@ + #ifdef HAVE_SEPOL_ROLE_ATTRS + if (role_set_expand(&roles, &e_roles, policydbp, NULL, NULL)) + #elif HAVE_SEPOL_USER_ROLE_MAPPING +- if (role_set_expand(&roles, &e_roles, policydbp, NULL)) ++ if (role_set_expand(&roles, &e_roles, policydbp, NULL, NULL)) + #else + if (role_set_expand(&roles, &e_roles, policydbp)) + #endif +diff -urN a/m4/ac_python_devel.m4 b/m4/ac_python_devel.m4 +--- a/m4/ac_python_devel.m4 2013-01-16 10:36:22.000000000 -0600 ++++ b/m4/ac_python_devel.m4 2013-07-12 08:22:10.380255248 -0500 +@@ -234,7 +234,7 @@ + AC_MSG_CHECKING([consistency of all components of python development environment]) + AC_LANG_PUSH([C]) + # save current global flags +- LIBS="$ac_save_LIBS $PYTHON_LDFLAGS" ++ LIBS="$ac_save_LIBS $PYTHON_EXTRA_LIBS $PYTHON_LDFLAGS" + CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" + AC_TRY_LINK([ + #include +diff -urN a/python/setools/Makefile.am b/python/setools/Makefile.am +--- a/python/setools/Makefile.am 2013-01-16 10:36:22.000000000 -0600 ++++ b/python/setools/Makefile.am 2013-07-12 08:22:19.200251011 -0500 +@@ -22,13 +22,13 @@ + python-build: sesearch.c seinfo.c + @mkdir -p setools + @cp __init__.py setools +- LIBS="$(QPOL_LIB_FLAG) $(APOL_LIB_FLAG)" INCLUDES="$(QPOL_CFLAGS) $(APOL_CFLAGS)" $(PYTHON) setup.py build ++ LIBS="$(QPOL_LIB_FLAG) $(APOL_LIB_FLAG)" LIBDIRS="$(PYTHON_LDFLAGS)" INCLUDES="$(PYTHON_CPPFLAGS) $(QPOL_CFLAGS) $(APOL_CFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" LDSHARED="$(CC) -shared" LDFLAGS="$(LDFLAGS)" $(PYTHON) setup.py build_ext + + install-exec-hook: +- $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` ++ $(PYTHON) setup.py install `test -n "$(DESTDIR)" && echo --prefix=$(DESTDIR)/usr` + + uninstall-hook: +- $(PYTHON) setup.py uninstall `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` ++ $(PYTHON) setup.py uninstall `test -n "$(DESTDIR)" && echo --prefix=$(DESTDIR)/usr` + + clean-local: + $(PYTHON) setup.py clean -a +--- a/python/setools/setup.py 2013-01-16 10:36:22.000000000 -0600 ++++ b/python/setools/setup.py 2013-09-04 09:17:48.452916991 -0500 +@@ -8,7 +8,7 @@ + try: + inc=os.getenv("INCLUDES").split(" ") + INCLUDES=map(lambda x: x[2:], inc) +- LIBDIRS=map(lambda x: "/".join(x.split("/")[:-1]), os.getenv("LIBS").split()) ++ LIBDIRS=map(lambda x: "/".join(x.split("/")[:-1]), os.getenv("LIBS").split()) + map(lambda x: x[2:], os.getenv("LIBDIRS").split()) + except: + INCLUDES="" + LIBDIRS="" diff --git a/package/setools/0002-move-python-check.patch b/package/setools/0002-move-python-check.patch new file mode 100644 index 0000000000..cef2cec996 --- /dev/null +++ b/package/setools/0002-move-python-check.patch @@ -0,0 +1,25 @@ +Correct a build issue that occurs when python is not found +in the path. This check should only be done if swig-python +option is selected. + +Signed-off-by Clayton Shotwell + +--- a/configure.ac 2015-05-15 12:28:07.566060349 -0500 ++++ b/configure.ac 2015-05-28 15:07:25.357072800 -0500 +@@ -217,8 +217,6 @@ + do_swigify=yes + fi + +-AM_PATH_PYTHON(2.7) +- + AC_ARG_ENABLE(swig-python, + AC_HELP_STRING([--enable-swig-python], + [build SWIG interfaces for Python]), +@@ -227,6 +225,7 @@ + if test ${do_swigify} = no; then + AC_PROG_SWIG(2.0.0) + fi ++ AM_PATH_PYTHON(2.7) + SWIG_PYTHON + do_swigify_python=yes + do_swigify=yes diff --git a/package/setools/Config.in b/package/setools/Config.in new file mode 100644 index 0000000000..c291b2176e --- /dev/null +++ b/package/setools/Config.in @@ -0,0 +1,34 @@ +config BR2_PACKAGE_SETOOLS + bool "setools" + select BR2_PACKAGE_LIBSELINUX + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_BZIP2 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + # bfin: infamous _ symbol prefix issue + # nios2: triggers some toolchain issue "No symbol version + # section for versioned symbol" + # arc: libselinux not available + depends on !BR2_nios2 && !BR2_bfin && !BR2_arc + help + SETools is an open source project designed to facilitate + SELinux policy analysis. The primary tools are: + * apol - analyze a SELinux policy. + * seaudit - analyze audit messages from SELinux. + * seaudit-report - generate highly-customized audit log + reports. + * sechecker - command line tool for performing modular + checks on an SELinux policy. + * sediff - semantic policy difference tool for SELinux. + * secmds - command-line tools to analyze and search SELinux + policy. + + https://github.com/TresysTechnology/setools3/wiki + +comment "setools needs a toolchain w/ threads, C++, wchar, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \ + || !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP + depends on !BR2_nios2 && !BR2_bfin && !BR2_arc diff --git a/package/setools/setools.hash b/package/setools/setools.hash new file mode 100644 index 0000000000..d422e6607b --- /dev/null +++ b/package/setools/setools.hash @@ -0,0 +1,4 @@ +# From https://github.com/TresysTechnology/setools3/wiki/Download +md5 d68d0d4e4da0f01da0f208782ff04b91 setools-3.3.8.tar.bz2 +# Locally computed +sha256 44387ecc9a231ec536a937783440cd8960a72c51f14bffc1604b7525e341e999 setools-3.3.8.tar.bz2 diff --git a/package/setools/setools.mk b/package/setools/setools.mk new file mode 100644 index 0000000000..87a19cf5ae --- /dev/null +++ b/package/setools/setools.mk @@ -0,0 +1,84 @@ +################################################################################ +# +# setools +# +################################################################################ + +SETOOLS_VERSION = 3.3.8 +SETOOLS_SOURCE = setools-$(SETOOLS_VERSION).tar.bz2 +SETOOLS_SITE = https://raw.githubusercontent.com/wiki/TresysTechnology/setools3/files/dists/setools-$(SETOOLS_VERSION) +SETOOLS_DEPENDENCIES = libselinux libsepol sqlite libxml2 bzip2 host-bison host-flex +SETOOLS_INSTALL_STAGING = YES +SETOOLS_LICENSE = GPLv2+, LGPLv2.1+ +SETOOLS_LICENSE_FILES = COPYING COPYING.GPL COPYING.LGPL + +# configure.ac is patched by the cross compile patch, +# so autoreconf is necessary +SETOOLS_AUTORECONF = YES + +# Notes: Need "disable-selinux-check" so the configure does not check to see +# if host has selinux enabled. +# No python support as only the libraries and commandline tools are +# installed on target +SETOOLS_CONF_OPTS = \ + --disable-debug \ + --disable-gui \ + --disable-bwidget-check \ + --disable-selinux-check \ + --disable-swig-java \ + --disable-swig-python \ + --disable-swig-tcl \ + --with-sepol-devel="$(STAGING_DIR)/usr" \ + --with-selinux-devel="$(STAGING_DIR)/usr" + +ifeq ($(BR2_sparc64):$(BR2_STATIC_LIBS),y:) +SETOOLS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -fPIC" +endif + +HOST_SETOOLS_DEPENDENCIES = host-libselinux host-libsepol host-sqlite \ + host-libxml2 host-bzip2 host-bison + +ifeq ($(BR2_PACKAGE_PYTHON3),y) +HOST_SETOOLS_PYTHON_VERSION=$(PYTHON3_VERSION_MAJOR) +HOST_SETOOLS_DEPENDENCIES += host-python3 +HOST_SETOOLS_CONF_ENV += am_cv_python_version=$(PYTHON3_VERSION) +else +HOST_SETOOLS_PYTHON_VERSION=$(PYTHON_VERSION_MAJOR) +HOST_SETOOLS_DEPENDENCIES += host-python +HOST_SETOOLS_CONF_ENV += am_cv_python_version=$(PYTHON_VERSION) +endif + +HOST_SETOOLS_PYTHON_SITE_PACKAGES = $(HOST_DIR)/usr/lib/python$(HOST_SETOOLS_PYTHON_VERSION)/site-packages +HOST_SETOOLS_PYTHON_INCLUDES = $(HOST_DIR)/usr/include/python$(HOST_SETOOLS_PYTHON_VERSION) +HOST_SETOOLS_PYTHON_LIB = -lpython$(HOST_SETOOLS_PYTHON_VERSION) + +# Notes: Need "disable-selinux-check" so the configure does not check to see +# if host has selinux enabled. +# Host builds with python support to enable tools for offline target +# policy analysis +HOST_SETOOLS_CONF_OPTS = \ + --disable-debug \ + --disable-gui \ + --disable-bwidget-check \ + --disable-selinux-check \ + --disable-swig-java \ + --disable-swig-python \ + --disable-swig-tcl \ + --with-sepol-devel="$(HOST_DIR)/usr" \ + --with-selinux-devel="$(HOST_DIR)/usr" \ + PYTHON_LDFLAGS="-L$(HOST_DIR)/usr/lib/" \ + PYTHON_CPPFLAGS="-I$(HOST_SETOOLS_PYTHON_INCLUDES)" \ + PYTHON_SITE_PKG="$(HOST_SETOOLS_PYTHON_SITE_PACKAGES)" \ + PYTHON_EXTRA_LIBS="-lpthread -ldl -lutil $(HOST_SETOOLS_PYTHON_LIB)" + +HOST_SETOOLS_CONF_ENV += \ + am_cv_pathless_PYTHON=python \ + ac_cv_path_PYTHON=$(HOST_DIR)/usr/bin/python \ + am_cv_python_platform=linux2 \ + am_cv_python_version=$(HOST_SETOOLS_PYTHON_VERSION) \ + am_cv_python_pythondir=$(HOST_SETOOLS_PYTHON_SITE_PACKAGES) \ + am_cv_python_pyexecdir=$(HOST_SETOOLS_PYTHON_SITE_PACKAGES) \ + am_cv_python_includes=-I$(HOST_SETOOLS_PYTHON_INCLUDES) + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/setserial/0001-build-system-fix.patch b/package/setserial/0001-build-system-fix.patch new file mode 100644 index 0000000000..eec7993d19 --- /dev/null +++ b/package/setserial/0001-build-system-fix.patch @@ -0,0 +1,28 @@ +Install the setserial program in /usr/bin instead of /bin, and make +sure that the directories (especially the manpages directory) are +created before installing files to them. This is similar to what +automake does. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.in | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +Index: setserial-2.17/Makefile.in +=================================================================== +--- setserial-2.17.orig/Makefile.in ++++ setserial-2.17/Makefile.in +@@ -26,9 +26,10 @@ setserial.cat: setserial.8 + nroff -man setserial.8 > setserial.cat + + install: setserial setserial.8 +- $(INSTALL_PROGRAM) setserial $(DESTDIR)/bin +- $(STRIP) $(DESTDIR)/bin/setserial +- $(INSTALL_DATA) setserial.8 $(DESTDIR)/usr/man/man8 ++ mkdir -p $(DESTDIR)/usr/bin ++ $(INSTALL_PROGRAM) setserial $(DESTDIR)/usr/bin ++ mkdir -p $(DESTDIR)/usr/share/man/man8 ++ $(INSTALL_DATA) setserial.8 $(DESTDIR)/usr/share/man/man8 + + clean: + $(RM) setserial setserial.o setserial.cat *~ diff --git a/package/setserial/0002-tiocghayesesp-build-fix.patch b/package/setserial/0002-tiocghayesesp-build-fix.patch new file mode 100644 index 0000000000..176a0c9e15 --- /dev/null +++ b/package/setserial/0002-tiocghayesesp-build-fix.patch @@ -0,0 +1,28 @@ +[PATCH] setserial: fix build with 2.6.33+ kernel headers + +linux/hayesesp.h got removed in 2.6.33, but some archs (like x86) still +define the TIOCGHAYESESP ioctl, breaking the build. + +It's very unlikely to be of interest anymore, so just undef it. + +Signed-off-by: Peter Korsgaard +--- + setserial.c | 5 +++++ + 1 file changed, 5 insertions(+) + +Index: setserial-2.17/setserial.c +=================================================================== +--- setserial-2.17.orig/setserial.c ++++ setserial-2.17/setserial.c +@@ -24,6 +24,11 @@ + #endif + #include + ++/* linux/hayesesp.h got removed in 2.6.33 but some archs (like x86) ++ still define TIOCGHAYESESP. It's very unlikely to be of interest ++ anymore, so just undef it */ ++#undef TIOCGHAYESESP ++ + #include "version.h" + + static char version_str[] = "setserial version " SETSERIAL_VERSION ", " diff --git a/package/setserial/Config.in b/package/setserial/Config.in new file mode 100644 index 0000000000..4ff2477e84 --- /dev/null +++ b/package/setserial/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_SETSERIAL + bool "setserial" + # Uses fork() + depends on BR2_USE_MMU + help + Setserial : configuration of serial ports diff --git a/package/setserial/setserial.hash b/package/setserial/setserial.hash new file mode 100644 index 0000000000..ce3b369f56 --- /dev/null +++ b/package/setserial/setserial.hash @@ -0,0 +1,3 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/s/setserial/setserial_2.17-45.3.dsc +sha256 7e4487d320ac31558563424189435d396ddf77953bb23111a17a3d1487b5794a setserial_2.17.orig.tar.gz +sha256 33db87e8a86cf12b7c97efca9e056865e71358e8cfeb3931118b2647ce1eecc6 setserial_2.17-45.3.diff.gz diff --git a/package/setserial/setserial.mk b/package/setserial/setserial.mk new file mode 100644 index 0000000000..561fbe98c9 --- /dev/null +++ b/package/setserial/setserial.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# setserial +# +################################################################################ + +SETSERIAL_VERSION = 2.17 +SETSERIAL_PATCH = setserial_2.17-45.3.diff.gz +SETSERIAL_SOURCE = setserial_$(SETSERIAL_VERSION).orig.tar.gz +SETSERIAL_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/s/setserial +SETSERIAL_LICENSE = GPLv2 +SETSERIAL_LICENSE_FILES = debian/copyright +# make all also builds setserial.cat which needs nroff +SETSERIAL_MAKE_OPTS = setserial + +define SETSERIAL_APPLY_DEBIAN_PATCHES + # Touching gorhack.h is needed for the Debian patch 18 to work + if [ -d $(@D)/debian/patches ]; then \ + touch $(@D)/gorhack.h; \ + rm $(@D)/debian/patches/01_makefile.dpatch; \ + $(APPLY_PATCHES) $(@D) $(@D)/debian/patches *.dpatch; \ + fi +endef + +SETSERIAL_POST_PATCH_HOOKS += SETSERIAL_APPLY_DEBIAN_PATCHES + +$(eval $(autotools-package)) diff --git a/package/sg3_utils/Config.in b/package/sg3_utils/Config.in new file mode 100644 index 0000000000..4b74eda641 --- /dev/null +++ b/package/sg3_utils/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_SG3_UTILS + bool "sg3-utils" + depends on !BR2_bfin # symbol prefixing problems + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Low level utilities for devices that use a SCSI command set. + This option install only libsgutils2 library not programs. + + http://sg.danny.cz/sg/sg3_utils.html + +if BR2_PACKAGE_SG3_UTILS + +config BR2_PACKAGE_SG3_UTILS_PROGS + bool "install programs" + +endif + +comment "sg3-utils needs a toolchain w/ threads" + depends on !BR2_bfin + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/sg3_utils/sg3_utils.hash b/package/sg3_utils/sg3_utils.hash new file mode 100644 index 0000000000..a884063f4f --- /dev/null +++ b/package/sg3_utils/sg3_utils.hash @@ -0,0 +1,2 @@ +# Locally calculated from download (no sig, hash) +sha256 97aeed65894feb2add896b4adfa4cf343966c8a61c7d206795ed0507640ee7b9 sg3_utils-1.42.tar.xz diff --git a/package/sg3_utils/sg3_utils.mk b/package/sg3_utils/sg3_utils.mk new file mode 100644 index 0000000000..36cb32e33a --- /dev/null +++ b/package/sg3_utils/sg3_utils.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# sg3_utils +# +################################################################################ + +SG3_UTILS_VERSION = 1.42 +SG3_UTILS_SOURCE = sg3_utils-$(SG3_UTILS_VERSION).tar.xz +SG3_UTILS_SITE = http://sg.danny.cz/sg/p +SG3_UTILS_LICENSE = BSD-3c +# utils progs are GPLv2+ licenced +ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),y) +SG3_UTILS_LICENSE += GPLv2+ +endif +SG3_UTILS_LICENSE_FILES = COPYING BSD_LICENSE + +# install the libsgutils2 library +SG3_UTILS_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),) +define SG3_UTILS_REMOVE_PROGS + for prog in \ + compare_and_write copy_results dd decode_sense \ + emc_trespass format get_config \ + get_lba_status ident inq logs luns map26 \ + map sgm_dd modes opcodes sgp_dd persist prevent \ + raw rbuf rdac read readcap read_block_limits \ + read_attr read_buffer read_long reassign referrals \ + rep_zones requests reset reset_wp rmsn rtpg safte sanitize \ + sat_identify sat_phy_event sat_read_gplog sat_set_features \ + scan senddiag ses ses_microcode start stpg sync test_rwbuf \ + timestamp turs unmap verify vpd write_buffer write_long \ + write_same write_verify wr_mode xcopy zone; do \ + $(RM) $(TARGET_DIR)/usr/bin/sg_$${prog} ; \ + done + for prog in \ + logging_level mandat readcap ready satl start stop \ + temperature; do \ + $(RM) $(TARGET_DIR)/usr/bin/scsi_$${prog} ; \ + done + for prog in \ + sginfo sgm_dd sgp_dd; do \ + $(RM) $(TARGET_DIR)/usr/bin/$${prog}; \ + done +endef + +SG3_UTILS_POST_INSTALL_TARGET_HOOKS += SG3_UTILS_REMOVE_PROGS +endif + +$(eval $(autotools-package)) diff --git a/package/shairport-sync/Config.in b/package/shairport-sync/Config.in new file mode 100644 index 0000000000..c558a64c5b --- /dev/null +++ b/package/shairport-sync/Config.in @@ -0,0 +1,39 @@ +config BR2_PACKAGE_SHAIRPORT_SYNC + bool "shairport-sync" + depends on BR2_USE_MMU # libdaemon + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_ALSA_LIB_MIXER + select BR2_PACKAGE_LIBCONFIG + select BR2_PACKAGE_LIBDAEMON + select BR2_PACKAGE_POLARSSL if !BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_POPT + help + Shairport Sync emulates an AirPort Express for the purpose of + streaming audio from iTunes, iPods, iPhones, iPads and AppleTVs. + Audio played by a Shairport Sync-powered device stays in synchrony + with the source and thus with other devices that are playing the same + source synchronously. Thus, for example, synchronised multi-room + audio is possible without difficulty. + + https://github.com/mikebrady/shairport-sync + +if BR2_PACKAGE_SHAIRPORT_SYNC + +config BR2_PACKAGE_SHAIRPORT_SYNC_LIBSOXR + bool "libsoxr support" + select BR2_PACKAGE_LIBSOXR + help + Enable support for libsoxr, the SoX Resampler library. + + Briefly, Shairport Sync keeps in step with the audio source by + deleting or inserting frames of audio into the stream as needed. This + "interpolation" is normally inaudible, but it can be heard in some + circumstances. Libsoxr allows this interpolation to be done much more + smoothly and subtly. + +endif + +comment "shairport-sync needs a toolchain w/ NPTL" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL diff --git a/package/shairport-sync/S99shairport-sync b/package/shairport-sync/S99shairport-sync new file mode 100644 index 0000000000..5443ed138c --- /dev/null +++ b/package/shairport-sync/S99shairport-sync @@ -0,0 +1,25 @@ +#! /bin/sh + +# Additional options that are passed to Shairport Sync +OPTIONS="-d" + +case "$1" in + start) + printf "Starting shairport-sync: " + start-stop-daemon -S -q -p /var/run/shairport-sync.pid --exec /usr/bin/shairport-sync -- $OPTIONS + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping shairport-sync: " + start-stop-daemon -K -q -p /var/run/shairport-sync.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac diff --git a/package/shairport-sync/shairport-sync.hash b/package/shairport-sync/shairport-sync.hash new file mode 100644 index 0000000000..a452bbdd12 --- /dev/null +++ b/package/shairport-sync/shairport-sync.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 4dfdaf0883b94c7061c894be295c878ede3048355bd415905db14ccb74159b72 shairport-sync-2.8.3.tar.gz diff --git a/package/shairport-sync/shairport-sync.mk b/package/shairport-sync/shairport-sync.mk new file mode 100644 index 0000000000..32127b15e9 --- /dev/null +++ b/package/shairport-sync/shairport-sync.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# shairport-sync +# +################################################################################ + +SHAIRPORT_SYNC_VERSION = 2.8.3 +SHAIRPORT_SYNC_SITE = $(call github,mikebrady,shairport-sync,$(SHAIRPORT_SYNC_VERSION)) + +SHAIRPORT_SYNC_LICENSE = MIT, BSD-3c +SHAIRPORT_SYNC_LICENSE_FILES = LICENSES +SHAIRPORT_SYNC_DEPENDENCIES = alsa-lib libconfig libdaemon popt host-pkgconf + +# git clone, no configure +SHAIRPORT_SYNC_AUTORECONF = YES + +SHAIRPORT_SYNC_CONF_OPTS = --with-alsa \ + --with-metadata \ + --with-pipe \ + --with-stdout + +# Avahi or tinysvcmdns (shaiport-sync bundles its own version of tinysvcmdns). +# Avahi support needs libavahi-client, which is built by avahi if avahi-daemon +# and dbus is selected. Since there is no BR2_PACKAGE_LIBAVAHI_CLIENT config +# option yet, use the avahi-daemon and dbus congig symbols to check for +# libavahi-client. +ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy) +SHAIRPORT_SYNC_DEPENDENCIES += avahi +SHAIRPORT_SYNC_CONF_OPTS += --with-avahi +else +SHAIRPORT_SYNC_CONF_OPTS += --with-tinysvcmdns +endif + +# OpenSSL or PolarSSL +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SHAIRPORT_SYNC_DEPENDENCIES += openssl +SHAIRPORT_SYNC_CONF_OPTS += --with-ssl=openssl +else +SHAIRPORT_SYNC_DEPENDENCIES += polarssl +SHAIRPORT_SYNC_CONF_OPTS += --with-ssl=polarssl +endif + +ifeq ($(BR2_PACKAGE_SHAIRPORT_SYNC_LIBSOXR),y) +SHAIRPORT_SYNC_DEPENDENCIES += libsoxr +SHAIRPORT_SYNC_CONF_OPTS += --with-soxr +endif + +define SHAIRPORT_SYNC_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/shairport-sync \ + $(TARGET_DIR)/usr/bin/shairport-sync + $(INSTALL) -D -m 0644 $(@D)/scripts/shairport-sync.conf \ + $(TARGET_DIR)/etc/shairport-sync.conf +endef + +define SHAIRPORT_SYNC_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/shairport-sync/S99shairport-sync \ + $(TARGET_DIR)/etc/init.d/S99shairport-sync +endef + +$(eval $(autotools-package)) diff --git a/package/shared-mime-info/0001-Remove-incorrect-dependency-from-install-data-hook.patch b/package/shared-mime-info/0001-Remove-incorrect-dependency-from-install-data-hook.patch new file mode 100644 index 0000000000..a0d3fb0fb3 --- /dev/null +++ b/package/shared-mime-info/0001-Remove-incorrect-dependency-from-install-data-hook.patch @@ -0,0 +1,45 @@ +From 3bcb00e27ab09c433fdfecace0d48a6a7ed55ea8 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Fri, 22 Apr 2016 23:14:32 +0200 +Subject: [PATCH] Remove incorrect dependency from install-data-hook + +Having install-binPROGRAMS as a dependency of install-data-hook is not +correct, as it causes the installation of programs to be executed +twice, and those two installations are racing with each other, causing +random installation failures. + +In addition, this dependency is not needed: the install-data-hook +calls the update-mime-database program in one of two ways: + + - When cross-compiling, using the program pointed by + UPDATE_MIME_DATABASE, which is already built, and is not installed + by install-binPROGRAMS. + + - When compiling natively, suing the update-mime-database from the + build directory, so there is no need to depend on + install-binPROGRAMS. + +This patch is similar to the patch used by the Yocto Project at +http://git.yoctoproject.org/cgit.cgi/poky/plain/meta/recipes-support/shared-mime-info/shared-mime-info/install-data-hook.patch. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 6fc4f73..c318dc3 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -52,7 +52,7 @@ else + update_mime_database="$(top_builddir)/update-mime-database$(EXEEXT)" + endif + +-install-data-hook: install-binPROGRAMS ++install-data-hook: + if ENABLE_UPDATE_MIMEDB + $(update_mime_database) -V "$(DESTDIR)$(datadir)/mime" + endif +-- +2.6.4 + diff --git a/package/shared-mime-info/Config.in b/package/shared-mime-info/Config.in new file mode 100644 index 0000000000..91a5a15a05 --- /dev/null +++ b/package/shared-mime-info/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_SHARED_MIME_INFO + bool "shared-mime-info" + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_LIBXML2 + help + The shared-mime-info package contains the core + database of common types and the update-mime-database + command used to extend it. + + http://freedesktop.org/wiki/Software/shared-mime-info + +comment "shared-mime-info needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/shared-mime-info/shared-mime-info.hash b/package/shared-mime-info/shared-mime-info.hash new file mode 100644 index 0000000000..997751d995 --- /dev/null +++ b/package/shared-mime-info/shared-mime-info.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 b2f8f85b6467933824180d0252bbcaee523f550a8fbc95cc4391bd43c03bc34c shared-mime-info-1.6.tar.xz diff --git a/package/shared-mime-info/shared-mime-info.mk b/package/shared-mime-info/shared-mime-info.mk new file mode 100644 index 0000000000..a70bc9a1c4 --- /dev/null +++ b/package/shared-mime-info/shared-mime-info.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# shared-mime-info +# +################################################################################ + +SHARED_MIME_INFO_VERSION = 1.6 +SHARED_MIME_INFO_SOURCE = shared-mime-info-$(SHARED_MIME_INFO_VERSION).tar.xz +SHARED_MIME_INFO_SITE = http://freedesktop.org/~hadess +SHARED_MIME_INFO_INSTALL_STAGING = YES +SHARED_MIME_INFO_CONF_ENV = XMLLINT=$(HOST_DIR)/usr/bin/xmllint +SHARED_MIME_INFO_DEPENDENCIES = host-shared-mime-info libxml2 libglib2 +SHARED_MIME_INFO_CONF_OPTS = \ + --disable-update-mimedb \ + --disable-default-make-check +HOST_SHARED_MIME_INFO_CONF_OPTS = \ + --disable-update-mimedb \ + --disable-default-make-check +SHARED_MIME_INFO_LICENSE = GPLv2 +SHARED_MIME_INFO_LICENSE_FILES = COPYING + +HOST_SHARED_MIME_INFO_DEPENDENCIES = \ + host-pkgconf host-intltool host-libxml2 host-libglib2 + +define SHARED_MIME_INFO_INSTALL_TARGET_CMDS + $(HOST_MAKE_ENV) $(SHARED_MIME_INFO_HOST_BINARY) $(STAGING_DIR)/usr/share/mime + $(INSTALL) -D $(STAGING_DIR)/usr/share/mime/mime.cache $(TARGET_DIR)/usr/share/mime/mime.cache +endef + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +# shared-mime-info for the host +SHARED_MIME_INFO_HOST_BINARY = $(HOST_DIR)/usr/bin/update-mime-database diff --git a/package/sigrok-cli/Config.in b/package/sigrok-cli/Config.in new file mode 100644 index 0000000000..b8eb60d1ba --- /dev/null +++ b/package/sigrok-cli/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_SIGROK_CLI + bool "sigrok-cli" + select BR2_PACKAGE_LIBSIGROK + # libsigrok->libglib2: + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU + # libsigrok + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + help + Sigrok-cli is a command-line frontend for the sigrok + software suite. + + http://sigrok.org/wiki/Sigrok-cli + +comment "sigrok-cli needs a toolchain w/ wchar, threads, gcc >= 4.7" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 diff --git a/package/sigrok-cli/sigrok-cli.hash b/package/sigrok-cli/sigrok-cli.hash new file mode 100644 index 0000000000..b60b57e71e --- /dev/null +++ b/package/sigrok-cli/sigrok-cli.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 ab2ede4e245f3987e19a89a530bd204e0d792c07474d9fed3345d4af4e84723c sigrok-cli-0.6.0.tar.gz diff --git a/package/sigrok-cli/sigrok-cli.mk b/package/sigrok-cli/sigrok-cli.mk new file mode 100644 index 0000000000..ec5c8bd864 --- /dev/null +++ b/package/sigrok-cli/sigrok-cli.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# sigrok-cli +# +################################################################################ + +SIGROK_CLI_VERSION = 0.6.0 +SIGROK_CLI_SITE = http://sigrok.org/download/source/sigrok-cli +SIGROK_CLI_LICENSE = GPLv3+ +SIGROK_CLI_LICENSE_FILES = COPYING +SIGROK_CLI_DEPENDENCIES = host-pkgconf libsigrok + +ifeq ($(BR2_PACKAGE_LIBSIGROKDECODE),y) +SIGROK_CLI_CONF_OPTS += --with-libsigrokdecode +SIGROK_CLI_DEPENDENCIES += libsigrokdecode +else +SIGROK_CLI_CONF_OPTS += --with-libsigrokdecode=NO +endif + +$(eval $(autotools-package)) diff --git a/package/simicsfs/Config.in b/package/simicsfs/Config.in new file mode 100644 index 0000000000..12b05c17de --- /dev/null +++ b/package/simicsfs/Config.in @@ -0,0 +1,11 @@ +comment "simicsfs needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_SIMICSFS + bool "simicsfs" + depends on BR2_LINUX_KERNEL + help + A kernel driver that provides access to a host computer's local + filesystem when the target is executing within a SIMICS simulation. + + http://www.cs.sfu.ca/~fedorova/Tech/simics-guides-3.0.26/simics-user-guide-unix/topic33.html diff --git a/package/simicsfs/simicsfs.hash b/package/simicsfs/simicsfs.hash new file mode 100644 index 0000000000..42ada91031 --- /dev/null +++ b/package/simicsfs/simicsfs.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d0cf7caf888dc1e7dc9496c4b59af98eb2b69d6113d6920757465902e1f21f38 simicsfs-1.18.tar.gz diff --git a/package/simicsfs/simicsfs.mk b/package/simicsfs/simicsfs.mk new file mode 100644 index 0000000000..91ed413839 --- /dev/null +++ b/package/simicsfs/simicsfs.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# simicsfs +# +################################################################################ + +SIMICSFS_VERSION = 1.18 +SIMICSFS_SITE = http://download.simics.net/pub +SIMICSFS_LICENSE = GPLv2+ +SIMICSFS_LICENSE_FILES = hostfs.h + +$(eval $(kernel-module)) +$(eval $(generic-package)) diff --git a/package/sispmctl/0001-configure-add-pkg-config-support.patch b/package/sispmctl/0001-configure-add-pkg-config-support.patch new file mode 100644 index 0000000000..9466080641 --- /dev/null +++ b/package/sispmctl/0001-configure-add-pkg-config-support.patch @@ -0,0 +1,70 @@ +From 8002a7e6fa965dfd304d098fbc64b0f1a6e3b465 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Sun, 24 Aug 2014 22:34:29 +0200 +Subject: [PATCH 1/1] configure: add pkg-config support + +The static linking doesn't works with libusb-compat when using libusb-config. +Also the CFLAGS initialization with libusb-config --cflags is comented out. + +Based on libftdi's patch, add the support for pkg-config to link sispmctl +correctly. + +This allow to add correct include directory to CFLAGS +(Add -I$(STAGING_DIR)/usr/include and -I$(STAGING_DIR)/usr/include/libusb-1.0) +Also add needed libraries during static linking (-lusb -lusb-1.0 and -pthread) + +Signed-off-by: Romain Naour +--- + configure.in | 36 +++++++++++------------------------- + 1 file changed, 11 insertions(+), 25 deletions(-) + +diff --git a/configure.in b/configure.in +index 08d39ea..65d0c1d 100644 +--- a/configure.in ++++ b/configure.in +@@ -23,31 +23,17 @@ AC_SUBST(WEBDIR) + AC_ARG_WITH(bindaddr,[ --with-bindaddr=IP bind listening socket to IP], [BINDADDR="$withval"]) + AC_SUBST(BINDADDR) + +- +-# Checks for libraries. +-dnl check for libusb-config +-AC_PATH_PROG(HAVELIBUSB, libusb-config, $PATH) +- +-if test -e "$HAVELIBUSB"; then +- dnl LIBUSB_CFLAGS=`$HAVELIBUSB --cflags` +- LIBUSB_LIBS=`$HAVELIBUSB --libs` +- CFLAGS="$CFLAGS $LIBUSB_CFLAGS" +- LIBS="$LIBS $LIBUSB_LIBS" +-else +- AC_MSG_ERROR([*** libusb-config not found. You need a working libusb installation. Version >=0.1.7]) +-fi +- +-dnl check for version of libusb +-AC_MSG_CHECKING([if libusb version is >= 0.1.9]) +-libusb_version_needed="1009" +-libusb_version=`$HAVELIBUSB --version | sed -e "s/libusb //" | awk 'BEGIN { FS = "."; } { printf "%d", ($''1 * 1000 + $''2) * 1000 + $''3;}'` +- +-if test $libusb_version -lt $libusb_version_needed; then +- AC_MSG_RESULT(no) +- AC_MSG_ERROR([*** libusb is too old ($libusb_version). You need a libusb installation newer or equal to 0.1.9.]) +-else +- AC_MSG_RESULT(yes) +-fi ++dnl check for libusb ++PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.11) ++CFLAGS="$CFLAGS $LIBUSB_CFLAGS" ++LIBS="$LIBS $LIBUSB_LIBS" ++ ++dnl Check for recent pkg-config which supports Requires.private ++case `$PKG_CONFIG --version` in ++0.?|0.1[0-7]) PKGCONFIG_REQUIRES="Requires"; ;; ++*) PKGCONFIG_REQUIRES="Requires.private"; ;; ++esac ++AC_SUBST(PKGCONFIG_REQUIRES) + + # Checks for header files. + AC_HEADER_STDC +-- +1.9.3 + diff --git a/package/sispmctl/Config.in b/package/sispmctl/Config.in new file mode 100644 index 0000000000..976b08f885 --- /dev/null +++ b/package/sispmctl/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_SISPMCTL + bool "sispmctl" + select BR2_PACKAGE_LIBUSB + select BR2_PACKAGE_LIBUSB_COMPAT + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + help + sispmctl is an application enabling the use of the GEMBIRD + SiS-PM and mSiS(sispm) USB-controlled power-outlet device + under Linux. Note that the device is also sold under + different Names, i.e. as "IntelliPlug" in Germany. + + http://sispmctl.sourceforge.net/ + +comment "sispmctl needs a toolchain w/ threads, wchar" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR + depends on BR2_USE_MMU diff --git a/package/sispmctl/sispmctl.hash b/package/sispmctl/sispmctl.hash new file mode 100644 index 0000000000..9f34b4399d --- /dev/null +++ b/package/sispmctl/sispmctl.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e9a99cc81ef0a93f3484e5093efd14d93cc967221fcd22c151f0bea32eb91da7 sispmctl-3.1.tar.gz diff --git a/package/sispmctl/sispmctl.mk b/package/sispmctl/sispmctl.mk new file mode 100644 index 0000000000..3f3635e1f4 --- /dev/null +++ b/package/sispmctl/sispmctl.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# sispmctl +# +################################################################################ + +SISPMCTL_VERSION = 3.1 +SISPMCTL_SITE = http://downloads.sourceforge.net/project/sispmctl/sispmctl/sispmctl-$(SISPMCTL_VERSION) +SISPMCTL_LICENSE = GPLv2+ +SISPMCTL_LICENSE_FILES = LICENCE +SISPMCTL_DEPENDENCIES = libusb-compat + +SISPMCTL_CONF_OPTS = --enable-webless + +# We're patching configure.in +SISPMCTL_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/skeleton/Config.in b/package/skeleton/Config.in new file mode 100644 index 0000000000..d25147bd92 --- /dev/null +++ b/package/skeleton/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_SKELETON + bool + default y + help + The basic skeleton for your rootfs. diff --git a/package/skeleton/nfs_check b/package/skeleton/nfs_check new file mode 100755 index 0000000000..dfa0cbf580 --- /dev/null +++ b/package/skeleton/nfs_check @@ -0,0 +1,20 @@ +#!/bin/sh + +# This allows NFS booting to work while also being able to configure +# the network interface via DHCP when not NFS booting. Otherwise, a +# NFS booted system will likely hang during DHCP configuration. + +# Attempting to configure the network interface used for NFS will +# initially bring that network down. Since the root filesystem is +# accessed over this network, the system hangs. + +# This script is run by ifup and will attempt to detect if a NFS root +# mount uses the interface to be configured (IFACE), and if so does +# not configure it. This should allow the same build to be disk/flash +# booted or NFS booted. + +nfsip=`sed -n '/^[^ ]*:.* \/ nfs.*[ ,]addr=\([0-9.]\+\).*/s//\1/p' /proc/mounts` +if [ -n "$nfsip" ] && ip route get to "$nfsip" | grep -q "dev $IFACE"; then + echo Skipping $IFACE, used for NFS from $nfsip + exit 1 +fi diff --git a/package/skeleton/skeleton.mk b/package/skeleton/skeleton.mk new file mode 100644 index 0000000000..4e3cdc68df --- /dev/null +++ b/package/skeleton/skeleton.mk @@ -0,0 +1,244 @@ +################################################################################ +# +# skeleton +# +################################################################################ + +# source included in buildroot +SKELETON_SOURCE = + +# The skeleton can't depend on the toolchain, since all packages depends on the +# skeleton and the toolchain is a target package, as is skeleton. +# Hence, skeleton would depends on the toolchain and the toolchain would depend +# on skeleton. +SKELETON_ADD_TOOLCHAIN_DEPENDENCY = NO + +# The skeleton also handles the merged /usr case in the sysroot +SKELETON_INSTALL_STAGING = YES + +ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y) + +SKELETON_PATH = $(call qstrip,$(BR2_ROOTFS_SKELETON_CUSTOM_PATH)) + +ifeq ($(BR2_ROOTFS_MERGED_USR),y) + +# Ensure the user has prepared a merged /usr. +# +# Extract the inode numbers for all of those directories. In case any is +# a symlink, we want to get the inode of the pointed-to directory, so we +# append '/.' to be sure we get the target directory. Since the symlinks +# can be anyway (/bin -> /usr/bin or /usr/bin -> /bin), we do that for +# all of them. +# +SKELETON_LIB_INODE = $(shell stat -c '%i' $(SKELETON_PATH)/lib/.) +SKELETON_BIN_INODE = $(shell stat -c '%i' $(SKELETON_PATH)/bin/.) +SKELETON_SBIN_INODE = $(shell stat -c '%i' $(SKELETON_PATH)/sbin/.) +SKELETON_USR_LIB_INODE = $(shell stat -c '%i' $(SKELETON_PATH)/usr/lib/.) +SKELETON_USR_BIN_INODE = $(shell stat -c '%i' $(SKELETON_PATH)/usr/bin/.) +SKELETON_USR_SBIN_INODE = $(shell stat -c '%i' $(SKELETON_PATH)/usr/sbin/.) + +ifneq ($(SKELETON_LIB_INODE),$(SKELETON_USR_LIB_INODE)) +SKELETON_CUSTOM_NOT_MERGED_USR += /lib +endif +ifneq ($(SKELETON_BIN_INODE),$(SKELETON_USR_BIN_INODE)) +SKELETON_CUSTOM_NOT_MERGED_USR += /bin +endif +ifneq ($(SKELETON_SBIN_INODE),$(SKELETON_USR_SBIN_INODE)) +SKELETON_CUSTOM_NOT_MERGED_USR += /sbin +endif + +ifneq ($(SKELETON_CUSTOM_NOT_MERGED_USR),) +$(error The custom skeleton in $(SKELETON_PATH) is not \ + using a merged /usr for the following directories: \ + $(SKELETON_CUSTOM_NOT_MERGED_USR)) +endif + +endif # merged /usr + +else # ! custom skeleton + +SKELETON_PATH = system/skeleton + +endif # ! custom skeleton + +# This function handles the merged or non-merged /usr cases +ifeq ($(BR2_ROOTFS_MERGED_USR),y) +define SKELETON_USR_SYMLINKS_OR_DIRS + ln -snf usr/bin $(1)/bin + ln -snf usr/sbin $(1)/sbin + ln -snf usr/lib $(1)/lib +endef +else +define SKELETON_USR_SYMLINKS_OR_DIRS + $(INSTALL) -d -m 0755 $(1)/bin + $(INSTALL) -d -m 0755 $(1)/sbin + $(INSTALL) -d -m 0755 $(1)/lib +endef +endif + +# 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) +SKELETON_LIB_SYMLINK = lib64 +else +SKELETON_LIB_SYMLINK = lib32 +endif + +define SKELETON_INSTALL_TARGET_CMDS + rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \ + --chmod=u=rwX,go=rX --exclude .empty --exclude '*~' \ + $(SKELETON_PATH)/ $(TARGET_DIR)/ + $(call SKELETON_USR_SYMLINKS_OR_DIRS,$(TARGET_DIR)) + ln -snf lib $(TARGET_DIR)/$(SKELETON_LIB_SYMLINK) + ln -snf lib $(TARGET_DIR)/usr/$(SKELETON_LIB_SYMLINK) + $(INSTALL) -m 0644 support/misc/target-dir-warning.txt \ + $(TARGET_DIR_WARNING_FILE) +endef + +# For the staging dir, we don't really care about /bin and /sbin. +# But for consistency with the target dir, and to simplify the code, +# we still handle them for the merged or non-merged /usr cases. +# Since the toolchain is not yet available, the staging is not yet +# populated, so we need to create the directories in /usr +define SKELETON_INSTALL_STAGING_CMDS + $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/lib + $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/bin + $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/sbin + $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include + $(call SKELETON_USR_SYMLINKS_OR_DIRS,$(STAGING_DIR)) + ln -snf lib $(STAGING_DIR)/$(SKELETON_LIB_SYMLINK) + ln -snf lib $(STAGING_DIR)/usr/$(SKELETON_LIB_SYMLINK) +endef + +SKELETON_TARGET_GENERIC_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME)) +SKELETON_TARGET_GENERIC_ISSUE = $(call qstrip,$(BR2_TARGET_GENERIC_ISSUE)) +SKELETON_TARGET_GENERIC_ROOT_PASSWD = $(call qstrip,$(BR2_TARGET_GENERIC_ROOT_PASSWD)) +SKELETON_TARGET_GENERIC_PASSWD_METHOD = $(call qstrip,$(BR2_TARGET_GENERIC_PASSWD_METHOD)) +SKELETON_TARGET_GENERIC_BIN_SH = $(call qstrip,$(BR2_SYSTEM_BIN_SH)) +SKELETON_TARGET_GENERIC_GETTY_PORT = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) +SKELETON_TARGET_GENERIC_GETTY_BAUDRATE = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) +SKELETON_TARGET_GENERIC_GETTY_TERM = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_TERM)) +SKELETON_TARGET_GENERIC_GETTY_OPTIONS = $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_OPTIONS)) + +ifneq ($(SKELETON_TARGET_GENERIC_HOSTNAME),) +define SYSTEM_HOSTNAME + mkdir -p $(TARGET_DIR)/etc + echo "$(SKELETON_TARGET_GENERIC_HOSTNAME)" > $(TARGET_DIR)/etc/hostname + $(SED) '$$a \127.0.1.1\t$(SKELETON_TARGET_GENERIC_HOSTNAME)' \ + -e '/^127.0.1.1/d' $(TARGET_DIR)/etc/hosts +endef +TARGET_FINALIZE_HOOKS += SYSTEM_HOSTNAME +endif + +ifneq ($(SKELETON_TARGET_GENERIC_ISSUE),) +define SYSTEM_ISSUE + mkdir -p $(TARGET_DIR)/etc + echo "$(SKELETON_TARGET_GENERIC_ISSUE)" > $(TARGET_DIR)/etc/issue +endef +TARGET_FINALIZE_HOOKS += SYSTEM_ISSUE +endif + +define SET_NETWORK_LOCALHOST + ( \ + echo "# interface file auto-generated by buildroot"; \ + echo ; \ + echo "auto lo"; \ + echo "iface lo inet loopback"; \ + ) > $(TARGET_DIR)/etc/network/interfaces +endef + +NETWORK_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP)) + +ifneq ($(NETWORK_DHCP_IFACE),) +define SET_NETWORK_DHCP + ( \ + echo ; \ + echo "auto $(NETWORK_DHCP_IFACE)"; \ + echo "iface $(NETWORK_DHCP_IFACE) inet dhcp"; \ + echo " pre-up /etc/network/nfs_check"; \ + echo " wait-delay 15"; \ + ) >> $(TARGET_DIR)/etc/network/interfaces + $(INSTALL) -m 0755 -D $(SKELETON_PKGDIR)/nfs_check \ + $(TARGET_DIR)/etc/network/nfs_check +endef +endif + +define SET_NETWORK + mkdir -p $(TARGET_DIR)/etc/network/ + $(SET_NETWORK_LOCALHOST) + $(SET_NETWORK_DHCP) +endef + +TARGET_FINALIZE_HOOKS += SET_NETWORK + +# The TARGET_FINALIZE_HOOKS must be sourced only if the users choose to use the +# default skeleton. +ifeq ($(BR2_ROOTFS_SKELETON_DEFAULT),y) + +ifeq ($(BR2_TARGET_ENABLE_ROOT_LOGIN),y) +ifeq ($(SKELETON_TARGET_GENERIC_ROOT_PASSWD),) +SYSTEM_ROOT_PASSWORD = +else ifneq ($(filter $$1$$% $$5$$% $$6$$%,$(SKELETON_TARGET_GENERIC_ROOT_PASSWD)),) +SYSTEM_ROOT_PASSWORD = '$(SKELETON_TARGET_GENERIC_ROOT_PASSWD)' +else +SKELETON_DEPENDENCIES += host-mkpasswd +# This variable will only be evaluated in the finalize stage, so we can +# be sure that host-mkpasswd will have already been built by that time. +SYSTEM_ROOT_PASSWORD = "`$(MKPASSWD) -m "$(SKELETON_TARGET_GENERIC_PASSWD_METHOD)" "$(SKELETON_TARGET_GENERIC_ROOT_PASSWD)"`" +endif +else # !BR2_TARGET_ENABLE_ROOT_LOGIN +SYSTEM_ROOT_PASSWORD = "*" +endif + +define SKELETON_SYSTEM_SET_ROOT_PASSWD + $(SED) s,^root:[^:]*:,root:$(SYSTEM_ROOT_PASSWORD):, $(TARGET_DIR)/etc/shadow +endef +TARGET_FINALIZE_HOOKS += SKELETON_SYSTEM_SET_ROOT_PASSWD + +ifeq ($(BR2_SYSTEM_BIN_SH_NONE),y) +define SKELETON_SYSTEM_BIN_SH + rm -f $(TARGET_DIR)/bin/sh +endef +else +define SKELETON_SYSTEM_BIN_SH + ln -sf $(SKELETON_TARGET_GENERIC_BIN_SH) $(TARGET_DIR)/bin/sh +endef +endif +TARGET_FINALIZE_HOOKS += SKELETON_SYSTEM_BIN_SH + +ifeq ($(BR2_TARGET_GENERIC_GETTY),y) +ifeq ($(BR2_INIT_SYSV),y) +# In sysvinit inittab, the "id" must not be longer than 4 bytes, so we +# skip the "tty" part and keep only the remaining. +define SKELETON_SYSTEM_GETTY + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(shell echo $(SKELETON_TARGET_GENERIC_GETTY_PORT) | tail -c+4)::respawn:/sbin/getty -L $(SKELETON_TARGET_GENERIC_GETTY_OPTIONS) $(SKELETON_TARGET_GENERIC_GETTY_PORT) $(SKELETON_TARGET_GENERIC_GETTY_BAUDRATE) $(SKELETON_TARGET_GENERIC_GETTY_TERM) #~' \ + $(TARGET_DIR)/etc/inittab +endef +else ifeq ($(BR2_INIT_BUSYBOX),y) +# Add getty to busybox inittab +define SKELETON_SYSTEM_GETTY + $(SED) '/# GENERIC_SERIAL$$/s~^.*#~$(SKELETON_TARGET_GENERIC_GETTY_PORT)::respawn:/sbin/getty -L $(SKELETON_TARGET_GENERIC_GETTY_OPTIONS) $(SKELETON_TARGET_GENERIC_GETTY_PORT) $(SKELETON_TARGET_GENERIC_GETTY_BAUDRATE) $(SKELETON_TARGET_GENERIC_GETTY_TERM) #~' \ + $(TARGET_DIR)/etc/inittab +endef +endif +TARGET_FINALIZE_HOOKS += SKELETON_SYSTEM_GETTY +endif + +ifeq ($(BR2_INIT_BUSYBOX)$(BR2_INIT_SYSV),y) +ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y) +# Find commented line, if any, and remove leading '#'s +define SKELETON_SYSTEM_REMOUNT_RW + $(SED) '/^#.*-o remount,rw \/$$/s~^#\+~~' $(TARGET_DIR)/etc/inittab +endef +else +# Find uncommented line, if any, and add a leading '#' +define SKELETON_SYSTEM_REMOUNT_RW + $(SED) '/^[^#].*-o remount,rw \/$$/s~^~#~' $(TARGET_DIR)/etc/inittab +endef +endif +TARGET_FINALIZE_HOOKS += SKELETON_SYSTEM_REMOUNT_RW +endif # BR2_INIT_BUSYBOX || BR2_INIT_SYSV + +endif # BR2_ROOTFS_SKELETON_DEFAULT + +$(eval $(generic-package)) diff --git a/package/sl/Config.in b/package/sl/Config.in new file mode 100644 index 0000000000..7abe705673 --- /dev/null +++ b/package/sl/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_SL + bool "sl" + select BR2_PACKAGE_NCURSES + help + SL (Steam Locomotive) runs across your terminal when you + type "sl" as you meant to type "ls". It's just a joke + command, and not useful at all. + + https://github.com/mtoyoda/sl diff --git a/package/sl/sl.mk b/package/sl/sl.mk new file mode 100644 index 0000000000..bb28b2a49b --- /dev/null +++ b/package/sl/sl.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# sl +# +################################################################################ + +SL_VERSION = 5.02 +SL_SITE = $(call github,mtoyoda,sl,$(SL_VERSION)) +SL_LICENSE = Custom +SL_LICENSE_FILES = LICENSE +SL_DEPENDENCIES = ncurses + +define SL_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define SL_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/sl $(TARGET_DIR)/usr/bin/sl +endef + +$(eval $(generic-package)) diff --git a/package/slang/0001-slsh-libs.patch b/package/slang/0001-slsh-libs.patch new file mode 100644 index 0000000000..e8b6e6d223 --- /dev/null +++ b/package/slang/0001-slsh-libs.patch @@ -0,0 +1,17 @@ +Link against sources instead of installation paths that aren't DESTDIRed. +Patch taken from gentoo portage, upstream status unknown, author +probably Diego Pettenò. + +Signed-off-by: Gustavo Zacarias + +--- a/slsh/Makefile.in ++++ b/slsh/Makefile.in +@@ -80,7 +80,7 @@ + $(OBJDIR)/slsh_exe: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o + $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh_exe $(LDFLAGS) $(SRC_LIBS) + $(OBJDIR)/slsh: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o +- $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh $(LDFLAGS) $(INST_LIBS) ++ $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh $(LDFLAGS) $(SRC_LIBS) + $(OBJDIR)/slsh.o: $(OBJDIR) slsh.c slsh.h config.h Makefile + cd $(OBJDIR) && $(CC) -c $(CFLAGS) $(SLANG_SRCINC) $(DEFS) $(SRCDIR)/slsh.c + $(OBJDIR)/readline.o: $(OBJDIR) readline.c slsh.h config.h Makefile diff --git a/package/slang/0002-Enable-a-statically-linked-version-of-slsh.patch b/package/slang/0002-Enable-a-statically-linked-version-of-slsh.patch new file mode 100644 index 0000000000..ee306a1d56 --- /dev/null +++ b/package/slang/0002-Enable-a-statically-linked-version-of-slsh.patch @@ -0,0 +1,120 @@ +Enable a statically-linked version of slsh to be built and installed + +Adapt an upstream patch to make it apply on 2.3.0. Unnecessary changes +have been ignored. + +Repository: git://git.jedsoft.org/git/slang.git +Commit ID: 3796db6fb94a2fc7fe2fb0b6918501b69a4d3a02 +Author: John E. Davis + +Signed-off-by: Vicente Olivert Riera +--- +diff -rup a/autoconf/Makefile.in b/autoconf/Makefile.in +--- a/autoconf/Makefile.in 2014-09-18 04:02:24.000000000 +0100 ++++ b/autoconf/Makefile.in 2014-12-08 11:59:30.879313080 +0000 +@@ -41,16 +41,19 @@ src/Makefile: configure src/Makefile.in + # + makefiles: Makefile slsh/Makefile modules/Makefile src/Makefile + help: +- @echo "make install : install a shared version of the library" +- @echo "make install-static : install a static version" +- @echo "make install-all : install both shared and static versions" +- @echo "make check : Build the library and run the regression tests" ++ @echo "make install ==> shared version of the library, slsh and modules" ++ @echo "make install-static ==> static version of the library and slsh; no modules" ++ @echo "make install-all ==> shared/static versions of the library/modules + shared slsh." ++ @echo "make install-modules ==> install the modules" ++ @echo "make check ==> Build the library and run the regression tests" + slang.pc: configure autoconf/slangpc.in + @echo "slang.pc needs to be updated -- rerun configure" + @exit 1 + static: makefiles slang.pc + cd src; $(MAKE) static +- cd slsh; $(MAKE) all ++ cd slsh; $(MAKE) static ++modules: ++ cd modules; $(MAKE) all + elf: makefiles slang.pc + cd src; $(MAKE) elf + cd slsh; $(MAKE) all +@@ -73,10 +76,11 @@ clean: + cd demo; $(MAKE) clean + install-static: + cd src; $(MAKE) install-static ++ cd slsh; $(MAKE) install-static + install-pkgconfig: slang.pc + $(MKINSDIR) $(DEST_PKGCONFIGDIR) + $(INSTALL_DATA) slang.pc $(DEST_PKGCONFIGDIR)/ +-install-elf: ++install-elf: install-pkgconfig + cd src; $(MAKE) install-elf + @echo Now installing slsh + cd slsh; $(MAKE) install +@@ -86,7 +90,10 @@ install-elf: + @echo "On some systems, e.g., linux, you may also have to run ldconfig." + @echo "" + install: install-elf install-pkgconfig +-install-all: install-elf install-static install-pkgconfig ++install-all: install-elf ++ cd src; $(MAKE) install-static ++install-modules: ++ cd modules; $(MAKE) install + install-links: + cd src; $(MAKE) install-links + # +diff -rup a/slsh/Makefile.in b/slsh/Makefile.in +--- a/slsh/Makefile.in 2014-12-08 11:52:51.303284637 +0000 ++++ b/slsh/Makefile.in 2014-12-08 12:06:44.811939732 +0000 +@@ -16,7 +16,8 @@ SLANG_INST_INC = -I@includedir@ + SLANG_INST_LIB = -L$(INST_LIB_DIR) + #--------------------------------------------------------------------------- + SLANG_SRCINC = -I@SRCDIR@ +-SLANG_SRCLIB = -L@ELFDIR@ ++SLANG_ELFLIB = -L@ELFDIR@# for dynamically linked ++SLANG_OBJLIB = -L@OBJDIR@# for statically linked + #--------------------------------------------------------------------------- + OTHER_LIBS = @TERMCAP@ @DYNAMIC_LINK_LIB@ @LIBS@ @M_LIB@ + RPATH = @RPATH@ +@@ -73,10 +74,12 @@ INST_LIBS = $(DEST_LIB_DIR) $(RPATH) $(S + DEFS = -DSLSH_CONF_DIR='"$(SLSH_CONF_DIR)"' -DSLSH_PATH='"$(SLSH_LIB_DIR)"' \ + -DSLSH_CONF_DIR_ENV='$(SLSH_CONF_DIR_ENV)' -DSLSH_LIB_DIR_ENV='$(SLSH_LIB_DIR_ENV)' \ + -DSLSH_PATH_ENV='$(SLSH_PATH_ENV)' +-SRC_LIBS = $(SLANG_SRCLIB) -lslang $(READLINE_LIB) $(OTHER_LIBS) ++SRC_LIBS = $(SLANG_ELFLIB) -lslang $(READLINE_LIB) $(OTHER_LIBS) ++STATIC_SRC_LIBS = $(SLANG_OBJLIB) -lslang $(READLINE_LIB) $(OTHER_LIBS) + # + all: $(OBJDIR)/slsh_exe + slsh: $(OBJDIR)/slsh ++static: $(OBJDIR)/slsh_static + $(OBJDIR)/slsh_exe: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o + $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh_exe $(LDFLAGS) $(SRC_LIBS) + $(OBJDIR)/slsh: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o +@@ -85,6 +88,8 @@ $(OBJDIR)/slsh.o: $(OBJDIR) slsh.c slsh. + cd $(OBJDIR) && $(CC) $(SLANG_SRCINC) $(CFLAGS) -c $(DEFS) $(SRCDIR)/slsh.c + $(OBJDIR)/readline.o: $(OBJDIR) readline.c slsh.h config.h Makefile + cd $(OBJDIR) && $(CC) $(SLANG_SRCINC) $(CFLAGS) -c $(DEFS) -DUSE_GNU_READLINE=$(GNU_READLINE) $(SRCDIR)/readline.c ++$(OBJDIR)/slsh_static: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o ++ $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh_static $(LDFLAGS) $(STATIC_SRC_LIBS) + $(OBJDIR): + -$(MKINSDIR) $(OBJDIR) + config.h: ../src/config.h +@@ -151,6 +156,12 @@ install: slsh install_directories instal + $(INSTALL_DATA) etc/slsh.rc $(DEST_SLSH_CONF_DIR)/ + echo 'prepend_to_slang_load_path("$(SLSH_LOCALLIB_DIR)");' >> $(DEST_SLSH_CONF_DIR)/slsh.rc + $(INSTALL_DATA) doc/man/slsh.1 $(DEST_MAN_DIR)/ ++install-static: static install_directories install_lib_files install_rline_files \ ++ install_scripts install_help install_docs ++ $(INSTALL) $(OBJDIR)/slsh_static $(DEST_BIN_DIR)/slsh ++ $(INSTALL_DATA) etc/slsh.rc $(DEST_SLSH_CONF_DIR)/ ++ echo 'prepend_to_slang_load_path("$(SLSH_LOCALLIB_DIR)");' >> $(DEST_SLSH_CONF_DIR)/slsh.rc ++ $(INSTALL_DATA) doc/man/slsh.1 $(DEST_MAN_DIR)/ + #--------------------------------------------------------------------------- + # Housekeeping + #--------------------------------------------------------------------------- +@@ -161,5 +172,5 @@ distclean: clean + # + .PHONY: all clean distclean symlinks slsh install install_directories \ + install_lib_files install_rline_files install_scripts install_help \ +- install_docs ++ install_docs install-static static + diff --git a/package/slang/0003-Disable-module-support-in-the-statically-linked-version-of-slsh.patch b/package/slang/0003-Disable-module-support-in-the-statically-linked-version-of-slsh.patch new file mode 100644 index 0000000000..4bc8f768be --- /dev/null +++ b/package/slang/0003-Disable-module-support-in-the-statically-linked-version-of-slsh.patch @@ -0,0 +1,114 @@ +Disable module support in the statically linked version of slsh + +Adapt an upstream patch to make it apply on 2.3.0. Unnecessary changes +have been ignored. + +Repository: git://git.jedsoft.org/git/slang.git +Commit ID: 997c85f5cdb19802a5c97afe44e366a60f94a069 +Author: John E. Davis + +Signed-off-by: Vicente Olivert Riera +--- +diff -rup a/slsh/Makefile.in b/slsh/Makefile.in +--- a/slsh/Makefile.in 2014-12-09 10:04:44.084899944 +0000 ++++ b/slsh/Makefile.in 2014-12-09 10:16:11.545897275 +0000 +@@ -1,9 +1,11 @@ + #-*-sh-*- + CC = @CC@ + CFLAGS = @CFLAGS@ @SLANG_DLL_CFLAGS@ +-LDFLAGS = @LDFLAGS@ @DYNAMIC_LINK_FLAGS@ ++LDFLAGS = @LDFLAGS@ ++DLINK_FLAGS = @DYNAMIC_LINK_FLAGS@ + CONFIG_DIR = @CONFIG_DIR@ + OBJDIR = $(ARCH)objs ++SOBJDIR = static_objs + SRCDIR = $(CONFIG_DIR)/slsh + #--------------------------------------------------------------------------- + # Installation location of the slang library +@@ -19,7 +21,8 @@ SLANG_SRCINC = -I@SRCDIR@ + SLANG_ELFLIB = -L@ELFDIR@# for dynamically linked + SLANG_OBJLIB = -L@OBJDIR@# for statically linked + #--------------------------------------------------------------------------- +-OTHER_LIBS = @TERMCAP@ @DYNAMIC_LINK_LIB@ @LIBS@ @M_LIB@ ++DYNAMIC_LIBS = @TERMCAP@ @DYNAMIC_LINK_LIB@ @LIBS@ @M_LIB@ ++STATIC_LIBS = @TERMCAP@ @LIBS@ @M_LIB@ + RPATH = @RPATH@ + #---------------------------------------------------------------------------- + INSTALL = @INSTALL@ +@@ -69,29 +72,37 @@ DEST_SLSH_DOC_DIR= $(DESTDIR)$(SLSH_DOC_ + #---------------------------------------------------------------------------- + @SET_MAKE@ + SHELL = /bin/sh +-#INST_LIBS = $(RPATH) $(SLANG_INST_LIB) $(DEST_LIB_DIR) -lslang $(READLINE_LIB) $(OTHER_LIBS) +-INST_LIBS = $(DEST_LIB_DIR) $(RPATH) $(SLANG_INST_LIB) -lslang $(READLINE_LIB) $(OTHER_LIBS) ++INST_LIBS = $(DEST_LIB_DIR) $(RPATH) $(SLANG_INST_LIB) -lslang $(READLINE_LIB) $(DYNAMIC_LIBS) + DEFS = -DSLSH_CONF_DIR='"$(SLSH_CONF_DIR)"' -DSLSH_PATH='"$(SLSH_LIB_DIR)"' \ + -DSLSH_CONF_DIR_ENV='$(SLSH_CONF_DIR_ENV)' -DSLSH_LIB_DIR_ENV='$(SLSH_LIB_DIR_ENV)' \ + -DSLSH_PATH_ENV='$(SLSH_PATH_ENV)' +-SRC_LIBS = $(SLANG_ELFLIB) -lslang $(READLINE_LIB) $(OTHER_LIBS) +-STATIC_SRC_LIBS = $(SLANG_OBJLIB) -lslang $(READLINE_LIB) $(OTHER_LIBS) ++SDEFS = $(DEFS) -DSLSH_STATIC ++SRC_LIBS = $(SLANG_ELFLIB) -lslang $(READLINE_LIB) $(DYNAMIC_LIBS) ++STATIC_SRC_LIBS = $(SLANG_OBJLIB) -lslang $(READLINE_LIB) $(STATIC_LIBS) + # + all: $(OBJDIR)/slsh_exe + slsh: $(OBJDIR)/slsh +-static: $(OBJDIR)/slsh_static + $(OBJDIR)/slsh_exe: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o +- $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh_exe $(LDFLAGS) $(SRC_LIBS) ++ $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh_exe $(LDFLAGS) $(DLINK_FLAGS) $(SRC_LIBS) + $(OBJDIR)/slsh: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o +- $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh $(LDFLAGS) $(SRC_LIBS) ++ $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh $(LDFLAGS) $(DLINK_FLAGS) $(SRC_LIBS) + $(OBJDIR)/slsh.o: $(OBJDIR) slsh.c slsh.h config.h Makefile + cd $(OBJDIR) && $(CC) $(SLANG_SRCINC) $(CFLAGS) -c $(DEFS) $(SRCDIR)/slsh.c + $(OBJDIR)/readline.o: $(OBJDIR) readline.c slsh.h config.h Makefile + cd $(OBJDIR) && $(CC) $(SLANG_SRCINC) $(CFLAGS) -c $(DEFS) -DUSE_GNU_READLINE=$(GNU_READLINE) $(SRCDIR)/readline.c +-$(OBJDIR)/slsh_static: $(OBJDIR)/slsh.o $(OBJDIR)/readline.o +- $(CC) $(CFLAGS) $(OBJDIR)/slsh.o $(OBJDIR)/readline.o -o $(OBJDIR)/slsh_static $(LDFLAGS) $(STATIC_SRC_LIBS) + $(OBJDIR): + -$(MKINSDIR) $(OBJDIR) ++# ++static: $(SOBJDIR)/slsh ++$(SOBJDIR)/slsh: $(SOBJDIR)/slsh.o $(SOBJDIR)/readline.o ++ $(CC) $(CFLAGS) $(SOBJDIR)/slsh.o $(SOBJDIR)/readline.o -o $(SOBJDIR)/slsh $(LDFLAGS) $(STATIC_SRC_LIBS) ++$(SOBJDIR)/slsh.o: $(SOBJDIR) slsh.c slsh.h config.h Makefile ++ cd $(SOBJDIR) && $(CC) $(SLANG_SRCINC) $(CFLAGS) -c $(SDEFS) $(SRCDIR)/slsh.c ++$(SOBJDIR)/readline.o: $(SOBJDIR) readline.c slsh.h config.h Makefile ++ cd $(SOBJDIR) && $(CC) $(SLANG_SRCINC) $(CFLAGS) -c $(SDEFS) -DUSE_GNU_READLINE=$(GNU_READLINE) $(SRCDIR)/readline.c ++$(SOBJDIR): ++ -$(MKINSDIR) $(SOBJDIR) ++# + config.h: ../src/config.h + cp ../src/config.h . + install_directories: +@@ -158,7 +169,7 @@ install: slsh install_directories instal + $(INSTALL_DATA) doc/man/slsh.1 $(DEST_MAN_DIR)/ + install-static: static install_directories install_lib_files install_rline_files \ + install_scripts install_help install_docs +- $(INSTALL) $(OBJDIR)/slsh_static $(DEST_BIN_DIR)/slsh ++ $(INSTALL) $(SOBJDIR)/slsh $(DEST_BIN_DIR)/ + $(INSTALL_DATA) etc/slsh.rc $(DEST_SLSH_CONF_DIR)/ + echo 'prepend_to_slang_load_path("$(SLSH_LOCALLIB_DIR)");' >> $(DEST_SLSH_CONF_DIR)/slsh.rc + $(INSTALL_DATA) doc/man/slsh.1 $(DEST_MAN_DIR)/ +@@ -167,6 +178,7 @@ install-static: static install_directori + #--------------------------------------------------------------------------- + clean: + -/bin/rm -f *~ $(OBJDIR)/slsh.o $(OBJDIR)/readline.o $(OBJDIR)/slsh $(OBJDIR)/slsh_exe scripts/*~ lib/*~ ++ -/bin/rm -f $(SOBJDIR)/slsh.o $(SOBJDIR)/readline.o $(SOBJDIR)/slsh $(SOBJDIR)/slsh_exe + distclean: clean + -/bin/rm -f Makefile config.h + # +diff -rup a/slsh/slsh.c b/slsh/slsh.c +--- a/slsh/slsh.c 2014-09-18 04:02:24.000000000 +0100 ++++ b/slsh/slsh.c 2014-12-09 10:17:04.602824146 +0000 +@@ -514,7 +514,9 @@ int main (int argc, char **argv) + + if ((-1 == SLang_init_all ()) + || (-1 == SLang_init_array_extra ()) ++#ifndef SLSH_STATIC + || (-1 == SLang_init_import ()) /* dynamic linking */ ++#endif + || (-1 == SLadd_intrin_fun_table (Intrinsics, NULL)) + || (-1 == slsh_init_readline_intrinsics ())) + { diff --git a/package/slang/0004-Rename-posix_close-function-to-posix_close_slfile.patch b/package/slang/0004-Rename-posix_close-function-to-posix_close_slfile.patch new file mode 100644 index 0000000000..4b3c869a60 --- /dev/null +++ b/package/slang/0004-Rename-posix_close-function-to-posix_close_slfile.patch @@ -0,0 +1,47 @@ +From 055b02cf98ab9b7301988c3be2d277f262f0957e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 18 Nov 2015 23:12:15 +0100 +Subject: [PATCH] Rename posix_close() function to posix_close_slfile() + +posix_close() is a function that will be implemented as part of an +upcoming of the POSIX standard. For this reason, the musl C library +has already started implementing this function call. Unfortunately, +since slang already defines a function with the same name, it cannot +build properly with the musl C library. + +This commit fixes that by renaming the slang function to +posix_close_slfile(). + +This patch has been taken from the Alpine Linux repository, at +http://git.alpinelinux.org/cgit/aports/plain/main/slang/musl-fix-posix_close-clash.patch. + +Signed-off-by: Thomas Petazzoni +--- + src/slposio.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/slposio.c b/src/slposio.c +index 94f20dd..475e2c9 100644 +--- a/src/slposio.c ++++ b/src/slposio.c +@@ -372,7 +372,7 @@ static int posix_close_fd (int *fd) + return 0; + } + +-static int posix_close (SLFile_FD_Type *f) ++static int posix_close_slfile (SLFile_FD_Type *f) + { + int status = do_close (f); + +@@ -1011,7 +1011,7 @@ static SLang_Intrin_Fun_Type Fd_Name_Table [] = + MAKE_INTRINSIC_2("write", posix_write, V, F, B), + MAKE_INTRINSIC_1("dup_fd", posix_dup, V, F), + MAKE_INTRINSIC_2("dup2_fd", posix_dup2, I, F, I), +- MAKE_INTRINSIC_1("close", posix_close, I, F), ++ MAKE_INTRINSIC_1("close", posix_close_slfile, I, F), + MAKE_INTRINSIC_1("_close", posix_close_fd, I, I), + #if defined(TTYNAME_R) + MAKE_INTRINSIC_0("ttyname", posix_ttyname, V), +-- +2.6.3 + diff --git a/package/slang/0005-make-install-static-do-install-pkgconfig-as-install-.patch b/package/slang/0005-make-install-static-do-install-pkgconfig-as-install-.patch new file mode 100644 index 0000000000..1572e09bb1 --- /dev/null +++ b/package/slang/0005-make-install-static-do-install-pkgconfig-as-install-.patch @@ -0,0 +1,31 @@ +From 294bcde1afa0b3866f339f82709e867d827cea6c Mon Sep 17 00:00:00 2001 +From: Max Filippov +Date: Mon, 14 Mar 2016 07:28:56 +0300 +Subject: [PATCH] make install-static do install-pkgconfig as install-elf does + +...so that install-static installs everything needed for linking with +slang. This fixes e.g. the following mc build: + + http://autobuild.buildroot.net/results/085/085194f18bc7db1e801d98e6620e3a75fd988cc5/build-end.log + +Signed-off-by: Max Filippov +--- + autoconf/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/autoconf/Makefile.in b/autoconf/Makefile.in +index a6defa6..ca1ffb2 100644 +--- a/autoconf/Makefile.in ++++ b/autoconf/Makefile.in +@@ -74,7 +74,7 @@ clean: + cd modules; $(MAKE) clean + cd slsh; $(MAKE) clean + cd demo; $(MAKE) clean +-install-static: ++install-static: install-pkgconfig + cd src; $(MAKE) install-static + cd slsh; $(MAKE) install-static + install-pkgconfig: slang.pc +-- +2.1.4 + diff --git a/package/slang/Config.in b/package/slang/Config.in new file mode 100644 index 0000000000..a500ff5b7d --- /dev/null +++ b/package/slang/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_SLANG + bool "slang" + depends on BR2_USE_MMU # fork() + help + Multi-platform console display library. + + http://www.jedsoft.org/slang/index.html diff --git a/package/slang/slang.hash b/package/slang/slang.hash new file mode 100644 index 0000000000..000ac11e36 --- /dev/null +++ b/package/slang/slang.hash @@ -0,0 +1,2 @@ +# From http://www.jedsoft.org/releases/slang/ +sha1 c3270b58a58e6cbfd47f0a6e3d2194dd9e7c7d14 slang-2.3.0.tar.gz diff --git a/package/slang/slang.mk b/package/slang/slang.mk new file mode 100644 index 0000000000..9078bf293c --- /dev/null +++ b/package/slang/slang.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# slang +# +################################################################################ + +SLANG_VERSION = 2.3.0 +SLANG_SITE = http://www.jedsoft.org/releases/slang +SLANG_LICENSE = GPLv2+ +SLANG_LICENSE_FILES = COPYING +SLANG_INSTALL_STAGING = YES +SLANG_CONF_OPTS = --with-onig=no +SLANG_MAKE = $(MAKE1) + +# Racy and we don't have/do libtermcap +define SLANG_DISABLE_TERMCAP + $(SED) '/^TERMCAP=/s:=.*:=:' $(@D)/configure +endef +SLANG_POST_PATCH_HOOKS += SLANG_DISABLE_TERMCAP + +# Absolute path hell, sigh... +ifeq ($(BR2_PACKAGE_LIBPNG),y) +SLANG_CONF_OPTS += --with-png=$(STAGING_DIR)/usr +SLANG_DEPENDENCIES += libpng +else +SLANG_CONF_OPTS += --with-png=no +endif +ifeq ($(BR2_PACKAGE_PCRE),y) +SLANG_CONF_OPTS += --with-pcre=$(STAGING_DIR)/usr +SLANG_DEPENDENCIES += pcre +else +SLANG_CONF_OPTS += --with-pcre=no +endif +ifeq ($(BR2_PACKAGE_ZLIB),y) +SLANG_CONF_OPTS += --with-z=$(STAGING_DIR)/usr +SLANG_DEPENDENCIES += zlib +else +SLANG_CONF_OPTS += --with-z=no +endif + +ifeq ($(BR2_PACKAGE_NCURSES),y) +SLANG_DEPENDENCIES += ncurses +SLANG_CONF_ENV += ac_cv_path_nc5config=$(STAGING_DIR)/usr/bin/ncurses5-config +else +SLANG_CONF_OPTS += ac_cv_path_nc5config=no +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +SLANG_CONF_OPTS += --with-readline=gnu +SLANG_DEPENDENCIES += readline +ifeq ($(BR2_STATIC_LIBS),y) +SLANG_CONF_ENV += LIBS="`$(STAGING_DIR)/usr/bin/ncurses5-config --libs`" +endif +endif + +ifeq ($(BR2_STATIC_LIBS),y) +SLANG_MAKE_OPTS = static +SLANG_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-static +SLANG_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-static +endif + +$(eval $(autotools-package)) diff --git a/package/slirp/Config.in b/package/slirp/Config.in new file mode 100644 index 0000000000..ecd492dd11 --- /dev/null +++ b/package/slirp/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_SLIRP + bool "slirp" + help + The Spice project aims to provide a complete open source + solution for interaction with virtualized desktop devices. + The Spice project deals with both the virtualized devices + and the front-end. Interaction between front-end and + back-end is done using VD-Interfaces. + + This package implements the slirp-part for Spice. + Slirp emulates a PPP or SLIP connection over a normal terminal. + + http://www.spice-space.org/ + + NOTE: + This package has some history of a unique kind: + - originally developped as 'slirp' by Danny Gasparovski, and + seemingly abandonned (developper /disapeared/) + - then re-maintained at sourceforge by "Kelly", up to some + time around 2009: http://slirp.sourceforge.net/ + - during that period, QEMU (Fabrice BELLARD) forked the code + and included it in QEMU + - and it was imported from this breed by the Spice project + around May 2009 + - which is what we use here diff --git a/package/slirp/slirp.mk b/package/slirp/slirp.mk new file mode 100644 index 0000000000..7a5f51539d --- /dev/null +++ b/package/slirp/slirp.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# slirp +# +################################################################################ + +# There's no tarball releases of slirp, so we use the git repo +# Also, there's no tag, so we use a random SHA1 (master's HEAD +# of today) +SLIRP_VERSION = 8c2da74c1385242f20799fec8c04f8378edc6550 +SLIRP_SITE = git://anongit.freedesktop.org/spice/slirp +SLIRP_LICENSE = BSD-4c BSD-2c +# Note: The license file 'COPYRIGHT' is missing from the sources, +# although some files refer to it. +SLIRP_INSTALL_STAGING = YES + +# As we're using the git tree, there's no ./configure, +# so we need to autoreconf. +SLIRP_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/smack/0001-libsmack-common.c-Include-limits.h-for-PATH_MAX.patch b/package/smack/0001-libsmack-common.c-Include-limits.h-for-PATH_MAX.patch new file mode 100644 index 0000000000..0e30ef5e39 --- /dev/null +++ b/package/smack/0001-libsmack-common.c-Include-limits.h-for-PATH_MAX.patch @@ -0,0 +1,29 @@ +From 316c911aa741b14513622a4206ed6d324e951fa0 Mon Sep 17 00:00:00 2001 +From: Felix Janda +Date: Wed, 20 May 2015 21:25:22 +0200 +Subject: [PATCH 1/1] libsmack/common.c: Include for PATH_MAX + +Signed-off-by: Felix Janda +Signed-off-by: Bernd Kuhls +--- +Downloaded from upstream commit +https://github.com/smack-team/smack/commit/316c911aa741b14513622a4206ed6d324e951fa0 + + libsmack/common.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libsmack/common.c b/libsmack/common.c +index 55fee1a..55b59e3 100644 +--- a/libsmack/common.c ++++ b/libsmack/common.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include + #include +-- +2.7.0 + diff --git a/package/smack/Config.in b/package/smack/Config.in new file mode 100644 index 0000000000..67c70bb6f3 --- /dev/null +++ b/package/smack/Config.in @@ -0,0 +1,35 @@ +config BR2_PACKAGE_SMACK + bool "smack" + depends on !BR2_STATIC_LIBS # dlfcn.h + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + help + User space programs and libraries for SMACK. + + SMACK stands for Simplified Mandatory Access Control Kernel. + It is a Linux Security Module which provides a Mandatory Access + Control mechanism, aimed towards simplicity. + + This package provides a library which allows applications to work + with SMACK and tools to load/unload rules from the kernel, as well + as query the policy. + + SMACK requires the following kernel options to be enabled: + + - CONFIG_SECURITY + - CONFIG_SECURITY_SMACK + - CONFIG_SECURITY_NETWORK + + These options will be automatically enabled by Buildroot if it is + responsible for building the kernel. Otherwise, if you are building + your kernel outside of Buildroot, make sure these options are + enabled. + + To activate SMACK, do not forget to add "security=smack" to your + kernel command line. + + https://github.com/smack-team/smack + +comment "smack needs a toolchain w/ dynamic library, threads, headers >= 3.0" + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 \ + || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/smack/smack.mk b/package/smack/smack.mk new file mode 100644 index 0000000000..3ef4d476d1 --- /dev/null +++ b/package/smack/smack.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# smack +# +################################################################################ + +SMACK_VERSION = v1.1.0 +SMACK_SITE = $(call github,smack-team,smack,$(SMACK_VERSION)) +SMACK_LICENSE = LGPLv2.1 +SMACK_LICENSE_FILES = COPYING +SMACK_INSTALL_STAGING = YES +SMACK_DEPENDENCIES = host-pkgconf + +# Sources from GitHub, no configure script included. +SMACK_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/smartmontools/Config.in b/package/smartmontools/Config.in new file mode 100644 index 0000000000..92e0037a5a --- /dev/null +++ b/package/smartmontools/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_SMARTMONTOOLS + bool "smartmontools" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + help + Control and monitor storage systems using S.M.A.R.T. + + http://smartmontools.sourceforge.net/ + +comment "smartmontools needs a toolchain w/ C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/smartmontools/smartmontools.hash b/package/smartmontools/smartmontools.hash new file mode 100644 index 0000000000..2f2b7aa096 --- /dev/null +++ b/package/smartmontools/smartmontools.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/smartmontools/files/smartmontools/6.5/ +md5 093aeec3f8f39fa9a37593c4012d3156 smartmontools-6.5.tar.gz +sha1 7e788b429534a4ae627858fbcc826b93402cee7e smartmontools-6.5.tar.gz diff --git a/package/smartmontools/smartmontools.mk b/package/smartmontools/smartmontools.mk new file mode 100644 index 0000000000..cd0c076e19 --- /dev/null +++ b/package/smartmontools/smartmontools.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# smartmontools +# +################################################################################ + +SMARTMONTOOLS_VERSION = 6.5 +SMARTMONTOOLS_SITE = http://downloads.sourceforge.net/project/smartmontools/smartmontools/$(SMARTMONTOOLS_VERSION) +SMARTMONTOOLS_LICENSE = GPLv2+ +SMARTMONTOOLS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/smcroute/Config.in b/package/smcroute/Config.in new file mode 100755 index 0000000000..f104075207 --- /dev/null +++ b/package/smcroute/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_SMCROUTE + bool "smcroute" + depends on BR2_USE_MMU # fork() + help + SMCRoute is a command line tool to manipulate the multicast + routes of a UNIX kernel. It supports both IPv4 and IPv6 multicast + routing. SMCRoute can be used as an alternative to dynamic + multicast routers like mrouted or pimd in setups where static + multicast routes should be maintained and/or no proper IGMP or + MLD signaling exists. + + https://github.com/troglobit/smcroute diff --git a/package/smcroute/smcroute.hash b/package/smcroute/smcroute.hash new file mode 100644 index 0000000000..b24228f620 --- /dev/null +++ b/package/smcroute/smcroute.hash @@ -0,0 +1,4 @@ +# Locally generated +sha256 66fd32dc66b5d32670918205a94c4f2ac8c56741486326922e4d1a92f628db48 smcroute-2.0.0.tar.xz +# From https://github.com/troglobit/smcroute/releases/download/2.0.0/smcroute-2.0.0.tar.xz.md5 +md5 cbf478e52ab9ae411adca41b9d22f68a smcroute-2.0.0.tar.xz diff --git a/package/smcroute/smcroute.mk b/package/smcroute/smcroute.mk new file mode 100755 index 0000000000..77e7e63195 --- /dev/null +++ b/package/smcroute/smcroute.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# smcroute +# +################################################################################ + +SMCROUTE_VERSION = 2.0.0 +SMCROUTE_SOURCE = smcroute-$(SMCROUTE_VERSION).tar.xz +SMCROUTE_SITE = https://github.com/troglobit/smcroute/releases/download/$(SMCROUTE_VERSION) +SMCROUTE_LICENSE = GPLv2+ +SMCROUTE_LICENSE_FILES = COPYING + +SMCROUTE_CONF_OPTS = ac_cv_func_setpgrp_void=yes +#BUG:The package Makefile uses CC?= even though the package is autotools based +SMCROUTE_MAKE_ENV = $(TARGET_CONFIGURE_OPTS) + +$(eval $(autotools-package)) diff --git a/package/smstools3/0001-fix-Makefile.patch b/package/smstools3/0001-fix-Makefile.patch new file mode 100644 index 0000000000..5842357451 --- /dev/null +++ b/package/smstools3/0001-fix-Makefile.patch @@ -0,0 +1,29 @@ +Makefile: fix rules + +In a Makefile, recipes should follow rules, there can not be variable +definitions in-between. + +Although make-3.81 is happy about it, make-4.0 (and probably 3.82 too) +do whine loudly. + +Signed-off-by: "Yann E. MORIN" + +diff -durN smstools3-3.1.15.orig/src/Makefile smstools3-3.1.15/src/Makefile +--- smstools3-3.1.15.orig/src/Makefile 2010-09-21 13:29:14.000000000 +0200 ++++ smstools3-3.1.15/src/Makefile 2014-09-01 22:27:02.719939329 +0200 +@@ -39,14 +39,13 @@ + + all: smsd + +-smsd: smsd.c extras.o locking.o cfgfile.o logging.o alarm.o smsd_cfg.o charset.o stats.o blacklist.o whitelist.o modeminit.o pdu.o +- + ifneq (,$(findstring SOLARIS,$(CFLAGS))) + ifeq (,$(findstring DISABLE_INET_SOCKET,$(CFLAGS))) + override LFLAGS += -lsocket -lnsl + endif + endif + ++smsd: smsd.c extras.o locking.o cfgfile.o logging.o alarm.o smsd_cfg.o charset.o stats.o blacklist.o whitelist.o modeminit.o pdu.o + ifneq (,$(findstring NOSTATS,$(CFLAGS))) + $(CC) $(CFLAGS) -o $@ $^ $(LFLAGS) + else diff --git a/package/smstools3/Config.in b/package/smstools3/Config.in new file mode 100644 index 0000000000..3e2ea252fc --- /dev/null +++ b/package/smstools3/Config.in @@ -0,0 +1,26 @@ +config BR2_PACKAGE_SMSTOOLS3 + bool "smstools3" + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + help + The SMS Server Tools 3 is a SMS Gateway software which can send and + receive short messages through GSM modems and mobile phones. + + http://smstools3.kekekasvi.com/ + +if BR2_PACKAGE_SMSTOOLS3 + +config BR2_PACKAGE_SMSTOOLS3_NB_MODEMS + int "Number of modems to support" + default 1 + help + To reduce memory footprint of SMS Server Tools, you can specify the + exact number of modems connected to your board. By default only 1 + modem is used. + +endif + +comment "smstools3 needs a toolchain w/ wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/smstools3/S50smsd b/package/smstools3/S50smsd new file mode 100644 index 0000000000..cd78150883 --- /dev/null +++ b/package/smstools3/S50smsd @@ -0,0 +1,43 @@ +#!/bin/sh +# +# Starts the SMS Server Tools 3 +# + +NAME=smsd +DAEMON=/usr/bin/$NAME +PIDFILE=/var/run/$NAME.pid +SPOOL=/var/spool/sms + +start() +{ + printf "Starting $NAME: " + mkdir -p $SPOOL/outgoing + mkdir -p $SPOOL/incoming + mkdir -p $SPOOL/checked + start-stop-daemon -S -q -p $PIDFILE --exec $DAEMON -- -c /etc/smsd.conf && echo "OK" || echo "Failed" +} + +stop() +{ + printf "Stopping $NAME: " + start-stop-daemon -K -q -p $PIDFILE && echo "OK" || echo "Failed" + rm -f $PIDFILE +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + stop + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/smstools3/smstools3.hash b/package/smstools3/smstools3.hash new file mode 100644 index 0000000000..b0b521f747 --- /dev/null +++ b/package/smstools3/smstools3.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 ed00ffaeaa312a5b4f969f4e97a64603a866bbe16e393ea02f5bf05234814d59 smstools3-3.1.15.tar.gz diff --git a/package/smstools3/smstools3.mk b/package/smstools3/smstools3.mk new file mode 100644 index 0000000000..a1684de8df --- /dev/null +++ b/package/smstools3/smstools3.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# smstools3 +# +################################################################################ + +SMSTOOLS3_VERSION = 3.1.15 +SMSTOOLS3_SITE = http://smstools3.kekekasvi.com/packages +SMSTOOLS3_LICENSE = GPLv2+ +SMSTOOLS3_LICENSE_FILES = doc/license.html LICENSE + +SMSTOOLS3_CFLAGS = $(TARGET_CFLAGS) +SMSTOOLS3_CFLAGS += -D NUMBER_OF_MODEMS=$(BR2_PACKAGE_SMSTOOLS3_NB_MODEMS) +SMSTOOLS3_CFLAGS += -D NOSTATS + +define SMSTOOLS3_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(SMSTOOLS3_CFLAGS)" -C $(@D) +endef + +define SMSTOOLS3_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/smstools3/S50smsd \ + $(TARGET_DIR)/etc/init.d/S50smsd +endef + +define SMSTOOLS3_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/src/smsd \ + $(TARGET_DIR)/usr/bin/smsd + $(INSTALL) -m 0755 -D $(@D)/scripts/sendsms \ + $(TARGET_DIR)/usr/bin/sendsms + $(INSTALL) -m 0644 -D $(@D)/examples/smsd.conf.easy \ + $(TARGET_DIR)/etc/smsd.conf +endef + +$(eval $(generic-package)) diff --git a/package/snappy/Config.in b/package/snappy/Config.in new file mode 100644 index 0000000000..06d537f1c9 --- /dev/null +++ b/package/snappy/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_SNAPPY + bool "snappy" + depends on BR2_INSTALL_LIBSTDCPP + help + Snappy is a compression/decompression library. It does not aim for + maximum compression, or compatibility with any other compression + library; instead, it aims for very high speeds and reasonable + compression. + + http://code.google.com/p/snappy/ + +comment "snappy needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/snappy/snappy.mk b/package/snappy/snappy.mk new file mode 100644 index 0000000000..b00dddf6cf --- /dev/null +++ b/package/snappy/snappy.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# snappy +# +################################################################################ + +SNAPPY_VERSION = 1ff9be9b8fafc8528ca9e055646f5932aa5db9c4 +SNAPPY_SITE = $(call github,google,snappy,$(SNAPPY_VERSION)) +SNAPPY_LICENSE = BSD-3c +SNAPPY_LICENSE_FILES = COPYING +# from git +SNAPPY_AUTORECONF = YES +SNAPPY_DEPENDENCIES = host-pkgconf +SNAPPY_INSTALL_STAGING = YES + +# Disable tests +SNAPPY_CONF_OPTS = --disable-gtest + +$(eval $(autotools-package)) diff --git a/package/snmppp/0001-Add-missing-includes.patch b/package/snmppp/0001-Add-missing-includes.patch new file mode 100644 index 0000000000..c3fa491525 --- /dev/null +++ b/package/snmppp/0001-Add-missing-includes.patch @@ -0,0 +1,41 @@ +From 6433c6e8d81313ec7ef6c8d3abf96fffa537e23e Mon Sep 17 00:00:00 2001 +From: Luca Ceresoli +Date: Tue, 1 Apr 2014 14:35:25 +0200 +Subject: [PATCH] Add missing includes + +Signed-off-by: Luca Ceresoli +--- + include/snmp_pp/config_snmp_pp.h.in | 4 ++++ + include/snmp_pp/smival.h | 1 + + 2 files changed, 5 insertions(+) + +diff --git a/include/snmp_pp/config_snmp_pp.h.in b/include/snmp_pp/config_snmp_pp.h.in +index 89a5b0d..3100713 100644 +--- a/include/snmp_pp/config_snmp_pp.h.in ++++ b/include/snmp_pp/config_snmp_pp.h.in +@@ -28,6 +28,10 @@ + #ifndef _CONFIG_SNMP_PP_H_ + #define _CONFIG_SNMP_PP_H_ + ++#ifdef __linux__ ++#include ++#endif ++ + #define SNMP_PP_VERSION_STRING "@VERSION@" + #define SNMP_PP_VERSION @SNMP_PP_MAJOR_VERSION@ + #define SNMP_PP_RELEASE @SNMP_PP_MINOR_VERSION@ +diff --git a/include/snmp_pp/smival.h b/include/snmp_pp/smival.h +index 7a36fab..7522087 100644 +--- a/include/snmp_pp/smival.h ++++ b/include/snmp_pp/smival.h +@@ -59,6 +59,7 @@ + #define _SMIVALUE + + //----[ includes ]----------------------------------------------------- ++#include + #include "snmp_pp/smi.h" + + #ifdef SNMP_PP_NAMESPACE +-- +1.8.3.2 + diff --git a/package/snmppp/Config.in b/package/snmppp/Config.in new file mode 100644 index 0000000000..9e800fd57e --- /dev/null +++ b/package/snmppp/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_SNMPPP + bool "snmp++" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + SNMP++v3.x is a C++ API which supports SNMP v1, v2c, and v3. + + http://www.agentpp.com/snmp_pp3_x/snmp_pp3_x.html + +if BR2_PACKAGE_SNMPPP + +config BR2_PACKAGE_SNMPPP_LOGGING + bool "enable logging" + help + Enable logging output for SNMP++. + According to the SNMP++ documentation, disabling logging "increases + performance drastically and minimizes memory consumption". + +config BR2_PACKAGE_SNMPPP_SNMPV3 + bool "enable SNMPv3" + default y + select BR2_PACKAGE_OPENSSL + help + Enable optional support for SNMP++. This selects OpenSSL. + +endif + +comment "snmp++ needs a toolchain w/ threads, C++, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/snmppp/snmppp.hash b/package/snmppp/snmppp.hash new file mode 100644 index 0000000000..a278ebfb28 --- /dev/null +++ b/package/snmppp/snmppp.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 65d8bef3fb0e28892b7768e4027c2873b5556fc89c5440008508bf8ec91764cd snmp++-3.3.5.tar.gz diff --git a/package/snmppp/snmppp.mk b/package/snmppp/snmppp.mk new file mode 100644 index 0000000000..026fe6ecca --- /dev/null +++ b/package/snmppp/snmppp.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# snmppp +# +################################################################################ + +SNMPPP_VERSION = 3.3.5 +SNMPPP_SOURCE = snmp++-$(SNMPPP_VERSION).tar.gz +SNMPPP_SITE = http://www.agentpp.com/download +SNMPPP_DEPENDENCIES = host-pkgconf +SNMPPP_INSTALL_STAGING = YES +SNMPPP_CONF_OPTS = $(if $(BR2_PACKAGE_SNMPPP_LOGGING),--enable-logging,--disable-logging) +SNMPPP_LICENSE = SNMP++ +SNMPPP_LICENSE_FILES = src/v3.cpp + +ifeq ($(BR2_PACKAGE_SNMPPP_SNMPV3),y) +SNMPPP_CONF_OPTS += --enable-snmpv3 +SNMPPP_DEPENDENCIES += openssl +else +SNMPPP_CONF_OPTS += --disable-snmpv3 +endif + +$(eval $(autotools-package)) diff --git a/package/snowball-hdmiservice/Config.in b/package/snowball-hdmiservice/Config.in new file mode 100644 index 0000000000..21a4f3c3cb --- /dev/null +++ b/package/snowball-hdmiservice/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_SNOWBALL_HDMISERVICE + bool "snowball-hdmiservice" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + HDMI userspace control daemon + + This package contains the HDMI userspace control daemon for the + snowball board + + http://www.igloocommunity.org + +comment "snowball-hdmiservice needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/snowball-hdmiservice/snowball-hdmiservice.mk b/package/snowball-hdmiservice/snowball-hdmiservice.mk new file mode 100644 index 0000000000..267b5ad9b8 --- /dev/null +++ b/package/snowball-hdmiservice/snowball-hdmiservice.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# snowball-hdmiservice +# +################################################################################ + +SNOWBALL_HDMISERVICE_VERSION = f75c99d1c52707240a78b4ba78e41d20d3aa3b08 +SNOWBALL_HDMISERVICE_SITE = $(call github,igloocommunity,hdmiservice,$(SNOWBALL_HDMISERVICE_VERSION)) +SNOWBALL_HDMISERVICE_LICENSE = MIT +SNOWBALL_HDMISERVICE_LICENSE_FILES = debian/copyright +SNOWBALL_HDMISERVICE_INSTALL_STAGING = YES + +define SNOWBALL_HDMISERVICE_BUILD_CMDS + $(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS)" +endef + +define SNOWBALL_HDMISERVICE_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS)" DESTDIR=$(STAGING_DIR) install +endef + +define SNOWBALL_HDMISERVICE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) CC="$(TARGET_CC) $(TARGET_CFLAGS)" DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/snowball-init/Config.in b/package/snowball-init/Config.in new file mode 100644 index 0000000000..6c94731203 --- /dev/null +++ b/package/snowball-init/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_SNOWBALL_INIT + bool "snowball-init" + # Runtime dependency, needed by snowball startup script + select BR2_PACKAGE_BLUEZ_UTILS + depends on !BR2_STATIC_LIBS # bluez_utils + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib, libglib2 + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_UX500_FIRMWARE + help + Snowball init scripts + + http://www.igloocommunity.org + +comment "snowball-init needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/snowball-init/snowball-init.mk b/package/snowball-init/snowball-init.mk new file mode 100644 index 0000000000..f06b03277a --- /dev/null +++ b/package/snowball-init/snowball-init.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# snowball-init +# +################################################################################ + +SNOWBALL_INIT_VERSION = b064be21de25729039e5e54037bbdd2e25cfd5b7 +SNOWBALL_INIT_SITE = $(call github,igloocommunity,snowball-init,$(SNOWBALL_INIT_VERSION)) +SNOWBALL_INIT_LICENSE = BSD-4c +SNOWBALL_INIT_LICENSE_FILES = debian/copyright + +define SNOWBALL_INIT_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 $(@D)/snowball $(TARGET_DIR)/etc/init.d/S50snowball +endef + +$(eval $(generic-package)) diff --git a/package/socat/0001-no-documentation.patch b/package/socat/0001-no-documentation.patch new file mode 100644 index 0000000000..ce088dfafc --- /dev/null +++ b/package/socat/0001-no-documentation.patch @@ -0,0 +1,37 @@ +socat: disable documentation build/installation + +The documentation generation process requires a special yold2man +program, for which we don't have a package in Buildroot. Since we +generally don't care much about documentation of packages, just adjust +the package Makefile.in to not build/install its documentation. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile.in +=================================================================== +--- a/Makefile.in ++++ b/Makefile.in +@@ -93,7 +93,7 @@ + Config/Makefile.Cygwin-1-5-25 Config/config.Cygwin-1-5-25.h \ + Config/Makefile.MacOSX-10-5 Config/config.MacOSX-10-5.h + +-all: progs doc ++all: progs + + scmclean: gitclean + +@@ -136,13 +136,11 @@ + strip: progs + strip $(PROGS) + +-install: progs $(srcdir)/doc/socat.1 ++install: progs + mkdir -p $(DESTDIR)$(BINDEST) + $(INSTALL) -m 755 socat $(DESTDIR)$(BINDEST) + $(INSTALL) -m 755 procan $(DESTDIR)$(BINDEST) + $(INSTALL) -m 755 filan $(DESTDIR)$(BINDEST) +- mkdir -p $(DESTDIR)$(MANDEST)/man1 +- $(INSTALL) -m 644 $(srcdir)/doc/socat.1 $(DESTDIR)$(MANDEST)/man1/ + + uninstall: + rm -f $(DESTDIR)$(BINDEST)/socat diff --git a/package/socat/0002-ptrdiff_t-is-defined-in-stddef.h.patch b/package/socat/0002-ptrdiff_t-is-defined-in-stddef.h.patch new file mode 100644 index 0000000000..acae641b34 --- /dev/null +++ b/package/socat/0002-ptrdiff_t-is-defined-in-stddef.h.patch @@ -0,0 +1,28 @@ +From 99c55f2694fe8621ca2344eb002610dac7f9c969 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 2 Feb 2016 09:34:24 -0300 +Subject: [PATCH] ptrdiff_t is defined in stddef.h + +Status: sent upstream via email. + +Signed-off-by: Gustavo Zacarias +--- + nestlex.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/nestlex.c b/nestlex.c +index f7950f0..f49482d 100644 +--- a/nestlex.c ++++ b/nestlex.c +@@ -4,6 +4,8 @@ + + /* a function for lexical scanning of nested character patterns */ + ++#include /* ptrdiff_t */ ++ + #include "config.h" + #include "mytypes.h" + +-- +2.4.10 + diff --git a/package/socat/Config.in b/package/socat/Config.in new file mode 100644 index 0000000000..09eb2b616d --- /dev/null +++ b/package/socat/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_SOCAT + bool "socat" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Multipurpose socket relay program. + + http://www.dest-unreach.org/socat/ + +comment "socat needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/socat/socat.hash b/package/socat/socat.hash new file mode 100644 index 0000000000..d867d8ac10 --- /dev/null +++ b/package/socat/socat.hash @@ -0,0 +1,4 @@ +# From http://www.dest-unreach.org/socat/download.md5sum +md5 553b1593d0a192cb09cbdc687ef1baac socat-2.0.0-b9.tar.bz2 +# Calculated based on the hash above +sha256 49efb0a5c66b94b279014addc2851faf8ebbd1ec4b7e31c1de7e912d7b4983d2 socat-2.0.0-b9.tar.bz2 diff --git a/package/socat/socat.mk b/package/socat/socat.mk new file mode 100644 index 0000000000..754b210b6c --- /dev/null +++ b/package/socat/socat.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# socat +# +################################################################################ + +SOCAT_VERSION = 2.0.0-b9 +SOCAT_SOURCE = socat-$(SOCAT_VERSION).tar.bz2 +SOCAT_SITE = http://www.dest-unreach.org/socat/download +SOCAT_LICENSE = GPLv2 +SOCAT_LICENSE_FILES = COPYING +SOCAT_CONF_ENV = \ + sc_cv_termios_ispeed=no \ + sc_cv_sys_crdly_shift=9 \ + sc_cv_sys_tabdly_shift=11 \ + sc_cv_sys_csize_shift=4 + +# We need to run autoconf to regenerate the configure script, in order +# to ensure that the test checking linux/ext2_fs.h works +# properly. However, the package only uses autoconf and not automake, +# so we can't use the normal autoreconf logic. + +SOCAT_DEPENDENCIES = host-autoconf + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SOCAT_DEPENDENCIES += openssl +else +SOCAT_CONF_OPTS += --disable-openssl +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +SOCAT_DEPENDENCIES += readline +else +SOCAT_CONF_OPTS += --disable-readline +endif + +define SOCAT_RUN_AUTOCONF + (cd $(@D); $(HOST_DIR)/usr/bin/autoconf) +endef + +SOCAT_PRE_CONFIGURE_HOOKS += SOCAT_RUN_AUTOCONF + +$(eval $(autotools-package)) diff --git a/package/socketcand/0001-Remove-inline-keyword.patch b/package/socketcand/0001-Remove-inline-keyword.patch new file mode 100644 index 0000000000..92e8737ba0 --- /dev/null +++ b/package/socketcand/0001-Remove-inline-keyword.patch @@ -0,0 +1,90 @@ +From bdb3cd081a694f8f6924e399d944e32c1578235c Mon Sep 17 00:00:00 2001 +From: Yegor Yefremov +Date: Wed, 22 Jul 2015 11:03:27 +0200 +Subject: [PATCH] Remove inline keyword + +Fixes GCC5.x compilation issues related to C99 inline semantics. + +Signed-off-by: Yegor Yefremov +--- + socketcand.h | 8 ++++---- + state_bcm.c | 2 +- + state_control.c | 2 +- + state_isotp.c | 2 +- + state_raw.c | 2 +- + 5 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/socketcand.h b/socketcand.h +index a287fe2..39eef83 100644 +--- a/socketcand.h ++++ b/socketcand.h +@@ -27,10 +27,10 @@ + + #undef DEBUG_RECEPTION + +-inline void state_bcm(); +-inline void state_raw(); +-inline void state_isotp(); +-inline void state_control(); ++void state_bcm(); ++void state_raw(); ++void state_isotp(); ++void state_control(); + + extern int client_socket; + extern char **interface_names; +diff --git a/state_bcm.c b/state_bcm.c +index c63a0a9..0c980fa 100644 +--- a/state_bcm.c ++++ b/state_bcm.c +@@ -28,7 +28,7 @@ int sc = -1; + fd_set readfds; + struct timeval tv; + +-inline void state_bcm() { ++void state_bcm() { + int i, ret; + struct sockaddr_can caddr; + socklen_t caddrlen = sizeof(caddr); +diff --git a/state_control.c b/state_control.c +index 5f62b74..baa9df6 100644 +--- a/state_control.c ++++ b/state_control.c +@@ -17,7 +17,7 @@ + #include + #include + +-inline void state_control() { ++void state_control() { + char buf[MAXLEN]; + int i, items; + +diff --git a/state_isotp.c b/state_isotp.c +index ae66035..4005f94 100644 +--- a/state_isotp.c ++++ b/state_isotp.c +@@ -24,7 +24,7 @@ + int si = -1; + fd_set readfds; + +-inline void state_isotp() { ++void state_isotp() { + int i, items, ret; + + struct sockaddr_can addr; +diff --git a/state_raw.c b/state_raw.c +index 1bd2ece..99111ae 100644 +--- a/state_raw.c ++++ b/state_raw.c +@@ -31,7 +31,7 @@ char ctrlmsg[CMSG_SPACE(sizeof(struct timeval)) + CMSG_SPACE(sizeof(__u32))]; + struct timeval tv; + struct cmsghdr *cmsg; + +-inline void state_raw() { ++void state_raw() { + char buf[MAXLEN]; + int i, ret, items; + +-- +2.1.4 + diff --git a/package/socketcand/Config.in b/package/socketcand/Config.in new file mode 100644 index 0000000000..7d663251cd --- /dev/null +++ b/package/socketcand/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_SOCKETCAND + bool "socketcand" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + Socketcand is a daemon that provides access to CAN interfaces + on a machine via a network interface. + + https://github.com/dschanoeh/socketcand + +comment "socketcand needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/socketcand/socketcand.mk b/package/socketcand/socketcand.mk new file mode 100644 index 0000000000..10b8b5b411 --- /dev/null +++ b/package/socketcand/socketcand.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# socketcand +# +################################################################################ + +SOCKETCAND_VERSION = 8339e62a6bf60be571672678fb1de544768cf40e +SOCKETCAND_SITE = $(call github,dschanoeh,socketcand,$(SOCKETCAND_VERSION)) +SOCKETCAND_AUTORECONF = YES +SOCKETCAND_LICENSE = BSD-3c or GPLv2 +SOCKETCAND_LICENSE_FILES = socketcand.c + +ifeq ($(BR2_PACKAGE_LIBCONFIG),y) +SOCKETCAND_DEPENDENCIES = libconfig +else +SOCKETCAND_CONF_OPTS = --without-config +endif + +$(eval $(autotools-package)) diff --git a/package/sofia-sip/0001-soa_tag.h-reintroduce-soatag_local_sdp_str_ref.patch b/package/sofia-sip/0001-soa_tag.h-reintroduce-soatag_local_sdp_str_ref.patch new file mode 100644 index 0000000000..2d52348617 --- /dev/null +++ b/package/sofia-sip/0001-soa_tag.h-reintroduce-soatag_local_sdp_str_ref.patch @@ -0,0 +1,26 @@ +From bcd0f17fd83f2dfe570a3ab17249a5c7290b27f2 Mon Sep 17 00:00:00 2001 +From: Pekka Pessi +Date: Thu, 24 Mar 2011 14:45:21 +0200 +Subject: [PATCH] soa_tag.h: reintroduce soatag_local_sdp_str_ref + +Thanks to Erik Habicht for spotting it +--- + libsofia-sip-ua/soa/sofia-sip/soa_tag.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/libsofia-sip-ua/soa/sofia-sip/soa_tag.h b/libsofia-sip-ua/soa/sofia-sip/soa_tag.h +index 723ca02..d9448d6 100644 +--- a/libsofia-sip-ua/soa/sofia-sip/soa_tag.h ++++ b/libsofia-sip-ua/soa/sofia-sip/soa_tag.h +@@ -118,7 +118,7 @@ SOFIAPUBVAR tag_typedef_t soatag_local_sdp_ref; + SOFIAPUBVAR tag_typedef_t soatag_local_sdp_str; + #define SOATAG_LOCAL_SDP_STR_REF(x) \ + soatag_local_sdp_str_ref, tag_str_vr(&(x)) +-SOFIAPUBVAR tag_typedef_t soatag_session_sdp_str_ref; ++SOFIAPUBVAR tag_typedef_t soatag_local_sdp_str_ref; + + #define SOATAG_AF(x) soatag_af, tag_int_v((x)) + SOFIAPUBVAR tag_typedef_t soatag_af; +-- +1.7.7 + diff --git a/package/sofia-sip/Config.in b/package/sofia-sip/Config.in new file mode 100644 index 0000000000..24e2148ab9 --- /dev/null +++ b/package/sofia-sip/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_SOFIA_SIP + bool "sofia-sip" + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Sofia-SIP is an open-source SIP User-Agent library, + compliant with the IETF RFC3261 specification (see the + feature table). It can be used as a building block for SIP + client software for uses such as VoIP, IM, and many other + real-time and person-to-person communication services. + + http://sofia-sip.sourceforge.net/ + +comment "sofia-sip needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/sofia-sip/sofia-sip.hash b/package/sofia-sip/sofia-sip.hash new file mode 100644 index 0000000000..fe9c4b11c2 --- /dev/null +++ b/package/sofia-sip/sofia-sip.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 2b01bc2e1826e00d1f7f57d29a2854b15fd5fe24695e47a14a735d195dd37c81 sofia-sip-1.12.11.tar.gz diff --git a/package/sofia-sip/sofia-sip.mk b/package/sofia-sip/sofia-sip.mk new file mode 100644 index 0000000000..5ece44839f --- /dev/null +++ b/package/sofia-sip/sofia-sip.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# sofia-sip +# +################################################################################ + +SOFIA_SIP_VERSION = 1.12.11 +SOFIA_SIP_SITE = http://downloads.sourceforge.net/project/sofia-sip/sofia-sip/$(SOFIA_SIP_VERSION) +SOFIA_SIP_INSTALL_STAGING = YES +SOFIA_SIP_DEPENDENCIES = host-pkgconf +SOFIA_SIP_LICENSE = LGPLv2.1+ +SOFIA_SIP_LICENSE_FILES = COPYING COPYRIGHTS +SOFIA_SIP_CONF_OPTS = --with-doxygen=no + +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +SOFIA_SIP_CONF_OPTS += --with-glib +SOFIA_SIP_DEPENDENCIES += libglib2 +else +SOFIA_SIP_CONF_OPTS += --without-glib +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SOFIA_SIP_CONF_OPTS += --with-openssl +SOFIA_SIP_DEPENDENCIES += openssl +else +SOFIA_SIP_CONF_OPTS += --without-openssl +endif + +ifeq ($(BR2_ENABLE_DEBUG),y) +SOFIA_SIP_CONF_OPTS += --enable-ndebug +endif + +$(eval $(autotools-package)) diff --git a/package/softether/0001-use-fhs-install-directories.patch b/package/softether/0001-use-fhs-install-directories.patch new file mode 100644 index 0000000000..c489cc1a6c --- /dev/null +++ b/package/softether/0001-use-fhs-install-directories.patch @@ -0,0 +1,318 @@ +From b9420c3bfc2a8b9d35d0c8e5f6849007c2bc21fa Mon Sep 17 00:00:00 2001 +From: Darik Horn +Date: Mon, 14 Apr 2014 13:22:24 -0400 +Subject: [PATCH] Use FHS installation directories. + +Install to `/usr/sbin`, `/usr/lib`, and `/var/lib` according to the Linux +filesystem hierarchy standard if SoftEther is built through autotools. + +In a managed installation, the FHS stipulates that the application must +accomodate a read-only installation path. This requires a new `GetStateDir` +function that substitues `GetExeDir` in some parts of the code. + +Taken from Github at +https://github.com/dajhorn/SoftEtherVPN/commit/b9420c3bfc2a8b9d35d0c8e5f6849007c2bc21fa. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + autotools/softether.am | 1 + + src/Cedar/Admin.c | 2 +- + src/Cedar/Command.c | 6 +++++- + src/Cedar/Logging.c | 2 +- + src/Cedar/Server.c | 4 ++-- + src/Mayaqua/Encrypt.c | 2 +- + src/Mayaqua/FileIO.c | 39 ++++++++++++++++++++++++++++++++++++--- + src/Mayaqua/FileIO.h | 2 ++ + src/Mayaqua/Mayaqua.c | 4 ++++ + src/Mayaqua/Table.c | 6 +++++- + src/Mayaqua/Unix.c | 6 +++--- + src/bin/hamcore/Makefile.am | 8 ++++++-- + 12 files changed, 67 insertions(+), 15 deletions(-) + +Index: b/autotools/softether.am +=================================================================== +--- a/autotools/softether.am ++++ b/autotools/softether.am +@@ -27,6 +27,7 @@ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/src/Mayaqua \ + -I$(top_srcdir)/src/Cedar \ ++ -DSTATE_DIR='"@localstatedir@/lib/softether"' \ + -DUNIX \ + -DUNIX_LINUX \ + -D_REENTRANT \ +Index: b/src/Cedar/Admin.c +=================================================================== +--- a/src/Cedar/Admin.c ++++ b/src/Cedar/Admin.c +@@ -10334,7 +10334,7 @@ + + Zero(t, sizeof(RPC_READ_LOG_FILE)); + +- GetExeDir(exe_dir, sizeof(exe_dir)); ++ GetStateDir(exe_dir, sizeof(exe_dir)); + Format(full_path, sizeof(full_path), "%s/%s", exe_dir, filepath); + + // Read file +Index: b/src/Cedar/Command.c +=================================================================== +--- a/src/Cedar/Command.c ++++ b/src/Cedar/Command.c +@@ -527,7 +527,7 @@ + UINT i; + + GetExeName(exe, sizeof(exe)); +- GetExeDir(exe_dir, sizeof(exe_dir)); ++ GetStateDir(exe_dir, sizeof(exe_dir)); + + ok = false; + dirs = EnumDir(exe_dir); +@@ -552,7 +552,11 @@ + UCHAR *buf; + IO *io; + #ifndef OS_WIN32 ++#ifdef STATE_DIR ++ wchar_t *filename = L"" STATE_DIR L"/vpn_checker_tmp"; ++#else + wchar_t *filename = L"/tmp/vpn_checker_tmp"; ++#endif + #else // OS_WIN32 + wchar_t filename[MAX_PATH]; + CombinePathW(filename, sizeof(filename), MsGetMyTempDirW(), L"vpn_checker_tmp"); +Index: b/src/Cedar/Logging.c +=================================================================== +--- a/src/Cedar/Logging.c ++++ b/src/Cedar/Logging.c +@@ -508,7 +508,7 @@ + + e = ZeroMalloc(sizeof(ERASER)); + +- GetExeDir(dir, sizeof(dir)); ++ GetStateDir(dir, sizeof(dir)); + + e->Log = log; + e->MinFreeSpace = min_size; +Index: b/src/Cedar/Server.c +=================================================================== +--- a/src/Cedar/Server.c ++++ b/src/Cedar/Server.c +@@ -1060,7 +1060,7 @@ + hubname = NULL; + } + +- GetExeDir(exe_dir, sizeof(exe_dir)); ++ GetStateDir(exe_dir, sizeof(exe_dir)); + + // Enumerate in the server_log + if (hubname == NULL) +@@ -1134,7 +1134,7 @@ + return; + } + +- GetExeDir(exe_dir, sizeof(exe_dir)); ++ GetStateDir(exe_dir, sizeof(exe_dir)); + Format(dir_full_path, sizeof(dir_full_path), "%s/%s", exe_dir, dirname); + + dir = EnumDir(dir_full_path); +Index: b/src/Mayaqua/Encrypt.c +=================================================================== +--- a/src/Mayaqua/Encrypt.c ++++ b/src/Mayaqua/Encrypt.c +@@ -579,7 +579,7 @@ + return false; + } + +- GetExeDir(dirname, sizeof(dirname)); ++ GetStateDir(dirname, sizeof(dirname)); + + // Search the CRL file + t = EnumDir(dirname); +Index: b/src/Mayaqua/FileIO.c +=================================================================== +--- a/src/Mayaqua/FileIO.c ++++ b/src/Mayaqua/FileIO.c +@@ -122,8 +122,14 @@ + #include + #include + ++#ifdef STATE_DIR ++static char exe_file_name[MAX_SIZE] = STATE_DIR "/a.out"; ++static wchar_t exe_file_name_w[MAX_SIZE] = L"" STATE_DIR L"/a.out"; ++#else + static char exe_file_name[MAX_SIZE] = "/tmp/a.out"; + static wchar_t exe_file_name_w[MAX_SIZE] = L"/tmp/a.out"; ++#endif ++ + static LIST *hamcore = NULL; + static IO *hamcore_io = NULL; + +@@ -1038,7 +1044,7 @@ + } + + // If the file exist in hamcore/ directory on the local disk, read it +- GetExeDirW(exe_dir, sizeof(exe_dir)); ++ GetStateDirW(exe_dir, sizeof(exe_dir)); + + UniFormat(tmp, sizeof(tmp), L"%s/%S/%S", exe_dir, HAMCORE_DIR_NAME, filename); + +@@ -1154,7 +1160,7 @@ + return; + } + +- GetExeDirW(exe_dir, sizeof(exe_dir)); ++ GetStateDirW(exe_dir, sizeof(exe_dir)); + UniFormat(tmp, sizeof(tmp), L"%s/%S", exe_dir, HAMCORE_FILE_NAME); + + UniFormat(tmp2, sizeof(tmp2), L"%s/%S", exe_dir, HAMCORE_FILE_NAME_2); +@@ -1438,6 +1444,33 @@ + GetDirNameFromFilePathW(name, size, exe_file_name_w); + } + ++void GetStateDir(char *name, UINT size) ++{ ++ // Validate arguments ++ if (name == NULL) ++ { ++ return; ++ } ++#ifdef STATE_DIR ++ StrCpy(name, size, STATE_DIR); ++#else ++ GetExeDir(name, size) ++#endif ++} ++void GetStateDirW(wchar_t *name, UINT size) ++{ ++ // Validate arguments ++ if (name == NULL) ++ { ++ return; ++ } ++#ifdef STATE_DIR ++ UniStrCpy(name, size, L"" STATE_DIR L""); ++#else ++ GetExeDirW(name, size) ++#endif ++} ++ + // Get the EXE file name + void GetExeName(char *name, UINT size) + { +@@ -2389,7 +2422,7 @@ + else + { + wchar_t dir[MAX_SIZE]; +- GetExeDirW(dir, sizeof(dir)); ++ GetStateDirW(dir, sizeof(dir)); + ConbinePathW(dst, size, dir, &src[1]); + } + } +Index: b/src/Mayaqua/FileIO.h +=================================================================== +--- a/src/Mayaqua/FileIO.h ++++ b/src/Mayaqua/FileIO.h +@@ -349,6 +349,8 @@ + void GetExeNameW(wchar_t *name, UINT size); + void GetExeDir(char *name, UINT size); + void GetExeDirW(wchar_t *name, UINT size); ++void GetStateDir(char *name, UINT size); ++void GetStateDirW(wchar_t *name, UINT size); + void BuildHamcore(char *dst_filename, char *src_dir, bool unix_only); + int CompareHamcore(void *p1, void *p2); + void InitHamcore(); +Index: b/src/Mayaqua/Mayaqua.c +=================================================================== +--- a/src/Mayaqua/Mayaqua.c ++++ b/src/Mayaqua/Mayaqua.c +@@ -611,7 +611,11 @@ + _exit(0); + } + ++#ifndef STATE_DIR ++ // This check causes hamcorebuilder to fail in an unprivileged ++ // environment, and is unnecessary for a managed installation. + CheckUnixTempDir(); ++#endif + + // Initialization of Probe + InitProbe(); +Index: b/src/Mayaqua/Table.c +=================================================================== +--- a/src/Mayaqua/Table.c ++++ b/src/Mayaqua/Table.c +@@ -1191,7 +1191,7 @@ + return; + } + +- GetExeDirW(exe, sizeof(exe)); ++ GetStateDirW(exe, sizeof(exe)); + UniStrCpy(hashtemp, sizeof(hashtemp), strfilename); + BinToStrW(tmp, sizeof(tmp), filehash, MD5_SIZE); + UniStrCat(hashtemp, sizeof(hashtemp), tmp); +@@ -1204,7 +1204,11 @@ + UniStrLower(tmp); + + #ifndef OS_WIN32 ++#ifdef STATE_DIR ++ UniStrCpy(exe, sizeof(exe), L"" STATE_DIR L""); ++#else + UniStrCpy(exe, sizeof(exe), L"/tmp"); ++#endif + #else // OS_WIN32 + StrToUni(exe, sizeof(exe), MsGetTempDir()); + #endif // OS_WIN32 +Index: b/src/Mayaqua/Unix.c +=================================================================== +--- a/src/Mayaqua/Unix.c ++++ b/src/Mayaqua/Unix.c +@@ -928,7 +928,7 @@ + StrCpy(tmp, sizeof(tmp), instance_name); + } + +- GetExeDir(dir, sizeof(dir)); ++ GetStateDir(dir, sizeof(dir)); + + // File name generation + Format(name, sizeof(name), "%s/.%s", dir, tmp); +@@ -2260,7 +2260,7 @@ + return; + } + +- GetExeDir(dir, sizeof(dir)); ++ GetStateDir(dir, sizeof(dir)); + + GetExeName(exe_name, sizeof(exe_name)); + StrCat(exe_name, sizeof(exe_name), ":pid_hash"); +@@ -2305,7 +2305,7 @@ + return; + } + +- GetExeDir(dir, sizeof(dir)); ++ GetStateDir(dir, sizeof(dir)); + + GetExeName(exe_name, sizeof(exe_name)); + StrCat(exe_name, sizeof(exe_name), ":pid_hash"); +Index: b/src/bin/hamcore/Makefile.am +=================================================================== +--- a/src/bin/hamcore/Makefile.am ++++ b/src/bin/hamcore/Makefile.am +@@ -18,12 +18,16 @@ + + include $(top_srcdir)/autotools/softether.am + +-# This is required to use a custom build rule with -Wall and -Werror enabled. ++# An empty EXEEXT required for overrides with -Wall and -Werror enabled. + AUTOMAKE_OPTIONS = -Wno-override + EXEEXT = ++ + HAMCOREBUILDER = $(top_builddir)/src/hamcorebuilder/hamcorebuilder + +-sbin_PROGRAMS = hamcore.se2 ++noinst_PROGRAMS = hamcore.se2 + + hamcore.se2$(EXEEXT): $(HAMCOREBUILDER) + $(HAMCOREBUILDER) $(top_srcdir)/src/bin/hamcore $@ ++ ++install-exec-local: hamcore.se2$(EXEEXT) ++ $(INSTALL_DATA) -D hamcore.se2$(EXEEXT) $(DESTDIR)$(localstatedir)/lib/softether/hamcore.se2 diff --git a/package/softether/0002-create-non-forking-softetherd-for-upstart-and-systemd.patch b/package/softether/0002-create-non-forking-softetherd-for-upstart-and-systemd.patch new file mode 100644 index 0000000000..72913b0bf3 --- /dev/null +++ b/package/softether/0002-create-non-forking-softetherd-for-upstart-and-systemd.patch @@ -0,0 +1,218 @@ +From 64dd780905ae339a0a57e4aba541799016816a1a Mon Sep 17 00:00:00 2001 +From: Darik Horn +Date: Fri, 3 Oct 2014 13:30:24 -0400 +Subject: [PATCH] Create a non-forking softetherd for upstart and systemd. + +Implement a daemon that expects to be invoked by a new-style init like upstart +or systemd as: + + /usr/sbin/softetherd [vpnbridge|vpnclient|vpnserver] + +Alternatively, if the command line argument is empty, then use the +`SOFTETHER_MODE` environment variable instead. + +Conflicts: + src/bin/hamcore/strtable_en.stb + +Taken from Github at +https://github.com/dajhorn/SoftEtherVPN/commit/64dd780905ae339a0a57e4aba541799016816a1a. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 1 + + src/Makefile.am | 3 ++ + src/bin/hamcore/strtable_en.stb | 1 + + src/softetherd/Makefile.am | 28 ++++++++++ + src/softetherd/softetherd.c | 114 ++++++++++++++++++++++++++++++++++++++++ + 5 files changed, 147 insertions(+) + create mode 100644 src/softetherd/Makefile.am + create mode 100644 src/softetherd/softetherd.c + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -36,6 +36,7 @@ + src/vpnclient/Makefile + src/vpnbridge/Makefile + src/vpncmd/Makefile ++ src/softetherd/Makefile + ]) + + +Index: b/src/Makefile.am +=================================================================== +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -27,3 +27,6 @@ + + # These are the final build products. + SUBDIRS += vpnserver vpnclient vpnbridge vpncmd ++ ++# This is a daemon for upstart and systemd. ++SUBDIRS += softetherd +Index: b/src/bin/hamcore/strtable_en.stb +=================================================================== +--- a/src/bin/hamcore/strtable_en.stb ++++ b/src/bin/hamcore/strtable_en.stb +@@ -1062,6 +1062,7 @@ + + + # Concerning services (UNIX) ++UNIX_DAEMON_HELP SoftEther VPN non-forking daemon for upstart and systemd.\nCommand Usage:\n %S vpnbridge - Enable bridging features.\n %S vpnclient - Enable client features.\n %S vpnserver - Enable all features.\nThe parameter can be set in the SOFTETHER_MODE environment variable.\n\n + UNIX_SVC_HELP %S service program\nCopyright (c) SoftEther VPN Project. All Rights Reserved.\n\n%S command usage:\n %S start - Start the %S service.\n %S stop - Stop the %S service if the service has been already started.\n\n + UNIX_SVC_STARTED The %S service has been started.\n + UNIX_SVC_STOPPING Stopping the %S service ...\n +Index: b/src/softetherd/Makefile.am +=================================================================== +--- /dev/null ++++ b/src/softetherd/Makefile.am +@@ -0,0 +1,28 @@ ++# Copyright 2014 Darik Horn ++# ++# This file is part of SoftEther. ++# ++# SoftEther 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. ++# ++# SoftEther 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 ++# SoftEther. If not, see . ++ ++ ++include $(top_srcdir)/autotools/softether.am ++ ++sbin_PROGRAMS = \ ++ softetherd ++ ++softetherd_SOURCES = \ ++ softetherd.c ++ ++softetherd_LDADD = \ ++ $(top_builddir)/src/libsoftether/libsoftether.la +Index: b/src/softetherd/softetherd.c +=================================================================== +--- /dev/null ++++ b/src/softetherd/softetherd.c +@@ -0,0 +1,114 @@ ++// SoftEther VPN daemon for upstart and systemd. ++// ++// Copyright 2014 Darik Horn ++// ++// This file is part of SoftEther. ++// ++// SoftEther 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. ++// ++// SoftEther 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 ++// SoftEther. If not, see . ++ ++ ++#include ++ ++#define VPN_EXE ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++void DaemonUsage(char *name) ++{ ++ UniPrint(_UU("UNIX_DAEMON_HELP"), name, name, name); ++} ++ ++ ++void DaemonStartProcess() ++{ ++ // This environment variable is exported by upstart. ++ char *upstart_job = getenv("UPSTART_JOB"); ++ ++ InitCedar(); ++ StInit(); ++ StStartServer(false); ++ ++ // Notify upstart that softetherd is ready. ++ if (upstart_job != NULL) ++ { ++ unsetenv("UPSTART_JOB"); ++ raise(SIGSTOP); ++ } ++} ++ ++ ++void DaemonStopProcess() ++{ ++ StStopServer(); ++ StFree(); ++ FreeCedar(); ++} ++ ++ ++int main(int argc, char *argv[]) ++{ ++ // This environment variable is sourced and exported by the init process from /etc/default/softether. ++ char *softether_mode = getenv("SOFTETHER_MODE"); ++ ++ InitMayaqua(false, false, argc, argv); ++ ++ // Check for an explicit invocation. (eg: "/usr/sbin/softetherd vpnserver") ++ if (argc >= 2) ++ { ++ if (StrCmpi(argv[1], "vpnbridge") == 0 ++ || StrCmpi(argv[1], "vpnclient") == 0 ++ || StrCmpi(argv[1], "vpnserver") == 0) ++ { ++ UnixExecService(argv[1], DaemonStartProcess, DaemonStopProcess); ++ FreeMayaqua(); ++ return 0; ++ } ++ ++ // Exit status codes 150..199 are reserved for the application by the LSB. ++ fprintf(stderr, "Error: Unrecognized parameter: %s\n", argv[1]); ++ fflush(stderr); ++ FreeMayaqua(); ++ return 150; ++ } ++ ++ // Alternatively, use the environment variable. ++ if (softether_mode != NULL) ++ { ++ if (StrCmpi(softether_mode, "vpnbridge") == 0 ++ || StrCmpi(softether_mode, "vpnclient") == 0 ++ || StrCmpi(softether_mode, "vpnserver") == 0) ++ { ++ UnixExecService(softether_mode, DaemonStartProcess, DaemonStopProcess); ++ FreeMayaqua(); ++ return 0; ++ } ++ ++ // Exit status codes 150..199 are reserved for the application by the LSB. ++ fprintf(stderr, "Error: Unrecognized environment variable: SOFTETHER_MODE=%s\n", softether_mode); ++ fflush(stderr); ++ FreeMayaqua(); ++ return 151; ++ } ++ ++ DaemonUsage(argv[0]); ++ FreeMayaqua(); ++ return 3; ++} diff --git a/package/softether/0003-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch b/package/softether/0003-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch new file mode 100644 index 0000000000..6cb4e728b4 --- /dev/null +++ b/package/softether/0003-change-GetExeDir-to-GetStateDir-in-Cedar-and-Mayaqua.patch @@ -0,0 +1,90 @@ +From d68db9f2cee975aad5e07b44485615f3d842ab45 Mon Sep 17 00:00:00 2001 +From: Darik Horn +Date: Fri, 11 Jul 2014 16:17:18 -0400 +Subject: [PATCH] Change GetExeDir to GetStateDir in Cedar and Mayaqua. + +Resolve this AppArmor error by ensuring that certificate files files are +written into /var/lib/softether instead of the current working directory: + + Profile: /usr/sbin/softetherd + Operation: mkdir + Name: /usr/sbin/chain_certs + Denied: c + Logfile: /var/log/kern.log + + type=1400 audit: apparmor="DENIED" operation="mkdir" profile="/usr/sbin/softetherd" name="/usr/sbin/chain_certs/" pid=36448 comm="softetherd" requested_mask="c" denied_mask="c" fsuid=0 ouid=0 + +Taken from Github +https://github.com/dajhorn/SoftEtherVPN/commit/d68db9f2cee975aad5e07b44485615f3d842ab45. + +Signed-off-by: Bernd Kuhls +Signed-off-by: Thomas Petazzoni +--- + src/Cedar/Protocol.c | 12 ++++++------ + src/Mayaqua/Network.c | 6 +++--- + 2 files changed, 9 insertions(+), 9 deletions(-) + +Index: b/src/Cedar/Protocol.c +=================================================================== +--- a/src/Cedar/Protocol.c ++++ b/src/Cedar/Protocol.c +@@ -161,10 +161,10 @@ + UINT i; + DIRLIST *dir; + wchar_t dirname[MAX_SIZE]; +- wchar_t exedir[MAX_SIZE]; ++ wchar_t statedir[MAX_SIZE]; + +- GetExeDirW(exedir, sizeof(exedir)); +- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs"); ++ GetStateDirW(statedir, sizeof(statedir)); ++ CombinePathW(dirname, sizeof(dirname), statedir, L"chain_certs"); + MakeDirExW(dirname); + + if (auto_save) +@@ -461,7 +461,7 @@ + void AddAllChainCertsToCertList(LIST *o) + { + wchar_t dirname[MAX_SIZE]; +- wchar_t exedir[MAX_SIZE]; ++ wchar_t statedir[MAX_SIZE]; + DIRLIST *dir; + // Validate arguments + if (o == NULL) +@@ -469,9 +469,9 @@ + return; + } + +- GetExeDirW(exedir, sizeof(exedir)); ++ GetStateDirW(statedir, sizeof(statedir)); + +- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs"); ++ CombinePathW(dirname, sizeof(dirname), statedir, L"chain_certs"); + + MakeDirExW(dirname); + +Index: b/src/Mayaqua/Network.c +=================================================================== +--- a/src/Mayaqua/Network.c ++++ b/src/Mayaqua/Network.c +@@ -12588,7 +12588,7 @@ + void AddChainSslCertOnDirectory(struct ssl_ctx_st *ctx) + { + wchar_t dirname[MAX_SIZE]; +- wchar_t exedir[MAX_SIZE]; ++ wchar_t statedir[MAX_SIZE]; + wchar_t txtname[MAX_SIZE]; + DIRLIST *dir; + LIST *o; +@@ -12602,9 +12602,9 @@ + + o = NewListFast(NULL); + +- GetExeDirW(exedir, sizeof(exedir)); ++ GetStateDirW(statedir, sizeof(statedir)); + +- CombinePathW(dirname, sizeof(dirname), exedir, L"chain_certs"); ++ CombinePathW(dirname, sizeof(dirname), statedir, L"chain_certs"); + + MakeDirExW(dirname); + diff --git a/package/softether/0004-cross-compile.patch b/package/softether/0004-cross-compile.patch new file mode 100644 index 0000000000..0b31eca65c --- /dev/null +++ b/package/softether/0004-cross-compile.patch @@ -0,0 +1,30 @@ +Host version of hamcorebuilder is needed during cross-compile + +Signed-off-by: Bernd Kuhls + +diff -uNr SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824.org/src/bin/hamcore/Makefile.am SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824/src/bin/hamcore/Makefile.am +--- SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824.org/src/bin/hamcore/Makefile.am 2014-09-27 12:56:53.108725793 +0200 ++++ SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824/src/bin/hamcore/Makefile.am 2014-09-27 12:57:50.280009025 +0200 +@@ -26,8 +26,8 @@ + + noinst_PROGRAMS = hamcore.se2 + +-hamcore.se2$(EXEEXT): $(HAMCOREBUILDER) +- $(HAMCOREBUILDER) $(top_srcdir)/src/bin/hamcore $@ ++hamcore.se2$(EXEEXT): ++ hamcorebuilder $(top_srcdir)/src/bin/hamcore $@ + + install-exec-local: hamcore.se2$(EXEEXT) + $(INSTALL_DATA) -D hamcore.se2$(EXEEXT) $(DESTDIR)$(localstatedir)/lib/softether/hamcore.se2 +diff -uNr SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824.org/src/Makefile.am SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824/src/Makefile.am +--- SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824.org/src/Makefile.am 2014-09-27 12:56:53.136726809 +0200 ++++ SoftEtherVPN-16b713b98da8dba29f0f845d5a8c36d6f7c34824/src/Makefile.am 2014-09-27 12:58:12.959723109 +0200 +@@ -20,7 +20,7 @@ + SUBDIRS = Mayaqua Cedar + + # This is a nodist helper. +-SUBDIRS += hamcorebuilder ++# SUBDIRS += hamcorebuilder + + # These are shared components. + SUBDIRS += libsoftether bin/hamcore diff --git a/package/softether/0005-iconv.patch b/package/softether/0005-iconv.patch new file mode 100644 index 0000000000..09d7777e42 --- /dev/null +++ b/package/softether/0005-iconv.patch @@ -0,0 +1,28 @@ +Fix linking with libiconv + +Inspired by https://github.com/el1n/OpenWRT-package-softether/blob/4cb1cd9073a76edf34c512e587069626e02e2404/patches/120-fix-iconv-headers-common.patch + +Signed-off-by: Bernd Kuhls + +Index: b/src/Mayaqua/Mayaqua.h +=================================================================== +--- a/src/Mayaqua/Mayaqua.h ++++ b/src/Mayaqua/Mayaqua.h +@@ -282,17 +282,7 @@ + #include + #endif // MAYAQUA_SUPPORTS_GETIFADDRS + +-#ifdef UNIX_LINUX +-typedef void *iconv_t; +-iconv_t iconv_open (__const char *__tocode, __const char *__fromcode); +-size_t iconv (iconv_t __cd, char **__restrict __inbuf, +- size_t *__restrict __inbytesleft, +- char **__restrict __outbuf, +- size_t *__restrict __outbytesleft); +-int iconv_close (iconv_t __cd); +-#else // UNIX_LINUX + #include +-#endif // UNIX_LINUX + + + diff --git a/package/softether/0006-librt.patch b/package/softether/0006-librt.patch new file mode 100644 index 0000000000..661c960a95 --- /dev/null +++ b/package/softether/0006-librt.patch @@ -0,0 +1,33 @@ +Downloaded from +https://github.com/dajhorn/SoftEtherVPN/commit/9a8538a6f2287fe8bebd0a7185de408e31e5a7df + +Fixes +http://autobuild.buildroot.net/results/48f/48f778a891e0bf6a60ed2e4bec057c338ec25ec9/ +and many others + +Signed-off-by: Bernd Kuhls + + +From 9a8538a6f2287fe8bebd0a7185de408e31e5a7df Mon Sep 17 00:00:00 2001 +From: Darik Horn +Date: Thu, 5 Jun 2014 21:02:02 -0400 +Subject: [PATCH] Add an explicit autoconf check for librt. + +The realtime extensions library is not automatically linked on Debian ARM +platforms, so do an AC_CHECK_LIB for it in the configuration macro. +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index 165623a..6f85393 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -60,6 +60,7 @@ CC="$PTHREAD_CC" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + LIBS="$PTHREAD_LIBS $LIBS" + ++AC_CHECK_LIB([rt],[clock_gettime]) + + AX_CHECK_OPENSSL([ + AC_SUBST(OPENSSL_LIBS) diff --git a/package/softether/0007-uclibc-ai-addrconfig.patch b/package/softether/0007-uclibc-ai-addrconfig.patch new file mode 100644 index 0000000000..7d8f1c67c1 --- /dev/null +++ b/package/softether/0007-uclibc-ai-addrconfig.patch @@ -0,0 +1,27 @@ +Only enable getifaddrs support when available + +On uClibc, the ifaddrs.h support is optional. While the default +Buildroot uClibc configuration has it enabled, some external +toolchains may not. Therefore this patch detects that and adjusts +softether usage of ifaddrs accordingly. + +Based on an initial patch from Bernd Kuhls. + +Signed-off-by: Thomas Petazzoni + +Index: b/src/Mayaqua/Mayaqua.h +=================================================================== +--- a/src/Mayaqua/Mayaqua.h ++++ b/src/Mayaqua/Mayaqua.h +@@ -235,9 +235,11 @@ + #ifdef OS_UNIX + #ifndef UNIX_SOLARIS + #ifndef CPU_SH4 ++#if !defined(__UCLIBC__) || defined(__UCLIBC_SUPPORT_AI_ADDRCONFIG__) + // Getifaddrs system call is supported on UNIX other than Solaris. + // However, it is not supported also by the Linux on SH4 CPU + #define MAYAQUA_SUPPORTS_GETIFADDRS ++#endif // !UCLIBC || UCLIBC_SUPPORT_AI_ADDRCONFIG + #endif // CPU_SH4 + #endif // UNIX_SOLARIS + #endif // OS_UNIX diff --git a/package/softether/Config.in b/package/softether/Config.in new file mode 100644 index 0000000000..60f1357529 --- /dev/null +++ b/package/softether/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_SOFTETHER + bool "softether" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_READLINE + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR + help + The SoftEther Server is a fully integrated implementation of the SSTP, + L2TP, L2TPv3, OpenVPN, and IPSec virtual private networking protocols + on Linux and several other platforms. It is generally compatible with + other implementations by Apple, Cisco, Juniper, Microsoft, et al. + + Convenient Layer-2 and Layer-3 bridging capabilities can connect + several branch offices into a single broadcast or routing domain, even + behind a NAT or without a static IPv4 address. + + In addition to supporting most VPN protocols, the SoftEther Client can + penetrate hardened firewalls and captured gateways through HTTPS, DNS, + and ICMP exfiltration. + + http://www.softether.org + +comment "softether needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !(BR2_USE_WCHAR && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/softether/softether.mk b/package/softether/softether.mk new file mode 100644 index 0000000000..489341e7e7 --- /dev/null +++ b/package/softether/softether.mk @@ -0,0 +1,47 @@ +################################################################################ +# +# softether +# +################################################################################ + +SOFTETHER_VERSION = 4b65e251f240d0b36c704acd598f4ceb07c41413 +SOFTETHER_SITE = $(call github,SoftEtherVPN,SoftEtherVPN,$(SOFTETHER_VERSION)) +SOFTETHER_PATCH = \ + https://github.com/dajhorn/SoftEtherVPN/commit/c5e5d7e93c6f3302adf5821c29c4efdb7630e418.patch \ + https://github.com/dajhorn/SoftEtherVPN/commit/75625af541fd128f51079d0ffe5ef24645b8f421.patch +SOFTETHER_LICENSE = GPLv2 +SOFTETHER_LICENSE_FILES = LICENSE +SOFTETHER_DEPENDENCIES = host-softether openssl readline +SOFTETHER_AUTORECONF = YES + +ifeq ($(BR2_ENABLE_LOCALE),) +SOFTETHER_DEPENDENCIES += libiconv +SOFTETHER_CONF_ENV = LIBS+=" -liconv" +endif + +ifeq ($(BR2_STATIC_LIBS),y) +# openssl needs zlib +SOFTETHER_CONF_ENV += LIBS+=" -lz" +endif + +SOFTETHER_CONF_OPTS = \ + --with-openssl="$(STAGING_DIR)/usr" \ + --with-zlib="$(STAGING_DIR)/usr" + +# host-libiconv does not exist, therefore we need this extra line +HOST_SOFTETHER_DEPENDENCIES = host-pkgconf host-openssl host-readline + +# target build creates the file hamcore.se2 which needs the host variant of +# hamcorebuilder, for details see http://www.vpnusers.com/viewtopic.php?p=5426 +define HOST_SOFTETHER_BUILD_CMDS + $(MAKE) -C $(@D)/src/Mayaqua + $(MAKE) -C $(@D)/src/Cedar + $(MAKE) -C $(@D)/src/hamcorebuilder +endef + +define HOST_SOFTETHER_INSTALL_CMDS + $(INSTALL) -m 0755 $(@D)/src/hamcorebuilder/hamcorebuilder $(HOST_DIR)/usr/bin/hamcorebuilder +endef + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/sound-theme-borealis/Config.in b/package/sound-theme-borealis/Config.in new file mode 100644 index 0000000000..fcc109fe94 --- /dev/null +++ b/package/sound-theme-borealis/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_SOUND_THEME_BOREALIS + bool "sound-theme-borealis" + help + Borealis sound theme. + + http://kde-look.org/content/show.php?content=12584 diff --git a/package/sound-theme-borealis/sound-theme-borealis.hash b/package/sound-theme-borealis/sound-theme-borealis.hash new file mode 100644 index 0000000000..7a4d3e1313 --- /dev/null +++ b/package/sound-theme-borealis/sound-theme-borealis.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 dd80a9c6317de29d42786ba7d95b114b64d06ec6c0c17dd18df853a5c668e727 Borealis_sound_theme_ogg-0.9a.tar.bz2 diff --git a/package/sound-theme-borealis/sound-theme-borealis.mk b/package/sound-theme-borealis/sound-theme-borealis.mk new file mode 100644 index 0000000000..9242837bec --- /dev/null +++ b/package/sound-theme-borealis/sound-theme-borealis.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# sound-theme-borealis +# +################################################################################ + +SOUND_THEME_BOREALIS_VERSION = 0.9a +SOUND_THEME_BOREALIS_SITE = http://ico.bukvic.net/Linux/Borealis_soundtheme +SOUND_THEME_BOREALIS_SOURCE = \ + Borealis_sound_theme_ogg-$(SOUND_THEME_BOREALIS_VERSION).tar.bz2 + +define SOUND_THEME_BOREALIS_INSTALL_TARGET_CMDS + for f in $(@D)/*.ogg ; do \ + $(INSTALL) -D -m 0644 $$f $(TARGET_DIR)/usr/share/sounds/borealis/stereo/`basename $$f` || exit 1; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/sound-theme-freedesktop/Config.in b/package/sound-theme-freedesktop/Config.in new file mode 100644 index 0000000000..8b48015f59 --- /dev/null +++ b/package/sound-theme-freedesktop/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_SOUND_THEME_FREEDESKTOP + bool "sound-theme-freedesktop" + help + Default theme for the XDG Sound Theme Specification. + + http://freedesktop.org/wiki/Specifications/sound-theme-spec diff --git a/package/sound-theme-freedesktop/sound-theme-freedesktop.hash b/package/sound-theme-freedesktop/sound-theme-freedesktop.hash new file mode 100644 index 0000000000..cde02ca3e6 --- /dev/null +++ b/package/sound-theme-freedesktop/sound-theme-freedesktop.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 e6595afb02b76099ef6df42c2ac7c4f9680c21c3f26b2a7ca0943d1fdbbd9aef sound-theme-freedesktop-0.7.tar.bz2 diff --git a/package/sound-theme-freedesktop/sound-theme-freedesktop.mk b/package/sound-theme-freedesktop/sound-theme-freedesktop.mk new file mode 100644 index 0000000000..ea4c8536c7 --- /dev/null +++ b/package/sound-theme-freedesktop/sound-theme-freedesktop.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# sound-theme-freedesktop +# +################################################################################ + +SOUND_THEME_FREEDESKTOP_VERSION = 0.7 +SOUND_THEME_FREEDESKTOP_SITE = \ + http://people.freedesktop.org/~mccann/dist +SOUND_THEME_FREEDESKTOP_SOURCE = \ + sound-theme-freedesktop-$(SOUND_THEME_FREEDESKTOP_VERSION).tar.bz2 +SOUND_THEME_FREEDESKTOP_DEPENDENCIES = host-intltool + +$(eval $(autotools-package)) diff --git a/package/sox/0001-uclibc.patch b/package/sox/0001-uclibc.patch new file mode 100644 index 0000000000..5c118fa4dc --- /dev/null +++ b/package/sox/0001-uclibc.patch @@ -0,0 +1,26 @@ +Make SoX support uclibc-based toolchains, from: +http://sourceforge.net/p/sox/bugs/179/ + +Signed-off-by: Gustavo Zacarias + +Index: sox-14.4.1/src/formats.c +=================================================================== +--- sox-14.4.1.orig/src/formats.c ++++ sox-14.4.1/src/formats.c +@@ -409,7 +409,7 @@ static void UNUSED rewind_pipe(FILE * fp + #if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__ + fp->_p -= PIPE_AUTO_DETECT_SIZE; + fp->_r += PIPE_AUTO_DETECT_SIZE; +-#elif defined __GLIBC__ ++#elif defined __GLIBC__ && ! defined __UCLIBC__ + fp->_IO_read_ptr = fp->_IO_read_base; + #elif defined _MSC_VER || defined _WIN32 || defined _WIN64 || defined _ISO_STDIO_ISO_H + fp->_ptr = fp->_base; +@@ -417,7 +417,6 @@ static void UNUSED rewind_pipe(FILE * fp + /* To fix this #error, either simply remove the #error line and live without + * file-type detection with pipes, or add support for your compiler in the + * lines above. Test with cat monkey.wav | ./sox --info - */ +- #error FIX NEEDED HERE + #define NO_REWIND_PIPE + (void)fp; + #endif diff --git a/package/sox/Config.in b/package/sox/Config.in new file mode 100644 index 0000000000..a96553a2ef --- /dev/null +++ b/package/sox/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_SOX + bool "sox" + help + SoX is a cross-platform (Windows, Linux, MacOS X, etc.) command line + utility that can convert various formats of computer audio files + into other formats. + It can also apply various effects to these sound files, and, as an + added bonus, SoX can play and record audio files on most platforms. + + http://sox.sourceforge.net/ diff --git a/package/sox/sox.hash b/package/sox/sox.hash new file mode 100644 index 0000000000..2f8069b69f --- /dev/null +++ b/package/sox/sox.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/sox/files/sox/14.4.2/ +md5 ba804bb1ce5c71dd484a102a5b27d0dd sox-14.4.2.tar.bz2 +sha1 dc9668256b9d81ef25d672f14f12ec026b0b4087 sox-14.4.2.tar.bz2 diff --git a/package/sox/sox.mk b/package/sox/sox.mk new file mode 100644 index 0000000000..61f5220189 --- /dev/null +++ b/package/sox/sox.mk @@ -0,0 +1,112 @@ +################################################################################ +# +# sox +# +################################################################################ + +SOX_VERSION = 14.4.2 +SOX_SITE = http://downloads.sourceforge.net/project/sox/sox/$(SOX_VERSION) +SOX_SOURCE = sox-$(SOX_VERSION).tar.bz2 +SOX_DEPENDENCIES = host-pkgconf +SOX_CONF_OPTS = --with-distro="Buildroot" --without-ffmpeg --disable-gomp \ + $(if $(BR2_TOOLCHAIN_HAS_SSP),,--disable-stack-protector) +SOX_LICENSE = GPLv2+ (sox binary), LGPLv2.1+ (libraries) +SOX_LICENSE_FILES = LICENSE.GPL LICENSE.LGPL + +# MIPS Codescape toolchains don't support stack-smashing protection +# despite of using glibc. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS)$(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y) +SOX_CONF_OPTS += --disable-stack-protector +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB_PCM),y) +SOX_DEPENDENCIES += alsa-lib +else +SOX_CONF_OPTS += --without-alsa +endif + +ifeq ($(BR2_PACKAGE_FILE),y) +SOX_DEPENDENCIES += file +else +SOX_CONF_OPTS += --without-magic +endif + +ifeq ($(BR2_PACKAGE_FLAC),y) +SOX_DEPENDENCIES += flac +else +SOX_CONF_OPTS += --without-flac +endif + +ifeq ($(BR2_PACKAGE_LAME),y) +SOX_DEPENDENCIES += lame +else +SOX_CONF_OPTS += --without-lame +endif + +ifeq ($(BR2_PACKAGE_LIBAO),y) +SOX_DEPENDENCIES += libao +else +SOX_CONF_OPTS += --without-ao +endif + +ifeq ($(BR2_PACKAGE_LIBID3TAG),y) +SOX_DEPENDENCIES += libid3tag +else +SOX_CONF_OPTS += --without-id3tag +endif + +ifeq ($(BR2_PACKAGE_LIBMAD),y) +SOX_DEPENDENCIES += libmad +else +SOX_CONF_OPTS += --without-mad +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +SOX_DEPENDENCIES += libpng +else +SOX_CONF_OPTS += --without-png +endif + +ifeq ($(BR2_PACKAGE_LIBSNDFILE),y) +SOX_DEPENDENCIES += libsndfile +else +SOX_CONF_OPTS += --without-sndfile +endif + +ifeq ($(BR2_PACKAGE_LIBVORBIS),y) +SOX_DEPENDENCIES += libvorbis +else +SOX_CONF_OPTS += --without-oggvorbis +endif + +ifeq ($(BR2_PACKAGE_OPENCORE_AMR),y) +SOX_DEPENDENCIES += opencore-amr +else +SOX_CONF_OPTS += --without-amrwb --without-amrnb +endif + +ifeq ($(BR2_PACKAGE_OPUSFILE),y) +SOX_DEPENDENCIES += opusfile +else +SOX_CONF_OPTS += --without-opus +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +SOX_DEPENDENCIES += pulseaudio +else +SOX_CONF_OPTS += --without-pulseaudio +endif + +ifeq ($(BR2_PACKAGE_TWOLAME),y) +SOX_DEPENDENCIES += twolame +else +SOX_CONF_OPTS += --without-twolame +endif + +ifeq ($(BR2_PACKAGE_WAVPACK),y) +SOX_DEPENDENCIES += wavpack +else +SOX_CONF_OPTS += --without-wavpack +endif + +$(eval $(autotools-package)) diff --git a/package/sp-oops-extract/0001-Make-the-Makefile-more-cross-compiler-friendly.patch b/package/sp-oops-extract/0001-Make-the-Makefile-more-cross-compiler-friendly.patch new file mode 100644 index 0000000000..67153c27bc --- /dev/null +++ b/package/sp-oops-extract/0001-Make-the-Makefile-more-cross-compiler-friendly.patch @@ -0,0 +1,22 @@ +Fetch from: https://github.com/Schischu/ptxdist_sh/tree/master/patches/sp-oops-extract-0.0.7 + +From: Bernhard Walle +Date: Wed, 21 Mar 2012 15:55:06 +0100 +Subject: [PATCH] Make the Makefile more cross-compiler friendly + +Signed-off-by: Bernhard Walle +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile b/src/Makefile +index cf5b550..e05eb1f 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -9,4 +9,4 @@ distclean: clean + $(RM) $(TARGETS) + + sp-oops-extract: oopslog.c +- gcc -Wall -s -o $@ $^ ++ $(CC) $(LDFLAGS) $(CPPFLAGS) $(CFLAGS) -Wall -o $@ $^ + diff --git a/package/sp-oops-extract/0002-stdint-cleanup.patch b/package/sp-oops-extract/0002-stdint-cleanup.patch new file mode 100644 index 0000000000..255fe8a8ce --- /dev/null +++ b/package/sp-oops-extract/0002-stdint-cleanup.patch @@ -0,0 +1,33 @@ +consolidate use of stdint types + +Change u_int*_t to uint*_t for compatibility with a larger number of C +libraries. + +Signed-off-by: Doug Kehn + +Index: sp-oops-extract-0.0.7-1/src/oopslog.c +=================================================================== +--- sp-oops-extract-0.0.7-1.orig/src/oopslog.c ++++ sp-oops-extract-0.0.7-1/src/oopslog.c +@@ -64,8 +64,8 @@ static int try_to_check_for_bad_blocks(v + + int main(const int argc, const char *argv[]) + { +- u_int32_t *count, maxcount = 0xffffffff; +- u_int32_t *magic_ptr, magic_value = 0x5d005d00; ++ uint32_t *count, maxcount = 0xffffffff; ++ uint32_t *magic_ptr, magic_value = 0x5d005d00; + + unsigned char *charbuf; + unsigned long size; +@@ -137,8 +137,8 @@ int main(const int argc, const char *arg + errx(-1, "%s is something weird", device); + + charbuf = buf; +- count = (u_int32_t *) buf; +- magic_ptr = (u_int32_t *) (buf + sizeof(u_int32_t)); ++ count = (uint32_t *) buf; ++ magic_ptr = (uint32_t *) (buf + sizeof(uint32_t)); + + for (i = 0; i < (size / OOPS_PAGE_SIZE); i++) { + pread(fd, buf, OOPS_PAGE_SIZE, i * OOPS_PAGE_SIZE); diff --git a/package/sp-oops-extract/Config.in b/package/sp-oops-extract/Config.in new file mode 100644 index 0000000000..d4e0252c89 --- /dev/null +++ b/package/sp-oops-extract/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_SP_OOPS_EXTRACT + bool "sp-oops-extract" + help + A tool for extracting OOPS/panic logs from MTD. + + http://maemo.org/packages/view/sp-oops-extract/ diff --git a/package/sp-oops-extract/sp-oops-extract.hash b/package/sp-oops-extract/sp-oops-extract.hash new file mode 100644 index 0000000000..835bfe8915 --- /dev/null +++ b/package/sp-oops-extract/sp-oops-extract.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 85601a569af1f4584db75fad21d3a70e377ce12d1bccad7dbe1112abd3b43d93 sp-oops-extract_0.0.7-1.tar.gz diff --git a/package/sp-oops-extract/sp-oops-extract.mk b/package/sp-oops-extract/sp-oops-extract.mk new file mode 100644 index 0000000000..991980713f --- /dev/null +++ b/package/sp-oops-extract/sp-oops-extract.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# sp-oops-extract +# +################################################################################ + +SP_OOPS_EXTRACT_VERSION = 0.0.7-1 +SP_OOPS_EXTRACT_SITE = http://repository.maemo.org/pool/maemo5.0/free/s/sp-oops-extract +SP_OOPS_EXTRACT_SOURCE = sp-oops-extract_$(SP_OOPS_EXTRACT_VERSION).tar.gz +SP_OOPS_EXTRACT_LICENSE = GPLv2 +SP_OOPS_EXTRACT_LICENSE_FILES = COPYING + +define SP_OOPS_EXTRACT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) +endef + +define SP_OOPS_EXTRACT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) install \ + DESTDIR=$(TARGET_DIR) +endef + +$(eval $(generic-package)) diff --git a/package/spawn-fcgi/Config.in b/package/spawn-fcgi/Config.in new file mode 100644 index 0000000000..59791e8d8e --- /dev/null +++ b/package/spawn-fcgi/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_SPAWN_FCGI + bool "spawn-fcgi" + depends on BR2_USE_MMU # fork() + help + FastCGI process spawner. + Project split from lighttpd. + + http://redmine.lighttpd.net/projects/spawn-fcgi diff --git a/package/spawn-fcgi/spawn-fcgi.hash b/package/spawn-fcgi/spawn-fcgi.hash new file mode 100644 index 0000000000..c1911e4e9f --- /dev/null +++ b/package/spawn-fcgi/spawn-fcgi.hash @@ -0,0 +1,2 @@ +# From http://redmine.lighttpd.net/news/9 +sha256 a3cfc7c9581b6ddc31084b379c9160323fa345d357ace6cd2d3d3af3593e2873 spawn-fcgi-1.6.4.tar.bz2 diff --git a/package/spawn-fcgi/spawn-fcgi.mk b/package/spawn-fcgi/spawn-fcgi.mk new file mode 100644 index 0000000000..13357bba3b --- /dev/null +++ b/package/spawn-fcgi/spawn-fcgi.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# spawn-fcgi +# +################################################################################ + +SPAWN_FCGI_VERSION = 1.6.4 +SPAWN_FCGI_SITE = http://www.lighttpd.net/download +SPAWN_FCGI_SOURCE = spawn-fcgi-$(SPAWN_FCGI_VERSION).tar.bz2 +SPAWN_FCGI_LICENSE = BSD-3c +SPAWN_FCGI_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/speex/0001-thumb2-support.patch b/package/speex/0001-thumb2-support.patch new file mode 100644 index 0000000000..b6f7369299 --- /dev/null +++ b/package/speex/0001-thumb2-support.patch @@ -0,0 +1,220 @@ +Make speex Thumb2 compatible + +Patch written by Michael Hope from Linaro, available at +http://lists.xiph.org/pipermail/speex-dev/2010-November/008041.html. + +Signed-off-by: Thomas Petazzoni + +diff --git a/libspeex/filters_arm4.h b/libspeex/filters_arm4.h +index 7a74042..6ec1f75 100644 +--- a/libspeex/filters_arm4.h ++++ b/libspeex/filters_arm4.h +@@ -47,8 +47,10 @@ int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int le + + "\tldr %4, [%0], #4 \n" + "\tcmps %4, %1 \n" ++ "\tit gt \n" + "\tmovgt %1, %4 \n" + "\tcmps %4, %3 \n" ++ "\tit lt \n" + "\tmovlt %3, %4 \n" + + "\tsubs %2, %2, #1 \n" +@@ -56,6 +58,7 @@ int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int le + + "\trsb %3, %3, #0 \n" + "\tcmp %1, %3 \n" ++ "\tit lt \n" + "\tmovlt %1, %3 \n" + : "=r" (dead1), "=r" (max_val), "=r" (dead3), "=r" (dead4), + "=r" (dead5), "=r" (dead6) +diff --git a/libspeex/fixed_arm4.h b/libspeex/fixed_arm4.h +index b6981ca..b6218ca 100644 +--- a/libspeex/fixed_arm4.h ++++ b/libspeex/fixed_arm4.h +@@ -69,72 +69,90 @@ static inline short DIV32_16(int a, int b) + __asm__ __volatile__ ( + "\teor %5, %0, %1\n" + "\tmovs %4, %0\n" ++ "\tit mi \n" + "\trsbmi %0, %0, #0 \n" + "\tmovs %4, %1\n" ++ "\tit mi \n" + "\trsbmi %1, %1, #0 \n" + "\tmov %4, #1\n" + + "\tsubs %3, %0, %1, asl #14 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #14 \n" + + "\tsubs %3, %0, %1, asl #13 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #13 \n" + + "\tsubs %3, %0, %1, asl #12 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #12 \n" + + "\tsubs %3, %0, %1, asl #11 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #11 \n" + + "\tsubs %3, %0, %1, asl #10 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #10 \n" + + "\tsubs %3, %0, %1, asl #9 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #9 \n" + + "\tsubs %3, %0, %1, asl #8 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #8 \n" + + "\tsubs %3, %0, %1, asl #7 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #7 \n" + + "\tsubs %3, %0, %1, asl #6 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #6 \n" + + "\tsubs %3, %0, %1, asl #5 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #5 \n" + + "\tsubs %3, %0, %1, asl #4 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #4 \n" + + "\tsubs %3, %0, %1, asl #3 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #3 \n" + + "\tsubs %3, %0, %1, asl #2 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #2 \n" + + "\tsubs %3, %0, %1, asl #1 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4, asl #1 \n" + + "\tsubs %3, %0, %1 \n" ++ "\titt pl \n" + "\tmovpl %0, %3 \n" + "\torrpl %2, %2, %4 \n" + + "\tmovs %5, %5, lsr #31 \n" ++ "\tit ne \n" + "\trsbne %2, %2, #0 \n" + : "=r" (dead1), "=r" (dead2), "=r" (res), + "=r" (dead3), "=r" (dead4), "=r" (dead5) +diff --git a/libspeex/fixed_arm5e.h b/libspeex/fixed_arm5e.h +index 9b4861c..bdadd02 100644 +--- a/libspeex/fixed_arm5e.h ++++ b/libspeex/fixed_arm5e.h +@@ -97,72 +97,90 @@ static inline short DIV32_16(int a, int b) + __asm__ __volatile__ ( + "\teor %5, %0, %1\n" + "\tmovs %4, %0\n" ++ "\tit mi \n" + "\trsbmi %0, %0, #0 \n" + "\tmovs %4, %1\n" ++ "\tit mi \n" + "\trsbmi %1, %1, #0 \n" + "\tmov %4, #1\n" + + "\tsubs %3, %0, %1, asl #14 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #14 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #13 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #13 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #12 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #12 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #11 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #11 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #10 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #10 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #9 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #9 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #8 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #8 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #7 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #7 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #6 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #6 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #5 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #5 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #4 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #4 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #3 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #3 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #2 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #2 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1, asl #1 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4, asl #1 \n" + "\tmovpl %0, %3 \n" + + "\tsubs %3, %0, %1 \n" ++ "\titt pl \n" + "\torrpl %2, %2, %4 \n" + "\tmovpl %0, %3 \n" + + "\tmovs %5, %5, lsr #31 \n" ++ "\tit ne \n" + "\trsbne %2, %2, #0 \n" + : "=r" (dead1), "=r" (dead2), "=r" (res), + "=r" (dead3), "=r" (dead4), "=r" (dead5) diff --git a/package/speex/Config.in b/package/speex/Config.in new file mode 100644 index 0000000000..f18e866f1b --- /dev/null +++ b/package/speex/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_SPEEX + bool "speex" + select BR2_PACKAGE_LIBOGG + help + Speex is an Open Source/Free Software patent-free + audio compression format designed for speech. + It can be used for Voice over IP + + http://www.speex.org/ + +if BR2_PACKAGE_SPEEX + +config BR2_PACKAGE_SPEEX_ARM4 + bool + default y + depends on BR2_ARM_CPU_ARMV4 + +config BR2_PACKAGE_SPEEX_ARM5E + default y + bool + depends on BR2_arm && !BR2_PACKAGE_SPEEX_ARM4 + +endif diff --git a/package/speex/speex.hash b/package/speex/speex.hash new file mode 100644 index 0000000000..c38a0a7b22 --- /dev/null +++ b/package/speex/speex.hash @@ -0,0 +1,2 @@ +# From http://downloads.xiph.org/releases/speex/SHA256SUMS.txt +sha256 342f30dc57bd4a6dad41398365baaa690429660b10d866b7d508e8f1179cb7a6 speex-1.2rc1.tar.gz diff --git a/package/speex/speex.mk b/package/speex/speex.mk new file mode 100644 index 0000000000..a34bfaca89 --- /dev/null +++ b/package/speex/speex.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# speex +# +################################################################################ + +SPEEX_VERSION = 1.2rc1 +SPEEX_SITE = http://downloads.us.xiph.org/releases/speex +SPEEX_LICENSE = BSD-3c +SPEEX_LICENSE_FILES = COPYING + +SPEEX_INSTALL_STAGING = YES +SPEEX_DEPENDENCIES = libogg +SPEEX_CONF_OPTS = \ + --with-ogg-libraries=$(STAGING_DIR)/usr/lib \ + --with-ogg-includes=$(STAGING_DIR)/usr/include \ + --enable-fixed-point + +ifeq ($(BR2_PACKAGE_SPEEX_ARM4),y) +SPEEX_CONF_OPTS += --enable-arm4-asm +endif + +ifeq ($(BR2_PACKAGE_SPEEX_ARM5E),y) +SPEEX_CONF_OPTS += --enable-arm5e-asm +endif + +define SPEEX_LIBTOOL_FIXUP + $(SED) 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' $(@D)/libtool + $(SED) 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' $(@D)/libtool +endef + +SPEEX_POST_CONFIGURE_HOOKS += SPEEX_LIBTOOL_FIXUP + +define SPEEX_BUILD_CMDS + $($(PKG)_MAKE_ENV) $(MAKE) $($(PKG)_MAKE_OPTS) -C $(@D)/$($(PKG)_SUBDIR) +endef + +$(eval $(autotools-package)) diff --git a/package/spi-tools/Config.in b/package/spi-tools/Config.in new file mode 100644 index 0000000000..8d2634444a --- /dev/null +++ b/package/spi-tools/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_SPI_TOOLS + bool "spi-tools" + help + This package contains some simple command line tools to help + using Linux spidev devices. + + https://github.com/cpb-/spi-tools diff --git a/package/spi-tools/spi-tools.hash b/package/spi-tools/spi-tools.hash new file mode 100644 index 0000000000..25c73814ba --- /dev/null +++ b/package/spi-tools/spi-tools.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 72a6c4a9d13011addc61bc3906543cd06f76f567270ae4b6ca4d0115fd6a9538 spi-tools-0.8.1.tar.gz diff --git a/package/spi-tools/spi-tools.mk b/package/spi-tools/spi-tools.mk new file mode 100644 index 0000000000..384ae41e68 --- /dev/null +++ b/package/spi-tools/spi-tools.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# spi-tools +# +################################################################################ + +SPI_TOOLS_VERSION = 0.8.1 +SPI_TOOLS_SITE = $(call github,cpb-,spi-tools,$(SPI_TOOLS_VERSION)) +# autoreconf must be run as specified in package documentation +SPI_TOOLS_AUTORECONF = YES +SPI_TOOLS_LICENSE = GPLv2 +SPI_TOOLS_LICENSE_FILES = LICENSE + +$(eval $(autotools-package)) diff --git a/package/spice-protocol/Config.in b/package/spice-protocol/Config.in new file mode 100644 index 0000000000..63b08aa090 --- /dev/null +++ b/package/spice-protocol/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_SPICE_PROTOCOL + bool "spice protocol" + help + The Spice project aims to provide a complete open source + solution for interaction with virtualized desktop devices. + The Spice project deals with both the virtualized devices + and the front-end. Interaction between front-end and + back-end is done using VD-Interfaces. + + This package implements the protocol-part of Spice. + + http://www.spice-space.org/ diff --git a/package/spice-protocol/spice-protocol.hash b/package/spice-protocol/spice-protocol.hash new file mode 100644 index 0000000000..c75c095cbf --- /dev/null +++ b/package/spice-protocol/spice-protocol.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 788f0d7195bec5b14371732b562eb55ca82712aab12273b0e87529fb30532efb spice-protocol-0.12.10.tar.bz2 diff --git a/package/spice-protocol/spice-protocol.mk b/package/spice-protocol/spice-protocol.mk new file mode 100644 index 0000000000..4e81e6cd7b --- /dev/null +++ b/package/spice-protocol/spice-protocol.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# spice-protocol +# +################################################################################ + +SPICE_PROTOCOL_VERSION = 0.12.10 +SPICE_PROTOCOL_SOURCE = spice-protocol-$(SPICE_PROTOCOL_VERSION).tar.bz2 +SPICE_PROTOCOL_SITE = http://www.spice-space.org/download/releases +SPICE_PROTOCOL_LICENSE = BSD-3c +SPICE_PROTOCOL_LICENSE_FILES = COPYING +SPICE_PROTOCOL_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/spice/0001-fix-missing-monitor_latency-argument.patch b/package/spice/0001-fix-missing-monitor_latency-argument.patch new file mode 100644 index 0000000000..e14dd2ce37 --- /dev/null +++ b/package/spice/0001-fix-missing-monitor_latency-argument.patch @@ -0,0 +1,28 @@ +From 0d3767853ca179ce04a9b312d7a30d33d1266a3b Mon Sep 17 00:00:00 2001 +From: Axel Lin +Date: Thu, 10 Oct 2013 12:36:40 +0800 +Subject: [PATCH] red_tunnel_worker: Fix build error due to missing monitor_latency argument + +Fix missing monitor_latency argument in red_channel_client_create call. + +Signed-off-by: Axel Lin +--- + server/red_tunnel_worker.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/server/red_tunnel_worker.c b/server/red_tunnel_worker.c +index 97dcafd..6781d73 100644 +--- a/server/red_tunnel_worker.c ++++ b/server/red_tunnel_worker.c +@@ -3417,7 +3417,7 @@ static void handle_tunnel_channel_link(RedChannel *channel, RedClient *client, + } + + tcc = (TunnelChannelClient*)red_channel_client_create(sizeof(TunnelChannelClient), +- channel, client, stream, ++ channel, client, stream, FALSE, + 0, NULL, 0, NULL); + if (!tcc) { + return; +-- +1.8.1.2 + diff --git a/package/spice/Config.in b/package/spice/Config.in new file mode 100644 index 0000000000..bde3a92859 --- /dev/null +++ b/package/spice/Config.in @@ -0,0 +1,70 @@ +comment "spice server needs a toolchain w/ wchar, threads" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + +comment "spice server depends on python (for pyparsing)" + depends on BR2_i386 || BR2_x86_64 + depends on !BR2_PACKAGE_PYTHON + +config BR2_PACKAGE_SPICE + bool "spice server" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_PACKAGE_PYTHON + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_CELT051 + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_PYTHON_PYPARSING + select BR2_PACKAGE_SPICE_PROTOCOL + help + The Spice project aims to provide a complete open source + solution for interaction with virtualized desktop devices. + The Spice project deals with both the virtualized devices + and the front-end. Interaction between front-end and + back-end is done using VD-Interfaces. + + This package implements the server-part of Spice. + + http://www.spice-space.org/ + +if BR2_PACKAGE_SPICE + +comment "client depends on X.org" + depends on !BR2_PACKAGE_XORG7 + +config BR2_PACKAGE_SPICE_CLIENT + bool "Enable client" + depends on BR2_PACKAGE_XORG7 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXRANDR + +comment "client needs a toolchain w/ threads, C++" + depends on BR2_PACKAGE_XORG7 + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_SPICE_GUI + bool "Enable GUI" + depends on BR2_PACKAGE_SPICE_CLIENT + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_CEGUI06 + help + Say 'y' here to enable the Graphical User Interface (GUI) + start dialog. + +comment "gui needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_SPICE_TUNNEL + bool "Enable network redirection" + select BR2_PACKAGE_SLIRP + help + Say 'y' here to enable network redirection, aka tunnelling + through a SLIP/SLIRP session. + +endif # BR2_PACKAGE_SPICE diff --git a/package/spice/spice.hash b/package/spice/spice.hash new file mode 100644 index 0000000000..c4d63198fb --- /dev/null +++ b/package/spice/spice.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 cf063e7df42e331a835529d2f613d8a01f8cb2963e8edaadf73a8d65c46fb387 spice-0.12.4.tar.bz2 diff --git a/package/spice/spice.mk b/package/spice/spice.mk new file mode 100644 index 0000000000..61a977225e --- /dev/null +++ b/package/spice/spice.mk @@ -0,0 +1,81 @@ +################################################################################ +# +# spice +# +################################################################################ + +SPICE_VERSION = 0.12.4 +SPICE_SOURCE = spice-$(SPICE_VERSION).tar.bz2 +SPICE_SITE = http://www.spice-space.org/download/releases +SPICE_LICENSE = LGPLv2.1+ +SPICE_LICENSE_FILES = COPYING +SPICE_INSTALL_STAGING = YES +SPICE_DEPENDENCIES = \ + alsa-lib \ + celt051 \ + jpeg \ + libglib2 \ + openssl \ + pixman \ + python-pyparsing \ + spice-protocol \ + +# We disable everything for now, because the dependency tree can become +# quite deep if we try to enable some features, and I have not tested that. +SPICE_CONF_OPTS = \ + --disable-opengl \ + --disable-smartcard \ + --disable-automated-tests \ + --without-sasl \ + +SPICE_DEPENDENCIES += host-pkgconf + +ifeq ($(BR2_PACKAGE_SPICE_CLIENT),y) +SPICE_CONF_OPTS += --enable-client +SPICE_DEPENDENCIES += xlib_libXfixes xlib_libXrandr +else +SPICE_CONF_OPTS += --disable-client +endif + +ifeq ($(BR2_PACKAGE_SPICE_GUI),y) +SPICE_CONF_OPTS += --enable-gui +SPICE_DEPENDENCIES += cegui06 +else +SPICE_CONF_OPTS += --disable-gui +endif + +ifeq ($(BR2_PACKAGE_SPICE_TUNNEL),y) +SPICE_CONF_OPTS += --enable-tunnel +SPICE_DEPENDENCIES += slirp +else +SPICE_CONF_OPTS += --disable-tunnel +endif + +SPICE_CONF_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages +SPICE_MAKE_ENV = PYTHONPATH=$(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages + +# We need to tweak spice.pc because it /forgets/ (for static linking) that +# it should link against libz and libjpeg. libz is pkg-config-aware, while +# libjpeg isn't, hence the two-line tweak +define SPICE_POST_INSTALL_STAGING_FIX_PC + $(SED) 's/^\(Requires.private:.*\)$$/\1 zlib/; s/^\(Libs.private:.*\)$$/\1 -ljpeg/;' \ + "$(STAGING_DIR)/usr/lib/pkgconfig/spice-server.pc" +endef +SPICE_POST_INSTALL_STAGING_HOOKS += SPICE_POST_INSTALL_STAGING_FIX_PC + +# It is currently not possible to detect if stack-protection is available +# or not, because it requires support from both the compiler *and* the +# C library, but the C library (eg. uClibc) can be compiled without that +# support, even if gcc accepts the -fstack-protector-all option. +# spice's ./configure only checks for gcc's -fstack-protector-all option, +# so it misses the case where the C library doe not provide the requires +# support. +# A correct fix would be to fix spice's ./configure to also check the C +# library, but it might be much more involved. +# So, we simply disable it for now. After all, as uClibc's help puts it: +# Note that NOEXECSTACK on a kernel with address space randomization +# is generally sufficient to prevent most buffer overflow exploits +# without increasing code size. +SPICE_CONF_OPTS += gl_cv_warn__fstack_protector_all=no + +$(eval $(autotools-package)) diff --git a/package/spidev_test/Config.in b/package/spidev_test/Config.in new file mode 100644 index 0000000000..0d8214cc29 --- /dev/null +++ b/package/spidev_test/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_SPIDEV_TEST + bool "spidev_test" + help + SPI testing utility (using spidev driver). + + This package builds and installs the userspace 'spidev_test' + command. It is up to the user to ensure that the kernel + configuration has all suitable options enabled to allow a + proper operation of 'spidev_test'. + + The version used is based on your toolchain headers version, + if it's older than 3.15 then 3.0 is used, otherwise 3.15 + is used. + This means you won't have quad-pumped SPI support if your + toolchain is too old. + + https://www.kernel.org/doc/Documentation/spi/spidev_test.c diff --git a/package/spidev_test/spidev_test.hash b/package/spidev_test/spidev_test.hash new file mode 100644 index 0000000000..6871288ccc --- /dev/null +++ b/package/spidev_test/spidev_test.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 80471c330d8c0bf5ba6479c434a54a54bdd2dc59a703b9c76c2541ec04cfb8c3 spidev_test.c?id=v3.0 +sha256 57fa6c534e0b7b4d234075e18bc89e2f3c9fc4ecc27e80f349a8057708e0de46 spidev_test.c?id=v3.15 diff --git a/package/spidev_test/spidev_test.mk b/package/spidev_test/spidev_test.mk new file mode 100644 index 0000000000..646372f2f5 --- /dev/null +++ b/package/spidev_test/spidev_test.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# spidev_test +# +################################################################################ + +# v3.15+ requires SPI_TX_QUAD/SPI_RX_QUAD to build +# Normally kernel headers can't be newer than kernel so switch based on that. +# If you need quad-pumped spi support you need to upgrade your toolchain. +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15),y) +SPIDEV_TEST_VERSION = v3.15 +else +SPIDEV_TEST_VERSION = v3.0 +endif +SPIDEV_TEST_SITE = http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/spi +SPIDEV_TEST_SOURCE = spidev_test.c?id=$(SPIDEV_TEST_VERSION) +SPIDEV_TEST_LICENSE = GPLv2 + +define SPIDEV_TEST_EXTRACT_CMDS + cp $(BR2_DL_DIR)/$(SPIDEV_TEST_SOURCE) $(@D)/spidev_test.c +endef + +define SPIDEV_TEST_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CC) $(TARGET_CFLAGS) \ + -o $(@D)/spidev_test $(@D)/spidev_test.c +endef + +define SPIDEV_TEST_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/spidev_test \ + $(TARGET_DIR)/usr/sbin/spidev_test +endef + +$(eval $(generic-package)) diff --git a/package/sqlcipher/Config.in b/package/sqlcipher/Config.in new file mode 100644 index 0000000000..98b2f8955d --- /dev/null +++ b/package/sqlcipher/Config.in @@ -0,0 +1,36 @@ +config BR2_PACKAGE_SQLCIPHER + bool "sqlcipher" + depends on !BR2_PACKAGE_SQLITE + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_OPENSSL + help + SQLCipher is an SQLite extension that provides 256 bits AES + encryption of database files. Note that it is a fork of SQLite + and they cannot be installed side-by-side. + + http://sqlcipher.net + +if BR2_PACKAGE_SQLCIPHER + +config BR2_PACKAGE_SQLCIPHER_READLINE + bool "Command-line editing" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_READLINE + help + Enable command-line editing. This requires ncurses and readline. + +config BR2_PACKAGE_SQLCIPHER_STAT3 + bool "Additional query optimizations (stat3)" + help + Adds additional logic to the ANALYZE command and to the query + planner that can help SQLite to choose a better query plan under + certain situations. + +endif + +comment "sqlcipher conflicts with sqlite" + depends on BR2_PACKAGE_SQLITE + +comment "sqlcipher needs a toolchain w/ threads" + depends on !BR2_PACKAGE_SQLITE + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/sqlcipher/sqlcipher.mk b/package/sqlcipher/sqlcipher.mk new file mode 100644 index 0000000000..196f16275b --- /dev/null +++ b/package/sqlcipher/sqlcipher.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# sqlcipher +# +################################################################################ + +SQLCIPHER_VERSION = v3.2.0 +SQLCIPHER_SITE = $(call github,sqlcipher,sqlcipher,$(SQLCIPHER_VERSION)) +SQLCIPHER_DEPENDENCIES = openssl host-tcl +SQLCIPHER_INSTALL_STAGING = YES + +SQLCIPHER_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) $(SQLCIPHER_CFLAGS)" \ + TCLSH_CMD=$(HOST_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR) + +SQLCIPHER_CONF_OPTS = \ + --enable-threadsafe \ + --disable-tcl + +SQLCIPHER_CFLAGS += -DSQLITE_HAS_CODEC # Required according to the README +SQLCIPHER_CONF_ENV += LIBS="-lcrypto -lz" + +ifeq ($(BR2_PACKAGE_SQLCIPHER_STAT3),y) +SQLCIPHER_CFLAGS += -DSQLITE_ENABLE_STAT3 +endif + +ifeq ($(BR2_PACKAGE_SQLCIPHER_READLINE),y) +SQLCIPHER_DEPENDENCIES += ncurses readline +SQLCIPHER_CONF_OPTS += --with-readline-inc="-I$(STAGING_DIR)/usr/include" +else +SQLCIPHER_CONF_OPTS += --disable-readline +endif + +$(eval $(autotools-package)) diff --git a/package/sqlite/Config.in b/package/sqlite/Config.in new file mode 100644 index 0000000000..c9fde53b36 --- /dev/null +++ b/package/sqlite/Config.in @@ -0,0 +1,58 @@ +config BR2_PACKAGE_SQLITE + bool "sqlite" + help + SQLite is a small C library that implements a self-contained, + embeddable, zero-configuration SQL database engine. + + http://www.sqlite.org/ + +if BR2_PACKAGE_SQLITE + +config BR2_PACKAGE_SQLITE_STAT3 + bool "Additional query optimizations (stat3)" + help + Adds additional logic to the ANALYZE command and to the query + planner that can help SQLite to choose a better query plan under + certain situations. + +config BR2_PACKAGE_SQLITE_ENABLE_FTS3 + bool "Enable version 3 of the full-text search engine" + help + When this option is defined in the amalgamation + (see http://www.sqlite.org/amalgamation.html), version 3 of + the full-text search engine is added to the build automatically. + +config BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY + bool "Enable sqlite3_unlock_notify() interface" + help + This option enables the sqlite3_unlock_notify() interface and its + accosiated functionality. See the documentation + http://www.sqlite.org/unlock_notify.html for additional information. + +config BR2_PACKAGE_SQLITE_SECURE_DELETE + bool "Set the secure_delete pragma on by default" + help + This compile-time option changes the default settings of the + secure_delete pragma. When this option is not used, secure_delete + defaults to off. When this option is present, secure_delete defaults + to on. + + The secure_delete setting causes deleted content to be overwritten + with zeros. There is a small performance penalty for this since + additional I/O must occur. On the other hand, secure_delete can + prevent sensitive information from lingering in unused parts + of the database file after it has allegedly been deleted. + See the documentation on the + http://www.sqlite.org/pragma.html#pragma_secure_delete + for additional information. + +config BR2_PACKAGE_SQLITE_NO_SYNC + bool "Disable fsync" + help + By default SQLite forces all database transactions to storage + immediately using fsync() to protect against data loss in case + of power failure. + This option turns this behavior off resulting in higher performance + especially when using slow flash storage. + +endif diff --git a/package/sqlite/sqlite.hash b/package/sqlite/sqlite.hash new file mode 100644 index 0000000000..a005cb11a4 --- /dev/null +++ b/package/sqlite/sqlite.hash @@ -0,0 +1,4 @@ +# From http://www.sqlite.org/download.html +sha1 b43c2e7238e54c50b95fbbd85c48792f4f39af8c sqlite-autoconf-3120200.tar.gz +# Calculated based on the hash above +sha256 fd00770c9afd39db555c78400e52f55e8bd6568c78be23561abb472a22d09abb sqlite-autoconf-3120200.tar.gz diff --git a/package/sqlite/sqlite.mk b/package/sqlite/sqlite.mk new file mode 100644 index 0000000000..2f9b6ce760 --- /dev/null +++ b/package/sqlite/sqlite.mk @@ -0,0 +1,59 @@ +################################################################################ +# +# sqlite +# +################################################################################ + +SQLITE_VERSION = 3120200 +SQLITE_SOURCE = sqlite-autoconf-$(SQLITE_VERSION).tar.gz +SQLITE_SITE = http://www.sqlite.org/2016 +SQLITE_LICENSE = Public domain +SQLITE_LICENSE_FILES = tea/license.terms +SQLITE_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_SQLITE_STAT3),y) +SQLITE_CFLAGS += -DSQLITE_ENABLE_STAT3 +endif + +ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_FTS3),y) +SQLITE_CFLAGS += -DSQLITE_ENABLE_FTS3 +endif + +ifeq ($(BR2_PACKAGE_SQLITE_ENABLE_UNLOCK_NOTIFY),y) +SQLITE_CFLAGS += -DSQLITE_ENABLE_UNLOCK_NOTIFY +endif + +ifeq ($(BR2_PACKAGE_SQLITE_SECURE_DELETE),y) +SQLITE_CFLAGS += -DSQLITE_SECURE_DELETE +endif + +ifeq ($(BR2_PACKAGE_SQLITE_NO_SYNC),y) +SQLITE_CFLAGS += -DSQLITE_NO_SYNC +endif + +SQLITE_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) $(SQLITE_CFLAGS)" + +ifeq ($(BR2_STATIC_LIBS),y) +SQLITE_CONF_OPTS += --enable-dynamic-extensions=no +else +SQLITE_CONF_OPTS += --disable-static-shell +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +SQLITE_CONF_OPTS += --enable-threadsafe +else +SQLITE_CONF_OPTS += --disable-threadsafe +endif + +ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_READLINE),yy) +SQLITE_DEPENDENCIES += ncurses readline +SQLITE_CONF_OPTS += --disable-editline --enable-readline +else ifeq ($(BR2_PACKAGE_LIBEDIT),y) +SQLITE_DEPENDENCIES += libedit +SQLITE_CONF_OPTS += --enable-editline --disable-readline +else +SQLITE_CONF_OPTS += --disable-editline --disable-readline +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/squashfs/0001-musl.patch b/package/squashfs/0001-musl.patch new file mode 100644 index 0000000000..891b1717a2 --- /dev/null +++ b/package/squashfs/0001-musl.patch @@ -0,0 +1,71 @@ +Fix musl build + +Downloaded from +http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/squashfs-tools/squashfs-tools/fix-compat.patch +and adjusted paths. + +Signed-off-by: Bernd Kuhls + +Define FNM_EXTMATCH if not defined its glibc specific define +include missing sys/stat.h for stat* function declarations + +Upstream-Status: Pending +Signed-off-by: Khem Raj + +Index: squashfs-tools/action.c +=================================================================== +--- a/squashfs-tools.orig/action.c ++++ b/squashfs-tools/action.c +@@ -44,6 +44,10 @@ + #include "action.h" + #include "error.h" + ++#if !defined(FNM_EXTMATCH) ++#define FNM_EXTMATCH 0 ++#endif ++ + /* + * code to parse actions + */ +Index: squashfs-tools/mksquashfs.c +=================================================================== +--- a/squashfs-tools.orig/mksquashfs.c ++++ b/squashfs-tools/mksquashfs.c +@@ -1286,6 +1286,10 @@ void write_dir(squashfs_inode *inode, st + dir_size + 3, directory_block, directory_offset, NULL, NULL, + dir, 0); + ++#if !defined(FNM_EXTMATCH) ++#define FNM_EXTMATCH 0 ++#endif ++ + #ifdef SQUASHFS_TRACE + { + unsigned char *dirp; +Index: squashfs-tools/pseudo.c +=================================================================== +--- a/squashfs-tools.orig/pseudo.c ++++ b/squashfs-tools/pseudo.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + #include + + #include "pseudo.h" +Index: squashfs-tools/unsquashfs.c +=================================================================== +--- a/squashfs-tools.orig/unsquashfs.c ++++ b/squashfs-tools/unsquashfs.c +@@ -38,6 +38,10 @@ + #include + #include + ++#ifndef FNM_EXTMATCH ++#define FNM_EXTMATCH 0 ++#endif ++ + struct cache *fragment_cache, *data_cache; + struct queue *to_reader, *to_inflate, *to_writer, *from_writer; + pthread_t *thread, *inflator_thread; diff --git a/package/squashfs/Config.in b/package/squashfs/Config.in new file mode 100644 index 0000000000..70c0fc9808 --- /dev/null +++ b/package/squashfs/Config.in @@ -0,0 +1,48 @@ +config BR2_PACKAGE_SQUASHFS + bool "squashfs" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_SQUASHFS_GZIP if !(BR2_PACKAGE_SQUASHFS_LZMA || BR2_PACKAGE_SQUASHFS_LZO) + help + Tools to generate SquashFS filesystems. + + http://squashfs.sourceforge.net/ + +if BR2_PACKAGE_SQUASHFS + +config BR2_PACKAGE_SQUASHFS_GZIP + bool "gzip support" + default y + select BR2_PACKAGE_ZLIB + help + Support GZIP compression algorithm + +config BR2_PACKAGE_SQUASHFS_LZ4 + bool "lz4 support" + select BR2_PACKAGE_LZ4 + help + Support LZ4 compression algorithm + +config BR2_PACKAGE_SQUASHFS_LZMA + bool "lzma support" + select BR2_PACKAGE_XZ + help + Support LZMA compression algorithm + +config BR2_PACKAGE_SQUASHFS_LZO + bool "lzo support" + select BR2_PACKAGE_LZO + help + Support LZO compression algorithm + +config BR2_PACKAGE_SQUASHFS_XZ + bool "xz support" + select BR2_PACKAGE_XZ + help + Support XZ compression algorithm + +endif + +comment "squashfs needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/squashfs/Config.in.host b/package/squashfs/Config.in.host new file mode 100644 index 0000000000..b353374dd0 --- /dev/null +++ b/package/squashfs/Config.in.host @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HOST_SQUASHFS + bool "host squashfs" + help + Tools to generate SquashFS filesystems. + + http://squashfs.sourceforge.net/ diff --git a/package/squashfs/squashfs.hash b/package/squashfs/squashfs.hash new file mode 100644 index 0000000000..e308089b99 --- /dev/null +++ b/package/squashfs/squashfs.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 0d605512437b1eb800b4736791559295ee5f60177e102e4d4ccd0ee241a5f3f6 squashfs4.3.tar.gz diff --git a/package/squashfs/squashfs.mk b/package/squashfs/squashfs.mk new file mode 100644 index 0000000000..cdeb9c8f72 --- /dev/null +++ b/package/squashfs/squashfs.mk @@ -0,0 +1,88 @@ +################################################################################ +# +# squashfs +# +################################################################################ + +SQUASHFS_VERSION = 4.3 +SQUASHFS_SOURCE = squashfs$(SQUASHFS_VERSION).tar.gz +SQUASHFS_SITE = http://downloads.sourceforge.net/project/squashfs/squashfs/squashfs$(SQUASHFS_VERSION) +SQUASHFS_LICENSE = GPLv2+ +SQUASHFS_LICENSE_FILES = COPYING +SQUASHFS_MAKE_ARGS = XATTR_SUPPORT=1 + +ifeq ($(BR2_PACKAGE_SQUASHFS_LZ4),y) +SQUASHFS_DEPENDENCIES += lz4 +SQUASHFS_MAKE_ARGS += LZ4_SUPPORT=1 COMP_DEFAULT=lz4 +else +SQUASHFS_MAKE_ARGS += LZ4_SUPPORT=0 +endif + +ifeq ($(BR2_PACKAGE_SQUASHFS_LZMA),y) +SQUASHFS_DEPENDENCIES += xz +SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=1 COMP_DEFAULT=lzma +else +SQUASHFS_MAKE_ARGS += LZMA_XZ_SUPPORT=0 +endif + +ifeq ($(BR2_PACKAGE_SQUASHFS_XZ),y) +SQUASHFS_DEPENDENCIES += xz +SQUASHFS_MAKE_ARGS += XZ_SUPPORT=1 COMP_DEFAULT=xz +else +SQUASHFS_MAKE_ARGS += XZ_SUPPORT=0 +endif + +ifeq ($(BR2_PACKAGE_SQUASHFS_LZO),y) +SQUASHFS_DEPENDENCIES += lzo +SQUASHFS_MAKE_ARGS += LZO_SUPPORT=1 COMP_DEFAULT=lzo +else +SQUASHFS_MAKE_ARGS += LZO_SUPPORT=0 +endif + +ifeq ($(BR2_PACKAGE_SQUASHFS_GZIP),y) +SQUASHFS_DEPENDENCIES += zlib +SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=1 COMP_DEFAULT=gzip +else +SQUASHFS_MAKE_ARGS += GZIP_SUPPORT=0 +endif + +HOST_SQUASHFS_DEPENDENCIES = host-zlib host-lz4 host-lzo host-xz + +HOST_SQUASHFS_MAKE_ARGS = \ + XATTR_SUPPORT=1 \ + XZ_SUPPORT=1 \ + GZIP_SUPPORT=1 \ + LZ4_SUPPORT=1 \ + LZO_SUPPORT=1 \ + LZMA_XZ_SUPPORT=1 + +define SQUASHFS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) \ + CC="$(TARGET_CC)" \ + EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ + EXTRA_LDFLAGS="$(TARGET_LDFLAGS)" \ + $(SQUASHFS_MAKE_ARGS) \ + -C $(@D)/squashfs-tools/ +endef + +define SQUASHFS_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(SQUASHFS_MAKE_ARGS) \ + -C $(@D)/squashfs-tools/ INSTALL_DIR=$(TARGET_DIR)/usr/bin install +endef + +define HOST_SQUASHFS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) \ + CC="$(HOSTCC)" \ + EXTRA_CFLAGS="$(HOST_CFLAGS)" \ + EXTRA_LDFLAGS="$(HOST_LDFLAGS)" \ + $(HOST_SQUASHFS_MAKE_ARGS) \ + -C $(@D)/squashfs-tools/ +endef + +define HOST_SQUASHFS_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_SQUASHFS_MAKE_ARGS) \ + -C $(@D)/squashfs-tools/ INSTALL_DIR=$(HOST_DIR)/usr/bin install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/squeezelite/0001-Makefile-allow-passing-CFLAGS-and-LDFLAGS.patch b/package/squeezelite/0001-Makefile-allow-passing-CFLAGS-and-LDFLAGS.patch new file mode 100644 index 0000000000..2f002a80bc --- /dev/null +++ b/package/squeezelite/0001-Makefile-allow-passing-CFLAGS-and-LDFLAGS.patch @@ -0,0 +1,54 @@ +From a0f2e79d1373967dac9f3df4c500a71cd1b96b2b Mon Sep 17 00:00:00 2001 +From: Hiroshi Kawashima +Date: Sun, 7 Feb 2016 18:04:53 +0100 +Subject: [PATCH] Makefile: allow passing CFLAGS and LDFLAGS + +This patch is applied to squeezelite Makefile to add override +directive for CFLAGS and LDFLAGS assignment. +This enables adding flags to CFLAGS and LDFLAGS in Makefile. + +Signed-off-by: Hiroshi Kawashima +--- + Makefile | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/Makefile b/Makefile +index dca2abd..286c725 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,4 +1,6 @@ + # Cross compile support - create a Makefile which defines these three variables and then includes this Makefile... ++override CFLAGS += $(OPTS) ++override LDFLAGS += -lasound -lpthread -lm -lrt + CFLAGS ?= -Wall -fPIC -O2 $(OPTS) + LDFLAGS ?= -lasound -lpthread -lm -lrt + EXECUTABLE ?= squeezelite +@@ -52,20 +54,20 @@ endif + + # add optional link options + ifneq (,$(findstring $(OPT_LINKALL), $(CFLAGS))) +- LDFLAGS += $(LINKALL) ++ override LDFLAGS += $(LINKALL) + ifneq (,$(findstring $(OPT_FF), $(CFLAGS))) +- LDFLAGS += $(LINKALL_FF) ++ override LDFLAGS += $(LINKALL_FF) + endif + ifneq (,$(findstring $(OPT_RESAMPLE), $(CFLAGS))) +- LDFLAGS += $(LINKALL_RESAMPLE) ++ override LDFLAGS += $(LINKALL_RESAMPLE) + endif + ifneq (,$(findstring $(OPT_IR), $(CFLAGS))) +- LDFLAGS += $(LINKALL_IR) ++ override LDFLAGS += $(LINKALL_IR) + endif + else + # if not LINKALL and linux add LINK_LINUX + ifeq ($(UNAME), Linux) +- LDFLAGS += $(LINK_LINUX) ++ override LDFLAGS += $(LINK_LINUX) + endif + endif + +-- +2.6.4 + diff --git a/package/squeezelite/0002-output_alsa-use-mallopt-only-on-glibc.patch b/package/squeezelite/0002-output_alsa-use-mallopt-only-on-glibc.patch new file mode 100644 index 0000000000..6962b7b8fd --- /dev/null +++ b/package/squeezelite/0002-output_alsa-use-mallopt-only-on-glibc.patch @@ -0,0 +1,34 @@ +From 903922a7bcf06e04d9830b47bba6d65ed37304c1 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 7 Feb 2016 18:05:56 +0100 +Subject: [PATCH] output_alsa: use mallopt() only on glibc + +The musl C library does not provide the glibc specific mallopt() +functionality, so use it only when __GLIBC__ is defined. + +uClibc pretends to be glibc by defining __GLIBC__, but it implements +mallopt(), so it works fine. + +Signed-off-by: Thomas Petazzoni +--- + output_alsa.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/output_alsa.c b/output_alsa.c +index aa01560..44c9fc7 100644 +--- a/output_alsa.c ++++ b/output_alsa.c +@@ -862,8 +862,10 @@ void output_init_alsa(log_level level, const char *device, unsigned output_buf_s + LOG_INFO("memory locked"); + } + ++#ifdef __GLIBC__ + mallopt(M_TRIM_THRESHOLD, -1); + mallopt(M_MMAP_MAX, 0); ++#endif + + touch_memory(silencebuf, MAX_SILENCE_FRAMES * BYTES_PER_FRAME); + touch_memory(outputbuf->buf, outputbuf->size); +-- +2.6.4 + diff --git a/package/squeezelite/0003-ffmpeg_2_9.patch b/package/squeezelite/0003-ffmpeg_2_9.patch new file mode 100644 index 0000000000..f69b829b38 --- /dev/null +++ b/package/squeezelite/0003-ffmpeg_2_9.patch @@ -0,0 +1,57 @@ +Fix compilation with ffmpeg >= 2.9 + +Downloaded from Debian: +https://sources.debian.net/src/squeezelite/1.8-3/debian/patches/ffmpeg_2.9.patch/ + +Signed-off-by: Bernd Kuhls + + +Description: Replace deprecated FFmpeg API +Author: Andreas Cadhalpun +Last-Update: <2015-11-02> + +--- squeezelite-1.8.orig/ffmpeg.c ++++ squeezelite-1.8/ffmpeg.c +@@ -52,8 +52,8 @@ struct ff_s { + unsigned (* avcodec_version)(void); + AVCodec * (* avcodec_find_decoder)(int); + int attribute_align_arg (* avcodec_open2)(AVCodecContext *, const AVCodec *, AVDictionary **); +- AVFrame * (* avcodec_alloc_frame)(void); +- void (* avcodec_free_frame)(AVFrame **); ++ AVFrame * (* av_frame_alloc)(void); ++ void (* av_frame_free)(AVFrame **); + int attribute_align_arg (* avcodec_decode_audio4)(AVCodecContext *, AVFrame *, int *, const AVPacket *); + // ffmpeg symbols to be dynamically loaded from libavformat + unsigned (* avformat_version)(void); +@@ -324,7 +324,7 @@ static decode_state ff_decode(void) { + + AVCODEC(ff, open2, ff->codecC, codec, NULL); + +- ff->frame = AVCODEC(ff, alloc_frame); ++ ff->frame = AV(ff, frame_alloc); + + ff->avpkt = AV(ff, malloc, sizeof(AVPacket)); + if (ff->avpkt == NULL) { +@@ -520,9 +520,9 @@ static void _free_ff_data(void) { + if (ff->frame) { + // ffmpeg version dependant free function + #if !LINKALL +- ff->avcodec_free_frame ? AVCODEC(ff, free_frame, &ff->frame) : AV(ff, freep, &ff->frame); ++ ff->av_frame_free ? AV(ff, frame_free, &ff->frame) : AV(ff, freep, &ff->frame); + #elif LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54,28,0) +- AVCODEC(ff, free_frame, &ff->frame); ++ AV(ff, frame_free, &ff->frame); + #else + AV(ff, freep, &ff->frame); + #endif +@@ -607,8 +607,8 @@ static bool load_ff() { + ff->avcodec_version = dlsym(handle_codec, "avcodec_version"); + ff->avcodec_find_decoder = dlsym(handle_codec, "avcodec_find_decoder"); + ff->avcodec_open2 = dlsym(handle_codec, "avcodec_open2"); +- ff->avcodec_alloc_frame = dlsym(handle_codec, "avcodec_alloc_frame"); +- ff->avcodec_free_frame = dlsym(handle_codec, "avcodec_free_frame"); ++ ff->av_frame_alloc = dlsym(handle_codec, "av_frame_alloc"); ++ ff->av_frame_free = dlsym(handle_codec, "av_frame_free"); + ff->avcodec_decode_audio4 = dlsym(handle_codec, "avcodec_decode_audio4"); + ff->av_init_packet = dlsym(handle_codec, "av_init_packet"); + ff->av_free_packet = dlsym(handle_codec, "av_free_packet"); diff --git a/package/squeezelite/Config.in b/package/squeezelite/Config.in new file mode 100644 index 0000000000..79d2947497 --- /dev/null +++ b/package/squeezelite/Config.in @@ -0,0 +1,42 @@ +config BR2_PACKAGE_SQUEEZELITE + bool "squeezelite" + depends on BR2_USE_WCHAR # flac + depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib + depends on BR2_USE_MMU # mpg123 + depends on !BR2_STATIC_LIBS # dlopen + select BR2_PACKAGE_ALSA_LIB + select BR2_PACKAGE_ALSA_LIB_MIXER + select BR2_PACKAGE_FLAC + select BR2_PACKAGE_LIBMAD + select BR2_PACKAGE_LIBVORBIS + select BR2_PACKAGE_FAAD2 + select BR2_PACKAGE_MPG123 + help + Logitech Media Server client + + https://code.google.com/p/squeezelite/ + +if BR2_PACKAGE_SQUEEZELITE + +config BR2_PACKAGE_SQUEEZELITE_FFMPEG + bool "Enable WMA and ALAC decoding" + default y + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + select BR2_PACKAGE_FFMPEG + +config BR2_PACKAGE_SQUEEZELITE_DSD + bool "Enable DSD decoding" + +config BR2_PACKAGE_SQUEEZELITE_RESAMPLE + bool "Enable resampling support" + select BR2_PACKAGE_LIBSOXR + +config BR2_PACKAGE_SQUEEZELITE_VISEXPORT + bool "Enable visualiser support" + +endif + +comment "squeezelite needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS \ + || BR2_STATIC_LIBS diff --git a/package/squeezelite/squeezelite.hash b/package/squeezelite/squeezelite.hash new file mode 100644 index 0000000000..1dbb4c155a --- /dev/null +++ b/package/squeezelite/squeezelite.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 0c844e7714d3f15325629c59ee75e6309763116e61a6b73486b502e2e5cce5fd squeezelite-v1.8.tar.gz diff --git a/package/squeezelite/squeezelite.mk b/package/squeezelite/squeezelite.mk new file mode 100644 index 0000000000..7a82f4a026 --- /dev/null +++ b/package/squeezelite/squeezelite.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# squeezelite +# +################################################################################ + +SQUEEZELITE_VERSION = v1.8 +SQUEEZELITE_SITE = $(call github,robadenshi,squeezelite,$(SQUEEZELITE_VERSION)) +SQUEEZELITE_LICENSE = GPLv3 +SQUEEZELITE_LICENSE_FILES = LICENSE.txt +SQUEEZELITE_DEPENDENCIES = alsa-lib flac libmad libvorbis faad2 mpg123 +SQUEEZELITE_MAKE_OPTS = -DLINKALL + +ifeq ($(BR2_PACKAGE_SQUEEZELITE_FFMPEG),y) +SQUEEZELITE_DEPENDENCIES += ffmpeg +SQUEEZELITE_MAKE_OPTS += -DFFMPEG +endif + +ifeq ($(BR2_PACKAGE_SQUEEZELITE_DSD),y) +SQUEEZELITE_MAKE_OPTS += -DDSD +endif + +ifeq ($(BR2_PACKAGE_SQUEEZELITE_RESAMPLE),y) +SQUEEZELITE_DEPENDENCIES += libsoxr +SQUEEZELITE_MAKE_OPTS += -DRESAMPLE +endif + +ifeq ($(BR2_PACKAGE_SQUEEZELITE_VISEXPORT),y) +SQUEEZELITE_MAKE_OPTS += -DVISEXPORT +endif + +define SQUEEZELITE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + OPTS="$(SQUEEZELITE_MAKE_OPTS)" -C $(@D) all +endef + +define SQUEEZELITE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/squeezelite \ + $(TARGET_DIR)/usr/bin/squeezelite +endef + +$(eval $(generic-package)) diff --git a/package/squid/0001-assume-get-certificate-ok.patch b/package/squid/0001-assume-get-certificate-ok.patch new file mode 100644 index 0000000000..e26b50d7bb --- /dev/null +++ b/package/squid/0001-assume-get-certificate-ok.patch @@ -0,0 +1,17 @@ +The openssl get_certificate working test isn't cross compile friendly. +Just assume it works ok since we're using a modern OpenSSL version. + +Signed-off-by: Gustavo Zacarias + +diff -Nura squid-3.5.1.orig/configure.ac squid-3.5.1/configure.ac +--- squid-3.5.1.orig/configure.ac 2015-01-27 11:09:15.035711981 -0300 ++++ squid-3.5.1/configure.ac 2015-01-27 11:09:25.829084482 -0300 +@@ -1342,7 +1342,7 @@ + AC_DEFINE(USE_OPENSSL,1,[OpenSSL support is available]) + + # check for other specific broken implementations +- SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS ++ #SQUID_CHECK_OPENSSL_GETCERTIFICATE_WORKS + SQUID_CHECK_OPENSSL_CONST_SSL_METHOD + SQUID_CHECK_OPENSSL_TXTDB + SQUID_CHECK_OPENSSL_HELLO_OVERWRITE_HACK diff --git a/package/squid/0002-missing-include-time_h.patch b/package/squid/0002-missing-include-time_h.patch new file mode 100644 index 0000000000..18b3ab3b55 --- /dev/null +++ b/package/squid/0002-missing-include-time_h.patch @@ -0,0 +1,28 @@ +ipc/Kid.cc: add missing include of time.h + +Function time() comes from , so add the necessary include. +This fixes compilation on some configurations, for example +http://autobuild.buildroot.net/results/b33/b33e1f41e50b6e7ac3e30806b9a617d451bc27b4/ + +Signed-off-by: Thomas De Schampheleire +Upstream-status: submitted (http://bugs.squid-cache.org/show_bug.cgi?id=3967) + +--- + src/ipc/Kid.cc | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + + +diff --git a/src/ipc/Kid.cc b/src/ipc/Kid.cc +--- a/src/ipc/Kid.cc ++++ b/src/ipc/Kid.cc +@@ -11,6 +11,10 @@ + #include + #endif + ++#if HAVE_TIME_H ++#include ++#endif ++ + int TheProcessKind = pkOther; + + Kid::Kid(): diff --git a/package/squid/Config.in b/package/squid/Config.in new file mode 100644 index 0000000000..12bfe19a42 --- /dev/null +++ b/package/squid/Config.in @@ -0,0 +1,14 @@ +comment "squid needs a toolchain w/ C++" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_SQUID + bool "squid" + depends on BR2_INSTALL_LIBSTDCPP + # needs fork() + depends on BR2_USE_MMU + select BR2_PACKAGE_LIBCAP + help + Caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. + + http://www.squid-cache.org/ diff --git a/package/squid/S97squid b/package/squid/S97squid new file mode 100755 index 0000000000..535b1d9622 --- /dev/null +++ b/package/squid/S97squid @@ -0,0 +1,40 @@ +#!/bin/sh + +[ -x /usr/sbin/squid ] || exit 0 +[ -f /etc/squid.conf ] || exit 0 + +case "$1" in + start) + printf "Starting squid: " + if [ ! -d /var/log/squid ]; then + mkdir -p /var/log/squid + chown squid:squid /var/log/squid + fi + start-stop-daemon -S -x /usr/sbin/squid + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + + stop) + printf "Stopping squid: " + /usr/sbin/squid -k shutdown + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + + reload) + printf "Reloading squid configuration: " + /usr/sbin/squid -k reconfigure + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + + restart) + printf "Restarting squid: " + /usr/sbin/squid -k restart + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + + *) + echo "Usage: $0 {start|stop|reload|restart}" + exit 1 +esac + +exit 0 diff --git a/package/squid/squid.hash b/package/squid/squid.hash new file mode 100644 index 0000000000..c8f25b047c --- /dev/null +++ b/package/squid/squid.hash @@ -0,0 +1,3 @@ +# From http://www.squid-cache.org/Versions/v3/3.5/squid-3.5.19.tar.xz.asc +md5 a1d990284c429a63ee85d80ee5b3b8b9 squid-3.5.19.tar.xz +sha1 809133b751df9fb5bca07f181b3e2f7df392f761 squid-3.5.19.tar.xz diff --git a/package/squid/squid.mk b/package/squid/squid.mk new file mode 100644 index 0000000000..847ed303df --- /dev/null +++ b/package/squid/squid.mk @@ -0,0 +1,98 @@ +################################################################################ +# +# squid +# +################################################################################ + +SQUID_VERSION_MAJOR = 3.5 +SQUID_VERSION = $(SQUID_VERSION_MAJOR).19 +SQUID_SOURCE = squid-$(SQUID_VERSION).tar.xz +SQUID_SITE = http://www.squid-cache.org/Versions/v3/$(SQUID_VERSION_MAJOR) +SQUID_LICENSE = GPLv2+ +SQUID_LICENSE_FILES = COPYING +# For 0001-assume-get-certificate-ok.patch +SQUID_AUTORECONF = YES +SQUID_DEPENDENCIES = libcap host-libcap host-pkgconf \ + $(if $(BR2_PACKAGE_LIBNETFILTER_CONNTRACK),libnetfilter_conntrack) +SQUID_CONF_ENV = \ + ac_cv_epoll_works=yes \ + ac_cv_func_setresuid=yes \ + ac_cv_func_va_copy=yes \ + ac_cv_func___va_copy=yes \ + ac_cv_func_strnstr=no \ + ac_cv_have_squid=yes \ + BUILXCXX="$(HOSTCXX)" \ + BUILDCXXFLAGS="$(HOST_CXXFLAGS)" +SQUID_CONF_OPTS = \ + --enable-async-io=8 \ + --enable-linux-netfilter \ + --enable-removal-policies="lru,heap" \ + --with-filedescriptors=1024 \ + --disable-ident-lookups \ + --without-mit-krb5 \ + --enable-auth-basic="fake getpwnam" \ + --enable-auth-digest="file" \ + --enable-auth-negotiate="wrapper" \ + --enable-auth-ntlm="fake" \ + --disable-strict-error-checking \ + --enable-external-acl-helpers="file_userip" \ + --with-logdir=/var/log/squid/ \ + --with-pidfile=/var/run/squid.pid \ + --with-swapdir=/var/cache/squid/ \ + --with-default-user=squid + +# Atomics in Squid use __sync built-ins on 4 and 8 bytes. However, the +# configure script tests them using AC_TRY_RUN, so we have to give +# some hints. +ifeq ($(BR2_TOOLCHAIN_HAS_SYNC_4)$(BR2_TOOLCHAIN_HAS_SYNC_8),yy) +SQUID_CONF_ENV += squid_cv_gnu_atomics=yes +else +SQUID_CONF_ENV += squid_cv_gnu_atomics=no +endif + +# On uClibc librt needs libpthread +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_TOOLCHAIN_USES_UCLIBC),yy) +SQUID_CONF_ENV += ac_cv_search_shm_open="-lrt -lpthread" +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SQUID_CONF_OPTS += --with-openssl +SQUID_DEPENDENCIES += openssl +else +SQUID_CONF_OPTS += --without-openssl +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +SQUID_CONF_OPTS += --with-gnutls +SQUID_DEPENDENCIES += gnutls +else +SQUID_CONF_OPTS += --without-gnutls +endif + +define SQUID_CLEANUP_TARGET + rm -f $(addprefix $(TARGET_DIR)/usr/bin/, \ + RunCache RunAccel) + rm -f $(addprefix $(TARGET_DIR)/etc/, \ + cachemgr.conf mime.conf.default squid.conf.default) +endef + +SQUID_POST_INSTALL_TARGET_HOOKS += SQUID_CLEANUP_TARGET + +define SQUID_USERS + squid -1 squid -1 * - - - Squid proxy cache +endef + +define SQUID_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/squid/S97squid \ + $(TARGET_DIR)/etc/init.d/S97squid +endef + +define SQUID_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 $(@D)/tools/systemd/squid.service \ + $(TARGET_DIR)/usr/lib/systemd/system/squid.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../..//usr/lib/systemd/system/squid.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/squid.service +endef + +$(eval $(autotools-package)) diff --git a/package/sredird/0001-termio.patch b/package/sredird/0001-termio.patch new file mode 100644 index 0000000000..7c7c67f5a3 --- /dev/null +++ b/package/sredird/0001-termio.patch @@ -0,0 +1,20 @@ +Fix musl build + +Patch was inspired by +http://svnweb.freebsd.org/ports/head/comms/sredird/files/patch-sredird.c?revision=363168&view=markup +http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/sysutils/sredird/patches/patch-aa +https://github.com/bitrig/bitrig-ports/blob/master/comms/sredird/patches/patch-sredird_c + +Signed-off-by: Bernd Kuhls + +diff -uNr sredird-2.2.2.org/sredird.c sredird-2.2.2/sredird.c +--- sredird-2.2.2.org/sredird.c 2005-08-12 16:10:46.000000000 +0200 ++++ sredird-2.2.2/sredird.c 2016-01-31 18:53:08.000000000 +0100 +@@ -110,7 +110,6 @@ + #include + #include + #include +-#include + #include + #include + #include diff --git a/package/sredird/Config.in b/package/sredird/Config.in new file mode 100644 index 0000000000..d8c5ef9caf --- /dev/null +++ b/package/sredird/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_SREDIRD + bool "sredird" + help + Sredird is a serial port redirector that is compliant with + the RFC 2217 "Telnet Com Port Control Option" protocol. This + protocol lets you share a serial port through the network. + + http://freecode.com/projects/sredird diff --git a/package/sredird/sredird.hash b/package/sredird/sredird.hash new file mode 100644 index 0000000000..63a419fc87 --- /dev/null +++ b/package/sredird/sredird.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 640c47dcd84b3b90640165a38eb336a675fdab06c14c09cae2f4a604cae560d3 sredird-2.2.2.tar.gz diff --git a/package/sredird/sredird.mk b/package/sredird/sredird.mk new file mode 100644 index 0000000000..b564f1ac2a --- /dev/null +++ b/package/sredird/sredird.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# sredird +# +################################################################################ + +SREDIRD_VERSION = 2.2.2 +SREDIRD_SITE = http://www.ibiblio.org/pub/Linux/system/serial +SREDIRD_LICENSE = GPLv2+ +SREDIRD_LICENSE_FILES = COPYING + +define SREDIRD_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define SREDIRD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/sredird $(TARGET_DIR)/usr/sbin/sredird +endef + +$(eval $(generic-package)) diff --git a/package/sshfs/Config.in b/package/sshfs/Config.in new file mode 100644 index 0000000000..31fef9fc86 --- /dev/null +++ b/package/sshfs/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_SSHFS + bool "sshfs (FUSE)" + select BR2_PACKAGE_LIBFUSE + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_OPENSSH + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse, glib2 + depends on BR2_USE_MMU # libfuse, glib2 + depends on !BR2_STATIC_LIBS # libfuse + help + FUSE filesystem client based on the SSH File Transfer Protocol. + + https://github.com/libfuse/sshfs + +comment "sshfs needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/sshfs/sshfs.hash b/package/sshfs/sshfs.hash new file mode 100644 index 0000000000..77f6a0fa89 --- /dev/null +++ b/package/sshfs/sshfs.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 ce5f9d390934fc88c287dd937a39d15c2b40cbea6967ba24ad93ed90e0027128 sshfs-2.7.tar.gz diff --git a/package/sshfs/sshfs.mk b/package/sshfs/sshfs.mk new file mode 100644 index 0000000000..716b362aee --- /dev/null +++ b/package/sshfs/sshfs.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# sshfs +# +################################################################################ + +SSHFS_VERSION = 2.7 +SSHFS_SITE = https://github.com/libfuse/sshfs/releases/download/sshfs-$(SSHFS_VERSION) +SSHFS_LICENSE = GPLv2 +SSHFS_LICENSE_FILES = COPYING +SSHFS_DEPENDENCIES = \ + libglib2 libfuse openssh \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + $(if $(BR2_ENABLE_LOCALE),,libiconv) + +$(eval $(autotools-package)) diff --git a/package/sshpass/Config.in b/package/sshpass/Config.in new file mode 100644 index 0000000000..24e46295df --- /dev/null +++ b/package/sshpass/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_SSHPASS + bool "sshpass" + depends on BR2_USE_MMU # fork() + help + Sshpass is a tool for non-interactivly performing + password authentication with SSH's so called + "interactive keyboard password authentication". + + http://sshpass.sourceforge.net diff --git a/package/sshpass/sshpass.hash b/package/sshpass/sshpass.hash new file mode 100644 index 0000000000..12871e1ca8 --- /dev/null +++ b/package/sshpass/sshpass.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 c3f78752a68a0c3f62efb3332cceea0c8a1f04f7cf6b46e00ec0c3000bc8483e sshpass-1.05.tar.gz diff --git a/package/sshpass/sshpass.mk b/package/sshpass/sshpass.mk new file mode 100644 index 0000000000..7344ca6921 --- /dev/null +++ b/package/sshpass/sshpass.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# sshpass +# +################################################################################ + +SSHPASS_VERSION = 1.05 +SSHPASS_SITE = http://downloads.sourceforge.net/project/sshpass/sshpass/$(SSHPASS_VERSION) +SSHPASS_LICENSE = GPLv2+ +SSHPASS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/sstrip/Config.in b/package/sstrip/Config.in new file mode 100644 index 0000000000..12a5941c54 --- /dev/null +++ b/package/sstrip/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_SSTRIP + bool "sstrip" + help + Small utility that removes a few bytes from an executable that + strip leaves behind. + + http://www.muppetlabs.com/~breadbox/software/elfkickers.html diff --git a/package/sstrip/sstrip.mk b/package/sstrip/sstrip.mk new file mode 100644 index 0000000000..fe57b3c19b --- /dev/null +++ b/package/sstrip/sstrip.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# sstrip +# +################################################################################ + +SSTRIP_SITE = svn://svn.openwrt.org/openwrt/trunk/tools/sstrip +SSTRIP_VERSION = 20154 +HOST_SSTRIP_BINARY = $(GNU_TARGET_NAME)-sstrip + +define SSTRIP_BUILD_CMDS + cd $(@D) ; \ + $(TARGET_CC) $(TARGET_CFLAGS) -include endian.h -include byteswap.h \ + -o sstrip src/sstrip.c +endef + +define SSTRIP_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/sstrip $(TARGET_DIR)/usr/bin/sstrip +endef + +define HOST_SSTRIP_BUILD_CMDS + cd $(@D) ; \ + $(HOSTCC) $(HOST_CFLAGS) -include endian.h -include byteswap.h \ + -o sstrip src/sstrip.c +endef + +define HOST_SSTRIP_INSTALL_CMDS + $(INSTALL) -D $(@D)/sstrip $(HOST_DIR)/usr/bin/$(HOST_SSTRIP_BINARY) +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/start-stop-daemon/0001-add-uclibc-alias-and-musl.patch b/package/start-stop-daemon/0001-add-uclibc-alias-and-musl.patch new file mode 100644 index 0000000000..64dc00d72c --- /dev/null +++ b/package/start-stop-daemon/0001-add-uclibc-alias-and-musl.patch @@ -0,0 +1,30 @@ +Make linux-uclibcgnueabi an alias for linux-uclibceabi since it's +what we use in buildroot toolchains. +Slightly tweak musleabi to match the buildroot-used tuple. + +Signed-off-by: Gustavo Zacarias + +diff -Nura dpkg-1.18.3.orig/ostable dpkg-1.18.3/ostable +--- dpkg-1.18.3.orig/ostable 2015-10-15 08:05:04.471762555 -0300 ++++ dpkg-1.18.3/ostable 2015-10-15 08:11:05.206132648 -0300 +@@ -12,10 +12,10 @@ + # system part of the output of the GNU config.guess script. + # + # +-uclibceabi-linux linux-uclibceabi linux[^-]*-uclibceabi ++uclibceabi-linux linux-uclibceabi linux[^-]*-uclibc.*eabi + uclibc-linux linux-uclibc linux[^-]*-uclibc + musleabihf-linux linux-musleabihf linux[^-]*-musleabihf +-musl-linux linux-musl linux[^-]*-musl ++musl-linux linux-musl linux[^-]*-musl[^-]* + gnueabihf-linux linux-gnueabihf linux[^-]*-gnueabihf + gnueabi-linux linux-gnueabi linux[^-]*-gnueabi + gnuabin32-linux linux-gnuabin32 linux[^-]*-gnuabin32 +@@ -34,6 +34,6 @@ + bsd-netbsd netbsd netbsd[^-]* + bsd-openbsd openbsd openbsd[^-]* + sysv-solaris solaris solaris[^-]* +-uclibceabi-uclinux uclinux-uclibceabi uclinux[^-]*-uclibceabi ++uclibceabi-uclinux uclinux-uclibceabi uclinux[^-]*-uclibc.*eabi + uclibc-uclinux uclinux-uclibc uclinux[^-]*(-uclibc.*)? + tos-mint mint mint[^-]* diff --git a/package/start-stop-daemon/0002-just-warn-on-missing-arch.patch b/package/start-stop-daemon/0002-just-warn-on-missing-arch.patch new file mode 100644 index 0000000000..2b9cd3db17 --- /dev/null +++ b/package/start-stop-daemon/0002-just-warn-on-missing-arch.patch @@ -0,0 +1,19 @@ +Just warn on missing arch + +Some architectures are not listed in dpkg list (e.g. mips64el, xtensa, sh4a). +Don't break the build for that. + +Signed-off-by: Baruch Siach +--- +diff -Nuar dpkg-1.16.15-orig/m4/dpkg-arch.m4 dpkg-1.16.15/m4/dpkg-arch.m4 +--- dpkg-1.16.15-orig/m4/dpkg-arch.m4 2014-05-30 02:47:25.000000000 +0300 ++++ dpkg-1.16.15/m4/dpkg-arch.m4 2015-01-16 06:55:19.701596362 +0200 +@@ -57,7 +57,7 @@ + AC_MSG_CHECKING([dpkg architecture name]) + _DPKG_ARCHITECTURE([DEB_HOST_ARCH], [dpkg_arch]) + if test "x$dpkg_arch" = "x"; then +- AC_MSG_ERROR([cannot determine host dpkg architecture]) ++ AC_MSG_WARN([cannot determine host dpkg architecture]) + else + AC_MSG_RESULT([$dpkg_arch]) + fi diff --git a/package/start-stop-daemon/Config.in b/package/start-stop-daemon/Config.in new file mode 100644 index 0000000000..7d8eb34a82 --- /dev/null +++ b/package/start-stop-daemon/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_START_STOP_DAEMON + bool "start-stop-daemon" + depends on BR2_USE_MMU # fork() + help + start-stop-daemon is used to control the creation and termination + of system-level processes. + + https://tracker.debian.org/pkg/dpkg diff --git a/package/start-stop-daemon/start-stop-daemon.hash b/package/start-stop-daemon/start-stop-daemon.hash new file mode 100644 index 0000000000..a05b9a0664 --- /dev/null +++ b/package/start-stop-daemon/start-stop-daemon.hash @@ -0,0 +1,2 @@ +# From http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_1.18.4.dsc +sha256 fe89243868888ce715bf45861f26264f767d4e4dbd0d6f1a26ce60bbbbf106da dpkg_1.18.4.tar.xz diff --git a/package/start-stop-daemon/start-stop-daemon.mk b/package/start-stop-daemon/start-stop-daemon.mk new file mode 100644 index 0000000000..e0ef6c992c --- /dev/null +++ b/package/start-stop-daemon/start-stop-daemon.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# start-stop-daemon +# +################################################################################ + +# Debian start-stop-daemon is part of dpkg. Since start-stop-daemon is the only +# interesting tool in it, we call the buildroot package start-stop-daemon. + +START_STOP_DAEMON_VERSION = 1.18.4 +START_STOP_DAEMON_SOURCE = dpkg_$(START_STOP_DAEMON_VERSION).tar.xz +START_STOP_DAEMON_SITE = http://snapshot.debian.org/archive/debian/20151225T154922Z/pool/main/d/dpkg +START_STOP_DAEMON_CONF_OPTS = \ + --disable-dselect \ + --disable-update-alternatives \ + --disable-install-info \ + --exec-prefix=/ +START_STOP_DAEMON_CONF_ENV = \ + dpkg_cv_va_copy=yes \ + dpkg_cv_c99_snprintf=yes \ + DPKG_DEVEL_MODE=1 +START_STOP_DAEMON_DEPENDENCIES = host-pkgconf \ + $(if $(BR2_PACKAGE_BUSYBOX),busybox) +# Patching m4/dpkg-arch.m4 +START_STOP_DAEMON_AUTORECONF = YES +START_STOP_DAEMON_LICENSE = GPLv2+ +START_STOP_DAEMON_LICENSE_FILES = COPYING + +define START_STOP_DAEMON_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/lib/compat + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/utils +endef + +define START_STOP_DAEMON_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/utils/start-stop-daemon \ + $(TARGET_DIR)/sbin/start-stop-daemon +endef + +$(eval $(autotools-package)) diff --git a/package/startup-notification/Config.in b/package/startup-notification/Config.in new file mode 100644 index 0000000000..1fc6dad1e7 --- /dev/null +++ b/package/startup-notification/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_STARTUP_NOTIFICATION + bool "startup-notification" + select BR2_PACKAGE_XLIB_LIBX11 + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + help + Startup-notification is a library used to monitor application startup. + + http://freedesktop.org/software/startup-notification/releases diff --git a/package/startup-notification/startup-notification.hash b/package/startup-notification/startup-notification.hash new file mode 100644 index 0000000000..cadbf98434 --- /dev/null +++ b/package/startup-notification/startup-notification.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c2fa09f9a49d8b319e79638e49e967c682df8726006e03059b1ffca5ab82099c startup-notification-0.9.tar.gz diff --git a/package/startup-notification/startup-notification.mk b/package/startup-notification/startup-notification.mk new file mode 100644 index 0000000000..e8dd0a35b6 --- /dev/null +++ b/package/startup-notification/startup-notification.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# startup-notification +# +################################################################################ + +STARTUP_NOTIFICATION_VERSION = 0.9 +STARTUP_NOTIFICATION_SITE = http://freedesktop.org/software/startup-notification/releases +STARTUP_NOTIFICATION_INSTALL_STAGING = YES +STARTUP_NOTIFICATION_DEPENDENCIES = xlib_libX11 +STARTUP_NOTIFICATION_CONF_ENV = lf_cv_sane_realloc=yes +STARTUP_NOTIFICATION_CONF_OPTS = --with-x \ + --x-includes="$(STAGING_DIR)/usr/include/X11" \ + --x-libraries="$(STAGING_DIR)/usr/lib" +STARTUP_NOTIFICATION_LICENSE = LGPLv2 +STARTUP_NOTIFICATION_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/statserial/0001-ncurses-link.patch b/package/statserial/0001-ncurses-link.patch new file mode 100644 index 0000000000..b1c41e673f --- /dev/null +++ b/package/statserial/0001-ncurses-link.patch @@ -0,0 +1,16 @@ +Link to libncurses instead of the legacy libcurses. + +Signed-off-by: Gustavo Zacarias + +diff -Nura statserial-1.1.orig/Makefile statserial-1.1/Makefile +--- statserial-1.1.orig/Makefile 2014-07-04 12:47:41.279440415 -0300 ++++ statserial-1.1/Makefile 2014-07-04 12:47:47.948665740 -0300 +@@ -10,7 +10,7 @@ + LDFLAGS = -s -N + + statserial: statserial.o +- $(LD) $(LDFLAGS) -o statserial statserial.o -lcurses ++ $(LD) $(LDFLAGS) -o statserial statserial.o -lncurses + + statserial.o: statserial.c + $(CC) $(CFLAGS) -c statserial.c diff --git a/package/statserial/Config.in b/package/statserial/Config.in new file mode 100644 index 0000000000..4db5eb1aa7 --- /dev/null +++ b/package/statserial/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_STATSERIAL + bool "statserial" + select BR2_PACKAGE_NCURSES + help + Displays a table of the signals on a standard + 9-pin or 25-pin serial port, and indicates the + status of the handshaking lines. It can be + useful for debugging problems with serial + ports or modems. + + https://sites.google.com/site/tranter/software diff --git a/package/statserial/statserial.hash b/package/statserial/statserial.hash new file mode 100644 index 0000000000..3cdb17d6c2 --- /dev/null +++ b/package/statserial/statserial.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 40cf3bd506852942aa98f468c90ed4ea66dbd343b93efacd40d617b55caf3967 statserial-1.1.tar.gz diff --git a/package/statserial/statserial.mk b/package/statserial/statserial.mk new file mode 100644 index 0000000000..f0e15bc451 --- /dev/null +++ b/package/statserial/statserial.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# statserial +# +################################################################################ + +STATSERIAL_VERSION = 1.1 +STATSERIAL_SITE = http://www.ibiblio.org/pub/Linux/system/serial +STATSERIAL_DEPENDENCIES = ncurses +STATSERIAL_LICENSE = GPLv2+ +STATSERIAL_LICENSE_FILES = COPYING + +define STATSERIAL_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D) +endef + +define STATSERIAL_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/statserial $(TARGET_DIR)/usr/bin/statserial +endef + +$(eval $(generic-package)) diff --git a/package/stm32flash/Config.in b/package/stm32flash/Config.in new file mode 100644 index 0000000000..cb6f4805ed --- /dev/null +++ b/package/stm32flash/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_STM32FLASH + bool "stm32flash" + help + Open source cross platform flash program for the STM32 ARM + microcontrollers using the built-in ST serial bootloader over UART + or I2C. + + http://sourceforge.net/projects/stm32flash/ diff --git a/package/stm32flash/stm32flash.mk b/package/stm32flash/stm32flash.mk new file mode 100644 index 0000000000..2c0fa56adc --- /dev/null +++ b/package/stm32flash/stm32flash.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# stm32flash +# +################################################################################ + +STM32FLASH_VERSION = 4ac0566f188f39eace0223d966d349cd2f2c5895 +STM32FLASH_SITE = git://git.code.sf.net/p/stm32flash/code +STM32FLASH_LICENSE = GPLv2+ +STM32FLASH_LICENSE_FILES = gpl-2.0.txt + +define STM32FLASH_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define STM32FLASH_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" PREFIX="/usr" \ + -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch b/package/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch new file mode 100644 index 0000000000..0d81b59081 --- /dev/null +++ b/package/strace/0001-arc-metag-nios2-or1k-tile-fix-build.patch @@ -0,0 +1,104 @@ +From d83bcfa9a2977c037c638ae09e561f554ab19681 Mon Sep 17 00:00:00 2001 +From: Alexey Brodkin +Date: Sat, 26 Dec 2015 00:13:36 +0300 +Subject: [PATCH] arc, metag, nios2, or1k, tile: fix build + +Fix build regression introduced by commit +34683e3926d8c2daa368afb805da422ee7043396. + +* linux/32/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap. +* linux/arc/syscallent.h: Add sys_ prefix to ARCH_mmap and mmap_pgoff. +* linux/nios2/syscallent.h: Likewise. +* linux/or1k/syscallent.h: Likewise. +* linux/tile/syscallent1.h: Add sys_ prefix to ARCH_mmap and sys_mmap_4koff. +* pathtrace.c (pathtrace_match): Handle SEN_ARCH_mmap. + +This is a back-port of upstream commit +http://sourceforge.net/p/strace/code/ci/dd1a80c8d213eed95fe55b7ebcb07ee165dd8e4b/ + +It should be removed upon the next bump of strace version. + +Signed-off-by: Alexey Brodkin +--- + linux/32/syscallent.h | 6 +++--- + linux/arc/syscallent.h | 2 +- + linux/nios2/syscallent.h | 2 +- + linux/or1k/syscallent.h | 2 +- + linux/tile/syscallent1.h | 2 +- + pathtrace.c | 1 + + 6 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/linux/32/syscallent.h b/linux/32/syscallent.h +index 5f997e7..e6f895c 100644 +--- a/linux/32/syscallent.h ++++ b/linux/32/syscallent.h +@@ -1,5 +1,5 @@ +-#ifndef ARCH_mmap +-# define ARCH_mmap mmap ++#ifndef sys_ARCH_mmap ++# define sys_ARCH_mmap sys_mmap + #endif + [ 0] = { 2, 0, SEN(io_setup), "io_setup" }, + [ 1] = { 1, 0, SEN(io_destroy), "io_destroy" }, +@@ -276,5 +276,5 @@ + [283] = { 2, 0, SEN(membarrier), "membarrier", }, + [284] = { 3, TM, SEN(mlock2), "mlock2" }, + +-#undef ARCH_mmap ++#undef sys_ARCH_mmap + #undef ARCH_WANT_SYNC_FILE_RANGE2 +diff --git a/linux/arc/syscallent.h b/linux/arc/syscallent.h +index 5847dc4..1100008 100644 +--- a/linux/arc/syscallent.h ++++ b/linux/arc/syscallent.h +@@ -1,4 +1,4 @@ +-#define ARCH_mmap mmap_pgoff ++#define sys_ARCH_mmap sys_mmap_pgoff + #include "32/syscallent.h" + [244] = { 3, 0, SEN(printargs), "arc_cacheflush"}, + [245] = { 1, 0, SEN(printargs), "arc_settls" }, +diff --git a/linux/nios2/syscallent.h b/linux/nios2/syscallent.h +index 8a4b70e..01efe3a 100644 +--- a/linux/nios2/syscallent.h ++++ b/linux/nios2/syscallent.h +@@ -1,4 +1,4 @@ +-#define ARCH_mmap mmap_pgoff ++#define sys_ARCH_mmap sys_mmap_pgoff + #include "32/syscallent.h" + [244] = {4, 0, SEN(cacheflush), "cacheflush"}, + [245 ... 259] = { }, +diff --git a/linux/or1k/syscallent.h b/linux/or1k/syscallent.h +index ed84b3b..351fe25 100644 +--- a/linux/or1k/syscallent.h ++++ b/linux/or1k/syscallent.h +@@ -1,4 +1,4 @@ +-#define ARCH_mmap mmap_pgoff ++#define sys_ARCH_mmap sys_mmap_pgoff + #include "32/syscallent.h" + [244] = { 3, NF, SEN(or1k_atomic), "or1k_atomic" }, + [245 ... 259] = { }, +diff --git a/linux/tile/syscallent1.h b/linux/tile/syscallent1.h +index c86f059..28dbab4 100644 +--- a/linux/tile/syscallent1.h ++++ b/linux/tile/syscallent1.h +@@ -1,4 +1,4 @@ +-#define ARCH_mmap mmap_4koff ++#define sys_ARCH_mmap sys_mmap_4koff + #define ARCH_WANT_SYNC_FILE_RANGE2 1 + #include "32/syscallent.h" + [244] = { 1, 0, SEN(printargs), "cmpxchg_badaddr" }, +diff --git a/pathtrace.c b/pathtrace.c +index d530ec2..e72cdf7 100644 +--- a/pathtrace.c ++++ b/pathtrace.c +@@ -216,6 +216,7 @@ pathtrace_match(struct tcb *tcp) + case SEN_mmap: + case SEN_mmap_4koff: + case SEN_mmap_pgoff: ++ case SEN_ARCH_mmap: + /* x, x, x, x, fd */ + return fdmatch(tcp, tcp->u_arg[4]); + +-- +2.4.3 + diff --git a/package/strace/Config.in b/package/strace/Config.in new file mode 100644 index 0000000000..bbb582ad53 --- /dev/null +++ b/package/strace/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_STRACE + bool "strace" + help + A useful diagnostic, instructional, and debugging tool. + Allows you to track what system calls a program makes + while it is running. + + http://sourceforge.net/projects/strace/ diff --git a/package/strace/strace.hash b/package/strace/strace.hash new file mode 100644 index 0000000000..f47d51b059 --- /dev/null +++ b/package/strace/strace.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/strace/files/strace/4.11/ +md5 a15d2555a7febb56d00c6e1a51c655dc strace-4.11.tar.xz +sha1 8fd717dc3c51b69fde51ce0bdb066404a678363c strace-4.11.tar.xz diff --git a/package/strace/strace.mk b/package/strace/strace.mk new file mode 100644 index 0000000000..e25428e653 --- /dev/null +++ b/package/strace/strace.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# strace +# +################################################################################ + +STRACE_VERSION = 4.11 +STRACE_SOURCE = strace-$(STRACE_VERSION).tar.xz +STRACE_SITE = http://downloads.sourceforge.net/project/strace/strace/$(STRACE_VERSION) +STRACE_LICENSE = BSD-3c +STRACE_LICENSE_FILES = COPYING + +STRACE_CONF_ENV = \ + ac_cv_header_linux_if_packet_h=yes \ + ac_cv_header_linux_netlink_h=yes + +define STRACE_REMOVE_STRACE_GRAPH + rm -f $(TARGET_DIR)/usr/bin/strace-graph +endef + +STRACE_POST_INSTALL_TARGET_HOOKS += STRACE_REMOVE_STRACE_GRAPH + +$(eval $(autotools-package)) diff --git a/package/stress-ng/Config.in b/package/stress-ng/Config.in new file mode 100644 index 0000000000..20ec93affb --- /dev/null +++ b/package/stress-ng/Config.in @@ -0,0 +1,27 @@ +config BR2_PACKAGE_STRESS_NG + bool "stress-ng" + depends on BR2_USE_MMU # fork() + # disabled on musl: stress-malloc.c needs mallopt() and M_MMAP_THRESHOLD + # disabled on uClibc: stress-aio.c needs aio.h + depends on BR2_TOOLCHAIN_USES_GLIBC + # perf.c needs PERF_COUNT_HW_REF_CPU_CYCLES + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 + depends on !BR2_microblaze # keyutils + # fenv.h lacks FE_INVALID, FE_OVERFLOW & FE_UNDERFLOW on nios2 + depends on !BR2_nios2 + depends on !BR2_STATIC_LIBS # keyutils + select BR2_PACKAGE_KEYUTILS # stress-key.c needs keyutils.h + select BR2_PACKAGE_ATTR # stress-xattr.c needs xattr.h + help + stress-ng will stress test a computer system in various + selectable ways. It was designed to exercise various physical + subsystems of a computer as well as the various operating + system kernel interfaces. + + http://kernel.ubuntu.com/~cking/stress-ng/ + +comment "stress-ng needs a glibc toolchain w/ dynamic library, headers >= 3.3" + depends on !BR2_microblaze && !BR2_nios2 + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 \ + || !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/stress-ng/stress-ng.hash b/package/stress-ng/stress-ng.hash new file mode 100644 index 0000000000..d09edc0e2f --- /dev/null +++ b/package/stress-ng/stress-ng.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 7af9759a37902ebf401f92fedeada0b82bcd1e3f4e9e10130177344f143470eb stress-ng-0.06.02.tar.gz diff --git a/package/stress-ng/stress-ng.mk b/package/stress-ng/stress-ng.mk new file mode 100644 index 0000000000..6015a1e9e9 --- /dev/null +++ b/package/stress-ng/stress-ng.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# stress-ng +# +################################################################################ + +STRESS_NG_VERSION = 0.06.02 +STRESS_NG_SITE = http://kernel.ubuntu.com/~cking/tarballs/stress-ng +STRESS_NG_LICENSE = GPLv2+ +STRESS_NG_LICENSE_FILES = COPYING + +STRESS_NG_DEPENDENCIES = attr keyutils + +define STRESS_NG_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define STRESS_NG_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/stress/Config.in b/package/stress/Config.in new file mode 100644 index 0000000000..b22c3f19bb --- /dev/null +++ b/package/stress/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_STRESS + bool "stress" + depends on BR2_USE_MMU # fork() + help + A deliberately simple workload generator for POSIX systems. + It imposes a configurable amount of CPU, memory, I/O, and + disk stress on the system. + + http://people.seas.harvard.edu/~apw/stress/ diff --git a/package/stress/stress.hash b/package/stress/stress.hash new file mode 100644 index 0000000000..24cf0431b2 --- /dev/null +++ b/package/stress/stress.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 057e4fc2a7706411e1014bf172e4f94b63a12f18412378fca8684ca92408825b stress-1.0.4.tar.gz diff --git a/package/stress/stress.mk b/package/stress/stress.mk new file mode 100644 index 0000000000..1b5ba06a07 --- /dev/null +++ b/package/stress/stress.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# stress +# +################################################################################ + +STRESS_VERSION = 1.0.4 +STRESS_SITE = http://people.seas.harvard.edu/~apw/stress +STRESS_LICENSE = GPLv2+ +STRESS_LICENSE_FILES = COPYING + +# Stress is linked statically if the --enable-static is specified. +# However, this option is always specified in the global +# SHARED_STATIC_LIBS_OPTS to tell packages to build static libraries, +# if supported. +# +# If the BR2_STATIC_LIBS is not defined, we have to specify +# --disable-static explicitly to get stress linked dynamically. +# +# Also, disable documentation by undefining makeinfo +STRESS_CONF_OPTS = \ + $(if $(BR2_STATIC_LIBS),,--disable-static) \ + MAKEINFO=: + +$(eval $(autotools-package)) diff --git a/package/strongswan/Config.in b/package/strongswan/Config.in new file mode 100644 index 0000000000..b49435c8c7 --- /dev/null +++ b/package/strongswan/Config.in @@ -0,0 +1,130 @@ +comment "strongswan needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +menuconfig BR2_PACKAGE_STRONGSWAN + bool "strongswan" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HAS_ATOMIC + depends on !BR2_STATIC_LIBS + help + strongSwan is an OpenSource IPsec implementation for the + Linux operating system. It is based on the discontinued + FreeS/WAN project and the X.509 patch. + + The focus is on: + - simplicity of configuration + - strong encryption and authentication methods + - powerful IPsec policies supporting large and complex VPN networks + + strongSwan provide many plugins. Only a few are presented here. + + http://www.strongswan.org/ + +if BR2_PACKAGE_STRONGSWAN + +choice + prompt "Cryptographic backend" + default BR2_PACKAGE_STRONGSWAN_GMP + +config BR2_PACKAGE_STRONGSWAN_OPENSSL + bool "OpenSSL" + select BR2_PACKAGE_OPENSSL + +config BR2_PACKAGE_STRONGSWAN_GCRYPT + bool "libgcrypt" + select BR2_PACKAGE_LIBGCRYPT + +config BR2_PACKAGE_STRONGSWAN_GMP + bool "GNU MP (libgmp)" + select BR2_PACKAGE_GMP + +endchoice + +config BR2_PACKAGE_STRONGSWAN_AF_ALG + bool "Enable AF_ALG crypto interface to Linux Crypto API" + +config BR2_PACKAGE_STRONGSWAN_CURL + bool "Enable CURL fetcher plugin to fetch files via libcurl" + select BR2_PACKAGE_LIBCURL + +config BR2_PACKAGE_STRONGSWAN_CHARON + bool "Enable the IKEv1/IKEv2 keying daemon charon" + default y + +if BR2_PACKAGE_STRONGSWAN_CHARON + +config BR2_PACKAGE_STRONGSWAN_TNCCS_11 + bool "Enable TNCCS 1.1 protocol module" + select BR2_PACKAGE_LIBXML2 + +config BR2_PACKAGE_STRONGSWAN_TNCCS_20 + bool "Enable TNCCS 2.0 protocol module" + +config BR2_PACKAGE_STRONGSWAN_TNCCS_DYNAMIC + bool "Enable dynamic TNCCS protocol discovery module" + +config BR2_PACKAGE_STRONGSWAN_EAP + bool "Enable EAP protocols" + help + Enable various EAP protocols: + - mschapv2 + - tls + - ttls + - peap + - sim + - sim-file + - aka + - aka-3gpp2 + - simaka-sql + - simaka-pseudonym + - simaka-reauth + - identity + - md5 + - gtc + - tnc + - dynamic + - radius + +if BR2_PACKAGE_STRONGSWAN_EAP + +config BR2_PACKAGE_STRONGSWAN_EAP_SIM_PCSC + bool "Enable EAP-SIM smart card backend" + depends on !BR2_STATIC_LIBS # pcsc-lite + select BR2_PACKAGE_PCSC_LITE + +endif + +config BR2_PACKAGE_STRONGSWAN_UNITY + bool "Enables Cisco Unity extension plugin" + +config BR2_PACKAGE_STRONGSWAN_STROKE + bool "Enable charons stroke configuration backend" + default y + +config BR2_PACKAGE_STRONGSWAN_SQL + bool "Enable SQL database configuration backend" + depends on BR2_PACKAGE_SQLITE || BR2_PACKAGE_MYSQL + +endif + +config BR2_PACKAGE_STRONGSWAN_PKI + bool "Enable pki certificate utility" + default y + +config BR2_PACKAGE_STRONGSWAN_SCEP + bool "Enable SCEP client tool" + +config BR2_PACKAGE_STRONGSWAN_SCRIPTS + bool "Enable additional utilities (found in scripts directory)" + depends on BR2_PACKAGE_STRONGSWAN_CHARON + default y + +config BR2_PACKAGE_STRONGSWAN_VICI + bool "Enable vici/swanctl" + depends on BR2_PACKAGE_STRONGSWAN_CHARON + default y + +endif diff --git a/package/strongswan/strongswan.hash b/package/strongswan/strongswan.hash new file mode 100644 index 0000000000..97fb1998e4 --- /dev/null +++ b/package/strongswan/strongswan.hash @@ -0,0 +1,4 @@ +# From http://download.strongswan.org/strongswan-5.4.0.tar.bz2.md5 +md5 9d7c77b0da9b69f859624897e5e9ebbf strongswan-5.4.0.tar.bz2 +# Calculated based on the hash above +sha256 f8288faaea6a9cd8a7d413c0b76b7922be5da3dfcd01fd05cb30d2c55d3bbe89 strongswan-5.4.0.tar.bz2 diff --git a/package/strongswan/strongswan.mk b/package/strongswan/strongswan.mk new file mode 100644 index 0000000000..36b5148535 --- /dev/null +++ b/package/strongswan/strongswan.mk @@ -0,0 +1,84 @@ +################################################################################ +# +# strongswan +# +################################################################################ + +STRONGSWAN_VERSION = 5.4.0 +STRONGSWAN_SOURCE = strongswan-$(STRONGSWAN_VERSION).tar.bz2 +STRONGSWAN_SITE = http://download.strongswan.org +STRONGSWAN_LICENSE = GPLv2+ +STRONGSWAN_LICENSE_FILES = COPYING LICENSE +STRONGSWAN_DEPENDENCIES = host-pkgconf +STRONGSWAN_CONF_OPTS += \ + --without-lib-prefix \ + --enable-led \ + --enable-pkcs11=yes \ + --enable-kernel-netlink=yes \ + --enable-socket-default=yes \ + --enable-openssl=$(if $(BR2_PACKAGE_STRONGSWAN_OPENSSL),yes,no) \ + --enable-gcrypt=$(if $(BR2_PACKAGE_STRONGSWAN_GCRYPT),yes,no) \ + --enable-gmp=$(if $(BR2_PACKAGE_STRONGSWAN_GMP),yes,no) \ + --enable-af-alg=$(if $(BR2_PACKAGE_STRONGSWAN_AF_ALG),yes,no) \ + --enable-curl=$(if $(BR2_PACKAGE_STRONGSWAN_CURL),yes,no) \ + --enable-charon=$(if $(BR2_PACKAGE_STRONGSWAN_CHARON),yes,no) \ + --enable-tnccs-11=$(if $(BR2_PACKAGE_STRONGSWAN_TNCCS_11),yes,no) \ + --enable-tnccs-20=$(if $(BR2_PACKAGE_STRONGSWAN_TNCCS_20),yes,no) \ + --enable-tnccs-dynamic=$(if $(BR2_PACKAGE_STRONGSWAN_TNCCS_DYNAMIC),yes,no) \ + --enable-eap-sim-pcsc=$(if $(BR2_PACKAGE_STRONGSWAN_EAP_SIM_PCSC),yes,no) \ + --enable-unity=$(if $(BR2_PACKAGE_STRONGSWAN_UNITY),yes,no) \ + --enable-stroke=$(if $(BR2_PACKAGE_STRONGSWAN_STROKE),yes,no) \ + --enable-sql=$(if $(BR2_PACKAGE_STRONGSWAN_SQL),yes,no) \ + --enable-pki=$(if $(BR2_PACKAGE_STRONGSWAN_PKI),yes,no) \ + --enable-scepclient=$(if $(BR2_PACKAGE_STRONGSWAN_SCEP),yes,no) \ + --enable-scripts=$(if $(BR2_PACKAGE_STRONGSWAN_SCRIPTS),yes,no) \ + --enable-vici=$(if $(BR2_PACKAGE_STRONGSWAN_VICI),yes,no) \ + --enable-swanctl=$(if $(BR2_PACKAGE_STRONGSWAN_VICI),yes,no) + +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +STRONGSWAN_CONF_ENV += LIBS='-latomic' +endif + +ifeq ($(BR2_PACKAGE_STRONGSWAN_EAP),y) +STRONGSWAN_CONF_OPTS += \ + --enable-eap-sim \ + --enable-eap-sim-file \ + --enable-eap-aka \ + --enable-eap-aka-3gpp2 \ + --enable-eap-simaka-sql \ + --enable-eap-simaka-pseudonym \ + --enable-eap-simaka-reauth \ + --enable-eap-identity \ + --enable-eap-md5 \ + --enable-eap-gtc \ + --enable-eap-mschapv2 \ + --enable-eap-tls \ + --enable-eap-ttls \ + --enable-eap-peap \ + --enable-eap-tnc \ + --enable-eap-dynamic \ + --enable-eap-radius +STRONGSWAN_DEPENDENCIES += gmp +endif + +STRONGSWAN_DEPENDENCIES += \ + $(if $(BR2_PACKAGE_STRONGSWAN_OPENSSL),openssl) \ + $(if $(BR2_PACKAGE_STRONGSWAN_GCRYPT),libgcrypt) \ + $(if $(BR2_PACKAGE_STRONGSWAN_GMP),gmp) \ + $(if $(BR2_PACKAGE_STRONGSWAN_CURL),libcurl) \ + $(if $(BR2_PACKAGE_STRONGSWAN_TNCCS_11),libxml2) \ + $(if $(BR2_PACKAGE_STRONGSWAN_EAP_SIM_PCSC),pcsc-lite) + +ifeq ($(BR2_PACKAGE_STRONGSWAN_SQL),y) +STRONGSWAN_DEPENDENCIES += \ + $(if $(BR2_PACKAGE_SQLITE),sqlite) \ + $(if $(BR2_PACKAGE_MYSQL),mysql) +endif + +# disable connmark/forecast until net/if.h vs. linux/if.h conflict resolved +# problem exist since linux 4.5 header changes +STRONGSWAN_CONF_OPTS += \ + --disable-connmark \ + --disable-forecast + +$(eval $(autotools-package)) diff --git a/package/stunnel/Config.in b/package/stunnel/Config.in new file mode 100644 index 0000000000..e4a956770e --- /dev/null +++ b/package/stunnel/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_STUNNEL + bool "stunnel" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_OPENSSL + help + Stunnel is a program that wraps any TCP connection with an SSL + connection. + + http://www.stunnel.org/ diff --git a/package/stunnel/S50stunnel b/package/stunnel/S50stunnel new file mode 100644 index 0000000000..04637b694c --- /dev/null +++ b/package/stunnel/S50stunnel @@ -0,0 +1,35 @@ +#!/bin/sh + +start() { + printf "Starting stunnel: " + start-stop-daemon -S -q -p /var/run/stunnel.pid --exec /usr/bin/stunnel + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping stunnel: " + start-stop-daemon -K -q -p /var/run/stunnel.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/stunnel/stunnel.hash b/package/stunnel/stunnel.hash new file mode 100644 index 0000000000..3f0d6e5364 --- /dev/null +++ b/package/stunnel/stunnel.hash @@ -0,0 +1,2 @@ +# From http://www.stunnel.org/pipermail/stunnel-announce/2016-March/000120.html +sha256 a746b71ab3dc6c23eacb0daf7342467870e43ac933430905eb1b1d050bbae0b7 stunnel-5.31.tar.gz diff --git a/package/stunnel/stunnel.mk b/package/stunnel/stunnel.mk new file mode 100644 index 0000000000..a222a1c8e8 --- /dev/null +++ b/package/stunnel/stunnel.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# stunnel +# +################################################################################ + +STUNNEL_VERSION_MAJOR = 5 +STUNNEL_VERSION = $(STUNNEL_VERSION_MAJOR).31 +STUNNEL_SITE = http://www.usenix.org.uk/mirrors/stunnel/archive/$(STUNNEL_VERSION_MAJOR).x +STUNNEL_DEPENDENCIES = openssl +STUNNEL_CONF_OPTS = --with-ssl=$(STAGING_DIR)/usr --with-threads=fork \ + --disable-libwrap +STUNNEL_CONF_ENV = \ + ax_cv_check_cflags___fstack_protector=$(if $(BR2_TOOLCHAIN_HAS_SSP),yes,no) +STUNNEL_LICENSE = GPLv2+ +STUNNEL_LICENSE_FILES = COPYING COPYRIGHT.GPL + +ifeq ($(BR2_INIT_SYSTEMD),y) +STUNNEL_DEPENDENCIES += systemd +else +STUNNEL_CONF_OPTS += --disable-systemd +endif + +define STUNNEL_INSTALL_CONF + $(INSTALL) -m 0644 -D $(@D)/tools/stunnel.conf \ + $(TARGET_DIR)/etc/stunnel/stunnel.conf + rm -f $(TARGET_DIR)/etc/stunnel/stunnel.conf-sample +endef + +STUNNEL_POST_INSTALL_TARGET_HOOKS += STUNNEL_INSTALL_CONF + +define STUNNEL_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/stunnel/S50stunnel $(TARGET_DIR)/etc/init.d/S50stunnel +endef + +$(eval $(autotools-package)) diff --git a/package/subversion/0001-dont-mangle-cflags.patch b/package/subversion/0001-dont-mangle-cflags.patch new file mode 100644 index 0000000000..adb8b8e933 --- /dev/null +++ b/package/subversion/0001-dont-mangle-cflags.patch @@ -0,0 +1,24 @@ +[PATCH] configure.ac: don't mangle CFLAGS + +Ensure that the sed expression to strip debugging options from CFLAGS +doesn't mangle flags like -mfloat-gprs=double, breaking the build. + +[Vincent: adapt to 1.9.2 and patch configure.ac instead of configure] + +Signed-off-by: Peter Korsgaard +Signed-off-by: Vicente Olivert Riera + +diff -Nrup a/configure.ac b/configure.ac +--- a/configure.ac 2015-07-27 00:03:10.000000000 +0100 ++++ b/configure.ac 2015-09-28 10:33:39.175048493 +0100 +@@ -1110,8 +1110,8 @@ if test "$enable_debugging" = "yes" ; th + CXXFLAGS="$CXXFLAGS -DSVN_DEBUG -DAP_DEBUG" + elif test "$enable_debugging" = "no" ; then + AC_MSG_NOTICE([Disabling debugging]) +- CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"] +- CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9] //g' -e 's/-g //g'`"] ++ CFLAGS=["`echo $CFLAGS' ' | $SED -e 's/-g[0-9]* //g'`"] ++ CXXFLAGS=["`echo $CXXFLAGS' ' | $SED -e 's/-g[0-9]* //g'`"] + dnl Compile with NDEBUG to get rid of assertions + CFLAGS="$CFLAGS -DNDEBUG" + CXXFLAGS="$CXXFLAGS -DNDEBUG" diff --git a/package/subversion/0002-disable-macos-specific-features.patch b/package/subversion/0002-disable-macos-specific-features.patch new file mode 100644 index 0000000000..b960ca2937 --- /dev/null +++ b/package/subversion/0002-disable-macos-specific-features.patch @@ -0,0 +1,23 @@ +Disable Mac OS specific features + +We only support Linux so we don't need them. Also, they cause a build +failure when cross compiling: + +checking for Mach-O dynamic module iteration functions +error: cannot run test program while cross compiling + +Signed-off-by: Vicente Olivert Riera + +diff -Nrup a/configure.ac b/configure.ac +--- a/configure.ac 2015-09-28 10:33:39.175048493 +0100 ++++ b/configure.ac 2015-09-28 10:47:53.921428143 +0100 +@@ -467,9 +467,6 @@ fi + + dnl Mac OS specific features ------------------- + +-SVN_LIB_MACHO_ITERATE +-SVN_LIB_MACOS_PLIST +-SVN_LIB_MACOS_KEYCHAIN + + dnl APR_HAS_DSO ------------------- + diff --git a/package/subversion/Config.in b/package/subversion/Config.in new file mode 100644 index 0000000000..ffe424a7e2 --- /dev/null +++ b/package/subversion/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_SUBVERSION + bool "subversion" + select BR2_PACKAGE_APR + select BR2_PACKAGE_APR_UTIL + # apr really needs shared library support + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # apr + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_SQLITE + help + Subversion is an open source version control system + + http://subversion.apache.org/ + +comment "subversion needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/subversion/subversion.hash b/package/subversion/subversion.hash new file mode 100644 index 0000000000..926bbc5579 --- /dev/null +++ b/package/subversion/subversion.hash @@ -0,0 +1,2 @@ +# From http://subversion.apache.org/download.cgi#recommended-release +sha1 bc7d51fdda43bea01e1272dfe9d23d0a9d6cd11c subversion-1.9.4.tar.bz2 diff --git a/package/subversion/subversion.mk b/package/subversion/subversion.mk new file mode 100644 index 0000000000..720a1a10e9 --- /dev/null +++ b/package/subversion/subversion.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# subversion +# +################################################################################ + +SUBVERSION_VERSION = 1.9.4 +SUBVERSION_SOURCE = subversion-$(SUBVERSION_VERSION).tar.bz2 +SUBVERSION_SITE = http://mirror.catn.com/pub/apache/subversion +SUBVERSION_LICENSE = Apache-2.0 +SUBVERSION_LICENSE_FILES = LICENSE +SUBVERSION_DEPENDENCIES = host-pkgconf apr apr-util expat zlib sqlite +SUBVERSION_AUTORECONF = YES +SUBVERSION_CONF_OPTS = \ + --with-expat=$(STAGING_DIR)/usr/include:$(STAGING_DIR)/usr/lib: \ + --with-apr=$(STAGING_DIR)/usr \ + --with-apr-util=$(STAGING_DIR)/usr \ + --with-zlib=$(STAGING_DIR)/usr \ + --without-serf \ + --without-apxs \ + --without-berkeley-db \ + --without-sasl \ + --without-gnome-keyring \ + --without-libmagic + +$(eval $(autotools-package)) diff --git a/package/sudo/Config.in b/package/sudo/Config.in new file mode 100644 index 0000000000..cbef15d67b --- /dev/null +++ b/package/sudo/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_SUDO + bool "sudo" + # uses fork() + depends on BR2_USE_MMU + help + Sudo is a program designed to allow a sysadmin to give + limited root privileges to users and log root activity. The + basic philosophy is to give as few privileges as possible + but still allow people to get their work done. + + http://www.sudo.ws/sudo/ diff --git a/package/sudo/sudo.hash b/package/sudo/sudo.hash new file mode 100644 index 0000000000..4c2431f13d --- /dev/null +++ b/package/sudo/sudo.hash @@ -0,0 +1,2 @@ +# From: http://www.sudo.ws/download.html +sha256 4316381708324da8b6cb151f655c1a11855207c7c02244d8ffdea5104d7cc308 sudo-1.8.15.tar.gz diff --git a/package/sudo/sudo.mk b/package/sudo/sudo.mk new file mode 100644 index 0000000000..f28312ace1 --- /dev/null +++ b/package/sudo/sudo.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# sudo +# +################################################################################ + +SUDO_VERSION = 1.8.15 +SUDO_SITE = http://www.sudo.ws/sudo/dist +SUDO_LICENSE = ISC BSD-3c +SUDO_LICENSE_FILES = doc/LICENSE +# This is to avoid sudo's make install from chown()ing files which fails +SUDO_INSTALL_TARGET_OPTS = INSTALL_OWNER="" DESTDIR="$(TARGET_DIR)" install +SUDO_CONF_OPTS = \ + --without-lecture \ + --without-sendmail \ + --without-umask \ + --with-logging=syslog \ + --without-interfaces \ + --with-env-editor + +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +define SUDO_INSTALL_PAM_CONF + $(INSTALL) -D -m 0644 package/sudo/sudo.pam $(TARGET_DIR)/etc/pam.d/sudo +endef + +SUDO_DEPENDENCIES += linux-pam +SUDO_CONF_OPTS += --with-pam +SUDO_POST_INSTALL_TARGET_HOOKS += SUDO_INSTALL_PAM_CONF +else +SUDO_CONF_OPTS += --without-pam +endif + +# mksigname/mksiglist needs to run on build host to generate source files +define SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST + $(MAKE) $(HOST_CONFIGURE_OPTS) \ + CPPFLAGS="$(HOST_CPPFLAGS) -I../../include -I../.." \ + -C $(@D)/lib/util mksigname mksiglist +endef + +SUDO_POST_CONFIGURE_HOOKS += SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST + +define SUDO_PERMISSIONS + /usr/bin/sudo f 4755 0 0 - - - - - +endef + +$(eval $(autotools-package)) diff --git a/package/sudo/sudo.pam b/package/sudo/sudo.pam new file mode 100644 index 0000000000..c6e6f20a08 --- /dev/null +++ b/package/sudo/sudo.pam @@ -0,0 +1,12 @@ +auth sufficient pam_rootok.so +auth required pam_wheel.so use_uid +auth required pam_env.so +auth required pam_unix.so nullok + +account required pam_unix.so + +password required pam_unix.so nullok + +session required pam_limits.so +session required pam_env.so +session required pam_unix.so diff --git a/package/sunxi-boards/Config.in b/package/sunxi-boards/Config.in new file mode 100644 index 0000000000..d9fd8529f3 --- /dev/null +++ b/package/sunxi-boards/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_SUNXI_BOARDS + bool "sunxi script.bin board file" + depends on BR2_arm + select BR2_PACKAGE_HOST_SUNXI_TOOLS + help + Sunxi-boards requires a compiled .fex files for hardware + description, used by the kernel during boot for hardware + initialization. This package is specific for linux-sunxi + kernel and it is useless for mainline kernel versions. + + https://github.com/linux-sunxi/sunxi-boards + +if BR2_PACKAGE_SUNXI_BOARDS +config BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE + string ".fex file to compile" + help + This field defines the name of the .fex file for which the + .bin file should be generated. + + This should be the path of the .fex file relative to the + sys_config/ directory, and including the .fex extension. + + See inside sys_config/ directory in sunxi-boards source code + to see the list of valid .fex files. +endif diff --git a/package/sunxi-boards/sunxi-boards.mk b/package/sunxi-boards/sunxi-boards.mk new file mode 100644 index 0000000000..83b3842caa --- /dev/null +++ b/package/sunxi-boards/sunxi-boards.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# sunxi-boards +# +################################################################################ + +SUNXI_BOARDS_VERSION = a6a4e94066f4ec6b26fc7060dc453a6bcf26a504 +SUNXI_BOARDS_SITE = $(call github,linux-sunxi,sunxi-boards,$(SUNXI_BOARDS_VERSION)) +SUNXI_BOARDS_DEPENDENCIES = host-sunxi-tools +SUNXI_BOARDS_INSTALL_IMAGES = YES +SUNXI_BOARDS_INSTALL_TARGET = NO +SUNXI_BOARDS_FEX_FILE = $(call qstrip,$(BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE)) + +define SUNXI_BOARDS_INSTALL_IMAGES_CMDS + $(FEX2BIN) $(@D)/sys_config/$(SUNXI_BOARDS_FEX_FILE) \ + $(BINARIES_DIR)/script.bin +endef + +ifeq ($(BR2_PACKAGE_SUNXI_BOARDS)$(BR_BUILDING),yy) +# we NEED a board name +ifeq ($(SUNXI_BOARDS_FEX_FILE),) +$(error No sunxi .fex file specified. Check your BR2_PACKAGE_SUNXI_BOARDS_FEX_FILE settings) +endif +endif + +$(eval $(generic-package)) diff --git a/package/sunxi-cedarx/Config.in b/package/sunxi-cedarx/Config.in new file mode 100644 index 0000000000..fc6e5298c3 --- /dev/null +++ b/package/sunxi-cedarx/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_SUNXI_CEDARX + bool "sunxi-cedarx" + depends on BR2_arm + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Sunxi CedarX decoder libraries. CedarX is Allwinner's + multimedia co-processing technology for hardware accelerated + video and image decoding, as used inside their A10 SoC's and + others. + + http://github.com/linux-sunxi/cedarx-libs + http://linux-sunxi.org/CedarX + +comment "sunxi-cedarx needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/sunxi-cedarx/sunxi-cedarx.mk b/package/sunxi-cedarx/sunxi-cedarx.mk new file mode 100644 index 0000000000..219f1bc74b --- /dev/null +++ b/package/sunxi-cedarx/sunxi-cedarx.mk @@ -0,0 +1,60 @@ +################################################################################ +# +# sunxi-cedarx +# +################################################################################ + +SUNXI_CEDARX_VERSION = b8f52d913f73720e50d8f1b2f8610467b575dc45 +SUNXI_CEDARX_SITE = $(call github,linux-sunxi,cedarx-libs,$(SUNXI_CEDARX_VERSION)) + +SUNXI_CEDARX_INSTALL_STAGING = YES + +SUNXI_CEDARX_CONFIGURE_OPTS = \ + CROSS_COMPILE=$(TARGET_CROSS) + +ifeq ($(BR2_ARM_EABIHF),y) +SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armhf +else +SUNXI_CEDARX_BIN_DIR = $(@D)/libcedarv/linux-armel2 +endif + +define SUNXI_CEDARX_BUILD_AVHEAP + $(TARGET_CC) $(TARGET_CFLAGS) \ + -c $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.c \ + -o $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.o \ + -I $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap \ + -I $(SUNXI_CEDARX_BIN_DIR)/ + $(TARGET_CC) -shared -L./ -Wl,-soname,libavheap.so \ + -o $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/libavheap.so \ + $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/avheap.o +endef + +define SUNXI_CEDARX_INSTALL_AVHEAP + $(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/adapter/avheap/libavheap.so \ + $(1)/usr/lib/libavheap.so +endef + +define SUNXI_CEDARX_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(SUNXI_CEDARX_BIN_DIR) \ + $(SUNXI_CEDARX_CONFIGURE_OPTS) + $(SUNXI_CEDARX_BUILD_AVHEAP) +endef + +define SUNXI_CEDARX_INSTALL_STAGING_CMDS + $(INSTALL) -d -m 755 $(STAGING_DIR)/usr/include/libvecore + $(INSTALL) -m 664 $(SUNXI_CEDARX_BIN_DIR)/libvecore/*.h \ + $(STAGING_DIR)/usr/include/libvecore + $(INSTALL) -m 644 $(SUNXI_CEDARX_BIN_DIR)/*.h \ + $(STAGING_DIR)/usr/include/ + $(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/libvecore/libvecore.so \ + $(STAGING_DIR)/usr/lib/libvecore.so + $(call SUNXI_CEDARX_INSTALL_AVHEAP, $(STAGING_DIR)) +endef + +define SUNXI_CEDARX_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(SUNXI_CEDARX_BIN_DIR)/libvecore/libvecore.so \ + $(TARGET_DIR)/usr/lib/libvecore.so + $(call SUNXI_CEDARX_INSTALL_AVHEAP, $(TARGET_DIR)) +endef + +$(eval $(generic-package)) diff --git a/package/sunxi-mali-prop/Config.in b/package/sunxi-mali-prop/Config.in new file mode 100644 index 0000000000..b9efb4e351 --- /dev/null +++ b/package/sunxi-mali-prop/Config.in @@ -0,0 +1,4 @@ +# Sunxi-mali-prop is a git submodule of sunxi-mali. To use this package +# select the sunxi-mali option. +config BR2_PACKAGE_SUNXI_MALI_PROP + bool diff --git a/package/sunxi-mali-prop/sunxi-mali-prop.mk b/package/sunxi-mali-prop/sunxi-mali-prop.mk new file mode 100644 index 0000000000..b828dc275d --- /dev/null +++ b/package/sunxi-mali-prop/sunxi-mali-prop.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# sunxi-mali-prop +# +################################################################################ + +SUNXI_MALI_PROP_VERSION = 1c5063f43cdc9de341c0d63b2e3921cab86c7742 +SUNXI_MALI_PROP_SITE = $(call github,linux-sunxi,sunxi-mali-proprietary,$(SUNXI_MALI_PROP_VERSION)) + +$(eval $(generic-package)) diff --git a/package/sunxi-mali/0001-Add-missing-GLchar-definitions.patch b/package/sunxi-mali/0001-Add-missing-GLchar-definitions.patch new file mode 100644 index 0000000000..a9370b009d --- /dev/null +++ b/package/sunxi-mali/0001-Add-missing-GLchar-definitions.patch @@ -0,0 +1,45 @@ +From 058d5e8cd90d117535b5d314fd9e15c70028ff20 Mon Sep 17 00:00:00 2001 +From: Eric Le Bihan +Date: Mon, 21 Apr 2014 19:31:23 +0200 +Subject: [PATCH] Add missing GLchar definitions. + +The GLES and GLES2 header files provided by sunxi-mali do not define the +type "GLchar" and use "char" instead in the prototype of some functions. + +This issue has been reported upstream some time ago, but the pull +request has not been merged yet. (See +https://github.com/linux-sunxi/sunxi-mali/pull/8). + +Signed-off-by: Eric Le Bihan +--- + include/GLES/gl.h | 1 + + include/GLES2/gl2.h | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/include/GLES/gl.h b/include/GLES/gl.h +index 858f394..a6bb591 100644 +--- a/include/GLES/gl.h ++++ b/include/GLES/gl.h +@@ -29,6 +29,7 @@ typedef float GLfloat; + typedef float GLclampf; + typedef signed int GLfixed; + typedef signed int GLclampx; ++typedef char GLchar; + + typedef int * GLintptr; + typedef int * GLsizeiptr; +diff --git a/include/GLES2/gl2.h b/include/GLES2/gl2.h +index 59e376c..90d96bb 100644 +--- a/include/GLES2/gl2.h ++++ b/include/GLES2/gl2.h +@@ -32,6 +32,7 @@ typedef unsigned int GLuint; + typedef khronos_float_t GLfloat; + typedef khronos_float_t GLclampf; + typedef khronos_int32_t GLfixed; ++typedef char GLchar; + + /* GL types for handling large vertex buffer objects */ + typedef khronos_intptr_t GLintptr; +-- +1.9.0 + diff --git a/package/sunxi-mali/0002-linking-of-test-app-needs-libUMP.patch b/package/sunxi-mali/0002-linking-of-test-app-needs-libUMP.patch new file mode 100644 index 0000000000..1c8f7ee21b --- /dev/null +++ b/package/sunxi-mali/0002-linking-of-test-app-needs-libUMP.patch @@ -0,0 +1,18 @@ +linking of test app needs libUMP + +Signed-off-by: Francois Perrad + +diff --git a/test/Makefile b/test/Makefile +index 700416e..92085cb 100644 +--- a/test/Makefile ++++ b/test/Makefile +@@ -5,7 +5,7 @@ + all: test + + test: ../config.mk test.c +- $(CC) $(CFLAGS) -o $@ test.c -lEGL -lGLESv2 ++ $(CC) $(CFLAGS) -o $@ test.c -lEGL -lGLESv2 -lUMP + + clean: + rm -f test + diff --git a/package/sunxi-mali/Config.in b/package/sunxi-mali/Config.in new file mode 100644 index 0000000000..f0c1b35898 --- /dev/null +++ b/package/sunxi-mali/Config.in @@ -0,0 +1,69 @@ +config BR2_PACKAGE_SUNXI_MALI + bool "sunxi-mali" + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + select BR2_PACKAGE_LIBUMP + # The egl/gles mali libraries are provided as a git submodule of the + # sunxi-mali repo and are downloaded by the sunxi-mali-prop package. + select BR2_PACKAGE_SUNXI_MALI_PROP + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_arm + help + Install the ARM Mali drivers for sunxi based systems (i.e + systems based on ARM Allwinner SoCs). This driver requires + either the sunxi-kernel with the ARM Mali driver enabled or + the installation of the ARM Mali drivers as an external + module. + + http://github.com/linux-sunxi/sunxi-mali + +if BR2_PACKAGE_SUNXI_MALI + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "sunxi-mali" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "sunxi-mali" + +config BR2_PACKAGE_SUNXI_MALI_DBG + bool "install malitest and maliver tools" + help + Install 3D triangle demo malitest application and the maliver application + which describes the kernel module version. + +choice + prompt "Version" + default BR2_PACKAGE_SUNXI_MALI_R3P0 + help + Select the version of the kernel module. For the sunxi-kernel, the + appropriate version number is r3p0. For other kernels, use the maliver + application to determine the appropriate version. + +config BR2_PACKAGE_SUNXI_MALI_R2P4 + bool "r2p4" + depends on BR2_ARM_EABI + +comment "r2p4 requires an EABI toolchain" + depends on !BR2_ARM_EABI + +config BR2_PACKAGE_SUNXI_MALI_R3P0 + bool "r3p0" + depends on BR2_ARM_EABIHF + +comment "r3p0 requires an EABIhf toolchain" + depends on !BR2_ARM_EABIHF + +config BR2_PACKAGE_SUNXI_MALI_R3P1 + depends on BR2_ARM_EABIHF + bool "r3p1" + +comment "r3p1 requires an EABIhf toolchain" + depends on !BR2_ARM_EABIHF + +endchoice + +endif + +comment "sunxi-mali needs an (e)glibc toolchain" + depends on BR2_arm + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/sunxi-mali/S80mali b/package/sunxi-mali/S80mali new file mode 100644 index 0000000000..ecfbab97b4 --- /dev/null +++ b/package/sunxi-mali/S80mali @@ -0,0 +1,54 @@ +#!/bin/sh -e + +install_driver() { + DRIVER=$1 + OPTS=$2 + + modprobe $DRIVER $OPTS + maj=$(awk "\$2==\"${DRIVER}\" { print \$1; }" /proc/devices) + + rm -f /dev/${DRIVER} + + mknod /dev/${DRIVER} c $maj 0 + chmod 600 /dev/${DRIVER} +} + +start() { + echo "mali: starting driver" + + BITSPERPIXEL="$(fbset | awk '/geom/ {print $6}')" + YRES="$(fbset | awk '/geom/ {print $3}')" + # Set RGBA ordering to something the drivers like + if [ "$BITSPERPIXEL" = "32" ] ; then + fbset -rgba 8/16,8/8,8/0,8/24 + fi + # Try to enable triple buffering when there's enough VRAM + fbset -vyres $(( YRES*3 )) + + install_driver mali + install_driver ump +} + +stop() { + echo "mali: stopping driver" + + rmmod ump + rmmod mali +} + +case "$1" in +start) + start +;; +stop) + stop +;; +restart) + stop + start +;; +*) + echo "mali: Please use start, stop, or restart." + exit 1 +;; +esac diff --git a/package/sunxi-mali/egl.pc b/package/sunxi-mali/egl.pc new file mode 100644 index 0000000000..2823209a72 --- /dev/null +++ b/package/sunxi-mali/egl.pc @@ -0,0 +1,12 @@ +prefix=/usr/ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: egl +Description: ARM Mali implementation of EGL +Version: 1.4 +Requires: +Libs: -L${libdir} -lEGL -lGLESv2 -lUMP +Cflags: -I${includedir} + diff --git a/package/sunxi-mali/glesv2.pc b/package/sunxi-mali/glesv2.pc new file mode 100644 index 0000000000..4702d1394c --- /dev/null +++ b/package/sunxi-mali/glesv2.pc @@ -0,0 +1,12 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: glesv2 +Description: ARM Mali implementation of OpenGL ESv2 +Version: 2.0 +Requires: +Libs: -L${libdir} -lGLESv2 -lGLESv1_CM -lUMP +Cflags: -I${includedir} + diff --git a/package/sunxi-mali/sunxi-mali.mk b/package/sunxi-mali/sunxi-mali.mk new file mode 100644 index 0000000000..3e5443b41b --- /dev/null +++ b/package/sunxi-mali/sunxi-mali.mk @@ -0,0 +1,83 @@ +################################################################################ +# +# sunxi-mali +# +################################################################################ + +SUNXI_MALI_VERSION = d343311efc8db166d8371b28494f0f27b6a58724 +SUNXI_MALI_SITE = $(call github,linux-sunxi,sunxi-mali,$(SUNXI_MALI_VERSION)) + +SUNXI_MALI_INSTALL_STAGING = YES +SUNXI_MALI_DEPENDENCIES = libump sunxi-mali-prop +SUNXI_MALI_PROVIDES = libegl libgles + +# The options below must be provided in the environment. Providing these +# through options overrides the value and prevents the makefiles from +# appending to these variables. This is used throughout the sunxi-mali build +# system. +# +# Furthermore, the -lm -dl -lpthread options are included due to a possible bug +# in the way the linaro 2013.06 toolchain handles shared libraries. +SUNXI_MALI_MAKE_ENV = \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -lm -ldl -lpthread" \ + $(TARGET_MAKE_ENV) + +ifeq ($(BR2_ARM_EABIHF),y) +SUNXI_MALI_MAKE_OPTS += ABI=armhf +else +SUNXI_MALI_MAKE_OPTS += ABI=armel +endif + +SUNXI_MALI_MAKE_OPTS += EGL_TYPE=framebuffer + +ifeq ($(BR2_PACKAGE_SUNXI_MALI_R2P4),y) +SUNXI_MALI_MAKE_OPTS += VERSION=r2p4 +endif +ifeq ($(BR2_PACKAGE_SUNXI_MALI_R3P0),y) +SUNXI_MALI_MAKE_OPTS += VERSION=r3p0 +endif +ifeq ($(BR2_PACKAGE_SUNXI_MALI_R3P1),y) +SUNXI_MALI_MAKE_OPTS += VERSION=r3p1 +endif + +define SUNXI_MALI_GIT_SUBMODULE_FIXUP + rm -rf $(@D)/lib/mali + cp -rf $(SUNXI_MALI_PROP_SRCDIR) $(@D)/lib/mali +endef + +SUNXI_MALI_PRE_CONFIGURE_HOOKS += SUNXI_MALI_GIT_SUBMODULE_FIXUP + +define SUNXI_MALI_BUILD_CMDS + $(SUNXI_MALI_MAKE_ENV) $(MAKE) -C $(@D) $(SUNXI_MALI_MAKE_OPTS) all + $(TARGET_CC) $(TARGET_CFLAGS) -o $(@D)/version/version \ + $(@D)/version/version.c +endef + +define SUNXI_MALI_INSTALL_STAGING_CMDS + $(SUNXI_MALI_MAKE_ENV) $(MAKE) -C $(@D) \ + $(SUNXI_MALI_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install + # test must be built after install because it depends on headers that are + # generated during the install above. + $(SUNXI_MALI_MAKE_ENV) $(MAKE) -C $(@D) $(SUNXI_MALI_MAKE_OPTS) test + $(INSTALL) -D -m 0644 package/sunxi-mali/egl.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/egl.pc + $(INSTALL) -D -m 0644 package/sunxi-mali/glesv2.pc \ + $(STAGING_DIR)/usr/lib/pkgconfig/glesv2.pc +endef + +define SUNXI_MALI_INSTALL_TARGET_CMDS + $(SUNXI_MALI_MAKE_ENV) $(MAKE) -C $(@D)/lib \ + $(SUNXI_MALI_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install + $(if $(BR2_PACKAGE_SUNXI_MALI_DBG), + $(INSTALL) -m 755 $(@D)/version/version $(TARGET_DIR)/usr/bin/maliver; \ + $(INSTALL) -m 755 $(@D)/test/test $(TARGET_DIR)/usr/bin/malitest + ) +endef + +define SUNXI_MALI_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/sunxi-mali/S80mali \ + $(TARGET_DIR)/etc/init.d/S80mali +endef + +$(eval $(generic-package)) diff --git a/package/sunxi-tools/Config.in b/package/sunxi-tools/Config.in new file mode 100644 index 0000000000..16bf2dc57b --- /dev/null +++ b/package/sunxi-tools/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_SUNXI_TOOLS + bool "sunxi nand-part" + depends on BR2_arm + help + nand-part is part of sunxi-tools for Allwinner A10 (aka sun4i) and + A13 (aka sun5i) based devices. It is a tool to repartition the + internal NAND on sunxi devices. + + http://linux-sunxi.org/Sunxi-tools diff --git a/package/sunxi-tools/Config.in.host b/package/sunxi-tools/Config.in.host new file mode 100644 index 0000000000..5fab5e6ff5 --- /dev/null +++ b/package/sunxi-tools/Config.in.host @@ -0,0 +1,12 @@ +config BR2_PACKAGE_HOST_SUNXI_TOOLS + bool "host sunxi-tools" + depends on BR2_arm + help + Tools for Allwinner A10 (aka sun4i) and A13 (aka sun5i) + based devices. This includes fex2bin which can be used to + compile .fex board definition files to the binary script.bin + format required by the linux-sunxi kernel. These tools are + specific for linux-sunxi kernel and do not apply to the + mainline Linux kernel version. + + http://linux-sunxi.org/Sunxi-tools diff --git a/package/sunxi-tools/sunxi-tools.hash b/package/sunxi-tools/sunxi-tools.hash new file mode 100644 index 0000000000..c0499cd0ac --- /dev/null +++ b/package/sunxi-tools/sunxi-tools.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 2aa0afc21476ee9b03acff20a19f32c522106e61bcbfa1a9463168fe90a85fc5 sunxi-tools-v1.3.tar.gz diff --git a/package/sunxi-tools/sunxi-tools.mk b/package/sunxi-tools/sunxi-tools.mk new file mode 100644 index 0000000000..4c497c7ba4 --- /dev/null +++ b/package/sunxi-tools/sunxi-tools.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# sunxi-tools +# +################################################################################ + +SUNXI_TOOLS_VERSION = v1.3 +SUNXI_TOOLS_SITE = $(call github,linux-sunxi,sunxi-tools,$(SUNXI_TOOLS_VERSION)) +SUNXI_TOOLS_LICENSE = GPLv2+ +SUNXI_TOOLS_LICENSE_FILES = COPYING +HOST_SUNXI_TOOLS_DEPENDENCIES = host-libusb host-pkgconf +FEX2BIN = $(HOST_DIR)/usr/bin/fex2bin + +define HOST_SUNXI_TOOLS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) PREFIX=$(HOST_DIR)/usr \ + CFLAGS="$(HOST_CFLAGS) -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/" \ + -C $(@D) tools +endef + +define HOST_SUNXI_TOOLS_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) PREFIX=$(HOST_DIR)/usr \ + -C $(@D) install-tools +endef + +define SUNXI_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) PREFIX=/usr \ + CFLAGS="$(TARGET_CFLAGS) -std=c99 -D_POSIX_C_SOURCE=200112L -Iinclude/" \ + -C $(@D) sunxi-nand-part +endef + +define SUNXI_TOOLS_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/sunxi-nand-part $(TARGET_DIR)/usr/bin/sunxi-nand-part +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/supervisor/Config.in b/package/supervisor/Config.in new file mode 100644 index 0000000000..2ab0e048f6 --- /dev/null +++ b/package/supervisor/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_SUPERVISOR + bool "supervisor" + depends on BR2_PACKAGE_PYTHON + select BR2_PACKAGE_PYTHON_MELD3 + select BR2_PACKAGE_PYTHON_SETUPTOOLS # runtime dependency + help + A client/server system that allows its users to control a + number of processes on UNIX-like operating systems. + + http://supervisord.org/ + +comment "supervisor needs the python interpreter" + depends on !BR2_PACKAGE_PYTHON diff --git a/package/supervisor/S99supervisord b/package/supervisor/S99supervisord new file mode 100755 index 0000000000..921dcf6333 --- /dev/null +++ b/package/supervisor/S99supervisord @@ -0,0 +1,29 @@ +#!/bin/sh + +mkdir -p /var/log/supervisor + +case "$1" in + start) + printf "Starting supervisord: " + start-stop-daemon -S -q -p /var/run/supervisord.pid --exec /usr/bin/supervisord + echo "done" + ;; + stop) + printf "Stopping supervisord: " + start-stop-daemon -K -q -p /var/run/supervisord.pid + echo "done" + ;; + restart) + "$0" stop + sleep 5 + "$0" start + ;; + reload) + start-stop-daemon -K -q -p /var/run/supervisord.pid -s HUP + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac + +exit $? diff --git a/package/supervisor/supervisor.hash b/package/supervisor/supervisor.hash new file mode 100644 index 0000000000..03f337e7d0 --- /dev/null +++ b/package/supervisor/supervisor.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 e32c546fe8d2a6e079ec4819c49fd24534d4075a58af39118d04367918b3c282 supervisor-3.1.3.tar.gz diff --git a/package/supervisor/supervisor.mk b/package/supervisor/supervisor.mk new file mode 100644 index 0000000000..4c62b66feb --- /dev/null +++ b/package/supervisor/supervisor.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# supervisor +# +################################################################################ + +SUPERVISOR_VERSION = 3.1.3 +SUPERVISOR_SITE = http://pypi.python.org/packages/source/s/supervisor +SUPERVISOR_LICENSE = BSD-like, rdflib (http_client.py), PSF (medusa), ZPL-2.1 +SUPERVISOR_LICENSE_FILES = COPYRIGHT.txt LICENSES.txt +SUPERVISOR_SETUP_TYPE = setuptools + +define SUPERVISOR_INSTALL_CONF_FILES + $(INSTALL) -d -m 755 $(TARGET_DIR)/etc/supervisor.d + $(INSTALL) -D -m 644 package/supervisor/supervisord.conf \ + $(TARGET_DIR)/etc/supervisord.conf +endef + +SUPERVISOR_POST_INSTALL_TARGET_HOOKS += SUPERVISOR_INSTALL_CONF_FILES + +define SUPERVISOR_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/supervisor/S99supervisord \ + $(TARGET_DIR)/etc/init.d/S99supervisord +endef + +define SUPERVISOR_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/supervisor/supervisord.service \ + $(TARGET_DIR)/usr/lib/systemd/system/supervisord.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/supervisord.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/supervisord.service +endef + +$(eval $(python-package)) diff --git a/package/supervisor/supervisord.conf b/package/supervisor/supervisord.conf new file mode 100644 index 0000000000..1372a688ab --- /dev/null +++ b/package/supervisor/supervisord.conf @@ -0,0 +1,18 @@ +[unix_http_server] +file = /var/run/supervisor.sock + +[supervisord] +logfile = /var/log/supervisor/supervisord.log +logfile_maxbytes = 200KB +logfile_backups = 1 +pidfile = /var/run/supervisord.pid +childlogdir = /var/log/supervisor + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl = unix:///var/run/supervisor.sock + +[include] +files = /etc/supervisor.d/*.conf diff --git a/package/supervisor/supervisord.service b/package/supervisor/supervisord.service new file mode 100644 index 0000000000..92c38c7d1f --- /dev/null +++ b/package/supervisor/supervisord.service @@ -0,0 +1,10 @@ +[Unit] +Description=Process Control System +After=syslog.target + +[Service] +ExecStart=/usr/bin/supervisord -n +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/swig/swig.hash b/package/swig/swig.hash new file mode 100644 index 0000000000..62e3d20f68 --- /dev/null +++ b/package/swig/swig.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 06dc8816a225667ce1eee545af3caf87e1bbaa379c32838d4cea53152514348d swig-3.0.7.tar.gz diff --git a/package/swig/swig.mk b/package/swig/swig.mk new file mode 100644 index 0000000000..e4bd64cd3d --- /dev/null +++ b/package/swig/swig.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# swig +# +################################################################################ + +SWIG_VERSION_MAJOR = 3.0 +SWIG_VERSION = $(SWIG_VERSION_MAJOR).7 +SWIG_SITE = http://downloads.sourceforge.net/project/swig/swig/swig-$(SWIG_VERSION) +SWIG_DEPENDENCIES = host-bison +HOST_SWIG_CONF_OPTS = \ + --without-pcre \ + --disable-ccache \ + --without-octave +SWIG_LICENSE = GPLv3+, BSD-2c, BSD-3c +SWIG_LICENSE_FILES = LICENSE LICENSE-GPL LICENSE-UNIVERSITIES + +# CMake looks first at swig3.0, then swig2.0 and then swig. However, +# when doing the search, it will look into the PATH for swig2.0 first, +# and then for swig. +# While the PATH contains first our $(HOST_DIR)/usr/bin, it also contains +# /usr/bin and other system directories. Therefore, if there is an +# installed swig3.0 on the system, it will get the preference over the +# swig installed in $(HOST_DIR)/usr/bin, which isn't nice. To prevent +# this from happening we create a symbolic link swig3.0 -> swig, so that +# our swig always gets used. + +define HOST_SWIG_INSTALL_SYMLINK + ln -fs swig $(HOST_DIR)/usr/bin/swig$(SWIG_VERSION_MAJOR) +endef + +HOST_SWIG_POST_INSTALL_HOOKS += HOST_SWIG_INSTALL_SYMLINK + +$(eval $(host-autotools-package)) + +SWIG = $(HOST_DIR)/usr/bin/swig$(SWIG_VERSION_MAJOR) diff --git a/package/swupdate/Config.in b/package/swupdate/Config.in new file mode 100644 index 0000000000..1d14a7cdb4 --- /dev/null +++ b/package/swupdate/Config.in @@ -0,0 +1,58 @@ +config BR2_PACKAGE_SWUPDATE + bool "swupdate" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + # swupdate requires a parser and uses libconfig as default + select BR2_PACKAGE_LIBCONFIG if !BR2_PACKAGE_JSON_C && !BR2_PACKAGE_LUA_5_2 + help + swupdate provides a reliable way to update the software on an + embedded system. + + swupdate is highly configurable to fit the targets requirements and + to minimize the footprint. The provided default configuration file + BR2_PACKAGE_SWUPDATE_CONFIG will enable swupdate with an embedded + webserver, a parser and a handler for raw NAND or NOR flash. + + The default configuration file builds a reasonable firmware update + system with minimal external dependencies in my mind. If you like to + use your own modified configuration, you have to select the + necessary packages manually: + + * Select BR2_PACKAGE_LUA if you want to have Lua support. + * Select BR2_LIBCURL if you want to use the download feature. + * Select BR2_PACKAGE_OPENSSL is you want to add encryptions support + to the webserver. + * Select BR2_PACKAGE_MTD if you want to use swupdate with UBI + partitions. + * Select BR2_PACKAGE_ZLIB if you want to deal with gzip compressed + archives. + * Select BR2_PACKAGE_UBOOT_TOOLS and BR2_PACKAGE_ZLIB to add support + for setting the U-Boot environment. + + https://sbabic.github.io/swupdate + +if BR2_PACKAGE_SWUPDATE + +config BR2_PACKAGE_SWUPDATE_CONFIG + string "swupdate configuration file" + default "package/swupdate/swupdate.config" + help + Path to the swupdate configuration file. + + I you wish to use your own modified swupdate configuration file + specify the config file location with this option. + +config BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE + bool "install default website" + default y + help + Install the provided website to /var/www/swupdate. + + This is necessary if you want to run swupdate with the embedded + webserver and do not provide an own website to be installed to + /var/www/swupdate. +endif + +comment "swupdate needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/swupdate/swupdate.config b/package/swupdate/swupdate.config new file mode 100644 index 0000000000..b5180eeb3c --- /dev/null +++ b/package/swupdate/swupdate.config @@ -0,0 +1,95 @@ +# +# Automatically generated file; DO NOT EDIT. +# Swupdate Configuration +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Swupdate Settings +# + +# +# General Configuration +# +CONFIG_SCRIPTS=y +# CONFIG_HW_COMPATIBILITY is not set +CONFIG_SW_VERSIONS_FILE="/etc/sw-versions" + +# +# MTD support needs libmtd +# + +# +# Lua support needs a Lua interpreter +# +# CONFIG_FEATURE_SYSLOG is not set + +# +# Build Options +# +# CONFIG_STATIC is not set +CONFIG_CROSS_COMPILE="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_WERROR is not set +# CONFIG_NOCLEANUP is not set + +# +# Image downloading support needs libcurl +# +CONFIG_WEBSERVER=y + +# +# Webserver Features +# +CONFIG_MONGOOSE=y + +# +# Mongoose Feature +# +CONFIG_MONGOOSEIPV6=y + +# +# SSL support needs libcrypto, libssl +# + +# +# Archival Features +# +CONFIG_CPIO=y + +# +# gunzip support needs libz +# + +# +# Parser Features +# +CONFIG_LIBCONFIG=y +CONFIG_LIBCONFIGROOT="" + +# +# JSON config parser support needs json-c +# +# CONFIG_SETSWDESCRIPTION is not set + +# +# Image Handlers +# + +# +# ubivol support needs libubi +# +CONFIG_RAW=y +# CONFIG_SHELLSCRIPTHANDLER is not set + +# +# uboot support needs libz +# diff --git a/package/swupdate/swupdate.hash b/package/swupdate/swupdate.hash new file mode 100644 index 0000000000..70299a9b9b --- /dev/null +++ b/package/swupdate/swupdate.hash @@ -0,0 +1,3 @@ +# Locally calculated +sha256 534342ecb89e004edf641945afb49ae185e2599fd93dbcba8dbf1ba77e507f46 swupdate-2016.04.tar.gz +sha256 089393b0c8aec626078bc66f759474fa3d1bb7c48c7ae3c493d981514248fed5 69c0e66994f01ce1bf2299fbce86aee7a1baa37b.patch diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk new file mode 100644 index 0000000000..f49cbaaff5 --- /dev/null +++ b/package/swupdate/swupdate.mk @@ -0,0 +1,130 @@ +################################################################################ +# +# swupdate +# +################################################################################ + +SWUPDATE_VERSION = 2016.04 +SWUPDATE_SITE = $(call github,sbabic,swupdate,$(SWUPDATE_VERSION)) +SWUPDATE_LICENSE = GPLv2+, MIT, Public Domain +SWUPDATE_LICENSE_FILES = COPYING + +# Upstream patch to fix build without MTD support +SWUPDATE_PATCH = https://github.com/sbabic/swupdate/commit/69c0e66994f01ce1bf2299fbce86aee7a1baa37b.patch + +# swupdate bundles its own version of mongoose (version 3.8) + +ifeq ($(BR2_PACKAGE_JSON_C),y) +SWUPDATE_DEPENDENCIES += json-c +SWUPDATE_MAKE_ENV += HAVE_JSON_C=y +else +SWUPDATE_MAKE_ENV += HAVE_JSON_C=n +endif + +ifeq ($(BR2_PACKAGE_LIBARCHIVE),y) +SWUPDATE_DEPENDENCIES += libarchive +SWUPDATE_MAKE_ENV += HAVE_LIBARCHIVE=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBARCHIVE=n +endif + +ifeq ($(BR2_PACKAGE_LIBCONFIG),y) +SWUPDATE_DEPENDENCIES += libconfig +SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBCONFIG=n +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +SWUPDATE_DEPENDENCIES += libcurl +SWUPDATE_MAKE_ENV += HAVE_LIBCURL=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBCURL=n +endif + +ifeq ($(BR2_PACKAGE_LUA),y) +SWUPDATE_DEPENDENCIES += lua host-pkgconf +SWUPDATE_MAKE_ENV += HAVE_LUA=y +else +SWUPDATE_MAKE_ENV += HAVE_LUA=n +endif + +ifeq ($(BR2_PACKAGE_MTD),y) +SWUPDATE_DEPENDENCIES += mtd +SWUPDATE_MAKE_ENV += HAVE_LIBMTD=y +SWUPDATE_MAKE_ENV += HAVE_LIBUBI=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBMTD=n +SWUPDATE_MAKE_ENV += HAVE_LIBUBI=n +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SWUPDATE_DEPENDENCIES += openssl +SWUPDATE_MAKE_ENV += HAVE_LIBSSL=y +SWUPDATE_MAKE_ENV += HAVE_LIBCRYPTO=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBSSL=n +SWUPDATE_MAKE_ENV += HAVE_LIBCRYPTO=n +endif + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS),y) +SWUPDATE_DEPENDENCIES += uboot-tools +SWUPDATE_MAKE_ENV += HAVE_LIBUBOOTENV=y +else +SWUPDATE_MAKE_ENV += HAVE_LIBUBOOTENV=n +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +SWUPDATE_DEPENDENCIES += zlib +SWUPDATE_MAKE_ENV += HAVE_ZLIB=y +else +SWUPDATE_MAKE_ENV += HAVE_ZLIB=n +endif + +SWUPDATE_BUILD_CONFIG = $(@D)/.config + +SWUPDATE_KCONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_SWUPDATE_CONFIG)) +SWUPDATE_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig + +ifeq ($(BR2_PREFER_STATIC_LIB),y) +define SWUPDATE_PREFER_STATIC + $(call KCONFIG_ENABLE_OPT,CONFIG_STATIC,$(SWUPDATE_BUILD_CONFIG)) +endef +endif + +define SWUPDATE_SET_BUILD_OPTIONS + $(call KCONFIG_SET_OPT,CONFIG_CROSS_COMPILE,"$(TARGET_CROSS)", \ + $(SWUPDATE_BUILD_CONFIG)) + $(call KCONFIG_SET_OPT,CONFIG_SYSROOT,"$(STAGING_DIR)", \ + $(SWUPDATE_BUILD_CONFIG)) + $(call KCONFIG_SET_OPT,CONFIG_EXTRA_CFLAGS,"$(TARGET_CFLAGS)", \ + $(SWUPDATE_BUILD_CONFIG)) + $(call KCONFIG_SET_OPT,CONFIG_EXTRA_LDFLAGS,"$(TARGET_LDFLAGS)", \ + $(SWUPDATE_BUILD_CONFIG)) +endef + +define SWUPDATE_KCONFIG_FIXUP_CMDS + $(SWUPDATE_PREFER_STATIC) + $(SWUPDATE_SET_BUILD_OPTIONS) +endef + +define SWUPDATE_BUILD_CMDS + $(TARGET_MAKE_ENV) $(SWUPDATE_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define SWUPDATE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/swupdate $(TARGET_DIR)/usr/bin/swupdate + $(if $(BR2_PACKAGE_SWUPDATE_INSTALL_WEBSITE), \ + mkdir -p $(TARGET_DIR)/var/www/swupdate; \ + cp -dpf $(@D)/www/* $(TARGET_DIR)/var/www/swupdate) +endef + +# Checks to give errors that the user can understand +# Must be before we call to kconfig-package +ifeq ($(BR2_PACKAGE_SWUPDATE)$(BR_BUILDING),yy) +ifeq ($(call qstrip,$(BR2_PACKAGE_SWUPDATE_CONFIG)),) +$(error No Swupdate configuration file specified, check your BR2_PACKAGE_SWUPDATE_CONFIG setting) +endif +endif + +$(eval $(kconfig-package)) diff --git a/package/sylpheed/Config.in b/package/sylpheed/Config.in new file mode 100644 index 0000000000..f03ae87706 --- /dev/null +++ b/package/sylpheed/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_SYLPHEED + bool "sylpheed" + depends on BR2_PACKAGE_LIBGTK2 + help + lightweight and user-friendly e-mail client. + + http://sylpheed.sraoss.jp/en/ diff --git a/package/sylpheed/sylpheed.hash b/package/sylpheed/sylpheed.hash new file mode 100644 index 0000000000..39c0927735 --- /dev/null +++ b/package/sylpheed/sylpheed.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 4aeb7c6436ad485a2cc101dd68a1fb84abcad4c6471ed9ddefec65e482e5b2b1 sylpheed-3.2.0.tar.bz2 diff --git a/package/sylpheed/sylpheed.mk b/package/sylpheed/sylpheed.mk new file mode 100644 index 0000000000..8d426233b2 --- /dev/null +++ b/package/sylpheed/sylpheed.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# sylpheed +# +################################################################################ + +SYLPHEED_VERSION_MAJOR = 3.2 +SYLPHEED_VERSION = $(SYLPHEED_VERSION_MAJOR).0 +SYLPHEED_SOURCE = sylpheed-$(SYLPHEED_VERSION).tar.bz2 +SYLPHEED_SITE = http://sylpheed.sraoss.jp/sylpheed/v$(SYLPHEED_VERSION_MAJOR) +SYLPHEED_LICENSE = GPLv2+ (executables), LGPLv2.1+ (library, attachment plugin) +SYLPHEED_LICENSE_FILES = COPYING COPYING.LIB +SYLPHEED_CONF_OPTS = --disable-gtkspell --disable-gpgme +SYLPHEED_DEPENDENCIES = host-pkgconf libgtk2 + +# Remove the -I$(includedir) from the Makefiles +# because it refers to the host /usr/include. +define SYLPHEED_PRECONFIGURE + for i in $$(find $(@D) -name "Makefile*"); do \ + sed -i 's:-I$$(includedir)::g' $$i; \ + done +endef + +SYLPHEED_PRE_CONFIGURE_HOOKS += SYLPHEED_PRECONFIGURE + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +SYLPHEED_DEPENDENCIES += openssl +SYLPHEED_CONF_OPTS += --enable-ssl +else +SYLPHEED_CONF_OPTS += --disable-ssl +endif + +$(eval $(autotools-package)) diff --git a/package/synergy/0001-includes.patch b/package/synergy/0001-includes.patch new file mode 100644 index 0000000000..accaf8292a --- /dev/null +++ b/package/synergy/0001-includes.patch @@ -0,0 +1,167 @@ +[PATCH] fix build with modern toolchains + +Several files are missing the correct includes for exit/getenvmemcpy/strlen/.. + +Signed-off-by: Peter Korsgaard +--- + lib/arch/CArchDaemonUnix.cpp | 1 + + lib/arch/CMultibyte.cpp | 1 + + lib/base/CStringUtil.cpp | 1 + + lib/client/CClient.cpp | 3 ++- + lib/client/CServerProxy.cpp | 1 + + lib/net/CTCPSocket.cpp | 2 +- + lib/platform/CXWindowsScreen.cpp | 1 + + lib/server/CClientProxy1_3.cpp | 1 + + lib/server/CServer.cpp | 1 + + lib/synergy/CPacketStreamFilter.cpp | 1 + + lib/synergy/IKeyState.cpp | 1 + + lib/synergy/IPrimaryScreen.cpp | 1 + + 12 files changed, 13 insertions(+), 2 deletions(-) + +Index: synergy-1.3.1/lib/arch/CArchDaemonUnix.cpp +=================================================================== +--- synergy-1.3.1.orig/lib/arch/CArchDaemonUnix.cpp ++++ synergy-1.3.1/lib/arch/CArchDaemonUnix.cpp +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + // + // CArchDaemonUnix +Index: synergy-1.3.1/lib/arch/CMultibyte.cpp +=================================================================== +--- synergy-1.3.1.orig/lib/arch/CMultibyte.cpp ++++ synergy-1.3.1/lib/arch/CMultibyte.cpp +@@ -19,6 +19,7 @@ + #include "CArch.h" + #include + #include ++#include + #if HAVE_LOCALE_H + # include + #endif +Index: synergy-1.3.1/lib/base/CStringUtil.cpp +=================================================================== +--- synergy-1.3.1.orig/lib/base/CStringUtil.cpp ++++ synergy-1.3.1/lib/base/CStringUtil.cpp +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + + // +Index: synergy-1.3.1/lib/client/CClient.cpp +=================================================================== +--- synergy-1.3.1.orig/lib/client/CClient.cpp ++++ synergy-1.3.1/lib/client/CClient.cpp +@@ -26,7 +26,8 @@ + #include "CLog.h" + #include "IEventQueue.h" + #include "TMethodEventJob.h" +- ++#include ++#include + // + // CClient + // +Index: synergy-1.3.1/lib/client/CServerProxy.cpp +=================================================================== +--- synergy-1.3.1.orig/lib/client/CServerProxy.cpp ++++ synergy-1.3.1/lib/client/CServerProxy.cpp +@@ -24,6 +24,7 @@ + #include "TMethodEventJob.h" + #include "XBase.h" + #include ++#include + + // + // CServerProxy +Index: synergy-1.3.1/lib/net/CTCPSocket.cpp +=================================================================== +--- synergy-1.3.1.orig/lib/net/CTCPSocket.cpp ++++ synergy-1.3.1/lib/net/CTCPSocket.cpp +@@ -24,7 +24,7 @@ + #include "CArch.h" + #include "XArch.h" + #include +- ++#include + // + // CTCPSocket + // +Index: synergy-1.3.1/lib/platform/CXWindowsScreen.cpp +=================================================================== +--- synergy-1.3.1.orig/lib/platform/CXWindowsScreen.cpp ++++ synergy-1.3.1/lib/platform/CXWindowsScreen.cpp +@@ -27,6 +27,7 @@ + #include "IEventQueue.h" + #include "TMethodEventJob.h" + #include ++#include + #if X_DISPLAY_MISSING + # error X11 is required to build synergy + #else +Index: synergy-1.3.1/lib/server/CClientProxy1_3.cpp +=================================================================== +--- synergy-1.3.1.orig/lib/server/CClientProxy1_3.cpp ++++ synergy-1.3.1/lib/server/CClientProxy1_3.cpp +@@ -17,6 +17,7 @@ + #include "CLog.h" + #include "IEventQueue.h" + #include "TMethodEventJob.h" ++#include + + // + // CClientProxy1_3 +Index: synergy-1.3.1/lib/server/CServer.cpp +=================================================================== +--- synergy-1.3.1.orig/lib/server/CServer.cpp ++++ synergy-1.3.1/lib/server/CServer.cpp +@@ -29,6 +29,7 @@ + #include "TMethodEventJob.h" + #include "CArch.h" + #include ++#include + + // + // CServer +Index: synergy-1.3.1/lib/synergy/CPacketStreamFilter.cpp +=================================================================== +--- synergy-1.3.1.orig/lib/synergy/CPacketStreamFilter.cpp ++++ synergy-1.3.1/lib/synergy/CPacketStreamFilter.cpp +@@ -16,6 +16,7 @@ + #include "IEventQueue.h" + #include "CLock.h" + #include "TMethodEventJob.h" ++#include + + // + // CPacketStreamFilter +Index: synergy-1.3.1/lib/synergy/IKeyState.cpp +=================================================================== +--- synergy-1.3.1.orig/lib/synergy/IKeyState.cpp ++++ synergy-1.3.1/lib/synergy/IKeyState.cpp +@@ -14,6 +14,7 @@ + + #include "IKeyState.h" + #include ++#include + + // + // IKeyState +Index: synergy-1.3.1/lib/synergy/IPrimaryScreen.cpp +=================================================================== +--- synergy-1.3.1.orig/lib/synergy/IPrimaryScreen.cpp ++++ synergy-1.3.1/lib/synergy/IPrimaryScreen.cpp +@@ -13,6 +13,7 @@ + */ + + #include "IPrimaryScreen.h" ++#include + + // + // IPrimaryScreen diff --git a/package/synergy/0002-remove-werror.patch b/package/synergy/0002-remove-werror.patch new file mode 100644 index 0000000000..31a8c2b510 --- /dev/null +++ b/package/synergy/0002-remove-werror.patch @@ -0,0 +1,16 @@ +Remove -Werror from CXXFLAGS + +Signed-off-by: Markos Chandras + +Index: synergy-1.3.1/configure.in +=================================================================== +--- synergy-1.3.1.orig/configure.in ++++ synergy-1.3.1/configure.in +@@ -239,7 +239,6 @@ dnl checks for system services + + dnl enable maximum compiler warnings and warnings are errors. + ACX_CXX_WARNINGS +-ACX_CXX_WARNINGS_ARE_ERRORS + + dnl adjust compiler and linker variables + CXXFLAGS="$CXXFLAGS $SYNERGY_CXXFLAGS $ARCH_CFLAGS" diff --git a/package/synergy/Config.in b/package/synergy/Config.in new file mode 100644 index 0000000000..6b64b79e34 --- /dev/null +++ b/package/synergy/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_SYNERGY + bool "synergy" + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBXTST + help + Synergy lets you easily share a single mouse and + keyboard between multiple computers with different + operating systems, each with its own display, + without special hardware. + + http://synergy2.sourceforge.net/ + +comment "synergy needs a toolchain w/ C++, wchar" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR) diff --git a/package/synergy/synergy.hash b/package/synergy/synergy.hash new file mode 100644 index 0000000000..2a6950e327 --- /dev/null +++ b/package/synergy/synergy.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 4a15e26456498dda5f3aa7d688a4892e0c50394a2f01685136fbc954bacc9691 synergy-1.3.1.tar.gz diff --git a/package/synergy/synergy.mk b/package/synergy/synergy.mk new file mode 100644 index 0000000000..7b52085a3e --- /dev/null +++ b/package/synergy/synergy.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# synergy +# +################################################################################ + +SYNERGY_VERSION = 1.3.1 +SYNERGY_SITE = http://downloads.sourceforge.net/project/synergy2/Sources/$(SYNERGY_VERSION) +SYNERGY_AUTORECONF = YES +SYNERGY_CONF_OPTS = \ + --x-includes=$(STAGING_DIR)/usr/include/X11 \ + --x-libraries=$(STAGING_DIR)/usr/lib +SYNERGY_DEPENDENCIES = \ + xlib_libXtst \ + $(if $(BR2_PACKAGE_XLIB_LIBXINERAMA),xlib_libXinerama) +SYNERGY_LICENSE = GPLv2 +SYNERGY_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/sysdig/Config.in b/package/sysdig/Config.in new file mode 100644 index 0000000000..dfb9db5065 --- /dev/null +++ b/package/sysdig/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_SYSDIG + bool "sysdig" + depends on BR2_LINUX_KERNEL + depends on BR2_INSTALL_LIBSTDCPP # libjson + depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 # jsoncpp + depends on !BR2_STATIC_LIBS # luajit + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_LUAJIT + select BR2_PACKAGE_JSONCPP + help + Sysdig is open source, system-level exploration: + capture system state and activity from a running Linux instance, + then save, filter and analyze. + Think of it as strace + tcpdump + lsof + awesome sauce. + With a little Lua cherry on top. + + http://sysdig.org + +comment "sysdig needs a toolchain w/ C++, gcc >= 4.7, dynamic library and a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 || BR2_STATIC_LIBS + depends on BR2_PACKAGE_LUAJIT_ARCH_SUPPORTS diff --git a/package/sysdig/sysdig.mk b/package/sysdig/sysdig.mk new file mode 100644 index 0000000000..85d16a4d49 --- /dev/null +++ b/package/sysdig/sysdig.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# sysdig +# +################################################################################ + +SYSDIG_VERSION = 0.1.100 +SYSDIG_SITE = $(call github,draios,sysdig,$(SYSDIG_VERSION)) +SYSDIG_LICENSE = GPLv2 +SYSDIG_LICENSE_FILES = COPYING +SYSDIG_CONF_OPTS = -DUSE_BUNDLED_LUAJIT=OFF -DUSE_BUNDLED_ZLIB=OFF \ + -DUSE_BUNDLED_JSONCPP=OFF -DENABLE_DKMS=OFF +SYSDIG_DEPENDENCIES = zlib luajit jsoncpp +SYSDIG_SUPPORTS_IN_SOURCE_BUILD = NO + +# sysdig creates the module Makefile from a template, which contains a +# single place-holder, KBUILD_FLAGS, wich is only replaced with two +# things: +# - debug flags, which we don't care about here, +# - 'sysdig-feature' flags, which are never set, so always empty +# So, just replace the place-holder with the only meaningful value: nothing. +define SYSDIG_MODULE_GEN_MAKEFILE + $(INSTALL) -m 0644 $(@D)/driver/Makefile.in $(@D)/driver/Makefile + $(SED) 's/@KBUILD_FLAGS@//;' $(@D)/driver/Makefile +endef +SYSDIG_POST_PATCH_HOOKS += SYSDIG_MODULE_GEN_MAKEFILE + +# Don't build the driver as part of the 'standard' procedure, we'll +# build it on our own with the kernel-module infra. +SYSDIG_CONF_OPTS += -DBUILD_DRIVER=OFF + +SYSDIG_MODULE_SUBDIRS = driver +SYSDIG_MODULE_MAKE_OPTS = KERNELDIR=$(LINUX_DIR) + +$(eval $(kernel-module)) +$(eval $(cmake-package)) diff --git a/package/sysklogd/Config.in b/package/sysklogd/Config.in new file mode 100644 index 0000000000..64464c432c --- /dev/null +++ b/package/sysklogd/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_SYSKLOGD + bool "syslogd & klogd" + depends on BR2_USE_MMU # fork() + help + System log daemons syslogd and klogd. + + http://www.infodrom.org/projects/sysklogd/ diff --git a/package/sysklogd/S01logging b/package/sysklogd/S01logging new file mode 100644 index 0000000000..1cbfe869fa --- /dev/null +++ b/package/sysklogd/S01logging @@ -0,0 +1,25 @@ +#!/bin/sh + +case "$1" in + start) + printf "Starting logging: " + /sbin/syslogd -m 0 + /sbin/klogd + echo "OK" + ;; + stop) + printf "Stopping logging: " + [ -f /var/run/klogd.pid ] && kill `cat /var/run/klogd.pid` + [ -f /var/run/syslogd.pid ] && kill `cat /var/run/syslogd.pid` + echo "OK" + ;; + restart|reload) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/sysklogd/sysklogd.hash b/package/sysklogd/sysklogd.hash new file mode 100644 index 0000000000..dd5b89a884 --- /dev/null +++ b/package/sysklogd/sysklogd.hash @@ -0,0 +1,2 @@ +# Locally calculated from download (no sig, hash) +sha256 5166c185ae23c92e8b9feee66a6e3d0bc944bf673112f53e3ecf62e08ce7c201 sysklogd-1.5.1.tar.gz diff --git a/package/sysklogd/sysklogd.mk b/package/sysklogd/sysklogd.mk new file mode 100644 index 0000000000..49997d4f23 --- /dev/null +++ b/package/sysklogd/sysklogd.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# sysklogd +# +################################################################################ + +SYSKLOGD_VERSION = 1.5.1 +SYSKLOGD_SITE = http://www.infodrom.org/projects/sysklogd/download +SYSKLOGD_LICENSE = GPLv2+ +SYSKLOGD_LICENSE_FILES = COPYING + +# Override BusyBox implementations if BusyBox is enabled. +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +SYSKLOGD_DEPENDENCIES = busybox +endif + +# Override SKFLAGS which is used as CFLAGS. +define SYSKLOGD_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) SKFLAGS="$(TARGET_CFLAGS) -DSYSV" \ + -C $(@D) +endef + +define SYSKLOGD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0500 $(@D)/syslogd $(TARGET_DIR)/sbin/syslogd + $(INSTALL) -D -m 0500 $(@D)/klogd $(TARGET_DIR)/sbin/klogd + $(INSTALL) -D -m 0644 package/sysklogd/syslog.conf \ + $(TARGET_DIR)/etc/syslog.conf +endef + +define SYSKLOGD_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/sysklogd/S01logging \ + $(TARGET_DIR)/etc/init.d/S01logging +endef + +$(eval $(generic-package)) diff --git a/package/sysklogd/syslog.conf b/package/sysklogd/syslog.conf new file mode 100644 index 0000000000..3184139052 --- /dev/null +++ b/package/sysklogd/syslog.conf @@ -0,0 +1,7 @@ +# /etc/syslog.conf - Configuration file for syslogd + +auth,authpriv.* /var/log/auth.log +*.*;auth,authpriv.none /var/log/messages +user.* /var/log/user.log + +*.emerg * diff --git a/package/syslog-ng/Config.in b/package/syslog-ng/Config.in new file mode 100644 index 0000000000..fdc8d9f220 --- /dev/null +++ b/package/syslog-ng/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_SYSLOG_NG + bool "syslog-ng" + select BR2_PACKAGE_EVENTLOG + select BR2_PACKAGE_LIBGLIB2 + select BR2_PACKAGE_PCRE + select BR2_PACKAGE_OPENSSL + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + syslog-ng is an enhanced log daemon, supporting a wide range + of input and output methods: syslog, unstructured text, + queueing, SQL & NoSQL + + https://syslog-ng.org/ + +comment "syslog-ng needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/syslog-ng/S01logging b/package/syslog-ng/S01logging new file mode 100644 index 0000000000..d7c899a1e3 --- /dev/null +++ b/package/syslog-ng/S01logging @@ -0,0 +1,38 @@ +#!/bin/sh + +start() { + printf "Starting syslog-ng daemon: " + start-stop-daemon -S -q -p /var/run/syslog-ng.pid \ + -x /usr/sbin/syslog-ng -- --pidfile /var/run/syslog-ng.pid + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping syslog-ng daemon: " + start-stop-daemon -K -q -p /var/run/syslog-ng.pid \ + -x /usr/sbin/syslog-ng + [ $? = 0 ] && echo "OK" || echo "FAIL" +} + +restart() { + stop + sleep 1 + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/package/syslog-ng/syslog-ng.conf b/package/syslog-ng/syslog-ng.conf new file mode 100644 index 0000000000..0b4a860cfa --- /dev/null +++ b/package/syslog-ng/syslog-ng.conf @@ -0,0 +1,16 @@ +@version: 3.7 + +source s_sys { + file("/proc/kmsg" program_override("kernel")); + unix-stream ("/dev/log"); + internal(); +}; + +destination d_all { + file("/var/log/messages"); +}; + +log { + source(s_sys); + destination(d_all); +}; diff --git a/package/syslog-ng/syslog-ng.hash b/package/syslog-ng/syslog-ng.hash new file mode 100644 index 0000000000..0213d2dadc --- /dev/null +++ b/package/syslog-ng/syslog-ng.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 b1b3ccc0ce7f0d8bf15b23e59f2f4f5ded70eed410dfd27105219bc8856388a5 syslog-ng-3.7.2.tar.gz diff --git a/package/syslog-ng/syslog-ng.mk b/package/syslog-ng/syslog-ng.mk new file mode 100644 index 0000000000..1acaad8dea --- /dev/null +++ b/package/syslog-ng/syslog-ng.mk @@ -0,0 +1,99 @@ +################################################################################ +# +# syslog-ng +# +################################################################################ + +SYSLOG_NG_VERSION = 3.7.2 +SYSLOG_NG_SOURCE = syslog-ng-$(SYSLOG_NG_VERSION).tar.gz +SYSLOG_NG_SITE = https://github.com/balabit/syslog-ng/releases/download/syslog-ng-$(SYSLOG_NG_VERSION) +SYSLOG_NG_LICENSE = LGPLv2.1+ (syslog-ng core), GPLv2+ (modules) +SYSLOG_NG_LICENSE_FILES = COPYING +SYSLOG_NG_DEPENDENCIES = host-bison host-flex host-pkgconf \ + eventlog libglib2 openssl pcre +# rabbit-mq needs -lrt +SYSLOG_NG_CONF_ENV = LIBS=-lrt +SYSLOG_NG_CONF_OPTS = --disable-manpages + +# We override busybox's S01logging init script +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +SYSLOG_NG_DEPENDENCIES += busybox +endif + +ifeq ($(BR2_PACKAGE_GEOIP),y) +SYSLOG_NG_DEPENDENCIES += geoip +SYSLOG_NG_CONF_OPTS += --enable-geoip +else +SYSLOG_NG_CONF_OPTS += --disable-geoip +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +SYSLOG_NG_DEPENDENCIES += libcap +SYSLOG_NG_CONF_OPTS += --enable-linux-caps +else +SYSLOG_NG_CONF_OPTS += --disable-linux-caps +endif + +ifeq ($(BR2_PACKAGE_PYTHON),y) +SYSLOG_NG_DEPENDENCIES += python +SYSLOG_NG_CONF_OPTS += \ + --enable-python \ + --with-python=$(PYTHON_VERSION_MAJOR) +else ifeq ($(BR2_PACKAGE_PYTHON3),y) +SYSLOG_NG_DEPENDENCIES += python3 +SYSLOG_NG_CONF_OPTS += \ + --enable-python \ + --with-python=$(PYTHON3_VERSION_MAJOR) +else +SYSLOG_NG_CONF_OPTS += \ + --disable-python \ + --without-python +endif + +ifeq ($(BR2_PACKAGE_LIBESMTP),y) +SYSLOG_NG_DEPENDENCIES += libesmtp +SYSLOG_NG_CONF_OPTS += --enable-smtp +SYSLOG_NG_CONF_OPTS += --with-libesmtp="$(STAGING_DIR)/usr" +else +SYSLOG_NG_CONF_OPTS += --disable-smtp +endif + +ifeq ($(BR2_PACKAGE_JSON_C),y) +SYSLOG_NG_DEPENDENCIES += json-c +SYSLOG_NG_CONF_OPTS += --enable-json +else +SYSLOG_NG_CONF_OPTS += --disable-json +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +SYSLOG_NG_DEPENDENCIES += util-linux +endif + +ifeq ($(BR2_INIT_SYSTEMD),y) +SYSLOG_NG_DEPENDENCIES += systemd +SYSLOG_NG_CONF_OPTS += \ + --enable-systemd \ + --with-systemdsystemunitdir=/usr/lib/systemd/system +else +SYSLOG_NG_CONF_OPTS += --disable-systemd +endif + +define SYSLOG_NG_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/syslog-ng/S01logging \ + $(TARGET_DIR)/etc/init.d/S01logging +endef + +# By default syslog-ng installs a number of sample configuration +# files. Some of these rely on optional features being +# enabled. Because of this buildroot uninstalls the shipped config +# files and provides a simplified configuration. +define SYSLOG_NG_FIXUP_CONFIG + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + DESTDIR=$(TARGET_DIR) scl-uninstall-local + $(INSTALL) -D -m 0644 package/syslog-ng/syslog-ng.conf \ + $(TARGET_DIR)/etc/syslog-ng.conf +endef + +SYSLOG_NG_POST_INSTALL_TARGET_HOOKS = SYSLOG_NG_FIXUP_CONFIG + +$(eval $(autotools-package)) diff --git a/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch b/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch new file mode 100644 index 0000000000..dcc2cbe67c --- /dev/null +++ b/package/sysprof/0001-define-NT_GNU_BUILD_ID.patch @@ -0,0 +1,22 @@ +On uclibc elf.h does not have GNU extentions but we need this define +so we define it locally if its not getting it from elf.h + +Signed-off-by: Khem Raj + +Upstream-Status: Pending + +Index: git/elfparser.h +=================================================================== +--- git.orig/elfparser.h 2011-07-16 18:57:41.000000000 -0700 ++++ git/elfparser.h 2011-07-16 20:28:54.733829895 -0700 +@@ -17,6 +17,10 @@ + */ + #include + ++#ifndef NT_GNU_BUILD_ID ++#define NT_GNU_BUILD_ID 3 ++#endif ++ + typedef struct ElfSym ElfSym; + typedef struct ElfParser ElfParser; + diff --git a/package/sysprof/Config.in b/package/sysprof/Config.in new file mode 100644 index 0000000000..e1b0488e84 --- /dev/null +++ b/package/sysprof/Config.in @@ -0,0 +1,31 @@ +config BR2_PACKAGE_SYSPROF + bool "sysprof" + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + depends on BR2_USE_MMU # glib2 + # In its util.h file, sysprof contains architecture-specific + # code + depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_sh4a || BR2_sh4aeb + help + Sysprof is a statistical, system-wide profiler that can + profile user and kernel code using the perf API. + + http://sysprof.com + +if BR2_PACKAGE_SYSPROF + +config BR2_PACKAGE_SYSPROF_GUI + bool "sysprof GUI" + depends on BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_LIBGLADE + select BR2_PACKAGE_GDK_PIXBUF + help + GUI for the sysprof system-wide statistical profiler. + +endif + +comment "sysprof needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_i386 || BR2_x86_64 || BR2_powerpc || BR2_sh4a || BR2_sh4aeb + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/sysprof/sysprof.hash b/package/sysprof/sysprof.hash new file mode 100644 index 0000000000..8541ecc1a1 --- /dev/null +++ b/package/sysprof/sysprof.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 baf03c6fc01a845c705873e6fc7927aa89539dcda6963f9ec4c8eb4c086a64f1 sysprof-1.2.0.tar.gz diff --git a/package/sysprof/sysprof.mk b/package/sysprof/sysprof.mk new file mode 100644 index 0000000000..0650781e48 --- /dev/null +++ b/package/sysprof/sysprof.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# sysprof +# +################################################################################ + +SYSPROF_VERSION = 1.2.0 +SYSPROF_SITE = http://sysprof.com +SYSPROF_DEPENDENCIES = libglib2 +SYSPROF_LICENSE = GPLv2+ +SYSPROF_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_SYSPROF_GUI),y) +SYSPROF_DEPENDENCIES += libgtk2 libglade gdk-pixbuf +endif + +define SYSPROF_CREATE_M4_DIR + mkdir -p $(@D)/m4 +endef + +SYSPROF_POST_PATCH_HOOKS += SYSPROF_CREATE_M4_DIR + +$(eval $(autotools-package)) diff --git a/package/sysstat/Config.in b/package/sysstat/Config.in new file mode 100644 index 0000000000..c262799104 --- /dev/null +++ b/package/sysstat/Config.in @@ -0,0 +1,41 @@ +config BR2_PACKAGE_SYSSTAT + bool "sysstat" + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + # Uses fork() + depends on BR2_USE_MMU + help + The sysstat utilities are a collection of performance + monitoring tools for Linux. These include sar, sadf, mpstat, + iostat, pidstat and sa tools. + + Some Features : + + * Input / Output and transfer rate statistics (global, per + device, per partition, per network filesystem and per + Linux task / PID) + * CPU statistics (global, per CPU and per Linux task / + PID), including support for virtualization architectures + * Memory and swap space utilization statistics + * Virtual memory, paging and fault statistics + * Per-task (per-PID) memory and page fault statistics + * Global CPU and page fault statistics for tasks and all + their children + * Process creation activity + * Interrupt statistics (global, per CPU and per interrupt, + including potential APIC interrupt sources) + * Extensive network statistics: network interface activity + (number of packets and kB received and transmitted per + second, etc.) including failures from network devices; + network traffic statistics for IP, TCP, ICMP and UDP + protocols based on SNMPv2 standards; support for + IPv6-related protocols. + * NFS server and client activity + * Socket statistics + * Run queue and system load statistics + * Kernel internal tables utilization statistics + * System and per Linux task switching activity + * Swapping statistics + * TTY device activity + * Power management statistics + + http://pagesperso-orange.fr/sebastien.godard/ diff --git a/package/sysstat/sysstat.hash b/package/sysstat/sysstat.hash new file mode 100644 index 0000000000..655cafe2b8 --- /dev/null +++ b/package/sysstat/sysstat.hash @@ -0,0 +1,2 @@ +# From: http://sebastien.godard.pagesperso-orange.fr/download.html +sha1 7e9422e985b65728d007bd38d4a8d090aa795826 sysstat-11.2.3.tar.xz diff --git a/package/sysstat/sysstat.mk b/package/sysstat/sysstat.mk new file mode 100644 index 0000000000..a16054f3dd --- /dev/null +++ b/package/sysstat/sysstat.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# sysstat +# +################################################################################ + +SYSSTAT_VERSION = 11.2.3 +SYSSTAT_SOURCE = sysstat-$(SYSSTAT_VERSION).tar.xz +SYSSTAT_SITE = http://pagesperso-orange.fr/sebastien.godard +SYSSTAT_CONF_OPTS = --disable-man-group --disable-sensors +SYSSTAT_DEPENDENCIES = host-gettext +SYSSTAT_LICENSE = GPLv2+ +SYSSTAT_LICENSE_FILES = COPYING + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +SYSSTAT_DEPENDENCIES += gettext +SYSSTAT_MAKE_OPTS += LFLAGS="$(TARGET_LDFLAGS) -lintl" +endif + +# The isag tool is a post processing script that depends on tcl/tk +# among other things. So we don't install it. +SYSSTAT_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) INSTALL_ISAG=n install + +$(eval $(autotools-package)) diff --git a/package/systemd/0001-fix-getty-unit.patch b/package/systemd/0001-fix-getty-unit.patch new file mode 100644 index 0000000000..8ec3bcf25a --- /dev/null +++ b/package/systemd/0001-fix-getty-unit.patch @@ -0,0 +1,30 @@ +Prefer getty to agetty in console setup systemd units + +Signed-off-by: Maxime Ripard +Signed-off-by: Eric Le Bihan +--- + +diff -aburN systemd-212.orig/units/getty@.service.m4 systemd-212/units/getty@.service.m4 +--- systemd-212.orig/units/getty@.service.m4 2014-01-28 11:08:51.000000000 +0100 ++++ systemd-212/units/getty@.service.m4 2014-03-26 11:06:27.000000000 +0100 +@@ -27,7 +27,7 @@ + + [Service] + # the VT is cleared by TTYVTDisallocate +-ExecStart=-/sbin/agetty --noclear %I $TERM ++ExecStart=-/sbin/getty -L %I 115200 vt100 + Type=idle + Restart=always + RestartSec=0 +diff -aburN systemd-212.orig/units/serial-getty@.service.m4 systemd-212/units/serial-getty@.service.m4 +--- systemd-212.orig/units/serial-getty@.service.m4 2014-03-13 18:47:24.000000000 +0100 ++++ systemd-212/units/serial-getty@.service.m4 2014-03-26 11:07:01.000000000 +0100 +@@ -22,7 +22,7 @@ + IgnoreOnIsolate=yes + + [Service] +-ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM ++ExecStart=-/sbin/getty -L %I 115200 vt100 + Type=idle + Restart=always + RestartSec=0 diff --git a/package/systemd/0002-build-sys-revert-use-of-ln-relative-option.patch b/package/systemd/0002-build-sys-revert-use-of-ln-relative-option.patch new file mode 100644 index 0000000000..2d9b34708d --- /dev/null +++ b/package/systemd/0002-build-sys-revert-use-of-ln-relative-option.patch @@ -0,0 +1,84 @@ +From 582c9a734a0e976592946ff5b577f98551170a38 Mon Sep 17 00:00:00 2001 +From: Eric Le Bihan +Date: Mon, 21 Jul 2014 11:34:38 +0200 +Subject: [PATCH 1/1] build-sys: revert use of ln relative option. + +Systemd build system now uses the `--relative` option from `ln(1)`. +This option was added to GNU coreutils 8.16, which is not widely +deployed yet by GNU/Linux distributions (not available in Debian Wheezy +for example). + +Signed-off-by: Eric Le Bihan +--- + Makefile.am | 19 +++++-------------- + configure.ac | 2 -- + 2 files changed, 5 insertions(+), 16 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index e238cde..02b39ea 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -219,8 +219,8 @@ define move-to-rootlibdir + if test "$(libdir)" != "$(rootlibdir)"; then \ + $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \ + so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \ +- rm -f $(DESTDIR)$(libdir)/$$libname && \ +- $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \ ++ so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \ ++ $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \ + mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \ + fi + endef +@@ -279,9 +279,9 @@ install-aliases-hook: + set -- $(SYSTEM_UNIT_ALIASES) && \ + dir=$(systemunitdir) && $(install-aliases) + set -- $(USER_UNIT_ALIASES) && \ +- dir=$(userunitdir) && $(install-relative-aliases) ++ dir=$(userunitdir) && $(install-aliases) + set -- $(GENERAL_ALIASES) && \ +- dir= && $(install-relative-aliases) ++ dir= && $(install-aliases) + + define install-aliases + while [ -n "$$1" ]; do \ +@@ -292,15 +292,6 @@ define install-aliases + done + endef + +-define install-relative-aliases +- while [ -n "$$1" ]; do \ +- $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \ +- rm -f $(DESTDIR)$$dir/$$2 && \ +- $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \ +- shift 2 || exit $$?; \ +- done +-endef +- + install-touch-usr-hook: + touch -c $(DESTDIR)/$(prefix) + +@@ -2034,7 +2025,7 @@ systemd_dbus1_generator_LDADD = \ + dbus1-generator-install-hook: + $(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir) + $(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator +- $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator ++ $(AM_V_LN)$(LN_S) -f $(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator + + dbus1-generator-uninstall-hook: + rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator +diff --git a/configure.ac b/configure.ac +index ae88382..ec220af 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -96,8 +96,6 @@ AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin]) + + AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin]) + +-AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])]) +- + M4_DEFINES= + + # gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line +-- +1.7.10.4 + diff --git a/package/systemd/0003-fix-am-path-libgcrypt-no-found.patch b/package/systemd/0003-fix-am-path-libgcrypt-no-found.patch new file mode 100644 index 0000000000..2287ac5115 --- /dev/null +++ b/package/systemd/0003-fix-am-path-libgcrypt-no-found.patch @@ -0,0 +1,145 @@ +Fix AM_PATH_LIBGCRYPT not found + +This patch installs a copy of libgcrypt.m4 from the libgcrypt source tarball +to systemd m4 directory. + +Libgcrypt uses a custom m4 macro and not pkg-config to check if the +development files are available. Though libgcrypt support is optional in +systemd, this macro should be available whenever autoreconf is used, otherwise +the re-configuration will fail with: + + configure.ac:616: warning: macro 'AM_PATH_LIBGCRYPT' not found in library + +As asking the user to install the development package of libgcrypt on the host +machine or adding libgcrypt as a build dependency to systemd is not +acceptable, the required file is added to the m4 directory. + +Signed-off-by: Eric Le Bihan +Index: systemd-213/m4/libgcrypt.m4 +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ systemd-213/m4/libgcrypt.m4 2014-06-11 10:41:11.749305509 +0200 +@@ -0,0 +1,123 @@ ++dnl Autoconf macros for libgcrypt ++dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc. ++dnl ++dnl This file is free software; as a special exception the author gives ++dnl unlimited permission to copy and/or distribute it, with or without ++dnl modifications, as long as this notice is preserved. ++dnl ++dnl This file is distributed in the hope that it will be useful, but ++dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the ++dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ++ ++ ++dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, ++dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) ++dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS. ++dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed ++dnl with the API version to also check the API compatibility. Example: ++dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed ++dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using ++dnl this features allows to prevent build against newer versions of libgcrypt ++dnl with a changed API. ++dnl ++AC_DEFUN([AM_PATH_LIBGCRYPT], ++[ AC_ARG_WITH(libgcrypt-prefix, ++ AC_HELP_STRING([--with-libgcrypt-prefix=PFX], ++ [prefix where LIBGCRYPT is installed (optional)]), ++ libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="") ++ if test x$libgcrypt_config_prefix != x ; then ++ if test x${LIBGCRYPT_CONFIG+set} != xset ; then ++ LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config ++ fi ++ fi ++ ++ AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no) ++ tmp=ifelse([$1], ,1:1.2.0,$1) ++ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then ++ req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` ++ min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` ++ else ++ req_libgcrypt_api=0 ++ min_libgcrypt_version="$tmp" ++ fi ++ ++ AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version) ++ ok=no ++ if test "$LIBGCRYPT_CONFIG" != "no" ; then ++ req_major=`echo $min_libgcrypt_version | \ ++ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` ++ req_minor=`echo $min_libgcrypt_version | \ ++ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` ++ req_micro=`echo $min_libgcrypt_version | \ ++ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` ++ libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` ++ major=`echo $libgcrypt_config_version | \ ++ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` ++ minor=`echo $libgcrypt_config_version | \ ++ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` ++ micro=`echo $libgcrypt_config_version | \ ++ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` ++ if test "$major" -gt "$req_major"; then ++ ok=yes ++ else ++ if test "$major" -eq "$req_major"; then ++ if test "$minor" -gt "$req_minor"; then ++ ok=yes ++ else ++ if test "$minor" -eq "$req_minor"; then ++ if test "$micro" -ge "$req_micro"; then ++ ok=yes ++ fi ++ fi ++ fi ++ fi ++ fi ++ fi ++ if test $ok = yes; then ++ AC_MSG_RESULT([yes ($libgcrypt_config_version)]) ++ else ++ AC_MSG_RESULT(no) ++ fi ++ if test $ok = yes; then ++ # If we have a recent libgcrypt, we should also check that the ++ # API is compatible ++ if test "$req_libgcrypt_api" -gt 0 ; then ++ tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` ++ if test "$tmp" -gt 0 ; then ++ AC_MSG_CHECKING([LIBGCRYPT API version]) ++ if test "$req_libgcrypt_api" -eq "$tmp" ; then ++ AC_MSG_RESULT([okay]) ++ else ++ ok=no ++ AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp]) ++ fi ++ fi ++ fi ++ fi ++ if test $ok = yes; then ++ LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` ++ LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` ++ ifelse([$2], , :, [$2]) ++ if test x"$host" != x ; then ++ libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` ++ if test x"$libgcrypt_config_host" != xnone ; then ++ if test x"$libgcrypt_config_host" != x"$host" ; then ++ AC_MSG_WARN([[ ++*** ++*** The config script $LIBGCRYPT_CONFIG was ++*** built for $libgcrypt_config_host and thus may not match the ++*** used host $host. ++*** You may want to use the configure option --with-libgcrypt-prefix ++*** to specify a matching config script. ++***]]) ++ fi ++ fi ++ fi ++ else ++ LIBGCRYPT_CFLAGS="" ++ LIBGCRYPT_LIBS="" ++ ifelse([$3], , :, [$3]) ++ fi ++ AC_SUBST(LIBGCRYPT_CFLAGS) ++ AC_SUBST(LIBGCRYPT_LIBS) ++]) diff --git a/package/systemd/Config.in b/package/systemd/Config.in new file mode 100644 index 0000000000..97d48c4124 --- /dev/null +++ b/package/systemd/Config.in @@ -0,0 +1,173 @@ +config BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS + bool + # see src/shared/architecture.h + default y if BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || \ + BR2_mipsel || BR2_powerpc || BR2_powerpc64 || \ + BR2_powerpc64le || BR2_sh4 || BR2_sh4eb || \ + BR2_sh4a || BR2_sh4aeb || BR2_sparc || BR2_x86_64 || \ + BR2_aarch64 || BR2_m68k + +config BR2_PACKAGE_SYSTEMD + bool "systemd" + depends on BR2_INIT_SYSTEMD + depends on BR2_USE_WCHAR # util-linux + depends on !BR2_STATIC_LIBS # kmod + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_DBUS # runtime dependency only + select BR2_PACKAGE_LIBCAP + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + select BR2_PACKAGE_UTIL_LINUX_BINARIES + select BR2_PACKAGE_UTIL_LINUX_MOUNT + select BR2_PACKAGE_UTIL_LINUX_NOLOGIN + select BR2_PACKAGE_KMOD + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools + select BR2_PACKAGE_KMOD_TOOLS + help + systemd is a system and service manager for Linux, compatible with + SysV and LSB init scripts. systemd provides aggressive parallelization + capabilities, uses socket and D-Bus activation for starting services, + offers on-demand starting of daemons, keeps track of processes using + Linux cgroups, supports snapshotting and restoring of the system + state, maintains mount and automount points and implements an + elaborate transactional dependency-based service control logic. + It can work as a drop-in replacement for sysvinit. + + Systemd requires a Linux kernel >= 3.0 with the following options + enabled: + + - CONFIG_CGROUPS + - CONFIG_INOTIFY_USER + - CONFIG_FHANDLE + - CONFIG_AUTOFS4_FS + - CONFIG_TMPFS_POSIX_ACL + - CONFIG_TMPFS_XATTR + + These options will be automatically enabled by Buildroot if + it is responsible for building the kernel. Otherwise, if you + are building your kernel outside of Buildroot, make sure + these options are enabled. + + Systemd also provides udev, the userspace device daemon. + + The selection of other packages will enable some features: + + - acl package will add support for multi-seat. + - xz and/or l4 packages will add compression support in + journal and coredump. + - libcurl package will add support for systemd-journal-upload. + - libgcrypt package will add support for journal sealing and + DNSSEC verification in resolved. + + http://freedesktop.org/wiki/Software/systemd + +if BR2_PACKAGE_SYSTEMD + +config BR2_PACKAGE_PROVIDES_UDEV + default "systemd" + +config BR2_PACKAGE_SYSTEMD_KDBUS + bool "enable kdbus support" + help + Enable kdbus support for Systemd. + +config BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY + bool "HTTP server for journal events" + select BR2_PACKAGE_LIBMICROHTTPD + help + systemd-journal-gatewayd serves journal events over the + network. Clients must connect using HTTP. The server + listens on port 19531 by default. + + http://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html + +config BR2_PACKAGE_SYSTEMD_BINFMT + bool "enable binfmt tool" + help + systemd-binfmt is an early boot service that registers + additional binary formats for executables in the kernel. + + http://www.freedesktop.org/software/systemd/man/systemd-binfmt.service.html + +config BR2_PACKAGE_SYSTEMD_VCONSOLE + bool "enable vconsole tool" + help + systemd-vconsole-setup is an early boot service that + configures the virtual console font and console keymap. + + http://www.freedesktop.org/software/systemd/man/systemd-vconsole-setup.service.html + +config BR2_PACKAGE_SYSTEMD_BOOTCHART + bool "enable bootchart tool" + help + systemd-bootchart is a tool, usually run at system startup, + that collects the CPU load, disk load, memory usage, as well + as per-process information from a running system. Collected + results are output as an SVG graph. + + http://www.freedesktop.org/software/systemd/man/systemd-bootchart.html + +config BR2_PACKAGE_SYSTEMD_QUOTACHECK + bool "enable quotacheck tools" + help + systemd-quotacheck is a service responsible for file system + quota checks. It is run once at boot after all necessary + file systems are mounted. It is pulled in only if at least + one file system has quotas enabled. + + http://www.freedesktop.org/software/systemd/man/systemd-quotacheck.service.html + +config BR2_PACKAGE_SYSTEMD_NETWORKD + bool "enable network manager" + help + systemd-networkd is a system service that manages networks. + It detects and configures network devices as they appear, as well as + creating virtual network devices. + + This simple network configuration solution is an alternative to + dhcpcd or ISC dhcp. + + http://www.freedesktop.org/software/systemd/man/systemd-networkd.html + +config BR2_PACKAGE_SYSTEMD_TIMESYNCD + bool "enable SNTP client" + help + systemd-timesyncd is a service that may be used to synchronize the + local system clock with a Network Time Protocol server. + + This simple NTP solution is an alternative to sntp/ntpd from the ntp + package. + + http://www.freedesktop.org/software/systemd/man/systemd-timesyncd.html + +config BR2_PACKAGE_SYSTEMD_COMPAT + bool "enable compatibility libraries" + help + Since systemd 209, the following libraries have been merged into + libsystemd.so: + + - libsystemd-daemon + - libsystemd-id128 + - libsystemd-journal + - libsystemd-login + + This option enables the installation of compatibility *.pc files. + +config BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT + bool "enable SMACK support" + select BR2_PACKAGE_ATTR + select BR2_PACKAGE_SMACK + help + Enable support for SMACK, the Simple Mandatory Access Control + Kernel, a minimal approach to Access Control implemented as a kernel + LSM. + + This feature requires a kernel >= 3.8. + + When this feature is enabled, Systemd mounts smackfs and manages + security labels for sockets. + +endif diff --git a/package/systemd/network.service b/package/systemd/network.service new file mode 100644 index 0000000000..0d77bb824a --- /dev/null +++ b/package/systemd/network.service @@ -0,0 +1,21 @@ +[Unit] +Description=Network Connectivity +Wants=network.target +Before=network.target + +[Service] +Type=oneshot +RemainAfterExit=yes + +# lo is brought up earlier, which will cause the upcoming "ifup -a" to fail +# with exit code 1, due to an "ip: RTNETLINK answers: File exists" error during +# its "ip addr add ..." command, subsequently causing this unit to fail even +# though it is a benign error. Flushing the lo address with the command below +# before ifup prevents this failure. +ExecStart=/sbin/ip addr flush dev lo + +ExecStart=/sbin/ifup -a +ExecStop=/sbin/ifdown -a + +[Install] +WantedBy=multi-user.target diff --git a/package/systemd/systemd.hash b/package/systemd/systemd.hash new file mode 100644 index 0000000000..729598608d --- /dev/null +++ b/package/systemd/systemd.hash @@ -0,0 +1,2 @@ +# sha256 locally computed +sha256 b51b0a48d1beb388d95bd6a98d62be05490335d4bb388aefecdcb576e91e0741 systemd-229.tar.gz diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk new file mode 100644 index 0000000000..8a6aa44315 --- /dev/null +++ b/package/systemd/systemd.mk @@ -0,0 +1,254 @@ +################################################################################ +# +# systemd +# +################################################################################ + +SYSTEMD_VERSION = 229 +SYSTEMD_SITE = $(call github,systemd,systemd,v$(SYSTEMD_VERSION)) +SYSTEMD_LICENSE = LGPLv2.1+, GPLv2+ (udev), Public Domain (few source files, see README) +SYSTEMD_LICENSE_FILES = LICENSE.GPL2 LICENSE.LGPL2.1 README +SYSTEMD_INSTALL_STAGING = YES +SYSTEMD_DEPENDENCIES = \ + host-intltool \ + libcap \ + util-linux \ + kmod \ + host-gperf + +SYSTEMD_PROVIDES = udev +SYSTEMD_AUTORECONF = YES + +# Make sure that systemd will always be built after busybox so that we have +# a consistent init setup between two builds +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +SYSTEMD_DEPENDENCIES += busybox +endif + +SYSTEMD_CONF_OPTS += \ + --with-rootprefix= \ + --enable-static=no \ + --disable-manpages \ + --disable-selinux \ + --disable-pam \ + --disable-libcryptsetup \ + --disable-efi \ + --disable-gnuefi \ + --disable-ldconfig \ + --disable-tests \ + --without-python + +SYSTEMD_CFLAGS = $(TARGET_CFLAGS) -fno-lto + +# Override path to kmod, used in kmod-static-nodes.service +SYSTEMD_CONF_ENV = \ + CFLAGS="$(SYSTEMD_CFLAGS)" \ + ac_cv_path_KMOD=/usr/bin/kmod + +define SYSTEMD_RUN_INTLTOOLIZE + cd $(@D) && $(HOST_DIR)/usr/bin/intltoolize --force --automake +endef +SYSTEMD_PRE_CONFIGURE_HOOKS += SYSTEMD_RUN_INTLTOOLIZE + +ifeq ($(BR2_PACKAGE_SYSTEMD_COMPAT),y) +SYSTEMD_CONF_OPTS += --enable-compat-libs +else +SYSTEMD_CONF_OPTS += --disable-compat-libs +endif + +ifeq ($(BR2_PACKAGE_ACL),y) +SYSTEMD_CONF_OPTS += --enable-acl +SYSTEMD_DEPENDENCIES += acl +else +SYSTEMD_CONF_OPTS += --disable-acl +endif + +ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) +SYSTEMD_CONF_OPTS += --enable-seccomp +SYSTEMD_DEPENDENCIES += libseccomp +else +SYSTEMD_CONF_OPTS += --disable-seccomp +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_KDBUS),y) +SYSTEMD_CONF_OPTS += --enable-kdbus +else +SYSTEMD_CONF_OPTS += --disable-kdbus +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +SYSTEMD_DEPENDENCIES += bzip2 +SYSTEMD_CONF_OPTS += --enable-bzip2 +else +SYSTEMD_CONF_OPTS += --disable-bzip2 +endif + +ifeq ($(BR2_PACKAGE_LZ4),y) +SYSTEMD_DEPENDENCIES += lz4 +SYSTEMD_CONF_OPTS += --enable-lz4 +else +SYSTEMD_CONF_OPTS += --disable-lz4 +endif + +ifeq ($(BR2_PACKAGE_XZ),y) +SYSTEMD_DEPENDENCIES += xz +SYSTEMD_CONF_OPTS += --enable-xz +else +SYSTEMD_CONF_OPTS += --disable-xz +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +SYSTEMD_DEPENDENCIES += zlib +SYSTEMD_CONF_OPTS += --enable-zlib +else +SYSTEMD_CONF_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +SYSTEMD_DEPENDENCIES += libcurl +SYSTEMD_CONF_OPTS += --enable-libcurl +else +SYSTEMD_CONF_OPTS += --disable-libcurl +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +SYSTEMD_DEPENDENCIES += libgcrypt +SYSTEMD_CONF_OPTS += \ + --enable-gcrypt \ + --with-libgcrypt-prefix=$(STAGING_DIR)/usr \ + --with-libgpg-error-prefix=$(STAGING_DIR)/usr +else +SYSTEMD_CONF_OPTS += --disable-gcrypt +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY),y) +SYSTEMD_DEPENDENCIES += libmicrohttpd +SYSTEMD_CONF_OPTS += --enable-microhttpd +else +SYSTEMD_CONF_OPTS += --disable-microhttpd +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_BINFMT),y) +SYSTEMD_CONF_OPTS += --enable-binfmt +else +SYSTEMD_CONF_OPTS += --disable-binfmt +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE),y) +SYSTEMD_CONF_OPTS += --enable-vconsole +else +SYSTEMD_CONF_OPTS += --disable-vconsole +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_BOOTCHART),y) +SYSTEMD_CONF_OPTS += --enable-bootchart +else +SYSTEMD_CONF_OPTS += --disable-bootchart +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_QUOTACHECK),y) +SYSTEMD_CONF_OPTS += --enable-quotacheck +else +SYSTEMD_CONF_OPTS += --disable-quotacheck +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y) +SYSTEMD_CONF_OPTS += --enable-networkd +define SYSTEMD_INSTALL_RESOLVCONF_HOOK + ln -sf ../run/systemd/resolve/resolv.conf \ + $(TARGET_DIR)/etc/resolv.conf +endef +else +SYSTEMD_CONF_OPTS += --disable-networkd +define SYSTEMD_INSTALL_SERVICE_NETWORK + $(INSTALL) -D -m 644 package/systemd/network.service \ + $(TARGET_DIR)/etc/systemd/system/network.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../network.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/network.service +endef +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y) +SYSTEMD_CONF_OPTS += --enable-timesyncd +define SYSTEMD_INSTALL_SERVICE_TIMESYNC + mkdir -p $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants + ln -sf ../../../../lib/systemd/system/systemd-timesyncd.service \ + $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service +endef +else +SYSTEMD_CONF_OPTS += --disable-timesyncd +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT),y) +SYSTEMD_CONF_OPTS += --enable-smack +else +SYSTEMD_CONF_OPTS += --disable-smack +endif + +# mq_getattr needs -lrt +SYSTEMD_MAKE_OPTS += LIBS=-lrt +SYSTEMD_MAKE_OPTS += LDFLAGS+=-ldl + +define SYSTEMD_INSTALL_INIT_HOOK + ln -fs ../lib/systemd/systemd $(TARGET_DIR)/sbin/init + ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/halt + ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/poweroff + ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/reboot + + ln -fs ../../../lib/systemd/system/multi-user.target \ + $(TARGET_DIR)/etc/systemd/system/default.target +endef + +define SYSTEMD_INSTALL_MACHINEID_HOOK + touch $(TARGET_DIR)/etc/machine-id +endef + +SYSTEMD_POST_INSTALL_TARGET_HOOKS += \ + SYSTEMD_INSTALL_INIT_HOOK \ + SYSTEMD_INSTALL_MACHINEID_HOOK \ + SYSTEMD_INSTALL_RESOLVCONF_HOOK + +define SYSTEMD_USERS + systemd-journal -1 systemd-journal -1 * /var/log/journal - - Journal + systemd-journal-gateway -1 systemd-journal-gateway -1 * /var/log/journal - - Journal Gateway + systemd-journal-remote -1 systemd-journal-remote -1 * /var/log/journal/remote - - Journal Remote + systemd-journal-upload -1 systemd-journal-upload -1 * - - - Journal Upload + systemd-resolve -1 systemd-resolve -1 * - - - Network Name Resolution Manager + systemd-bus-proxy -1 systemd-bus-proxy -1 * - - - Proxy D-Bus messages to/from a bus + systemd-timesync -1 systemd-timesync -1 * - - - Network Time Synchronization + systemd-network -1 systemd-network -1 * - - - Network Manager + - - input -1 * - - - Input device group +endef + +define SYSTEMD_DISABLE_SERVICE_TTY1 + rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty@tty1.service +endef + +ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),) +# systemd needs getty.service for VTs and serial-getty.service for serial ttys +# also patch the file to use the correct baud-rate, the default baudrate is 115200 so look for that +define SYSTEMD_INSTALL_SERVICE_TTY + if echo $(BR2_TARGET_GENERIC_GETTY_PORT) | egrep -q 'tty[0-9]*$$'; \ + then \ + SERVICE="getty"; \ + else \ + SERVICE="serial-getty"; \ + fi; \ + ln -fs ../../../../lib/systemd/system/$${SERVICE}@.service \ + $(TARGET_DIR)/etc/systemd/system/getty.target.wants/$${SERVICE}@$(BR2_TARGET_GENERIC_GETTY_PORT).service; \ + if [ $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) -gt 0 ] ; \ + then \ + $(SED) 's,115200,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),' $(TARGET_DIR)/lib/systemd/system/$${SERVICE}@.service; \ + fi +endef +endif + +define SYSTEMD_INSTALL_INIT_SYSTEMD + $(SYSTEMD_DISABLE_SERVICE_TTY1) + $(SYSTEMD_INSTALL_SERVICE_TTY) + $(SYSTEMD_INSTALL_SERVICE_NETWORK) + $(SYSTEMD_INSTALL_SERVICE_TIMESYNC) +endef + +$(eval $(autotools-package)) diff --git a/package/sysvinit/0001-fix-libcrypt-test.patch b/package/sysvinit/0001-fix-libcrypt-test.patch new file mode 100644 index 0000000000..6c22436d74 --- /dev/null +++ b/package/sysvinit/0001-fix-libcrypt-test.patch @@ -0,0 +1,20 @@ +Make the libcrypt test somewhat cross-compilation compliant + +Signed-off-by: Thomas Petazzoni + +Index: b/src/Makefile +=================================================================== +--- a/src/Makefile ++++ b/src/Makefile +@@ -78,8 +78,9 @@ else + endif + + # Additional libs for GNU libc. +-ifneq ($(wildcard /usr/lib*/libcrypt.a),) +- SULOGINLIBS += -lcrypt ++HAS_LIBCRYPT=$(shell f=`mktemp` && echo 'int main(void) {}' | $(CC) -o $$f -xc - -lcrypt >/dev/null 2>&1 && echo yes; rm -f $$f) ++ifeq ($(HAS_LIBCRYPT),yes) ++ SULOGINLIBS += -lcrypt + endif + + all: $(BIN) $(SBIN) $(USRBIN) diff --git a/package/sysvinit/Config.in b/package/sysvinit/Config.in new file mode 100644 index 0000000000..2dc3bb07bb --- /dev/null +++ b/package/sysvinit/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_SYSVINIT + bool "sysvinit" + depends on BR2_INIT_SYSV + help + /sbin/init - parent of all processes + + http://savannah.nongnu.org/projects/sysvinit diff --git a/package/sysvinit/inittab b/package/sysvinit/inittab new file mode 100644 index 0000000000..27eb4a6931 --- /dev/null +++ b/package/sysvinit/inittab @@ -0,0 +1,27 @@ +# /etc/inittab +# +# This inittab is a basic inittab sample for sysvinit, which mimics +# Buildroot's default inittab for BusyBox. +id:3:initdefault: + +si0::sysinit:/bin/mount -t proc proc /proc +si1::sysinit:/bin/mount -o remount,rw / +si2::sysinit:/bin/mkdir -p /dev/pts +si3::sysinit:/bin/mkdir -p /dev/shm +si4::sysinit:/bin/mount -a +si5::sysinit:/bin/hostname -F /etc/hostname +si6::sysinit:/etc/init.d/rcS + +# S0:1:respawn:/sbin/getty -L ttyS0 115200 vt100 # GENERIC_SERIAL + +# Stuff to do for the 3-finger salute +#ca::ctrlaltdel:/sbin/reboot + +# Stuff to do before rebooting +shd0:06:wait:/etc/init.d/rcK +shd1:06:wait:/sbin/swapoff -a +shd2:06:wait:/bin/umount -a -r + +# The usual halt or reboot actions +hlt0:0:wait:/sbin/halt -dhp +reb0:6:wait:/sbin/reboot diff --git a/package/sysvinit/sysvinit.hash b/package/sysvinit/sysvinit.hash new file mode 100644 index 0000000000..268b9841b0 --- /dev/null +++ b/package/sysvinit/sysvinit.hash @@ -0,0 +1,3 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/s/sysvinit/sysvinit_2.88dsf-13.1%2Bsqueeze1.dsc +sha256 b016f937958d2809a020d407e1287bdc09abf1d44efaa96530e2ea57f544f4e8 sysvinit_2.88dsf.orig.tar.gz +sha256 26b456a31036b1e1c2486c22ca2b7fde6d723b7c63669604eacc61cfb6609ef8 sysvinit_2.88dsf-13.1+squeeze1.diff.gz diff --git a/package/sysvinit/sysvinit.mk b/package/sysvinit/sysvinit.mk new file mode 100644 index 0000000000..faefd5c913 --- /dev/null +++ b/package/sysvinit/sysvinit.mk @@ -0,0 +1,50 @@ +################################################################################ +# +# sysvinit +# +################################################################################ + +SYSVINIT_VERSION = 2.88 +SYSVINIT_SOURCE = sysvinit_$(SYSVINIT_VERSION)dsf.orig.tar.gz +SYSVINIT_PATCH = sysvinit_$(SYSVINIT_VERSION)dsf-13.1+squeeze1.diff.gz +SYSVINIT_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/s/sysvinit +SYSVINIT_LICENSE = GPLv2+ +SYSVINIT_LICENSE_FILES = COPYING + +SYSVINIT_MAKE_OPTS = SYSROOT=$(STAGING_DIR) + +# Override BusyBox implementations if BusyBox is enabled. +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +SYSVINIT_DEPENDENCIES = busybox +endif + +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +SYSVINIT_DEPENDENCIES += libselinux +SYSVINIT_MAKE_OPTS += WITH_SELINUX="yes" +endif + +define SYSVINIT_DEBIAN_PATCHES + if [ -d $(@D)/debian/patches ]; then \ + $(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*.patch; \ + fi +endef + +SYSVINIT_POST_PATCH_HOOKS = SYSVINIT_DEBIAN_PATCHES + +define SYSVINIT_BUILD_CMDS + # Force sysvinit to link against libcrypt as it otherwise + # use an incorrect test to see if it's available + $(TARGET_CONFIGURE_OPTS) $(MAKE) $(SYSVINIT_MAKE_OPTS) -C $(@D)/src +endef + +define SYSVINIT_INSTALL_TARGET_CMDS + for x in halt init shutdown killall5; do \ + $(INSTALL) -D -m 0755 $(@D)/src/$$x $(TARGET_DIR)/sbin/$$x || exit 1; \ + done + $(INSTALL) -D -m 0644 package/sysvinit/inittab $(TARGET_DIR)/etc/inittab + ln -sf /sbin/halt $(TARGET_DIR)/sbin/reboot + ln -sf /sbin/halt $(TARGET_DIR)/sbin/poweroff + ln -sf killall5 $(TARGET_DIR)/sbin/pidof +endef + +$(eval $(generic-package)) diff --git a/package/szip/Config.in b/package/szip/Config.in new file mode 100644 index 0000000000..5a24362f29 --- /dev/null +++ b/package/szip/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_SZIP + bool "szip" + help + Szip is an implementation of the extended-Rice lossless + compression algorithm. + + The Consultative Committee on Space Data Systems (CCSDS) has + adopted the extended-Rice algorithm for international + standards for space applications[1,6,7]. Szip is reported to + provide fast and effective compression, specifically for the + EOS data generated by the NASA Earth Observatory System + (EOS)[1]. It was originally developed at University of New + Mexico (UNM) and integrated with HDF4 by UNM researchers and + developers. + + http://www.hdfgroup.org/doc_resource/SZIP diff --git a/package/szip/szip.hash b/package/szip/szip.hash new file mode 100644 index 0000000000..c6caf36481 --- /dev/null +++ b/package/szip/szip.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 a816d95d5662e8279625abdbea7d0e62157d7d1f028020b1075500bf483ed5ef szip-2.1.tar.gz diff --git a/package/szip/szip.mk b/package/szip/szip.mk new file mode 100644 index 0000000000..f3a47581bf --- /dev/null +++ b/package/szip/szip.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# szip +# +################################################################################ + +SZIP_VERSION = 2.1 +SZIP_SITE = http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src +SZIP_LICENSE = szip license +SZIP_LICENSE_FILES = COPYING +SZIP_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/taglib/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch b/package/taglib/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file mode 100644 index 0000000000..535ccb4d38 --- /dev/null +++ b/package/taglib/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch @@ -0,0 +1,40 @@ +From 4e6a75eed3602f10aff516f49c8088c6da8db9df Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 31 Aug 2014 12:11:57 +0200 +Subject: [PATCH 1/1] cmake: use the standard CMake flag to drive the shared + object build + +If BUILD_SHARED_LIBS is set and ENABLE_STATIC undefined, then drive +ENABLE_STATIC with the BUILD_SHARED_LIBS value. + +Signed-off-by: Samuel Martin +--- + CMakeLists.txt | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 317ffa1..9931957 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -2,7 +2,17 @@ project(taglib) + + cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) + +-option(ENABLE_STATIC "Make static version of libtag" OFF) ++# Use the standard CMake flag to drive the shared object build. ++if(DEFINED BUILD_SHARED_LIBS AND NOT DEFINED ENABLE_STATIC) ++ if(BUILD_SHARED_LIBS) ++ set(ENABLE_STATIC OFF) ++ else() ++ set(ENABLE_STATIC ON) ++ endif() ++else() ++ option(ENABLE_STATIC "Make static version of libtag" OFF) ++endif() ++ + if(ENABLE_STATIC) + add_definitions(-DTAGLIB_STATIC) + set(BUILD_SHARED_LIBS OFF) +-- +2.1.0 + diff --git a/package/taglib/Config.in b/package/taglib/Config.in new file mode 100644 index 0000000000..209837f46b --- /dev/null +++ b/package/taglib/Config.in @@ -0,0 +1,25 @@ + +config BR2_PACKAGE_TAGLIB + bool "taglib" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + help + TagLib is a library for reading and editing the meta-data of + several popular audio formats. Currently it supports both ID3v1 + and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and + Vorbis comments in FLAC, MPC, Speex, WavPack and TrueAudio files. + + http://taglib.github.com + +if BR2_PACKAGE_TAGLIB + +config BR2_PACKAGE_TAGLIB_MP4 + bool "taglib mp4 support" + +config BR2_PACKAGE_TAGLIB_ASF + bool "taglib wma support" + +endif + +comment "taglib needs a toolchain w/ C++, wchar" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR diff --git a/package/taglib/taglib.hash b/package/taglib/taglib.hash new file mode 100644 index 0000000000..86ac6a4f58 --- /dev/null +++ b/package/taglib/taglib.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 72d371cd1419a87ae200447a53bff2be219283071e80fd12337928cc967dc71a taglib-1.9.1.tar.gz diff --git a/package/taglib/taglib.mk b/package/taglib/taglib.mk new file mode 100644 index 0000000000..2410650025 --- /dev/null +++ b/package/taglib/taglib.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# taglib +# +################################################################################ + +TAGLIB_VERSION = 1.9.1 +TAGLIB_SITE = http://taglib.github.io/releases +TAGLIB_INSTALL_STAGING = YES +TAGLIB_LICENSE = LGPLv2.1, MPL +TAGLIB_LICENSE_FILES = COPYING.LGPL COPYING.MPL + +ifeq ($(BR2_PACKAGE_ZLIB),y) +TAGLIB_DEPENDENCIES += zlib +endif + +ifeq ($(BR2_PACKAGE_TAGLIB_ASF),y) +TAGLIB_CONF_OPTS += -DWITH_ASF=ON +endif + +ifeq ($(BR2_PACKAGE_TAGLIB_MP4),y) +TAGLIB_CONF_OPTS += -DWITH_MP4=ON +endif + +define TAGLIB_REMOVE_DEVFILE + rm -f $(TARGET_DIR)/usr/bin/taglib-config +endef + +TAGLIB_POST_INSTALL_TARGET_HOOKS += TAGLIB_REMOVE_DEVFILE + +$(eval $(cmake-package)) diff --git a/package/tar/0001-fix-build-failure.patch b/package/tar/0001-fix-build-failure.patch new file mode 100644 index 0000000000..8550a3ef5a --- /dev/null +++ b/package/tar/0001-fix-build-failure.patch @@ -0,0 +1,52 @@ +Status: upstream +http://git.savannah.gnu.org/cgit/tar.git/commit/?id=e9ddc08da0982f36581ae5a8c7763453ff41cfe8 + +Signed-off-by: Gustavo Zacarias + +From e9ddc08da0982f36581ae5a8c7763453ff41cfe8 Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff +Date: Wed, 24 Sep 2014 21:22:16 +0000 +Subject: Bugfixes. + +* doc/tar.1: Fix typo in font spec. +* src/tar.c (sort_mode_arg, sort_mode_flag): Protect "inode" +(SAVEDIR_SORT_INODE) with D_INO_IN_DIRENT +--- +diff --git a/doc/tar.1 b/doc/tar.1 +index 9000627..b91de63 100644 +--- a/doc/tar.1 ++++ b/doc/tar.1 +@@ -879,7 +879,7 @@ Exclude files matching patterns listed in FILE. + \fB\-\-strip\-components\fR=\fINUMBER\fR + Strip \fINUMBER\fR leading components from file names on extraction. + .TP +-\fB\-\-transform\fR=\fIEXPRESSION\dR, \fB\-\-xform\fR=\fIEXPRESSION\fR ++\fB\-\-transform\fR=\fIEXPRESSION\fR, \fB\-\-xform\fR=\fIEXPRESSION\fR + Use sed replace \fIEXPRESSION\fR to transform file names. + .SS File name matching options + These options affect both exclude and include patterns. +diff --git a/src/tar.c b/src/tar.c +index 225c624..f8102e0 100644 +--- a/src/tar.c ++++ b/src/tar.c +@@ -1341,14 +1341,18 @@ static char filename_terminator; + static char const *const sort_mode_arg[] = { + "none", + "name", ++#if D_INO_IN_DIRENT + "inode", ++#endif + NULL + }; + + static int sort_mode_flag[] = { + SAVEDIR_SORT_NONE, + SAVEDIR_SORT_NAME, ++#if D_INO_IN_DIRENT + SAVEDIR_SORT_INODE ++#endif + }; + + ARGMATCH_VERIFY (sort_mode_arg, sort_mode_flag); +-- +cgit v0.9.0.2 diff --git a/package/tar/Config.in b/package/tar/Config.in new file mode 100644 index 0000000000..74b0219919 --- /dev/null +++ b/package/tar/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_TAR + bool "tar" + depends on BR2_USE_WCHAR + depends on BR2_USE_MMU # fork() + help + A program that saves many files together into a single tape or disk + archive, and can restore individual files from the archive. + + http://www.gnu.org/software/tar/ + +comment "tar needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/tar/tar.hash b/package/tar/tar.hash new file mode 100644 index 0000000000..5d2f1db0d3 --- /dev/null +++ b/package/tar/tar.hash @@ -0,0 +1,3 @@ +# Locally calculated after checking signature +sha256 64ee8d88ec1b47a0961033493f919d27218c41b580138fd6802327462aff22f2 tar-1.28.tar.xz +sha256 a3906a862f83dac1dfaf0ed200c62bd21f6d00f184a7f42b91978593a8553104 tar-1.28.cpio.gz diff --git a/package/tar/tar.mk b/package/tar/tar.mk new file mode 100644 index 0000000000..2b47e334d5 --- /dev/null +++ b/package/tar/tar.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# tar +# +################################################################################ + +TAR_VERSION = 1.28 +TAR_SOURCE = tar-$(TAR_VERSION).tar.xz +TAR_SITE = $(BR2_GNU_MIRROR)/tar +# busybox installs in /bin, so we need tar to install as well in /bin +# so that it overrides the Busybox symlinks. +TAR_CONF_OPTS = --exec-prefix=/ +TAR_LICENSE = GPLv3+ +TAR_LICENSE_FILES = COPYING + +# Prefer full-blown tar over buybox's version +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +TAR_DEPENDENCIES += busybox +HOST_TAR_DEPENDENCIES = +endif + +ifeq ($(BR2_PACKAGE_ACL),y) +TAR_DEPENDENCIES += acl +TAR_CONF_OPTS += --with-posix-acls +else +TAR_CONF_OPTS += --without-posix-acls +endif + +ifeq ($(BR2_PACKAGE_ATTR),y) +TAR_DEPENDENCIES += attr +TAR_CONF_OPTS += --with-xattrs +else +TAR_CONF_OPTS += --without-xattrs +endif + +$(eval $(autotools-package)) + +# host-tar: use cpio.gz instead of tar.gz to prevent chicken-egg problem +# of needing tar to build tar. +HOST_TAR_SOURCE = tar-$(TAR_VERSION).cpio.gz +define HOST_TAR_EXTRACT_CMDS + mkdir -p $(@D) + cd $(@D) && \ + $(call suitable-extractor,$(HOST_TAR_SOURCE)) $(DL_DIR)/$(HOST_TAR_SOURCE) | cpio -i --preserve-modification-time + mv $(@D)/tar-$(TAR_VERSION)/* $(@D) + rmdir $(@D)/tar-$(TAR_VERSION) +endef +$(eval $(host-autotools-package)) diff --git a/package/targetcli-fb/Config.in b/package/targetcli-fb/Config.in new file mode 100644 index 0000000000..b655938700 --- /dev/null +++ b/package/targetcli-fb/Config.in @@ -0,0 +1,15 @@ +comment "targetcli-fb depends on Python" + depends on !BR2_PACKAGE_PYTHON && !BR2_PACKAGE_PYTHON3 + +config BR2_PACKAGE_TARGETCLI_FB + bool "targetcli-fb" + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + select BR2_PACKAGE_PYTHON_CONFIGSHELL_FB + select BR2_PACKAGE_PYTHON_RTSLIB_FB + select BR2_PACKAGE_PYTHON_SIX + help + targetcli-fb is a command-line interface for configuring the + LIO generic SCSI target, present in 3.x Linux kernel + versions. + + https://github.com/agrover/targetcli-fb diff --git a/package/targetcli-fb/S50target b/package/targetcli-fb/S50target new file mode 100755 index 0000000000..3ce55ab492 --- /dev/null +++ b/package/targetcli-fb/S50target @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Restore / clear the Linux "SCSI target" driver configuration with `targetctl` +# + +start() { + local ret + + printf "Restoring target configuration: " + /usr/bin/targetctl restore >/dev/null 2>&1 + ret=$? + echo "done" + + return $ret +} + +stop() { + local ret + + printf "Clearing target configuration: " + /usr/bin/targetctl clear >/dev/null 2>&1 + ret=$? + echo "done" + + return $ret +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/targetcli-fb/target.service b/package/targetcli-fb/target.service new file mode 100644 index 0000000000..400284edd1 --- /dev/null +++ b/package/targetcli-fb/target.service @@ -0,0 +1,14 @@ +[Unit] +Description=Restore LIO kernel target configuration +Requires=sys-kernel-config.mount +After=sys-kernel-config.mount network.target local-fs.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/targetctl restore +ExecStop=/usr/bin/targetctl clear +SyslogIdentifier=target + +[Install] +WantedBy=multi-user.target diff --git a/package/targetcli-fb/targetcli-fb.mk b/package/targetcli-fb/targetcli-fb.mk new file mode 100644 index 0000000000..cf7f29ff4e --- /dev/null +++ b/package/targetcli-fb/targetcli-fb.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# targetcli-fb +# +################################################################################ + +TARGETCLI_FB_VERSION = v2.1.fb41 +TARGETCLI_FB_SITE = $(call github,agrover,targetcli-fb,$(TARGETCLI_FB_VERSION)) +TARGETCLI_FB_LICENSE = Apache-2.0 +TARGETCLI_FB_LICENSE_FILES = COPYING +TARGETCLI_FB_SETUP_TYPE = setuptools +TARGETCLI_FB_DEPENDENCIES = python-configshell-fb python-rtslib-fb python-six + +define TARGETCLI_FB_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/targetcli-fb/S50target \ + $(TARGET_DIR)/etc/init.d/S50target +endef + +define TARGETCLI_FB_INSTALL_INIT_SYSTEMD + $(INSTALL) -m 0644 -D package/targetcli-fb/target.service \ + $(TARGET_DIR)/usr/lib/systemd/system/target.service +endef + +# Targetcli stores its configuration in /etc/target/saveconfig.json +# and complains if the /etc/target/ directory does not exist. +define TARGETCLI_FB_INSTALL_CONF_DIR + $(INSTALL) -m 0755 -d $(TARGET_DIR)/etc/target +endef + +TARGETCLI_FB_POST_INSTALL_TARGET_HOOKS += TARGETCLI_FB_INSTALL_CONF_DIR + +$(eval $(python-package)) diff --git a/package/taskd/0001-Fix-missing-cmakedefine-HAVE_GET_CURRENT_DIR_NAME.patch b/package/taskd/0001-Fix-missing-cmakedefine-HAVE_GET_CURRENT_DIR_NAME.patch new file mode 100644 index 0000000000..960c71b9ea --- /dev/null +++ b/package/taskd/0001-Fix-missing-cmakedefine-HAVE_GET_CURRENT_DIR_NAME.patch @@ -0,0 +1,28 @@ +From b067ab9bf667bb9257bb9eeaa6bf25f9a1a17f06 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Fri, 6 May 2016 23:35:42 +0200 +Subject: [PATCH] Fix missing cmakedefine HAVE_GET_CURRENT_DIR_NAME +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Jörg Krause +--- + cmake.h.in | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/cmake.h.in b/cmake.h.in +index 4124ce9..0b8f9d0 100644 +--- a/cmake.h.in ++++ b/cmake.h.in +@@ -51,6 +51,7 @@ + #cmakedefine HAVE_ST_BIRTHTIME + + /* Functions */ ++#cmakedefine HAVE_GET_CURRENT_DIR_NAME + #cmakedefine HAVE_TIMEGM + #cmakedefine HAVE_UUID_UNPARSE_LOWER + +-- +2.8.2 + diff --git a/package/taskd/Config.in b/package/taskd/Config.in new file mode 100644 index 0000000000..7a9a136034 --- /dev/null +++ b/package/taskd/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_TASKD + bool "taskd" + depends on BR2_USE_WCHAR # gnutls, util-linux + depends on BR2_USE_MMU # fork() + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Task management synchronization daemon. + + http://taskwarrior.org/ + +comment "taskd needs a toolchain w/ C++, wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP diff --git a/package/taskd/taskd.hash b/package/taskd/taskd.hash new file mode 100644 index 0000000000..41d37bbadb --- /dev/null +++ b/package/taskd/taskd.hash @@ -0,0 +1,4 @@ +# From http://taskwarrior.org/download/ +sha1 ded339deeee65277e4712f71a9159502f8b20b52 taskd-1.1.0.tar.gz +# Locally calculated +sha256 7b8488e687971ae56729ff4e2e5209ff8806cf8cd57718bfd7e521be130621b4 taskd-1.1.0.tar.gz diff --git a/package/taskd/taskd.mk b/package/taskd/taskd.mk new file mode 100644 index 0000000000..34a260ea0e --- /dev/null +++ b/package/taskd/taskd.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# taskd +# +################################################################################ + +TASKD_VERSION = 1.1.0 +TASKD_SITE = http://taskwarrior.org/download +TASKD_LICENSE = MIT +TASKD_LICENSE_FILES = COPYING +TASKD_DEPENDENCIES = gnutls util-linux + +$(eval $(cmake-package)) diff --git a/package/tcl/0001-dont-build-compat.patch b/package/tcl/0001-dont-build-compat.patch new file mode 100644 index 0000000000..85c5c57df4 --- /dev/null +++ b/package/tcl/0001-dont-build-compat.patch @@ -0,0 +1,32 @@ +From: Andrew Ruder +Subject: [PATCH] Disable tcl compatibility layers + +Turn off building compatibility layers for old/broken versions of +standard functions (strstr, strtoul, strtod) with the assumption that +anything buildroot is using as a standard C library will be good enough +to not have broken behavior. + +Signed-off-by: Andrew Ruder +--- + +diff --git a/unix/tcl.m4 b/unix/tcl.m4 +--- a/unix/tcl.m4 ++++ b/unix/tcl.m4 +@@ -2466,7 +2466,7 @@ AC_DEFUN([SC_BUGGY_STRTOD], [ + } + exit(0); + }], tcl_cv_strtod_buggy=ok, tcl_cv_strtod_buggy=buggy, +- tcl_cv_strtod_buggy=buggy)]) ++ tcl_cv_strtod_buggy=ok)]) + if test "$tcl_cv_strtod_buggy" = buggy; then + AC_LIBOBJ([fixstrtod]) + USE_COMPAT=1 +@@ -2725,7 +2725,7 @@ AC_DEFUN([SC_TCL_CHECK_BROKEN_FUNC],[ + if test ["$tcl_ok"] = 1; then + AC_CACHE_CHECK([proper ]$1[ implementation], [tcl_cv_]$1[_unbroken], + AC_TRY_RUN([[int main() {]$2[}]],[tcl_cv_]$1[_unbroken]=ok, +- [tcl_cv_]$1[_unbroken]=broken,[tcl_cv_]$1[_unbroken]=unknown)) ++ [tcl_cv_]$1[_unbroken]=broken,[tcl_cv_]$1[_unbroken]=ok)) + if test ["$tcl_cv_]$1[_unbroken"] = "ok"; then + tcl_ok=1 + else diff --git a/package/tcl/Config.in b/package/tcl/Config.in new file mode 100644 index 0000000000..f1fa0541a1 --- /dev/null +++ b/package/tcl/Config.in @@ -0,0 +1,39 @@ +comment "tcl needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + +config BR2_PACKAGE_TCL + bool "tcl" + # fork() + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + # See this mailing list thread: + # http://lists.busybox.net/pipermail/buildroot/2015-March/121198.html + depends on !BR2_STATIC_LIBS + help + TCL (Tool Command Language) is a simple textual language. + + http://www.tcl.tk + +if BR2_PACKAGE_TCL + +config BR2_PACKAGE_TCL_DEL_ENCODINGS + bool "delete encodings (saves 1.6Mb)" + default y + help + Delete encoding files for TCL. If your programs do not use + various tcl character recoding functions, you may safely + choose Y here. + + It saves approx. 1.6 Mb of space. + +config BR2_PACKAGE_TCL_SHLIB_ONLY + bool "install only shared library" + default y + help + Install only TCL shared library and not binary tcl + interpreter (tclsh). + + Saves ~14kb. + +endif diff --git a/package/tcl/tcl.hash b/package/tcl/tcl.hash new file mode 100644 index 0000000000..dd6463781c --- /dev/null +++ b/package/tcl/tcl.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 ce26d5b9c7504fc25d2f10ef0b82b14cf117315445b5afa9e673ed331830fb53 tcl8.6.5-src.tar.gz diff --git a/package/tcl/tcl.mk b/package/tcl/tcl.mk new file mode 100644 index 0000000000..a1153c7231 --- /dev/null +++ b/package/tcl/tcl.mk @@ -0,0 +1,81 @@ +################################################################################ +# +# tcl +# +################################################################################ + +TCL_VERSION_MAJOR = 8.6 +TCL_VERSION = $(TCL_VERSION_MAJOR).5 +TCL_SOURCE = tcl$(TCL_VERSION)-src.tar.gz +TCL_SITE = http://downloads.sourceforge.net/project/tcl/Tcl/$(TCL_VERSION) +TCL_LICENSE = tcl license +TCL_LICENSE_FILES = license.terms +TCL_SUBDIR = unix +TCL_INSTALL_STAGING = YES +TCL_AUTORECONF = YES + +TCL_CONF_OPTS = \ + --disable-symbols \ + --disable-langinfo \ + --disable-framework + +HOST_TCL_CONF_OPTS = \ + --disable-symbols \ + --disable-langinfo \ + --disable-framework + +# I haven't found a good way to force pkgs to not build +# or configure without just removing the entire pkg directory. +define HOST_TCL_REMOVE_PACKAGES + rm -fr $(@D)/pkgs/sqlite3* $(@D)/pkgs/tdbc* +endef +HOST_TCL_PRE_CONFIGURE_HOOKS += HOST_TCL_REMOVE_PACKAGES + +# We remove the bundled sqlite as we prefer to not use bundled stuff at all. +define TCL_REMOVE_PACKAGES + rm -fr $(@D)/pkgs/sqlite3* \ + $(if $(BR2_PACKAGE_MYSQL),,$(@D)/pkgs/tdbcmysql*) \ + $(@D)/pkgs/tdbcodbc* \ + $(if $(BR2_PACKAGE_POSTGRESQL),,$(@D)/pkgs/tdbcpostgres*) \ + $(if $(BR2_PACKAGE_SQLITE),,$(@D)/pkgs/tdbcsqlite3*) +endef +TCL_PRE_CONFIGURE_HOOKS += TCL_REMOVE_PACKAGES + +ifeq ($(BR2_PACKAGE_TCL_DEL_ENCODINGS),y) +define TCL_REMOVE_ENCODINGS + rm -rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/* +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_ENCODINGS +endif + +ifeq ($(BR2_PACKAGE_TCL_SHLIB_ONLY),y) +define TCL_REMOVE_TCLSH + rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR) +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_TCLSH +else +define TCL_SYMLINK_TCLSH + ln -sf tclsh$(TCL_VERSION_MAJOR) $(TARGET_DIR)/usr/bin/tclsh +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_SYMLINK_TCLSH +endif + +# Until someone needs it, we don't handle locale installation. tcl has +# a complicated method of translating LANG-style locale names into its internal +# .msg name which makes it difficult to save the correct locales per the +# configured whitelist. +define TCL_REMOVE_EXTRA + rm -fr $(TARGET_DIR)/usr/lib/tclConfig.sh \ + $(TARGET_DIR)/usr/lib/tclooConfig.sh \ + $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/tclAppInit.c \ + $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/msgs +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_REMOVE_EXTRA + +TCL_DEPENDENCIES = $(if $(BR2_PACKAGE_SQLITE),sqlite) \ + $(if $(BR2_PACKAGE_MYSQL),mysql) \ + $(if $(BR2_PACKAGE_POSTGRESQL),postgresql) +HOST_TCL_DEPENDENCIES = + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/tclap/Config.in b/package/tclap/Config.in new file mode 100644 index 0000000000..667117d91b --- /dev/null +++ b/package/tclap/Config.in @@ -0,0 +1,17 @@ +comment "tclap needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_TCLAP + bool "tclap" + depends on BR2_INSTALL_LIBSTDCPP + help + This is a small, flexible library that provides a simple interface + for defining and accessing command line arguments. It was initially + inspired by the user friendly CLAP libary. The difference is that + this library is templatized, so the argument class is type + independent. Type independence avoids identical-except-for-type + objects, such as IntArg, FloatArg, and StringArg. While the library + is not strictly compliant with the GNU or POSIX standards, it is + close. + + http://tclap.sourceforge.net/ diff --git a/package/tclap/tclap.hash b/package/tclap/tclap.hash new file mode 100644 index 0000000000..55d475fc89 --- /dev/null +++ b/package/tclap/tclap.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 9f9f0fe3719e8a89d79b6ca30cf2d16620fba3db5b9610f9b51dd2cd033deebb tclap-1.2.1.tar.gz diff --git a/package/tclap/tclap.mk b/package/tclap/tclap.mk new file mode 100644 index 0000000000..807f247988 --- /dev/null +++ b/package/tclap/tclap.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# tclap +# +################################################################################ + +TCLAP_VERSION = 1.2.1 +TCLAP_SITE = http://downloads.sourceforge.net/project/tclap +TCLAP_LICENSE = MIT +TCLAP_LICENSE_FILES = COPYING +TCLAP_INSTALL_STAGING = YES + +# This package is a pure C++ template library, only made of headers. +TCLAP_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/tcllib/Config.in b/package/tcllib/Config.in new file mode 100644 index 0000000000..b0a4ad060e --- /dev/null +++ b/package/tcllib/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_TCLLIB + bool "tcllib" + help + Tcllib is a collection of utility modules for Tcl. These + modules provide a wide variety of functionality, from + implementations of standard data structures to + implementations of common networking protocols. The intent + is to collect commonly used function into a single library, + which users can rely on to be available and stable + + http://tcl.activestate.com/software/tcllib/ diff --git a/package/tcllib/tcllib.hash b/package/tcllib/tcllib.hash new file mode 100644 index 0000000000..eb990a2aba --- /dev/null +++ b/package/tcllib/tcllib.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 0db9e17d6c0f44d3ca2df2ea5023e35c0f3767e7008c3cb26d201446eb68add1 tcllib-1.13.tar.bz2 diff --git a/package/tcllib/tcllib.mk b/package/tcllib/tcllib.mk new file mode 100644 index 0000000000..9eb3b7dbe9 --- /dev/null +++ b/package/tcllib/tcllib.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# tcllib +# +################################################################################ + +TCLLIB_VERSION = 1.13 +TCLLIB_SOURCE = tcllib-$(TCLLIB_VERSION).tar.bz2 +TCLLIB_SITE = http://downloads.sourceforge.net/project/tcllib/tcllib/$(TCLLIB_VERSION) +TCLLIB_LICENSE = tcl license +TCLLIB_LICENSE_FILES = license.terms +TCLLIB_DEPENDENCIES = host-tcl +TCLLIB_CONF_ENV = ac_cv_path_tclsh="$(HOST_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR)" + +$(eval $(autotools-package)) diff --git a/package/tcpdump/Config.in b/package/tcpdump/Config.in new file mode 100644 index 0000000000..8b54c603df --- /dev/null +++ b/package/tcpdump/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_TCPDUMP + bool "tcpdump" + select BR2_PACKAGE_LIBPCAP + help + A tool for network monitoring and data acquisition. + + http://www.tcpdump.org/ + +if BR2_PACKAGE_TCPDUMP + +config BR2_PACKAGE_TCPDUMP_SMB + bool "smb dump support" + help + enable possibly-buggy SMB printer + +endif diff --git a/package/tcpdump/tcpdump.hash b/package/tcpdump/tcpdump.hash new file mode 100644 index 0000000000..5943347b42 --- /dev/null +++ b/package/tcpdump/tcpdump.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 6be520269a89036f99c0b2126713a60965953eab921002b07608ccfc0c47d9af tcpdump-4.7.4.tar.gz diff --git a/package/tcpdump/tcpdump.mk b/package/tcpdump/tcpdump.mk new file mode 100644 index 0000000000..14b3503937 --- /dev/null +++ b/package/tcpdump/tcpdump.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# tcpdump +# +################################################################################ + +TCPDUMP_VERSION = 4.7.4 +TCPDUMP_SITE = http://www.tcpdump.org/release +TCPDUMP_LICENSE = BSD-3c +TCPDUMP_LICENSE_FILES = LICENSE +TCPDUMP_CONF_ENV = \ + ac_cv_linux_vers=2 \ + td_cv_buggygetaddrinfo=no \ + PCAP_CONFIG=$(STAGING_DIR)/usr/bin/pcap-config +TCPDUMP_CONF_OPTS = \ + --without-crypto \ + --with-system-libpcap \ + $(if $(BR2_PACKAGE_TCPDUMP_SMB),--enable-smb,--disable-smb) +TCPDUMP_DEPENDENCIES = zlib libpcap + +ifeq ($(BR2_STATIC_LIBS),y) +TCPDUMP_CONF_OPTS += LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`" +endif + +# make install installs an unneeded extra copy of the tcpdump binary +define TCPDUMP_REMOVE_DUPLICATED_BINARY + rm -f $(TARGET_DIR)/usr/sbin/tcpdump.$(TCPDUMP_VERSION) +endef + +TCPDUMP_POST_INSTALL_TARGET_HOOKS += TCPDUMP_REMOVE_DUPLICATED_BINARY + +$(eval $(autotools-package)) diff --git a/package/tcping/Config.in b/package/tcping/Config.in new file mode 100644 index 0000000000..6677b58b7c --- /dev/null +++ b/package/tcping/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_TCPING + bool "tcping" + help + tcping does a TCP connect to the given ip/port + combination. The user can specify a timeout in seconds. This + is useful in shell scripts running in firewalled + environments. Often SYNs are just being dropped by + firewalls, thus connection establishment will be retried + several times (for minutes) until a TCP timeout is + reached. With tcping it is possible to check first if the + desired port is reachable and then start connection + establishment. + + http://www.linuxco.de/tcping/tcping.html diff --git a/package/tcping/tcping.hash b/package/tcping/tcping.hash new file mode 100644 index 0000000000..de42775cc1 --- /dev/null +++ b/package/tcping/tcping.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 1ad52e904094d12b225ac4a0bc75297555e931c11a1501445faa548ff5ecdbd0 tcping-1.3.5.tar.gz diff --git a/package/tcping/tcping.mk b/package/tcping/tcping.mk new file mode 100644 index 0000000000..ff43490c81 --- /dev/null +++ b/package/tcping/tcping.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tcping +# +################################################################################ + +TCPING_VERSION = 1.3.5 +TCPING_SITE = http://www.linuxco.de/tcping +TCPING_LICENSE = GPLv3+ +TCPING_LICENSE_FILES = LICENSE + +define TCPING_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CCFLAGS="$(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ + -C $(@D) tcping.linux +endef + +define TCPING_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/tcping $(TARGET_DIR)/usr/bin/tcping +endef + +$(eval $(generic-package)) diff --git a/package/tcpreplay/Config.in b/package/tcpreplay/Config.in new file mode 100644 index 0000000000..2ba2eb5944 --- /dev/null +++ b/package/tcpreplay/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_TCPREPLAY + bool "tcpreplay" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBPCAP + help + Tcpreplay is a tool for replaying network traffic from files saved + with tcpdump or other tools which write pcap(3) files. + + http://tcpreplay.appneta.com/ diff --git a/package/tcpreplay/tcpreplay.hash b/package/tcpreplay/tcpreplay.hash new file mode 100644 index 0000000000..95d6d5d818 --- /dev/null +++ b/package/tcpreplay/tcpreplay.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 61b916ef91049cad2a9ddc8de6f5e3e3cc5d9998dbb644dc91cf3a798497ffe4 tcpreplay-4.1.1.tar.gz diff --git a/package/tcpreplay/tcpreplay.mk b/package/tcpreplay/tcpreplay.mk new file mode 100644 index 0000000000..0723c02d28 --- /dev/null +++ b/package/tcpreplay/tcpreplay.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# tcpreplay +# +################################################################################ + +TCPREPLAY_VERSION = 4.1.1 +TCPREPLAY_SITE = https://github.com/appneta/tcpreplay/releases/download/v$(TCPREPLAY_VERSION) +TCPREPLAY_LICENSE = GPLv3 +TCPREPLAY_LICENSE_FILES = docs/LICENSE +TCPREPLAY_CONF_ENV = \ + tr_cv_libpcap_version=">= 0.7.0" \ + ac_cv_have_bpf=no \ + $(call AUTOCONF_AC_CHECK_FILE_VAL,$(STAGING_DIR)/usr/include/pcap-netmap.c)=no +TCPREPLAY_CONF_OPTS = --with-libpcap=$(STAGING_DIR)/usr +TCPREPLAY_DEPENDENCIES = libpcap + +# libpcap may depend on symbols in other libs +TCPREPLAY_LIBS = $(STAGING_DIR)/usr/bin/pcap-config --static --libs +TCPREPLAY_CONF_ENV += ac_cv_search_pcap_close="`$(TCPREPLAY_LIBS)`" \ + LIBS="`$(TCPREPLAY_LIBS)`" + +ifeq ($(BR2_STATIC_LIBS),y) +TCPREPLAY_CONF_OPTS += --enable-dynamic-link=no +endif + +ifeq ($(BR2_PACKAGE_TCPDUMP),y) +TCPREPLAY_CONF_ENV += ac_cv_path_tcpdump_path=/usr/sbin/tcpdump +else +TCPREPLAY_CONF_ENV += ac_cv_path_tcpdump_path=no +endif + +$(eval $(autotools-package)) diff --git a/package/tegrarcm/0001-Don-t-assume-cryptopp-is-system-wide-installed.patch b/package/tegrarcm/0001-Don-t-assume-cryptopp-is-system-wide-installed.patch new file mode 100644 index 0000000000..3c738d86a4 --- /dev/null +++ b/package/tegrarcm/0001-Don-t-assume-cryptopp-is-system-wide-installed.patch @@ -0,0 +1,114 @@ +From 5ea6b3859ebe16ff47856b58262b14463e119c13 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 19 Apr 2016 22:14:42 +0200 +Subject: [PATCH] Don't assume cryptopp is system-wide installed + +The current build system adds "-isystem /usr/include/$(CRYPTOLIB)" to +AM_CPPFLAGS, but this is wrong because cryptopp might not be installed +in this location. Instead, the build system should simply include + or and rely on the compiler include +path. + +The tricky part is that it can be or . To +solve this, we use a solution similar to the one used in +https://github.com/bingmann/crypto-speedtest/blob/master/m4/cryptopp.m4 +and +https://github.com/bingmann/crypto-speedtest/blob/master/src/speedtest_cryptopp.cpp: +the configure script fills in a variable called +CRYPTOLIB_HEADER_PREFIX, and we use that in the C++ code to include +the right header file. + +It is worth mentioning that doing #include + doesn't work, and we have to use an +intermediate #define'd constant to overcome this C preprocessor +limitation. + +Signed-off-by: Thomas Petazzoni +Submitted upstream at https://github.com/NVIDIA/tegrarcm/pull/2 +--- + configure.ac | 1 + + src/Makefile.am | 2 +- + src/aes-cmac.cpp | 28 +++++++++++++++++----------- + 3 files changed, 19 insertions(+), 12 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 943654f..620e158 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -33,6 +33,7 @@ AC_LINK_IFELSE( + [AC_MSG_ERROR([libcrypto++/libcryptopp is not installed.])])] + ) + AC_SUBST(CRYPTOLIB) ++AC_DEFINE_UNQUOTED([CRYPTOLIB_HEADER_PREFIX], [$CRYPTOLIB], [Location of cryptolib header]) + LDFLAGS=$SAVED_LDFLAGS + AC_LANG(C) + +diff --git a/src/Makefile.am b/src/Makefile.am +index 3dad0e6..35a606f 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -1,5 +1,5 @@ + AM_CFLAGS = -Wall -std=c99 +-AM_CPPFLAGS = -isystem /usr/include/$(CRYPTOLIB) $(LIBUSB_CFLAGS) ++AM_CPPFLAGS = $(LIBUSB_CFLAGS) + + bin_PROGRAMS = tegrarcm + tegrarcm_SOURCES = \ +diff --git a/src/aes-cmac.cpp b/src/aes-cmac.cpp +index 24c89f8..da8be5a 100644 +--- a/src/aes-cmac.cpp ++++ b/src/aes-cmac.cpp +@@ -26,6 +26,9 @@ + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ ++ ++#include "config.h" ++ + #include + using std::cout; + using std::cerr; +@@ -40,26 +43,29 @@ using std::string; + #include + using std::exit; + +-#include "cryptlib.h" +-using CryptoPP::Exception; ++#define CRYPTOPP_INCLUDE_CRYPTLIB ++#define CRYPTOPP_INCLUDE_CMAC ++#define CRYPTOPP_INCLUDE_AES ++#define CRYPTOPP_INCLUDE_HEX ++#define CRYPTOPP_INCLUDE_FILTERS ++#define CRYPTOPP_INCLUDE_SECBLOCK + +-#include "cmac.h" +-using CryptoPP::CMAC; ++#include CRYPTOPP_INCLUDE_CRYPTLIB ++#include CRYPTOPP_INCLUDE_CMAC ++#include CRYPTOPP_INCLUDE_AES ++#include CRYPTOPP_INCLUDE_HEX ++#include CRYPTOPP_INCLUDE_FILTERS ++#include CRYPTOPP_INCLUDE_SECBLOCK + +-#include "aes.h" ++using CryptoPP::Exception; ++using CryptoPP::CMAC; + using CryptoPP::AES; +- +-#include "hex.h" + using CryptoPP::HexEncoder; + using CryptoPP::HexDecoder; +- +-#include "filters.h" + using CryptoPP::StringSink; + using CryptoPP::StringSource; + using CryptoPP::HashFilter; + using CryptoPP::HashVerificationFilter; +- +-#include "secblock.h" + using CryptoPP::SecByteBlock; + + extern "C" int cmac_hash(const unsigned char *msg, int len, unsigned char *cmac_buf) +-- +2.6.4 + diff --git a/package/tegrarcm/Config.in.host b/package/tegrarcm/Config.in.host new file mode 100644 index 0000000000..47590fa127 --- /dev/null +++ b/package/tegrarcm/Config.in.host @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_TEGRARCM + bool "host tegrarcm" + depends on BR2_arm || BR2_armeb + help + This program is used to send code to a Tegra device in recovery + mode. + + https://github.com/NVIDIA/tegrarcm diff --git a/package/tegrarcm/tegrarcm.hash b/package/tegrarcm/tegrarcm.hash new file mode 100644 index 0000000000..4194a4cd21 --- /dev/null +++ b/package/tegrarcm/tegrarcm.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 538cb0af237ab33e070d3aeb6cc828cd7ef453753ba2ccc21b87ed43faac51bd tegrarcm-v1.7.tar.gz diff --git a/package/tegrarcm/tegrarcm.mk b/package/tegrarcm/tegrarcm.mk new file mode 100644 index 0000000000..6f03b570d8 --- /dev/null +++ b/package/tegrarcm/tegrarcm.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# tegrarcm +# +################################################################################ + +TEGRARCM_VERSION = v1.7 +TEGRARCM_SITE = $(call github,NVIDIA,tegrarcm,$(TEGRARCM_VERSION)) +TEGRARCM_LICENSE = BSD-3c / NVIDIA Software License (src/miniloader) +TEGRARCM_LICENSE_FILE = LICENSE +TEGRARCM_AUTORECONF = YES +HOST_TEGRARCM_DEPENDENCIES = host-libusb host-pkgconf host-cryptopp + +$(eval $(host-autotools-package)) diff --git a/package/tftpd/Config.in b/package/tftpd/Config.in new file mode 100644 index 0000000000..609b5d129d --- /dev/null +++ b/package/tftpd/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_TFTPD + bool "tftpd" + depends on BR2_USE_MMU # fork() + help + HPA's Trivial File Transfer Protocol (tftp) server. diff --git a/package/tftpd/S80tftpd-hpa b/package/tftpd/S80tftpd-hpa new file mode 100755 index 0000000000..4e8361faa7 --- /dev/null +++ b/package/tftpd/S80tftpd-hpa @@ -0,0 +1,81 @@ +#! /bin/sh + +OPTIONS="-c -l -s /var/lib/tftpboot" + +set -e + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DESC="HPA's tftpd" +NAME=tftpd +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/S80tftpd-hpa + +# +# Function that starts the daemon/service. +# +d_start() { + mkdir -p /var/lib/tftpboot + chmod 1777 /var/lib/tftpboot + $DAEMON $OPTIONS +} + +# +# Function that stops the daemon/service. +# +d_stop() { + killall -q $NAME +} + +# +# Function that sends a SIGHUP to the daemon/service. +# +d_reload() { + d_start + d_stop +} + +case "$1" in + start) + printf "Starting $DESC: " + d_start + echo "done" + ;; + stop) + printf "Stopping $DESC: " + d_stop + echo "done" + ;; + #reload) + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + # If the daemon responds to changes in its config file + # directly anyway, make this an "exit 0". + # + # printf "Reloading $DESC configuration..." + # d_reload + # echo "done." + #;; + restart|force-reload) + # + # If the "reload" option is implemented, move the "force-reload" + # option to the "reload" entry above. If not, "force-reload" is + # just the same as "restart". + # + printf "Restarting $DESC: " + d_stop + sleep 1 + d_start + echo "done" + ;; + *) + # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/package/tftpd/tftpd.hash b/package/tftpd/tftpd.hash new file mode 100644 index 0000000000..247b757fa6 --- /dev/null +++ b/package/tftpd/tftpd.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/software/network/tftp/tftp-hpa/sha256sums.asc +sha256 afee361df96a2f88344e191f6a25480fd714e1d28d176c3f10cc43fa206b718b tftp-hpa-5.2.tar.xz diff --git a/package/tftpd/tftpd.mk b/package/tftpd/tftpd.mk new file mode 100644 index 0000000000..78df835aa5 --- /dev/null +++ b/package/tftpd/tftpd.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# tftpd +# +################################################################################ + +TFTPD_VERSION = 5.2 +TFTPD_SOURCE = tftp-hpa-$(TFTPD_VERSION).tar.xz +TFTPD_SITE = $(BR2_KERNEL_MIRROR)/software/network/tftp/tftp-hpa +TFTPD_CONF_OPTS = --without-tcpwrappers + +# Override BusyBox implementations if BusyBox is enabled. +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +TFTPD_DEPENDENCIES += busybox +endif + +define TFTPD_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/tftp/tftp $(TARGET_DIR)/usr/bin/tftp + $(INSTALL) -D $(@D)/tftpd/tftpd $(TARGET_DIR)/usr/sbin/tftpd +endef + +define TFTPD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/tftpd/S80tftpd-hpa $(TARGET_DIR)/etc/init.d/S80tftpd-hpa +endef + +$(eval $(autotools-package)) diff --git a/package/thrift/0001-libevent-cross.patch b/package/thrift/0001-libevent-cross.patch new file mode 100644 index 0000000000..f07caa762a --- /dev/null +++ b/package/thrift/0001-libevent-cross.patch @@ -0,0 +1,16 @@ +Make it cross-compile happy the hard way, there's no clean way. + +Signed-off-by: Gustavo Zacarias + +diff -Nura thrift-0.9.1.orig/aclocal/ax_lib_event.m4 thrift-0.9.1/aclocal/ax_lib_event.m4 +--- thrift-0.9.1.orig/aclocal/ax_lib_event.m4 2013-08-15 11:04:29.000000000 -0300 ++++ thrift-0.9.1/aclocal/ax_lib_event.m4 2013-10-07 20:40:44.076435613 -0300 +@@ -75,7 +75,7 @@ + AC_LANG_PUSH([C]) + dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling, + dnl but then the version cannot be checked. +- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include + #include + ]], [[ diff --git a/package/thrift/0002-autoreconf.patch b/package/thrift/0002-autoreconf.patch new file mode 100644 index 0000000000..1a52f7c70d --- /dev/null +++ b/package/thrift/0002-autoreconf.patch @@ -0,0 +1,28 @@ +Fillers to make autoreconf (automake) happy. + +Signed-off-by: Gustavo Zacarias + +diff -Nura thrift-0.9.2.orig/AUTHORS thrift-0.9.2/AUTHORS +--- thrift-0.9.2.orig/AUTHORS 1969-12-31 21:00:00.000000000 -0300 ++++ thrift-0.9.2/AUTHORS 2014-12-05 14:46:20.431211224 -0300 +@@ -0,0 +1,2 @@ ++ ++ +diff -Nura thrift-0.9.2.orig/ChangeLog thrift-0.9.2/ChangeLog +--- thrift-0.9.2.orig/ChangeLog 1969-12-31 21:00:00.000000000 -0300 ++++ thrift-0.9.2/ChangeLog 2014-12-05 14:46:34.290686170 -0300 +@@ -0,0 +1,2 @@ ++ ++ +diff -Nura thrift-0.9.2.orig/NEWS thrift-0.9.2/NEWS +--- thrift-0.9.2.orig/NEWS 1969-12-31 21:00:00.000000000 -0300 ++++ thrift-0.9.2/NEWS 2014-12-05 14:46:32.308618241 -0300 +@@ -0,0 +1,2 @@ ++ ++ +diff -Nura thrift-0.9.2.orig/README thrift-0.9.2/README +--- thrift-0.9.2.orig/README 1969-12-31 21:00:00.000000000 -0300 ++++ thrift-0.9.2/README 2014-12-05 14:46:28.305481028 -0300 +@@ -0,0 +1,2 @@ ++ ++ diff --git a/package/thrift/0003-zlib-cross.patch b/package/thrift/0003-zlib-cross.patch new file mode 100644 index 0000000000..3af39c4691 --- /dev/null +++ b/package/thrift/0003-zlib-cross.patch @@ -0,0 +1,16 @@ +Make zlib version detection cross-compile happy. + +Signed-off-by: Gustavo Zacarias + +diff -Nura thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4 thrift-0.9.1/aclocal/ax_lib_zlib.m4 +--- thrift-0.9.1.orig/aclocal/ax_lib_zlib.m4 2013-08-15 11:04:29.000000000 -0300 ++++ thrift-0.9.1/aclocal/ax_lib_zlib.m4 2013-10-07 20:47:44.523177973 -0300 +@@ -73,7 +73,7 @@ + # (defined in the library). + AC_LANG_PUSH([C]) + dnl This can be changed to AC_LINK_IFELSE if you are cross-compiling. +- AC_RUN_IFELSE([AC_LANG_PROGRAM([[ ++ AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + #include + #if ZLIB_VERNUM >= 0x$WANT_ZLIB_VERSION + #else diff --git a/package/thrift/0004-THRIFT-3071-check-minimum-required-version-of-automa.patch b/package/thrift/0004-THRIFT-3071-check-minimum-required-version-of-automa.patch new file mode 100644 index 0000000000..ec2e22566c --- /dev/null +++ b/package/thrift/0004-THRIFT-3071-check-minimum-required-version-of-automa.patch @@ -0,0 +1,47 @@ +From 9b03d2b02d32302008d2bd0218b31b9a0ca5a748 Mon Sep 17 00:00:00 2001 +From: Jens Geyer +Date: Fri, 3 Apr 2015 12:37:03 +0200 +Subject: [PATCH] THRIFT-3071 check minimum required version of automake in bootstrap.sh +Client: Build process +Patch: James E. King, III + +This closes #421 + +- remove a warning when using libtool + +"libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([./aclocal])' to configure.ac," + +[Romain: + - This is upstream commit 4aa95df383bfa13c46a4dc0b41672ec29d476300 + - remove the part for bootstrap.sh which is not + bundled in thrift archive. + - fix the commit log accordingly] + +Signed-off-by: Romain Naour +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 5fa611e..8daeb03 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -18,6 +18,7 @@ + # + + AC_PREREQ(2.65) ++AC_CONFIG_MACRO_DIR([./aclocal]) + + AC_INIT([thrift], [0.9.2]) + +@@ -540,6 +541,7 @@ AC_CHECK_FUNCS([memset]) + AC_CHECK_FUNCS([mkdir]) + AC_CHECK_FUNCS([realpath]) + AC_CHECK_FUNCS([select]) ++AC_CHECK_FUNCS([setlocale]) + AC_CHECK_FUNCS([socket]) + AC_CHECK_FUNCS([strchr]) + AC_CHECK_FUNCS([strdup]) +-- +1.9.3 + diff --git a/package/thrift/0005-configure.ac-C-11-is-optional.patch b/package/thrift/0005-configure.ac-C-11-is-optional.patch new file mode 100644 index 0000000000..9ed7e0a691 --- /dev/null +++ b/package/thrift/0005-configure.ac-C-11-is-optional.patch @@ -0,0 +1,28 @@ +From 9c3a7e79b256730dd85a7acadbaf57ab018b3127 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Tue, 7 Apr 2015 07:37:26 +0200 +Subject: [PATCH] configure.ac: C++11 is optional + +Thrift build fine whitout c++11 support. + +Signed-off-by: Romain Naour +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 8daeb03..bfd49ae 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -99,7 +99,7 @@ AC_PROG_AWK + AC_PROG_RANLIB + + AC_LANG([C++]) +-AX_CXX_COMPILE_STDCXX_11([noext]) ++AX_CXX_COMPILE_STDCXX_11([noext], [optional]) + + AC_ARG_ENABLE([libs], + AS_HELP_STRING([--enable-libs], [build the Apache Thrift libraries [default=yes]]), +-- +1.9.3 + diff --git a/package/thrift/Config.in b/package/thrift/Config.in new file mode 100644 index 0000000000..54ca9b8538 --- /dev/null +++ b/package/thrift/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_THRIFT + bool "thrift" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + The Apache Thrift software framework, for scalable cross-language + services development, combines a software stack with a + code generation engine to build services that work + efficiently and seamlessly between C++, Java, Python, PHP, Ruby, + Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, + OCaml and Delphi and other languages. + + http://thrift.apache.org/ + +comment "thrift needs a toolchain w/ C++, wchar, threads" + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP diff --git a/package/thrift/thrift.hash b/package/thrift/thrift.hash new file mode 100644 index 0000000000..811aa988e3 --- /dev/null +++ b/package/thrift/thrift.hash @@ -0,0 +1,2 @@ +# From https://www.apache.org/dist/thrift/0.9.2/thrift-0.9.2.tar.gz.md5 +md5 89f63cc4d0100912f4a1f8a9dee63678 thrift-0.9.2.tar.gz diff --git a/package/thrift/thrift.mk b/package/thrift/thrift.mk new file mode 100644 index 0000000000..a40ddadb15 --- /dev/null +++ b/package/thrift/thrift.mk @@ -0,0 +1,73 @@ +################################################################################ +# +# thrift +# +################################################################################ + +THRIFT_VERSION = 0.9.2 +THRIFT_SITE = http://www.us.apache.org/dist/thrift/$(THRIFT_VERSION) +THRIFT_DEPENDENCIES = host-autoconf-archive host-pkgconf host-thrift boost \ + libevent openssl zlib +THRIFT_INSTALL_STAGING = YES +HOST_THRIFT_DEPENDENCIES = host-autoconf-archive host-bison host-boost \ + host-flex host-libevent host-openssl host-pkgconf host-zlib + +THRIFT_CONF_OPTS = --with-sysroot=$(STAGING_DIR) \ + --with-boost \ + --with-boost-libdir=$(STAGING_DIR)/usr/lib \ + --disable-tests \ + --disable-tutorial +HOST_THRIFT_CONF_OPTS = --with-sysroot=$(HOST_DIR) \ + --disable-tests \ + --disable-tutorial +THRIFT_AUTORECONF = YES +THRIFT_AUTORECONF_OPTS = -I $(HOST_DIR)/usr/share/autoconf-archive +THRIFT_LICENSE = Apache-2.0 +THRIFT_LICENSE_FILES = LICENSE + +ifeq ($(BR2_STATIC_LIBS),y) +# openssl uses zlib, so we need to explicitly link with it when static +THRIFT_CONF_ENV += LIBS=-lz +endif + +# Language selection +# The generator (host tool) works with all of them regardless +# This is just for the libraries / bindings +THRIFT_LANG_CONF_OPTS += --without-csharp --without-java --without-erlang \ + --without-python --without-perl --without-php --without-php_extension \ + --without-ruby --without-haskell --without-go --without-d \ + --without-qt4 --without-lua +HOST_THRIFT_CONF_OPTS += $(THRIFT_LANG_CONF_OPTS) --without-c_glib +THRIFT_CONF_OPTS += $(THRIFT_LANG_CONF_OPTS) + +# C bindings +ifeq ($(BR2_PACKAGE_LIBGLIB2),y) +THRIFT_DEPENDENCIES += libglib2 +else +THRIFT_CONF_OPTS += --without-c_glib +endif + +# De-hardcode THRIFT for cross compiling +define THRIFT_TOOL_NO_HARDCODE + for f in `find $(@D) -name Makefile.am -type f`; do \ + $(SED) "/^THRIFT =/d" $$f; \ + done + $(SED) "s:top_builddir)/compiler/cpp/thrift:THRIFT):" $(@D)/tutorial/Makefile.am +endef + +THRIFT_POST_PATCH_HOOKS += THRIFT_TOOL_NO_HARDCODE + +define THRIFT_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) THRIFT=$(HOST_DIR)/usr/bin/thrift -C $(@D) +endef + +# Install runtime only +define THRIFT_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/lib DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +# to be used by other packages +THRIFT = $(HOST_DIR)/usr/bin/thrift diff --git a/package/thttpd/0001-getline.patch b/package/thttpd/0001-getline.patch new file mode 100644 index 0000000000..35c366aef1 --- /dev/null +++ b/package/thttpd/0001-getline.patch @@ -0,0 +1,26 @@ +Fix glibc/eglibc getline() conflicting functions. + +Signed-off-by: Gustavo Zacarias +--- + +diff -Nura thttpd-2.25b.orig/extras/htpasswd.c thttpd-2.25b/extras/htpasswd.c +--- thttpd-2.25b.orig/extras/htpasswd.c 2001-12-18 21:08:08.000000000 -0300 ++++ thttpd-2.25b/extras/htpasswd.c 2011-11-25 11:42:47.198582812 -0300 +@@ -49,7 +49,7 @@ + while((line[y++] = line[x++])); + } + +-static int getline(char *s, int n, FILE *f) { ++static int get_line(char *s, int n, FILE *f) { + register int i=0; + + while(1) { +@@ -189,7 +189,7 @@ + strcpy(user,argv[2]); + + found = 0; +- while(!(getline(line,MAX_STRING_LEN,f))) { ++ while(!(get_line(line,MAX_STRING_LEN,f))) { + if(found || (line[0] == '#') || (!line[0])) { + putline(tfp,line); + continue; diff --git a/package/thttpd/Config.in b/package/thttpd/Config.in new file mode 100644 index 0000000000..d359785435 --- /dev/null +++ b/package/thttpd/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_THTTPD + bool "thttpd" + depends on BR2_USE_MMU # fork() + help + thttpd is a simple, small, portable, fast, and secure HTTP server + + http://www.acme.com/software/thttpd/ diff --git a/package/thttpd/thttpd.hash b/package/thttpd/thttpd.hash new file mode 100644 index 0000000000..2400f5bc8d --- /dev/null +++ b/package/thttpd/thttpd.hash @@ -0,0 +1,3 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/t/thttpd/thttpd_2.25b-11.dsc +sha256 07719b08b1cff6a21c08697a7bcb4395425b07ee753106262fb62a03a7d32360 thttpd_2.25b.orig.tar.gz +sha256 4d213c18daf121d21412cc54864fbca250e1773a91df6573373e1d2273a2cec9 thttpd_2.25b-11.diff.gz diff --git a/package/thttpd/thttpd.mk b/package/thttpd/thttpd.mk new file mode 100644 index 0000000000..5b4b0c4591 --- /dev/null +++ b/package/thttpd/thttpd.mk @@ -0,0 +1,55 @@ +################################################################################ +# +# thttpd +# +################################################################################ + +THTTPD_VERSION = 2.25b +THTTPD_SOURCE = thttpd_$(THTTPD_VERSION).orig.tar.gz +THTTPD_PATCH = thttpd_$(THTTPD_VERSION)-11.diff.gz +THTTPD_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/t/thttpd +THTTPD_LICENSE = BSD-2c +THTTPD_LICENSE_FILES = thttpd.c + +ifneq ($(THTTPD_PATCH),) +define THTTPD_DEBIAN_PATCHES + if [ -d $(@D)/debian/patches ]; then \ + $(APPLY_PATCHES) $(@D) $(@D)/debian/patches \*.patch; \ + fi +endef +endif + +THTTPD_POST_PATCH_HOOKS = THTTPD_DEBIAN_PATCHES + +THTTPD_MAKE = $(MAKE1) + +define THTTPD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/thttpd $(TARGET_DIR)/usr/sbin/thttpd + $(INSTALL) -D -m 0755 $(@D)/extras/htpasswd $(TARGET_DIR)/usr/bin/htpasswd + $(INSTALL) -D -m 0755 $(@D)/extras/makeweb $(TARGET_DIR)/usr/bin/makeweb + $(INSTALL) -D -m 0755 $(@D)/extras/syslogtocern $(TARGET_DIR)/usr/bin/syslogtocern + $(INSTALL) -D -m 0755 $(@D)/scripts/thttpd_wrapper $(TARGET_DIR)/usr/sbin/thttpd_wrapper + $(SED) 's:/usr/local/sbin:/usr/sbin:g' -e \ + 's:/usr/local/www:/var/www:g' $(TARGET_DIR)/usr/sbin/thttpd_wrapper + $(INSTALL) -d $(TARGET_DIR)/var/www/data + $(INSTALL) -d $(TARGET_DIR)/var/www/logs + echo "dir=/var/www/data" > $(TARGET_DIR)/var/www/thttpd_config + echo 'cgipat=**.cgi' >> $(TARGET_DIR)/var/www/thttpd_config + echo "logfile=/var/www/logs/thttpd_log" >> $(TARGET_DIR)/var/www/thttpd_config + echo "pidfile=/var/run/thttpd.pid" >> $(TARGET_DIR)/var/www/thttpd_config +endef + +define THTTPD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 $(@D)/scripts/thttpd.sh $(TARGET_DIR)/etc/init.d/S90thttpd + $(SED) 's:/usr/local/sbin:/usr/sbin:g' $(TARGET_DIR)/etc/init.d/S90thttpd +endef + +define THTTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0644 package/thttpd/thttpd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/thttpd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ + ln -fs ../../../../usr/lib/systemd/system/thttpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/thttpd.service +endef + +$(eval $(autotools-package)) diff --git a/package/thttpd/thttpd.service b/package/thttpd/thttpd.service new file mode 100644 index 0000000000..e3c93e7b3c --- /dev/null +++ b/package/thttpd/thttpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Tiny HTTP Daemon + +[Service] +PIDFile=/run/thttpd.pid +ExecStart=/usr/sbin/thttpd -D -C /etc/thttpd.conf +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/ti-gfx/0001-newclkapi.patch b/package/ti-gfx/0001-newclkapi.patch new file mode 100644 index 0000000000..69574c15f4 --- /dev/null +++ b/package/ti-gfx/0001-newclkapi.patch @@ -0,0 +1,118 @@ +This patch adjusts the omap3630 portion of the powervr driver to use the new +clk kernel api. + +Signed-off-by: Spenser Gilliland +[yann.morin.1998@free.fr: rebased ontop of 5.01.00.01] +Signed-off-by: "Yann E. MORIN" +diff -durN ti-gfx-5_01_00_01.orig/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c ti-gfx-5_01_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c +--- ti-gfx-5_01_00_01.orig/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2013-12-23 15:44:20.000000000 +0100 ++++ ti-gfx-5_01_00_01/GFX_Linux_KM/services4/system/omap3630/sysutils_linux.c 2014-02-26 19:17:39.829571846 +0100 +@@ -182,6 +182,49 @@ + @Return PVRSRV_ERROR + + ******************************************************************************/ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) ++int clk_disable_unprepare(struct clk *clk) ++{ ++ return clk_disable(clk); ++} ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) ++int clk_disable_unprepare(struct clk *clk) ++{ ++ res = clk_disable(clk); ++ if (res < 0) ++ return res; ++ ++ res = clk_unprepare(clk); ++ if (ret < 0) ++ return res; ++ ++ return 0; ++} ++#endif ++ ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,2,0) ++int clk_prepare_enable(struct clk *clk) ++{ ++ return clk_enable(clk); ++} ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0) ++int clk_prepare_enable(struct clk *clk) ++{ ++ res = clk_prepare(clk); ++ if (ret < 0) ++ return res; ++ ++ res = clk_enable(clk); ++ if (res < 0) { ++ clk_unprepare(clk); ++ return res; ++ } ++ ++ return 0; ++} ++#endif ++ + PVRSRV_ERROR EnableSGXClocks(SYS_DATA *psSysData) + { + #if !defined(NO_HARDWARE) +@@ -198,7 +241,7 @@ + + #if !defined(PM_RUNTIME_SUPPORT) + PVR_DPF((PVR_DBG_MESSAGE, "EnableSGXClocks: Enabling SGX Clocks")); +- res=clk_enable(psSysSpecData->psSGX_FCK); ++ res=clk_prepare_enable(psSysSpecData->psSGX_FCK); + if (res < 0) + { + PVR_DPF((PVR_DBG_ERROR, "EnableSGXClocks: Couldn't enable SGX functional clock (%d)", res)); +@@ -324,7 +367,7 @@ + + PVR_DPF((PVR_DBG_MESSAGE, "DisableSGXClocks: Disabling SGX Clocks")); + #if !defined(PM_RUNTIME_SUPPORT) +- clk_disable(psSysSpecData->psSGX_FCK); ++ clk_disable_unprepare(psSysSpecData->psSGX_FCK); + #endif + SysDisableSGXInterrupts(psSysData); + +@@ -540,14 +583,14 @@ + rate = clk_get_rate(psSysSpecData->psGPT11_FCK); + PVR_TRACE(("GPTIMER11 clock is %dMHz", HZ_TO_MHZ(rate))); + +- res = clk_enable(psSysSpecData->psGPT11_FCK); ++ res = clk_prepare_enable(psSysSpecData->psGPT11_FCK); + if (res < 0) + { + PVR_DPF((PVR_DBG_ERROR, "EnableSystemClocks: Couldn't enable GPTIMER11 functional clock (%d)", res)); + goto ExitError; + } + +- res = clk_enable(psSysSpecData->psGPT11_ICK); ++ res = clk_prepare_enable(psSysSpecData->psGPT11_ICK); + if (res < 0) + { + PVR_DPF((PVR_DBG_ERROR, "EnableSystemClocks: Couldn't enable GPTIMER11 interface clock (%d)", res)); +@@ -610,9 +653,9 @@ + + ExitDisableGPT11ICK: + #if defined(PVR_OMAP4_TIMING_PRCM) +- clk_disable(psSysSpecData->psGPT11_ICK); ++ clk_disable_unprepare(psSysSpecData->psGPT11_ICK); + ExitDisableGPT11FCK: +- clk_disable(psSysSpecData->psGPT11_FCK); ++ clk_disable_unprepare(psSysSpecData->psGPT11_FCK); + ExitError: + #endif /* defined(PVR_OMAP4_TIMING_PRCM) */ + eError = PVRSRV_ERROR_CLOCK_REQUEST_FAILED; +@@ -664,9 +707,9 @@ + psSysSpecData->sTimerRegPhysBase.uiAddr = 0; + #endif + #if defined(PVR_OMAP4_TIMING_PRCM) +- clk_disable(psSysSpecData->psGPT11_ICK); ++ clk_disable_unprepare(psSysSpecData->psGPT11_ICK); + +- clk_disable(psSysSpecData->psGPT11_FCK); ++ clk_disable_unprepare(psSysSpecData->psGPT11_FCK); + #endif /* defined(PVR_OMAP4_TIMING_PRCM) */ + } + #endif /* PVR_OMAP_USE_DM_TIMER_API */ diff --git a/package/ti-gfx/0002-fix-build-omaplfb-linux.patch b/package/ti-gfx/0002-fix-build-omaplfb-linux.patch new file mode 100644 index 0000000000..002d01c1af --- /dev/null +++ b/package/ti-gfx/0002-fix-build-omaplfb-linux.patch @@ -0,0 +1,21 @@ +Since commit a73fdc647417699833f22d0f239affe22e062827 in the kernel, +omap_dss_device's 'output' is renamed 'src'. + +Fix build with at least es5.x selected (AM35xx). + +Signed-off-by: Hadrien Boutteville + +--- a/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c ++++ b/GFX_Linux_KM/services4/3rdparty/dc_omapfb3_linux/omaplfb_linux.c +@@ -176,8 +176,10 @@ + #define OMAP_DSS_DRIVER(drv, dev) struct omap_dss_driver *drv = (dev) != NULL ? (dev)->driver : NULL + #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)) + #define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev) != NULL ? (dev)->manager : NULL +-#else ++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(3,12,0)) + #define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev) != NULL ? (dev)->output->manager : NULL ++#else ++#define OMAP_DSS_MANAGER(man, dev) struct omap_overlay_manager *man = (dev) != NULL ? (dev)->src->manager : NULL + #endif + + #define WAIT_FOR_VSYNC(man) ((man)->wait_for_vsync) diff --git a/package/ti-gfx/0003-km_install_modules.patch b/package/ti-gfx/0003-km_install_modules.patch new file mode 100644 index 0000000000..2cf6e81557 --- /dev/null +++ b/package/ti-gfx/0003-km_install_modules.patch @@ -0,0 +1,19 @@ +Patch to add modules_install target to the modules makefile. This makes +installation a little easier. + +Signed-off-by: Spenser Gilliland +---- +Index: ti-gfx-4_09_00_01/GFX_Linux_KM/Makefile +=================================================================== +--- ti-gfx-4_09_00_01.orig/GFX_Linux_KM/Makefile 2013-03-07 11:00:11.000000000 -0600 ++++ ti-gfx-4_09_00_01/GFX_Linux_KM/Makefile 2013-05-23 01:36:29.356676281 -0500 +@@ -479,6 +479,9 @@ + all: + $(MAKE) -C $(KERNELDIR) M=`pwd` $* + ++install: ++ $(MAKE) -C $(KERNELDIR) M=`pwd` modules_install ++ + clean: + @find . -name "*.o" -exec rm -r {} \; + @find . -name "*.ko" -exec rm -r {} \; diff --git a/package/ti-gfx/Config.in b/package/ti-gfx/Config.in new file mode 100644 index 0000000000..1481534d83 --- /dev/null +++ b/package/ti-gfx/Config.in @@ -0,0 +1,77 @@ +config BR2_PACKAGE_TI_GFX + bool "ti-gfx" + depends on BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC && BR2_arm + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + select BR2_PACKAGE_HAS_POWERVR + select BR2_PACKAGE_FBSET if !BR2_PACKAGE_BUSYBOX # Runtime dependency only + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra + help + Graphics libraries for TI boards. + + http://downloads.ti.com/dsps/dsps_public_sw/gfxsdk/ + +if BR2_PACKAGE_TI_GFX + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "ti-gfx" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "ti-gfx" + +config BR2_PACKAGE_PROVIDES_POWERVR + default "ti-gfx" + +config BR2_PACKAGE_TI_GFX_DEBUG + bool "enable debug support" + help + Turns on debugging in the kernel module, install libraries built with + debugging enabled, installs various tests and installs esrev script. + +config BR2_PACKAGE_TI_GFX_DEMOS + bool "install demos" + default y + help + Install the OGLES2ChameleonMan and OGLES2MagicLantern demos + +config BR2_PACKAGE_TI_GFX_EGLIMAGE + bool "install eglimage version of libraries" + help + Installs OpenGL libaries which support the eglimage api. + +choice + prompt "Target" + default BR2_PACKAGE_TI_GFX_ES3 + help + Select the SOC for which you would like to install drivers. Please use the + chart at + http://processors.wiki.ti.com/index.php/OMAP35x_Graphics_SDK_Getting_Started_Guide + +config BR2_PACKAGE_TI_GFX_ES3 + bool "es3.x (OMAP35xx, AM35xx Rev 3.1+)" + help + OMAP35xx, AM35xx Rev 3.1+ + +config BR2_PACKAGE_TI_GFX_ES5 + bool "es5.x (AM37xx, DM37xx)" + help + AM37xx, DM37xx + +config BR2_PACKAGE_TI_GFX_ES6 + bool "es6.x (AM387x, DMA814x, AM389x, DM816x)" + help + AM387x, DM814x, AM389x, DM816x + +config BR2_PACKAGE_TI_GFX_ES8 + bool "es8.x (AM335x)" + help + AM335x + +endchoice + +endif + +comment "ti-gfx needs an (e)glibc toolchain and a Linux kernel to be built" + depends on BR2_arm + depends on !(BR2_LINUX_KERNEL && BR2_TOOLCHAIN_USES_GLIBC) diff --git a/package/ti-gfx/S80ti-gfx b/package/ti-gfx/S80ti-gfx new file mode 100644 index 0000000000..fc5999a86d --- /dev/null +++ b/package/ti-gfx/S80ti-gfx @@ -0,0 +1,53 @@ +#!/bin/sh + +start() { + echo "ti-gfx: starting pvr driver" + + BITSPERPIXEL="$(fbset | awk '/geom/ {print $6}')" + YRES="$(fbset | awk '/geom/ {print $3}')" + # Set RGBA ordering to something the drivers like + if [ "$BITSPERPIXEL" = "32" ] ; then + fbset -rgba 8/16,8/8,8/0,8/24 + fi + # Try to enable triple buffering when there's enough VRAM + fbset -vyres $(( YRES*3 )) + + modprobe pvrsrvkm + modprobe omaplfb + modprobe bufferclass_ti + + pvr_maj=$(awk '$2=="pvrsrvkm" { print $1; }' /proc/devices) + rm -f /dev/pvrsrvkm + + mknod /dev/pvrsrvkm c $pvr_maj 0 + chmod 600 /dev/pvrsrvkm + + if ! /usr/bin/pvrsrvctl --start --no-module; then + echo "ti-gfx: unable to start server" + fi +} + +stop() { + echo "ti-gfx: stopping pvr driver" + + rmmod bufferclass_ti + rmmod omaplfb + rmmod pvrsrvkm +} + +case "$1" in +start) + start +;; +stop) + stop +;; +restart) + stop + start +;; +*) + echo "ti-gfx: Please use start, stop, or restart." + exit 1 +;; +esac diff --git a/package/ti-gfx/egl.pc b/package/ti-gfx/egl.pc new file mode 100644 index 0000000000..36ea41317b --- /dev/null +++ b/package/ti-gfx/egl.pc @@ -0,0 +1,11 @@ +prefix=/usr/ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: egl +Description: TI Graphics SDK implementation of EGL +Version: 1.9.2188537 +Requires: +Libs: -L${libdir} -lEGL -lGLESv2 -lIMGegl +Cflags: -I${includedir} diff --git a/package/ti-gfx/esrev.sh b/package/ti-gfx/esrev.sh new file mode 100644 index 0000000000..6220d4477d --- /dev/null +++ b/package/ti-gfx/esrev.sh @@ -0,0 +1,59 @@ +#!/bin/sh + +# Debug script to determine proper ES revision for the current board. The +# pvrsrvkm module must be insmoded before attempting to get the es rev. + +machine_id() { # return the machine ID + awk 'BEGIN { FS=": " } /Hardware/ \ + { gsub(" ", "_", $2); print tolower($2) } ' +Date: Thu, 18 Jun 2015 21:58:31 +0000 (+0200) +Subject: fix musl compatibility +X-Git-Tag: release-1.0.26~9 +X-Git-Url: http://www.tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=a04fd9d0c9babca461cee186677db8f607677c6a;hp=bb616245b7883ab30291cd8d46672ed2ae733166 + +fix musl compatibility + +Let configure include sys/if_tun.h when testing for netinet/if_ether.h +to detect the Kernel/libc header conflict on musl. + +After this patch, configure will correctly detect netinet/if_ether.h as +unusable and the subsequent compilation will not attempt to use it. + +Signed-off-by: Bernd Kuhls +(downloaded upstream commit included in tinc 1.0.25: + http://www.tinc-vpn.org/git/browse?p=tinc;a=commitdiff;h=a04fd9d0c9babca461cee186677db8f607677c6a) +--- + +diff --git a/src/have.h b/src/have.h +index e83f98f..69d5100 100644 +--- a/src/have.h ++++ b/src/have.h +@@ -207,4 +207,8 @@ + #include + #endif + ++#ifdef HAVE_LINUX_IF_TUN_H ++#include ++#endif ++ + #endif /* __TINC_SYSTEM_H__ */ diff --git a/package/tinc/Config.in b/package/tinc/Config.in new file mode 100644 index 0000000000..1d8e2c4259 --- /dev/null +++ b/package/tinc/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_TINC + bool "tinc" + select BR2_PACKAGE_LZO + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + depends on !BR2_STATIC_LIBS # tinc requires libdl for OpenSSL + depends on BR2_USE_MMU # fork() + help + tinc is a Virtual Private Network (VPN) daemon that uses + tunnelling and encryption to create a secure private network + between hosts on the Internet. + + http://www.tinc-vpn.org/ + +comment "tinc needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/tinc/tinc.hash b/package/tinc/tinc.hash new file mode 100644 index 0000000000..721b6bd443 --- /dev/null +++ b/package/tinc/tinc.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 498e58f9f39e3922030a63cf62baf4b46a40fbda8d90b23ec0f084f4a9f9b687 tinc-1.0.24.tar.gz diff --git a/package/tinc/tinc.mk b/package/tinc/tinc.mk new file mode 100644 index 0000000000..f7edd79acd --- /dev/null +++ b/package/tinc/tinc.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# tinc +# +################################################################################ + +TINC_VERSION = 1.0.24 +TINC_SITE = http://www.tinc-vpn.org/packages +TINC_DEPENDENCIES = lzo openssl zlib +TINC_LICENSE = GPLv2+ with OpenSSL exception +TINC_LICENSE_FILES = COPYING COPYING.README +TINC_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=c99" + +ifeq ($(BR2_arc),y) +TINC_CONF_ENV += \ + ax_cv_check_cflags___fPIE=no \ + ax_cv_check_ldflags___pie=no +endif + +$(eval $(autotools-package)) diff --git a/package/tinyalsa/0001-tinypcminfo-make-function-pcm_get_format_name-static.patch b/package/tinyalsa/0001-tinypcminfo-make-function-pcm_get_format_name-static.patch new file mode 100644 index 0000000000..4c8d48fd9e --- /dev/null +++ b/package/tinyalsa/0001-tinypcminfo-make-function-pcm_get_format_name-static.patch @@ -0,0 +1,45 @@ +From 10d82df8d920ceec4be9028a4939f96d6f407e81 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Wed, 26 Aug 2015 09:20:13 +0200 +Subject: [PATCH] tinypcminfo: make function pcm_get_format_name() static + +When building tinyalsa with gcc 5.x, the following warnings appear: + +tinypcminfo.c:97:52: warning: 'format_lookup' is static but used in inline function 'pcm_get_format_name' which is not static + return bit_index < ARRAY_SIZE(format_lookup) ? format_lookup[bit_index] : NULL; + ^ +tinypcminfo.c:97:35: warning: 'format_lookup' is static but used in inline function 'pcm_get_format_name' which is not static + return bit_index < ARRAY_SIZE(format_lookup) ? format_lookup[bit_index] : NULL; + +And the build fails with: + +tinypcminfo.o: In function `main': +tinypcminfo.c:(.text+0x2f0): undefined reference to `pcm_get_format_name' +collect2: error: ld returned 1 exit status + +To fix this, this patch marks the pcm_get_format_name() as static, +since it's anyway only used in tinypcminfo.c. + +Submitted upstream: https://github.com/tinyalsa/tinyalsa/pull/61 + +Signed-off-by: Thomas Petazzoni +--- + tinypcminfo.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tinypcminfo.c b/tinypcminfo.c +index b2d11bc..99eec34 100644 +--- a/tinypcminfo.c ++++ b/tinypcminfo.c +@@ -92,7 +92,7 @@ static const char *format_lookup[] = { + /* Returns a human readable name for the format associated with bit_index, + * NULL if bit_index is not known. + */ +-inline const char *pcm_get_format_name(unsigned bit_index) ++static inline const char *pcm_get_format_name(unsigned bit_index) + { + return bit_index < ARRAY_SIZE(format_lookup) ? format_lookup[bit_index] : NULL; + } +-- +2.5.0 + diff --git a/package/tinyalsa/0002-asound.h-include-time.h-to-get-struct-timespec-proto.patch b/package/tinyalsa/0002-asound.h-include-time.h-to-get-struct-timespec-proto.patch new file mode 100644 index 0000000000..1b5d43cec5 --- /dev/null +++ b/package/tinyalsa/0002-asound.h-include-time.h-to-get-struct-timespec-proto.patch @@ -0,0 +1,33 @@ +From c8333f8c7a4e4b9549abeef7530b2cd20a18e537 Mon Sep 17 00:00:00 2001 +From: rofl0r +Date: Mon, 12 Oct 2015 12:57:09 +0100 +Subject: [PATCH] asound.h: include to get struct timespec prototype + +without including it, we get +In file included from mixer.c:44:0: +include/sound/asound.h:337:18: error: field 'trigger_tstamp' has incomplete type +include/sound/asound.h:338:18: error: field 'tstamp' has incomplete type +etc. + +Signed-off-by: Baruch Siach +--- +Patch status: upstream commit c8333f8c7a4e + + include/sound/asound.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/sound/asound.h b/include/sound/asound.h +index a041628ec28e..7c6de81673f5 100644 +--- a/include/sound/asound.h ++++ b/include/sound/asound.h +@@ -12,6 +12,7 @@ + #ifndef __SOUND_ASOUND_H + #define __SOUND_ASOUND_H + ++#include + #include + + #define SNDRV_PROTOCOL_VERSION(major, minor, subminor) (((major)<<16)|((minor)<<8)|(subminor)) +-- +2.8.1 + diff --git a/package/tinyalsa/Config.in b/package/tinyalsa/Config.in new file mode 100644 index 0000000000..9ee47676fc --- /dev/null +++ b/package/tinyalsa/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_TINYALSA + bool "tinyalsa" + depends on !BR2_STATIC_LIBS + help + a small library to interface with ALSA in the Linux kernel + + The aims are: + + - Provide a basic pcm and mixer API + - If it's not absolutely needed, don't add it to the API + - Avoid supporting complex and unnecessary operations that could be dealt + with at a higher level + + https://github.com/tinyalsa/tinyalsa + +comment "tinyalsa needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/tinyalsa/tinyalsa.mk b/package/tinyalsa/tinyalsa.mk new file mode 100644 index 0000000000..e470b47f63 --- /dev/null +++ b/package/tinyalsa/tinyalsa.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# tinyalsa +# +################################################################################ + +TINYALSA_VERSION = f2a7b6d3d81bd337a540d56704b4aaa7bdb046fe +TINYALSA_SITE = $(call github,tinyalsa,tinyalsa,$(TINYALSA_VERSION)) +TINYALSA_LICENSE = BSD-3c +TINYALSA_INSTALL_STAGING = YES + +define TINYALSA_BUILD_CMDS + $(MAKE) CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) +endef + +define TINYALSA_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/libtinyalsa.so \ + $(STAGING_DIR)/usr/lib/libtinyalsa.so + $(INSTALL) -D -m 0644 $(@D)/include/tinyalsa/asoundlib.h \ + $(STAGING_DIR)/usr/include/tinyalsa/asoundlib.h +endef + +define TINYALSA_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/libtinyalsa.so \ + $(TARGET_DIR)/usr/lib/libtinyalsa.so + $(INSTALL) -D -m 0755 $(@D)/tinyplay $(TARGET_DIR)/usr/bin/tinyplay + $(INSTALL) -D -m 0755 $(@D)/tinycap $(TARGET_DIR)/usr/bin/tinycap + $(INSTALL) -D -m 0755 $(@D)/tinymix $(TARGET_DIR)/usr/bin/tinymix + $(INSTALL) -D -m 0755 $(@D)/tinypcminfo $(TARGET_DIR)/usr/bin/tinypcminfo +endef + +$(eval $(generic-package)) diff --git a/package/tinyhttpd/0001-misc-fixes.patch b/package/tinyhttpd/0001-misc-fixes.patch new file mode 100644 index 0000000000..05d6e50a70 --- /dev/null +++ b/package/tinyhttpd/0001-misc-fixes.patch @@ -0,0 +1,80 @@ +diff -ur tinyhttpd-0.1.0/httpd.c tinyhttpd-0.1.0-patched/httpd.c +--- tinyhttpd-0.1.0/httpd.c 2001-04-21 19:13:13.000000000 -0500 ++++ tinyhttpd-0.1.0-patched/httpd.c 2007-07-02 09:19:27.000000000 -0500 +@@ -4,14 +4,6 @@ + * CSE 4344 (Network concepts), Prof. Zeigler + * University of Texas at Arlington + */ +-/* This program compiles for Sparc Solaris 2.6. +- * To compile for Linux: +- * 1) Comment out the #include line. +- * 2) Comment out the line that defines the variable newthread. +- * 3) Comment out the two lines that run pthread_create(). +- * 4) Uncomment the line that runs accept_request(). +- * 5) Remove -lsocket from the Makefile. +- */ + #include + #include + #include +@@ -22,7 +14,6 @@ + #include + #include + #include +-#include + #include + #include + +@@ -30,7 +21,6 @@ + + #define SERVER_STRING "Server: jdbhttpd/0.1.0\r\n" + +-void accept_request(int); + void bad_request(int); + void cat(int, FILE *); + void cannot_execute(int); +@@ -102,7 +92,7 @@ + } + } + +- sprintf(path, "htdocs%s", url); ++ sprintf(path, "/var/www%s", url); + if (path[strlen(path) - 1] == '/') + strcat(path, "index.html"); + if (stat(path, &st) == -1) { +@@ -475,11 +465,10 @@ + int main(void) + { + int server_sock = -1; +- u_short port = 0; ++ u_short port = 80; + int client_sock = -1; + struct sockaddr_in client_name; + int client_name_len = sizeof(client_name); +- pthread_t newthread; + + server_sock = startup(&port); + printf("httpd running on port %d\n", port); +@@ -491,9 +480,7 @@ + &client_name_len); + if (client_sock == -1) + error_die("accept"); +- /* accept_request(client_sock); */ +- if (pthread_create(&newthread , NULL, accept_request, client_sock) != 0) +- perror("pthread_create"); ++ accept_request(client_sock); + } + + close(server_sock); +diff -ur tinyhttpd-0.1.0/Makefile tinyhttpd-0.1.0-patched/Makefile +--- tinyhttpd-0.1.0/Makefile 2001-04-21 17:03:39.000000000 -0500 ++++ tinyhttpd-0.1.0-patched/Makefile 2007-07-02 10:29:41.000000000 -0500 +@@ -1,7 +1,7 @@ + all: httpd + + httpd: httpd.c +- gcc -W -Wall -lsocket -lpthread -o httpd httpd.c ++ $(CC) $(CFLAGS) $(LDFLAGS) -W -Wall -o httpd httpd.c + + clean: +- rm httpd ++ rm -f httpd diff --git a/package/tinyhttpd/Config.in b/package/tinyhttpd/Config.in new file mode 100644 index 0000000000..f7365afa6f --- /dev/null +++ b/package/tinyhttpd/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_TINYHTTPD + bool "tinyhttpd" + depends on BR2_USE_MMU # fork() + help + A relatively simple webserver written as a school project. It is + exceedingly simple, threaded and handles basic CGI scripts. + + http://sourceforge.net/projects/tinyhttpd/ diff --git a/package/tinyhttpd/S85tinyhttpd b/package/tinyhttpd/S85tinyhttpd new file mode 100755 index 0000000000..fb512a0375 --- /dev/null +++ b/package/tinyhttpd/S85tinyhttpd @@ -0,0 +1,33 @@ +#! /bin/sh + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +NAME=tinyhttpd + +test -x /usr/sbin/$NAME || exit 0 +mkdir -p /var/www + +case "$1" in + start) + printf "Starting $NAME: " + $NAME > /dev/null & + echo "done" + ;; + stop) + printf "Stopping $NAME: " + killall -9 $NAME + echo "done" + ;; + restart) + printf "Restarting $NAME: " + killall -9 $NAME + sleep 1 + $NAME > /dev/null & + echo "done" + ;; + *) + echo "Usage: /etc/init.d/S85tinyhttpd {start|stop|restart}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/package/tinyhttpd/tinyhttpd.hash b/package/tinyhttpd/tinyhttpd.hash new file mode 100644 index 0000000000..73255d5651 --- /dev/null +++ b/package/tinyhttpd/tinyhttpd.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 56609b82869c80ba71b2a2af166a0bcaffe21e7412f4594e04b9a5abf733435a tinyhttpd-0.1.0.tar.gz diff --git a/package/tinyhttpd/tinyhttpd.mk b/package/tinyhttpd/tinyhttpd.mk new file mode 100644 index 0000000000..194249bd1f --- /dev/null +++ b/package/tinyhttpd/tinyhttpd.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# tinyhttpd +# +################################################################################ + +TINYHTTPD_VERSION = 0.1.0 +TINYHTTPD_SITE = http://downloads.sourceforge.net/project/tinyhttpd/tinyhttpd%20source/tinyhttpd%20$(TINYHTTPD_VERSION) +TINYHTTPD_LICENSE = GPL +TINYHTTPD_LICENSE_FILES = README + +define TINYHTTPD_BUILD_CMDS + $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef + +define TINYHTTPD_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/httpd $(TARGET_DIR)/usr/sbin/tinyhttpd + mkdir -p $(TARGET_DIR)/var/www +endef + +define TINYHTTPD_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/tinyhttpd/S85tinyhttpd \ + $(TARGET_DIR)/etc/init.d/S85tinyhttpd +endef + +define TINYHTTPD_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/tinyhttpd/tinyhttpd.service \ + $(TARGET_DIR)/usr/lib/systemd/system/tinyhttpd.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/tinyhttpd.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/tinyhttpd.service +endef + +$(eval $(generic-package)) diff --git a/package/tinyhttpd/tinyhttpd.service b/package/tinyhttpd/tinyhttpd.service new file mode 100644 index 0000000000..0ae5bac943 --- /dev/null +++ b/package/tinyhttpd/tinyhttpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Tiny HTTP daemon +After=network.target + +[Service] +ExecStart=/usr/sbin/tinyhttpd +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/tinymembench/Config.in b/package/tinymembench/Config.in new file mode 100644 index 0000000000..8f6e1a2b35 --- /dev/null +++ b/package/tinymembench/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_TINYMEMBENCH + bool "tinymembench" + depends on !BR2_MIPS_NABI32 && !BR2_MIPS_NABI64 + help + Tinymembench is a simple memory benchmark program, which + tries to measure the peak bandwidth of sequential memory + accesses and the latency of random memory accesses. + Bandwidth is measured by running different assembly code for + the aligned memory blocks and attempting different prefetch + strategies. + + https://github.com/ssvb/tinymembench diff --git a/package/tinymembench/tinymembench.mk b/package/tinymembench/tinymembench.mk new file mode 100644 index 0000000000..ab479d64e3 --- /dev/null +++ b/package/tinymembench/tinymembench.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tinymembench +# +################################################################################ + +TINYMEMBENCH_VERSION = v0.3 +TINYMEMBENCH_SITE = $(call github,ssvb,tinymembench,$(TINYMEMBENCH_VERSION)) +TINYMEMBENCH_LICENSE = MIT +TINYMEMBENCH_LICENSE_FILES = main.c + +define TINYMEMBENCH_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define TINYMEMBENCH_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/tinymembench \ + $(TARGET_DIR)/usr/bin/tinymembench +endef + +$(eval $(generic-package)) diff --git a/package/tinyxml/Config.in b/package/tinyxml/Config.in new file mode 100644 index 0000000000..061ff67146 --- /dev/null +++ b/package/tinyxml/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_TINYXML + bool "tinyxml" + depends on BR2_INSTALL_LIBSTDCPP + help + TinyXML is a simple, small, C++ XML parser that can be + easily integrating into other programs. + + https://github.com/leethomason/tinyxml2 + +comment "tinyxml needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/tinyxml/tinyxml.hash b/package/tinyxml/tinyxml.hash new file mode 100644 index 0000000000..6aa37d9de3 --- /dev/null +++ b/package/tinyxml/tinyxml.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 8164c9ad48b9028667768a584d62f7760cfbfb90d0dd6214ad174403058da10c tinyxml-2.6.2_2.tar.gz diff --git a/package/tinyxml/tinyxml.mk b/package/tinyxml/tinyxml.mk new file mode 100644 index 0000000000..df7b29fefb --- /dev/null +++ b/package/tinyxml/tinyxml.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# tinyxml +# +################################################################################ + +TINYXML_VERSION = 2.6.2_2 +TINYXML_SITE = http://mirrors.xbmc.org/build-deps/sources +# AUTORECONF is needed because the XBMC's version of TinyXML contains a +# configure.ac which is not present in mainline. +TINYXML_AUTORECONF = YES +TINYXML_INSTALL_STAGING = YES +TINYXML_LICENSE = zlib +TINYXML_LICENSE_FILES = README + +$(eval $(autotools-package)) diff --git a/package/tinyxml2/0001-Use-BUILD_SHARED_LIBS-cmake-standard.patch b/package/tinyxml2/0001-Use-BUILD_SHARED_LIBS-cmake-standard.patch new file mode 100644 index 0000000000..52288c509f --- /dev/null +++ b/package/tinyxml2/0001-Use-BUILD_SHARED_LIBS-cmake-standard.patch @@ -0,0 +1,65 @@ +From 69acf13fa679628259063c4d0cd17e59b8bb0b75 Mon Sep 17 00:00:00 2001 +From: xantares +Date: Fri, 14 Nov 2014 19:40:58 +0100 +Subject: [PATCH] Use BUILD_SHARED_LIBS cmake standard. + +Signed-off-by: Romain Naour +--- + CMakeLists.txt | 27 +++++++++------------------ + 1 file changed, 9 insertions(+), 18 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 91c61a4..4375bb9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -10,8 +10,8 @@ include(GNUInstallDirs) + ################################ + # set lib version here + +-set(GENERIC_LIB_VERSION "2.2.0") +-set(GENERIC_LIB_SOVERSION "2") ++set(GENERIC_LIB_VERSION "2.2.0") ++set(GENERIC_LIB_SOVERSION "2") + + + ################################ +@@ -46,12 +46,8 @@ endif(MSVC) + + ################################ + # Add targets +-set(BUILD_STATIC_LIBS ON CACHE BOOL "Set to ON to build static libraries") +-if(BUILD_STATIC_LIBS) +- add_library(tinyxml2static STATIC tinyxml2.cpp tinyxml2.h) +- set_target_properties(tinyxml2static PROPERTIES OUTPUT_NAME tinyxml2) +-endif(BUILD_STATIC_LIBS) +-add_library(tinyxml2 SHARED tinyxml2.cpp tinyxml2.h) ++option(BUILD_SHARED_LIBS "build shared or static libraries" ON) ++add_library(tinyxml2 tinyxml2.cpp tinyxml2.h) + set_target_properties(tinyxml2 PROPERTIES + COMPILE_DEFINITIONS "TINYXML2_EXPORT" + VERSION "${GENERIC_LIB_VERSION}" +@@ -63,16 +59,11 @@ add_dependencies(test ${TARGET_DATA_COPY}) + target_link_libraries(test tinyxml2) + + +-if(BUILD_STATIC_LIBS) +- install(TARGETS tinyxml2 tinyxml2static +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} +- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-else(BUILD_STATIC_LIBS) +- install(TARGETS tinyxml2 +- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} +- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-endif(BUILD_STATIC_LIBS) ++install(TARGETS tinyxml2 ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ + install(FILES tinyxml2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + + foreach(p LIB INCLUDE) +-- +1.9.3 + diff --git a/package/tinyxml2/0002-Rename-test-fixed-cmake-warning.patch b/package/tinyxml2/0002-Rename-test-fixed-cmake-warning.patch new file mode 100644 index 0000000000..409269ac4b --- /dev/null +++ b/package/tinyxml2/0002-Rename-test-fixed-cmake-warning.patch @@ -0,0 +1,38 @@ +From 77631a9cf500a578338a83bc230c419bf2a05b50 Mon Sep 17 00:00:00 2001 +From: xantares +Date: Fri, 14 Nov 2014 19:46:18 +0100 +Subject: [PATCH] Rename test, fixed cmake warning. + +Signed-off-by: Romain Naour +--- + CMakeLists.txt | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4375bb9..4a8f91d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,10 +53,10 @@ set_target_properties(tinyxml2 PROPERTIES + VERSION "${GENERIC_LIB_VERSION}" + SOVERSION "${GENERIC_LIB_SOVERSION}") + +-add_executable(test xmltest.cpp) +-add_dependencies(test tinyxml2) +-add_dependencies(test ${TARGET_DATA_COPY}) +-target_link_libraries(test tinyxml2) ++add_executable(xmltest xmltest.cpp) ++add_dependencies(xmltest tinyxml2) ++add_dependencies(xmltest ${TARGET_DATA_COPY}) ++target_link_libraries(xmltest tinyxml2) + + + install(TARGETS tinyxml2 +@@ -76,4 +76,4 @@ endforeach() + configure_file(tinyxml2.pc.in tinyxml2.pc @ONLY) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tinyxml2.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + +-#add_test(test ${SAMPLE_NAME} COMMAND $) ++#add_test(xmltest ${SAMPLE_NAME} COMMAND $) +-- +1.9.3 + diff --git a/package/tinyxml2/Config.in b/package/tinyxml2/Config.in new file mode 100644 index 0000000000..25bc5941aa --- /dev/null +++ b/package/tinyxml2/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_TINYXML2 + bool "tinyxml2" + depends on BR2_INSTALL_LIBSTDCPP + help + TinyXML-2 is a simple, small, efficient, C++ XML parser that can be + easily integrating into other programs. + + http://www.grinninglizard.com/tinyxml2/index.html + +comment "tinyxml2 needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/tinyxml2/tinyxml2.mk b/package/tinyxml2/tinyxml2.mk new file mode 100644 index 0000000000..370049b916 --- /dev/null +++ b/package/tinyxml2/tinyxml2.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# tinyxml2 +# +################################################################################ + +TINYXML2_VERSION = 2.2.0 +TINYXML2_SITE = $(call github,leethomason,tinyxml2,$(TINYXML2_VERSION)) +TINYXML2_LICENSE = zlib +TINYXML2_LICENSE_FILES = readme.md +TINYXML2_INSTALL_STAGING = YES + +$(eval $(cmake-package)) diff --git a/package/tmux/0001-remove-use-of-sys-cdefs.h.patch b/package/tmux/0001-remove-use-of-sys-cdefs.h.patch new file mode 100644 index 0000000000..929953fa9d --- /dev/null +++ b/package/tmux/0001-remove-use-of-sys-cdefs.h.patch @@ -0,0 +1,42 @@ +From 29e4794ca396a8db8a468ec74559922d2af5a987 Mon Sep 17 00:00:00 2001 +From: Nicholas Marriott +Date: Tue, 24 Nov 2015 18:46:50 +0000 +Subject: [PATCH] -sys/queue.h in proc.c, and nuke the unnecessary C++ header + guards stuff and sys/cdefs.h in vis.h (it causes problems on some platforms). + Reported by someone on GitHub, issue 212. + +--- +Backported from master upstream to fix musl build +https://github.com/tmux/tmux/commit/7b085136a7291cbcdfcc53182fbd13aaca70306e + +proc.c does not exist on version 2.1 + +Signed-off-by: Ricardo Martincoski +--- + compat/vis.h | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/compat/vis.h b/compat/vis.h +index 6795139..9f12d23 100644 +--- a/compat/vis.h ++++ b/compat/vis.h +@@ -73,9 +73,6 @@ + */ + #define UNVIS_END 1 /* no more characters */ + +-#include +- +-__BEGIN_DECLS + char *vis(char *, int, int, int); + int strvis(char *, const char *, int); + int stravis(char **, const char *, int); +@@ -85,6 +82,4 @@ int strunvis(char *, const char *); + int unvis(char *, char, int *, int); + ssize_t strnunvis(char *, const char *, size_t); + +-__END_DECLS +- + #endif /* !_VIS_H_ */ +-- +1.9.1 + diff --git a/package/tmux/Config.in b/package/tmux/Config.in new file mode 100644 index 0000000000..61719e4866 --- /dev/null +++ b/package/tmux/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_TMUX + bool "tmux" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_NCURSES + help + tmux is a terminal multiplexer, it enables a number of terminals + (or windows) to be accessed and controlled from a single terminal. + + https://tmux.github.io/ diff --git a/package/tmux/tmux.hash b/package/tmux/tmux.hash new file mode 100644 index 0000000000..e732aa24bb --- /dev/null +++ b/package/tmux/tmux.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 31564e7bf4bcef2defb3cb34b9e596bd43a3937cad9e5438701a81a5a9af6176 tmux-2.1.tar.gz diff --git a/package/tmux/tmux.mk b/package/tmux/tmux.mk new file mode 100644 index 0000000000..40f1a13898 --- /dev/null +++ b/package/tmux/tmux.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# tmux +# +################################################################################ + +TMUX_VERSION = 2.1 +TMUX_SITE = https://github.com/tmux/tmux/releases/download/$(TMUX_VERSION) +TMUX_LICENSE = ISC +TMUX_LICENSE_FILES = README +TMUX_DEPENDENCIES = libevent ncurses host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/tn5250/0001-ssldir.patch b/package/tn5250/0001-ssldir.patch new file mode 100644 index 0000000000..6fc78deef2 --- /dev/null +++ b/package/tn5250/0001-ssldir.patch @@ -0,0 +1,17 @@ +Value is assigned to $with_ssl_dir but used from $with_ssl which is wrong. +Fix configure since it's a one-liner and avoid an autoreconf. + +Signed-off-by: Gustavo Zacarias + +diff -Nura tn5250-0.17.4.orig/configure tn5250-0.17.4/configure +--- tn5250-0.17.4.orig/configure 2014-09-10 08:33:15.689519554 -0300 ++++ tn5250-0.17.4/configure 2014-09-10 08:33:47.428613117 -0300 +@@ -23258,7 +23258,7 @@ + if test "${with_ssl_dir+set}" = set; then + withval=$with_ssl_dir; + if test "$with_ssl_dir" != "no"; then +- checksslinclude "$with_ssl" ++ checksslinclude "$with_ssl_dir" + else + for topdir in /usr/local /usr /usr/pkg /usr/lib /var/ssl /opt; do + for subdir in $topdir $topdir/openssl $topdir/ssl; do diff --git a/package/tn5250/0002-Allow-building-against-OpenSSL-without-SSLv2_SSLv3.patch b/package/tn5250/0002-Allow-building-against-OpenSSL-without-SSLv2_SSLv3.patch new file mode 100644 index 0000000000..67f0fa63a1 --- /dev/null +++ b/package/tn5250/0002-Allow-building-against-OpenSSL-without-SSLv2_SSLv3.patch @@ -0,0 +1,32 @@ +$OpenBSD: patch-lib5250_sslstream_c,v 1.1 2015/10/07 16:09:04 jca Exp $ + +Allow building against OpenSSL without SSLv2/SSLv3 support. + +Download from: +http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/net/tn5250/patches/patch-lib5250_sslstream_c + +Signed-off-by: Peter Korsgaard +--- a/lib5250/sslstream.c.orig Fri Nov 21 09:12:21 2008 ++++ b/lib5250/sslstream.c Tue Oct 6 21:32:29 2015 +@@ -368,13 +368,19 @@ int tn5250_ssl_stream_init (Tn5250Stream *This) + methstr[4] = '\0'; + } + ++#ifndef OPENSSL_NO_SSL2 + if (!strcmp(methstr, "ssl2")) { + meth = SSLv2_client_method(); + TN5250_LOG(("SSL Method = SSLv2_client_method()\n")); +- } else if (!strcmp(methstr, "ssl3")) { ++ } else ++#endif ++#ifndef OPENSSL_NO_SSL3 ++ if (!strcmp(methstr, "ssl3")) { + meth = SSLv3_client_method(); + TN5250_LOG(("SSL Method = SSLv3_client_method()\n")); +- } else { ++ } else ++#endif ++ { + meth = SSLv23_client_method(); + TN5250_LOG(("SSL Method = SSLv23_client_method()\n")); + } diff --git a/package/tn5250/Config.in b/package/tn5250/Config.in new file mode 100644 index 0000000000..01be40bb73 --- /dev/null +++ b/package/tn5250/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_TN5250 + bool "tn5250" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + Telnet client that emulates 5250 terminals and printers. + + http://tn5250.sourceforge.net/ diff --git a/package/tn5250/tn5250.hash b/package/tn5250/tn5250.hash new file mode 100644 index 0000000000..ae65beab50 --- /dev/null +++ b/package/tn5250/tn5250.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 354237d400dc46af887cb3ffa4ed1f2c371f5b8bee8be046a683a4ac9db4f9c5 tn5250-0.17.4.tar.gz diff --git a/package/tn5250/tn5250.mk b/package/tn5250/tn5250.mk new file mode 100644 index 0000000000..bbaa686d86 --- /dev/null +++ b/package/tn5250/tn5250.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# tn5250 +# +################################################################################ + +TN5250_VERSION = 0.17.4 +TN5250_SITE = http://downloads.sourceforge.net/project/tn5250/tn5250/$(TN5250_VERSION) +TN5250_MAKE_OPTS = CPPFLAGS="" +TN5250_DEPENDENCIES = ncurses +TN5250_LICENSE = LGPLv2.1+ +TN5250_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +TN5250_CONF_OPTS += --with-ssl-dir=$(STAGING_DIR)/usr +TN5250_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs openssl`" +TN5250_DEPENDENCIES += openssl host-pkgconf +else +TN5250_CONF_OPTS += --without-ssl +endif + +define TN5250_INSTALL_FIXES + rm -f $(TARGET_DIR)/usr/bin/5250keys + rm -f $(TARGET_DIR)/usr/bin/xt5250 +endef + +TN5250_POST_INSTALL_TARGET_HOOKS += TN5250_INSTALL_FIXES + +$(eval $(autotools-package)) diff --git a/package/tor/0001-openssl-libz.patch b/package/tor/0001-openssl-libz.patch new file mode 100644 index 0000000000..855b1c5dbf --- /dev/null +++ b/package/tor/0001-openssl-libz.patch @@ -0,0 +1,116 @@ +Adjust link order of libz to solve bug with static linking +and remove host paths when looking for openssl. + +[Vincent: + - Adapt the patch to make it apply on the new version.] +[Bernd: rebased for tor-0.2.7.6] + +Signed-off-by: Bernd Kuhls +Signed-off-by: Vicente Olivert Riera + +diff -uNr tor-0.2.7.6.org/configure.ac tor-0.2.7.6/configure.ac +--- tor-0.2.7.6.org/configure.ac 2015-12-10 16:15:25.000000000 +0100 ++++ tor-0.2.7.6/configure.ac 2016-01-31 20:21:34.850408145 +0100 +@@ -607,11 +607,11 @@ + fi + ]) + +-TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto $TOR_LIB_GDI], ++TOR_SEARCH_LIBRARY(openssl, $tryssldir, [-lssl -lcrypto -lz $TOR_LIB_GDI], + [#include ], + [void RAND_add(const void *buf, int num, double entropy);], + [RAND_add((void*)0,0,0); exit(0);], [], +- [/usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/athena /opt/openssl]) ++ []) + + dnl XXXX check for OPENSSL_VERSION_NUMBER == SSLeay() + +diff -uNr tor-0.2.7.6.org/src/or/include.am tor-0.2.7.6/src/or/include.am +--- tor-0.2.7.6.org/src/or/include.am 2015-12-08 18:35:17.000000000 +0100 ++++ tor-0.2.7.6/src/or/include.am 2016-01-31 20:22:09.322777527 +0100 +@@ -110,7 +110,7 @@ + src_or_tor_LDADD = src/or/libtor.a src/common/libor.a \ + src/common/libor-crypto.a $(LIBDONNA) \ + src/common/libor-event.a src/trunnel/libor-trunnel.a \ +- @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ \ ++ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ \ + @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ @TOR_SYSTEMD_LIBS@ + + if COVERAGE_ENABLED +diff -uNr tor-0.2.7.6.org/src/test/include.am tor-0.2.7.6/src/test/include.am +--- tor-0.2.7.6.org/src/test/include.am 2015-12-08 18:35:17.000000000 +0100 ++++ tor-0.2.7.6/src/test/include.am 2016-01-31 20:25:59.673127854 +0100 +@@ -127,8 +127,8 @@ + src_test_test_LDADD = src/or/libtor-testing.a src/common/libor-testing.a \ + src/common/libor-crypto-testing.a $(LIBDONNA) src/common/libor.a \ + src/common/libor-event-testing.a src/trunnel/libor-trunnel-testing.a \ +- @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \ +- @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ \ ++ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \ ++ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ \ + @TOR_SYSTEMD_LIBS@ + + src_test_test_slow_CPPFLAGS = $(src_test_test_CPPFLAGS) +@@ -146,8 +146,8 @@ + src_test_bench_LDADD = src/or/libtor.a src/common/libor.a \ + src/common/libor-crypto.a $(LIBDONNA) \ + src/common/libor-event.a src/trunnel/libor-trunnel.a \ +- @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \ +- @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ \ ++ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \ ++ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ \ + @TOR_SYSTEMD_LIBS@ + + src_test_test_workqueue_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \ +@@ -156,8 +156,8 @@ + src/common/libor-testing.a \ + src/common/libor-crypto-testing.a $(LIBDONNA) \ + src/common/libor-event-testing.a \ +- @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \ +- @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ ++ @TOR_LIB_MATH@ @TOR_LIBEVENT_LIBS@ \ ++ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ + + noinst_HEADERS+= \ + src/test/fakechans.h \ +@@ -174,8 +174,8 @@ + src_test_test_ntor_cl_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ + src_test_test_ntor_cl_LDADD = src/or/libtor.a src/common/libor.a \ + src/common/libor-crypto.a $(LIBDONNA) \ +- @TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \ +- @TOR_OPENSSL_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ ++ @TOR_LIB_MATH@ \ ++ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ + src_test_test_ntor_cl_AM_CPPFLAGS = \ + -I"$(top_srcdir)/src/or" + +diff -uNr tor-0.2.7.6.org/src/tools/include.am tor-0.2.7.6/src/tools/include.am +--- tor-0.2.7.6.org/src/tools/include.am 2015-11-13 14:33:26.000000000 +0100 ++++ tor-0.2.7.6/src/tools/include.am 2016-01-31 20:27:29.954004495 +0100 +@@ -21,7 +21,7 @@ + src_tools_tor_gencert_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ + src_tools_tor_gencert_LDADD = src/common/libor.a src/common/libor-crypto.a \ + $(LIBDONNA) \ +- @TOR_LIB_MATH@ @TOR_ZLIB_LIBS@ @TOR_OPENSSL_LIBS@ \ ++ @TOR_LIB_MATH@ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ \ + @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ + + if COVERAGE_ENABLED +@@ -32,7 +32,7 @@ + src_tools_tor_cov_gencert_LDADD = src/common/libor-testing.a \ + src/common/libor-crypto-testing.a \ + $(LIBDONNA) \ +- @TOR_LIB_MATH@ @TOR_ZLIB_LIBS@ @TOR_OPENSSL_LIBS@ \ ++ @TOR_LIB_MATH@ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ \ + @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ + endif + +@@ -40,7 +40,7 @@ + src_tools_tor_checkkey_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ + src_tools_tor_checkkey_LDADD = src/common/libor.a src/common/libor-crypto.a \ + $(LIBDONNA) \ +- @TOR_LIB_MATH@ @TOR_ZLIB_LIBS@ @TOR_OPENSSL_LIBS@ \ ++ @TOR_LIB_MATH@ @TOR_OPENSSL_LIBS@ @TOR_ZLIB_LIBS@ \ + @TOR_LIB_WS32@ @TOR_LIB_GDI@ @CURVE25519_LIBS@ + + EXTRA_DIST += src/tools/tor-fw-helper/README diff --git a/package/tor/Config.in b/package/tor/Config.in new file mode 100644 index 0000000000..52009267e2 --- /dev/null +++ b/package/tor/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_TOR + bool "tor" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_PACKAGE_LIBEVENT + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + Tor is free software and an open network that helps you + defend against traffic analysis, a form of network + surveillance that threatens personal freedom and privacy, + confidential business activities and relationships, and + state security. + + https://www.torproject.org + +comment "tor needs a toolchain w/ NPTL" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL diff --git a/package/tor/tor.hash b/package/tor/tor.hash new file mode 100644 index 0000000000..a836476f46 --- /dev/null +++ b/package/tor/tor.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 493a8679f904503048114aca6467faef56861206bab8283d858f37141d95105d tor-0.2.7.6.tar.gz diff --git a/package/tor/tor.mk b/package/tor/tor.mk new file mode 100644 index 0000000000..6a622cf0ef --- /dev/null +++ b/package/tor/tor.mk @@ -0,0 +1,39 @@ +################################################################################ +# +# tor +# +################################################################################ + +TOR_VERSION = 0.2.7.6 +TOR_SITE = https://dist.torproject.org +TOR_LICENSE = BSD-3c +TOR_LICENSE_FILES = LICENSE +TOR_DEPENDENCIES = libevent openssl zlib +TOR_AUTORECONF = YES + +TOR_CONF_OPTS = \ + --disable-gcc-hardening \ + --disable-unittests \ + --with-libevent-dir=$(STAGING_DIR)/usr \ + --with-openssl-dir=$(STAGING_DIR)/usr \ + --with-zlib-dir=$(STAGING_DIR)/usr + +ifeq ($(BR2_STATIC_LIBS),y) +TOR_CONF_OPTS += \ + --enable-static-libevent \ + --enable-static-openssl \ + --enable-static-tor \ + --enable-static-zlib +endif + +ifeq ($(BR2_arm)$(BR2_armeb)$(BR2_i386)$(BR2_x86_64)$(BR2_PACKAGE_LIBSECCOMP),yy) +TOR_CONF_OPTS += --enable-seccomp +TOR_DEPENDENCIES += libseccomp +else +TOR_CONF_OPTS += --disable-seccomp +endif + +# uses gnu extensions +TOR_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' + +$(eval $(autotools-package)) diff --git a/package/torsmo/Config.in b/package/torsmo/Config.in new file mode 100644 index 0000000000..5c18ac6f48 --- /dev/null +++ b/package/torsmo/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_TORSMO + bool "torsmo" + depends on BR2_DEPRECATED_SINCE_2015_11 + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + help + Torsmo is a system monitor that sits in the corner of your desktop. + + http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Torsmo diff --git a/package/torsmo/torsmo.hash b/package/torsmo/torsmo.hash new file mode 100644 index 0000000000..8bbf9dc87a --- /dev/null +++ b/package/torsmo/torsmo.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 6a6bc82e71c841ba9359f0ffe370e57ef7b04b49a448252bb0c1c28fc10e964c torsmo-0.18.tar.gz diff --git a/package/torsmo/torsmo.mk b/package/torsmo/torsmo.mk new file mode 100644 index 0000000000..96a797603f --- /dev/null +++ b/package/torsmo/torsmo.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# torsmo +# +################################################################################ + +TORSMO_VERSION = 0.18 +TORSMO_SITE = http://mirror.egtvedt.no/avr32linux.org/twiki/pub/Main/Torsmo +TORSMO_LICENSE = BSD-3c +TORSMO_LICENSE_FILES = COPYING + +# help2man doesn't work when cross compiling +TORSMO_CONF_ENV = ac_cv_path_HELP2MAN='' +TORSMO_CONF_OPTS = --x-includes="-I$(STAGING_DIR)/usr/include/X11" --x-libraries="-I$(STAGING_DIR)/usr/lib" --with-x + +TORSMO_DEPENDENCIES = xlib_libX11 xlib_libXext + +$(eval $(autotools-package)) diff --git a/package/tovid/0001-manpage.patch b/package/tovid/0001-manpage.patch new file mode 100644 index 0000000000..21669c9d55 --- /dev/null +++ b/package/tovid/0001-manpage.patch @@ -0,0 +1,25 @@ +setup.py: disable man page to kill txt2tags SVN checkout dependency + +Signed-off-by: Steve Kenton + ++diff -pruN tovid-3534.ori/setup.py tovid-3534/setup.py +--- tovid-3534.ori/setup.py 2013-04-14 09:52:08.000000000 -0500 ++++ tovid-3534/setup.py 2015-03-21 09:39:14.880173176 -0500 +@@ -186,7 +186,7 @@ class BuildTovidInit (Command): + + # Build tovid-init with regular 'build' command + build.sub_commands.append(('build_tovid_init', None)) +-build.sub_commands.append(('build_docs', None)) ++#build.sub_commands.append(('build_docs', None)) + + # The actual setup + setup( +@@ -244,8 +244,6 @@ setup( + 'src/tovid.ini', + ]), + # Manual page +- ('share/man/man1', +- ['docs/man/tovid.1']), + # Desktop shortcut + ('share/applications', + ['tovidgui.desktop', diff --git a/package/tovid/Config.in b/package/tovid/Config.in new file mode 100644 index 0000000000..1288f849e2 --- /dev/null +++ b/package/tovid/Config.in @@ -0,0 +1,40 @@ +config BR2_PACKAGE_TOVID + bool "tovid" + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + depends on BR2_PACKAGE_MPLAYER_ARCH_SUPPORTS + # The below dependencies are runtime dependencies only + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # procps_ng + select BR2_PACKAGE_DVDAUTHOR + select BR2_PACKAGE_DVDRW_TOOLS + select BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_IMAGEMAGICK + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_MJPEGTOOLS + select BR2_PACKAGE_MPLAYER + select BR2_PACKAGE_PROCPS_NG # pgrep and pkill + select BR2_PACKAGE_SOX + help + The tovid suite, also known simply as tovid, is a collection + of shell and Python scripts for creating DVDs and + (S)VCDs. It is pronounced "to vid" (because it converts to + video disc formats). + + http://tovid.wikia.com/wiki/Installing_tovid + +comment "tovid needs a toolchain w/ threads, C++, wchar" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + depends on BR2_PACKAGE_MPLAYER_ARCH_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS \ + || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_USE_WCHAR + +comment "tovid depends on python or python3" + depends on !BR2_PACKAGE_PYTHON && !BR2_PACKAGE_PYTHON3 + depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS + depends on BR2_PACKAGE_MPLAYER_ARCH_SUPPORTS diff --git a/package/tovid/tovid.hash b/package/tovid/tovid.hash new file mode 100644 index 0000000000..9ddd75037a --- /dev/null +++ b/package/tovid/tovid.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 06f7cb00b213bbe83d72f4f2076b675a662697034e1d2cdc2dce987e35c827bc tovid-0.35.0.tar.gz diff --git a/package/tovid/tovid.mk b/package/tovid/tovid.mk new file mode 100644 index 0000000000..3069d67e59 --- /dev/null +++ b/package/tovid/tovid.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# tovid +# +################################################################################ + +TOVID_VERSION = 0.35.0 +TOVID_SITE = https://github.com/tovid-suite/tovid/releases/download/v$(TOVID_VERSION) +TOVID_LICENSE = GPLv2+ +TOVID_LICENSE_FILES = COPYING +TOVID_SETUP_TYPE = distutils + +$(eval $(python-package)) diff --git a/package/tpm-tools/0001-tpm_nvread-include-sys-stat.h-for-open-modes.patch b/package/tpm-tools/0001-tpm_nvread-include-sys-stat.h-for-open-modes.patch new file mode 100644 index 0000000000..35fd7632bd --- /dev/null +++ b/package/tpm-tools/0001-tpm_nvread-include-sys-stat.h-for-open-modes.patch @@ -0,0 +1,33 @@ +From 5fedfd32a226e3ac8a6022227ec2d8fc6df26901 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 24 Dec 2015 08:57:09 +0100 +Subject: [PATCH] tpm_nvread: include for open() modes + +As the manual page of open(2) indicates, the header +should be included. Indeed, it is this header that provides the mode_t +macros such as S_IRUSR and S_IWUSR. + +While the build happens to work with glibc without this included +header, it fails with other C libraries such as uClibc, due to the +missing inclusion. + +Signed-off-by: Thomas Petazzoni +--- + src/tpm_mgmt/tpm_nvread.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/tpm_mgmt/tpm_nvread.c b/src/tpm_mgmt/tpm_nvread.c +index 35fe17c..92f047c 100644 +--- a/src/tpm_mgmt/tpm_nvread.c ++++ b/src/tpm_mgmt/tpm_nvread.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include "tpm_nvcommon.h" + #include "tpm_tspi.h" +-- +2.6.4 + diff --git a/package/tpm-tools/0002-Makefile.am-make-sure-libintl-is-in-LDFLAGS-when-nee.patch b/package/tpm-tools/0002-Makefile.am-make-sure-libintl-is-in-LDFLAGS-when-nee.patch new file mode 100644 index 0000000000..fac7b2cc9a --- /dev/null +++ b/package/tpm-tools/0002-Makefile.am-make-sure-libintl-is-in-LDFLAGS-when-nee.patch @@ -0,0 +1,104 @@ +Fetched from: http://sourceforge.net/p/trousers/mailman/message/34728585/ +Upstream status: Submitted + +From 924cbdfc67ca405aa4df2f9d3787365618b58630 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Wed, 30 Dec 2015 00:06:33 +0100 +Subject: [PATCH] Makefile.am: make sure libintl is in LDFLAGS when needed + +The build-system internally builds a couple of static libraries used to +build the final programs. + +When linking these libraries and the final programs, we need to +explicitly tell libtool to link with libintl in order to resolve all the +missing symbols. + +This is done in the appropriate LDADD/LIBADD variables (or the per-target +*_LDADD/*_LIBADD ones when they do not default to LDADD or LIBADD), for +any sources using gettext/libintl functionalities. + +This change fixes build failures [2,3] in cross-compilation, triggered by +Buildroot buildfarms [1]. + +[1] http://autobuild.buildroot.org/ +[2] http://autobuild.buildroot.org/?reason=tpm-tools-1.3.8 +[3] http://autobuild.buildroot.org/results/c82/c82a6c1f41c561b15f10e7b7ffcaed15fa0ec895/build-end.log + +Signed-off-by: Samuel Martin +--- + lib/Makefile.am | 6 +++--- + src/cmds/Makefile.am | 2 +- + src/data_mgmt/Makefile.am | 2 +- + src/tpm_mgmt/Makefile.am | 2 +- + 4 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/lib/Makefile.am b/lib/Makefile.am +index cef6a2f..c1d7009 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -44,7 +44,7 @@ libtpm_utils_la_SOURCES = tpm_utils.c \ + # + # TSPI interface library + libtpm_tspi_la_SOURCES = tpm_tspi.c +-libtpm_tspi_la_LIBADD = libtpm_utils.la -ldl ++libtpm_tspi_la_LIBADD = libtpm_utils.la -ldl @INTLLIBS@ + + # + # PKCS#11 interface library +@@ -52,7 +52,7 @@ if P11_SUPPORT + noinst_LTLIBRARIES += libtpm_pkcs11.la + + libtpm_pkcs11_la_SOURCES= tpm_pkcs11.c +-libtpm_pkcs11_la_LIBADD = libtpm_utils.la ++libtpm_pkcs11_la_LIBADD = libtpm_utils.la @INTLLIBS@ + endif + + # +@@ -80,4 +80,4 @@ endif + # Unseal library - for addition to existing apps, counter part of seal cmd + libtpm_unseal_la_SOURCES = tpm_unseal.c + libtpm_unseal_la_LDFLAGS = -shared -version-info 1:0:0 +-libtpm_unseal_la_LIBADD = -ltspi libtpm_tspi.la ++libtpm_unseal_la_LIBADD = -ltspi libtpm_tspi.la @INTLLIBS@ +diff --git a/src/cmds/Makefile.am b/src/cmds/Makefile.am +index de73ecf..27fc9ef 100644 +--- a/src/cmds/Makefile.am ++++ b/src/cmds/Makefile.am +@@ -30,7 +30,7 @@ else + AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX + endif + +-LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi $(top_builddir)/lib/libtpm_unseal.la -ltpm_unseal -lcrypto ++LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi $(top_builddir)/lib/libtpm_unseal.la -ltpm_unseal -lcrypto @INTLLIBS@ + + tpm_sealdata_SOURCES = tpm_sealdata.c + tpm_unsealdata_SOURCES = tpm_unsealdata.c +diff --git a/src/data_mgmt/Makefile.am b/src/data_mgmt/Makefile.am +index f8bf41c..de505e4 100644 +--- a/src/data_mgmt/Makefile.am ++++ b/src/data_mgmt/Makefile.am +@@ -38,7 +38,7 @@ noinst_HEADERS = data_common.h \ + # Common build flags + AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX + +-LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi -ldl ++LDADD = $(top_builddir)/lib/libtpm_pkcs11.la -ltspi -ldl @INTLLIBS@ + + + # +diff --git a/src/tpm_mgmt/Makefile.am b/src/tpm_mgmt/Makefile.am +index 195fba9..7ca47c9 100644 +--- a/src/tpm_mgmt/Makefile.am ++++ b/src/tpm_mgmt/Makefile.am +@@ -55,7 +55,7 @@ else + AM_CPPFLAGS = -I$(top_srcdir)/include -D_LINUX + endif + +-LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi ++LDADD = $(top_builddir)/lib/libtpm_tspi.la -ltspi @INTLLIBS@ + + tpm_startup_SOURCES = tpm_startup.c + tpm_reset_SOURCES = tpm_reset.c +-- +2.6.4 + diff --git a/package/tpm-tools/0002-configure.in-remove-Werror.patch b/package/tpm-tools/0002-configure.in-remove-Werror.patch new file mode 100644 index 0000000000..c101a9517f --- /dev/null +++ b/package/tpm-tools/0002-configure.in-remove-Werror.patch @@ -0,0 +1,27 @@ +From b060873f444d79f3f5aa388427cb1ede6665834a Mon Sep 17 00:00:00 2001 +From: Kent Yoder +Date: Mon, 5 Nov 2012 14:58:31 -0600 +Subject: [PATCH] configure.in: remove -Werror + +Signed-off-by: Kent Yoder +Signed-off-by: Noe Rubinstein +--- + configure.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index da170d0..0f175be 100644 +--- a/configure.in ++++ b/configure.in +@@ -138,7 +138,7 @@ AC_TYPE_SIZE_T + AC_TYPE_SIGNAL + AC_TYPE_UID_T + +-CFLAGS="$CFLAGS -Wall -Werror -Wreturn-type -Wsign-compare" ++CFLAGS="$CFLAGS -Wall -Wreturn-type -Wsign-compare" + + AC_CONFIG_FILES(./Makefile \ + po/Makefile.in \ +-- +2.1.4 + diff --git a/package/tpm-tools/Config.in b/package/tpm-tools/Config.in new file mode 100644 index 0000000000..dd59aaaf49 --- /dev/null +++ b/package/tpm-tools/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_TPM_TOOLS + bool "tpm-tools" + select BR2_PACKAGE_TROUSERS + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + depends on BR2_TOOLCHAIN_HAS_THREADS # trousers + depends on !BR2_STATIC_LIBS # trousers + help + Tools to manage and diagnose a TPM + + http://trousers.sourceforge.net/ + +comment "tpm-tools needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/tpm-tools/tpm-tools.hash b/package/tpm-tools/tpm-tools.hash new file mode 100644 index 0000000000..8c1ff899a9 --- /dev/null +++ b/package/tpm-tools/tpm-tools.hash @@ -0,0 +1,3 @@ +# http://sourceforge.net/projects/trousers/files/tpm-tools/1.3.8/ +sha1 f2c799ac8dc78f3537e1dbe4ae7c6e93f37e868c tpm-tools-1.3.8.tar.gz +md5 85a978c4e03fefd4b73cbeadde7c4d0b tpm-tools-1.3.8.tar.gz diff --git a/package/tpm-tools/tpm-tools.mk b/package/tpm-tools/tpm-tools.mk new file mode 100644 index 0000000000..72afc443d8 --- /dev/null +++ b/package/tpm-tools/tpm-tools.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# tpm-tools +# +################################################################################ + +TPM_TOOLS_VERSION = 1.3.8 +TPM_TOOLS_SOURCE = tpm-tools-$(TPM_TOOLS_VERSION).tar.gz +TPM_TOOLS_SITE = http://downloads.sourceforge.net/project/trousers/tpm-tools/$(TPM_TOOLS_VERSION) +TPM_TOOLS_STRIP_COMPONENTS = 2 +TPM_TOOLS_LICENSE = Common Public License Version 1.0 +TPM_TOOLS_LICENSE_FILES = LICENSE +TPM_TOOLS_DEPENDENCIES = trousers openssl \ + $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) +# configure.in and lib/Makefile.am is patched +TPM_TOOLS_AUTORECONF = YES +TPM_TOOLS_GETTEXTIZE = YES + +TPM_TOOLS_CONF_OPTS = --disable-pkcs11-support + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +TPM_TOOLS_CONF_ENV += LIBS='-liconv' +endif + +$(eval $(autotools-package)) diff --git a/package/trace-cmd/Config.in b/package/trace-cmd/Config.in new file mode 100644 index 0000000000..fcec1027e8 --- /dev/null +++ b/package/trace-cmd/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_TRACE_CMD + bool "trace-cmd" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # dlopen() + help + Command line reader for ftrace. + + To use this profiling tool, you should enable ftrace in your kernel + configuration. This command collect traces on your target. + You can analyse these traces on the target or on the host via the gui + "kernel shark" + + http://git.kernel.org/cgit/linux/kernel/git/rostedt/trace-cmd.git + +comment "trace-cmd needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/trace-cmd/trace-cmd.mk b/package/trace-cmd/trace-cmd.mk new file mode 100644 index 0000000000..2348155cb8 --- /dev/null +++ b/package/trace-cmd/trace-cmd.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# trace-cmd +# +################################################################################ + +TRACE_CMD_VERSION = trace-cmd-v2.6 +TRACE_CMD_SITE = $(BR2_KERNEL_MIRROR)/scm/linux/kernel/git/rostedt/trace-cmd.git +TRACE_CMD_SITE_METHOD = git +TRACE_CMD_INSTALL_STAGING = YES +TRACE_CMD_LICENSE = GPLv2, LGPLv2.1 +TRACE_CMD_LICENSE_FILES = COPYING COPYING.LIB + +TRACE_CMD_DEPENDENCIES = host-pkgconf + +ifeq ($(BR2_PACKAGE_AUDIT),y) +TRACE_CMD_DEPENDENCIES += audit +endif + +ifeq ($(BR2_PACKAGE_PYTHON),y) +TRACE_CMD_DEPENDENCIES += python host-swig +TRACE_CMD_MAKE_OPTS = PYTHON_VERS=python +else ifeq ($(BR2_PACKAGE_PYTHON3),y) +TRACE_CMD_DEPENDENCIES += python3 host-swig +TRACE_CMD_MAKE_OPTS = PYTHON_VERS=python3 +else +TRACE_CMD_MAKE_OPTS += NO_PYTHON=1 +endif + +# trace-cmd already defines _LARGEFILE64_SOURCE when necessary, +# redefining it on the command line causes build problems. +TRACE_CMD_CFLAGS = $(filter-out -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS)) + +# trace-cmd use CPPFLAGS to add some extra flags. +# But like for CFLAGS, $(TARGET_CPPFLAGS) contains _LARGEFILE64_SOURCE +# that causes build problems. +TRACE_CMD_CPPFLAGS = $(filter-out -D_LARGEFILE64_SOURCE,$(TARGET_CPPFLAGS)) + +define TRACE_CMD_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TRACE_CMD_CFLAGS)" \ + CPPFLAGS="$(TRACE_CMD_CPPFLAGS)" \ + $(TRACE_CMD_MAKE_OPTS) \ + -C $(@D) all +endef + +define TRACE_CMD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/trace-cmd $(TARGET_DIR)/usr/bin/trace-cmd + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/lib/trace-cmd/plugins + $(INSTALL) -D -m 0755 $(@D)/plugin_*.so $(TARGET_DIR)/usr/lib/trace-cmd/plugins +endef + +$(eval $(generic-package)) diff --git a/package/transmission/0001-fix-utypes.patch b/package/transmission/0001-fix-utypes.patch new file mode 100644 index 0000000000..96403a6c36 --- /dev/null +++ b/package/transmission/0001-fix-utypes.patch @@ -0,0 +1,30 @@ +Fix build error "conflicting types for 'UTP_Write'" + +Fetch from: http://www.adminsehow.com/2012/10/how-to-install-transmission-2-71-on-debian-6-0-squeeze/ + +The corresponding upstream bug report (unfixed) can be found here: +https://trac.transmissionbt.com/ticket/5232 + +Signed-off-by: Bernd Kuhls + +--- transmission-2.82.org/third-party/libutp/utypes.h 2013-08-09 04:47:43.000000000 +0200 ++++ transmission-2.82/third-party/libutp/utypes.h 2014-01-02 20:17:18.000000000 +0100 +@@ -35,8 +35,15 @@ + typedef const char * cstr; + typedef char * str; + +-#ifndef __cplusplus +-typedef uint8 bool; +-#endif ++//#ifndef __cplusplus ++//typedef uint8 bool; ++//#endif ++#ifndef __cplusplus ++#ifdef HAVE_STDBOOL_H ++#include ++#else ++typedef uint8 bool; ++#endif ++#endif + + #endif //__UTYPES_H__ diff --git a/package/transmission/0002-musl-missing-header.patch b/package/transmission/0002-musl-missing-header.patch new file mode 100644 index 0000000000..ebb74cbffb --- /dev/null +++ b/package/transmission/0002-musl-missing-header.patch @@ -0,0 +1,36 @@ +Fix musl build + +Downloaded from +https://cgit.gentoo.org/proj/musl.git/tree/net-p2p/transmission/files/transmission-2.84-musl-missing-header.patch + +Signed-off-by: Bernd Kuhls + + +libtransmission/transmission.h: add missing + +transmission.h and several files including it, like bitfield.c and fdlimits.h +make reference to ssize_t, off_t and other types defined in but +never include the header. By including in transmission.h, the +required type definitions are propagated to all files that need them. + +Not including on glibc and uClibc systems does not pose a problem +because of the way the headers stack in those C Standard Libraries, but on musl +excluding leads to compile time failure. + +For the POSIX specs, see + +http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html + +Signed-of-by: Anthony G. Basile + +diff -Naur transmission-2.84.orig/libtransmission/transmission.h transmission-2.84/libtransmission/transmission.h +--- transmission-2.84.orig/libtransmission/transmission.h 2014-07-01 13:09:01.682910744 -0400 ++++ transmission-2.84/libtransmission/transmission.h 2015-07-19 03:11:07.379219181 -0400 +@@ -28,6 +28,7 @@ + + #include /* uintN_t */ + #include /* time_t */ ++#include + + #ifdef WIN32 + #define __USE_MINGW_ANSI_STDIO 1 diff --git a/package/transmission/Config.in b/package/transmission/Config.in new file mode 100644 index 0000000000..b47c36fdd3 --- /dev/null +++ b/package/transmission/Config.in @@ -0,0 +1,52 @@ +config BR2_PACKAGE_TRANSMISSION + bool "transmission" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_ZLIB + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBEVENT + help + Transmission is a cross-platform BitTorrent client. + + http://www.transmissionbt.com/ + +if BR2_PACKAGE_TRANSMISSION + +config BR2_PACKAGE_TRANSMISSION_UTP + bool "Transmission uTP support" + depends on BR2_INSTALL_LIBSTDCPP + help + Install support for uTorrent Transport Protocol + +comment "uTP needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_TRANSMISSION_CLI + bool "transmission-cli" + help + Install transmission command line interface. + +config BR2_PACKAGE_TRANSMISSION_DAEMON + bool "transmission-daemon" + help + Install transmission daemon. + +config BR2_PACKAGE_TRANSMISSION_REMOTE + bool "transmission-remote" + help + Install transmission remote management tool. + +config BR2_PACKAGE_TRANSMISSION_GTK + bool "transmission-gtk" + depends on BR2_PACKAGE_LIBGTK2 && BR2_ENABLE_LOCALE + help + Install transmission GTK-based GUI interface. + +comment "transmission-gtk needs a toolchain w/ locale" + depends on BR2_PACKAGE_LIBGTK2 && !BR2_ENABLE_LOCALE +endif + +comment "transmission needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/transmission/S92transmission b/package/transmission/S92transmission new file mode 100644 index 0000000000..e5976b0cfb --- /dev/null +++ b/package/transmission/S92transmission @@ -0,0 +1,159 @@ +#!/bin/sh + +# Original Author: Lennart A. Jtte, based on Rob Howell's script +# Modified by Maarten Van Coile & others (on IRC) + +# Changes for buildroot: +# USERNAME points to 'default' in standard installation +# TODO: set logfile with --logfile option + +# Do NOT "set -e" + +# +# ----- CONFIGURATION ----- +# +# For the default location Transmission uses, visit: +# http://trac.transmissionbt.com/wiki/ConfigFiles +# For a guide on how set the preferences, visit: +# http://trac.transmissionbt.com/wiki/EditConfigFiles +# For the available environement variables, visit: +# http://trac.transmissionbt.com/wiki/EnvironmentVariables +# +# The name of the user that should run Transmission. +# It's RECOMENDED to run Transmission in it's own user, +# by default, this is set to 'transmission'. +# For the sake of security you shouldn't set a password +# on this user +USERNAME=transmission + + +# ----- *ADVANCED* CONFIGURATION ----- +# Only change these options if you know what you are doing! +# +# The folder where Transmission stores the config & web files. +# ONLY change this you have it at a non-default location +#TRANSMISSION_HOME="/var/config/transmission-daemon" +#TRANSMISSION_WEB_HOME="/usr/share/transmission/web" +# +# The arguments passed on to transmission-daemon. +# ONLY change this you need to, otherwise use the +# settings file as per above. +#TRANSMISSION_ARGS="" + + +# ----- END OF CONFIGURATION ----- +# +# PATH should only include /usr/* if it runs after the mountnfs.sh script. +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin +DESC="bittorrent client" +NAME=transmission-daemon +DAEMON=$(which $NAME) +PIDFILE=/var/run/$NAME.pid +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Load the VERBOSE setting and other rcS variables +[ -f /etc/default/rcS ] && . /etc/default/rcS + +# +# Function that starts the daemon/service +# + +start() +{ + # Export the configuration/web directory, if set + if [ -n "$TRANSMISSION_HOME" ]; then + export TRANSMISSION_HOME + fi + if [ -n "$TRANSMISSION_WEB_HOME" ]; then + export TRANSMISSION_WEB_HOME + fi + + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --make-pidfile \ + --exec $DAEMON --background --test -- -f $TRANSMISSION_ARGS > /dev/null \ + || return 1 + start-stop-daemon --chuid $USERNAME --start --pidfile $PIDFILE --make-pidfile \ + --exec $DAEMON --background -- -f $TRANSMISSION_ARGS \ + || return 2 +} + +# +# Function that stops the daemon/service +# +stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/10/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + + return "$RETVAL" +} + +case "$1" in + start) + echo "Starting $DESC" "$NAME..." + start + case "$?" in + 0|1) echo " Starting $DESC $NAME succeeded" ;; + *) echo " Starting $DESC $NAME failed" ;; + esac + ;; + stop) + echo "Stopping $DESC $NAME..." + stop + case "$?" in + 0|1) echo " Stopping $DESC $NAME succeeded" ;; + *) echo " Stopping $DESC $NAME failed" ;; + esac + ;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + echo "Restarting $DESC $NAME..." + stop + case "$?" in + 0|1) + start + case "$?" in + 0|1) echo " Restarting $DESC $NAME succeeded" ;; + *) echo " Restarting $DESC $NAME failed: couldn't start $NAME" ;; + esac + ;; + *) + echo " Restarting $DESC $NAME failed: couldn't stop $NAME" ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 + exit 3 + ;; +esac diff --git a/package/transmission/transmission.hash b/package/transmission/transmission.hash new file mode 100644 index 0000000000..849a722d2b --- /dev/null +++ b/package/transmission/transmission.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3a8d045c306ad9acb7bf81126939b9594553a388482efa0ec1bfb67b22acd35f transmission-2.92.tar.xz diff --git a/package/transmission/transmission.mk b/package/transmission/transmission.mk new file mode 100644 index 0000000000..c8d377327d --- /dev/null +++ b/package/transmission/transmission.mk @@ -0,0 +1,80 @@ +################################################################################ +# +# transmission +# +################################################################################ + +TRANSMISSION_VERSION = 2.92 +TRANSMISSION_SITE = http://download.transmissionbt.com/files +TRANSMISSION_SOURCE = transmission-$(TRANSMISSION_VERSION).tar.xz +TRANSMISSION_DEPENDENCIES = \ + host-pkgconf \ + host-intltool \ + libcurl \ + libevent \ + openssl \ + zlib +TRANSMISSION_AUTORECONF = YES +TRANSMISSION_CONF_OPTS = \ + --disable-libnotify \ + --enable-lightweight +TRANSMISSION_LICENSE = GPLv2 or GPLv3 with OpenSSL exception +TRANSMISSION_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_TRANSMISSION_UTP),y) +TRANSMISSION_CONF_OPTS += --enable-utp +else +TRANSMISSION_CONF_OPTS += --disable-utp +endif + +ifeq ($(BR2_PACKAGE_TRANSMISSION_CLI),y) +TRANSMISSION_CONF_OPTS += --enable-cli +else +TRANSMISSION_CONF_OPTS += --disable-cli +endif + +ifeq ($(BR2_PACKAGE_TRANSMISSION_DAEMON),y) +TRANSMISSION_CONF_OPTS += --enable-daemon + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +TRANSMISSION_DEPENDENCIES += systemd +TRANSMISSION_CONF_OPTS += --with-systemd-daemon +else +TRANSMISSION_CONF_OPTS += --without-systemd-daemon +endif + +define TRANSMISSION_USERS + transmission -1 transmission -1 * /var/lib/transmission - transmission Transmission Daemon +endef + +define TRANSMISSION_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/transmission/S92transmission \ + $(TARGET_DIR)/etc/init.d/S92transmission +endef + +define TRANSMISSION_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 0755 $(@D)/daemon/transmission-daemon.service \ + $(TARGET_DIR)/usr/lib/systemd/system/transmission-daemon.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -fs ../../../../usr/lib/systemd/system/transmission-daemon.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/transmission-daemon.service +endef + +else +TRANSMISSION_CONF_OPTS += --disable-daemon +endif + +ifeq ($(BR2_PACKAGE_TRANSMISSION_REMOTE),y) +TRANSMISSION_CONF_OPTS += --enable-remote +else +TRANSMISSION_CONF_OPTS += --disable-remote +endif + +ifeq ($(BR2_PACKAGE_TRANSMISSION_GTK),y) +TRANSMISSION_CONF_OPTS += --enable-gtk +TRANSMISSION_DEPENDENCIES += libgtk2 +else +TRANSMISSION_CONF_OPTS += --disable-gtk +endif + +$(eval $(autotools-package)) diff --git a/package/tree/Config.in b/package/tree/Config.in new file mode 100644 index 0000000000..234995f109 --- /dev/null +++ b/package/tree/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_TREE + bool "tree" + depends on BR2_USE_WCHAR + help + Tree is a recursive directory listing command that produces + a depth indented listing of files, which is colorized ala + dircolors if the LS_COLORS environment variable is set and + output is to tty. + + http://mama.indstate.edu/users/ice/tree/ + +comment "tree needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/tree/tree.hash b/package/tree/tree.hash new file mode 100644 index 0000000000..ab79df8e28 --- /dev/null +++ b/package/tree/tree.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 6957c20e82561ac4231638996e74f4cfa4e6faabc5a2f511f0b4e3940e8f7b12 tree-1.7.0.tgz diff --git a/package/tree/tree.mk b/package/tree/tree.mk new file mode 100644 index 0000000000..b8988bd4c1 --- /dev/null +++ b/package/tree/tree.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tree +# +################################################################################ + +TREE_VERSION = 1.7.0 +TREE_SOURCE = tree-$(TREE_VERSION).tgz +TREE_SITE = http://mama.indstate.edu/users/ice/tree/src +TREE_LICENSE = GPLv2+ +TREE_LICENSE_FILES = LICENSE + +define TREE_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define TREE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/tree $(TARGET_DIR)/usr/bin/tree +endef + +$(eval $(generic-package)) diff --git a/package/tremor/Config.in b/package/tremor/Config.in new file mode 100644 index 0000000000..1a478c47a0 --- /dev/null +++ b/package/tremor/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_TREMOR + bool "tremor (fixed point vorbis decoder)" + select BR2_PACKAGE_LIBOGG + help + Tremor is a fixed point implementation of an Ogg Vorbis + decoder. It provides a decoding API similar to libvorbis, + but gives much better performance on systems without a + floating-point unit. diff --git a/package/tremor/tremor.mk b/package/tremor/tremor.mk new file mode 100644 index 0000000000..97b0ce36e4 --- /dev/null +++ b/package/tremor/tremor.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# tremor +# +################################################################################ + +TREMOR_SITE = http://svn.xiph.org/trunk/Tremor +TREMOR_SITE_METHOD = svn +TREMOR_VERSION = 19427 +TREMOR_LICENSE = BSD-3c +TREMOR_LICENSE_FILES = COPYING + +TREMOR_AUTORECONF = YES +TREMOR_INSTALL_STAGING = YES +TREMOR_DEPENDENCIES = libogg + +# tremor has ARM assembly code that cannot be compiled in Thumb2 mode, +# so we must force the traditional ARM mode. +ifeq ($(BR2_arm),y) +TREMOR_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) -marm" +endif + +$(eval $(autotools-package)) diff --git a/package/triggerhappy/Config.in b/package/triggerhappy/Config.in new file mode 100644 index 0000000000..a7864b3717 --- /dev/null +++ b/package/triggerhappy/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_TRIGGERHAPPY + bool "triggerhappy" + depends on BR2_USE_MMU # fork() + help + Triggerhappy is a hotkey daemon developed with small and + embedded systems in mind, e.g. linux based routers. It + attaches to the input device files and interprets the event + data received and executes scripts configured in its + configuration. + + https://github.com/wertarbyte/triggerhappy diff --git a/package/triggerhappy/S10triggerhappy b/package/triggerhappy/S10triggerhappy new file mode 100755 index 0000000000..3253e910b1 --- /dev/null +++ b/package/triggerhappy/S10triggerhappy @@ -0,0 +1,40 @@ +#!/bin/sh + +NAME=thd +DAEMON=/usr/sbin/$NAME +PIDFILE=/var/run/$NAME.pid +DAEMON_ARGS="--daemon --triggers /etc/triggerhappy/triggers.d --socket /var/run/thd.socket --pidfile $PIDFILE --user nobody /dev/input/event*" + +# Sanity checks +test -x $DAEMON || exit 0 + +[ -r /etc/default/triggerhappy ] && . /etc/default/triggerhappy + +start() { + printf "Starting $NAME: " + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS \ + && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping $NAME: " + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + && echo "OK" || echo "FAIL" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + sleep 1 + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/triggerhappy/triggerhappy.hash b/package/triggerhappy/triggerhappy.hash new file mode 100644 index 0000000000..17eefdb248 --- /dev/null +++ b/package/triggerhappy/triggerhappy.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 6b01497377e522c368818c5f6c726362f42530e3dc24a01c6d77b1b4d6068308 triggerhappy-7e5abc69f215678e93a6b999524981c8b40bdcd9.tar.gz diff --git a/package/triggerhappy/triggerhappy.mk b/package/triggerhappy/triggerhappy.mk new file mode 100644 index 0000000000..5a29ca7773 --- /dev/null +++ b/package/triggerhappy/triggerhappy.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# triggerhappy +# +################################################################################ + +TRIGGERHAPPY_VERSION = 7e5abc69f215678e93a6b999524981c8b40bdcd9 +TRIGGERHAPPY_SITE = $(call github,wertarbyte,triggerhappy,$(TRIGGERHAPPY_VERSION)) +TRIGGERHAPPY_LICENSE = GPLv3+ +TRIGGERHAPPY_LICENSE_FILES = COPYING + +define TRIGGERHAPPY_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) thd th-cmd +endef + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +define TRIGGERHAPPY_INSTALL_UDEV_RULE + $(INSTALL) -D -m 0644 $(@D)/udev/triggerhappy-udev.rules \ + $(TARGET_DIR)/lib/udev/rules.d/triggerhappy.rules +endef +endif + +define TRIGGERHAPPY_INSTALL_TARGET_CMDS + $(INSTALL) -d $(TARGET_DIR)/etc/triggerhappy/triggers.d + $(INSTALL) -D -m 0755 $(@D)/thd $(TARGET_DIR)/usr/sbin/thd + $(INSTALL) -D -m 0755 $(@D)/th-cmd $(TARGET_DIR)/usr/sbin/th-cmd + $(TRIGGERHAPPY_INSTALL_UDEV_RULE) +endef + +define TRIGGERHAPPY_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/triggerhappy/S10triggerhappy \ + $(TARGET_DIR)/etc/init.d/S10triggerhappy +endef + +define TRIGGERHAPPY_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 package/triggerhappy/triggerhappy.service \ + $(TARGET_DIR)/usr/lib/systemd/system/triggerhappy.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/triggerhappy.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/triggerhappy.service +endef + +$(eval $(generic-package)) diff --git a/package/triggerhappy/triggerhappy.service b/package/triggerhappy/triggerhappy.service new file mode 100644 index 0000000000..8449c1c935 --- /dev/null +++ b/package/triggerhappy/triggerhappy.service @@ -0,0 +1,9 @@ +[Unit] +Description=Triggerhappy daemon + +[Service] +ExecStart=/usr/sbin/thd --triggers /etc/triggerhappy/triggers.d --socket /var/run/thd.socket --user nobody /dev/input/event* +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/package/trinity/0001-mips-fix-prctl-s.patch b/package/trinity/0001-mips-fix-prctl-s.patch new file mode 100644 index 0000000000..aacd8d5bf6 --- /dev/null +++ b/package/trinity/0001-mips-fix-prctl-s.patch @@ -0,0 +1,39 @@ +From d61dd102b95b9791e45d6bbf1e34814b8c6c1731 Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Mon, 14 Dec 2015 14:46:37 +0000 +Subject: [PATCH] mips: fix prctl's + +It looks like a typo in the syscalls/prctl.c file. It's lacking the PR_ +preffix, and due to that is causing build failures like this one: + + CC syscalls/prctl.o +syscalls/prctl.c:37:2: error: 'GET_FP_MODE' undeclared here (not in a +function) + GET_FP_MODE, SET_FP_MODE, + ^ +syscalls/prctl.c:37:15: error: 'SET_FP_MODE' undeclared here (not +in a function) + GET_FP_MODE, SET_FP_MODE, + ^ + +Signed-off-by: Vicente Olivert Riera +--- + syscalls/prctl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/syscalls/prctl.c b/syscalls/prctl.c +index 523f03e..5a64fb3 100644 +--- a/syscalls/prctl.c ++++ b/syscalls/prctl.c +@@ -34,7 +34,7 @@ static int prctl_opts[] = { + PR_GET_NO_NEW_PRIVS, PR_GET_TID_ADDRESS, PR_SET_THP_DISABLE, PR_GET_THP_DISABLE, + PR_MPX_ENABLE_MANAGEMENT, PR_MPX_DISABLE_MANAGEMENT, + #ifdef __mips__ +- GET_FP_MODE, SET_FP_MODE, ++ PR_GET_FP_MODE, PR_SET_FP_MODE, + #endif + PR_CAP_AMBIENT, + }; +-- +2.4.10 + diff --git a/package/trinity/Config.in b/package/trinity/Config.in new file mode 100644 index 0000000000..5c4c7c801d --- /dev/null +++ b/package/trinity/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_TRINITY + bool "trinity" + depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \ + BR2_mips || BR2_mipsel || BR2_powerpc || BR2_powerpc64 || \ + BR2_powerpc64le || BR2_sparc || BR2_x86_64 + help + A Linux System call fuzz tester + + http://codemonkey.org.uk/projects/trinity/ diff --git a/package/trinity/trinity.hash b/package/trinity/trinity.hash new file mode 100644 index 0000000000..e290a40920 --- /dev/null +++ b/package/trinity/trinity.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3ef7ae05dba14f8bb626121983a08bb09d1d51a19de38bd9a8e0f29b11d9e3c9 trinity-v1.6.tar.gz diff --git a/package/trinity/trinity.mk b/package/trinity/trinity.mk new file mode 100644 index 0000000000..7596e92ba8 --- /dev/null +++ b/package/trinity/trinity.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# trinity +# +################################################################################ + +TRINITY_VERSION = v1.6 +TRINITY_SITE = $(call github,kernelslacker,trinity,$(TRINITY_VERSION)) +TRINITY_LICENSE = GPLv2 +TRINITY_LICENSE_FILES = COPYING + +define TRINITY_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) ./configure.sh) +endef + +define TRINITY_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +define TRINITY_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR)/usr install +endef + +# Install helper scripts +define TRINITY_INSTALL_HELPER_SCRIPTS + mkdir -p $(TARGET_DIR)/usr/libexec/trinity + cp -p $(@D)/scripts/* $(TARGET_DIR)/usr/libexec/trinity/ +endef +TRINITY_POST_INSTALL_TARGET_HOOKS += TRINITY_INSTALL_HELPER_SCRIPTS + +$(eval $(generic-package)) diff --git a/package/trousers/0001-Remove-inline-for-read_data-and-write_data.patch b/package/trousers/0001-Remove-inline-for-read_data-and-write_data.patch new file mode 100644 index 0000000000..b0db70b49b --- /dev/null +++ b/package/trousers/0001-Remove-inline-for-read_data-and-write_data.patch @@ -0,0 +1,94 @@ +From f03c7987c234a81f7e4274b26bab07318357a2a5 Mon Sep 17 00:00:00 2001 +From: Sergio Prado +Date: Fri, 25 Dec 2015 20:09:21 -0200 +Subject: [PATCH] Remove inline for read_data and write_data + +read_data and write_data functions are declared with inline, but +their definition is not in a .h file. This is causing errors when +linking: + +tcsps.c:(.text+0x4ac): undefined reference to `read_data' +tcsps.c:(.text+0x1888): undefined reference to `write_data' +... + +Partial backport of upstream commit +3297fcdf5ac0df868778e976b8b59e35542c1ee2. + +Signed-off-by: Sergio Prado +--- + src/include/tcsps.h | 5 ----- + src/tcs/ps/ps_utils.c | 8 -------- + src/tspi/ps/ps_utils.c | 4 ++-- + 3 files changed, 2 insertions(+), 15 deletions(-) + +diff --git a/src/include/tcsps.h b/src/include/tcsps.h +index 87542965877d..dcd5db469822 100644 +--- a/src/include/tcsps.h ++++ b/src/include/tcsps.h +@@ -23,13 +23,8 @@ int get_file(); + int put_file(int); + void close_file(int); + void ps_destroy(); +-#ifdef SOLARIS + TSS_RESULT read_data(int, void *, UINT32); + TSS_RESULT write_data(int, void *, UINT32); +-#else +-inline TSS_RESULT read_data(int, void *, UINT32); +-inline TSS_RESULT write_data(int, void *, UINT32); +-#endif + int write_key_init(int, UINT32, UINT32, UINT32); + TSS_RESULT cache_key(UINT32, UINT16, TSS_UUID *, TSS_UUID *, UINT16, UINT32, UINT32); + TSS_RESULT UnloadBlob_KEY_PS(UINT16 *, BYTE *, TSS_KEY *); +diff --git a/src/tcs/ps/ps_utils.c b/src/tcs/ps/ps_utils.c +index 2e7f502b9599..35ac89f8fc12 100644 +--- a/src/tcs/ps/ps_utils.c ++++ b/src/tcs/ps/ps_utils.c +@@ -42,11 +42,7 @@ + struct key_disk_cache *key_disk_cache_head = NULL; + + +-#ifdef SOLARIS + TSS_RESULT +-#else +-inline TSS_RESULT +-#endif + read_data(int fd, void *data, UINT32 size) + { + int rc; +@@ -64,11 +60,7 @@ read_data(int fd, void *data, UINT32 size) + } + + +-#ifdef SOLARIS + TSS_RESULT +-#else +-inline TSS_RESULT +-#endif + write_data(int fd, void *data, UINT32 size) + { + int rc; +diff --git a/src/tspi/ps/ps_utils.c b/src/tspi/ps/ps_utils.c +index aac40a147314..83259141d375 100644 +--- a/src/tspi/ps/ps_utils.c ++++ b/src/tspi/ps/ps_utils.c +@@ -22,7 +22,7 @@ + #include "tspps.h" + #include "tsplog.h" + +-inline TSS_RESULT ++TSS_RESULT + read_data(int fd, void *data, UINT32 size) + { + int rc; +@@ -39,7 +39,7 @@ read_data(int fd, void *data, UINT32 size) + return TSS_SUCCESS; + } + +-inline TSS_RESULT ++TSS_RESULT + write_data(int fd, void *data, UINT32 size) + { + int rc; +-- +1.9.1 + diff --git a/package/trousers/0002-Check-if-the-compiler-understands-pie-and-relro-options.patch b/package/trousers/0002-Check-if-the-compiler-understands-pie-and-relro-options.patch new file mode 100644 index 0000000000..3275b76a2c --- /dev/null +++ b/package/trousers/0002-Check-if-the-compiler-understands-pie-and-relro-options.patch @@ -0,0 +1,215 @@ +From 9abda1bb380bdbef1affaec381742ced394ca118 Mon Sep 17 00:00:00 2001 +From: Lada Trimasova +Date: Mon, 18 Jan 2016 15:58:19 +0300 +Subject: [PATCH] Check if the compiler understands pie and relro options + +-pie and -fpie enable the building of position-independent +executables, and -Wl,-z,relro turns on read-only relocation support in gcc. +Add checks to ensure that the compiler and linker understand these options. + +Signed-off-by: Lada Trimasova +--- + configure.in | 5 +++ + m4/ax_check_compile_flag.m4 | 72 ++++++++++++++++++++++++++++++++++++ + m4/ax_check_link_flag.m4 | 71 +++++++++++++++++++++++++++++++++++ + src/tcsd/Makefile.am | 4 +- + 4 files changed, 150 insertions(+), 2 deletions(-) + create mode 100644 m4/ax_check_compile_flag.m4 + create mode 100644 m4/ax_check_link_flag.m4 + +diff --git a/configure.in b/configure.in +index add23dc..9603353 100644 +--- a/configure.in ++++ b/configure.in +@@ -12,6 +12,7 @@ TSS_VER_MINOR=3 + # compute $target + AC_CANONICAL_TARGET + AM_INIT_AUTOMAKE([foreign 1.6]) ++AC_CONFIG_MACRO_DIR([m4]) + + # Debugging support + AC_ARG_ENABLE([debug], +@@ -383,6 +384,10 @@ elif test x"${prefix}" = x"NONE"; then + localstatedir="/usr/local/var" + fi + ++AX_CHECK_COMPILE_FLAG([-fPIE -DPIE], [PIE_CFLAGS="-fPIE -DPIE"]) ++AX_CHECK_LINK_FLAG([-pie], [PIE_LDFLAGS="$PIE_LDFLAGS -pie"]) ++AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="$LDFLAGS -Wl,-z,relro"]) ++ + AC_OUTPUT(dist/tcsd.conf \ + dist/fedora/trousers.spec \ + dist/trousers.spec \ +diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 +new file mode 100644 +index 0000000..c3a8d69 +--- /dev/null ++++ b/m4/ax_check_compile_flag.m4 +@@ -0,0 +1,72 @@ ++# =========================================================================== ++# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) ++# ++# DESCRIPTION ++# ++# Check whether the given FLAG works with the current language's compiler ++# or gives an error. (Warnings, however, are ignored) ++# ++# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on ++# success/failure. ++# ++# If EXTRA-FLAGS is defined, it is added to the current language's default ++# flags (e.g. CFLAGS) when the check is done. The check is thus made with ++# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to ++# force the compiler to issue an error when a bad flag is given. ++# ++# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this ++# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. ++# ++# LICENSE ++# ++# Copyright (c) 2008 Guido U. Draheim ++# Copyright (c) 2011 Maarten Bosmans ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see . ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 2 ++ ++AC_DEFUN([AX_CHECK_COMPILE_FLAG], ++[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX ++AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl ++AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ++ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS ++ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], ++ [AS_VAR_SET(CACHEVAR,[yes])], ++ [AS_VAR_SET(CACHEVAR,[no])]) ++ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) ++AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], ++ [m4_default([$2], :)], ++ [m4_default([$3], :)]) ++AS_VAR_POPDEF([CACHEVAR])dnl ++])dnl AX_CHECK_COMPILE_FLAGS +diff --git a/m4/ax_check_link_flag.m4 b/m4/ax_check_link_flag.m4 +new file mode 100644 +index 0000000..e2d0d36 +--- /dev/null ++++ b/m4/ax_check_link_flag.m4 +@@ -0,0 +1,71 @@ ++# =========================================================================== ++# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_CHECK_LINK_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) ++# ++# DESCRIPTION ++# ++# Check whether the given FLAG works with the linker or gives an error. ++# (Warnings, however, are ignored) ++# ++# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on ++# success/failure. ++# ++# If EXTRA-FLAGS is defined, it is added to the linker's default flags ++# when the check is done. The check is thus made with the flags: "LDFLAGS ++# EXTRA-FLAGS FLAG". This can for example be used to force the linker to ++# issue an error when a bad flag is given. ++# ++# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this ++# macro in sync with AX_CHECK_{PREPROC,COMPILE}_FLAG. ++# ++# LICENSE ++# ++# Copyright (c) 2008 Guido U. Draheim ++# Copyright (c) 2011 Maarten Bosmans ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see . ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 2 ++ ++AC_DEFUN([AX_CHECK_LINK_FLAG], ++[AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_ldflags_$4_$1])dnl ++AC_CACHE_CHECK([whether the linker accepts $1], CACHEVAR, [ ++ ax_check_save_flags=$LDFLAGS ++ LDFLAGS="$LDFLAGS $4 $1" ++ AC_LINK_IFELSE([AC_LANG_PROGRAM()], ++ [AS_VAR_SET(CACHEVAR,[yes])], ++ [AS_VAR_SET(CACHEVAR,[no])]) ++ LDFLAGS=$ax_check_save_flags]) ++AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], ++ [m4_default([$2], :)], ++ [m4_default([$3], :)]) ++AS_VAR_POPDEF([CACHEVAR])dnl ++])dnl AX_CHECK_LINK_FLAGS +diff --git a/src/tcsd/Makefile.am b/src/tcsd/Makefile.am +index 2210734..6640ab2 100644 +--- a/src/tcsd/Makefile.am ++++ b/src/tcsd/Makefile.am +@@ -1,8 +1,8 @@ + sbin_PROGRAMS=tcsd + +-tcsd_CFLAGS=-DAPPID=\"TCSD\" -DVAR_PREFIX=\"@localstatedir@\" -DETC_PREFIX=\"@sysconfdir@\" -I${top_srcdir}/src/include -fPIE -DPIE ++tcsd_CFLAGS=-DAPPID=\"TCSD\" -DVAR_PREFIX=\"@localstatedir@\" -DETC_PREFIX=\"@sysconfdir@\" -I${top_srcdir}/src/include $(PIE_CFLAGS) + tcsd_LDADD=${top_builddir}/src/tcs/libtcs.a ${top_builddir}/src/tddl/libtddl.a -lpthread @CRYPTOLIB@ +-tcsd_LDFLAGS=-pie -Wl,-z,relro -Wl,-z,now ++tcsd_LDFLAGS=$(PIE_LDFLAGS) $(RELRO_LDFLAGS) + + tcsd_SOURCES=svrside.c tcsd_conf.c tcsd_threads.c platform.c + +-- +2.5.0 + diff --git a/package/trousers/Config.in b/package/trousers/Config.in new file mode 100644 index 0000000000..6ab74bf9a5 --- /dev/null +++ b/package/trousers/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_TROUSERS + bool "trousers" + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on BR2_TOOLCHAIN_HAS_THREADS + # doesn't build properly in static only configurations + depends on !BR2_STATIC_LIBS + help + The open-source TCG Software Stack (TSS). + + This library enables the use of a Trusted Platform Module that + complies with the TPM specification, version 1.2. It implements the + TSS specification, version 1.2. + + http://trousers.sourceforge.net/ + +comment "trousers needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/trousers/trousers.hash b/package/trousers/trousers.hash new file mode 100644 index 0000000000..997cfa97c1 --- /dev/null +++ b/package/trousers/trousers.hash @@ -0,0 +1,3 @@ +# http://sourceforge.net/projects/trousers/files/trousers/0.3.13/ +sha1 d23f1a3df4febffc4174f5cca7d1c54230477bb2 trousers-0.3.13.tar.gz +md5 ad508f97b406f6e48cd90e85d78e7ca8 trousers-0.3.13.tar.gz diff --git a/package/trousers/trousers.mk b/package/trousers/trousers.mk new file mode 100644 index 0000000000..70daa88172 --- /dev/null +++ b/package/trousers/trousers.mk @@ -0,0 +1,33 @@ +############################################################# +# +# trousers +# +############################################################## + +TROUSERS_VERSION = 0.3.13 +TROUSERS_SOURCE = trousers-$(TROUSERS_VERSION).tar.gz +TROUSERS_SITE = http://downloads.sourceforge.net/project/trousers/trousers/$(TROUSERS_VERSION) +TROUSERS_LICENSE = BSD-3c +TROUSERS_LICENSE_FILES = LICENSE +TROUSERS_INSTALL_STAGING = YES +# Need autoreconf because of a patch touching configure.in and Makefile.am +TROUSERS_AUTORECONF = YES +TROUSERS_DEPENDENCIES = openssl + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +TROUSERS_DEPENDENCIES += libiconv +endif + +# The TrouSerS build system attempts to create the tss user and group +# on the host system. Disable the user checking feature as a +# workaround. +TROUSERS_CONF_OPTS += --disable-usercheck + +# uClibc toolchain for ARC doesn't support PIE at the moment +ifeq ($(BR2_arc),y) +TROUSERS_CONF_ENV += \ + ax_cv_check_cflags___fPIE__DPIE=no \ + ax_cv_check_ldflags___pie=no +endif + +$(eval $(autotools-package)) diff --git a/package/tslib/0001-enable_raw_module.patch b/package/tslib/0001-enable_raw_module.patch new file mode 100644 index 0000000000..cb89338cf7 --- /dev/null +++ b/package/tslib/0001-enable_raw_module.patch @@ -0,0 +1,14 @@ +Enable raw module by default + +Signed-off-by: Daniel Nyström + +diff -Naur tslib-e000d35a.orig/etc/ts.conf tslib-e000d35a/etc/ts.conf +--- tslib-e000d35a.orig/etc/ts.conf 2010-12-21 18:54:45.000000000 +0100 ++++ tslib-e000d35a/etc/ts.conf 2010-12-21 18:55:03.000000000 +0100 +@@ -1,5 +1,5 @@ + # Uncomment if you wish to use the linux input layer event interface +-# module_raw input ++module_raw input + + # Uncomment if you're using a Sharp Zaurus SL-5500/SL-5000d + # module_raw collie diff --git a/package/tslib/0002-add_finddef_and_inputattach_utils.patch b/package/tslib/0002-add_finddef_and_inputattach_utils.patch new file mode 100644 index 0000000000..dcc6ec75ae --- /dev/null +++ b/package/tslib/0002-add_finddef_and_inputattach_utils.patch @@ -0,0 +1,718 @@ +diff -Naur tslib-org/tests/Makefile.am tslib-1.0/tests/Makefile.am +--- tslib-org/tests/Makefile.am 2006-08-25 00:02:55.000000000 +0300 ++++ tslib-1.0/tests/Makefile.am 2007-05-07 17:39:54.000000000 +0300 +@@ -12,7 +12,7 @@ + AM_CFLAGS = $(DEBUGFLAGS) + INCLUDES = -I$(top_srcdir)/src + +-bin_PROGRAMS = ts_test ts_calibrate ts_print ts_print_raw ts_harvest ++bin_PROGRAMS = ts_test ts_calibrate ts_print ts_print_raw ts_harvest ts_finddev inputattach + + ts_test_SOURCES = ts_test.c fbutils.c fbutils.h font_8x8.c font_8x16.c font.h + ts_test_LDADD = $(top_builddir)/src/libts.la +@@ -27,4 +27,10 @@ + ts_calibrate_LDADD = $(top_builddir)/src/libts.la + + ts_harvest_SOURCES = ts_harvest.c fbutils.c fbutils.h testutils.c testutils.h font_8x8.c font_8x16.c font.h +-ts_harvest_LDADD = $(top_builddir)/src/libts.la ++ts_harvest_LDADD = $(top_builddir)/src/libts.la ++ ++ts_finddev_SOURCES = ts_finddev.c ++ts_finddev_LDADD = $(top_builddir)/src/libts.la ++ ++inputattach_SOURCES = inputattach.c ++inputattach_LDADD = +diff -Naur tslib-org/tests/inputattach.c tslib-1.0/tests/inputattach.c +--- tslib-org/tests/inputattach.c 1970-01-01 02:00:00.000000000 +0200 ++++ tslib-1.0/tests/inputattach.c 2007-05-07 17:36:37.000000000 +0300 +@@ -0,0 +1,611 @@ ++/* ++ * $Id: inputattach.c,v 1.24 2006/02/08 12:19:31 vojtech Exp $ ++ * ++ * Copyright (c) 1999-2000 Vojtech Pavlik ++ * ++ * Sponsored by SuSE ++ * ++ * Twiddler support Copyright (c) 2001 Arndt Schoenewald ++ * Sponsored by Quelltext AG (http://www.quelltext-ag.de), Dortmund, Germany ++ */ ++ ++/* ++ * Input line discipline attach program ++ */ ++ ++/* ++ * 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 ++ * ++ * Should you need to contact me, the author, you can do so either by ++ * e-mail - mail your message to , or by paper mail: ++ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic ++ */ ++ ++/* softa note: ++cvs version is here: ++http://cvs.sourceforge.net/viewcvs.py/ *checkout* /linuxconsole/ruby/utils/inputattach.c ++*/ ++ ++#include ++ ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++// softa patch! ++/* ++ * Serio types ++ */ ++#ifndef SERIO_UNKNOWN ++ #define SERIO_UNKNOWN 0x00 ++#endif ++#ifndef SERIO_MSC ++ #define SERIO_MSC 0x01 ++#endif ++#ifndef SERIO_SUN ++ #define SERIO_SUN 0x02 ++#endif ++#ifndef SERIO_MS ++ #define SERIO_MS 0x03 ++#endif ++#ifndef SERIO_MP ++ #define SERIO_MP 0x04 ++#endif ++#ifndef SERIO_MZ ++ #define SERIO_MZ 0x05 ++#endif ++#ifndef SERIO_MZP ++ #define SERIO_MZP 0x06 ++#endif ++#ifndef SERIO_MZPP ++ #define SERIO_MZPP 0x07 ++#endif ++#ifndef SERIO_VSXXXAA ++ #define SERIO_VSXXXAA 0x08 ++#endif ++#ifndef SERIO_SUNKBD ++ #define SERIO_SUNKBD 0x10 ++#endif ++#ifndef SERIO_WARRIOR ++ #define SERIO_WARRIOR 0x18 ++#endif ++#ifndef SERIO_SPACEORB ++ #define SERIO_SPACEORB 0x19 ++#endif ++#ifndef SERIO_MAGELLAN ++ #define SERIO_MAGELLAN 0x1a ++#endif ++#ifndef SERIO_SPACEBALL ++ #define SERIO_SPACEBALL 0x1b ++#endif ++#ifndef SERIO_GUNZE ++ #define SERIO_GUNZE 0x1c ++#endif ++#ifndef SERIO_IFORCE ++ #define SERIO_IFORCE 0x1d ++#endif ++#ifndef SERIO_STINGER ++ #define SERIO_STINGER 0x1e ++#endif ++#ifndef SERIO_NEWTON ++ #define SERIO_NEWTON 0x1f ++#endif ++#ifndef SERIO_STOWAWAY ++ #define SERIO_STOWAWAY 0x20 ++#endif ++#ifndef SERIO_H3600 ++ #define SERIO_H3600 0x21 ++#endif ++#ifndef SERIO_PS2SER ++ #define SERIO_PS2SER 0x22 ++#endif ++#ifndef SERIO_TWIDKBD ++ #define SERIO_TWIDKBD 0x23 ++#endif ++#ifndef SERIO_TWIDJOY ++ #define SERIO_TWIDJOY 0x24 ++#endif ++#ifndef SERIO_HIL ++ #define SERIO_HIL 0x25 ++#endif ++#ifndef SERIO_SNES232 ++ #define SERIO_SNES232 0x26 ++#endif ++#ifndef SERIO_SEMTECH ++ #define SERIO_SEMTECH 0x27 ++#endif ++#ifndef SERIO_LKKBD ++ #define SERIO_LKKBD 0x28 ++#endif ++#ifndef SERIO_ELO ++ #define SERIO_ELO 0x29 ++#endif ++#ifndef SERIO_MICROTOUCH ++ #define SERIO_MICROTOUCH 0x30 ++#endif ++#ifndef SERIO_PENMOUNT ++ #define SERIO_PENMOUNT 0x31 ++#endif ++#ifndef SERIO_TOUCHRIGHT ++ #define SERIO_TOUCHRIGHT 0x32 ++#endif ++#ifndef SERIO_TOUCHWIN ++ #define SERIO_TOUCHWIN 0x33 ++#endif ++// end softa patch! ++ ++int readchar(int fd, unsigned char *c, int timeout) ++{ ++ struct timeval tv; ++ fd_set set; ++ ++ tv.tv_sec = 0; ++ tv.tv_usec = timeout * 1000; ++ ++ FD_ZERO(&set); ++ FD_SET(fd, &set); ++ ++ if (!select(fd+1, &set, NULL, NULL, &tv)) return -1; ++ if (read(fd, c, 1) != 1) return -1; ++ ++ return 0; ++} ++ ++ ++ ++void setline(int fd, int flags, int speed) ++{ ++ struct termios t; ++ ++ tcgetattr(fd, &t); ++ ++ t.c_cflag = flags | CREAD | HUPCL | CLOCAL; ++ t.c_iflag = IGNBRK | IGNPAR; ++ t.c_oflag = 0; ++ t.c_lflag = 0; ++ t.c_cc[VMIN ] = 1; ++ t.c_cc[VTIME] = 0; ++ ++ cfsetispeed(&t, speed); ++ cfsetospeed(&t, speed); ++ ++ tcsetattr(fd, TCSANOW, &t); ++} ++ ++int logitech_command(int fd, char *c) ++{ ++ int i; ++ unsigned char d; ++ for (i = 0; c[i]; i++) { ++ write(fd, c + i, 1); ++ if (readchar(fd, &d, 1000)) ++ return -1; ++ if (c[i] != d) ++ return -1; ++ } ++ return 0; ++} ++ ++int magellan_init(int fd, long *id, long *extra) ++{ ++ write(fd, "m3\rpBB\rz\r", 9); ++ return 0; ++} ++ ++int warrior_init(int fd, long *id, long *extra) ++{ ++ if (logitech_command(fd, "*S")) return -1; ++ setline(fd, CS8, B4800); ++ return 0; ++} ++ ++int spaceball_waitchar(int fd, unsigned char c, unsigned char *d, int timeout) ++{ ++ unsigned char b = 0; ++ ++ while (!readchar(fd, &b, timeout)) { ++ if (b == 0x0a) continue; ++ *d++ = b; ++ if (b == c) break; ++ } ++ ++ *d = 0; ++ ++ return -(b != c); ++} ++ ++int spaceball_waitcmd(int fd, char c, char *d) ++{ ++ int i; ++ ++ for (i = 0; i < 8; i++) { ++ if (spaceball_waitchar(fd, 0x0d, d, 1000)) ++ return -1; ++ if (d[0] == c) ++ return 0; ++ } ++ ++ return -1; ++} ++ ++int spaceball_cmd(int fd, char *c, char *d) ++{ ++ int i; ++ ++ for (i = 0; c[i]; i++) ++ write(fd, c + i, 1); ++ write(fd, "\r", 1); ++ ++ i = spaceball_waitcmd(fd, toupper(c[0]), d); ++ ++ return i; ++} ++ ++#define SPACEBALL_1003 1 ++#define SPACEBALL_2003B 3 ++#define SPACEBALL_2003C 4 ++#define SPACEBALL_3003C 7 ++#define SPACEBALL_4000FLX 8 ++#define SPACEBALL_4000FLX_L 9 ++ ++int spaceball_init(int fd, long *id, long *extra) ++{ ++ char r[64]; ++ ++ if (spaceball_waitchar(fd, 0x11, r, 4000) || ++ spaceball_waitchar(fd, 0x0d, r, 1000)) ++ return -1; ++ ++ if (spaceball_waitcmd(fd, '@', r)) ++ return -1; ++ ++ if (strncmp("@1 Spaceball alive", r, 18)) ++ return -1; ++ ++ if (spaceball_waitcmd(fd, '@', r)) ++ return -1; ++ ++ if (spaceball_cmd(fd, "hm", r)) ++ return -1; ++ ++ if (!strncmp("Hm2003B", r, 7)) ++ *id = SPACEBALL_2003B; ++ if (!strncmp("Hm2003C", r, 7)) ++ *id = SPACEBALL_2003C; ++ if (!strncmp("Hm3003C", r, 7)) ++ *id = SPACEBALL_3003C; ++ ++ if (!strncmp("HvFirmware", r, 10)) { ++ ++ if (spaceball_cmd(fd, "\"", r)) ++ return -1; ++ ++ if (strncmp("\"1 Spaceball 4000 FLX", r, 21)) ++ return -1; ++ ++ if (spaceball_waitcmd(fd, '"', r)) ++ return -1; ++ ++ if (strstr(r, " L ")) ++ *id = SPACEBALL_4000FLX_L; ++ else ++ *id = SPACEBALL_4000FLX; ++ ++ if (spaceball_waitcmd(fd, '"', r)) ++ return -1; ++ ++ if (spaceball_cmd(fd, "YS", r)) ++ return -1; ++ ++ if (spaceball_cmd(fd, "M", r)) ++ return -1; ++ ++ return 0; ++ } ++ ++ if (spaceball_cmd(fd, "P@A@A", r) || ++ spaceball_cmd(fd, "FT@", r) || ++ spaceball_cmd(fd, "MSS", r)) ++ return -1; ++ ++ return 0; ++} ++ ++int stinger_init(int fd, long *id, long *extra) ++{ ++ int i; ++ unsigned char c; ++ unsigned char *response = "\r\n0600520058C272"; ++ ++ if (write(fd, " E5E5", 5) != 5) /* Enable command */ ++ return -1; ++ ++ for (i = 0; i < 16; i++) /* Check for Stinger */ ++ if (readchar(fd, &c, 200) || (c != response[i])) ++ return -1; ++ ++ return 0; ++} ++ ++int mzp_init(int fd, long *id, long *extra) ++{ ++ if (logitech_command(fd, "*X*q")) return -1; ++ setline(fd, CS8, B9600); ++ return 0; ++} ++ ++int newton_init(int fd, long *id, long *extra) ++{ ++ int i; ++ unsigned char c; ++ unsigned char response[35] = ++ { 0x16, 0x10, 0x02, 0x64, 0x5f, 0x69, 0x64, 0x00, ++ 0x00, 0x00, 0x0c, 0x6b, 0x79, 0x62, 0x64, 0x61, ++ 0x70, 0x70, 0x6c, 0x00, 0x00, 0x00, 0x01, 0x6e, ++ 0x6f, 0x66, 0x6d, 0x00, 0x00, 0x00, 0x00, 0x10, ++ 0x03, 0xdd, 0xe7 }; ++ ++ for (i = 0; i < 35; i++) ++ if (readchar(fd, &c, 400) || (c != response[i])) ++ return -1; ++ ++ return 0; ++} ++ ++int twiddler_init(int fd, long *id, long *extra) ++{ ++ unsigned char c[10]; ++ int count, line; ++ ++ /* Turn DTR off, otherwise the Twiddler won't send any data. */ ++ if (ioctl(fd, TIOCMGET, &line)) return -1; ++ line &= ~TIOCM_DTR; ++ if (ioctl(fd, TIOCMSET, &line)) return -1; ++ ++ /* Check whether the device on the serial line is the Twiddler. ++ * ++ * The Twiddler sends data packets of 5 bytes which have the following ++ * properties: the MSB is 0 on the first and 1 on all other bytes, and ++ * the high order nibble of the last byte is always 0x8. ++ * ++ * We read and check two of those 5 byte packets to be sure that we ++ * are indeed talking to a Twiddler. */ ++ ++ /* Read at most 5 bytes until we find one with the MSB set to 0 */ ++ for (count = 0; count < 5; count++) { ++ if (readchar(fd, c+0, 500)) return -1; ++ if ((c[0] & 0x80) == 0) break; ++ } ++ ++ if (count == 5) { ++ /* Could not find header byte in data stream */ ++ return -1; ++ } ++ ++ /* Read remaining 4 bytes plus the full next data packet */ ++ for (count = 1; count < 10; count++) { ++ if (readchar(fd, c+count, 500)) return -1; ++ } ++ ++ /* Check whether the bytes of both data packets obey the rules */ ++ for (count = 1; count < 10; count++) { ++ if ((count % 5 == 0 && (c[count] & 0x80) != 0) ++ || (count % 5 == 4 && (c[count] & 0xF0) != 0x80) ++ || (count % 5 != 0 && (c[count] & 0x80) != 0x80)) { ++ /* Invalid byte in data packet */ ++ return -1; ++ } ++ } ++ ++ return 0; ++} ++ ++int penmount_init(int fd, long *id, long *extra) ++{ ++ unsigned char init_cmd[5] = { 0xF2, 0x00, 0x00, 0x00, 0x00 }; ++ unsigned char start_cmd[5] = { 0xF1, 0x00, 0x00, 0x00, 0x00 }; ++ unsigned char c[10]; ++ int count; ++ ++ /* try to initialize device */ ++ if (write( fd, init_cmd, 5 ) != 5) ++ return -1; ++ ++ /* read the responce */ ++ for (count = 0; count < 5; count ++) { ++ if (readchar(fd, c+0, 500)) return -1; ++ if (c[0] == 0xf2) break; ++ } ++ ++ if (readchar(fd, c+1, 500)) return -1; ++ if (c[1] != 0xd9) return -1; ++ ++ if (readchar(fd, c+2, 500)) return -1; ++ if (c[2] != 0x0a) return -1; ++ ++ /* the device is present! start it! */ ++ if (write( fd, start_cmd, 5 ) != 5) ++ return -1; ++ ++ return 0; ++} ++ ++int dump_init(int fd, long *id, long *extra) ++{ ++ unsigned char c, o = 0; ++ ++ c = 0x80; ++ ++ if (write(fd, &c, 1) != 1) /* Enable command */ ++ return -1; ++ ++ while (1) ++ if (!readchar(fd, &c, 1)) { ++ printf("%02x (%c) ", c, ((c > 32) && (c < 127)) ? c : 'x'); ++ o = 1; ++ } else { ++ if (o) { ++ printf("\n"); ++ o = 0; ++ } ++ } ++} ++ ++struct input_types { ++ char name[16]; ++ char name2[16]; ++ int speed; ++ int flags; ++ unsigned long type; ++ unsigned long id; ++ unsigned long extra; ++ int flush; ++ int (*init)(int fd, long *id, long *extra); ++}; ++ ++struct input_types input_types[] = { ++ ++{ "--sunkbd", "-skb", B1200, CS8, SERIO_SUNKBD, 0, 0, 1, NULL }, ++{ "--lkkbd", "-lk", B4800, CS8|CSTOPB, SERIO_LKKBD, 0, 0, 1, NULL }, ++{ "--vsxxx-aa", "-vs", B4800, CS8|CSTOPB|PARENB|PARODD,SERIO_VSXXXAA, 0, 0, 1, NULL }, ++{ "--spaceorb", "-orb", B9600, CS8, SERIO_SPACEORB, 0, 0, 1, NULL }, ++{ "--spaceball", "-sbl", B9600, CS8, SERIO_SPACEBALL,0, 0, 0, spaceball_init }, ++{ "--magellan", "-mag", B9600, CS8 | CSTOPB | CRTSCTS, SERIO_MAGELLAN, 0, 0, 1, magellan_init }, ++{ "--warrior", "-war", B1200, CS7 | CSTOPB, SERIO_WARRIOR, 0, 0, 1, warrior_init }, ++{ "--stinger", "-sting", B1200, CS8, SERIO_STINGER, 0, 0, 1, stinger_init }, ++{ "--mousesystems", "-msc", B1200, CS8, SERIO_MSC, 0, 0x01, 1, NULL }, ++{ "--sunmouse", "-sun", B1200, CS8, SERIO_SUN, 0, 0x01, 1, NULL }, ++{ "--microsoft", "-bare", B1200, CS7, SERIO_MS, 0, 0, 1, NULL }, ++{ "--mshack", "-ms", B1200, CS7, SERIO_MS, 0, 0x01, 1, NULL }, ++{ "--mouseman", "-mman", B1200, CS7, SERIO_MP, 0, 0x01, 1, NULL }, ++{ "--intellimouse", "-ms3", B1200, CS7, SERIO_MZ, 0, 0x11, 1, NULL }, ++{ "--mmwheel", "-mmw", B1200, CS7 | CSTOPB, SERIO_MZP, 0, 0x13, 1, mzp_init }, ++{ "--iforce", "-ifor", B38400, CS8, SERIO_IFORCE, 0, 0, 0, NULL }, ++{ "--newtonkbd", "-newt", B9600, CS8, SERIO_NEWTON, 0, 0, 0, newton_init }, ++{ "--h3600ts", "-ipaq", B115200, CS8, SERIO_H3600, 0, 0, 0, NULL }, ++{ "--stowawaykbd", "-ipaqkbd", B115200, CS8, SERIO_STOWAWAY, 0, 0, 0, NULL }, ++{ "--ps2serkbd", "-ps2ser", B1200, CS8, SERIO_PS2SER, 0, 0, 1, NULL }, ++{ "--twiddler", "-twid", B2400, CS8, SERIO_TWIDKBD, 0, 0, 0, twiddler_init }, ++{ "--twiddler-joy", "-twidjoy", B2400, CS8, SERIO_TWIDJOY, 0, 0, 0, twiddler_init }, ++{ "--elotouch", "-elo", B9600, CS8 | CRTSCTS, SERIO_ELO, 0, 0, 0, NULL }, ++{ "--elo4002", "-elo6b", B9600, CS8 | CRTSCTS, SERIO_ELO, 1, 0, 0, NULL }, ++{ "--elo271-140", "-elo4b", B9600, CS8 | CRTSCTS, SERIO_ELO, 2, 0, 0, NULL }, ++{ "--elo261-280", "-elo3b", B9600, CS8 | CRTSCTS, SERIO_ELO, 3, 0, 0, NULL }, ++{ "--dump", "-dump", B2400, CS8, 0, 0, 0, 0, dump_init }, ++{ "--dmc9000", "-dmc", B19200, CS8, SERIO_PENMOUNT, 0, 0, 0, penmount_init }, ++{ "", "", 0, 0 } ++ ++}; ++ ++int main(int argc, char **argv) ++{ ++ unsigned long devt; ++ int ldisc; ++ int type; ++ long id, extra; ++ int fd; ++ char c; ++ ++ if (argc < 2 || argc > 3 || !strcmp("--help", argv[1])) { ++ puts(""); ++ puts("Usage: inputttach "); ++ puts(""); ++ puts("Modes:"); ++ puts(" --sunkbd -skb Sun Type 4 and Type 5 keyboards"); ++ puts(" --lkkbd -lk DEC LK201 / LK401 keyboards"); ++ puts(" --vsxxx-aa -vs DEC VSXXX-AA / VSXXX-GA mouse and VSXXX-AB tablet"); ++ puts(" --spaceorb -orb SpaceOrb 360 / SpaceBall Avenger"); ++ puts(" --spaceball -sbl SpaceBall 2003 / 3003 / 4000 FLX"); ++ puts(" --magellan -mag Magellan / SpaceMouse"); ++ puts(" --warrior -war WingMan Warrior"); ++ puts(" --stinger -stng Gravis Stinger"); ++ puts(" --mousesystems -msc 3-button Mouse Systems mice"); ++ puts(" --sunmouse -sun 3-button Sun mice"); ++ puts(" --microsoft -bare 2-button Microsoft mice"); ++ puts(" --mshack -ms 3-button mice in Microsoft mode"); ++ puts(" --mouseman -mman 3-button Logitech and Genius mice"); ++ puts(" --intellimouse -ms3 Microsoft IntelliMouse"); ++ puts(" --mmwheel -mmw Logitech mice with 4-5 buttons or wheel"); ++ puts(" --iforce -ifor I-Force joysticks and wheels"); ++ puts(" --h3600ts -ipaq Ipaq h3600 touchscreen"); ++ puts(" --stowawaykbd -ipaqkbd Stowaway keyboard"); ++ puts(" --ps2serkbd -ps2ser PS/2 via serial keyboard"); ++ puts(" --twiddler -twid Handykey Twiddler chording keyboard"); ++ puts(" --twiddler-joy -twidjoy Handykey Twiddler used as a joystick"); ++ puts(" --dmc9000 -dmc DMC9000/Penpount touchscreen"); ++ puts(""); ++ return 1; ++ } ++ ++ for (type = 0; input_types[type].speed; type++) { ++ if (!strncasecmp(argv[1], input_types[type].name, 16) || ++ !strncasecmp(argv[1], input_types[type].name2, 16)) ++ break; ++ } ++ ++ if (!input_types[type].speed) { ++ fprintf(stderr, "inputattach: invalid mode\n"); ++ return 1; ++ } ++ ++ if ((fd = open(argv[2], O_RDWR | O_NOCTTY | O_NONBLOCK)) < 0) { ++ perror("inputattach"); ++ return 1; ++ } ++ ++ setline(fd, input_types[type].flags, input_types[type].speed); ++ ++ if (input_types[type].flush) ++ while (!readchar(fd, &c, 100)); ++ ++ id = input_types[type].id; ++ extra = input_types[type].extra; ++ ++ if (input_types[type].init && input_types[type].init(fd, &id, &extra)) { ++ fprintf(stderr, "inputattach: device initialization failed\n"); ++ return 1; ++ } ++ ++ ldisc = N_MOUSE; ++ if(ioctl(fd, TIOCSETD, &ldisc)) { ++ fprintf(stderr, "inputattach: can't set line discipline\n"); ++ return 1; ++ } ++ ++ devt = input_types[type].type | (id << 8) | (extra << 16); ++ ++ if(ioctl(fd, SPIOCSTYPE, &devt)) { ++ fprintf(stderr, "inputattach: can't set device type\n"); ++ return 1; ++ } ++ ++ read(fd, NULL, 0); ++ ++ ldisc = 0; ++ ioctl(fd, TIOCSETD, &ldisc); ++ close(fd); ++ ++ return 0; ++} +diff -Naur tslib-org/tests/ts_finddev.c tslib-1.0/tests/ts_finddev.c +--- tslib-org/tests/ts_finddev.c 1970-01-01 02:00:00.000000000 +0200 ++++ tslib-1.0/tests/ts_finddev.c 2007-05-07 17:36:37.000000000 +0300 +@@ -0,0 +1,75 @@ ++/* ++ * tslib/src/ts_print.c ++ * ++ * Derived from tslib/src/ts_test.c by Douglas Lowder ++ * Just prints touchscreen events -- does not paint them on framebuffer ++ * ++ * This file is placed under the GPL. Please see the file ++ * COPYING for more details. ++ * ++ * Basic test program for touchscreen library. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "tslib.h" ++ ++void usage( int argc, char** argv ) { ++ printf( "Usage: %s device_name wait_for_sec\n", argv[0] ); ++ printf( "\tdevice_name - tdevice to probe, example /dev/input/event0\n" ); ++ printf( "\twait_for_sec - wait seconds for touch event, if 0 - dont wait!\n" ); ++ printf( "\tReturn codes:\n" ); ++ printf( "\t 0 - timeout expired without receiving event.\n" ); ++ printf( "\t But this maybe is TouchScreen.\n" ); ++ printf( "\t -1 - this is NOT TouchScreen device!\n" ); ++ printf( "\t 1 - this is TouchScreen for shure!\n" ); ++ exit(-1); ++} ++ ++void alarm_handler( int sig ) { ++ // time is expired! ++ exit(0); ++} ++ ++int main( int argc, char** argv ) ++{ ++ struct tsdev *ts; ++ struct ts_sample samp; ++ char *tsdevice=NULL; ++ int waitsec; ++ int ret; ++ ++ if (argc != 3) ++ usage( argc, argv ); ++ ++ tsdevice = argv[1]; ++ waitsec = atoi( argv[2] ); ++ if (waitsec < 0) ++ usage( argc, argv ); ++ ++ ts = ts_open( tsdevice, 0 ); ++ if (!ts) ++ return -1; ++ if (ts_config(ts)) ++ return -1; ++ ++ if (!waitsec) { ++ return 0; ++ } ++ ++ printf( "Probe device %s, Please Touch Screen Anywhere in %i seconds! ... \n", tsdevice, waitsec ); ++ signal( SIGALRM, alarm_handler ); ++ alarm( waitsec ); ++ ret = ts_read_raw(ts, &samp, 1 ); ++ if (ret) ++ return 1; ++ ++ return -1; ++} diff --git a/package/tslib/Config.in b/package/tslib/Config.in new file mode 100644 index 0000000000..050588e834 --- /dev/null +++ b/package/tslib/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_TSLIB + bool "tslib" + depends on !BR2_STATIC_LIBS # dlopen + help + Tslib is an abstraction layer for touchscreen panel events. + + https://github.com/kergoth/tslib + +comment "tslib needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/tslib/tslib.hash b/package/tslib/tslib.hash new file mode 100644 index 0000000000..e3ddce54fe --- /dev/null +++ b/package/tslib/tslib.hash @@ -0,0 +1,2 @@ +# Locally generated +sha256 121750e9ae0f05ce840ab8dbefdae1297258f0a69dd1967f55c40ac6e87d5ee9 tslib-1.1.tar.gz diff --git a/package/tslib/tslib.mk b/package/tslib/tslib.mk new file mode 100644 index 0000000000..1100247905 --- /dev/null +++ b/package/tslib/tslib.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# tslib +# +################################################################################ + +TSLIB_VERSION = 1.1 +TSLIB_SITE = https://github.com/kergoth/tslib/releases/download/$(TSLIB_VERSION) +TSLIB_LICENSE = GPL, LGPL +TSLIB_LICENSE_FILES = COPYING + +TSLIB_AUTORECONF = YES +TSLIB_INSTALL_STAGING = YES +TSLIB_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install + +$(eval $(autotools-package)) diff --git a/package/tstools/0001-build-get-along-with-buildroot.patch b/package/tstools/0001-build-get-along-with-buildroot.patch new file mode 100644 index 0000000000..1e7a748262 --- /dev/null +++ b/package/tstools/0001-build-get-along-with-buildroot.patch @@ -0,0 +1,40 @@ +From 44f80bce0914d4d9c5e7486c7cdb521ba637b324 Mon Sep 17 00:00:00 2001 +From: Tzu-Jung Lee +Date: Fri, 19 Jul 2013 22:45:18 +0800 +Subject: [PATCH] build: get along with buildroot + +Signed-off-by: Tzu-Jung Lee +--- + Makefile | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 2c3568e..98bb994 100644 +--- a/Makefile ++++ b/Makefile +@@ -34,12 +34,6 @@ SHELL = /bin/sh + .SUFFIXES: + .SUFFIXES: .c .o + +-ifdef CROSS_COMPILE +-CC = $(CROSS_COMPILE)gcc +-else +-CC = gcc +-endif +- + # Use WARN=1 periodically to get too many warnings... + ifdef WARN + WARNING_FLAGS = -Wall -W -Wfloat-equal -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wconversion -Wmissing-prototypes -Wmissing-declarations -Wunreachable-code -Winline +@@ -452,3 +446,9 @@ test_lists: $(BINDIR)/test_nal_unit_list $(BINDIR)/test_es_unit_list + @echo +++ Testing ES unit lists + $(BINDIR)/test_es_unit_list + @echo +++ Test succeeded ++ ++.PHONY: install ++install: ++ @for i in $(PROGS); do \ ++ cp -f $$i $(DESTDIR)/usr/bin/; \ ++ done +-- +1.8.3.2 + diff --git a/package/tstools/Config.in b/package/tstools/Config.in new file mode 100644 index 0000000000..f5dd138c4d --- /dev/null +++ b/package/tstools/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_TSTOOLS + bool "tstools" + depends on BR2_USE_MMU # fork() + help + This is a set of cross-platform command line tools for working with + MPEG data. + + The emphasis is on relatively simple tools which concentrate on MPEG + (H.264 and H.262) data packaged according to H.222 (i.e., TS or PS), + with a particular interest in checking for conformance. + + Transport Stream (TS) is typically used for distribution of cable + and satellite data. Program Stream (PS) is typically used to store + data on DVDs. + + https://github.com/kynesim/tstools/ diff --git a/package/tstools/tstools.hash b/package/tstools/tstools.hash new file mode 100644 index 0000000000..9b0f1c7cea --- /dev/null +++ b/package/tstools/tstools.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3d2b2375e2874933f9aa59d4f25bb6b334747219eb0d7a076974e61222d59bf6 tstools-08f6be304040e7b84760ac3920bcff4a563b6cd2.tar.gz diff --git a/package/tstools/tstools.mk b/package/tstools/tstools.mk new file mode 100644 index 0000000000..3355db864b --- /dev/null +++ b/package/tstools/tstools.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# tstools +# +################################################################################ + +# No releases or tags yet. Use the latest commit ID from master branch. +TSTOOLS_VERSION = 08f6be304040e7b84760ac3920bcff4a563b6cd2 +TSTOOLS_SITE = $(call github,kynesim,tstools,$(TSTOOLS_VERSION)) +# tstools upstream doesn't contain any license file so far. See: +# https://github.com/kynesim/tstools/issues/32 +TSTOOLS_LICENSE = MPLv1.1 +TSTOOLS_LICENSE_FILES = + +define TSTOOLS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) LD="$(TARGET_CC)" $(TARGET_MAKE_ENV) \ + $(MAKE1) -C $(@D) +endef + +define TSTOOLS_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/turbolua/Config.in b/package/turbolua/Config.in new file mode 100644 index 0000000000..34f66ef131 --- /dev/null +++ b/package/turbolua/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_TURBOLUA + bool "turbolua" + depends on BR2_PACKAGE_LUAJIT + help + Turbo.lua is a framework built for LuaJIT 2 to simplify the + task of building fast and scalable network applications. It + uses a event-driven, non-blocking, no thread design to deliver + excellent performance and minimal footprint to high-load + applications while also providing excellent support for + embedded uses. The toolkit can be used for HTTP REST API’s, + traditional dynamic web pages through templating, open + connections like WebSockets, or just as high level building + blocks for native speed network applications. + + http://www.turbolua.org + +comment "turbolua needs LuaJIT" + depends on !BR2_PACKAGE_LUAJIT diff --git a/package/turbolua/turbolua.hash b/package/turbolua/turbolua.hash new file mode 100644 index 0000000000..ea7898c427 --- /dev/null +++ b/package/turbolua/turbolua.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 4f7e3121fcc25a5867a264a6f09acf641c904668f5822b1533881f40a3b863ea turbolua-91db237a6690f4a659cbdee2ebbbbc9741d8ea4c.tar.gz diff --git a/package/turbolua/turbolua.mk b/package/turbolua/turbolua.mk new file mode 100644 index 0000000000..fe6db3184c --- /dev/null +++ b/package/turbolua/turbolua.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# turbolua +# +################################################################################ + +TURBOLUA_VERSION = 91db237a6690f4a659cbdee2ebbbbc9741d8ea4c +TURBOLUA_SITE = $(call github,kernelsauce,turbo,$(TURBOLUA_VERSION)) +TURBOLUA_DEPENDENCIES = luajit +TURBOLUA_LICENSE = Apache-2.0 +TURBOLUA_LICENSE_FILES = LICENSE + +TURBOLUA_MAKE_OPTS = \ + $(TARGET_CONFIGURE_OPTS) \ + LUAJIT_VERSION="$(LUAJIT_VERSION)" + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +TURBOLUA_MAKE_OPTS += SSL=openssl +TURBOLUA_DEPENDENCIES += openssl +else +TURBOLUA_MAKE_OPTS += SSL=none +endif + +define TURBOLUA_BUILD_CMDS + $(MAKE) $(TURBOLUA_MAKE_OPTS) -C $(@D) all +endef + +define TURBOLUA_INSTALL_TARGET_CMDS + $(MAKE) $(TURBOLUA_MAKE_OPTS) LDCONFIG=true \ + PREFIX="$(TARGET_DIR)/usr" -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/tvheadend/0001-no-check_config.patch b/package/tvheadend/0001-no-check_config.patch new file mode 100644 index 0000000000..361ebcd41c --- /dev/null +++ b/package/tvheadend/0001-no-check_config.patch @@ -0,0 +1,23 @@ +Makefile: do not use check_config + +test(1) only uses the second to compare two files dates. +test(1) also does a strict comparison wrt. dates. + +But, on very fast systems, the configure and .config.mk +files may be created in the same second, and so would lead +to a false comparison of the files' dates. + +Signed-off-by: "Yann E. MORIN" + +diff -durN tvheadend-c84bc2b72b462ef2dbed305f3fd0bb3fa5046fc3.orig/Makefile tvheadend-c84bc2b72b462ef2dbed305f3fd0bb3fa5046fc3/Makefile +--- tvheadend-c84bc2b72b462ef2dbed305f3fd0bb3fa5046fc3.orig/Makefile 2014-03-09 14:47:43.780025330 +0100 ++++ tvheadend-c84bc2b72b462ef2dbed305f3fd0bb3fa5046fc3/Makefile 2014-03-09 14:48:40.836539093 +0100 +@@ -566,7 +566,7 @@ + $(ROOTDIR)/configure $(CONFIGURE_ARGS) + + # Binary +-${PROG}: .config.mk make_webui $(OBJS) ++${PROG}: make_webui $(OBJS) + $(pCC) -o $@ $(OBJS) $(CFLAGS) $(LDFLAGS) + + # Object diff --git a/package/tvheadend/0002-ffmpeg-revert-minimum-required-version-numbers.patch b/package/tvheadend/0002-ffmpeg-revert-minimum-required-version-numbers.patch new file mode 100644 index 0000000000..74136fe451 --- /dev/null +++ b/package/tvheadend/0002-ffmpeg-revert-minimum-required-version-numbers.patch @@ -0,0 +1,51 @@ +From 78a7b7365a67fa2f5394c6b4ca39de01b00416dc Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Sat, 2 Apr 2016 19:05:52 +0200 +Subject: [PATCH 1/1] ffmpeg: revert minimum required version numbers + +This commit reverts the minimum version numbers required by configure to +the values before +https://github.com/tvheadend/tvheadend/commit/1359effe28a0381b8c9cbd362d6e144fb87b00fc#diff-e2d5a00791bce9a01f99bc6fd613a39dL486 +in order to allow compilation with older versions of ffmpeg again. + +Please note that the previous version numbers of all ffmpeg libs, with +the exception of libavfilter, are those of ffmpeg 2.0.7: +https://ffmpeg.org/olddownload.html + +Therefore I synced the minimum version number required for libavfilter to +3.79.101 and not to 4.0.0 as previous in tvheadend's configure script. + +Signed-off-by: Bernd Kuhls +[Patch sent upstream: https://github.com/tvheadend/tvheadend/pull/838] +--- + configure | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/configure b/configure +index be3d2e2..2ffd280 100755 +--- a/configure ++++ b/configure +@@ -512,13 +512,13 @@ else + if enabled_or_auto libav; then + has_libav=true + +- check_pkg libavfilter ">=6.31.100" || has_libav=false +- check_pkg libswresample ">=2.0.101" || has_libav=false +- check_pkg libavresample ">=3.0.0" || has_libav=false +- check_pkg libswscale ">=4.0.100" || has_libav=false +- check_pkg libavformat ">=57.25.100" || has_libav=false +- check_pkg libavcodec ">=57.24.102" || has_libav=false +- check_pkg libavutil ">=55.17.103" || has_libav=false ++ check_pkg libavfilter ">=3.79.101" || has_libav=false ++ check_pkg libswresample ">=0.17.102" || has_libav=false ++ check_pkg libavresample ">=1.1.0" || has_libav=false ++ check_pkg libswscale ">=2.3.100" || has_libav=false ++ check_pkg libavformat ">=55.12.100" || has_libav=false ++ check_pkg libavcodec ">=55.18.102" || has_libav=false ++ check_pkg libavutil ">=52.38.100" || has_libav=false + + if $has_libav; then + enable libav +-- +2.8.0.rc3 + diff --git a/package/tvheadend/Config.in b/package/tvheadend/Config.in new file mode 100644 index 0000000000..67a4b1419f --- /dev/null +++ b/package/tvheadend/Config.in @@ -0,0 +1,28 @@ +comment "tvheadend needs a toolchain w/ NPTL, headers >= 3.2, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 || BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + +config BR2_PACKAGE_TVHEADEND + bool "tvheadend" + depends on !BR2_STATIC_LIBS # dladdr() + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_DTV_SCAN_TABLES + select BR2_PACKAGE_FFMPEG_AVRESAMPLE if BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_FFMPEG_SWSCALE if BR2_PACKAGE_FFMPEG + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + select BR2_PACKAGE_OPENSSL + help + Tvheadend is a TV streaming server for Linux supporting DVB-S, + DVB-S2, DVB-C, DVB-T, ATSC, IPTV, and Analog video (V4L) as + input sources. + + https://www.lonelycoder.com/redmine/projects/tvheadend/ + + Note: + - on first run, tvheadend will start in wizard mode; the webUI + is available on port 9981. + - if you want Avahi support, you'll need to enable: + Avahi, D-Bus, libdaemon diff --git a/package/tvheadend/S99tvheadend b/package/tvheadend/S99tvheadend new file mode 100644 index 0000000000..65669ce404 --- /dev/null +++ b/package/tvheadend/S99tvheadend @@ -0,0 +1,59 @@ +#! /bin/sh +# tvheadend startup script inspired by the Debian one in the package + +# Author: Yann E. MORIN + +PATH=/usr/sbin:/usr/bin:/sbin:/bin +NAME=tvheadend +DAEMON=/usr/bin/$NAME +PIDFILE=/var/run/$NAME.pid + +[ -f "${DAEMON}" -a -x "${DAEMON}" ] || exit 0 + +# Read configuration variable file if it is present +[ -r "/etc/default/${NAME}" ] && . "/etc/default/${NAME}" + +ARGS="-f" +[ -z "${TVH_USER}" ] || ARGS="${ARGS} -u ${TVH_USER}" +[ -z "${TVH_GROUP}" ] || ARGS="${ARGS} -g ${TVH_GROUP}" +[ -z "${TVH_ADAPTERS}" ] || ARGS="${ARGS} -a ${TVH_ADAPTERS}" +[ -z "${TVH_HTTP_PORT}" ] || ARGS="${ARGS} -w ${TVH_HTTP_PORT}" +[ -z "${TVH_HTSP_PORT}" ] || ARGS="${ARGS} -e ${TVH_HTSP_PORT}" +[ "${TVH_DEBUG}" = "1" ] && ARGS="${ARGS} -s" + +# If first run, start in wizard mode +if [ -z "$(ls -1 /home/tvheadend/.hts/tvheadend/accesscontrol/ 2>/dev/null)" ]; then + ARGS="${ARGS} -C" +fi + +case "$1" in + start) + printf "Starting TVHeadend daemon: " + if start-stop-daemon -S -q -p ${PIDFILE} -m --exec "${DAEMON}" -- ${ARGS}; then + printf "OK\n" + else + printf "failed\n" + fi + ;; + stop) + printf "Stopping TVHeadend daemon: " + start-stop-daemon -K -q -p ${PIDFILE} -s TERM + sleep 2 + if start-stop-daemon -K -q -p ${PIDFILE} -t; then + printf "failed, killing: " + start-stop-daemon -K -q -p ${PIDFILE} -s KILL -o + fi + printf "OK\n" + ;; + restart|force-reload) + "${0}" stop + sleep 2 + "${0}" start + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +: diff --git a/package/tvheadend/etc.default.tvheadend b/package/tvheadend/etc.default.tvheadend new file mode 100644 index 0000000000..253f8320b1 --- /dev/null +++ b/package/tvheadend/etc.default.tvheadend @@ -0,0 +1,6 @@ +TVH_USER=tvheadend +TVH_GROUP=tvheadend +#TVH_ADAPTERS= +#TVH_HTTP_PORT=9981 +#TVH_HTSP_PORT=9982 +#TVH_DEBUG=1 diff --git a/package/tvheadend/tvheadend.hash b/package/tvheadend/tvheadend.hash new file mode 100644 index 0000000000..9406d08f63 --- /dev/null +++ b/package/tvheadend/tvheadend.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 50ada2f30387f9526e1ed453f778686b443e599841a73a031cdd543b65e7a502 tvheadend-cd9f07fb865e5700156546ee326fbaf42ee99cf8.tar.gz diff --git a/package/tvheadend/tvheadend.mk b/package/tvheadend/tvheadend.mk new file mode 100644 index 0000000000..07577d0d05 --- /dev/null +++ b/package/tvheadend/tvheadend.mk @@ -0,0 +1,125 @@ +################################################################################ +# +# tvheadend +# +################################################################################ + +TVHEADEND_VERSION = cd9f07fb865e5700156546ee326fbaf42ee99cf8 +TVHEADEND_SITE = $(call github,tvheadend,tvheadend,$(TVHEADEND_VERSION)) +TVHEADEND_LICENSE = GPLv3+ +TVHEADEND_LICENSE_FILES = LICENSE.md +TVHEADEND_DEPENDENCIES = \ + host-gettext \ + host-pkgconf \ + $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python) \ + openssl + +ifeq ($(BR2_PACKAGE_AVAHI),y) +TVHEADEND_DEPENDENCIES += avahi +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +TVHEADEND_DEPENDENCIES += dbus +TVHEADEND_CONF_OPTS += --enable-dbus-1 +else +TVHEADEND_CONF_OPTS += --disable-dbus-1 +endif + +ifeq ($(BR2_PACKAGE_FFMPEG),y) +TVHEADEND_DEPENDENCIES += ffmpeg +TVHEADEND_CONF_OPTS += --enable-libav +else +TVHEADEND_CONF_OPTS += --disable-libav +endif + +ifeq ($(BR2_PACKAGE_LIBDVBCSA),y) +TVHEADEND_DEPENDENCIES += libdvbcsa +TVHEADEND_CONF_OPTS += --enable-dvbcsa +else +TVHEADEND_CONF_OPTS += --disable-dvbcsa +endif + +ifeq ($(BR2_PACKAGE_LIBHDHOMERUN),y) +TVHEADEND_DEPENDENCIES += libhdhomerun +TVHEADEND_CONF_OPTS += --enable-hdhomerun_client +else +TVHEADEND_CONF_OPTS += --disable-hdhomerun_client +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +TVHEADEND_DEPENDENCIES += libiconv +endif + +TVHEADEND_CFLAGS = $(TARGET_CFLAGS) +ifeq ($(BR2_PACKAGE_LIBURIPARSER),y) +TVHEADEND_DEPENDENCIES += liburiparser +TVHEADEND_CFLAGS += $(if $(BR2_USE_WCHAR),,-DURI_NO_UNICODE) +endif + +TVHEADEND_DEPENDENCIES += dtv-scan-tables + +# The tvheadend build system expects the transponder data to be present inside +# its source tree. To prevent a download initiated by the build system just +# copy the data files in the right place and add the corresponding stamp file. +define TVHEADEND_INSTALL_DTV_SCAN_TABLES + $(INSTALL) -d $(@D)/data/dvb-scan + cp -r $(TARGET_DIR)/usr/share/dvb/* $(@D)/data/dvb-scan/ + touch $(@D)/data/dvb-scan/.stamp +endef +TVHEADEND_PRE_CONFIGURE_HOOKS += TVHEADEND_INSTALL_DTV_SCAN_TABLES + +define TVHEADEND_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + $(TARGET_CONFIGURE_ARGS) \ + CFLAGS="$(TVHEADEND_CFLAGS)" \ + ./configure \ + --prefix=/usr \ + --arch="$(ARCH)" \ + --cpu="$(BR2_GCC_TARGET_CPU)" \ + --nowerror \ + --python="$(HOST_DIR)/usr/bin/python" \ + --enable-dvbscan \ + --enable-bundle \ + --disable-ffmpeg_static \ + --disable-hdhomerun_static \ + $(TVHEADEND_CONF_OPTS) \ + ) +endef + +define TVHEADEND_BUILD_CMDS + $(MAKE) -C $(@D) +endef + +define TVHEADEND_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install +endef + +# Remove documentation and source files that are not needed because we +# use the bundled web interface version. +define TVHEADEND_CLEAN_SHARE + rm -rf $(TARGET_DIR)/usr/share/tvheadend/docs + rm -rf $(TARGET_DIR)/usr/share/tvheadend/src +endef + +TVHEADEND_POST_INSTALL_TARGET_HOOKS += TVHEADEND_CLEAN_SHARE + +#---------------------------------------------------------------------------- +# To run tvheadend, we need: +# - a startup script, and its config file +# - a non-root user to run as, and a home for it that is not accessible +# to the other users (because there will be crendentials in there) + +define TVHEADEND_INSTALL_INIT_SYSV + $(INSTALL) -D package/tvheadend/etc.default.tvheadend $(TARGET_DIR)/etc/default/tvheadend + $(INSTALL) -D package/tvheadend/S99tvheadend $(TARGET_DIR)/etc/init.d/S99tvheadend +endef + +define TVHEADEND_USERS + tvheadend -1 tvheadend -1 * /home/tvheadend - video TVHeadend daemon +endef +define TVHEADEND_PERMISSIONS + /home/tvheadend r 0700 tvheadend tvheadend - - - - - +endef + +$(eval $(generic-package)) diff --git a/package/twolame/Config.in b/package/twolame/Config.in new file mode 100644 index 0000000000..3d8f23d679 --- /dev/null +++ b/package/twolame/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_TWOLAME + bool "twolame" + select BR2_PACKAGE_LIBSNDFILE + help + TwoLAME is an optimised MPEG Audio Layer 2 (MP2) encoder based on + tooLAME by Mike Cheng, which in turn is based upon the ISO dist10 + code and portions of LAME. + + http://www.twolame.org/ diff --git a/package/twolame/twolame.hash b/package/twolame/twolame.hash new file mode 100644 index 0000000000..647655bd15 --- /dev/null +++ b/package/twolame/twolame.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 98f332f48951f47f23f70fd0379463aff7d7fb26f07e1e24e42ddef22cc6112a twolame-0.3.13.tar.gz diff --git a/package/twolame/twolame.mk b/package/twolame/twolame.mk new file mode 100644 index 0000000000..a26491f4ed --- /dev/null +++ b/package/twolame/twolame.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# twolame +# +################################################################################ + +TWOLAME_VERSION = 0.3.13 +TWOLAME_SITE = http://downloads.sourceforge.net/project/twolame/twolame/$(TWOLAME_VERSION) +TWOLAME_DEPENDENCIES = host-pkgconf libsndfile +TWOLAME_INSTALL_STAGING = YES +TWOLAME_LICENSE = LGPLv2.1+ +TWOLAME_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/tz/Config.in b/package/tz/Config.in new file mode 100644 index 0000000000..943dc5cc49 --- /dev/null +++ b/package/tz/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_TZ + bool + help + Timezone info for uClibc. diff --git a/package/tz/tz.mk b/package/tz/tz.mk new file mode 100644 index 0000000000..7a756eb5d8 --- /dev/null +++ b/package/tz/tz.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# tz +# +################################################################################ + +TZ_SOURCE = +TZ_DEPENDENCIES = host-tzdata host-tzdump +TZ_LICENSE = Public domain + +TZ_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME)) + +define TZ_BUILD_CMDS + (cd $(HOST_DIR)/usr/share/zoneinfo/posix/; \ + for i in $$(find . -type f); do \ + mkdir -p $(@D)/output/$$(dirname $$i); \ + $(TZDUMP) -p . -q $${i#./} | sed '1d' > $(@D)/output/$$i; \ + done \ + ) +endef + +define TZ_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0644 $(HOST_DIR)/usr/share/zoneinfo/zone.tab \ + $(TARGET_DIR)/usr/share/zoneinfo/zone.tab + $(INSTALL) -D -m 0644 $(HOST_DIR)/usr/share/zoneinfo/iso3166.tab \ + $(TARGET_DIR)/usr/share/zoneinfo/iso3166.tab + mkdir -p $(TARGET_DIR)/usr/share/zoneinfo/uclibc + cp -a $(@D)/output/* $(TARGET_DIR)/usr/share/zoneinfo/uclibc + if [ -n "$(TZ_LOCALTIME)" ]; then \ + if [ ! -f $(TARGET_DIR)/usr/share/zoneinfo/uclibc/$(TZDATA_LOCALTIME) ]; then \ + printf "Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting\n" \ + "$(TZDATA_LOCALTIME)"; \ + exit 1; \ + fi; \ + cd $(TARGET_DIR)/etc; \ + ln -sf ../usr/share/zoneinfo/uclibc/$(TZDATA_LOCALTIME) TZ; \ + fi +endef + +$(eval $(generic-package)) diff --git a/package/tzdata/Config.in b/package/tzdata/Config.in new file mode 100644 index 0000000000..1e6cc0fc64 --- /dev/null +++ b/package/tzdata/Config.in @@ -0,0 +1,9 @@ +# This package is not meant to be user-visible. +# It gets selected by BR2_TARGET_TZ in system/Config.in + +config BR2_PACKAGE_TZDATA + bool + help + Time zone database + + http://www.iana.org/time-zones/repository/tz-link.html diff --git a/package/tzdata/tzdata.hash b/package/tzdata/tzdata.hash new file mode 100644 index 0000000000..1529fd4afa --- /dev/null +++ b/package/tzdata/tzdata.hash @@ -0,0 +1,2 @@ +# From: http://mm.icann.org/pipermail/tz-announce/2016-April/000038.html +sha512 f1beb1793c4c7d18f2dadaf4a928b1476f66b400bda0c87b06155c0dd1c4b4a26bb2f37dc17a3676a2bbe9c1e71a5d8b27a171c797a86464b0bc0d13abfb2f99 tzdata2016d.tar.gz diff --git a/package/tzdata/tzdata.mk b/package/tzdata/tzdata.mk new file mode 100644 index 0000000000..f50a83c411 --- /dev/null +++ b/package/tzdata/tzdata.mk @@ -0,0 +1,66 @@ +################################################################################ +# +# tzdata +# +################################################################################ + +TZDATA_VERSION = 2016d +TZDATA_SOURCE = tzdata$(TZDATA_VERSION).tar.gz +TZDATA_SITE = http://www.iana.org/time-zones/repository/releases +TZDATA_STRIP_COMPONENTS = 0 +TZDATA_DEPENDENCIES = host-tzdata +HOST_TZDATA_DEPENDENCIES = host-zic +TZDATA_LICENSE = Public domain + +# Take care when re-ordering this list since this might break zone +# dependencies +TZDATA_DEFAULT_ZONELIST = \ + africa antarctica asia australasia europe northamerica \ + southamerica pacificnew etcetera backward systemv factory + +ifeq ($(call qstrip,$(BR2_TARGET_TZ_ZONELIST)),default) +TZDATA_ZONELIST = $(TZDATA_DEFAULT_ZONELIST) +else +TZDATA_ZONELIST = $(call qstrip,$(BR2_TARGET_TZ_ZONELIST)) +endif + +TZDATA_LOCALTIME = $(call qstrip,$(BR2_TARGET_LOCALTIME)) + +# No need to extract for target, we're using the host-installed files +TZDATA_EXTRACT_CMDS = + +define TZDATA_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/zoneinfo + cp -a $(HOST_DIR)/usr/share/zoneinfo/* $(TARGET_DIR)/usr/share/zoneinfo + cd $(TARGET_DIR)/usr/share/zoneinfo; \ + for zone in posix/*; do \ + ln -sfn "$${zone}" "$${zone##*/}"; \ + done + if [ -n "$(TZDATA_LOCALTIME)" ]; then \ + if [ ! -f $(TARGET_DIR)/usr/share/zoneinfo/$(TZDATA_LOCALTIME) ]; then \ + printf "Error: '%s' is not a valid timezone, check your BR2_TARGET_LOCALTIME setting\n" \ + "$(TZDATA_LOCALTIME)"; \ + exit 1; \ + fi; \ + cd $(TARGET_DIR)/etc; \ + ln -sf ../usr/share/zoneinfo/$(TZDATA_LOCALTIME) localtime; \ + echo "$(TZDATA_LOCALTIME)" >timezone; \ + fi +endef + +define HOST_TZDATA_BUILD_CMDS + (cd $(@D); \ + for zone in $(TZDATA_ZONELIST); do \ + $(ZIC) -d _output/posix -y yearistype.sh $$zone || exit 1; \ + $(ZIC) -d _output/right -L leapseconds -y yearistype.sh $$zone || exit 1; \ + done; \ + ) +endef + +define HOST_TZDATA_INSTALL_CMDS + $(INSTALL) -d -m 0755 $(HOST_DIR)/usr/share/zoneinfo + cp -a $(@D)/_output/* $(@D)/*.tab $(HOST_DIR)/usr/share/zoneinfo +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/tzdump/tzdump.mk b/package/tzdump/tzdump.mk new file mode 100644 index 0000000000..3f035a56cb --- /dev/null +++ b/package/tzdump/tzdump.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# tzdump +# +################################################################################ + +TZDUMP_VERSION = 65a10105564801094b18c3fcacf4dde4c44e4ab8 +TZDUMP_SITE = $(call github,alexandrebelloni,tzdump,$(TZDUMP_VERSION)) +HOST_TZDUMP_DEPENDENCIES = host-zic + +define HOST_TZDUMP_BUILD_CMDS + cd $(@D) && $(HOSTCC) $(HOST_CFLAGS) $(HOST_LDFLAGS) -o tzdump tzdump.c +endef + +define HOST_TZDUMP_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/tzdump $(HOST_DIR)/usr/sbin/tzdump +endef + +$(eval $(host-generic-package)) + +TZDUMP = $(HOST_DIR)/usr/sbin/tzdump diff --git a/package/uboot-tools/0001-drop-configh-from-tools.patch b/package/uboot-tools/0001-drop-configh-from-tools.patch new file mode 100644 index 0000000000..e77a301760 --- /dev/null +++ b/package/uboot-tools/0001-drop-configh-from-tools.patch @@ -0,0 +1,44 @@ +From 2e54434e4dd178773e8e11e48afc81299771f3e7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Tue, 4 Aug 2015 22:13:20 +0200 +Subject: [PATCH 1/1] drop configh from tools +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We need to build u-boot tools without a board configuration for the target. +fw_env just uses config.h to define the default environment of the created +image, so it really isn't mandatory. + +Signed-off-by: Gustavo Zacarias +[Jörg Krause: update for version 2015.07] +Signed-off-by: Jörg Krause +--- + tools/env/fw_env.h | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/tools/env/fw_env.h b/tools/env/fw_env.h +index 60c0517..1c5daaa 100644 +--- a/tools/env/fw_env.h ++++ b/tools/env/fw_env.h +@@ -5,17 +5,6 @@ + * SPDX-License-Identifier: GPL-2.0+ + */ + +-/* Pull in the current config to define the default environment */ +-#include +- +-#ifndef __ASSEMBLY__ +-#define __ASSEMBLY__ /* get only #defines from config.h */ +-#include +-#undef __ASSEMBLY__ +-#else +-#include +-#endif +- + /* + * To build the utility with the static configuration + * comment out the next line. +-- +2.5.0 + diff --git a/package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch b/package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch new file mode 100644 index 0000000000..fedf9beeb6 --- /dev/null +++ b/package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch @@ -0,0 +1,39 @@ +From 7d9bac7bf8d9ef39ab6b6e8d436e3dbdee5cd120 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sun, 1 Feb 2015 21:53:47 +0100 +Subject: [PATCH 1/1] tools only in no dot config targets +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Revert upstream commit c7ad5cbb1ef2c33883f0fa7d0455095004fd306d: + + Makefile: drop "tools-only" from no-dot-config-targets + +This indirectly pulls in a build-dependency on libssl-dev used for FIT +image support, and possibly GPL/OpenSSL licensing incompatibility +issues. + +Based on Debian patch from u-boot-tools: +http://ftp.de.debian.org/debian/pool/main/u/u-boot/u-boot_2014.10+dfsg1-2.1.debian.tar.xz + +Signed-off-by: Jörg Krause +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 36a9a28..f85c194 100644 +--- a/Makefile ++++ b/Makefile +@@ -417,7 +417,7 @@ timestamp_h := include/generated/timestamp_autogenerated.h + + no-dot-config-targets := clean clobber mrproper distclean \ + help %docs check% coccicheck \ +- ubootversion backup ++ ubootversion backup tools-only + + config-targets := 0 + mixed-targets := 0 +-- +2.3.0 diff --git a/package/uboot-tools/0003-tools-env-bug-config-structs-must-be-defined-in-tool.patch b/package/uboot-tools/0003-tools-env-bug-config-structs-must-be-defined-in-tool.patch new file mode 100644 index 0000000000..380e8cce3f --- /dev/null +++ b/package/uboot-tools/0003-tools-env-bug-config-structs-must-be-defined-in-tool.patch @@ -0,0 +1,58 @@ +From 43cb65b7a00e4759427a6e4b8a02039e43dab5a5 Mon Sep 17 00:00:00 2001 +From: Andreas Fenkart +Date: Fri, 25 Mar 2016 14:52:19 +0100 +Subject: [PATCH] tools: env: bug: config structs must be defined in tools + library +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +fw_senten/fw_printenv can be compiled as a tools library, excluding the +fw_env_main object. + +Fixes build error when linking with libubootenv: + fw_env.c:(.text+0x94): undefined reference to `common_args' + +Backported from: 43cb65b7a00e4759427a6e4b8a02039e43dab5a5 + +Reported-by: Stefano Babic +Signed-off-by: Andreas Fenkart +Signed-off-by: Jörg Krause +--- + tools/env/fw_env.c | 4 ++++ + tools/env/fw_env_main.c | 4 ---- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c +index 5c7505c..1420ac5 100644 +--- a/tools/env/fw_env.c ++++ b/tools/env/fw_env.c +@@ -35,6 +35,10 @@ + + #include "fw_env.h" + ++struct common_args common_args; ++struct printenv_args printenv_args; ++struct setenv_args setenv_args; ++ + #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) + + #define min(x, y) ({ \ +diff --git a/tools/env/fw_env_main.c b/tools/env/fw_env_main.c +index 3bec5b9..3706d8f 100644 +--- a/tools/env/fw_env_main.c ++++ b/tools/env/fw_env_main.c +@@ -49,10 +49,6 @@ static struct option long_options[] = { + {NULL, 0, NULL, 0} + }; + +-struct common_args common_args; +-struct printenv_args printenv_args; +-struct setenv_args setenv_args; +- + void usage_printenv(void) + { + +-- +2.8.2 + diff --git a/package/uboot-tools/Config.in b/package/uboot-tools/Config.in new file mode 100644 index 0000000000..aca310bfe3 --- /dev/null +++ b/package/uboot-tools/Config.in @@ -0,0 +1,62 @@ +config BR2_PACKAGE_UBOOT_TOOLS + bool "u-boot tools" + help + Companion tools for Das U-Boot bootloader. + + http://www.denx.de/wiki/U-Boot/WebHome + +if BR2_PACKAGE_UBOOT_TOOLS + +config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE + bool "mkimage" + help + The mkimage tool from Das U-Boot bootloader, which allows + generation of U-Boot images in various formats. + +if BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE + +config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE_FIT_SIGNATURE_SUPPORT + bool "FIT signature verification support" + select BR2_PACKAGE_OPENSSL + help + Enables support for FIT Signature Verification. + + Flat Image Trees (FIT) supports hashing of images so that + these hashes can be checked on loading. This protects + against corruption of the image. However it does not prevent + the substitution of one image for another. + + The signature feature allows the hash to be signed with a + private key such that it can be verified using a public key + later. Provided that the private key is kept secret and the + public key is stored in a non-volatile place, any image can + be verified in this way. + + Enabling this option pulls in a dependency on libssl and + libcrypto, and possibly GPL/OpenSSL licensing + incompatibility issues. + +endif + +config BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE + bool "mkenvimage" + help + The mkenvimage tool from Das U-Boot bootloader, which allows + generation of a valid binary environment image from a text file + describing the key=value pairs of the environment. + +config BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV + bool "fw_printenv" + default y + help + The fw_printenv / fw_setenv tools from Das U-Boot + bootloader, which allows access to the U-Boot environment + from Linux. + +config BR2_PACKAGE_UBOOT_TOOLS_DUMPIMAGE + bool "dumpimage" + help + The dumpimage tool from Das U-Boot bootloader, which allows + extraction of data from U-Boot images. + +endif diff --git a/package/uboot-tools/Config.in.host b/package/uboot-tools/Config.in.host new file mode 100644 index 0000000000..b5a42d9e67 --- /dev/null +++ b/package/uboot-tools/Config.in.host @@ -0,0 +1,26 @@ +config BR2_PACKAGE_HOST_UBOOT_TOOLS + bool "host u-boot tools" + help + Companion tools for Das U-Boot bootloader. + + http://www.denx.de/wiki/U-Boot/WebHome + +if BR2_PACKAGE_HOST_UBOOT_TOOLS + +config BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT + bool "FIT signature verification support" + help + Enables support for FIT Signature Verification. + + Flat Image Trees (FIT) supports hashing of images so that + these hashes can be checked on loading. This protects + against corruption of the image. However it does not prevent + the substitution of one image for another. + + The signature feature allows the hash to be signed with a + private key such that it can be verified using a public key + later. Provided that the private key is kept secret and the + public key is stored in a non-volatile place, any image can + be verified in this way. + +endif diff --git a/package/uboot-tools/uboot-tools.hash b/package/uboot-tools/uboot-tools.hash new file mode 100644 index 0000000000..747d133dfc --- /dev/null +++ b/package/uboot-tools/uboot-tools.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e49337262ecac44dbdeac140f2c6ebd1eba345e0162b0464172e7f05583ed7bb u-boot-2016.03.tar.bz2 diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk new file mode 100644 index 0000000000..d1ebd6feee --- /dev/null +++ b/package/uboot-tools/uboot-tools.mk @@ -0,0 +1,119 @@ +################################################################################ +# +# uboot-tools +# +################################################################################ + +UBOOT_TOOLS_VERSION = 2016.03 +UBOOT_TOOLS_SOURCE = u-boot-$(UBOOT_TOOLS_VERSION).tar.bz2 +UBOOT_TOOLS_SITE = ftp://ftp.denx.de/pub/u-boot +UBOOT_TOOLS_LICENSE = GPLv2+ +UBOOT_TOOLS_LICENSE_FILES = Licenses/gpl-2.0.txt +UBOOT_TOOLS_INSTALL_STAGING = YES + +define UBOOT_TOOLS_CONFIGURE_CMDS + mkdir -p $(@D)/include/config + touch $(@D)/include/config/auto.conf +endef + +define UBOOT_TOOLS_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + CROSS_BUILD_TOOLS=y \ + CONFIG_FIT_SIGNATURE=$(BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE_FIT_SIGNATURE_SUPPORT) \ + tools-only + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" \ + env no-dot-config-targets=env +endef + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE),y) +define UBOOT_TOOLS_INSTALL_MKIMAGE + $(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(TARGET_DIR)/usr/bin/mkimage +endef +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE_FIT_SIGNATURE_SUPPORT),y) +UBOOT_TOOLS_DEPENDENCIES += openssl host-pkgconf +endif # BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE_FIT_SIGNATURE_SUPPORT +endif # BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE),y) +define UBOOT_TOOLS_INSTALL_MKENVIMAGE + $(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(TARGET_DIR)/usr/bin/mkenvimage +endef +endif + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV),y) +define UBOOT_TOOLS_INSTALL_FWPRINTENV + $(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv $(TARGET_DIR)/usr/sbin/fw_printenv + ln -sf fw_printenv $(TARGET_DIR)/usr/sbin/fw_setenv +endef +endif + +ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_DUMPIMAGE),y) +define UBOOT_TOOLS_INSTALL_DUMPIMAGE + $(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(TARGET_DIR)/usr/sbin/dumpimage +endef +endif + +define UBOOT_TOOLS_INSTALL_LIBUBOOTENV +endef + +define UBOOT_TOOLS_INSTALL_STAGING_CMDS + $(INSTALL) -D -m 0755 $(@D)/tools/env/lib.a $(STAGING_DIR)/usr/lib/libubootenv.a + $(INSTALL) -D -m 0644 $(@D)/tools/env/fw_env.h $(STAGING_DIR)/usr/include/fw_env.h +endef + +define UBOOT_TOOLS_INSTALL_TARGET_CMDS + $(UBOOT_TOOLS_INSTALL_MKIMAGE) + $(UBOOT_TOOLS_INSTALL_MKENVIMAGE) + $(UBOOT_TOOLS_INSTALL_FWPRINTENV) + $(UBOOT_TOOLS_INSTALL_DUMPIMAGE) +endef + +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),y) +HOST_UBOOT_TOOLS_DEPENDENCIES += host-openssl +endif + +define HOST_UBOOT_TOOLS_CONFIGURE_CMDS + mkdir -p $(@D)/include/config + touch $(@D)/include/config/auto.conf +endef + +define HOST_UBOOT_TOOLS_BUILD_CMDS + $(MAKE1) -C $(@D) \ + CONFIG_FIT_SIGNATURE=$(BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE_FIT_SIGNATURE_SUPPORT) \ + HOSTCC="$(HOSTCC)" \ + HOSTCFLAGS="$(HOST_CFLAGS)" \ + HOSTLDFLAGS="$(HOST_LDFLAGS)" \ + tools-only +endef + +define HOST_UBOOT_TOOLS_INSTALL_CMDS + $(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/usr/bin/mkimage + $(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(HOST_DIR)/usr/bin/mkenvimage + $(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(HOST_DIR)/usr/bin/dumpimage +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) + +# Convenience variables for other mk files that make use of mkimage + +MKIMAGE = $(HOST_DIR)/usr/bin/mkimage + +# mkimage supports arm blackfin m68k microblaze mips mips64 nios2 powerpc ppc sh sparc sparc64 x86 +# KERNEL_ARCH can be arm64 arc arm blackfin m68k microblaze mips nios2 powerpc sh sparc i386 x86_64 xtensa +# For arm64, arc, xtensa we'll just keep KERNEL_ARCH +# For mips64, we'll just keep mips +# For i386 and x86_64, we need to convert +ifeq ($(KERNEL_ARCH),x86_64) +MKIMAGE_ARCH = x86 +else ifeq ($(KERNEL_ARCH),i386) +MKIMAGE_ARCH = x86 +else +MKIMAGE_ARCH = $(KERNEL_ARCH) +endif diff --git a/package/ubus/0001-Install-server-and-client-examples.patch b/package/ubus/0001-Install-server-and-client-examples.patch new file mode 100644 index 0000000000..0ee4d3e64f --- /dev/null +++ b/package/ubus/0001-Install-server-and-client-examples.patch @@ -0,0 +1,23 @@ +Install server and client examples + +Signed-off-by: Sergio Prado +--- + examples/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt +index 0279f6e66b50..2f8f4e026e20 100644 +--- a/examples/CMakeLists.txt ++++ b/examples/CMakeLists.txt +@@ -9,4 +9,8 @@ IF (BUILD_EXAMPLES) + + ADD_EXECUTABLE(client client.c count.c) + TARGET_LINK_LIBRARIES(client ubus ubox) ++ ++ INSTALL(TARGETS server client ++ RUNTIME DESTINATION sbin ++ ) + ENDIF() +-- +1.9.1 + diff --git a/package/ubus/Config.in b/package/ubus/Config.in new file mode 100644 index 0000000000..c14f6a86e7 --- /dev/null +++ b/package/ubus/Config.in @@ -0,0 +1,30 @@ +comment "ubus needs a toolchain w/ dynamic library" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_UBUS + bool "ubus" + select BR2_PACKAGE_LIBUBOX + select BR2_PACKAGE_JSON_C + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c + depends on !BR2_STATIC_LIBS # libubox + help + IPC/RPC bus that allows communication between processes. + + It consists of few parts including a daemon (ubusd), a library + (libubus) and a command line interface (ubus). Although created + for the OpenWRT project, it can be used as a general IPC/RPC + mechanism in other projects. + + * Select BR2_PACKAGE_LUA_5_1 if you want to have Lua support. + + https://wiki.openwrt.org/doc/techref/ubus + +if BR2_PACKAGE_UBUS + +config BR2_PACKAGE_UBUS_EXAMPLES + bool "build and install ubus examples" + help + Build and install client and server ubus examples. + +endif diff --git a/package/ubus/ubus.hash b/package/ubus/ubus.hash new file mode 100644 index 0000000000..af9b652b0e --- /dev/null +++ b/package/ubus/ubus.hash @@ -0,0 +1,2 @@ +# No hash for this git snapshot +none xxx ubus-259450f414d8c9ee41896e8e6d6bc57ec00e2b63.tar.gz diff --git a/package/ubus/ubus.mk b/package/ubus/ubus.mk new file mode 100644 index 0000000000..cd66b868df --- /dev/null +++ b/package/ubus/ubus.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# ubus +# +################################################################################ + +UBUS_VERSION = 259450f414d8c9ee41896e8e6d6bc57ec00e2b63 +UBUS_SITE = git://git.openwrt.org/project/ubus.git + +UBUS_LICENSE = LGPLv2.1 +UBUS_LICENSE_FILES = ubusd_acl.h + +UBUS_INSTALL_STAGING = YES + +UBUS_DEPENDENCIES = json-c libubox + +# package only compiles with Lua 5.1 +ifeq ($(BR2_PACKAGE_LUA_5_1),y) +UBUS_DEPENDENCIES += lua +UBUS_CONF_OPTS += -DBUILD_LUA=ON \ + -DLUA_CFLAGS=-I$(STAGING_DIR)/usr/include \ + -DLUAPATH=/usr/lib/lua/$(LUAINTERPRETER_ABIVER) +else +UBUS_CONF_OPTS += -DBUILD_LUA=OFF +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +UBUS_DEPENDENCIES += systemd +UBUS_CONF_OPTS += -DENABLE_SYSTEMD=ON +else +UBUS_CONF_OPTS += -DENABLE_SYSTEMD=OFF +endif + +ifeq ($(BR2_PACKAGE_UBUS_EXAMPLES),y) +UBUS_CONF_OPTS += -DBUILD_EXAMPLES=ON +else +UBUS_CONF_OPTS += -DBUILD_EXAMPLES=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/ucl/ucl.hash b/package/ucl/ucl.hash new file mode 100644 index 0000000000..6b1f41ed10 --- /dev/null +++ b/package/ucl/ucl.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 b865299ffd45d73412293369c9754b07637680e5c826915f097577cd27350348 ucl-1.03.tar.gz diff --git a/package/ucl/ucl.mk b/package/ucl/ucl.mk new file mode 100644 index 0000000000..2654a5a7ca --- /dev/null +++ b/package/ucl/ucl.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# ucl +# +################################################################################ + +UCL_VERSION = 1.03 +UCL_SITE = http://www.oberhumer.com/opensource/ucl/download +UCL_LICENSE = GPLv2+ +UCL_LICENSE_FILES = COPYING + +$(eval $(host-autotools-package)) diff --git a/package/uclibc/Config.in b/package/uclibc/Config.in new file mode 100644 index 0000000000..efa84e9e85 --- /dev/null +++ b/package/uclibc/Config.in @@ -0,0 +1,188 @@ +if BR2_TOOLCHAIN_BUILDROOT_UCLIBC + +config BR2_PACKAGE_UCLIBC + bool + default y + select BR2_PACKAGE_LINUX_HEADERS + +comment "uClibc Options" + +config BR2_UCLIBC_CONFIG + string "uClibc configuration file to use?" + default "package/uclibc/uClibc-ng.config" + help + Some people may wish to use their own modified uClibc configuration + file and will specify their config file location with this option. + See also docs/README in this package. + If unsure, use the default. + +config BR2_UCLIBC_CONFIG_FRAGMENT_FILES + string "Additional uClibc configuration fragment files" + help + A space-separated list of configuration fragment files, + that will be merged to the main uClibc configuration file. + +config BR2_TOOLCHAIN_BUILDROOT_INET_RPC + bool "Enable RPC support" + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + Enable this option if you want your toolchain to support + RPC (needed for NFS, for example). + +config BR2_TOOLCHAIN_BUILDROOT_WCHAR + bool "Enable WCHAR support" + select BR2_USE_WCHAR + help + Enable this option if you want your toolchain to support + wide characters (i.e characters longer than 8 bits, needed + for locale support). + +config BR2_TOOLCHAIN_BUILDROOT_LOCALE + bool "Enable toolchain locale/i18n support" + select BR2_TOOLCHAIN_BUILDROOT_WCHAR + select BR2_ENABLE_LOCALE + help + Enable this option if you want your toolchain to support + localization and internationalization. + +choice + prompt "Thread library implementation" + default BR2_PTHREADS_NATIVE + default BR2_PTHREADS_OLD if !BR2_USE_MMU + help + Use this option to select the thread library implementation + that should be used in your toolchain. + + config BR2_PTHREADS_NONE + bool "none" + + config BR2_PTHREADS + bool "linuxthreads" + select BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_m68k + + config BR2_PTHREADS_OLD + bool "linuxthreads (stable/old)" + select BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_m68k || BR2_arm || BR2_armeb || BR2_xtensa + + config BR2_PTHREADS_NATIVE + bool "Native POSIX Threading (NPTL)" + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_USE_MMU + depends on !BR2_m68k +endchoice + +config BR2_PTHREAD_DEBUG + bool "Thread library debugging" + depends on BR2_PTHREADS || BR2_PTHREADS_OLD || BR2_PTHREADS_NATIVE + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + help + Build the thread library with debugging enabled. + +config BR2_TOOLCHAIN_BUILDROOT_USE_SSP + bool "Enable stack protection support" + select BR2_TOOLCHAIN_HAS_SSP + help + Enable stack smashing protection support using GCCs + -fstack-protector-all option in uClibc. + + See http://www.linuxfromscratch.org/hints/downloads/files/ssp.txt + for details. + +config BR2_UCLIBC_INSTALL_UTILS + bool "Compile and install uClibc utilities" + default y + help + Enabling this option will compile and install the getconf, + ldconfig and ldd uClibc utilities for the target. + + You can save ~32 KiB in target space by disabling them since + they're normally not needed. + +config BR2_UCLIBC_INSTALL_TEST_SUITE + bool "Compile and install uClibc tests" + select BR2_PACKAGE_MAKE + depends on BR2_USE_MMU # make + help + Enabling this option will compile and install the uClibc test suite. + This is useful if you want to check if the uClibc library is working + for your architecture and/or help developing uClibc. + + The test suite will be installed into /root/uClibc directory. To run + the test suite enter the /root/uClibc/test directory and type + "make UCLIBC_ONLY=1 CC=/bin/true check". + + See the /root/uClibc/test/README for additional information. + + This is not needed at all for normal builds, so you can safely say no + if you do not plan to dig into your C library. + +# Mapping from the Buildroot architecture configuration options to the +# uClibc architecture names. +config BR2_UCLIBC_TARGET_ARCH + string + default "arc" if BR2_arcle || BR2_arceb + default "arm" if BR2_arm || BR2_armeb + default "m68k" if BR2_m68k + default "mips" if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + default "powerpc" if BR2_powerpc + default "sh" if BR2_sh + default "sparc" if BR2_sparc + default "xtensa" if BR2_xtensa + default "i386" if BR2_i386 + default "x86_64" if BR2_x86_64 + +config BR2_UCLIBC_ARC_TYPE + string + depends on BR2_UCLIBC_TARGET_ARCH = "arc" + default "ARC_CPU_700" if BR2_arc750d + default "ARC_CPU_700" if BR2_arc770d + default "ARC_CPU_HS" if BR2_archs38 + +config BR2_UCLIBC_MIPS_ABI + string + depends on BR2_UCLIBC_TARGET_ARCH = "mips" + default "O32" if BR2_MIPS_OABI32 + default "N32" if BR2_MIPS_NABI32 + default "N64" if BR2_MIPS_NABI64 + +config BR2_UCLIBC_MIPS_ISA + string + depends on BR2_UCLIBC_TARGET_ARCH = "mips" + default "MIPS32" if BR2_mips_32 + default "MIPS32R2" if BR2_mips_32r2 + default "MIPS64" if BR2_mips_64 + +config BR2_UCLIBC_SH_TYPE + string + depends on BR2_UCLIBC_TARGET_ARCH = "sh" + default "SH2A" if BR2_sh2a + default "SH4" if BR2_sh4 || BR2_sh4eb + +config BR2_UCLIBC_SPARC_TYPE + string + depends on BR2_UCLIBC_TARGET_ARCH = "sparc" + default "V7" if BR2_sparc_v7 || BR2_sparc_sparchfleon || BR2_sparc_sparcsfleon + default "V8" if BR2_sparc_v8 || BR2_sparc_sparchfleonv8 || BR2_sparc_sparcsfleonv8 + +config BR2_UCLIBC_POWERPC_TYPE + string + depends on BR2_UCLIBC_TARGET_ARCH = "powerpc" + default "CLASSIC" if !BR2_powerpc_8540 && !BR2_powerpc_8548 + default "E500" if BR2_powerpc_8540 || BR2_powerpc_8548 + +config BR2_UCLIBC_X86_TYPE + string + depends on BR2_UCLIBC_TARGET_ARCH = "i386" + default "486" if BR2_x86_i486 + default "586" if BR2_x86_i586 + default "586MMX" if BR2_x86_pentium_mmx + default "686" if BR2_x86_i686 || BR2_x86_pentiumpro + default "PENTIUMII" if BR2_x86_pentium2 + default "PENTIUMIII" if BR2_x86_pentium3 + default "PENTIUM4" if BR2_x86_pentium4 || BR2_x86_pentium_m || \ + BR2_x86_nocona || BR2_x86_core2 || BR2_x86_corei7 + +endif # BR2_TOOLCHAIN_BUILDROOT_UCLIBC diff --git a/package/uclibc/uClibc-ng.config b/package/uclibc/uClibc-ng.config new file mode 100644 index 0000000000..2671e06777 --- /dev/null +++ b/package/uclibc/uClibc-ng.config @@ -0,0 +1,44 @@ +DO_C99_MATH=y +DO_XSI_MATH=y +KERNEL_HEADERS="/usr/src/linux/include" +# LDSO_CACHE_SUPPORT is not set +# UCLIBC_STATIC_LDCONFIG is not set +LDSO_RUNPATH=y +LDSO_RUNPATH_OF_EXECUTABLE=y +MALLOC_GLIBC_COMPAT=y +UCLIBC_HAS_OBSTACK=y +UCLIBC_HAS_UTMPX=y +UCLIBC_HAS_UTMP=y +UCLIBC_SUSV2_LEGACY=y +UCLIBC_SUSV3_LEGACY=y +UCLIBC_HAS_CONTEXT_FUNCS=y +UCLIBC_SUSV4_LEGACY=y +UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y +UCLIBC_HAS_GETPT=y +UCLIBC_HAS_LIBUTIL=y +UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y +UCLIBC_HAS_SHA256_CRYPT_IMPL=y +UCLIBC_HAS_SHA512_CRYPT_IMPL=y +UCLIBC_USE_NETLINK=y +UCLIBC_SUPPORT_AI_ADDRCONFIG=y +UCLIBC_HAS_RESOLVER_SUPPORT=y +UCLIBC_HAS_LIBRESOLV_STUB=y +UCLIBC_HAS_LIBNSL_STUB=y +UCLIBC_HAS_CTYPE_CHECKED=y +UCLIBC_HAS_HEXADECIMAL_FLOATS=y +UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y +UCLIBC_HAS_STDIO_GETC_MACRO=y +UCLIBC_HAS_STDIO_PUTC_MACRO=y +UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y +UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y +UCLIBC_HAS_PRINTF_M_SPEC=y +# UCLIBC_HAS_REGEX_OLD is not set +# UCLIBC_HAS_FNMATCH_OLD is not set +UCLIBC_HAS_NFTW=y +UCLIBC_HAS_FTW=y +UCLIBC_HAS_GNU_GLOB=y +RUNTIME_PREFIX="/" +DEVEL_PREFIX="/usr/" +UCLIBC_HAS_SSP=y +UCLIBC_BUILD_NOW=y +# DOSTRIP is not set diff --git a/package/uclibc/uclibc.hash b/package/uclibc/uclibc.hash new file mode 100644 index 0000000000..eccce34951 --- /dev/null +++ b/package/uclibc/uclibc.hash @@ -0,0 +1,2 @@ +# From http://www.uclibc-ng.org/ +sha256 3c63d9f8c8b98b65fa5c4040d1c8ab1b36e99a16e1093810cedad51ac15c9a9e uClibc-ng-1.0.14.tar.xz diff --git a/package/uclibc/uclibc.mk b/package/uclibc/uclibc.mk new file mode 100644 index 0000000000..b8ccee2cc8 --- /dev/null +++ b/package/uclibc/uclibc.mk @@ -0,0 +1,488 @@ +################################################################################ +# +# uclibc +# +################################################################################ + +UCLIBC_VERSION = 1.0.14 +UCLIBC_SOURCE = uClibc-ng-$(UCLIBC_VERSION).tar.xz +UCLIBC_SITE = http://downloads.uclibc-ng.org/releases/$(UCLIBC_VERSION) +UCLIBC_LICENSE = LGPLv2.1+ +UCLIBC_LICENSE_FILES = COPYING.LIB +UCLIBC_INSTALL_STAGING = YES + +# uclibc is part of the toolchain so disable the toolchain dependency +UCLIBC_ADD_TOOLCHAIN_DEPENDENCY = NO + +# Before uClibc is configured, we must have the first stage +# cross-compiler and the kernel headers +UCLIBC_DEPENDENCIES = host-gcc-initial linux-headers + +# specifying UCLIBC_CONFIG_FILE on the command-line overrides the .config +# setting. +ifndef UCLIBC_CONFIG_FILE +UCLIBC_CONFIG_FILE = $(call qstrip,$(BR2_UCLIBC_CONFIG)) +endif + +UCLIBC_KCONFIG_FILE = $(UCLIBC_CONFIG_FILE) +UCLIBC_KCONFIG_FRAGMENT_FILES = $(call qstrip,$(BR2_UCLIBC_CONFIG_FRAGMENT_FILES)) + +UCLIBC_KCONFIG_OPTS = \ + $(UCLIBC_MAKE_FLAGS) \ + PREFIX=$(STAGING_DIR) \ + DEVEL_PREFIX=/usr/ \ + RUNTIME_PREFIX=$(STAGING_DIR)/ \ + +UCLIBC_TARGET_ARCH = $(call qstrip,$(BR2_UCLIBC_TARGET_ARCH)) + +UCLIBC_GENERATE_LOCALES = $(call qstrip,$(BR2_GENERATE_LOCALE)) + +ifeq ($(UCLIBC_GENERATE_LOCALES),) +# We need at least one locale +UCLIBC_LOCALES = en_US +else +# Strip out the encoding part of locale names, if any +UCLIBC_LOCALES = \ + $(foreach locale,$(UCLIBC_GENERATE_LOCALES),\ + $(firstword $(subst .,$(space),$(locale)))) +endif + +# +# ARC definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),arc) +UCLIBC_ARC_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_ARC_TYPE)) +define UCLIBC_ARC_TYPE_CONFIG + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_ARC_TYPE),$(@D)/.config) +endef + +UCLIBC_ARC_PAGE_SIZE = CONFIG_ARC_PAGE_SIZE_$(call qstrip,$(BR2_ARC_PAGE_SIZE)) +define UCLIBC_ARC_PAGE_SIZE_CONFIG + $(SED) '/CONFIG_ARC_PAGE_SIZE_*/d' $(@D)/.config + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_ARC_PAGE_SIZE),$(@D)/.config) +endef + +endif # arc + +# +# ARM definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),arm) +define UCLIBC_ARM_ABI_CONFIG + $(SED) '/CONFIG_ARM_.ABI/d' $(@D)/.config + $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_EABI,$(@D)/.config) +endef + +# Thumb1 build is broken with threads with old gcc versions (4.7 and +# 4.8). Since all cores supporting Thumb1 also support ARM, we use ARM +# code in this case. +ifeq ($(BR2_GCC_VERSION_4_7_X)$(BR2_GCC_VERSION_4_8_X):$(BR2_ARM_INSTRUCTIONS_THUMB)$(BR2_TOOLCHAIN_HAS_THREADS),y:yy) +UCLIBC_EXTRA_CFLAGS += -marm +endif + +ifeq ($(BR2_BINFMT_FLAT),y) +define UCLIBC_ARM_BINFMT_FLAT + $(call KCONFIG_DISABLE_OPT,DOPIC,$(@D)/.config) +endef +endif + +# context functions are written with ARM instructions. Therefore, if +# we are using a Thumb2-only platform (i.e, Cortex-M), they must be +# disabled. Thumb1 platforms are not a problem, since they all also +# support the ARM instructions. +ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB2):$(BR2_ARM_CPU_HAS_ARM),y:) +define UCLIBC_ARM_NO_CONTEXT_FUNCS + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_CONTEXT_FUNCS,$(@D)/.config) +endef +endif + +endif # arm + +# +# m68k/coldfire definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),m68k) + +# disable DOPIC for flat without separate data +ifeq ($(BR2_BINFMT_FLAT_ONE),y) +define UCLIBC_M68K_BINFMT_FLAT + $(call KCONFIG_DISABLE_OPT,DOPIC,$(@D)/.config) +endef +endif + +endif # m68k/coldfire + +# +# MIPS definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),mips) +UCLIBC_MIPS_ABI = CONFIG_MIPS_$(call qstrip,$(BR2_UCLIBC_MIPS_ABI))_ABI +define UCLIBC_MIPS_ABI_CONFIG + $(SED) '/CONFIG_MIPS_[NO].._ABI/d' $(@D)/.config + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_ABI),$(@D)/.config) +endef + +UCLIBC_MIPS_ISA = CONFIG_MIPS_ISA_$(call qstrip,$(BR2_UCLIBC_MIPS_ISA)) +define UCLIBC_MIPS_ISA_CONFIG + $(SED) '/CONFIG_MIPS_ISA_.*/d' $(@D)/.config + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_MIPS_ISA),$(@D)/.config) +endef +endif # mips + +# +# SH definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),sh) +UCLIBC_SH_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_SH_TYPE)) +define UCLIBC_SH_TYPE_CONFIG + $(SED) '/CONFIG_SH[234A]*/d' $(@D)/.config + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_SH_TYPE),$(@D)/.config) +endef +endif # sh + +# +# SPARC definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),sparc) +UCLIBC_SPARC_TYPE = CONFIG_SPARC_$(call qstrip,$(BR2_UCLIBC_SPARC_TYPE)) +define UCLIBC_SPARC_TYPE_CONFIG + $(SED) 's/^\(CONFIG_[^_]*[_]*SPARC[^=]*\)=.*/# \1 is not set/g' \ + $(@D)/.config + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_SPARC_TYPE),$(@D)/.config) +endef +endif # sparc + +# +# PowerPC definitions +# + +ifeq ($(UCLIBC_TARGET_ARCH),powerpc) +UCLIBC_POWERPC_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_POWERPC_TYPE)) +define UCLIBC_POWERPC_TYPE_CONFIG + $(call KCONFIG_DISABLE_OPT,CONFIG_GENERIC,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,CONFIG_E500,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_POWERPC_TYPE),$(@D)/.config) +endef +endif # powerpc + +# +# x86 definitions +# +ifeq ($(UCLIBC_TARGET_ARCH),i386) +UCLIBC_X86_TYPE = CONFIG_$(call qstrip,$(BR2_UCLIBC_X86_TYPE)) +define UCLIBC_X86_TYPE_CONFIG + $(call KCONFIG_ENABLE_OPT,$(UCLIBC_X86_TYPE),$(@D)/.config) +endef +endif + +# +# Endianness +# + +ifeq ($(call qstrip,$(BR2_ENDIAN)),BIG) +define UCLIBC_ENDIAN_CONFIG + $(call KCONFIG_ENABLE_OPT,ARCH_BIG_ENDIAN,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,ARCH_WANTS_BIG_ENDIAN,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,ARCH_LITTLE_ENDIAN,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,ARCH_WANTS_LITTLE_ENDIAN,$(@D)/.config) +endef +else +define UCLIBC_ENDIAN_CONFIG + $(call KCONFIG_ENABLE_OPT,ARCH_LITTLE_ENDIAN,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,ARCH_WANTS_LITTLE_ENDIAN,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,ARCH_BIG_ENDIAN,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,ARCH_WANTS_BIG_ENDIAN,$(@D)/.config) +endef +endif + +# +# Largefile +# + +define UCLIBC_LARGEFILE_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LFS,$(@D)/.config) +endef + +# +# MMU +# + +ifeq ($(BR2_USE_MMU),y) +define UCLIBC_MMU_CONFIG + $(call KCONFIG_ENABLE_OPT,ARCH_USE_MMU,$(@D)/.config) +endef +else +define UCLIBC_MMU_CONFIG + $(call KCONFIG_DISABLE_OPT,ARCH_USE_MMU,$(@D)/.config) +endef +endif + +# +# IPv6 +# + +UCLIBC_IPV6_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_IPV6,$(@D)/.config) + +# +# RPC +# + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_INET_RPC),y) +define UCLIBC_RPC_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_RPC,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FULL_RPC,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_REENTRANT_RPC,$(@D)/.config) +endef +else +define UCLIBC_RPC_CONFIG + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_RPC,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_FULL_RPC,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_REENTRANT_RPC,$(@D)/.config) +endef +endif + +# +# soft-float +# + +ifeq ($(BR2_SOFT_FLOAT),y) +define UCLIBC_FLOAT_CONFIG + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_FPU,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,DO_C99_MATH,$(@D)/.config) +endef +else +define UCLIBC_FLOAT_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FPU,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_FLOATS,$(@D)/.config) +endef +endif + +# +# SSP +# +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_USE_SSP),y) +define UCLIBC_SSP_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_SSP,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_SSP,$(@D)/.config) +endef +else +define UCLIBC_SSP_CONFIG + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_SSP,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_SSP,$(@D)/.config) +endef +endif + +# +# Threads +# +ifeq ($(BR2_PTHREADS_NONE),y) +define UCLIBC_THREAD_CONFIG + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,LINUXTHREADS,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,LINUXTHREADS_OLD,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config) +endef +else ifeq ($(BR2_PTHREADS),y) +define UCLIBC_THREAD_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,LINUXTHREADS_NEW,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,LINUXTHREADS_OLD,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config) +endef +else ifeq ($(BR2_PTHREADS_OLD),y) +define UCLIBC_THREAD_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,LINUXTHREADS_NEW,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,LINUXTHREADS_OLD,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config) +endef +else ifeq ($(BR2_PTHREADS_NATIVE),y) +define UCLIBC_THREAD_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,LINUXTHREADS_NEW,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,LINUXTHREADS_OLD,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_THREADS_NATIVE,$(@D)/.config) +endef +endif + +# +# Thread debug +# + +ifeq ($(BR2_PTHREAD_DEBUG),y) +UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_ENABLE_OPT,PTHREADS_DEBUG_SUPPORT,$(@D)/.config) +else +UCLIBC_THREAD_DEBUG_CONFIG = $(call KCONFIG_DISABLE_OPT,PTHREADS_DEBUG_SUPPORT,$(@D)/.config) +endif + +# +# Locale +# + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_LOCALE),y) +define UCLIBC_LOCALE_CONFIG + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_LOCALE,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,UCLIBC_BUILD_ALL_LOCALE,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,UCLIBC_BUILD_MINIMAL_LOCALE,$(@D)/.config) + $(call KCONFIG_SET_OPT,UCLIBC_BUILD_MINIMAL_LOCALES,"$(UCLIBC_LOCALES)",$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,UCLIBC_PREGENERATED_LOCALE_DATA,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,DOWNLOAD_PREGENERATED_LOCALE_DATA,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_XLOCALE,$(@D)/.config) + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_GLIBC_DIGIT_GROUPING,$(@D)/.config) +endef +else +define UCLIBC_LOCALE_CONFIG + $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_LOCALE,$(@D)/.config) +endef +endif + +# +# wchar +# + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT_WCHAR),y) +UCLIBC_WCHAR_CONFIG = $(call KCONFIG_ENABLE_OPT,UCLIBC_HAS_WCHAR,$(@D)/.config) +else +UCLIBC_WCHAR_CONFIG = $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_WCHAR,$(@D)/.config) +endif + +# +# static/shared libs +# + +ifeq ($(BR2_STATIC_LIBS),y) +UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_DISABLE_OPT,HAVE_SHARED,$(@D)/.config) +else +UCLIBC_SHARED_LIBS_CONFIG = $(call KCONFIG_ENABLE_OPT,HAVE_SHARED,$(@D)/.config) +endif + +# +# Commands +# + +UCLIBC_MAKE_FLAGS = \ + ARCH="$(UCLIBC_TARGET_ARCH)" \ + CROSS_COMPILE="$(TARGET_CROSS)" \ + UCLIBC_EXTRA_CFLAGS="$(UCLIBC_EXTRA_CFLAGS) $(TARGET_ABI)" \ + HOSTCC="$(HOSTCC)" + +define UCLIBC_KCONFIG_FIXUP_CMDS + $(call KCONFIG_SET_OPT,CROSS_COMPILER_PREFIX,"$(TARGET_CROSS)",$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,TARGET_$(UCLIBC_TARGET_ARCH),$(@D)/.config) + $(call KCONFIG_SET_OPT,TARGET_ARCH,"$(UCLIBC_TARGET_ARCH)",$(@D)/.config) + $(call KCONFIG_SET_OPT,KERNEL_HEADERS,"$(LINUX_HEADERS_DIR)/usr/include",$(@D)/.config) + $(call KCONFIG_SET_OPT,RUNTIME_PREFIX,"/",$(@D)/.config) + $(call KCONFIG_SET_OPT,DEVEL_PREFIX,"/usr",$(@D)/.config) + $(call KCONFIG_SET_OPT,SHARED_LIB_LOADER_PREFIX,"/lib",$(@D)/.config) + $(UCLIBC_MMU_CONFIG) + $(UCLIBC_ARC_TYPE_CONFIG) + $(UCLIBC_ARC_PAGE_SIZE_CONFIG) + $(UCLIBC_ARM_ABI_CONFIG) + $(UCLIBC_ARM_BINFMT_FLAT) + $(UCLIBC_ARM_NO_CONTEXT_FUNCS) + $(UCLIBC_M68K_BINFMT_FLAT) + $(UCLIBC_MIPS_ABI_CONFIG) + $(UCLIBC_MIPS_ISA_CONFIG) + $(UCLIBC_SH_TYPE_CONFIG) + $(UCLIBC_SPARC_TYPE_CONFIG) + $(UCLIBC_POWERPC_TYPE_CONFIG) + $(UCLIBC_X86_TYPE_CONFIG) + $(UCLIBC_ENDIAN_CONFIG) + $(UCLIBC_LARGEFILE_CONFIG) + $(UCLIBC_IPV6_CONFIG) + $(UCLIBC_RPC_CONFIG) + $(UCLIBC_FLOAT_CONFIG) + $(UCLIBC_SSP_CONFIG) + $(UCLIBC_THREAD_CONFIG) + $(UCLIBC_THREAD_DEBUG_CONFIG) + $(UCLIBC_LOCALE_CONFIG) + $(UCLIBC_WCHAR_CONFIG) + $(UCLIBC_SHARED_LIBS_CONFIG) +endef + +ifeq ($(BR2_UCLIBC_INSTALL_TEST_SUITE),y) +define UCLIBC_BUILD_TEST_SUITE + $(MAKE1) -C $(@D) \ + $(UCLIBC_MAKE_FLAGS) \ + TEST_INSTALLED_UCLIBC=1 \ + UCLIBC_ONLY=1 \ + test_compile +endef +endif + +define UCLIBC_BUILD_CMDS + $(MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS) headers + $(MAKE) -C $(@D) $(UCLIBC_MAKE_FLAGS) + $(MAKE) -C $(@D)/utils \ + PREFIX=$(HOST_DIR) \ + HOSTCC="$(HOSTCC)" hostutils +endef + +ifeq ($(BR2_UCLIBC_INSTALL_TEST_SUITE),y) +define UCLIBC_INSTALL_TEST_SUITE + mkdir -p $(TARGET_DIR)/root/uClibc + cp -rdpf $(@D)/test $(TARGET_DIR)/root/uClibc + $(INSTALL) -D -m 0644 $(@D)/Rules.mak $(TARGET_DIR)/root/uClibc/Rules.mak + $(INSTALL) -D -m 0644 $(@D)/.config $(TARGET_DIR)/root/uClibc/.config +endef +endif + +ifeq ($(BR2_UCLIBC_INSTALL_UTILS),y) +define UCLIBC_INSTALL_UTILS_TARGET + $(MAKE1) -C $(@D) \ + CC="$(TARGET_CC)" CPP="$(TARGET_CPP)" LD="$(TARGET_LD)" \ + ARCH="$(UCLIBC_TARGET_ARCH)" \ + PREFIX=$(TARGET_DIR) \ + utils install_utils +endef +endif + +define UCLIBC_INSTALL_TARGET_CMDS + $(MAKE1) -C $(@D) \ + $(UCLIBC_MAKE_FLAGS) \ + PREFIX=$(TARGET_DIR) \ + DEVEL_PREFIX=/usr/ \ + RUNTIME_PREFIX=/ \ + install_runtime + $(UCLIBC_INSTALL_UTILS_TARGET) + $(UCLIBC_BUILD_TEST_SUITE) + $(UCLIBC_INSTALL_TEST_SUITE) + $(UCLIBC_INSTALL_LDSO_SYMLINKS) +endef + +# STATIC has no ld* tools, only getconf +ifeq ($(BR2_STATIC_LIBS),) +define UCLIBC_INSTALL_UTILS_STAGING + $(INSTALL) -D -m 0755 $(@D)/utils/ldd.host $(HOST_DIR)/usr/bin/ldd + ln -sf ldd $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldd + $(INSTALL) -D -m 0755 $(@D)/utils/ldconfig.host $(HOST_DIR)/usr/bin/ldconfig + ln -sf ldconfig $(HOST_DIR)/usr/bin/$(GNU_TARGET_NAME)-ldconfig +endef +endif + +define UCLIBC_INSTALL_STAGING_CMDS + $(MAKE1) -C $(@D) \ + $(UCLIBC_MAKE_FLAGS) \ + PREFIX=$(STAGING_DIR) \ + DEVEL_PREFIX=/usr/ \ + RUNTIME_PREFIX=/ \ + install_runtime install_dev + $(UCLIBC_INSTALL_UTILS_STAGING) +endef + +# Checks to give errors that the user can understand +# Must be before we call to kconfig-package +ifeq ($(BR2_PACKAGE_UCLIBC)$(BR_BUILDING),yy) +ifeq ($(call qstrip,$(BR2_UCLIBC_CONFIG)),) +$(error No uClibc configuration file specified, check your BR2_UCLIBC_CONFIG setting) +endif +endif + +$(eval $(kconfig-package)) diff --git a/package/udev/Config.in b/package/udev/Config.in new file mode 100644 index 0000000000..941a5152ff --- /dev/null +++ b/package/udev/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_HAS_UDEV + bool + +config BR2_PACKAGE_PROVIDES_UDEV + depends on BR2_PACKAGE_HAS_UDEV + string diff --git a/package/udev/udev.mk b/package/udev/udev.mk new file mode 100644 index 0000000000..cc4a6e3a26 --- /dev/null +++ b/package/udev/udev.mk @@ -0,0 +1,7 @@ +################################################################################ +# +# udev +# +################################################################################ + +$(eval $(virtual-package)) diff --git a/package/udisks/0001-fix-build-with-newer-glibc-versions.patch b/package/udisks/0001-fix-build-with-newer-glibc-versions.patch new file mode 100644 index 0000000000..336fc440a6 --- /dev/null +++ b/package/udisks/0001-fix-build-with-newer-glibc-versions.patch @@ -0,0 +1,29 @@ +Fix build with newer glibc versions + +This patch has been backported from upstream: + +http://cgit.freedesktop.org/udisks/commit/?h=udisks1&id=9829152b12a8924d2e091a00133ed1a3a7ba75c0 + +Signed-off-by: Vicente Olivert Riera + +From 9829152b12a8924d2e091a00133ed1a3a7ba75c0 Mon Sep 17 00:00:00 2001 +From: Alexandre Rostovtsev +Date: Fri, 29 May 2015 21:09:39 -0400 +Subject: fix build with newer glibc versions + +https://bugs.freedesktop.org/show_bug.cgi?id=90778 + +diff --git a/src/helpers/job-drive-detach.c b/src/helpers/job-drive-detach.c +index eeafcab..d122a1f 100644 +--- a/src/helpers/job-drive-detach.c ++++ b/src/helpers/job-drive-detach.c +@@ -18,6 +18,7 @@ + * + */ + ++#include + #include + #include + #include +-- +cgit v0.10.2 diff --git a/package/udisks/Config.in b/package/udisks/Config.in new file mode 100644 index 0000000000..8b8fd2880e --- /dev/null +++ b/package/udisks/Config.in @@ -0,0 +1,45 @@ +config BR2_PACKAGE_UDISKS + bool "udisks" + depends on BR2_PACKAGE_HAS_UDEV + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus-glib -> glib2 + depends on BR2_USE_MMU # lvm2 + depends on !BR2_STATIC_LIBS # lvm2 + select BR2_PACKAGE_DBUS + select BR2_PACKAGE_DBUS_GLIB + depends on BR2_USE_WCHAR # dbus-glib -> glib2 + select BR2_PACKAGE_SG3_UTILS + select BR2_PACKAGE_POLKIT + select BR2_PACKAGE_PARTED + select BR2_PACKAGE_LVM2 + select BR2_PACKAGE_LIBATASMART + select BR2_PACKAGE_LIBGUDEV + help + The udisks project provides + + o A storage daemon that implements well-defined D-Bus + interfaces that can be used to query and manipulate + storage devices. + + o a command-line tool, udisks(1), that can be used to query + and use the daemon + + http://www.freedesktop.org/wiki/Software/udisks + +if BR2_PACKAGE_UDISKS + +config BR2_PACKAGE_UDISKS_LVM2 + bool "lvm2 support" + select BR2_PACKAGE_LVM2_APP_LIBRARY + help + Enable LVM2 support + +endif + +comment "udisks needs udev /dev management" + depends on BR2_USE_MMU + depends on !BR2_PACKAGE_HAS_UDEV + +comment "udisks needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \ + BR2_STATIC_LIBS diff --git a/package/udisks/udisks.hash b/package/udisks/udisks.hash new file mode 100644 index 0000000000..7ad4326b1c --- /dev/null +++ b/package/udisks/udisks.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 f2ec82eb0ea7e01dc299b5b29b3c18cdf861236ec43dcff66b3552b4b31c6f71 udisks-1.0.5.tar.gz diff --git a/package/udisks/udisks.mk b/package/udisks/udisks.mk new file mode 100644 index 0000000000..eea79e5659 --- /dev/null +++ b/package/udisks/udisks.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# udisks +# +################################################################################ + +UDISKS_VERSION = 1.0.5 +UDISKS_SITE = http://hal.freedesktop.org/releases +UDISKS_LICENSE = GPLv2+ +UDISKS_LICENSE_FILES = COPYING + +UDISKS_DEPENDENCIES = \ + sg3_utils \ + host-pkgconf \ + udev \ + dbus \ + dbus-glib \ + polkit \ + parted \ + lvm2 \ + libatasmart \ + libgudev + +UDISKS_CONF_OPTS = --disable-remote-access --disable-man-pages + +ifeq ($(BR2_PACKAGE_UDISKS_LVM2),y) +UDISKS_CONF_OPTS += --enable-lvm2 +endif + +$(eval $(autotools-package)) diff --git a/package/udpcast/0001-select-h.patch b/package/udpcast/0001-select-h.patch new file mode 100644 index 0000000000..9a8cfc9d5e --- /dev/null +++ b/package/udpcast/0001-select-h.patch @@ -0,0 +1,11 @@ +--- udpcast-20120424/console.h 2005-12-22 22:59:18.000000000 +0000 ++++ udpcast-20120424.mod/console.h 2013-05-22 22:22:19.835474140 +0100 +@@ -6,6 +6,8 @@ + #include + #endif /* __MINGW32__ */ + ++#include ++ + #define prepareConsole udpc_prepareConsole + #define getConsoleFd udpc_getConsoleFd + #define restoreConsole udpc_restoreConsole diff --git a/package/udpcast/Config.in b/package/udpcast/Config.in new file mode 100644 index 0000000000..0424db797e --- /dev/null +++ b/package/udpcast/Config.in @@ -0,0 +1,31 @@ +comment "udpcast needs a toolchain w/ threads" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_UDPCAST + bool "udpcast" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + A multicast protocol implementation which happens to + be very handy for imaging drives over the network. + + http://www.udpcast.linux.lu/ + +if BR2_PACKAGE_UDPCAST + +menu "udpcast tools selection" + +config BR2_PACKAGE_UDPCAST_SENDER + bool "sender" + help + The udpcast transmitter. + +config BR2_PACKAGE_UDPCAST_RECEIVER + bool "receiver" + help + The udpcast receiver. + +endmenu + +endif diff --git a/package/udpcast/udpcast.hash b/package/udpcast/udpcast.hash new file mode 100644 index 0000000000..133e1db80b --- /dev/null +++ b/package/udpcast/udpcast.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 ce9090ef80b6035a744a9b5ac335e61c99baa92c39ff53277266fbfcb836445a udpcast-20120424.tar.gz diff --git a/package/udpcast/udpcast.mk b/package/udpcast/udpcast.mk new file mode 100644 index 0000000000..b0ce6433d2 --- /dev/null +++ b/package/udpcast/udpcast.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# udpcast +# +################################################################################ + +UDPCAST_VERSION = 20120424 +UDPCAST_SITE = http://www.udpcast.linux.lu/download +UDPCAST_DEPENDENCIES = host-m4 +UDPCAST_LICENSE = BSD-2c, GPLv2+ +UDPCAST_LICENSE_FILES = COPYING + +define UDPCAST_REMOVE_UDP_SENDER + rm -f $(TARGET_DIR)/usr/sbin/udp-sender + rm -f $(TARGET_DIR)/usr/sbin/udp-sender.1 +endef + +ifneq ($(BR2_PACKAGE_UDPCAST_SENDER),y) +UDPCAST_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_SENDER +endif + +define UDPCAST_REMOVE_UDP_RECEIVER + rm -f $(TARGET_DIR)/usr/sbin/udp-receiver + rm -f $(TARGET_DIR)/usr/sbin/udp-receiver.1 +endef + +ifneq ($(BR2_PACKAGE_UDPCAST_RECEIVER),y) +UDPCAST_POST_INSTALL_TARGET_HOOKS += UDPCAST_REMOVE_UDP_RECEIVER +endif + +$(eval $(autotools-package)) diff --git a/package/uemacs/01-clear-ixon-termios-flag.patch b/package/uemacs/01-clear-ixon-termios-flag.patch new file mode 100644 index 0000000000..dde76420d4 --- /dev/null +++ b/package/uemacs/01-clear-ixon-termios-flag.patch @@ -0,0 +1,29 @@ +[PATCH] clear ixon termios flag on initialization + +Otherwise ctrl-S/Q gets intercepted by the tty layer instead of +handled by uemacs. + +Signed-off-by: Peter Korsgaard +diff --git a/posix.c b/posix.c +index 97edd9f052b1..352c4712b689 100644 +--- a/posix.c ++++ b/posix.c +@@ -53,17 +53,17 @@ void ttopen(void) + /* + * base new settings on old ones - don't change things + * we don't know about + */ + ntermios = otermios; + + /* raw CR/NL etc input handling, but keep ISTRIP if we're on a 7-bit line */ + ntermios.c_iflag &= ~(IGNBRK | BRKINT | IGNPAR | PARMRK +- | INPCK | INLCR | IGNCR | ICRNL); ++ | INPCK | INLCR | IGNCR | ICRNL | IXON); + + /* raw CR/NR etc output handling */ + ntermios.c_oflag &= + ~(OPOST | ONLCR | OLCUC | OCRNL | ONOCR | ONLRET); + + /* No signal handling, no echo etc */ + ntermios.c_lflag &= ~(ISIG | ICANON | XCASE | ECHO | ECHOE | ECHOK + | ECHONL | NOFLSH | TOSTOP | ECHOCTL | diff --git a/package/uemacs/02-skip-xcase-termios-flag.patch b/package/uemacs/02-skip-xcase-termios-flag.patch new file mode 100644 index 0000000000..2cc53579c7 --- /dev/null +++ b/package/uemacs/02-skip-xcase-termios-flag.patch @@ -0,0 +1,16 @@ +From termios(3): "XCASE (not in POSIX; not supported under Linux)". +musl does not define it, and even if defined it's a no-op. + +Signed-off-by: Alex Suykov + +--- a/posix.c ++++ b/posix.c +@@ -65,7 +65,7 @@ + ~(OPOST | ONLCR | OLCUC | OCRNL | ONOCR | ONLRET); + + /* No signal handling, no echo etc */ +- ntermios.c_lflag &= ~(ISIG | ICANON | XCASE | ECHO | ECHOE | ECHOK ++ ntermios.c_lflag &= ~(ISIG | ICANON | ECHO | ECHOE | ECHOK + | ECHONL | NOFLSH | TOSTOP | ECHOCTL | + ECHOPRT | ECHOKE | FLUSHO | PENDIN | IEXTEN); + diff --git a/package/uemacs/Config.in b/package/uemacs/Config.in new file mode 100644 index 0000000000..cfe9805946 --- /dev/null +++ b/package/uemacs/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_UEMACS + bool "uemacs" + select BR2_PACKAGE_NCURSES + help + A small emacs. + + https://git.kernel.org/cgit/editors/uemacs/uemacs.git/ diff --git a/package/uemacs/uemacs.mk b/package/uemacs/uemacs.mk new file mode 100644 index 0000000000..19fda12467 --- /dev/null +++ b/package/uemacs/uemacs.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# uemacs +# +################################################################################ + +UEMACS_VERSION = 8841922689769960fa074fbb053cb8507f2f3ed9 +UEMACS_SITE = $(BR2_KERNEL_MIRROR)/scm/editors/uemacs/uemacs.git +UEMACS_SITE_METHOD = git +UEMACS_DEPENDENCIES = ncurses + +define UEMACS_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + CC="$(TARGET_CC)" DEFINES="-DAUTOCONF -DPOSIX -DUSG" \ + CFLAGS+="$(TARGET_CFLAGS) " LIBS="$(TARGET_CFLAGS) -lncurses" +endef + +define UEMACS_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/em $(TARGET_DIR)/usr/bin/em +endef + +$(eval $(generic-package)) diff --git a/package/ulogd/Config.in b/package/ulogd/Config.in new file mode 100644 index 0000000000..dc36c0bc33 --- /dev/null +++ b/package/ulogd/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_ULOGD + bool "ulogd" + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU + select BR2_PACKAGE_LIBMNL + select BR2_PACKAGE_LIBNETFILTER_ACCT + select BR2_PACKAGE_LIBNETFILTER_CONNTRACK + select BR2_PACKAGE_LIBNETFILTER_LOG + select BR2_PACKAGE_LIBNFNETLINK + help + ulogd is a userspace logging daemon for netfilter/iptables related logging. + + http://www.netfilter.org/projects/ulogd/ + +comment "ulogd needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + depends on BR2_USE_MMU diff --git a/package/ulogd/ulogd.hash b/package/ulogd/ulogd.hash new file mode 100644 index 0000000000..16186c18c0 --- /dev/null +++ b/package/ulogd/ulogd.hash @@ -0,0 +1,3 @@ +# From ftp://ftp.netfilter.org/pub/ulogd/ulogd-2.0.5.tar.bz2.{md5sum,sha1sum} +md5 f0f8fe1371fa28b5e06cb16aaa0111dd ulogd-2.0.5.tar.bz2 +sha1 828db7849d6788674ecf36b178f107c20e9ac1f0 ulogd-2.0.5.tar.bz2 diff --git a/package/ulogd/ulogd.mk b/package/ulogd/ulogd.mk new file mode 100644 index 0000000000..4017edc7bf --- /dev/null +++ b/package/ulogd/ulogd.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# ulogd +# +################################################################################ + +ULOGD_VERSION = 2.0.5 +ULOGD_SOURCE = ulogd-$(ULOGD_VERSION).tar.bz2 +ULOGD_SITE = http://www.netfilter.org/projects/ulogd/files +ULOGD_CONF_OPTS = --with-dbi=no --with-pgsql=no +ULOGD_DEPENDENCIES = host-pkgconf \ + libmnl libnetfilter_acct libnetfilter_conntrack libnetfilter_log \ + libnfnetlink +ULOGD_LICENSE = GPLv2 +ULOGD_LICENSE_FILES = COPYING + +# DB backends need threads +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +ifeq ($(BR2_PACKAGE_MYSQL),y) +ULOGD_CONF_OPTS += --with-mysql=$(STAGING_DIR)/usr +ULOGD_DEPENDENCIES += mysql +else +ULOGD_CONF_OPTS += --with-mysql=no +endif +ifeq ($(BR2_PACKAGE_SQLITE),y) +ULOGD_DEPENDENCIES += sqlite +endif +else +ULOGD_CONF_OPTS += --with-mysql=no --without-sqlite +endif + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +ULOGD_CONF_OPTS += --with-pcap +ULOGD_DEPENDENCIES += libpcap +else +ULOGD_CONF_OPTS += --without-pcap +endif + +ifeq ($(BR2_PACKAGE_JANSSON),y) +ULOGD_CONF_OPTS += --with-jansson +ULOGD_DEPENDENCIES += jansson +else +ULOGD_CONF_OPTS += --without-jansson +endif + +$(eval $(autotools-package)) diff --git a/package/unionfs/0001-Revert-to-old-pre-1.0-meta-directory.patch b/package/unionfs/0001-Revert-to-old-pre-1.0-meta-directory.patch new file mode 100644 index 0000000000..228441b38a --- /dev/null +++ b/package/unionfs/0001-Revert-to-old-pre-1.0-meta-directory.patch @@ -0,0 +1,36 @@ +From 93c2f9bd8b058b28016e6db2421e5b38eac0606c Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Thu, 17 Dec 2015 15:06:38 +0100 +Subject: [PATCH] Revert to old pre-1.0 meta directory + +Unionfs changed its meta directory from .unionfs to .unionfs-fuse with the +unionfs -> unionfs-fuse rename. The rename later got reverted everywhere +but the meta directory, so now unionfs doesn't find the whiteout files from +older releases. + +Revert back to the pre-1.0 behaviour to fix this. + +Committed upstream: +https://github.com/rpodgorny/unionfs-fuse/commit/93c2f9bd8b058b28016e6db2421e5b38eac0606c + +Signed-off-by: Peter Korsgaard +--- + src/unionfs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/unionfs.h b/src/unionfs.h +index c2b5ee3..74b824f 100644 +--- a/src/unionfs.h ++++ b/src/unionfs.h +@@ -10,7 +10,7 @@ + #define PATHLEN_MAX 1024 + #define HIDETAG "_HIDDEN~" + +-#define METANAME ".unionfs-fuse" ++#define METANAME ".unionfs" + #define METADIR (METANAME "/") // string concetanation! + + // fuse meta files, we might want to hide those +-- +2.1.4 + diff --git a/package/unionfs/Config.in b/package/unionfs/Config.in new file mode 100644 index 0000000000..ece83a5f79 --- /dev/null +++ b/package/unionfs/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_UNIONFS + bool "unionfs (FUSE)" + select BR2_PACKAGE_LIBFUSE + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse + depends on BR2_USE_MMU # libfuse + depends on !BR2_STATIC_LIBS # libfuse + help + A userspace unionfs implementation. + + https://github.com/rpodgorny/unionfs-fuse + +comment "unionfs needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/unionfs/unionfs.hash b/package/unionfs/unionfs.hash new file mode 100644 index 0000000000..c843a0e8c1 --- /dev/null +++ b/package/unionfs/unionfs.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 2ee80bd0634a61adb2159212e155d607a0a82ad659214ae6edb3530396cccc09 unionfs-1.0.tar.gz +sha256 c8526f80448f344fba0100e5510793b6de985b24a8b526d9a6803bcd713d9de2 0001-include-asm-ioctl.h-for-_IOC_SIZE.patch diff --git a/package/unionfs/unionfs.mk b/package/unionfs/unionfs.mk new file mode 100644 index 0000000000..0fa9c940f9 --- /dev/null +++ b/package/unionfs/unionfs.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# unionfs +# +################################################################################ + +UNIONFS_VERSION = 1.0 +UNIONFS_SITE = $(call github,rpodgorny,unionfs-fuse,v$(UNIONFS_VERSION)) +UNIONFS_PATCH = \ + http://git.alpinelinux.org/cgit/aports/plain/main/unionfs-fuse/0001-include-asm-ioctl.h-for-_IOC_SIZE.patch +UNIONFS_DEPENDENCIES = libfuse host-pkgconf +UNIONFS_LICENSE = BSD-3c +UNIONFS_LICENSE_FILES = LICENSE + +$(eval $(cmake-package)) diff --git a/package/unixodbc/0001-fix-nopthread.patch b/package/unixodbc/0001-fix-nopthread.patch new file mode 100644 index 0000000000..45933e54d6 --- /dev/null +++ b/package/unixodbc/0001-fix-nopthread.patch @@ -0,0 +1,39 @@ +Fix pthread detection + +configure.in always calls AC_CHECK_COMP_OPT(pthread) which succeeds with the +toolchain used although it does not contain thread support: + +checking for mutex_lock in -lthread ... no +checking for pthread_mutex_lock in -lpthread... no +checking for pthread_mutex_lock in -lc... no +checking if compiler accepts -pthread... yes +checking for pthread_mutex_lock in -lc... no +checking for pthread_mutex_lock in -lpthread... no + +This positive configure check leads to + + CFLAGS="$CFLAGS -pthread" + +in ./configure, line 15757 which causes a compilation bug +/home/br/br4/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/4.8.3/../../../../arm-buildroot-linux-uclibcgnueab + +using this defconfig +http://autobuild.buildroot.net/results/e86/e86e97ff7887f1bdc6bf913498392ff50f56ea88/defconfig + +This patch disables the freebsd-only code path. Patching configure directly +prevents the need for autoreconf. + +Signed-off-by: Bernd Kuhls + +diff -uNr unixODBC-2.3.2.org/configure unixODBC-2.3.2/configure +--- unixODBC-2.3.2.org/configure 2013-10-08 10:56:03.000000000 +0200 ++++ unixODBC-2.3.2/configure 2015-03-13 21:19:59.210429211 +0100 +@@ -15746,7 +15746,7 @@ + + fi + +- if test "x$gotthread" = "xno"; then ++ if test "x$gotthread" = "xnot_needed_for_buildroot"; then + if test "x$ac_cv_c_compiler_gnu" = "xyes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -pthread" >&5 + $as_echo_n "checking if compiler accepts -pthread... " >&6; } diff --git a/package/unixodbc/Config.in b/package/unixodbc/Config.in new file mode 100644 index 0000000000..c23e0a565c --- /dev/null +++ b/package/unixodbc/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_UNIXODBC + bool "unixodbc" + help + The unixODBC Project goals are to develop and promote unixODBC + to be the definitive standard for ODBC on non MS Windows platforms. + + http://www.unixodbc.org diff --git a/package/unixodbc/unixodbc.hash b/package/unixodbc/unixodbc.hash new file mode 100644 index 0000000000..a5c2d115ef --- /dev/null +++ b/package/unixodbc/unixodbc.hash @@ -0,0 +1,2 @@ +# From ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-2.3.2.tar.gz.md5 +md5 5e4528851eda5d3d4aed249b669bd05b unixODBC-2.3.2.tar.gz diff --git a/package/unixodbc/unixodbc.mk b/package/unixodbc/unixodbc.mk new file mode 100644 index 0000000000..067c1ca663 --- /dev/null +++ b/package/unixodbc/unixodbc.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# unixodbc +# +################################################################################ + +UNIXODBC_VERSION = 2.3.2 +UNIXODBC_SOURCE = unixODBC-$(UNIXODBC_VERSION).tar.gz +UNIXODBC_SITE = ftp://ftp.unixodbc.org/pub/unixODBC +UNIXODBC_INSTALL_STAGING = YES +UNIXODBC_LICENSE = LGPLv2.1+ (library), GPLv2+ (programs) +UNIXODBC_LICENSE_FILES = COPYING exe/COPYING + +UNIXODBC_CONF_OPTS = --enable-drivers --enable-driver-conf + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +UNIXODBC_CONF_OPTS += --enable-iconv +UNIXODBC_DEPENDENCIES += libiconv +else +UNIXODBC_CONF_OPTS += --disable-iconv +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +UNIXODBC_CONF_OPTS += --enable-readline +UNIXODBC_DEPENDENCIES += readline +else +UNIXODBC_CONF_OPTS += --disable-readline +endif + +$(eval $(autotools-package)) diff --git a/package/unrar/Config.in b/package/unrar/Config.in new file mode 100644 index 0000000000..29696c35aa --- /dev/null +++ b/package/unrar/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_UNRAR + bool "unrar" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_WCHAR + help + RAR file uncompressor. + + http://www.rarlab.com/rar_add.htm + +comment "unrar needs a toolchain w/ C++, wchar, threads" + depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/unrar/unrar.hash b/package/unrar/unrar.hash new file mode 100644 index 0000000000..4490d70f38 --- /dev/null +++ b/package/unrar/unrar.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 ff593728aed0ac865908b8ea52cff449a4c298f095db2f3d27438ffbc3e35d5b unrarsrc-5.3.9.tar.gz diff --git a/package/unrar/unrar.mk b/package/unrar/unrar.mk new file mode 100644 index 0000000000..89dff9bbaf --- /dev/null +++ b/package/unrar/unrar.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# unrar +# +################################################################################ + +UNRAR_VERSION = 5.3.9 +UNRAR_SOURCE = unrarsrc-$(UNRAR_VERSION).tar.gz +UNRAR_SITE = http://www.rarlab.com/rar +UNRAR_LICENSE = unrar +UNRAR_LICENSE_FILES = license.txt + +define UNRAR_BUILD_CMDS + $(MAKE) CXX="$(TARGET_CXX)" STRIP="/bin/true" \ + CXXFLAGS="$(TARGET_CXXFLAGS) -pthread" \ + LDFLAGS="$(TARGET_LDFLAGS) -pthread" -C $(@D) +endef + +define UNRAR_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR)/usr install +endef + +$(eval $(generic-package)) diff --git a/package/unscd/Config.in b/package/unscd/Config.in new file mode 100644 index 0000000000..e979c30135 --- /dev/null +++ b/package/unscd/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_UNSCD + bool "unscd" + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Micro Name Service Caching Daemon + + A daemon which handles passwd, group and host lookups for + running programs and caches the results for the next query. + You only need this package if you are using slow Name Services + like LDAP, NIS or NIS+. + + This particular NSCD is a complete rewrite of the GNU glibc + nscd which is a single threaded server process which offloads + all NSS lookups to worker children; cache hits are handled by + the parent, and only cache misses start worker children, + making the parent immune to resource leaks, hangs, and crashes + in NSS libraries. + + It should mostly be a drop-in replacement for existing + installs using nscd. + + http://busybox.net/~vda/unscd + +comment "unscd needs an (e)glibc toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/unscd/S46unscd b/package/unscd/S46unscd new file mode 100644 index 0000000000..6a51eec130 --- /dev/null +++ b/package/unscd/S46unscd @@ -0,0 +1,25 @@ +#!/bin/sh + +NAME="nscd" +DAEMON="/usr/sbin/${NAME}" +PID_F="/var/run/nscd/${NAME}.pid" + +case "$1" in +start) + printf "Starting ${NAME}: " + start-stop-daemon -S -p ${PID_F} -x ${DAEMON} + [ $? -eq 0 ] && echo "OK" || echo "FAIL" + ;; +stop) + printf "Stopping ${NAME}: " + start-stop-daemon -K -p ${PID_F} + [ $? -eq 0 ] && echo "OK" || echo "FAIL" + ;; +restart|reload) + $0 stop + $0 start + ;; +*) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/unscd/nscd.conf b/package/unscd/nscd.conf new file mode 100644 index 0000000000..3eb08ab68a --- /dev/null +++ b/package/unscd/nscd.conf @@ -0,0 +1,33 @@ +# /etc/nscd.conf +# +# An example Name Service Cache config file. This file is needed by nscd. +# +server-user unscd +debug-level 0 + +enable-cache passwd yes +positive-time-to-live passwd 600 +negative-time-to-live passwd 20 +suggested-size passwd 1001 +check-files passwd yes + +enable-cache group yes +positive-time-to-live group 3600 +negative-time-to-live group 60 +suggested-size group 1001 +check-files group yes + +# hosts caching is broken with gethostby* calls, hence is now disabled +# by default. Specifically, the caching does not obey DNS TTLs, and +# thus could lead to problems if the positive-time-to-live is +# significantly larger than the actual TTL. +# +# You should really use a caching nameserver instead of nscd for this +# sort of request. However, you can easily re-enable this by default. +enable-cache hosts no +positive-time-to-live hosts 3600 +negative-time-to-live hosts 20 +suggested-size hosts 1001 +check-files hosts yes + +# unscd does not support services caching diff --git a/package/unscd/unscd.hash b/package/unscd/unscd.hash new file mode 100644 index 0000000000..ab8ffdc0cf --- /dev/null +++ b/package/unscd/unscd.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 4c1f83dcd120469fceef749050cb29fa666fa4666bd308dfe92e933a4c200d55 nscd-0.52.c diff --git a/package/unscd/unscd.mk b/package/unscd/unscd.mk new file mode 100644 index 0000000000..54caeb1f95 --- /dev/null +++ b/package/unscd/unscd.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# unscd +# +################################################################################ + +UNSCD_VERSION = 0.52 +UNSCD_SOURCE = nscd-$(UNSCD_VERSION).c +UNSCD_SITE = http://busybox.net/~vda/unscd +UNSCD_LICENSE = GPLv2 +UNSCD_LICENSE_FILES = $(UNSCD_SOURCE) + +define UNSCD_EXTRACT_CMDS + cp $(DL_DIR)/$($(PKG)_SOURCE) $(@D)/ +endef + +define UNSCD_BUILD_CMDS + cd $(@D); \ + $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) -o nscd $(UNSCD_SOURCE) +endef + +define UNSCD_INSTALL_TARGET_CMDS + $(INSTALL) -m 755 -D $(@D)/nscd $(TARGET_DIR)/usr/sbin/nscd + $(INSTALL) -m 600 -D package/unscd/nscd.conf $(TARGET_DIR)/etc/nscd.conf +endef + +define UNSCD_INSTALL_INIT_SYSV + $(INSTALL) -m 755 -D package/unscd/S46unscd \ + $(TARGET_DIR)/etc/init.d/S46unscd +endef + +define UNSCD_USERS + unscd -1 unscd -1 * - - - unscd user +endef + +$(eval $(generic-package)) diff --git a/package/unzip/0001-Add-a-CMakeFile.txt-to-ease-cross-compilation.patch b/package/unzip/0001-Add-a-CMakeFile.txt-to-ease-cross-compilation.patch new file mode 100644 index 0000000000..cbc58e484b --- /dev/null +++ b/package/unzip/0001-Add-a-CMakeFile.txt-to-ease-cross-compilation.patch @@ -0,0 +1,53 @@ +From 992a497e9c5c421d3931e02a01e9d7c159f27135 Mon Sep 17 00:00:00 2001 +From: Luca Ceresoli +Date: Thu, 26 Nov 2015 12:49:10 +0100 +Subject: [PATCH] Add a CMakeFile.txt to ease cross-compilation + +Info-ZIP's UnZip 6.0 has a complex, hand-crafted Makefile with a +companion configure script which try to support an extremely wide +range of UNIX-like operating systems. The result is an overly complex +mass of code that does not support cross-compilation in several ways. + +Zip 3.0 has a similar build system, and has as many as 6 patches in +Buildroot to cross-compile [0]. UnZip fails at building even with +these patches adapted and a few more on top of them. + +Instead of tweaking and fixing a huge and complex build system, skip +it entirely and add a pretty simple CMakeLists.txt that cross-compiles +smoothly using CMake. It also preserves all of the Buildroot-provided +build options and flags as the original Makefile does. + +[0] http://git.buildroot.net/buildroot/tree/package/infozip?id=2015.11-rc3 + +Signed-off-by: Luca Ceresoli +--- + CMakeLists.txt | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + create mode 100644 CMakeLists.txt + +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..27951b4 +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,17 @@ ++cmake_minimum_required(VERSION 2.8) ++INCLUDE(CheckFunctionExists) ++ ++project(unzip C) ++ ++CHECK_FUNCTION_EXISTS(lchmod HAVE_LCHMOD) ++if(NOT HAVE_LCHMOD) ++add_definitions("-DNO_LCHMOD") ++endif() ++ ++set(UNZIP_SOURCES unzip.c crc32.c crypt.c envargs.c explode.c ++ extract.c fileio.c globals.c inflate.c list.c match.c process.c ++ ttyio.c ubz2err.c unreduce.c unshrink.c zipinfo.c unix/unix.c) ++ ++include_directories(.) ++add_executable(unzip ${UNZIP_SOURCES}) ++install(TARGETS unzip DESTINATION bin) +-- +1.9.1 + diff --git a/package/unzip/Config.in b/package/unzip/Config.in new file mode 100644 index 0000000000..0d98d28776 --- /dev/null +++ b/package/unzip/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_UNZIP + bool "unzip" + help + UnZip is an extraction utility for archives compressed in + .zip format (also called "zipfiles"). Although highly + compatible both with PKWARE's PKZIP and PKUNZIP utilities + for MS-DOS and with Info-ZIP's own Zip program, our primary + objectives have been portability and non-MSDOS + functionality. + + http://www.info-zip.org/UnZip.html diff --git a/package/unzip/unzip.hash b/package/unzip/unzip.hash new file mode 100644 index 0000000000..a138cc27c9 --- /dev/null +++ b/package/unzip/unzip.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 036d96991646d0449ed0aa952e4fbe21b476ce994abc276e49d30e686708bd37 unzip60.tgz diff --git a/package/unzip/unzip.mk b/package/unzip/unzip.mk new file mode 100644 index 0000000000..7d48d25309 --- /dev/null +++ b/package/unzip/unzip.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# unzip +# +################################################################################ + +UNZIP_VERSION = 60 +UNZIP_SOURCE = unzip$(UNZIP_VERSION).tgz +UNZIP_SITE = ftp://ftp.info-zip.org/pub/infozip/src +# take precedence over busybox implementation +UNZIP_DEPENDENCIES = $(if $(BR2_PACKAGE_BUSYBOX),busybox) +UNZIP_LICENSE = Info-ZIP +UNZIP_LICENSE_FILES = LICENSE + +$(eval $(cmake-package)) diff --git a/package/upmpdcli/Config.in b/package/upmpdcli/Config.in new file mode 100644 index 0000000000..32182050dc --- /dev/null +++ b/package/upmpdcli/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_UPMPDCLI + bool "upmpdcli" + select BR2_PACKAGE_LIBMPDCLIENT + select BR2_PACKAGE_LIBUPNPP + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # libupnpp -> libupnp + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + help + upmpdcli is a UPnP Media Renderer front-end for MPD, the Music + Player Daemon. It supports UPnP gapless track transitions and + the OpenHome ohMedia services. + + http://www.lesbonscomptes.com/upmpdcli/ + +comment "upmpdcli needs a toolchain w/ C++, threads, gcc >= 4.6" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 diff --git a/package/upmpdcli/S99upmpdcli b/package/upmpdcli/S99upmpdcli new file mode 100644 index 0000000000..71d19a58e5 --- /dev/null +++ b/package/upmpdcli/S99upmpdcli @@ -0,0 +1,40 @@ +#!/bin/sh + +NAME=upmpdcli +DAEMON=/usr/bin/$NAME +CONFFILE=/etc/$NAME.conf +PIDFILE=/var/run/$NAME.pid +DAEMON_ARGS="-D -c $CONFFILE" + +# Sanity checks +test -f $DAEMON || exit 0 + +start() { + printf "Starting $NAME: " + start-stop-daemon --start --quiet --background --exec $DAEMON \ + -- $DAEMON_ARGS \ + && echo "OK" || echo "FAIL" +} + +stop() { + printf "Stopping $NAME: " + start-stop-daemon --stop --quiet --pidfile $PIDFILE \ + && echo "OK" || echo "FAIL" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + stop + sleep 1 + start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac diff --git a/package/upmpdcli/upmpdcli.hash b/package/upmpdcli/upmpdcli.hash new file mode 100644 index 0000000000..27a75cc08c --- /dev/null +++ b/package/upmpdcli/upmpdcli.hash @@ -0,0 +1,2 @@ +# Hashes from: http://www.lesbonscomptes.com/upmpdcli/downloads/upmpdcli-1.1.3.tar.gz.sha256 +sha256 2df3e6593f18c097b6247fb8da919b94701bf083b219056b006d68e6dcef75b5 upmpdcli-1.1.3.tar.gz diff --git a/package/upmpdcli/upmpdcli.mk b/package/upmpdcli/upmpdcli.mk new file mode 100644 index 0000000000..1a7c790c5c --- /dev/null +++ b/package/upmpdcli/upmpdcli.mk @@ -0,0 +1,48 @@ +################################################################################ +# +# upmpdcli +# +################################################################################ + +UPMPDCLI_VERSION = 1.1.3 +UPMPDCLI_SITE = http://www.lesbonscomptes.com/upmpdcli/downloads +UPMPDCLI_LICENSE = GPLv2+ +UPMPDCLI_LICENSE_FILES = COPYING +UPMPDCLI_DEPENDENCIES = libmpdclient libupnpp + +ifeq ($(BR2_STATIC_LIBS),y) +# Upmpdcli forgets to take the dependencies of libupnpp into +# consideration, breaking static linking, so help it. +# Libupnpp unfortunately doesn't provide a .pc file, so manually +# handle the dependencies here. +# The build system doesn't expand LIBS from the configure step, so +# manually pass it to make. +UPMPDCLI_DEPENDENCIES += host-pkgconf +UPMPDCLI_MAKE_OPTS = \ + LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs expat libcurl libupnp`" +endif + +# Upmpdcli only runs if user upmpdcli exists +define UPMPDCLI_USERS + upmpdcli -1 upmpdcli -1 * - - - Upmpdcli MPD UPnP Renderer Front-End +endef + +define UPMPDCLI_INSTALL_INIT_SYSV + $(INSTALL) -D -m 0755 package/upmpdcli/S99upmpdcli $(TARGET_DIR)/etc/init.d/S99upmpdcli +endef + +define UPMPDCLI_INSTALL_INIT_SYSTEMD + $(INSTALL) -D -m 644 $(@D)/systemd/upmpdcli.service \ + $(TARGET_DIR)/usr/lib/systemd/system/upmpdcli.service + mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants + ln -sf ../../../../usr/lib/systemd/system/upmpdcli.service \ + $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/upmpdcli.service +endef + +define UPMPDCLI_INSTALL_CONF_FILE + $(INSTALL) -D -m 0755 $(@D)/src/upmpdcli.conf-dist $(TARGET_DIR)/etc/upmpdcli.conf +endef + +UPMPDCLI_POST_INSTALL_TARGET_HOOKS += UPMPDCLI_INSTALL_CONF_FILE + +$(eval $(autotools-package)) diff --git a/package/upx/upx.hash b/package/upx/upx.hash new file mode 100644 index 0000000000..bfcf9326f9 --- /dev/null +++ b/package/upx/upx.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 527ce757429841f51675352b1f9f6fc8ad97b18002080d7bf8672c466d8c6a3c upx-3.91-src.tar.bz2 diff --git a/package/upx/upx.mk b/package/upx/upx.mk new file mode 100644 index 0000000000..400d28328d --- /dev/null +++ b/package/upx/upx.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# upx +# +################################################################################ + +UPX_VERSION = 3.91 +UPX_SITE = http://upx.sourceforge.net/download +UPX_SOURCE = upx-$(UPX_VERSION)-src.tar.bz2 +UPX_LICENSE = GPLv2+ +UPX_LICENSE_FILES = COPYING + +HOST_UPX_DEPENDENCIES = host-ucl host-zlib + +# We need to specify all, otherwise the default target only prints a message +# stating to "please choose a target for 'make'"... :-( +define HOST_UPX_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) CPPFLAGS="$(HOST_CPPFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" UPX_UCLDIR=$(HOST_DIR)/usr \ + -C $(@D) all +endef + +# UPX has no install procedure, so install it manually. +define HOST_UPX_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/src/upx.out $(HOST_DIR)/usr/bin/upx +endef + +$(eval $(host-generic-package)) diff --git a/package/urg/0001-select-h.patch b/package/urg/0001-select-h.patch new file mode 100644 index 0000000000..09d1530443 --- /dev/null +++ b/package/urg/0001-select-h.patch @@ -0,0 +1,11 @@ +--- urg-0.8.18/src/c/connection/serial_ctrl_lin.c 2010-11-22 01:48:01.000000000 +0000 ++++ urg-0.8.18.mod/src/c/connection/serial_ctrl_lin.c 2013-05-21 20:56:35.822025969 +0100 +@@ -17,7 +17,7 @@ + #include + #include + #include +- ++#include + //#include + + enum { diff --git a/package/urg/Config.in b/package/urg/Config.in new file mode 100644 index 0000000000..9d57645d62 --- /dev/null +++ b/package/urg/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_URG + bool "urg" + depends on BR2_INSTALL_LIBSTDCPP + help + Library to control Hokuyo's URG series sensors. + + http://www.hokuyo-aut.jp/02sensor/07scanner/download/urg_programs_en/ + +comment "urg needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/urg/urg.hash b/package/urg/urg.hash new file mode 100644 index 0000000000..5764a14095 --- /dev/null +++ b/package/urg/urg.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 b2cab7e539c90c60fc99a2350a42b5d5390ff952b694b196c3cbb54623cfee7f urg-0.8.18.zip diff --git a/package/urg/urg.mk b/package/urg/urg.mk new file mode 100644 index 0000000000..41ac4f41b1 --- /dev/null +++ b/package/urg/urg.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# urg +# +################################################################################ + +URG_VERSION = 0.8.18 +URG_SITE = http://www.hokuyo-aut.jp/02sensor/07scanner/download/urg_programs_en +URG_SOURCE = urg-$(URG_VERSION).zip +URG_LICENSE = LGPLv3 +URG_LICENSE_FILES = COPYING + +URG_INSTALL_STAGING = YES + +ifeq ($(BR2_PACKAGE_SDL)$(BR2_PACKAGE_SDL_NET),yy) +URG_DEPENDENCIES += sdl sdl_net +URG_CONF_OPTS += \ + --with-sdl-prefix=$(STAGING_DIR)/usr \ + --with-sdl-exec-prefix=$(STAGING_DIR)/usr +else +URG_CONF_OPTS = --without-sdl +URG_CONF_ENV += ac_cv_path_SDL_CONFIG="" +endif + +URG_CONFIG_SCRIPTS = c_urg-config urg-config + +define URG_EXTRACT_CMDS + $(RM) -rf $(URG_DIR) + $(UNZIP) -d $(BUILD_DIR)/ $(DL_DIR)/$(URG_SOURCE) + test -d $(URG_DIR) || \ + mv $(BUILD_DIR)/$(subst .zip,,$(URG_SOURCE)) $(URG_DIR) +endef + +$(eval $(autotools-package)) diff --git a/package/usb_modeswitch/Config.in b/package/usb_modeswitch/Config.in new file mode 100644 index 0000000000..f709a550c1 --- /dev/null +++ b/package/usb_modeswitch/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_USB_MODESWITCH + bool "usb_modeswitch" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + help + Some USB devices such as 3G/4G broadband modems power-up + in mass storage mode to provide access to drivers + for the device's application mode. usb_modeswitch + changes the mode of such devices from the initial power-up + mode to the application mode. + Specific configuration data for each device model is required. + + usb_modeswitch can be used with the usb_modeswitch_data + package and eudev/systemd for automatic mode switching + when devices are connected. + + For more information search the Internet for "Virtual CD-ROM + switching utility". + + http://www.draisberghof.de/usb_modeswitch/ + +comment "usb_modeswitch needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/usb_modeswitch/usb_modeswitch.hash b/package/usb_modeswitch/usb_modeswitch.hash new file mode 100644 index 0000000000..075ef63bab --- /dev/null +++ b/package/usb_modeswitch/usb_modeswitch.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 f93e940c2eb0c585a5d2210177338e68a9b24f409e351e4a854132453246b894 usb-modeswitch-2.3.0.tar.bz2 diff --git a/package/usb_modeswitch/usb_modeswitch.mk b/package/usb_modeswitch/usb_modeswitch.mk new file mode 100644 index 0000000000..ac41a80c70 --- /dev/null +++ b/package/usb_modeswitch/usb_modeswitch.mk @@ -0,0 +1,35 @@ +################################################################################ +# +# usb_modeswitch +# +################################################################################ + +USB_MODESWITCH_VERSION = 2.3.0 +USB_MODESWITCH_SOURCE = usb-modeswitch-$(USB_MODESWITCH_VERSION).tar.bz2 +USB_MODESWITCH_SITE = http://www.draisberghof.de/usb_modeswitch +USB_MODESWITCH_DEPENDENCIES = libusb +USB_MODESWITCH_LICENSE = GPLv2+ +USB_MODESWITCH_LICENSE_FILES = COPYING + +USB_MODESWITCH_BUILD_TARGETS = static +USB_MODESWITCH_INSTALL_TARGETS = install-static + +ifeq ($(BR2_PACKAGE_TCL)$(BR2_PACKAGE_TCL_SHLIB_ONLY),y) +USB_MODESWITCH_DEPENDENCIES += tcl +USB_MODESWITCH_BUILD_TARGETS = script +USB_MODESWITCH_INSTALL_TARGETS = install-script +endif + +define USB_MODESWITCH_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE -Wall -I." \ + -C $(@D) $(USB_MODESWITCH_BUILD_TARGETS) +endef + +define USB_MODESWITCH_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + DESTDIR=$(TARGET_DIR) \ + -C $(@D) $(USB_MODESWITCH_INSTALL_TARGETS) +endef + +$(eval $(generic-package)) diff --git a/package/usb_modeswitch_data/0001-makefile.patch b/package/usb_modeswitch_data/0001-makefile.patch new file mode 100644 index 0000000000..28441fe003 --- /dev/null +++ b/package/usb_modeswitch_data/0001-makefile.patch @@ -0,0 +1,28 @@ +Fixed Makefile install sections to not reload udev rules. In a +cross-compiler environment, it is not wanted to reload the host udev rules. + +Signed-off-by: J.C. Woltz +Signed-off-by: Patrick Ziegler +--- a/Makefile 2013-06-10 22:32:53.000000000 +0200 ++++ b/Makefile 2013-06-11 10:38:03.181161401 +0200 +@@ -13,9 +13,9 @@ + clean: + $(RM) 40-usb_modeswitch.rules + +-install: all files-install db-install rules-reload ++install: all files-install db-install + +-install-packed: files-install db-install-packed rules-reload ++install-packed: files-install db-install-packed + + files-install: + install -d $(PREFIX)/share/usb_modeswitch +@@ -54,7 +54,7 @@ + fi \ + fi + +-uninstall: files-uninstall rules-reload ++uninstall: files-uninstall + + files-uninstall: + $(RM) $(RULESDIR)/40-usb_modeswitch.rules diff --git a/package/usb_modeswitch_data/Config.in b/package/usb_modeswitch_data/Config.in new file mode 100644 index 0000000000..ad96726ad6 --- /dev/null +++ b/package/usb_modeswitch_data/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_USB_MODESWITCH_DATA + bool "usb_modeswitch_data" + select BR2_PACKAGE_USB_MODESWITCH + depends on BR2_TOOLCHAIN_HAS_THREADS # usb_modeswitch -> libusb + help + USB mode switch data + Contains udev rules and events to allow usb_modeswitch to + function automatically + + http://www.draisberghof.de/usb_modeswitch/ + +comment "usb_modeswitch_data needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/usb_modeswitch_data/usb_modeswitch_data.hash b/package/usb_modeswitch_data/usb_modeswitch_data.hash new file mode 100644 index 0000000000..0df5475ea3 --- /dev/null +++ b/package/usb_modeswitch_data/usb_modeswitch_data.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d679a44a48b1d1f243fea6b4d2bd54e0e08010ff579dd81eaf698954c0c6dfa7 usb-modeswitch-data-20160112.tar.bz2 diff --git a/package/usb_modeswitch_data/usb_modeswitch_data.mk b/package/usb_modeswitch_data/usb_modeswitch_data.mk new file mode 100644 index 0000000000..a0cbc126df --- /dev/null +++ b/package/usb_modeswitch_data/usb_modeswitch_data.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# usb_modeswitch_data +# +################################################################################ + +USB_MODESWITCH_DATA_VERSION = 20160112 +USB_MODESWITCH_DATA_SOURCE = usb-modeswitch-data-$(USB_MODESWITCH_DATA_VERSION).tar.bz2 +USB_MODESWITCH_DATA_SITE = http://www.draisberghof.de/usb_modeswitch +USB_MODESWITCH_DATA_DEPENDENCIES = usb_modeswitch +USB_MODESWITCH_DATA_LICENSE = GPLv2+ +USB_MODESWITCH_DATA_LICENSE_FILES = COPYING + +# Nothing to build, it is a pure data package + +define USB_MODESWITCH_DATA_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +$(eval $(generic-package)) diff --git a/package/usbmount/0001-rules-fix.patch b/package/usbmount/0001-rules-fix.patch new file mode 100644 index 0000000000..c71b613c8a --- /dev/null +++ b/package/usbmount/0001-rules-fix.patch @@ -0,0 +1,19 @@ +Signed-off-by: Yegor Yefremov +--- + usbmount.rules | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: b/usbmount.rules +=================================================================== +--- a/usbmount.rules ++++ b/usbmount.rules +@@ -1,7 +1,7 @@ + # Rules for USBmount -*- conf -*- + + KERNEL=="sd*", DRIVERS=="sbp2", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" +-KERNEL=="sd*", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" +-KERNEL=="ub*", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" ++KERNEL=="sd*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" ++KERNEL=="ub*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/share/usbmount/usbmount add" + KERNEL=="sd*", ACTION=="remove", RUN+="/usr/share/usbmount/usbmount remove" + KERNEL=="ub*", ACTION=="remove", RUN+="/usr/share/usbmount/usbmount remove" diff --git a/package/usbmount/0002-use-udev-environment-instead-of-blkid.patch b/package/usbmount/0002-use-udev-environment-instead-of-blkid.patch new file mode 100644 index 0000000000..27928b5d54 --- /dev/null +++ b/package/usbmount/0002-use-udev-environment-instead-of-blkid.patch @@ -0,0 +1,71 @@ +udev can provide all the values that usbmount determined using the +blkid binary. This patch drops use of blkid in favor of using the +environment variables set by udev. Thus it removes the dependency +on blkid from usbmount. + +Signed-off-by: Sven Neumann +--- usbmount-0.0.22/usbmount.orig 2013-06-18 14:44:40.143096147 +0200 ++++ usbmount-0.0.22/usbmount 2013-06-19 16:13:09.882434896 +0200 +@@ -59,11 +59,6 @@ + exit 0 + fi + +-if [ ! -x /sbin/blkid ]; then +- log err "cannot execute /sbin/blkid" +- exit 1 +-fi +- + # Per Policy 9.3.2, directories under /var/run have to be created + # after every reboot. + if [ ! -e /var/run/usbmount ]; then +@@ -83,15 +78,7 @@ + trap '( lockfile-remove /var/run/usbmount/.mount )' 0 + log debug "acquired lock /var/run/usbmount/.mount.lock" + +- # Grab device information from device and "divide it" +- # FIXME: improvement: implement mounting by label (notice that labels +- # can contain spaces, which makes things a little bit less comfortable). +- DEVINFO=$(/sbin/blkid -p $DEVNAME) +- FSTYPE=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]TYPE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +- UUID=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]UUID="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +- USAGE=$(echo "$DEVINFO" | sed 's/.*[[:blank:]]USAGE="\([^"]*\)".*/\1/g; s/[[:blank:]]*//g;') +- +- if ! echo $USAGE | egrep -q "(filesystem|disklabel)"; then ++ if ! echo $ID_FS_USAGE | egrep -q "(filesystem|disklabel)"; then + log info "$DEVNAME does not contain a filesystem or disklabel" + exit 1 + fi +@@ -101,14 +88,14 @@ + log info "executing command: mount $DEVNAME" + mount $DEVNAME || log err "mount by DEVNAME with $DEVNAME wasn't successful; return code $?" + +- elif grep -q "^[[:blank:]]*UUID=$UUID" /etc/fstab; then +- log info "executing command: mount -U $UUID" +- mount -U $UUID || log err "mount by UUID with $UUID wasn't successful; return code $?" ++ elif grep -q "^[[:blank:]]*UUID=$ID_FS_UUID" /etc/fstab; then ++ log info "executing command: mount -U $ID_FS_UUID" ++ mount -U $ID_FS_UUID || log err "mount by UUID with $ID_FS_UUID wasn't successful; return code $?" + + else +- log debug "$DEVNAME contains filesystem type $FSTYPE" ++ log debug "$DEVNAME contains filesystem type $ID_FS_TYPE" + +- fstype=$FSTYPE ++ fstype=$ID_FS_TYPE + # Test if the filesystem type is in the list of filesystem + # types to mount. + if in_list "$fstype" "$FILESYSTEMS"; then +@@ -176,11 +163,13 @@ + + # Run hook scripts; ignore errors. + export UM_DEVICE="$DEVNAME" ++ export UM_UUID="$ID_FS_UUID" + export UM_MOUNTPOINT="$mountpoint" + export UM_FILESYSTEM="$fstype" + export UM_MOUNTOPTIONS="$options" + export UM_VENDOR="$vendor" + export UM_MODEL="$model" ++ export UM_LABEL="$ID_FS_LABEL" + log info "executing command: run-parts /etc/usbmount/mount.d" + run-parts /etc/usbmount/mount.d || : + else diff --git a/package/usbmount/Config.in b/package/usbmount/Config.in new file mode 100644 index 0000000000..0bb8883b96 --- /dev/null +++ b/package/usbmount/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_USBMOUNT + bool "usbmount" + depends on BR2_PACKAGE_HAS_UDEV + select BR2_PACKAGE_LOCKFILE_PROGS + help + The usbmount package automatically mounts USB mass storage devices + when they are plugged in, and unmounts them when they are removed. + + http://usbmount.alioth.debian.org/ + +comment "usbmount requires udev to be enabled" + depends on !BR2_PACKAGE_HAS_UDEV diff --git a/package/usbmount/usbmount.hash b/package/usbmount/usbmount.hash new file mode 100644 index 0000000000..4a5c7f202d --- /dev/null +++ b/package/usbmount/usbmount.hash @@ -0,0 +1,2 @@ +# From http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/u/usbmount/usbmount_0.0.22.dsc +sha256 a2b8581534b6c92f0376d202639dbc28862d3834dac64c35bde752f84975527d usbmount_0.0.22.tar.gz diff --git a/package/usbmount/usbmount.mk b/package/usbmount/usbmount.mk new file mode 100644 index 0000000000..066cbb828a --- /dev/null +++ b/package/usbmount/usbmount.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# usbmount +# +################################################################################ + +USBMOUNT_VERSION = 0.0.22 +USBMOUNT_SOURCE = usbmount_$(USBMOUNT_VERSION).tar.gz +USBMOUNT_SITE = http://snapshot.debian.org/archive/debian/20141023T043132Z/pool/main/u/usbmount +USBMOUNT_DEPENDENCIES = udev lockfile-progs +USBMOUNT_LICENSE = BSD-2c +USBMOUNT_LICENSE_FILES = debian/copyright + +define USBMOUNT_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/usbmount $(TARGET_DIR)/usr/share/usbmount/usbmount + + $(INSTALL) -m 0755 -D $(@D)/00_create_model_symlink \ + $(TARGET_DIR)/etc/usbmount/mount.d/00_create_model_symlink + $(INSTALL) -m 0755 -D $(@D)/00_remove_model_symlink \ + $(TARGET_DIR)/etc/usbmount/umount.d/00_remove_model_symlink + + $(INSTALL) -m 0644 -D $(@D)/usbmount.rules $(TARGET_DIR)/lib/udev/rules.d/usbmount.rules + $(INSTALL) -m 0644 -D $(@D)/usbmount.conf $(TARGET_DIR)/etc/usbmount/usbmount.conf + + mkdir -p $(addprefix $(TARGET_DIR)/media/usb,0 1 2 3 4 5 6 7) +endef + +$(eval $(generic-package)) diff --git a/package/usbredir/Config.in b/package/usbredir/Config.in new file mode 100644 index 0000000000..2157f9ce67 --- /dev/null +++ b/package/usbredir/Config.in @@ -0,0 +1,29 @@ +comment "usbredir needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_USBREDIR + bool "usbredir" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + select BR2_PACKAGE_LIBUSB + help + usbredir is the name of a network protocol for sending usb device + traffic over a network connection. It is also the name of the + software package offering a parsing library, a usbredirhost library + and several utilities implementing this protocol. + + Note: only the library is installed, not the utilities. Say 'y' + below if you want the server too. + + http://www.spice-space.org/page/UsbRedir + +if BR2_PACKAGE_USBREDIR + +config BR2_PACKAGE_USBREDIR_SERVER + bool "usbredirserver on target" + help + If you want to serve usbredir requests on your target, say 'y' + here to have the usbredir server on the target. + + Note: the server is not required to use the library. + +endif diff --git a/package/usbredir/usbredir.hash b/package/usbredir/usbredir.hash new file mode 100644 index 0000000000..9ba11771b4 --- /dev/null +++ b/package/usbredir/usbredir.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 407e9e27a1369f01264d5501ffbe88935ddd7d5de675f5835db05dc9c9ac56f3 usbredir-0.7.1.tar.bz2 diff --git a/package/usbredir/usbredir.mk b/package/usbredir/usbredir.mk new file mode 100644 index 0000000000..926a1fffd5 --- /dev/null +++ b/package/usbredir/usbredir.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# usbredir +# +################################################################################ + +USBREDIR_VERSION = 0.7.1 +USBREDIR_SOURCE = usbredir-$(USBREDIR_VERSION).tar.bz2 +USBREDIR_SITE = http://spice-space.org/download/usbredir +USBREDIR_LICENSE = LGPLv2.1+ +USBREDIR_LICENSE_FILES = COPYING.LIB +USBREDIR_INSTALL_STAGING = YES +USBREDIR_DEPENDENCIES = host-pkgconf libusb + +ifeq ($(BR2_PACKAGE_USBREDIR_SERVER),y) + +USBREDIR_LICENSE += (for the library), GPLv2+ (for the server) +USBREDIR_LICENSE_FILES += COPYING + +else # BR2_PACKAGE_USBREDIR_SERVER != y + +define USBREDIR_POST_INSTALL_TARGET_RM_SERVER + rm -f $(TARGET_DIR)/usr/sbin/usbredirserver +endef +USBREDIR_POST_INSTALL_TARGET_HOOKS += USBREDIR_POST_INSTALL_TARGET_RM_SERVER + +endif # BR2_PACKAGE_USBREDIR_SERVER + +$(eval $(autotools-package)) diff --git a/package/usbutils/Config.in b/package/usbutils/Config.in new file mode 100644 index 0000000000..923853af04 --- /dev/null +++ b/package/usbutils/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_USBUTILS + bool "usbutils" + depends on BR2_TOOLCHAIN_HAS_THREADS # libusb + depends on BR2_PACKAGE_HAS_UDEV # needs hwdb + select BR2_PACKAGE_LIBUSB + help + USB enumeration utilities + + http://linux-usb.sourceforge.net/ + +comment "usbutils needs udev /dev management and toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_HAS_UDEV diff --git a/package/usbutils/usbutils.hash b/package/usbutils/usbutils.hash new file mode 100644 index 0000000000..37c829a1ae --- /dev/null +++ b/package/usbutils/usbutils.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/usb/usbutils/sha256sums.asc +sha256 44741af0bae9d402a0ef160a29b2fa700bb656ab5e0a4b3343d51249c2a44c8c usbutils-008.tar.xz diff --git a/package/usbutils/usbutils.mk b/package/usbutils/usbutils.mk new file mode 100644 index 0000000000..c96a1f54ff --- /dev/null +++ b/package/usbutils/usbutils.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# usbutils +# +################################################################################ + +USBUTILS_VERSION = 008 +USBUTILS_SOURCE = usbutils-$(USBUTILS_VERSION).tar.xz +USBUTILS_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/usb/usbutils +USBUTILS_DEPENDENCIES = host-pkgconf libusb udev +USBUTILS_LICENSE = GPLv2+ +USBUTILS_LICENSE_FILES = COPYING + +# Build after busybox since it's got a lightweight lsusb +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +USBUTILS_DEPENDENCIES += busybox +endif + +# Nice lsusb.py script only if there's python +ifeq ($(BR2_PACKAGE_PYTHON),) +define USBUTILS_REMOVE_PYTHON + rm -f $(TARGET_DIR)/usr/bin/lsusb.py +endef + +USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_REMOVE_PYTHON +endif + +define USBUTILS_TARGET_CLEANUP + rm -f $(TARGET_DIR)/usr/bin/usb-devices +endef + +USBUTILS_POST_INSTALL_TARGET_HOOKS += USBUTILS_TARGET_CLEANUP + +$(eval $(autotools-package)) diff --git a/package/ushare/0001-compile-fixes.patch b/package/ushare/0001-compile-fixes.patch new file mode 100644 index 0000000000..cfdf5e3404 --- /dev/null +++ b/package/ushare/0001-compile-fixes.patch @@ -0,0 +1,206 @@ +Patch nixed from OpenWRT svn to fix build breakage. + +Signed-off-by: Gustavo Zacarias + +--- a/src/cds.c ++++ b/src/cds.c +@@ -20,6 +20,8 @@ + */ + + #include ++#include ++#include + #include + #include + +--- a/src/http.c ++++ b/src/http.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -77,8 +78,7 @@ set_info_file (struct File_Info *info, c + info->content_type = ixmlCloneDOMString (content_type); + } + +-static int +-http_get_info (const char *filename, struct File_Info *info) ++int http_get_info (const char *filename, struct File_Info *info) + { + extern struct ushare_t *ut; + struct upnp_entry_t *entry = NULL; +@@ -197,8 +197,7 @@ get_file_memory (const char *fullpath, c + return ((UpnpWebFileHandle) file); + } + +-static UpnpWebFileHandle +-http_open (const char *filename, enum UpnpOpenFileMode mode) ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode) + { + extern struct ushare_t *ut; + struct upnp_entry_t *entry = NULL; +@@ -251,8 +250,7 @@ http_open (const char *filename, enum Up + return ((UpnpWebFileHandle) file); + } + +-static int +-http_read (UpnpWebFileHandle fh, char *buf, size_t buflen) ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen) + { + struct web_file_t *file = (struct web_file_t *) fh; + ssize_t len = -1; +@@ -286,8 +284,7 @@ http_read (UpnpWebFileHandle fh, char *b + return len; + } + +-static int +-http_write (UpnpWebFileHandle fh __attribute__((unused)), ++int http_write (UpnpWebFileHandle fh __attribute__((unused)), + char *buf __attribute__((unused)), + size_t buflen __attribute__((unused))) + { +@@ -296,8 +293,7 @@ http_write (UpnpWebFileHandle fh __attri + return 0; + } + +-static int +-http_seek (UpnpWebFileHandle fh, off_t offset, int origin) ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin) + { + struct web_file_t *file = (struct web_file_t *) fh; + off_t newpos = -1; +@@ -371,8 +367,7 @@ http_seek (UpnpWebFileHandle fh, off_t o + return 0; + } + +-static int +-http_close (UpnpWebFileHandle fh) ++int http_close (UpnpWebFileHandle fh) + { + struct web_file_t *file = (struct web_file_t *) fh; + +@@ -402,13 +397,3 @@ http_close (UpnpWebFileHandle fh) + + return 0; + } +- +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks = +- { +- http_get_info, +- http_open, +- http_read, +- http_write, +- http_seek, +- http_close +- }; +--- a/src/http.h ++++ b/src/http.h +@@ -25,6 +25,18 @@ + #include + #include + +-struct UpnpVirtualDirCallbacks virtual_dir_callbacks; ++int http_get_info (const char *filename, struct File_Info *info); ++ ++UpnpWebFileHandle http_open (const char *filename, enum UpnpOpenFileMode mode); ++ ++int http_read (UpnpWebFileHandle fh, char *buf, size_t buflen); ++ ++int http_seek (UpnpWebFileHandle fh, off_t offset, int origin); ++ ++int http_write (UpnpWebFileHandle fh __attribute__((unused)), ++ char *buf __attribute__((unused)), ++ size_t buflen __attribute__((unused))); ++ ++int http_close (UpnpWebFileHandle fh); + + #endif /* _HTTP_H_ */ +--- a/src/ushare.c ++++ b/src/ushare.c +@@ -188,7 +188,7 @@ handle_action_request (struct Upnp_Actio + if (strcmp (request->DevUDN + 5, ut->udn)) + return; + +- ip = request->CtrlPtIPAddr.s_addr; ++ ip = (*(struct sockaddr_in *)&request->CtrlPtIPAddr).sin_addr.s_addr; + ip = ntohl (ip); + sprintf (val, "%d.%d.%d.%d", + (ip >> 24) & 0xFF, (ip >> 16) & 0xFF, (ip >> 8) & 0xFF, ip & 0xFF); +@@ -348,13 +348,23 @@ init_upnp (struct ushare_t *ut) + + UpnpEnableWebserver (TRUE); + +- res = UpnpSetVirtualDirCallbacks (&virtual_dir_callbacks); +- if (res != UPNP_E_SUCCESS) +- { +- log_error (_("Cannot set virtual directory callbacks\n")); +- free (description); +- return -1; +- } ++#define upnp_set_callback(cb, func) \ ++ do { \ ++ res = UpnpVirtualDir_set_##cb##Callback(func); \ ++ if (res != UPNP_E_SUCCESS) \ ++ { \ ++ log_error (_("Cannot set virtual directory callbacks\n")); \ ++ free (description); \ ++ return -1; \ ++ } \ ++ } while(0) ++ ++ upnp_set_callback(GetInfo, http_get_info); ++ upnp_set_callback(Open, http_open); ++ upnp_set_callback(Read, http_read); ++ upnp_set_callback(Seek, http_seek); ++ upnp_set_callback(Write, http_write); ++ upnp_set_callback(Close, http_close); + + res = UpnpAddVirtualDir (VIRTUAL_DIR); + if (res != UPNP_E_SUCCESS) +--- a/src/cms.c ++++ b/src/cms.c +@@ -20,6 +20,8 @@ + */ + + #include ++#include ++#include + #include + #include + +--- a/src/mime.c ++++ b/src/mime.c +@@ -20,6 +20,7 @@ + */ + + #include ++#include + #include + + #include "mime.h" +--- a/src/presentation.c ++++ b/src/presentation.c +@@ -19,6 +19,8 @@ + */ + + #include ++#include ++#include + + #if HAVE_LANGINFO_CODESET + # include +--- a/src/services.c ++++ b/src/services.c +@@ -20,6 +20,8 @@ + */ + + #include ++#include ++#include + #include + #include + diff --git a/package/ushare/0002-ushare-fix-building-with-gcc-5.x.patch b/package/ushare/0002-ushare-fix-building-with-gcc-5.x.patch new file mode 100644 index 0000000000..abef81fe4d --- /dev/null +++ b/package/ushare/0002-ushare-fix-building-with-gcc-5.x.patch @@ -0,0 +1,49 @@ +From 6abc52190accc8d8b17455420e234a1d7dc7ba55 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Mon, 16 Nov 2015 23:15:27 +0100 +Subject: [PATCH] ushare: fix building with gcc 5.x + +GCC5 defaults to -std=gnu11, which has different semantics for inline than +previous versions: + +https://gcc.gnu.org/gcc-5/porting_to.html + +Which causes linker issues when display_headers() and start_log() are +referenced from other files. There's no real reason why these needs to be +inline, so just drop the keyword. + +Signed-off-by: Peter Korsgaard +--- + src/trace.c | 2 +- + src/ushare.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/trace.c b/src/trace.c +index 50729ef..4e314ef 100644 +--- a/src/trace.c ++++ b/src/trace.c +@@ -57,7 +57,7 @@ print_log (log_level level, const char *format, ...) + va_end (va); + } + +-inline void ++void + start_log (void) + { + openlog (PACKAGE_NAME, LOG_PID, LOG_DAEMON); +diff --git a/src/ushare.c b/src/ushare.c +index b64451e..af46e78 100644 +--- a/src/ushare.c ++++ b/src/ushare.c +@@ -496,7 +496,7 @@ reload_config (int s __attribute__ ((unused))) + } + } + +-inline void ++void + display_headers (void) + { + printf (_("%s (version %s), a lightweight UPnP A/V and DLNA Media Server.\n"), +-- +2.1.4 + diff --git a/package/ushare/Config.in b/package/ushare/Config.in new file mode 100644 index 0000000000..eba7acf6c3 --- /dev/null +++ b/package/ushare/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_USHARE + bool "ushare" + depends on BR2_TOOLCHAIN_HAS_THREADS # libupnp + select BR2_PACKAGE_LIBUPNP + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + # ushare has a completely custom configure script that does + # broken things with library ordering, which breaks static + # linking. + depends on !BR2_STATIC_LIBS + help + uShare is a UPnP (TM) A/V & DLNA Media Server. + It implements the server component that provides UPnP media devices + with information on available multimedia files. + + http://ushare.geexbox.org/ + +comment "ushare needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/ushare/ushare.hash b/package/ushare/ushare.hash new file mode 100644 index 0000000000..77f0f0f85d --- /dev/null +++ b/package/ushare/ushare.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 7b9b85c79968d4f4560f02a99e33c6a33ff58f9d41d8faea79e31cce2ee78665 ushare-1.1a.tar.bz2 diff --git a/package/ushare/ushare.mk b/package/ushare/ushare.mk new file mode 100644 index 0000000000..25f880c35f --- /dev/null +++ b/package/ushare/ushare.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# ushare +# +################################################################################ + +USHARE_VERSION = 1.1a +USHARE_SOURCE = ushare-$(USHARE_VERSION).tar.bz2 +USHARE_SITE = http://ushare.geexbox.org/releases +USHARE_DEPENDENCIES = host-pkgconf libupnp +USHARE_LICENSE = GPLv2+ +USHARE_LICENSE_FILES = COPYING + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +USHARE_DEPENDENCIES += gettext +USHARE_LDFLAGS += -lintl +endif + +define USHARE_CONFIGURE_CMDS + (cd $(@D); \ + $(TARGET_CONFIGURE_OPTS) \ + ./configure --prefix=/usr $(DISABLE_NLS) --cross-compile \ + --cross-prefix="$(TARGET_CROSS)" --sysconfdir=/etc \ + --disable-strip \ + ) +endef + +define USHARE_BUILD_CMDS + $(MAKE) LDFLAGS="$(TARGET_LDFLAGS) $(USHARE_LDFLAGS)" -C $(@D) +endef + +define USHARE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + rm -f $(TARGET_DIR)/etc/init.d/ushare +endef + +# Even though configure is called it's not autoconf +$(eval $(generic-package)) diff --git a/package/ussp-push/0001-fix-build-against-bluez-4.patch b/package/ussp-push/0001-fix-build-against-bluez-4.patch new file mode 100644 index 0000000000..0694bfbadd --- /dev/null +++ b/package/ussp-push/0001-fix-build-against-bluez-4.patch @@ -0,0 +1,15 @@ +Fix build against bluez4. + +Signed-off-by: Samuel Martin + +--- ussp-push-0.11.orig/src/obex_socket.c 2012-11-01 09:58:51.049538708 +0100 ++++ ussp-push-0.11/src/obex_socket.c 2012-11-01 12:10:10.719506951 +0100 +@@ -197,7 +197,7 @@ static int bt_sock_name2bth(int devid, c + for (i = 0; i < niinf; i++) { + char devname[128]; + +- if (hci_remote_name(dd, &piinf[i].bdaddr, sizeof(devname) - 1, ++ if (hci_read_remote_name(dd, &piinf[i].bdaddr, sizeof(devname) - 1, + devname, 100000) >= 0) { + if (strcasecmp(devname, btname) == 0) { + *btaddr = piinf[i].bdaddr; diff --git a/package/ussp-push/Config.in b/package/ussp-push/Config.in new file mode 100644 index 0000000000..e6695bb197 --- /dev/null +++ b/package/ussp-push/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_USSP_PUSH + bool "ussp-push" + depends on !BR2_STATIC_LIBS # bluez_utils + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, alsa-lib, libglib2 + depends on BR2_USE_MMU # dbus + select BR2_PACKAGE_OPENOBEX + select BR2_PACKAGE_OPENOBEX_BLUEZ + select BR2_PACKAGE_BLUEZ_UTILS + help + ussp-push is an OBEX object pusher for Linux, using the BlueZ + BlueTooth stack. + + http://www.xmailserver.org/ussp-push.html + +comment "ussp-push needs a toolchain w/ wchar, threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/ussp-push/ussp-push.hash b/package/ussp-push/ussp-push.hash new file mode 100644 index 0000000000..91afb9d971 --- /dev/null +++ b/package/ussp-push/ussp-push.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 bb2748eaed6164812555b4a1e186c4f2820c5ef9ce30f12d7aac28a452719bbd ussp-push-0.11.tar.gz diff --git a/package/ussp-push/ussp-push.mk b/package/ussp-push/ussp-push.mk new file mode 100644 index 0000000000..c3d11f97bf --- /dev/null +++ b/package/ussp-push/ussp-push.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# ussp-push +# +################################################################################ + +USSP_PUSH_VERSION = 0.11 +USSP_PUSH_SITE = http://www.xmailserver.org +USSP_PUSH_LICENSE = GPLv2+ +USSP_PUSH_LICENSE_FILES = COPYING + +USSP_PUSH_DEPENDENCIES = bluez_utils openobex + +$(eval $(autotools-package)) diff --git a/package/ustr/Config.in b/package/ustr/Config.in new file mode 100644 index 0000000000..9d6561c343 --- /dev/null +++ b/package/ustr/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_USTR + bool "ustr" + # unconditionally builds a shared library + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # broken vsnprintf detection + help + A small, safe string library. + + http://www.and.org/ustr/ + +comment "ustr needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL diff --git a/package/ustr/ustr.hash b/package/ustr/ustr.hash new file mode 100644 index 0000000000..214d37a77a --- /dev/null +++ b/package/ustr/ustr.hash @@ -0,0 +1,4 @@ +# Locally computed +sha256 3daf6eae9f78de1e872c0b2b83cce35515b94d4bb8a074e48f331fd99e1fc2c4 ustr-1.0.4.tar.bz2 +# From http://debian.gtisc.gatech.edu/debian/pool/main/u/ustr/ustr_1.0.4-5.dsc +sha256 a21e78acf82dcccef2893932ef7b85852419bfd9b18382e63c34e7710c1d7762 ustr_1.0.4-5.debian.tar.xz diff --git a/package/ustr/ustr.mk b/package/ustr/ustr.mk new file mode 100644 index 0000000000..174f05565a --- /dev/null +++ b/package/ustr/ustr.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# ustr +# +################################################################################ + +USTR_VERSION = 1.0.4 +USTR_SOURCE = ustr-$(USTR_VERSION).tar.bz2 +USTR_SITE = http://www.and.org/ustr/$(USTR_VERSION) +USTR_LICENSE = BSD-2c, MIT, LGPLv2+ +USTR_LICENSE_FILES = LICENSE LICENSE_BSD LICENSE_LGPL LICENSE_MIT +USTR_AUTORECONF = YES +USTR_PATCH = \ + http://http.debian.net/debian/pool/main/u/ustr/ustr_$(USTR_VERSION)-5.debian.tar.xz + +USTR_INSTALL_STAGING = YES + +# ustr only builds the static library by default, but the default +# install rule will install both the static and the shared libraries, +# which means the shared one is build during the install step. :-( +# +# We can however instruct ustr to build both at build time, by adding +# 'all-shared' to the default 'all' rule. +USTR_MAKE_OPTS = all all-shared + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/util-linux/0001-Fix-libmount-build-under-uClibc.patch b/package/util-linux/0001-Fix-libmount-build-under-uClibc.patch new file mode 100644 index 0000000000..10cc3a506e --- /dev/null +++ b/package/util-linux/0001-Fix-libmount-build-under-uClibc.patch @@ -0,0 +1,153 @@ +From 44d733203637666926964957af7af23429ddcecf Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Mon, 18 Apr 2016 09:58:56 -0300 +Subject: [PATCH] Fix libmount build under uClibc + +See https://bugs.gentoo.org/show_bug.cgi?id=406303 +http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-apps/util-linux/files/util-linux-2.21.1-no-printf-alloc.patch?revision=1.2 + +[Gustavo: converted to git format for 2.28] + +Signed-off-by: Gustavo Zacarias +--- + configure.ac | 1 - + libmount/src/tab_parse.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 52 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 5a00403..3422f11 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -948,7 +948,6 @@ AC_ARG_ENABLE([libmount], + ) + UL_BUILD_INIT([libmount]) + UL_REQUIRES_BUILD([libmount], [libblkid]) +-UL_REQUIRES_HAVE([libmount], [scanf_alloc_modifier], [scanf string alloc modifier]) + AM_CONDITIONAL([BUILD_LIBMOUNT], [test "x$build_libmount" = xyes]) + AM_CONDITIONAL([BUILD_LIBMOUNT_TESTS], [test "x$build_libmount" = xyes -a "x$enable_static" = xyes]) + AS_IF([test "x$build_libmount" = xyes], [ +diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c +index 3f5e14a..2ff1795 100644 +--- a/libmount/src/tab_parse.c ++++ b/libmount/src/tab_parse.c +@@ -39,6 +39,10 @@ static void parser_cleanup(struct libmnt_parser *pa) + memset(pa, 0, sizeof(*pa)); + } + ++#ifndef HAVE_SCANF_MS_MODIFIER ++# define UL_SCNsA "%s" ++#endif ++ + static int next_number(char **s, int *num) + { + char *end = NULL; +@@ -69,16 +73,31 @@ static int mnt_parse_table_line(struct libmnt_fs *fs, char *s) + int rc, n = 0, xrc; + char *src = NULL, *fstype = NULL, *optstr = NULL; + ++#ifndef HAVE_SCANF_MS_MODIFIER ++ size_t len = strlen(s) + 1; ++ src = malloc(len); ++ fstype = malloc(len); ++ fs->target = malloc(len); ++ optstr = malloc(len); ++#endif ++ + rc = sscanf(s, UL_SCNsA" " /* (1) source */ + UL_SCNsA" " /* (2) target */ + UL_SCNsA" " /* (3) FS type */ + UL_SCNsA" " /* (4) options */ + "%n", /* byte count */ + ++#ifdef HAVE_SCANF_MS_MODIFIER + &src, + &fs->target, + &fstype, + &optstr, ++#else ++ src, ++ fs->target, ++ fstype, ++ optstr, ++#endif + &n); + xrc = rc; + +@@ -144,6 +163,16 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s) + unsigned int maj, min; + char *fstype = NULL, *src = NULL, *p; + ++#ifndef HAVE_SCANF_MS_MODIFIER ++ size_t len = strlen(s) + 1; ++ fs->root = malloc(len); ++ fs->target = malloc(len); ++ fs->vfs_optstr = malloc(len); ++ fs->fs_optstr = malloc(len); ++ fstype = malloc(len); ++ src = malloc(len); ++#endif ++ + rc = sscanf(s, "%d " /* (1) id */ + "%d " /* (2) parent */ + "%u:%u " /* (3) maj:min */ +@@ -155,9 +184,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s) + &fs->id, + &fs->parent, + &maj, &min, ++#ifdef HAVE_SCANF_MS_MODIFIER + &fs->root, + &fs->target, + &fs->vfs_optstr, ++#else ++ fs->root, ++ fs->target, ++ fs->vfs_optstr, ++#endif + &end); + + if (rc >= 7 && end > 0) +@@ -177,9 +212,15 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s) + UL_SCNsA" " /* (9) source */ + UL_SCNsA, /* (10) fs options (fs specific) */ + ++#ifdef HAVE_SCANF_MS_MODIFIER + &fstype, + &src, + &fs->fs_optstr); ++#else ++ fstype, ++ src, ++ fs->fs_optstr); ++#endif + + if (rc >= 10) { + size_t sz; +@@ -298,14 +339,25 @@ static int mnt_parse_swaps_line(struct libmnt_fs *fs, char *s) + int rc; + char *src = NULL; + ++#ifndef HAVE_SCANF_MS_MODIFIER ++ size_t len = strlen(s) + 1; ++ src = malloc(len); ++ fs->swaptype = malloc(len); ++#endif ++ + rc = sscanf(s, UL_SCNsA" " /* (1) source */ + UL_SCNsA" " /* (2) type */ + "%ju" /* (3) size */ + "%ju" /* (4) used */ + "%d", /* priority */ + ++#ifdef HAVE_SCANF_MS_MODIFIER + &src, + &fs->swaptype, ++#else ++ src, ++ fs->swaptype, ++#endif + &fsz, + &usz, + &fs->priority); +-- +2.7.3 + diff --git a/package/util-linux/Config.in b/package/util-linux/Config.in new file mode 100644 index 0000000000..8a36c0ab48 --- /dev/null +++ b/package/util-linux/Config.in @@ -0,0 +1,297 @@ +menuconfig BR2_PACKAGE_UTIL_LINUX + bool "util-linux" + depends on BR2_USE_WCHAR + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + Various useful/essential linux libraries and utilities. + + Things like mkfs, mkswap, swapon, fdisk, mount, dmesg, etc... + + http://www.kernel.org/pub/linux/utils/util-linux/ + +if BR2_PACKAGE_UTIL_LINUX + +config BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + depends on BR2_USE_MMU # fork + bool "libblkid" + help + Install libblkid. + +config BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + depends on BR2_USE_MMU # util-linux/libblkid + bool "libmount" + help + Install libmount. + +config BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + bool "libsmartcols" + depends on BR2_USE_MMU # fork + help + Install libsmartcols. + +config BR2_PACKAGE_UTIL_LINUX_LIBUUID + bool "libuuid" + help + Install libuuid. + +config BR2_PACKAGE_UTIL_LINUX_BINARIES + bool "install utilities" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT + select BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + Install the basic set of util-linux binaries. + +if BR2_PACKAGE_UTIL_LINUX_BINARIES + +config BR2_PACKAGE_UTIL_LINUX_AGETTY + bool "agetty" + help + Alternative linux getty + +config BR2_PACKAGE_UTIL_LINUX_BFS + bool "bfs" + help + SCO bfs filesystem support + +config BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH + bool "chfn/chsh" + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + select BR2_PACKAGE_LINUX_PAM + help + Change login shell, real user name and information + +comment "chfn/chsh needs a uClibc or (e)glibc toolchain w/ wchar, locale, dynamic library" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_UTIL_LINUX_CRAMFS + bool "cramfs utilities" + select BR2_PACKAGE_ZLIB + help + Build fsck.cramfs and mkfs.cramfs + +config BR2_PACKAGE_UTIL_LINUX_EJECT + bool "eject" + help + Eject removable media + +config BR2_PACKAGE_UTIL_LINUX_FALLOCATE + bool "fallocate" + help + Preallocate space to a file + +config BR2_PACKAGE_UTIL_LINUX_FDFORMAT + bool "fdformat" + help + Low-level format a floppy disk + +config BR2_PACKAGE_UTIL_LINUX_FINDFS + bool "findfs" + help + Find a filesystem by label or UUID + +config BR2_PACKAGE_UTIL_LINUX_FSCK + bool "fsck" + help + Check and repair a linux filesystem + +config BR2_PACKAGE_UTIL_LINUX_HWCLOCK + bool "hwclock" + help + Query or set the hardware clock (RTC) + +config BR2_PACKAGE_UTIL_LINUX_KILL + bool "kill" + help + Send a signal to a process + +config BR2_PACKAGE_UTIL_LINUX_LAST + bool "last" + help + Show a listing of last logged in users + +config BR2_PACKAGE_UTIL_LINUX_LINE + bool "line" + help + Read one line + +config BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS + bool "login utilities" + depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam + depends on !BR2_STATIC_LIBS + depends on !BR2_TOOLCHAIN_USES_MUSL # linux-pam + select BR2_PACKAGE_LINUX_PAM + help + Build login utilities (last, login, su, sulogin) + +comment "login utilities needs a uClibc or (e)glibc toolchain w/ wchar, locale, dynamic library" + depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \ + || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL + +config BR2_PACKAGE_UTIL_LINUX_LOSETUP + bool "losetup" + help + Set up and control loop devices + +config BR2_PACKAGE_UTIL_LINUX_LSBLK + bool "lsblk" + help + List block devices. + +config BR2_PACKAGE_UTIL_LINUX_MESG + bool "mesg" + help + Control write access to your terminal + +config BR2_PACKAGE_UTIL_LINUX_MINIX + bool "minix" + help + Minix filesystem support + +config BR2_PACKAGE_UTIL_LINUX_MORE + bool "more" + select BR2_PACKAGE_NCURSES + help + File perusal filter for crt viewing + +config BR2_PACKAGE_UTIL_LINUX_MOUNT + bool "mount/umount" + help + Mount/unmount filesystems + +config BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT + bool "mountpoint" + help + See if a directory is a mountpoint + +config BR2_PACKAGE_UTIL_LINUX_NEWGRP + bool "newgrp" + help + Log in to a new group + +config BR2_PACKAGE_UTIL_LINUX_NOLOGIN + bool "nologin" + help + Politely refuse a login + +config BR2_PACKAGE_UTIL_LINUX_NSENTER + bool "nsenter" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + help + Enter the namespaces of another process. + +comment "nsenter needs a toolchain w/ headers >= 3.0" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + +config BR2_PACKAGE_UTIL_LINUX_PARTX + bool "partition utilities" + help + Partition tools (addpart, delpart, partx) + +config BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT + bool "pivot_root" + help + Change the root filesystem + +config BR2_PACKAGE_UTIL_LINUX_RAW + bool "raw" + help + Build a linux raw character device + +config BR2_PACKAGE_UTIL_LINUX_RENAME + bool "rename" + help + Rename files + +config BR2_PACKAGE_UTIL_LINUX_RESET + bool "reset" + help + Reset the terminal + +config BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS + bool "schedutils" + help + Scheduling utilities (chrt, ionice, taskset) + +config BR2_PACKAGE_UTIL_LINUX_SETPRIV + bool "setpriv" + select BR2_PACKAGE_LIBCAP_NG + help + Run a program with different Linux privilege settings + +config BR2_PACKAGE_UTIL_LINUX_SETTERM + bool "setterm" + select BR2_PACKAGE_NCURSES + help + Set terminal attributes + +config BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT + bool "switch_root" + help + Switch to another filesystem as the root of the mount tree + +config BR2_PACKAGE_UTIL_LINUX_TUNELP + bool "tunelp" + select BR2_PACKAGE_NCURSES + help + Set various parameters for the lp device + +config BR2_PACKAGE_UTIL_LINUX_UL + bool "ul" + select BR2_PACKAGE_NCURSES + help + Do underlining + +config BR2_PACKAGE_UTIL_LINUX_UNSHARE + bool "unshare" + help + Run program with some namespaces unshared from parent + +config BR2_PACKAGE_UTIL_LINUX_UTMPDUMP + bool "utmpdump" + help + Dump UTMP and WTMP files in raw format + +config BR2_PACKAGE_UTIL_LINUX_UUIDD + bool "uuidd" + help + UUID generation daemon + +config BR2_PACKAGE_UTIL_LINUX_VIPW + bool "vipw" + help + Edit the password, group, shadow-password or shadow-group file + +config BR2_PACKAGE_UTIL_LINUX_WALL + bool "wall" + help + Send a message to everybody's terminal + +config BR2_PACKAGE_UTIL_LINUX_WDCTL + bool "wdctl" + help + Shows hardware watchdog status + +config BR2_PACKAGE_UTIL_LINUX_WRITE + bool "write" + help + Send a message to another user + +config BR2_PACKAGE_UTIL_LINUX_ZRAMCTL + bool "zramctl" + help + Set up and control zram devices + +endif + +endif + +comment "util-linux needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/util-linux/Config.in.host b/package/util-linux/Config.in.host new file mode 100644 index 0000000000..f73dc43dbc --- /dev/null +++ b/package/util-linux/Config.in.host @@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_UTIL_LINUX + bool "host util-linux" + help + Various useful/essential linux libraries and utilities. + + Things like mkfs, mkswap, swapon, fdisk, mount, dmesg, etc... + + http://www.kernel.org/pub/linux/utils/util-linux/ diff --git a/package/util-linux/su.pam b/package/util-linux/su.pam new file mode 100644 index 0000000000..f000c39dbd --- /dev/null +++ b/package/util-linux/su.pam @@ -0,0 +1,13 @@ +auth sufficient pam_rootok.so +auth required pam_wheel.so use_uid +auth required pam_env.so +auth required pam_unix.so nullok + +account required pam_unix.so + +password required pam_unix.so nullok + +session required pam_limits.so +session required pam_env.so +session required pam_unix.so +session optional pam_lastlog.so diff --git a/package/util-linux/util-linux.hash b/package/util-linux/util-linux.hash new file mode 100644 index 0000000000..ca581025c8 --- /dev/null +++ b/package/util-linux/util-linux.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/linux/utils/util-linux/v2.28/sha256sums.asc +sha256 395847e2a18a2c317170f238892751e73a57104565344f8644090c8b091014bb util-linux-2.28.tar.xz diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk new file mode 100644 index 0000000000..93f45c20d8 --- /dev/null +++ b/package/util-linux/util-linux.mk @@ -0,0 +1,190 @@ +################################################################################ +# +# util-linux +# +################################################################################ + +UTIL_LINUX_VERSION = 2.28 +UTIL_LINUX_SOURCE = util-linux-$(UTIL_LINUX_VERSION).tar.xz +UTIL_LINUX_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/util-linux/v$(UTIL_LINUX_VERSION) + +# README.licensing claims that some files are GPLv2-only, but this is not true. +# Some files are GPLv3+ but only in tests. +UTIL_LINUX_LICENSE = GPLv2+, BSD-4c, libblkid and libmount LGPLv2.1+, libuuid BSD-3c +UTIL_LINUX_LICENSE_FILES = README.licensing Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.UCB Documentation/licenses/COPYING.LGPLv2.1 Documentation/licenses/COPYING.BSD-3 +# For 0001-Fix-libmount-build-under-uClibc.patch +UTIL_LINUX_AUTORECONF = YES +UTIL_LINUX_INSTALL_STAGING = YES +UTIL_LINUX_DEPENDENCIES = host-pkgconf +# uClibc needs NTP_LEGACY for sys/timex.h -> ntp_gettime() support +# (used in logger.c), and the common default is N. +UTIL_LINUX_CONF_ENV = scanf_cv_type_modifier=no \ + $(if $(BR2_TOOLCHAIN_USES_UCLIBC),ac_cv_header_sys_timex_h=no) +UTIL_LINUX_CONF_OPTS += \ + --disable-rpath \ + --disable-makeinstall-chown + +# system depends on util-linux so we enable systemd support +# (which needs systemd to be installed) +UTIL_LINUX_CONF_OPTS += \ + --without-systemd \ + --with-systemdsystemunitdir=no + +# We don't want the host-busybox dependency to be added automatically +HOST_UTIL_LINUX_DEPENDENCIES = host-pkgconf + +# We also don't want the host-python dependency +HOST_UTIL_LINUX_CONF_OPTS = --without-python + +# If both util-linux and busybox are selected, make certain util-linux +# wins the fight over who gets to have their utils actually installed +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +UTIL_LINUX_DEPENDENCIES += busybox +endif + +ifeq ($(BR2_PACKAGE_NCURSES),y) +UTIL_LINUX_DEPENDENCIES += ncurses +else +UTIL_LINUX_CONF_OPTS += --without-ncurses +endif + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y) +UTIL_LINUX_DEPENDENCIES += gettext +UTIL_LINUX_MAKE_OPTS += LIBS=-lintl +endif + +ifeq ($(BR2_PACKAGE_LIBCAP_NG),y) +UTIL_LINUX_DEPENDENCIES += libcap-ng +endif + +# Used by cramfs utils +UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_ZLIB),zlib) + +# Used by login-utils +UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_LINUX_PAM),linux-pam) + +# Disable/Enable utilities +UTIL_LINUX_CONF_OPTS += \ + $(if $(BR2_PACKAGE_UTIL_LINUX_AGETTY),--enable-agetty,--disable-agetty) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_BFS),--enable-bfs,--disable-bfs) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_CHFN_CHSH),--enable-chfn-chsh,--disable-chfn-chsh) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_CRAMFS),--enable-cramfs,--disable-cramfs) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_EJECT),--enable-eject,--disable-eject) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_FALLOCATE),--enable-fallocate,--disable-fallocate) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_FDFORMAT),--enable-fdformat,--disable-fdformat) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_FINDFS),--enable-findfs,--disable-findfs) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_FSCK),--enable-fsck,--disable-fsck) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_HWCLOCK),--enable-hwclock,--disable-hwclock) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_KILL),--enable-kill,--disable-kill) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LAST),--enable-last,--disable-last) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),--enable-libblkid,--disable-libblkid) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),--enable-libmount,--disable-libmount) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBSMARTCOLS),--enable-libsmartcols,--disable-libsmartcols) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LIBUUID),--enable-libuuid,--disable-libuuid) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LINE),--enable-line,--disable-line) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),--enable-last --enable-login --enable-runuser --enable-su --enable-sulogin,--disable-last --disable-login --disable-runuser --disable-su --disable-sulogin) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LOSETUP),--enable-losetup,--disable-losetup) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_LSBLK),--enable-lsblk,--disable-lsblk) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_MESG),--enable-mesg,--disable-mesg) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_MINIX),--enable-minix,--disable-minix) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_MORE),--enable-more,--disable-more) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_MOUNT),--enable-mount,--disable-mount) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_MOUNTPOINT),--enable-mountpoint,--disable-mountpoint) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_NEWGRP),--enable-newgrp,--disable-newgrp) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_NOLOGIN),--enable-nologin,--disable-nologin) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_NSENTER),--enable-nsenter,--disable-nsenter) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_PARTX),--enable-partx,--disable-partx) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_PIVOT_ROOT),--enable-pivot_root,--disable-pivot_root) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RAW),--enable-raw,--disable-raw) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RENAME),--enable-rename,--disable-rename) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_RESET),--enable-reset,--disable-reset) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SCHEDUTILS),--enable-schedutils,--disable-schedutils) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SETPRIV),--enable-setpriv,--disable-setpriv) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SETTERM),--enable-setterm,--disable-setterm) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_SWITCH_ROOT),--enable-switch_root,--disable-switch_root) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_TUNELP),--enable-tunelp,--disable-tunelp) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_UL),--enable-ul,--disable-ul) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_UNSHARE),--enable-unshare,--disable-unshare) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_UTMPDUMP),--enable-utmpdump,--disable-utmpdump) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_UUIDD),--enable-uuidd,--disable-uuidd) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_VIPW),--enable-vipw,--disable-vipw) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_WALL),--enable-wall,--disable-wall) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_WDCTL),--enable-wdctl,--disable-wdctl) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_WRITE),--enable-write,--disable-write) \ + $(if $(BR2_PACKAGE_UTIL_LINUX_ZRAMCTL),--enable-zramctl,--disable-zramctl) + +# In the host version of util-linux, we so far only require libuuid, +# and none of the util-linux utilities, so we disable all of them, unless +# BR2_PACKAGE_HOST_UTIL_LINUX is set + +HOST_UTIL_LINUX_CONF_OPTS += \ + --enable-libuuid \ + --disable-libblkid --disable-libmount \ + --without-ncurses + +ifeq ($(BR2_PACKAGE_HOST_UTIL_LINUX),y) +HOST_UTIL_LINUX_CONF_OPTS += --disable-makeinstall-chown +# disable more command because of ncurses dependency +HOST_UTIL_LINUX_CONF_OPTS += --disable-more +else +HOST_UTIL_LINUX_CONF_OPTS += --disable-all-programs +endif + +# Avoid building the tools if they are disabled since we can't install on +# a per-directory basis. +ifeq ($(BR2_PACKAGE_UTIL_LINUX_BINARIES),) +UTIL_LINUX_CONF_OPTS += --disable-all-programs +endif + +# Install libmount Python bindings +ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y) +UTIL_LINUX_CONF_OPTS += --with-python +UTIL_LINUX_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,python3) +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBMOUNT),y) +UTIL_LINUX_CONF_OPTS += --enable-pylibmount +else +UTIL_LINUX_CONF_OPTS += --disable-pylibmount +endif +else +UTIL_LINUX_CONF_OPTS += --without-python +endif + +# Install PAM configuration files +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LOGIN_UTILS),y) +define UTIL_LINUX_INSTALL_PAMFILES + $(INSTALL) -m 0644 package/util-linux/su.pam \ + $(TARGET_DIR)/etc/pam.d/su + $(INSTALL) -m 0644 package/util-linux/su.pam \ + $(TARGET_DIR)/etc/pam.d/su-l +endef +endif + +UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_INSTALL_PAMFILES + +# Install agetty->getty symlink to avoid breakage when there's no busybox +ifeq ($(BR2_PACKAGE_UTIL_LINUX_AGETTY),y) +ifeq ($(BR2_PACKAGE_BUSYBOX),) +define UTIL_LINUX_GETTY_SYMLINK + ln -sf agetty $(TARGET_DIR)/sbin/getty +endef +endif +endif + +UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_GETTY_SYMLINK + +ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE)$(BR2_PACKAGE_UTIL_LINUX_LIBUUID),yy) +define UTIL_LINUX_TWEAK_UUID_PC + $(SED) '/Libs\.private: .*/d' $(STAGING_DIR)/usr/lib/pkgconfig/uuid.pc + printf "Libs.private: -lintl\n" >>$(STAGING_DIR)/usr/lib/pkgconfig/uuid.pc +endef +UTIL_LINUX_POST_INSTALL_TARGET_HOOKS += UTIL_LINUX_TWEAK_UUID_PC +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) + +# MKINSTALLDIRS comes from tweaked m4/nls.m4, but autoreconf uses staging +# one, so it disappears +UTIL_LINUX_INSTALL_STAGING_OPTS += MKINSTALLDIRS=$(@D)/config/mkinstalldirs +UTIL_LINUX_INSTALL_TARGET_OPTS += MKINSTALLDIRS=$(@D)/config/mkinstalldirs +HOST_UTIL_LINUX_INSTALL_OPTS += MKINSTALLDIRS=$(@D)/config/mkinstalldirs diff --git a/package/ux500-firmware/Config.in b/package/ux500-firmware/Config.in new file mode 100644 index 0000000000..7e8a94b2a4 --- /dev/null +++ b/package/ux500-firmware/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_UX500_FIRMWARE + bool "ux500-firmware" + help + This package provides various binary firmware files (closed binary blobs) + for the Azurewave AW-NH580 combo module (wifi, bt, gps). + + https://launchpad.net/~igloocommunity-maintainers/+archive/snowball/+files/ diff --git a/package/ux500-firmware/ux500-firmware.hash b/package/ux500-firmware/ux500-firmware.hash new file mode 100644 index 0000000000..1028cc0e12 --- /dev/null +++ b/package/ux500-firmware/ux500-firmware.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 81633274a9157c076e5e09b5addd81fbcef504b829fc801041cea50eea774bcd ux500-firmware_1.1.3-6linaro1.tar.gz diff --git a/package/ux500-firmware/ux500-firmware.mk b/package/ux500-firmware/ux500-firmware.mk new file mode 100644 index 0000000000..7e947f35af --- /dev/null +++ b/package/ux500-firmware/ux500-firmware.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# ux500-firmware +# +################################################################################ + +UX500_FIRMWARE_VERSION = 1.1.3-6 +UX500_FIRMWARE_SOURCE = ux500-firmware_$(UX500_FIRMWARE_VERSION)linaro1.tar.gz +UX500_FIRMWARE_SITE = https://launchpad.net/~igloocommunity-maintainers/+archive/snowball/+files +UX500_FIRMWARE_LICENSE = Snowball click-wrap license +UX500_FIRMWARE_LICENSE_FILES = license.txt +UX500_FIRMWARE_REDISTRIBUTE = NO + +# The CG2900 linux driver has to load firmware named CG29XX_* but the firmware +# filenames contained in this package are CG2900_* hence the code below +define UX500_FIRMWARE_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install + for f in $(TARGET_DIR)/lib/firmware/CG2900* ; do \ + mv $$f $${f/CG2900/CG29XX}; \ + done +endef + +$(eval $(generic-package)) diff --git a/package/v4l2grab/Config.in b/package/v4l2grab/Config.in new file mode 100644 index 0000000000..ec3a7a8c54 --- /dev/null +++ b/package/v4l2grab/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_V4L2GRAB + bool "v4l2grab" + depends on BR2_TOOLCHAIN_HAS_THREADS # libv4l + depends on BR2_USE_MMU # libv4l + depends on !BR2_STATIC_LIBS # libv4l + depends on BR2_INSTALL_LIBSTDCPP # libv4l + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # libv4l + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBV4L + help + Utility for grabbing JPEGs form V4L2 devices. This tool is + similar to v4l2grab available from libv4l contrib directory, + but provides additional features such as JPEG output. + + http://www.twam.info/software/v4l2grab-grabbing-jpegs-from-v4l2-devices + +comment "v4l2grab needs a toolchain w/ threads, dynamic library, C++ and headers >= 3.0" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \ + || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 diff --git a/package/v4l2grab/v4l2grab.hash b/package/v4l2grab/v4l2grab.hash new file mode 100644 index 0000000000..17beeec636 --- /dev/null +++ b/package/v4l2grab/v4l2grab.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 ed5b9ca16c3b82d283df69c46aabd6c976b166b4e77b660288d86a147b68caf9 v4l2grab-6a52a234e227a30e16591d1a0e7afc52a2c5d964.tar.gz diff --git a/package/v4l2grab/v4l2grab.mk b/package/v4l2grab/v4l2grab.mk new file mode 100644 index 0000000000..b6f26c6c6a --- /dev/null +++ b/package/v4l2grab/v4l2grab.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# v4l2grab +# +################################################################################ + +V4L2GRAB_VERSION = 6a52a234e227a30e16591d1a0e7afc52a2c5d964 +V4L2GRAB_SITE = $(call github,twam,v4l2grab,$(V4L2GRAB_VERSION)) +V4L2GRAB_LICENSE = GPLv2+ +V4L2GRAB_LICENSE_FILES = LICENSE.md +# Fetched from github, no pre-generated configure script provided +V4L2GRAB_AUTORECONF = YES +V4L2GRAB_DEPENDENCIES = jpeg libv4l + +$(eval $(autotools-package)) diff --git a/package/vala/0001-dont-add-dirty-to-valac-version.patch b/package/vala/0001-dont-add-dirty-to-valac-version.patch new file mode 100644 index 0000000000..a2a0623369 --- /dev/null +++ b/package/vala/0001-dont-add-dirty-to-valac-version.patch @@ -0,0 +1,25 @@ +valac: don't append -dirty to version + +Don't append -dirty to the valac version number if the Buildroot Git +tree has uncommited changes. + +The patched script is meant for the valac developers, but it also +activates if you build valac in a subdirectory of a Git tree (e.g. +as is commonly done in Buildroot). + +The effect is that valac gets built as being version x.y.z-dirty, which +breaks programs (such as Midori) that explicitly check for valac-x.y.z. + +Signed-off-by: Simon Dawson +diff -Nur a/build-aux/git-version-gen b/build-aux/git-version-gen +--- a/build-aux/git-version-gen 2010-08-15 12:49:03.000000000 +0100 ++++ b/build-aux/git-version-gen 2012-05-14 10:17:19.977204570 +0100 +@@ -135,7 +135,7 @@ + *) # Append the suffix only if there isn't one already. + case $v in + *-dirty) ;; +- *) v="$v-dirty" ;; ++ #*) v="$v-dirty" ;; + esac ;; + esac + diff --git a/package/vala/vala-wrapper b/package/vala/vala-wrapper new file mode 100644 index 0000000000..ae2f7ca671 --- /dev/null +++ b/package/vala/vala-wrapper @@ -0,0 +1,2 @@ +#!/bin/sh +$0-@VALA_VERSION@ --vapidir=${STAGING_DIR}/usr/share/vala/vapi --girdir=${STAGING_DIR}/usr/share/gir-1.0 $@ diff --git a/package/vala/vala.hash b/package/vala/vala.hash new file mode 100644 index 0000000000..930196430a --- /dev/null +++ b/package/vala/vala.hash @@ -0,0 +1,2 @@ +# From https://download.gnome.org/sources/vala/0.32/vala-0.32.0.sha256sum +sha256 07a2aa4ede040789b4b5af817a42249d703bfe8affccb7732ca2b53d00c1fb6e vala-0.32.0.tar.xz diff --git a/package/vala/vala.mk b/package/vala/vala.mk new file mode 100644 index 0000000000..b236c54f9c --- /dev/null +++ b/package/vala/vala.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# vala +# +################################################################################ + +VALA_VERSION_MAJOR = 0.32 +VALA_VERSION = $(VALA_VERSION_MAJOR).0 +VALA_SITE = http://download.gnome.org/sources/vala/$(VALA_VERSION_MAJOR) +VALA_SOURCE = vala-$(VALA_VERSION).tar.xz +VALA_LICENSE = LGPLv2.1+ +VALA_LICENSE_FILES = COPYING + +HOST_VALA_DEPENDENCIES = host-bison host-flex host-libglib2 +# Yes, the autoconf script understands ':' as "xsltproc is not +# available". +HOST_VALA_CONF_ENV = ac_cv_path_XSLTPROC=: + +# We wrap vala & valac to point to the proper gir and vapi data dirs +# Otherwise we'll get host directory data which isn't enough +define HOST_VALA_INSTALL_WRAPPER + $(INSTALL) -D -m 0755 package/vala/vala-wrapper \ + $(HOST_DIR)/usr/bin/vala + $(INSTALL) -D -m 0755 package/vala/vala-wrapper \ + $(HOST_DIR)/usr/bin/valac + $(SED) 's,@VALA_VERSION@,$(VALA_VERSION_MAJOR),' \ + $(HOST_DIR)/usr/bin/vala \ + $(HOST_DIR)/usr/bin/valac +endef +HOST_VALA_POST_INSTALL_HOOKS += HOST_VALA_INSTALL_WRAPPER + +$(eval $(host-autotools-package)) diff --git a/package/valgrind/0001-workaround-SIGSEGV-on-PPC.patch b/package/valgrind/0001-workaround-SIGSEGV-on-PPC.patch new file mode 100644 index 0000000000..8a6003cbae --- /dev/null +++ b/package/valgrind/0001-workaround-SIGSEGV-on-PPC.patch @@ -0,0 +1,32 @@ +From ff29b837f21a69c79289c3a87b03f8c23e05616e Mon Sep 17 00:00:00 2001 +From: Pierre Habouzit +Date: Tue, 10 May 2011 23:11:45 +0200 +Subject: [PATCH] workaround SIGSEGV on PPC. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Pierre Habouzit +Signed-off-by: Jérôme Pouiller +--- + coregrind/m_machine.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c +index 6110c93..298a00e 100644 +--- a/coregrind/m_machine.c ++++ b/coregrind/m_machine.c +@@ -27,6 +27,10 @@ + The GNU General Public License is contained in the file COPYING. + */ + ++#ifdef __powerpc__ ++# pragma GCC optimize ("-O0") ++#endif ++ + #include "pub_core_basics.h" + #include "pub_core_vki.h" + #include "pub_core_threadstate.h" +-- +2.1.4 + diff --git a/package/valgrind/0002-Define-PTRACE_GETSIGINFO-on-PowerPC-when-not-availab.patch b/package/valgrind/0002-Define-PTRACE_GETSIGINFO-on-PowerPC-when-not-availab.patch new file mode 100644 index 0000000000..44adfc4190 --- /dev/null +++ b/package/valgrind/0002-Define-PTRACE_GETSIGINFO-on-PowerPC-when-not-availab.patch @@ -0,0 +1,37 @@ +From 7311686d6286972ff97cc18b2416a4cdd7fc5c7e Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 31 Oct 2015 12:15:24 +0100 +Subject: [PATCH] Define PTRACE_GETSIGINFO on PowerPC when not available + +uClibc 0.9.33.2 does not define PTRACE_GETSIGINFO in PowerPC. Even +though Buildroot has a uClibc patch doing that, it doesn't solve the +case of external uClibc toolchain from other sources (such as +Crosstool-NG). Therefore, this patch modifies Valgrind to define +PTRACE_GETSIGINFO on PowerPC to the right value, when such definition +is not available from the C library. + +Signed-off-by: Thomas Petazzoni +--- + coregrind/vgdb-invoker-ptrace.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/coregrind/vgdb-invoker-ptrace.c b/coregrind/vgdb-invoker-ptrace.c +index d65f59a..bdefac2 100644 +--- a/coregrind/vgdb-invoker-ptrace.c ++++ b/coregrind/vgdb-invoker-ptrace.c +@@ -72,6 +72,12 @@ + # endif + #endif + ++#if defined(__powerpc__) ++# ifndef PTRACE_GETSIGINFO ++# define PTRACE_GETSIGINFO 0x4202 ++# endif ++#endif ++ + // 32-bit or 64-bit wide, depending on primary architecture. + typedef Addr CORE_ADDR; + typedef Addr PTRACE_XFER_TYPE; +-- +2.1.4 + diff --git a/package/valgrind/0003-mips-replace-addi-with-addiu.patch b/package/valgrind/0003-mips-replace-addi-with-addiu.patch new file mode 100644 index 0000000000..624f6fa39b --- /dev/null +++ b/package/valgrind/0003-mips-replace-addi-with-addiu.patch @@ -0,0 +1,137 @@ +mips: replace addi with addiu + +ADDI instruction has been removed in R6 so let's use ADDIU instead. + +This patch has been sent upstream: + + https://bugs.kde.org/show_bug.cgi?id=356112 + +Signed-off-by: Vicente Olivert Riera + +Index: valgrind/coregrind/m_dispatch/dispatch-mips32-linux.S +=================================================================== +--- valgrind/coregrind/m_dispatch/dispatch-mips32-linux.S (revision 15740) ++++ valgrind/coregrind/m_dispatch/dispatch-mips32-linux.S (working copy) +@@ -196,7 +196,7 @@ + addu $13, $13, $14 + + lw $12, 0($13) /* t3 = VG_(tt_fast)[hash] :: ULong* */ +- addi $13, $13, 4 ++ addiu $13, $13, 4 + lw $25, 0($13) /* little-endian, so comparing 1st 32bit word */ + nop + +Index: valgrind/coregrind/m_dispatch/dispatch-mips64-linux.S +=================================================================== +--- valgrind/coregrind/m_dispatch/dispatch-mips64-linux.S (revision 15740) ++++ valgrind/coregrind/m_dispatch/dispatch-mips64-linux.S (working copy) +@@ -196,7 +196,7 @@ + daddu $13, $13, $14 + + ld $12, 0($13) /* t3 = VG_(tt_fast)[hash] :: ULong* */ +- daddi $13, $13, 8 ++ daddiu $13, $13, 8 + ld $25, 0($13) /* little-endian, so comparing 1st 32bit word */ + nop + +Index: valgrind/coregrind/m_libcsetjmp.c +=================================================================== +--- valgrind/coregrind/m_libcsetjmp.c (revision 15740) ++++ valgrind/coregrind/m_libcsetjmp.c (working copy) +@@ -594,7 +594,7 @@ + /* Checking whether second argument is zero. */ + " bnez $a1, 1f \n\t" + " nop \n\t" +-" addi $a1, $a1, 1 \n\t" /* We must return 1 if val=0. */ ++" addiu $a1, $a1, 1 \n\t" /* We must return 1 if val=0. */ + "1: \n\t" + " move $v0, $a1 \n\t" /* Return value of second argument. */ + " j $ra \n\t" +Index: valgrind/coregrind/m_syswrap/syswrap-mips64-linux.c +=================================================================== +--- valgrind/coregrind/m_syswrap/syswrap-mips64-linux.c (revision 15740) ++++ valgrind/coregrind/m_syswrap/syswrap-mips64-linux.c (working copy) +@@ -173,7 +173,7 @@ + " ld $30, 8($29)\n" + " ld $28, 16($29)\n" + " jr $31\n" +-" daddi $29,$29, 32\n" ++" daddiu $29,$29, 32\n" + ".previous\n" + ); + +Index: valgrind/coregrind/m_trampoline.S +=================================================================== +--- valgrind/coregrind/m_trampoline.S (revision 15740) ++++ valgrind/coregrind/m_trampoline.S (working copy) +@@ -1254,8 +1254,8 @@ + //la $a0, string + j strlen_cond + strlen_loop: +- addi $v0, $v0, 1 +- addi $a0, $a0, 1 ++ addiu $v0, $v0, 1 ++ addiu $a0, $a0, 1 + strlen_cond: + lbu $t0, ($a0) + bne $t0, $zero, strlen_loop +Index: valgrind/helgrind/tests/tc08_hbl2.c +=================================================================== +--- valgrind/helgrind/tests/tc08_hbl2.c (revision 15740) ++++ valgrind/helgrind/tests/tc08_hbl2.c (working copy) +@@ -125,11 +125,11 @@ + # define INC(_lval,_lqual) \ + __asm__ __volatile__ ( \ + "L1xyzzy1" _lqual":\n" \ +- " move $t0, %0\n" \ +- " ll $t1, 0($t0)\n" \ +- " addi $t1, $t1, 1\n" \ +- " sc $t1, 0($t0)\n" \ +- " beqz $t1, L1xyzzy1" _lqual \ ++ " move $t0, %0\n" \ ++ " ll $t1, 0($t0)\n" \ ++ " addiu $t1, $t1, 1\n" \ ++ " sc $t1, 0($t0)\n" \ ++ " beqz $t1, L1xyzzy1" _lqual \ + : /*out*/ : /*in*/ "r"(&(_lval)) \ + : /*trash*/ "t0", "t1", "memory" \ + ) +Index: valgrind/VEX/priv/guest_mips_toIR.c +=================================================================== +--- valgrind/VEX/priv/guest_mips_toIR.c (revision 3206) ++++ valgrind/VEX/priv/guest_mips_toIR.c (working copy) +@@ -16794,6 +16794,7 @@ + mkU64(0x0) : mkU32(0x0)))), imm); + break; + ++#if defined(__mips__) && ((defined(__mips_isa_rev) && __mips_isa_rev < 6)) + case 0x08: { /* ADDI */ + DIP("addi r%u, r%u, %u", rt, rs, imm); + IRTemp tmpRs32 = newTemp(Ity_I32); +@@ -16831,6 +16832,8 @@ + putIReg(rt, mkWidenFrom32(ty, mkexpr(t0), True)); + break; + } ++#endif ++ + case 0x09: /* ADDIU */ + DIP("addiu r%u, r%u, %u", rt, rs, imm); + if (mode64) { +@@ -16888,7 +16891,8 @@ + mkU32(extend_s_16to32(imm))))); + break; + +- case 0x18: { /* Doubleword Add Immidiate - DADD; MIPS64 */ ++#if defined(__mips__) && ((defined(__mips_isa_rev) && __mips_isa_rev < 6)) ++ case 0x18: { /* Doubleword Add Immidiate - DADDI; MIPS64 */ + DIP("daddi r%u, r%u, %u", rt, rs, imm); + IRTemp tmpRs64 = newTemp(Ity_I64); + assign(tmpRs64, getIReg(rs)); +@@ -16926,6 +16930,7 @@ + putIReg(rt, mkexpr(t0)); + break; + } ++#endif + + case 0x19: /* Doubleword Add Immidiate Unsigned - DADDIU; MIPS64 */ + DIP("daddiu r%u, r%u, %u", rt, rs, imm); diff --git a/package/valgrind/0004-Fixes-for-musl-libc.patch b/package/valgrind/0004-Fixes-for-musl-libc.patch new file mode 100644 index 0000000000..d543728ac5 --- /dev/null +++ b/package/valgrind/0004-Fixes-for-musl-libc.patch @@ -0,0 +1,99 @@ +From 50859f3577418cc42f76e1319e699202a615bbe1 Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Sat, 31 Oct 2015 19:45:04 +0100 +Subject: [PATCH] Fixes for musl libc. + +- add musl libc detection (prevents configure error) +- adjust preload and symbol names (based on the OpenWrt + patch, see [1]) + +[1] https://dev.openwrt.org/browser/trunk/package/devel/valgrind/patches/200-musl_fix.patch?rev=46302 + +Signed-off-by: Peter Seiderer +--- + configure.ac | 16 ++++++++++++++-- + coregrind/vg_preloaded.c | 2 +- + include/pub_tool_redir.h | 9 ++++++++- + 3 files changed, 23 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 8ab7f9b..e865bf5 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1009,6 +1009,13 @@ if test x$VGCONF_PLATFORM_PRI_CAPS = xX86_SOLARIS \ + GLIBC_VERSION="solaris" + fi + ++# GLIBC_VERSION is empty if a musl libc is used, so use the toolchain tuple ++# in this case. ++if test x$GLIBC_VERSION = x; then ++ if $CC -dumpmachine | grep -q musl; then ++ GLIBC_VERSION=musl ++ fi ++fi + + AC_MSG_CHECKING([the glibc version]) + +@@ -1064,10 +1071,15 @@ case "${GLIBC_VERSION}" in + # DEFAULT_SUPP set in host_os switch-case above. + # No other suppression file is used. + ;; ++ musl) ++ AC_MSG_RESULT(Musl) ++ AC_DEFINE([MUSL_LIBC], 1, [Define to 1 if you're using Musl libc]) ++ # no DEFAULT_SUPP file yet for musl libc. ++ ;; + 2.0|2.1|*) + AC_MSG_RESULT([unsupported version ${GLIBC_VERSION}]) +- AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later,]) +- AC_MSG_ERROR([Darwin libc, Bionic libc or Solaris libc]) ++ AC_MSG_ERROR([Valgrind requires glibc version 2.2 or later, uClibc,]) ++ AC_MSG_ERROR([musl libc, Darwin libc, Bionic libc or Solaris libc]) + ;; + esac + +diff --git a/coregrind/vg_preloaded.c b/coregrind/vg_preloaded.c +index 2ea7a7a..7b51aba 100644 +--- a/coregrind/vg_preloaded.c ++++ b/coregrind/vg_preloaded.c +@@ -56,7 +56,7 @@ + void VG_NOTIFY_ON_LOAD(freeres)( void ); + void VG_NOTIFY_ON_LOAD(freeres)( void ) + { +-# if !defined(__UCLIBC__) \ ++# if !defined(__UCLIBC__) && !defined(MUSL_LIBC) \ + && !defined(VGPV_arm_linux_android) \ + && !defined(VGPV_x86_linux_android) \ + && !defined(VGPV_mips32_linux_android) \ +diff --git a/include/pub_tool_redir.h b/include/pub_tool_redir.h +index bac00d7..babcf9a 100644 +--- a/include/pub_tool_redir.h ++++ b/include/pub_tool_redir.h +@@ -242,8 +242,11 @@ + /* --- Soname of the standard C library. --- */ + + #if defined(VGO_linux) || defined(VGO_solaris) ++# if defined(MUSL_LIBC) ++# define VG_Z_LIBC_SONAME libcZdZa // libc.* ++#else + # define VG_Z_LIBC_SONAME libcZdsoZa // libc.so* +- ++#endif + #elif defined(VGO_darwin) && (DARWIN_VERS <= DARWIN_10_6) + # define VG_Z_LIBC_SONAME libSystemZdZaZddylib // libSystem.*.dylib + +@@ -274,7 +277,11 @@ + /* --- Soname of the pthreads library. --- */ + + #if defined(VGO_linux) ++# if defined(MUSL_LIBC) ++# define VG_Z_LIBPTHREAD_SONAME libcZdZa // libc.* ++#else + # define VG_Z_LIBPTHREAD_SONAME libpthreadZdsoZd0 // libpthread.so.0 ++#endif + #elif defined(VGO_darwin) + # define VG_Z_LIBPTHREAD_SONAME libSystemZdZaZddylib // libSystem.*.dylib + #elif defined(VGO_solaris) +-- +2.1.4 + diff --git a/package/valgrind/Config.in b/package/valgrind/Config.in new file mode 100644 index 0000000000..40e219d95a --- /dev/null +++ b/package/valgrind/Config.in @@ -0,0 +1,81 @@ +comment "valgrind needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_VALGRIND + bool "valgrind" + depends on BR2_ARM_CPU_ARMV7A || BR2_i386 || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \ + BR2_x86_64 + depends on !BR2_STATIC_LIBS + depends on !BR2_MIPS_SOFT_FLOAT + help + Tool for debugging and profiling Linux programs. + + http://valgrind.org/ + +if BR2_PACKAGE_VALGRIND + +config BR2_PACKAGE_VALGRIND_MEMCHECK + bool "Memcheck: a memory error detector" + default y + help + This option allows to install the Memcheck tool + +config BR2_PACKAGE_VALGRIND_CACHEGRIND + bool "Cachegrind: a cache and branch-prediction profiler" + default y + help + This option allows to install the Cachegrind tool + +config BR2_PACKAGE_VALGRIND_CALLGRIND + bool "Callgrind: a call-graph generating cache and branch prediction profiler" + default y + help + This option allows to install the Callgrind tool + +config BR2_PACKAGE_VALGRIND_HELGRIND + bool "Helgrind: a thread error detector" + default y + help + This option allows to install the Helgrind tool + +config BR2_PACKAGE_VALGRIND_DRD + bool "DRD: a thread error detector" + default y + help + This option allows to install the DRD tool + +config BR2_PACKAGE_VALGRIND_MASSIF + bool "Massif: a heap profiler" + default y + help + This option allows to install the Massif tool + +config BR2_PACKAGE_VALGRIND_DHAT + bool "DHAT: a dynamic heap analysis tool" + default y + help + This option allows to install the DHAT tool + +config BR2_PACKAGE_VALGRIND_SGCHECK + bool "SGCheck: an experimental stack and global array overrun detector" + help + This option allows to install the SGCheck tool + +config BR2_PACKAGE_VALGRIND_BBV + bool "BBV: an experimental basic block vector generation tool" + help + This option allows to install the BBV tool + +config BR2_PACKAGE_VALGRIND_LACKEY + bool "Lackey: an example tool" + help + This option allows to install the Lackey tool + +config BR2_PACKAGE_VALGRIND_NULGRIND + bool "Nulgrind: the minimal Valgrind tool" + help + This option allows to install the Nulgrind tool + +endif diff --git a/package/valgrind/uclibc.supp b/package/valgrind/uclibc.supp new file mode 100644 index 0000000000..179d27b7ac --- /dev/null +++ b/package/valgrind/uclibc.supp @@ -0,0 +1,212 @@ +{ + + Memcheck:Addr1 + fun:_dl_strdup + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_malloc + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Cond + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_get_ready_to_run + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_add_elf_hash_table + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_add_elf_hash_table + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_add_elf_hash_table + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_check_if_named_library_is_loaded + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_check_if_named_library_is_loaded + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_check_hashed_files + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_check_hashed_files + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_load_elf_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_load_elf_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_load_elf_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_load_shared_library + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr1 + fun:_dl_find_hash + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_find_hash + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_fixup + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_fixup + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_linux_resolve + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_linux_resolver + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + fun:_dl_parse_lazy_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr2 + obj:/lib/ld-uClibc* + fun:_dl_parse_lazy_relocation_information +} +{ + + Memcheck:Addr4 + fun:_dl_parse_lazy_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + obj:/lib/ld-uClibc* + fun:_dl_parse_lazy_relocation_information +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + fun:_dl_parse_lazy_relocation_information +} +{ + + Memcheck:Addr2 + obj:/lib/ld-uClibc* + fun:_dl_parse_relocation_information +} +{ + + Memcheck:Addr2 + fun:_dl_parse_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + fun:_dl_parse_relocation_information + obj:/lib/ld-uClibc* +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + fun:_dl_parse_relocation_information +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc* + obj:/lib/ld-uClibc* + fun:_dl_parse_relocation_information +} +{ + + Memcheck:Addr2 + obj:/lib/ld-uClibc-0.9.27.so + fun:* +} +{ + + Memcheck:Addr4 + obj:/lib/ld-uClibc-0.9.27.so + fun:* +} diff --git a/package/valgrind/valgrind.hash b/package/valgrind/valgrind.hash new file mode 100644 index 0000000000..f2cd6e84bc --- /dev/null +++ b/package/valgrind/valgrind.hash @@ -0,0 +1,2 @@ +# From http://valgrind.org/downloads/current.html +md5 4ea62074da73ae82e0162d6550d3f129 valgrind-3.11.0.tar.bz2 diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk new file mode 100644 index 0000000000..46ba13eb12 --- /dev/null +++ b/package/valgrind/valgrind.mk @@ -0,0 +1,148 @@ +################################################################################ +# +# valgrind +# +################################################################################ + +VALGRIND_VERSION = 3.11.0 +VALGRIND_SITE = http://valgrind.org/downloads +VALGRIND_SOURCE = valgrind-$(VALGRIND_VERSION).tar.bz2 +VALGRIND_LICENSE = GPLv2 GFDLv1.2 +VALGRIND_LICENSE_FILES = COPYING COPYING.DOCS +VALGRIND_CONF_OPTS = --disable-ubsan +VALGRIND_INSTALL_STAGING = YES + +# patch 0004-Fixes-for-musl-libc.patch touching configure.ac +VALGRIND_AUTORECONF = YES + +ifeq ($(BR2_GCC_ENABLE_TLS),y) +VALGRIND_CONF_OPTS += --enable-tls +else +VALGRIND_CONF_OPTS += --disable-tls +endif + +# When Valgrind detects a 32-bit MIPS architecture, it forcibly adds +# -march=mips32 to CFLAGS; when it detects a 64-bit MIPS architecture, +# it forcibly adds -march=mips64. This causes Valgrind to be built +# always for the first ISA revision level (R1), even when the user has +# configured Buildroot for the second ISA revision level (R2). +# +# Override the CFLAGS variable (which Valgrind appends to its CFLAGS) +# and pass the right -march option, so they take precedence over +# Valgrind's wrongfully detected value. +ifeq ($(BR2_mips)$(BR2_mipsel)$(BR2_mips64)$(BR2_mips64el),y) +VALGRIND_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -march=$(BR2_GCC_TARGET_ARCH)" +endif + +# On ARM, Valgrind only supports ARMv7, and uses the arch part of the +# host tuple to determine whether it's being built for ARMv7 or +# not. Therefore, we adjust the host tuple to specify we're on +# ARMv7. The valgrind package is guaranteed, through Config.in, to +# only be selected on ARMv7-A platforms. +ifeq ($(BR2_ARM_CPU_ARMV7A),y) +VALGRIND_CONF_OPTS += \ + --host=$(patsubst arm-%,armv7-%,$(GNU_TARGET_NAME)) +endif + +define VALGRIND_INSTALL_UCLIBC_SUPP + $(INSTALL) -D -m 0644 package/valgrind/uclibc.supp $(TARGET_DIR)/usr/lib/valgrind/uclibc.supp +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_INSTALL_UCLIBC_SUPP + +ifeq ($(BR2_PACKAGE_VALGRIND_MEMCHECK),) +define VALGRIND_REMOVE_MEMCHECK + rm -f $(TARGET_DIR)/usr/lib/valgrind/*memcheck* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_MEMCHECK +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_CACHEGRIND),) +define VALGRIND_REMOVE_CACHEGRIND + rm -f $(TARGET_DIR)/usr/lib/valgrind/*cachegrind* + for i in cg_annotate cg_diff cg_merge; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_CACHEGRIND +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_CALLGRIND),) +define VALGRIND_REMOVE_CALLGRIND + rm -f $(TARGET_DIR)/usr/lib/valgrind/*callgrind* + for i in callgrind_annotate callgrind_control ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_CALLGRIND +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_HELGRIND),) +define VALGRIND_REMOVE_HELGRIND + rm -f $(TARGET_DIR)/usr/lib/valgrind/*helgrind* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_HELGRIND +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_DRD),) +define VALGRIND_REMOVE_DRD + rm -f $(TARGET_DIR)/usr/lib/valgrind/*drd* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_DRD +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_MASSIF),) +define VALGRIND_REMOVE_MASSIF + rm -f $(TARGET_DIR)/usr/lib/valgrind/*massif* + rm -f $(TARGET_DIR)/usr/bin/ms_script +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_MASSIF +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_DHAT),) +define VALGRIND_REMOVE_DHAT + rm -f $(TARGET_DIR)/usr/lib/valgrind/*dhat* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_DHAT +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_SGCHECK),) +define VALGRIND_REMOVE_SGCHECK + rm -f $(TARGET_DIR)/usr/lib/valgrind/*sgcheck* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_SGCHECK +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_BBV),) +define VALGRIND_REMOVE_BBV + rm -f $(TARGET_DIR)/usr/lib/valgrind/*bbv* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_BBV +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_LACKEY),) +define VALGRIND_REMOVE_LACKEY + rm -f $(TARGET_DIR)/usr/lib/valgrind/*lackey* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_LACKEY +endif + +ifeq ($(BR2_PACKAGE_VALGRIND_NULGRIND),) +define VALGRIND_REMOVE_NULGRIND + rm -f $(TARGET_DIR)/usr/lib/valgrind/*none* +endef + +VALGRIND_POST_INSTALL_TARGET_HOOKS += VALGRIND_REMOVE_NULGRIND +endif + +$(eval $(autotools-package)) diff --git a/package/valijson/Config.in b/package/valijson/Config.in new file mode 100644 index 0000000000..57dad66187 --- /dev/null +++ b/package/valijson/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_VALIJSON + bool "valijson" + depends on BR2_USE_WCHAR + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_REGEX + help + Valijson is a header-only JSON Schema Validation library for + C++. Valijson provides a simple validation API that allows + you load JSON Schemas, and validate documents loaded by one + of several supported parser libraries like boost, jsoncpp, + rapidjson and picoJSON. + + https://github.com/tristanpenman/valijson + +comment "valijson needs a toolchain w/ C++, threads, wchar support" + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/valijson/valijson.hash b/package/valijson/valijson.hash new file mode 100644 index 0000000000..79b3fb7d69 --- /dev/null +++ b/package/valijson/valijson.hash @@ -0,0 +1,2 @@ +# Locally Computed: +sha256 f2346e995bd95c6b86b0b9e9dd228fe134d529565fa86db764c48496805dd9bc valijson-424b706f990a9eb96dfc19cc8e54f2cd6ce5e186.tar.gz diff --git a/package/valijson/valijson.mk b/package/valijson/valijson.mk new file mode 100644 index 0000000000..e0813b3880 --- /dev/null +++ b/package/valijson/valijson.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# valijson +# +################################################################################ + +VALIJSON_VERSION = 424b706f990a9eb96dfc19cc8e54f2cd6ce5e186 +VALIJSON_SITE = $(call github,tristanpenman,valijson,$(VALIJSON_VERSION)) +VALIJSON_LICENSE = BSD-2c +VALIJSON_LICENSE_FILES = LICENSE +VALIJSON_INSTALL_STAGING = YES +VALIJSON_INSTALL_TARGET = NO +VALIJSON_DEPENDENCIES = boost +VALIJSON_CONF_OPTS = -DINSTALL_HEADERS=TRUE + +$(eval $(cmake-package)) diff --git a/package/vboot-utils/0001-Add-missing-definition-of-MTD_CHAR_MAJOR.patch b/package/vboot-utils/0001-Add-missing-definition-of-MTD_CHAR_MAJOR.patch new file mode 100644 index 0000000000..42410c8d13 --- /dev/null +++ b/package/vboot-utils/0001-Add-missing-definition-of-MTD_CHAR_MAJOR.patch @@ -0,0 +1,30 @@ +From 1438211660e700b2c9505863aae1cc957236b7c8 Mon Sep 17 00:00:00 2001 +From: Alex Suykov +Date: Thu, 21 Jan 2016 21:59:46 +0100 +Subject: [PATCH] Add missing definition of MTD_CHAR_MAJOR + +This definition missing from for kernels <= 3.13 + +Signed-off-by: Alex Suykov +--- + cgpt/cgpt_wrapper.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/cgpt/cgpt_wrapper.c b/cgpt/cgpt_wrapper.c +index dcfaab9..4d07aad 100644 +--- a/cgpt/cgpt_wrapper.c ++++ b/cgpt/cgpt_wrapper.c +@@ -25,6 +25,10 @@ + #include "cgpt_nor.h" + #include "cryptolib.h" + ++#ifndef MTD_CHAR_MAJOR ++#define MTD_CHAR_MAJOR 90 ++#endif ++ + // Check if cmdline |argv| has "-D". "-D" signifies that GPT structs are stored + // off device, and hence we should not wrap around cgpt. + static bool has_dash_D(int argc, const char *const argv[]) { +-- +2.6.4 + diff --git a/package/vboot-utils/0002-Add-missing-header-include-for-ssize_t.patch b/package/vboot-utils/0002-Add-missing-header-include-for-ssize_t.patch new file mode 100644 index 0000000000..4d559eabaf --- /dev/null +++ b/package/vboot-utils/0002-Add-missing-header-include-for-ssize_t.patch @@ -0,0 +1,27 @@ +From b6bed8d4e9453bc74ba021c8c17e20c3b5964c37 Mon Sep 17 00:00:00 2001 +From: Alex Suykov +Date: Thu, 21 Jan 2016 22:00:34 +0100 +Subject: [PATCH] Add missing header include for ssize_t + +The code uses ssize_t which is usually defined in . + +Signed-off-by: Alex Suykov +--- + host/lib/fmap.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/host/lib/fmap.c b/host/lib/fmap.c +index c95338d..e3db826 100644 +--- a/host/lib/fmap.c ++++ b/host/lib/fmap.c +@@ -6,6 +6,7 @@ + + #include + #include ++#include + + #include "fmap.h" + +-- +2.6.4 + diff --git a/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch b/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch new file mode 100644 index 0000000000..86374ca854 --- /dev/null +++ b/package/vboot-utils/0003-Avoid-RSA-type-redefinition.patch @@ -0,0 +1,44 @@ +From 593407d2b3ea3b871d55ec399671e48c84b900a7 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 21 Jan 2016 22:01:37 +0100 +Subject: [PATCH] Avoid RSA type redefinition + +The host_key.h headers does: + + typedef struct rsa_st RSA; + +But this type definition is already done by the OpenSSL headers. + +While such a type redefinition is legal with recent gcc versions, it +doesn't build with older gcc versions such as gcc 4.4. + +To work around this problem, we instead use a forward declaration of +"struct rsa_st", and change the only place where the RSA type was used +by "struct rsa_st". + +Signed-off-by: Thomas Petazzoni +--- + host/lib/include/host_key.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/host/lib/include/host_key.h b/host/lib/include/host_key.h +index 9f98ccc..c2d01a5 100644 +--- a/host/lib/include/host_key.h ++++ b/host/lib/include/host_key.h +@@ -12,11 +12,11 @@ + #include "vboot_struct.h" + + +-typedef struct rsa_st RSA; ++struct rsa_st; + + /* Private key data */ + typedef struct VbPrivateKey { +- RSA* rsa_private_key; /* Private key data */ ++ struct rsa_rt* rsa_private_key; /* Private key data */ + uint64_t algorithm; /* Algorithm to use when signing */ + } VbPrivateKey; + +-- +2.6.4 + diff --git a/package/vboot-utils/Config.in.host b/package/vboot-utils/Config.in.host new file mode 100644 index 0000000000..aa0caef2e2 --- /dev/null +++ b/package/vboot-utils/Config.in.host @@ -0,0 +1,7 @@ +config BR2_PACKAGE_HOST_VBOOT_UTILS + bool "host vboot utils" + select BR2_PACKAGE_HOST_UTIL_LINUX + help + Chromium OS verified boot utilities: futility and cgpt. + + https://www.chromium.org/chromium-os/chromiumos-design-docs/verified-boot diff --git a/package/vboot-utils/vboot-utils.hash b/package/vboot-utils/vboot-utils.hash new file mode 100644 index 0000000000..e16142389b --- /dev/null +++ b/package/vboot-utils/vboot-utils.hash @@ -0,0 +1,2 @@ +# Git shapshot +none xxx bbdd62f9b030db7ad8eef789aaf58a7ff9a25656.tar.gz diff --git a/package/vboot-utils/vboot-utils.mk b/package/vboot-utils/vboot-utils.mk new file mode 100644 index 0000000000..a7592d6a4e --- /dev/null +++ b/package/vboot-utils/vboot-utils.mk @@ -0,0 +1,38 @@ +################################################################################ +# +# vboot-utils +# +################################################################################ + +VBOOT_UTILS_VERSION = bbdd62f9b030db7ad8eef789aaf58a7ff9a25656 +VBOOT_UTILS_SITE = https://chromium.googlesource.com/chromiumos/platform/vboot_reference +VBOOT_UTILS_SITE_METHOD = git +VBOOT_UTILS_LICENSE = BSD-3c +VBOOT_UTILS_LICENSE_FILES = LICENSE + +HOST_VBOOT_UTILS_DEPENDENCIES = host-openssl host-util-linux host-pkgconf + +# vboot_reference contains code that goes into bootloaders, +# utilities intended for the target system, and a bunch of scripts +# for Chromium OS build system. Most of that does not make sense +# in a buildroot host-package. +# +# We only need futility for signing images, the keys, and cgpt for boot +# media partitioning. +# +# make target for futility is "futil". + +define HOST_VBOOT_UTILS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) \ + CC="$(HOSTCC)" \ + CFLAGS="$(HOST_CFLAGS) -D_LARGEFILE64_SOURCE -D_GNU_SOURCE" \ + LDFLAGS="$(HOST_LDFLAGS)" \ + futil cgpt +endef + +define HOST_VBOOT_UTILS_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(HOST_DIR)/usr \ + futil_install cgpt_install devkeys_install +endef + +$(eval $(host-generic-package)) diff --git a/package/vde2/0001-no-cxx.patch b/package/vde2/0001-no-cxx.patch new file mode 100644 index 0000000000..67cefa2bb8 --- /dev/null +++ b/package/vde2/0001-no-cxx.patch @@ -0,0 +1,22 @@ +configure: do not test for CXX, it's not needed + +There is no C++ source file, so no reason to require a C++ compiler. + +Reported-by: Peter Korsgaard +Signed-off-by: "Yann E. MORIN" + +--- +Patch sent upstream +( not yet in archives, awaits moderator approval... :-/ ) + +diff -durN vde2-2.3.2.orig/configure.ac vde2-2.3.2/configure.ac +--- vde2-2.3.2.orig/configure.ac 2011-11-23 17:41:19.000000000 +0100 ++++ vde2-2.3.2/configure.ac 2012-12-14 21:56:47.146319686 +0100 +@@ -11,7 +11,6 @@ + AC_CONFIG_LIBOBJ_DIR(src/common) + + # Checks for programs. +-AC_PROG_CXX + AC_PROG_CC + AC_PROG_INSTALL + AC_PROG_LN_S diff --git a/package/vde2/Config.in b/package/vde2/Config.in new file mode 100644 index 0000000000..f640a4ae2a --- /dev/null +++ b/package/vde2/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_VDE2 + bool "vde2" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # dlopen() + help + VDE is an ethernet compliant virtual network that can be + spawned over a set of physical computers over the Internet. + VDE is part of the virtualsquare project. + + http://vde.sourceforge.net/ + +comment "vde2 needs a toolchain w/ dynamic library" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS diff --git a/package/vde2/vde2.hash b/package/vde2/vde2.hash new file mode 100644 index 0000000000..a56a1bbbe0 --- /dev/null +++ b/package/vde2/vde2.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 cbea9b7e03097f87a6b5e98b07890d2275848f1fe4b9fcda77b8994148bc9542 vde2-2.3.2.tar.bz2 diff --git a/package/vde2/vde2.mk b/package/vde2/vde2.mk new file mode 100644 index 0000000000..bad758d5ae --- /dev/null +++ b/package/vde2/vde2.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# vde2 +# +################################################################################ + +VDE2_VERSION = 2.3.2 +VDE2_SOURCE = vde2-$(VDE2_VERSION).tar.bz2 +VDE2_SITE = http://downloads.sourceforge.net/project/vde/vde2/$(VDE2_VERSION) +VDE2_LICENSE = GPLv2+, LGPLv2.1+, BSD-3c +VDE2_LICENSE_FILES = COPYING COPYING.libvdeplug COPYING.slirpvde +VDE2_INSTALL_STAGING = YES + +# We touch configure.ac, so we need to autoreconf +VDE2_AUTORECONF = YES + +# Reasons for enabling/disabling stuff: +# - tuntap is enabled in the hope we're using a recent-enough toolchain +# that does have if_tun.h (virtually everything these days) +# - kvde_switch is disabled because it requires a patched kernel +# - cryptcab is disabled to not depend on openSSL +# - python is disabled to not depend on Python +# - pcap is disabled to not depend on libpcap +# - profiling is disabled because we do not want to debug/profile +# +# Note: disabled features can be added with corresponding dependencies +# in future commits. +VDE2_CONF_OPTS = \ + --disable-experimental \ + --disable-cryptcab \ + --disable-pcap \ + --disable-python \ + --disable-profile \ + --disable-kernel-switch \ + --enable-tuntap \ + +# Package does not build in parallel due to improper make rules +VDE2_MAKE = $(MAKE1) + +$(eval $(autotools-package)) diff --git a/package/vim/Config.in b/package/vim/Config.in new file mode 100644 index 0000000000..8a5c214975 --- /dev/null +++ b/package/vim/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_VIM + bool "vim" + depends on BR2_USE_MMU # uses fork() + depends on BR2_USE_WCHAR + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + VIM Text editor + + http://www.vim.org/ + +if BR2_PACKAGE_VIM + +config BR2_PACKAGE_VIM_RUNTIME + bool "install runtime" + default y + help + Install VIM runtime (syntax highlighing + macros). + This option adds about 11MB of data to /usr/share/ + +endif + +comment "vim needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR + depends on BR2_USE_MMU diff --git a/package/vim/vim.mk b/package/vim/vim.mk new file mode 100644 index 0000000000..6e05050f1e --- /dev/null +++ b/package/vim/vim.mk @@ -0,0 +1,79 @@ +################################################################################ +# +# vim +# +################################################################################ + +# 7.4 release patchlevel 889 +VIM_VERSION = 74b738d414b2895b3365e26ae3b7792eb82ccf47 +VIM_SITE = $(call github,vim,vim,$(VIM_VERSION)) +# Win over busybox vi since vim is more feature-rich +VIM_DEPENDENCIES = \ + ncurses $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext) \ + $(if $(BR2_PACKAGE_BUSYBOX),busybox) +VIM_SUBDIR = src +VIM_CONF_ENV = \ + vim_cv_toupper_broken=no \ + vim_cv_terminfo=yes \ + vim_cv_tty_group=world \ + vim_cv_tty_mode=0620 \ + vim_cv_getcwd_broken=no \ + vim_cv_stat_ignores_slash=yes \ + vim_cv_memmove_handles_overlap=yes \ + ac_cv_sizeof_int=4 \ + ac_cv_small_wchar_t=no +# GUI/X11 headers leak from the host so forcibly disable them +VIM_CONF_OPTS = --with-tlib=ncurses --enable-gui=no --without-x +VIM_LICENSE = Charityware +VIM_LICENSE_FILES = README.txt + +ifeq ($(BR2_PACKAGE_ACL),y) +VIM_CONF_OPTS += --enable-acl +VIM_DEPENDENCIES += acl +else +VIM_CONF_OPTS += --disable-acl +endif + +ifeq ($(BR2_PACKAGE_GPM),y) +VIM_CONF_OPTS += --enable-gpm +VIM_DEPENDENCIES += gpm +else +VIM_CONF_OPTS += --disable-gpm +endif + +ifeq ($(BR2_PACKAGE_LIBSELINUX),y) +VIM_CONF_OPTS += --enable-selinux +VIM_DEPENDENCIES += libselinux +else +VIM_CONF_OPTS += --disable-selinux +endif + +define VIM_INSTALL_TARGET_CMDS + cd $(@D)/src; \ + $(MAKE) DESTDIR=$(TARGET_DIR) installvimbin; \ + $(MAKE) DESTDIR=$(TARGET_DIR) installtools; \ + $(MAKE) DESTDIR=$(TARGET_DIR) installlinks +endef + +define VIM_INSTALL_RUNTIME_CMDS + cd $(@D)/src; \ + $(MAKE) DESTDIR=$(TARGET_DIR) installrtbase; \ + $(MAKE) DESTDIR=$(TARGET_DIR) installmacros +endef + +define VIM_REMOVE_DOCS + find $(TARGET_DIR)/usr/share/vim -type f -name "*.txt" -delete +endef + +# Avoid oopses with vipw/vigr, lack of $EDITOR and 'vi' command expectation +define VIM_INSTALL_VI_SYMLINK + ln -sf /usr/bin/vim $(TARGET_DIR)/bin/vi +endef +VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_VI_SYMLINK + +ifeq ($(BR2_PACKAGE_VIM_RUNTIME),y) +VIM_POST_INSTALL_TARGET_HOOKS += VIM_INSTALL_RUNTIME_CMDS +VIM_POST_INSTALL_TARGET_HOOKS += VIM_REMOVE_DOCS +endif + +$(eval $(autotools-package)) diff --git a/package/vlc/0001-vlc-static.patch b/package/vlc/0001-vlc-static.patch new file mode 100644 index 0000000000..f9aa079a4c --- /dev/null +++ b/package/vlc/0001-vlc-static.patch @@ -0,0 +1,24 @@ +diff -uNr vlc-2.1.5.org/bin/Makefile.am vlc-2.1.5/bin/Makefile.am +--- vlc-2.1.5.org/bin/Makefile.am 2013-12-03 10:12:34.000000000 +0100 ++++ vlc-2.1.5/bin/Makefile.am 2014-08-03 12:30:06.722154518 +0200 +@@ -1,7 +1,7 @@ + # Building vlc + # + bin_PROGRAMS = vlc +-noinst_PROGRAMS = vlc-static ++noinst_PROGRAMS = + noinst_DATA = + vlclib_PROGRAMS = vlc-cache-gen + EXTRA_PROGRAMS = vlc-wrapper +diff -uNr vlc-2.1.5.org/Makefile.am vlc-2.1.5/Makefile.am +--- vlc-2.1.5.org/Makefile.am 2014-02-14 18:40:50.000000000 +0100 ++++ vlc-2.1.5/Makefile.am 2014-08-03 12:29:52.059010766 +0200 +@@ -932,7 +932,7 @@ + cd lib && $(MAKE) $(AM_MAKEFLAGS) libvlc.la + + core: libvlc vlc$(EXEEXT) +- cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT) vlc-static$(EXEEXT) ++ cd bin && $(MAKE) $(AM_MAKEFLAGS) vlc$(EXEEXT) + + doc: + cd doc && $(MAKE) $(AM_MAKEFLAGS) doc diff --git a/package/vlc/0002-configure.ac-add-check-for-libgcrypt-config-program.patch b/package/vlc/0002-configure.ac-add-check-for-libgcrypt-config-program.patch new file mode 100644 index 0000000000..e9a7315317 --- /dev/null +++ b/package/vlc/0002-configure.ac-add-check-for-libgcrypt-config-program.patch @@ -0,0 +1,43 @@ +From 88bf3313850bc7f0e6db21daee2b8d8e607b7bb4 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sat, 8 Feb 2014 14:33:27 +0100 +Subject: [PATCH] configure.ac: add check for libgcrypt-config program + +This allows to override the default libgcrypt-config location (which is +useful when cross-compiling), instead of using the one from the host +system. + +Signed-off-by: Samuel Martin +[yann.morin.1998@free.fr: adapt from 2.1.6 to 2.2.0; fix quoting in + AC_PATH_PROG] +Signed-off-by: "Yann E. MORIN" +--- + configure.ac | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 02fb8aa..5a2267b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -4020,16 +4020,17 @@ + AC_ARG_ENABLE(libgcrypt, + [ --disable-libgcrypt gcrypt support (default enabled)]) + AS_IF([test "${enable_libgcrypt}" != "no"], [ ++ AC_PATH_PROG([GCRYPT_CONFIG],[libgcrypt-config],[libgcrypt-config]) + AC_CHECK_DECL([GCRYCTL_SET_THREAD_CBS], [ +- libgcrypt-config --version >/dev/null || \ ++ ${GCRYPT_CONFIG} --version >/dev/null || \ + AC_MSG_ERROR([gcrypt.h present but libgcrypt-config could not be found]) + AC_CHECK_LIB(gcrypt, gcry_control, [ + have_libgcrypt="yes" +- GCRYPT_CFLAGS="`libgcrypt-config --cflags`" +- GCRYPT_LIBS="`libgcrypt-config --libs`" ++ GCRYPT_CFLAGS="`${GCRYPT_CONFIG} --cflags`" ++ GCRYPT_LIBS="`${GCRYPT_CONFIG} --libs`" + ], [ + AC_MSG_ERROR([libgcrypt not found. Install libgcrypt or pass --disable-libgcrypt.]) +- ], [`libgcrypt-config --libs`]) ++ ], [`${GCRYPT_CONFIG} --libs`]) + ], [ + AC_MSG_ERROR([libgcrypt version 1.1.94 or higher not found. Install libgcrypt or pass --disable-libgcrypt.]) + ], [#include ] diff --git a/package/vlc/0003-automake-add-subdir-objects-option.patch b/package/vlc/0003-automake-add-subdir-objects-option.patch new file mode 100644 index 0000000000..cea6a38fea --- /dev/null +++ b/package/vlc/0003-automake-add-subdir-objects-option.patch @@ -0,0 +1,22 @@ +automake: add subdir-objects option + +Our version of automake warns if this option is enabled and source files +in subdirectories are used. + +It doesn't really seems to have a noticable effect on the build, but it +does remove a lot of annoying warnings. + +Signed-off-by: Arnout Vandecappelle (Essensium/Mind) + +diff -Nrup vlc-2.1.2.orig/configure.ac vlc-2.1.2/configure.ac +--- vlc-2.1.2.orig/configure.ac 2014-02-27 00:22:19.512944952 +0100 ++++ vlc-2.1.2/configure.ac 2014-02-27 00:24:21.360940651 +0100 +@@ -24,7 +24,7 @@ AC_CANONICAL_BUILD + AC_CANONICAL_HOST + AC_PRESERVE_HELP_ORDER + +-AM_INIT_AUTOMAKE(tar-ustar color-tests foreign) ++AM_INIT_AUTOMAKE(tar-ustar color-tests foreign subdir-objects) + AC_CONFIG_HEADERS([config.h]) + + # Disable with "./configure --disable-silent-rules" or "make V=1" diff --git a/package/vlc/0004-implicit-function-declaration.patch b/package/vlc/0004-implicit-function-declaration.patch new file mode 100644 index 0000000000..515453d1db --- /dev/null +++ b/package/vlc/0004-implicit-function-declaration.patch @@ -0,0 +1,20 @@ +Fix compile warning being treated as error: + +codec/svg.c: In function 'DecodeBlock': +codec/svg.c:240:5: error: implicit declaration of function 'rsvg_handle_render_cairo' [-Werror=implicit-function-declaration] +cc1: some warnings being treated as errors + +Signed-off-by: Bernd Kuhls + +diff -uNr vlc-2.2.1.org/configure.ac vlc-2.2.1/configure.ac +--- vlc-2.2.1.org/configure.ac 2015-04-13 09:57:54.000000000 +0200 ++++ vlc-2.2.1/configure.ac 2015-04-24 20:54:35.349039010 +0200 +@@ -864,7 +864,7 @@ + dnl Compiler warnings + dnl + +-RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast write-strings missing-prototypes volatile-register-var error-implicit-function-declaration]) ++RDC_PROG_CC_WFLAGS([all extra sign-compare undef pointer-arith bad-function-cast write-strings missing-prototypes volatile-register-var]) + RDC_PROG_CC_FLAGS([-pipe]) + AC_LANG_PUSH([C++]) + RDC_PROG_CXX_WFLAGS([all extra sign-compare undef pointer-arith volatile-register-var]) diff --git a/package/vlc/0005-libvorbisidec.patch b/package/vlc/0005-libvorbisidec.patch new file mode 100644 index 0000000000..155e069499 --- /dev/null +++ b/package/vlc/0005-libvorbisidec.patch @@ -0,0 +1,18 @@ +Fixes linking error with tremor due to wrong library name + +Downloaded from Gentoo package +https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-video/vlc/files/vlc-2.1.0-fix-libtremor-libs.patch?view=markup + +Signed-off-by: Bernd Kuhls + +--- a/modules/codec/Makefile.am ++++ b/modules/codec/Makefile.am +@@ -215,7 +215,7 @@ + libtremor_plugin_la_SOURCES = codec/vorbis.c + libtremor_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) -DMODULE_NAME_IS_tremor + libtremor_plugin_la_LDFLAGS = $(AM_LDFLAGS) -rpath '$(codecdir)' +-libtremor_plugin_la_LIBADD = -lvorbisdec -logg ++libtremor_plugin_la_LIBADD = $(VORBIS_LIBS) $(OGG_LIBS) + EXTRA_LTLIBRARIES += libtremor_plugin.la + codec_LTLIBRARIES += $(LTLIBtremor) + diff --git a/package/vlc/0006-qt-x11.patch b/package/vlc/0006-qt-x11.patch new file mode 100644 index 0000000000..316a31fd8f --- /dev/null +++ b/package/vlc/0006-qt-x11.patch @@ -0,0 +1,16 @@ +libX11 is an optional dependency for the qt4 module + +Signed-off-by: Bernd Kuhls + +diff -uNr vlc-2.2.1.org/modules/gui/qt4/Makefile.am vlc-2.2.1/modules/gui/qt4/Makefile.am +--- vlc-2.2.1.org/modules/gui/qt4/Makefile.am 2014-11-29 12:34:15.000000000 +0100 ++++ vlc-2.2.1/modules/gui/qt4/Makefile.am 2015-04-27 18:53:36.968611490 +0200 +@@ -22,7 +22,7 @@ + if HAVE_WIN32 + libqt4_plugin_la_LIBADD += -lole32 -lcomctl32 -luuid + else +-libqt4_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIB) -lX11 ++libqt4_plugin_la_LIBADD += $(X_LIBS) $(X_PRE_LIB) + endif + endif + if HAVE_DARWIN diff --git a/package/vlc/0007-strerror.patch b/package/vlc/0007-strerror.patch new file mode 100644 index 0000000000..e9f3141168 --- /dev/null +++ b/package/vlc/0007-strerror.patch @@ -0,0 +1,43 @@ +Fix compile error + + CCLD vlc +/home/br/br3/output/build/vlc-2.2.1/src/.libs/libvlccore.so: undefined reference to `strerror_l' + +Code for #else condition was taken from +http://patches.osdyson.org/patch/series/view/vlc/2.2.0~rc2-1+dyson2/dyson.patch + +Signed-off-by: Bernd Kuhls + +diff -uNr vlc-2.2.1.org/configure.ac vlc-2.2.1/configure.ac +--- vlc-2.2.1.org/configure.ac 2015-04-13 09:57:54.000000000 +0200 ++++ vlc-2.2.1/configure.ac 2015-05-02 16:13:22.800448380 +0200 +@@ -534,7 +534,7 @@ + + dnl Check for usual libc functions + AC_CHECK_DECLS([nanosleep],,,[#include ]) +-AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty lstat memalign mmap open_memstream openat pread posix_fadvise posix_madvise setlocale stricmp strnicmp strptime uselocale]) ++AC_CHECK_FUNCS([daemon fcntl fstatvfs fork getenv getpwuid_r isatty lstat memalign mmap open_memstream openat pread posix_fadvise posix_madvise setlocale strerror_l stricmp strnicmp strptime uselocale]) + AC_REPLACE_FUNCS([atof atoll dirfd fdopendir flockfile fsync getdelim getpid gmtime_r lldiv localtime_r nrand48 poll posix_memalign rewind setenv strcasecmp strcasestr strdup strlcpy strndup strnlen strsep strtof strtok_r strtoll swab tdestroy strverscmp]) + AC_CHECK_FUNCS(fdatasync,, + [AC_DEFINE(fdatasync, fsync, [Alias fdatasync() to fsync() if missing.]) +diff -uNr vlc-2.2.1.org/src/posix/error.c vlc-2.2.1/src/posix/error.c +--- vlc-2.2.1.org/src/posix/error.c 2014-08-14 09:20:04.000000000 +0200 ++++ vlc-2.2.1/src/posix/error.c 2015-05-02 16:25:24.075378369 +0200 +@@ -31,6 +31,7 @@ + + static const char *vlc_strerror_l(int errnum, const char *lname) + { ++#ifdef HAVE_STRERROR_L + int saved_errno = errno; + locale_t loc = newlocale(LC_MESSAGES_MASK, lname, (locale_t)0); + +@@ -51,6 +52,9 @@ + const char *buf = strerror_l(errnum, loc); + + freelocale(loc); ++#else ++ const char *buf = strerror(errnum); ++#endif + return buf; + } + diff --git a/package/vlc/Config.in b/package/vlc/Config.in new file mode 100644 index 0000000000..166e7d256a --- /dev/null +++ b/package/vlc/Config.in @@ -0,0 +1,38 @@ +if BR2_PACKAGE_VLC +comment "vlc is known not to work in all configurations" +comment "If you can fix it, please inform buildroot@buildroot.org" +endif + +config BR2_PACKAGE_VLC + bool "vlc" + depends on BR2_USE_MMU # fork() + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + select BR2_PACKAGE_LIBVORBIS if BR2_PACKAGE_OPUS + select BR2_PACKAGE_VLC_OPENCV_BACKEND if BR2_PACKAGE_OPENCV + select BR2_PACKAGE_VLC_OPENCV3_BACKEND if BR2_PACKAGE_OPENCV3 + select BR2_PACKAGE_ZLIB if BR2_PACKAGE_TAGLIB + help + VLC is a free and open source cross-platform multimedia player + and framework that plays most multimedia files as well as DVD, + Audio CD, VCD, and various streaming protocols. + + http://www.videolan.org/vlc/ + +config BR2_PACKAGE_VLC_OPENCV_BACKEND + bool + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_OBJDETECT + +config BR2_PACKAGE_VLC_OPENCV3_BACKEND + bool + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + select BR2_PACKAGE_OPENCV3_LIB_OBJDETECT + +comment "vlc needs a toolchain w/ C++, dynamic library, wchar, threads, headers >= 3.7" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || !BR2_USE_WCHAR \ + || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 diff --git a/package/vlc/vlc.hash b/package/vlc/vlc.hash new file mode 100644 index 0000000000..04632e07ce --- /dev/null +++ b/package/vlc/vlc.hash @@ -0,0 +1,2 @@ +# From http://download.videolan.org/pub/videolan/vlc/2.2.3/vlc-2.2.3.tar.xz.sha256 +sha256 b9d7587d35f13c3c981964c8cc8b03f1c7c8edf528be476b3ca1d2efedd5bf5b vlc-2.2.3.tar.xz diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk new file mode 100644 index 0000000000..30887bd272 --- /dev/null +++ b/package/vlc/vlc.mk @@ -0,0 +1,421 @@ +################################################################################ +# +# vlc +# +################################################################################ + +VLC_VERSION = 2.2.3 +VLC_SITE = http://get.videolan.org/vlc/$(VLC_VERSION) +VLC_SOURCE = vlc-$(VLC_VERSION).tar.xz +VLC_LICENSE = GPLv2+ LGPLv2.1+ +VLC_LICENSE_FILES = COPYING COPYING.LIB +VLC_DEPENDENCIES = host-pkgconf +VLC_AUTORECONF = YES + +# Install vlc libraries in staging. +VLC_INSTALL_STAGING = YES + +# VLC defines two autoconf functions which are also defined by our own pkg.m4 +# from pkgconf. Unfortunately, they are defined in a different way: VLC adds +# --enable- options, but pkg.m4 adds --with- options. To make sure we use +# VLC's definition, rename these two functions. +define VLC_OVERRIDE_PKG_M4 + $(SED) 's/PKG_WITH_MODULES/VLC_PKG_WITH_MODULES/g' \ + -e 's/PKG_HAVE_WITH_MODULES/VLC_PKG_HAVE_WITH_MODULES/g' \ + $(@D)/configure.ac $(@D)/m4/with_pkg.m4 +endef +VLC_POST_PATCH_HOOKS += VLC_OVERRIDE_PKG_M4 + +VLC_CONF_OPTS += \ + --disable-gles1 \ + --disable-a52 \ + --disable-shout \ + --disable-twolame \ + --disable-dca \ + --disable-schroedinger \ + --disable-fluidsynth \ + --disable-zvbi \ + --disable-kate \ + --disable-caca \ + --disable-jack \ + --disable-samplerate \ + --disable-chromaprint \ + --disable-goom \ + --disable-projectm \ + --disable-vsxu \ + --disable-mtp \ + --disable-mmal-codec \ + --disable-mmal-vout \ + --disable-dvdnav \ + --disable-vpx \ + --disable-jpeg \ + --disable-x262 \ + --disable-x265 \ + --disable-mfx \ + --disable-vdpau \ + --disable-addonmanagermodules \ + --enable-run-as-root \ + +# Building static and shared doesn't work, so force static off. +ifeq ($(BR2_STATIC_LIBS),) +VLC_CONF_OPTS += --disable-static +endif + +ifeq ($(BR2_POWERPC_CPU_HAS_ALTIVEC),y) +VLC_CONF_OPTS += --enable-altivec +else +VLC_CONF_OPTS += --disable-altivec +endif + +ifeq ($(BR2_X86_CPU_HAS_SSE),y) +VLC_CONF_OPTS += --enable-sse +else +VLC_CONF_OPTS += --disable-sse +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB),y) +VLC_CONF_OPTS += --enable-alsa +VLC_DEPENDENCIES += alsa-lib +else +VLC_CONF_OPTS += --disable-alsa +endif + +# bonjour support needs avahi-client, which needs avahi-daemon and dbus +ifeq ($(BR2_PACKAGE_AVAHI)$(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yyy) +VLC_CONF_OPTS += --enable-bonjour +VLC_DEPENDENCIES += avahi dbus +else +VLC_CONF_OPTS += --disable-bonjour +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +VLC_CONF_OPTS += --enable-dbus +VLC_DEPENDENCIES += dbus +else +VLC_CONF_OPTS += --disable-dbus +endif + +ifeq ($(BR2_PACKAGE_DIRECTFB),y) +VLC_CONF_OPTS += --enable-directfb +VLC_CONF_ENV += ac_cv_path_DIRECTFB_CONFIG=$(STAGING_DIR)/usr/bin/directfb-config +VLC_DEPENDENCIES += directfb +else +VLC_CONF_OPTS += --disable-directfb +endif + +ifeq ($(BR2_PACKAGE_FAAD2),y) +VLC_CONF_OPTS += --enable-faad +VLC_DEPENDENCIES += faad2 +else +VLC_CONF_OPTS += --disable-faad +endif + +ifeq ($(BR2_PACKAGE_FFMPEG),y) +VLC_CONF_OPTS += --enable-avcodec +VLC_DEPENDENCIES += ffmpeg +else +VLC_CONF_OPTS += --disable-avcodec +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_POSTPROC),y) +VLC_CONF_OPTS += --enable-postproc +else +VLC_CONF_OPTS += --disable-postproc +endif + +ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y) +VLC_CONF_OPTS += --enable-swscale +else +VLC_CONF_OPTS += --disable-swscale +endif + +ifeq ($(BR2_PACKAGE_FLAC),y) +VLC_CONF_OPTS += --enable-flac +VLC_DEPENDENCIES += flac +else +VLC_CONF_OPTS += --disable-flac +endif + +ifeq ($(BR2_PACKAGE_FREERDP),y) +VLC_CONF_OPTS += --enable-freerdp +VLC_DEPENDENCIES += freerdp +else +VLC_CONF_OPTS += --disable-libfreerdp +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) +VLC_DEPENDENCIES += libgl +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +VLC_CONF_OPTS += --enable-gles2 +VLC_DEPENDENCIES += libgles +else +VLC_CONF_OPTS += --disable-gles2 +endif + +ifeq ($(BR2_PACKAGE_OPENCV)$(BR2_PACKAGE_OPENCV3),y) +VLC_CONF_OPTS += --enable-opencv +ifeq ($(BR2_PACKAGE_OPENCV),y) +VLC_DEPENDENCIES += opencv +else +VLC_DEPENDENCIES += opencv3 +endif +else +VLC_CONF_OPTS += --disable-opencv +endif + +ifeq ($(BR2_PACKAGE_OPUS),y) +VLC_CONF_OPTS += --enable-opus +VLC_DEPENDENCIES += libvorbis opus +else +VLC_CONF_OPTS += --disable-opus +endif + +ifeq ($(BR2_PACKAGE_LIBASS),y) +VLC_CONF_OPTS += --enable-libass +VLC_DEPENDENCIES += libass +else +VLC_CONF_OPTS += --disable-libass +endif + +ifeq ($(BR2_PACKAGE_LIBBLURAY),y) +VLC_CONF_OPTS += --enable-bluray +VLC_DEPENDENCIES += libbluray +else +VLC_CONF_OPTS += --disable-bluray +endif + +ifeq ($(BR2_PACKAGE_LIBCDDB),y) +VLC_CONF_OPTS += --enable-libcddb +VLC_DEPENDENCIES += libcddb +else +VLC_CONF_OPTS += --disable-libcddb +endif + +ifeq ($(BR2_PACKAGE_LIBDVBPSI),y) +VLC_CONF_OPTS += --enable-dvbpsi +VLC_DEPENDENCIES += libdvbpsi +else +VLC_CONF_OPTS += --disable-dvbpsi +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +VLC_CONF_OPTS += --enable-libgcrypt +VLC_DEPENDENCIES += libgcrypt +VLC_CONF_ENV += \ + GCRYPT_CONFIG="$(STAGING_DIR)/usr/bin/libgcrypt-config" +else +VLC_CONF_OPTS += --disable-libgcrypt +endif + +ifeq ($(BR2_PACKAGE_LIBMAD),y) +VLC_CONF_OPTS += --enable-mad +VLC_DEPENDENCIES += libmad +else +VLC_CONF_OPTS += --disable-mad +endif + +ifeq ($(BR2_PACKAGE_LIBMATROSKA),y) +VLC_CONF_OPTS += --enable-mkv +VLC_DEPENDENCIES += libmatroska +else +VLC_CONF_OPTS += --disable-mkv +endif + +ifeq ($(BR2_PACKAGE_LIBMODPLUG),y) +VLC_CONF_OPTS += --enable-mod +VLC_DEPENDENCIES += libmodplug +else +VLC_CONF_OPTS += --disable-mod +endif + +ifeq ($(BR2_PACKAGE_LIBMPEG2),y) +VLC_CONF_OPTS += --enable-libmpeg2 +VLC_DEPENDENCIES += libmpeg2 +else +VLC_CONF_OPTS += --disable-libmpeg2 +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +VLC_CONF_OPTS += --enable-png +VLC_DEPENDENCIES += libpng +else +VLC_CONF_OPTS += --disable-png +endif + +ifeq ($(BR2_PACKAGE_LIBRSVG),y) +VLC_CONF_OPTS += --enable-svg --enable-svgdec +VLC_DEPENDENCIES += librsvg +else +VLC_CONF_OPTS += --disable-svg --disable-svgdec +endif + +ifeq ($(BR2_PACKAGE_LIBSSH2),y) +VLC_CONF_OPTS += --enable-sftp +VLC_DEPENDENCIES += libssh2 +else +VLC_CONF_OPTS += --disable-sftp +endif + +ifeq ($(BR2_PACKAGE_LIBSIDPLAY2),y) +VLC_CONF_OPTS += --enable-sid +VLC_DEPENDENCIES += libsidplay2 +else +VLC_CONF_OPTS += --disable-sid +endif + +ifeq ($(BR2_PACKAGE_LIBTHEORA),y) +VLC_CONF_OPTS += --enable-theora +VLC_DEPENDENCIES += libtheora +else +VLC_CONF_OPTS += --disable-theora +endif + +ifeq ($(BR2_PACKAGE_LIBUPNP),y) +VLC_CONF_OPTS += --enable-upnp +VLC_DEPENDENCIES += libupnp +else +VLC_CONF_OPTS += --disable-upnp +endif + +ifeq ($(BR2_PACKAGE_LIBVNCSERVER),y) +VLC_CONF_OPTS += --enable-vnc +VLC_DEPENDENCIES += libvncserver +else +VLC_CONF_OPTS += --disable-vnc +endif + +ifeq ($(BR2_PACKAGE_LIBVORBIS),y) +VLC_CONF_OPTS += --enable-vorbis +VLC_DEPENDENCIES += libvorbis +else +VLC_CONF_OPTS += --disable-vorbis +endif + +ifeq ($(BR2_PACKAGE_LIBV4L),y) +VLC_CONF_OPTS += --enable-v4l2 +VLC_DEPENDENCIES += libv4l +else +VLC_CONF_OPTS += --disable-v4l2 +endif + +ifeq ($(BR2_PACKAGE_LIBXCB),y) +VLC_CONF_OPTS += --enable-xcb +VLC_DEPENDENCIES += libxcb +else +VLC_CONF_OPTS += --disable-xcb +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +VLC_CONF_OPTS += --enable-libxml2 +VLC_DEPENDENCIES += libxml2 +else +VLC_CONF_OPTS += --disable-libxml2 +endif + +ifeq ($(BR2_PACKAGE_LIVE555),y) +VLC_CONF_OPTS += --enable-live555 +VLC_DEPENDENCIES += live555 +VLC_CONF_ENV += \ + LIVE555_CFLAGS="\ + -I$(STAGING_DIR)/usr/include/BasicUsageEnvironment \ + -I$(STAGING_DIR)/usr/include/groupsock \ + -I$(STAGING_DIR)/usr/include/liveMedia \ + -I$(STAGING_DIR)/usr/include/UsageEnvironment \ + " \ + LIVE555_LIBS="-L$(STAGING_DIR)/usr/lib -lliveMedia" +else +VLC_CONF_OPTS += --disable-live555 +endif + +ifeq ($(BR2_PACKAGE_LUA),y) +VLC_CONF_OPTS += --enable-lua +VLC_DEPENDENCIES += lua host-lua +else +VLC_CONF_OPTS += --disable-lua +endif + +ifeq ($(BR2_PACKAGE_MINIZIP),y) +VLC_DEPENDENCIES += minizip +endif + +ifeq ($(BR2_PACKAGE_MUSEPACK),y) +VLC_CONF_OPTS += --enable-mpc +VLC_DEPENDENCIES += musepack +else +VLC_CONF_OPTS += --disable-mpc +endif + +ifeq ($(BR2_PACKAGE_QT_GUI_MODULE),y) +VLC_CONF_OPTS += --enable-qt +VLC_CONF_ENV += \ + ac_cv_path_MOC=$(HOST_DIR)/usr/bin/moc \ + ac_cv_path_RCC=$(HOST_DIR)/usr/bin/rcc \ + ac_cv_path_UIC=$(HOST_DIR)/usr/bin/uic +VLC_DEPENDENCIES += qt +else +VLC_CONF_OPTS += --disable-qt +endif + +ifeq ($(BR2_PACKAGE_SDL_X11),y) +VLC_CONF_OPTS += --enable-sdl +VLC_DEPENDENCIES += sdl +else +VLC_CONF_OPTS += --disable-sdl +endif + +ifeq ($(BR2_PACKAGE_SDL_IMAGE),y) +VLC_CONF_OPTS += --enable-sdl-image +VLC_DEPENDENCIES += sdl_image +else +VLC_CONF_OPTS += --disable-sdl-image +endif + +ifeq ($(BR2_PACKAGE_SPEEX),y) +VLC_CONF_OPTS += --enable-speex +VLC_DEPENDENCIES += speex +else +VLC_CONF_OPTS += --disable-speex +endif + +ifeq ($(BR2_PACKAGE_TAGLIB),y) +VLC_CONF_OPTS += --enable-taglib +VLC_DEPENDENCIES += taglib +else +VLC_CONF_OPTS += --disable-taglib +endif + +ifeq ($(BR2_PACKAGE_TREMOR),y) +VLC_CONF_OPTS += --enable-tremor +VLC_DEPENDENCIES += tremor +else +VLC_CONF_OPTS += --disable-tremor +endif + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +VLC_CONF_OPTS += --enable-udev +VLC_DEPENDENCIES += udev +else +VLC_CONF_OPTS += --disable-udev +endif + +ifeq ($(BR2_PACKAGE_XCB_UTIL_KEYSYMS),y) +VLC_CONF_OPTS += --enable-xcb +VLC_DEPENDENCIES += xcb-util-keysyms +else +VLC_CONF_OPTS += --disable-xcb +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +VLC_CONF_OPTS += --with-x +VLC_DEPENDENCIES += xlib_libX11 +else +VLC_CONF_OPTS += --without-x +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +VLC_DEPENDENCIES += zlib +endif + +$(eval $(autotools-package)) diff --git a/package/vnstat/0001-configure.ac-add-option-to-disable-image-output.patch b/package/vnstat/0001-configure.ac-add-option-to-disable-image-output.patch new file mode 100644 index 0000000000..e46ef07888 --- /dev/null +++ b/package/vnstat/0001-configure.ac-add-option-to-disable-image-output.patch @@ -0,0 +1,51 @@ +From 8a4a9b82d4f8fd39db8417fd06d969505fde9d0a Mon Sep 17 00:00:00 2001 +From: Rodrigo Rebello +Date: Tue, 22 Dec 2015 18:02:22 -0200 +Subject: [PATCH 1/1] configure.ac: add option to disable image output + +Even when the gd library is present, it may be desirable to not build +'vnstati' as image output is an optional feature. + +Also, when testing for the gd library, use gdImagePng() instead of +gdImageLine() since it's possible that the installed gd library doesn't +have PNG support. In such cases, the test in the configure script passed +(because gdImageLine() is always present), but the build failed with: + + src/vnstati.o: In function `writeoutput': + vnstati.c:(.text+0x3fc): undefined reference to `gdImagePng' + collect2: error: ld returned 1 exit status + +Upstream status: accepted, not yet released. +https://github.com/vergoh/vnstat/pull/35 + +Signed-off-by: Rodrigo Rebello +--- + configure.ac | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index be3d449..89f71ef 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -13,10 +13,16 @@ AM_PROG_CC_C_O + AC_PROG_MAKE_SET + AC_PROG_MKDIR_P + ++AC_ARG_ENABLE([image-output], [ ++AS_HELP_STRING([--disable-image-output], [disable PNG image output])]) ++ + # Checks for libraries. + AC_CHECK_LIB([m], [pow]) +-AC_CHECK_LIB([gd], [gdImageLine], [IMAGELIBS=-lgd]) +-AC_SUBST([IMAGELIBS]) ++ ++AS_IF([test "x$enable_image_output" != "xno"], [ ++AC_CHECK_LIB([gd], [gdImagePng], [IMAGELIBS=-lgd]) ++AC_SUBST([IMAGELIBS])]) ++ + AM_CONDITIONAL([HAVE_LIBGD], [test "$IMAGELIBS" = "-lgd"]) + PKG_CHECK_MODULES([CHECK], [check >= 0.9.6], [], [AC_MSG_NOTICE([testcases can not be execute without check installed])]) + AM_CONDITIONAL([HAVE_CHECK], [test "$CHECK_LIBS"]) +-- +2.1.4 + diff --git a/package/vnstat/Config.in b/package/vnstat/Config.in new file mode 100644 index 0000000000..bb68c14462 --- /dev/null +++ b/package/vnstat/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_VNSTAT + bool "vnstat" + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR # mbstowcs() + help + vnStat is a console-based network traffic monitor that keeps a + log of network traffic for the selected interface(s). It uses + the network interface statistics provided by the kernel as + information source. This means that vnStat won't actually be + sniffing any traffic and also ensures light use of system + resources. + + http://humdi.net/vnstat + +comment "vnstat needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/vnstat/vnstat.hash b/package/vnstat/vnstat.hash new file mode 100644 index 0000000000..82ee8c02ba --- /dev/null +++ b/package/vnstat/vnstat.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 c3814b5baa8b627198a8debfe1dce4b4346a342523818cc8668a5497971dbc39 vnstat-1.15.tar.gz diff --git a/package/vnstat/vnstat.mk b/package/vnstat/vnstat.mk new file mode 100644 index 0000000000..576f240a28 --- /dev/null +++ b/package/vnstat/vnstat.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# vnstat +# +################################################################################ + +VNSTAT_VERSION = 1.15 +VNSTAT_SITE = http://humdi.net/vnstat +VNSTAT_LICENSE = GPLv2 +VNSTAT_LICENSE_FILES = COPYING +VNSTAT_DEPENDENCIES = host-pkgconf +# We're patching configure.ac, so we need to autoreconf +VNSTAT_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_GD)$(BR2_PACKAGE_LIBPNG),yy) +VNSTAT_DEPENDENCIES += gd +VNSTAT_CONF_OPTS = --enable-image-output +else +VNSTAT_CONF_OPTS = --disable-image-output +endif + +# vnStat declares an 'install-data-hook' rule that tries to run +# 'vnstat --showconfig' on the host to generate a default config file. +# That obviously doesn't work when cross-compiling, so avoid it +# entirely. +VNSTAT_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-exec + +$(eval $(autotools-package)) diff --git a/package/vo-aacenc/Config.in b/package/vo-aacenc/Config.in new file mode 100644 index 0000000000..b5487dc96d --- /dev/null +++ b/package/vo-aacenc/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_VO_AACENC + bool "vo-aacenc" + help + This library contains an encoder implementation of the + Advanced Audio Coding (AAC) audio codec. The library is + based on a codec implementation by VisualOn as part of the + Stagefright framework from the Google Android project. + + http://sourceforge.net/projects/opencore-amr/ diff --git a/package/vo-aacenc/vo-aacenc.hash b/package/vo-aacenc/vo-aacenc.hash new file mode 100644 index 0000000000..822f8424a7 --- /dev/null +++ b/package/vo-aacenc/vo-aacenc.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 e51a7477a359f18df7c4f82d195dab4e14e7414cbd48cf79cc195fc446850f36 vo-aacenc-0.1.3.tar.gz diff --git a/package/vo-aacenc/vo-aacenc.mk b/package/vo-aacenc/vo-aacenc.mk new file mode 100644 index 0000000000..23d7e62d49 --- /dev/null +++ b/package/vo-aacenc/vo-aacenc.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# vo-aacenc +# +################################################################################ + +VO_AACENC_VERSION = 0.1.3 +VO_AACENC_SITE = http://downloads.sourceforge.net/project/opencore-amr/vo-aacenc +VO_AACENC_LICENSE = Apache-2.0 +VO_AACENC_LICENSE_FILES = COPYING +VO_AACENC_INSTALL_STAGING = YES + +VO_AACENC_CFLAGS = $(TARGET_CFLAGS) + +# arm specific asm optimizations +ifeq ($(BR2_arm),y) + +# vo-aacenc has ARM assembly code that cannot be compiled in Thumb2 +# mode, so we must force the traditional ARM mode. +VO_AACENC_CFLAGS += -marm + +ifeq ($(BR2_ARM_CPU_HAS_NEON),y) +VO_AACENC_CONF_OPTS += --enable-armv7neon +# mfpu=neon needed to assemble neon code +VO_AACENC_CFLAGS += -mfpu=neon +else +VO_AACENC_CONF_OPTS += --disable-armv7neon + +ifeq ($(BR2_ARM_CPU_ARMV4),) +VO_AACENC_CONF_OPTS += --enable-armv5e +else +VO_AACENC_CONF_OPTS += --disable-armv5e +endif + +endif # !neon +endif # arm + +VO_AACENC_CONF_ENV = \ + CFLAGS="$(VO_AACENC_CFLAGS)" + +$(eval $(autotools-package)) diff --git a/package/vorbis-tools/0001-oggenc-Fix-large-alloca-on-bad-AIFF-input.patch b/package/vorbis-tools/0001-oggenc-Fix-large-alloca-on-bad-AIFF-input.patch new file mode 100644 index 0000000000..6df67869e5 --- /dev/null +++ b/package/vorbis-tools/0001-oggenc-Fix-large-alloca-on-bad-AIFF-input.patch @@ -0,0 +1,37 @@ +Fix CVE-2015-6749 - invalid AIFF file causes alloca() buffer overflow. +See https://trac.xiph.org/ticket/2212 +Status: upstream + +Signed-off-by: Gustavo Zacarias + +diff --git a/oggenc/audio.c b/oggenc/audio.c +index 477da8c..4921fb9 100644 +--- a/oggenc/audio.c ++++ b/oggenc/audio.c +@@ -245,8 +245,8 @@ static int aiff_permute_matrix[6][6] = + int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) + { + int aifc; /* AIFC or AIFF? */ +- unsigned int len; +- unsigned char *buffer; ++ unsigned int len, readlen; ++ unsigned char buffer[22]; + unsigned char buf2[8]; + aiff_fmt format; + aifffile *aiff = malloc(sizeof(aifffile)); +@@ -269,9 +269,9 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) + return 0; /* Weird common chunk */ + } + +- buffer = alloca(len); +- +- if(fread(buffer,1,len,in) < len) ++ readlen = len < sizeof(buffer) ? len : sizeof(buffer); ++ if(fread(buffer,1,readlen,in) < readlen || ++ (len > readlen && !seek_forward(in, len-readlen))) + { + fprintf(stderr, _("Warning: Unexpected EOF in reading AIFF header\n")); + return 0; +-- +2.5.0 + diff --git a/package/vorbis-tools/Config.in b/package/vorbis-tools/Config.in new file mode 100644 index 0000000000..6092e01acc --- /dev/null +++ b/package/vorbis-tools/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_VORBIS_TOOLS + bool "vorbis-tools" + select BR2_PACKAGE_LIBAO + select BR2_PACKAGE_LIBOGG + select BR2_PACKAGE_LIBVORBIS + select BR2_PACKAGE_LIBCURL + help + Standalone player, encoder and decoder for Ogg format files. + + Works also as a streaming player. + + http://www.vorbis.com/ diff --git a/package/vorbis-tools/vorbis-tools.hash b/package/vorbis-tools/vorbis-tools.hash new file mode 100644 index 0000000000..8f40eda9d2 --- /dev/null +++ b/package/vorbis-tools/vorbis-tools.hash @@ -0,0 +1,2 @@ +# From http://downloads.xiph.org/releases/vorbis/SHA256SUMS +sha256 a389395baa43f8e5a796c99daf62397e435a7e73531c9f44d9084055a05d22bc vorbis-tools-1.4.0.tar.gz diff --git a/package/vorbis-tools/vorbis-tools.mk b/package/vorbis-tools/vorbis-tools.mk new file mode 100644 index 0000000000..fc8e7dd107 --- /dev/null +++ b/package/vorbis-tools/vorbis-tools.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# vorbis-tools +# +################################################################################ + +VORBIS_TOOLS_VERSION = 1.4.0 +VORBIS_TOOLS_SITE = http://downloads.xiph.org/releases/vorbis +VORBIS_TOOLS_LICENSE = GPLv2 +VORBIS_TOOLS_LICENSE_FILES = COPYING +VORBIS_TOOLS_DEPENDENCIES = libao libogg libvorbis libcurl +VORBIS_TOOLS_CONF_OPTS = --program-transform-name='' +# ogg123 calls math functions but forgets to link with libm +VORBIS_TOOLS_CONF_ENV = LIBS=-lm + +ifeq ($(BR2_PACKAGE_FLAC),y) +VORBIS_TOOLS_DEPENDENCIES += flac +endif + +ifeq ($(BR2_PACKAGE_SPEEX),y) +VORBIS_TOOLS_DEPENDENCIES += speex +endif + +$(eval $(autotools-package)) diff --git a/package/vpnc/0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch b/package/vpnc/0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch new file mode 100644 index 0000000000..cad3e1ad08 --- /dev/null +++ b/package/vpnc/0001-Misc.-Makefile-cleanup-and-fix-the-VERSION-definitio.patch @@ -0,0 +1,59 @@ +From 40b35a82ea581f5dfb1b0b20c4ba3e9f01f35107 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Mon, 8 Feb 2016 23:02:45 +0100 +Subject: [PATCH] Misc. Makefile cleanup and fix the VERSION definition. + +Signed-off-by: Samuel Martin +Signed-off-by: Thomas Petazzoni +--- + Makefile | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +diff --git a/Makefile b/Makefile +index 9b96d83..62742d0 100644 +--- a/Makefile ++++ b/Makefile +@@ -20,7 +20,7 @@ + # $Id$ + + DESTDIR= +-PREFIX=/usr/local ++PREFIX?=/usr/local + ETCDIR=/etc/vpnc + BINDIR=$(PREFIX)/bin + SBINDIR=$(PREFIX)/sbin +@@ -32,8 +32,6 @@ BINS = vpnc cisco-decrypt + OBJS = $(addsuffix .o,$(basename $(SRCS))) + BINOBJS = $(addsuffix .o,$(BINS)) + BINSRCS = $(addsuffix .c,$(BINS)) +-VERSION := $(shell sh mk-version) +-RELEASE_VERSION := $(shell cat VERSION) + + # The license of vpnc (Gpl >= 2) is quite likely incompatible with the + # openssl license. Openssl is currently used to provide certificate +@@ -50,11 +48,11 @@ RELEASE_VERSION := $(shell cat VERSION) + #OPENSSL_GPL_VIOLATION = -DOPENSSL_GPL_VIOLATION + #OPENSSLLIBS = -lcrypto + +-CC=gcc ++CC ?= gcc + CFLAGS ?= -O3 -g + CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings + CFLAGS += $(shell libgcrypt-config --cflags) +-CPPFLAGS += -DVERSION=\"$(VERSION)\" $(OPENSSL_GPL_VIOLATION) ++CPPFLAGS += $(OPENSSL_GPL_VIOLATION) + LDFLAGS ?= -g + LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS) + +@@ -81,7 +79,7 @@ cisco-decrypt : cisco-decrypt.o decrypt-utils.o + $(CC) -o $@ $^ $(LDFLAGS) + + .depend: $(SRCS) $(BINSRCS) +- $(CC) -MM $(SRCS) $(BINSRCS) $(CFLAGS) $(CPPFLAGS) > $@ ++ $(CC) -MM $(SRCS) $(BINSRCS) $(CPPFLAGS) $(CFLAGS) > $@ + + vpnc-debug.c vpnc-debug.h : isakmp.h enum2debug.pl + LC_ALL=C perl -w ./enum2debug.pl isakmp.h >vpnc-debug.c 2>vpnc-debug.h +-- +2.6.4 + diff --git a/package/vpnc/0002-Don-t-build-manpages.patch b/package/vpnc/0002-Don-t-build-manpages.patch new file mode 100644 index 0000000000..be4414e3fb --- /dev/null +++ b/package/vpnc/0002-Don-t-build-manpages.patch @@ -0,0 +1,31 @@ +From 6bbd03ec8928fd2a3056fc55ee48900fc88d3061 Mon Sep 17 00:00:00 2001 +From: Ulf Samuelsson +Date: Mon, 8 Feb 2016 23:03:48 +0100 +Subject: [PATCH] Don't build manpages + +Patch originally from Ulf Samuelsson . + +Signed-off-by: Thomas Petazzoni +--- + Makefile | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 1ca6459..857bf8d 100644 +--- a/Makefile ++++ b/Makefile +@@ -70,7 +70,10 @@ vpnc : $(OBJS) vpnc.o + $(CC) -o $@ $^ $(LDFLAGS) + + vpnc.8 : vpnc.8.template makeman.pl vpnc +- ./makeman.pl ++ @echo "Cannot make manual when cross compiling" ++ touch $@ ++ ++# ./makeman.pl + + vpnc-script : vpnc-script.in + sed -e 's,@''PREFIX''@,$(PREFIX),g' $< > $@ && chmod 755 $@ +-- +2.6.4 + diff --git a/package/vpnc/0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch b/package/vpnc/0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch new file mode 100644 index 0000000000..4b8446ff34 --- /dev/null +++ b/package/vpnc/0003-Replace-deprecated-SUSv3-functions-with-POSIX-equiva.patch @@ -0,0 +1,32 @@ +From ca1a9ad59ae07345720e315b928bb014a8aeea4c Mon Sep 17 00:00:00 2001 +From: Bernhard Reutner-Fischer +Date: Mon, 8 Feb 2016 23:05:23 +0100 +Subject: [PATCH] Replace deprecated SUSv3 functions with POSIX equivalents + +Replace the deprecated SUSv3 function index() by its POSIX equivalent +strchr(). + +Patch originally from Bernhard Reutner-Fischer +. + +Signed-off-by: Thomas Petazzoni +--- + config.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config.c b/config.c +index bdd0833..d1750ca 100644 +--- a/config.c ++++ b/config.c +@@ -456,7 +456,7 @@ static char *get_config_filename(const char *name, int add_dot_conf) + { + char *realname; + +- asprintf(&realname, "%s%s%s", index(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : ""); ++ asprintf(&realname, "%s%s%s", strchr(name, '/') ? "" : "/etc/vpnc/", name, add_dot_conf ? ".conf" : ""); + return realname; + } + +-- +2.6.4 + diff --git a/package/vpnc/Config.in b/package/vpnc/Config.in new file mode 100644 index 0000000000..bc27331c6f --- /dev/null +++ b/package/vpnc/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_VPNC + bool "vpnc" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBGCRYPT + select BR2_PACKAGE_LIBGPG_ERROR + help + Client for Cisco VPN concentrator + 3000 Series VPN Concentrator + IOS Routers + PIX/ASA Zecurity Appliances + Juniper/Netscreen + + http://www.unix-ag.uni-kl.de/~massar/vpnc diff --git a/package/vpnc/vpnc.hash b/package/vpnc/vpnc.hash new file mode 100644 index 0000000000..3474057b77 --- /dev/null +++ b/package/vpnc/vpnc.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 925c8e879f78f1d575b69ee3868b886a0139926ea84c2138a89b9b7d8696f50a vpnc-70f1211f6f26e87e374d66f9a986e855215b8e3e.tar.gz diff --git a/package/vpnc/vpnc.mk b/package/vpnc/vpnc.mk new file mode 100644 index 0000000000..5dfc2ba655 --- /dev/null +++ b/package/vpnc/vpnc.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# vpnc +# +################################################################################ + +VPNC_VERSION = 70f1211f6f26e87e374d66f9a986e855215b8e3e +VPNC_SITE = $(call github,ndpgroup,vpnc,$(VPNC_VERSION)) +VPNC_LICENSE = GPLv2+ +VPNC_LICENSE_FILES = COPYING + +VPNC_DEPENDENCIES = libgcrypt libgpg-error + +VPNC_LDFLAGS = $(TARGET_LDFLAGS) -lgcrypt -lgpg-error +VPNC_CPPFLAGS = -DVERSION=\\\"$(VPNC_VERSION)\\\" + +define VPNC_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + CPPFLAGS="$(VPNC_CPPFLAGS)" LDFLAGS="$(VPNC_LDFLAGS)" +endef + +define VPNC_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) \ + CPPFLAGS="$(VPNC_CPPFLAGS)" LDFLAGS="$(VPNC_LDFLAGS)" \ + DESTDIR="$(TARGET_DIR)" PREFIX=/usr +endef + +$(eval $(generic-package)) diff --git a/package/vsftpd/0001-utmpx-builddef.patch b/package/vsftpd/0001-utmpx-builddef.patch new file mode 100644 index 0000000000..07bf13c86d --- /dev/null +++ b/package/vsftpd/0001-utmpx-builddef.patch @@ -0,0 +1,49 @@ +Add build option to disable utmpx update code + +On some embedded systems the libc may have utmpx support, but the +feature would be redundant. So add a build switch to disable utmpx +updating, similar to compiling on systems without utmpx support. + +Signed-off-by: Maarten ter Huurne + +diff -ru vsftpd-3.0.2.orig/builddefs.h vsftpd-3.0.2/builddefs.h +--- vsftpd-3.0.2.orig/builddefs.h 2012-04-05 05:24:56.000000000 +0200 ++++ vsftpd-3.0.2/builddefs.h 2014-09-16 14:23:36.128003245 +0200 +@@ -4,6 +4,7 @@ + #undef VSF_BUILD_TCPWRAPPERS + #define VSF_BUILD_PAM + #undef VSF_BUILD_SSL ++#define VSF_BUILD_UTMPX + + #endif /* VSF_BUILDDEFS_H */ + +diff -ru vsftpd-3.0.2.orig/sysdeputil.c vsftpd-3.0.2/sysdeputil.c +--- vsftpd-3.0.2.orig/sysdeputil.c 2012-09-16 06:18:04.000000000 +0200 ++++ vsftpd-3.0.2/sysdeputil.c 2014-09-16 14:26:42.686887724 +0200 +@@ -1158,7 +1158,7 @@ + + #endif /* !VSF_SYSDEP_NEED_OLD_FD_PASSING */ + +-#ifndef VSF_SYSDEP_HAVE_UTMPX ++#if !defined(VSF_BUILD_UTMPX) || !defined(VSF_SYSDEP_HAVE_UTMPX) + + void + vsf_insert_uwtmp(const struct mystr* p_user_str, +@@ -1173,7 +1173,7 @@ + { + } + +-#else /* !VSF_SYSDEP_HAVE_UTMPX */ ++#else /* !VSF_BUILD_UTMPX || !VSF_SYSDEP_HAVE_UTMPX */ + + /* IMHO, the pam_unix module REALLY should be doing this in its SM component */ + /* Statics */ +@@ -1238,7 +1238,7 @@ + updwtmpx(WTMPX_FILE, &s_utent); + } + +-#endif /* !VSF_SYSDEP_HAVE_UTMPX */ ++#endif /* !VSF_BUILD_UTMPX || !VSF_SYSDEP_HAVE_UTMPX */ + + void + vsf_set_die_if_parent_dies() diff --git a/package/vsftpd/0003-fix-CVE-2015-1419.patch b/package/vsftpd/0003-fix-CVE-2015-1419.patch new file mode 100644 index 0000000000..95ad017a1c --- /dev/null +++ b/package/vsftpd/0003-fix-CVE-2015-1419.patch @@ -0,0 +1,102 @@ +Fix CVE-2015-1419 - config option deny_file is not handled correctly. +From SUSE: https://bugzilla.suse.com/show_bug.cgi?id=915522 + +Signed-off-by: Gustavo Zacarias + +Index: vsftpd-3.0.2/ls.c +=================================================================== +--- vsftpd-3.0.2.orig/ls.c ++++ vsftpd-3.0.2/ls.c +@@ -7,6 +7,7 @@ + * Would you believe, code to handle directory listing. + */ + ++#include + #include "ls.h" + #include "access.h" + #include "defs.h" +@@ -243,11 +244,42 @@ vsf_filename_passes_filter(const struct + struct mystr temp_str = INIT_MYSTR; + struct mystr brace_list_str = INIT_MYSTR; + struct mystr new_filter_str = INIT_MYSTR; ++ struct mystr normalize_filename_str = INIT_MYSTR; ++ const char *normname; ++ const char *path; + int ret = 0; + char last_token = 0; + int must_match_at_current_pos = 1; ++ + str_copy(&filter_remain_str, p_filter_str); +- str_copy(&name_remain_str, p_filename_str); ++ ++ /* normalize filepath */ ++ path = str_strdup(p_filename_str); ++ normname = realpath(path, NULL); ++ if (normname == NULL) ++ goto out; ++ str_alloc_text(&normalize_filename_str, normname); ++ ++ if (!str_isempty (&filter_remain_str) && !str_isempty(&normalize_filename_str)) { ++ if (str_get_char_at(p_filter_str, 0) == '/') { ++ if (str_get_char_at(&normalize_filename_str, 0) != '/') { ++ str_getcwd (&name_remain_str); ++ ++ if (str_getlen(&name_remain_str) > 1) /* cwd != root dir */ ++ str_append_char (&name_remain_str, '/'); ++ ++ str_append_str (&name_remain_str, &normalize_filename_str); ++ } ++ else ++ str_copy (&name_remain_str, &normalize_filename_str); ++ } else { ++ if (str_get_char_at(p_filter_str, 0) != '{') ++ str_basename (&name_remain_str, &normalize_filename_str); ++ else ++ str_copy (&name_remain_str, &normalize_filename_str); ++ } ++ } else ++ str_copy(&name_remain_str, &normalize_filename_str); + + while (!str_isempty(&filter_remain_str) && *iters < VSFTP_MATCHITERS_MAX) + { +@@ -360,6 +392,9 @@ vsf_filename_passes_filter(const struct + ret = 0; + } + out: ++ free(normname); ++ free(path); ++ str_free(&normalize_filename_str); + str_free(&filter_remain_str); + str_free(&name_remain_str); + str_free(&temp_str); +Index: vsftpd-3.0.2/str.c +=================================================================== +--- vsftpd-3.0.2.orig/str.c ++++ vsftpd-3.0.2/str.c +@@ -770,3 +770,14 @@ str_replace_unprintable(struct mystr* p_ + } + } + ++void ++str_basename (struct mystr* d_str, const struct mystr* path) ++{ ++ static struct mystr tmp; ++ ++ str_copy (&tmp, path); ++ str_split_char_reverse(&tmp, d_str, '/'); ++ ++ if (str_isempty(d_str)) ++ str_copy (d_str, path); ++} +Index: vsftpd-3.0.2/str.h +=================================================================== +--- vsftpd-3.0.2.orig/str.h ++++ vsftpd-3.0.2/str.h +@@ -101,6 +101,7 @@ void str_replace_unprintable(struct myst + int str_atoi(const struct mystr* p_str); + filesize_t str_a_to_filesize_t(const struct mystr* p_str); + unsigned int str_octal_to_uint(const struct mystr* p_str); ++void str_basename (struct mystr* d_str, const struct mystr* path); + + /* PURPOSE: Extract a line of text (delimited by \n or EOF) from a string + * buffer, starting at character position 'p_pos'. The extracted line will diff --git a/package/vsftpd/Config.in b/package/vsftpd/Config.in new file mode 100644 index 0000000000..464d6f27e3 --- /dev/null +++ b/package/vsftpd/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_VSFTPD + bool "vsftpd" + depends on BR2_USE_MMU # fork() + help + vsftpd is an ftp daemon written with security in mind. + http://vsftpd.beasts.org/ + +if BR2_PACKAGE_VSFTPD + +config BR2_PACKAGE_VSFTPD_UTMPX + bool "log vsftpd access to utmpx" + # musl 1.1.4 has an empty utmpx implementation and no WTMPX_FILE + depends on !BR2_TOOLCHAIN_USES_MUSL + help + Enable logging of vsftpd access to utmpx. + Note that Buildroot does not generate utmpx by default. + +endif diff --git a/package/vsftpd/S70vsftpd b/package/vsftpd/S70vsftpd new file mode 100755 index 0000000000..38bcfd431f --- /dev/null +++ b/package/vsftpd/S70vsftpd @@ -0,0 +1,33 @@ +#! /bin/sh + +set -e + +DESC="vsftpd" +NAME=vsftpd +DAEMON=/usr/sbin/$NAME + +case "$1" in + start) + printf "Starting $DESC: " + start-stop-daemon -S -b -x $NAME + echo "OK" + ;; + stop) + printf "Stopping $DESC: " + start-stop-daemon -K -x $NAME + echo "OK" + ;; + restart|force-reload) + echo "Restarting $DESC: " + $0 stop + sleep 1 + $0 start + echo "" + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/package/vsftpd/vsftpd.hash b/package/vsftpd/vsftpd.hash new file mode 100644 index 0000000000..a0cd55b6d1 --- /dev/null +++ b/package/vsftpd/vsftpd.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 9d4d2bf6e6e2884852ba4e69e157a2cecd68c5a7635d66a3a8cf8d898c955ef7 vsftpd-3.0.3.tar.gz diff --git a/package/vsftpd/vsftpd.mk b/package/vsftpd/vsftpd.mk new file mode 100644 index 0000000000..db969f4352 --- /dev/null +++ b/package/vsftpd/vsftpd.mk @@ -0,0 +1,67 @@ +################################################################################ +# +# vsftpd +# +################################################################################ + +VSFTPD_VERSION = 3.0.3 +VSFTPD_SITE = https://security.appspot.com/downloads +VSFTPD_LIBS = -lcrypt +VSFTPD_LICENSE = GPLv2 +VSFTPD_LICENSE_FILES = COPYING + +define VSFTPD_DISABLE_UTMPX + $(SED) 's/.*VSF_BUILD_UTMPX/#undef VSF_BUILD_UTMPX/' $(@D)/builddefs.h +endef + +define VSFTPD_ENABLE_SSL + $(SED) 's/.*VSF_BUILD_SSL/#define VSF_BUILD_SSL/' $(@D)/builddefs.h +endef + +ifeq ($(BR2_PACKAGE_VSFTPD_UTMPX),) +VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_DISABLE_UTMPX +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +VSFTPD_DEPENDENCIES += openssl host-pkgconf +VSFTPD_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto` +VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_ENABLE_SSL +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +VSFTPD_DEPENDENCIES += libcap +VSFTPD_LIBS += -lcap +endif + +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +VSFTPD_DEPENDENCIES += linux-pam +VSFTPD_LIBS += -lpam +endif + +define VSFTPD_BUILD_CMDS + $(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" LIBS="$(VSFTPD_LIBS)" -C $(@D) +endef + +define VSFTPD_USERS + ftp -1 ftp -1 * /home/ftp - - Anonymous FTP User +endef + +define VSFTPD_INSTALL_INIT_SYSV + $(INSTALL) -D -m 755 package/vsftpd/S70vsftpd $(TARGET_DIR)/etc/init.d/S70vsftpd +endef + +# vsftpd won't work if the jail directory is writable, it has to be +# readable only otherwise you get the following error: +# 500 OOPS: vsftpd: refusing to run with writable root inside chroot() +# That's why we have to adjust the permissions of /home/ftp +define VSFTPD_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 755 $(@D)/vsftpd $(TARGET_DIR)/usr/sbin/vsftpd + test -f $(TARGET_DIR)/etc/vsftpd.conf || \ + $(INSTALL) -D -m 644 $(@D)/vsftpd.conf \ + $(TARGET_DIR)/etc/vsftpd.conf + $(INSTALL) -d -m 700 $(TARGET_DIR)/usr/share/empty + $(INSTALL) -d -m 555 $(TARGET_DIR)/home/ftp +endef + +$(eval $(generic-package)) diff --git a/package/vtun/0001-fix-installation.patch b/package/vtun/0001-fix-installation.patch new file mode 100644 index 0000000000..d9659fa885 --- /dev/null +++ b/package/vtun/0001-fix-installation.patch @@ -0,0 +1,44 @@ +Makefile.in: fix installation steps + +Not sure what the reason for that patch is, but originally added by Ulf +Samuelsson , when upgrading from 2.6.x to 3.0.2. + +yann.morin.1998@free.fr: the initial commit in the Buildroot tree had the +SoB by Ulf, but it was not explicitly reproduced here in the patch; so I +added it here directly in the patch. + +Somewhat-signed-off-by: Ulf Samuelsson +Signed-off-by: "Yann E. MORIN" +diff -durN vtun-3.0.3.orig/Makefile.in vtun-3.0.3/Makefile.in +--- vtun-3.0.3.orig/Makefile.in 2012-07-09 06:55:38.000000000 +0200 ++++ vtun-3.0.3/Makefile.in 2013-02-16 23:28:47.034036869 +0100 +@@ -28,7 +28,7 @@ + LEXFLAGS = -t + + INSTALL = @INSTALL@ +-INSTALL_OWNER = -o root -g 0 ++INSTALL_OWNER = + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +@@ -89,16 +89,15 @@ + + install_config: + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(ETC_DIR) +- if [ ! -f $(ETC_DIR)/vtund.conf ]; then \ +- $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); \ +- fi ++ $(INSTALL) -m 600 $(INSTALL_OWNER) vtund.conf $(DESTDIR)$(ETC_DIR); ++ $(INSTALL) -m 600 $(INSTALL_OWNER) scripts/vtund-start.conf $(DESTDIR)$(ETC_DIR); + + install: vtund install_config install_man +- $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(VAR_DIR)/run + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(STAT_DIR) + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(LOCK_DIR) + $(INSTALL) -d -m 755 $(INSTALL_OWNER) $(DESTDIR)$(SBIN_DIR) + $(INSTALL) -m 755 $(INSTALL_OWNER) vtund $(DESTDIR)$(SBIN_DIR) +- $(BIN_DIR)/strip $(DESTDIR)$(SBIN_DIR)/vtund ++ $(INSTALL) -m 755 -D $(INSTALL_OWNER) scripts/vtund.rc.debian \ ++ $(DESTDIR)$(ETC_DIR)/init.d/S90vtun + + # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/package/vtun/0002-fix-ssl-headers-checks.patch b/package/vtun/0002-fix-ssl-headers-checks.patch new file mode 100644 index 0000000000..765411af84 --- /dev/null +++ b/package/vtun/0002-fix-ssl-headers-checks.patch @@ -0,0 +1,47 @@ +configure.in: do not hard-code search patch for SSL headers + +Do. Not. Do. That. It breaks cross-compilation. + +Also use the SSL headers dir to look for blowfish headers. + +Signed-off-by: "Yann E. MORIN" + +diff -durN vtun-3.0.3.orig/configure.in vtun-3.0.3/configure.in +--- vtun-3.0.3.orig/configure.in 2009-03-29 12:08:51.000000000 +0200 ++++ vtun-3.0.3/configure.in 2013-02-16 23:44:44.004339680 +0100 +@@ -166,7 +166,7 @@ + AC_MSG_RESULT() + AC_CHECKING( for md5 Library and Header files ... ) + AC_SEARCH_HEADERS(md5.h, +- $SSL_HDR_DIR /usr/include/openssl "" /usr/include /usr/include/ssl /usr/local/include /usr/local/ssl/include /usr/include/sys, ++ $SSL_HDR_DIR "" , + , + AC_MSG_ERROR( SSL headers not found. ) + ) +@@ -176,7 +176,7 @@ + AC_MSG_RESULT() + AC_CHECKING( for blowfish Library and Header files ... ) + AC_SEARCH_HEADERS(blowfish.h, +- $BLOWFISH_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto, ++ $BLOWFISH_HDR_DIR $SSL_HDR_DIR, + AC_CHECK_LIB(crypto, BF_set_key, + [ + LIBS="$LIBS -lcrypto" +@@ -193,7 +193,7 @@ + AC_MSG_RESULT() + AC_CHECKING( for AES Library and Header files ... ) + AC_SEARCH_HEADERS(aes.h, +- $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto, ++ $SSL_HDR_DIR , + AC_CHECK_LIB(crypto, AES_set_encrypt_key, + [ + AC_DEFINE(HAVE_SSL_AES) +@@ -208,7 +208,7 @@ + AC_MSG_RESULT() + AC_CHECKING( for EVP Library and Header files ... ) + AC_SEARCH_HEADERS(evp.h, +- $SSL_HDR_DIR /usr/include/ssl /usr/include/openssl /usr/include /usr/local/include /usr/local/ssl/include /usr/include/crypto, ++ $SSL_HDR_DIR , + AC_CHECK_LIB(crypto, EVP_EncryptInit, + [ + AC_DEFINE(HAVE_SSL_EVP) diff --git a/package/vtun/0003-fixup-configure.in.patch b/package/vtun/0003-fixup-configure.in.patch new file mode 100644 index 0000000000..cb2ac67aa2 --- /dev/null +++ b/package/vtun/0003-fixup-configure.in.patch @@ -0,0 +1,92 @@ +configure.in: minimal syntax fixup for autoreconf + +This is the strictly minimal syntax fixups to make autoreconf happy... + +Signed-off-by: "Yann E. MORIN" + +--- +Note: configure.in is still full of incorrect syntax, but fixing it is +a task for another day, and would have to be upstreamed. But upstream +looks to be moribund at best, if not dead... :-( + +So, keep it for ourselves for now... Too bad, vtun is really helpfull. + +--- vtun-3.0.3.orig/configure.in 2013-02-16 23:54:52.582451817 +0100 ++++ vtun-3.0.3/configure.in 2013-02-17 00:03:13.640887353 +0100 +@@ -110,10 +110,10 @@ + AC_SEARCH_LIBS(nanosleep, rt posix4) + + dnl Check for setproctitle in libutil +-AC_SEARCH_LIBS(setproctitle, util bsd, AC_DEFINE(HAVE_SETPROC_TITLE) ) ++AC_SEARCH_LIBS(setproctitle, util bsd, AC_DEFINE([HAVE_SETPROC_TITLE],[],[Define to set title in /proc]) ) + + if test "$SHAPER" = "yes"; then +- AC_DEFINE(HAVE_SHAPER) ++ AC_DEFINE([HAVE_SHAPER],[],[Define to use shapper]) + fi + + if test "$ZLIB" = "yes"; then +@@ -121,7 +121,7 @@ + AC_CHECKING( for ZLIB Library and Header files ... ) + AC_CHECK_LIB(z, deflate, + LIBS="$LIBS -lz" +- AC_DEFINE(HAVE_ZLIB), ++ AC_DEFINE([HAVE_ZLIB],[],[Define to use ZLIB]), + AC_MSG_ERROR( Zlib library not found.) + ) + fi +@@ -148,7 +148,7 @@ + AC_CHECK_LIB($I, lzo1x_decompress, + [ + LIBS="$LIBS -l"$I +- AC_DEFINE(HAVE_LZO) ++ AC_DEFINE([HAVE_LZO],[],[Define to use LZO]) + havelzo=1 + ] + ) +@@ -180,8 +180,8 @@ + AC_CHECK_LIB(crypto, BF_set_key, + [ + LIBS="$LIBS -lcrypto" +- AC_DEFINE(HAVE_SSL) +- AC_DEFINE(HAVE_SSL_BLOWFISH) ++ AC_DEFINE([HAVE_SSL],[],[Define to use SSL]) ++ AC_DEFINE([HAVE_SSL_BLOWFISH],[],[Define to use blowfish]) + ], + AC_MSG_ERROR( SSL library not found. ) + ), +@@ -196,7 +196,7 @@ + $SSL_HDR_DIR , + AC_CHECK_LIB(crypto, AES_set_encrypt_key, + [ +- AC_DEFINE(HAVE_SSL_AES) ++ AC_DEFINE([HAVE_SSL_AES],[],[Define to use AES]) + ], + AC_MSG_ERROR( AES library not found. ) + ), +@@ -211,7 +211,7 @@ + $SSL_HDR_DIR , + AC_CHECK_LIB(crypto, EVP_EncryptInit, + [ +- AC_DEFINE(HAVE_SSL_EVP) ++ AC_DEFINE([HAVE_SSL_EVP],[],Define to use EVP) + ], + AC_MSG_ERROR( EVP library not found. ) + ), +@@ -220,7 +220,7 @@ + fi + + if test "$NATHACK" = "yes"; then +- AC_DEFINE(ENABLE_NAT_HACK) ++ AC_DEFINE([ENABLE_NAT_HACK],[],[Define to use NAT hack]) + fi + + if test "$SOCKS" = "yes"; then +@@ -274,6 +274,6 @@ + REL=`echo 'BRANCH-3_X' | tr -d '$: \-' | sed 's/^[A-Za-z]*//' | sed 's/\_/\./'` + changequote([,]) + +-AC_DEFINE_UNQUOTED(VTUN_VER, "$REL `date '+%m/%d/%Y'`") ++AC_DEFINE_UNQUOTED([VTUN_VER], ["$REL `date '+%m/%d/%Y'`"], [vtun version]) + + AC_OUTPUT(Makefile) diff --git a/package/vtun/Config.in b/package/vtun/Config.in new file mode 100644 index 0000000000..c1f6d384fc --- /dev/null +++ b/package/vtun/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_VTUN + bool "vtun" + select BR2_PACKAGE_LZO + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + depends on BR2_USE_MMU # fork() + help + Tool for easily creating Virtual Tunnels over TCP/IP networks + with traffic shaping, compression, and encryption. + + It supports IP, PPP, SLIP, Ethernet and other tunnel types. + + NOTE: It uses start-stop-daemon in init script, so be sure + to enable that within busybox + + http://vtun.sourceforge.net/ diff --git a/package/vtun/vtun.hash b/package/vtun/vtun.hash new file mode 100644 index 0000000000..baa6381f70 --- /dev/null +++ b/package/vtun/vtun.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 69dcbe4f8c5ce7d91b4150a6309e536d03b61841169746ca5788413ac7edb9cb vtun-3.0.3.tar.gz diff --git a/package/vtun/vtun.mk b/package/vtun/vtun.mk new file mode 100644 index 0000000000..5e0e266661 --- /dev/null +++ b/package/vtun/vtun.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# vtun +# +################################################################################ + +VTUN_VERSION = 3.0.3 +VTUN_SITE = http://downloads.sourceforge.net/project/vtun/vtun/$(VTUN_VERSION) +VTUN_LICENSE = GPLv2+ with OpenSSL exception +VTUN_LICENSE_FILES = README.OpenSSL +VTUN_DEPENDENCIES = host-bison host-flex zlib lzo openssl +VTUN_AUTORECONF = YES + +VTUN_CONF_OPTS = \ + --with-ssl-headers=$(STAGING_DIR)/usr/include/openssl \ + --with-lzo-headers=$(STAGING_DIR)/usr/include/lzo \ + --with-lzo-lib=$(STAGING_DIR)/usr/lib + +# Assumes old-style gcc inline symbol visibility rules +VTUN_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -std=gnu89" + +$(eval $(autotools-package)) diff --git a/package/w_scan/0001-musl.patch b/package/w_scan/0001-musl.patch new file mode 100644 index 0000000000..7633d551dd --- /dev/null +++ b/package/w_scan/0001-musl.patch @@ -0,0 +1,26 @@ +Fix musl build + +Signed-off-by: Bernd Kuhls + +diff -uNr w_scan-20141122.org/descriptors.h w_scan-20141122/descriptors.h +--- w_scan-20141122.org/descriptors.h 2014-11-22 09:49:26.000000000 +0100 ++++ w_scan-20141122/descriptors.h 2016-01-24 14:05:21.000000000 +0100 +@@ -28,6 +28,7 @@ + #ifndef __DESCRIPTORS_H__ + #define __DESCRIPTORS_H__ + ++#include + #include "extended_frontend.h" + + /****************************************************************************** +diff -uNr w_scan-20141122.org/version.h w_scan-20141122/version.h +--- w_scan-20141122.org/version.h 2014-11-22 11:59:56.000000000 +0100 ++++ w_scan-20141122/version.h 2016-01-24 14:06:33.000000000 +0100 +@@ -1,6 +1,6 @@ + /* AUTOMATICALLY GENERATED - DO NOT EDIT MANUALLY */ + #ifndef W_SCAN_VERSION_H + #define W_SCAN_VERSION_H +-uint version=20141122; ++unsigned int version=20141122; + #endif + diff --git a/package/w_scan/Config.in b/package/w_scan/Config.in new file mode 100644 index 0000000000..2d4f63434e --- /dev/null +++ b/package/w_scan/Config.in @@ -0,0 +1,14 @@ +comment "w_scan needs a toolchain w/ headers >= 3.7" + depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + +config BR2_PACKAGE_W_SCAN + bool "w_scan" + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + w_scan is a small command line utility used to perform frequency + scans for DVB and ATSC transmissions. It is capable of creating + channels.conf files (in different output formats !) as well as + initial tuning data for scan. + + http://wirbel.htpc-forum.de/w_scan/index_en.html diff --git a/package/w_scan/w_scan.hash b/package/w_scan/w_scan.hash new file mode 100644 index 0000000000..4c336f3d56 --- /dev/null +++ b/package/w_scan/w_scan.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 b6d7c9ab997c53a0b0d92e8390f313cc3b82ee8ece1756b4e526119fd5ba09b4 w_scan-20141122.tar.bz2 diff --git a/package/w_scan/w_scan.mk b/package/w_scan/w_scan.mk new file mode 100644 index 0000000000..3ec84ed8b6 --- /dev/null +++ b/package/w_scan/w_scan.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# w_scan +# +################################################################################ + +W_SCAN_VERSION = 20141122 +W_SCAN_SOURCE = w_scan-$(W_SCAN_VERSION).tar.bz2 +W_SCAN_SITE = http://wirbel.htpc-forum.de/w_scan +W_SCAN_LICENSE = GPLv2+ +W_SCAN_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +W_SCAN_DEPENDENCIES += libiconv +W_SCAN_CONF_ENV += LIBS=-liconv +endif + +$(eval $(autotools-package)) diff --git a/package/wavpack/Config.in b/package/wavpack/Config.in new file mode 100644 index 0000000000..1ef3e420da --- /dev/null +++ b/package/wavpack/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_WAVPACK + bool "wavpack" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + WavPack is a completely open audio compression format providing + lossless, high-quality lossy, and a unique hybrid compression mode. + + http://www.wavpack.com/ diff --git a/package/wavpack/wavpack.hash b/package/wavpack/wavpack.hash new file mode 100644 index 0000000000..f15afc2524 --- /dev/null +++ b/package/wavpack/wavpack.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 7d31b34166c33c3109b45c6e4579b472fd05e3ee8ec6d728352961c5cdd1d6b0 wavpack-4.75.2.tar.bz2 diff --git a/package/wavpack/wavpack.mk b/package/wavpack/wavpack.mk new file mode 100644 index 0000000000..ae16454806 --- /dev/null +++ b/package/wavpack/wavpack.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# wavpack +# +################################################################################ + +WAVPACK_VERSION = 4.75.2 +WAVPACK_SITE = http://www.wavpack.com +WAVPACK_SOURCE = wavpack-$(WAVPACK_VERSION).tar.bz2 +WAVPACK_INSTALL_STAGING = YES +WAVPACK_DEPENDENCIES = $(if $(BR2_ENABLE_LOCALE),,libiconv) +WAVPACK_LICENSE = BSD-3c +WAVPACK_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +WAVPACK_CONF_OPTS += LIBS=-liconv +endif + +# WavPack "autodetects" CPU type to enable ASM code. However, the assembly code +# for ARM is written for ARMv7 only and building WavPack for an ARM-non-v7 +# architecture will fail. We explicitly enable ASM for the supported +# architectures x86, x64 and ARMv7 and disable it for all others. +ifeq ($(BR2_i386)$(BR2_x86_64)$(BR2_ARM_CPU_ARMV7A),y) +WAVPACK_CONF_OPTS += --enable-asm +else +WAVPACK_CONF_OPTS += --disable-asm +endif + +$(eval $(autotools-package)) diff --git a/package/wayland-protocols/Config.in b/package/wayland-protocols/Config.in new file mode 100644 index 0000000000..8b4dedfd83 --- /dev/null +++ b/package/wayland-protocols/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_WAYLAND_PROTOCOLS + bool "wayland-protocols" + # Not really... but useless otherwise + depends on BR2_PACKAGE_WAYLAND + help + Wayland protocols that adds functionality not available in + the Wayland core protocol. + + http://wayland.freedesktop.org/ diff --git a/package/wayland-protocols/wayland-protocols.hash b/package/wayland-protocols/wayland-protocols.hash new file mode 100644 index 0000000000..f2d5b7fe94 --- /dev/null +++ b/package/wayland-protocols/wayland-protocols.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/wayland-devel/2015-November/025759.html +sha256 a538a8e3f999f2722897eb60aa2e2b53d879381b413b630957d58a9acd226def wayland-protocols-1.0.tar.xz diff --git a/package/wayland-protocols/wayland-protocols.mk b/package/wayland-protocols/wayland-protocols.mk new file mode 100644 index 0000000000..bb6d52f895 --- /dev/null +++ b/package/wayland-protocols/wayland-protocols.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# wayland-protocols +# +################################################################################ + +WAYLAND_PROTOCOLS_VERSION = 1.0 +WAYLAND_PROTOCOLS_SITE = http://wayland.freedesktop.org/releases +WAYLAND_PROTOCOLS_SOURCE = wayland-protocols-$(WAYLAND_PROTOCOLS_VERSION).tar.xz +WAYLAND_PROTOCOLS_LICENSE = MIT +WAYLAND_PROTOCOLS_LICENSE_FILES = COPYING +WAYLAND_PROTOCOLS_INSTALL_STAGING = YES +WAYLAND_PROTOCOLS_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/wayland/Config.in b/package/wayland/Config.in new file mode 100644 index 0000000000..32718fc2b2 --- /dev/null +++ b/package/wayland/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_WAYLAND + bool "wayland" + depends on !BR2_STATIC_LIBS # dlfcn.h + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_EXPAT + select BR2_PACKAGE_LIBFFI + select BR2_PACKAGE_LIBXML2 + help + Wayland is a project to define a protocol for a compositor + to talk to its clients as well as a library implementation + of the protocol. + + http://wayland.freedesktop.org/ + +comment "wayland needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/wayland/wayland.hash b/package/wayland/wayland.hash new file mode 100644 index 0000000000..c9d0721cb6 --- /dev/null +++ b/package/wayland/wayland.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/wayland-devel/2016-February/027038.html +sha256 4bf6e790aa6f50ab3825676282ecd75850ec9c4767af96ecb7127b1f3c3d60dc wayland-1.10.0.tar.xz diff --git a/package/wayland/wayland.mk b/package/wayland/wayland.mk new file mode 100644 index 0000000000..215e70ac78 --- /dev/null +++ b/package/wayland/wayland.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# wayland +# +################################################################################ + +WAYLAND_VERSION = 1.10.0 +WAYLAND_SITE = http://wayland.freedesktop.org/releases +WAYLAND_SOURCE = wayland-$(WAYLAND_VERSION).tar.xz +WAYLAND_LICENSE = MIT +WAYLAND_LICENSE_FILES = COPYING +WAYLAND_INSTALL_STAGING = YES +WAYLAND_DEPENDENCIES = host-pkgconf host-wayland expat libffi libxml2 + +# wayland-scanner is only needed for building, not on the target +WAYLAND_CONF_OPTS = --disable-scanner --with-host-scanner + +# Remove the DTD from the target, it's not needed at runtime +define WAYLAND_TARGET_CLEANUP + rm -rf $(TARGET_DIR)/usr/share/wayland +endef +WAYLAND_POST_INSTALL_TARGET_HOOKS += WAYLAND_TARGET_CLEANUP + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/webkit/0001-build-fix-for-32-bit-autotools.patch b/package/webkit/0001-build-fix-for-32-bit-autotools.patch new file mode 100644 index 0000000000..d7765ead0e --- /dev/null +++ b/package/webkit/0001-build-fix-for-32-bit-autotools.patch @@ -0,0 +1,34 @@ +Add missing symbol for WebCore::TextIterator::getLocationAndLengthFromRange + +Signed-off-by: Markos Chandras + +From f5bb58f9096061f00c948e668335811d364ba360 Mon Sep 17 00:00:00 2001 +From: "kov@webkit.org" +Date: Thu, 7 Feb 2013 13:48:46 +0000 +Subject: [PATCH] Unreviewed build fix after r141196 for 32 bits autotools. + +* Source/autotools/symbols.filter: restore 32 bits version of the +WebCore::TextIterator::getLocationAndLengthFromRange(WebCore::Node*, +WebCore::Range const*, unsigned int&, unsigned int&) symbol. + +git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142105 268f45cc-cd09-0410-ab3c-d52691b4dbfc +--- + ChangeLog | 8 ++++++++ + Source/autotools/symbols.filter | 1 + + 2 files changed, 9 insertions(+) + +diff --git a/Source/autotools/symbols.filter b/Source/autotools/symbols.filter +index 9d730b3..2edefaf 100644 +--- a/Source/autotools/symbols.filter ++++ b/Source/autotools/symbols.filter +@@ -57,6 +57,7 @@ _ZN7WebCore11HistoryItem16setDocumentStateERKN3WTF6VectorINS1_6StringELj0EEE; + _ZN7WebCore11HistoryItem16setDocumentStateERKN3WTF6VectorINS1_6StringELm0EEE; + _ZN7WebCore11MemoryCache14resourceForURLERKNS_4KURLE; + _ZN7WebCore12TextIterator26rangeFromLocationAndLengthEPNS_13ContainerNodeEiib; ++_ZN7WebCore12TextIterator29getLocationAndLengthFromRangeEPNS_4NodeEPKNS_5RangeERjS6_; + _ZN7WebCore12TextIterator29getLocationAndLengthFromRangeEPNS_4NodeEPKNS_5RangeERmS6_; + _ZN7WebCore12PrintContext20pageNumberForElementEPNS_7ElementERKNS_9FloatSizeE; + _ZN7WebCore13createWrapperEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_4NodeE; +-- +1.8.3.2 + diff --git a/package/webkit/0002-build-fix-for-gtklauncher.patch b/package/webkit/0002-build-fix-for-gtklauncher.patch new file mode 100644 index 0000000000..9a840b62fe --- /dev/null +++ b/package/webkit/0002-build-fix-for-gtklauncher.patch @@ -0,0 +1,51 @@ +Make gstreamer support conditional + +Signed-off-by: Markos Chandras + +From f1055f61bce46eccf8dc0aa017113a08d3d71944 Mon Sep 17 00:00:00 2001 +From: "commit-queue@webkit.org" + +Date: Fri, 15 Mar 2013 07:13:51 +0000 +Subject: [PATCH] Build fix for Tools/GtkLauncher/Programs_GtkLauncher-main.o + if gstreamer is not installed https://bugs.webkit.org/show_bug.cgi?id=112394 + +Patch by Tobias Mueller on 2013-03-15 +Reviewed by Philippe Normand. + +* GtkLauncher/main.c: +(main): Guard using the gstreamer function with #ifdef WTF_USE_GSTREAMER + +git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145881 268f45cc-cd09-0410-ab3c-d52691b4dbfc +--- + Tools/ChangeLog | 10 ++++++++++ + Tools/GtkLauncher/main.c | 5 ++++- + 2 files changed, 14 insertions(+), 1 deletion(-) + +diff --git a/Tools/GtkLauncher/main.c b/Tools/GtkLauncher/main.c +index 32baf4a..84c8833 100644 +--- a/Tools/GtkLauncher/main.c ++++ b/Tools/GtkLauncher/main.c +@@ -28,7 +28,9 @@ + #include "autotoolsconfig.h" + #include "LauncherInspectorWindow.h" + #include ++#ifdef WTF_USE_GSTREAMER + #include ++#endif + #include + #include + #include +@@ -489,8 +491,9 @@ int main(int argc, char* argv[]) + GOptionContext *context = g_option_context_new(0); + g_option_context_add_main_entries(context, commandLineOptions, 0); + g_option_context_add_group(context, gtk_get_option_group(TRUE)); ++#ifdef WTF_USE_GSTREAMER + g_option_context_add_group(context, gst_init_get_option_group()); +- ++#endif + webkitSettings = webkit_web_settings_new(); + g_object_set(webkitSettings, "enable-developer-extras", TRUE, NULL); + if (!addWebSettingsGroupToContext(context, webkitSettings)) { +-- +1.8.3.2 + diff --git a/package/webkit/0003-detect-harfbuzz-icu.patch b/package/webkit/0003-detect-harfbuzz-icu.patch new file mode 100644 index 0000000000..dc93c67e33 --- /dev/null +++ b/package/webkit/0003-detect-harfbuzz-icu.patch @@ -0,0 +1,28 @@ +harfbuzz-icu detections based on the following upstream commits + +- 5f3ae29ffb29c499c1825578ba7f3ffcbf1aa8b9 +- ad2a23ec44b692bde43a13b658990770caa8dfc5 +- 22b4786377142424bfb6562ff029997acd0846d1 + +Signed-off-by: Markos Chandras + +Index: webkit-1.11.5/configure.ac +=================================================================== +--- webkit-1.11.5.orig/configure.ac ++++ webkit-1.11.5/configure.ac +@@ -938,6 +938,15 @@ PKG_CHECK_MODULES([FREETYPE], + freetype2 >= $FREETYPE2_REQUIRED_VERSION + harfbuzz]) + fi ++# HarfBuzz 0.9.18 splits harbuzz-icu into a separate library. ++# Since we support earlier HarfBuzz versions we keep this conditional for now. ++m4_define([harfbuzz_required_version], [0.9.7]) ++if $PKG_CONFIG --atleast-version 0.9.18 harfbuzz; then ++ PKG_CHECK_MODULES([HARFBUZZ_ICU], [harfbuzz-icu >= $harfbuzz_required_version]) ++ FREETYPE_CFLAGS+=" $HARFBUZZ_ICU_CFLAGS" ++ FREETYPE_LIBS+=" $HARFBUZZ_ICU_LIBS" ++fi ++ + AC_SUBST([FREETYPE_CFLAGS]) + AC_SUBST([FREETYPE_LIBS]) + diff --git a/package/webkit/0004-disable-docrebase.patch b/package/webkit/0004-disable-docrebase.patch new file mode 100644 index 0000000000..2692d617a4 --- /dev/null +++ b/package/webkit/0004-disable-docrebase.patch @@ -0,0 +1,27 @@ +This patch prevents documentation from being rebased or installed. This +prevents an error when gtk-doc --rebase is called. + +Signed-off-by: Spenser Gilliland +Signed-off-by: Markos Chandras + +Index: webkit-1.11.5/Tools/GNUmakefile.am +=================================================================== +--- webkit-1.11.5.orig/Tools/GNUmakefile.am ++++ webkit-1.11.5/Tools/GNUmakefile.am +@@ -308,6 +308,8 @@ EXTRA_DIST += \ + Tools/Scripts/webkit-build-directory \ + Tools/Scripts/webkitdirs.pm + ++if ENABLE_GTK_DOC ++ + docs: docs-build.stamp + .PHONY : docs + DISTCLEANFILES += docs-build.stamp +@@ -412,7 +414,6 @@ if ENABLE_WEBKIT2 + rm -rf $${installdir} + endif + +-if ENABLE_GTK_DOC + all: docs-build.stamp + endif + diff --git a/package/webkit/0005-disable-tests.patch b/package/webkit/0005-disable-tests.patch new file mode 100644 index 0000000000..6fa6daae6b --- /dev/null +++ b/package/webkit/0005-disable-tests.patch @@ -0,0 +1,80 @@ +This prevents the Webkit test suites from being built. + +Signed-off-by: Spenser Gilliland +---- +Index: webkit-1.9.6/GNUmakefile.am +=================================================================== +--- webkit-1.9.6.orig/GNUmakefile.am 2012-08-06 03:17:24.000000000 -0500 ++++ webkit-1.9.6/GNUmakefile.am 2013-05-28 10:08:53.645129501 -0500 +@@ -282,11 +282,14 @@ + include Tools/DumpRenderTree/gtk/GNUmakefile.ImageDiff.am + + include Source/WebKit2/GNUmakefile.am +-include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am + include Tools/MiniBrowser/gtk/GNUmakefile.am ++ ++if ENABLE_TESTS ++include Source/WebKit2/UIProcess/API/gtk/tests/GNUmakefile.am + include Tools/WebKitTestRunner/GNUmakefile.am + include Source/ThirdParty/gtest/GNUmakefile.am + include Tools/TestWebKitAPI/GNUmakefile.am ++endif # ENABLE_TESTS + # [GTK] Refactor the translations now that we have webkit2 + # https://bugs.webkit.org/show_bug.cgi?id=55153 + +Index: webkit-1.9.6/Source/WebKit/gtk/GNUmakefile.am +=================================================================== +--- webkit-1.9.6.orig/Source/WebKit/gtk/GNUmakefile.am 2012-07-19 05:02:29.000000000 -0500 ++++ webkit-1.9.6/Source/WebKit/gtk/GNUmakefile.am 2013-05-28 10:09:49.277130516 -0500 +@@ -413,6 +413,7 @@ + dist_resources_DATA = \ + $(shell ls $(srcdir)/Source/WebKit/gtk/resources/*.html) + ++if ENABLE_TESTS + # Build unit tests + webkit_tests_cflags = \ + -fno-strict-aliasing \ +@@ -613,6 +614,8 @@ + Programs_unittests_testcopyandpaste_LDADD = $(webkit_tests_ldadd) + Programs_unittests_testcopyandpaste_LDFLAGS = $(webkit_tests_ldflags) + ++endif # ENABLE_TESTS ++ + # Project-wide clean rules + # Files that will be cleaned + CLEANFILES += \ +Index: webkit-1.9.6/configure.ac +=================================================================== +--- webkit-1.9.6.orig/configure.ac 2012-08-06 08:45:10.000000000 -0500 ++++ webkit-1.9.6/configure.ac 2013-05-28 10:07:55.817128445 -0500 +@@ -516,6 +516,14 @@ + AC_SUBST(CAIRO_CFLAGS) + AC_SUBST(CAIRO_LIBS) + ++# check wheter to build tests ++AC_MSG_CHECKING([wheter to build tests]) ++AC_ARG_ENABLE(tests, ++ AC_HELP_STRING([--enable-tests], ++ [turn on tests [default=no]]), ++ [],[enable_debug="no"]) ++AC_MSG_RESULT([$enable_tests]) ++ + # check whether to build with debugging enabled + AC_MSG_CHECKING([whether to do a debug build]) + AC_ARG_ENABLE(debug, +@@ -1423,6 +1431,7 @@ + AM_CONDITIONAL([USE_FARSTREAM], [test "$have_farstream" = "yes"]) + + # WebKit feature conditionals ++AM_CONDITIONAL([ENABLE_TESTS],[test "$enable_tests" = "yes"]) + AM_CONDITIONAL([ENABLE_DEBUG],[test "$enable_debug_features" = "yes"]) + AM_CONDITIONAL([ENABLE_UNSTABLE_FEATURES],[test "$enable_unstable_features" = "yes"]) + AM_CONDITIONAL([ENABLE_WEBGL],[test "$enable_webgl" = "yes"]) +@@ -1534,6 +1543,7 @@ + WebKit was configured with the following options: + + Build configuration: ++ Enable tests (slow) : $enable_tests + Enable debugging (slow) : $enable_debug + Compile with debug symbols (slow) : $enable_debug_symbols + Enable debug features (slow) : $enable_debug_features diff --git a/package/webkit/0006-execinfo_h.patch b/package/webkit/0006-execinfo_h.patch new file mode 100644 index 0000000000..f5508a1cb1 --- /dev/null +++ b/package/webkit/0006-execinfo_h.patch @@ -0,0 +1,20 @@ +Fixes uclibc build as uclibc does not include backtrace functionality + +Signed-of-by: Spenser Gilliland +Signed-of-by: Markos Chandras + +Index: webkit-1.11.5/Source/WTF/wtf/Assertions.cpp +=================================================================== +--- webkit-1.11.5.orig/Source/WTF/wtf/Assertions.cpp ++++ webkit-1.11.5/Source/WTF/wtf/Assertions.cpp +@@ -61,8 +61,10 @@ + #if (OS(DARWIN) || (OS(LINUX) && !defined(__UCLIBC__))) && !OS(ANDROID) + #include + #include ++#if !defined(__UCLIBC__) + #include + #endif ++#endif + + #if OS(ANDROID) + #include "android/log.h" diff --git a/package/webkit/0007-mips-dfg.patch b/package/webkit/0007-mips-dfg.patch new file mode 100644 index 0000000000..39259514b9 --- /dev/null +++ b/package/webkit/0007-mips-dfg.patch @@ -0,0 +1,1490 @@ +Upstream patch for DFG implementation for MIPS + +Signed-off-by: Markos Chandras + +From c921d19863ccf66bdd0ffa5d38eaf05efab6b136 Mon Sep 17 00:00:00 2001 +From: "commit-queue@webkit.org" + +Date: Mon, 18 Feb 2013 19:25:23 +0000 +Subject: [PATCH] MIPS DFG implementation. + https://bugs.webkit.org/show_bug.cgi?id=101328 + +Patch by Balazs Kilvady on 2013-02-18 +Reviewed by Oliver Hunt. + +DFG implementation for MIPS. + +Source/JavaScriptCore: + +* assembler/MIPSAssembler.h: +(JSC::MIPSAssembler::MIPSAssembler): +(JSC::MIPSAssembler::sllv): +(JSC::MIPSAssembler::movd): +(MIPSAssembler): +(JSC::MIPSAssembler::negd): +(JSC::MIPSAssembler::labelForWatchpoint): +(JSC::MIPSAssembler::label): +(JSC::MIPSAssembler::vmov): +(JSC::MIPSAssembler::linkDirectJump): +(JSC::MIPSAssembler::maxJumpReplacementSize): +(JSC::MIPSAssembler::revertJumpToMove): +(JSC::MIPSAssembler::replaceWithJump): +* assembler/MacroAssembler.h: +(MacroAssembler): +(JSC::MacroAssembler::poke): +* assembler/MacroAssemblerMIPS.h: +(JSC::MacroAssemblerMIPS::add32): +(MacroAssemblerMIPS): +(JSC::MacroAssemblerMIPS::and32): +(JSC::MacroAssemblerMIPS::lshift32): +(JSC::MacroAssemblerMIPS::mul32): +(JSC::MacroAssemblerMIPS::or32): +(JSC::MacroAssemblerMIPS::rshift32): +(JSC::MacroAssemblerMIPS::urshift32): +(JSC::MacroAssemblerMIPS::sub32): +(JSC::MacroAssemblerMIPS::xor32): +(JSC::MacroAssemblerMIPS::store32): +(JSC::MacroAssemblerMIPS::jump): +(JSC::MacroAssemblerMIPS::branchAdd32): +(JSC::MacroAssemblerMIPS::branchMul32): +(JSC::MacroAssemblerMIPS::branchSub32): +(JSC::MacroAssemblerMIPS::branchNeg32): +(JSC::MacroAssemblerMIPS::call): +(JSC::MacroAssemblerMIPS::loadDouble): +(JSC::MacroAssemblerMIPS::moveDouble): +(JSC::MacroAssemblerMIPS::swapDouble): +(JSC::MacroAssemblerMIPS::subDouble): +(JSC::MacroAssemblerMIPS::mulDouble): +(JSC::MacroAssemblerMIPS::divDouble): +(JSC::MacroAssemblerMIPS::negateDouble): +(JSC::MacroAssemblerMIPS::branchEqual): +(JSC::MacroAssemblerMIPS::branchNotEqual): +(JSC::MacroAssemblerMIPS::branchTruncateDoubleToInt32): +(JSC::MacroAssemblerMIPS::branchTruncateDoubleToUint32): +(JSC::MacroAssemblerMIPS::truncateDoubleToInt32): +(JSC::MacroAssemblerMIPS::truncateDoubleToUint32): +(JSC::MacroAssemblerMIPS::branchDoubleNonZero): +(JSC::MacroAssemblerMIPS::branchDoubleZeroOrNaN): +(JSC::MacroAssemblerMIPS::invert): +(JSC::MacroAssemblerMIPS::replaceWithJump): +(JSC::MacroAssemblerMIPS::maxJumpReplacementSize): +* dfg/DFGAssemblyHelpers.h: +(AssemblyHelpers): +(JSC::DFG::AssemblyHelpers::preserveReturnAddressAfterCall): +(JSC::DFG::AssemblyHelpers::restoreReturnAddressBeforeReturn): +(JSC::DFG::AssemblyHelpers::debugCall): +* dfg/DFGCCallHelpers.h: +(CCallHelpers): +(JSC::DFG::CCallHelpers::setupArguments): +(JSC::DFG::CCallHelpers::setupArgumentsWithExecState): +* dfg/DFGFPRInfo.h: +(DFG): +(FPRInfo): +(JSC::DFG::FPRInfo::toRegister): +(JSC::DFG::FPRInfo::toIndex): +(JSC::DFG::FPRInfo::debugName): +* dfg/DFGGPRInfo.h: +(DFG): +(GPRInfo): +(JSC::DFG::GPRInfo::toRegister): +(JSC::DFG::GPRInfo::toIndex): +(JSC::DFG::GPRInfo::debugName): +* dfg/DFGSpeculativeJIT.h: +(SpeculativeJIT): +* jit/JSInterfaceJIT.h: +(JSInterfaceJIT): +* runtime/JSGlobalData.h: +(JSC::ScratchBuffer::allocationSize): +(ScratchBuffer): + +Source/WTF: + +* wtf/Platform.h: + +git-svn-id: http://svn.webkit.org/repository/webkit/trunk@143247 268f45cc-cd09-0410-ab3c-d52691b4dbfc +--- + Source/JavaScriptCore/ChangeLog | 90 ++++ + Source/JavaScriptCore/assembler/MIPSAssembler.h | 109 ++++- + Source/JavaScriptCore/assembler/MacroAssembler.h | 7 + + .../JavaScriptCore/assembler/MacroAssemblerMIPS.h | 480 +++++++++++++++++++-- + Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h | 19 +- + Source/JavaScriptCore/dfg/DFGCCallHelpers.h | 92 ++-- + Source/JavaScriptCore/dfg/DFGFPRInfo.h | 68 +++ + Source/JavaScriptCore/dfg/DFGGPRInfo.h | 67 +++ + Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h | 4 +- + Source/JavaScriptCore/jit/JSInterfaceJIT.h | 4 + + Source/JavaScriptCore/runtime/JSGlobalData.h | 6 +- + Source/WTF/ChangeLog | 11 + + Source/WTF/wtf/Platform.h | 4 + + 13 files changed, 888 insertions(+), 73 deletions(-) + +diff --git a/Source/JavaScriptCore/assembler/MIPSAssembler.h b/Source/JavaScriptCore/assembler/MIPSAssembler.h +index 026f87e..7f553bb 100644 +--- a/Source/JavaScriptCore/assembler/MIPSAssembler.h ++++ b/Source/JavaScriptCore/assembler/MIPSAssembler.h +@@ -152,6 +152,8 @@ public: + typedef SegmentedVector Jumps; + + MIPSAssembler() ++ : m_indexOfLastWatchpoint(INT_MIN) ++ , m_indexOfTailOfLastWatchpoint(INT_MIN) + { + } + +@@ -325,7 +327,7 @@ public: + emitInst(0x00000000 | (rd << OP_SH_RD) | (rt << OP_SH_RT) | ((shamt & 0x1f) << OP_SH_SHAMT)); + } + +- void sllv(RegisterID rd, RegisterID rt, int rs) ++ void sllv(RegisterID rd, RegisterID rt, RegisterID rs) + { + emitInst(0x00000004 | (rd << OP_SH_RD) | (rt << OP_SH_RT) | (rs << OP_SH_RS)); + } +@@ -527,6 +529,16 @@ public: + emitInst(0x46200004 | (fd << OP_SH_FD) | (fs << OP_SH_FS)); + } + ++ void movd(FPRegisterID fd, FPRegisterID fs) ++ { ++ emitInst(0x46200006 | (fd << OP_SH_FD) | (fs << OP_SH_FS)); ++ } ++ ++ void negd(FPRegisterID fd, FPRegisterID fs) ++ { ++ emitInst(0x46200007 | (fd << OP_SH_FD) | (fs << OP_SH_FS)); ++ } ++ + void truncwd(FPRegisterID fd, FPRegisterID fs) + { + emitInst(0x4620000d | (fd << OP_SH_FD) | (fs << OP_SH_FS)); +@@ -619,9 +631,24 @@ public: + return m_buffer.label(); + } + ++ AssemblerLabel labelForWatchpoint() ++ { ++ AssemblerLabel result = m_buffer.label(); ++ if (static_cast(result.m_offset) != m_indexOfLastWatchpoint) ++ result = label(); ++ m_indexOfLastWatchpoint = result.m_offset; ++ m_indexOfTailOfLastWatchpoint = result.m_offset + maxJumpReplacementSize(); ++ return result; ++ } ++ + AssemblerLabel label() + { +- return m_buffer.label(); ++ AssemblerLabel result = m_buffer.label(); ++ while (UNLIKELY(static_cast(result.m_offset) < m_indexOfTailOfLastWatchpoint)) { ++ nop(); ++ result = m_buffer.label(); ++ } ++ return result; + } + + AssemblerLabel align(int alignment) +@@ -664,14 +691,24 @@ public: + // Assembly helpers for moving data between fp and registers. + void vmov(RegisterID rd1, RegisterID rd2, FPRegisterID rn) + { ++#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64 ++ mfc1(rd1, rn); ++ mfhc1(rd2, rn); ++#else + mfc1(rd1, rn); + mfc1(rd2, FPRegisterID(rn + 1)); ++#endif + } + + void vmov(FPRegisterID rd, RegisterID rn1, RegisterID rn2) + { ++#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64 ++ mtc1(rn1, rd); ++ mthc1(rn2, rd); ++#else + mtc1(rn1, rd); + mtc1(rn2, FPRegisterID(rd + 1)); ++#endif + } + + static unsigned getCallReturnOffset(AssemblerLabel call) +@@ -688,6 +725,35 @@ public: + // writable region of memory; to modify the code in an execute-only execuable + // pool the 'repatch' and 'relink' methods should be used. + ++ static size_t linkDirectJump(void* code, void* to) ++ { ++ MIPSWord* insn = reinterpret_cast(reinterpret_cast(code)); ++ size_t ops = 0; ++ int32_t slotAddr = reinterpret_cast(insn) + 4; ++ int32_t toAddr = reinterpret_cast(to); ++ ++ if ((slotAddr & 0xf0000000) != (toAddr & 0xf0000000)) { ++ // lui ++ *insn = 0x3c000000 | (MIPSRegisters::t9 << OP_SH_RT) | ((toAddr >> 16) & 0xffff); ++ ++insn; ++ // ori ++ *insn = 0x34000000 | (MIPSRegisters::t9 << OP_SH_RT) | (MIPSRegisters::t9 << OP_SH_RS) | (toAddr & 0xffff); ++ ++insn; ++ // jr ++ *insn = 0x00000008 | (MIPSRegisters::t9 << OP_SH_RS); ++ ++insn; ++ ops = 4 * sizeof(MIPSWord); ++ } else { ++ // j ++ *insn = 0x08000000 | ((toAddr & 0x0fffffff) >> 2); ++ ++insn; ++ ops = 2 * sizeof(MIPSWord); ++ } ++ // nop ++ *insn = 0x00000000; ++ return ops; ++ } ++ + void linkJump(AssemblerLabel from, AssemblerLabel to) + { + ASSERT(to.isSet()); +@@ -825,29 +891,36 @@ public: + #endif + } + +- static void revertJumpToMove(void* instructionStart, RegisterID rt, int imm) ++ static ptrdiff_t maxJumpReplacementSize() + { +- MIPSWord* insn = static_cast(instructionStart) + 1; +- ASSERT((*insn & 0xfc000000) == 0x34000000); +- *insn = (*insn & 0xfc1f0000) | (imm & 0xffff); +- cacheFlush(insn, sizeof(MIPSWord)); ++ return sizeof(MIPSWord) * 4; + } + +- static void replaceWithJump(void* instructionStart, void* to) ++ static void revertJumpToMove(void* instructionStart, RegisterID rt, int imm) + { +- MIPSWord* instruction = reinterpret_cast(instructionStart); +- intptr_t jumpTo = reinterpret_cast(to); ++ MIPSWord* insn = static_cast(instructionStart); ++ size_t codeSize = 2 * sizeof(MIPSWord); + + // lui +- instruction[0] = 0x3c000000 | (MIPSRegisters::t9 << OP_SH_RT) | ((jumpTo >> 16) & 0xffff); ++ *insn = 0x3c000000 | (rt << OP_SH_RT) | ((imm >> 16) & 0xffff); ++ ++insn; + // ori +- instruction[1] = 0x34000000 | (MIPSRegisters::t9 << OP_SH_RT) | (MIPSRegisters::t9 << OP_SH_RS) | (jumpTo & 0xffff); +- // jr +- instruction[2] = 0x00000008 | (MIPSRegisters::t9 << OP_SH_RS); +- // nop +- instruction[3] = 0x0; ++ *insn = 0x34000000 | (rt << OP_SH_RS) | (rt << OP_SH_RT) | (imm & 0xffff); ++ ++insn; ++ // if jr $t9 ++ if (*insn == 0x03200008) { ++ *insn = 0x00000000; ++ codeSize += sizeof(MIPSWord); ++ } ++ cacheFlush(insn, codeSize); ++ } + +- cacheFlush(instruction, sizeof(MIPSWord) * 4); ++ static void replaceWithJump(void* instructionStart, void* to) ++ { ++ ASSERT(!(bitwise_cast(instructionStart) & 3)); ++ ASSERT(!(bitwise_cast(to) & 3)); ++ size_t ops = linkDirectJump(instructionStart, to); ++ cacheFlush(instructionStart, ops); + } + + static void replaceWithLoad(void* instructionStart) +@@ -1023,6 +1096,8 @@ private: + + AssemblerBuffer m_buffer; + Jumps m_jumps; ++ int m_indexOfLastWatchpoint; ++ int m_indexOfTailOfLastWatchpoint; + }; + + } // namespace JSC +diff --git a/Source/JavaScriptCore/assembler/MacroAssembler.h b/Source/JavaScriptCore/assembler/MacroAssembler.h +index 60a93db..1f0c3de 100644 +--- a/Source/JavaScriptCore/assembler/MacroAssembler.h ++++ b/Source/JavaScriptCore/assembler/MacroAssembler.h +@@ -200,6 +200,13 @@ public: + } + #endif + ++#if CPU(MIPS) ++ void poke(FPRegisterID src, int index = 0) ++ { ++ ASSERT(!(index & 1)); ++ storeDouble(src, addressForPoke(index)); ++ } ++#endif + + // Backwards banches, these are currently all implemented using existing forwards branch mechanisms. + void branchPtr(RelationalCondition cond, RegisterID op1, TrustedImmPtr imm, Label target) +diff --git a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h +index 43ad434..4f14960 100644 +--- a/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h ++++ b/Source/JavaScriptCore/assembler/MacroAssemblerMIPS.h +@@ -114,6 +114,11 @@ public: + m_assembler.addu(dest, dest, src); + } + ++ void add32(RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ m_assembler.addu(dest, op1, op2); ++ } ++ + void add32(TrustedImm32 imm, RegisterID dest) + { + add32(imm, dest, dest); +@@ -267,6 +272,11 @@ public: + m_assembler.andInsn(dest, dest, src); + } + ++ void and32(RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ m_assembler.andInsn(dest, op1, op2); ++ } ++ + void and32(TrustedImm32 imm, RegisterID dest) + { + if (!imm.m_value && !m_fixedWidth) +@@ -283,9 +293,16 @@ public: + } + } + +- void lshift32(TrustedImm32 imm, RegisterID dest) ++ void and32(TrustedImm32 imm, RegisterID src, RegisterID dest) + { +- m_assembler.sll(dest, dest, imm.m_value); ++ if (!imm.m_value && !m_fixedWidth) ++ move(MIPSRegisters::zero, dest); ++ else if (imm.m_value > 0 && imm.m_value < 65535 && !m_fixedWidth) ++ m_assembler.andi(dest, src, imm.m_value); ++ else { ++ move(imm, immTempRegister); ++ m_assembler.andInsn(dest, src, immTempRegister); ++ } + } + + void lshift32(RegisterID shiftAmount, RegisterID dest) +@@ -293,11 +310,33 @@ public: + m_assembler.sllv(dest, dest, shiftAmount); + } + ++ void lshift32(RegisterID src, RegisterID shiftAmount, RegisterID dest) ++ { ++ m_assembler.sllv(dest, src, shiftAmount); ++ } ++ ++ void lshift32(TrustedImm32 imm, RegisterID dest) ++ { ++ move(imm, immTempRegister); ++ m_assembler.sllv(dest, dest, immTempRegister); ++ } ++ ++ void lshift32(RegisterID src, TrustedImm32 imm, RegisterID dest) ++ { ++ move(imm, immTempRegister); ++ m_assembler.sllv(dest, src, immTempRegister); ++ } ++ + void mul32(RegisterID src, RegisterID dest) + { + m_assembler.mul(dest, dest, src); + } + ++ void mul32(RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ m_assembler.mul(dest, op1, op2); ++ } ++ + void mul32(TrustedImm32 imm, RegisterID src, RegisterID dest) + { + if (!imm.m_value && !m_fixedWidth) +@@ -348,6 +387,24 @@ public: + m_assembler.orInsn(dest, dest, dataTempRegister); + } + ++ void or32(TrustedImm32 imm, RegisterID src, RegisterID dest) ++ { ++ if (!imm.m_value && !m_fixedWidth) ++ return; ++ ++ if (imm.m_value > 0 && imm.m_value < 65535 && !m_fixedWidth) { ++ m_assembler.ori(dest, src, imm.m_value); ++ return; ++ } ++ ++ /* ++ li dataTemp, imm ++ or dest, src, dataTemp ++ */ ++ move(imm, dataTempRegister); ++ m_assembler.orInsn(dest, src, dataTempRegister); ++ } ++ + void or32(RegisterID src, AbsoluteAddress dest) + { + load32(dest.m_ptr, dataTempRegister); +@@ -360,6 +417,11 @@ public: + m_assembler.srav(dest, dest, shiftAmount); + } + ++ void rshift32(RegisterID src, RegisterID shiftAmount, RegisterID dest) ++ { ++ m_assembler.srav(dest, src, shiftAmount); ++ } ++ + void rshift32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.sra(dest, dest, imm.m_value); +@@ -375,16 +437,31 @@ public: + m_assembler.srlv(dest, dest, shiftAmount); + } + ++ void urshift32(RegisterID src, RegisterID shiftAmount, RegisterID dest) ++ { ++ m_assembler.srlv(dest, src, shiftAmount); ++ } ++ + void urshift32(TrustedImm32 imm, RegisterID dest) + { + m_assembler.srl(dest, dest, imm.m_value); + } + ++ void urshift32(RegisterID src, TrustedImm32 imm, RegisterID dest) ++ { ++ m_assembler.srl(dest, src, imm.m_value); ++ } ++ + void sub32(RegisterID src, RegisterID dest) + { + m_assembler.subu(dest, dest, src); + } + ++ void sub32(RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ m_assembler.subu(dest, op1, op2); ++ } ++ + void sub32(TrustedImm32 imm, RegisterID dest) + { + if (imm.m_value >= -32767 && imm.m_value <= 32768 +@@ -495,6 +572,11 @@ public: + m_assembler.xorInsn(dest, dest, src); + } + ++ void xor32(RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ m_assembler.xorInsn(dest, op1, op2); ++ } ++ + void xor32(TrustedImm32 imm, RegisterID dest) + { + if (imm.m_value == -1) { +@@ -510,6 +592,21 @@ public: + m_assembler.xorInsn(dest, dest, immTempRegister); + } + ++ void xor32(TrustedImm32 imm, RegisterID src, RegisterID dest) ++ { ++ if (imm.m_value == -1) { ++ m_assembler.nor(dest, src, MIPSRegisters::zero); ++ return; ++ } ++ ++ /* ++ li immTemp, imm ++ xor dest, dest, immTemp ++ */ ++ move(imm, immTempRegister); ++ m_assembler.xorInsn(dest, src, immTempRegister); ++ } ++ + void sqrtDouble(FPRegisterID src, FPRegisterID dst) + { + m_assembler.sqrtd(dst, src); +@@ -989,6 +1086,44 @@ public: + } + } + ++ void store32(TrustedImm32 imm, BaseIndex address) ++ { ++ if (address.offset >= -32768 && address.offset <= 32767 && !m_fixedWidth) { ++ /* ++ sll addrTemp, address.index, address.scale ++ addu addrTemp, addrTemp, address.base ++ sw src, address.offset(addrTemp) ++ */ ++ m_assembler.sll(addrTempRegister, address.index, address.scale); ++ m_assembler.addu(addrTempRegister, addrTempRegister, address.base); ++ if (!imm.m_value) ++ m_assembler.sw(MIPSRegisters::zero, addrTempRegister, address.offset); ++ else { ++ move(imm, immTempRegister); ++ m_assembler.sw(immTempRegister, addrTempRegister, address.offset); ++ } ++ } else { ++ /* ++ sll addrTemp, address.index, address.scale ++ addu addrTemp, addrTemp, address.base ++ lui immTemp, (address.offset + 0x8000) >> 16 ++ addu addrTemp, addrTemp, immTemp ++ sw src, (address.offset & 0xffff)(at) ++ */ ++ m_assembler.sll(addrTempRegister, address.index, address.scale); ++ m_assembler.addu(addrTempRegister, addrTempRegister, address.base); ++ m_assembler.lui(immTempRegister, (address.offset + 0x8000) >> 16); ++ m_assembler.addu(addrTempRegister, addrTempRegister, immTempRegister); ++ if (!imm.m_value && !m_fixedWidth) ++ m_assembler.sw(MIPSRegisters::zero, addrTempRegister, address.offset); ++ else { ++ move(imm, immTempRegister); ++ m_assembler.sw(immTempRegister, addrTempRegister, address.offset); ++ } ++ } ++ } ++ ++ + void store32(RegisterID src, const void* address) + { + /* +@@ -1336,6 +1471,15 @@ public: + m_fixedWidth = false; + } + ++ void jump(AbsoluteAddress address) ++ { ++ m_fixedWidth = true; ++ load32(address.m_ptr, MIPSRegisters::t9); ++ m_assembler.jr(MIPSRegisters::t9); ++ m_assembler.nop(); ++ m_fixedWidth = false; ++ } ++ + void moveDoubleToInts(FPRegisterID src, RegisterID dest1, RegisterID dest2) + { + m_assembler.vmov(dest1, dest2, src); +@@ -1404,6 +1548,53 @@ public: + return Jump(); + } + ++ Jump branchAdd32(ResultCondition cond, RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); ++ if (cond == Overflow) { ++ /* ++ move dataTemp, op1 ++ xor cmpTemp, dataTemp, op2 ++ bltz cmpTemp, No_overflow # diff sign bit -> no overflow ++ addu dest, dataTemp, op2 ++ xor cmpTemp, dest, dataTemp ++ bgez cmpTemp, No_overflow # same sign big -> no overflow ++ nop ++ b Overflow ++ nop ++ nop ++ nop ++ nop ++ nop ++ No_overflow: ++ */ ++ move(op1, dataTempRegister); ++ m_assembler.xorInsn(cmpTempRegister, dataTempRegister, op2); ++ m_assembler.bltz(cmpTempRegister, 10); ++ m_assembler.addu(dest, dataTempRegister, op2); ++ m_assembler.xorInsn(cmpTempRegister, dest, dataTempRegister); ++ m_assembler.bgez(cmpTempRegister, 7); ++ m_assembler.nop(); ++ return jump(); ++ } ++ if (cond == Signed) { ++ add32(op1, op2, dest); ++ // Check if dest is negative. ++ m_assembler.slt(cmpTempRegister, dest, MIPSRegisters::zero); ++ return branchNotEqual(cmpTempRegister, MIPSRegisters::zero); ++ } ++ if (cond == Zero) { ++ add32(op1, op2, dest); ++ return branchEqual(dest, MIPSRegisters::zero); ++ } ++ if (cond == NonZero) { ++ add32(op1, op2, dest); ++ return branchNotEqual(dest, MIPSRegisters::zero); ++ } ++ ASSERT(0); ++ return Jump(); ++ } ++ + Jump branchAdd32(ResultCondition cond, TrustedImm32 imm, RegisterID dest) + { + move(imm, immTempRegister); +@@ -1417,6 +1608,111 @@ public: + return branchAdd32(cond, immTempRegister, dest); + } + ++ Jump branchAdd32(ResultCondition cond, TrustedImm32 imm, AbsoluteAddress dest) ++ { ++ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); ++ if (cond == Overflow) { ++ /* ++ move dataTemp, dest ++ xori cmpTemp, dataTemp, imm ++ bltz cmpTemp, No_overflow # diff sign bit -> no overflow ++ addiu dataTemp, dataTemp, imm ++ move dest, dataTemp ++ xori cmpTemp, dataTemp, imm ++ bgez cmpTemp, No_overflow # same sign big -> no overflow ++ nop ++ b Overflow ++ nop ++ nop ++ nop ++ nop ++ nop ++ No_overflow: ++ */ ++ if (imm.m_value >= -32768 && imm.m_value <= 32767 && !m_fixedWidth) { ++ load32(dest.m_ptr, dataTempRegister); ++ m_assembler.xori(cmpTempRegister, dataTempRegister, imm.m_value); ++ m_assembler.bltz(cmpTempRegister, 10); ++ m_assembler.addiu(dataTempRegister, dataTempRegister, imm.m_value); ++ store32(dataTempRegister, dest.m_ptr); ++ m_assembler.xori(cmpTempRegister, dataTempRegister, imm.m_value); ++ m_assembler.bgez(cmpTempRegister, 7); ++ m_assembler.nop(); ++ } else { ++ load32(dest.m_ptr, dataTempRegister); ++ move(imm, immTempRegister); ++ m_assembler.xorInsn(cmpTempRegister, dataTempRegister, immTempRegister); ++ m_assembler.bltz(cmpTempRegister, 10); ++ m_assembler.addiu(dataTempRegister, dataTempRegister, immTempRegister); ++ store32(dataTempRegister, dest.m_ptr); ++ m_assembler.xori(cmpTempRegister, dataTempRegister, immTempRegister); ++ m_assembler.bgez(cmpTempRegister, 7); ++ m_assembler.nop(); ++ } ++ return jump(); ++ } ++ move(imm, immTempRegister); ++ load32(dest.m_ptr, dataTempRegister); ++ add32(immTempRegister, dataTempRegister); ++ store32(dataTempRegister, dest.m_ptr); ++ if (cond == Signed) { ++ // Check if dest is negative. ++ m_assembler.slt(cmpTempRegister, dataTempRegister, MIPSRegisters::zero); ++ return branchNotEqual(cmpTempRegister, MIPSRegisters::zero); ++ } ++ if (cond == Zero) ++ return branchEqual(dataTempRegister, MIPSRegisters::zero); ++ if (cond == NonZero) ++ return branchNotEqual(dataTempRegister, MIPSRegisters::zero); ++ ASSERT(0); ++ return Jump(); ++ } ++ ++ Jump branchMul32(ResultCondition cond, RegisterID src1, RegisterID src2, RegisterID dest) ++ { ++ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); ++ if (cond == Overflow) { ++ /* ++ mult src, dest ++ mfhi dataTemp ++ mflo dest ++ sra addrTemp, dest, 31 ++ beq dataTemp, addrTemp, No_overflow # all sign bits (bit 63 to bit 31) are the same -> no overflow ++ nop ++ b Overflow ++ nop ++ nop ++ nop ++ nop ++ nop ++ No_overflow: ++ */ ++ m_assembler.mult(src1, src2); ++ m_assembler.mfhi(dataTempRegister); ++ m_assembler.mflo(dest); ++ m_assembler.sra(addrTempRegister, dest, 31); ++ m_assembler.beq(dataTempRegister, addrTempRegister, 7); ++ m_assembler.nop(); ++ return jump(); ++ } ++ if (cond == Signed) { ++ mul32(src1, src2, dest); ++ // Check if dest is negative. ++ m_assembler.slt(cmpTempRegister, dest, MIPSRegisters::zero); ++ return branchNotEqual(cmpTempRegister, MIPSRegisters::zero); ++ } ++ if (cond == Zero) { ++ mul32(src1, src2, dest); ++ return branchEqual(dest, MIPSRegisters::zero); ++ } ++ if (cond == NonZero) { ++ mul32(src1, src2, dest); ++ return branchNotEqual(dest, MIPSRegisters::zero); ++ } ++ ASSERT(0); ++ return Jump(); ++ } ++ + Jump branchMul32(ResultCondition cond, RegisterID src, RegisterID dest) + { + ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); +@@ -1465,8 +1761,7 @@ public: + Jump branchMul32(ResultCondition cond, TrustedImm32 imm, RegisterID src, RegisterID dest) + { + move(imm, immTempRegister); +- move(src, dest); +- return branchMul32(cond, immTempRegister, dest); ++ return branchMul32(cond, immTempRegister, src, dest); + } + + Jump branchSub32(ResultCondition cond, RegisterID src, RegisterID dest) +@@ -1525,8 +1820,60 @@ public: + Jump branchSub32(ResultCondition cond, RegisterID src, TrustedImm32 imm, RegisterID dest) + { + move(imm, immTempRegister); +- move(src, dest); +- return branchSub32(cond, immTempRegister, dest); ++ return branchSub32(cond, src, immTempRegister, dest); ++ } ++ ++ Jump branchSub32(ResultCondition cond, RegisterID op1, RegisterID op2, RegisterID dest) ++ { ++ ASSERT((cond == Overflow) || (cond == Signed) || (cond == Zero) || (cond == NonZero)); ++ if (cond == Overflow) { ++ /* ++ move dataTemp, op1 ++ xor cmpTemp, dataTemp, op2 ++ bgez cmpTemp, No_overflow # same sign bit -> no overflow ++ subu dest, dataTemp, op2 ++ xor cmpTemp, dest, dataTemp ++ bgez cmpTemp, No_overflow # same sign bit -> no overflow ++ nop ++ b Overflow ++ nop ++ nop ++ nop ++ nop ++ nop ++ No_overflow: ++ */ ++ move(op1, dataTempRegister); ++ m_assembler.xorInsn(cmpTempRegister, dataTempRegister, op2); ++ m_assembler.bgez(cmpTempRegister, 10); ++ m_assembler.subu(dest, dataTempRegister, op2); ++ m_assembler.xorInsn(cmpTempRegister, dest, dataTempRegister); ++ m_assembler.bgez(cmpTempRegister, 7); ++ m_assembler.nop(); ++ return jump(); ++ } ++ if (cond == Signed) { ++ sub32(op1, op2, dest); ++ // Check if dest is negative. ++ m_assembler.slt(cmpTempRegister, dest, MIPSRegisters::zero); ++ return branchNotEqual(cmpTempRegister, MIPSRegisters::zero); ++ } ++ if (cond == Zero) { ++ sub32(op1, op2, dest); ++ return branchEqual(dest, MIPSRegisters::zero); ++ } ++ if (cond == NonZero) { ++ sub32(op1, op2, dest); ++ return branchNotEqual(dest, MIPSRegisters::zero); ++ } ++ ASSERT(0); ++ return Jump(); ++ } ++ ++ Jump branchNeg32(ResultCondition cond, RegisterID srcDest) ++ { ++ m_assembler.li(dataTempRegister, -1); ++ return branchMul32(cond, dataTempRegister, srcDest); + } + + Jump branchOr32(ResultCondition cond, RegisterID src, RegisterID dest) +@@ -1578,7 +1925,8 @@ public: + + Call call(RegisterID target) + { +- m_assembler.jalr(target); ++ move(target, MIPSRegisters::t9); ++ m_assembler.jalr(MIPSRegisters::t9); + m_assembler.nop(); + return Call(m_assembler.label(), Call::None); + } +@@ -1822,7 +2170,7 @@ public: + lui immTemp, (address.offset + 0x8000) >> 16 + addu addrTemp, addrTemp, immTemp + lwc1 dest, (address.offset & 0xffff)(at) +- lwc1 dest+4, (address.offset & 0xffff + 4)(at) ++ lwc1 dest+1, (address.offset & 0xffff + 4)(at) + */ + m_assembler.sll(addrTempRegister, address.index, address.scale); + m_assembler.addu(addrTempRegister, addrTempRegister, address.base); +@@ -2009,6 +2357,19 @@ public: + #endif + } + ++ void moveDouble(FPRegisterID src, FPRegisterID dest) ++ { ++ if (src != dest || m_fixedWidth) ++ m_assembler.movd(dest, src); ++ } ++ ++ void swapDouble(FPRegisterID fr1, FPRegisterID fr2) ++ { ++ moveDouble(fr1, fpTempRegister); ++ moveDouble(fr2, fr1); ++ moveDouble(fpTempRegister, fr2); ++ } ++ + void addDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.addd(dest, dest, src); +@@ -2036,6 +2397,11 @@ public: + m_assembler.subd(dest, dest, src); + } + ++ void subDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) ++ { ++ m_assembler.subd(dest, op1, op2); ++ } ++ + void subDouble(Address src, FPRegisterID dest) + { + loadDouble(src, fpTempRegister); +@@ -2053,11 +2419,32 @@ public: + m_assembler.muld(dest, dest, fpTempRegister); + } + ++ void mulDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) ++ { ++ m_assembler.muld(dest, op1, op2); ++ } ++ + void divDouble(FPRegisterID src, FPRegisterID dest) + { + m_assembler.divd(dest, dest, src); + } + ++ void divDouble(FPRegisterID op1, FPRegisterID op2, FPRegisterID dest) ++ { ++ m_assembler.divd(dest, op1, op2); ++ } ++ ++ void divDouble(Address src, FPRegisterID dest) ++ { ++ loadDouble(src, fpTempRegister); ++ m_assembler.divd(dest, dest, fpTempRegister); ++ } ++ ++ void negateDouble(FPRegisterID src, FPRegisterID dest) ++ { ++ m_assembler.negd(dest, src); ++ } ++ + void convertInt32ToDouble(RegisterID src, FPRegisterID dest) + { + m_assembler.mtc1(src, fpTempRegister); +@@ -2117,6 +2504,8 @@ public: + + Jump branchEqual(RegisterID rs, RegisterID rt) + { ++ m_assembler.nop(); ++ m_assembler.nop(); + m_assembler.appendJump(); + m_assembler.beq(rs, rt, 0); + m_assembler.nop(); +@@ -2126,6 +2515,8 @@ public: + + Jump branchNotEqual(RegisterID rs, RegisterID rt) + { ++ m_assembler.nop(); ++ m_assembler.nop(); + m_assembler.appendJump(); + m_assembler.bne(rs, rt, 0); + m_assembler.nop(); +@@ -2192,11 +2583,33 @@ public: + // If the result is not representable as a 32 bit value, branch. + // May also branch for some values that are representable in 32 bits + // (specifically, in this case, INT_MAX 0x7fffffff). +- Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest) ++ enum BranchTruncateType { BranchIfTruncateFailed, BranchIfTruncateSuccessful }; ++ Jump branchTruncateDoubleToInt32(FPRegisterID src, RegisterID dest, BranchTruncateType branchType = BranchIfTruncateFailed) ++ { ++ m_assembler.truncwd(fpTempRegister, src); ++ m_assembler.mfc1(dest, fpTempRegister); ++ return branch32(branchType == BranchIfTruncateFailed ? Equal : NotEqual, dest, TrustedImm32(0x7fffffff)); ++ } ++ ++ Jump branchTruncateDoubleToUint32(FPRegisterID src, RegisterID dest, BranchTruncateType branchType = BranchIfTruncateFailed) ++ { ++ m_assembler.truncwd(fpTempRegister, src); ++ m_assembler.mfc1(dest, fpTempRegister); ++ return branch32(branchType == BranchIfTruncateFailed ? Equal : NotEqual, dest, TrustedImm32(0)); ++ } ++ ++ // Result is undefined if the value is outside of the integer range. ++ void truncateDoubleToInt32(FPRegisterID src, RegisterID dest) ++ { ++ m_assembler.truncwd(fpTempRegister, src); ++ m_assembler.mfc1(dest, fpTempRegister); ++ } ++ ++ // Result is undefined if src > 2^31 ++ void truncateDoubleToUint32(FPRegisterID src, RegisterID dest) + { + m_assembler.truncwd(fpTempRegister, src); + m_assembler.mfc1(dest, fpTempRegister); +- return branch32(Equal, dest, TrustedImm32(0x7fffffff)); + } + + // Convert 'src' to an integer, and places the resulting 'dest'. +@@ -2218,28 +2631,43 @@ public: + + Jump branchDoubleNonZero(FPRegisterID reg, FPRegisterID scratch) + { +-#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64 +- m_assembler.mtc1(MIPSRegisters::zero, scratch); +- m_assembler.mthc1(MIPSRegisters::zero, scratch); +-#else +- m_assembler.mtc1(MIPSRegisters::zero, scratch); +- m_assembler.mtc1(MIPSRegisters::zero, FPRegisterID(scratch + 1)); +-#endif ++ m_assembler.vmov(scratch, MIPSRegisters::zero, MIPSRegisters::zero); + return branchDouble(DoubleNotEqual, reg, scratch); + } + + Jump branchDoubleZeroOrNaN(FPRegisterID reg, FPRegisterID scratch) + { +-#if WTF_MIPS_ISA_REV(2) && WTF_MIPS_FP64 +- m_assembler.mtc1(MIPSRegisters::zero, scratch); +- m_assembler.mthc1(MIPSRegisters::zero, scratch); +-#else +- m_assembler.mtc1(MIPSRegisters::zero, scratch); +- m_assembler.mtc1(MIPSRegisters::zero, FPRegisterID(scratch + 1)); +-#endif ++ m_assembler.vmov(scratch, MIPSRegisters::zero, MIPSRegisters::zero); + return branchDouble(DoubleEqualOrUnordered, reg, scratch); + } + ++ // Invert a relational condition, e.g. == becomes !=, < becomes >=, etc. ++ static RelationalCondition invert(RelationalCondition cond) ++ { ++ RelationalCondition r; ++ if (cond == Equal) ++ r = NotEqual; ++ else if (cond == NotEqual) ++ r = Equal; ++ else if (cond == Above) ++ r = BelowOrEqual; ++ else if (cond == AboveOrEqual) ++ r = Below; ++ else if (cond == Below) ++ r = AboveOrEqual; ++ else if (cond == BelowOrEqual) ++ r = Above; ++ else if (cond == GreaterThan) ++ r = LessThanOrEqual; ++ else if (cond == GreaterThanOrEqual) ++ r = LessThan; ++ else if (cond == LessThan) ++ r = GreaterThanOrEqual; ++ else if (cond == LessThanOrEqual) ++ r = GreaterThan; ++ return r; ++ } ++ + void nop() + { + m_assembler.nop(); +@@ -2252,12 +2680,12 @@ public: + + static void replaceWithJump(CodeLocationLabel instructionStart, CodeLocationLabel destination) + { +- RELEASE_ASSERT_NOT_REACHED(); ++ MIPSAssembler::replaceWithJump(instructionStart.dataLocation(), destination.dataLocation()); + } + + static ptrdiff_t maxJumpReplacementSize() + { +- RELEASE_ASSERT_NOT_REACHED(); ++ MIPSAssembler::maxJumpReplacementSize(); + return 0; + } + +diff --git a/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h b/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h +index fa0f5e0..573d8dc 100644 +--- a/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h ++++ b/Source/JavaScriptCore/dfg/DFGAssemblyHelpers.h +@@ -93,6 +93,23 @@ public: + } + #endif + ++#if CPU(MIPS) ++ ALWAYS_INLINE void preserveReturnAddressAfterCall(RegisterID reg) ++ { ++ move(returnAddressRegister, reg); ++ } ++ ++ ALWAYS_INLINE void restoreReturnAddressBeforeReturn(RegisterID reg) ++ { ++ move(reg, returnAddressRegister); ++ } ++ ++ ALWAYS_INLINE void restoreReturnAddressBeforeReturn(Address address) ++ { ++ loadPtr(address, returnAddressRegister); ++ } ++#endif ++ + void emitGetFromCallFrameHeaderPtr(JSStack::CallFrameHeaderEntry entry, GPRReg to) + { + loadPtr(Address(GPRInfo::callFrameRegister, entry * sizeof(Register)), to); +@@ -193,7 +210,7 @@ public: + move(TrustedImmPtr(scratchBuffer->activeLengthPtr()), GPRInfo::regT0); + storePtr(TrustedImmPtr(scratchSize), GPRInfo::regT0); + +-#if CPU(X86_64) || CPU(ARM) ++#if CPU(X86_64) || CPU(ARM) || CPU(MIPS) + move(TrustedImmPtr(buffer), GPRInfo::argumentGPR2); + move(TrustedImmPtr(argument), GPRInfo::argumentGPR1); + move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); +diff --git a/Source/JavaScriptCore/dfg/DFGCCallHelpers.h b/Source/JavaScriptCore/dfg/DFGCCallHelpers.h +index 8adde05..3d99f6f 100644 +--- a/Source/JavaScriptCore/dfg/DFGCCallHelpers.h ++++ b/Source/JavaScriptCore/dfg/DFGCCallHelpers.h +@@ -576,6 +576,39 @@ public: + poke(GPRInfo::nonArgGPR0); + } + #endif // CPU(ARM_HARDFP) ++#elif CPU(MIPS) ++ ALWAYS_INLINE void setupArguments(FPRReg arg1) ++ { ++ moveDouble(arg1, FPRInfo::argumentFPR0); ++ } ++ ++ ALWAYS_INLINE void setupArguments(FPRReg arg1, FPRReg arg2) ++ { ++ if (arg2 != FPRInfo::argumentFPR0) { ++ moveDouble(arg1, FPRInfo::argumentFPR0); ++ moveDouble(arg2, FPRInfo::argumentFPR1); ++ } else if (arg1 != FPRInfo::argumentFPR1) { ++ moveDouble(arg2, FPRInfo::argumentFPR1); ++ moveDouble(arg1, FPRInfo::argumentFPR0); ++ } else { ++ // Swap arg1, arg2. ++ swapDouble(FPRInfo::argumentFPR0, FPRInfo::argumentFPR1); ++ } ++ } ++ ++ ALWAYS_INLINE void setupArgumentsWithExecState(FPRReg arg1, GPRReg arg2) ++ { ++ assembler().vmov(GPRInfo::argumentGPR2, GPRInfo::argumentGPR3, arg1); ++ move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); ++ poke(arg2, 4); ++ } ++ ++ ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, FPRReg arg3) ++ { ++ setupStubArguments(arg1, arg2); ++ move(GPRInfo::callFrameRegister, GPRInfo::argumentGPR0); ++ poke(arg3, 4); ++ } + #else + #error "DFG JIT not supported on this platform." + #endif +@@ -803,119 +836,126 @@ public: + // These methods are suitable for any calling convention that provides for + // exactly 4 argument registers, e.g. ARMv7. + #if NUMBER_OF_ARGUMENT_REGISTERS == 4 ++ ++#if CPU(MIPS) ++#define POKE_ARGUMENT_OFFSET 4 ++#else ++#define POKE_ARGUMENT_OFFSET 0 ++#endif ++ + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, TrustedImm32 arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, TrustedImmPtr arg2, TrustedImm32 arg3, GPRReg arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, TrustedImmPtr arg2, TrustedImm32 arg3, GPRReg arg4, GPRReg arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32 arg3, TrustedImm32 arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImm32 arg2, GPRReg arg3, GPRReg arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, TrustedImmPtr arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3, TrustedImmPtr arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, TrustedImm32 arg3, TrustedImmPtr arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, TrustedImm32 arg3, GPRReg arg4) + { +- poke(arg4); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32 arg3, GPRReg arg4, GPRReg arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(GPRReg arg1, GPRReg arg2, TrustedImm32 arg3, GPRReg arg4, TrustedImm32 arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, TrustedImmPtr arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3, TrustedImm32 arg4, TrustedImm32 arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, TrustedImm32 arg2, TrustedImm32 arg3, GPRReg arg4, GPRReg arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + + ALWAYS_INLINE void setupArgumentsWithExecState(TrustedImm32 arg1, GPRReg arg2, GPRReg arg3, GPRReg arg4, GPRReg arg5) + { +- poke(arg5, 1); +- poke(arg4); ++ poke(arg5, POKE_ARGUMENT_OFFSET + 1); ++ poke(arg4, POKE_ARGUMENT_OFFSET); + setupArgumentsWithExecState(arg1, arg2, arg3); + } + +diff --git a/Source/JavaScriptCore/dfg/DFGFPRInfo.h b/Source/JavaScriptCore/dfg/DFGFPRInfo.h +index 17aaa7d..e18ec06 100644 +--- a/Source/JavaScriptCore/dfg/DFGFPRInfo.h ++++ b/Source/JavaScriptCore/dfg/DFGFPRInfo.h +@@ -164,6 +164,74 @@ public: + + #endif + ++#if CPU(MIPS) ++ ++class FPRInfo { ++public: ++ typedef FPRReg RegisterType; ++ static const unsigned numberOfRegisters = 6; ++ ++ // Temporary registers. ++ static const FPRReg fpRegT0 = MIPSRegisters::f0; ++ static const FPRReg fpRegT1 = MIPSRegisters::f4; ++ static const FPRReg fpRegT2 = MIPSRegisters::f6; ++ static const FPRReg fpRegT3 = MIPSRegisters::f8; ++ static const FPRReg fpRegT4 = MIPSRegisters::f10; ++ static const FPRReg fpRegT5 = MIPSRegisters::f18; ++ ++ static const FPRReg returnValueFPR = MIPSRegisters::f0; ++ ++ static const FPRReg argumentFPR0 = MIPSRegisters::f12; ++ static const FPRReg argumentFPR1 = MIPSRegisters::f14; ++ ++ static FPRReg toRegister(unsigned index) ++ { ++ static const FPRReg registerForIndex[numberOfRegisters] = { ++ fpRegT0, fpRegT1, fpRegT2, fpRegT3, fpRegT4, fpRegT5 }; ++ ++ ASSERT(index < numberOfRegisters); ++ return registerForIndex[index]; ++ } ++ ++ static unsigned toIndex(FPRReg reg) ++ { ++ ASSERT(reg != InvalidFPRReg); ++ ASSERT(reg < 20); ++ static const unsigned indexForRegister[20] = { ++ 0, InvalidIndex, InvalidIndex, InvalidIndex, ++ 1, InvalidIndex, 2, InvalidIndex, ++ 3, InvalidIndex, 4, InvalidIndex, ++ InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, ++ InvalidIndex, InvalidIndex, 5, InvalidIndex, ++ }; ++ unsigned result = indexForRegister[reg]; ++ ASSERT(result != InvalidIndex); ++ return result; ++ } ++ ++ static const char* debugName(FPRReg reg) ++ { ++ ASSERT(reg != InvalidFPRReg); ++ ASSERT(reg < 32); ++ static const char* nameForRegister[32] = { ++ "f0", "f1", "f2", "f3", ++ "f4", "f5", "f6", "f7", ++ "f8", "f9", "f10", "f11", ++ "f12", "f13", "f14", "f15" ++ "f16", "f17", "f18", "f19" ++ "f20", "f21", "f22", "f23" ++ "f24", "f25", "f26", "f27" ++ "f28", "f29", "f30", "f31" ++ }; ++ return nameForRegister[reg]; ++ } ++private: ++ ++ static const unsigned InvalidIndex = 0xffffffff; ++}; ++ ++#endif ++ + typedef RegisterBank::iterator fpr_iterator; + + } } // namespace JSC::DFG +diff --git a/Source/JavaScriptCore/dfg/DFGGPRInfo.h b/Source/JavaScriptCore/dfg/DFGGPRInfo.h +index 3d07556..aa634cd 100644 +--- a/Source/JavaScriptCore/dfg/DFGGPRInfo.h ++++ b/Source/JavaScriptCore/dfg/DFGGPRInfo.h +@@ -461,6 +461,73 @@ private: + + #endif + ++#if CPU(MIPS) ++#define NUMBER_OF_ARGUMENT_REGISTERS 4 ++ ++class GPRInfo { ++public: ++ typedef GPRReg RegisterType; ++ static const unsigned numberOfRegisters = 6; ++ ++ // Temporary registers. ++ static const GPRReg regT0 = MIPSRegisters::v0; ++ static const GPRReg regT1 = MIPSRegisters::v1; ++ static const GPRReg regT2 = MIPSRegisters::t4; ++ static const GPRReg regT3 = MIPSRegisters::t5; ++ static const GPRReg regT4 = MIPSRegisters::t6; ++ static const GPRReg regT5 = MIPSRegisters::t7; ++ // These registers match the baseline JIT. ++ static const GPRReg cachedResultRegister = regT0; ++ static const GPRReg cachedResultRegister2 = regT1; ++ static const GPRReg callFrameRegister = MIPSRegisters::s0; ++ // These constants provide the names for the general purpose argument & return value registers. ++ static const GPRReg argumentGPR0 = MIPSRegisters::a0; ++ static const GPRReg argumentGPR1 = MIPSRegisters::a1; ++ static const GPRReg argumentGPR2 = MIPSRegisters::a2; ++ static const GPRReg argumentGPR3 = MIPSRegisters::a3; ++ static const GPRReg nonArgGPR0 = regT2; ++ static const GPRReg nonArgGPR1 = regT3; ++ static const GPRReg nonArgGPR2 = regT4; ++ static const GPRReg returnValueGPR = regT0; ++ static const GPRReg returnValueGPR2 = regT1; ++ static const GPRReg nonPreservedNonReturnGPR = regT5; ++ ++ static GPRReg toRegister(unsigned index) ++ { ++ ASSERT(index < numberOfRegisters); ++ static const GPRReg registerForIndex[numberOfRegisters] = { regT0, regT1, regT2, regT3, regT4, regT5 }; ++ return registerForIndex[index]; ++ } ++ ++ static unsigned toIndex(GPRReg reg) ++ { ++ ASSERT(reg != InvalidGPRReg); ++ ASSERT(reg < 16); ++ static const unsigned indexForRegister[16] = { InvalidIndex, InvalidIndex, 0, 1, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, InvalidIndex, 2, 3, 4, 5 }; ++ unsigned result = indexForRegister[reg]; ++ ASSERT(result != InvalidIndex); ++ return result; ++ } ++ ++ static const char* debugName(GPRReg reg) ++ { ++ ASSERT(reg != InvalidGPRReg); ++ ASSERT(reg < 16); ++ static const char* nameForRegister[16] = { ++ "zero", "at", "v0", "v1", ++ "a0", "a1", "a2", "a3", ++ "t0", "t1", "t2", "t3", ++ "t4", "t5", "t6", "t7" ++ }; ++ return nameForRegister[reg]; ++ } ++private: ++ ++ static const unsigned InvalidIndex = 0xffffffff; ++}; ++ ++#endif ++ + typedef RegisterBank::iterator gpr_iterator; + + } } // namespace JSC::DFG +diff --git a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h +index ea33f38..247274b 100644 +--- a/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h ++++ b/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.h +@@ -1241,7 +1241,7 @@ public: + + // EncodedJSValue in JSVALUE32_64 is a 64-bit integer. When being compiled in ARM EABI, it must be aligned even-numbered register (r0, r2 or [sp]). + // To avoid assemblies from using wrong registers, let's occupy r1 or r3 with a dummy argument when necessary. +-#if COMPILER_SUPPORTS(EABI) && CPU(ARM) ++#if (COMPILER_SUPPORTS(EABI) && CPU(ARM)) || CPU(MIPS) + #define EABI_32BIT_DUMMY_ARG TrustedImm32(0), + #else + #define EABI_32BIT_DUMMY_ARG +@@ -1691,7 +1691,7 @@ public: + } + #endif + +-#if !defined(NDEBUG) && !CPU(ARM) ++#if !defined(NDEBUG) && !CPU(ARM) && !CPU(MIPS) + void prepareForExternalCall() + { + // We're about to call out to a "native" helper function. The helper +diff --git a/Source/JavaScriptCore/jit/JSInterfaceJIT.h b/Source/JavaScriptCore/jit/JSInterfaceJIT.h +index 7fdeaf0..48ad6b2 100644 +--- a/Source/JavaScriptCore/jit/JSInterfaceJIT.h ++++ b/Source/JavaScriptCore/jit/JSInterfaceJIT.h +@@ -125,6 +125,10 @@ namespace JSC { + static const RegisterID cachedResultRegister = MIPSRegisters::v0; + static const RegisterID firstArgumentRegister = MIPSRegisters::a0; + ++#if ENABLE(VALUE_PROFILER) ++ static const RegisterID bucketCounterRegister = MIPSRegisters::s3; ++#endif ++ + // regT0 must be v0 for returning a 32-bit value. + static const RegisterID regT0 = MIPSRegisters::v0; + +diff --git a/Source/JavaScriptCore/runtime/JSGlobalData.h b/Source/JavaScriptCore/runtime/JSGlobalData.h +index 5d47ab9..c02f336 100644 +--- a/Source/JavaScriptCore/runtime/JSGlobalData.h ++++ b/Source/JavaScriptCore/runtime/JSGlobalData.h +@@ -141,14 +141,18 @@ namespace JSC { + return result; + } + +- static size_t allocationSize(size_t bufferSize) { return sizeof(size_t) + bufferSize; } ++ static size_t allocationSize(size_t bufferSize) { return sizeof(ScratchBuffer) + bufferSize; } + void setActiveLength(size_t activeLength) { m_activeLength = activeLength; } + size_t activeLength() const { return m_activeLength; }; + size_t* activeLengthPtr() { return &m_activeLength; }; + void* dataBuffer() { return m_buffer; } + + size_t m_activeLength; ++#if CPU(MIPS) && (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV == 2) ++ void* m_buffer[0] __attribute__((aligned(8))); ++#else + void* m_buffer[0]; ++#endif + }; + #if COMPILER(MSVC) + #pragma warning(pop) +diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h +index 1698247..2d90359 100644 +--- a/Source/WTF/wtf/Platform.h ++++ b/Source/WTF/wtf/Platform.h +@@ -818,6 +818,10 @@ + #if CPU(ARM_TRADITIONAL) + #define ENABLE_DFG_JIT 1 + #endif ++/* Enable the DFG JIT on MIPS. */ ++#if CPU(MIPS) ++#define ENABLE_DFG_JIT 1 ++#endif + #endif + + /* If the jit is not available, enable the LLInt C Loop: */ +-- +1.8.3.2 + diff --git a/package/webkit/0008-support-bison-3.0.patch b/package/webkit/0008-support-bison-3.0.patch new file mode 100644 index 0000000000..c081b207ee --- /dev/null +++ b/package/webkit/0008-support-bison-3.0.patch @@ -0,0 +1,22 @@ +ANGLE doesn't build with bison 3.0 + +Author: allan.jensen@digia.com +​https://bugs.webkit.org/show_bug.cgi?id=119798 +Reviewed by Antti Koivisto. +Make glslang.y compatible with bison 3.0, by using %lex-param +to set YYLEX_PARAM and getting rid of useless YYID macro. + +From upstream: http://trac.webkit.org/changeset/154109 +[Arnout: adapted to our older webkit version] +Signed-off-by: Arnout Vandecaeppelle (Essensium/Mind) +--- +Index: trunk/Source/ThirdParty/ANGLE/src/compiler/glslang.y +=================================================================== +--- trunk/Source/ThirdParty/ANGLE/src/compiler/glslang.y (revision 154108) ++++ trunk/Source/ThirdParty/ANGLE/src/compiler/glslang.y (revision 154109) +@@ -48,4 +48,5 @@ + %pure-parser + %parse-param {TParseContext* context} ++%lex-param {YYLEX_PARAM} + + %union { diff --git a/package/webkit/Config.in b/package/webkit/Config.in new file mode 100644 index 0000000000..c139f5212c --- /dev/null +++ b/package/webkit/Config.in @@ -0,0 +1,53 @@ +config BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS + bool + # ARM needs BLX, so v5t+ + default y if (BR2_arm || BR2_armeb) && !BR2_ARM_CPU_ARMV4 + default y if BR2_i386 || BR2_mips || BR2_mipsel || \ + BR2_sparc || BR2_x86_64 + depends on BR2_USE_MMU # libgail -> pango -> libglib2 + depends on BR2_DEPRECATED_SINCE_2015_08 + +# disabled on powerpc due to bug https://bugs.webkit.org/show_bug.cgi?id=113638 + +config BR2_PACKAGE_WEBKIT + bool "webkit" + depends on BR2_DEPRECATED_SINCE_2015_08 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # enchant -> libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # enchant -> libglib2; icu + depends on BR2_PACKAGE_LIBGTK2 + depends on BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS + depends on !BR2_BINFMT_FLAT # icu + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # harfbuzz + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_ENCHANT + select BR2_PACKAGE_HARFBUZZ + select BR2_PACKAGE_ICU + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBGAIL + select BR2_PACKAGE_LIBSECRET + select BR2_PACKAGE_LIBSOUP + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBXSLT + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_WEBP + select BR2_PACKAGE_XLIB_LIBXT if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE if BR2_PACKAGE_HAS_LIBGL + select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_HAS_LIBGL + help + WebKit is an open source, standards compliant web browser engine. + + Note that WebKit does not build with a toolchain using the + old linuxthreads library. + + http://webkit.org/ + +comment "webkit needs libgtk2 and a toolchain w/ C++, wchar, threads" + depends on BR2_DEPRECATED_SINCE_2015_08 + depends on BR2_PACKAGE_WEBKIT_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_PACKAGE_LIBGTK2 || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU diff --git a/package/webkit/webkit.mk b/package/webkit/webkit.mk new file mode 100644 index 0000000000..bbde7f4a26 --- /dev/null +++ b/package/webkit/webkit.mk @@ -0,0 +1,72 @@ +################################################################################ +# +# webkit +# +################################################################################ + +WEBKIT_VERSION = 1.11.5 +WEBKIT_SITE = http://www.webkitgtk.org/releases +WEBKIT_SOURCE = webkitgtk-$(WEBKIT_VERSION).tar.xz +WEBKIT_INSTALL_STAGING = YES +WEBKIT_DEPENDENCIES = host-ruby host-flex host-bison host-gperf enchant harfbuzz \ + icu jpeg libcurl libgail libsecret libsoup libxml2 libxslt libgtk2 sqlite webp + +WEBKIT_DEPENDENCIES += \ + $(if $(BR_PACKAGE_XLIB_LIBXCOMPOSITE),xlib_libXcomposite) \ + $(if $(BR_PACKAGE_XLIB_LIBXDAMAGE),xlib_libXdamage) + +# webkit-disable-tests.patch changes configure.ac therefore autoreconf required +WEBKIT_AUTORECONF = YES +WEBKIT_AUTORECONF_OPTS = -I $(@D)/Source/autotools + +# parallel make install deadlocks with make 3.81 +WEBKIT_INSTALL_STAGING_OPTS = -j1 DESTDIR=$(STAGING_DIR) install +WEBKIT_INSTALL_TARGET_OPTS = -j1 DESTDIR=$(TARGET_DIR) install + +# Does not build and it's disabled by default +# in newer releases +define DISABLE_INDEXED_DATABASE + $(SED) '/ENABLE_INDEXED_DATABASE/s:1:0:' \ + $(@D)/Source/WebCore/GNUmakefile.features.am +endef + +WEBKIT_PRE_CONFIGURE_HOOKS += DISABLE_INDEXED_DATABASE + +# Give explicit path to icu-config, and silence gazillions of warnings +# with recent gcc versions. +WEBKIT_CONF_ENV = ac_cv_path_icu_config=$(STAGING_DIR)/usr/bin/icu-config \ + CFLAGS="$(TARGET_CFLAGS) -Wno-cast-align -Wno-sign-compare" \ + CXXFLAGS="$(TARGET_CXXFLAGS) -Wno-cast-align -Wno-sign-compare" \ + AR_FLAGS="cru" + +WEBKIT_CONF_OPTS += \ + --enable-dependency-tracking \ + --with-gtk=2.0 \ + --disable-geolocation \ + --disable-webkit2 \ + --disable-glibtest \ + --disable-video \ + --disable-tests + +# Xorg Dependencies +WEBKIT_CONF_OPTS += --with-target=x11 +WEBKIT_DEPENDENCIES += xlib_libXt + +ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGLES),yy) +WEBKIT_CONF_OPTS += --enable-gles2 +WEBKIT_DEPENDENCIES += libegl libgles +else +WEBKIT_CONF_OPTS += --disable-gles2 +endif + +# gles/egl support is prefered over opengl by webkit configure +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) +WEBKIT_CONF_OPTS += --with-acceleration-backend=opengl +WEBKIT_DEPENDENCIES += libgl +else +# OpenGL/glx is auto-detected due to the presence of gl.h/glx.h, which is not +# enough, so disable glx and the use of the OpenGL acceleration backend here +WEBKIT_CONF_OPTS += --disable-glx --with-acceleration-backend=none +endif + +$(eval $(autotools-package)) diff --git a/package/webkitgtk/Config.in b/package/webkitgtk/Config.in new file mode 100644 index 0000000000..e662fed129 --- /dev/null +++ b/package/webkitgtk/Config.in @@ -0,0 +1,77 @@ +config BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS + bool + # ARM needs BLX, so v5t+, BE completely untested so disabled + default y if BR2_arm && !BR2_ARM_CPU_ARMV4 + default y if BR2_i386 || BR2_x86_64 + # Disabled on MIPS big endian due to sigbus + default y if BR2_mipsel || BR2_mips64el + # Disabled on PowerPC pending runtime testing + # Disabled on SuperH because of segfault + depends on BR2_USE_MMU # libglib2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + +comment "webkitgtk needs libgtk3 and an (e)glibc toolchain w/ C++, gcc >= 4.9" + depends on BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS + depends on !BR2_PACKAGE_LIBGTK3 || !BR2_INSTALL_LIBSTDCPP || \ + !BR2_TOOLCHAIN_USES_GLIBC || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + depends on BR2_USE_MMU + +config BR2_PACKAGE_WEBKITGTK + bool "webkitgtk" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_PACKAGE_LIBGTK3 + depends on BR2_PACKAGE_WEBKITGTK_ARCH_SUPPORTS + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_ENCHANT + select BR2_PACKAGE_HARFBUZZ + select BR2_PACKAGE_ICU + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBSECRET + select BR2_PACKAGE_LIBSOUP + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBXSLT + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_WEBP + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE if BR2_PACKAGE_LIBGTK3_X11 + select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_LIBGTK3_X11 + select BR2_PACKAGE_XLIB_LIBXRENDER if BR2_PACKAGE_LIBGTK3_X11 + select BR2_PACKAGE_XLIB_LIBXT if BR2_PACKAGE_LIBGTK3_X11 + help + WebKit is an open source, standards compliant web browser engine. + + http://www.webkitgtk.org/ + +if BR2_PACKAGE_WEBKITGTK + +config BR2_PACKAGE_WEBKITGTK_HTTPS + bool "HTTPS support" + select BR2_PACKAGE_CA_CERTIFICATES # runtime + select BR2_PACKAGE_LIBSOUP_SSL + help + Enable HTTPS protocol support. + +config BR2_PACKAGE_WEBKITGTK_MULTIMEDIA + bool "multimedia support" + select BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BASE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERT + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOSCALE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME + select BR2_PACKAGE_GST1_PLUGINS_GOOD + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ISOMP4 + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTSP + select BR2_PACKAGE_GST1_LIBAV + help + This option pulls in all of the required dependencies + to enable multimedia (video/audio) support. + +endif diff --git a/package/webkitgtk/webkitgtk.hash b/package/webkitgtk/webkitgtk.hash new file mode 100644 index 0000000000..faccb3f945 --- /dev/null +++ b/package/webkitgtk/webkitgtk.hash @@ -0,0 +1,4 @@ +# From http://www.webkitgtk.org/releases/webkitgtk-2.12.3.tar.xz.sha1 +sha1 d6a0d598c09d2d56ba0862f8d9206e89d75317cb webkitgtk-2.12.3.tar.xz +# Calculated based on the hash above +sha256 173cbb9a2eca23eee52e99965483ab25aa9c0569ef5b57041fc0c129cc26c307 webkitgtk-2.12.3.tar.xz diff --git a/package/webkitgtk/webkitgtk.mk b/package/webkitgtk/webkitgtk.mk new file mode 100644 index 0000000000..2479872c47 --- /dev/null +++ b/package/webkitgtk/webkitgtk.mk @@ -0,0 +1,89 @@ +################################################################################ +# +# webkitgtk +# +################################################################################ + +WEBKITGTK_VERSION = 2.12.3 +WEBKITGTK_SITE = http://www.webkitgtk.org/releases +WEBKITGTK_SOURCE = webkitgtk-$(WEBKITGTK_VERSION).tar.xz +WEBKITGTK_INSTALL_STAGING = YES +WEBKITGTK_LICENSE = LGPLv2.1+, BSD-2c +WEBKITGTK_LICENSE_FILES = \ + Source/WebCore/LICENSE-APPLE \ + Source/WebCore/LICENSE-LGPL-2.1 +WEBKITGTK_DEPENDENCIES = host-ruby host-flex host-bison host-gperf \ + enchant harfbuzz icu jpeg libgtk3 libsecret libsoup \ + libxml2 libxslt sqlite webp +WEBKITGTK_CONF_OPTS = \ + -DENABLE_API_TESTS=OFF \ + -DENABLE_GEOLOCATION=OFF \ + -DENABLE_GTKDOC=OFF \ + -DENABLE_INTROSPECTION=OFF \ + -DENABLE_MINIBROWSER=ON \ + -DENABLE_SPELLCHECK=ON \ + -DPORT=GTK \ + -DUSE_LIBNOTIFY=OFF \ + -DUSE_LIBHYPHEN=OFF + +# ARM needs NEON for JIT +# i386 & x86_64 don't seem to have any special requirements +ifeq ($(BR2_ARM_CPU_HAS_NEON)$(BR2_i386)$(BR2_x86_64),y) +WEBKITGTK_CONF_OPTS += -DENABLE_JIT=ON +else +WEBKITGTK_CONF_OPTS += -DENABLE_JIT=OFF +endif + +ifeq ($(BR2_PACKAGE_WEBKITGTK_MULTIMEDIA),y) +WEBKITGTK_CONF_OPTS += \ + -DENABLE_VIDEO=ON \ + -DENABLE_WEB_AUDIO=ON +WEBKITGTK_DEPENDENCIES += gstreamer1 gst1-libav gst1-plugins-base gst1-plugins-good +else +WEBKITGTK_CONF_OPTS += \ + -DENABLE_VIDEO=OFF \ + -DENABLE_WEB_AUDIO=OFF +endif + +# Only one target platform can be built, assume X11 > Wayland + +# GTK3-X11 target gives OpenGL from newer libgtk3 versions +# Consider this better than EGL + maybe GLESv2 since both can't be built +# 2D CANVAS acceleration requires OpenGL proper with cairo-gl +ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) +WEBKITGTK_CONF_OPTS += \ + -DENABLE_ACCELERATED_2D_CANVAS=ON \ + -DENABLE_GLES2=OFF \ + -DENABLE_OPENGL=ON \ + -DENABLE_X11_TARGET=ON +WEBKITGTK_DEPENDENCIES += libgl \ + xlib_libXcomposite xlib_libXdamage xlib_libXrender xlib_libXt +# It can use libgtk2 for npapi plugins +ifeq ($(BR2_PACKAGE_LIBGTK2),y) +WEBKITGTK_CONF_OPTS += -DENABLE_PLUGIN_PROCESS_GTK2=ON +WEBKITGTK_DEPENDENCIES += libgtk2 +else +WEBKITGTK_CONF_OPTS += -DENABLE_PLUGIN_PROCESS_GTK2=OFF +endif +else # !X11 +# GTK3-BROADWAY/WAYLAND needs at least EGL +WEBKITGTK_DEPENDENCIES += libegl +# GLESv2 support is optional though +ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +WEBKITGTK_CONF_OPTS += \ + -DENABLE_GLES2=ON \ + -DENABLE_OPENGL=ON +WEBKITGTK_DEPENDENCIES += libgles +else +# Disable general OpenGL (shading) if there's no GLESv2 +WEBKITGTK_CONF_OPTS += \ + -DENABLE_GLES2=OFF \ + -DENABLE_OPENGL=OFF +endif +# We must explicitly state the wayland target +ifeq ($(BR2_PACKAGE_LIBGTK3_WAYLAND),y) +WEBKITGTK_CONF_OPTS += -DENABLE_WAYLAND_TARGET=ON +endif +endif + +$(eval $(cmake-package)) diff --git a/package/webkitgtk24/0001-fix-ppc32.patch b/package/webkitgtk24/0001-fix-ppc32.patch new file mode 100644 index 0000000000..c655a0ecf4 --- /dev/null +++ b/package/webkitgtk24/0001-fix-ppc32.patch @@ -0,0 +1,34 @@ +From https://bugs.webkit.org/show_bug.cgi?id=130837 + +Signed-off-by: Gustavo Zacarias + +diff -Nura webkitgtk-2.4.8/Source/WebKit2/Platform/IPC/Connection.h webkitgtk-2.4.8-ppc/Source/WebKit2/Platform/IPC/Connection.h +--- webkitgtk-2.4.8/Source/WebKit2/Platform/IPC/Connection.h 2015-01-07 06:45:43.000000000 -0300 ++++ webkitgtk-2.4.8-ppc/Source/WebKit2/Platform/IPC/Connection.h 2015-04-20 01:55:41.554547510 -0300 +@@ -216,7 +216,11 @@ + + Client* m_client; + bool m_isServer; ++#if CPU(PPC) ++ uint64_t m_syncRequestID; ++#else + std::atomic m_syncRequestID; ++#endif + + bool m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage; + bool m_shouldExitOnSyncMessageSendFailure; +diff -Nura webkitgtk-2.4.8/Source/WebKit2/UIProcess/StatisticsRequest.cpp webkitgtk-2.4.8-ppc/Source/WebKit2/UIProcess/StatisticsRequest.cpp +--- webkitgtk-2.4.8/Source/WebKit2/UIProcess/StatisticsRequest.cpp 2015-01-07 06:45:43.000000000 -0300 ++++ webkitgtk-2.4.8-ppc/Source/WebKit2/UIProcess/StatisticsRequest.cpp 2015-04-20 01:55:41.555547544 -0300 +@@ -44,7 +44,11 @@ + + uint64_t StatisticsRequest::addOutstandingRequest() + { ++#if CPU(PPC) ++ static int64_t uniqueRequestID; ++#else + static std::atomic uniqueRequestID; ++#endif + + uint64_t requestID = ++uniqueRequestID; + m_outstandingRequests.add(requestID); diff --git a/package/webkitgtk24/0003-Pretty-quotes-in-licence-break-Python-stdin.patch b/package/webkitgtk24/0003-Pretty-quotes-in-licence-break-Python-stdin.patch new file mode 100644 index 0000000000..df51078b06 --- /dev/null +++ b/package/webkitgtk24/0003-Pretty-quotes-in-licence-break-Python-stdin.patch @@ -0,0 +1,36 @@ +Pretty quotes in licence break Python stdin. + +This patch was submitted upstream in this bug report: + +https://bugs.webkit.org/show_bug.cgi?id=128971 + +[Vincent: tweak the patch to make it apply on Buildroot] + +Signed-off-by: Vicente Olivert Riera + +Pretty quotes in licence break Python stdin. + +https://bugs.webkit.org/show_bug.cgi?id=128971 + +--- a/Source/WebCore/xml/XMLViewer.css 2014-01-23 16:49:58.000000000 +0000 ++++ b/Source/WebCore/xml/XMLViewer.css +@@ -14,7 +14,7 @@ + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. AND ITS CONTRIBUTORS +- * “AS IS†AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. + * OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +--- a/Source/WebCore/xml/XMLViewer.js 2014-01-23 16:49:58.000000000 +0000 ++++ b/Source/WebCore/xml/XMLViewer.js +@@ -15,7 +15,7 @@ + * distribution. + * + * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. AND ITS CONTRIBUTORS +- * “AS IS†AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC. + * OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, diff --git a/package/webkitgtk24/Config.in b/package/webkitgtk24/Config.in new file mode 100644 index 0000000000..bba3a2b9cc --- /dev/null +++ b/package/webkitgtk24/Config.in @@ -0,0 +1,83 @@ +config BR2_PACKAGE_WEBKITGTK24_ARCH_SUPPORTS + bool + # ARM needs BLX, so v5t+, BE completely untested so disabled + default y if BR2_arm && !BR2_ARM_CPU_ARMV4 + default y if BR2_i386 || BR2_x86_64 + # Disabled on MIPS big endian due to sigbus + default y if BR2_mipsel || BR2_mips64el + # Disabled on PowerPC pending runtime testing + # Disabled on SuperH because of segfault + depends on BR2_USE_MMU # libglib2 + +comment "webkitgtk24 needs libgtk2 and a toolchain w/ C++, wchar, NPTL, gcc >=4.8" + depends on BR2_PACKAGE_WEBKITGTK24_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_PACKAGE_LIBGTK2 || !BR2_PACKAGE_XORG7 || \ + !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_USE_WCHAR || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + depends on BR2_USE_MMU + depends on BR2_DEPRECATED_SINCE_2016_05 + +config BR2_PACKAGE_WEBKITGTK24 + bool "webkitgtk 2.4.x" + depends on BR2_DEPRECATED_SINCE_2016_05 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + depends on (BR2_PACKAGE_LIBGTK2 && BR2_PACKAGE_XORG7) + depends on BR2_PACKAGE_WEBKITGTK24_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # harfbuzz + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_ENCHANT + select BR2_PACKAGE_HARFBUZZ + select BR2_PACKAGE_ICU + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBCURL + select BR2_PACKAGE_LIBSECRET + select BR2_PACKAGE_LIBSOUP + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBXSLT + select BR2_PACKAGE_SQLITE + select BR2_PACKAGE_WEBP + select BR2_PACKAGE_XLIB_LIBXT if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE if BR2_PACKAGE_HAS_LIBGL || \ + (BR2_PACKAGE_HAS_LIBGLES && BR2_PACKAGE_HAS_LIBEGL) + select BR2_PACKAGE_XLIB_LIBXDAMAGE if BR2_PACKAGE_HAS_LIBGL || \ + (BR2_PACKAGE_HAS_LIBGLES && BR2_PACKAGE_HAS_LIBEGL) + help + WebKit is an open source, standards compliant web browser engine. + + http://www.webkitgtk.org/ + +if BR2_PACKAGE_WEBKITGTK24 + +config BR2_PACKAGE_WEBKITGTK24_HTTPS + bool "HTTPS support" + select BR2_PACKAGE_CA_CERTIFICATES # runtime + select BR2_PACKAGE_LIBSOUP_SSL + help + Enable HTTPS protocol support. + +config BR2_PACKAGE_WEBKITGTK24_MULTIMEDIA + bool "multimedia support" + select BR2_PACKAGE_GSTREAMER1 + select BR2_PACKAGE_GST1_PLUGINS_BASE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_PLAYBACK + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERT + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOSCALE + select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME + select BR2_PACKAGE_GST1_PLUGINS_GOOD + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ISOMP4 + select BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_RTSP + select BR2_PACKAGE_GST1_LIBAV + help + This option pulls in all of the required dependencies + to enable basic multimedia (video/audio) support. + +endif diff --git a/package/webkitgtk24/webkitgtk24.hash b/package/webkitgtk24/webkitgtk24.hash new file mode 100644 index 0000000000..d3a9cca0f4 --- /dev/null +++ b/package/webkitgtk24/webkitgtk24.hash @@ -0,0 +1,4 @@ +# From http://www.webkitgtk.org/releases/webkitgtk-2.4.10.tar.xz.sha1 +sha1 7fe2fe07ed21d00d8a8483d68c13a8c7ff0ff320 webkitgtk-2.4.10.tar.xz +# Calculated based on the hash above +sha256 33fda4b20d7fec2d6e9399ba03ef3f6d2a733c628bd77d397880c44e4bf7c614 webkitgtk-2.4.10.tar.xz diff --git a/package/webkitgtk24/webkitgtk24.mk b/package/webkitgtk24/webkitgtk24.mk new file mode 100644 index 0000000000..4b7d6949d4 --- /dev/null +++ b/package/webkitgtk24/webkitgtk24.mk @@ -0,0 +1,124 @@ +################################################################################ +# +# webkitgtk 2.4.x +# +################################################################################ + +WEBKITGTK24_VERSION = 2.4.10 +WEBKITGTK24_SITE = http://www.webkitgtk.org/releases +WEBKITGTK24_SOURCE = webkitgtk-$(WEBKITGTK24_VERSION).tar.xz +WEBKITGTK24_INSTALL_STAGING = YES +WEBKITGTK24_LICENSE = LGPLv2+, BSD-2c +WEBKITGTK24_LICENSE_FILES = \ + Source/WebCore/LICENSE-APPLE \ + Source/WebCore/LICENSE-LGPL-2 +WEBKITGTK24_DEPENDENCIES = host-ruby host-flex host-bison host-gperf \ + host-pkgconf enchant harfbuzz icu jpeg libcurl libgtk2 \ + libsecret libsoup libxml2 libxslt sqlite webp + +WEBKITGTK24_DEPENDENCIES += \ + $(if $(BR_PACKAGE_XLIB_LIBXCOMPOSITE),xlib_libXcomposite) \ + $(if $(BR_PACKAGE_XLIB_LIBXDAMAGE),xlib_libXdamage) + +# make 3.81 loops into oblivion with numjobs > 1 +ifneq ($(findstring x3.81,x$(RUNNING_MAKE_VERSION)),) +WEBKITGTK24_MAKE = $(MAKE1) +endif + +# Give explicit path to icu-config to avoid host leakage +WEBKITGTK24_CONF_ENV = ac_cv_path_icu_config=$(STAGING_DIR)/usr/bin/icu-config + +# Some 32-bit architectures need libatomic support for 64-bit ops +ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) +WEBKITGTK24_CONF_ENV += LIBS="-latomic" +endif + +# dependency tracking is to avoid build issues in the GEN/WTF phase +WEBKITGTK24_CONF_OPTS = \ + --enable-dependency-tracking \ + --enable-spellcheck \ + --disable-geolocation \ + --disable-glibtest \ + --disable-gtk-doc-html \ + --disable-wayland-target + +ifeq ($(BR2_PACKAGE_WEBKITGTK24_MULTIMEDIA),y) +WEBKITGTK24_CONF_OPTS += \ + --enable-video \ + --enable-web-audio +WEBKITGTK24_DEPENDENCIES += gstreamer1 gst1-libav gst1-plugins-base gst1-plugins-good +else +WEBKITGTK24_CONF_OPTS += \ + --disable-video \ + --disable-web-audio +endif + +# OpenGL +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) +WEBKITGTK24_CONF_OPTS += \ + --enable-accelerated-compositing \ + --enable-glx \ + --enable-webgl \ + --disable-gles2 +WEBKITGTK24_DEPENDENCIES += libgl +# EGL + GLES +else ifeq ($(BR2_PACKAGE_HAS_LIBEGL)$(BR2_PACKAGE_HAS_LIBGLES),yy) +WEBKITGTK24_CONF_OPTS += \ + --enable-accelerated-compositing \ + --enable-gles2 \ + --enable-webgl \ + --disable-glx +WEBKITGTK24_DEPENDENCIES += libegl libgles +# Some EGL/GLES implementations needs extra help (eg. rpi-userland) +WEBKITGTK24_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) \ + `$(PKG_CONFIG_HOST_BINARY) --cflags egl` \ + `$(PKG_CONFIG_HOST_BINARY) --clfags glesv2`" +# No GL +else +WEBKITGTK24_CONF_OPTS += \ + --disable-accelerated-compositing \ + --disable-gles2 \ + --disable-glx \ + --disable-webgl +endif + +# X11 target with GTK2 (optionally GTK3) +ifeq ($(BR2_PACKAGE_XLIB_LIBXT),y) +WEBKITGTK24_CONF_OPTS += --enable-x11-target +WEBKITGTK24_DEPENDENCIES += xlib_libXt +else +WEBKITGTK24_CONF_OPTS += --disable-x11-target +endif + +# ARM needs NEON for JIT +# i386 & x86_64 don't seem to have any special requirements +ifeq ($(BR2_ARM_CPU_HAS_NEON)$(BR2_i386)$(BR2_x86_64),y) +WEBKITGTK24_CONF_OPTS += --enable-jit +else +WEBKITGTK24_CONF_OPTS += --disable-jit +# Disabling assembly and JIT needs an extra push sometimes (ppc) +# See https://bugs.webkit.org/show_bug.cgi?format=multiple&id=113638 +WEBKITGTK24_CONF_ENV += \ + CPPFLAGS="$(TARGET_CPPFLAGS) -DENABLE_JIT=0 -DENABLE_YARR_JIT=0 -DENABLE_ASSEMBLER=0" +endif + +# webkit1 (old API) uses gtk2, webkit2 (new API) uses gtk3 +# Both can be built simultaneously, prefer "newer" for size/time savings +# gtk2 is mandatory for plugin support +ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) +WEBKITGTK24_CONF_OPTS += \ + --with-gtk=3.0 \ + --disable-webkit1 +WEBKITGTK24_DEPENDENCIES += libgtk3 +define WEBKITGTK24_INSTALL_BROWSER + $(INSTALL) -D -m 0755 $(@D)/Programs/MiniBrowser \ + $(TARGET_DIR)/usr/bin/MiniBrowser +endef +WEBKITGTK24_POST_INSTALL_TARGET_HOOKS += WEBKITGTK24_INSTALL_BROWSER +else +WEBKITGTK24_CONF_OPTS += \ + --with-gtk=2.0 \ + --disable-webkit2 +endif + +$(eval $(autotools-package)) diff --git a/package/webp/Config.in b/package/webp/Config.in new file mode 100644 index 0000000000..e385b5ee4f --- /dev/null +++ b/package/webp/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_WEBP + bool "webp" + help + WebP is a new image format that provides lossless and lossy + compression for images on the web + + https://developers.google.com/speed/webp/ diff --git a/package/webp/webp.hash b/package/webp/webp.hash new file mode 100644 index 0000000000..328f263e9c --- /dev/null +++ b/package/webp/webp.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 efbe0d58fda936f2ed99d0b837ed7087d064d6838931f282c4618d2a3f7390c4 libwebp-0.4.3.tar.gz diff --git a/package/webp/webp.mk b/package/webp/webp.mk new file mode 100644 index 0000000000..5f2cab7641 --- /dev/null +++ b/package/webp/webp.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# webp +# +################################################################################ + +WEBP_VERSION = 0.4.3 +WEBP_SOURCE = libwebp-$(WEBP_VERSION).tar.gz +WEBP_SITE = http://downloads.webmproject.org/releases/webp +WEBP_LICENSE = BSD-3c +WEBP_LICENSE_FILES = COPYING +WEBP_INSTALL_STAGING = YES + +WEBP_CONF_OPTS += \ + --with-jpegincludedir=$(STAGING_DIR)/usr/include \ + --with-jpeglibdir=$(STAGING_DIR)/usr/lib \ + --with-tiffincludedir=$(STAGING_DIR)/usr/include \ + --with-tifflibdir=$(STAGING_DIR)/usr/lib + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +WEBP_DEPENDENCIES += libpng +WEBP_CONF_ENV += ac_cv_path_LIBPNG_CONFIG=$(STAGING_DIR)/usr/bin/libpng-config +else +WEBP_CONF_ENV += ac_cv_path_LIBPNG_CONFIG=/bin/false +endif + +WEBP_DEPENDENCIES += $(if $(BR2_PACKAGE_JPEG),jpeg) +WEBP_DEPENDENCIES += $(if $(BR2_PACKAGE_TIFF),tiff) + +$(eval $(autotools-package)) diff --git a/package/webrtc-audio-processing/Config.in b/package/webrtc-audio-processing/Config.in new file mode 100644 index 0000000000..f228bc7c18 --- /dev/null +++ b/package/webrtc-audio-processing/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING + bool "webrtc-audio-processing" + depends on BR2_arm || BR2_i386 || BR2_x86_64 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + help + AudioProcessing library based on Google's implementation of + WebRTC. + + http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/ + +comment "webrtc-audio-processing needs a toolchain w/ C++, threads" + depends on BR2_arm || BR2_i386 || BR2_x86_64 + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/webrtc-audio-processing/webrtc-audio-processing.hash b/package/webrtc-audio-processing/webrtc-audio-processing.hash new file mode 100644 index 0000000000..afba5a9670 --- /dev/null +++ b/package/webrtc-audio-processing/webrtc-audio-processing.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 ed4b52f9c2688b97628035a5565377d74704d7c04de4254a768df3342c7afedc webrtc-audio-processing-0.1.tar.xz diff --git a/package/webrtc-audio-processing/webrtc-audio-processing.mk b/package/webrtc-audio-processing/webrtc-audio-processing.mk new file mode 100644 index 0000000000..92fcba9f6e --- /dev/null +++ b/package/webrtc-audio-processing/webrtc-audio-processing.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# webrtc-audio-processing +# +################################################################################ + +WEBRTC_AUDIO_PROCESSING_VERSION = 0.1 +WEBRTC_AUDIO_PROCESSING_SOURCE = webrtc-audio-processing-$(WEBRTC_AUDIO_PROCESSING_VERSION).tar.xz +WEBRTC_AUDIO_PROCESSING_SITE = http://freedesktop.org/software/pulseaudio/webrtc-audio-processing +WEBRTC_AUDIO_PROCESSING_INSTALL_STAGING = YES +WEBRTC_AUDIO_PROCESSING_LICENSE = BSD-3c +WEBRTC_AUDIO_PROCESSING_LICENSE_FILES = COPYING + +ifeq ($(BR2_SOFT_FLOAT),y) +WEBRTC_AUDIO_PROCESSING_CONF_OPTS += --with-ns-mode=fixed +endif + +$(eval $(autotools-package)) diff --git a/package/weston/0001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch b/package/weston/0001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch new file mode 100644 index 0000000000..a7f2a34a88 --- /dev/null +++ b/package/weston/0001-os-compatibility-define-CLOCK_BOOTTIME-when-not-avai.patch @@ -0,0 +1,41 @@ +From 66b71951f8ce66f02040f8814e1d89db34c34a87 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 22 Feb 2015 12:36:00 +0100 +Subject: [PATCH] os-compatibility: define CLOCK_BOOTTIME when not available + +CLOCK_BOOTTIME is supposed to be provided by the C library headers, +but uClibc 0.9.33.2 does not provide it. Instead of depending on an +uClibc patch, let's make Weston define it to the right value when not +already defined by the C library. + +Signed-off-by: Thomas Petazzoni +--- + shared/os-compatibility.h | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/shared/os-compatibility.h b/shared/os-compatibility.h +index 172bb7e..e369899 100644 +--- a/shared/os-compatibility.h ++++ b/shared/os-compatibility.h +@@ -26,6 +26,7 @@ + #include "config.h" + + #include ++#include + + #ifdef HAVE_EXECINFO_H + #include +@@ -37,6 +38,10 @@ backtrace(void **buffer, int size) + } + #endif + ++#ifndef CLOCK_BOOTTIME ++#define CLOCK_BOOTTIME 7 ++#endif ++ + int + os_socketpair_cloexec(int domain, int type, int protocol, int *sv); + +-- +2.1.0 + diff --git a/package/weston/0002-build-add-check-for-clock_gettime-in-librt.patch b/package/weston/0002-build-add-check-for-clock_gettime-in-librt.patch new file mode 100644 index 0000000000..2c8f54e505 --- /dev/null +++ b/package/weston/0002-build-add-check-for-clock_gettime-in-librt.patch @@ -0,0 +1,101 @@ +From 4c0a6ed01fb1aab578dc6ac29f11524a3883e14f Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Wed, 20 Apr 2016 13:16:58 -0300 +Subject: [PATCH] build: add check for clock_gettime() in librt + +In older versions of glibc (< 2.17) clock_gettime() is in librt, hence +linking against librt is required when using it. +Add a configure check for this and replace all instances of -lrt in +Makefile.am with $(CLOCK_GETTIME_LIBS). + +Signed-off-by: Gustavo Zacarias +--- +Status: submitted upstream + + Makefile.am | 15 ++++++++------- + configure.ac | 5 +++++ + 2 files changed, 13 insertions(+), 7 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index d3c3f71..c042c68 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -65,7 +65,7 @@ weston_LDFLAGS = -export-dynamic + weston_CPPFLAGS = $(AM_CPPFLAGS) -DIN_WESTON + weston_CFLAGS = $(AM_CFLAGS) $(COMPOSITOR_CFLAGS) $(LIBUNWIND_CFLAGS) + weston_LDADD = $(COMPOSITOR_LIBS) $(LIBUNWIND_LIBS) \ +- $(DLOPEN_LIBS) -lm -lrt libshared.la ++ $(DLOPEN_LIBS) -lm $(CLOCK_GETTIME_LIBS) libshared.la + + weston_SOURCES = \ + src/git-version.h \ +@@ -270,7 +270,8 @@ drm_backend_la_LIBADD = \ + $(COMPOSITOR_LIBS) \ + $(DRM_COMPOSITOR_LIBS) \ + $(INPUT_BACKEND_LIBS) \ +- libshared.la -lrt \ ++ libshared.la \ ++ $(CLOCK_GETTIME_LIBS) \ + libsession-helper.la + drm_backend_la_CFLAGS = \ + $(COMPOSITOR_CFLAGS) \ +@@ -508,11 +509,11 @@ nodist_weston_presentation_shm_SOURCES = \ + protocol/presentation-time-protocol.c \ + protocol/presentation-time-client-protocol.h + weston_presentation_shm_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS) +-weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm -lrt ++weston_presentation_shm_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lm $(CLOCK_GETTIME_LIBS) + + weston_multi_resource_SOURCES = clients/multi-resource.c + weston_multi_resource_CFLAGS = $(AM_CFLAGS) $(SIMPLE_CLIENT_CFLAGS) +-weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la -lrt -lm ++weston_multi_resource_LDADD = $(SIMPLE_CLIENT_LIBS) libshared.la $(CLOCK_GETTIME_LIBS) -lm + endif + + if BUILD_SIMPLE_EGL_CLIENTS +@@ -580,7 +581,7 @@ BUILT_SOURCES += $(nodist_libtoytoolkit_la_SOURCES) + libtoytoolkit_la_LIBADD = \ + $(CLIENT_LIBS) \ + $(CAIRO_EGL_LIBS) \ +- libshared-cairo.la -lrt -lm ++ libshared-cairo.la $(CLOCK_GETTIME_LIBS) -lm + libtoytoolkit_la_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS) $(CAIRO_EGL_CFLAGS) + + weston_flower_SOURCES = clients/flower.c +@@ -1181,7 +1182,7 @@ vertex_clip_test_SOURCES = \ + shared/helpers.h \ + src/vertex-clipping.c \ + src/vertex-clipping.h +-vertex_clip_test_LDADD = libtest-runner.la -lm -lrt ++vertex_clip_test_LDADD = libtest-runner.la -lm $(CLOCK_GETTIME_LIBS) + + libtest_client_la_SOURCES = \ + tests/weston-test-client-helper.c \ +@@ -1269,7 +1270,7 @@ matrix_test_SOURCES = \ + shared/matrix.c \ + shared/matrix.h + matrix_test_CPPFLAGS = -DUNIT_TEST +-matrix_test_LDADD = -lm -lrt ++matrix_test_LDADD = -lm $(CLOCK_GETTIME_LIBS) + + if ENABLE_IVI_SHELL + module_tests += \ +diff --git a/configure.ac b/configure.ac +index 447cf6b..670200c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -46,6 +46,11 @@ AC_CHECK_FUNC([dlopen], [], + AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl")) + AC_SUBST(DLOPEN_LIBS) + ++# In old glibc versions (< 2.17) clock_gettime() is in librt ++AC_SEARCH_LIBS([clock_gettime], [rt], ++ [CLOCK_GETTIME_LIBS="-lrt"]) ++AC_SUBST([CLOCK_GETTIME_LIBS]) ++ + AC_CHECK_DECL(SFD_CLOEXEC,[], + [AC_MSG_ERROR("SFD_CLOEXEC is needed to compile weston")], + [[#include ]]) +-- +2.7.3 + diff --git a/package/weston/Config.in b/package/weston/Config.in new file mode 100644 index 0000000000..8cefa411b4 --- /dev/null +++ b/package/weston/Config.in @@ -0,0 +1,85 @@ +comment "weston needs udev and a toolchain w/ locale, threads, dynamic library, headers >= 3.0" + depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 || BR2_STATIC_LIBS || \ + !BR2_ENABLE_LOCALE + +config BR2_PACKAGE_WESTON + bool "weston" + select BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_WAYLAND_PROTOCOLS + select BR2_PACKAGE_LIBXKBCOMMON + select BR2_PACKAGE_CAIRO + select BR2_PACKAGE_CAIRO_PNG + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_MTDEV + select BR2_PACKAGE_LIBINPUT + depends on BR2_ENABLE_LOCALE # libinput + depends on BR2_PACKAGE_HAS_UDEV + depends on !BR2_STATIC_LIBS # wayland + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + # Runtime dependency + select BR2_PACKAGE_XKEYBOARD_CONFIG + # Make sure at least one compositor is selected. + select BR2_PACKAGE_WESTON_FBDEV if !BR2_PACKAGE_WESTON_HAS_COMPOSITOR + help + Weston is the reference implementation of a Wayland + compositor, and a useful compositor in its own right. + Weston has various backends that lets it run on Linux kernel + modesetting and evdev input as well as under X11. + + http://wayland.freedesktop.org/ + +if BR2_PACKAGE_WESTON + +# Helper to make sure at least one compositor is selected. +config BR2_PACKAGE_WESTON_HAS_COMPOSITOR + bool + +config BR2_PACKAGE_WESTON_DRM + bool "DRM compositor" + depends on BR2_PACKAGE_MESA3D_OPENGL_EGL + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_WESTON_HAS_COMPOSITOR + +# Uses libgbm from mesa3d +comment "DRM compositor needs an OpenGL EGL backend provided by mesa3d" + depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL + +config BR2_PACKAGE_WESTON_FBDEV + bool "fbdev compositor" + +# FreeRDP needs threads and !static, already the case for weston +config BR2_PACKAGE_WESTON_RDP + bool "RDP compositor" + depends on BR2_USE_WCHAR # freerdp + depends on BR2_USE_MMU # freerdp, libglib2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_FREERDP + select BR2_PACKAGE_WESTON_HAS_COMPOSITOR + help + This enables the RDP backend, which allows accessing weston + through the network with any RDP-compliant client. + + Please note that one must pass those options to weston for RDP + to be functional: + --rdp-tls-cert=/path/to/server.crt + --rdp-tls-key=/path/to/server.key + + By default, Buildroot installs such files in /etc/freerdp/server/ + so you may want to change them in a post-build script or a rootfs + overlay. + +comment "RDP compositor needs a toolchain w/ wchar" + depends on BROKEN # needs FreeRDP master + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_USE_WCHAR + +# rpi-userland is an EGL/GLES provider, so we can't select it +config BR2_PACKAGE_WESTON_RPI + bool "RPi compositor" + depends on BR2_PACKAGE_RPI_USERLAND + select BR2_PACKAGE_WESTON_HAS_COMPOSITOR + +endif diff --git a/package/weston/weston.hash b/package/weston/weston.hash new file mode 100644 index 0000000000..ed174e6d56 --- /dev/null +++ b/package/weston/weston.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/wayland-devel/2016-February/027039.html +sha256 e0b2004d00d8293ddf7903ca283c1746afa9ccb5919ab50fd04397ff472aa5c1 weston-1.10.0.tar.xz diff --git a/package/weston/weston.mk b/package/weston/weston.mk new file mode 100644 index 0000000000..63c43a3231 --- /dev/null +++ b/package/weston/weston.mk @@ -0,0 +1,134 @@ +################################################################################ +# +# weston +# +################################################################################ + +WESTON_VERSION = 1.10.0 +WESTON_SITE = http://wayland.freedesktop.org/releases +WESTON_SOURCE = weston-$(WESTON_VERSION).tar.xz +WESTON_LICENSE = MIT +WESTON_LICENSE_FILES = COPYING +# For 0002-build-add-check-for-clock_gettime-in-librt.patch +WESTON_AUTORECONF = YES + +WESTON_DEPENDENCIES = host-pkgconf wayland wayland-protocols \ + libxkbcommon pixman libpng jpeg mtdev udev cairo libinput \ + $(if $(BR2_PACKAGE_WEBP),webp) + +WESTON_CONF_OPTS = \ + --with-dtddir=$(STAGING_DIR)/usr/share/wayland \ + --disable-xwayland \ + --disable-x11-compositor \ + --disable-wayland-compositor \ + --disable-headless-compositor \ + --disable-colord \ + --disable-setuid-install + +WESTON_MAKE_OPTS = \ + WAYLAND_PROTOCOLS_DATADIR=$(STAGING_DIR)/usr/share/wayland-protocols + +# Uses VIDIOC_EXPBUF, only available from 3.8+ +ifeq ($(BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8),) +WESTON_CONF_OPTS += --disable-simple-dmabuf-v4l-client +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +WESTON_CONF_OPTS += --enable-dbus +WESTON_DEPENDENCIES += dbus +else +WESTON_CONF_OPTS += --disable-dbus +endif + +# weston-launch must be u+s root in order to work properly +ifeq ($(BR2_PACKAGE_LINUX_PAM),y) +define WESTON_PERMISSIONS + /usr/bin/weston-launch f 4755 0 0 - - - - - +endef +define WESTON_USERS + - - weston-launch -1 - - - - Weston launcher group +endef +WESTON_CONF_OPTS += --enable-weston-launch +WESTON_DEPENDENCIES += linux-pam +else +WESTON_CONF_OPTS += --disable-weston-launch +endif + +# Needs wayland-egl, which normally only mesa provides +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL)$(BR2_PACKAGE_MESA3D_OPENGL_ES),yy) +WESTON_CONF_OPTS += --enable-egl +WESTON_DEPENDENCIES += libegl +else +WESTON_CONF_OPTS += \ + --disable-egl \ + --disable-simple-egl-clients +endif + +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) +WESTON_DEPENDENCIES += libunwind +else +WESTON_CONF_OPTS += --disable-libunwind +endif + +ifeq ($(BR2_PACKAGE_WESTON_RDP),y) +WESTON_DEPENDENCIES += freerdp +WESTON_CONF_OPTS += --enable-rdp-compositor +else +WESTON_CONF_OPTS += --disable-rdp-compositor +endif + +ifeq ($(BR2_PACKAGE_WESTON_FBDEV),y) +WESTON_CONF_OPTS += \ + --enable-fbdev-compositor \ + WESTON_NATIVE_BACKEND=fbdev-backend.so +else +WESTON_CONF_OPTS += --disable-fbdev-compositor +endif + +ifeq ($(BR2_PACKAGE_WESTON_DRM),y) +WESTON_CONF_OPTS += \ + --enable-drm-compositor \ + WESTON_NATIVE_BACKEND=drm-backend.so +WESTON_DEPENDENCIES += libdrm +else +WESTON_CONF_OPTS += --disable-drm-compositor +endif + +ifeq ($(BR2_PACKAGE_WESTON_RPI),y) +WESTON_DEPENDENCIES += rpi-userland +WESTON_CONF_OPTS += --enable-rpi-compositor \ + --disable-resize-optimization \ + WESTON_NATIVE_BACKEND=rpi-backend.so +else +WESTON_CONF_OPTS += --disable-rpi-compositor +endif # BR2_PACKAGE_WESTON_RPI + +ifeq ($(BR2_PACKAGE_LIBVA),y) +WESTON_CONF_OPTS += --enable-vaapi-recorder +WESTON_DEPENDENIES += libva +else +WESTON_CONF_OPTS += --disable-vaapi-recorder +endif + +ifeq ($(BR2_PACKAGE_LCMS2),y) +WESTON_CONF_OPTS += --enable-lcms +WESTON_DEPENDENCIES += lcms2 +else +WESTON_CONF_OPTS += --disable-lcms +endif + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +WESTON_CONF_OPTS += --enable-systemd-login --enable-systemd-notify +WESTON_DEPENDENCIES += systemd +else +WESTON_CONF_OPTS += --disable-systemd-login --disable-systemd-notify +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +WESTON_CONF_OPTS += --enable-junit-xml +WESTON_DEPENDENCIES += libxml2 +else +WESTON_CONF_OPTS += --disable-junit-xml +endif + +$(eval $(autotools-package)) diff --git a/package/wf111/Config.in b/package/wf111/Config.in new file mode 100644 index 0000000000..d2ba440a90 --- /dev/null +++ b/package/wf111/Config.in @@ -0,0 +1,36 @@ +config BR2_PACKAGE_WF111 + bool "wf111" + depends on BR2_LINUX_KERNEL + depends on BR2_ARM_CPU_ARMV5 || BR2_ARM_CPU_ARMV7A || BR2_i386 + # Binary tools are distributed alongside the driver, and are + # dynamically linked against the glibc. + depends on BR2_TOOLCHAIN_USES_GLIBC + help + BlueGiga WF111 WiFi driver and utilities. + + Warning: CONFIG_WIRELESS_EXT and CONFIG_WEXT_PRIV must be + selected in the Linux kernel configuration. These are blind + options (i.e. not selectable directly) so they cannot be + enabled by a change in linux/linux.mk. There are two choices + to enable these options: + - By making them non blind, with a "WF111 support" configuration + entry that selects them, for example. + - By enabling another random WiFi driver that select them. + + http://www.bluegiga.com/en-US/products/wifi-modules/wf111-wifi-module/ + +if BR2_PACKAGE_WF111 + +config BR2_PACKAGE_WF111_TARBALL_PATH + string "Local tarball location" + help + The WF111 tarball can be retrieved on the BlueGiga website + after registration. This option specifies the path where the + tarball is locally saved. + +endif + +comment "wf111 needs an (e)glibc toolchain" + depends on BR2_LINUX_KERNEL + depends on BR2_ARM_CPU_ARMV5 || BR2_ARM_CPU_ARMV7A || BR2_i386 + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/wf111/wf111.mk b/package/wf111/wf111.mk new file mode 100644 index 0000000000..e17e846fd8 --- /dev/null +++ b/package/wf111/wf111.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# wf111 +# +################################################################################ + +WF111_VERSION = 5.2.2-r2 +WF111_SITE_METHOD = file +WF111_SITE = $(call qstrip,$(BR2_PACKAGE_WF111_TARBALL_PATH)) +WF111_DEPENDENCIES = linux + +ifeq ($(BR2_PACKAGE_WF111)$(call qstrip,$(BR2_PACKAGE_WF111_TARBALL_PATH)),y) +$(error No tarball location specified, check BR2_PACKAGE_WF111_TARBALL_PATH) +endif + +ifeq ($(BR2_ARM_CPU_ARMV7A),y) +WF111_SOURCE = wf111-linux-driver_$(WF111_VERSION)_armv7-a.tar.gz +else ifeq ($(BR2_ARM_CPU_ARMV5),y) +WF111_SOURCE = wf111-linux-driver_$(WF111_VERSION)_armv5t.tar.gz +else ifeq ($(BR2_i386),y) +WF111_SOURCE = wf111-linux-driver_$(WF111_VERSION)_x86.tar.gz +endif + +# Due to the stupidity of the package Makefile, we can't invoke +# separately the build step and the install step and get a correct +# behavior. So we do everything in the install step. +define WF111_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) PWD=$(@D) \ + $(LINUX_MAKE_FLAGS) KDIR=$(LINUX_DIR) \ + OUTPUT=$(TARGET_DIR) install_static +endef + +$(eval $(generic-package)) diff --git a/package/wget/Config.in b/package/wget/Config.in new file mode 100644 index 0000000000..26a2019d47 --- /dev/null +++ b/package/wget/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_WGET + bool "wget" + # fork() + depends on BR2_USE_MMU + depends on BR2_USE_WCHAR + help + Network utility to retrieve files from http, https and ftp. + + http://www.gnu.org/software/wget/ + +comment "wget needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR diff --git a/package/wget/wget.hash b/package/wget/wget.hash new file mode 100644 index 0000000000..159cd510f3 --- /dev/null +++ b/package/wget/wget.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 fe559b61eb9cc01635ac6206a14e02cb51591838c35fa83c7a4aacae0bdd97c9 wget-1.17.1.tar.xz diff --git a/package/wget/wget.mk b/package/wget/wget.mk new file mode 100644 index 0000000000..2c6ccf2645 --- /dev/null +++ b/package/wget/wget.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# wget +# +################################################################################ + +WGET_VERSION = 1.17.1 +WGET_SOURCE = wget-$(WGET_VERSION).tar.xz +WGET_SITE = $(BR2_GNU_MIRROR)/wget +WGET_DEPENDENCIES = host-pkgconf +WGET_LICENSE = GPLv3+ +WGET_LICENSE_FILES = COPYING + +# Prefer full-blown wget over busybox +ifeq ($(BR2_PACKAGE_BUSYBOX),y) +WGET_DEPENDENCIES += busybox +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +WGET_CONF_OPTS += \ + --with-ssl=gnutls \ + --with-libgnutls-prefix=$(STAGING_DIR) +WGET_DEPENDENCIES += gnutls +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +WGET_CONF_OPTS += --with-ssl=openssl --with-libssl-prefix=$(STAGING_DIR) +WGET_DEPENDENCIES += openssl +endif + +ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y) +WGET_DEPENDENCIES += util-linux +endif + +# --with-ssl is default +ifneq ($(BR2_PACKAGE_GNUTLS),y) +ifneq ($(BR2_PACKAGE_OPENSSL),y) +WGET_CONF_OPTS += --without-ssl +endif +endif + +$(eval $(autotools-package)) diff --git a/package/whetstone/Config.in b/package/whetstone/Config.in new file mode 100644 index 0000000000..7a68160da4 --- /dev/null +++ b/package/whetstone/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_WHETSTONE + bool "whetstone" + help + C Converted Whetstone Double Precision Benchmark + + http://www.netlib.org/benchmark/ diff --git a/package/whetstone/whetstone.hash b/package/whetstone/whetstone.hash new file mode 100644 index 0000000000..db9bbb4548 --- /dev/null +++ b/package/whetstone/whetstone.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 333e4ceca042c146f63eec605573d16ae8b07166cbc44a17bec1ea97c6f1efbf whetstone.c diff --git a/package/whetstone/whetstone.mk b/package/whetstone/whetstone.mk new file mode 100644 index 0000000000..d9b45638c5 --- /dev/null +++ b/package/whetstone/whetstone.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# whetstone +# +################################################################################ + +WHETSTONE_VERSION = 1.2 +WHETSTONE_SOURCE = whetstone.c +WHETSTONE_SITE = http://www.netlib.org/benchmark + +define WHETSTONE_EXTRACT_CMDS + cp $(DL_DIR)/$($(PKG)_SOURCE) $(@D)/ +endef + +define WHETSTONE_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) LDLIBS="-lm" -C $(@D) whetstone +endef + +define WHETSTONE_INSTALL_TARGET_CMDS + $(INSTALL) -D $(@D)/whetstone $(TARGET_DIR)/usr/bin/whetstone +endef + +$(eval $(generic-package)) diff --git a/package/which/Config.in b/package/which/Config.in new file mode 100644 index 0000000000..5811083fa5 --- /dev/null +++ b/package/which/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_WHICH + bool "which" + help + The standard 'which' utility. + + http://www.xs4all.nl/~carlo17/which/ diff --git a/package/which/which.hash b/package/which/which.hash new file mode 100644 index 0000000000..fe649ab019 --- /dev/null +++ b/package/which/which.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 f4a245b94124b377d8b49646bf421f9155d36aa7614b6ebf83705d3ffc76eaad which-2.21.tar.gz diff --git a/package/which/which.mk b/package/which/which.mk new file mode 100644 index 0000000000..938b770e2f --- /dev/null +++ b/package/which/which.mk @@ -0,0 +1,12 @@ +################################################################################ +# +# which +# +################################################################################ + +WHICH_VERSION = 2.21 +WHICH_SITE = $(BR2_GNU_MIRROR)/which +WHICH_LICENSE = GPLv3+ +WHICH_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/whois/Config.in b/package/whois/Config.in new file mode 100644 index 0000000000..95e3dc6101 --- /dev/null +++ b/package/whois/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_WHOIS + bool "whois" + depends on BR2_USE_WCHAR # gettext + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT + help + Improved whois client. + + http://www.linux.it/~md/software/ + +comment "whois needs a toolchain w/ wchar" + depends on !BR2_USE_WCHAR diff --git a/package/whois/whois.hash b/package/whois/whois.hash new file mode 100644 index 0000000000..15a12f7817 --- /dev/null +++ b/package/whois/whois.hash @@ -0,0 +1,2 @@ +# From http://ftp.debian.org/debian/pool/main/w/whois/whois_5.2.12.dsc +sha256 b26d4027b8987d9911466aa06ce2c167a50017cd59a622a429bd506222f6cdf1 whois_5.2.12.tar.xz diff --git a/package/whois/whois.mk b/package/whois/whois.mk new file mode 100644 index 0000000000..423b214f47 --- /dev/null +++ b/package/whois/whois.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# whois +# +################################################################################ + +WHOIS_VERSION = 5.2.12 +WHOIS_SITE = http://snapshot.debian.org/archive/debian/20160329T095754Z/pool/main/w/whois +WHOIS_SOURCE = whois_$(WHOIS_VERSION).tar.xz +# take precedence over busybox implementation +WHOIS_DEPENDENCIES = host-gettext $(if $(BR2_PACKAGE_BUSYBOX),busybox) +WHOIS_MAKE_ENV = $(TARGET_MAKE_ENV) +WHOIS_MAKE_OPTS = CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + LIBS="$(WHOIS_EXTRA_LIBS)" +WHOIS_LICENSE = GPLv2+ +WHOIS_LICENSE_FILES = COPYING + +ifeq ($(BR2_NEEDS_GETTEXT),y) +WHOIS_DEPENDENCIES += gettext +WHOIS_EXTRA_LIBS += -lintl +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +WHOIS_DEPENDENCIES += libiconv +WHOIS_EXTRA_LIBS += -liconv +WHOIS_MAKE_ENV += HAVE_ICONV=1 +endif + +ifeq ($(BR2_PACKAGE_LIBIDN),y) +WHOIS_DEPENDENCIES += libidn +WHOIS_MAKE_ENV += HAVE_LIBIDN=1 +endif + +define WHOIS_BUILD_CMDS + $(WHOIS_MAKE_ENV) $(MAKE) $(WHOIS_MAKE_OPTS) -C $(@D) +endef + +define WHOIS_INSTALL_TARGET_CMDS + $(WHOIS_MAKE_ENV) $(MAKE) $(WHOIS_MAKE_OPTS) \ + BASEDIR="$(TARGET_DIR)" install -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/wilc1000-firmware/Config.in b/package/wilc1000-firmware/Config.in new file mode 100644 index 0000000000..df8a7a6b60 --- /dev/null +++ b/package/wilc1000-firmware/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_WILC1000_FIRMWARE + bool "wilc1000-firmware" + help + Firmware for Atmel Wilc1000 wireless device + + https://github.com/linux4sc/wireless-firmware.git diff --git a/package/wilc1000-firmware/wilc1000-firmware.hash b/package/wilc1000-firmware/wilc1000-firmware.hash new file mode 100644 index 0000000000..5344efe517 --- /dev/null +++ b/package/wilc1000-firmware/wilc1000-firmware.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 a2e7a327dd545ba2051946f7613005cbde88fdd952afb8eecdd1dacda7e767d2 v14.1_Firmware.zip diff --git a/package/wilc1000-firmware/wilc1000-firmware.mk b/package/wilc1000-firmware/wilc1000-firmware.mk new file mode 100644 index 0000000000..5dcf19045b --- /dev/null +++ b/package/wilc1000-firmware/wilc1000-firmware.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# wilc1000-firmware +# +################################################################################ + +WILC1000_FIRMWARE_VERSION = 14.1 +WILC1000_FIRMWARE_SITE = https://github.com/linux4sc/wireless-firmware/archive +WILC1000_FIRMWARE_SOURCE = v$(WILC1000_FIRMWARE_VERSION)_Firmware.zip + +WILC1000_FIRMWARE_LICENSE = PROPRIETARY + +define WILC1000_FIRMWARE_EXTRACT_CMDS + $(UNZIP) -d $(BUILD_DIR) $(DL_DIR)/$(WILC1000_FIRMWARE_SOURCE) + mv $(BUILD_DIR)/wireless-firmware-$(WILC1000_FIRMWARE_VERSION)_Firmware/* $(@D) + rmdir $(BUILD_DIR)/wireless-firmware-$(WILC1000_FIRMWARE_VERSION)_Firmware +endef + +define WILC1000_FIRMWARE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0644 $(@D)/wilc1003_firmware.bin \ + $(TARGET_DIR)/lib/firmware/atmel/wilc1003_firmware.bin +endef + +$(eval $(generic-package)) diff --git a/package/wine/Config.in b/package/wine/Config.in new file mode 100644 index 0000000000..d1510e11a1 --- /dev/null +++ b/package/wine/Config.in @@ -0,0 +1,23 @@ +config BR2_PACKAGE_WINE + bool "wine" + depends on BR2_TOOLCHAIN_USES_GLIBC + # Wine only builds on certain architectures + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" || \ + BR2_HOSTARCH = "powerpc" || BR2_HOSTARCH = "arm" || \ + BR2_HOSTARCH = "aarch64" + # Wine has much CPU specific code and mostly makes sense on x86 + depends on BR2_i386 + help + Wine is a compatibility layer capable of running Windows + applications on Linux. Instead of simulating internal + Windows logic like a virtual machine or emulator, Wine + translates Windows API calls into POSIX calls on-the-fly, + eliminating the performance and memory penalties of other + methods. + + http://www.winehq.org + +comment "wine needs a (e)glibc toolchain" + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_i386 + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/wine/wine.hash b/package/wine/wine.hash new file mode 100644 index 0000000000..b4eec49aa7 --- /dev/null +++ b/package/wine/wine.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 51624fadf0145e87f0c01e7ce8524ea1e8d9d360c3e8a86e78cd26a52ce55a6f wine-1.8.2.tar.bz2 diff --git a/package/wine/wine.mk b/package/wine/wine.mk new file mode 100644 index 0000000000..7587cb05a0 --- /dev/null +++ b/package/wine/wine.mk @@ -0,0 +1,373 @@ +################################################################################ +# +# wine +# +################################################################################ + +WINE_VERSION = 1.8.2 +WINE_SOURCE = wine-$(WINE_VERSION).tar.bz2 +WINE_SITE = https://dl.winehq.org/wine/source/1.8 +WINE_LICENSE = LGPLv2.1+ +WINE_LICENSE_FILES = COPYING.LIB LICENSE +WINE_DEPENDENCIES = host-bison host-flex host-wine + +# Wine needs its own directory structure and tools for cross compiling +WINE_CONF_OPTS = \ + --with-wine-tools=../host-wine-$(WINE_VERSION) \ + --disable-tests \ + --disable-win64 \ + --without-capi \ + --without-coreaudio \ + --without-gettext \ + --without-gettextpo \ + --without-gphoto \ + --without-gsm \ + --without-hal \ + --without-opencl \ + --without-oss + +# Wine uses a wrapper around gcc, and uses the value of --host to +# construct the filename of the gcc to call. But for external +# toolchains, the GNU_TARGET_NAME tuple that we construct from our +# internal variables may differ from the actual gcc prefix for the +# external toolchains. So, we have to override whatever the gcc +# wrapper believes what the real gcc is named, and force the tuple of +# the external toolchain, not the one we compute in GNU_TARGET_NAME. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +WINE_CONF_OPTS += TARGETFLAGS="-b $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX))" +endif + +ifeq ($(BR2_PACKAGE_ALSA_LIB)$(BR2_PACKAGE_ALSA_LIB_SEQ)$(BR2_PACKAGE_ALSA_LIB_RAWMIDI),yyy) +WINE_CONF_OPTS += --with-alsa +WINE_DEPENDENCIES += alsa-lib +else +WINE_CONF_OPTS += --without-alsa +endif + +ifeq ($(BR2_PACKAGE_CUPS),y) +WINE_CONF_OPTS += --with-cups +WINE_DEPENDENCIES += cups +WINE_CONF_ENV += CUPS_CONFIG=$(STAGING_DIR)/usr/bin/cups-config +else +WINE_CONF_OPTS += --without-cups +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +WINE_CONF_OPTS += --with-dbus +WINE_DEPENDENCIES += dbus +else +WINE_CONF_OPTS += --without-dbus +endif + +ifeq ($(BR2_PACKAGE_FONTCONFIG),y) +WINE_CONF_OPTS += --with-fontconfig +WINE_DEPENDENCIES += fontconfig +else +WINE_CONF_OPTS += --without-fontconfig +endif + +# To support freetype in wine we also need freetype in host-wine for the cross compiling tools +ifeq ($(BR2_PACKAGE_FREETYPE),y) +WINE_CONF_OPTS += --with-freetype +HOST_WINE_CONF_OPTS += --with-freetype +WINE_DEPENDENCIES += freetype +HOST_WINE_DEPENDENCIES += host-freetype +WINE_CONF_ENV += FREETYPE_CONFIG=$(STAGING_DIR)/usr/bin/freetype-config +else +WINE_CONF_OPTS += --without-freetype +HOST_WINE_CONF_OPTS += --without-freetype +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +WINE_CONF_OPTS += --with-gnutls +WINE_DEPENDENCIES += gnutls +else +WINE_CONF_OPTS += --without-gnutls +endif + +ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE),y) +WINE_CONF_OPTS += --with-gstreamer +WINE_DEPENDENCIES += gst-plugins-base +else +WINE_CONF_OPTS += --without-gstreamer +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +WINE_CONF_OPTS += --with-jpeg +WINE_DEPENDENCIES += jpeg +else +WINE_CONF_OPTS += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_LCMS2),y) +WINE_CONF_OPTS += --with-cms +WINE_DEPENDENCIES += lcms2 +else +WINE_CONF_OPTS += --without-cms +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) +WINE_CONF_OPTS += --with-opengl +WINE_DEPENDENCIES += libgl +else +WINE_CONF_OPTS += --without-opengl +endif + +ifeq ($(BR2_PACKAGE_LIBGLU),y) +WINE_CONF_OPTS += --with-glu +WINE_DEPENDENCIES += libglu +else +WINE_CONF_OPTS += --without-glu +endif + +ifeq ($(BR2_PACKAGE_LIBPCAP),y) +WINE_CONF_OPTS += --with-pcap +WINE_DEPENDENCIES += libpcap +else +WINE_CONF_OPTS += --without-pcap +endif + +ifeq ($(BR2_PACKAGE_LIBPNG),y) +WINE_CONF_OPTS += --with-png +WINE_DEPENDENCIES += libpng +else +WINE_CONF_OPTS += --without-png +endif + +ifeq ($(BR2_PACKAGE_LIBV4L),y) +WINE_CONF_OPTS += --with-v4l +WINE_DEPENDENCIES += libv4l +else +WINE_CONF_OPTS += --without-v4l +endif + +ifeq ($(BR2_PACKAGE_LIBXML2),y) +WINE_CONF_OPTS += --with-xml +WINE_DEPENDENCIES += libxml2 +WINE_CONF_ENV += XML2_CONFIG=$(STAGING_DIR)/usr/bin/xml2-config +else +WINE_CONF_OPTS += --without-xml +endif + +ifeq ($(BR2_PACKAGE_LIBXSLT),y) +WINE_CONF_OPTS += --with-xslt +WINE_DEPENDENCIES += libxslt +WINE_CONF_ENV += XSLT_CONFIG=$(STAGING_DIR)/usr/bin/xslt-config +else +WINE_CONF_OPTS += --without-xslt +endif + +ifeq ($(BR2_PACKAGE_MPG123),y) +WINE_CONF_OPTS += --with-mpg123 +WINE_DEPENDENCIES += mpg123 +else +WINE_CONF_OPTS += --without-mpg123 +endif + +ifeq ($(BR2_PACKAGE_NCURSES),y) +WINE_CONF_OPTS += --with-curses +WINE_DEPENDENCIES += ncurses +else +WINE_CONF_OPTS += --without-curses +endif + +ifeq ($(BR2_PACKAGE_OPENAL),y) +WINE_CONF_OPTS += --with-openal +WINE_DEPENDENCIES += openal +else +WINE_CONF_OPTS += --without-openal +endif + +ifeq ($(BR2_PACKAGE_OPENLDAP),y) +WINE_CONF_OPTS += --with-ldap +WINE_DEPENDENCIES += openldap +else +WINE_CONF_OPTS += --without-ldap +endif + +ifeq ($(BR2_PACKAGE_MESA3D_OSMESA),y) +WINE_CONF_OPTS += --with-osmesa +WINE_DEPENDENCIES += mesa3d +else +WINE_CONF_OPTS += --without-osmesa +endif + +ifeq ($(BR2_PACKAGE_PULSEAUDIO),y) +WINE_CONF_OPTS += --with-pulse +WINE_DEPENDENCIES += pulseaudio +else +WINE_CONF_OPTS += --without-pulse +endif + +ifeq ($(BR2_PACKAGE_SAMBA4),y) +WINE_CONF_OPTS += --with-netapi +WINE_DEPENDENCIES += samba4 +else +WINE_CONF_OPTS += --without-netapi +endif + +ifeq ($(BR2_PACKAGE_SANE_BACKENDS),y) +WINE_CONF_OPTS += --with-sane +WINE_DEPENDENCIES += sane-backends +WINE_CONF_ENV += SANE_CONFIG=$(STAGING_DIR)/usr/bin/sane-config +else +WINE_CONF_OPTS += --without-sane +endif + +ifeq ($(BR2_PACKAGE_TIFF),y) +WINE_CONF_OPTS += --with-tiff +WINE_DEPENDENCIES += tiff +else +WINE_CONF_OPTS += --without-tiff +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) +WINE_CONF_OPTS += --with-x +WINE_DEPENDENCIES += xlib_libX11 +else +WINE_CONF_OPTS += --without-x +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y) +WINE_CONF_OPTS += --with-xcomposite +WINE_DEPENDENCIES += xlib_libXcomposite +else +WINE_CONF_OPTS += --without-xcomposite +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y) +WINE_CONF_OPTS += --with-xcursor +WINE_DEPENDENCIES += xlib_libXcursor +else +WINE_CONF_OPTS += --without-xcursor +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXEXT),y) +WINE_CONF_OPTS += --with-xshape --with-xshm +WINE_DEPENDENCIES += xlib_libXext +else +WINE_CONF_OPTS += --without-xshape --without-xshm +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y) +WINE_CONF_OPTS += --with-xinput --with-xinput2 +WINE_DEPENDENCIES += xlib_libXi +else +WINE_CONF_OPTS += --without-xinput --without-xinput2 +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +WINE_CONF_OPTS += --with-xinerama +WINE_DEPENDENCIES += xlib_libXinerama +else +WINE_CONF_OPTS += --without-xinerama +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +WINE_CONF_OPTS += --with-xrandr +WINE_DEPENDENCIES += xlib_libXrandr +else +WINE_CONF_OPTS += --without-xrandr +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRENDER),y) +WINE_CONF_OPTS += --with-xrender +WINE_DEPENDENCIES += xlib_libXrender +else +WINE_CONF_OPTS += --without-xrender +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86VM),y) +WINE_CONF_OPTS += --with-xxf86vm +WINE_DEPENDENCIES += xlib_libXxf86vm +else +WINE_CONF_OPTS += --without-xxf86vm +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +WINE_CONF_OPTS += --with-zlib +WINE_DEPENDENCIES += zlib +else +WINE_CONF_OPTS += --without-zlib +endif + +# host-gettext is essential for .po file support in host-wine wrc +HOST_WINE_DEPENDENCIES += host-gettext +HOST_WINE_CONF_OPTS += --with-gettext --with-gettextpo + +# Wine needs to enable 64-bit build tools on 64-bit host +ifeq ($(HOSTARCH),x86_64) +HOST_WINE_CONF_OPTS += --enable-win64 +endif + +# Wine only needs the host tools to be built, so cut-down the +# build time by building just what we need. +define HOST_WINE_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) \ + tools \ + tools/sfnt2fon \ + tools/widl \ + tools/winebuild \ + tools/winegcc \ + tools/wmc \ + tools/wrc +endef + +# Wine only needs its host variant to be built, not that it is +# installed, as it uses the tools from the build directory. But +# we have no way in Buildroot to state that a host package should +# not be installed. So, just provide an noop install command. +define HOST_WINE_INSTALL_CMDS + : +endef + +# We are focused on the cross compiling tools, disable everything else +HOST_WINE_CONF_OPTS += \ + --disable-tests \ + --disable-win16 \ + --without-alsa \ + --without-capi \ + --without-cms \ + --without-coreaudio \ + --without-cups \ + --without-curses \ + --without-dbus \ + --without-fontconfig \ + --without-gphoto \ + --without-glu \ + --without-gnutls \ + --without-gsm \ + --without-gstreamer \ + --without-hal \ + --without-jpeg \ + --without-ldap \ + --without-mpg123 \ + --without-netapi \ + --without-openal \ + --without-opencl \ + --without-opengl \ + --without-osmesa \ + --without-oss \ + --without-pcap \ + --without-pulse \ + --without-png \ + --without-sane \ + --without-tiff \ + --without-v4l \ + --without-x \ + --without-xcomposite \ + --without-xcursor \ + --without-xinerama \ + --without-xinput \ + --without-xinput2 \ + --without-xml \ + --without-xrandr \ + --without-xrender \ + --without-xshape \ + --without-xshm \ + --without-xslt \ + --without-xxf86vm \ + --without-zlib + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/wipe/0001-musl.patch b/package/wipe/0001-musl.patch new file mode 100644 index 0000000000..35b3af80ff --- /dev/null +++ b/package/wipe/0001-musl.patch @@ -0,0 +1,28 @@ +Fix musl build + +In file included from main.c:46:0: +rand.h:31:9: error: unknown type name ‘u_int32_t’ + typedef u_int32_t u_rand_t; + ^ +: recipe for target 'main.o' failed + +Patch sent upstream: https://sourceforge.net/p/wipe/patches/4/ + +Signed-off-by: Bernd Kuhls + +diff -uNr wipe-2.3.1.org/rand.h wipe-2.3.1/rand.h +--- wipe-2.3.1.org/rand.h 2003-12-03 04:01:02.000000000 +0100 ++++ wipe-2.3.1/rand.h 2016-01-31 21:39:54.000000000 +0100 +@@ -22,10 +22,9 @@ + + #ifdef HAVE_STDINT_H + # include "stdint.h" +-#else +-# ifndef LINUX ++#endif ++#if !defined(u_int32_t) + # define u_int32_t uint32_t +-# endif + #endif + + typedef u_int32_t u_rand_t; diff --git a/package/wipe/Config.in b/package/wipe/Config.in new file mode 100644 index 0000000000..0241c13715 --- /dev/null +++ b/package/wipe/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_WIPE + bool "wipe" + help + Wipe is a little command for securely erasing files + from magnetic media. It compiles under various unix platforms. + + http://wipe.sourceforge.net diff --git a/package/wipe/wipe.hash b/package/wipe/wipe.hash new file mode 100644 index 0000000000..9bde2014dd --- /dev/null +++ b/package/wipe/wipe.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 463916370f9b35bb34419c2c0ae3dc4c0a471db32e8595afa1d14c0337b61aa0 wipe-2.3.1.tar.bz2 diff --git a/package/wipe/wipe.mk b/package/wipe/wipe.mk new file mode 100644 index 0000000000..9ec7faf6d7 --- /dev/null +++ b/package/wipe/wipe.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# wipe +# +################################################################################ + +WIPE_VERSION = 2.3.1 +WIPE_SITE = http://downloads.sourceforge.net/project/wipe/wipe/$(WIPE_VERSION) +WIPE_SOURCE = wipe-$(WIPE_VERSION).tar.bz2 +WIPE_LICENSE = GPLv2+ +WIPE_LICENSE_FILES = LICENSE + +define WIPE_INSTALL_TARGET_CMDS + $(INSTALL) -D -m 0755 $(@D)/wipe $(TARGET_DIR)/usr/bin/wipe +endef + +$(eval $(autotools-package)) diff --git a/package/wireless-regdb/Config.in b/package/wireless-regdb/Config.in new file mode 100644 index 0000000000..d9c7b8d2d1 --- /dev/null +++ b/package/wireless-regdb/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_WIRELESS_REGDB + bool "wireless-regdb" + help + Wireless regulatory database. + + Wireless regulatory database for CRDA. The database lists the + allowed radio frequencies for each local jurisdiction. + + http://linuxwireless.org/en/developers/Regulatory diff --git a/package/wireless-regdb/wireless-regdb.hash b/package/wireless-regdb/wireless-regdb.hash new file mode 100644 index 0000000000..44b2e41393 --- /dev/null +++ b/package/wireless-regdb/wireless-regdb.hash @@ -0,0 +1,2 @@ +# From https://www.kernel.org/pub/software/network/wireless-regdb/sha256sums.asc +sha256 c9674c988a944105148091b74c05c6fa6bd9611b9bbab6b81abfb5e5387bc61e wireless-regdb-2016.05.02.tar.xz diff --git a/package/wireless-regdb/wireless-regdb.mk b/package/wireless-regdb/wireless-regdb.mk new file mode 100644 index 0000000000..49bcb3250f --- /dev/null +++ b/package/wireless-regdb/wireless-regdb.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# wireless-regdb +# +################################################################################ + +WIRELESS_REGDB_VERSION = 2016.05.02 +WIRELESS_REGDB_SOURCE = wireless-regdb-$(WIRELESS_REGDB_VERSION).tar.xz +WIRELESS_REGDB_SITE = http://kernel.org/pub/software/network/wireless-regdb +WIRELESS_REGDB_LICENSE = ISC +WIRELESS_REGDB_LICENSE_FILES = LICENSE + +define WIRELESS_REGDB_INSTALL_TARGET_CMDS + $(INSTALL) -m 644 -D -T $(@D)/regulatory.bin \ + $(TARGET_DIR)/usr/lib/crda/regulatory.bin + $(INSTALL) -m 644 -D -T $(@D)/sforshee.key.pub.pem \ + $(TARGET_DIR)/etc/wireless-regdb/pubkeys/sforshee.key.pub.pem +endef + +$(eval $(generic-package)) diff --git a/package/wireless_tools/0001-remove-bzero.patch b/package/wireless_tools/0001-remove-bzero.patch new file mode 100644 index 0000000000..53ef588675 --- /dev/null +++ b/package/wireless_tools/0001-remove-bzero.patch @@ -0,0 +1,95 @@ +Switch all instances of deprecated bzero() to memset() equivalent. + +Signed-off-by: Gustavo Zacarias + +diff -Nura wireless_tools.30/ifrename.c wireless_tools.30-bzero/ifrename.c +--- wireless_tools.30/ifrename.c 2007-10-16 20:12:41.000000000 -0300 ++++ wireless_tools.30-bzero/ifrename.c 2014-06-11 09:52:59.623741119 -0300 +@@ -541,7 +541,7 @@ + victimname, autoname); + + /* Prepare request */ +- bzero(&ifr, sizeof(struct ifreq)); ++ memset(&ifr, 0, sizeof(struct ifreq)); + strncpy(ifr.ifr_name, victimname, IFNAMSIZ); + strncpy(ifr.ifr_newname, autoname, IFNAMSIZ); + +@@ -587,7 +587,7 @@ + } + + /* Prepare request */ +- bzero(&ifr, sizeof(struct ifreq)); ++ memset(&ifr, 0, sizeof(struct ifreq)); + strncpy(ifr.ifr_name, oldname, IFNAMSIZ); + strncpy(ifr.ifr_newname, newname, IFNAMSIZ); + +@@ -747,7 +747,7 @@ + int i; + + /* Get MAC address */ +- bzero(&ifr, sizeof(struct ifreq)); ++ memset(&ifr, 0, sizeof(struct ifreq)); + strncpy(ifr.ifr_name, ifname, IFNAMSIZ); + ret = ioctl(skfd, SIOCGIFHWADDR, &ifr); + if(ret < 0) +@@ -1040,8 +1040,8 @@ + return(0); + + /* Prepare request */ +- bzero(&ifr, sizeof(struct ifreq)); +- bzero(&drvinfo, sizeof(struct ethtool_drvinfo)); ++ memset(&ifr, 0, sizeof(struct ifreq)); ++ memset(&drvinfo, 0, sizeof(struct ethtool_drvinfo)); + strncpy(ifr.ifr_name, ifname, IFNAMSIZ); + drvinfo.cmd = ETHTOOL_GDRVINFO; + ifr.ifr_data = (caddr_t) &drvinfo; +@@ -1206,8 +1206,8 @@ + return(0); + + /* Prepare request */ +- bzero(&ifr, sizeof(struct ifreq)); +- bzero(&map, sizeof(struct ifmap)); ++ memset(&ifr, 0, sizeof(struct ifreq)); ++ memset(&map, 0, sizeof(struct ifmap)); + strncpy(ifr.ifr_name, ifname, IFNAMSIZ); + + /* Do it */ +@@ -2050,7 +2050,7 @@ + struct add_extra extrainfo; + + /* Reset the list of filters */ +- bzero(selector_active, sizeof(selector_active)); ++ memset(selector_active, 0, sizeof(selector_active)); + + /* Check filename */ + if(!strcmp(filename, "-")) +diff -Nura wireless_tools.30/iwlib.c wireless_tools.30-bzero/iwlib.c +--- wireless_tools.30/iwlib.c 2009-11-23 23:28:59.000000000 -0300 ++++ wireless_tools.30-bzero/iwlib.c 2014-06-11 09:50:20.611371384 -0300 +@@ -484,7 +484,7 @@ + union iw_range_raw * range_raw; + + /* Cleanup */ +- bzero(buffer, sizeof(buffer)); ++ memset(buffer, 0, sizeof(buffer)); + + wrq.u.data.pointer = (caddr_t) buffer; + wrq.u.data.length = sizeof(buffer); +@@ -513,7 +513,7 @@ + else + { + /* Zero unknown fields */ +- bzero((char *) range, sizeof(struct iw_range)); ++ memset((char *) range, 0, sizeof(struct iw_range)); + + /* Initial part unmoved */ + memcpy((char *) range, +@@ -3064,7 +3064,7 @@ + oldwscan->next = wscan; + + /* Reset it */ +- bzero(wscan, sizeof(struct wireless_scan)); ++ memset(wscan, 0, sizeof(struct wireless_scan)); + + /* Save cell identifier */ + wscan->has_ap_addr = 1; diff --git a/package/wireless_tools/Config.in b/package/wireless_tools/Config.in new file mode 100644 index 0000000000..e33af25b86 --- /dev/null +++ b/package/wireless_tools/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_WIRELESS_TOOLS + bool "wireless tools" + help + A collection of tools to configure wireless lan cards. + + http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html + +if BR2_PACKAGE_WIRELESS_TOOLS + +config BR2_PACKAGE_WIRELESS_TOOLS_LIB + bool "Install shared library" + depends on !BR2_STATIC_LIBS + help + The shared library of wireless tools + +endif diff --git a/package/wireless_tools/wireless_tools.hash b/package/wireless_tools/wireless_tools.hash new file mode 100644 index 0000000000..587c9772ef --- /dev/null +++ b/package/wireless_tools/wireless_tools.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 abd9c5c98abf1fdd11892ac2f8a56737544fe101e1be27c6241a564948f34c63 wireless_tools.30.pre9.tar.gz diff --git a/package/wireless_tools/wireless_tools.mk b/package/wireless_tools/wireless_tools.mk new file mode 100644 index 0000000000..5fb8f12e97 --- /dev/null +++ b/package/wireless_tools/wireless_tools.mk @@ -0,0 +1,40 @@ +################################################################################ +# +# wireless_tools +# +################################################################################ + +WIRELESS_TOOLS_VERSION_MAJOR = 30 +WIRELESS_TOOLS_VERSION = $(WIRELESS_TOOLS_VERSION_MAJOR).pre9 +WIRELESS_TOOLS_SITE = http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux +WIRELESS_TOOLS_SOURCE = wireless_tools.$(WIRELESS_TOOLS_VERSION).tar.gz +WIRELESS_TOOLS_LICENSE = GPLv2 +WIRELESS_TOOLS_LICENSE_FILES = COPYING +WIRELESS_TOOLS_INSTALL_STAGING = YES + +WIRELESS_TOOLS_BUILD_TARGETS = iwmulticall +WIRELESS_TOOLS_INSTALL_TARGETS = install-iwmulticall + + +ifeq ($(BR2_PACKAGE_WIRELESS_TOOLS_LIB),y) +WIRELESS_TOOLS_BUILD_TARGETS += libiw.so.$(WIRELESS_TOOLS_VERSION_MAJOR) +WIRELESS_TOOLS_INSTALL_TARGETS += install-dynamic + +define WIRELESS_TOOLS_INSTALL_STAGING_CMDS + $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)" LDCONFIG=/bin/true install-dynamic + $(MAKE) -C $(@D) PREFIX="$(STAGING_DIR)/usr" install-hdr +endef + +endif + +define WIRELESS_TOOLS_BUILD_CMDS + $(MAKE) -C $(@D) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \ + $(WIRELESS_TOOLS_BUILD_TARGETS) +endef + +define WIRELESS_TOOLS_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) PREFIX="$(TARGET_DIR)" LDCONFIG=/bin/true $(WIRELESS_TOOLS_INSTALL_TARGETS) + $(MAKE) -C $(@D) INSTALL_MAN="$(TARGET_DIR)/usr/share/man" install-man +endef + +$(eval $(generic-package)) diff --git a/package/wireshark/0001-configure-do-not-assume-broken-inet_pton-in-case-of-.patch b/package/wireshark/0001-configure-do-not-assume-broken-inet_pton-in-case-of-.patch new file mode 100644 index 0000000000..4d1f680a51 --- /dev/null +++ b/package/wireshark/0001-configure-do-not-assume-broken-inet_pton-in-case-of-.patch @@ -0,0 +1,32 @@ +From a0657feeb2b349ffda895a53e36ea5c992d871cf Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Sat, 31 Oct 2015 22:38:48 +0100 +Subject: [PATCH] configure: do not assume broken inet_pton in case of cross + compiling + +Patch configure.ac to not assume broken inet_pton in case of cross +compiling. + +Signed-off-by: Peter Seiderer +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index aec0548..d640e0c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2646,8 +2646,8 @@ int main() + #endif + }], [AC_MSG_RESULT(ok); + have_inet_pton=yes], [AC_MSG_RESULT(broken); +-have_inet_pton=no], [AC_MSG_RESULT(cross compiling, assume it is broken); +-have_inet_pton=no])], ++have_inet_pton=no], [AC_MSG_RESULT([cross compiling, assume it is broken... not here]); ++have_inet_pton=yes])], + have_inet_pton=no) + if test "$have_inet_pton" = no; then + INET_PTON_LO="inet_pton.lo" +-- +2.1.4 + diff --git a/package/wireshark/Config.in b/package/wireshark/Config.in new file mode 100644 index 0000000000..defeb4b3e4 --- /dev/null +++ b/package/wireshark/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_WIRESHARK + bool "wireshark" + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_USE_MMU # fork(), glib2 + depends on BR2_USE_WCHAR # glib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # glib2 + help + Network traffic sniffer and protocol decoder. + + http://www.wireshark.org + +comment "wireshark needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/wireshark/wireshark.hash b/package/wireshark/wireshark.hash new file mode 100644 index 0000000000..a9d4a29b9d --- /dev/null +++ b/package/wireshark/wireshark.hash @@ -0,0 +1,2 @@ +# From: https://www.wireshark.org/download/src/all-versions/SIGNATURES-2.0.3.txt +sha256 e196376e75fe21fdef41b4eaa27ce2e1b2b561e7f7b20328a8e96657cc4465fc wireshark-2.0.3.tar.bz2 diff --git a/package/wireshark/wireshark.mk b/package/wireshark/wireshark.mk new file mode 100644 index 0000000000..c7bf6c2939 --- /dev/null +++ b/package/wireshark/wireshark.mk @@ -0,0 +1,102 @@ +################################################################################ +# +# wireshark +# +################################################################################ + +WIRESHARK_VERSION = 2.0.3 +WIRESHARK_SOURCE = wireshark-$(WIRESHARK_VERSION).tar.bz2 +WIRESHARK_SITE = http://www.wireshark.org/download/src/all-versions +WIRESHARK_LICENSE = wireshark license +WIRESHARK_LICENSE_FILES = COPYING +WIRESHARK_DEPENDENCIES = host-pkgconf libpcap libglib2 +WIRESHARK_CONF_ENV = \ + ac_cv_path_PCAP_CONFIG=$(STAGING_DIR)/usr/bin/pcap-config + +# patch touching configure.ac +WIRESHARK_AUTORECONF = YES + +# wireshark adds -I$includedir to CFLAGS, causing host/target headers mixup. +# Work around it by pointing includedir at staging +WIRESHARK_CONF_OPTS = \ + --without-krb5 \ + --disable-usr-local \ + --enable-static=no \ + --with-libsmi=no \ + --with-lua=no \ + --with-pcap=$(STAGING_DIR)/usr \ + --includedir=$(STAGING_DIR)/usr/include + +# wireshark GUI options +ifeq ($(BR2_PACKAGE_LIBGTK3),y) +WIRESHARK_CONF_OPTS += --with-gtk3=yes +WIRESHARK_DEPENDENCIES += libgtk3 +else ifeq ($(BR2_PACKAGE_LIBGTK2),y) +WIRESHARK_CONF_OPTS += --with-gtk2=yes +WIRESHARK_DEPENDECIES += libgtk2 +else +WIRESHARK_CONF_OPTS += --with-gtk3=no --with-gtk2=no +endif + +# Qt4 needs accessibility, we don't support it +ifeq ($(BR2_PACKAGE_QT5BASE_WIDGETS),y) +WIRESHARK_CONF_OPTS += --with-qt=5 +WIRESHARK_DEPENDENCIES += qt5base +# Seems it expects wrappers and passes a -qt=X parameter for version +WIRESHARK_MAKE_OPTS += \ + MOC="$(HOST_DIR)/usr/bin/moc" \ + RCC="$(HOST_DIR)/usr/bin/rcc" \ + UIC="$(HOST_DIR)/usr/bin/uic" +else +WIRESHARK_CONF_OPTS += --with-qt=no +endif + +# No GUI at all +ifeq ($(BR2_PACKAGE_LIBGTK2)$(BR2_PACKAGE_LIBGTK3)$(BR2_PACKAGE_QT5BASE_WIDGETS),) +WIRESHARK_CONF_OPTS += --disable-wireshark +endif + +ifeq ($(BR2_PACKAGE_C_ARES),y) +WIRESHARK_CONF_OPTS += --with-c-ares=$(STAGING_DIR)/usr +WIRESHARK_DEPENDENCIES += c-ares +else +WIREHARK_CONF_OPTS += --without-c-ares +endif + +ifeq ($(BR2_PACKAGE_GEOIP),y) +WIRESHARK_CONF_OPTS += --with-geoip=$(STAGING_DIR)/usr +WIRESHARK_DEPENDENCIES += geoip +else +WIRESHARK_CONF_OPTS += --without-geoip +endif + +ifeq ($(BR2_PACKAGE_GNUTLS),y) +WIRESHARK_CONF_OPTS += --with-gnutls=yes +WIRESHARK_DEPENDENCIES += gnutls +else +WIRESHARK_CONF_OPTS += --with-gnutls=no +endif + +ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +WIRESHARK_CONF_ENV = LIBGCRYPT_CONFIG=$(STAGING_DIR)/usr/bin/libgcrypt-config +WIRESHARK_CONF_OPTS += --with-gcrypt=yes +WIRESHARK_DEPENDENCIES += libgcrypt +else +WIRESHARK_CONF_OPTS += --with-gcrypt=no +endif + +ifeq ($(BR2_PACKAGE_LIBNL),y) +WIRESHARK_CONF_OPTS += --with-libnl +WIRESHARK_DEPENDENCIES += libnl +else +WIRESHARK_CONF_OPTS += --without-libnl +endif + +ifeq ($(BR2_PACKAGE_SBC),y) +WIRESHARK_CONF_OPTS += --with-sbc=yes +WIRESHARK_DEPENDENCIES += sbc +else +WIRESHARK_CONF_OPTS += --with-sbc=no +endif + +$(eval $(autotools-package)) diff --git a/package/wmctrl/Config.in b/package/wmctrl/Config.in new file mode 100644 index 0000000000..bc09431ed4 --- /dev/null +++ b/package/wmctrl/Config.in @@ -0,0 +1,24 @@ +config BR2_PACKAGE_WMCTRL + bool "wmctrl" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_LIBGLIB2 + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_WCHAR # libglib2 + depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2 + depends on BR2_USE_MMU # libglib2 + help + Provides command line access to almost all the features + defined in the EWMH specification. It can be used, for + example, to get information about the window manager, to get + a detailed list of desktops and managed windows, to switch + and resize desktops, to make windows full-screen, + always-above or sticky, and to activate, close, move, + resize, maximize and minimize them. + + https://sites.google.com/site/tstyblo/wmctrl/ + +comment "wmctrl needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on BR2_PACKAGE_XORG7 + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/wmctrl/wmctrl.hash b/package/wmctrl/wmctrl.hash new file mode 100644 index 0000000000..a08c0e9e04 --- /dev/null +++ b/package/wmctrl/wmctrl.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 d78a1efdb62f18674298ad039c5cbdb1edb6e8e149bb3a8e3a01a4750aa3cca9 wmctrl-1.07.tar.gz diff --git a/package/wmctrl/wmctrl.mk b/package/wmctrl/wmctrl.mk new file mode 100644 index 0000000000..f26b23e160 --- /dev/null +++ b/package/wmctrl/wmctrl.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# wmctrl +# +################################################################################ + +WMCTRL_VERSION = 1.07 +WMCTRL_SITE = https://sites.google.com/site/tstyblo/wmctrl +WMCTRL_LICENSE = GPLv2+ +WMCTRL_LICENSE_FILES = COPYING + +WMCTRL_DEPENDENCIES = libglib2 xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/wpa_supplicant/0001-fix-readline-libs-ordering.patch b/package/wpa_supplicant/0001-fix-readline-libs-ordering.patch new file mode 100644 index 0000000000..2a9b832797 --- /dev/null +++ b/package/wpa_supplicant/0001-fix-readline-libs-ordering.patch @@ -0,0 +1,26 @@ +commit 631f0893038743cebd2def39df61aceb48bd43a9 +Author: David du Colombier <0intro@gmail.com> +Date: Sun Sep 13 23:40:43 2015 +0200 + + wpa_supplicant: fix static link with readline + + The readline library depends on ncurses, so + it should be set before ncurses on the linker + command line to be able to be statically linked + successfully. + + Signed-off-by: David du Colombier <0intro@gmail.com> + +diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile +index 1597412..581db02 100644 +--- a/wpa_supplicant/Makefile ++++ b/wpa_supplicant/Makefile +@@ -1408,7 +1408,7 @@ LIBS += $(DBUS_LIBS) + + ifdef CONFIG_READLINE + OBJS_c += ../src/utils/edit_readline.o +-LIBS_c += -lncurses -lreadline ++LIBS_c += -lreadline -lncurses + else + ifdef CONFIG_WPA_CLI_EDIT + OBJS_c += ../src/utils/edit.o diff --git a/package/wpa_supplicant/0002-WNM-Ignore-Key-Data-in-WNM-Sleep-Mode-Response-frame.patch b/package/wpa_supplicant/0002-WNM-Ignore-Key-Data-in-WNM-Sleep-Mode-Response-frame.patch new file mode 100644 index 0000000000..00e5b7c771 --- /dev/null +++ b/package/wpa_supplicant/0002-WNM-Ignore-Key-Data-in-WNM-Sleep-Mode-Response-frame.patch @@ -0,0 +1,32 @@ +From 6b12d93d2c7428a34bfd4b3813ba339ed57b698a Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Sun, 25 Oct 2015 15:45:50 +0200 +Subject: [PATCH] WNM: Ignore Key Data in WNM Sleep Mode Response frame if no + PMF in use + +WNM Sleep Mode Response frame is used to update GTK/IGTK only if PMF is +enabled. Verify that PMF is in use before using this field on station +side to avoid accepting unauthenticated key updates. (CVE-2015-5310) + +Signed-off-by: Jouni Malinen +--- + wpa_supplicant/wnm_sta.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c +index 954de67..7d79499 100644 +--- a/wpa_supplicant/wnm_sta.c ++++ b/wpa_supplicant/wnm_sta.c +@@ -187,6 +187,12 @@ static void wnm_sleep_mode_exit_success(struct wpa_supplicant *wpa_s, + end = ptr + key_len_total; + wpa_hexdump_key(MSG_DEBUG, "WNM: Key Data", ptr, key_len_total); + ++ if (key_len_total && !wpa_sm_pmf_enabled(wpa_s->wpa)) { ++ wpa_msg(wpa_s, MSG_INFO, ++ "WNM: Ignore Key Data in WNM-Sleep Mode Response - PMF not enabled"); ++ return; ++ } ++ + while (ptr + 1 < end) { + if (ptr + 2 + ptr[1] > end) { + wpa_printf(MSG_DEBUG, "WNM: Invalid Key Data element " diff --git a/package/wpa_supplicant/0003-EAP-pwd-peer-Fix-last-fragment-length-validation.patch b/package/wpa_supplicant/0003-EAP-pwd-peer-Fix-last-fragment-length-validation.patch new file mode 100644 index 0000000000..82c26398b6 --- /dev/null +++ b/package/wpa_supplicant/0003-EAP-pwd-peer-Fix-last-fragment-length-validation.patch @@ -0,0 +1,54 @@ +From 8057821706784608b828e769ccefbced95591e50 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Sun, 1 Nov 2015 18:18:17 +0200 +Subject: [PATCH] EAP-pwd peer: Fix last fragment length validation + +All but the last fragment had their length checked against the remaining +room in the reassembly buffer. This allowed a suitably constructed last +fragment frame to try to add extra data that would go beyond the buffer. +The length validation code in wpabuf_put_data() prevents an actual +buffer write overflow from occurring, but this results in process +termination. (CVE-2015-5315) + +Signed-off-by: Jouni Malinen +--- + src/eap_peer/eap_pwd.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index 1f78544..75ceef1 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -903,7 +903,7 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + /* + * buffer and ACK the fragment + */ +- if (EAP_PWD_GET_MORE_BIT(lm_exch)) { ++ if (EAP_PWD_GET_MORE_BIT(lm_exch) || data->in_frag_pos) { + data->in_frag_pos += len; + if (data->in_frag_pos > wpabuf_size(data->inbuf)) { + wpa_printf(MSG_INFO, "EAP-pwd: Buffer overflow attack " +@@ -916,7 +916,8 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + return NULL; + } + wpabuf_put_data(data->inbuf, pos, len); +- ++ } ++ if (EAP_PWD_GET_MORE_BIT(lm_exch)) { + resp = eap_msg_alloc(EAP_VENDOR_IETF, EAP_TYPE_PWD, + EAP_PWD_HDR_SIZE, + EAP_CODE_RESPONSE, eap_get_id(reqData)); +@@ -930,10 +931,8 @@ eap_pwd_process(struct eap_sm *sm, void *priv, struct eap_method_ret *ret, + * we're buffering and this is the last fragment + */ + if (data->in_frag_pos) { +- wpabuf_put_data(data->inbuf, pos, len); + wpa_printf(MSG_DEBUG, "EAP-pwd: Last fragment, %d bytes", + (int) len); +- data->in_frag_pos += len; + pos = wpabuf_head_u8(data->inbuf); + len = data->in_frag_pos; + } +-- +1.9.1 + diff --git a/package/wpa_supplicant/0004-EAP-pwd-server-Fix-last-fragment-length-validation.patch b/package/wpa_supplicant/0004-EAP-pwd-server-Fix-last-fragment-length-validation.patch new file mode 100644 index 0000000000..bfc4c74e95 --- /dev/null +++ b/package/wpa_supplicant/0004-EAP-pwd-server-Fix-last-fragment-length-validation.patch @@ -0,0 +1,51 @@ +From bef802ece03f9ae9d52a21f0cf4f1bc2c5a1f8aa Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Sun, 1 Nov 2015 18:24:16 +0200 +Subject: [PATCH] EAP-pwd server: Fix last fragment length validation + +All but the last fragment had their length checked against the remaining +room in the reassembly buffer. This allowed a suitably constructed last +fragment frame to try to add extra data that would go beyond the buffer. +The length validation code in wpabuf_put_data() prevents an actual +buffer write overflow from occurring, but this results in process +termination. (CVE-2015-5314) + +Signed-off-by: Jouni Malinen +--- + src/eap_server/eap_server_pwd.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/eap_server/eap_server_pwd.c b/src/eap_server/eap_server_pwd.c +index cb83ff7..9f787ab 100644 +--- a/src/eap_server/eap_server_pwd.c ++++ b/src/eap_server/eap_server_pwd.c +@@ -970,7 +970,7 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv, + /* + * the first and all intermediate fragments have the M bit set + */ +- if (EAP_PWD_GET_MORE_BIT(lm_exch)) { ++ if (EAP_PWD_GET_MORE_BIT(lm_exch) || data->in_frag_pos) { + if ((data->in_frag_pos + len) > wpabuf_size(data->inbuf)) { + wpa_printf(MSG_DEBUG, "EAP-pwd: Buffer overflow " + "attack detected! (%d+%d > %d)", +@@ -981,6 +981,8 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv, + } + wpabuf_put_data(data->inbuf, pos, len); + data->in_frag_pos += len; ++ } ++ if (EAP_PWD_GET_MORE_BIT(lm_exch)) { + wpa_printf(MSG_DEBUG, "EAP-pwd: Got a %d byte fragment", + (int) len); + return; +@@ -990,8 +992,6 @@ static void eap_pwd_process(struct eap_sm *sm, void *priv, + * buffering fragments so that's how we know it's the last) + */ + if (data->in_frag_pos) { +- wpabuf_put_data(data->inbuf, pos, len); +- data->in_frag_pos += len; + pos = wpabuf_head_u8(data->inbuf); + len = data->in_frag_pos; + wpa_printf(MSG_DEBUG, "EAP-pwd: Last fragment, %d bytes", +-- +1.9.1 + diff --git a/package/wpa_supplicant/0005-EAP-pwd-peer-Fix-error-path-for-unexpected-Confirm-m.patch b/package/wpa_supplicant/0005-EAP-pwd-peer-Fix-error-path-for-unexpected-Confirm-m.patch new file mode 100644 index 0000000000..3088f6a6dc --- /dev/null +++ b/package/wpa_supplicant/0005-EAP-pwd-peer-Fix-error-path-for-unexpected-Confirm-m.patch @@ -0,0 +1,34 @@ +From 95577884ca4fa76be91344ff7a8d5d1e6dc3da61 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Sun, 1 Nov 2015 19:35:44 +0200 +Subject: [PATCH] EAP-pwd peer: Fix error path for unexpected Confirm message + +If the Confirm message is received from the server before the Identity +exchange has been completed, the group has not yet been determined and +data->grp is NULL. The error path in eap_pwd_perform_confirm_exchange() +did not take this corner case into account and could end up +dereferencing a NULL pointer and terminating the process if invalid +message sequence is received. (CVE-2015-5316) + +Signed-off-by: Jouni Malinen +--- + src/eap_peer/eap_pwd.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/eap_peer/eap_pwd.c b/src/eap_peer/eap_pwd.c +index 75ceef1..892b590 100644 +--- a/src/eap_peer/eap_pwd.c ++++ b/src/eap_peer/eap_pwd.c +@@ -774,7 +774,8 @@ eap_pwd_perform_confirm_exchange(struct eap_sm *sm, struct eap_pwd_data *data, + wpabuf_put_data(data->outbuf, conf, SHA256_MAC_LEN); + + fin: +- bin_clear_free(cruft, BN_num_bytes(data->grp->prime)); ++ if (data->grp) ++ bin_clear_free(cruft, BN_num_bytes(data->grp->prime)); + BN_clear_free(x); + BN_clear_free(y); + if (data->outbuf == NULL) { +-- +1.9.1 + diff --git a/package/wpa_supplicant/0006-fix-libwpa_client.patch b/package/wpa_supplicant/0006-fix-libwpa_client.patch new file mode 100644 index 0000000000..11c5402374 --- /dev/null +++ b/package/wpa_supplicant/0006-fix-libwpa_client.patch @@ -0,0 +1,39 @@ +From 6f7e0354a9035ce33742a5f869f817a6b39b2f31 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Thu, 29 Oct 2015 11:39:03 +0100 +Subject: [PATCH 1/1] wpa_supplicant/Makefile: fix libwpa_client +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Building libwpa_client requires src/utils/common.c for bin_clear_free() else +loading the library fails with: + + Error relocating /usr/lib/libwpa_client.so: bin_clear_free: symbol not found + +Backported from: 736b7cb2daf877a0cb9ad42ff15a2efbbd65fa42 + +Signed-off-by: Jörg Krause +--- + wpa_supplicant/Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile +index 61f8f18..0c444b0 100644 +--- a/wpa_supplicant/Makefile ++++ b/wpa_supplicant/Makefile +@@ -1706,9 +1706,11 @@ wpa_cli: $(OBJS_c) + + LIBCTRL += ../src/common/wpa_ctrl.o + LIBCTRL += ../src/utils/os_$(CONFIG_OS).o ++LIBCTRL += ../src/utils/common.c + LIBCTRL += ../src/utils/wpa_debug.o + LIBCTRLSO += ../src/common/wpa_ctrl.c + LIBCTRLSO += ../src/utils/os_$(CONFIG_OS).c ++LIBCTRLSO += ../src/utils/common.c + LIBCTRLSO += ../src/utils/wpa_debug.c + + libwpa_client.a: $(LIBCTRL) +-- +2.6.2 + diff --git a/package/wpa_supplicant/0007-systemd-Update-service-files-according-to-dbus-inter.patch b/package/wpa_supplicant/0007-systemd-Update-service-files-according-to-dbus-inter.patch new file mode 100644 index 0000000000..59c54506eb --- /dev/null +++ b/package/wpa_supplicant/0007-systemd-Update-service-files-according-to-dbus-inter.patch @@ -0,0 +1,77 @@ +From b6cea24d6191d9ccdcd1ac38a5322e3da73218db Mon Sep 17 00:00:00 2001 +From: Marcin Niestroj +Date: Mon, 11 Apr 2016 13:23:54 +0200 +Subject: [PATCH] systemd: Update service files according to dbus interface + version used + +systemd service files were supplied with old DBus bus name. After +service activation systemd was waiting for appearance of specified bus +name to consider it started successfully. However, if wpa_supplicant was +compiled only with new dbus interface name, then systemd didn't notice +configured (old) DBus bus name appearance. In the end service was +considered malfunctioning and it was deactivated. + +Update systemd service BusName property according to supported DBus +interface version. + +Signed-off-by: Marcin Niestroj +--- + wpa_supplicant/Makefile | 8 ++++++-- + wpa_supplicant/systemd/wpa_supplicant.service.in | 4 ++-- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile +index ad9ead9..fbd1b25 100644 +--- a/wpa_supplicant/Makefile ++++ b/wpa_supplicant/Makefile +@@ -1374,6 +1374,7 @@ ifndef DBUS_INCLUDE + DBUS_INCLUDE := $(shell $(PKG_CONFIG) --cflags dbus-1) + endif + DBUS_CFLAGS += $(DBUS_INCLUDE) ++DBUS_INTERFACE=fi.epitest.hostap.WPASupplicant + endif + + ifdef CONFIG_CTRL_IFACE_DBUS_NEW +@@ -1399,6 +1400,7 @@ DBUS_OBJS += dbus/dbus_new_introspect.o + DBUS_CFLAGS += -DCONFIG_CTRL_IFACE_DBUS_INTRO + endif + DBUS_CFLAGS += $(DBUS_INCLUDE) ++DBUS_INTERFACE=fi.w1.wpa_supplicant1 + endif + + ifdef DBUS +@@ -1760,11 +1762,13 @@ else + endif + + %.service: %.service.in +- $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@ ++ $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' \ ++ -e 's|\@DBUS_INTERFACE\@|$(DBUS_INTERFACE)|g' $< >$@ + @$(E) " sed" $< + + %@.service: %.service.arg.in +- $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@ ++ $(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' \ ++ -e 's|\@DBUS_INTERFACE\@|$(DBUS_INTERFACE)|g' $< >$@ + @$(E) " sed" $< + + wpa_supplicant.exe: wpa_supplicant +diff --git a/wpa_supplicant/systemd/wpa_supplicant.service.in b/wpa_supplicant/systemd/wpa_supplicant.service.in +index ea964ce..bc5d49a 100644 +--- a/wpa_supplicant/systemd/wpa_supplicant.service.in ++++ b/wpa_supplicant/systemd/wpa_supplicant.service.in +@@ -5,9 +5,9 @@ Wants=network.target + + [Service] + Type=dbus +-BusName=fi.epitest.hostap.WPASupplicant ++BusName=@DBUS_INTERFACE@ + ExecStart=@BINDIR@/wpa_supplicant -u + + [Install] + WantedBy=multi-user.target +-Alias=dbus-fi.epitest.hostap.WPASupplicant.service ++Alias=dbus-@DBUS_INTERFACE@.service +-- +2.8.0 + diff --git a/package/wpa_supplicant/0008-WPS-Reject-a-Credential-with-invalid-passphrase.patch b/package/wpa_supplicant/0008-WPS-Reject-a-Credential-with-invalid-passphrase.patch new file mode 100644 index 0000000000..282aa952b5 --- /dev/null +++ b/package/wpa_supplicant/0008-WPS-Reject-a-Credential-with-invalid-passphrase.patch @@ -0,0 +1,85 @@ +From ecbb0b3dc122b0d290987cf9c84010bbe53e1022 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Fri, 4 Mar 2016 17:20:18 +0200 +Subject: [PATCH] WPS: Reject a Credential with invalid passphrase + +WPA/WPA2-Personal passphrase is not allowed to include control +characters. Reject a Credential received from a WPS Registrar both as +STA (Credential) and AP (AP Settings) if the credential is for WPAPSK or +WPA2PSK authentication type and includes an invalid passphrase. + +This fixes an issue where hostapd or wpa_supplicant could have updated +the configuration file PSK/passphrase parameter with arbitrary data from +an external device (Registrar) that may not be fully trusted. Should +such data include a newline character, the resulting configuration file +could become invalid and fail to be parsed. + +Signed-off-by: Jouni Malinen +Signed-off-by: Baruch Siach +--- +Patch status: upstream (ecbb0b3dc122b0d290987cf9c84010bbe53e1022) + + src/utils/common.c | 12 ++++++++++++ + src/utils/common.h | 1 + + src/wps/wps_attr_process.c | 10 ++++++++++ + 3 files changed, 23 insertions(+) + +diff --git a/src/utils/common.c b/src/utils/common.c +index 450e2c6519ba..27b7c02de10b 100644 +--- a/src/utils/common.c ++++ b/src/utils/common.c +@@ -697,6 +697,18 @@ int is_hex(const u8 *data, size_t len) + } + + ++int has_ctrl_char(const u8 *data, size_t len) ++{ ++ size_t i; ++ ++ for (i = 0; i < len; i++) { ++ if (data[i] < 32 || data[i] == 127) ++ return 1; ++ } ++ return 0; ++} ++ ++ + size_t merge_byte_arrays(u8 *res, size_t res_len, + const u8 *src1, size_t src1_len, + const u8 *src2, size_t src2_len) +diff --git a/src/utils/common.h b/src/utils/common.h +index 701dbb236ed5..a97224070385 100644 +--- a/src/utils/common.h ++++ b/src/utils/common.h +@@ -488,6 +488,7 @@ const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len); + + char * wpa_config_parse_string(const char *value, size_t *len); + int is_hex(const u8 *data, size_t len); ++int has_ctrl_char(const u8 *data, size_t len); + size_t merge_byte_arrays(u8 *res, size_t res_len, + const u8 *src1, size_t src1_len, + const u8 *src2, size_t src2_len); +diff --git a/src/wps/wps_attr_process.c b/src/wps/wps_attr_process.c +index eadb22fe2e78..e8c4579309ab 100644 +--- a/src/wps/wps_attr_process.c ++++ b/src/wps/wps_attr_process.c +@@ -229,6 +229,16 @@ static int wps_workaround_cred_key(struct wps_credential *cred) + cred->key_len--; + #endif /* CONFIG_WPS_STRICT */ + } ++ ++ ++ if (cred->auth_type & (WPS_AUTH_WPAPSK | WPS_AUTH_WPA2PSK) && ++ (cred->key_len < 8 || has_ctrl_char(cred->key, cred->key_len))) { ++ wpa_printf(MSG_INFO, "WPS: Reject credential with invalid WPA/WPA2-Personal passphrase"); ++ wpa_hexdump_ascii_key(MSG_INFO, "WPS: Network Key", ++ cred->key, cred->key_len); ++ return -1; ++ } ++ + return 0; + } + +-- +2.8.1 + diff --git a/package/wpa_supplicant/0009-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch b/package/wpa_supplicant/0009-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch new file mode 100644 index 0000000000..316c0700ce --- /dev/null +++ b/package/wpa_supplicant/0009-Reject-psk-parameter-set-with-invalid-passphrase-cha.patch @@ -0,0 +1,53 @@ +From 73e4abb24a936014727924d8b0b2965edfc117dd Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Fri, 4 Mar 2016 18:46:41 +0200 +Subject: [PATCH] Reject psk parameter set with invalid passphrase character + +WPA/WPA2-Personal passphrase is not allowed to include control +characters. Reject a passphrase configuration attempt if that passphrase +includes an invalid passphrase. + +This fixes an issue where wpa_supplicant could have updated the +configuration file psk parameter with arbitrary data from the control +interface or D-Bus interface. While those interfaces are supposed to be +accessible only for trusted users/applications, it may be possible that +an untrusted user has access to a management software component that +does not validate the passphrase value before passing it to +wpa_supplicant. + +This could allow such an untrusted user to inject up to 63 characters of +almost arbitrary data into the configuration file. Such configuration +file could result in wpa_supplicant trying to load a library (e.g., +opensc_engine_path, pkcs11_engine_path, pkcs11_module_path, +load_dynamic_eap) from user controlled location when starting again. +This would allow code from that library to be executed under the +wpa_supplicant process privileges. + +Signed-off-by: Jouni Malinen +Signed-off-by: Baruch Siach +--- +Patch status: upstream (73e4abb24a936014727924d8b0b2965edfc117dd) + + wpa_supplicant/config.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c +index b1c7870dafe0..fdd964356afa 100644 +--- a/wpa_supplicant/config.c ++++ b/wpa_supplicant/config.c +@@ -478,6 +478,12 @@ static int wpa_config_parse_psk(const struct parse_data *data, + } + wpa_hexdump_ascii_key(MSG_MSGDUMP, "PSK (ASCII passphrase)", + (u8 *) value, len); ++ if (has_ctrl_char((u8 *) value, len)) { ++ wpa_printf(MSG_ERROR, ++ "Line %d: Invalid passphrase character", ++ line); ++ return -1; ++ } + if (ssid->passphrase && os_strlen(ssid->passphrase) == len && + os_memcmp(ssid->passphrase, value, len) == 0) { + /* No change to the previously configured value */ +-- +2.8.1 + diff --git a/package/wpa_supplicant/0010-Remove-newlines-from-wpa_supplicant-config-network-o.patch b/package/wpa_supplicant/0010-Remove-newlines-from-wpa_supplicant-config-network-o.patch new file mode 100644 index 0000000000..8a40dcecfe --- /dev/null +++ b/package/wpa_supplicant/0010-Remove-newlines-from-wpa_supplicant-config-network-o.patch @@ -0,0 +1,84 @@ +From 0fe5a234240a108b294a87174ad197f6b5cb38e9 Mon Sep 17 00:00:00 2001 +From: Paul Stewart +Date: Thu, 3 Mar 2016 15:40:19 -0800 +Subject: [PATCH] Remove newlines from wpa_supplicant config network output + +Spurious newlines output while writing the config file can corrupt the +wpa_supplicant configuration. Avoid writing these for the network block +parameters. This is a generic filter that cover cases that may not have +been explicitly addressed with a more specific commit to avoid control +characters in the psk parameter. + +Signed-off-by: Paul Stewart +Signed-off-by: Baruch Siach +--- +Patch status: upstream (0fe5a234240a108b294a87174ad197f6b5cb38e9) + + src/utils/common.c | 11 +++++++++++ + src/utils/common.h | 1 + + wpa_supplicant/config.c | 15 +++++++++++++-- + 3 files changed, 25 insertions(+), 2 deletions(-) + +diff --git a/src/utils/common.c b/src/utils/common.c +index 27b7c02de10b..9856463242c7 100644 +--- a/src/utils/common.c ++++ b/src/utils/common.c +@@ -709,6 +709,17 @@ int has_ctrl_char(const u8 *data, size_t len) + } + + ++int has_newline(const char *str) ++{ ++ while (*str) { ++ if (*str == '\n' || *str == '\r') ++ return 1; ++ str++; ++ } ++ return 0; ++} ++ ++ + size_t merge_byte_arrays(u8 *res, size_t res_len, + const u8 *src1, size_t src1_len, + const u8 *src2, size_t src2_len) +diff --git a/src/utils/common.h b/src/utils/common.h +index a97224070385..d19927b375bf 100644 +--- a/src/utils/common.h ++++ b/src/utils/common.h +@@ -489,6 +489,7 @@ const char * wpa_ssid_txt(const u8 *ssid, size_t ssid_len); + char * wpa_config_parse_string(const char *value, size_t *len); + int is_hex(const u8 *data, size_t len); + int has_ctrl_char(const u8 *data, size_t len); ++int has_newline(const char *str); + size_t merge_byte_arrays(u8 *res, size_t res_len, + const u8 *src1, size_t src1_len, + const u8 *src2, size_t src2_len); +diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c +index fdd964356afa..eb97cd5e4e6e 100644 +--- a/wpa_supplicant/config.c ++++ b/wpa_supplicant/config.c +@@ -2699,8 +2699,19 @@ char * wpa_config_get(struct wpa_ssid *ssid, const char *var) + + for (i = 0; i < NUM_SSID_FIELDS; i++) { + const struct parse_data *field = &ssid_fields[i]; +- if (os_strcmp(var, field->name) == 0) +- return field->writer(field, ssid); ++ if (os_strcmp(var, field->name) == 0) { ++ char *ret = field->writer(field, ssid); ++ ++ if (ret && has_newline(ret)) { ++ wpa_printf(MSG_ERROR, ++ "Found newline in value for %s; not returning it", ++ var); ++ os_free(ret); ++ ret = NULL; ++ } ++ ++ return ret; ++ } + } + + return NULL; +-- +2.8.1 + diff --git a/package/wpa_supplicant/0011-Reject-SET_CRED-commands-with-newline-characters-in-.patch b/package/wpa_supplicant/0011-Reject-SET_CRED-commands-with-newline-characters-in-.patch new file mode 100644 index 0000000000..530681faa4 --- /dev/null +++ b/package/wpa_supplicant/0011-Reject-SET_CRED-commands-with-newline-characters-in-.patch @@ -0,0 +1,65 @@ +From b166cd84a77a6717be9600bf95378a0055d6f5a5 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Tue, 5 Apr 2016 23:33:10 +0300 +Subject: [PATCH] Reject SET_CRED commands with newline characters in the + string values + +Most of the cred block parameters are written as strings without +filtering and if there is an embedded newline character in the value, +unexpected configuration file data might be written. + +This fixes an issue where wpa_supplicant could have updated the +configuration file cred parameter with arbitrary data from the control +interface or D-Bus interface. While those interfaces are supposed to be +accessible only for trusted users/applications, it may be possible that +an untrusted user has access to a management software component that +does not validate the credential value before passing it to +wpa_supplicant. + +This could allow such an untrusted user to inject almost arbitrary data +into the configuration file. Such configuration file could result in +wpa_supplicant trying to load a library (e.g., opensc_engine_path, +pkcs11_engine_path, pkcs11_module_path, load_dynamic_eap) from user +controlled location when starting again. This would allow code from that +library to be executed under the wpa_supplicant process privileges. + +Signed-off-by: Jouni Malinen +Signed-off-by: Baruch Siach +--- +Patch status: upstream (b166cd84a77a6717be9600bf95378a0055d6f5a5) + + wpa_supplicant/config.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c +index eb97cd5e4e6e..69152efdea1a 100644 +--- a/wpa_supplicant/config.c ++++ b/wpa_supplicant/config.c +@@ -2896,6 +2896,8 @@ int wpa_config_set_cred(struct wpa_cred *cred, const char *var, + + if (os_strcmp(var, "password") == 0 && + os_strncmp(value, "ext:", 4) == 0) { ++ if (has_newline(value)) ++ return -1; + str_clear_free(cred->password); + cred->password = os_strdup(value); + cred->ext_password = 1; +@@ -2946,9 +2948,14 @@ int wpa_config_set_cred(struct wpa_cred *cred, const char *var, + } + + val = wpa_config_parse_string(value, &len); +- if (val == NULL) { ++ if (val == NULL || ++ (os_strcmp(var, "excluded_ssid") != 0 && ++ os_strcmp(var, "roaming_consortium") != 0 && ++ os_strcmp(var, "required_roaming_consortium") != 0 && ++ has_newline(val))) { + wpa_printf(MSG_ERROR, "Line %d: invalid field '%s' string " + "value '%s'.", line, var, value); ++ os_free(val); + return -1; + } + +-- +2.8.1 + diff --git a/package/wpa_supplicant/0012-Reject-SET-commands-with-newline-characters-in-the-s.patch b/package/wpa_supplicant/0012-Reject-SET-commands-with-newline-characters-in-the-s.patch new file mode 100644 index 0000000000..a29df07912 --- /dev/null +++ b/package/wpa_supplicant/0012-Reject-SET-commands-with-newline-characters-in-the-s.patch @@ -0,0 +1,53 @@ +From 2a3f56502b52375c3bf113cf92adfa99bad6b488 Mon Sep 17 00:00:00 2001 +From: Jouni Malinen +Date: Tue, 5 Apr 2016 23:55:48 +0300 +Subject: [PATCH] Reject SET commands with newline characters in the string + values + +Many of the global configuration parameters are written as strings +without filtering and if there is an embedded newline character in the +value, unexpected configuration file data might be written. + +This fixes an issue where wpa_supplicant could have updated the +configuration file global parameter with arbitrary data from the control +interface or D-Bus interface. While those interfaces are supposed to be +accessible only for trusted users/applications, it may be possible that +an untrusted user has access to a management software component that +does not validate the value of a parameter before passing it to +wpa_supplicant. + +This could allow such an untrusted user to inject almost arbitrary data +into the configuration file. Such configuration file could result in +wpa_supplicant trying to load a library (e.g., opensc_engine_path, +pkcs11_engine_path, pkcs11_module_path, load_dynamic_eap) from user +controlled location when starting again. This would allow code from that +library to be executed under the wpa_supplicant process privileges. + +Signed-off-by: Jouni Malinen +Signed-off-by: Baruch Siach +--- +Patch status: upstream (2a3f56502b52375c3bf113cf92adfa99bad6b488) + + wpa_supplicant/config.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c +index 69152efdea1a..d9a1603f6d7e 100644 +--- a/wpa_supplicant/config.c ++++ b/wpa_supplicant/config.c +@@ -3764,6 +3764,12 @@ static int wpa_global_config_parse_str(const struct global_parse_data *data, + return -1; + } + ++ if (has_newline(pos)) { ++ wpa_printf(MSG_ERROR, "Line %d: invalid %s value with newline", ++ line, data->name); ++ return -1; ++ } ++ + tmp = os_strdup(pos); + if (tmp == NULL) + return -1; +-- +2.8.1 + diff --git a/package/wpa_supplicant/Config.in b/package/wpa_supplicant/Config.in new file mode 100644 index 0000000000..f4c4167be5 --- /dev/null +++ b/package/wpa_supplicant/Config.in @@ -0,0 +1,99 @@ +config BR2_PACKAGE_WPA_SUPPLICANT + bool "wpa_supplicant" + depends on BR2_USE_MMU # fork() + help + WPA supplicant for secure wireless networks + + http://hostap.epitest.fi/wpa_supplicant/ + +if BR2_PACKAGE_WPA_SUPPLICANT + +config BR2_PACKAGE_WPA_SUPPLICANT_NL80211 + bool "Enable nl80211 support" + default y + select BR2_PACKAGE_LIBNL + depends on BR2_TOOLCHAIN_HAS_THREADS # libnl + help + Enable support for nl80211. This is the current wireless + API for Linux, supported by all wireless drivers in vanilla + Linux, but may not be supported by some out-of-tree Linux + wireless drivers. wpa_supplicant will still fall back to + using the Wireless Extensions (wext) API with these drivers. + + If this option is disabled, then only the deprecated wext + API will be supported, with far less features. Linux may + supports using wext with modern drivers using a + compatibility layer, but it must be enabled in the kernel + configuration. + +comment "nl80211 support needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT + bool "Enable AP mode" + help + With this option enabled, wpa_supplicant can act as an + access point much like hostapd does with a limited feature set. + This links in parts of hostapd functionality into wpa_supplicant, + making it bigger but dispensing the need for a separate hostapd + binary in some applications hence being smaller overall. + +config BR2_PACKAGE_WPA_SUPPLICANT_EAP + bool "Enable EAP" + help + Enable support for EAP. + +config BR2_PACKAGE_WPA_SUPPLICANT_HOTSPOT + bool "Enable HS20" + help + Enable Hotspot 2.0 and IEEE 802.11u interworking functionality. + +config BR2_PACKAGE_WPA_SUPPLICANT_DEBUG_SYSLOG + bool "Enable syslog support" + help + Enable support for sending debug messages to syslog. + +config BR2_PACKAGE_WPA_SUPPLICANT_WPS + bool "Enable WPS" + help + Enable support for Wi-Fi Protected Setup (WPS). + +config BR2_PACKAGE_WPA_SUPPLICANT_CLI + bool "Install wpa_cli binary" + help + Install wpa_cli command line utility + +config BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO + depends on !BR2_STATIC_LIBS + bool "Install wpa_client shared library" + help + Install libwpa_client.so. + +comment "wpa_client library needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE + bool "Install wpa_passphrase binary" + help + Install wpa_passphrase command line utility. + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD + bool "Enable support for old DBus control interface" + depends on BR2_PACKAGE_DBUS + help + Enable support for old DBus control interface + (fi.epitest.hostap.WPASupplicant). + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW + bool "Enable support for new DBus control interface" + depends on BR2_PACKAGE_DBUS + help + Enable support for new DBus control interface (fi.w1.wpa_supplicant1). + +config BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION + bool "Introspection support" + depends on BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW + help + Add introspection support for new DBus control interface. + +endif diff --git a/package/wpa_supplicant/wpa_supplicant.conf b/package/wpa_supplicant/wpa_supplicant.conf new file mode 100644 index 0000000000..1994a6c739 --- /dev/null +++ b/package/wpa_supplicant/wpa_supplicant.conf @@ -0,0 +1,6 @@ +ctrl_interface=/var/run/wpa_supplicant +ap_scan=1 + +network={ + key_mgmt=NONE +} diff --git a/package/wpa_supplicant/wpa_supplicant.hash b/package/wpa_supplicant/wpa_supplicant.hash new file mode 100644 index 0000000000..19e43598f2 --- /dev/null +++ b/package/wpa_supplicant/wpa_supplicant.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 cce55bae483b364eae55c35ba567c279be442ed8bab5b80a3c7fb0d057b9b316 wpa_supplicant-2.5.tar.gz diff --git a/package/wpa_supplicant/wpa_supplicant.mk b/package/wpa_supplicant/wpa_supplicant.mk new file mode 100644 index 0000000000..ba1180d4b6 --- /dev/null +++ b/package/wpa_supplicant/wpa_supplicant.mk @@ -0,0 +1,207 @@ +################################################################################ +# +# wpa_supplicant +# +################################################################################ + +WPA_SUPPLICANT_VERSION = 2.5 +WPA_SUPPLICANT_SITE = http://hostap.epitest.fi/releases +WPA_SUPPLICANT_LICENSE = BSD-3c +WPA_SUPPLICANT_LICENSE_FILES = README +WPA_SUPPLICANT_CONFIG = $(WPA_SUPPLICANT_DIR)/wpa_supplicant/.config +WPA_SUPPLICANT_SUBDIR = wpa_supplicant +WPA_SUPPLICANT_DBUS_OLD_SERVICE = fi.epitest.hostap.WPASupplicant +WPA_SUPPLICANT_DBUS_NEW_SERVICE = fi.w1.wpa_supplicant1 +WPA_SUPPLICANT_CFLAGS = $(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/libnl3/ +WPA_SUPPLICANT_LDFLAGS = $(TARGET_LDFLAGS) + +# install the wpa_client library +WPA_SUPPLICANT_INSTALL_STAGING = YES + +WPA_SUPPLICANT_CONFIG_EDITS = + +WPA_SUPPLICANT_CONFIG_SET = + +WPA_SUPPLICANT_CONFIG_ENABLE = \ + CONFIG_IEEE80211AC \ + CONFIG_IEEE80211N \ + CONFIG_IEEE80211R \ + CONFIG_INTERNAL_LIBTOMMATH \ + CONFIG_DEBUG_FILE + +WPA_SUPPLICANT_CONFIG_DISABLE = \ + CONFIG_SMARTCARD + +# libnl-3 needs -lm (for rint) and -lpthread if linking statically +# And library order matters hence stick -lnl-3 first since it's appended +# in the wpa_supplicant Makefiles as in LIBS+=-lnl-3 ... thus failing +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_NL80211),y) +ifeq ($(BR2_STATIC_LIBS),y) +WPA_SUPPLICANT_LIBS += -lnl-3 -lm -lpthread +endif +WPA_SUPPLICANT_DEPENDENCIES += host-pkgconf libnl +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_LIBNL32 +else +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_DRIVER_NL80211 +endif + +# Trailing underscore on purpose to not enable CONFIG_EAPOL_TEST +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_EAP),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_EAP_ +# uses dlopen() +ifeq ($(BR2_STATIC_LIBS),y) +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_EAP_TNC +endif +else +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_EAP +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_HOTSPOT),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_HS20 \ + CONFIG_INTERWORKING +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT),y) +WPA_SUPPLICANT_CONFIG_ENABLE += \ + CONFIG_AP \ + CONFIG_P2P +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPS),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_WPS +endif + +# Try to use openssl if it's already available +ifeq ($(BR2_PACKAGE_OPENSSL),y) +WPA_SUPPLICANT_DEPENDENCIES += openssl +WPA_SUPPLICANT_LIBS += $(if $(BR2_STATIC_LIBS),-lcrypto -lz) +WPA_SUPPLICANT_CONFIG_EDITS += 's/\#\(CONFIG_TLS=openssl\)/\1/' +else +WPA_SUPPLICANT_CONFIG_DISABLE += CONFIG_EAP_PWD +WPA_SUPPLICANT_CONFIG_EDITS += 's/\#\(CONFIG_TLS=\).*/\1internal/' +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +WPA_SUPPLICANT_DEPENDENCIES += host-pkgconf dbus +WPA_SUPPLICANT_MAKE_ENV = \ + PKG_CONFIG_SYSROOT_DIR="$(STAGING_DIR)" \ + PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig" + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_OLD),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_CTRL_IFACE_DBUS= +define WPA_SUPPLICANT_INSTALL_DBUS_OLD + $(INSTALL) -m 0644 -D \ + $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE).service \ + $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_OLD_SERVICE).service +endef +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_NEW),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_CTRL_IFACE_DBUS_NEW +define WPA_SUPPLICANT_INSTALL_DBUS_NEW + $(INSTALL) -m 0644 -D \ + $(@D)/wpa_supplicant/dbus/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service \ + $(TARGET_DIR)/usr/share/dbus-1/system-services/$(WPA_SUPPLICANT_DBUS_NEW_SERVICE).service +endef +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DBUS_INTROSPECTION),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_CTRL_IFACE_DBUS_INTRO +endif + +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_DEBUG_SYSLOG),y) +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_DEBUG_SYSLOG +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +WPA_SUPPLICANT_DEPENDENCIES += readline +WPA_SUPPLICANT_CONFIG_ENABLE += CONFIG_READLINE +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_WPA_CLIENT_SO),y) +WPA_SUPPLICANT_CONFIG_SET += CONFIG_BUILD_WPA_CLIENT_SO +define WPA_SUPPLICANT_INSTALL_WPA_CLIENT_SO + $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/libwpa_client.so \ + $(TARGET_DIR)/usr/lib/libwpa_client.so + $(INSTALL) -m 0644 -D $(@D)/src/common/wpa_ctrl.h \ + $(TARGET_DIR)/usr/include/wpa_ctrl.h +endef +define WPA_SUPPLICANT_INSTALL_STAGING_WPA_CLIENT_SO + $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/libwpa_client.so \ + $(STAGING_DIR)/usr/lib/libwpa_client.so + $(INSTALL) -m 0644 -D $(@D)/src/common/wpa_ctrl.h \ + $(STAGING_DIR)/usr/include/wpa_ctrl.h +endef +endif + +define WPA_SUPPLICANT_CONFIGURE_CMDS + cp $(@D)/wpa_supplicant/defconfig $(WPA_SUPPLICANT_CONFIG) + sed -i $(patsubst %,-e 's/^#\(%\)/\1/',$(WPA_SUPPLICANT_CONFIG_ENABLE)) \ + $(patsubst %,-e 's/^\(%\)/#\1/',$(WPA_SUPPLICANT_CONFIG_DISABLE)) \ + $(patsubst %,-e '1i%=y',$(WPA_SUPPLICANT_CONFIG_SET)) \ + $(patsubst %,-e %,$(WPA_SUPPLICANT_CONFIG_EDITS)) \ + $(WPA_SUPPLICANT_CONFIG) +endef + +# LIBS for wpa_supplicant, LIBS_c for wpa_cli, LIBS_p for wpa_passphrase +define WPA_SUPPLICANT_BUILD_CMDS + $(TARGET_MAKE_ENV) CFLAGS="$(WPA_SUPPLICANT_CFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" BINDIR=/usr/sbin \ + LIBS="$(WPA_SUPPLICANT_LIBS)" LIBS_c="$(WPA_SUPPLICANT_LIBS)" \ + LIBS_p="$(WPA_SUPPLICANT_LIBS)" \ + $(MAKE) CC="$(TARGET_CC)" -C $(@D)/$(WPA_SUPPLICANT_SUBDIR) +endef + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_CLI),y) +define WPA_SUPPLICANT_INSTALL_CLI + $(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_cli \ + $(TARGET_DIR)/usr/sbin/wpa_cli +endef +endif + +ifeq ($(BR2_PACKAGE_WPA_SUPPLICANT_PASSPHRASE),y) +define WPA_SUPPLICANT_INSTALL_PASSPHRASE + $(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_passphrase \ + $(TARGET_DIR)/usr/sbin/wpa_passphrase +endef +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +define WPA_SUPPLICANT_INSTALL_DBUS + $(INSTALL) -m 0644 -D \ + $(@D)/wpa_supplicant/dbus/dbus-wpa_supplicant.conf \ + $(TARGET_DIR)/etc/dbus-1/system.d/wpa_supplicant.conf + $(WPA_SUPPLICANT_INSTALL_DBUS_OLD) + $(WPA_SUPPLICANT_INSTALL_DBUS_NEW) +endef +endif + +define WPA_SUPPLICANT_INSTALL_STAGING_CMDS + $(WPA_SUPPLICANT_INSTALL_STAGING_WPA_CLIENT_SO) +endef + +define WPA_SUPPLICANT_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/wpa_supplicant \ + $(TARGET_DIR)/usr/sbin/wpa_supplicant + $(INSTALL) -m 644 -D package/wpa_supplicant/wpa_supplicant.conf \ + $(TARGET_DIR)/etc/wpa_supplicant.conf + $(WPA_SUPPLICANT_INSTALL_CLI) + $(WPA_SUPPLICANT_INSTALL_PASSPHRASE) + $(WPA_SUPPLICANT_INSTALL_DBUS) + $(WPA_SUPPLICANT_INSTALL_WPA_CLIENT_SO) +endef + +define WPA_SUPPLICANT_INSTALL_INIT_SYSTEMD + $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant.service \ + $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant.service + $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant@.service \ + $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant@.service + $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-nl80211@.service \ + $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-nl80211@.service + $(INSTALL) -m 0644 -D $(@D)/$(WPA_SUPPLICANT_SUBDIR)/systemd/wpa_supplicant-wired@.service \ + $(TARGET_DIR)/usr/lib/systemd/system/wpa_supplicant-wired@.service +endef + +$(eval $(generic-package)) diff --git a/package/wpan-tools/0001-fix-build-with-newer-libnl.patch b/package/wpan-tools/0001-fix-build-with-newer-libnl.patch new file mode 100644 index 0000000000..03e1a03340 --- /dev/null +++ b/package/wpan-tools/0001-fix-build-with-newer-libnl.patch @@ -0,0 +1,40 @@ +From 51ab69d76aa708c79aed971ee4083abb8cc07201 Mon Sep 17 00:00:00 2001 +From: Stefan Schmidt +Date: Mon, 9 Nov 2015 19:06:25 +0100 +Subject: [PATCH] build: avoid redefinition errors with libnl >= 3.2.27 + +From 3.2.17 onwards we have nla for s8, s16, etc defined directly in libnl. +If we keep including this file anyway we run into redefinition errors. Better +include use our own only for earlier versions. + +Happened to me on Fedora 22 after my last update. + +Signed-off-by: Stefan Schmidt +Acked-by: Alexander Aring +Signed-off-by: Gustavo Zacarias +--- +Patch status: upstream + + src/nl_extras.h | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/nl_extras.h b/src/nl_extras.h +index 9d841aa..c4d1d14 100644 +--- a/src/nl_extras.h ++++ b/src/nl_extras.h +@@ -1,6 +1,8 @@ + #ifndef __NL_EXTRAS_H + #define __NL_EXTRAS_H + ++#if LIBNL_VER_MIC <= 26 ++ + #ifndef NLA_S8 + + #define NLA_S8 13 +@@ -43,4 +45,6 @@ static inline int32_t nla_get_s32(struct nlattr *nla) + + #endif /* NLA_S64 */ + ++#endif /* LIBNL_VER_MIC */ ++ + #endif /* __NL_EXTRAS_H */ diff --git a/package/wpan-tools/Config.in b/package/wpan-tools/Config.in new file mode 100644 index 0000000000..9e327420a0 --- /dev/null +++ b/package/wpan-tools/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_WPAN_TOOLS + bool "wpan-tools" + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBNL + help + Userspace tools for Linux IEEE 802.15.4 stack. + + http://wpan.cakelab.org/ + +comment "wpan-tools needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/wpan-tools/wpan-tools.hash b/package/wpan-tools/wpan-tools.hash new file mode 100644 index 0000000000..fbcf64c081 --- /dev/null +++ b/package/wpan-tools/wpan-tools.hash @@ -0,0 +1,4 @@ +# From http://wpan.cakelab.org/releases/md5sum +md5 c6356f7be4de2e9f2084283b9ed7e1ab wpan-tools-0.5.tar.gz +# Calculated based on the hash above +sha256 f381f24eb1962aa9e21751004560371bb9ad8bd0b735bc493930f50e8c1f3d99 wpan-tools-0.5.tar.gz diff --git a/package/wpan-tools/wpan-tools.mk b/package/wpan-tools/wpan-tools.mk new file mode 100644 index 0000000000..d223800449 --- /dev/null +++ b/package/wpan-tools/wpan-tools.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# wpan-tools +# +################################################################################ + +WPAN_TOOLS_VERSION = 0.5 +WPAN_TOOLS_SITE = http://wpan.cakelab.org/releases +WPAN_TOOLS_DEPENDENCIES = host-pkgconf libnl +WPAN_TOOLS_LICENSE = iw license +WPAN_TOOLS_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/wsapi/Config.in b/package/wsapi/Config.in new file mode 100644 index 0000000000..348a0404b6 --- /dev/null +++ b/package/wsapi/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_WSAPI + bool "wsapi" + # Runtime dependency only + select BR2_PACKAGE_COXPCALL + select BR2_PACKAGE_LUAFILESYSTEM + select BR2_PACKAGE_RINGS + help + API that abstracts the web server from Lua web applications. + + http://keplerproject.github.com/wsapi/ diff --git a/package/wsapi/wsapi.hash b/package/wsapi/wsapi.hash new file mode 100644 index 0000000000..3abbfc979a --- /dev/null +++ b/package/wsapi/wsapi.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 f7f1b0ddc68c257965c42ac7155904d8ff7c2b7256f65ef1b82fda0039137d61 wsapi-1.6.1-1.src.rock diff --git a/package/wsapi/wsapi.mk b/package/wsapi/wsapi.mk new file mode 100644 index 0000000000..0cca6cb4d6 --- /dev/null +++ b/package/wsapi/wsapi.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# wsapi +# +################################################################################ + +WSAPI_VERSION = 1.6.1-1 +WSAPI_LICENSE = MIT + +$(eval $(luarocks-package)) diff --git a/package/wvdial/0001-uClibc-scandir.patch b/package/wvdial/0001-uClibc-scandir.patch new file mode 100644 index 0000000000..b611e94a0b --- /dev/null +++ b/package/wvdial/0001-uClibc-scandir.patch @@ -0,0 +1,23 @@ +Fix wvdial so that it works with scandir as defined in uClibc. + +Signed-off-by: Simon Dawson + +diff -Nurp a/wvmodemscan.cc b/wvmodemscan.cc +--- a/wvmodemscan.cc 2009-09-29 18:27:28.000000000 +0100 ++++ b/wvmodemscan.cc 2012-07-28 14:03:56.359729660 +0100 +@@ -495,13 +495,13 @@ static int fileselect(const struct diren + // (no internal ISDN support) || !strncmp(e->d_name, "ttyI", 4); + } + +-#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 10) ++#if defined(__UCLIBC__) || (defined(__GLIBC__) && __GLIBC_PREREQ(2, 10)) + static int filesort(const dirent **e1, const dirent **e2) + #else + static int filesort(const void *_e1, const void *_e2) + #endif + { +-#if !(defined(__GLIBC__) && __GLIBC_PREREQ(2, 10)) ++#if !(defined(__UCLIBC__) || (defined(__GLIBC__) && __GLIBC_PREREQ(2, 10))) + dirent const * const *e1 = (dirent const * const *)_e1; + dirent const * const *e2 = (dirent const * const *)_e2; + #endif diff --git a/package/wvdial/Config.in b/package/wvdial/Config.in new file mode 100644 index 0000000000..d5458700f2 --- /dev/null +++ b/package/wvdial/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_WVDIAL + bool "wvdial" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # wvstreams + depends on !BR2_STATIC_LIBS # wvstreams + depends on !BR2_TOOLCHAIN_USES_MUSL # wvstreams + select BR2_PACKAGE_WVSTREAMS + help + wvdial is an intelligent Point-to-Point Protocol dialer + + http://wvdial.googlecode.com/ + +comment "wvdial needs a (e)glibc or uClibc toolchain w/ C++, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL diff --git a/package/wvdial/wvdial.mk b/package/wvdial/wvdial.mk new file mode 100644 index 0000000000..e89dfc5887 --- /dev/null +++ b/package/wvdial/wvdial.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# wvdial +# +################################################################################ + +WVDIAL_VERSION = 1.61 +WVDIAL_SITE = http://wvdial.googlecode.com/files +WVDIAL_SOURCE = wvdial-$(WVDIAL_VERSION).tar.bz2 +WVDIAL_DEPENDENCIES = wvstreams + +WVDIAL_LICENSE = LGPLv2 +WVDIAL_LICENSE_FILES = COPYING.LIB + +# N.B. parallel make fails +WVDIAL_MAKE = $(MAKE1) + +WVDIAL_MAKE_ENV += $(TARGET_CONFIGURE_OPTS) \ + WVSTREAMS_INC="$(STAGING_DIR)/usr/include" \ + WVSTREAMS_LIB="$(STAGING_DIR)/usr/lib" + +define WVDIAL_BUILD_CMDS + $(TARGET_MAKE_ENV) $(WVDIAL_MAKE_ENV) $(WVDIAL_MAKE) -C $(@D) +endef + +define WVDIAL_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(WVDIAL_MAKE_ENV) $(WVDIAL_MAKE) \ + prefix="$(TARGET_DIR)/usr" PPPDIR="$(TARGET_DIR)/etc/ppp/peers" \ + install -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/wvstreams/0001-fix-uClibc-compile-getcontext.patch b/package/wvstreams/0001-fix-uClibc-compile-getcontext.patch new file mode 100644 index 0000000000..c78cc1893c --- /dev/null +++ b/package/wvstreams/0001-fix-uClibc-compile-getcontext.patch @@ -0,0 +1,273 @@ +Fix wvstreams so that it builds with uClibc, which does not have the +getcontext() and setcontext() functions. + +Signed-off-by: Simon Dawson + +diff -Nurp a/include/wvtask.h b/include/wvtask.h +--- a/include/wvtask.h 2008-07-14 20:11:35.000000000 +0100 ++++ b/include/wvtask.h 2012-07-28 12:29:53.559981240 +0100 +@@ -28,6 +28,13 @@ + + #define WVTASK_MAGIC 0x123678 + ++#undef HAVE_GETCONTEXT ++#ifdef HAVE_GETCONTEXT ++typedef ucontext_t TaskContext; ++#else ++typedef jmp_buf TaskContext; ++#endif ++ + class WvTaskMan; + + /** Represents a single thread of control. */ +@@ -54,8 +61,8 @@ class WvTask + bool running, recycled; + + WvTaskMan &man; +- ucontext_t mystate; // used for resuming the task +- ucontext_t func_call, func_return; ++ TaskContext mystate; // used for resuming the task ++ TaskContext func_call, func_return; + + TaskFunc *func; + void *userdata; +@@ -94,13 +101,13 @@ class WvTaskMan + static void call_func(WvTask *task); + + static char *stacktop; +- static ucontext_t stackmaster_task; ++ static TaskContext stackmaster_task; + + static WvTask *stack_target; +- static ucontext_t get_stack_return; ++ static TaskContext get_stack_return; + + static WvTask *current_task; +- static ucontext_t toplevel; ++ static TaskContext toplevel; + + WvTaskMan(); + virtual ~WvTaskMan(); +diff -Nurp a/utils/wvtask.cc b/utils/wvtask.cc +--- a/utils/wvtask.cc 2009-05-13 22:42:52.000000000 +0100 ++++ b/utils/wvtask.cc 2012-07-28 12:32:23.855974538 +0100 +@@ -60,12 +60,14 @@ int WvTask::taskcount, WvTask::numtasks, + WvTaskMan *WvTaskMan::singleton; + int WvTaskMan::links, WvTaskMan::magic_number; + WvTaskList WvTaskMan::all_tasks, WvTaskMan::free_tasks; +-ucontext_t WvTaskMan::stackmaster_task, WvTaskMan::get_stack_return, ++TaskContext WvTaskMan::stackmaster_task, WvTaskMan::get_stack_return, + WvTaskMan::toplevel; + WvTask *WvTaskMan::current_task, *WvTaskMan::stack_target; + char *WvTaskMan::stacktop; + ++#ifdef HAVE_GETCONTEXT + static int context_return; ++#endif + + + static bool use_shared_stack() +@@ -198,9 +200,13 @@ WvTaskMan::WvTaskMan() + + stacktop = (char *)alloca(0); + ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(&get_stack_return) == 0); + if (context_return == 0) ++#else ++ if (setjmp(get_stack_return) == 0) ++#endif + { + // initial setup - start the stackmaster() task (never returns!) + stackmaster(); +@@ -257,22 +263,30 @@ int WvTaskMan::run(WvTask &task, int val + + WvTask *old_task = current_task; + current_task = &task; +- ucontext_t *state; ++ TaskContext *state; + + if (!old_task) + state = &toplevel; // top-level call (not in an actual task yet) + else + state = &old_task->mystate; + ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(state) == 0); + int newval = context_return; ++#else ++ int newval = setjmp(*state); ++#endif + if (newval == 0) + { + // saved the state, now run the task. ++#ifdef HAVE_GETCONTEXT + context_return = val; + setcontext(&task.mystate); + return -1; ++#else ++ longjmp(task.mystate, val); ++#endif + } + else + { +@@ -317,16 +331,24 @@ int WvTaskMan::yield(int val) + (long)current_task->stacksize); + } + #endif +- ++ ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(¤t_task->mystate) == 0); + int newval = context_return; ++#else ++ int newval = setjmp(current_task->mystate); ++#endif + if (newval == 0) + { + // saved the task state; now yield to the toplevel. ++#ifdef HAVE_GETCONTEXT + context_return = val; + setcontext(&toplevel); + return -1; ++#else ++ longjmp(toplevel, val); ++#endif + } + else + { +@@ -340,9 +362,13 @@ int WvTaskMan::yield(int val) + + void WvTaskMan::get_stack(WvTask &task, size_t size) + { ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(&get_stack_return) == 0); + if (context_return == 0) ++#else ++ if (setjmp(get_stack_return) == 0) ++#endif + { + assert(magic_number == -WVTASK_MAGIC); + assert(task.magic_number == WVTASK_MAGIC); +@@ -358,6 +384,7 @@ void WvTaskMan::get_stack(WvTask &task, + static char *next_stack_addr = NULL; + #endif + ++#ifndef HAVE_GETCONTEXT + task.stack = mmap(next_stack_addr, task.stacksize, + PROT_READ | PROT_WRITE, + #ifndef MACOS +@@ -366,12 +393,17 @@ void WvTaskMan::get_stack(WvTask &task, + MAP_PRIVATE, + #endif + -1, 0); ++#endif // !HAVE_GETCONTEXT + } + + // initial setup + stack_target = &task; ++#ifdef HAVE_GETCONTEXT + context_return = size/1024 + (size%1024 > 0); + setcontext(&stackmaster_task); ++#else ++ longjmp(stackmaster_task, size/1024 + (size%1024 > 0)); ++#endif + } + else + { +@@ -408,9 +440,13 @@ void WvTaskMan::_stackmaster() + { + assert(magic_number == -WVTASK_MAGIC); + ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(&stackmaster_task) == 0); + val = context_return; ++#else ++ val = setjmp(stackmaster_task); ++#endif + if (val == 0) + { + assert(magic_number == -WVTASK_MAGIC); +@@ -418,8 +454,12 @@ void WvTaskMan::_stackmaster() + // just did setjmp; save stackmaster's current state (with + // all current stack allocations) and go back to get_stack + // (or the constructor, if that's what called us) ++#ifdef HAVE_GETCONTEXT + context_return = 1; + setcontext(&get_stack_return); ++#else ++ longjmp(get_stack_return, 1); ++#endif + } + else + { +@@ -462,7 +502,9 @@ void WvTaskMan::call_func(WvTask *task) + task->func(task->userdata); + Dprintf("WvTaskMan: returning from task #%d (%s)\n", + task->tid, (const char *)task->name); ++#ifdef HAVE_GETCONTEXT + context_return = 1; ++#endif + } + + +@@ -473,9 +515,13 @@ void WvTaskMan::do_task() + assert(task->magic_number == WVTASK_MAGIC); + + // back here from longjmp; someone wants stack space. ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(&task->mystate) == 0); + if (context_return == 0) ++#else ++ if (setjmp(task->mystate) == 0) ++#endif + { + // done the setjmp; that means the target task now has + // a working jmp_buf all set up. Leave space on the stack +@@ -510,6 +556,7 @@ void WvTaskMan::do_task() + } + else + { ++#ifdef HAVE_GETCONTEXT + assert(getcontext(&task->func_call) == 0); + task->func_call.uc_stack.ss_size = task->stacksize; + task->func_call.uc_stack.ss_sp = task->stack; +@@ -519,11 +566,19 @@ void WvTaskMan::do_task() + task->tid, (const char *)task->name); + makecontext(&task->func_call, + (void (*)(void))call_func, 1, task); ++#else ++ assert(setjmp(task->func_call) == 0); ++#endif + ++#ifdef HAVE_GETCONTEXT + context_return = 0; + assert(getcontext(&task->func_return) == 0); + if (context_return == 0) + setcontext(&task->func_call); ++#else ++ if (setjmp(task->func_return) == 0) ++ longjmp(task->func_call, 0); ++#endif + } + + // the task's function terminated. +@@ -544,8 +599,12 @@ const void *WvTaskMan::current_top_of_st + if (use_shared_stack() || current_task == NULL) + return __libc_stack_end; + else ++#ifdef HAVE_GETCONTEXT + return (const char *)current_task->stack + current_task->stacksize; + #else ++ return 0; ++#endif ++#else + return 0; + #endif + } diff --git a/package/wvstreams/0002-fix-uClibc-compile-execinfo-backtrace.patch b/package/wvstreams/0002-fix-uClibc-compile-execinfo-backtrace.patch new file mode 100644 index 0000000000..c6317da4dc --- /dev/null +++ b/package/wvstreams/0002-fix-uClibc-compile-execinfo-backtrace.patch @@ -0,0 +1,31 @@ +Fix wvstreams so that it builds with uClibc: we don't have execinfo.h, +so we can't do backtrace() stuff. + +Signed-off-by: Simon Dawson + +diff -Nurp a/utils/wvcrash.cc b/utils/wvcrash.cc +--- a/utils/wvcrash.cc 2008-12-17 12:24:20.000000000 +0000 ++++ b/utils/wvcrash.cc 2012-07-27 22:00:15.456502262 +0100 +@@ -28,7 +28,9 @@ + // FIXME: this file mostly only works in Linux + #ifdef __linux + +-# include ++#ifdef HAVE_EXECINFO_H ++#include ++#endif + #include + + #ifdef __USE_GNU +@@ -267,9 +269,11 @@ static void wvcrash_real(int sig, int fd + } + } + ++#ifdef HAVE_EXECINFO_H + wr(fd, "\nBacktrace:\n"); + backtrace_symbols_fd(trace, + backtrace(trace, sizeof(trace)/sizeof(trace[0])), fd); ++#endif + + if (pid > 0) + { diff --git a/package/wvstreams/0003-fix-uClibc-compile-misc.patch b/package/wvstreams/0003-fix-uClibc-compile-misc.patch new file mode 100644 index 0000000000..690a961c12 --- /dev/null +++ b/package/wvstreams/0003-fix-uClibc-compile-misc.patch @@ -0,0 +1,16 @@ +Fix wvstreams so that it builds with uClibc: const cast problem. + +Signed-off-by: Simon Dawson + +diff -Nurp a/crypto/wvx509.cc b/crypto/wvx509.cc +--- a/crypto/wvx509.cc 2008-10-23 21:23:49.000000000 +0100 ++++ b/crypto/wvx509.cc 2012-06-15 18:45:06.605899292 +0100 +@@ -1157,7 +1157,7 @@ WvString WvX509::get_extension(int nid) + + if (ext) + { +- X509V3_EXT_METHOD *method = X509V3_EXT_get(ext); ++ X509V3_EXT_METHOD *method = const_cast(X509V3_EXT_get(ext)); + if (!method) + { + WvDynBuf buf; diff --git a/package/wvstreams/0004-build-fixes.patch b/package/wvstreams/0004-build-fixes.patch new file mode 100644 index 0000000000..21792d7422 --- /dev/null +++ b/package/wvstreams/0004-build-fixes.patch @@ -0,0 +1,40 @@ +Add missing includes for proper build on Linux/glibc + +The current wvstreams code doesn't build on Linux/glibc, with error +about chmod() not being available (for wvunixdgsocket.cc) or umask() +not being available (for wvatomicfile.cc). Those errors turn out to be +missing includes. Those includes were in fact already done, but +conditionally for MacOS. We make them unconditional (it probably +breaks other platforms, but since Buildroot is Linux only, we don't +care). + +Signed-off-by: Thomas Petazzoni + +Index: b/ipstreams/wvunixdgsocket.cc +=================================================================== +--- a/ipstreams/wvunixdgsocket.cc ++++ b/ipstreams/wvunixdgsocket.cc +@@ -1,8 +1,6 @@ + #include "wvunixdgsocket.h" +-#ifdef MACOS + #include + #include +-#endif + + WvUnixDGSocket::WvUnixDGSocket(WvStringParm filename, bool _server, int perms) + : socketfile(filename) +Index: b/streams/wvatomicfile.cc +=================================================================== +--- a/streams/wvatomicfile.cc ++++ b/streams/wvatomicfile.cc +@@ -10,10 +10,7 @@ + #include "wvatomicfile.h" + #include "wvfileutils.h" + #include "wvstrutils.h" +- +-#ifdef MACOS + #include +-#endif + + WvAtomicFile::WvAtomicFile(WvStringParm filename, int flags, mode_t create_mode) + : tmp_file(WvString::null) diff --git a/package/wvstreams/0005-getuid.patch b/package/wvstreams/0005-getuid.patch new file mode 100644 index 0000000000..60150665ce --- /dev/null +++ b/package/wvstreams/0005-getuid.patch @@ -0,0 +1,25 @@ +[PATCH] wvuid.cc: getuid needs sys/types.h + unistd.h + +Otherwise the build fails with: + +utils/wvuid.cc: In function 'wvuid_t wvgetuid()': +utils/wvuid.cc:63:19: error: 'getuid' was not declared in this scope + +Signed-off-by: Peter Korsgaard +--- + utils/wvuid.cc | 2 ++ + 1 file changed, 2 insertions(+) + +Index: wvstreams-4.6.1/utils/wvuid.cc +=================================================================== +--- wvstreams-4.6.1.orig/utils/wvuid.cc ++++ wvstreams-4.6.1/utils/wvuid.cc +@@ -33,6 +33,8 @@ + + #else // not WIN32 + ++#include ++#include + + WvString wv_username_from_uid(wvuid_t uid) + { diff --git a/package/wvstreams/Config.in b/package/wvstreams/Config.in new file mode 100644 index 0000000000..e2edd6d257 --- /dev/null +++ b/package/wvstreams/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_WVSTREAMS + bool "wvstreams" + depends on BR2_INSTALL_LIBSTDCPP + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # fork() + # musl not supported and no upstream activity since 2011. + depends on !BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_OPENSSL + select BR2_PACKAGE_ZLIB + help + C++ Network Programming Library. + + http://wvstreams.googlecode.com/ + +comment "wvstreams needs a (e)glibc or uClibc toolchain w/ C++, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL diff --git a/package/wvstreams/wvstreams.mk b/package/wvstreams/wvstreams.mk new file mode 100644 index 0000000000..4d344e2834 --- /dev/null +++ b/package/wvstreams/wvstreams.mk @@ -0,0 +1,62 @@ +################################################################################ +# +# wvstreams +# +################################################################################ + +WVSTREAMS_VERSION = 4.6.1 +WVSTREAMS_SITE = http://wvstreams.googlecode.com/files +WVSTREAMS_DEPENDENCIES = openssl zlib host-pkgconf +WVSTREAMS_INSTALL_STAGING = YES + +WVSTREAMS_LICENSE = LGPLv2+ +WVSTREAMS_LICENSE_FILES = LICENSE + +# N.B. parallel make fails +WVSTREAMS_MAKE = $(MAKE1) + +# Needed to work around problem with wvassert.h +WVSTREAMS_CONF_OPTS += CPPFLAGS=-DNDEBUG + +WVSTREAMS_CONF_OPTS += \ + --with-openssl \ + --with-zlib \ + --without-pam \ + --disable-warnings \ + --without-tcl + +# needed for openssl detection when statically linking (as ssl needs lz) +WVSTREAMS_CONF_ENV += LIBS=-lz + +ifneq ($(BR2_STATIC_LIBS),y) +WVSTREAMS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -fPIC" +endif + +# wvstreams uses argp.h which can be provided by the argp-standalone +# package +ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y) +WVSTREAMS_DEPENDENCIES += argp-standalone +endif + +ifeq ($(BR2_PACKAGE_DBUS),y) +WVSTREAMS_DEPENDENCIES += dbus +WVSTREAMS_CONF_OPTS += --with-dbus +else +WVSTREAMS_CONF_OPTS += --without-dbus +endif + +ifeq ($(BR2_PACKAGE_QT),y) +WVSTREAMS_DEPENDENCIES += qt +WVSTREAMS_CONF_OPTS += --with-qt +else +WVSTREAMS_CONF_OPTS += --without-qt +endif + +ifeq ($(BR2_PACKAGE_VALGRIND),y) +WVSTREAMS_DEPENDENCIES += valgrind +WVSTREAMS_CONF_OPTS += --with-valgrind +else +WVSTREAMS_CONF_OPTS += --without-valgrind +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/Config.in b/package/x11r7/Config.in new file mode 100644 index 0000000000..40aa80c934 --- /dev/null +++ b/package/x11r7/Config.in @@ -0,0 +1,277 @@ +menuconfig BR2_PACKAGE_XORG7 + bool "X.org X Window System" + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # dlopen in xlib_libX11 + help + Support for X11R7 libraries, servers, drivers, and/or + applications in the target. + + http://xorg.freedesktop.org + +if BR2_PACKAGE_XORG7 + menu "X11R7 Servers" + source package/x11r7/xserver_xorg-server/Config.in + endmenu + menu "X11R7 Libraries" + source package/x11r7/libxcb/Config.in + source package/x11r7/xcb-util/Config.in + source package/x11r7/xcb-util-cursor/Config.in + source package/x11r7/xcb-util-image/Config.in + source package/x11r7/xcb-util-keysyms/Config.in + source package/x11r7/xcb-util-renderutil/Config.in + source package/x11r7/xcb-util-wm/Config.in + source package/x11r7/xlib_libFS/Config.in + source package/x11r7/xlib_libICE/Config.in + source package/x11r7/xlib_libSM/Config.in + source package/x11r7/xlib_libX11/Config.in + source package/x11r7/xlib_libXScrnSaver/Config.in + source package/x11r7/xlib_libXau/Config.in + source package/x11r7/xlib_libXaw/Config.in + source package/x11r7/xlib_libXcomposite/Config.in + source package/x11r7/xlib_libXcursor/Config.in + source package/x11r7/xlib_libXdamage/Config.in + source package/x11r7/xlib_libXdmcp/Config.in + source package/x11r7/xlib_libXext/Config.in + source package/x11r7/xlib_libXfixes/Config.in + source package/x11r7/xlib_libXfont/Config.in + source package/x11r7/xlib_libXft/Config.in + source package/x11r7/xlib_libXi/Config.in + source package/x11r7/xlib_libXinerama/Config.in + source package/x11r7/xlib_libXmu/Config.in + source package/x11r7/xlib_libXpm/Config.in + source package/x11r7/xlib_libXrandr/Config.in + source package/x11r7/xlib_libXrender/Config.in + source package/x11r7/xlib_libXres/Config.in + source package/x11r7/xlib_libXt/Config.in + source package/x11r7/xlib_libXtst/Config.in + source package/x11r7/xlib_libXv/Config.in + source package/x11r7/xlib_libXvMC/Config.in + source package/x11r7/xlib_libXxf86dga/Config.in + source package/x11r7/xlib_libXxf86vm/Config.in + source package/x11r7/xlib_libdmx/Config.in + source package/x11r7/xlib_libfontenc/Config.in + source package/x11r7/xlib_libxkbfile/Config.in + source package/x11r7/xlib_libxshmfence/Config.in + source package/x11r7/xlib_xtrans/Config.in + endmenu + menu "X11R7 Applications" + source package/x11r7/xapp_appres/Config.in + source package/x11r7/xapp_bdftopcf/Config.in + source package/x11r7/xapp_beforelight/Config.in + source package/x11r7/xapp_bitmap/Config.in + source package/x11r7/xapp_editres/Config.in + source package/x11r7/xapp_fonttosfnt/Config.in + source package/x11r7/xapp_fslsfonts/Config.in + source package/x11r7/xapp_fstobdf/Config.in + source package/x11r7/xapp_iceauth/Config.in + source package/x11r7/xapp_ico/Config.in + source package/x11r7/xapp_listres/Config.in + source package/x11r7/xapp_luit/Config.in + source package/x11r7/xapp_mkfontdir/Config.in + source package/x11r7/xapp_mkfontscale/Config.in + source package/x11r7/xapp_oclock/Config.in + source package/x11r7/xapp_rgb/Config.in + source package/x11r7/xapp_rstart/Config.in + source package/x11r7/xapp_scripts/Config.in + source package/x11r7/xapp_sessreg/Config.in + source package/x11r7/xapp_setxkbmap/Config.in + source package/x11r7/xapp_showfont/Config.in + source package/x11r7/xapp_smproxy/Config.in + source package/x11r7/xapp_twm/Config.in + source package/x11r7/xapp_viewres/Config.in + source package/x11r7/xapp_x11perf/Config.in + source package/x11r7/xapp_xauth/Config.in + source package/x11r7/xapp_xbacklight/Config.in + source package/x11r7/xapp_xbiff/Config.in + source package/x11r7/xapp_xcalc/Config.in + source package/x11r7/xapp_xclipboard/Config.in + source package/x11r7/xapp_xclock/Config.in + source package/x11r7/xapp_xcmsdb/Config.in + source package/x11r7/xapp_xcompmgr/Config.in + source package/x11r7/xapp_xconsole/Config.in + source package/x11r7/xapp_xcursorgen/Config.in + source package/x11r7/xapp_xdbedizzy/Config.in + source package/x11r7/xapp_xditview/Config.in + source package/x11r7/xapp_xdm/Config.in + source package/x11r7/xapp_xdpyinfo/Config.in + source package/x11r7/xapp_xdriinfo/Config.in + source package/x11r7/xapp_xedit/Config.in + source package/x11r7/xapp_xev/Config.in + source package/x11r7/xapp_xeyes/Config.in + source package/x11r7/xapp_xf86dga/Config.in + source package/x11r7/xapp_xfd/Config.in + source package/x11r7/xapp_xfindproxy/Config.in + source package/x11r7/xapp_xfontsel/Config.in + source package/x11r7/xapp_xfs/Config.in + source package/x11r7/xapp_xfsinfo/Config.in + source package/x11r7/xapp_xgamma/Config.in + source package/x11r7/xapp_xgc/Config.in + source package/x11r7/xapp_xhost/Config.in + source package/x11r7/xapp_xinit/Config.in + source package/x11r7/xapp_xinput/Config.in + source package/x11r7/xapp_xinput-calibrator/Config.in + source package/x11r7/xapp_xkbcomp/Config.in + source package/x11r7/xapp_xkbevd/Config.in + source package/x11r7/xapp_xkbprint/Config.in + source package/x11r7/xapp_xkbutils/Config.in + source package/x11r7/xapp_xkill/Config.in + source package/x11r7/xapp_xload/Config.in + source package/x11r7/xapp_xlogo/Config.in + source package/x11r7/xapp_xlsatoms/Config.in + source package/x11r7/xapp_xlsclients/Config.in + source package/x11r7/xapp_xlsfonts/Config.in + source package/x11r7/xapp_xmag/Config.in + source package/x11r7/xapp_xman/Config.in + source package/x11r7/xapp_xmessage/Config.in + source package/x11r7/xapp_xmh/Config.in + source package/x11r7/xapp_xmodmap/Config.in + source package/x11r7/xapp_xmore/Config.in + source package/x11r7/xapp_xpr/Config.in + source package/x11r7/xapp_xprop/Config.in + source package/x11r7/xapp_xrandr/Config.in + source package/x11r7/xapp_xrdb/Config.in + source package/x11r7/xapp_xrefresh/Config.in + source package/x11r7/xapp_xset/Config.in + source package/x11r7/xapp_xsetmode/Config.in + source package/x11r7/xapp_xsetpointer/Config.in + source package/x11r7/xapp_xsetroot/Config.in + source package/x11r7/xapp_xsm/Config.in + source package/x11r7/xapp_xstdcmap/Config.in + source package/x11r7/xapp_xvidtune/Config.in + source package/x11r7/xapp_xvinfo/Config.in + source package/x11r7/xapp_xwd/Config.in + source package/x11r7/xapp_xwininfo/Config.in + source package/x11r7/xapp_xwud/Config.in + endmenu + if BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + menu "X11R7 Drivers" + source package/x11r7/xdriver_xf86-input-evdev/Config.in + source package/x11r7/xdriver_xf86-input-joystick/Config.in + source package/x11r7/xdriver_xf86-input-keyboard/Config.in + source package/x11r7/xdriver_xf86-input-libinput/Config.in + source package/x11r7/xdriver_xf86-input-mouse/Config.in + source package/x11r7/xdriver_xf86-input-synaptics/Config.in + source package/x11r7/xdriver_xf86-input-tslib/Config.in + source package/x11r7/xdriver_xf86-input-vmmouse/Config.in + source package/x11r7/xdriver_xf86-video-amdgpu/Config.in + source package/x11r7/xdriver_xf86-video-ark/Config.in + source package/x11r7/xdriver_xf86-video-ast/Config.in + source package/x11r7/xdriver_xf86-video-ati/Config.in + source package/x11r7/xdriver_xf86-video-cirrus/Config.in + source package/x11r7/xdriver_xf86-video-dummy/Config.in + source package/x11r7/xdriver_xf86-video-fbdev/Config.in + source package/x11r7/xdriver_xf86-video-fbturbo/Config.in + source package/x11r7/xdriver_xf86-video-geode/Config.in + source package/x11r7/xdriver_xf86-video-glide/Config.in + source package/x11r7/xdriver_xf86-video-glint/Config.in + source package/x11r7/xdriver_xf86-video-i128/Config.in + source package/x11r7/xdriver_xf86-video-imx/Config.in + source package/x11r7/xdriver_xf86-video-imx-viv/Config.in + source package/x11r7/xdriver_xf86-video-intel/Config.in + source package/x11r7/xdriver_xf86-video-mach64/Config.in + source package/x11r7/xdriver_xf86-video-mga/Config.in + source package/x11r7/xdriver_xf86-video-neomagic/Config.in + source package/x11r7/xdriver_xf86-video-nouveau/Config.in + source package/x11r7/xdriver_xf86-video-nv/Config.in + source package/x11r7/xdriver_xf86-video-openchrome/Config.in + source package/x11r7/xdriver_xf86-video-qxl/Config.in + source package/x11r7/xdriver_xf86-video-r128/Config.in + source package/x11r7/xdriver_xf86-video-savage/Config.in + source package/x11r7/xdriver_xf86-video-siliconmotion/Config.in + source package/x11r7/xdriver_xf86-video-sis/Config.in + source package/x11r7/xdriver_xf86-video-tdfx/Config.in + source package/x11r7/xdriver_xf86-video-tga/Config.in + source package/x11r7/xdriver_xf86-video-trident/Config.in + source package/x11r7/xdriver_xf86-video-v4l/Config.in + source package/x11r7/xdriver_xf86-video-vesa/Config.in + source package/x11r7/xdriver_xf86-video-vmware/Config.in + source package/x11r7/xdriver_xf86-video-voodoo/Config.in + source package/x11r7/xdriver_xf86-video-wsfb/Config.in + endmenu + endif + menu "X11R7 Fonts" + source package/x11r7/xfont_font-util/Config.in + source package/x11r7/xfont_encodings/Config.in + source package/x11r7/xfont_font-adobe-100dpi/Config.in + source package/x11r7/xfont_font-adobe-75dpi/Config.in + source package/x11r7/xfont_font-adobe-utopia-100dpi/Config.in + source package/x11r7/xfont_font-adobe-utopia-75dpi/Config.in + source package/x11r7/xfont_font-adobe-utopia-type1/Config.in + source package/x11r7/xfont_font-alias/Config.in + source package/x11r7/xfont_font-arabic-misc/Config.in + source package/x11r7/xfont_font-bh-100dpi/Config.in + source package/x11r7/xfont_font-bh-75dpi/Config.in + source package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/Config.in + source package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/Config.in + source package/x11r7/xfont_font-bh-ttf/Config.in + source package/x11r7/xfont_font-bh-type1/Config.in + source package/x11r7/xfont_font-bitstream-100dpi/Config.in + source package/x11r7/xfont_font-bitstream-75dpi/Config.in + source package/x11r7/xfont_font-bitstream-type1/Config.in + source package/x11r7/xfont_font-cronyx-cyrillic/Config.in + source package/x11r7/xfont_font-cursor-misc/Config.in + source package/x11r7/xfont_font-daewoo-misc/Config.in + source package/x11r7/xfont_font-dec-misc/Config.in + source package/x11r7/xfont_font-ibm-type1/Config.in + source package/x11r7/xfont_font-isas-misc/Config.in + source package/x11r7/xfont_font-jis-misc/Config.in + source package/x11r7/xfont_font-micro-misc/Config.in + source package/x11r7/xfont_font-misc-cyrillic/Config.in + source package/x11r7/xfont_font-misc-ethiopic/Config.in + source package/x11r7/xfont_font-misc-meltho/Config.in + source package/x11r7/xfont_font-misc-misc/Config.in + source package/x11r7/xfont_font-mutt-misc/Config.in + source package/x11r7/xfont_font-schumacher-misc/Config.in + source package/x11r7/xfont_font-screen-cyrillic/Config.in + source package/x11r7/xfont_font-sony-misc/Config.in + source package/x11r7/xfont_font-sun-misc/Config.in + source package/x11r7/xfont_font-winitzki-cyrillic/Config.in + source package/x11r7/xfont_font-xfree86-type1/Config.in + endmenu + menu "X11R7 X protocols" + source package/x11r7/xcb-proto/Config.in + source package/x11r7/xproto_applewmproto/Config.in + source package/x11r7/xproto_bigreqsproto/Config.in + source package/x11r7/xproto_compositeproto/Config.in + source package/x11r7/xproto_damageproto/Config.in + source package/x11r7/xproto_dmxproto/Config.in + source package/x11r7/xproto_dri2proto/Config.in + source package/x11r7/xproto_dri3proto/Config.in + source package/x11r7/xproto_fixesproto/Config.in + source package/x11r7/xproto_fontcacheproto/Config.in + source package/x11r7/xproto_fontsproto/Config.in + source package/x11r7/xproto_glproto/Config.in + source package/x11r7/xproto_inputproto/Config.in + source package/x11r7/xproto_kbproto/Config.in + source package/x11r7/xproto_presentproto/Config.in + source package/x11r7/xproto_randrproto/Config.in + source package/x11r7/xproto_recordproto/Config.in + source package/x11r7/xproto_renderproto/Config.in + source package/x11r7/xproto_resourceproto/Config.in + source package/x11r7/xproto_scrnsaverproto/Config.in + source package/x11r7/xproto_videoproto/Config.in + source package/x11r7/xproto_windowswmproto/Config.in + source package/x11r7/xproto_xcmiscproto/Config.in + source package/x11r7/xproto_xextproto/Config.in + source package/x11r7/xproto_xf86bigfontproto/Config.in + source package/x11r7/xproto_xf86dgaproto/Config.in + source package/x11r7/xproto_xf86driproto/Config.in + source package/x11r7/xproto_xf86vidmodeproto/Config.in + source package/x11r7/xproto_xineramaproto/Config.in + source package/x11r7/xproto_xproto/Config.in + source package/x11r7/xproto_xproxymanagementprotocol/Config.in + endmenu + menu "X11R7 Utilities" + source package/x11r7/xutil_makedepend/Config.in + source package/x11r7/mcookie/Config.in + endmenu + menu "X11R7 Other data" + source package/x11r7/xdata_xbitmaps/Config.in + source package/x11r7/xdata_xcursor-themes/Config.in + source package/x11r7/xcursor-transparent-theme/Config.in + endmenu +endif + +comment "X.org needs a toolchain w/ wchar, threads, dynamic library" + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/x11r7/libxcb/Config.in b/package/x11r7/libxcb/Config.in new file mode 100644 index 0000000000..32569f7918 --- /dev/null +++ b/package/x11r7/libxcb/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_LIBXCB + bool "libxcb" + select BR2_PACKAGE_LIBPTHREAD_STUBS + select BR2_PACKAGE_XCB_PROTO + select BR2_PACKAGE_XLIB_LIBXDMCP + select BR2_PACKAGE_XLIB_LIBXAU + help + The X protocol C-language Binding (XCB) is a replacement for + Xlib featuring a small footprint, latency hiding, direct access + to the protocol, improved threading support, and extensibility. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/libxcb/libxcb.hash b/package/x11r7/libxcb/libxcb.hash new file mode 100644 index 0000000000..62060ee0dc --- /dev/null +++ b/package/x11r7/libxcb/libxcb.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-September/002633.html +sha256 b720fd6c7d200e5371affdb3f049cc8f88cff9aed942ff1b824d95eedbf69d30 libxcb-1.11.1.tar.bz2 diff --git a/package/x11r7/libxcb/libxcb.mk b/package/x11r7/libxcb/libxcb.mk new file mode 100644 index 0000000000..c46ee26498 --- /dev/null +++ b/package/x11r7/libxcb/libxcb.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# libxcb +# +################################################################################ + +LIBXCB_VERSION = 1.11.1 +LIBXCB_SOURCE = libxcb-$(LIBXCB_VERSION).tar.bz2 +LIBXCB_SITE = http://xcb.freedesktop.org/dist +LIBXCB_LICENSE = MIT +LIBXCB_LICENSE_FILES = COPYING + +LIBXCB_INSTALL_STAGING = YES + +LIBXCB_DEPENDENCIES = \ + host-libxslt libpthread-stubs xcb-proto xlib_libXdmcp xlib_libXau \ + host-xcb-proto host-python host-pkgconf + +LIBXCB_CONF_OPTS = --with-doxygen=no +HOST_LIBXCB_CONF_OPTS = --with-doxygen=no + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/mcookie/Config.in b/package/x11r7/mcookie/Config.in new file mode 100644 index 0000000000..2e9cfc76ea --- /dev/null +++ b/package/x11r7/mcookie/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_MCOOKIE + bool "mcookie" + help + cookie generator for X server + + http://www.x.org diff --git a/package/x11r7/mcookie/mcookie.c b/package/x11r7/mcookie/mcookie.c new file mode 100644 index 0000000000..902d92fc47 --- /dev/null +++ b/package/x11r7/mcookie/mcookie.c @@ -0,0 +1,425 @@ +/* mcookie.c -- Generates random numbers for xauth + * Created: Fri Feb 3 10:42:48 1995 by faith@cs.unc.edu + * Revised: Fri Mar 19 07:48:01 1999 by faith@acm.org + * Public Domain 1995, 1999 Rickard E. Faith (faith@acm.org) + * This program comes with ABSOLUTELY NO WARRANTY. + * + * $Id: mcookie.c,v 1.5 1997/07/06 00:13:06 aebr Exp $ + * + * This program gathers some random bits of data and used the MD5 + * message-digest algorithm to generate a 128-bit hexadecimal number for + * use with xauth(1). + * + * NOTE: Unless /dev/random is available, this program does not actually + * gather 128 bits of random information, so the magic cookie generated + * will be considerably easier to guess than one might expect. + * + * 1999-02-22 Arkadiusz Mi¶kiewicz + * - added Native Language Support + * 1999-03-21 aeb: Added some fragments of code from Colin Plumb. + * + */ + +#include +#include +#include +#include +#include +#include + +#define BUFFERSIZE 4096 + + +#ifndef MD5_H +#define MD5_H + +#if defined (__alpha__) || defined (__ia64__) || defined (__x86_64__) +typedef unsigned int uint32; +#else +typedef unsigned long uint32; +#endif + +struct MD5Context { + uint32 buf[4]; + uint32 bits[2]; + unsigned char in[64]; +}; + +void MD5Init(struct MD5Context *context); +void MD5Update(struct MD5Context *context, unsigned char const *buf, + unsigned len); +void MD5Final(unsigned char digest[16], struct MD5Context *context); +void MD5Transform(uint32 buf[4], uint32 const in[16]); + +/* + * This is needed to make RSAREF happy on some MS-DOS compilers. + */ +typedef struct MD5Context MD5_CTX; + +#endif /* !MD5_H */ + + + +/* + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD5Context structure, pass it to MD5Init, call MD5Update as + * needed on buffers full of bytes, and then call MD5Final, which + * will fill a supplied 16-byte array with the digest. + */ +#include /* for memcpy() */ +#include + +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define byteReverse(buf, len) /* Nothing */ +#else +void byteReverse(unsigned char *buf, unsigned longs); + +/* + * Note: this code is harmless on little-endian machines. + */ +void byteReverse(unsigned char *buf, unsigned longs) +{ + uint32 t; + do { + t = (uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | + ((unsigned) buf[1] << 8 | buf[0]); + *(uint32 *) buf = t; + buf += 4; + } while (--longs); +} +#endif + +/* + * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious + * initialization constants. + */ +void MD5Init(struct MD5Context *ctx) +{ + ctx->buf[0] = 0x67452301; + ctx->buf[1] = 0xefcdab89; + ctx->buf[2] = 0x98badcfe; + ctx->buf[3] = 0x10325476; + + ctx->bits[0] = 0; + ctx->bits[1] = 0; +} + +/* + * Update context to reflect the concatenation of another buffer full + * of bytes. + */ +void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) +{ + uint32 t; + + /* Update bitcount */ + + t = ctx->bits[0]; + if ((ctx->bits[0] = t + ((uint32) len << 3)) < t) + ctx->bits[1]++; /* Carry from low to high */ + ctx->bits[1] += len >> 29; + + t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ + + /* Handle any leading odd-sized chunks */ + + if (t) { + unsigned char *p = (unsigned char *) ctx->in + t; + + t = 64 - t; + if (len < t) { + memcpy(p, buf, len); + return; + } + memcpy(p, buf, t); + byteReverse(ctx->in, 16); + MD5Transform(ctx->buf, (uint32 *) ctx->in); + buf += t; + len -= t; + } + /* Process data in 64-byte chunks */ + + while (len >= 64) { + memcpy(ctx->in, buf, 64); + byteReverse(ctx->in, 16); + MD5Transform(ctx->buf, (uint32 *) ctx->in); + buf += 64; + len -= 64; + } + + /* Handle any remaining bytes of data. */ + + memcpy(ctx->in, buf, len); +} + +/* + * Final wrapup - pad to 64-byte boundary with the bit pattern + * 1 0* (64-bit count of bits processed, MSB-first) + */ +void MD5Final(unsigned char digest[16], struct MD5Context *ctx) +{ + unsigned count; + unsigned char *p; + + /* Compute number of bytes mod 64 */ + count = (ctx->bits[0] >> 3) & 0x3F; + + /* Set the first char of padding to 0x80. This is safe since there is + always at least one byte free */ + p = ctx->in + count; + *p++ = 0x80; + + /* Bytes of padding needed to make 64 bytes */ + count = 64 - 1 - count; + + /* Pad out to 56 mod 64 */ + if (count < 8) { + /* Two lots of padding: Pad the first block to 64 bytes */ + memset(p, 0, count); + byteReverse(ctx->in, 16); + MD5Transform(ctx->buf, (uint32 *) ctx->in); + + /* Now fill the next block with 56 bytes */ + memset(ctx->in, 0, 56); + } else { + /* Pad block to 56 bytes */ + memset(p, 0, count - 8); + } + byteReverse(ctx->in, 14); + + /* Append length in bits and transform */ + ((uint32 *) ctx->in)[14] = ctx->bits[0]; + ((uint32 *) ctx->in)[15] = ctx->bits[1]; + + MD5Transform(ctx->buf, (uint32 *) ctx->in); + byteReverse((unsigned char *) ctx->buf, 4); + memcpy(digest, ctx->buf, 16); + memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ +} + +/* The four core functions - F1 is optimized somewhat */ + +/* #define F1(x, y, z) (x & y | ~x & z) */ +#define F1(x, y, z) (z ^ (x & (y ^ z))) +#define F2(x, y, z) F1(z, x, y) +#define F3(x, y, z) (x ^ y ^ z) +#define F4(x, y, z) (y ^ (x | ~z)) + +/* This is the central step in the MD5 algorithm. */ +#define MD5STEP(f, w, x, y, z, data, s) \ + ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) + +/* + * The core of the MD5 algorithm, this alters an existing MD5 hash to + * reflect the addition of 16 longwords of new data. MD5Update blocks + * the data and converts bytes into longwords for this routine. + */ +void MD5Transform(uint32 buf[4], uint32 const in[16]) +{ + register uint32 a, b, c, d; + + a = buf[0]; + b = buf[1]; + c = buf[2]; + d = buf[3]; + + MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); + MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); + MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); + MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); + MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); + MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); + MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); + MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); + MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); + MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); + MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); + MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); + MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); + MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); + MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); + MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); + + MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); + MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); + MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); + MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); + MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); + MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); + MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); + MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); + MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); + MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); + MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); + MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); + MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); + MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); + MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); + MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); + + MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); + MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); + MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); + MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); + MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); + MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); + MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); + MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); + MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); + MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); + MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); + MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); + MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); + MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); + MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); + MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); + + MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); + MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); + MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); + MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); + MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); + MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); + MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); + MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); + MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); + MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); + MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); + MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); + MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); + MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); + MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); + MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); + + buf[0] += a; + buf[1] += b; + buf[2] += c; + buf[3] += d; +} + + + + +struct rngs { + const char *path; + int minlength, maxlength; +} rngs[] = { + { "/dev/random", 16, 16 }, /* 16 bytes = 128 bits suffice */ + { "/proc/interrupts", 0, 0 }, + { "/proc/slabinfo", 0, 0 }, + { "/proc/stat", 0, 0 }, + { "/dev/urandom", 32, 64 }, +}; +#define RNGS (sizeof(rngs)/sizeof(struct rngs)) + +int Verbose = 0; + +/* The basic function to hash a file */ +static off_t +hash_file(struct MD5Context *ctx, int fd) +{ + off_t count = 0; + ssize_t r; + unsigned char buf[BUFFERSIZE]; + + while ((r = read(fd, buf, sizeof(buf))) > 0) { + MD5Update(ctx, buf, r); + count += r; + } + /* Separate files with a null byte */ + buf[0] = 0; + MD5Update(ctx, buf, 1); + return count; +} + +int main( int argc, char **argv ) +{ + int i; + struct MD5Context ctx; + unsigned char digest[16]; + unsigned char buf[BUFFERSIZE]; + int fd; + int c; + pid_t pid; + char *file = NULL; + int r; + struct timeval tv; + struct timezone tz; + + while ((c = getopt( argc, argv, "vf:" )) != -1) + switch (c) { + case 'v': ++Verbose; break; + case 'f': file = optarg; break; + } + + MD5Init( &ctx ); + + gettimeofday( &tv, &tz ); + MD5Update( &ctx, (unsigned char *)&tv, sizeof( tv ) ); + pid = getppid(); + MD5Update( &ctx, (unsigned char *)&pid, sizeof( pid )); + pid = getpid(); + MD5Update( &ctx, (unsigned char *)&pid, sizeof( pid )); + + if (file) { + int count = 0; + + if (file[0] == '-' && !file[1]) + fd = fileno(stdin); + else + fd = open( file, O_RDONLY ); + + if (fd < 0) { + fprintf( stderr, "Could not open %s\n", file ); + } else { + count = hash_file( &ctx, fd ); + if (Verbose) + fprintf( stderr, "Got %d bytes from %s\n", count, file ); + + if (file[0] != '-' || file[1]) close( fd ); + } + } + + for (i = 0; i < RNGS; i++) { + if ((fd = open( rngs[i].path, O_RDONLY|O_NONBLOCK )) >= 0) { + int count = sizeof(buf); + + if (rngs[i].maxlength && count > rngs[i].maxlength) + count = rngs[i].maxlength; + r = read( fd, buf, count ); + if (r > 0) + MD5Update( &ctx, buf, r ); + else + r = 0; + close( fd ); + if (Verbose) + fprintf( stderr, "Got %d bytes from %s\n", r, rngs[i].path ); + if (rngs[i].minlength && r >= rngs[i].minlength) + break; + } else if (Verbose) + fprintf( stderr, "Could not open %s\n", rngs[i].path ); + } + + MD5Final( digest, &ctx ); + for (i = 0; i < 16; i++) printf( "%02x", digest[i] ); + putchar ( '\n' ); + + /* + * The following is important for cases like disk full, so shell scripts + * can bomb out properly rather than think they succeeded. + */ + if (fflush(stdout) < 0 || fclose(stdout) < 0) + return 1; + + return 0; +} diff --git a/package/x11r7/mcookie/mcookie.mk b/package/x11r7/mcookie/mcookie.mk new file mode 100644 index 0000000000..87a236fb18 --- /dev/null +++ b/package/x11r7/mcookie/mcookie.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# mcookie +# +################################################################################ + +# Source included in Buildroot +MCOOKIE_SOURCE = +MCOOKIE_LICENSE = Public Domain + +define MCOOKIE_EXTRACT_CMDS + cp package/x11r7/mcookie/mcookie.c $(@D)/ +endef + +define MCOOKIE_BUILD_CMDS + (cd $(@D); $(TARGET_CC) -Wall -Os -s mcookie.c -o mcookie) +endef + +define MCOOKIE_INSTALL_TARGET_CMDS + install -m 0755 -D $(@D)/mcookie $(TARGET_DIR)/usr/bin/mcookie +endef + +$(eval $(generic-package)) diff --git a/package/x11r7/x11r7.mk b/package/x11r7/x11r7.mk new file mode 100644 index 0000000000..85ecbc5968 --- /dev/null +++ b/package/x11r7/x11r7.mk @@ -0,0 +1 @@ +include $(sort $(wildcard package/x11r7/*/*.mk)) diff --git a/package/x11r7/xapp_appres/Config.in b/package/x11r7/xapp_appres/Config.in new file mode 100644 index 0000000000..7574659a6a --- /dev/null +++ b/package/x11r7/xapp_appres/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_APPRES + bool "appres" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXT + help + list X application resource database diff --git a/package/x11r7/xapp_appres/xapp_appres.hash b/package/x11r7/xapp_appres/xapp_appres.hash new file mode 100644 index 0000000000..a1cbf0b4b9 --- /dev/null +++ b/package/x11r7/xapp_appres/xapp_appres.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-May/002211.html +sha256 9f614e9427cd9641a4a801ed5055700afa410674c0b7aa186b86078f11b83e8d appres-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_appres/xapp_appres.mk b/package/x11r7/xapp_appres/xapp_appres.mk new file mode 100644 index 0000000000..b84d7426c6 --- /dev/null +++ b/package/x11r7/xapp_appres/xapp_appres.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_appres +# +################################################################################ + +XAPP_APPRES_VERSION = 1.0.4 +XAPP_APPRES_SOURCE = appres-$(XAPP_APPRES_VERSION).tar.bz2 +XAPP_APPRES_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_APPRES_LICENSE = MIT +XAPP_APPRES_LICENSE_FILES = COPYING +XAPP_APPRES_DEPENDENCIES = xlib_libX11 xlib_libXt + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_bdftopcf/Config.in b/package/x11r7/xapp_bdftopcf/Config.in new file mode 100644 index 0000000000..a9caffa649 --- /dev/null +++ b/package/x11r7/xapp_bdftopcf/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_BDFTOPCF + bool "bdftopcf" + select BR2_PACKAGE_XLIB_LIBXFONT + help + X.Org bdftopcf application diff --git a/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.hash b/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.hash new file mode 100644 index 0000000000..7bb7fd363e --- /dev/null +++ b/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-December/002509.html +sha256 38f447be0c61f94c473f128cf519dd0cff63b5d7775240a2e895a183a61e2026 bdftopcf-1.0.5.tar.bz2 diff --git a/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.mk b/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.mk new file mode 100644 index 0000000000..ebdcda5756 --- /dev/null +++ b/package/x11r7/xapp_bdftopcf/xapp_bdftopcf.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xapp_bdftopcf +# +################################################################################ + +XAPP_BDFTOPCF_VERSION = 1.0.5 +XAPP_BDFTOPCF_SOURCE = bdftopcf-$(XAPP_BDFTOPCF_VERSION).tar.bz2 +XAPP_BDFTOPCF_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_BDFTOPCF_LICENSE = MIT +XAPP_BDFTOPCF_LICENSE_FILES = COPYING +XAPP_BDFTOPCF_DEPENDENCIES = xlib_libXfont + +# needed for linking against libXfont +XAPP_BDFTOPCF_MAKE_OPTS += LIBS=-ldl + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_beforelight/Config.in b/package/x11r7/xapp_beforelight/Config.in new file mode 100644 index 0000000000..3a111897a9 --- /dev/null +++ b/package/x11r7/xapp_beforelight/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_BEFORELIGHT + bool "beforelight" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXSCRNSAVER + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXT + help + screen saver diff --git a/package/x11r7/xapp_beforelight/xapp_beforelight.hash b/package/x11r7/xapp_beforelight/xapp_beforelight.hash new file mode 100644 index 0000000000..3586b36844 --- /dev/null +++ b/package/x11r7/xapp_beforelight/xapp_beforelight.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-January/002131.html +sha256 8fcab6f15148ca680c0d3da8de7dcb41f8e6a076f442cf8bdcf272be9e348166 beforelight-1.0.5.tar.bz2 diff --git a/package/x11r7/xapp_beforelight/xapp_beforelight.mk b/package/x11r7/xapp_beforelight/xapp_beforelight.mk new file mode 100644 index 0000000000..b39fe7870e --- /dev/null +++ b/package/x11r7/xapp_beforelight/xapp_beforelight.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_beforelight +# +################################################################################ + +XAPP_BEFORELIGHT_VERSION = 1.0.5 +XAPP_BEFORELIGHT_SOURCE = beforelight-$(XAPP_BEFORELIGHT_VERSION).tar.bz2 +XAPP_BEFORELIGHT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_BEFORELIGHT_LICENSE = MIT +XAPP_BEFORELIGHT_LICENSE_FILES = COPYING +XAPP_BEFORELIGHT_DEPENDENCIES = xlib_libX11 xlib_libXScrnSaver xlib_libXaw xlib_libXt + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_bitmap/Config.in b/package/x11r7/xapp_bitmap/Config.in new file mode 100644 index 0000000000..e5bb5e8344 --- /dev/null +++ b/package/x11r7/xapp_bitmap/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_BITMAP + bool "bitmap" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XDATA_XBITMAPS + help + X.Org bitmap application diff --git a/package/x11r7/xapp_bitmap/xapp_bitmap.hash b/package/x11r7/xapp_bitmap/xapp_bitmap.hash new file mode 100644 index 0000000000..cd64362084 --- /dev/null +++ b/package/x11r7/xapp_bitmap/xapp_bitmap.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-January/002518.html +sha256 806cdeb80f5466ba9121e8cc6c6af82d3e4b32ef1a57bc5a76c15887640ec35d bitmap-1.0.8.tar.bz2 diff --git a/package/x11r7/xapp_bitmap/xapp_bitmap.mk b/package/x11r7/xapp_bitmap/xapp_bitmap.mk new file mode 100644 index 0000000000..851af31382 --- /dev/null +++ b/package/x11r7/xapp_bitmap/xapp_bitmap.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_bitmap +# +################################################################################ + +XAPP_BITMAP_VERSION = 1.0.8 +XAPP_BITMAP_SOURCE = bitmap-$(XAPP_BITMAP_VERSION).tar.bz2 +XAPP_BITMAP_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_BITMAP_LICENSE = MIT +XAPP_BITMAP_LICENSE_FILES = COPYING +XAPP_BITMAP_DEPENDENCIES = xlib_libX11 xlib_libXaw xlib_libXmu xdata_xbitmaps + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_editres/Config.in b/package/x11r7/xapp_editres/Config.in new file mode 100644 index 0000000000..390ec4875a --- /dev/null +++ b/package/x11r7/xapp_editres/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_EDITRES + bool "editres" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXT + help + a dynamic resource editor for X Toolkit applications diff --git a/package/x11r7/xapp_editres/xapp_editres.hash b/package/x11r7/xapp_editres/xapp_editres.hash new file mode 100644 index 0000000000..74fc98d63c --- /dev/null +++ b/package/x11r7/xapp_editres/xapp_editres.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-January/002120.html +sha256 3b66d1240bde853872bbb341c4b8fb029094d0a5d21347a58831f15b162c4df0 editres-1.0.6.tar.bz2 diff --git a/package/x11r7/xapp_editres/xapp_editres.mk b/package/x11r7/xapp_editres/xapp_editres.mk new file mode 100644 index 0000000000..6cc4805f5f --- /dev/null +++ b/package/x11r7/xapp_editres/xapp_editres.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_editres +# +################################################################################ + +XAPP_EDITRES_VERSION = 1.0.6 +XAPP_EDITRES_SOURCE = editres-$(XAPP_EDITRES_VERSION).tar.bz2 +XAPP_EDITRES_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_EDITRES_LICENSE = MIT +XAPP_EDITRES_LICENSE_FILES = COPYING +XAPP_EDITRES_DEPENDENCIES = xlib_libX11 xlib_libXaw xlib_libXmu xlib_libXt + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_fonttosfnt/Config.in b/package/x11r7/xapp_fonttosfnt/Config.in new file mode 100644 index 0000000000..eb35710f0a --- /dev/null +++ b/package/x11r7/xapp_fonttosfnt/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_FONTTOSFNT + bool "fonttosfnt" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBFONTENC + help + X.Org fonttosfnt application diff --git a/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.hash b/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.hash new file mode 100644 index 0000000000..e76c5c8856 --- /dev/null +++ b/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2008-May/000543.html +sha1 a609fba513947e5267c924f85774c0e44a076a7d fonttosfnt-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.mk b/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.mk new file mode 100644 index 0000000000..1571a3baf3 --- /dev/null +++ b/package/x11r7/xapp_fonttosfnt/xapp_fonttosfnt.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_fonttosfnt +# +################################################################################ + +XAPP_FONTTOSFNT_VERSION = 1.0.4 +XAPP_FONTTOSFNT_SOURCE = fonttosfnt-$(XAPP_FONTTOSFNT_VERSION).tar.bz2 +XAPP_FONTTOSFNT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_FONTTOSFNT_LICENSE = MIT +XAPP_FONTTOSFNT_LICENSE_FILES = COPYING +XAPP_FONTTOSFNT_DEPENDENCIES = freetype xlib_libX11 xlib_libfontenc + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_fslsfonts/Config.in b/package/x11r7/xapp_fslsfonts/Config.in new file mode 100644 index 0000000000..1917d615f2 --- /dev/null +++ b/package/x11r7/xapp_fslsfonts/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_FSLSFONTS + bool "fslsfonts" + select BR2_PACKAGE_XLIB_LIBFS + select BR2_PACKAGE_XLIB_LIBX11 + help + list fonts served by X font server diff --git a/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.hash b/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.hash new file mode 100644 index 0000000000..d1d2b65aa9 --- /dev/null +++ b/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-December/002510.html +sha256 f1ed55093356b78daec2678d22f52d42ec11fe88575562d734396962e626d7f6 fslsfonts-1.0.5.tar.bz2 diff --git a/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.mk b/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.mk new file mode 100644 index 0000000000..27786a55c1 --- /dev/null +++ b/package/x11r7/xapp_fslsfonts/xapp_fslsfonts.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_fslsfonts +# +################################################################################ + +XAPP_FSLSFONTS_VERSION = 1.0.5 +XAPP_FSLSFONTS_SOURCE = fslsfonts-$(XAPP_FSLSFONTS_VERSION).tar.bz2 +XAPP_FSLSFONTS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_FSLSFONTS_LICENSE = MIT +XAPP_FSLSFONTS_LICENSE_FILES = COPYING +XAPP_FSLSFONTS_DEPENDENCIES = xlib_libFS xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_fstobdf/Config.in b/package/x11r7/xapp_fstobdf/Config.in new file mode 100644 index 0000000000..0a1f62baa8 --- /dev/null +++ b/package/x11r7/xapp_fstobdf/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_FSTOBDF + bool "fstobdf" + select BR2_PACKAGE_XLIB_LIBFS + select BR2_PACKAGE_XLIB_LIBX11 + help + generate BDF font from X font server diff --git a/package/x11r7/xapp_fstobdf/xapp_fstobdf.hash b/package/x11r7/xapp_fstobdf/xapp_fstobdf.hash new file mode 100644 index 0000000000..d12e8e5c42 --- /dev/null +++ b/package/x11r7/xapp_fstobdf/xapp_fstobdf.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-December/002511.html +sha256 66cf550326c993e7043f260a8ec4a533a3bf9d8f0e7397a6fe9cca803732e92e fstobdf-1.0.6.tar.bz2 diff --git a/package/x11r7/xapp_fstobdf/xapp_fstobdf.mk b/package/x11r7/xapp_fstobdf/xapp_fstobdf.mk new file mode 100644 index 0000000000..e897514c80 --- /dev/null +++ b/package/x11r7/xapp_fstobdf/xapp_fstobdf.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_fstobdf +# +################################################################################ + +XAPP_FSTOBDF_VERSION = 1.0.6 +XAPP_FSTOBDF_SOURCE = fstobdf-$(XAPP_FSTOBDF_VERSION).tar.bz2 +XAPP_FSTOBDF_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_FSTOBDF_LICENSE = MIT +XAPP_FSTOBDF_LICENSE_FILES = COPYING +XAPP_FSTOBDF_DEPENDENCIES = xlib_libFS xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_iceauth/Config.in b/package/x11r7/xapp_iceauth/Config.in new file mode 100644 index 0000000000..ce2db98865 --- /dev/null +++ b/package/x11r7/xapp_iceauth/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_ICEAUTH + bool "iceauth" + select BR2_PACKAGE_XLIB_LIBICE + select BR2_PACKAGE_XLIB_LIBX11 + help + ICE authority file utility diff --git a/package/x11r7/xapp_iceauth/xapp_iceauth.hash b/package/x11r7/xapp_iceauth/xapp_iceauth.hash new file mode 100644 index 0000000000..90c5f70bfa --- /dev/null +++ b/package/x11r7/xapp_iceauth/xapp_iceauth.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-January/002519.html +sha256 1216af2dee99b318fcf8bf9a259915273bcb37a7f1e7859af4f15d0ebf6f3f0a iceauth-1.0.7.tar.bz2 diff --git a/package/x11r7/xapp_iceauth/xapp_iceauth.mk b/package/x11r7/xapp_iceauth/xapp_iceauth.mk new file mode 100644 index 0000000000..d30ff6f786 --- /dev/null +++ b/package/x11r7/xapp_iceauth/xapp_iceauth.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_iceauth +# +################################################################################ + +XAPP_ICEAUTH_VERSION = 1.0.7 +XAPP_ICEAUTH_SOURCE = iceauth-$(XAPP_ICEAUTH_VERSION).tar.bz2 +XAPP_ICEAUTH_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_ICEAUTH_LICENSE = MIT +XAPP_ICEAUTH_LICENSE_FILES = COPYING +XAPP_ICEAUTH_DEPENDENCIES = xlib_libICE xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_ico/Config.in b/package/x11r7/xapp_ico/Config.in new file mode 100644 index 0000000000..892f2be8e5 --- /dev/null +++ b/package/x11r7/xapp_ico/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_ICO + bool "ico" + select BR2_PACKAGE_XLIB_LIBX11 + help + animate an icosahedron or other polyhedron diff --git a/package/x11r7/xapp_ico/xapp_ico.hash b/package/x11r7/xapp_ico/xapp_ico.hash new file mode 100644 index 0000000000..055e85ea67 --- /dev/null +++ b/package/x11r7/xapp_ico/xapp_ico.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-January/002135.html +sha256 2932767098f95ca129a0c7f0fecb0a18c789a79c1747f7423fdfe9f4e0c53590 ico-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_ico/xapp_ico.mk b/package/x11r7/xapp_ico/xapp_ico.mk new file mode 100644 index 0000000000..621d1e489e --- /dev/null +++ b/package/x11r7/xapp_ico/xapp_ico.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_ico +# +################################################################################ + +XAPP_ICO_VERSION = 1.0.4 +XAPP_ICO_SOURCE = ico-$(XAPP_ICO_VERSION).tar.bz2 +XAPP_ICO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_ICO_LICENSE = MIT +XAPP_ICO_LICENSE_FILES = COPYING +XAPP_ICO_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_listres/Config.in b/package/x11r7/xapp_listres/Config.in new file mode 100644 index 0000000000..a3be6b3825 --- /dev/null +++ b/package/x11r7/xapp_listres/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_LISTRES + bool "listres" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXT + help + list resources in widgets diff --git a/package/x11r7/xapp_listres/xapp_listres.hash b/package/x11r7/xapp_listres/xapp_listres.hash new file mode 100644 index 0000000000..ffc9f7eecb --- /dev/null +++ b/package/x11r7/xapp_listres/xapp_listres.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-February/001838.html +sha256 c3d71e9a01650e3fd470189a749cd0202ef03d9e399350a7a7443d7595ed478e listres-1.0.3.tar.bz2 diff --git a/package/x11r7/xapp_listres/xapp_listres.mk b/package/x11r7/xapp_listres/xapp_listres.mk new file mode 100644 index 0000000000..88cdd4f033 --- /dev/null +++ b/package/x11r7/xapp_listres/xapp_listres.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_listres +# +################################################################################ + +XAPP_LISTRES_VERSION = 1.0.3 +XAPP_LISTRES_SOURCE = listres-$(XAPP_LISTRES_VERSION).tar.bz2 +XAPP_LISTRES_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_LISTRES_LICENSE = MIT +XAPP_LISTRES_LICENSE_FILES = COPYING +XAPP_LISTRES_DEPENDENCIES = xlib_libX11 xlib_libXaw xlib_libXmu xlib_libXt + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_luit/0001-posix-openpt.patch b/package/x11r7/xapp_luit/0001-posix-openpt.patch new file mode 100644 index 0000000000..c8ff8e4396 --- /dev/null +++ b/package/x11r7/xapp_luit/0001-posix-openpt.patch @@ -0,0 +1,19 @@ +Suggested workaround to build with recent gcc versions + +Upstream bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47792 + +Signed-off-by: Markos Chandras + +Index: xapp_luit-1.1.1/sys.c +=================================================================== +--- xapp_luit-1.1.1.orig/sys.c ++++ xapp_luit-1.1.1/sys.c +@@ -20,6 +20,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWAR + THE SOFTWARE. + */ + ++#define _XOPEN_SOURCE 600 ++ + #ifdef HAVE_CONFIG_H + # include "config.h" + #endif diff --git a/package/x11r7/xapp_luit/Config.in b/package/x11r7/xapp_luit/Config.in new file mode 100644 index 0000000000..3e314de182 --- /dev/null +++ b/package/x11r7/xapp_luit/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_LUIT + bool "luit" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBFONTENC + depends on BR2_USE_MMU # fork() + help + Locale and ISO 2022 support for Unicode terminals diff --git a/package/x11r7/xapp_luit/xapp_luit.hash b/package/x11r7/xapp_luit/xapp_luit.hash new file mode 100644 index 0000000000..4763b0d917 --- /dev/null +++ b/package/x11r7/xapp_luit/xapp_luit.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-March/001894.html +sha256 30b0e787cb07a0f504b70f1d6123930522111ce9d4276f6683a69b322b49c636 luit-1.1.1.tar.bz2 diff --git a/package/x11r7/xapp_luit/xapp_luit.mk b/package/x11r7/xapp_luit/xapp_luit.mk new file mode 100644 index 0000000000..d3217fe581 --- /dev/null +++ b/package/x11r7/xapp_luit/xapp_luit.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_luit +# +################################################################################ + +XAPP_LUIT_VERSION = 1.1.1 +XAPP_LUIT_SOURCE = luit-$(XAPP_LUIT_VERSION).tar.bz2 +XAPP_LUIT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_LUIT_LICENSE = MIT +XAPP_LUIT_LICENSE_FILES = COPYING +XAPP_LUIT_DEPENDENCIES = xlib_libX11 xlib_libfontenc + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_mkfontdir/Config.in b/package/x11r7/xapp_mkfontdir/Config.in new file mode 100644 index 0000000000..155772d13b --- /dev/null +++ b/package/x11r7/xapp_mkfontdir/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_MKFONTDIR + bool "mkfontdir" + select BR2_PACKAGE_XAPP_MKFONTSCALE + help + create an index of X font files in a directory diff --git a/package/x11r7/xapp_mkfontdir/xapp_mkfontdir.hash b/package/x11r7/xapp_mkfontdir/xapp_mkfontdir.hash new file mode 100644 index 0000000000..7a218b98c3 --- /dev/null +++ b/package/x11r7/xapp_mkfontdir/xapp_mkfontdir.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-February/001818.html +sha256 56d52a482df130484e51fd066d1b6eda7c2c02ddbc91fe6e2be1b9c4e7306530 mkfontdir-1.0.7.tar.bz2 diff --git a/package/x11r7/xapp_mkfontdir/xapp_mkfontdir.mk b/package/x11r7/xapp_mkfontdir/xapp_mkfontdir.mk new file mode 100644 index 0000000000..b74f9939ce --- /dev/null +++ b/package/x11r7/xapp_mkfontdir/xapp_mkfontdir.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_mkfontdir +# +################################################################################ + +XAPP_MKFONTDIR_VERSION = 1.0.7 +XAPP_MKFONTDIR_SOURCE = mkfontdir-$(XAPP_MKFONTDIR_VERSION).tar.bz2 +XAPP_MKFONTDIR_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_MKFONTDIR_LICENSE = MIT +XAPP_MKFONTDIR_LICENSE_FILES = COPYING +XAPP_MKFONTDIR_DEPENDENCIES = xapp_mkfontscale + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_mkfontscale/Config.in b/package/x11r7/xapp_mkfontscale/Config.in new file mode 100644 index 0000000000..540dd455ff --- /dev/null +++ b/package/x11r7/xapp_mkfontscale/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_MKFONTSCALE + bool "mkfontscale" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBFONTENC + help + create an index of scalable font files for X diff --git a/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.hash b/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.hash new file mode 100644 index 0000000000..0cab2b2d1b --- /dev/null +++ b/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-January/002520.html +sha256 8c6d5228af885477b9aec60ca6f172578e7d2de42234357af62fb00439453f20 mkfontscale-1.1.2.tar.bz2 diff --git a/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.mk b/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.mk new file mode 100644 index 0000000000..b99a646044 --- /dev/null +++ b/package/x11r7/xapp_mkfontscale/xapp_mkfontscale.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_mkfontscale +# +################################################################################ + +XAPP_MKFONTSCALE_VERSION = 1.1.2 +XAPP_MKFONTSCALE_SOURCE = mkfontscale-$(XAPP_MKFONTSCALE_VERSION).tar.bz2 +XAPP_MKFONTSCALE_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_MKFONTSCALE_LICENSE = MIT +XAPP_MKFONTSCALE_LICENSE_FILES = COPYING +XAPP_MKFONTSCALE_DEPENDENCIES = zlib freetype xlib_libfontenc xproto_xproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_oclock/Config.in b/package/x11r7/xapp_oclock/Config.in new file mode 100644 index 0000000000..00cd4132c8 --- /dev/null +++ b/package/x11r7/xapp_oclock/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_OCLOCK + bool "oclock" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXMU + help + round X clock diff --git a/package/x11r7/xapp_oclock/xapp_oclock.hash b/package/x11r7/xapp_oclock/xapp_oclock.hash new file mode 100644 index 0000000000..ad54499c5e --- /dev/null +++ b/package/x11r7/xapp_oclock/xapp_oclock.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-February/001820.html +sha256 54f5fb85f5828705683f457e559fb18753332db15ae82da561b0ae5a63915091 oclock-1.0.3.tar.bz2 diff --git a/package/x11r7/xapp_oclock/xapp_oclock.mk b/package/x11r7/xapp_oclock/xapp_oclock.mk new file mode 100644 index 0000000000..17d544ccc4 --- /dev/null +++ b/package/x11r7/xapp_oclock/xapp_oclock.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# xapp_oclock +# +################################################################################ + +XAPP_OCLOCK_VERSION = 1.0.3 +XAPP_OCLOCK_SOURCE = oclock-$(XAPP_OCLOCK_VERSION).tar.bz2 +XAPP_OCLOCK_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_OCLOCK_LICENSE = MIT +XAPP_OCLOCK_LICENSE_FILES = COPYING +XAPP_OCLOCK_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXmu + +ifeq ($(BR2_PACKAGE_XLIB_LIBXKBFILE),y) +XAPP_OCLOCK_CONF_OPTS += --with-xkb +XAPP_OCLOCK_DEPENDENCIES += xlib_libxkbfile +else +XAPP_OCLOCK_CONF_OPTS += --without-xkb +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_rgb/Config.in b/package/x11r7/xapp_rgb/Config.in new file mode 100644 index 0000000000..038b849d4b --- /dev/null +++ b/package/x11r7/xapp_rgb/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_RGB + bool "rgb" + select BR2_PACKAGE_XPROTO_XPROTO + help + uncompile an rgb color-name database diff --git a/package/x11r7/xapp_rgb/xapp_rgb.hash b/package/x11r7/xapp_rgb/xapp_rgb.hash new file mode 100644 index 0000000000..2b67bfc8e0 --- /dev/null +++ b/package/x11r7/xapp_rgb/xapp_rgb.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-November/002494.html +sha256 bbca7c6aa59939b9f6a0fb9fff15dfd62176420ffd4ae30c8d92a6a125fbe6b0 rgb-1.0.6.tar.bz2 diff --git a/package/x11r7/xapp_rgb/xapp_rgb.mk b/package/x11r7/xapp_rgb/xapp_rgb.mk new file mode 100644 index 0000000000..82878abad0 --- /dev/null +++ b/package/x11r7/xapp_rgb/xapp_rgb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_rgb +# +################################################################################ + +XAPP_RGB_VERSION = 1.0.6 +XAPP_RGB_SOURCE = rgb-$(XAPP_RGB_VERSION).tar.bz2 +XAPP_RGB_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_RGB_LICENSE = MIT +XAPP_RGB_LICENSE_FILES = COPYING +XAPP_RGB_DEPENDENCIES = xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_rstart/Config.in b/package/x11r7/xapp_rstart/Config.in new file mode 100644 index 0000000000..3c1d5a9e1e --- /dev/null +++ b/package/x11r7/xapp_rstart/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_RSTART + bool "rstart" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBX11 + help + X.Org rstart application diff --git a/package/x11r7/xapp_rstart/xapp_rstart.hash b/package/x11r7/xapp_rstart/xapp_rstart.hash new file mode 100644 index 0000000000..47b735302b --- /dev/null +++ b/package/x11r7/xapp_rstart/xapp_rstart.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-February/002168.html +sha256 29134e9fdffc8d6ac6904c293b392ba6a493ce571fbd2015485b19a8e4d0ffeb rstart-1.0.5.tar.bz2 diff --git a/package/x11r7/xapp_rstart/xapp_rstart.mk b/package/x11r7/xapp_rstart/xapp_rstart.mk new file mode 100644 index 0000000000..2bcc2923ac --- /dev/null +++ b/package/x11r7/xapp_rstart/xapp_rstart.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_rstart +# +################################################################################ + +XAPP_RSTART_VERSION = 1.0.5 +XAPP_RSTART_SOURCE = rstart-$(XAPP_RSTART_VERSION).tar.bz2 +XAPP_RSTART_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_RSTART_LICENSE = MIT +XAPP_RSTART_LICENSE_FILES = COPYING +XAPP_RSTART_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_scripts/Config.in b/package/x11r7/xapp_scripts/Config.in new file mode 100644 index 0000000000..691f0e21b2 --- /dev/null +++ b/package/x11r7/xapp_scripts/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_SCRIPTS + bool "scripts" + select BR2_PACKAGE_XLIB_LIBX11 + help + start an X program on a remote machine diff --git a/package/x11r7/xapp_scripts/xapp_scripts.mk b/package/x11r7/xapp_scripts/xapp_scripts.mk new file mode 100644 index 0000000000..5146db5708 --- /dev/null +++ b/package/x11r7/xapp_scripts/xapp_scripts.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_scripts +# +################################################################################ + +XAPP_SCRIPTS_VERSION = 1.0.1 +XAPP_SCRIPTS_SOURCE = scripts-$(XAPP_SCRIPTS_VERSION).tar.bz2 +XAPP_SCRIPTS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_SCRIPTS_LICENSE = MIT +XAPP_SCRIPTS_LICENSE_FILES = COPYING +XAPP_SCRIPTS_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_sessreg/0001-Pass-P-to-the-preprocessor-when-generating-filenames.patch b/package/x11r7/xapp_sessreg/0001-Pass-P-to-the-preprocessor-when-generating-filenames.patch new file mode 100644 index 0000000000..5c3e91a491 --- /dev/null +++ b/package/x11r7/xapp_sessreg/0001-Pass-P-to-the-preprocessor-when-generating-filenames.patch @@ -0,0 +1,32 @@ +From 93f5d5abf6b214a4b36e00cd09174d24b2ed0a6d Mon Sep 17 00:00:00 2001 +From: Stefan Dirsch +Date: Wed, 9 Sep 2015 23:44:06 +0200 +Subject: [PATCH] Pass -P to the preprocessor when generating filenames for the + manpage. + +Fixes build with GCC 5. Patch by Richard Biener + +Tested-by: Matt Turner +Signed-off-by: Matt Turner +[Thomas: backport from upstream commit 93f5d5abf6b214a4b36e00cd09174d24b2ed0a6d] +Signed-off-by: Thomas Petazzoni +--- + man/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/man/Makefile.am b/man/Makefile.am +index 665ace5..2e5f146 100644 +--- a/man/Makefile.am ++++ b/man/Makefile.am +@@ -9,7 +9,7 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man + + AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir) + filenames.sed: filenames.sed.c +- $(AM_V_GEN)$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ ++ $(AM_V_GEN)$(CPP) -P $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/filenames.sed.c | \ + $(SED) -n -e '/s|__/ p' -e '/^\/__/ p' > $@ + +-- +2.6.3 + diff --git a/package/x11r7/xapp_sessreg/Config.in b/package/x11r7/xapp_sessreg/Config.in new file mode 100644 index 0000000000..0796bc1bca --- /dev/null +++ b/package/x11r7/xapp_sessreg/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_SESSREG + bool "sessreg" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XPROTO_XPROTO + help + manage utmp/wtmp entries for non-init clients diff --git a/package/x11r7/xapp_sessreg/xapp_sessreg.hash b/package/x11r7/xapp_sessreg/xapp_sessreg.hash new file mode 100644 index 0000000000..9c1a8029b2 --- /dev/null +++ b/package/x11r7/xapp_sessreg/xapp_sessreg.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-January/002522.html +sha256 551177657835e0902b5eee7b19713035beaa1581bbd3c6506baa553e751e017c sessreg-1.1.0.tar.bz2 diff --git a/package/x11r7/xapp_sessreg/xapp_sessreg.mk b/package/x11r7/xapp_sessreg/xapp_sessreg.mk new file mode 100644 index 0000000000..08811c015e --- /dev/null +++ b/package/x11r7/xapp_sessreg/xapp_sessreg.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_sessreg +# +################################################################################ + +XAPP_SESSREG_VERSION = 1.1.0 +XAPP_SESSREG_SOURCE = sessreg-$(XAPP_SESSREG_VERSION).tar.bz2 +XAPP_SESSREG_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_SESSREG_LICENSE = MIT +XAPP_SESSREG_LICENSE_FILES = COPYING +XAPP_SESSREG_DEPENDENCIES = xlib_libX11 xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_setxkbmap/Config.in b/package/x11r7/xapp_setxkbmap/Config.in new file mode 100644 index 0000000000..2b1389c753 --- /dev/null +++ b/package/x11r7/xapp_setxkbmap/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_SETXKBMAP + bool "setxkbmap" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXKBFILE + help + Controls the keyboard layout of a running X server. diff --git a/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.hash b/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.hash new file mode 100644 index 0000000000..bdc5f1cc78 --- /dev/null +++ b/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002563.html +sha256 a9ddb3963f263ba13f0ea105d8c45a531832140530217cc559587bb94f02d3e1 setxkbmap-1.3.1.tar.bz2 diff --git a/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.mk b/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.mk new file mode 100644 index 0000000000..b923d60f53 --- /dev/null +++ b/package/x11r7/xapp_setxkbmap/xapp_setxkbmap.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_setxkbmap +# +################################################################################ + +XAPP_SETXKBMAP_VERSION = 1.3.1 +XAPP_SETXKBMAP_SOURCE = setxkbmap-$(XAPP_SETXKBMAP_VERSION).tar.bz2 +XAPP_SETXKBMAP_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_SETXKBMAP_LICENSE = MIT +XAPP_SETXKBMAP_LICENSE_FILES = COPYING +XAPP_SETXKBMAP_DEPENDENCIES = xlib_libX11 xlib_libxkbfile + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_showfont/Config.in b/package/x11r7/xapp_showfont/Config.in new file mode 100644 index 0000000000..edfab3fc85 --- /dev/null +++ b/package/x11r7/xapp_showfont/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_SHOWFONT + bool "showfont" + select BR2_PACKAGE_XLIB_LIBFS + help + font dumper for X font server diff --git a/package/x11r7/xapp_showfont/xapp_showfont.hash b/package/x11r7/xapp_showfont/xapp_showfont.hash new file mode 100644 index 0000000000..0fff9ce01a --- /dev/null +++ b/package/x11r7/xapp_showfont/xapp_showfont.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-December/002513.html +sha256 e9735c1c530b8a52edfab7415cc0fd7f8d2889095114f4cb689a27476461ac89 showfont-1.0.5.tar.bz2 diff --git a/package/x11r7/xapp_showfont/xapp_showfont.mk b/package/x11r7/xapp_showfont/xapp_showfont.mk new file mode 100644 index 0000000000..c0b8c9a3a2 --- /dev/null +++ b/package/x11r7/xapp_showfont/xapp_showfont.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_showfont +# +################################################################################ + +XAPP_SHOWFONT_VERSION = 1.0.5 +XAPP_SHOWFONT_SOURCE = showfont-$(XAPP_SHOWFONT_VERSION).tar.bz2 +XAPP_SHOWFONT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_SHOWFONT_LICENSE = MIT +XAPP_SHOWFONT_LICENSE_FILES = COPYING +XAPP_SHOWFONT_DEPENDENCIES = xlib_libFS + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_smproxy/Config.in b/package/x11r7/xapp_smproxy/Config.in new file mode 100644 index 0000000000..80ab984eb9 --- /dev/null +++ b/package/x11r7/xapp_smproxy/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_SMPROXY + bool "smproxy" + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXT + help + Session Manager Proxy diff --git a/package/x11r7/xapp_smproxy/xapp_smproxy.hash b/package/x11r7/xapp_smproxy/xapp_smproxy.hash new file mode 100644 index 0000000000..7bb7bdb3da --- /dev/null +++ b/package/x11r7/xapp_smproxy/xapp_smproxy.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002564.html +sha256 6cf19155a2752237f36dbf8bc4184465ea190d2652f887faccb4e2a6ebf77266 smproxy-1.0.6.tar.bz2 diff --git a/package/x11r7/xapp_smproxy/xapp_smproxy.mk b/package/x11r7/xapp_smproxy/xapp_smproxy.mk new file mode 100644 index 0000000000..f51c1ec090 --- /dev/null +++ b/package/x11r7/xapp_smproxy/xapp_smproxy.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_smproxy +# +################################################################################ + +XAPP_SMPROXY_VERSION = 1.0.6 +XAPP_SMPROXY_SOURCE = smproxy-$(XAPP_SMPROXY_VERSION).tar.bz2 +XAPP_SMPROXY_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_SMPROXY_LICENSE = MIT +XAPP_SMPROXY_LICENSE_FILES = COPYING +XAPP_SMPROXY_DEPENDENCIES = xlib_libXmu xlib_libXt + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_twm/Config.in b/package/x11r7/xapp_twm/Config.in new file mode 100644 index 0000000000..25bf800f6a --- /dev/null +++ b/package/x11r7/xapp_twm/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_TWM + bool "twm" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXMU + help + No description available diff --git a/package/x11r7/xapp_twm/xapp_twm.hash b/package/x11r7/xapp_twm/xapp_twm.hash new file mode 100644 index 0000000000..eecc5c4e51 --- /dev/null +++ b/package/x11r7/xapp_twm/xapp_twm.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002565.html +sha256 c575167ac33edf3bd1592f1bedfe0559debb128ed5fb4873c1278e3be166310a twm-1.0.9.tar.bz2 diff --git a/package/x11r7/xapp_twm/xapp_twm.mk b/package/x11r7/xapp_twm/xapp_twm.mk new file mode 100644 index 0000000000..1f576e15bd --- /dev/null +++ b/package/x11r7/xapp_twm/xapp_twm.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_twm +# +################################################################################ + +XAPP_TWM_VERSION = 1.0.9 +XAPP_TWM_SOURCE = twm-$(XAPP_TWM_VERSION).tar.bz2 +XAPP_TWM_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_TWM_LICENSE = MIT +XAPP_TWM_LICENSE_FILES = COPYING +XAPP_TWM_DEPENDENCIES = \ + host-bison xlib_libX11 xlib_libXext xlib_libXt xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_viewres/Config.in b/package/x11r7/xapp_viewres/Config.in new file mode 100644 index 0000000000..32827c8003 --- /dev/null +++ b/package/x11r7/xapp_viewres/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_VIEWRES + bool "viewres" + select BR2_PACKAGE_XLIB_LIBXAW + help + graphical class browser for Xt diff --git a/package/x11r7/xapp_viewres/xapp_viewres.hash b/package/x11r7/xapp_viewres/xapp_viewres.hash new file mode 100644 index 0000000000..c45b1b25f7 --- /dev/null +++ b/package/x11r7/xapp_viewres/xapp_viewres.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-January/002122.html +sha256 d9c11b44908d91926df8b33428ae04c86c85e4f8380e9b5e68326a651c872e59 viewres-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_viewres/xapp_viewres.mk b/package/x11r7/xapp_viewres/xapp_viewres.mk new file mode 100644 index 0000000000..3e1fd8ddca --- /dev/null +++ b/package/x11r7/xapp_viewres/xapp_viewres.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_viewres +# +################################################################################ + +XAPP_VIEWRES_VERSION = 1.0.4 +XAPP_VIEWRES_SOURCE = viewres-$(XAPP_VIEWRES_VERSION).tar.bz2 +XAPP_VIEWRES_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_VIEWRES_LICENSE = MIT +XAPP_VIEWRES_LICENSE_FILES = COPYING +XAPP_VIEWRES_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_x11perf/Config.in b/package/x11r7/xapp_x11perf/Config.in new file mode 100644 index 0000000000..0f1eca8938 --- /dev/null +++ b/package/x11r7/xapp_x11perf/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_X11PERF + bool "x11perf" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXFT + help + summarize x11perf results diff --git a/package/x11r7/xapp_x11perf/xapp_x11perf.hash b/package/x11r7/xapp_x11perf/xapp_x11perf.hash new file mode 100644 index 0000000000..8580993fdb --- /dev/null +++ b/package/x11r7/xapp_x11perf/xapp_x11perf.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002566.html +sha256 e87098dec1947572d70c62697a7b70bde1ab5668237d4660080eade6bc096751 x11perf-1.6.0.tar.bz2 diff --git a/package/x11r7/xapp_x11perf/xapp_x11perf.mk b/package/x11r7/xapp_x11perf/xapp_x11perf.mk new file mode 100644 index 0000000000..8cba79d97e --- /dev/null +++ b/package/x11r7/xapp_x11perf/xapp_x11perf.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_x11perf +# +################################################################################ + +XAPP_X11PERF_VERSION = 1.6.0 +XAPP_X11PERF_SOURCE = x11perf-$(XAPP_X11PERF_VERSION).tar.bz2 +XAPP_X11PERF_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_X11PERF_LICENSE = MIT +XAPP_X11PERF_LICENSE_FILES = COPYING +XAPP_X11PERF_DEPENDENCIES = xlib_libX11 xlib_libXmu xlib_libXft + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xauth/Config.in b/package/x11r7/xapp_xauth/Config.in new file mode 100644 index 0000000000..919fd50bd8 --- /dev/null +++ b/package/x11r7/xapp_xauth/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XAUTH + bool "xauth" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAU + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXMU + help + X authority file utility diff --git a/package/x11r7/xapp_xauth/xapp_xauth.hash b/package/x11r7/xapp_xauth/xapp_xauth.hash new file mode 100644 index 0000000000..922cecf602 --- /dev/null +++ b/package/x11r7/xapp_xauth/xapp_xauth.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-April/002414.html +sha256 56ce1523eb48b1f8a4f4244fe1c3d8e6af1a3b7d4b0e6063582421b0b68dc28f xauth-1.0.9.tar.bz2 diff --git a/package/x11r7/xapp_xauth/xapp_xauth.mk b/package/x11r7/xapp_xauth/xapp_xauth.mk new file mode 100644 index 0000000000..a2307f2817 --- /dev/null +++ b/package/x11r7/xapp_xauth/xapp_xauth.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xauth +# +################################################################################ + +XAPP_XAUTH_VERSION = 1.0.9 +XAPP_XAUTH_SOURCE = xauth-$(XAPP_XAUTH_VERSION).tar.bz2 +XAPP_XAUTH_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XAUTH_LICENSE = MIT +XAPP_XAUTH_LICENSE_FILES = COPYING +XAPP_XAUTH_DEPENDENCIES = xlib_libX11 xlib_libXau xlib_libXext xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xbacklight/Config.in b/package/x11r7/xapp_xbacklight/Config.in new file mode 100644 index 0000000000..5764056d34 --- /dev/null +++ b/package/x11r7/xapp_xbacklight/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XBACKLIGHT + bool "xbacklight" + select BR2_PACKAGE_XCB_UTIL + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBXRENDER + help + xbacklight diff --git a/package/x11r7/xapp_xbacklight/xapp_xbacklight.hash b/package/x11r7/xapp_xbacklight/xapp_xbacklight.hash new file mode 100644 index 0000000000..058c53fca2 --- /dev/null +++ b/package/x11r7/xapp_xbacklight/xapp_xbacklight.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-October/002331.html +sha256 17f6cf51a35eaa918abec36b7871d28b712c169312e22a0eaf1ffe8d6468362b xbacklight-1.2.1.tar.bz2 diff --git a/package/x11r7/xapp_xbacklight/xapp_xbacklight.mk b/package/x11r7/xapp_xbacklight/xapp_xbacklight.mk new file mode 100644 index 0000000000..88c4bc5dbe --- /dev/null +++ b/package/x11r7/xapp_xbacklight/xapp_xbacklight.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xbacklight +# +################################################################################ + +XAPP_XBACKLIGHT_VERSION = 1.2.1 +XAPP_XBACKLIGHT_SOURCE = xbacklight-$(XAPP_XBACKLIGHT_VERSION).tar.bz2 +XAPP_XBACKLIGHT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XBACKLIGHT_LICENSE = MIT +XAPP_XBACKLIGHT_LICENSE_FILES = COPYING +XAPP_XBACKLIGHT_DEPENDENCIES = xlib_libX11 xlib_libXrandr xlib_libXrender xcb-util + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xbiff/Config.in b/package/x11r7/xapp_xbiff/Config.in new file mode 100644 index 0000000000..ea4b58aa89 --- /dev/null +++ b/package/x11r7/xapp_xbiff/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XBIFF + bool "xbiff" + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XDATA_XBITMAPS + help + mailbox flag for X diff --git a/package/x11r7/xapp_xbiff/xapp_xbiff.hash b/package/x11r7/xapp_xbiff/xapp_xbiff.hash new file mode 100644 index 0000000000..26bf0ae48d --- /dev/null +++ b/package/x11r7/xapp_xbiff/xapp_xbiff.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2011-January/001595.html +sha1 17337a951264f0f96f6d03893f9dfd9cf8f12a5a xbiff-1.0.3.tar.bz2 diff --git a/package/x11r7/xapp_xbiff/xapp_xbiff.mk b/package/x11r7/xapp_xbiff/xapp_xbiff.mk new file mode 100644 index 0000000000..73e0350afb --- /dev/null +++ b/package/x11r7/xapp_xbiff/xapp_xbiff.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xbiff +# +################################################################################ + +XAPP_XBIFF_VERSION = 1.0.3 +XAPP_XBIFF_SOURCE = xbiff-$(XAPP_XBIFF_VERSION).tar.bz2 +XAPP_XBIFF_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XBIFF_LICENSE = MIT +XAPP_XBIFF_LICENSE_FILES = COPYING +XAPP_XBIFF_DEPENDENCIES = xlib_libXaw xdata_xbitmaps + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xcalc/Config.in b/package/x11r7/xapp_xcalc/Config.in new file mode 100644 index 0000000000..2552be0245 --- /dev/null +++ b/package/x11r7/xapp_xcalc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XCALC + bool "xcalc" + select BR2_PACKAGE_XLIB_LIBXAW + help + scientific calculator for X diff --git a/package/x11r7/xapp_xcalc/xapp_xcalc.hash b/package/x11r7/xapp_xcalc/xapp_xcalc.hash new file mode 100644 index 0000000000..e7967558f8 --- /dev/null +++ b/package/x11r7/xapp_xcalc/xapp_xcalc.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-January/002523.html +sha256 2f73c7160c09dc32586ea07daa408ac897c0a16eaa98cad9f9e4ee98cd9057d8 xcalc-1.0.6.tar.bz2 diff --git a/package/x11r7/xapp_xcalc/xapp_xcalc.mk b/package/x11r7/xapp_xcalc/xapp_xcalc.mk new file mode 100644 index 0000000000..58fbdf5710 --- /dev/null +++ b/package/x11r7/xapp_xcalc/xapp_xcalc.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_xcalc +# +################################################################################ + +XAPP_XCALC_VERSION = 1.0.6 +XAPP_XCALC_SOURCE = xcalc-$(XAPP_XCALC_VERSION).tar.bz2 +XAPP_XCALC_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XCALC_LICENSE = MIT +XAPP_XCALC_LICENSE_FILES = COPYING +XAPP_XCALC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-exec install-data +XAPP_XCALC_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xclipboard/Config.in b/package/x11r7/xapp_xclipboard/Config.in new file mode 100644 index 0000000000..941c219752 --- /dev/null +++ b/package/x11r7/xapp_xclipboard/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XCLIPBOARD + bool "xclipboard" + select BR2_PACKAGE_XLIB_LIBXAW + help + interchange between cut buffer and selection diff --git a/package/x11r7/xapp_xclipboard/xapp_xclipboard.hash b/package/x11r7/xapp_xclipboard/xapp_xclipboard.hash new file mode 100644 index 0000000000..682c1f35da --- /dev/null +++ b/package/x11r7/xapp_xclipboard/xapp_xclipboard.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-September/002299.html +sha256 9c0e0a1f4f1d49f73c6cf3ccd27b5ca0e18afc63679f1a1ee466b1d82446ebb5 xclipboard-1.1.3.tar.bz2 diff --git a/package/x11r7/xapp_xclipboard/xapp_xclipboard.mk b/package/x11r7/xapp_xclipboard/xapp_xclipboard.mk new file mode 100644 index 0000000000..3620f757d5 --- /dev/null +++ b/package/x11r7/xapp_xclipboard/xapp_xclipboard.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xclipboard +# +################################################################################ + +XAPP_XCLIPBOARD_VERSION = 1.1.3 +XAPP_XCLIPBOARD_SOURCE = xclipboard-$(XAPP_XCLIPBOARD_VERSION).tar.bz2 +XAPP_XCLIPBOARD_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XCLIPBOARD_LICENSE = MIT +XAPP_XCLIPBOARD_LICENSE_FILES = COPYING +XAPP_XCLIPBOARD_DEPENDENCIES = xlib_libXaw xlib_libXmu xlib_libXt + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xclock/Config.in b/package/x11r7/xapp_xclock/Config.in new file mode 100644 index 0000000000..083a6d1e40 --- /dev/null +++ b/package/x11r7/xapp_xclock/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XAPP_XCLOCK + bool "xclock" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXFT + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXKBFILE + help + analog / digital clock for X diff --git a/package/x11r7/xapp_xclock/xapp_xclock.hash b/package/x11r7/xapp_xclock/xapp_xclock.hash new file mode 100644 index 0000000000..1469077c1b --- /dev/null +++ b/package/x11r7/xapp_xclock/xapp_xclock.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-September/002310.html +sha256 23ceeca94e3e20a6c26a703ac7f789066d4517f8d2cb717ae7cb28a617d97dd0 xclock-1.0.7.tar.bz2 diff --git a/package/x11r7/xapp_xclock/xapp_xclock.mk b/package/x11r7/xapp_xclock/xapp_xclock.mk new file mode 100644 index 0000000000..282d753ffa --- /dev/null +++ b/package/x11r7/xapp_xclock/xapp_xclock.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xclock +# +################################################################################ + +XAPP_XCLOCK_VERSION = 1.0.7 +XAPP_XCLOCK_SOURCE = xclock-$(XAPP_XCLOCK_VERSION).tar.bz2 +XAPP_XCLOCK_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XCLOCK_LICENSE = MIT +XAPP_XCLOCK_LICENSE_FILES = COPYING +XAPP_XCLOCK_DEPENDENCIES = xlib_libX11 xlib_libXaw xlib_libXft xlib_libXrender xlib_libxkbfile + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xcmsdb/Config.in b/package/x11r7/xapp_xcmsdb/Config.in new file mode 100644 index 0000000000..99c9cbb4b9 --- /dev/null +++ b/package/x11r7/xapp_xcmsdb/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XCMSDB + bool "xcmsdb" + select BR2_PACKAGE_XLIB_LIBX11 + help + Device Color Characterization utility for X Color Management System diff --git a/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.hash b/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.hash new file mode 100644 index 0000000000..cc5bbcd07c --- /dev/null +++ b/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002567.html +sha256 e5585361bb8b6a05bb814a8d0e444ee93e0f00180881d3070aff4571e97f67c6 xcmsdb-1.0.5.tar.bz2 diff --git a/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.mk b/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.mk new file mode 100644 index 0000000000..3cccacc0b4 --- /dev/null +++ b/package/x11r7/xapp_xcmsdb/xapp_xcmsdb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xcmsdb +# +################################################################################ + +XAPP_XCMSDB_VERSION = 1.0.5 +XAPP_XCMSDB_SOURCE = xcmsdb-$(XAPP_XCMSDB_VERSION).tar.bz2 +XAPP_XCMSDB_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XCMSDB_LICENSE = MIT +XAPP_XCMSDB_LICENSE_FILES = COPYING +XAPP_XCMSDB_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xcompmgr/Config.in b/package/x11r7/xapp_xcompmgr/Config.in new file mode 100644 index 0000000000..b46014db98 --- /dev/null +++ b/package/x11r7/xapp_xcompmgr/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XAPP_XCOMPMGR + bool "xcompmgr" + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE + select BR2_PACKAGE_XLIB_LIBXDAMAGE + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXRENDER + help + xcompmgr is a sample compositing manager that enables basic + eye-candy effects. diff --git a/package/x11r7/xapp_xcompmgr/xapp_xcompmgr.hash b/package/x11r7/xapp_xcompmgr/xapp_xcompmgr.hash new file mode 100644 index 0000000000..34c13c19d1 --- /dev/null +++ b/package/x11r7/xapp_xcompmgr/xapp_xcompmgr.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002568.html +sha256 c8049b1a2531313be7469ba9b198d334f0b91cc01efc2b20b9afcb117e4d6892 xcompmgr-1.1.7.tar.bz2 diff --git a/package/x11r7/xapp_xcompmgr/xapp_xcompmgr.mk b/package/x11r7/xapp_xcompmgr/xapp_xcompmgr.mk new file mode 100644 index 0000000000..918c1e50ae --- /dev/null +++ b/package/x11r7/xapp_xcompmgr/xapp_xcompmgr.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# xapp_xcompmgr +# +################################################################################ + +XAPP_XCOMPMGR_VERSION = 1.1.7 +XAPP_XCOMPMGR_SOURCE = xcompmgr-$(XAPP_XCOMPMGR_VERSION).tar.bz2 +XAPP_XCOMPMGR_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XCOMPMGR_LICENSE = MIT +XAPP_XCOMPMGR_LICENSE_FILES = COPYING +XAPP_XCOMPMGR_DEPENDENCIES = \ + xlib_libXcomposite \ + xlib_libXdamage \ + xlib_libXext \ + xlib_libXfixes \ + xlib_libXrender + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xconsole/Config.in b/package/x11r7/xapp_xconsole/Config.in new file mode 100644 index 0000000000..1aaa118793 --- /dev/null +++ b/package/x11r7/xapp_xconsole/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XAPP_XCONSOLE + bool "xconsole" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_XLIB_LIBXMU + depends on BR2_USE_MMU # fork() + help + xconsole - monitor system console messages with X diff --git a/package/x11r7/xapp_xconsole/xapp_xconsole.hash b/package/x11r7/xapp_xconsole/xapp_xconsole.hash new file mode 100644 index 0000000000..a62d8cbb22 --- /dev/null +++ b/package/x11r7/xapp_xconsole/xapp_xconsole.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-July/002272.html +sha256 e561959b6ee8b735a32c1050015cfd8c551ed162cabb6cb72e36ce72966855d1 xconsole-1.0.6.tar.bz2 diff --git a/package/x11r7/xapp_xconsole/xapp_xconsole.mk b/package/x11r7/xapp_xconsole/xapp_xconsole.mk new file mode 100644 index 0000000000..971b1b32ea --- /dev/null +++ b/package/x11r7/xapp_xconsole/xapp_xconsole.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xapp_xconsole +# +################################################################################ + +XAPP_XCONSOLE_VERSION = 1.0.6 +XAPP_XCONSOLE_SOURCE = xconsole-$(XAPP_XCONSOLE_VERSION).tar.bz2 +XAPP_XCONSOLE_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XCONSOLE_LICENSE = MIT +XAPP_XCONSOLE_LICENSE_FILES = COPYING +XAPP_XCONSOLE_DEPENDENCIES = \ + xlib_libX11 xlib_libXaw xlib_libXt xproto_xproto \ + xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xcursorgen/Config.in b/package/x11r7/xapp_xcursorgen/Config.in new file mode 100644 index 0000000000..c47ec28f51 --- /dev/null +++ b/package/x11r7/xapp_xcursorgen/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XCURSORGEN + bool "xcursorgen" + select BR2_PACKAGE_LIBPNG + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXCURSOR + help + create an X cursor file from a collection of PNG images diff --git a/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.hash b/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.hash new file mode 100644 index 0000000000..b98d449c1f --- /dev/null +++ b/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-May/002438.html +sha256 31c8910f54eb175a8a74a60e7662697467e21a8bf948220a6048a93924b3f66c xcursorgen-1.0.6.tar.bz2 diff --git a/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.mk b/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.mk new file mode 100644 index 0000000000..f9ca39d2e7 --- /dev/null +++ b/package/x11r7/xapp_xcursorgen/xapp_xcursorgen.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_xcursorgen +# +################################################################################ + +XAPP_XCURSORGEN_VERSION = 1.0.6 +XAPP_XCURSORGEN_SOURCE = xcursorgen-$(XAPP_XCURSORGEN_VERSION).tar.bz2 +XAPP_XCURSORGEN_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XCURSORGEN_LICENSE = MIT +XAPP_XCURSORGEN_LICENSE_FILES = COPYING +XAPP_XCURSORGEN_DEPENDENCIES = libpng xlib_libX11 xlib_libXcursor + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_xdbedizzy/Config.in b/package/x11r7/xapp_xdbedizzy/Config.in new file mode 100644 index 0000000000..e4a5960fdd --- /dev/null +++ b/package/x11r7/xapp_xdbedizzy/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XDBEDIZZY + bool "xdbedizzy" + select BR2_PACKAGE_XLIB_LIBXEXT + help + X.Org xdbedizzy application diff --git a/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.hash b/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.hash new file mode 100644 index 0000000000..8fbe8b00eb --- /dev/null +++ b/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2010-October/001514.html +sha1 281bee72116311e2d8393ae53ea832e9d267eded xdbedizzy-1.1.0.tar.bz2 diff --git a/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.mk b/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.mk new file mode 100644 index 0000000000..72d04f8367 --- /dev/null +++ b/package/x11r7/xapp_xdbedizzy/xapp_xdbedizzy.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xdbedizzy +# +################################################################################ + +XAPP_XDBEDIZZY_VERSION = 1.1.0 +XAPP_XDBEDIZZY_SOURCE = xdbedizzy-$(XAPP_XDBEDIZZY_VERSION).tar.bz2 +XAPP_XDBEDIZZY_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XDBEDIZZY_LICENSE = MIT +XAPP_XDBEDIZZY_LICENSE_FILES = COPYING +XAPP_XDBEDIZZY_DEPENDENCIES = xlib_libXext + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xditview/Config.in b/package/x11r7/xapp_xditview/Config.in new file mode 100644 index 0000000000..22944f70ce --- /dev/null +++ b/package/x11r7/xapp_xditview/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XDITVIEW + bool "xditview" + select BR2_PACKAGE_XLIB_LIBXAW + help + display ditroff output diff --git a/package/x11r7/xapp_xditview/xapp_xditview.hash b/package/x11r7/xapp_xditview/xapp_xditview.hash new file mode 100644 index 0000000000..c8c1a0cb56 --- /dev/null +++ b/package/x11r7/xapp_xditview/xapp_xditview.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002570.html +sha256 307f8df1bc3e90a7fba74dfe16840891c365abc027fbd556027eb057e5d1ff73 xditview-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_xditview/xapp_xditview.mk b/package/x11r7/xapp_xditview/xapp_xditview.mk new file mode 100644 index 0000000000..4744c1fefd --- /dev/null +++ b/package/x11r7/xapp_xditview/xapp_xditview.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xditview +# +################################################################################ + +XAPP_XDITVIEW_VERSION = 1.0.4 +XAPP_XDITVIEW_SOURCE = xditview-$(XAPP_XDITVIEW_VERSION).tar.bz2 +XAPP_XDITVIEW_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XDITVIEW_LICENSE = MIT +XAPP_XDITVIEW_LICENSE_FILES = COPYING +XAPP_XDITVIEW_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xdm/Config.in b/package/x11r7/xapp_xdm/Config.in new file mode 100644 index 0000000000..69829701ca --- /dev/null +++ b/package/x11r7/xapp_xdm/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_XAPP_XDM + bool "xdm" + depends on BR2_USE_MMU # fork() + # Runtime dependency: can't start an X server unless there is one + depends on BR2_PACKAGE_XSERVER_XORG_SERVER + select BR2_PACKAGE_XAPP_SESSREG + select BR2_PACKAGE_XAPP_XRDB + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXDMCP + select BR2_PACKAGE_XLIB_LIBXINERAMA + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XPROTO_XINERAMAPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org xdm application diff --git a/package/x11r7/xapp_xdm/S99xdm b/package/x11r7/xapp_xdm/S99xdm new file mode 100644 index 0000000000..a2c0a1de06 --- /dev/null +++ b/package/x11r7/xapp_xdm/S99xdm @@ -0,0 +1,25 @@ +#!/bin/sh + +XDM_BIN=/usr/bin/xdm + +case "$1" in + start) + printf "Starting XDM: " + $XDM_BIN + echo "done" + ;; + stop) + echo "Stopping XDM" + killall -q xdm + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 + ;; +esac + +exit 0 diff --git a/package/x11r7/xapp_xdm/xapp_xdm.hash b/package/x11r7/xapp_xdm/xapp_xdm.hash new file mode 100644 index 0000000000..207d769fbf --- /dev/null +++ b/package/x11r7/xapp_xdm/xapp_xdm.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2011-September/001737.html +sha256 d4da426ddea0124279a3f2e00a26db61944690628ee818a64df9d27352081c47 xdm-1.1.11.tar.bz2 diff --git a/package/x11r7/xapp_xdm/xapp_xdm.mk b/package/x11r7/xapp_xdm/xapp_xdm.mk new file mode 100644 index 0000000000..8f846a82aa --- /dev/null +++ b/package/x11r7/xapp_xdm/xapp_xdm.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# xapp_xdm +# +################################################################################ + +XAPP_XDM_VERSION = 1.1.11 +XAPP_XDM_SOURCE = xdm-$(XAPP_XDM_VERSION).tar.bz2 +XAPP_XDM_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XDM_LICENSE = MIT +XAPP_XDM_LICENSE_FILES = COPYING +XAPP_XDM_CONF_ENV = ac_cv_file__dev_urandom=yes +XAPP_XDM_DEPENDENCIES = xapp_sessreg xapp_xrdb xlib_libX11 xlib_libXaw xlib_libXdmcp xlib_libXinerama xlib_libXt xproto_xineramaproto xproto_xproto +XAPP_XDM_CONF_OPTS = \ + --with-utmp-file=/var/adm/utmpx \ + --with-wtmp-file=/var/adm/wtmpx + +define XAPP_XDM_INSTALL_INIT_SYSV + $(INSTALL) -m 0755 -D package/x11r7/xapp_xdm/S99xdm \ + $(TARGET_DIR)/etc/init.d/S99xdm +endef + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xdpyinfo/Config.in b/package/x11r7/xapp_xdpyinfo/Config.in new file mode 100644 index 0000000000..8527903855 --- /dev/null +++ b/package/x11r7/xapp_xdpyinfo/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XDPYINFO + bool "xdpyinfo" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXTST + help + display information utility for X diff --git a/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.hash b/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.hash new file mode 100644 index 0000000000..7f9c4f5482 --- /dev/null +++ b/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002569.html +sha256 30238ed915619e06ceb41721e5f747d67320555cc38d459e954839c189ccaf51 xdpyinfo-1.3.2.tar.bz2 diff --git a/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.mk b/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.mk new file mode 100644 index 0000000000..cf94f70bcf --- /dev/null +++ b/package/x11r7/xapp_xdpyinfo/xapp_xdpyinfo.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# xapp_xdpyinfo +# +################################################################################ + +XAPP_XDPYINFO_VERSION = 1.3.2 +XAPP_XDPYINFO_SOURCE = xdpyinfo-$(XAPP_XDPYINFO_VERSION).tar.bz2 +XAPP_XDPYINFO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XDPYINFO_LICENSE = MIT +XAPP_XDPYINFO_LICENSE_FILES = COPYING +XAPP_XDPYINFO_CONF_OPTS = --without-xf86misc # not in BR +XAPP_XDPYINFO_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXtst \ + $(if $(BR2_PACKAGE_XLIB_LIBXI),xlib_libXi) \ + $(if $(BR2_PACKAGE_XLIB_LIBXRENDER),xlib_libXrender) \ + $(if $(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),xlib_libXcomposite) \ + $(if $(BR2_PACKAGE_XLIB_LIBXXF86VM),xlib_libXxf86vm) + +ifeq ($(BR2_PACKAGE_XLIB_LIBXXF86DGA),y) +XAPP_XDPYINFO_DEPENDENCIES += xlib_libXxf86dga +else +XAPP_XDPYINFO_CONF_OPTS += --without-dga +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBDMX),y) +XAPP_XDPYINFO_DEPENDENCIES += xlib_libdmx +else +XAPP_XDPYINFO_CONF_OPTS += --without-dmx +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +XAPP_XDPYINFO_DEPENDENCIES += xlib_libXinerama +else +XAPP_XDPYINFO_CONF_OPTS += --without-xinerama +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xdriinfo/Config.in b/package/x11r7/xapp_xdriinfo/Config.in new file mode 100644 index 0000000000..36dc5770e9 --- /dev/null +++ b/package/x11r7/xapp_xdriinfo/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XAPP_XDRIINFO + bool "xdriinfo" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XPROTO_GLPROTO + depends on BR2_PACKAGE_HAS_LIBGL + help + query configuration information of DRI drivers + +comment "xdriinfo needs an OpenGL backend" + depends on !BR2_PACKAGE_HAS_LIBGL diff --git a/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.hash b/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.hash new file mode 100644 index 0000000000..264ec9a016 --- /dev/null +++ b/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002570.html +sha256 4cba3766ef89557422062287248adeb933999071bad6f3ef9c0a478a3c680119 xdriinfo-1.0.5.tar.bz2 diff --git a/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.mk b/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.mk new file mode 100644 index 0000000000..bb00d3ba07 --- /dev/null +++ b/package/x11r7/xapp_xdriinfo/xapp_xdriinfo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xdriinfo +# +################################################################################ + +XAPP_XDRIINFO_VERSION = 1.0.5 +XAPP_XDRIINFO_SOURCE = xdriinfo-$(XAPP_XDRIINFO_VERSION).tar.bz2 +XAPP_XDRIINFO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XDRIINFO_LICENSE = MIT +XAPP_XDRIINFO_LICENSE_FILES = COPYING +XAPP_XDRIINFO_DEPENDENCIES = xlib_libX11 xproto_glproto mesa3d + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xedit/Config.in b/package/x11r7/xapp_xedit/Config.in new file mode 100644 index 0000000000..feaea7486f --- /dev/null +++ b/package/x11r7/xapp_xedit/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XEDIT + bool "xedit" + select BR2_PACKAGE_XLIB_LIBXAW + depends on BR2_USE_MMU # fork() + help + simple text editor for X diff --git a/package/x11r7/xapp_xedit/xapp_xedit.hash b/package/x11r7/xapp_xedit/xapp_xedit.hash new file mode 100644 index 0000000000..5aedfb74c4 --- /dev/null +++ b/package/x11r7/xapp_xedit/xapp_xedit.hash @@ -0,0 +1,3 @@ +# From http://lists.x.org/archives/xorg-announce/2015-February/002535.html +sha1 f37b5d0f8ec461955f0419dbb1890d8cf63d179d xedit-1.2.2.tar.bz2 +sha256 69aa42885dfc06332ca22eb01cc7187e49206e6d65b74113a8ee4cc345fc2927 xedit-1.2.2.tar.bz2 diff --git a/package/x11r7/xapp_xedit/xapp_xedit.mk b/package/x11r7/xapp_xedit/xapp_xedit.mk new file mode 100644 index 0000000000..0f42e2cb0d --- /dev/null +++ b/package/x11r7/xapp_xedit/xapp_xedit.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xapp_xedit +# +################################################################################ + +XAPP_XEDIT_VERSION = 1.2.2 +XAPP_XEDIT_SOURCE = xedit-$(XAPP_XEDIT_VERSION).tar.bz2 +XAPP_XEDIT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XEDIT_LICENSE = MIT +XAPP_XEDIT_LICENSE_FILES = COPYING +XAPP_XEDIT_DEPENDENCIES = xlib_libXaw + +XAPP_XEDIT_CONF_OPTS = --disable-selective-werror + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xev/Config.in b/package/x11r7/xapp_xev/Config.in new file mode 100644 index 0000000000..864d6424da --- /dev/null +++ b/package/x11r7/xapp_xev/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XEV + bool "xev" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXRANDR + help + print contents of X events diff --git a/package/x11r7/xapp_xev/xapp_xev.hash b/package/x11r7/xapp_xev/xapp_xev.hash new file mode 100644 index 0000000000..4008ebafae --- /dev/null +++ b/package/x11r7/xapp_xev/xapp_xev.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002572.html +sha256 d94ae62a6c1af56c2961d71f5782076ac4116f0fa4e401420ac7e0db33dc314f xev-1.2.2.tar.bz2 diff --git a/package/x11r7/xapp_xev/xapp_xev.mk b/package/x11r7/xapp_xev/xapp_xev.mk new file mode 100644 index 0000000000..2a798db555 --- /dev/null +++ b/package/x11r7/xapp_xev/xapp_xev.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xev +# +################################################################################ + +XAPP_XEV_VERSION = 1.2.2 +XAPP_XEV_SOURCE = xev-$(XAPP_XEV_VERSION).tar.bz2 +XAPP_XEV_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XEV_LICENSE = MIT +XAPP_XEV_LICENSE_FILES = COPYING +XAPP_XEV_DEPENDENCIES = xlib_libX11 xlib_libXrandr + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xeyes/Config.in b/package/x11r7/xapp_xeyes/Config.in new file mode 100644 index 0000000000..5cf7f6c052 --- /dev/null +++ b/package/x11r7/xapp_xeyes/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XAPP_XEYES + bool "xeyes" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXT + help + X.Org xeyes application diff --git a/package/x11r7/xapp_xeyes/xapp_xeyes.hash b/package/x11r7/xapp_xeyes/xapp_xeyes.hash new file mode 100644 index 0000000000..02eb26b7b9 --- /dev/null +++ b/package/x11r7/xapp_xeyes/xapp_xeyes.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2010-November/001552.html +sha1 efe6116d31a7f69e4fb6038613e52b0960b9b61c xeyes-1.1.1.tar.bz2 diff --git a/package/x11r7/xapp_xeyes/xapp_xeyes.mk b/package/x11r7/xapp_xeyes/xapp_xeyes.mk new file mode 100644 index 0000000000..07c12002be --- /dev/null +++ b/package/x11r7/xapp_xeyes/xapp_xeyes.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xeyes +# +################################################################################ + +XAPP_XEYES_VERSION = 1.1.1 +XAPP_XEYES_SOURCE = xeyes-$(XAPP_XEYES_VERSION).tar.bz2 +XAPP_XEYES_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XEYES_LICENSE = MIT +XAPP_XEYES_LICENSE_FILES = COPYING +XAPP_XEYES_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXmu xlib_libXrender xlib_libXt + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xf86dga/Config.in b/package/x11r7/xapp_xf86dga/Config.in new file mode 100644 index 0000000000..8a13bd4df1 --- /dev/null +++ b/package/x11r7/xapp_xf86dga/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XF86DGA + bool "xf86dga" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXXF86DGA + depends on BR2_USE_MMU # fork() + help + test program for the XFree86-DGA extension diff --git a/package/x11r7/xapp_xf86dga/xapp_xf86dga.hash b/package/x11r7/xapp_xf86dga/xapp_xf86dga.hash new file mode 100644 index 0000000000..b0c803e9ce --- /dev/null +++ b/package/x11r7/xapp_xf86dga/xapp_xf86dga.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2010-October/001515.html +sha1 030659e3728f5f7142e1cf727f147aceeabe4b9e xf86dga-1.0.3.tar.bz2 diff --git a/package/x11r7/xapp_xf86dga/xapp_xf86dga.mk b/package/x11r7/xapp_xf86dga/xapp_xf86dga.mk new file mode 100644 index 0000000000..fe8e427856 --- /dev/null +++ b/package/x11r7/xapp_xf86dga/xapp_xf86dga.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xapp_xf86dga +# +################################################################################ + +XAPP_XF86DGA_VERSION = 1.0.3 +XAPP_XF86DGA_SOURCE = xf86dga-$(XAPP_XF86DGA_VERSION).tar.bz2 +XAPP_XF86DGA_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XF86DGA_LICENSE = MIT +XAPP_XF86DGA_LICENSE_FILES = COPYING +XAPP_XF86DGA_DEPENDENCIES = \ + host-pkgconf \ + xlib_libX11 \ + xlib_libXxf86dga + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfd/Config.in b/package/x11r7/xapp_xfd/Config.in new file mode 100644 index 0000000000..f006b1e488 --- /dev/null +++ b/package/x11r7/xapp_xfd/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XFD + bool "xfd" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXFT + help + X.Org xfd application diff --git a/package/x11r7/xapp_xfd/xapp_xfd.hash b/package/x11r7/xapp_xfd/xapp_xfd.hash new file mode 100644 index 0000000000..7b6824bec3 --- /dev/null +++ b/package/x11r7/xapp_xfd/xapp_xfd.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-July/002268.html +sha256 c1a32222fbb891e46f9a82ebab005bc5e54ce006a2586195ec9ea7ab308e2759 xfd-1.1.2.tar.bz2 diff --git a/package/x11r7/xapp_xfd/xapp_xfd.mk b/package/x11r7/xapp_xfd/xapp_xfd.mk new file mode 100644 index 0000000000..e3c770b37c --- /dev/null +++ b/package/x11r7/xapp_xfd/xapp_xfd.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xfd +# +################################################################################ + +XAPP_XFD_VERSION = 1.1.2 +XAPP_XFD_SOURCE = xfd-$(XAPP_XFD_VERSION).tar.bz2 +XAPP_XFD_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XFD_LICENSE = MIT +XAPP_XFD_LICENSE_FILES = COPYING +XAPP_XFD_DEPENDENCIES = freetype fontconfig xlib_libXaw xlib_libXft + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfindproxy/Config.in b/package/x11r7/xapp_xfindproxy/Config.in new file mode 100644 index 0000000000..b186ab65bc --- /dev/null +++ b/package/x11r7/xapp_xfindproxy/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XAPP_XFINDPROXY + bool "xfindproxy" + select BR2_PACKAGE_XLIB_LIBICE + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_XPROTO_XPROXYMANAGEMENTPROTOCOL + help + xfindproxy utilizes the Proxy Management Protocol to + communicate with a proxy manager to locate available X11 + proxy services. diff --git a/package/x11r7/xapp_xfindproxy/xapp_xfindproxy.hash b/package/x11r7/xapp_xfindproxy/xapp_xfindproxy.hash new file mode 100644 index 0000000000..9263e46303 --- /dev/null +++ b/package/x11r7/xapp_xfindproxy/xapp_xfindproxy.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002573.html +sha256 5626bda27c7faa5cbe289a17f8552538fff08a96d542b85efdda1804ccf8a01f xfindproxy-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_xfindproxy/xapp_xfindproxy.mk b/package/x11r7/xapp_xfindproxy/xapp_xfindproxy.mk new file mode 100644 index 0000000000..7662a902a2 --- /dev/null +++ b/package/x11r7/xapp_xfindproxy/xapp_xfindproxy.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xapp_xfindproxy +# +################################################################################ + +XAPP_XFINDPROXY_VERSION = 1.0.4 +XAPP_XFINDPROXY_SOURCE = xfindproxy-$(XAPP_XFINDPROXY_VERSION).tar.bz2 +XAPP_XFINDPROXY_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XFINDPROXY_LICENSE = MIT +XAPP_XFINDPROXY_LICENSE_FILES = COPYING +XAPP_XFINDPROXY_DEPENDENCIES = \ + xlib_libICE \ + xlib_libXt \ + xproto_xproto \ + xproto_xproxymanagementprotocol + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfontsel/Config.in b/package/x11r7/xapp_xfontsel/Config.in new file mode 100644 index 0000000000..0c6aa3792e --- /dev/null +++ b/package/x11r7/xapp_xfontsel/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XFONTSEL + bool "xfontsel" + select BR2_PACKAGE_XLIB_LIBXAW + help + point and click selection of X11 font names diff --git a/package/x11r7/xapp_xfontsel/xapp_xfontsel.hash b/package/x11r7/xapp_xfontsel/xapp_xfontsel.hash new file mode 100644 index 0000000000..40f55236f0 --- /dev/null +++ b/package/x11r7/xapp_xfontsel/xapp_xfontsel.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-May/002213.html +sha256 170d8550b96fb47b04db6181b947e6f6b8b97f4df5d691c351a278480cc931bf xfontsel-1.0.5.tar.bz2 diff --git a/package/x11r7/xapp_xfontsel/xapp_xfontsel.mk b/package/x11r7/xapp_xfontsel/xapp_xfontsel.mk new file mode 100644 index 0000000000..781b4d3542 --- /dev/null +++ b/package/x11r7/xapp_xfontsel/xapp_xfontsel.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xfontsel +# +################################################################################ + +XAPP_XFONTSEL_VERSION = 1.0.5 +XAPP_XFONTSEL_SOURCE = xfontsel-$(XAPP_XFONTSEL_VERSION).tar.bz2 +XAPP_XFONTSEL_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XFONTSEL_LICENSE = MIT +XAPP_XFONTSEL_LICENSE_FILES = COPYING +XAPP_XFONTSEL_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfs/Config.in b/package/x11r7/xapp_xfs/Config.in new file mode 100644 index 0000000000..8b72445f8a --- /dev/null +++ b/package/x11r7/xapp_xfs/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XFS + bool "xfs" + select BR2_PACKAGE_XLIB_LIBFS + select BR2_PACKAGE_XLIB_LIBXFONT + select BR2_PACKAGE_XPROTO_FONTSPROTO + depends on BR2_USE_MMU # fork() + help + X font server diff --git a/package/x11r7/xapp_xfs/xapp_xfs.hash b/package/x11r7/xapp_xfs/xapp_xfs.hash new file mode 100644 index 0000000000..67823742b5 --- /dev/null +++ b/package/x11r7/xapp_xfs/xapp_xfs.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-August/002472.html +sha256 a40b75e674c091464f85739292b6bf24e2d153f4a2ac456d3ea6b8a64e269ffa xfs-1.1.4.tar.bz2 diff --git a/package/x11r7/xapp_xfs/xapp_xfs.mk b/package/x11r7/xapp_xfs/xapp_xfs.mk new file mode 100644 index 0000000000..3e704554b2 --- /dev/null +++ b/package/x11r7/xapp_xfs/xapp_xfs.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xfs +# +################################################################################ + +XAPP_XFS_VERSION = 1.1.4 +XAPP_XFS_SOURCE = xfs-$(XAPP_XFS_VERSION).tar.bz2 +XAPP_XFS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XFS_LICENSE = MIT +XAPP_XFS_LICENSE_FILES = COPYING +XAPP_XFS_DEPENDENCIES = xlib_libFS xlib_libXfont xproto_fontsproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xfsinfo/Config.in b/package/x11r7/xapp_xfsinfo/Config.in new file mode 100644 index 0000000000..84c8ac134d --- /dev/null +++ b/package/x11r7/xapp_xfsinfo/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XFSINFO + bool "xfsinfo" + select BR2_PACKAGE_XLIB_LIBFS + select BR2_PACKAGE_XLIB_LIBX11 + help + X font server information utility diff --git a/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.hash b/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.hash new file mode 100644 index 0000000000..b1bcc0bc8a --- /dev/null +++ b/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-December/002512.html +sha256 d38f4b6db4038f52ba1a09123ef497993194288454c0c13d16debe246f120d8f xfsinfo-1.0.5.tar.bz2 diff --git a/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.mk b/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.mk new file mode 100644 index 0000000000..38d01e4949 --- /dev/null +++ b/package/x11r7/xapp_xfsinfo/xapp_xfsinfo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xfsinfo +# +################################################################################ + +XAPP_XFSINFO_VERSION = 1.0.5 +XAPP_XFSINFO_SOURCE = xfsinfo-$(XAPP_XFSINFO_VERSION).tar.bz2 +XAPP_XFSINFO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XFSINFO_LICENSE = MIT +XAPP_XFSINFO_LICENSE_FILES = COPYING +XAPP_XFSINFO_DEPENDENCIES = xlib_libFS xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xgamma/Config.in b/package/x11r7/xapp_xgamma/Config.in new file mode 100644 index 0000000000..b20a784097 --- /dev/null +++ b/package/x11r7/xapp_xgamma/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XGAMMA + bool "xgamma" + select BR2_PACKAGE_XLIB_LIBXXF86VM + help + Alter a monitor's gamma correction through the X server diff --git a/package/x11r7/xapp_xgamma/xapp_xgamma.hash b/package/x11r7/xapp_xgamma/xapp_xgamma.hash new file mode 100644 index 0000000000..30480aadd8 --- /dev/null +++ b/package/x11r7/xapp_xgamma/xapp_xgamma.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002574.html +sha256 0ef1c35b5c18b1b22317f455c8df13c0a471a8efad63c89c98ae3ce8c2b222d3 xgamma-1.0.6.tar.bz2 diff --git a/package/x11r7/xapp_xgamma/xapp_xgamma.mk b/package/x11r7/xapp_xgamma/xapp_xgamma.mk new file mode 100644 index 0000000000..a73a29e5a2 --- /dev/null +++ b/package/x11r7/xapp_xgamma/xapp_xgamma.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xgamma +# +################################################################################ + +XAPP_XGAMMA_VERSION = 1.0.6 +XAPP_XGAMMA_SOURCE = xgamma-$(XAPP_XGAMMA_VERSION).tar.bz2 +XAPP_XGAMMA_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XGAMMA_LICENSE = MIT +XAPP_XGAMMA_LICENSE_FILES = COPYING +XAPP_XGAMMA_DEPENDENCIES = xlib_libXxf86vm + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xgc/Config.in b/package/x11r7/xapp_xgc/Config.in new file mode 100644 index 0000000000..98faba8847 --- /dev/null +++ b/package/x11r7/xapp_xgc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XGC + bool "xgc" + select BR2_PACKAGE_XLIB_LIBXAW + help + X graphics demo diff --git a/package/x11r7/xapp_xgc/xapp_xgc.hash b/package/x11r7/xapp_xgc/xapp_xgc.hash new file mode 100644 index 0000000000..7972a6fd3b --- /dev/null +++ b/package/x11r7/xapp_xgc/xapp_xgc.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002575.html +sha256 14828d9bda358ad57efc0206bc416ee33ba542091edb186485cca5389adc2f5e xgc-1.0.5.tar.bz2 diff --git a/package/x11r7/xapp_xgc/xapp_xgc.mk b/package/x11r7/xapp_xgc/xapp_xgc.mk new file mode 100644 index 0000000000..41d42c461e --- /dev/null +++ b/package/x11r7/xapp_xgc/xapp_xgc.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xgc +# +################################################################################ + +XAPP_XGC_VERSION = 1.0.5 +XAPP_XGC_SOURCE = xgc-$(XAPP_XGC_VERSION).tar.bz2 +XAPP_XGC_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XGC_LICENSE = MIT +XAPP_XGC_LICENSE_FILES = COPYING +XAPP_XGC_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xhost/Config.in b/package/x11r7/xapp_xhost/Config.in new file mode 100644 index 0000000000..659b34deb1 --- /dev/null +++ b/package/x11r7/xapp_xhost/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XHOST + bool "xhost" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + Controls host and/or user access to a running X server. diff --git a/package/x11r7/xapp_xhost/xapp_xhost.hash b/package/x11r7/xapp_xhost/xapp_xhost.hash new file mode 100644 index 0000000000..b714eb65c3 --- /dev/null +++ b/package/x11r7/xapp_xhost/xapp_xhost.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002576.html +sha256 93e619ee15471f576cfb30c663e18f5bc70aca577a63d2c2c03f006a7837c29a xhost-1.0.7.tar.bz2 diff --git a/package/x11r7/xapp_xhost/xapp_xhost.mk b/package/x11r7/xapp_xhost/xapp_xhost.mk new file mode 100644 index 0000000000..a4bb16bae3 --- /dev/null +++ b/package/x11r7/xapp_xhost/xapp_xhost.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xhost +# +################################################################################ + +XAPP_XHOST_VERSION = 1.0.7 +XAPP_XHOST_SOURCE = xhost-$(XAPP_XHOST_VERSION).tar.bz2 +XAPP_XHOST_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XHOST_LICENSE = MIT +XAPP_XHOST_LICENSE_FILES = COPYING +XAPP_XHOST_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xinit/Config.in b/package/x11r7/xapp_xinit/Config.in new file mode 100644 index 0000000000..d9fb1c5fc8 --- /dev/null +++ b/package/x11r7/xapp_xinit/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XAPP_XINIT + bool "xinit" + depends on BR2_USE_MMU # fork() + # Runtime dependency: can't start an X server unless there is one + depends on BR2_PACKAGE_XSERVER_XORG_SERVER + # Runtime dependency; mcookie is also in util-linux + select BR2_PACKAGE_MCOOKIE if !BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_XAPP_XAUTH + select BR2_PACKAGE_XLIB_LIBX11 + help + X Window System initializer diff --git a/package/x11r7/xapp_xinit/xapp_xinit.hash b/package/x11r7/xapp_xinit/xapp_xinit.hash new file mode 100644 index 0000000000..f8bab9114c --- /dev/null +++ b/package/x11r7/xapp_xinit/xapp_xinit.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-September/002477.html +sha256 75d88d7397a07e01db253163b7c7a00b249b3d30e99489f2734cac9a0c7902b3 xinit-1.3.4.tar.bz2 diff --git a/package/x11r7/xapp_xinit/xapp_xinit.mk b/package/x11r7/xapp_xinit/xapp_xinit.mk new file mode 100644 index 0000000000..a67ba146f2 --- /dev/null +++ b/package/x11r7/xapp_xinit/xapp_xinit.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xinit +# +################################################################################ + +XAPP_XINIT_VERSION = 1.3.4 +XAPP_XINIT_SOURCE = xinit-$(XAPP_XINIT_VERSION).tar.bz2 +XAPP_XINIT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XINIT_DEPENDENCIES = xapp_xauth xlib_libX11 +XAPP_XINIT_LICENSE = MIT +XAPP_XINIT_LICENSE_FILES = COPYING + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xinput-calibrator/Config.in b/package/x11r7/xapp_xinput-calibrator/Config.in new file mode 100644 index 0000000000..76fbcd4305 --- /dev/null +++ b/package/x11r7/xapp_xinput-calibrator/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_XAPP_XINPUT_CALIBRATOR + bool "xinput-calibrator" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXI + help + A generic touchscreen calibration program for X.Org. + + http://www.freedesktop.org/wiki/Software/xinput_calibrator + +comment "xinput-calibrator needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP diff --git a/package/x11r7/xapp_xinput-calibrator/xapp_xinput-calibrator.mk b/package/x11r7/xapp_xinput-calibrator/xapp_xinput-calibrator.mk new file mode 100644 index 0000000000..974b83df2c --- /dev/null +++ b/package/x11r7/xapp_xinput-calibrator/xapp_xinput-calibrator.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xinput-calibrator +# +################################################################################ + +XAPP_XINPUT_CALIBRATOR_VERSION = 0.7.5 +XAPP_XINPUT_CALIBRATOR_SOURCE = xinput_calibrator-$(XAPP_XINPUT_CALIBRATOR_VERSION).tar.gz +XAPP_XINPUT_CALIBRATOR_SITE = http://github.com/downloads/tias/xinput_calibrator +XAPP_XINPUT_CALIBRATOR_LICENSE = MIT +XAPP_XINPUT_CALIBRATOR_LICENSE_FILES = COPYING +XAPP_XINPUT_CALIBRATOR_DEPENDENCIES = xlib_libX11 xlib_libXi + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xinput/Config.in b/package/x11r7/xapp_xinput/Config.in new file mode 100644 index 0000000000..e438a45bdb --- /dev/null +++ b/package/x11r7/xapp_xinput/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XINPUT + bool "xinput" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXI + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBXINERAMA + help + xinput diff --git a/package/x11r7/xapp_xinput/xapp_xinput.hash b/package/x11r7/xapp_xinput/xapp_xinput.hash new file mode 100644 index 0000000000..724b2e2637 --- /dev/null +++ b/package/x11r7/xapp_xinput/xapp_xinput.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-October/002643.html +sha256 3694d29b4180952fbf13c6d4e59541310cbb11eef5bf888ff3d8b7f4e3aee5c4 xinput-1.6.2.tar.bz2 diff --git a/package/x11r7/xapp_xinput/xapp_xinput.mk b/package/x11r7/xapp_xinput/xapp_xinput.mk new file mode 100644 index 0000000000..aaa7a80818 --- /dev/null +++ b/package/x11r7/xapp_xinput/xapp_xinput.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xinput +# +################################################################################ + +XAPP_XINPUT_VERSION = 1.6.2 +XAPP_XINPUT_SOURCE = xinput-$(XAPP_XINPUT_VERSION).tar.bz2 +XAPP_XINPUT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XINPUT_LICENSE = MIT +XAPP_XINPUT_LICENSE_FILES = COPYING +XAPP_XINPUT_DEPENDENCIES = xlib_libX11 xlib_libXi xlib_libXrandr xlib_libXinerama + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xkbcomp/Config.in b/package/x11r7/xapp_xkbcomp/Config.in new file mode 100644 index 0000000000..2b575b2523 --- /dev/null +++ b/package/x11r7/xapp_xkbcomp/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XKBCOMP + bool "xkbcomp" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXKBFILE + help + compile XKB keyboard description diff --git a/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.hash b/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.hash new file mode 100644 index 0000000000..bc85caa6ed --- /dev/null +++ b/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-November/002653.html +sha256 0304dc9e0d4ac10831a9ef5d5419722375ddbc3eac3ff4413094d57bc1f1923d xkbcomp-1.3.1.tar.bz2 diff --git a/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk b/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk new file mode 100644 index 0000000000..fea7fa8e8c --- /dev/null +++ b/package/x11r7/xapp_xkbcomp/xapp_xkbcomp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xapp_xkbcomp +# +################################################################################ + +XAPP_XKBCOMP_VERSION = 1.3.1 +XAPP_XKBCOMP_SOURCE = xkbcomp-$(XAPP_XKBCOMP_VERSION).tar.bz2 +XAPP_XKBCOMP_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XKBCOMP_LICENSE = MIT +XAPP_XKBCOMP_LICENSE_FILES = COPYING +XAPP_XKBCOMP_DEPENDENCIES = xlib_libX11 xlib_libxkbfile +XAPP_XKBCOMP_CONF_ENV = ac_cv_file___xkbparse_c=yes + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xapp_xkbevd/Config.in b/package/x11r7/xapp_xkbevd/Config.in new file mode 100644 index 0000000000..0cbb9e4f19 --- /dev/null +++ b/package/x11r7/xapp_xkbevd/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XKBEVD + bool "xkbevd" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBXKBFILE + help + XKB event daemon diff --git a/package/x11r7/xapp_xkbevd/xapp_xkbevd.hash b/package/x11r7/xapp_xkbevd/xapp_xkbevd.hash new file mode 100644 index 0000000000..b350d295d7 --- /dev/null +++ b/package/x11r7/xapp_xkbevd/xapp_xkbevd.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002577.html +sha256 2430a2e5302a4cb4a5530c1df8cb3721a149bbf8eb377a2898921a145197f96a xkbevd-1.1.4.tar.bz2 diff --git a/package/x11r7/xapp_xkbevd/xapp_xkbevd.mk b/package/x11r7/xapp_xkbevd/xapp_xkbevd.mk new file mode 100644 index 0000000000..7a9a8fb18f --- /dev/null +++ b/package/x11r7/xapp_xkbevd/xapp_xkbevd.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xkbevd +# +################################################################################ + +XAPP_XKBEVD_VERSION = 1.1.4 +XAPP_XKBEVD_SOURCE = xkbevd-$(XAPP_XKBEVD_VERSION).tar.bz2 +XAPP_XKBEVD_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XKBEVD_LICENSE = MIT +XAPP_XKBEVD_LICENSE_FILES = COPYING +XAPP_XKBEVD_DEPENDENCIES = xlib_libxkbfile + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xkbprint/Config.in b/package/x11r7/xapp_xkbprint/Config.in new file mode 100644 index 0000000000..e7a4242caa --- /dev/null +++ b/package/x11r7/xapp_xkbprint/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XKBPRINT + bool "xkbprint" + select BR2_PACKAGE_XLIB_LIBXKBFILE + help + print an XKB keyboard description diff --git a/package/x11r7/xapp_xkbprint/xapp_xkbprint.hash b/package/x11r7/xapp_xkbprint/xapp_xkbprint.hash new file mode 100644 index 0000000000..9ec83b6592 --- /dev/null +++ b/package/x11r7/xapp_xkbprint/xapp_xkbprint.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002578.html +sha256 0b3faab8fefad03dfb7e866f634cf859822801de6b5fc6cf5e0a62857ed93e12 xkbprint-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_xkbprint/xapp_xkbprint.mk b/package/x11r7/xapp_xkbprint/xapp_xkbprint.mk new file mode 100644 index 0000000000..5f2300f8be --- /dev/null +++ b/package/x11r7/xapp_xkbprint/xapp_xkbprint.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xkbprint +# +################################################################################ + +XAPP_XKBPRINT_VERSION = 1.0.4 +XAPP_XKBPRINT_SOURCE = xkbprint-$(XAPP_XKBPRINT_VERSION).tar.bz2 +XAPP_XKBPRINT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XKBPRINT_LICENSE = MIT +XAPP_XKBPRINT_LICENSE_FILES = COPYING +XAPP_XKBPRINT_DEPENDENCIES = xlib_libxkbfile + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xkbutils/Config.in b/package/x11r7/xapp_xkbutils/Config.in new file mode 100644 index 0000000000..22a819b378 --- /dev/null +++ b/package/x11r7/xapp_xkbutils/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XKBUTILS + bool "xkbutils" + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXKBFILE + help + X.Org xkbutils application diff --git a/package/x11r7/xapp_xkbutils/xapp_xkbutils.hash b/package/x11r7/xapp_xkbutils/xapp_xkbutils.hash new file mode 100644 index 0000000000..6660304602 --- /dev/null +++ b/package/x11r7/xapp_xkbutils/xapp_xkbutils.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-February/002162.html +sha256 d2a18ab90275e8bca028773c44264d2266dab70853db4321bdbc18da75148130 xkbutils-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_xkbutils/xapp_xkbutils.mk b/package/x11r7/xapp_xkbutils/xapp_xkbutils.mk new file mode 100644 index 0000000000..96ca8a4093 --- /dev/null +++ b/package/x11r7/xapp_xkbutils/xapp_xkbutils.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xkbutils +# +################################################################################ + +XAPP_XKBUTILS_VERSION = 1.0.4 +XAPP_XKBUTILS_SOURCE = xkbutils-$(XAPP_XKBUTILS_VERSION).tar.bz2 +XAPP_XKBUTILS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XKBUTILS_LICENSE = MIT +XAPP_XKBUTILS_LICENSE_FILES = COPYING +XAPP_XKBUTILS_DEPENDENCIES = xlib_libXaw xlib_libxkbfile + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xkill/Config.in b/package/x11r7/xapp_xkill/Config.in new file mode 100644 index 0000000000..fcab92a52d --- /dev/null +++ b/package/x11r7/xapp_xkill/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XKILL + bool "xkill" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + kill a client by its X resource diff --git a/package/x11r7/xapp_xkill/xapp_xkill.hash b/package/x11r7/xapp_xkill/xapp_xkill.hash new file mode 100644 index 0000000000..22c256d49d --- /dev/null +++ b/package/x11r7/xapp_xkill/xapp_xkill.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-September/002313.html +sha256 88ef2a304f32f24b255e879f03c1dcd3a2be3e71d5562205414f267d919f812e xkill-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_xkill/xapp_xkill.mk b/package/x11r7/xapp_xkill/xapp_xkill.mk new file mode 100644 index 0000000000..76af1b95cb --- /dev/null +++ b/package/x11r7/xapp_xkill/xapp_xkill.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xkill +# +################################################################################ + +XAPP_XKILL_VERSION = 1.0.4 +XAPP_XKILL_SOURCE = xkill-$(XAPP_XKILL_VERSION).tar.bz2 +XAPP_XKILL_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XKILL_LICENSE = MIT +XAPP_XKILL_LICENSE_FILES = COPYING +XAPP_XKILL_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xload/Config.in b/package/x11r7/xapp_xload/Config.in new file mode 100644 index 0000000000..25c79d2c67 --- /dev/null +++ b/package/x11r7/xapp_xload/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XLOAD + bool "xload" + select BR2_PACKAGE_XLIB_LIBXAW + help + system load average display for X diff --git a/package/x11r7/xapp_xload/xapp_xload.hash b/package/x11r7/xapp_xload/xapp_xload.hash new file mode 100644 index 0000000000..418ce55634 --- /dev/null +++ b/package/x11r7/xapp_xload/xapp_xload.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-August/002285.html +sha256 83f8e6260435f1df2e2e5036bb3325688b79f0b33069ef445eff5058d127e078 xload-1.1.2.tar.bz2 diff --git a/package/x11r7/xapp_xload/xapp_xload.mk b/package/x11r7/xapp_xload/xapp_xload.mk new file mode 100644 index 0000000000..1db0db5717 --- /dev/null +++ b/package/x11r7/xapp_xload/xapp_xload.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xload +# +################################################################################ + +XAPP_XLOAD_VERSION = 1.1.2 +XAPP_XLOAD_SOURCE = xload-$(XAPP_XLOAD_VERSION).tar.bz2 +XAPP_XLOAD_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XLOAD_LICENSE = MIT +XAPP_XLOAD_LICENSE_FILES = COPYING +XAPP_XLOAD_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xlogo/Config.in b/package/x11r7/xapp_xlogo/Config.in new file mode 100644 index 0000000000..aacb75ffb0 --- /dev/null +++ b/package/x11r7/xapp_xlogo/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XLOGO + bool "xlogo" + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXFT + help + X Window System logo diff --git a/package/x11r7/xapp_xlogo/xapp_xlogo.hash b/package/x11r7/xapp_xlogo/xapp_xlogo.hash new file mode 100644 index 0000000000..861cd596a4 --- /dev/null +++ b/package/x11r7/xapp_xlogo/xapp_xlogo.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-March/001905.html +sha256 17af6f4fb73e7310e087fbfe5d773bab2b0d6f37a894ae5ee32de4693af6ba92 xlogo-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_xlogo/xapp_xlogo.mk b/package/x11r7/xapp_xlogo/xapp_xlogo.mk new file mode 100644 index 0000000000..380acfc404 --- /dev/null +++ b/package/x11r7/xapp_xlogo/xapp_xlogo.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xapp_xlogo +# +################################################################################ + +XAPP_XLOGO_VERSION = 1.0.4 +XAPP_XLOGO_SOURCE = xlogo-$(XAPP_XLOGO_VERSION).tar.bz2 +XAPP_XLOGO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XLOGO_LICENSE = MIT +XAPP_XLOGO_LICENSE_FILES = COPYING +XAPP_XLOGO_DEPENDENCIES = \ + xlib_libXaw xlib_libXrender \ + xlib_libXft host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xlsatoms/Config.in b/package/x11r7/xapp_xlsatoms/Config.in new file mode 100644 index 0000000000..2ad8484508 --- /dev/null +++ b/package/x11r7/xapp_xlsatoms/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XLSATOMS + bool "xlsatoms" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + list interned atoms defined on server diff --git a/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.hash b/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.hash new file mode 100644 index 0000000000..58d0737b9d --- /dev/null +++ b/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002579.html +sha256 47e5dc7c3dbda6db2cf8c00cedac1722835c1550aa21cfdbc9ba83906694dea4 xlsatoms-1.1.2.tar.bz2 diff --git a/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.mk b/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.mk new file mode 100644 index 0000000000..d6d9338013 --- /dev/null +++ b/package/x11r7/xapp_xlsatoms/xapp_xlsatoms.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xlsatoms +# +################################################################################ + +XAPP_XLSATOMS_VERSION = 1.1.2 +XAPP_XLSATOMS_SOURCE = xlsatoms-$(XAPP_XLSATOMS_VERSION).tar.bz2 +XAPP_XLSATOMS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XLSATOMS_LICENSE = MIT +XAPP_XLSATOMS_LICENSE_FILES = COPYING +XAPP_XLSATOMS_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xlsclients/Config.in b/package/x11r7/xapp_xlsclients/Config.in new file mode 100644 index 0000000000..a934af45e9 --- /dev/null +++ b/package/x11r7/xapp_xlsclients/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XLSCLIENTS + bool "xlsclients" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL + help + X.Org xlsclients application diff --git a/package/x11r7/xapp_xlsclients/xapp_xlsclients.hash b/package/x11r7/xapp_xlsclients/xapp_xlsclients.hash new file mode 100644 index 0000000000..e1cb80b7fa --- /dev/null +++ b/package/x11r7/xapp_xlsclients/xapp_xlsclients.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-September/002314.html +sha256 5d9666fcc6c3de210fc70d5a841a404955af709a616fde530fe4e8f7723e3d3d xlsclients-1.1.3.tar.bz2 diff --git a/package/x11r7/xapp_xlsclients/xapp_xlsclients.mk b/package/x11r7/xapp_xlsclients/xapp_xlsclients.mk new file mode 100644 index 0000000000..798dce029c --- /dev/null +++ b/package/x11r7/xapp_xlsclients/xapp_xlsclients.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xlsclients +# +################################################################################ + +XAPP_XLSCLIENTS_VERSION = 1.1.3 +XAPP_XLSCLIENTS_SOURCE = xlsclients-$(XAPP_XLSCLIENTS_VERSION).tar.bz2 +XAPP_XLSCLIENTS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XLSCLIENTS_LICENSE = MIT +XAPP_XLSCLIENTS_LICENSE_FILES = COPYING +XAPP_XLSCLIENTS_DEPENDENCIES = xlib_libX11 xlib_libXmu libxcb xcb-util + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xlsfonts/Config.in b/package/x11r7/xapp_xlsfonts/Config.in new file mode 100644 index 0000000000..dab61ebf54 --- /dev/null +++ b/package/x11r7/xapp_xlsfonts/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XLSFONTS + bool "xlsfonts" + select BR2_PACKAGE_XLIB_LIBX11 + help + X.Org xlsfonts application diff --git a/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.hash b/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.hash new file mode 100644 index 0000000000..f3a2603171 --- /dev/null +++ b/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002580.html +sha256 40295bec35077cee93be2e4c26cc00268ed6ace779ae6e97766a866c1e3927fa xlsfonts-1.0.5.tar.bz2 diff --git a/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.mk b/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.mk new file mode 100644 index 0000000000..1c42a61a97 --- /dev/null +++ b/package/x11r7/xapp_xlsfonts/xapp_xlsfonts.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xlsfonts +# +################################################################################ + +XAPP_XLSFONTS_VERSION = 1.0.5 +XAPP_XLSFONTS_SOURCE = xlsfonts-$(XAPP_XLSFONTS_VERSION).tar.bz2 +XAPP_XLSFONTS_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XLSFONTS_LICENSE = MIT +XAPP_XLSFONTS_LICENSE_FILES = COPYING +XAPP_XLSFONTS_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmag/Config.in b/package/x11r7/xapp_xmag/Config.in new file mode 100644 index 0000000000..44d2c8e1ea --- /dev/null +++ b/package/x11r7/xapp_xmag/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XMAG + bool "xmag" + select BR2_PACKAGE_XLIB_LIBXAW + help + X.Org xmag application diff --git a/package/x11r7/xapp_xmag/xapp_xmag.hash b/package/x11r7/xapp_xmag/xapp_xmag.hash new file mode 100644 index 0000000000..ccfeb32b64 --- /dev/null +++ b/package/x11r7/xapp_xmag/xapp_xmag.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002581.html +sha256 87a2bc23b251e2d8f8370d3283a4d6c8dac98a30cb5749a04336cdb55c14e161 xmag-1.0.6.tar.bz2 diff --git a/package/x11r7/xapp_xmag/xapp_xmag.mk b/package/x11r7/xapp_xmag/xapp_xmag.mk new file mode 100644 index 0000000000..bfc60c3ef0 --- /dev/null +++ b/package/x11r7/xapp_xmag/xapp_xmag.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xmag +# +################################################################################ + +XAPP_XMAG_VERSION = 1.0.6 +XAPP_XMAG_SOURCE = xmag-$(XAPP_XMAG_VERSION).tar.bz2 +XAPP_XMAG_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XMAG_LICENSE = MIT +XAPP_XMAG_LICENSE_FILES = COPYING +XAPP_XMAG_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xman/Config.in b/package/x11r7/xapp_xman/Config.in new file mode 100644 index 0000000000..4f4f067e31 --- /dev/null +++ b/package/x11r7/xapp_xman/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XMAN + bool "xman" + select BR2_PACKAGE_XLIB_LIBXAW + help + Manual page display program for the X Window System diff --git a/package/x11r7/xapp_xman/xapp_xman.hash b/package/x11r7/xapp_xman/xapp_xman.hash new file mode 100644 index 0000000000..00a4d85bba --- /dev/null +++ b/package/x11r7/xapp_xman/xapp_xman.hash @@ -0,0 +1,3 @@ +# From http://lists.x.org/archives/xorg-announce/2015-March/002541.html +sha1 b64516dab2b1c407b28ce3822a98b93178e29f02 xman-1.1.4.tar.bz2 +sha256 b3fa9d2e3f3745c529eb0b6ee4f0e00d936457d11e5221b2efad06ff7c84df29 xman-1.1.4.tar.bz2 diff --git a/package/x11r7/xapp_xman/xapp_xman.mk b/package/x11r7/xapp_xman/xapp_xman.mk new file mode 100644 index 0000000000..bca6bbff8d --- /dev/null +++ b/package/x11r7/xapp_xman/xapp_xman.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# xapp_xman +# +################################################################################ + +XAPP_XMAN_VERSION = 1.1.4 +XAPP_XMAN_SOURCE = xman-$(XAPP_XMAN_VERSION).tar.bz2 +XAPP_XMAN_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XMAN_LICENSE = MIT +XAPP_XMAN_LICENSE_FILES = COPYING +XAPP_XMAN_DEPENDENCIES = xlib_libXaw + +XAPP_XMAN_CONF_ENV = \ + ac_cv_file__etc_man_conf=no \ + ac_cv_file__etc_man_config=no \ + ac_cv_file__etc_manpath_config=no \ + ac_cv_file__usr_share_misc_man_conf=no + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmessage/Config.in b/package/x11r7/xapp_xmessage/Config.in new file mode 100644 index 0000000000..e80562ffa6 --- /dev/null +++ b/package/x11r7/xapp_xmessage/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XMESSAGE + bool "xmessage" + select BR2_PACKAGE_XLIB_LIBXAW + help + display a message or query in a window (X-based /bin/echo) diff --git a/package/x11r7/xapp_xmessage/xapp_xmessage.hash b/package/x11r7/xapp_xmessage/xapp_xmessage.hash new file mode 100644 index 0000000000..5e1f199bd1 --- /dev/null +++ b/package/x11r7/xapp_xmessage/xapp_xmessage.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-January/002128.html +sha256 bcdf4b461c439bb3ade6e1e41c47d6218b912da8e9396b7ad70856db2f95ab68 xmessage-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_xmessage/xapp_xmessage.mk b/package/x11r7/xapp_xmessage/xapp_xmessage.mk new file mode 100644 index 0000000000..9c855638e1 --- /dev/null +++ b/package/x11r7/xapp_xmessage/xapp_xmessage.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xmessage +# +################################################################################ + +XAPP_XMESSAGE_VERSION = 1.0.4 +XAPP_XMESSAGE_SOURCE = xmessage-$(XAPP_XMESSAGE_VERSION).tar.bz2 +XAPP_XMESSAGE_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XMESSAGE_LICENSE = MIT +XAPP_XMESSAGE_LICENSE_FILES = COPYING +XAPP_XMESSAGE_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmh/Config.in b/package/x11r7/xapp_xmh/Config.in new file mode 100644 index 0000000000..4e86d0f426 --- /dev/null +++ b/package/x11r7/xapp_xmh/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XMH + bool "xmh" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XDATA_XBITMAPS + help + send and read mail with an X interface to MH diff --git a/package/x11r7/xapp_xmh/xapp_xmh.hash b/package/x11r7/xapp_xmh/xapp_xmh.hash new file mode 100644 index 0000000000..0358b3d95a --- /dev/null +++ b/package/x11r7/xapp_xmh/xapp_xmh.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002582.html +sha256 b92f4f912a5fb6346d52cc2b639aea087b347f3b2e4e1a4fc7a165b1345f5689 xmh-1.0.3.tar.bz2 diff --git a/package/x11r7/xapp_xmh/xapp_xmh.mk b/package/x11r7/xapp_xmh/xapp_xmh.mk new file mode 100644 index 0000000000..c18bbfe5da --- /dev/null +++ b/package/x11r7/xapp_xmh/xapp_xmh.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xmh +# +################################################################################ + +XAPP_XMH_VERSION = 1.0.3 +XAPP_XMH_SOURCE = xmh-$(XAPP_XMH_VERSION).tar.bz2 +XAPP_XMH_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XMH_LICENSE = MIT +XAPP_XMH_LICENSE_FILES = COPYING +XAPP_XMH_DEPENDENCIES = xlib_libXaw xdata_xbitmaps + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmodmap/Config.in b/package/x11r7/xapp_xmodmap/Config.in new file mode 100644 index 0000000000..9be79abfa9 --- /dev/null +++ b/package/x11r7/xapp_xmodmap/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XMODMAP + bool "xmodmap" + select BR2_PACKAGE_XLIB_LIBX11 + help + utility for modifying keymaps and pointer button mappings in X diff --git a/package/x11r7/xapp_xmodmap/xapp_xmodmap.hash b/package/x11r7/xapp_xmodmap/xapp_xmodmap.hash new file mode 100644 index 0000000000..aad981522d --- /dev/null +++ b/package/x11r7/xapp_xmodmap/xapp_xmodmap.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002583.html +sha256 b7b0e5cc5f10d0fb6d2d6ea4f00c77e8ac0e847cc5a73be94cd86139ac4ac478 xmodmap-1.0.9.tar.bz2 diff --git a/package/x11r7/xapp_xmodmap/xapp_xmodmap.mk b/package/x11r7/xapp_xmodmap/xapp_xmodmap.mk new file mode 100644 index 0000000000..670bf9f41f --- /dev/null +++ b/package/x11r7/xapp_xmodmap/xapp_xmodmap.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xmodmap +# +################################################################################ + +XAPP_XMODMAP_VERSION = 1.0.9 +XAPP_XMODMAP_SOURCE = xmodmap-$(XAPP_XMODMAP_VERSION).tar.bz2 +XAPP_XMODMAP_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XMODMAP_LICENSE = MIT +XAPP_XMODMAP_LICENSE_FILES = COPYING +XAPP_XMODMAP_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xmore/Config.in b/package/x11r7/xapp_xmore/Config.in new file mode 100644 index 0000000000..80c3950bb0 --- /dev/null +++ b/package/x11r7/xapp_xmore/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XMORE + bool "xmore" + select BR2_PACKAGE_XLIB_LIBXAW + help + plain text display program for the X Window System diff --git a/package/x11r7/xapp_xmore/xapp_xmore.hash b/package/x11r7/xapp_xmore/xapp_xmore.hash new file mode 100644 index 0000000000..f2b7d1a694 --- /dev/null +++ b/package/x11r7/xapp_xmore/xapp_xmore.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2010-July/001360.html +sha1 7db4e5feb82d5d05038722d3af00d28e103bed18 xmore-1.0.2.tar.bz2 diff --git a/package/x11r7/xapp_xmore/xapp_xmore.mk b/package/x11r7/xapp_xmore/xapp_xmore.mk new file mode 100644 index 0000000000..b0b0edf23b --- /dev/null +++ b/package/x11r7/xapp_xmore/xapp_xmore.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xmore +# +################################################################################ + +XAPP_XMORE_VERSION = 1.0.2 +XAPP_XMORE_SOURCE = xmore-$(XAPP_XMORE_VERSION).tar.bz2 +XAPP_XMORE_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XMORE_LICENSE = MIT +XAPP_XMORE_LICENSE_FILES = COPYING +XAPP_XMORE_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xpr/Config.in b/package/x11r7/xapp_xpr/Config.in new file mode 100644 index 0000000000..0710d62a9e --- /dev/null +++ b/package/x11r7/xapp_xpr/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XPR + bool "xpr" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + X.Org xpr application diff --git a/package/x11r7/xapp_xpr/xapp_xpr.hash b/package/x11r7/xapp_xpr/xapp_xpr.hash new file mode 100644 index 0000000000..eaab288ced --- /dev/null +++ b/package/x11r7/xapp_xpr/xapp_xpr.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-March/001926.html +sha256 fed98df31eb93d3dca4688cb535aabad06be572e70ace3b1685679c18dd86cb5 xpr-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_xpr/xapp_xpr.mk b/package/x11r7/xapp_xpr/xapp_xpr.mk new file mode 100644 index 0000000000..b2c4e040c3 --- /dev/null +++ b/package/x11r7/xapp_xpr/xapp_xpr.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xpr +# +################################################################################ + +XAPP_XPR_VERSION = 1.0.4 +XAPP_XPR_SOURCE = xpr-$(XAPP_XPR_VERSION).tar.bz2 +XAPP_XPR_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XPR_LICENSE = MIT +XAPP_XPR_LICENSE_FILES = COPYING +XAPP_XPR_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xprop/Config.in b/package/x11r7/xapp_xprop/Config.in new file mode 100644 index 0000000000..314e79f6d0 --- /dev/null +++ b/package/x11r7/xapp_xprop/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XPROP + bool "xprop" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + property displayer for X diff --git a/package/x11r7/xapp_xprop/xapp_xprop.hash b/package/x11r7/xapp_xprop/xapp_xprop.hash new file mode 100644 index 0000000000..4758979c44 --- /dev/null +++ b/package/x11r7/xapp_xprop/xapp_xprop.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-August/002290.html +sha256 9bee88b1025865ad121f72d32576dd3027af1446774aa8300cce3c261d869bc6 xprop-1.2.2.tar.bz2 diff --git a/package/x11r7/xapp_xprop/xapp_xprop.mk b/package/x11r7/xapp_xprop/xapp_xprop.mk new file mode 100644 index 0000000000..40a8577304 --- /dev/null +++ b/package/x11r7/xapp_xprop/xapp_xprop.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xprop +# +################################################################################ + +XAPP_XPROP_VERSION = 1.2.2 +XAPP_XPROP_SOURCE = xprop-$(XAPP_XPROP_VERSION).tar.bz2 +XAPP_XPROP_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XPROP_LICENSE = MIT +XAPP_XPROP_LICENSE_FILES = COPYING +XAPP_XPROP_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xrandr/Config.in b/package/x11r7/xapp_xrandr/Config.in new file mode 100644 index 0000000000..fe9bd4e913 --- /dev/null +++ b/package/x11r7/xapp_xrandr/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XRANDR + bool "xrandr" + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBX11 + help + primitive command line interface to RandR extension diff --git a/package/x11r7/xapp_xrandr/xapp_xrandr.hash b/package/x11r7/xapp_xrandr/xapp_xrandr.hash new file mode 100644 index 0000000000..b1db30dcd8 --- /dev/null +++ b/package/x11r7/xapp_xrandr/xapp_xrandr.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/xorg-announce/2016-February/002677.html +sha256 c1cfd4e1d4d708c031d60801e527abc9b6d34b85f2ffa2cadd21f75ff38151cd xrandr-1.5.0.tar.bz2 diff --git a/package/x11r7/xapp_xrandr/xapp_xrandr.mk b/package/x11r7/xapp_xrandr/xapp_xrandr.mk new file mode 100644 index 0000000000..583a501e4a --- /dev/null +++ b/package/x11r7/xapp_xrandr/xapp_xrandr.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xapp_xrandr +# +################################################################################ + +XAPP_XRANDR_VERSION = 1.5.0 +XAPP_XRANDR_SOURCE = xrandr-$(XAPP_XRANDR_VERSION).tar.bz2 +XAPP_XRANDR_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XRANDR_LICENSE = MIT +XAPP_XRANDR_LICENSE_FILES = COPYING +XAPP_XRANDR_DEPENDENCIES = xlib_libXrandr xlib_libX11 +XAPP_XRANDR_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xrdb/Config.in b/package/x11r7/xapp_xrdb/Config.in new file mode 100644 index 0000000000..8c07857018 --- /dev/null +++ b/package/x11r7/xapp_xrdb/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XRDB + bool "xrdb" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + X server resource database utility diff --git a/package/x11r7/xapp_xrdb/xapp_xrdb.hash b/package/x11r7/xapp_xrdb/xapp_xrdb.hash new file mode 100644 index 0000000000..4844a09b4a --- /dev/null +++ b/package/x11r7/xapp_xrdb/xapp_xrdb.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-September/002316.html +sha256 73827b6bbfc9d27ca287d95a1224c306d7053cd7b8156641698d7dc541ca565b xrdb-1.1.0.tar.bz2 diff --git a/package/x11r7/xapp_xrdb/xapp_xrdb.mk b/package/x11r7/xapp_xrdb/xapp_xrdb.mk new file mode 100644 index 0000000000..f32afa45ab --- /dev/null +++ b/package/x11r7/xapp_xrdb/xapp_xrdb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xrdb +# +################################################################################ + +XAPP_XRDB_VERSION = 1.1.0 +XAPP_XRDB_SOURCE = xrdb-$(XAPP_XRDB_VERSION).tar.bz2 +XAPP_XRDB_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XRDB_LICENSE = MIT +XAPP_XRDB_LICENSE_FILES = COPYING +XAPP_XRDB_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xrefresh/Config.in b/package/x11r7/xapp_xrefresh/Config.in new file mode 100644 index 0000000000..16b1e50b32 --- /dev/null +++ b/package/x11r7/xapp_xrefresh/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XREFRESH + bool "xrefresh" + select BR2_PACKAGE_XLIB_LIBX11 + help + refresh all or part of an X screen diff --git a/package/x11r7/xapp_xrefresh/xapp_xrefresh.hash b/package/x11r7/xapp_xrefresh/xapp_xrefresh.hash new file mode 100644 index 0000000000..6d5a53b009 --- /dev/null +++ b/package/x11r7/xapp_xrefresh/xapp_xrefresh.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-May/002214.html +sha256 3213671b0a8a9d1e8d1d5d9e3fd86842c894dd9acc1be2560eda50bc1fb791d6 xrefresh-1.0.5.tar.bz2 diff --git a/package/x11r7/xapp_xrefresh/xapp_xrefresh.mk b/package/x11r7/xapp_xrefresh/xapp_xrefresh.mk new file mode 100644 index 0000000000..8403762c8e --- /dev/null +++ b/package/x11r7/xapp_xrefresh/xapp_xrefresh.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xrefresh +# +################################################################################ + +XAPP_XREFRESH_VERSION = 1.0.5 +XAPP_XREFRESH_SOURCE = xrefresh-$(XAPP_XREFRESH_VERSION).tar.bz2 +XAPP_XREFRESH_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XREFRESH_LICENSE = MIT +XAPP_XREFRESH_LICENSE_FILES = COPYING +XAPP_XREFRESH_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xset/Config.in b/package/x11r7/xapp_xset/Config.in new file mode 100644 index 0000000000..71497ab7da --- /dev/null +++ b/package/x11r7/xapp_xset/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XSET + bool "xset" + select BR2_PACKAGE_XLIB_LIBXMU + help + X.Org xset application diff --git a/package/x11r7/xapp_xset/xapp_xset.hash b/package/x11r7/xapp_xset/xapp_xset.hash new file mode 100644 index 0000000000..f9ff3920c6 --- /dev/null +++ b/package/x11r7/xapp_xset/xapp_xset.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-August/002291.html +sha256 4382f4fb29b88647e13f3b4bc29263134270747fc159cfc5f7e3af23588c8063 xset-1.2.3.tar.bz2 diff --git a/package/x11r7/xapp_xset/xapp_xset.mk b/package/x11r7/xapp_xset/xapp_xset.mk new file mode 100644 index 0000000000..157cd229a7 --- /dev/null +++ b/package/x11r7/xapp_xset/xapp_xset.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xset +# +################################################################################ + +XAPP_XSET_VERSION = 1.2.3 +XAPP_XSET_SOURCE = xset-$(XAPP_XSET_VERSION).tar.bz2 +XAPP_XSET_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XSET_LICENSE = MIT +XAPP_XSET_LICENSE_FILES = COPYING +XAPP_XSET_DEPENDENCIES = xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xsetmode/Config.in b/package/x11r7/xapp_xsetmode/Config.in new file mode 100644 index 0000000000..a08e02d728 --- /dev/null +++ b/package/x11r7/xapp_xsetmode/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XSETMODE + bool "xsetmode" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXI + help + set the mode for an X Input device diff --git a/package/x11r7/xapp_xsetmode/xapp_xsetmode.mk b/package/x11r7/xapp_xsetmode/xapp_xsetmode.mk new file mode 100644 index 0000000000..c4599a9be1 --- /dev/null +++ b/package/x11r7/xapp_xsetmode/xapp_xsetmode.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xsetmode +# +################################################################################ + +XAPP_XSETMODE_VERSION = 1.0.0 +XAPP_XSETMODE_SOURCE = xsetmode-$(XAPP_XSETMODE_VERSION).tar.bz2 +XAPP_XSETMODE_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XSETMODE_LICENSE = MIT +XAPP_XSETMODE_LICENSE_FILES = COPYING +XAPP_XSETMODE_DEPENDENCIES = xlib_libX11 xlib_libXi + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xsetpointer/Config.in b/package/x11r7/xapp_xsetpointer/Config.in new file mode 100644 index 0000000000..2b0b4624e8 --- /dev/null +++ b/package/x11r7/xapp_xsetpointer/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XSETPOINTER + bool "xsetpointer" + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXI + help + set an X Input device as the main pointer diff --git a/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.mk b/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.mk new file mode 100644 index 0000000000..f56cdd58a1 --- /dev/null +++ b/package/x11r7/xapp_xsetpointer/xapp_xsetpointer.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xsetpointer +# +################################################################################ + +XAPP_XSETPOINTER_VERSION = 1.0.0 +XAPP_XSETPOINTER_SOURCE = xsetpointer-$(XAPP_XSETPOINTER_VERSION).tar.bz2 +XAPP_XSETPOINTER_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XSETPOINTER_LICENSE = MIT +XAPP_XSETPOINTER_LICENSE_FILES = COPYING +XAPP_XSETPOINTER_DEPENDENCIES = xproto_inputproto xlib_libX11 xlib_libXi + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xsetroot/Config.in b/package/x11r7/xapp_xsetroot/Config.in new file mode 100644 index 0000000000..a70df80d91 --- /dev/null +++ b/package/x11r7/xapp_xsetroot/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XAPP_XSETROOT + bool "xsetroot" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXCURSOR + select BR2_PACKAGE_XDATA_XBITMAPS + help + X.Org xsetroot application diff --git a/package/x11r7/xapp_xsetroot/xapp_xsetroot.hash b/package/x11r7/xapp_xsetroot/xapp_xsetroot.hash new file mode 100644 index 0000000000..89a1abe454 --- /dev/null +++ b/package/x11r7/xapp_xsetroot/xapp_xsetroot.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-January/002149.html +sha256 ba215daaa78c415fce11b9e58c365d03bb602eaa5ea916578d76861a468cc3d9 xsetroot-1.1.1.tar.bz2 diff --git a/package/x11r7/xapp_xsetroot/xapp_xsetroot.mk b/package/x11r7/xapp_xsetroot/xapp_xsetroot.mk new file mode 100644 index 0000000000..9000867c84 --- /dev/null +++ b/package/x11r7/xapp_xsetroot/xapp_xsetroot.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xsetroot +# +################################################################################ + +XAPP_XSETROOT_VERSION = 1.1.1 +XAPP_XSETROOT_SOURCE = xsetroot-$(XAPP_XSETROOT_VERSION).tar.bz2 +XAPP_XSETROOT_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XSETROOT_LICENSE = MIT +XAPP_XSETROOT_LICENSE_FILES = COPYING +XAPP_XSETROOT_DEPENDENCIES = xlib_libX11 xlib_libXmu xlib_libXcursor xdata_xbitmaps + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xsm/Config.in b/package/x11r7/xapp_xsm/Config.in new file mode 100644 index 0000000000..88f20cf65e --- /dev/null +++ b/package/x11r7/xapp_xsm/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XSM + bool "xsm" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBXAW + help + X Session Manager diff --git a/package/x11r7/xapp_xsm/xapp_xsm.hash b/package/x11r7/xapp_xsm/xapp_xsm.hash new file mode 100644 index 0000000000..aef9e558ba --- /dev/null +++ b/package/x11r7/xapp_xsm/xapp_xsm.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-February/002163.html +sha256 ad9dee2847a683841f73518a83014b0accae60e9eff7e96752a0dbc412867b4a xsm-1.0.3.tar.bz2 diff --git a/package/x11r7/xapp_xsm/xapp_xsm.mk b/package/x11r7/xapp_xsm/xapp_xsm.mk new file mode 100644 index 0000000000..d4d240774e --- /dev/null +++ b/package/x11r7/xapp_xsm/xapp_xsm.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xsm +# +################################################################################ + +XAPP_XSM_VERSION = 1.0.3 +XAPP_XSM_SOURCE = xsm-$(XAPP_XSM_VERSION).tar.bz2 +XAPP_XSM_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XSM_LICENSE = MIT +XAPP_XSM_LICENSE_FILES = COPYING +XAPP_XSM_DEPENDENCIES = xlib_libXaw + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xstdcmap/Config.in b/package/x11r7/xapp_xstdcmap/Config.in new file mode 100644 index 0000000000..f15c36b82b --- /dev/null +++ b/package/x11r7/xapp_xstdcmap/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XSTDCMAP + bool "xstdcmap" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + X standard colormap utility diff --git a/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.hash b/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.hash new file mode 100644 index 0000000000..6d8b35fae1 --- /dev/null +++ b/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-February/002164.html +sha256 f648e2b0cf16aa29856de998e2c7204be39dc1f8daeda9464d32288e0b580fc1 xstdcmap-1.0.3.tar.bz2 diff --git a/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.mk b/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.mk new file mode 100644 index 0000000000..a4d6dc34f6 --- /dev/null +++ b/package/x11r7/xapp_xstdcmap/xapp_xstdcmap.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xstdcmap +# +################################################################################ + +XAPP_XSTDCMAP_VERSION = 1.0.3 +XAPP_XSTDCMAP_SOURCE = xstdcmap-$(XAPP_XSTDCMAP_VERSION).tar.bz2 +XAPP_XSTDCMAP_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XSTDCMAP_LICENSE = MIT +XAPP_XSTDCMAP_LICENSE_FILES = COPYING +XAPP_XSTDCMAP_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xvidtune/Config.in b/package/x11r7/xapp_xvidtune/Config.in new file mode 100644 index 0000000000..b1902cd974 --- /dev/null +++ b/package/x11r7/xapp_xvidtune/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XVIDTUNE + bool "xvidtune" + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXXF86VM + help + video mode tuner for Xorg diff --git a/package/x11r7/xapp_xvidtune/xapp_xvidtune.hash b/package/x11r7/xapp_xvidtune/xapp_xvidtune.hash new file mode 100644 index 0000000000..5c9e25484f --- /dev/null +++ b/package/x11r7/xapp_xvidtune/xapp_xvidtune.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-January/002129.html +sha256 24e5e103933a04bfb2e1d18562619ed74031ab515e7343eb546bacdbcbeecf01 xvidtune-1.0.3.tar.bz2 diff --git a/package/x11r7/xapp_xvidtune/xapp_xvidtune.mk b/package/x11r7/xapp_xvidtune/xapp_xvidtune.mk new file mode 100644 index 0000000000..d7c4d5bf56 --- /dev/null +++ b/package/x11r7/xapp_xvidtune/xapp_xvidtune.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xvidtune +# +################################################################################ + +XAPP_XVIDTUNE_VERSION = 1.0.3 +XAPP_XVIDTUNE_SOURCE = xvidtune-$(XAPP_XVIDTUNE_VERSION).tar.bz2 +XAPP_XVIDTUNE_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XVIDTUNE_LICENSE = MIT +XAPP_XVIDTUNE_LICENSE_FILES = COPYING +XAPP_XVIDTUNE_DEPENDENCIES = xlib_libXaw xlib_libXxf86vm + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xvinfo/Config.in b/package/x11r7/xapp_xvinfo/Config.in new file mode 100644 index 0000000000..2612c047c1 --- /dev/null +++ b/package/x11r7/xapp_xvinfo/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XVINFO + bool "xvinfo" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXV + help + Print out X-Video extension adaptor information diff --git a/package/x11r7/xapp_xvinfo/xapp_xvinfo.hash b/package/x11r7/xapp_xvinfo/xapp_xvinfo.hash new file mode 100644 index 0000000000..2077730fc9 --- /dev/null +++ b/package/x11r7/xapp_xvinfo/xapp_xvinfo.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002596.html +sha256 9fba8b68daf53863e66d5004fa9c703fcecf69db4d151ea2d3d885d621e6e5eb xvinfo-1.1.3.tar.bz2 diff --git a/package/x11r7/xapp_xvinfo/xapp_xvinfo.mk b/package/x11r7/xapp_xvinfo/xapp_xvinfo.mk new file mode 100644 index 0000000000..5b05a63233 --- /dev/null +++ b/package/x11r7/xapp_xvinfo/xapp_xvinfo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xvinfo +# +################################################################################ + +XAPP_XVINFO_VERSION = 1.1.3 +XAPP_XVINFO_SOURCE = xvinfo-$(XAPP_XVINFO_VERSION).tar.bz2 +XAPP_XVINFO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XVINFO_LICENSE = MIT +XAPP_XVINFO_LICENSE_FILES = COPYING +XAPP_XVINFO_DEPENDENCIES = xlib_libX11 xlib_libXv + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xwd/Config.in b/package/x11r7/xapp_xwd/Config.in new file mode 100644 index 0000000000..ada4820f5c --- /dev/null +++ b/package/x11r7/xapp_xwd/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XAPP_XWD + bool "xwd" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXKBFILE + select BR2_PACKAGE_XLIB_LIBXMU + help + dump an image of an X window diff --git a/package/x11r7/xapp_xwd/xapp_xwd.hash b/package/x11r7/xapp_xwd/xapp_xwd.hash new file mode 100644 index 0000000000..1d9b4d5cff --- /dev/null +++ b/package/x11r7/xapp_xwd/xapp_xwd.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-August/002292.html +sha256 3bb396a2268d78de4b1c3e5237a85f7849d3434e87b3cd1f4d57eef614227d79 xwd-1.0.6.tar.bz2 diff --git a/package/x11r7/xapp_xwd/xapp_xwd.mk b/package/x11r7/xapp_xwd/xapp_xwd.mk new file mode 100644 index 0000000000..0cda34ee26 --- /dev/null +++ b/package/x11r7/xapp_xwd/xapp_xwd.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xwd +# +################################################################################ + +XAPP_XWD_VERSION = 1.0.6 +XAPP_XWD_SOURCE = xwd-$(XAPP_XWD_VERSION).tar.bz2 +XAPP_XWD_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XWD_LICENSE = MIT +XAPP_XWD_LICENSE_FILES = COPYING +XAPP_XWD_DEPENDENCIES = xlib_libX11 xlib_libXmu xlib_libxkbfile + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xwininfo/Config.in b/package/x11r7/xapp_xwininfo/Config.in new file mode 100644 index 0000000000..4e095707ec --- /dev/null +++ b/package/x11r7/xapp_xwininfo/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XAPP_XWININFO + bool "xwininfo" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXMU + help + window information utility for X diff --git a/package/x11r7/xapp_xwininfo/xapp_xwininfo.hash b/package/x11r7/xapp_xwininfo/xapp_xwininfo.hash new file mode 100644 index 0000000000..4b891a2084 --- /dev/null +++ b/package/x11r7/xapp_xwininfo/xapp_xwininfo.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-May/002215.html +sha256 218eb0ea95bd8de7903dfaa26423820c523ad1598be0751d2d8b6a2c23b23ff8 xwininfo-1.1.3.tar.bz2 diff --git a/package/x11r7/xapp_xwininfo/xapp_xwininfo.mk b/package/x11r7/xapp_xwininfo/xapp_xwininfo.mk new file mode 100644 index 0000000000..8ae5961ee4 --- /dev/null +++ b/package/x11r7/xapp_xwininfo/xapp_xwininfo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xwininfo +# +################################################################################ + +XAPP_XWININFO_VERSION = 1.1.3 +XAPP_XWININFO_SOURCE = xwininfo-$(XAPP_XWININFO_VERSION).tar.bz2 +XAPP_XWININFO_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XWININFO_LICENSE = MIT +XAPP_XWININFO_LICENSE_FILES = COPYING +XAPP_XWININFO_DEPENDENCIES = xlib_libX11 xlib_libXmu + +$(eval $(autotools-package)) diff --git a/package/x11r7/xapp_xwud/Config.in b/package/x11r7/xapp_xwud/Config.in new file mode 100644 index 0000000000..cb8337e982 --- /dev/null +++ b/package/x11r7/xapp_xwud/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XAPP_XWUD + bool "xwud" + select BR2_PACKAGE_XLIB_LIBX11 + help + image displayer for X diff --git a/package/x11r7/xapp_xwud/xapp_xwud.hash b/package/x11r7/xapp_xwud/xapp_xwud.hash new file mode 100644 index 0000000000..44e9c60753 --- /dev/null +++ b/package/x11r7/xapp_xwud/xapp_xwud.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-March/001927.html +sha256 d6b3a09ccfe750868e26bd2384900ab5ff0d434f7f40cd272a50eda8aaa1f8bd xwud-1.0.4.tar.bz2 diff --git a/package/x11r7/xapp_xwud/xapp_xwud.mk b/package/x11r7/xapp_xwud/xapp_xwud.mk new file mode 100644 index 0000000000..60afd86287 --- /dev/null +++ b/package/x11r7/xapp_xwud/xapp_xwud.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xapp_xwud +# +################################################################################ + +XAPP_XWUD_VERSION = 1.0.4 +XAPP_XWUD_SOURCE = xwud-$(XAPP_XWUD_VERSION).tar.bz2 +XAPP_XWUD_SITE = http://xorg.freedesktop.org/releases/individual/app +XAPP_XWUD_LICENSE = MIT +XAPP_XWUD_LICENSE_FILES = COPYING +XAPP_XWUD_DEPENDENCIES = xlib_libX11 + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-proto/Config.in b/package/x11r7/xcb-proto/Config.in new file mode 100644 index 0000000000..1d66372dee --- /dev/null +++ b/package/x11r7/xcb-proto/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XCB_PROTO + bool "xcb-proto" + help + The protocol headers that define XCB. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-proto/xcb-proto.hash b/package/x11r7/xcb-proto/xcb-proto.hash new file mode 100644 index 0000000000..c9a91086bd --- /dev/null +++ b/package/x11r7/xcb-proto/xcb-proto.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/xcb/2014-August/009614.html +sha256 b4aceee6502a0ce45fc39b33c541a2df4715d00b72e660ebe8c5bb444771e32e xcb-proto-1.11.tar.bz2 diff --git a/package/x11r7/xcb-proto/xcb-proto.mk b/package/x11r7/xcb-proto/xcb-proto.mk new file mode 100644 index 0000000000..931573acfa --- /dev/null +++ b/package/x11r7/xcb-proto/xcb-proto.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# xcb-proto +# +################################################################################ + +XCB_PROTO_VERSION = 1.11 +XCB_PROTO_SOURCE = xcb-proto-$(XCB_PROTO_VERSION).tar.bz2 +XCB_PROTO_SITE = http://xcb.freedesktop.org/dist +XCB_PROTO_LICENSE = MIT +XCB_PROTO_LICENSE_FILES = COPYING + +XCB_PROTO_INSTALL_STAGING = YES + +XCB_PROTO_DEPENDENCIES = host-python + +# xcbincludedir/pythondir is used by E.G. libxcb at build time to find the +# xml / python files, so ensure these expand to their full (host) paths +define XCB_PROTO_FIXUP_PC_FILE + $(SED) 's|^\(xcbincludedir=\)|\1$(STAGING_DIR)|' \ + -e 's|^\(pythondir=\)|\1$(STAGING_DIR)|' \ + $(STAGING_DIR)/usr/lib/pkgconfig/xcb-proto.pc +endef + +XCB_PROTO_POST_INSTALL_STAGING_HOOKS += XCB_PROTO_FIXUP_PC_FILE + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xcb-util-cursor/Config.in b/package/x11r7/xcb-util-cursor/Config.in new file mode 100644 index 0000000000..ca304941b7 --- /dev/null +++ b/package/x11r7/xcb-util-cursor/Config.in @@ -0,0 +1,19 @@ +config BR2_PACKAGE_XCB_UTIL_CURSOR + bool "xcb-util-cursor" + select BR2_PACKAGE_XCB_UTIL + select BR2_PACKAGE_XCB_UTIL_IMAGE + select BR2_PACKAGE_XCB_UTIL_RENDERUTIL + depends on BR2_PACKAGE_LIBXCB + help + The XCB util modules provides a number of libraries which + sit on top of libxcb, the core X protocol library, and some + of the extension libraries. These experimental libraries + provide convenience functions and interfaces which make the + raw X protocol more usable. Some of the libraries also + provide client-side code which is not strictly part of the X + protocol but which have traditionally been provided by Xlib. + + XCB util-cursor module provides the following libraries: + - cursor: port of libxcursor + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-cursor/xcb-util-cursor.hash b/package/x11r7/xcb-util-cursor/xcb-util-cursor.hash new file mode 100644 index 0000000000..e5c47ca876 --- /dev/null +++ b/package/x11r7/xcb-util-cursor/xcb-util-cursor.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-March/002555.html +sha1 b55a92cd96c3ec1be9a26963df6d5f16e68fffea xcb-util-cursor-0.1.2.tar.bz2 diff --git a/package/x11r7/xcb-util-cursor/xcb-util-cursor.mk b/package/x11r7/xcb-util-cursor/xcb-util-cursor.mk new file mode 100644 index 0000000000..65704a1104 --- /dev/null +++ b/package/x11r7/xcb-util-cursor/xcb-util-cursor.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xcb-util-cursor +# +################################################################################ + +XCB_UTIL_CURSOR_VERSION = 0.1.2 +XCB_UTIL_CURSOR_SITE = http://xcb.freedesktop.org/dist +XCB_UTIL_CURSOR_SOURCE = xcb-util-cursor-$(XCB_UTIL_CURSOR_VERSION).tar.bz2 +XCB_UTIL_CURSOR_LICENSE = MIT +XCB_UTIL_CURSOR_LICENSE_FILES = COPYING +XCB_UTIL_CURSOR_INSTALL_STAGING = YES +XCB_UTIL_CURSOR_DEPENDENCIES = xcb-util xcb-util-image xcb-util-renderutil + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util-image/Config.in b/package/x11r7/xcb-util-image/Config.in new file mode 100644 index 0000000000..31fc61a50c --- /dev/null +++ b/package/x11r7/xcb-util-image/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_XCB_UTIL_IMAGE + bool "xcb-util-image" + select BR2_PACKAGE_XCB_UTIL + help + The XCB util modules provides a number of libraries which sit on top + of libxcb, the core X protocol library, and some of the extension + libraries. These experimental libraries provide convenience functions + and interfaces which make the raw X protocol more usable. Some of the + libraries also provide client-side code which is not strictly part of + the X protocol but which have traditionally been provided by Xlib. + + XCB util-image module provides the following library: + - image: Port of Xlib's XImage and XShmImage functions. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-image/xcb-util-image.hash b/package/x11r7/xcb-util-image/xcb-util-image.hash new file mode 100644 index 0000000000..1cc82ac9b2 --- /dev/null +++ b/package/x11r7/xcb-util-image/xcb-util-image.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-October/002489.html +sha256 2db96a37d78831d643538dd1b595d7d712e04bdccf8896a5e18ce0f398ea2ffc xcb-util-image-0.4.0.tar.bz2 diff --git a/package/x11r7/xcb-util-image/xcb-util-image.mk b/package/x11r7/xcb-util-image/xcb-util-image.mk new file mode 100644 index 0000000000..705b8a7671 --- /dev/null +++ b/package/x11r7/xcb-util-image/xcb-util-image.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xcb-util-image +# +################################################################################ + +XCB_UTIL_IMAGE_VERSION = 0.4.0 +XCB_UTIL_IMAGE_SITE = http://xcb.freedesktop.org/dist +XCB_UTIL_IMAGE_SOURCE = xcb-util-image-$(XCB_UTIL_IMAGE_VERSION).tar.bz2 +XCB_UTIL_IMAGE_INSTALL_STAGING = YES +XCB_UTIL_IMAGE_LICENSE = MIT +XCB_UTIL_IMAGE_DEPENDENCIES = xcb-util + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util-keysyms/Config.in b/package/x11r7/xcb-util-keysyms/Config.in new file mode 100644 index 0000000000..0c1d8cc474 --- /dev/null +++ b/package/x11r7/xcb-util-keysyms/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_XCB_UTIL_KEYSYMS + bool "xcb-util-keysyms" + select BR2_PACKAGE_LIBXCB + help + The XCB util modules provides a number of libraries which sit on top + of libxcb, the core X protocol library, and some of the extension + libraries. These experimental libraries provide convenience functions + and interfaces which make the raw X protocol more usable. Some of the + libraries also provide client-side code which is not strictly part of + the X protocol but which have traditionally been provided by Xlib. + + XCB util-keysyms module provides the following library: keysyms: + Standard X key constants and conversion to/from keycodes. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.hash b/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.hash new file mode 100644 index 0000000000..a25a263d22 --- /dev/null +++ b/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-October/002485.html +sha256 0ef8490ff1dede52b7de533158547f8b454b241aa3e4dcca369507f66f216dd9 xcb-util-keysyms-0.4.0.tar.bz2 diff --git a/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.mk b/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.mk new file mode 100644 index 0000000000..9036b06fe8 --- /dev/null +++ b/package/x11r7/xcb-util-keysyms/xcb-util-keysyms.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xcb-util-keysyms +# +################################################################################ + +XCB_UTIL_KEYSYMS_VERSION = 0.4.0 +XCB_UTIL_KEYSYMS_SOURCE = xcb-util-keysyms-$(XCB_UTIL_KEYSYMS_VERSION).tar.bz2 +XCB_UTIL_KEYSYMS_SITE = http://xcb.freedesktop.org/dist + +# unfortunately, no license file +XCB_UTIL_KEYSYMS_LICENSE = MIT + +XCB_UTIL_KEYSYMS_INSTALL_STAGING = YES + +XCB_UTIL_KEYSYMS_DEPENDENCIES = host-pkgconf libxcb + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util-renderutil/Config.in b/package/x11r7/xcb-util-renderutil/Config.in new file mode 100644 index 0000000000..53b2a8c417 --- /dev/null +++ b/package/x11r7/xcb-util-renderutil/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_XCB_UTIL_RENDERUTIL + bool "xcb-util-renderutil" + select BR2_PACKAGE_XCB_UTIL + depends on BR2_PACKAGE_LIBXCB # xcb-util + help + The XCB util modules provides a number of libraries which + sit on top of libxcb, the core X protocol library, and some + of the extension libraries. These experimental libraries + provide convenience functions and interfaces which make the + raw X protocol more usable. Some of the libraries also + provide client-side code which is not strictly part of the X + protocol but which have traditionally been provided by Xlib. + + XCB util-renderutil module provides the following library: + - renderutil: Convenience functions for the Render + extension. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-renderutil/xcb-util-renderutil.hash b/package/x11r7/xcb-util-renderutil/xcb-util-renderutil.hash new file mode 100644 index 0000000000..1a1ad3e8a5 --- /dev/null +++ b/package/x11r7/xcb-util-renderutil/xcb-util-renderutil.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-June/002446.html +sha256 c6e97e48fb1286d6394dddb1c1732f00227c70bd1bedb7d1acabefdd340bea5b xcb-util-renderutil-0.3.9.tar.bz2 diff --git a/package/x11r7/xcb-util-renderutil/xcb-util-renderutil.mk b/package/x11r7/xcb-util-renderutil/xcb-util-renderutil.mk new file mode 100644 index 0000000000..9e6683bf3a --- /dev/null +++ b/package/x11r7/xcb-util-renderutil/xcb-util-renderutil.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xcb-util-renderutil +# +################################################################################ + +XCB_UTIL_RENDERUTIL_VERSION = 0.3.9 +XCB_UTIL_RENDERUTIL_SITE = http://xcb.freedesktop.org/dist +XCB_UTIL_RENDERUTIL_SOURCE = xcb-util-renderutil-$(XCB_UTIL_RENDERUTIL_VERSION).tar.bz2 +XCB_UTIL_RENDERUTIL_LICENSE = MIT +XCB_UTIL_RENDERUTIL_LICENSE_FILES = COPYING +XCB_UTIL_RENDERUTIL_INSTALL_STAGING = YES +XCB_UTIL_RENDERUTIL_DEPENDENCIES = xcb-util + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util-wm/Config.in b/package/x11r7/xcb-util-wm/Config.in new file mode 100644 index 0000000000..5e7d94e1d2 --- /dev/null +++ b/package/x11r7/xcb-util-wm/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_XCB_UTIL_WM + bool "xcb-util-wm" + select BR2_PACKAGE_LIBXCB + help + The XCB util modules provides a number of libraries which sit on top + of libxcb, the core X protocol library, and some of the extension + libraries. These experimental libraries provide convenience functions + and interfaces which make the raw X protocol more usable. Some of the + libraries also provide client-side code which is not strictly part of + the X protocol but which have traditionally been provided by Xlib. + + XCB util-wm module provides the following libraries: + - ewmh: Both client and window-manager helpers for EWMH. + - icccm: Both client and window-manager helpers for ICCCM. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util-wm/xcb-util-wm.hash b/package/x11r7/xcb-util-wm/xcb-util-wm.hash new file mode 100644 index 0000000000..45a6c95e10 --- /dev/null +++ b/package/x11r7/xcb-util-wm/xcb-util-wm.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-February/002401.html +sha256 28bf8179640eaa89276d2b0f1ce4285103d136be6c98262b6151aaee1d3c2a3f xcb-util-wm-0.4.1.tar.bz2 diff --git a/package/x11r7/xcb-util-wm/xcb-util-wm.mk b/package/x11r7/xcb-util-wm/xcb-util-wm.mk new file mode 100644 index 0000000000..95aeb22aa6 --- /dev/null +++ b/package/x11r7/xcb-util-wm/xcb-util-wm.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xcb-util-wm +# +################################################################################ + +XCB_UTIL_WM_VERSION = 0.4.1 +XCB_UTIL_WM_SITE = http://xcb.freedesktop.org/dist +XCB_UTIL_WM_SOURCE = xcb-util-wm-$(XCB_UTIL_WM_VERSION).tar.bz2 +XCB_UTIL_WM_INSTALL_STAGING = YES +XCB_UTIL_WM_LICENSE = MIT +XCB_UTIL_WM_DEPENDENCIES = libxcb + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcb-util/Config.in b/package/x11r7/xcb-util/Config.in new file mode 100644 index 0000000000..dd77b1d9d4 --- /dev/null +++ b/package/x11r7/xcb-util/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XCB_UTIL + bool "xcb-util" + depends on BR2_PACKAGE_LIBXCB + help + Libraries which sit on top of libxcb, the core X protocol library, + and some of the extension libraries. + + http://xcb.freedesktop.org/ diff --git a/package/x11r7/xcb-util/xcb-util.mk b/package/x11r7/xcb-util/xcb-util.mk new file mode 100644 index 0000000000..4416d8075c --- /dev/null +++ b/package/x11r7/xcb-util/xcb-util.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xcb-util +# +################################################################################ + +XCB_UTIL_VERSION = 0.3.9 +XCB_UTIL_SOURCE = xcb-util-$(XCB_UTIL_VERSION).tar.bz2 +XCB_UTIL_SITE = http://xcb.freedesktop.org/dist + +# unfortunately, no license file +XCB_UTIL_LICENSE = MIT + +XCB_UTIL_INSTALL_STAGING = YES +XCB_UTIL_DEPENDENCIES = host-gperf libxcb + +$(eval $(autotools-package)) diff --git a/package/x11r7/xcursor-transparent-theme/0001-fix-symlink.patch b/package/x11r7/xcursor-transparent-theme/0001-fix-symlink.patch new file mode 100644 index 0000000000..9cf351f238 --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/0001-fix-symlink.patch @@ -0,0 +1,37 @@ +Do not symlink to a host directory + +The installation of xcursor-transparent-theme creates many symbolic +links to the 'transp' cursor file, but it does so using an absolute +directory, that happens to point to the installation location, which +is incorrect when cross-compiling. + +Also add the -f option so that the package can be reinstalled even if +it has already been installed. + +Signed-off-by: Thomas Petazzoni + +Index: b/cursors/Makefile.am +=================================================================== +--- a/cursors/Makefile.am ++++ b/cursors/Makefile.am +@@ -91,6 +91,6 @@ + $(INSTALL_DATA) $(CURSOR_REAL) $(DESTDIR)$(CURSOR_DIR)/ + for CURSOR in $(CURSOR_NAMES); do \ + echo '-- Installing cursor '$$CURSOR; \ +- ln -s $(DESTDIR)$(CURSOR_DIR)/transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \ ++ ln -sf transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \ + done + +Index: b/cursors/Makefile.in +=================================================================== +--- a/cursors/Makefile.in ++++ b/cursors/Makefile.in +@@ -177,7 +177,7 @@ + $(INSTALL_DATA) $(CURSOR_REAL) $(DESTDIR)$(CURSOR_DIR)/ + for CURSOR in $(CURSOR_NAMES); do \ + echo '-- Installing cursor '$$CURSOR; \ +- ln -s $(DESTDIR)$(CURSOR_DIR)/transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \ ++ ln -sf transp $(DESTDIR)$(CURSOR_DIR)/$$CURSOR; \ + done + + # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/package/x11r7/xcursor-transparent-theme/Config.in b/package/x11r7/xcursor-transparent-theme/Config.in new file mode 100644 index 0000000000..8282db897a --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XCURSOR_TRANSPARENT_THEME + bool "xcursor-transparent-theme" + select BR2_PACKAGE_XLIB_LIBXCURSOR + help + Completely transparent theme for hiding the X11 cursor. + + No upstream site. diff --git a/package/x11r7/xcursor-transparent-theme/index.theme b/package/x11r7/xcursor-transparent-theme/index.theme new file mode 100644 index 0000000000..5300850fba --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/index.theme @@ -0,0 +1,2 @@ +[Icon Theme] +Inherits=xcursor-transparent diff --git a/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme.mk b/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme.mk new file mode 100644 index 0000000000..5c6f2d27a7 --- /dev/null +++ b/package/x11r7/xcursor-transparent-theme/xcursor-transparent-theme.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# xcursor-transparent-theme +# +################################################################################ + +XCURSOR_TRANSPARENT_THEME_VERSION = 0.1.1 +XCURSOR_TRANSPARENT_THEME_SITE = http://downloads.yoctoproject.org/releases/matchbox/utils +XCURSOR_TRANSPARENT_THEME_DEPENDENCIES = xlib_libXcursor host-xapp_xcursorgen +XCURSOR_TRANSPARENT_THEME_LICENSE = GPLv2 +XCURSOR_TRANSPARENT_THEME_LICENSE_FILES = COPYING + +define ICONS_DEFAULT_CONFIG_INSTALL + $(INSTALL) -m 0755 -D package/x11r7/xcursor-transparent-theme/index.theme \ + $(TARGET_DIR)/usr/share/icons/default/index.theme +endef + +XCURSOR_TRANSPARENT_THEME_POST_INSTALL_TARGET_HOOKS += ICONS_DEFAULT_CONFIG_INSTALL + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdata_xbitmaps/Config.in b/package/x11r7/xdata_xbitmaps/Config.in new file mode 100644 index 0000000000..2308caecaa --- /dev/null +++ b/package/x11r7/xdata_xbitmaps/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XDATA_XBITMAPS + bool "xbitmaps" + help + No description available diff --git a/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.hash b/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.hash new file mode 100644 index 0000000000..3e5fb32896 --- /dev/null +++ b/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2010-December/001563.html +sha1 578afff7e4912192b524c25254cf7f54c16e57d8 xbitmaps-1.1.1.tar.bz2 diff --git a/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.mk b/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.mk new file mode 100644 index 0000000000..9767f2c143 --- /dev/null +++ b/package/x11r7/xdata_xbitmaps/xdata_xbitmaps.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdata_xbitmaps +# +################################################################################ + +XDATA_XBITMAPS_VERSION = 1.1.1 +XDATA_XBITMAPS_SOURCE = xbitmaps-$(XDATA_XBITMAPS_VERSION).tar.bz2 +XDATA_XBITMAPS_SITE = http://xorg.freedesktop.org/releases/individual/data +XDATA_XBITMAPS_LICENSE = MIT +XDATA_XBITMAPS_LICENSE_FILES = COPYING + +XDATA_XBITMAPS_INSTALL_STAGING = YES + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdata_xcursor-themes/Config.in b/package/x11r7/xdata_xcursor-themes/Config.in new file mode 100644 index 0000000000..78d10209f3 --- /dev/null +++ b/package/x11r7/xdata_xcursor-themes/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XDATA_XCURSOR_THEMES + bool "xdata_xcursor-themes" + select BR2_PACKAGE_XLIB_LIBXCURSOR + help + No description available diff --git a/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.hash b/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.hash new file mode 100644 index 0000000000..e59c848641 --- /dev/null +++ b/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-July/002271.html +sha256 e3fd2c05b9df0d88a3d1192c02143295744685f4f9a03db116e206698331bb86 xcursor-themes-1.0.4.tar.bz2 diff --git a/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.mk b/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.mk new file mode 100644 index 0000000000..a2987a0ff2 --- /dev/null +++ b/package/x11r7/xdata_xcursor-themes/xdata_xcursor-themes.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xdata_xcursor-themes +# +################################################################################ + +XDATA_XCURSOR_THEMES_VERSION = 1.0.4 +XDATA_XCURSOR_THEMES_SOURCE = xcursor-themes-$(XDATA_XCURSOR_THEMES_VERSION).tar.bz2 +XDATA_XCURSOR_THEMES_SITE = http://xorg.freedesktop.org/releases/individual/data +XDATA_XCURSOR_THEMES_LICENSE = MIT +XDATA_XCURSOR_THEMES_LICENSE_FILES = COPYING + +XDATA_XCURSOR_THEMES_INSTALL_STAGING = YES +XDATA_XCURSOR_THEMES_DEPENDENCIES = xlib_libXcursor host-xapp_xcursorgen + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-evdev/Config.in b/package/x11r7/xdriver_xf86-input-evdev/Config.in new file mode 100644 index 0000000000..70e950dc74 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-evdev/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV + bool "xf86-input-evdev" + depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency + select BR2_PACKAGE_LIBEVDEV + select BR2_PACKAGE_MTDEV + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + Generic Linux input driver + +comment "xf86-input-evdev requires udev to be enabled" + depends on !BR2_PACKAGE_HAS_UDEV diff --git a/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.hash b/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.hash new file mode 100644 index 0000000000..33149348bf --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2016-January/002669.html +sha256 af9c2b47f5b272ae56b45da6bd84610fc9a3d80a4b32c8215842a39d862de017 xf86-input-evdev-2.10.1.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk b/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk new file mode 100644 index 0000000000..4a2ed368f2 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-evdev/xdriver_xf86-input-evdev.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xdriver_xf86-input-evdev +# +################################################################################ + +XDRIVER_XF86_INPUT_EVDEV_VERSION = 2.10.1 +XDRIVER_XF86_INPUT_EVDEV_SOURCE = xf86-input-evdev-$(XDRIVER_XF86_INPUT_EVDEV_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_EVDEV_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_EVDEV_LICENSE = MIT +XDRIVER_XF86_INPUT_EVDEV_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_EVDEV_DEPENDENCIES = \ + host-pkgconf \ + libevdev \ + mtdev \ + xproto_inputproto \ + xserver_xorg-server \ + xproto_randrproto \ + xproto_xproto \ + udev + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-joystick/50-joystick.conf b/package/x11r7/xdriver_xf86-input-joystick/50-joystick.conf new file mode 100644 index 0000000000..95a295ab00 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-joystick/50-joystick.conf @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "joystick catchall" + MatchIsJoystick "on" + MatchDevicePath "/dev/input/event*" + Driver "joystick" +EndSection diff --git a/package/x11r7/xdriver_xf86-input-joystick/Config.in b/package/x11r7/xdriver_xf86-input-joystick/Config.in new file mode 100644 index 0000000000..ff9f25f549 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-joystick/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_JOYSTICK + bool "xf86-input-joystick" + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org driver for joystick input devices diff --git a/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.hash b/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.hash new file mode 100644 index 0000000000..5fac77e689 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-January/002136.html +sha1 61658b8d829fdaed6064c7c26232c3884d359187 xf86-input-joystick-1.6.2.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk b/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk new file mode 100644 index 0000000000..2696e2b7d2 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-joystick/xdriver_xf86-input-joystick.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# xdriver_xf86-input-joystick +# +################################################################################ + +XDRIVER_XF86_INPUT_JOYSTICK_VERSION = 1.6.2 +XDRIVER_XF86_INPUT_JOYSTICK_SOURCE = xf86-input-joystick-$(XDRIVER_XF86_INPUT_JOYSTICK_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_JOYSTICK_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_JOYSTICK_LICENSE = MIT +XDRIVER_XF86_INPUT_JOYSTICK_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_JOYSTICK_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto + +define XDRIVER_XF86_INPUT_JOYSTICK_CONF + $(INSTALL) -m 0644 -D \ + $(XDRIVER_XF86_INPUT_JOYSTICK_PKGDIR)/50-joystick.conf \ + $(TARGET_DIR)/usr/share/X11/xorg.conf.d/50-joystick.conf +endef +XDRIVER_XF86_INPUT_JOYSTICK_POST_INSTALL_TARGET_HOOKS += XDRIVER_XF86_INPUT_JOYSTICK_CONF + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-keyboard/Config.in b/package/x11r7/xdriver_xf86-input-keyboard/Config.in new file mode 100644 index 0000000000..0a0352424e --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-keyboard/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_KEYBOARD + bool "xf86-input-keyboard" + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XPROTO_KBPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + Keyboard input driver diff --git a/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.hash b/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.hash new file mode 100644 index 0000000000..11fcc601d7 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002559.html +sha256 1ac8ff39bf9da7d2fc7fd6c24515726e8138340c0518ab8c606e008cf93ca211 xf86-input-keyboard-1.8.1.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.mk b/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.mk new file mode 100644 index 0000000000..eb2d58287f --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-keyboard/xdriver_xf86-input-keyboard.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdriver_xf86-input-keyboard +# +################################################################################ + +XDRIVER_XF86_INPUT_KEYBOARD_VERSION = 1.8.1 +XDRIVER_XF86_INPUT_KEYBOARD_SOURCE = xf86-input-keyboard-$(XDRIVER_XF86_INPUT_KEYBOARD_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_KEYBOARD_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_KEYBOARD_LICENSE = MIT +XDRIVER_XF86_INPUT_KEYBOARD_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_KEYBOARD_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_kbproto xproto_randrproto xproto_xproto +XDRIVER_XF86_INPUT_KEYBOARD_CONF_OPTS = --disable-selective-werror + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-libinput/Config.in b/package/x11r7/xdriver_xf86-input-libinput/Config.in new file mode 100644 index 0000000000..69697ed046 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-libinput/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_LIBINPUT + bool "xf86-input-libinput" + depends on BR2_ENABLE_LOCALE # libinput + depends on BR2_PACKAGE_HAS_UDEV # libinput + select BR2_PACKAGE_LIBINPUT + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + This is an X driver based on libinput. It is a thin wrapper around + libinput, so while it does provide all features that libinput supports + it does little beyond. + +comment "xf86-input-libinput needs udev /dev management and a toolchain w/ locale" + depends on !BR2_PACKAGE_HAS_UDEV || !BR2_ENABLE_LOCALE diff --git a/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.hash b/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.hash new file mode 100644 index 0000000000..6473e4c823 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.hash @@ -0,0 +1,2 @@ +# From https://lists.x.org/archives/xorg/2016-April/057997.html +sha256 974cabbd6b658ce809b534f6410e2bbbc615f06210f9cc9e48e6d77149134a77 xf86-input-libinput-0.18.0.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.mk b/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.mk new file mode 100644 index 0000000000..056bfb0555 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-libinput/xdriver_xf86-input-libinput.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-input-libinput +# +################################################################################ + +XDRIVER_XF86_INPUT_LIBINPUT_VERSION = 0.18.0 +XDRIVER_XF86_INPUT_LIBINPUT_SOURCE = xf86-input-libinput-$(XDRIVER_XF86_INPUT_LIBINPUT_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_LIBINPUT_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_LIBINPUT_LICENSE = MIT +XDRIVER_XF86_INPUT_LIBINPUT_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_LIBINPUT_DEPENDENCIES = libinput xserver_xorg-server xproto_inputproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-mouse/Config.in b/package/x11r7/xdriver_xf86-input-mouse/Config.in new file mode 100644 index 0000000000..20e1803a99 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-mouse/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_MOUSE + bool "xf86-input-mouse" + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org driver for mouse input devices diff --git a/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.hash b/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.hash new file mode 100644 index 0000000000..5a62d13178 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2014-August/002471.html +sha256 3485d375779c08406f0789feedde15933dc703158a086ddac638598f479fc5ce xf86-input-mouse-1.9.1.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.mk b/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.mk new file mode 100644 index 0000000000..0e19467d5d --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-mouse/xdriver_xf86-input-mouse.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-input-mouse +# +################################################################################ + +XDRIVER_XF86_INPUT_MOUSE_VERSION = 1.9.1 +XDRIVER_XF86_INPUT_MOUSE_SOURCE = xf86-input-mouse-$(XDRIVER_XF86_INPUT_MOUSE_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_MOUSE_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_MOUSE_LICENSE = MIT +XDRIVER_XF86_INPUT_MOUSE_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_MOUSE_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-synaptics/Config.in b/package/x11r7/xdriver_xf86-input-synaptics/Config.in new file mode 100644 index 0000000000..ffe1a2a448 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-synaptics/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_SYNAPTICS + bool "xf86-input-synaptics" + select BR2_PACKAGE_LIBEVDEV + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_MTDEV + help + X.Org driver for synaptics input devices diff --git a/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.hash b/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.hash new file mode 100644 index 0000000000..3cb0758089 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-November/002652.html +sha256 d39f100c74f3673778b53f17bab7690161925e25dd998a15dd8cc69b52e83f01 xf86-input-synaptics-1.8.3.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.mk b/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.mk new file mode 100644 index 0000000000..b6ade4c86e --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-synaptics/xdriver_xf86-input-synaptics.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-input-synaptics +# +################################################################################ + +XDRIVER_XF86_INPUT_SYNAPTICS_VERSION = 1.8.3 +XDRIVER_XF86_INPUT_SYNAPTICS_SOURCE = xf86-input-synaptics-$(XDRIVER_XF86_INPUT_SYNAPTICS_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_SYNAPTICS_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_SYNAPTICS_LICENSE = MIT +XDRIVER_XF86_INPUT_SYNAPTICS_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_SYNAPTICS_DEPENDENCIES = libevdev xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto mtdev + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-tslib/0001-fix-segfault.patch b/package/x11r7/xdriver_xf86-input-tslib/0001-fix-segfault.patch new file mode 100644 index 0000000000..adef18b302 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-tslib/0001-fix-segfault.patch @@ -0,0 +1,34 @@ +Fetch from: https://launchpad.net/ubuntu/+archive/primary/+files/xf86-input-tslib_0.0.6-7build3.debian.tar.gz + +Signed-off-by: Jesper Baekdahl +--- +--- xf86-input-tslib-0.0.6/src/tslib.c 2009-10-19 18:07:18.000000000 +0300 ++++ xf86-input-tslib-0.0.6.new/src/tslib.c 2010-02-12 16:15:05.000000000 +0200 +@@ -103,8 +103,6 @@ + static void + PointerControlProc(DeviceIntPtr dev, PtrCtrl * ctrl) + { +- ErrorF("%s\n", __FUNCTION__); +- return; + } + + static Bool +@@ -406,7 +404,9 @@ + xf86MotionHistoryAllocate(pInfo); + #endif + +- break; ++ if (!InitPtrFeedbackClassDeviceStruct(device, PointerControlProc)) ++ return !Success; ++ break; + + case DEVICE_ON: + AddEnabledDevice(pInfo->fd); +@@ -435,6 +435,7 @@ + xf86TslibControlProc(pInfo->dev, DEVICE_OFF); + ts_close(priv->ts); + xfree(pInfo->private); ++ pInfo->private = NULL; + xf86DeleteInput(pInfo, 0); + } + diff --git a/package/x11r7/xdriver_xf86-input-tslib/0002-port-abi-12.patch b/package/x11r7/xdriver_xf86-input-tslib/0002-port-abi-12.patch new file mode 100644 index 0000000000..eb8fb542fd --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-tslib/0002-port-abi-12.patch @@ -0,0 +1,196 @@ +Fetch from: https://launchpad.net/ubuntu/+archive/primary/+files/xf86-input-tslib_0.0.6-7build3.debian.tar.gz +Fixes build against newer versions of xorg. + +Signed-off-by: Jesper Baekdahl +--- +Index: xf86-input-tslib-trunk/src/tslib.c +=================================================================== +--- xf86-input-tslib-trunk/src/tslib.c (revision 48) ++++ xf86-input-tslib-trunk/src/tslib.c (working copy) +@@ -69,6 +69,13 @@ + #define DEFAULT_HEIGHT 240 + #define DEFAULT_WIDTH 320 + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 ++#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options), NULL) ++#else ++#define COLLECT_INPUT_OPTIONS(pInfo, options) xf86CollectInputOptions((pInfo), (options)) ++#endif ++ ++ + enum { TSLIB_ROTATE_NONE=0, TSLIB_ROTATE_CW=270, TSLIB_ROTATE_UD=180, TSLIB_ROTATE_CCW=90 }; + + enum button_state { BUTTON_NOT_PRESSED = 0, BUTTON_1_PRESSED = 1, BUTTON_3_CLICK = 3, BUTTON_3_CLICKED=4, BUTTON_EMULATION_OFF=-1 }; +@@ -106,7 +113,7 @@ + } + + static Bool +-ConvertProc( LocalDevicePtr local, ++ConvertProc( InputInfoPtr local, + int first, + int num, + int v0, +@@ -135,7 +142,7 @@ + return t; + } + +-static void ReadInput (LocalDevicePtr local) ++static void ReadInput (InputInfoPtr local) + { + struct ts_priv *priv = (struct ts_priv *) (local->private); + struct ts_sample samp; +@@ -382,7 +389,11 @@ + axiswidth - 1, /* max val */ + axiswidth, /* resolution */ + 0, /* min_res */ +- axiswidth); /* max_res */ ++ axiswidth /* max_res */ ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 ++ ,Absolute ++#endif ++ ); + + InitValuatorAxisStruct(device, 1, + #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 +@@ -392,7 +403,11 @@ + axisheight - 1, /* max val */ + axisheight, /* resolution */ + 0, /* min_res */ +- axisheight); /* max_res */ ++ axisheight /* max_res */ ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 ++ ,Absolute ++#endif ++ ); + + if (InitProximityClassDeviceStruct (device) == FALSE) { + ErrorF ("Unable to allocate EVTouch touchscreen ProximityClassDeviceStruct\n"); +@@ -434,7 +449,7 @@ + ErrorF("%s\n", __FUNCTION__); + xf86TslibControlProc(pInfo->dev, DEVICE_OFF); + ts_close(priv->ts); +- xfree(pInfo->private); ++ free(pInfo->private); + pInfo->private = NULL; + xf86DeleteInput(pInfo, 0); + } +@@ -444,47 +459,57 @@ + * + * called when the module subsection is found in XF86Config + */ ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 ++static int ++xf86TslibInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags) ++#else + static InputInfoPtr + xf86TslibInit(InputDriverPtr drv, IDevPtr dev, int flags) ++#endif + { + struct ts_priv *priv; + char *s; ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 + InputInfoPtr pInfo; ++#endif + +- priv = xcalloc (1, sizeof (struct ts_priv)); ++ priv = calloc (1, sizeof (struct ts_priv)); + if (!priv) +- return NULL; ++ return BadValue; + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 + if (!(pInfo = xf86AllocateInput(drv, 0))) { +- xfree(priv); +- return NULL; ++ free(priv); ++ return BadValue; + } + + /* Initialise the InputInfoRec. */ + pInfo->name = dev->identifier; +- pInfo->type_name = XI_TOUCHSCREEN; + pInfo->flags = + XI86_KEYBOARD_CAPABLE | XI86_POINTER_CAPABLE | + XI86_SEND_DRAG_EVENTS; +- pInfo->device_control = xf86TslibControlProc; +- pInfo->read_input = ReadInput; + #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0 + pInfo->motion_history_proc = xf86GetMotionEvents; + pInfo->history_size = 0; + #endif +- pInfo->control_proc = NULL; ++ pInfo->conf_idev = dev; + pInfo->close_proc = NULL; +- pInfo->switch_mode = NULL; + pInfo->conversion_proc = ConvertProc; + pInfo->reverse_conversion_proc = NULL; +- pInfo->dev = NULL; + pInfo->private_flags = 0; + pInfo->always_core_feedback = 0; +- pInfo->conf_idev = dev; ++#endif ++ ++ pInfo->type_name = XI_TOUCHSCREEN; ++ pInfo->control_proc = NULL; ++ pInfo->read_input = ReadInput; ++ pInfo->device_control = xf86TslibControlProc; ++ pInfo->switch_mode = NULL; + pInfo->private = priv; ++ pInfo->dev = NULL; + + /* Collect the options, and process the common options. */ +- xf86CollectInputOptions(pInfo, NULL, NULL); ++ COLLECT_INPUT_OPTIONS(pInfo, NULL); + xf86ProcessCommonOptions(pInfo, pInfo->options); + + priv->screen_num = xf86SetIntOption(pInfo->options, "ScreenNumber", 0 ); +@@ -510,23 +535,31 @@ + priv->rotate = TSLIB_ROTATE_NONE; + } + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 + s = xf86CheckStrOption(dev->commonOptions, "path", NULL); ++#else ++ s = xf86CheckStrOption(pInfo->options, "path", NULL); ++#endif + if (!s) ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 + s = xf86CheckStrOption(dev->commonOptions, "Device", NULL); ++#else ++ s = xf86CheckStrOption(pInfo->options, "Device", NULL); ++#endif + + priv->ts = ts_open(s, 1); +- xfree(s); ++ free(s); + + if (!priv->ts) { + ErrorF("ts_open failed (device=%s)\n",s); + xf86DeleteInput(pInfo, 0); +- return NULL; ++ return BadValue; + } + + if (ts_config(priv->ts)) { + ErrorF("ts_config failed\n"); + xf86DeleteInput(pInfo, 0); +- return NULL; ++ return BadValue; + } + + pInfo->fd = ts_fd(priv->ts); +@@ -536,11 +569,13 @@ + priv->state = BUTTON_EMULATION_OFF; + } + ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 + /* Mark the device configured */ + pInfo->flags |= XI86_CONFIGURED; ++#endif + + /* Return the configured device */ +- return (pInfo); ++ return Success; + } + + _X_EXPORT InputDriverRec TSLIB = { diff --git a/package/x11r7/xdriver_xf86-input-tslib/Config.in b/package/x11r7/xdriver_xf86-input-tslib/Config.in new file mode 100644 index 0000000000..9c6e296153 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-tslib/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_TSLIB + bool "xf86-input-tslib" + depends on !BR2_STATIC_LIBS # tslib + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_TSLIB + help + Touch screen library input driver + + http://www.ptxdist.org/software/xf86-input-tslib/index_en.html + +comment "xf86-input-tslib needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS diff --git a/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.hash b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.hash new file mode 100644 index 0000000000..9eb3f1de8f --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 5f46fdef095a6e44a69e0f0b57c7d665224b26d990d006611236d8332e85b105 xf86-input-tslib-0.0.6.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.mk b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.mk new file mode 100644 index 0000000000..cd8c10adad --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-tslib/xdriver_xf86-input-tslib.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# xdriver_xf86-input-tslib +# +################################################################################ + +XDRIVER_XF86_INPUT_TSLIB_VERSION = 0.0.6 +XDRIVER_XF86_INPUT_TSLIB_SOURCE = xf86-input-tslib-$(XDRIVER_XF86_INPUT_TSLIB_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_TSLIB_SITE = http://www.pengutronix.de/software/xf86-input-tslib/download +XDRIVER_XF86_INPUT_TSLIB_LICENSE = MIT +XDRIVER_XF86_INPUT_TSLIB_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_TSLIB_DEPENDENCIES = \ + xproto_inputproto \ + xserver_xorg-server \ + xproto_randrproto \ + xproto_xproto \ + tslib + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-input-vmmouse/Config.in b/package/x11r7/xdriver_xf86-input-vmmouse/Config.in new file mode 100644 index 0000000000..de989eb34a --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-vmmouse/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XDRIVER_XF86_INPUT_VMMOUSE + bool "xf86-input-vmmouse" + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + VMWare mouse input driver diff --git a/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.hash b/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.hash new file mode 100644 index 0000000000..302b1cd450 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-June/002616.html +sha256 0af558957ac1be1b2863712c2475de8f4d7f14921fd01ded2e2fde4921b19319 xf86-input-vmmouse-13.1.0.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.mk b/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.mk new file mode 100644 index 0000000000..6e9cf8b785 --- /dev/null +++ b/package/x11r7/xdriver_xf86-input-vmmouse/xdriver_xf86-input-vmmouse.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# xdriver_xf86-input-vmmouse +# +################################################################################ + +XDRIVER_XF86_INPUT_VMMOUSE_VERSION = 13.1.0 +XDRIVER_XF86_INPUT_VMMOUSE_SOURCE = xf86-input-vmmouse-$(XDRIVER_XF86_INPUT_VMMOUSE_VERSION).tar.bz2 +XDRIVER_XF86_INPUT_VMMOUSE_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_INPUT_VMMOUSE_LICENSE = MIT +XDRIVER_XF86_INPUT_VMMOUSE_LICENSE_FILES = COPYING +XDRIVER_XF86_INPUT_VMMOUSE_DEPENDENCIES = xserver_xorg-server xproto_inputproto xproto_randrproto xproto_xproto + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +XDRIVER_XF86_INPUT_VMMOUSE_CONF_OPTS += --with-libudev +XDRIVER_XF86_INPUT_VMMOUSE_DEPENDENCIES += udev +else +XDRIVER_XF86_INPUT_VMMOUSE_CONF_OPTS += --without-libudev +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-amdgpu/Config.in b/package/x11r7/xdriver_xf86-video-amdgpu/Config.in new file mode 100644 index 0000000000..968c5e767c --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-amdgpu/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_AMDGPU + bool "xf86-video-amdgpu" + depends on BR2_PACKAGE_MESA3D_DRI_DRIVER + depends on BR2_PACKAGE_MESA3D_OPENGL_EGL # gbm + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBDRM_AMDGPU + select BR2_PACKAGE_LIBEPOXY + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE + select BR2_PACKAGE_XPROTO_DRI3PROTO + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_GLPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86DRIPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + AMD GPU video driver + +comment "xf86-video-amdgpu needs egl/opengl support from mesa3d" + depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL || \ + !BR2_PACKAGE_MESA3D_DRI_DRIVER diff --git a/package/x11r7/xdriver_xf86-video-amdgpu/xdriver_xf86-video-amdgpu.hash b/package/x11r7/xdriver_xf86-video-amdgpu/xdriver_xf86-video-amdgpu.hash new file mode 100644 index 0000000000..6754fb5a99 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-amdgpu/xdriver_xf86-video-amdgpu.hash @@ -0,0 +1,2 @@ +# From https://lists.x.org/archives/xorg-announce/2016-April/002686.html +sha256 69f5d0ded9f4d5ce529099b6b581268e8f4dcff5608f1441d4ebc110ebc57931 xf86-video-amdgpu-1.1.0.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-amdgpu/xdriver_xf86-video-amdgpu.mk b/package/x11r7/xdriver_xf86-video-amdgpu/xdriver_xf86-video-amdgpu.mk new file mode 100644 index 0000000000..45177b2998 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-amdgpu/xdriver_xf86-video-amdgpu.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# xdriver_xf86-video-amdgpu +# +################################################################################ + +XDRIVER_XF86_VIDEO_AMDGPU_VERSION = 1.1.0 +XDRIVER_XF86_VIDEO_AMDGPU_SOURCE = xf86-video-amdgpu-$(XDRIVER_XF86_VIDEO_AMDGPU_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_AMDGPU_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_AMDGPU_LICENSE = MIT +XDRIVER_XF86_VIDEO_AMDGPU_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_AMDGPU_DEPENDENCIES = \ + libdrm \ + xlib_libXcomposite \ + xproto_dri3proto \ + xproto_fontsproto \ + xproto_glproto \ + xproto_randrproto \ + xproto_videoproto \ + xproto_xextproto \ + xproto_xf86driproto \ + xproto_xproto \ + xserver_xorg-server + +# xdriver_xf86-video-amdgpu requires O_CLOEXEC +XDRIVER_XF86_VIDEO_AMDGPU_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-ark/0001-mibstore.patch b/package/x11r7/xdriver_xf86-video-ark/0001-mibstore.patch new file mode 100644 index 0000000000..fa3e68596a --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ark/0001-mibstore.patch @@ -0,0 +1,40 @@ +From 3a3eb72baec46f48e6cf15a834271c3d3386deac Mon Sep 17 00:00:00 2001 +From: Gaetan Nadon +Date: Tue, 17 Sep 2013 19:55:37 +0000 +Subject: Remove usage of mibstore.h (removed from server) + +The module had a compile error for this missing header file. + +Changes similar to vmware commit +23d87c92b7211cc5249eefe4ab3a2c7f370e279e + +Reviewed-by: Alex Deucher +Signed-off-by: Gaetan Nadon +--- +Fetch from: +http://cgit.freedesktop.org/xorg/driver/xf86-video-ark/commit/?id=3a3eb72baec46f48e6cf15a834271c3d3386deac + +Signed-off-by: Bernd Kuhls + +diff --git a/src/ark_driver.c b/src/ark_driver.c +index b7c287c..65cfe84 100644 +--- a/src/ark_driver.c ++++ b/src/ark_driver.c +@@ -39,7 +39,6 @@ + #include "compiler.h" + #include "mipointer.h" + #include "micmap.h" +-#include "mibstore.h" + #include "fb.h" + #include "ark.h" + +@@ -538,7 +537,6 @@ static Bool ARKScreenInit(SCREEN_INIT_ARGS_DECL) + + fbPictureInit (pScreen, 0, 0); + +- miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + + if (!pARK->NoAccel) { +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/x11r7/xdriver_xf86-video-ark/Config.in b/package/x11r7/xdriver_xf86-video-ark/Config.in new file mode 100644 index 0000000000..cecedde024 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ark/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ARK + bool "xf86-video-ark" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org driver for ark cards diff --git a/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.hash b/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.hash new file mode 100644 index 0000000000..30953ef7fb --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-July/002007.html +sha256 c690e046f34a393aac1c8d9616b4790e93cda60a460b00b9597d322175dbe51e xf86-video-ark-0.7.5.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.mk b/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.mk new file mode 100644 index 0000000000..c0b905b8dd --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ark/xdriver_xf86-video-ark.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-ark +# +################################################################################ + +XDRIVER_XF86_VIDEO_ARK_VERSION = 0.7.5 +XDRIVER_XF86_VIDEO_ARK_SOURCE = xf86-video-ark-$(XDRIVER_XF86_VIDEO_ARK_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_ARK_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_ARK_LICENSE = MIT +XDRIVER_XF86_VIDEO_ARK_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_ARK_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-ast/Config.in b/package/x11r7/xdriver_xf86-video-ast/Config.in new file mode 100644 index 0000000000..5dfe95e537 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ast/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_AST + bool "xf86-video-ast" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + No description available diff --git a/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.hash b/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.hash new file mode 100644 index 0000000000..cf877d5b3f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 1edbbc55d47d3fd71dec99b15c2483e22738c642623a0fb86ef4a81a9067a2de xf86-video-ast-1.1.5.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.mk b/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.mk new file mode 100644 index 0000000000..3c9eb91159 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ast/xdriver_xf86-video-ast.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-ast +# +################################################################################ + +XDRIVER_XF86_VIDEO_AST_VERSION = 1.1.5 +XDRIVER_XF86_VIDEO_AST_SOURCE = xf86-video-ast-$(XDRIVER_XF86_VIDEO_AST_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_AST_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_AST_LICENSE = MIT +XDRIVER_XF86_VIDEO_AST_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_AST_DEPENDENCIES = xproto_fontsproto xproto_xproto xserver_xorg-server + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-ati/Config.in b/package/x11r7/xdriver_xf86-video-ati/Config.in new file mode 100644 index 0000000000..00d91bda51 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ati/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI + bool "xf86-video-ati" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBDRM_RADEON + select BR2_PACKAGE_MESA3D_DRI_DRIVER_RADEON + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_GLPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86DRIPROTO + select BR2_PACKAGE_XPROTO_XINERAMAPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + ATI video driver + +comment "xf86-video-ati needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.hash b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.hash new file mode 100644 index 0000000000..6eb3508c54 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.hash @@ -0,0 +1,2 @@ +# From https://lists.x.org/archives/xorg-announce/2016-April/002684.html +sha256 844d1c577b145c90dc8ef027678f0c27f554363f782cd696a3aea26415b2c1c3 xf86-video-ati-7.7.0.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.mk b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.mk new file mode 100644 index 0000000000..29a0d2f59b --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-ati/xdriver_xf86-video-ati.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# xdriver_xf86-video-ati +# +################################################################################ + +XDRIVER_XF86_VIDEO_ATI_VERSION = 7.7.0 +XDRIVER_XF86_VIDEO_ATI_SOURCE = xf86-video-ati-$(XDRIVER_XF86_VIDEO_ATI_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_ATI_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_ATI_LICENSE = MIT +XDRIVER_XF86_VIDEO_ATI_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_ATI_DEPENDENCIES = \ + libdrm \ + xlib_libXcomposite \ + xproto_fontsproto \ + xproto_glproto \ + xproto_randrproto \ + xproto_videoproto \ + xproto_xextproto \ + xproto_xf86driproto \ + xproto_xineramaproto \ + xproto_xproto \ + xserver_xorg-server + +ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO)$(BR2_PACKAGE_LIBEPOXY),yy) +XDRIVER_XF86_VIDEO_ATI_CONF_OPTS = --enable-glamor +else +XDRIVER_XF86_VIDEO_ATI_CONF_OPTS = --disable-glamor +endif + +# xdriver_xf86-video-ati requires O_CLOEXEC +XDRIVER_XF86_VIDEO_ATI_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-cirrus/Config.in b/package/x11r7/xdriver_xf86-video-cirrus/Config.in new file mode 100644 index 0000000000..11c9df8e0e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-cirrus/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_CIRRUS + bool "xf86-video-cirrus" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + Cirrus Logic video driver diff --git a/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.hash b/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.hash new file mode 100644 index 0000000000..86ef09e210 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-May/002600.html +sha256 edc87b20a55259126b5239b5c1ef913419eab7ded0ed12ae9ae989460d7351ab xf86-video-cirrus-1.5.3.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.mk b/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.mk new file mode 100644 index 0000000000..78e8a9c05d --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-cirrus/xdriver_xf86-video-cirrus.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-cirrus +# +################################################################################ + +XDRIVER_XF86_VIDEO_CIRRUS_VERSION = 1.5.3 +XDRIVER_XF86_VIDEO_CIRRUS_SOURCE = xf86-video-cirrus-$(XDRIVER_XF86_VIDEO_CIRRUS_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_CIRRUS_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_CIRRUS_LICENSE = MIT +XDRIVER_XF86_VIDEO_CIRRUS_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_CIRRUS_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-dummy/Config.in b/package/x11r7/xdriver_xf86-video-dummy/Config.in new file mode 100644 index 0000000000..00f7e1df40 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-dummy/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_DUMMY + bool "xf86-video-dummy" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XF86DGAPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org driver for dummy cards diff --git a/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.hash b/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.hash new file mode 100644 index 0000000000..31cba2cb45 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-September/002318.html +sha256 56f84fcbc515685529ad8e10bca1072731d9c096b97c5d35ddc95cd589b98680 xf86-video-dummy-0.3.7.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.mk b/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.mk new file mode 100644 index 0000000000..58d9925f3e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-dummy/xdriver_xf86-video-dummy.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-dummy +# +################################################################################ + +XDRIVER_XF86_VIDEO_DUMMY_VERSION = 0.3.7 +XDRIVER_XF86_VIDEO_DUMMY_SOURCE = xf86-video-dummy-$(XDRIVER_XF86_VIDEO_DUMMY_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_DUMMY_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_DUMMY_LICENSE = MIT +XDRIVER_XF86_VIDEO_DUMMY_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_DUMMY_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xf86dgaproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-fbdev/Config.in b/package/x11r7/xdriver_xf86-video-fbdev/Config.in new file mode 100644 index 0000000000..9f7c5402b8 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbdev/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV + bool "xf86-video-fbdev" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + video driver for framebuffer device diff --git a/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.hash b/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.hash new file mode 100644 index 0000000000..0f34e5178e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-September/002324.html +sha256 9dd4b326498223abbfdf786089a46ea3db4fa6bbd341308eb48a9e00bc3fd51b xf86-video-fbdev-0.4.4.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.mk b/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.mk new file mode 100644 index 0000000000..7d08c7da18 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbdev/xdriver_xf86-video-fbdev.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-fbdev +# +################################################################################ + +XDRIVER_XF86_VIDEO_FBDEV_VERSION = 0.4.4 +XDRIVER_XF86_VIDEO_FBDEV_SOURCE = xf86-video-fbdev-$(XDRIVER_XF86_VIDEO_FBDEV_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_FBDEV_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_FBDEV_LICENSE = MIT +XDRIVER_XF86_VIDEO_FBDEV_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_FBDEV_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-fbturbo/0001-sunxi_x_g2d-drop-unused-dri2-include.patch b/package/x11r7/xdriver_xf86-video-fbturbo/0001-sunxi_x_g2d-drop-unused-dri2-include.patch new file mode 100644 index 0000000000..8b4e817bf2 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbturbo/0001-sunxi_x_g2d-drop-unused-dri2-include.patch @@ -0,0 +1,28 @@ +From 232c5b6924652f65ef5c047754e84b87b5fc6ac8 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Sat, 3 Oct 2015 19:01:38 +0200 +Subject: [PATCH] sunxi_x_g2d: drop unused dri2 include + +The driver doesn't use DRI for anything. + +[Upstream-status: submitted (https://github.com/ssvb/xf86-video-fbturbo/pull/45)] +Signed-off-by: Peter Korsgaard +--- + src/sunxi_x_g2d.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/sunxi_x_g2d.c b/src/sunxi_x_g2d.c +index d826027..8888abe 100644 +--- a/src/sunxi_x_g2d.c ++++ b/src/sunxi_x_g2d.c +@@ -31,7 +31,6 @@ + #include "xf86_OSproc.h" + #include "xf86.h" + #include "xf86drm.h" +-#include "dri2.h" + #include "damage.h" + #include "fb.h" + #include "gcstruct.h" +-- +2.1.4 + diff --git a/package/x11r7/xdriver_xf86-video-fbturbo/Config.in b/package/x11r7/xdriver_xf86-video-fbturbo/Config.in new file mode 100644 index 0000000000..7825901e98 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbturbo/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBTURBO + bool "xf86-video-fbturbo" + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_XPROTO_DRI2PROTO if BR2_PACKAGE_LIBUMP + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_XPROTO_XF86DRIPROTO + help + video driver, primarily optimized for the devices powered + by the Allwinner SoC (A10, A13, A20). It can use some of + the 2D/3D hardware acceleration features. + + https://github.com/ssvb/xf86-video-fbturbo diff --git a/package/x11r7/xdriver_xf86-video-fbturbo/xdriver_xf86-video-fbturbo.mk b/package/x11r7/xdriver_xf86-video-fbturbo/xdriver_xf86-video-fbturbo.mk new file mode 100644 index 0000000000..15f4cd1093 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-fbturbo/xdriver_xf86-video-fbturbo.mk @@ -0,0 +1,43 @@ +################################################################################ +# +# xdriver_xf86-video-fbturbo +# +################################################################################ + +XDRIVER_XF86_VIDEO_FBTURBO_VERSION = 0.4.0 +XDRIVER_XF86_VIDEO_FBTURBO_SITE = $(call github,ssvb,xf86-video-fbturbo,$(XDRIVER_XF86_VIDEO_FBTURBO_VERSION)) +XDRIVER_XF86_VIDEO_FBTURBO_LICENSE = MIT +XDRIVER_XF86_VIDEO_FBTURBO_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_FBTURBO_DEPENDENCIES = \ + xserver_xorg-server \ + libdrm \ + pixman \ + xproto_fontsproto \ + xproto_randrproto \ + xproto_renderproto \ + xproto_videoproto \ + xproto_xproto \ + xproto_xf86driproto + +ifeq ($(BR2_PACKAGE_LIBPCIACCESS),y) +XDRIVER_XF86_VIDEO_FBTURBO_DEPENDENCIES += libpciaccess +XDRIVER_XF86_VIDEO_FBTURBO_CONF_OPTS += --enable-pciaccess +else +XDRIVER_XF86_VIDEO_FBTURBO_CONF_OPTS += --disable-pciaccess +endif + +ifeq ($(BR2_PACKAGE_LIBUMP),y) +XDRIVER_XF86_VIDEO_FBTURBO_DEPENDENCIES += libump +endif + +ifeq ($(BR2_PACKAGE_XPROTO_DRI2PROTO),y) +XDRIVER_XF86_VIDEO_FBTURBO_DEPENDENCIES += xproto_dri2proto +endif + +define XDRIVER_XF86_VIDEO_FBTURBO_INSTALL_CONF_FILE + $(INSTALL) -m 0644 -D $(@D)/xorg.conf $(TARGET_DIR)/etc/X11/xorg.conf +endef + +XDRIVER_XF86_VIDEO_FBTURBO_POST_INSTALL_TARGET_HOOKS += XDRIVER_XF86_VIDEO_FBTURBO_INSTALL_CONF_FILE + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-geode/Config.in b/package/x11r7/xdriver_xf86-video-geode/Config.in new file mode 100644 index 0000000000..0b45fb165d --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-geode/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_GEODE + bool "xf86-video-geode" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XPROTO + depends on BR2_i386 + help + video driver for geode device diff --git a/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.hash b/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.hash new file mode 100644 index 0000000000..b05983fd0c --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2016-February/002673.html +sha256 d6ece9a862a68be3cdf86a87e0e1ba5e199168b8d075129646638f53649ba9e8 xf86-video-geode-2.11.18.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.mk b/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.mk new file mode 100644 index 0000000000..b882f1f857 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-geode/xdriver_xf86-video-geode.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-geode +# +################################################################################ + +XDRIVER_XF86_VIDEO_GEODE_VERSION = 2.11.18 +XDRIVER_XF86_VIDEO_GEODE_SOURCE = xf86-video-geode-$(XDRIVER_XF86_VIDEO_GEODE_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_GEODE_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_GEODE_LICENSE = MIT +XDRIVER_XF86_VIDEO_GEODE_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_GEODE_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-glide/Config.in b/package/x11r7/xdriver_xf86-video-glide/Config.in new file mode 100644 index 0000000000..413acce02c --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-glide/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_GLIDE + bool "xf86-video-glide" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XPROTO + depends on BROKEN # needs glide library from http://glide.sourceforge.net/ + help + video driver for glide device diff --git a/package/x11r7/xdriver_xf86-video-glide/xdriver_xf86-video-glide.hash b/package/x11r7/xdriver_xf86-video-glide/xdriver_xf86-video-glide.hash new file mode 100644 index 0000000000..e5b344afca --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-glide/xdriver_xf86-video-glide.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-September/002323.html +sha256 9eb04477ee559cd114917936916303f4ded95695163fae1cc10058d2a7d94aed xf86-video-glide-1.2.2.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-glide/xdriver_xf86-video-glide.mk b/package/x11r7/xdriver_xf86-video-glide/xdriver_xf86-video-glide.mk new file mode 100644 index 0000000000..3518789148 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-glide/xdriver_xf86-video-glide.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-glide +# +################################################################################ + +XDRIVER_XF86_VIDEO_GLIDE_VERSION = 1.2.2 +XDRIVER_XF86_VIDEO_GLIDE_SOURCE = xf86-video-glide-$(XDRIVER_XF86_VIDEO_GLIDE_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_GLIDE_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_GLIDE_LICENSE = MIT +XDRIVER_XF86_VIDEO_GLIDE_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_GLIDE_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-glint/0001-mbstring.patch b/package/x11r7/xdriver_xf86-video-glint/0001-mbstring.patch new file mode 100644 index 0000000000..635600abbf --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-glint/0001-mbstring.patch @@ -0,0 +1,35 @@ +From 073d5b0b392781bf4a6aa7f9e2dbe2ae51caed2c Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 25 Sep 2012 12:54:38 +0000 +Subject: Remove mibstore.h + +Signed-off-by: Adam Jackson +--- +Fetch from: +http://cgit.freedesktop.org/xorg/driver/xf86-video-glint/commit/?id=073d5b0b392781bf4a6aa7f9e2dbe2ae51caed2c + +Signed-off-by: Bernd Kuhls + +diff --git a/src/glint_driver.c b/src/glint_driver.c +index b6d20a9..aa78516 100644 +--- a/src/glint_driver.c ++++ b/src/glint_driver.c +@@ -52,8 +52,6 @@ + #include "compiler.h" + #include "mipointer.h" + +-#include "mibstore.h" +- + #include "pm3_regs.h" + #include "glint_regs.h" + #include "IBM.h" +@@ -2904,7 +2902,6 @@ GLINTScreenInit(SCREEN_INIT_ARGS_DECL) + } + } + +- miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + xf86SetSilkenMouse(pScreen); + +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/x11r7/xdriver_xf86-video-glint/Config.in b/package/x11r7/xdriver_xf86-video-glint/Config.in new file mode 100644 index 0000000000..acae30b0b0 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-glint/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_GLINT + bool "xf86-video-glint" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_GLPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86DGAPROTO + select BR2_PACKAGE_XPROTO_XF86DRIPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + GLINT/Permedia video driver + +comment "xf86-video-glint needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.hash b/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.hash new file mode 100644 index 0000000000..ad3fbaa760 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-July/002011.html +sha256 657f883bb3a4e4278399eba73840862c3642706ae8b0a4798ec97a31b3524221 xf86-video-glint-1.2.8.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.mk b/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.mk new file mode 100644 index 0000000000..76c3da1cab --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-glint/xdriver_xf86-video-glint.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdriver_xf86-video-glint +# +################################################################################ + +XDRIVER_XF86_VIDEO_GLINT_VERSION = 1.2.8 +XDRIVER_XF86_VIDEO_GLINT_SOURCE = xf86-video-glint-$(XDRIVER_XF86_VIDEO_GLINT_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_GLINT_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_GLINT_LICENSE = MIT +XDRIVER_XF86_VIDEO_GLINT_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_GLINT_AUTORECONF = YES +XDRIVER_XF86_VIDEO_GLINT_DEPENDENCIES = xserver_xorg-server libdrm xproto_fontsproto xproto_glproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86dgaproto xproto_xf86driproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-i128/0001-mbstring.patch b/package/x11r7/xdriver_xf86-video-i128/0001-mbstring.patch new file mode 100644 index 0000000000..40bb1ea2bd --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-i128/0001-mbstring.patch @@ -0,0 +1,35 @@ +From c87753733a6e1f85d1d037dced0b47ce0cf41658 Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 25 Sep 2012 12:54:40 +0000 +Subject: Remove mibstore.h + +Signed-off-by: Adam Jackson +--- +Fetch from: +http://cgit.freedesktop.org/xorg/driver/xf86-video-i128/commit/?id=c87753733a6e1f85d1d037dced0b47ce0cf41658 + +Signed-off-by: Bernd Kuhls + +diff --git a/src/i128_driver.c b/src/i128_driver.c +index a0f08c0..51a4135 100644 +--- a/src/i128_driver.c ++++ b/src/i128_driver.c +@@ -50,8 +50,6 @@ + /* All drivers initialising the SW cursor need this */ + #include "mipointer.h" + +-/* All drivers implementing backing store need this */ +-#include "mibstore.h" + #include "micmap.h" + + #include "xf86DDC.h" +@@ -1556,7 +1554,6 @@ I128ScreenInit(SCREEN_INIT_ARGS_DECL) + return FALSE; + } + +- miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + xf86SetSilkenMouse(pScreen); + +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/x11r7/xdriver_xf86-video-i128/Config.in b/package/x11r7/xdriver_xf86-video-i128/Config.in new file mode 100644 index 0000000000..30b240cc1f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-i128/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_I128 + bool "xf86-video-i128" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + Number 9 I128 video driver diff --git a/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.hash b/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.hash new file mode 100644 index 0000000000..9600c4565f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-July/002012.html +sha256 f8827e4c988f90cf5a677554b30d61f0a07eb86d872478751cdc94dc17452b9c xf86-video-i128-1.3.6.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.mk b/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.mk new file mode 100644 index 0000000000..1bb760cee3 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-i128/xdriver_xf86-video-i128.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-i128 +# +################################################################################ + +XDRIVER_XF86_VIDEO_I128_VERSION = 1.3.6 +XDRIVER_XF86_VIDEO_I128_SOURCE = xf86-video-i128-$(XDRIVER_XF86_VIDEO_I128_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_I128_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_I128_LICENSE = MIT +XDRIVER_XF86_VIDEO_I128_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_I128_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-imx-viv/0001-Remove-dix-internal-header-usage.patch b/package/x11r7/xdriver_xf86-video-imx-viv/0001-Remove-dix-internal-header-usage.patch new file mode 100644 index 0000000000..f146ba338c --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx-viv/0001-Remove-dix-internal-header-usage.patch @@ -0,0 +1,31 @@ +From 80c419dddf6483873503d90694c4b4ae34ffa5e4 Mon Sep 17 00:00:00 2001 +From: Otavio Salvador +Date: Wed, 2 Dec 2015 13:50:57 +0000 +Subject: [PATCH] Remove 'dix' internal header usage +Organization: O.S. Systems Software LTDA. + +The 'swaprep.h' is an internal Xorg header and is not being installed +anymore. The swap features are provided by the 'misc.h' header now. + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador +--- + EXA/src/vivante_extension/vivante_ext.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/EXA/src/vivante_extension/vivante_ext.c b/EXA/src/vivante_extension/vivante_ext.c +index 0d1085b..1ffbb1b 100644 +--- a/EXA/src/vivante_extension/vivante_ext.c ++++ b/EXA/src/vivante_extension/vivante_ext.c +@@ -40,7 +40,6 @@ + #include "cursorstr.h" + #include "scrnintstr.h" + #include "servermd.h" +-#include "swaprep.h" + #include "drm.h" + #include "xf86Module.h" + #include "globals.h" +-- +2.1.4 + diff --git a/package/x11r7/xdriver_xf86-video-imx-viv/Config.in b/package/x11r7/xdriver_xf86-video-imx-viv/Config.in new file mode 100644 index 0000000000..fb64d06524 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx-viv/Config.in @@ -0,0 +1,33 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_IMX_VIV + bool "xf86-video-imx-viv" + depends on BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11 + depends on BR2_TOOLCHAIN_HAS_SYNC_1 # mesa3d + select BR2_PACKAGE_MESA3D # Needed in order to compile xorg with glx/dri + select BR2_PACKAGE_MESA3D_DRI_DRIVER + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_XPROTO_XF86DRIPROTO + help + X.Org driver for iMX6 GPU (Vivante) + + Notice EGL and GLes2 APIs are correctly supported. This driver should + also be able to provide Desktop OpenGL implementation but, this + feature seems broken since quite some time. + + To use this driver, add correct configuration to your + /etc/X11/xorg.conf: + + Section "Device" + [...] + Driver "vivante" + Option "vivante_fbdev" "/dev/fbX" + EndSection + + Don't forget to load galcore.ko and create /dev/galcore before using + this driver (else, Xorg will exit with an obscur message like + "Segmentation fault at address 0xc"). + +comment "xf86-video-imx-viv depends on imx-gpu-viv with X11 output" + depends on BR2_arm + depends on !BR2_PACKAGE_IMX_GPU_VIV_OUTPUT_X11 + depends on BR2_TOOLCHAIN_HAS_SYNC_1 diff --git a/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.hash b/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.hash new file mode 100644 index 0000000000..9a165697bb --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.hash @@ -0,0 +1,2 @@ +# locally computed +sha256 3effaf42bde64da8fad2dfe0dcef12d1cfbbbe189511dbd4612442129fd832cc xserver-xorg-video-imx-viv-5.0.11.p7.4.tar.gz diff --git a/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.mk b/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.mk new file mode 100644 index 0000000000..a1b32b1c56 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.mk @@ -0,0 +1,36 @@ +################################################################################ +# +# xdriver_xf86-video-imx-viv +# +################################################################################ + +XDRIVER_XF86_VIDEO_IMX_VIV_VERSION = 5.0.11.p7.4 +XDRIVER_XF86_VIDEO_IMX_VIV_SITE = $(FREESCALE_IMX_SITE) +XDRIVER_XF86_VIDEO_IMX_VIV_SOURCE = xserver-xorg-video-imx-viv-$(XDRIVER_XF86_VIDEO_IMX_VIV_VERSION).tar.gz +XDRIVER_XF86_VIDEO_IMX_VIV_DEPENDENCIES = imx-gpu-viv xserver_xorg-server \ + xproto_xproto xproto_xf86driproto libdrm +XDRIVER_XF86_VIDEO_IMX_VIV_LICENSE = MIT +XDRIVER_XF86_VIDEO_IMX_VIV_LICENSE_FILES = COPYING-MIT +XDRIVER_XF86_VIDEO_IMX_VIV_INSTALL_STAGING = YES +XDRIVER_XF86_VIDEO_IMX_VIV_MAKE_CMD = $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D)/EXA/src -f makefile.linux + +define XDRIVER_XF86_VIDEO_IMX_VIV_BUILD_CMDS + $(XDRIVER_XF86_VIDEO_IMX_VIV_MAKE_CMD) sysroot=$(STAGING_DIR) \ + BUSID_HAS_NUMBER=1 BUILD_IN_YOCTO=1 XSERVER_GREATER_THAN_13=1 \ + CFLAGS="$(TARGET_CFLAGS) -I$(@D)/DRI_1.10.4/src" +endef + +define XDRIVER_XF86_VIDEO_IMX_VIV_INSTALL_STAGING_CMDS + $(XDRIVER_XF86_VIDEO_IMX_VIV_MAKE_CMD) prefix=$(STAGING_DIR)/usr install + $(INSTALL) -D -m 644 $(@D)/EXA/src/vivante_gal/vivante_priv.h \ + $(STAGING_DIR)/usr/include/vivante_priv.h + $(INSTALL) -D -m 644 $(@D)/EXA/src/vivante_gal/vivante_gal.h \ + $(STAGING_DIR)/usr/include/vivante_gal.h +endef + +define XDRIVER_XF86_VIDEO_IMX_VIV_INSTALL_TARGET_CMDS + $(XDRIVER_XF86_VIDEO_IMX_VIV_MAKE_CMD) prefix=$(TARGET_DIR)/usr install +endef + +$(eval $(generic-package)) + diff --git a/package/x11r7/xdriver_xf86-video-imx/0001-Update-to-newer-swap-macros.patch b/package/x11r7/xdriver_xf86-video-imx/0001-Update-to-newer-swap-macros.patch new file mode 100644 index 0000000000..05be6b32ac --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/0001-Update-to-newer-swap-macros.patch @@ -0,0 +1,65 @@ +From fc7f191a1a0f290a4e808dd8f9bd58ba1dbd2be4 Mon Sep 17 00:00:00 2001 +From: Otavio Salvador +Date: Sat, 29 Dec 2012 18:00:36 -0200 +Subject: [PATCH 1/2] ext: Update to newer swap macros + +The swap macros now use an internal temporary variable so we need to +adapt the code according. + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador +--- + src/imx_ext.c | 16 ++++++---------- + 1 file changed, 6 insertions(+), 10 deletions(-) + +diff --git a/src/imx_ext.c b/src/imx_ext.c +index f12469a..710cba4 100644 +--- a/src/imx_ext.c ++++ b/src/imx_ext.c +@@ -57,8 +57,6 @@ void imxExtInit() + static int + Proc_IMX_EXT_GetPixmapPhysAddr(ClientPtr client) + { +- int n; +- + REQUEST(xIMX_EXT_GetPixmapPhysAddrReq); + REQUEST_SIZE_MATCH(xIMX_EXT_GetPixmapPhysAddrReq); + +@@ -96,10 +94,10 @@ Proc_IMX_EXT_GetPixmapPhysAddr(ClientPtr client) + /* Check if any reply values need byte swapping */ + if (client->swapped) { + +- swaps(&rep.sequenceNumber, n); +- swapl(&rep.length, n); +- swapl(&rep.pixmapPhysAddr, n); +- swapl(&rep.pixmapPitch, n); ++ swaps(&rep.sequenceNumber); ++ swapl(&rep.length); ++ swapl(&rep.pixmapPhysAddr); ++ swapl(&rep.pixmapPitch); + } + + /* Reply to client */ +@@ -123,16 +121,14 @@ Proc_IMX_EXT_Dispatch(ClientPtr client) + static int + SProc_IMX_EXT_GetPixmapPhysAddr(ClientPtr client) + { +- int n; +- + REQUEST(xIMX_EXT_GetPixmapPhysAddrReq); + + /* Swap request message length and verify it is correct. */ +- swaps(&stuff->length, n); ++ swaps(&stuff->length); + REQUEST_SIZE_MATCH(xIMX_EXT_GetPixmapPhysAddrReq); + + /* Swap remaining request message parameters. */ +- swapl(&stuff->pixmap, n); ++ swapl(&stuff->pixmap); + + return Proc_IMX_EXT_GetPixmapPhysAddr(client); + } +-- +1.7.10.4 + diff --git a/package/x11r7/xdriver_xf86-video-imx/0002-Fix-error-unknown-type-name-uint.patch b/package/x11r7/xdriver_xf86-video-imx/0002-Fix-error-unknown-type-name-uint.patch new file mode 100644 index 0000000000..6a2fcdf44e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/0002-Fix-error-unknown-type-name-uint.patch @@ -0,0 +1,33 @@ +From ccdfce5e75ba707deacdd5808a8f3de8744848d0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Eric=20B=C3=A9nard?= +Date: Tue, 5 Feb 2013 10:57:47 +0100 +Subject: [PATCH] Fix "error: unknown type name 'uint'" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In file included from imx_driver.c:33:0: +.../sysroots/imx53qsb/usr/src/kernel/include/linux/mxcfb.h:107:2: error: unknown type name 'uint' + +Upstream-Status: Pending + +Signed-off-by: Eric Bénard +--- + src/imx_driver.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/imx_driver.c b/src/imx_driver.c +index f4b3e38..4cf662d 100644 +--- a/src/imx_driver.c ++++ b/src/imx_driver.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + +-- +1.7.10.4 + diff --git a/package/x11r7/xdriver_xf86-video-imx/0003-support-glibc-2.20.patch b/package/x11r7/xdriver_xf86-video-imx/0003-support-glibc-2.20.patch new file mode 100644 index 0000000000..3b1b84d1cd --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/0003-support-glibc-2.20.patch @@ -0,0 +1,57 @@ +Fix build errors seen with glibc 2.20 + +/home/ubuntu/work/upstream/openembedded-core/build/tmp-glibc/sysroots/imx53qsb/usr/include/xorg/os.h:579:1: error: expected identifier or '(' before '__extension__' + strndup(const char *str, size_t n); + ^ + +Signed-off-by: Khem Raj +Upstream-Status: Pending +Index: xserver-xorg-video-imx-11.09.01/src/imx_accel.c +=================================================================== +--- xserver-xorg-video-imx-11.09.01.orig/src/imx_accel.c 2011-07-26 14:22:47.000000000 -0700 ++++ xserver-xorg-video-imx-11.09.01/src/imx_accel.c 2014-08-29 15:54:43.648070587 -0700 +@@ -21,6 +21,7 @@ + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ ++#include + + #include + #include "xf86.h" +Index: xserver-xorg-video-imx-11.09.01/src/imx_exa_offscreen.c +=================================================================== +--- xserver-xorg-video-imx-11.09.01.orig/src/imx_exa_offscreen.c 2014-08-29 15:26:31.992070587 -0700 ++++ xserver-xorg-video-imx-11.09.01/src/imx_exa_offscreen.c 2014-08-29 15:54:54.632070587 -0700 +@@ -53,7 +53,7 @@ + * When allocating, the contiguous block of areas with the minimum eviction + * cost is found and evicted in order to make room for the new allocation. + */ +- ++#include + + #include "xf86.h" + #include "exa.h" +Index: xserver-xorg-video-imx-11.09.01/src/imx_exa_z160.c +=================================================================== +--- xserver-xorg-video-imx-11.09.01.orig/src/imx_exa_z160.c 2014-08-29 15:26:31.992070587 -0700 ++++ xserver-xorg-video-imx-11.09.01/src/imx_exa_z160.c 2014-08-29 15:54:36.056070587 -0700 +@@ -21,6 +21,7 @@ + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ ++#include + + #include "xf86.h" + #include "xf86_OSproc.h" +Index: xserver-xorg-video-imx-11.09.01/src/imx_ext.c +=================================================================== +--- xserver-xorg-video-imx-11.09.01.orig/src/imx_ext.c 2014-08-29 15:26:32.064070587 -0700 ++++ xserver-xorg-video-imx-11.09.01/src/imx_ext.c 2014-08-29 15:55:18.048070587 -0700 +@@ -21,6 +21,7 @@ + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ ++#include + + #include + #include diff --git a/package/x11r7/xdriver_xf86-video-imx/0004-Make-video-API-forward-and-backward-compatible.patch b/package/x11r7/xdriver_xf86-video-imx/0004-Make-video-API-forward-and-backward-compatible.patch new file mode 100644 index 0000000000..2ac6311fb1 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/0004-Make-video-API-forward-and-backward-compatible.patch @@ -0,0 +1,787 @@ +From 5216cb0f14414b5451f58df48a36c1c62c035276 Mon Sep 17 00:00:00 2001 +From: Otavio Salvador +Date: Sat, 29 Dec 2012 18:02:11 -0200 +Subject: [PATCH] Make video API forward and backward compatible + +This updates the video API in a forward and backward compatible way +using the "compat-api.h" as used in Xorg maintained drivers. + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador +--- + src/compat-api.h | 106 +++++++++++++++++++++++++++++++++++++++++++++++ + src/imx_display.c | 22 +++++----- + src/imx_display.h | 8 ++-- + src/imx_driver.c | 60 ++++++++++++++------------- + src/imx_exa_offscreen.c | 12 +++--- + src/imx_exa_z160.c | 53 ++++++++++++------------ + src/imx_xv_ipu.c | 4 +- + 7 files changed, 188 insertions(+), 77 deletions(-) + create mode 100644 src/compat-api.h + +diff --git a/src/compat-api.h b/src/compat-api.h +new file mode 100644 +index 0000000..73ac8a2 +--- /dev/null ++++ b/src/compat-api.h +@@ -0,0 +1,106 @@ ++/* ++ * Copyright 2012 Red Hat, Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a ++ * copy of this software and associated documentation files (the "Software"), ++ * to deal in the Software without restriction, including without limitation ++ * the rights to use, copy, modify, merge, publish, distribute, sublicense, ++ * and/or sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following conditions: ++ * ++ * The above copyright notice and this permission notice (including the next ++ * paragraph) shall be included in all copies or substantial portions of the ++ * Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ++ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER ++ * DEALINGS IN THE SOFTWARE. ++ * ++ * Author: Dave Airlie ++ */ ++ ++/* this file provides API compat between server post 1.13 and pre it, ++ it should be reused inside as many drivers as possible */ ++#ifndef COMPAT_API_H ++#define COMPAT_API_H ++ ++#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR ++#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] ++#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p ++#endif ++ ++#ifndef XF86_HAS_SCRN_CONV ++#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] ++#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] ++#endif ++ ++#ifndef XF86_SCRN_INTERFACE ++ ++#define SCRN_ARG_TYPE int ++#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] ++ ++#define SCREEN_ARG_TYPE int ++#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] ++ ++#define SCREEN_INIT_ARGS_DECL int index, ScreenPtr pScreen, int argc, char **argv ++ ++#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask ++#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask ++ ++#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen ++#define CLOSE_SCREEN_ARGS scrnIndex, pScreen ++#define CLOSE_SCREEN_DECL_ScrnInfoPtr ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ ++#define FBDEVHWADJUSTFRAME_ARGS(x, y) scrnIndex, (x), (y), 0 ++ ++#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags ++ ++#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags ++ ++#define FREE_SCREEN_ARGS_DECL int arg, int flags ++#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0 ++ ++#define VT_FUNC_ARGS_DECL int arg, int flags ++#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags) ++ ++#define ENABLE_DISABLE_FB_ACCESS_ARGS(pScrn, b) pScrn->scrnIndex, b ++ ++#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex) ++#else ++#define SCRN_ARG_TYPE ScrnInfoPtr ++#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) ++ ++#define SCREEN_ARG_TYPE ScreenPtr ++#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) ++ ++#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv ++ ++#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask ++#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask ++ ++#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen ++#define CLOSE_SCREEN_ARGS pScreen ++#define CLOSE_SCREEN_DECL_ScrnInfoPtr ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ++#define FBDEVHWADJUSTFRAME_ARGS(x, y) pScrn, (x), (y) ++ ++#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y ++#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr mode ++ ++#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg ++#define FREE_SCREEN_ARGS(x) (x) ++ ++#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg ++#define VT_FUNC_ARGS(flags) pScrn ++ ++#define ENABLE_DISABLE_FB_ACCESS_ARGS(pScrn, b) pScrn, b ++ ++#define XF86_ENABLEDISABLEFB_ARG(x) (x) ++ ++#endif ++ ++#endif +diff --git a/src/imx_display.c b/src/imx_display.c +index fcb8195..e2dc36a 100644 +--- a/src/imx_display.c ++++ b/src/imx_display.c +@@ -42,6 +42,8 @@ + #include "imx.h" + #include "imx_display.h" + ++#include "compat-api.h" ++ + #include + + #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,7,6,0,0) +@@ -1373,19 +1375,19 @@ imxDisplayPreInit(ScrnInfoPtr pScrn) + Bool + imxDisplayStartScreenInit(int scrnIndex, ScreenPtr pScreen) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr fPtr = IMXPTR(pScrn); + + if (!xf86SetDesiredModes(pScrn)) { + +- xf86DrvMsg(scrnIndex, X_ERROR, "mode initialization failed\n"); ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "mode initialization failed\n"); + return FALSE; + } + + #if 0 + if (!fbdevHWModeInit(pScrn, pScrn->currentMode)) { + +- xf86DrvMsg(scrnIndex, X_ERROR, "mode initialization failed\n"); ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "mode initialization failed\n"); + return FALSE; + } + pScrn->displayWidth = +@@ -1463,29 +1465,29 @@ imxDisplayFinishScreenInit(int scrnIndex, ScreenPtr pScreen) + /* -------------------------------------------------------------------- */ + + Bool +-imxDisplaySwitchMode(int scrnIndex, DisplayModePtr mode, int flags) ++imxDisplaySwitchMode(SWITCH_MODE_ARGS_DECL) + { +- ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ SCRN_INFO_PTR(arg); + + return xf86SetSingleMode(pScrn, mode, RR_Rotate_0); + } + + void +-imxDisplayAdjustFrame(int scrnIndex, int x, int y, int flags) ++imxDisplayAdjustFrame(ADJUST_FRAME_ARGS_DECL) + { +-// fbdevHWAdjustFrame(scrnIndex, x, y, flags); ++// fbdevHWAdjustFrame(pScrn->scrnIndex, x, y, flags); + } + + Bool +-imxDisplayEnterVT(int scrnIndex, int flags) ++imxDisplayEnterVT(VT_FUNC_ARGS_DECL) + { +- ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ SCRN_INFO_PTR(arg); + + return xf86SetDesiredModes(pScrn); + } + + void +-imxDisplayLeaveVT(int scrnIndex, int flags) ++imxDisplayLeaveVT(VT_FUNC_ARGS_DECL) + { + } + +diff --git a/src/imx_display.h b/src/imx_display.h +index 4a5d5aa..3a3d43a 100644 +--- a/src/imx_display.h ++++ b/src/imx_display.h +@@ -59,16 +59,16 @@ imxDisplayValidMode(int scrnIndex, DisplayModePtr mode, + Bool verbose, int flags); + + extern Bool +-imxDisplaySwitchMode(int scrnIndex, DisplayModePtr mode, int flags); ++imxDisplaySwitchMode(SWITCH_MODE_ARGS_DECL); + + extern void +-imxDisplayAdjustFrame(int scrnIndex, int x, int y, int flags); ++imxDisplayAdjustFrame(ADJUST_FRAME_ARGS_DECL); + + extern Bool +-imxDisplayEnterVT(int scrnIndex, int flags); ++imxDisplayEnterVT(VT_FUNC_ARGS_DECL); + + extern void +-imxDisplayLeaveVT(int scrnIndex, int flags); ++imxDisplayLeaveVT(VT_FUNC_ARGS_DECL); + + extern Bool + imxDisplayChangeFrameBufferRotateEPDC(int scrnIndex, int fbRotate); +diff --git a/src/imx_driver.c b/src/imx_driver.c +index 178e36e..f4b3e38 100644 +--- a/src/imx_driver.c ++++ b/src/imx_driver.c +@@ -46,6 +46,8 @@ + #include "fb.h" + #include "fbdevhw.h" + ++#include "compat-api.h" ++ + #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 + #include "xf86Resources.h" + #include "xf86RAC.h" +@@ -435,17 +437,17 @@ errorPreInit: + } + + static void +-imxFreeScreen(int scrnIndex, int flags) ++imxFreeScreen(FREE_SCREEN_ARGS_DECL) + { +- ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ SCRN_INFO_PTR(arg); + + imxFreeRec(pScrn); + } + + static Bool +-imxCloseScreen(int scrnIndex, ScreenPtr pScreen) ++imxCloseScreen(CLOSE_SCREEN_ARGS_DECL) + { +- ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ CLOSE_SCREEN_DECL_ScrnInfoPtr; + ImxPtr fPtr = IMXPTR(pScrn); + + fbdevHWRestore(pScrn); +@@ -453,7 +455,7 @@ imxCloseScreen(int scrnIndex, ScreenPtr pScreen) + pScrn->vtSema = FALSE; + + pScreen->CloseScreen = fPtr->saveCloseScreen; +- return (*pScreen->CloseScreen)(scrnIndex, pScreen); ++ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); + } + + static int +@@ -488,9 +490,9 @@ LCM(a, b) + } + + static Bool +-imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) ++imxScreenInit(SCREEN_INIT_ARGS_DECL) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr fPtr = IMXPTR(pScrn); + VisualPtr visual; + int init_picture = 0; +@@ -514,7 +516,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + /* Map frame buffer memory */ + fPtr->fbMemoryBase = fbdevHWMapVidmem(pScrn); + if (NULL == fPtr->fbMemoryBase) { +- xf86DrvMsg(scrnIndex,X_ERROR,"mapping of video memory" ++ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"mapping of video memory" + " failed\n"); + return FALSE; + } +@@ -558,7 +560,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + const int fbOffsetScreen2 = + IMX_ALIGN(fbMaxScreenSize, fbMaxAlignOffset); + fPtr->fbMemoryScreenReserve = fbMaxScreenSize; +- xf86DrvMsg(scrnIndex, X_INFO, ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "reserve %d bytes of frame buffer for screen\n", + fPtr->fbMemoryScreenReserve); + fPtr->fbMemoryStart2 = NULL; +@@ -568,12 +570,12 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + + fPtr->fbMemoryScreenReserve += fbOffsetScreen2; + +- xf86DrvMsg(scrnIndex, X_INFO, ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "reserve same number of bytes for XRandR rotated screen at offset %d\n", + fbOffsetScreen2); + } + +- if (!imxDisplayStartScreenInit(scrnIndex, pScreen)) { ++ if (!imxDisplayStartScreenInit(pScrn->scrnIndex, pScreen)) { + + return FALSE; + } +@@ -582,7 +584,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + miClearVisualTypes(); + if (pScrn->bitsPerPixel > 8) { + if (!miSetVisualTypes(pScrn->depth, TrueColorMask, pScrn->rgbBits, TrueColor)) { +- xf86DrvMsg(scrnIndex,X_ERROR,"visual type setup failed" ++ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"visual type setup failed" + " for %d bits per pixel [1]\n", + pScrn->bitsPerPixel); + return FALSE; +@@ -591,14 +593,14 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + if (!miSetVisualTypes(pScrn->depth, + miGetDefaultVisualMask(pScrn->depth), + pScrn->rgbBits, pScrn->defaultVisual)) { +- xf86DrvMsg(scrnIndex,X_ERROR,"visual type setup failed" ++ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"visual type setup failed" + " for %d bits per pixel [2]\n", + pScrn->bitsPerPixel); + return FALSE; + } + } + if (!miSetPixmapDepths()) { +- xf86DrvMsg(scrnIndex,X_ERROR,"pixmap depth setup failed\n"); ++ xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"pixmap depth setup failed\n"); + return FALSE; + } + +@@ -607,10 +609,10 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + has a padding which is independent from the depth (controlfb) */ + pScrn->displayWidth = fbdevHWGetLineLength(pScrn) / + (pScrn->bitsPerPixel / 8); +- xf86DrvMsg(scrnIndex, X_INFO, "displayWidth = %d\n", pScrn->displayWidth); ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "displayWidth = %d\n", pScrn->displayWidth); + + if (pScrn->displayWidth != pScrn->virtualX) { +- xf86DrvMsg(scrnIndex, X_INFO, ++ xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "Pitch updated to %d after ModeInit\n", + pScrn->displayWidth); + } +@@ -633,7 +635,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + init_picture = 1; + break; + default: +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: invalid number of bits per" + " pixel (%d) encountered in" + " imxScreenInit()\n", pScrn->bitsPerPixel); +@@ -644,7 +646,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + case FBDEVHW_INTERLEAVED_PLANES: + /* This should never happen ... + * we should check for this much much earlier ... */ +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: interleaved planes are not yet " + "supported by the imx driver\n"); + ret = FALSE; +@@ -652,20 +654,20 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + case FBDEVHW_TEXT: + /* This should never happen ... + * we should check for this much much earlier ... */ +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: text mode is not supported by the " + "imx driver\n"); + ret = FALSE; + break; + case FBDEVHW_VGA_PLANES: + /* Not supported yet */ +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: EGA/VGA Planes are not yet " + "supported by the imx driver\n"); + ret = FALSE; + break; + default: +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: unrecognised hardware type (%d) " + "encountered in imxScreenInit()\n", type); + ret = FALSE; +@@ -699,7 +701,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + /* INIT ACCELERATION BEFORE INIT FOR BACKING STORE & SOFTWARE CURSOR */ + if (fPtr->useAccel) { + +- if (!imxExaZ160Setup(scrnIndex, pScreen)) { ++ if (!imxExaZ160Setup(pScrn->scrnIndex, pScreen)) { + + fPtr->useAccel = FALSE; + } +@@ -731,29 +733,29 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + /* XXX It would be simpler to use miCreateDefColormap() in all cases. */ + case FBDEVHW_PACKED_PIXELS: + if (!miCreateDefColormap(pScreen)) { +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: miCreateDefColormap failed " + "in imxScreenInit()\n"); + return FALSE; + } + break; + case FBDEVHW_INTERLEAVED_PLANES: +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: interleaved planes are not yet " + "supported by the imx driver\n"); + return FALSE; + case FBDEVHW_TEXT: +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: text mode is not supported by " + "the imx driver\n"); + return FALSE; + case FBDEVHW_VGA_PLANES: +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: EGA/VGA planes are not yet " + "supported by the imx driver\n"); + return FALSE; + default: +- xf86DrvMsg(scrnIndex, X_ERROR, ++ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "internal error: unrecognised imx hardware type " + "(%d) encountered in imxScreenInit()\n", type); + return FALSE; +@@ -782,7 +784,7 @@ imxScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) + } + #endif + +- if (!imxDisplayFinishScreenInit(scrnIndex, pScreen)) { ++ if (!imxDisplayFinishScreenInit(pScrn->scrnIndex, pScreen)) { + return FALSE; + } + +@@ -810,7 +812,7 @@ IMXGetPixmapProperties( + } + + /* Access screen associated with this pixmap. */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Check if the screen associated with this pixmap has IMX driver. */ + if (0 != strcmp(IMX_DRIVER_NAME, pScrn->driverName)) { +diff --git a/src/imx_exa_offscreen.c b/src/imx_exa_offscreen.c +index 3a5c24d..0fbe2fc 100644 +--- a/src/imx_exa_offscreen.c ++++ b/src/imx_exa_offscreen.c +@@ -79,7 +79,7 @@ static void + imxExaOffscreenValidate (ScreenPtr pScreen) + { + /* Access the driver specific data. */ +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaPtr imxExaPtr = IMXEXAPTR(imxPtr); + ExaOffscreenArea *prev = 0, *area; +@@ -135,7 +135,7 @@ imxExaOffscreenMerge (ImxExaPtr imxExaPtr, ExaOffscreenArea *area) + ExaOffscreenArea * + imxExaOffscreenFree (ScreenPtr pScreen, ExaOffscreenArea *area) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaPtr imxExaPtr = IMXEXAPTR(imxPtr); + ExaOffscreenArea *next = area->next; +@@ -281,7 +281,7 @@ imxExaOffscreenAlloc (ScreenPtr pScreen, int size, int align, + pointer privData) + { + ExaOffscreenArea *area; +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaPtr imxExaPtr = IMXEXAPTR(imxPtr); + int real_size = 0, largest_avail = 0; +@@ -418,7 +418,7 @@ imxExaOffscreenSwapIn (ScreenPtr pScreen) + Bool + imxExaOffscreenInit (ScreenPtr pScreen) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaPtr imxExaPtr = IMXEXAPTR(imxPtr); + ExaOffscreenArea *area; +@@ -453,7 +453,7 @@ imxExaOffscreenInit (ScreenPtr pScreen) + void + imxExaOffscreenFini (ScreenPtr pScreen) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaPtr imxExaPtr = IMXEXAPTR(imxPtr); + ExaOffscreenArea *area; +@@ -472,7 +472,7 @@ imxExaOffscreenFini (ScreenPtr pScreen) + void + imxExaOffscreenSwapOut (ScreenPtr pScreen) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaPtr imxExaPtr = IMXEXAPTR(imxPtr); + +diff --git a/src/imx_exa_z160.c b/src/imx_exa_z160.c +index fb718e0..3d0bc96 100644 +--- a/src/imx_exa_z160.c ++++ b/src/imx_exa_z160.c +@@ -32,6 +32,7 @@ + #include + #include + ++#include "compat-api.h" + + /* Set if handles pixmap allocation and migration, i.e, EXA_HANDLES_PIXMAPS */ + #define IMX_EXA_ENABLE_HANDLES_PIXMAPS \ +@@ -299,7 +300,7 @@ imxExaZ160GetPixmapAddress(PixmapPtr pPixmap) + return fPixmapPtr->ptr; + #else + /* Access screen associated with this pixmap. */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -344,7 +345,7 @@ imxExaZ160GetPixmapProperties( + #else + + /* Access screen associated with this pixmap. */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Make sure pixmap is in framebuffer */ + if (!exaDrawableIsOffscreen(&(pPixmap->drawable))) { +@@ -856,7 +857,7 @@ imxExaZ160SyncIfBusyPixmap(PixmapPtr pPixmap) + { + /* Access screen associated with this pixmap. */ + ScreenPtr pScreen = pPixmap->drawable.pScreen; +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + + /* Access driver specific data for screen. */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -924,7 +925,7 @@ imxExaZ160CreatePixmap2(ScreenPtr pScreen, int width, int height, + } + + /* Access the driver specific data. */ +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaZ160Ptr fPtr = IMXEXAZ160PTR(imxPtr); + +@@ -1028,7 +1029,7 @@ imxExaZ160DestroyPixmap(ScreenPtr pScreen, void *driverPriv) + ImxExaPixmapPtr fPixmapPtr = (ImxExaPixmapPtr)driverPriv; + + /* Access the driver specific data. */ +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + ImxExaZ160Ptr fPtr = IMXEXAZ160PTR(imxPtr); + +@@ -1068,7 +1069,7 @@ imxExaZ160ModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, + } + + /* Access screen associated with this pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1194,7 +1195,7 @@ imxExaZ160TrackBusyPixmap(ImxExaZ160Ptr fPtr, PixmapPtr pPixmap) + static void + imxExaZ160WaitMarker(ScreenPtr pScreen, int marker) + { +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + + /* Access driver specific data associated with the screen. */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1249,7 +1250,7 @@ imxExaZ160PrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg) + } + + /* Access screen associated with this pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1352,7 +1353,7 @@ static void + imxExaZ160Solid(PixmapPtr pPixmap, int x1, int y1, int x2, int y2) + { + /* Access screen associated with this pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1423,7 +1424,7 @@ static void + imxExaZ160DoneSolid(PixmapPtr pPixmap) + { + /* Access screen associated with this pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmap->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmap->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1485,7 +1486,7 @@ imxExaZ160PrepareCopy( + } + + /* Access the screen associated with this pixmap. */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1599,7 +1600,7 @@ static void + imxExaZ160Copy(PixmapPtr pPixmapDst, int srcX, int srcY, int dstX, int dstY, int width, int height) + { + /* Access screen associated with dst pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1661,7 +1662,7 @@ static void + imxExaZ160DoneCopy(PixmapPtr pPixmapDst) + { + /* Access screen associated with this pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -1770,7 +1771,7 @@ imxExaZ160CheckComposite(int op, PicturePtr pPictureSrc, PicturePtr pPictureMask + } + + /* Access screen associated with dst pixmap (same screen as for src pixmap). */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* Check the number of entities, and fail if it isn't one. */ + if (pScrn->numEntities != 1) { +@@ -1987,7 +1988,7 @@ imxExaZ160PrepareComposite( + { + /* Access screen associated with dst pixmap. */ + /* Should be same screen as for src pixmap. */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* NOTE - many preconditions already verified in CheckComposite. */ + +@@ -2196,7 +2197,7 @@ imxExaZ160Composite( + int height) + { + /* Access screen associated with dst pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -2275,7 +2276,7 @@ static void + imxExaZ160DoneComposite(PixmapPtr pPixmapDst) + { + /* Access screen associated with this pixmap */ +- ScrnInfoPtr pScrn = xf86Screens[pPixmapDst->drawable.pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pPixmapDst->drawable.pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -2323,7 +2324,7 @@ imxExaZ160UploadToScreen( + + /* Access screen associated with this pixmap */ + ScreenPtr pScreen = pPixmapDst->drawable.pScreen; +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -2381,7 +2382,7 @@ imxExaZ160DownloadFromScreen( + + /* Access screen associated with this pixmap */ + ScreenPtr pScreen = pPixmapSrc->drawable.pScreen; +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + + /* Access driver specific data */ + ImxPtr imxPtr = IMXPTR(pScrn); +@@ -2412,9 +2413,9 @@ imxExaZ160DownloadFromScreen( + } + + Bool +-imxExaZ160CloseScreen(int scrnIndex, ScreenPtr pScreen) ++imxExaZ160CloseScreen(CLOSE_SCREEN_ARGS_DECL) + { +- ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; ++ CLOSE_SCREEN_DECL_ScrnInfoPtr; + ImxPtr imxPtr = IMXPTR(pScrn); + + ImxExaZ160Ptr fPtr = IMXEXAZ160PTR(imxPtr); +@@ -2504,7 +2505,7 @@ imxExaZ160CloseScreen(int scrnIndex, ScreenPtr pScreen) + /* Install our CloseScreen function so that it gets called. */ + if (NULL != pScreen->CloseScreen) { + +- return (*pScreen->CloseScreen)(scrnIndex, pScreen); ++ return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); + } + + return TRUE; +@@ -2514,7 +2515,7 @@ Bool + imxExaZ160Setup(int scrnIndex, ScreenPtr pScreen) + { + /* Access the screen info and then private data structures. */ +- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ++ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ImxPtr imxPtr = IMXPTR(pScrn); + + /* Private data structure must not already be in use. */ +@@ -2582,7 +2583,7 @@ imxExaZ160Setup(int scrnIndex, ScreenPtr pScreen) + + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Initialize Z160 interfaces failed.\n"); +- imxExaZ160CloseScreen(scrnIndex, pScreen); ++ imxExaZ160CloseScreen(CLOSE_SCREEN_ARGS); + return FALSE; + } + +@@ -2592,7 +2593,7 @@ imxExaZ160Setup(int scrnIndex, ScreenPtr pScreen) + + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Allocate EXA driver structure.\n"); +- imxExaZ160CloseScreen(scrnIndex, pScreen); ++ imxExaZ160CloseScreen(CLOSE_SCREEN_ARGS); + return FALSE; + } + +@@ -2657,7 +2658,7 @@ imxExaZ160Setup(int scrnIndex, ScreenPtr pScreen) + if (!exaDriverInit(pScreen, exaDriverPtr)) { + + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "EXA initialization failed.\n"); +- imxExaZ160CloseScreen(scrnIndex, pScreen); ++ imxExaZ160CloseScreen(CLOSE_SCREEN_ARGS); + return FALSE; + } + fPtr->imxExaRec.exaDriverPtr = exaDriverPtr; +diff --git a/src/imx_xv_ipu.c b/src/imx_xv_ipu.c +index a517742..fc8a827 100644 +--- a/src/imx_xv_ipu.c ++++ b/src/imx_xv_ipu.c +@@ -398,7 +398,7 @@ xf86XVFillKeyHelper1 (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) + xRectangle *rects; + GCPtr gc; + +- if(!xf86Screens[pScreen->myNum]->vtSema) return; ++ if(!xf86ScreenToScrn(pScreen)->vtSema) return; + + gc = GetScratchGC(root->depth, pScreen); + pval[0] = key; +@@ -771,7 +771,7 @@ MXXVInitializeAdaptor + XF86VideoAdaptorPtr **pppAdaptor + ) + { +- ScreenPtr pScreen = screenInfo.screens[pScreenInfo->scrnIndex]; ++ ScreenPtr pScreen = xf86ScrnToScreen(pScreenInfo); + XF86VideoAdaptorPtr *ppAdaptor = NULL; + IMXPtr fPtr = IMXPTR(pScreenInfo); + int nAdaptor; +-- +1.7.10.4 + diff --git a/package/x11r7/xdriver_xf86-video-imx/0005-xf86-video-imxfb-fix-m4-hardcodded-paths.patch b/package/x11r7/xdriver_xf86-video-imx/0005-xf86-video-imxfb-fix-m4-hardcodded-paths.patch new file mode 100644 index 0000000000..64af7732ae --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/0005-xf86-video-imxfb-fix-m4-hardcodded-paths.patch @@ -0,0 +1,53 @@ +From 5b348e7be67957f4be6fcfa4942128c04f6db905 Mon Sep 17 00:00:00 2001 +From: Adrian Alonso +Date: Thu, 4 Aug 2011 14:24:26 -0500 +Subject: [PATCH] xf86-video-imxfb: fix m4 hardcodded paths + +* Fix m4 macros lookup location; remove /usr/share/aclocal path + +Signed-off-by: Adrian Alonso +--- + Makefile.am | 2 +- + Makefile.in | 2 +- + configure.ac | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 6752256..e205657 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -20,4 +20,4 @@ + + AUTOMAKE_OPTIONS = foreign + SUBDIRS = src +-ACLOCAL_AMFLAGS = -I /usr/share/aclocal ++ACLOCAL_AMFLAGS = -I m4 +diff --git a/Makefile.in b/Makefile.in +index 5c0ba0e..f829db7 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -243,7 +243,7 @@ top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + AUTOMAKE_OPTIONS = foreign + SUBDIRS = src +-ACLOCAL_AMFLAGS = -I /usr/share/aclocal ++ACLOCAL_AMFLAGS = -I m4 + all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +diff --git a/configure.ac b/configure.ac +index a1ac73b..0078b86 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -29,7 +29,7 @@ AC_INIT([xf86-video-imx], + AC_CONFIG_SRCDIR([Makefile.am]) + AM_CONFIG_HEADER([config.h]) + AC_CONFIG_AUX_DIR(.) +-AC_CONFIG_MACRO_DIR([/usr/share/aclocal]) ++AC_CONFIG_MACRO_DIR([m4]) + + AM_INIT_AUTOMAKE([dist-bzip2]) + +-- +1.7.4.1 + diff --git a/package/x11r7/xdriver_xf86-video-imx/0006-xserver-1.14-compat.patch b/package/x11r7/xdriver_xf86-video-imx/0006-xserver-1.14-compat.patch new file mode 100644 index 0000000000..14ccbbf98a --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/0006-xserver-1.14-compat.patch @@ -0,0 +1,34 @@ +Fix building using new Xorg 1.14 + +mibstore functions are no longer supported. This patch removes them +from this driver, following the pattern in +http://patches.openembedded.org/patch/46133/ + +This checkin shows when/where the changes to the X server were made +that deleted the header mibstore.h and mentions the reasons. +http://lists.x.org/archives/xorg-devel/2012-September/033575.html + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador + +Index: xserver-xorg-video-imx-11.09.01/src/imx_driver.c +=================================================================== +--- xserver-xorg-video-imx-11.09.01.orig/src/imx_driver.c ++++ xserver-xorg-video-imx-11.09.01/src/imx_driver.c +@@ -37,7 +37,6 @@ + #include "xf86_OSproc.h" + + #include "mipointer.h" +-#include "mibstore.h" + #include "micmap.h" + #include "colormapst.h" + #include "xf86cmap.h" +@@ -722,7 +721,6 @@ imxScreenInit(SCREEN_INIT_ARGS_DECL) + /* Initialize for X extensions. */ + imxExtInit(); + +- miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + + /* software cursor */ diff --git a/package/x11r7/xdriver_xf86-video-imx/Config.in b/package/x11r7/xdriver_xf86-video-imx/Config.in new file mode 100644 index 0000000000..bb98e5adcb --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/Config.in @@ -0,0 +1,32 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_IMX + bool "xf86-video-imx" + depends on BR2_ARM_EABI # libz160 + depends on BR2_TOOLCHAIN_USES_GLIBC # libz160 + depends on BR2_LINUX_KERNEL # linux/mxcfb.h + depends on BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_X11 + select BR2_PACKAGE_LIBZ160 + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XF86DGAPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org driver for iMX5 GPU + + To use this driver, add the correct configuration to your + /etc/X11/xorg.conf, as follows: + + Section "Device" + [...] + Driver "imx" + Option "fbdev" "/dev/fb0" + EndSection + +comment "xf86-video-imx needs an EABI toolchain w/ (e)glibc" + depends on BR2_arm + depends on !BR2_ARM_EABI || !BR2_TOOLCHAIN_USES_GLIBC + +comment "xf86-video-imx needs gpu-amd-bin-mx51 with X11 output and a Linux kernel to be built" + depends on BR2_arm + depends on !BR2_LINUX_KERNEL || !BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_X11 diff --git a/package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk b/package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk new file mode 100644 index 0000000000..5684a6db18 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdriver_xf86-video-imx +# +################################################################################ + +XDRIVER_XF86_VIDEO_IMX_VERSION = 11.09.01 +XDRIVER_XF86_VIDEO_IMX_SOURCE = xserver-xorg-video-imx-$(XDRIVER_XF86_VIDEO_IMX_VERSION).tar.gz +XDRIVER_XF86_VIDEO_IMX_SITE = $(FREESCALE_IMX_SITE) +XDRIVER_XF86_VIDEO_IMX_DEPENDENCIES = linux libz160 xserver_xorg-server \ + xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto \ + xproto_xf86dgaproto xproto_xproto +XDRIVER_XF86_VIDEO_IMX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -I$(LINUX_DIR)/include" + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-intel/Config.in b/package/x11r7/xdriver_xf86-video-intel/Config.in new file mode 100644 index 0000000000..dc2fabf404 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-intel/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL + bool "xf86-video-intel" + depends on (BR2_i386 || BR2_x86_64) + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_LIBPCIACCESS + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBDRM_INTEL + select BR2_PACKAGE_XLIB_LIBXRANDR + help + Intel video driver diff --git a/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk new file mode 100644 index 0000000000..bf4f7a64ba --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-intel/xdriver_xf86-video-intel.mk @@ -0,0 +1,51 @@ +################################################################################ +# +# xdriver_xf86-video-intel +# +################################################################################ + +XDRIVER_XF86_VIDEO_INTEL_VERSION = 82293901da23d79fd074e5255fda5c95405d52de +XDRIVER_XF86_VIDEO_INTEL_SITE = git://anongit.freedesktop.org/xorg/driver/xf86-video-intel +XDRIVER_XF86_VIDEO_INTEL_LICENSE = MIT +XDRIVER_XF86_VIDEO_INTEL_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_INTEL_AUTORECONF = YES + +# this fixes a getline-related compilation error in src/sna/kgem.c +XDRIVER_XF86_VIDEO_INTEL_CONF_ENV = \ + CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +XDRIVER_XF86_VIDEO_INTEL_CONF_OPTS = \ + --disable-xvmc \ + --enable-sna \ + --disable-glamor \ + --disable-xaa \ + --disable-dga \ + --disable-async-swap + +XDRIVER_XF86_VIDEO_INTEL_DEPENDENCIES = \ + libdrm \ + libpciaccess \ + xlib_libXrandr \ + xproto_fontsproto \ + xproto_xproto \ + xserver_xorg-server + +# X.org server support for DRI depends on a Mesa3D DRI driver +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y) +XDRIVER_XF86_VIDEO_INTEL_CONF_OPTS += --enable-dri --enable-dri1 +# quote from configure.ac: "UXA doesn't build without DRI2 headers" +ifeq ($(BR2_PACKAGE_XPROTO_DRI2PROTO),y) +XDRIVER_XF86_VIDEO_INTEL_CONF_OPTS += --enable-dri2 --enable-uxa +else +XDRIVER_XF86_VIDEO_INTEL_CONF_OPTS += --disable-dri2 --disable-uxa +endif +ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO),y) +XDRIVER_XF86_VIDEO_INTEL_CONF_OPTS += --enable-dri3 +else +XDRIVER_XF86_VIDEO_INTEL_CONF_OPTS += --disable-dri3 +endif +else +XDRIVER_XF86_VIDEO_INTEL_CONF_OPTS += --disable-dri +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-mach64/0001-cross-compile.patch b/package/x11r7/xdriver_xf86-video-mach64/0001-cross-compile.patch new file mode 100644 index 0000000000..d27617606e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mach64/0001-cross-compile.patch @@ -0,0 +1,27 @@ +--- a/configure.ac 2008-06-23 10:39:28.000000000 -0400 ++++ b/configure.ac 2008-06-23 10:40:46.000000000 -0400 +@@ -85,14 +85,20 @@ sdkdir=$(pkg-config --variable=sdkdir xo + AC_HEADER_STDC + + if test "$DRI" != no; then +- AC_CHECK_FILE([${sdkdir}/dri.h], ++ if test "$cross_compiling" = "no" ; then ++ AC_CHECK_FILE([${sdkdir}/dri.h], + [have_dri_h="yes"], [have_dri_h="no"]) +- AC_CHECK_FILE([${sdkdir}/sarea.h], ++ AC_CHECK_FILE([${sdkdir}/sarea.h], + [have_sarea_h="yes"], [have_sarea_h="no"]) +- AC_CHECK_FILE([${sdkdir}/dristruct.h], ++ AC_CHECK_FILE([${sdkdir}/dristruct.h], + [have_dristruct_h="yes"], [have_dristruct_h="no"]) +- AC_CHECK_FILE([${sdkdir}/damage.h], ++ AC_CHECK_FILE([${sdkdir}/damage.h], + [have_damage_h="yes"], [have_damage_h="no"]) ++ else ++ have_dri_h="yes" ++ have_sarea_h="yes" ++ have_dristruct_h="yes" ++ fi + fi + + AC_MSG_CHECKING([whether to include DRI support]) diff --git a/package/x11r7/xdriver_xf86-video-mach64/Config.in b/package/x11r7/xdriver_xf86-video-mach64/Config.in new file mode 100644 index 0000000000..82de826ad7 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mach64/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_MACH64 + bool "xf86-video-mach64" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + mach64 video driver diff --git a/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.hash b/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.hash new file mode 100644 index 0000000000..43a7fa707e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-May/002599.html +sha256 3e98985b6e044189efd42342862208f472881c25debf22230a1d54a96d71b41f xf86-video-mach64-6.9.5.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.mk b/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.mk new file mode 100644 index 0000000000..599036033d --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mach64/xdriver_xf86-video-mach64.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# xdriver_xf86-video-mach64 +# +################################################################################ + +XDRIVER_XF86_VIDEO_MACH64_VERSION = 6.9.5 +XDRIVER_XF86_VIDEO_MACH64_SOURCE = xf86-video-mach64-$(XDRIVER_XF86_VIDEO_MACH64_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_MACH64_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_MACH64_LICENSE = MIT +XDRIVER_XF86_VIDEO_MACH64_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_MACH64_AUTORECONF = YES +XDRIVER_XF86_VIDEO_MACH64_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto + +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) +XDRIVER_XF86_VIDEO_MACH64_CONF_OPTS = --disable-dri +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-mga/0001-misc-fixes.patch b/package/x11r7/xdriver_xf86-video-mga/0001-misc-fixes.patch new file mode 100644 index 0000000000..5707bd1b3a --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mga/0001-misc-fixes.patch @@ -0,0 +1,21 @@ +--- xf86-video-mga-1.4.9/configure.ac.orig 2007-06-10 11:55:24.000000000 +0200 ++++ xf86-video-mga-1.4.9/configure.ac 2007-06-10 12:00:37.000000000 +0200 +@@ -77,12 +77,18 @@ + AC_HEADER_STDC + + if test "x$DRI" != xno; then ++ if test "$cross_compiling" = no; then + AC_CHECK_FILE([${sdkdir}/dri.h], + [have_dri_h="yes"], [have_dri_h="no"]) + AC_CHECK_FILE([${sdkdir}/sarea.h], + [have_sarea_h="yes"], [have_sarea_h="no"]) + AC_CHECK_FILE([${sdkdir}/dristruct.h], + [have_dristruct_h="yes"], [have_dristruct_h="no"]) ++ else ++ have_dri_h="yes" ++ have_sarea_h="yes" ++ have_dristruct_h="yes" ++ fi + fi + + AC_MSG_CHECKING([whether to include DRI support]) diff --git a/package/x11r7/xdriver_xf86-video-mga/Config.in b/package/x11r7/xdriver_xf86-video-mga/Config.in new file mode 100644 index 0000000000..a504ec0c25 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mga/Config.in @@ -0,0 +1,17 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_MGA + bool "xf86-video-mga" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_GLPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86DRIPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + Matrox video driver + +comment "xf86-video-mga needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.hash b/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.hash new file mode 100644 index 0000000000..081577d4ab --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-February/002533.html +sha256 48c6690b6751c76f53de64f8dbeaa9d6c62dbcfe890c768fd87167951247d44f xf86-video-mga-1.6.4.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.mk b/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.mk new file mode 100644 index 0000000000..dcf751ccfd --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-mga/xdriver_xf86-video-mga.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdriver_xf86-video-mga +# +################################################################################ + +XDRIVER_XF86_VIDEO_MGA_VERSION = 1.6.4 +XDRIVER_XF86_VIDEO_MGA_SOURCE = xf86-video-mga-$(XDRIVER_XF86_VIDEO_MGA_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_MGA_SITE = http://xorg.freedesktop.org/archive/individual/driver +XDRIVER_XF86_VIDEO_MGA_LICENSE = MIT +XDRIVER_XF86_VIDEO_MGA_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_MGA_AUTORECONF = YES +XDRIVER_XF86_VIDEO_MGA_DEPENDENCIES = xserver_xorg-server libdrm xproto_fontsproto xproto_glproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86driproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-neomagic/Config.in b/package/x11r7/xdriver_xf86-video-neomagic/Config.in new file mode 100644 index 0000000000..f8c8c47fce --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-neomagic/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_NEOMAGIC + bool "xf86-video-neomagic" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86DGAPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + Neomagic video driver diff --git a/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.hash b/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.hash new file mode 100644 index 0000000000..fc830661b4 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-May/002602.html +sha256 72f89396b10527549337cb72a7eafb1194cf140144f9236a94ad2becdf140bf2 xf86-video-neomagic-1.2.9.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.mk b/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.mk new file mode 100644 index 0000000000..cfd55361e7 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-neomagic/xdriver_xf86-video-neomagic.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-neomagic +# +################################################################################ + +XDRIVER_XF86_VIDEO_NEOMAGIC_VERSION = 1.2.9 +XDRIVER_XF86_VIDEO_NEOMAGIC_SOURCE = xf86-video-neomagic-$(XDRIVER_XF86_VIDEO_NEOMAGIC_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_NEOMAGIC_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_NEOMAGIC_LICENSE = MIT +XDRIVER_XF86_VIDEO_NEOMAGIC_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_NEOMAGIC_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86dgaproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-nouveau/Config.in b/package/x11r7/xdriver_xf86-video-nouveau/Config.in new file mode 100644 index 0000000000..7e756e2107 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nouveau/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_NOUVEAU + bool "xf86-video-nouveau" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_MESA3D_DRI_DRIVER_NOUVEAU + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_LIBDRM_NOUVEAU + select BR2_PACKAGE_XPROTO_DRI2PROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + help + Nouveau video driver + + http://nouveau.freedesktop.org + +comment "xf86-video-nouveau needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-nouveau/xdriver_xf86-video-nouveau.hash b/package/x11r7/xdriver_xf86-video-nouveau/xdriver_xf86-video-nouveau.hash new file mode 100644 index 0000000000..9633641cd2 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nouveau/xdriver_xf86-video-nouveau.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-December/002662.html +sha256 0ea057ad7fc31caba2d4e46c7e418fe2b3c762b04fb8d382f53383397fd8391e xf86-video-nouveau-1.0.12.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-nouveau/xdriver_xf86-video-nouveau.mk b/package/x11r7/xdriver_xf86-video-nouveau/xdriver_xf86-video-nouveau.mk new file mode 100644 index 0000000000..af84e79667 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nouveau/xdriver_xf86-video-nouveau.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# xdriver_xf86-video-nouveau +# +################################################################################ + +XDRIVER_XF86_VIDEO_NOUVEAU_VERSION = 1.0.12 +XDRIVER_XF86_VIDEO_NOUVEAU_SOURCE = xf86-video-nouveau-$(XDRIVER_XF86_VIDEO_NOUVEAU_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_NOUVEAU_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_NOUVEAU_LICENSE = MIT +XDRIVER_XF86_VIDEO_NOUVEAU_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_NOUVEAU_DEPENDENCIES = \ + host-pkgconf \ + libdrm \ + xproto_dri2proto \ + xproto_randrproto \ + xproto_renderproto \ + xproto_videoproto \ + xproto_xextproto \ + xserver_xorg-server + +# xdriver_xf86-video-nouveau requires O_CLOEXEC +XDRIVER_XF86_VIDEO_NOUVEAU_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE" + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-nv/0001-mibstore.patch b/package/x11r7/xdriver_xf86-video-nv/0001-mibstore.patch new file mode 100644 index 0000000000..e71418bc9e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nv/0001-mibstore.patch @@ -0,0 +1,86 @@ +From fc78fe98222b0204b8a2872a529763d6fe5048da Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 25 Sep 2012 12:54:49 +0000 +Subject: Remove mibstore.h + +Signed-off-by: Adam Jackson +--- +Fetch from: +http://cgit.freedesktop.org/xorg/driver/xf86-video-nv/commit/?id=fc78fe98222b0204b8a2872a529763d6fe5048da + +Signed-off-by: Bernd Kuhls + +diff --git a/src/g80_driver.c b/src/g80_driver.c +index cc4e197..719b96c 100644 +--- a/src/g80_driver.c ++++ b/src/g80_driver.c +@@ -34,7 +34,6 @@ + #include + #endif + #include +-#include + #include + #include + #include +@@ -833,7 +832,6 @@ G80ScreenInit(SCREEN_INIT_ARGS_DECL) + } + } + +- miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + xf86SetSilkenMouse(pScreen); + +diff --git a/src/nv_driver.c b/src/nv_driver.c +index 6dad6e5..8f35334 100644 +--- a/src/nv_driver.c ++++ b/src/nv_driver.c +@@ -2550,7 +2550,6 @@ NVScreenInit(SCREEN_INIT_ARGS_DECL) + if (!pNv->NoAccel) + NVAccelInit(pScreen); + +- miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + xf86SetSilkenMouse(pScreen); + +diff --git a/src/nv_include.h b/src/nv_include.h +index fb190bf..f174eef 100644 +--- a/src/nv_include.h ++++ b/src/nv_include.h +@@ -24,9 +24,6 @@ + /* All drivers initialising the SW cursor need this */ + #include "mipointer.h" + +-/* All drivers implementing backing store need this */ +-#include "mibstore.h" +- + #include "micmap.h" + + #include "xf86DDC.h" +diff --git a/src/riva_driver.c b/src/riva_driver.c +index e0667ef..759501e 100644 +--- a/src/riva_driver.c ++++ b/src/riva_driver.c +@@ -1168,7 +1168,6 @@ RivaScreenInit(SCREEN_INIT_ARGS_DECL) + if (!pRiva->NoAccel) + RivaAccelInit(pScreen); + +- miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + xf86SetSilkenMouse(pScreen); + +diff --git a/src/riva_include.h b/src/riva_include.h +index f2c5302..c7aeef7 100644 +--- a/src/riva_include.h ++++ b/src/riva_include.h +@@ -22,9 +22,6 @@ + /* All drivers initialising the SW cursor need this */ + #include "mipointer.h" + +-/* All drivers implementing backing store need this */ +-#include "mibstore.h" +- + #include "micmap.h" + + #include "xf86DDC.h" +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/x11r7/xdriver_xf86-video-nv/Config.in b/package/x11r7/xdriver_xf86-video-nv/Config.in new file mode 100644 index 0000000000..8898f56729 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nv/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_NV + bool "xf86-video-nv" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + NVIDIA video driver diff --git a/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.hash b/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.hash new file mode 100644 index 0000000000..8083ea29d1 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-July/002030.html +sha256 8395f65501f16f9cbaae8f598b02c6f18e78f4d3d30a08cb8d547dc2e00c10bf xf86-video-nv-2.1.20.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.mk b/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.mk new file mode 100644 index 0000000000..655bee928e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-nv/xdriver_xf86-video-nv.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-nv +# +################################################################################ + +XDRIVER_XF86_VIDEO_NV_VERSION = 2.1.20 +XDRIVER_XF86_VIDEO_NV_SOURCE = xf86-video-nv-$(XDRIVER_XF86_VIDEO_NV_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_NV_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_NV_LICENSE = MIT +XDRIVER_XF86_VIDEO_NV_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_NV_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-openchrome/Config.in b/package/x11r7/xdriver_xf86-video-openchrome/Config.in new file mode 100644 index 0000000000..e2bb6c4903 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-openchrome/Config.in @@ -0,0 +1,21 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_OPENCHROME + bool "xf86-video-openchrome" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXCOMPOSITE + select BR2_PACKAGE_XLIB_LIBXVMC + select BR2_PACKAGE_XPROTO_GLPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86DRIPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + Openchrome, A free and Open Source video driver for the VIA/S3G + UniChrome and UniChrome Pro graphics chipsets. + + https://www.freedesktop.org/wiki/Openchrome/ + +comment "xf86-video-openchrome needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.hash b/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.hash new file mode 100644 index 0000000000..b3aef580ba --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 73e7966d01d0d644d3b9204e8bfc106cb99069c58e981626e7352f2693e3e927 xf86-video-openchrome-0.4.0.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.mk b/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.mk new file mode 100644 index 0000000000..83c12b2055 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-openchrome/xdriver_xf86-video-openchrome.mk @@ -0,0 +1,27 @@ +################################################################################ +# +# xdriver_xf86-video-openchrome +# +################################################################################ + +XDRIVER_XF86_VIDEO_OPENCHROME_VERSION = 0.4.0 +XDRIVER_XF86_VIDEO_OPENCHROME_SOURCE = xf86-video-openchrome-$(XDRIVER_XF86_VIDEO_OPENCHROME_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_OPENCHROME_SITE = http://xorg.freedesktop.org/archive/individual/driver +XDRIVER_XF86_VIDEO_OPENCHROME_LICENSE = MIT +XDRIVER_XF86_VIDEO_OPENCHROME_LICENSE_FILES = COPYING + +XDRIVER_XF86_VIDEO_OPENCHROME_DEPENDENCIES = \ + xserver_xorg-server \ + libdrm \ + xlib_libX11 \ + xlib_libXcomposite \ + xlib_libXvMC \ + xproto_fontsproto \ + xproto_glproto \ + xproto_randrproto \ + xproto_renderproto \ + xproto_xextproto \ + xproto_xf86driproto \ + xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-qxl/Config.in b/package/x11r7/xdriver_xf86-video-qxl/Config.in new file mode 100644 index 0000000000..5f05f6876b --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-qxl/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_QXL + bool "xf86-video-qxl" + depends on (BR2_i386 || BR2_x86_64) + select BR2_PACKAGE_LIBDRM if BR2_PACKAGE_HAS_UDEV # for KMS + select BR2_PACKAGE_LIBPCIACCESS + select BR2_PACKAGE_SPICE_PROTOCOL + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + QEMU QXL paravirt video driver + + http://www.spice-space.org/page/XorgQXL diff --git a/package/x11r7/xdriver_xf86-video-qxl/xdriver_xf86-video-qxl.hash b/package/x11r7/xdriver_xf86-video-qxl/xdriver_xf86-video-qxl.hash new file mode 100644 index 0000000000..1648c29c64 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-qxl/xdriver_xf86-video-qxl.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/spice-devel/2015-April/019356.html +sha256 e57ad22f0b1daf8979e722be0cc38d351bfcc2e41568edc566d2bade5a621105 xf86-video-qxl-0.1.4.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-qxl/xdriver_xf86-video-qxl.mk b/package/x11r7/xdriver_xf86-video-qxl/xdriver_xf86-video-qxl.mk new file mode 100644 index 0000000000..ddc4191a47 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-qxl/xdriver_xf86-video-qxl.mk @@ -0,0 +1,32 @@ +################################################################################ +# +# xdriver_xf86-video-qxl +# +################################################################################ + +XDRIVER_XF86_VIDEO_QXL_VERSION = 0.1.4 +XDRIVER_XF86_VIDEO_QXL_SOURCE = xf86-video-qxl-$(XDRIVER_XF86_VIDEO_QXL_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_QXL_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_QXL_LICENSE = MIT +XDRIVER_XF86_VIDEO_QXL_LICENSE_FILES = COPYING + +XDRIVER_XF86_VIDEO_QXL_CONF_OPTS = \ + --enable-xspice=no + +XDRIVER_XF86_VIDEO_QXL_DEPENDENCIES = \ + libpciaccess \ + spice-protocol \ + xproto_fontsproto \ + xproto_xproto \ + xserver_xorg-server + +# configure doesn't look for drm headers in the appropiate place, so help it +# libdrm is only useful with udev for KMS +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +XDRIVER_XF86_VIDEO_QXL_CONF_ENV += REQUIRED_MODULES=libdrm +XDRIVER_XF86_VIDEO_QXL_DEPENDENCIES += libdrm +else +XDRIVER_XF86_VIDEO_QXL_CONF_OPTS += --disable-kms +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-r128/0001-cross-compile.patch b/package/x11r7/xdriver_xf86-video-r128/0001-cross-compile.patch new file mode 100644 index 0000000000..7b2ebd4b80 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-r128/0001-cross-compile.patch @@ -0,0 +1,50 @@ +Fix cross-compile + +Original patch for DRI +http://git.buildroot.net/buildroot/commit/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128-cross-compile.patch?id=c0726391523da6a17ffa8e62681ffa0cc895da8e + +Signed-off-by: Paulius Zaleckas +(Added exa.h fix) +Signed-off-by: Bernd Kuhls + +--- a/configure.ac 2008-06-23 10:39:28.000000000 -0400 ++++ b/configure.ac 2008-06-23 10:40:46.000000000 -0400 +@@ -85,14 +85,20 @@ sdkdir=$(pkg-config --variable=sdkdir xo + AC_HEADER_STDC + + if test "$DRI" != no; then +- AC_CHECK_FILE([${sdkdir}/dri.h], ++ if test "$cross_compiling" = "no" ; then ++ AC_CHECK_FILE([${sdkdir}/dri.h], + [have_dri_h="yes"], [have_dri_h="no"]) +- AC_CHECK_FILE([${sdkdir}/sarea.h], ++ AC_CHECK_FILE([${sdkdir}/sarea.h], + [have_sarea_h="yes"], [have_sarea_h="no"]) +- AC_CHECK_FILE([${sdkdir}/dristruct.h], ++ AC_CHECK_FILE([${sdkdir}/dristruct.h], + [have_dristruct_h="yes"], [have_dristruct_h="no"]) +- AC_CHECK_FILE([${sdkdir}/damage.h], ++ AC_CHECK_FILE([${sdkdir}/damage.h], + [have_damage_h="yes"], [have_damage_h="no"]) ++ else ++ have_dri_h="yes" ++ have_sarea_h="yes" ++ have_dristruct_h="yes" ++ fi + fi + + AC_MSG_CHECKING([whether to include DRI support]) +@@ -121,7 +127,12 @@ + AC_MSG_CHECKING([whether to enable EXA support]) + if test "x$EXA" = xyes; then + AC_MSG_RESULT(yes) +- AC_CHECK_FILE(${sdkdir}/exa.h, [have_exa_h="yes"], [have_exa_h="no"]) ++ if test "$cross_compiling" = "no" ; then ++ AC_CHECK_FILE(${sdkdir}/exa.h, ++ [have_exa_h="yes"], [have_exa_h="no"]) ++ else ++ have_exa_h="yes" ++ fi + else + AC_MSG_RESULT(no) + fi diff --git a/package/x11r7/xdriver_xf86-video-r128/Config.in b/package/x11r7/xdriver_xf86-video-r128/Config.in new file mode 100644 index 0000000000..22ba4931e6 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-r128/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_R128 + bool "xf86-video-r128" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + R128 video driver diff --git a/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.hash b/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.hash new file mode 100644 index 0000000000..f5c92ab1c3 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2016-January/002670.html +sha256 5ebfef49831c9b12f7b7011c8314010596ac2ab0d5b9b7cfd17908e93d7de4ea xf86-video-r128-6.10.1.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.mk b/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.mk new file mode 100644 index 0000000000..5833efcfa7 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-r128/xdriver_xf86-video-r128.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# xdriver_xf86-video-r128 +# +################################################################################ + +XDRIVER_XF86_VIDEO_R128_VERSION = 6.10.1 +XDRIVER_XF86_VIDEO_R128_SOURCE = xf86-video-r128-$(XDRIVER_XF86_VIDEO_R128_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_R128_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_R128_LICENSE = MIT +XDRIVER_XF86_VIDEO_R128_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_R128_AUTORECONF = YES +XDRIVER_XF86_VIDEO_R128_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto + +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),) +XDRIVER_XF86_VIDEO_R128_CONF_OPTS = --disable-dri +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-savage/0001-cross-compile.patch b/package/x11r7/xdriver_xf86-video-savage/0001-cross-compile.patch new file mode 100644 index 0000000000..b9c296b6b5 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-savage/0001-cross-compile.patch @@ -0,0 +1,27 @@ +--- a/configure.ac 2008-05-21 16:04:23.000000000 -0400 ++++ b/configure.ac 2008-06-23 11:41:50.000000000 -0400 +@@ -68,12 +68,18 @@ sdkdir=$(pkg-config --variable=sdkdir xo + AC_HEADER_STDC + + if test "$DRI" != no; then +- AC_CHECK_FILE([${sdkdir}/dri.h], +- [have_dri_h="yes"], [have_dri_h="no"]) +- AC_CHECK_FILE([${sdkdir}/sarea.h], +- [have_sarea_h="yes"], [have_sarea_h="no"]) +- AC_CHECK_FILE([${sdkdir}/dristruct.h], +- [have_dristruct_h="yes"], [have_dristruct_h="no"]) ++ if test "$cross_compiling" = "no" ; then ++ AC_CHECK_FILE([${sdkdir}/dri.h], ++ [have_dri_h="yes"], [have_dri_h="no"]) ++ AC_CHECK_FILE([${sdkdir}/sarea.h], ++ [have_sarea_h="yes"], [have_sarea_h="no"]) ++ AC_CHECK_FILE([${sdkdir}/dristruct.h], ++ [have_dristruct_h="yes"], [have_dristruct_h="no"]) ++ else ++ have_dri_h="yes" ++ have_sarea_h="yes" ++ have_dristruct_h="yes" ++ fi + fi + + AC_MSG_CHECKING([whether to include DRI support]) diff --git a/package/x11r7/xdriver_xf86-video-savage/Config.in b/package/x11r7/xdriver_xf86-video-savage/Config.in new file mode 100644 index 0000000000..77dde87619 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-savage/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SAVAGE + bool "xf86-video-savage" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86DRIPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + S3 Savage video driver + +comment "xf86-video-savage needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.hash b/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.hash new file mode 100644 index 0000000000..25afb13133 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-May/002603.html +sha256 fdcea4a86532bceb50095eaf0fe2f38bbfa160e98463b815f4b549eb9985fa63 xf86-video-savage-2.3.8.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.mk b/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.mk new file mode 100644 index 0000000000..dc5644a3c4 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-savage/xdriver_xf86-video-savage.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdriver_xf86-video-savage +# +################################################################################ + +XDRIVER_XF86_VIDEO_SAVAGE_VERSION = 2.3.8 +XDRIVER_XF86_VIDEO_SAVAGE_SOURCE = xf86-video-savage-$(XDRIVER_XF86_VIDEO_SAVAGE_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_SAVAGE_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_SAVAGE_LICENSE = MIT +XDRIVER_XF86_VIDEO_SAVAGE_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_SAVAGE_AUTORECONF = YES +XDRIVER_XF86_VIDEO_SAVAGE_DEPENDENCIES = xserver_xorg-server libdrm xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86driproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-siliconmotion/Config.in b/package/x11r7/xdriver_xf86-video-siliconmotion/Config.in new file mode 100644 index 0000000000..727004a55a --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-siliconmotion/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SILICONMOTION + bool "xf86-video-siliconmotion" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + Silicon Motion video driver diff --git a/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.hash b/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.hash new file mode 100644 index 0000000000..42f39d244a --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-May/002604.html +sha256 e9d449a9fd9e58b4e018447b6c64005f7874cffb1777e513ac9fc41a86071beb xf86-video-siliconmotion-1.7.8.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.mk b/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.mk new file mode 100644 index 0000000000..f8ea403c8c --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-siliconmotion/xdriver_xf86-video-siliconmotion.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xdriver_xf86-video-siliconmotion +# +################################################################################ + +XDRIVER_XF86_VIDEO_SILICONMOTION_VERSION = 1.7.8 +XDRIVER_XF86_VIDEO_SILICONMOTION_SOURCE = xf86-video-siliconmotion-$(XDRIVER_XF86_VIDEO_SILICONMOTION_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_SILICONMOTION_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_SILICONMOTION_LICENSE = MIT +XDRIVER_XF86_VIDEO_SILICONMOTION_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_SILICONMOTION_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xproto + +XDRIVER_XF86_VIDEO_SILICONMOTION_CONF_OPTS = --disable-selective-werror + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-sis/0001-cross.patch b/package/x11r7/xdriver_xf86-video-sis/0001-cross.patch new file mode 100644 index 0000000000..9e06480d40 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-sis/0001-cross.patch @@ -0,0 +1,21 @@ +--- xf86-video-sis-0.9.3/configure.ac.orig 2007-06-10 21:00:29.000000000 +0200 ++++ xf86-video-sis-0.9.3/configure.ac 2007-06-10 21:00:45.000000000 +0200 +@@ -71,12 +71,18 @@ + AC_HEADER_STDC + + if test "$DRI" != no; then ++ if test "$cross_compiling" = "no" ; then + AC_CHECK_FILE([${sdkdir}/dri.h], + [have_dri_h="yes"], [have_dri_h="no"]) + AC_CHECK_FILE([${sdkdir}/sarea.h], + [have_sarea_h="yes"], [have_sarea_h="no"]) + AC_CHECK_FILE([${sdkdir}/dristruct.h], + [have_dristruct_h="yes"], [have_dristruct_h="no"]) ++ else ++ have_dri_h="yes" ++ have_sarea_h="yes" ++ have_dristruct_h="yes" ++ fi + fi + + AC_MSG_CHECKING([whether to include DRI support]) diff --git a/package/x11r7/xdriver_xf86-video-sis/0007-xi.patch b/package/x11r7/xdriver_xf86-video-sis/0007-xi.patch new file mode 100644 index 0000000000..7905248163 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-sis/0007-xi.patch @@ -0,0 +1,24 @@ +Fetch from: +https://projects.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/xf86-video-sis&id=7aaa7a9786ce5654df877311909244e0a6c42fd1 + +Signed-off-by: Bernd Kuhls + +--- xf86-video-sis-0.10.7/src/sis_driver.c 2013-03-10 13:57:50.000000000 +0100 ++++ xf86-video-sis-0.10.7/src/sis_driver.c.new 2013-03-10 13:54:48.645203559 +0100 +@@ -9378,7 +9378,15 @@ + } + if(doit) { + sigstate = xf86BlockSIGIO(); +-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 15 ++#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 18 ++ { ++ double dx = x, dy = y; ++ miPointerSetPosition(inputInfo.pointer, Absolute, &dx, &dy, ++ NULL, NULL); ++ x = (int)dx; ++ y = (int)dy; ++ } ++#elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 15 + { + double dx = x, dy = y; + miPointerSetPosition(inputInfo.pointer, Absolute, &dx, &dy); diff --git a/package/x11r7/xdriver_xf86-video-sis/Config.in b/package/x11r7/xdriver_xf86-video-sis/Config.in new file mode 100644 index 0000000000..3c86bd403e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-sis/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_SIS + bool "xf86-video-sis" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86DGAPROTO + select BR2_PACKAGE_XPROTO_XF86DRIPROTO + select BR2_PACKAGE_XPROTO_XINERAMAPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + SiS and XGI video driver + +comment "xf86-video-sis needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.hash b/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.hash new file mode 100644 index 0000000000..dfc78143ef --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-August/002628.html +sha256 c8f3f2577f69334dfcc4bf96477dce45161170555f3abdfa105599e61bc7d3fe xf86-video-sis-0.10.8.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.mk b/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.mk new file mode 100644 index 0000000000..b1fce837e8 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-sis/xdriver_xf86-video-sis.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdriver_xf86-video-sis +# +################################################################################ + +XDRIVER_XF86_VIDEO_SIS_VERSION = 0.10.8 +XDRIVER_XF86_VIDEO_SIS_SOURCE = xf86-video-sis-$(XDRIVER_XF86_VIDEO_SIS_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_SIS_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_SIS_LICENSE = MIT +XDRIVER_XF86_VIDEO_SIS_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_SIS_AUTORECONF = YES +XDRIVER_XF86_VIDEO_SIS_DEPENDENCIES = xserver_xorg-server libdrm xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86dgaproto xproto_xf86driproto xproto_xineramaproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-tdfx/0001-cross.patch b/package/x11r7/xdriver_xf86-video-tdfx/0001-cross.patch new file mode 100644 index 0000000000..e53591bb0b --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tdfx/0001-cross.patch @@ -0,0 +1,24 @@ +--- xf86-video-tdfx-1.3.0/configure.ac.orig 2007-06-10 21:01:54.000000000 +0200 ++++ xf86-video-tdfx-1.3.0/configure.ac 2007-06-10 21:02:06.000000000 +0200 +@@ -67,13 +67,20 @@ + # Checks for header files. + AC_HEADER_STDC + +-if test "$DRI" != no; then ++if test "x$DRI" != xno; then ++ if test "$cross_compiling" = "no" ; then + AC_CHECK_FILE([${sdkdir}/dri.h], + [have_dri_h="yes"], [have_dri_h="no"]) + AC_CHECK_FILE([${sdkdir}/sarea.h], + [have_sarea_h="yes"], [have_sarea_h="no"]) + AC_CHECK_FILE([${sdkdir}/dristruct.h], + [have_dristruct_h="yes"], [have_dristruct_h="no"]) ++ AC_CHECK_HEADER ++ else ++ have_dri_h="yes" ++ have_sarea_h="yes" ++ have_dristruct_h="yes" ++ fi + fi + + AC_MSG_CHECKING([whether to include DRI support]) diff --git a/package/x11r7/xdriver_xf86-video-tdfx/Config.in b/package/x11r7/xdriver_xf86-video-tdfx/Config.in new file mode 100644 index 0000000000..96a69ba25c --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tdfx/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TDFX + bool "xf86-video-tdfx" + depends on BR2_PACKAGE_MESA3D + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86DRIPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + 3Dfx video driver + +comment "xf86-video-tdfx needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.hash b/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.hash new file mode 100644 index 0000000000..1cdef2ab81 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-February/002536.html +sha256 3a8a88867c40ad61f1c9a09ffd7ac64102fa821685855d50ce66c7603dcc6d37 xf86-video-tdfx-1.4.6.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.mk b/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.mk new file mode 100644 index 0000000000..4d0ba60b6f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tdfx/xdriver_xf86-video-tdfx.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xdriver_xf86-video-tdfx +# +################################################################################ + +XDRIVER_XF86_VIDEO_TDFX_VERSION = 1.4.6 +XDRIVER_XF86_VIDEO_TDFX_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_TDFX_SOURCE = xf86-video-tdfx-$(XDRIVER_XF86_VIDEO_TDFX_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_TDFX_LICENSE = MIT +XDRIVER_XF86_VIDEO_TDFX_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_TDFX_AUTORECONF = YES +XDRIVER_XF86_VIDEO_TDFX_DEPENDENCIES = xserver_xorg-server libdrm xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86driproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-tga/0001-mibstore.patch b/package/x11r7/xdriver_xf86-video-tga/0001-mibstore.patch new file mode 100644 index 0000000000..07bcd04f25 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tga/0001-mibstore.patch @@ -0,0 +1,47 @@ +From b7022db0559cd1b6cd3eb6b5abf6896a607b478d Mon Sep 17 00:00:00 2001 +From: Adam Jackson +Date: Tue, 25 Sep 2012 12:55:00 +0000 +Subject: Remove mibstore.h + +Signed-off-by: Adam Jackson +--- +Fetch from: +http://cgit.freedesktop.org/xorg/driver/xf86-video-tga/commit/?id=b7022db0559cd1b6cd3eb6b5abf6896a607b478d + +Signed-off-by: Bernd Kuhls + +diff --git a/src/tga_accel.c b/src/tga_accel.c +index 35af1a4..b414df5 100644 +--- a/src/tga_accel.c ++++ b/src/tga_accel.c +@@ -37,7 +37,6 @@ + #include "xf86cmap.h" + #include "mipointer.h" + +-#include "mibstore.h" + #include "miline.h" + + #include "tga_regs.h" +diff --git a/src/tga_driver.c b/src/tga_driver.c +index dd4f3e6..90d2660 100644 +--- a/src/tga_driver.c ++++ b/src/tga_driver.c +@@ -46,8 +46,6 @@ + + /* software cursor */ + #include "mipointer.h" +-/* backing store */ +-#include "mibstore.h" + + /* #include "mibank.h" */ + /* colormap manipulation */ +@@ -1451,7 +1449,6 @@ TGAScreenInit(SCREEN_INIT_ARGS_DECL) + + fbPictureInit (pScreen, 0, 0); + +- miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + xf86SetSilkenMouse(pScreen); + +-- +cgit v0.9.0.2-2-gbebe diff --git a/package/x11r7/xdriver_xf86-video-tga/Config.in b/package/x11r7/xdriver_xf86-video-tga/Config.in new file mode 100644 index 0000000000..9d03db3b38 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tga/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TGA + bool "xf86-video-tga" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86DGAPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org driver for tga cards diff --git a/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.hash b/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.hash new file mode 100644 index 0000000000..a32fdc75a9 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-July/002025.html +sha256 2023818000200eb50a59476e36d59b07a361b110e73b1d9cc526beb669306131 xf86-video-tga-1.2.2.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.mk b/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.mk new file mode 100644 index 0000000000..8af5ac81e1 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-tga/xdriver_xf86-video-tga.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-tga +# +################################################################################ + +XDRIVER_XF86_VIDEO_TGA_VERSION = 1.2.2 +XDRIVER_XF86_VIDEO_TGA_SOURCE = xf86-video-tga-$(XDRIVER_XF86_VIDEO_TGA_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_TGA_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_TGA_LICENSE = MIT +XDRIVER_XF86_VIDEO_TGA_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_TGA_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86dgaproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-trident/Config.in b/package/x11r7/xdriver_xf86-video-trident/Config.in new file mode 100644 index 0000000000..15ac3ea726 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-trident/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_TRIDENT + bool "xf86-video-trident" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86DGAPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + Trident video driver diff --git a/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.hash b/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.hash new file mode 100644 index 0000000000..e92c948a8e --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-March/002558.html +sha256 ecd518de627a0d49e17c158bfc72ab657386c6907c91ef89fa09332558e413ae xf86-video-trident-1.3.7.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.mk b/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.mk new file mode 100644 index 0000000000..a136e8777d --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-trident/xdriver_xf86-video-trident.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-trident +# +################################################################################ + +XDRIVER_XF86_VIDEO_TRIDENT_VERSION = 1.3.7 +XDRIVER_XF86_VIDEO_TRIDENT_SOURCE = xf86-video-trident-$(XDRIVER_XF86_VIDEO_TRIDENT_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_TRIDENT_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_TRIDENT_LICENSE = MIT +XDRIVER_XF86_VIDEO_TRIDENT_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_TRIDENT_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_videoproto xproto_xextproto xproto_xf86dgaproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-v4l/Config.in b/package/x11r7/xdriver_xf86-video-v4l/Config.in new file mode 100644 index 0000000000..27ffd87113 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-v4l/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_V4L + bool "xf86-video-v4l" + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XPROTO + depends on BROKEN # Fails to build with xorg xserver >= 1.17 + help + video4linux driver diff --git a/package/x11r7/xdriver_xf86-video-v4l/xdriver_xf86-video-v4l.hash b/package/x11r7/xdriver_xf86-video-v4l/xdriver_xf86-video-v4l.hash new file mode 100644 index 0000000000..c4bcfadc4b --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-v4l/xdriver_xf86-video-v4l.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2008-March/000504.html +sha1 7f2212c529a5bcc34f67858a9d0167a0d4848aaa xf86-video-v4l-0.2.0.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-v4l/xdriver_xf86-video-v4l.mk b/package/x11r7/xdriver_xf86-video-v4l/xdriver_xf86-video-v4l.mk new file mode 100644 index 0000000000..607b605f80 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-v4l/xdriver_xf86-video-v4l.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-v4l +# +################################################################################ + +XDRIVER_XF86_VIDEO_V4L_VERSION = 0.2.0 +XDRIVER_XF86_VIDEO_V4L_SOURCE = xf86-video-v4l-$(XDRIVER_XF86_VIDEO_V4L_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_V4L_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_V4L_LICENSE = MIT +XDRIVER_XF86_VIDEO_V4L_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_V4L_DEPENDENCIES = xserver_xorg-server xproto_randrproto xproto_videoproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-vesa/Config.in b/package/x11r7/xdriver_xf86-video-vesa/Config.in new file mode 100644 index 0000000000..98f434704f --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-vesa/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_VESA + bool "xf86-video-vesa" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + Generic VESA video driver diff --git a/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.hash b/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.hash new file mode 100644 index 0000000000..84c0b08a92 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-June/002615.html +sha256 7bddf4d879dd6f67088ecb203a31e12334aab980174bd0909930a21f32e251c1 xf86-video-vesa-2.3.4.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.mk b/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.mk new file mode 100644 index 0000000000..1184821d9c --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-vesa/xdriver_xf86-video-vesa.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-vesa +# +################################################################################ + +XDRIVER_XF86_VIDEO_VESA_VERSION = 2.3.4 +XDRIVER_XF86_VIDEO_VESA_SOURCE = xf86-video-vesa-$(XDRIVER_XF86_VIDEO_VESA_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_VESA_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_VESA_LICENSE = MIT +XDRIVER_XF86_VIDEO_VESA_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_VESA_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-vmware/Config.in b/package/x11r7/xdriver_xf86-video-vmware/Config.in new file mode 100644 index 0000000000..a3382d7346 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-vmware/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_VMWARE + bool "xf86-video-vmware" + depends on BR2_PACKAGE_MESA3D + depends on BR2_i386 || BR2_x86_64 + select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SVGA + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XINERAMAPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + VMware SVGA video driver + +comment "xf86-video-vmware needs mesa3d" + depends on !BR2_PACKAGE_MESA3D diff --git a/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.hash b/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.hash new file mode 100644 index 0000000000..10d31d02fc --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-January/002521.html +sha256 3c1d244e4b1b77e92126957965cdc9fb82de4c215c0706a3a8aaff6939e4a0cc xf86-video-vmware-13.1.0.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk b/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk new file mode 100644 index 0000000000..ea4dd48215 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-vmware/xdriver_xf86-video-vmware.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-vmware +# +################################################################################ + +XDRIVER_XF86_VIDEO_VMWARE_VERSION = 13.1.0 +XDRIVER_XF86_VIDEO_VMWARE_SOURCE = xf86-video-vmware-$(XDRIVER_XF86_VIDEO_VMWARE_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_VMWARE_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_VMWARE_LICENSE = MIT +XDRIVER_XF86_VIDEO_VMWARE_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_VMWARE_DEPENDENCIES = mesa3d xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xineramaproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-voodoo/Config.in b/package/x11r7/xdriver_xf86-video-voodoo/Config.in new file mode 100644 index 0000000000..f531676dab --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-voodoo/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_VOODOO + bool "xf86-video-voodoo" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86DGAPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + Voodoo video driver diff --git a/package/x11r7/xdriver_xf86-video-voodoo/xdriver_xf86-video-voodoo.mk b/package/x11r7/xdriver_xf86-video-voodoo/xdriver_xf86-video-voodoo.mk new file mode 100644 index 0000000000..e1ef0c6ca3 --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-voodoo/xdriver_xf86-video-voodoo.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-voodoo +# +################################################################################ + +XDRIVER_XF86_VIDEO_VOODOO_VERSION = 9172ae566a0e85313fc80ab62b4455393eefe593 +XDRIVER_XF86_VIDEO_VOODOO_SITE = git://anongit.freedesktop.org/xorg/driver/xf86-video-voodoo +XDRIVER_XF86_VIDEO_VOODOO_LICENSE = MIT +XDRIVER_XF86_VIDEO_VOODOO_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_VOODOO_AUTORECONF = YES +XDRIVER_XF86_VIDEO_VOODOO_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xf86dgaproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xdriver_xf86-video-wsfb/Config.in b/package/x11r7/xdriver_xf86-video-wsfb/Config.in new file mode 100644 index 0000000000..968ee10c8c --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-wsfb/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_WSFB + bool "xf86-video-wsfb" + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XPROTO + depends on BROKEN # Fails to build. Actually this is OpenBSD/NetBSD stuff. + help + WSFB based chips video driver diff --git a/package/x11r7/xdriver_xf86-video-wsfb/xdriver_xf86-video-wsfb.hash b/package/x11r7/xdriver_xf86-video-wsfb/xdriver_xf86-video-wsfb.hash new file mode 100644 index 0000000000..1258b719dd --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-wsfb/xdriver_xf86-video-wsfb.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2012-January/001786.html +sha256 975ce3e5a063168ec6fe8f3fac50c30d0fae6cc6d81dc260f00bb4cb4f1a2843 xf86-video-wsfb-0.4.0.tar.bz2 diff --git a/package/x11r7/xdriver_xf86-video-wsfb/xdriver_xf86-video-wsfb.mk b/package/x11r7/xdriver_xf86-video-wsfb/xdriver_xf86-video-wsfb.mk new file mode 100644 index 0000000000..c2d7d4df3a --- /dev/null +++ b/package/x11r7/xdriver_xf86-video-wsfb/xdriver_xf86-video-wsfb.mk @@ -0,0 +1,14 @@ +################################################################################ +# +# xdriver_xf86-video-wsfb +# +################################################################################ + +XDRIVER_XF86_VIDEO_WSFB_VERSION = 0.4.0 +XDRIVER_XF86_VIDEO_WSFB_SOURCE = xf86-video-wsfb-$(XDRIVER_XF86_VIDEO_WSFB_VERSION).tar.bz2 +XDRIVER_XF86_VIDEO_WSFB_SITE = http://xorg.freedesktop.org/releases/individual/driver +XDRIVER_XF86_VIDEO_WSFB_LICENSE = MIT +XDRIVER_XF86_VIDEO_WSFB_LICENSE_FILES = COPYING +XDRIVER_XF86_VIDEO_WSFB_DEPENDENCIES = xserver_xorg-server xproto_fontsproto xproto_randrproto xproto_renderproto xproto_xextproto xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_encodings/Config.in b/package/x11r7/xfont_encodings/Config.in new file mode 100644 index 0000000000..d771ffb9cb --- /dev/null +++ b/package/x11r7/xfont_encodings/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_ENCODINGS + bool "encodings" + select BR2_PACKAGE_XUTIL_UTIL_MACROS + help + No description available diff --git a/package/x11r7/xfont_encodings/xfont_encodings.hash b/package/x11r7/xfont_encodings/xfont_encodings.hash new file mode 100644 index 0000000000..56c1ad2737 --- /dev/null +++ b/package/x11r7/xfont_encodings/xfont_encodings.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2010-October/001466.html +sha1 24ace2470403f85a0d393769204029bd8247992a encodings-1.0.4.tar.bz2 diff --git a/package/x11r7/xfont_encodings/xfont_encodings.mk b/package/x11r7/xfont_encodings/xfont_encodings.mk new file mode 100644 index 0000000000..568dbcbde8 --- /dev/null +++ b/package/x11r7/xfont_encodings/xfont_encodings.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xfont_encodings +# +################################################################################ + +XFONT_ENCODINGS_VERSION = 1.0.4 +XFONT_ENCODINGS_SOURCE = encodings-$(XFONT_ENCODINGS_VERSION).tar.bz2 +XFONT_ENCODINGS_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_ENCODINGS_LICENSE = Public Domain +XFONT_ENCODINGS_LICENSE_FILES = COPYING + +XFONT_ENCODINGS_DEPENDENCIES = host-xapp_mkfontscale host-pkgconf xutil_util-macros + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-100dpi/Config.in b/package/x11r7/xfont_font-adobe-100dpi/Config.in new file mode 100644 index 0000000000..766c06e74c --- /dev/null +++ b/package/x11r7/xfont_font-adobe-100dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_100DPI + bool "font-adobe-100dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.mk b/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.mk new file mode 100644 index 0000000000..85a6884aee --- /dev/null +++ b/package/x11r7/xfont_font-adobe-100dpi/xfont_font-adobe-100dpi.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-adobe-100dpi +# +################################################################################ + +XFONT_FONT_ADOBE_100DPI_VERSION = 1.0.3 +XFONT_FONT_ADOBE_100DPI_SOURCE = font-adobe-100dpi-$(XFONT_FONT_ADOBE_100DPI_VERSION).tar.bz2 +XFONT_FONT_ADOBE_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ADOBE_100DPI_LICENSE = MIT +XFONT_FONT_ADOBE_100DPI_LICENSE_FILES = COPYING + +XFONT_FONT_ADOBE_100DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_ADOBE_100DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_ADOBE_100DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-75dpi/Config.in b/package/x11r7/xfont_font-adobe-75dpi/Config.in new file mode 100644 index 0000000000..1d79f416cc --- /dev/null +++ b/package/x11r7/xfont_font-adobe-75dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_75DPI + bool "font-adobe-75dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.mk b/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.mk new file mode 100644 index 0000000000..bb0a184322 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-75dpi/xfont_font-adobe-75dpi.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-adobe-75dpi +# +################################################################################ + +XFONT_FONT_ADOBE_75DPI_VERSION = 1.0.3 +XFONT_FONT_ADOBE_75DPI_SOURCE = font-adobe-75dpi-$(XFONT_FONT_ADOBE_75DPI_VERSION).tar.bz2 +XFONT_FONT_ADOBE_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ADOBE_75DPI_LICENSE = MIT +XFONT_FONT_ADOBE_75DPI_LICENSE_FILES = COPYING + +XFONT_FONT_ADOBE_75DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_ADOBE_75DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_ADOBE_75DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-utopia-100dpi/Config.in b/package/x11r7/xfont_font-adobe-utopia-100dpi/Config.in new file mode 100644 index 0000000000..a31ee5dab6 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-100dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_UTOPIA_100DPI + bool "font-adobe-utopia-100dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.mk b/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.mk new file mode 100644 index 0000000000..390ca6784a --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-100dpi/xfont_font-adobe-utopia-100dpi.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-adobe-utopia-100dpi +# +################################################################################ + +XFONT_FONT_ADOBE_UTOPIA_100DPI_VERSION = 1.0.4 +XFONT_FONT_ADOBE_UTOPIA_100DPI_SOURCE = font-adobe-utopia-100dpi-$(XFONT_FONT_ADOBE_UTOPIA_100DPI_VERSION).tar.bz2 +XFONT_FONT_ADOBE_UTOPIA_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ADOBE_UTOPIA_100DPI_LICENSE = Adobe License (no modification allowed) +XFONT_FONT_ADOBE_UTOPIA_100DPI_LICENSE_FILES = COPYING + +XFONT_FONT_ADOBE_UTOPIA_100DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_ADOBE_UTOPIA_100DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_ADOBE_UTOPIA_100DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-utopia-75dpi/Config.in b/package/x11r7/xfont_font-adobe-utopia-75dpi/Config.in new file mode 100644 index 0000000000..22797230a6 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-75dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_UTOPIA_75DPI + bool "font-adobe-utopia-75dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.mk b/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.mk new file mode 100644 index 0000000000..7ecd46ef11 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-75dpi/xfont_font-adobe-utopia-75dpi.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-adobe-utopia-75dpi +# +################################################################################ + +XFONT_FONT_ADOBE_UTOPIA_75DPI_VERSION = 1.0.4 +XFONT_FONT_ADOBE_UTOPIA_75DPI_SOURCE = font-adobe-utopia-75dpi-$(XFONT_FONT_ADOBE_UTOPIA_75DPI_VERSION).tar.bz2 +XFONT_FONT_ADOBE_UTOPIA_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ADOBE_UTOPIA_75DPI_LICENSE = Adobe License (no modification allowed) +XFONT_FONT_ADOBE_UTOPIA_75DPI_LICENSE_FILES = COPYING + +XFONT_FONT_ADOBE_UTOPIA_75DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_ADOBE_UTOPIA_75DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_ADOBE_UTOPIA_75DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-adobe-utopia-type1/Config.in b/package/x11r7/xfont_font-adobe-utopia-type1/Config.in new file mode 100644 index 0000000000..60b631ede7 --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-type1/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ADOBE_UTOPIA_TYPE1 + bool "font-adobe-utopia-type1" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.mk b/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.mk new file mode 100644 index 0000000000..6c780e20dc --- /dev/null +++ b/package/x11r7/xfont_font-adobe-utopia-type1/xfont_font-adobe-utopia-type1.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-adobe-utopia-type1 +# +################################################################################ + +XFONT_FONT_ADOBE_UTOPIA_TYPE1_VERSION = 1.0.4 +XFONT_FONT_ADOBE_UTOPIA_TYPE1_SOURCE = font-adobe-utopia-type1-$(XFONT_FONT_ADOBE_UTOPIA_TYPE1_VERSION).tar.bz2 +XFONT_FONT_ADOBE_UTOPIA_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ADOBE_UTOPIA_TYPE1_LICENSE = Adobe License (no modification allowed) +XFONT_FONT_ADOBE_UTOPIA_TYPE1_LICENSE_FILES = COPYING + +XFONT_FONT_ADOBE_UTOPIA_TYPE1_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_ADOBE_UTOPIA_TYPE1_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_ADOBE_UTOPIA_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-alias/Config.in b/package/x11r7/xfont_font-alias/Config.in new file mode 100644 index 0000000000..b30e2221da --- /dev/null +++ b/package/x11r7/xfont_font-alias/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ALIAS + bool "font-alias" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-alias/xfont_font-alias.mk b/package/x11r7/xfont_font-alias/xfont_font-alias.mk new file mode 100644 index 0000000000..e2ac2363df --- /dev/null +++ b/package/x11r7/xfont_font-alias/xfont_font-alias.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-alias +# +################################################################################ + +XFONT_FONT_ALIAS_VERSION = 1.0.3 +XFONT_FONT_ALIAS_SOURCE = font-alias-$(XFONT_FONT_ALIAS_VERSION).tar.bz2 +XFONT_FONT_ALIAS_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ALIAS_LICENSE = MIT +XFONT_FONT_ALIAS_LICENSE_FILES = COPYING + +XFONT_FONT_ALIAS_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_ALIAS_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_ALIAS_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-arabic-misc/Config.in b/package/x11r7/xfont_font-arabic-misc/Config.in new file mode 100644 index 0000000000..1ec50901a0 --- /dev/null +++ b/package/x11r7/xfont_font-arabic-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ARABIC_MISC + bool "font-arabic-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.mk b/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.mk new file mode 100644 index 0000000000..fa1269b41d --- /dev/null +++ b/package/x11r7/xfont_font-arabic-misc/xfont_font-arabic-misc.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-arabic-misc +# +################################################################################ + +XFONT_FONT_ARABIC_MISC_VERSION = 1.0.3 +XFONT_FONT_ARABIC_MISC_SOURCE = font-arabic-misc-$(XFONT_FONT_ARABIC_MISC_VERSION).tar.bz2 +XFONT_FONT_ARABIC_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ARABIC_MISC_LICENSE = MIT +XFONT_FONT_ARABIC_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_ARABIC_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_ARABIC_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_ARABIC_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-100dpi/Config.in b/package/x11r7/xfont_font-bh-100dpi/Config.in new file mode 100644 index 0000000000..3bfb0b8fcd --- /dev/null +++ b/package/x11r7/xfont_font-bh-100dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BH_100DPI + bool "font-bh-100dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.mk b/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.mk new file mode 100644 index 0000000000..fb1665898f --- /dev/null +++ b/package/x11r7/xfont_font-bh-100dpi/xfont_font-bh-100dpi.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-bh-100dpi +# +################################################################################ + +XFONT_FONT_BH_100DPI_VERSION = 1.0.3 +XFONT_FONT_BH_100DPI_SOURCE = font-bh-100dpi-$(XFONT_FONT_BH_100DPI_VERSION).tar.bz2 +XFONT_FONT_BH_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BH_100DPI_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_100DPI_LICENSE_FILES = COPYING + +XFONT_FONT_BH_100DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_BH_100DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_BH_100DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-75dpi/Config.in b/package/x11r7/xfont_font-bh-75dpi/Config.in new file mode 100644 index 0000000000..0fe93bb65e --- /dev/null +++ b/package/x11r7/xfont_font-bh-75dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BH_75DPI + bool "font-bh-75dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.mk b/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.mk new file mode 100644 index 0000000000..c8ade590b8 --- /dev/null +++ b/package/x11r7/xfont_font-bh-75dpi/xfont_font-bh-75dpi.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-bh-75dpi +# +################################################################################ + +XFONT_FONT_BH_75DPI_VERSION = 1.0.3 +XFONT_FONT_BH_75DPI_SOURCE = font-bh-75dpi-$(XFONT_FONT_BH_75DPI_VERSION).tar.bz2 +XFONT_FONT_BH_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BH_75DPI_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_75DPI_LICENSE_FILES = COPYING + +XFONT_FONT_BH_75DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_BH_75DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_BH_75DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/Config.in b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/Config.in new file mode 100644 index 0000000000..0005cc11bd --- /dev/null +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI + bool "font-bh-lucidatypewriter-100dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.mk b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.mk new file mode 100644 index 0000000000..a1b61db4c8 --- /dev/null +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-100dpi/xfont_font-bh-lucidatypewriter-100dpi.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-bh-lucidatypewriter-100dpi +# +################################################################################ + +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_VERSION = 1.0.3 +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_SOURCE = font-bh-lucidatypewriter-100dpi-$(XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_VERSION).tar.bz2 +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_LICENSE_FILES = COPYING + +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_BH_LUCIDATYPEWRITER_100DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/Config.in b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/Config.in new file mode 100644 index 0000000000..60dfb952e8 --- /dev/null +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI + bool "font-bh-lucidatypewriter-75dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.mk b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.mk new file mode 100644 index 0000000000..00a6bd6dc7 --- /dev/null +++ b/package/x11r7/xfont_font-bh-lucidatypewriter-75dpi/xfont_font-bh-lucidatypewriter-75dpi.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-bh-lucidatypewriter-75dpi +# +################################################################################ + +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_VERSION = 1.0.3 +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_SOURCE = font-bh-lucidatypewriter-75dpi-$(XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_VERSION).tar.bz2 +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_LICENSE_FILES = COPYING + +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_BH_LUCIDATYPEWRITER_75DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-ttf/Config.in b/package/x11r7/xfont_font-bh-ttf/Config.in new file mode 100644 index 0000000000..d747989bf0 --- /dev/null +++ b/package/x11r7/xfont_font-bh-ttf/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BH_TTF + bool "font-bh-ttf" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.hash b/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.hash new file mode 100644 index 0000000000..8df8e4b937 --- /dev/null +++ b/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2010-November/001537.html +sha1 f42ebd527096011040a312e0f9cdf78d64177419 font-bh-ttf-1.0.3.tar.bz2 diff --git a/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.mk b/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.mk new file mode 100644 index 0000000000..f393dd3244 --- /dev/null +++ b/package/x11r7/xfont_font-bh-ttf/xfont_font-bh-ttf.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-bh-ttf +# +################################################################################ + +XFONT_FONT_BH_TTF_VERSION = 1.0.3 +XFONT_FONT_BH_TTF_SOURCE = font-bh-ttf-$(XFONT_FONT_BH_TTF_VERSION).tar.bz2 +XFONT_FONT_BH_TTF_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BH_TTF_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_TTF_LICENSE_FILES = COPYING + +XFONT_FONT_BH_TTF_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_BH_TTF_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_BH_TTF_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bh-type1/Config.in b/package/x11r7/xfont_font-bh-type1/Config.in new file mode 100644 index 0000000000..0a3ab18643 --- /dev/null +++ b/package/x11r7/xfont_font-bh-type1/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BH_TYPE1 + bool "font-bh-type1" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.mk b/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.mk new file mode 100644 index 0000000000..bf418d52cb --- /dev/null +++ b/package/x11r7/xfont_font-bh-type1/xfont_font-bh-type1.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-bh-type1 +# +################################################################################ + +XFONT_FONT_BH_TYPE1_VERSION = 1.0.3 +XFONT_FONT_BH_TYPE1_SOURCE = font-bh-type1-$(XFONT_FONT_BH_TYPE1_VERSION).tar.bz2 +XFONT_FONT_BH_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BH_TYPE1_LICENSE = Bigelow & Holmes License (no modification) +XFONT_FONT_BH_TYPE1_LICENSE_FILES = COPYING + +XFONT_FONT_BH_TYPE1_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_BH_TYPE1_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_BH_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bitstream-100dpi/Config.in b/package/x11r7/xfont_font-bitstream-100dpi/Config.in new file mode 100644 index 0000000000..5363fae365 --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-100dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BITSTREAM_100DPI + bool "font-bitstream-100dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.mk b/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.mk new file mode 100644 index 0000000000..5ddca73e7c --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-100dpi/xfont_font-bitstream-100dpi.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-bitstream-100dpi +# +################################################################################ + +XFONT_FONT_BITSTREAM_100DPI_VERSION = 1.0.3 +XFONT_FONT_BITSTREAM_100DPI_SOURCE = font-bitstream-100dpi-$(XFONT_FONT_BITSTREAM_100DPI_VERSION).tar.bz2 +XFONT_FONT_BITSTREAM_100DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BITSTREAM_100DPI_LICENSE = MIT +XFONT_FONT_BITSTREAM_100DPI_LICENSE_FILES = COPYING + +XFONT_FONT_BITSTREAM_100DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_BITSTREAM_100DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_BITSTREAM_100DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bitstream-75dpi/Config.in b/package/x11r7/xfont_font-bitstream-75dpi/Config.in new file mode 100644 index 0000000000..34a4a19ef6 --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-75dpi/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BITSTREAM_75DPI + bool "font-bitstream-75dpi" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.mk b/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.mk new file mode 100644 index 0000000000..d7fea275bc --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-75dpi/xfont_font-bitstream-75dpi.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-bitstream-75dpi +# +################################################################################ + +XFONT_FONT_BITSTREAM_75DPI_VERSION = 1.0.3 +XFONT_FONT_BITSTREAM_75DPI_SOURCE = font-bitstream-75dpi-$(XFONT_FONT_BITSTREAM_75DPI_VERSION).tar.bz2 +XFONT_FONT_BITSTREAM_75DPI_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BITSTREAM_75DPI_LICENSE = MIT +XFONT_FONT_BITSTREAM_75DPI_LICENSE_FILES = COPYING + +XFONT_FONT_BITSTREAM_75DPI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_BITSTREAM_75DPI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_BITSTREAM_75DPI_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-bitstream-type1/Config.in b/package/x11r7/xfont_font-bitstream-type1/Config.in new file mode 100644 index 0000000000..c8cbc90840 --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-type1/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_BITSTREAM_TYPE1 + bool "font-bitstream-type1" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.mk b/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.mk new file mode 100644 index 0000000000..813e3cb5a8 --- /dev/null +++ b/package/x11r7/xfont_font-bitstream-type1/xfont_font-bitstream-type1.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-bitstream-type1 +# +################################################################################ + +XFONT_FONT_BITSTREAM_TYPE1_VERSION = 1.0.3 +XFONT_FONT_BITSTREAM_TYPE1_SOURCE = font-bitstream-type1-$(XFONT_FONT_BITSTREAM_TYPE1_VERSION).tar.bz2 +XFONT_FONT_BITSTREAM_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_BITSTREAM_TYPE1_LICENSE = MIT +XFONT_FONT_BITSTREAM_TYPE1_LICENSE_FILES = COPYING + +XFONT_FONT_BITSTREAM_TYPE1_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_BITSTREAM_TYPE1_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_BITSTREAM_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-cronyx-cyrillic/Config.in b/package/x11r7/xfont_font-cronyx-cyrillic/Config.in new file mode 100644 index 0000000000..e92ab836c8 --- /dev/null +++ b/package/x11r7/xfont_font-cronyx-cyrillic/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_CRONYX_CYRILLIC + bool "font-cronyx-cyrillic" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.mk b/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.mk new file mode 100644 index 0000000000..6dc9015236 --- /dev/null +++ b/package/x11r7/xfont_font-cronyx-cyrillic/xfont_font-cronyx-cyrillic.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-cronyx-cyrillic +# +################################################################################ + +XFONT_FONT_CRONYX_CYRILLIC_VERSION = 1.0.3 +XFONT_FONT_CRONYX_CYRILLIC_SOURCE = font-cronyx-cyrillic-$(XFONT_FONT_CRONYX_CYRILLIC_VERSION).tar.bz2 +XFONT_FONT_CRONYX_CYRILLIC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_CRONYX_CYRILLIC_LICENSE = MIT +XFONT_FONT_CRONYX_CYRILLIC_LICENSE_FILES = COPYING + +XFONT_FONT_CRONYX_CYRILLIC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_CRONYX_CYRILLIC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_CRONYX_CYRILLIC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-cursor-misc/Config.in b/package/x11r7/xfont_font-cursor-misc/Config.in new file mode 100644 index 0000000000..0e10da6a53 --- /dev/null +++ b/package/x11r7/xfont_font-cursor-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_CURSOR_MISC + bool "font-cursor-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.mk b/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.mk new file mode 100644 index 0000000000..59d6a84003 --- /dev/null +++ b/package/x11r7/xfont_font-cursor-misc/xfont_font-cursor-misc.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-cursor-misc +# +################################################################################ + +XFONT_FONT_CURSOR_MISC_VERSION = 1.0.3 +XFONT_FONT_CURSOR_MISC_SOURCE = font-cursor-misc-$(XFONT_FONT_CURSOR_MISC_VERSION).tar.bz2 +XFONT_FONT_CURSOR_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_CURSOR_MISC_LICENSE = unencumbered +XFONT_FONT_CURSOR_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_CURSOR_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_CURSOR_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_CURSOR_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-daewoo-misc/Config.in b/package/x11r7/xfont_font-daewoo-misc/Config.in new file mode 100644 index 0000000000..cffe81deb5 --- /dev/null +++ b/package/x11r7/xfont_font-daewoo-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_DAEWOO_MISC + bool "font-daewoo-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.mk b/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.mk new file mode 100644 index 0000000000..59a84c701c --- /dev/null +++ b/package/x11r7/xfont_font-daewoo-misc/xfont_font-daewoo-misc.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xfont_font-daewoo-misc +# +################################################################################ + +XFONT_FONT_DAEWOO_MISC_VERSION = 1.0.3 +XFONT_FONT_DAEWOO_MISC_SOURCE = font-daewoo-misc-$(XFONT_FONT_DAEWOO_MISC_VERSION).tar.bz2 +XFONT_FONT_DAEWOO_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_DAEWOO_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_DAEWOO_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_DAEWOO_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_DAEWOO_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-dec-misc/Config.in b/package/x11r7/xfont_font-dec-misc/Config.in new file mode 100644 index 0000000000..a926d9f9c7 --- /dev/null +++ b/package/x11r7/xfont_font-dec-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_DEC_MISC + bool "font-dec-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.mk b/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.mk new file mode 100644 index 0000000000..b26296d2d0 --- /dev/null +++ b/package/x11r7/xfont_font-dec-misc/xfont_font-dec-misc.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-dec-misc +# +################################################################################ + +XFONT_FONT_DEC_MISC_VERSION = 1.0.3 +XFONT_FONT_DEC_MISC_SOURCE = font-dec-misc-$(XFONT_FONT_DEC_MISC_VERSION).tar.bz2 +XFONT_FONT_DEC_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_DEC_MISC_LICENSE = MIT +XFONT_FONT_DEC_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_DEC_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_DEC_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_DEC_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-ibm-type1/Config.in b/package/x11r7/xfont_font-ibm-type1/Config.in new file mode 100644 index 0000000000..d4ac1ae470 --- /dev/null +++ b/package/x11r7/xfont_font-ibm-type1/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_IBM_TYPE1 + bool "font-ibm-type1" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.mk b/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.mk new file mode 100644 index 0000000000..6cec198686 --- /dev/null +++ b/package/x11r7/xfont_font-ibm-type1/xfont_font-ibm-type1.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-ibm-type1 +# +################################################################################ + +XFONT_FONT_IBM_TYPE1_VERSION = 1.0.3 +XFONT_FONT_IBM_TYPE1_SOURCE = font-ibm-type1-$(XFONT_FONT_IBM_TYPE1_VERSION).tar.bz2 +XFONT_FONT_IBM_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_IBM_TYPE1_LICENSE = IBM/MIT X Consortium Courier Typefont agreement (no modification) +XFONT_FONT_IBM_TYPE1_LICENSE_FILES = COPYING + +XFONT_FONT_IBM_TYPE1_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_IBM_TYPE1_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_IBM_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-isas-misc/Config.in b/package/x11r7/xfont_font-isas-misc/Config.in new file mode 100644 index 0000000000..4dddaf7507 --- /dev/null +++ b/package/x11r7/xfont_font-isas-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_ISAS_MISC + bool "font-isas-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.mk b/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.mk new file mode 100644 index 0000000000..4ac4b9b14d --- /dev/null +++ b/package/x11r7/xfont_font-isas-misc/xfont_font-isas-misc.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-isas-misc +# +################################################################################ + +XFONT_FONT_ISAS_MISC_VERSION = 1.0.3 +XFONT_FONT_ISAS_MISC_SOURCE = font-isas-misc-$(XFONT_FONT_ISAS_MISC_VERSION).tar.bz2 +XFONT_FONT_ISAS_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_ISAS_MISC_LICENSE = MIT +XFONT_FONT_ISAS_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_ISAS_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_ISAS_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_ISAS_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-jis-misc/Config.in b/package/x11r7/xfont_font-jis-misc/Config.in new file mode 100644 index 0000000000..1874ad8204 --- /dev/null +++ b/package/x11r7/xfont_font-jis-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_JIS_MISC + bool "font-jis-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.mk b/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.mk new file mode 100644 index 0000000000..5f8b00161a --- /dev/null +++ b/package/x11r7/xfont_font-jis-misc/xfont_font-jis-misc.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xfont_font-jis-misc +# +################################################################################ + +XFONT_FONT_JIS_MISC_VERSION = 1.0.3 +XFONT_FONT_JIS_MISC_SOURCE = font-jis-misc-$(XFONT_FONT_JIS_MISC_VERSION).tar.bz2 +XFONT_FONT_JIS_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_JIS_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_JIS_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_JIS_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_JIS_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-micro-misc/Config.in b/package/x11r7/xfont_font-micro-misc/Config.in new file mode 100644 index 0000000000..2062e16e59 --- /dev/null +++ b/package/x11r7/xfont_font-micro-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_MICRO_MISC + bool "font-micro-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.mk b/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.mk new file mode 100644 index 0000000000..11b4199e4b --- /dev/null +++ b/package/x11r7/xfont_font-micro-misc/xfont_font-micro-misc.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-micro-misc +# +################################################################################ + +XFONT_FONT_MICRO_MISC_VERSION = 1.0.3 +XFONT_FONT_MICRO_MISC_SOURCE = font-micro-misc-$(XFONT_FONT_MICRO_MISC_VERSION).tar.bz2 +XFONT_FONT_MICRO_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_MICRO_MISC_LICENSE = Public Domain +XFONT_FONT_MICRO_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_MICRO_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_MICRO_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_MICRO_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-misc-cyrillic/Config.in b/package/x11r7/xfont_font-misc-cyrillic/Config.in new file mode 100644 index 0000000000..58702c1484 --- /dev/null +++ b/package/x11r7/xfont_font-misc-cyrillic/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_MISC_CYRILLIC + bool "font-misc-cyrillic" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.mk b/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.mk new file mode 100644 index 0000000000..16fd46b09d --- /dev/null +++ b/package/x11r7/xfont_font-misc-cyrillic/xfont_font-misc-cyrillic.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-misc-cyrillic +# +################################################################################ + +XFONT_FONT_MISC_CYRILLIC_VERSION = 1.0.3 +XFONT_FONT_MISC_CYRILLIC_SOURCE = font-misc-cyrillic-$(XFONT_FONT_MISC_CYRILLIC_VERSION).tar.bz2 +XFONT_FONT_MISC_CYRILLIC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_MISC_CYRILLIC_LICENSE = MIT / Public Domain +XFONT_FONT_MISC_CYRILLIC_LICENSE_FILES = COPYING + +XFONT_FONT_MISC_CYRILLIC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_MISC_CYRILLIC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_MISC_CYRILLIC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-misc-ethiopic/Config.in b/package/x11r7/xfont_font-misc-ethiopic/Config.in new file mode 100644 index 0000000000..af62ddc385 --- /dev/null +++ b/package/x11r7/xfont_font-misc-ethiopic/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_MISC_ETHIOPIC + bool "font-misc-ethiopic" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.mk b/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.mk new file mode 100644 index 0000000000..7d0825ee5c --- /dev/null +++ b/package/x11r7/xfont_font-misc-ethiopic/xfont_font-misc-ethiopic.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-misc-ethiopic +# +################################################################################ + +XFONT_FONT_MISC_ETHIOPIC_VERSION = 1.0.3 +XFONT_FONT_MISC_ETHIOPIC_SOURCE = font-misc-ethiopic-$(XFONT_FONT_MISC_ETHIOPIC_VERSION).tar.bz2 +XFONT_FONT_MISC_ETHIOPIC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_MISC_ETHIOPIC_LICENSE = MIT +XFONT_FONT_MISC_ETHIOPIC_LICENSE_FILES = COPYING + +XFONT_FONT_MISC_ETHIOPIC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_MISC_ETHIOPIC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_MISC_ETHIOPIC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-misc-meltho/Config.in b/package/x11r7/xfont_font-misc-meltho/Config.in new file mode 100644 index 0000000000..dd2d87d9ea --- /dev/null +++ b/package/x11r7/xfont_font-misc-meltho/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_MISC_MELTHO + bool "font-misc-meltho" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.mk b/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.mk new file mode 100644 index 0000000000..5667869951 --- /dev/null +++ b/package/x11r7/xfont_font-misc-meltho/xfont_font-misc-meltho.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-misc-meltho +# +################################################################################ + +XFONT_FONT_MISC_MELTHO_VERSION = 1.0.3 +XFONT_FONT_MISC_MELTHO_SOURCE = font-misc-meltho-$(XFONT_FONT_MISC_MELTHO_VERSION).tar.bz2 +XFONT_FONT_MISC_MELTHO_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_MISC_MELTHO_LICENSE = Meltho License +XFONT_FONT_MISC_MELTHO_LICENSE_FILES = COPYING + +XFONT_FONT_MISC_MELTHO_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_MISC_MELTHO_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_MISC_MELTHO_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-misc-misc/Config.in b/package/x11r7/xfont_font-misc-misc/Config.in new file mode 100644 index 0000000000..fc379a6ed2 --- /dev/null +++ b/package/x11r7/xfont_font-misc-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_MISC_MISC + bool "font-misc-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.mk b/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.mk new file mode 100644 index 0000000000..700837c1ed --- /dev/null +++ b/package/x11r7/xfont_font-misc-misc/xfont_font-misc-misc.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-misc-misc +# +################################################################################ + +XFONT_FONT_MISC_MISC_VERSION = 1.1.2 +XFONT_FONT_MISC_MISC_SOURCE = font-misc-misc-$(XFONT_FONT_MISC_MISC_VERSION).tar.bz2 +XFONT_FONT_MISC_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_MISC_MISC_LICENSE = Public Domain +XFONT_FONT_MISC_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_MISC_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_MISC_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_MISC_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-mutt-misc/Config.in b/package/x11r7/xfont_font-mutt-misc/Config.in new file mode 100644 index 0000000000..563dc9f2d4 --- /dev/null +++ b/package/x11r7/xfont_font-mutt-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_MUTT_MISC + bool "font-mutt-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.mk b/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.mk new file mode 100644 index 0000000000..53fc192a9a --- /dev/null +++ b/package/x11r7/xfont_font-mutt-misc/xfont_font-mutt-misc.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-mutt-misc +# +################################################################################ + +XFONT_FONT_MUTT_MISC_VERSION = 1.0.3 +XFONT_FONT_MUTT_MISC_SOURCE = font-mutt-misc-$(XFONT_FONT_MUTT_MISC_VERSION).tar.bz2 +XFONT_FONT_MUTT_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_MUTT_MISC_LICENSE = MIT +XFONT_FONT_MUTT_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_MUTT_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_MUTT_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_MUTT_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-schumacher-misc/Config.in b/package/x11r7/xfont_font-schumacher-misc/Config.in new file mode 100644 index 0000000000..e30940a6d5 --- /dev/null +++ b/package/x11r7/xfont_font-schumacher-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_SCHUMACHER_MISC + bool "font-schumacher-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.mk b/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.mk new file mode 100644 index 0000000000..0fa4d39616 --- /dev/null +++ b/package/x11r7/xfont_font-schumacher-misc/xfont_font-schumacher-misc.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-schumacher-misc +# +################################################################################ + +XFONT_FONT_SCHUMACHER_MISC_VERSION = 1.1.2 +XFONT_FONT_SCHUMACHER_MISC_SOURCE = font-schumacher-misc-$(XFONT_FONT_SCHUMACHER_MISC_VERSION).tar.bz2 +XFONT_FONT_SCHUMACHER_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_SCHUMACHER_MISC_LICENSE = MIT +XFONT_FONT_SCHUMACHER_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_SCHUMACHER_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_SCHUMACHER_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_SCHUMACHER_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-screen-cyrillic/Config.in b/package/x11r7/xfont_font-screen-cyrillic/Config.in new file mode 100644 index 0000000000..67f4ae6cbe --- /dev/null +++ b/package/x11r7/xfont_font-screen-cyrillic/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_SCREEN_CYRILLIC + bool "font-screen-cyrillic" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.hash b/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.hash new file mode 100644 index 0000000000..0de78d8974 --- /dev/null +++ b/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.hash @@ -0,0 +1,2 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 824231e8dffe15299454e47259f29d98001c9cf8ad3d6b5171399e4d71705e79 font-screen-cyrillic-1.0.4.tar.bz2 diff --git a/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.mk b/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.mk new file mode 100644 index 0000000000..8158ce5614 --- /dev/null +++ b/package/x11r7/xfont_font-screen-cyrillic/xfont_font-screen-cyrillic.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-screen-cyrillic +# +################################################################################ + +XFONT_FONT_SCREEN_CYRILLIC_VERSION = 1.0.4 +XFONT_FONT_SCREEN_CYRILLIC_SOURCE = font-screen-cyrillic-$(XFONT_FONT_SCREEN_CYRILLIC_VERSION).tar.bz2 +XFONT_FONT_SCREEN_CYRILLIC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_SCREEN_CYRILLIC_LICENSE = MIT +XFONT_FONT_SCREEN_CYRILLIC_LICENSE_FILES = COPYING + +XFONT_FONT_SCREEN_CYRILLIC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_SCREEN_CYRILLIC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_SCREEN_CYRILLIC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-sony-misc/Config.in b/package/x11r7/xfont_font-sony-misc/Config.in new file mode 100644 index 0000000000..df558c4311 --- /dev/null +++ b/package/x11r7/xfont_font-sony-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_SONY_MISC + bool "font-sony-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.hash b/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.hash new file mode 100644 index 0000000000..aef4b6fe47 --- /dev/null +++ b/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.hash @@ -0,0 +1,2 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 2043a326ba347c9da5ca1e9bc363e2521c3ea40b43b1f9662d333efd4867cff5 font-sony-misc-1.0.3.tar.bz2 diff --git a/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.mk b/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.mk new file mode 100644 index 0000000000..035255f77a --- /dev/null +++ b/package/x11r7/xfont_font-sony-misc/xfont_font-sony-misc.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-sony-misc +# +################################################################################ + +XFONT_FONT_SONY_MISC_VERSION = 1.0.3 +XFONT_FONT_SONY_MISC_SOURCE = font-sony-misc-$(XFONT_FONT_SONY_MISC_VERSION).tar.bz2 +XFONT_FONT_SONY_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_SONY_MISC_LICENSE = MIT +XFONT_FONT_SONY_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_SONY_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_SONY_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_SONY_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-sun-misc/Config.in b/package/x11r7/xfont_font-sun-misc/Config.in new file mode 100644 index 0000000000..accc764a6b --- /dev/null +++ b/package/x11r7/xfont_font-sun-misc/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_SUN_MISC + bool "font-sun-misc" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.hash b/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.hash new file mode 100644 index 0000000000..9d3697814d --- /dev/null +++ b/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.hash @@ -0,0 +1,2 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 481f4fcbbf7005658b080b3cf342c8c76de752e77f47958b2b383de73266d2e0 font-sun-misc-1.0.3.tar.bz2 diff --git a/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.mk b/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.mk new file mode 100644 index 0000000000..395cb87e76 --- /dev/null +++ b/package/x11r7/xfont_font-sun-misc/xfont_font-sun-misc.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-sun-misc +# +################################################################################ + +XFONT_FONT_SUN_MISC_VERSION = 1.0.3 +XFONT_FONT_SUN_MISC_SOURCE = font-sun-misc-$(XFONT_FONT_SUN_MISC_VERSION).tar.bz2 +XFONT_FONT_SUN_MISC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_SUN_MISC_LICENSE = MIT +XFONT_FONT_SUN_MISC_LICENSE_FILES = COPYING + +XFONT_FONT_SUN_MISC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_SUN_MISC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_SUN_MISC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-util/Config.in b/package/x11r7/xfont_font-util/Config.in new file mode 100644 index 0000000000..4edeffdd30 --- /dev/null +++ b/package/x11r7/xfont_font-util/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XFONT_FONT_UTIL + bool "font-util" + help + No description available diff --git a/package/x11r7/xfont_font-util/xfont_font-util.hash b/package/x11r7/xfont_font-util/xfont_font-util.hash new file mode 100644 index 0000000000..04ada91da1 --- /dev/null +++ b/package/x11r7/xfont_font-util/xfont_font-util.hash @@ -0,0 +1,3 @@ +# From http://lists.x.org/archives/xorg-announce/2015-March/002546.html +sha1 0b16add3637c64b0bbaf1dd223b71b0421100c20 font-util-1.3.1.tar.bz2 +sha256 aa7ebdb0715106dd255082f2310dbaa2cd7e225957c2a77d719720c7cc92b921 font-util-1.3.1.tar.bz2 diff --git a/package/x11r7/xfont_font-util/xfont_font-util.mk b/package/x11r7/xfont_font-util/xfont_font-util.mk new file mode 100644 index 0000000000..1c43d6a706 --- /dev/null +++ b/package/x11r7/xfont_font-util/xfont_font-util.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xfont_font-util +# +################################################################################ + +XFONT_FONT_UTIL_VERSION = 1.3.1 +XFONT_FONT_UTIL_SOURCE = font-util-$(XFONT_FONT_UTIL_VERSION).tar.bz2 +XFONT_FONT_UTIL_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_UTIL_LICENSE = MIT/BSD-2c +XFONT_FONT_UTIL_LICENSE_FILES = COPYING + +XFONT_FONT_UTIL_DEPENDENCIES = host-pkgconf +XFONT_FONT_UTIL_INSTALL_STAGING = YES +XFONT_FONT_UTIL_INSTALL_TARGET = NO + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xfont_font-winitzki-cyrillic/Config.in b/package/x11r7/xfont_font-winitzki-cyrillic/Config.in new file mode 100644 index 0000000000..ccfb080291 --- /dev/null +++ b/package/x11r7/xfont_font-winitzki-cyrillic/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_WINITZKI_CYRILLIC + bool "font-winitzki-cyrillic" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.hash b/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.hash new file mode 100644 index 0000000000..89fbda9acf --- /dev/null +++ b/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.hash @@ -0,0 +1,2 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 abd13b63d02fcaec488686c23683e5cf640b43bd32f8ca22eeae6f84df0a36a0 font-winitzki-cyrillic-1.0.3.tar.bz2 diff --git a/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.mk b/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.mk new file mode 100644 index 0000000000..665fb90896 --- /dev/null +++ b/package/x11r7/xfont_font-winitzki-cyrillic/xfont_font-winitzki-cyrillic.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-winitzki-cyrillic +# +################################################################################ + +XFONT_FONT_WINITZKI_CYRILLIC_VERSION = 1.0.3 +XFONT_FONT_WINITZKI_CYRILLIC_SOURCE = font-winitzki-cyrillic-$(XFONT_FONT_WINITZKI_CYRILLIC_VERSION).tar.bz2 +XFONT_FONT_WINITZKI_CYRILLIC_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_WINITZKI_CYRILLIC_LICENSE = Public Domain +XFONT_FONT_WINITZKI_CYRILLIC_LICENSE_FILES = COPYING + +XFONT_FONT_WINITZKI_CYRILLIC_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_WINITZKI_CYRILLIC_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_WINITZKI_CYRILLIC_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xfont_font-xfree86-type1/Config.in b/package/x11r7/xfont_font-xfree86-type1/Config.in new file mode 100644 index 0000000000..1a897b2443 --- /dev/null +++ b/package/x11r7/xfont_font-xfree86-type1/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XFONT_FONT_XFREE86_TYPE1 + bool "font-xfree86-type1" + select BR2_PACKAGE_XFONT_FONT_UTIL + help + No description available diff --git a/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.hash b/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.hash new file mode 100644 index 0000000000..38be53bf52 --- /dev/null +++ b/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.hash @@ -0,0 +1,2 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 caebf42aec7be7f3bd40e0f232d6f34881b853dc84acfcdf7458358701fbe34a font-xfree86-type1-1.0.4.tar.bz2 diff --git a/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.mk b/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.mk new file mode 100644 index 0000000000..e1a2ef6067 --- /dev/null +++ b/package/x11r7/xfont_font-xfree86-type1/xfont_font-xfree86-type1.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xfont_font-xfree86-type1 +# +################################################################################ + +XFONT_FONT_XFREE86_TYPE1_VERSION = 1.0.4 +XFONT_FONT_XFREE86_TYPE1_SOURCE = font-xfree86-type1-$(XFONT_FONT_XFREE86_TYPE1_VERSION).tar.bz2 +XFONT_FONT_XFREE86_TYPE1_SITE = http://xorg.freedesktop.org/releases/individual/font +XFONT_FONT_XFREE86_TYPE1_LICENSE = MIT +XFONT_FONT_XFREE86_TYPE1_LICENSE_FILES = COPYING + +XFONT_FONT_XFREE86_TYPE1_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install +XFONT_FONT_XFREE86_TYPE1_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) MKFONTSCALE=$(HOST_DIR)/usr/bin/mkfontscale MKFONTDIR=$(HOST_DIR)/usr/bin/mkfontdir install-data +XFONT_FONT_XFREE86_TYPE1_DEPENDENCIES = xfont_font-util host-xfont_font-util host-xapp_mkfontscale host-xapp_mkfontdir host-xapp_bdftopcf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xkeyboard-config/Config.in b/package/x11r7/xkeyboard-config/Config.in new file mode 100644 index 0000000000..5d1d6a72ed --- /dev/null +++ b/package/x11r7/xkeyboard-config/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XKEYBOARD_CONFIG + bool "xkeyboard-config" + # Runtime dependencies + select BR2_PACKAGE_XAPP_XKBCOMP if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XPROTO_XPROTO if BR2_PACKAGE_XORG7 + help + keyboard configuration database for X + + http://xlibs.freedesktop.org/xkbdesc diff --git a/package/x11r7/xkeyboard-config/xkeyboard-config.hash b/package/x11r7/xkeyboard-config/xkeyboard-config.hash new file mode 100644 index 0000000000..fad76ed52b --- /dev/null +++ b/package/x11r7/xkeyboard-config/xkeyboard-config.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2016-January/002671.html +sha256 dec6be44bd31775cdc1ab95bfd75d5f2c0055613eeca8b4e9c6480b183430701 xkeyboard-config-2.17.tar.bz2 diff --git a/package/x11r7/xkeyboard-config/xkeyboard-config.mk b/package/x11r7/xkeyboard-config/xkeyboard-config.mk new file mode 100644 index 0000000000..352c55d974 --- /dev/null +++ b/package/x11r7/xkeyboard-config/xkeyboard-config.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xkeyboard-config +# +################################################################################ + +XKEYBOARD_CONFIG_VERSION = 2.17 +XKEYBOARD_CONFIG_SOURCE = xkeyboard-config-$(XKEYBOARD_CONFIG_VERSION).tar.bz2 +XKEYBOARD_CONFIG_SITE = http://www.x.org/releases/individual/data/xkeyboard-config +XKEYBOARD_CONFIG_LICENSE = MIT +XKEYBOARD_CONFIG_LICENSE_FILES = COPYING + +XKEYBOARD_CONFIG_CONF_OPTS = --disable-runtime-deps +XKEYBOARD_CONFIG_DEPENDENCIES = host-gettext host-intltool host-xapp_xkbcomp + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libFS/Config.in b/package/x11r7/xlib_libFS/Config.in new file mode 100644 index 0000000000..0c8a7290c1 --- /dev/null +++ b/package/x11r7/xlib_libFS/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBFS + bool "libFS" + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_XPROTO_FONTSPROTO + help + X.Org FS library diff --git a/package/x11r7/xlib_libFS/xlib_libFS.hash b/package/x11r7/xlib_libFS/xlib_libFS.hash new file mode 100644 index 0000000000..786d147b37 --- /dev/null +++ b/package/x11r7/xlib_libFS/xlib_libFS.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002588.html +sha256 2e9d4c07026a7401d4fa4ffae86e6ac7fec83f50f3268fa85f52718e479dc4f3 libFS-1.0.7.tar.bz2 diff --git a/package/x11r7/xlib_libFS/xlib_libFS.mk b/package/x11r7/xlib_libFS/xlib_libFS.mk new file mode 100644 index 0000000000..a3c58b90d9 --- /dev/null +++ b/package/x11r7/xlib_libFS/xlib_libFS.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libFS +# +################################################################################ + +XLIB_LIBFS_VERSION = 1.0.7 +XLIB_LIBFS_SOURCE = libFS-$(XLIB_LIBFS_VERSION).tar.bz2 +XLIB_LIBFS_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBFS_LICENSE = MIT +XLIB_LIBFS_LICENSE_FILES = COPYING +XLIB_LIBFS_INSTALL_STAGING = YES +XLIB_LIBFS_DEPENDENCIES = xlib_xtrans xproto_xproto xproto_fontsproto host-pkgconf +XLIB_LIBFS_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libICE/Config.in b/package/x11r7/xlib_libICE/Config.in new file mode 100644 index 0000000000..d63f935602 --- /dev/null +++ b/package/x11r7/xlib_libICE/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBICE + bool "libICE" + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org ICE library diff --git a/package/x11r7/xlib_libICE/xlib_libICE.hash b/package/x11r7/xlib_libICE/xlib_libICE.hash new file mode 100644 index 0000000000..1b006ce36b --- /dev/null +++ b/package/x11r7/xlib_libICE/xlib_libICE.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/pipermail/xorg/2014-June/056671.html +sha256 8f7032f2c1c64352b5423f6b48a8ebdc339cc63064af34d66a6c9aa79759e202 libICE-1.0.9.tar.bz2 diff --git a/package/x11r7/xlib_libICE/xlib_libICE.mk b/package/x11r7/xlib_libICE/xlib_libICE.mk new file mode 100644 index 0000000000..e2a4e7d387 --- /dev/null +++ b/package/x11r7/xlib_libICE/xlib_libICE.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_libICE +# +################################################################################ + +XLIB_LIBICE_VERSION = 1.0.9 +XLIB_LIBICE_SOURCE = libICE-$(XLIB_LIBICE_VERSION).tar.bz2 +XLIB_LIBICE_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBICE_LICENSE = MIT +XLIB_LIBICE_LICENSE_FILES = COPYING +XLIB_LIBICE_INSTALL_STAGING = YES +XLIB_LIBICE_DEPENDENCIES = xlib_xtrans xproto_xproto host-pkgconf + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libSM/Config.in b/package/x11r7/xlib_libSM/Config.in new file mode 100644 index 0000000000..ef83b531f8 --- /dev/null +++ b/package/x11r7/xlib_libSM/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBSM + bool "libSM" + select BR2_PACKAGE_XLIB_LIBICE + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org SM library diff --git a/package/x11r7/xlib_libSM/xlib_libSM.hash b/package/x11r7/xlib_libSM/xlib_libSM.hash new file mode 100644 index 0000000000..79dc25c226 --- /dev/null +++ b/package/x11r7/xlib_libSM/xlib_libSM.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/xorg/2013-September/056013.html +sha256 0baca8c9f5d934450a70896c4ad38d06475521255ca63b717a6510fdb6e287bd libSM-1.2.2.tar.bz2 diff --git a/package/x11r7/xlib_libSM/xlib_libSM.mk b/package/x11r7/xlib_libSM/xlib_libSM.mk new file mode 100644 index 0000000000..30640bd101 --- /dev/null +++ b/package/x11r7/xlib_libSM/xlib_libSM.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libSM +# +################################################################################ + +XLIB_LIBSM_VERSION = 1.2.2 +XLIB_LIBSM_SOURCE = libSM-$(XLIB_LIBSM_VERSION).tar.bz2 +XLIB_LIBSM_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBSM_LICENSE = MIT +XLIB_LIBSM_LICENSE_FILES = COPYING +XLIB_LIBSM_INSTALL_STAGING = YES +XLIB_LIBSM_DEPENDENCIES = xlib_libICE xlib_xtrans xproto_xproto +XLIB_LIBSM_CONF_OPTS = --without-libuuid + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libX11/Config.in b/package/x11r7/xlib_libX11/Config.in new file mode 100644 index 0000000000..3ad8d00ae5 --- /dev/null +++ b/package/x11r7/xlib_libX11/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_XLIB_LIBX11 + bool "libX11" + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XUTIL_UTIL_MACROS + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XLIB_LIBXAU + select BR2_PACKAGE_XLIB_LIBXDMCP + select BR2_PACKAGE_XPROTO_KBPROTO + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XPROTO_XF86BIGFONTPROTO + help + X.Org X11 library diff --git a/package/x11r7/xlib_libX11/xlib_libX11.hash b/package/x11r7/xlib_libX11/xlib_libX11.hash new file mode 100644 index 0000000000..acae656208 --- /dev/null +++ b/package/x11r7/xlib_libX11/xlib_libX11.hash @@ -0,0 +1,3 @@ +# From http://lists.x.org/archives/xorg-announce/2015-March/002543.html +sha1 6f2aadf8346ee00b7419bd338461c6986e274733 libX11-1.6.3.tar.bz2 +sha256 cf31a7c39f2f52e8ebd0db95640384e63451f9b014eed2bb7f5de03e8adc8111 libX11-1.6.3.tar.bz2 diff --git a/package/x11r7/xlib_libX11/xlib_libX11.mk b/package/x11r7/xlib_libX11/xlib_libX11.mk new file mode 100644 index 0000000000..fc19aa1d28 --- /dev/null +++ b/package/x11r7/xlib_libX11/xlib_libX11.mk @@ -0,0 +1,49 @@ +################################################################################ +# +# xlib_libX11 +# +################################################################################ + +XLIB_LIBX11_VERSION = 1.6.3 +XLIB_LIBX11_SOURCE = libX11-$(XLIB_LIBX11_VERSION).tar.bz2 +XLIB_LIBX11_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBX11_LICENSE = MIT +XLIB_LIBX11_LICENSE_FILES = COPYING +XLIB_LIBX11_INSTALL_STAGING = YES +XLIB_LIBX11_DEPENDENCIES = \ + libxcb \ + xutil_util-macros \ + xlib_xtrans \ + xlib_libXau \ + xlib_libXdmcp \ + xproto_kbproto \ + xproto_xproto \ + xproto_xextproto \ + xproto_inputproto \ + xproto_xf86bigfontproto \ + host-xproto_xproto + +XLIB_LIBX11_CONF_OPTS = \ + --disable-malloc0returnsnull \ + --with-xcb \ + --disable-specs \ + --without-perl + +HOST_XLIB_LIBX11_CONF_OPTS = \ + --disable-specs \ + --without-perl + +# src/util/makekeys is executed at build time to generate ks_tables.h, so +# it should get compiled for the host. The libX11 makefile unfortunately +# doesn't have X11_CFLAGS_FOR_BUILD so this doesn't work. For buildroot, +# we know the X11 includes are in $(HOST_DIR)/usr/include, which are already +# in the CFLAGS_FOR_BUILD, so we can just remove the X11_CFLAGS +define XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS + $(SED) '/X11_CFLAGS/d' $(@D)/src/util/Makefile* +endef + +XLIB_LIBX11_POST_PATCH_HOOKS += XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS +HOST_XLIB_LIBX11_POST_PATCH_HOOKS += XLIB_LIBX11_DISABLE_MAKEKEYS_X11_CFLAGS + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXScrnSaver/Config.in b/package/x11r7/xlib_libXScrnSaver/Config.in new file mode 100644 index 0000000000..5df9a00c72 --- /dev/null +++ b/package/x11r7/xlib_libXScrnSaver/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBXSCRNSAVER + bool "libXScrnSaver" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XPROTO_SCRNSAVERPROTO + help + X.Org XScrnSaver library diff --git a/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.hash b/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.hash new file mode 100644 index 0000000000..d5340baf1e --- /dev/null +++ b/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/pipermail/xorg/2012-March/054015.html +sha256 8ff1efa7341c7f34bcf9b17c89648d6325ddaae22e3904e091794e0b4426ce1d libXScrnSaver-1.2.2.tar.bz2 diff --git a/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.mk b/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.mk new file mode 100644 index 0000000000..f22ee983c0 --- /dev/null +++ b/package/x11r7/xlib_libXScrnSaver/xlib_libXScrnSaver.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXScrnSaver +# +################################################################################ + +XLIB_LIBXSCRNSAVER_VERSION = 1.2.2 +XLIB_LIBXSCRNSAVER_SOURCE = libXScrnSaver-$(XLIB_LIBXSCRNSAVER_VERSION).tar.bz2 +XLIB_LIBXSCRNSAVER_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXSCRNSAVER_LICENSE = MIT +XLIB_LIBXSCRNSAVER_LICENSE_FILES = COPYING +XLIB_LIBXSCRNSAVER_INSTALL_STAGING = YES +XLIB_LIBXSCRNSAVER_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_scrnsaverproto +XLIB_LIBXSCRNSAVER_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXau/Config.in b/package/x11r7/xlib_libXau/Config.in new file mode 100644 index 0000000000..a220f01970 --- /dev/null +++ b/package/x11r7/xlib_libXau/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBXAU + bool "libXau" + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_XUTIL_UTIL_MACROS + help + X.Org Xau library diff --git a/package/x11r7/xlib_libXau/xlib_libXau.hash b/package/x11r7/xlib_libXau/xlib_libXau.hash new file mode 100644 index 0000000000..b6c8de73c1 --- /dev/null +++ b/package/x11r7/xlib_libXau/xlib_libXau.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/xorg/2013-May/055728.html +sha256 fdd477320aeb5cdd67272838722d6b7d544887dfe7de46e1e7cc0c27c2bea4f2 libXau-1.0.8.tar.bz2 diff --git a/package/x11r7/xlib_libXau/xlib_libXau.mk b/package/x11r7/xlib_libXau/xlib_libXau.mk new file mode 100644 index 0000000000..8ef48e4a7b --- /dev/null +++ b/package/x11r7/xlib_libXau/xlib_libXau.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXau +# +################################################################################ + +XLIB_LIBXAU_VERSION = 1.0.8 +XLIB_LIBXAU_SOURCE = libXau-$(XLIB_LIBXAU_VERSION).tar.bz2 +XLIB_LIBXAU_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXAU_LICENSE = MIT +XLIB_LIBXAU_LICENSE_FILES = COPYING +XLIB_LIBXAU_INSTALL_STAGING = YES +XLIB_LIBXAU_DEPENDENCIES = host-pkgconf xutil_util-macros xproto_xproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXaw/Config.in b/package/x11r7/xlib_libXaw/Config.in new file mode 100644 index 0000000000..3695bb679f --- /dev/null +++ b/package/x11r7/xlib_libXaw/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XLIB_LIBXAW + bool "libXaw" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXPM + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xaw library diff --git a/package/x11r7/xlib_libXaw/xlib_libXaw.hash b/package/x11r7/xlib_libXaw/xlib_libXaw.hash new file mode 100644 index 0000000000..a948e8fd9b --- /dev/null +++ b/package/x11r7/xlib_libXaw/xlib_libXaw.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002591.html +sha256 8ef8067312571292ccc2bbe94c41109dcf022ea5a4ec71656a83d8cce9edb0cd libXaw-1.0.13.tar.bz2 diff --git a/package/x11r7/xlib_libXaw/xlib_libXaw.mk b/package/x11r7/xlib_libXaw/xlib_libXaw.mk new file mode 100644 index 0000000000..d78adffeda --- /dev/null +++ b/package/x11r7/xlib_libXaw/xlib_libXaw.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_libXaw +# +################################################################################ + +XLIB_LIBXAW_VERSION = 1.0.13 +XLIB_LIBXAW_SOURCE = libXaw-$(XLIB_LIBXAW_VERSION).tar.bz2 +XLIB_LIBXAW_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXAW_LICENSE = MIT +XLIB_LIBXAW_LICENSE_FILES = COPYING +XLIB_LIBXAW_INSTALL_STAGING = YES +XLIB_LIBXAW_DEPENDENCIES = xlib_libX11 xlib_libXt xlib_libXmu xlib_libXpm xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXcomposite/Config.in b/package/x11r7/xlib_libXcomposite/Config.in new file mode 100644 index 0000000000..14da977af0 --- /dev/null +++ b/package/x11r7/xlib_libXcomposite/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XLIB_LIBXCOMPOSITE + bool "libXcomposite" + select BR2_PACKAGE_XPROTO_COMPOSITEPROTO + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xcomposite library diff --git a/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.hash b/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.hash new file mode 100644 index 0000000000..b0c3211f12 --- /dev/null +++ b/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/xorg/2013-January/055221.html +sha256 ede250cd207d8bee4a338265c3007d7a68d5aca791b6ac41af18e9a2aeb34178 libXcomposite-0.4.4.tar.bz2 diff --git a/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.mk b/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.mk new file mode 100644 index 0000000000..f0e59cba1d --- /dev/null +++ b/package/x11r7/xlib_libXcomposite/xlib_libXcomposite.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_libXcomposite +# +################################################################################ + +XLIB_LIBXCOMPOSITE_VERSION = 0.4.4 +XLIB_LIBXCOMPOSITE_SOURCE = libXcomposite-$(XLIB_LIBXCOMPOSITE_VERSION).tar.bz2 +XLIB_LIBXCOMPOSITE_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXCOMPOSITE_LICENSE = MIT +XLIB_LIBXCOMPOSITE_LICENSE_FILES = COPYING +XLIB_LIBXCOMPOSITE_INSTALL_STAGING = YES +XLIB_LIBXCOMPOSITE_DEPENDENCIES = xproto_compositeproto xlib_libX11 xlib_libXext xlib_libXfixes xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXcursor/Config.in b/package/x11r7/xlib_libXcursor/Config.in new file mode 100644 index 0000000000..6519cc7667 --- /dev/null +++ b/package/x11r7/xlib_libXcursor/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXCURSOR + bool "libXcursor" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xcursor library diff --git a/package/x11r7/xlib_libXcursor/xlib_libXcursor.hash b/package/x11r7/xlib_libXcursor/xlib_libXcursor.hash new file mode 100644 index 0000000000..0135ac9dd0 --- /dev/null +++ b/package/x11r7/xlib_libXcursor/xlib_libXcursor.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-May/002229.html +sha256 9bc6acb21ca14da51bda5bc912c8955bc6e5e433f0ab00c5e8bef842596c33df libXcursor-1.1.14.tar.bz2 diff --git a/package/x11r7/xlib_libXcursor/xlib_libXcursor.mk b/package/x11r7/xlib_libXcursor/xlib_libXcursor.mk new file mode 100644 index 0000000000..508b5e21c5 --- /dev/null +++ b/package/x11r7/xlib_libXcursor/xlib_libXcursor.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXcursor +# +################################################################################ + +XLIB_LIBXCURSOR_VERSION = 1.1.14 +XLIB_LIBXCURSOR_SOURCE = libXcursor-$(XLIB_LIBXCURSOR_VERSION).tar.bz2 +XLIB_LIBXCURSOR_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXCURSOR_LICENSE = MIT +XLIB_LIBXCURSOR_LICENSE_FILES = COPYING +XLIB_LIBXCURSOR_INSTALL_STAGING = YES +XLIB_LIBXCURSOR_DEPENDENCIES = xlib_libX11 xlib_libXfixes xlib_libXrender xproto_xproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXdamage/Config.in b/package/x11r7/xlib_libXdamage/Config.in new file mode 100644 index 0000000000..242748663c --- /dev/null +++ b/package/x11r7/xlib_libXdamage/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXDAMAGE + bool "libXdamage" + select BR2_PACKAGE_XPROTO_DAMAGEPROTO + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xdamage library diff --git a/package/x11r7/xlib_libXdamage/xlib_libXdamage.hash b/package/x11r7/xlib_libXdamage/xlib_libXdamage.hash new file mode 100644 index 0000000000..343cbf4a68 --- /dev/null +++ b/package/x11r7/xlib_libXdamage/xlib_libXdamage.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/xorg/2013-January/055220.html +sha256 7c3fe7c657e83547f4822bfde30a90d84524efb56365448768409b77f05355ad libXdamage-1.1.4.tar.bz2 diff --git a/package/x11r7/xlib_libXdamage/xlib_libXdamage.mk b/package/x11r7/xlib_libXdamage/xlib_libXdamage.mk new file mode 100644 index 0000000000..9f982eef10 --- /dev/null +++ b/package/x11r7/xlib_libXdamage/xlib_libXdamage.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_libXdamage +# +################################################################################ + +XLIB_LIBXDAMAGE_VERSION = 1.1.4 +XLIB_LIBXDAMAGE_SOURCE = libXdamage-$(XLIB_LIBXDAMAGE_VERSION).tar.bz2 +XLIB_LIBXDAMAGE_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXDAMAGE_LICENSE = MIT +XLIB_LIBXDAMAGE_LICENSE_FILES = COPYING +XLIB_LIBXDAMAGE_INSTALL_STAGING = YES +XLIB_LIBXDAMAGE_DEPENDENCIES = xproto_damageproto xlib_libX11 xlib_libXfixes xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXdmcp/Config.in b/package/x11r7/xlib_libXdmcp/Config.in new file mode 100644 index 0000000000..218ff1598b --- /dev/null +++ b/package/x11r7/xlib_libXdmcp/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBXDMCP + bool "libXdmcp" + select BR2_PACKAGE_XUTIL_UTIL_MACROS + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xdmcp library diff --git a/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.hash b/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.hash new file mode 100644 index 0000000000..6b50cb1c79 --- /dev/null +++ b/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-March/002554.html +sha256 81fe09867918fff258296e1e1e159f0dc639cb30d201c53519f25ab73af4e4e2 libXdmcp-1.1.2.tar.bz2 diff --git a/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk b/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk new file mode 100644 index 0000000000..119c018137 --- /dev/null +++ b/package/x11r7/xlib_libXdmcp/xlib_libXdmcp.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXdmcp +# +################################################################################ + +XLIB_LIBXDMCP_VERSION = 1.1.2 +XLIB_LIBXDMCP_SOURCE = libXdmcp-$(XLIB_LIBXDMCP_VERSION).tar.bz2 +XLIB_LIBXDMCP_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXDMCP_LICENSE = MIT +XLIB_LIBXDMCP_LICENSE_FILES = COPYING +XLIB_LIBXDMCP_INSTALL_STAGING = YES +XLIB_LIBXDMCP_DEPENDENCIES = xutil_util-macros xproto_xproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXext/Config.in b/package/x11r7/xlib_libXext/Config.in new file mode 100644 index 0000000000..823a165bf2 --- /dev/null +++ b/package/x11r7/xlib_libXext/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBXEXT + bool "libXext" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xext library diff --git a/package/x11r7/xlib_libXext/xlib_libXext.hash b/package/x11r7/xlib_libXext/xlib_libXext.hash new file mode 100644 index 0000000000..45b754448c --- /dev/null +++ b/package/x11r7/xlib_libXext/xlib_libXext.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/pipermail/xorg/2014-July/056771.html +sha256 b518d4d332231f313371fdefac59e3776f4f0823bcb23cf7c7305bfb57b16e35 libXext-1.3.3.tar.bz2 diff --git a/package/x11r7/xlib_libXext/xlib_libXext.mk b/package/x11r7/xlib_libXext/xlib_libXext.mk new file mode 100644 index 0000000000..211c85360a --- /dev/null +++ b/package/x11r7/xlib_libXext/xlib_libXext.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXext +# +################################################################################ + +XLIB_LIBXEXT_VERSION = 1.3.3 +XLIB_LIBXEXT_SOURCE = libXext-$(XLIB_LIBXEXT_VERSION).tar.bz2 +XLIB_LIBXEXT_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXEXT_LICENSE = MIT +XLIB_LIBXEXT_LICENSE_FILES = COPYING +XLIB_LIBXEXT_INSTALL_STAGING = YES +XLIB_LIBXEXT_DEPENDENCIES = xlib_libX11 xproto_xextproto xproto_xproto +XLIB_LIBXEXT_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXfixes/0001-remove-fallback-for-xeatdatawords.patch b/package/x11r7/xlib_libXfixes/0001-remove-fallback-for-xeatdatawords.patch new file mode 100644 index 0000000000..cb8c5780a2 --- /dev/null +++ b/package/x11r7/xlib_libXfixes/0001-remove-fallback-for-xeatdatawords.patch @@ -0,0 +1,63 @@ +From 1702cdfe45c9bdd7dacfc8f27a49f89fcd1d02c3 Mon Sep 17 00:00:00 2001 +From: Michael Joost +Date: Mon, 18 Nov 2013 16:11:26 +0100 +Subject: Remove fallback for _XEatDataWords, require libX11 1.6 for it + +_XEatDataWords was orignally introduced with the May 2013 security +patches, and in order to ease the process of delivering those, +fallback versions of _XEatDataWords were included in the X extension +library patches so they could be applied to older versions that didn't +have libX11 1.6 yet. Now that we're past that hurdle, we can drop +the fallbacks and just require libX11 1.6 for building new versions +of the extension libraries. + +Reviewed-by: Alan Coopersmith +Signed-off-by: Alan Coopersmith +Signed-off-by: Bernd Kuhls +(downloaded from upstream commit: + https://cgit.freedesktop.org/xorg/lib/libXfixes/commit/?id=1702cdfe45c9bdd7dacfc8f27a49f89fcd1d02c3) +diff --git a/configure.ac b/configure.ac +index f85bd72..2a59af8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -55,13 +55,7 @@ FIXESEXT_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'` + AC_SUBST(FIXESEXT_VERSION) + + # Obtain compiler/linker options for depedencies +-PKG_CHECK_MODULES(FIXESEXT, xproto [fixesproto >= $FIXESEXT_VERSION] xextproto x11) +- +-# Check for _XEatDataWords function that may be patched into older Xlib releases +-SAVE_LIBS="$LIBS" +-LIBS="$FIXESEXT_LIBS" +-AC_CHECK_FUNCS([_XEatDataWords]) +-LIBS="$SAVE_LIBS" ++PKG_CHECK_MODULES(FIXESEXT, xproto [fixesproto >= $FIXESEXT_VERSION] xextproto [x11 >= 1.6]) + + + AC_CONFIG_FILES([Makefile +diff --git a/src/Xfixesint.h b/src/Xfixesint.h +index 7bf5bfd..8a4d5fd 100644 +--- a/src/Xfixesint.h ++++ b/src/Xfixesint.h +@@ -60,18 +60,4 @@ XFixesFindDisplay (Display *dpy); + #define XFixesSimpleCheckExtension(dpy,i) \ + if (!XFixesHasExtension(i)) { return; } + +-#ifndef HAVE__XEATDATAWORDS +-#include /* for LONG64 on 64-bit platforms */ +-#include +- +-static inline void _XEatDataWords(Display *dpy, unsigned long n) +-{ +-# ifndef LONG64 +- if (n >= (ULONG_MAX >> 2)) +- _XIOError(dpy); +-# endif +- _XEatData (dpy, n << 2); +-} +-#endif +- + #endif /* _XFIXESINT_H_ */ +-- +cgit v0.10.2 + diff --git a/package/x11r7/xlib_libXfixes/Config.in b/package/x11r7/xlib_libXfixes/Config.in new file mode 100644 index 0000000000..9bbabb2558 --- /dev/null +++ b/package/x11r7/xlib_libXfixes/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXFIXES + bool "libXfixes" + select BR2_PACKAGE_XPROTO_FIXESPROTO + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xfixes library diff --git a/package/x11r7/xlib_libXfixes/xlib_libXfixes.hash b/package/x11r7/xlib_libXfixes/xlib_libXfixes.hash new file mode 100644 index 0000000000..291c4bdd8b --- /dev/null +++ b/package/x11r7/xlib_libXfixes/xlib_libXfixes.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-May/002227.html +sha256 63bec085084fa3caaee5180490dd871f1eb2020ba9e9b39a30f93693ffc34767 libXfixes-5.0.1.tar.bz2 diff --git a/package/x11r7/xlib_libXfixes/xlib_libXfixes.mk b/package/x11r7/xlib_libXfixes/xlib_libXfixes.mk new file mode 100644 index 0000000000..aebc9c47f4 --- /dev/null +++ b/package/x11r7/xlib_libXfixes/xlib_libXfixes.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# xlib_libXfixes +# +################################################################################ + +XLIB_LIBXFIXES_VERSION = 5.0.1 +XLIB_LIBXFIXES_SOURCE = libXfixes-$(XLIB_LIBXFIXES_VERSION).tar.bz2 +XLIB_LIBXFIXES_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXFIXES_LICENSE = MIT +XLIB_LIBXFIXES_LICENSE_FILES = COPYING +# 0001-remove-fallback-for-xeatdatawords.patch +XLIB_LIBXFIXES_AUTORECONF = YES +XLIB_LIBXFIXES_INSTALL_STAGING = YES +XLIB_LIBXFIXES_DEPENDENCIES = xproto_fixesproto xlib_libX11 xproto_xextproto xproto_xproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXfont/Config.in b/package/x11r7/xlib_libXfont/Config.in new file mode 100644 index 0000000000..cc1da0ea39 --- /dev/null +++ b/package/x11r7/xlib_libXfont/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XLIB_LIBXFONT + bool "libXfont" + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_XLIB_LIBFONTENC + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_XFONT_ENCODINGS + help + X.Org Xfont library diff --git a/package/x11r7/xlib_libXfont/xlib_libXfont.hash b/package/x11r7/xlib_libXfont/xlib_libXfont.hash new file mode 100644 index 0000000000..9543637b3e --- /dev/null +++ b/package/x11r7/xlib_libXfont/xlib_libXfont.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-March/002551.html +sha256 b70898527c73f9758f551bbab612af611b8a0962202829568d94f3edf4d86098 libXfont-1.5.1.tar.bz2 diff --git a/package/x11r7/xlib_libXfont/xlib_libXfont.mk b/package/x11r7/xlib_libXfont/xlib_libXfont.mk new file mode 100644 index 0000000000..adc22b4df7 --- /dev/null +++ b/package/x11r7/xlib_libXfont/xlib_libXfont.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# xlib_libXfont +# +################################################################################ + +XLIB_LIBXFONT_VERSION = 1.5.1 +XLIB_LIBXFONT_SOURCE = libXfont-$(XLIB_LIBXFONT_VERSION).tar.bz2 +XLIB_LIBXFONT_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXFONT_LICENSE = MIT +XLIB_LIBXFONT_LICENSE_FILES = COPYING +XLIB_LIBXFONT_AUTORECONF = YES +XLIB_LIBXFONT_INSTALL_STAGING = YES +XLIB_LIBXFONT_DEPENDENCIES = freetype xlib_libfontenc xlib_xtrans xproto_fontsproto xproto_xproto xfont_encodings +XLIB_LIBXFONT_CONF_OPTS = --disable-devel-docs + +HOST_XLIB_LIBXFONT_CONF_OPTS = --disable-devel-docs + +ifeq ($(BR2_microblaze),y) +# The microblaze toolchains don't define the __ELF__ preprocessor +# symbol even though they do use the elf format. LibXfont checks for +# this symbol to know if weak symbols are supported, and otherwise +# falls back to emulation code using dlopen - Causing linker issues +# for stuff using libXfont. +# Work around it by defining the symbol here as well. +XLIB_LIBXFONT_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D__ELF__" +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXft/Config.in b/package/x11r7/xlib_libXft/Config.in new file mode 100644 index 0000000000..6eef170177 --- /dev/null +++ b/package/x11r7/xlib_libXft/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XLIB_LIBXFT + bool "libXft" + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xft library diff --git a/package/x11r7/xlib_libXft/xlib_libXft.hash b/package/x11r7/xlib_libXft/xlib_libXft.hash new file mode 100644 index 0000000000..6eacf06ef1 --- /dev/null +++ b/package/x11r7/xlib_libXft/xlib_libXft.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/pipermail/xorg/2014-June/056668.html +sha256 f5a3c824761df351ca91827ac221090943ef28b248573486050de89f4bfcdc4c libXft-2.3.2.tar.bz2 diff --git a/package/x11r7/xlib_libXft/xlib_libXft.mk b/package/x11r7/xlib_libXft/xlib_libXft.mk new file mode 100644 index 0000000000..de9b47093b --- /dev/null +++ b/package/x11r7/xlib_libXft/xlib_libXft.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXft +# +################################################################################ + +XLIB_LIBXFT_VERSION = 2.3.2 +XLIB_LIBXFT_SOURCE = libXft-$(XLIB_LIBXFT_VERSION).tar.bz2 +XLIB_LIBXFT_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXFT_LICENSE = MIT +XLIB_LIBXFT_LICENSE_FILES = COPYING +XLIB_LIBXFT_AUTORECONF = YES +XLIB_LIBXFT_INSTALL_STAGING = YES +XLIB_LIBXFT_DEPENDENCIES = fontconfig freetype xlib_libX11 xlib_libXext xlib_libXrender xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXi/Config.in b/package/x11r7/xlib_libXi/Config.in new file mode 100644 index 0000000000..3ae22d6305 --- /dev/null +++ b/package/x11r7/xlib_libXi/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XLIB_LIBXI + bool "libXi" + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXFIXES + help + X.Org Xi library diff --git a/package/x11r7/xlib_libXi/xlib_libXi.hash b/package/x11r7/xlib_libXi/xlib_libXi.hash new file mode 100644 index 0000000000..28eb77e115 --- /dev/null +++ b/package/x11r7/xlib_libXi/xlib_libXi.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-December/002664.html +sha256 1f32a552cec0f056c0260bdb32e853cec0673d2f40646ce932ad5a9f0205b7ac libXi-1.7.6.tar.bz2 diff --git a/package/x11r7/xlib_libXi/xlib_libXi.mk b/package/x11r7/xlib_libXi/xlib_libXi.mk new file mode 100644 index 0000000000..54c9af4576 --- /dev/null +++ b/package/x11r7/xlib_libXi/xlib_libXi.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# xlib_libXi +# +################################################################################ + +XLIB_LIBXI_VERSION = 1.7.6 +XLIB_LIBXI_SOURCE = libXi-$(XLIB_LIBXI_VERSION).tar.bz2 +XLIB_LIBXI_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXI_LICENSE = MIT +XLIB_LIBXI_LICENSE_FILES = COPYING +XLIB_LIBXI_INSTALL_STAGING = YES +XLIB_LIBXI_DEPENDENCIES = \ + host-pkgconf \ + xproto_inputproto \ + xproto_xproto \ + xlib_libX11 \ + xlib_libXext \ + xlib_libXfixes + +XLIB_LIBXI_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXinerama/Config.in b/package/x11r7/xlib_libXinerama/Config.in new file mode 100644 index 0000000000..5a79b4eb76 --- /dev/null +++ b/package/x11r7/xlib_libXinerama/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBXINERAMA + bool "libXinerama" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XPROTO_XINERAMAPROTO + help + X.Org Xinerama library diff --git a/package/x11r7/xlib_libXinerama/xlib_libXinerama.hash b/package/x11r7/xlib_libXinerama/xlib_libXinerama.hash new file mode 100644 index 0000000000..6dfd7770d2 --- /dev/null +++ b/package/x11r7/xlib_libXinerama/xlib_libXinerama.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-May/002231.html +sha256 7a45699f1773095a3f821e491cbd5e10c887c5a5fce5d8d3fced15c2ff7698e2 libXinerama-1.1.3.tar.bz2 diff --git a/package/x11r7/xlib_libXinerama/xlib_libXinerama.mk b/package/x11r7/xlib_libXinerama/xlib_libXinerama.mk new file mode 100644 index 0000000000..ee8bf55602 --- /dev/null +++ b/package/x11r7/xlib_libXinerama/xlib_libXinerama.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXinerama +# +################################################################################ + +XLIB_LIBXINERAMA_VERSION = 1.1.3 +XLIB_LIBXINERAMA_SOURCE = libXinerama-$(XLIB_LIBXINERAMA_VERSION).tar.bz2 +XLIB_LIBXINERAMA_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXINERAMA_LICENSE = MIT +XLIB_LIBXINERAMA_LICENSE_FILES = COPYING +XLIB_LIBXINERAMA_INSTALL_STAGING = YES +XLIB_LIBXINERAMA_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_xineramaproto +XLIB_LIBXINERAMA_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXmu/Config.in b/package/x11r7/xlib_libXmu/Config.in new file mode 100644 index 0000000000..ed239dc11c --- /dev/null +++ b/package/x11r7/xlib_libXmu/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXMU + bool "libXmu" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xmu library diff --git a/package/x11r7/xlib_libXmu/xlib_libXmu.hash b/package/x11r7/xlib_libXmu/xlib_libXmu.hash new file mode 100644 index 0000000000..2c96d960b4 --- /dev/null +++ b/package/x11r7/xlib_libXmu/xlib_libXmu.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/xorg/2013-September/056009.html +sha256 756edc7c383254eef8b4e1b733c3bf1dc061b523c9f9833ac7058378b8349d0b libXmu-1.1.2.tar.bz2 diff --git a/package/x11r7/xlib_libXmu/xlib_libXmu.mk b/package/x11r7/xlib_libXmu/xlib_libXmu.mk new file mode 100644 index 0000000000..261f871387 --- /dev/null +++ b/package/x11r7/xlib_libXmu/xlib_libXmu.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_libXmu +# +################################################################################ + +XLIB_LIBXMU_VERSION = 1.1.2 +XLIB_LIBXMU_SOURCE = libXmu-$(XLIB_LIBXMU_VERSION).tar.bz2 +XLIB_LIBXMU_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXMU_LICENSE = MIT +XLIB_LIBXMU_LICENSE_FILES = COPYING +XLIB_LIBXMU_INSTALL_STAGING = YES +XLIB_LIBXMU_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXt xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXpm/0001-fork-check.patch b/package/x11r7/xlib_libXpm/0001-fork-check.patch new file mode 100644 index 0000000000..fb4fb7d133 --- /dev/null +++ b/package/x11r7/xlib_libXpm/0001-fork-check.patch @@ -0,0 +1,21 @@ +Allow usage when fork() is not available + +When fork() is not available, we need to define NO_ZPIPE so that +libXpm doesn't try to fork/exec to use a pipe to uncompress compressed +.xpm files. There is obviously a loss of functionality, but loading +uncompressed .xpm files should continue to work. + +Signed-off-by: Thomas Petazzoni + +Index: b/configure.ac +=================================================================== +--- a/configure.ac ++++ b/configure.ac +@@ -22,6 +22,7 @@ + + # Checks for library functions + AC_CHECK_FUNCS([strlcat]) ++AC_CHECK_FUNC([fork],[], AC_DEFINE(NO_ZPIPE)) + + # Obtain compiler/linker options for dependencies + PKG_CHECK_MODULES(XPM, xproto x11) diff --git a/package/x11r7/xlib_libXpm/Config.in b/package/x11r7/xlib_libXpm/Config.in new file mode 100644 index 0000000000..528498cb43 --- /dev/null +++ b/package/x11r7/xlib_libXpm/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXPM + bool "libXpm" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xpm library diff --git a/package/x11r7/xlib_libXpm/xlib_libXpm.hash b/package/x11r7/xlib_libXpm/xlib_libXpm.hash new file mode 100644 index 0000000000..22c9fc62fa --- /dev/null +++ b/package/x11r7/xlib_libXpm/xlib_libXpm.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/xorg/2013-September/056010.html +sha256 c5bdafa51d1ae30086fac01ab83be8d47fe117b238d3437f8e965434090e041c libXpm-3.5.11.tar.bz2 diff --git a/package/x11r7/xlib_libXpm/xlib_libXpm.mk b/package/x11r7/xlib_libXpm/xlib_libXpm.mk new file mode 100644 index 0000000000..997ef958e9 --- /dev/null +++ b/package/x11r7/xlib_libXpm/xlib_libXpm.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# xlib_libXpm +# +################################################################################ + +XLIB_LIBXPM_VERSION = 3.5.11 +XLIB_LIBXPM_SOURCE = libXpm-$(XLIB_LIBXPM_VERSION).tar.bz2 +XLIB_LIBXPM_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXPM_LICENSE = MIT +XLIB_LIBXPM_LICENSE_FILES = COPYING +XLIB_LIBXPM_INSTALL_STAGING = YES +# we patch configure.ac +XLIB_LIBXPM_AUTORECONF = YES +XLIB_LIBXPM_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXt xproto_xproto \ + $(if $(BR2_PACKAGE_GETTEXT),gettext) \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) \ + host-gettext + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXrandr/Config.in b/package/x11r7/xlib_libXrandr/Config.in new file mode 100644 index 0000000000..3b3ebd5790 --- /dev/null +++ b/package/x11r7/xlib_libXrandr/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XLIB_LIBXRANDR + bool "libXrandr" + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xrandr library diff --git a/package/x11r7/xlib_libXrandr/xlib_libXrandr.hash b/package/x11r7/xlib_libXrandr/xlib_libXrandr.hash new file mode 100644 index 0000000000..e4b86a0120 --- /dev/null +++ b/package/x11r7/xlib_libXrandr/xlib_libXrandr.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-May/002606.html +sha256 6f864959b7fc35db11754b270d71106ef5b5cf363426aa58589cb8ac8266de58 libXrandr-1.5.0.tar.bz2 diff --git a/package/x11r7/xlib_libXrandr/xlib_libXrandr.mk b/package/x11r7/xlib_libXrandr/xlib_libXrandr.mk new file mode 100644 index 0000000000..5abd8b1d24 --- /dev/null +++ b/package/x11r7/xlib_libXrandr/xlib_libXrandr.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXrandr +# +################################################################################ + +XLIB_LIBXRANDR_VERSION = 1.5.0 +XLIB_LIBXRANDR_SOURCE = libXrandr-$(XLIB_LIBXRANDR_VERSION).tar.bz2 +XLIB_LIBXRANDR_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXRANDR_LICENSE = MIT +XLIB_LIBXRANDR_LICENSE_FILES = COPYING +XLIB_LIBXRANDR_INSTALL_STAGING = YES +XLIB_LIBXRANDR_DEPENDENCIES = xproto_randrproto xlib_libX11 xlib_libXext xlib_libXrender xproto_renderproto xproto_xproto +XLIB_LIBXRANDR_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXrender/Config.in b/package/x11r7/xlib_libXrender/Config.in new file mode 100644 index 0000000000..c723e4df46 --- /dev/null +++ b/package/x11r7/xlib_libXrender/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBXRENDER + bool "libXrender" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xrender library diff --git a/package/x11r7/xlib_libXrender/xlib_libXrender.hash b/package/x11r7/xlib_libXrender/xlib_libXrender.hash new file mode 100644 index 0000000000..2a9912af74 --- /dev/null +++ b/package/x11r7/xlib_libXrender/xlib_libXrender.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002593.html +sha256 fc2fe57980a14092426dffcd1f2d9de0987b9d40adea663bd70d6342c0e9be1a libXrender-0.9.9.tar.bz2 diff --git a/package/x11r7/xlib_libXrender/xlib_libXrender.mk b/package/x11r7/xlib_libXrender/xlib_libXrender.mk new file mode 100644 index 0000000000..949dea3f14 --- /dev/null +++ b/package/x11r7/xlib_libXrender/xlib_libXrender.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xlib_libXrender +# +################################################################################ + +XLIB_LIBXRENDER_VERSION = 0.9.9 +XLIB_LIBXRENDER_SOURCE = libXrender-$(XLIB_LIBXRENDER_VERSION).tar.bz2 +XLIB_LIBXRENDER_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXRENDER_LICENSE = MIT +XLIB_LIBXRENDER_LICENSE_FILES = COPYING +XLIB_LIBXRENDER_INSTALL_STAGING = YES +XLIB_LIBXRENDER_DEPENDENCIES = xlib_libX11 xproto_renderproto xproto_xproto +XLIB_LIBXRENDER_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libXres/Config.in b/package/x11r7/xlib_libXres/Config.in new file mode 100644 index 0000000000..39abbbfd33 --- /dev/null +++ b/package/x11r7/xlib_libXres/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXRES + bool "libXres" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XPROTO_RESOURCEPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org XRes library diff --git a/package/x11r7/xlib_libXres/xlib_libXres.hash b/package/x11r7/xlib_libXres/xlib_libXres.hash new file mode 100644 index 0000000000..063df8e954 --- /dev/null +++ b/package/x11r7/xlib_libXres/xlib_libXres.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-May/002233.html +sha256 26899054aa87f81b17becc68e8645b240f140464cf90c42616ebb263ec5fa0e5 libXres-1.0.7.tar.bz2 diff --git a/package/x11r7/xlib_libXres/xlib_libXres.mk b/package/x11r7/xlib_libXres/xlib_libXres.mk new file mode 100644 index 0000000000..853f54205e --- /dev/null +++ b/package/x11r7/xlib_libXres/xlib_libXres.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXres +# +################################################################################ + +XLIB_LIBXRES_VERSION = 1.0.7 +XLIB_LIBXRES_SOURCE = libXres-$(XLIB_LIBXRES_VERSION).tar.bz2 +XLIB_LIBXRES_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXRES_LICENSE = MIT +XLIB_LIBXRES_LICENSE_FILES = COPYING +XLIB_LIBXRES_INSTALL_STAGING = YES +XLIB_LIBXRES_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_resourceproto xproto_xproto +XLIB_LIBXRES_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXt/0001-util-don-t-link-makestrs-with-target-cflags.patch b/package/x11r7/xlib_libXt/0001-util-don-t-link-makestrs-with-target-cflags.patch new file mode 100644 index 0000000000..ccc684fc73 --- /dev/null +++ b/package/x11r7/xlib_libXt/0001-util-don-t-link-makestrs-with-target-cflags.patch @@ -0,0 +1,33 @@ +From 3f064076c783914cafdff028db303681dae4291d Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Thu, 15 Nov 2012 18:31:53 +0100 +Subject: [PATCH] libXt: util: don't link makestrs with target cflags + +The line: + +AM_CFLAGS = $(XT_CFLAGS) + +in util/Makefile.am is wrong because it adds target cflags to the +compilation of makestrs, which is built for the build machine, which +leads to build failures when cross-compiling. + +Signed-off-by: Thomas Petazzoni +--- + util/Makefile.am | 1 - + util/makestrs.c | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/util/Makefile.am b/util/Makefile.am +index dedfa6b..cc6f3fc 100644 +--- a/util/Makefile.am ++++ b/util/Makefile.am +@@ -10,7 +10,6 @@ EXTRA_DIST = \ + StrDefs.ht \ + string.list + +-AM_CFLAGS = $(XT_CFLAGS) + makestrs_SOURCES = makestrs.c + + +-- +1.7.9.5 diff --git a/package/x11r7/xlib_libXt/Config.in b/package/x11r7/xlib_libXt/Config.in new file mode 100644 index 0000000000..6557e20bcd --- /dev/null +++ b/package/x11r7/xlib_libXt/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XLIB_LIBXT + bool "libXt" + select BR2_PACKAGE_XLIB_LIBSM + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XPROTO_KBPROTO + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_XCB_PROTO + select BR2_PACKAGE_LIBXCB + help + X.Org Xt library diff --git a/package/x11r7/xlib_libXt/xlib_libXt.hash b/package/x11r7/xlib_libXt/xlib_libXt.hash new file mode 100644 index 0000000000..751c370986 --- /dev/null +++ b/package/x11r7/xlib_libXt/xlib_libXt.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002594.html +sha256 46eeb6be780211fdd98c5109286618f6707712235fdd19df4ce1e6954f349f1a libXt-1.1.5.tar.bz2 diff --git a/package/x11r7/xlib_libXt/xlib_libXt.mk b/package/x11r7/xlib_libXt/xlib_libXt.mk new file mode 100644 index 0000000000..4715ac642f --- /dev/null +++ b/package/x11r7/xlib_libXt/xlib_libXt.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xlib_libXt +# +################################################################################ + +XLIB_LIBXT_VERSION = 1.1.5 +XLIB_LIBXT_SOURCE = libXt-$(XLIB_LIBXT_VERSION).tar.bz2 +XLIB_LIBXT_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXT_LICENSE = MIT +XLIB_LIBXT_LICENSE_FILES = COPYING +XLIB_LIBXT_INSTALL_STAGING = YES +XLIB_LIBXT_DEPENDENCIES = xlib_libSM xlib_libX11 xproto_kbproto xproto_xproto xcb-proto libxcb host-xproto_xproto +XLIB_LIBXT_CONF_OPTS = --disable-malloc0returnsnull --disable-install-makestrs +XLIB_LIBXT_AUTORECONF = YES + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXtst/Config.in b/package/x11r7/xlib_libXtst/Config.in new file mode 100644 index 0000000000..8853bde8d4 --- /dev/null +++ b/package/x11r7/xlib_libXtst/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXTST + bool "libXtst" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXI + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XPROTO_RECORDPROTO + help + X.Org Xtst library diff --git a/package/x11r7/xlib_libXtst/xlib_libXtst.hash b/package/x11r7/xlib_libXtst/xlib_libXtst.hash new file mode 100644 index 0000000000..4224121380 --- /dev/null +++ b/package/x11r7/xlib_libXtst/xlib_libXtst.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-May/002237.html +sha256 ef0a7ffd577e5f1a25b1663b375679529663a1880151beaa73e9186c8309f6d9 libXtst-1.2.2.tar.bz2 diff --git a/package/x11r7/xlib_libXtst/xlib_libXtst.mk b/package/x11r7/xlib_libXtst/xlib_libXtst.mk new file mode 100644 index 0000000000..ad3caeafc5 --- /dev/null +++ b/package/x11r7/xlib_libXtst/xlib_libXtst.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# xlib_libXtst +# +################################################################################ + +XLIB_LIBXTST_VERSION = 1.2.2 +XLIB_LIBXTST_SOURCE = libXtst-$(XLIB_LIBXTST_VERSION).tar.bz2 +XLIB_LIBXTST_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXTST_LICENSE = MIT +XLIB_LIBXTST_LICENSE_FILES = COPYING +XLIB_LIBXTST_INSTALL_STAGING = YES + +XLIB_LIBXTST_DEPENDENCIES = \ + xlib_libX11 \ + xlib_libXext \ + xlib_libXi \ + xproto_recordproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXv/Config.in b/package/x11r7/xlib_libXv/Config.in new file mode 100644 index 0000000000..90f07f34be --- /dev/null +++ b/package/x11r7/xlib_libXv/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXV + bool "libXv" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xv library diff --git a/package/x11r7/xlib_libXv/xlib_libXv.hash b/package/x11r7/xlib_libXv/xlib_libXv.hash new file mode 100644 index 0000000000..3a54cb3751 --- /dev/null +++ b/package/x11r7/xlib_libXv/xlib_libXv.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/xorg/2013-September/056012.html +sha256 55fe92f8686ce8612e2c1bfaf58c057715534419da700bda8d517b1d97914525 libXv-1.0.10.tar.bz2 diff --git a/package/x11r7/xlib_libXv/xlib_libXv.mk b/package/x11r7/xlib_libXv/xlib_libXv.mk new file mode 100644 index 0000000000..ef5c74696f --- /dev/null +++ b/package/x11r7/xlib_libXv/xlib_libXv.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXv +# +################################################################################ + +XLIB_LIBXV_VERSION = 1.0.10 +XLIB_LIBXV_SOURCE = libXv-$(XLIB_LIBXV_VERSION).tar.bz2 +XLIB_LIBXV_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXV_LICENSE = MIT +XLIB_LIBXV_LICENSE_FILES = COPYING +XLIB_LIBXV_INSTALL_STAGING = YES +XLIB_LIBXV_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_videoproto xproto_xproto +XLIB_LIBXV_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXvMC/Config.in b/package/x11r7/xlib_libXvMC/Config.in new file mode 100644 index 0000000000..90c0e74e45 --- /dev/null +++ b/package/x11r7/xlib_libXvMC/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XLIB_LIBXVMC + bool "libXvMC" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXV + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org XvMC library diff --git a/package/x11r7/xlib_libXvMC/xlib_libXvMC.hash b/package/x11r7/xlib_libXvMC/xlib_libXvMC.hash new file mode 100644 index 0000000000..f0fcd2ddf8 --- /dev/null +++ b/package/x11r7/xlib_libXvMC/xlib_libXvMC.hash @@ -0,0 +1,3 @@ +# From http://lists.x.org/archives/xorg-announce/2015-March/002548.html +sha1 6fc54831734e781b2848b6f7e3bcc4f752665f21 libXvMC-1.0.9.tar.bz2 +sha256 0703d7dff6ffc184f1735ca5d4eb9dbb402b522e08e008f2f96aee16c40a5756 libXvMC-1.0.9.tar.bz2 diff --git a/package/x11r7/xlib_libXvMC/xlib_libXvMC.mk b/package/x11r7/xlib_libXvMC/xlib_libXvMC.mk new file mode 100644 index 0000000000..101c15d2e9 --- /dev/null +++ b/package/x11r7/xlib_libXvMC/xlib_libXvMC.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXvMC +# +################################################################################ + +XLIB_LIBXVMC_VERSION = 1.0.9 +XLIB_LIBXVMC_SOURCE = libXvMC-$(XLIB_LIBXVMC_VERSION).tar.bz2 +XLIB_LIBXVMC_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXVMC_LICENSE = MIT +XLIB_LIBXVMC_LICENSE_FILES = COPYING +XLIB_LIBXVMC_INSTALL_STAGING = YES +XLIB_LIBXVMC_DEPENDENCIES = xlib_libX11 xlib_libXext xlib_libXv xproto_videoproto xproto_xproto +XLIB_LIBXVMC_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXxf86dga/Config.in b/package/x11r7/xlib_libXxf86dga/Config.in new file mode 100644 index 0000000000..5e21502cda --- /dev/null +++ b/package/x11r7/xlib_libXxf86dga/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXXF86DGA + bool "libXxf86dga" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XPROTO_XF86DGAPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xxf86dga library diff --git a/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.hash b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.hash new file mode 100644 index 0000000000..29560b7e8d --- /dev/null +++ b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2013-May/002235.html +sha256 8eecd4b6c1df9a3704c04733c2f4fa93ef469b55028af5510b25818e2456c77e libXxf86dga-1.1.4.tar.bz2 diff --git a/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.mk b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.mk new file mode 100644 index 0000000000..eea756bdb2 --- /dev/null +++ b/package/x11r7/xlib_libXxf86dga/xlib_libXxf86dga.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXxf86dga +# +################################################################################ + +XLIB_LIBXXF86DGA_VERSION = 1.1.4 +XLIB_LIBXXF86DGA_SOURCE = libXxf86dga-$(XLIB_LIBXXF86DGA_VERSION).tar.bz2 +XLIB_LIBXXF86DGA_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXXF86DGA_LICENSE = MIT +XLIB_LIBXXF86DGA_LICENSE_FILES = COPYING +XLIB_LIBXXF86DGA_INSTALL_STAGING = YES +XLIB_LIBXXF86DGA_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_xf86dgaproto xproto_xproto +XLIB_LIBXXF86DGA_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libXxf86vm/Config.in b/package/x11r7/xlib_libXxf86vm/Config.in new file mode 100644 index 0000000000..9e32188ec8 --- /dev/null +++ b/package/x11r7/xlib_libXxf86vm/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XLIB_LIBXXF86VM + bool "libXxf86vm" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org Xxf86vm library diff --git a/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.hash b/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.hash new file mode 100644 index 0000000000..cece6b56d0 --- /dev/null +++ b/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.hash @@ -0,0 +1,3 @@ +# From http://lists.x.org/archives/xorg-announce/2015-February/002539.html +sha1 78ef18ca2be157131899e01c62679e247409a13f libXxf86vm-1.1.4.tar.bz2 +sha256 afee27f93c5f31c0ad582852c0fb36d50e4de7cd585fcf655e278a633d85cd57 libXxf86vm-1.1.4.tar.bz2 diff --git a/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.mk b/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.mk new file mode 100644 index 0000000000..f650fe4e2a --- /dev/null +++ b/package/x11r7/xlib_libXxf86vm/xlib_libXxf86vm.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libXxf86vm +# +################################################################################ + +XLIB_LIBXXF86VM_VERSION = 1.1.4 +XLIB_LIBXXF86VM_SOURCE = libXxf86vm-$(XLIB_LIBXXF86VM_VERSION).tar.bz2 +XLIB_LIBXXF86VM_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXXF86VM_LICENSE = MIT +XLIB_LIBXXF86VM_LICENSE_FILES = COPYING +XLIB_LIBXXF86VM_INSTALL_STAGING = YES +XLIB_LIBXXF86VM_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_xf86vidmodeproto xproto_xproto +XLIB_LIBXXF86VM_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libdmx/Config.in b/package/x11r7/xlib_libdmx/Config.in new file mode 100644 index 0000000000..879f6895c3 --- /dev/null +++ b/package/x11r7/xlib_libdmx/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XLIB_LIBDMX + bool "libdmx" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XPROTO_DMXPROTO + help + X.Org dmx library diff --git a/package/x11r7/xlib_libdmx/xlib_libdmx.hash b/package/x11r7/xlib_libdmx/xlib_libdmx.hash new file mode 100644 index 0000000000..9f715359be --- /dev/null +++ b/package/x11r7/xlib_libdmx/xlib_libdmx.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/xorg-announce/2013-May/002225.html +sha256 c97da36d2e56a2d7b6e4f896241785acc95e97eb9557465fd66ba2a155a7b201 libdmx-1.1.3.tar.bz2 diff --git a/package/x11r7/xlib_libdmx/xlib_libdmx.mk b/package/x11r7/xlib_libdmx/xlib_libdmx.mk new file mode 100644 index 0000000000..fbe3067fe1 --- /dev/null +++ b/package/x11r7/xlib_libdmx/xlib_libdmx.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libdmx +# +################################################################################ + +XLIB_LIBDMX_VERSION = 1.1.3 +XLIB_LIBDMX_SOURCE = libdmx-$(XLIB_LIBDMX_VERSION).tar.bz2 +XLIB_LIBDMX_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBDMX_LICENSE = MIT +XLIB_LIBDMX_LICENSE_FILES = COPYING +XLIB_LIBDMX_INSTALL_STAGING = YES +XLIB_LIBDMX_DEPENDENCIES = xlib_libX11 xlib_libXext xproto_dmxproto +XLIB_LIBDMX_CONF_OPTS = --disable-malloc0returnsnull + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_libfontenc/Config.in b/package/x11r7/xlib_libfontenc/Config.in new file mode 100644 index 0000000000..d25e96a5a5 --- /dev/null +++ b/package/x11r7/xlib_libfontenc/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBFONTENC + bool "libfontenc" + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_ZLIB + help + X.Org fontenc library diff --git a/package/x11r7/xlib_libfontenc/xlib_libfontenc.hash b/package/x11r7/xlib_libfontenc/xlib_libfontenc.hash new file mode 100644 index 0000000000..251a1d686f --- /dev/null +++ b/package/x11r7/xlib_libfontenc/xlib_libfontenc.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002589.html +sha256 70588930e6fc9542ff38e0884778fbc6e6febf21adbab92fd8f524fe60aefd21 libfontenc-1.1.3.tar.bz2 diff --git a/package/x11r7/xlib_libfontenc/xlib_libfontenc.mk b/package/x11r7/xlib_libfontenc/xlib_libfontenc.mk new file mode 100644 index 0000000000..aff1f1a5d9 --- /dev/null +++ b/package/x11r7/xlib_libfontenc/xlib_libfontenc.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libfontenc +# +################################################################################ + +XLIB_LIBFONTENC_VERSION = 1.1.3 +XLIB_LIBFONTENC_SOURCE = libfontenc-$(XLIB_LIBFONTENC_VERSION).tar.bz2 +XLIB_LIBFONTENC_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBFONTENC_LICENSE = MIT +XLIB_LIBFONTENC_LICENSE_FILES = COPYING +XLIB_LIBFONTENC_INSTALL_STAGING = YES +XLIB_LIBFONTENC_DEPENDENCIES = zlib xproto_xproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libxkbfile/Config.in b/package/x11r7/xlib_libxkbfile/Config.in new file mode 100644 index 0000000000..ccd35fa10f --- /dev/null +++ b/package/x11r7/xlib_libxkbfile/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XLIB_LIBXKBFILE + bool "libxkbfile" + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XPROTO_KBPROTO + help + X.Org xkbfile library diff --git a/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.hash b/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.hash new file mode 100644 index 0000000000..759b2aef83 --- /dev/null +++ b/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002592.html +sha256 51817e0530961975d9513b773960b4edd275f7d5c72293d5a151ed4f42aeb16a libxkbfile-1.0.9.tar.bz2 diff --git a/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk b/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk new file mode 100644 index 0000000000..51c58c04a0 --- /dev/null +++ b/package/x11r7/xlib_libxkbfile/xlib_libxkbfile.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xlib_libxkbfile +# +################################################################################ + +XLIB_LIBXKBFILE_VERSION = 1.0.9 +XLIB_LIBXKBFILE_SOURCE = libxkbfile-$(XLIB_LIBXKBFILE_VERSION).tar.bz2 +XLIB_LIBXKBFILE_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXKBFILE_LICENSE = MIT +XLIB_LIBXKBFILE_LICENSE_FILES = COPYING +XLIB_LIBXKBFILE_INSTALL_STAGING = YES +XLIB_LIBXKBFILE_DEPENDENCIES = xlib_libX11 xproto_kbproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xlib_libxshmfence/Config.in b/package/x11r7/xlib_libxshmfence/Config.in new file mode 100644 index 0000000000..d0595f6d67 --- /dev/null +++ b/package/x11r7/xlib_libxshmfence/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XLIB_LIBXSHMFENCE + bool "libxshmfence" + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org shmfence library diff --git a/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.hash b/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.hash new file mode 100644 index 0000000000..05eb07111b --- /dev/null +++ b/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-January/002515.html +sha256 d21b2d1fd78c1efbe1f2c16dae1cb23f8fd231dcf891465b8debe636a9054b0c libxshmfence-1.2.tar.bz2 diff --git a/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.mk b/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.mk new file mode 100644 index 0000000000..3a2f32623a --- /dev/null +++ b/package/x11r7/xlib_libxshmfence/xlib_libxshmfence.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_libxshmfence +# +################################################################################ + +XLIB_LIBXSHMFENCE_VERSION = 1.2 +XLIB_LIBXSHMFENCE_SOURCE = libxshmfence-$(XLIB_LIBXSHMFENCE_VERSION).tar.bz2 +XLIB_LIBXSHMFENCE_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_LIBXSHMFENCE_LICENSE = MIT +XLIB_LIBXSHMFENCE_LICENSE_FILES = COPYING +XLIB_LIBXSHMFENCE_INSTALL_STAGING = YES +XLIB_LIBXSHMFENCE_DEPENDENCIES = host-pkgconf xproto_xproto + +$(eval $(autotools-package)) diff --git a/package/x11r7/xlib_xtrans/Config.in b/package/x11r7/xlib_xtrans/Config.in new file mode 100644 index 0000000000..7c8bae7912 --- /dev/null +++ b/package/x11r7/xlib_xtrans/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XLIB_XTRANS + bool "xtrans" + help + X.Org xtrans library diff --git a/package/x11r7/xlib_xtrans/xlib_xtrans.hash b/package/x11r7/xlib_xtrans/xlib_xtrans.hash new file mode 100644 index 0000000000..26c69a0c83 --- /dev/null +++ b/package/x11r7/xlib_xtrans/xlib_xtrans.hash @@ -0,0 +1,3 @@ +# From http://lists.x.org/archives/xorg-announce/2014-September/002481.html +sha1 2d3ae1839d841f568bc481c6116af7d2a9f9ba59 xtrans-1.3.5.tar.bz2 +sha256 adbd3b36932ce4c062cd10f57d78a156ba98d618bdb6f50664da327502bc8301 xtrans-1.3.5.tar.bz2 diff --git a/package/x11r7/xlib_xtrans/xlib_xtrans.mk b/package/x11r7/xlib_xtrans/xlib_xtrans.mk new file mode 100644 index 0000000000..40f613cc35 --- /dev/null +++ b/package/x11r7/xlib_xtrans/xlib_xtrans.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xlib_xtrans +# +################################################################################ + +XLIB_XTRANS_VERSION = 1.3.5 +XLIB_XTRANS_SOURCE = xtrans-$(XLIB_XTRANS_VERSION).tar.bz2 +XLIB_XTRANS_SITE = http://xorg.freedesktop.org/releases/individual/lib +XLIB_XTRANS_LICENSE = MIT +XLIB_XTRANS_LICENSE_FILES = COPYING +XLIB_XTRANS_INSTALL_STAGING = YES + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_applewmproto/Config.in b/package/x11r7/xproto_applewmproto/Config.in new file mode 100644 index 0000000000..51a5fd5ce6 --- /dev/null +++ b/package/x11r7/xproto_applewmproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_APPLEWMPROTO + bool "applewmproto" + help + No description available diff --git a/package/x11r7/xproto_applewmproto/xproto_applewmproto.hash b/package/x11r7/xproto_applewmproto/xproto_applewmproto.hash new file mode 100644 index 0000000000..695de3cd14 --- /dev/null +++ b/package/x11r7/xproto_applewmproto/xproto_applewmproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/1371 +md5 c1d50749c3ac5215a1a9425818e856c1 applewmproto-1.4.2.tar.bz2 +sha1 71dd2374e745a7db7ae0e94410e55ba721683d10 applewmproto-1.4.2.tar.bz2 diff --git a/package/x11r7/xproto_applewmproto/xproto_applewmproto.mk b/package/x11r7/xproto_applewmproto/xproto_applewmproto.mk new file mode 100644 index 0000000000..998d0aa33b --- /dev/null +++ b/package/x11r7/xproto_applewmproto/xproto_applewmproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_applewmproto +# +################################################################################ + +XPROTO_APPLEWMPROTO_VERSION = 1.4.2 +XPROTO_APPLEWMPROTO_SOURCE = applewmproto-$(XPROTO_APPLEWMPROTO_VERSION).tar.bz2 +XPROTO_APPLEWMPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_APPLEWMPROTO_LICENSE = MIT +XPROTO_APPLEWMPROTO_LICENSE_FILES = COPYING +XPROTO_APPLEWMPROTO_INSTALL_STAGING = YES +XPROTO_APPLEWMPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_bigreqsproto/Config.in b/package/x11r7/xproto_bigreqsproto/Config.in new file mode 100644 index 0000000000..c431ef2bbb --- /dev/null +++ b/package/x11r7/xproto_bigreqsproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_BIGREQSPROTO + bool "bigreqsproto" + help + X.Org BigReqs protocol headers diff --git a/package/x11r7/xproto_bigreqsproto/xproto_bigreqsproto.hash b/package/x11r7/xproto_bigreqsproto/xproto_bigreqsproto.hash new file mode 100644 index 0000000000..7d70dca8cc --- /dev/null +++ b/package/x11r7/xproto_bigreqsproto/xproto_bigreqsproto.hash @@ -0,0 +1,2 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 462116ab44e41d8121bfde947321950370b285a5316612b8fce8334d50751b1e bigreqsproto-1.1.2.tar.bz2 diff --git a/package/x11r7/xproto_bigreqsproto/xproto_bigreqsproto.mk b/package/x11r7/xproto_bigreqsproto/xproto_bigreqsproto.mk new file mode 100644 index 0000000000..bca5a3cdfd --- /dev/null +++ b/package/x11r7/xproto_bigreqsproto/xproto_bigreqsproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_bigreqsproto +# +################################################################################ + +XPROTO_BIGREQSPROTO_VERSION = 1.1.2 +XPROTO_BIGREQSPROTO_SOURCE = bigreqsproto-$(XPROTO_BIGREQSPROTO_VERSION).tar.bz2 +XPROTO_BIGREQSPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_BIGREQSPROTO_LICENSE = MIT +XPROTO_BIGREQSPROTO_LICENSE_FILES = COPYING +XPROTO_BIGREQSPROTO_INSTALL_STAGING = YES +XPROTO_BIGREQSPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_compositeproto/Config.in b/package/x11r7/xproto_compositeproto/Config.in new file mode 100644 index 0000000000..136900a07d --- /dev/null +++ b/package/x11r7/xproto_compositeproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_COMPOSITEPROTO + bool "compositeproto" + help + X.Org Composite protocol headers diff --git a/package/x11r7/xproto_compositeproto/xproto_compositeproto.hash b/package/x11r7/xproto_compositeproto/xproto_compositeproto.hash new file mode 100644 index 0000000000..c6ef73c213 --- /dev/null +++ b/package/x11r7/xproto_compositeproto/xproto_compositeproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/1193 +md5 98482f65ba1e74a08bf5b056a4031ef0 compositeproto-0.4.2.tar.bz2 +sha1 aa7b5abcfd5bbfad7cb681ce89dc1d6e381e3044 compositeproto-0.4.2.tar.bz2 diff --git a/package/x11r7/xproto_compositeproto/xproto_compositeproto.mk b/package/x11r7/xproto_compositeproto/xproto_compositeproto.mk new file mode 100644 index 0000000000..21613582ec --- /dev/null +++ b/package/x11r7/xproto_compositeproto/xproto_compositeproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_compositeproto +# +################################################################################ + +XPROTO_COMPOSITEPROTO_VERSION = 0.4.2 +XPROTO_COMPOSITEPROTO_SOURCE = compositeproto-$(XPROTO_COMPOSITEPROTO_VERSION).tar.bz2 +XPROTO_COMPOSITEPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_COMPOSITEPROTO_LICENSE = MIT +XPROTO_COMPOSITEPROTO_LICENSE_FILES = COPYING +XPROTO_COMPOSITEPROTO_INSTALL_STAGING = YES +XPROTO_COMPOSITEPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_damageproto/Config.in b/package/x11r7/xproto_damageproto/Config.in new file mode 100644 index 0000000000..068ed2b406 --- /dev/null +++ b/package/x11r7/xproto_damageproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_DAMAGEPROTO + bool "damageproto" + help + X.Org Damage protocol headers diff --git a/package/x11r7/xproto_damageproto/xproto_damageproto.hash b/package/x11r7/xproto_damageproto/xproto_damageproto.hash new file mode 100644 index 0000000000..e5064b62a5 --- /dev/null +++ b/package/x11r7/xproto_damageproto/xproto_damageproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/1194 +md5 998e5904764b82642cc63d97b4ba9e95 damageproto-1.2.1.tar.bz2 +sha1 bd0f0f4dc8f37eaabd9279d10fe2889710507358 damageproto-1.2.1.tar.bz2 diff --git a/package/x11r7/xproto_damageproto/xproto_damageproto.mk b/package/x11r7/xproto_damageproto/xproto_damageproto.mk new file mode 100644 index 0000000000..0311ea4901 --- /dev/null +++ b/package/x11r7/xproto_damageproto/xproto_damageproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_damageproto +# +################################################################################ + +XPROTO_DAMAGEPROTO_VERSION = 1.2.1 +XPROTO_DAMAGEPROTO_SOURCE = damageproto-$(XPROTO_DAMAGEPROTO_VERSION).tar.bz2 +XPROTO_DAMAGEPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_DAMAGEPROTO_LICENSE = MIT +XPROTO_DAMAGEPROTO_LICENSE_FILES = COPYING +XPROTO_DAMAGEPROTO_INSTALL_STAGING = YES +XPROTO_DAMAGEPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_dmxproto/Config.in b/package/x11r7/xproto_dmxproto/Config.in new file mode 100644 index 0000000000..dc048b1fd1 --- /dev/null +++ b/package/x11r7/xproto_dmxproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_DMXPROTO + bool "dmxproto" + help + X.Org DMX protocol headers diff --git a/package/x11r7/xproto_dmxproto/xproto_dmxproto.hash b/package/x11r7/xproto_dmxproto/xproto_dmxproto.hash new file mode 100644 index 0000000000..041f580e47 --- /dev/null +++ b/package/x11r7/xproto_dmxproto/xproto_dmxproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/1306 +md5 4ee175bbd44d05c34d43bb129be5098a dmxproto-2.3.1.tar.bz2 +sha1 3b8b273b8ef3d8dbab998df9ec1dddf99edf4d91 dmxproto-2.3.1.tar.bz2 diff --git a/package/x11r7/xproto_dmxproto/xproto_dmxproto.mk b/package/x11r7/xproto_dmxproto/xproto_dmxproto.mk new file mode 100644 index 0000000000..4cc795c212 --- /dev/null +++ b/package/x11r7/xproto_dmxproto/xproto_dmxproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_dmxproto +# +################################################################################ + +XPROTO_DMXPROTO_VERSION = 2.3.1 +XPROTO_DMXPROTO_SOURCE = dmxproto-$(XPROTO_DMXPROTO_VERSION).tar.bz2 +XPROTO_DMXPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_DMXPROTO_LICENSE = MIT +XPROTO_DMXPROTO_LICENSE_FILES = COPYING +XPROTO_DMXPROTO_INSTALL_STAGING = YES +XPROTO_DMXPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_dri2proto/Config.in b/package/x11r7/xproto_dri2proto/Config.in new file mode 100644 index 0000000000..3fe5aa1ad1 --- /dev/null +++ b/package/x11r7/xproto_dri2proto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_DRI2PROTO + bool "dri2proto" + help + X.Org DRI2 protocol headers diff --git a/package/x11r7/xproto_dri2proto/xproto_dri2proto.hash b/package/x11r7/xproto_dri2proto/xproto_dri2proto.hash new file mode 100644 index 0000000000..e3ea0bc1e9 --- /dev/null +++ b/package/x11r7/xproto_dri2proto/xproto_dri2proto.hash @@ -0,0 +1,2 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/1731 +sha256 f9b55476def44fc7c459b2537d17dbc731e36ed5d416af7ca0b1e2e676f8aa04 dri2proto-2.8.tar.bz2 diff --git a/package/x11r7/xproto_dri2proto/xproto_dri2proto.mk b/package/x11r7/xproto_dri2proto/xproto_dri2proto.mk new file mode 100644 index 0000000000..e4ed7d8bf8 --- /dev/null +++ b/package/x11r7/xproto_dri2proto/xproto_dri2proto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_dri2proto +# +################################################################################ + +XPROTO_DRI2PROTO_VERSION = 2.8 +XPROTO_DRI2PROTO_SOURCE = dri2proto-$(XPROTO_DRI2PROTO_VERSION).tar.bz2 +XPROTO_DRI2PROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_DRI2PROTO_LICENSE = MIT +XPROTO_DRI2PROTO_LICENSE_FILES = COPYING +XPROTO_DRI2PROTO_INSTALL_STAGING = YES +XPROTO_DRI2PROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_dri3proto/Config.in b/package/x11r7/xproto_dri3proto/Config.in new file mode 100644 index 0000000000..eead7d4784 --- /dev/null +++ b/package/x11r7/xproto_dri3proto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_DRI3PROTO + bool "dri3proto" + help + X.Org DRI3 protocol headers diff --git a/package/x11r7/xproto_dri3proto/xproto_dri3proto.hash b/package/x11r7/xproto_dri3proto/xproto_dri3proto.hash new file mode 100644 index 0000000000..6e1da4d3f2 --- /dev/null +++ b/package/x11r7/xproto_dri3proto/xproto_dri3proto.hash @@ -0,0 +1,2 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/2079 +sha256 01be49d70200518b9a6b297131f6cc71f4ea2de17436896af153226a774fc074 dri3proto-1.0.tar.bz2 diff --git a/package/x11r7/xproto_dri3proto/xproto_dri3proto.mk b/package/x11r7/xproto_dri3proto/xproto_dri3proto.mk new file mode 100644 index 0000000000..bdbff74ffc --- /dev/null +++ b/package/x11r7/xproto_dri3proto/xproto_dri3proto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_dri3proto +# +################################################################################ + +XPROTO_DRI3PROTO_VERSION = 1.0 +XPROTO_DRI3PROTO_SOURCE = dri3proto-$(XPROTO_DRI3PROTO_VERSION).tar.bz2 +XPROTO_DRI3PROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_DRI3PROTO_LICENSE = MIT +XPROTO_DRI3PROTO_INSTALL_STAGING = YES +# this package does not contain any binary files +XPROTO_DRI3PROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_fixesproto/Config.in b/package/x11r7/xproto_fixesproto/Config.in new file mode 100644 index 0000000000..d419fa13d1 --- /dev/null +++ b/package/x11r7/xproto_fixesproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_FIXESPROTO + bool "fixesproto" + help + X.Org Fixes protocol headers diff --git a/package/x11r7/xproto_fixesproto/xproto_fixesproto.hash b/package/x11r7/xproto_fixesproto/xproto_fixesproto.hash new file mode 100644 index 0000000000..d19f392442 --- /dev/null +++ b/package/x11r7/xproto_fixesproto/xproto_fixesproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/1352 +md5 e7431ab84d37b2678af71e29355e101d fixesproto-5.0.tar.bz2 +sha1 ab605af5da8c98c0c2f8b2c578fed7c864ee996a fixesproto-5.0.tar.bz2 diff --git a/package/x11r7/xproto_fixesproto/xproto_fixesproto.mk b/package/x11r7/xproto_fixesproto/xproto_fixesproto.mk new file mode 100644 index 0000000000..55212b2678 --- /dev/null +++ b/package/x11r7/xproto_fixesproto/xproto_fixesproto.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xproto_fixesproto +# +################################################################################ + +XPROTO_FIXESPROTO_VERSION = 5.0 +XPROTO_FIXESPROTO_SOURCE = fixesproto-$(XPROTO_FIXESPROTO_VERSION).tar.bz2 +XPROTO_FIXESPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_FIXESPROTO_LICENSE = MIT +XPROTO_FIXESPROTO_LICENSE_FILES = COPYING +XPROTO_FIXESPROTO_INSTALL_STAGING = YES +XPROTO_FIXESPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_fontcacheproto/Config.in b/package/x11r7/xproto_fontcacheproto/Config.in new file mode 100644 index 0000000000..daa6c7f20b --- /dev/null +++ b/package/x11r7/xproto_fontcacheproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_FONTCACHEPROTO + bool "fontcacheproto" + help + X.Org Fontcache protocol headers diff --git a/package/x11r7/xproto_fontcacheproto/xproto_fontcacheproto.hash b/package/x11r7/xproto_fontcacheproto/xproto_fontcacheproto.hash new file mode 100644 index 0000000000..7363e224bb --- /dev/null +++ b/package/x11r7/xproto_fontcacheproto/xproto_fontcacheproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/834 +md5 a8a50e5e995bfacb0359575faf7f6906 fontcacheproto-0.1.3.tar.bz2 +sha1 07f6ab3e1e1efe71c51f50e95851d93d2a1de773 fontcacheproto-0.1.3.tar.bz2 diff --git a/package/x11r7/xproto_fontcacheproto/xproto_fontcacheproto.mk b/package/x11r7/xproto_fontcacheproto/xproto_fontcacheproto.mk new file mode 100644 index 0000000000..0cb205ad59 --- /dev/null +++ b/package/x11r7/xproto_fontcacheproto/xproto_fontcacheproto.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xproto_fontcacheproto +# +################################################################################ + +XPROTO_FONTCACHEPROTO_VERSION = 0.1.3 +XPROTO_FONTCACHEPROTO_SOURCE = fontcacheproto-$(XPROTO_FONTCACHEPROTO_VERSION).tar.bz2 +XPROTO_FONTCACHEPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_FONTCACHEPROTO_LICENSE = MIT +XPROTO_FONTCACHEPROTO_LICENSE_FILES = COPYING +XPROTO_FONTCACHEPROTO_INSTALL_STAGING = YES +XPROTO_FONTCACHEPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_fontsproto/Config.in b/package/x11r7/xproto_fontsproto/Config.in new file mode 100644 index 0000000000..b00220c277 --- /dev/null +++ b/package/x11r7/xproto_fontsproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_FONTSPROTO + bool "fontsproto" + help + X.Org Fonts protocol headers diff --git a/package/x11r7/xproto_fontsproto/xproto_fontsproto.hash b/package/x11r7/xproto_fontsproto/xproto_fontsproto.hash new file mode 100644 index 0000000000..6a21058b91 --- /dev/null +++ b/package/x11r7/xproto_fontsproto/xproto_fontsproto.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/archives/xorg/2014-April/056540.html +sha256 259046b0dd9130825c4a4c479ba3591d6d0f17a33f54e294b56478729a6e5ab8 fontsproto-2.1.3.tar.bz2 diff --git a/package/x11r7/xproto_fontsproto/xproto_fontsproto.mk b/package/x11r7/xproto_fontsproto/xproto_fontsproto.mk new file mode 100644 index 0000000000..b4e6d6a848 --- /dev/null +++ b/package/x11r7/xproto_fontsproto/xproto_fontsproto.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xproto_fontsproto +# +################################################################################ + +XPROTO_FONTSPROTO_VERSION = 2.1.3 +XPROTO_FONTSPROTO_SOURCE = fontsproto-$(XPROTO_FONTSPROTO_VERSION).tar.bz2 +XPROTO_FONTSPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_FONTSPROTO_LICENSE = MIT +XPROTO_FONTSPROTO_LICENSE_FILES = COPYING +XPROTO_FONTSPROTO_INSTALL_STAGING = YES +XPROTO_FONTSPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_glproto/Config.in b/package/x11r7/xproto_glproto/Config.in new file mode 100644 index 0000000000..28ceb9cc80 --- /dev/null +++ b/package/x11r7/xproto_glproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_GLPROTO + bool "glproto" + help + X.Org GL protocol headers diff --git a/package/x11r7/xproto_glproto/xproto_glproto.hash b/package/x11r7/xproto_glproto/xproto_glproto.hash new file mode 100644 index 0000000000..fce6a22222 --- /dev/null +++ b/package/x11r7/xproto_glproto/xproto_glproto.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 adaa94bded310a2bfcbb9deb4d751d965fcfe6fb3a2f6d242e2df2d6589dbe40 glproto-1.4.17.tar.bz2 diff --git a/package/x11r7/xproto_glproto/xproto_glproto.mk b/package/x11r7/xproto_glproto/xproto_glproto.mk new file mode 100644 index 0000000000..ccfc6de666 --- /dev/null +++ b/package/x11r7/xproto_glproto/xproto_glproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_glproto +# +################################################################################ + +XPROTO_GLPROTO_VERSION = 1.4.17 +XPROTO_GLPROTO_SOURCE = glproto-$(XPROTO_GLPROTO_VERSION).tar.bz2 +XPROTO_GLPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_GLPROTO_LICENSE = MIT +XPROTO_GLPROTO_LICENSE_FILES = COPYING +XPROTO_GLPROTO_INSTALL_STAGING = YES +XPROTO_GLPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_inputproto/Config.in b/package/x11r7/xproto_inputproto/Config.in new file mode 100644 index 0000000000..fcccb26cac --- /dev/null +++ b/package/x11r7/xproto_inputproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_INPUTPROTO + bool "inputproto" + help + X.Org Input protocol headers diff --git a/package/x11r7/xproto_inputproto/xproto_inputproto.hash b/package/x11r7/xproto_inputproto/xproto_inputproto.hash new file mode 100644 index 0000000000..4ecdddc56d --- /dev/null +++ b/package/x11r7/xproto_inputproto/xproto_inputproto.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/xorg-announce/2016-April/002682.html +sha256 893a6af55733262058a27b38eeb1edc733669f01d404e8581b167f03c03ef31d inputproto-2.3.2.tar.bz2 diff --git a/package/x11r7/xproto_inputproto/xproto_inputproto.mk b/package/x11r7/xproto_inputproto/xproto_inputproto.mk new file mode 100644 index 0000000000..20169b5c46 --- /dev/null +++ b/package/x11r7/xproto_inputproto/xproto_inputproto.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xproto_inputproto +# +################################################################################ + +XPROTO_INPUTPROTO_VERSION = 2.3.2 +XPROTO_INPUTPROTO_SOURCE = inputproto-$(XPROTO_INPUTPROTO_VERSION).tar.bz2 +XPROTO_INPUTPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_INPUTPROTO_LICENSE = MIT +XPROTO_INPUTPROTO_LICENSE_FILES = COPYING +XPROTO_INPUTPROTO_INSTALL_STAGING = YES +XPROTO_INPUTPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_kbproto/Config.in b/package/x11r7/xproto_kbproto/Config.in new file mode 100644 index 0000000000..ce568d7ad8 --- /dev/null +++ b/package/x11r7/xproto_kbproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_KBPROTO + bool "kbproto" + help + X.Org KB protocol headers diff --git a/package/x11r7/xproto_kbproto/xproto_kbproto.hash b/package/x11r7/xproto_kbproto/xproto_kbproto.hash new file mode 100644 index 0000000000..c98e595a16 --- /dev/null +++ b/package/x11r7/xproto_kbproto/xproto_kbproto.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-April/002595.html +sha256 f882210b76376e3fa006b11dbd890e56ec0942bc56e65d1249ff4af86f90b857 kbproto-1.0.7.tar.bz2 diff --git a/package/x11r7/xproto_kbproto/xproto_kbproto.mk b/package/x11r7/xproto_kbproto/xproto_kbproto.mk new file mode 100644 index 0000000000..b6c818f705 --- /dev/null +++ b/package/x11r7/xproto_kbproto/xproto_kbproto.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xproto_kbproto +# +################################################################################ + +XPROTO_KBPROTO_VERSION = 1.0.7 +XPROTO_KBPROTO_SOURCE = kbproto-$(XPROTO_KBPROTO_VERSION).tar.bz2 +XPROTO_KBPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_KBPROTO_LICENSE = MIT +XPROTO_KBPROTO_LICENSE_FILES = COPYING +XPROTO_KBPROTO_INSTALL_STAGING = YES +XPROTO_KBPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_presentproto/Config.in b/package/x11r7/xproto_presentproto/Config.in new file mode 100644 index 0000000000..586008df4a --- /dev/null +++ b/package/x11r7/xproto_presentproto/Config.in @@ -0,0 +1,5 @@ +config BR2_PACKAGE_XPROTO_PRESENTPROTO + bool "presentproto" + select BR2_PACKAGE_XUTIL_UTIL_MACROS + help + X.Org Present extension headers diff --git a/package/x11r7/xproto_presentproto/xproto_presentproto.hash b/package/x11r7/xproto_presentproto/xproto_presentproto.hash new file mode 100644 index 0000000000..f947d915a9 --- /dev/null +++ b/package/x11r7/xproto_presentproto/xproto_presentproto.hash @@ -0,0 +1,2 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/2078 +sha256 812c7d48721f909a0f7a2cb1e91f6eead76159a36c4712f4579ca587552839ce presentproto-1.0.tar.bz2 diff --git a/package/x11r7/xproto_presentproto/xproto_presentproto.mk b/package/x11r7/xproto_presentproto/xproto_presentproto.mk new file mode 100644 index 0000000000..6fea0a2f85 --- /dev/null +++ b/package/x11r7/xproto_presentproto/xproto_presentproto.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xproto_presentproto +# +################################################################################ + +XPROTO_PRESENTPROTO_VERSION = 1.0 +XPROTO_PRESENTPROTO_SOURCE = presentproto-$(XPROTO_PRESENTPROTO_VERSION).tar.bz2 +XPROTO_PRESENTPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_PRESENTPROTO_LICENSE = MIT +XPROTO_PRESENTPROTO_LICENSE_FILES = presentproto.h +XPROTO_PRESENTPROTO_DEPENDENCIES = host-pkgconf xutil_util-macros +XPROTO_PRESENTPROTO_INSTALL_STAGING = YES +XPROTO_PRESENTPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_randrproto/Config.in b/package/x11r7/xproto_randrproto/Config.in new file mode 100644 index 0000000000..097ec8f220 --- /dev/null +++ b/package/x11r7/xproto_randrproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_RANDRPROTO + bool "randrproto" + help + X.Org Randr protocol headers diff --git a/package/x11r7/xproto_randrproto/xproto_randrproto.hash b/package/x11r7/xproto_randrproto/xproto_randrproto.hash new file mode 100644 index 0000000000..c71df7f8a0 --- /dev/null +++ b/package/x11r7/xproto_randrproto/xproto_randrproto.hash @@ -0,0 +1,3 @@ +# From http://lists.x.org/archives/xorg-announce/2015-May/002605.html +sha1 bc420745dc4af011988e9dcabdadf8829cbc2374 randrproto-1.5.0.tar.bz2 +sha256 4c675533e79cd730997d232c8894b6692174dce58d3e207021b8f860be498468 randrproto-1.5.0.tar.bz2 diff --git a/package/x11r7/xproto_randrproto/xproto_randrproto.mk b/package/x11r7/xproto_randrproto/xproto_randrproto.mk new file mode 100644 index 0000000000..f6c4878104 --- /dev/null +++ b/package/x11r7/xproto_randrproto/xproto_randrproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_randrproto +# +################################################################################ + +XPROTO_RANDRPROTO_VERSION = 1.5.0 +XPROTO_RANDRPROTO_SOURCE = randrproto-$(XPROTO_RANDRPROTO_VERSION).tar.bz2 +XPROTO_RANDRPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_RANDRPROTO_LICENSE = MIT +XPROTO_RANDRPROTO_LICENSE_FILES = COPYING +XPROTO_RANDRPROTO_INSTALL_STAGING = YES +XPROTO_RANDRPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_recordproto/Config.in b/package/x11r7/xproto_recordproto/Config.in new file mode 100644 index 0000000000..9fd5b884f8 --- /dev/null +++ b/package/x11r7/xproto_recordproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_RECORDPROTO + bool "recordproto" + help + X.Org Record protocol headers diff --git a/package/x11r7/xproto_recordproto/xproto_recordproto.hash b/package/x11r7/xproto_recordproto/xproto_recordproto.hash new file mode 100644 index 0000000000..bc03f8c4b5 --- /dev/null +++ b/package/x11r7/xproto_recordproto/xproto_recordproto.hash @@ -0,0 +1,2 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 a777548d2e92aa259f1528de3c4a36d15e07a4650d0976573a8e2ff5437e7370 recordproto-1.14.2.tar.bz2 diff --git a/package/x11r7/xproto_recordproto/xproto_recordproto.mk b/package/x11r7/xproto_recordproto/xproto_recordproto.mk new file mode 100644 index 0000000000..2d2cceac22 --- /dev/null +++ b/package/x11r7/xproto_recordproto/xproto_recordproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_recordproto +# +################################################################################ + +XPROTO_RECORDPROTO_VERSION = 1.14.2 +XPROTO_RECORDPROTO_SOURCE = recordproto-$(XPROTO_RECORDPROTO_VERSION).tar.bz2 +XPROTO_RECORDPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_RECORDPROTO_LICENSE = MIT +XPROTO_RECORDPROTO_LICENSE_FILES = COPYING +XPROTO_RECORDPROTO_INSTALL_STAGING = YES +XPROTO_RECORDPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_renderproto/Config.in b/package/x11r7/xproto_renderproto/Config.in new file mode 100644 index 0000000000..5b5806fa47 --- /dev/null +++ b/package/x11r7/xproto_renderproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_RENDERPROTO + bool "renderproto" + help + X.Org Render protocol headers diff --git a/package/x11r7/xproto_renderproto/xproto_renderproto.hash b/package/x11r7/xproto_renderproto/xproto_renderproto.hash new file mode 100644 index 0000000000..92763da921 --- /dev/null +++ b/package/x11r7/xproto_renderproto/xproto_renderproto.hash @@ -0,0 +1,2 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 06735a5b92b20759204e4751ecd6064a2ad8a6246bb65b3078b862a00def2537 renderproto-0.11.1.tar.bz2 diff --git a/package/x11r7/xproto_renderproto/xproto_renderproto.mk b/package/x11r7/xproto_renderproto/xproto_renderproto.mk new file mode 100644 index 0000000000..41a8445409 --- /dev/null +++ b/package/x11r7/xproto_renderproto/xproto_renderproto.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xproto_renderproto +# +################################################################################ + +XPROTO_RENDERPROTO_VERSION = 0.11.1 +XPROTO_RENDERPROTO_SOURCE = renderproto-$(XPROTO_RENDERPROTO_VERSION).tar.bz2 +XPROTO_RENDERPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_RENDERPROTO_LICENSE = MIT +XPROTO_RENDERPROTO_LICENSE_FILES = COPYING +XPROTO_RENDERPROTO_INSTALL_STAGING = YES +XPROTO_RENDERPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_resourceproto/Config.in b/package/x11r7/xproto_resourceproto/Config.in new file mode 100644 index 0000000000..4aec708c4a --- /dev/null +++ b/package/x11r7/xproto_resourceproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_RESOURCEPROTO + bool "resourceproto" + help + X.Org Resource protocol headers diff --git a/package/x11r7/xproto_resourceproto/xproto_resourceproto.hash b/package/x11r7/xproto_resourceproto/xproto_resourceproto.hash new file mode 100644 index 0000000000..5ceb1c04ae --- /dev/null +++ b/package/x11r7/xproto_resourceproto/xproto_resourceproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/1404 +md5 cfdb57dae221b71b2703f8e2980eaaf4 resourceproto-1.2.0.tar.bz2 +sha1 9ff9bb9243b0474330959dc3853973523c9dd9ce resourceproto-1.2.0.tar.bz2 diff --git a/package/x11r7/xproto_resourceproto/xproto_resourceproto.mk b/package/x11r7/xproto_resourceproto/xproto_resourceproto.mk new file mode 100644 index 0000000000..960ca13372 --- /dev/null +++ b/package/x11r7/xproto_resourceproto/xproto_resourceproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_resourceproto +# +################################################################################ + +XPROTO_RESOURCEPROTO_VERSION = 1.2.0 +XPROTO_RESOURCEPROTO_SOURCE = resourceproto-$(XPROTO_RESOURCEPROTO_VERSION).tar.bz2 +XPROTO_RESOURCEPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_RESOURCEPROTO_LICENSE = MIT +XPROTO_RESOURCEPROTO_LICENSE_FILES = COPYING +XPROTO_RESOURCEPROTO_INSTALL_STAGING = YES +XPROTO_RESOURCEPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_scrnsaverproto/Config.in b/package/x11r7/xproto_scrnsaverproto/Config.in new file mode 100644 index 0000000000..83176a0d56 --- /dev/null +++ b/package/x11r7/xproto_scrnsaverproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_SCRNSAVERPROTO + bool "scrnsaverproto" + help + X.Org ScrnSaver protocol headers diff --git a/package/x11r7/xproto_scrnsaverproto/xproto_scrnsaverproto.hash b/package/x11r7/xproto_scrnsaverproto/xproto_scrnsaverproto.hash new file mode 100644 index 0000000000..36c10362b2 --- /dev/null +++ b/package/x11r7/xproto_scrnsaverproto/xproto_scrnsaverproto.hash @@ -0,0 +1,2 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 8bb70a8da164930cceaeb4c74180291660533ad3cc45377b30a795d1b85bcd65 scrnsaverproto-1.2.2.tar.bz2 diff --git a/package/x11r7/xproto_scrnsaverproto/xproto_scrnsaverproto.mk b/package/x11r7/xproto_scrnsaverproto/xproto_scrnsaverproto.mk new file mode 100644 index 0000000000..57047cf5a7 --- /dev/null +++ b/package/x11r7/xproto_scrnsaverproto/xproto_scrnsaverproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_scrnsaverproto +# +################################################################################ + +XPROTO_SCRNSAVERPROTO_VERSION = 1.2.2 +XPROTO_SCRNSAVERPROTO_SOURCE = scrnsaverproto-$(XPROTO_SCRNSAVERPROTO_VERSION).tar.bz2 +XPROTO_SCRNSAVERPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_SCRNSAVERPROTO_LICENSE = MIT +XPROTO_SCRNSAVERPROTO_LICENSE_FILES = COPYING +XPROTO_SCRNSAVERPROTO_INSTALL_STAGING = YES +XPROTO_SCRNSAVERPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_videoproto/Config.in b/package/x11r7/xproto_videoproto/Config.in new file mode 100644 index 0000000000..271c78f39d --- /dev/null +++ b/package/x11r7/xproto_videoproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_VIDEOPROTO + bool "videoproto" + help + X.Org Video protocol headers diff --git a/package/x11r7/xproto_videoproto/xproto_videoproto.hash b/package/x11r7/xproto_videoproto/xproto_videoproto.hash new file mode 100644 index 0000000000..471a0a394b --- /dev/null +++ b/package/x11r7/xproto_videoproto/xproto_videoproto.hash @@ -0,0 +1,2 @@ +# From https://lists.freedesktop.org/archives/xorg-announce/2016-March/002680.html +sha256 c7803889fd08e6fcaf7b68cc394fb038b2325d1f315e571a6954577e07cca702 videoproto-2.3.3.tar.bz2 diff --git a/package/x11r7/xproto_videoproto/xproto_videoproto.mk b/package/x11r7/xproto_videoproto/xproto_videoproto.mk new file mode 100644 index 0000000000..896398fc7b --- /dev/null +++ b/package/x11r7/xproto_videoproto/xproto_videoproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_videoproto +# +################################################################################ + +XPROTO_VIDEOPROTO_VERSION = 2.3.3 +XPROTO_VIDEOPROTO_SOURCE = videoproto-$(XPROTO_VIDEOPROTO_VERSION).tar.bz2 +XPROTO_VIDEOPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_VIDEOPROTO_LICENSE = MIT +XPROTO_VIDEOPROTO_LICENSE_FILES = COPYING +XPROTO_VIDEOPROTO_INSTALL_STAGING = YES +XPROTO_VIDEOPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_windowswmproto/Config.in b/package/x11r7/xproto_windowswmproto/Config.in new file mode 100644 index 0000000000..d1a36acc51 --- /dev/null +++ b/package/x11r7/xproto_windowswmproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_WINDOWSWMPROTO + bool "windowswmproto" + help + No description available diff --git a/package/x11r7/xproto_windowswmproto/xproto_windowswmproto.hash b/package/x11r7/xproto_windowswmproto/xproto_windowswmproto.hash new file mode 100644 index 0000000000..eb96c5fa96 --- /dev/null +++ b/package/x11r7/xproto_windowswmproto/xproto_windowswmproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/835 +md5 e74b2ff3172a6117f2a62b655ef99064 windowswmproto-1.0.4.tar.bz2 +sha1 1c9b522c66325f08bb989700b4b31911b6ae60ae windowswmproto-1.0.4.tar.bz2 diff --git a/package/x11r7/xproto_windowswmproto/xproto_windowswmproto.mk b/package/x11r7/xproto_windowswmproto/xproto_windowswmproto.mk new file mode 100644 index 0000000000..067bccf01a --- /dev/null +++ b/package/x11r7/xproto_windowswmproto/xproto_windowswmproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_windowswmproto +# +################################################################################ + +XPROTO_WINDOWSWMPROTO_VERSION = 1.0.4 +XPROTO_WINDOWSWMPROTO_SOURCE = windowswmproto-$(XPROTO_WINDOWSWMPROTO_VERSION).tar.bz2 +XPROTO_WINDOWSWMPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_WINDOWSWMPROTO_LICENSE = MIT +XPROTO_WINDOWSWMPROTO_LICENSE_FILES = COPYING +XPROTO_WINDOWSWMPROTO_INSTALL_STAGING = YES +XPROTO_WINDOWSWMPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_xcmiscproto/Config.in b/package/x11r7/xproto_xcmiscproto/Config.in new file mode 100644 index 0000000000..f7ba153499 --- /dev/null +++ b/package/x11r7/xproto_xcmiscproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_XCMISCPROTO + bool "xcmiscproto" + help + X.Org XCMisc protocol headers diff --git a/package/x11r7/xproto_xcmiscproto/xproto_xcmiscproto.hash b/package/x11r7/xproto_xcmiscproto/xproto_xcmiscproto.hash new file mode 100644 index 0000000000..08eb58bd39 --- /dev/null +++ b/package/x11r7/xproto_xcmiscproto/xproto_xcmiscproto.hash @@ -0,0 +1,2 @@ +# From http://www.x.org/archive/current/src/everything/CHECKSUMS +sha256 b13236869372256c36db79ae39d54214172677fb79e9cdc555dceec80bd9d2df xcmiscproto-1.2.2.tar.bz2 diff --git a/package/x11r7/xproto_xcmiscproto/xproto_xcmiscproto.mk b/package/x11r7/xproto_xcmiscproto/xproto_xcmiscproto.mk new file mode 100644 index 0000000000..3bef2e9792 --- /dev/null +++ b/package/x11r7/xproto_xcmiscproto/xproto_xcmiscproto.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xproto_xcmiscproto +# +################################################################################ + +XPROTO_XCMISCPROTO_VERSION = 1.2.2 +XPROTO_XCMISCPROTO_SOURCE = xcmiscproto-$(XPROTO_XCMISCPROTO_VERSION).tar.bz2 +XPROTO_XCMISCPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_XCMISCPROTO_LICENSE = MIT +XPROTO_XCMISCPROTO_LICENSE_FILES = COPYING +XPROTO_XCMISCPROTO_INSTALL_STAGING = YES +XPROTO_XCMISCPROTO_CONF_OPTS = --disable-specs +HOST_XPROTO_XCMISCPROTO_CONF_OPTS = --disable-specs + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_xextproto/Config.in b/package/x11r7/xproto_xextproto/Config.in new file mode 100644 index 0000000000..d80d76ceed --- /dev/null +++ b/package/x11r7/xproto_xextproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_XEXTPROTO + bool "xextproto" + help + X.Org XExt protocol headers diff --git a/package/x11r7/xproto_xextproto/xproto_xextproto.hash b/package/x11r7/xproto_xextproto/xproto_xextproto.hash new file mode 100644 index 0000000000..258c4ec7e5 --- /dev/null +++ b/package/x11r7/xproto_xextproto/xproto_xextproto.hash @@ -0,0 +1,2 @@ +# From http://lists.freedesktop.org/pipermail/xorg/2013-December/056256.html +sha256 f3f4b23ac8db9c3a9e0d8edb591713f3d70ef9c3b175970dd8823dfc92aa5bb0 xextproto-7.3.0.tar.bz2 diff --git a/package/x11r7/xproto_xextproto/xproto_xextproto.mk b/package/x11r7/xproto_xextproto/xproto_xextproto.mk new file mode 100644 index 0000000000..c17dd938b7 --- /dev/null +++ b/package/x11r7/xproto_xextproto/xproto_xextproto.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xproto_xextproto +# +################################################################################ + +XPROTO_XEXTPROTO_VERSION = 7.3.0 +XPROTO_XEXTPROTO_SOURCE = xextproto-$(XPROTO_XEXTPROTO_VERSION).tar.bz2 +XPROTO_XEXTPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_XEXTPROTO_LICENSE = MIT +XPROTO_XEXTPROTO_LICENSE_FILES = COPYING +XPROTO_XEXTPROTO_INSTALL_STAGING = YES +XPROTO_XEXTPROTO_CONF_OPTS = --disable-specs +HOST_XPROTO_XEXTPROTO_CONF_OPTS = --disable-specs + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_xf86bigfontproto/Config.in b/package/x11r7/xproto_xf86bigfontproto/Config.in new file mode 100644 index 0000000000..7af30d03d7 --- /dev/null +++ b/package/x11r7/xproto_xf86bigfontproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_XF86BIGFONTPROTO + bool "xf86bigfontproto" + help + X.Org XF86BigFont protocol headers diff --git a/package/x11r7/xproto_xf86bigfontproto/xproto_xf86bigfontproto.hash b/package/x11r7/xproto_xf86bigfontproto/xproto_xf86bigfontproto.hash new file mode 100644 index 0000000000..b0ab8aeb20 --- /dev/null +++ b/package/x11r7/xproto_xf86bigfontproto/xproto_xf86bigfontproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/734 +md5 120e226ede5a4687b25dd357cc9b8efe xf86bigfontproto-1.2.0.tar.bz2 +sha1 312a2ea708b257520c1af4393b69d73a393a478f xf86bigfontproto-1.2.0.tar.bz2 diff --git a/package/x11r7/xproto_xf86bigfontproto/xproto_xf86bigfontproto.mk b/package/x11r7/xproto_xf86bigfontproto/xproto_xf86bigfontproto.mk new file mode 100644 index 0000000000..f88f5ecace --- /dev/null +++ b/package/x11r7/xproto_xf86bigfontproto/xproto_xf86bigfontproto.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xproto_xf86bigfontproto +# +################################################################################ + +XPROTO_XF86BIGFONTPROTO_VERSION = 1.2.0 +XPROTO_XF86BIGFONTPROTO_SOURCE = xf86bigfontproto-$(XPROTO_XF86BIGFONTPROTO_VERSION).tar.bz2 +XPROTO_XF86BIGFONTPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_XF86BIGFONTPROTO_LICENSE = MIT +XPROTO_XF86BIGFONTPROTO_LICENSE_FILES = COPYING +XPROTO_XF86BIGFONTPROTO_INSTALL_STAGING = YES +XPROTO_XF86BIGFONTPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_xf86dgaproto/Config.in b/package/x11r7/xproto_xf86dgaproto/Config.in new file mode 100644 index 0000000000..7561b8a6dc --- /dev/null +++ b/package/x11r7/xproto_xf86dgaproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_XF86DGAPROTO + bool "xf86dgaproto" + help + X.Org XF86DGA protocol headers diff --git a/package/x11r7/xproto_xf86dgaproto/xproto_xf86dgaproto.hash b/package/x11r7/xproto_xf86dgaproto/xproto_xf86dgaproto.hash new file mode 100644 index 0000000000..36284fcd52 --- /dev/null +++ b/package/x11r7/xproto_xf86dgaproto/xproto_xf86dgaproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/817 +md5 a036dc2fcbf052ec10621fd48b68dbb1 xf86dgaproto-2.1.tar.bz2 +sha1 97a06120e7195c968875e8ba42e82c90ab54948b xf86dgaproto-2.1.tar.bz2 diff --git a/package/x11r7/xproto_xf86dgaproto/xproto_xf86dgaproto.mk b/package/x11r7/xproto_xf86dgaproto/xproto_xf86dgaproto.mk new file mode 100644 index 0000000000..d671bf0094 --- /dev/null +++ b/package/x11r7/xproto_xf86dgaproto/xproto_xf86dgaproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_xf86dgaproto +# +################################################################################ + +XPROTO_XF86DGAPROTO_VERSION = 2.1 +XPROTO_XF86DGAPROTO_SOURCE = xf86dgaproto-$(XPROTO_XF86DGAPROTO_VERSION).tar.bz2 +XPROTO_XF86DGAPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_XF86DGAPROTO_LICENSE = MIT +XPROTO_XF86DGAPROTO_LICENSE_FILES = COPYING +XPROTO_XF86DGAPROTO_INSTALL_STAGING = YES +XPROTO_XF86DGAPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_xf86driproto/Config.in b/package/x11r7/xproto_xf86driproto/Config.in new file mode 100644 index 0000000000..8aeac87286 --- /dev/null +++ b/package/x11r7/xproto_xf86driproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_XF86DRIPROTO + bool "xf86driproto" + help + X.Org XF86DRI protocol headers diff --git a/package/x11r7/xproto_xf86driproto/xproto_xf86driproto.hash b/package/x11r7/xproto_xf86driproto/xproto_xf86driproto.hash new file mode 100644 index 0000000000..85d4bfcc9e --- /dev/null +++ b/package/x11r7/xproto_xf86driproto/xproto_xf86driproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/1310 +md5 1d716d0dac3b664e5ee20c69d34bc10e xf86driproto-2.1.1.tar.bz2 +sha1 23e861f40ba0f0cbbfd7db7ba2ef623762ffca17 xf86driproto-2.1.1.tar.bz2 diff --git a/package/x11r7/xproto_xf86driproto/xproto_xf86driproto.mk b/package/x11r7/xproto_xf86driproto/xproto_xf86driproto.mk new file mode 100644 index 0000000000..e6bb0f12f1 --- /dev/null +++ b/package/x11r7/xproto_xf86driproto/xproto_xf86driproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_xf86driproto +# +################################################################################ + +XPROTO_XF86DRIPROTO_VERSION = 2.1.1 +XPROTO_XF86DRIPROTO_SOURCE = xf86driproto-$(XPROTO_XF86DRIPROTO_VERSION).tar.bz2 +XPROTO_XF86DRIPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_XF86DRIPROTO_LICENSE = MIT +XPROTO_XF86DRIPROTO_LICENSE_FILES = COPYING +XPROTO_XF86DRIPROTO_INSTALL_STAGING = YES +XPROTO_XF86DRIPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_xf86vidmodeproto/Config.in b/package/x11r7/xproto_xf86vidmodeproto/Config.in new file mode 100644 index 0000000000..395c175861 --- /dev/null +++ b/package/x11r7/xproto_xf86vidmodeproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO + bool "xf86vidmodeproto" + help + X.Org XF86VidMode protocol headers diff --git a/package/x11r7/xproto_xf86vidmodeproto/xproto_xf86vidmodeproto.hash b/package/x11r7/xproto_xf86vidmodeproto/xproto_xf86vidmodeproto.hash new file mode 100644 index 0000000000..d80749be60 --- /dev/null +++ b/package/x11r7/xproto_xf86vidmodeproto/xproto_xf86vidmodeproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/1311 +md5 e793ecefeaecfeabd1aed6a01095174e xf86vidmodeproto-2.3.1.tar.bz2 +sha1 11d54c3210887631ea71e8f8030a77692e964fc4 xf86vidmodeproto-2.3.1.tar.bz2 diff --git a/package/x11r7/xproto_xf86vidmodeproto/xproto_xf86vidmodeproto.mk b/package/x11r7/xproto_xf86vidmodeproto/xproto_xf86vidmodeproto.mk new file mode 100644 index 0000000000..41637983a6 --- /dev/null +++ b/package/x11r7/xproto_xf86vidmodeproto/xproto_xf86vidmodeproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_xf86vidmodeproto +# +################################################################################ + +XPROTO_XF86VIDMODEPROTO_VERSION = 2.3.1 +XPROTO_XF86VIDMODEPROTO_SOURCE = xf86vidmodeproto-$(XPROTO_XF86VIDMODEPROTO_VERSION).tar.bz2 +XPROTO_XF86VIDMODEPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_XF86VIDMODEPROTO_LICENSE = MIT +XPROTO_XF86VIDMODEPROTO_LICENSE_FILES = COPYING +XPROTO_XF86VIDMODEPROTO_INSTALL_STAGING = YES +XPROTO_XF86VIDMODEPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_xineramaproto/Config.in b/package/x11r7/xproto_xineramaproto/Config.in new file mode 100644 index 0000000000..12c8e05b16 --- /dev/null +++ b/package/x11r7/xproto_xineramaproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_XINERAMAPROTO + bool "xineramaproto" + help + X.Org Xinerama protocol headers diff --git a/package/x11r7/xproto_xineramaproto/xproto_xineramaproto.hash b/package/x11r7/xproto_xineramaproto/xproto_xineramaproto.hash new file mode 100644 index 0000000000..162c994898 --- /dev/null +++ b/package/x11r7/xproto_xineramaproto/xproto_xineramaproto.hash @@ -0,0 +1,3 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/1312 +md5 9959fe0bfb22a0e7260433b8d199590a xineramaproto-1.2.1.tar.bz2 +sha1 818bffc16139d6e3de4344c83f00c495d3536753 xineramaproto-1.2.1.tar.bz2 diff --git a/package/x11r7/xproto_xineramaproto/xproto_xineramaproto.mk b/package/x11r7/xproto_xineramaproto/xproto_xineramaproto.mk new file mode 100644 index 0000000000..4c9ae11d28 --- /dev/null +++ b/package/x11r7/xproto_xineramaproto/xproto_xineramaproto.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_xineramaproto +# +################################################################################ + +XPROTO_XINERAMAPROTO_VERSION = 1.2.1 +XPROTO_XINERAMAPROTO_SOURCE = xineramaproto-$(XPROTO_XINERAMAPROTO_VERSION).tar.bz2 +XPROTO_XINERAMAPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_XINERAMAPROTO_LICENSE = MIT +XPROTO_XINERAMAPROTO_LICENSE_FILES = COPYING +XPROTO_XINERAMAPROTO_INSTALL_STAGING = YES +XPROTO_XINERAMAPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xproto_xproto/Config.in b/package/x11r7/xproto_xproto/Config.in new file mode 100644 index 0000000000..a5f88ef7c2 --- /dev/null +++ b/package/x11r7/xproto_xproto/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XPROTO_XPROTO + bool "xproto" + help + X.Org xproto protocol headers diff --git a/package/x11r7/xproto_xproto/xproto_xproto.hash b/package/x11r7/xproto_xproto/xproto_xproto.hash new file mode 100644 index 0000000000..333ac6d4ac --- /dev/null +++ b/package/x11r7/xproto_xproto/xproto_xproto.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2015-July/002618.html +sha256 29e85568d1f68ceef8a2c081dad9bc0e5500a53cfffde24b564dc43d46ddf6ca xproto-7.0.28.tar.bz2 diff --git a/package/x11r7/xproto_xproto/xproto_xproto.mk b/package/x11r7/xproto_xproto/xproto_xproto.mk new file mode 100644 index 0000000000..7357b8c775 --- /dev/null +++ b/package/x11r7/xproto_xproto/xproto_xproto.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xproto_xproto +# +################################################################################ + +XPROTO_XPROTO_VERSION = 7.0.28 +XPROTO_XPROTO_SOURCE = xproto-$(XPROTO_XPROTO_VERSION).tar.bz2 +XPROTO_XPROTO_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_XPROTO_LICENSE = MIT +XPROTO_XPROTO_LICENSE_FILES = COPYING +XPROTO_XPROTO_INSTALL_STAGING = YES +XPROTO_XPROTO_INSTALL_TARGET = NO + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11r7/xproto_xproxymanagementprotocol/Config.in b/package/x11r7/xproto_xproxymanagementprotocol/Config.in new file mode 100644 index 0000000000..bb31f03065 --- /dev/null +++ b/package/x11r7/xproto_xproxymanagementprotocol/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_XPROTO_XPROXYMANAGEMENTPROTOCOL + bool "xproxymanagementprotocol" + help + The Proxy Management Protocol is an ICE based protocol that + provides a way for application servers to easily locate + proxy services available to them. diff --git a/package/x11r7/xproto_xproxymanagementprotocol/xproto_xproxymanagementprotocol.hash b/package/x11r7/xproto_xproxymanagementprotocol/xproto_xproxymanagementprotocol.hash new file mode 100644 index 0000000000..27a9dfa8a4 --- /dev/null +++ b/package/x11r7/xproto_xproxymanagementprotocol/xproto_xproxymanagementprotocol.hash @@ -0,0 +1,2 @@ +# From http://lists.x.org/archives/xorg-announce/2009-October/001150.html +sha1 4abb036371670ecc25d32e48b3277fe203ae5203 xproxymanagementprotocol-1.0.3.tar.bz2 diff --git a/package/x11r7/xproto_xproxymanagementprotocol/xproto_xproxymanagementprotocol.mk b/package/x11r7/xproto_xproxymanagementprotocol/xproto_xproxymanagementprotocol.mk new file mode 100644 index 0000000000..a48269aa13 --- /dev/null +++ b/package/x11r7/xproto_xproxymanagementprotocol/xproto_xproxymanagementprotocol.mk @@ -0,0 +1,15 @@ +################################################################################ +# +# xproto_xproxymanagementprotocol +# +################################################################################ + +XPROTO_XPROXYMANAGEMENTPROTOCOL_VERSION = 1.0.3 +XPROTO_XPROXYMANAGEMENTPROTOCOL_SOURCE = xproxymanagementprotocol-$(XPROTO_XPROXYMANAGEMENTPROTOCOL_VERSION).tar.bz2 +XPROTO_XPROXYMANAGEMENTPROTOCOL_SITE = http://xorg.freedesktop.org/releases/individual/proto +XPROTO_XPROXYMANAGEMENTPROTOCOL_LICENSE = MIT +XPROTO_XPROXYMANAGEMENTPROTOCOL_LICENSE_FILES = COPYING +XPROTO_XPROXYMANAGEMENTPROTOCOL_INSTALL_STAGING = YES +XPROTO_XPROXYMANAGEMENTPROTOCOL_INSTALL_TARGET = NO + +$(eval $(autotools-package)) diff --git a/package/x11r7/xserver_xorg-server/0001-modesettings-needs-dri2.patch b/package/x11r7/xserver_xorg-server/0001-modesettings-needs-dri2.patch new file mode 100644 index 0000000000..4ef95efc3e --- /dev/null +++ b/package/x11r7/xserver_xorg-server/0001-modesettings-needs-dri2.patch @@ -0,0 +1,19 @@ +Kernel modesettings support also depends on dri2, see +http://cgit.freedesktop.org/xorg/xserver/tree/hw/xfree86/drivers/modesetting/Makefile.am#n46 + +Patch sent upstream: https://bugs.freedesktop.org/show_bug.cgi?id=91584 + +Signed-off-by: Bernd Kuhls + +diff -uNr xorg-server-1.17.2.org/configure.ac xorg-server-1.17.2/configure.ac +--- xorg-server-1.17.2.org/configure.ac 2015-06-16 17:42:40.000000000 +0200 ++++ xorg-server-1.17.2/configure.ac 2015-08-08 10:44:59.702382624 +0200 +@@ -2036,7 +2036,7 @@ + XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS" + fi + +- if test "x$DRM" = xyes; then ++ if test "x$DRM" = xyes -a "x$DRI2" = xyes; then + dnl 2.4.46 is required for cursor hotspot support. + PKG_CHECK_EXISTS(libdrm >= 2.4.46) + XORG_DRIVER_MODESETTING=yes diff --git a/package/x11r7/xserver_xorg-server/Config.in b/package/x11r7/xserver_xorg-server/Config.in new file mode 100644 index 0000000000..26b9c8e89b --- /dev/null +++ b/package/x11r7/xserver_xorg-server/Config.in @@ -0,0 +1,161 @@ +config BR2_PACKAGE_XSERVER_XORG_SERVER + bool "xorg-server" + depends on BR2_USE_MMU # fork() + # We need a SHA1 implementation. If either openssl or + # libgcrypt are already part of the build, we'll use one of + # them, otherwise, use the small libsha1 library. + select BR2_PACKAGE_LIBSHA1 if (!BR2_PACKAGE_OPENSSL && !BR2_PACKAGE_LIBGCRYPT) + select BR2_PACKAGE_MCOOKIE + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_XFONT_FONT_ALIAS if !BR2_PACKAGE_XSERVER_XORG_SERVER_BUILTIN_FONTS + select BR2_PACKAGE_XFONT_FONT_MISC_MISC if !BR2_PACKAGE_XSERVER_XORG_SERVER_BUILTIN_FONTS + select BR2_PACKAGE_XFONT_FONT_CURSOR_MISC if !BR2_PACKAGE_XSERVER_XORG_SERVER_BUILTIN_FONTS + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAU + select BR2_PACKAGE_XLIB_LIBXCURSOR + select BR2_PACKAGE_XLIB_LIBXDAMAGE + select BR2_PACKAGE_XLIB_LIBXDMCP + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXFIXES + select BR2_PACKAGE_XLIB_LIBXFONT + select BR2_PACKAGE_XLIB_LIBXFT + select BR2_PACKAGE_XLIB_LIBXI + select BR2_PACKAGE_XLIB_LIBXINERAMA + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_LIBXRENDER + select BR2_PACKAGE_XLIB_LIBXRES + select BR2_PACKAGE_XLIB_LIBXXF86VM + select BR2_PACKAGE_XLIB_LIBXKBFILE + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XDATA_XBITMAPS + select BR2_PACKAGE_XPROTO_BIGREQSPROTO + select BR2_PACKAGE_XPROTO_COMPOSITEPROTO + select BR2_PACKAGE_XPROTO_DAMAGEPROTO + select BR2_PACKAGE_XPROTO_FIXESPROTO + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_GLPROTO + select BR2_PACKAGE_XPROTO_INPUTPROTO + select BR2_PACKAGE_XPROTO_KBPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_RESOURCEPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XCMISCPROTO + select BR2_PACKAGE_XPROTO_XEXTPROTO + select BR2_PACKAGE_XPROTO_XF86BIGFONTPROTO + select BR2_PACKAGE_XPROTO_XF86DGAPROTO + select BR2_PACKAGE_XPROTO_XF86VIDMODEPROTO + select BR2_PACKAGE_XPROTO_XPROTO + select BR2_PACKAGE_XUTIL_UTIL_MACROS + select BR2_PACKAGE_XKEYBOARD_CONFIG + help + X.Org X server + + http://xorg.freedesktop.org + +if BR2_PACKAGE_XSERVER_XORG_SERVER + +config BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_14 + bool + +config BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_20 + bool + +config BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI + int + default 14 if BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_14 + default 20 if BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_20 + +choice + bool "X Window System server version" + +config BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_18 + bool "1.18.3" + select BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_20 + select BR2_PACKAGE_XPROTO_PRESENTPROTO + +config BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_14 + bool "1.14.7" + select BR2_PACKAGE_XSERVER_XORG_SERVER_VIDEODRV_ABI_14 + +endchoice + +config BR2_PACKAGE_XSERVER_XORG_SERVER_VERSION + string + default "1.18.3" if BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_18 + default "1.14.7" if BR2_PACKAGE_XSERVER_XORG_SERVER_V_1_14 + +choice + prompt "X Window System server type" + help + Select the X Window System server to use + +config BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR + bool "Modular X.org" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_LIBDRM if (BR2_PACKAGE_XPROTO_XF86DRIPROTO || \ + BR2_PACKAGE_XPROTO_DRI2PROTO) + select BR2_PACKAGE_LIBPCIACCESS + select BR2_PACKAGE_XLIB_LIBXSHMFENCE if BR2_PACKAGE_XPROTO_DRI3PROTO + help + This variant of the X.org server is the full-blown variant, + as used by desktop GNU/Linux distributions. The drivers (for + input and graphics) are built separately from the X.org + server (see the xdriver* packages). + +comment "Modular X.org needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP + +config BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE + bool "KDrive / TinyX" + help + This variant of the X.org server is a lightweight version + intended for embedded systems. The drivers (for input and + graphics) are built into the server. It is generally used + directly on top of the Linux framebuffer without DRM or + video card specific drivers. + +endchoice + +config BR2_PACKAGE_XSERVER_XORG_SERVER_AIGLX + bool "Enable AIGLX Extension" + help + Enable/Use AIGLX extension. + +if BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE + +config BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_EVDEV + bool "Enable KDrive/TinyX evdev input driver" + help + Enable evdev input driver in KDrive. This allows KDrive to + use input devices that are integrated in the Linux input + subsystem, i.e have a /dev/input/eventX device file. This is + most likely the input driver you want to use. + + This driver can then be enabled by running the X server + using: + + Xfbdev -keybd evdev,,device=/dev/input/eventX -mouse evdev,,device=/dev/input/eventY. + +config BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_KBD + bool "Enable KDrive/TinyX kbd input driver" + help + Enable kbd input driver in KDrive. It uses the console + keyboard as input device. + +config BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_MOUSE + bool "Enable KDrive/TinyX mouse input driver" + help + Enable mouse input driver in KDrive. It supports PS/2 mice + and serial port mice. + +endif + +comment "Optional Servers" + +config BR2_PACKAGE_XSERVER_XORG_SERVER_XVFB + bool "Xvfb server" + help + Virtual frame buffer X server. + +endif diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.hash b/package/x11r7/xserver_xorg-server/xserver_xorg-server.hash new file mode 100644 index 0000000000..2172c898c4 --- /dev/null +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.hash @@ -0,0 +1,5 @@ +# From http://lists.x.org/archives/xorg-announce/2014-June/002440.html +sha1 7a95765e56b124758fcd7b609589e65b8870880b xorg-server-1.14.7.tar.bz2 +sha256 fcf66fa6ad86227613d2d3e8ae13ded297e2a1e947e9060a083eaf80d323451f xorg-server-1.14.7.tar.bz2 +# From https://lists.freedesktop.org/archives/xorg-announce/2016-April/002683.html +sha256 ea739c22517cdbe2b5f7c0a5fd05fe8a10ac0629003e71c0c7862f4bb60142cd xorg-server-1.18.3.tar.bz2 diff --git a/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk new file mode 100644 index 0000000000..85d7e98e9f --- /dev/null +++ b/package/x11r7/xserver_xorg-server/xserver_xorg-server.mk @@ -0,0 +1,250 @@ +################################################################################ +# +# xserver_xorg-server +# +################################################################################ + +XSERVER_XORG_SERVER_VERSION = $(call qstrip,$(BR2_PACKAGE_XSERVER_XORG_SERVER_VERSION)) +XSERVER_XORG_SERVER_SOURCE = xorg-server-$(XSERVER_XORG_SERVER_VERSION).tar.bz2 +XSERVER_XORG_SERVER_SITE = http://xorg.freedesktop.org/releases/individual/xserver +XSERVER_XORG_SERVER_LICENSE = MIT +XSERVER_XORG_SERVER_LICENSE_FILES = COPYING +XSERVER_XORG_SERVER_INSTALL_STAGING = YES +# xfont_font-util is needed only for autoreconf +XSERVER_XORG_SERVER_AUTORECONF = YES +XSERVER_XORG_SERVER_DEPENDENCIES = \ + xfont_font-util \ + xutil_util-macros \ + xlib_libXfont \ + xlib_libX11 \ + xlib_libXau \ + xlib_libXdmcp \ + xlib_libXext \ + xlib_libXfixes \ + xlib_libXi \ + xlib_libXrender \ + xlib_libXres \ + xlib_libXft \ + xlib_libXcursor \ + xlib_libXinerama \ + xlib_libXrandr \ + xlib_libXdamage \ + xlib_libXxf86vm \ + xlib_libxkbfile \ + xlib_xtrans \ + xdata_xbitmaps \ + xproto_bigreqsproto \ + xproto_compositeproto \ + xproto_damageproto \ + xproto_fixesproto \ + xproto_fontsproto \ + xproto_glproto \ + xproto_inputproto \ + xproto_kbproto \ + xproto_randrproto \ + xproto_renderproto \ + xproto_resourceproto \ + xproto_videoproto \ + xproto_xcmiscproto \ + xproto_xextproto \ + xproto_xf86bigfontproto \ + xproto_xf86dgaproto \ + xproto_xf86vidmodeproto \ + xproto_xproto \ + xkeyboard-config \ + pixman \ + mcookie \ + host-pkgconf + +# We force -O2 regardless of the optimization level chosen by the +# user, as the X.org server is known to trigger some compiler bugs at +# -Os on several architectures. +XSERVER_XORG_SERVER_CONF_OPTS = \ + --disable-config-hal \ + --disable-xnest \ + --disable-xephyr \ + --disable-dmx \ + --with-builder-addr=buildroot@buildroot.org \ + CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include/pixman-1 -O2" \ + --with-fontrootdir=/usr/share/fonts/X11/ \ + --$(if $(BR2_PACKAGE_XSERVER_XORG_SERVER_XVFB),en,dis)able-xvfb + +ifeq ($(BR2_PACKAGE_SYSTEMD),y) +XSERVER_XORG_SERVER_CONF_OPTS += \ + --with-systemd-daemon \ + --enable-systemd-logind +XSERVER_XORG_SERVER_DEPENDENCIES += systemd +else +XSERVER_XORG_SERVER_CONF_OPTS += \ + --without-systemd-daemon \ + --disable-systemd-logind +endif + +# Xwayland support needs libdrm, libepoxy, wayland and libxcomposite +ifeq ($(BR2_PACKAGE_LIBDRM)$(BR2_PACKAGE_LIBEPOXY)$(BR2_PACKAGE_WAYLAND)$(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),yyyy) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-xwayland +XSERVER_XORG_SERVER_DEPENDENCIES += libdrm libepoxy wayland xlib_libXcomposite +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-xwayland +endif + +# Present protocol only required for xserver 1.15+, but does not matter if +# enabled for older versions as they don't use it (not even optionally). +ifeq ($(BR2_PACKAGE_XPROTO_PRESENTPROTO),y) +XSERVER_XORG_SERVER_DEPENDENCIES += xproto_presentproto +endif + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR),y) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-xorg +XSERVER_XORG_SERVER_DEPENDENCIES += libpciaccess +ifeq ($(BR2_PACKAGE_LIBDRM),y) +XSERVER_XORG_SERVER_DEPENDENCIES += libdrm +XSERVER_XORG_SERVER_CONF_OPTS += --enable-libdrm +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-libdrm +endif +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-xorg +endif + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE),y) +XSERVER_XORG_SERVER_CONF_OPTS += \ + --enable-kdrive \ + --enable-xfbdev \ + --disable-glx \ + --disable-dri \ + --disable-xsdl +define XSERVER_CREATE_X_SYMLINK + ln -f -s Xfbdev $(TARGET_DIR)/usr/bin/X +endef +XSERVER_XORG_SERVER_POST_INSTALL_TARGET_HOOKS += XSERVER_CREATE_X_SYMLINK + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_EVDEV),y) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-kdrive-evdev +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive-evdev +endif + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_KBD),y) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-kdrive-kbd +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive-kbd +endif + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_KDRIVE_MOUSE),y) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-kdrive-mouse +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive-mouse +endif + +else # modular +XSERVER_XORG_SERVER_CONF_OPTS += --disable-kdrive --disable-xfbdev +endif + +ifeq ($(BR2_PACKAGE_MESA3D_DRI_DRIVER),y) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri --enable-glx +XSERVER_XORG_SERVER_DEPENDENCIES += mesa3d xproto_xf86driproto +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri --disable-glx +endif + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_AIGLX),y) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-aiglx +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-aiglx +endif + +# Optional packages +ifeq ($(BR2_PACKAGE_TSLIB),y) +XSERVER_XORG_SERVER_DEPENDENCIES += tslib +XSERVER_XORG_SERVER_CONF_OPTS += --enable-tslib LDFLAGS="-lts" +endif + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +XSERVER_XORG_SERVER_DEPENDENCIES += udev +XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-udev +# udev kms support depends on libdrm and dri2 +ifeq ($(BR2_PACKAGE_LIBDRM)$(BR2_PACKAGE_XPROTO_DRI2PROTO),yy) +XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-udev-kms +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-config-udev-kms +endif +else +ifeq ($(BR2_PACKAGE_DBUS),y) +XSERVER_XORG_SERVER_DEPENDENCIES += dbus +XSERVER_XORG_SERVER_CONF_OPTS += --enable-config-dbus +endif +endif + +ifeq ($(BR2_PACKAGE_FREETYPE),y) +XSERVER_XORG_SERVER_DEPENDENCIES += freetype +endif + +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) +XSERVER_XORG_SERVER_DEPENDENCIES += libunwind +XSERVER_XORG_SERVER_CONF_OPTS += --enable-libunwind +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-libunwind +endif + +ifeq ($(BR2_PACKAGE_XPROTO_RECORDPROTO),y) +XSERVER_XORG_SERVER_DEPENDENCIES += xproto_recordproto +XSERVER_XORG_SERVER_CONF_OPTS += --enable-record +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-record +endif + +ifneq ($(BR2_PACKAGE_XLIB_LIBXVMC),y) +XSERVER_XORG_SERVER_CONF_OPTS += --disable-xvmc +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y) +XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libXcomposite +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-composite +endif + +ifeq ($(BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR),y) +ifeq ($(BR2_PACKAGE_XPROTO_DRI2PROTO),y) +XSERVER_XORG_SERVER_DEPENDENCIES += xproto_dri2proto +XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri2 +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri2 +endif +ifeq ($(BR2_PACKAGE_XPROTO_DRI3PROTO),y) +XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libxshmfence xproto_dri3proto +XSERVER_XORG_SERVER_CONF_OPTS += --enable-dri3 +ifeq ($(BR2_PACKAGE_LIBEPOXY),y) +XSERVER_XORG_SERVER_DEPENDENCIES += libepoxy +XSERVER_XORG_SERVER_CONF_OPTS += --enable-glamor +endif +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri3 --disable-glamor +endif +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-dri2 --disable-dri3 --disable-glamor +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXSCRNSAVER),y) +XSERVER_XORG_SERVER_DEPENDENCIES += xlib_libXScrnSaver +XSERVER_XORG_SERVER_CONF_OPTS += --enable-screensaver +else +XSERVER_XORG_SERVER_CONF_OPTS += --disable-screensaver +endif + +ifneq ($(BR2_PACKAGE_XLIB_LIBDMX),y) +XSERVER_XORG_SERVER_CONF_OPTS += --disable-dmx +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libcrypto +XSERVER_XORG_SERVER_DEPENDENCIES += openssl +else ifeq ($(BR2_PACKAGE_LIBGCRYPT),y) +XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libgcrypt +XSERVER_XORG_SERVER_DEPENDENCIES += libgcrypt +else +XSERVER_XORG_SERVER_CONF_OPTS += --with-sha1=libsha1 +XSERVER_XORG_SERVER_DEPENDENCIES += libsha1 +endif + +$(eval $(autotools-package)) diff --git a/package/x11r7/xutil_makedepend/Config.in b/package/x11r7/xutil_makedepend/Config.in new file mode 100644 index 0000000000..0b091b0e34 --- /dev/null +++ b/package/x11r7/xutil_makedepend/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XUTIL_MAKEDEPEND + bool "makedepend" + help + No description available diff --git a/package/x11r7/xutil_makedepend/xutil_makedepend.hash b/package/x11r7/xutil_makedepend/xutil_makedepend.hash new file mode 100644 index 0000000000..596551155c --- /dev/null +++ b/package/x11r7/xutil_makedepend/xutil_makedepend.hash @@ -0,0 +1,2 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/2007 +sha256 f7a80575f3724ac3d9b19eaeab802892ece7e4b0061dd6425b4b789353e25425 makedepend-1.0.5.tar.bz2 diff --git a/package/x11r7/xutil_makedepend/xutil_makedepend.mk b/package/x11r7/xutil_makedepend/xutil_makedepend.mk new file mode 100644 index 0000000000..81e348ed96 --- /dev/null +++ b/package/x11r7/xutil_makedepend/xutil_makedepend.mk @@ -0,0 +1,16 @@ +################################################################################ +# +# xutil_makedepend +# +################################################################################ + +XUTIL_MAKEDEPEND_VERSION = 1.0.5 +XUTIL_MAKEDEPEND_SOURCE = makedepend-$(XUTIL_MAKEDEPEND_VERSION).tar.bz2 +XUTIL_MAKEDEPEND_SITE = http://xorg.freedesktop.org/releases/individual/util +XUTIL_MAKEDEPEND_LICENSE = MIT +XUTIL_MAKEDEPEND_LICENSE_FILES = COPYING + +XUTIL_MAKEDEPEND_DEPENDENCIES = xproto_xproto + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/x11vnc/Config.in b/package/x11vnc/Config.in new file mode 100644 index 0000000000..0909b9aec4 --- /dev/null +++ b/package/x11vnc/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_X11VNC + bool "x11vnc" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXTST + help + VNC server for X11 display + + http://www.karlrunge.com/x11vnc/ diff --git a/package/x11vnc/x11vnc.hash b/package/x11vnc/x11vnc.hash new file mode 100644 index 0000000000..5828b12cd8 --- /dev/null +++ b/package/x11vnc/x11vnc.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 f6829f2e629667a5284de62b080b13126a0736499fe47cdb447aedb07a59f13b x11vnc-0.9.13.tar.gz diff --git a/package/x11vnc/x11vnc.mk b/package/x11vnc/x11vnc.mk new file mode 100644 index 0000000000..cdb323788c --- /dev/null +++ b/package/x11vnc/x11vnc.mk @@ -0,0 +1,65 @@ +################################################################################ +# +# x11vnc +# +################################################################################ + +X11VNC_VERSION = 0.9.13 +X11VNC_SITE = http://downloads.sourceforge.net/project/libvncserver/x11vnc/$(X11VNC_VERSION) +# sdl support is not used in x11vnc, but host include / library search paths +# leak in if host has sdl-config +X11VNC_CONF_OPTS = --without-sdl +X11VNC_DEPENDENCIES = xlib_libXt xlib_libXext xlib_libXtst +X11VNC_LICENSE = GPLv2+ +X11VNC_LICENSE_FILES = COPYING + +ifeq ($(BR2_PACKAGE_AVAHI_DAEMON)$(BR2_PACKAGE_DBUS),yy) +X11VNC_DEPENDENCIES += avahi dbus +else +X11VNC_CONF_OPTS += --without-avahi +endif + +ifeq ($(BR2_PACKAGE_JPEG),y) +X11VNC_DEPENDENCIES += jpeg +else +X11VNC_CONF_OPTS += --without-jpeg +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +X11VNC_DEPENDENCIES += openssl +else +X11VNC_CONF_OPTS += --without-ssl --without-crypto +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y) +X11VNC_DEPENDENCIES += xlib_libXinerama +else +X11VNC_CONF_OPTS += --without-xinerama +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y) +X11VNC_DEPENDENCIES += xlib_libXrandr +else +X11VNC_CONF_OPTS += --without-xrandr +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y) +X11VNC_DEPENDENCIES += xlib_libXfixes +else +X11VNC_CONF_OPTS += --without-xfixes +endif + +ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE),y) +X11VNC_DEPENDENCIES += xlib_libXdamage +else +X11VNC_CONF_OPTS += --without-xdamage +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +X11VNC_DEPENDENCIES += zlib +else +X11VNC_CONF_OPTS += --without-zlib +endif + + +$(eval $(autotools-package)) diff --git a/package/x264/Config.in b/package/x264/Config.in new file mode 100644 index 0000000000..7bf2319f26 --- /dev/null +++ b/package/x264/Config.in @@ -0,0 +1,20 @@ +config BR2_PACKAGE_X264 + bool "x264" + depends on !BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX # madvise() + help + x264 is a free software library and application for + encoding video streams into the H.264/MPEG-4 AVC + compression format, and is released under the terms + of the GNU GPL. + + https://www.videolan.org/developers/x264.html + +if BR2_PACKAGE_X264 + +config BR2_PACKAGE_X264_CLI + bool "CLI" + help + Command-line tool to encode video streams into the + H.264/MPEG-4 AVC compression format. + +endif diff --git a/package/x264/x264.mk b/package/x264/x264.mk new file mode 100644 index 0000000000..6055a8a6ec --- /dev/null +++ b/package/x264/x264.mk @@ -0,0 +1,64 @@ +################################################################################ +# +# x264 +# +################################################################################ + +X264_VERSION = 3b70645597bea052d2398005bc723212aeea6875 +X264_SITE = git://git.videolan.org/x264.git +X264_LICENSE = GPLv2+ +X264_DEPENDENCIES = host-pkgconf +X264_LICENSE_FILES = COPYING +X264_INSTALL_STAGING = YES +X264_CONF_OPTS = --disable-avs + +ifeq ($(BR2_i386)$(BR2_x86_64),y) +# yasm needed for assembly files +X264_DEPENDENCIES += host-yasm +X264_CONF_ENV += AS="$(HOST_DIR)/usr/bin/yasm" +else ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_aarch64),y) +# We need to pass gcc as AS, because the ARM assembly files have to be +# preprocessed +X264_CONF_ENV += AS="$(TARGET_CC)" +else +X264_CONF_OPTS += --disable-asm +endif + +ifeq ($(BR2_STATIC_LIBS),) +X264_CONF_OPTS += --enable-pic --enable-shared +endif + +ifeq ($(BR2_PACKAGE_X264_CLI),) +X264_CONF_OPTS += --disable-cli +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),) +X264_CONF_OPTS += --disable-thread +endif + +# the configure script is not generated by autoconf +define X264_CONFIGURE_CMDS + (cd $(@D); $(TARGET_CONFIGURE_OPTS) $(X264_CONF_ENV) ./configure \ + --prefix=/usr \ + --host="$(GNU_TARGET_NAME)" \ + --cross-prefix="$(TARGET_CROSS)" \ + --disable-ffms \ + --enable-static \ + --disable-opencl \ + $(X264_CONF_OPTS) \ + ) +endef + +define X264_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define X264_INSTALL_STAGING_CMDS + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(STAGING_DIR)" -C $(@D) install +endef + +define X264_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/x265/Config.in b/package/x265/Config.in new file mode 100644 index 0000000000..1d6eda2049 --- /dev/null +++ b/package/x265/Config.in @@ -0,0 +1,28 @@ +config BR2_PACKAGE_X265 + bool "x265" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # dlfcn + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + help + x265 is an open source free software and library for encoding video + using the High Efficiency Video Coding (HEVC/H.265) standard. x265 is + offered under either the GNU General Public License (GPL) 2 license or + a commercial license, similar to the x264 project. + + http://x265.org + +if BR2_PACKAGE_X265 + +config BR2_PACKAGE_X265_CLI + bool "CLI" + help + Command-line tool to encode video streams into the + H.265/HEVC compression format. + +endif + +comment "x265 needs a toolchain w/ C++, threads, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HAS_SYNC_4 diff --git a/package/x265/x265.hash b/package/x265/x265.hash new file mode 100644 index 0000000000..92b5beaa9d --- /dev/null +++ b/package/x265/x265.hash @@ -0,0 +1,2 @@ +# Locally generated +sha256 3e4654133ed957a98708fdb4cb9a154d9e80922b84e26e43fc462a101c5b15c8 x265_1.9.tar.gz diff --git a/package/x265/x265.mk b/package/x265/x265.mk new file mode 100644 index 0000000000..e737c31375 --- /dev/null +++ b/package/x265/x265.mk @@ -0,0 +1,31 @@ +################################################################################ +# +# x265 +# +################################################################################ + +X265_VERSION = 1.9 +X265_SOURCE = x265_$(X265_VERSION).tar.gz +X265_SITE = https://bitbucket.org/multicoreware/x265/downloads +X265_LICENSE = GPLv2+ +X265_LICENSE_FILES = COPYING +X265_SUBDIR = source +X265_INSTALL_STAGING = YES + +ifeq ($(BR2_i386)$(BR2_x86_64),y) +X265_DEPENDENCIES += host-yasm +endif + +ifeq ($(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),y) +X265_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_PIC=ON +else +X265_CONF_OPTS += -DENABLE_SHARED=OFF +endif + +ifeq ($(BR2_PACKAGE_X265_CLI),y) +X265_CONF_OPTS += -DENABLE_CLI=ON +else +X265_CONF_OPTS += -DENABLE_CLI=OFF +endif + +$(eval $(cmake-package)) diff --git a/package/xavante/Config.in b/package/xavante/Config.in new file mode 100644 index 0000000000..be8e6d905d --- /dev/null +++ b/package/xavante/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_XAVANTE + bool "xavante" + # Runtime dependency only + select BR2_PACKAGE_CGILUA + select BR2_PACKAGE_COPAS + select BR2_PACKAGE_COXPCALL + select BR2_PACKAGE_LUAFILESYSTEM + select BR2_PACKAGE_LUASOCKET + select BR2_PACKAGE_WSAPI + help + Xavante is a Lua HTTP 1.1 Web server that uses a modular + architecture based on URI mapped handlers. + + http://keplerproject.github.com/xavante/ diff --git a/package/xavante/xavante.hash b/package/xavante/xavante.hash new file mode 100644 index 0000000000..d960c2d064 --- /dev/null +++ b/package/xavante/xavante.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 d683bebdb3e1b497dc04ceb3fb8f1c8c67a6486ab0c6da0c23f281cc07a63657 xavante-2.3.0-1.src.rock diff --git a/package/xavante/xavante.mk b/package/xavante/xavante.mk new file mode 100644 index 0000000000..07f9ee6fde --- /dev/null +++ b/package/xavante/xavante.mk @@ -0,0 +1,10 @@ +################################################################################ +# +# xavante +# +################################################################################ + +XAVANTE_VERSION = 2.3.0-1 +XAVANTE_LICENSE = MIT + +$(eval $(luarocks-package)) diff --git a/package/xdotool/Config.in b/package/xdotool/Config.in new file mode 100644 index 0000000000..4fb8a49502 --- /dev/null +++ b/package/xdotool/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_XDOTOOL + bool "xdotool" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_XLIB_LIBXTST + select BR2_PACKAGE_XLIB_LIBXINERAMA + select BR2_PACKAGE_LIBXKBCOMMON + select BR2_PACKAGE_XLIB_LIBX11 + help + Command-line X11 automation tool + + http://www.semicomplete.com/projects/xdotool diff --git a/package/xdotool/xdotool.hash b/package/xdotool/xdotool.hash new file mode 100644 index 0000000000..f8adcd5953 --- /dev/null +++ b/package/xdotool/xdotool.hash @@ -0,0 +1,2 @@ +# locally computed hash +sha256 b097ef0e3897d1a24e3f45f0faed58329742d3d9434b9b46eb97eb1040f999bf xdotool-v3.20150503.1.tar.gz diff --git a/package/xdotool/xdotool.mk b/package/xdotool/xdotool.mk new file mode 100644 index 0000000000..a799ea470f --- /dev/null +++ b/package/xdotool/xdotool.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# xdotool +# +################################################################################ + +XDOTOOL_VERSION = v3.20150503.1 +XDOTOOL_SITE = $(call github,jordansissel,xdotool,$(XDOTOOL_VERSION)) +XDOTOOL_LICENSE = BSD-3c +XDOTOOL_LICENSE_FILES = COPYRIGHT +XDOTOOL_DEPENDENCIES = xlib_libXtst xlib_libXinerama libxkbcommon xlib_libX11 + +define XDOTOOL_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) +endef + +# Avoid 'install' target to skip 'post-install' which runs ldconfig on host +define XDOTOOL_INSTALL_TARGET_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \ + pre-install installlib installprog installheader \ + PREFIX="$(TARGET_DIR)/usr" +endef + +$(eval $(generic-package)) diff --git a/package/xenomai/Config.in b/package/xenomai/Config.in new file mode 100644 index 0000000000..d4c8a89d42 --- /dev/null +++ b/package/xenomai/Config.in @@ -0,0 +1,101 @@ +comment "xenomai needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_i386 || BR2_x86_64 || BR2_arm || \ + BR2_bfin || BR2_powerpc || BR2_sh4 + +config BR2_PACKAGE_XENOMAI + bool "Xenomai Userspace" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_i386 || BR2_x86_64 || BR2_arm || \ + BR2_bfin || BR2_powerpc || BR2_sh4 + help + Real-Time Framework for Linux + http://www.xenomai.org + + Xenomai is split in two parts: a kernel part and an + userspace part. + + This package contains the userspace part, which consists + mainly in libraries to write userspace real-time programs + that interact with the in-kernel Xenomai real-time core. + + For those libraries to work, you need a Xenomai-enabled + kernel. This is possible in two ways: + - if you compile your kernel with Buildroot, you need to go + to Linux Kernel -> Linux Kernel Extensions to enable the + Xenomai extension. + - if you compile your kernel outside of Buildroot, you need + to make sure that it is Xenomai-enabled. + + Finally, if you are using a static /dev, make sure to + uncomment the Xenomai entries listed in + target/generic/device_table_dev.txt. + +if BR2_PACKAGE_XENOMAI + +config BR2_PACKAGE_XENOMAI_VERSION + string "Custom Xenomai version" + help + Manually select Xenomai version. If left empty, the default + version will be used. + + Make sure that the selected version has a patch for your + selected Linux kernel. If it does not, download and select + a patch manually with + BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH, in the Linux + Kernel -> Linux Kernel Extensions menu. + +config BR2_PACKAGE_XENOMAI_TESTSUITE + bool "Install testsuite" + help + This option allows to install the Xenomai test programs. + +config BR2_PACKAGE_XENOMAI_RTCAN + bool "RTCan utilities" + help + This option allows to install the Xenomai RT-CAN utilities. + +config BR2_PACKAGE_XENOMAI_ANALOGY + bool "Analogy libs and utils" + help + This option allows to install the Xenomai Analogy utilities + and libraries + +config BR2_PACKAGE_XENOMAI_NATIVE_SKIN + bool "Native skin library" + default y + help + This option allows to install the Native Xenomai skin + +config BR2_PACKAGE_XENOMAI_POSIX_SKIN + bool "POSIX skin library" + default y + help + This option allows to install the POSIX Xenomai skin + +config BR2_PACKAGE_XENOMAI_VXWORKS_SKIN + bool "VX-Works skin library" + help + This option allows to install the VX-Works Xenomai skin + +config BR2_PACKAGE_XENOMAI_PSOS_SKIN + bool "PSOS skin library" + help + This option allows to install the PSOS Xenomai skin + +config BR2_PACKAGE_XENOMAI_RTAI_SKIN + bool "RTAI skin library" + help + This option allows to install the RTAI Xenomai skin + +config BR2_PACKAGE_XENOMAI_UITRON_SKIN + bool "uiTron skin library" + help + This option allows to install the uiTron Xenomai skin + +config BR2_PACKAGE_XENOMAI_VRTX_SKIN + bool "VRTX skin library" + help + This option allows to install the VRTX Xenomai skin + +endif diff --git a/package/xenomai/xenomai.hash b/package/xenomai/xenomai.hash new file mode 100644 index 0000000000..4d74472ee3 --- /dev/null +++ b/package/xenomai/xenomai.hash @@ -0,0 +1,2 @@ +# Locally computed; +sha256 b6ff723cb0f3b1c2c4e15bccfd114b248dea1b4164a0ac0e612815379ce7caf8 xenomai-2.6.4.tar.bz2 diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk new file mode 100644 index 0000000000..11ebf72cb9 --- /dev/null +++ b/package/xenomai/xenomai.mk @@ -0,0 +1,112 @@ +################################################################################ +# +# xenomai +# +################################################################################ + +XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION)) +ifeq ($(XENOMAI_VERSION),) +XENOMAI_VERSION = 2.6.4 +else +BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE) +endif + +XENOMAI_SITE = https://xenomai.org/downloads/xenomai/stable +XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2 +XENOMAI_LICENSE = headers: GPLv2+ with exception, libraries: LGPLv2.1+, kernel: GPLv2+, docs: GFDLv1.2+, ipipe patch and can driver: GPLv2 +# GFDL is not included but refers to gnu.org +XENOMAI_LICENSE_FILES = debian/copyright include/COPYING src/skins/native/COPYING ksrc/nucleus/COPYING + +XENOMAI_INSTALL_STAGING = YES +XENOMAI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-user +XENOMAI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-user + +XENOMAI_CONF_OPTS += --includedir=/usr/include/xenomai/ --disable-doc-install + +define XENOMAI_REMOVE_DEVFILES + for i in xeno-config xeno-info wrap-link.sh ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_DEVFILES + +ifeq ($(BR2_PACKAGE_XENOMAI_TESTSUITE),) +define XENOMAI_REMOVE_TESTSUITE + rm -rf $(TARGET_DIR)/usr/share/xenomai/ + for i in klatency rtdm xeno xeno-load check-vdso \ + irqloop cond-torture-posix switchtest arith \ + sigtest clocktest cyclictest latency wakeup-time \ + xeno-test cond-torture-native mutex-torture-posix \ + mutex-torture-native ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_TESTSUITE +endif + +ifeq ($(BR2_PACKAGE_XENOMAI_RTCAN),) +define XENOMAI_REMOVE_RTCAN_PROGS + for i in rtcanrecv rtcansend ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done + rm -f $(TARGET_DIR)/usr/sbin/rtcanconfig +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_RTCAN_PROGS +endif + +ifeq ($(BR2_PACKAGE_XENOMAI_ANALOGY),) +define XENOMAI_REMOVE_ANALOGY + for i in cmd_bits cmd_read cmd_write insn_write \ + insn_bits insn_read ; do \ + rm -f $(TARGET_DIR)/usr/bin/$$i ; \ + done + rm -f $(TARGET_DIR)/usr/sbin/analogy_config + rm -f $(TARGET_DIR)/usr/lib/libanalogy.* +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_ANALOGY +endif + +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_NATIVE_SKIN),,native) +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_POSIX_SKIN),,posix) +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_VXWORKS_SKIN),,vxworks) +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_PSOS_SKIN),,psos) +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_RTAI_SKIN),,rtai) +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_UITRON_SKIN),,uitron) +XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_VRTX_SKIN),,vrtx) + +define XENOMAI_REMOVE_SKINS + for i in $(XENOMAI_REMOVE_SKIN_LIST) ; do \ + rm -f $(TARGET_DIR)/usr/lib/lib$$i.* ; \ + if [ $$i == "posix" ] ; then \ + rm -f $(TARGET_DIR)/usr/lib/posix.wrappers ; \ + fi ; \ + done +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_SKINS + +define XENOMAI_DEVICES +/dev/rtheap c 666 0 0 10 254 0 0 - +/dev/rtscope c 666 0 0 10 253 0 0 - +/dev/rtp c 666 0 0 150 0 0 1 32 +endef + +ifeq ($(BR2_PACKAGE_HAS_UDEV),y) +XENOMAI_DEPENDENCIES += udev + +define XENOMAI_INSTALL_UDEV_RULES + if test -d $(TARGET_DIR)/etc/udev/rules.d ; then \ + for f in $(@D)/ksrc/nucleus/udev/*.rules ; do \ + cp $$f $(TARGET_DIR)/etc/udev/rules.d/ || exit 1 ; \ + done ; \ + fi; +endef + +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_INSTALL_UDEV_RULES +endif # udev + +$(eval $(autotools-package)) diff --git a/package/xerces/Config.in b/package/xerces/Config.in new file mode 100644 index 0000000000..8d55a5cbc2 --- /dev/null +++ b/package/xerces/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XERCES + bool "xerces-c++" + depends on BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR + help + Xerces-C++ is a validating XML parser written in portable C++. + + http://xml.apache.org/xerces-c/ + +comment "xerces-c++ needs a toolchain w/ C++, wchar" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR) diff --git a/package/xerces/xerces.hash b/package/xerces/xerces.hash new file mode 100644 index 0000000000..639e668534 --- /dev/null +++ b/package/xerces/xerces.hash @@ -0,0 +1,2 @@ +# From http://www.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.3.tar.xz.sha256 +sha256 d35ae442db333f73c7ef41b2ce2e33bc8aba8dbacf582af765eda26415d25c94 xerces-c-3.1.3.tar.xz diff --git a/package/xerces/xerces.mk b/package/xerces/xerces.mk new file mode 100644 index 0000000000..e7f57b3c8e --- /dev/null +++ b/package/xerces/xerces.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# xerces +# +################################################################################ + +XERCES_VERSION = 3.1.3 +XERCES_SOURCE = xerces-c-$(XERCES_VERSION).tar.xz +XERCES_SITE = http://archive.apache.org/dist/xerces/c/3/sources +XERCES_LICENSE = Apache-2.0 +XERCES_LICENSE_FILES = LICENSE +XERCES_INSTALL_STAGING = YES +XERCES_CONF_OPTS = \ + --disable-threads \ + --with-gnu-ld + +define XERCES_DISABLE_SAMPLES + $(SED) 's/ samples//' $(@D)/Makefile.in +endef + +XERCES_POST_PATCH_HOOKS += XERCES_DISABLE_SAMPLES + +ifeq ($(BR2_PACKAGE_ICU),y) +XERCES_CONF_OPTS += --with-icu=$(STAGING_DIR)/usr +XERCES_DEPENDENCIES += icu +else +XERCES_CONF_OPTS += --without-icu +endif + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +XERCES_CONF_ENV += LIBS=-liconv +XERCES_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_PACKAGE_LIBCURL),y) +XERCES_CONF_OPTS += --enable-netaccessor-curl --with-curl=$(STAGING_DIR)/usr/lib +XERCES_DEPENDENCIES += libcurl +else +XERCES_CONF_OPTS += --disable-network +endif + +$(eval $(autotools-package)) diff --git a/package/xfsprogs/0001-mdrestore-do-not-do-dynamic-linking-of-libtool-libra.patch b/package/xfsprogs/0001-mdrestore-do-not-do-dynamic-linking-of-libtool-libra.patch new file mode 100644 index 0000000000..3f79dbbe99 --- /dev/null +++ b/package/xfsprogs/0001-mdrestore-do-not-do-dynamic-linking-of-libtool-libra.patch @@ -0,0 +1,40 @@ +mdrestore: do not do dynamic linking of libtool libraries + +This patch has been sent upstream: + + http://oss.sgi.com/pipermail/xfs/2015-November/045136.html + +Signed-off-by: Vicente Olivert Riera + +From a406326f724006d62085a0aeae1072b4145caa9d Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Wed, 25 Nov 2015 10:50:00 +0000 +Subject: [PATCH] mdrestore: do not do dynamic linking of libtool libraries + +As explained in commit ece49daeff1a3cad765e106d678c608925c9d768, use +-static-libtool-libs instead of -static to allow fallback to the dynamic +linking for libuuid only. Otherwise the build will fail like this: + +ld: attempted static link of dynamic object `/usr/lib/libuuid.so' + +Signed-off-by: Vicente Olivert Riera +--- + mdrestore/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mdrestore/Makefile b/mdrestore/Makefile +index 5171306..1b34a0e 100644 +--- a/mdrestore/Makefile ++++ b/mdrestore/Makefile +@@ -10,7 +10,7 @@ CFILES = xfs_mdrestore.c + + LLDLIBS = $(LIBXFS) $(LIBRT) $(LIBPTHREAD) $(LIBUUID) + LTDEPENDENCIES = $(LIBXFS) +-LLDFLAGS = -static ++LLDFLAGS = -static-libtool-libs + + default: depend $(LTCOMMAND) + +-- +2.4.10 + diff --git a/package/xfsprogs/0002-no-crc32-checks.patch b/package/xfsprogs/0002-no-crc32-checks.patch new file mode 100644 index 0000000000..6f97092475 --- /dev/null +++ b/package/xfsprogs/0002-no-crc32-checks.patch @@ -0,0 +1,32 @@ +libxfs: do not try to run the crc32selftest + +Even though the crc32selftest is natively compiled (because it is to be +executed), it fails in cross-compilation as the host may lack the +required headers, like uuid/uuid.h (e.g. in a minimal environment). + +Moreover, running the crc32selftest natively is completely wrong, +because it passing on the host does not mean it would still pass n the +target (because endianness or bitness or alignment differences). + +So, just disable running the crc32selftest altogether. + +Note that there's a remaining bug-in-hiding, because the crc32 table +generator is natively built, but with the target CFLAGS. + +Signed-off-by: "Yann E. MORIN" + +diff -durN xfsprogs-4.3.0.orig/libxfs/Makefile xfsprogs-4.3.0/libxfs/Makefile +--- xfsprogs-4.3.0.orig/libxfs/Makefile 2015-09-22 03:42:41.000000000 +0200 ++++ xfsprogs-4.3.0/libxfs/Makefile 2015-12-07 18:45:27.190082913 +0100 +@@ -105,9 +105,9 @@ + # don't try linking xfs_repair with a debug libxfs. + DEBUG = -DNDEBUG + +-LDIRT = gen_crc32table crc32table.h crc32selftest ++LDIRT = gen_crc32table crc32table.h + +-default: crc32selftest ltdepend $(LTLIBRARY) ++default: ltdepend $(LTLIBRARY) + + crc32table.h: gen_crc32table.c + @echo " [CC] gen_crc32table" diff --git a/package/xfsprogs/0003-xfsprogs-don-t-use-CFLAGS-with-BUILD_CC.patch b/package/xfsprogs/0003-xfsprogs-don-t-use-CFLAGS-with-BUILD_CC.patch new file mode 100644 index 0000000000..6617935bf7 --- /dev/null +++ b/package/xfsprogs/0003-xfsprogs-don-t-use-CFLAGS-with-BUILD_CC.patch @@ -0,0 +1,40 @@ +From 5b3dd8eb1f7720c68dab032c3d89d4e3102d6347 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Tue, 15 Dec 2015 20:51:35 -0300 +Subject: [PATCH] xfsprogs: don't use CFLAGS with BUILD_CC + +When cross-compiling CFLAGS might not be suitable for the host +(BUILD_CC) compiler since it might contain arch-specific options. + +Signed-off-by: Gustavo Zacarias +--- +Status: reported http://oss.sgi.com/bugzilla/show_bug.cgi?id=1132 + + libxfs/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libxfs/Makefile b/libxfs/Makefile +index ecf1921..3979077 100644 +--- a/libxfs/Makefile ++++ b/libxfs/Makefile +@@ -111,7 +111,7 @@ default: crc32selftest ltdepend $(LTLIBRARY) + + crc32table.h: gen_crc32table.c + @echo " [CC] gen_crc32table" +- $(Q) $(BUILD_CC) $(CFLAGS) -o gen_crc32table $< ++ $(Q) $(BUILD_CC) -o gen_crc32table $< + @echo " [GENERATE] $@" + $(Q) ./gen_crc32table > crc32table.h + +@@ -122,7 +122,7 @@ crc32table.h: gen_crc32table.c + # disk. + crc32selftest: gen_crc32table.c crc32table.h crc32.c + @echo " [TEST] CRC32" +- $(Q) $(BUILD_CC) $(CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@ ++ $(Q) $(BUILD_CC) -D CRC32_SELFTEST=1 crc32.c -o $@ + $(Q) ./$@ + + # set up include/xfs header directory +-- +2.4.10 + diff --git a/package/xfsprogs/Config.in b/package/xfsprogs/Config.in new file mode 100644 index 0000000000..2c24cbbc1c --- /dev/null +++ b/package/xfsprogs/Config.in @@ -0,0 +1,19 @@ + +comment "Note that xfsprogs needs a toolchain with UCLIBC_SV4_DEPRECATED and UCLIBC_HAS_OBSOLETE_BSD_SIGNAL enabled" + depends on BR2_PACKAGE_XFSPROGS + +comment "xfsprogs needs a toolchain w/ wchar" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR + +config BR2_PACKAGE_XFSPROGS + bool "xfsprogs" + depends on BR2_USE_MMU # fork() + depends on BR2_USE_WCHAR # util-linux + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + select BR2_PACKAGE_UTIL_LINUX_LIBBLKID + help + The XFS file system utilities and libraries + + http://oss.sgi.com/projects/xfs/ diff --git a/package/xfsprogs/xfsprogs.hash b/package/xfsprogs/xfsprogs.hash new file mode 100644 index 0000000000..d2502839d0 --- /dev/null +++ b/package/xfsprogs/xfsprogs.hash @@ -0,0 +1,3 @@ +# Locally calculated after checking pgp signature: +# ftp://oss.sgi.com/projects/xfs/cmd_tars/xfsprogs-4.5.0.tar.gz.sig +sha256 e49beb314984efbd0d758abb5c6137db3bb60a88e59e1e94c00defb536cf89f8 xfsprogs-4.5.0.tar.gz diff --git a/package/xfsprogs/xfsprogs.mk b/package/xfsprogs/xfsprogs.mk new file mode 100644 index 0000000000..fb72054ac1 --- /dev/null +++ b/package/xfsprogs/xfsprogs.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xfsprogs +# +################################################################################ + +XFSPROGS_VERSION = 4.5.0 +XFSPROGS_SITE = ftp://oss.sgi.com/projects/xfs/cmd_tars + +XFSPROGS_DEPENDENCIES = util-linux + +XFSPROGS_CONF_ENV = ac_cv_header_aio_h=yes ac_cv_lib_rt_lio_listio=yes +XFSPROGS_CONF_OPTS = \ + --enable-lib64=no \ + --enable-gettext=no \ + INSTALL_USER=root \ + INSTALL_GROUP=root \ + --enable-static + +XFSPROGS_INSTALL_TARGET_OPTS = DIST_ROOT=$(TARGET_DIR) install + +$(eval $(autotools-package)) diff --git a/package/xinetd/0001-ar.patch b/package/xinetd/0001-ar.patch new file mode 100644 index 0000000000..566f2f75ee --- /dev/null +++ b/package/xinetd/0001-ar.patch @@ -0,0 +1,74 @@ +This patch changes all of the hard-coded invocations of "ar" to $(AR), to +support a cross-compilation toolchain. + +The content of this patch was copied from the OpenWrt project: +https://dev.openwrt.org/browser/packages/net/xinetd/patches/001-ar.patch + +Signed-off-by: Danomi Manchego + +--- a/libs/src/misc/Makefile.in ++++ b/libs/src/misc/Makefile.in +@@ -62,7 +62,7 @@ + + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/portable/Makefile.in ++++ b/libs/src/portable/Makefile.in +@@ -57,7 +57,7 @@ + + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/pset/Makefile.in ++++ b/libs/src/pset/Makefile.in +@@ -53,7 +53,7 @@ + mv $(LIBNAME) $(LIBDIR)/optimized + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/sio/Makefile.in ++++ b/libs/src/sio/Makefile.in +@@ -52,7 +52,7 @@ + $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) +--- a/libs/src/str/Makefile.in ++++ b/libs/src/str/Makefile.in +@@ -63,7 +63,7 @@ + $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)-O + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + LINT_IGNORE=possible pointer alignment|RCSid unused +--- a/libs/src/xlog/Makefile.in ++++ b/libs/src/xlog/Makefile.in +@@ -58,7 +58,7 @@ + $(INSTALL) $(FMODE) $(LIBNAME) $(LIBDIR)/optimized + + $(LIBNAME): $(OBJECTS) +- ar r $@ $? ++ $(AR) r $@ $? + $(RANLIB) $@ + + install: $(LIBNAME) diff --git a/package/xinetd/0002-destdir.patch b/package/xinetd/0002-destdir.patch new file mode 100644 index 0000000000..7a323eb68a --- /dev/null +++ b/package/xinetd/0002-destdir.patch @@ -0,0 +1,55 @@ +This patch adds $(DESTDIR) to xinetd's installation paths, to support +installation to a cross-compiled RFS area. + +The content of this patch was inspired by the OpenWrt project: +https://dev.openwrt.org/browser/packages/net/xinetd/patches/002-destdir.patch + +Signed-off-by: Danomi Manchego + +diff -urN xinetd-2.3.15.ORIG/Makefile.in xinetd-2.3.15/Makefile.in +--- xinetd-2.3.15.ORIG/Makefile.in 2007-09-20 13:01:52.000000000 -0400 ++++ xinetd-2.3.15/Makefile.in 2012-06-18 10:20:00.540864388 -0400 +@@ -75,27 +75,27 @@ + + install: build + for i in $(DAEMONDIR) $(BINDIR) $(MANDIR)/man5 $(MANDIR)/man8 ; do \ +- test -d $$i || mkdir -p $$i ; done +- $(INSTALL_CMD) -m 755 xinetd/xinetd $(DAEMONDIR) +- $(INSTALL_CMD) -m 755 xinetd/itox $(DAEMONDIR) +- $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DAEMONDIR) +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(MANDIR)/man5/xinetd.conf.5 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(MANDIR)/man8/xinetd.log.8 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(MANDIR)/man8/xinetd.8 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(MANDIR)/man8/itox.8 +- $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(MANDIR)/man8/xconv.pl.8 ++ test -d $(DESTDIR)$$i || mkdir -p $(DESTDIR)$$i ; done ++ $(INSTALL_CMD) -m 755 xinetd/xinetd $(DESTDIR)$(DAEMONDIR) ++ $(INSTALL_CMD) -m 755 xinetd/itox $(DESTDIR)$(DAEMONDIR) ++ $(INSTALL_CMD) -m 755 $(SRCDIR)/xinetd/xconv.pl $(DESTDIR)$(DAEMONDIR) ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.conf.man $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.log.man $(DESTDIR)$(MANDIR)/man8/xinetd.log.8 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xinetd.man $(DESTDIR)$(MANDIR)/man8/xinetd.8 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/itox.8 $(DESTDIR)$(MANDIR)/man8/itox.8 ++ $(INSTALL_CMD) -m 644 $(SRCDIR)/xinetd/xconv.pl.8 $(DESTDIR)$(MANDIR)/man8/xconv.pl.8 + @echo "You must put your xinetd.conf in /etc/xinetd.conf" + @echo "There is a sample config file in xinetd/sample.conf and you can" + @echo "use xconv.pl to convert your old inetd.conf file to an xinetd format" + + uninstall: +- rm -f $(DAEMONDIR)/xinetd +- rm -f $(DAEMONDIR)/itox +- rm -f $(DAEMONDIR)/xconv.pl +- rm -f $(MANDIR)/man5/xinetd.conf.5 +- rm -f $(MANDIR)/man8/xinetd.log.8 +- rm -f $(MANDIR)/man8/xinetd.8 +- rm -f $(MANDIR)/man8/itox.8 ++ rm -f $(DESTDIR)$(DAEMONDIR)/xinetd ++ rm -f $(DESTDIR)$(DAEMONDIR)/itox ++ rm -f $(DESTDIR)$(DAEMONDIR)/xconv.pl ++ rm -f $(DESTDIR)$(MANDIR)/man5/xinetd.conf.5 ++ rm -f $(DESTDIR)$(MANDIR)/man8/xinetd.log.8 ++ rm -f $(DESTDIR)$(MANDIR)/man8/xinetd.8 ++ rm -f $(DESTDIR)$(MANDIR)/man8/itox.8 + + distclean: clean + rm -f config.cache config.log Makefile config.status xinetd/itox diff --git a/package/xinetd/0003-rpc-fix.patch b/package/xinetd/0003-rpc-fix.patch new file mode 100644 index 0000000000..6c32b7291e --- /dev/null +++ b/package/xinetd/0003-rpc-fix.patch @@ -0,0 +1,26 @@ +This patch fixes compiling xinetd without RPC support. + +The content of this patch was copied from the OpenWrt project: +https://dev.openwrt.org/browser/packages/net/xinetd/patches/003-rpc_fix.patch + +Signed-off-by: Danomi Manchego + +--- a/xinetd/confparse.c ++++ b/xinetd/confparse.c +@@ -745,7 +745,7 @@ static status_e check_entry( struct serv + } + } + +-/* #ifndef NO_RPC */ ++#ifndef NO_RPC + #if defined(HAVE_RPC_RPCENT_H) || defined(HAVE_NETDB_H) + if ( SC_IS_RPC( scp ) && !SC_IS_UNLISTED( scp ) ) + { +@@ -759,6 +759,7 @@ static status_e check_entry( struct serv + SC_RPCDATA( scp )->rd_program_number = rep->r_number ; + } + else ++#endif + #endif /* ! NO_RPC */ + { + if ( !SC_IS_UNLISTED( scp ) ) diff --git a/package/xinetd/0004-configure-rlim_t.patch b/package/xinetd/0004-configure-rlim_t.patch new file mode 100644 index 0000000000..e1cb48ac6a --- /dev/null +++ b/package/xinetd/0004-configure-rlim_t.patch @@ -0,0 +1,18 @@ +Have the configure script look for rlim_t in + +That's where POSIX says it should be. Some libcs will include its +definition via as well, but musl doesn't. + +Signed-off-by: Maarten ter Huurne + +--- xinetd-2.3.15.orig/configure 2007-09-20 16:58:27.000000000 +0200 ++++ xinetd-2.3.15/configure 2014-09-16 17:20:22.787665449 +0200 +@@ -7909,7 +7909,7 @@ + cat confdefs.h >>conftest.$ac_ext + cat >>conftest.$ac_ext <<_ACEOF + /* end confdefs.h. */ +-#include ++#include + #if STDC_HEADERS + #include + #endif diff --git a/package/xinetd/Config.in b/package/xinetd/Config.in new file mode 100644 index 0000000000..7f3575cedb --- /dev/null +++ b/package/xinetd/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_XINETD + bool "xinetd" + depends on BR2_USE_MMU # fork() + help + xinetd is a secure replacement for inetd. It was originally written by + panos@cs.colorado.edu. + + http://www.xinetd.org diff --git a/package/xinetd/xinetd.mk b/package/xinetd/xinetd.mk new file mode 100644 index 0000000000..98185122ce --- /dev/null +++ b/package/xinetd/xinetd.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# xinetd +# +################################################################################ + +XINETD_VERSION = xinetd-2-3-15 +XINETD_SITE = $(call github,xinetd-org,xinetd,$(XINETD_VERSION)) +XINETD_LICENSE = xinetd license +XINETD_LICENSE_FILES = COPYRIGHT + +XINETD_CFLAGS = $(TARGET_CFLAGS) + +# Three cases here: +# 1. We have libtirpc, use it by passing special flags +# 2. We have native RPC support, use it, no need to pass special +# flags (so this case 2 is implicit and not visible below) +# 3. We don't have RPC support, pass -DNO_RPC to disable it +ifeq ($(BR2_PACKAGE_LIBTIRPC),y) +XINETD_DEPENDENCIES += libtirpc host-pkgconf +XINETD_CFLAGS += "`$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`" +XINETD_LIBS += "`$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`" +else ifeq ($(BR2_TOOLCHAIN_HAS_NATIVE_RPC),) +XINETD_CFLAGS += -DNO_RPC +endif + +XINETD_CONF_ENV += \ + CFLAGS="$(XINETD_CFLAGS)" \ + LIBS="$(XINETD_LIBS)" + +XINETD_MAKE_OPTS = AR="$(TARGET_AR)" + +$(eval $(autotools-package)) diff --git a/package/xl2tp/0001-legacy.patch b/package/xl2tp/0001-legacy.patch new file mode 100644 index 0000000000..5279fd7079 --- /dev/null +++ b/package/xl2tp/0001-legacy.patch @@ -0,0 +1,17 @@ +Replace SUSV3-specific functions index, bcopy, bzero and bcmp by their +POSIX variants. + +--- l2tpd-0.70-pre20031121.oorig/osport.h 2004-07-08 22:47:52.000000000 +0200 ++++ l2tpd-0.70-pre20031121/osport.h 2006-12-28 15:32:50.000000000 +0100 +@@ -37,4 +37,11 @@ + + #endif /* defined(SOLARIS) */ + ++#if defined __UCLIBC__ && !defined UCLIBC_SUSV3_LEGACY_MACROS ++# define index(x, y) strchr(x, y) ++# define bcopy(S1, S2, LEN) ((void)memmove(S2, S1, LEN)) ++# define bzero(S1, LEN) ((void)memset(S1, 0, LEN)) ++# define bcmp(S1,S2,LEN) ((memcmp(S2, S1, LEN)==0)?0:1) ++#endif /* defined __UCLIBC__ && !defined UCLIBC_SUSV3_LEGACY_MACROS */ ++ + #endif /* _OSPORT_H_ */ diff --git a/package/xl2tp/0002-musl.patch b/package/xl2tp/0002-musl.patch new file mode 100644 index 0000000000..44238e87d0 --- /dev/null +++ b/package/xl2tp/0002-musl.patch @@ -0,0 +1,19 @@ +Fix musl build + +Downloaded from +http://git.alpinelinux.org/cgit/aports/tree/main/xl2tpd/xl2tpd-compile.patch + +Signed-off-by: Bernd Kuhls + +diff -u --recursive src.orig/xl2tpd-1.3.6/xl2tpd.c src/xl2tpd-1.3.6/xl2tpd.c +--- xl2tpd-1.3.6.orig/xl2tpd.c 2014-01-15 21:58:37.000000000 -0100 ++++ xl2tpd-1.3.6/xl2tpd.c 2014-06-21 07:22:21.195278618 -0200 +@@ -33,8 +33,6 @@ + #if (__GLIBC__ < 2) + # if defined(FREEBSD) || defined(OPENBSD) + # include +-# elif defined(LINUX) +-# include + # elif defined(SOLARIS) + # include + # endif diff --git a/package/xl2tp/Config.in b/package/xl2tp/Config.in new file mode 100644 index 0000000000..f0b1e834ae --- /dev/null +++ b/package/xl2tp/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_XL2TP + bool "xl2tp" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_LIBPCAP + select BR2_PACKAGE_OPENSSL + help + Layer 2 Tunnelling Protocol (RFC2661). + + xl2tpd is an open source implementation of the L2TP tunneling + protocol. xl2tpd is forked from l2tpd and is maintained by + Xelerance Corporation. + + http://www.xelerance.com/software/xl2tpd/ diff --git a/package/xl2tp/xl2tp.mk b/package/xl2tp/xl2tp.mk new file mode 100644 index 0000000000..a8237164a2 --- /dev/null +++ b/package/xl2tp/xl2tp.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# xl2tp +# +################################################################################ + +XL2TP_VERSION = v1.3.6 +XL2TP_SITE = $(call github,xelerance,xl2tpd,$(XL2TP_VERSION)) +XL2TP_DEPENDENCIES = libpcap openssl +XL2TP_LICENSE = GPLv2 +XL2TP_LICENSE_FILES = LICENSE + +ifeq ($(BR2_STATIC_LIBS),y) +XL2TP_LDLIBS = LDLIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`" +endif + +define XL2TP_BUILD_CMDS + $(SED) 's/ -O2 //' $(@D)/Makefile + $(TARGET_CONFIGURE_OPTS) $(MAKE) $(XL2TP_LDLIBS) -C $(@D) +endef + +define XL2TP_INSTALL_TARGET_CMDS + $(MAKE) DESTDIR=$(TARGET_DIR) PREFIX=/usr -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/xl2tp/xl2tpd b/package/xl2tp/xl2tpd new file mode 100755 index 0000000000..36c12a23f2 --- /dev/null +++ b/package/xl2tp/xl2tpd @@ -0,0 +1,27 @@ +#!/bin/sh +# +PATH=/bin:/usr/bin:/sbin:/usr/sbin +DAEMON=/usr/sbin/xl2tpd +PIDFILE=/var/run/xl2tpd.pid + +test -f $DAEMON || exit 0 + +case "$1" in + start) + start-stop-daemon -S -p $PIDFILE -x $DAEMON -- -D & + ;; + stop) + start-stop-daemon -K -p $PIDFILE -x $DAEMON + ;; + restart|force-reload) + start-stop-daemon -K -p $PIDFILE -x $DAEMON + sleep 1 + start-stop-daemon -S -p $PIDFILE -x $DAEMON + ;; + *) + echo "Usage: /etc/init.d/xl2tdp {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/package/xmlstarlet/0001-Fix-static-linking-problem-with-libgcrypt.patch b/package/xmlstarlet/0001-Fix-static-linking-problem-with-libgcrypt.patch new file mode 100644 index 0000000000..ea54c983a2 --- /dev/null +++ b/package/xmlstarlet/0001-Fix-static-linking-problem-with-libgcrypt.patch @@ -0,0 +1,46 @@ +From 8cee09b59a8c1ff2ebfc8c46097825d2eafdc4dd Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 16 May 2015 17:32:13 +0200 +Subject: [PATCH] Fix static linking problem with libgcrypt + +When libgcrypt is used, it is linked with libgpg-error, so we should +also test that libgpg-error is available, and include -lgpg-error in +the LIBS variable. + +This fixes build issues like: + + CCLD xml +/home/thomas/projets/buildroot/output/host/usr/bfin-buildroot-uclinux-uclibc/sysroot/usr/lib/libexslt.a(crypto.o): In function `_exsltCryptoGcryptInit': +crypto.c:(.text+0x112): undefined reference to `_gcry_check_version' +/home/thomas/projets/buildroot/output/host/usr/bfin-buildroot-uclinux-uclibc/sysroot/usr/lib/libexslt.a(crypto.o): In function `_exsltCryptoRc4DecryptFunction': +crypto.c:(.text+0x316): undefined reference to `_gcry_cipher_open' +crypto.c:(.text+0x32a): undefined reference to `_gcry_strerror' +crypto.c:(.text+0x34c): undefined reference to `_gcry_cipher_setkey' + +Which are caused by the AC_SEARCH_LIBS() test for libgcrypt to fail +due to -lgpg-error not been present in the LIBS variable. + +Note that using PKG_CHECK_MODULES() would be a much much better +replacement than this complicated handling of static libraries, but +it's a much more significant effort. + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index 4db0129..e378996 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -125,6 +125,7 @@ AS_IF([test "x$STATIC_LIBS" != xno], + [AC_SEARCH_LIBS([libiconv_open], [iconv], [], [], "$USER_LIBS")], "$USER_LIBS") + AC_SEARCH_LIBS([clock_gettime], [rt], [], [], "$USER_LIBS") + AC_SEARCH_LIBS([deflate], [z], [], [], "$USER_LIBS") ++ AC_SEARCH_LIBS([gpg_strerror], [gpg-error], [], [], "$USER_LIBS") + AC_SEARCH_LIBS([gcry_cipher_encrypt], [gcrypt], [], [], "$USER_LIBS") + + # Checks for inet libraries: +-- +2.1.0 + diff --git a/package/xmlstarlet/Config.in b/package/xmlstarlet/Config.in new file mode 100644 index 0000000000..99762b8761 --- /dev/null +++ b/package/xmlstarlet/Config.in @@ -0,0 +1,9 @@ +config BR2_PACKAGE_XMLSTARLET + bool "xmlstarlet" + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_LIBXSLT + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + help + Command Line XML Toolkit + + http://xmlstar.sourceforge.net/ diff --git a/package/xmlstarlet/xmlstarlet.hash b/package/xmlstarlet/xmlstarlet.hash new file mode 100644 index 0000000000..2d6558f791 --- /dev/null +++ b/package/xmlstarlet/xmlstarlet.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 47b4ed042ea2909257f2a386001af49fceb303f84da7214779ccf99fffc6bbba xmlstarlet-1.5.0.tar.gz diff --git a/package/xmlstarlet/xmlstarlet.mk b/package/xmlstarlet/xmlstarlet.mk new file mode 100644 index 0000000000..e0abf04502 --- /dev/null +++ b/package/xmlstarlet/xmlstarlet.mk @@ -0,0 +1,29 @@ +################################################################################ +# +# xmlstarlet +# +################################################################################ + +XMLSTARLET_VERSION = 1.5.0 +XMLSTARLET_SITE = http://downloads.sourceforge.net/project/xmlstar/xmlstarlet/$(XMLSTARLET_VERSION) +XMLSTARLET_LICENSE = MIT +XMLSTARLET_LICENSE_FILES = COPYING +# We're patching configure.ac +XMLSTARLET_AUTORECONF = YES + +XMLSTARLET_DEPENDENCIES += libxml2 libxslt \ + $(if $(BR2_PACKAGE_LIBICONV),libiconv) + +XMLSTARLET_CONF_OPTS += \ + --with-libxml-prefix=${STAGING_DIR}/usr \ + --with-libxslt-prefix=${STAGING_DIR}/usr \ + --with-libiconv-prefix=${STAGING_DIR}/usr + +ifeq ($(BR2_STATIC_LIBS),y) +XMLSTARLET_CONF_OPTS += --enable-static-libs +XMLSTARLET_CONF_ENV = LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libxml-2.0`" +else +XMLSTARLET_CONF_OPTS += --disable-static-libs +endif + +$(eval $(autotools-package)) diff --git a/package/xorriso/0001-fix-musl-build.patch b/package/xorriso/0001-fix-musl-build.patch new file mode 100644 index 0000000000..86d251d747 --- /dev/null +++ b/package/xorriso/0001-fix-musl-build.patch @@ -0,0 +1,20 @@ +Fix musl build + +Add missing header needed for ssize_t. + +Signed-off-by: Baruch Siach +--- +Patch status: posted upstream +(http://lists.gnu.org/archive/html/bug-xorriso/2016-05/msg00000.html) + +diff -Nuar xorriso-1.4.2-orig/libisofs/aaip_0_2.h xorriso-1.4.2/libisofs/aaip_0_2.h +--- xorriso-1.4.2-orig/libisofs/aaip_0_2.h 2015-11-28 16:41:33.000000000 +0200 ++++ xorriso-1.4.2/libisofs/aaip_0_2.h 2016-05-24 11:40:43.874191174 +0300 +@@ -16,6 +16,7 @@ + #ifndef Aaip_h_is_includeD + #define Aaip_h_is_includeD yes + ++#include + + /* --------------------------------- Encoder ---------------------------- */ + diff --git a/package/xorriso/Config.in b/package/xorriso/Config.in new file mode 100644 index 0000000000..f9bb10ac9c --- /dev/null +++ b/package/xorriso/Config.in @@ -0,0 +1,22 @@ +config BR2_PACKAGE_XORRISO + bool "xorriso" + select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_USE_MMU # fork() + help + xorriso copies file objects from POSIX compliant + filesystems into Rock Ridge enhanced ISO 9660 filesystems + and allows session-wise manipulation of such filesystems. + It can load the management information of existing ISO + images and it writes the session results to optical media + or to filesystem objects. + + Vice versa xorriso is able to copy file objects out of ISO + 9660 filesystems. + + https://www.gnu.org/software/xorriso + +comment "xorriso needs a toolchain w/ wchar, threads" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/xorriso/Config.in.host b/package/xorriso/Config.in.host new file mode 100644 index 0000000000..2baa043748 --- /dev/null +++ b/package/xorriso/Config.in.host @@ -0,0 +1,14 @@ +config BR2_PACKAGE_HOST_XORRISO + bool "host xorriso" + help + xorriso copies file objects from POSIX compliant + filesystems into Rock Ridge enhanced ISO 9660 filesystems + and allows session-wise manipulation of such filesystems. + It can load the management information of existing ISO + images and it writes the session results to optical media + or to filesystem objects. + + Vice versa xorriso is able to copy file objects out of ISO + 9660 filesystems. + + https://www.gnu.org/software/xorriso diff --git a/package/xorriso/xorriso.hash b/package/xorriso/xorriso.hash new file mode 100644 index 0000000000..3c2a726eff --- /dev/null +++ b/package/xorriso/xorriso.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 2843beded1aa4c678706e96fdf9cc5e4b34430b559bdf5bc35df5202125004b3 xorriso-1.4.2.tar.gz diff --git a/package/xorriso/xorriso.mk b/package/xorriso/xorriso.mk new file mode 100644 index 0000000000..57537e897e --- /dev/null +++ b/package/xorriso/xorriso.mk @@ -0,0 +1,77 @@ +################################################################################ +# +# xorriso +# +################################################################################ + +XORRISO_VERSION = 1.4.2 +XORRISO_SITE = $(BR2_GNU_MIRROR)/xorriso +XORRISO_LICENSE = GPLv3+ +XORRISO_LICENSE_FILES = COPYING COPYRIGHT +HOST_XORRISO_DEPENDENCIES = +# Disable everything until we actually need those feature, and add the correct +# host-libraries +HOST_XORRISO_CONF_OPTS = \ + --disable-zlib \ + --disable-bzip2 \ + --disable-libcdio \ + --disable-libreadline \ + --disable-libedit \ + --disable-libacl + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +XORRISO_DEPENDENCIES += libiconv +endif + +ifeq ($(BR2_PACKAGE_LIBCDIO),y) +XORRISO_DEPENDENCIES += host-pkgconf libcdio +XORRISO_CONF_OPTS += \ + --enable-pkg-check-modules \ + --enable-libcdio +else +XORRISO_CONF_OPTS += --disable-libcdio +endif + +ifeq ($(BR2_PACKAGE_READLINE),y) +XORRISO_DEPENDENCIES += readline +XORRISO_CONF_OPTS += --enable-libreadline +else +XORRISO_CONF_OPTS += --disable-libreadline +endif + +ifeq ($(BR2_PACKAGE_ACL),y) +XORRISO_DEPENDENCIES += acl +XORRISO_CONF_OPTS += --enable-libacl +else +XORRISO_CONF_OPTS += --disable-libacl +endif + +ifeq ($(BR2_PACKAGE_ATTR),y) +XORRISO_DEPENDENCIES += attr +XORRISO_CONF_OPTS += --enable-xattr +else +XORRISO_CONF_OPTS += --disable-xattr +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +XORRISO_DEPENDENCIES += zlib +XORRISO_CONF_OPTS += --enable-zlib +else +XORRISO_CONF_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_BZIP2),y) +XORRISO_DEPENDENCIES += bzip2 +XORRISO_CONF_OPTS += --enable-libbz2 +else +XORRISO_CONF_OPTS += --disable-libbz2 +endif + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +XORRISO_CONF_OPTS += --enable-jtethreads +else +XORRISO_CONF_OPTS += --disable-jtethreads +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/xscreensaver/0001-fix-cross-compile-ansi-c-bailout.patch b/package/xscreensaver/0001-fix-cross-compile-ansi-c-bailout.patch new file mode 100644 index 0000000000..6da9419e08 --- /dev/null +++ b/package/xscreensaver/0001-fix-cross-compile-ansi-c-bailout.patch @@ -0,0 +1,19 @@ +The configure bails out when cross-compiling, because it is over-cautious +about ANSI support in the C compiler. Work around this by disabling the +bail-out code. + +[Peter: updated for 5.32] +Signed-off-by: Simon Dawson +Signed-off-by: Peter Korsgaard + +diff -Nurp a/configure b/configure +--- a/configure 2013-07-16 10:23:32.000000000 +0100 ++++ b/configure 2013-09-22 14:50:07.186953454 +0100 +@@ -4374,7 +4374,6 @@ $as_echo "Solaris: adding -D__EXTENSIONS + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler works on ANSI C" >&5 + $as_echo_n "checking whether the compiler works on ANSI C... " >&6; } + if test "$cross_compiling" = yes; then : +- as_fn_error $? "Couldn't build even a trivial ANSI C program: check CC." "$LINENO" 5 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ diff --git a/package/xscreensaver/Config.in b/package/xscreensaver/Config.in new file mode 100644 index 0000000000..5213ce3695 --- /dev/null +++ b/package/xscreensaver/Config.in @@ -0,0 +1,30 @@ +config BR2_PACKAGE_XSCREENSAVER + bool "xscreensaver" + depends on BR2_PACKAGE_XORG7 + depends on BR2_INSTALL_LIBSTDCPP # libgtk2 -> pango + depends on BR2_TOOLCHAIN_HAS_THREADS # libgtk2 -> glib2 + depends on BR2_USE_WCHAR # libgtk2 -> glib2 + depends on BR2_USE_MMU # libgtk2 -> glib2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # libgtk2 -> pango -> harfbuzz + select BR2_PACKAGE_LIBGTK2 + select BR2_PACKAGE_LIBGLADE + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE + help + XScreenSaver is the standard screen saver collection shipped on most + Linux and Unix systems running the X11 Window System. + + On X11 systems, XScreenSaver is two things: it is both a large + collection of screen savers; and it is also the framework for + blanking and locking the screen. + + http://www.jwz.org/xscreensaver/ + +comment "xscreensaver needs a toolchain w/ wchar, C++, threads" + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || \ + !BR2_USE_WCHAR diff --git a/package/xscreensaver/xscreensaver.hash b/package/xscreensaver/xscreensaver.hash new file mode 100644 index 0000000000..7e7a07e3e3 --- /dev/null +++ b/package/xscreensaver/xscreensaver.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 4252a6079d2d2f5b342e8bdd172cbad5f0af73daf4e412b61a68344d91ca93bd xscreensaver-5.32.tar.gz diff --git a/package/xscreensaver/xscreensaver.mk b/package/xscreensaver/xscreensaver.mk new file mode 100644 index 0000000000..ec714fe399 --- /dev/null +++ b/package/xscreensaver/xscreensaver.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# xscreensaver +# +################################################################################ + +XSCREENSAVER_VERSION = 5.32 +XSCREENSAVER_SITE = http://www.jwz.org/xscreensaver + +# N.B. GPLv2+ code (in the hacks/glx subdirectory) is not currently built. +XSCREENSAVER_LICENSE = MIT-like GPLv2+ +XSCREENSAVER_LICENSE_FILES = hacks/screenhack.h hacks/glx/chessmodels.h + +XSCREENSAVER_DEPENDENCIES = jpeg libglade libgtk2 xlib_libX11 xlib_libXt \ + $(if $(BR2_PACKAGE_GETTEXT),gettext) host-intltool + +# otherwise we end up with host include/library dirs passed to the +# compiler/linker +XSCREENSAVER_CONF_OPTS = \ + --includedir=$(STAGING_DIR)/usr/include \ + --libdir=$(STAGING_DIR)/usr/lib + +XSCREENSAVER_INSTALL_TARGET_OPTS = install_prefix="$(TARGET_DIR)" install + +$(eval $(autotools-package)) diff --git a/package/xtables-addons/Config.in b/package/xtables-addons/Config.in new file mode 100644 index 0000000000..4538519609 --- /dev/null +++ b/package/xtables-addons/Config.in @@ -0,0 +1,19 @@ +comment "xtables-addons needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +comment "xtables-addons needs a toolchain w/ dynamic library, threads" + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS + +config BR2_PACKAGE_XTABLES_ADDONS + bool "xtables-addons" + depends on BR2_LINUX_KERNEL + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS # extensions are .so + select BR2_PACKAGE_IPTABLES + select BR2_LINUX_NEEDS_MODULES # not using kernel-module infra + help + Xtables-addons is the successor to patch-o-matic(-ng). + Likewise, it contains extensions that were not, or are not yet, + accepted in the main kernel/iptables packages. + + http://xtables-addons.sourceforge.net/ diff --git a/package/xtables-addons/xtables-addons.hash b/package/xtables-addons/xtables-addons.hash new file mode 100644 index 0000000000..be8cb6e4cf --- /dev/null +++ b/package/xtables-addons/xtables-addons.hash @@ -0,0 +1,4 @@ +# From http://sourceforge.net/projects/xtables-addons/files/Xtables-addons/2.10/ +sha1 bc6dcb1eb1328931189f6e73a1a02ef4cc51bc44 xtables-addons-2.10.tar.xz +# Calculated based on the hash above +sha256 2a2d92ae924437d757f55514502c6ef3aeccc6106f729c702efe703ad30f4007 xtables-addons-2.10.tar.xz diff --git a/package/xtables-addons/xtables-addons.mk b/package/xtables-addons/xtables-addons.mk new file mode 100644 index 0000000000..b4e5992a7a --- /dev/null +++ b/package/xtables-addons/xtables-addons.mk @@ -0,0 +1,33 @@ +################################################################################ +# +# xtables-addons +# +################################################################################ + +XTABLES_ADDONS_VERSION = 2.10 +XTABLES_ADDONS_SOURCE = xtables-addons-$(XTABLES_ADDONS_VERSION).tar.xz +XTABLES_ADDONS_SITE = http://downloads.sourceforge.net/project/xtables-addons/Xtables-addons +XTABLES_ADDONS_DEPENDENCIES = iptables linux host-pkgconf +XTABLES_ADDONS_LICENSE = GPLv2+ +XTABLES_ADDONS_LICENSE_FILES = LICENSE + +XTABLES_ADDONS_CONF_OPTS = \ + --with-kbuild="$(LINUX_DIR)" \ + --with-xtables="$(STAGING_DIR)/usr" \ + --with-xtlibdir="/usr/lib/xtables" + +# geoip helpers need perl with modules and unzip so disable +define XTABLES_DISABLE_GEOIP_HELPERS + $(SED) 's/ geoip//' $(@D)/Makefile.in +endef +XTABLES_ADDONS_POST_PATCH_HOOKS += XTABLES_DISABLE_GEOIP_HELPERS + +define XTABLES_ADDONS_BUILD_CMDS + $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) +endef + +define XTABLES_ADDONS_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) $(LINUX_MAKE_FLAGS) DESTDIR="$(TARGET_DIR)" install +endef + +$(eval $(autotools-package)) diff --git a/package/xterm/Config.in b/package/xterm/Config.in new file mode 100644 index 0000000000..e17d2c6d90 --- /dev/null +++ b/package/xterm/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_XTERM + bool "xterm" + select BR2_PACKAGE_NCURSES + select BR2_PACKAGE_XLIB_LIBXAW + depends on BR2_PACKAGE_XORG7 + depends on BR2_USE_MMU # fork() + help + xterm terminal emulator + + http://invisible-island.net/xterm/ diff --git a/package/xterm/xterm.hash b/package/xterm/xterm.hash new file mode 100644 index 0000000000..f68b29f1f9 --- /dev/null +++ b/package/xterm/xterm.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 70ecbec8d27789248e8ae2dc2cf159a2e189c152a6559a2b3df7f4838da36092 xterm-324.tgz diff --git a/package/xterm/xterm.mk b/package/xterm/xterm.mk new file mode 100644 index 0000000000..38271bb955 --- /dev/null +++ b/package/xterm/xterm.mk @@ -0,0 +1,25 @@ +################################################################################ +# +# xterm +# +################################################################################ + +XTERM_VERSION = 324 +XTERM_SOURCE = xterm-$(XTERM_VERSION).tgz +XTERM_SITE = http://invisible-mirror.net/archives/xterm +XTERM_DEPENDENCIES = ncurses xlib_libXaw host-pkgconf +XTERM_LICENSE = MIT +XTERM_LICENSE_FILES = version.c +XTERM_CONF_OPTS = --enable-256-color \ + --x-includes=$(STAGING_DIR)/usr/include \ + --x-libraries=$(STAGING_DIR)/usr/lib + +ifeq ($(BR2_PACKAGE_XLIB_LIBXFT),y) +XTERM_DEPENDENCIES += xlib_libXft +XTERM_CONF_OPTS += --enable-freetype \ + --with-freetype-config=auto +else +XTERM_CONF_OPTS += --disable-freetype +endif + +$(eval $(autotools-package)) diff --git a/package/xutil_util-macros/Config.in b/package/xutil_util-macros/Config.in new file mode 100644 index 0000000000..10b1a59a36 --- /dev/null +++ b/package/xutil_util-macros/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_XUTIL_UTIL_MACROS + bool "util-macros" + help + No description available diff --git a/package/xutil_util-macros/xutil_util-macros.hash b/package/xutil_util-macros/xutil_util-macros.hash new file mode 100644 index 0000000000..bcb6c585dd --- /dev/null +++ b/package/xutil_util-macros/xutil_util-macros.hash @@ -0,0 +1,2 @@ +# From http://article.gmane.org/gmane.comp.freedesktop.xorg.announce/2141 +sha256 2835b11829ee634e19fa56517b4cfc52ef39acea0cd82e15f68096e27cbed0ba util-macros-1.19.0.tar.bz2 diff --git a/package/xutil_util-macros/xutil_util-macros.mk b/package/xutil_util-macros/xutil_util-macros.mk new file mode 100644 index 0000000000..1451a0698d --- /dev/null +++ b/package/xutil_util-macros/xutil_util-macros.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# xutil_util-macros +# +################################################################################ + +XUTIL_UTIL_MACROS_VERSION = 1.19.0 +XUTIL_UTIL_MACROS_SOURCE = util-macros-$(XUTIL_UTIL_MACROS_VERSION).tar.bz2 +XUTIL_UTIL_MACROS_SITE = http://xorg.freedesktop.org/releases/individual/util +XUTIL_UTIL_MACROS_LICENSE = MIT +XUTIL_UTIL_MACROS_LICENSE_FILES = COPYING + +XUTIL_UTIL_MACROS_INSTALL_STAGING = YES +XUTIL_UTIL_MACROS_INSTALL_TARGET = NO + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/xvkbd/0001-makefile.patch b/package/xvkbd/0001-makefile.patch new file mode 100644 index 0000000000..a8f6577387 --- /dev/null +++ b/package/xvkbd/0001-makefile.patch @@ -0,0 +1,2400 @@ +--- a/Makefile 2008-03-04 06:14:55.425005441 -0500 ++++ b/Makefile 2008-03-05 08:40:50.000000000 -0500 +@@ -0,0 +1,2397 @@ ++# Makefile generated by imake - do not edit! ++# $Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $ ++ ++# ---------------------------------------------------------------------- ++# Makefile generated from "Imake.tmpl" and ++# $Xorg: Imake.tmpl,v 1.4 2000/08/17 19:41:46 cpqbld Exp $ ++# $XdotOrg: util/cf/Imake.tmpl,v 1.17 2006/04/15 15:55:25 herrb Exp $ ++# ++# ++# ++# ++# $XFree86: xc/config/cf/Imake.tmpl,v 3.155 2003/12/24 18:58:41 dickey Exp $ ++# ---------------------------------------------------------------------- ++ ++all:: ++ ++.SUFFIXES: .i ++ ++# $XdotOrg: util/cf/Imake.cf,v 1.12 2005/11/08 06:33:24 jkj Exp $ ++# $Xorg: Imake.cf,v 1.4 2000/08/17 19:41:45 cpqbld Exp $ ++ ++# $XFree86: xc/config/cf/Imake.cf,v 3.88 2003/12/16 21:30:21 herrb Exp $ ++ ++# Keep cpp from replacing path elements containing i486/i586/i686 ++ ++# ----------------------------------------------------------------------- ++# site-specific configuration parameters that need to come before ++# the platform-specific parameters - edit site.def to change ++ ++# site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $ ++ ++# site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $ ++ ++# $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $ ++ ++# ---------------------------------------------------------------------- ++# platform-specific configuration parameters - edit linux.cf to change ++ ++# $XdotOrg: util/cf/linux.cf,v 1.31 2005/10/21 19:10:27 ajax Exp $ ++# platform: $Xorg: linux.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ ++ ++# platform: $XFree86: xc/config/cf/linux.cf,v 3.220 2003/12/30 22:38:33 tsi Exp $ ++ ++# operating system: Linux 2.6.23.8-63.fc8 i686 [ELF] (2.6.23) ++# libc: (6.7.0) ++# binutils: (217) ++ ++# $Xorg: lnxLib.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ ++# $XFree86: xc/config/cf/lnxLib.rules,v 3.52 2003/10/31 20:49:03 herrb Exp $ ++ ++# $XdotOrg: util/cf/xorg.cf,v 1.53 2005/10/03 16:08:44 alanc Exp $ ++ ++# $Xorg: xfree86.cf,v 1.4 2000/08/17 19:41:49 cpqbld Exp $ ++ ++XORG_VERSION_CURRENT = (((6) * 10000000) + ((8) * 100000) + ((99) * 1000) + 903) ++RELEASE_VERSION = RELEASE-1 ++ ++AFB_DEFS = -DUSE_AFB ++ ++DRIVERSDKDIR = $(USRLIBDIR)/Server ++DRIVERSDKMODULEDIR = $(USRLIBDIR)/Server/modules ++DRIVERSDKINCLUDEDIR = $(USRLIBDIR)/Server/include ++ ++ XF86SRC = $(SERVERSRC)/hw/xfree86 ++ XF86COMSRC = $(XF86SRC)/common ++ XF86PARSERSRC = $(XF86SRC)/parser ++ XF86OSSRC = $(XF86SRC)/os-support ++ XF86DRIVERSRC = $(XF86SRC)/drivers ++ DRIVERSRC = $(XF86DRIVERSRC) ++ ++ XFREE86DOCDIR = $(DOCDIR) ++ XFREE86PSDOCDIR = $(DOCPSDIR) ++ XFREE86PDFDOCDIR = $(DOCPDFDIR) ++ XFREE86HTMLDOCDIR = $(DOCHTMLDIR) ++XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese ++ ++# $Xorg: xf86.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $ ++ ++# $XFree86: xc/config/cf/xf86.rules,v 3.34tsi Exp $ ++ ++# ---------------------------------------------------------------------- ++# site-specific configuration parameters that go after ++# the platform-specific parameters - edit site.def to change ++ ++# site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $ ++ ++# site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $ ++ ++# --------------------------------------------------------------------- ++# Imake rules for building libraries, programs, scripts, and data files ++# rules: $Xorg: Imake.rules,v 1.3 2000/08/17 19:41:46 cpqbld Exp $ ++# rules: $XdotOrg: util/cf/Imake.rules,v 1.11 2005/11/08 06:33:24 jkj Exp $ ++# ++# ++# ++# ++# rules: $XFree86: xc/config/cf/Imake.rules,v 3.128 2003/11/15 03:25:17 dawes Exp $ ++ ++.PHONY: all interfaces install install.man install.lib install.sdk depend includes cleandir ++ ++ _NULLCMD_ = @ echo -n ++ ++X_BYTE_ORDER = X_LITTLE_ENDIAN ++ ++GLIDE2INCDIR = ++ ++GLIDE3INCDIR = ++ ++GLIDE3LIBNAME = ++ ++TKLIBNAME = ++ ++TKLIBDIR = ++ ++TCLLIBNAME = ++ ++TCLIBDIR = ++ ++ PATHSEP = / ++ SHELL = /bin/sh -e ++ ++ TOP = . ++ CURRENT_DIR = . ++ ++ IMAKE = imake ++ DEPEND = gccmakedep ++ MKDIRHIER = mkdir -p ++ REVPATH = revpath ++ EXPORTLISTGEN = ++ RMAN = RmanCmd ++ RMANBASENAME = rman ++ RMANOPTIONS = RmanOptions ++ CONFIGSRC = $(TOP)/config ++ IMAKESRC = $(CONFIGSRC)/imake ++ DEPENDSRC = $(CONFIGSRC)/util ++ ++ INCROOT = /usr/include ++ USRLIBDIR = /usr/lib ++ VARDIR = /var ++ VARLIBDIR = $(VARDIR)/lib ++ SYSTEMUSRLIBDIR = /usr/lib ++ SYSTEMUSRINCDIR = /usr/include ++ SHLIBDIR = /usr/lib ++ LINTLIBDIR = $(USRLIBDIR)/lint ++ MANPATH = /usr/share/man ++ MANSOURCEPATH = $(MANPATH)/man ++ MANDIR = $(MANSOURCEPATH)1 ++ LIBMANDIR = $(MANSOURCEPATH)3 ++ FILEMANDIR = $(MANSOURCEPATH)5 ++ MISCMANDIR = $(MANSOURCEPATH)$(MISCMANSUFFIX) ++ DRIVERMANDIR = $(MANSOURCEPATH)$(DRIVERMANSUFFIX) ++ LOGDIRECTORY = $(VARDIR)/log ++ ++ VARRUNDIR = $(VARDIR)/run ++ ++ VARDBDIR = $(VARDIR)/lib ++ ++ AR = ar clq ++ ++# Nice try but useless: make will inherit BOOTSTRAPCFLAGS ++# from top Makefile ++ BOOTSTRAPCFLAGS = ++ ++ CC = gcc -m32 ++ AS = gcc -m32 -c -x assembler ++ ++.SUFFIXES: .cc ++ ++ CXX = c++ -m32 ++ ++ CXXFILT = c++filt ++ ++ CXXLIB = -lstdc++ ++ ++ CXXDEBUGFLAGS = -O2 -fno-strength-reduce -fno-strict-aliasing ++CXXDEPENDINCLUDES = ++ CXXEXTRA_DEFINES = ++CXXEXTRA_INCLUDES = ++ CXXSTD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(CXXPROJECT_DEFINES) ++ CXXOPTIONS = ++ CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) ++ CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(DEFINES) $(CXXEXTRA_DEFINES) ++ CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) ++ ++ COMPRESS = compress ++ GZIPCMD = gzip ++ ++ CPP = cpp $(STD_CPP_DEFINES) ++ RAWCPP = cpp -undef $(STD_CPP_OPTIONS) ++ PREPROCESSCMD = gcc -m32 -E $(STD_CPP_DEFINES) ++ ++ INSTALL = install ++ INSTALLFLAGS = -c ++ ++ LD = gcc -m32 -nostdlib ++ ++ LEX = flex -l ++ M4 = m4 ++ M4FLAGS = ++ LEXLIB = -lfl ++ YACC = bison -y ++ CCYACC = bison -y ++ ++ LINT = lint ++ ++ LINTLIBFLAG = -C ++ LINTOPTS = -axz ++ LN = ln -s ++ MAKE = make ++ MV = mv -f ++ CP = cp ++ ++ RANLIB = ranlib ++ ++ RANLIBINSTFLAGS = ++ ++ RM = rm -f ++ PERL = perl ++ PERLOPTS = ++ PERLENVSETUP = env LC_ALL=C ++ MANSUFFIX = 1x ++ LIBMANSUFFIX = 3x ++ FILEMANSUFFIX = 5x ++ MISCMANSUFFIX = 7 ++ DRIVERMANSUFFIX = 4 ++ ADMINMANSUFFIX = 8 ++ MANSRCSUFFIX = man ++ MANNEWSUFFIX = _man ++ MANDEFS = -D__apploaddir__=$(XAPPLOADDIR) -D__appmansuffix__=$(MANSUFFIX) -D__filemansuffix__=$(FILEMANSUFFIX) -D__libmansuffix__=$(LIBMANSUFFIX) -D__miscmansuffix__=$(MISCMANSUFFIX) -D__drivermansuffix__=$(DRIVERMANSUFFIX) -D__adminmansuffix__=$(ADMINMANSUFFIX) -D__projectroot__=$(PROJECTROOT) -D__xconfigfile__=$(XCONFIGFILE) -D__xconfigdir__=$(XCONFIGDIR) -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) $(XORGMANDEFS) $(VENDORMANDEFS) ++ ++ COMPRESSMANCMD = gzip -n ++ ++ TROFF = groff -Tps ++ NROFF = nroff ++ ++ MSMACROS = -ms ++ MANMACROS = -man ++ TBL = tbl ++ EQN = eqn ++ NEQN = neqn ++ COL = col ++ COLFLAGS = -b ++ ++ MODCC = gcc -m32 ++ ++ MODCPP = cpp ++ MODCFLAGS = $(CFLAGS) ++ MODAS = gcc -m32 -c -x assembler ++ MODASFLAGS = ++ ++ MODLD = gcc -m32 -nostdlib ++ ++ MODLDFLAGS = ++MODLDCOMBINEFLAGS = -r ++ MODAR = ar clq ++ ++ MODRANLIB = ranlib ++ ++ STD_INCLUDES = ++ STD_CPP_OPTIONS = -traditional ++ STD_CPP_DEFINES = -traditional -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(PROJECT_DEFINES) ++ STD_DEFINES = -Dlinux -D__i386__ -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE -D_XOPEN_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(PROJECT_DEFINES) ++ EXTRA_LOAD_FLAGS = ++ EXTRA_LDOPTIONS = ++ EXTRA_LIBRARIES = ++ TAGS = ctags ++ ++ PARALLELMFLAGS = ++ ++ SHAREDCODEDEF = ++ SHLIBDEF = ++ ++ SHLIBLDFLAGS = -shared $(SHLIBGLOBALSFLAGS) ++ ++ NOSTDLIB = -nostdlib ++ POSTNOSTDLIB = -Wl,-Bstatic -lgcc -Wl,-Bdynamic ++ ++ PICFLAGS = -fPIC ++ ++ CXXPICFLAGS = -fPIC ++ ++ PROTO_DEFINES = -DFUNCPROTO=15 -DNARROWPROTO ++ ++ INSTPGMFLAGS = ++ ++ INSTBINFLAGS = -m 0755 ++ INSTUIDFLAGS = -m 4711 ++ INSTLIBFLAGS = -m 0644 ++ INSTINCFLAGS = -m 0444 ++ INSTMANFLAGS = -m 0444 ++ INSTDATFLAGS = -m 0444 ++ INSTKMEMFLAGS = -m 4711 ++ ++ PROJECTROOT = /usr ++ ++ CDEBUGFLAGS = -O2 -fno-strength-reduce -fno-strict-aliasing ++ CCOPTIONS = ++ ++ ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(INSTALLED_INCLUDES) $(STD_INCLUDES) ++ ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) $(EXTRA_DEFINES) ++ CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES) ++ LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES) ++ LDPRELIB = -L$(USRLIBDIR) $(INSTALLED_LIBS) ++ LDPOSTLIB = ++ LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) ++ CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS) ++ ++ LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES) ++ ++ CCLINK = $(CC) ++ ++ CXXLINK = $(CXX) ++ ++ LDSTRIPFLAGS = -x ++ LDCOMBINEFLAGS = -r ++ DEPENDFLAGS = ++ DEPEND_DEFINES = ++ ++# Not sure this belongs here ++ TKLIBDIR = ++ TKINCDIR = ++ TKLIBNAME = ++ TKLIBRARY = -L$(TKLIBDIR) -l$(TKLIBNAME) ++ TCLLIBDIR = ++ TCLINCDIR = ++ TCLLIBNAME = ++ TCLLIBRARY = -L$(TCLLIBDIR) -l$(TCLLIBNAME) ++ ++ MACROFILE = linux.cf ++ RM_CMD = $(RM) ++ ++ IMAKE_DEFINES = ++ IMAKE_WARNINGS = -Wundef ++ ++ IRULESRC = $(CONFIGDIR) ++ IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_WARNINGS) ++ ++ ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) $(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules $(IRULESRC)/xorgsite.def $(IRULESRC)/host.def $(EXTRA_ICONFIGFILES) ++ ++# $Xorg: X11.rules,v 1.4 2000/08/17 19:41:46 cpqbld Exp $ ++ ++# $XFree86: xc/config/cf/X11.rules,v 1.6 2001/01/17 16:22:31 dawes Exp $ ++ ++# ---------------------------------------------------------------------- ++# X Window System Build Parameters and Rules ++# $XdotOrg: util/cf/X11.tmpl,v 1.54 2006/04/15 15:55:25 herrb Exp $ ++# $Xorg: X11.tmpl,v 1.6 2000/08/17 19:41:46 cpqbld Exp $ ++# ++# ++# ++# ++# $XFree86: xc/config/cf/X11.tmpl,v 1.248 2004/02/16 04:07:37 dawes Exp $ ++ ++XORGRELSTRING = `echo 6 8 99 903 | sed -e 's/ /./g' -e 's/^/Version\\\ /'` ++ XORGMANNAME = X Version 11 ++ ++STICKY_DEFINES = -DHAS_STICKY_DIR_BIT ++ ++FCHOWN_DEFINES = -DHAS_FCHOWN ++ ++# ----------------------------------------------------------------------- ++# X Window System make variables; these need to be coordinated with rules ++ ++ XTOP = $(TOP) ++ BINDIR = /usr/bin ++ BUILDINCROOT = $(TOP)/exports ++ BUILDINCDIR = $(BUILDINCROOT)/include ++ BUILDINCTOP = ../.. ++ BUILDLIBDIR = $(TOP)/exports/lib ++ BUILDLIBTOP = ../.. ++ BUILDBINDIR = $(TOP)/exports/bin ++ BUILDBINTOP = ../.. ++ BUILDMODULEDIR = $(BUILDLIBDIR)/modules ++ BUILDI18NDIR = $(BUILDLIBDIR)/locale ++ BUILDMODULETOP = $(BUILDLIBTOP)/.. ++ XBUILDINCROOT = $(XTOP)/exports ++ XBUILDINCDIR = $(XBUILDINCROOT)/include/X11 ++ XBUILDINCTOP = ../../.. ++ XBUILDBINDIR = $(XBUILDINCROOT)/bin ++ INCDIR = $(INCROOT) ++ ADMDIR = /usr/adm ++ LIBDIR = /usr/lib/X11 ++ SHAREDIR = /usr/share/X11 ++ LIBEXECDIR = /usr/libexec ++ MODULEDIR = $(USRLIBDIR)/modules ++ TOP_X_INCLUDES = ++ XBINDIR = $(PROJECTROOT)/bin ++ ++ INSTSRCDIR = /usr/src ++ ++ ETCX11DIR = /etc/X11 ++ ++ CONFDIR = $(ETCX11DIR) ++ ++ DOCDIR = $(LIBDIR)/doc ++ DOCHTMLDIR = $(DOCDIR)/html ++ DOCPSDIR = $(DOCDIR)/PostScript ++ DOCPDFDIR = $(DOCDIR)/PDF ++ FONTDIR = $(LIBDIR)/fonts ++ ENCODINGSDIR = $(LIBDIR)/fonts/encodings ++ XINITDIR = $(LIBDIR)/xinit ++ XDMDIR = $(LIBDIR)/xdm ++ XDMVARDIR = $(VARLIBDIR)/xdm ++ TWMDIR = $(LIBDIR)/twm ++ XSMDIR = $(LIBDIR)/xsm ++ NLSDIR = $(LIBDIR)/nls ++ XLOCALEDIR = $(LIBDIR)/locale ++ LBXPROXYDIR = $(LIBDIR)/lbxproxy ++ PROXYMANAGERDIR = $(LIBDIR)/proxymngr ++ XPRINTDIR = $(LIBDIR)/xserver ++ XAPPLOADDIR = /usr/share/X11/app-defaults ++ FONTCFLAGS = -t ++ ++ INSTAPPFLAGS = $(INSTDATFLAGS) ++ ++ RGB = $(XBINDIR)/rgb ++ FONTC = $(XBINDIR)/bdftopcf ++ MKFONTSCALE = $(XBINDIR)/mkfontscale ++ MKFONTDIR = $(XBINDIR)/mkfontdir ++ MKHTMLINDEX = $(XBINDIR)/mkhtmlindex ++ UCS2ANY = $(XBINDIR)/ucs2any ++ BDFTRUNCATE = $(XBINDIR)/bdftruncate ++ UCSMAPPREFIX = $(FONTDIR)/util/map- ++ XCURSORGEN = $(XBINDIR)/xcursorgen ++ ++ HTMLINDEXCMD = HtmlIndexCmd ++ ++ DOCUTILSRC = $(XTOP)/doc/util ++ CLIENTSRC = $(TOP)/clients ++ DEMOSRC = $(TOP)/demos ++ XDOCMACROS = $(DOCUTILSRC)/macros.t ++ XIDXMACROS = $(DOCUTILSRC)/indexmacros.t ++ PROGRAMSRC = $(TOP)/programs ++ LIBSRC = $(XTOP)/lib ++ FONTSRC = $(XTOP)/fonts ++ ENCODINGSSRC = $(FONTSRC)/encodings ++ INCLUDESRC = $(BUILDINCROOT)/include ++ XINCLUDESRC = $(INCLUDESRC)/X11 ++ SERVERSRC = $(XTOP)/programs/Xserver ++ CONTRIBSRC = $(XTOP)/../contrib ++ UNSUPPORTEDSRC = $(XTOP)/unsupported ++ DOCSRC = $(XTOP)/doc ++ RGBSRC = $(XTOP)/programs/rgb ++ BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf ++ MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir ++ FONTSERVERSRC = $(PROGRAMSRC)/xfs ++ FONTINCSRC = $(XTOP)/include/fonts ++ EXTINCSRC = $(XTOP)/include/extensions ++ FTSOURCEDIR = FreeTypeSrcDir ++ DRMSRCDIR = $(TOP)/extras/drm ++ MESASRCDIR = $(TOP)/extras/Mesa ++ OGLSAMPLESRCDIR = $(TOP)/extras/ogl-sample ++ PSWRAPSRC = $(XTOP)/config/pswrap ++ TRANSCOMMSRC = $(LIBSRC)/xtrans ++ TRANS_INCLUDES = -I$(TRANSCOMMSRC) ++ CONNECTION_FLAGS = -DUNIXCONN -DTCPCONN $(STICKY_DEFINES) $(FCHOWN_DEFINES) -DIPv6 ++XTRANS_FAILDEFINES = -DFAIL_HARD ++ ++ VENDORMANNAME = X.Org ++ VENDORMANVERSION = `echo 6 8 99 903 | sed -e 's/ /./g' -e 's/^/Version\\\ /'` ++ XORGMANDEFS = -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" ++ VENDORMANDEFS = -D__vendorversion__="$(VENDORMANVERSION) $(VENDORMANNAME)" ++ VENDORNAME = The X.Org Foundation ++ VENDORNAMESHORT = X.Org ++ ++ VENDORWEBSUPPORT = http://wiki.X.Org ++ ++VENDORSUPPORTDEFS = -D__VENDORDWEBSUPPORT__='"$(VENDORWEBSUPPORT)"' ++ ++ XKBDEFRULES = xorg ++ XKBDEFRULESDEFS = -D__XKBDEFRULES__='"$(XKBDEFRULES)"' ++ ++ XCONFIGFILE = xorg.conf ++ XCONFIGDIR = $(LIBDIR) ++ XLOGFILE = Xorg ++ XSERVERNAME = Xorg ++ ++ XENVLIBDIR = $(USRLIBDIR) ++ CLIENTENVSETUP = LD_LIBRARY_PATH=$(XENVLIBDIR) XLOCALEDIR=$(BUILDLIBDIR)/locale ++ ++# $Xorg: lnxLib.tmpl,v 1.3 2000/08/17 19:41:47 cpqbld Exp $ ++# $XFree86: xc/config/cf/lnxLib.tmpl,v 3.19 2003/10/15 22:47:48 herrb Exp $ ++ ++ XLIBSRC = $(LIBSRC)/X11 ++ ++SOXLIBREV = 6.2 ++DEPXONLYLIB = ++XONLYLIB = -lX11 ++ ++LINTXONLY = $(LINTLIBDIR)/llib-lX11.ln ++ ++ DEPXLIBONLY = $(DEPXONLYLIB) ++ XLIBONLY = $(XONLYLIB) ++ LINTXONLYLIB = $(LINTXONLY) ++ ++ XEXTLIBSRC = $(LIBSRC)/Xext ++ ++SOXEXTREV = 6.4 ++DEPEXTENSIONLIB = ++EXTENSIONLIB = -lXext ++ ++LINTEXTENSION = $(LINTLIBDIR)/llib-lXext.ln ++ ++LINTEXTENSIONLIB = $(LINTEXTENSION) ++ DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB) ++ XLIB = $(EXTENSIONLIB) $(XONLYLIB) ++ LINTXLIB = $(LINTXONLYLIB) ++ ++ XSSLIBSRC = $(LIBSRC)/Xss ++ ++SOXSSREV = 1.0 ++DEPXSSLIB = ++XSSLIB = -lXss ++ ++LINTXSS = $(LINTLIBDIR)/llib-lXss.ln ++ ++ XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc ++ ++SOXXF86MISCREV = 1.1 ++DEPXXF86MISCLIB = ++XXF86MISCLIB = -lXxf86misc ++ ++LINTXXF86MISC = $(LINTLIBDIR)/llib-lXxf86misc.ln ++ ++ XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm ++ ++SOXXF86VMREV = 1.0 ++DEPXXF86VMLIB = ++XXF86VMLIB = -lXxf86vm ++ ++LINTXXF86VM = $(LINTLIBDIR)/llib-lXxf86vm.ln ++ ++ XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga ++ ++SOXXF86DGAREV = 1.0 ++DEPXXF86DGALIB = ++XXF86DGALIB = -lXxf86dga ++ ++LINTXXF86DGA = $(LINTLIBDIR)/llib-lXxf86dga.ln ++ ++ XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush ++ ++SOXXF86RUSHREV = 1.0 ++DEPXXF86RUSHLIB = ++XXF86RUSHLIB = -lXxf86rush ++ ++LINTXXF86RUSH = $(LINTLIBDIR)/llib-lXxf86rush.ln ++ ++ XVLIBSRC = $(LIBSRC)/Xv ++ ++SOXVREV = 1.0 ++DEPXVLIB = ++XVLIB = -lXv ++ ++LINTXV = $(LINTLIBDIR)/llib-lXv.ln ++ ++ XVMCLIBSRC = $(LIBSRC)/XvMC ++ ++SOXVMCREV = 1.0 ++DEPXVMCLIB = ++XVMCLIB = -lXvMC ++ ++LINTXVMC = $(LINTLIBDIR)/llib-lXvMC.ln ++ ++ XINERAMALIBSRC = $(LIBSRC)/Xinerama ++ ++SOXINERAMAREV = 1.0 ++DEPXINERAMALIB = ++XINERAMALIB = -lXinerama ++ ++LINTXINERAMA = $(LINTLIBDIR)/llib-lXinerama.ln ++ ++ XRESLIBSRC = $(LIBSRC)/XRes ++ ++SOXRESREV = 1.0 ++DEPXRESLIB = ++XRESLIB = -lXRes ++ ++LINTXRES = $(LINTLIBDIR)/llib-lXRes.ln ++ ++ DMXLIBSRC = $(LIBSRC)/dmx ++ ++DEPDMXLIB = $(USRLIBDIR)/libdmx.a ++DMXLIB = -ldmx ++ ++LINTDMX = $(LINTLIBDIR)/llib-ldmx.ln ++ ++ DPSLIBSRC = $(LIBSRC)/dps ++ ++DEPDPSLIB = $(USRLIBDIR)/libdps.a ++DPSLIB = -ldps ++ ++LINTDPS = $(LINTLIBDIR)/llib-ldps.ln ++ ++ DPSTKLIBSRC = $(LIBSRC)/dpstk ++ ++DEPDPSTKLIB = $(USRLIBDIR)/libdpstk.a ++DPSTKLIB = -ldpstk ++ ++LINTDPSTK = $(LINTLIBDIR)/llib-ldpstk.ln ++ ++ PSRESLIBSRC = $(LIBSRC)/psres ++ ++DEPPSRESLIB = $(USRLIBDIR)/libpsres.a ++PSRESLIB = -lpsres ++ ++LINTPSRES = $(LINTLIBDIR)/llib-lpsres.ln ++ ++ GLULIBSRC = $(LIBSRC)/GLU ++ ++SOGLUREV = 1.3 ++DEPGLULIB = ++GLULIB = -lGLU ++ ++LINTGLU = $(LINTLIBDIR)/llib-lGLU.ln ++ ++ GLXLIBSRC = $(LIBSRC)/GL ++ ++SOGLREV = 1.2 ++DEPGLXLIB = ++GLXLIB = -lGL ++ ++LINTGLX = $(LINTLIBDIR)/llib-lGL.ln ++ ++ GLWIDGETSRC = $(LIBSRC)/GLw ++ ++SOGLWREV = 1.0 ++DEPGLWLIB = ++GLWLIB = -lGLw ++ ++LINTGLW = $(LINTLIBDIR)/llib-lGLw.ln ++ ++ XRENDERLIBSRC = $(LIBSRC)/Xrender ++ ++SOXRENDERREV = 1.2.2 ++DEPXRENDERLIB = ++XRENDERLIB = -lXrender ++ ++LINTXRENDER = $(LINTLIBDIR)/llib-lXrender.ln ++ ++ XRANDRLIBSRC = $(LIBSRC)/Xrandr ++ ++SOXRANDRREV = 2.0 ++DEPXRANDRLIB = ++XRANDRLIB = -lXrandr ++ ++LINTXRANDR = $(LINTLIBDIR)/llib-lXrandr.ln ++ ++ XFIXESLIBSRC = $(LIBSRC)/Xfixes ++ ++SOXFIXESREV = 3.0 ++DEPXFIXESLIB = ++XFIXESLIB = -lXfixes ++ ++LINTXFIXES = $(LINTLIBDIR)/llib-lXfixes.ln ++ ++ XDAMAGELIBSRC = $(LIBSRC)/Xdamage ++ ++SOXDAMAGEREV = 1.0 ++DEPXDAMAGELIB = ++XDAMAGELIB = -lXdamage ++ ++LINTXDAMAGE = $(LINTLIBDIR)/llib-lXdamage.ln ++ ++XCOMPOSITELIBSRC = $(LIBSRC)/Xcomposite ++ ++SOXCOMPOSITEREV = 1.0 ++DEPXCOMPOSITELIB = ++XCOMPOSITELIB = -lXcomposite ++ ++LINTXCOMPOSITE = $(LINTLIBDIR)/llib-lXcomposite.ln ++ ++XEVIELIBSRC = $(LIBSRC)/Xevie ++ ++SOXEVIEREV = 1.0 ++DEPXEVIELIB = ++XEVIELIB = -lXevie ++ ++LINTXEVIE = $(LINTLIBDIR)/llib-lXevie.ln ++ ++ XCURSORLIBSRC = $(LIBSRC)/Xcursor ++ ++SOXCURSORREV = 1.0.2 ++DEPXCURSORLIB = ++XCURSORLIB = -lXcursor ++ ++LINTXCURSOR = $(LINTLIBDIR)/llib-lXcursor.ln ++ ++ APPLEWMLIBSRC = $(LIBSRC)/apple ++ ++DEPAPPLEWMLIB = $(USRLIBDIR)/libAppleWM.a ++APPLEWMLIB = -lAppleWM ++ ++LINTAPPLEWM = $(LINTLIBDIR)/llib-lAppleWM.ln ++ ++ WINDOWSWMLIBSRC = $(LIBSRC)/windows ++ ++DEPWINDOWSWMLIB = $(USRLIBDIR)/libWindowsWM.a ++WINDOWSWMLIB = -lWindowsWM ++ ++LINTWINDOWSWM = $(LINTLIBDIR)/llib-lWindowsWM.ln ++ ++ XFONTCACHELIBSRC = $(LIBSRC)/Xfontcache ++ ++SOXFONTCACHEREV = 1.2 ++DEPXFONTCACHELIB = ++XFONTCACHELIB = -lXfontcache ++ ++LINTXFONTCACHE = $(LINTLIBDIR)/llib-lXfontcache.ln ++ ++ XAUTHSRC = $(LIBSRC)/Xau ++ ++SOXAUTHREV = 6.0 ++DEPXAUTHLIB = ++XAUTHLIB = -lXau ++ ++LINTXAUTH = $(LINTLIBDIR)/llib-lXau.ln ++ ++ XDMCPLIBSRC = $(LIBSRC)/Xdmcp ++ ++SOXDMCPREV = 6.0 ++DEPXDMCPLIB = ++XDMCPLIB = -lXdmcp ++ ++LINTXDMCP = $(LINTLIBDIR)/llib-lXdmcp.ln ++ ++ XMUSRC = $(LIBSRC)/Xmu ++ ++SOXMUREV = 6.2 ++DEPXMULIB = ++XMULIB = -lXmu ++ ++LINTXMU = $(LINTLIBDIR)/llib-lXmu.ln ++ ++ XMUUSRC = $(LIBSRC)/Xmuu ++ ++SOXMUUREV = 1.0 ++DEPXMUULIB = ++XMUULIB = -lXmuu ++ ++LINTXMUU = $(LINTLIBDIR)/llib-lXmuu.ln ++ ++ OLDXLIBSRC = $(LIBSRC)/oldX ++ ++DEPOLDXLIB = $(USRLIBDIR)/liboldX.a ++OLDXLIB = -loldX ++ ++LINTOLDX = $(LINTLIBDIR)/llib-loldX.ln ++ ++ XPLIBSRC = $(LIBSRC)/Xp ++ ++SOXPREV = 6.2 ++DEPXPLIB = ++XPLIB = -lXp ++ ++LINTXP = $(LINTLIBDIR)/llib-lXp.ln ++ ++ TOOLKITSRC = $(LIBSRC)/Xt ++ ++SOXTREV = 6.0 ++DEPXTOOLONLYLIB = ++XTOOLONLYLIB = -lXt ++ ++LINTXTOOLONLY = $(LINTLIBDIR)/llib-lXt.ln ++ ++ DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB) ++ XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB) ++ LINTXTOOLLIB = $(LINTXTOOLONLYLIB) ++ ++ XALIBSRC = $(LIBSRC)/Xa ++ ++SOXAREV = 1.0 ++DEPXALIB = ++XALIB = -lXa ++ ++LINTXA = $(LINTLIBDIR)/llib-lXa.ln ++ ++ AWIDGETSRC = $(LIBSRC)/Xaw ++ ++SOXAWREV = 8.0 ++DEPXAWLIB = ++XAWLIB = -lXaw ++ ++LINTXAW = $(LINTLIBDIR)/llib-lXaw.ln ++ ++ AWIDGET7SRC = $(LIBSRC)/Xaw7 ++ ++SOXAW7REV = 7.0 ++DEPXAW7LIB = ++XAW7LIB = -lXaw ++ ++LINTXAW7 = $(LINTLIBDIR)/llib-lXaw.ln ++ ++ AWIDGET6SRC = $(LIBSRC)/Xaw6 ++ ++SOXAW6REV = 6.1 ++DEPXAW6LIB = ++XAW6LIB = -lXaw ++ ++LINTXAW6 = $(LINTLIBDIR)/llib-lXaw.ln ++ ++ XILIBSRC = $(LIBSRC)/Xi ++ ++SOXINPUTREV = 6.0 ++DEPXILIB = ++XILIB = -lXi ++ ++LINTXI = $(LINTLIBDIR)/llib-lXi.ln ++ ++ XTESTLIBSRC = $(LIBSRC)/Xtst ++ ++SOXTESTREV = 6.1 ++DEPXTESTLIB = ++XTESTLIB = -lXtst ++ ++LINTXTEST = $(LINTLIBDIR)/llib-lXtst.ln ++ ++DEPXBSDLIB = $(USRLIBDIR)/libXbsd.a ++XBSDLIB = -lXbsd ++ ++LINTXBSD = $(LINTLIBDIR)/llib-lXbsd.ln ++ ++ ICESRC = $(LIBSRC)/ICE ++ ++SOICEREV = 6.4 ++DEPICELIB = ++ICELIB = -lICE ++ ++LINTICE = $(LINTLIBDIR)/llib-lICE.ln ++ ++ SMSRC = $(LIBSRC)/SM ++ ++SOSMREV = 6.0 ++DEPSMLIB = ++SMLIB = -lSM ++ ++LINTSM = $(LINTLIBDIR)/llib-lSM.ln ++ ++ XKEYSRC = $(LIBSRC)/Xkey ++ ++SOXKEYREV = 6.0 ++DEPXKEYLIB = ++XKEYLIB = -lXkey ++ ++LINTXKEY = $(LINTLIBDIR)/llib-lXkey.ln ++ ++ FSLIBSRC = $(LIBSRC)/FS ++ ++SOFSREV = 6.0 ++DEPFSLIB = ++FSLIB = -lFS ++ ++LINTFS = $(LINTLIBDIR)/llib-lFS.ln ++ ++ FONTLIBSRC = $(LIBSRC)/font ++ ++SOFONTREV = 1.5 ++DEPFONTLIB = ++FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) -lXfont ++ ++LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln ++# ++SOFONTREV = 1.5 ++DEPXFONTLIB = ++XFONTLIB = -lXfont ++ ++LINTXFONT = $(LINTLIBDIR)/llib-lXfont.ln ++ ++ FONTSTUBLIBSRC = $(FONTLIBSRC)/stubs ++ ++DEPFONTSTUBLIB = $(USRLIBDIR)/libfntstubs.a ++FONTSTUBLIB = -lfntstubs ++ ++LINTFONTSTUB = $(LINTLIBDIR)/llib-lfntstubs.ln ++ DEPFONTLIB = $(DEPXFONTLIB) $(DEPFONTSTUBLIB) ++ FONTLIB = $(XFONTLIB) $(FONTSTUBLIB) $(FREETYPE2LIB) ++ ++ FONTENCLIBSRC = $(LIBSRC)/fontenc ++ ++SOFONTENCREV = 1.0 ++DEPXFONTENCLIB = ++XFONTENCLIB = -lfontenc ++ ++LINTXFONTENC = $(LINTLIBDIR)/llib-lfontenc.ln ++ ++ XPMLIBSRC = $(LIBSRC)/Xpm ++ ++SOXPMREV = 4.11 ++DEPXPMLIB = ++XPMLIB = -lXpm ++ ++LINTXPM = $(LINTLIBDIR)/llib-lXpm.ln ++ ++FREETYPE2DIR = /usr ++FREETYPE2LIBDIR = /usr/lib ++FREETYPE2INCDIR = /usr/include ++ ++FREETYPE2LIB = -lfreetype ++ ++FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR)/freetype2 -I$(FREETYPE2INCDIR)/freetype2/config ++ ++FREETYPE2DEFINES = -DFREETYPE2 ++ ++ EXPATLIBSRC = $(LIBSRC)/expat ++ ++SOEXPATREV = 0.4 ++DEPEXPATLIB = ++EXPATLIB = -lexpat ++ ++LINTEXPAT = $(LINTLIBDIR)/llib-lexpat.ln ++ ++EXPATDIR = /usr ++EXPATLIBDIR = /usr/lib ++EXPATINCDIR = /usr/include ++ ++EXPATINCLUDES = ++ ++EXPATLIB = -lexpat ++ ++EXPATDEFINES = -DEXPAT ++ ++ XFT1LIBSRC = $(LIBSRC)/Xft1 ++ ++SOXFT1REV = 1.1 ++DEPXFT1LIB = ++XFT1LIB = -lXft ++ ++LINTXFT1 = $(LINTLIBDIR)/llib-lXft.ln ++ ++ XFTLIBSRC = $(LIBSRC)/Xft ++ ++SOXFTREV = 2.1.2 ++DEPXFTLIB = ++XFTLIB = -lXft ++ ++LINTXFT = $(LINTLIBDIR)/llib-lXft.ln ++ ++ FONTCONFIGLIBSRC = $(LIBSRC)/fontconfig ++ ++SOFONTCONFIGREV = 1.0.4 ++DEPFONTCONFIGLIB = ++FONTCONFIGLIB = -lfontconfig ++ ++LINTFONTCONFIG = $(LINTLIBDIR)/llib-lfontconfig.ln ++ ++FONTCONFIGINCDIR=$(INCDIR) ++ ++FONTCONFIGINCLUDES = -I$(FONTCONFIGINCDIR) ++ ++FCCACHE = $(BINDIR)/fc-cache ++ ++FONTCONFIGDEFINES = -DFONTCONFIG ++ ++XFTINCLUDES=$(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES) ++ ++LIBPNGINCDIR = /usr/include ++ ++LIBPNGINC= ++ ++LIBPNGDIR = /usr ++LIBPNGLIBDIR = /usr/lib ++LIBPNGINCDIR = /usr/include ++ ++LIBPNGLIB = -lpng ++ ++ XKBFILELIBSRC = $(LIBSRC)/xkbfile ++ ++SOXKBFILEREV = 1.0 ++DEPXKBFILELIB = ++XKBFILELIB = -lxkbfile ++ ++LINTXKBFILE = $(LINTLIBDIR)/llib-lxkbfile.ln ++ ++ XKBCOMPCMD = $(XBINDIR)/xkbcomp ++ ++ XKBUILIBSRC = $(LIBSRC)/xkbui ++ ++SOXKBUIREV = 1.0 ++DEPXKBUILIB = ++XKBUILIB = -lxkbui ++ ++LINTXKBUI = $(LINTLIBDIR)/llib-lxkbui.ln ++ ++EXTRAXAWREQS = ++ ++EXTRAXAWCLIENTDEPLIBS = ++ ++EXTRAXAWCLIENTLIBS = ++ ++ XTRAPLIBSRC = $(LIBSRC)/XTrap ++ ++SOXTRAPREV = 6.4 ++DEPXTRAPLIB = ++XTRAPLIB = -lXTrap ++ ++LINTXTRAP = $(LINTLIBDIR)/llib-lXTrap.ln ++ ++ DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB) ++ ++ DEPLIBS1 = $(DEPLIBS) ++ DEPLIBS2 = $(DEPLIBS) ++ DEPLIBS3 = $(DEPLIBS) ++ DEPLIBS4 = $(DEPLIBS) ++ DEPLIBS5 = $(DEPLIBS) ++ DEPLIBS6 = $(DEPLIBS) ++ DEPLIBS7 = $(DEPLIBS) ++ DEPLIBS8 = $(DEPLIBS) ++ DEPLIBS9 = $(DEPLIBS) ++ DEPLIBS10 = $(DEPLIBS) ++ ++ FCPRELOADPATTERN = libfontconfig.so.? ++ ++ XFTPRELOADPATTERN = libXft.so.? ++ XRENDERPRELOADPATTERN = libXrender.so.? ++ XFONTPRELOADPATTERN = libXfont*.so.? ++ ++XMULIBONLY = -lXmu ++XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB) ++ ++ CONFIGDIR = /usr/share/X11/config ++ ++ USRLIBDIRPATH = $(USRLIBDIR) ++ LDPRELIBS = -L$(USRLIBDIR) $(INSTALLED_LIBS) ++ LDPOSTLIBS = ++ TOP_INCLUDES = -I$(INCROOT) $(TOP_X_INCLUDES) ++ PROJECT_DEFINES = ++ VENDOR_DEFINES = -DXVENDORNAME='"$(VENDORNAME)"' -DXVENDORNAMESHORT='"$(VENDORNAMESHORT)"' ++ ++CXXPROJECT_DEFINES = ++ ++# ---------------------------------------------------------------------- ++# start of Imakefile ++ ++# Remove the next line if you want genuine Xaw instead of Xaw3d ++ ++# Remove the next line if you don't want to enable XTEST support ++ ++# Remove the next line if you want to disable internationalization ++ ++SRCS = xvkbd.c findwidget.c ++OBJS = xvkbd.o findwidget.o ++DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXPMLIB) $(EXTRAXAWCLIENTDEPLIBS) $(DEPXLIB) ++SYS_LIBRARIES = $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB) ++ ++D_XTEST = -DUSE_XTEST ++SYS_LIBRARIES = $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB) -lXtst ++ ++D_I18N = -DUSE_I18N ++ ++DEFINES = $(D_XAW3D) $(D_XTEST) $(D_I18N) ++ ++xvkbd.o: xvkbd.c resources.h XVkbd-common.h ++ $(RM) $@ ++ $(CC) -c $(CFLAGS) $*.c ++ ++ PROGRAM = xvkbd ++ ++all:: xvkbd ++ ++xvkbd: $(OBJS) $(DEPLIBS) ++ $(RM) $@ ++ $(CCLINK) -o $@ $(LDOPTIONS) $(OBJS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) ++ ++install:: xvkbd ++ @if [ -d $(DESTDIR)$(BINDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(BINDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(BINDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(BINDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTPGMFLAGS) xvkbd $(DESTDIR)$(BINDIR)/xvkbd ++ ++all:: xvkbd.$(MANNEWSUFFIX) ++ ++xvkbd.$(MANNEWSUFFIX): xvkbd.$(MANSRCSUFFIX) ++ $(RM) $@ ++ if test -z "$(PREPROCESSMANPAGES)" ; then \ ++ cd `dirname xvkbd` && \ ++ $(LN) `basename xvkbd.$(MANSRCSUFFIX)` `basename $@`; \ ++ else \ ++ $(RAWCPP) $(MANDEFS) $(EXTRAMANDEFS) \ ++ < xvkbd.$(MANSRCSUFFIX) | sed -e '/^# *[0-9][0-9]* *.*$$/d' -e '/^#line *[0-9][0-9]* *.*$$/d' -e '/^[ ]*XCOMM$$/s/XCOMM/#/' -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/#/' -e '/^[ ]*XHASH/s/XHASH/#/' -e '/\@\@$$/s/\@\@$$/\\/' >$@; \ ++ fi ++ ++cleandir:: ++ $(RM) xvkbd.$(MANNEWSUFFIX) ++ ++install.man:: xvkbd.$(MANNEWSUFFIX) ++ @if [ -d $(DESTDIR)$(MANDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(MANDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(MANDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(MANDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) xvkbd.$(MANNEWSUFFIX) $(DESTDIR)$(MANDIR)/xvkbd.$(MANSUFFIX) ++ ++depend:: ++ $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) ++ ++lint: ++ $(LINT) $(LINTFLAGS) $(SRCS) $(LINTLIBS) ++lint1: ++ $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS) ++ ++cleandir:: ++ $(RM) xvkbd ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-belgian.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-belgian.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-belgian ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-common.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-common.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-common ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-danish.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-danish.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-danish ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-fitaly.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-fitaly.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-fitaly ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-french.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-french.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-french ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-french2.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-french2.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-french2 ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-german.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-german.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-german ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-greek.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-greek.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-greek ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-hebrew.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-hebrew.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-hebrew ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-icelandic.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-icelandic.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-icelandic ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-italian.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-italian.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-italian ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-jisx6002.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-jisx6002.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-jisx6002 ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-jisx6004.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-jisx6004.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-jisx6004 ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-korean.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-korean.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-korean ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-latin1.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-latin1.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-latin1 ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-norwegian.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-norwegian.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-norwegian ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-portuguese.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-portuguese.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-portuguese ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-slovene.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-slovene.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-slovene ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-small.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-small.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-small ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-spanish.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-spanish.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-spanish ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-swedish.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-swedish.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-swedish ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-swissgerman.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-swissgerman.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-swissgerman ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-turkish.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-turkish.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-turkish ++ ++install:: ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ $(RM) $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ fi ++ @if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(LIBDIR)/. ]; then \ ++ (set -x; rm -f $(DESTDIR)$(LIBDIR)/.); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(LIBDIR)/.); \ ++ fi ++ @if [ -d $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(CONFDIR)/app-defaults ]; then \ ++ (set -x; rm -f $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(CONFDIR)/app-defaults); \ ++ fi ++ @for flag in ${MAKEFLAGS} ''; do \ ++ case "$$flag" in *=*) ;; --*) ;; *[i]*) set +e;; esac; done; \ ++ if [ -d $(DESTDIR)$(LIBDIR)/. ]; then \ ++ RELPATH=`echo $(LIBDIR)/. | \ ++ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ ++ cd $(DESTDIR)$(LIBDIR)/.; \ ++ if [ -d app-defaults -a ! -h app-defaults ]; then \ ++ (cd app-defaults; tar cf - . | \ ++ (cd $(DESTDIR)$(CONFDIR)/app-defaults; \ ++ tar xf -; exit 0); exit 0); \ ++ fi; \ ++ $(RM) -r app-defaults; \ ++ $(LN) $${RELPATH}$(CONFDIR)/app-defaults .; \ ++ fi ++ ++install:: XVkbd-uk.ad ++ @if [ -d $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ set +x; \ ++ else \ ++ if [ -h $(DESTDIR)$(XAPPLOADDIR) ]; then \ ++ (set -x; rm -f $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi; \ ++ (set -x; $(MKDIRHIER) $(DESTDIR)$(XAPPLOADDIR)); \ ++ fi ++ $(INSTALL) $(INSTALLFLAGS) $(INSTAPPFLAGS) XVkbd-uk.ad $(DESTDIR)$(XAPPLOADDIR)/XVkbd-uk ++ ++# ============================ ++# These rules are only for me ++ ++_distclean: cleandir ++ -rm Makefile ++ ++XVkbd-common.h: XVkbd-common.ad ++ -which ad2c > /dev/null && ad2c XVkbd-common.ad > XVkbd-common.h ++ ++HTML = $(HOME)/public_html/homepage3.nifty.com/xvkbd/index.html ++_readme: ++ -[ -f $(HTML) ] && html2man $(HTML) > xvkbd.man ++ ( echo ".pl 10000"; echo ".ll 75"; echo ".hy 0"; echo ".ad l" ) | cat - xvkbd.man | groff -Tascii -man | sed 's/.//g' | head -9000 | cat -s | tail +3 > README ++ ++# ============================ ++ ++# ---------------------------------------------------------------------- ++# common rules for all Makefiles - do not edit ++ ++.c.i: ++ $(RM) $@ ++ $(CC) -E $(CFLAGS) $(_NOOP_) $*.c > $@ ++ ++.SUFFIXES: .ii ++ ++.cc.ii: ++ $(RM) $@ ++ $(CC) -E $(CFLAGS) $(_NOOP_) $*.cc > $@ ++ ++.SUFFIXES: .s ++ ++.c.s: ++ $(RM) $@ ++ $(CC) -S $(CFLAGS) $(_NOOP_) $*.c ++ ++.cc.s: ++ $(RM) $@ ++ $(CC) -S $(CFLAGS) $(_NOOP_) $*.cc ++ ++emptyrule:: ++ ++cleandir:: ++ $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut "#"* ++ ++Makefile:: ++ -@if [ -f Makefile ]; then set -x; \ ++ $(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \ ++ else exit 0; fi ++ $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) ++ ++tags:: ++ $(TAGS) -w *.[ch] ++ $(TAGS) -xw *.[ch] > TAGS ++ ++man_keywords:: ++ ++html_index:: ++ ++clean:: cleandir ++ ++distclean:: cleandir ++ ++# ---------------------------------------------------------------------- ++# empty rules for directories that do not have SUBDIRS - do not edit ++ ++install:: ++ @echo "install in $(CURRENT_DIR) done" ++ ++install.man:: ++ @echo "install.man in $(CURRENT_DIR) done" ++ ++install.sdk:: ++ @echo "install.sdk in $(CURRENT_DIR) done" ++ ++Makefiles:: ++ ++includes:: ++ ++depend:: ++ ++distclean:: ++ $(RM) Makefile Makefile.dep ++ ++# ---------------------------------------------------------------------- ++# dependencies generated by makedepend ++ diff --git a/package/xvkbd/Config.in b/package/xvkbd/Config.in new file mode 100644 index 0000000000..464a6ef723 --- /dev/null +++ b/package/xvkbd/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_XVKBD + bool "xvkbd" + depends on BR2_PACKAGE_XORG7 + select BR2_PACKAGE_XLIB_LIBICE + select BR2_PACKAGE_XLIB_LIBSM + select BR2_PACKAGE_XLIB_LIBX11 + select BR2_PACKAGE_XLIB_LIBXAW + select BR2_PACKAGE_XLIB_LIBXEXT + select BR2_PACKAGE_XLIB_LIBXMU + select BR2_PACKAGE_XLIB_LIBXPM + select BR2_PACKAGE_XLIB_LIBXT + select BR2_PACKAGE_XLIB_LIBXTST + help + on-screen keyboard for X + + http://t-sato.in.coocan.jp/xvkbd diff --git a/package/xvkbd/xvkbd.hash b/package/xvkbd/xvkbd.hash new file mode 100644 index 0000000000..18148e5e09 --- /dev/null +++ b/package/xvkbd/xvkbd.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 895f768269820e7c0379b0daac3687bda0c670d192ebb7e61e5613a5939ec90b xvkbd-3.7.tar.gz diff --git a/package/xvkbd/xvkbd.mk b/package/xvkbd/xvkbd.mk new file mode 100644 index 0000000000..e03f7233aa --- /dev/null +++ b/package/xvkbd/xvkbd.mk @@ -0,0 +1,34 @@ +################################################################################ +# +# xvkbd +# +################################################################################ + +XVKBD_VERSION = 3.7 +XVKBD_SITE = http://t-sato.in.coocan.jp/xvkbd +XVKBD_LICENSE = GPLv2+ +XVKBD_LICENSE_FILES = README + +# Passing USRLIBDIR ensures that the stupid Makefile doesn't add +# /usr/lib to the library search path. +define XVKBD_BUILD_CMDS + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + USRLIBDIR="$(STAGING_DIR)/usr/lib" +endef + +define XVKBD_INSTALL_TARGET_CMDS + $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + +XVKBD_DEPENDENCIES = \ + xlib_libICE \ + xlib_libSM \ + xlib_libX11 \ + xlib_libXaw \ + xlib_libXext \ + xlib_libXmu \ + xlib_libXpm \ + xlib_libXt \ + xlib_libXtst + +$(eval $(generic-package)) diff --git a/package/xxhash/Config.in b/package/xxhash/Config.in new file mode 100644 index 0000000000..f2cccda2c5 --- /dev/null +++ b/package/xxhash/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_XXHASH + bool "xxhash" + help + xxHash is an extremely fast hash algorithm, running at RAM + speed limits. + + https://github.com/Cyan4973/xxHash diff --git a/package/xxhash/xxhash.mk b/package/xxhash/xxhash.mk new file mode 100644 index 0000000000..47ead7507e --- /dev/null +++ b/package/xxhash/xxhash.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# xxhash +# +################################################################################ + +XXHASH_VERSION = r40 +XXHASH_SITE = $(call github,Cyan4973,xxHash,$(XXHASH_VERSION)) +XXHASH_LICENSE = BSD-2c, GPLv2+ +XXHASH_LICENSE_FILES = LICENSE xxhsum.c + +define XXHASH_BUILD_CMDS + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) xxhsum +endef + +define XXHASH_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/xxhsum $(TARGET_DIR)/usr/bin/xxhsum +endef + +$(eval $(generic-package)) diff --git a/package/xz/Config.in b/package/xz/Config.in new file mode 100644 index 0000000000..50116f2995 --- /dev/null +++ b/package/xz/Config.in @@ -0,0 +1,14 @@ +config BR2_PACKAGE_XZ + bool "xz-utils" + help + XZ is the successor to the Lempel-Ziv/Markov-chain Algorithm + compression format, which provides memory-hungry but powerful + compression (often better than bzip2) and fast, easy decompression. + + This package provides the command line tools for working with XZ + compression, including xz, unxz, xzcat, xzgrep, and so on. They can + also handle the older LZMA format, and if invoked via appropriate + symlinks will emulate the behavior of the commands in the lzma + package. + + http://tukaani.org/xz/ diff --git a/package/xz/xz.hash b/package/xz/xz.hash new file mode 100644 index 0000000000..f723f7e305 --- /dev/null +++ b/package/xz/xz.hash @@ -0,0 +1,2 @@ +# Locally calculated after checking pgp signature +sha256 6ff5f57a4b9167155e35e6da8b529de69270efb2b4cf3fbabf41a4ee793840b5 xz-5.2.2.tar.bz2 diff --git a/package/xz/xz.mk b/package/xz/xz.mk new file mode 100644 index 0000000000..5e1d7c6f15 --- /dev/null +++ b/package/xz/xz.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# xz +# +################################################################################ + +XZ_VERSION = 5.2.2 +XZ_SOURCE = xz-$(XZ_VERSION).tar.bz2 +XZ_SITE = http://tukaani.org/xz +XZ_INSTALL_STAGING = YES +XZ_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99' +XZ_LICENSE = GPLv2+, GPLv3+, LGPLv2.1+ +XZ_LICENSE_FILES = COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 + +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +XZ_CONF_OPTS = --enable-threads +else +XZ_CONF_OPTS = --disable-threads +endif + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/yad/Config.in b/package/yad/Config.in new file mode 100644 index 0000000000..50b97c59ab --- /dev/null +++ b/package/yad/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_YAD + bool "yad" + depends on BR2_PACKAGE_XORG7 + depends on BR2_PACKAGE_LIBGTK2 || BR2_PACKAGE_LIBGTK3_X11 + help + YAD (yet another dialog) is a tool for create graphical dialogs + from shell scripts. + + http://sourceforge.net/projects/yad-dialog/ + +comment "yad needs libgtk2 or libgtk3 w/ X11 backend" + depends on BR2_PACKAGE_XORG7 + depends on !BR2_PACKAGE_LIBGTK2 && !BR2_PACKAGE_LIBGTK3_X11 diff --git a/package/yad/yad.hash b/package/yad/yad.hash new file mode 100644 index 0000000000..18392829e8 --- /dev/null +++ b/package/yad/yad.hash @@ -0,0 +1,3 @@ +# From http://sourceforge.net/projects/yad-dialog/files/ +md5 4e24888712be1e95fd3cea815f19c6cb yad-0.33.1.tar.xz +sha1 b39977128678ca67bf4649929510f729c9cf1e67 yad-0.33.1.tar.xz diff --git a/package/yad/yad.mk b/package/yad/yad.mk new file mode 100644 index 0000000000..a7f5ba2589 --- /dev/null +++ b/package/yad/yad.mk @@ -0,0 +1,23 @@ +################################################################################ +# +# yad +# +################################################################################ + +YAD_VERSION = 0.33.1 +YAD_SOURCE = yad-$(YAD_VERSION).tar.xz +YAD_SITE = http://sourceforge.net/projects/yad-dialog/files +YAD_LICENSE = GPLv3 +YAD_LICENSE_FILES = COPYING +YAD_DEPENDENCIES = host-intltool host-pkgconf +YAD_CONF_OPTS = --enable-html=no + +ifeq ($(BR2_PACKAGE_LIBGTK3_X11),y) +YAD_DEPENDENCIES += libgtk3 +YAD_CONF_OPTS += --with-gtk=gtk3 +else +YAD_DEPENDENCIES += libgtk2 +YAD_CONF_OPTS += --with-gtk=gtk2 +endif + +$(eval $(autotools-package)) diff --git a/package/yaffs2utils/yaffs2utils.mk b/package/yaffs2utils/yaffs2utils.mk new file mode 100644 index 0000000000..fdd5f67e45 --- /dev/null +++ b/package/yaffs2utils/yaffs2utils.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# yaffs2utils +# +################################################################################ + +YAFFS2UTILS_VERSION = 0.2.9 +YAFFS2UTILS_SOURCE = $(YAFFS2UTILS_VERSION).tar.gz +YAFFS2UTILS_SITE = https://yaffs2utils.googlecode.com/files +YAFFS2UTILS_LICENSE = GPLv2 +YAFFS2UTILS_LICENSE_FILES = COPYING + +define HOST_YAFFS2UTILS_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) +endef + +define HOST_YAFFS2UTILS_INSTALL_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) INSTALLDIR=$(HOST_DIR)/usr/bin install +endef + +$(eval $(host-generic-package)) diff --git a/package/yajl/0001-Let-the-shared-and-the-static-library-have-the-same-.patch b/package/yajl/0001-Let-the-shared-and-the-static-library-have-the-same-.patch new file mode 100644 index 0000000000..0023a1da43 --- /dev/null +++ b/package/yajl/0001-Let-the-shared-and-the-static-library-have-the-same-.patch @@ -0,0 +1,34 @@ +From b08fe001e3d3f3564ef298e62342f07080807f7a Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Wed, 28 Oct 2015 15:45:10 +0000 +Subject: [PATCH] Let the shared and the static library have the same name +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The will be differentiated by the extension (.so or .a). + +Fetched from: +https://github.com/vriera/yajl/commit/6d09f11b8fd358cab0e31b965327e64a599f9ce9 + +Signed-off-by: Vicente Olivert Riera +Signed-off-by: Jörg Krause +--- + src/CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 99cf9e9..1a900d3 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -36,6 +36,7 @@ SET (shareDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/share/pkgconfig) + SET(LIBRARY_OUTPUT_PATH ${libDir}) + + ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS}) ++SET_TARGET_PROPERTIES(yajl_s PROPERTIES OUTPUT_NAME yajl) + + ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS}) + +-- +2.8.0 + diff --git a/package/yajl/0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch b/package/yajl/0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch new file mode 100644 index 0000000000..53decca649 --- /dev/null +++ b/package/yajl/0002-cmake-disable-shared-library-build-when-BUILD_SHARED.patch @@ -0,0 +1,49 @@ +From b3cddf92adacfe5ca40574afb3e323cc7cdebc5c Mon Sep 17 00:00:00 2001 +From: Maxime Hadjinlian +Date: Tue, 2 Feb 2016 15:46:09 +0100 +Subject: [PATCH] cmake: Add shared library conditonnal build + +When BUILD_SHARED_LIBS is off, you don't want to build the shared +library. + +Signed-off-by: Samuel Martin +--- + src/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 99cf9e9..9e9c77d 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -37,6 +37,7 @@ SET(LIBRARY_OUTPUT_PATH ${libDir}) + + ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS}) + ++IF(BUILD_SHARED_LIBS) + ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS}) + + #### setup shared library version number +@@ -51,6 +52,7 @@ IF(APPLE) + SET_TARGET_PROPERTIES(yajl PROPERTIES + INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib") + ENDIF(APPLE) ++ENDIF(BUILD_SHARED_LIBS) + + #### build up an sdk as a post build step + +@@ -77,10 +79,12 @@ INCLUDE_DIRECTORIES(${incDir}/..) + + # at build time you may specify the cmake variable LIB_SUFFIX to handle + # 64-bit systems which use 'lib64' ++IF(BUILD_SHARED_LIBS) + INSTALL(TARGETS yajl + RUNTIME DESTINATION lib${LIB_SUFFIX} + LIBRARY DESTINATION lib${LIB_SUFFIX} + ARCHIVE DESTINATION lib${LIB_SUFFIX}) ++ENDIF(BUILD_SHARED_LIBS) + INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX}) + INSTALL(FILES ${PUB_HDRS} DESTINATION include/yajl) + INSTALL(FILES ${incDir}/yajl_version.h DESTINATION include/yajl) +-- +2.7.0 + diff --git a/package/yajl/0003-Link-with-shared-libyajl-in-a-shared-build.patch b/package/yajl/0003-Link-with-shared-libyajl-in-a-shared-build.patch new file mode 100644 index 0000000000..d3c91f2b9e --- /dev/null +++ b/package/yajl/0003-Link-with-shared-libyajl-in-a-shared-build.patch @@ -0,0 +1,127 @@ +From 425b25993ef58d07aa18c5d4938876a90e22c47a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Sat, 9 Apr 2016 23:24:27 +0200 +Subject: [PATCH] Link with shared libyajl in a shared build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Building yajl in a static context fails in a parallel build: + +[ 21%] Linking C executable gen-extra-close +[ 26%] Building C object src/CMakeFiles/yajl_s.dir/yajl_buf.c.o +/home/test/autobuild/instance-3/output/host/opt/ext-toolchain/bfin-uclinux/bfin-uclinux/bin/ld.real: cannot find -lyajl + +Fix this issue by linking against the shared libyail in a shared build. Apply +this fix also to all other build targets who are linking against the library. + +Upstream status: Pending +https://github.com/lloyd/yajl/pull/187 + +[Update: align with commit 302563539dacb284576a443401cdfd061eb2e1e8 and remove + linking with libm from test/api/CMakeLists.txt] +Signed-off-by: Jörg Krause +--- + example/CMakeLists.txt | 7 ++++++- + perf/CMakeLists.txt | 6 +++++- + reformatter/CMakeLists.txt | 6 +++++- + test/api/CMakeLists.txt | 6 +++++- + test/parsing/CMakeLists.txt | 6 +++++- + verify/CMakeLists.txt | 6 +++++- + 6 files changed, 31 insertions(+), 6 deletions(-) + +diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt +index 0a7f622..8cfcef8 100644 +--- a/example/CMakeLists.txt ++++ b/example/CMakeLists.txt +@@ -20,4 +20,9 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) + + ADD_EXECUTABLE(parse_config ${SRCS}) + +-TARGET_LINK_LIBRARIES(parse_config yajl_s) ++IF(BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES(parse_config yajl) ++ELSE() ++ TARGET_LINK_LIBRARIES(parse_config yajl_s) ++ENDIF() ++ +diff --git a/perf/CMakeLists.txt b/perf/CMakeLists.txt +index b438d7a..40ba363 100644 +--- a/perf/CMakeLists.txt ++++ b/perf/CMakeLists.txt +@@ -20,4 +20,8 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) + + ADD_EXECUTABLE(perftest ${SRCS}) + +-TARGET_LINK_LIBRARIES(perftest yajl_s) ++IF(BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES(perftest yajl) ++ELSE() ++ TARGET_LINK_LIBRARIES(perftest yajl_s) ++ENDIF() +diff --git a/reformatter/CMakeLists.txt b/reformatter/CMakeLists.txt +index 52a9bee..7629094 100644 +--- a/reformatter/CMakeLists.txt ++++ b/reformatter/CMakeLists.txt +@@ -26,7 +26,11 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) + + ADD_EXECUTABLE(json_reformat ${SRCS}) + +-TARGET_LINK_LIBRARIES(json_reformat yajl_s) ++IF(BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES(json_reformat yajl) ++ELSE() ++ TARGET_LINK_LIBRARIES(json_reformat yajl_s) ++ENDIF() + + # In some environments, we must explicitly link libm (like qnx, + # thanks @shahbag) +diff --git a/test/api/CMakeLists.txt b/test/api/CMakeLists.txt +index cd65a54..0c9debf 100644 +--- a/test/api/CMakeLists.txt ++++ b/test/api/CMakeLists.txt +@@ -21,5 +21,9 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../../${YAJL_DIST_NAME}/lib) + FOREACH (test ${TESTS}) + GET_FILENAME_COMPONENT(testProg ${test} NAME_WE) + ADD_EXECUTABLE(${testProg} ${test}) +- TARGET_LINK_LIBRARIES(${testProg} yajl) ++ IF(BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES(${testProg} yajl) ++ ELSE() ++ TARGET_LINK_LIBRARIES(${testProg} yajl_s) ++ ENDIF() + ENDFOREACH() +diff --git a/test/parsing/CMakeLists.txt b/test/parsing/CMakeLists.txt +index c22a388..285f048 100644 +--- a/test/parsing/CMakeLists.txt ++++ b/test/parsing/CMakeLists.txt +@@ -20,4 +20,8 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../../${YAJL_DIST_NAME}/lib) + + ADD_EXECUTABLE(yajl_test ${SRCS}) + +-TARGET_LINK_LIBRARIES(yajl_test yajl_s) ++IF(BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES(yajl_test yajl) ++ELSE() ++ TARGET_LINK_LIBRARIES(yajl_test yajl_s) ++ENDIF() +diff --git a/verify/CMakeLists.txt b/verify/CMakeLists.txt +index 967fca1..06cb2dc 100644 +--- a/verify/CMakeLists.txt ++++ b/verify/CMakeLists.txt +@@ -26,7 +26,11 @@ LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/lib) + + ADD_EXECUTABLE(json_verify ${SRCS}) + +-TARGET_LINK_LIBRARIES(json_verify yajl_s) ++IF(BUILD_SHARED_LIBS) ++ TARGET_LINK_LIBRARIES(json_verify yajl) ++ELSE() ++ TARGET_LINK_LIBRARIES(json_verify yajl_s) ++ENDIF() + + # copy in the binary + GET_TARGET_PROPERTY(binPath json_verify LOCATION) +-- +2.8.0 + diff --git a/package/yajl/0004-Link-libyajl-_s-with-libm-when-isnan-is-not-brought-.patch b/package/yajl/0004-Link-libyajl-_s-with-libm-when-isnan-is-not-brought-.patch new file mode 100644 index 0000000000..71cf2958ee --- /dev/null +++ b/package/yajl/0004-Link-libyajl-_s-with-libm-when-isnan-is-not-brought-.patch @@ -0,0 +1,64 @@ +From b47f6a50925efb8c8707b1faed5561a4b66ffdb1 Mon Sep 17 00:00:00 2001 +From: Samuel Martin +Date: Sun, 24 Apr 2016 18:45:27 +0200 +Subject: [PATCH] Link libyajl{,_s} with libm when isnan is not brought by the + libc + +Check whether isnan is provided by the libc library, otherwise make sure +yajl libraries are link against libm. + +Note that setting libm as PUBLIC link libraries enable the transitivity +[1, 2]; therefore it will be automatically passed to target linking +against libyajl{,_s}. + +This patch also makes sure the link libraries will appear in the yajl.pc +file. + +[1] https://cmake.org/cmake/help/v3.5/command/target_link_libraries.html +[2] https://cmake.org/cmake/help/v3.5/manual/cmake-buildsystem.7.html#target-usage-requirements + +Signed-off-by: Samuel Martin +--- + src/CMakeLists.txt | 10 ++++++++++ + src/yajl.pc.cmake | 2 +- + 2 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index b487bfd..a88698f 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -35,11 +35,21 @@ SET (shareDir ${CMAKE_CURRENT_BINARY_DIR}/../${YAJL_DIST_NAME}/share/pkgconfig) + # set the output path for libraries + SET(LIBRARY_OUTPUT_PATH ${libDir}) + ++SET(yajl_lib_link) ++INCLUDE(CheckLibraryExists) ++CHECK_LIBRARY_EXISTS(c isnan "" HAVE_LIBC_ISNAN) ++ ++IF(NOT HAVE_LIBC_ISNAN) ++ LIST(APPEND yajl_lib_link "-lm") ++ENDIF(NOT HAVE_LIBC_ISNAN) ++ + ADD_LIBRARY(yajl_s STATIC ${SRCS} ${HDRS} ${PUB_HDRS}) + SET_TARGET_PROPERTIES(yajl_s PROPERTIES OUTPUT_NAME yajl) ++TARGET_LINK_LIBRARIES(yajl_s PUBLIC ${yajl_lib_link}) + + IF(BUILD_SHARED_LIBS) + ADD_LIBRARY(yajl SHARED ${SRCS} ${HDRS} ${PUB_HDRS}) ++TARGET_LINK_LIBRARIES(yajl PUBLIC ${yajl_lib_link}) + + #### setup shared library version number + SET_TARGET_PROPERTIES(yajl PROPERTIES +diff --git a/src/yajl.pc.cmake b/src/yajl.pc.cmake +index 6eaca14..4681dd4 100644 +--- a/src/yajl.pc.cmake ++++ b/src/yajl.pc.cmake +@@ -6,4 +6,4 @@ Name: Yet Another JSON Library + Description: A Portable JSON parsing and serialization library in ANSI C + Version: ${YAJL_MAJOR}.${YAJL_MINOR}.${YAJL_MICRO} + Cflags: -I${dollar}{includedir} +-Libs: -L${dollar}{libdir} -lyajl ++Libs: -L${dollar}{libdir} -lyajl ${yajl_lib_link} +-- +2.8.0 + diff --git a/package/yajl/Config.in b/package/yajl/Config.in new file mode 100644 index 0000000000..be2c133f43 --- /dev/null +++ b/package/yajl/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_YAJL + bool "yajl" + help + Yet Another JSON Library. YAJL is a small event-driven + (SAX-style) JSON parser written in ANSI C, and a small + validating JSON generator. + + http://lloyd.github.com/yajl/ diff --git a/package/yajl/yajl.hash b/package/yajl/yajl.hash new file mode 100644 index 0000000000..ed4a0502fe --- /dev/null +++ b/package/yajl/yajl.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 3fb73364a5a30efe615046d07e6db9d09fd2b41c763c5f7d3bfb121cd5c5ac5a yajl-2.1.0.tar.gz diff --git a/package/yajl/yajl.mk b/package/yajl/yajl.mk new file mode 100644 index 0000000000..1fb16f50e9 --- /dev/null +++ b/package/yajl/yajl.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# yajl +# +################################################################################ + +YAJL_VERSION = 2.1.0 +YAJL_SITE = $(call github,lloyd,yajl,$(YAJL_VERSION)) +YAJL_INSTALL_STAGING = YES +YAJL_LICENSE = ISC +YAJL_LICENSE_FILES = COPYING + +$(eval $(cmake-package)) diff --git a/package/yaml-cpp/Config.in b/package/yaml-cpp/Config.in new file mode 100644 index 0000000000..3cfb955a5f --- /dev/null +++ b/package/yaml-cpp/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_YAML_CPP + bool "yaml-cpp" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_TOOLCHAIN_HAS_THREADS # boost + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on BR2_USE_WCHAR # boost + select BR2_PACKAGE_BOOST + help + yaml-cpp is a YAML parser and emitter in C++ matching + the YAML 1.2 spec. + + https://code.google.com/p/yaml-cpp/ + +comment "yaml-cpp needs a toolchain w/ C++, threads, wchar" + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR diff --git a/package/yaml-cpp/yaml-cpp.mk b/package/yaml-cpp/yaml-cpp.mk new file mode 100644 index 0000000000..6a01b02a3b --- /dev/null +++ b/package/yaml-cpp/yaml-cpp.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# yaml-cpp +# +################################################################################ + +YAML_CPP_VERSION = 0.5.2 +YAML_CPP_SITE = $(call github,jbeder,yaml-cpp,release-$(YAML_CPP_VERSION)) +YAML_CPP_INSTALL_STAGING = YES +YAML_CPP_LICENSE = MIT +YAML_CPP_LICENSE_FILES = license.txt + +YAML_CPP_DEPENDENCIES = boost + +# Disable testing and parse tools +YAML_CPP_CONF_OPTS += -DYAML_CPP_BUILD_TOOLS=OFF + +$(eval $(cmake-package)) diff --git a/package/yasm/Config.in b/package/yasm/Config.in new file mode 100644 index 0000000000..2dc25aadb2 --- /dev/null +++ b/package/yasm/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_YASM + bool "yasm" + depends on BR2_i386 || BR2_x86_64 + help + Yasm is a complete rewrite of the NASM-2.10.01 assembler. + It supports the x86 and AMD64 instruction sets, accepts NASM + and GAS assembler syntaxes and outputs binary, ELF32 and ELF64 + object formats. + + http://www.tortall.net/projects/yasm/ diff --git a/package/yasm/yasm.hash b/package/yasm/yasm.hash new file mode 100644 index 0000000000..016c15b90a --- /dev/null +++ b/package/yasm/yasm.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 3dce6601b495f5b3d45b59f7d2492a340ee7e84b5beca17e48f862502bd5603f yasm-1.3.0.tar.gz diff --git a/package/yasm/yasm.mk b/package/yasm/yasm.mk new file mode 100644 index 0000000000..6729b6a74d --- /dev/null +++ b/package/yasm/yasm.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# yasm +# +################################################################################ + +YASM_VERSION = 1.3.0 +YASM_SITE = http://www.tortall.net/projects/yasm/releases + +# This sed prevents it compiling 2 programs (vsyasm and ytasm) +# that are only of use on Microsoft Windows. +define YASM_PRE_CONFIGURE_FIXUP + $(SED) 's#) ytasm.*#)#' $(@D)/Makefile.in +endef + +YASM_PRE_CONFIGURE_HOOKS += YASM_PRE_CONFIGURE_FIXUP +HOST_YASM_PRE_CONFIGURE_HOOKS += YASM_PRE_CONFIGURE_FIXUP + +$(eval $(autotools-package)) +$(eval $(host-autotools-package)) diff --git a/package/yavta/Config.in b/package/yavta/Config.in new file mode 100644 index 0000000000..6a42a944d6 --- /dev/null +++ b/package/yavta/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_YAVTA + bool "yavta" + help + Yet Another V4L2 Test Application + + http://git.ideasonboard.org/yavta.git diff --git a/package/yavta/yavta.mk b/package/yavta/yavta.mk new file mode 100644 index 0000000000..04af2a63c1 --- /dev/null +++ b/package/yavta/yavta.mk @@ -0,0 +1,20 @@ +################################################################################ +# +# yavta +# +################################################################################ + +YAVTA_VERSION = 82ff2efdb9787737b9f21b6f4759f077c827b238 +YAVTA_SITE = git://git.ideasonboard.org/yavta.git +YAVTA_LICENSE = GPLv2+ +YAVTA_LICENSE_FILES = COPYING.GPL + +define YAVTA_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) +endef + +define YAVTA_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -D $(@D)/yavta $(TARGET_DIR)/usr/bin/yavta +endef + +$(eval $(generic-package)) diff --git a/package/ympd/0002-only-c-language.patch b/package/ympd/0002-only-c-language.patch new file mode 100644 index 0000000000..df5734c35e --- /dev/null +++ b/package/ympd/0002-only-c-language.patch @@ -0,0 +1,21 @@ +ympd is implemented only in C + +By default, CMake assumes that the project is using both C and C++. By +explicitly passing 'C' as argument of the project() macro, we tell +CMake that only C is used, which prevents CMake from checking if a C++ +compiler exists. + +Signed-off-by: Thomas Petazzoni + +Index: b/CMakeLists.txt +=================================================================== +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,6 +1,6 @@ + cmake_minimum_required(VERSION 2.6) + +-project (ympd) ++project (ympd C) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/") + set(CPACK_PACKAGE_VERSION_MAJOR "1") + set(CPACK_PACKAGE_VERSION_MINOR "2") diff --git a/package/ympd/Config.in b/package/ympd/Config.in new file mode 100644 index 0000000000..d0901c71ef --- /dev/null +++ b/package/ympd/Config.in @@ -0,0 +1,13 @@ +config BR2_PACKAGE_YMPD + bool "ympd" + select BR2_PACKAGE_LIBMPDCLIENT + depends on BR2_USE_MMU # fork() + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + ympd, a standalone MPD Web GUI written in C, utilizing + Websockets and Bootstrap/JS + +comment "ympd needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/ympd/ympd.mk b/package/ympd/ympd.mk new file mode 100644 index 0000000000..61e9cab8b8 --- /dev/null +++ b/package/ympd/ympd.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# ympd +# +################################################################################ + +YMPD_VERSION = v1.2.3 +YMPD_SITE = $(call github,notandy,ympd,$(YMPD_VERSION)) +YMPD_LICENSE = GPLv2 +YMPD_LICENSE_FILES = LICENSE +YMPD_DEPENDENCIES = libmpdclient + +define YMPD_MAKE_HOST_TOOL + $(HOSTCC) $(HOST_CFLAGS) $(@D)/htdocs/mkdata.c -o $(@D)/mkdata +endef + +YMPD_PRE_BUILD_HOOKS += YMPD_MAKE_HOST_TOOL + +YMPD_CONF_OPTS += -DMKDATA_EXE=$(@D)/mkdata + +$(eval $(cmake-package)) diff --git a/package/zbar/0001-Fix-autoreconf-by-reducing-the-warning-error-checkin.patch b/package/zbar/0001-Fix-autoreconf-by-reducing-the-warning-error-checkin.patch new file mode 100644 index 0000000000..57fbeb1e77 --- /dev/null +++ b/package/zbar/0001-Fix-autoreconf-by-reducing-the-warning-error-checkin.patch @@ -0,0 +1,26 @@ +From e593d6529cff515d94d80a24b5f3a953fd46004c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 19 Dec 2015 18:56:36 +0100 +Subject: [PATCH] Fix autoreconf by reducing the warning/error checking + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 256aedb..e0b6046 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3,7 +3,7 @@ AC_PREREQ([2.61]) + AC_INIT([zbar], [0.10], [spadix@users.sourceforge.net]) + AC_CONFIG_AUX_DIR(config) + AC_CONFIG_MACRO_DIR(config) +-AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign subdir-objects std-options dist-bzip2]) ++AM_INIT_AUTOMAKE([1.10 foreign subdir-objects std-options dist-bzip2]) + AC_CONFIG_HEADERS([include/config.h]) + AC_CONFIG_SRCDIR(zbar/scanner.c) + LT_PREREQ([2.2]) +-- +2.6.4 + diff --git a/package/zbar/0002-Fix-function-protoype-to-be-compatible-with-recent-l.patch b/package/zbar/0002-Fix-function-protoype-to-be-compatible-with-recent-l.patch new file mode 100644 index 0000000000..82dd4e96ea --- /dev/null +++ b/package/zbar/0002-Fix-function-protoype-to-be-compatible-with-recent-l.patch @@ -0,0 +1,27 @@ +From 5dc8322b4f9a3de29b3da70b69e16356a2a1764c Mon Sep 17 00:00:00 2001 +From: Viacheslav Volkov +Date: Sat, 19 Dec 2015 19:07:09 +0100 +Subject: [PATCH] Fix function protoype to be compatible with recent libjpeg + +Signed-off-by: Viacheslav Volkov +Signed-off-by: Thomas Petazzoni +--- + zbar/jpeg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/zbar/jpeg.c b/zbar/jpeg.c +index 972bfea..fdd1619 100644 +--- a/zbar/jpeg.c ++++ b/zbar/jpeg.c +@@ -68,7 +68,7 @@ void init_source (j_decompress_ptr cinfo) + cinfo->src->bytes_in_buffer = img->datalen; + } + +-int fill_input_buffer (j_decompress_ptr cinfo) ++boolean fill_input_buffer (j_decompress_ptr cinfo) + { + /* buffer underrun error case */ + cinfo->src->next_input_byte = fake_eoi; +-- +2.6.4 + diff --git a/package/zbar/0003-Disable-building-documentation.patch b/package/zbar/0003-Disable-building-documentation.patch new file mode 100644 index 0000000000..729f926cc8 --- /dev/null +++ b/package/zbar/0003-Disable-building-documentation.patch @@ -0,0 +1,27 @@ +From 58027d5bb0492142a5b72ded772d3a1be9fa8d87 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 20 Dec 2015 12:05:57 +0100 +Subject: [PATCH] Disable building documentation + +The documentation requires xmlto, and we don't need it in Buildroot. + +Signed-off-by: Thomas Petazzoni +--- + Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index e18499a..db4411f 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -45,7 +45,6 @@ if HAVE_NPAPI + include $(srcdir)/plugin/Makefile.am.inc + endif + include $(srcdir)/test/Makefile.am.inc +-include $(srcdir)/doc/Makefile.am.inc + + EXTRA_DIST += zbar.ico zbar.nsi + +-- +2.6.4 + diff --git a/package/zbar/0004-Wrap-logical-not-operations-into-parentheses.patch b/package/zbar/0004-Wrap-logical-not-operations-into-parentheses.patch new file mode 100644 index 0000000000..6d39b1bd96 --- /dev/null +++ b/package/zbar/0004-Wrap-logical-not-operations-into-parentheses.patch @@ -0,0 +1,80 @@ +From 7e69cdc8dfdf07701ba551985ee49d48e64d730f Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera +Date: Mon, 25 Jan 2016 11:58:59 +0000 +Subject: [PATCH] Wrap logical not operations into parentheses + +Otherwise it fails like this: + +zbar/decoder/ean.c: In function 'ean_part_end4': +zbar/decoder/ean.c:297:13: error: logical not is only applied to the +left hand side of comparison [-Werror=logical-not-parentheses] + if(!par == fwd) { + +This patch has been sent upstream as a pull request: + + https://github.com/ZBar/ZBar/pull/9 + +Signed-off-by: Vicente Olivert Riera +--- + zbar/decoder/ean.c | 4 ++-- + zbar/qrcode/qrdec.c | 8 ++++---- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/zbar/decoder/ean.c b/zbar/decoder/ean.c +index c20f538..41d1493 100644 +--- a/zbar/decoder/ean.c ++++ b/zbar/decoder/ean.c +@@ -294,7 +294,7 @@ static inline zbar_symbol_type_t ean_part_end4 (ean_pass_t *pass, + /* invalid parity combination */ + return(ZBAR_NONE); + +- if(!par == fwd) { ++ if((!par) == fwd) { + /* reverse sampled digits */ + unsigned char tmp = pass->raw[1]; + pass->state |= STATE_REV; +@@ -380,7 +380,7 @@ static inline zbar_symbol_type_t ean_part_end7 (ean_decoder_t *ean, + /* invalid parity combination */ + return(ZBAR_NONE); + +- if(!par == fwd) { ++ if((!par) == fwd) { + unsigned char i; + pass->state |= STATE_REV; + /* reverse sampled digits */ +diff --git a/zbar/qrcode/qrdec.c b/zbar/qrcode/qrdec.c +index d8fa802..5d3d265 100644 +--- a/zbar/qrcode/qrdec.c ++++ b/zbar/qrcode/qrdec.c +@@ -1219,8 +1219,8 @@ static int qr_finder_quick_crossing_check(const unsigned char *_img, + _x1<0||_x1>=_width||_y1<0||_y1>=_height){ + return -1; + } +- if(!_img[_y0*_width+_x0]!=_v||!_img[_y1*_width+_x1]!=_v)return 1; +- if(!_img[(_y0+_y1>>1)*_width+(_x0+_x1>>1)]==_v)return -1; ++ if((!_img[_y0*_width+_x0])!=_v||(!_img[_y1*_width+_x1])!=_v)return 1; ++ if((!_img[(_y0+_y1>>1)*_width+(_x0+_x1>>1)])==_v)return -1; + return 0; + } + +@@ -1261,7 +1261,7 @@ static int qr_finder_locate_crossing(const unsigned char *_img, + x0[1-steep]+=step[1-steep]; + err-=dx[steep]; + } +- if(!_img[x0[1]*_width+x0[0]]!=_v)break; ++ if((!_img[x0[1]*_width+x0[0]])!=_v)break; + } + /*Find the last crossing from _v to !_v.*/ + err=0; +@@ -1273,7 +1273,7 @@ static int qr_finder_locate_crossing(const unsigned char *_img, + x1[1-steep]-=step[1-steep]; + err-=dx[steep]; + } +- if(!_img[x1[1]*_width+x1[0]]!=_v)break; ++ if((!_img[x1[1]*_width+x1[0]])!=_v)break; + } + /*Return the midpoint of the _v segment.*/ + _p[0]=(x0[0]+x1[0]+1<>1; +-- +2.4.10 + diff --git a/package/zbar/Config.in b/package/zbar/Config.in new file mode 100644 index 0000000000..5097f57439 --- /dev/null +++ b/package/zbar/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_ZBAR + bool "zbar" + depends on BR2_TOOLCHAIN_HAS_THREADS # libv4l + depends on BR2_USE_MMU # libv4l + depends on !BR2_STATIC_LIBS # libv4l + depends on BR2_INSTALL_LIBSTDCPP # libv4l + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 # libv4l + select BR2_PACKAGE_JPEG + select BR2_PACKAGE_LIBV4L + help + QR and barcode scanner + + http://zbar.sourceforge.net/ + +comment "zbar needs a toolchain w/ threads, dynamic library, C++ and headers >= 3.0" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \ + || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 diff --git a/package/zbar/zbar.hash b/package/zbar/zbar.hash new file mode 100644 index 0000000000..54441a8f3e --- /dev/null +++ b/package/zbar/zbar.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 38f8535a3c4c526ecaa968a992efcbf7392623e68db45dc2f181d4c9d3002d69 zbar-854a5d97059e395807091ac4d80c53f7968abb8f.tar.gz diff --git a/package/zbar/zbar.mk b/package/zbar/zbar.mk new file mode 100644 index 0000000000..54e11e3eed --- /dev/null +++ b/package/zbar/zbar.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# zbar +# +################################################################################ + +# github have some additional commits for compiling with recent kernel +ZBAR_VERSION = 854a5d97059e395807091ac4d80c53f7968abb8f +ZBAR_SITE = $(call github,ZBar,Zbar,$(ZBAR_VERSION)) +ZBAR_LICENSE = LGPLv2.1+ +ZBAR_LICENSE_FILES = LICENSE +ZBAR_INSTALL_STAGING = YES +ZBAR_AUTORECONF = YES +ZBAR_DEPENDENCIES = libv4l jpeg +ZBAR_CONF_OPTS = \ + --without-imagemagick \ + --without-qt \ + --without-gtk \ + --without-python \ + --without-x + +$(eval $(autotools-package)) diff --git a/package/zd1211-firmware/Config.in b/package/zd1211-firmware/Config.in new file mode 100644 index 0000000000..4469533b0a --- /dev/null +++ b/package/zd1211-firmware/Config.in @@ -0,0 +1,4 @@ +config BR2_PACKAGE_ZD1211_FIRMWARE + bool "zd1211-firmware" + help + Firmware for the ZyDAS ZD1211 / Atheros AR5007UG wifi devices. diff --git a/package/zd1211-firmware/zd1211-firmware.hash b/package/zd1211-firmware/zd1211-firmware.hash new file mode 100644 index 0000000000..d26858b2dc --- /dev/null +++ b/package/zd1211-firmware/zd1211-firmware.hash @@ -0,0 +1,2 @@ +# Locally computed: +sha256 866308f6f59f7075f075d4959dff2ede47735c751251fecd1496df1ba4d338e1 zd1211-firmware-1.4.tar.bz2 diff --git a/package/zd1211-firmware/zd1211-firmware.mk b/package/zd1211-firmware/zd1211-firmware.mk new file mode 100644 index 0000000000..59ea2199c4 --- /dev/null +++ b/package/zd1211-firmware/zd1211-firmware.mk @@ -0,0 +1,19 @@ +################################################################################ +# +# zd1211-firmware +# +################################################################################ + +ZD1211_FIRMWARE_VERSION = 1.4 +ZD1211_FIRMWARE_SITE = http://downloads.sourceforge.net/project/zd1211/zd1211-firmware/$(ZD1211_FIRMWARE_VERSION) +ZD1211_FIRMWARE_SOURCE = zd1211-firmware-$(ZD1211_FIRMWARE_VERSION).tar.bz2 +ZD1211_FIRMWARE_LICENSE = GPLv2 +ZD1211_FIRMWARE_LICENSE_FILES = COPYING + +# Not all of the firmware files are used +define ZD1211_FIRMWARE_INSTALL_TARGET_CMDS + $(INSTALL) -d -m 0755 $(TARGET_DIR)/lib/firmware/zd1211/ + cp -dpf $(@D)/zd1211*{ub,uphr,ur} $(TARGET_DIR)/lib/firmware/zd1211 +endef + +$(eval $(generic-package)) diff --git a/package/zeromq/0001-acinclude.m4-make-kernel-specific-flags-cacheable.patch b/package/zeromq/0001-acinclude.m4-make-kernel-specific-flags-cacheable.patch new file mode 100644 index 0000000000..ff225d3592 --- /dev/null +++ b/package/zeromq/0001-acinclude.m4-make-kernel-specific-flags-cacheable.patch @@ -0,0 +1,199 @@ +commit 9daf6dd7c4947ce74ca729de5c3cfe8cbc304702 +Author: Lionel Orry +Date: Fri Feb 6 15:11:07 2015 +0100 + + acinclude.m4: make kernel-specific flags cacheable + + Specifically when cross-compiling, one can be willing to force these + variable values using the environment of a config.cache file. This + commit makes this possible. + + The affected variables are: + + * libzmq_cv_sock_cloexec + * libzmq_cv_so_keepalive + * libzmq_cv_tcp_keepcnt + * libzmq_cv_tcp_keepidle + * libzmq_cv_tcp_keepintvl + * libzmq_cv_tcp_keepalive + + Signed-off-by: Lionel Orry + +diff --git a/acinclude.m4 b/acinclude.m4 +index 4bbd19e..456740d 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -586,8 +586,8 @@ dnl # LIBZMQ_CHECK_SOCK_CLOEXEC([action-if-found], [action-if-not-found]) + dnl # Check if SOCK_CLOEXEC is supported # + dnl ################################################################################ + AC_DEFUN([LIBZMQ_CHECK_SOCK_CLOEXEC], [{ +- AC_MSG_CHECKING(whether SOCK_CLOEXEC is supported) +- AC_TRY_RUN([/* SOCK_CLOEXEC test */ ++ AC_CACHE_CHECK([whether SOCK_CLOEXEC is supported], [libzmq_cv_sock_cloexec], ++ [AC_TRY_RUN([/* SOCK_CLOEXEC test */ + #include + #include + +@@ -596,11 +596,13 @@ int main (int argc, char *argv []) + int s = socket (PF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); + return (s == -1); + } +- ], +- [AC_MSG_RESULT(yes) ; libzmq_cv_sock_cloexec="yes" ; $1], +- [AC_MSG_RESULT(no) ; libzmq_cv_sock_cloexec="no" ; $2], +- [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_sock_cloexec="no"] ++ ], ++ [libzmq_cv_sock_cloexec="yes"], ++ [libzmq_cv_sock_cloexec="no"], ++ [libzmq_cv_sock_cloexec="not during cross-compile"] ++ )] + ) ++ AS_IF([test "x$libzmq_cv_sock_cloexec" = "xyes"], [$1], [$2]) + }]) + + dnl ################################################################################ +@@ -628,8 +630,8 @@ dnl # LIBZMQ_CHECK_SO_KEEPALIVE([action-if-found], [action-if-not-found]) + dnl # Check if SO_KEEPALIVE is supported # + dnl ################################################################################ + AC_DEFUN([LIBZMQ_CHECK_SO_KEEPALIVE], [{ +- AC_MSG_CHECKING(whether SO_KEEPALIVE is supported) +- AC_TRY_RUN([/* SO_KEEPALIVE test */ ++ AC_CACHE_CHECK([whether SO_KEEPALIVE is supported], [libzmq_cv_so_keepalive], ++ [AC_TRY_RUN([/* SO_KEEPALIVE test */ + #include + #include + +@@ -641,11 +643,13 @@ int main (int argc, char *argv []) + ((rc = setsockopt (s, SOL_SOCKET, SO_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) + ); + } +- ], +- [AC_MSG_RESULT(yes) ; libzmq_cv_so_keepalive="yes" ; $1], +- [AC_MSG_RESULT(no) ; libzmq_cv_so_keepalive="no" ; $2], +- [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_so_keepalive="no"] ++ ], ++ [libzmq_cv_so_keepalive="yes"], ++ [libzmq_cv_so_keepalive="no"], ++ [libzmq_cv_so_keepalive="not during cross-compile"] ++ )] + ) ++ AS_IF([test "x$libzmq_cv_so_keepalive" = "xyes"], [$1], [$2]) + }]) + + dnl ################################################################################ +@@ -653,8 +657,8 @@ dnl # LIBZMQ_CHECK_TCP_KEEPCNT([action-if-found], [action-if-not-found]) + dnl # Check if TCP_KEEPCNT is supported # + dnl ################################################################################ + AC_DEFUN([LIBZMQ_CHECK_TCP_KEEPCNT], [{ +- AC_MSG_CHECKING(whether TCP_KEEPCNT is supported) +- AC_TRY_RUN([/* TCP_KEEPCNT test */ ++ AC_CACHE_CHECK([whether TCP_KEEPCNT is supported], [libzmq_cv_tcp_keepcnt], ++ [AC_TRY_RUN([/* TCP_KEEPCNT test */ + #include + #include + #include +@@ -669,11 +673,13 @@ int main (int argc, char *argv []) + ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPCNT, (char*) &opt, sizeof (int))) == -1) + ); + } +- ], +- [AC_MSG_RESULT(yes) ; libzmq_cv_tcp_keepcnt="yes" ; $1], +- [AC_MSG_RESULT(no) ; libzmq_cv_tcp_keepcnt="no" ; $2], +- [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_tcp_keepcnt="no"] ++ ], ++ [libzmq_cv_tcp_keepcnt="yes"], ++ [libzmq_cv_tcp_keepcnt="no"], ++ [libzmq_cv_tcp_keepcnt="not during cross-compile"] ++ )] + ) ++ AS_IF([test "x$libzmq_cv_tcp_keepcnt" = "xyes"], [$1], [$2]) + }]) + + dnl ################################################################################ +@@ -681,8 +687,8 @@ dnl # LIBZMQ_CHECK_TCP_KEEPIDLE([action-if-found], [action-if-not-found]) + dnl # Check if TCP_KEEPIDLE is supported # + dnl ################################################################################ + AC_DEFUN([LIBZMQ_CHECK_TCP_KEEPIDLE], [{ +- AC_MSG_CHECKING(whether TCP_KEEPIDLE is supported) +- AC_TRY_RUN([/* TCP_KEEPIDLE test */ ++ AC_CACHE_CHECK([whether TCP_KEEPIDLE is supported], [libzmq_cv_tcp_keepidle], ++ [AC_TRY_RUN([/* TCP_KEEPIDLE test */ + #include + #include + #include +@@ -697,11 +703,13 @@ int main (int argc, char *argv []) + ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPIDLE, (char*) &opt, sizeof (int))) == -1) + ); + } +- ], +- [AC_MSG_RESULT(yes) ; libzmq_cv_tcp_keepidle="yes" ; $1], +- [AC_MSG_RESULT(no) ; libzmq_cv_tcp_keepidle="no" ; $2], +- [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_tcp_keepidle="no"] ++ ], ++ [libzmq_cv_tcp_keepidle="yes"], ++ [libzmq_cv_tcp_keepidle="no"], ++ [libzmq_cv_tcp_keepidle="not during cross-compile"] ++ )] + ) ++ AS_IF([test "x$libzmq_cv_tcp_keepidle" = "xyes"], [$1], [$2]) + }]) + + dnl ################################################################################ +@@ -709,8 +717,8 @@ dnl # LIBZMQ_CHECK_TCP_KEEPINTVL([action-if-found], [action-if-not-found]) + dnl # Check if TCP_KEEPINTVL is supported # + dnl ################################################################################ + AC_DEFUN([LIBZMQ_CHECK_TCP_KEEPINTVL], [{ +- AC_MSG_CHECKING(whether TCP_KEEPINTVL is supported) +- AC_TRY_RUN([/* TCP_KEEPINTVL test */ ++ AC_CACHE_CHECK([whether TCP_KEEPINTVL is supported], [libzmq_cv_tcp_keepintvl], ++ [AC_TRY_RUN([/* TCP_KEEPINTVL test */ + #include + #include + #include +@@ -725,11 +733,13 @@ int main (int argc, char *argv []) + ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPINTVL, (char*) &opt, sizeof (int))) == -1) + ); + } +- ], +- [AC_MSG_RESULT(yes) ; libzmq_cv_tcp_keepintvl="yes" ; $1], +- [AC_MSG_RESULT(no) ; libzmq_cv_tcp_keepintvl="no" ; $2], +- [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_tcp_keepintvl="no"] ++ ], ++ [libzmq_cv_tcp_keepintvl="yes"], ++ [libzmq_cv_tcp_keepintvl="no"], ++ [libzmq_cv_tcp_keepintvl="not during cross-compile"] ++ )] + ) ++ AS_IF([test "x$libzmq_cv_tcp_keepintvl" = "xyes"], [$1], [$2]) + }]) + + dnl ################################################################################ +@@ -737,8 +747,8 @@ dnl # LIBZMQ_CHECK_TCP_KEEPALIVE([action-if-found], [action-if-not-found]) + dnl # Check if TCP_KEEPALIVE is supported # + dnl ################################################################################ + AC_DEFUN([LIBZMQ_CHECK_TCP_KEEPALIVE], [{ +- AC_MSG_CHECKING(whether TCP_KEEPALIVE is supported) +- AC_TRY_RUN([/* TCP_KEEPALIVE test */ ++ AC_CACHE_CHECK([whether TCP_KEEPALIVE is supported], [libzmq_cv_tcp_keepalive], ++ [AC_TRY_RUN([/* TCP_KEEPALIVE test */ + #include + #include + #include +@@ -753,11 +763,13 @@ int main (int argc, char *argv []) + ((rc = setsockopt (s, IPPROTO_TCP, TCP_KEEPALIVE, (char*) &opt, sizeof (int))) == -1) + ); + } +- ], +- [AC_MSG_RESULT(yes) ; libzmq_cv_tcp_keepalive="yes" ; $1], +- [AC_MSG_RESULT(no) ; libzmq_cv_tcp_keepalive="no" ; $2], +- [AC_MSG_RESULT(not during cross-compile) ; libzmq_cv_tcp_keepalive="no"] ++ ], ++ [libzmq_cv_tcp_keepalive="yes"], ++ [libzmq_cv_tcp_keepalive="no"], ++ [libzmq_cv_tcp_keepalive="not during cross-compile"] ++ )] + ) ++ AS_IF([test "x$libzmq_cv_tcp_keepalive" = "xyes"], [$1], [$2]) + }]) + + dnl ################################################################################ diff --git a/package/zeromq/0002-libzmq-Fix-pkg-config-files-for-static-linking.patch b/package/zeromq/0002-libzmq-Fix-pkg-config-files-for-static-linking.patch new file mode 100644 index 0000000000..11acec26ae --- /dev/null +++ b/package/zeromq/0002-libzmq-Fix-pkg-config-files-for-static-linking.patch @@ -0,0 +1,29 @@ +From e89577d30c278fba0f9e40266ceb6fb2821907d5 Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Wed, 13 May 2015 08:01:34 +0200 +Subject: [PATCH] libzmq: Fix pkg-config files for static linking + +Libzmq uses C++ standard library features, so users of it should link +against that as well when statically linking. + +Add it to Libs.private so users using pkg-config automatically gets the +correct linker flags. + +Signed-off-by: Peter Korsgaard +--- + src/libzmq.pc.in | 1 + + 1 file changed, 1 insertions(+) + +diff --git a/src/libzmq.pc.in b/src/libzmq.pc.in +index ba155a3..52a39f7 100644 +--- a/src/libzmq.pc.in ++++ b/src/libzmq.pc.in +@@ -7,4 +7,5 @@ Name: libzmq + Description: 0MQ c++ library + Version: @VERSION@ + Libs: -L${libdir} -lzmq ++Libs.private: -lstdc++ + Cflags: -I${includedir} +-- +2.1.4 + diff --git a/package/zeromq/Config.in b/package/zeromq/Config.in new file mode 100644 index 0000000000..d5c9deae37 --- /dev/null +++ b/package/zeromq/Config.in @@ -0,0 +1,51 @@ +comment "zeromq needs a toolchain w/ C++, wchar, threads" + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && \ + BR2_TOOLCHAIN_HAS_THREADS) + +config BR2_PACKAGE_ZEROMQ + bool "zeromq" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID + help + ØMQ (ZeroMQ, 0MQ, zmq) looks like an embeddable networking + library but acts like a concurrency framework. It gives you + sockets that carry whole messages across various transports + like in-process, inter- process, TCP, and multicast. You can + connect sockets N-to-N with patterns like fanout, pub-sub, + task distribution, and request-reply. It's fast enough to + be the fabric for clustered products. Its asynchronous I/O + model gives you scalable multicore applications, built as + asynchronous message-processing tasks. It has a score of + language APIs and runs on most operating systems. + + ØMQ is from iMatix and is LGPL open source. + + http://www.zeromq.org/ + +if BR2_PACKAGE_ZEROMQ + +comment "norm support needs a toolchain w/ dynamic library" + depends on BR2_STATIC_LIBS + +config BR2_PACKAGE_ZEROMQ_NORM + bool "NORM support" + depends on !BR2_STATIC_LIBS + select BR2_PACKAGE_NORM + help + Add support for NACK-Oriented Reliable Multicast (RFC 5740) + protocol. + +config BR2_PACKAGE_ZEROMQ_PGM + bool "PGM/EPGM support" + depends on BR2_TOOLCHAIN_HAS_SYNC_2 + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + select BR2_PACKAGE_OPENPGM + help + Add support for Pragmatic General Multicast protocol (RFC 3208) + implemented either over raw IP packets or UDP datagrams + (encapsulated PGM). + +endif diff --git a/package/zeromq/zeromq.hash b/package/zeromq/zeromq.hash new file mode 100644 index 0000000000..a3eeb451ca --- /dev/null +++ b/package/zeromq/zeromq.hash @@ -0,0 +1,4 @@ +# From http://download.zeromq.org/SHA1SUMS: +sha1 b632a4b6f8a14390dc17824e37ff7b10831ce2b4 zeromq-4.1.4.tar.gz +# Calculated based on the hash above +sha256 e99f44fde25c2e4cb84ce440f87ca7d3fe3271c2b8cfbc67d55e4de25e6fe378 zeromq-4.1.4.tar.gz diff --git a/package/zeromq/zeromq.mk b/package/zeromq/zeromq.mk new file mode 100644 index 0000000000..871f37ceab --- /dev/null +++ b/package/zeromq/zeromq.mk @@ -0,0 +1,53 @@ +################################################################################ +# +# zeromq +# +################################################################################ + +ZEROMQ_VERSION = 4.1.4 +ZEROMQ_SITE = http://download.zeromq.org +ZEROMQ_INSTALL_STAGING = YES +ZEROMQ_DEPENDENCIES = util-linux +ZEROMQ_LICENSE = LGPLv3+ with exceptions +ZEROMQ_LICENSE_FILES = COPYING COPYING.LESSER +# For 0001-acinclude.m4-make-kernel-specific-flags-cacheable.patch +ZEROMQ_AUTORECONF = YES + +# Assume these flags are always available. It is true, at least for +# SOCK_CLOEXEC, since linux v2.6.27. +# Note: the flag TCP_KEEPALIVE is NOT available so we do not include it. +ZEROMQ_CONF_ENV = libzmq_cv_sock_cloexec=yes \ + libzmq_cv_so_keepalive=yes \ + libzmq_cv_tcp_keepcnt=yes \ + libzmq_cv_tcp_keepidle=yes \ + libzmq_cv_tcp_keepintvl=yes + +# Only tools/curve_keygen.c needs this, but it doesn't hurt to pass it +# for the rest of the build as well (which automatically includes stdc++). +ifeq ($(BR2_STATIC_LIBS),y) +ZEROMQ_CONF_OPTS += LIBS=-lstdc++ +endif + +ifeq ($(BR2_PACKAGE_ZEROMQ_NORM),y) +ZEROMQ_CONF_OPTS += --with-norm +ZEROMQ_DEPENDENCIES += norm +else +ZEROMQ_CONF_OPTS += --without-norm +endif + +ifeq ($(BR2_PACKAGE_ZEROMQ_PGM),y) +ZEROMQ_DEPENDENCIES += host-pkgconf openpgm +ZEROMQ_CONF_OPTS += --with-pgm +else +ZEROMQ_CONF_OPTS += --without-pgm +endif + +# ZeroMQ uses libsodium if it's available. +ifeq ($(BR2_PACKAGE_LIBSODIUM),y) +ZEROMQ_DEPENDENCIES += libsodium +ZEROMQ_CONF_OPTS += --with-libsodium="$(STAGING_DIR)/usr" +else +ZEROMQ_CONF_OPTS += --without-libsodium +endif + +$(eval $(autotools-package)) diff --git a/package/zic/zic.hash b/package/zic/zic.hash new file mode 100644 index 0000000000..be790d78e3 --- /dev/null +++ b/package/zic/zic.hash @@ -0,0 +1,2 @@ +# From: http://mm.icann.org/pipermail/tz-announce/2016-April/000038.html +sha512 c6f6259a78fadaab293be0a4123c226d1a327588639cfa8dadb5a74bd58552892a0c87cfd3a33888f886f51aff34465c89505f0892e6bcbe24247a9160e7328c tzcode2016d.tar.gz diff --git a/package/zic/zic.mk b/package/zic/zic.mk new file mode 100644 index 0000000000..d9cdb4dcbb --- /dev/null +++ b/package/zic/zic.mk @@ -0,0 +1,24 @@ +################################################################################ +# +# zic +# +################################################################################ + +ZIC_VERSION = 2016d +ZIC_SOURCE = tzcode$(ZIC_VERSION).tar.gz +ZIC_SITE = http://www.iana.org/time-zones/repository/releases +ZIC_STRIP_COMPONENTS = 0 +ZIC_LICENSE = Public domain + +define HOST_ZIC_BUILD_CMDS + $(HOST_MAKE_ENV) $(MAKE) -C $(@D) zic +endef + +define HOST_ZIC_INSTALL_CMDS + $(INSTALL) -D -m 755 $(@D)/zic $(HOST_DIR)/usr/sbin/zic + $(INSTALL) -D -m 644 $(@D)/tzfile.h $(HOST_DIR)/usr/include/tzfile.h +endef + +$(eval $(host-generic-package)) + +ZIC = $(HOST_DIR)/usr/sbin/zic diff --git a/package/zip/0001-configure-Remove-Check-C-compiler-type-optimization-.patch b/package/zip/0001-configure-Remove-Check-C-compiler-type-optimization-.patch new file mode 100644 index 0000000000..591b178aaa --- /dev/null +++ b/package/zip/0001-configure-Remove-Check-C-compiler-type-optimization-.patch @@ -0,0 +1,130 @@ +From 0f5e1658c05746b17f05a1bade263cad19b37e79 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Thu, 22 Jan 2015 15:20:25 +0100 +Subject: [PATCH 1/6] configure: Remove "Check C compiler type (optimization + options)" + +This test force optimization to -O3 +while it is already set in CFLAGS + +Signed-off-by: Romain Naour +--- + unix/configure | 98 ---------------------------------------------------------- + 1 file changed, 98 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 73ba803..4185fee 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -22,108 +22,10 @@ LFLAGS1='' + LFLAGS2='' + LN="ln -s" + +-CFLAGS_OPT='' +- + # bzip2 + IZ_BZIP2=${3-} + CFLAGS_BZ='' + +- +-echo 'Check C compiler type (optimization options)' +-# Sun C? +-cat > conftest.c << _EOF_ +-int main() +-{ +-#ifndef __SUNPRO_C +- bad code +-#endif +- return 0; +-} +-_EOF_ +-$CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null +-if test $? -eq 0; then +- CFLAGS_OPT='-xO3' +- echo " Sun C ($CFLAGS_OPT)" +-else +- # Tru64 DEC/Compaq/HP C? +- cat > conftest.c << _EOF_ +-int main() +-{ +-#ifndef __DECC +- bad code +-#endif +- return 0; +-} +-_EOF_ +- $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null +- if test $? -eq 0; then +- CFLAGS_OPT='-O3' +- echo " DEC C ($CFLAGS_OPT)" +- else +- # HP-UX HP C? +- cat > conftest.c << _EOF_ +-int main() +-{ +-#ifdef __GNUC__ +- bad code +-#endif +-#ifndef __hpux +- bad code +-#endif +- return 0; +-} +-_EOF_ +- $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null +- if test $? -eq 0; then +- # HP-UX, not GCC. Lame bundled or real ANSI compiler? +- CFLAGS_OPT_TRY="+O3 +Onolimit" +- $CC $CFLAGS $CFLAGS_OPT_TRY -c conftest.c 2>&1 | \ +- grep '(Bundled)' > /dev/null +- if test $? -ne 0; then +- CFLAGS_OPT="$CFLAGS_OPT_TRY" +- echo " HP-UX ANSI C ($CFLAGS_OPT)" +- else +- echo ' HP-UX Bundled C (no opt)' +- fi +- else +- # GNU C? +- cat > conftest.c << _EOF_ +-int main() +-{ +-#ifndef __GNUC__ +- bad code +-#endif +- return 0; +-} +-_EOF_ +- $CC $CFLAGS -c conftest.c > /dev/null 2>/dev/null +- if test $? -eq 0; then +- CFLAGS_OPT='-O3' +- echo " GNU C ($CFLAGS_OPT)" +- # Special Mac OS X shared library "ld" option? +- if test ` uname -s 2> /dev/null ` = 'Darwin'; then +- lf='-Wl,-search_paths_first' +- $CC $CFLAGS $lf conftest.c > /dev/null 2>/dev/null +- if test $? -eq 0; then +- LFLAGS2="${LFLAGS2} ${lf}" +- fi +- rm -f conftest +- fi +- else +- CFLAGS_OPT='-O' +- echo " Other-unknown C ($CFLAGS_OPT)" +- fi +- fi +- fi +-fi +- +-# optimization flags +-if test -n "${CFLAGS_OPT}"; then +- CFLAGS="${CFLAGS} ${CFLAGS_OPT}" +- CFLAGS_BZ="${CFLAGS_BZ} ${CFLAGS_OPT}" +-fi +- +- + # bzip2 + + echo "Check bzip2 support" +-- +1.9.3 + diff --git a/package/zip/0002-configure-Don-t-use-host-CPP.patch b/package/zip/0002-configure-Don-t-use-host-CPP.patch new file mode 100644 index 0000000000..8504912722 --- /dev/null +++ b/package/zip/0002-configure-Don-t-use-host-CPP.patch @@ -0,0 +1,37 @@ +From fc5c889131ff6270e1028cc7edd87e7f10a7da6d Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Thu, 22 Jan 2015 15:21:31 +0100 +Subject: [PATCH 2/6] configure: Don't use host CPP + +CPP is redefined if a cpp binary (/lib/cpp) is found on the host. + +Use the CPP="${CC} -E" allows to pass the following checks: +Check if we can use asm code (for -DASMV) +Check if compiler generates underlines (for -DASM_CRC) + +Signed-off-by: Romain Naour +--- + unix/configure | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 4185fee..489009f 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -122,13 +122,6 @@ fi + echo Check for the C preprocessor + # on SVR4, cc -E does not produce correct assembler files. Need /lib/cpp. + CPP="${CC} -E" +-# solaris as(1) needs -P, maybe others as well ? +-[ -f /usr/ccs/lib/cpp ] && CPP="/usr/ccs/lib/cpp -P" +-[ -f /usr/lib/cpp ] && CPP=/usr/lib/cpp +-[ -f /lib/cpp ] && CPP=/lib/cpp +-[ -f /usr/bin/cpp ] && CPP=/usr/bin/cpp +-[ -f /xenix ] && CPP="${CC} -E" +-[ -f /lynx.os ] && CPP="${CC} -E" + + echo "#include " > conftest.c + $CPP conftest.c >/dev/null 2>/dev/null || CPP="${CC} -E" +-- +1.9.3 + diff --git a/package/zip/0003-Makefile-Use-CFLAGS-from-command-line.patch b/package/zip/0003-Makefile-Use-CFLAGS-from-command-line.patch new file mode 100644 index 0000000000..104b7e8d89 --- /dev/null +++ b/package/zip/0003-Makefile-Use-CFLAGS-from-command-line.patch @@ -0,0 +1,30 @@ +From 93189390de7322da78bc5b807f4cadaff46393c9 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Thu, 22 Jan 2015 22:45:30 +0100 +Subject: [PATCH 3/6] Makefile: Use CFLAGS from command line + +Replace CFLAGS_NOOPT by CFLAGS when calling unix/configure script +to create 'flags' file which contains all variables used to build +zip binary. + +Signed-off-by: Romain Naour +--- + unix/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/unix/Makefile b/unix/Makefile +index abd0c44..db62368 100644 +--- a/unix/Makefile ++++ b/unix/Makefile +@@ -177,7 +177,7 @@ uninstall: + + + flags: unix/configure +- sh unix/configure "${CC}" "${CFLAGS_NOOPT}" "${IZ_BZIP2}" ++ sh unix/configure "${CC}" "${CFLAGS}" "${IZ_BZIP2}" + + # These symbols, when #defined using -D have these effects on compilation: + # ZMEM - includes C language versions of memset(), memcpy(), +-- +1.9.3 + diff --git a/package/zip/0004-configure-use-LDFLAGS-from-command-line.patch b/package/zip/0004-configure-use-LDFLAGS-from-command-line.patch new file mode 100644 index 0000000000..35d3860215 --- /dev/null +++ b/package/zip/0004-configure-use-LDFLAGS-from-command-line.patch @@ -0,0 +1,35 @@ +From 5c58b8737dc9ccf9407f6725f6f07b764d6abb22 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Thu, 22 Jan 2015 23:47:55 +0100 +Subject: [PATCH 4/6] configure: use LDFLAGS from command line + +The bzip2 support may not enabled due to a build error +during the checking for bzip2 library. +The library path (-L) to bzip2 library is missing. + +Signed-off-by: Romain Naour +--- + unix/configure | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 489009f..de9fd68 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -106,11 +106,11 @@ int main() + return 0; + } + _EOF_ +- $CC $CFLAGS -o conftest conftest.c -lbz2 > /dev/null 2>/dev/null ++ $CC $CFLAGS $LDFLAGS -o conftest conftest.c -lbz2 > /dev/null 2>/dev/null + if test $? -eq 0; then + echo "-- OS supports bzip2 - linking in bzip2" + CFLAGS="${CFLAGS} -DBZIP2_SUPPORT" +- LFLAGS2="${LFLAGS2} -lbz2" ++ LFLAGS2="${LFLAGS2} ${LDFLAGS} -lbz2" + else + echo "-- Either bzlib.h or libbz2.a not found - no bzip2" + fi +-- +1.9.3 + diff --git a/package/zip/0005-unix-configure-remove-GID-UID-size-check.patch b/package/zip/0005-unix-configure-remove-GID-UID-size-check.patch new file mode 100644 index 0000000000..38d8d730e1 --- /dev/null +++ b/package/zip/0005-unix-configure-remove-GID-UID-size-check.patch @@ -0,0 +1,85 @@ +From d8da4e5f0ebed000f880e60b6cca7c575f7ed1c7 Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 23 Jan 2015 22:13:14 +0100 +Subject: [PATCH 5/6] unix/configure: remove GID/UID size check + +This check can't work for cross-compilation since it +try to run a target's binary on the host system. + +Reported-by: Richard Genoud +Signed-off-by: Romain Naour +--- + unix/configure | 57 --------------------------------------------------------- + 1 file changed, 57 deletions(-) + +diff --git a/unix/configure b/unix/configure +index de9fd68..7bfc9eb 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -237,63 +237,6 @@ _EOF_ + $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null + [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_OFF_T" + +- +-echo Check size of UIDs and GIDs +-echo "(Now zip stores variable size UIDs/GIDs using a new extra field. This" +-echo " tests if this OS uses 16-bit UIDs/GIDs and so if the old 16-bit storage" +-echo " should also be used for backward compatibility.)" +-# Added 2008-04-15 CS +-cat > conftest.c << _EOF_ +-# define _LARGEFILE_SOURCE /* some OSes need this for fseeko */ +-# define _LARGEFILE64_SOURCE +-# define _FILE_OFFSET_BITS 64 /* select default interface as 64 bit */ +-# define _LARGE_FILES /* some OSes need this for 64-bit off_t */ +-#include +-#include +-#include +-#include +-int main() +-{ +- struct stat s; +- +- printf(" s.st_uid is %u bytes\n", sizeof(s.st_uid)); +- printf(" s.st_gid is %u bytes\n", sizeof(s.st_gid)); +- +- /* see if have 16-bit UID */ +- if (sizeof(s.st_uid) != 2) { +- return 1; +- } +- /* see if have 16-bit GID */ +- if (sizeof(s.st_gid) != 2) { +- return 2; +- } +- return 3; +-} +-_EOF_ +-# compile it +-$CC -o conftest conftest.c >/dev/null 2>/dev/null +-if [ $? -ne 0 ]; then +- echo -- UID/GID test failed on compile - disabling old 16-bit UID/GID support +- CFLAGS="${CFLAGS} -DUIDGID_NOT_16BIT" +-else +-# run it +- ./conftest +- r=$? +- if [ $r -eq 1 ]; then +- echo -- UID not 2 bytes - disabling old 16-bit UID/GID support +- CFLAGS="${CFLAGS} -DUIDGID_NOT_16BIT" +- elif [ $r -eq 2 ]; then +- echo -- GID not 2 bytes - disabling old 16-bit UID/GID support +- CFLAGS="${CFLAGS} -DUIDGID_NOT_16BIT" +- elif [ $r -eq 3 ]; then +- echo -- 16-bit UIDs and GIDs - keeping old 16-bit UID/GID support +- else +- echo -- test failed - conftest returned $r - disabling old 16-bit UID/GID support +- CFLAGS="${CFLAGS} -DUIDGID_NOT_16BIT" +- fi +-fi +- +- + # Now we set the 64-bit file environment and check the size of off_t + # Added 11/4/2003 EG + # Revised 8/12/2004 EG +-- +1.9.3 + diff --git a/package/zip/0006-unix-configure-borrow-the-LFS-test-from-autotools.patch b/package/zip/0006-unix-configure-borrow-the-LFS-test-from-autotools.patch new file mode 100644 index 0000000000..a4e99dbc8c --- /dev/null +++ b/package/zip/0006-unix-configure-borrow-the-LFS-test-from-autotools.patch @@ -0,0 +1,101 @@ +From fc392c939b9a18959482f588aff0afc29dd6d30a Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 23 Jan 2015 22:20:18 +0100 +Subject: [PATCH 6/6] unix/configure: borrow the LFS test from autotools. + +Infozip's LFS check can't work for cross-compilation +since it try to run a target's binary on the host system. + +Instead, use to LFS test used by autotools which is a +compilation test. +(see autotools/lib/autoconf/specific.m4) + +Reported-by: Richard Genoud +Signed-off-by: Romain Naour +--- + unix/configure | 51 ++++++++++++++++++--------------------------------- + 1 file changed, 18 insertions(+), 33 deletions(-) + +diff --git a/unix/configure b/unix/configure +index 7bfc9eb..588f269 100644 +--- a/unix/configure ++++ b/unix/configure +@@ -237,9 +237,8 @@ _EOF_ + $CC $CFLAGS -c conftest.c >/dev/null 2>/dev/null + [ $? -ne 0 ] && CFLAGS="${CFLAGS} -DNO_OFF_T" + +-# Now we set the 64-bit file environment and check the size of off_t +-# Added 11/4/2003 EG +-# Revised 8/12/2004 EG ++# LFS check borrowed from autotools sources ++# lib/autoconf/specific.m4 + + echo Check for Large File Support + cat > conftest.c << _EOF_ +@@ -247,24 +246,22 @@ cat > conftest.c << _EOF_ + # define _LARGEFILE64_SOURCE + # define _FILE_OFFSET_BITS 64 /* select default interface as 64 bit */ + # define _LARGE_FILES /* some OSes need this for 64-bit off_t */ ++ + #include +-#include +-#include +-#include +-int main() ++ /* Check that off_t can represent 2**63 - 1 correctly. ++ We can't simply define LARGE_OFF_T to be 9223372036854775807, ++ since some C++ compilers masquerading as C compilers ++ incorrectly reject 9223372036854775807. */ ++#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) ++ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 ++ && LARGE_OFF_T % 2147483647 == 1) ++ ? 1 : -1]; ++int ++main () + { +- off_t offset; +- struct stat s; +- /* see if have 64-bit off_t */ +- if (sizeof(offset) < 8) +- return 1; +- printf(" off_t is %d bytes\n", sizeof(off_t)); +- /* see if have 64-bit stat */ +- if (sizeof(s.st_size) < 8) { +- printf(" s.st_size is %d bytes\n", sizeof(s.st_size)); +- return 2; +- } +- return 3; ++ ++ ; ++ return 0; + } + _EOF_ + # compile it +@@ -272,22 +269,10 @@ $CC -o conftest conftest.c >/dev/null 2>/dev/null + if [ $? -ne 0 ]; then + echo -- no Large File Support + else +-# run it +- ./conftest +- r=$? +- if [ $r -eq 1 ]; then +- echo -- no Large File Support - no 64-bit off_t +- elif [ $r -eq 2 ]; then +- echo -- no Large File Support - no 64-bit stat +- elif [ $r -eq 3 ]; then +- echo -- yes we have Large File Support! +- CFLAGS="${CFLAGS} -DLARGE_FILE_SUPPORT" +- else +- echo -- no Large File Support - conftest returned $r +- fi ++ echo -- yes we have Large File Support! ++ CFLAGS="${CFLAGS} -DLARGE_FILE_SUPPORT" + fi + +- + # Check for wide char for Unicode support + # Added 11/24/2005 EG + +-- +1.9.3 + diff --git a/package/zip/Config.in b/package/zip/Config.in new file mode 100644 index 0000000000..4b6360a456 --- /dev/null +++ b/package/zip/Config.in @@ -0,0 +1,10 @@ +config BR2_PACKAGE_ZIP + bool "zip" + help + Zip is a compression and file packaging/archive utility. + Although highly compatible both with PKWARE's PKZIP and + PKUNZIP utilities for MS-DOS and with Info-ZIP's own UnZip, + our primary objectives have been portability and + other-than-MSDOS functionality. + + http://infozip.sourceforge.net/Zip.html diff --git a/package/zip/Config.in.host b/package/zip/Config.in.host new file mode 100644 index 0000000000..b14ce55dbd --- /dev/null +++ b/package/zip/Config.in.host @@ -0,0 +1,10 @@ +config BR2_PACKAGE_HOST_ZIP + bool "host zip" + help + Zip is a compression and file packaging/archive utility. + Although highly compatible both with PKWARE's PKZIP and + PKUNZIP utilities for MS-DOS and with Info-ZIP's own UnZip, + our primary objectives have been portability and + other-than-MSDOS functionality. + + http://infozip.sourceforge.net/Zip.html diff --git a/package/zip/zip.hash b/package/zip/zip.hash new file mode 100644 index 0000000000..782ae5ec96 --- /dev/null +++ b/package/zip/zip.hash @@ -0,0 +1,2 @@ +# Locally calculated from download (no sig, hash) +sha256 f0e8bb1f9b7eb0b01285495a2699df3a4b766784c1765a8f1aeedf63c0806369 zip30.tgz diff --git a/package/zip/zip.mk b/package/zip/zip.mk new file mode 100644 index 0000000000..5338f88166 --- /dev/null +++ b/package/zip/zip.mk @@ -0,0 +1,54 @@ +################################################################################ +# +# zip +# +################################################################################ + +ZIP_VERSION = 30 +ZIP_SOURCE = zip$(ZIP_VERSION).tgz +ZIP_SITE = ftp://ftp.info-zip.org/pub/infozip/src +ZIP_LICENSE = Info-ZIP +ZIP_LICENSE_FILES = LICENSE + +ifeq ($(BR2_PACKAGE_BZIP2),y) +ZIP_DEPENDENCIES += bzip2 +endif + +# Infozip's default CFLAGS. +ZIP_CFLAGS = -I. -DUNIX + +# Disable the support of 16-bit UIDs/GIDs, the test in unix/configure was +# removed since it can't work for cross-compilation. +ZIP_CFLAGS += -DUIDGID_NOT_16BIT + +# infozip already defines _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE when +# necessary, redefining it on the command line causes some warnings. +ZIP_TARGET_CFLAGS = \ + $(filter-out -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE,$(TARGET_CFLAGS)) + +define ZIP_BUILD_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) \ + CFLAGS="$(ZIP_TARGET_CFLAGS) $(ZIP_CFLAGS)" \ + AS="$(TARGET_CC) -c" \ + -f unix/Makefile generic +endef + +define ZIP_INSTALL_TARGET_CMDS + $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D) -f unix/Makefile install \ + prefix=$(TARGET_DIR)/usr +endef + +define HOST_ZIP_BUILD_CMDS + $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) \ + CFLAGS="$(HOST_CFLAGS) $(ZIP_CFLAGS)" \ + AS="$(HOSTCC) -c" \ + -f unix/Makefile generic +endef + +define HOST_ZIP_INSTALL_CMDS + $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D) -f unix/Makefile install \ + prefix=$(HOST_DIR)/usr +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/zlib/Config.in b/package/zlib/Config.in new file mode 100644 index 0000000000..f62330486b --- /dev/null +++ b/package/zlib/Config.in @@ -0,0 +1,7 @@ +config BR2_PACKAGE_ZLIB + bool "zlib" + help + Standard (de)compression library. Used by things like + gzip and libpng. + + http://www.gzip.org/zlib/ diff --git a/package/zlib/zlib.hash b/package/zlib/zlib.hash new file mode 100644 index 0000000000..d6382f8d3b --- /dev/null +++ b/package/zlib/zlib.hash @@ -0,0 +1,2 @@ +# From http://www.zlib.net/ +md5 28f1205d8dd2001f26fec1e8c2cebe37 zlib-1.2.8.tar.xz diff --git a/package/zlib/zlib.mk b/package/zlib/zlib.mk new file mode 100644 index 0000000000..aec9daf6fe --- /dev/null +++ b/package/zlib/zlib.mk @@ -0,0 +1,77 @@ +################################################################################ +# +# zlib +# +################################################################################ + +ZLIB_VERSION = 1.2.8 +ZLIB_SOURCE = zlib-$(ZLIB_VERSION).tar.xz +ZLIB_SITE = http://downloads.sourceforge.net/project/libpng/zlib/$(ZLIB_VERSION) +ZLIB_LICENSE = zlib license +ZLIB_LICENSE_FILES = README +ZLIB_INSTALL_STAGING = YES + +# It is not possible to build only a shared version of zlib, so we build both +# shared and static, unless we only want the static libs, and we eventually +# selectively remove what we do not want +ifeq ($(BR2_STATIC_LIBS),y) +ZLIB_PIC = +ZLIB_SHARED = --static +else +ZLIB_PIC = -fPIC +ZLIB_SHARED = --shared +endif + +define ZLIB_CONFIGURE_CMDS + (cd $(@D); rm -rf config.cache; \ + $(TARGET_CONFIGURE_ARGS) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) $(ZLIB_PIC)" \ + ./configure \ + $(ZLIB_SHARED) \ + --prefix=/usr \ + ) +endef + +define HOST_ZLIB_CONFIGURE_CMDS + (cd $(@D); rm -rf config.cache; \ + $(HOST_CONFIGURE_ARGS) \ + $(HOST_CONFIGURE_OPTS) \ + ./configure \ + --prefix="$(HOST_DIR)/usr" \ + --sysconfdir="$(HOST_DIR)/etc" \ + ) +endef + +define ZLIB_BUILD_CMDS + $(MAKE1) -C $(@D) +endef + +define HOST_ZLIB_BUILD_CMDS + $(MAKE1) -C $(@D) +endef + +define ZLIB_INSTALL_STAGING_CMDS + $(MAKE1) -C $(@D) DESTDIR=$(STAGING_DIR) LDCONFIG=true install +endef + +define ZLIB_INSTALL_TARGET_CMDS + $(MAKE1) -C $(@D) DESTDIR=$(TARGET_DIR) LDCONFIG=true install +endef + +# We don't care removing the .a from target, since it not used at link +# time to build other packages, and it is anyway removed later before +# assembling the filesystem images anyway. +ifeq ($(BR2_SHARED_LIBS),y) +define ZLIB_RM_STATIC_STAGING + rm -f $(STAGING_DIR)/usr/lib/libz.a +endef +ZLIB_POST_INSTALL_STAGING_HOOKS += ZLIB_RM_STATIC_STAGING +endif + +define HOST_ZLIB_INSTALL_CMDS + $(MAKE1) -C $(@D) LDCONFIG=true install +endef + +$(eval $(generic-package)) +$(eval $(host-generic-package)) diff --git a/package/zlog/0001-fix-compiling-on-Buildroot.patch b/package/zlog/0001-fix-compiling-on-Buildroot.patch new file mode 100644 index 0000000000..32aa7d6db7 --- /dev/null +++ b/package/zlog/0001-fix-compiling-on-Buildroot.patch @@ -0,0 +1,32 @@ +From a9f6a55bdb29a2bebc96a68ab53077906c25a9df Mon Sep 17 00:00:00 2001 +From: Yegor Yefremov +Date: Wed, 22 Jan 2014 15:04:42 +0100 +Subject: [PATCH] Fix compiling on Buildroot + +Buildroot always specifies -D_LARGEFILE_SOURCE, -D_LARGEFILE64_SOURCE, +-D_FILE_OFFSET_BITS=64, so define them only if they are not already +defined. + +Signed-off-by: Yegor Yefremov +--- + src/fmacros.h | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/src/fmacros.h b/src/fmacros.h +index fa37948..059dfeb 100644 +--- a/src/fmacros.h ++++ b/src/fmacros.h +@@ -14,7 +14,11 @@ + #define _XOPEN_SOURCE + #endif + ++#ifndef _LARGEFILE_SOURCE + #define _LARGEFILE_SOURCE ++#endif ++#ifndef _FILE_OFFSET_BITS + #define _FILE_OFFSET_BITS 64 ++#endif + + #endif +-- +1.7.7 diff --git a/package/zlog/0002-compile-Remove-Werror-and-avoid-build-failures-becau.patch b/package/zlog/0002-compile-Remove-Werror-and-avoid-build-failures-becau.patch new file mode 100644 index 0000000000..0f1b912387 --- /dev/null +++ b/package/zlog/0002-compile-Remove-Werror-and-avoid-build-failures-becau.patch @@ -0,0 +1,38 @@ +From 4a08c9e07fa8b7a1d6a76b927ea97e3eaa784845 Mon Sep 17 00:00:00 2001 +From: Ezequiel Garcia +Date: Sun, 26 Oct 2014 16:16:25 -0300 +Subject: [PATCH] compile: Remove -Werror and avoid build failures because of + warnings + +Using -Werror on production is a bad idea, as otherwise harmless warnings +get treated as errors breaking builds. This is currently the case with +Nios-II architecture toolchain, warning about a deprecated macro: + +../usr/nios2-buildroot-linux-gnu/sysroot/usr/include/features.h:148:3: +error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror=cpp] + # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + +Instead of trying to fix the macro, let's fix the real issue here, +and remove -Werror. + +Signed-off-by: Ezequiel Garcia +--- + src/makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/makefile b/src/makefile +index 294dc08..4ac4c43 100644 +--- a/src/makefile ++++ b/src/makefile +@@ -32,7 +32,7 @@ ZLOG_MINOR=2 + # Fallback to gcc when $CC is not in $PATH. + CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc') + OPTIMIZATION?=-O2 +-WARNINGS=-Wall -Werror -Wstrict-prototypes -fwrapv ++WARNINGS=-Wall -Wstrict-prototypes -fwrapv + DEBUG?= -g -ggdb + REAL_CFLAGS=$(OPTIMIZATION) -fPIC -pthread $(CFLAGS) $(WARNINGS) $(DEBUG) + REAL_LDFLAGS=$(LDFLAGS) -pthread +-- +2.1.0 + diff --git a/package/zlog/Config.in b/package/zlog/Config.in new file mode 100644 index 0000000000..cf86a26174 --- /dev/null +++ b/package/zlog/Config.in @@ -0,0 +1,12 @@ +config BR2_PACKAGE_ZLOG + bool "zlog" + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_STATIC_LIBS + help + zlog is a reliable, high-performance, thread safe, flexible, + clear-model, pure C logging library. + + https://github.com/HardySimpson/zlog + +comment "zlog needs a toolchain w/ threads, dynamic library" + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS diff --git a/package/zlog/zlog.mk b/package/zlog/zlog.mk new file mode 100644 index 0000000000..fb8762c671 --- /dev/null +++ b/package/zlog/zlog.mk @@ -0,0 +1,26 @@ +################################################################################ +# +# zlog +# +################################################################################ + +ZLOG_VERSION = ca6162be1608839e99c6388c28488c51ccf98e4a +ZLOG_SITE = $(call github,HardySimpson,zlog,$(ZLOG_VERSION)) +ZLOG_LICENSE = LGPLv2.1 +ZLOG_LICENSE_FILES = COPYING +ZLOG_INSTALL_STAGING = YES + +define ZLOG_BUILD_CMDS + $(MAKE1) CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \ + -C $(@D) all +endef + +define ZLOG_INSTALL_STAGING_CMDS + $(MAKE) PREFIX=$(STAGING_DIR)/usr -C $(@D) install +endef + +define ZLOG_INSTALL_TARGET_CMDS + $(MAKE) PREFIX=$(TARGET_DIR)/usr -C $(@D) install +endef + +$(eval $(generic-package)) diff --git a/package/zmqpp/0001-Allow-building-shared-or-static-library-only.patch b/package/zmqpp/0001-Allow-building-shared-or-static-library-only.patch new file mode 100644 index 0000000000..70caee8162 --- /dev/null +++ b/package/zmqpp/0001-Allow-building-shared-or-static-library-only.patch @@ -0,0 +1,83 @@ +From 02ad67e60ef698ee47f6ee53b36e5b89c2fd71e7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Wed, 24 Feb 2016 10:07:11 -0300 +Subject: [PATCH 1/2] Allow building shared or static library only +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[Gustavo: update for 4.1.2] + +Signed-off-by: Jörg Krause +Signed-off-by: Gustavo Zacarias +--- + Makefile | 19 +++++++++++++++---- + 1 file changed, 15 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 9df5996..86c8fac 100644 +--- a/Makefile ++++ b/Makefile +@@ -79,6 +79,8 @@ ifeq ($(UNAME_S),Darwin) + endif + + ++BUILD_SHARED ?= yes ++ + CONFIG_FLAGS = + ifeq ($(CONFIG),debug) + CONFIG_FLAGS = -g -fno-inline -ftemplate-depth-1000 +@@ -93,13 +95,22 @@ ifneq (,$(findstring $(CONFIG),release loadtest)) + CONFIG_FLAGS = -O3 -funroll-loops -ffast-math -finline-functions -fomit-frame-pointer -DNO_DEBUG_LOG -DNO_TRACE_LOG -DNDEBUG + endif + +-COMMON_FLAGS = -MMD -std=c++11 -pipe -Wall -fPIC \ ++COMMON_FLAGS = -MMD -std=c++11 -pipe -Wall \ + -DBUILD_ENV=$(CONFIG) \ + -DBUILD_DATESTAMP='$(APP_DATESTAMP)' \ + -DBUILD_LIBRARY_NAME='"$(LIBRARY_NAME)"' \ + -DBUILD_CLIENT_NAME='"$(CLIENT_TARGET)"' \ + -I$(SRC_PATH) $(CUSTOM_INCLUDE_PATH) + ++ifeq ($(BUILD_SHARED),yes) ++COMMON_FLAGS += -fPIC ++LIBRARY_TARGETS += $(LIBRARY_SHARED) ++endif ++ ++ifeq ($(BUILD_STATIC),yes) ++LIBRARY_TARGETS += $(LIBRARY_ARCHIVE) ++endif ++ + COMMON_LIBS = -lzmq + + LIBRARY_LIBS = +@@ -147,10 +158,11 @@ install: + mkdir -p $(INCLUDEDIR)/$(LIBRARY_DIR) + mkdir -p $(LIBDIR) + install -m 644 $(ALL_LIBRARY_INCLUDES) $(INCLUDEDIR)/$(LIBRARY_DIR) ++ifeq ($(BUILD_SHARED),yes) + install -m 755 $(BUILD_PATH)/$(LIBRARY_VERSION_SHARED) $(LIBDIR)/$(LIBRARY_FULL_VERSION_SHARED) +- install -m 755 $(BUILD_PATH)/$(LIBRARY_ARCHIVE) $(LIBDIR)/$(LIBRARY_ARCHIVE) + ln -sf $(LIBRARY_FULL_VERSION_SHARED) $(LIBDIR)/$(LIBRARY_VERSION_SHARED) + ln -sf $(LIBRARY_FULL_VERSION_SHARED) $(LIBDIR)/$(LIBRARY_SHARED) ++endif + if [ -f $(BUILD_PATH)/$(CLIENT_TARGET) ]; then install -m 755 $(BUILD_PATH)/$(CLIENT_TARGET) $(BINDIR); fi + $(LDCONFIG) + @echo "use make installcheck to test the install" +@@ -172,7 +184,7 @@ clean: + + client: $(CLIENT_TARGET) + +-library: $(LIBRARY_SHARED) $(LIBRARY_ARCHIVE) ++library: $(LIBRARY_TARGETS) + + # + # BUILD Targets +@@ -211,4 +223,3 @@ test: $(TESTS_TARGET) + $(OBJECT_PATH)/%.o: $(SRC_PATH)/%.cpp + -mkdir -p $(dir $@) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(COMMON_FLAGS) $(CONFIG_FLAGS) -c -o $@ $< +- +-- +2.4.10 + diff --git a/package/zmqpp/0002-Install-static-library-for-static-builds.patch b/package/zmqpp/0002-Install-static-library-for-static-builds.patch new file mode 100644 index 0000000000..402f85e263 --- /dev/null +++ b/package/zmqpp/0002-Install-static-library-for-static-builds.patch @@ -0,0 +1,33 @@ +From 283676e2e8f15bedca20c3d94caeecfdebe11ffd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?J=C3=B6rg=20Krause?= +Date: Mon, 23 Nov 2015 22:53:09 +0100 +Subject: [PATCH 2/2] Install static library for static builds +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +[Gustavo: update for 4.1.2] + +Signed-off-by: Jörg Krause +Signed-off-by: Gustavo Zacarias +--- + Makefile | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/Makefile b/Makefile +index 86c8fac..fbaff63 100644 +--- a/Makefile ++++ b/Makefile +@@ -163,6 +163,9 @@ ifeq ($(BUILD_SHARED),yes) + ln -sf $(LIBRARY_FULL_VERSION_SHARED) $(LIBDIR)/$(LIBRARY_VERSION_SHARED) + ln -sf $(LIBRARY_FULL_VERSION_SHARED) $(LIBDIR)/$(LIBRARY_SHARED) + endif ++ifeq ($(BUILD_STATIC),yes) ++ install -m 755 $(BUILD_PATH)/$(LIBRARY_ARCHIVE) $(LIBDIR)/$(LIBRARY_ARCHIVE) ++endif + if [ -f $(BUILD_PATH)/$(CLIENT_TARGET) ]; then install -m 755 $(BUILD_PATH)/$(CLIENT_TARGET) $(BINDIR); fi + $(LDCONFIG) + @echo "use make installcheck to test the install" +-- +2.4.10 + diff --git a/package/zmqpp/Config.in b/package/zmqpp/Config.in new file mode 100644 index 0000000000..602425fc88 --- /dev/null +++ b/package/zmqpp/Config.in @@ -0,0 +1,38 @@ +config BR2_PACKAGE_ZMQPP + bool "zmqpp" + # c++1x support + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_WCHAR # util-linux + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + select BR2_PACKAGE_ZEROMQ + help + C++ binding for zeromq (ZeroMQ, 0MQ, zmq). + + This C++ binding is a 'high-level' library that hides most of the + C-style interface core zeromq provides. + + http://github.com/benjamg/zmqpp + +comment "zmqpp needs a toolchain w/ C++, wchar, threads, gcc >= 4.7" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \ + !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + +if BR2_PACKAGE_ZMQPP + +config BR2_PACKAGE_ZMQPP_CLIENT + bool "zmqpp client" + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HAS_THREADS # boost + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + select BR2_PACKAGE_BOOST + select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS + help + Build and install the zmqpp client, a command line tool that can be + used to listen or send to zeromq sockets. + +comment "zmqpp client needs a toolchain w/ dynamic library, threads" + depends on BR2_PACKAGE_BOOST_ARCH_SUPPORTS + depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HAS_THREADS + +endif diff --git a/package/zmqpp/zmqpp.hash b/package/zmqpp/zmqpp.hash new file mode 100644 index 0000000000..63c6a34f0c --- /dev/null +++ b/package/zmqpp/zmqpp.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 831ad02df64034268d910c30f9fb1b1e631ad810182951af9d7d622650831eb5 zmqpp-4.1.2.tar.gz diff --git a/package/zmqpp/zmqpp.mk b/package/zmqpp/zmqpp.mk new file mode 100644 index 0000000000..18da709691 --- /dev/null +++ b/package/zmqpp/zmqpp.mk @@ -0,0 +1,46 @@ +################################################################################ +# +# zmqpp +# +################################################################################ + +ZMQPP_VERSION = 4.1.2 +ZMQPP_SITE = $(call github,zeromq,zmqpp,$(ZMQPP_VERSION)) +ZMQPP_INSTALL_STAGING = YES +ZMQPP_DEPENDENCIES = zeromq +ZMQPP_LICENSE = MIT +ZMQPP_LICENSE_FILES = LICENSE +ZMQPP_MAKE_OPTS = LD="$(TARGET_CXX)" BUILD_PATH=./build PREFIX=/usr +ZMQPP_LDFLAGS = $(TARGET_LDFLAGS) -lpthread + +ifeq ($(BR2_PACKAGE_ZMQPP_CLIENT),y) +ZMQPP_DEPENDENCIES += boost +endif + +ifeq ($(BR2_STATIC_LIBS),y) +ZMQPP_MAKE_OPTS += BUILD_STATIC=yes BUILD_SHARED=no +else ifeq ($(BR2_SHARED_STATIC_LIBS),y) +ZMQPP_MAKE_OPTS += BUILD_STATIC=yes BUILD_SHARED=yes +else ifeq ($(BR2_SHARED_LIBS),y) +ZMQPP_MAKE_OPTS += BUILD_STATIC=no BUILD_SHARED=yes +endif + +define ZMQPP_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + LDFLAGS="$(ZMQPP_LDFLAGS)" \ + $(ZMQPP_MAKE_OPTS) $(if $(BR2_PACKAGE_ZMQPP_CLIENT),client,library) -C $(@D) +endef + +define ZMQPP_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 -d $(TARGET_DIR)/usr/include/zmqpp + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(ZMQPP_MAKE_OPTS) DESTDIR=$(TARGET_DIR) install -C $(@D) +endef + +define ZMQPP_INSTALL_STAGING_CMDS + $(INSTALL) -m 0755 -d $(STAGING_DIR)/usr/include/zmqpp + $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \ + $(ZMQPP_MAKE_OPTS) DESTDIR=$(STAGING_DIR) install -C $(@D) +endef + +$(eval $(generic-package)) diff --git a/package/znc/0001-Add-time.h-includes-where-appropiate.patch b/package/znc/0001-Add-time.h-includes-where-appropiate.patch new file mode 100644 index 0000000000..c8ba6d450a --- /dev/null +++ b/package/znc/0001-Add-time.h-includes-where-appropiate.patch @@ -0,0 +1,194 @@ +From 9a51195e916f14a36c2a2a809f2393e5ed2424a3 Mon Sep 17 00:00:00 2001 +From: Gustavo Zacarias +Date: Thu, 6 Aug 2015 11:20:54 -0300 +Subject: [PATCH] Add includes where appropiate + +Signed-off-by: Gustavo Zacarias +--- + modules/adminlog.cpp | 1 + + modules/ctcpflood.cpp | 1 + + modules/flooddetach.cpp | 1 + + modules/lastseen.cpp | 1 + + modules/log.cpp | 1 + + modules/simple_away.cpp | 1 + + src/Buffer.cpp | 1 + + src/FileUtils.cpp | 1 + + src/IRCSock.cpp | 1 + + src/User.cpp | 1 + + src/WebModules.cpp | 1 + + src/ZNCDebug.cpp | 1 + + src/main.cpp | 1 + + src/znc.cpp | 1 + + 14 files changed, 14 insertions(+) + +diff --git a/modules/adminlog.cpp b/modules/adminlog.cpp +index d08369e..1636799 100644 +--- a/modules/adminlog.cpp ++++ b/modules/adminlog.cpp +@@ -20,6 +20,7 @@ + #include + + #include ++#include + + class CAdminLogMod : public CModule { + public: +diff --git a/modules/ctcpflood.cpp b/modules/ctcpflood.cpp +index 7697ef8..c105ef7 100644 +--- a/modules/ctcpflood.cpp ++++ b/modules/ctcpflood.cpp +@@ -16,6 +16,7 @@ + + #include + #include ++#include + + class CCtcpFloodMod : public CModule { + public: +diff --git a/modules/flooddetach.cpp b/modules/flooddetach.cpp +index 9c41734..cd88bd2 100644 +--- a/modules/flooddetach.cpp ++++ b/modules/flooddetach.cpp +@@ -16,6 +16,7 @@ + + #include + #include ++#include + + using std::map; + +diff --git a/modules/lastseen.cpp b/modules/lastseen.cpp +index 416a111..414310f 100644 +--- a/modules/lastseen.cpp ++++ b/modules/lastseen.cpp +@@ -16,6 +16,7 @@ + + #include + #include ++#include + + using std::map; + using std::pair; +diff --git a/modules/log.cpp b/modules/log.cpp +index 2f3124a..e238bb1 100644 +--- a/modules/log.cpp ++++ b/modules/log.cpp +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + + using std::vector; +diff --git a/modules/simple_away.cpp b/modules/simple_away.cpp +index 57d6e7a..2f73b0a 100644 +--- a/modules/simple_away.cpp ++++ b/modules/simple_away.cpp +@@ -16,6 +16,7 @@ + + #include + #include ++#include + + #define SIMPLE_AWAY_DEFAULT_REASON "Auto away at %s" + #define SIMPLE_AWAY_DEFAULT_TIME 60 +diff --git a/src/Buffer.cpp b/src/Buffer.cpp +index 4715f76..dc14642 100644 +--- a/src/Buffer.cpp ++++ b/src/Buffer.cpp +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + CBufLine::CBufLine(const CString& sFormat, const CString& sText, const timeval* ts) : m_sFormat(sFormat), m_sText(sText), m_time() { + if (ts == nullptr) +diff --git a/src/FileUtils.cpp b/src/FileUtils.cpp +index d358aa4..92218f3 100644 +--- a/src/FileUtils.cpp ++++ b/src/FileUtils.cpp +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #ifndef HAVE_LSTAT + # define lstat(a, b) stat(a, b) +diff --git a/src/IRCSock.cpp b/src/IRCSock.cpp +index 738b5bf..c97b8fe 100644 +--- a/src/IRCSock.cpp ++++ b/src/IRCSock.cpp +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + using std::set; + using std::vector; +diff --git a/src/User.cpp b/src/User.cpp +index f3b5b91..580b52d 100644 +--- a/src/User.cpp ++++ b/src/User.cpp +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + + using std::vector; +diff --git a/src/WebModules.cpp b/src/WebModules.cpp +index 832a2e1..74e56de 100644 +--- a/src/WebModules.cpp ++++ b/src/WebModules.cpp +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/src/ZNCDebug.cpp b/src/ZNCDebug.cpp +index 6e36b57..be2f77f 100644 +--- a/src/ZNCDebug.cpp ++++ b/src/ZNCDebug.cpp +@@ -18,6 +18,7 @@ + #include + #include + #include ++#include + + bool CDebug::stdoutIsTTY = true; + bool CDebug::debug = +diff --git a/src/main.cpp b/src/main.cpp +index 465e1a0..cbe72bf 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -16,6 +16,7 @@ + + #include + #include ++#include + + #if defined(HAVE_LIBSSL) && defined(HAVE_PTHREAD) + #include +diff --git a/src/znc.cpp b/src/znc.cpp +index 624b92c..4c1ffcd 100644 +--- a/src/znc.cpp ++++ b/src/znc.cpp +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + +-- +2.4.6 + diff --git a/package/znc/0002-csocket-timeh.patch b/package/znc/0002-csocket-timeh.patch new file mode 100644 index 0000000000..cbd435fc82 --- /dev/null +++ b/package/znc/0002-csocket-timeh.patch @@ -0,0 +1,19 @@ +Include time.h since time_t is used. + +Status: not upstream, seems to be fixed in newer CSocket versions in a +different way but it hasn't been updated/bundled in znc yet. + +Signed-off-by: Gustavo Zacarias + +diff -Nura znc-1.6.1.orig/src/Csocket.cpp znc-1.6.1.cs/src/Csocket.cpp +--- znc-1.6.1.orig/src/Csocket.cpp 2015-08-06 10:14:45.256246307 -0300 ++++ znc-1.6.1.cs/src/Csocket.cpp 2015-08-06 10:27:25.380446888 -0300 +@@ -54,6 +54,8 @@ + #include + #endif /* HAVE_ICU */ + ++#include ++ + #include + + #define CS_SRANDBUFFER 128 diff --git a/package/znc/Config.in b/package/znc/Config.in new file mode 100644 index 0000000000..154d4b0789 --- /dev/null +++ b/package/znc/Config.in @@ -0,0 +1,15 @@ +config BR2_PACKAGE_ZNC + bool "znc" + depends on BR2_INSTALL_LIBSTDCPP + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + help + Advanced IRC bouncer + + http://www.znc.in + +comment "znc needs a toolchain w/ C++, dynamic library, gcc >= 4.7" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS || \ + !BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + depends on BR2_USE_MMU diff --git a/package/znc/znc.hash b/package/znc/znc.hash new file mode 100644 index 0000000000..f243d4ab02 --- /dev/null +++ b/package/znc/znc.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 631c46de76fe601a41ef7676bc974958e9a302b72b25fc92b4a603a25d89b827 znc-1.6.3.tar.gz diff --git a/package/znc/znc.mk b/package/znc/znc.mk new file mode 100644 index 0000000000..31e1bcf6c3 --- /dev/null +++ b/package/znc/znc.mk @@ -0,0 +1,42 @@ +################################################################################ +# +# znc +# +################################################################################ + +ZNC_VERSION = 1.6.3 +ZNC_SITE = http://znc.in/releases +ZNC_LICENSE = Apache-2.0 +ZNC_LICENSE_FILES = LICENSE +ZNC_DEPENDENCIES = host-pkgconf +ZNC_CONF_OPTS = --disable-perl + +ifeq ($(BR2_PACKAGE_ICU),y) +ZNC_DEPENDENCIES += icu +ZNC_CONF_OPTS += --enable-charset +else +ZNC_CONF_OPTS += --disable-charset +endif + +ifeq ($(BR2_PACKAGE_OPENSSL),y) +ZNC_DEPENDENCIES += openssl +ZNC_CONF_OPTS += --enable-openssl +else +ZNC_CONF_OPTS += --disable-openssl +endif + +ifeq ($(BR2_PACKAGE_ZLIB),y) +ZNC_DEPENDENCIES += zlib +ZNC_CONF_OPTS += --enable-zlib +else +ZNC_CONF_OPTS += --disable-zlib +endif + +ifeq ($(BR2_PACKAGE_PYTHON3),y) +ZNC_DEPENDENCIES += python3 host-swig +ZNC_CONF_OPTS += --enable-python=python3 +else +ZNC_CONF_OPTS += --disable-python +endif + +$(eval $(autotools-package)) diff --git a/package/zsh/0001-configure-use-user-set-pcre-config.patch b/package/zsh/0001-configure-use-user-set-pcre-config.patch new file mode 100644 index 0000000000..d4cf59bddd --- /dev/null +++ b/package/zsh/0001-configure-use-user-set-pcre-config.patch @@ -0,0 +1,33 @@ +From: Baruch Siach +Date: Thu, 3 Mar 2016 23:14:39 +0200 +Subject: [PATCH] configure: use user set pcre-config + +Setting a non default configuration script location is common practice when +cross compiling, since the target library might need different flags. zsh +configure scripts allows the user to set pcre-config location but doesn't +actually use it. Fix this. + +Signed-off-by: Baruch Siach +--- +Patch status: sent upstream +(http://www.zsh.org/mla/workers/2016/msg00619.html) + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index c3bd713c126a..9947b16066b6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -925,7 +925,7 @@ fi + if test x$enable_pcre = xyes; then + dnl pcre-config should probably be employed here + dnl AC_SEARCH_LIBS(pcre_compile, pcre) +- LIBS="`pcre-config --libs` $LIBS" ++ LIBS="`$ac_cv_prog_PCRECONF --libs` $LIBS" + fi + + dnl --------------------- +-- +2.7.0 + diff --git a/package/zsh/Config.in b/package/zsh/Config.in new file mode 100644 index 0000000000..261df42678 --- /dev/null +++ b/package/zsh/Config.in @@ -0,0 +1,11 @@ +config BR2_PACKAGE_ZSH + bool "zsh" + depends on BR2_USE_MMU # fork() + select BR2_PACKAGE_NCURSES + help + zsh is a shell designed for interactive use, although it is also + a powerful scripting language. Many of the useful features of bash, + ksh, and tcsh were incorporated into zsh; many original features + were added. + + http://www.zsh.org/ diff --git a/package/zsh/zsh.hash b/package/zsh/zsh.hash new file mode 100644 index 0000000000..6793162652 --- /dev/null +++ b/package/zsh/zsh.hash @@ -0,0 +1,4 @@ +# From http://www.zsh.org/pub/MD5SUM +md5 afe96fde08b70e23c1cab1ca7a68fb34 zsh-5.2.tar.xz +# Calculated based on the hash above +sha256 f17916320ffaa844bbd7ce48ceeb5945fc5f3eff64b149b4229bbfbdf3795a9d zsh-5.2.tar.xz diff --git a/package/zsh/zsh.mk b/package/zsh/zsh.mk new file mode 100644 index 0000000000..aa4029f1a2 --- /dev/null +++ b/package/zsh/zsh.mk @@ -0,0 +1,45 @@ +################################################################################ +# +# zsh +# +################################################################################ + +ZSH_VERSION = 5.2 +ZSH_SITE = http://www.zsh.org/pub +ZSH_SOURCE = zsh-$(ZSH_VERSION).tar.xz +ZSH_DEPENDENCIES = ncurses +ZSH_CONF_OPTS = --bindir=/bin +# Patching configure.ac +ZSH_AUTORECONF = YES +ZSH_LICENSE = MIT-like +ZSH_LICENSE_FILES = LICENCE + +ifeq ($(BR2_PACKAGE_GDBM),y) +ZSH_CONF_OPTS += --enable-gdbm +ZSH_DEPENDENCIES += gdbm +else +ZSH_CONF_OPTS += --disable-gdbm +endif + +ifeq ($(BR2_PACKAGE_LIBCAP),y) +ZSH_CONF_OPTS += --enable-cap +ZSH_DEPENDENCIES += libcap +else +ZSH_CONF_OPTS += --disable-cap +endif + +ifeq ($(BR2_PACKAGE_PCRE),y) +ZSH_CONF_OPTS += --enable-pcre +ZSH_CONF_ENV += ac_cv_prog_PCRECONF=$(STAGING_DIR)/usr/bin/pcre-config +ZSH_DEPENDENCIES += pcre +else +ZSH_CONF_OPTS += --disable-pcre +endif + +# Remove versioned zsh-x.y.z binary taking up space +define ZSH_TARGET_INSTALL_FIXUPS + rm -f $(TARGET_DIR)/bin/zsh-$(ZSH_VERSION) +endef +ZSH_POST_INSTALL_TARGET_HOOKS += ZSH_TARGET_INSTALL_FIXUPS + +$(eval $(autotools-package)) diff --git a/package/zxing-cpp/Config.in b/package/zxing-cpp/Config.in new file mode 100644 index 0000000000..c1109219a0 --- /dev/null +++ b/package/zxing-cpp/Config.in @@ -0,0 +1,14 @@ +comment "zxing-cpp needs a toolchain w/ C++, dynamic library" + depends on !BR2_INSTALL_LIBSTDCPP || BR2_STATIC_LIBS + +config BR2_PACKAGE_ZXING_CPP + bool "zxing-cpp" + depends on !BR2_STATIC_LIBS + depends on BR2_INSTALL_LIBSTDCPP + help + ZXing-cpp (pronounced "zebra crossing") is an open-source, + multi-format 1D/2D barcode image processing library + implemented in Java, with ports to other languages. This + compiles the C++ port. + + https://github.com/glassechidna/zxing-cpp diff --git a/package/zxing-cpp/zxing-cpp.hash b/package/zxing-cpp/zxing-cpp.hash new file mode 100644 index 0000000000..e38a61236a --- /dev/null +++ b/package/zxing-cpp/zxing-cpp.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 164c0bc9f1ce2ff5659fddce6da71f8cdda091751f3b71140c090b58451a2b04 zxing-cpp-fa34227d26e0b388e65b81936a2681952928f5be.tar.gz diff --git a/package/zxing-cpp/zxing-cpp.mk b/package/zxing-cpp/zxing-cpp.mk new file mode 100644 index 0000000000..7344dc1c06 --- /dev/null +++ b/package/zxing-cpp/zxing-cpp.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# zxing-cpp +# +################################################################################ + +ZXING_CPP_VERSION = fa34227d26e0b388e65b81936a2681952928f5be +ZXING_CPP_SITE = $(call github,glassechidna,zxing-cpp,$(ZXING_CPP_VERSION)) +ZXING_CPP_LICENSE = Apache-2.0 +ZXING_CPP_LICENSE_FILES = COPYING +ZXING_CPP_INSTALL_STAGING = YES +ZXING_CPP_SUPPORTS_IN_SOURCE_BUILD = NO + +ifeq ($(BR2_PACKAGE_LIBICONV),y) +ZXING_CPP_DEPENDENCIES += libiconv +endif + +$(eval $(cmake-package)) diff --git a/package/zynq-boot-bin/zynq-boot-bin.hash b/package/zynq-boot-bin/zynq-boot-bin.hash new file mode 100644 index 0000000000..0bc23de197 --- /dev/null +++ b/package/zynq-boot-bin/zynq-boot-bin.hash @@ -0,0 +1,2 @@ +# From https://raw.githubusercontent.com/Xilinx/u-boot-xlnx +sha1 940331ee02b0007099effa61e382fe7ea4174054 zynq-boot-bin.py diff --git a/package/zynq-boot-bin/zynq-boot-bin.mk b/package/zynq-boot-bin/zynq-boot-bin.mk new file mode 100644 index 0000000000..46051fb8a6 --- /dev/null +++ b/package/zynq-boot-bin/zynq-boot-bin.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# zynq-boot-bin +# +################################################################################ + +ZYNQ_BOOT_BIN_VERSION = xilinx-v2015.1 +ZYNQ_BOOT_BIN_SOURCE = zynq-boot-bin.py +ZYNQ_BOOT_BIN_SITE = https://raw.githubusercontent.com/Xilinx/u-boot-xlnx/$(ZYNQ_BOOT_BIN_VERSION)/tools +ZYNQ_BOOT_BIN_LICENSE = GPLv3+ + +HOST_ZYNQ_BOOT_BIN_DEPENDENCIES = host-python + +define HOST_ZYNQ_BOOT_BIN_EXTRACT_CMDS + cp $(DL_DIR)/$(ZYNQ_BOOT_BIN_SOURCE) $(@D) +endef + +define HOST_ZYNQ_BOOT_BIN_INSTALL_CMDS + $(INSTALL) -D -m 0755 $(@D)/$(ZYNQ_BOOT_BIN_SOURCE) $(HOST_DIR)/usr/bin/$(ZYNQ_BOOT_BIN_SOURCE) +endef + +$(eval $(host-generic-package)) diff --git a/package/zyre/Config.in b/package/zyre/Config.in new file mode 100644 index 0000000000..a6aef60709 --- /dev/null +++ b/package/zyre/Config.in @@ -0,0 +1,18 @@ +config BR2_PACKAGE_ZYRE + bool "zyre" + depends on BR2_INSTALL_LIBSTDCPP # zeromq + depends on BR2_USE_WCHAR # zeromq + depends on BR2_TOOLCHAIN_HAS_THREADS # zeromq + depends on BR2_USE_MMU # czmq + select BR2_PACKAGE_CZMQ + select BR2_PACKAGE_ZEROMQ + help + An open-source framework for proximity-based peer-to-peer + applications. + + http://zyre.org + +comment "zyre needs a toolchain w/ C++, wchar, threads" + depends on BR2_USE_MMU + depends on !(BR2_INSTALL_LIBSTDCPP && BR2_USE_WCHAR && \ + BR2_TOOLCHAIN_HAS_THREADS) diff --git a/package/zyre/zyre.mk b/package/zyre/zyre.mk new file mode 100644 index 0000000000..b17dfd022d --- /dev/null +++ b/package/zyre/zyre.mk @@ -0,0 +1,21 @@ +################################################################################ +# +# zyre +# +################################################################################ + +ZYRE_VERSION = a351468b7d313fc90c446668122365851a9c60e4 +ZYRE_SITE = $(call github,zeromq,zyre,$(ZYRE_VERSION)) +ZYRE_LICENSE = LGPLv3+ +ZYRE_LICENSE_FILES = COPYING COPYING.LESSER +ZYRE_INSTALL_STAGING = YES +ZYRE_DEPENDENCIES = czmq zeromq host-pkgconf +ZYRE_AUTORECONF = YES + +define ZYRE_CREATE_CONFIG_DIR + mkdir -p $(@D)/config +endef + +ZYRE_POST_PATCH_HOOKS += ZYRE_CREATE_CONFIG_DIR + +$(eval $(autotools-package)) diff --git a/resources/cover.png b/resources/cover.png new file mode 100644 index 0000000000..18434f0227 Binary files /dev/null and b/resources/cover.png differ diff --git a/resources/motioneye-256x256.png b/resources/motioneye-256x256.png new file mode 100644 index 0000000000..e2dde4c72f Binary files /dev/null and b/resources/motioneye-256x256.png differ diff --git a/resources/motioneye.svg b/resources/motioneye.svg new file mode 100644 index 0000000000..69f3c8b55b --- /dev/null +++ b/resources/motioneye.svg @@ -0,0 +1,67 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/support/dependencies/check-host-asciidoc.sh b/support/dependencies/check-host-asciidoc.sh new file mode 100755 index 0000000000..fc5fcba443 --- /dev/null +++ b/support/dependencies/check-host-asciidoc.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +candidate="$1" #ignored + +asciidoc=`which asciidoc` +if [ ! -x "$asciidoc" ]; then + # echo nothing: no suitable asciidoc found + exit 1 +fi + +# Output of 'asciidoc --version' examples: +# asciidoc 8.6.7 +version=`$asciidoc --version | cut -d\ -f2` +major=`echo "$version" | cut -d. -f1` +minor=`echo "$version" | cut -d. -f2` +bugfix=`echo "$version" | cut -d. -f3` + +# To generate the manual, we need asciidoc >= 8.6.3 +major_min=8 +minor_min=6 +bugfix_min=3 +if [ $major -gt $major_min ]; then + echo $asciidoc +else + if [ $major -eq $major_min -a $minor -ge $minor_min ]; then + echo $asciidoc + else + if [ $major -eq $major_min -a $minor -eq $minor_min \ + -a $bugfix -ge $bugfix_min ]; then + echo $asciidoc + else + # echo nothing: no suitable asciidoc found + exit 1 + fi + fi +fi diff --git a/support/dependencies/check-host-tar.mk b/support/dependencies/check-host-tar.mk new file mode 100644 index 0000000000..9840a55e28 --- /dev/null +++ b/support/dependencies/check-host-tar.mk @@ -0,0 +1,6 @@ +TAR ?= tar + +ifeq (,$(call suitable-host-package,tar,$(TAR))) +DEPENDENCIES_HOST_PREREQ += host-tar +TAR = $(HOST_DIR)/usr/bin/tar +endif diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh new file mode 100755 index 0000000000..932d3c4fb2 --- /dev/null +++ b/support/dependencies/check-host-tar.sh @@ -0,0 +1,42 @@ +#!/bin/sh + +candidate="$1" + +tar=`which $candidate` +if [ ! -x "$tar" ]; then + tar=`which tar` + if [ ! -x "$tar" ]; then + # echo nothing: no suitable tar found + exit 1 + fi +fi + +# Output of 'tar --version' examples: +# tar (GNU tar) 1.15.1 +# tar (GNU tar) 1.25 +# bsdtar 2.8.3 - libarchive 2.8.3 +version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'` +major=`echo "$version" | cut -d. -f1` +minor=`echo "$version" | cut -d. -f2` +bugfix=`echo "$version" | cut -d. -f3` +version_bsd=`$tar --version | grep 'bsdtar'` +if [ ! -z "${version_bsd}" ] ; then + # mark as invalid version - not all command line options are available + major=0 + minor=0 +fi + +# Minimal version = 1.17 (previous versions do not correctly unpack archives +# containing hard-links if the --strip-components option is used). +major_min=1 +minor_min=17 +if [ $major -gt $major_min ]; then + echo $tar +else + if [ $major -eq $major_min -a $minor -ge $minor_min ]; then + echo $tar + else + # echo nothing: no suitable tar found + exit 1 + fi +fi diff --git a/support/dependencies/check-host-xzcat.mk b/support/dependencies/check-host-xzcat.mk new file mode 100644 index 0000000000..5e08b6e886 --- /dev/null +++ b/support/dependencies/check-host-xzcat.mk @@ -0,0 +1,7 @@ +# XZCAT is taken from BR2_XZCAT (defaults to 'xzcat') (see Makefile) +# If it is not present, build our own host-xzcat + +ifeq (,$(call suitable-host-package,xzcat,$(XZCAT))) +DEPENDENCIES_HOST_PREREQ += host-xz +XZCAT = $(HOST_DIR)/usr/bin/xzcat +endif diff --git a/support/dependencies/check-host-xzcat.sh b/support/dependencies/check-host-xzcat.sh new file mode 100755 index 0000000000..10f1c4562a --- /dev/null +++ b/support/dependencies/check-host-xzcat.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +candidate="$1" + +xzcat=`which $candidate 2>/dev/null` +if [ ! -x "$xzcat" ]; then + xzcat=`which xzcat 2>/dev/null` + if [ ! -x "$xzcat" ]; then + # echo nothing: no suitable xzcat found + exit 1 + fi +fi + +echo $xzcat diff --git a/support/dependencies/dependencies.mk b/support/dependencies/dependencies.mk new file mode 100644 index 0000000000..82327216cd --- /dev/null +++ b/support/dependencies/dependencies.mk @@ -0,0 +1,41 @@ +################################################################################ +# +# Check buildroot dependencies and bail out if the user's +# system is judged to be lacking.... +# +################################################################################ + +DEPENDENCIES_HOST_PREREQ := + +# suitable-host-pkg: calls check-host-$(1).sh shell script. Parameter (2) +# can be the candidate to be checked. If not present, the check-host-$(1).sh +# script should use 'which' to find a candidate. The script should return +# the path to the suitable host tool, or nothing if no suitable tool was found. +define suitable-host-package +$(shell support/dependencies/check-host-$(1).sh $(2)) +endef +-include $(sort $(wildcard support/dependencies/check-host-*.mk)) + +ifeq ($(BR2_STRIP_sstrip),y) +DEPENDENCIES_HOST_PREREQ += host-sstrip +endif + +ifeq ($(BR2_CCACHE),y) +DEPENDENCIES_HOST_PREREQ += host-ccache +endif + +core-dependencies: + @HOSTCC="$(firstword $(HOSTCC))" MAKE="$(MAKE)" \ + DL_TOOLS="$(sort $(DL_TOOLS_DEPENDENCIES))" \ + $(TOPDIR)/support/dependencies/dependencies.sh + +dependencies: HOSTCC=$(HOSTCC_NOCCACHE) +dependencies: HOSTCXX=$(HOSTCXX_NOCCACHE) +dependencies: core-dependencies $(DEPENDENCIES_HOST_PREREQ) + +################################################################################ +# +# Toplevel Makefile options +# +################################################################################ +.PHONY: dependencies core-dependencies diff --git a/support/dependencies/dependencies.sh b/support/dependencies/dependencies.sh new file mode 100755 index 0000000000..3146401a9d --- /dev/null +++ b/support/dependencies/dependencies.sh @@ -0,0 +1,261 @@ +#!/bin/sh +# vi: set sw=4 ts=4: + +export LC_ALL=C + +# Verify that grep works +echo "WORKS" | grep "WORKS" >/dev/null 2>&1 +if test $? != 0 ; then + echo + echo "grep doesn't work" + exit 1 +fi + +# sanity check for CWD in LD_LIBRARY_PATH +# try not to rely on egrep.. +if test -n "$LD_LIBRARY_PATH" ; then + echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | grep '::' >/dev/null 2>&1 || + echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | grep ':\.:' >/dev/null 2>&1 || + echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | grep 'TRiGGER_start:' >/dev/null 2>&1 || + echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | grep 'TRiGGER_start\.:' >/dev/null 2>&1 || + echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | grep ':TRiGGER_end' >/dev/null 2>&1 || + echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | grep ':\.TRiGGER_end' >/dev/null 2>&1 || + echo TRiGGER_start"$LD_LIBRARY_PATH"TRiGGER_end | grep 'TRiGGER_start\.TRiGGER_end' >/dev/null 2>&1 + if test $? = 0; then + echo + echo "You seem to have the current working directory in your" + echo "LD_LIBRARY_PATH environment variable. This doesn't work." + exit 1; + fi +fi; + +# sanity check for CWD in PATH. Having the current working directory +# in the PATH makes the toolchain build process break. +# try not to rely on egrep.. +if test -n "$PATH" ; then + echo TRiGGER_start"$PATH"TRiGGER_end | grep ':\.:' >/dev/null 2>&1 || + echo TRiGGER_start"$PATH"TRiGGER_end | grep 'TRiGGER_start\.:' >/dev/null 2>&1 || + echo TRiGGER_start"$PATH"TRiGGER_end | grep ':\.TRiGGER_end' >/dev/null 2>&1 || + echo TRiGGER_start"$PATH"TRiGGER_end | grep 'TRiGGER_start\.TRiGGER_end' >/dev/null 2>&1 + if test $? = 0; then + echo + echo "You seem to have the current working directory in your" + echo "PATH environment variable. This doesn't work." + exit 1; + fi +fi; + +if test -n "$PERL_MM_OPT" ; then + echo + echo "You have PERL_MM_OPT defined because Perl local::lib" + echo "is installed on your system. Please unset this variable" + echo "before starting Buildroot, otherwise the compilation of" + echo "Perl related packages will fail" + exit 1 +fi + +check_prog_host() +{ + prog="$1" + if ! which $prog > /dev/null ; then + echo >&2 + echo "You must install '$prog' on your build machine" >&2 + exit 1 + fi +} + +# Verify that which is installed +check_prog_host "which" +# Verify that sed is installed +check_prog_host "sed" + +# Check make +MAKE=$(which make 2> /dev/null) +if [ -z "$MAKE" ] ; then + echo + echo "You must install 'make' on your build machine"; + exit 1; +fi; +MAKE_VERSION=$($MAKE --version 2>&1 | sed -e 's/^.* \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') +if [ -z "$MAKE_VERSION" ] ; then + echo + echo "You must install 'make' on your build machine"; + exit 1; +fi; +MAKE_MAJOR=$(echo $MAKE_VERSION | sed -e "s/\..*//g") +MAKE_MINOR=$(echo $MAKE_VERSION | sed -e "s/^$MAKE_MAJOR\.//g" -e "s/\..*//g" -e "s/[a-zA-Z].*//g") +if [ $MAKE_MAJOR -lt 3 ] || [ $MAKE_MAJOR -eq 3 -a $MAKE_MINOR -lt 81 ] ; then + echo + echo "You have make '$MAKE_VERSION' installed. GNU make >=3.81 is required" + exit 1; +fi; + +# Check host gcc +COMPILER=$(which $HOSTCC_NOCCACHE 2> /dev/null) +if [ -z "$COMPILER" ] ; then + COMPILER=$(which cc 2> /dev/null) +fi; +if [ -z "$COMPILER" ] ; then + echo + echo "You must install 'gcc' on your build machine"; + exit 1; +fi; + +COMPILER_VERSION=$($COMPILER -v 2>&1 | sed -n '/^gcc version/p' | + sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') +if [ -z "$COMPILER_VERSION" ] ; then + echo + echo "You must install 'gcc' on your build machine"; + exit 1; +fi; +COMPILER_MAJOR=$(echo $COMPILER_VERSION | sed -e "s/\..*//g") +COMPILER_MINOR=$(echo $COMPILER_VERSION | sed -e "s/^$COMPILER_MAJOR\.//g" -e "s/\..*//g") +if [ $COMPILER_MAJOR -lt 3 -o $COMPILER_MAJOR -eq 2 -a $COMPILER_MINOR -lt 95 ] ; then + echo + echo "You have gcc '$COMPILER_VERSION' installed. gcc >= 2.95 is required" + exit 1; +fi; + +# check for host CXX +CXXCOMPILER=$(which $HOSTCXX_NOCCACHE 2> /dev/null) +if [ -z "$CXXCOMPILER" ] ; then + CXXCOMPILER=$(which c++ 2> /dev/null) +fi + +if [ -z "$CXXCOMPILER" ] ; then + echo + echo "You may have to install 'g++' on your build machine" +fi +if [ ! -z "$CXXCOMPILER" ] ; then + CXXCOMPILER_VERSION=$($CXXCOMPILER -v 2>&1 | sed -n '/^gcc version/p' | + sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q') + if [ -z "$CXXCOMPILER_VERSION" ] ; then + echo + echo "You may have to install 'g++' on your build machine" + fi +fi + +if [ -n "$CXXCOMPILER_VERSION" ] ; then + CXXCOMPILER_MAJOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/\..*//g") + CXXCOMPILER_MINOR=$(echo $CXXCOMPILER_VERSION | sed -e "s/^$CXXCOMPILER_MAJOR\.//g" -e "s/\..*//g") + if [ $CXXCOMPILER_MAJOR -lt 3 -o $CXXCOMPILER_MAJOR -eq 2 -a $CXXCOMPILER_MINOR -lt 95 ] ; then + echo + echo "You have g++ '$CXXCOMPILER_VERSION' installed. g++ >= 2.95 is required" + exit 1 + fi +fi + +# Check bash +# We only check bash is available, setting SHELL appropriately is done +# in the top-level Makefile, and we mimick the same sequence here +if [ -n "${BASH}" ]; then : +elif [ -x /bin/bash ]; then : +elif [ -z "$( sh -c 'echo $BASH' )" ]; then + echo + echo "You must install 'bash' on your build machine" + exit 1 +fi + +# Check that a few mandatory programs are installed +missing_progs="no" +for prog in patch perl tar wget cpio python unzip rsync bc ${DL_TOOLS} ; do + if ! which $prog > /dev/null ; then + echo "You must install '$prog' on your build machine"; + missing_progs="yes" + if test $prog = "svn" ; then + echo " svn is usually part of the subversion package in your distribution" + elif test $prog = "hg" ; then + echo " hg is usually part of the mercurial package in your distribution" + elif test $prog = "zcat" ; then + echo " zcat is usually part of the gzip package in your distribution" + elif test $prog = "bzcat" ; then + echo " bzcat is usually part of the bzip2 package in your distribution" + fi + fi +done + +if test "${missing_progs}" = "yes" ; then + exit 1 +fi + +if grep ^BR2_TOOLCHAIN_BUILDROOT=y $BR2_CONFIG > /dev/null && \ + grep ^BR2_ENABLE_LOCALE=y $BR2_CONFIG > /dev/null ; then + if ! which locale > /dev/null ; then + echo + echo "You need locale support on your build machine to build a toolchain supporting locales" + exit 1 ; + fi + if ! locale -a | grep -q -i utf8$ ; then + echo + echo "You need at least one UTF8 locale to build a toolchain supporting locales" + exit 1 ; + fi +fi + +if grep -q ^BR2_NEEDS_HOST_JAVA=y $BR2_CONFIG ; then + check_prog_host "java" + JAVA_GCJ=$(java -version 2>&1 | grep gcj) + if [ ! -z "$JAVA_GCJ" ] ; then + echo + echo "$JAVA_GCJ is not sufficient to compile your package selection." + echo "Please install an OpenJDK/IcedTea/Oracle Java." + exit 1 ; + fi +fi + +if grep -q ^BR2_NEEDS_HOST_JAVAC=y $BR2_CONFIG ; then + check_prog_host "javac" +fi + +if grep -q ^BR2_NEEDS_HOST_JAR=y $BR2_CONFIG ; then + check_prog_host "jar" +fi + +if grep -q ^BR2_HOSTARCH_NEEDS_IA32_LIBS=y $BR2_CONFIG ; then + if test ! -f /lib/ld-linux.so.2 ; then + echo + echo "Your Buildroot configuration uses pre-built tools for the x86 architecture," + echo "but your build machine uses the x86-64 architecture without the 32 bits compatibility" + echo "library." + echo "If you're running a Debian/Ubuntu distribution, install the libc6-i386," + echo "lib32stdc++6, and lib32z1 packages (or alternatively libc6:i386," + echo "libstdc++6:i386, and zlib1g:i386)." + echo "For other distributions, refer to the documentation on how to install the 32 bits" + echo "compatibility libraries." + exit 1 + fi +fi + +if grep -q ^BR2_HOSTARCH_NEEDS_IA32_COMPILER=y $BR2_CONFIG ; then + if ! echo "int main(void) {}" | gcc -m32 -x c - -o /dev/null 2>/dev/null; then + echo + echo "Your Buildroot configuration needs a compiler capable of building 32 bits binaries." + echo "If you're running a Debian/Ubuntu distribution, install the gcc-multilib package." + echo "For other distributions, refer to their documentation." + exit 1 + fi +fi + +# Check that the Perl installation is complete enough for Buildroot. +required_perl_modules="Data::Dumper" # Needed to build host-autoconf +required_perl_modules="$required_perl_modules Thread::Queue" # Used by host-automake + +# This variable will keep the modules that are missing in your system. +missing_perl_modules="" + +for pm in $required_perl_modules ; do + if ! perl -e "require $pm" > /dev/null 2>&1 ; then + missing_perl_modules="$missing_perl_modules $pm" + fi +done + +if [ -n "$missing_perl_modules" ] ; then + echo "Your Perl installation is not complete enough; at least the following" + echo "modules are missing:" + echo + for pm in $missing_perl_modules ; do + printf "\t $pm\n" + done + echo + exit 1 +fi diff --git a/support/download/bzr b/support/download/bzr new file mode 100755 index 0000000000..e18b01f39c --- /dev/null +++ b/support/download/bzr @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for bzr, to be called from the download wrapper script +# +# Call it as: +# .../bzr [-q] OUT_FILE REPO_URL REV BASENAME +# +# Environment: +# BZR : the bzr command to call + + +verbose= +while getopts :q OPT; do + case "${OPT}" in + q) verbose=-q;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done +shift $((OPTIND-1)) + +output="${1}" +repo="${2}" +rev="${3}" +basename="${4}" + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_bzr() { + eval ${BZR} "${@}" +} + +# --per-file-timestamps comes with bzr-2.2 (released August 2010), +# so only pass it if bzr is recent enough. We compute versions as: +# major*1000 + minor +bzr_min_version=2002 +bzr_version=$(($(bzr --version | + sed -r -n 's/^Bazaar \(bzr\) ([[:digit:]]+)\.([[:digit:]]+)\..*$/\1*1000+\2/p') + )) + +# If the version is recent enough, we can generate reproducible +# archives; otherwise, we just hope for the best (as it would +# be downloaded from the BR mirror if what we generate here does +# not match the hash we have for it). +if [ ${bzr_version} -ge ${bzr_min_version} ]; then + timestamp_opt="--per-file-timestamps" +fi + +_bzr export ${verbose} --root="'${basename}/'" --format=tgz \ + ${timestamp_opt} - "'${repo}'" -r "'${rev}'" \ + >"${output}" diff --git a/support/download/check-hash b/support/download/check-hash new file mode 100755 index 0000000000..c1ff53c02b --- /dev/null +++ b/support/download/check-hash @@ -0,0 +1,110 @@ +#!/usr/bin/env bash +set -e + +# Helper to check a file matches its known hash +# Call it with: +# $1: the path of the file containing all the expected hashes +# $2: the full path to the temporary file that was downloaded, and +# that is to be checked +# $3: the final basename of the file, to which it will be ultimately +# saved as, to be able to match it to the corresponding hashes +# in the .hash file +# +# Exit codes: +# 0: the hash file exists and the file to check matches all its hashes, +# or the hash file does not exist +# 1: unknown command-line option +# 2: the hash file exists and the file to check does not match at least +# one of its hashes +# 3: the hash file exists and there was no hash to check the file against +# 4: the hash file exists and at least one hash type is unknown + +while getopts :q OPT; do + case "${OPT}" in + q) exec >/dev/null;; + \?) exit 1;; + esac +done +shift $((OPTIND-1)) + +h_file="${1}" +file="${2}" +base="${3}" + +# Bail early if no hash to check +if [ -z "${h_file}" ]; then + exit 0 +fi +# Does the hash-file exist? +if [ ! -f "${h_file}" ]; then + printf "WARNING: no hash file for %s\n" "${base}" >&2 + exit 0 +fi + +# Check one hash for a file +# $1: known hash +# $2: file (full path) +check_one_hash() { + _h="${1}" + _known="${2}" + _file="${3}" + + # Note: md5 is supported, but undocumented on purpose. + # Note: sha3 is not supported, since there is currently no implementation + # (the NIST has yet to publish the parameters). + # Note: 'none' means there is explicitly no hash for that file. + case "${_h}" in + none) + return 0 + ;; + md5|sha1) ;; + sha224|sha256|sha384|sha512) ;; + *) # Unknown hash, exit with error + printf "ERROR: unknown hash '%s' for '%s'\n" \ + "${_h}" "${base}" >&2 + exit 4 + ;; + esac + + # Do the hashes match? + _hash=$( ${_h}sum "${_file}" |cut -d ' ' -f 1 ) + if [ "${_hash}" = "${_known}" ]; then + printf "%s: OK (%s: %s)\n" "${base}" "${_h}" "${_hash}" + return 0 + fi + + printf "ERROR: %s has wrong %s hash:\n" "${base}" "${_h}" >&2 + printf "ERROR: expected: %s\n" "${_known}" >&2 + printf "ERROR: got : %s\n" "${_hash}" >&2 + printf "ERROR: Incomplete download, or man-in-the-middle (MITM) attack\n" >&2 + + exit 2 +} + +# Do we know one or more hashes for that file? +nb_checks=0 +while read t h f; do + case "${t}" in + ''|'#'*) + # Skip comments and empty lines + continue + ;; + *) + if [ "${f}" = "${base}" ]; then + check_one_hash "${t}" "${h}" "${file}" + : $((nb_checks++)) + fi + ;; + esac +done <"${h_file}" + +if [ ${nb_checks} -eq 0 ]; then + case " ${BR_NO_CHECK_HASH_FOR} " in + *" ${base} "*) + # File explicitly has no hash + exit 0 + ;; + esac + printf "ERROR: No hash found for %s\n" "${base}" >&2 + exit 3 +fi diff --git a/support/download/cp b/support/download/cp new file mode 100755 index 0000000000..09ce3d1100 --- /dev/null +++ b/support/download/cp @@ -0,0 +1,37 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for cp, to be called from the download wrapper script +# +# Call it as: +# .../cp [-q] OUT_FILE SRC_FILE +# +# Environment: +# LOCALFILES: the cp command to call + +# 'cp' usually does not print anything on its stdout, whereas the +# other download backends, even if not verbose, at least print some +# progress information. +# Make 'cp' verbose by default, so it behaves a bit like the others. +verbose=-v + +while getopts :q OPT; do + case "${OPT}" in + q) verbose=;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done +shift $((OPTIND-1)) + +output="${1}" +source="${2}" + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_localfiles() { + eval ${LOCALFILES} "${@}" +} + +_localfiles ${verbose} "'${source}'" "'${output}'" diff --git a/support/download/cvs b/support/download/cvs new file mode 100755 index 0000000000..7980389a4e --- /dev/null +++ b/support/download/cvs @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for cvs, to be called from the download wrapper script +# +# Call it as: +# .../cvs [-q] OUT_FILE CVS_URL REV PKG_NAME BASENAME +# +# Environment: +# CVS : the cvs command to call + +verbose= +while getopts :q OPT; do + case "${OPT}" in + q) verbose=-Q;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done +shift $((OPTIND-1)) + +output="${1}" +repo="${2}" +rev="${3}" +rawname="${4}" +basename="${5}" + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_cvs() { + eval ${CVS} "${@}" +} + +if [[ ${rev} =~ ^[0-9] ]]; then + # Date, because a tag or a branch cannot begin with a number + select="-D" +else + # Tag or branch + select="-r" +fi + +# The absence of an initial : on ${repo} means access method undefined +if [[ ! "${repo}" =~ ^: ]]; then + # defaults to anonymous pserver + repo=":pserver:anonymous@${repo}" +fi + +export TZ=UTC +_cvs ${verbose} -z3 -d"'${repo}'" \ + co -d "'${basename}'" ${select} "'${rev}'" -P "'${rawname}'" + +tar czf "${output}" "${basename}" diff --git a/support/download/dl-wrapper b/support/download/dl-wrapper new file mode 100755 index 0000000000..ef2d872938 --- /dev/null +++ b/support/download/dl-wrapper @@ -0,0 +1,196 @@ +#!/usr/bin/env bash + +# This script is a wrapper to the other download backends. +# Its role is to ensure atomicity when saving downloaded files +# back to BR2_DL_DIR, and not clutter BR2_DL_DIR with partial, +# failed downloads. +# +# Call it with -h to see some help. + +# To avoid cluttering BR2_DL_DIR, we download to a trashable +# location, namely in $(BUILD_DIR). +# Then, we move the downloaded file to a temporary file in the +# same directory as the final output file. +# This allows us to finally atomically rename it to its final +# name. +# If anything goes wrong, we just remove all the temporaries +# created so far. + +# We want to catch any unexpected failure, and exit immediately. +set -e + +main() { + local OPT OPTARG + local backend output hfile quiet + + # Parse our options; anything after '--' is for the backend + while getopts :hb:o:H:q OPT; do + case "${OPT}" in + h) help; exit 0;; + b) backend="${OPTARG}";; + o) output="${OPTARG}";; + H) hfile="${OPTARG}";; + q) quiet="-q";; + :) error "option '%s' expects a mandatory argument\n" "${OPTARG}";; + \?) error "unknown option '%s'\n" "${OPTARG}";; + esac + done + # Forget our options, and keep only those for the backend + shift $((OPTIND-1)) + + if [ -z "${backend}" ]; then + error "no backend specified, use -b\n" + fi + if [ -z "${output}" ]; then + error "no output specified, use -o\n" + fi + + # If the output file already exists and: + # - there's no .hash file: do not download it again and exit promptly + # - matches all its hashes: do not download it again and exit promptly + # - fails at least one of its hashes: force a re-download + # - there's no hash (but a .hash file): consider it a hard error + if [ -e "${output}" ]; then + if support/download/check-hash ${quiet} "${hfile}" "${output}" "${output##*/}"; then + exit 0 + elif [ ${?} -ne 2 ]; then + # Do not remove the file, otherwise it might get re-downloaded + # from a later location (i.e. primary -> upstream -> mirror). + # Do not print a message, check-hash already did. + exit 1 + fi + rm -f "${output}" + warn "Re-downloading '%s'...\n" "${output##*/}" + fi + + # tmpd is a temporary directory in which backends may store intermediate + # by-products of the download. + # tmpf is the file in which the backends should put the downloaded content. + # tmpd is located in $(BUILD_DIR), so as not to clutter the (precious) + # $(BR2_DL_DIR) + # We let the backends create tmpf, so they are able to set whatever + # permission bits they want (although we're only really interested in + # the executable bit.) + tmpd="$(mktemp -d "${BUILD_DIR}/.${output##*/}.XXXXXX")" + tmpf="${tmpd}/output" + + # Helpers expect to run in a directory that is *really* trashable, so + # they are free to create whatever files and/or sub-dirs they might need. + # Doing the 'cd' here rather than in all backends is easier. + cd "${tmpd}" + + # If the backend fails, we can just remove the temporary directory to + # remove all the cruft it may have left behind. Then we just exit in + # error too. + if ! "${OLDPWD}/support/download/${backend}" ${quiet} "${tmpf}" "${@}"; then + rm -rf "${tmpd}" + exit 1 + fi + + # cd back to free the temp-dir, so we can remove it later + cd "${OLDPWD}" + + # Check if the downloaded file is sane, and matches the stored hashes + # for that file + if ! support/download/check-hash ${quiet} "${hfile}" "${tmpf}" "${output##*/}"; then + rm -rf "${tmpd}" + exit 1 + fi + + # tmp_output is in the same directory as the final output, so we can + # later move it atomically. + tmp_output="$(mktemp "${output}.XXXXXX")" + + # 'mktemp' creates files with 'go=-rwx', so the files are not accessible + # to users other than the one doing the download (and root, of course). + # This can be problematic when a shared BR2_DL_DIR is used by different + # users (e.g. on a build server), where all users may write to the shared + # location, since other users would not be allowed to read the files + # another user downloaded. + # So, we restore the 'go' access rights to a more sensible value, while + # still abiding by the current user's umask. We must do that before the + # final 'mv', so just do it now. + # Some backends (cp and scp) may create executable files, so we need to + # carry the executable bit if needed. + [ -x "${tmpf}" ] && new_mode=755 || new_mode=644 + new_mode=$(printf "%04o" $((0${new_mode} & ~0$(umask)))) + chmod ${new_mode} "${tmp_output}" + + # We must *not* unlink tmp_output, otherwise there is a small window + # during which another download process may create the same tmp_output + # name (very, very unlikely; but not impossible.) + # Using 'cp' is not reliable, since 'cp' may unlink the destination file + # if it is unable to open it with O_WRONLY|O_TRUNC; see: + # http://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html + # Since the destination filesystem can be anything, it might not support + # O_TRUNC, so 'cp' would unlink it first. + # Use 'cat' and append-redirection '>>' to save to the final location, + # since that is the only way we can be 100% sure of the behaviour. + if ! cat "${tmpf}" >>"${tmp_output}"; then + rm -rf "${tmpd}" "${tmp_output}" + exit 1 + fi + rm -rf "${tmpd}" + + # tmp_output and output are on the same filesystem, so POSIX guarantees + # that 'mv' is atomic, because it then uses rename() that POSIX mandates + # to be atomic, see: + # http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html + if ! mv -f "${tmp_output}" "${output}"; then + rm -f "${tmp_output}" + exit 1 + fi +} + +help() { + cat <<_EOF_ +NAME + ${my_name} - download wrapper for Buildroot + +SYNOPSIS + ${my_name} [OPTION]... -- [BACKEND OPTION]... + +DESCRIPTION + Wrapper script around different download mechanisms. Ensures that + concurrent downloads do not conflict, that partial downloads are + properly evicted without leaving temporary files, and that access + rights are maintained. + + -h This help text. + + -b BACKEND + Wrap the specified BACKEND. Known backends are: + bzr Bazaar + cp Local files + cvs Concurrent Versions System + git Git + hg Mercurial + scp Secure copy + svn Subversion + wget HTTP download + + -o FILE + Store the downloaded archive in FILE. + + -H FILE + Use FILE to read hashes from, and check them against the downloaded + archive. + + Exit status: + 0 if OK + !0 in case of error + +ENVIRONMENT + + BUILD_DIR + The path to Buildroot's build dir +_EOF_ +} + +trace() { local msg="${1}"; shift; printf "%s: ${msg}" "${my_name}" "${@}"; } +warn() { trace "${@}" >&2; } +errorN() { local ret="${1}"; shift; warn "${@}"; exit ${ret}; } +error() { errorN 1 "${@}"; } + +my_name="${0##*/}" +main "${@}" diff --git a/support/download/git b/support/download/git new file mode 100755 index 0000000000..314b388fbc --- /dev/null +++ b/support/download/git @@ -0,0 +1,58 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for git, to be called from the download wrapper script +# +# Call it as: +# .../git [-q] OUT_FILE REPO_URL CSET BASENAME +# +# Environment: +# GIT : the git command to call + +verbose= +while getopts :q OPT; do + case "${OPT}" in + q) verbose=-q; exec >/dev/null;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done +shift $((OPTIND-1)) + +output="${1}" +repo="${2}" +cset="${3}" +basename="${4}" + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_git() { + eval ${GIT} "${@}" +} + +# Try a shallow clone, since it is faster than a full clone - but that only +# works if the version is a ref (tag or branch). Before trying to do a shallow +# clone we check if ${cset} is in the list provided by git ls-remote. If not +# we fall back on a full clone. +# +# Messages for the type of clone used are provided to ease debugging in case of +# problems +git_done=0 +if [ -n "$(_git ls-remote "'${repo}'" "'${cset}'" 2>&1)" ]; then + printf "Doing shallow clone\n" + if _git clone ${verbose} --depth 1 -b "'${cset}'" --bare "'${repo}'" "'${basename}'"; then + git_done=1 + else + printf "Shallow clone failed, falling back to doing a full clone\n" + fi +fi +if [ ${git_done} -eq 0 ]; then + printf "Doing full clone\n" + _git clone ${verbose} --mirror "'${repo}'" "'${basename}'" +fi + +GIT_DIR="${basename}" \ +_git archive --prefix="'${basename}/'" -o "'${output}.tmp'" --format=tar "'${cset}'" + +gzip -n <"${output}.tmp" >"${output}" diff --git a/support/download/hg b/support/download/hg new file mode 100755 index 0000000000..25cb4e9d35 --- /dev/null +++ b/support/download/hg @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for hg, to be called from the download wrapper script +# +# Call it as: +# .../hg [-q] OUT_FILE REPO_URL CSET BASENAME +# +# Environment: +# HG : the hg command to call + +verbose= +while getopts :q OPT; do + case "${OPT}" in + q) verbose=-q;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done +shift $((OPTIND-1)) + +output="${1}" +repo="${2}" +cset="${3}" +basename="${4}" + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_hg() { + eval ${HG} "${@}" +} + +_hg clone ${verbose} --noupdate "'${repo}'" "'${basename}'" + +_hg archive ${verbose} --repository "'${basename}'" --type tgz \ + --prefix "'${basename}'" --rev "'${cset}'" \ + - >"${output}" diff --git a/support/download/scp b/support/download/scp new file mode 100755 index 0000000000..95cf502be2 --- /dev/null +++ b/support/download/scp @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for scp, to be called from the download wrapper script +# +# Call it as: +# .../scp [-q] OUT_FILE SRC_URL +# +# Environment: +# SCP : the scp command to call + +verbose= +while getopts :q OPT; do + case "${OPT}" in + q) verbose=-q;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done +shift $((OPTIND-1)) + +output="${1}" +url="${2}" + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_scp() { + eval ${SCP} "${@}" +} + +_scp ${verbose} "'${url}'" "'${output}'" diff --git a/support/download/svn b/support/download/svn new file mode 100755 index 0000000000..4dcdd06239 --- /dev/null +++ b/support/download/svn @@ -0,0 +1,36 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for svn, to be called from the download wrapper script +# +# Call it as: +# .../svn [-q] OUT_FILE REPO_URL REV BASNAME +# +# Environment: +# SVN : the svn command to call + +verbose= +while getopts :q OPT; do + case "${OPT}" in + q) verbose=-q;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done +shift $((OPTIND-1)) + +output="${1}" +repo="${2}" +rev="${3}" +basename="${4}" + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_svn() { + eval ${SVN} "${@}" +} + +_svn export ${verbose} "'${repo}@${rev}'" "'${basename}'" + +tar czf "${output}" "${basename}" diff --git a/support/download/wget b/support/download/wget new file mode 100755 index 0000000000..0fc7ffa94e --- /dev/null +++ b/support/download/wget @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +# We want to catch any unexpected failure, and exit immediately +set -e + +# Download helper for wget, to be called from the download wrapper script +# +# Call it as: +# .../wget [-q] OUT_FILE URL +# +# Environment: +# WGET : the wget command to call + +verbose= +while getopts :q OPT; do + case "${OPT}" in + q) verbose=-q;; + \?) printf "unknown option '%s'\n" "${OPTARG}" >&2; exit 1;; + esac +done +shift $((OPTIND-1)) + +output="${1}" +url="${2}" + +# Caller needs to single-quote its arguments to prevent them from +# being expanded a second time (in case there are spaces in them) +_wget() { + eval ${WGET} "${@}" +} + +_wget ${verbose} -O "'${output}'" "'${url}'" diff --git a/support/dummy-external/Config.in b/support/dummy-external/Config.in new file mode 100644 index 0000000000..e69de29bb2 diff --git a/support/dummy-external/external.mk b/support/dummy-external/external.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/support/gnuconfig/README.buildroot b/support/gnuconfig/README.buildroot new file mode 100644 index 0000000000..0898cb541c --- /dev/null +++ b/support/gnuconfig/README.buildroot @@ -0,0 +1,27 @@ +--- HOWTO --- +If your package uses config.guess and/or config.sub, then it probably +relies on the autotools as its build system. In this case, you should +use the autotools-package infrastructure, which will take care of updating +the config.guess and/or config.sub files appropriately. See the +Buildroot documentation for details about the autotools-package +infrastructure. + +If for some reason your package does not use the autotools-package +infrastructure, you can request the config.guess and/or config.sub +files of your package to be updated by using: + + $(call CONFIG_UPDATE,directory-of-your-package-sources) + +--- UPDATE --- +GNU config is now managed in git, so to update: + +# git clone git://git.savannah.gnu.org/config.git +# cp config/config.* . +# for p in $(ls patches/*.patch); do patch -p1 < $p; done +# rm -rf config + +Currently no patches are needed, but they may be needed again in the +future. + +The current Buildroot version is based on the Git commit +5e4de70bb0064d974a848fbe3a445d5dafaf7b48 of the config.git repository. diff --git a/support/gnuconfig/config.guess b/support/gnuconfig/config.guess new file mode 100755 index 0000000000..b79252d6b1 --- /dev/null +++ b/support/gnuconfig/config.guess @@ -0,0 +1,1558 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-06-10' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2013 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix\n"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + c34*) + echo c34-convex-bsd + exit ;; + c38*) + echo c38-convex-bsd + exit ;; + c4*) + echo c4-convex-bsd + exit ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/support/gnuconfig/config.sub b/support/gnuconfig/config.sub new file mode 100755 index 0000000000..61cb4bc22d --- /dev/null +++ b/support/gnuconfig/config.sub @@ -0,0 +1,1793 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2013 Free Software Foundation, Inc. + +timestamp='2013-10-01' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, see . +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches with a ChangeLog entry to config-patches@gnu.org. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2013 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 \ + | or1k | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or1k-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/support/kconfig/.gitignore b/support/kconfig/.gitignore new file mode 100644 index 0000000000..2694c9a20c --- /dev/null +++ b/support/kconfig/.gitignore @@ -0,0 +1,4 @@ +# +# Quilt is being used to handle the patch series +# +.pc diff --git a/support/kconfig/Makefile b/support/kconfig/Makefile new file mode 100644 index 0000000000..7eb4071b4e --- /dev/null +++ b/support/kconfig/Makefile @@ -0,0 +1,319 @@ +# =========================================================================== +# Kernel configuration targets +# These targets are used from top-level makefile + +PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config \ + localmodconfig localyesconfig + +ifdef KBUILD_KCONFIG +Kconfig := $(KBUILD_KCONFIG) +else +Kconfig := Kconfig +endif + +# We need this, in case the user has it in its environment +unexport CONFIG_ + +xconfig: $(obj)/qconf + $< $(Kconfig) + +gconfig: $(obj)/gconf + $< $(Kconfig) + +menuconfig: $(obj)/mconf + $< $(Kconfig) + +config: $(obj)/conf + $< --oldaskconfig $(Kconfig) + +nconfig: $(obj)/nconf + $< $(Kconfig) + +oldconfig: $(obj)/conf + $< --$@ $(Kconfig) + +silentoldconfig: $(obj)/conf + $(Q)mkdir -p include/generated + $< --$@ $(Kconfig) + +localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf + $(Q)mkdir -p include/generated + $(Q)perl $< --$@ $(srctree) $(Kconfig) > .tmp.config + $(Q)if [ -f .config ]; then \ + cmp -s .tmp.config .config || \ + (mv -f .config .config.old.1; \ + mv -f .tmp.config .config; \ + $(obj)/conf --silentoldconfig $(Kconfig); \ + mv -f .config.old.1 .config.old) \ + else \ + mv -f .tmp.config .config; \ + $(obj)/conf --silentoldconfig $(Kconfig); \ + fi + $(Q)rm -f .tmp.config + +# Create new linux.pot file +# Adjust charset to UTF-8 in .po file to accept UTF-8 in Kconfig files +update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h + $(Q)echo " GEN config.pot" + $(Q)xgettext --default-domain=linux \ + --add-comments --keyword=_ --keyword=N_ \ + --from-code=UTF-8 \ + --files-from=$(srctree)/scripts/kconfig/POTFILES.in \ + --directory=$(srctree) --directory=$(objtree) \ + --output $(obj)/config.pot + $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot + $(Q)(for i in `ls $(srctree)/arch/*/Kconfig \ + $(srctree)/arch/*/um/Kconfig`; \ + do \ + echo " GEN $$i"; \ + $(obj)/kxgettext $$i \ + >> $(obj)/config.pot; \ + done ) + $(Q)echo " GEN linux.pot" + $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ + --output $(obj)/linux.pot + $(Q)rm -f $(obj)/config.pot + +PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig + +allnoconfig allyesconfig allmodconfig alldefconfig randconfig: $(obj)/conf + $< --$@ $(Kconfig) + +PHONY += listnewconfig olddefconfig oldnoconfig savedefconfig defconfig + +listnewconfig olddefconfig: $(obj)/conf + $< --$@ $(Kconfig) + +# oldnoconfig is an alias of olddefconfig, because people already are dependent +# on its behavior(sets new symbols to their default value but not 'n') with the +# counter-intuitive name. +oldnoconfig: $(obj)/conf + $< --olddefconfig $(Kconfig) + +savedefconfig: $(obj)/conf + $< --$@=defconfig $(Kconfig) + +defconfig: $(obj)/conf +ifeq ($(KBUILD_DEFCONFIG),) + $< --defconfig $(Kconfig) +else + @echo "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" + $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) +endif + +%_defconfig: $(obj)/conf + $(Q)$< --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) + +# Help text used by make help +help: + @echo ' config - Update current config utilising a line-oriented program' + @echo ' nconfig - Update current config utilising a ncurses menu based program' + @echo ' menuconfig - Update current config utilising a menu based program' + @echo ' xconfig - Update current config utilising a QT based front-end' + @echo ' gconfig - Update current config utilising a GTK based front-end' + @echo ' oldconfig - Update current config utilising a provided .config as base' + @echo ' localmodconfig - Update current config disabling modules not loaded' + @echo ' localyesconfig - Update current config converting local mods to core' + @echo ' silentoldconfig - Same as oldconfig, but quietly, additionally update deps' + @echo ' defconfig - New config with default from ARCH supplied defconfig' + @echo ' savedefconfig - Save current config as ./defconfig (minimal config)' + @echo ' allnoconfig - New config where all options are answered with no' + @echo ' allyesconfig - New config where all options are accepted with yes' + @echo ' allmodconfig - New config selecting modules when possible' + @echo ' alldefconfig - New config with all symbols set to default' + @echo ' randconfig - New config with random answer to all options' + @echo ' listnewconfig - List new options' + @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value' + +# lxdialog stuff +check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh + +# Use recursively expanded variables so we do not call gcc unless +# we really need to do so. (Do not call gcc as part of make mrproper) +HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \ + -DLOCALE + +# =========================================================================== +# Shared Makefile for the various kconfig executables: +# conf: Used for defconfig, oldconfig and related targets +# nconf: Used for the nconfig target. +# Utilizes ncurses +# mconf: Used for the menuconfig target +# Utilizes the lxdialog package +# qconf: Used for the xconfig target +# Based on QT which needs to be installed to compile it +# gconf: Used for the gconfig target +# Based on GTK which needs to be installed to compile it +# object files used by all kconfig flavours + +lxdialog := lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o +lxdialog += lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o + +conf-objs := conf.o zconf.tab.o +mconf-objs := mconf.o zconf.tab.o $(lxdialog) +nconf-objs := nconf.o zconf.tab.o nconf.gui.o +kxgettext-objs := kxgettext.o zconf.tab.o +qconf-cxxobjs := qconf.o +qconf-objs := zconf.tab.o +gconf-objs := gconf.o zconf.tab.o + +hostprogs-y := conf + +ifeq ($(MAKECMDGOALS),nconf) + hostprogs-y += nconf +endif + +ifeq ($(MAKECMDGOALS),mconf) + hostprogs-y += mconf +endif + +ifeq ($(MAKECMDGOALS),update-po-config) + hostprogs-y += kxgettext +endif + +ifeq ($(MAKECMDGOALS),qconf) + qconf-target := 1 +endif +ifeq ($(MAKECMDGOALS),gconf) + gconf-target := 1 +endif + + +ifeq ($(qconf-target),1) + hostprogs-y += qconf +endif + +ifeq ($(gconf-target),1) + hostprogs-y += gconf +endif + +clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck +clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h +clean-files += mconf qconf gconf nconf +clean-files += config.pot linux.pot + +# Check that we have the required ncurses stuff installed for lxdialog (menuconfig) +PHONY += $(obj)/dochecklxdialog +$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog +$(obj)/dochecklxdialog: + $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf) + +always := dochecklxdialog + +# Add environment specific flags +HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(srctree)/$(src)/check.sh $(HOSTCC) $(HOSTCFLAGS)) + +# generated files seem to need this to find local include files +HOSTCFLAGS_zconf.lex.o := -I$(src) +HOSTCFLAGS_zconf.tab.o := -I$(src) + +LEX_PREFIX_zconf := zconf +YACC_PREFIX_zconf := zconf + +HOSTLOADLIBES_qconf = $(KC_QT_LIBS) +HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) + +HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` +HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ + -Wno-missing-prototypes + +HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) + +HOSTLOADLIBES_nconf = $(shell \ + pkg-config --libs menu panel ncurses 2>/dev/null \ + || echo "-lmenu -lpanel -lncurses" ) +$(obj)/qconf.o: $(obj)/.tmp_qtcheck + +ifeq ($(qconf-target),1) +$(obj)/.tmp_qtcheck: $(src)/Makefile +-include $(obj)/.tmp_qtcheck + +# QT needs some extra effort... +$(obj)/.tmp_qtcheck: + @set -e; echo " CHECK qt"; dir=""; pkg=""; \ + if ! pkg-config --exists QtCore 2> /dev/null; then \ + echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \ + pkg-config --exists qt 2> /dev/null && pkg=qt; \ + pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \ + if [ -n "$$pkg" ]; then \ + cflags="\$$(shell pkg-config $$pkg --cflags)"; \ + libs="\$$(shell pkg-config $$pkg --libs)"; \ + moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \ + dir="$$(pkg-config $$pkg --variable=prefix)"; \ + else \ + for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ + if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ + done; \ + if [ -z "$$dir" ]; then \ + echo >&2 "*"; \ + echo >&2 "* Unable to find any QT installation. Please make sure that"; \ + echo >&2 "* the QT4 or QT3 development package is correctly installed and"; \ + echo >&2 "* either qmake can be found or install pkg-config or set"; \ + echo >&2 "* the QTDIR environment variable to the correct location."; \ + echo >&2 "*"; \ + false; \ + fi; \ + libpath=$$dir/lib; lib=qt; osdir=""; \ + $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \ + osdir=x$$($(HOSTCXX) -print-multi-os-directory); \ + test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \ + test -f $$libpath/libqt-mt.so && lib=qt-mt; \ + cflags="-I$$dir/include"; \ + libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \ + moc="$$dir/bin/moc"; \ + fi; \ + if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \ + echo "*"; \ + echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \ + echo "*"; \ + moc="/usr/bin/moc"; \ + fi; \ + else \ + cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \ + libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \ + moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \ + [ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \ + fi; \ + echo "KC_QT_CFLAGS=$$cflags" > $@; \ + echo "KC_QT_LIBS=$$libs" >> $@; \ + echo "KC_QT_MOC=$$moc" >> $@ +endif + +$(obj)/gconf.o: $(obj)/.tmp_gtkcheck + +ifeq ($(gconf-target),1) +-include $(obj)/.tmp_gtkcheck + +# GTK needs some extra effort, too... +$(obj)/.tmp_gtkcheck: + @if `pkg-config --exists gtk+-2.0 gmodule-2.0 libglade-2.0`; then \ + if `pkg-config --atleast-version=2.0.0 gtk+-2.0`; then \ + touch $@; \ + else \ + echo >&2 "*"; \ + echo >&2 "* GTK+ is present but version >= 2.0.0 is required."; \ + echo >&2 "*"; \ + false; \ + fi \ + else \ + echo >&2 "*"; \ + echo >&2 "* Unable to find the GTK+ installation. Please make sure that"; \ + echo >&2 "* the GTK+ 2.0 development package is correctly installed..."; \ + echo >&2 "* You need gtk+-2.0, glib-2.0 and libglade-2.0."; \ + echo >&2 "*"; \ + false; \ + fi +endif + +$(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c + +$(obj)/qconf.o: $(obj)/qconf.moc + +$(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck + $(KC_QT_MOC) -i $< -o $@ + +# Extract gconf menu items for I18N support +$(obj)/gconf.glade.h: $(obj)/gconf.glade + $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \ + $(obj)/gconf.glade + diff --git a/support/kconfig/Makefile.br b/support/kconfig/Makefile.br new file mode 100644 index 0000000000..41c5ce165d --- /dev/null +++ b/support/kconfig/Makefile.br @@ -0,0 +1,53 @@ +src := . +top_srcdir=../../ +top_builddir=../../ +srctree := . +obj ?= . + +include Makefile +#HOSTCFLAGS+=-Dinline="" -include foo.h +-include $(obj)/.depend +$(obj)/.depend: $(wildcard *.h *.c) + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > $@ 2>/dev/null || : + +__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) +host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m))) +host-cmulti := $(foreach m,$(__hostprogs),\ + $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m)))) +host-cxxmulti := $(foreach m,$(__hostprogs),\ + $(if $($(m)-cxxobjs),$(m),$(if $($(m)-objs),))) +host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs)))) +host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs)))) + +HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\" + +$(host-csingle): %: %.c + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@ + +$(host-cmulti): %: $(host-cobjs) $(host-cshlib) + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ + +$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib) + $(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ + +$(obj)/%.o: %.c + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ + +$(obj)/%.o: $(obj)/%.c + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ + +$(obj)/%.o: %.cc + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$(@F)) -c $< -o $@ + +$(obj)/%:: $(src)/%_shipped + $(Q)cat $< > $@ + +clean: + $(Q)rm -f $(addprefix $(obj)/,$(clean-files)) +distclean: clean + $(Q)rm -f $(addprefix $(obj)/,$(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \ + $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \ + mconf .depend) + +FORCE: +.PHONY: FORCE clean distclean diff --git a/support/kconfig/POTFILES.in b/support/kconfig/POTFILES.in new file mode 100644 index 0000000000..9674573969 --- /dev/null +++ b/support/kconfig/POTFILES.in @@ -0,0 +1,12 @@ +scripts/kconfig/lxdialog/checklist.c +scripts/kconfig/lxdialog/inputbox.c +scripts/kconfig/lxdialog/menubox.c +scripts/kconfig/lxdialog/textbox.c +scripts/kconfig/lxdialog/util.c +scripts/kconfig/lxdialog/yesno.c +scripts/kconfig/mconf.c +scripts/kconfig/conf.c +scripts/kconfig/confdata.c +scripts/kconfig/gconf.c +scripts/kconfig/gconf.glade.h +scripts/kconfig/qconf.cc diff --git a/support/kconfig/README.buildroot b/support/kconfig/README.buildroot new file mode 100644 index 0000000000..62e3a11b1e --- /dev/null +++ b/support/kconfig/README.buildroot @@ -0,0 +1,20 @@ +This is a copy of the kconfig code in the kernel (currently 3.13-rc5) tweaked +to suit Buildroot. + +To update: + cp -r /usr/src/linux/scripts/kconfig support/kconfig.new + cd support/kconfig.new + cp -a ../kconfig/patches ../kconfig/README.buildroot ../kconfig/.gitignore . + quilt push -a + # Fix any conflict + cd .. + rm -rf kconfig + mv kconfig.new kconfig + +Then verify the toplevel targets work: + config + defconfig + menuconfig + xconfig + gconfig + oldconfig diff --git a/support/kconfig/check.sh b/support/kconfig/check.sh new file mode 100755 index 0000000000..854d9c7c67 --- /dev/null +++ b/support/kconfig/check.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# Needed for systems without gettext +$* -x c -o /dev/null - > /dev/null 2>&1 << EOF +#include +int main() +{ + gettext(""); + return 0; +} +EOF +if [ ! "$?" -eq "0" ]; then + echo -DKBUILD_NO_NLS; +fi + diff --git a/support/kconfig/conf.c b/support/kconfig/conf.c new file mode 100644 index 0000000000..553fc76d90 --- /dev/null +++ b/support/kconfig/conf.c @@ -0,0 +1,717 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "lkc.h" + +static void conf(struct menu *menu); +static void check_conf(struct menu *menu); +static void xfgets(char *str, int size, FILE *in); + +enum input_mode { + oldaskconfig, + silentoldconfig, + oldconfig, + allnoconfig, + allyesconfig, + allmodconfig, + alldefconfig, + randconfig, + defconfig, + savedefconfig, + listnewconfig, + olddefconfig, +} input_mode = oldaskconfig; + +static int indent = 1; +static int tty_stdio; +static int valid_stdin = 1; +static int sync_kconfig; +static int conf_cnt; +static char line[128]; +static struct menu *rootEntry; + +static void print_help(struct menu *menu) +{ + struct gstr help = str_new(); + + menu_get_ext_help(menu, &help); + + printf("\n%s\n", str_get(&help)); + str_free(&help); +} + +static void strip(char *str) +{ + char *p = str; + int l; + + while ((isspace(*p))) + p++; + l = strlen(p); + if (p != str) + memmove(str, p, l + 1); + if (!l) + return; + p = str + l - 1; + while ((isspace(*p))) + *p-- = 0; +} + +static void check_stdin(void) +{ + if (!valid_stdin) { + printf(_("aborted!\n\n")); + printf(_("Console input/output is redirected. ")); + printf(_("Run 'make oldconfig' to update configuration.\n\n")); + exit(1); + } +} + +static int conf_askvalue(struct symbol *sym, const char *def) +{ + enum symbol_type type = sym_get_type(sym); + + if (!sym_has_value(sym)) + printf(_("(NEW) ")); + + line[0] = '\n'; + line[1] = 0; + + if (!sym_is_changable(sym)) { + printf("%s\n", def); + line[0] = '\n'; + line[1] = 0; + return 0; + } + + switch (input_mode) { + case oldconfig: + case silentoldconfig: + if (sym_has_value(sym)) { + printf("%s\n", def); + return 0; + } + check_stdin(); + /* fall through */ + case oldaskconfig: + fflush(stdout); + xfgets(line, 128, stdin); + if (!tty_stdio) + printf("\n"); + return 1; + default: + break; + } + + switch (type) { + case S_INT: + case S_HEX: + case S_STRING: + printf("%s\n", def); + return 1; + default: + ; + } + printf("%s", line); + return 1; +} + +static int conf_string(struct menu *menu) +{ + struct symbol *sym = menu->sym; + const char *def; + + while (1) { + printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); + printf("(%s) ", sym->name); + def = sym_get_string_value(sym); + if (sym_get_string_value(sym)) + printf("[%s] ", def); + if (!conf_askvalue(sym, def)) + return 0; + switch (line[0]) { + case '\n': + break; + case '?': + /* print help */ + if (line[1] == '\n') { + print_help(menu); + def = NULL; + break; + } + /* fall through */ + default: + line[strlen(line)-1] = 0; + def = line; + } + if (def && sym_set_string_value(sym, def)) + return 0; + } +} + +static int conf_sym(struct menu *menu) +{ + struct symbol *sym = menu->sym; + tristate oldval, newval; + + while (1) { + printf("%*s%s ", indent - 1, "", _(menu->prompt->text)); + if (sym->name) + printf("(%s) ", sym->name); + putchar('['); + oldval = sym_get_tristate_value(sym); + switch (oldval) { + case no: + putchar('N'); + break; + case mod: + putchar('M'); + break; + case yes: + putchar('Y'); + break; + } + if (oldval != no && sym_tristate_within_range(sym, no)) + printf("/n"); + if (oldval != mod && sym_tristate_within_range(sym, mod)) + printf("/m"); + if (oldval != yes && sym_tristate_within_range(sym, yes)) + printf("/y"); + if (menu_has_help(menu)) + printf("/?"); + printf("] "); + if (!conf_askvalue(sym, sym_get_string_value(sym))) + return 0; + strip(line); + + switch (line[0]) { + case 'n': + case 'N': + newval = no; + if (!line[1] || !strcmp(&line[1], "o")) + break; + continue; + case 'm': + case 'M': + newval = mod; + if (!line[1]) + break; + continue; + case 'y': + case 'Y': + newval = yes; + if (!line[1] || !strcmp(&line[1], "es")) + break; + continue; + case 0: + newval = oldval; + break; + case '?': + goto help; + default: + continue; + } + if (sym_set_tristate_value(sym, newval)) + return 0; +help: + print_help(menu); + } +} + +static int conf_choice(struct menu *menu) +{ + struct symbol *sym, *def_sym; + struct menu *child; + bool is_new; + + sym = menu->sym; + is_new = !sym_has_value(sym); + if (sym_is_changable(sym)) { + conf_sym(menu); + sym_calc_value(sym); + switch (sym_get_tristate_value(sym)) { + case no: + return 1; + case mod: + return 0; + case yes: + break; + } + } else { + switch (sym_get_tristate_value(sym)) { + case no: + return 1; + case mod: + printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu))); + return 0; + case yes: + break; + } + } + + while (1) { + int cnt, def; + + printf("%*s%s\n", indent - 1, "", _(menu_get_prompt(menu))); + def_sym = sym_get_choice_value(sym); + cnt = def = 0; + line[0] = 0; + for (child = menu->list; child; child = child->next) { + if (!menu_is_visible(child)) + continue; + if (!child->sym) { + printf("%*c %s\n", indent, '*', _(menu_get_prompt(child))); + continue; + } + cnt++; + if (child->sym == def_sym) { + def = cnt; + printf("%*c", indent, '>'); + } else + printf("%*c", indent, ' '); + printf(" %d. %s", cnt, _(menu_get_prompt(child))); + if (child->sym->name) + printf(" (%s)", child->sym->name); + if (!sym_has_value(child->sym)) + printf(_(" (NEW)")); + printf("\n"); + } + printf(_("%*schoice"), indent - 1, ""); + if (cnt == 1) { + printf("[1]: 1\n"); + goto conf_childs; + } + printf("[1-%d", cnt); + if (menu_has_help(menu)) + printf("?"); + printf("]: "); + switch (input_mode) { + case oldconfig: + case silentoldconfig: + if (!is_new) { + cnt = def; + printf("%d\n", cnt); + break; + } + check_stdin(); + /* fall through */ + case oldaskconfig: + fflush(stdout); + xfgets(line, 128, stdin); + strip(line); + if (line[0] == '?') { + print_help(menu); + continue; + } + if (!line[0]) + cnt = def; + else if (isdigit(line[0])) + cnt = atoi(line); + else + continue; + break; + default: + break; + } + + conf_childs: + for (child = menu->list; child; child = child->next) { + if (!child->sym || !menu_is_visible(child)) + continue; + if (!--cnt) + break; + } + if (!child) + continue; + if (line[0] && line[strlen(line) - 1] == '?') { + print_help(child); + continue; + } + sym_set_choice_value(sym, child->sym); + for (child = child->list; child; child = child->next) { + indent += 2; + conf(child); + indent -= 2; + } + return 1; + } +} + +static void conf(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + + if (!menu_is_visible(menu)) + return; + + sym = menu->sym; + prop = menu->prompt; + if (prop) { + const char *prompt; + + switch (prop->type) { + case P_MENU: + if ((input_mode == silentoldconfig || + input_mode == listnewconfig || + input_mode == olddefconfig) && + rootEntry != menu) { + check_conf(menu); + return; + } + /* fall through */ + case P_COMMENT: + prompt = menu_get_prompt(menu); + if (prompt) + printf("%*c\n%*c %s\n%*c\n", + indent, '*', + indent, '*', _(prompt), + indent, '*'); + default: + ; + } + } + + if (!sym) + goto conf_childs; + + if (sym_is_choice(sym)) { + conf_choice(menu); + if (sym->curr.tri != mod) + return; + goto conf_childs; + } + + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + conf_string(menu); + break; + default: + conf_sym(menu); + break; + } + +conf_childs: + if (sym) + indent += 2; + for (child = menu->list; child; child = child->next) + conf(child); + if (sym) + indent -= 2; +} + +static void check_conf(struct menu *menu) +{ + struct symbol *sym; + struct menu *child; + + if (!menu_is_visible(menu)) + return; + + sym = menu->sym; + if (sym && !sym_has_value(sym)) { + if (sym_is_changable(sym) || + (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) { + if (input_mode == listnewconfig) { + if (sym->name && !sym_is_choice_value(sym)) { + printf("%s%s\n", CONFIG_, sym->name); + } + } else if (input_mode != olddefconfig) { + if (!conf_cnt++) + printf(_("*\n* Restart config...\n*\n")); + rootEntry = menu_get_parent_menu(menu); + conf(rootEntry); + } + } + } + + for (child = menu->list; child; child = child->next) + check_conf(child); +} + +static struct option long_opts[] = { + {"oldaskconfig", no_argument, NULL, oldaskconfig}, + {"oldconfig", no_argument, NULL, oldconfig}, + {"silentoldconfig", no_argument, NULL, silentoldconfig}, + {"defconfig", optional_argument, NULL, defconfig}, + {"savedefconfig", required_argument, NULL, savedefconfig}, + {"allnoconfig", no_argument, NULL, allnoconfig}, + {"allyesconfig", no_argument, NULL, allyesconfig}, + {"allmodconfig", no_argument, NULL, allmodconfig}, + {"alldefconfig", no_argument, NULL, alldefconfig}, + {"randconfig", no_argument, NULL, randconfig}, + {"listnewconfig", no_argument, NULL, listnewconfig}, + {"olddefconfig", no_argument, NULL, olddefconfig}, + /* + * oldnoconfig is an alias of olddefconfig, because people already + * are dependent on its behavior(sets new symbols to their default + * value but not 'n') with the counter-intuitive name. + */ + {"oldnoconfig", no_argument, NULL, olddefconfig}, + {NULL, 0, NULL, 0} +}; + +static void conf_usage(const char *progname) +{ + + printf("Usage: %s [option] \n", progname); + printf("[option] is _one_ of the following:\n"); + printf(" --listnewconfig List new options\n"); + printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); + printf(" --oldconfig Update a configuration using a provided .config as base\n"); + printf(" --silentoldconfig Same as oldconfig, but quietly, additionally update deps\n"); + printf(" --olddefconfig Same as silentoldconfig but sets new symbols to their default value\n"); + printf(" --oldnoconfig An alias of olddefconfig\n"); + printf(" --defconfig New config with default defined in \n"); + printf(" --savedefconfig Save the minimal current configuration to \n"); + printf(" --allnoconfig New config where all options are answered with no\n"); + printf(" --allyesconfig New config where all options are answered with yes\n"); + printf(" --allmodconfig New config where all options are answered with mod\n"); + printf(" --alldefconfig New config with all symbols set to default\n"); + printf(" --randconfig New config with random answer to all options\n"); +} + +int main(int ac, char **av) +{ + const char *progname = av[0]; + int opt; + const char *name, *defconfig_file = NULL /* gcc uninit */; + struct stat tmpstat; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + tty_stdio = isatty(0) && isatty(1) && isatty(2); + + while ((opt = getopt_long(ac, av, "", long_opts, NULL)) != -1) { + input_mode = (enum input_mode)opt; + switch (opt) { + case silentoldconfig: + sync_kconfig = 1; + break; + case defconfig: + case savedefconfig: + defconfig_file = optarg; + break; + case randconfig: + { + struct timeval now; + unsigned int seed; + char *seed_env; + + /* + * Use microseconds derived seed, + * compensate for systems where it may be zero + */ + gettimeofday(&now, NULL); + seed = (unsigned int)((now.tv_sec + 1) * (now.tv_usec + 1)); + + seed_env = getenv("KCONFIG_SEED"); + if( seed_env && *seed_env ) { + char *endp; + int tmp = (int)strtol(seed_env, &endp, 0); + if (*endp == '\0') { + seed = tmp; + } + } + fprintf( stderr, "KCONFIG_SEED=0x%X\n", seed ); + srand(seed); + break; + } + case oldaskconfig: + case oldconfig: + case allnoconfig: + case allyesconfig: + case allmodconfig: + case alldefconfig: + case listnewconfig: + case olddefconfig: + break; + case '?': + conf_usage(progname); + exit(1); + break; + } + } + if (ac == optind) { + printf(_("%s: Kconfig file missing\n"), av[0]); + conf_usage(progname); + exit(1); + } + name = av[optind]; + conf_parse(name); + if (sync_kconfig) { + name = conf_get_configname(); + if (stat(name, &tmpstat)) { + fprintf(stderr, _("***\n" + "*** Configuration file \"%s\" not found!\n" + "***\n" + "*** Please run some configurator (e.g. \"make oldconfig\" or\n" + "*** \"make menuconfig\" or \"make xconfig\").\n" + "***\n"), name); + exit(1); + } + } + + switch (input_mode) { + case defconfig: + if (!defconfig_file) + defconfig_file = conf_get_default_confname(); + if (conf_read(defconfig_file)) { + printf(_("***\n" + "*** Can't find default configuration \"%s\"!\n" + "***\n"), defconfig_file); + exit(1); + } + break; + case savedefconfig: + case silentoldconfig: + case oldaskconfig: + case oldconfig: + case listnewconfig: + case olddefconfig: + conf_read(NULL); + break; + case allnoconfig: + case allyesconfig: + case allmodconfig: + case alldefconfig: + case randconfig: + name = getenv("KCONFIG_ALLCONFIG"); + if (!name) + break; + if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) { + if (conf_read_simple(name, S_DEF_USER)) { + fprintf(stderr, + _("*** Can't read seed configuration \"%s\"!\n"), + name); + exit(1); + } + break; + } + switch (input_mode) { + case allnoconfig: name = "allno.config"; break; + case allyesconfig: name = "allyes.config"; break; + case allmodconfig: name = "allmod.config"; break; + case alldefconfig: name = "alldef.config"; break; + case randconfig: name = "allrandom.config"; break; + default: break; + } + if (conf_read_simple(name, S_DEF_USER) && + conf_read_simple("all.config", S_DEF_USER)) { + fprintf(stderr, + _("*** KCONFIG_ALLCONFIG set, but no \"%s\" or \"all.config\" file found\n"), + name); + exit(1); + } + break; + default: + break; + } + + if (sync_kconfig) { + if (conf_get_changed()) { + name = getenv("KCONFIG_NOSILENTUPDATE"); + if (name && *name) { + fprintf(stderr, + _("\n*** The configuration requires explicit update.\n\n")); + return 1; + } + } + valid_stdin = tty_stdio; + } + + switch (input_mode) { + case allnoconfig: + conf_set_all_new_symbols(def_no); + break; + case allyesconfig: + conf_set_all_new_symbols(def_yes); + break; + case allmodconfig: + conf_set_all_new_symbols(def_mod); + break; + case alldefconfig: + conf_set_all_new_symbols(def_default); + break; + case randconfig: + /* Really nothing to do in this loop */ + while (conf_set_all_new_symbols(def_random)) ; + break; + case defconfig: + conf_set_all_new_symbols(def_default); + break; + case savedefconfig: + break; + case oldaskconfig: + rootEntry = &rootmenu; + conf(&rootmenu); + input_mode = silentoldconfig; + /* fall through */ + case oldconfig: + case listnewconfig: + case olddefconfig: + case silentoldconfig: + /* Update until a loop caused no more changes */ + do { + conf_cnt = 0; + check_conf(&rootmenu); + } while (conf_cnt && + (input_mode != listnewconfig && + input_mode != olddefconfig)); + break; + } + + if (sync_kconfig) { + /* silentoldconfig is used during the build so we shall update autoconf. + * All other commands are only used to generate a config. + */ + if (conf_get_changed() && conf_write(NULL)) { + fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); + exit(1); + } + if (conf_write_autoconf()) { + fprintf(stderr, _("\n*** Error during update of the configuration.\n\n")); + return 1; + } + } else if (input_mode == savedefconfig) { + if (conf_write_defconfig(defconfig_file)) { + fprintf(stderr, _("n*** Error while saving defconfig to: %s\n\n"), + defconfig_file); + return 1; + } + } else if (input_mode != listnewconfig) { + if (conf_write(NULL)) { + fprintf(stderr, _("\n*** Error during writing of the configuration.\n\n")); + exit(1); + } + } + return 0; +} + +/* + * Helper function to facilitate fgets() by Jean Sacren. + */ +void xfgets(char *str, int size, FILE *in) +{ + if (fgets(str, size, in) == NULL) + fprintf(stderr, "\nError in reading or end of file.\n"); +} diff --git a/support/kconfig/confdata.c b/support/kconfig/confdata.c new file mode 100644 index 0000000000..2371fa8179 --- /dev/null +++ b/support/kconfig/confdata.c @@ -0,0 +1,1272 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "lkc.h" + +static void conf_warning(const char *fmt, ...) + __attribute__ ((format (printf, 1, 2))); + +static void conf_message(const char *fmt, ...) + __attribute__ ((format (printf, 1, 2))); + +static const char *conf_filename; +static int conf_lineno, conf_warnings, conf_unsaved; + +const char conf_defname[] = ".defconfig"; + +static void conf_warning(const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + fprintf(stderr, "%s:%d:warning: ", conf_filename, conf_lineno); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); + conf_warnings++; +} + +static void conf_default_message_callback(const char *fmt, va_list ap) +{ + printf("#\n# "); + vprintf(fmt, ap); + printf("\n#\n"); +} + +static void (*conf_message_callback) (const char *fmt, va_list ap) = + conf_default_message_callback; +void conf_set_message_callback(void (*fn) (const char *fmt, va_list ap)) +{ + conf_message_callback = fn; +} + +static void conf_message(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + if (conf_message_callback) + conf_message_callback(fmt, ap); +} + +const char *conf_get_configname(void) +{ + char *name = getenv("BR2_CONFIG"); + + return name ? name : ".config"; +} + +const char *conf_get_autoconfig_name(void) +{ + return getenv("KCONFIG_AUTOCONFIG"); +} + +static char *conf_expand_value(const char *in) +{ + struct symbol *sym; + const char *src; + static char res_value[SYMBOL_MAXLENGTH]; + char *dst, name[SYMBOL_MAXLENGTH]; + + res_value[0] = 0; + dst = name; + while ((src = strchr(in, '$'))) { + strncat(res_value, in, src - in); + src++; + dst = name; + while (isalnum(*src) || *src == '_') + *dst++ = *src++; + *dst = 0; + sym = sym_lookup(name, 0); + sym_calc_value(sym); + strcat(res_value, sym_get_string_value(sym)); + in = src; + } + strcat(res_value, in); + + return res_value; +} + +char *conf_get_default_confname(void) +{ + struct stat buf; + static char fullname[PATH_MAX+1]; + char *env, *name; + + name = conf_expand_value(conf_defname); + env = getenv(SRCTREE); + if (env) { + sprintf(fullname, "%s/%s", env, name); + if (!stat(fullname, &buf)) + return fullname; + } + return name; +} + +static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) +{ + char *p2; + + switch (sym->type) { + case S_TRISTATE: + if (p[0] == 'm') { + sym->def[def].tri = mod; + sym->flags |= def_flags; + break; + } + /* fall through */ + case S_BOOLEAN: + if (p[0] == 'y') { + sym->def[def].tri = yes; + sym->flags |= def_flags; + break; + } + if (p[0] == 'n') { + sym->def[def].tri = no; + sym->flags |= def_flags; + break; + } + if (def != S_DEF_AUTO) + conf_warning("symbol value '%s' invalid for %s", + p, sym->name); + return 1; + case S_OTHER: + if (*p != '"') { + for (p2 = p; *p2 && !isspace(*p2); p2++) + ; + sym->type = S_STRING; + goto done; + } + /* fall through */ + case S_STRING: + if (*p++ != '"') + break; + for (p2 = p; (p2 = strpbrk(p2, "\"\\")); p2++) { + if (*p2 == '"') { + *p2 = 0; + break; + } + memmove(p2, p2 + 1, strlen(p2)); + } + if (!p2) { + if (def != S_DEF_AUTO) + conf_warning("invalid string found"); + return 1; + } + /* fall through */ + case S_INT: + case S_HEX: + done: + if (sym_string_valid(sym, p)) { + sym->def[def].val = strdup(p); + sym->flags |= def_flags; + } else { + if (def != S_DEF_AUTO) + conf_warning("symbol value '%s' invalid for %s", + p, sym->name); + return 1; + } + break; + default: + ; + } + return 0; +} + +#define LINE_GROWTH 16 +static int add_byte(int c, char **lineptr, size_t slen, size_t *n) +{ + char *nline; + size_t new_size = slen + 1; + if (new_size > *n) { + new_size += LINE_GROWTH - 1; + new_size *= 2; + nline = realloc(*lineptr, new_size); + if (!nline) + return -1; + + *lineptr = nline; + *n = new_size; + } + + (*lineptr)[slen] = c; + + return 0; +} + +static ssize_t compat_getline(char **lineptr, size_t *n, FILE *stream) +{ + char *line = *lineptr; + size_t slen = 0; + + for (;;) { + int c = getc(stream); + + switch (c) { + case '\n': + if (add_byte(c, &line, slen, n) < 0) + goto e_out; + slen++; + /* fall through */ + case EOF: + if (add_byte('\0', &line, slen, n) < 0) + goto e_out; + *lineptr = line; + if (slen == 0) + return -1; + return slen; + default: + if (add_byte(c, &line, slen, n) < 0) + goto e_out; + slen++; + } + } + +e_out: + line[slen-1] = '\0'; + *lineptr = line; + return -1; +} + +int conf_read_simple(const char *name, int def) +{ + FILE *in = NULL; + char *line = NULL; + size_t line_asize = 0; + char *p, *p2; + struct symbol *sym; + int i, def_flags; + + if (name) { + in = zconf_fopen(name); + } else { + struct property *prop; + + name = conf_get_configname(); + in = zconf_fopen(name); + if (in) + goto load; + sym_add_change_count(1); + if (!sym_defconfig_list) { + if (modules_sym) + sym_calc_value(modules_sym); + return 1; + } + + for_all_defaults(sym_defconfig_list, prop) { + if (expr_calc_value(prop->visible.expr) == no || + prop->expr->type != E_SYMBOL) + continue; + name = conf_expand_value(prop->expr->left.sym->name); + in = zconf_fopen(name); + if (in) { + conf_message(_("using defaults found in %s"), + name); + goto load; + } + } + } + if (!in) + return 1; + +load: + conf_filename = name; + conf_lineno = 0; + conf_warnings = 0; + conf_unsaved = 0; + + def_flags = SYMBOL_DEF << def; + for_all_symbols(i, sym) { + sym->flags |= SYMBOL_CHANGED; + sym->flags &= ~(def_flags|SYMBOL_VALID); + if (sym_is_choice(sym)) + sym->flags |= def_flags; + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + if (sym->def[def].val) + free(sym->def[def].val); + /* fall through */ + default: + sym->def[def].val = NULL; + sym->def[def].tri = no; + } + } + + while (compat_getline(&line, &line_asize, in) != -1) { + conf_lineno++; + sym = NULL; + if (line[0] == '#') { + if (memcmp(line + 2, CONFIG_, strlen(CONFIG_))) + continue; + p = strchr(line + 2 + strlen(CONFIG_), ' '); + if (!p) + continue; + *p++ = 0; + if (strncmp(p, "is not set", 10)) + continue; + if (def == S_DEF_USER) { + sym = sym_find(line + 2 + strlen(CONFIG_)); + if (!sym) { + sym_add_change_count(1); + goto setsym; + } + } else { + sym = sym_lookup(line + 2 + strlen(CONFIG_), 0); + if (sym->type == S_UNKNOWN) + sym->type = S_BOOLEAN; + } + if (sym->flags & def_flags) { + conf_warning("override: reassigning to symbol %s", sym->name); + } + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + sym->def[def].tri = no; + sym->flags |= def_flags; + break; + default: + ; + } + } else if (memcmp(line, CONFIG_, strlen(CONFIG_)) == 0) { + p = strchr(line + strlen(CONFIG_), '='); + if (!p) + continue; + *p++ = 0; + p2 = strchr(p, '\n'); + if (p2) { + *p2-- = 0; + if (*p2 == '\r') + *p2 = 0; + } + if (def == S_DEF_USER) { + sym = sym_find(line + strlen(CONFIG_)); + if (!sym) { + sym_add_change_count(1); + goto setsym; + } + } else { + sym = sym_lookup(line + strlen(CONFIG_), 0); + if (sym->type == S_UNKNOWN) + sym->type = S_OTHER; + } + if (sym->flags & def_flags) { + conf_warning("override: reassigning to symbol %s", sym->name); + } + if (conf_set_sym_val(sym, def, def_flags, p)) + continue; + } else { + if (line[0] != '\r' && line[0] != '\n') + conf_warning("unexpected data"); + continue; + } +setsym: + if (sym && sym_is_choice_value(sym)) { + struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); + switch (sym->def[def].tri) { + case no: + break; + case mod: + if (cs->def[def].tri == yes) { + conf_warning("%s creates inconsistent choice state", sym->name); + cs->flags &= ~def_flags; + } + break; + case yes: + if (cs->def[def].tri != no) + conf_warning("override: %s changes choice state", sym->name); + cs->def[def].val = sym; + break; + } + cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri); + } + } + free(line); + fclose(in); + + if (modules_sym) + sym_calc_value(modules_sym); + return 0; +} + +int conf_read(const char *name) +{ + struct symbol *sym; + int i; + + sym_set_change_count(0); + + if (conf_read_simple(name, S_DEF_USER)) + return 1; + + for_all_symbols(i, sym) { + sym_calc_value(sym); + if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO)) + continue; + if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) { + /* check that calculated value agrees with saved value */ + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym)) + break; + if (!sym_is_choice(sym)) + continue; + /* fall through */ + default: + if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val)) + continue; + break; + } + } else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE)) + /* no previous value and not saved */ + continue; + conf_unsaved++; + /* maybe print value in verbose mode... */ + } + + for_all_symbols(i, sym) { + if (sym_has_value(sym) && !sym_is_choice_value(sym)) { + /* Reset values of generates values, so they'll appear + * as new, if they should become visible, but that + * doesn't quite work if the Kconfig and the saved + * configuration disagree. + */ + if (sym->visible == no && !conf_unsaved) + sym->flags &= ~SYMBOL_DEF_USER; + switch (sym->type) { + case S_STRING: + case S_INT: + case S_HEX: + /* Reset a string value if it's out of range */ + if (sym_string_within_range(sym, sym->def[S_DEF_USER].val)) + break; + sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER); + conf_unsaved++; + break; + default: + break; + } + } + } + + sym_add_change_count(conf_warnings || conf_unsaved); + + return 0; +} + +/* + * Kconfig configuration printer + * + * This printer is used when generating the resulting configuration after + * kconfig invocation and `defconfig' files. Unset symbol might be omitted by + * passing a non-NULL argument to the printer. + * + */ +static void +kconfig_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) +{ + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + if (*value == 'n') { + bool skip_unset = (arg != NULL); + + if (!skip_unset) + fprintf(fp, "# %s%s is not set\n", + CONFIG_, sym->name); + return; + } + break; + default: + break; + } + + fprintf(fp, "%s%s=%s\n", CONFIG_, sym->name, value); +} + +static void +kconfig_print_comment(FILE *fp, const char *value, void *arg) +{ + const char *p = value; + size_t l; + + for (;;) { + l = strcspn(p, "\n"); + fprintf(fp, "#"); + if (l) { + fprintf(fp, " "); + xfwrite(p, l, 1, fp); + p += l; + } + fprintf(fp, "\n"); + if (*p++ == '\0') + break; + } +} + +static struct conf_printer kconfig_printer_cb = +{ + .print_symbol = kconfig_print_symbol, + .print_comment = kconfig_print_comment, +}; + +/* + * Header printer + * + * This printer is used when generating the `include/generated/autoconf.h' file. + */ +static void +header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) +{ + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: { + const char *suffix = ""; + + switch (*value) { + case 'n': + break; + case 'm': + suffix = "_MODULE"; + /* fall through */ + default: + fprintf(fp, "#define %s%s%s 1\n", + CONFIG_, sym->name, suffix); + } + break; + } + case S_HEX: { + const char *prefix = ""; + + if (value[0] != '0' || (value[1] != 'x' && value[1] != 'X')) + prefix = "0x"; + fprintf(fp, "#define %s%s %s%s\n", + CONFIG_, sym->name, prefix, value); + break; + } + case S_STRING: + case S_INT: + fprintf(fp, "#define %s%s %s\n", + CONFIG_, sym->name, value); + break; + default: + break; + } + +} + +static void +header_print_comment(FILE *fp, const char *value, void *arg) +{ + const char *p = value; + size_t l; + + fprintf(fp, "/*\n"); + for (;;) { + l = strcspn(p, "\n"); + fprintf(fp, " *"); + if (l) { + fprintf(fp, " "); + xfwrite(p, l, 1, fp); + p += l; + } + fprintf(fp, "\n"); + if (*p++ == '\0') + break; + } + fprintf(fp, " */\n"); +} + +static struct conf_printer header_printer_cb = +{ + .print_symbol = header_print_symbol, + .print_comment = header_print_comment, +}; + +/* + * Tristate printer + * + * This printer is used when generating the `include/config/tristate.conf' file. + */ +static void +tristate_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) +{ + + if (sym->type == S_TRISTATE && *value != 'n') + fprintf(fp, "%s%s=%c\n", CONFIG_, sym->name, (char)toupper(*value)); +} + +static struct conf_printer tristate_printer_cb = +{ + .print_symbol = tristate_print_symbol, + .print_comment = kconfig_print_comment, +}; + +static void conf_write_symbol(FILE *fp, struct symbol *sym, + struct conf_printer *printer, void *printer_arg) +{ + const char *str; + + switch (sym->type) { + case S_OTHER: + case S_UNKNOWN: + break; + case S_STRING: + str = sym_get_string_value(sym); + str = sym_escape_string_value(str); + printer->print_symbol(fp, sym, str, printer_arg); + free((void *)str); + break; + default: + str = sym_get_string_value(sym); + printer->print_symbol(fp, sym, str, printer_arg); + } +} + +static void +conf_write_heading(FILE *fp, struct conf_printer *printer, void *printer_arg) +{ + char buf[256]; + + snprintf(buf, sizeof(buf), + "\n" + "Automatically generated file; DO NOT EDIT.\n" + "%s\n", + rootmenu.prompt->text); + + printer->print_comment(fp, buf, printer_arg); +} + +/* + * Write out a minimal config. + * All values that has default values are skipped as this is redundant. + */ +int conf_write_defconfig(const char *filename) +{ + struct symbol *sym; + struct menu *menu; + FILE *out; + + out = fopen(filename, "w"); + if (!out) + return 1; + + sym_clear_all_valid(); + + /* Traverse all menus to find all relevant symbols */ + menu = rootmenu.list; + + while (menu != NULL) + { + sym = menu->sym; + if (sym == NULL) { + if (!menu_is_visible(menu)) + goto next_menu; + } else if (!sym_is_choice(sym)) { + sym_calc_value(sym); + if (!(sym->flags & SYMBOL_WRITE)) + goto next_menu; + sym->flags &= ~SYMBOL_WRITE; + /* If we cannot change the symbol - skip */ + if (!sym_is_changable(sym)) + goto next_menu; + /* If symbol equals to default value - skip */ + if (strcmp(sym_get_string_value(sym), sym_get_string_default(sym)) == 0) + goto next_menu; + + /* + * If symbol is a choice value and equals to the + * default for a choice - skip. + * But only if value is bool and equal to "y" and + * choice is not "optional". + * (If choice is "optional" then all values can be "n") + */ + if (sym_is_choice_value(sym)) { + struct symbol *cs; + struct symbol *ds; + + cs = prop_get_symbol(sym_get_choice_prop(sym)); + ds = sym_choice_default(cs); + if (!sym_is_optional(cs) && sym == ds) { + if ((sym->type == S_BOOLEAN) && + sym_get_tristate_value(sym) == yes) + goto next_menu; + } + } + conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); + } +next_menu: + if (menu->list != NULL) { + menu = menu->list; + } + else if (menu->next != NULL) { + menu = menu->next; + } else { + while ((menu = menu->parent)) { + if (menu->next != NULL) { + menu = menu->next; + break; + } + } + } + } + fclose(out); + return 0; +} + +int conf_write(const char *name) +{ + FILE *out; + struct symbol *sym; + struct menu *menu; + const char *basename; + const char *str; + char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; + char *env; + + if (!name) + name = conf_get_configname(); + + dirname[0] = 0; + if (name && name[0]) { + struct stat st; + char *slash; + + if (!stat(name, &st) && S_ISDIR(st.st_mode)) { + strcpy(dirname, name); + strcat(dirname, "/"); + basename = conf_get_configname(); + } else if ((slash = strrchr(name, '/'))) { + int size = slash - name + 1; + memcpy(dirname, name, size); + dirname[size] = 0; + if (slash[1]) + basename = slash + 1; + else + basename = conf_get_configname(); + } else + basename = name; + } else + basename = conf_get_configname(); + + sprintf(newname, "%s%s", dirname, basename); + env = getenv("KCONFIG_OVERWRITECONFIG"); + if (!env || !*env) { + sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid()); + out = fopen(tmpname, "w"); + } else { + *tmpname = 0; + out = fopen(newname, "w"); + } + if (!out) + return 1; + + conf_write_heading(out, &kconfig_printer_cb, NULL); + + if (!conf_get_changed()) + sym_clear_all_valid(); + + menu = rootmenu.list; + while (menu) { + sym = menu->sym; + if (!sym) { + if (!menu_is_visible(menu)) + goto next; + str = menu_get_prompt(menu); + fprintf(out, "\n" + "#\n" + "# %s\n" + "#\n", str); + } else if (!(sym->flags & SYMBOL_CHOICE)) { + sym_calc_value(sym); + if (!(sym->flags & SYMBOL_WRITE)) + goto next; + sym->flags &= ~SYMBOL_WRITE; + + conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); + } + +next: + if (menu->list) { + menu = menu->list; + continue; + } + if (menu->next) + menu = menu->next; + else while ((menu = menu->parent)) { + if (menu->next) { + menu = menu->next; + break; + } + } + } + fclose(out); + + if (*tmpname) { + strcat(dirname, basename); + strcat(dirname, ".old"); + rename(newname, dirname); + if (rename(tmpname, newname)) + return 1; + } + + conf_message(_("configuration written to %s"), newname); + + sym_set_change_count(0); + + return 0; +} + +static int conf_split_config(void) +{ + const char *name; + char path[PATH_MAX+1]; + char *opwd, *dir, *_name; + char *s, *d, c; + struct symbol *sym; + struct stat sb; + int res, i, fd; + + name = conf_get_autoconfig_name(); + conf_read_simple(name, S_DEF_AUTO); + + opwd = malloc(256); + _name = strdup(name); + if (opwd == NULL || _name == NULL) + return 1; + opwd = getcwd(opwd, 256); + dir = dirname(_name); + if (dir == NULL) { + res = 1; + goto err; + } + if (chdir(dir)) { + res = 1; + goto err; + } + + res = 0; + for_all_symbols(i, sym) { + sym_calc_value(sym); + if ((sym->flags & SYMBOL_AUTO) || !sym->name) + continue; + if (sym->flags & SYMBOL_WRITE) { + if (sym->flags & SYMBOL_DEF_AUTO) { + /* + * symbol has old and new value, + * so compare them... + */ + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + if (sym_get_tristate_value(sym) == + sym->def[S_DEF_AUTO].tri) + continue; + break; + case S_STRING: + case S_HEX: + case S_INT: + if (!strcmp(sym_get_string_value(sym), + sym->def[S_DEF_AUTO].val)) + continue; + break; + default: + break; + } + } else { + /* + * If there is no old value, only 'no' (unset) + * is allowed as new value. + */ + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + if (sym_get_tristate_value(sym) == no) + continue; + break; + default: + break; + } + } + } else if (!(sym->flags & SYMBOL_DEF_AUTO)) + /* There is neither an old nor a new value. */ + continue; + /* else + * There is an old value, but no new value ('no' (unset) + * isn't saved in auto.conf, so the old value is always + * different from 'no'). + */ + + /* Replace all '_' and append ".h" */ + s = sym->name; + d = path; + while ((c = *s++)) { + c = tolower(c); + *d++ = (c == '_') ? '/' : c; + } + strcpy(d, ".h"); + + /* Assume directory path already exists. */ + fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (fd == -1) { + if (errno != ENOENT) { + res = 1; + break; + } + /* + * Create directory components, + * unless they exist already. + */ + d = path; + while ((d = strchr(d, '/'))) { + *d = 0; + if (stat(path, &sb) && mkdir(path, 0755)) { + res = 1; + goto out; + } + *d++ = '/'; + } + /* Try it again. */ + fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644); + if (fd == -1) { + res = 1; + break; + } + } + close(fd); + } +out: + if (chdir(opwd)) + res = 1; +err: + free(opwd); + free(_name); + return res; +} + +int conf_write_autoconf(void) +{ + struct symbol *sym; + const char *name; + FILE *out, *tristate, *out_h; + int i; + char dir[PATH_MAX+1], buf[PATH_MAX+1]; + char *s; + + strcpy(dir, conf_get_configname()); + s = strrchr(dir, '/'); + if (s) + s[1] = 0; + else + dir[0] = 0; + + sym_clear_all_valid(); + + sprintf(buf, "%s.config.cmd", dir); + file_write_dep(buf); + + if (conf_split_config()) + return 1; + + sprintf(buf, "%s.tmpconfig", dir); + out = fopen(buf, "w"); + if (!out) + return 1; + + sprintf(buf, "%s.tmpconfig_tristate", dir); + tristate = fopen(buf, "w"); + if (!tristate) { + fclose(out); + return 1; + } + + sprintf(buf, "%s.tmpconfig.h", dir); + out_h = fopen(buf, "w"); + if (!out_h) { + fclose(out); + fclose(tristate); + return 1; + } + + conf_write_heading(out, &kconfig_printer_cb, NULL); + + conf_write_heading(tristate, &tristate_printer_cb, NULL); + + conf_write_heading(out_h, &header_printer_cb, NULL); + + for_all_symbols(i, sym) { + sym_calc_value(sym); + if (!(sym->flags & SYMBOL_WRITE) || !sym->name) + continue; + + /* write symbol to auto.conf, tristate and header files */ + conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1); + + conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1); + + conf_write_symbol(out_h, sym, &header_printer_cb, NULL); + } + fclose(out); + fclose(tristate); + fclose(out_h); + + name = getenv("KCONFIG_AUTOHEADER"); + if (!name) + name = "include/generated/autoconf.h"; + sprintf(buf, "%s.tmpconfig.h", dir); + if (rename(buf, name)) + return 1; + name = getenv("KCONFIG_TRISTATE"); + if (!name) + name = "include/config/tristate.conf"; + sprintf(buf, "%s.tmpconfig_tristate", dir); + if (rename(buf, name)) + return 1; + name = conf_get_autoconfig_name(); + /* + * This must be the last step, kbuild has a dependency on auto.conf + * and this marks the successful completion of the previous steps. + */ + sprintf(buf, "%s.tmpconfig", dir); + if (rename(buf, name)) + return 1; + + return 0; +} + +static int sym_change_count; +static void (*conf_changed_callback)(void); + +void sym_set_change_count(int count) +{ + int _sym_change_count = sym_change_count; + sym_change_count = count; + if (conf_changed_callback && + (bool)_sym_change_count != (bool)count) + conf_changed_callback(); +} + +void sym_add_change_count(int count) +{ + sym_set_change_count(count + sym_change_count); +} + +bool conf_get_changed(void) +{ + return sym_change_count; +} + +void conf_set_changed_callback(void (*fn)(void)) +{ + conf_changed_callback = fn; +} + +static bool randomize_choice_values(struct symbol *csym) +{ + struct property *prop; + struct symbol *sym; + struct expr *e; + int cnt, def; + + /* + * If choice is mod then we may have more items selected + * and if no then no-one. + * In both cases stop. + */ + if (csym->curr.tri != yes) + return false; + + prop = sym_get_choice_prop(csym); + + /* count entries in choice block */ + cnt = 0; + expr_list_for_each_sym(prop->expr, e, sym) + cnt++; + + /* + * find a random value and set it to yes, + * set the rest to no so we have only one set + */ + def = (rand() % cnt); + + cnt = 0; + expr_list_for_each_sym(prop->expr, e, sym) { + if (def == cnt++) { + sym->def[S_DEF_USER].tri = yes; + csym->def[S_DEF_USER].val = sym; + } + else { + sym->def[S_DEF_USER].tri = no; + } + sym->flags |= SYMBOL_DEF_USER; + /* clear VALID to get value calculated */ + sym->flags &= ~SYMBOL_VALID; + } + csym->flags |= SYMBOL_DEF_USER; + /* clear VALID to get value calculated */ + csym->flags &= ~(SYMBOL_VALID); + + return true; +} + +void set_all_choice_values(struct symbol *csym) +{ + struct property *prop; + struct symbol *sym; + struct expr *e; + + prop = sym_get_choice_prop(csym); + + /* + * Set all non-assinged choice values to no + */ + expr_list_for_each_sym(prop->expr, e, sym) { + if (!sym_has_value(sym)) + sym->def[S_DEF_USER].tri = no; + } + csym->flags |= SYMBOL_DEF_USER; + /* clear VALID to get value calculated */ + csym->flags &= ~(SYMBOL_VALID | SYMBOL_NEED_SET_CHOICE_VALUES); +} + +bool conf_set_all_new_symbols(enum conf_def_mode mode) +{ + struct symbol *sym, *csym; + int i, cnt, pby, pty, ptm; /* pby: probability of boolean = y + * pty: probability of tristate = y + * ptm: probability of tristate = m + */ + + pby = 50; pty = ptm = 33; /* can't go as the default in switch-case + * below, otherwise gcc whines about + * -Wmaybe-uninitialized */ + if (mode == def_random) { + int n, p[3]; + char *env = getenv("KCONFIG_PROBABILITY"); + n = 0; + while( env && *env ) { + char *endp; + int tmp = strtol( env, &endp, 10 ); + if( tmp >= 0 && tmp <= 100 ) { + p[n++] = tmp; + } else { + errno = ERANGE; + perror( "KCONFIG_PROBABILITY" ); + exit( 1 ); + } + env = (*endp == ':') ? endp+1 : endp; + if( n >=3 ) { + break; + } + } + switch( n ) { + case 1: + pby = p[0]; ptm = pby/2; pty = pby-ptm; + break; + case 2: + pty = p[0]; ptm = p[1]; pby = pty + ptm; + break; + case 3: + pby = p[0]; pty = p[1]; ptm = p[2]; + break; + } + + if( pty+ptm > 100 ) { + errno = ERANGE; + perror( "KCONFIG_PROBABILITY" ); + exit( 1 ); + } + } + bool has_changed = false; + + for_all_symbols(i, sym) { + if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID)) + continue; + switch (sym_get_type(sym)) { + case S_BOOLEAN: + case S_TRISTATE: + has_changed = true; + switch (mode) { + case def_yes: + sym->def[S_DEF_USER].tri = yes; + break; + case def_mod: + sym->def[S_DEF_USER].tri = mod; + break; + case def_no: + sym->def[S_DEF_USER].tri = no; + break; + case def_random: + sym->def[S_DEF_USER].tri = no; + cnt = rand() % 100; + if (sym->type == S_TRISTATE) { + if (cnt < pty) + sym->def[S_DEF_USER].tri = yes; + else if (cnt < (pty+ptm)) + sym->def[S_DEF_USER].tri = mod; + } else if (cnt < pby) + sym->def[S_DEF_USER].tri = yes; + break; + default: + continue; + } + if (!(sym_is_choice(sym) && mode == def_random)) + sym->flags |= SYMBOL_DEF_USER; + break; + default: + break; + } + + } + + sym_clear_all_valid(); + + /* + * We have different type of choice blocks. + * If curr.tri equals to mod then we can select several + * choice symbols in one block. + * In this case we do nothing. + * If curr.tri equals yes then only one symbol can be + * selected in a choice block and we set it to yes, + * and the rest to no. + */ + if (mode != def_random) { + for_all_symbols(i, csym) { + if ((sym_is_choice(csym) && !sym_has_value(csym)) || + sym_is_choice_value(csym)) + csym->flags |= SYMBOL_NEED_SET_CHOICE_VALUES; + } + } + + for_all_symbols(i, csym) { + if (sym_has_value(csym) || !sym_is_choice(csym)) + continue; + + sym_calc_value(csym); + if (mode == def_random) + has_changed = randomize_choice_values(csym); + else { + set_all_choice_values(csym); + has_changed = true; + } + } + + return has_changed; +} diff --git a/support/kconfig/expr.c b/support/kconfig/expr.c new file mode 100644 index 0000000000..d6626521f9 --- /dev/null +++ b/support/kconfig/expr.c @@ -0,0 +1,1168 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include + +#include "lkc.h" + +#define DEBUG_EXPR 0 + +struct expr *expr_alloc_symbol(struct symbol *sym) +{ + struct expr *e = xcalloc(1, sizeof(*e)); + e->type = E_SYMBOL; + e->left.sym = sym; + return e; +} + +struct expr *expr_alloc_one(enum expr_type type, struct expr *ce) +{ + struct expr *e = xcalloc(1, sizeof(*e)); + e->type = type; + e->left.expr = ce; + return e; +} + +struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2) +{ + struct expr *e = xcalloc(1, sizeof(*e)); + e->type = type; + e->left.expr = e1; + e->right.expr = e2; + return e; +} + +struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2) +{ + struct expr *e = xcalloc(1, sizeof(*e)); + e->type = type; + e->left.sym = s1; + e->right.sym = s2; + return e; +} + +struct expr *expr_alloc_and(struct expr *e1, struct expr *e2) +{ + if (!e1) + return e2; + return e2 ? expr_alloc_two(E_AND, e1, e2) : e1; +} + +struct expr *expr_alloc_or(struct expr *e1, struct expr *e2) +{ + if (!e1) + return e2; + return e2 ? expr_alloc_two(E_OR, e1, e2) : e1; +} + +struct expr *expr_copy(const struct expr *org) +{ + struct expr *e; + + if (!org) + return NULL; + + e = xmalloc(sizeof(*org)); + memcpy(e, org, sizeof(*org)); + switch (org->type) { + case E_SYMBOL: + e->left = org->left; + break; + case E_NOT: + e->left.expr = expr_copy(org->left.expr); + break; + case E_EQUAL: + case E_UNEQUAL: + e->left.sym = org->left.sym; + e->right.sym = org->right.sym; + break; + case E_AND: + case E_OR: + case E_LIST: + e->left.expr = expr_copy(org->left.expr); + e->right.expr = expr_copy(org->right.expr); + break; + default: + printf("can't copy type %d\n", e->type); + free(e); + e = NULL; + break; + } + + return e; +} + +void expr_free(struct expr *e) +{ + if (!e) + return; + + switch (e->type) { + case E_SYMBOL: + break; + case E_NOT: + expr_free(e->left.expr); + return; + case E_EQUAL: + case E_UNEQUAL: + break; + case E_OR: + case E_AND: + expr_free(e->left.expr); + expr_free(e->right.expr); + break; + default: + printf("how to free type %d?\n", e->type); + break; + } + free(e); +} + +static int trans_count; + +#define e1 (*ep1) +#define e2 (*ep2) + +static void __expr_eliminate_eq(enum expr_type type, struct expr **ep1, struct expr **ep2) +{ + if (e1->type == type) { + __expr_eliminate_eq(type, &e1->left.expr, &e2); + __expr_eliminate_eq(type, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + __expr_eliminate_eq(type, &e1, &e2->left.expr); + __expr_eliminate_eq(type, &e1, &e2->right.expr); + return; + } + if (e1->type == E_SYMBOL && e2->type == E_SYMBOL && + e1->left.sym == e2->left.sym && + (e1->left.sym == &symbol_yes || e1->left.sym == &symbol_no)) + return; + if (!expr_eq(e1, e2)) + return; + trans_count++; + expr_free(e1); expr_free(e2); + switch (type) { + case E_OR: + e1 = expr_alloc_symbol(&symbol_no); + e2 = expr_alloc_symbol(&symbol_no); + break; + case E_AND: + e1 = expr_alloc_symbol(&symbol_yes); + e2 = expr_alloc_symbol(&symbol_yes); + break; + default: + ; + } +} + +void expr_eliminate_eq(struct expr **ep1, struct expr **ep2) +{ + if (!e1 || !e2) + return; + switch (e1->type) { + case E_OR: + case E_AND: + __expr_eliminate_eq(e1->type, ep1, ep2); + default: + ; + } + if (e1->type != e2->type) switch (e2->type) { + case E_OR: + case E_AND: + __expr_eliminate_eq(e2->type, ep1, ep2); + default: + ; + } + e1 = expr_eliminate_yn(e1); + e2 = expr_eliminate_yn(e2); +} + +#undef e1 +#undef e2 + +int expr_eq(struct expr *e1, struct expr *e2) +{ + int res, old_count; + + if (e1->type != e2->type) + return 0; + switch (e1->type) { + case E_EQUAL: + case E_UNEQUAL: + return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym; + case E_SYMBOL: + return e1->left.sym == e2->left.sym; + case E_NOT: + return expr_eq(e1->left.expr, e2->left.expr); + case E_AND: + case E_OR: + e1 = expr_copy(e1); + e2 = expr_copy(e2); + old_count = trans_count; + expr_eliminate_eq(&e1, &e2); + res = (e1->type == E_SYMBOL && e2->type == E_SYMBOL && + e1->left.sym == e2->left.sym); + expr_free(e1); + expr_free(e2); + trans_count = old_count; + return res; + case E_LIST: + case E_RANGE: + case E_NONE: + /* panic */; + } + + if (DEBUG_EXPR) { + expr_fprint(e1, stdout); + printf(" = "); + expr_fprint(e2, stdout); + printf(" ?\n"); + } + + return 0; +} + +struct expr *expr_eliminate_yn(struct expr *e) +{ + struct expr *tmp; + + if (e) switch (e->type) { + case E_AND: + e->left.expr = expr_eliminate_yn(e->left.expr); + e->right.expr = expr_eliminate_yn(e->right.expr); + if (e->left.expr->type == E_SYMBOL) { + if (e->left.expr->left.sym == &symbol_no) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + e->right.expr = NULL; + return e; + } else if (e->left.expr->left.sym == &symbol_yes) { + free(e->left.expr); + tmp = e->right.expr; + *e = *(e->right.expr); + free(tmp); + return e; + } + } + if (e->right.expr->type == E_SYMBOL) { + if (e->right.expr->left.sym == &symbol_no) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + e->right.expr = NULL; + return e; + } else if (e->right.expr->left.sym == &symbol_yes) { + free(e->right.expr); + tmp = e->left.expr; + *e = *(e->left.expr); + free(tmp); + return e; + } + } + break; + case E_OR: + e->left.expr = expr_eliminate_yn(e->left.expr); + e->right.expr = expr_eliminate_yn(e->right.expr); + if (e->left.expr->type == E_SYMBOL) { + if (e->left.expr->left.sym == &symbol_no) { + free(e->left.expr); + tmp = e->right.expr; + *e = *(e->right.expr); + free(tmp); + return e; + } else if (e->left.expr->left.sym == &symbol_yes) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + e->right.expr = NULL; + return e; + } + } + if (e->right.expr->type == E_SYMBOL) { + if (e->right.expr->left.sym == &symbol_no) { + free(e->right.expr); + tmp = e->left.expr; + *e = *(e->left.expr); + free(tmp); + return e; + } else if (e->right.expr->left.sym == &symbol_yes) { + expr_free(e->left.expr); + expr_free(e->right.expr); + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + e->right.expr = NULL; + return e; + } + } + break; + default: + ; + } + return e; +} + +/* + * bool FOO!=n => FOO + */ +struct expr *expr_trans_bool(struct expr *e) +{ + if (!e) + return NULL; + switch (e->type) { + case E_AND: + case E_OR: + case E_NOT: + e->left.expr = expr_trans_bool(e->left.expr); + e->right.expr = expr_trans_bool(e->right.expr); + break; + case E_UNEQUAL: + // FOO!=n -> FOO + if (e->left.sym->type == S_TRISTATE) { + if (e->right.sym == &symbol_no) { + e->type = E_SYMBOL; + e->right.sym = NULL; + } + } + break; + default: + ; + } + return e; +} + +/* + * e1 || e2 -> ? + */ +static struct expr *expr_join_or(struct expr *e1, struct expr *e2) +{ + struct expr *tmp; + struct symbol *sym1, *sym2; + + if (expr_eq(e1, e2)) + return expr_copy(e1); + if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT) + return NULL; + if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) + return NULL; + if (e1->type == E_NOT) { + tmp = e1->left.expr; + if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL) + return NULL; + sym1 = tmp->left.sym; + } else + sym1 = e1->left.sym; + if (e2->type == E_NOT) { + if (e2->left.expr->type != E_SYMBOL) + return NULL; + sym2 = e2->left.expr->left.sym; + } else + sym2 = e2->left.sym; + if (sym1 != sym2) + return NULL; + if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE) + return NULL; + if (sym1->type == S_TRISTATE) { + if (e1->type == E_EQUAL && e2->type == E_EQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || + (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) { + // (a='y') || (a='m') -> (a!='n') + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_no); + } + if (e1->type == E_EQUAL && e2->type == E_EQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) { + // (a='y') || (a='n') -> (a!='m') + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_mod); + } + if (e1->type == E_EQUAL && e2->type == E_EQUAL && + ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) { + // (a='m') || (a='n') -> (a!='y') + return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes); + } + } + if (sym1->type == S_BOOLEAN && sym1 == sym2) { + if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) || + (e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL)) + return expr_alloc_symbol(&symbol_yes); + } + + if (DEBUG_EXPR) { + printf("optimize ("); + expr_fprint(e1, stdout); + printf(") || ("); + expr_fprint(e2, stdout); + printf(")?\n"); + } + return NULL; +} + +static struct expr *expr_join_and(struct expr *e1, struct expr *e2) +{ + struct expr *tmp; + struct symbol *sym1, *sym2; + + if (expr_eq(e1, e2)) + return expr_copy(e1); + if (e1->type != E_EQUAL && e1->type != E_UNEQUAL && e1->type != E_SYMBOL && e1->type != E_NOT) + return NULL; + if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) + return NULL; + if (e1->type == E_NOT) { + tmp = e1->left.expr; + if (tmp->type != E_EQUAL && tmp->type != E_UNEQUAL && tmp->type != E_SYMBOL) + return NULL; + sym1 = tmp->left.sym; + } else + sym1 = e1->left.sym; + if (e2->type == E_NOT) { + if (e2->left.expr->type != E_SYMBOL) + return NULL; + sym2 = e2->left.expr->left.sym; + } else + sym2 = e2->left.sym; + if (sym1 != sym2) + return NULL; + if (sym1->type != S_BOOLEAN && sym1->type != S_TRISTATE) + return NULL; + + if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) || + (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes)) + // (a) && (a='y') -> (a='y') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); + + if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) || + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no)) + // (a) && (a!='n') -> (a) + return expr_alloc_symbol(sym1); + + if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) || + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod)) + // (a) && (a!='m') -> (a='y') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); + + if (sym1->type == S_TRISTATE) { + if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) { + // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' + sym2 = e1->right.sym; + if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) + return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) + : expr_alloc_symbol(&symbol_no); + } + if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) { + // (a='b') && (a!='c') -> 'b'='c' ? 'n' : a='b' + sym2 = e2->right.sym; + if ((e1->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) + return sym2 != e1->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) + : expr_alloc_symbol(&symbol_no); + } + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) + // (a!='y') && (a!='n') -> (a='m') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_mod); + + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && + ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || + (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) + // (a!='y') && (a!='m') -> (a='n') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_no); + + if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && + ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || + (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) + // (a!='m') && (a!='n') -> (a='m') + return expr_alloc_comp(E_EQUAL, sym1, &symbol_yes); + + if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) || + (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_mod) || + (e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_yes) || + (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_yes)) + return NULL; + } + + if (DEBUG_EXPR) { + printf("optimize ("); + expr_fprint(e1, stdout); + printf(") && ("); + expr_fprint(e2, stdout); + printf(")?\n"); + } + return NULL; +} + +static void expr_eliminate_dups1(enum expr_type type, struct expr **ep1, struct expr **ep2) +{ +#define e1 (*ep1) +#define e2 (*ep2) + struct expr *tmp; + + if (e1->type == type) { + expr_eliminate_dups1(type, &e1->left.expr, &e2); + expr_eliminate_dups1(type, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + expr_eliminate_dups1(type, &e1, &e2->left.expr); + expr_eliminate_dups1(type, &e1, &e2->right.expr); + return; + } + if (e1 == e2) + return; + + switch (e1->type) { + case E_OR: case E_AND: + expr_eliminate_dups1(e1->type, &e1, &e1); + default: + ; + } + + switch (type) { + case E_OR: + tmp = expr_join_or(e1, e2); + if (tmp) { + expr_free(e1); expr_free(e2); + e1 = expr_alloc_symbol(&symbol_no); + e2 = tmp; + trans_count++; + } + break; + case E_AND: + tmp = expr_join_and(e1, e2); + if (tmp) { + expr_free(e1); expr_free(e2); + e1 = expr_alloc_symbol(&symbol_yes); + e2 = tmp; + trans_count++; + } + break; + default: + ; + } +#undef e1 +#undef e2 +} + +static void expr_eliminate_dups2(enum expr_type type, struct expr **ep1, struct expr **ep2) +{ +#define e1 (*ep1) +#define e2 (*ep2) + struct expr *tmp, *tmp1, *tmp2; + + if (e1->type == type) { + expr_eliminate_dups2(type, &e1->left.expr, &e2); + expr_eliminate_dups2(type, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + expr_eliminate_dups2(type, &e1, &e2->left.expr); + expr_eliminate_dups2(type, &e1, &e2->right.expr); + } + if (e1 == e2) + return; + + switch (e1->type) { + case E_OR: + expr_eliminate_dups2(e1->type, &e1, &e1); + // (FOO || BAR) && (!FOO && !BAR) -> n + tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); + tmp2 = expr_copy(e2); + tmp = expr_extract_eq_and(&tmp1, &tmp2); + if (expr_is_yes(tmp1)) { + expr_free(e1); + e1 = expr_alloc_symbol(&symbol_no); + trans_count++; + } + expr_free(tmp2); + expr_free(tmp1); + expr_free(tmp); + break; + case E_AND: + expr_eliminate_dups2(e1->type, &e1, &e1); + // (FOO && BAR) || (!FOO || !BAR) -> y + tmp1 = expr_transform(expr_alloc_one(E_NOT, expr_copy(e1))); + tmp2 = expr_copy(e2); + tmp = expr_extract_eq_or(&tmp1, &tmp2); + if (expr_is_no(tmp1)) { + expr_free(e1); + e1 = expr_alloc_symbol(&symbol_yes); + trans_count++; + } + expr_free(tmp2); + expr_free(tmp1); + expr_free(tmp); + break; + default: + ; + } +#undef e1 +#undef e2 +} + +struct expr *expr_eliminate_dups(struct expr *e) +{ + int oldcount; + if (!e) + return e; + + oldcount = trans_count; + while (1) { + trans_count = 0; + switch (e->type) { + case E_OR: case E_AND: + expr_eliminate_dups1(e->type, &e, &e); + expr_eliminate_dups2(e->type, &e, &e); + default: + ; + } + if (!trans_count) + break; + e = expr_eliminate_yn(e); + } + trans_count = oldcount; + return e; +} + +struct expr *expr_transform(struct expr *e) +{ + struct expr *tmp; + + if (!e) + return NULL; + switch (e->type) { + case E_EQUAL: + case E_UNEQUAL: + case E_SYMBOL: + case E_LIST: + break; + default: + e->left.expr = expr_transform(e->left.expr); + e->right.expr = expr_transform(e->right.expr); + } + + switch (e->type) { + case E_EQUAL: + if (e->left.sym->type != S_BOOLEAN) + break; + if (e->right.sym == &symbol_no) { + e->type = E_NOT; + e->left.expr = expr_alloc_symbol(e->left.sym); + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_mod) { + printf("boolean symbol %s tested for 'm'? test forced to 'n'\n", e->left.sym->name); + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_yes) { + e->type = E_SYMBOL; + e->right.sym = NULL; + break; + } + break; + case E_UNEQUAL: + if (e->left.sym->type != S_BOOLEAN) + break; + if (e->right.sym == &symbol_no) { + e->type = E_SYMBOL; + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_mod) { + printf("boolean symbol %s tested for 'm'? test forced to 'y'\n", e->left.sym->name); + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + e->right.sym = NULL; + break; + } + if (e->right.sym == &symbol_yes) { + e->type = E_NOT; + e->left.expr = expr_alloc_symbol(e->left.sym); + e->right.sym = NULL; + break; + } + break; + case E_NOT: + switch (e->left.expr->type) { + case E_NOT: + // !!a -> a + tmp = e->left.expr->left.expr; + free(e->left.expr); + free(e); + e = tmp; + e = expr_transform(e); + break; + case E_EQUAL: + case E_UNEQUAL: + // !a='x' -> a!='x' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = e->type == E_EQUAL ? E_UNEQUAL : E_EQUAL; + break; + case E_OR: + // !(a || b) -> !a && !b + tmp = e->left.expr; + e->type = E_AND; + e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); + tmp->type = E_NOT; + tmp->right.expr = NULL; + e = expr_transform(e); + break; + case E_AND: + // !(a && b) -> !a || !b + tmp = e->left.expr; + e->type = E_OR; + e->right.expr = expr_alloc_one(E_NOT, tmp->right.expr); + tmp->type = E_NOT; + tmp->right.expr = NULL; + e = expr_transform(e); + break; + case E_SYMBOL: + if (e->left.expr->left.sym == &symbol_yes) { + // !'y' -> 'n' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = E_SYMBOL; + e->left.sym = &symbol_no; + break; + } + if (e->left.expr->left.sym == &symbol_mod) { + // !'m' -> 'm' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = E_SYMBOL; + e->left.sym = &symbol_mod; + break; + } + if (e->left.expr->left.sym == &symbol_no) { + // !'n' -> 'y' + tmp = e->left.expr; + free(e); + e = tmp; + e->type = E_SYMBOL; + e->left.sym = &symbol_yes; + break; + } + break; + default: + ; + } + break; + default: + ; + } + return e; +} + +int expr_contains_symbol(struct expr *dep, struct symbol *sym) +{ + if (!dep) + return 0; + + switch (dep->type) { + case E_AND: + case E_OR: + return expr_contains_symbol(dep->left.expr, sym) || + expr_contains_symbol(dep->right.expr, sym); + case E_SYMBOL: + return dep->left.sym == sym; + case E_EQUAL: + case E_UNEQUAL: + return dep->left.sym == sym || + dep->right.sym == sym; + case E_NOT: + return expr_contains_symbol(dep->left.expr, sym); + default: + ; + } + return 0; +} + +bool expr_depends_symbol(struct expr *dep, struct symbol *sym) +{ + if (!dep) + return false; + + switch (dep->type) { + case E_AND: + return expr_depends_symbol(dep->left.expr, sym) || + expr_depends_symbol(dep->right.expr, sym); + case E_SYMBOL: + return dep->left.sym == sym; + case E_EQUAL: + if (dep->left.sym == sym) { + if (dep->right.sym == &symbol_yes || dep->right.sym == &symbol_mod) + return true; + } + break; + case E_UNEQUAL: + if (dep->left.sym == sym) { + if (dep->right.sym == &symbol_no) + return true; + } + break; + default: + ; + } + return false; +} + +struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2) +{ + struct expr *tmp = NULL; + expr_extract_eq(E_AND, &tmp, ep1, ep2); + if (tmp) { + *ep1 = expr_eliminate_yn(*ep1); + *ep2 = expr_eliminate_yn(*ep2); + } + return tmp; +} + +struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2) +{ + struct expr *tmp = NULL; + expr_extract_eq(E_OR, &tmp, ep1, ep2); + if (tmp) { + *ep1 = expr_eliminate_yn(*ep1); + *ep2 = expr_eliminate_yn(*ep2); + } + return tmp; +} + +void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2) +{ +#define e1 (*ep1) +#define e2 (*ep2) + if (e1->type == type) { + expr_extract_eq(type, ep, &e1->left.expr, &e2); + expr_extract_eq(type, ep, &e1->right.expr, &e2); + return; + } + if (e2->type == type) { + expr_extract_eq(type, ep, ep1, &e2->left.expr); + expr_extract_eq(type, ep, ep1, &e2->right.expr); + return; + } + if (expr_eq(e1, e2)) { + *ep = *ep ? expr_alloc_two(type, *ep, e1) : e1; + expr_free(e2); + if (type == E_AND) { + e1 = expr_alloc_symbol(&symbol_yes); + e2 = expr_alloc_symbol(&symbol_yes); + } else if (type == E_OR) { + e1 = expr_alloc_symbol(&symbol_no); + e2 = expr_alloc_symbol(&symbol_no); + } + } +#undef e1 +#undef e2 +} + +struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym) +{ + struct expr *e1, *e2; + + if (!e) { + e = expr_alloc_symbol(sym); + if (type == E_UNEQUAL) + e = expr_alloc_one(E_NOT, e); + return e; + } + switch (e->type) { + case E_AND: + e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym); + e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); + if (sym == &symbol_yes) + e = expr_alloc_two(E_AND, e1, e2); + if (sym == &symbol_no) + e = expr_alloc_two(E_OR, e1, e2); + if (type == E_UNEQUAL) + e = expr_alloc_one(E_NOT, e); + return e; + case E_OR: + e1 = expr_trans_compare(e->left.expr, E_EQUAL, sym); + e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); + if (sym == &symbol_yes) + e = expr_alloc_two(E_OR, e1, e2); + if (sym == &symbol_no) + e = expr_alloc_two(E_AND, e1, e2); + if (type == E_UNEQUAL) + e = expr_alloc_one(E_NOT, e); + return e; + case E_NOT: + return expr_trans_compare(e->left.expr, type == E_EQUAL ? E_UNEQUAL : E_EQUAL, sym); + case E_UNEQUAL: + case E_EQUAL: + if (type == E_EQUAL) { + if (sym == &symbol_yes) + return expr_copy(e); + if (sym == &symbol_mod) + return expr_alloc_symbol(&symbol_no); + if (sym == &symbol_no) + return expr_alloc_one(E_NOT, expr_copy(e)); + } else { + if (sym == &symbol_yes) + return expr_alloc_one(E_NOT, expr_copy(e)); + if (sym == &symbol_mod) + return expr_alloc_symbol(&symbol_yes); + if (sym == &symbol_no) + return expr_copy(e); + } + break; + case E_SYMBOL: + return expr_alloc_comp(type, e->left.sym, sym); + case E_LIST: + case E_RANGE: + case E_NONE: + /* panic */; + } + return NULL; +} + +tristate expr_calc_value(struct expr *e) +{ + tristate val1, val2; + const char *str1, *str2; + + if (!e) + return yes; + + switch (e->type) { + case E_SYMBOL: + sym_calc_value(e->left.sym); + return e->left.sym->curr.tri; + case E_AND: + val1 = expr_calc_value(e->left.expr); + val2 = expr_calc_value(e->right.expr); + return EXPR_AND(val1, val2); + case E_OR: + val1 = expr_calc_value(e->left.expr); + val2 = expr_calc_value(e->right.expr); + return EXPR_OR(val1, val2); + case E_NOT: + val1 = expr_calc_value(e->left.expr); + return EXPR_NOT(val1); + case E_EQUAL: + sym_calc_value(e->left.sym); + sym_calc_value(e->right.sym); + str1 = sym_get_string_value(e->left.sym); + str2 = sym_get_string_value(e->right.sym); + return !strcmp(str1, str2) ? yes : no; + case E_UNEQUAL: + sym_calc_value(e->left.sym); + sym_calc_value(e->right.sym); + str1 = sym_get_string_value(e->left.sym); + str2 = sym_get_string_value(e->right.sym); + return !strcmp(str1, str2) ? no : yes; + default: + printf("expr_calc_value: %d?\n", e->type); + return no; + } +} + +int expr_compare_type(enum expr_type t1, enum expr_type t2) +{ +#if 0 + return 1; +#else + if (t1 == t2) + return 0; + switch (t1) { + case E_EQUAL: + case E_UNEQUAL: + if (t2 == E_NOT) + return 1; + case E_NOT: + if (t2 == E_AND) + return 1; + case E_AND: + if (t2 == E_OR) + return 1; + case E_OR: + if (t2 == E_LIST) + return 1; + case E_LIST: + if (t2 == 0) + return 1; + default: + return -1; + } + printf("[%dgt%d?]", t1, t2); + return 0; +#endif +} + +static inline struct expr * +expr_get_leftmost_symbol(const struct expr *e) +{ + + if (e == NULL) + return NULL; + + while (e->type != E_SYMBOL) + e = e->left.expr; + + return expr_copy(e); +} + +/* + * Given expression `e1' and `e2', returns the leaf of the longest + * sub-expression of `e1' not containing 'e2. + */ +struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2) +{ + struct expr *ret; + + switch (e1->type) { + case E_OR: + return expr_alloc_and( + expr_simplify_unmet_dep(e1->left.expr, e2), + expr_simplify_unmet_dep(e1->right.expr, e2)); + case E_AND: { + struct expr *e; + e = expr_alloc_and(expr_copy(e1), expr_copy(e2)); + e = expr_eliminate_dups(e); + ret = (!expr_eq(e, e1)) ? e1 : NULL; + expr_free(e); + break; + } + default: + ret = e1; + break; + } + + return expr_get_leftmost_symbol(ret); +} + +void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken) +{ + if (!e) { + fn(data, NULL, "y"); + return; + } + + if (expr_compare_type(prevtoken, e->type) > 0) + fn(data, NULL, "("); + switch (e->type) { + case E_SYMBOL: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, ""); + break; + case E_NOT: + fn(data, NULL, "!"); + expr_print(e->left.expr, fn, data, E_NOT); + break; + case E_EQUAL: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, ""); + fn(data, NULL, "="); + fn(data, e->right.sym, e->right.sym->name); + break; + case E_UNEQUAL: + if (e->left.sym->name) + fn(data, e->left.sym, e->left.sym->name); + else + fn(data, NULL, ""); + fn(data, NULL, "!="); + fn(data, e->right.sym, e->right.sym->name); + break; + case E_OR: + expr_print(e->left.expr, fn, data, E_OR); + fn(data, NULL, " || "); + expr_print(e->right.expr, fn, data, E_OR); + break; + case E_AND: + expr_print(e->left.expr, fn, data, E_AND); + fn(data, NULL, " && "); + expr_print(e->right.expr, fn, data, E_AND); + break; + case E_LIST: + fn(data, e->right.sym, e->right.sym->name); + if (e->left.expr) { + fn(data, NULL, " ^ "); + expr_print(e->left.expr, fn, data, E_LIST); + } + break; + case E_RANGE: + fn(data, NULL, "["); + fn(data, e->left.sym, e->left.sym->name); + fn(data, NULL, " "); + fn(data, e->right.sym, e->right.sym->name); + fn(data, NULL, "]"); + break; + default: + { + char buf[32]; + sprintf(buf, "", e->type); + fn(data, NULL, buf); + break; + } + } + if (expr_compare_type(prevtoken, e->type) > 0) + fn(data, NULL, ")"); +} + +static void expr_print_file_helper(void *data, struct symbol *sym, const char *str) +{ + xfwrite(str, strlen(str), 1, data); +} + +void expr_fprint(struct expr *e, FILE *out) +{ + expr_print(e, expr_print_file_helper, out, E_NONE); +} + +static void expr_print_gstr_helper(void *data, struct symbol *sym, const char *str) +{ + struct gstr *gs = (struct gstr*)data; + const char *sym_str = NULL; + + if (sym) + sym_str = sym_get_string_value(sym); + + if (gs->max_width) { + unsigned extra_length = strlen(str); + const char *last_cr = strrchr(gs->s, '\n'); + unsigned last_line_length; + + if (sym_str) + extra_length += 4 + strlen(sym_str); + + if (!last_cr) + last_cr = gs->s; + + last_line_length = strlen(gs->s) - (last_cr - gs->s); + + if ((last_line_length + extra_length) > gs->max_width) + str_append(gs, "\\\n"); + } + + str_append(gs, str); + if (sym && sym->type != S_UNKNOWN) + str_printf(gs, " [=%s]", sym_str); +} + +void expr_gstr_print(struct expr *e, struct gstr *gs) +{ + expr_print(e, expr_print_gstr_helper, gs, E_NONE); +} diff --git a/support/kconfig/expr.h b/support/kconfig/expr.h new file mode 100644 index 0000000000..ba663e1dc7 --- /dev/null +++ b/support/kconfig/expr.h @@ -0,0 +1,238 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#ifndef EXPR_H +#define EXPR_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include "list.h" +#ifndef __cplusplus +#include +#endif + +struct file { + struct file *next; + struct file *parent; + const char *name; + int lineno; +}; + +typedef enum tristate { + no, mod, yes +} tristate; + +enum expr_type { + E_NONE, E_OR, E_AND, E_NOT, E_EQUAL, E_UNEQUAL, E_LIST, E_SYMBOL, E_RANGE +}; + +union expr_data { + struct expr *expr; + struct symbol *sym; +}; + +struct expr { + enum expr_type type; + union expr_data left, right; +}; + +#define EXPR_OR(dep1, dep2) (((dep1)>(dep2))?(dep1):(dep2)) +#define EXPR_AND(dep1, dep2) (((dep1)<(dep2))?(dep1):(dep2)) +#define EXPR_NOT(dep) (2-(dep)) + +#define expr_list_for_each_sym(l, e, s) \ + for (e = (l); e && (s = e->right.sym); e = e->left.expr) + +struct expr_value { + struct expr *expr; + tristate tri; +}; + +struct symbol_value { + void *val; + tristate tri; +}; + +enum symbol_type { + S_UNKNOWN, S_BOOLEAN, S_TRISTATE, S_INT, S_HEX, S_STRING, S_OTHER +}; + +/* enum values are used as index to symbol.def[] */ +enum { + S_DEF_USER, /* main user value */ + S_DEF_AUTO, /* values read from auto.conf */ + S_DEF_DEF3, /* Reserved for UI usage */ + S_DEF_DEF4, /* Reserved for UI usage */ + S_DEF_COUNT +}; + +struct symbol { + struct symbol *next; + char *name; + enum symbol_type type; + struct symbol_value curr; + struct symbol_value def[S_DEF_COUNT]; + tristate visible; + int flags; + struct property *prop; + struct expr_value dir_dep; + struct expr_value rev_dep; +}; + +#define for_all_symbols(i, sym) for (i = 0; i < SYMBOL_HASHSIZE; i++) for (sym = symbol_hash[i]; sym; sym = sym->next) if (sym->type != S_OTHER) + +#define SYMBOL_CONST 0x0001 /* symbol is const */ +#define SYMBOL_CHECK 0x0008 /* used during dependency checking */ +#define SYMBOL_CHOICE 0x0010 /* start of a choice block (null name) */ +#define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */ +#define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */ +#define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */ +#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */ +#define SYMBOL_CHANGED 0x0400 /* ? */ +#define SYMBOL_AUTO 0x1000 /* value from environment variable */ +#define SYMBOL_CHECKED 0x2000 /* used during dependency checking */ +#define SYMBOL_WARNED 0x8000 /* warning has been issued */ + +/* Set when symbol.def[] is used */ +#define SYMBOL_DEF 0x10000 /* First bit of SYMBOL_DEF */ +#define SYMBOL_DEF_USER 0x10000 /* symbol.def[S_DEF_USER] is valid */ +#define SYMBOL_DEF_AUTO 0x20000 /* symbol.def[S_DEF_AUTO] is valid */ +#define SYMBOL_DEF3 0x40000 /* symbol.def[S_DEF_3] is valid */ +#define SYMBOL_DEF4 0x80000 /* symbol.def[S_DEF_4] is valid */ + +/* choice values need to be set before calculating this symbol value */ +#define SYMBOL_NEED_SET_CHOICE_VALUES 0x100000 + +#define SYMBOL_MAXLENGTH 256 +#define SYMBOL_HASHSIZE 9973 + +/* A property represent the config options that can be associated + * with a config "symbol". + * Sample: + * config FOO + * default y + * prompt "foo prompt" + * select BAR + * config BAZ + * int "BAZ Value" + * range 1..255 + */ +enum prop_type { + P_UNKNOWN, + P_PROMPT, /* prompt "foo prompt" or "BAZ Value" */ + P_COMMENT, /* text associated with a comment */ + P_MENU, /* prompt associated with a menuconfig option */ + P_DEFAULT, /* default y */ + P_CHOICE, /* choice value */ + P_SELECT, /* select BAR */ + P_RANGE, /* range 7..100 (for a symbol) */ + P_ENV, /* value from environment variable */ + P_SYMBOL, /* where a symbol is defined */ +}; + +struct property { + struct property *next; /* next property - null if last */ + struct symbol *sym; /* the symbol for which the property is associated */ + enum prop_type type; /* type of property */ + const char *text; /* the prompt value - P_PROMPT, P_MENU, P_COMMENT */ + struct expr_value visible; + struct expr *expr; /* the optional conditional part of the property */ + struct menu *menu; /* the menu the property are associated with + * valid for: P_SELECT, P_RANGE, P_CHOICE, + * P_PROMPT, P_DEFAULT, P_MENU, P_COMMENT */ + struct file *file; /* what file was this property defined */ + int lineno; /* what lineno was this property defined */ +}; + +#define for_all_properties(sym, st, tok) \ + for (st = sym->prop; st; st = st->next) \ + if (st->type == (tok)) +#define for_all_defaults(sym, st) for_all_properties(sym, st, P_DEFAULT) +#define for_all_choices(sym, st) for_all_properties(sym, st, P_CHOICE) +#define for_all_prompts(sym, st) \ + for (st = sym->prop; st; st = st->next) \ + if (st->text) + +struct menu { + struct menu *next; + struct menu *parent; + struct menu *list; + struct symbol *sym; + struct property *prompt; + struct expr *visibility; + struct expr *dep; + unsigned int flags; + char *help; + struct file *file; + int lineno; + void *data; +}; + +#define MENU_CHANGED 0x0001 +#define MENU_ROOT 0x0002 + +struct jump_key { + struct list_head entries; + size_t offset; + struct menu *target; + int index; +}; + +#define JUMP_NB 9 + +extern struct file *file_list; +extern struct file *current_file; +struct file *lookup_file(const char *name); + +extern struct symbol symbol_yes, symbol_no, symbol_mod; +extern struct symbol *modules_sym; +extern struct symbol *sym_defconfig_list; +extern int cdebug; +struct expr *expr_alloc_symbol(struct symbol *sym); +struct expr *expr_alloc_one(enum expr_type type, struct expr *ce); +struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2); +struct expr *expr_alloc_comp(enum expr_type type, struct symbol *s1, struct symbol *s2); +struct expr *expr_alloc_and(struct expr *e1, struct expr *e2); +struct expr *expr_alloc_or(struct expr *e1, struct expr *e2); +struct expr *expr_copy(const struct expr *org); +void expr_free(struct expr *e); +int expr_eq(struct expr *e1, struct expr *e2); +void expr_eliminate_eq(struct expr **ep1, struct expr **ep2); +tristate expr_calc_value(struct expr *e); +struct expr *expr_eliminate_yn(struct expr *e); +struct expr *expr_trans_bool(struct expr *e); +struct expr *expr_eliminate_dups(struct expr *e); +struct expr *expr_transform(struct expr *e); +int expr_contains_symbol(struct expr *dep, struct symbol *sym); +bool expr_depends_symbol(struct expr *dep, struct symbol *sym); +struct expr *expr_extract_eq_and(struct expr **ep1, struct expr **ep2); +struct expr *expr_extract_eq_or(struct expr **ep1, struct expr **ep2); +void expr_extract_eq(enum expr_type type, struct expr **ep, struct expr **ep1, struct expr **ep2); +struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symbol *sym); +struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2); + +void expr_fprint(struct expr *e, FILE *out); +struct gstr; /* forward */ +void expr_gstr_print(struct expr *e, struct gstr *gs); + +static inline int expr_is_yes(struct expr *e) +{ + return !e || (e->type == E_SYMBOL && e->left.sym == &symbol_yes); +} + +static inline int expr_is_no(struct expr *e) +{ + return e && (e->type == E_SYMBOL && e->left.sym == &symbol_no); +} + +#ifdef __cplusplus +} +#endif + +#endif /* EXPR_H */ diff --git a/support/kconfig/foo.h b/support/kconfig/foo.h new file mode 100644 index 0000000000..b9cfdf8312 --- /dev/null +++ b/support/kconfig/foo.h @@ -0,0 +1,12 @@ +#ifndef __KCONFIG_FOO_H +#define __KCONFIG_FOO_H + +#ifndef __APPLE__ +#include +#endif +#include + +#ifndef PATH_MAX +#define PATH_MAX 1024 +#endif +#endif /* __KCONFIG_FOO_H */ diff --git a/support/kconfig/gconf.c b/support/kconfig/gconf.c new file mode 100644 index 0000000000..7cbe68eb01 --- /dev/null +++ b/support/kconfig/gconf.c @@ -0,0 +1,1542 @@ +/* Hey EMACS -*- linux-c -*- */ +/* + * + * Copyright (C) 2002-2003 Romain Lievin + * Released under the terms of the GNU GPL v2.0. + * + */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include "lkc.h" +#include "images.c" + +#include +#include +#include +#include + +#include +#include +#include +#include + +//#define DEBUG + +enum { + SINGLE_VIEW, SPLIT_VIEW, FULL_VIEW +}; + +enum { + OPT_NORMAL, OPT_ALL, OPT_PROMPT +}; + +static gint view_mode = FULL_VIEW; +static gboolean show_name = TRUE; +static gboolean show_range = TRUE; +static gboolean show_value = TRUE; +static gboolean resizeable = FALSE; +static int opt_mode = OPT_NORMAL; + +GtkWidget *main_wnd = NULL; +GtkWidget *tree1_w = NULL; // left frame +GtkWidget *tree2_w = NULL; // right frame +GtkWidget *text_w = NULL; +GtkWidget *hpaned = NULL; +GtkWidget *vpaned = NULL; +GtkWidget *back_btn = NULL; +GtkWidget *save_btn = NULL; +GtkWidget *save_menu_item = NULL; + +GtkTextTag *tag1, *tag2; +GdkColor color; + +GtkTreeStore *tree1, *tree2, *tree; +GtkTreeModel *model1, *model2; +static GtkTreeIter *parents[256]; +static gint indent; + +static struct menu *current; // current node for SINGLE view +static struct menu *browsed; // browsed node for SPLIT view + +enum { + COL_OPTION, COL_NAME, COL_NO, COL_MOD, COL_YES, COL_VALUE, + COL_MENU, COL_COLOR, COL_EDIT, COL_PIXBUF, + COL_PIXVIS, COL_BTNVIS, COL_BTNACT, COL_BTNINC, COL_BTNRAD, + COL_NUMBER +}; + +static void display_list(void); +static void display_tree(struct menu *menu); +static void display_tree_part(void); +static void update_tree(struct menu *src, GtkTreeIter * dst); +static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row); +static gchar **fill_row(struct menu *menu); +static void conf_changed(void); + +/* Helping/Debugging Functions */ + +const char *dbg_sym_flags(int val) +{ + static char buf[256]; + + bzero(buf, 256); + + if (val & SYMBOL_CONST) + strcat(buf, "const/"); + if (val & SYMBOL_CHECK) + strcat(buf, "check/"); + if (val & SYMBOL_CHOICE) + strcat(buf, "choice/"); + if (val & SYMBOL_CHOICEVAL) + strcat(buf, "choiceval/"); + if (val & SYMBOL_VALID) + strcat(buf, "valid/"); + if (val & SYMBOL_OPTIONAL) + strcat(buf, "optional/"); + if (val & SYMBOL_WRITE) + strcat(buf, "write/"); + if (val & SYMBOL_CHANGED) + strcat(buf, "changed/"); + if (val & SYMBOL_AUTO) + strcat(buf, "auto/"); + + buf[strlen(buf) - 1] = '\0'; + + return buf; +} + +void replace_button_icon(GladeXML * xml, GdkDrawable * window, + GtkStyle * style, gchar * btn_name, gchar ** xpm) +{ + GdkPixmap *pixmap; + GdkBitmap *mask; + GtkToolButton *button; + GtkWidget *image; + + pixmap = gdk_pixmap_create_from_xpm_d(window, &mask, + &style->bg[GTK_STATE_NORMAL], + xpm); + + button = GTK_TOOL_BUTTON(glade_xml_get_widget(xml, btn_name)); + image = gtk_image_new_from_pixmap(pixmap, mask); + gtk_widget_show(image); + gtk_tool_button_set_icon_widget(button, image); +} + +/* Main Window Initialization */ +void init_main_window(const gchar * glade_file) +{ + GladeXML *xml; + GtkWidget *widget; + GtkTextBuffer *txtbuf; + GtkStyle *style; + + xml = glade_xml_new(glade_file, "window1", NULL); + if (!xml) + g_error(_("GUI loading failed !\n")); + glade_xml_signal_autoconnect(xml); + + main_wnd = glade_xml_get_widget(xml, "window1"); + hpaned = glade_xml_get_widget(xml, "hpaned1"); + vpaned = glade_xml_get_widget(xml, "vpaned1"); + tree1_w = glade_xml_get_widget(xml, "treeview1"); + tree2_w = glade_xml_get_widget(xml, "treeview2"); + text_w = glade_xml_get_widget(xml, "textview3"); + + back_btn = glade_xml_get_widget(xml, "button1"); + gtk_widget_set_sensitive(back_btn, FALSE); + + widget = glade_xml_get_widget(xml, "show_name1"); + gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget, + show_name); + + widget = glade_xml_get_widget(xml, "show_range1"); + gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget, + show_range); + + widget = glade_xml_get_widget(xml, "show_data1"); + gtk_check_menu_item_set_active((GtkCheckMenuItem *) widget, + show_value); + + save_btn = glade_xml_get_widget(xml, "button3"); + save_menu_item = glade_xml_get_widget(xml, "save1"); + conf_set_changed_callback(conf_changed); + + style = gtk_widget_get_style(main_wnd); + widget = glade_xml_get_widget(xml, "toolbar1"); + +#if 0 /* Use stock Gtk icons instead */ + replace_button_icon(xml, main_wnd->window, style, + "button1", (gchar **) xpm_back); + replace_button_icon(xml, main_wnd->window, style, + "button2", (gchar **) xpm_load); + replace_button_icon(xml, main_wnd->window, style, + "button3", (gchar **) xpm_save); +#endif + replace_button_icon(xml, main_wnd->window, style, + "button4", (gchar **) xpm_single_view); + replace_button_icon(xml, main_wnd->window, style, + "button5", (gchar **) xpm_split_view); + replace_button_icon(xml, main_wnd->window, style, + "button6", (gchar **) xpm_tree_view); + +#if 0 + switch (view_mode) { + case SINGLE_VIEW: + widget = glade_xml_get_widget(xml, "button4"); + g_signal_emit_by_name(widget, "clicked"); + break; + case SPLIT_VIEW: + widget = glade_xml_get_widget(xml, "button5"); + g_signal_emit_by_name(widget, "clicked"); + break; + case FULL_VIEW: + widget = glade_xml_get_widget(xml, "button6"); + g_signal_emit_by_name(widget, "clicked"); + break; + } +#endif + txtbuf = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); + tag1 = gtk_text_buffer_create_tag(txtbuf, "mytag1", + "foreground", "red", + "weight", PANGO_WEIGHT_BOLD, + NULL); + tag2 = gtk_text_buffer_create_tag(txtbuf, "mytag2", + /*"style", PANGO_STYLE_OBLIQUE, */ + NULL); + + gtk_window_set_title(GTK_WINDOW(main_wnd), rootmenu.prompt->text); + + gtk_widget_show(main_wnd); +} + +void init_tree_model(void) +{ + gint i; + + tree = tree2 = gtk_tree_store_new(COL_NUMBER, + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_POINTER, GDK_TYPE_COLOR, + G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF, + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, + G_TYPE_BOOLEAN); + model2 = GTK_TREE_MODEL(tree2); + + for (parents[0] = NULL, i = 1; i < 256; i++) + parents[i] = (GtkTreeIter *) g_malloc(sizeof(GtkTreeIter)); + + tree1 = gtk_tree_store_new(COL_NUMBER, + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_POINTER, GDK_TYPE_COLOR, + G_TYPE_BOOLEAN, GDK_TYPE_PIXBUF, + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, + G_TYPE_BOOLEAN); + model1 = GTK_TREE_MODEL(tree1); +} + +void init_left_tree(void) +{ + GtkTreeView *view = GTK_TREE_VIEW(tree1_w); + GtkCellRenderer *renderer; + GtkTreeSelection *sel; + GtkTreeViewColumn *column; + + gtk_tree_view_set_model(view, model1); + gtk_tree_view_set_headers_visible(view, TRUE); + gtk_tree_view_set_rules_hint(view, TRUE); + + column = gtk_tree_view_column_new(); + gtk_tree_view_append_column(view, column); + gtk_tree_view_column_set_title(column, _("Options")); + + renderer = gtk_cell_renderer_toggle_new(); + gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), + renderer, FALSE); + gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), + renderer, + "active", COL_BTNACT, + "inconsistent", COL_BTNINC, + "visible", COL_BTNVIS, + "radio", COL_BTNRAD, NULL); + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), + renderer, FALSE); + gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), + renderer, + "text", COL_OPTION, + "foreground-gdk", + COL_COLOR, NULL); + + sel = gtk_tree_view_get_selection(view); + gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); + gtk_widget_realize(tree1_w); +} + +static void renderer_edited(GtkCellRendererText * cell, + const gchar * path_string, + const gchar * new_text, gpointer user_data); + +void init_right_tree(void) +{ + GtkTreeView *view = GTK_TREE_VIEW(tree2_w); + GtkCellRenderer *renderer; + GtkTreeSelection *sel; + GtkTreeViewColumn *column; + gint i; + + gtk_tree_view_set_model(view, model2); + gtk_tree_view_set_headers_visible(view, TRUE); + gtk_tree_view_set_rules_hint(view, TRUE); + + column = gtk_tree_view_column_new(); + gtk_tree_view_append_column(view, column); + gtk_tree_view_column_set_title(column, _("Options")); + + renderer = gtk_cell_renderer_pixbuf_new(); + gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), + renderer, FALSE); + gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), + renderer, + "pixbuf", COL_PIXBUF, + "visible", COL_PIXVIS, NULL); + renderer = gtk_cell_renderer_toggle_new(); + gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), + renderer, FALSE); + gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), + renderer, + "active", COL_BTNACT, + "inconsistent", COL_BTNINC, + "visible", COL_BTNVIS, + "radio", COL_BTNRAD, NULL); + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_column_pack_start(GTK_TREE_VIEW_COLUMN(column), + renderer, FALSE); + gtk_tree_view_column_set_attributes(GTK_TREE_VIEW_COLUMN(column), + renderer, + "text", COL_OPTION, + "foreground-gdk", + COL_COLOR, NULL); + + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_insert_column_with_attributes(view, -1, + _("Name"), renderer, + "text", COL_NAME, + "foreground-gdk", + COL_COLOR, NULL); + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_insert_column_with_attributes(view, -1, + "N", renderer, + "text", COL_NO, + "foreground-gdk", + COL_COLOR, NULL); + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_insert_column_with_attributes(view, -1, + "M", renderer, + "text", COL_MOD, + "foreground-gdk", + COL_COLOR, NULL); + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_insert_column_with_attributes(view, -1, + "Y", renderer, + "text", COL_YES, + "foreground-gdk", + COL_COLOR, NULL); + renderer = gtk_cell_renderer_text_new(); + gtk_tree_view_insert_column_with_attributes(view, -1, + _("Value"), renderer, + "text", COL_VALUE, + "editable", + COL_EDIT, + "foreground-gdk", + COL_COLOR, NULL); + g_signal_connect(G_OBJECT(renderer), "edited", + G_CALLBACK(renderer_edited), NULL); + + column = gtk_tree_view_get_column(view, COL_NAME); + gtk_tree_view_column_set_visible(column, show_name); + column = gtk_tree_view_get_column(view, COL_NO); + gtk_tree_view_column_set_visible(column, show_range); + column = gtk_tree_view_get_column(view, COL_MOD); + gtk_tree_view_column_set_visible(column, show_range); + column = gtk_tree_view_get_column(view, COL_YES); + gtk_tree_view_column_set_visible(column, show_range); + column = gtk_tree_view_get_column(view, COL_VALUE); + gtk_tree_view_column_set_visible(column, show_value); + + if (resizeable) { + for (i = 0; i < COL_VALUE; i++) { + column = gtk_tree_view_get_column(view, i); + gtk_tree_view_column_set_resizable(column, TRUE); + } + } + + sel = gtk_tree_view_get_selection(view); + gtk_tree_selection_set_mode(sel, GTK_SELECTION_SINGLE); +} + + +/* Utility Functions */ + + +static void text_insert_help(struct menu *menu) +{ + GtkTextBuffer *buffer; + GtkTextIter start, end; + const char *prompt = _(menu_get_prompt(menu)); + struct gstr help = str_new(); + + menu_get_ext_help(menu, &help); + + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); + gtk_text_buffer_get_bounds(buffer, &start, &end); + gtk_text_buffer_delete(buffer, &start, &end); + gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text_w), 15); + + gtk_text_buffer_get_end_iter(buffer, &end); + gtk_text_buffer_insert_with_tags(buffer, &end, prompt, -1, tag1, + NULL); + gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2); + gtk_text_buffer_get_end_iter(buffer, &end); + gtk_text_buffer_insert_with_tags(buffer, &end, str_get(&help), -1, tag2, + NULL); + str_free(&help); +} + + +static void text_insert_msg(const char *title, const char *message) +{ + GtkTextBuffer *buffer; + GtkTextIter start, end; + const char *msg = message; + + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_w)); + gtk_text_buffer_get_bounds(buffer, &start, &end); + gtk_text_buffer_delete(buffer, &start, &end); + gtk_text_view_set_left_margin(GTK_TEXT_VIEW(text_w), 15); + + gtk_text_buffer_get_end_iter(buffer, &end); + gtk_text_buffer_insert_with_tags(buffer, &end, title, -1, tag1, + NULL); + gtk_text_buffer_insert_at_cursor(buffer, "\n\n", 2); + gtk_text_buffer_get_end_iter(buffer, &end); + gtk_text_buffer_insert_with_tags(buffer, &end, msg, -1, tag2, + NULL); +} + + +/* Main Windows Callbacks */ + +void on_save_activate(GtkMenuItem * menuitem, gpointer user_data); +gboolean on_window1_delete_event(GtkWidget * widget, GdkEvent * event, + gpointer user_data) +{ + GtkWidget *dialog, *label; + gint result; + + if (!conf_get_changed()) + return FALSE; + + dialog = gtk_dialog_new_with_buttons(_("Warning !"), + GTK_WINDOW(main_wnd), + (GtkDialogFlags) + (GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT), + GTK_STOCK_OK, + GTK_RESPONSE_YES, + GTK_STOCK_NO, + GTK_RESPONSE_NO, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, NULL); + gtk_dialog_set_default_response(GTK_DIALOG(dialog), + GTK_RESPONSE_CANCEL); + + label = gtk_label_new(_("\nSave configuration ?\n")); + gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), label); + gtk_widget_show(label); + + result = gtk_dialog_run(GTK_DIALOG(dialog)); + switch (result) { + case GTK_RESPONSE_YES: + on_save_activate(NULL, NULL); + return FALSE; + case GTK_RESPONSE_NO: + return FALSE; + case GTK_RESPONSE_CANCEL: + case GTK_RESPONSE_DELETE_EVENT: + default: + gtk_widget_destroy(dialog); + return TRUE; + } + + return FALSE; +} + + +void on_window1_destroy(GtkObject * object, gpointer user_data) +{ + gtk_main_quit(); +} + + +void +on_window1_size_request(GtkWidget * widget, + GtkRequisition * requisition, gpointer user_data) +{ + static gint old_h; + gint w, h; + + if (widget->window == NULL) + gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h); + else + gdk_window_get_size(widget->window, &w, &h); + + if (h == old_h) + return; + old_h = h; + + gtk_paned_set_position(GTK_PANED(vpaned), 2 * h / 3); +} + + +/* Menu & Toolbar Callbacks */ + + +static void +load_filename(GtkFileSelection * file_selector, gpointer user_data) +{ + const gchar *fn; + + fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION + (user_data)); + + if (conf_read(fn)) + text_insert_msg(_("Error"), _("Unable to load configuration !")); + else + display_tree(&rootmenu); +} + +void on_load1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkWidget *fs; + + fs = gtk_file_selection_new(_("Load file...")); + g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), + "clicked", + G_CALLBACK(load_filename), (gpointer) fs); + g_signal_connect_swapped(GTK_OBJECT + (GTK_FILE_SELECTION(fs)->ok_button), + "clicked", G_CALLBACK(gtk_widget_destroy), + (gpointer) fs); + g_signal_connect_swapped(GTK_OBJECT + (GTK_FILE_SELECTION(fs)->cancel_button), + "clicked", G_CALLBACK(gtk_widget_destroy), + (gpointer) fs); + gtk_widget_show(fs); +} + + +void on_save_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + if (conf_write(NULL)) + text_insert_msg(_("Error"), _("Unable to save configuration !")); +} + + +static void +store_filename(GtkFileSelection * file_selector, gpointer user_data) +{ + const gchar *fn; + + fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION + (user_data)); + + if (conf_write(fn)) + text_insert_msg(_("Error"), _("Unable to save configuration !")); + + gtk_widget_destroy(GTK_WIDGET(user_data)); +} + +void on_save_as1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkWidget *fs; + + fs = gtk_file_selection_new(_("Save file as...")); + g_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(fs)->ok_button), + "clicked", + G_CALLBACK(store_filename), (gpointer) fs); + g_signal_connect_swapped(GTK_OBJECT + (GTK_FILE_SELECTION(fs)->ok_button), + "clicked", G_CALLBACK(gtk_widget_destroy), + (gpointer) fs); + g_signal_connect_swapped(GTK_OBJECT + (GTK_FILE_SELECTION(fs)->cancel_button), + "clicked", G_CALLBACK(gtk_widget_destroy), + (gpointer) fs); + gtk_widget_show(fs); +} + + +void on_quit1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + if (!on_window1_delete_event(NULL, NULL, NULL)) + gtk_widget_destroy(GTK_WIDGET(main_wnd)); +} + + +void on_show_name1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkTreeViewColumn *col; + + show_name = GTK_CHECK_MENU_ITEM(menuitem)->active; + col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_NAME); + if (col) + gtk_tree_view_column_set_visible(col, show_name); +} + + +void on_show_range1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkTreeViewColumn *col; + + show_range = GTK_CHECK_MENU_ITEM(menuitem)->active; + col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_NO); + if (col) + gtk_tree_view_column_set_visible(col, show_range); + col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_MOD); + if (col) + gtk_tree_view_column_set_visible(col, show_range); + col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_YES); + if (col) + gtk_tree_view_column_set_visible(col, show_range); + +} + + +void on_show_data1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkTreeViewColumn *col; + + show_value = GTK_CHECK_MENU_ITEM(menuitem)->active; + col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), COL_VALUE); + if (col) + gtk_tree_view_column_set_visible(col, show_value); +} + + +void +on_set_option_mode1_activate(GtkMenuItem *menuitem, gpointer user_data) +{ + opt_mode = OPT_NORMAL; + gtk_tree_store_clear(tree2); + display_tree(&rootmenu); /* instead of update_tree to speed-up */ +} + + +void +on_set_option_mode2_activate(GtkMenuItem *menuitem, gpointer user_data) +{ + opt_mode = OPT_ALL; + gtk_tree_store_clear(tree2); + display_tree(&rootmenu); /* instead of update_tree to speed-up */ +} + + +void +on_set_option_mode3_activate(GtkMenuItem *menuitem, gpointer user_data) +{ + opt_mode = OPT_PROMPT; + gtk_tree_store_clear(tree2); + display_tree(&rootmenu); /* instead of update_tree to speed-up */ +} + + +void on_introduction1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkWidget *dialog; + const gchar *intro_text = _( + "Welcome to gkc, the GTK+ graphical configuration tool\n" + "For each option, a blank box indicates the feature is disabled, a\n" + "check indicates it is enabled, and a dot indicates that it is to\n" + "be compiled as a module. Clicking on the box will cycle through the three states.\n" + "\n" + "If you do not see an option (e.g., a device driver) that you\n" + "believe should be present, try turning on Show All Options\n" + "under the Options menu.\n" + "Although there is no cross reference yet to help you figure out\n" + "what other options must be enabled to support the option you\n" + "are interested in, you can still view the help of a grayed-out\n" + "option.\n" + "\n" + "Toggling Show Debug Info under the Options menu will show \n" + "the dependencies, which you can then match by examining other options."); + + dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_CLOSE, "%s", intro_text); + g_signal_connect_swapped(GTK_OBJECT(dialog), "response", + G_CALLBACK(gtk_widget_destroy), + GTK_OBJECT(dialog)); + gtk_widget_show_all(dialog); +} + + +void on_about1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkWidget *dialog; + const gchar *about_text = + _("gkc is copyright (c) 2002 Romain Lievin .\n" + "Based on the source code from Roman Zippel.\n"); + + dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_CLOSE, "%s", about_text); + g_signal_connect_swapped(GTK_OBJECT(dialog), "response", + G_CALLBACK(gtk_widget_destroy), + GTK_OBJECT(dialog)); + gtk_widget_show_all(dialog); +} + + +void on_license1_activate(GtkMenuItem * menuitem, gpointer user_data) +{ + GtkWidget *dialog; + const gchar *license_text = + _("gkc is released under the terms of the GNU GPL v2.\n" + "For more information, please see the source code or\n" + "visit http://www.fsf.org/licenses/licenses.html\n"); + + dialog = gtk_message_dialog_new(GTK_WINDOW(main_wnd), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_CLOSE, "%s", license_text); + g_signal_connect_swapped(GTK_OBJECT(dialog), "response", + G_CALLBACK(gtk_widget_destroy), + GTK_OBJECT(dialog)); + gtk_widget_show_all(dialog); +} + + +void on_back_clicked(GtkButton * button, gpointer user_data) +{ + enum prop_type ptype; + + current = current->parent; + ptype = current->prompt ? current->prompt->type : P_UNKNOWN; + if (ptype != P_MENU) + current = current->parent; + display_tree_part(); + + if (current == &rootmenu) + gtk_widget_set_sensitive(back_btn, FALSE); +} + + +void on_load_clicked(GtkButton * button, gpointer user_data) +{ + on_load1_activate(NULL, user_data); +} + + +void on_single_clicked(GtkButton * button, gpointer user_data) +{ + view_mode = SINGLE_VIEW; + gtk_widget_hide(tree1_w); + current = &rootmenu; + display_tree_part(); +} + + +void on_split_clicked(GtkButton * button, gpointer user_data) +{ + gint w, h; + view_mode = SPLIT_VIEW; + gtk_widget_show(tree1_w); + gtk_window_get_default_size(GTK_WINDOW(main_wnd), &w, &h); + gtk_paned_set_position(GTK_PANED(hpaned), w / 2); + if (tree2) + gtk_tree_store_clear(tree2); + display_list(); + + /* Disable back btn, like in full mode. */ + gtk_widget_set_sensitive(back_btn, FALSE); +} + + +void on_full_clicked(GtkButton * button, gpointer user_data) +{ + view_mode = FULL_VIEW; + gtk_widget_hide(tree1_w); + if (tree2) + gtk_tree_store_clear(tree2); + display_tree(&rootmenu); + gtk_widget_set_sensitive(back_btn, FALSE); +} + + +void on_collapse_clicked(GtkButton * button, gpointer user_data) +{ + gtk_tree_view_collapse_all(GTK_TREE_VIEW(tree2_w)); +} + + +void on_expand_clicked(GtkButton * button, gpointer user_data) +{ + gtk_tree_view_expand_all(GTK_TREE_VIEW(tree2_w)); +} + + +/* CTree Callbacks */ + +/* Change hex/int/string value in the cell */ +static void renderer_edited(GtkCellRendererText * cell, + const gchar * path_string, + const gchar * new_text, gpointer user_data) +{ + GtkTreePath *path = gtk_tree_path_new_from_string(path_string); + GtkTreeIter iter; + const char *old_def, *new_def; + struct menu *menu; + struct symbol *sym; + + if (!gtk_tree_model_get_iter(model2, &iter, path)) + return; + + gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); + sym = menu->sym; + + gtk_tree_model_get(model2, &iter, COL_VALUE, &old_def, -1); + new_def = new_text; + + sym_set_string_value(sym, new_def); + + update_tree(&rootmenu, NULL); + + gtk_tree_path_free(path); +} + +/* Change the value of a symbol and update the tree */ +static void change_sym_value(struct menu *menu, gint col) +{ + struct symbol *sym = menu->sym; + tristate newval; + + if (!sym) + return; + + if (col == COL_NO) + newval = no; + else if (col == COL_MOD) + newval = mod; + else if (col == COL_YES) + newval = yes; + else + return; + + switch (sym_get_type(sym)) { + case S_BOOLEAN: + case S_TRISTATE: + if (!sym_tristate_within_range(sym, newval)) + newval = yes; + sym_set_tristate_value(sym, newval); + if (view_mode == FULL_VIEW) + update_tree(&rootmenu, NULL); + else if (view_mode == SPLIT_VIEW) { + update_tree(browsed, NULL); + display_list(); + } + else if (view_mode == SINGLE_VIEW) + display_tree_part(); //fixme: keep exp/coll + break; + case S_INT: + case S_HEX: + case S_STRING: + default: + break; + } +} + +static void toggle_sym_value(struct menu *menu) +{ + if (!menu->sym) + return; + + sym_toggle_tristate_value(menu->sym); + if (view_mode == FULL_VIEW) + update_tree(&rootmenu, NULL); + else if (view_mode == SPLIT_VIEW) { + update_tree(browsed, NULL); + display_list(); + } + else if (view_mode == SINGLE_VIEW) + display_tree_part(); //fixme: keep exp/coll +} + +static gint column2index(GtkTreeViewColumn * column) +{ + gint i; + + for (i = 0; i < COL_NUMBER; i++) { + GtkTreeViewColumn *col; + + col = gtk_tree_view_get_column(GTK_TREE_VIEW(tree2_w), i); + if (col == column) + return i; + } + + return -1; +} + + +/* User click: update choice (full) or goes down (single) */ +gboolean +on_treeview2_button_press_event(GtkWidget * widget, + GdkEventButton * event, gpointer user_data) +{ + GtkTreeView *view = GTK_TREE_VIEW(widget); + GtkTreePath *path; + GtkTreeViewColumn *column; + GtkTreeIter iter; + struct menu *menu; + gint col; + +#if GTK_CHECK_VERSION(2,1,4) // bug in ctree with earlier version of GTK + gint tx = (gint) event->x; + gint ty = (gint) event->y; + gint cx, cy; + + gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx, + &cy); +#else + gtk_tree_view_get_cursor(view, &path, &column); +#endif + if (path == NULL) + return FALSE; + + if (!gtk_tree_model_get_iter(model2, &iter, path)) + return FALSE; + gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); + + col = column2index(column); + if (event->type == GDK_2BUTTON_PRESS) { + enum prop_type ptype; + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + + if (ptype == P_MENU && view_mode != FULL_VIEW && col == COL_OPTION) { + // goes down into menu + current = menu; + display_tree_part(); + gtk_widget_set_sensitive(back_btn, TRUE); + } else if ((col == COL_OPTION)) { + toggle_sym_value(menu); + gtk_tree_view_expand_row(view, path, TRUE); + } + } else { + if (col == COL_VALUE) { + toggle_sym_value(menu); + gtk_tree_view_expand_row(view, path, TRUE); + } else if (col == COL_NO || col == COL_MOD + || col == COL_YES) { + change_sym_value(menu, col); + gtk_tree_view_expand_row(view, path, TRUE); + } + } + + return FALSE; +} + +/* Key pressed: update choice */ +gboolean +on_treeview2_key_press_event(GtkWidget * widget, + GdkEventKey * event, gpointer user_data) +{ + GtkTreeView *view = GTK_TREE_VIEW(widget); + GtkTreePath *path; + GtkTreeViewColumn *column; + GtkTreeIter iter; + struct menu *menu; + gint col; + + gtk_tree_view_get_cursor(view, &path, &column); + if (path == NULL) + return FALSE; + + if (event->keyval == GDK_space) { + if (gtk_tree_view_row_expanded(view, path)) + gtk_tree_view_collapse_row(view, path); + else + gtk_tree_view_expand_row(view, path, FALSE); + return TRUE; + } + if (event->keyval == GDK_KP_Enter) { + } + if (widget == tree1_w) + return FALSE; + + gtk_tree_model_get_iter(model2, &iter, path); + gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); + + if (!strcasecmp(event->string, "n")) + col = COL_NO; + else if (!strcasecmp(event->string, "m")) + col = COL_MOD; + else if (!strcasecmp(event->string, "y")) + col = COL_YES; + else + col = -1; + change_sym_value(menu, col); + + return FALSE; +} + + +/* Row selection changed: update help */ +void +on_treeview2_cursor_changed(GtkTreeView * treeview, gpointer user_data) +{ + GtkTreeSelection *selection; + GtkTreeIter iter; + struct menu *menu; + + selection = gtk_tree_view_get_selection(treeview); + if (gtk_tree_selection_get_selected(selection, &model2, &iter)) { + gtk_tree_model_get(model2, &iter, COL_MENU, &menu, -1); + text_insert_help(menu); + } +} + + +/* User click: display sub-tree in the right frame. */ +gboolean +on_treeview1_button_press_event(GtkWidget * widget, + GdkEventButton * event, gpointer user_data) +{ + GtkTreeView *view = GTK_TREE_VIEW(widget); + GtkTreePath *path; + GtkTreeViewColumn *column; + GtkTreeIter iter; + struct menu *menu; + + gint tx = (gint) event->x; + gint ty = (gint) event->y; + gint cx, cy; + + gtk_tree_view_get_path_at_pos(view, tx, ty, &path, &column, &cx, + &cy); + if (path == NULL) + return FALSE; + + gtk_tree_model_get_iter(model1, &iter, path); + gtk_tree_model_get(model1, &iter, COL_MENU, &menu, -1); + + if (event->type == GDK_2BUTTON_PRESS) { + toggle_sym_value(menu); + current = menu; + display_tree_part(); + } else { + browsed = menu; + display_tree_part(); + } + + gtk_widget_realize(tree2_w); + gtk_tree_view_set_cursor(view, path, NULL, FALSE); + gtk_widget_grab_focus(tree2_w); + + return FALSE; +} + + +/* Fill a row of strings */ +static gchar **fill_row(struct menu *menu) +{ + static gchar *row[COL_NUMBER]; + struct symbol *sym = menu->sym; + const char *def; + int stype; + tristate val; + enum prop_type ptype; + int i; + + for (i = COL_OPTION; i <= COL_COLOR; i++) + g_free(row[i]); + bzero(row, sizeof(row)); + + row[COL_OPTION] = + g_strdup_printf("%s %s", _(menu_get_prompt(menu)), + sym && !sym_has_value(sym) ? "(NEW)" : ""); + + if (opt_mode == OPT_ALL && !menu_is_visible(menu)) + row[COL_COLOR] = g_strdup("DarkGray"); + else if (opt_mode == OPT_PROMPT && + menu_has_prompt(menu) && !menu_is_visible(menu)) + row[COL_COLOR] = g_strdup("DarkGray"); + else + row[COL_COLOR] = g_strdup("Black"); + + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + switch (ptype) { + case P_MENU: + row[COL_PIXBUF] = (gchar *) xpm_menu; + if (view_mode == SINGLE_VIEW) + row[COL_PIXVIS] = GINT_TO_POINTER(TRUE); + row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); + break; + case P_COMMENT: + row[COL_PIXBUF] = (gchar *) xpm_void; + row[COL_PIXVIS] = GINT_TO_POINTER(FALSE); + row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); + break; + default: + row[COL_PIXBUF] = (gchar *) xpm_void; + row[COL_PIXVIS] = GINT_TO_POINTER(FALSE); + row[COL_BTNVIS] = GINT_TO_POINTER(TRUE); + break; + } + + if (!sym) + return row; + row[COL_NAME] = g_strdup(sym->name); + + sym_calc_value(sym); + sym->flags &= ~SYMBOL_CHANGED; + + if (sym_is_choice(sym)) { // parse childs for getting final value + struct menu *child; + struct symbol *def_sym = sym_get_choice_value(sym); + struct menu *def_menu = NULL; + + row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); + + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child) + && child->sym == def_sym) + def_menu = child; + } + + if (def_menu) + row[COL_VALUE] = + g_strdup(_(menu_get_prompt(def_menu))); + } + if (sym->flags & SYMBOL_CHOICEVAL) + row[COL_BTNRAD] = GINT_TO_POINTER(TRUE); + + stype = sym_get_type(sym); + switch (stype) { + case S_BOOLEAN: + if (GPOINTER_TO_INT(row[COL_PIXVIS]) == FALSE) + row[COL_BTNVIS] = GINT_TO_POINTER(TRUE); + if (sym_is_choice(sym)) + break; + /* fall through */ + case S_TRISTATE: + val = sym_get_tristate_value(sym); + switch (val) { + case no: + row[COL_NO] = g_strdup("N"); + row[COL_VALUE] = g_strdup("N"); + row[COL_BTNACT] = GINT_TO_POINTER(FALSE); + row[COL_BTNINC] = GINT_TO_POINTER(FALSE); + break; + case mod: + row[COL_MOD] = g_strdup("M"); + row[COL_VALUE] = g_strdup("M"); + row[COL_BTNINC] = GINT_TO_POINTER(TRUE); + break; + case yes: + row[COL_YES] = g_strdup("Y"); + row[COL_VALUE] = g_strdup("Y"); + row[COL_BTNACT] = GINT_TO_POINTER(TRUE); + row[COL_BTNINC] = GINT_TO_POINTER(FALSE); + break; + } + + if (val != no && sym_tristate_within_range(sym, no)) + row[COL_NO] = g_strdup("_"); + if (val != mod && sym_tristate_within_range(sym, mod)) + row[COL_MOD] = g_strdup("_"); + if (val != yes && sym_tristate_within_range(sym, yes)) + row[COL_YES] = g_strdup("_"); + break; + case S_INT: + case S_HEX: + case S_STRING: + def = sym_get_string_value(sym); + row[COL_VALUE] = g_strdup(def); + row[COL_EDIT] = GINT_TO_POINTER(TRUE); + row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); + break; + } + + return row; +} + + +/* Set the node content with a row of strings */ +static void set_node(GtkTreeIter * node, struct menu *menu, gchar ** row) +{ + GdkColor color; + gboolean success; + GdkPixbuf *pix; + + pix = gdk_pixbuf_new_from_xpm_data((const char **) + row[COL_PIXBUF]); + + gdk_color_parse(row[COL_COLOR], &color); + gdk_colormap_alloc_colors(gdk_colormap_get_system(), &color, 1, + FALSE, FALSE, &success); + + gtk_tree_store_set(tree, node, + COL_OPTION, row[COL_OPTION], + COL_NAME, row[COL_NAME], + COL_NO, row[COL_NO], + COL_MOD, row[COL_MOD], + COL_YES, row[COL_YES], + COL_VALUE, row[COL_VALUE], + COL_MENU, (gpointer) menu, + COL_COLOR, &color, + COL_EDIT, GPOINTER_TO_INT(row[COL_EDIT]), + COL_PIXBUF, pix, + COL_PIXVIS, GPOINTER_TO_INT(row[COL_PIXVIS]), + COL_BTNVIS, GPOINTER_TO_INT(row[COL_BTNVIS]), + COL_BTNACT, GPOINTER_TO_INT(row[COL_BTNACT]), + COL_BTNINC, GPOINTER_TO_INT(row[COL_BTNINC]), + COL_BTNRAD, GPOINTER_TO_INT(row[COL_BTNRAD]), + -1); + + g_object_unref(pix); +} + + +/* Add a node to the tree */ +static void place_node(struct menu *menu, char **row) +{ + GtkTreeIter *parent = parents[indent - 1]; + GtkTreeIter *node = parents[indent]; + + gtk_tree_store_append(tree, node, parent); + set_node(node, menu, row); +} + + +/* Find a node in the GTK+ tree */ +static GtkTreeIter found; + +/* + * Find a menu in the GtkTree starting at parent. + */ +GtkTreeIter *gtktree_iter_find_node(GtkTreeIter * parent, + struct menu *tofind) +{ + GtkTreeIter iter; + GtkTreeIter *child = &iter; + gboolean valid; + GtkTreeIter *ret; + + valid = gtk_tree_model_iter_children(model2, child, parent); + while (valid) { + struct menu *menu; + + gtk_tree_model_get(model2, child, 6, &menu, -1); + + if (menu == tofind) { + memcpy(&found, child, sizeof(GtkTreeIter)); + return &found; + } + + ret = gtktree_iter_find_node(child, tofind); + if (ret) + return ret; + + valid = gtk_tree_model_iter_next(model2, child); + } + + return NULL; +} + + +/* + * Update the tree by adding/removing entries + * Does not change other nodes + */ +static void update_tree(struct menu *src, GtkTreeIter * dst) +{ + struct menu *child1; + GtkTreeIter iter, tmp; + GtkTreeIter *child2 = &iter; + gboolean valid; + GtkTreeIter *sibling; + struct symbol *sym; + struct menu *menu1, *menu2; + + if (src == &rootmenu) + indent = 1; + + valid = gtk_tree_model_iter_children(model2, child2, dst); + for (child1 = src->list; child1; child1 = child1->next) { + + sym = child1->sym; + + reparse: + menu1 = child1; + if (valid) + gtk_tree_model_get(model2, child2, COL_MENU, + &menu2, -1); + else + menu2 = NULL; // force adding of a first child + +#ifdef DEBUG + printf("%*c%s | %s\n", indent, ' ', + menu1 ? menu_get_prompt(menu1) : "nil", + menu2 ? menu_get_prompt(menu2) : "nil"); +#endif + + if ((opt_mode == OPT_NORMAL && !menu_is_visible(child1)) || + (opt_mode == OPT_PROMPT && !menu_has_prompt(child1)) || + (opt_mode == OPT_ALL && !menu_get_prompt(child1))) { + + /* remove node */ + if (gtktree_iter_find_node(dst, menu1) != NULL) { + memcpy(&tmp, child2, sizeof(GtkTreeIter)); + valid = gtk_tree_model_iter_next(model2, + child2); + gtk_tree_store_remove(tree2, &tmp); + if (!valid) + return; /* next parent */ + else + goto reparse; /* next child */ + } else + continue; + } + + if (menu1 != menu2) { + if (gtktree_iter_find_node(dst, menu1) == NULL) { // add node + if (!valid && !menu2) + sibling = NULL; + else + sibling = child2; + gtk_tree_store_insert_before(tree2, + child2, + dst, sibling); + set_node(child2, menu1, fill_row(menu1)); + if (menu2 == NULL) + valid = TRUE; + } else { // remove node + memcpy(&tmp, child2, sizeof(GtkTreeIter)); + valid = gtk_tree_model_iter_next(model2, + child2); + gtk_tree_store_remove(tree2, &tmp); + if (!valid) + return; // next parent + else + goto reparse; // next child + } + } else if (sym && (sym->flags & SYMBOL_CHANGED)) { + set_node(child2, menu1, fill_row(menu1)); + } + + indent++; + update_tree(child1, child2); + indent--; + + valid = gtk_tree_model_iter_next(model2, child2); + } +} + + +/* Display the whole tree (single/split/full view) */ +static void display_tree(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + enum prop_type ptype; + + if (menu == &rootmenu) { + indent = 1; + current = &rootmenu; + } + + for (child = menu->list; child; child = child->next) { + prop = child->prompt; + sym = child->sym; + ptype = prop ? prop->type : P_UNKNOWN; + + if (sym) + sym->flags &= ~SYMBOL_CHANGED; + + if ((view_mode == SPLIT_VIEW) + && !(child->flags & MENU_ROOT) && (tree == tree1)) + continue; + + if ((view_mode == SPLIT_VIEW) && (child->flags & MENU_ROOT) + && (tree == tree2)) + continue; + + if ((opt_mode == OPT_NORMAL && menu_is_visible(child)) || + (opt_mode == OPT_PROMPT && menu_has_prompt(child)) || + (opt_mode == OPT_ALL && menu_get_prompt(child))) + place_node(child, fill_row(child)); +#ifdef DEBUG + printf("%*c%s: ", indent, ' ', menu_get_prompt(child)); + printf("%s", child->flags & MENU_ROOT ? "rootmenu | " : ""); + printf("%s", prop_get_type_name(ptype)); + printf(" | "); + if (sym) { + printf("%s", sym_type_name(sym->type)); + printf(" | "); + printf("%s", dbg_sym_flags(sym->flags)); + printf("\n"); + } else + printf("\n"); +#endif + if ((view_mode != FULL_VIEW) && (ptype == P_MENU) + && (tree == tree2)) + continue; +/* + if (((menu != &rootmenu) && !(menu->flags & MENU_ROOT)) + || (view_mode == FULL_VIEW) + || (view_mode == SPLIT_VIEW))*/ + + /* Change paned position if the view is not in 'split mode' */ + if (view_mode == SINGLE_VIEW || view_mode == FULL_VIEW) { + gtk_paned_set_position(GTK_PANED(hpaned), 0); + } + + if (((view_mode == SINGLE_VIEW) && (menu->flags & MENU_ROOT)) + || (view_mode == FULL_VIEW) + || (view_mode == SPLIT_VIEW)) { + indent++; + display_tree(child); + indent--; + } + } +} + +/* Display a part of the tree starting at current node (single/split view) */ +static void display_tree_part(void) +{ + if (tree2) + gtk_tree_store_clear(tree2); + if (view_mode == SINGLE_VIEW) + display_tree(current); + else if (view_mode == SPLIT_VIEW) + display_tree(browsed); + gtk_tree_view_expand_all(GTK_TREE_VIEW(tree2_w)); +} + +/* Display the list in the left frame (split view) */ +static void display_list(void) +{ + if (tree1) + gtk_tree_store_clear(tree1); + + tree = tree1; + display_tree(&rootmenu); + gtk_tree_view_expand_all(GTK_TREE_VIEW(tree1_w)); + tree = tree2; +} + +void fixup_rootmenu(struct menu *menu) +{ + struct menu *child; + static int menu_cnt = 0; + + menu->flags |= MENU_ROOT; + for (child = menu->list; child; child = child->next) { + if (child->prompt && child->prompt->type == P_MENU) { + menu_cnt++; + fixup_rootmenu(child); + menu_cnt--; + } else if (!menu_cnt) + fixup_rootmenu(child); + } +} + + +/* Main */ +int main(int ac, char *av[]) +{ + const char *name; + char *env; + gchar *glade_file; + + bindtextdomain(PACKAGE, LOCALEDIR); + bind_textdomain_codeset(PACKAGE, "UTF-8"); + textdomain(PACKAGE); + + /* GTK stuffs */ + gtk_set_locale(); + gtk_init(&ac, &av); + glade_init(); + + //add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps"); + //add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps"); + + /* Determine GUI path */ + env = getenv(SRCTREE); + if (env) + glade_file = g_strconcat(env, "/support/kconfig/gconf.glade", NULL); + else if (av[0][0] == '/') + glade_file = g_strconcat(av[0], ".glade", NULL); + else + glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL); + + /* Conf stuffs */ + if (ac > 1 && av[1][0] == '-') { + switch (av[1][1]) { + case 'a': + //showAll = 1; + break; + case 'h': + case '?': + printf("%s \n", av[0]); + exit(0); + } + name = av[2]; + } else + name = av[1]; + + conf_parse(name); + fixup_rootmenu(&rootmenu); + conf_read(NULL); + + /* Load the interface and connect signals */ + init_main_window(glade_file); + init_tree_model(); + init_left_tree(); + init_right_tree(); + + switch (view_mode) { + case SINGLE_VIEW: + display_tree_part(); + break; + case SPLIT_VIEW: + display_list(); + break; + case FULL_VIEW: + display_tree(&rootmenu); + break; + } + + gtk_main(); + + return 0; +} + +static void conf_changed(void) +{ + bool changed = conf_get_changed(); + gtk_widget_set_sensitive(save_btn, changed); + gtk_widget_set_sensitive(save_menu_item, changed); +} diff --git a/support/kconfig/gconf.glade b/support/kconfig/gconf.glade new file mode 100644 index 0000000000..6cbc1bb459 --- /dev/null +++ b/support/kconfig/gconf.glade @@ -0,0 +1,661 @@ + + + + + + True + Gtk Buildroot Configurator + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + 640 + 480 + True + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + + + + + + + True + False + 0 + + + + True + + + + True + _File + True + + + + + + + True + Load a config file + _Load + True + + + + + + True + gtk-open + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Save the config in .config + _Save + True + + + + + + True + gtk-save + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + Save the config in a file + Save _as + True + + + + + True + gtk-save-as + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + + + + + + True + _Quit + True + + + + + + True + gtk-quit + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + + + + + True + _Options + True + + + + + + + True + Show name + Show _name + True + False + + + + + + + True + Show range (Y/M/N) + Show _range + True + False + + + + + + + True + Show value of the option + Show _data + True + False + + + + + + + True + + + + + + True + Show normal options + Show normal options + True + True + + + + + + + True + Show all options + Show all _options + True + False + set_option_mode1 + + + + + + + True + Show all options with prompts + Show all prompt options + True + False + set_option_mode1 + + + + + + + + + + + + True + _Help + True + + + + + + + True + _Introduction + True + + + + + + True + gtk-dialog-question + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + _About + True + + + + + + True + gtk-properties + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + True + _License + True + + + + + True + gtk-justify-fill + 1 + 0.5 + 0.5 + 0 + 0 + + + + + + + + + + + 0 + False + False + + + + + + True + GTK_SHADOW_OUT + GTK_POS_LEFT + GTK_POS_TOP + + + + True + GTK_ORIENTATION_HORIZONTAL + GTK_TOOLBAR_BOTH + True + True + + + + True + Goes up of one level (single view) + Back + True + gtk-undo + True + True + False + + + + False + True + + + + + + True + True + True + False + + + + True + + + + + False + False + + + + + + True + Load a config file + Load + True + gtk-open + True + True + False + + + + False + True + + + + + + True + Save a config file + Save + True + gtk-save + True + True + False + + + + False + True + + + + + + True + True + True + False + + + + True + + + + + False + False + + + + + + True + Single view + Single + True + gtk-missing-image + True + True + False + + + + False + True + + + + + + True + Split view + Split + True + gtk-missing-image + True + True + False + + + + False + True + + + + + + True + Full view + Full + True + gtk-missing-image + True + True + False + + + + False + True + + + + + + True + True + True + False + + + + True + + + + + False + False + + + + + + True + Collapse the whole tree in the right frame + Collapse + True + gtk-remove + True + True + False + + + + False + True + + + + + + True + Expand the whole tree in the right frame + Expand + True + gtk-add + True + True + False + + + + False + True + + + + + + + 0 + False + False + + + + + + 1 + True + True + 0 + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + False + False + + + + + + + + True + False + + + + + + True + True + 0 + + + + True + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + True + False + False + False + + + + + + + + True + False + + + + + + True + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + False + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_WORD + True + 0 + 0 + 0 + 0 + 0 + 0 + Sorry, no help available for this option yet. + + + + + True + True + + + + + True + True + + + + + 0 + True + True + + + + + + + diff --git a/support/kconfig/images.c b/support/kconfig/images.c new file mode 100644 index 0000000000..d4f84bd4a9 --- /dev/null +++ b/support/kconfig/images.c @@ -0,0 +1,326 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +static const char *xpm_load[] = { +"22 22 5 1", +". c None", +"# c #000000", +"c c #838100", +"a c #ffff00", +"b c #ffffff", +"......................", +"......................", +"......................", +"............####....#.", +"...........#....##.##.", +"..................###.", +".................####.", +".####...........#####.", +"#abab##########.......", +"#babababababab#.......", +"#ababababababa#.......", +"#babababababab#.......", +"#ababab###############", +"#babab##cccccccccccc##", +"#abab##cccccccccccc##.", +"#bab##cccccccccccc##..", +"#ab##cccccccccccc##...", +"#b##cccccccccccc##....", +"###cccccccccccc##.....", +"##cccccccccccc##......", +"###############.......", +"......................"}; + +static const char *xpm_save[] = { +"22 22 5 1", +". c None", +"# c #000000", +"a c #838100", +"b c #c5c2c5", +"c c #cdb6d5", +"......................", +".####################.", +".#aa#bbbbbbbbbbbb#bb#.", +".#aa#bbbbbbbbbbbb#bb#.", +".#aa#bbbbbbbbbcbb####.", +".#aa#bbbccbbbbbbb#aa#.", +".#aa#bbbccbbbbbbb#aa#.", +".#aa#bbbbbbbbbbbb#aa#.", +".#aa#bbbbbbbbbbbb#aa#.", +".#aa#bbbbbbbbbbbb#aa#.", +".#aa#bbbbbbbbbbbb#aa#.", +".#aaa############aaa#.", +".#aaaaaaaaaaaaaaaaaa#.", +".#aaaaaaaaaaaaaaaaaa#.", +".#aaa#############aa#.", +".#aaa#########bbb#aa#.", +".#aaa#########bbb#aa#.", +".#aaa#########bbb#aa#.", +".#aaa#########bbb#aa#.", +".#aaa#########bbb#aa#.", +"..##################..", +"......................"}; + +static const char *xpm_back[] = { +"22 22 3 1", +". c None", +"# c #000083", +"a c #838183", +"......................", +"......................", +"......................", +"......................", +"......................", +"...........######a....", +"..#......##########...", +"..##...####......##a..", +"..###.###.........##..", +"..######..........##..", +"..#####...........##..", +"..######..........##..", +"..#######.........##..", +"..########.......##a..", +"...............a###...", +"...............###....", +"......................", +"......................", +"......................", +"......................", +"......................", +"......................"}; + +static const char *xpm_tree_view[] = { +"22 22 2 1", +". c None", +"# c #000000", +"......................", +"......................", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......########........", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......########........", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......#...............", +"......########........", +"......................", +"......................"}; + +static const char *xpm_single_view[] = { +"22 22 2 1", +". c None", +"# c #000000", +"......................", +"......................", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"..........#...........", +"......................", +"......................"}; + +static const char *xpm_split_view[] = { +"22 22 2 1", +". c None", +"# c #000000", +"......................", +"......................", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......#......#........", +"......................", +"......................"}; + +static const char *xpm_symbol_no[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_symbol_mod[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . . ", +" . .. . ", +" . .... . ", +" . .... . ", +" . .. . ", +" . . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_symbol_yes[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . . ", +" . . . ", +" . .. . ", +" . . .. . ", +" . .... . ", +" . .. . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_choice_no[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .... ", +" .. .. ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" .. .. ", +" .... ", +" "}; + +static const char *xpm_choice_yes[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .... ", +" .. .. ", +" . . ", +" . .. . ", +" . .... . ", +" . .... . ", +" . .. . ", +" . . ", +" .. .. ", +" .... ", +" "}; + +static const char *xpm_menu[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . .. . ", +" . .... . ", +" . ...... . ", +" . ...... . ", +" . .... . ", +" . .. . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_menu_inv[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" .......... ", +" .. ...... ", +" .. .... ", +" .. .. ", +" .. .. ", +" .. .... ", +" .. ...... ", +" .......... ", +" .......... ", +" "}; + +static const char *xpm_menuback[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" .......... ", +" . . ", +" . .. . ", +" . .... . ", +" . ...... . ", +" . ...... . ", +" . .... . ", +" . .. . ", +" . . ", +" .......... ", +" "}; + +static const char *xpm_void[] = { +"12 12 2 1", +" c white", +". c black", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/support/kconfig/kxgettext.c b/support/kconfig/kxgettext.c new file mode 100644 index 0000000000..2858738b22 --- /dev/null +++ b/support/kconfig/kxgettext.c @@ -0,0 +1,235 @@ +/* + * Arnaldo Carvalho de Melo , 2005 + * + * Released under the terms of the GNU GPL v2.0 + */ + +#include +#include + +#include "lkc.h" + +static char *escape(const char* text, char *bf, int len) +{ + char *bfp = bf; + int multiline = strchr(text, '\n') != NULL; + int eol = 0; + int textlen = strlen(text); + + if ((textlen > 0) && (text[textlen-1] == '\n')) + eol = 1; + + *bfp++ = '"'; + --len; + + if (multiline) { + *bfp++ = '"'; + *bfp++ = '\n'; + *bfp++ = '"'; + len -= 3; + } + + while (*text != '\0' && len > 1) { + if (*text == '"') + *bfp++ = '\\'; + else if (*text == '\n') { + *bfp++ = '\\'; + *bfp++ = 'n'; + *bfp++ = '"'; + *bfp++ = '\n'; + *bfp++ = '"'; + len -= 5; + ++text; + goto next; + } + else if (*text == '\\') { + *bfp++ = '\\'; + len--; + } + *bfp++ = *text++; +next: + --len; + } + + if (multiline && eol) + bfp -= 3; + + *bfp++ = '"'; + *bfp = '\0'; + + return bf; +} + +struct file_line { + struct file_line *next; + const char *file; + int lineno; +}; + +static struct file_line *file_line__new(const char *file, int lineno) +{ + struct file_line *self = malloc(sizeof(*self)); + + if (self == NULL) + goto out; + + self->file = file; + self->lineno = lineno; + self->next = NULL; +out: + return self; +} + +struct message { + const char *msg; + const char *option; + struct message *next; + struct file_line *files; +}; + +static struct message *message__list; + +static struct message *message__new(const char *msg, char *option, + const char *file, int lineno) +{ + struct message *self = malloc(sizeof(*self)); + + if (self == NULL) + goto out; + + self->files = file_line__new(file, lineno); + if (self->files == NULL) + goto out_fail; + + self->msg = strdup(msg); + if (self->msg == NULL) + goto out_fail_msg; + + self->option = option; + self->next = NULL; +out: + return self; +out_fail_msg: + free(self->files); +out_fail: + free(self); + self = NULL; + goto out; +} + +static struct message *mesage__find(const char *msg) +{ + struct message *m = message__list; + + while (m != NULL) { + if (strcmp(m->msg, msg) == 0) + break; + m = m->next; + } + + return m; +} + +static int message__add_file_line(struct message *self, const char *file, + int lineno) +{ + int rc = -1; + struct file_line *fl = file_line__new(file, lineno); + + if (fl == NULL) + goto out; + + fl->next = self->files; + self->files = fl; + rc = 0; +out: + return rc; +} + +static int message__add(const char *msg, char *option, const char *file, + int lineno) +{ + int rc = 0; + char bf[16384]; + char *escaped = escape(msg, bf, sizeof(bf)); + struct message *m = mesage__find(escaped); + + if (m != NULL) + rc = message__add_file_line(m, file, lineno); + else { + m = message__new(escaped, option, file, lineno); + + if (m != NULL) { + m->next = message__list; + message__list = m; + } else + rc = -1; + } + return rc; +} + +static void menu_build_message_list(struct menu *menu) +{ + struct menu *child; + + message__add(menu_get_prompt(menu), NULL, + menu->file == NULL ? "Root Menu" : menu->file->name, + menu->lineno); + + if (menu->sym != NULL && menu_has_help(menu)) + message__add(menu_get_help(menu), menu->sym->name, + menu->file == NULL ? "Root Menu" : menu->file->name, + menu->lineno); + + for (child = menu->list; child != NULL; child = child->next) + if (child->prompt != NULL) + menu_build_message_list(child); +} + +static void message__print_file_lineno(struct message *self) +{ + struct file_line *fl = self->files; + + putchar('\n'); + if (self->option != NULL) + printf("# %s:00000\n", self->option); + + printf("#: %s:%d", fl->file, fl->lineno); + fl = fl->next; + + while (fl != NULL) { + printf(", %s:%d", fl->file, fl->lineno); + fl = fl->next; + } + + putchar('\n'); +} + +static void message__print_gettext_msgid_msgstr(struct message *self) +{ + message__print_file_lineno(self); + + printf("msgid %s\n" + "msgstr \"\"\n", self->msg); +} + +static void menu__xgettext(void) +{ + struct message *m = message__list; + + while (m != NULL) { + /* skip empty lines ("") */ + if (strlen(m->msg) > sizeof("\"\"")) + message__print_gettext_msgid_msgstr(m); + m = m->next; + } +} + +int main(int ac, char **av) +{ + conf_parse(av[1]); + + menu_build_message_list(menu_get_root_menu(NULL)); + menu__xgettext(); + return 0; +} diff --git a/support/kconfig/list.h b/support/kconfig/list.h new file mode 100644 index 0000000000..685d80e1bb --- /dev/null +++ b/support/kconfig/list.h @@ -0,0 +1,131 @@ +#ifndef LIST_H +#define LIST_H + +/* + * Copied from include/linux/... + */ + +#undef offsetof +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) + +/** + * container_of - cast a member of a structure out to the containing structure + * @ptr: the pointer to the member. + * @type: the type of the container struct this is embedded in. + * @member: the name of the member within the struct. + * + */ +#define container_of(ptr, type, member) ({ \ + const typeof( ((type *)0)->member ) *__mptr = (ptr); \ + (type *)( (char *)__mptr - offsetof(type,member) );}) + + +struct list_head { + struct list_head *next, *prev; +}; + + +#define LIST_HEAD_INIT(name) { &(name), &(name) } + +#define LIST_HEAD(name) \ + struct list_head name = LIST_HEAD_INIT(name) + +/** + * list_entry - get the struct for this entry + * @ptr: the &struct list_head pointer. + * @type: the type of the struct this is embedded in. + * @member: the name of the list_struct within the struct. + */ +#define list_entry(ptr, type, member) \ + container_of(ptr, type, member) + +/** + * list_for_each_entry - iterate over list of given type + * @pos: the type * to use as a loop cursor. + * @head: the head for your list. + * @member: the name of the list_struct within the struct. + */ +#define list_for_each_entry(pos, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member); \ + &pos->member != (head); \ + pos = list_entry(pos->member.next, typeof(*pos), member)) + +/** + * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry + * @pos: the type * to use as a loop cursor. + * @n: another type * to use as temporary storage + * @head: the head for your list. + * @member: the name of the list_struct within the struct. + */ +#define list_for_each_entry_safe(pos, n, head, member) \ + for (pos = list_entry((head)->next, typeof(*pos), member), \ + n = list_entry(pos->member.next, typeof(*pos), member); \ + &pos->member != (head); \ + pos = n, n = list_entry(n->member.next, typeof(*n), member)) + +/** + * list_empty - tests whether a list is empty + * @head: the list to test. + */ +static inline int list_empty(const struct list_head *head) +{ + return head->next == head; +} + +/* + * Insert a new entry between two known consecutive entries. + * + * This is only for internal list manipulation where we know + * the prev/next entries already! + */ +static inline void __list_add(struct list_head *_new, + struct list_head *prev, + struct list_head *next) +{ + next->prev = _new; + _new->next = next; + _new->prev = prev; + prev->next = _new; +} + +/** + * list_add_tail - add a new entry + * @new: new entry to be added + * @head: list head to add it before + * + * Insert a new entry before the specified head. + * This is useful for implementing queues. + */ +static inline void list_add_tail(struct list_head *_new, struct list_head *head) +{ + __list_add(_new, head->prev, head); +} + +/* + * Delete a list entry by making the prev/next entries + * point to each other. + * + * This is only for internal list manipulation where we know + * the prev/next entries already! + */ +static inline void __list_del(struct list_head *prev, struct list_head *next) +{ + next->prev = prev; + prev->next = next; +} + +#define LIST_POISON1 ((void *) 0x00100100) +#define LIST_POISON2 ((void *) 0x00200200) +/** + * list_del - deletes entry from list. + * @entry: the element to delete from the list. + * Note: list_empty() on entry does not return true after this, the entry is + * in an undefined state. + */ +static inline void list_del(struct list_head *entry) +{ + __list_del(entry->prev, entry->next); + entry->next = (struct list_head*)LIST_POISON1; + entry->prev = (struct list_head*)LIST_POISON2; +} +#endif diff --git a/support/kconfig/lkc.h b/support/kconfig/lkc.h new file mode 100644 index 0000000000..09f4edfdc9 --- /dev/null +++ b/support/kconfig/lkc.h @@ -0,0 +1,199 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#ifndef LKC_H +#define LKC_H + +#include "expr.h" + +#ifndef KBUILD_NO_NLS +# include +#else +static inline const char *gettext(const char *txt) { return txt; } +static inline void textdomain(const char *domainname) {} +static inline void bindtextdomain(const char *name, const char *dir) {} +static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; } +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#define P(name,type,arg) extern type name arg +#include "lkc_proto.h" +#undef P + +#define SRCTREE "srctree" + +#ifndef PACKAGE +#define PACKAGE "linux" +#endif + +#define LOCALEDIR "/usr/share/locale" + +#define _(text) gettext(text) +#define N_(text) (text) + +#ifndef CONFIG_ +#define CONFIG_ "CONFIG_" +#endif +static inline const char *CONFIG_prefix(void) +{ + return getenv( "CONFIG_" ) ?: CONFIG_; +} +#undef CONFIG_ +#define CONFIG_ CONFIG_prefix() + +#define TF_COMMAND 0x0001 +#define TF_PARAM 0x0002 +#define TF_OPTION 0x0004 + +enum conf_def_mode { + def_default, + def_yes, + def_mod, + def_no, + def_random +}; + +#define T_OPT_MODULES 1 +#define T_OPT_DEFCONFIG_LIST 2 +#define T_OPT_ENV 3 + +struct kconf_id { + int name; + int token; + unsigned int flags; + enum symbol_type stype; +}; + +extern int zconfdebug; + +int zconfparse(void); +void zconfdump(FILE *out); +void zconf_starthelp(void); +FILE *zconf_fopen(const char *name); +void zconf_initscan(const char *name); +void zconf_nextfile(const char *name); +int zconf_lineno(void); +const char *zconf_curname(void); + +/* confdata.c */ +const char *conf_get_configname(void); +const char *conf_get_autoconfig_name(void); +char *conf_get_default_confname(void); +void sym_set_change_count(int count); +void sym_add_change_count(int count); +bool conf_set_all_new_symbols(enum conf_def_mode mode); +void set_all_choice_values(struct symbol *csym); + +struct conf_printer { + void (*print_symbol)(FILE *, struct symbol *, const char *, void *); + void (*print_comment)(FILE *, const char *, void *); +}; + +/* confdata.c and expr.c */ +static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out) +{ + assert(len != 0); + + if (fwrite(str, len, count, out) != count) + fprintf(stderr, "Error in writing or end of file.\n"); +} + +/* menu.c */ +void _menu_init(void); +void menu_warn(struct menu *menu, const char *fmt, ...); +struct menu *menu_add_menu(void); +void menu_end_menu(void); +void menu_add_entry(struct symbol *sym); +void menu_end_entry(void); +void menu_add_dep(struct expr *dep); +void menu_add_visibility(struct expr *dep); +struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep); +struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); +void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); +void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); +void menu_add_option(int token, char *arg); +void menu_finalize(struct menu *parent); +void menu_set_type(int type); + +/* util.c */ +struct file *file_lookup(const char *name); +int file_write_dep(const char *name); +void *xmalloc(size_t size); +void *xcalloc(size_t nmemb, size_t size); + +struct gstr { + size_t len; + char *s; + /* + * when max_width is not zero long lines in string s (if any) get + * wrapped not to exceed the max_width value + */ + int max_width; +}; +struct gstr str_new(void); +struct gstr str_assign(const char *s); +void str_free(struct gstr *gs); +void str_append(struct gstr *gs, const char *s); +void str_printf(struct gstr *gs, const char *fmt, ...); +const char *str_get(struct gstr *gs); + +/* symbol.c */ +extern struct expr *sym_env_list; + +void sym_init(void); +void sym_clear_all_valid(void); +void sym_set_all_changed(void); +void sym_set_changed(struct symbol *sym); +struct symbol *sym_choice_default(struct symbol *sym); +const char *sym_get_string_default(struct symbol *sym); +struct symbol *sym_check_deps(struct symbol *sym); +struct property *prop_alloc(enum prop_type type, struct symbol *sym); +struct symbol *prop_get_symbol(struct property *prop); +struct property *sym_get_env_prop(struct symbol *sym); + +static inline tristate sym_get_tristate_value(struct symbol *sym) +{ + return sym->curr.tri; +} + + +static inline struct symbol *sym_get_choice_value(struct symbol *sym) +{ + return (struct symbol *)sym->curr.val; +} + +static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval) +{ + return sym_set_tristate_value(chval, yes); +} + +static inline bool sym_is_choice(struct symbol *sym) +{ + return sym->flags & SYMBOL_CHOICE ? true : false; +} + +static inline bool sym_is_choice_value(struct symbol *sym) +{ + return sym->flags & SYMBOL_CHOICEVAL ? true : false; +} + +static inline bool sym_is_optional(struct symbol *sym) +{ + return sym->flags & SYMBOL_OPTIONAL ? true : false; +} + +static inline bool sym_has_value(struct symbol *sym) +{ + return sym->flags & SYMBOL_DEF_USER ? true : false; +} + +#ifdef __cplusplus +} +#endif + +#endif /* LKC_H */ diff --git a/support/kconfig/lkc_proto.h b/support/kconfig/lkc_proto.h new file mode 100644 index 0000000000..ecdb9659b6 --- /dev/null +++ b/support/kconfig/lkc_proto.h @@ -0,0 +1,57 @@ +#include + +/* confdata.c */ +P(conf_parse,void,(const char *name)); +P(conf_read,int,(const char *name)); +P(conf_read_simple,int,(const char *name, int)); +P(conf_write_defconfig,int,(const char *name)); +P(conf_write,int,(const char *name)); +P(conf_write_autoconf,int,(void)); +P(conf_get_changed,bool,(void)); +P(conf_set_changed_callback, void,(void (*fn)(void))); +P(conf_set_message_callback, void,(void (*fn)(const char *fmt, va_list ap))); + +/* menu.c */ +P(rootmenu,struct menu,); + +P(menu_is_empty, bool, (struct menu *menu)); +P(menu_is_visible, bool, (struct menu *menu)); +P(menu_has_prompt, bool, (struct menu *menu)); +P(menu_get_prompt,const char *,(struct menu *menu)); +P(menu_get_root_menu,struct menu *,(struct menu *menu)); +P(menu_get_parent_menu,struct menu *,(struct menu *menu)); +P(menu_has_help,bool,(struct menu *menu)); +P(menu_get_help,const char *,(struct menu *menu)); +P(get_symbol_str, void, (struct gstr *r, struct symbol *sym, struct list_head + *head)); +P(get_relations_str, struct gstr, (struct symbol **sym_arr, struct list_head + *head)); +P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help)); + +/* symbol.c */ +P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); + +P(sym_lookup,struct symbol *,(const char *name, int flags)); +P(sym_find,struct symbol *,(const char *name)); +P(sym_expand_string_value,const char *,(const char *in)); +P(sym_escape_string_value, const char *,(const char *in)); +P(sym_re_search,struct symbol **,(const char *pattern)); +P(sym_type_name,const char *,(enum symbol_type type)); +P(sym_calc_value,void,(struct symbol *sym)); +P(sym_get_type,enum symbol_type,(struct symbol *sym)); +P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri)); +P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri)); +P(sym_toggle_tristate_value,tristate,(struct symbol *sym)); +P(sym_string_valid,bool,(struct symbol *sym, const char *newval)); +P(sym_string_within_range,bool,(struct symbol *sym, const char *str)); +P(sym_set_string_value,bool,(struct symbol *sym, const char *newval)); +P(sym_is_changable,bool,(struct symbol *sym)); +P(sym_get_choice_prop,struct property *,(struct symbol *sym)); +P(sym_get_default_prop,struct property *,(struct symbol *sym)); +P(sym_get_string_value,const char *,(struct symbol *sym)); + +P(prop_get_type_name,const char *,(enum prop_type type)); + +/* expr.c */ +P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2)); +P(expr_print,void,(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken)); diff --git a/support/kconfig/lxdialog/.gitignore b/support/kconfig/lxdialog/.gitignore new file mode 100644 index 0000000000..90b08ff025 --- /dev/null +++ b/support/kconfig/lxdialog/.gitignore @@ -0,0 +1,4 @@ +# +# Generated files +# +lxdialog diff --git a/support/kconfig/lxdialog/BIG.FAT.WARNING b/support/kconfig/lxdialog/BIG.FAT.WARNING new file mode 100644 index 0000000000..a8999d82bd --- /dev/null +++ b/support/kconfig/lxdialog/BIG.FAT.WARNING @@ -0,0 +1,4 @@ +This is NOT the official version of dialog. This version has been +significantly modified from the original. It is for use by the Linux +kernel configuration script. Please do not bother Savio Lam with +questions about this program. diff --git a/support/kconfig/lxdialog/check-lxdialog.sh b/support/kconfig/lxdialog/check-lxdialog.sh new file mode 100755 index 0000000000..3ce0a23349 --- /dev/null +++ b/support/kconfig/lxdialog/check-lxdialog.sh @@ -0,0 +1,91 @@ +#!/bin/sh +# Check ncurses compatibility + +# What library to link +ldflags() +{ + pkg-config --libs ncursesw 2>/dev/null && exit + pkg-config --libs ncurses 2>/dev/null && exit + for ext in so a dll.a dylib ; do + for lib in ncursesw ncurses curses ; do + $cc -print-file-name=lib${lib}.${ext} | grep -q / + if [ $? -eq 0 ]; then + echo "-l${lib}" + exit + fi + done + done + exit 1 +} + +# Where is ncurses.h? +ccflags() +{ + if pkg-config --cflags ncursesw 2>/dev/null; then + echo '-DCURSES_LOC="" -DNCURSES_WIDECHAR=1' + elif pkg-config --cflags ncurses 2>/dev/null; then + echo '-DCURSES_LOC=""' + elif [ -f /usr/include/ncursesw/curses.h ]; then + echo '-I/usr/include/ncursesw -DCURSES_LOC=""' + echo ' -DNCURSES_WIDECHAR=1' + elif [ -f /usr/include/ncurses/ncurses.h ]; then + echo '-I/usr/include/ncurses -DCURSES_LOC=""' + elif [ -f /usr/include/ncurses/curses.h ]; then + echo '-I/usr/include/ncurses -DCURSES_LOC=""' + elif [ -f /usr/include/ncurses.h ]; then + echo '-DCURSES_LOC=""' + else + echo '-DCURSES_LOC=""' + fi +} + +# Temp file, try to clean up after us +tmp=$(mktemp) +trap "rm -f $tmp" 0 1 2 3 15 + +# Check if we can link to ncurses +check() { + $cc -x c - -o $tmp 2>/dev/null <<'EOF' +#include CURSES_LOC +main() {} +EOF + if [ $? != 0 ]; then + echo " *** Unable to find the ncurses libraries or the" 1>&2 + echo " *** required header files." 1>&2 + echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2 + echo " *** " 1>&2 + echo " *** Install ncurses (ncurses-devel) and try again." 1>&2 + echo " *** " 1>&2 + exit 1 + fi +} + +usage() { + printf "Usage: $0 [-check compiler options|-ccflags|-ldflags compiler options]\n" +} + +if [ $# -eq 0 ]; then + usage + exit 1 +fi + +cc="" +case "$1" in + "-check") + shift + cc="$@" + check + ;; + "-ccflags") + ccflags + ;; + "-ldflags") + shift + cc="$@" + ldflags + ;; + "*") + usage + exit 1 + ;; +esac diff --git a/support/kconfig/lxdialog/checklist.c b/support/kconfig/lxdialog/checklist.c new file mode 100644 index 0000000000..3b15c08ec1 --- /dev/null +++ b/support/kconfig/lxdialog/checklist.c @@ -0,0 +1,332 @@ +/* + * checklist.c -- implements the checklist box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * Stuart Herbert - S.Herbert@sheffield.ac.uk: radiolist extension + * Alessandro Rubini - rubini@ipvvis.unipv.it: merged the two + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +static int list_width, check_x, item_x; + +/* + * Print list item + */ +static void print_item(WINDOW * win, int choice, int selected) +{ + int i; + char *list_item = malloc(list_width + 1); + + strncpy(list_item, item_str(), list_width - item_x); + list_item[list_width - item_x] = '\0'; + + /* Clear 'residue' of last item */ + wattrset(win, dlg.menubox.atr); + wmove(win, choice, 0); + for (i = 0; i < list_width; i++) + waddch(win, ' '); + + wmove(win, choice, check_x); + wattrset(win, selected ? dlg.check_selected.atr + : dlg.check.atr); + if (!item_is_tag(':')) + wprintw(win, "(%c)", item_is_tag('X') ? 'X' : ' '); + + wattrset(win, selected ? dlg.tag_selected.atr : dlg.tag.atr); + mvwaddch(win, choice, item_x, list_item[0]); + wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr); + waddstr(win, list_item + 1); + if (selected) { + wmove(win, choice, check_x + 1); + wrefresh(win); + } + free(list_item); +} + +/* + * Print the scroll indicators. + */ +static void print_arrows(WINDOW * win, int choice, int item_no, int scroll, + int y, int x, int height) +{ + wmove(win, y, x); + + if (scroll > 0) { + wattrset(win, dlg.uarrow.atr); + waddch(win, ACS_UARROW); + waddstr(win, "(-)"); + } else { + wattrset(win, dlg.menubox.atr); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + } + + y = y + height + 1; + wmove(win, y, x); + + if ((height < item_no) && (scroll + choice < item_no - 1)) { + wattrset(win, dlg.darrow.atr); + waddch(win, ACS_DARROW); + waddstr(win, "(+)"); + } else { + wattrset(win, dlg.menubox_border.atr); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + } +} + +/* + * Display the termination buttons + */ +static void print_buttons(WINDOW * dialog, int height, int width, int selected) +{ + int x = width / 2 - 11; + int y = height - 2; + + print_button(dialog, gettext("Select"), y, x, selected == 0); + print_button(dialog, gettext(" Help "), y, x + 14, selected == 1); + + wmove(dialog, y, x + 1 + 14 * selected); + wrefresh(dialog); +} + +/* + * Display a dialog box with a list of options that can be turned on or off + * in the style of radiolist (only one option turned on at a time). + */ +int dialog_checklist(const char *title, const char *prompt, int height, + int width, int list_height) +{ + int i, x, y, box_x, box_y; + int key = 0, button = 0, choice = 0, scroll = 0, max_choice; + WINDOW *dialog, *list; + + /* which item to highlight */ + item_foreach() { + if (item_is_tag('X')) + choice = item_n(); + if (item_is_selected()) { + choice = item_n(); + break; + } + } + +do_resize: + if (getmaxy(stdscr) < (height + CHECKLIST_HEIGTH_MIN)) + return -ERRDISPLAYTOOSMALL; + if (getmaxx(stdscr) < (width + CHECKLIST_WIDTH_MIN)) + return -ERRDISPLAYTOOSMALL; + + max_choice = MIN(list_height, item_count()); + + /* center dialog box on screen */ + x = (getmaxx(stdscr) - width) / 2; + y = (getmaxy(stdscr) - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, + dlg.dialog.atr, dlg.border.atr); + wattrset(dialog, dlg.border.atr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dlg.dialog.atr); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dlg.dialog.atr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + list_width = width - 6; + box_y = height - list_height - 5; + box_x = (width - list_width) / 2 - 1; + + /* create new window for the list */ + list = subwin(dialog, list_height, list_width, y + box_y + 1, + x + box_x + 1); + + keypad(list, TRUE); + + /* draw a box around the list items */ + draw_box(dialog, box_y, box_x, list_height + 2, list_width + 2, + dlg.menubox_border.atr, dlg.menubox.atr); + + /* Find length of longest item in order to center checklist */ + check_x = 0; + item_foreach() + check_x = MAX(check_x, strlen(item_str()) + 4); + check_x = MIN(check_x, list_width); + + check_x = (list_width - check_x) / 2; + item_x = check_x + 4; + + if (choice >= list_height) { + scroll = choice - list_height + 1; + choice -= scroll; + } + + /* Print the list */ + for (i = 0; i < max_choice; i++) { + item_set(scroll + i); + print_item(list, i, i == choice); + } + + print_arrows(dialog, choice, item_count(), scroll, + box_y, box_x + check_x + 5, list_height); + + print_buttons(dialog, height, width, 0); + + wnoutrefresh(dialog); + wnoutrefresh(list); + doupdate(); + + while (key != KEY_ESC) { + key = wgetch(dialog); + + for (i = 0; i < max_choice; i++) { + item_set(i + scroll); + if (toupper(key) == toupper(item_str()[0])) + break; + } + + if (i < max_choice || key == KEY_UP || key == KEY_DOWN || + key == '+' || key == '-') { + if (key == KEY_UP || key == '-') { + if (!choice) { + if (!scroll) + continue; + /* Scroll list down */ + if (list_height > 1) { + /* De-highlight current first item */ + item_set(scroll); + print_item(list, 0, FALSE); + scrollok(list, TRUE); + wscrl(list, -1); + scrollok(list, FALSE); + } + scroll--; + item_set(scroll); + print_item(list, 0, TRUE); + print_arrows(dialog, choice, item_count(), + scroll, box_y, box_x + check_x + 5, list_height); + + wnoutrefresh(dialog); + wrefresh(list); + + continue; /* wait for another key press */ + } else + i = choice - 1; + } else if (key == KEY_DOWN || key == '+') { + if (choice == max_choice - 1) { + if (scroll + choice >= item_count() - 1) + continue; + /* Scroll list up */ + if (list_height > 1) { + /* De-highlight current last item before scrolling up */ + item_set(scroll + max_choice - 1); + print_item(list, + max_choice - 1, + FALSE); + scrollok(list, TRUE); + wscrl(list, 1); + scrollok(list, FALSE); + } + scroll++; + item_set(scroll + max_choice - 1); + print_item(list, max_choice - 1, TRUE); + + print_arrows(dialog, choice, item_count(), + scroll, box_y, box_x + check_x + 5, list_height); + + wnoutrefresh(dialog); + wrefresh(list); + + continue; /* wait for another key press */ + } else + i = choice + 1; + } + if (i != choice) { + /* De-highlight current item */ + item_set(scroll + choice); + print_item(list, choice, FALSE); + /* Highlight new item */ + choice = i; + item_set(scroll + choice); + print_item(list, choice, TRUE); + wnoutrefresh(dialog); + wrefresh(list); + } + continue; /* wait for another key press */ + } + switch (key) { + case 'H': + case 'h': + case '?': + button = 1; + /* fall-through */ + case 'S': + case 's': + case ' ': + case '\n': + item_foreach() + item_set_selected(0); + item_set(scroll + choice); + item_set_selected(1); + delwin(list); + delwin(dialog); + return button; + case TAB: + case KEY_LEFT: + case KEY_RIGHT: + button = ((key == KEY_LEFT ? --button : ++button) < 0) + ? 1 : (button > 1 ? 0 : button); + + print_buttons(dialog, height, width, button); + wrefresh(dialog); + break; + case 'X': + case 'x': + key = KEY_ESC; + break; + case KEY_ESC: + key = on_key_esc(dialog); + break; + case KEY_RESIZE: + delwin(list); + delwin(dialog); + on_key_resize(); + goto do_resize; + } + + /* Now, update everything... */ + doupdate(); + } + delwin(list); + delwin(dialog); + return key; /* ESC pressed */ +} diff --git a/support/kconfig/lxdialog/dialog.h b/support/kconfig/lxdialog/dialog.h new file mode 100644 index 0000000000..b4343d3849 --- /dev/null +++ b/support/kconfig/lxdialog/dialog.h @@ -0,0 +1,257 @@ +/* + * dialog.h -- common declarations for all dialog modules + * + * AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include + +#ifndef KBUILD_NO_NLS +# include +#else +# define gettext(Msgid) ((const char *) (Msgid)) +#endif + +#ifdef __sun__ +#define CURS_MACROS +#endif +#include CURSES_LOC + +/* + * Colors in ncurses 1.9.9e do not work properly since foreground and + * background colors are OR'd rather than separately masked. This version + * of dialog was hacked to work with ncurses 1.9.9e, making it incompatible + * with standard curses. The simplest fix (to make this work with standard + * curses) uses the wbkgdset() function, not used in the original hack. + * Turn it off if we're building with 1.9.9e, since it just confuses things. + */ +#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE) +#define OLD_NCURSES 1 +#undef wbkgdset +#define wbkgdset(w,p) /*nothing */ +#else +#define OLD_NCURSES 0 +#endif + +#define TR(params) _tracef params + +#define KEY_ESC 27 +#define TAB 9 +#define MAX_LEN 2048 +#define BUF_SIZE (10*1024) +#define MIN(x,y) (x < y ? x : y) +#define MAX(x,y) (x > y ? x : y) + +#ifndef ACS_ULCORNER +#define ACS_ULCORNER '+' +#endif +#ifndef ACS_LLCORNER +#define ACS_LLCORNER '+' +#endif +#ifndef ACS_URCORNER +#define ACS_URCORNER '+' +#endif +#ifndef ACS_LRCORNER +#define ACS_LRCORNER '+' +#endif +#ifndef ACS_HLINE +#define ACS_HLINE '-' +#endif +#ifndef ACS_VLINE +#define ACS_VLINE '|' +#endif +#ifndef ACS_LTEE +#define ACS_LTEE '+' +#endif +#ifndef ACS_RTEE +#define ACS_RTEE '+' +#endif +#ifndef ACS_UARROW +#define ACS_UARROW '^' +#endif +#ifndef ACS_DARROW +#define ACS_DARROW 'v' +#endif + +/* error return codes */ +#define ERRDISPLAYTOOSMALL (KEY_MAX + 1) + +/* + * Color definitions + */ +struct dialog_color { + chtype atr; /* Color attribute */ + int fg; /* foreground */ + int bg; /* background */ + int hl; /* highlight this item */ +}; + +struct subtitle_list { + struct subtitle_list *next; + const char *text; +}; + +struct dialog_info { + const char *backtitle; + struct subtitle_list *subtitles; + struct dialog_color screen; + struct dialog_color shadow; + struct dialog_color dialog; + struct dialog_color title; + struct dialog_color border; + struct dialog_color button_active; + struct dialog_color button_inactive; + struct dialog_color button_key_active; + struct dialog_color button_key_inactive; + struct dialog_color button_label_active; + struct dialog_color button_label_inactive; + struct dialog_color inputbox; + struct dialog_color inputbox_border; + struct dialog_color searchbox; + struct dialog_color searchbox_title; + struct dialog_color searchbox_border; + struct dialog_color position_indicator; + struct dialog_color menubox; + struct dialog_color menubox_border; + struct dialog_color item; + struct dialog_color item_selected; + struct dialog_color tag; + struct dialog_color tag_selected; + struct dialog_color tag_key; + struct dialog_color tag_key_selected; + struct dialog_color check; + struct dialog_color check_selected; + struct dialog_color uarrow; + struct dialog_color darrow; +}; + +/* + * Global variables + */ +extern struct dialog_info dlg; +extern char dialog_input_result[]; +extern int saved_x, saved_y; /* Needed in signal handler in mconf.c */ + +/* + * Function prototypes + */ + +/* item list as used by checklist and menubox */ +void item_reset(void); +void item_make(const char *fmt, ...); +void item_add_str(const char *fmt, ...); +void item_set_tag(char tag); +void item_set_data(void *p); +void item_set_selected(int val); +int item_activate_selected(void); +void *item_data(void); +char item_tag(void); + +/* item list manipulation for lxdialog use */ +#define MAXITEMSTR 200 +struct dialog_item { + char str[MAXITEMSTR]; /* promtp displayed */ + char tag; + void *data; /* pointer to menu item - used by menubox+checklist */ + int selected; /* Set to 1 by dialog_*() function if selected. */ +}; + +/* list of lialog_items */ +struct dialog_list { + struct dialog_item node; + struct dialog_list *next; +}; + +extern struct dialog_list *item_cur; +extern struct dialog_list item_nil; +extern struct dialog_list *item_head; + +int item_count(void); +void item_set(int n); +int item_n(void); +const char *item_str(void); +int item_is_selected(void); +int item_is_tag(char tag); +#define item_foreach() \ + for (item_cur = item_head ? item_head: item_cur; \ + item_cur && (item_cur != &item_nil); item_cur = item_cur->next) + +/* generic key handlers */ +int on_key_esc(WINDOW *win); +int on_key_resize(void); + +/* minimum (re)size values */ +#define CHECKLIST_HEIGTH_MIN 6 /* For dialog_checklist() */ +#define CHECKLIST_WIDTH_MIN 6 +#define INPUTBOX_HEIGTH_MIN 2 /* For dialog_inputbox() */ +#define INPUTBOX_WIDTH_MIN 2 +#define MENUBOX_HEIGTH_MIN 15 /* For dialog_menu() */ +#define MENUBOX_WIDTH_MIN 65 +#define TEXTBOX_HEIGTH_MIN 8 /* For dialog_textbox() */ +#define TEXTBOX_WIDTH_MIN 8 +#define YESNO_HEIGTH_MIN 4 /* For dialog_yesno() */ +#define YESNO_WIDTH_MIN 4 +#define WINDOW_HEIGTH_MIN 19 /* For init_dialog() */ +#define WINDOW_WIDTH_MIN 80 + +int init_dialog(const char *backtitle); +void set_dialog_backtitle(const char *backtitle); +void set_dialog_subtitles(struct subtitle_list *subtitles); +void end_dialog(int x, int y); +void attr_clear(WINDOW * win, int height, int width, chtype attr); +void dialog_clear(void); +void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x); +void print_button(WINDOW * win, const char *label, int y, int x, int selected); +void print_title(WINDOW *dialog, const char *title, int width); +void draw_box(WINDOW * win, int y, int x, int height, int width, chtype box, + chtype border); +void draw_shadow(WINDOW * win, int y, int x, int height, int width); + +int first_alpha(const char *string, const char *exempt); +int dialog_yesno(const char *title, const char *prompt, int height, int width); +int dialog_msgbox(const char *title, const char *prompt, int height, + int width, int pause); + + +typedef void (*update_text_fn)(char *buf, size_t start, size_t end, void + *_data); +int dialog_textbox(const char *title, char *tbuf, int initial_height, + int initial_width, int *keys, int *_vscroll, int *_hscroll, + update_text_fn update_text, void *data); +int dialog_menu(const char *title, const char *prompt, + const void *selected, int *s_scroll); +int dialog_checklist(const char *title, const char *prompt, int height, + int width, int list_height); +int dialog_inputbox(const char *title, const char *prompt, int height, + int width, const char *init); + +/* + * This is the base for fictitious keys, which activate + * the buttons. + * + * Mouse-generated keys are the following: + * -- the first 32 are used as numbers, in addition to '0'-'9' + * -- the lowercase are used to signal mouse-enter events (M_EVENT + 'o') + * -- uppercase chars are used to invoke the button (M_EVENT + 'O') + */ +#define M_EVENT (KEY_MAX+1) diff --git a/support/kconfig/lxdialog/inputbox.c b/support/kconfig/lxdialog/inputbox.c new file mode 100644 index 0000000000..447a582198 --- /dev/null +++ b/support/kconfig/lxdialog/inputbox.c @@ -0,0 +1,301 @@ +/* + * inputbox.c -- implements the input box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +char dialog_input_result[MAX_LEN + 1]; + +/* + * Print the termination buttons + */ +static void print_buttons(WINDOW * dialog, int height, int width, int selected) +{ + int x = width / 2 - 11; + int y = height - 2; + + print_button(dialog, gettext(" Ok "), y, x, selected == 0); + print_button(dialog, gettext(" Help "), y, x + 14, selected == 1); + + wmove(dialog, y, x + 1 + 14 * selected); + wrefresh(dialog); +} + +/* + * Display a dialog box for inputing a string + */ +int dialog_inputbox(const char *title, const char *prompt, int height, int width, + const char *init) +{ + int i, x, y, box_y, box_x, box_width; + int input_x = 0, key = 0, button = -1; + int show_x, len, pos; + char *instr = dialog_input_result; + WINDOW *dialog; + + if (!init) + instr[0] = '\0'; + else + strcpy(instr, init); + +do_resize: + if (getmaxy(stdscr) <= (height - INPUTBOX_HEIGTH_MIN)) + return -ERRDISPLAYTOOSMALL; + if (getmaxx(stdscr) <= (width - INPUTBOX_WIDTH_MIN)) + return -ERRDISPLAYTOOSMALL; + + /* center dialog box on screen */ + x = (getmaxx(stdscr) - width) / 2; + y = (getmaxy(stdscr) - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, + dlg.dialog.atr, dlg.border.atr); + wattrset(dialog, dlg.border.atr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dlg.dialog.atr); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dlg.dialog.atr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + /* Draw the input field box */ + box_width = width - 6; + getyx(dialog, y, x); + box_y = y + 2; + box_x = (width - box_width) / 2; + draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2, + dlg.dialog.atr, dlg.border.atr); + + print_buttons(dialog, height, width, 0); + + /* Set up the initial value */ + wmove(dialog, box_y, box_x); + wattrset(dialog, dlg.inputbox.atr); + + len = strlen(instr); + pos = len; + + if (len >= box_width) { + show_x = len - box_width + 1; + input_x = box_width - 1; + for (i = 0; i < box_width - 1; i++) + waddch(dialog, instr[show_x + i]); + } else { + show_x = 0; + input_x = len; + waddstr(dialog, instr); + } + + wmove(dialog, box_y, box_x + input_x); + + wrefresh(dialog); + + while (key != KEY_ESC) { + key = wgetch(dialog); + + if (button == -1) { /* Input box selected */ + switch (key) { + case TAB: + case KEY_UP: + case KEY_DOWN: + break; + case KEY_BACKSPACE: + case 127: + if (pos) { + wattrset(dialog, dlg.inputbox.atr); + if (input_x == 0) { + show_x--; + } else + input_x--; + + if (pos < len) { + for (i = pos - 1; i < len; i++) { + instr[i] = instr[i+1]; + } + } + + pos--; + len--; + instr[len] = '\0'; + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) { + if (!instr[show_x + i]) { + waddch(dialog, ' '); + break; + } + waddch(dialog, instr[show_x + i]); + } + wmove(dialog, box_y, input_x + box_x); + wrefresh(dialog); + } + continue; + case KEY_LEFT: + if (pos > 0) { + if (input_x > 0) { + wmove(dialog, box_y, --input_x + box_x); + } else if (input_x == 0) { + show_x--; + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) { + if (!instr[show_x + i]) { + waddch(dialog, ' '); + break; + } + waddch(dialog, instr[show_x + i]); + } + wmove(dialog, box_y, box_x); + } + pos--; + } + continue; + case KEY_RIGHT: + if (pos < len) { + if (input_x < box_width - 1) { + wmove(dialog, box_y, ++input_x + box_x); + } else if (input_x == box_width - 1) { + show_x++; + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) { + if (!instr[show_x + i]) { + waddch(dialog, ' '); + break; + } + waddch(dialog, instr[show_x + i]); + } + wmove(dialog, box_y, input_x + box_x); + } + pos++; + } + continue; + default: + if (key < 0x100 && isprint(key)) { + if (len < MAX_LEN) { + wattrset(dialog, dlg.inputbox.atr); + if (pos < len) { + for (i = len; i > pos; i--) + instr[i] = instr[i-1]; + instr[pos] = key; + } else { + instr[len] = key; + } + pos++; + len++; + instr[len] = '\0'; + + if (input_x == box_width - 1) { + show_x++; + } else { + input_x++; + } + + wmove(dialog, box_y, box_x); + for (i = 0; i < box_width; i++) { + if (!instr[show_x + i]) { + waddch(dialog, ' '); + break; + } + waddch(dialog, instr[show_x + i]); + } + wmove(dialog, box_y, input_x + box_x); + wrefresh(dialog); + } else + flash(); /* Alarm user about overflow */ + continue; + } + } + } + switch (key) { + case 'O': + case 'o': + delwin(dialog); + return 0; + case 'H': + case 'h': + delwin(dialog); + return 1; + case KEY_UP: + case KEY_LEFT: + switch (button) { + case -1: + button = 1; /* Indicates "Help" button is selected */ + print_buttons(dialog, height, width, 1); + break; + case 0: + button = -1; /* Indicates input box is selected */ + print_buttons(dialog, height, width, 0); + wmove(dialog, box_y, box_x + input_x); + wrefresh(dialog); + break; + case 1: + button = 0; /* Indicates "OK" button is selected */ + print_buttons(dialog, height, width, 0); + break; + } + break; + case TAB: + case KEY_DOWN: + case KEY_RIGHT: + switch (button) { + case -1: + button = 0; /* Indicates "OK" button is selected */ + print_buttons(dialog, height, width, 0); + break; + case 0: + button = 1; /* Indicates "Help" button is selected */ + print_buttons(dialog, height, width, 1); + break; + case 1: + button = -1; /* Indicates input box is selected */ + print_buttons(dialog, height, width, 0); + wmove(dialog, box_y, box_x + input_x); + wrefresh(dialog); + break; + } + break; + case ' ': + case '\n': + delwin(dialog); + return (button == -1 ? 0 : button); + case 'X': + case 'x': + key = KEY_ESC; + break; + case KEY_ESC: + key = on_key_esc(dialog); + break; + case KEY_RESIZE: + delwin(dialog); + on_key_resize(); + goto do_resize; + } + } + + delwin(dialog); + return KEY_ESC; /* ESC pressed */ +} diff --git a/support/kconfig/lxdialog/menubox.c b/support/kconfig/lxdialog/menubox.c new file mode 100644 index 0000000000..b0d0d698e1 --- /dev/null +++ b/support/kconfig/lxdialog/menubox.c @@ -0,0 +1,437 @@ +/* + * menubox.c -- implements the menu box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcapw@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/* + * Changes by Clifford Wolf (god@clifford.at) + * + * [ 1998-06-13 ] + * + * *) A bugfix for the Page-Down problem + * + * *) Formerly when I used Page Down and Page Up, the cursor would be set + * to the first position in the menu box. Now lxdialog is a bit + * smarter and works more like other menu systems (just have a look at + * it). + * + * *) Formerly if I selected something my scrolling would be broken because + * lxdialog is re-invoked by the Menuconfig shell script, can't + * remember the last scrolling position, and just sets it so that the + * cursor is at the bottom of the box. Now it writes the temporary file + * lxdialog.scrltmp which contains this information. The file is + * deleted by lxdialog if the user leaves a submenu or enters a new + * one, but it would be nice if Menuconfig could make another "rm -f" + * just to be sure. Just try it out - you will recognise a difference! + * + * [ 1998-06-14 ] + * + * *) Now lxdialog is crash-safe against broken "lxdialog.scrltmp" files + * and menus change their size on the fly. + * + * *) If for some reason the last scrolling position is not saved by + * lxdialog, it sets the scrolling so that the selected item is in the + * middle of the menu box, not at the bottom. + * + * 02 January 1999, Michael Elizabeth Chastain (mec@shout.net) + * Reset 'scroll' to 0 if the value from lxdialog.scrltmp is bogus. + * This fixes a bug in Menuconfig where using ' ' to descend into menus + * would leave mis-synchronized lxdialog.scrltmp files lying around, + * fscanf would read in 'scroll', and eventually that value would get used. + */ + +#include "dialog.h" + +static int menu_width, item_x; + +/* + * Print menu item + */ +static void do_print_item(WINDOW * win, const char *item, int line_y, + int selected, int hotkey) +{ + int j; + char *menu_item = malloc(menu_width + 1); + + strncpy(menu_item, item, menu_width - item_x); + menu_item[menu_width - item_x] = '\0'; + j = first_alpha(menu_item, "YyNnMmHh"); + + /* Clear 'residue' of last item */ + wattrset(win, dlg.menubox.atr); + wmove(win, line_y, 0); +#if OLD_NCURSES + { + int i; + for (i = 0; i < menu_width; i++) + waddch(win, ' '); + } +#else + wclrtoeol(win); +#endif + wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr); + mvwaddstr(win, line_y, item_x, menu_item); + if (hotkey) { + wattrset(win, selected ? dlg.tag_key_selected.atr + : dlg.tag_key.atr); + mvwaddch(win, line_y, item_x + j, menu_item[j]); + } + if (selected) { + wmove(win, line_y, item_x + 1); + } + free(menu_item); + wrefresh(win); +} + +#define print_item(index, choice, selected) \ +do { \ + item_set(index); \ + do_print_item(menu, item_str(), choice, selected, !item_is_tag(':')); \ +} while (0) + +/* + * Print the scroll indicators. + */ +static void print_arrows(WINDOW * win, int item_no, int scroll, int y, int x, + int height) +{ + int cur_y, cur_x; + + getyx(win, cur_y, cur_x); + + wmove(win, y, x); + + if (scroll > 0) { + wattrset(win, dlg.uarrow.atr); + waddch(win, ACS_UARROW); + waddstr(win, "(-)"); + } else { + wattrset(win, dlg.menubox.atr); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + } + + y = y + height + 1; + wmove(win, y, x); + wrefresh(win); + + if ((height < item_no) && (scroll + height < item_no)) { + wattrset(win, dlg.darrow.atr); + waddch(win, ACS_DARROW); + waddstr(win, "(+)"); + } else { + wattrset(win, dlg.menubox_border.atr); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + waddch(win, ACS_HLINE); + } + + wmove(win, cur_y, cur_x); + wrefresh(win); +} + +/* + * Display the termination buttons. + */ +static void print_buttons(WINDOW * win, int height, int width, int selected) +{ + int x = width / 2 - 28; + int y = height - 2; + + print_button(win, gettext("Select"), y, x, selected == 0); + print_button(win, gettext(" Exit "), y, x + 12, selected == 1); + print_button(win, gettext(" Help "), y, x + 24, selected == 2); + print_button(win, gettext(" Save "), y, x + 36, selected == 3); + print_button(win, gettext(" Load "), y, x + 48, selected == 4); + + wmove(win, y, x + 1 + 12 * selected); + wrefresh(win); +} + +/* scroll up n lines (n may be negative) */ +static void do_scroll(WINDOW *win, int *scroll, int n) +{ + /* Scroll menu up */ + scrollok(win, TRUE); + wscrl(win, n); + scrollok(win, FALSE); + *scroll = *scroll + n; + wrefresh(win); +} + +/* + * Display a menu for choosing among a number of options + */ +int dialog_menu(const char *title, const char *prompt, + const void *selected, int *s_scroll) +{ + int i, j, x, y, box_x, box_y; + int height, width, menu_height; + int key = 0, button = 0, scroll = 0, choice = 0; + int first_item = 0, max_choice; + WINDOW *dialog, *menu; + +do_resize: + height = getmaxy(stdscr); + width = getmaxx(stdscr); + if (height < MENUBOX_HEIGTH_MIN || width < MENUBOX_WIDTH_MIN) + return -ERRDISPLAYTOOSMALL; + + height -= 4; + width -= 5; + menu_height = height - 10; + + max_choice = MIN(menu_height, item_count()); + + /* center dialog box on screen */ + x = (getmaxx(stdscr) - width) / 2; + y = (getmaxy(stdscr) - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, + dlg.dialog.atr, dlg.border.atr); + wattrset(dialog, dlg.border.atr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dlg.dialog.atr); + wbkgdset(dialog, dlg.dialog.atr & A_COLOR); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dlg.dialog.atr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + menu_width = width - 6; + box_y = height - menu_height - 5; + box_x = (width - menu_width) / 2 - 1; + + /* create new window for the menu */ + menu = subwin(dialog, menu_height, menu_width, + y + box_y + 1, x + box_x + 1); + keypad(menu, TRUE); + + /* draw a box around the menu items */ + draw_box(dialog, box_y, box_x, menu_height + 2, menu_width + 2, + dlg.menubox_border.atr, dlg.menubox.atr); + + if (menu_width >= 80) + item_x = (menu_width - 70) / 2; + else + item_x = 4; + + /* Set choice to default item */ + item_foreach() + if (selected && (selected == item_data())) + choice = item_n(); + /* get the saved scroll info */ + scroll = *s_scroll; + if ((scroll <= choice) && (scroll + max_choice > choice) && + (scroll >= 0) && (scroll + max_choice <= item_count())) { + first_item = scroll; + choice = choice - scroll; + } else { + scroll = 0; + } + if ((choice >= max_choice)) { + if (choice >= item_count() - max_choice / 2) + scroll = first_item = item_count() - max_choice; + else + scroll = first_item = choice - max_choice / 2; + choice = choice - scroll; + } + + /* Print the menu */ + for (i = 0; i < max_choice; i++) { + print_item(first_item + i, i, i == choice); + } + + wnoutrefresh(menu); + + print_arrows(dialog, item_count(), scroll, + box_y, box_x + item_x + 1, menu_height); + + print_buttons(dialog, height, width, 0); + wmove(menu, choice, item_x + 1); + wrefresh(menu); + + while (key != KEY_ESC) { + key = wgetch(menu); + + if (key < 256 && isalpha(key)) + key = tolower(key); + + if (strchr("ynmh ", key)) + i = max_choice; + else { + for (i = choice + 1; i < max_choice; i++) { + item_set(scroll + i); + j = first_alpha(item_str(), "YyNnMmHh"); + if (key == tolower(item_str()[j])) + break; + } + if (i == max_choice) + for (i = 0; i < max_choice; i++) { + item_set(scroll + i); + j = first_alpha(item_str(), "YyNnMmHh"); + if (key == tolower(item_str()[j])) + break; + } + } + + if (item_count() != 0 && + (i < max_choice || + key == KEY_UP || key == KEY_DOWN || + key == '-' || key == '+' || + key == KEY_PPAGE || key == KEY_NPAGE)) { + /* Remove highligt of current item */ + print_item(scroll + choice, choice, FALSE); + + if (key == KEY_UP || key == '-') { + if (choice < 2 && scroll) { + /* Scroll menu down */ + do_scroll(menu, &scroll, -1); + + print_item(scroll, 0, FALSE); + } else + choice = MAX(choice - 1, 0); + + } else if (key == KEY_DOWN || key == '+') { + print_item(scroll+choice, choice, FALSE); + + if ((choice > max_choice - 3) && + (scroll + max_choice < item_count())) { + /* Scroll menu up */ + do_scroll(menu, &scroll, 1); + + print_item(scroll+max_choice - 1, + max_choice - 1, FALSE); + } else + choice = MIN(choice + 1, max_choice - 1); + + } else if (key == KEY_PPAGE) { + scrollok(menu, TRUE); + for (i = 0; (i < max_choice); i++) { + if (scroll > 0) { + do_scroll(menu, &scroll, -1); + print_item(scroll, 0, FALSE); + } else { + if (choice > 0) + choice--; + } + } + + } else if (key == KEY_NPAGE) { + for (i = 0; (i < max_choice); i++) { + if (scroll + max_choice < item_count()) { + do_scroll(menu, &scroll, 1); + print_item(scroll+max_choice-1, + max_choice - 1, FALSE); + } else { + if (choice + 1 < max_choice) + choice++; + } + } + } else + choice = i; + + print_item(scroll + choice, choice, TRUE); + + print_arrows(dialog, item_count(), scroll, + box_y, box_x + item_x + 1, menu_height); + + wnoutrefresh(dialog); + wrefresh(menu); + + continue; /* wait for another key press */ + } + + switch (key) { + case KEY_LEFT: + case TAB: + case KEY_RIGHT: + button = ((key == KEY_LEFT ? --button : ++button) < 0) + ? 4 : (button > 4 ? 0 : button); + + print_buttons(dialog, height, width, button); + wrefresh(menu); + break; + case ' ': + case 's': + case 'y': + case 'n': + case 'm': + case '/': + case 'h': + case '?': + case 'z': + case '\n': + /* save scroll info */ + *s_scroll = scroll; + delwin(menu); + delwin(dialog); + item_set(scroll + choice); + item_set_selected(1); + switch (key) { + case 'h': + case '?': + return 2; + case 's': + case 'y': + return 5; + case 'n': + return 6; + case 'm': + return 7; + case ' ': + return 8; + case '/': + return 9; + case 'z': + return 10; + case '\n': + return button; + } + return 0; + case 'e': + case 'x': + key = KEY_ESC; + break; + case KEY_ESC: + key = on_key_esc(menu); + break; + case KEY_RESIZE: + on_key_resize(); + delwin(menu); + delwin(dialog); + goto do_resize; + } + } + delwin(menu); + delwin(dialog); + return key; /* ESC pressed */ +} diff --git a/support/kconfig/lxdialog/textbox.c b/support/kconfig/lxdialog/textbox.c new file mode 100644 index 0000000000..1773319b95 --- /dev/null +++ b/support/kconfig/lxdialog/textbox.c @@ -0,0 +1,408 @@ +/* + * textbox.c -- implements the text box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +static void back_lines(int n); +static void print_page(WINDOW *win, int height, int width, update_text_fn + update_text, void *data); +static void print_line(WINDOW *win, int row, int width); +static char *get_line(void); +static void print_position(WINDOW * win); + +static int hscroll; +static int begin_reached, end_reached, page_length; +static char *buf; +static char *page; + +/* + * refresh window content + */ +static void refresh_text_box(WINDOW *dialog, WINDOW *box, int boxh, int boxw, + int cur_y, int cur_x, update_text_fn update_text, + void *data) +{ + print_page(box, boxh, boxw, update_text, data); + print_position(dialog); + wmove(dialog, cur_y, cur_x); /* Restore cursor position */ + wrefresh(dialog); +} + + +/* + * Display text from a file in a dialog box. + * + * keys is a null-terminated array + * update_text() may not add or remove any '\n' or '\0' in tbuf + */ +int dialog_textbox(const char *title, char *tbuf, int initial_height, + int initial_width, int *keys, int *_vscroll, int *_hscroll, + update_text_fn update_text, void *data) +{ + int i, x, y, cur_x, cur_y, key = 0; + int height, width, boxh, boxw; + WINDOW *dialog, *box; + bool done = false; + + begin_reached = 1; + end_reached = 0; + page_length = 0; + hscroll = 0; + buf = tbuf; + page = buf; /* page is pointer to start of page to be displayed */ + + if (_vscroll && *_vscroll) { + begin_reached = 0; + + for (i = 0; i < *_vscroll; i++) + get_line(); + } + if (_hscroll) + hscroll = *_hscroll; + +do_resize: + getmaxyx(stdscr, height, width); + if (height < TEXTBOX_HEIGTH_MIN || width < TEXTBOX_WIDTH_MIN) + return -ERRDISPLAYTOOSMALL; + if (initial_height != 0) + height = initial_height; + else + if (height > 4) + height -= 4; + else + height = 0; + if (initial_width != 0) + width = initial_width; + else + if (width > 5) + width -= 5; + else + width = 0; + + /* center dialog box on screen */ + x = (getmaxx(stdscr) - width) / 2; + y = (getmaxy(stdscr) - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + /* Create window for box region, used for scrolling text */ + boxh = height - 4; + boxw = width - 2; + box = subwin(dialog, boxh, boxw, y + 1, x + 1); + wattrset(box, dlg.dialog.atr); + wbkgdset(box, dlg.dialog.atr & A_COLOR); + + keypad(box, TRUE); + + /* register the new window, along with its borders */ + draw_box(dialog, 0, 0, height, width, + dlg.dialog.atr, dlg.border.atr); + + wattrset(dialog, dlg.border.atr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dlg.dialog.atr); + wbkgdset(dialog, dlg.dialog.atr & A_COLOR); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + print_button(dialog, gettext(" Exit "), height - 2, width / 2 - 4, TRUE); + wnoutrefresh(dialog); + getyx(dialog, cur_y, cur_x); /* Save cursor position */ + + /* Print first page of text */ + attr_clear(box, boxh, boxw, dlg.dialog.atr); + refresh_text_box(dialog, box, boxh, boxw, cur_y, cur_x, update_text, + data); + + while (!done) { + key = wgetch(dialog); + switch (key) { + case 'E': /* Exit */ + case 'e': + case 'X': + case 'x': + case 'q': + case '\n': + done = true; + break; + case 'g': /* First page */ + case KEY_HOME: + if (!begin_reached) { + begin_reached = 1; + page = buf; + refresh_text_box(dialog, box, boxh, boxw, + cur_y, cur_x, update_text, + data); + } + break; + case 'G': /* Last page */ + case KEY_END: + + end_reached = 1; + /* point to last char in buf */ + page = buf + strlen(buf); + back_lines(boxh); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case 'K': /* Previous line */ + case 'k': + case KEY_UP: + if (begin_reached) + break; + + back_lines(page_length + 1); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case 'B': /* Previous page */ + case 'b': + case 'u': + case KEY_PPAGE: + if (begin_reached) + break; + back_lines(page_length + boxh); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case 'J': /* Next line */ + case 'j': + case KEY_DOWN: + if (end_reached) + break; + + back_lines(page_length - 1); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case KEY_NPAGE: /* Next page */ + case ' ': + case 'd': + if (end_reached) + break; + + begin_reached = 0; + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case '0': /* Beginning of line */ + case 'H': /* Scroll left */ + case 'h': + case KEY_LEFT: + if (hscroll <= 0) + break; + + if (key == '0') + hscroll = 0; + else + hscroll--; + /* Reprint current page to scroll horizontally */ + back_lines(page_length); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case 'L': /* Scroll right */ + case 'l': + case KEY_RIGHT: + if (hscroll >= MAX_LEN) + break; + hscroll++; + /* Reprint current page to scroll horizontally */ + back_lines(page_length); + refresh_text_box(dialog, box, boxh, boxw, cur_y, + cur_x, update_text, data); + break; + case KEY_ESC: + if (on_key_esc(dialog) == KEY_ESC) + done = true; + break; + case KEY_RESIZE: + back_lines(height); + delwin(box); + delwin(dialog); + on_key_resize(); + goto do_resize; + default: + for (i = 0; keys[i]; i++) { + if (key == keys[i]) { + done = true; + break; + } + } + } + } + delwin(box); + delwin(dialog); + if (_vscroll) { + const char *s; + + s = buf; + *_vscroll = 0; + back_lines(page_length); + while (s < page && (s = strchr(s, '\n'))) { + (*_vscroll)++; + s++; + } + } + if (_hscroll) + *_hscroll = hscroll; + return key; +} + +/* + * Go back 'n' lines in text. Called by dialog_textbox(). + * 'page' will be updated to point to the desired line in 'buf'. + */ +static void back_lines(int n) +{ + int i; + + begin_reached = 0; + /* Go back 'n' lines */ + for (i = 0; i < n; i++) { + if (*page == '\0') { + if (end_reached) { + end_reached = 0; + continue; + } + } + if (page == buf) { + begin_reached = 1; + return; + } + page--; + do { + if (page == buf) { + begin_reached = 1; + return; + } + page--; + } while (*page != '\n'); + page++; + } +} + +/* + * Print a new page of text. + */ +static void print_page(WINDOW *win, int height, int width, update_text_fn + update_text, void *data) +{ + int i, passed_end = 0; + + if (update_text) { + char *end; + + for (i = 0; i < height; i++) + get_line(); + end = page; + back_lines(height); + update_text(buf, page - buf, end - buf, data); + } + + page_length = 0; + for (i = 0; i < height; i++) { + print_line(win, i, width); + if (!passed_end) + page_length++; + if (end_reached && !passed_end) + passed_end = 1; + } + wnoutrefresh(win); +} + +/* + * Print a new line of text. + */ +static void print_line(WINDOW * win, int row, int width) +{ + char *line; + + line = get_line(); + line += MIN(strlen(line), hscroll); /* Scroll horizontally */ + wmove(win, row, 0); /* move cursor to correct line */ + waddch(win, ' '); + waddnstr(win, line, MIN(strlen(line), width - 2)); + + /* Clear 'residue' of previous line */ +#if OLD_NCURSES + { + int x = getcurx(win); + int i; + for (i = 0; i < width - x; i++) + waddch(win, ' '); + } +#else + wclrtoeol(win); +#endif +} + +/* + * Return current line of text. Called by dialog_textbox() and print_line(). + * 'page' should point to start of current line before calling, and will be + * updated to point to start of next line. + */ +static char *get_line(void) +{ + int i = 0; + static char line[MAX_LEN + 1]; + + end_reached = 0; + while (*page != '\n') { + if (*page == '\0') { + end_reached = 1; + break; + } else if (i < MAX_LEN) + line[i++] = *(page++); + else { + /* Truncate lines longer than MAX_LEN characters */ + if (i == MAX_LEN) + line[i++] = '\0'; + page++; + } + } + if (i <= MAX_LEN) + line[i] = '\0'; + if (!end_reached) + page++; /* move past '\n' */ + + return line; +} + +/* + * Print current position + */ +static void print_position(WINDOW * win) +{ + int percent; + + wattrset(win, dlg.position_indicator.atr); + wbkgdset(win, dlg.position_indicator.atr & A_COLOR); + percent = (page - buf) * 100 / strlen(buf); + wmove(win, getmaxy(win) - 3, getmaxx(win) - 9); + wprintw(win, "(%3d%%)", percent); +} diff --git a/support/kconfig/lxdialog/util.c b/support/kconfig/lxdialog/util.c new file mode 100644 index 0000000000..58a8289dd6 --- /dev/null +++ b/support/kconfig/lxdialog/util.c @@ -0,0 +1,713 @@ +/* + * util.c + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include + +#include "dialog.h" + +/* Needed in signal handler in mconf.c */ +int saved_x, saved_y; + +struct dialog_info dlg; + +static void set_mono_theme(void) +{ + dlg.screen.atr = A_NORMAL; + dlg.shadow.atr = A_NORMAL; + dlg.dialog.atr = A_NORMAL; + dlg.title.atr = A_BOLD; + dlg.border.atr = A_NORMAL; + dlg.button_active.atr = A_REVERSE; + dlg.button_inactive.atr = A_DIM; + dlg.button_key_active.atr = A_REVERSE; + dlg.button_key_inactive.atr = A_BOLD; + dlg.button_label_active.atr = A_REVERSE; + dlg.button_label_inactive.atr = A_NORMAL; + dlg.inputbox.atr = A_NORMAL; + dlg.inputbox_border.atr = A_NORMAL; + dlg.searchbox.atr = A_NORMAL; + dlg.searchbox_title.atr = A_BOLD; + dlg.searchbox_border.atr = A_NORMAL; + dlg.position_indicator.atr = A_BOLD; + dlg.menubox.atr = A_NORMAL; + dlg.menubox_border.atr = A_NORMAL; + dlg.item.atr = A_NORMAL; + dlg.item_selected.atr = A_REVERSE; + dlg.tag.atr = A_BOLD; + dlg.tag_selected.atr = A_REVERSE; + dlg.tag_key.atr = A_BOLD; + dlg.tag_key_selected.atr = A_REVERSE; + dlg.check.atr = A_BOLD; + dlg.check_selected.atr = A_REVERSE; + dlg.uarrow.atr = A_BOLD; + dlg.darrow.atr = A_BOLD; +} + +#define DLG_COLOR(dialog, f, b, h) \ +do { \ + dlg.dialog.fg = (f); \ + dlg.dialog.bg = (b); \ + dlg.dialog.hl = (h); \ +} while (0) + +static void set_classic_theme(void) +{ + DLG_COLOR(screen, COLOR_CYAN, COLOR_BLUE, true); + DLG_COLOR(shadow, COLOR_BLACK, COLOR_BLACK, true); + DLG_COLOR(dialog, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(title, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(border, COLOR_WHITE, COLOR_WHITE, true); + DLG_COLOR(button_active, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(button_inactive, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(button_key_active, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(button_key_inactive, COLOR_RED, COLOR_WHITE, false); + DLG_COLOR(button_label_active, COLOR_YELLOW, COLOR_BLUE, true); + DLG_COLOR(button_label_inactive, COLOR_BLACK, COLOR_WHITE, true); + DLG_COLOR(inputbox, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(inputbox_border, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(searchbox, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(searchbox_title, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(searchbox_border, COLOR_WHITE, COLOR_WHITE, true); + DLG_COLOR(position_indicator, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(menubox, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(menubox_border, COLOR_WHITE, COLOR_WHITE, true); + DLG_COLOR(item, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(item_selected, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(tag, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(tag_selected, COLOR_YELLOW, COLOR_BLUE, true); + DLG_COLOR(tag_key, COLOR_YELLOW, COLOR_WHITE, true); + DLG_COLOR(tag_key_selected, COLOR_YELLOW, COLOR_BLUE, true); + DLG_COLOR(check, COLOR_BLACK, COLOR_WHITE, false); + DLG_COLOR(check_selected, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(uarrow, COLOR_GREEN, COLOR_WHITE, true); + DLG_COLOR(darrow, COLOR_GREEN, COLOR_WHITE, true); +} + +static void set_blackbg_theme(void) +{ + DLG_COLOR(screen, COLOR_RED, COLOR_BLACK, true); + DLG_COLOR(shadow, COLOR_BLACK, COLOR_BLACK, false); + DLG_COLOR(dialog, COLOR_WHITE, COLOR_BLACK, false); + DLG_COLOR(title, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(border, COLOR_BLACK, COLOR_BLACK, true); + + DLG_COLOR(button_active, COLOR_YELLOW, COLOR_RED, false); + DLG_COLOR(button_inactive, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(button_key_active, COLOR_YELLOW, COLOR_RED, true); + DLG_COLOR(button_key_inactive, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(button_label_active, COLOR_WHITE, COLOR_RED, false); + DLG_COLOR(button_label_inactive, COLOR_BLACK, COLOR_BLACK, true); + + DLG_COLOR(inputbox, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(inputbox_border, COLOR_YELLOW, COLOR_BLACK, false); + + DLG_COLOR(searchbox, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(searchbox_title, COLOR_YELLOW, COLOR_BLACK, true); + DLG_COLOR(searchbox_border, COLOR_BLACK, COLOR_BLACK, true); + + DLG_COLOR(position_indicator, COLOR_RED, COLOR_BLACK, false); + + DLG_COLOR(menubox, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(menubox_border, COLOR_BLACK, COLOR_BLACK, true); + + DLG_COLOR(item, COLOR_WHITE, COLOR_BLACK, false); + DLG_COLOR(item_selected, COLOR_WHITE, COLOR_RED, false); + + DLG_COLOR(tag, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(tag_selected, COLOR_YELLOW, COLOR_RED, true); + DLG_COLOR(tag_key, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(tag_key_selected, COLOR_YELLOW, COLOR_RED, true); + + DLG_COLOR(check, COLOR_YELLOW, COLOR_BLACK, false); + DLG_COLOR(check_selected, COLOR_YELLOW, COLOR_RED, true); + + DLG_COLOR(uarrow, COLOR_RED, COLOR_BLACK, false); + DLG_COLOR(darrow, COLOR_RED, COLOR_BLACK, false); +} + +static void set_bluetitle_theme(void) +{ + set_classic_theme(); + DLG_COLOR(title, COLOR_BLUE, COLOR_WHITE, true); + DLG_COLOR(button_key_active, COLOR_YELLOW, COLOR_BLUE, true); + DLG_COLOR(button_label_active, COLOR_WHITE, COLOR_BLUE, true); + DLG_COLOR(searchbox_title, COLOR_BLUE, COLOR_WHITE, true); + DLG_COLOR(position_indicator, COLOR_BLUE, COLOR_WHITE, true); + DLG_COLOR(tag, COLOR_BLUE, COLOR_WHITE, true); + DLG_COLOR(tag_key, COLOR_BLUE, COLOR_WHITE, true); + +} + +/* + * Select color theme + */ +static int set_theme(const char *theme) +{ + int use_color = 1; + if (!theme) + set_bluetitle_theme(); + else if (strcmp(theme, "classic") == 0) + set_classic_theme(); + else if (strcmp(theme, "bluetitle") == 0) + set_bluetitle_theme(); + else if (strcmp(theme, "blackbg") == 0) + set_blackbg_theme(); + else if (strcmp(theme, "mono") == 0) + use_color = 0; + + return use_color; +} + +static void init_one_color(struct dialog_color *color) +{ + static int pair = 0; + + pair++; + init_pair(pair, color->fg, color->bg); + if (color->hl) + color->atr = A_BOLD | COLOR_PAIR(pair); + else + color->atr = COLOR_PAIR(pair); +} + +static void init_dialog_colors(void) +{ + init_one_color(&dlg.screen); + init_one_color(&dlg.shadow); + init_one_color(&dlg.dialog); + init_one_color(&dlg.title); + init_one_color(&dlg.border); + init_one_color(&dlg.button_active); + init_one_color(&dlg.button_inactive); + init_one_color(&dlg.button_key_active); + init_one_color(&dlg.button_key_inactive); + init_one_color(&dlg.button_label_active); + init_one_color(&dlg.button_label_inactive); + init_one_color(&dlg.inputbox); + init_one_color(&dlg.inputbox_border); + init_one_color(&dlg.searchbox); + init_one_color(&dlg.searchbox_title); + init_one_color(&dlg.searchbox_border); + init_one_color(&dlg.position_indicator); + init_one_color(&dlg.menubox); + init_one_color(&dlg.menubox_border); + init_one_color(&dlg.item); + init_one_color(&dlg.item_selected); + init_one_color(&dlg.tag); + init_one_color(&dlg.tag_selected); + init_one_color(&dlg.tag_key); + init_one_color(&dlg.tag_key_selected); + init_one_color(&dlg.check); + init_one_color(&dlg.check_selected); + init_one_color(&dlg.uarrow); + init_one_color(&dlg.darrow); +} + +/* + * Setup for color display + */ +static void color_setup(const char *theme) +{ + int use_color; + + use_color = set_theme(theme); + if (use_color && has_colors()) { + start_color(); + init_dialog_colors(); + } else + set_mono_theme(); +} + +/* + * Set window to attribute 'attr' + */ +void attr_clear(WINDOW * win, int height, int width, chtype attr) +{ + int i, j; + + wattrset(win, attr); + for (i = 0; i < height; i++) { + wmove(win, i, 0); + for (j = 0; j < width; j++) + waddch(win, ' '); + } + touchwin(win); +} + +void dialog_clear(void) +{ + int lines, columns; + + lines = getmaxy(stdscr); + columns = getmaxx(stdscr); + + attr_clear(stdscr, lines, columns, dlg.screen.atr); + /* Display background title if it exists ... - SLH */ + if (dlg.backtitle != NULL) { + int i, len = 0, skip = 0; + struct subtitle_list *pos; + + wattrset(stdscr, dlg.screen.atr); + mvwaddstr(stdscr, 0, 1, (char *)dlg.backtitle); + + for (pos = dlg.subtitles; pos != NULL; pos = pos->next) { + /* 3 is for the arrow and spaces */ + len += strlen(pos->text) + 3; + } + + wmove(stdscr, 1, 1); + if (len > columns - 2) { + const char *ellipsis = "[...] "; + waddstr(stdscr, ellipsis); + skip = len - (columns - 2 - strlen(ellipsis)); + } + + for (pos = dlg.subtitles; pos != NULL; pos = pos->next) { + if (skip == 0) + waddch(stdscr, ACS_RARROW); + else + skip--; + + if (skip == 0) + waddch(stdscr, ' '); + else + skip--; + + if (skip < strlen(pos->text)) { + waddstr(stdscr, pos->text + skip); + skip = 0; + } else + skip -= strlen(pos->text); + + if (skip == 0) + waddch(stdscr, ' '); + else + skip--; + } + + for (i = len + 1; i < columns - 1; i++) + waddch(stdscr, ACS_HLINE); + } + wnoutrefresh(stdscr); +} + +/* + * Do some initialization for dialog + */ +int init_dialog(const char *backtitle) +{ + int height, width; + + initscr(); /* Init curses */ + + /* Get current cursor position for signal handler in mconf.c */ + getyx(stdscr, saved_y, saved_x); + + getmaxyx(stdscr, height, width); + if (height < WINDOW_HEIGTH_MIN || width < WINDOW_WIDTH_MIN) { + endwin(); + return -ERRDISPLAYTOOSMALL; + } + + dlg.backtitle = backtitle; + color_setup(getenv("MENUCONFIG_COLOR")); + + keypad(stdscr, TRUE); + cbreak(); + noecho(); + dialog_clear(); + + return 0; +} + +void set_dialog_backtitle(const char *backtitle) +{ + dlg.backtitle = backtitle; +} + +void set_dialog_subtitles(struct subtitle_list *subtitles) +{ + dlg.subtitles = subtitles; +} + +/* + * End using dialog functions. + */ +void end_dialog(int x, int y) +{ + /* move cursor back to original position */ + move(y, x); + refresh(); + endwin(); +} + +/* Print the title of the dialog. Center the title and truncate + * tile if wider than dialog (- 2 chars). + **/ +void print_title(WINDOW *dialog, const char *title, int width) +{ + if (title) { + int tlen = MIN(width - 2, strlen(title)); + wattrset(dialog, dlg.title.atr); + mvwaddch(dialog, 0, (width - tlen) / 2 - 1, ' '); + mvwaddnstr(dialog, 0, (width - tlen)/2, title, tlen); + waddch(dialog, ' '); + } +} + +/* + * Print a string of text in a window, automatically wrap around to the + * next line if the string is too long to fit on one line. Newline + * characters '\n' are propperly processed. We start on a new line + * if there is no room for at least 4 nonblanks following a double-space. + */ +void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x) +{ + int newl, cur_x, cur_y; + int prompt_len, room, wlen; + char tempstr[MAX_LEN + 1], *word, *sp, *sp2, *newline_separator = 0; + + strcpy(tempstr, prompt); + + prompt_len = strlen(tempstr); + + if (prompt_len <= width - x * 2) { /* If prompt is short */ + wmove(win, y, (width - prompt_len) / 2); + waddstr(win, tempstr); + } else { + cur_x = x; + cur_y = y; + newl = 1; + word = tempstr; + while (word && *word) { + sp = strpbrk(word, "\n "); + if (sp && *sp == '\n') + newline_separator = sp; + + if (sp) + *sp++ = 0; + + /* Wrap to next line if either the word does not fit, + or it is the first word of a new sentence, and it is + short, and the next word does not fit. */ + room = width - cur_x; + wlen = strlen(word); + if (wlen > room || + (newl && wlen < 4 && sp + && wlen + 1 + strlen(sp) > room + && (!(sp2 = strpbrk(sp, "\n ")) + || wlen + 1 + (sp2 - sp) > room))) { + cur_y++; + cur_x = x; + } + wmove(win, cur_y, cur_x); + waddstr(win, word); + getyx(win, cur_y, cur_x); + + /* Move to the next line if the word separator was a newline */ + if (newline_separator) { + cur_y++; + cur_x = x; + newline_separator = 0; + } else + cur_x++; + + if (sp && *sp == ' ') { + cur_x++; /* double space */ + while (*++sp == ' ') ; + newl = 1; + } else + newl = 0; + word = sp; + } + } +} + +/* + * Print a button + */ +void print_button(WINDOW * win, const char *label, int y, int x, int selected) +{ + int i, temp; + + wmove(win, y, x); + wattrset(win, selected ? dlg.button_active.atr + : dlg.button_inactive.atr); + waddstr(win, "<"); + temp = strspn(label, " "); + label += temp; + wattrset(win, selected ? dlg.button_label_active.atr + : dlg.button_label_inactive.atr); + for (i = 0; i < temp; i++) + waddch(win, ' '); + wattrset(win, selected ? dlg.button_key_active.atr + : dlg.button_key_inactive.atr); + waddch(win, label[0]); + wattrset(win, selected ? dlg.button_label_active.atr + : dlg.button_label_inactive.atr); + waddstr(win, (char *)label + 1); + wattrset(win, selected ? dlg.button_active.atr + : dlg.button_inactive.atr); + waddstr(win, ">"); + wmove(win, y, x + temp + 1); +} + +/* + * Draw a rectangular box with line drawing characters + */ +void +draw_box(WINDOW * win, int y, int x, int height, int width, + chtype box, chtype border) +{ + int i, j; + + wattrset(win, 0); + for (i = 0; i < height; i++) { + wmove(win, y + i, x); + for (j = 0; j < width; j++) + if (!i && !j) + waddch(win, border | ACS_ULCORNER); + else if (i == height - 1 && !j) + waddch(win, border | ACS_LLCORNER); + else if (!i && j == width - 1) + waddch(win, box | ACS_URCORNER); + else if (i == height - 1 && j == width - 1) + waddch(win, box | ACS_LRCORNER); + else if (!i) + waddch(win, border | ACS_HLINE); + else if (i == height - 1) + waddch(win, box | ACS_HLINE); + else if (!j) + waddch(win, border | ACS_VLINE); + else if (j == width - 1) + waddch(win, box | ACS_VLINE); + else + waddch(win, box | ' '); + } +} + +/* + * Draw shadows along the right and bottom edge to give a more 3D look + * to the boxes + */ +void draw_shadow(WINDOW * win, int y, int x, int height, int width) +{ + int i; + + if (has_colors()) { /* Whether terminal supports color? */ + wattrset(win, dlg.shadow.atr); + wmove(win, y + height, x + 2); + for (i = 0; i < width; i++) + waddch(win, winch(win) & A_CHARTEXT); + for (i = y + 1; i < y + height + 1; i++) { + wmove(win, i, x + width); + waddch(win, winch(win) & A_CHARTEXT); + waddch(win, winch(win) & A_CHARTEXT); + } + wnoutrefresh(win); + } +} + +/* + * Return the position of the first alphabetic character in a string. + */ +int first_alpha(const char *string, const char *exempt) +{ + int i, in_paren = 0, c; + + for (i = 0; i < strlen(string); i++) { + c = tolower(string[i]); + + if (strchr("<[(", c)) + ++in_paren; + if (strchr(">])", c) && in_paren > 0) + --in_paren; + + if ((!in_paren) && isalpha(c) && strchr(exempt, c) == 0) + return i; + } + + return 0; +} + +/* + * ncurses uses ESC to detect escaped char sequences. This resutl in + * a small timeout before ESC is actually delivered to the application. + * lxdialog suggest which is correctly translated to two + * times esc. But then we need to ignore the second esc to avoid stepping + * out one menu too much. Filter away all escaped key sequences since + * keypad(FALSE) turn off ncurses support for escape sequences - and thats + * needed to make notimeout() do as expected. + */ +int on_key_esc(WINDOW *win) +{ + int key; + int key2; + int key3; + + nodelay(win, TRUE); + keypad(win, FALSE); + key = wgetch(win); + key2 = wgetch(win); + do { + key3 = wgetch(win); + } while (key3 != ERR); + nodelay(win, FALSE); + keypad(win, TRUE); + if (key == KEY_ESC && key2 == ERR) + return KEY_ESC; + else if (key != ERR && key != KEY_ESC && key2 == ERR) + ungetch(key); + + return -1; +} + +/* redraw screen in new size */ +int on_key_resize(void) +{ + dialog_clear(); + return KEY_RESIZE; +} + +struct dialog_list *item_cur; +struct dialog_list item_nil; +struct dialog_list *item_head; + +void item_reset(void) +{ + struct dialog_list *p, *next; + + for (p = item_head; p; p = next) { + next = p->next; + free(p); + } + item_head = NULL; + item_cur = &item_nil; +} + +void item_make(const char *fmt, ...) +{ + va_list ap; + struct dialog_list *p = malloc(sizeof(*p)); + + if (item_head) + item_cur->next = p; + else + item_head = p; + item_cur = p; + memset(p, 0, sizeof(*p)); + + va_start(ap, fmt); + vsnprintf(item_cur->node.str, sizeof(item_cur->node.str), fmt, ap); + va_end(ap); +} + +void item_add_str(const char *fmt, ...) +{ + va_list ap; + size_t avail; + + avail = sizeof(item_cur->node.str) - strlen(item_cur->node.str); + + va_start(ap, fmt); + vsnprintf(item_cur->node.str + strlen(item_cur->node.str), + avail, fmt, ap); + item_cur->node.str[sizeof(item_cur->node.str) - 1] = '\0'; + va_end(ap); +} + +void item_set_tag(char tag) +{ + item_cur->node.tag = tag; +} +void item_set_data(void *ptr) +{ + item_cur->node.data = ptr; +} + +void item_set_selected(int val) +{ + item_cur->node.selected = val; +} + +int item_activate_selected(void) +{ + item_foreach() + if (item_is_selected()) + return 1; + return 0; +} + +void *item_data(void) +{ + return item_cur->node.data; +} + +char item_tag(void) +{ + return item_cur->node.tag; +} + +int item_count(void) +{ + int n = 0; + struct dialog_list *p; + + for (p = item_head; p; p = p->next) + n++; + return n; +} + +void item_set(int n) +{ + int i = 0; + item_foreach() + if (i++ == n) + return; +} + +int item_n(void) +{ + int n = 0; + struct dialog_list *p; + + for (p = item_head; p; p = p->next) { + if (p == item_cur) + return n; + n++; + } + return 0; +} + +const char *item_str(void) +{ + return item_cur->node.str; +} + +int item_is_selected(void) +{ + return (item_cur->node.selected != 0); +} + +int item_is_tag(char tag) +{ + return (item_cur->node.tag == tag); +} diff --git a/support/kconfig/lxdialog/yesno.c b/support/kconfig/lxdialog/yesno.c new file mode 100644 index 0000000000..676fb2f824 --- /dev/null +++ b/support/kconfig/lxdialog/yesno.c @@ -0,0 +1,114 @@ +/* + * yesno.c -- implements the yes/no box + * + * ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk) + * MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com) + * + * 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., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include "dialog.h" + +/* + * Display termination buttons + */ +static void print_buttons(WINDOW * dialog, int height, int width, int selected) +{ + int x = width / 2 - 10; + int y = height - 2; + + print_button(dialog, gettext(" Yes "), y, x, selected == 0); + print_button(dialog, gettext(" No "), y, x + 13, selected == 1); + + wmove(dialog, y, x + 1 + 13 * selected); + wrefresh(dialog); +} + +/* + * Display a dialog box with two buttons - Yes and No + */ +int dialog_yesno(const char *title, const char *prompt, int height, int width) +{ + int i, x, y, key = 0, button = 0; + WINDOW *dialog; + +do_resize: + if (getmaxy(stdscr) < (height + YESNO_HEIGTH_MIN)) + return -ERRDISPLAYTOOSMALL; + if (getmaxx(stdscr) < (width + YESNO_WIDTH_MIN)) + return -ERRDISPLAYTOOSMALL; + + /* center dialog box on screen */ + x = (getmaxx(stdscr) - width) / 2; + y = (getmaxy(stdscr) - height) / 2; + + draw_shadow(stdscr, y, x, height, width); + + dialog = newwin(height, width, y, x); + keypad(dialog, TRUE); + + draw_box(dialog, 0, 0, height, width, + dlg.dialog.atr, dlg.border.atr); + wattrset(dialog, dlg.border.atr); + mvwaddch(dialog, height - 3, 0, ACS_LTEE); + for (i = 0; i < width - 2; i++) + waddch(dialog, ACS_HLINE); + wattrset(dialog, dlg.dialog.atr); + waddch(dialog, ACS_RTEE); + + print_title(dialog, title, width); + + wattrset(dialog, dlg.dialog.atr); + print_autowrap(dialog, prompt, width - 2, 1, 3); + + print_buttons(dialog, height, width, 0); + + while (key != KEY_ESC) { + key = wgetch(dialog); + switch (key) { + case 'Y': + case 'y': + delwin(dialog); + return 0; + case 'N': + case 'n': + delwin(dialog); + return 1; + + case TAB: + case KEY_LEFT: + case KEY_RIGHT: + button = ((key == KEY_LEFT ? --button : ++button) < 0) ? 1 : (button > 1 ? 0 : button); + + print_buttons(dialog, height, width, button); + wrefresh(dialog); + break; + case ' ': + case '\n': + delwin(dialog); + return button; + case KEY_ESC: + key = on_key_esc(dialog); + break; + case KEY_RESIZE: + delwin(dialog); + on_key_resize(); + goto do_resize; + } + } + + delwin(dialog); + return key; /* ESC pressed */ +} diff --git a/support/kconfig/mconf.c b/support/kconfig/mconf.c new file mode 100644 index 0000000000..7d6cf80703 --- /dev/null +++ b/support/kconfig/mconf.c @@ -0,0 +1,1037 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + * + * Introduced single menu mode (show all sub-menus in one large tree). + * 2002-11-06 Petr Baudis + * + * i18n, 2005, Arnaldo Carvalho de Melo + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "lkc.h" +#include "lxdialog/dialog.h" + +static const char mconf_readme[] = N_( +"Overview\n" +"--------\n" +"This interface lets you select features and parameters for the build.\n" +"Features can either be built-in, modularized, or ignored. Parameters\n" +"must be entered in as decimal or hexadecimal numbers or text.\n" +"\n" +"Menu items beginning with following braces represent features that\n" +" [ ] can be built in or removed\n" +" < > can be built in, modularized or removed\n" +" { } can be built in or modularized (selected by other feature)\n" +" - - are selected by other feature,\n" +"while *, M or whitespace inside braces means to build in, build as\n" +"a module or to exclude the feature respectively.\n" +"\n" +"To change any of these features, highlight it with the cursor\n" +"keys and press to build it in, to make it a module or\n" +" to remove it. You may also press the to cycle\n" +"through the available options (i.e. Y->N->M->Y).\n" +"\n" +"Some additional keyboard hints:\n" +"\n" +"Menus\n" +"----------\n" +"o Use the Up/Down arrow keys (cursor keys) to highlight the item you\n" +" wish to change or the submenu you wish to select and press .\n" +" Submenus are designated by \"--->\", empty ones by \"----\".\n" +"\n" +" Shortcut: Press the option's highlighted letter (hotkey).\n" +" Pressing a hotkey more than once will sequence\n" +" through all visible items which use that hotkey.\n" +"\n" +" You may also use the and keys to scroll\n" +" unseen options into view.\n" +"\n" +"o To exit a menu use the cursor keys to highlight the button\n" +" and press .\n" +"\n" +" Shortcut: Press or or if there is no hotkey\n" +" using those letters. You may press a single , but\n" +" there is a delayed response which you may find annoying.\n" +"\n" +" Also, the and cursor keys will cycle between and\n" +" \n" +"\n" +"\n" +"Data Entry\n" +"-----------\n" +"o Enter the requested information and press \n" +" If you are entering hexadecimal values, it is not necessary to\n" +" add the '0x' prefix to the entry.\n" +"\n" +"o For help, use the or cursor keys to highlight the help option\n" +" and press . You can try as well.\n" +"\n" +"\n" +"Text Box (Help Window)\n" +"--------\n" +"o Use the cursor keys to scroll up/down/left/right. The VI editor\n" +" keys h,j,k,l function here as do , , and for\n" +" those who are familiar with less and lynx.\n" +"\n" +"o Press , , , or to exit.\n" +"\n" +"\n" +"Alternate Configuration Files\n" +"-----------------------------\n" +"Menuconfig supports the use of alternate configuration files for\n" +"those who, for various reasons, find it necessary to switch\n" +"between different configurations.\n" +"\n" +"The button will let you save the current configuration to\n" +"a file of your choosing. Use the button to load a previously\n" +"saved alternate configuration.\n" +"\n" +"Even if you don't use alternate configuration files, but you find\n" +"during a Menuconfig session that you have completely messed up your\n" +"settings, you may use the button to restore your previously\n" +"saved settings from \".config\" without restarting Menuconfig.\n" +"\n" +"Other information\n" +"-----------------\n" +"If you use Menuconfig in an XTERM window, make sure you have your\n" +"$TERM variable set to point to an xterm definition which supports\n" +"color. Otherwise, Menuconfig will look rather bad. Menuconfig will\n" +"not display correctly in an RXVT window because rxvt displays only one\n" +"intensity of color, bright.\n" +"\n" +"Menuconfig will display larger menus on screens or xterms which are\n" +"set to display more than the standard 25 row by 80 column geometry.\n" +"In order for this to work, the \"stty size\" command must be able to\n" +"display the screen's current row and column geometry. I STRONGLY\n" +"RECOMMEND that you make sure you do NOT have the shell variables\n" +"LINES and COLUMNS exported into your environment. Some distributions\n" +"export those variables via /etc/profile. Some ncurses programs can\n" +"become confused when those variables (LINES & COLUMNS) don't reflect\n" +"the true screen size.\n" +"\n" +"Optional personality available\n" +"------------------------------\n" +"If you prefer to have all of the options listed in a single menu,\n" +"rather than the default multimenu hierarchy, run the menuconfig with\n" +"MENUCONFIG_MODE environment variable set to single_menu. Example:\n" +"\n" +"make MENUCONFIG_MODE=single_menu menuconfig\n" +"\n" +" will then unroll the appropriate category, or enfold it if it\n" +"is already unrolled.\n" +"\n" +"Note that this mode can eventually be a little more CPU expensive\n" +"(especially with a larger number of unrolled categories) than the\n" +"default mode.\n" +"\n" +"Different color themes available\n" +"--------------------------------\n" +"It is possible to select different color themes using the variable\n" +"MENUCONFIG_COLOR. To select a theme use:\n" +"\n" +"make MENUCONFIG_COLOR= menuconfig\n" +"\n" +"Available themes are\n" +" mono => selects colors suitable for monochrome displays\n" +" blackbg => selects a color scheme with black background\n" +" classic => theme with blue background. The classic look\n" +" bluetitle => an LCD friendly version of classic. (default)\n" +"\n"), +menu_instructions[] = N_( + "Arrow keys navigate the menu. " + " selects submenus ---> (or empty submenus ----). " + "Highlighted letters are hotkeys. " + "Pressing selectes a feature, while will exclude a feature. " + "Press to exit, for Help, for Search. " + "Legend: [*] feature is selected [ ] feature is excluded"), +radiolist_instructions[] = N_( + "Use the arrow keys to navigate this window or " + "press the hotkey of the item you wish to select " + "followed by the . " + "Press for additional information about this option."), +inputbox_instructions_int[] = N_( + "Please enter a decimal value. " + "Fractions will not be accepted. " + "Use the key to move from the input field to the buttons below it."), +inputbox_instructions_hex[] = N_( + "Please enter a hexadecimal value. " + "Use the key to move from the input field to the buttons below it."), +inputbox_instructions_string[] = N_( + "Please enter a string value. " + "Use the key to move from the input field to the buttons below it."), +setmod_text[] = N_( + "This feature depends on another which has been configured as a module.\n" + "As a result, this feature will be built as a module."), +load_config_text[] = N_( + "Enter the name of the configuration file you wish to load. " + "Accept the name shown to restore the configuration you " + "last retrieved. Leave blank to abort."), +load_config_help[] = N_( + "\n" + "For various reasons, one may wish to keep several different\n" + "configurations available on a single machine.\n" + "\n" + "If you have saved a previous configuration in a file other than the\n" + "default one, entering its name here will allow you to modify that\n" + "configuration.\n" + "\n" + "If you are uncertain, then you have probably never used alternate\n" + "configuration files. You should therefore leave this blank to abort.\n"), +save_config_text[] = N_( + "Enter a filename to which this configuration should be saved " + "as an alternate. Leave blank to abort."), +save_config_help[] = N_( + "\n" + "For various reasons, one may wish to keep different configurations\n" + "available on a single machine.\n" + "\n" + "Entering a file name here will allow you to later retrieve, modify\n" + "and use the current configuration as an alternate to whatever\n" + "configuration options you have selected at that time.\n" + "\n" + "If you are uncertain what all this means then you should probably\n" + "leave this blank.\n"), +search_help[] = N_( + "\n" + "Search for symbols and display their relations.\n" + "Regular expressions are allowed.\n" + "Example: search for \"^FOO\"\n" + "Result:\n" + "-----------------------------------------------------------------\n" + "Symbol: FOO [=m]\n" + "Type : tristate\n" + "Prompt: Foo bus is used to drive the bar HW\n" + " Location:\n" + " -> Bus options (PCI, PCMCIA, EISA, ISA)\n" + " -> PCI support (PCI [=y])\n" + "(1) -> PCI access mode ( [=y])\n" + " Defined at drivers/pci/Kconfig:47\n" + " Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" + " Selects: LIBCRC32\n" + " Selected by: BAR [=n]\n" + "-----------------------------------------------------------------\n" + "o The line 'Type:' shows the type of the configuration option for\n" + " this symbol (boolean, tristate, string, ...)\n" + "o The line 'Prompt:' shows the text used in the menu structure for\n" + " this symbol\n" + "o The 'Defined at' line tells at what file / line number the symbol\n" + " is defined\n" + "o The 'Depends on:' line tells what symbols need to be defined for\n" + " this symbol to be visible in the menu (selectable)\n" + "o The 'Location:' lines tells where in the menu structure this symbol\n" + " is located\n" + " A location followed by a [=y] indicates that this is a\n" + " selectable menu item - and the current value is displayed inside\n" + " brackets.\n" + " Press the key in the (#) prefix to jump directly to that\n" + " location. You will be returned to the current search results\n" + " after exiting this new menu.\n" + "o The 'Selects:' line tells what symbols will be automatically\n" + " selected if this symbol is selected (y or m)\n" + "o The 'Selected by' line tells what symbol has selected this symbol\n" + "\n" + "Only relevant lines are shown.\n" + "\n\n" + "Search examples:\n" + "Examples: USB => find all symbols containing USB\n" + " ^USB => find all symbols starting with USB\n" + " USB$ => find all symbols ending with USB\n" + "\n"); + +static int indent; +static struct menu *current_menu; +static int child_count; +static int single_menu_mode; +static int show_all_options; +static int save_and_exit; + +static void conf(struct menu *menu, struct menu *active_menu); +static void conf_choice(struct menu *menu); +static void conf_string(struct menu *menu); +static void conf_load(void); +static void conf_save(void); +static int show_textbox_ext(const char *title, char *text, int r, int c, + int *keys, int *vscroll, int *hscroll, + update_text_fn update_text, void *data); +static void show_textbox(const char *title, const char *text, int r, int c); +static void show_helptext(const char *title, const char *text); +static void show_help(struct menu *menu); + +static char filename[PATH_MAX+1]; +static void set_config_filename(const char *config_filename) +{ + static char menu_backtitle[PATH_MAX+128]; + int size; + + size = snprintf(menu_backtitle, sizeof(menu_backtitle), + "%s - %s", config_filename, rootmenu.prompt->text); + if (size >= sizeof(menu_backtitle)) + menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; + set_dialog_backtitle(menu_backtitle); + + size = snprintf(filename, sizeof(filename), "%s", config_filename); + if (size >= sizeof(filename)) + filename[sizeof(filename)-1] = '\0'; +} + +struct subtitle_part { + struct list_head entries; + const char *text; +}; +static LIST_HEAD(trail); + +static struct subtitle_list *subtitles; +static void set_subtitle(void) +{ + struct subtitle_part *sp; + struct subtitle_list *pos, *tmp; + + for (pos = subtitles; pos != NULL; pos = tmp) { + tmp = pos->next; + free(pos); + } + + subtitles = NULL; + list_for_each_entry(sp, &trail, entries) { + if (sp->text) { + if (pos) { + pos->next = xcalloc(sizeof(*pos), 1); + pos = pos->next; + } else { + subtitles = pos = xcalloc(sizeof(*pos), 1); + } + pos->text = sp->text; + } + } + + set_dialog_subtitles(subtitles); +} + +static void reset_subtitle(void) +{ + struct subtitle_list *pos, *tmp; + + for (pos = subtitles; pos != NULL; pos = tmp) { + tmp = pos->next; + free(pos); + } + subtitles = NULL; + set_dialog_subtitles(subtitles); +} + +struct search_data { + struct list_head *head; + struct menu **targets; + int *keys; +}; + +static void update_text(char *buf, size_t start, size_t end, void *_data) +{ + struct search_data *data = _data; + struct jump_key *pos; + int k = 0; + + list_for_each_entry(pos, data->head, entries) { + if (pos->offset >= start && pos->offset < end) { + char header[4]; + + if (k < JUMP_NB) { + int key = '0' + (pos->index % JUMP_NB) + 1; + + sprintf(header, "(%c)", key); + data->keys[k] = key; + data->targets[k] = pos->target; + k++; + } else { + sprintf(header, " "); + } + + memcpy(buf + pos->offset, header, sizeof(header) - 1); + } + } + data->keys[k] = 0; +} + +static void search_conf(void) +{ + struct symbol **sym_arr; + struct gstr res; + struct gstr title; + char *dialog_input; + int dres, vscroll = 0, hscroll = 0; + bool again; + struct gstr sttext; + struct subtitle_part stpart; + + title = str_new(); + str_printf( &title, _("Enter (sub)string or regexp to search for " + "(with or without \"%s\")"), CONFIG_); + +again: + dialog_clear(); + dres = dialog_inputbox(_("Search Configuration Parameter"), + str_get(&title), + 10, 75, ""); + switch (dres) { + case 0: + break; + case 1: + show_helptext(_("Search Configuration"), search_help); + goto again; + default: + str_free(&title); + return; + } + + /* strip the prefix if necessary */ + dialog_input = dialog_input_result; + if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0) + dialog_input += strlen(CONFIG_); + + sttext = str_new(); + str_printf(&sttext, "Search (%s)", dialog_input_result); + stpart.text = str_get(&sttext); + list_add_tail(&stpart.entries, &trail); + + sym_arr = sym_re_search(dialog_input); + do { + LIST_HEAD(head); + struct menu *targets[JUMP_NB]; + int keys[JUMP_NB + 1], i; + struct search_data data = { + .head = &head, + .targets = targets, + .keys = keys, + }; + struct jump_key *pos, *tmp; + + res = get_relations_str(sym_arr, &head); + set_subtitle(); + dres = show_textbox_ext(_("Search Results"), (char *) + str_get(&res), 0, 0, keys, &vscroll, + &hscroll, &update_text, (void *) + &data); + again = false; + for (i = 0; i < JUMP_NB && keys[i]; i++) + if (dres == keys[i]) { + conf(targets[i]->parent, targets[i]); + again = true; + } + str_free(&res); + list_for_each_entry_safe(pos, tmp, &head, entries) + free(pos); + } while (again); + free(sym_arr); + str_free(&title); + list_del(trail.prev); + str_free(&sttext); +} + +static void build_conf(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + int type, tmp, doint = 2; + tristate val; + char ch; + bool visible; + + /* + * note: menu_is_visible() has side effect that it will + * recalc the value of the symbol. + */ + visible = menu_is_visible(menu); + if (show_all_options && !menu_has_prompt(menu)) + return; + else if (!show_all_options && !visible) + return; + + sym = menu->sym; + prop = menu->prompt; + if (!sym) { + if (prop && menu != current_menu) { + const char *prompt = menu_get_prompt(menu); + switch (prop->type) { + case P_MENU: + child_count++; + prompt = _(prompt); + if (single_menu_mode) { + item_make("%s%*c%s", + menu->data ? "-->" : "++>", + indent + 1, ' ', prompt); + } else + item_make(" %*c%s %s", + indent + 1, ' ', prompt, + menu_is_empty(menu) ? "----" : "--->"); + item_set_tag('m'); + item_set_data(menu); + if (single_menu_mode && menu->data) + goto conf_childs; + return; + case P_COMMENT: + if (prompt) { + child_count++; + item_make(" %*c*** %s ***", indent + 1, ' ', _(prompt)); + item_set_tag(':'); + item_set_data(menu); + } + break; + default: + if (prompt) { + child_count++; + item_make("---%*c%s", indent + 1, ' ', _(prompt)); + item_set_tag(':'); + item_set_data(menu); + } + } + } else + doint = 0; + goto conf_childs; + } + + type = sym_get_type(sym); + if (sym_is_choice(sym)) { + struct symbol *def_sym = sym_get_choice_value(sym); + struct menu *def_menu = NULL; + + child_count++; + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child) && child->sym == def_sym) + def_menu = child; + } + + val = sym_get_tristate_value(sym); + if (sym_is_changable(sym)) { + switch (type) { + case S_BOOLEAN: + item_make("[%c]", val == no ? ' ' : '*'); + break; + case S_TRISTATE: + switch (val) { + case yes: ch = '*'; break; + case mod: ch = 'M'; break; + default: ch = ' '; break; + } + item_make("<%c>", ch); + break; + } + item_set_tag('t'); + item_set_data(menu); + } else { + item_make(" "); + item_set_tag(def_menu ? 't' : ':'); + item_set_data(menu); + } + + item_add_str("%*c%s", indent + 1, ' ', _(menu_get_prompt(menu))); + if (val == yes) { + if (def_menu) { + item_add_str(" (%s)", _(menu_get_prompt(def_menu))); + item_add_str(" --->"); + if (def_menu->list) { + indent += 2; + build_conf(def_menu); + indent -= 2; + } + } + return; + } + } else { + if (menu == current_menu) { + item_make("---%*c%s", indent + 1, ' ', _(menu_get_prompt(menu))); + item_set_tag(':'); + item_set_data(menu); + goto conf_childs; + } + child_count++; + val = sym_get_tristate_value(sym); + if (sym_is_choice_value(sym) && val == yes) { + item_make(" "); + item_set_tag(':'); + item_set_data(menu); + } else { + switch (type) { + case S_BOOLEAN: + if (sym_is_changable(sym)) + item_make("[%c]", val == no ? ' ' : '*'); + else + item_make("-%c-", val == no ? ' ' : '*'); + item_set_tag('t'); + item_set_data(menu); + break; + case S_TRISTATE: + switch (val) { + case yes: ch = '*'; break; + case mod: ch = 'M'; break; + default: ch = ' '; break; + } + if (sym_is_changable(sym)) { + if (sym->rev_dep.tri == mod) + item_make("{%c}", ch); + else + item_make("<%c>", ch); + } else + item_make("-%c-", ch); + item_set_tag('t'); + item_set_data(menu); + break; + default: + tmp = 2 + strlen(sym_get_string_value(sym)); /* () = 2 */ + item_make("(%s)", sym_get_string_value(sym)); + tmp = indent - tmp + 4; + if (tmp < 0) + tmp = 0; + item_add_str("%*c%s%s", tmp, ' ', _(menu_get_prompt(menu)), + (sym_has_value(sym) || !sym_is_changable(sym)) ? + "" : _(" (NEW)")); + item_set_tag('s'); + item_set_data(menu); + goto conf_childs; + } + } + item_add_str("%*c%s%s", indent + 1, ' ', _(menu_get_prompt(menu)), + (sym_has_value(sym) || !sym_is_changable(sym)) ? + "" : _(" (NEW)")); + if (menu->prompt->type == P_MENU) { + item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); + return; + } + } + +conf_childs: + indent += doint; + for (child = menu->list; child; child = child->next) + build_conf(child); + indent -= doint; +} + +static void conf(struct menu *menu, struct menu *active_menu) +{ + struct menu *submenu; + const char *prompt = menu_get_prompt(menu); + struct subtitle_part stpart; + struct symbol *sym; + int res; + int s_scroll = 0; + + if (menu != &rootmenu) + stpart.text = menu_get_prompt(menu); + else + stpart.text = NULL; + list_add_tail(&stpart.entries, &trail); + + while (1) { + item_reset(); + current_menu = menu; + build_conf(menu); + if (!child_count) + break; + set_subtitle(); + dialog_clear(); + res = dialog_menu(prompt ? _(prompt) : _("Main Menu"), + _(menu_instructions), + active_menu, &s_scroll); + if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL) + break; + if (item_count() != 0) { + if (!item_activate_selected()) + continue; + if (!item_tag()) + continue; + } + submenu = item_data(); + active_menu = item_data(); + if (submenu) + sym = submenu->sym; + else + sym = NULL; + + switch (res) { + case 0: + switch (item_tag()) { + case 'm': + if (single_menu_mode) + submenu->data = (void *) (long) !submenu->data; + else + conf(submenu, NULL); + break; + case 't': + if (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes) + conf_choice(submenu); + else if (submenu->prompt->type == P_MENU) + conf(submenu, NULL); + break; + case 's': + conf_string(submenu); + break; + } + break; + case 2: + if (sym) + show_help(submenu); + else { + reset_subtitle(); + show_helptext(_("README"), _(mconf_readme)); + } + break; + case 3: + reset_subtitle(); + conf_save(); + break; + case 4: + reset_subtitle(); + conf_load(); + break; + case 5: + if (item_is_tag('t')) { + if (sym_set_tristate_value(sym, yes)) + break; + if (sym_set_tristate_value(sym, mod)) + show_textbox(NULL, setmod_text, 6, 74); + } + break; + case 6: + if (item_is_tag('t')) + sym_set_tristate_value(sym, no); + break; + case 7: + if (item_is_tag('t')) + sym_set_tristate_value(sym, mod); + break; + case 8: + if (item_is_tag('t')) + sym_toggle_tristate_value(sym); + else if (item_is_tag('m')) + conf(submenu, NULL); + break; + case 9: + search_conf(); + break; + case 10: + show_all_options = !show_all_options; + break; + } + } + + list_del(trail.prev); +} + +static int show_textbox_ext(const char *title, char *text, int r, int c, int + *keys, int *vscroll, int *hscroll, update_text_fn + update_text, void *data) +{ + dialog_clear(); + return dialog_textbox(title, text, r, c, keys, vscroll, hscroll, + update_text, data); +} + +static void show_textbox(const char *title, const char *text, int r, int c) +{ + show_textbox_ext(title, (char *) text, r, c, (int []) {0}, NULL, NULL, + NULL, NULL); +} + +static void show_helptext(const char *title, const char *text) +{ + show_textbox(title, text, 0, 0); +} + +static void conf_message_callback(const char *fmt, va_list ap) +{ + char buf[PATH_MAX+1]; + + vsnprintf(buf, sizeof(buf), fmt, ap); + if (save_and_exit) + printf("%s", buf); + else + show_textbox(NULL, buf, 6, 60); +} + +static void show_help(struct menu *menu) +{ + struct gstr help = str_new(); + + help.max_width = getmaxx(stdscr) - 10; + menu_get_ext_help(menu, &help); + + show_helptext(_(menu_get_prompt(menu)), str_get(&help)); + str_free(&help); +} + +static void conf_choice(struct menu *menu) +{ + const char *prompt = _(menu_get_prompt(menu)); + struct menu *child; + struct symbol *active; + + active = sym_get_choice_value(menu->sym); + while (1) { + int res; + int selected; + item_reset(); + + current_menu = menu; + for (child = menu->list; child; child = child->next) { + if (!menu_is_visible(child)) + continue; + if (child->sym) + item_make("%s", _(menu_get_prompt(child))); + else { + item_make("*** %s ***", _(menu_get_prompt(child))); + item_set_tag(':'); + } + item_set_data(child); + if (child->sym == active) + item_set_selected(1); + if (child->sym == sym_get_choice_value(menu->sym)) + item_set_tag('X'); + } + dialog_clear(); + res = dialog_checklist(prompt ? _(prompt) : _("Main Menu"), + _(radiolist_instructions), + MENUBOX_HEIGTH_MIN, + MENUBOX_WIDTH_MIN, + CHECKLIST_HEIGTH_MIN); + selected = item_activate_selected(); + switch (res) { + case 0: + if (selected) { + child = item_data(); + if (!child->sym) + break; + + sym_set_tristate_value(child->sym, yes); + } + return; + case 1: + if (selected) { + child = item_data(); + show_help(child); + active = child->sym; + } else + show_help(menu); + break; + case KEY_ESC: + return; + case -ERRDISPLAYTOOSMALL: + return; + } + } +} + +static void conf_string(struct menu *menu) +{ + const char *prompt = menu_get_prompt(menu); + + while (1) { + int res; + const char *heading; + + switch (sym_get_type(menu->sym)) { + case S_INT: + heading = _(inputbox_instructions_int); + break; + case S_HEX: + heading = _(inputbox_instructions_hex); + break; + case S_STRING: + heading = _(inputbox_instructions_string); + break; + default: + heading = _("Internal mconf error!"); + } + dialog_clear(); + res = dialog_inputbox(prompt ? _(prompt) : _("Main Menu"), + heading, 10, 75, + sym_get_string_value(menu->sym)); + switch (res) { + case 0: + if (sym_set_string_value(menu->sym, dialog_input_result)) + return; + show_textbox(NULL, _("You have made an invalid entry."), 5, 43); + break; + case 1: + show_help(menu); + break; + case KEY_ESC: + return; + } + } +} + +static void conf_load(void) +{ + + while (1) { + int res; + dialog_clear(); + res = dialog_inputbox(NULL, load_config_text, + 11, 55, filename); + switch(res) { + case 0: + if (!dialog_input_result[0]) + return; + if (!conf_read(dialog_input_result)) { + set_config_filename(dialog_input_result); + sym_set_change_count(1); + return; + } + show_textbox(NULL, _("File does not exist!"), 5, 38); + break; + case 1: + show_helptext(_("Load Alternate Configuration"), load_config_help); + break; + case KEY_ESC: + return; + } + } +} + +static void conf_save(void) +{ + while (1) { + int res; + dialog_clear(); + res = dialog_inputbox(NULL, save_config_text, + 11, 55, filename); + switch(res) { + case 0: + if (!dialog_input_result[0]) + return; + if (!conf_write(dialog_input_result)) { + set_config_filename(dialog_input_result); + return; + } + show_textbox(NULL, _("Can't create file! Probably a nonexistent directory."), 5, 60); + break; + case 1: + show_helptext(_("Save Alternate Configuration"), save_config_help); + break; + case KEY_ESC: + return; + } + } +} + +static int handle_exit(void) +{ + int res; + + save_and_exit = 1; + reset_subtitle(); + dialog_clear(); + if (conf_get_changed()) + res = dialog_yesno(NULL, + _("Do you wish to save your new configuration?\n" + "(Press to continue Buildroot configuration.)"), + 6, 60); + else + res = -1; + + end_dialog(saved_x, saved_y); + + switch (res) { + case 0: + if (conf_write(filename)) { + fprintf(stderr, _("\n\n" + "Error while writing of the configuration.\n" + "Your configuration changes were NOT saved." + "\n\n")); + return 1; + } + /* fall through */ + case -1: + printf(_("\n\n" + "*** End of the configuration.\n" + "*** Execute 'make' to start the build or try 'make help'." + "\n\n")); + res = 0; + break; + default: + fprintf(stderr, _("\n\n" + "Your configuration changes were NOT saved." + "\n\n")); + if (res != KEY_ESC) + res = 0; + } + + return res; +} + +static void sig_handler(int signo) +{ + exit(handle_exit()); +} + +int main(int ac, char **av) +{ + char *mode; + int res; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + signal(SIGINT, sig_handler); + + conf_parse(av[1]); + conf_read(NULL); + + mode = getenv("MENUCONFIG_MODE"); + if (mode) { + if (!strcasecmp(mode, "single_menu")) + single_menu_mode = 1; + } + + if (init_dialog(NULL)) { + fprintf(stderr, N_("Your display is too small to run Menuconfig!\n")); + fprintf(stderr, N_("It must be at least 19 lines by 80 columns.\n")); + return 1; + } + + set_config_filename(conf_get_configname()); + conf_set_message_callback(conf_message_callback); + do { + conf(&rootmenu, NULL); + res = handle_exit(); + } while (res == KEY_ESC); + + return res; +} + diff --git a/support/kconfig/menu.c b/support/kconfig/menu.c new file mode 100644 index 0000000000..db1512ae30 --- /dev/null +++ b/support/kconfig/menu.c @@ -0,0 +1,694 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include + +#include "lkc.h" + +static const char nohelp_text[] = "There is no help available for this option."; + +struct menu rootmenu; +static struct menu **last_entry_ptr; + +struct file *file_list; +struct file *current_file; + +void menu_warn(struct menu *menu, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + fprintf(stderr, "%s:%d:warning: ", menu->file->name, menu->lineno); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); +} + +static void prop_warn(struct property *prop, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + fprintf(stderr, "%s:%d:warning: ", prop->file->name, prop->lineno); + vfprintf(stderr, fmt, ap); + fprintf(stderr, "\n"); + va_end(ap); +} + +void _menu_init(void) +{ + current_entry = current_menu = &rootmenu; + last_entry_ptr = &rootmenu.list; +} + +void menu_add_entry(struct symbol *sym) +{ + struct menu *menu; + + menu = xmalloc(sizeof(*menu)); + memset(menu, 0, sizeof(*menu)); + menu->sym = sym; + menu->parent = current_menu; + menu->file = current_file; + menu->lineno = zconf_lineno(); + + *last_entry_ptr = menu; + last_entry_ptr = &menu->next; + current_entry = menu; + if (sym) + menu_add_symbol(P_SYMBOL, sym, NULL); +} + +void menu_end_entry(void) +{ +} + +struct menu *menu_add_menu(void) +{ + menu_end_entry(); + last_entry_ptr = ¤t_entry->list; + return current_menu = current_entry; +} + +void menu_end_menu(void) +{ + last_entry_ptr = ¤t_menu->next; + current_menu = current_menu->parent; +} + +static struct expr *menu_check_dep(struct expr *e) +{ + if (!e) + return e; + + switch (e->type) { + case E_NOT: + e->left.expr = menu_check_dep(e->left.expr); + break; + case E_OR: + case E_AND: + e->left.expr = menu_check_dep(e->left.expr); + e->right.expr = menu_check_dep(e->right.expr); + break; + case E_SYMBOL: + /* change 'm' into 'm' && MODULES */ + if (e->left.sym == &symbol_mod) + return expr_alloc_and(e, expr_alloc_symbol(modules_sym)); + break; + default: + break; + } + return e; +} + +void menu_add_dep(struct expr *dep) +{ + current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep)); +} + +void menu_set_type(int type) +{ + struct symbol *sym = current_entry->sym; + + if (sym->type == type) + return; + if (sym->type == S_UNKNOWN) { + sym->type = type; + return; + } + menu_warn(current_entry, + "ignoring type redefinition of '%s' from '%s' to '%s'", + sym->name ? sym->name : "", + sym_type_name(sym->type), sym_type_name(type)); +} + +struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep) +{ + struct property *prop = prop_alloc(type, current_entry->sym); + + prop->menu = current_entry; + prop->expr = expr; + prop->visible.expr = menu_check_dep(dep); + + if (prompt) { + if (isspace(*prompt)) { + prop_warn(prop, "leading whitespace ignored"); + while (isspace(*prompt)) + prompt++; + } + if (current_entry->prompt && current_entry != &rootmenu) + prop_warn(prop, "prompt redefined"); + + /* Apply all upper menus' visibilities to actual prompts. */ + if(type == P_PROMPT) { + struct menu *menu = current_entry; + + while ((menu = menu->parent) != NULL) { + struct expr *dup_expr; + + if (!menu->visibility) + continue; + /* + * Do not add a reference to the + * menu's visibility expression but + * use a copy of it. Otherwise the + * expression reduction functions + * will modify expressions that have + * multiple references which can + * cause unwanted side effects. + */ + dup_expr = expr_copy(menu->visibility); + + prop->visible.expr + = expr_alloc_and(prop->visible.expr, + dup_expr); + } + } + + current_entry->prompt = prop; + } + prop->text = prompt; + + return prop; +} + +struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep) +{ + return menu_add_prop(type, prompt, NULL, dep); +} + +void menu_add_visibility(struct expr *expr) +{ + current_entry->visibility = expr_alloc_and(current_entry->visibility, + expr); +} + +void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep) +{ + menu_add_prop(type, NULL, expr, dep); +} + +void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) +{ + menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep); +} + +void menu_add_option(int token, char *arg) +{ + switch (token) { + case T_OPT_MODULES: + if (modules_sym) + zconf_error("symbol '%s' redefines option 'modules'" + " already defined by symbol '%s'", + current_entry->sym->name, + modules_sym->name + ); + modules_sym = current_entry->sym; + break; + case T_OPT_DEFCONFIG_LIST: + if (!sym_defconfig_list) + sym_defconfig_list = current_entry->sym; + else if (sym_defconfig_list != current_entry->sym) + zconf_error("trying to redefine defconfig symbol"); + break; + case T_OPT_ENV: + prop_add_env(arg); + break; + } +} + +static int menu_validate_number(struct symbol *sym, struct symbol *sym2) +{ + return sym2->type == S_INT || sym2->type == S_HEX || + (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name)); +} + +static void sym_check_prop(struct symbol *sym) +{ + struct property *prop; + struct symbol *sym2; + for (prop = sym->prop; prop; prop = prop->next) { + switch (prop->type) { + case P_DEFAULT: + if ((sym->type == S_STRING || sym->type == S_INT || sym->type == S_HEX) && + prop->expr->type != E_SYMBOL) + prop_warn(prop, + "default for config symbol '%s'" + " must be a single symbol", sym->name); + if (prop->expr->type != E_SYMBOL) + break; + sym2 = prop_get_symbol(prop); + if (sym->type == S_HEX || sym->type == S_INT) { + if (!menu_validate_number(sym, sym2)) + prop_warn(prop, + "'%s': number is invalid", + sym->name); + } + break; + case P_SELECT: + sym2 = prop_get_symbol(prop); + if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) + prop_warn(prop, + "config symbol '%s' uses select, but is " + "not boolean or tristate", sym->name); + else if (sym2->type != S_UNKNOWN && + sym2->type != S_BOOLEAN && + sym2->type != S_TRISTATE) + prop_warn(prop, + "'%s' has wrong type. 'select' only " + "accept arguments of boolean and " + "tristate type", sym2->name); + break; + case P_RANGE: + if (sym->type != S_INT && sym->type != S_HEX) + prop_warn(prop, "range is only allowed " + "for int or hex symbols"); + if (!menu_validate_number(sym, prop->expr->left.sym) || + !menu_validate_number(sym, prop->expr->right.sym)) + prop_warn(prop, "range is invalid"); + break; + default: + ; + } + } +} + +void menu_finalize(struct menu *parent) +{ + struct menu *menu, *last_menu; + struct symbol *sym; + struct property *prop; + struct expr *parentdep, *basedep, *dep, *dep2, **ep; + + sym = parent->sym; + if (parent->list) { + if (sym && sym_is_choice(sym)) { + if (sym->type == S_UNKNOWN) { + /* find the first choice value to find out choice type */ + current_entry = parent; + for (menu = parent->list; menu; menu = menu->next) { + if (menu->sym && menu->sym->type != S_UNKNOWN) { + menu_set_type(menu->sym->type); + break; + } + } + } + /* set the type of the remaining choice values */ + for (menu = parent->list; menu; menu = menu->next) { + current_entry = menu; + if (menu->sym && menu->sym->type == S_UNKNOWN) + menu_set_type(sym->type); + } + parentdep = expr_alloc_symbol(sym); + } else if (parent->prompt) + parentdep = parent->prompt->visible.expr; + else + parentdep = parent->dep; + + for (menu = parent->list; menu; menu = menu->next) { + basedep = expr_transform(menu->dep); + basedep = expr_alloc_and(expr_copy(parentdep), basedep); + basedep = expr_eliminate_dups(basedep); + menu->dep = basedep; + if (menu->sym) + prop = menu->sym->prop; + else + prop = menu->prompt; + for (; prop; prop = prop->next) { + if (prop->menu != menu) + continue; + dep = expr_transform(prop->visible.expr); + dep = expr_alloc_and(expr_copy(basedep), dep); + dep = expr_eliminate_dups(dep); + if (menu->sym && menu->sym->type != S_TRISTATE) + dep = expr_trans_bool(dep); + prop->visible.expr = dep; + if (prop->type == P_SELECT) { + struct symbol *es = prop_get_symbol(prop); + es->rev_dep.expr = expr_alloc_or(es->rev_dep.expr, + expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); + } + } + } + for (menu = parent->list; menu; menu = menu->next) + menu_finalize(menu); + } else if (sym) { + basedep = parent->prompt ? parent->prompt->visible.expr : NULL; + basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no); + basedep = expr_eliminate_dups(expr_transform(basedep)); + last_menu = NULL; + for (menu = parent->next; menu; menu = menu->next) { + dep = menu->prompt ? menu->prompt->visible.expr : menu->dep; + if (!expr_contains_symbol(dep, sym)) + break; + if (expr_depends_symbol(dep, sym)) + goto next; + dep = expr_trans_compare(dep, E_UNEQUAL, &symbol_no); + dep = expr_eliminate_dups(expr_transform(dep)); + dep2 = expr_copy(basedep); + expr_eliminate_eq(&dep, &dep2); + expr_free(dep); + if (!expr_is_yes(dep2)) { + expr_free(dep2); + break; + } + expr_free(dep2); + next: + menu_finalize(menu); + menu->parent = parent; + last_menu = menu; + } + if (last_menu) { + parent->list = parent->next; + parent->next = last_menu->next; + last_menu->next = NULL; + } + + sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep); + } + for (menu = parent->list; menu; menu = menu->next) { + if (sym && sym_is_choice(sym) && + menu->sym && !sym_is_choice_value(menu->sym)) { + current_entry = menu; + menu->sym->flags |= SYMBOL_CHOICEVAL; + if (!menu->prompt) + menu_warn(menu, "choice value must have a prompt"); + for (prop = menu->sym->prop; prop; prop = prop->next) { + if (prop->type == P_DEFAULT) + prop_warn(prop, "defaults for choice " + "values not supported"); + if (prop->menu == menu) + continue; + if (prop->type == P_PROMPT && + prop->menu->parent->sym != sym) + prop_warn(prop, "choice value used outside its choice group"); + } + /* Non-tristate choice values of tristate choices must + * depend on the choice being set to Y. The choice + * values' dependencies were propagated to their + * properties above, so the change here must be re- + * propagated. + */ + if (sym->type == S_TRISTATE && menu->sym->type != S_TRISTATE) { + basedep = expr_alloc_comp(E_EQUAL, sym, &symbol_yes); + menu->dep = expr_alloc_and(basedep, menu->dep); + for (prop = menu->sym->prop; prop; prop = prop->next) { + if (prop->menu != menu) + continue; + prop->visible.expr = expr_alloc_and(expr_copy(basedep), + prop->visible.expr); + } + } + menu_add_symbol(P_CHOICE, sym, NULL); + prop = sym_get_choice_prop(sym); + for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) + ; + *ep = expr_alloc_one(E_LIST, NULL); + (*ep)->right.sym = menu->sym; + } + if (menu->list && (!menu->prompt || !menu->prompt->text)) { + for (last_menu = menu->list; ; last_menu = last_menu->next) { + last_menu->parent = parent; + if (!last_menu->next) + break; + } + last_menu->next = menu->next; + menu->next = menu->list; + menu->list = NULL; + } + } + + if (sym && !(sym->flags & SYMBOL_WARNED)) { + if (sym->type == S_UNKNOWN) + menu_warn(parent, "config symbol defined without type"); + + if (sym_is_choice(sym) && !parent->prompt) + menu_warn(parent, "choice must have a prompt"); + + /* Check properties connected to this symbol */ + sym_check_prop(sym); + sym->flags |= SYMBOL_WARNED; + } + + if (sym && !sym_is_optional(sym) && parent->prompt) { + sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr, + expr_alloc_and(parent->prompt->visible.expr, + expr_alloc_symbol(&symbol_mod))); + } +} + +bool menu_has_prompt(struct menu *menu) +{ + if (!menu->prompt) + return false; + return true; +} + +/* + * Determine if a menu is empty. + * A menu is considered empty if it contains no or only + * invisible entries. + */ +bool menu_is_empty(struct menu *menu) +{ + struct menu *child; + + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child)) + return(false); + } + return(true); +} + +bool menu_is_visible(struct menu *menu) +{ + struct menu *child; + struct symbol *sym; + tristate visible; + + if (!menu->prompt) + return false; + + if (menu->visibility) { + if (expr_calc_value(menu->visibility) == no) + return no; + } + + sym = menu->sym; + if (sym) { + sym_calc_value(sym); + visible = menu->prompt->visible.tri; + } else + visible = menu->prompt->visible.tri = expr_calc_value(menu->prompt->visible.expr); + + if (visible != no) + return true; + + if (!sym || sym_get_tristate_value(menu->sym) == no) + return false; + + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child)) { + if (sym) + sym->flags |= SYMBOL_DEF_USER; + return true; + } + } + + return false; +} + +const char *menu_get_prompt(struct menu *menu) +{ + if (menu->prompt) + return menu->prompt->text; + else if (menu->sym) + return menu->sym->name; + return NULL; +} + +struct menu *menu_get_root_menu(struct menu *menu) +{ + return &rootmenu; +} + +struct menu *menu_get_parent_menu(struct menu *menu) +{ + enum prop_type type; + + for (; menu != &rootmenu; menu = menu->parent) { + type = menu->prompt ? menu->prompt->type : 0; + if (type == P_MENU) + break; + } + return menu; +} + +bool menu_has_help(struct menu *menu) +{ + return menu->help != NULL; +} + +const char *menu_get_help(struct menu *menu) +{ + if (menu->help) + return menu->help; + else + return ""; +} + +static void get_prompt_str(struct gstr *r, struct property *prop, + struct list_head *head) +{ + int i, j; + struct menu *submenu[8], *menu, *location = NULL; + struct jump_key *jump; + + str_printf(r, _("Prompt: %s\n"), _(prop->text)); + menu = prop->menu->parent; + for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) { + bool accessible = menu_is_visible(menu); + + submenu[i++] = menu; + if (location == NULL && accessible) + location = menu; + } + if (head && location) { + jump = xmalloc(sizeof(struct jump_key)); + + if (menu_is_visible(prop->menu)) { + /* + * There is not enough room to put the hint at the + * beginning of the "Prompt" line. Put the hint on the + * last "Location" line even when it would belong on + * the former. + */ + jump->target = prop->menu; + } else + jump->target = location; + + if (list_empty(head)) + jump->index = 0; + else + jump->index = list_entry(head->prev, struct jump_key, + entries)->index + 1; + + list_add_tail(&jump->entries, head); + } + + if (i > 0) { + str_printf(r, _(" Location:\n")); + for (j = 4; --i >= 0; j += 2) { + menu = submenu[i]; + if (head && location && menu == location) + jump->offset = strlen(r->s); + str_printf(r, "%*c-> %s", j, ' ', + _(menu_get_prompt(menu))); + if (menu->sym) { + str_printf(r, " (%s [=%s])", menu->sym->name ? + menu->sym->name : _(""), + sym_get_string_value(menu->sym)); + } + str_append(r, "\n"); + } + } +} + +/* + * get property of type P_SYMBOL + */ +static struct property *get_symbol_prop(struct symbol *sym) +{ + struct property *prop = NULL; + + for_all_properties(sym, prop, P_SYMBOL) + break; + return prop; +} + +/* + * head is optional and may be NULL + */ +void get_symbol_str(struct gstr *r, struct symbol *sym, + struct list_head *head) +{ + bool hit; + struct property *prop; + + if (sym && sym->name) { + str_printf(r, "Symbol: %s [=%s]\n", sym->name, + sym_get_string_value(sym)); + str_printf(r, "Type : %s\n", sym_type_name(sym->type)); + if (sym->type == S_INT || sym->type == S_HEX) { + prop = sym_get_range_prop(sym); + if (prop) { + str_printf(r, "Range : "); + expr_gstr_print(prop->expr, r); + str_append(r, "\n"); + } + } + } + for_all_prompts(sym, prop) + get_prompt_str(r, prop, head); + + prop = get_symbol_prop(sym); + if (prop) { + str_printf(r, _(" Defined at %s:%d\n"), prop->menu->file->name, + prop->menu->lineno); + if (!expr_is_yes(prop->visible.expr)) { + str_append(r, _(" Depends on: ")); + expr_gstr_print(prop->visible.expr, r); + str_append(r, "\n"); + } + } + + hit = false; + for_all_properties(sym, prop, P_SELECT) { + if (!hit) { + str_append(r, " Selects: "); + hit = true; + } else + str_printf(r, " && "); + expr_gstr_print(prop->expr, r); + } + if (hit) + str_append(r, "\n"); + if (sym->rev_dep.expr) { + str_append(r, _(" Selected by: ")); + expr_gstr_print(sym->rev_dep.expr, r); + str_append(r, "\n"); + } + str_append(r, "\n\n"); +} + +struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head) +{ + struct symbol *sym; + struct gstr res = str_new(); + int i; + + for (i = 0; sym_arr && (sym = sym_arr[i]); i++) + get_symbol_str(&res, sym, head); + if (!i) + str_append(&res, _("No matches found.\n")); + return res; +} + + +void menu_get_ext_help(struct menu *menu, struct gstr *help) +{ + struct symbol *sym = menu->sym; + const char *help_text = nohelp_text; + + if (menu_has_help(menu)) { + if (sym->name) + str_printf(help, "%s%s:\n\n", CONFIG_, sym->name); + help_text = menu_get_help(menu); + } + str_printf(help, "%s\n", _(help_text)); + if (sym) + get_symbol_str(help, sym, NULL); +} diff --git a/support/kconfig/merge_config.sh b/support/kconfig/merge_config.sh new file mode 100755 index 0000000000..8a1708b50f --- /dev/null +++ b/support/kconfig/merge_config.sh @@ -0,0 +1,150 @@ +#!/bin/sh +# merge_config.sh - Takes a list of config fragment values, and merges +# them one by one. Provides warnings on overridden values, and specified +# values that did not make it to the resulting .config file (due to missed +# dependencies or config symbol removal). +# +# Portions reused from kconf_check and generate_cfg: +# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/kconf_check +# http://git.yoctoproject.org/cgit/cgit.cgi/yocto-kernel-tools/tree/tools/generate_cfg +# +# Copyright (c) 2009-2010 Wind River Systems, Inc. +# Copyright 2011 Linaro +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# 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. + +clean_up() { + rm -f $TMP_FILE + exit +} +trap clean_up HUP INT TERM + +usage() { + echo "Usage: $0 [OPTIONS] [CONFIG [...]]" + echo " -h display this help text" + echo " -m only merge the fragments, do not execute the make command" + echo " -n use allnoconfig instead of alldefconfig" + echo " -r list redundant entries when merging fragments" + echo " -O dir to put generated output files" +} + +MAKE=true +ALLTARGET=alldefconfig +WARNREDUN=false +OUTPUT=. + +while true; do + case $1 in + "-n") + ALLTARGET=allnoconfig + shift + continue + ;; + "-m") + MAKE=false + shift + continue + ;; + "-h") + usage + exit + ;; + "-r") + WARNREDUN=true + shift + continue + ;; + "-O") + if [ -d $2 ];then + OUTPUT=$(echo $2 | sed 's/\/*$//') + else + echo "output directory $2 does not exist" 1>&2 + exit 1 + fi + shift 2 + continue + ;; + *) + break + ;; + esac +done + +INITFILE=$1 +shift; + +MERGE_LIST=$* +SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p" +TMP_FILE=$(mktemp -t .tmp.config.XXXXXXXXXX) + +echo "Using $INITFILE as base" +cat $INITFILE > $TMP_FILE + +# Merge files, printing warnings on overrided values +for MERGE_FILE in $MERGE_LIST ; do + echo "Merging $MERGE_FILE" + CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE) + + for CFG in $CFG_LIST ; do + grep -q -w $CFG $TMP_FILE + if [ $? -eq 0 ] ; then + PREV_VAL=$(grep -w $CFG $TMP_FILE) + NEW_VAL=$(grep -w $CFG $MERGE_FILE) + if [ "x$PREV_VAL" != "x$NEW_VAL" ] ; then + echo Value of $CFG is redefined by fragment $MERGE_FILE: + echo Previous value: $PREV_VAL + echo New value: $NEW_VAL + echo + elif [ "$WARNREDUN" = "true" ]; then + echo Value of $CFG is redundant by fragment $MERGE_FILE: + fi + sed -i "/$CFG[ =]/d" $TMP_FILE + fi + done + cat $MERGE_FILE >> $TMP_FILE +done + +if [ "$MAKE" = "false" ]; then + cp $TMP_FILE $OUTPUT/.config + echo "#" + echo "# merged configuration written to $OUTPUT/.config (needs make)" + echo "#" + clean_up + exit +fi + +# If we have an output dir, setup the O= argument, otherwise leave +# it blank, since O=. will create an unnecessary ./source softlink +OUTPUT_ARG="" +if [ "$OUTPUT" != "." ] ; then + OUTPUT_ARG="O=$OUTPUT" +fi + + +# Use the merged file as the starting point for: +# alldefconfig: Fills in any missing symbols with Kconfig default +# allnoconfig: Fills in any missing symbols with # CONFIG_* is not set +make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET + + +# Check all specified config values took (might have missed-dependency issues) +for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do + + REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE) + ACTUAL_VAL=$(grep -w -e "$CFG" $OUTPUT/.config) + if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then + echo "Value requested for $CFG not in final .config" + echo "Requested value: $REQUESTED_VAL" + echo "Actual value: $ACTUAL_VAL" + echo "" + fi +done + +clean_up diff --git a/support/kconfig/nconf.c b/support/kconfig/nconf.c new file mode 100644 index 0000000000..4fbecd2473 --- /dev/null +++ b/support/kconfig/nconf.c @@ -0,0 +1,1557 @@ +/* + * Copyright (C) 2008 Nir Tzachar +#include + +#include "lkc.h" +#include "nconf.h" +#include + +static const char nconf_global_help[] = N_( +"Help windows\n" +"------------\n" +"o Global help: Unless in a data entry window, pressing will give \n" +" you the global help window, which you are just reading.\n" +"\n" +"o A short version of the global help is available by pressing .\n" +"\n" +"o Local help: To get help related to the current menu entry, use any\n" +" of , or if in a data entry window then press .\n" +"\n" +"\n" +"Menu entries\n" +"------------\n" +"This interface lets you select features and parameters for the kernel\n" +"build. Kernel features can either be built-in, modularized, or removed.\n" +"Parameters must be entered as text or decimal or hexadecimal numbers.\n" +"\n" +"Menu entries beginning with following braces represent features that\n" +" [ ] can be built in or removed\n" +" < > can be built in, modularized or removed\n" +" { } can be built in or modularized, are selected by another feature\n" +" - - are selected by another feature\n" +" XXX cannot be selected. Symbol Info tells you why.\n" +"*, M or whitespace inside braces means to build in, build as a module\n" +"or to exclude the feature respectively.\n" +"\n" +"To change any of these features, highlight it with the movement keys\n" +"listed below and press to build it in, to make it a module or\n" +" to remove it. You may press the key to cycle through the\n" +"available options.\n" +"\n" +"A trailing \"--->\" designates a submenu, a trailing \"----\" an\n" +"empty submenu.\n" +"\n" +"Menu navigation keys\n" +"----------------------------------------------------------------------\n" +"Linewise up \n" +"Linewise down \n" +"Pagewise up \n" +"Pagewise down \n" +"First entry \n" +"Last entry \n" +"Enter a submenu \n" +"Go back to parent menu \n" +"Close a help window \n" +"Close entry window, apply \n" +"Close entry window, forget \n" +"Start incremental, case-insensitive search for STRING in menu entries,\n" +" no regex support, STRING is displayed in upper left corner\n" +" STRING\n" +" Remove last character \n" +" Jump to next hit \n" +" Jump to previous hit \n" +"Exit menu search mode \n" +"Search for configuration variables with or without leading CONFIG_\n" +" RegExpr\n" +"Verbose search help \n" +"----------------------------------------------------------------------\n" +"\n" +"Unless in a data entry window, key <1> may be used instead of ,\n" +"<2> instead of , etc.\n" +"\n" +"\n" +"Radiolist (Choice list)\n" +"-----------------------\n" +"Use the movement keys listed above to select the option you wish to set\n" +"and press .\n" +"\n" +"\n" +"Data entry\n" +"----------\n" +"Enter the requested information and press . Hexadecimal values\n" +"may be entered without the \"0x\" prefix.\n" +"\n" +"\n" +"Text Box (Help Window)\n" +"----------------------\n" +"Use movement keys as listed in table above.\n" +"\n" +"Press any of to exit.\n" +"\n" +"\n" +"Alternate configuration files\n" +"-----------------------------\n" +"nconfig supports switching between different configurations.\n" +"Press to save your current configuration. Press and enter\n" +"a file name to load a previously saved configuration.\n" +"\n" +"\n" +"Terminal configuration\n" +"----------------------\n" +"If you use nconfig in a xterm window, make sure your TERM environment\n" +"variable specifies a terminal configuration which supports at least\n" +"16 colors. Otherwise nconfig will look rather bad.\n" +"\n" +"If the \"stty size\" command reports the current terminalsize correctly,\n" +"nconfig will adapt to sizes larger than the traditional 80x25 \"standard\"\n" +"and display longer menus properly.\n" +"\n" +"\n" +"Single menu mode\n" +"----------------\n" +"If you prefer to have all of the menu entries listed in a single menu,\n" +"rather than the default multimenu hierarchy, run nconfig with\n" +"NCONFIG_MODE environment variable set to single_menu. Example:\n" +"\n" +"make NCONFIG_MODE=single_menu nconfig\n" +"\n" +" will then unfold the appropriate category, or fold it if it\n" +"is already unfolded. Folded menu entries will be designated by a\n" +"leading \"++>\" and unfolded entries by a leading \"-->\".\n" +"\n" +"Note that this mode can eventually be a little more CPU expensive than\n" +"the default mode, especially with a larger number of unfolded submenus.\n" +"\n"), +menu_no_f_instructions[] = N_( +"Legend: [*] built-in [ ] excluded module < > module capable.\n" +"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n" +"\n" +"Use the following keys to navigate the menus:\n" +"Move up or down with and .\n" +"Enter a submenu with or .\n" +"Exit a submenu to its parent menu with or .\n" +"Pressing includes, excludes, modularizes features.\n" +"Pressing cycles through the available options.\n" +"To search for menu entries press .\n" +" always leaves the current window.\n" +"\n" +"You do not have function keys support.\n" +"Press <1> instead of , <2> instead of , etc.\n" +"For verbose global help use key <1>.\n" +"For help related to the current menu entry press or .\n"), +menu_instructions[] = N_( +"Legend: [*] built-in [ ] excluded module < > module capable.\n" +"Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n" +"\n" +"Use the following keys to navigate the menus:\n" +"Move up or down with or .\n" +"Enter a submenu with or .\n" +"Exit a submenu to its parent menu with or .\n" +"Pressing includes, excludes, modularizes features.\n" +"Pressing cycles through the available options.\n" +"To search for menu entries press .\n" +" always leaves the current window.\n" +"\n" +"Pressing <1> may be used instead of , <2> instead of , etc.\n" +"For verbose global help press .\n" +"For help related to the current menu entry press or .\n"), +radiolist_instructions[] = N_( +"Press , , or to navigate a radiolist, select\n" +"with .\n" +"For help related to the current entry press or .\n" +"For global help press .\n"), +inputbox_instructions_int[] = N_( +"Please enter a decimal value.\n" +"Fractions will not be accepted.\n" +"Press to apply, to cancel."), +inputbox_instructions_hex[] = N_( +"Please enter a hexadecimal value.\n" +"Press to apply, to cancel."), +inputbox_instructions_string[] = N_( +"Please enter a string value.\n" +"Press to apply, to cancel."), +setmod_text[] = N_( +"This feature depends on another feature which has been configured as a\n" +"module. As a result, the current feature will be built as a module too."), +load_config_text[] = N_( +"Enter the name of the configuration file you wish to load.\n" +"Accept the name shown to restore the configuration you last\n" +"retrieved. Leave empty to abort."), +load_config_help[] = N_( +"For various reasons, one may wish to keep several different\n" +"configurations available on a single machine.\n" +"\n" +"If you have saved a previous configuration in a file other than the\n" +"default one, entering its name here will allow you to load and modify\n" +"that configuration.\n" +"\n" +"Leave empty to abort.\n"), +save_config_text[] = N_( +"Enter a filename to which this configuration should be saved\n" +"as an alternate. Leave empty to abort."), +save_config_help[] = N_( +"For various reasons, one may wish to keep several different\n" +"configurations available on a single machine.\n" +"\n" +"Entering a file name here will allow you to later retrieve, modify\n" +"and use the current configuration as an alternate to whatever\n" +"configuration options you have selected at that time.\n" +"\n" +"Leave empty to abort.\n"), +search_help[] = N_( +"Search for symbols (configuration variable names CONFIG_*) and display\n" +"their relations. Regular expressions are supported.\n" +"Example: Search for \"^FOO\".\n" +"Result:\n" +"-----------------------------------------------------------------\n" +"Symbol: FOO [ = m]\n" +"Prompt: Foo bus is used to drive the bar HW\n" +"Defined at drivers/pci/Kconfig:47\n" +"Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" +"Location:\n" +" -> Bus options (PCI, PCMCIA, EISA, ISA)\n" +" -> PCI support (PCI [ = y])\n" +" -> PCI access mode ( [ = y])\n" +"Selects: LIBCRC32\n" +"Selected by: BAR\n" +"-----------------------------------------------------------------\n" +"o The line 'Prompt:' shows the text displayed for this symbol in\n" +" the menu hierarchy.\n" +"o The 'Defined at' line tells at what file / line number the symbol is\n" +" defined.\n" +"o The 'Depends on:' line lists symbols that need to be defined for\n" +" this symbol to be visible and selectable in the menu.\n" +"o The 'Location:' lines tell, where in the menu structure this symbol\n" +" is located. A location followed by a [ = y] indicates that this is\n" +" a selectable menu item, and the current value is displayed inside\n" +" brackets.\n" +"o The 'Selects:' line tells, what symbol will be automatically selected\n" +" if this symbol is selected (y or m).\n" +"o The 'Selected by' line tells what symbol has selected this symbol.\n" +"\n" +"Only relevant lines are shown.\n" +"\n\n" +"Search examples:\n" +"USB => find all symbols containing USB\n" +"^USB => find all symbols starting with USB\n" +"USB$ => find all symbols ending with USB\n" +"\n"); + +struct mitem { + char str[256]; + char tag; + void *usrptr; + int is_visible; +}; + +#define MAX_MENU_ITEMS 4096 +static int show_all_items; +static int indent; +static struct menu *current_menu; +static int child_count; +static int single_menu_mode; +/* the window in which all information appears */ +static WINDOW *main_window; +/* the largest size of the menu window */ +static int mwin_max_lines; +static int mwin_max_cols; +/* the window in which we show option buttons */ +static MENU *curses_menu; +static ITEM *curses_menu_items[MAX_MENU_ITEMS]; +static struct mitem k_menu_items[MAX_MENU_ITEMS]; +static int items_num; +static int global_exit; +/* the currently selected button */ +const char *current_instructions = menu_instructions; + +static char *dialog_input_result; +static int dialog_input_result_len; + +static void conf(struct menu *menu); +static void conf_choice(struct menu *menu); +static void conf_string(struct menu *menu); +static void conf_load(void); +static void conf_save(void); +static void show_help(struct menu *menu); +static int do_exit(void); +static void setup_windows(void); +static void search_conf(void); + +typedef void (*function_key_handler_t)(int *key, struct menu *menu); +static void handle_f1(int *key, struct menu *current_item); +static void handle_f2(int *key, struct menu *current_item); +static void handle_f3(int *key, struct menu *current_item); +static void handle_f4(int *key, struct menu *current_item); +static void handle_f5(int *key, struct menu *current_item); +static void handle_f6(int *key, struct menu *current_item); +static void handle_f7(int *key, struct menu *current_item); +static void handle_f8(int *key, struct menu *current_item); +static void handle_f9(int *key, struct menu *current_item); + +struct function_keys { + const char *key_str; + const char *func; + function_key key; + function_key_handler_t handler; +}; + +static const int function_keys_num = 9; +struct function_keys function_keys[] = { + { + .key_str = "F1", + .func = "Help", + .key = F_HELP, + .handler = handle_f1, + }, + { + .key_str = "F2", + .func = "SymInfo", + .key = F_SYMBOL, + .handler = handle_f2, + }, + { + .key_str = "F3", + .func = "Help 2", + .key = F_INSTS, + .handler = handle_f3, + }, + { + .key_str = "F4", + .func = "ShowAll", + .key = F_CONF, + .handler = handle_f4, + }, + { + .key_str = "F5", + .func = "Back", + .key = F_BACK, + .handler = handle_f5, + }, + { + .key_str = "F6", + .func = "Save", + .key = F_SAVE, + .handler = handle_f6, + }, + { + .key_str = "F7", + .func = "Load", + .key = F_LOAD, + .handler = handle_f7, + }, + { + .key_str = "F8", + .func = "SymSearch", + .key = F_SEARCH, + .handler = handle_f8, + }, + { + .key_str = "F9", + .func = "Exit", + .key = F_EXIT, + .handler = handle_f9, + }, +}; + +static void print_function_line(void) +{ + int i; + int offset = 1; + const int skip = 1; + int lines = getmaxy(stdscr); + + for (i = 0; i < function_keys_num; i++) { + (void) wattrset(main_window, attributes[FUNCTION_HIGHLIGHT]); + mvwprintw(main_window, lines-3, offset, + "%s", + function_keys[i].key_str); + (void) wattrset(main_window, attributes[FUNCTION_TEXT]); + offset += strlen(function_keys[i].key_str); + mvwprintw(main_window, lines-3, + offset, "%s", + function_keys[i].func); + offset += strlen(function_keys[i].func) + skip; + } + (void) wattrset(main_window, attributes[NORMAL]); +} + +/* help */ +static void handle_f1(int *key, struct menu *current_item) +{ + show_scroll_win(main_window, + _("Global help"), _(nconf_global_help)); + return; +} + +/* symbole help */ +static void handle_f2(int *key, struct menu *current_item) +{ + show_help(current_item); + return; +} + +/* instructions */ +static void handle_f3(int *key, struct menu *current_item) +{ + show_scroll_win(main_window, + _("Short help"), + _(current_instructions)); + return; +} + +/* config */ +static void handle_f4(int *key, struct menu *current_item) +{ + int res = btn_dialog(main_window, + _("Show all symbols?"), + 2, + " ", + ""); + if (res == 0) + show_all_items = 1; + else if (res == 1) + show_all_items = 0; + + return; +} + +/* back */ +static void handle_f5(int *key, struct menu *current_item) +{ + *key = KEY_LEFT; + return; +} + +/* save */ +static void handle_f6(int *key, struct menu *current_item) +{ + conf_save(); + return; +} + +/* load */ +static void handle_f7(int *key, struct menu *current_item) +{ + conf_load(); + return; +} + +/* search */ +static void handle_f8(int *key, struct menu *current_item) +{ + search_conf(); + return; +} + +/* exit */ +static void handle_f9(int *key, struct menu *current_item) +{ + do_exit(); + return; +} + +/* return != 0 to indicate the key was handles */ +static int process_special_keys(int *key, struct menu *menu) +{ + int i; + + if (*key == KEY_RESIZE) { + setup_windows(); + return 1; + } + + for (i = 0; i < function_keys_num; i++) { + if (*key == KEY_F(function_keys[i].key) || + *key == '0' + function_keys[i].key){ + function_keys[i].handler(key, menu); + return 1; + } + } + + return 0; +} + +static void clean_items(void) +{ + int i; + for (i = 0; curses_menu_items[i]; i++) + free_item(curses_menu_items[i]); + bzero(curses_menu_items, sizeof(curses_menu_items)); + bzero(k_menu_items, sizeof(k_menu_items)); + items_num = 0; +} + +typedef enum {MATCH_TINKER_PATTERN_UP, MATCH_TINKER_PATTERN_DOWN, + FIND_NEXT_MATCH_DOWN, FIND_NEXT_MATCH_UP} match_f; + +/* return the index of the matched item, or -1 if no such item exists */ +static int get_mext_match(const char *match_str, match_f flag) +{ + int match_start = item_index(current_item(curses_menu)); + int index; + + if (flag == FIND_NEXT_MATCH_DOWN) + ++match_start; + else if (flag == FIND_NEXT_MATCH_UP) + --match_start; + + index = match_start; + index = (index + items_num) % items_num; + while (true) { + char *str = k_menu_items[index].str; + if (strcasestr(str, match_str) != 0) + return index; + if (flag == FIND_NEXT_MATCH_UP || + flag == MATCH_TINKER_PATTERN_UP) + --index; + else + ++index; + index = (index + items_num) % items_num; + if (index == match_start) + return -1; + } +} + +/* Make a new item. */ +static void item_make(struct menu *menu, char tag, const char *fmt, ...) +{ + va_list ap; + + if (items_num > MAX_MENU_ITEMS-1) + return; + + bzero(&k_menu_items[items_num], sizeof(k_menu_items[0])); + k_menu_items[items_num].tag = tag; + k_menu_items[items_num].usrptr = menu; + if (menu != NULL) + k_menu_items[items_num].is_visible = + menu_is_visible(menu); + else + k_menu_items[items_num].is_visible = 1; + + va_start(ap, fmt); + vsnprintf(k_menu_items[items_num].str, + sizeof(k_menu_items[items_num].str), + fmt, ap); + va_end(ap); + + if (!k_menu_items[items_num].is_visible) + memcpy(k_menu_items[items_num].str, "XXX", 3); + + curses_menu_items[items_num] = new_item( + k_menu_items[items_num].str, + k_menu_items[items_num].str); + set_item_userptr(curses_menu_items[items_num], + &k_menu_items[items_num]); + /* + if (!k_menu_items[items_num].is_visible) + item_opts_off(curses_menu_items[items_num], O_SELECTABLE); + */ + + items_num++; + curses_menu_items[items_num] = NULL; +} + +/* very hackish. adds a string to the last item added */ +static void item_add_str(const char *fmt, ...) +{ + va_list ap; + int index = items_num-1; + char new_str[256]; + char tmp_str[256]; + + if (index < 0) + return; + + va_start(ap, fmt); + vsnprintf(new_str, sizeof(new_str), fmt, ap); + va_end(ap); + snprintf(tmp_str, sizeof(tmp_str), "%s%s", + k_menu_items[index].str, new_str); + strncpy(k_menu_items[index].str, + tmp_str, + sizeof(k_menu_items[index].str)); + + free_item(curses_menu_items[index]); + curses_menu_items[index] = new_item( + k_menu_items[index].str, + k_menu_items[index].str); + set_item_userptr(curses_menu_items[index], + &k_menu_items[index]); +} + +/* get the tag of the currently selected item */ +static char item_tag(void) +{ + ITEM *cur; + struct mitem *mcur; + + cur = current_item(curses_menu); + if (cur == NULL) + return 0; + mcur = (struct mitem *) item_userptr(cur); + return mcur->tag; +} + +static int curses_item_index(void) +{ + return item_index(current_item(curses_menu)); +} + +static void *item_data(void) +{ + ITEM *cur; + struct mitem *mcur; + + cur = current_item(curses_menu); + if (!cur) + return NULL; + mcur = (struct mitem *) item_userptr(cur); + return mcur->usrptr; + +} + +static int item_is_tag(char tag) +{ + return item_tag() == tag; +} + +static char filename[PATH_MAX+1]; +static char menu_backtitle[PATH_MAX+128]; +static const char *set_config_filename(const char *config_filename) +{ + int size; + + size = snprintf(menu_backtitle, sizeof(menu_backtitle), + "%s - %s", config_filename, rootmenu.prompt->text); + if (size >= sizeof(menu_backtitle)) + menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; + + size = snprintf(filename, sizeof(filename), "%s", config_filename); + if (size >= sizeof(filename)) + filename[sizeof(filename)-1] = '\0'; + return menu_backtitle; +} + +/* return = 0 means we are successful. + * -1 means go on doing what you were doing + */ +static int do_exit(void) +{ + int res; + if (!conf_get_changed()) { + global_exit = 1; + return 0; + } + res = btn_dialog(main_window, + _("Do you wish to save your new configuration?\n" + " to cancel and resume nconfig."), + 2, + " ", + ""); + if (res == KEY_EXIT) { + global_exit = 0; + return -1; + } + + /* if we got here, the user really wants to exit */ + switch (res) { + case 0: + res = conf_write(filename); + if (res) + btn_dialog( + main_window, + _("Error during writing of configuration.\n" + "Your configuration changes were NOT saved."), + 1, + ""); + break; + default: + btn_dialog( + main_window, + _("Your configuration changes were NOT saved."), + 1, + ""); + break; + } + global_exit = 1; + return 0; +} + + +static void search_conf(void) +{ + struct symbol **sym_arr; + struct gstr res; + struct gstr title; + char *dialog_input; + int dres; + + title = str_new(); + str_printf( &title, _("Enter (sub)string or regexp to search for " + "(with or without \"%s\")"), CONFIG_); + +again: + dres = dialog_inputbox(main_window, + _("Search Configuration Parameter"), + str_get(&title), + "", &dialog_input_result, &dialog_input_result_len); + switch (dres) { + case 0: + break; + case 1: + show_scroll_win(main_window, + _("Search Configuration"), search_help); + goto again; + default: + str_free(&title); + return; + } + + /* strip the prefix if necessary */ + dialog_input = dialog_input_result; + if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0) + dialog_input += strlen(CONFIG_); + + sym_arr = sym_re_search(dialog_input); + res = get_relations_str(sym_arr, NULL); + free(sym_arr); + show_scroll_win(main_window, + _("Search Results"), str_get(&res)); + str_free(&res); + str_free(&title); +} + + +static void build_conf(struct menu *menu) +{ + struct symbol *sym; + struct property *prop; + struct menu *child; + int type, tmp, doint = 2; + tristate val; + char ch; + + if (!menu || (!show_all_items && !menu_is_visible(menu))) + return; + + sym = menu->sym; + prop = menu->prompt; + if (!sym) { + if (prop && menu != current_menu) { + const char *prompt = menu_get_prompt(menu); + enum prop_type ptype; + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + switch (ptype) { + case P_MENU: + child_count++; + prompt = _(prompt); + if (single_menu_mode) { + item_make(menu, 'm', + "%s%*c%s", + menu->data ? "-->" : "++>", + indent + 1, ' ', prompt); + } else + item_make(menu, 'm', + " %*c%s %s", + indent + 1, ' ', prompt, + menu_is_empty(menu) ? "----" : "--->"); + + if (single_menu_mode && menu->data) + goto conf_childs; + return; + case P_COMMENT: + if (prompt) { + child_count++; + item_make(menu, ':', + " %*c*** %s ***", + indent + 1, ' ', + _(prompt)); + } + break; + default: + if (prompt) { + child_count++; + item_make(menu, ':', "---%*c%s", + indent + 1, ' ', + _(prompt)); + } + } + } else + doint = 0; + goto conf_childs; + } + + type = sym_get_type(sym); + if (sym_is_choice(sym)) { + struct symbol *def_sym = sym_get_choice_value(sym); + struct menu *def_menu = NULL; + + child_count++; + for (child = menu->list; child; child = child->next) { + if (menu_is_visible(child) && child->sym == def_sym) + def_menu = child; + } + + val = sym_get_tristate_value(sym); + if (sym_is_changable(sym)) { + switch (type) { + case S_BOOLEAN: + item_make(menu, 't', "[%c]", + val == no ? ' ' : '*'); + break; + case S_TRISTATE: + switch (val) { + case yes: + ch = '*'; + break; + case mod: + ch = 'M'; + break; + default: + ch = ' '; + break; + } + item_make(menu, 't', "<%c>", ch); + break; + } + } else { + item_make(menu, def_menu ? 't' : ':', " "); + } + + item_add_str("%*c%s", indent + 1, + ' ', _(menu_get_prompt(menu))); + if (val == yes) { + if (def_menu) { + item_add_str(" (%s)", + _(menu_get_prompt(def_menu))); + item_add_str(" --->"); + if (def_menu->list) { + indent += 2; + build_conf(def_menu); + indent -= 2; + } + } + return; + } + } else { + if (menu == current_menu) { + item_make(menu, ':', + "---%*c%s", indent + 1, + ' ', _(menu_get_prompt(menu))); + goto conf_childs; + } + child_count++; + val = sym_get_tristate_value(sym); + if (sym_is_choice_value(sym) && val == yes) { + item_make(menu, ':', " "); + } else { + switch (type) { + case S_BOOLEAN: + if (sym_is_changable(sym)) + item_make(menu, 't', "[%c]", + val == no ? ' ' : '*'); + else + item_make(menu, 't', "-%c-", + val == no ? ' ' : '*'); + break; + case S_TRISTATE: + switch (val) { + case yes: + ch = '*'; + break; + case mod: + ch = 'M'; + break; + default: + ch = ' '; + break; + } + if (sym_is_changable(sym)) { + if (sym->rev_dep.tri == mod) + item_make(menu, + 't', "{%c}", ch); + else + item_make(menu, + 't', "<%c>", ch); + } else + item_make(menu, 't', "-%c-", ch); + break; + default: + tmp = 2 + strlen(sym_get_string_value(sym)); + item_make(menu, 's', " (%s)", + sym_get_string_value(sym)); + tmp = indent - tmp + 4; + if (tmp < 0) + tmp = 0; + item_add_str("%*c%s%s", tmp, ' ', + _(menu_get_prompt(menu)), + (sym_has_value(sym) || + !sym_is_changable(sym)) ? "" : + _(" (NEW)")); + goto conf_childs; + } + } + item_add_str("%*c%s%s", indent + 1, ' ', + _(menu_get_prompt(menu)), + (sym_has_value(sym) || !sym_is_changable(sym)) ? + "" : _(" (NEW)")); + if (menu->prompt && menu->prompt->type == P_MENU) { + item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); + return; + } + } + +conf_childs: + indent += doint; + for (child = menu->list; child; child = child->next) + build_conf(child); + indent -= doint; +} + +static void reset_menu(void) +{ + unpost_menu(curses_menu); + clean_items(); +} + +/* adjust the menu to show this item. + * prefer not to scroll the menu if possible*/ +static void center_item(int selected_index, int *last_top_row) +{ + int toprow; + + set_top_row(curses_menu, *last_top_row); + toprow = top_row(curses_menu); + if (selected_index < toprow || + selected_index >= toprow+mwin_max_lines) { + toprow = max(selected_index-mwin_max_lines/2, 0); + if (toprow >= item_count(curses_menu)-mwin_max_lines) + toprow = item_count(curses_menu)-mwin_max_lines; + set_top_row(curses_menu, toprow); + } + set_current_item(curses_menu, + curses_menu_items[selected_index]); + *last_top_row = toprow; + post_menu(curses_menu); + refresh_all_windows(main_window); +} + +/* this function assumes reset_menu has been called before */ +static void show_menu(const char *prompt, const char *instructions, + int selected_index, int *last_top_row) +{ + int maxx, maxy; + WINDOW *menu_window; + + current_instructions = instructions; + + clear(); + (void) wattrset(main_window, attributes[NORMAL]); + print_in_middle(stdscr, 1, 0, getmaxx(stdscr), + menu_backtitle, + attributes[MAIN_HEADING]); + + (void) wattrset(main_window, attributes[MAIN_MENU_BOX]); + box(main_window, 0, 0); + (void) wattrset(main_window, attributes[MAIN_MENU_HEADING]); + mvwprintw(main_window, 0, 3, " %s ", prompt); + (void) wattrset(main_window, attributes[NORMAL]); + + set_menu_items(curses_menu, curses_menu_items); + + /* position the menu at the middle of the screen */ + scale_menu(curses_menu, &maxy, &maxx); + maxx = min(maxx, mwin_max_cols-2); + maxy = mwin_max_lines; + menu_window = derwin(main_window, + maxy, + maxx, + 2, + (mwin_max_cols-maxx)/2); + keypad(menu_window, TRUE); + set_menu_win(curses_menu, menu_window); + set_menu_sub(curses_menu, menu_window); + + /* must reassert this after changing items, otherwise returns to a + * default of 16 + */ + set_menu_format(curses_menu, maxy, 1); + center_item(selected_index, last_top_row); + set_menu_format(curses_menu, maxy, 1); + + print_function_line(); + + /* Post the menu */ + post_menu(curses_menu); + refresh_all_windows(main_window); +} + +static void adj_match_dir(match_f *match_direction) +{ + if (*match_direction == FIND_NEXT_MATCH_DOWN) + *match_direction = + MATCH_TINKER_PATTERN_DOWN; + else if (*match_direction == FIND_NEXT_MATCH_UP) + *match_direction = + MATCH_TINKER_PATTERN_UP; + /* else, do no change.. */ +} + +struct match_state +{ + int in_search; + match_f match_direction; + char pattern[256]; +}; + +/* Return 0 means I have handled the key. In such a case, ans should hold the + * item to center, or -1 otherwise. + * Else return -1 . + */ +static int do_match(int key, struct match_state *state, int *ans) +{ + char c = (char) key; + int terminate_search = 0; + *ans = -1; + if (key == '/' || (state->in_search && key == 27)) { + move(0, 0); + refresh(); + clrtoeol(); + state->in_search = 1-state->in_search; + bzero(state->pattern, sizeof(state->pattern)); + state->match_direction = MATCH_TINKER_PATTERN_DOWN; + return 0; + } else if (!state->in_search) + return 1; + + if (isalnum(c) || isgraph(c) || c == ' ') { + state->pattern[strlen(state->pattern)] = c; + state->pattern[strlen(state->pattern)] = '\0'; + adj_match_dir(&state->match_direction); + *ans = get_mext_match(state->pattern, + state->match_direction); + } else if (key == KEY_DOWN) { + state->match_direction = FIND_NEXT_MATCH_DOWN; + *ans = get_mext_match(state->pattern, + state->match_direction); + } else if (key == KEY_UP) { + state->match_direction = FIND_NEXT_MATCH_UP; + *ans = get_mext_match(state->pattern, + state->match_direction); + } else if (key == KEY_BACKSPACE || key == 127) { + state->pattern[strlen(state->pattern)-1] = '\0'; + adj_match_dir(&state->match_direction); + } else + terminate_search = 1; + + if (terminate_search) { + state->in_search = 0; + bzero(state->pattern, sizeof(state->pattern)); + move(0, 0); + refresh(); + clrtoeol(); + return -1; + } + return 0; +} + +static void conf(struct menu *menu) +{ + struct menu *submenu = 0; + const char *prompt = menu_get_prompt(menu); + struct symbol *sym; + int res; + int current_index = 0; + int last_top_row = 0; + struct match_state match_state = { + .in_search = 0, + .match_direction = MATCH_TINKER_PATTERN_DOWN, + .pattern = "", + }; + + while (!global_exit) { + reset_menu(); + current_menu = menu; + build_conf(menu); + if (!child_count) + break; + + show_menu(prompt ? _(prompt) : _("Main Menu"), + _(menu_instructions), + current_index, &last_top_row); + keypad((menu_win(curses_menu)), TRUE); + while (!global_exit) { + if (match_state.in_search) { + mvprintw(0, 0, + "searching: %s", match_state.pattern); + clrtoeol(); + } + refresh_all_windows(main_window); + res = wgetch(menu_win(curses_menu)); + if (!res) + break; + if (do_match(res, &match_state, ¤t_index) == 0) { + if (current_index != -1) + center_item(current_index, + &last_top_row); + continue; + } + if (process_special_keys(&res, + (struct menu *) item_data())) + break; + switch (res) { + case KEY_DOWN: + menu_driver(curses_menu, REQ_DOWN_ITEM); + break; + case KEY_UP: + menu_driver(curses_menu, REQ_UP_ITEM); + break; + case KEY_NPAGE: + menu_driver(curses_menu, REQ_SCR_DPAGE); + break; + case KEY_PPAGE: + menu_driver(curses_menu, REQ_SCR_UPAGE); + break; + case KEY_HOME: + menu_driver(curses_menu, REQ_FIRST_ITEM); + break; + case KEY_END: + menu_driver(curses_menu, REQ_LAST_ITEM); + break; + case 'h': + case '?': + show_help((struct menu *) item_data()); + break; + } + if (res == 10 || res == 27 || + res == 32 || res == 'n' || res == 'y' || + res == KEY_LEFT || res == KEY_RIGHT || + res == 'm') + break; + refresh_all_windows(main_window); + } + + refresh_all_windows(main_window); + /* if ESC or left*/ + if (res == 27 || (menu != &rootmenu && res == KEY_LEFT)) + break; + + /* remember location in the menu */ + last_top_row = top_row(curses_menu); + current_index = curses_item_index(); + + if (!item_tag()) + continue; + + submenu = (struct menu *) item_data(); + if (!submenu || !menu_is_visible(submenu)) + continue; + sym = submenu->sym; + + switch (res) { + case ' ': + if (item_is_tag('t')) + sym_toggle_tristate_value(sym); + else if (item_is_tag('m')) + conf(submenu); + break; + case KEY_RIGHT: + case 10: /* ENTER WAS PRESSED */ + switch (item_tag()) { + case 'm': + if (single_menu_mode) + submenu->data = + (void *) (long) !submenu->data; + else + conf(submenu); + break; + case 't': + if (sym_is_choice(sym) && + sym_get_tristate_value(sym) == yes) + conf_choice(submenu); + else if (submenu->prompt && + submenu->prompt->type == P_MENU) + conf(submenu); + else if (res == 10) + sym_toggle_tristate_value(sym); + break; + case 's': + conf_string(submenu); + break; + } + break; + case 'y': + if (item_is_tag('t')) { + if (sym_set_tristate_value(sym, yes)) + break; + if (sym_set_tristate_value(sym, mod)) + btn_dialog(main_window, setmod_text, 0); + } + break; + case 'n': + if (item_is_tag('t')) + sym_set_tristate_value(sym, no); + break; + case 'm': + if (item_is_tag('t')) + sym_set_tristate_value(sym, mod); + break; + } + } +} + +static void conf_message_callback(const char *fmt, va_list ap) +{ + char buf[1024]; + + vsnprintf(buf, sizeof(buf), fmt, ap); + btn_dialog(main_window, buf, 1, ""); +} + +static void show_help(struct menu *menu) +{ + struct gstr help; + + if (!menu) + return; + + help = str_new(); + menu_get_ext_help(menu, &help); + show_scroll_win(main_window, _(menu_get_prompt(menu)), str_get(&help)); + str_free(&help); +} + +static void conf_choice(struct menu *menu) +{ + const char *prompt = _(menu_get_prompt(menu)); + struct menu *child = 0; + struct symbol *active; + int selected_index = 0; + int last_top_row = 0; + int res, i = 0; + struct match_state match_state = { + .in_search = 0, + .match_direction = MATCH_TINKER_PATTERN_DOWN, + .pattern = "", + }; + + active = sym_get_choice_value(menu->sym); + /* this is mostly duplicated from the conf() function. */ + while (!global_exit) { + reset_menu(); + + for (i = 0, child = menu->list; child; child = child->next) { + if (!show_all_items && !menu_is_visible(child)) + continue; + + if (child->sym == sym_get_choice_value(menu->sym)) + item_make(child, ':', " %s", + _(menu_get_prompt(child))); + else if (child->sym) + item_make(child, ':', " %s", + _(menu_get_prompt(child))); + else + item_make(child, ':', "*** %s ***", + _(menu_get_prompt(child))); + + if (child->sym == active){ + last_top_row = top_row(curses_menu); + selected_index = i; + } + i++; + } + show_menu(prompt ? _(prompt) : _("Choice Menu"), + _(radiolist_instructions), + selected_index, + &last_top_row); + while (!global_exit) { + if (match_state.in_search) { + mvprintw(0, 0, "searching: %s", + match_state.pattern); + clrtoeol(); + } + refresh_all_windows(main_window); + res = wgetch(menu_win(curses_menu)); + if (!res) + break; + if (do_match(res, &match_state, &selected_index) == 0) { + if (selected_index != -1) + center_item(selected_index, + &last_top_row); + continue; + } + if (process_special_keys( + &res, + (struct menu *) item_data())) + break; + switch (res) { + case KEY_DOWN: + menu_driver(curses_menu, REQ_DOWN_ITEM); + break; + case KEY_UP: + menu_driver(curses_menu, REQ_UP_ITEM); + break; + case KEY_NPAGE: + menu_driver(curses_menu, REQ_SCR_DPAGE); + break; + case KEY_PPAGE: + menu_driver(curses_menu, REQ_SCR_UPAGE); + break; + case KEY_HOME: + menu_driver(curses_menu, REQ_FIRST_ITEM); + break; + case KEY_END: + menu_driver(curses_menu, REQ_LAST_ITEM); + break; + case 'h': + case '?': + show_help((struct menu *) item_data()); + break; + } + if (res == 10 || res == 27 || res == ' ' || + res == KEY_LEFT){ + break; + } + refresh_all_windows(main_window); + } + /* if ESC or left */ + if (res == 27 || res == KEY_LEFT) + break; + + child = item_data(); + if (!child || !menu_is_visible(child) || !child->sym) + continue; + switch (res) { + case ' ': + case 10: + case KEY_RIGHT: + sym_set_tristate_value(child->sym, yes); + return; + case 'h': + case '?': + show_help(child); + active = child->sym; + break; + case KEY_EXIT: + return; + } + } +} + +static void conf_string(struct menu *menu) +{ + const char *prompt = menu_get_prompt(menu); + + while (1) { + int res; + const char *heading; + + switch (sym_get_type(menu->sym)) { + case S_INT: + heading = _(inputbox_instructions_int); + break; + case S_HEX: + heading = _(inputbox_instructions_hex); + break; + case S_STRING: + heading = _(inputbox_instructions_string); + break; + default: + heading = _("Internal nconf error!"); + } + res = dialog_inputbox(main_window, + prompt ? _(prompt) : _("Main Menu"), + heading, + sym_get_string_value(menu->sym), + &dialog_input_result, + &dialog_input_result_len); + switch (res) { + case 0: + if (sym_set_string_value(menu->sym, + dialog_input_result)) + return; + btn_dialog(main_window, + _("You have made an invalid entry."), 0); + break; + case 1: + show_help(menu); + break; + case KEY_EXIT: + return; + } + } +} + +static void conf_load(void) +{ + while (1) { + int res; + res = dialog_inputbox(main_window, + NULL, load_config_text, + filename, + &dialog_input_result, + &dialog_input_result_len); + switch (res) { + case 0: + if (!dialog_input_result[0]) + return; + if (!conf_read(dialog_input_result)) { + set_config_filename(dialog_input_result); + sym_set_change_count(1); + return; + } + btn_dialog(main_window, _("File does not exist!"), 0); + break; + case 1: + show_scroll_win(main_window, + _("Load Alternate Configuration"), + load_config_help); + break; + case KEY_EXIT: + return; + } + } +} + +static void conf_save(void) +{ + while (1) { + int res; + res = dialog_inputbox(main_window, + NULL, save_config_text, + filename, + &dialog_input_result, + &dialog_input_result_len); + switch (res) { + case 0: + if (!dialog_input_result[0]) + return; + res = conf_write(dialog_input_result); + if (!res) { + set_config_filename(dialog_input_result); + return; + } + btn_dialog(main_window, _("Can't create file! " + "Probably a nonexistent directory."), + 1, ""); + break; + case 1: + show_scroll_win(main_window, + _("Save Alternate Configuration"), + save_config_help); + break; + case KEY_EXIT: + return; + } + } +} + +void setup_windows(void) +{ + int lines, columns; + + getmaxyx(stdscr, lines, columns); + + if (main_window != NULL) + delwin(main_window); + + /* set up the menu and menu window */ + main_window = newwin(lines-2, columns-2, 2, 1); + keypad(main_window, TRUE); + mwin_max_lines = lines-7; + mwin_max_cols = columns-6; + + /* panels order is from bottom to top */ + new_panel(main_window); +} + +int main(int ac, char **av) +{ + int lines, columns; + char *mode; + + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + conf_parse(av[1]); + conf_read(NULL); + + mode = getenv("NCONFIG_MODE"); + if (mode) { + if (!strcasecmp(mode, "single_menu")) + single_menu_mode = 1; + } + + /* Initialize curses */ + initscr(); + /* set color theme */ + set_colors(); + + cbreak(); + noecho(); + keypad(stdscr, TRUE); + curs_set(0); + + getmaxyx(stdscr, lines, columns); + if (columns < 75 || lines < 20) { + endwin(); + printf("Your terminal should have at " + "least 20 lines and 75 columns\n"); + return 1; + } + + notimeout(stdscr, FALSE); +#if NCURSES_REENTRANT + set_escdelay(1); +#else + ESCDELAY = 1; +#endif + + /* set btns menu */ + curses_menu = new_menu(curses_menu_items); + menu_opts_off(curses_menu, O_SHOWDESC); + menu_opts_on(curses_menu, O_SHOWMATCH); + menu_opts_on(curses_menu, O_ONEVALUE); + menu_opts_on(curses_menu, O_NONCYCLIC); + menu_opts_on(curses_menu, O_IGNORECASE); + set_menu_mark(curses_menu, " "); + set_menu_fore(curses_menu, attributes[MAIN_MENU_FORE]); + set_menu_back(curses_menu, attributes[MAIN_MENU_BACK]); + set_menu_grey(curses_menu, attributes[MAIN_MENU_GREY]); + + set_config_filename(conf_get_configname()); + setup_windows(); + + /* check for KEY_FUNC(1) */ + if (has_key(KEY_F(1)) == FALSE) { + show_scroll_win(main_window, + _("Instructions"), + _(menu_no_f_instructions)); + } + + conf_set_message_callback(conf_message_callback); + /* do the work */ + while (!global_exit) { + conf(&rootmenu); + if (!global_exit && do_exit() == 0) + break; + } + /* ok, we are done */ + unpost_menu(curses_menu); + free_menu(curses_menu); + delwin(main_window); + clear(); + refresh(); + endwin(); + return 0; +} + diff --git a/support/kconfig/nconf.gui.c b/support/kconfig/nconf.gui.c new file mode 100644 index 0000000000..8275f0e551 --- /dev/null +++ b/support/kconfig/nconf.gui.c @@ -0,0 +1,656 @@ +/* + * Copyright (C) 2008 Nir Tzachar 0) + win_rows = msg_lines+4; + else + win_rows = msg_lines+2; + + win = newwin(win_rows, total_width+4, y, x); + keypad(win, TRUE); + menu_win = derwin(win, 1, btns_width, win_rows-2, + 1+(total_width+2-btns_width)/2); + menu = new_menu(btns); + msg_win = derwin(win, win_rows-2, msg_width, 1, + 1+(total_width+2-msg_width)/2); + + set_menu_fore(menu, attributes[DIALOG_MENU_FORE]); + set_menu_back(menu, attributes[DIALOG_MENU_BACK]); + + (void) wattrset(win, attributes[DIALOG_BOX]); + box(win, 0, 0); + + /* print message */ + (void) wattrset(msg_win, attributes[DIALOG_TEXT]); + fill_window(msg_win, msg); + + set_menu_win(menu, win); + set_menu_sub(menu, menu_win); + set_menu_format(menu, 1, btn_num); + menu_opts_off(menu, O_SHOWDESC); + menu_opts_off(menu, O_SHOWMATCH); + menu_opts_on(menu, O_ONEVALUE); + menu_opts_on(menu, O_NONCYCLIC); + set_menu_mark(menu, ""); + post_menu(menu); + + + touchwin(win); + refresh_all_windows(main_window); + while ((res = wgetch(win))) { + switch (res) { + case KEY_LEFT: + menu_driver(menu, REQ_LEFT_ITEM); + break; + case KEY_RIGHT: + menu_driver(menu, REQ_RIGHT_ITEM); + break; + case 10: /* ENTER */ + case 27: /* ESCAPE */ + case ' ': + case KEY_F(F_BACK): + case KEY_F(F_EXIT): + break; + } + touchwin(win); + refresh_all_windows(main_window); + + if (res == 10 || res == ' ') { + res = item_index(current_item(menu)); + break; + } else if (res == 27 || res == KEY_F(F_BACK) || + res == KEY_F(F_EXIT)) { + res = KEY_EXIT; + break; + } + } + + unpost_menu(menu); + free_menu(menu); + for (i = 0; i < btn_num; i++) + free_item(btns[i]); + + delwin(win); + return res; +} + +int dialog_inputbox(WINDOW *main_window, + const char *title, const char *prompt, + const char *init, char **resultp, int *result_len) +{ + int prompt_lines = 0; + int prompt_width = 0; + WINDOW *win; + WINDOW *prompt_win; + WINDOW *form_win; + PANEL *panel; + int i, x, y; + int res = -1; + int cursor_position = strlen(init); + int cursor_form_win; + char *result = *resultp; + + if (strlen(init)+1 > *result_len) { + *result_len = strlen(init)+1; + *resultp = result = realloc(result, *result_len); + } + + /* find the widest line of msg: */ + prompt_lines = get_line_no(prompt); + for (i = 0; i < prompt_lines; i++) { + const char *line = get_line(prompt, i); + int len = get_line_length(line); + prompt_width = max(prompt_width, len); + } + + if (title) + prompt_width = max(prompt_width, strlen(title)); + + /* place dialog in middle of screen */ + y = (getmaxy(stdscr)-(prompt_lines+4))/2; + x = (getmaxx(stdscr)-(prompt_width+4))/2; + + strncpy(result, init, *result_len); + + /* create the windows */ + win = newwin(prompt_lines+6, prompt_width+7, y, x); + prompt_win = derwin(win, prompt_lines+1, prompt_width, 2, 2); + form_win = derwin(win, 1, prompt_width, prompt_lines+3, 2); + keypad(form_win, TRUE); + + (void) wattrset(form_win, attributes[INPUT_FIELD]); + + (void) wattrset(win, attributes[INPUT_BOX]); + box(win, 0, 0); + (void) wattrset(win, attributes[INPUT_HEADING]); + if (title) + mvwprintw(win, 0, 3, "%s", title); + + /* print message */ + (void) wattrset(prompt_win, attributes[INPUT_TEXT]); + fill_window(prompt_win, prompt); + + mvwprintw(form_win, 0, 0, "%*s", prompt_width, " "); + cursor_form_win = min(cursor_position, prompt_width-1); + mvwprintw(form_win, 0, 0, "%s", + result + cursor_position-cursor_form_win); + + /* create panels */ + panel = new_panel(win); + + /* show the cursor */ + curs_set(1); + + touchwin(win); + refresh_all_windows(main_window); + while ((res = wgetch(form_win))) { + int len = strlen(result); + switch (res) { + case 10: /* ENTER */ + case 27: /* ESCAPE */ + case KEY_F(F_HELP): + case KEY_F(F_EXIT): + case KEY_F(F_BACK): + break; + case 127: + case KEY_BACKSPACE: + if (cursor_position > 0) { + memmove(&result[cursor_position-1], + &result[cursor_position], + len-cursor_position+1); + cursor_position--; + cursor_form_win--; + len--; + } + break; + case KEY_DC: + if (cursor_position >= 0 && cursor_position < len) { + memmove(&result[cursor_position], + &result[cursor_position+1], + len-cursor_position+1); + len--; + } + break; + case KEY_UP: + case KEY_RIGHT: + if (cursor_position < len) { + cursor_position++; + cursor_form_win++; + } + break; + case KEY_DOWN: + case KEY_LEFT: + if (cursor_position > 0) { + cursor_position--; + cursor_form_win--; + } + break; + case KEY_HOME: + cursor_position = 0; + cursor_form_win = 0; + break; + case KEY_END: + cursor_position = len; + cursor_form_win = min(cursor_position, prompt_width-1); + break; + default: + if ((isgraph(res) || isspace(res))) { + /* one for new char, one for '\0' */ + if (len+2 > *result_len) { + *result_len = len+2; + *resultp = result = realloc(result, + *result_len); + } + /* insert the char at the proper position */ + memmove(&result[cursor_position+1], + &result[cursor_position], + len-cursor_position+1); + result[cursor_position] = res; + cursor_position++; + cursor_form_win++; + len++; + } else { + mvprintw(0, 0, "unknown key: %d\n", res); + } + break; + } + if (cursor_form_win < 0) + cursor_form_win = 0; + else if (cursor_form_win > prompt_width-1) + cursor_form_win = prompt_width-1; + + wmove(form_win, 0, 0); + wclrtoeol(form_win); + mvwprintw(form_win, 0, 0, "%*s", prompt_width, " "); + mvwprintw(form_win, 0, 0, "%s", + result + cursor_position-cursor_form_win); + wmove(form_win, 0, cursor_form_win); + touchwin(win); + refresh_all_windows(main_window); + + if (res == 10) { + res = 0; + break; + } else if (res == 27 || res == KEY_F(F_BACK) || + res == KEY_F(F_EXIT)) { + res = KEY_EXIT; + break; + } else if (res == KEY_F(F_HELP)) { + res = 1; + break; + } + } + + /* hide the cursor */ + curs_set(0); + del_panel(panel); + delwin(prompt_win); + delwin(form_win); + delwin(win); + return res; +} + +/* refresh all windows in the correct order */ +void refresh_all_windows(WINDOW *main_window) +{ + update_panels(); + touchwin(main_window); + refresh(); +} + +/* layman's scrollable window... */ +void show_scroll_win(WINDOW *main_window, + const char *title, + const char *text) +{ + int res; + int total_lines = get_line_no(text); + int x, y, lines, columns; + int start_x = 0, start_y = 0; + int text_lines = 0, text_cols = 0; + int total_cols = 0; + int win_cols = 0; + int win_lines = 0; + int i = 0; + WINDOW *win; + WINDOW *pad; + PANEL *panel; + + getmaxyx(stdscr, lines, columns); + + /* find the widest line of msg: */ + total_lines = get_line_no(text); + for (i = 0; i < total_lines; i++) { + const char *line = get_line(text, i); + int len = get_line_length(line); + total_cols = max(total_cols, len+2); + } + + /* create the pad */ + pad = newpad(total_lines+10, total_cols+10); + (void) wattrset(pad, attributes[SCROLLWIN_TEXT]); + fill_window(pad, text); + + win_lines = min(total_lines+4, lines-2); + win_cols = min(total_cols+2, columns-2); + text_lines = max(win_lines-4, 0); + text_cols = max(win_cols-2, 0); + + /* place window in middle of screen */ + y = (lines-win_lines)/2; + x = (columns-win_cols)/2; + + win = newwin(win_lines, win_cols, y, x); + keypad(win, TRUE); + /* show the help in the help window, and show the help panel */ + (void) wattrset(win, attributes[SCROLLWIN_BOX]); + box(win, 0, 0); + (void) wattrset(win, attributes[SCROLLWIN_HEADING]); + mvwprintw(win, 0, 3, " %s ", title); + panel = new_panel(win); + + /* handle scrolling */ + do { + + copywin(pad, win, start_y, start_x, 2, 2, text_lines, + text_cols, 0); + print_in_middle(win, + text_lines+2, + 0, + text_cols, + "", + attributes[DIALOG_MENU_FORE]); + wrefresh(win); + + res = wgetch(win); + switch (res) { + case KEY_NPAGE: + case ' ': + case 'd': + start_y += text_lines-2; + break; + case KEY_PPAGE: + case 'u': + start_y -= text_lines+2; + break; + case KEY_HOME: + start_y = 0; + break; + case KEY_END: + start_y = total_lines-text_lines; + break; + case KEY_DOWN: + case 'j': + start_y++; + break; + case KEY_UP: + case 'k': + start_y--; + break; + case KEY_LEFT: + case 'h': + start_x--; + break; + case KEY_RIGHT: + case 'l': + start_x++; + break; + } + if (res == 10 || res == 27 || res == 'q' || + res == KEY_F(F_HELP) || res == KEY_F(F_BACK) || + res == KEY_F(F_EXIT)) + break; + if (start_y < 0) + start_y = 0; + if (start_y >= total_lines-text_lines) + start_y = total_lines-text_lines; + if (start_x < 0) + start_x = 0; + if (start_x >= total_cols-text_cols) + start_x = total_cols-text_cols; + } while (res); + + del_panel(panel); + delwin(win); + refresh_all_windows(main_window); +} diff --git a/support/kconfig/nconf.h b/support/kconfig/nconf.h new file mode 100644 index 0000000000..0d5261705e --- /dev/null +++ b/support/kconfig/nconf.h @@ -0,0 +1,96 @@ +/* + * Copyright (C) 2008 Nir Tzachar +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "ncurses.h" + +#define max(a, b) ({\ + typeof(a) _a = a;\ + typeof(b) _b = b;\ + _a > _b ? _a : _b; }) + +#define min(a, b) ({\ + typeof(a) _a = a;\ + typeof(b) _b = b;\ + _a < _b ? _a : _b; }) + +typedef enum { + NORMAL = 1, + MAIN_HEADING, + MAIN_MENU_BOX, + MAIN_MENU_FORE, + MAIN_MENU_BACK, + MAIN_MENU_GREY, + MAIN_MENU_HEADING, + SCROLLWIN_TEXT, + SCROLLWIN_HEADING, + SCROLLWIN_BOX, + DIALOG_TEXT, + DIALOG_MENU_FORE, + DIALOG_MENU_BACK, + DIALOG_BOX, + INPUT_BOX, + INPUT_HEADING, + INPUT_TEXT, + INPUT_FIELD, + FUNCTION_TEXT, + FUNCTION_HIGHLIGHT, + ATTR_MAX +} attributes_t; +extern attributes_t attributes[]; + +typedef enum { + F_HELP = 1, + F_SYMBOL = 2, + F_INSTS = 3, + F_CONF = 4, + F_BACK = 5, + F_SAVE = 6, + F_LOAD = 7, + F_SEARCH = 8, + F_EXIT = 9, +} function_key; + +void set_colors(void); + +/* this changes the windows attributes !!! */ +void print_in_middle(WINDOW *win, + int starty, + int startx, + int width, + const char *string, + chtype color); +int get_line_length(const char *line); +int get_line_no(const char *text); +const char *get_line(const char *text, int line_no); +void fill_window(WINDOW *win, const char *text); +int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...); +int dialog_inputbox(WINDOW *main_window, + const char *title, const char *prompt, + const char *init, char **resultp, int *result_len); +void refresh_all_windows(WINDOW *main_window); +void show_scroll_win(WINDOW *main_window, + const char *title, + const char *text); diff --git a/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch b/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch new file mode 100644 index 0000000000..ecfe76b6e2 --- /dev/null +++ b/support/kconfig/patches/01-kconfig-kernel-to-buildroot.patch @@ -0,0 +1,107 @@ +--- + confdata.c | 4 ++-- + gconf.glade | 2 +- + mconf.c | 4 ++-- + zconf.tab.c_shipped | 2 +- + zconf.y | 2 +- + 5 files changed, 7 insertions(+), 7 deletions(-) + +Index: kconfig/gconf.glade +=================================================================== +--- kconfig.orig/gconf.glade 2013-12-27 22:14:32.395629843 +0100 ++++ kconfig/gconf.glade 2013-12-27 22:14:32.387630158 +0100 +@@ -4,7 +4,7 @@ + + + True +- Gtk Kernel Configurator ++ Gtk Buildroot Configurator + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False +Index: kconfig/mconf.c +=================================================================== +--- kconfig.orig/mconf.c 2013-12-27 22:14:32.395629843 +0100 ++++ kconfig/mconf.c 2013-12-27 22:14:42.179244153 +0100 +@@ -176,9 +176,9 @@ + "Arrow keys navigate the menu. " + " selects submenus ---> (or empty submenus ----). " + "Highlighted letters are hotkeys. " +- "Pressing includes, excludes, modularizes features. " ++ "Pressing selectes a feature, while will exclude a feature. " + "Press to exit, for Help, for Search. " +- "Legend: [*] built-in [ ] excluded module < > module capable"), ++ "Legend: [*] feature is selected [ ] feature is excluded"), + radiolist_instructions[] = N_( + "Use the arrow keys to navigate this window or " + "press the hotkey of the item you wish to select " +@@ -959,7 +959,7 @@ + if (conf_get_changed()) + res = dialog_yesno(NULL, + _("Do you wish to save your new configuration?\n" +- "(Press to continue kernel configuration.)"), ++ "(Press to continue Buildroot configuration.)"), + 6, 60); + else + res = -1; +Index: kconfig/zconf.tab.c_shipped +=================================================================== +--- kconfig.orig/zconf.tab.c_shipped 2013-12-27 22:14:32.395629843 +0100 ++++ kconfig/zconf.tab.c_shipped 2013-12-27 22:14:32.391630000 +0100 +@@ -2297,7 +2297,7 @@ + + sym_init(); + _menu_init(); +- rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); ++ rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); + + if (getenv("ZCONF_DEBUG")) + zconfdebug = 1; +Index: kconfig/zconf.y +=================================================================== +--- kconfig.orig/zconf.y 2013-12-27 22:14:32.395629843 +0100 ++++ kconfig/zconf.y 2013-12-27 22:14:32.391630000 +0100 +@@ -493,7 +493,7 @@ + + sym_init(); + _menu_init(); +- rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); ++ rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); + + if (getenv("ZCONF_DEBUG")) + zconfdebug = 1; +Index: kconfig/confdata.c +=================================================================== +--- kconfig.orig/confdata.c 2013-12-27 22:14:32.395629843 +0100 ++++ kconfig/confdata.c 2013-12-27 22:14:32.391630000 +0100 +@@ -25,7 +25,7 @@ + static const char *conf_filename; + static int conf_lineno, conf_warnings, conf_unsaved; + +-const char conf_defname[] = "arch/$ARCH/defconfig"; ++const char conf_defname[] = ".defconfig"; + + static void conf_warning(const char *fmt, ...) + { +@@ -63,7 +63,7 @@ + + const char *conf_get_configname(void) + { +- char *name = getenv("KCONFIG_CONFIG"); ++ char *name = getenv("BR2_CONFIG"); + + return name ? name : ".config"; + } +Index: kconfig/qconf.cc +=================================================================== +--- kconfig.orig/qconf.cc 2013-12-27 22:12:15.825013567 +0100 ++++ kconfig/qconf.cc 2013-12-27 22:14:57.826627300 +0100 +@@ -70,7 +70,7 @@ + } + + ConfigSettings::ConfigSettings() +- : QSettings("kernel.org", "qconf") ++ : QSettings("buildroot.org", "qconf") + { + } + diff --git a/support/kconfig/patches/06-br-build-system-integration.patch b/support/kconfig/patches/06-br-build-system-integration.patch new file mode 100644 index 0000000000..3faa39ed63 --- /dev/null +++ b/support/kconfig/patches/06-br-build-system-integration.patch @@ -0,0 +1,35 @@ +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -159,11 +159,11 @@ + + hostprogs-y := conf + +-ifeq ($(MAKECMDGOALS),nconfig) ++ifeq ($(MAKECMDGOALS),nconf) + hostprogs-y += nconf + endif + +-ifeq ($(MAKECMDGOALS),menuconfig) ++ifeq ($(MAKECMDGOALS),mconf) + hostprogs-y += mconf + endif + +@@ -171,10 +171,10 @@ + hostprogs-y += kxgettext + endif + +-ifeq ($(MAKECMDGOALS),xconfig) ++ifeq ($(MAKECMDGOALS),qconf) + qconf-target := 1 + endif +-ifeq ($(MAKECMDGOALS),gconfig) ++ifeq ($(MAKECMDGOALS),gconf) + gconf-target := 1 + endif + diff --git a/support/kconfig/patches/10-br-build-system.patch b/support/kconfig/patches/10-br-build-system.patch new file mode 100644 index 0000000000..be6fda07af --- /dev/null +++ b/support/kconfig/patches/10-br-build-system.patch @@ -0,0 +1,80 @@ +--- + Makefile.br | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + foo.h | 12 ++++++++++++ + 2 files changed, 65 insertions(+) + +Index: b/Makefile.br +=================================================================== +--- /dev/null ++++ b/Makefile.br +@@ -0,0 +1,53 @@ ++src := . ++top_srcdir=../../ ++top_builddir=../../ ++srctree := . ++obj ?= . ++ ++include Makefile ++#HOSTCFLAGS+=-Dinline="" -include foo.h ++-include $(obj)/.depend ++$(obj)/.depend: $(wildcard *.h *.c) ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > $@ 2>/dev/null || : ++ ++__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m)) ++host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m))) ++host-cmulti := $(foreach m,$(__hostprogs),\ ++ $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m)))) ++host-cxxmulti := $(foreach m,$(__hostprogs),\ ++ $(if $($(m)-cxxobjs),$(m),$(if $($(m)-objs),))) ++host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs)))) ++host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs)))) ++ ++HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\" ++ ++$(host-csingle): %: %.c ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@ ++ ++$(host-cmulti): %: $(host-cobjs) $(host-cshlib) ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ ++ ++$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib) ++ $(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@ ++ ++$(obj)/%.o: %.c ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ ++ ++$(obj)/%.o: $(obj)/%.c ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@ ++ ++$(obj)/%.o: %.cc ++ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$(@F)) -c $< -o $@ ++ ++$(obj)/%:: $(src)/%_shipped ++ $(Q)cat $< > $@ ++ ++clean: ++ $(Q)rm -f $(addprefix $(obj)/,$(clean-files)) ++distclean: clean ++ $(Q)rm -f $(addprefix $(obj)/,$(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \ ++ $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \ ++ mconf .depend) ++ ++FORCE: ++.PHONY: FORCE clean distclean +Index: b/foo.h +=================================================================== +--- /dev/null ++++ b/foo.h +@@ -0,0 +1,12 @@ ++#ifndef __KCONFIG_FOO_H ++#define __KCONFIG_FOO_H ++ ++#ifndef __APPLE__ ++#include ++#endif ++#include ++ ++#ifndef PATH_MAX ++#define PATH_MAX 1024 ++#endif ++#endif /* __KCONFIG_FOO_H */ diff --git a/support/kconfig/patches/11-use-mktemp-for-lxdialog.patch b/support/kconfig/patches/11-use-mktemp-for-lxdialog.patch new file mode 100644 index 0000000000..b38af26211 --- /dev/null +++ b/support/kconfig/patches/11-use-mktemp-for-lxdialog.patch @@ -0,0 +1,17 @@ +--- + lxdialog/check-lxdialog.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: b/lxdialog/check-lxdialog.sh +=================================================================== +--- a/lxdialog/check-lxdialog.sh ++++ b/lxdialog/check-lxdialog.sh +@@ -36,7 +36,7 @@ + } + + # Temp file, try to clean up after us +-tmp=.lxdialog.tmp ++tmp=$(mktemp) + trap "rm -f $tmp" 0 1 2 3 15 + + # Check if we can link to ncurses diff --git a/support/kconfig/patches/12-fix-glade-file-path.patch b/support/kconfig/patches/12-fix-glade-file-path.patch new file mode 100644 index 0000000000..a5777da3e9 --- /dev/null +++ b/support/kconfig/patches/12-fix-glade-file-path.patch @@ -0,0 +1,17 @@ +--- + gconf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: b/gconf.c +=================================================================== +--- a/gconf.c ++++ b/gconf.c +@@ -1486,7 +1486,7 @@ + /* Determine GUI path */ + env = getenv(SRCTREE); + if (env) +- glade_file = g_strconcat(env, "/scripts/kconfig/gconf.glade", NULL); ++ glade_file = g_strconcat(env, "/support/kconfig/gconf.glade", NULL); + else if (av[0][0] == '/') + glade_file = g_strconcat(av[0], ".glade", NULL); + else diff --git a/support/kconfig/patches/14-support-out-of-tree-config.patch b/support/kconfig/patches/14-support-out-of-tree-config.patch new file mode 100644 index 0000000000..ec3134f94e --- /dev/null +++ b/support/kconfig/patches/14-support-out-of-tree-config.patch @@ -0,0 +1,207 @@ +--- + conf.c | 1 + confdata.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++--------------- + util.c | 16 +++++++++++++-- + 3 files changed, 61 insertions(+), 18 deletions(-) + +Index: b/conf.c +=================================================================== +--- a/conf.c ++++ b/conf.c +@@ -558,7 +558,6 @@ + } + name = av[optind]; + conf_parse(name); +- //zconfdump(stdout); + if (sync_kconfig) { + name = conf_get_configname(); + if (stat(name, &tmpstat)) { +Index: b/confdata.c +=================================================================== +--- a/confdata.c ++++ b/confdata.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #include "lkc.h" + +@@ -70,9 +71,7 @@ + + const char *conf_get_autoconfig_name(void) + { +- char *name = getenv("KCONFIG_AUTOCONFIG"); +- +- return name ? name : "include/config/auto.conf"; ++ return getenv("KCONFIG_AUTOCONFIG"); + } + + static char *conf_expand_value(const char *in) +@@ -742,6 +741,9 @@ + char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; + char *env; + ++ if (!name) ++ name = conf_get_configname(); ++ + dirname[0] = 0; + if (name && name[0]) { + struct stat st; +@@ -836,6 +838,7 @@ + { + const char *name; + char path[PATH_MAX+1]; ++ char *opwd, *dir, *_name; + char *s, *d, c; + struct symbol *sym; + struct stat sb; +@@ -844,8 +847,20 @@ + name = conf_get_autoconfig_name(); + conf_read_simple(name, S_DEF_AUTO); + +- if (chdir("include/config")) +- return 1; ++ opwd = malloc(256); ++ _name = strdup(name); ++ if (opwd == NULL || _name == NULL) ++ return 1; ++ opwd = getcwd(opwd, 256); ++ dir = dirname(_name); ++ if (dir == NULL) { ++ res = 1; ++ goto err; ++ } ++ if (chdir(dir)) { ++ res = 1; ++ goto err; ++ } + + res = 0; + for_all_symbols(i, sym) { +@@ -938,9 +953,11 @@ + close(fd); + } + out: +- if (chdir("../..")) +- return 1; +- ++ if (chdir(opwd)) ++ res = 1; ++err: ++ free(opwd); ++ free(_name); + return res; + } + +@@ -950,25 +967,38 @@ + const char *name; + FILE *out, *tristate, *out_h; + int i; ++ char dir[PATH_MAX+1], buf[PATH_MAX+1]; ++ char *s; ++ ++ strcpy(dir, conf_get_configname()); ++ s = strrchr(dir, '/'); ++ if (s) ++ s[1] = 0; ++ else ++ dir[0] = 0; + + sym_clear_all_valid(); + +- file_write_dep("include/config/auto.conf.cmd"); ++ sprintf(buf, "%s.config.cmd", dir); ++ file_write_dep(buf); + + if (conf_split_config()) + return 1; + +- out = fopen(".tmpconfig", "w"); ++ sprintf(buf, "%s.tmpconfig", dir); ++ out = fopen(buf, "w"); + if (!out) + return 1; + +- tristate = fopen(".tmpconfig_tristate", "w"); ++ sprintf(buf, "%s.tmpconfig_tristate", dir); ++ tristate = fopen(buf, "w"); + if (!tristate) { + fclose(out); + return 1; + } + +- out_h = fopen(".tmpconfig.h", "w"); ++ sprintf(buf, "%s.tmpconfig.h", dir); ++ out_h = fopen(buf, "w"); + if (!out_h) { + fclose(out); + fclose(tristate); +@@ -1000,19 +1030,22 @@ + name = getenv("KCONFIG_AUTOHEADER"); + if (!name) + name = "include/generated/autoconf.h"; +- if (rename(".tmpconfig.h", name)) ++ sprintf(buf, "%s.tmpconfig.h", dir); ++ if (rename(buf, name)) + return 1; + name = getenv("KCONFIG_TRISTATE"); + if (!name) + name = "include/config/tristate.conf"; +- if (rename(".tmpconfig_tristate", name)) ++ sprintf(buf, "%s.tmpconfig_tristate", dir); ++ if (rename(buf, name)) + return 1; + name = conf_get_autoconfig_name(); + /* + * This must be the last step, kbuild has a dependency on auto.conf + * and this marks the successful completion of the previous steps. + */ +- if (rename(".tmpconfig", name)) ++ sprintf(buf, "%s.tmpconfig", dir); ++ if (rename(buf, name)) + return 1; + + return 0; +Index: b/util.c +=================================================================== +--- a/util.c ++++ b/util.c +@@ -34,6 +34,8 @@ + /* write a dependency file as used by kbuild to track dependencies */ + int file_write_dep(const char *name) + { ++ char *str; ++ char buf[PATH_MAX+1], buf2[PATH_MAX+1], dir[PATH_MAX+1]; + struct symbol *sym, *env_sym; + struct expr *e; + struct file *file; +@@ -41,7 +43,16 @@ + + if (!name) + name = ".kconfig.d"; +- out = fopen("..config.tmp", "w"); ++ ++ strcpy(dir, conf_get_configname()); ++ str = strrchr(dir, '/'); ++ if (str) ++ str[1] = 0; ++ else ++ dir[0] = 0; ++ ++ sprintf(buf, "%s..config.tmp", dir); ++ out = fopen(buf, "w"); + if (!out) + return 1; + fprintf(out, "deps_config := \\\n"); +@@ -72,7 +83,8 @@ + + fprintf(out, "\n$(deps_config): ;\n"); + fclose(out); +- rename("..config.tmp", name); ++ sprintf(buf2, "%s%s", dir, name); ++ rename(buf, buf2); + return 0; + } + diff --git a/support/kconfig/patches/15-fix-qconf-moc-rule.patch b/support/kconfig/patches/15-fix-qconf-moc-rule.patch new file mode 100644 index 0000000000..c1848d764e --- /dev/null +++ b/support/kconfig/patches/15-fix-qconf-moc-rule.patch @@ -0,0 +1,24 @@ +Fix the rule that generates the .moc file + +The Linux kernel has a "cmd" make function, but we don't have it in +Buildroot, so we need to adjust this rule. + +Signed-off-by: Thomas Petazzoni + +Index: b/Makefile +=================================================================== +--- a/Makefile ++++ b/Makefile +@@ -309,11 +309,8 @@ + + $(obj)/qconf.o: $(obj)/qconf.moc + +-quiet_cmd_moc = MOC $@ +- cmd_moc = $(KC_QT_MOC) -i $< -o $@ +- + $(obj)/%.moc: $(src)/%.h $(obj)/.tmp_qtcheck +- $(call cmd,moc) ++ $(KC_QT_MOC) -i $< -o $@ + + # Extract gconf menu items for I18N support + $(obj)/gconf.glade.h: $(obj)/gconf.glade diff --git a/support/kconfig/patches/16-fix-space-to-de-select-options.patch b/support/kconfig/patches/16-fix-space-to-de-select-options.patch new file mode 100644 index 0000000000..972d2de9ea --- /dev/null +++ b/support/kconfig/patches/16-fix-space-to-de-select-options.patch @@ -0,0 +1,41 @@ +commit 6faa447282fe90d42e0513af46c13f20b4b327d4 +Author: Yann E. MORIN +Date: Wed Nov 13 22:45:02 2013 +0100 + + support/kconfig: fix 'space' to (de)select options + + In case a menu has comment without letters/numbers (eg. characters + matching the regexp '^[^[:alpha:][:digit:]]+$', for example - or *), + hitting space will cycle through those comments, rather than + selecting/deselecting the currently-highlighted option. + + This is the behaviour of hitting any letter/digit: jump to the next + option which prompt starts with that letter. The only letters that + do not behave as such are 'y' 'm' and 'n'. Prompts that start with + one of those three letters are instead matched on the first letter + that is not 'y', 'm' or 'n'. + + Fix that by treating 'space' as we treat y/m/n, ie. as an action key, + not as shortcut to jump to prompt. + + Signed-off-by: "Yann E. MORIN" + Cc: Thomas Petazzoni + Cc: Peter Korsgaard + Cc: Samuel Martin + Cc: Thomas De Schampheleire + --- + Note: I'll be running this upstream soonish. + +diff --git a/support/kconfig/lxdialog/menubox.c b/support/kconfig/lxdialog/menubox.c +index 48d382e..6fc7e78 100644 +--- a/lxdialog/menubox.c ++++ b/lxdialog/menubox.c +@@ -285,7 +285,7 @@ do_resize: + if (key < 256 && isalpha(key)) + key = tolower(key); + +- if (strchr("ynmh", key)) ++ if (strchr("ynmh ", key)) + i = max_choice; + else { + for (i = choice + 1; i < max_choice; i++) { diff --git a/support/kconfig/patches/17-kconfig-lxdialog-get-ncurses-CFLAGS-with-pkg-config.patch b/support/kconfig/patches/17-kconfig-lxdialog-get-ncurses-CFLAGS-with-pkg-config.patch new file mode 100644 index 0000000000..1eb48ef974 --- /dev/null +++ b/support/kconfig/patches/17-kconfig-lxdialog-get-ncurses-CFLAGS-with-pkg-config.patch @@ -0,0 +1,50 @@ +From be8af2d54a66911693eddc556e4f7a866670082b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= +Date: Sun, 14 Sep 2014 12:57:50 +0200 +Subject: [PATCH] kconfig/lxdialog: get ncurses CFLAGS with pkg-config +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This makes "make menuconfig" also work on systems where ncurses is not +installed in a standard location (such as on NixOS). + +This patch changes ccflags() so that it tries pkg-config first, and only +if pkg-config fails does it go back to the fallback/manual checks. This +is the same algorithm that ldflags() already uses. + +Signed-off-by: Bjørn Forsman +Signed-off-by: Michal Marek +--- +[This patch is already applied upstream (is part of linux v3.18): +https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=be8af2d54a66911693eddc556e4f7a866670082b + +I'm adding this instead of doing a full upstream kconfig sync because +there was a conflict in one of the Buildroot kconfig patches (against +linux 3.18-rc1), which I was unable to resolve. Just drop this patch next time +Buildroot kconfig is synced against upstream. +] + + scripts/kconfig/lxdialog/check-lxdialog.sh | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh +index 9d2a4c5..5075ebf 100755 +--- a/lxdialog/check-lxdialog.sh ++++ b/lxdialog/check-lxdialog.sh +@@ -21,7 +21,11 @@ ldflags() + # Where is ncurses.h? + ccflags() + { +- if [ -f /usr/include/ncursesw/curses.h ]; then ++ if pkg-config --cflags ncursesw 2>/dev/null; then ++ echo '-DCURSES_LOC="" -DNCURSES_WIDECHAR=1' ++ elif pkg-config --cflags ncurses 2>/dev/null; then ++ echo '-DCURSES_LOC=""' ++ elif [ -f /usr/include/ncursesw/curses.h ]; then + echo '-I/usr/include/ncursesw -DCURSES_LOC=""' + echo ' -DNCURSES_WIDECHAR=1' + elif [ -f /usr/include/ncurses/ncurses.h ]; then +-- +2.1.3 + diff --git a/support/kconfig/patches/series b/support/kconfig/patches/series new file mode 100644 index 0000000000..e25375ea28 --- /dev/null +++ b/support/kconfig/patches/series @@ -0,0 +1,9 @@ +01-kconfig-kernel-to-buildroot.patch +06-br-build-system-integration.patch +10-br-build-system.patch +11-use-mktemp-for-lxdialog.patch +12-fix-glade-file-path.patch +14-support-out-of-tree-config.patch +15-fix-qconf-moc-rule.patch +16-fix-space-to-de-select-options.patch +17-kconfig-lxdialog-get-ncurses-CFLAGS-with-pkg-config.patch diff --git a/support/kconfig/qconf.cc b/support/kconfig/qconf.cc new file mode 100644 index 0000000000..f630567c82 --- /dev/null +++ b/support/kconfig/qconf.cc @@ -0,0 +1,1795 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include + +#if QT_VERSION < 0x040000 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#else +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "lkc.h" +#include "qconf.h" + +#include "qconf.moc" +#include "images.c" + +#ifdef _ +# undef _ +# define _ qgettext +#endif + +static QApplication *configApp; +static ConfigSettings *configSettings; + +Q3Action *ConfigMainWindow::saveAction; + +static inline QString qgettext(const char* str) +{ + return QString::fromLocal8Bit(gettext(str)); +} + +static inline QString qgettext(const QString& str) +{ + return QString::fromLocal8Bit(gettext(str.latin1())); +} + +ConfigSettings::ConfigSettings() + : QSettings("buildroot.org", "qconf") +{ +} + +/** + * Reads a list of integer values from the application settings. + */ +Q3ValueList ConfigSettings::readSizes(const QString& key, bool *ok) +{ + Q3ValueList result; + QStringList entryList = readListEntry(key, ok); + QStringList::Iterator it; + + for (it = entryList.begin(); it != entryList.end(); ++it) + result.push_back((*it).toInt()); + + return result; +} + +/** + * Writes a list of integer values to the application settings. + */ +bool ConfigSettings::writeSizes(const QString& key, const Q3ValueList& value) +{ + QStringList stringList; + Q3ValueList::ConstIterator it; + + for (it = value.begin(); it != value.end(); ++it) + stringList.push_back(QString::number(*it)); + return writeEntry(key, stringList); +} + + +/* + * set the new data + * TODO check the value + */ +void ConfigItem::okRename(int col) +{ + Parent::okRename(col); + sym_set_string_value(menu->sym, text(dataColIdx).latin1()); + listView()->updateList(this); +} + +/* + * update the displayed of a menu entry + */ +void ConfigItem::updateMenu(void) +{ + ConfigList* list; + struct symbol* sym; + struct property *prop; + QString prompt; + int type; + tristate expr; + + list = listView(); + if (goParent) { + setPixmap(promptColIdx, list->menuBackPix); + prompt = ".."; + goto set_prompt; + } + + sym = menu->sym; + prop = menu->prompt; + prompt = _(menu_get_prompt(menu)); + + if (prop) switch (prop->type) { + case P_MENU: + if (list->mode == singleMode || list->mode == symbolMode) { + /* a menuconfig entry is displayed differently + * depending whether it's at the view root or a child. + */ + if (sym && list->rootEntry == menu) + break; + setPixmap(promptColIdx, list->menuPix); + } else { + if (sym) + break; + setPixmap(promptColIdx, 0); + } + goto set_prompt; + case P_COMMENT: + setPixmap(promptColIdx, 0); + goto set_prompt; + default: + ; + } + if (!sym) + goto set_prompt; + + setText(nameColIdx, QString::fromLocal8Bit(sym->name)); + + type = sym_get_type(sym); + switch (type) { + case S_BOOLEAN: + case S_TRISTATE: + char ch; + + if (!sym_is_changable(sym) && list->optMode == normalOpt) { + setPixmap(promptColIdx, 0); + setText(noColIdx, QString::null); + setText(modColIdx, QString::null); + setText(yesColIdx, QString::null); + break; + } + expr = sym_get_tristate_value(sym); + switch (expr) { + case yes: + if (sym_is_choice_value(sym) && type == S_BOOLEAN) + setPixmap(promptColIdx, list->choiceYesPix); + else + setPixmap(promptColIdx, list->symbolYesPix); + setText(yesColIdx, "Y"); + ch = 'Y'; + break; + case mod: + setPixmap(promptColIdx, list->symbolModPix); + setText(modColIdx, "M"); + ch = 'M'; + break; + default: + if (sym_is_choice_value(sym) && type == S_BOOLEAN) + setPixmap(promptColIdx, list->choiceNoPix); + else + setPixmap(promptColIdx, list->symbolNoPix); + setText(noColIdx, "N"); + ch = 'N'; + break; + } + if (expr != no) + setText(noColIdx, sym_tristate_within_range(sym, no) ? "_" : 0); + if (expr != mod) + setText(modColIdx, sym_tristate_within_range(sym, mod) ? "_" : 0); + if (expr != yes) + setText(yesColIdx, sym_tristate_within_range(sym, yes) ? "_" : 0); + + setText(dataColIdx, QChar(ch)); + break; + case S_INT: + case S_HEX: + case S_STRING: + const char* data; + + data = sym_get_string_value(sym); + + int i = list->mapIdx(dataColIdx); + if (i >= 0) + setRenameEnabled(i, TRUE); + setText(dataColIdx, data); + if (type == S_STRING) + prompt = QString("%1: %2").arg(prompt).arg(data); + else + prompt = QString("(%2) %1").arg(prompt).arg(data); + break; + } + if (!sym_has_value(sym) && visible) + prompt += _(" (NEW)"); +set_prompt: + setText(promptColIdx, prompt); +} + +void ConfigItem::testUpdateMenu(bool v) +{ + ConfigItem* i; + + visible = v; + if (!menu) + return; + + sym_calc_value(menu->sym); + if (menu->flags & MENU_CHANGED) { + /* the menu entry changed, so update all list items */ + menu->flags &= ~MENU_CHANGED; + for (i = (ConfigItem*)menu->data; i; i = i->nextItem) + i->updateMenu(); + } else if (listView()->updateAll) + updateMenu(); +} + +void ConfigItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align) +{ + ConfigList* list = listView(); + + if (visible) { + if (isSelected() && !list->hasFocus() && list->mode == menuMode) + Parent::paintCell(p, list->inactivedColorGroup, column, width, align); + else + Parent::paintCell(p, cg, column, width, align); + } else + Parent::paintCell(p, list->disabledColorGroup, column, width, align); +} + +/* + * construct a menu entry + */ +void ConfigItem::init(void) +{ + if (menu) { + ConfigList* list = listView(); + nextItem = (ConfigItem*)menu->data; + menu->data = this; + + if (list->mode != fullMode) + setOpen(TRUE); + sym_calc_value(menu->sym); + } + updateMenu(); +} + +/* + * destruct a menu entry + */ +ConfigItem::~ConfigItem(void) +{ + if (menu) { + ConfigItem** ip = (ConfigItem**)&menu->data; + for (; *ip; ip = &(*ip)->nextItem) { + if (*ip == this) { + *ip = nextItem; + break; + } + } + } +} + +ConfigLineEdit::ConfigLineEdit(ConfigView* parent) + : Parent(parent) +{ + connect(this, SIGNAL(lostFocus()), SLOT(hide())); +} + +void ConfigLineEdit::show(ConfigItem* i) +{ + item = i; + if (sym_get_string_value(item->menu->sym)) + setText(QString::fromLocal8Bit(sym_get_string_value(item->menu->sym))); + else + setText(QString::null); + Parent::show(); + setFocus(); +} + +void ConfigLineEdit::keyPressEvent(QKeyEvent* e) +{ + switch (e->key()) { + case Qt::Key_Escape: + break; + case Qt::Key_Return: + case Qt::Key_Enter: + sym_set_string_value(item->menu->sym, text().latin1()); + parent()->updateList(item); + break; + default: + Parent::keyPressEvent(e); + return; + } + e->accept(); + parent()->list->setFocus(); + hide(); +} + +ConfigList::ConfigList(ConfigView* p, const char *name) + : Parent(p, name), + updateAll(false), + symbolYesPix(xpm_symbol_yes), symbolModPix(xpm_symbol_mod), symbolNoPix(xpm_symbol_no), + choiceYesPix(xpm_choice_yes), choiceNoPix(xpm_choice_no), + menuPix(xpm_menu), menuInvPix(xpm_menu_inv), menuBackPix(xpm_menuback), voidPix(xpm_void), + showName(false), showRange(false), showData(false), optMode(normalOpt), + rootEntry(0), headerPopup(0) +{ + int i; + + setSorting(-1); + setRootIsDecorated(TRUE); + disabledColorGroup = palette().active(); + disabledColorGroup.setColor(QColorGroup::Text, palette().disabled().text()); + inactivedColorGroup = palette().active(); + inactivedColorGroup.setColor(QColorGroup::Highlight, palette().disabled().highlight()); + + connect(this, SIGNAL(selectionChanged(void)), + SLOT(updateSelection(void))); + + if (name) { + configSettings->beginGroup(name); + showName = configSettings->readBoolEntry("/showName", false); + showRange = configSettings->readBoolEntry("/showRange", false); + showData = configSettings->readBoolEntry("/showData", false); + optMode = (enum optionMode)configSettings->readNumEntry("/optionMode", false); + configSettings->endGroup(); + connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); + } + + for (i = 0; i < colNr; i++) + colMap[i] = colRevMap[i] = -1; + addColumn(promptColIdx, _("Option")); + + reinit(); +} + +bool ConfigList::menuSkip(struct menu *menu) +{ + if (optMode == normalOpt && menu_is_visible(menu)) + return false; + if (optMode == promptOpt && menu_has_prompt(menu)) + return false; + if (optMode == allOpt) + return false; + return true; +} + +void ConfigList::reinit(void) +{ + removeColumn(dataColIdx); + removeColumn(yesColIdx); + removeColumn(modColIdx); + removeColumn(noColIdx); + removeColumn(nameColIdx); + + if (showName) + addColumn(nameColIdx, _("Name")); + if (showRange) { + addColumn(noColIdx, "N"); + addColumn(modColIdx, "M"); + addColumn(yesColIdx, "Y"); + } + if (showData) + addColumn(dataColIdx, _("Value")); + + updateListAll(); +} + +void ConfigList::saveSettings(void) +{ + if (name()) { + configSettings->beginGroup(name()); + configSettings->writeEntry("/showName", showName); + configSettings->writeEntry("/showRange", showRange); + configSettings->writeEntry("/showData", showData); + configSettings->writeEntry("/optionMode", (int)optMode); + configSettings->endGroup(); + } +} + +ConfigItem* ConfigList::findConfigItem(struct menu *menu) +{ + ConfigItem* item = (ConfigItem*)menu->data; + + for (; item; item = item->nextItem) { + if (this == item->listView()) + break; + } + + return item; +} + +void ConfigList::updateSelection(void) +{ + struct menu *menu; + enum prop_type type; + + ConfigItem* item = (ConfigItem*)selectedItem(); + if (!item) + return; + + menu = item->menu; + emit menuChanged(menu); + if (!menu) + return; + type = menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (mode == menuMode && type == P_MENU) + emit menuSelected(menu); +} + +void ConfigList::updateList(ConfigItem* item) +{ + ConfigItem* last = 0; + + if (!rootEntry) { + if (mode != listMode) + goto update; + Q3ListViewItemIterator it(this); + ConfigItem* item; + + for (; it.current(); ++it) { + item = (ConfigItem*)it.current(); + if (!item->menu) + continue; + item->testUpdateMenu(menu_is_visible(item->menu)); + } + return; + } + + if (rootEntry != &rootmenu && (mode == singleMode || + (mode == symbolMode && rootEntry->parent != &rootmenu))) { + item = firstChild(); + if (!item) + item = new ConfigItem(this, 0, true); + last = item; + } + if ((mode == singleMode || (mode == symbolMode && !(rootEntry->flags & MENU_ROOT))) && + rootEntry->sym && rootEntry->prompt) { + item = last ? last->nextSibling() : firstChild(); + if (!item) + item = new ConfigItem(this, last, rootEntry, true); + else + item->testUpdateMenu(true); + + updateMenuList(item, rootEntry); + triggerUpdate(); + return; + } +update: + updateMenuList(this, rootEntry); + triggerUpdate(); +} + +void ConfigList::setValue(ConfigItem* item, tristate val) +{ + struct symbol* sym; + int type; + tristate oldval; + + sym = item->menu ? item->menu->sym : 0; + if (!sym) + return; + + type = sym_get_type(sym); + switch (type) { + case S_BOOLEAN: + case S_TRISTATE: + oldval = sym_get_tristate_value(sym); + + if (!sym_set_tristate_value(sym, val)) + return; + if (oldval == no && item->menu->list) + item->setOpen(TRUE); + parent()->updateList(item); + break; + } +} + +void ConfigList::changeValue(ConfigItem* item) +{ + struct symbol* sym; + struct menu* menu; + int type, oldexpr, newexpr; + + menu = item->menu; + if (!menu) + return; + sym = menu->sym; + if (!sym) { + if (item->menu->list) + item->setOpen(!item->isOpen()); + return; + } + + type = sym_get_type(sym); + switch (type) { + case S_BOOLEAN: + case S_TRISTATE: + oldexpr = sym_get_tristate_value(sym); + newexpr = sym_toggle_tristate_value(sym); + if (item->menu->list) { + if (oldexpr == newexpr) + item->setOpen(!item->isOpen()); + else if (oldexpr == no) + item->setOpen(TRUE); + } + if (oldexpr != newexpr) + parent()->updateList(item); + break; + case S_INT: + case S_HEX: + case S_STRING: + if (colMap[dataColIdx] >= 0) + item->startRename(colMap[dataColIdx]); + else + parent()->lineEdit->show(item); + break; + } +} + +void ConfigList::setRootMenu(struct menu *menu) +{ + enum prop_type type; + + if (rootEntry == menu) + return; + type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (type != P_MENU) + return; + updateMenuList(this, 0); + rootEntry = menu; + updateListAll(); + setSelected(currentItem(), hasFocus()); + ensureItemVisible(currentItem()); +} + +void ConfigList::setParentMenu(void) +{ + ConfigItem* item; + struct menu *oldroot; + + oldroot = rootEntry; + if (rootEntry == &rootmenu) + return; + setRootMenu(menu_get_parent_menu(rootEntry->parent)); + + Q3ListViewItemIterator it(this); + for (; (item = (ConfigItem*)it.current()); it++) { + if (item->menu == oldroot) { + setCurrentItem(item); + ensureItemVisible(item); + break; + } + } +} + +/* + * update all the children of a menu entry + * removes/adds the entries from the parent widget as necessary + * + * parent: either the menu list widget or a menu entry widget + * menu: entry to be updated + */ +template +void ConfigList::updateMenuList(P* parent, struct menu* menu) +{ + struct menu* child; + ConfigItem* item; + ConfigItem* last; + bool visible; + enum prop_type type; + + if (!menu) { + while ((item = parent->firstChild())) + delete item; + return; + } + + last = parent->firstChild(); + if (last && !last->goParent) + last = 0; + for (child = menu->list; child; child = child->next) { + item = last ? last->nextSibling() : parent->firstChild(); + type = child->prompt ? child->prompt->type : P_UNKNOWN; + + switch (mode) { + case menuMode: + if (!(child->flags & MENU_ROOT)) + goto hide; + break; + case symbolMode: + if (child->flags & MENU_ROOT) + goto hide; + break; + default: + break; + } + + visible = menu_is_visible(child); + if (!menuSkip(child)) { + if (!child->sym && !child->list && !child->prompt) + continue; + if (!item || item->menu != child) + item = new ConfigItem(parent, last, child, visible); + else + item->testUpdateMenu(visible); + + if (mode == fullMode || mode == menuMode || type != P_MENU) + updateMenuList(item, child); + else + updateMenuList(item, 0); + last = item; + continue; + } + hide: + if (item && item->menu == child) { + last = parent->firstChild(); + if (last == item) + last = 0; + else while (last->nextSibling() != item) + last = last->nextSibling(); + delete item; + } + } +} + +void ConfigList::keyPressEvent(QKeyEvent* ev) +{ + Q3ListViewItem* i = currentItem(); + ConfigItem* item; + struct menu *menu; + enum prop_type type; + + if (ev->key() == Qt::Key_Escape && mode != fullMode && mode != listMode) { + emit parentSelected(); + ev->accept(); + return; + } + + if (!i) { + Parent::keyPressEvent(ev); + return; + } + item = (ConfigItem*)i; + + switch (ev->key()) { + case Qt::Key_Return: + case Qt::Key_Enter: + if (item->goParent) { + emit parentSelected(); + break; + } + menu = item->menu; + if (!menu) + break; + type = menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (type == P_MENU && rootEntry != menu && + mode != fullMode && mode != menuMode) { + emit menuSelected(menu); + break; + } + case Qt::Key_Space: + changeValue(item); + break; + case Qt::Key_N: + setValue(item, no); + break; + case Qt::Key_M: + setValue(item, mod); + break; + case Qt::Key_Y: + setValue(item, yes); + break; + default: + Parent::keyPressEvent(ev); + return; + } + ev->accept(); +} + +void ConfigList::contentsMousePressEvent(QMouseEvent* e) +{ + //QPoint p(contentsToViewport(e->pos())); + //printf("contentsMousePressEvent: %d,%d\n", p.x(), p.y()); + Parent::contentsMousePressEvent(e); +} + +void ConfigList::contentsMouseReleaseEvent(QMouseEvent* e) +{ + QPoint p(contentsToViewport(e->pos())); + ConfigItem* item = (ConfigItem*)itemAt(p); + struct menu *menu; + enum prop_type ptype; + const QPixmap* pm; + int idx, x; + + if (!item) + goto skip; + + menu = item->menu; + x = header()->offset() + p.x(); + idx = colRevMap[header()->sectionAt(x)]; + switch (idx) { + case promptColIdx: + pm = item->pixmap(promptColIdx); + if (pm) { + int off = header()->sectionPos(0) + itemMargin() + + treeStepSize() * (item->depth() + (rootIsDecorated() ? 1 : 0)); + if (x >= off && x < off + pm->width()) { + if (item->goParent) { + emit parentSelected(); + break; + } else if (!menu) + break; + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (ptype == P_MENU && rootEntry != menu && + mode != fullMode && mode != menuMode) + emit menuSelected(menu); + else + changeValue(item); + } + } + break; + case noColIdx: + setValue(item, no); + break; + case modColIdx: + setValue(item, mod); + break; + case yesColIdx: + setValue(item, yes); + break; + case dataColIdx: + changeValue(item); + break; + } + +skip: + //printf("contentsMouseReleaseEvent: %d,%d\n", p.x(), p.y()); + Parent::contentsMouseReleaseEvent(e); +} + +void ConfigList::contentsMouseMoveEvent(QMouseEvent* e) +{ + //QPoint p(contentsToViewport(e->pos())); + //printf("contentsMouseMoveEvent: %d,%d\n", p.x(), p.y()); + Parent::contentsMouseMoveEvent(e); +} + +void ConfigList::contentsMouseDoubleClickEvent(QMouseEvent* e) +{ + QPoint p(contentsToViewport(e->pos())); + ConfigItem* item = (ConfigItem*)itemAt(p); + struct menu *menu; + enum prop_type ptype; + + if (!item) + goto skip; + if (item->goParent) { + emit parentSelected(); + goto skip; + } + menu = item->menu; + if (!menu) + goto skip; + ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; + if (ptype == P_MENU && (mode == singleMode || mode == symbolMode)) + emit menuSelected(menu); + else if (menu->sym) + changeValue(item); + +skip: + //printf("contentsMouseDoubleClickEvent: %d,%d\n", p.x(), p.y()); + Parent::contentsMouseDoubleClickEvent(e); +} + +void ConfigList::focusInEvent(QFocusEvent *e) +{ + struct menu *menu = NULL; + + Parent::focusInEvent(e); + + ConfigItem* item = (ConfigItem *)currentItem(); + if (item) { + setSelected(item, TRUE); + menu = item->menu; + } + emit gotFocus(menu); +} + +void ConfigList::contextMenuEvent(QContextMenuEvent *e) +{ + if (e->y() <= header()->geometry().bottom()) { + if (!headerPopup) { + Q3Action *action; + + headerPopup = new Q3PopupMenu(this); + action = new Q3Action(NULL, _("Show Name"), 0, this); + action->setToggleAction(TRUE); + connect(action, SIGNAL(toggled(bool)), + parent(), SLOT(setShowName(bool))); + connect(parent(), SIGNAL(showNameChanged(bool)), + action, SLOT(setOn(bool))); + action->setOn(showName); + action->addTo(headerPopup); + action = new Q3Action(NULL, _("Show Range"), 0, this); + action->setToggleAction(TRUE); + connect(action, SIGNAL(toggled(bool)), + parent(), SLOT(setShowRange(bool))); + connect(parent(), SIGNAL(showRangeChanged(bool)), + action, SLOT(setOn(bool))); + action->setOn(showRange); + action->addTo(headerPopup); + action = new Q3Action(NULL, _("Show Data"), 0, this); + action->setToggleAction(TRUE); + connect(action, SIGNAL(toggled(bool)), + parent(), SLOT(setShowData(bool))); + connect(parent(), SIGNAL(showDataChanged(bool)), + action, SLOT(setOn(bool))); + action->setOn(showData); + action->addTo(headerPopup); + } + headerPopup->exec(e->globalPos()); + e->accept(); + } else + e->ignore(); +} + +ConfigView*ConfigView::viewList; +QAction *ConfigView::showNormalAction; +QAction *ConfigView::showAllAction; +QAction *ConfigView::showPromptAction; + +ConfigView::ConfigView(QWidget* parent, const char *name) + : Parent(parent, name) +{ + list = new ConfigList(this, name); + lineEdit = new ConfigLineEdit(this); + lineEdit->hide(); + + this->nextView = viewList; + viewList = this; +} + +ConfigView::~ConfigView(void) +{ + ConfigView** vp; + + for (vp = &viewList; *vp; vp = &(*vp)->nextView) { + if (*vp == this) { + *vp = nextView; + break; + } + } +} + +void ConfigView::setOptionMode(QAction *act) +{ + if (act == showNormalAction) + list->optMode = normalOpt; + else if (act == showAllAction) + list->optMode = allOpt; + else + list->optMode = promptOpt; + + list->updateListAll(); +} + +void ConfigView::setShowName(bool b) +{ + if (list->showName != b) { + list->showName = b; + list->reinit(); + emit showNameChanged(b); + } +} + +void ConfigView::setShowRange(bool b) +{ + if (list->showRange != b) { + list->showRange = b; + list->reinit(); + emit showRangeChanged(b); + } +} + +void ConfigView::setShowData(bool b) +{ + if (list->showData != b) { + list->showData = b; + list->reinit(); + emit showDataChanged(b); + } +} + +void ConfigList::setAllOpen(bool open) +{ + Q3ListViewItemIterator it(this); + + for (; it.current(); it++) + it.current()->setOpen(open); +} + +void ConfigView::updateList(ConfigItem* item) +{ + ConfigView* v; + + for (v = viewList; v; v = v->nextView) + v->list->updateList(item); +} + +void ConfigView::updateListAll(void) +{ + ConfigView* v; + + for (v = viewList; v; v = v->nextView) + v->list->updateListAll(); +} + +ConfigInfoView::ConfigInfoView(QWidget* parent, const char *name) + : Parent(parent, name), sym(0), _menu(0) +{ + if (name) { + configSettings->beginGroup(name); + _showDebug = configSettings->readBoolEntry("/showDebug", false); + configSettings->endGroup(); + connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); + } +} + +void ConfigInfoView::saveSettings(void) +{ + if (name()) { + configSettings->beginGroup(name()); + configSettings->writeEntry("/showDebug", showDebug()); + configSettings->endGroup(); + } +} + +void ConfigInfoView::setShowDebug(bool b) +{ + if (_showDebug != b) { + _showDebug = b; + if (_menu) + menuInfo(); + else if (sym) + symbolInfo(); + emit showDebugChanged(b); + } +} + +void ConfigInfoView::setInfo(struct menu *m) +{ + if (_menu == m) + return; + _menu = m; + sym = NULL; + if (!_menu) + clear(); + else + menuInfo(); +} + +void ConfigInfoView::symbolInfo(void) +{ + QString str; + + str += "Symbol: "; + str += print_filter(sym->name); + str += "

value: "; + str += print_filter(sym_get_string_value(sym)); + str += "
visibility: "; + str += sym->visible == yes ? "y" : sym->visible == mod ? "m" : "n"; + str += "
"; + str += debug_info(sym); + + setText(str); +} + +void ConfigInfoView::menuInfo(void) +{ + struct symbol* sym; + QString head, debug, help; + + sym = _menu->sym; + if (sym) { + if (_menu->prompt) { + head += ""; + head += print_filter(_(_menu->prompt->text)); + head += ""; + if (sym->name) { + head += " ("; + if (showDebug()) + head += QString().sprintf("", sym); + head += print_filter(sym->name); + if (showDebug()) + head += ""; + head += ")"; + } + } else if (sym->name) { + head += ""; + if (showDebug()) + head += QString().sprintf("", sym); + head += print_filter(sym->name); + if (showDebug()) + head += ""; + head += ""; + } + head += "

"; + + if (showDebug()) + debug = debug_info(sym); + + struct gstr help_gstr = str_new(); + menu_get_ext_help(_menu, &help_gstr); + help = print_filter(str_get(&help_gstr)); + str_free(&help_gstr); + } else if (_menu->prompt) { + head += ""; + head += print_filter(_(_menu->prompt->text)); + head += "

"; + if (showDebug()) { + if (_menu->prompt->visible.expr) { + debug += "  dep: "; + expr_print(_menu->prompt->visible.expr, expr_print_help, &debug, E_NONE); + debug += "

"; + } + } + } + if (showDebug()) + debug += QString().sprintf("defined at %s:%d

", _menu->file->name, _menu->lineno); + + setText(head + debug + help); +} + +QString ConfigInfoView::debug_info(struct symbol *sym) +{ + QString debug; + + debug += "type: "; + debug += print_filter(sym_type_name(sym->type)); + if (sym_is_choice(sym)) + debug += " (choice)"; + debug += "
"; + if (sym->rev_dep.expr) { + debug += "reverse dep: "; + expr_print(sym->rev_dep.expr, expr_print_help, &debug, E_NONE); + debug += "
"; + } + for (struct property *prop = sym->prop; prop; prop = prop->next) { + switch (prop->type) { + case P_PROMPT: + case P_MENU: + debug += QString().sprintf("prompt: ", prop->menu); + debug += print_filter(_(prop->text)); + debug += "
"; + break; + case P_DEFAULT: + case P_SELECT: + case P_RANGE: + case P_ENV: + debug += prop_get_type_name(prop->type); + debug += ": "; + expr_print(prop->expr, expr_print_help, &debug, E_NONE); + debug += "
"; + break; + case P_CHOICE: + if (sym_is_choice(sym)) { + debug += "choice: "; + expr_print(prop->expr, expr_print_help, &debug, E_NONE); + debug += "
"; + } + break; + default: + debug += "unknown property: "; + debug += prop_get_type_name(prop->type); + debug += "
"; + } + if (prop->visible.expr) { + debug += "    dep: "; + expr_print(prop->visible.expr, expr_print_help, &debug, E_NONE); + debug += "
"; + } + } + debug += "
"; + + return debug; +} + +QString ConfigInfoView::print_filter(const QString &str) +{ + QRegExp re("[<>&\"\\n]"); + QString res = str; + for (int i = 0; (i = res.find(re, i)) >= 0;) { + switch (res[i].latin1()) { + case '<': + res.replace(i, 1, "<"); + i += 4; + break; + case '>': + res.replace(i, 1, ">"); + i += 4; + break; + case '&': + res.replace(i, 1, "&"); + i += 5; + break; + case '"': + res.replace(i, 1, """); + i += 6; + break; + case '\n': + res.replace(i, 1, "
"); + i += 4; + break; + } + } + return res; +} + +void ConfigInfoView::expr_print_help(void *data, struct symbol *sym, const char *str) +{ + QString* text = reinterpret_cast(data); + QString str2 = print_filter(str); + + if (sym && sym->name && !(sym->flags & SYMBOL_CONST)) { + *text += QString().sprintf("", sym); + *text += str2; + *text += ""; + } else + *text += str2; +} + +Q3PopupMenu* ConfigInfoView::createPopupMenu(const QPoint& pos) +{ + Q3PopupMenu* popup = Parent::createPopupMenu(pos); + Q3Action* action = new Q3Action(NULL, _("Show Debug Info"), 0, popup); + action->setToggleAction(TRUE); + connect(action, SIGNAL(toggled(bool)), SLOT(setShowDebug(bool))); + connect(this, SIGNAL(showDebugChanged(bool)), action, SLOT(setOn(bool))); + action->setOn(showDebug()); + popup->insertSeparator(); + action->addTo(popup); + return popup; +} + +void ConfigInfoView::contentsContextMenuEvent(QContextMenuEvent *e) +{ + Parent::contentsContextMenuEvent(e); +} + +ConfigSearchWindow::ConfigSearchWindow(ConfigMainWindow* parent, const char *name) + : Parent(parent, name), result(NULL) +{ + setCaption("Search Config"); + + QVBoxLayout* layout1 = new QVBoxLayout(this, 11, 6); + QHBoxLayout* layout2 = new QHBoxLayout(0, 0, 6); + layout2->addWidget(new QLabel(_("Find:"), this)); + editField = new QLineEdit(this); + connect(editField, SIGNAL(returnPressed()), SLOT(search())); + layout2->addWidget(editField); + searchButton = new QPushButton(_("Search"), this); + searchButton->setAutoDefault(FALSE); + connect(searchButton, SIGNAL(clicked()), SLOT(search())); + layout2->addWidget(searchButton); + layout1->addLayout(layout2); + + split = new QSplitter(this); + split->setOrientation(Qt::Vertical); + list = new ConfigView(split, name); + list->list->mode = listMode; + info = new ConfigInfoView(split, name); + connect(list->list, SIGNAL(menuChanged(struct menu *)), + info, SLOT(setInfo(struct menu *))); + connect(list->list, SIGNAL(menuChanged(struct menu *)), + parent, SLOT(setMenuLink(struct menu *))); + + layout1->addWidget(split); + + if (name) { + int x, y, width, height; + bool ok; + + configSettings->beginGroup(name); + width = configSettings->readNumEntry("/window width", parent->width() / 2); + height = configSettings->readNumEntry("/window height", parent->height() / 2); + resize(width, height); + x = configSettings->readNumEntry("/window x", 0, &ok); + if (ok) + y = configSettings->readNumEntry("/window y", 0, &ok); + if (ok) + move(x, y); + Q3ValueList sizes = configSettings->readSizes("/split", &ok); + if (ok) + split->setSizes(sizes); + configSettings->endGroup(); + connect(configApp, SIGNAL(aboutToQuit()), SLOT(saveSettings())); + } +} + +void ConfigSearchWindow::saveSettings(void) +{ + if (name()) { + configSettings->beginGroup(name()); + configSettings->writeEntry("/window x", pos().x()); + configSettings->writeEntry("/window y", pos().y()); + configSettings->writeEntry("/window width", size().width()); + configSettings->writeEntry("/window height", size().height()); + configSettings->writeSizes("/split", split->sizes()); + configSettings->endGroup(); + } +} + +void ConfigSearchWindow::search(void) +{ + struct symbol **p; + struct property *prop; + ConfigItem *lastItem = NULL; + + free(result); + list->list->clear(); + info->clear(); + + result = sym_re_search(editField->text().latin1()); + if (!result) + return; + for (p = result; *p; p++) { + for_all_prompts((*p), prop) + lastItem = new ConfigItem(list->list, lastItem, prop->menu, + menu_is_visible(prop->menu)); + } +} + +/* + * Construct the complete config widget + */ +ConfigMainWindow::ConfigMainWindow(void) + : searchWindow(0) +{ + QMenuBar* menu; + bool ok; + int x, y, width, height; + char title[256]; + + QDesktopWidget *d = configApp->desktop(); + snprintf(title, sizeof(title), "%s%s", + rootmenu.prompt->text, +#if QT_VERSION < 0x040000 + " (Qt3)" +#else + "" +#endif + ); + setCaption(title); + + width = configSettings->readNumEntry("/window width", d->width() - 64); + height = configSettings->readNumEntry("/window height", d->height() - 64); + resize(width, height); + x = configSettings->readNumEntry("/window x", 0, &ok); + if (ok) + y = configSettings->readNumEntry("/window y", 0, &ok); + if (ok) + move(x, y); + + split1 = new QSplitter(this); + split1->setOrientation(Qt::Horizontal); + setCentralWidget(split1); + + menuView = new ConfigView(split1, "menu"); + menuList = menuView->list; + + split2 = new QSplitter(split1); + split2->setOrientation(Qt::Vertical); + + // create config tree + configView = new ConfigView(split2, "config"); + configList = configView->list; + + helpText = new ConfigInfoView(split2, "help"); + helpText->setTextFormat(Qt::RichText); + + setTabOrder(configList, helpText); + configList->setFocus(); + + menu = menuBar(); + toolBar = new Q3ToolBar("Tools", this); + + backAction = new Q3Action("Back", QPixmap(xpm_back), _("Back"), 0, this); + connect(backAction, SIGNAL(activated()), SLOT(goBack())); + backAction->setEnabled(FALSE); + Q3Action *quitAction = new Q3Action("Quit", _("&Quit"), Qt::CTRL + Qt::Key_Q, this); + connect(quitAction, SIGNAL(activated()), SLOT(close())); + Q3Action *loadAction = new Q3Action("Load", QPixmap(xpm_load), _("&Load"), Qt::CTRL + Qt::Key_L, this); + connect(loadAction, SIGNAL(activated()), SLOT(loadConfig())); + saveAction = new Q3Action("Save", QPixmap(xpm_save), _("&Save"), Qt::CTRL + Qt::Key_S, this); + connect(saveAction, SIGNAL(activated()), SLOT(saveConfig())); + conf_set_changed_callback(conf_changed); + // Set saveAction's initial state + conf_changed(); + Q3Action *saveAsAction = new Q3Action("Save As...", _("Save &As..."), 0, this); + connect(saveAsAction, SIGNAL(activated()), SLOT(saveConfigAs())); + Q3Action *searchAction = new Q3Action("Find", _("&Find"), Qt::CTRL + Qt::Key_F, this); + connect(searchAction, SIGNAL(activated()), SLOT(searchConfig())); + Q3Action *singleViewAction = new Q3Action("Single View", QPixmap(xpm_single_view), _("Single View"), 0, this); + connect(singleViewAction, SIGNAL(activated()), SLOT(showSingleView())); + Q3Action *splitViewAction = new Q3Action("Split View", QPixmap(xpm_split_view), _("Split View"), 0, this); + connect(splitViewAction, SIGNAL(activated()), SLOT(showSplitView())); + Q3Action *fullViewAction = new Q3Action("Full View", QPixmap(xpm_tree_view), _("Full View"), 0, this); + connect(fullViewAction, SIGNAL(activated()), SLOT(showFullView())); + + Q3Action *showNameAction = new Q3Action(NULL, _("Show Name"), 0, this); + showNameAction->setToggleAction(TRUE); + connect(showNameAction, SIGNAL(toggled(bool)), configView, SLOT(setShowName(bool))); + connect(configView, SIGNAL(showNameChanged(bool)), showNameAction, SLOT(setOn(bool))); + showNameAction->setOn(configView->showName()); + Q3Action *showRangeAction = new Q3Action(NULL, _("Show Range"), 0, this); + showRangeAction->setToggleAction(TRUE); + connect(showRangeAction, SIGNAL(toggled(bool)), configView, SLOT(setShowRange(bool))); + connect(configView, SIGNAL(showRangeChanged(bool)), showRangeAction, SLOT(setOn(bool))); + showRangeAction->setOn(configList->showRange); + Q3Action *showDataAction = new Q3Action(NULL, _("Show Data"), 0, this); + showDataAction->setToggleAction(TRUE); + connect(showDataAction, SIGNAL(toggled(bool)), configView, SLOT(setShowData(bool))); + connect(configView, SIGNAL(showDataChanged(bool)), showDataAction, SLOT(setOn(bool))); + showDataAction->setOn(configList->showData); + + QActionGroup *optGroup = new QActionGroup(this); + optGroup->setExclusive(TRUE); + connect(optGroup, SIGNAL(selected(QAction *)), configView, + SLOT(setOptionMode(QAction *))); + connect(optGroup, SIGNAL(selected(QAction *)), menuView, + SLOT(setOptionMode(QAction *))); + +#if QT_VERSION >= 0x040000 + configView->showNormalAction = new QAction(_("Show Normal Options"), optGroup); + configView->showAllAction = new QAction(_("Show All Options"), optGroup); + configView->showPromptAction = new QAction(_("Show Prompt Options"), optGroup); +#else + configView->showNormalAction = new QAction(_("Show Normal Options"), 0, optGroup); + configView->showAllAction = new QAction(_("Show All Options"), 0, optGroup); + configView->showPromptAction = new QAction(_("Show Prompt Options"), 0, optGroup); +#endif + configView->showNormalAction->setToggleAction(TRUE); + configView->showNormalAction->setOn(configList->optMode == normalOpt); + configView->showAllAction->setToggleAction(TRUE); + configView->showAllAction->setOn(configList->optMode == allOpt); + configView->showPromptAction->setToggleAction(TRUE); + configView->showPromptAction->setOn(configList->optMode == promptOpt); + + Q3Action *showDebugAction = new Q3Action(NULL, _("Show Debug Info"), 0, this); + showDebugAction->setToggleAction(TRUE); + connect(showDebugAction, SIGNAL(toggled(bool)), helpText, SLOT(setShowDebug(bool))); + connect(helpText, SIGNAL(showDebugChanged(bool)), showDebugAction, SLOT(setOn(bool))); + showDebugAction->setOn(helpText->showDebug()); + + Q3Action *showIntroAction = new Q3Action(NULL, _("Introduction"), 0, this); + connect(showIntroAction, SIGNAL(activated()), SLOT(showIntro())); + Q3Action *showAboutAction = new Q3Action(NULL, _("About"), 0, this); + connect(showAboutAction, SIGNAL(activated()), SLOT(showAbout())); + + // init tool bar + backAction->addTo(toolBar); + toolBar->addSeparator(); + loadAction->addTo(toolBar); + saveAction->addTo(toolBar); + toolBar->addSeparator(); + singleViewAction->addTo(toolBar); + splitViewAction->addTo(toolBar); + fullViewAction->addTo(toolBar); + + // create config menu + Q3PopupMenu* config = new Q3PopupMenu(this); + menu->insertItem(_("&File"), config); + loadAction->addTo(config); + saveAction->addTo(config); + saveAsAction->addTo(config); + config->insertSeparator(); + quitAction->addTo(config); + + // create edit menu + Q3PopupMenu* editMenu = new Q3PopupMenu(this); + menu->insertItem(_("&Edit"), editMenu); + searchAction->addTo(editMenu); + + // create options menu + Q3PopupMenu* optionMenu = new Q3PopupMenu(this); + menu->insertItem(_("&Option"), optionMenu); + showNameAction->addTo(optionMenu); + showRangeAction->addTo(optionMenu); + showDataAction->addTo(optionMenu); + optionMenu->insertSeparator(); + optGroup->addTo(optionMenu); + optionMenu->insertSeparator(); + + // create help menu + Q3PopupMenu* helpMenu = new Q3PopupMenu(this); + menu->insertSeparator(); + menu->insertItem(_("&Help"), helpMenu); + showIntroAction->addTo(helpMenu); + showAboutAction->addTo(helpMenu); + + connect(configList, SIGNAL(menuChanged(struct menu *)), + helpText, SLOT(setInfo(struct menu *))); + connect(configList, SIGNAL(menuSelected(struct menu *)), + SLOT(changeMenu(struct menu *))); + connect(configList, SIGNAL(parentSelected()), + SLOT(goBack())); + connect(menuList, SIGNAL(menuChanged(struct menu *)), + helpText, SLOT(setInfo(struct menu *))); + connect(menuList, SIGNAL(menuSelected(struct menu *)), + SLOT(changeMenu(struct menu *))); + + connect(configList, SIGNAL(gotFocus(struct menu *)), + helpText, SLOT(setInfo(struct menu *))); + connect(menuList, SIGNAL(gotFocus(struct menu *)), + helpText, SLOT(setInfo(struct menu *))); + connect(menuList, SIGNAL(gotFocus(struct menu *)), + SLOT(listFocusChanged(void))); + connect(helpText, SIGNAL(menuSelected(struct menu *)), + SLOT(setMenuLink(struct menu *))); + + QString listMode = configSettings->readEntry("/listMode", "symbol"); + if (listMode == "single") + showSingleView(); + else if (listMode == "full") + showFullView(); + else /*if (listMode == "split")*/ + showSplitView(); + + // UI setup done, restore splitter positions + Q3ValueList sizes = configSettings->readSizes("/split1", &ok); + if (ok) + split1->setSizes(sizes); + + sizes = configSettings->readSizes("/split2", &ok); + if (ok) + split2->setSizes(sizes); +} + +void ConfigMainWindow::loadConfig(void) +{ + QString s = Q3FileDialog::getOpenFileName(conf_get_configname(), NULL, this); + if (s.isNull()) + return; + if (conf_read(QFile::encodeName(s))) + QMessageBox::information(this, "qconf", _("Unable to load configuration!")); + ConfigView::updateListAll(); +} + +bool ConfigMainWindow::saveConfig(void) +{ + if (conf_write(NULL)) { + QMessageBox::information(this, "qconf", _("Unable to save configuration!")); + return false; + } + return true; +} + +void ConfigMainWindow::saveConfigAs(void) +{ + QString s = Q3FileDialog::getSaveFileName(conf_get_configname(), NULL, this); + if (s.isNull()) + return; + saveConfig(); +} + +void ConfigMainWindow::searchConfig(void) +{ + if (!searchWindow) + searchWindow = new ConfigSearchWindow(this, "search"); + searchWindow->show(); +} + +void ConfigMainWindow::changeMenu(struct menu *menu) +{ + configList->setRootMenu(menu); + if (configList->rootEntry->parent == &rootmenu) + backAction->setEnabled(FALSE); + else + backAction->setEnabled(TRUE); +} + +void ConfigMainWindow::setMenuLink(struct menu *menu) +{ + struct menu *parent; + ConfigList* list = NULL; + ConfigItem* item; + + if (configList->menuSkip(menu)) + return; + + switch (configList->mode) { + case singleMode: + list = configList; + parent = menu_get_parent_menu(menu); + if (!parent) + return; + list->setRootMenu(parent); + break; + case symbolMode: + if (menu->flags & MENU_ROOT) { + configList->setRootMenu(menu); + configList->clearSelection(); + list = menuList; + } else { + list = configList; + parent = menu_get_parent_menu(menu->parent); + if (!parent) + return; + item = menuList->findConfigItem(parent); + if (item) { + menuList->setSelected(item, TRUE); + menuList->ensureItemVisible(item); + } + list->setRootMenu(parent); + } + break; + case fullMode: + list = configList; + break; + default: + break; + } + + if (list) { + item = list->findConfigItem(menu); + if (item) { + list->setSelected(item, TRUE); + list->ensureItemVisible(item); + list->setFocus(); + } + } +} + +void ConfigMainWindow::listFocusChanged(void) +{ + if (menuList->mode == menuMode) + configList->clearSelection(); +} + +void ConfigMainWindow::goBack(void) +{ + ConfigItem* item; + + configList->setParentMenu(); + if (configList->rootEntry == &rootmenu) + backAction->setEnabled(FALSE); + item = (ConfigItem*)menuList->selectedItem(); + while (item) { + if (item->menu == configList->rootEntry) { + menuList->setSelected(item, TRUE); + break; + } + item = (ConfigItem*)item->parent(); + } +} + +void ConfigMainWindow::showSingleView(void) +{ + menuView->hide(); + menuList->setRootMenu(0); + configList->mode = singleMode; + if (configList->rootEntry == &rootmenu) + configList->updateListAll(); + else + configList->setRootMenu(&rootmenu); + configList->setAllOpen(TRUE); + configList->setFocus(); +} + +void ConfigMainWindow::showSplitView(void) +{ + configList->mode = symbolMode; + if (configList->rootEntry == &rootmenu) + configList->updateListAll(); + else + configList->setRootMenu(&rootmenu); + configList->setAllOpen(TRUE); + configApp->processEvents(); + menuList->mode = menuMode; + menuList->setRootMenu(&rootmenu); + menuList->setAllOpen(TRUE); + menuView->show(); + menuList->setFocus(); +} + +void ConfigMainWindow::showFullView(void) +{ + menuView->hide(); + menuList->setRootMenu(0); + configList->mode = fullMode; + if (configList->rootEntry == &rootmenu) + configList->updateListAll(); + else + configList->setRootMenu(&rootmenu); + configList->setAllOpen(FALSE); + configList->setFocus(); +} + +/* + * ask for saving configuration before quitting + * TODO ask only when something changed + */ +void ConfigMainWindow::closeEvent(QCloseEvent* e) +{ + if (!conf_get_changed()) { + e->accept(); + return; + } + QMessageBox mb("qconf", _("Save configuration?"), QMessageBox::Warning, + QMessageBox::Yes | QMessageBox::Default, QMessageBox::No, QMessageBox::Cancel | QMessageBox::Escape); + mb.setButtonText(QMessageBox::Yes, _("&Save Changes")); + mb.setButtonText(QMessageBox::No, _("&Discard Changes")); + mb.setButtonText(QMessageBox::Cancel, _("Cancel Exit")); + switch (mb.exec()) { + case QMessageBox::Yes: + if (saveConfig()) + e->accept(); + else + e->ignore(); + break; + case QMessageBox::No: + e->accept(); + break; + case QMessageBox::Cancel: + e->ignore(); + break; + } +} + +void ConfigMainWindow::showIntro(void) +{ + static const QString str = _("Welcome to the qconf graphical configuration tool.\n\n" + "For each option, a blank box indicates the feature is disabled, a check\n" + "indicates it is enabled, and a dot indicates that it is to be compiled\n" + "as a module. Clicking on the box will cycle through the three states.\n\n" + "If you do not see an option (e.g., a device driver) that you believe\n" + "should be present, try turning on Show All Options under the Options menu.\n" + "Although there is no cross reference yet to help you figure out what other\n" + "options must be enabled to support the option you are interested in, you can\n" + "still view the help of a grayed-out option.\n\n" + "Toggling Show Debug Info under the Options menu will show the dependencies,\n" + "which you can then match by examining other options.\n\n"); + + QMessageBox::information(this, "qconf", str); +} + +void ConfigMainWindow::showAbout(void) +{ + static const QString str = _("qconf is Copyright (C) 2002 Roman Zippel .\n\n" + "Bug reports and feature request can also be entered at http://bugzilla.kernel.org/\n"); + + QMessageBox::information(this, "qconf", str); +} + +void ConfigMainWindow::saveSettings(void) +{ + configSettings->writeEntry("/window x", pos().x()); + configSettings->writeEntry("/window y", pos().y()); + configSettings->writeEntry("/window width", size().width()); + configSettings->writeEntry("/window height", size().height()); + + QString entry; + switch(configList->mode) { + case singleMode : + entry = "single"; + break; + + case symbolMode : + entry = "split"; + break; + + case fullMode : + entry = "full"; + break; + + default: + break; + } + configSettings->writeEntry("/listMode", entry); + + configSettings->writeSizes("/split1", split1->sizes()); + configSettings->writeSizes("/split2", split2->sizes()); +} + +void ConfigMainWindow::conf_changed(void) +{ + if (saveAction) + saveAction->setEnabled(conf_get_changed()); +} + +void fixup_rootmenu(struct menu *menu) +{ + struct menu *child; + static int menu_cnt = 0; + + menu->flags |= MENU_ROOT; + for (child = menu->list; child; child = child->next) { + if (child->prompt && child->prompt->type == P_MENU) { + menu_cnt++; + fixup_rootmenu(child); + menu_cnt--; + } else if (!menu_cnt) + fixup_rootmenu(child); + } +} + +static const char *progname; + +static void usage(void) +{ + printf(_("%s \n"), progname); + exit(0); +} + +int main(int ac, char** av) +{ + ConfigMainWindow* v; + const char *name; + + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + + progname = av[0]; + configApp = new QApplication(ac, av); + if (ac > 1 && av[1][0] == '-') { + switch (av[1][1]) { + case 'h': + case '?': + usage(); + } + name = av[2]; + } else + name = av[1]; + if (!name) + usage(); + + conf_parse(name); + fixup_rootmenu(&rootmenu); + conf_read(NULL); + //zconfdump(stdout); + + configSettings = new ConfigSettings(); + configSettings->beginGroup("/kconfig/qconf"); + v = new ConfigMainWindow(); + + //zconfdump(stdout); + configApp->setMainWidget(v); + configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit())); + configApp->connect(configApp, SIGNAL(aboutToQuit()), v, SLOT(saveSettings())); + v->show(); + configApp->exec(); + + configSettings->endGroup(); + delete configSettings; + + return 0; +} diff --git a/support/kconfig/qconf.h b/support/kconfig/qconf.h new file mode 100644 index 0000000000..bde0c6b6f9 --- /dev/null +++ b/support/kconfig/qconf.h @@ -0,0 +1,338 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#if QT_VERSION < 0x040000 +#include +#else +#include +#endif +#include + +#if QT_VERSION < 0x040000 +#define Q3ValueList QValueList +#define Q3PopupMenu QPopupMenu +#define Q3ListView QListView +#define Q3ListViewItem QListViewItem +#define Q3VBox QVBox +#define Q3TextBrowser QTextBrowser +#define Q3MainWindow QMainWindow +#define Q3Action QAction +#define Q3ToolBar QToolBar +#define Q3ListViewItemIterator QListViewItemIterator +#define Q3FileDialog QFileDialog +#endif + +class ConfigView; +class ConfigList; +class ConfigItem; +class ConfigLineEdit; +class ConfigMainWindow; + +class ConfigSettings : public QSettings { +public: + ConfigSettings(); + Q3ValueList readSizes(const QString& key, bool *ok); + bool writeSizes(const QString& key, const Q3ValueList& value); +}; + +enum colIdx { + promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr +}; +enum listMode { + singleMode, menuMode, symbolMode, fullMode, listMode +}; +enum optionMode { + normalOpt = 0, allOpt, promptOpt +}; + +class ConfigList : public Q3ListView { + Q_OBJECT + typedef class Q3ListView Parent; +public: + ConfigList(ConfigView* p, const char *name = 0); + void reinit(void); + ConfigView* parent(void) const + { + return (ConfigView*)Parent::parent(); + } + ConfigItem* findConfigItem(struct menu *); + +protected: + void keyPressEvent(QKeyEvent *e); + void contentsMousePressEvent(QMouseEvent *e); + void contentsMouseReleaseEvent(QMouseEvent *e); + void contentsMouseMoveEvent(QMouseEvent *e); + void contentsMouseDoubleClickEvent(QMouseEvent *e); + void focusInEvent(QFocusEvent *e); + void contextMenuEvent(QContextMenuEvent *e); + +public slots: + void setRootMenu(struct menu *menu); + + void updateList(ConfigItem *item); + void setValue(ConfigItem* item, tristate val); + void changeValue(ConfigItem* item); + void updateSelection(void); + void saveSettings(void); +signals: + void menuChanged(struct menu *menu); + void menuSelected(struct menu *menu); + void parentSelected(void); + void gotFocus(struct menu *); + +public: + void updateListAll(void) + { + updateAll = true; + updateList(NULL); + updateAll = false; + } + ConfigList* listView() + { + return this; + } + ConfigItem* firstChild() const + { + return (ConfigItem *)Parent::firstChild(); + } + int mapIdx(colIdx idx) + { + return colMap[idx]; + } + void addColumn(colIdx idx, const QString& label) + { + colMap[idx] = Parent::addColumn(label); + colRevMap[colMap[idx]] = idx; + } + void removeColumn(colIdx idx) + { + int col = colMap[idx]; + if (col >= 0) { + Parent::removeColumn(col); + colRevMap[col] = colMap[idx] = -1; + } + } + void setAllOpen(bool open); + void setParentMenu(void); + + bool menuSkip(struct menu *); + + template + void updateMenuList(P*, struct menu*); + + bool updateAll; + + QPixmap symbolYesPix, symbolModPix, symbolNoPix; + QPixmap choiceYesPix, choiceNoPix; + QPixmap menuPix, menuInvPix, menuBackPix, voidPix; + + bool showName, showRange, showData; + enum listMode mode; + enum optionMode optMode; + struct menu *rootEntry; + QColorGroup disabledColorGroup; + QColorGroup inactivedColorGroup; + Q3PopupMenu* headerPopup; + +private: + int colMap[colNr]; + int colRevMap[colNr]; +}; + +class ConfigItem : public Q3ListViewItem { + typedef class Q3ListViewItem Parent; +public: + ConfigItem(Q3ListView *parent, ConfigItem *after, struct menu *m, bool v) + : Parent(parent, after), menu(m), visible(v), goParent(false) + { + init(); + } + ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v) + : Parent(parent, after), menu(m), visible(v), goParent(false) + { + init(); + } + ConfigItem(Q3ListView *parent, ConfigItem *after, bool v) + : Parent(parent, after), menu(0), visible(v), goParent(true) + { + init(); + } + ~ConfigItem(void); + void init(void); + void okRename(int col); + void updateMenu(void); + void testUpdateMenu(bool v); + ConfigList* listView() const + { + return (ConfigList*)Parent::listView(); + } + ConfigItem* firstChild() const + { + return (ConfigItem *)Parent::firstChild(); + } + ConfigItem* nextSibling() const + { + return (ConfigItem *)Parent::nextSibling(); + } + void setText(colIdx idx, const QString& text) + { + Parent::setText(listView()->mapIdx(idx), text); + } + QString text(colIdx idx) const + { + return Parent::text(listView()->mapIdx(idx)); + } + void setPixmap(colIdx idx, const QPixmap& pm) + { + Parent::setPixmap(listView()->mapIdx(idx), pm); + } + const QPixmap* pixmap(colIdx idx) const + { + return Parent::pixmap(listView()->mapIdx(idx)); + } + void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align); + + ConfigItem* nextItem; + struct menu *menu; + bool visible; + bool goParent; +}; + +class ConfigLineEdit : public QLineEdit { + Q_OBJECT + typedef class QLineEdit Parent; +public: + ConfigLineEdit(ConfigView* parent); + ConfigView* parent(void) const + { + return (ConfigView*)Parent::parent(); + } + void show(ConfigItem *i); + void keyPressEvent(QKeyEvent *e); + +public: + ConfigItem *item; +}; + +class ConfigView : public Q3VBox { + Q_OBJECT + typedef class Q3VBox Parent; +public: + ConfigView(QWidget* parent, const char *name = 0); + ~ConfigView(void); + static void updateList(ConfigItem* item); + static void updateListAll(void); + + bool showName(void) const { return list->showName; } + bool showRange(void) const { return list->showRange; } + bool showData(void) const { return list->showData; } +public slots: + void setShowName(bool); + void setShowRange(bool); + void setShowData(bool); + void setOptionMode(QAction *); +signals: + void showNameChanged(bool); + void showRangeChanged(bool); + void showDataChanged(bool); +public: + ConfigList* list; + ConfigLineEdit* lineEdit; + + static ConfigView* viewList; + ConfigView* nextView; + + static QAction *showNormalAction; + static QAction *showAllAction; + static QAction *showPromptAction; +}; + +class ConfigInfoView : public Q3TextBrowser { + Q_OBJECT + typedef class Q3TextBrowser Parent; +public: + ConfigInfoView(QWidget* parent, const char *name = 0); + bool showDebug(void) const { return _showDebug; } + +public slots: + void setInfo(struct menu *menu); + void saveSettings(void); + void setShowDebug(bool); + +signals: + void showDebugChanged(bool); + void menuSelected(struct menu *); + +protected: + void symbolInfo(void); + void menuInfo(void); + QString debug_info(struct symbol *sym); + static QString print_filter(const QString &str); + static void expr_print_help(void *data, struct symbol *sym, const char *str); + Q3PopupMenu* createPopupMenu(const QPoint& pos); + void contentsContextMenuEvent(QContextMenuEvent *e); + + struct symbol *sym; + struct menu *_menu; + bool _showDebug; +}; + +class ConfigSearchWindow : public QDialog { + Q_OBJECT + typedef class QDialog Parent; +public: + ConfigSearchWindow(ConfigMainWindow* parent, const char *name = 0); + +public slots: + void saveSettings(void); + void search(void); + +protected: + QLineEdit* editField; + QPushButton* searchButton; + QSplitter* split; + ConfigView* list; + ConfigInfoView* info; + + struct symbol **result; +}; + +class ConfigMainWindow : public Q3MainWindow { + Q_OBJECT + + static Q3Action *saveAction; + static void conf_changed(void); +public: + ConfigMainWindow(void); +public slots: + void changeMenu(struct menu *); + void setMenuLink(struct menu *); + void listFocusChanged(void); + void goBack(void); + void loadConfig(void); + bool saveConfig(void); + void saveConfigAs(void); + void searchConfig(void); + void showSingleView(void); + void showSplitView(void); + void showFullView(void); + void showIntro(void); + void showAbout(void); + void saveSettings(void); + +protected: + void closeEvent(QCloseEvent *e); + + ConfigSearchWindow *searchWindow; + ConfigView *menuView; + ConfigList *menuList; + ConfigView *configView; + ConfigList *configList; + ConfigInfoView *helpText; + Q3ToolBar *toolBar; + Q3Action *backAction; + QSplitter* split1; + QSplitter* split2; +}; diff --git a/support/kconfig/streamline_config.pl b/support/kconfig/streamline_config.pl new file mode 100644 index 0000000000..4606cdfb85 --- /dev/null +++ b/support/kconfig/streamline_config.pl @@ -0,0 +1,640 @@ +#!/usr/bin/perl -w +# +# Copyright 2005-2009 - Steven Rostedt +# Licensed under the terms of the GNU GPL License version 2 +# +# It's simple enough to figure out how this works. +# If not, then you can ask me at stripconfig@goodmis.org +# +# What it does? +# +# If you have installed a Linux kernel from a distribution +# that turns on way too many modules than you need, and +# you only want the modules you use, then this program +# is perfect for you. +# +# It gives you the ability to turn off all the modules that are +# not loaded on your system. +# +# Howto: +# +# 1. Boot up the kernel that you want to stream line the config on. +# 2. Change directory to the directory holding the source of the +# kernel that you just booted. +# 3. Copy the configuraton file to this directory as .config +# 4. Have all your devices that you need modules for connected and +# operational (make sure that their corresponding modules are loaded) +# 5. Run this script redirecting the output to some other file +# like config_strip. +# 6. Back up your old config (if you want too). +# 7. copy the config_strip file to .config +# 8. Run "make oldconfig" +# +# Now your kernel is ready to be built with only the modules that +# are loaded. +# +# Here's what I did with my Debian distribution. +# +# cd /usr/src/linux-2.6.10 +# cp /boot/config-2.6.10-1-686-smp .config +# ~/bin/streamline_config > config_strip +# mv .config config_sav +# mv config_strip .config +# make oldconfig +# +use strict; +use Getopt::Long; + +# set the environment variable LOCALMODCONFIG_DEBUG to get +# debug output. +my $debugprint = 0; +$debugprint = 1 if (defined($ENV{LOCALMODCONFIG_DEBUG})); + +sub dprint { + return if (!$debugprint); + print STDERR @_; +} + +my $config = ".config"; + +my $uname = `uname -r`; +chomp $uname; + +my @searchconfigs = ( + { + "file" => ".config", + "exec" => "cat", + }, + { + "file" => "/proc/config.gz", + "exec" => "zcat", + }, + { + "file" => "/boot/config-$uname", + "exec" => "cat", + }, + { + "file" => "/boot/vmlinuz-$uname", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, + { + "file" => "vmlinux", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, + { + "file" => "/lib/modules/$uname/kernel/kernel/configs.ko", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, + { + "file" => "kernel/configs.ko", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, + { + "file" => "kernel/configs.o", + "exec" => "scripts/extract-ikconfig", + "test" => "scripts/extract-ikconfig", + }, +); + +sub read_config { + foreach my $conf (@searchconfigs) { + my $file = $conf->{"file"}; + + next if ( ! -f "$file"); + + if (defined($conf->{"test"})) { + `$conf->{"test"} $conf->{"file"} 2>/dev/null`; + next if ($?); + } + + my $exec = $conf->{"exec"}; + + print STDERR "using config: '$file'\n"; + + open(my $infile, '-|', "$exec $file") || die "Failed to run $exec $file"; + my @x = <$infile>; + close $infile; + return @x; + } + die "No config file found"; +} + +my @config_file = read_config; + +# Parse options +my $localmodconfig = 0; +my $localyesconfig = 0; + +GetOptions("localmodconfig" => \$localmodconfig, + "localyesconfig" => \$localyesconfig); + +# Get the build source and top level Kconfig file (passed in) +my $ksource = ($ARGV[0] ? $ARGV[0] : '.'); +my $kconfig = $ARGV[1]; +my $lsmod_file = $ENV{'LSMOD'}; + +my @makefiles = `find $ksource -name Makefile 2>/dev/null`; +chomp @makefiles; + +my %depends; +my %selects; +my %prompts; +my %objects; +my $var; +my $iflevel = 0; +my @ifdeps; + +# prevent recursion +my %read_kconfigs; + +sub read_kconfig { + my ($kconfig) = @_; + + my $state = "NONE"; + my $config; + + my $cont = 0; + my $line; + + my $source = "$ksource/$kconfig"; + my $last_source = ""; + + # Check for any environment variables used + while ($source =~ /\$(\w+)/ && $last_source ne $source) { + my $env = $1; + $last_source = $source; + $source =~ s/\$$env/$ENV{$env}/; + } + + open(my $kinfile, '<', $source) || die "Can't open $kconfig"; + while (<$kinfile>) { + chomp; + + # Make sure that lines ending with \ continue + if ($cont) { + $_ = $line . " " . $_; + } + + if (s/\\$//) { + $cont = 1; + $line = $_; + next; + } + + $cont = 0; + + # collect any Kconfig sources + if (/^source\s*"(.*)"/) { + my $kconfig = $1; + # prevent reading twice. + if (!defined($read_kconfigs{$kconfig})) { + $read_kconfigs{$kconfig} = 1; + read_kconfig($kconfig); + } + next; + } + + # configs found + if (/^\s*(menu)?config\s+(\S+)\s*$/) { + $state = "NEW"; + $config = $2; + + # Add depends for 'if' nesting + for (my $i = 0; $i < $iflevel; $i++) { + if ($i) { + $depends{$config} .= " " . $ifdeps[$i]; + } else { + $depends{$config} = $ifdeps[$i]; + } + $state = "DEP"; + } + + # collect the depends for the config + } elsif ($state eq "NEW" && /^\s*depends\s+on\s+(.*)$/) { + $state = "DEP"; + $depends{$config} = $1; + } elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) { + $depends{$config} .= " " . $1; + + # Get the configs that select this config + } elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) { + my $conf = $1; + if (defined($selects{$conf})) { + $selects{$conf} .= " " . $config; + } else { + $selects{$conf} = $config; + } + + # configs without prompts must be selected + } elsif ($state ne "NONE" && /^\s*tristate\s\S/) { + # note if the config has a prompt + $prompts{$config} = 1; + + # Check for if statements + } elsif (/^if\s+(.*\S)\s*$/) { + my $deps = $1; + # remove beginning and ending non text + $deps =~ s/^[^a-zA-Z0-9_]*//; + $deps =~ s/[^a-zA-Z0-9_]*$//; + + my @deps = split /[^a-zA-Z0-9_]+/, $deps; + + $ifdeps[$iflevel++] = join ':', @deps; + + } elsif (/^endif/) { + + $iflevel-- if ($iflevel); + + # stop on "help" + } elsif (/^\s*help\s*$/) { + $state = "NONE"; + } + } + close($kinfile); +} + +if ($kconfig) { + read_kconfig($kconfig); +} + +# Makefiles can use variables to define their dependencies +sub convert_vars { + my ($line, %vars) = @_; + + my $process = ""; + + while ($line =~ s/^(.*?)(\$\((.*?)\))//) { + my $start = $1; + my $variable = $2; + my $var = $3; + + if (defined($vars{$var})) { + $process .= $start . $vars{$var}; + } else { + $process .= $start . $variable; + } + } + + $process .= $line; + + return $process; +} + +# Read all Makefiles to map the configs to the objects +foreach my $makefile (@makefiles) { + + my $line = ""; + my %make_vars; + + open(my $infile, '<', $makefile) || die "Can't open $makefile"; + while (<$infile>) { + # if this line ends with a backslash, continue + chomp; + if (/^(.*)\\$/) { + $line .= $1; + next; + } + + $line .= $_; + $_ = $line; + $line = ""; + + my $objs; + + # Convert variables in a line (could define configs) + $_ = convert_vars($_, %make_vars); + + # collect objects after obj-$(CONFIG_FOO_BAR) + if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) { + $var = $1; + $objs = $2; + + # check if variables are set + } elsif (/^\s*(\S+)\s*[:]?=\s*(.*\S)/) { + $make_vars{$1} = $2; + } + if (defined($objs)) { + foreach my $obj (split /\s+/,$objs) { + $obj =~ s/-/_/g; + if ($obj =~ /(.*)\.o$/) { + # Objects may be enabled by more than one config. + # Store configs in an array. + my @arr; + + if (defined($objects{$1})) { + @arr = @{$objects{$1}}; + } + + $arr[$#arr+1] = $var; + + # The objects have a hash mapping to a reference + # of an array of configs. + $objects{$1} = \@arr; + } + } + } + } + close($infile); +} + +my %modules; +my $linfile; + +if (defined($lsmod_file)) { + if ( ! -f $lsmod_file) { + if ( -f $ENV{'objtree'}."/".$lsmod_file) { + $lsmod_file = $ENV{'objtree'}."/".$lsmod_file; + } else { + die "$lsmod_file not found"; + } + } + + my $otype = ( -x $lsmod_file) ? '-|' : '<'; + open($linfile, $otype, $lsmod_file); + +} else { + + # see what modules are loaded on this system + my $lsmod; + + foreach my $dir ( ("/sbin", "/bin", "/usr/sbin", "/usr/bin") ) { + if ( -x "$dir/lsmod" ) { + $lsmod = "$dir/lsmod"; + last; + } +} + if (!defined($lsmod)) { + # try just the path + $lsmod = "lsmod"; + } + + open($linfile, '-|', $lsmod) || die "Can not call lsmod with $lsmod"; +} + +while (<$linfile>) { + next if (/^Module/); # Skip the first line. + if (/^(\S+)/) { + $modules{$1} = 1; + } +} +close ($linfile); + +# add to the configs hash all configs that are needed to enable +# a loaded module. This is a direct obj-${CONFIG_FOO} += bar.o +# where we know we need bar.o so we add FOO to the list. +my %configs; +foreach my $module (keys(%modules)) { + if (defined($objects{$module})) { + my @arr = @{$objects{$module}}; + foreach my $conf (@arr) { + $configs{$conf} = $module; + dprint "$conf added by direct ($module)\n"; + if ($debugprint) { + my $c=$conf; + $c =~ s/^CONFIG_//; + if (defined($depends{$c})) { + dprint " deps = $depends{$c}\n"; + } else { + dprint " no deps\n"; + } + } + } + } else { + # Most likely, someone has a custom (binary?) module loaded. + print STDERR "$module config not found!!\n"; + } +} + +# Read the current config, and see what is enabled. We want to +# ignore configs that we would not enable anyway. + +my %orig_configs; +my $valid = "A-Za-z_0-9"; + +foreach my $line (@config_file) { + $_ = $line; + + if (/(CONFIG_[$valid]*)=(m|y)/) { + $orig_configs{$1} = $2; + } +} + +my $repeat = 1; + +my $depconfig; + +# +# Note, we do not care about operands (like: &&, ||, !) we want to add any +# config that is in the depend list of another config. This script does +# not enable configs that are not already enabled. If we come across a +# config A that depends on !B, we can still add B to the list of depends +# to keep on. If A was on in the original config, B would not have been +# and B would not be turned on by this script. +# +sub parse_config_depends +{ + my ($p) = @_; + + while ($p =~ /[$valid]/) { + + if ($p =~ /^[^$valid]*([$valid]+)/) { + my $conf = "CONFIG_" . $1; + + $p =~ s/^[^$valid]*[$valid]+//; + + # We only need to process if the depend config is a module + if (!defined($orig_configs{$conf}) || !$orig_configs{conf} eq "m") { + next; + } + + if (!defined($configs{$conf})) { + # We must make sure that this config has its + # dependencies met. + $repeat = 1; # do again + dprint "$conf selected by depend $depconfig\n"; + $configs{$conf} = 1; + } + } else { + die "this should never happen"; + } + } +} + +# Select is treated a bit differently than depends. We call this +# when a config has no prompt and requires another config to be +# selected. We use to just select all configs that selected this +# config, but found that that can balloon into enabling hundreds +# of configs that we do not care about. +# +# The idea is we look at all the configs that select it. If one +# is already in our list of configs to enable, then there's nothing +# else to do. If there isn't, we pick the first config that was +# enabled in the orignal config and use that. +sub parse_config_selects +{ + my ($config, $p) = @_; + + my $next_config; + + while ($p =~ /[$valid]/) { + + if ($p =~ /^[^$valid]*([$valid]+)/) { + my $conf = "CONFIG_" . $1; + + $p =~ s/^[^$valid]*[$valid]+//; + + # Make sure that this config exists in the current .config file + if (!defined($orig_configs{$conf})) { + dprint "$conf not set for $config select\n"; + next; + } + + # Check if something other than a module selects this config + if (defined($orig_configs{$conf}) && $orig_configs{$conf} ne "m") { + dprint "$conf (non module) selects config, we are good\n"; + # we are good with this + return; + } + if (defined($configs{$conf})) { + dprint "$conf selects $config so we are good\n"; + # A set config selects this config, we are good + return; + } + # Set this config to be selected + if (!defined($next_config)) { + $next_config = $conf; + } + } else { + die "this should never happen"; + } + } + + # If no possible config selected this, then something happened. + if (!defined($next_config)) { + print STDERR "WARNING: $config is required, but nothing in the\n"; + print STDERR " current config selects it.\n"; + return; + } + + # If we are here, then we found no config that is set and + # selects this config. Repeat. + $repeat = 1; + # Make this config need to be selected + $configs{$next_config} = 1; + dprint "$next_config selected by select $config\n"; +} + +my %process_selects; + +# loop through all configs, select their dependencies. +sub loop_depend { + $repeat = 1; + + while ($repeat) { + $repeat = 0; + + forloop: + foreach my $config (keys %configs) { + + # If this config is not a module, we do not need to process it + if (defined($orig_configs{$config}) && $orig_configs{$config} ne "m") { + next forloop; + } + + $config =~ s/^CONFIG_//; + $depconfig = $config; + + if (defined($depends{$config})) { + # This config has dependencies. Make sure they are also included + parse_config_depends $depends{$config}; + } + + # If the config has no prompt, then we need to check if a config + # that is enabled selected it. Or if we need to enable one. + if (!defined($prompts{$config}) && defined($selects{$config})) { + $process_selects{$config} = 1; + } + } + } +} + +sub loop_select { + + foreach my $config (keys %process_selects) { + $config =~ s/^CONFIG_//; + + dprint "Process select $config\n"; + + # config has no prompt and must be selected. + parse_config_selects $config, $selects{$config}; + } +} + +while ($repeat) { + # Get the first set of configs and their dependencies. + loop_depend; + + $repeat = 0; + + # Now we need to see if we have to check selects; + loop_select; +} + +my %setconfigs; + +# Finally, read the .config file and turn off any module enabled that +# we could not find a reason to keep enabled. +foreach my $line (@config_file) { + $_ = $line; + + if (/CONFIG_IKCONFIG/) { + if (/# CONFIG_IKCONFIG is not set/) { + # enable IKCONFIG at least as a module + print "CONFIG_IKCONFIG=m\n"; + # don't ask about PROC + print "# CONFIG_IKCONFIG_PROC is not set\n"; + } else { + print; + } + next; + } + + if (/^(CONFIG.*)=(m|y)/) { + if (defined($configs{$1})) { + if ($localyesconfig) { + $setconfigs{$1} = 'y'; + print "$1=y\n"; + next; + } else { + $setconfigs{$1} = $2; + } + } elsif ($2 eq "m") { + print "# $1 is not set\n"; + next; + } + } + print; +} + +# Integrity check, make sure all modules that we want enabled do +# indeed have their configs set. +loop: +foreach my $module (keys(%modules)) { + if (defined($objects{$module})) { + my @arr = @{$objects{$module}}; + foreach my $conf (@arr) { + if (defined($setconfigs{$conf})) { + next loop; + } + } + print STDERR "module $module did not have configs"; + foreach my $conf (@arr) { + print STDERR " " , $conf; + } + print STDERR "\n"; + } +} diff --git a/support/kconfig/symbol.c b/support/kconfig/symbol.c new file mode 100644 index 0000000000..7caabdb51c --- /dev/null +++ b/support/kconfig/symbol.c @@ -0,0 +1,1373 @@ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include + +#include "lkc.h" + +struct symbol symbol_yes = { + .name = "y", + .curr = { "y", yes }, + .flags = SYMBOL_CONST|SYMBOL_VALID, +}, symbol_mod = { + .name = "m", + .curr = { "m", mod }, + .flags = SYMBOL_CONST|SYMBOL_VALID, +}, symbol_no = { + .name = "n", + .curr = { "n", no }, + .flags = SYMBOL_CONST|SYMBOL_VALID, +}, symbol_empty = { + .name = "", + .curr = { "", no }, + .flags = SYMBOL_VALID, +}; + +struct symbol *sym_defconfig_list; +struct symbol *modules_sym; +tristate modules_val; + +struct expr *sym_env_list; + +static void sym_add_default(struct symbol *sym, const char *def) +{ + struct property *prop = prop_alloc(P_DEFAULT, sym); + + prop->expr = expr_alloc_symbol(sym_lookup(def, SYMBOL_CONST)); +} + +void sym_init(void) +{ + struct symbol *sym; + struct utsname uts; + static bool inited = false; + + if (inited) + return; + inited = true; + + uname(&uts); + + sym = sym_lookup("UNAME_RELEASE", 0); + sym->type = S_STRING; + sym->flags |= SYMBOL_AUTO; + sym_add_default(sym, uts.release); +} + +enum symbol_type sym_get_type(struct symbol *sym) +{ + enum symbol_type type = sym->type; + + if (type == S_TRISTATE) { + if (sym_is_choice_value(sym) && sym->visible == yes) + type = S_BOOLEAN; + else if (modules_val == no) + type = S_BOOLEAN; + } + return type; +} + +const char *sym_type_name(enum symbol_type type) +{ + switch (type) { + case S_BOOLEAN: + return "boolean"; + case S_TRISTATE: + return "tristate"; + case S_INT: + return "integer"; + case S_HEX: + return "hex"; + case S_STRING: + return "string"; + case S_UNKNOWN: + return "unknown"; + case S_OTHER: + break; + } + return "???"; +} + +struct property *sym_get_choice_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_choices(sym, prop) + return prop; + return NULL; +} + +struct property *sym_get_env_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_properties(sym, prop, P_ENV) + return prop; + return NULL; +} + +struct property *sym_get_default_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_defaults(sym, prop) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + if (prop->visible.tri != no) + return prop; + } + return NULL; +} + +static struct property *sym_get_range_prop(struct symbol *sym) +{ + struct property *prop; + + for_all_properties(sym, prop, P_RANGE) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + if (prop->visible.tri != no) + return prop; + } + return NULL; +} + +static long long sym_get_range_val(struct symbol *sym, int base) +{ + sym_calc_value(sym); + switch (sym->type) { + case S_INT: + base = 10; + break; + case S_HEX: + base = 16; + break; + default: + break; + } + return strtoll(sym->curr.val, NULL, base); +} + +static void sym_validate_range(struct symbol *sym) +{ + struct property *prop; + int base; + long long val, val2; + char str[64]; + + switch (sym->type) { + case S_INT: + base = 10; + break; + case S_HEX: + base = 16; + break; + default: + return; + } + prop = sym_get_range_prop(sym); + if (!prop) + return; + val = strtoll(sym->curr.val, NULL, base); + val2 = sym_get_range_val(prop->expr->left.sym, base); + if (val >= val2) { + val2 = sym_get_range_val(prop->expr->right.sym, base); + if (val <= val2) + return; + } + if (sym->type == S_INT) + sprintf(str, "%lld", val2); + else + sprintf(str, "0x%llx", val2); + sym->curr.val = strdup(str); +} + +static void sym_calc_visibility(struct symbol *sym) +{ + struct property *prop; + tristate tri; + + /* any prompt visible? */ + tri = no; + for_all_prompts(sym, prop) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + tri = EXPR_OR(tri, prop->visible.tri); + } + if (tri == mod && (sym->type != S_TRISTATE || modules_val == no)) + tri = yes; + if (sym->visible != tri) { + sym->visible = tri; + sym_set_changed(sym); + } + if (sym_is_choice_value(sym)) + return; + /* defaulting to "yes" if no explicit "depends on" are given */ + tri = yes; + if (sym->dir_dep.expr) + tri = expr_calc_value(sym->dir_dep.expr); + if (tri == mod) + tri = yes; + if (sym->dir_dep.tri != tri) { + sym->dir_dep.tri = tri; + sym_set_changed(sym); + } + tri = no; + if (sym->rev_dep.expr) + tri = expr_calc_value(sym->rev_dep.expr); + if (tri == mod && sym_get_type(sym) == S_BOOLEAN) + tri = yes; + if (sym->rev_dep.tri != tri) { + sym->rev_dep.tri = tri; + sym_set_changed(sym); + } +} + +/* + * Find the default symbol for a choice. + * First try the default values for the choice symbol + * Next locate the first visible choice value + * Return NULL if none was found + */ +struct symbol *sym_choice_default(struct symbol *sym) +{ + struct symbol *def_sym; + struct property *prop; + struct expr *e; + + /* any of the defaults visible? */ + for_all_defaults(sym, prop) { + prop->visible.tri = expr_calc_value(prop->visible.expr); + if (prop->visible.tri == no) + continue; + def_sym = prop_get_symbol(prop); + if (def_sym->visible != no) + return def_sym; + } + + /* just get the first visible value */ + prop = sym_get_choice_prop(sym); + expr_list_for_each_sym(prop->expr, e, def_sym) + if (def_sym->visible != no) + return def_sym; + + /* failed to locate any defaults */ + return NULL; +} + +static struct symbol *sym_calc_choice(struct symbol *sym) +{ + struct symbol *def_sym; + struct property *prop; + struct expr *e; + int flags; + + /* first calculate all choice values' visibilities */ + flags = sym->flags; + prop = sym_get_choice_prop(sym); + expr_list_for_each_sym(prop->expr, e, def_sym) { + sym_calc_visibility(def_sym); + if (def_sym->visible != no) + flags &= def_sym->flags; + } + + sym->flags &= flags | ~SYMBOL_DEF_USER; + + /* is the user choice visible? */ + def_sym = sym->def[S_DEF_USER].val; + if (def_sym && def_sym->visible != no) + return def_sym; + + def_sym = sym_choice_default(sym); + + if (def_sym == NULL) + /* no choice? reset tristate value */ + sym->curr.tri = no; + + return def_sym; +} + +void sym_calc_value(struct symbol *sym) +{ + struct symbol_value newval, oldval; + struct property *prop; + struct expr *e; + + if (!sym) + return; + + if (sym->flags & SYMBOL_VALID) + return; + + if (sym_is_choice_value(sym) && + sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES) { + sym->flags &= ~SYMBOL_NEED_SET_CHOICE_VALUES; + prop = sym_get_choice_prop(sym); + sym_calc_value(prop_get_symbol(prop)); + } + + sym->flags |= SYMBOL_VALID; + + oldval = sym->curr; + + switch (sym->type) { + case S_INT: + case S_HEX: + case S_STRING: + newval = symbol_empty.curr; + break; + case S_BOOLEAN: + case S_TRISTATE: + newval = symbol_no.curr; + break; + default: + sym->curr.val = sym->name; + sym->curr.tri = no; + return; + } + if (!sym_is_choice_value(sym)) + sym->flags &= ~SYMBOL_WRITE; + + sym_calc_visibility(sym); + + /* set default if recursively called */ + sym->curr = newval; + + switch (sym_get_type(sym)) { + case S_BOOLEAN: + case S_TRISTATE: + if (sym_is_choice_value(sym) && sym->visible == yes) { + prop = sym_get_choice_prop(sym); + newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no; + } else { + if (sym->visible != no) { + /* if the symbol is visible use the user value + * if available, otherwise try the default value + */ + sym->flags |= SYMBOL_WRITE; + if (sym_has_value(sym)) { + newval.tri = EXPR_AND(sym->def[S_DEF_USER].tri, + sym->visible); + goto calc_newval; + } + } + if (sym->rev_dep.tri != no) + sym->flags |= SYMBOL_WRITE; + if (!sym_is_choice(sym)) { + prop = sym_get_default_prop(sym); + if (prop) { + sym->flags |= SYMBOL_WRITE; + newval.tri = EXPR_AND(expr_calc_value(prop->expr), + prop->visible.tri); + } + } + calc_newval: + if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) { + struct expr *e; + e = expr_simplify_unmet_dep(sym->rev_dep.expr, + sym->dir_dep.expr); + fprintf(stderr, "warning: ("); + expr_fprint(e, stderr); + fprintf(stderr, ") selects %s which has unmet direct dependencies (", + sym->name); + expr_fprint(sym->dir_dep.expr, stderr); + fprintf(stderr, ")\n"); + expr_free(e); + } + newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); + } + if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) + newval.tri = yes; + break; + case S_STRING: + case S_HEX: + case S_INT: + if (sym->visible != no) { + sym->flags |= SYMBOL_WRITE; + if (sym_has_value(sym)) { + newval.val = sym->def[S_DEF_USER].val; + break; + } + } + prop = sym_get_default_prop(sym); + if (prop) { + struct symbol *ds = prop_get_symbol(prop); + if (ds) { + sym->flags |= SYMBOL_WRITE; + sym_calc_value(ds); + newval.val = ds->curr.val; + } + } + break; + default: + ; + } + + sym->curr = newval; + if (sym_is_choice(sym) && newval.tri == yes) + sym->curr.val = sym_calc_choice(sym); + sym_validate_range(sym); + + if (memcmp(&oldval, &sym->curr, sizeof(oldval))) { + sym_set_changed(sym); + if (modules_sym == sym) { + sym_set_all_changed(); + modules_val = modules_sym->curr.tri; + } + } + + if (sym_is_choice(sym)) { + struct symbol *choice_sym; + + prop = sym_get_choice_prop(sym); + expr_list_for_each_sym(prop->expr, e, choice_sym) { + if ((sym->flags & SYMBOL_WRITE) && + choice_sym->visible != no) + choice_sym->flags |= SYMBOL_WRITE; + if (sym->flags & SYMBOL_CHANGED) + sym_set_changed(choice_sym); + } + } + + if (sym->flags & SYMBOL_AUTO) + sym->flags &= ~SYMBOL_WRITE; + + if (sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES) + set_all_choice_values(sym); +} + +void sym_clear_all_valid(void) +{ + struct symbol *sym; + int i; + + for_all_symbols(i, sym) + sym->flags &= ~SYMBOL_VALID; + sym_add_change_count(1); + if (modules_sym) + sym_calc_value(modules_sym); +} + +void sym_set_changed(struct symbol *sym) +{ + struct property *prop; + + sym->flags |= SYMBOL_CHANGED; + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->menu) + prop->menu->flags |= MENU_CHANGED; + } +} + +void sym_set_all_changed(void) +{ + struct symbol *sym; + int i; + + for_all_symbols(i, sym) + sym_set_changed(sym); +} + +bool sym_tristate_within_range(struct symbol *sym, tristate val) +{ + int type = sym_get_type(sym); + + if (sym->visible == no) + return false; + + if (type != S_BOOLEAN && type != S_TRISTATE) + return false; + + if (type == S_BOOLEAN && val == mod) + return false; + if (sym->visible <= sym->rev_dep.tri) + return false; + if (sym_is_choice_value(sym) && sym->visible == yes) + return val == yes; + return val >= sym->rev_dep.tri && val <= sym->visible; +} + +bool sym_set_tristate_value(struct symbol *sym, tristate val) +{ + tristate oldval = sym_get_tristate_value(sym); + + if (oldval != val && !sym_tristate_within_range(sym, val)) + return false; + + if (!(sym->flags & SYMBOL_DEF_USER)) { + sym->flags |= SYMBOL_DEF_USER; + sym_set_changed(sym); + } + /* + * setting a choice value also resets the new flag of the choice + * symbol and all other choice values. + */ + if (sym_is_choice_value(sym) && val == yes) { + struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); + struct property *prop; + struct expr *e; + + cs->def[S_DEF_USER].val = sym; + cs->flags |= SYMBOL_DEF_USER; + prop = sym_get_choice_prop(cs); + for (e = prop->expr; e; e = e->left.expr) { + if (e->right.sym->visible != no) + e->right.sym->flags |= SYMBOL_DEF_USER; + } + } + + sym->def[S_DEF_USER].tri = val; + if (oldval != val) + sym_clear_all_valid(); + + return true; +} + +tristate sym_toggle_tristate_value(struct symbol *sym) +{ + tristate oldval, newval; + + oldval = newval = sym_get_tristate_value(sym); + do { + switch (newval) { + case no: + newval = mod; + break; + case mod: + newval = yes; + break; + case yes: + newval = no; + break; + } + if (sym_set_tristate_value(sym, newval)) + break; + } while (oldval != newval); + return newval; +} + +bool sym_string_valid(struct symbol *sym, const char *str) +{ + signed char ch; + + switch (sym->type) { + case S_STRING: + return true; + case S_INT: + ch = *str++; + if (ch == '-') + ch = *str++; + if (!isdigit(ch)) + return false; + if (ch == '0' && *str != 0) + return false; + while ((ch = *str++)) { + if (!isdigit(ch)) + return false; + } + return true; + case S_HEX: + if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) + str += 2; + ch = *str++; + do { + if (!isxdigit(ch)) + return false; + } while ((ch = *str++)); + return true; + case S_BOOLEAN: + case S_TRISTATE: + switch (str[0]) { + case 'y': case 'Y': + case 'm': case 'M': + case 'n': case 'N': + return true; + } + return false; + default: + return false; + } +} + +bool sym_string_within_range(struct symbol *sym, const char *str) +{ + struct property *prop; + long long val; + + switch (sym->type) { + case S_STRING: + return sym_string_valid(sym, str); + case S_INT: + if (!sym_string_valid(sym, str)) + return false; + prop = sym_get_range_prop(sym); + if (!prop) + return true; + val = strtoll(str, NULL, 10); + return val >= sym_get_range_val(prop->expr->left.sym, 10) && + val <= sym_get_range_val(prop->expr->right.sym, 10); + case S_HEX: + if (!sym_string_valid(sym, str)) + return false; + prop = sym_get_range_prop(sym); + if (!prop) + return true; + val = strtoll(str, NULL, 16); + return val >= sym_get_range_val(prop->expr->left.sym, 16) && + val <= sym_get_range_val(prop->expr->right.sym, 16); + case S_BOOLEAN: + case S_TRISTATE: + switch (str[0]) { + case 'y': case 'Y': + return sym_tristate_within_range(sym, yes); + case 'm': case 'M': + return sym_tristate_within_range(sym, mod); + case 'n': case 'N': + return sym_tristate_within_range(sym, no); + } + return false; + default: + return false; + } +} + +bool sym_set_string_value(struct symbol *sym, const char *newval) +{ + const char *oldval; + char *val; + int size; + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + switch (newval[0]) { + case 'y': case 'Y': + return sym_set_tristate_value(sym, yes); + case 'm': case 'M': + return sym_set_tristate_value(sym, mod); + case 'n': case 'N': + return sym_set_tristate_value(sym, no); + } + return false; + default: + ; + } + + if (!sym_string_within_range(sym, newval)) + return false; + + if (!(sym->flags & SYMBOL_DEF_USER)) { + sym->flags |= SYMBOL_DEF_USER; + sym_set_changed(sym); + } + + oldval = sym->def[S_DEF_USER].val; + size = strlen(newval) + 1; + if (sym->type == S_HEX && (newval[0] != '0' || (newval[1] != 'x' && newval[1] != 'X'))) { + size += 2; + sym->def[S_DEF_USER].val = val = xmalloc(size); + *val++ = '0'; + *val++ = 'x'; + } else if (!oldval || strcmp(oldval, newval)) + sym->def[S_DEF_USER].val = val = xmalloc(size); + else + return true; + + strcpy(val, newval); + free((void *)oldval); + sym_clear_all_valid(); + + return true; +} + +/* + * Find the default value associated to a symbol. + * For tristate symbol handle the modules=n case + * in which case "m" becomes "y". + * If the symbol does not have any default then fallback + * to the fixed default values. + */ +const char *sym_get_string_default(struct symbol *sym) +{ + struct property *prop; + struct symbol *ds; + const char *str; + tristate val; + + sym_calc_visibility(sym); + sym_calc_value(modules_sym); + val = symbol_no.curr.tri; + str = symbol_empty.curr.val; + + /* If symbol has a default value look it up */ + prop = sym_get_default_prop(sym); + if (prop != NULL) { + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + /* The visibility may limit the value from yes => mod */ + val = EXPR_AND(expr_calc_value(prop->expr), prop->visible.tri); + break; + default: + /* + * The following fails to handle the situation + * where a default value is further limited by + * the valid range. + */ + ds = prop_get_symbol(prop); + if (ds != NULL) { + sym_calc_value(ds); + str = (const char *)ds->curr.val; + } + } + } + + /* Handle select statements */ + val = EXPR_OR(val, sym->rev_dep.tri); + + /* transpose mod to yes if modules are not enabled */ + if (val == mod) + if (!sym_is_choice_value(sym) && modules_sym->curr.tri == no) + val = yes; + + /* transpose mod to yes if type is bool */ + if (sym->type == S_BOOLEAN && val == mod) + val = yes; + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + switch (val) { + case no: return "n"; + case mod: return "m"; + case yes: return "y"; + } + case S_INT: + case S_HEX: + return str; + case S_STRING: + return str; + case S_OTHER: + case S_UNKNOWN: + break; + } + return ""; +} + +const char *sym_get_string_value(struct symbol *sym) +{ + tristate val; + + switch (sym->type) { + case S_BOOLEAN: + case S_TRISTATE: + val = sym_get_tristate_value(sym); + switch (val) { + case no: + return "n"; + case mod: + sym_calc_value(modules_sym); + return (modules_sym->curr.tri == no) ? "n" : "m"; + case yes: + return "y"; + } + break; + default: + ; + } + return (const char *)sym->curr.val; +} + +bool sym_is_changable(struct symbol *sym) +{ + return sym->visible > sym->rev_dep.tri; +} + +static unsigned strhash(const char *s) +{ + /* fnv32 hash */ + unsigned hash = 2166136261U; + for (; *s; s++) + hash = (hash ^ *s) * 0x01000193; + return hash; +} + +struct symbol *sym_lookup(const char *name, int flags) +{ + struct symbol *symbol; + char *new_name; + int hash; + + if (name) { + if (name[0] && !name[1]) { + switch (name[0]) { + case 'y': return &symbol_yes; + case 'm': return &symbol_mod; + case 'n': return &symbol_no; + } + } + hash = strhash(name) % SYMBOL_HASHSIZE; + + for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { + if (symbol->name && + !strcmp(symbol->name, name) && + (flags ? symbol->flags & flags + : !(symbol->flags & (SYMBOL_CONST|SYMBOL_CHOICE)))) + return symbol; + } + new_name = strdup(name); + } else { + new_name = NULL; + hash = 0; + } + + symbol = xmalloc(sizeof(*symbol)); + memset(symbol, 0, sizeof(*symbol)); + symbol->name = new_name; + symbol->type = S_UNKNOWN; + symbol->flags |= flags; + + symbol->next = symbol_hash[hash]; + symbol_hash[hash] = symbol; + + return symbol; +} + +struct symbol *sym_find(const char *name) +{ + struct symbol *symbol = NULL; + int hash = 0; + + if (!name) + return NULL; + + if (name[0] && !name[1]) { + switch (name[0]) { + case 'y': return &symbol_yes; + case 'm': return &symbol_mod; + case 'n': return &symbol_no; + } + } + hash = strhash(name) % SYMBOL_HASHSIZE; + + for (symbol = symbol_hash[hash]; symbol; symbol = symbol->next) { + if (symbol->name && + !strcmp(symbol->name, name) && + !(symbol->flags & SYMBOL_CONST)) + break; + } + + return symbol; +} + +/* + * Expand symbol's names embedded in the string given in argument. Symbols' + * name to be expanded shall be prefixed by a '$'. Unknown symbol expands to + * the empty string. + */ +const char *sym_expand_string_value(const char *in) +{ + const char *src; + char *res; + size_t reslen; + + reslen = strlen(in) + 1; + res = xmalloc(reslen); + res[0] = '\0'; + + while ((src = strchr(in, '$'))) { + char *p, name[SYMBOL_MAXLENGTH]; + const char *symval = ""; + struct symbol *sym; + size_t newlen; + + strncat(res, in, src - in); + src++; + + p = name; + while (isalnum(*src) || *src == '_') + *p++ = *src++; + *p = '\0'; + + sym = sym_find(name); + if (sym != NULL) { + sym_calc_value(sym); + symval = sym_get_string_value(sym); + } + + newlen = strlen(res) + strlen(symval) + strlen(src) + 1; + if (newlen > reslen) { + reslen = newlen; + res = realloc(res, reslen); + } + + strcat(res, symval); + in = src; + } + strcat(res, in); + + return res; +} + +const char *sym_escape_string_value(const char *in) +{ + const char *p; + size_t reslen; + char *res; + size_t l; + + reslen = strlen(in) + strlen("\"\"") + 1; + + p = in; + for (;;) { + l = strcspn(p, "\"\\"); + p += l; + + if (p[0] == '\0') + break; + + reslen++; + p++; + } + + res = xmalloc(reslen); + res[0] = '\0'; + + strcat(res, "\""); + + p = in; + for (;;) { + l = strcspn(p, "\"\\"); + strncat(res, p, l); + p += l; + + if (p[0] == '\0') + break; + + strcat(res, "\\"); + strncat(res, p++, 1); + } + + strcat(res, "\""); + return res; +} + +struct sym_match { + struct symbol *sym; + off_t so, eo; +}; + +/* Compare matched symbols as thus: + * - first, symbols that match exactly + * - then, alphabetical sort + */ +static int sym_rel_comp(const void *sym1, const void *sym2) +{ + const struct sym_match *s1 = sym1; + const struct sym_match *s2 = sym2; + int exact1, exact2; + + /* Exact match: + * - if matched length on symbol s1 is the length of that symbol, + * then this symbol should come first; + * - if matched length on symbol s2 is the length of that symbol, + * then this symbol should come first. + * Note: since the search can be a regexp, both symbols may match + * exactly; if this is the case, we can't decide which comes first, + * and we fallback to sorting alphabetically. + */ + exact1 = (s1->eo - s1->so) == strlen(s1->sym->name); + exact2 = (s2->eo - s2->so) == strlen(s2->sym->name); + if (exact1 && !exact2) + return -1; + if (!exact1 && exact2) + return 1; + + /* As a fallback, sort symbols alphabetically */ + return strcmp(s1->sym->name, s2->sym->name); +} + +struct symbol **sym_re_search(const char *pattern) +{ + struct symbol *sym, **sym_arr = NULL; + struct sym_match *sym_match_arr = NULL; + int i, cnt, size; + regex_t re; + regmatch_t match[1]; + + cnt = size = 0; + /* Skip if empty */ + if (strlen(pattern) == 0) + return NULL; + if (regcomp(&re, pattern, REG_EXTENDED|REG_ICASE)) + return NULL; + + for_all_symbols(i, sym) { + if (sym->flags & SYMBOL_CONST || !sym->name) + continue; + if (regexec(&re, sym->name, 1, match, 0)) + continue; + if (cnt >= size) { + void *tmp; + size += 16; + tmp = realloc(sym_match_arr, size * sizeof(struct sym_match)); + if (!tmp) + goto sym_re_search_free; + sym_match_arr = tmp; + } + sym_calc_value(sym); + /* As regexec returned 0, we know we have a match, so + * we can use match[0].rm_[se]o without further checks + */ + sym_match_arr[cnt].so = match[0].rm_so; + sym_match_arr[cnt].eo = match[0].rm_eo; + sym_match_arr[cnt++].sym = sym; + } + if (sym_match_arr) { + qsort(sym_match_arr, cnt, sizeof(struct sym_match), sym_rel_comp); + sym_arr = malloc((cnt+1) * sizeof(struct symbol)); + if (!sym_arr) + goto sym_re_search_free; + for (i = 0; i < cnt; i++) + sym_arr[i] = sym_match_arr[i].sym; + sym_arr[cnt] = NULL; + } +sym_re_search_free: + /* sym_match_arr can be NULL if no match, but free(NULL) is OK */ + free(sym_match_arr); + regfree(&re); + + return sym_arr; +} + +/* + * When we check for recursive dependencies we use a stack to save + * current state so we can print out relevant info to user. + * The entries are located on the call stack so no need to free memory. + * Note insert() remove() must always match to properly clear the stack. + */ +static struct dep_stack { + struct dep_stack *prev, *next; + struct symbol *sym; + struct property *prop; + struct expr *expr; +} *check_top; + +static void dep_stack_insert(struct dep_stack *stack, struct symbol *sym) +{ + memset(stack, 0, sizeof(*stack)); + if (check_top) + check_top->next = stack; + stack->prev = check_top; + stack->sym = sym; + check_top = stack; +} + +static void dep_stack_remove(void) +{ + check_top = check_top->prev; + if (check_top) + check_top->next = NULL; +} + +/* + * Called when we have detected a recursive dependency. + * check_top point to the top of the stact so we use + * the ->prev pointer to locate the bottom of the stack. + */ +static void sym_check_print_recursive(struct symbol *last_sym) +{ + struct dep_stack *stack; + struct symbol *sym, *next_sym; + struct menu *menu = NULL; + struct property *prop; + struct dep_stack cv_stack; + + if (sym_is_choice_value(last_sym)) { + dep_stack_insert(&cv_stack, last_sym); + last_sym = prop_get_symbol(sym_get_choice_prop(last_sym)); + } + + for (stack = check_top; stack != NULL; stack = stack->prev) + if (stack->sym == last_sym) + break; + if (!stack) { + fprintf(stderr, "unexpected recursive dependency error\n"); + return; + } + + for (; stack; stack = stack->next) { + sym = stack->sym; + next_sym = stack->next ? stack->next->sym : last_sym; + prop = stack->prop; + if (prop == NULL) + prop = stack->sym->prop; + + /* for choice values find the menu entry (used below) */ + if (sym_is_choice(sym) || sym_is_choice_value(sym)) { + for (prop = sym->prop; prop; prop = prop->next) { + menu = prop->menu; + if (prop->menu) + break; + } + } + if (stack->sym == last_sym) + fprintf(stderr, "%s:%d:error: recursive dependency detected!\n", + prop->file->name, prop->lineno); + if (stack->expr) { + fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n", + prop->file->name, prop->lineno, + sym->name ? sym->name : "", + prop_get_type_name(prop->type), + next_sym->name ? next_sym->name : ""); + } else if (stack->prop) { + fprintf(stderr, "%s:%d:\tsymbol %s depends on %s\n", + prop->file->name, prop->lineno, + sym->name ? sym->name : "", + next_sym->name ? next_sym->name : ""); + } else if (sym_is_choice(sym)) { + fprintf(stderr, "%s:%d:\tchoice %s contains symbol %s\n", + menu->file->name, menu->lineno, + sym->name ? sym->name : "", + next_sym->name ? next_sym->name : ""); + } else if (sym_is_choice_value(sym)) { + fprintf(stderr, "%s:%d:\tsymbol %s is part of choice %s\n", + menu->file->name, menu->lineno, + sym->name ? sym->name : "", + next_sym->name ? next_sym->name : ""); + } else { + fprintf(stderr, "%s:%d:\tsymbol %s is selected by %s\n", + prop->file->name, prop->lineno, + sym->name ? sym->name : "", + next_sym->name ? next_sym->name : ""); + } + } + + if (check_top == &cv_stack) + dep_stack_remove(); +} + +static struct symbol *sym_check_expr_deps(struct expr *e) +{ + struct symbol *sym; + + if (!e) + return NULL; + switch (e->type) { + case E_OR: + case E_AND: + sym = sym_check_expr_deps(e->left.expr); + if (sym) + return sym; + return sym_check_expr_deps(e->right.expr); + case E_NOT: + return sym_check_expr_deps(e->left.expr); + case E_EQUAL: + case E_UNEQUAL: + sym = sym_check_deps(e->left.sym); + if (sym) + return sym; + return sym_check_deps(e->right.sym); + case E_SYMBOL: + return sym_check_deps(e->left.sym); + default: + break; + } + printf("Oops! How to check %d?\n", e->type); + return NULL; +} + +/* return NULL when dependencies are OK */ +static struct symbol *sym_check_sym_deps(struct symbol *sym) +{ + struct symbol *sym2; + struct property *prop; + struct dep_stack stack; + + dep_stack_insert(&stack, sym); + + sym2 = sym_check_expr_deps(sym->rev_dep.expr); + if (sym2) + goto out; + + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->type == P_CHOICE || prop->type == P_SELECT) + continue; + stack.prop = prop; + sym2 = sym_check_expr_deps(prop->visible.expr); + if (sym2) + break; + if (prop->type != P_DEFAULT || sym_is_choice(sym)) + continue; + stack.expr = prop->expr; + sym2 = sym_check_expr_deps(prop->expr); + if (sym2) + break; + stack.expr = NULL; + } + +out: + dep_stack_remove(); + + return sym2; +} + +static struct symbol *sym_check_choice_deps(struct symbol *choice) +{ + struct symbol *sym, *sym2; + struct property *prop; + struct expr *e; + struct dep_stack stack; + + dep_stack_insert(&stack, choice); + + prop = sym_get_choice_prop(choice); + expr_list_for_each_sym(prop->expr, e, sym) + sym->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); + + choice->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); + sym2 = sym_check_sym_deps(choice); + choice->flags &= ~SYMBOL_CHECK; + if (sym2) + goto out; + + expr_list_for_each_sym(prop->expr, e, sym) { + sym2 = sym_check_sym_deps(sym); + if (sym2) + break; + } +out: + expr_list_for_each_sym(prop->expr, e, sym) + sym->flags &= ~SYMBOL_CHECK; + + if (sym2 && sym_is_choice_value(sym2) && + prop_get_symbol(sym_get_choice_prop(sym2)) == choice) + sym2 = choice; + + dep_stack_remove(); + + return sym2; +} + +struct symbol *sym_check_deps(struct symbol *sym) +{ + struct symbol *sym2; + struct property *prop; + + if (sym->flags & SYMBOL_CHECK) { + sym_check_print_recursive(sym); + return sym; + } + if (sym->flags & SYMBOL_CHECKED) + return NULL; + + if (sym_is_choice_value(sym)) { + struct dep_stack stack; + + /* for choice groups start the check with main choice symbol */ + dep_stack_insert(&stack, sym); + prop = sym_get_choice_prop(sym); + sym2 = sym_check_deps(prop_get_symbol(prop)); + dep_stack_remove(); + } else if (sym_is_choice(sym)) { + sym2 = sym_check_choice_deps(sym); + } else { + sym->flags |= (SYMBOL_CHECK | SYMBOL_CHECKED); + sym2 = sym_check_sym_deps(sym); + sym->flags &= ~SYMBOL_CHECK; + } + + if (sym2 && sym2 == sym) + sym2 = NULL; + + return sym2; +} + +struct property *prop_alloc(enum prop_type type, struct symbol *sym) +{ + struct property *prop; + struct property **propp; + + prop = xmalloc(sizeof(*prop)); + memset(prop, 0, sizeof(*prop)); + prop->type = type; + prop->sym = sym; + prop->file = current_file; + prop->lineno = zconf_lineno(); + + /* append property to the prop list of symbol */ + if (sym) { + for (propp = &sym->prop; *propp; propp = &(*propp)->next) + ; + *propp = prop; + } + + return prop; +} + +struct symbol *prop_get_symbol(struct property *prop) +{ + if (prop->expr && (prop->expr->type == E_SYMBOL || + prop->expr->type == E_LIST)) + return prop->expr->left.sym; + return NULL; +} + +const char *prop_get_type_name(enum prop_type type) +{ + switch (type) { + case P_PROMPT: + return "prompt"; + case P_ENV: + return "env"; + case P_COMMENT: + return "comment"; + case P_MENU: + return "menu"; + case P_DEFAULT: + return "default"; + case P_CHOICE: + return "choice"; + case P_SELECT: + return "select"; + case P_RANGE: + return "range"; + case P_SYMBOL: + return "symbol"; + case P_UNKNOWN: + break; + } + return "unknown"; +} + +static void prop_add_env(const char *env) +{ + struct symbol *sym, *sym2; + struct property *prop; + char *p; + + sym = current_entry->sym; + sym->flags |= SYMBOL_AUTO; + for_all_properties(sym, prop, P_ENV) { + sym2 = prop_get_symbol(prop); + if (strcmp(sym2->name, env)) + menu_warn(current_entry, "redefining environment symbol from %s", + sym2->name); + return; + } + + prop = prop_alloc(P_ENV, sym); + prop->expr = expr_alloc_symbol(sym_lookup(env, SYMBOL_CONST)); + + sym_env_list = expr_alloc_one(E_LIST, sym_env_list); + sym_env_list->right.sym = sym; + + p = getenv(env); + if (p) + sym_add_default(sym, p); + else + menu_warn(current_entry, "environment variable %s undefined", env); +} diff --git a/support/kconfig/util.c b/support/kconfig/util.c new file mode 100644 index 0000000000..60eb566180 --- /dev/null +++ b/support/kconfig/util.c @@ -0,0 +1,171 @@ +/* + * Copyright (C) 2002-2005 Roman Zippel + * Copyright (C) 2002-2005 Sam Ravnborg + * + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include "lkc.h" + +/* file already present in list? If not add it */ +struct file *file_lookup(const char *name) +{ + struct file *file; + const char *file_name = sym_expand_string_value(name); + + for (file = file_list; file; file = file->next) { + if (!strcmp(name, file->name)) { + free((void *)file_name); + return file; + } + } + + file = xmalloc(sizeof(*file)); + memset(file, 0, sizeof(*file)); + file->name = file_name; + file->next = file_list; + file_list = file; + return file; +} + +/* write a dependency file as used by kbuild to track dependencies */ +int file_write_dep(const char *name) +{ + char *str; + char buf[PATH_MAX+1], buf2[PATH_MAX+1], dir[PATH_MAX+1]; + struct symbol *sym, *env_sym; + struct expr *e; + struct file *file; + FILE *out; + + if (!name) + name = ".kconfig.d"; + + strcpy(dir, conf_get_configname()); + str = strrchr(dir, '/'); + if (str) + str[1] = 0; + else + dir[0] = 0; + + sprintf(buf, "%s..config.tmp", dir); + out = fopen(buf, "w"); + if (!out) + return 1; + fprintf(out, "deps_config := \\\n"); + for (file = file_list; file; file = file->next) { + if (file->next) + fprintf(out, "\t%s \\\n", file->name); + else + fprintf(out, "\t%s\n", file->name); + } + fprintf(out, "\n%s: \\\n" + "\t$(deps_config)\n\n", conf_get_autoconfig_name()); + + expr_list_for_each_sym(sym_env_list, e, sym) { + struct property *prop; + const char *value; + + prop = sym_get_env_prop(sym); + env_sym = prop_get_symbol(prop); + if (!env_sym) + continue; + value = getenv(env_sym->name); + if (!value) + value = ""; + fprintf(out, "ifneq \"$(%s)\" \"%s\"\n", env_sym->name, value); + fprintf(out, "%s: FORCE\n", conf_get_autoconfig_name()); + fprintf(out, "endif\n"); + } + + fprintf(out, "\n$(deps_config): ;\n"); + fclose(out); + sprintf(buf2, "%s%s", dir, name); + rename(buf, buf2); + return 0; +} + + +/* Allocate initial growable string */ +struct gstr str_new(void) +{ + struct gstr gs; + gs.s = xmalloc(sizeof(char) * 64); + gs.len = 64; + gs.max_width = 0; + strcpy(gs.s, "\0"); + return gs; +} + +/* Allocate and assign growable string */ +struct gstr str_assign(const char *s) +{ + struct gstr gs; + gs.s = strdup(s); + gs.len = strlen(s) + 1; + gs.max_width = 0; + return gs; +} + +/* Free storage for growable string */ +void str_free(struct gstr *gs) +{ + if (gs->s) + free(gs->s); + gs->s = NULL; + gs->len = 0; +} + +/* Append to growable string */ +void str_append(struct gstr *gs, const char *s) +{ + size_t l; + if (s) { + l = strlen(gs->s) + strlen(s) + 1; + if (l > gs->len) { + gs->s = realloc(gs->s, l); + gs->len = l; + } + strcat(gs->s, s); + } +} + +/* Append printf formatted string to growable string */ +void str_printf(struct gstr *gs, const char *fmt, ...) +{ + va_list ap; + char s[10000]; /* big enough... */ + va_start(ap, fmt); + vsnprintf(s, sizeof(s), fmt, ap); + str_append(gs, s); + va_end(ap); +} + +/* Retrieve value of growable string */ +const char *str_get(struct gstr *gs) +{ + return gs->s; +} + +void *xmalloc(size_t size) +{ + void *p = malloc(size); + if (p) + return p; + fprintf(stderr, "Out of memory.\n"); + exit(1); +} + +void *xcalloc(size_t nmemb, size_t size) +{ + void *p = calloc(nmemb, size); + if (p) + return p; + fprintf(stderr, "Out of memory.\n"); + exit(1); +} + + diff --git a/support/kconfig/zconf.gperf b/support/kconfig/zconf.gperf new file mode 100644 index 0000000000..f14ab41154 --- /dev/null +++ b/support/kconfig/zconf.gperf @@ -0,0 +1,47 @@ +%language=ANSI-C +%define hash-function-name kconf_id_hash +%define lookup-function-name kconf_id_lookup +%define string-pool-name kconf_id_strings +%compare-strncmp +%enum +%pic +%struct-type + +struct kconf_id; + +static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); + +%% +mainmenu, T_MAINMENU, TF_COMMAND +menu, T_MENU, TF_COMMAND +endmenu, T_ENDMENU, TF_COMMAND +source, T_SOURCE, TF_COMMAND +choice, T_CHOICE, TF_COMMAND +endchoice, T_ENDCHOICE, TF_COMMAND +comment, T_COMMENT, TF_COMMAND +config, T_CONFIG, TF_COMMAND +menuconfig, T_MENUCONFIG, TF_COMMAND +help, T_HELP, TF_COMMAND +if, T_IF, TF_COMMAND|TF_PARAM +endif, T_ENDIF, TF_COMMAND +depends, T_DEPENDS, TF_COMMAND +optional, T_OPTIONAL, TF_COMMAND +default, T_DEFAULT, TF_COMMAND, S_UNKNOWN +prompt, T_PROMPT, TF_COMMAND +tristate, T_TYPE, TF_COMMAND, S_TRISTATE +def_tristate, T_DEFAULT, TF_COMMAND, S_TRISTATE +bool, T_TYPE, TF_COMMAND, S_BOOLEAN +boolean, T_TYPE, TF_COMMAND, S_BOOLEAN +def_bool, T_DEFAULT, TF_COMMAND, S_BOOLEAN +int, T_TYPE, TF_COMMAND, S_INT +hex, T_TYPE, TF_COMMAND, S_HEX +string, T_TYPE, TF_COMMAND, S_STRING +select, T_SELECT, TF_COMMAND +range, T_RANGE, TF_COMMAND +visible, T_VISIBLE, TF_COMMAND +option, T_OPTION, TF_COMMAND +on, T_ON, TF_PARAM +modules, T_OPT_MODULES, TF_OPTION +defconfig_list, T_OPT_DEFCONFIG_LIST,TF_OPTION +env, T_OPT_ENV, TF_OPTION +%% diff --git a/support/kconfig/zconf.hash.c_shipped b/support/kconfig/zconf.hash.c_shipped new file mode 100644 index 0000000000..40df0005da --- /dev/null +++ b/support/kconfig/zconf.hash.c_shipped @@ -0,0 +1,286 @@ +/* ANSI-C code produced by gperf version 3.0.4 */ +/* Command-line: gperf -t --output-file scripts/kconfig/zconf.hash.c_shipped -a -C -E -g -k '1,3,$' -p -t scripts/kconfig/zconf.gperf */ + +#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ + && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ + && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ + && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ + && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ + && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ + && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ + && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ + && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ + && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ + && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ + && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ + && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ + && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ + && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ + && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ + && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ + && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ + && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ + && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ + && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ + && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ + && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)) +/* The character set is not based on ISO-646. */ +#error "gperf generated tables don't work with this execution character set. Please report a bug to ." +#endif + +#line 10 "scripts/kconfig/zconf.gperf" +struct kconf_id; + +static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len); +/* maximum key range = 71, duplicates = 0 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +kconf_id_hash (register const char *str, register unsigned int len) +{ + static const unsigned char asso_values[] = + { + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 25, 25, + 0, 0, 0, 5, 0, 0, 73, 73, 5, 0, + 10, 5, 45, 73, 20, 20, 0, 15, 15, 73, + 20, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, + 73, 73, 73, 73, 73, 73 + }; + register int hval = len; + + switch (hval) + { + default: + hval += asso_values[(unsigned char)str[2]]; + /*FALLTHROUGH*/ + case 2: + case 1: + hval += asso_values[(unsigned char)str[0]]; + break; + } + return hval + asso_values[(unsigned char)str[len - 1]]; +} + +struct kconf_id_strings_t + { + char kconf_id_strings_str2[sizeof("if")]; + char kconf_id_strings_str3[sizeof("int")]; + char kconf_id_strings_str5[sizeof("endif")]; + char kconf_id_strings_str7[sizeof("default")]; + char kconf_id_strings_str8[sizeof("tristate")]; + char kconf_id_strings_str9[sizeof("endchoice")]; + char kconf_id_strings_str12[sizeof("def_tristate")]; + char kconf_id_strings_str13[sizeof("def_bool")]; + char kconf_id_strings_str14[sizeof("defconfig_list")]; + char kconf_id_strings_str17[sizeof("on")]; + char kconf_id_strings_str18[sizeof("optional")]; + char kconf_id_strings_str21[sizeof("option")]; + char kconf_id_strings_str22[sizeof("endmenu")]; + char kconf_id_strings_str23[sizeof("mainmenu")]; + char kconf_id_strings_str25[sizeof("menuconfig")]; + char kconf_id_strings_str27[sizeof("modules")]; + char kconf_id_strings_str29[sizeof("menu")]; + char kconf_id_strings_str31[sizeof("select")]; + char kconf_id_strings_str32[sizeof("comment")]; + char kconf_id_strings_str33[sizeof("env")]; + char kconf_id_strings_str35[sizeof("range")]; + char kconf_id_strings_str36[sizeof("choice")]; + char kconf_id_strings_str39[sizeof("bool")]; + char kconf_id_strings_str41[sizeof("source")]; + char kconf_id_strings_str42[sizeof("visible")]; + char kconf_id_strings_str43[sizeof("hex")]; + char kconf_id_strings_str46[sizeof("config")]; + char kconf_id_strings_str47[sizeof("boolean")]; + char kconf_id_strings_str51[sizeof("string")]; + char kconf_id_strings_str54[sizeof("help")]; + char kconf_id_strings_str56[sizeof("prompt")]; + char kconf_id_strings_str72[sizeof("depends")]; + }; +static const struct kconf_id_strings_t kconf_id_strings_contents = + { + "if", + "int", + "endif", + "default", + "tristate", + "endchoice", + "def_tristate", + "def_bool", + "defconfig_list", + "on", + "optional", + "option", + "endmenu", + "mainmenu", + "menuconfig", + "modules", + "menu", + "select", + "comment", + "env", + "range", + "choice", + "bool", + "source", + "visible", + "hex", + "config", + "boolean", + "string", + "help", + "prompt", + "depends" + }; +#define kconf_id_strings ((const char *) &kconf_id_strings_contents) +#ifdef __GNUC__ +__inline +#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__ +__attribute__ ((__gnu_inline__)) +#endif +#endif +const struct kconf_id * +kconf_id_lookup (register const char *str, register unsigned int len) +{ + enum + { + TOTAL_KEYWORDS = 32, + MIN_WORD_LENGTH = 2, + MAX_WORD_LENGTH = 14, + MIN_HASH_VALUE = 2, + MAX_HASH_VALUE = 72 + }; + + static const struct kconf_id wordlist[] = + { + {-1}, {-1}, +#line 25 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str2, T_IF, TF_COMMAND|TF_PARAM}, +#line 36 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str3, T_TYPE, TF_COMMAND, S_INT}, + {-1}, +#line 26 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str5, T_ENDIF, TF_COMMAND}, + {-1}, +#line 29 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str7, T_DEFAULT, TF_COMMAND, S_UNKNOWN}, +#line 31 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str8, T_TYPE, TF_COMMAND, S_TRISTATE}, +#line 20 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str9, T_ENDCHOICE, TF_COMMAND}, + {-1}, {-1}, +#line 32 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str12, T_DEFAULT, TF_COMMAND, S_TRISTATE}, +#line 35 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str13, T_DEFAULT, TF_COMMAND, S_BOOLEAN}, +#line 45 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str14, T_OPT_DEFCONFIG_LIST,TF_OPTION}, + {-1}, {-1}, +#line 43 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str17, T_ON, TF_PARAM}, +#line 28 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str18, T_OPTIONAL, TF_COMMAND}, + {-1}, {-1}, +#line 42 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str21, T_OPTION, TF_COMMAND}, +#line 17 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str22, T_ENDMENU, TF_COMMAND}, +#line 15 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str23, T_MAINMENU, TF_COMMAND}, + {-1}, +#line 23 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str25, T_MENUCONFIG, TF_COMMAND}, + {-1}, +#line 44 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str27, T_OPT_MODULES, TF_OPTION}, + {-1}, +#line 16 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str29, T_MENU, TF_COMMAND}, + {-1}, +#line 39 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str31, T_SELECT, TF_COMMAND}, +#line 21 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str32, T_COMMENT, TF_COMMAND}, +#line 46 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str33, T_OPT_ENV, TF_OPTION}, + {-1}, +#line 40 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str35, T_RANGE, TF_COMMAND}, +#line 19 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str36, T_CHOICE, TF_COMMAND}, + {-1}, {-1}, +#line 33 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str39, T_TYPE, TF_COMMAND, S_BOOLEAN}, + {-1}, +#line 18 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str41, T_SOURCE, TF_COMMAND}, +#line 41 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str42, T_VISIBLE, TF_COMMAND}, +#line 37 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str43, T_TYPE, TF_COMMAND, S_HEX}, + {-1}, {-1}, +#line 22 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str46, T_CONFIG, TF_COMMAND}, +#line 34 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str47, T_TYPE, TF_COMMAND, S_BOOLEAN}, + {-1}, {-1}, {-1}, +#line 38 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str51, T_TYPE, TF_COMMAND, S_STRING}, + {-1}, {-1}, +#line 24 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str54, T_HELP, TF_COMMAND}, + {-1}, +#line 30 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str56, T_PROMPT, TF_COMMAND}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, + {-1}, {-1}, {-1}, {-1}, {-1}, {-1}, +#line 27 "scripts/kconfig/zconf.gperf" + {(int)(long)&((struct kconf_id_strings_t *)0)->kconf_id_strings_str72, T_DEPENDS, TF_COMMAND} + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register int key = kconf_id_hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= 0) + { + register int o = wordlist[key].name; + if (o >= 0) + { + register const char *s = o + kconf_id_strings; + + if (*str == *s && !strncmp (str + 1, s + 1, len - 1) && s[len] == '\0') + return &wordlist[key]; + } + } + } + return 0; +} +#line 47 "scripts/kconfig/zconf.gperf" + diff --git a/support/kconfig/zconf.l b/support/kconfig/zconf.l new file mode 100644 index 0000000000..1a9f53e535 --- /dev/null +++ b/support/kconfig/zconf.l @@ -0,0 +1,363 @@ +%option nostdinit noyywrap never-interactive full ecs +%option 8bit nodefault perf-report perf-report +%option noinput +%x COMMAND HELP STRING PARAM +%{ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include + +#include "lkc.h" + +#define START_STRSIZE 16 + +static struct { + struct file *file; + int lineno; +} current_pos; + +static char *text; +static int text_size, text_asize; + +struct buffer { + struct buffer *parent; + YY_BUFFER_STATE state; +}; + +struct buffer *current_buf; + +static int last_ts, first_ts; + +static void zconf_endhelp(void); +static void zconf_endfile(void); + +static void new_string(void) +{ + text = xmalloc(START_STRSIZE); + text_asize = START_STRSIZE; + text_size = 0; + *text = 0; +} + +static void append_string(const char *str, int size) +{ + int new_size = text_size + size + 1; + if (new_size > text_asize) { + new_size += START_STRSIZE - 1; + new_size &= -START_STRSIZE; + text = realloc(text, new_size); + text_asize = new_size; + } + memcpy(text + text_size, str, size); + text_size += size; + text[text_size] = 0; +} + +static void alloc_string(const char *str, int size) +{ + text = xmalloc(size + 1); + memcpy(text, str, size); + text[size] = 0; +} +%} + +n [A-Za-z0-9_] + +%% + int str = 0; + int ts, i; + +[ \t]*#.*\n | +[ \t]*\n { + current_file->lineno++; + return T_EOL; +} +[ \t]*#.* + + +[ \t]+ { + BEGIN(COMMAND); +} + +. { + unput(yytext[0]); + BEGIN(COMMAND); +} + + +{ + {n}+ { + const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); + BEGIN(PARAM); + current_pos.file = current_file; + current_pos.lineno = current_file->lineno; + if (id && id->flags & TF_COMMAND) { + zconflval.id = id; + return id->token; + } + alloc_string(yytext, yyleng); + zconflval.string = text; + return T_WORD; + } + . + \n { + BEGIN(INITIAL); + current_file->lineno++; + return T_EOL; + } +} + +{ + "&&" return T_AND; + "||" return T_OR; + "(" return T_OPEN_PAREN; + ")" return T_CLOSE_PAREN; + "!" return T_NOT; + "=" return T_EQUAL; + "!=" return T_UNEQUAL; + \"|\' { + str = yytext[0]; + new_string(); + BEGIN(STRING); + } + \n BEGIN(INITIAL); current_file->lineno++; return T_EOL; + --- /* ignore */ + ({n}|[-/.])+ { + const struct kconf_id *id = kconf_id_lookup(yytext, yyleng); + if (id && id->flags & TF_PARAM) { + zconflval.id = id; + return id->token; + } + alloc_string(yytext, yyleng); + zconflval.string = text; + return T_WORD; + } + #.* /* comment */ + \\\n current_file->lineno++; + . + <> { + BEGIN(INITIAL); + } +} + +{ + [^'"\\\n]+/\n { + append_string(yytext, yyleng); + zconflval.string = text; + return T_WORD_QUOTE; + } + [^'"\\\n]+ { + append_string(yytext, yyleng); + } + \\.?/\n { + append_string(yytext + 1, yyleng - 1); + zconflval.string = text; + return T_WORD_QUOTE; + } + \\.? { + append_string(yytext + 1, yyleng - 1); + } + \'|\" { + if (str == yytext[0]) { + BEGIN(PARAM); + zconflval.string = text; + return T_WORD_QUOTE; + } else + append_string(yytext, 1); + } + \n { + printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); + current_file->lineno++; + BEGIN(INITIAL); + return T_EOL; + } + <> { + BEGIN(INITIAL); + } +} + +{ + [ \t]+ { + ts = 0; + for (i = 0; i < yyleng; i++) { + if (yytext[i] == '\t') + ts = (ts & ~7) + 8; + else + ts++; + } + last_ts = ts; + if (first_ts) { + if (ts < first_ts) { + zconf_endhelp(); + return T_HELPTEXT; + } + ts -= first_ts; + while (ts > 8) { + append_string(" ", 8); + ts -= 8; + } + append_string(" ", ts); + } + } + [ \t]*\n/[^ \t\n] { + current_file->lineno++; + zconf_endhelp(); + return T_HELPTEXT; + } + [ \t]*\n { + current_file->lineno++; + append_string("\n", 1); + } + [^ \t\n].* { + while (yyleng) { + if ((yytext[yyleng-1] != ' ') && (yytext[yyleng-1] != '\t')) + break; + yyleng--; + } + append_string(yytext, yyleng); + if (!first_ts) + first_ts = last_ts; + } + <> { + zconf_endhelp(); + return T_HELPTEXT; + } +} + +<> { + if (current_file) { + zconf_endfile(); + return T_EOL; + } + fclose(yyin); + yyterminate(); +} + +%% +void zconf_starthelp(void) +{ + new_string(); + last_ts = first_ts = 0; + BEGIN(HELP); +} + +static void zconf_endhelp(void) +{ + zconflval.string = text; + BEGIN(INITIAL); +} + + +/* + * Try to open specified file with following names: + * ./name + * $(srctree)/name + * The latter is used when srctree is separate from objtree + * when compiling the kernel. + * Return NULL if file is not found. + */ +FILE *zconf_fopen(const char *name) +{ + char *env, fullname[PATH_MAX+1]; + FILE *f; + + f = fopen(name, "r"); + if (!f && name != NULL && name[0] != '/') { + env = getenv(SRCTREE); + if (env) { + sprintf(fullname, "%s/%s", env, name); + f = fopen(fullname, "r"); + } + } + return f; +} + +void zconf_initscan(const char *name) +{ + yyin = zconf_fopen(name); + if (!yyin) { + printf("can't find file %s\n", name); + exit(1); + } + + current_buf = xmalloc(sizeof(*current_buf)); + memset(current_buf, 0, sizeof(*current_buf)); + + current_file = file_lookup(name); + current_file->lineno = 1; +} + +void zconf_nextfile(const char *name) +{ + struct file *iter; + struct file *file = file_lookup(name); + struct buffer *buf = xmalloc(sizeof(*buf)); + memset(buf, 0, sizeof(*buf)); + + current_buf->state = YY_CURRENT_BUFFER; + yyin = zconf_fopen(file->name); + if (!yyin) { + printf("%s:%d: can't open file \"%s\"\n", + zconf_curname(), zconf_lineno(), file->name); + exit(1); + } + yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE)); + buf->parent = current_buf; + current_buf = buf; + + for (iter = current_file->parent; iter; iter = iter->parent ) { + if (!strcmp(current_file->name,iter->name) ) { + printf("%s:%d: recursive inclusion detected. " + "Inclusion path:\n current file : '%s'\n", + zconf_curname(), zconf_lineno(), + zconf_curname()); + iter = current_file->parent; + while (iter && \ + strcmp(iter->name,current_file->name)) { + printf(" included from: '%s:%d'\n", + iter->name, iter->lineno-1); + iter = iter->parent; + } + if (iter) + printf(" included from: '%s:%d'\n", + iter->name, iter->lineno+1); + exit(1); + } + } + file->lineno = 1; + file->parent = current_file; + current_file = file; +} + +static void zconf_endfile(void) +{ + struct buffer *parent; + + current_file = current_file->parent; + + parent = current_buf->parent; + if (parent) { + fclose(yyin); + yy_delete_buffer(YY_CURRENT_BUFFER); + yy_switch_to_buffer(parent->state); + } + free(current_buf); + current_buf = parent; +} + +int zconf_lineno(void) +{ + return current_pos.lineno; +} + +const char *zconf_curname(void) +{ + return current_pos.file ? current_pos.file->name : ""; +} diff --git a/support/kconfig/zconf.lex.c_shipped b/support/kconfig/zconf.lex.c_shipped new file mode 100644 index 0000000000..a0521aa597 --- /dev/null +++ b/support/kconfig/zconf.lex.c_shipped @@ -0,0 +1,2420 @@ + +#line 3 "scripts/kconfig/zconf.lex.c_shipped" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ + +#define yy_create_buffer zconf_create_buffer +#define yy_delete_buffer zconf_delete_buffer +#define yy_flex_debug zconf_flex_debug +#define yy_init_buffer zconf_init_buffer +#define yy_flush_buffer zconf_flush_buffer +#define yy_load_buffer_state zconf_load_buffer_state +#define yy_switch_to_buffer zconf_switch_to_buffer +#define yyin zconfin +#define yyleng zconfleng +#define yylex zconflex +#define yylineno zconflineno +#define yyout zconfout +#define yyrestart zconfrestart +#define yytext zconftext +#define yywrap zconfwrap +#define yyalloc zconfalloc +#define yyrealloc zconfrealloc +#define yyfree zconffree + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ + +/* begin standard C headers. */ +#include +#include +#include +#include + +/* end standard C headers. */ + +/* flex integer type definitions */ + +#ifndef FLEXINT_H +#define FLEXINT_H + +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 +#endif + +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) + +#define YY_USE_CONST + +#endif /* defined (__STDC__) */ +#endif /* ! __cplusplus */ + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN (yy_start) = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START (((yy_start) - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE zconfrestart(zconfin ) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#ifndef YY_BUF_SIZE +#define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) + +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE +typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif + +extern int zconfleng; + +extern FILE *zconfin, *zconfout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up zconftext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ + YY_RESTORE_YY_MORE_OFFSET \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up zconftext again */ \ + } \ + while ( 0 ) + +#define unput(c) yyunput( c, (yytext_ptr) ) + +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE +struct yy_buffer_state + { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; + +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 + /* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via zconfrestart()), so that the user can continue scanning by + * just pointing zconfin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 + + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ + +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + * + * Returns the top of the stack, or NULL. + */ +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) + +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] + +/* yy_hold_char holds the character lost when zconftext is formed. */ +static char yy_hold_char; +static int yy_n_chars; /* number of characters read into yy_ch_buf */ +int zconfleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *) 0; +static int yy_init = 0; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow zconfwrap()'s to do buffer switches + * instead of setting up a fresh zconfin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void zconfrestart (FILE *input_file ); +void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE zconf_create_buffer (FILE *file,int size ); +void zconf_delete_buffer (YY_BUFFER_STATE b ); +void zconf_flush_buffer (YY_BUFFER_STATE b ); +void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ); +void zconfpop_buffer_state (void ); + +static void zconfensure_buffer_stack (void ); +static void zconf_load_buffer_state (void ); +static void zconf_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER zconf_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE zconf_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE zconf_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE zconf_scan_bytes (yyconst char *bytes,int len ); + +void *zconfalloc (yy_size_t ); +void *zconfrealloc (void *,yy_size_t ); +void zconffree (void * ); + +#define yy_new_buffer zconf_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if ( ! YY_CURRENT_BUFFER ){ \ + zconfensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if ( ! YY_CURRENT_BUFFER ){\ + zconfensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + zconf_create_buffer(zconfin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ + +#define zconfwrap(n) 1 +#define YY_SKIP_YYWRAP + +typedef unsigned char YY_CHAR; + +FILE *zconfin = (FILE *) 0, *zconfout = (FILE *) 0; + +typedef int yy_state_type; + +extern int zconflineno; + +int zconflineno = 1; + +extern char *zconftext; +#define yytext_ptr zconftext +static yyconst flex_int16_t yy_nxt[][17] = + { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0 + }, + + { + 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12 + }, + + { + 11, 12, 13, 14, 12, 12, 15, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12 + }, + + { + 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 18, 16, 16, 16 + }, + + { + 11, 16, 16, 17, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 18, 16, 16, 16 + + }, + + { + 11, 19, 20, 21, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19 + }, + + { + 11, 19, 20, 21, 19, 19, 19, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19 + }, + + { + 11, 22, 22, 23, 22, 24, 22, 22, 24, 22, + 22, 22, 22, 22, 22, 25, 22 + }, + + { + 11, 22, 22, 23, 22, 24, 22, 22, 24, 22, + 22, 22, 22, 22, 22, 25, 22 + }, + + { + 11, 26, 26, 27, 28, 29, 30, 31, 29, 32, + 33, 34, 35, 35, 36, 37, 38 + + }, + + { + 11, 26, 26, 27, 28, 29, 30, 31, 29, 32, + 33, 34, 35, 35, 36, 37, 38 + }, + + { + -11, -11, -11, -11, -11, -11, -11, -11, -11, -11, + -11, -11, -11, -11, -11, -11, -11 + }, + + { + 11, -12, -12, -12, -12, -12, -12, -12, -12, -12, + -12, -12, -12, -12, -12, -12, -12 + }, + + { + 11, -13, 39, 40, -13, -13, 41, -13, -13, -13, + -13, -13, -13, -13, -13, -13, -13 + }, + + { + 11, -14, -14, -14, -14, -14, -14, -14, -14, -14, + -14, -14, -14, -14, -14, -14, -14 + + }, + + { + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42 + }, + + { + 11, -16, -16, -16, -16, -16, -16, -16, -16, -16, + -16, -16, -16, -16, -16, -16, -16 + }, + + { + 11, -17, -17, -17, -17, -17, -17, -17, -17, -17, + -17, -17, -17, -17, -17, -17, -17 + }, + + { + 11, -18, -18, -18, -18, -18, -18, -18, -18, -18, + -18, -18, -18, 44, -18, -18, -18 + }, + + { + 11, 45, 45, -19, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45 + + }, + + { + 11, -20, 46, 47, -20, -20, -20, -20, -20, -20, + -20, -20, -20, -20, -20, -20, -20 + }, + + { + 11, 48, -21, -21, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48 + }, + + { + 11, 49, 49, 50, 49, -22, 49, 49, -22, 49, + 49, 49, 49, 49, 49, -22, 49 + }, + + { + 11, -23, -23, -23, -23, -23, -23, -23, -23, -23, + -23, -23, -23, -23, -23, -23, -23 + }, + + { + 11, -24, -24, -24, -24, -24, -24, -24, -24, -24, + -24, -24, -24, -24, -24, -24, -24 + + }, + + { + 11, 51, 51, 52, 51, 51, 51, 51, 51, 51, + 51, 51, 51, 51, 51, 51, 51 + }, + + { + 11, -26, -26, -26, -26, -26, -26, -26, -26, -26, + -26, -26, -26, -26, -26, -26, -26 + }, + + { + 11, -27, -27, -27, -27, -27, -27, -27, -27, -27, + -27, -27, -27, -27, -27, -27, -27 + }, + + { + 11, -28, -28, -28, -28, -28, -28, -28, -28, -28, + -28, -28, -28, -28, 53, -28, -28 + }, + + { + 11, -29, -29, -29, -29, -29, -29, -29, -29, -29, + -29, -29, -29, -29, -29, -29, -29 + + }, + + { + 11, 54, 54, -30, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54 + }, + + { + 11, -31, -31, -31, -31, -31, -31, 55, -31, -31, + -31, -31, -31, -31, -31, -31, -31 + }, + + { + 11, -32, -32, -32, -32, -32, -32, -32, -32, -32, + -32, -32, -32, -32, -32, -32, -32 + }, + + { + 11, -33, -33, -33, -33, -33, -33, -33, -33, -33, + -33, -33, -33, -33, -33, -33, -33 + }, + + { + 11, -34, -34, -34, -34, -34, -34, -34, -34, -34, + -34, 56, 57, 57, -34, -34, -34 + + }, + + { + 11, -35, -35, -35, -35, -35, -35, -35, -35, -35, + -35, 57, 57, 57, -35, -35, -35 + }, + + { + 11, -36, -36, -36, -36, -36, -36, -36, -36, -36, + -36, -36, -36, -36, -36, -36, -36 + }, + + { + 11, -37, -37, 58, -37, -37, -37, -37, -37, -37, + -37, -37, -37, -37, -37, -37, -37 + }, + + { + 11, -38, -38, -38, -38, -38, -38, -38, -38, -38, + -38, -38, -38, -38, -38, -38, 59 + }, + + { + 11, -39, 39, 40, -39, -39, 41, -39, -39, -39, + -39, -39, -39, -39, -39, -39, -39 + + }, + + { + 11, -40, -40, -40, -40, -40, -40, -40, -40, -40, + -40, -40, -40, -40, -40, -40, -40 + }, + + { + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42 + }, + + { + 11, 42, 42, 43, 42, 42, 42, 42, 42, 42, + 42, 42, 42, 42, 42, 42, 42 + }, + + { + 11, -43, -43, -43, -43, -43, -43, -43, -43, -43, + -43, -43, -43, -43, -43, -43, -43 + }, + + { + 11, -44, -44, -44, -44, -44, -44, -44, -44, -44, + -44, -44, -44, 44, -44, -44, -44 + + }, + + { + 11, 45, 45, -45, 45, 45, 45, 45, 45, 45, + 45, 45, 45, 45, 45, 45, 45 + }, + + { + 11, -46, 46, 47, -46, -46, -46, -46, -46, -46, + -46, -46, -46, -46, -46, -46, -46 + }, + + { + 11, 48, -47, -47, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48 + }, + + { + 11, -48, -48, -48, -48, -48, -48, -48, -48, -48, + -48, -48, -48, -48, -48, -48, -48 + }, + + { + 11, 49, 49, 50, 49, -49, 49, 49, -49, 49, + 49, 49, 49, 49, 49, -49, 49 + + }, + + { + 11, -50, -50, -50, -50, -50, -50, -50, -50, -50, + -50, -50, -50, -50, -50, -50, -50 + }, + + { + 11, -51, -51, 52, -51, -51, -51, -51, -51, -51, + -51, -51, -51, -51, -51, -51, -51 + }, + + { + 11, -52, -52, -52, -52, -52, -52, -52, -52, -52, + -52, -52, -52, -52, -52, -52, -52 + }, + + { + 11, -53, -53, -53, -53, -53, -53, -53, -53, -53, + -53, -53, -53, -53, -53, -53, -53 + }, + + { + 11, 54, 54, -54, 54, 54, 54, 54, 54, 54, + 54, 54, 54, 54, 54, 54, 54 + + }, + + { + 11, -55, -55, -55, -55, -55, -55, -55, -55, -55, + -55, -55, -55, -55, -55, -55, -55 + }, + + { + 11, -56, -56, -56, -56, -56, -56, -56, -56, -56, + -56, 60, 57, 57, -56, -56, -56 + }, + + { + 11, -57, -57, -57, -57, -57, -57, -57, -57, -57, + -57, 57, 57, 57, -57, -57, -57 + }, + + { + 11, -58, -58, -58, -58, -58, -58, -58, -58, -58, + -58, -58, -58, -58, -58, -58, -58 + }, + + { + 11, -59, -59, -59, -59, -59, -59, -59, -59, -59, + -59, -59, -59, -59, -59, -59, -59 + + }, + + { + 11, -60, -60, -60, -60, -60, -60, -60, -60, -60, + -60, 57, 57, 57, -60, -60, -60 + }, + + } ; + +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up zconftext. + */ +#define YY_DO_BEFORE_ACTION \ + (yytext_ptr) = yy_bp; \ + zconfleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ + *yy_cp = '\0'; \ + (yy_c_buf_p) = yy_cp; + +#define YY_NUM_RULES 33 +#define YY_END_OF_BUFFER 34 +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[61] = + { 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 34, 5, 4, 2, 3, 7, 8, 6, 32, 29, + 31, 24, 28, 27, 26, 22, 17, 13, 16, 20, + 22, 11, 12, 19, 19, 14, 22, 22, 4, 2, + 3, 3, 1, 6, 32, 29, 31, 30, 24, 23, + 26, 25, 15, 20, 9, 19, 19, 21, 10, 18 + } ; + +static yyconst flex_int32_t yy_ec[256] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 6, 1, 1, 7, 8, 9, + 10, 1, 1, 1, 11, 12, 12, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 1, 1, 1, + 14, 1, 1, 1, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 1, 15, 1, 1, 13, 1, 13, 13, 13, 13, + + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 1, 16, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1 + } ; + +extern int zconf_flex_debug; +int zconf_flex_debug = 0; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +#define yymore() yymore_used_but_not_detected +#define YY_MORE_ADJ 0 +#define YY_RESTORE_YY_MORE_OFFSET +char *zconftext; +#define YY_NO_INPUT 1 + +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include + +#include "lkc.h" + +#define START_STRSIZE 16 + +static struct { + struct file *file; + int lineno; +} current_pos; + +static char *text; +static int text_size, text_asize; + +struct buffer { + struct buffer *parent; + YY_BUFFER_STATE state; +}; + +struct buffer *current_buf; + +static int last_ts, first_ts; + +static void zconf_endhelp(void); +static void zconf_endfile(void); + +static void new_string(void) +{ + text = xmalloc(START_STRSIZE); + text_asize = START_STRSIZE; + text_size = 0; + *text = 0; +} + +static void append_string(const char *str, int size) +{ + int new_size = text_size + size + 1; + if (new_size > text_asize) { + new_size += START_STRSIZE - 1; + new_size &= -START_STRSIZE; + text = realloc(text, new_size); + text_asize = new_size; + } + memcpy(text + text_size, str, size); + text_size += size; + text[text_size] = 0; +} + +static void alloc_string(const char *str, int size) +{ + text = xmalloc(size + 1); + memcpy(text, str, size); + text[size] = 0; +} + +#define INITIAL 0 +#define COMMAND 1 +#define HELP 2 +#define STRING 3 +#define PARAM 4 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int zconflex_destroy (void ); + +int zconfget_debug (void ); + +void zconfset_debug (int debug_flag ); + +YY_EXTRA_TYPE zconfget_extra (void ); + +void zconfset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *zconfget_in (void ); + +void zconfset_in (FILE * in_str ); + +FILE *zconfget_out (void ); + +void zconfset_out (FILE * out_str ); + +int zconfget_leng (void ); + +char *zconfget_text (void ); + +int zconfget_lineno (void ); + +void zconfset_lineno (int line_number ); + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int zconfwrap (void ); +#else +extern int zconfwrap (void ); +#endif +#endif + + static void yyunput (int c,char *buf_ptr ); + +#ifndef yytext_ptr +static void yy_flex_strncpy (char *,yyconst char *,int ); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * ); +#endif + +#ifndef YY_NO_INPUT + +#ifdef __cplusplus +static int yyinput (void ); +#else +static int input (void ); +#endif + +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO do { if (fwrite( zconftext, zconfleng, 1, zconfout )) {} } while (0) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf,result,max_size) \ + errno=0; \ + while ( (result = read( fileno(zconfin), (char *) buf, max_size )) < 0 ) \ + { \ + if( errno != EINTR) \ + { \ + YY_FATAL_ERROR( "input in flex scanner failed" ); \ + break; \ + } \ + errno=0; \ + clearerr(zconfin); \ + }\ +\ + +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) +#endif + +/* end tables serialization structures and prototypes */ + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL_IS_OURS 1 + +extern int zconflex (void); + +#define YY_DECL int zconflex (void) +#endif /* !YY_DECL */ + +/* Code executed at the beginning of each rule, after zconftext and zconfleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + YY_USER_ACTION + +/** The main scanner function which does all the work. + */ +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp, *yy_bp; + register int yy_act; + + int str = 0; + int ts, i; + + if ( !(yy_init) ) + { + (yy_init) = 1; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ + + if ( ! zconfin ) + zconfin = stdin; + + if ( ! zconfout ) + zconfout = stdout; + + if ( ! YY_CURRENT_BUFFER ) { + zconfensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + zconf_create_buffer(zconfin,YY_BUF_SIZE ); + } + + zconf_load_buffer_state( ); + } + + while ( 1 ) /* loops until end-of-file is reached */ + { + yy_cp = (yy_c_buf_p); + + /* Support of zconftext. */ + *yy_cp = (yy_hold_char); + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = (yy_start); +yy_match: + while ( (yy_current_state = yy_nxt[yy_current_state][ yy_ec[YY_SC_TO_UI(*yy_cp)] ]) > 0 ) + ++yy_cp; + + yy_current_state = -yy_current_state; + +yy_find_action: + yy_act = yy_accept[yy_current_state]; + + YY_DO_BEFORE_ACTION; + +do_action: /* This label is used only to access EOF actions. */ + + switch ( yy_act ) + { /* beginning of action switch */ +case 1: +/* rule 1 can match eol */ +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP +{ + current_file->lineno++; + return T_EOL; +} + YY_BREAK +case 3: +YY_RULE_SETUP + + YY_BREAK +case 4: +YY_RULE_SETUP +{ + BEGIN(COMMAND); +} + YY_BREAK +case 5: +YY_RULE_SETUP +{ + unput(zconftext[0]); + BEGIN(COMMAND); +} + YY_BREAK + +case 6: +YY_RULE_SETUP +{ + const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); + BEGIN(PARAM); + current_pos.file = current_file; + current_pos.lineno = current_file->lineno; + if (id && id->flags & TF_COMMAND) { + zconflval.id = id; + return id->token; + } + alloc_string(zconftext, zconfleng); + zconflval.string = text; + return T_WORD; + } + YY_BREAK +case 7: +YY_RULE_SETUP + + YY_BREAK +case 8: +/* rule 8 can match eol */ +YY_RULE_SETUP +{ + BEGIN(INITIAL); + current_file->lineno++; + return T_EOL; + } + YY_BREAK + +case 9: +YY_RULE_SETUP +return T_AND; + YY_BREAK +case 10: +YY_RULE_SETUP +return T_OR; + YY_BREAK +case 11: +YY_RULE_SETUP +return T_OPEN_PAREN; + YY_BREAK +case 12: +YY_RULE_SETUP +return T_CLOSE_PAREN; + YY_BREAK +case 13: +YY_RULE_SETUP +return T_NOT; + YY_BREAK +case 14: +YY_RULE_SETUP +return T_EQUAL; + YY_BREAK +case 15: +YY_RULE_SETUP +return T_UNEQUAL; + YY_BREAK +case 16: +YY_RULE_SETUP +{ + str = zconftext[0]; + new_string(); + BEGIN(STRING); + } + YY_BREAK +case 17: +/* rule 17 can match eol */ +YY_RULE_SETUP +BEGIN(INITIAL); current_file->lineno++; return T_EOL; + YY_BREAK +case 18: +YY_RULE_SETUP +/* ignore */ + YY_BREAK +case 19: +YY_RULE_SETUP +{ + const struct kconf_id *id = kconf_id_lookup(zconftext, zconfleng); + if (id && id->flags & TF_PARAM) { + zconflval.id = id; + return id->token; + } + alloc_string(zconftext, zconfleng); + zconflval.string = text; + return T_WORD; + } + YY_BREAK +case 20: +YY_RULE_SETUP +/* comment */ + YY_BREAK +case 21: +/* rule 21 can match eol */ +YY_RULE_SETUP +current_file->lineno++; + YY_BREAK +case 22: +YY_RULE_SETUP + + YY_BREAK +case YY_STATE_EOF(PARAM): +{ + BEGIN(INITIAL); + } + YY_BREAK + +case 23: +/* rule 23 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up zconftext again */ +YY_RULE_SETUP +{ + append_string(zconftext, zconfleng); + zconflval.string = text; + return T_WORD_QUOTE; + } + YY_BREAK +case 24: +YY_RULE_SETUP +{ + append_string(zconftext, zconfleng); + } + YY_BREAK +case 25: +/* rule 25 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up zconftext again */ +YY_RULE_SETUP +{ + append_string(zconftext + 1, zconfleng - 1); + zconflval.string = text; + return T_WORD_QUOTE; + } + YY_BREAK +case 26: +YY_RULE_SETUP +{ + append_string(zconftext + 1, zconfleng - 1); + } + YY_BREAK +case 27: +YY_RULE_SETUP +{ + if (str == zconftext[0]) { + BEGIN(PARAM); + zconflval.string = text; + return T_WORD_QUOTE; + } else + append_string(zconftext, 1); + } + YY_BREAK +case 28: +/* rule 28 can match eol */ +YY_RULE_SETUP +{ + printf("%s:%d:warning: multi-line strings not supported\n", zconf_curname(), zconf_lineno()); + current_file->lineno++; + BEGIN(INITIAL); + return T_EOL; + } + YY_BREAK +case YY_STATE_EOF(STRING): +{ + BEGIN(INITIAL); + } + YY_BREAK + +case 29: +YY_RULE_SETUP +{ + ts = 0; + for (i = 0; i < zconfleng; i++) { + if (zconftext[i] == '\t') + ts = (ts & ~7) + 8; + else + ts++; + } + last_ts = ts; + if (first_ts) { + if (ts < first_ts) { + zconf_endhelp(); + return T_HELPTEXT; + } + ts -= first_ts; + while (ts > 8) { + append_string(" ", 8); + ts -= 8; + } + append_string(" ", ts); + } + } + YY_BREAK +case 30: +/* rule 30 can match eol */ +*yy_cp = (yy_hold_char); /* undo effects of setting up zconftext */ +(yy_c_buf_p) = yy_cp -= 1; +YY_DO_BEFORE_ACTION; /* set up zconftext again */ +YY_RULE_SETUP +{ + current_file->lineno++; + zconf_endhelp(); + return T_HELPTEXT; + } + YY_BREAK +case 31: +/* rule 31 can match eol */ +YY_RULE_SETUP +{ + current_file->lineno++; + append_string("\n", 1); + } + YY_BREAK +case 32: +YY_RULE_SETUP +{ + while (zconfleng) { + if ((zconftext[zconfleng-1] != ' ') && (zconftext[zconfleng-1] != '\t')) + break; + zconfleng--; + } + append_string(zconftext, zconfleng); + if (!first_ts) + first_ts = last_ts; + } + YY_BREAK +case YY_STATE_EOF(HELP): +{ + zconf_endhelp(); + return T_HELPTEXT; + } + YY_BREAK + +case YY_STATE_EOF(INITIAL): +case YY_STATE_EOF(COMMAND): +{ + if (current_file) { + zconf_endfile(); + return T_EOL; + } + fclose(zconfin); + yyterminate(); +} + YY_BREAK +case 33: +YY_RULE_SETUP +YY_FATAL_ERROR( "flex scanner jammed" ); + YY_BREAK + + case YY_END_OF_BUFFER: + { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = (yy_hold_char); + YY_RESTORE_YY_MORE_OFFSET + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) + { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed zconfin at a new source and called + * zconflex(). If so, then we have to assure + * consistency between YY_CURRENT_BUFFER and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = zconfin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + { /* This was really a NUL. */ + yy_state_type yy_next_state; + + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans( yy_current_state ); + + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + + if ( yy_next_state ) + { + /* Consume the NUL. */ + yy_cp = ++(yy_c_buf_p); + yy_current_state = yy_next_state; + goto yy_match; + } + + else + { + yy_cp = (yy_c_buf_p); + goto yy_find_action; + } + } + + else switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_END_OF_FILE: + { + (yy_did_buffer_switch_on_eof) = 0; + + if ( zconfwrap( ) ) + { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * zconftext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else + { + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; + + yy_current_state = yy_get_previous_state( ); + + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found" ); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of zconflex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); + register int number_to_move, i; + int ret_val; + + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed" ); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) + { /* Don't try to fill the buffer, so this is an EOF. */ + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) + { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else + { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + + for ( i = 0; i < number_to_move; ++i ) + *(dest++) = *(source++); + + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; + + else + { + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; + + while ( num_to_read <= 0 ) + { /* Not enough room in the buffer - grow it. */ + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + + int yy_c_buf_p_offset = + (int) ((yy_c_buf_p) - b->yy_ch_buf); + + if ( b->yy_is_our_buffer ) + { + int new_size = b->yy_buf_size * 2; + + if ( new_size <= 0 ) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + zconfrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); + } + else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow" ); + + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + number_to_move - 1; + + } + + if ( num_to_read > YY_READ_BUF_SIZE ) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); + + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + if ( (yy_n_chars) == 0 ) + { + if ( number_to_move == YY_MORE_ADJ ) + { + ret_val = EOB_ACT_END_OF_FILE; + zconfrestart(zconfin ); + } + + else + { + ret_val = EOB_ACT_LAST_MATCH; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) zconfrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; + + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + + static yy_state_type yy_get_previous_state (void) +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = (yy_start); + + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) + { + yy_current_state = yy_nxt[yy_current_state][(*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1)]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ + register int yy_is_jam; + + yy_current_state = yy_nxt[yy_current_state][1]; + yy_is_jam = (yy_current_state <= 0); + + return yy_is_jam ? 0 : yy_current_state; +} + + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); + + /* undo effects of setting up zconftext */ + *yy_cp = (yy_hold_char); + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; + register char *source = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; + + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + *--dest = *--source; + + yy_cp += (int) (dest - source); + yy_bp += (int) (dest - source); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) + YY_FATAL_ERROR( "flex scanner push-back overflow" ); + } + + *--yy_cp = (char) c; + + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} + +#ifndef YY_NO_INPUT +#ifdef __cplusplus + static int yyinput (void) +#else + static int input (void) +#endif + +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); + + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) + { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) + /* This was really a NUL. */ + *(yy_c_buf_p) = '\0'; + + else + { /* need more input */ + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); + + switch ( yy_get_next_buffer( ) ) + { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + zconfrestart(zconfin ); + + /*FALLTHROUGH*/ + + case EOB_ACT_END_OF_FILE: + { + if ( zconfwrap( ) ) + return EOF; + + if ( ! (yy_did_buffer_switch_on_eof) ) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + (yy_c_buf_p) = (yytext_ptr) + offset; + break; + } + } + } + + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve zconftext */ + (yy_hold_char) = *++(yy_c_buf_p); + + return c; +} +#endif /* ifndef YY_NO_INPUT */ + +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void zconfrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + zconfensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + zconf_create_buffer(zconfin,YY_BUF_SIZE ); + } + + zconf_init_buffer(YY_CURRENT_BUFFER,input_file ); + zconf_load_buffer_state( ); +} + +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void zconf_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * zconfpop_buffer_state(); + * zconfpush_buffer_state(new_buffer); + */ + zconfensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) + return; + + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + YY_CURRENT_BUFFER_LVALUE = new_buffer; + zconf_load_buffer_state( ); + + /* We don't actually know whether we did this switch during + * EOF (zconfwrap()) processing, but the only time this flag + * is looked at is after zconfwrap() is called, so it's safe + * to go ahead and always set it. + */ + (yy_did_buffer_switch_on_eof) = 1; +} + +static void zconf_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + zconfin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} + +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE zconf_create_buffer (FILE * file, int size ) +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *) zconfalloc(b->yy_buf_size + 2 ); + if ( ! b->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in zconf_create_buffer()" ); + + b->yy_is_our_buffer = 1; + + zconf_init_buffer(b,file ); + + return b; +} + +/** Destroy the buffer. + * @param b a buffer created with zconf_create_buffer() + * + */ + void zconf_delete_buffer (YY_BUFFER_STATE b ) +{ + + if ( ! b ) + return; + + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; + + if ( b->yy_is_our_buffer ) + zconffree((void *) b->yy_ch_buf ); + + zconffree((void *) b ); +} + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a zconfrestart() or at EOF. + */ + static void zconf_init_buffer (YY_BUFFER_STATE b, FILE * file ) + +{ + int oerrno = errno; + + zconf_flush_buffer(b ); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + + /* If b is the current buffer, then zconf_init_buffer was _probably_ + * called from zconfrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = 0; + + errno = oerrno; +} + +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void zconf_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if ( b == YY_CURRENT_BUFFER ) + zconf_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void zconfpush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + zconfensure_buffer_stack(); + + /* This block is copied from zconf_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from zconf_switch_to_buffer. */ + zconf_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void zconfpop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + zconf_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + zconf_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; + } +} + +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void zconfensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)zconfalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } + + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)zconfrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in zconfensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE zconf_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + + if ( size < 2 || + base[size-2] != YY_END_OF_BUFFER_CHAR || + base[size-1] != YY_END_OF_BUFFER_CHAR ) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE) zconfalloc(sizeof( struct yy_buffer_state ) ); + if ( ! b ) + YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_buffer()" ); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + zconf_switch_to_buffer(b ); + + return b; +} + +/** Setup the input buffer state to scan a string. The next call to zconflex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * zconf_scan_bytes() instead. + */ +YY_BUFFER_STATE zconf_scan_string (yyconst char * yystr ) +{ + + return zconf_scan_bytes(yystr,strlen(yystr) ); +} + +/** Setup the input buffer state to scan the given bytes. The next call to zconflex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE zconf_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = _yybytes_len + 2; + buf = (char *) zconfalloc(n ); + if ( ! buf ) + YY_FATAL_ERROR( "out of dynamic memory in zconf_scan_bytes()" ); + + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; + + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; + + b = zconf_scan_buffer(buf,n ); + if ( ! b ) + YY_FATAL_ERROR( "bad buffer in zconf_scan_bytes()" ); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up zconftext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + zconftext[zconfleng] = (yy_hold_char); \ + (yy_c_buf_p) = zconftext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + zconfleng = yyless_macro_arg; \ + } \ + while ( 0 ) + +/* Accessor methods (get/set functions) to struct members. */ + +/** Get the current line number. + * + */ +int zconfget_lineno (void) +{ + + return zconflineno; +} + +/** Get the input stream. + * + */ +FILE *zconfget_in (void) +{ + return zconfin; +} + +/** Get the output stream. + * + */ +FILE *zconfget_out (void) +{ + return zconfout; +} + +/** Get the length of the current token. + * + */ +int zconfget_leng (void) +{ + return zconfleng; +} + +/** Get the current token. + * + */ + +char *zconfget_text (void) +{ + return zconftext; +} + +/** Set the current line number. + * @param line_number + * + */ +void zconfset_lineno (int line_number ) +{ + + zconflineno = line_number; +} + +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see zconf_switch_to_buffer + */ +void zconfset_in (FILE * in_str ) +{ + zconfin = in_str ; +} + +void zconfset_out (FILE * out_str ) +{ + zconfout = out_str ; +} + +int zconfget_debug (void) +{ + return zconf_flex_debug; +} + +void zconfset_debug (int bdebug ) +{ + zconf_flex_debug = bdebug ; +} + +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from zconflex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + zconfin = stdin; + zconfout = stdout; +#else + zconfin = (FILE *) 0; + zconfout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * zconflex_init() + */ + return 0; +} + +/* zconflex_destroy is for both reentrant and non-reentrant scanners. */ +int zconflex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + zconf_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + zconfpop_buffer_state(); + } + + /* Destroy the stack itself. */ + zconffree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * zconflex() is called, initialization will occur. */ + yy_init_globals( ); + + return 0; +} + +/* + * Internal utility routines. + */ + +#ifndef yytext_ptr +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ + register int i; + for ( i = 0; i < n; ++i ) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen (yyconst char * s ) +{ + register int n; + for ( n = 0; s[n]; ++n ) + ; + + return n; +} +#endif + +void *zconfalloc (yy_size_t size ) +{ + return (void *) malloc( size ); +} + +void *zconfrealloc (void * ptr, yy_size_t size ) +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *) realloc( (char *) ptr, size ); +} + +void zconffree (void * ptr ) +{ + free( (char *) ptr ); /* see zconfrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +void zconf_starthelp(void) +{ + new_string(); + last_ts = first_ts = 0; + BEGIN(HELP); +} + +static void zconf_endhelp(void) +{ + zconflval.string = text; + BEGIN(INITIAL); +} + +/* + * Try to open specified file with following names: + * ./name + * $(srctree)/name + * The latter is used when srctree is separate from objtree + * when compiling the kernel. + * Return NULL if file is not found. + */ +FILE *zconf_fopen(const char *name) +{ + char *env, fullname[PATH_MAX+1]; + FILE *f; + + f = fopen(name, "r"); + if (!f && name != NULL && name[0] != '/') { + env = getenv(SRCTREE); + if (env) { + sprintf(fullname, "%s/%s", env, name); + f = fopen(fullname, "r"); + } + } + return f; +} + +void zconf_initscan(const char *name) +{ + zconfin = zconf_fopen(name); + if (!zconfin) { + printf("can't find file %s\n", name); + exit(1); + } + + current_buf = xmalloc(sizeof(*current_buf)); + memset(current_buf, 0, sizeof(*current_buf)); + + current_file = file_lookup(name); + current_file->lineno = 1; +} + +void zconf_nextfile(const char *name) +{ + struct file *iter; + struct file *file = file_lookup(name); + struct buffer *buf = xmalloc(sizeof(*buf)); + memset(buf, 0, sizeof(*buf)); + + current_buf->state = YY_CURRENT_BUFFER; + zconfin = zconf_fopen(file->name); + if (!zconfin) { + printf("%s:%d: can't open file \"%s\"\n", + zconf_curname(), zconf_lineno(), file->name); + exit(1); + } + zconf_switch_to_buffer(zconf_create_buffer(zconfin,YY_BUF_SIZE)); + buf->parent = current_buf; + current_buf = buf; + + for (iter = current_file->parent; iter; iter = iter->parent ) { + if (!strcmp(current_file->name,iter->name) ) { + printf("%s:%d: recursive inclusion detected. " + "Inclusion path:\n current file : '%s'\n", + zconf_curname(), zconf_lineno(), + zconf_curname()); + iter = current_file->parent; + while (iter && \ + strcmp(iter->name,current_file->name)) { + printf(" included from: '%s:%d'\n", + iter->name, iter->lineno-1); + iter = iter->parent; + } + if (iter) + printf(" included from: '%s:%d'\n", + iter->name, iter->lineno+1); + exit(1); + } + } + file->lineno = 1; + file->parent = current_file; + current_file = file; +} + +static void zconf_endfile(void) +{ + struct buffer *parent; + + current_file = current_file->parent; + + parent = current_buf->parent; + if (parent) { + fclose(zconfin); + zconf_delete_buffer(YY_CURRENT_BUFFER); + zconf_switch_to_buffer(parent->state); + } + free(current_buf); + current_buf = parent; +} + +int zconf_lineno(void) +{ + return current_pos.lineno; +} + +const char *zconf_curname(void) +{ + return current_pos.file ? current_pos.file->name : ""; +} + diff --git a/support/kconfig/zconf.tab.c_shipped b/support/kconfig/zconf.tab.c_shipped new file mode 100644 index 0000000000..f3430308a9 --- /dev/null +++ b/support/kconfig/zconf.tab.c_shipped @@ -0,0 +1,2538 @@ +/* A Bison parser, made by GNU Bison 2.5. */ + +/* Bison implementation for Yacc-like parsers in C + + Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ + +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.5" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + +/* Substitute the variable and function names. */ +#define yyparse zconfparse +#define yylex zconflex +#define yyerror zconferror +#define yylval zconflval +#define yychar zconfchar +#define yydebug zconfdebug +#define yynerrs zconfnerrs + + +/* Copy the first part of user declarations. */ + + +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include + +#include "lkc.h" + +#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) + +#define PRINTD 0x0001 +#define DEBUG_PARSE 0x0002 + +int cdebug = PRINTD; + +extern int zconflex(void); +static void zconfprint(const char *err, ...); +static void zconf_error(const char *err, ...); +static void zconferror(const char *err); +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken); + +struct symbol *symbol_hash[SYMBOL_HASHSIZE]; + +static struct menu *current_menu, *current_entry; + + + + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 1 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + T_MAINMENU = 258, + T_MENU = 259, + T_ENDMENU = 260, + T_SOURCE = 261, + T_CHOICE = 262, + T_ENDCHOICE = 263, + T_COMMENT = 264, + T_CONFIG = 265, + T_MENUCONFIG = 266, + T_HELP = 267, + T_HELPTEXT = 268, + T_IF = 269, + T_ENDIF = 270, + T_DEPENDS = 271, + T_OPTIONAL = 272, + T_PROMPT = 273, + T_TYPE = 274, + T_DEFAULT = 275, + T_SELECT = 276, + T_RANGE = 277, + T_VISIBLE = 278, + T_OPTION = 279, + T_ON = 280, + T_WORD = 281, + T_WORD_QUOTE = 282, + T_UNEQUAL = 283, + T_CLOSE_PAREN = 284, + T_OPEN_PAREN = 285, + T_EOL = 286, + T_OR = 287, + T_AND = 288, + T_EQUAL = 289, + T_NOT = 290 + }; +#endif + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + + + char *string; + struct file *file; + struct symbol *symbol; + struct expr *expr; + struct menu *menu; + const struct kconf_id *id; + + + +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + + +/* Copy the second part of user declarations. */ + + +/* Include zconf.hash.c here so it can see the token constants. */ +#include "zconf.hash.c" + + + +#ifdef short +# undef short +#endif + +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif + +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif + +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif + +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif + +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +# define YYCOPY_NEEDED 1 + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 11 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 290 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 36 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 50 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 118 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 191 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 290 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = +{ + 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, + 35 +}; + +#if YYDEBUG +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint16 yyprhs[] = +{ + 0, 0, 3, 6, 8, 11, 13, 14, 17, 20, + 23, 26, 31, 36, 40, 42, 44, 46, 48, 50, + 52, 54, 56, 58, 60, 62, 64, 66, 68, 72, + 75, 79, 82, 86, 89, 90, 93, 96, 99, 102, + 105, 108, 112, 117, 122, 127, 133, 137, 138, 142, + 143, 146, 150, 153, 155, 159, 160, 163, 166, 169, + 172, 175, 180, 184, 187, 192, 193, 196, 200, 202, + 206, 207, 210, 213, 216, 220, 224, 228, 230, 234, + 235, 238, 241, 244, 248, 252, 255, 258, 261, 262, + 265, 268, 271, 276, 277, 280, 283, 286, 287, 290, + 292, 294, 297, 300, 303, 305, 308, 309, 312, 314, + 318, 322, 326, 329, 333, 337, 339, 341, 342 +}; + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = +{ + 37, 0, -1, 81, 38, -1, 38, -1, 63, 39, + -1, 39, -1, -1, 39, 41, -1, 39, 55, -1, + 39, 67, -1, 39, 80, -1, 39, 26, 1, 31, + -1, 39, 40, 1, 31, -1, 39, 1, 31, -1, + 16, -1, 18, -1, 19, -1, 21, -1, 17, -1, + 22, -1, 20, -1, 23, -1, 31, -1, 61, -1, + 71, -1, 44, -1, 46, -1, 69, -1, 26, 1, + 31, -1, 1, 31, -1, 10, 26, 31, -1, 43, + 47, -1, 11, 26, 31, -1, 45, 47, -1, -1, + 47, 48, -1, 47, 49, -1, 47, 75, -1, 47, + 73, -1, 47, 42, -1, 47, 31, -1, 19, 78, + 31, -1, 18, 79, 82, 31, -1, 20, 83, 82, + 31, -1, 21, 26, 82, 31, -1, 22, 84, 84, + 82, 31, -1, 24, 50, 31, -1, -1, 50, 26, + 51, -1, -1, 34, 79, -1, 7, 85, 31, -1, + 52, 56, -1, 80, -1, 53, 58, 54, -1, -1, + 56, 57, -1, 56, 75, -1, 56, 73, -1, 56, + 31, -1, 56, 42, -1, 18, 79, 82, 31, -1, + 19, 78, 31, -1, 17, 31, -1, 20, 26, 82, + 31, -1, -1, 58, 41, -1, 14, 83, 81, -1, + 80, -1, 59, 62, 60, -1, -1, 62, 41, -1, + 62, 67, -1, 62, 55, -1, 3, 79, 81, -1, + 4, 79, 31, -1, 64, 76, 74, -1, 80, -1, + 65, 68, 66, -1, -1, 68, 41, -1, 68, 67, + -1, 68, 55, -1, 6, 79, 31, -1, 9, 79, + 31, -1, 70, 74, -1, 12, 31, -1, 72, 13, + -1, -1, 74, 75, -1, 74, 31, -1, 74, 42, + -1, 16, 25, 83, 31, -1, -1, 76, 77, -1, + 76, 31, -1, 23, 82, -1, -1, 79, 82, -1, + 26, -1, 27, -1, 5, 31, -1, 8, 31, -1, + 15, 31, -1, 31, -1, 81, 31, -1, -1, 14, + 83, -1, 84, -1, 84, 34, 84, -1, 84, 28, + 84, -1, 30, 83, 29, -1, 35, 83, -1, 83, + 32, 83, -1, 83, 33, 83, -1, 26, -1, 27, + -1, -1, 26, -1 +}; + +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = +{ + 0, 103, 103, 103, 105, 105, 107, 109, 110, 111, + 112, 113, 114, 118, 122, 122, 122, 122, 122, 122, + 122, 122, 126, 127, 128, 129, 130, 131, 135, 136, + 142, 150, 156, 164, 174, 176, 177, 178, 179, 180, + 181, 184, 192, 198, 208, 214, 220, 223, 225, 236, + 237, 242, 251, 256, 264, 267, 269, 270, 271, 272, + 273, 276, 282, 293, 299, 309, 311, 316, 324, 332, + 335, 337, 338, 339, 344, 351, 358, 363, 371, 374, + 376, 377, 378, 381, 389, 396, 403, 409, 416, 418, + 419, 420, 423, 431, 433, 434, 437, 444, 446, 451, + 452, 455, 456, 457, 461, 462, 465, 466, 469, 470, + 471, 472, 473, 474, 475, 478, 479, 482, 483 +}; +#endif + +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ +static const char *const yytname[] = +{ + "$end", "error", "$undefined", "T_MAINMENU", "T_MENU", "T_ENDMENU", + "T_SOURCE", "T_CHOICE", "T_ENDCHOICE", "T_COMMENT", "T_CONFIG", + "T_MENUCONFIG", "T_HELP", "T_HELPTEXT", "T_IF", "T_ENDIF", "T_DEPENDS", + "T_OPTIONAL", "T_PROMPT", "T_TYPE", "T_DEFAULT", "T_SELECT", "T_RANGE", + "T_VISIBLE", "T_OPTION", "T_ON", "T_WORD", "T_WORD_QUOTE", "T_UNEQUAL", + "T_CLOSE_PAREN", "T_OPEN_PAREN", "T_EOL", "T_OR", "T_AND", "T_EQUAL", + "T_NOT", "$accept", "input", "start", "stmt_list", "option_name", + "common_stmt", "option_error", "config_entry_start", "config_stmt", + "menuconfig_entry_start", "menuconfig_stmt", "config_option_list", + "config_option", "symbol_option", "symbol_option_list", + "symbol_option_arg", "choice", "choice_entry", "choice_end", + "choice_stmt", "choice_option_list", "choice_option", "choice_block", + "if_entry", "if_end", "if_stmt", "if_block", "mainmenu_stmt", "menu", + "menu_entry", "menu_end", "menu_stmt", "menu_block", "source_stmt", + "comment", "comment_stmt", "help_start", "help", "depends_list", + "depends", "visibility_list", "visible", "prompt_stmt_opt", "prompt", + "end", "nl", "if_expr", "expr", "symbol", "word_opt", 0 +}; +#endif + +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, + 285, 286, 287, 288, 289, 290 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 36, 37, 37, 38, 38, 39, 39, 39, 39, + 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, + 40, 40, 41, 41, 41, 41, 41, 41, 42, 42, + 43, 44, 45, 46, 47, 47, 47, 47, 47, 47, + 47, 48, 48, 48, 48, 48, 49, 50, 50, 51, + 51, 52, 53, 54, 55, 56, 56, 56, 56, 56, + 56, 57, 57, 57, 57, 58, 58, 59, 60, 61, + 62, 62, 62, 62, 63, 64, 65, 66, 67, 68, + 68, 68, 68, 69, 70, 71, 72, 73, 74, 74, + 74, 74, 75, 76, 76, 76, 77, 78, 78, 79, + 79, 80, 80, 80, 81, 81, 82, 82, 83, 83, + 83, 83, 83, 83, 83, 84, 84, 85, 85 +}; + +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 2, 1, 2, 1, 0, 2, 2, 2, + 2, 4, 4, 3, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, + 3, 2, 3, 2, 0, 2, 2, 2, 2, 2, + 2, 3, 4, 4, 4, 5, 3, 0, 3, 0, + 2, 3, 2, 1, 3, 0, 2, 2, 2, 2, + 2, 4, 3, 2, 4, 0, 2, 3, 1, 3, + 0, 2, 2, 2, 3, 3, 3, 1, 3, 0, + 2, 2, 2, 3, 3, 2, 2, 2, 0, 2, + 2, 2, 4, 0, 2, 2, 2, 0, 2, 1, + 1, 2, 2, 2, 1, 2, 0, 2, 1, 3, + 3, 3, 2, 3, 3, 1, 1, 0, 1 +}; + +/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 6, 0, 104, 0, 3, 0, 6, 6, 99, 100, + 0, 1, 0, 0, 0, 0, 117, 0, 0, 0, + 0, 0, 0, 14, 18, 15, 16, 20, 17, 19, + 21, 0, 22, 0, 7, 34, 25, 34, 26, 55, + 65, 8, 70, 23, 93, 79, 9, 27, 88, 24, + 10, 0, 105, 2, 74, 13, 0, 101, 0, 118, + 0, 102, 0, 0, 0, 115, 116, 0, 0, 0, + 108, 103, 0, 0, 0, 0, 0, 0, 0, 88, + 0, 0, 75, 83, 51, 84, 30, 32, 0, 112, + 0, 0, 67, 0, 0, 11, 12, 0, 0, 0, + 0, 97, 0, 0, 0, 47, 0, 40, 39, 35, + 36, 0, 38, 37, 0, 0, 97, 0, 59, 60, + 56, 58, 57, 66, 54, 53, 71, 73, 69, 72, + 68, 106, 95, 0, 94, 80, 82, 78, 81, 77, + 90, 91, 89, 111, 113, 114, 110, 109, 29, 86, + 0, 106, 0, 106, 106, 106, 0, 0, 0, 87, + 63, 106, 0, 106, 0, 96, 0, 0, 41, 98, + 0, 0, 106, 49, 46, 28, 0, 62, 0, 107, + 92, 42, 43, 44, 0, 0, 48, 61, 64, 45, + 50 +}; + +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 3, 4, 5, 33, 34, 108, 35, 36, 37, + 38, 74, 109, 110, 157, 186, 39, 40, 124, 41, + 76, 120, 77, 42, 128, 43, 78, 6, 44, 45, + 137, 46, 80, 47, 48, 49, 111, 112, 81, 113, + 79, 134, 152, 153, 50, 7, 165, 69, 70, 60 +}; + +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -90 +static const yytype_int16 yypact[] = +{ + 4, 42, -90, 96, -90, 111, -90, 15, -90, -90, + 75, -90, 82, 42, 104, 42, 110, 107, 42, 115, + 125, -4, 121, -90, -90, -90, -90, -90, -90, -90, + -90, 162, -90, 163, -90, -90, -90, -90, -90, -90, + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, + -90, 139, -90, -90, 138, -90, 142, -90, 143, -90, + 152, -90, 164, 167, 168, -90, -90, -4, -4, 77, + -18, -90, 177, 185, 33, 71, 195, 247, 236, -2, + 236, 171, -90, -90, -90, -90, -90, -90, 41, -90, + -4, -4, 138, 97, 97, -90, -90, 186, 187, 194, + 42, 42, -4, 196, 97, -90, 219, -90, -90, -90, + -90, 210, -90, -90, 204, 42, 42, 199, -90, -90, + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, + -90, 222, -90, 223, -90, -90, -90, -90, -90, -90, + -90, -90, -90, -90, 215, -90, -90, -90, -90, -90, + -4, 222, 228, 222, -5, 222, 97, 35, 229, -90, + -90, 222, 232, 222, -4, -90, 135, 233, -90, -90, + 234, 235, 222, 240, -90, -90, 237, -90, 239, -13, + -90, -90, -90, -90, 244, 42, -90, -90, -90, -90, + -90 +}; + +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -90, -90, 269, 271, -90, 23, -70, -90, -90, -90, + -90, 243, -90, -90, -90, -90, -90, -90, -90, -48, + -90, -90, -90, -90, -90, -90, -90, -90, -90, -90, + -90, -20, -90, -90, -90, -90, -90, 206, 205, -68, + -90, -90, 169, -1, 27, -7, 118, -66, -89, -90 +}; + +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -86 +static const yytype_int16 yytable[] = +{ + 10, 88, 89, 54, 146, 147, 119, 1, 122, 164, + 93, 141, 56, 142, 58, 156, 94, 62, 1, 90, + 91, 131, 65, 66, 144, 145, 67, 90, 91, 132, + 127, 68, 136, -31, 97, 2, 154, -31, -31, -31, + -31, -31, -31, -31, -31, 98, 52, -31, -31, 99, + -31, 100, 101, 102, 103, 104, -31, 105, 129, 106, + 138, 173, 92, 141, 107, 142, 174, 172, 8, 9, + 143, -33, 97, 90, 91, -33, -33, -33, -33, -33, + -33, -33, -33, 98, 166, -33, -33, 99, -33, 100, + 101, 102, 103, 104, -33, 105, 11, 106, 179, 151, + 123, 126, 107, 135, 125, 130, 2, 139, 2, 90, + 91, -5, 12, 55, 161, 13, 14, 15, 16, 17, + 18, 19, 20, 65, 66, 21, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 57, 59, 31, 61, -4, + 12, 63, 32, 13, 14, 15, 16, 17, 18, 19, + 20, 64, 71, 21, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 72, 73, 31, 180, 90, 91, 52, + 32, -85, 97, 82, 83, -85, -85, -85, -85, -85, + -85, -85, -85, 84, 190, -85, -85, 99, -85, -85, + -85, -85, -85, -85, -85, 85, 97, 106, 86, 87, + -52, -52, 140, -52, -52, -52, -52, 98, 95, -52, + -52, 99, 114, 115, 116, 117, 96, 148, 149, 150, + 158, 106, 155, 159, 97, 163, 118, -76, -76, -76, + -76, -76, -76, -76, -76, 160, 164, -76, -76, 99, + 13, 14, 15, 16, 17, 18, 19, 20, 91, 106, + 21, 22, 14, 15, 140, 17, 18, 19, 20, 168, + 175, 21, 22, 177, 181, 182, 183, 32, 187, 167, + 188, 169, 170, 171, 185, 189, 53, 51, 32, 176, + 75, 178, 121, 0, 133, 162, 0, 0, 0, 0, + 184 +}; + +#define yypact_value_is_default(yystate) \ + ((yystate) == (-90)) + +#define yytable_value_is_error(yytable_value) \ + YYID (0) + +static const yytype_int16 yycheck[] = +{ + 1, 67, 68, 10, 93, 94, 76, 3, 76, 14, + 28, 81, 13, 81, 15, 104, 34, 18, 3, 32, + 33, 23, 26, 27, 90, 91, 30, 32, 33, 31, + 78, 35, 80, 0, 1, 31, 102, 4, 5, 6, + 7, 8, 9, 10, 11, 12, 31, 14, 15, 16, + 17, 18, 19, 20, 21, 22, 23, 24, 78, 26, + 80, 26, 69, 133, 31, 133, 31, 156, 26, 27, + 29, 0, 1, 32, 33, 4, 5, 6, 7, 8, + 9, 10, 11, 12, 150, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 24, 0, 26, 164, 100, + 77, 78, 31, 80, 77, 78, 31, 80, 31, 32, + 33, 0, 1, 31, 115, 4, 5, 6, 7, 8, + 9, 10, 11, 26, 27, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 31, 26, 26, 31, 0, + 1, 26, 31, 4, 5, 6, 7, 8, 9, 10, + 11, 26, 31, 14, 15, 16, 17, 18, 19, 20, + 21, 22, 23, 1, 1, 26, 31, 32, 33, 31, + 31, 0, 1, 31, 31, 4, 5, 6, 7, 8, + 9, 10, 11, 31, 185, 14, 15, 16, 17, 18, + 19, 20, 21, 22, 23, 31, 1, 26, 31, 31, + 5, 6, 31, 8, 9, 10, 11, 12, 31, 14, + 15, 16, 17, 18, 19, 20, 31, 31, 31, 25, + 1, 26, 26, 13, 1, 26, 31, 4, 5, 6, + 7, 8, 9, 10, 11, 31, 14, 14, 15, 16, + 4, 5, 6, 7, 8, 9, 10, 11, 33, 26, + 14, 15, 5, 6, 31, 8, 9, 10, 11, 31, + 31, 14, 15, 31, 31, 31, 31, 31, 31, 151, + 31, 153, 154, 155, 34, 31, 7, 6, 31, 161, + 37, 163, 76, -1, 79, 116, -1, -1, -1, -1, + 172 +}; + +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 3, 31, 37, 38, 39, 63, 81, 26, 27, + 79, 0, 1, 4, 5, 6, 7, 8, 9, 10, + 11, 14, 15, 16, 17, 18, 19, 20, 21, 22, + 23, 26, 31, 40, 41, 43, 44, 45, 46, 52, + 53, 55, 59, 61, 64, 65, 67, 69, 70, 71, + 80, 39, 31, 38, 81, 31, 79, 31, 79, 26, + 85, 31, 79, 26, 26, 26, 27, 30, 35, 83, + 84, 31, 1, 1, 47, 47, 56, 58, 62, 76, + 68, 74, 31, 31, 31, 31, 31, 31, 83, 83, + 32, 33, 81, 28, 34, 31, 31, 1, 12, 16, + 18, 19, 20, 21, 22, 24, 26, 31, 42, 48, + 49, 72, 73, 75, 17, 18, 19, 20, 31, 42, + 57, 73, 75, 41, 54, 80, 41, 55, 60, 67, + 80, 23, 31, 74, 77, 41, 55, 66, 67, 80, + 31, 42, 75, 29, 83, 83, 84, 84, 31, 31, + 25, 79, 78, 79, 83, 26, 84, 50, 1, 13, + 31, 79, 78, 26, 14, 82, 83, 82, 31, 82, + 82, 82, 84, 26, 31, 31, 82, 31, 82, 83, + 31, 31, 31, 31, 82, 34, 51, 31, 31, 31, + 79 +}; + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + +/* Like YYERROR except do call yyerror. This remains here temporarily + to ease the transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + +#define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif + +#define YYRECOVERING() (!!yyerrstatus) + +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (1); \ + goto yybackup; \ + } \ + else \ + { \ + yyerror (YY_("syntax error: cannot back up")); \ + YYERROR; \ + } \ +while (YYID (0)) + + +#define YYTERROR 1 +#define YYERRCODE 256 + + +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ + +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) +#ifndef YYLLOC_DEFAULT +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) +#endif + + +/* This macro is provided for backward compatibility. */ + +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif + + +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif + +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) + +/* Nonzero means print parse trace. It is left uninitialized so that + multiple parsers can coexist. */ +int yydebug; +#else /* !YYDEBUG */ +# define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) +#endif /* !YYDEBUG */ + + +/* YYINITDEPTH -- initial size of the parser's stacks. */ +#ifndef YYINITDEPTH +# define YYINITDEPTH 200 +#endif + +/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only + if the built-in stack extension method is used). + + Do not make this value too large; the results are undefined if + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) + evaluated with infinite-precision integer arithmetic. */ + +#ifndef YYMAXDEPTH +# define YYMAXDEPTH 10000 +#endif + + +#if YYERROR_VERBOSE + +# ifndef yystrlen +# if defined __GLIBC__ && defined _STRING_H +# define yystrlen strlen +# else +/* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static YYSIZE_T +yystrlen (const char *yystr) +#else +static YYSIZE_T +yystrlen (yystr) + const char *yystr; +#endif +{ + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) + continue; + return yylen; +} +# endif +# endif + +# ifndef yystpcpy +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE +# define yystpcpy stpcpy +# else +/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in + YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static char * +yystpcpy (char *yydest, const char *yysrc) +#else +static char * +yystpcpy (yydest, yysrc) + char *yydest; + const char *yysrc; +#endif +{ + char *yyd = yydest; + const char *yys = yysrc; + + while ((*yyd++ = *yys++) != '\0') + continue; + + return yyd - 1; +} +# endif +# endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) +{ + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = 0; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - Assume YYFAIL is not used. It's too flawed to consider. See + + for details. YYERROR is fine as it does not invoke this + function. + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + + switch (yycount) + { +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ + } + + yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; +} +#endif /* YYERROR_VERBOSE */ + +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); + + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + case 53: /* "choice_entry" */ + + { + fprintf(stderr, "%s:%d: missing end statement for this entry\n", + (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); + if (current_menu == (yyvaluep->menu)) + menu_end_menu(); +}; + + break; + case 59: /* "if_entry" */ + + { + fprintf(stderr, "%s:%d: missing end statement for this entry\n", + (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); + if (current_menu == (yyvaluep->menu)) + menu_end_menu(); +}; + + break; + case 65: /* "menu_entry" */ + + { + fprintf(stderr, "%s:%d: missing end statement for this entry\n", + (yyvaluep->menu)->file->name, (yyvaluep->menu)->lineno); + if (current_menu == (yyvaluep->menu)) + menu_end_menu(); +}; + + break; + + default: + break; + } +} + + +/* Prevent warnings from -Wmissing-prototypes. */ +#ifdef YYPARSE_PARAM +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus +int yyparse (void); +#else +int yyparse (); +#endif +#endif /* ! YYPARSE_PARAM */ + + +/* The lookahead symbol. */ +int yychar; + +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; + +/* Number of syntax errors so far. */ +int yynerrs; + + +/*----------. +| yyparse. | +`----------*/ + +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () + +#endif +#endif +{ + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. + + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; + + YYDPRINTF ((stderr, "Starting parse\n")); + + yystate = 0; + yyerrstatus = 0; + yynerrs = 0; + yychar = YYEMPTY; /* Cause a token to be read. */ + + /* Initialize stack pointers. + Waste one element of value and location stack + so that they stay on the same level as the state stack. + The wasted elements are never initialized. */ + yyssp = yyss; + yyvsp = yyvs; + + goto yysetstate; + +/*------------------------------------------------------------. +| yynewstate -- Push a new state, which is found in yystate. | +`------------------------------------------------------------*/ + yynewstate: + /* In all cases, when you get here, the value and location stacks + have just been pushed. So pushing a state here evens the stacks. */ + yyssp++; + + yysetstate: + *yyssp = yystate; + + if (yyss + yystacksize - 1 <= yyssp) + { + /* Get the current used size of the three stacks, in elements. */ + YYSIZE_T yysize = yyssp - yyss + 1; + +#ifdef yyoverflow + { + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; + } +#else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else + /* Extend the stack our own way. */ + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; + yystacksize *= 2; + if (YYMAXDEPTH < yystacksize) + yystacksize = YYMAXDEPTH; + + { + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); + } +# endif +#endif /* no yyoverflow */ + + yyssp = yyss + yysize - 1; + yyvsp = yyvs + yysize - 1; + + YYDPRINTF ((stderr, "Stack size increased to %lu\n", + (unsigned long int) yystacksize)); + + if (yyss + yystacksize - 1 <= yyssp) + YYABORT; + } + + YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + + if (yystate == YYFINAL) + YYACCEPT; + + goto yybackup; + +/*-----------. +| yybackup. | +`-----------*/ +yybackup: + + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ + + /* First try to decide what to do without reference to lookahead token. */ + yyn = yypact[yystate]; + if (yypact_value_is_default (yyn)) + goto yydefault; + + /* Not known => get a lookahead token if don't already have one. */ + + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ + if (yychar == YYEMPTY) + { + YYDPRINTF ((stderr, "Reading a token: ")); + yychar = YYLEX; + } + + if (yychar <= YYEOF) + { + yychar = yytoken = YYEOF; + YYDPRINTF ((stderr, "Now at end of input.\n")); + } + else + { + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); + } + + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) + goto yydefault; + yyn = yytable[yyn]; + if (yyn <= 0) + { + if (yytable_value_is_error (yyn)) + goto yyerrlab; + yyn = -yyn; + goto yyreduce; + } + + /* Count tokens shifted since error; after three, turn off error + status. */ + if (yyerrstatus) + yyerrstatus--; + + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + + yystate = yyn; + *++yyvsp = yylval; + + goto yynewstate; + + +/*-----------------------------------------------------------. +| yydefault -- do the default action for the current state. | +`-----------------------------------------------------------*/ +yydefault: + yyn = yydefact[yystate]; + if (yyn == 0) + goto yyerrlab; + goto yyreduce; + + +/*-----------------------------. +| yyreduce -- Do a reduction. | +`-----------------------------*/ +yyreduce: + /* yyn is the number of a rule to reduce with. */ + yylen = yyr2[yyn]; + + /* If YYLEN is nonzero, implement the default value of the action: + `$$ = $1'. + + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison + users should not rely upon it. Assigning to YYVAL + unconditionally makes the parser a bit smaller, and it avoids a + GCC warning that YYVAL may be used uninitialized. */ + yyval = yyvsp[1-yylen]; + + + YY_REDUCE_PRINT (yyn); + switch (yyn) + { + case 10: + + { zconf_error("unexpected end statement"); } + break; + + case 11: + + { zconf_error("unknown statement \"%s\"", (yyvsp[(2) - (4)].string)); } + break; + + case 12: + + { + zconf_error("unexpected option \"%s\"", kconf_id_strings + (yyvsp[(2) - (4)].id)->name); +} + break; + + case 13: + + { zconf_error("invalid statement"); } + break; + + case 28: + + { zconf_error("unknown option \"%s\"", (yyvsp[(1) - (3)].string)); } + break; + + case 29: + + { zconf_error("invalid option"); } + break; + + case 30: + + { + struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); + sym->flags |= SYMBOL_OPTIONAL; + menu_add_entry(sym); + printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); +} + break; + + case 31: + + { + menu_end_entry(); + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +} + break; + + case 32: + + { + struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), 0); + sym->flags |= SYMBOL_OPTIONAL; + menu_add_entry(sym); + printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); +} + break; + + case 33: + + { + if (current_entry->prompt) + current_entry->prompt->type = P_MENU; + else + zconfprint("warning: menuconfig statement without prompt"); + menu_end_entry(); + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +} + break; + + case 41: + + { + menu_set_type((yyvsp[(1) - (3)].id)->stype); + printd(DEBUG_PARSE, "%s:%d:type(%u)\n", + zconf_curname(), zconf_lineno(), + (yyvsp[(1) - (3)].id)->stype); +} + break; + + case 42: + + { + menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +} + break; + + case 43: + + { + menu_add_expr(P_DEFAULT, (yyvsp[(2) - (4)].expr), (yyvsp[(3) - (4)].expr)); + if ((yyvsp[(1) - (4)].id)->stype != S_UNKNOWN) + menu_set_type((yyvsp[(1) - (4)].id)->stype); + printd(DEBUG_PARSE, "%s:%d:default(%u)\n", + zconf_curname(), zconf_lineno(), + (yyvsp[(1) - (4)].id)->stype); +} + break; + + case 44: + + { + menu_add_symbol(P_SELECT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); + printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); +} + break; + + case 45: + + { + menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,(yyvsp[(2) - (5)].symbol), (yyvsp[(3) - (5)].symbol)), (yyvsp[(4) - (5)].expr)); + printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); +} + break; + + case 48: + + { + const struct kconf_id *id = kconf_id_lookup((yyvsp[(2) - (3)].string), strlen((yyvsp[(2) - (3)].string))); + if (id && id->flags & TF_OPTION) + menu_add_option(id->token, (yyvsp[(3) - (3)].string)); + else + zconfprint("warning: ignoring unknown option %s", (yyvsp[(2) - (3)].string)); + free((yyvsp[(2) - (3)].string)); +} + break; + + case 49: + + { (yyval.string) = NULL; } + break; + + case 50: + + { (yyval.string) = (yyvsp[(2) - (2)].string); } + break; + + case 51: + + { + struct symbol *sym = sym_lookup((yyvsp[(2) - (3)].string), SYMBOL_CHOICE); + sym->flags |= SYMBOL_AUTO; + menu_add_entry(sym); + menu_add_expr(P_CHOICE, NULL, NULL); + printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); +} + break; + + case 52: + + { + (yyval.menu) = menu_add_menu(); +} + break; + + case 53: + + { + if (zconf_endtoken((yyvsp[(1) - (1)].id), T_CHOICE, T_ENDCHOICE)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); + } +} + break; + + case 61: + + { + menu_add_prompt(P_PROMPT, (yyvsp[(2) - (4)].string), (yyvsp[(3) - (4)].expr)); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +} + break; + + case 62: + + { + if ((yyvsp[(1) - (3)].id)->stype == S_BOOLEAN || (yyvsp[(1) - (3)].id)->stype == S_TRISTATE) { + menu_set_type((yyvsp[(1) - (3)].id)->stype); + printd(DEBUG_PARSE, "%s:%d:type(%u)\n", + zconf_curname(), zconf_lineno(), + (yyvsp[(1) - (3)].id)->stype); + } else + YYERROR; +} + break; + + case 63: + + { + current_entry->sym->flags |= SYMBOL_OPTIONAL; + printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); +} + break; + + case 64: + + { + if ((yyvsp[(1) - (4)].id)->stype == S_UNKNOWN) { + menu_add_symbol(P_DEFAULT, sym_lookup((yyvsp[(2) - (4)].string), 0), (yyvsp[(3) - (4)].expr)); + printd(DEBUG_PARSE, "%s:%d:default\n", + zconf_curname(), zconf_lineno()); + } else + YYERROR; +} + break; + + case 67: + + { + printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); + menu_add_entry(NULL); + menu_add_dep((yyvsp[(2) - (3)].expr)); + (yyval.menu) = menu_add_menu(); +} + break; + + case 68: + + { + if (zconf_endtoken((yyvsp[(1) - (1)].id), T_IF, T_ENDIF)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); + } +} + break; + + case 74: + + { + menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL); +} + break; + + case 75: + + { + menu_add_entry(NULL); + menu_add_prompt(P_MENU, (yyvsp[(2) - (3)].string), NULL); + printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); +} + break; + + case 76: + + { + (yyval.menu) = menu_add_menu(); +} + break; + + case 77: + + { + if (zconf_endtoken((yyvsp[(1) - (1)].id), T_MENU, T_ENDMENU)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); + } +} + break; + + case 83: + + { + printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), (yyvsp[(2) - (3)].string)); + zconf_nextfile((yyvsp[(2) - (3)].string)); +} + break; + + case 84: + + { + menu_add_entry(NULL); + menu_add_prompt(P_COMMENT, (yyvsp[(2) - (3)].string), NULL); + printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); +} + break; + + case 85: + + { + menu_end_entry(); +} + break; + + case 86: + + { + printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); + zconf_starthelp(); +} + break; + + case 87: + + { + current_entry->help = (yyvsp[(2) - (2)].string); +} + break; + + case 92: + + { + menu_add_dep((yyvsp[(3) - (4)].expr)); + printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); +} + break; + + case 96: + + { + menu_add_visibility((yyvsp[(2) - (2)].expr)); +} + break; + + case 98: + + { + menu_add_prompt(P_PROMPT, (yyvsp[(1) - (2)].string), (yyvsp[(2) - (2)].expr)); +} + break; + + case 101: + + { (yyval.id) = (yyvsp[(1) - (2)].id); } + break; + + case 102: + + { (yyval.id) = (yyvsp[(1) - (2)].id); } + break; + + case 103: + + { (yyval.id) = (yyvsp[(1) - (2)].id); } + break; + + case 106: + + { (yyval.expr) = NULL; } + break; + + case 107: + + { (yyval.expr) = (yyvsp[(2) - (2)].expr); } + break; + + case 108: + + { (yyval.expr) = expr_alloc_symbol((yyvsp[(1) - (1)].symbol)); } + break; + + case 109: + + { (yyval.expr) = expr_alloc_comp(E_EQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); } + break; + + case 110: + + { (yyval.expr) = expr_alloc_comp(E_UNEQUAL, (yyvsp[(1) - (3)].symbol), (yyvsp[(3) - (3)].symbol)); } + break; + + case 111: + + { (yyval.expr) = (yyvsp[(2) - (3)].expr); } + break; + + case 112: + + { (yyval.expr) = expr_alloc_one(E_NOT, (yyvsp[(2) - (2)].expr)); } + break; + + case 113: + + { (yyval.expr) = expr_alloc_two(E_OR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 114: + + { (yyval.expr) = expr_alloc_two(E_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } + break; + + case 115: + + { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), 0); free((yyvsp[(1) - (1)].string)); } + break; + + case 116: + + { (yyval.symbol) = sym_lookup((yyvsp[(1) - (1)].string), SYMBOL_CONST); free((yyvsp[(1) - (1)].string)); } + break; + + case 117: + + { (yyval.string) = NULL; } + break; + + + + default: break; + } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + + *++yyvsp = yyval; + + /* Now `shift' the result of the reduction. Determine what state + that goes to, based on the state we popped back to and the rule + number reduced by. */ + + yyn = yyr1[yyn]; + + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yytable[yystate]; + else + yystate = yydefgoto[yyn - YYNTOKENS]; + + goto yynewstate; + + +/*------------------------------------. +| yyerrlab -- here on detecting error | +`------------------------------------*/ +yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + + /* If not already recovering from an error, report this error. */ + if (!yyerrstatus) + { + ++yynerrs; +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) + { + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; + } +# undef YYSYNTAX_ERROR +#endif + } + + + + if (yyerrstatus == 3) + { + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ + + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } + } + + /* Else will try to reuse lookahead token after shifting the error + token. */ + goto yyerrlab1; + + +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; + + +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ + + for (;;) + { + yyn = yypact[yystate]; + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } + + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; + + + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); + } + + *++yyvsp = yylval; + + + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); + + yystate = yyn; + goto yynewstate; + + +/*-------------------------------------. +| yyacceptlab -- YYACCEPT comes here. | +`-------------------------------------*/ +yyacceptlab: + yyresult = 0; + goto yyreturn; + +/*-----------------------------------. +| yyabortlab -- YYABORT comes here. | +`-----------------------------------*/ +yyabortlab: + yyresult = 1; + goto yyreturn; + +#if !defined(yyoverflow) || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); + yyresult = 2; + /* Fall through. */ +#endif + +yyreturn: + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } +#ifndef yyoverflow + if (yyss != yyssa) + YYSTACK_FREE (yyss); +#endif +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); +} + + + + + +void conf_parse(const char *name) +{ + struct symbol *sym; + int i; + + zconf_initscan(name); + + sym_init(); + _menu_init(); + rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); + + if (getenv("ZCONF_DEBUG")) + zconfdebug = 1; + zconfparse(); + if (zconfnerrs) + exit(1); + if (!modules_sym) + modules_sym = sym_find( "n" ); + + rootmenu.prompt->text = _(rootmenu.prompt->text); + rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); + + menu_finalize(&rootmenu); + for_all_symbols(i, sym) { + if (sym_check_deps(sym)) + zconfnerrs++; + } + if (zconfnerrs) + exit(1); + sym_set_change_count(1); +} + +static const char *zconf_tokenname(int token) +{ + switch (token) { + case T_MENU: return "menu"; + case T_ENDMENU: return "endmenu"; + case T_CHOICE: return "choice"; + case T_ENDCHOICE: return "endchoice"; + case T_IF: return "if"; + case T_ENDIF: return "endif"; + case T_DEPENDS: return "depends"; + case T_VISIBLE: return "visible"; + } + return ""; +} + +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken) +{ + if (id->token != endtoken) { + zconf_error("unexpected '%s' within %s block", + kconf_id_strings + id->name, zconf_tokenname(starttoken)); + zconfnerrs++; + return false; + } + if (current_menu->file != current_file) { + zconf_error("'%s' in different file than '%s'", + kconf_id_strings + id->name, zconf_tokenname(starttoken)); + fprintf(stderr, "%s:%d: location of the '%s'\n", + current_menu->file->name, current_menu->lineno, + zconf_tokenname(starttoken)); + zconfnerrs++; + return false; + } + return true; +} + +static void zconfprint(const char *err, ...) +{ + va_list ap; + + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void zconf_error(const char *err, ...) +{ + va_list ap; + + zconfnerrs++; + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void zconferror(const char *err) +{ + fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); +} + +static void print_quoted_string(FILE *out, const char *str) +{ + const char *p; + int len; + + putc('"', out); + while ((p = strchr(str, '"'))) { + len = p - str; + if (len) + fprintf(out, "%.*s", len, str); + fputs("\\\"", out); + str = p + 1; + } + fputs(str, out); + putc('"', out); +} + +static void print_symbol(FILE *out, struct menu *menu) +{ + struct symbol *sym = menu->sym; + struct property *prop; + + if (sym_is_choice(sym)) + fprintf(out, "\nchoice\n"); + else + fprintf(out, "\nconfig %s\n", sym->name); + switch (sym->type) { + case S_BOOLEAN: + fputs(" boolean\n", out); + break; + case S_TRISTATE: + fputs(" tristate\n", out); + break; + case S_STRING: + fputs(" string\n", out); + break; + case S_INT: + fputs(" integer\n", out); + break; + case S_HEX: + fputs(" hex\n", out); + break; + default: + fputs(" ???\n", out); + break; + } + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->menu != menu) + continue; + switch (prop->type) { + case P_PROMPT: + fputs(" prompt ", out); + print_quoted_string(out, prop->text); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_DEFAULT: + fputs( " default ", out); + expr_fprint(prop->expr, out); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_CHOICE: + fputs(" #choice value\n", out); + break; + case P_SELECT: + fputs( " select ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_RANGE: + fputs( " range ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_MENU: + fputs( " menu ", out); + print_quoted_string(out, prop->text); + fputc('\n', out); + break; + default: + fprintf(out, " unknown prop %d!\n", prop->type); + break; + } + } + if (menu->help) { + int len = strlen(menu->help); + while (menu->help[--len] == '\n') + menu->help[len] = 0; + fprintf(out, " help\n%s\n", menu->help); + } +} + +void zconfdump(FILE *out) +{ + struct property *prop; + struct symbol *sym; + struct menu *menu; + + menu = rootmenu.list; + while (menu) { + if ((sym = menu->sym)) + print_symbol(out, menu); + else if ((prop = menu->prompt)) { + switch (prop->type) { + case P_COMMENT: + fputs("\ncomment ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + case P_MENU: + fputs("\nmenu ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + default: + ; + } + if (!expr_is_yes(prop->visible.expr)) { + fputs(" depends ", out); + expr_fprint(prop->visible.expr, out); + fputc('\n', out); + } + } + + if (menu->list) + menu = menu->list; + else if (menu->next) + menu = menu->next; + else while ((menu = menu->parent)) { + if (menu->prompt && menu->prompt->type == P_MENU) + fputs("\nendmenu\n", out); + if (menu->next) { + menu = menu->next; + break; + } + } + } +} + +#include "zconf.lex.c" +#include "util.c" +#include "confdata.c" +#include "expr.c" +#include "symbol.c" +#include "menu.c" + diff --git a/support/kconfig/zconf.y b/support/kconfig/zconf.y new file mode 100644 index 0000000000..08ac041ff4 --- /dev/null +++ b/support/kconfig/zconf.y @@ -0,0 +1,733 @@ +%{ +/* + * Copyright (C) 2002 Roman Zippel + * Released under the terms of the GNU GPL v2.0. + */ + +#include +#include +#include +#include +#include +#include + +#include "lkc.h" + +#define printd(mask, fmt...) if (cdebug & (mask)) printf(fmt) + +#define PRINTD 0x0001 +#define DEBUG_PARSE 0x0002 + +int cdebug = PRINTD; + +extern int zconflex(void); +static void zconfprint(const char *err, ...); +static void zconf_error(const char *err, ...); +static void zconferror(const char *err); +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken); + +struct symbol *symbol_hash[SYMBOL_HASHSIZE]; + +static struct menu *current_menu, *current_entry; + +%} +%expect 30 + +%union +{ + char *string; + struct file *file; + struct symbol *symbol; + struct expr *expr; + struct menu *menu; + const struct kconf_id *id; +} + +%token T_MAINMENU +%token T_MENU +%token T_ENDMENU +%token T_SOURCE +%token T_CHOICE +%token T_ENDCHOICE +%token T_COMMENT +%token T_CONFIG +%token T_MENUCONFIG +%token T_HELP +%token T_HELPTEXT +%token T_IF +%token T_ENDIF +%token T_DEPENDS +%token T_OPTIONAL +%token T_PROMPT +%token T_TYPE +%token T_DEFAULT +%token T_SELECT +%token T_RANGE +%token T_VISIBLE +%token T_OPTION +%token T_ON +%token T_WORD +%token T_WORD_QUOTE +%token T_UNEQUAL +%token T_CLOSE_PAREN +%token T_OPEN_PAREN +%token T_EOL + +%left T_OR +%left T_AND +%left T_EQUAL T_UNEQUAL +%nonassoc T_NOT + +%type prompt +%type symbol +%type expr +%type if_expr +%type end +%type option_name +%type if_entry menu_entry choice_entry +%type symbol_option_arg word_opt + +%destructor { + fprintf(stderr, "%s:%d: missing end statement for this entry\n", + $$->file->name, $$->lineno); + if (current_menu == $$) + menu_end_menu(); +} if_entry menu_entry choice_entry + +%{ +/* Include zconf.hash.c here so it can see the token constants. */ +#include "zconf.hash.c" +%} + +%% +input: nl start | start; + +start: mainmenu_stmt stmt_list | stmt_list; + +stmt_list: + /* empty */ + | stmt_list common_stmt + | stmt_list choice_stmt + | stmt_list menu_stmt + | stmt_list end { zconf_error("unexpected end statement"); } + | stmt_list T_WORD error T_EOL { zconf_error("unknown statement \"%s\"", $2); } + | stmt_list option_name error T_EOL +{ + zconf_error("unexpected option \"%s\"", kconf_id_strings + $2->name); +} + | stmt_list error T_EOL { zconf_error("invalid statement"); } +; + +option_name: + T_DEPENDS | T_PROMPT | T_TYPE | T_SELECT | T_OPTIONAL | T_RANGE | T_DEFAULT | T_VISIBLE +; + +common_stmt: + T_EOL + | if_stmt + | comment_stmt + | config_stmt + | menuconfig_stmt + | source_stmt +; + +option_error: + T_WORD error T_EOL { zconf_error("unknown option \"%s\"", $1); } + | error T_EOL { zconf_error("invalid option"); } +; + + +/* config/menuconfig entry */ + +config_entry_start: T_CONFIG T_WORD T_EOL +{ + struct symbol *sym = sym_lookup($2, 0); + sym->flags |= SYMBOL_OPTIONAL; + menu_add_entry(sym); + printd(DEBUG_PARSE, "%s:%d:config %s\n", zconf_curname(), zconf_lineno(), $2); +}; + +config_stmt: config_entry_start config_option_list +{ + menu_end_entry(); + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +}; + +menuconfig_entry_start: T_MENUCONFIG T_WORD T_EOL +{ + struct symbol *sym = sym_lookup($2, 0); + sym->flags |= SYMBOL_OPTIONAL; + menu_add_entry(sym); + printd(DEBUG_PARSE, "%s:%d:menuconfig %s\n", zconf_curname(), zconf_lineno(), $2); +}; + +menuconfig_stmt: menuconfig_entry_start config_option_list +{ + if (current_entry->prompt) + current_entry->prompt->type = P_MENU; + else + zconfprint("warning: menuconfig statement without prompt"); + menu_end_entry(); + printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); +}; + +config_option_list: + /* empty */ + | config_option_list config_option + | config_option_list symbol_option + | config_option_list depends + | config_option_list help + | config_option_list option_error + | config_option_list T_EOL +; + +config_option: T_TYPE prompt_stmt_opt T_EOL +{ + menu_set_type($1->stype); + printd(DEBUG_PARSE, "%s:%d:type(%u)\n", + zconf_curname(), zconf_lineno(), + $1->stype); +}; + +config_option: T_PROMPT prompt if_expr T_EOL +{ + menu_add_prompt(P_PROMPT, $2, $3); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_DEFAULT expr if_expr T_EOL +{ + menu_add_expr(P_DEFAULT, $2, $3); + if ($1->stype != S_UNKNOWN) + menu_set_type($1->stype); + printd(DEBUG_PARSE, "%s:%d:default(%u)\n", + zconf_curname(), zconf_lineno(), + $1->stype); +}; + +config_option: T_SELECT T_WORD if_expr T_EOL +{ + menu_add_symbol(P_SELECT, sym_lookup($2, 0), $3); + printd(DEBUG_PARSE, "%s:%d:select\n", zconf_curname(), zconf_lineno()); +}; + +config_option: T_RANGE symbol symbol if_expr T_EOL +{ + menu_add_expr(P_RANGE, expr_alloc_comp(E_RANGE,$2, $3), $4); + printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno()); +}; + +symbol_option: T_OPTION symbol_option_list T_EOL +; + +symbol_option_list: + /* empty */ + | symbol_option_list T_WORD symbol_option_arg +{ + const struct kconf_id *id = kconf_id_lookup($2, strlen($2)); + if (id && id->flags & TF_OPTION) + menu_add_option(id->token, $3); + else + zconfprint("warning: ignoring unknown option %s", $2); + free($2); +}; + +symbol_option_arg: + /* empty */ { $$ = NULL; } + | T_EQUAL prompt { $$ = $2; } +; + +/* choice entry */ + +choice: T_CHOICE word_opt T_EOL +{ + struct symbol *sym = sym_lookup($2, SYMBOL_CHOICE); + sym->flags |= SYMBOL_AUTO; + menu_add_entry(sym); + menu_add_expr(P_CHOICE, NULL, NULL); + printd(DEBUG_PARSE, "%s:%d:choice\n", zconf_curname(), zconf_lineno()); +}; + +choice_entry: choice choice_option_list +{ + $$ = menu_add_menu(); +}; + +choice_end: end +{ + if (zconf_endtoken($1, T_CHOICE, T_ENDCHOICE)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endchoice\n", zconf_curname(), zconf_lineno()); + } +}; + +choice_stmt: choice_entry choice_block choice_end +; + +choice_option_list: + /* empty */ + | choice_option_list choice_option + | choice_option_list depends + | choice_option_list help + | choice_option_list T_EOL + | choice_option_list option_error +; + +choice_option: T_PROMPT prompt if_expr T_EOL +{ + menu_add_prompt(P_PROMPT, $2, $3); + printd(DEBUG_PARSE, "%s:%d:prompt\n", zconf_curname(), zconf_lineno()); +}; + +choice_option: T_TYPE prompt_stmt_opt T_EOL +{ + if ($1->stype == S_BOOLEAN || $1->stype == S_TRISTATE) { + menu_set_type($1->stype); + printd(DEBUG_PARSE, "%s:%d:type(%u)\n", + zconf_curname(), zconf_lineno(), + $1->stype); + } else + YYERROR; +}; + +choice_option: T_OPTIONAL T_EOL +{ + current_entry->sym->flags |= SYMBOL_OPTIONAL; + printd(DEBUG_PARSE, "%s:%d:optional\n", zconf_curname(), zconf_lineno()); +}; + +choice_option: T_DEFAULT T_WORD if_expr T_EOL +{ + if ($1->stype == S_UNKNOWN) { + menu_add_symbol(P_DEFAULT, sym_lookup($2, 0), $3); + printd(DEBUG_PARSE, "%s:%d:default\n", + zconf_curname(), zconf_lineno()); + } else + YYERROR; +}; + +choice_block: + /* empty */ + | choice_block common_stmt +; + +/* if entry */ + +if_entry: T_IF expr nl +{ + printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno()); + menu_add_entry(NULL); + menu_add_dep($2); + $$ = menu_add_menu(); +}; + +if_end: end +{ + if (zconf_endtoken($1, T_IF, T_ENDIF)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endif\n", zconf_curname(), zconf_lineno()); + } +}; + +if_stmt: if_entry if_block if_end +; + +if_block: + /* empty */ + | if_block common_stmt + | if_block menu_stmt + | if_block choice_stmt +; + +/* mainmenu entry */ + +mainmenu_stmt: T_MAINMENU prompt nl +{ + menu_add_prompt(P_MENU, $2, NULL); +}; + +/* menu entry */ + +menu: T_MENU prompt T_EOL +{ + menu_add_entry(NULL); + menu_add_prompt(P_MENU, $2, NULL); + printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); +}; + +menu_entry: menu visibility_list depends_list +{ + $$ = menu_add_menu(); +}; + +menu_end: end +{ + if (zconf_endtoken($1, T_MENU, T_ENDMENU)) { + menu_end_menu(); + printd(DEBUG_PARSE, "%s:%d:endmenu\n", zconf_curname(), zconf_lineno()); + } +}; + +menu_stmt: menu_entry menu_block menu_end +; + +menu_block: + /* empty */ + | menu_block common_stmt + | menu_block menu_stmt + | menu_block choice_stmt +; + +source_stmt: T_SOURCE prompt T_EOL +{ + printd(DEBUG_PARSE, "%s:%d:source %s\n", zconf_curname(), zconf_lineno(), $2); + zconf_nextfile($2); +}; + +/* comment entry */ + +comment: T_COMMENT prompt T_EOL +{ + menu_add_entry(NULL); + menu_add_prompt(P_COMMENT, $2, NULL); + printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); +}; + +comment_stmt: comment depends_list +{ + menu_end_entry(); +}; + +/* help option */ + +help_start: T_HELP T_EOL +{ + printd(DEBUG_PARSE, "%s:%d:help\n", zconf_curname(), zconf_lineno()); + zconf_starthelp(); +}; + +help: help_start T_HELPTEXT +{ + current_entry->help = $2; +}; + +/* depends option */ + +depends_list: + /* empty */ + | depends_list depends + | depends_list T_EOL + | depends_list option_error +; + +depends: T_DEPENDS T_ON expr T_EOL +{ + menu_add_dep($3); + printd(DEBUG_PARSE, "%s:%d:depends on\n", zconf_curname(), zconf_lineno()); +}; + +/* visibility option */ + +visibility_list: + /* empty */ + | visibility_list visible + | visibility_list T_EOL +; + +visible: T_VISIBLE if_expr +{ + menu_add_visibility($2); +}; + +/* prompt statement */ + +prompt_stmt_opt: + /* empty */ + | prompt if_expr +{ + menu_add_prompt(P_PROMPT, $1, $2); +}; + +prompt: T_WORD + | T_WORD_QUOTE +; + +end: T_ENDMENU T_EOL { $$ = $1; } + | T_ENDCHOICE T_EOL { $$ = $1; } + | T_ENDIF T_EOL { $$ = $1; } +; + +nl: + T_EOL + | nl T_EOL +; + +if_expr: /* empty */ { $$ = NULL; } + | T_IF expr { $$ = $2; } +; + +expr: symbol { $$ = expr_alloc_symbol($1); } + | symbol T_EQUAL symbol { $$ = expr_alloc_comp(E_EQUAL, $1, $3); } + | symbol T_UNEQUAL symbol { $$ = expr_alloc_comp(E_UNEQUAL, $1, $3); } + | T_OPEN_PAREN expr T_CLOSE_PAREN { $$ = $2; } + | T_NOT expr { $$ = expr_alloc_one(E_NOT, $2); } + | expr T_OR expr { $$ = expr_alloc_two(E_OR, $1, $3); } + | expr T_AND expr { $$ = expr_alloc_two(E_AND, $1, $3); } +; + +symbol: T_WORD { $$ = sym_lookup($1, 0); free($1); } + | T_WORD_QUOTE { $$ = sym_lookup($1, SYMBOL_CONST); free($1); } +; + +word_opt: /* empty */ { $$ = NULL; } + | T_WORD + +%% + +void conf_parse(const char *name) +{ + struct symbol *sym; + int i; + + zconf_initscan(name); + + sym_init(); + _menu_init(); + rootmenu.prompt = menu_add_prompt(P_MENU, "Buildroot Configuration", NULL); + + if (getenv("ZCONF_DEBUG")) + zconfdebug = 1; + zconfparse(); + if (zconfnerrs) + exit(1); + if (!modules_sym) + modules_sym = sym_find( "n" ); + + rootmenu.prompt->text = _(rootmenu.prompt->text); + rootmenu.prompt->text = sym_expand_string_value(rootmenu.prompt->text); + + menu_finalize(&rootmenu); + for_all_symbols(i, sym) { + if (sym_check_deps(sym)) + zconfnerrs++; + } + if (zconfnerrs) + exit(1); + sym_set_change_count(1); +} + +static const char *zconf_tokenname(int token) +{ + switch (token) { + case T_MENU: return "menu"; + case T_ENDMENU: return "endmenu"; + case T_CHOICE: return "choice"; + case T_ENDCHOICE: return "endchoice"; + case T_IF: return "if"; + case T_ENDIF: return "endif"; + case T_DEPENDS: return "depends"; + case T_VISIBLE: return "visible"; + } + return ""; +} + +static bool zconf_endtoken(const struct kconf_id *id, int starttoken, int endtoken) +{ + if (id->token != endtoken) { + zconf_error("unexpected '%s' within %s block", + kconf_id_strings + id->name, zconf_tokenname(starttoken)); + zconfnerrs++; + return false; + } + if (current_menu->file != current_file) { + zconf_error("'%s' in different file than '%s'", + kconf_id_strings + id->name, zconf_tokenname(starttoken)); + fprintf(stderr, "%s:%d: location of the '%s'\n", + current_menu->file->name, current_menu->lineno, + zconf_tokenname(starttoken)); + zconfnerrs++; + return false; + } + return true; +} + +static void zconfprint(const char *err, ...) +{ + va_list ap; + + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void zconf_error(const char *err, ...) +{ + va_list ap; + + zconfnerrs++; + fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); + va_start(ap, err); + vfprintf(stderr, err, ap); + va_end(ap); + fprintf(stderr, "\n"); +} + +static void zconferror(const char *err) +{ + fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err); +} + +static void print_quoted_string(FILE *out, const char *str) +{ + const char *p; + int len; + + putc('"', out); + while ((p = strchr(str, '"'))) { + len = p - str; + if (len) + fprintf(out, "%.*s", len, str); + fputs("\\\"", out); + str = p + 1; + } + fputs(str, out); + putc('"', out); +} + +static void print_symbol(FILE *out, struct menu *menu) +{ + struct symbol *sym = menu->sym; + struct property *prop; + + if (sym_is_choice(sym)) + fprintf(out, "\nchoice\n"); + else + fprintf(out, "\nconfig %s\n", sym->name); + switch (sym->type) { + case S_BOOLEAN: + fputs(" boolean\n", out); + break; + case S_TRISTATE: + fputs(" tristate\n", out); + break; + case S_STRING: + fputs(" string\n", out); + break; + case S_INT: + fputs(" integer\n", out); + break; + case S_HEX: + fputs(" hex\n", out); + break; + default: + fputs(" ???\n", out); + break; + } + for (prop = sym->prop; prop; prop = prop->next) { + if (prop->menu != menu) + continue; + switch (prop->type) { + case P_PROMPT: + fputs(" prompt ", out); + print_quoted_string(out, prop->text); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_DEFAULT: + fputs( " default ", out); + expr_fprint(prop->expr, out); + if (!expr_is_yes(prop->visible.expr)) { + fputs(" if ", out); + expr_fprint(prop->visible.expr, out); + } + fputc('\n', out); + break; + case P_CHOICE: + fputs(" #choice value\n", out); + break; + case P_SELECT: + fputs( " select ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_RANGE: + fputs( " range ", out); + expr_fprint(prop->expr, out); + fputc('\n', out); + break; + case P_MENU: + fputs( " menu ", out); + print_quoted_string(out, prop->text); + fputc('\n', out); + break; + default: + fprintf(out, " unknown prop %d!\n", prop->type); + break; + } + } + if (menu->help) { + int len = strlen(menu->help); + while (menu->help[--len] == '\n') + menu->help[len] = 0; + fprintf(out, " help\n%s\n", menu->help); + } +} + +void zconfdump(FILE *out) +{ + struct property *prop; + struct symbol *sym; + struct menu *menu; + + menu = rootmenu.list; + while (menu) { + if ((sym = menu->sym)) + print_symbol(out, menu); + else if ((prop = menu->prompt)) { + switch (prop->type) { + case P_COMMENT: + fputs("\ncomment ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + case P_MENU: + fputs("\nmenu ", out); + print_quoted_string(out, prop->text); + fputs("\n", out); + break; + default: + ; + } + if (!expr_is_yes(prop->visible.expr)) { + fputs(" depends ", out); + expr_fprint(prop->visible.expr, out); + fputc('\n', out); + } + } + + if (menu->list) + menu = menu->list; + else if (menu->next) + menu = menu->next; + else while ((menu = menu->parent)) { + if (menu->prompt && menu->prompt->type == P_MENU) + fputs("\nendmenu\n", out); + if (menu->next) { + menu = menu->next; + break; + } + } + } +} + +#include "zconf.lex.c" +#include "util.c" +#include "confdata.c" +#include "expr.c" +#include "symbol.c" +#include "menu.c" diff --git a/support/legal-info/README.header b/support/legal-info/README.header new file mode 100644 index 0000000000..d07c45d912 --- /dev/null +++ b/support/legal-info/README.header @@ -0,0 +1,24 @@ +Most of the packages that were used by Buildroot to produce the image files, +including Buildroot itself, have open-source licenses. It is your +responsibility to comply to the requirements of these licenses. +To make this easier for you, Buildroot collected in this directory some +material you may need to get it done. + +This material is composed of the following items. + * The scripts used to control compilation of the packages and the generation + of image files, i.e. the Buildroot sources. + Note: this has not been saved due to technical limitations, you must + collect it manually. + * The Buildroot configuration file; this has been saved in buildroot.config. + * The toolchain (cross-compiler and related tools) used to generate all the + compiled programs. + Note: this may have not been saved due to technical limitations, you may + need to collect it manually. + * The source code for all packages; this has been saved in the sources/ + subdirectory (except for the non-redistributable packages, which have not + been saved); patches applied to some packages by Buildroot are included in + the Buildroot sources and were not duplicated in the sources/ subdirectory. + * A manifest file listing the configured packages and related information. + * The license text of the packages; they have been saved in the licenses/ + subdirectory. + diff --git a/support/legal-info/README.warnings-header b/support/legal-info/README.warnings-header new file mode 100644 index 0000000000..cd0829069c --- /dev/null +++ b/support/legal-info/README.warnings-header @@ -0,0 +1,4 @@ +Due to technical limitations or lack of license definition in the package +makefile, some of the material listed above could not been saved, as the +following list details. + diff --git a/support/libtool/buildroot-libtool-v1.5.patch b/support/libtool/buildroot-libtool-v1.5.patch new file mode 100644 index 0000000000..cdd9c5a0ad --- /dev/null +++ b/support/libtool/buildroot-libtool-v1.5.patch @@ -0,0 +1,91 @@ +--- a/ltmain.sh 2014-07-31 10:43:01.634568799 -0300 ++++ b/ltmain.sh 2014-07-31 10:44:14.032018999 -0300 +@@ -226,8 +226,9 @@ + # line option must be used. + if test -z "$tagname"; then + $echo "$modename: unable to infer tagged configuration" +- $echo "$modename: specify a tag with \`--tag'" 1>&2 +- exit $EXIT_FAILURE ++ $echo "$modename: defaulting to \`CC'" ++ $echo "$modename: if this is not correct, specify a tag with \`--tag'" ++# exit $EXIT_FAILURE + # else + # $echo "$modename: using $tagname tagged configuration" + fi +@@ -247,6 +248,11 @@ + arg="$1" + shift + ++ # Make -static behave as -all-static ++ case $arg in ++ -static) arg="-all-static" ;; ++ esac ++ + case $arg in + -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; + *) optarg= ;; +@@ -1238,7 +1244,8 @@ + prevarg="$arg" + + case $arg in +- -all-static) ++ # Make -static behave like -all-static ++ -all-static | -static) + if test -n "$link_static_flag"; then + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" +@@ -2146,8 +2153,14 @@ + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$libdir" +- absdir="$libdir" ++ # Adding 'libdir' from the .la file to our library search paths ++ # breaks crosscompilation horribly. We cheat here and don't add ++ # it, instead adding the path where we found the .la. -CL ++ dir="$abs_ladir" ++ absdir="$abs_ladir" ++ libdir="$abs_ladir" ++ #dir="$libdir" ++ #absdir="$libdir" + fi + else + dir="$ladir/$objdir" +@@ -2272,7 +2285,7 @@ + { test "$prefer_static_libs" = no || test -z "$old_library"; }; then + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" +- need_relink=yes ++ need_relink=no + fi + # This is a shared library + +@@ -5169,6 +5182,10 @@ + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do ++ # Replacing uninstalled with installed can easily break crosscompilation, ++ # since the installed path is generally the wrong architecture. -CL ++ newdependency_libs="$newdependency_libs $deplib" ++ continue + case $deplib in + *.la) + name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` +@@ -5487,10 +5504,13 @@ + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- if test "$inst_prefix_dir" = "$destdir"; then +- $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 +- exit $EXIT_FAILURE +- fi ++ # ++ # This breaks install into our staging area. -PB ++ # ++ # if test "$inst_prefix_dir" = "$destdir"; then ++ # $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 ++ # exit $EXIT_FAILURE ++ # fi + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. diff --git a/support/libtool/buildroot-libtool-v2.2.patch b/support/libtool/buildroot-libtool-v2.2.patch new file mode 100644 index 0000000000..8bb7826857 --- /dev/null +++ b/support/libtool/buildroot-libtool-v2.2.patch @@ -0,0 +1,106 @@ +--- a/ltmain.sh 2010-06-09 15:08:53.000000000 +0200 ++++ b/ltmain.sh 2014-07-30 22:33:41.176710372 +0200 +@@ -1214,8 +1214,8 @@ + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then +- func_echo "unable to infer tagged configuration" +- func_fatal_error "specify a tag with \`--tag'" ++ func_echo "defaulting to \`CC'" ++ func_echo "if this is not correct, specify a tag with \`--tag'" + # else + # func_verbose "using $tagname tagged configuration" + fi +@@ -2239,8 +2239,11 @@ + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- test "$inst_prefix_dir" = "$destdir" && \ +- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" ++ # ++ # This breaks install into our staging area. -PB ++ # ++ # test "$inst_prefix_dir" = "$destdir" && \ ++ # func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. +@@ -4429,7 +4432,8 @@ + ;; + -all-static | -static | -static-libtool-libs) + case $arg in +- -all-static) ++ # Make -static behave like -all-static ++ -all-static | -static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi +@@ -4438,12 +4442,6 @@ + fi + prefer_static_libs=yes + ;; +- -static) +- if test -z "$pic_flag" && test -n "$link_static_flag"; then +- dlopen_self=$dlopen_self_static +- fi +- prefer_static_libs=built +- ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static +@@ -4726,7 +4724,8 @@ + prevarg="$arg" + + case $arg in +- -all-static) ++ # Make -static behave like -all-static ++ -all-static | -static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" +@@ -4995,7 +4994,7 @@ + continue + ;; + +- -static | -static-libtool-libs) ++ -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects +@@ -5739,8 +5738,14 @@ + absdir="$abs_ladir" + libdir="$abs_ladir" + else +- dir="$libdir" +- absdir="$libdir" ++ # Adding 'libdir' from the .la file to our library search paths ++ # breaks crosscompilation horribly. We cheat here and don't add ++ # it, instead adding the path where we found the .la. -CL ++ dir="$abs_ladir" ++ absdir="$abs_ladir" ++ libdir="$abs_ladir" ++ #dir="$libdir" ++ #absdir="$libdir" + fi + test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes + else +@@ -5891,7 +5896,7 @@ + *) + if test "$installed" = no; then + notinst_deplibs="$notinst_deplibs $lib" +- need_relink=yes ++ need_relink=no + fi + ;; + esac +@@ -8373,6 +8378,10 @@ + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do ++ # Replacing uninstalled with installed can easily break crosscompilation, ++ # since the installed path is generally the wrong architecture. -CL ++ newdependency_libs="$newdependency_libs $deplib" ++ continue + case $deplib in + *.la) + func_basename "$deplib" diff --git a/support/libtool/buildroot-libtool-v2.4.4.patch b/support/libtool/buildroot-libtool-v2.4.4.patch new file mode 100644 index 0000000000..bcdf30c786 --- /dev/null +++ b/support/libtool/buildroot-libtool-v2.4.4.patch @@ -0,0 +1,95 @@ +Libtool fixes for cross-compilation, many past contributors/authors. +Update based on libtool-2.4.4, useful for 2.4.3 as well but not 2.4.2. + +Signed-off-by: Gustavo Zacarias + +--- a/ltmain.sh 2014-12-16 09:51:23.068441045 -0300 ++++ b/ltmain.sh 2014-12-16 09:57:10.509430339 -0300 +@@ -2687,8 +2687,8 @@ + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then +- func_echo "unable to infer tagged configuration" +- func_fatal_error "specify a tag with '--tag'" ++ func_echo "defaulting to \`CC'" ++ func_echo "if this is not correct, specify a tag with \`--tag'" + # else + # func_verbose "using $tagname tagged configuration" + fi +@@ -4277,8 +4277,12 @@ + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- test "$inst_prefix_dir" = "$destdir" && \ +- func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" ++ ++ # ++ # This breaks install into our staging area. -PB ++ # ++ #test "$inst_prefix_dir" = "$destdir" && \ ++ # func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. +@@ -6550,7 +6554,8 @@ + ;; + -all-static | -static | -static-libtool-libs) + case $arg in +- -all-static) ++ # Make -static behave like -all-static -GZ ++ -all-static | -static) + if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi +@@ -6559,12 +6564,6 @@ + fi + prefer_static_libs=yes + ;; +- -static) +- if test -z "$pic_flag" && test -n "$link_static_flag"; then +- dlopen_self=$dlopen_self_static +- fi +- prefer_static_libs=built +- ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static +@@ -6858,7 +6857,8 @@ + prevarg=$arg + + case $arg in +- -all-static) ++ # Make -static behave like -all-static -GZ ++ -all-static | -static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" +@@ -7149,7 +7149,7 @@ + continue + ;; + +- -static | -static-libtool-libs) ++ -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects +@@ -8112,7 +8112,7 @@ + *) + if test no = "$installed"; then + func_append notinst_deplibs " $lib" +- need_relink=yes ++ need_relink=no + fi + ;; + esac +@@ -10710,6 +10710,10 @@ + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do ++ # Replacing uninstalled with installed can easily break crosscompilation, ++ # since the installed path is generally the wrong architecture. -CL ++ newdependency_libs="$newdependency_libs $deplib" ++ continue + case $deplib in + *.la) + func_basename "$deplib" diff --git a/support/libtool/buildroot-libtool-v2.4.patch b/support/libtool/buildroot-libtool-v2.4.patch new file mode 100644 index 0000000000..f610b1b3ed --- /dev/null +++ b/support/libtool/buildroot-libtool-v2.4.patch @@ -0,0 +1,89 @@ +--- a/ltmain.sh 2014-07-30 22:21:24.664684143 +0200 ++++ b/ltmain.sh 2014-07-30 22:23:02.440687625 +0200 +@@ -1417,8 +1417,8 @@ + # was found and let the user know that the "--tag" command + # line option must be used. + if test -z "$tagname"; then +- func_echo "unable to infer tagged configuration" +- func_fatal_error "specify a tag with \`--tag'" ++ func_echo "defaulting to \`CC'" ++ func_echo "if this is not correct, specify a tag with \`--tag'" + # else + # func_verbose "using $tagname tagged configuration" + fi +@@ -2963,8 +2963,11 @@ + # At present, this check doesn't affect windows .dll's that + # are installed into $libdir/../bin (currently, that works fine) + # but it's something to keep an eye on. +- test "$inst_prefix_dir" = "$destdir" && \ +- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" ++ # ++ # This breaks install into our staging area. -PB ++ # ++ # test "$inst_prefix_dir" = "$destdir" && \ ++ # func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" + + if test -n "$inst_prefix_dir"; then + # Stick the inst_prefix_dir data into the link command. +@@ -5176,7 +5179,8 @@ + ;; + -all-static | -static | -static-libtool-libs) + case $arg in +- -all-static) ++ # Make -static behave like -all-static ++ -all-static | -static) + if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then + func_warning "complete static linking is impossible in this configuration" + fi +@@ -5185,12 +5189,6 @@ + fi + prefer_static_libs=yes + ;; +- -static) +- if test -z "$pic_flag" && test -n "$link_static_flag"; then +- dlopen_self=$dlopen_self_static +- fi +- prefer_static_libs=built +- ;; + -static-libtool-libs) + if test -z "$pic_flag" && test -n "$link_static_flag"; then + dlopen_self=$dlopen_self_static +@@ -5473,7 +5471,8 @@ + prevarg="$arg" + + case $arg in +- -all-static) ++ # Make -static behave like -all-static ++ -all-static | -static) + if test -n "$link_static_flag"; then + # See comment for -static flag below, for more details. + func_append compile_command " $link_static_flag" +@@ -5754,7 +5753,7 @@ + continue + ;; + +- -static | -static-libtool-libs) ++ -static-libtool-libs) + # The effects of -static are defined in a previous loop. + # We used to do the same as -all-static on platforms that + # didn't have a PIC flag, but the assumption that the effects +@@ -6697,7 +6696,7 @@ + *) + if test "$installed" = no; then + func_append notinst_deplibs " $lib" +- need_relink=yes ++ need_relink=no + fi + ;; + esac +@@ -9275,6 +9274,10 @@ + # Replace all uninstalled libtool libraries with the installed ones + newdependency_libs= + for deplib in $dependency_libs; do ++ # Replacing uninstalled with installed can easily break crosscompilation, ++ # since the installed path is generally the wrong architecture. -CL ++ newdependency_libs="$newdependency_libs $deplib" ++ continue + case $deplib in + *.la) + func_basename "$deplib" diff --git a/support/misc/Vagrantfile b/support/misc/Vagrantfile new file mode 100644 index 0000000000..b8f02afc77 --- /dev/null +++ b/support/misc/Vagrantfile @@ -0,0 +1,56 @@ +################################################################################ +# +# Vagrantfile +# +################################################################################ + +# Buildroot version to use +RELEASE='2016.02' + +### Change here for more memory/cores ### +VM_MEMORY=2048 +VM_CORES=1 + +Vagrant.configure('2') do |config| + config.vm.box = 'ubuntu/trusty64' + + config.vm.provider :vmware_fusion do |v, override| + v.vmx['memsize'] = VM_MEMORY + v.vmx['numvcpus'] = VM_CORES + end + + config.vm.provider :virtualbox do |v, override| + v.memory = VM_MEMORY + v.cpus = VM_CORES + + required_plugins = %w( vagrant-vbguest ) + required_plugins.each do |plugin| + system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin + end + end + + config.vm.provision 'shell' do |s| + s.inline = 'echo Setting up machine name' + + config.vm.provider :vmware_fusion do |v, override| + v.vmx['displayname'] = "Buildroot #{RELEASE}" + end + + config.vm.provider :virtualbox do |v, override| + v.name = "Buildroot #{RELEASE}" + end + end + + config.vm.provision 'shell', inline: + "sudo dpkg --add-architecture i386 + sudo apt-get -q update + sudo apt-get -q -y install build-essential libncurses5-dev \ + git bzr cvs mercurial subversion libc6:i386 unzip + sudo apt-get -q -y autoremove + sudo apt-get -q -y clean" + + config.vm.provision 'shell', privileged: false, inline: + "echo 'Downloading and extracting buildroot #{RELEASE}' + wget -q -c http://buildroot.org/downloads/buildroot-#{RELEASE}.tar.gz + tar axf buildroot-#{RELEASE}.tar.gz" +end diff --git a/support/misc/target-dir-warning.txt b/support/misc/target-dir-warning.txt new file mode 100644 index 0000000000..90f88414b7 --- /dev/null +++ b/support/misc/target-dir-warning.txt @@ -0,0 +1,29 @@ +Warning! +======== + +This directory does *not* contain the root filesystem that you can use +on your embedded system. Since Buildroot does not run as root, it +cannot create device files and set the permissions and ownership of +files correctly in this directory to make it usable as a root +filesystem. + +For that reason, do *not* use the contents of this directory to mount +your root filesystem over NFS or copy the contents of this directory +to a SD card or USB key, thinking it will work as the root filesystem +for your embedded system. It will simply *not* work. + +Instead, if you need a usable root filesystem, please select one of +the filesystem image formats available in the Buildroot configuration +interface (make menuconfig or others) in the "Filesystem images" +sub-menu. If you want to get a filesystem image that you can easily +extract to your SD card or to some directory exposed through NFS, +please use the "tar the root filesystem" option. It will generate a +images/rootfs.tar image in your Buildroot output directory, which you +can extract as root: + + sudo tar -C /destination/of/extraction -xf images/rootfs.tar + +Those image files are created using the contents of the target/ +directory, but there is a post-processing step to create device files +and set owernship/permissions properly even if Buildroot does not run +as root. diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in new file mode 100644 index 0000000000..5cf381e96c --- /dev/null +++ b/support/misc/toolchainfile.cmake.in @@ -0,0 +1,31 @@ +# +# Automatically generated file; DO NOT EDIT. +# CMake toolchain file for Buildroot +# + +# In order to allow the toolchain to be relocated, we calculate the +# HOST_DIR based on this file's location: $(HOST_DIR)/usr/share/buildroot +# and store it in RELOCATED_HOST_DIR. +# All the other variables that need to refer to HOST_DIR will use the +# RELOCATED_HOST_DIR variable. +string(REPLACE "/usr/share/buildroot" "" RELOCATED_HOST_DIR ${CMAKE_CURRENT_LIST_DIR}) + +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR @@CMAKE_SYSTEM_PROCESSOR@@) + +set(CMAKE_C_FLAGS "@@TARGET_CFLAGS@@ ${CMAKE_C_FLAGS}" CACHE STRING "Buildroot CFLAGS") +set(CMAKE_CXX_FLAGS "@@TARGET_CXXFLAGS@@ ${CMAKE_CXX_FLAGS}" CACHE STRING "Buildroot CXXFLAGS") +set(CMAKE_EXE_LINKER_FLAGS "@@TARGET_LDFLAGS@@ ${CMAKE_EXE_LINKER_FLAGS}" CACHE STRING "Buildroot LDFLAGS") +set(CMAKE_INSTALL_SO_NO_EXE 0) + +set(CMAKE_PROGRAM_PATH "${RELOCATED_HOST_DIR}/usr/bin") +set(CMAKE_FIND_ROOT_PATH "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@") +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@") + +# This toolchain file can be used both inside and outside Buildroot. +set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC@@") +set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX@@") diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh new file mode 100755 index 0000000000..201278dde7 --- /dev/null +++ b/support/scripts/apply-patches.sh @@ -0,0 +1,153 @@ +#!/usr/bin/env bash +# A little script I whipped up to make it easy to +# patch source trees and have sane error handling +# -Erik +# +# (c) 2002 Erik Andersen +# +# Parameters: +# - "-s", optional. Silent operation, don't print anything if there +# isn't any error. +# - the build directory, optional, default value is '.'. The place where are +# the package sources. +# - the patch directory, optional, default '../kernel-patches'. The place +# where are the scripts you want to apply. +# - other parameters are the patch name patterns, optional, default value is +# '*'. Pattern(s) describing the patch names you want to apply. +# +# The script will look recursively for patches from the patch directory. If a +# file named 'series' exists then the patches mentioned in it will be applied +# as plain patches, regardless of their file name. If no 'series' file exists, +# the script will look for file names matching pattern(s). If the name +# ends with '.tar.*', '.tbz2' or '.tgz', the file is considered as an archive +# and will be uncompressed into a directory named +# '.patches-name_of_the_archive-unpacked'. It's the turn of this directory to +# be scanned with '*' as pattern. Remember that scanning is recursive. Other +# files than series file and archives are considered as a patch. +# +# Once a patch is found, the script will try to apply it. If its name doesn't +# end with '.gz', '.bz', '.bz2', '.xz', '.zip', '.Z', '.diff*' or '.patch*', +# it will be skipped. If necessary, the patch will be uncompressed before being +# applied. The list of the patches applied is stored in '.applied_patches_list' +# file in the build directory. + +silent= +if [ "$1" = "-s" ] ; then + # add option to be used by the patch tool + silent=-s + shift +fi + +# Set directories from arguments, or use defaults. +builddir=${1-.} +patchdir=${2-../kernel-patches} +shift 2 +patchpattern=${@-*} + +# use a well defined sorting order +export LC_COLLATE=C + +if [ ! -d "${builddir}" ] ; then + echo "Aborting. '${builddir}' is not a directory." + exit 1 +fi +if [ ! -d "${patchdir}" ] ; then + echo "Aborting. '${patchdir}' is not a directory." + exit 1 +fi + +# Remove any rejects present BEFORE patching - Because if there are +# any, even if patches are well applied, at the end it will complain +# about rejects in builddir. +find ${builddir}/ '(' -name '*.rej' -o -name '.*.rej' ')' -print0 | \ + xargs -0 -r rm -f + +function apply_patch { + path=$1 + patch=$2 + if [ "$3" ]; then + type="series"; uncomp="cat" + else + case "$patch" in + *.gz) + type="gzip"; uncomp="gunzip -dc"; ;; + *.bz) + type="bzip"; uncomp="bunzip -dc"; ;; + *.bz2) + type="bzip2"; uncomp="bunzip2 -dc"; ;; + *.xz) + type="xz"; uncomp="unxz -dc"; ;; + *.zip) + type="zip"; uncomp="unzip -d"; ;; + *.Z) + type="compress"; uncomp="uncompress -c"; ;; + *.diff*) + type="diff"; uncomp="cat"; ;; + *.patch*) + type="patch"; uncomp="cat"; ;; + *) + echo "Unsupported file type for ${path}/${patch}, skipping"; + return 0 + ;; + esac + fi + if [ -z "$silent" ] ; then + echo "" + echo "Applying $patch using ${type}: " + fi + if [ ! -e "${path}/$patch" ] ; then + echo "Error: missing patch file ${path}/$patch" + exit 1 + fi + echo $patch >> ${builddir}/.applied_patches_list + ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N $silent + if [ $? != 0 ] ; then + echo "Patch failed! Please fix ${patch}!" + exit 1 + fi +} + +function scan_patchdir { + local path=$1 + shift 1 + patches=${@-*} + + # If there is a series file, use it instead of using ls sort order + # to apply patches. Skip line starting with a dash. + if [ -e "${path}/series" ] ; then + # The format of a series file accepts a second field that is + # used to specify the number of directory components to strip + # when applying the patch, in the form -pN (N an integer >= 0) + # We assume this field to always be -p1 whether it is present + # or missing. + series_patches="`grep -Ev "^#" ${path}/series | cut -d ' ' -f1 2> /dev/null`" + for i in $series_patches; do + apply_patch "$path" "$i" series + done + else + for i in `cd $path; ls -d $patches 2> /dev/null` ; do + if [ -d "${path}/$i" ] ; then + scan_patchdir "${path}/$i" + elif echo "$i" | grep -q -E "\.tar(\..*)?$|\.tbz2?$|\.tgz$" ; then + unpackedarchivedir="$builddir/.patches-$(basename $i)-unpacked" + rm -rf "$unpackedarchivedir" 2> /dev/null + mkdir "$unpackedarchivedir" + tar -C "$unpackedarchivedir" -xaf "${path}/$i" + scan_patchdir "$unpackedarchivedir" + else + apply_patch "$path" "$i" + fi + done + fi +} + +scan_patchdir "$patchdir" "$patchpattern" + +# Check for rejects... +if [ "`find $builddir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ] ; then + echo "Aborting. Reject files found." + exit 1 +fi + +# Remove backup files +find $builddir/ '(' -name '*.orig' -o -name '.*.orig' ')' -exec rm -f {} \; diff --git a/support/scripts/check-host-rpath b/support/scripts/check-host-rpath new file mode 100755 index 0000000000..48d69dae63 --- /dev/null +++ b/support/scripts/check-host-rpath @@ -0,0 +1,71 @@ +#!/usr/bin/env bash + +# This script scans $(HOST_DIR)/{bin,sbin} for all ELF files, and checks +# they have an RPATH to $(HOST_DIR)/usr/lib if they need libraries from +# there. + +# Override the user's locale so we are sure we can parse the output of +# readelf(1) and file(1) +export LC_ALL=C + +main() { + local pkg="${1}" + local hostdir="${2}" + local file ret + + # Remove duplicate and trailing '/' for proper match + hostdir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${hostdir}" )" + + ret=0 + while read file; do + elf_needs_rpath "${file}" "${hostdir}" || continue + check_elf_has_rpath "${file}" "${hostdir}" && continue + if [ ${ret} -eq 0 ]; then + ret=1 + printf "***\n" + printf "*** ERROR: package %s installs executables without proper RPATH:\n" "${pkg}" + fi + printf "*** %s\n" "${file}" + done < <( find "${hostdir}"/usr/{bin,sbin} -type f -exec file {} + 2>/dev/null \ + |sed -r -e '/^([^:]+):.*\.*\.*/!d' \ + -e 's//\1/' \ + ) + + return ${ret} +} + +elf_needs_rpath() { + local file="${1}" + local hostdir="${2}" + local lib + + while read lib; do + [ -e "${hostdir}/usr/lib/${lib}" ] && return 0 + done < <( readelf -d "${file}" \ + |sed -r -e '/^.* \(NEEDED\) .*Shared library: \[(.+)\]$/!d;' \ + -e 's//\1/;' \ + ) + + return 1 +} + +check_elf_has_rpath() { + local file="${1}" + local hostdir="${2}" + local rpath dir + + while read rpath; do + for dir in ${rpath//:/ }; do + # Remove duplicate and trailing '/' for proper match + dir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${dir}" )" + [ "${dir}" = "${hostdir}/usr/lib" ] && return 0 + done + done < <( readelf -d "${file}" \ + |sed -r -e '/.* \(R(UN)?PATH\) +Library r(un)?path: \[(.+)\]$/!d' \ + -e 's//\3/;' \ + ) + + return 1 +} + +main "${@}" diff --git a/support/scripts/check-kernel-headers.sh b/support/scripts/check-kernel-headers.sh new file mode 100755 index 0000000000..a8cca78b27 --- /dev/null +++ b/support/scripts/check-kernel-headers.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +SYSROOT="${1}" +# Make sure we have enough version components +HDR_VER="${2}.0.0" + +HDR_M="${HDR_VER%%.*}" +HDR_V="${HDR_VER#*.}" +HDR_m="${HDR_V%%.*}" + +EXEC="$(mktemp -t check-headers.XXXXXX)" + +# We do not want to account for the patch-level, since headers are +# not supposed to change for different patchlevels, so we mask it out. +# This only applies to kernels >= 3.0, but those are the only one +# we actually care about; we treat all 2.6.x kernels equally. +${HOSTCC} -imacros "${SYSROOT}/usr/include/linux/version.h" \ + -x c -o "${EXEC}" - <<_EOF_ +#include +#include + +int main(int argc __attribute__((unused)), + char** argv __attribute__((unused))) +{ + if((LINUX_VERSION_CODE & ~0xFF) + != KERNEL_VERSION(${HDR_M},${HDR_m},0)) + { + printf("Incorrect selection of kernel headers: "); + printf("expected %d.%d.x, got %d.%d.x\n", ${HDR_M}, ${HDR_m}, + ((LINUX_VERSION_CODE>>16) & 0xFF), + ((LINUX_VERSION_CODE>>8) & 0xFF)); + return 1; + } + return 0; +} +_EOF_ + +"${EXEC}" +ret=${?} +rm -f "${EXEC}" +exit ${ret} diff --git a/support/scripts/eclipse-register-toolchain b/support/scripts/eclipse-register-toolchain new file mode 100755 index 0000000000..6f919985c0 --- /dev/null +++ b/support/scripts/eclipse-register-toolchain @@ -0,0 +1,76 @@ +#!/bin/sh + +# This script registers the toolchain of a Buildroot project into the +# Eclipse plugin. To do so, it adds a new line for the Buildroot +# toolchain into the $HOME/.buildroot-eclipse.toolchains file, which +# the Eclipse Buildroot plugin reads to discover automatically the +# available Buildroot toolchains on the system. +# +# This script should typically not be called manually. Instead, one +# should enable the BR2_ECLIPSE_REGISTER configuration option, which +# will lead Buildroot to automatically call this script with the +# appropriate arguments. +# +# Usage: +# eclipse-register-toolchain project-directory toolchain-prefix architecture +# +# project-directory is the absolute path to the Buildroot project +# output directory (which contains the host/, target/, build/, +# images/, etc. subdirectories). It should be an absolute and +# canonical path. +# +# toolchain-prefix is the prefix of the cross-compilation tools, i.e +# 'arm-linux-' if the cross-compiler executable is 'arm-linux-gcc'. +# +# architecture is the lower-cased name of the architecture targetted +# by the Buildroot project. + +if test $# -ne 3; then + echo "Invalid number of arguments." + echo "Usage: $0 project-directory toolchain-prefix architecture" + exit 1 +fi + +project_directory=$1 +toolchain_prefix=$2 +architecture=$3 + +if test ! -d ${project_directory} ; then + echo "Non-existing project directory ${project_directory}" + exit 1 +fi + +if test ! -d ${project_directory}/host ; then + echo "Your project directory does not look like a Buildroot output" + exit 1 +fi + +if test ! -e ${project_directory}/host/usr/bin/${toolchain_prefix}gcc ; then + echo "Cannot find the cross-compiler in the project directory" + exit 1 +fi + +TOOLCHAIN_ECLIPSE_FILE=${HOME}/.buildroot-eclipse.toolchains + +# First, we remove all lines from the ${TOOLCHAIN_ECLISPE_FILE} that +# correspond to toolchains that no longer exist. +if test -f ${TOOLCHAIN_ECLIPSE_FILE} ; then + mv ${TOOLCHAIN_ECLIPSE_FILE} ${TOOLCHAIN_ECLIPSE_FILE}.tmp + cat ${TOOLCHAIN_ECLIPSE_FILE}.tmp | while read toolchain ; do + path=$(echo ${toolchain} | cut -f1 -d ':') + # Filter lines corresponding to still existing projects + echo "Testing ${path} ..." + if ! test -d ${path} ; then + continue + fi + # .. and the current project + if test ${path} = ${project_directory} ; then + continue + fi + echo ${toolchain} >> ${TOOLCHAIN_ECLIPSE_FILE} + done + rm ${TOOLCHAIN_ECLIPSE_FILE}.tmp +fi + +# Add the toolchain +echo "${project_directory}:${toolchain_prefix}:${architecture}" >> ${TOOLCHAIN_ECLIPSE_FILE} diff --git a/support/scripts/expunge-gconv-modules b/support/scripts/expunge-gconv-modules new file mode 100755 index 0000000000..03012c1ce3 --- /dev/null +++ b/support/scripts/expunge-gconv-modules @@ -0,0 +1,59 @@ +#!/usr/bin/env bash + +# This script is used to generate a gconv-modules file that takes into +# account only the gconv modules installed by Buildroot. It receives +# on its standard input the original complete gconv-modules file from +# the toolchain, and as arguments the list of gconv modules that were +# actually installed, and writes on its standard output the new +# gconv-modules file. + +# The format of gconv-modules is precisely documented in the +# file itself. It consists of two different directives: +# module FROMSET TOSET FILENAME COST +# alias ALIAS REALNAME +# and that's what this script parses and generates. +# +# There are two kinds of 'module' directives: +# - the first defines conversion of a charset to/from INTERNAL representation +# - the second defines conversion of a charset to/from another charset +# we handle each with slightly different code, since the second never has +# associated aliases. + +gawk -v files="${1}" ' +$1 == "alias" { + aliases[$3] = aliases[$3] " " $2; +} +$1 == "module" && $2 != "INTERNAL" && $3 == "INTERNAL" { + file2internals[$4] = file2internals[$4] " " $2; + mod2cost[$2] = $5; +} +$1 == "module" && $2 != "INTERNAL" && $3 != "INTERNAL" { + file2cset[$4] = file2cset[$4] " " $2 ":" $3; + mod2cost[$2] = $5; +} + +END { + nb_files = split(files, all_files); + for(f = 1; f <= nb_files; f++) { + file = all_files[f]; + printf("# Modules and aliases for: %s\n", file); + nb_mods = split(file2internals[file], mods); + for(i = 1; i <= nb_mods; i++) { + nb_aliases = split(aliases[mods[i]], mod_aliases); + for(j = 1; j <= nb_aliases; j++) { + printf("alias\t%s\t%s\n", mod_aliases[j], mods[i]); + } + printf("module\t%s\t%s\t%s\t%d\n", mods[i], "INTERNAL", file, mod2cost[mods[i]]); + printf("module\t%s\t%s\t%s\t%d\n", "INTERNAL", mods[i], file, mod2cost[mods[i]]); + printf("\n" ); + } + printf("%s", nb_mods != 0 ? "\n" : ""); + nb_csets = split(file2cset[file], csets); + for(i = 1; i <= nb_csets; i++) { + split(csets[i], cs, ":"); + printf("module\t%s\t%s\t%s\t%d\n", cs[1], cs[2], file, mod2cost[cs[1]]); + } + printf("%s", nb_csets != 0 ? "\n\n" : ""); + } +} +' diff --git a/support/scripts/gen-manual-lists.py b/support/scripts/gen-manual-lists.py new file mode 100644 index 0000000000..d231eda1fc --- /dev/null +++ b/support/scripts/gen-manual-lists.py @@ -0,0 +1,513 @@ +## gen-manual-lists.py +## +## This script generates the following Buildroot manual appendices: +## - the package tables (one for the target, the other for host tools); +## - the deprecated items. +## +## Author(s): +## - Samuel Martin +## +## Copyright (C) 2013 Samuel Martin +## +## 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 +## + +from __future__ import print_function +from __future__ import unicode_literals + +import os +import re +import sys +import datetime +from argparse import ArgumentParser + +try: + import kconfiglib +except ImportError: + message = """ +Could not find the module 'kconfiglib' in the PYTHONPATH: +""" + message += "\n".join([" {0}".format(path) for path in sys.path]) + message += """ + +Make sure the Kconfiglib directory is in the PYTHONPATH, then relaunch the +script. + +You can get kconfiglib from: + https://github.com/ulfalizer/Kconfiglib + + +""" + sys.stderr.write(message) + raise + + +def get_symbol_subset(root, filter_func): + """ Return a generator of kconfig items. + + :param root_item: Root item of the generated subset of items + :param filter_func: Filter function + + """ + if hasattr(root, "get_items"): + get_items = root.get_items + elif hasattr(root, "get_top_level_items"): + get_items = root.get_top_level_items + else: + message = "The symbol does not contain any subset of symbols" + raise Exception(message) + for item in get_items(): + if item.is_symbol(): + if not filter_func(item): + continue + yield item + elif item.is_menu() or item.is_choice(): + for i in get_symbol_subset(item, filter_func): + yield i + + +def get_symbol_parents(item, root=None, enable_choice=False): + """ Return the list of the item's parents. The last item of the list is + the closest parent, the first the furthest. + + :param item: Item from which the parent list is generated + :param root: Root item stopping the search (not included in the + parent list) + :param enable_choice: Flag enabling choices to appear in the parent list + + """ + parent = item.get_parent() + parents = [] + while parent and parent != root: + if parent.is_menu(): + parents.append(parent.get_title()) + elif enable_choice and parent.is_choice(): + parents.append(parent.get_prompts()[0]) + parent = parent.get_parent() + if isinstance(root, kconfiglib.Menu) or \ + (enable_choice and isinstance(root, kconfiglib.Choice)): + parents.append("") # Dummy empty parent to get a leading arrow -> + parents.reverse() + return parents + + +def format_asciidoc_table(root, get_label_func, filter_func=lambda x: True, + format_func=lambda x: x, + enable_choice=False, sorted=True, + item_label=None): + """ Return the asciidoc formatted table of the items and their location. + + :param root: Root item of the item subset + :param get_label_func: Item's label getter function + :param filter_func: Filter function to apply on the item subset + :param format_func: Function to format a symbol and the table header + :param enable_choice: Enable choices to appear as part of the item's + location + :param sorted: Flag to alphabetically sort the table + + """ + + lines = [] + for item in get_symbol_subset(root, filter_func): + lines.append(format_func(what="symbol", symbol=item, root=root, + get_label_func=get_label_func, + enable_choice=enable_choice)) + if sorted: + lines.sort(key=lambda x: x.lower()) + table = ":halign: center\n\n" + width, columns = format_func(what="layout") + table = "[width=\"{0}\",cols=\"{1}\",options=\"header\"]\n".format(width, columns) + table += "|===================================================\n" + table += format_func(what="header", header=item_label, root=root) + table += "\n" + "".join(lines) + "\n" + table += "|===================================================\n" + return table + + +class Buildroot: + """ Buildroot configuration object. + + """ + root_config = "Config.in" + package_dirname = "package" + package_prefixes = ["BR2_PACKAGE_", "BR2_PACKAGE_HOST_"] + re_pkg_prefix = re.compile(r"^(" + "|".join(package_prefixes) + ").*") + deprecated_symbol = "BR2_DEPRECATED" + list_in = """\ +// +// Automatically generated list for Buildroot manual. +// + +{table} +""" + + list_info = { + 'target-packages': { + 'filename': "package-list", + 'root_menu': "Target packages", + 'filter': "_is_real_package", + 'format': "_format_symbol_prompt_location", + 'sorted': True, + }, + 'host-packages': { + 'filename': "host-package-list", + 'root_menu': "Host utilities", + 'filter': "_is_real_package", + 'format': "_format_symbol_prompt", + 'sorted': True, + }, + 'virtual-packages': { + 'filename': "virtual-package-list", + 'root_menu': "Target packages", + 'filter': "_is_virtual_package", + 'format': "_format_symbol_virtual", + 'sorted': True, + }, + 'deprecated': { + 'filename': "deprecated-list", + 'root_menu': None, + 'filter': "_is_deprecated_feature", + 'format': "_format_symbol_prompt_location", + 'sorted': False, + }, + } + + def __init__(self): + self.base_dir = os.environ.get("TOPDIR") + self.output_dir = os.environ.get("O") + self.package_dir = os.path.join(self.base_dir, self.package_dirname) + self.config = kconfiglib.Config(os.path.join(self.base_dir, + self.root_config), + self.base_dir) + self._deprecated = self.config.get_symbol(self.deprecated_symbol) + + self.gen_date = datetime.datetime.utcnow() + self.br_version_full = os.environ.get("BR2_VERSION_FULL") + if self.br_version_full and self.br_version_full.endswith("-git"): + self.br_version_full = self.br_version_full[:-4] + if not self.br_version_full: + self.br_version_full = "undefined" + + def _get_package_symbols(self, package_name): + """ Return a tuple containing the target and host package symbol. + + """ + symbols = re.sub("[-+.]", "_", package_name) + symbols = symbols.upper() + symbols = tuple([prefix + symbols for prefix in self.package_prefixes]) + return symbols + + def _is_deprecated(self, symbol): + """ Return True if the symbol is marked as deprecated, otherwise False. + + """ + # This also catches BR2_DEPRECATED_SINCE_xxxx_xx + return bool([ symbol for x in symbol.get_referenced_symbols() + if x.get_name().startswith(self._deprecated.get_name()) ]) + + def _is_package(self, symbol, type='real'): + """ Return True if the symbol is a package or a host package, otherwise + False. + + :param symbol: The symbol to check + :param type: Limit to 'real' or 'virtual' types of packages, + with 'real' being the default. + Note: only 'real' is (implictly) handled for now + + """ + if not symbol.is_symbol(): + return False + if type == 'real' and not symbol.get_prompts(): + return False + if type == 'virtual' and symbol.get_prompts(): + return False + if not self.re_pkg_prefix.match(symbol.get_name()): + return False + pkg_name = self._get_pkg_name(symbol) + + pattern = "^(HOST_)?" + pkg_name + "$" + pattern = re.sub("_", ".", pattern) + pattern = re.compile(pattern, re.IGNORECASE) + # Here, we cannot just check for the location of the Config.in because + # of the "virtual" package. + # + # So, to check that a symbol is a package (not a package option or + # anything else), we check for the existence of the package *.mk file. + # + # By the way, to actually check for a package, we should grep all *.mk + # files for the following regex: + # "\$\(eval \$\((host-)?(generic|autotools|cmake)-package\)\)" + # + # Implementation details: + # + # * The package list is generated from the *.mk file existence, the + # first time this function is called. Despite the memory consumption, + # this list is stored because the execution time of this script is + # noticeably shorter than rescanning the package sub-tree for each + # symbol. + if not hasattr(self, "_package_list"): + pkg_list = [] + for _, _, files in os.walk(self.package_dir): + for file_ in (f for f in files if f.endswith(".mk")): + pkg_list.append(re.sub(r"(.*?)\.mk", r"\1", file_)) + setattr(self, "_package_list", pkg_list) + for pkg in getattr(self, "_package_list"): + if type == 'real': + if pattern.match(pkg) and not self._exists_virt_symbol(pkg): + return True + if type == 'virtual': + if pattern.match('has_' + pkg): + return True + return False + + def _is_real_package(self, symbol): + return self._is_package(symbol, 'real') + + def _is_virtual_package(self, symbol): + return self._is_package(symbol, 'virtual') + + def _is_deprecated_feature(self, symbol): + return symbol.get_prompts() and self._is_deprecated(symbol) + + def _exists_virt_symbol(self, pkg_name): + """ Return True if a symbol exists that defines the package as + a virtual package, False otherwise + + :param pkg_name: The name of the package, for which to check if + a symbol exists defining it as a virtual package + + """ + virt_pattern = "BR2_PACKAGE_HAS_" + pkg_name + "$" + virt_pattern = re.sub("_", ".", virt_pattern) + virt_pattern = re.compile(virt_pattern, re.IGNORECASE) + for sym in self.config: + if virt_pattern.match(sym.get_name()): + return True + return False + + def _get_pkg_name(self, symbol): + """ Return the package name of the specified symbol. + + :param symbol: The symbol to get the package name of + + """ + + return re.sub("BR2_PACKAGE_(HOST_)?(.*)", r"\2", symbol.get_name()) + + def _get_symbol_label(self, symbol, mark_deprecated=True): + """ Return the label (a.k.a. prompt text) of the symbol. + + :param symbol: The symbol + :param mark_deprecated: Append a 'deprecated' to the label + + """ + label = symbol.get_prompts()[0] + if self._is_deprecated(symbol) and mark_deprecated: + label += " *(deprecated)*" + return label + + def _format_symbol_prompt(self, what=None, symbol=None, root=None, + enable_choice=False, header=None, + get_label_func=lambda x: x): + if what == "layout": + return ( "30%", "^1" ) + + if what == "header": + return "| {0:<40}\n".format(header) + + if what == "symbol": + return "| {0:<40}\n".format(get_label_func(symbol)) + + message = "Invalid argument 'what': '%s'\n" % str(what) + message += "Allowed values are: 'layout', 'header' and 'symbol'" + raise Exception(message) + + def _format_symbol_prompt_location(self, what=None, symbol=None, root=None, + enable_choice=False, header=None, + get_label_func=lambda x: x): + if what == "layout": + return ( "100%", "^1,4" ) + + if what == "header": + if hasattr(root, "get_title"): + loc_label = get_symbol_parents(root, None, enable_choice=enable_choice) + loc_label += [root.get_title(), "..."] + else: + loc_label = ["Location"] + return "| {0:<40} <| {1}\n".format(header, " -> ".join(loc_label)) + + if what == "symbol": + parents = get_symbol_parents(symbol, root, enable_choice) + return "| {0:<40} <| {1}\n".format(get_label_func(symbol), + " -> ".join(parents)) + + message = "Invalid argument 'what': '%s'\n" % str(what) + message += "Allowed values are: 'layout', 'header' and 'symbol'" + raise Exception(message) + + def _format_symbol_virtual(self, what=None, symbol=None, root=None, + enable_choice=False, header=None, + get_label_func=lambda x: "?"): + def _symbol_is_legacy(symbol): + selects = [ s.get_name() for s in symbol.get_selected_symbols() ] + return ("BR2_LEGACY" in selects) + + def _get_parent_package(sym): + if self._is_real_package(sym): + return None + # Trim the symbol name from its last component (separated with + # underscores), until we either find a symbol which is a real + # package, or until we have no component (i.e. just 'BR2') + name = sym.get_name() + while name != "BR2": + name = name.rsplit("_", 1)[0] + s = self.config.get_symbol(name) + if s is None: + continue + if self._is_real_package(s): + return s + return None + + def _get_providers(symbol): + providers = list() + for sym in self.config: + if not sym.is_symbol(): + continue + if _symbol_is_legacy(sym): + continue + selects = sym.get_selected_symbols() + if not selects: + continue + for s in selects: + if s == symbol: + if sym.get_prompts(): + l = self._get_symbol_label(sym,False) + parent_pkg = _get_parent_package(sym) + if parent_pkg is not None: + l = self._get_symbol_label(parent_pkg, False) \ + + " (w/ " + l + ")" + providers.append(l) + else: + providers.extend(_get_providers(sym)) + return providers + + if what == "layout": + return ( "100%", "^1,4,4" ) + + if what == "header": + return "| {0:<20} <| {1:<32} <| Providers\n".format("Virtual packages", "Symbols") + + if what == "symbol": + pkg = re.sub(r"^BR2_PACKAGE_HAS_(.+)$", r"\1", symbol.get_name()) + providers = _get_providers(symbol) + + return "| {0:<20} <| {1:<32} <| {2}\n".format(pkg.lower(), + '+' + symbol.get_name() + '+', + ", ".join(providers)) + + message = "Invalid argument 'what': '%s'\n" % str(what) + message += "Allowed values are: 'layout', 'header' and 'symbol'" + raise Exception(message) + + + def print_list(self, list_type, enable_choice=True, enable_deprecated=True, + dry_run=False, output=None): + """ Print the requested list. If not dry run, then the list is + automatically written in its own file. + + :param list_type: The list type to be generated + :param enable_choice: Flag enabling choices to appear in the list + :param enable_deprecated: Flag enabling deprecated items to appear in + the package lists + :param dry_run: Dry run (print the list in stdout instead of + writing the list file + + """ + def _get_menu(title): + """ Return the first symbol menu matching the given title. + + """ + menus = self.config.get_menus() + menu = [m for m in menus if m.get_title().lower() == title.lower()] + if not menu: + message = "No such menu: '{0}'".format(title) + raise Exception(message) + return menu[0] + + list_config = self.list_info[list_type] + root_title = list_config.get('root_menu') + if root_title: + root_item = _get_menu(root_title) + else: + root_item = self.config + filter_ = getattr(self, list_config.get('filter')) + filter_func = lambda x: filter_(x) + format_func = getattr(self, list_config.get('format')) + if not enable_deprecated and list_type != "deprecated": + filter_func = lambda x: filter_(x) and not self._is_deprecated(x) + mark_depr = list_type != "deprecated" + get_label = lambda x: self._get_symbol_label(x, mark_depr) + item_label = "Features" if list_type == "deprecated" else "Packages" + + table = format_asciidoc_table(root_item, get_label, + filter_func=filter_func, + format_func=format_func, + enable_choice=enable_choice, + sorted=list_config.get('sorted'), + item_label=item_label) + + content = self.list_in.format(table=table) + + if dry_run: + print(content) + return + + if not output: + output_dir = self.output_dir + if not output_dir: + print("Warning: Undefined output directory.") + print("\tUse source directory as output location.") + output_dir = self.base_dir + output = os.path.join(output_dir, + list_config.get('filename') + ".txt") + if not os.path.exists(os.path.dirname(output)): + os.makedirs(os.path.dirname(output)) + print("Writing the {0} list in:\n\t{1}".format(list_type, output)) + with open(output, 'w') as fout: + fout.write(content) + + +if __name__ == '__main__': + list_types = ['target-packages', 'host-packages', 'virtual-packages', 'deprecated'] + parser = ArgumentParser() + parser.add_argument("list_type", nargs="?", choices=list_types, + help="""\ +Generate the given list (generate all lists if unspecified)""") + parser.add_argument("-n", "--dry-run", dest="dry_run", action='store_true', + help="Output the generated list to stdout") + parser.add_argument("--output-target", dest="output_target", + help="Output target package file") + parser.add_argument("--output-host", dest="output_host", + help="Output host package file") + parser.add_argument("--output-virtual", dest="output_virtual", + help="Output virtual package file") + parser.add_argument("--output-deprecated", dest="output_deprecated", + help="Output deprecated file") + args = parser.parse_args() + lists = [args.list_type] if args.list_type else list_types + buildroot = Buildroot() + for list_name in lists: + output = getattr(args, "output_" + list_name.split("-", 1)[0]) + buildroot.print_list(list_name, dry_run=args.dry_run, output=output) diff --git a/support/scripts/graph-build-time b/support/scripts/graph-build-time new file mode 100755 index 0000000000..7eb3e47953 --- /dev/null +++ b/support/scripts/graph-build-time @@ -0,0 +1,306 @@ +#!/usr/bin/env python + +# Copyright (C) 2011 by Thomas Petazzoni +# Copyright (C) 2013 by Yann E. MORIN +# +# 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 + +# This script generates graphs of packages build time, from the timing +# data generated by Buildroot in the $(O)/build-time.log file. +# +# Example usage: +# +# cat $(O)/build-time.log | ./support/scripts/graph-build-time --type=histogram --output=foobar.pdf +# +# Three graph types are available : +# +# * histogram, which creates an histogram of the build time for each +# package, decomposed by each step (extract, patch, configure, +# etc.). The order in which the packages are shown is +# configurable: by package name, by build order, or by duration +# order. See the --order option. +# +# * pie-packages, which creates a pie chart of the build time of +# each package (without decomposition in steps). Packages that +# contributed to less than 1% of the overall build time are all +# grouped together in an "Other" entry. +# +# * pie-steps, which creates a pie chart of the time spent globally +# on each step (extract, patch, configure, etc...) +# +# The default is to generate an histogram ordered by package name. +# +# Requirements: +# +# * matplotlib (python-matplotlib on Debian/Ubuntu systems) +# * numpy (python-numpy on Debian/Ubuntu systems) +# * argparse (by default in Python 2.7, requires python-argparse if +# Python 2.6 is used) + +import sys + +try: + import matplotlib as mpl + import numpy +except ImportError: + sys.stderr.write("You need python-matplotlib and python-numpy to generate build graphs\n") + exit(1) + +# Use the Agg backend (which produces a PNG output, see +# http://matplotlib.org/faq/usage_faq.html#what-is-a-backend), +# otherwise an incorrect backend is used on some host machines). +# Note: matplotlib.use() must be called *before* matplotlib.pyplot. +mpl.use('Agg') + +import matplotlib.pyplot as plt +import matplotlib.font_manager as fm +import csv +import argparse + +steps = [ 'extract', 'patch', 'configure', 'build', + 'install-target', 'install-staging', 'install-images', + 'install-host'] + +default_colors = ['#e60004', '#009836', '#2e1d86', '#ffed00', + '#0068b5', '#f28e00', '#940084', '#97c000'] + +alternate_colors = ['#00e0e0', '#3f7f7f', '#ff0000', '#00c000', + '#0080ff', '#c000ff', '#00eeee', '#e0e000'] + +class Package: + def __init__(self, name): + self.name = name + self.steps_duration = {} + self.steps_start = {} + self.steps_end = {} + + def add_step(self, step, state, time): + if state == "start": + self.steps_start[step] = time + else: + self.steps_end[step] = time + if step in self.steps_start and step in self.steps_end: + self.steps_duration[step] = self.steps_end[step] - self.steps_start[step] + + def get_duration(self, step=None): + if step is None: + duration = 0 + for step in list(self.steps_duration.keys()): + duration += self.steps_duration[step] + return duration + if step in self.steps_duration: + return self.steps_duration[step] + return 0 + +# Generate an histogram of the time spent in each step of each +# package. +def pkg_histogram(data, output, order="build"): + n_pkgs = len(data) + ind = numpy.arange(n_pkgs) + + if order == "duration": + data = sorted(data, key=lambda p: p.get_duration(), reverse=True) + elif order == "name": + data = sorted(data, key=lambda p: p.name, reverse=False) + + # Prepare the vals array, containing one entry for each step + vals = [] + for step in steps: + val = [] + for p in data: + val.append(p.get_duration(step)) + vals.append(val) + + bottom = [0] * n_pkgs + legenditems = [] + + plt.figure() + + # Draw the bars, step by step + for i in range(0, len(vals)): + b = plt.bar(ind+0.1, vals[i], width=0.8, color=colors[i], bottom=bottom, linewidth=0.25) + legenditems.append(b[0]) + bottom = [ bottom[j] + vals[i][j] for j in range(0, len(vals[i])) ] + + # Draw the package names + plt.xticks(ind + .6, [ p.name for p in data ], rotation=-60, rotation_mode="anchor", fontsize=8, ha='left') + + # Adjust size of graph depending on the number of packages + # Ensure a minimal size twice as the default + # Magic Numbers do Magic Layout! + ratio = max(((n_pkgs + 10) / 48, 2)) + borders = 0.1 / ratio + sz = plt.gcf().get_figwidth() + plt.gcf().set_figwidth(sz * ratio) + + # Adjust space at borders, add more space for the + # package names at the bottom + plt.gcf().subplots_adjust(bottom=0.2, left=borders, right=1-borders) + + # Remove ticks in the graph for each package + axes = plt.gcf().gca() + for line in axes.get_xticklines(): + line.set_markersize(0) + + axes.set_ylabel('Time (seconds)') + + # Reduce size of legend text + leg_prop = fm.FontProperties(size=6) + + # Draw legend + plt.legend(legenditems, steps, prop=leg_prop) + + if order == "name": + plt.title('Build time of packages\n') + elif order == "build": + plt.title('Build time of packages, by build order\n') + elif order == "duration": + plt.title('Build time of packages, by duration order\n') + + # Save graph + plt.savefig(output) + +# Generate a pie chart with the time spent building each package. +def pkg_pie_time_per_package(data, output): + # Compute total build duration + total = 0 + for p in data: + total += p.get_duration() + + # Build the list of labels and values, and filter the packages + # that account for less than 1% of the build time. + labels = [] + values = [] + other_value = 0 + for p in data: + if p.get_duration() < (total * 0.01): + other_value += p.get_duration() + else: + labels.append(p.name) + values.append(p.get_duration()) + + labels.append('Other') + values.append(other_value) + + plt.figure() + + # Draw pie graph + patches, texts, autotexts = plt.pie(values, labels=labels, + autopct='%1.1f%%', shadow=True, + colors=colors) + + # Reduce text size + proptease = fm.FontProperties() + proptease.set_size('xx-small') + plt.setp(autotexts, fontproperties=proptease) + plt.setp(texts, fontproperties=proptease) + + plt.title('Build time per package') + plt.savefig(output) + +# Generate a pie chart with a portion for the overall time spent in +# each step for all packages. +def pkg_pie_time_per_step(data, output): + steps_values = [] + for step in steps: + val = 0 + for p in data: + val += p.get_duration(step) + steps_values.append(val) + + plt.figure() + + # Draw pie graph + patches, texts, autotexts = plt.pie(steps_values, labels=steps, + autopct='%1.1f%%', shadow=True, + colors=colors) + + # Reduce text size + proptease = fm.FontProperties() + proptease.set_size('xx-small') + plt.setp(autotexts, fontproperties=proptease) + plt.setp(texts, fontproperties=proptease) + + plt.title('Build time per step') + plt.savefig(output) + +# Parses the csv file passed on standard input and returns a list of +# Package objects, filed with the duration of each step and the total +# duration of the package. +def read_data(input_file): + if input_file is None: + input_file = sys.stdin + else: + input_file = open(input_file) + reader = csv.reader(input_file, delimiter=':') + pkgs = [] + + # Auxilliary function to find a package by name in the list. + def getpkg(name): + for p in pkgs: + if p.name == name: + return p + return None + + for row in reader: + time = int(row[0].strip()) + state = row[1].strip() + step = row[2].strip() + pkg = row[3].strip() + + p = getpkg(pkg) + if p is None: + p = Package(pkg) + pkgs.append(p) + + p.add_step(step, state, time) + + return pkgs + +parser = argparse.ArgumentParser(description='Draw build time graphs') +parser.add_argument("--type", '-t', metavar="GRAPH_TYPE", + help="Type of graph (histogram, pie-packages, pie-steps)") +parser.add_argument("--order", '-O', metavar="GRAPH_ORDER", + help="Ordering of packages: build or duration (for histogram only)") +parser.add_argument("--alternate-colors", '-c', action="store_true", + help="Use alternate colour-scheme") +parser.add_argument("--input", '-i', metavar="OUTPUT", + help="Input file (usually $(O)/build/build-time.log)") +parser.add_argument("--output", '-o', metavar="OUTPUT", required=True, + help="Output file (.pdf or .png extension)") +args = parser.parse_args() + +d = read_data(args.input) + +if args.alternate_colors: + colors = alternate_colors +else: + colors = default_colors + +if args.type == "histogram" or args.type is None: + if args.order == "build" or args.order == "duration" or args.order == "name": + pkg_histogram(d, args.output, args.order) + elif args.order is None: + pkg_histogram(d, args.output, "name") + else: + sys.stderr.write("Unknown ordering: %s\n" % args.order) + exit(1) +elif args.type == "pie-packages": + pkg_pie_time_per_package(d, args.output) +elif args.type == "pie-steps": + pkg_pie_time_per_step(d, args.output) +else: + sys.stderr.write("Unknown type: %s\n" % args.type) + exit(1) diff --git a/support/scripts/graph-depends b/support/scripts/graph-depends new file mode 100755 index 0000000000..a00eb9d47b --- /dev/null +++ b/support/scripts/graph-depends @@ -0,0 +1,430 @@ +#!/usr/bin/python + +# Usage (the graphviz package must be installed in your distribution) +# ./support/scripts/graph-depends [-p package-name] > test.dot +# dot -Tpdf test.dot -o test.pdf +# +# With no arguments, graph-depends will draw a complete graph of +# dependencies for the current configuration. +# If '-p ' is specified, graph-depends will draw a graph +# of dependencies for the given package name. +# If '-d ' is specified, graph-depends will limit the depth of +# the dependency graph to 'depth' levels. +# +# Limitations +# +# * Some packages have dependencies that depend on the Buildroot +# configuration. For example, many packages have a dependency on +# openssl if openssl has been enabled. This tool will graph the +# dependencies as they are with the current Buildroot +# configuration. +# +# Copyright (C) 2010-2013 Thomas Petazzoni + +import sys +import subprocess +import argparse +from fnmatch import fnmatch + +# Modes of operation: +MODE_FULL = 1 # draw full dependency graph for all selected packages +MODE_PKG = 2 # draw dependency graph for a given package +mode = 0 + +# Limit drawing the dependency graph to this depth. 0 means 'no limit'. +max_depth = 0 + +# Whether to draw the transitive dependencies +transitive = True + +parser = argparse.ArgumentParser(description="Graph packages dependencies") +parser.add_argument("--check-only", "-C", dest="check_only", action="store_true", default=False, + help="Only do the dependency checks (circular deps...)") +parser.add_argument("--outfile", "-o", metavar="OUT_FILE", dest="outfile", + help="File in which to generate the dot representation") +parser.add_argument("--package", '-p', metavar="PACKAGE", + help="Graph the dependencies of PACKAGE") +parser.add_argument("--depth", '-d', metavar="DEPTH", dest="depth", type=int, default=0, + help="Limit the dependency graph to DEPTH levels; 0 means no limit.") +parser.add_argument("--stop-on", "-s", metavar="PACKAGE", dest="stop_list", action="append", + help="Do not graph past this package (can be given multiple times)." \ + + " Can be a package name or a glob, " \ + + " 'virtual' to stop on virtual packages, or " \ + + "'host' to stop on host packages.") +parser.add_argument("--exclude", "-x", metavar="PACKAGE", dest="exclude_list", action="append", + help="Like --stop-on, but do not add PACKAGE to the graph.") +parser.add_argument("--colours", "-c", metavar="COLOR_LIST", dest="colours", + default="lightblue,grey,gainsboro", + help="Comma-separated list of the three colours to use" \ + + " to draw the top-level package, the target" \ + + " packages, and the host packages, in this order." \ + + " Defaults to: 'lightblue,grey,gainsboro'") +parser.add_argument("--transitive", dest="transitive", action='store_true', + default=False) +parser.add_argument("--no-transitive", dest="transitive", action='store_false', + help="Draw (do not draw) transitive dependencies") +args = parser.parse_args() + +check_only = args.check_only + +if args.outfile is None: + outfile = sys.stdout +else: + if check_only: + sys.stderr.write("don't specify outfile and check-only at the same time\n") + sys.exit(1) + outfile = open(args.outfile, "wb") + +if args.package is None: + mode = MODE_FULL +else: + mode = MODE_PKG + rootpkg = args.package + +max_depth = args.depth + +if args.stop_list is None: + stop_list = [] +else: + stop_list = args.stop_list + +if args.exclude_list is None: + exclude_list = [] +else: + exclude_list = args.exclude_list + +transitive = args.transitive + +# Get the colours: we need exactly three colours, +# so no need not split more than 4 +# We'll let 'dot' validate the colours... +colours = args.colours.split(',',4) +if len(colours) != 3: + sys.stderr.write("Error: incorrect colour list '%s'\n" % args.colours) + sys.exit(1) +root_colour = colours[0] +target_colour = colours[1] +host_colour = colours[2] + +allpkgs = [] + +# Execute the "make -show-version" command to get the version of a given +# list of packages, and return the version formatted as a Python dictionary. +def get_version(pkgs): + sys.stderr.write("Getting version for %s\n" % pkgs) + cmd = ["make", "-s", "--no-print-directory" ] + for pkg in pkgs: + cmd.append("%s-show-version" % pkg) + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True) + output = p.communicate()[0] + if p.returncode != 0: + sys.stderr.write("Error getting version %s\n" % pkgs) + sys.exit(1) + output = output.split("\n") + if len(output) != len(pkgs) + 1: + sys.stderr.write("Error getting version\n") + sys.exit(1) + version = {} + for i in range(0, len(pkgs)): + pkg = pkgs[i] + version[pkg] = output[i] + return version + +# Execute the "make show-targets" command to get the list of the main +# Buildroot PACKAGES and return it formatted as a Python list. This +# list is used as the starting point for full dependency graphs +def get_targets(): + sys.stderr.write("Getting targets\n") + cmd = ["make", "-s", "--no-print-directory", "show-targets"] + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True) + output = p.communicate()[0].strip() + if p.returncode != 0: + return None + if output == '': + return [] + return output.split(' ') + +# Execute the "make -show-depends" command to get the list of +# dependencies of a given list of packages, and return the list of +# dependencies formatted as a Python dictionary. +def get_depends(pkgs): + sys.stderr.write("Getting dependencies for %s\n" % pkgs) + cmd = ["make", "-s", "--no-print-directory" ] + for pkg in pkgs: + cmd.append("%s-show-depends" % pkg) + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True) + output = p.communicate()[0] + if p.returncode != 0: + sys.stderr.write("Error getting dependencies %s\n" % pkgs) + sys.exit(1) + output = output.split("\n") + if len(output) != len(pkgs) + 1: + sys.stderr.write("Error getting dependencies\n") + sys.exit(1) + deps = {} + for i in range(0, len(pkgs)): + pkg = pkgs[i] + pkg_deps = output[i].split(" ") + if pkg_deps == ['']: + deps[pkg] = [] + else: + deps[pkg] = pkg_deps + return deps + +# Recursive function that builds the tree of dependencies for a given +# list of packages. The dependencies are built in a list called +# 'dependencies', which contains tuples of the form (pkg1 -> +# pkg2_on_which_pkg1_depends, pkg3 -> pkg4_on_which_pkg3_depends) and +# the function finally returns this list. +def get_all_depends(pkgs): + dependencies = [] + + # Filter the packages for which we already have the dependencies + filtered_pkgs = [] + for pkg in pkgs: + if pkg in allpkgs: + continue + filtered_pkgs.append(pkg) + allpkgs.append(pkg) + + if len(filtered_pkgs) == 0: + return [] + + depends = get_depends(filtered_pkgs) + + deps = set() + for pkg in filtered_pkgs: + pkg_deps = depends[pkg] + + # This package has no dependency. + if pkg_deps == []: + continue + + # Add dependencies to the list of dependencies + for dep in pkg_deps: + dependencies.append((pkg, dep)) + deps.add(dep) + + if len(deps) != 0: + newdeps = get_all_depends(deps) + if newdeps is not None: + dependencies += newdeps + + return dependencies + +# The Graphviz "dot" utility doesn't like dashes in node names. So for +# node names, we strip all dashes. +def pkg_node_name(pkg): + return pkg.replace("-","") + +TARGET_EXCEPTIONS = [ + "target-finalize", + "target-post-image", +] + +# In full mode, start with the result of get_targets() to get the main +# targets and then use get_all_depends() for all targets +if mode == MODE_FULL: + targets = get_targets() + dependencies = [] + allpkgs.append('all') + filtered_targets = [] + for tg in targets: + # Skip uninteresting targets + if tg in TARGET_EXCEPTIONS: + continue + dependencies.append(('all', tg)) + filtered_targets.append(tg) + deps = get_all_depends(filtered_targets) + if deps is not None: + dependencies += deps + rootpkg = 'all' + +# In pkg mode, start directly with get_all_depends() on the requested +# package +elif mode == MODE_PKG: + dependencies = get_all_depends([rootpkg]) + +# Make the dependencies a dictionnary { 'pkg':[dep1, dep2, ...] } +dict_deps = {} +for dep in dependencies: + if dep[0] not in dict_deps: + dict_deps[dep[0]] = [] + dict_deps[dep[0]].append(dep[1]) + +# Basic cache for the results of the is_dep() function, in order to +# optimize the execution time. The cache is a dict of dict of boolean +# values. The key to the primary dict is "pkg", and the key of the +# sub-dicts is "pkg2". +is_dep_cache = {} + +def is_dep_cache_insert(pkg, pkg2, val): + try: + is_dep_cache[pkg].update({pkg2: val}) + except KeyError: + is_dep_cache[pkg] = {pkg2: val} + +# Retrieves from the cache whether pkg2 is a transitive dependency +# of pkg. +# Note: raises a KeyError exception if the dependency is not known. +def is_dep_cache_lookup(pkg, pkg2): + return is_dep_cache[pkg][pkg2] + +# This function return True if pkg is a dependency (direct or +# transitive) of pkg2, dependencies being listed in the deps +# dictionary. Returns False otherwise. +# This is the un-cached version. +def is_dep_uncached(pkg,pkg2,deps): + try: + for p in deps[pkg2]: + if pkg == p: + return True + if is_dep(pkg,p,deps): + return True + except KeyError: + pass + return False + +# See is_dep_uncached() above; this is the cached version. +def is_dep(pkg,pkg2,deps): + try: + return is_dep_cache_lookup(pkg, pkg2) + except KeyError: + val = is_dep_uncached(pkg, pkg2, deps) + is_dep_cache_insert(pkg, pkg2, val) + return val + +# This function eliminates transitive dependencies; for example, given +# these dependency chain: A->{B,C} and B->{C}, the A->{C} dependency is +# already covered by B->{C}, so C is a transitive dependency of A, via B. +# The functions does: +# - for each dependency d[i] of the package pkg +# - if d[i] is a dependency of any of the other dependencies d[j] +# - do not keep d[i] +# - otherwise keep d[i] +def remove_transitive_deps(pkg,deps): + d = deps[pkg] + new_d = [] + for i in range(len(d)): + keep_me = True + for j in range(len(d)): + if j==i: + continue + if is_dep(d[i],d[j],deps): + keep_me = False + if keep_me: + new_d.append(d[i]) + return new_d + +# This function removes the dependency on some 'mandatory' package, like the +# 'toolchain' package, or the 'skeleton' package +def remove_mandatory_deps(pkg,deps): + return [p for p in deps[pkg] if p not in ['toolchain', 'skeleton']] + +# This function will check that there is no loop in the dependency chain +# As a side effect, it builds up the dependency cache. +def check_circular_deps(deps): + def recurse(pkg): + if not pkg in list(deps.keys()): + return + if pkg in not_loop: + return + not_loop.append(pkg) + chain.append(pkg) + for p in deps[pkg]: + if p in chain: + sys.stderr.write("\nRecursion detected for : %s\n" % (p)) + while True: + _p = chain.pop() + sys.stderr.write("which is a dependency of: %s\n" % (_p)) + if p == _p: + sys.exit(1) + recurse(p) + chain.pop() + + not_loop = [] + chain = [] + for pkg in list(deps.keys()): + recurse(pkg) + +# This functions trims down the dependency list of all packages. +# It applies in sequence all the dependency-elimination methods. +def remove_extra_deps(deps): + for pkg in list(deps.keys()): + if not pkg == 'all': + deps[pkg] = remove_mandatory_deps(pkg,deps) + for pkg in list(deps.keys()): + if not transitive or pkg == 'all': + deps[pkg] = remove_transitive_deps(pkg,deps) + return deps + +check_circular_deps(dict_deps) +if check_only: + sys.exit(0) + +dict_deps = remove_extra_deps(dict_deps) +dict_version = get_version([pkg for pkg in allpkgs + if pkg != "all" and not pkg.startswith("root")]) + +# Print the attributes of a node: label and fill-color +def print_attrs(pkg): + name = pkg_node_name(pkg) + if pkg == 'all': + label = 'ALL' + else: + label = pkg + if pkg == 'all' or (mode == MODE_PKG and pkg == rootpkg): + color = root_colour + else: + if pkg.startswith('host') \ + or pkg.startswith('toolchain') \ + or pkg.startswith('rootfs'): + color = host_colour + else: + color = target_colour + version = dict_version.get(pkg) + if version == "virtual": + outfile.write("%s [label = <%s>]\n" % (name, label)) + else: + outfile.write("%s [label = \"%s\"]\n" % (name, label)) + outfile.write("%s [color=%s,style=filled]\n" % (name, color)) + +# Print the dependency graph of a package +def print_pkg_deps(depth, pkg): + if pkg in done_deps: + return + done_deps.append(pkg) + print_attrs(pkg) + if pkg not in dict_deps: + return + for p in stop_list: + if fnmatch(pkg, p): + return + if dict_version.get(pkg) == "virtual" and "virtual" in stop_list: + return + if pkg.startswith("host-") and "host" in stop_list: + return + if max_depth == 0 or depth < max_depth: + for d in dict_deps[pkg]: + if dict_version.get(d) == "virtual" \ + and "virtual" in exclude_list: + continue + if d.startswith("host-") \ + and "host" in exclude_list: + continue + add = True + for p in exclude_list: + if fnmatch(d,p): + add = False + break + if add: + outfile.write("%s -> %s\n" % (pkg_node_name(pkg), pkg_node_name(d))) + print_pkg_deps(depth+1, d) + +# Start printing the graph data +outfile.write("digraph G {\n") + +done_deps = [] +print_pkg_deps(0, rootpkg) + +outfile.write("}\n") diff --git a/support/scripts/kconfiglib.py b/support/scripts/kconfiglib.py new file mode 100644 index 0000000000..0a688b54c8 --- /dev/null +++ b/support/scripts/kconfiglib.py @@ -0,0 +1,3541 @@ +# This is Kconfiglib, a Python library for scripting, debugging, and extracting +# information from Kconfig-based configuration systems. To view the +# documentation, run +# +# $ pydoc kconfiglib +# +# or, if you prefer HTML, +# +# $ pydoc -w kconfiglib +# +# The examples/ subdirectory contains examples, to be run with e.g. +# +# $ make scriptconfig SCRIPT=Kconfiglib/examples/print_tree.py +# +# Look in testsuite.py for the test suite. + +""" +Kconfiglib is a Python library for scripting and extracting information from +Kconfig-based configuration systems. Features include the following: + + - Symbol values and properties can be looked up and values assigned + programmatically. + - .config files can be read and written. + - Expressions can be evaluated in the context of a Kconfig configuration. + - Relations between symbols can be quickly determined, such as finding all + symbols that reference a particular symbol. + - Highly compatible with the scripts/kconfig/*conf utilities. The test suite + automatically compares outputs between Kconfiglib and the C implementation + for a large number of cases. + +For the Linux kernel, scripts are run using + + $ make scriptconfig [ARCH=] SCRIPT= [SCRIPT_ARG=] + +Using the 'scriptconfig' target ensures that required environment variables +(SRCARCH, ARCH, srctree, KERNELVERSION, etc.) are set up correctly. + +Scripts receive the name of the Kconfig file to load in sys.argv[1]. As of +Linux 4.1.0-rc5, this is always "Kconfig" from the kernel top-level directory. +If an argument is provided with SCRIPT_ARG, it appears as sys.argv[2]. + +To get an interactive Python prompt with Kconfiglib preloaded and a Config +object 'c' created, run + + $ make iscriptconfig [ARCH=] + +Kconfiglib currently uses Python 2. For (i)scriptconfig, the Python interpreter +to use can be passed in PYTHONCMD. It defaults to 'python', but PyPy works too +and might be faster for long-running jobs. + +The examples/ directory contains short example scripts, which can be run with +e.g. + + $ make scriptconfig SCRIPT=Kconfiglib/examples/print_tree.py + +or + + $ make scriptconfig SCRIPT=Kconfiglib/examples/help_grep.py SCRIPT_ARG=kernel + +testsuite.py contains the test suite. See the top of the script for how to run +it. + +Credits: Written by Ulf "Ulfalizer" Magnusson + +Send bug reports, suggestions and other feedback to ulfalizer a.t Google's +email service. Don't wrestle with internal APIs. Tell me what you need and I +might add it in a safe way as a client API instead.""" + +import os +import re +import sys + +# File layout: +# +# Public classes +# Public functions +# Internal classes +# Internal functions +# Internal global constants + +# +# Public classes +# + +class Config(object): + + """Represents a Kconfig configuration, e.g. for i386 or ARM. This is the + set of symbols and other items appearing in the configuration together with + their values. Creating any number of Config objects -- including for + different architectures -- is safe; Kconfiglib has no global state.""" + + # + # Public interface + # + + def __init__(self, filename = "Kconfig", base_dir = None, + print_warnings = True, print_undef_assign = False): + """Creates a new Config object, representing a Kconfig configuration. + Raises Kconfig_Syntax_Error on syntax errors. + + filename (default: "Kconfig") -- The base Kconfig file of the + configuration. For the Linux kernel, you'll probably want + "Kconfig" from the top-level directory, as environment + variables will make sure the right Kconfig is included from + there (arch//Kconfig). If you are using + kconfiglib via 'make scriptconfig', the filename of the base + base Kconfig file will be in sys.argv[1]. + + base_dir (default: None) -- The base directory relative to which + 'source' statements within Kconfig files will work. For the + Linux kernel this should be the top-level directory of the + kernel tree. $-references to existing environment variables + will be expanded. + + If None (the default), the environment variable 'srctree' will + be used if set, and the current directory otherwise. 'srctree' + is set by the Linux makefiles to the top-level kernel + directory. A default of "." would not work with an alternative + build directory. + + print_warnings (default: True) -- Set to True if warnings related to + this configuration should be printed to stderr. This can + be changed later with Config.set_print_warnings(). It is + provided as a constructor argument since warnings might + be generated during parsing. + + print_undef_assign (default: False) -- Set to True if informational + messages related to assignments to undefined symbols + should be printed to stderr for this configuration. + Can be changed later with + Config.set_print_undef_assign().""" + + # The set of all symbols, indexed by name (a string) + self.syms = {} + + # Python 2/3 compatibility hack. This is the only one needed. + if sys.version_info[0] >= 3: + self.syms_iter = self.syms.values + else: + self.syms_iter = self.syms.itervalues + + # The set of all defined symbols in the configuration in the order they + # appear in the Kconfig files. This excludes the special symbols n, m, + # and y as well as symbols that are referenced but never defined. + self.kconfig_syms = [] + + # The set of all named choices (yes, choices can have names), indexed + # by name (a string) + self.named_choices = {} + + def register_special_symbol(type_, name, val): + sym = Symbol() + sym.is_special_ = True + sym.is_defined_ = True + sym.config = self + sym.name = name + sym.type = type_ + sym.cached_val = val + self.syms[name] = sym + return sym + + # The special symbols n, m and y, used as shorthand for "n", "m" and + # "y" + self.n = register_special_symbol(TRISTATE, "n", "n") + self.m = register_special_symbol(TRISTATE, "m", "m") + self.y = register_special_symbol(TRISTATE, "y", "y") + + # DEFCONFIG_LIST uses this + register_special_symbol(STRING, "UNAME_RELEASE", os.uname()[2]) + + # The symbol with "option defconfig_list" set, containing a list of + # default .config files + self.defconfig_sym = None + + # See Symbol.get_(src)arch() + self.arch = os.environ.get("ARCH") + self.srcarch = os.environ.get("SRCARCH") + + # See Config.__init__(). We need this for get_defconfig_filename(). + self.srctree = os.environ.get("srctree") + if self.srctree is None: + self.srctree = "." + + self.filename = filename + if base_dir is None: + self.base_dir = self.srctree + else: + self.base_dir = os.path.expandvars(base_dir) + + # The 'mainmenu' text + self.mainmenu_text = None + + # The filename of the most recently loaded .config file + self.config_filename = None + + # The textual header of the most recently loaded .config, uncommented + self.config_header = None + + self.print_warnings = print_warnings + self.print_undef_assign = print_undef_assign + + # Lists containing all choices, menus and comments in the configuration + + self.choices = [] + self.menus = [] + self.comments = [] + + # For parsing routines that stop when finding a line belonging to a + # different construct, these holds that line and the tokenized version + # of that line. The purpose is to avoid having to re-tokenize the line, + # which is inefficient and causes problems when recording references to + # symbols. + self.end_line = None + self.end_line_tokens = None + + # See the comment in _parse_expr(). + self.parse_expr_cur_sym_or_choice = None + self.parse_expr_line = None + self.parse_expr_filename = None + self.parse_expr_linenr = None + self.parse_expr_transform_m = None + + # Parse the Kconfig files + self.top_block = self._parse_file(filename, None, None, None) + + # Build Symbol.dep for all symbols + self._build_dep() + + def load_config(self, filename, replace = True): + """Loads symbol values from a file in the familiar .config format. + Equivalent to calling Symbol.set_user_value() to set each of the + values. + + "# CONFIG_FOO is not set" within a .config file is treated specially + and sets the user value of FOO to 'n'. The C implementation works + the same way. + + filename -- The .config file to load. $-references to environment + variables will be expanded. For scripts to work even + when an alternative build directory is used with the + Linux kernel, you need to refer to the top-level kernel + directory with "$srctree". + + replace (default: True) -- True if the configuration should replace + the old configuration; False if it should add to it.""" + + # Put this first so that a missing file doesn't screw up our state + filename = os.path.expandvars(filename) + line_feeder = _FileFeed(filename) + + self.config_filename = filename + + # + # Read header + # + + def is_header_line(line): + return line is not None and line.startswith("#") and \ + not _unset_re_match(line) + + self.config_header = None + + line = line_feeder.peek_next() + if is_header_line(line): + self.config_header = "" + while is_header_line(line_feeder.peek_next()): + self.config_header += line_feeder.get_next()[1:] + # Remove trailing newline + if self.config_header.endswith("\n"): + self.config_header = self.config_header[:-1] + + # + # Read assignments. Hotspot for some workloads. + # + + def warn_override(filename, linenr, name, old_user_val, new_user_val): + self._warn('overriding the value of {0}. ' + 'Old value: "{1}", new value: "{2}".' + .format(name, old_user_val, new_user_val), + filename, linenr) + + # Invalidate everything to keep things simple. It might be possible to + # improve performance for the case where multiple configurations are + # loaded by only invalidating a symbol (and its dependent symbols) if + # the new user value differs from the old. One complication would be + # that symbols not mentioned in the .config must lose their user value + # when replace = True, which is the usual case. + if replace: + self.unset_user_values() + else: + self._invalidate_all() + + while 1: + line = line_feeder.get_next() + if line is None: + return + + line = line.rstrip() + + set_match = _set_re_match(line) + if set_match: + name, val = set_match.groups() + + if val.startswith(('"', "'")): + if len(val) < 2 or val[-1] != val[0]: + _parse_error(line, "malformed string literal", + line_feeder.get_filename(), + line_feeder.get_linenr()) + # Strip quotes and remove escapings. The unescaping + # producedure should be safe since " can only appear as \" + # inside the string. + val = val[1:-1].replace('\\"', '"').replace("\\\\", "\\") + + if name in self.syms: + sym = self.syms[name] + if sym.user_val is not None: + warn_override(line_feeder.get_filename(), + line_feeder.get_linenr(), + name, sym.user_val, val) + + if sym.is_choice_symbol_: + user_mode = sym.parent.user_mode + if user_mode is not None and user_mode != val: + self._warn("assignment to {0} changes mode of containing " + 'choice from "{1}" to "{2}".' + .format(name, val, user_mode), + line_feeder.get_filename(), + line_feeder.get_linenr()) + + sym._set_user_value_no_invalidate(val, True) + else: + if self.print_undef_assign: + _stderr_msg('note: attempt to assign the value "{0}" to the ' + "undefined symbol {1}.".format(val, name), + line_feeder.get_filename(), + line_feeder.get_linenr()) + else: + unset_match = _unset_re_match(line) + if unset_match: + name = unset_match.group(1) + if name in self.syms: + sym = self.syms[name] + if sym.user_val is not None: + warn_override(line_feeder.get_filename(), + line_feeder.get_linenr(), + name, sym.user_val, "n") + + sym._set_user_value_no_invalidate("n", True) + + def write_config(self, filename, header = None): + """Writes out symbol values in the familiar .config format. + + Kconfiglib makes sure the format matches what the C implementation + would generate, down to whitespace. This eases testing. + + filename -- The filename under which to save the configuration. + + header (default: None) -- A textual header that will appear at the + beginning of the file, with each line commented out + automatically. None means no header.""" + + # already_written is set when _make_conf() is called on a symbol, so + # that symbols defined in multiple locations only get one entry in the + # .config. We need to reset it prior to writing out a new .config. + for sym in self.syms_iter(): + sym.already_written = False + + with open(filename, "w") as f: + # Write header + if header is not None: + f.write(_comment(header)) + f.write("\n") + + # Write configuration. + + # Passing a list around to all the nodes and appending to it to + # avoid copying was surprisingly a lot slower with PyPy, and about + # as fast with Python. Passing the file around was slower too. Been + # a while since I last measured though. + + f.write("\n".join(_make_block_conf(self.top_block))) + f.write("\n") + + def get_kconfig_filename(self): + """Returns the name of the (base) kconfig file this configuration was + loaded from.""" + return self.filename + + def get_arch(self): + """Returns the value the environment variable ARCH had at the time the + Config instance was created, or None if ARCH was not set. For the + kernel, this corresponds to the architecture being built for, with + values such as "i386" or "mips".""" + return self.arch + + def get_srcarch(self): + """Returns the value the environment variable SRCARCH had at the time + the Config instance was created, or None if SRCARCH was not set. For + the kernel, this corresponds to the particular arch/ subdirectory + containing architecture-specific code.""" + return self.srcarch + + def get_srctree(self): + """Returns the value the environment variable srctree had at the time + the Config instance was created, or None if srctree was not defined. + This variable points to the source directory and is used when building + in a separate directory.""" + return self.srctree + + def get_config_filename(self): + """Returns the filename of the most recently loaded configuration file, + or None if no configuration has been loaded.""" + return self.config_filename + + def get_mainmenu_text(self): + """Returns the text of the 'mainmenu' statement (with $-references to + symbols replaced by symbol values), or None if the configuration has no + 'mainmenu' statement.""" + return None if self.mainmenu_text is None else \ + self._expand_sym_refs(self.mainmenu_text) + + def get_defconfig_filename(self): + """Returns the name of the defconfig file, which is the first existing + file in the list given in a symbol having 'option defconfig_list' set. + $-references to symbols will be expanded ("$FOO bar" -> "foo bar" if + FOO has the value "foo"). Returns None in case of no defconfig file. + Setting 'option defconfig_list' on multiple symbols currently results + in undefined behavior. + + If the environment variable 'srctree' was set when the Config was + created, get_defconfig_filename() will first look relative to that + directory before looking in the current directory; see + Config.__init__(). + + WARNING: A wart here is that scripts/kconfig/Makefile sometimes uses the + --defconfig= option when calling the C implementation of e.g. + 'make defconfig'. This option overrides the 'option defconfig_list' + symbol, meaning the result from get_defconfig_filename() might not + match what 'make defconfig' would use. That probably ought to be worked + around somehow, so that this function always gives the "expected" + result.""" + if self.defconfig_sym is None: + return None + for filename, cond_expr in self.defconfig_sym.def_exprs: + if self._eval_expr(cond_expr) == "y": + filename = self._expand_sym_refs(filename) + # We first look in $srctree. os.path.join() won't work here as + # an absolute path in filename would override $srctree. + srctree_filename = os.path.normpath(self.srctree + "/" + filename) + if os.path.exists(srctree_filename): + return srctree_filename + if os.path.exists(filename): + return filename + return None + + def get_symbol(self, name): + """Returns the symbol with name 'name', or None if no such symbol + appears in the configuration. An alternative shorthand is conf[name], + where conf is a Config instance, though that will instead raise + KeyError if the symbol does not exist.""" + return self.syms.get(name) + + def get_top_level_items(self): + """Returns a list containing the items (symbols, menus, choice + statements and comments) at the top level of the configuration -- that + is, all items that do not appear within a menu or choice. The items + appear in the same order as within the configuration.""" + return self.top_block + + def get_symbols(self, all_symbols = True): + """Returns a list of symbols from the configuration. An alternative for + iterating over all defined symbols (in the order of definition) is + + for sym in config: + ... + + which relies on Config implementing __iter__() and is equivalent to + + for sym in config.get_symbols(False): + ... + + all_symbols (default: True) -- If True, all symbols -- including special + and undefined symbols -- will be included in the result, in + an undefined order. If False, only symbols actually defined + and not merely referred to in the configuration will be + included in the result, and will appear in the order that + they are defined within the Kconfig configuration files.""" + return self.syms.values() if all_symbols else self.kconfig_syms + + def get_choices(self): + """Returns a list containing all choice statements in the + configuration, in the order they appear in the Kconfig files.""" + return self.choices + + def get_menus(self): + """Returns a list containing all menus in the configuration, in the + order they appear in the Kconfig files.""" + return self.menus + + def get_comments(self): + """Returns a list containing all comments in the configuration, in the + order they appear in the Kconfig files.""" + return self.comments + + def eval(self, s): + """Returns the value of the expression 's' -- where 's' is represented + as a string -- in the context of the configuration. Raises + Kconfig_Syntax_Error if syntax errors are detected in 's'. + + For example, if FOO and BAR are tristate symbols at least one of which + has the value "y", then config.eval("y && (FOO || BAR)") => "y" + + This function always yields a tristate value. To get the value of + non-bool, non-tristate symbols, use Symbol.get_value(). + + The result of this function is consistent with how evaluation works for + conditional expressions in the configuration as well as in the C + implementation. "m" and m are rewritten as '"m" && MODULES' and 'm && + MODULES', respectively, and a result of "m" will get promoted to "y" if + we're running without modules. + + Syntax checking is somewhat lax, partly to be compatible with lax + parsing in the C implementation.""" + return self._eval_expr(self._parse_expr(self._tokenize(s, True), # Feed + None, # Current symbol or choice + s)) # line + + def get_config_header(self): + """Returns the (uncommented) textual header of the .config file most + recently loaded with load_config(). Returns None if no .config file has + been loaded or if the most recently loaded .config file has no header. + The header comprises all lines up to but not including the first line + that either + + 1. Does not start with "#" + 2. Has the form "# CONFIG_FOO is not set." + """ + return self.config_header + + def get_base_dir(self): + """Returns the base directory relative to which 'source' statements + will work, passed as an argument to Config.__init__().""" + return self.base_dir + + def set_print_warnings(self, print_warnings): + """Determines whether warnings related to this configuration (for + things like attempting to assign illegal values to symbols with + Symbol.set_user_value()) should be printed to stderr. + + print_warnings -- True if warnings should be printed.""" + self.print_warnings = print_warnings + + def set_print_undef_assign(self, print_undef_assign): + """Determines whether informational messages related to assignments to + undefined symbols should be printed to stderr for this configuration. + + print_undef_assign -- If True, such messages will be printed.""" + self.print_undef_assign = print_undef_assign + + def __getitem__(self, key): + """Returns the symbol with name 'name'. Raises KeyError if the symbol + does not appear in the configuration.""" + return self.syms[key] + + def __iter__(self): + """Convenience function for iterating over the set of all defined + symbols in the configuration, used like + + for sym in conf: + ... + + The iteration happens in the order of definition within the Kconfig + configuration files. Symbols only referred to but not defined will not + be included, nor will the special symbols n, m, and y. If you want to + include such symbols as well, see config.get_symbols().""" + return iter(self.kconfig_syms) + + def unset_user_values(self): + """Resets the values of all symbols, as if Config.load_config() or + Symbol.set_user_value() had never been called.""" + for sym in self.syms_iter(): + sym._unset_user_value_no_recursive_invalidate() + + def __str__(self): + """Returns a string containing various information about the Config.""" + return _sep_lines("Configuration", + "File : " + self.filename, + "Base directory : " + self.base_dir, + "Value of $ARCH at creation time : " + + ("(not set)" if self.arch is None else self.arch), + "Value of $SRCARCH at creation time : " + + ("(not set)" if self.srcarch is None else self.srcarch), + "Source tree (derived from $srctree;", + "defaults to '.' if $srctree isn't set) : " + self.srctree, + "Most recently loaded .config : " + + ("(no .config loaded)" if self.config_filename is None else + self.config_filename), + "Print warnings : " + + bool_str[self.print_warnings], + "Print assignments to undefined symbols : " + + bool_str[self.print_undef_assign]) + + # + # Private methods + # + + def _invalidate_all(self): + for sym in self.syms_iter(): + sym._invalidate() + + def _tokenize(self, s, for_eval = False, filename = None, linenr = None): + """Returns a _Feed instance containing tokens derived from the string + 's'. Registers any new symbols encountered (via _sym_lookup()). + + (I experimented with a pure regular expression implementation, but it + came out slower, less readable, and wouldn't have been as flexible.) + + for_eval -- True when parsing an expression for a call to + Config.eval(), in which case we should not treat the first + token specially nor register new symbols.""" + + # lstrip() would work here too, but removing the '\n' at the end leads + # to earlier termination in the 'while' loop below, saving lots of + # calls + s = s.strip() + if s == "" or s[0] == "#": + return _Feed([]) + + if for_eval: + i = 0 # The current index in the string being tokenized + previous = None # The previous token seen + tokens = [] + else: + # The initial word on a line is parsed specially. Let + # command_chars = [A-Za-z0-9_]. Then + # - leading non-command_chars characters on the line are ignored, and + # - the first token consists the following one or more command_chars + # characters. + # This is why things like "----help--" are accepted. + + initial_token_match = _initial_token_re_match(s) + if initial_token_match is None: + return _Feed([]) + # The current index in the string being tokenized + i = initial_token_match.end() + + keyword = _get_keyword(initial_token_match.group(1)) + if keyword is None: + # We expect a keyword as the first token + _tokenization_error(s, filename, linenr) + if keyword == T_HELP: + # Avoid junk after "help", e.g. "---", being registered as a + # symbol + return _Feed([T_HELP]) + tokens = [keyword] + previous = keyword + + # _tokenize() is a hotspot during parsing, and this speeds things up a + # bit + strlen = len(s) + append = tokens.append + + # Main tokenization loop. (Handles tokens past the first one.) + while i < strlen: + # Test for an identifier/keyword preceded by whitespace first; this + # is the most common case. + id_keyword_match = _id_keyword_re_match(s, i) + if id_keyword_match: + # We have an identifier or keyword. The above also stripped any + # whitespace for us. + name = id_keyword_match.group(1) + # Jump past it + i = id_keyword_match.end() + + # Keyword? + keyword = _get_keyword(name) + if keyword is not None: + append(keyword) + # What would ordinarily be considered a name is treated as a + # string after certain tokens. + elif previous in string_lex: + append(name) + else: + # We're dealing with a symbol. _sym_lookup() will take care + # of allocating a new Symbol instance if it's the first + # time we see it. + sym = self._sym_lookup(name, not for_eval) + + if previous == T_CONFIG or previous == T_MENUCONFIG: + # If the previous token is T_(MENU)CONFIG + # ("(menu)config"), we're tokenizing the first line of + # a symbol definition, and should remember this as a + # location where the symbol is defined. + sym.def_locations.append((filename, linenr)) + else: + # Otherwise, it's a reference to the symbol + sym.ref_locations.append((filename, linenr)) + + append(sym) + + else: + # This restrips whitespace that could have been stripped in the + # regex above, but it's worth it since identifiers/keywords are + # more common + s = s[i:].lstrip() + if s == "": + break + c = s[0] + i = 1 + + # String literal (constant symbol) + if c == '"' or c == "'": + if "\\" in s: + # Slow path: This could probably be sped up, but it's a + # very unusual case anyway. + quote = c + val = "" + while 1: + if i >= len(s): + _tokenization_error(s, filename, linenr) + c = s[i] + if c == quote: + break + if c == "\\": + if i + 1 >= len(s): + _tokenization_error(s, filename, linenr) + val += s[i + 1] + i += 2 + else: + val += c + i += 1 + i += 1 + append(val) + else: + # Fast path: If the string contains no backslashes (almost + # always) we can simply look for the matching quote. + end = s.find(c, i) + if end == -1: + _tokenization_error(s, filename, linenr) + append(s[i:end]) + i = end + 1 + + elif c == "&": + # Invalid characters are ignored + if i >= len(s) or s[i] != "&": continue + append(T_AND) + i += 1 + + elif c == "|": + # Invalid characters are ignored + if i >= len(s) or s[i] != "|": continue + append(T_OR) + i += 1 + + elif c == "!": + if i < len(s) and s[i] == "=": + append(T_UNEQUAL) + i += 1 + else: + append(T_NOT) + + elif c == "=": append(T_EQUAL) + elif c == "(": append(T_OPEN_PAREN) + elif c == ")": append(T_CLOSE_PAREN) + elif c == "#": break # Comment + + else: continue # Invalid characters are ignored + + previous = tokens[-1] + + return _Feed(tokens) + + # + # Parsing + # + + # Expression grammar: + # + # -> + # '=' + # '!=' + # '(' ')' + # '!' + # '&&' + # '||' + + def _parse_expr(self, feed, cur_sym_or_choice, line, filename = None, + linenr = None, transform_m = True): + """Parse an expression from the tokens in 'feed' using a simple + top-down approach. The result has the form (, ). + + feed -- _Feed instance containing the tokens for the expression. + + cur_sym_or_choice -- The symbol or choice currently being parsed, or + None if we're not parsing a symbol or choice. + Used for recording references to symbols. + + line -- The line containing the expression being parsed. + + filename (default: None) -- The file containing the expression. + + linenr (default: None) -- The line number containing the expression. + + transform_m (default: False) -- Determines if 'm' should be rewritten to + 'm && MODULES' -- see + parse_val_and_cond().""" + + # Use instance variables to avoid having to pass these as arguments + # through the top-down parser in _parse_expr_2(), which is tedious and + # obfuscates the code. A profiler run shows no noticeable performance + # difference. + self.parse_expr_cur_sym_or_choice = cur_sym_or_choice + self.parse_expr_line = line + self.parse_expr_filename = filename + self.parse_expr_linenr = linenr + self.parse_expr_transform_m = transform_m + + return self._parse_expr_2(feed) + + def _parse_expr_2(self, feed): + or_terms = [self._parse_or_term(feed)] + # Keep parsing additional terms while the lookahead is '||' + while feed.check(T_OR): + or_terms.append(self._parse_or_term(feed)) + return or_terms[0] if len(or_terms) == 1 else (OR, or_terms) + + def _parse_or_term(self, feed): + and_terms = [self._parse_factor(feed)] + # Keep parsing additional terms while the lookahead is '&&' + while feed.check(T_AND): + and_terms.append(self._parse_factor(feed)) + return and_terms[0] if len(and_terms) == 1 else (AND, and_terms) + + def _parse_factor(self, feed): + if feed.check(T_OPEN_PAREN): + expr_parse = self._parse_expr_2(feed) + + if not feed.check(T_CLOSE_PAREN): + _parse_error(self.parse_expr_line, + "missing end parenthesis.", + self.parse_expr_filename, + self.parse_expr_linenr) + + return expr_parse + + if feed.check(T_NOT): + return (NOT, self._parse_factor(feed)) + + sym_or_string = feed.get_next() + + if not isinstance(sym_or_string, (Symbol, str)): + _parse_error(self.parse_expr_line, + "malformed expression.", + self.parse_expr_filename, + self.parse_expr_linenr) + + if self.parse_expr_cur_sym_or_choice is not None and \ + isinstance(sym_or_string, Symbol): + self.parse_expr_cur_sym_or_choice.referenced_syms.add(sym_or_string) + + next_token = feed.peek_next() + + # For conditional expressions ('depends on ', '... if ', + # etc.), "m" and m are rewritten to "m" && MODULES. + if next_token != T_EQUAL and next_token != T_UNEQUAL: + if self.parse_expr_transform_m and (sym_or_string is self.m or + sym_or_string == "m"): + return (AND, ["m", self._sym_lookup("MODULES")]) + return sym_or_string + + relation = EQUAL if (feed.get_next() == T_EQUAL) else UNEQUAL + sym_or_string_2 = feed.get_next() + + if self.parse_expr_cur_sym_or_choice is not None and \ + isinstance(sym_or_string_2, Symbol): + self.parse_expr_cur_sym_or_choice.referenced_syms.add(sym_or_string_2) + + if sym_or_string is self.m: + sym_or_string = "m" + if sym_or_string_2 is self.m: + sym_or_string_2 = "m" + + return (relation, sym_or_string, sym_or_string_2) + + def _parse_file(self, filename, parent, deps, visible_if_deps, res = None): + """Parses the Kconfig file 'filename'. Returns a list with the Items in + the file. See _parse_block() for the meaning of the parameters.""" + return self._parse_block(_FileFeed(filename), None, parent, deps, + visible_if_deps, res) + + def _parse_block(self, line_feeder, end_marker, parent, deps, + visible_if_deps = None, res = None): + """Parses a block, which is the contents of either a file or an if, + menu, or choice statement. Returns a list with the Items in the block. + + end_marker -- The token that ends the block, e.g. T_ENDIF ("endif") for + if's. None for files. + + parent -- The enclosing menu, choice or if, or None if we're at the top + level. + + deps -- Dependencies from enclosing menus, choices and if's. + + visible_if_deps (default: None) -- 'visible if' dependencies from + enclosing menus. + + res (default: None) -- The list to add items to. If None, a new list is + created to hold the items.""" + + block = [] if res is None else res + + while 1: + # Do we already have a tokenized line that we determined wasn't + # part of whatever we were parsing earlier? See comment in + # Config.__init__(). + if self.end_line is not None: + line = self.end_line + tokens = self.end_line_tokens + tokens.go_to_start() + + self.end_line = None + self.end_line_tokens = None + else: + line = line_feeder.get_next() + if line is None: + if end_marker is not None: + raise Kconfig_Syntax_Error( + "Unexpected end of file {0}." + .format(line_feeder.get_filename())) + return block + + tokens = self._tokenize(line, False, + line_feeder.get_filename(), + line_feeder.get_linenr()) + + t0 = tokens.get_next() + if t0 is None: + continue + + # Cases are ordered roughly by frequency, which speeds things up a + # bit + + if t0 == T_CONFIG or t0 == T_MENUCONFIG: + # The tokenizer will automatically allocate a new Symbol object + # for any new names it encounters, so we don't need to worry + # about that here. + sym = tokens.get_next() + + # Symbols defined in multiple places get the parent of their + # first definition. However, for symbols whose parents are choice + # statements, the choice statement takes precedence. + if not sym.is_defined_ or isinstance(parent, Choice): + sym.parent = parent + + sym.is_defined_ = True + + self.kconfig_syms.append(sym) + block.append(sym) + + self._parse_properties(line_feeder, sym, deps, visible_if_deps) + + elif t0 == T_SOURCE: + kconfig_file = tokens.get_next() + exp_kconfig_file = self._expand_sym_refs(kconfig_file) + f = os.path.join(self.base_dir, exp_kconfig_file) + + if not os.path.exists(f): + raise IOError('{0}:{1}: sourced file "{2}" (expands to ' + '"{3}") not found. Perhaps base_dir ' + '(argument to Config.__init__(), currently ' + '"{4}") is set to the wrong value.' + .format(line_feeder.get_filename(), + line_feeder.get_linenr(), + kconfig_file, exp_kconfig_file, + self.base_dir)) + + # Add items to the same block + self._parse_file(f, parent, deps, visible_if_deps, block) + + elif t0 == end_marker: + # We have reached the end of the block + return block + + elif t0 == T_IF: + # If statements are treated as syntactic sugar for adding + # dependencies to enclosed items and do not have an explicit + # object representation. + + dep_expr = self._parse_expr(tokens, None, line, + line_feeder.get_filename(), + line_feeder.get_linenr()) + self._parse_block(line_feeder, + T_ENDIF, + parent, + _make_and(dep_expr, deps), + visible_if_deps, + block) # Add items to the same block + + elif t0 == T_COMMENT: + comment = Comment() + + comment.config = self + comment.parent = parent + comment.filename = line_feeder.get_filename() + comment.linenr = line_feeder.get_linenr() + comment.text = tokens.get_next() + + self.comments.append(comment) + block.append(comment) + + self._parse_properties(line_feeder, comment, deps, visible_if_deps) + + elif t0 == T_MENU: + menu = Menu() + + menu.config = self + menu.parent = parent + menu.filename = line_feeder.get_filename() + menu.linenr = line_feeder.get_linenr() + menu.title = tokens.get_next() + + self.menus.append(menu) + block.append(menu) + + # Parse properties and contents + self._parse_properties(line_feeder, menu, deps, visible_if_deps) + menu.block = self._parse_block(line_feeder, + T_ENDMENU, + menu, + menu.dep_expr, + _make_and(visible_if_deps, + menu.visible_if_expr)) + + elif t0 == T_CHOICE: + name = tokens.get_next() + if name is None: + choice = Choice() + self.choices.append(choice) + else: + # Named choice + choice = self.named_choices.get(name) + if choice is None: + choice = Choice() + choice.name = name + self.named_choices[name] = choice + self.choices.append(choice) + + choice.config = self + choice.parent = parent + + choice.def_locations.append((line_feeder.get_filename(), + line_feeder.get_linenr())) + + # Parse properties and contents + self._parse_properties(line_feeder, choice, deps, visible_if_deps) + choice.block = self._parse_block(line_feeder, + T_ENDCHOICE, + choice, + deps, + visible_if_deps) + + choice._determine_actual_symbols() + + # If no type is set for the choice, its type is that of the first + # choice item + if choice.type == UNKNOWN: + for item in choice.get_symbols(): + if item.type != UNKNOWN: + choice.type = item.type + break + + # Each choice item of UNKNOWN type gets the type of the choice + for item in choice.get_symbols(): + if item.type == UNKNOWN: + item.type = choice.type + + block.append(choice) + + elif t0 == T_MAINMENU: + text = tokens.get_next() + + if self.mainmenu_text is not None: + self._warn("overriding 'mainmenu' text. " + 'Old value: "{0}", new value: "{1}".' + .format(self.mainmenu_text, text), + line_feeder.get_filename(), + line_feeder.get_linenr()) + + self.mainmenu_text = text + + else: + _parse_error(line, "unrecognized construct.", + line_feeder.get_filename(), + line_feeder.get_linenr()) + + def _parse_properties(self, line_feeder, stmt, deps, visible_if_deps): + """Parsing of properties for symbols, menus, choices, and comments.""" + + def parse_val_and_cond(tokens, line, filename, linenr): + """Parses ' if ' constructs, where the 'if' part is + optional. Returns a tuple containing the parsed expressions, with + None as the second element if the 'if' part is missing.""" + val = self._parse_expr(tokens, stmt, line, filename, linenr, False) + if tokens.check(T_IF): + return (val, self._parse_expr(tokens, stmt, line, filename, linenr)) + return (val, None) + + # In case the symbol is defined in multiple locations, we need to + # remember what prompts, defaults, and selects are new for this + # definition, as "depends on" should only apply to the local + # definition. + new_prompt = None + new_def_exprs = [] + new_selects = [] + + # Dependencies from 'depends on' statements + depends_on_expr = None + + while 1: + line = line_feeder.get_next() + if line is None: + break + + filename = line_feeder.get_filename() + linenr = line_feeder.get_linenr() + + tokens = self._tokenize(line, False, filename, linenr) + + t0 = tokens.get_next() + if t0 is None: + continue + + # Cases are ordered roughly by frequency, which speeds things up a + # bit + + if t0 == T_DEPENDS: + if not tokens.check(T_ON): + _parse_error(line, 'expected "on" after "depends".', filename, linenr) + + parsed_deps = self._parse_expr(tokens, stmt, line, filename, linenr) + + if isinstance(stmt, (Menu, Comment)): + stmt.dep_expr = _make_and(stmt.dep_expr, parsed_deps) + else: + depends_on_expr = _make_and(depends_on_expr, parsed_deps) + + elif t0 == T_HELP: + # Find first non-blank (not all-space) line and get its + # indentation + + line_feeder.remove_blank() + line = line_feeder.get_next() + if line is None: + stmt.help = "" + break + + indent = _indentation(line) + if indent == 0: + # If the first non-empty lines has zero indent, there is no + # help text + stmt.help = "" + line_feeder.go_back() + break + + # The help text goes on till the first non-empty line with less + # indent + help_lines = [_deindent(line, indent)] + while 1: + line = line_feeder.get_next() + if line is None or \ + (not line.isspace() and _indentation(line) < indent): + stmt.help = "".join(help_lines) + break + help_lines.append(_deindent(line, indent)) + + if line is None: + break + + line_feeder.go_back() + + elif t0 == T_SELECT: + target = tokens.get_next() + + stmt.referenced_syms.add(target) + stmt.selected_syms.add(target) + + if tokens.check(T_IF): + new_selects.append((target, + self._parse_expr(tokens, stmt, line, filename, linenr))) + else: + new_selects.append((target, None)) + + elif t0 in (T_BOOL, T_TRISTATE, T_INT, T_HEX, T_STRING): + stmt.type = token_to_type[t0] + if len(tokens) > 1: + new_prompt = parse_val_and_cond(tokens, line, filename, linenr) + + elif t0 == T_DEFAULT: + new_def_exprs.append(parse_val_and_cond(tokens, line, filename, linenr)) + + elif t0 == T_DEF_BOOL: + stmt.type = BOOL + if len(tokens) > 1: + new_def_exprs.append(parse_val_and_cond(tokens, line, filename, linenr)) + + elif t0 == T_PROMPT: + # 'prompt' properties override each other within a single + # definition of a symbol, but additional prompts can be added + # by defining the symbol multiple times; hence 'new_prompt' + # instead of 'prompt'. + new_prompt = parse_val_and_cond(tokens, line, filename, linenr) + + elif t0 == T_RANGE: + lower = tokens.get_next() + upper = tokens.get_next() + stmt.referenced_syms.add(lower) + stmt.referenced_syms.add(upper) + + if tokens.check(T_IF): + stmt.ranges.append((lower, upper, + self._parse_expr(tokens, stmt, line, filename, linenr))) + else: + stmt.ranges.append((lower, upper, None)) + + elif t0 == T_DEF_TRISTATE: + stmt.type = TRISTATE + if len(tokens) > 1: + new_def_exprs.append(parse_val_and_cond(tokens, line, filename, linenr)) + + elif t0 == T_OPTION: + if tokens.check(T_ENV) and tokens.check(T_EQUAL): + env_var = tokens.get_next() + + stmt.is_special_ = True + stmt.is_from_env = True + + if env_var not in os.environ: + self._warn("The symbol {0} references the " + "non-existent environment variable {1} and " + "will get the empty string as its value. " + "If you're using kconfiglib via " + "'make (i)scriptconfig', it should have " + "set up the environment correctly for you. " + "If you still got this message, that " + "might be an error, and you should email " + "ulfalizer a.t Google's email service.""" + .format(stmt.name, env_var), + filename, linenr) + + stmt.cached_val = "" + else: + stmt.cached_val = os.environ[env_var] + + elif tokens.check(T_DEFCONFIG_LIST): + self.defconfig_sym = stmt + + elif tokens.check(T_MODULES): + # To reduce warning spam, only warn if 'option modules' is + # set on some symbol that isn't MODULES, which should be + # safe. I haven't run into any projects that make use + # modules besides the kernel yet, and there it's likely to + # keep being called "MODULES". + if stmt.name != "MODULES": + self._warn("the 'modules' option is not supported. " + "Let me know if this is a problem for you; " + "it shouldn't be that hard to implement. " + "(Note that modules are still supported -- " + "Kconfiglib just assumes the symbol name " + "MODULES, like older versions of the C " + "implementation did when 'option modules' " + "wasn't used.)", + filename, linenr) + + elif tokens.check(T_ALLNOCONFIG_Y): + if not isinstance(stmt, Symbol): + _parse_error(line, + "the 'allnoconfig_y' option is only valid for symbols.", + filename, + linenr) + stmt.allnoconfig_y = True + + else: + _parse_error(line, "unrecognized option.", filename, linenr) + + elif t0 == T_VISIBLE: + if not tokens.check(T_IF): + _parse_error(line, 'expected "if" after "visible".', filename, linenr) + if not isinstance(stmt, Menu): + _parse_error(line, + "'visible if' is only valid for menus.", + filename, + linenr) + + parsed_deps = self._parse_expr(tokens, stmt, line, filename, linenr) + stmt.visible_if_expr = _make_and(stmt.visible_if_expr, parsed_deps) + + elif t0 == T_OPTIONAL: + if not isinstance(stmt, Choice): + _parse_error(line, + '"optional" is only valid for choices.', + filename, + linenr) + stmt.optional = True + + else: + # See comment in Config.__init__() + self.end_line = line + self.end_line_tokens = tokens + break + + # Propagate dependencies from enclosing menus and if's. + + # For menus and comments.. + if isinstance(stmt, (Menu, Comment)): + stmt.orig_deps = stmt.dep_expr + stmt.deps_from_containing = deps + stmt.dep_expr = _make_and(stmt.dep_expr, deps) + + stmt.all_referenced_syms = \ + stmt.referenced_syms | _get_expr_syms(deps) + + # For symbols and choices.. + else: + + # See comment for 'menu_dep' + stmt.menu_dep = depends_on_expr + + # Propagate dependencies specified with 'depends on' to any new + # default expressions, prompts, and selections. ("New" since a + # symbol might be defined in multiple places and the dependencies + # should only apply to the local definition.) + + new_def_exprs = [(val_expr, _make_and(cond_expr, depends_on_expr)) + for val_expr, cond_expr in new_def_exprs] + + new_selects = [(target, _make_and(cond_expr, depends_on_expr)) + for target, cond_expr in new_selects] + + if new_prompt is not None: + prompt, cond_expr = new_prompt + + # 'visible if' dependencies from enclosing menus get propagated + # to prompts + if visible_if_deps is not None: + cond_expr = _make_and(cond_expr, visible_if_deps) + + new_prompt = (prompt, _make_and(cond_expr, depends_on_expr)) + + # We save the original expressions -- before any menu and if + # conditions have been propagated -- so these can be retrieved + # later. + + stmt.orig_def_exprs.extend(new_def_exprs) + if new_prompt is not None: + stmt.orig_prompts.append(new_prompt) + + # Only symbols can select + if isinstance(stmt, Symbol): + stmt.orig_selects.extend(new_selects) + + # Save dependencies from enclosing menus and if's + stmt.deps_from_containing = deps + + # The set of symbols referenced directly by the symbol/choice plus + # all symbols referenced by enclosing menus and if's. + stmt.all_referenced_syms = \ + stmt.referenced_syms | _get_expr_syms(deps) + + # Propagate dependencies from enclosing menus and if's + + stmt.def_exprs.extend([(val_expr, _make_and(cond_expr, deps)) + for val_expr, cond_expr in new_def_exprs]) + + for target, cond in new_selects: + target.rev_dep = _make_or(target.rev_dep, + _make_and(stmt, + _make_and(cond, deps))) + + if new_prompt is not None: + prompt, cond_expr = new_prompt + stmt.prompts.append((prompt, _make_and(cond_expr, deps))) + + # + # Symbol table manipulation + # + + def _sym_lookup(self, name, add_sym_if_not_exists = True): + """Fetches the symbol 'name' from the symbol table, optionally adding + it if it does not exist (this is usually what we want).""" + if name in self.syms: + return self.syms[name] + + new_sym = Symbol() + new_sym.config = self + new_sym.name = name + + if add_sym_if_not_exists: + self.syms[name] = new_sym + else: + # This warning is generated while evaluating an expression + # containing undefined symbols using Config.eval() + self._warn("no symbol {0} in configuration".format(name)) + + return new_sym + + # + # Evaluation of symbols and expressions + # + + def _eval_expr(self, expr): + """Evaluates an expression and returns one of the tristate values "n", + "m" or "y".""" + res = self._eval_expr_2(expr) + + # Promote "m" to "y" if we're running without modules. Internally, "m" + # is often rewritten to "m" && MODULES by both the C implementation and + # kconfiglib, which takes care of cases where "m" should be false if + # we're running without modules. + if res == "m" and not self._has_modules(): + return "y" + + return res + + def _eval_expr_2(self, expr): + if expr is None: + return "y" + + if isinstance(expr, Symbol): + # Non-bool/tristate symbols are always "n" in a tristate sense, + # regardless of their value + if expr.type != BOOL and expr.type != TRISTATE: + return "n" + return expr.get_value() + + if isinstance(expr, str): + return expr if (expr == "y" or expr == "m") else "n" + + first_expr = expr[0] + + if first_expr == AND: + res = "y" + for subexpr in expr[1]: + ev = self._eval_expr_2(subexpr) + # Return immediately upon discovering an "n" term + if ev == "n": + return "n" + if ev == "m": + res = "m" + # 'res' is either "m" or "y" here; we already handled the + # short-circuiting "n" case in the loop. + return res + + if first_expr == OR: + res = "n" + for subexpr in expr[1]: + ev = self._eval_expr_2(subexpr) + # Return immediately upon discovering a "y" term + if ev == "y": + return "y" + if ev == "m": + res = "m" + # 'res' is either "n" or "m" here; we already handled the + # short-circuiting "y" case in the loop. + return res + + if first_expr == NOT: + ev = self._eval_expr_2(expr[1]) + if ev == "y": + return "n" + return "y" if (ev == "n") else "m" + + if first_expr == EQUAL: + return "y" if (_str_val(expr[1]) == _str_val(expr[2])) else "n" + + if first_expr == UNEQUAL: + return "y" if (_str_val(expr[1]) != _str_val(expr[2])) else "n" + + _internal_error("Internal error while evaluating expression: " + "unknown operation {0}.".format(first_expr)) + + def _eval_min(self, e1, e2): + """Returns the minimum value of the two expressions. Equates None with + 'y'.""" + e1_eval = self._eval_expr(e1) + e2_eval = self._eval_expr(e2) + return e1_eval if tri_less(e1_eval, e2_eval) else e2_eval + + def _eval_max(self, e1, e2): + """Returns the maximum value of the two expressions. Equates None with + 'y'.""" + e1_eval = self._eval_expr(e1) + e2_eval = self._eval_expr(e2) + return e1_eval if tri_greater(e1_eval, e2_eval) else e2_eval + + # + # Methods related to the MODULES symbol + # + + def _has_modules(self): + modules_sym = self.syms.get("MODULES") + return (modules_sym is not None) and (modules_sym.get_value() == "y") + + # + # Dependency tracking + # + + def _build_dep(self): + """Populates the Symbol.dep sets, linking the symbol to the symbols + that immediately depend on it in the sense that changing the value of + the symbol might affect the values of those other symbols. This is used + for caching/invalidation purposes. The calculated sets might be larger + than necessary as we don't do any complicated analysis of the + expressions.""" + + # Adds 'sym' as a directly dependent symbol to all symbols that appear + # in the expression 'e' + def add_expr_deps(e, sym): + for s in _get_expr_syms(e): + s.dep.add(sym) + + # The directly dependent symbols of a symbol are: + # - Any symbols whose prompts, default values, rev_dep (select + # condition), or ranges depend on the symbol + # - Any symbols that belong to the same choice statement as the symbol + # (these won't be included in 'dep' as that makes the dependency + # graph unwieldy, but Symbol._get_dependent() will include them) + # - Any symbols in a choice statement that depends on the symbol + for sym in self.syms_iter(): + for _, e in sym.prompts: + add_expr_deps(e, sym) + + for v, e in sym.def_exprs: + add_expr_deps(v, sym) + add_expr_deps(e, sym) + + add_expr_deps(sym.rev_dep, sym) + + for l, u, e in sym.ranges: + add_expr_deps(l, sym) + add_expr_deps(u, sym) + add_expr_deps(e, sym) + + if sym.is_choice_symbol_: + choice = sym.parent + for _, e in choice.prompts: + add_expr_deps(e, sym) + for _, e in choice.def_exprs: + add_expr_deps(e, sym) + + def _expr_val_str(self, expr, no_value_str = "(none)", get_val_instead_of_eval = False): + # Since values are valid expressions, _expr_to_str() will get a nice + # string representation for those as well. + + if expr is None: + return no_value_str + + if get_val_instead_of_eval: + if isinstance(expr, str): + return _expr_to_str(expr) + val = expr.get_value() + else: + val = self._eval_expr(expr) + + return "{0} (value: {1})".format(_expr_to_str(expr), _expr_to_str(val)) + + def _expand_sym_refs(self, s): + """Expands $-references to symbols in 's' to symbol values, or to the + empty string for undefined symbols.""" + + while 1: + sym_ref_match = _sym_ref_re_search(s) + if sym_ref_match is None: + return s + + sym_name = sym_ref_match.group(0)[1:] + sym = self.syms.get(sym_name) + expansion = "" if sym is None else sym.get_value() + + s = s[:sym_ref_match.start()] + \ + expansion + \ + s[sym_ref_match.end():] + + def _get_sym_or_choice_str(self, sc): + """Symbols and choices have many properties in common, so we factor out + common __str__() stuff here. "sc" is short for "symbol or choice".""" + + # As we deal a lot with string representations here, use some + # convenient shorthand: + s = _expr_to_str + + # + # Common symbol/choice properties + # + + user_val_str = "(no user value)" if sc.user_val is None else s(sc.user_val) + + # Build prompts string + if sc.prompts == []: + prompts_str = " (no prompts)" + else: + prompts_str_rows = [] + for prompt, cond_expr in sc.orig_prompts: + if cond_expr is None: + prompts_str_rows.append(' "{0}"'.format(prompt)) + else: + prompts_str_rows.append(' "{0}" if {1}' + .format(prompt, self._expr_val_str(cond_expr))) + prompts_str = "\n".join(prompts_str_rows) + + # Build locations string + if sc.def_locations == []: + locations_str = "(no locations)" + else: + locations_str = " ".join(["{0}:{1}".format(filename, linenr) for + (filename, linenr) in sc.def_locations]) + + # Build additional-dependencies-from-menus-and-if's string + additional_deps_str = " " + self._expr_val_str(sc.deps_from_containing, + "(no additional dependencies)") + + # + # Symbol-specific stuff + # + + if isinstance(sc, Symbol): + # Build ranges string + if isinstance(sc, Symbol): + if sc.ranges == []: + ranges_str = " (no ranges)" + else: + ranges_str_rows = [] + for l, u, cond_expr in sc.ranges: + if cond_expr is None: + ranges_str_rows.append(" [{0}, {1}]".format(s(l), s(u))) + else: + ranges_str_rows.append(" [{0}, {1}] if {2}" + .format(s(l), s(u), self._expr_val_str(cond_expr))) + ranges_str = "\n".join(ranges_str_rows) + + # Build default values string + if sc.def_exprs == []: + defaults_str = " (no default values)" + else: + defaults_str_rows = [] + for val_expr, cond_expr in sc.orig_def_exprs: + row_str = " " + self._expr_val_str(val_expr, "(none)", sc.type == STRING) + defaults_str_rows.append(row_str) + defaults_str_rows.append(" Condition: " + self._expr_val_str(cond_expr)) + defaults_str = "\n".join(defaults_str_rows) + + # Build selects string + if sc.orig_selects == []: + selects_str = " (no selects)" + else: + selects_str_rows = [] + for target, cond_expr in sc.orig_selects: + if cond_expr is None: + selects_str_rows.append(" {0}".format(target.name)) + else: + selects_str_rows.append(" {0} if ".format(target.name) + + self._expr_val_str(cond_expr)) + selects_str = "\n".join(selects_str_rows) + + res = _sep_lines("Symbol " + + ("(no name)" if sc.name is None else sc.name), + "Type : " + typename[sc.type], + "Value : " + s(sc.get_value()), + "User value : " + user_val_str, + "Visibility : " + s(sc.get_visibility()), + "Is choice item : " + bool_str[sc.is_choice_symbol_], + "Is defined : " + bool_str[sc.is_defined_], + "Is from env. : " + bool_str[sc.is_from_env], + "Is special : " + bool_str[sc.is_special_] + "\n") + if sc.ranges != []: + res += _sep_lines("Ranges:", + ranges_str + "\n") + res += _sep_lines("Prompts:", + prompts_str, + "Default values:", + defaults_str, + "Selects:", + selects_str, + "Reverse (select-related) dependencies:", + " (no reverse dependencies)" if sc.rev_dep == "n" + else " " + self._expr_val_str(sc.rev_dep), + "Additional dependencies from enclosing menus and if's:", + additional_deps_str, + "Locations: " + locations_str) + + return res + + # + # Choice-specific stuff + # + + # Build selected symbol string + sel = sc.get_selection() + sel_str = "(no selection)" if sel is None else sel.name + + # Build default values string + if sc.def_exprs == []: + defaults_str = " (no default values)" + else: + defaults_str_rows = [] + for sym, cond_expr in sc.orig_def_exprs: + if cond_expr is None: + defaults_str_rows.append(" {0}".format(sym.name)) + else: + defaults_str_rows.append(" {0} if ".format(sym.name) + + self._expr_val_str(cond_expr)) + defaults_str = "\n".join(defaults_str_rows) + + # Build contained symbols string + names = [sym.name for sym in sc.get_symbols()] + syms_string = "(empty)" if names == [] else " ".join(names) + + return _sep_lines("Choice", + "Name (for named choices): " + + ("(no name)" if sc.name is None else sc.name), + "Type : " + typename[sc.type], + "Selected symbol : " + sel_str, + "User value : " + user_val_str, + "Mode : " + s(sc.get_mode()), + "Visibility : " + s(sc.get_visibility()), + "Optional : " + bool_str[sc.optional], + "Prompts:", + prompts_str, + "Defaults:", + defaults_str, + "Choice symbols:", + " " + syms_string, + "Additional dependencies from enclosing menus and if's:", + additional_deps_str, + "Locations: " + locations_str) + + def _expr_depends_on(self, expr, sym): + """Reimplementation of expr_depends_symbol() from mconf.c. Used to + determine if a submenu should be implicitly created, which influences what + items inside choice statements are considered choice items.""" + if expr is None: + return False + + def rec(expr): + if isinstance(expr, str): + return False + if isinstance(expr, Symbol): + return expr is sym + + e0 = expr[0] + if e0 == EQUAL or e0 == UNEQUAL: + return self._eq_to_sym(expr) is sym + if e0 == AND: + for and_expr in expr[1]: + if rec(and_expr): + return True + return False + + return rec(expr) + + def _eq_to_sym(self, eq): + """_expr_depends_on() helper. For (in)equalities of the form sym = y/m + or sym != n, returns sym. For other (in)equalities, returns None.""" + relation, left, right = eq + left = self._transform_n_m_y(left) + right = self._transform_n_m_y(right) + + # Make sure the symbol (if any) appears to the left + if not isinstance(left, Symbol): + left, right = right, left + if not isinstance(left, Symbol): + return None + if (relation == EQUAL and (right == "y" or right == "m")) or \ + (relation == UNEQUAL and right == "n"): + return left + return None + + def _transform_n_m_y(self, item): + """_eq_to_sym() helper. Translates the symbols n, m, and y to their + string equivalents.""" + if item is self.n: + return "n" + if item is self.m: + return "m" + if item is self.y: + return "y" + return item + + def _warn(self, msg, filename = None, linenr = None): + """For printing warnings to stderr.""" + if self.print_warnings: + _stderr_msg("warning: " + msg, filename, linenr) + +class Item(object): + + """Base class for symbols and other Kconfig constructs. Subclasses are + Symbol, Choice, Menu, and Comment.""" + + def is_symbol(self): + """Returns True if the item is a symbol. Short for + isinstance(item, kconfiglib.Symbol).""" + return isinstance(self, Symbol) + + def is_choice(self): + """Returns True if the item is a choice. Short for + isinstance(item, kconfiglib.Choice).""" + return isinstance(self, Choice) + + def is_menu(self): + """Returns True if the item is a menu. Short for + isinstance(item, kconfiglib.Menu).""" + return isinstance(self, Menu) + + def is_comment(self): + """Returns True if the item is a comment. Short for + isinstance(item, kconfiglib.Comment).""" + return isinstance(self, Comment) + +class Symbol(Item): + + """Represents a configuration symbol - e.g. FOO for + + config FOO + ...""" + + # + # Public interface + # + + def get_value(self): + """Calculate and return the value of the symbol. See also + Symbol.set_user_value().""" + + if self.cached_val is not None: + return self.cached_val + + self.write_to_conf = False + + # As a quirk of Kconfig, undefined symbols get their name as their + # value. This is why things like "FOO = bar" work for seeing if FOO has + # the value "bar". + if self.type == UNKNOWN: + self.cached_val = self.name + return self.name + + new_val = default_value[self.type] + + vis = _get_visibility(self) + + if self.type == BOOL or self.type == TRISTATE: + # The visibility and mode (modules-only or single-selection) of + # choice items will be taken into account in _get_visibility() + if self.is_choice_symbol_: + if vis != "n": + choice = self.parent + mode = choice.get_mode() + + self.write_to_conf = (mode != "n") + + if mode == "y": + new_val = "y" if (choice.get_selection() is self) else "n" + elif mode == "m": + if self.user_val == "m" or self.user_val == "y": + new_val = "m" + + else: + # If the symbol is visible and has a user value, use that. + # Otherwise, look at defaults. + use_defaults = True + + if vis != "n": + self.write_to_conf = True + if self.user_val is not None: + new_val = self.config._eval_min(self.user_val, vis) + use_defaults = False + + if use_defaults: + for val_expr, cond_expr in self.def_exprs: + cond_eval = self.config._eval_expr(cond_expr) + if cond_eval != "n": + self.write_to_conf = True + new_val = self.config._eval_min(val_expr, cond_eval) + break + + # Reverse (select-related) dependencies take precedence + rev_dep_val = self.config._eval_expr(self.rev_dep) + if rev_dep_val != "n": + self.write_to_conf = True + new_val = self.config._eval_max(new_val, rev_dep_val) + + # Promote "m" to "y" for booleans + if new_val == "m" and self.type == BOOL: + new_val = "y" + + elif self.type == STRING: + use_defaults = True + + if vis != "n": + self.write_to_conf = True + if self.user_val is not None: + new_val = self.user_val + use_defaults = False + + if use_defaults: + for val_expr, cond_expr in self.def_exprs: + if self.config._eval_expr(cond_expr) != "n": + self.write_to_conf = True + new_val = _str_val(val_expr) + break + + elif self.type == HEX or self.type == INT: + has_active_range = False + low = None + high = None + use_defaults = True + + base = 16 if self.type == HEX else 10 + + for(l, h, cond_expr) in self.ranges: + if self.config._eval_expr(cond_expr) != "n": + has_active_range = True + + low_str = _str_val(l) + high_str = _str_val(h) + low = int(low_str, base) if \ + _is_base_n(low_str, base) else 0 + high = int(high_str, base) if \ + _is_base_n(high_str, base) else 0 + + break + + if vis != "n": + self.write_to_conf = True + + if self.user_val is not None and \ + _is_base_n(self.user_val, base) and \ + (not has_active_range or + low <= int(self.user_val, base) <= high): + + # If the user value is OK, it is stored in exactly the same + # form as specified in the assignment (with or without + # "0x", etc). + + use_defaults = False + new_val = self.user_val + + if use_defaults: + for val_expr, cond_expr in self.def_exprs: + if self.config._eval_expr(cond_expr) != "n": + self.write_to_conf = True + + # If the default value is OK, it is stored in exactly + # the same form as specified. Otherwise, it is clamped + # to the range, and the output has "0x" as appropriate + # for the type. + + new_val = _str_val(val_expr) + + if _is_base_n(new_val, base): + new_val_num = int(new_val, base) + if has_active_range: + clamped_val = None + + if new_val_num < low: + clamped_val = low + elif new_val_num > high: + clamped_val = high + + if clamped_val is not None: + new_val = (hex(clamped_val) if \ + self.type == HEX else str(clamped_val)) + + break + else: # For the for loop + # If no user value or default kicks in but the hex/int has + # an active range, then the low end of the range is used, + # provided it's > 0, with "0x" prepended as appropriate. + if has_active_range and low > 0: + new_val = (hex(low) if self.type == HEX else str(low)) + + self.cached_val = new_val + return new_val + + def set_user_value(self, v): + """Sets the user value of the symbol. + + Equal in effect to assigning the value to the symbol within a .config + file. Use get_lower/upper_bound() or get_assignable_values() to find + the range of currently assignable values for bool and tristate symbols; + setting values outside this range will cause the user value to differ + from the result of Symbol.get_value() (be truncated). Values that are + invalid for the type (such as a_bool.set_user_value("foo")) are + ignored, and a warning is emitted if an attempt is made to assign such + a value. + + For any type of symbol, is_modifiable() can be used to check if a user + value will currently have any effect on the symbol, as determined by + its visibility and range of assignable values. Any value that is valid + for the type (bool, tristate, etc.) will end up being reflected in + get_user_value() though, and might have an effect later if conditions + change. To get rid of the user value, use unset_user_value(). + + Any symbols dependent on the symbol are (recursively) invalidated, so + things will just work with regards to dependencies. + + v -- The user value to give to the symbol.""" + self._set_user_value_no_invalidate(v, False) + + # There might be something more efficient you could do here, but play + # it safe. + if self.name == "MODULES": + self.config._invalidate_all() + return + + self._invalidate() + self._invalidate_dependent() + + def unset_user_value(self): + """Resets the user value of the symbol, as if the symbol had never + gotten a user value via Config.load_config() or + Symbol.set_user_value().""" + self._unset_user_value_no_recursive_invalidate() + self._invalidate_dependent() + + def get_user_value(self): + """Returns the value assigned to the symbol in a .config or via + Symbol.set_user_value() (provided the value was valid for the type of the + symbol). Returns None in case of no user value.""" + return self.user_val + + def get_name(self): + """Returns the name of the symbol.""" + return self.name + + def get_prompts(self): + """Returns a list of prompts defined for the symbol, in the order they + appear in the configuration files. Returns the empty list for symbols + with no prompt. + + This list will have a single entry for the vast majority of symbols + having prompts, but having multiple prompts for a single symbol is + possible through having multiple 'config' entries for it.""" + return [prompt for prompt, _ in self.orig_prompts] + + def get_upper_bound(self): + """For string/hex/int symbols and for bool and tristate symbols that + cannot be modified (see is_modifiable()), returns None. + + Otherwise, returns the highest value the symbol can be set to with + Symbol.set_user_value() (that will not be truncated): one of "m" or "y", + arranged from lowest to highest. This corresponds to the highest value + the symbol could be given in e.g. the 'make menuconfig' interface. + + See also the tri_less*() and tri_greater*() functions, which could come + in handy.""" + if self.type != BOOL and self.type != TRISTATE: + return None + rev_dep = self.config._eval_expr(self.rev_dep) + # A bool selected to "m" gets promoted to "y" + if self.type == BOOL and rev_dep == "m": + rev_dep = "y" + vis = _get_visibility(self) + if (tri_to_int[vis] - tri_to_int[rev_dep]) > 0: + return vis + return None + + def get_lower_bound(self): + """For string/hex/int symbols and for bool and tristate symbols that + cannot be modified (see is_modifiable()), returns None. + + Otherwise, returns the lowest value the symbol can be set to with + Symbol.set_user_value() (that will not be truncated): one of "n" or "m", + arranged from lowest to highest. This corresponds to the lowest value + the symbol could be given in e.g. the 'make menuconfig' interface. + + See also the tri_less*() and tri_greater*() functions, which could come + in handy.""" + if self.type != BOOL and self.type != TRISTATE: + return None + rev_dep = self.config._eval_expr(self.rev_dep) + # A bool selected to "m" gets promoted to "y" + if self.type == BOOL and rev_dep == "m": + rev_dep = "y" + if (tri_to_int[_get_visibility(self)] - tri_to_int[rev_dep]) > 0: + return rev_dep + return None + + def get_assignable_values(self): + """For string/hex/int symbols and for bool and tristate symbols that + cannot be modified (see is_modifiable()), returns the empty list. + + Otherwise, returns a list containing the user values that can be + assigned to the symbol (that won't be truncated). Usage example: + + if "m" in sym.get_assignable_values(): + sym.set_user_value("m") + + This is basically a more convenient interface to + get_lower/upper_bound() when wanting to test if a particular tristate + value can be assigned.""" + if self.type != BOOL and self.type != TRISTATE: + return [] + rev_dep = self.config._eval_expr(self.rev_dep) + # A bool selected to "m" gets promoted to "y" + if self.type == BOOL and rev_dep == "m": + rev_dep = "y" + res = ["n", "m", "y"][tri_to_int[rev_dep] : + tri_to_int[_get_visibility(self)] + 1] + return res if len(res) > 1 else [] + + def get_type(self): + """Returns the type of the symbol: one of UNKNOWN, BOOL, TRISTATE, + STRING, HEX, or INT. These are defined at the top level of the module, + so you'd do something like + + if sym.get_type() == kconfiglib.STRING: + ...""" + return self.type + + def get_visibility(self): + """Returns the visibility of the symbol: one of "n", "m" or "y". For + bool and tristate symbols, this is an upper bound on the value users + can set for the symbol. For other types of symbols, a visibility of "n" + means the user value will be ignored. A visibility of "n" corresponds + to not being visible in the 'make *config' interfaces. + + Example (assuming we're running with modules enabled -- i.e., MODULES + set to 'y'): + + # Assume this has been assigned 'n' + config N_SYM + tristate "N_SYM" + + # Assume this has been assigned 'm' + config M_SYM + tristate "M_SYM" + + # Has visibility 'n' + config A + tristate "A" + depends on N_SYM + + # Has visibility 'm' + config B + tristate "B" + depends on M_SYM + + # Has visibility 'y' + config C + tristate "C" + + # Has no prompt, and hence visibility 'n' + config D + tristate + + Having visibility be tri-valued ensures that e.g. a symbol cannot be + set to "y" by the user if it depends on a symbol with value "m", which + wouldn't be safe. + + You should probably look at get_lower/upper_bound(), + get_assignable_values() and is_modifiable() before using this.""" + return _get_visibility(self) + + def get_parent(self): + """Returns the menu or choice statement that contains the symbol, or + None if the symbol is at the top level. Note that if statements are + treated as syntactic and do not have an explicit class + representation.""" + return self.parent + + def get_referenced_symbols(self, refs_from_enclosing = False): + """Returns the set() of all symbols referenced by this symbol. For + example, the symbol defined by + + config FOO + bool + prompt "foo" if A && B + default C if D + depends on E + select F if G + + references the symbols A through G. + + refs_from_enclosing (default: False) -- If True, the symbols + referenced by enclosing menus and if's will be + included in the result.""" + return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms + + def get_selected_symbols(self): + """Returns the set() of all symbols X for which this symbol has a + 'select X' or 'select X if Y' (regardless of whether Y is satisfied or + not). This is a subset of the symbols returned by + get_referenced_symbols().""" + return self.selected_syms + + def get_help(self): + """Returns the help text of the symbol, or None if the symbol has no + help text.""" + return self.help + + def get_config(self): + """Returns the Config instance this symbol is from.""" + return self.config + + def get_def_locations(self): + """Returns a list of (filename, linenr) tuples, where filename (string) + and linenr (int) represent a location where the symbol is defined. For + the vast majority of symbols this list will only contain one element. + For the following Kconfig, FOO would get two entries: the lines marked + with *. + + config FOO * + bool "foo prompt 1" + + config FOO * + bool "foo prompt 2" + """ + return self.def_locations + + def get_ref_locations(self): + """Returns a list of (filename, linenr) tuples, where filename (string) + and linenr (int) represent a location where the symbol is referenced in + the configuration. For example, the lines marked by * would be included + for FOO below: + + config A + bool + default BAR || FOO * + + config B + tristate + depends on FOO * + default m if FOO * + + if FOO * + config A + bool "A" + endif + + config FOO (definition not included) + bool + """ + return self.ref_locations + + def is_modifiable(self): + """Returns True if the value of the symbol could be modified by calling + Symbol.set_user_value(). + + For bools and tristates, this corresponds to the symbol being visible + in the 'make menuconfig' interface and not already being pinned to a + specific value (e.g. because it is selected by another symbol). + + For strings and numbers, this corresponds to just being visible. (See + Symbol.get_visibility().)""" + if self.is_special_: + return False + if self.type == BOOL or self.type == TRISTATE: + rev_dep = self.config._eval_expr(self.rev_dep) + # A bool selected to "m" gets promoted to "y" + if self.type == BOOL and rev_dep == "m": + rev_dep = "y" + return (tri_to_int[_get_visibility(self)] - + tri_to_int[rev_dep]) > 0 + return _get_visibility(self) != "n" + + def is_defined(self): + """Returns False if the symbol is referred to in the Kconfig but never + actually defined.""" + return self.is_defined_ + + def is_special(self): + """Returns True if the symbol is one of the special symbols n, m, y, or + UNAME_RELEASE, or gets its value from the environment.""" + return self.is_special_ + + def is_from_environment(self): + """Returns True if the symbol gets its value from the environment.""" + return self.is_from_env + + def has_ranges(self): + """Returns True if the symbol is of type INT or HEX and has ranges that + limit what values it can take on.""" + return self.ranges != [] + + def is_choice_symbol(self): + """Returns True if the symbol is in a choice statement and is an actual + choice symbol (see Choice.get_symbols()).""" + return self.is_choice_symbol_ + + def is_choice_selection(self): + """Returns True if the symbol is contained in a choice statement and is + the selected item. Equivalent to + 'sym.is_choice_symbol() and sym.get_parent().get_selection() is sym'.""" + return self.is_choice_symbol_ and self.parent.get_selection() is self + + def is_allnoconfig_y(self): + """Returns True if the symbol has the 'allnoconfig_y' option set.""" + return self.allnoconfig_y + + def __str__(self): + """Returns a string containing various information about the symbol.""" + return self.config._get_sym_or_choice_str(self) + + # + # Private methods + # + + def __init__(self): + """Symbol constructor -- not intended to be called directly by + kconfiglib clients.""" + + self.prompts = [] + self.cached_visibility = None + + self.config = None + + self.parent = None + self.name = None + self.type = UNKNOWN + + self.def_exprs = [] + self.ranges = [] + self.rev_dep = "n" + + # The prompt, default value and select conditions without any + # dependencies from menus or if's propagated to them + + self.orig_prompts = [] + self.orig_def_exprs = [] + self.orig_selects = [] + + # Dependencies inherited from containing menus and if's + self.deps_from_containing = None + + self.help = None + + # The set of symbols referenced by this symbol (see + # get_referenced_symbols()) + self.referenced_syms = set() + + # The set of symbols selected by this symbol (see + # get_selected_symbols()) + self.selected_syms = set() + + # Like 'referenced_syms', but includes symbols from + # dependencies inherited from enclosing menus and if's + self.all_referenced_syms = set() + + # This is set to True for "actual" choice symbols. See + # Choice._determine_actual_symbols(). The trailing underscore avoids a + # collision with is_choice_symbol(). + self.is_choice_symbol_ = False + + # This records only dependencies specified with 'depends on'. Needed + # when determining actual choice items (hrrrr...). See also + # Choice._determine_actual_symbols(). + self.menu_dep = None + + # See Symbol.get_ref/def_locations(). + self.def_locations = [] + self.ref_locations = [] + + self.user_val = None + + # Flags + + # Should the symbol get an entry in .config? + self.write_to_conf = False + + # Caches the calculated value + self.cached_val = None + + # Populated in Config._build_dep() after parsing. Links the symbol to + # the symbols that immediately depend on it (in a caching/invalidation + # sense). The total set of dependent symbols for the symbol (the + # transitive closure) is calculated on an as-needed basis in + # _get_dependent(). + self.dep = set() + + # Caches the total list of dependent symbols. Calculated in + # _get_dependent(). + self.cached_deps = None + + # Does the symbol have an entry in the Kconfig file? The trailing + # underscore avoids a collision with is_defined(). + self.is_defined_ = False + + # Does the symbol get its value in some special way, e.g. from the + # environment or by being one of the special symbols n, m, and y? If + # so, the value is stored in self.cached_val, which is never + # invalidated. The trailing underscore avoids a collision with + # is_special(). + self.is_special_ = False + + # Does the symbol get its value from the environment? + self.is_from_env = False + + # Does the symbol have the 'allnoconfig_y' option set? + self.allnoconfig_y = False + + def _invalidate(self): + if self.is_special_: + return + + if self.is_choice_symbol_: + self.parent._invalidate() + + self.cached_val = None + self.cached_visibility = None + self.write_to_conf = False + + def _invalidate_dependent(self): + for sym in self._get_dependent(): + sym._invalidate() + + def _set_user_value_no_invalidate(self, v, suppress_load_warnings): + """Like set_user_value(), but does not invalidate any symbols. + + suppress_load_warnings -- + some warnings are annoying when loading a .config that can be helpful + when manually invoking set_user_value(). This flag is set to True to + suppress such warnings. + + Perhaps this could be made optional for load_config() instead.""" + + if self.is_special_: + if self.is_from_env: + self.config._warn('attempt to assign the value "{0}" to the ' + 'symbol {1}, which gets its value from the ' + 'environment. Assignment ignored.' + .format(v, self.name)) + else: + self.config._warn('attempt to assign the value "{0}" to the ' + 'special symbol {1}. Assignment ignored.' + .format(v, self.name)) + return + + if not self.is_defined_: + filename, linenr = self.ref_locations[0] + if self.config.print_undef_assign: + _stderr_msg('note: attempt to assign the value "{0}" to {1}, ' + "which is referenced at {2}:{3} but never " + "defined. Assignment ignored." + .format(v, self.name, filename, linenr)) + return + + # Check if the value is valid for our type + if not ((self.type == BOOL and (v == "y" or v == "n") ) or + (self.type == TRISTATE and (v == "y" or v == "m" or + v == "n") ) or + (self.type == STRING ) or + (self.type == INT and _is_base_n(v, 10) ) or + (self.type == HEX and _is_base_n(v, 16) )): + self.config._warn('the value "{0}" is invalid for {1}, which has type {2}. ' + "Assignment ignored." + .format(v, self.name, typename[self.type])) + return + + if self.prompts == [] and not suppress_load_warnings: + self.config._warn('assigning "{0}" to the symbol {1} which ' + 'lacks prompts and thus has visibility "n". ' + 'The assignment will have no effect.' + .format(v, self.name)) + + self.user_val = v + + if self.is_choice_symbol_ and (self.type == BOOL or + self.type == TRISTATE): + choice = self.parent + if v == "y": + choice.user_val = self + choice.user_mode = "y" + elif v == "m": + choice.user_val = None + choice.user_mode = "m" + + def _unset_user_value_no_recursive_invalidate(self): + self._invalidate() + self.user_val = None + + if self.is_choice_symbol_: + self.parent._unset_user_value() + + def _make_conf(self): + if self.already_written: + return [] + + self.already_written = True + + # Note: write_to_conf is determined in get_value() + val = self.get_value() + if not self.write_to_conf: + return [] + + if self.type == BOOL or self.type == TRISTATE: + if val == "m" or val == "y": + return ["CONFIG_{0}={1}".format(self.name, val)] + return ["# CONFIG_{0} is not set".format(self.name)] + + elif self.type == STRING: + # Escape \ and " + return ['CONFIG_{0}="{1}"' + .format(self.name, + val.replace("\\", "\\\\").replace('"', '\\"'))] + + elif self.type == INT or self.type == HEX: + return ["CONFIG_{0}={1}".format(self.name, val)] + + else: + _internal_error('Internal error while creating .config: unknown type "{0}".' + .format(self.type)) + + def _get_dependent(self): + """Returns the set of symbols that should be invalidated if the value + of the symbol changes, because they might be affected by the change. + Note that this is an internal API -- it's probably of limited + usefulness to clients.""" + if self.cached_deps is not None: + return self.cached_deps + + res = set() + + self._add_dependent_ignore_siblings(res) + if self.is_choice_symbol_: + for s in self.parent.get_symbols(): + if s is not self: + res.add(s) + s._add_dependent_ignore_siblings(res) + + self.cached_deps = res + return res + + def _add_dependent_ignore_siblings(self, to): + """Calculating dependencies gets a bit tricky for choice items as they + all depend on each other, potentially leading to infinite recursion. + This helper function calculates dependencies ignoring the other symbols + in the choice. It also works fine for symbols that are not choice + items.""" + for s in self.dep: + to.add(s) + to |= s._get_dependent() + + def _has_auto_menu_dep_on(self, on): + """See Choice._determine_actual_symbols().""" + if not isinstance(self.parent, Choice): + _internal_error("Attempt to determine auto menu dependency for symbol ouside of choice.") + + if self.prompts == []: + # If we have no prompt, use the menu dependencies instead (what was + # specified with 'depends on') + return self.menu_dep is not None and \ + self.config._expr_depends_on(self.menu_dep, on) + + for _, cond_expr in self.prompts: + if self.config._expr_depends_on(cond_expr, on): + return True + + return False + +class Menu(Item): + + """Represents a menu statement.""" + + # + # Public interface + # + + def get_config(self): + """Return the Config instance this menu is from.""" + return self.config + + def get_visibility(self): + """Returns the visibility of the menu. This also affects the visibility + of subitems. See also Symbol.get_visibility().""" + return self.config._eval_expr(self.dep_expr) + + def get_visible_if_visibility(self): + """Returns the visibility the menu gets from its 'visible if' + condition. "y" if the menu has no 'visible if' condition.""" + return self.config._eval_expr(self.visible_if_expr) + + def get_items(self, recursive = False): + """Returns a list containing the items (symbols, menus, choice + statements and comments) in in the menu, in the same order that the + items appear within the menu. + + recursive (default: False) -- True if items contained in items within + the menu should be included + recursively (preorder).""" + + if not recursive: + return self.block + + res = [] + for item in self.block: + res.append(item) + if isinstance(item, Menu): + res.extend(item.get_items(True)) + elif isinstance(item, Choice): + res.extend(item.get_items()) + return res + + def get_symbols(self, recursive = False): + """Returns a list containing the symbols in the menu, in the same order + that they appear within the menu. + + recursive (default: False) -- True if symbols contained in items within + the menu should be included + recursively.""" + + return [item for item in self.get_items(recursive) if isinstance(item, Symbol)] + + def get_title(self): + """Returns the title text of the menu.""" + return self.title + + def get_parent(self): + """Returns the menu or choice statement that contains the menu, or + None if the menu is at the top level. Note that if statements are + treated as syntactic sugar and do not have an explicit class + representation.""" + return self.parent + + def get_referenced_symbols(self, refs_from_enclosing = False): + """See Symbol.get_referenced_symbols().""" + return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms + + def get_location(self): + """Returns the location of the menu as a (filename, linenr) tuple, + where filename is a string and linenr an int.""" + return (self.filename, self.linenr) + + def __str__(self): + """Returns a string containing various information about the menu.""" + depends_on_str = self.config._expr_val_str(self.orig_deps, + "(no dependencies)") + visible_if_str = self.config._expr_val_str(self.visible_if_expr, + "(no dependencies)") + + additional_deps_str = " " + self.config._expr_val_str(self.deps_from_containing, + "(no additional dependencies)") + + return _sep_lines("Menu", + "Title : " + self.title, + "'depends on' dependencies : " + depends_on_str, + "'visible if' dependencies : " + visible_if_str, + "Additional dependencies from enclosing menus and if's:", + additional_deps_str, + "Location: {0}:{1}".format(self.filename, self.linenr)) + + # + # Private methods + # + + def __init__(self): + """Menu constructor -- not intended to be called directly by + kconfiglib clients.""" + + self.config = None + + self.parent = None + self.title = None + self.block = None + self.dep_expr = None + + # Dependency expression without dependencies from enclosing menus and + # if's propagated + self.orig_deps = None + + # Dependencies inherited from containing menus and if's + self.deps_from_containing = None + + # The 'visible if' expression + self.visible_if_expr = None + + # The set of symbols referenced by this menu (see + # get_referenced_symbols()) + self.referenced_syms = set() + + # Like 'referenced_syms', but includes symbols from + # dependencies inherited from enclosing menus and if's + self.all_referenced_syms = None + + self.filename = None + self.linenr = None + + def _make_conf(self): + item_conf = _make_block_conf(self.block) + + if self.config._eval_expr(self.dep_expr) != "n" and \ + self.config._eval_expr(self.visible_if_expr) != "n": + return ["\n#\n# {0}\n#".format(self.title)] + item_conf + return item_conf + +class Choice(Item): + + """Represents a choice statement. A choice can be in one of three modes: + + "n" - The choice is not visible and no symbols can be selected. + + "m" - Any number of symbols can be set to "m". The rest will be "n". This + is safe since potentially conflicting options don't actually get + compiled into the kernel simultaneously with "m". + + "y" - One symbol will be "y" while the rest are "n". + + Only tristate choices can be in "m" mode, and the visibility of the choice + is an upper bound on the mode, so that e.g. a choice that depends on a + symbol with value "m" will be in "m" mode. + + The mode changes automatically when a value is assigned to a symbol within + the choice. + + See Symbol.get_visibility() too.""" + + # + # Public interface + # + + def get_selection(self): + """Returns the symbol selected (either by the user or through + defaults), or None if either no symbol is selected or the mode is not + "y".""" + if self.cached_selection is not None: + if self.cached_selection == NO_SELECTION: + return None + return self.cached_selection + + if self.get_mode() != "y": + return self._cache_ret(None) + + # User choice available? + if self.user_val is not None and _get_visibility(self.user_val) == "y": + return self._cache_ret(self.user_val) + + if self.optional: + return self._cache_ret(None) + + return self._cache_ret(self.get_selection_from_defaults()) + + def get_selection_from_defaults(self): + """Like Choice.get_selection(), but acts as if no symbol has been + selected by the user and no 'optional' flag is in effect.""" + + if self.actual_symbols == []: + return None + + for symbol, cond_expr in self.def_exprs: + if self.config._eval_expr(cond_expr) != "n": + chosen_symbol = symbol + break + else: + chosen_symbol = self.actual_symbols[0] + + # Is the chosen symbol visible? + if _get_visibility(chosen_symbol) != "n": + return chosen_symbol + # Otherwise, pick the first visible symbol + for sym in self.actual_symbols: + if _get_visibility(sym) != "n": + return sym + return None + + def get_user_selection(self): + """If the choice is in "y" mode and has a user-selected symbol, returns + that symbol. Otherwise, returns None.""" + return self.user_val + + def get_config(self): + """Returns the Config instance this choice is from.""" + return self.config + + def get_name(self): + """For named choices, returns the name. Returns None for unnamed + choices. No named choices appear anywhere in the kernel Kconfig files + as of Linux 3.7.0-rc8.""" + return self.name + + def get_prompts(self): + """Returns a list of prompts defined for the choice, in the order they + appear in the configuration files. Returns the empty list for choices + with no prompt. + + This list will have a single entry for the vast majority of choices + having prompts, but having multiple prompts for a single choice is + possible through having multiple 'choice' entries for it (though I'm + not sure if that ever happens in practice).""" + return [prompt for prompt, _ in self.orig_prompts] + + def get_help(self): + """Returns the help text of the choice, or None if the choice has no + help text.""" + return self.help + + def get_type(self): + """Returns the type of the choice. See Symbol.get_type().""" + return self.type + + def get_items(self): + """Gets all items contained in the choice in the same order as within + the configuration ("items" instead of "symbols" since choices and + comments might appear within choices. This only happens in one place as + of Linux 3.7.0-rc8, in drivers/usb/gadget/Kconfig).""" + return self.block + + def get_symbols(self): + """Returns a list containing the choice's symbols. + + A quirk (perhaps a bug) of Kconfig is that you can put items within a + choice that will not be considered members of the choice insofar as + selection is concerned. This happens for example if one symbol within a + choice 'depends on' the symbol preceding it, or if you put non-symbol + items within choices. + + As of Linux 3.7.0-rc8, this seems to be used intentionally in one + place: drivers/usb/gadget/Kconfig. + + This function returns the "proper" symbols of the choice in the order + they appear in the choice, excluding such items. If you want all items + in the choice, use get_items().""" + return self.actual_symbols + + def get_parent(self): + """Returns the menu or choice statement that contains the choice, or + None if the choice is at the top level. Note that if statements are + treated as syntactic sugar and do not have an explicit class + representation.""" + return self.parent + + def get_referenced_symbols(self, refs_from_enclosing = False): + """See Symbol.get_referenced_symbols().""" + return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms + + def get_def_locations(self): + """Returns a list of (filename, linenr) tuples, where filename (string) + and linenr (int) represent a location where the choice is defined. For + the vast majority of choices (all of them as of Linux 3.7.0-rc8) this + list will only contain one element, but its possible for named choices + to be defined in multiple locations.""" + return self.def_locations + + def get_visibility(self): + """Returns the visibility of the choice statement: one of "n", "m" or + "y". This acts as an upper limit on the mode of the choice (though bool + choices can only have the mode "y"). See the class documentation for an + explanation of modes.""" + return _get_visibility(self) + + def get_mode(self): + """Returns the mode of the choice. See the class documentation for + an explanation of modes.""" + minimum_mode = "n" if self.optional else "m" + mode = self.user_mode if self.user_mode is not None else minimum_mode + mode = self.config._eval_min(mode, _get_visibility(self)) + + # Promote "m" to "y" for boolean choices + if mode == "m" and self.type == BOOL: + return "y" + + return mode + + def is_optional(self): + """Returns True if the choice has the 'optional' flag set (and so will + default to "n" mode).""" + return self.optional + + def __str__(self): + """Returns a string containing various information about the choice + statement.""" + return self.config._get_sym_or_choice_str(self) + + # + # Private methods + # + + def __init__(self): + """Choice constructor -- not intended to be called directly by + kconfiglib clients.""" + + self.prompts = [] + self.cached_visibility = None + + self.config = None + + self.parent = None + self.name = None # Yes, choices can be named + self.type = UNKNOWN + self.def_exprs = [] + self.help = None + self.optional = False + self.block = None + + # The prompts and default values without any dependencies from + # enclosing menus or if's propagated + + self.orig_prompts = [] + self.orig_def_exprs = [] + + # Dependencies inherited from containing menus and if's + self.deps_from_containing = None + + # We need to filter out symbols that appear within the choice block but + # are not considered choice items (see + # Choice._determine_actual_symbols()) This list holds the "actual" choice + # items. + self.actual_symbols = [] + + # The set of symbols referenced by this choice (see + # get_referenced_symbols()) + self.referenced_syms = set() + + # Like 'referenced_syms', but includes symbols from + # dependencies inherited from enclosing menus and if's + self.all_referenced_syms = set() + + # See Choice.get_def_locations() + self.def_locations = [] + + self.user_val = None + self.user_mode = None + + self.cached_selection = None + + def _determine_actual_symbols(self): + """If a symbol's visibility depends on the preceding symbol within a + choice, it is no longer viewed as a choice item. (This is quite + possibly a bug, but some things consciously use it... ugh. It stems + from automatic submenu creation.) In addition, it's possible to have + choices and comments within choices, and those shouldn't be considered + choice items either. Only drivers/usb/gadget/Kconfig seems to depend on + any of this. This method computes the "actual" items in the choice and + sets the is_choice_symbol_ flag on them (retrieved via + is_choice_symbol()). + + Don't let this scare you: an earlier version simply checked for a + sequence of symbols where all symbols after the first appeared in the + 'depends on' expression of the first, and that worked fine. The added + complexity is to be future-proof in the event that + drivers/usb/gadget/Kconfig turns even more sinister. It might very well + be overkilling things (especially if that file is refactored ;).""" + + # Items might depend on each other in a tree structure, so we need a + # stack to keep track of the current tentative parent + stack = [] + + for item in self.block: + if not isinstance(item, Symbol): + stack = [] + continue + + while stack != []: + if item._has_auto_menu_dep_on(stack[-1]): + # The item should not be viewed as a choice item, so don't + # set item.is_choice_symbol_. + stack.append(item) + break + else: + stack.pop() + else: + item.is_choice_symbol_ = True + self.actual_symbols.append(item) + stack.append(item) + + def _cache_ret(self, selection): + # As None is used to indicate the lack of a cached value we can't use + # that to cache the fact that the choice has no selection. Instead, we + # use the symbolic constant NO_SELECTION. + if selection is None: + self.cached_selection = NO_SELECTION + else: + self.cached_selection = selection + + return selection + + def _invalidate(self): + self.cached_selection = None + self.cached_visibility = None + + def _unset_user_value(self): + self._invalidate() + self.user_val = None + self.user_mode = None + + def _make_conf(self): + return _make_block_conf(self.block) + +class Comment(Item): + + """Represents a comment statement.""" + + # + # Public interface + # + + def get_config(self): + """Returns the Config instance this comment is from.""" + return self.config + + def get_visibility(self): + """Returns the visibility of the comment. See also + Symbol.get_visibility().""" + return self.config._eval_expr(self.dep_expr) + + def get_text(self): + """Returns the text of the comment.""" + return self.text + + def get_parent(self): + """Returns the menu or choice statement that contains the comment, or + None if the comment is at the top level. Note that if statements are + treated as syntactic sugar and do not have an explicit class + representation.""" + return self.parent + + def get_referenced_symbols(self, refs_from_enclosing = False): + """See Symbol.get_referenced_symbols().""" + return self.all_referenced_syms if refs_from_enclosing else self.referenced_syms + + def get_location(self): + """Returns the location of the comment as a (filename, linenr) tuple, + where filename is a string and linenr an int.""" + return (self.filename, self.linenr) + + def __str__(self): + """Returns a string containing various information about the comment.""" + dep_str = self.config._expr_val_str(self.orig_deps, "(no dependencies)") + + additional_deps_str = " " + self.config._expr_val_str(self.deps_from_containing, + "(no additional dependencies)") + + return _sep_lines("Comment", + "Text: " + str(self.text), + "Dependencies: " + dep_str, + "Additional dependencies from enclosing menus and if's:", + additional_deps_str, + "Location: {0}:{1}".format(self.filename, self.linenr)) + + # + # Private methods + # + + def __init__(self): + """Comment constructor -- not intended to be called directly by + kconfiglib clients.""" + + self.config = None + + self.parent = None + self.text = None + self.dep_expr = None + + # Dependency expression without dependencies from enclosing menus and + # if's propagated + self.orig_deps = None + + # Dependencies inherited from containing menus and if's + self.deps_from_containing = None + + # The set of symbols referenced by this comment (see + # get_referenced_symbols()) + self.referenced_syms = set() + + # Like 'referenced_syms', but includes symbols from + # dependencies inherited from enclosing menus and if's + self.all_referenced_syms = None + + self.filename = None + self.linenr = None + + def _make_conf(self): + if self.config._eval_expr(self.dep_expr) != "n": + return ["\n#\n# {0}\n#".format(self.text)] + return [] + +class Kconfig_Syntax_Error(Exception): + """Exception raised for syntax errors.""" + pass + +class Internal_Error(Exception): + """Exception raised for internal errors.""" + pass + +# +# Public functions +# + +def tri_less(v1, v2): + """Returns True if the tristate v1 is less than the tristate v2, where "n", + "m" and "y" are ordered from lowest to highest.""" + return tri_to_int[v1] < tri_to_int[v2] + +def tri_less_eq(v1, v2): + """Returns True if the tristate v1 is less than or equal to the tristate + v2, where "n", "m" and "y" are ordered from lowest to highest.""" + return tri_to_int[v1] <= tri_to_int[v2] + +def tri_greater(v1, v2): + """Returns True if the tristate v1 is greater than the tristate v2, where + "n", "m" and "y" are ordered from lowest to highest.""" + return tri_to_int[v1] > tri_to_int[v2] + +def tri_greater_eq(v1, v2): + """Returns True if the tristate v1 is greater than or equal to the tristate + v2, where "n", "m" and "y" are ordered from lowest to highest.""" + return tri_to_int[v1] >= tri_to_int[v2] + +# +# Internal classes +# + +class _Feed(object): + + """Class for working with sequences in a stream-like fashion; handy for tokens.""" + + def __init__(self, items): + self.items = items + self.length = len(self.items) + self.i = 0 + + def get_next(self): + if self.i >= self.length: + return None + + item = self.items[self.i] + self.i += 1 + return item + + def peek_next(self): + return None if self.i >= self.length else self.items[self.i] + + def check(self, token): + """Check if the next token is 'token'. If so, remove it from the token + feed and return True. Otherwise, leave it in and return False.""" + if self.i < self.length and self.items[self.i] == token: + self.i += 1 + return True + return False + + def go_back(self): + if self.i <= 0: + _internal_error("Attempt to move back in Feed while already at the beginning.") + self.i -= 1 + + def go_to_start(self): + self.i = 0 + + def __len__(self): + return self.length + +class _FileFeed(_Feed): + + """_Feed subclass that feeds lines from a file. Joins any line ending in + \\ with the following line. Keeps track of the filename and current line + number.""" + + def __init__(self, filename): + self.filename = _clean_up_path(filename) + _Feed.__init__(self, _get_lines(filename)) + + def remove_blank(self): + """Removes lines until the first non-blank (not all-space) line.""" + while self.i < self.length and self.items[self.i].isspace(): + self.i += 1 + + def get_filename(self): + return self.filename + + def get_linenr(self): + return self.i + +# +# Internal functions +# + +def _get_visibility(sc): + """Symbols and Choices have a "visibility" that acts as an upper bound on + the values a user can set for them, corresponding to the visibility in e.g. + 'make menuconfig'. This function calculates the visibility for the Symbol + or Choice 'sc' -- the logic is nearly identical.""" + if sc.cached_visibility is None: + vis = "n" + for _, cond_expr in sc.prompts: + vis = sc.config._eval_max(vis, cond_expr) + + if isinstance(sc, Symbol) and sc.is_choice_symbol_: + vis = sc.config._eval_min(vis, _get_visibility(sc.parent)) + + # Promote "m" to "y" if we're dealing with a non-tristate + if vis == "m" and sc.type != TRISTATE: + vis = "y" + + sc.cached_visibility = vis + + return sc.cached_visibility + +def _make_and(e1, e2): + """Constructs an AND (&&) expression. Performs trivial simplification. + Nones equate to 'y'. + + Note: returns None if e1 == e2 == None.""" + if e1 == "n" or e2 == "n": + return "n" + if e1 is None or e1 == "y": + return e2 + if e2 is None or e2 == "y": + return e1 + + # Prefer to merge/update argument list if possible instead of creating + # a new AND node + + if isinstance(e1, tuple) and e1[0] == AND: + if isinstance(e2, tuple) and e2[0] == AND: + return (AND, e1[1] + e2[1]) + return (AND, e1[1] + [e2]) + + if isinstance(e2, tuple) and e2[0] == AND: + return (AND, e2[1] + [e1]) + + return (AND, [e1, e2]) + +def _make_or(e1, e2): + """Constructs an OR (||) expression. Performs trivial simplification and + avoids Nones. Nones equate to 'y', which is usually what we want, but needs + to be kept in mind.""" + + # Perform trivial simplification and avoid None's (which + # correspond to y's) + if e1 is None or e2 is None or e1 == "y" or e2 == "y": + return "y" + if e1 == "n": + return e2 + if e2 == "n": + return e1 + + # Prefer to merge/update argument list if possible instead of creating + # a new OR node + + if isinstance(e1, tuple) and e1[0] == OR: + if isinstance(e2, tuple) and e2[0] == OR: + return (OR, e1[1] + e2[1]) + return (OR, e1[1] + [e2]) + + if isinstance(e2, tuple) and e2[0] == OR: + return (OR, e2[1] + [e1]) + + return (OR, [e1, e2]) + +def _get_expr_syms(expr): + """Returns the set() of symbols appearing in expr.""" + res = set() + if expr is None: + return res + + def rec(expr): + if isinstance(expr, Symbol): + res.add(expr) + return + if isinstance(expr, str): + return + + e0 = expr[0] + if e0 == AND or e0 == OR: + for term in expr[1]: + rec(term) + elif e0 == NOT: + rec(expr[1]) + elif e0 == EQUAL or e0 == UNEQUAL: + _, v1, v2 = expr + if isinstance(v1, Symbol): + res.add(v1) + if isinstance(v2, Symbol): + res.add(v2) + else: + _internal_error("Internal error while fetching symbols from an " + "expression with token stream {0}.".format(expr)) + + rec(expr) + return res + +def _str_val(obj): + """Returns the value of obj as a string. If obj is not a string (constant + symbol), it must be a Symbol.""" + return obj if isinstance(obj, str) else obj.get_value() + +def _make_block_conf(block): + """Returns a list of .config strings for a block (list) of items.""" + + # Collect the substrings in a list and later use join() instead of += to + # build the final .config contents. With older Python versions, this yields + # linear instead of quadratic complexity. + strings = [] + for item in block: + strings.extend(item._make_conf()) + return strings + +def _sym_str_string(sym_or_str): + if isinstance(sym_or_str, str): + return '"' + sym_or_str + '"' + return sym_or_str.name + +def _intersperse(lst, op): + """_expr_to_str() helper. Gets the string representation of each expression in lst + and produces a list where op has been inserted between the elements.""" + if lst == []: + return "" + + res = [] + + def handle_sub_expr(expr): + no_parens = isinstance(expr, (str, Symbol)) or \ + expr[0] in (EQUAL, UNEQUAL) or \ + precedence[op] <= precedence[expr[0]] + if not no_parens: + res.append("(") + res.extend(_expr_to_str_rec(expr)) + if not no_parens: + res.append(")") + + op_str = op_to_str[op] + + handle_sub_expr(lst[0]) + for expr in lst[1:]: + res.append(op_str) + handle_sub_expr(expr) + + return res + +def _expr_to_str_rec(expr): + if expr is None: + return [""] + + if isinstance(expr, (Symbol, str)): + return [_sym_str_string(expr)] + + e0 = expr[0] + + if e0 == AND or e0 == OR: + return _intersperse(expr[1], expr[0]) + + if e0 == NOT: + need_parens = not isinstance(expr[1], (str, Symbol)) + + res = ["!"] + if need_parens: + res.append("(") + res.extend(_expr_to_str_rec(expr[1])) + if need_parens: + res.append(")") + return res + + if e0 == EQUAL or e0 == UNEQUAL: + return [_sym_str_string(expr[1]), + op_to_str[expr[0]], + _sym_str_string(expr[2])] + +def _expr_to_str(expr): + return "".join(_expr_to_str_rec(expr)) + +def _indentation(line): + """Returns the length of the line's leading whitespace, treating tab stops + as being spaced 8 characters apart.""" + line = line.expandtabs() + return len(line) - len(line.lstrip()) + +def _deindent(line, indent): + """Deindent 'line' by 'indent' spaces.""" + line = line.expandtabs() + if len(line) <= indent: + return line + return line[indent:] + +def _is_base_n(s, n): + try: + int(s, n) + return True + except ValueError: + return False + +def _sep_lines(*args): + """Returns a string comprised of all arguments, with newlines inserted + between them.""" + return "\n".join(args) + +def _comment(s): + """Returns a new string with "#" inserted before each line in 's'.""" + if not s: + return "#" + res = "".join(["#" + line for line in s.splitlines(True)]) + if s.endswith("\n"): + return res + "#" + return res + +def _get_lines(filename): + """Returns a list of lines from 'filename', joining any line ending in \\ + with the following line.""" + with open(filename, "r") as f: + lines = [] + accum = "" + for line in f: + if line.endswith("\\\n"): + accum += line[:-2] + else: + lines.append(accum + line) + accum = "" + return lines + +def _clean_up_path(path): + """Strips an initial "./" and any trailing slashes from 'path'.""" + if path.startswith("./"): + path = path[2:] + return path.rstrip("/") + +def _stderr_msg(msg, filename, linenr): + if filename is not None: + sys.stderr.write("{0}:{1}: ".format(_clean_up_path(filename), linenr)) + sys.stderr.write(msg + "\n") + +def _tokenization_error(s, filename, linenr): + loc = "" if filename is None else "{0}:{1}: ".format(filename, linenr) + raise Kconfig_Syntax_Error("{0}Couldn't tokenize '{1}'" + .format(loc, s.strip())) + +def _parse_error(s, msg, filename, linenr): + loc = "" if filename is None else "{0}:{1}: ".format(filename, linenr) + raise Kconfig_Syntax_Error("{0}Couldn't parse '{1}'{2}" + .format(loc, s.strip(), + "." if msg is None else ": " + msg)) + +def _internal_error(msg): + raise Internal_Error(msg + + "\nSorry! You may want to send an email to ulfalizer a.t Google's " \ + "email service to tell me about this. Include the message above " \ + "and the stack trace and describe what you were doing.") + +# +# Internal global constants +# + +# Tokens +(T_AND, T_OR, T_NOT, + T_OPEN_PAREN, T_CLOSE_PAREN, + T_EQUAL, T_UNEQUAL, + T_MAINMENU, T_MENU, T_ENDMENU, + T_SOURCE, T_CHOICE, T_ENDCHOICE, + T_COMMENT, T_CONFIG, T_MENUCONFIG, + T_HELP, T_IF, T_ENDIF, T_DEPENDS, T_ON, + T_OPTIONAL, T_PROMPT, T_DEFAULT, + T_BOOL, T_TRISTATE, T_HEX, T_INT, T_STRING, + T_DEF_BOOL, T_DEF_TRISTATE, + T_SELECT, T_RANGE, T_OPTION, T_ALLNOCONFIG_Y, T_ENV, + T_DEFCONFIG_LIST, T_MODULES, T_VISIBLE) = range(39) + +# The leading underscore before the function assignments below prevent pydoc +# from listing them. The constants could be hidden too, but they're fairly +# obviously internal anyway, so don't bother spamming the code. + +# Keyword to token map. Note that the get() method is assigned directly as a +# small optimization. +_get_keyword = { "mainmenu" : T_MAINMENU, + "menu" : T_MENU, + "endmenu" : T_ENDMENU, + "endif" : T_ENDIF, + "endchoice" : T_ENDCHOICE, + "source" : T_SOURCE, + "choice" : T_CHOICE, + "config" : T_CONFIG, + "comment" : T_COMMENT, + "menuconfig" : T_MENUCONFIG, + "help" : T_HELP, + "if" : T_IF, + "depends" : T_DEPENDS, + "on" : T_ON, + "optional" : T_OPTIONAL, + "prompt" : T_PROMPT, + "default" : T_DEFAULT, + "bool" : T_BOOL, + "boolean" : T_BOOL, + "tristate" : T_TRISTATE, + "int" : T_INT, + "hex" : T_HEX, + "def_bool" : T_DEF_BOOL, + "def_tristate" : T_DEF_TRISTATE, + "string" : T_STRING, + "select" : T_SELECT, + "range" : T_RANGE, + "option" : T_OPTION, + "allnoconfig_y" : T_ALLNOCONFIG_Y, + "env" : T_ENV, + "defconfig_list" : T_DEFCONFIG_LIST, + "modules" : T_MODULES, + "visible" : T_VISIBLE }.get + +# Strings to use for True and False +bool_str = { False : "false", True : "true" } + +# Tokens after which identifier-like lexemes are treated as strings. T_CHOICE +# is included to avoid symbols being registered for named choices. +string_lex = frozenset((T_BOOL, T_TRISTATE, T_INT, T_HEX, T_STRING, T_CHOICE, + T_PROMPT, T_MENU, T_COMMENT, T_SOURCE, T_MAINMENU)) + +# Matches the initial token on a line; see _tokenize(). +_initial_token_re_match = re.compile(r"[^\w]*(\w+)").match + +# Matches an identifier/keyword optionally preceded by whitespace +_id_keyword_re_match = re.compile(r"\s*([\w./-]+)").match + +# Regular expressions for parsing .config files +_set_re_match = re.compile(r"CONFIG_(\w+)=(.*)").match +_unset_re_match = re.compile(r"# CONFIG_(\w+) is not set").match + +# Regular expression for finding $-references to symbols in strings +_sym_ref_re_search = re.compile(r"\$[A-Za-z0-9_]+").search + +# Integers representing symbol types +UNKNOWN, BOOL, TRISTATE, STRING, HEX, INT = range(6) + +# Strings to use for types +typename = { UNKNOWN : "unknown", BOOL : "bool", TRISTATE : "tristate", + STRING : "string", HEX : "hex", INT : "int" } + +# Token to type mapping +token_to_type = { T_BOOL : BOOL, T_TRISTATE : TRISTATE, T_STRING : STRING, + T_INT : INT, T_HEX : HEX } + +# Default values for symbols of different types (the value the symbol gets if +# it is not assigned a user value and none of its 'default' clauses kick in) +default_value = { BOOL : "n", TRISTATE : "n", STRING : "", INT : "", HEX : "" } + +# Indicates that no item is selected in a choice statement +NO_SELECTION = 0 + +# Integers representing expression types +AND, OR, NOT, EQUAL, UNEQUAL = range(5) + +# Map from tristate values to integers +tri_to_int = { "n" : 0, "m" : 1, "y" : 2 } + +# Printing-related stuff + +op_to_str = { AND : " && ", OR : " || ", EQUAL : " = ", UNEQUAL : " != " } +precedence = { OR : 0, AND : 1, NOT : 2 } diff --git a/support/scripts/mkmakefile b/support/scripts/mkmakefile new file mode 100755 index 0000000000..37162a3173 --- /dev/null +++ b/support/scripts/mkmakefile @@ -0,0 +1,45 @@ +#!/bin/sh +# Generates a small Makefile used in the root of the output +# directory, to allow make to be started from there. +# The Makefile also allow for more convenient build of external modules + +# Usage +# $1 - Kernel src directory +# $2 - Output directory + + +test ! -r $2/Makefile -o -O $2/Makefile || exit 0 +# Only overwrite automatically generated Makefiles +# (so we do not overwrite buildroot Makefile) +if test -e $2/Makefile && ! grep -q Automatically $2/Makefile +then + exit 0 +fi +echo " GEN $2/Makefile" + +cat << EOF > $2/Makefile +# Automatically generated by $0: don't edit + +lastword = \$(word \$(words \$(1)),\$(1)) +makedir := \$(dir \$(call lastword,\$(MAKEFILE_LIST))) + +MAKEARGS := -C $1 +MAKEARGS += O=\$(if \$(patsubst /%,,\$(makedir)),\$(CURDIR)/)\$(patsubst %/,%,\$(makedir)) + +MAKEFLAGS += --no-print-directory + +.PHONY: _all \$(MAKECMDGOALS) + +all := \$(filter-out Makefile,\$(MAKECMDGOALS)) + +_all: + umask 0022 && \$(MAKE) \$(MAKEARGS) \$(all) + +Makefile:; + +\$(all): _all + @: + +%/: _all + @: +EOF diff --git a/support/scripts/mkusers b/support/scripts/mkusers new file mode 100755 index 0000000000..e2c24c7237 --- /dev/null +++ b/support/scripts/mkusers @@ -0,0 +1,433 @@ +#!/usr/bin/env bash +set -e +myname="${0##*/}" + +#---------------------------------------------------------------------------- +# Configurable items +MIN_UID=1000 +MAX_UID=1999 +MIN_GID=1000 +MAX_GID=1999 +# No more is configurable below this point +#---------------------------------------------------------------------------- + +#---------------------------------------------------------------------------- +error() { + local fmt="${1}" + shift + + printf "%s: " "${myname}" >&2 + printf "${fmt}" "${@}" >&2 +} +fail() { + error "$@" + exit 1 +} + +#---------------------------------------------------------------------------- +if [ ${#} -ne 2 ]; then + fail "usage: %s USERS_TABLE TARGET_DIR\n" +fi +USERS_TABLE="${1}" +TARGET_DIR="${2}" +shift 2 +PASSWD="${TARGET_DIR}/etc/passwd" +SHADOW="${TARGET_DIR}/etc/shadow" +GROUP="${TARGET_DIR}/etc/group" +# /etc/gshadow is not part of the standard skeleton, so not everybody +# will have it, but some may hav it, and its content must be in sync +# with /etc/group, so any use of gshadow must be conditional. +GSHADOW="${TARGET_DIR}/etc/gshadow" + +# We can't simply source ${BR2_CONFIG} as it may contains constructs +# such as: +# BR2_DEFCONFIG="$(CONFIG_DIR)/defconfig" +# which when sourced from a shell script will eventually try to execute +# a command name 'CONFIG_DIR', which is plain wrong for virtually every +# systems out there. +# So, we have to scan that file instead. Sigh... :-( +PASSWD_METHOD="$( sed -r -e '/^BR2_TARGET_GENERIC_PASSWD_METHOD="(.*)"$/!d;' \ + -e 's//\1/;' \ + "${BR2_CONFIG}" \ + )" + +#---------------------------------------------------------------------------- +get_uid() { + local username="${1}" + + awk -F: -v username="${username}" \ + '$1 == username { printf( "%d\n", $3 ); }' "${PASSWD}" +} + +#---------------------------------------------------------------------------- +get_ugid() { + local username="${1}" + + awk -F: -v username="${username}" \ + '$1 == username { printf( "%d\n", $4 ); }' "${PASSWD}" +} + +#---------------------------------------------------------------------------- +get_gid() { + local group="${1}" + + awk -F: -v group="${group}" \ + '$1 == group { printf( "%d\n", $3 ); }' "${GROUP}" +} + +#---------------------------------------------------------------------------- +get_username() { + local uid="${1}" + + awk -F: -v uid="${uid}" \ + '$3 == uid { printf( "%s\n", $1 ); }' "${PASSWD}" +} + +#---------------------------------------------------------------------------- +get_group() { + local gid="${1}" + + awk -F: -v gid="${gid}" \ + '$3 == gid { printf( "%s\n", $1 ); }' "${GROUP}" +} + +#---------------------------------------------------------------------------- +get_ugroup() { + local username="${1}" + local ugid + + ugid="$( get_ugid "${username}" )" + if [ -n "${ugid}" ]; then + get_group "${ugid}" + fi +} + +#---------------------------------------------------------------------------- +# Sanity-check the new user/group: +# - check the gid is not already used for another group +# - check the group does not already exist with another gid +# - check the user does not already exist with another gid +# - check the uid is not already used for another user +# - check the user does not already exist with another uid +# - check the user does not already exist in another group +check_user_validity() { + local username="${1}" + local uid="${2}" + local group="${3}" + local gid="${4}" + local _uid _ugid _gid _username _group _ugroup + + _group="$( get_group "${gid}" )" + _gid="$( get_gid "${group}" )" + _ugid="$( get_ugid "${username}" )" + _username="$( get_username "${uid}" )" + _uid="$( get_uid "${username}" )" + _ugroup="$( get_ugroup "${username}" )" + + if [ "${username}" = "root" ]; then + fail "invalid username '%s\n'" "${username}" + fi + + if [ ${gid} -lt -1 -o ${gid} -eq 0 ]; then + fail "invalid gid '%d' for '%s'\n" ${gid} "${username}" + elif [ ${gid} -ne -1 ]; then + # check the gid is not already used for another group + if [ -n "${_group}" -a "${_group}" != "${group}" ]; then + fail "gid '%d' for '%s' is already used by group '%s'\n" \ + ${gid} "${username}" "${_group}" + fi + + # check the group does not already exists with another gid + # Need to split the check in two, otherwise '[' complains it + # is missing arguments when _gid is empty + if [ -n "${_gid}" ] && [ ${_gid} -ne ${gid} ]; then + fail "group '%s' for '%s' already exists with gid '%d' (wants '%d')\n" \ + "${group}" "${username}" ${_gid} ${gid} + fi + + # check the user does not already exists with another gid + # Need to split the check in two, otherwise '[' complains it + # is missing arguments when _ugid is empty + if [ -n "${_ugid}" ] && [ ${_ugid} -ne ${gid} ]; then + fail "user '%s' already exists with gid '%d' (wants '%d')\n" \ + "${username}" ${_ugid} ${gid} + fi + fi + + if [ ${uid} -lt -1 -o ${uid} -eq 0 ]; then + fail "invalid uid '%d' for '%s'\n" ${uid} "${username}" + elif [ ${uid} -ne -1 ]; then + # check the uid is not already used for another user + if [ -n "${_username}" -a "${_username}" != "${username}" ]; then + fail "uid '%d' for '%s' already used by user '%s'\n" \ + ${uid} "${username}" "${_username}" + fi + + # check the user does not already exists with another uid + # Need to split the check in two, otherwise '[' complains it + # is missing arguments when _uid is empty + if [ -n "${_uid}" ] && [ ${_uid} -ne ${uid} ]; then + fail "user '%s' already exists with uid '%d' (wants '%d')\n" \ + "${username}" ${_uid} ${uid} + fi + fi + + # check the user does not already exist in another group + if [ -n "${_ugroup}" -a "${_ugroup}" != "${group}" ]; then + fail "user '%s' already exists with group '%s' (wants '%s')\n" \ + "${username}" "${_ugroup}" "${group}" + fi + + return 0 +} + +#---------------------------------------------------------------------------- +# Generate a unique GID for given group. If the group already exists, +# then simply report its current GID. Otherwise, generate the lowest GID +# that is: +# - not 0 +# - comprised in [MIN_GID..MAX_GID] +# - not already used by a group +generate_gid() { + local group="${1}" + local gid + + gid="$( get_gid "${group}" )" + if [ -z "${gid}" ]; then + for(( gid=MIN_GID; gid<=MAX_GID; gid++ )); do + if [ -z "$( get_group "${gid}" )" ]; then + break + fi + done + if [ ${gid} -gt ${MAX_GID} ]; then + fail "can not allocate a GID for group '%s'\n" "${group}" + fi + fi + printf "%d\n" "${gid}" +} + +#---------------------------------------------------------------------------- +# Add a group; if it does already exist, remove it first +add_one_group() { + local group="${1}" + local gid="${2}" + local _f + + # Generate a new GID if needed + if [ ${gid} -eq -1 ]; then + gid="$( generate_gid "${group}" )" + fi + + # Remove any previous instance of this group, and re-add the new one + sed -i -e '/^'"${group}"':.*/d;' "${GROUP}" + printf "%s:x:%d:\n" "${group}" "${gid}" >>"${GROUP}" + + # Ditto for /etc/gshadow if it exists + if [ -f "${GSHADOW}" ]; then + sed -i -e '/^'"${group}"':.*/d;' "${GSHADOW}" + printf "%s:*::\n" "${group}" >>"${GSHADOW}" + fi +} + +#---------------------------------------------------------------------------- +# Generate a unique UID for given username. If the username already exists, +# then simply report its current UID. Otherwise, generate the lowest UID +# that is: +# - not 0 +# - comprised in [MIN_UID..MAX_UID] +# - not already used by a user +generate_uid() { + local username="${1}" + local uid + + uid="$( get_uid "${username}" )" + if [ -z "${uid}" ]; then + for(( uid=MIN_UID; uid<=MAX_UID; uid++ )); do + if [ -z "$( get_username "${uid}" )" ]; then + break + fi + done + if [ ${uid} -gt ${MAX_UID} ]; then + fail "can not allocate a UID for user '%s'\n" "${username}" + fi + fi + printf "%d\n" "${uid}" +} + +#---------------------------------------------------------------------------- +# Add given user to given group, if not already the case +add_user_to_group() { + local username="${1}" + local group="${2}" + local _f + + for _f in "${GROUP}" "${GSHADOW}"; do + [ -f "${_f}" ] || continue + sed -r -i -e 's/^('"${group}"':.*:)(([^:]+,)?)'"${username}"'(,[^:]+*)?$/\1\2\4/;' \ + -e 's/^('"${group}"':.*)$/\1,'"${username}"'/;' \ + -e 's/,+/,/' \ + -e 's/:,/:/' \ + "${_f}" + done +} + +#---------------------------------------------------------------------------- +# Encode a password +encode_password() { + local passwd="${1}" + + mkpasswd -m "${PASSWD_METHOD}" "${passwd}" +} + +#---------------------------------------------------------------------------- +# Add a user; if it does already exist, remove it first +add_one_user() { + local username="${1}" + local uid="${2}" + local group="${3}" + local gid="${4}" + local passwd="${5}" + local home="${6}" + local shell="${7}" + local groups="${8}" + local comment="${9}" + local _f _group _home _shell _gid _passwd + + # First, sanity-check the user + check_user_validity "${username}" "${uid}" "${group}" "${gid}" + + # Generate a new UID if needed + if [ ${uid} -eq -1 ]; then + uid="$( generate_uid "${username}" )" + fi + + # Remove any previous instance of this user + for _f in "${PASSWD}" "${SHADOW}"; do + sed -r -i -e '/^'"${username}"':.*/d;' "${_f}" + done + + _gid="$( get_gid "${group}" )" + _shell="${shell}" + if [ "${shell}" = "-" ]; then + _shell="/bin/false" + fi + case "${home}" in + -) _home="/";; + /) fail "home can not explicitly be '/'\n";; + /*) _home="${home}";; + *) fail "home must be an absolute path\n";; + esac + case "${passwd}" in + -) + _passwd="" + ;; + !=*) + _passwd='!'"$( encode_password "${passwd#!=}" )" + ;; + =*) + _passwd="$( encode_password "${passwd#=}" )" + ;; + *) + _passwd="${passwd}" + ;; + esac + + printf "%s:x:%d:%d:%s:%s:%s\n" \ + "${username}" "${uid}" "${_gid}" \ + "${comment}" "${_home}" "${_shell}" \ + >>"${PASSWD}" + printf "%s:%s:::::::\n" \ + "${username}" "${_passwd}" \ + >>"${SHADOW}" + + # Add the user to its additional groups + if [ "${groups}" != "-" ]; then + for _group in ${groups//,/ }; do + add_user_to_group "${username}" "${_group}" + done + fi + + # If the user has a home, chown it + # (Note: stdout goes to the fakeroot-script) + if [ "${home}" != "-" ]; then + mkdir -p "${TARGET_DIR}/${home}" + printf "chown -h -R %d:%d '%s'\n" "${uid}" "${_gid}" "${TARGET_DIR}/${home}" + fi +} + +#---------------------------------------------------------------------------- +main() { + local username uid group gid passwd home shell groups comment + local line + local -a LINES + + # Some sanity checks + if [ ${MIN_UID} -le 0 ]; then + fail "MIN_UID must be >0 (currently %d)\n" ${MIN_UID} + fi + if [ ${MIN_GID} -le 0 ]; then + fail "MIN_GID must be >0 (currently %d)\n" ${MIN_GID} + fi + + # Read in all the file in memory, exclude empty lines and comments + while read line; do + LINES+=( "${line}" ) + done < <( sed -r -e 's/#.*//; /^[[:space:]]*$/d;' "${USERS_TABLE}" ) + + # We first create groups whose gid is not -1, and then we create groups + # whose gid is -1 (automatic), so that, if a group is defined both with + # a specified gid and an automatic gid, we ensure the specified gid is + # used, rather than a different automatic gid is computed. + + # First, create all the main groups which gid is *not* automatic + for line in "${LINES[@]}"; do + read username uid group gid passwd home shell groups comment <<<"${line}" + [ ${gid} -ge 0 ] || continue # Automatic gid + add_one_group "${group}" "${gid}" + done + + # Then, create all the main groups which gid *is* automatic + for line in "${LINES[@]}"; do + read username uid group gid passwd home shell groups comment <<<"${line}" + [ ${gid} -eq -1 ] || continue # Non-automatic gid + add_one_group "${group}" "${gid}" + done + + # Then, create all the additional groups + # If any additional group is already a main group, we should use + # the gid of that main group; otherwise, we can use any gid + for line in "${LINES[@]}"; do + read username uid group gid passwd home shell groups comment <<<"${line}" + if [ "${groups}" != "-" ]; then + for g in ${groups//,/ }; do + add_one_group "${g}" -1 + done + fi + done + + # When adding users, we do as for groups, in case two packages create + # the same user, one with an automatic uid, the other with a specified + # uid, to ensure the specified uid is used, rather than an incompatible + # uid be generated. + + # Now, add users whose uid is *not* automatic + for line in "${LINES[@]}"; do + read username uid group gid passwd home shell groups comment <<<"${line}" + [ "${username}" != "-" ] || continue # Magic string to skip user creation + [ ${uid} -ge 0 ] || continue # Automatic uid + add_one_user "${username}" "${uid}" "${group}" "${gid}" "${passwd}" \ + "${home}" "${shell}" "${groups}" "${comment}" + done + + # Finally, add users whose uid *is* automatic + for line in "${LINES[@]}"; do + read username uid group gid passwd home shell groups comment <<<"${line}" + [ "${username}" != "-" ] || continue # Magic string to skip user creation + [ ${uid} -eq -1 ] || continue # Non-automatic uid + add_one_user "${username}" "${uid}" "${group}" "${gid}" "${passwd}" \ + "${home}" "${shell}" "${groups}" "${comment}" + done +} + +#---------------------------------------------------------------------------- +main "${@}" diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats new file mode 100755 index 0000000000..fad7ae9c74 --- /dev/null +++ b/support/scripts/pkg-stats @@ -0,0 +1,410 @@ +#!/usr/bin/env bash + +# Copyright (C) 2009 by Thomas Petazzoni +# +# 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 + +# This script generates an HTML file that contains a report about all +# Buildroot packages, their usage of the different package +# infrastructure and possible cleanup actions +# +# Run the script from the Buildroot toplevel directory: +# +# ./support/scripts/pkg-stats > /tmp/pkg.html +# + +echo " + +Statistics of Buildroot packages + + +Results
+ + + + + + + + + + + +" + +autotools_packages=0 +cmake_packages=0 +kconfig_packages=0 +luarocks_package=0 +perl_packages=0 +python_packages=0 +rebar_packages=0 +virtual_packages=0 +generic_packages=0 +manual_packages=0 +packages_with_licence=0 +packages_without_licence=0 +packages_with_license_files=0 +packages_without_license_files=0 +packages_with_hash_file=0 +packages_without_hash_file=0 +total_patch_count=0 +cnt=0 + +for i in $(find boot/ linux/ package/ -name '*.mk' | sort) ; do + + if test \ + $i = "boot/common.mk" -o \ + $i = "linux/linux-ext-fbtft.mk" -o \ + $i = "linux/linux-ext-xenomai.mk" -o \ + $i = "linux/linux-ext-rtai.mk" -o \ + $i = "package/efl/efl.mk" -o \ + $i = "package/freescale-imx/freescale-imx.mk" -o \ + $i = "package/gcc/gcc.mk" -o \ + $i = "package/gstreamer/gstreamer.mk" -o \ + $i = "package/gstreamer1/gstreamer1.mk" -o \ + $i = "package/gtk2-themes/gtk2-themes.mk" -o \ + $i = "package/matchbox/matchbox.mk" -o \ + $i = "package/opengl/opengl.mk" -o \ + $i = "package/qt5/qt5.mk" -o \ + $i = "package/x11r7/x11r7.mk" -o \ + $i = "package/doc-asciidoc.mk" -o \ + $i = "package/pkg-autotools.mk" -o \ + $i = "package/pkg-cmake.mk" -o \ + $i = "package/pkg-kconfig.mk" -o \ + $i = "package/pkg-luarocks.mk" -o \ + $i = "package/pkg-perl.mk" -o \ + $i = "package/pkg-python.mk" -o \ + $i = "package/pkg-rebar.mk" -o \ + $i = "package/pkg-virtual.mk" -o \ + $i = "package/pkg-download.mk" -o \ + $i = "package/pkg-generic.mk" -o \ + $i = "package/pkg-utils.mk" ; then + echo "skipping $i" 1>&2 + continue + fi + + cnt=$((cnt+1)) + + hashost=0 + hastarget=0 + infratype="" + + # Determine package infrastructure + if grep -E "\(host-autotools-package\)" $i > /dev/null ; then + infratype="autotools" + hashost=1 + fi + + if grep -E "\(autotools-package\)" $i > /dev/null ; then + infratype="autotools" + hastarget=1 + fi + + if grep -E "\(kconfig-package\)" $i > /dev/null ; then + infratype="kconfig" + hastarget=1 + fi + + if grep -E "\(host-luarocks-package\)" $i > /dev/null ; then + infratype="luarocks" + hashost=1 + fi + + if grep -E "\(luarocks-package\)" $i > /dev/null ; then + infratype="luarocks" + hastarget=1 + fi + + if grep -E "\(host-perl-package\)" $i > /dev/null ; then + infratype="perl" + hashost=1 + fi + + if grep -E "\(perl-package\)" $i > /dev/null ; then + infratype="perl" + hastarget=1 + fi + + if grep -E "\(host-python-package\)" $i > /dev/null ; then + infratype="python" + hashost=1 + fi + + if grep -E "\(python-package\)" $i > /dev/null ; then + infratype="python" + hastarget=1 + fi + + if grep -E "\(host-rebar-package\)" $i > /dev/null ; then + infratype="rebar" + hashost=1 + fi + + if grep -E "\(rebar-package\)" $i > /dev/null ; then + infratype="rebar" + hastarget=1 + fi + + if grep -E "\(host-virtual-package\)" $i > /dev/null ; then + infratype="virtual" + hashost=1 + fi + + if grep -E "\(virtual-package\)" $i > /dev/null ; then + infratype="virtual" + hastarget=1 + fi + + if grep -E "\(host-generic-package\)" $i > /dev/null ; then + infratype="generic" + hashost=1 + fi + + if grep -E "\(generic-package\)" $i > /dev/null ; then + infratype="generic" + hastarget=1 + fi + + if grep -E "\(host-cmake-package\)" $i > /dev/null ; then + infratype="cmake" + hashost=1 + fi + + if grep -E "\(cmake-package\)" $i > /dev/null ; then + infratype="cmake" + hastarget=1 + fi + + pkg=$(basename $i) + dir=$(dirname $i) + pkg=${pkg%.mk} + pkgvariable=$(echo ${pkg} | tr "a-z-" "A-Z_") + + + # Count packages per infrastructure + if [ -z ${infratype} ] ; then + infratype="manual" + manual_packages=$(($manual_packages+1)) + elif [ ${infratype} = "autotools" ]; then + autotools_packages=$(($autotools_packages+1)) + elif [ ${infratype} = "cmake" ]; then + cmake_packages=$(($cmake_packages+1)) + elif [ ${infratype} = "kconfig" ]; then + kconfig_packages=$(($kconfig_packages+1)) + elif [ ${infratype} = "luarocks" ]; then + luarocks_packages=$(($luarocks_packages+1)) + elif [ ${infratype} = "perl" ]; then + perl_packages=$(($perl_packages+1)) + elif [ ${infratype} = "python" ]; then + python_packages=$(($python_packages+1)) + elif [ ${infratype} = "rebar" ]; then + rebar_packages=$(($rebar_packages+1)) + elif [ ${infratype} = "virtual" ]; then + virtual_packages=$(($virtual_packages+1)) + elif [ ${infratype} = "generic" ]; then + generic_packages=$(($generic_packages+1)) + fi + + if grep -qE "^${pkgvariable}_LICENSE[ ]*=" $i ; then + packages_with_license=$(($packages_with_license+1)) + license=1 + else + packages_without_license=$(($packages_without_license+1)) + license=0 + fi + + if grep -qE "^${pkgvariable}_LICENSE_FILES[ ]*=" $i ; then + packages_with_license_files=$(($packages_with_license_files+1)) + license_files=1 + else + packages_without_license_files=$(($packages_without_license_files+1)) + license_files=0 + fi + + if test -f ${dir}/${pkg}.hash; then + packages_with_hash_file=$(($packages_with_hash_file+1)) + hash_file=1 + else + packages_without_hash_file=$(($packages_without_hash_file+1)) + hash_file=0 + fi + + echo "" + + echo "" + echo "" + + package_dir=$(dirname $i) + patch_count=$(find ${package_dir} -name '*.patch' | wc -l) + total_patch_count=$(($total_patch_count+$patch_count)) + + if test $patch_count -lt 1 ; then + patch_count_class="nopatches" + elif test $patch_count -lt 5 ; then + patch_count_class="somepatches" + else + patch_count_class="lotsofpatches" + fi + + echo "" + + if [ ${infratype} = "manual" ] ; then + echo "" + else + echo "" + fi + + if [ ${license} -eq 0 ] ; then + echo "" + else + echo "" + fi + + if [ ${license_files} -eq 0 ] ; then + echo "" + else + echo "" + fi + + if [ ${hash_file} -eq 0 ] ; then + echo "" + else + echo "" + fi + + echo "" + +done +echo "
IdPackagePatch countInfrastructureLicenseLicense filesHash file
$cnt$i" + echo "$patch_count" + echo "manual" + echo "${infratype}
" + if [ ${hashost} -eq 1 -a ${hastarget} -eq 1 ]; then + echo "target + host" + elif [ ${hashost} -eq 1 ]; then + echo "host" + else + echo "target" + fi + echo "
NoYesNoYesNoYes
" + +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "" +echo "
Packages using the generic infrastructure$generic_packages
Packages using the cmake infrastructure$cmake_packages
Packages using the autotools infrastructure$autotools_packages
Packages using the luarocks infrastructure$luarocks_packages
Packages using the kconfig infrastructure$kconfig_packages
Packages using the perl infrastructure$perl_packages
Packages using the python infrastructure$python_packages
Packages using the rebar infrastructure$rebar_packages
Packages using the virtual infrastructure$virtual_packages
Packages not using any infrastructure$manual_packages
Packages having license information$packages_with_license
Packages not having licence information$packages_without_license
Packages having license files information$packages_with_license_files
Packages not having licence files information$packages_without_license_files
Packages having hash file$packages_with_hash_file
Packages not having hash file$packages_without_hash_file
Number of patches in all packages$total_patch_count
TOTAL$cnt
" + +echo "
" +echo "Updated on $(LANG=C date), Git commit $(git log master -n 1 --pretty=format:%H)" +echo "" +echo "" diff --git a/support/scripts/readme.kconfiglib b/support/scripts/readme.kconfiglib new file mode 100644 index 0000000000..4b653b8446 --- /dev/null +++ b/support/scripts/readme.kconfiglib @@ -0,0 +1,30 @@ +Readme +====== + +Kconfiglib +---------- + +This python module, developped by Ulf Magnusson and released under the ISC +license, is fetched from: + +https://github.com/ulfalizer/Kconfiglib +commit: a95f477eafc0b6708c3ce671fce7302ecec4f789 + +Kconfiglib license +~~~~~~~~~~~~~~~~~~ + +License (ISC) + +Copyright (c) 2011-2013, Ulf Magnusson + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/support/scripts/scancpan b/support/scripts/scancpan new file mode 100755 index 0000000000..0436d2a4b9 --- /dev/null +++ b/support/scripts/scancpan @@ -0,0 +1,833 @@ +#!/usr/bin/env perl + +# This chunk of stuff was generated by App::FatPacker. To find the original +# file's code, look for the end of this BEGIN block or the string 'FATPACK' +BEGIN { +my %fatpacked; + +$fatpacked{"MetaCPAN/API/Tiny.pm"} = <<'METACPAN_API_TINY'; + package MetaCPAN::API::Tiny; + { + $MetaCPAN::API::Tiny::VERSION = '1.131730'; + } + use strict; + use warnings; + # ABSTRACT: A Tiny API client for MetaCPAN + + use Carp; + use JSON::PP 'encode_json', 'decode_json'; + use HTTP::Tiny; + + + sub new { + my ($class, @args) = @_; + + $#_ % 2 == 0 + or croak 'Arguments must be provided as name/value pairs'; + + my %params = @args; + + die 'ua_args must be an array reference' + if $params{ua_args} && ref($params{ua_args}) ne 'ARRAY'; + + my $self = +{ + base_url => $params{base_url} || 'http://api.metacpan.org/v0', + ua => $params{ua} || HTTP::Tiny->new( + $params{ua_args} + ? @{$params{ua_args}} + : (agent => 'MetaCPAN::API::Tiny/' + . ($MetaCPAN::API::VERSION || 'xx'))), + }; + + return bless($self, $class); + } + + sub _build_extra_params { + my $self = shift; + + @_ % 2 == 0 + or croak 'Incorrect number of params, must be key/value'; + + my %extra = @_; + my $ua = $self->{ua}; + + foreach my $key (keys %extra) + { + # The implementation in HTTP::Tiny uses + instead of %20, fix that + $extra{$key} = $ua->_uri_escape($extra{$key}); + $extra{$key} =~ s/\+/%20/g; + } + + my $params = join '&', map { "$_=" . $extra{$_} } sort keys %extra; + + return $params; + } + + + # /source/{author}/{release}/{path} + sub source { + my $self = shift; + my %opts = @_ ? @_ : (); + my $url = ''; + my $error = "Provide 'author' and 'release' and 'path'"; + + %opts or croak $error; + + if ( + defined ( my $author = $opts{'author'} ) && + defined ( my $release = $opts{'release'} ) && + defined ( my $path = $opts{'path'} ) + ) { + $url = "source/$author/$release/$path"; + } else { + croak $error; + } + + $url = $self->{base_url} . "/$url"; + + my $result = $self->{ua}->get($url); + $result->{'success'} + or croak "Failed to fetch '$url': " . $result->{'reason'}; + + return $result->{'content'}; + } + + + # /release/{distribution} + # /release/{author}/{release} + sub release { + my $self = shift; + my %opts = @_ ? @_ : (); + my $url = ''; + my $error = "Either provide 'distribution', or 'author' and 'release', " . + "or 'search'"; + + %opts or croak $error; + + my %extra_opts = (); + + if ( defined ( my $dist = $opts{'distribution'} ) ) { + $url = "release/$dist"; + } elsif ( + defined ( my $author = $opts{'author'} ) && + defined ( my $release = $opts{'release'} ) + ) { + $url = "release/$author/$release"; + } elsif ( defined ( my $search_opts = $opts{'search'} ) ) { + ref $search_opts && ref $search_opts eq 'HASH' + or croak $error; + + %extra_opts = %{$search_opts}; + $url = 'release/_search'; + } else { + croak $error; + } + + return $self->fetch( $url, %extra_opts ); + } + + + # /pod/{module} + # /pod/{author}/{release}/{path} + sub pod { + my $self = shift; + my %opts = @_ ? @_ : (); + my $url = ''; + my $error = "Either provide 'module' or 'author and 'release' and 'path'"; + + %opts or croak $error; + + if ( defined ( my $module = $opts{'module'} ) ) { + $url = "pod/$module"; + } elsif ( + defined ( my $author = $opts{'author'} ) && + defined ( my $release = $opts{'release'} ) && + defined ( my $path = $opts{'path'} ) + ) { + $url = "pod/$author/$release/$path"; + } else { + croak $error; + } + + # check content-type + my %extra = (); + if ( defined ( my $type = $opts{'content-type'} ) ) { + $type =~ m{^ text/ (?: html|plain|x-pod|x-markdown ) $}x + or croak 'Incorrect content-type provided'; + + $extra{headers}{'content-type'} = $type; + } + + $url = $self->{base_url}. "/$url"; + + my $result = $self->{ua}->get( $url, \%extra ); + $result->{'success'} + or croak "Failed to fetch '$url': " . $result->{'reason'}; + + return $result->{'content'}; + } + + + # /module/{module} + sub module { + my $self = shift; + my $name = shift; + + $name or croak 'Please provide a module name'; + + return $self->fetch("module/$name"); + } + + + # file() is a synonym of module + sub file { goto &module } + + + # /author/{author} + sub author { + my $self = shift; + my ( $pause_id, $url, %extra_opts ); + + if ( @_ == 1 ) { + $url = 'author/' . shift; + } elsif ( @_ == 2 ) { + my %opts = @_; + + if ( defined $opts{'pauseid'} ) { + $url = "author/" . $opts{'pauseid'}; + } elsif ( defined $opts{'search'} ) { + my $search_opts = $opts{'search'}; + + ref $search_opts && ref $search_opts eq 'HASH' + or croak "'search' key must be hashref"; + + %extra_opts = %{$search_opts}; + $url = 'author/_search'; + } else { + croak 'Unknown option given'; + } + } else { + croak 'Please provide an author PAUSEID or a "search"'; + } + + return $self->fetch( $url, %extra_opts ); + } + + + + sub fetch { + my $self = shift; + my $url = shift; + my $extra = $self->_build_extra_params(@_); + my $base = $self->{base_url}; + my $req_url = $extra ? "$base/$url?$extra" : "$base/$url"; + + my $result = $self->{ua}->get($req_url); + return $self->_decode_result( $result, $req_url ); + } + + + sub post { + my $self = shift; + my $url = shift; + my $query = shift; + my $base = $self->{base_url}; + + defined $url + or croak 'First argument of URL must be provided'; + + ref $query and ref $query eq 'HASH' + or croak 'Second argument of query hashref must be provided'; + + my $query_json = encode_json( $query ); + my $result = $self->{ua}->request( + 'POST', + "$base/$url", + { + headers => { 'Content-Type' => 'application/json' }, + content => $query_json, + } + ); + + return $self->_decode_result( $result, $url, $query_json ); + } + + sub _decode_result { + my $self = shift; + my ( $result, $url, $original ) = @_; + my $decoded_result; + + ref $result and ref $result eq 'HASH' + or croak 'First argument must be hashref'; + + defined $url + or croak 'Second argument of a URL must be provided'; + + if ( defined ( my $success = $result->{'success'} ) ) { + my $reason = $result->{'reason'} || ''; + $reason .= ( defined $original ? " (request: $original)" : '' ); + + $success or croak "Failed to fetch '$url': $reason"; + } else { + croak 'Missing success in return value'; + } + + defined ( my $content = $result->{'content'} ) + or croak 'Missing content in return value'; + + eval { $decoded_result = decode_json $content; 1 } + or do { croak "Couldn't decode '$content': $@" }; + + return $decoded_result; + } + + 1; + + __END__ + + =pod + + =head1 NAME + + MetaCPAN::API::Tiny - A Tiny API client for MetaCPAN + + =head1 VERSION + + version 1.131730 + + =head1 DESCRIPTION + + This is the Tiny version of L. It implements a compatible API + with a few notable exceptions: + + =over 4 + + =item Attributes are direct hash access + + The attributes defined using Mo(o|u)se are now accessed via the blessed hash + directly. There are no accessors defined to access this elements. + + =item Exception handling + + Instead of using Try::Tiny, raw evals are used. This could potentially cause + issues, so just be aware. + + =item Testing + + Test::Fatal was replaced with an eval implementation of exception(). + Test::TinyMocker usage is retained, but may be absorbed since it is pure perl + + =back + + =head1 CLASS_METHODS + + =head2 new + + new is the constructor for MetaCPAN::API::Tiny. In the non-tiny version of this + module, this is provided via Any::Moose built from the attributes defined. In + the tiny version, we define our own constructor. It takes the same arguments + and provides similar checks to MetaCPAN::API with regards to arguments passed. + + =head1 PUBLIC_METHODS + + =head2 source + + my $source = $mcpan->source( + author => 'DOY', + release => 'Moose-2.0201', + path => 'lib/Moose.pm', + ); + + Searches MetaCPAN for a module or a specific release and returns the plain source. + + =head2 release + + my $result = $mcpan->release( distribution => 'Moose' ); + + # or + my $result = $mcpan->release( author => 'DOY', release => 'Moose-2.0001' ); + + Searches MetaCPAN for a dist. + + You can do complex searches using 'search' parameter: + + # example lifted from MetaCPAN docs + my $result = $mcpan->release( + search => { + author => "OALDERS AND ", + filter => "status:latest", + fields => "name", + size => 1, + }, + ); + + =head2 pod + + my $result = $mcpan->pod( module => 'Moose' ); + + # or + my $result = $mcpan->pod( + author => 'DOY', + release => 'Moose-2.0201', + path => 'lib/Moose.pm', + ); + + Searches MetaCPAN for a module or a specific release and returns the POD. + + =head2 module + + my $result = $mcpan->module('MetaCPAN::API'); + + Searches MetaCPAN and returns a module's ".pm" file. + + =head2 file + + A synonym of L + + =head2 author + + my $result1 = $mcpan->author('XSAWYERX'); + my $result2 = $mcpan->author( pauseid => 'XSAWYERX' ); + + Searches MetaCPAN for a specific author. + + You can do complex searches using 'search' parameter: + + # example lifted from MetaCPAN docs + my $result = $mcpan->author( + search => { + q => 'profile.name:twitter', + size => 1, + }, + ); + + =head2 fetch + + my $result = $mcpan->fetch('/release/distribution/Moose'); + + # with parameters + my $more = $mcpan->fetch( + '/release/distribution/Moose', + param => 'value', + ); + + This is a helper method for API implementations. It fetches a path from MetaCPAN, decodes the JSON from the content variable and returns it. + + You don't really need to use it, but you can in case you want to write your own extension implementation to MetaCPAN::API. + + It accepts an additional hash as "GET" parameters. + + =head2 post + + # /release&content={"query":{"match_all":{}},"filter":{"prefix":{"archive":"Cache-Cache-1.06"}}} + my $result = $mcpan->post( + 'release', + { + query => { match_all => {} }, + filter => { prefix => { archive => 'Cache-Cache-1.06' } }, + }, + ); + + The POST equivalent of the "fetch()" method. It gets the path and JSON request. + + =head1 THANKS + + Overall the tests and code were ripped directly from MetaCPAN::API and + tiny-fied. A big thanks to Sawyer X for writing the original module. + + =head1 AUTHOR + + Nicholas R. Perez + + =head1 COPYRIGHT AND LICENSE + + This software is copyright (c) 2013 by Nicholas R. Perez . + + This is free software; you can redistribute it and/or modify it under + the same terms as the Perl 5 programming language system itself. + + =cut +METACPAN_API_TINY + +s/^ //mg for values %fatpacked; + +unshift @INC, sub { + if (my $fat = $fatpacked{$_[1]}) { + if ($] < 5.008) { + return sub { + return 0 unless length $fat; + $fat =~ s/^([^\n]*\n?)//; + $_ = $1; + return 1; + }; + } + open my $fh, '<', \$fat + or die "FatPacker error loading $_[1] (could be a perl installation issue?)"; + return $fh; + } + return +}; + +} # END OF FATPACK CODE + + +use 5.022; # same major version as target perl +use strict; +use warnings; +use Fatal qw(open close); + +use Getopt::Long; +use Pod::Usage; +use File::Basename; +use Module::CoreList; +use HTTP::Tiny; +use Safe; +use MetaCPAN::API::Tiny; + +my ($help, $man, $quiet, $force, $recommend, $test, $host); +my $target = 1; +GetOptions( 'help|?' => \$help, + 'man' => \$man, + 'quiet|q' => \$quiet, + 'force|f' => \$force, + 'host!' => \$host, + 'target!' => \$target, + 'recommend' => \$recommend, + 'test' => \$test +) or pod2usage(-exitval => 1); +pod2usage(-exitval => 0) if $help; +pod2usage(-exitval => 0, -verbose => 2) if $man; +pod2usage(-exitval => 1) if scalar @ARGV == 0; + +my %dist; # name -> metacpan data +my %need_target; # name -> 1 if target package is needed +my %need_host; # name -> 1 if host package is needed +my %need_dlopen; # name -> 1 if requires dynamic library +my %deps_build; # name -> list of host dependencies +my %deps_runtime; # name -> list of target dependencies +my %license_files; # name -> list of license files +my %checksum; # author -> list of checksum +my $mcpan = MetaCPAN::API::Tiny->new(); +my $ua = HTTP::Tiny->new(); + +sub get_checksum { + my ($url) = @_; + my($path) = $url =~ m|^[^:/?#]+://[^/?#]*([^?#]*)|; + my($basename, $dirname) = fileparse( $path ); + unless ($checksum{$dirname}) { + my $response = $ua->get(qq{http://cpan.metacpan.org${dirname}CHECKSUMS}); + $checksum{$dirname} = $response->{content}; + } + my $chksum = Safe->new->reval($checksum{$dirname}); + return $chksum->{$basename}, $basename; +} + +sub get_manifest { + my ($author, $distname, $version) = @_; + my $url = qq{http://api.metacpan.org/source/${author}/${distname}-${version}/MANIFEST}; + my $response = $ua->get($url); + return $response->{content}; +} + +sub is_xs { + my ($manifest) = @_; + # This heuristic determines if a module is a native extension, by searching + # some file extension types in the MANIFEST of the distribution. + # It was inspired by http://deps.cpantesters.org/static/purity.html + return $manifest =~ m/\.(swg|xs|c|h|i)[\n\s]/; +} + +sub find_license_files { + my ($manifest) = @_; + my @license_files; + foreach (split /\n/, $manifest) { + next if m|/|; + push @license_files, $_ if m/(ARTISTIC|COPYING|COPYRIGHT|LICENSE)/i; + } + if (scalar @license_files == 0 && $manifest =~ m/(README)[\n\s]/i) { + @license_files = ($1); + } + return \@license_files; +} + +sub fetch { + my ($name, $need_target, $need_host) = @_; + $need_target{$name} = $need_target if $need_target; + $need_host{$name} = $need_host if $need_host; + unless ($dist{$name}) { + say qq{fetch ${name}} unless $quiet; + my $result = $mcpan->release( distribution => $name ); + $dist{$name} = $result; + my $manifest = get_manifest( $result->{author}, $name, $result->{version} ); + $need_dlopen{$name} = is_xs( $manifest ); + $license_files{$name} = find_license_files( $manifest ); + my %build = (); + my %runtime = (); + foreach my $dep (@{$result->{dependency}}) { + my $modname = ${$dep}{module}; + next if $modname eq q{perl}; + next if $modname =~ m|^Alien|; + next if $modname =~ m|^Win32|; + next if !$test && $modname =~ m|^Test|; + next if Module::CoreList::is_core( $modname, undef, $] ); + # we could use the host Module::CoreList data, because host perl and + # target perl have the same major version + next if ${$dep}{phase} eq q{develop}; + next if !$test && ${$dep}{phase} eq q{test}; + next if !$recommend && ${$dep}{relationship} ne q{requires}; + my $distname = $mcpan->module( $modname )->{distribution}; + if (${$dep}{phase} eq q{runtime}) { + $runtime{$distname} = 1; + } + else { # configure, build + $build{$distname} = 1; + } + } + $deps_build{$name} = [keys %build]; + $deps_runtime{$name} = [keys %runtime]; + foreach my $distname (@{$deps_build{$name}}) { + fetch( $distname, 0, 1 ); + } + foreach my $distname (@{$deps_runtime{$name}}) { + fetch( $distname, $need_target, $need_host ); + $need_dlopen{$name} ||= $need_dlopen{$distname}; + } + } + return; +} + +foreach my $distname (@ARGV) { + # Command-line's distributions + fetch( $distname, !!$target, !!$host ); +} +say scalar keys %dist, q{ packages fetched.} unless $quiet; + +# Buildroot package name: lowercase +sub fsname { + my $name = shift; + $name =~ s|_|-|g; + return q{perl-} . lc $name; +} + +# Buildroot variable name: uppercase +sub brname { + my $name = shift; + $name =~ s|-|_|g; + return uc $name; +} + +while (my ($distname, $dist) = each %dist) { + my $fsname = fsname( $distname ); + my $dirname = q{package/} . $fsname; + my $cfgname = $dirname . q{/Config.in}; + my $mkname = $dirname . q{/} . $fsname . q{.mk}; + my $hashname = $dirname . q{/} . $fsname . q{.hash}; + my $brname = brname( $fsname ); + mkdir $dirname unless -d $dirname; + if ($need_target{$distname} && ($force || !-f $cfgname)) { + my $abstract = $dist->{abstract}; + my $homepage = $dist->{resources}->{homepage} || qq{https://metacpan.org/release/${distname}}; + say qq{write ${cfgname}} unless $quiet; + open my $fh, q{>}, $cfgname; + say {$fh} qq{config BR2_PACKAGE_${brname}}; + say {$fh} qq{\tbool "${fsname}"}; + say {$fh} qq{\tdepends on !BR2_STATIC_LIBS} if $need_dlopen{$distname}; + foreach my $dep (sort @{$deps_runtime{$distname}}) { + my $brdep = brname( fsname( $dep ) ); + say {$fh} qq{\tselect BR2_PACKAGE_${brdep}}; + } + say {$fh} qq{\thelp}; + say {$fh} qq{\t ${abstract}\n} if $abstract; + say {$fh} qq{\t ${homepage}}; + if ($need_dlopen{$distname}) { + say {$fh} qq{\ncomment "${fsname} needs a toolchain w/ dynamic library"}; + say {$fh} qq{\tdepends on BR2_STATIC_LIBS}; + } + close $fh; + } + if ($force || !-f $mkname) { + my $version = $dist->{version}; + my($path) = $dist->{download_url} =~ m|^[^:/?#]+://[^/?#]*([^?#]*)|; + # this URL contains only the scheme, auth and path parts (but no query and fragment parts) + # the scheme is not used, because the job is done by the BR download infrastructure + # the auth part is not used, because we use $(BR2_CPAN_MIRROR) + my($filename, $directories, $suffix) = fileparse( $path, q{tar.gz}, q{tgz} ); + $directories =~ s|/$||; + my $dependencies = join q{ }, map( { q{host-} . fsname( $_ ); } sort @{$deps_build{$distname}} ), + map( { fsname( $_ ); } sort @{$deps_runtime{$distname}} ); + my $host_dependencies = join q{ }, map { q{host-} . fsname( $_ ); } sort( @{$deps_build{$distname}}, + @{$deps_runtime{$distname}} ); + my $license = ref $dist->{license} eq 'ARRAY' + ? join q{ or }, @{$dist->{license}} + : $dist->{license}; + # BR requires license name as in http://spdx.org/licenses/ + $license =~ s|apache_2_0|Apache-2.0|; + $license =~ s|artistic_2|Artistic-2.0|; + $license =~ s|mit|MIT|; + $license =~ s|openssl|OpenSSL|; + $license =~ s|perl_5|Artistic or GPLv1+|; + my $license_files = join q{ }, @{$license_files{$distname}}; + say qq{write ${mkname}} unless $quiet; + open my $fh, q{>}, $mkname; + say {$fh} qq{################################################################################}; + say {$fh} qq{#}; + say {$fh} qq{# ${fsname}}; + say {$fh} qq{#}; + say {$fh} qq{################################################################################}; + say {$fh} qq{}; + say {$fh} qq{${brname}_VERSION = ${version}}; + say {$fh} qq{${brname}_SOURCE = ${distname}-\$(${brname}_VERSION).${suffix}}; + say {$fh} qq{${brname}_SITE = \$(BR2_CPAN_MIRROR)${directories}}; + say {$fh} qq{${brname}_DEPENDENCIES = ${dependencies}} if $need_target{$distname} && $dependencies; + say {$fh} qq{HOST_${brname}_DEPENDENCIES = ${host_dependencies}} if $need_host{$distname} && $host_dependencies; + say {$fh} qq{${brname}_LICENSE = ${license}} if $license && $license ne q{unknown}; + say {$fh} qq{${brname}_LICENSE_FILES = ${license_files}} if $license_files; + say {$fh} qq{}; + say {$fh} qq{\$(eval \$(perl-package))} if $need_target{$distname}; + say {$fh} qq{\$(eval \$(host-perl-package))} if $need_host{$distname}; + close $fh; + } + if ($force || !-f $hashname) { + my($checksum, $filename) = get_checksum($dist->{download_url}); + my $md5 = $checksum->{md5}; + my $sha256 = $checksum->{sha256}; + say qq{write ${hashname}} unless $quiet; + open my $fh, q{>}, $hashname; + say {$fh} qq{# retrieved by scancpan from http://cpan.metacpan.org/}; + say {$fh} qq{md5 ${md5} ${filename}}; + say {$fh} qq{sha256 ${sha256} ${filename}}; + close $fh; + } +} + +my %pkg; +my $cfgname = q{package/Config.in}; +if (-f $cfgname) { + open my $fh, q{<}, $cfgname; + while (<$fh>) { + chomp; + $pkg{$_} = 1 if m|package/perl-|; + } + close $fh; +} + +foreach my $distname (keys %need_target) { + my $fsname = fsname( $distname ); + $pkg{qq{\tsource "package/${fsname}/Config.in"}} = 1; +} + +say qq{${cfgname} must contain the following lines:}; +say join qq{\n}, sort keys %pkg; + +__END__ + +=head1 NAME + +support/scripts/scancpan Try-Tiny Moo + +=head1 SYNOPSIS + +curl -kL http://install.perlbrew.pl | bash + +perlbrew install perl-5.18.2 + +supports/scripts/scancpan [options] [distname ...] + + Options: + -help + -man + -quiet + -force + -target/-notarget + -host/-nohost + -recommend + -test + +=head1 OPTIONS + +=over 8 + +=item B<-help> + +Prints a brief help message and exits. + +=item B<-man> + +Prints the manual page and exits. + +=item B<-quiet> + +Executes without output + +=item B<-force> + +Forces the overwriting of existing files. + +=item B<-target/-notarget> + +Switches package generation for the target variant (the default is C<-target>). + +=item B<-host/-nohost> + +Switches package generation for the host variant (the default is C<-nohost>). + +=item B<-recommend> + +Adds I dependencies. + +=item B<-test> + +Adds dependencies for test. + +=back + +=head1 DESCRIPTION + +This script creates templates of the Buildroot package files for all the +Perl/CPAN distributions required by the specified distnames. The +dependencies and metadata are fetched from https://metacpan.org/. + +After running this script, it is necessary to check the generated files. +You have to manually add the license files (PERL_FOO_LICENSE_FILES variable). +For distributions that link against a target library, you have to add the +buildroot package name for that library to the DEPENDENCIES variable. + +See the Buildroot documentation for details on the usage of the Perl +infrastructure. + +The major version of the host perl must be aligned on the target one, +in order to work with the right CoreList data. + +=head1 LICENSE + +Copyright (C) 2013-2014 by Francois Perrad + +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 + +This script is a part of Buildroot. + +This script requires the module C (version 1.131730) +which was included at the beginning of this file by the tool C. + +See L. + +See L. + +These both libraries are free software and may be distributed under the same +terms as perl itself. + +And perl may be distributed under the terms of Artistic v1 or GPL v1 license. + +=cut diff --git a/support/scripts/setlocalversion b/support/scripts/setlocalversion new file mode 100755 index 0000000000..adeeb781e7 --- /dev/null +++ b/support/scripts/setlocalversion @@ -0,0 +1,82 @@ +#!/bin/sh +# +# This scripts adds local version information from the version +# control systems git, mercurial (hg) and subversion (svn). +# +# If something goes wrong, send a mail the kernel build mailinglist +# (see MAINTAINERS) and CC Nico Schottelius +# . +# +# + +usage() { + echo "Usage: $0 [srctree]" >&2 + exit 1 +} + +cd "${1:-.}" || usage + +# Check for git and a git repo. +if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then + + # If we are at a tagged commit (like "v2.6.30-rc6"), we ignore it, + # because this version is defined in the top level Makefile. + if [ -z "`git describe --exact-match 2>/dev/null`" ]; then + + # If we are past a tagged commit (like "v2.6.30-rc5-302-g72357d5"), + # we pretty print it. + if atag="`git describe 2>/dev/null`"; then + echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}' + + # If we don't have a tag at all we print -g{commitish}. + else + printf '%s%s' -g $head + fi + fi + + # Is this git on svn? + if git config --get svn-remote.svn.url >/dev/null; then + printf -- '-svn%s' "`git svn find-rev $head`" + fi + + # Update index only on r/w media + [ -w . ] && git update-index --refresh --unmerged > /dev/null + + # Check for uncommitted changes + if git diff-index --name-only HEAD | grep -v "^scripts/package" \ + | read dummy; then + printf '%s' -dirty + fi + + # All done with git + exit +fi + +# Check for mercurial and a mercurial repo. +if hgid=`hg id 2>/dev/null`; then + tag=`printf '%s' "$hgid" | cut -d' ' -f2` + + # Do we have an untagged version? + if [ -z "$tag" -o "$tag" = tip ]; then + id=`printf '%s' "$hgid" | sed 's/[+ ].*//'` + printf '%s%s' -hg "$id" + fi + + # Are there uncommitted changes? + # These are represented by + after the changeset id. + case "$hgid" in + *+|*+\ *) printf '%s' -dirty ;; + esac + + # All done with mercurial + exit +fi + +# Check for svn and a svn repo. +if rev=`LC_ALL=C svn info 2>/dev/null | grep '^Last Changed Rev'`; then + rev=`echo $rev | awk '{print $NF}'` + printf -- '-svn%s' "$rev" + + # All done with svn + exit +fi diff --git a/support/scripts/size-stats b/support/scripts/size-stats new file mode 100755 index 0000000000..81d96caa12 --- /dev/null +++ b/support/scripts/size-stats @@ -0,0 +1,217 @@ +#!/usr/bin/env python + +# Copyright (C) 2014 by Thomas Petazzoni + +# 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 + +import sys +import os +import os.path +import argparse +import csv +import collections + +try: + import matplotlib + matplotlib.use('Agg') + import matplotlib.font_manager as fm + import matplotlib.pyplot as plt +except ImportError: + sys.stderr.write("You need python-matplotlib to generate the size graph\n") + exit(1) + +colors = ['#e60004', '#009836', '#2e1d86', '#ffed00', + '#0068b5', '#f28e00', '#940084', '#97c000'] + +# +# This function adds a new file to 'filesdict', after checking its +# size. The 'filesdict' contain the relative path of the file as the +# key, and as the value a tuple containing the name of the package to +# which the file belongs and the size of the file. +# +# filesdict: the dict to which the file is added +# relpath: relative path of the file +# fullpath: absolute path to the file +# pkg: package to which the file belongs +# +def add_file(filesdict, relpath, abspath, pkg): + if not os.path.exists(abspath): + return + if os.path.islink(abspath): + return + sz = os.stat(abspath).st_size + filesdict[relpath] = (pkg, sz) + +# +# This function returns a dict where each key is the path of a file in +# the root filesystem, and the value is a tuple containing two +# elements: the name of the package to which this file belongs and the +# size of the file. +# +# builddir: path to the Buildroot output directory +# +def build_package_dict(builddir): + filesdict = {} + with open(os.path.join(builddir, "build", "packages-file-list.txt")) as filelistf: + for l in filelistf.readlines(): + pkg, fpath = l.split(",") + # remove the initial './' in each file path + fpath = fpath.strip()[2:] + fullpath = os.path.join(builddir, "target", fpath) + add_file(filesdict, fpath, fullpath, pkg) + return filesdict + +# +# This function builds a dictionary that contains the name of a +# package as key, and the size of the files installed by this package +# as the value. +# +# filesdict: dictionary with the name of the files as key, and as +# value a tuple containing the name of the package to which the files +# belongs, and the size of the file. As returned by +# build_package_dict. +# +# builddir: path to the Buildroot output directory +# +def build_package_size(filesdict, builddir): + pkgsize = collections.defaultdict(int) + + for root, _, files in os.walk(os.path.join(builddir, "target")): + for f in files: + fpath = os.path.join(root, f) + if os.path.islink(fpath): + continue + frelpath = os.path.relpath(fpath, os.path.join(builddir, "target")) + if not frelpath in filesdict: + print("WARNING: %s is not part of any package" % frelpath) + pkg = "unknown" + else: + pkg = filesdict[frelpath][0] + + pkgsize[pkg] += os.path.getsize(fpath) + + return pkgsize + +# +# Given a dict returned by build_package_size(), this function +# generates a pie chart of the size installed by each package. +# +# pkgsize: dictionary with the name of the package as a key, and the +# size as the value, as returned by build_package_size. +# +# outputf: output file for the graph +# +def draw_graph(pkgsize, outputf): + total = sum(pkgsize.values()) + labels = [] + values = [] + other_value = 0 + for (p, sz) in pkgsize.items(): + if sz < (total * 0.01): + other_value += sz + else: + labels.append("%s (%d kB)" % (p, sz / 1000.)) + values.append(sz) + labels.append("Other (%d kB)" % (other_value / 1000.)) + values.append(other_value) + + plt.figure() + patches, texts, autotexts = plt.pie(values, labels=labels, + autopct='%1.1f%%', shadow=True, + colors=colors) + # Reduce text size + proptease = fm.FontProperties() + proptease.set_size('xx-small') + plt.setp(autotexts, fontproperties=proptease) + plt.setp(texts, fontproperties=proptease) + + plt.suptitle("Filesystem size per package", fontsize=18, y=.97) + plt.title("Total filesystem size: %d kB" % (total / 1000.), fontsize=10, y=.96) + plt.savefig(outputf) + +# +# Generate a CSV file with statistics about the size of each file, its +# size contribution to the package and to the overall system. +# +# filesdict: dictionary with the name of the files as key, and as +# value a tuple containing the name of the package to which the files +# belongs, and the size of the file. As returned by +# build_package_dict. +# +# pkgsize: dictionary with the name of the package as a key, and the +# size as the value, as returned by build_package_size. +# +# outputf: output CSV file +# +def gen_files_csv(filesdict, pkgsizes, outputf): + total = 0 + for (p, sz) in pkgsizes.items(): + total += sz + with open(outputf, 'w') as csvfile: + wr = csv.writer(csvfile, delimiter=',', quoting=csv.QUOTE_MINIMAL) + wr.writerow(["File name", + "Package name", + "File size", + "Package size", + "File size in package (%)", + "File size in system (%)"]) + for f, (pkgname, filesize) in filesdict.items(): + pkgsize = pkgsizes[pkgname] + wr.writerow([f, pkgname, filesize, pkgsize, + "%.1f" % (float(filesize) / pkgsize * 100), + "%.1f" % (float(filesize) / total * 100)]) + + +# +# Generate a CSV file with statistics about the size of each package, +# and their size contribution to the overall system. +# +# pkgsize: dictionary with the name of the package as a key, and the +# size as the value, as returned by build_package_size. +# +# outputf: output CSV file +# +def gen_packages_csv(pkgsizes, outputf): + total = sum(pkgsizes.values()) + with open(outputf, 'w') as csvfile: + wr = csv.writer(csvfile, delimiter=',', quoting=csv.QUOTE_MINIMAL) + wr.writerow(["Package name", "Package size", "Package size in system (%)"]) + for (pkg, size) in pkgsizes.items(): + wr.writerow([pkg, size, "%.1f" % (float(size) / total * 100)]) + +parser = argparse.ArgumentParser(description='Draw size statistics graphs') + +parser.add_argument("--builddir", '-i', metavar="BUILDDIR", required=True, + help="Buildroot output directory") +parser.add_argument("--graph", '-g', metavar="GRAPH", + help="Graph output file (.pdf or .png extension)") +parser.add_argument("--file-size-csv", '-f', metavar="FILE_SIZE_CSV", + help="CSV output file with file size statistics") +parser.add_argument("--package-size-csv", '-p', metavar="PKG_SIZE_CSV", + help="CSV output file with package size statistics") +args = parser.parse_args() + +# Find out which package installed what files +pkgdict = build_package_dict(args.builddir) + +# Collect the size installed by each package +pkgsize = build_package_size(pkgdict, args.builddir) + +if args.graph: + draw_graph(pkgsize, args.graph) +if args.file_size_csv: + gen_files_csv(pkgdict, pkgsize, args.file_size_csv) +if args.package_size_csv: + gen_packages_csv(pkgsize, args.package_size_csv) diff --git a/support/scripts/size-stats-compare b/support/scripts/size-stats-compare new file mode 100755 index 0000000000..e5a1ec3f94 --- /dev/null +++ b/support/scripts/size-stats-compare @@ -0,0 +1,127 @@ +#!/usr/bin/env python + +# Copyright (C) 2016 Thomas De Schampheleire + +# 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 + +# TODO (improvements) +# - support K,M,G size suffixes for threshold +# - output CSV file in addition to stdout reporting + +import csv +import argparse +import sys + +def read_file_size_csv(inputf, detail=None): + """Extract package or file sizes from CSV file into size dictionary""" + sizes = {} + reader = csv.reader(inputf) + + header = next(reader) + if (header[0] != 'File name' or header[1] != 'Package name' or + header[2] != 'File size' or header[3] != 'Package size'): + print(("Input file %s does not contain the expected header. Are you " + "sure this file corresponds to the file-size-stats.csv " + "file created by 'make graph-size'?") % inputf.name) + sys.exit(1) + + for row in reader: + if detail: + sizes[row[0]] = int(row[2]) + else: + sizes[row[1]] = int(row[3]) + + return sizes + +def compare_sizes(old, new): + """Return delta/added/removed dictionaries based on two input size + dictionaries""" + delta = {} + oldkeys = set(old.keys()) + newkeys = set(new.keys()) + + # packages/files in both + for entry in newkeys.intersection(oldkeys): + delta[entry] = ('', new[entry] - old[entry]) + # packages/files only in new + for entry in newkeys.difference(oldkeys): + delta[entry] = ('added', new[entry]) + # packages/files only in old + for entry in oldkeys.difference(newkeys): + delta[entry] = ('removed', -old[entry]) + + return delta + +def print_results(result, threshold): + """Print the given result dictionary sorted by size, ignoring any entries + below or equal to threshold""" + + from six import iteritems + list_result = list(iteritems(result)) + # result is a dictionary: name -> (flag, size difference) + # list_result is a list of tuples: (name, (flag, size difference)) + + for entry in sorted(list_result, key=lambda entry: entry[1][1]): + if threshold is not None and abs(entry[1][1]) <= threshold: + continue + print('%12s %7s %s' % (entry[1][1], entry[1][0], entry[0])) + + +# main ######################################################################### + +description = """ +Compare rootfs size between Buildroot compilations, for example after changing +configuration options or after switching to another Buildroot release. + +This script compares the file-size-stats.csv file generated by 'make graph-size' +with the corresponding file from another Buildroot compilation. +The size differences can be reported per package or per file. +Size differences smaller or equal than a given threshold can be ignored. +""" + +parser = argparse.ArgumentParser(description=description, + formatter_class=argparse.RawDescriptionHelpFormatter) + +parser.add_argument('-d', '--detail', action='store_true', + help='''report differences for individual files rather than + packages''') +parser.add_argument('-t', '--threshold', type=int, + help='''ignore size differences smaller or equal than this + value (bytes)''') +parser.add_argument('old_file_size_csv', type=argparse.FileType('r'), + metavar='old-file-size-stats.csv', + help="""old CSV file with file and package size statistics, + generated by 'make graph-size'""") +parser.add_argument('new_file_size_csv', type=argparse.FileType('r'), + metavar='new-file-size-stats.csv', + help='new CSV file with file and package size statistics') +args = parser.parse_args() + +if args.detail: + keyword = 'file' +else: + keyword = 'package' + +old_sizes = read_file_size_csv(args.old_file_size_csv, args.detail) +new_sizes = read_file_size_csv(args.new_file_size_csv, args.detail) + +delta = compare_sizes(old_sizes, new_sizes) + +print('Size difference per %s (bytes), threshold = %s' % (keyword, args.threshold)) +print(80*'-') +print_results(delta, args.threshold) +print(80*'-') +print_results({'TOTAL': ('', sum(new_sizes.values()) - sum(old_sizes.values()))}, + threshold=None) diff --git a/support/scripts/xorg-release b/support/scripts/xorg-release new file mode 100755 index 0000000000..66fc100b5e --- /dev/null +++ b/support/scripts/xorg-release @@ -0,0 +1,180 @@ +#!/usr/bin/python + +# This script generates a report on the packaging status of X.org +# releases in Buildroot. It does so by downloading the list of +# tarballs that are part of a given X.org release, and compare that +# with the packages that are available in Buildroot. + +import BeautifulSoup +import re +import os +import urllib +from distutils.version import LooseVersion + +# This can be customized +XORG_VERSION = "X11R7.7" + +# Key names in dictionaries +XORG_VERSION_KEY = "xorg-version" +BR_VERSION_KEY = "br-version" +BR_NAME_KEY = "br-name" + +# Packages part of X.org releases that we do not want to package in +# Buildroot (old drivers for hardware unlikely to be used in embedded +# contexts). +XORG_EXCEPTIONS = [ + 'xf86-video-suncg6', + 'xf86-video-sunffb', +] + +# Get the list of tarballs of a X.org release, parse it, and return a +# dictionary of dictionaries, of the form: +# +# { : { XORG_VERSION_KEY: }, +# : { XORG_VERSION_KEY: }} +# +def get_xorg_release_pkgs(): + u = urllib.URLopener().open("http://www.x.org/releases/%s/src/everything/" % XORG_VERSION) + b = BeautifulSoup.BeautifulSoup() + b.feed(u.read()) + links = b.findAll("a") + packages = {} + r = re.compile("(.*)-([0-9\.]*).tar.bz2") + # We now have a list of all links. + for link in links: + href = link.get("href") + # Skip everything but tarballs + if not href.endswith(".tar.bz2"): + continue + # Separate the name and the version + groups = r.match(href) + if not groups: + continue + name = groups.group(1) + version = groups.group(2) + # Skip packages we don't want to hear about + if name in XORG_EXCEPTIONS: + continue + packages[name] = { XORG_VERSION_KEY : version } + return packages + +# Files and directories in package/x11r7/ that should be ignored in +# our processing. +BUILDROOT_EXCEPTIONS = [ + "mcookie", # Code is directly in package directory + "x11r7.mk", + "Config.in", + "xdriver_xf86-input-tslib", # From Pengutronix, not part of X.org releases +] + +# Prefixes of directories in package/x11r7/ that must be stripped +# before trying to match Buildroot package names with X.org tarball +# names. +BUILDROOT_PREFIXES = [ + "xapp", + "xdriver", + "xfont", + "xlib", + "xserver", + "xutil", + "xproto", +] + +# From a Buildroot package name, try to see if a prefix should be +# stripped from it. For example, passing "xapp_xlsfonts" as argument +# to this function will return "xlsfonts". +def buildroot_strip_prefix(dirname): + for prefix in BUILDROOT_PREFIXES: + if dirname.startswith(prefix + "_"): + return dirname[len(prefix) + 1:] + return dirname + +# From a Buildroot package name, parse its .mk file to find the +# Buildroot version of the package by looking at the _VERSION +# line. +def buildroot_get_version(dirname): + f = open(os.path.join("package", "x11r7", dirname, dirname + ".mk")) + r = re.compile("^([A-Z0-9_]*)_VERSION = ([0-9\.]*)$") + for l in f.readlines(): + m = r.match(l) + if m: + return m.group(2) + return None + +# Augment the information of the X.org list of packages (given as +# argument) by details about their packaging in Buildroot. Those +# details are found by looking at the contents of package/x11r7/. +def get_buildroot_pkgs(packages): + dirs = os.listdir(os.path.join(os.getcwd(), "package", "x11r7")) + for d in dirs: + # Skip exceptions + if d in BUILDROOT_EXCEPTIONS: + continue + pkgname = buildroot_strip_prefix(d) + version = buildroot_get_version(d) + if packages.has_key(pkgname): + # There is a X.org package of the same name, so we just + # add information to the existing dict entry. + packages[pkgname]['br-version'] = version + packages[pkgname]['br-name'] = d + else: + # There is no X.org package with this name, so we add a + # new dict entry. + packages[pkgname] = { BR_VERSION_KEY: version, + BR_NAME_KEY : d } + return packages + +def show_summary(packages): + FORMAT_STRING = "%40s | %15s | %15s | %-30s" + print FORMAT_STRING % ("Package name", "Vers in BR", "Vers in X.org", "Action") + print FORMAT_STRING % ("-" * 40, "-" * 15, "-" * 15, "-" * 30) + pkgs = packages.keys() + pkgs.sort() + total_pkgs = 0 + upgrade_pkgs = 0 + add_pkgs = 0 + remove_pkgs = 0 + nothing_todo_pkgs = 0 + for pkgname in pkgs: + pkg = packages[pkgname] + total_pkgs += 1 + if pkg.has_key(XORG_VERSION_KEY) and not pkg.has_key(BR_VERSION_KEY): + xorg_version = pkg[XORG_VERSION_KEY] + br_version = "N/A" + action = "Add to Buildroot" + add_pkgs += 1 + elif not pkg.has_key(XORG_VERSION_KEY) and pkg.has_key(BR_VERSION_KEY): + br_version = pkg[BR_VERSION_KEY] + xorg_version = "N/A" + action = "Remove from Buildroot" + remove_pkgs += 1 + elif LooseVersion(pkg[XORG_VERSION_KEY]) > LooseVersion(pkg[BR_VERSION_KEY]): + br_version = pkg[BR_VERSION_KEY] + xorg_version = pkg[XORG_VERSION_KEY] + action = "Upgrade" + upgrade_pkgs += 1 + elif LooseVersion(pkg[XORG_VERSION_KEY]) < LooseVersion(pkg[BR_VERSION_KEY]): + br_version = pkg[BR_VERSION_KEY] + xorg_version = pkg[XORG_VERSION_KEY] + action = "More recent" + nothing_todo_pkgs += 1 + else: + br_version = pkg[BR_VERSION_KEY] + xorg_version = pkg[XORG_VERSION_KEY] + action = "" + nothing_todo_pkgs += 1 + + print FORMAT_STRING % (pkgname, br_version.center(15), xorg_version.center(15), action) + print FORMAT_STRING % ("-" * 40, "-" * 15, "-" * 15, "-" * 30) + STAT_FORMAT_STRING = "%40s : %3d" + print STAT_FORMAT_STRING % ("Total number of packages", total_pkgs) + print STAT_FORMAT_STRING % ("Packages to upgrade", upgrade_pkgs) + print STAT_FORMAT_STRING % ("Packages to add", add_pkgs) + print STAT_FORMAT_STRING % ("Packages to remove", remove_pkgs) + print STAT_FORMAT_STRING % ("Packages with nothing to do", nothing_todo_pkgs) + +packages = get_xorg_release_pkgs() +packages = get_buildroot_pkgs(packages) +# print packages +show_summary(packages) + diff --git a/system/Config.in b/system/Config.in new file mode 100644 index 0000000000..9441467435 --- /dev/null +++ b/system/Config.in @@ -0,0 +1,486 @@ +menu "System configuration" + +config BR2_TARGET_GENERIC_HOSTNAME + string "System hostname" + default "buildroot" + help + Select system hostname to be stored in /etc/hostname. + + Leave empty to not create /etc/hostname, or to keep the + one from a custom skeleton. + +config BR2_TARGET_GENERIC_ISSUE + string "System banner" + default "Welcome to Buildroot" + help + Select system banner (/etc/issue) to be displayed at login. + + Leave empty to not create /etc/issue, or to keep the + one from a custom skeleton. + +choice + bool "Passwords encoding" + default BR2_TARGET_GENERIC_PASSWD_MD5 + help + Choose the password encoding scheme to use when Buildroot + needs to encode a password (eg. the root password, below). + + Note: this is used at build-time, and *not* at runtime. + +config BR2_TARGET_GENERIC_PASSWD_MD5 + bool "md5" + help + Use MD5 to encode passwords. + + The default. Wildly available, and pretty good. + Although pretty strong, MD5 is now an old hash function, and + suffers from some weaknesses, which makes it susceptible to + brute-force attacks. + +config BR2_TARGET_GENERIC_PASSWD_SHA256 + bool "sha-256" + help + Use SHA256 to encode passwords. + + Very strong, but not ubiquitous, although available in glibc + for some time now. Choose only if you are sure your C library + understands SHA256 passwords. + +config BR2_TARGET_GENERIC_PASSWD_SHA512 + bool "sha-512" + help + Use SHA512 to encode passwords. + + Extremely strong, but not ubiquitous, although available in glibc + for some time now. Choose only if you are sure your C library + understands SHA512 passwords. + +endchoice # Passwd encoding + +config BR2_TARGET_GENERIC_PASSWD_METHOD + string + default "md5" if BR2_TARGET_GENERIC_PASSWD_MD5 + default "sha-256" if BR2_TARGET_GENERIC_PASSWD_SHA256 + default "sha-512" if BR2_TARGET_GENERIC_PASSWD_SHA512 + +choice + prompt "Init system" + default BR2_INIT_BUSYBOX + +config BR2_INIT_BUSYBOX + bool "BusyBox" + select BR2_PACKAGE_BUSYBOX + select BR2_PACKAGE_INITSCRIPTS + +config BR2_INIT_SYSV + bool "systemV" + select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # sysvinit + select BR2_PACKAGE_INITSCRIPTS + select BR2_PACKAGE_SYSVINIT + +# In Buildroot, we decided not to support a split-usr when systemd is +# used as an init system. This is a design decision, not a systemd +# issue. Thus the select is with BR2_INIT_SYSTEMD (below) rather than +# with BR2_PACKAGE_SYSTEMD. +config BR2_INIT_SYSTEMD + bool "systemd" + depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS + depends on BR2_TOOLCHAIN_USES_GLIBC + depends on BR2_USE_WCHAR + depends on BR2_TOOLCHAIN_HAS_THREADS + depends on BR2_TOOLCHAIN_HAS_SSP + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + select BR2_ROOTFS_MERGED_USR + select BR2_PACKAGE_SYSTEMD + +comment "systemd needs (e)glibc toolchain, headers >= 3.10" + depends on !(BR2_TOOLCHAIN_USES_GLIBC \ + && BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10) + +config BR2_INIT_NONE + bool "None" + help + Buildroot will not install any init system. You will + have to provide your own, either with a new package + or with a rootfs-overlay. + +endchoice + +choice + prompt "/dev management" if !BR2_INIT_SYSTEMD + default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS + +config BR2_ROOTFS_DEVICE_CREATION_STATIC + bool "Static using device table" + +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS + bool "Dynamic using devtmpfs only" + +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV + bool "Dynamic using devtmpfs + mdev" + select BR2_PACKAGE_BUSYBOX + +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV + bool "Dynamic using devtmpfs + eudev" + depends on BR2_USE_WCHAR + depends on !BR2_STATIC_LIBS + depends on BR2_USE_MMU # eudev + select BR2_PACKAGE_EUDEV + +comment "eudev needs a toolchain w/ wchar, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS + +endchoice + +comment "/dev management using udev (from systemd)" + depends on BR2_INIT_SYSTEMD + +config BR2_ROOTFS_DEVICE_TABLE + string "Path to the permission tables" + default "system/device_table.txt" + help + Specify a space-separated list of permission table locations, + that will be passed to the makedevs utility to assign + correct owners and permissions on various files in the + target filesystem. + + See package/makedevs/README for details on the usage and + syntax of these files. + +config BR2_ROOTFS_STATIC_DEVICE_TABLE + string "Path to the device tables" + default "system/device_table_dev.txt" + depends on BR2_ROOTFS_DEVICE_CREATION_STATIC + help + Specify a space-separated list of device table locations, + that will be passed to the makedevs utility to create all + the special device files under /dev. + + See package/makedevs/README for details on the usage and + syntax of these files. + +choice + prompt "Root FS skeleton" + +config BR2_ROOTFS_SKELETON_DEFAULT + bool "default target skeleton" + help + Use default target skeleton + +config BR2_ROOTFS_SKELETON_CUSTOM + bool "custom target skeleton" + help + Use custom target skeleton. + +endchoice + +if BR2_ROOTFS_SKELETON_CUSTOM +config BR2_ROOTFS_SKELETON_CUSTOM_PATH + string "custom target skeleton path" + default "system/skeleton" + help + Path to custom target skeleton. + +# dummy config so merged /usr workarounds can also be activated for +# custom rootfs skeleton +config BR2_ROOTFS_MERGED_USR + +endif + +if BR2_ROOTFS_SKELETON_DEFAULT + +config BR2_ROOTFS_MERGED_USR + bool "Use symlinks to /usr for /bin, /sbin and /lib" + help + If you say 'n' here, then /bin, /sbin and /lib and their + counterparts in /usr will be separate directories. This + is the historical UNIX way. In this case, /usr can be a + filesystem on a partition separate from / . + + If you say 'y' here, then /bin, /sbin and /lib will be symlinks + to their counterparts in /usr. In this case, /usr can not be a + separate filesystem. + +config BR2_TARGET_ENABLE_ROOT_LOGIN + bool "Enable root login with password" + default y + help + Allow root to log in with a password. + + If not enabled, root will not be able to log in with a password. + However, if you have an ssh server and you add an ssh key, you + can still allow root to log in. Alternatively, you can use sudo + to become root. + +config BR2_TARGET_GENERIC_ROOT_PASSWD + string "Root password" + default "" + depends on BR2_TARGET_ENABLE_ROOT_LOGIN + help + Set the initial root password. + + If set to empty (the default), then no root password will be set, + and root will need no password to log in. + + If the password starts with any of $1$, $5$ or $6$, it is considered + to be already crypt-encoded with respectively md5, sha256 or sha512. + Any other value is taken to be a clear-text value, and is crypt-encoded + as per the "Passwords encoding" scheme, above. + + Note: "$" signs in the hashed password must be doubled. For example, + if the hashed password is "$1$longsalt$v35DIIeMo4yUfI23yditq0", + then you must enter it as "$$1$$longsalt$$v35DIIeMo4yUfI23yditq0" + (this is necessary otherwise make would attempt to interpret the $ + as a variable expansion). + + WARNING! WARNING! + The password appears as-is in the .config file, and may appear + in the build log! Avoid using a valuable password if either the + .config file or the build log may be distributed, or at the + very least use a strong cryptographic hash for your password! + +choice + bool "/bin/sh" + default BR2_SYSTEM_BIN_SH_DASH if !BR2_PACKAGE_BUSYBOX + help + Select which shell will provide /bin/sh. + +# busybox has shells that work on noMMU +config BR2_SYSTEM_BIN_SH_BUSYBOX + bool "busybox' default shell" + depends on BR2_PACKAGE_BUSYBOX + +config BR2_SYSTEM_BIN_SH_BASH + bool "bash" + depends on BR2_USE_MMU # bash + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_BASH + +config BR2_SYSTEM_BIN_SH_DASH + bool "dash" + depends on BR2_USE_MMU # dash + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_DASH + +config BR2_SYSTEM_BIN_SH_ZSH + bool "zsh" + depends on BR2_USE_MMU # zsh + depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS + select BR2_PACKAGE_ZSH + +comment "bash, dash, zsh need BR2_PACKAGE_BUSYBOX_SHOW_OTHERS" + depends on !BR2_PACKAGE_BUSYBOX_SHOW_OTHERS && BR2_PACKAGE_BUSYBOX + +config BR2_SYSTEM_BIN_SH_NONE + bool "none" + +endchoice # /bin/sh + +config BR2_SYSTEM_BIN_SH + string + default "busybox" if BR2_SYSTEM_BIN_SH_BUSYBOX + default "bash" if BR2_SYSTEM_BIN_SH_BASH + default "dash" if BR2_SYSTEM_BIN_SH_DASH + default "zsh" if BR2_SYSTEM_BIN_SH_ZSH + +menuconfig BR2_TARGET_GENERIC_GETTY + bool "Run a getty (login prompt) after boot" + default y + +if BR2_TARGET_GENERIC_GETTY +config BR2_TARGET_GENERIC_GETTY_PORT + string "TTY port" + default "console" + help + Specify a port to run a getty on. + +choice + prompt "Baudrate" + default BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP + help + Select a baudrate to use. + +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP + bool "keep kernel default" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600 + bool "9600" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200 + bool "19200" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400 + bool "38400" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600 + bool "57600" +config BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 + bool "115200" +endchoice + +config BR2_TARGET_GENERIC_GETTY_BAUDRATE + string + default "0" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_KEEP + default "9600" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_9600 + default "19200" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_19200 + default "38400" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_38400 + default "57600" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_57600 + default "115200" if BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200 + +config BR2_TARGET_GENERIC_GETTY_TERM + string "TERM environment variable" + default "vt100" + help + Specify a TERM type. + +config BR2_TARGET_GENERIC_GETTY_OPTIONS + string "other options to pass to getty" + default "" + help + Any other flags you want to pass to getty, + Refer to getty --help for details. +endif + +config BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW + bool "remount root filesystem read-write during boot" + default y + help + The root filesystem is typically mounted read-only at boot. + By default, buildroot remounts it in read-write mode early during the + boot process. + Say no here if you would rather like your root filesystem to remain + read-only. + If unsure, say Y. + +endif # BR2_ROOTFS_SKELETON_DEFAULT + + +config BR2_SYSTEM_DHCP + string "Network interface to configure through DHCP" + default "" + depends on !BR2_PACKAGE_SYSTEMD_NETWORKD && (BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN) + help + Enter here the name of the network interface (E.G. eth0) to + automatically configure through DHCP at bootup. + + If left empty, no automatic DHCP requests will take place. + + For more complicated network setups use an overlay to overwrite + /etc/network/interfaces or add a networkd configuration file. + +comment "automatic network configuration via DHCP is not compatible with networkd" + depends on BR2_PACKAGE_SYSTEMD_NETWORKD + +comment "automatic network configuration via DHCP needs ifupdown or busybox" + depends on !(BR2_PACKAGE_BUSYBOX || BR2_PACKAGE_IFUPDOWN) + +config BR2_TARGET_TZ_INFO + bool "Install timezone info" + # No timezone for musl; only for uClibc or (e)glibc. + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC + select BR2_PACKAGE_TZDATA if BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_TZ if BR2_TOOLCHAIN_USES_UCLIBC + help + Say 'y' here to install timezone info. + +if BR2_TARGET_TZ_INFO + +config BR2_TARGET_TZ_ZONELIST + string "timezone list" + default "default" + help + Space-separated list of time zones to compile. + + The value "default" includes all commonly used time zones. Note + that this set consumes around 5.5M for (e)glibc and 2.1M for uClibc. + + The full list is the list of files in the time zone database source, + not including the build and .tab files. + +config BR2_TARGET_LOCALTIME + string "default local time" + default "Etc/UTC" + help + The time zone to install as the default local time, expressed as a + tzdata location, such as: + GMT + Europe/Paris + America/New_York + Pacific/Wallis + ... + + If empty, no local time will be set, and the dates will be + expressed in UTC. + +endif # BR2_TARGET_TZ_INFO + +config BR2_ROOTFS_USERS_TABLES + string "Path to the users tables" + help + Specify a space-separated list of users table locations, + that will be passed to the mkusers utility to create + users on the system, with home directory, password, etc. + + See manual for details on the usage and syntax of these files. + +config BR2_ROOTFS_OVERLAY + string "Root filesystem overlay directories" + default "" + help + Specify a list of directories that are copied over the target + root filesystem after the build has finished and before it is + packed into the selected filesystem images. + + They are copied as-is into the rootfs, excluding files ending with + ~ and .git, .svn and .hg directories. + +config BR2_ROOTFS_POST_BUILD_SCRIPT + string "Custom scripts to run before creating filesystem images" + default "" + help + Specify a space-separated list of scripts to be run after the build + has finished and before Buildroot starts packing the files into + selected filesystem images. + + This gives users the opportunity to do board-specific cleanups, + add-ons and the like, so the generated files can be used directly + without further processing. + + These scripts are called with the target directory name as first + argument. Make sure the exit code of those scripts are 0, otherwise + make will stop after calling them. + +config BR2_ROOTFS_POST_IMAGE_SCRIPT + string "Custom scripts to run after creating filesystem images" + default "" + help + Specify a space-separated list of scripts to be run after + the build has finished and after Buildroot has packed the + files into selected filesystem images. + + This can for example be used to call a tool building a + firmware image from different images generated by Buildroot, + or automatically extract the tarball root filesystem image + into some location exported by NFS, or any other custom + action. + + These scripts are called with the images directory name as + first argument. The script is executed from the main Buildroot + source directory as the current directory. + +config BR2_ROOTFS_POST_SCRIPT_ARGS + string "Extra post-{build,image} arguments" + depends on BR2_ROOTFS_POST_BUILD_SCRIPT != "" || BR2_ROOTFS_POST_IMAGE_SCRIPT != "" + help + Pass these additional arguments to each post-build or post-image + scripts. + + Note that all the post-build and post-image scripts will be passed + the same set of arguments, you can not pass different arguments to + each script. + + Note also, as stated in their respective help text, that the first + argument to each post-build or post-image script is the target + directory / images directory. The arguments in this option will be + passed *after* those. + +endmenu diff --git a/system/device_table.txt b/system/device_table.txt new file mode 100644 index 0000000000..dc1af51810 --- /dev/null +++ b/system/device_table.txt @@ -0,0 +1,21 @@ +# See package/makedevs/README for details +# +# This device table is used to assign proper ownership and permissions +# on various files. It doesn't create any device file, as it is used +# in both static device configurations (where /dev/ is static) and in +# dynamic configurations (where devtmpfs, mdev or udev are used). +# +# +/dev d 755 0 0 - - - - - +/tmp d 1777 0 0 - - - - - +/etc d 755 0 0 - - - - - +/root d 700 0 0 - - - - - +/var/www d 755 33 33 - - - - - +/etc/shadow f 600 0 0 - - - - - +/etc/passwd f 644 0 0 - - - - - +/etc/network/if-up.d d 755 0 0 - - - - - +/etc/network/if-pre-up.d d 755 0 0 - - - - - +/etc/network/if-down.d d 755 0 0 - - - - - +/etc/network/if-post-down.d d 755 0 0 - - - - - +# uncomment this to allow starting x as non-root +#/usr/X11R6/bin/Xfbdev f 4755 0 0 - - - - - diff --git a/system/device_table_dev.txt b/system/device_table_dev.txt new file mode 100644 index 0000000000..c4257a6a2c --- /dev/null +++ b/system/device_table_dev.txt @@ -0,0 +1,132 @@ +# See package/makedevs/README for details +# +# This device table is used only to create device files when a static +# device configuration is used (entries in /dev are static). +# +# + +# Normal system devices +/dev/mem c 640 0 0 1 1 0 0 - +/dev/kmem c 640 0 0 1 2 0 0 - +/dev/null c 666 0 0 1 3 0 0 - +/dev/zero c 666 0 0 1 5 0 0 - +/dev/random c 666 0 0 1 8 0 0 - +/dev/urandom c 666 0 0 1 9 0 0 - +/dev/ram b 640 0 0 1 1 0 0 - +/dev/ram b 640 0 0 1 0 0 1 4 +/dev/loop b 640 0 0 7 0 0 1 2 +/dev/rtc c 640 0 0 10 135 - - - +/dev/console c 666 0 0 5 1 - - - +/dev/tty c 666 0 0 5 0 - - - +/dev/tty c 666 0 0 4 0 0 1 8 +/dev/ttyp c 666 0 0 3 0 0 1 10 +/dev/ptyp c 666 0 0 2 0 0 1 10 +/dev/ptmx c 666 0 0 5 2 - - - +/dev/ttyP c 666 0 0 57 0 0 1 4 +/dev/ttyS c 666 0 0 4 64 0 1 4 +/dev/fb c 640 0 5 29 0 0 1 4 +#/dev/ttySA c 666 0 0 204 5 0 1 3 +/dev/psaux c 666 0 0 10 1 0 0 - +#/dev/ppp c 666 0 0 108 0 - - - +/dev/ttyAM c 666 0 0 204 16 0 1 3 +/dev/ttyCPM c 666 0 0 204 46 0 1 4 +/dev/ttyAMA c 666 0 0 204 64 0 1 4 +/dev/ttySAC c 666 0 0 204 64 0 1 4 +/dev/ttySC c 666 0 0 204 8 0 1 8 +/dev/ttyPSC c 666 0 0 204 148 0 1 4 +/dev/ttyUL c 666 0 0 204 187 0 1 4 +/dev/ttymxc c 666 0 0 207 16 0 1 4 +/dev/hvc c 640 0 0 229 0 0 1 4 + +# Input stuff +/dev/input d 755 0 0 - - - - - +/dev/input/mice c 640 0 0 13 63 0 0 - +/dev/input/mouse c 660 0 0 13 32 0 1 4 +/dev/input/event c 660 0 0 13 64 0 1 4 +#/dev/input/js c 660 0 0 13 0 0 1 4 + + +# MTD stuff +/dev/mtd c 640 0 0 90 0 0 2 4 +/dev/mtdblock b 640 0 0 31 0 0 1 4 + +#Tun/tap driver +/dev/net d 755 0 0 - - - - - +/dev/net/tun c 660 0 0 10 200 - - - + +# Audio stuff +#/dev/audio c 666 0 29 14 4 - - - +#/dev/audio1 c 666 0 29 14 20 - - - +#/dev/dsp c 666 0 29 14 3 - - - +#/dev/dsp1 c 666 0 29 14 19 - - - +#/dev/sndstat c 666 0 29 14 6 - - - + +# User-mode Linux stuff +#/dev/ubda b 640 0 0 98 0 0 0 - +#/dev/ubda b 640 0 0 98 1 1 1 15 + +# IDE Devices +/dev/hda b 640 0 0 3 0 0 0 - +/dev/hda b 640 0 0 3 1 1 1 15 +/dev/hdb b 640 0 0 3 64 0 0 - +/dev/hdb b 640 0 0 3 65 1 1 15 +#/dev/hdc b 640 0 0 22 0 0 0 - +#/dev/hdc b 640 0 0 22 1 1 1 15 +#/dev/hdd b 640 0 0 22 64 0 0 - +#/dev/hdd b 640 0 0 22 65 1 1 15 +#/dev/hde b 640 0 0 33 0 0 0 - +#/dev/hde b 640 0 0 33 1 1 1 15 +#/dev/hdf b 640 0 0 33 64 0 0 - +#/dev/hdf b 640 0 0 33 65 1 1 15 +#/dev/hdg b 640 0 0 34 0 0 0 - +#/dev/hdg b 640 0 0 34 1 1 1 15 +#/dev/hdh b 640 0 0 34 64 0 0 - +#/dev/hdh b 640 0 0 34 65 1 1 15 + +# SCSI Devices +/dev/sda b 640 0 0 8 0 0 0 - +/dev/sda b 640 0 0 8 1 1 1 15 +/dev/sdb b 640 0 0 8 16 0 0 - +/dev/sdb b 640 0 0 8 17 1 1 15 +#/dev/sdc b 640 0 0 8 32 0 0 - +#/dev/sdc b 640 0 0 8 33 1 1 15 +#/dev/sdd b 640 0 0 8 48 0 0 - +#/dev/sdd b 640 0 0 8 49 1 1 15 +#/dev/sde b 640 0 0 8 64 0 0 - +#/dev/sde b 640 0 0 8 65 1 1 15 +#/dev/sdf b 640 0 0 8 80 0 0 - +#/dev/sdf b 640 0 0 8 81 1 1 15 +#/dev/sdg b 640 0 0 8 96 0 0 - +#/dev/sdg b 640 0 0 8 97 1 1 15 +#/dev/sdh b 640 0 0 8 112 0 0 - +#/dev/sdh b 640 0 0 8 113 1 1 15 +#/dev/sg c 640 0 0 21 0 0 1 15 +#/dev/scd b 640 0 0 11 0 0 1 15 +#/dev/st c 640 0 0 9 0 0 1 8 +#/dev/nst c 640 0 0 9 128 0 1 8 +#/dev/st c 640 0 0 9 32 1 1 4 +#/dev/st c 640 0 0 9 64 1 1 4 +#/dev/st c 640 0 0 9 96 1 1 4 + +# USB block devices (ub driver) +/dev/uba b 640 0 0 180 0 0 0 - +/dev/uba b 640 0 0 180 1 1 1 6 +/dev/ubb b 640 0 0 180 8 0 0 - +/dev/ubb b 640 0 0 180 65 1 1 6 + +# Floppy disk devices +#/dev/fd b 640 0 0 2 0 0 1 2 +#/dev/fd0d360 b 640 0 0 2 4 0 0 - +#/dev/fd1d360 b 640 0 0 2 5 0 0 - +#/dev/fd0h1200 b 640 0 0 2 8 0 0 - +#/dev/fd1h1200 b 640 0 0 2 9 0 0 - +#/dev/fd0u1440 b 640 0 0 2 28 0 0 - +#/dev/fd1u1440 b 640 0 0 2 29 0 0 - +#/dev/fd0u2880 b 640 0 0 2 32 0 0 - +#/dev/fd1u2880 b 640 0 0 2 33 0 0 - + +# I2C device nodes +/dev/i2c- c 666 0 0 89 0 0 1 4 + +# v4l device nodes +/dev/video c 666 0 0 81 0 0 1 4 diff --git a/system/skeleton/dev/log b/system/skeleton/dev/log new file mode 120000 index 0000000000..d96b3b1cb8 --- /dev/null +++ b/system/skeleton/dev/log @@ -0,0 +1 @@ +../tmp/log \ No newline at end of file diff --git a/system/skeleton/dev/pts/.empty b/system/skeleton/dev/pts/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/dev/shm/.empty b/system/skeleton/dev/shm/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/etc/fstab b/system/skeleton/etc/fstab new file mode 100644 index 0000000000..2b418a0eb6 --- /dev/null +++ b/system/skeleton/etc/fstab @@ -0,0 +1,8 @@ +# +/dev/root / ext2 rw,noauto 0 1 +proc /proc proc defaults 0 0 +devpts /dev/pts devpts defaults,gid=5,mode=620 0 0 +tmpfs /dev/shm tmpfs mode=0777 0 0 +tmpfs /tmp tmpfs mode=1777 0 0 +tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0 +sysfs /sys sysfs defaults 0 0 diff --git a/system/skeleton/etc/group b/system/skeleton/etc/group new file mode 100644 index 0000000000..c813da2022 --- /dev/null +++ b/system/skeleton/etc/group @@ -0,0 +1,26 @@ +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: +operator:x:37: +utmp:x:43: +plugdev:x:46: +staff:x:50: +lock:x:54: +netdev:x:82: +nogroup:x:99: +users:x:100: diff --git a/system/skeleton/etc/hosts b/system/skeleton/etc/hosts new file mode 100644 index 0000000000..ba712fe033 --- /dev/null +++ b/system/skeleton/etc/hosts @@ -0,0 +1 @@ +127.0.0.1 localhost diff --git a/system/skeleton/etc/mtab b/system/skeleton/etc/mtab new file mode 120000 index 0000000000..4c0a0948bc --- /dev/null +++ b/system/skeleton/etc/mtab @@ -0,0 +1 @@ +/proc/mounts \ No newline at end of file diff --git a/system/skeleton/etc/network/if-down.d/.empty b/system/skeleton/etc/network/if-down.d/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/etc/network/if-post-down.d/.empty b/system/skeleton/etc/network/if-post-down.d/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/etc/network/if-pre-up.d/.empty b/system/skeleton/etc/network/if-pre-up.d/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/etc/network/if-pre-up.d/wait_iface b/system/skeleton/etc/network/if-pre-up.d/wait_iface new file mode 100755 index 0000000000..ebccff2aa5 --- /dev/null +++ b/system/skeleton/etc/network/if-pre-up.d/wait_iface @@ -0,0 +1,21 @@ +#!/bin/sh + +# In case we have a slow-to-appear interface (e.g. eth-over-USB), +# and we need to configure it, wait until it appears, but not too +# long either. IF_WAIT_DELAY is in seconds. + +if [ "${IF_WAIT_DELAY}" -a ! -e "/sys/class/net/${IFACE}" ]; then + printf "Waiting for interface %s to appear" "${IFACE}" + while [ ${IF_WAIT_DELAY} -gt 0 ]; do + if [ -e "/sys/class/net/${IFACE}" ]; then + printf "\n" + exit 0 + fi + sleep 1 + printf "." + : $((IF_WAIT_DELAY -= 1)) + done + printf " timeout!\n" + exit 1 +fi + diff --git a/system/skeleton/etc/network/if-up.d/.empty b/system/skeleton/etc/network/if-up.d/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/etc/passwd b/system/skeleton/etc/passwd new file mode 100644 index 0000000000..883265ad6f --- /dev/null +++ b/system/skeleton/etc/passwd @@ -0,0 +1,9 @@ +root:x:0:0:root:/root:/bin/sh +daemon:x:1:1:daemon:/usr/sbin:/bin/false +bin:x:2:2:bin:/bin:/bin/false +sys:x:3:3:sys:/dev:/bin/false +sync:x:4:100:sync:/bin:/bin/sync +mail:x:8:8:mail:/var/spool/mail:/bin/false +www-data:x:33:33:www-data:/var/www:/bin/false +operator:x:37:37:Operator:/var:/bin/false +nobody:x:99:99:nobody:/home:/bin/false diff --git a/system/skeleton/etc/profile b/system/skeleton/etc/profile new file mode 100644 index 0000000000..3a97427fdf --- /dev/null +++ b/system/skeleton/etc/profile @@ -0,0 +1,20 @@ +export PATH=/bin:/sbin:/usr/bin:/usr/sbin + +if [ "$PS1" ]; then + if [ "`id -u`" -eq 0 ]; then + export PS1='# ' + else + export PS1='$ ' + fi +fi + +export PAGER='/bin/more ' +export EDITOR='/bin/vi' + +# Source configuration files from /etc/profile.d +for i in /etc/profile.d/*.sh ; do + if [ -r "$i" ]; then + . $i + fi + unset i +done diff --git a/system/skeleton/etc/profile.d/umask.sh b/system/skeleton/etc/profile.d/umask.sh new file mode 100644 index 0000000000..8e71ad5d2a --- /dev/null +++ b/system/skeleton/etc/profile.d/umask.sh @@ -0,0 +1 @@ +umask 022 diff --git a/system/skeleton/etc/protocols b/system/skeleton/etc/protocols new file mode 100644 index 0000000000..cfdd5adb65 --- /dev/null +++ b/system/skeleton/etc/protocols @@ -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 diff --git a/system/skeleton/etc/resolv.conf b/system/skeleton/etc/resolv.conf new file mode 120000 index 0000000000..71f6f96576 --- /dev/null +++ b/system/skeleton/etc/resolv.conf @@ -0,0 +1 @@ +../tmp/resolv.conf \ No newline at end of file diff --git a/system/skeleton/etc/services b/system/skeleton/etc/services new file mode 100644 index 0000000000..b287b63ea0 --- /dev/null +++ b/system/skeleton/etc/services @@ -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 + diff --git a/system/skeleton/etc/shadow b/system/skeleton/etc/shadow new file mode 100644 index 0000000000..06778f13f9 --- /dev/null +++ b/system/skeleton/etc/shadow @@ -0,0 +1,9 @@ +root::10933:0:99999:7::: +daemon:*:10933:0:99999:7::: +bin:*:10933:0:99999:7::: +sys:*:10933:0:99999:7::: +sync:*:10933:0:99999:7::: +mail:*:10933:0:99999:7::: +www-data:*:10933:0:99999:7::: +operator:*:10933:0:99999:7::: +nobody:*:10933:0:99999:7::: diff --git a/system/skeleton/media/.empty b/system/skeleton/media/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/mnt/.empty b/system/skeleton/mnt/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/opt/.empty b/system/skeleton/opt/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/proc/.empty b/system/skeleton/proc/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/root/.empty b/system/skeleton/root/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/run b/system/skeleton/run new file mode 120000 index 0000000000..1c2f433de1 --- /dev/null +++ b/system/skeleton/run @@ -0,0 +1 @@ +tmp \ No newline at end of file diff --git a/system/skeleton/sys/.empty b/system/skeleton/sys/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/tmp/.empty b/system/skeleton/tmp/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/usr/bin/.empty b/system/skeleton/usr/bin/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/usr/lib/.empty b/system/skeleton/usr/lib/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/usr/sbin/.empty b/system/skeleton/usr/sbin/.empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/system/skeleton/var/cache b/system/skeleton/var/cache new file mode 120000 index 0000000000..1431b0e432 --- /dev/null +++ b/system/skeleton/var/cache @@ -0,0 +1 @@ +../tmp \ No newline at end of file diff --git a/system/skeleton/var/lib/misc b/system/skeleton/var/lib/misc new file mode 120000 index 0000000000..f1fde8c107 --- /dev/null +++ b/system/skeleton/var/lib/misc @@ -0,0 +1 @@ +../../tmp \ No newline at end of file diff --git a/system/skeleton/var/lib/pcmcia b/system/skeleton/var/lib/pcmcia new file mode 120000 index 0000000000..f1fde8c107 --- /dev/null +++ b/system/skeleton/var/lib/pcmcia @@ -0,0 +1 @@ +../../tmp \ No newline at end of file diff --git a/system/skeleton/var/lock b/system/skeleton/var/lock new file mode 120000 index 0000000000..1431b0e432 --- /dev/null +++ b/system/skeleton/var/lock @@ -0,0 +1 @@ +../tmp \ No newline at end of file diff --git a/system/skeleton/var/log b/system/skeleton/var/log new file mode 120000 index 0000000000..1431b0e432 --- /dev/null +++ b/system/skeleton/var/log @@ -0,0 +1 @@ +../tmp \ No newline at end of file diff --git a/system/skeleton/var/pcmcia b/system/skeleton/var/pcmcia new file mode 120000 index 0000000000..1431b0e432 --- /dev/null +++ b/system/skeleton/var/pcmcia @@ -0,0 +1 @@ +../tmp \ No newline at end of file diff --git a/system/skeleton/var/run b/system/skeleton/var/run new file mode 120000 index 0000000000..1431b0e432 --- /dev/null +++ b/system/skeleton/var/run @@ -0,0 +1 @@ +../tmp \ No newline at end of file diff --git a/system/skeleton/var/spool b/system/skeleton/var/spool new file mode 120000 index 0000000000..1431b0e432 --- /dev/null +++ b/system/skeleton/var/spool @@ -0,0 +1 @@ +../tmp \ No newline at end of file diff --git a/system/skeleton/var/tmp b/system/skeleton/var/tmp new file mode 120000 index 0000000000..1431b0e432 --- /dev/null +++ b/system/skeleton/var/tmp @@ -0,0 +1 @@ +../tmp \ No newline at end of file diff --git a/toolchain/Config.in b/toolchain/Config.in new file mode 100644 index 0000000000..e0044c14f8 --- /dev/null +++ b/toolchain/Config.in @@ -0,0 +1,57 @@ +menu "Toolchain" + +# Invisible option that makes sure the toolchain package always gets +# built +config BR2_TOOLCHAIN + bool + default y + +# Should be selected for glibc or eglibc +config BR2_TOOLCHAIN_USES_GLIBC + bool + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS + +config BR2_TOOLCHAIN_USES_UCLIBC + bool + +config BR2_TOOLCHAIN_USES_MUSL + bool + select BR2_USE_WCHAR + select BR2_ENABLE_LOCALE + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + +choice + prompt "Toolchain type" + help + Select whether to use the toolchain provided by buildroot + or an external toolchain. + + Some vendors provide toolchains in binary form, some in + source form. + +config BR2_TOOLCHAIN_BUILDROOT + bool "Buildroot toolchain" + depends on !BR2_bfin + select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS + +config BR2_TOOLCHAIN_EXTERNAL + bool "External toolchain" + help + Select if you want to use an existing cross-compiling + toolchain. Buildroot can either download automatically a + toolchain, or use an already installed toolchain. + +endchoice + +source "toolchain/toolchain-buildroot/Config.in" +source "toolchain/toolchain-external/Config.in" +source "toolchain/toolchain-common.in" + +endmenu diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk new file mode 100644 index 0000000000..b3510b6e0b --- /dev/null +++ b/toolchain/helpers.mk @@ -0,0 +1,411 @@ +# This Makefile fragment declares toolchain related helper functions. + +# The copy_toolchain_lib_root function copies a toolchain library and +# its symbolic links from the sysroot directory to the target +# directory. Note that this function is used both by the external +# toolchain logic, and the glibc package, so care must be taken when +# changing this function. +# +# $1: library name +# +copy_toolchain_lib_root = \ + LIB="$(strip $1)"; \ +\ + LIBPATHS=`find $(STAGING_DIR)/ -name "$${LIB}" 2>/dev/null` ; \ + for LIBPATH in $${LIBPATHS} ; do \ + DESTDIR=`echo $${LIBPATH} | sed "s,^$(STAGING_DIR)/,," | xargs dirname` ; \ + mkdir -p $(TARGET_DIR)/$${DESTDIR}; \ + while true ; do \ + LIBNAME=`basename $${LIBPATH}`; \ + LIBDIR=`dirname $${LIBPATH}` ; \ + LINKTARGET=`readlink $${LIBPATH}` ; \ + rm -fr $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \ + if test -h $${LIBPATH} ; then \ + ln -sf `basename $${LINKTARGET}` $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME} ; \ + elif test -f $${LIBPATH}; then \ + $(INSTALL) -D -m0755 $${LIBPATH} $(TARGET_DIR)/$${DESTDIR}/$${LIBNAME}; \ + else \ + exit -1; \ + fi; \ + if test -z "$${LINKTARGET}" ; then \ + break ; \ + fi ; \ + LIBPATH="`readlink -f $${LIBPATH}`"; \ + done; \ + done + +# +# Copy the full external toolchain sysroot directory to the staging +# dir. The operation of this function is rendered a little bit +# complicated by the support for multilib toolchains. +# +# We start by copying etc, lib, sbin and usr from the sysroot of the +# selected architecture variant (as pointed by ARCH_SYSROOT_DIR). This +# allows to import into the staging directory the C library and +# companion libraries for the correct architecture variant. We +# explictly only copy etc, lib, sbin and usr since other directories +# might exist for other architecture variants (on Codesourcery +# toolchain, the sysroot for the default architecture variant contains +# the armv4t and thumb2 subdirectories, which are the sysroot for the +# corresponding architecture variants), and we don't want to import +# them. +# +# Then, we need to support two types of multilib toolchains: +# +# - The toolchains that have nested sysroots: a main sysroot, and +# then additional sysroots available as subdirectories of the main +# one. This is for example used by Sourcery CodeBench toolchains. +# +# - The toolchains that have side-by-side sysroots. Each sysroot is a +# complete one, they simply leave one next to each other. This is +# for example used by MIPS Codescape toolchains. +# +# So, we first detect if the selected architecture variant is not the +# default one (i.e, if SYSROOT_DIR != ARCH_SYSROOT_DIR). +# +# If we are in the situation of a nested sysroot, we: +# +# * If needed, import the header files from the default architecture +# variant. Header files are typically shared between the sysroots +# for the different architecture variants. If we use the +# non-default one, header files were not copied by the previous +# step, so we copy them here from the sysroot of the default +# architecture variant. +# +# * Create a symbolic link that matches the name of the subdirectory +# for the architecture variant in the original sysroot. This is +# required as the compiler will by default look in +# sysroot_dir/arch_variant/ for libraries and headers, when the +# non-default architecture variant is used. Without this, the +# compiler fails to find libraries and headers. +# +# If we are in the situation of a side-by-side sysroot, we: +# +# * Create a symbolic link +# +# Finally, some toolchains (i.e Linaro binary toolchains) store +# support libraries (libstdc++, libgcc_s) outside of the sysroot, so +# we simply copy all the libraries from the "support lib directory" +# into our sysroot. +# +# Note that the 'locale' directories are not copied. They are huge +# (400+MB) in CodeSourcery toolchains, and they are not really useful. +# +# $1: main sysroot directory of the toolchain +# $2: arch specific sysroot directory of the toolchain +# $3: arch specific subdirectory in the sysroot +# $4: directory of libraries ('lib', 'lib32' or 'lib64') +# $5: support lib directories (for toolchains storing libgcc_s, +# libstdc++ and other gcc support libraries outside of the +# sysroot) +copy_toolchain_sysroot = \ + SYSROOT_DIR="$(strip $1)"; \ + ARCH_SYSROOT_DIR="$(strip $2)"; \ + ARCH_SUBDIR="$(strip $3)"; \ + ARCH_LIB_DIR="$(strip $4)" ; \ + SUPPORT_LIB_DIR="$(strip $5)" ; \ + for i in etc $${ARCH_LIB_DIR} sbin usr usr/$${ARCH_LIB_DIR}; do \ + if [ -d $${ARCH_SYSROOT_DIR}/$$i ] ; then \ + rsync -au --chmod=u=rwX,go=rX --exclude 'usr/lib/locale' \ + --include '/libexec*/' --exclude '/lib*/' \ + $${ARCH_SYSROOT_DIR}/$$i/ $(STAGING_DIR)/$$i/ ; \ + fi ; \ + done ; \ + SYSROOT_DIR_CANON=`readlink -f $${SYSROOT_DIR}` ; \ + ARCH_SYSROOT_DIR_CANON=`readlink -f $${ARCH_SYSROOT_DIR}` ; \ + if [ $${SYSROOT_DIR_CANON} != $${ARCH_SYSROOT_DIR_CANON} ] ; then \ + relpath="./" ; \ + if [ $${ARCH_SYSROOT_DIR_CANON:0:$${\#SYSROOT_DIR_CANON}} == $${SYSROOT_DIR_CANON} ] ; then \ + if [ ! -d $${ARCH_SYSROOT_DIR}/usr/include ] ; then \ + cp -a $${SYSROOT_DIR}/usr/include $(STAGING_DIR)/usr ; \ + fi ; \ + mkdir -p `dirname $(STAGING_DIR)/$${ARCH_SUBDIR}` ; \ + nbslashs=`printf $${ARCH_SUBDIR} | sed 's%[^/]%%g' | wc -c` ; \ + for slash in `seq 1 $${nbslashs}` ; do \ + relpath=$${relpath}"../" ; \ + done ; \ + ln -s $${relpath} $(STAGING_DIR)/$${ARCH_SUBDIR} ; \ + echo "Symlinking $(STAGING_DIR)/$${ARCH_SUBDIR} -> $${relpath}" ; \ + elif [ `dirname $${ARCH_SYSROOT_DIR_CANON}` == `dirname $${SYSROOT_DIR_CANON}` ] ; then \ + ln -snf $${relpath} $(STAGING_DIR)/`basename $${ARCH_SYSROOT_DIR_CANON}` ; \ + echo "Symlinking $(STAGING_DIR)/`basename $${ARCH_SYSROOT_DIR_CANON}` -> $${relpath}" ; \ + fi ; \ + fi ; \ + if test -n "$${SUPPORT_LIB_DIR}" ; then \ + cp -a $${SUPPORT_LIB_DIR}/* $(STAGING_DIR)/lib/ ; \ + fi ; \ + find $(STAGING_DIR) -type d | xargs chmod 755 + +# +# Check the specified kernel headers version actually matches the +# version in the toolchain. +# +# $1: sysroot directory +# $2: kernel version string, in the form: X.Y +# +check_kernel_headers_version = \ + if ! support/scripts/check-kernel-headers.sh $(1) $(2); then \ + exit 1; \ + fi + +# +# Check the specific gcc version actually matches the version in the +# toolchain +# +# $1: path to gcc +# $2: expected gcc version +# +# Some details about the sed expression: +# - 1!d +# - delete if not line 1 +# +# - s/^[^)]+\) ([^[:space:]]+).*/\1/ +# - eat all until the first ')' character followed by a space +# - match as many non-space chars as possible +# - eat all the remaining chars on the line +# - replace by the matched expression +# +check_gcc_version = \ + expected_version="$(strip $2)" ; \ + if [ -z "$${expected_version}" ]; then \ + printf "Internal error, gcc version unknown (no GCC_AT_LEAST_X_Y selected)\n"; \ + exit 1 ; \ + fi; \ + real_version=`$(1) --version | sed -r -e '1!d; s/^[^)]+\) ([^[:space:]]+).*/\1/;'` ; \ + if [[ ! "$${real_version}" =~ ^$${expected_version}\. ]] ; then \ + printf "Incorrect selection of gcc version: expected %s.x, got %s\n" \ + "$${expected_version}" "$${real_version}" ; \ + exit 1 ; \ + fi + +# +# Check the availability of a particular glibc feature. This function +# is used to check toolchain options that are always supported by +# glibc, so we simply check that the corresponding option is properly +# enabled. +# +# $1: Buildroot option name +# $2: feature description +# +check_glibc_feature = \ + if [ "$($(1))" != "y" ] ; then \ + echo "$(2) available in C library, please enable $(1)" ; \ + exit 1 ; \ + fi + +# +# Check the availability of RPC support in a glibc toolchain +# +# $1: sysroot directory +# +check_glibc_rpc_feature = \ + IS_IN_LIBC=`test -f $(1)/usr/include/rpc/rpc.h && echo y` ; \ + if [ "$(BR2_TOOLCHAIN_HAS_NATIVE_RPC)" != "y" -a "$${IS_IN_LIBC}" = "y" ] ; then \ + echo "RPC support available in C library, please enable BR2_TOOLCHAIN_EXTERNAL_INET_RPC" ; \ + exit 1 ; \ + fi ; \ + if [ "$(BR2_TOOLCHAIN_HAS_NATIVE_RPC)" = "y" -a "$${IS_IN_LIBC}" != "y" ] ; then \ + echo "RPC support not available in C library, please disable BR2_TOOLCHAIN_EXTERNAL_INET_RPC" ; \ + exit 1 ; \ + fi + +# +# Check the correctness of a glibc external toolchain configuration. +# 1. Check that the C library selected in Buildroot matches the one +# of the external toolchain +# 2. Check that all the C library-related features are enabled in the +# config, since glibc always supports all of them +# +# $1: sysroot directory +# +check_glibc = \ + SYSROOT_DIR="$(strip $1)"; \ + if test `find $${SYSROOT_DIR}/ -maxdepth 2 -name 'ld-linux*.so.*' -o -name 'ld.so.*' -o -name 'ld64.so.*' | wc -l` -eq 0 ; then \ + echo "Incorrect selection of the C library"; \ + exit -1; \ + fi; \ + $(call check_glibc_feature,BR2_USE_MMU,MMU support) ;\ + $(call check_glibc_rpc_feature,$${SYSROOT_DIR}) + +# +# Check that the selected C library really is musl +# +# $1: sysroot directory +check_musl = \ + SYSROOT_DIR="$(strip $1)"; \ + if test ! -f $${SYSROOT_DIR}/lib/libc.so -o -e $${SYSROOT_DIR}/lib/libm.so ; then \ + echo "Incorrect selection of the C library" ; \ + exit -1; \ + fi + +# +# Check the conformity of Buildroot configuration with regard to the +# uClibc configuration of the external toolchain, for a particular +# feature. +# +# If 'Buildroot option name' ($2) is empty it means the uClibc option +# is mandatory. +# +# $1: uClibc macro name +# $2: Buildroot option name +# $3: uClibc config file +# $4: feature description +# +check_uclibc_feature = \ + IS_IN_LIBC=`grep -q "\#define $(1) 1" $(3) && echo y` ; \ + if [ -z "$(2)" ] ; then \ + if [ "$${IS_IN_LIBC}" != "y" ] ; then \ + echo "$(4) not available in C library, toolchain unsuitable for Buildroot" ; \ + exit 1 ; \ + fi ; \ + else \ + if [ "$($(2))" != "y" -a "$${IS_IN_LIBC}" = "y" ] ; then \ + echo "$(4) available in C library, please enable $(2)" ; \ + exit 1 ; \ + fi ; \ + if [ "$($(2))" = "y" -a "$${IS_IN_LIBC}" != "y" ] ; then \ + echo "$(4) not available in C library, please disable $(2)" ; \ + exit 1 ; \ + fi ; \ + fi + +# +# Check the correctness of a uclibc external toolchain configuration +# 1. Check that the C library selected in Buildroot matches the one +# of the external toolchain +# 2. Check that the features enabled in the Buildroot configuration +# match the features available in the uClibc of the external +# toolchain +# +# $1: sysroot directory +# +check_uclibc = \ + SYSROOT_DIR="$(strip $1)"; \ + if ! test -f $${SYSROOT_DIR}/usr/include/bits/uClibc_config.h ; then \ + echo "Incorrect selection of the C library"; \ + exit -1; \ + fi; \ + UCLIBC_CONFIG_FILE=$${SYSROOT_DIR}/usr/include/bits/uClibc_config.h ; \ + $(call check_uclibc_feature,__ARCH_USE_MMU__,BR2_USE_MMU,$${UCLIBC_CONFIG_FILE},MMU support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_LFS__,,$${UCLIBC_CONFIG_FILE},Large file support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_IPV6__,,$${UCLIBC_CONFIG_FILE},IPv6 support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_RPC__,BR2_TOOLCHAIN_HAS_NATIVE_RPC,$${UCLIBC_CONFIG_FILE},RPC support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_LOCALE__,BR2_ENABLE_LOCALE,$${UCLIBC_CONFIG_FILE},Locale support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_WCHAR__,BR2_USE_WCHAR,$${UCLIBC_CONFIG_FILE},Wide char support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_THREADS__,BR2_TOOLCHAIN_HAS_THREADS,$${UCLIBC_CONFIG_FILE},Thread support) ;\ + $(call check_uclibc_feature,__PTHREADS_DEBUG_SUPPORT__,BR2_TOOLCHAIN_HAS_THREADS_DEBUG,$${UCLIBC_CONFIG_FILE},Thread debugging support) ;\ + $(call check_uclibc_feature,__UCLIBC_HAS_THREADS_NATIVE__,BR2_TOOLCHAIN_HAS_THREADS_NPTL,$${UCLIBC_CONFIG_FILE},NPTL thread support) + +# +# Check that the Buildroot configuration of the ABI matches the +# configuration of the external toolchain. +# +# $1: cross-gcc path +# $2: cross-readelf path +# +check_arm_abi = \ + __CROSS_CC=$(strip $1) ; \ + __CROSS_READELF=$(strip $2) ; \ + EXT_TOOLCHAIN_TARGET=`LANG=C $${__CROSS_CC} -v 2>&1 | grep ^Target | cut -f2 -d ' '` ; \ + if ! echo $${EXT_TOOLCHAIN_TARGET} | grep -qE 'eabi(hf)?$$' ; then \ + echo "External toolchain uses the unsuported OABI" ; \ + exit 1 ; \ + fi ; \ + if ! echo 'int main(void) {}' | $${__CROSS_CC} -x c -o $(BUILD_DIR)/.br-toolchain-test.tmp - ; then \ + rm -f $(BUILD_DIR)/.br-toolchain-test.tmp*; \ + abistr_$(BR2_ARM_EABI)='EABI'; \ + abistr_$(BR2_ARM_EABIHF)='EABIhf'; \ + echo "Incorrect ABI setting: $${abistr_y} selected, but toolchain is incompatible"; \ + exit 1 ; \ + fi ; \ + rm -f $(BUILD_DIR)/.br-toolchain-test.tmp* + +# +# Check that the external toolchain supports C++ +# +# $1: cross-g++ path +# +check_cplusplus = \ + __CROSS_CXX=$(strip $1) ; \ + $${__CROSS_CXX} -v > /dev/null 2>&1 ; \ + if test $$? -ne 0 ; then \ + echo "C++ support is selected but is not available in external toolchain" ; \ + exit 1 ; \ + fi + +# +# Check that the cross-compiler given in the configuration exists +# +# $1: cross-gcc path +# +check_cross_compiler_exists = \ + __CROSS_CC=$(strip $1) ; \ + $${__CROSS_CC} -v > /dev/null 2>&1 ; \ + if test $$? -ne 0 ; then \ + echo "Cannot execute cross-compiler '$${__CROSS_CC}'" ; \ + exit 1 ; \ + fi + +# +# Check for toolchains known not to work with Buildroot. +# - For the Angstrom toolchains, we check by looking at the vendor part of +# the host tuple. +# - Exclude distro-class toolchains which are not relocatable. +# - Exclude broken toolchains which return "libc.a" with -print-file-name. +# - Exclude toolchains which doesn't support --sysroot option. +# +# $1: cross-gcc path +# +check_unusable_toolchain = \ + __CROSS_CC=$(strip $1) ; \ + vendor=`$${__CROSS_CC} -dumpmachine | cut -f2 -d'-'` ; \ + if test "$${vendor}" = "angstrom" ; then \ + echo "Angstrom toolchains are not pure toolchains: they contain" ; \ + echo "many other libraries than just the C library, which makes" ; \ + echo "them unsuitable as external toolchains for build systems" ; \ + echo "such as Buildroot." ; \ + exit 1 ; \ + fi; \ + with_sysroot=`$${__CROSS_CC} -v 2>&1 |sed -r -e '/.* --with-sysroot=([^[:space:]]+)[[:space:]].*/!d; s//\1/'`; \ + if test "$${with_sysroot}" = "/" ; then \ + echo "Distribution toolchains are unsuitable for use by Buildroot," ; \ + echo "as they were configured in a way that makes them non-relocatable,"; \ + echo "and contain a lot of pre-built libraries that would conflict with"; \ + echo "the ones Buildroot wants to build."; \ + exit 1; \ + fi; \ + libc_a_path=`$${__CROSS_CC} -print-file-name=libc.a` ; \ + if test "$${libc_a_path}" = "libc.a" ; then \ + echo "Unable to detect the toolchain sysroot, Buildroot cannot use this toolchain." ; \ + exit 1 ; \ + fi ; \ + sysroot_dir="$(call toolchain_find_sysroot,$${__CROSS_CC})" ; \ + if test -z "$${sysroot_dir}" ; then \ + echo "External toolchain doesn't support --sysroot. Cannot use." ; \ + exit 1 ; \ + fi + +# +# Check if the toolchain has SSP (stack smashing protector) support +# +# $1: cross-gcc path +# +check_toolchain_ssp = \ + __CROSS_CC=$(strip $1) ; \ + __HAS_SSP=`echo 'void main(){}' | $${__CROSS_CC} -fstack-protector -x c - -o $(BUILD_DIR)/.br-toolchain-test.tmp >/dev/null 2>&1 && echo y` ; \ + if [ "$(BR2_TOOLCHAIN_HAS_SSP)" != "y" -a "$${__HAS_SSP}" = "y" ] ; then \ + echo "SSP support available in this toolchain, please enable BR2_TOOLCHAIN_EXTERNAL_HAS_SSP" ; \ + exit 1 ; \ + fi ; \ + if [ "$(BR2_TOOLCHAIN_HAS_SSP)" = "y" -a "$${__HAS_SSP}" != "y" ] ; then \ + echo "SSP support not available in this toolchain, please disable BR2_TOOLCHAIN_EXTERNAL_HAS_SSP" ; \ + exit 1 ; \ + fi ; \ + rm -f $(BUILD_DIR)/.br-toolchain-test.tmp* + +# +# Generate gdbinit file for use with Buildroot +# +gen_gdbinit_file = \ + mkdir -p $(STAGING_DIR)/usr/share/buildroot/ ; \ + echo "set sysroot $(STAGING_DIR)" > $(STAGING_DIR)/usr/share/buildroot/gdbinit diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in new file mode 100644 index 0000000000..0c4080111a --- /dev/null +++ b/toolchain/toolchain-buildroot/Config.in @@ -0,0 +1,123 @@ +# Config entries for internal toolchain backend + +if BR2_TOOLCHAIN_BUILDROOT + +config BR2_TOOLCHAIN_BUILDROOT_VENDOR + string "custom toolchain vendor name" + default "buildroot" + help + This option allows to customize the "vendor" part of the + toolchain tuple, where the toolchain tuple has the form + ---. The default value, "buildroot", + is fine for most cases, except in very specific situations + where gcc might make different decisions based on the vendor + part of the tuple. The value "unknown" is not allowed, as the + cross-compiling toolchain might then be confused with the + native toolchain when the target and host architecture are + identical. The value can not be empty either. + + If you're not sure, just leave the default "buildroot" value. + +source "package/linux-headers/Config.in.host" + +choice + prompt "C library" + default BR2_TOOLCHAIN_UCLIBC + default BR2_TOOLCHAIN_BUILDROOT_GLIBC if BR2_aarch64 || BR2_aarch64_be \ + || BR2_microblaze || BR2_powerpc64 + +config BR2_TOOLCHAIN_BUILDROOT_UCLIBC + bool "uClibc" + select BR2_TOOLCHAIN_USES_UCLIBC + depends on BR2_arcle || BR2_arceb || BR2_arm || BR2_armeb || \ + BR2_bfin || BR2_i386 || BR2_m68k || \ + BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_powerpc || BR2_sh2a || BR2_sh4 || BR2_sh4eb || \ + BR2_sparc || BR2_xtensa || BR2_x86_64 + # Unsupported for MIPS R6 + depends on !BR2_mips_32r6 && !BR2_mips_64r6 + help + This option selects uClibc as the C library for the + cross-compilation toolchain. + + http://uclibc.org + +config BR2_TOOLCHAIN_BUILDROOT_EGLIBC + bool "eglibc" + depends on BR2_arm || BR2_armeb || BR2_aarch64 || \ + BR2_aarch64_be || BR2_i386 || BR2_mips || \ + BR2_mipsel || BR2_mips64 || BR2_mips64el || \ + BR2_powerpc || BR2_sh || BR2_sh64 || \ + BR2_sparc || BR2_x86_64 || BR2_microblaze || \ + BR2_powerpc64 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + depends on BR2_DEPRECATED_SINCE_2015_08 + select BR2_TOOLCHAIN_USES_GLIBC + # our eglibc.mk enables RPC support + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + This option selects eglibc as the C library for the + cross-compilation toolchain. + + http://eglibc.org + +config BR2_TOOLCHAIN_BUILDROOT_GLIBC + bool "glibc" + depends on BR2_arm || BR2_armeb || BR2_aarch64 || \ + BR2_aarch64_be || BR2_i386 || BR2_mips || \ + BR2_mipsel || BR2_mips64 || BR2_mips64el|| \ + BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || \ + BR2_sh || BR2_sh64 || BR2_sparc64 || \ + BR2_x86_64 || BR2_microblaze || BR2_nios2 + depends on BR2_USE_MMU + depends on !BR2_STATIC_LIBS + depends on !BR2_powerpc_SPE + select BR2_TOOLCHAIN_USES_GLIBC + # our glibc.mk enables RPC support + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + help + This option selects glibc as the C library for the + cross-compilation toolchain. + + http://www.gnu.org/software/libc/ + +comment "(e)glibc only available with shared lib support" + depends on BR2_USE_MMU + depends on BR2_STATIC_LIBS + +config BR2_TOOLCHAIN_BUILDROOT_MUSL + bool "musl (experimental)" + depends on BR2_aarch64 || BR2_arm || BR2_armeb || BR2_i386 || \ + BR2_microblaze || BR2_mips || BR2_mipsel || BR2_powerpc || \ + BR2_sh || BR2_x86_64 + depends on !BR2_powerpc_SPE # not supported, build breaks + # Unsupported for MIPS R6 + depends on !BR2_mips_32r6 && !BR2_mips_64r6 + # sh2 nommu is supported by musl, but we don't have support + # for it in Buildroot. + depends on BR2_USE_MMU + select BR2_TOOLCHAIN_USES_MUSL + help + This option selects musl as the C library for the + cross-compilation toolchain. + +endchoice + +config BR2_TOOLCHAIN_BUILDROOT_LIBC + string + default "uclibc" if BR2_TOOLCHAIN_BUILDROOT_UCLIBC + # Both glibc and eglibc are handled by the package called + # 'glibc' + default "glibc" if BR2_TOOLCHAIN_BUILDROOT_EGLIBC + default "glibc" if BR2_TOOLCHAIN_BUILDROOT_GLIBC + default "musl" if BR2_TOOLCHAIN_BUILDROOT_MUSL + +source "package/linux-headers/Config.in" +source "package/musl/Config.in" +source "package/uclibc/Config.in" +source "package/glibc/Config.in" +source "package/binutils/Config.in.host" +source "package/gcc/Config.in.host" +source "package/elf2flt/Config.in.host" +endif diff --git a/toolchain/toolchain-buildroot/toolchain-buildroot.mk b/toolchain/toolchain-buildroot/toolchain-buildroot.mk new file mode 100644 index 0000000000..b30cc332d2 --- /dev/null +++ b/toolchain/toolchain-buildroot/toolchain-buildroot.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# toolchain-buildroot +# +################################################################################ + +BR_LIBC = $(call qstrip,$(BR2_TOOLCHAIN_BUILDROOT_LIBC)) + +# Triggering the build of the host-gcc-final will automatically do the +# build of binutils, uClibc, kernel headers and all the intermediate +# gcc steps. + +TOOLCHAIN_BUILDROOT_DEPENDENCIES = host-gcc-final + +TOOLCHAIN_BUILDROOT_ADD_TOOLCHAIN_DEPENDENCY = NO + +$(eval $(virtual-package)) diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in new file mode 100644 index 0000000000..be02484a76 --- /dev/null +++ b/toolchain/toolchain-common.in @@ -0,0 +1,414 @@ +# Generic toolchain options + +# we want gdb config in the middle of both source and external +# toolchains, but mconf won't let us source the same file twice, +# so put it here instead +source "package/gdb/Config.in.host" + +# https://sourceware.org/bugzilla/show_bug.cgi?id=19405 +config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 + bool + +config BR2_TOOLCHAIN_HAS_NATIVE_RPC + bool + +config BR2_USE_WCHAR + bool + +config BR2_ENABLE_LOCALE + bool + +config BR2_INSTALL_LIBSTDCPP + bool + +config BR2_TOOLCHAIN_HAS_THREADS + bool + +config BR2_TOOLCHAIN_HAS_THREADS_DEBUG + bool + +config BR2_TOOLCHAIN_HAS_THREADS_NPTL + bool + +config BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS + bool + +config BR2_TOOLCHAIN_HAS_SSP + bool + +config BR2_ENABLE_LOCALE_PURGE + bool "Purge unwanted locales" + help + Explicitly specify what locales to install on target. If N + then all locales supported by packages are installed. + +config BR2_ENABLE_LOCALE_WHITELIST + string "Locales to keep" + default "C en_US de fr" + depends on BR2_ENABLE_LOCALE_PURGE + help + Whitespace seperated list of locales to allow on target. + Locales not listed here will be removed from the target. + See 'locale -a' on your host for a list of locales available + on your build host, or have a look in /usr/share/locale in + the target file system for available locales. + + Notice that listing a locale here doesn't guarantee that it + will be available on the target - That purely depends on the + support for that locale in the selected packages. + +config BR2_GENERATE_LOCALE + string "Generate locale data" + default "" + depends on \ + (BR2_TOOLCHAIN_BUILDROOT_UCLIBC && BR2_ENABLE_LOCALE) || \ + BR2_TOOLCHAIN_USES_GLIBC + help + Generate support for a list of locales. Locales can be + specified with or without encoding, when no encoding is + specified, UTF-8 is assumed. Examples of locales: en_US, + fr_FR.UTF-8. + +config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY + bool "Copy gconv libraries" + depends on BR2_TOOLCHAIN_USES_GLIBC + help + The gconv libraries are used to convert between different + character sets (charsets). + + Say 'y' if you need to store and/or display different charsets. + +config BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST + string "Gconv libraries to copy" + depends on BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY + help + Set to the list of gconv libraries to copy. + Leave empty to copy all gconv libraries. + + Specify only the basename of the libraries, leave + out the .so extension. Eg.: + IBM850 ISO8859-15 UNICODE + + Note: the full set of gconv libs are ~8MiB (on ARM). + +# glibc and eglibc directly include gettext, so a separatly compiled +# gettext isn't needed and shouldn't be built to avoid conflicts. Some +# packages always need gettext, other packages only need gettext when +# locale support is enabled. See the documentation for how packages +# should rely on the following two options. + +config BR2_NEEDS_GETTEXT + bool + default y if BR2_TOOLCHAIN_USES_UCLIBC + +config BR2_NEEDS_GETTEXT_IF_LOCALE + bool + default y if (BR2_NEEDS_GETTEXT && BR2_ENABLE_LOCALE) + +config BR2_USE_MMU + bool "Enable MMU support" if BR2_ARCH_HAS_MMU_OPTIONAL + default y if BR2_ARCH_HAS_MMU_OPTIONAL || BR2_ARCH_HAS_MMU_MANDATORY + help + If your target has a MMU, you should say Y here. If you + are unsure, just say Y. + +config BR2_TARGET_OPTIMIZATION + string "Target Optimizations" + default "" + help + Optimizations to use when building for the target host. + NOTE: gcc optimization level is defined in build options. + +config BR2_TARGET_LDFLAGS + string "Target linker options" + help + Extra options to pass to the linker when building for the target. + + Note that options with a '$' sign (eg. -Wl,-rpath='$ORIGIN/../lib') + are not supported. + +config BR2_ECLIPSE_REGISTER + bool "Register toolchain within Eclipse Buildroot plug-in" + help + This options tells Buildroot to generate the necessary + configuration files to make your toolchain appear within + Eclipse, through the Eclipse Buildroot plugin. + +# Options for packages to depend on, if they require at least a +# specific version of the kernel headers. +# Toolchains should choose the adequate option (ie. the highest +# version, not all of them). +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + bool + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 + +config BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 + bool + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 + +# This order guarantees that the highest version is set, as kconfig +# stops affecting a value on the first matching default. +config BR2_TOOLCHAIN_HEADERS_AT_LEAST + string + default "4.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 + default "4.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 + default "4.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 + default "4.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 + default "4.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 + default "4.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + default "3.19" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + default "3.18" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 + default "3.17" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + default "3.16" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + default "3.15" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 + default "3.14" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 + default "3.13" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + default "3.12" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + default "3.11" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 + default "3.10" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + default "3.9" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 + default "3.8" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 + default "3.7" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + default "3.6" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 + default "3.5" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 + default "3.4" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + default "3.3" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 + default "3.2" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + default "3.1" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + default "3.0" if BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + default "2.6" + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 + bool + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_5 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_TOOLCHAIN_GCC_AT_LEAST_6 + bool + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + +# This order guarantees that the highest version is set, as kconfig +# stops affecting a value on the first matching default. +config BR2_TOOLCHAIN_GCC_AT_LEAST + string + default "6" if BR2_TOOLCHAIN_GCC_AT_LEAST_6 + default "5" if BR2_TOOLCHAIN_GCC_AT_LEAST_5 + default "4.9" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + default "4.8" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + default "4.7" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + default "4.6" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + default "4.5" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + default "4.4" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 + default "4.3" if BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 + +config BR2_TOOLCHAIN_HAS_SYNC_1 + bool + default y + depends on !BR2_bfin + depends on !BR2_microblaze + depends on !BR2_sparc + depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) + +config BR2_TOOLCHAIN_HAS_SYNC_2 + bool + default y if BR2_TOOLCHAIN_HAS_SYNC_1 + +config BR2_TOOLCHAIN_HAS_SYNC_4 + bool + default y + depends on !BR2_sparc + depends on !(BR2_arc && !BR2_ARC_ATOMIC_EXT) + +# The availability of __sync for 8-byte types on ARM is somewhat +# complicated: +# +# - It appeared in gcc starting with gcc 4.7. +# +# - On ARMv7, there is no problem, it can be directly implemented in +# userspace. +# +# - On < ARMv7, it requires help from the kernel. Unfortunately, the +# libgcc code implementing 8-byte __sync with the help from the +# kernel calls __write() when a failure occurs, which is a function +# internal to glibc, not available in uClibc and musl. This means +# that the 8-byte __sync operations are not available on < ARMv7 +# with uClibc and musl. This problem was fixed as part of gcc +# PR68059, which was backported to the gcc 5 branch, but isn't yet +# part of any gcc 5.x release. +# +config BR2_TOOLCHAIN_ARM_HAS_SYNC_8 + bool + default y + depends on BR2_arm || BR2_armeb + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_ARM_CPU_ARMV7A + +# 8-byte intrinsics available on most x86 CPUs, except a few old ones +config BR2_TOOLCHAIN_X86_HAS_SYNC_8 + bool + default y + depends on BR2_i386 + depends on !BR2_x86_i486 + depends on !BR2_x86_c3 + depends on !BR2_x86_winchip_c6 + depends on !BR2_x86_winchip2 + +# 8-byte intrinsics available: +# - On all 64 bits architecture +# - On a certain combinations of ARM platforms +# - On certain x86 32 bits CPUs +config BR2_TOOLCHAIN_HAS_SYNC_8 + bool + default y if BR2_ARCH_IS_64 + default y if BR2_TOOLCHAIN_ARM_HAS_SYNC_8 + default y if BR2_TOOLCHAIN_X86_HAS_SYNC_8 + +# libatomic is available since gcc 4.8, when thread support is +# enabled. +config BR2_TOOLCHAIN_HAS_LIBATOMIC + bool + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 && \ + BR2_TOOLCHAIN_HAS_THREADS + +# __atomic intrinsics are available: +# - with gcc 4.8, either through built-ins or libatomic, on all +# architectures. Since we don't want to separate the cases where +# libatomic is needed vs. not needed, we simplify thing and only +# support situations where libatomic is available, even if on some +# architectures libatomic is not strictly needed as all __atomic +# intrinsics might be built-in. The only case where libatomic is +# missing entirely is when the toolchain does not have support for +# threads. However, a package that does not need threads but still +# uses atomics is quite a corner case, which does not warrant the +# added complexity. +# - with gcc 4.7, libatomic did not exist, so only built-ins are +# available. This means that __atomic can only be used in a subset +# of the architectures +config BR2_TOOLCHAIN_HAS_ATOMIC + bool + default y if BR2_TOOLCHAIN_HAS_LIBATOMIC + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_arm + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_armeb + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_xtensa + default y if BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 && BR2_ARCH_IS_64 diff --git a/toolchain/toolchain-external/Config.in b/toolchain/toolchain-external/Config.in new file mode 100644 index 0000000000..8a8195d57e --- /dev/null +++ b/toolchain/toolchain-external/Config.in @@ -0,0 +1,1062 @@ +if BR2_TOOLCHAIN_EXTERNAL + +choice + prompt "Toolchain" + +comment "(e)glibc toolchains only available with shared lib support" + depends on BR2_STATIC_LIBS + +comment "Linaro toolchains available for Cortex-A + EABIhf" + depends on BR2_arm || BR2_armeb + depends on !BR2_ARM_CPU_ARMV7A || !BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + +# Note: we use the same symbol for both Linaro toolchains. +# Since they have different dependencies (the host), we can +# give them different prompts and different help texts. +config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM + bool "Linaro ARM 2014.09" + depends on BR2_arm + depends on BR2_ARM_CPU_ARMV7A + depends on BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Linaro toolchain for the ARM architecture. It uses Linaro + GCC 2014.09 (based on gcc 4.9), Linaro GDB 2013.10 (based on + GDB 7.6), eglibc 2.19, Binutils 2014.09 (based on 2.24). It + generates code that runs on all Cortex-A profile devices, + but tuned for the Cortex-A9. The code generated is Thumb 2, + with the hard floating point calling convention, and uses + the VFPv3-D16 FPU instructions. + +# See the note above. +config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM + bool "Linaro ARM 2016.02" + depends on BR2_arm + depends on BR2_ARM_CPU_ARMV7A + depends on BR2_HOSTARCH = "x86_64" + depends on BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + help + Linaro toolchain for the ARM architecture. It uses Linaro + GCC 2016.02 (based on gcc 5.3), Linaro GDB 2016.02 (based on + GDB 7.10), glibc 2.21, Binutils 2015.10 (based on 2.25). It + generates code that runs on all Cortex-A profile devices, + but tuned for the Cortex-A9. The code generated is Thumb 2, + with the hard floating point calling convention, and uses + the VFPv3-D16 FPU instructions. + +# See the note above. +config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB + bool "Linaro armeb 2014.09" + depends on BR2_armeb + depends on BR2_ARM_CPU_ARMV7A + depends on BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Linaro toolchain for the ARM big endian architecture. It + uses Linaro GCC 2014.09 (based on gcc 4.9), Linaro GDB + 2013.10 (based on GDB 7.6), eglibc 2.19, Binutils 2014.09 + (based on 2.24). It generates code that runs on all Cortex-A + profile devices, but tuned for the Cortex-A9. The code + generated is Thumb 2, with the hard floating point calling + convention, and uses the VFPv3-D16 FPU instructions. + +# See the note above. +config BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB + bool "Linaro armeb 2016.02" + depends on BR2_armeb + depends on BR2_ARM_CPU_ARMV7A + depends on BR2_HOSTARCH = "x86_64" + depends on BR2_ARM_EABIHF + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + help + Linaro toolchain for the ARM big endian architecture. It + uses Linaro GCC 2016.02 (based on gcc 5.3), Linaro GDB + 2016.02 (based on GDB 7.10), glibc 2.21, Binutils 2015.10 + (based on 2.25). It generates code that runs on all Cortex-A + profile devices, but tuned for the Cortex-A9. The code + generated is Thumb 2, with the hard floating point calling + convention, and uses the VFPv3-D16 FPU instructions. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM + bool "Sourcery CodeBench ARM 2014.05" + depends on BR2_arm + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_EABI + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + help + Sourcery CodeBench toolchain for the ARM architecture, from + Mentor Graphics. It uses gcc 4.8.3, binutils 2.24.51, glibc + 2.18 and gdb 7.7.50, kernel headers 3.13. It has support + for the following variants: + - ARMv5TE, little endian, soft-float, glibc + Select ARM926T, ARM10T, XScale or another ARMv5 core + Select BR2_SOFT_FLOAT + - ARMv4T, little endian, soft-float, glibc + Select ARM720T, ARM920T, ARM922T or another ARMv4 core + Select BR2_SOFT_FLOAT + - ARMv7-A, Thumb 2, little endian, soft-float, glibc + Select Cortex-A8, Cortex-A9 or another ARMv7-A core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mthumb + +comment "Sourcery CodeBench toolchains available for the EABI ABI" + depends on BR2_arm + depends on !BR2_ARM_EABI + depends on !BR2_STATIC_LIBS + +config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A + bool "Arago ARMv7 2011.09" + depends on BR2_arm + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_ARM_CPU_ARMV7A + depends on BR2_ARM_EABI + depends on BR2_ARM_CPU_HAS_VFPV3 + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + # kernel headers: 2.6.31 + help + Texas Instruments Arago 2011.09 toolchain, with gcc 4.5.3, + binutils 2.20.1, glibc 2.12, gdb 7.2. + + This toolchain uses -mfloat-abi=softfp (i.e can use FPU + instructions, but passes floating point function arguments + in integer registers), and requires a VFPv3 floating point + unit to work properly. This unit is available on most + Cortex-A ARM processors, but not all. + +config BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE + bool "Arago ARMv5 2011.09" + depends on BR2_arm + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_ARM_CPU_ARMV4 + depends on BR2_ARM_EABI + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + # kernel headers: 2.6.31 + help + Texas Instruments Arago ARMv5 2011.09 toolchain, with gcc + 4.5.3, binutils 2.20.1, glibc 2.12, gdb 7.2. + + This toolchain uses software-floating point. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS + bool "Sourcery CodeBench MIPS 2016.05" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + depends on BR2_mips_32r2 || BR2_mips_64r2 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_MIPS_NABI32 + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + help + Sourcery CodeBench toolchain for the MIPS architecture, from + Mentor Graphics. It uses gcc 5.3, binutils 2.25.51, glibc + 2.23, uClibc 0.9.30 and gdb 7.10.50, kernel headers 4.4.1. It + has support for the following variants: + - MIPS32r2 - Big-Endian, 2008 NaN, O32 + Select MIPS (big endian) core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mnan=2008 + - MIPS32r2 - Big-Endian, O32 + Select MIPS (big endian) core + Disable BR2_SOFT_FLOAT + - MIPS32r2 - Big-Endian, O32, MIPS16 + Select MIPS (big endian) core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32r2 - Big-Endian, Soft-Float, O32 + Select MIPS (big endian) core + Select BR2_SOFT_FLOAT + - MIPS32r2 - Big-Endian, Soft-Float, O32, MIPS16 + Select MIPS (big endian) core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32r2 - Little-Endian, 2008 NaN, O32 + Select MIPS (little endian) core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mnan=2008 + - MIPS32r2 - Little-Endian, O32 + Select MIPS (little endian) core + Disable BR2_SOFT_FLOAT + - MIPS32r2 - Little-Endian, O32, MIPS16 + Select MIPS (little endian) core + Disable BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32r2 - Little-Endian, Soft-Float, O32 + Select MIPS (little endian) core + Select BR2_SOFT_FLOAT + - MIPS32r2 - Little-Endian, Soft-Float, O32, MIPS16 + Select MIPS (little endian) core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mips16 + - MIPS32r2 - Little-Endian, Soft-Float, O32, microMIPS + Select MIPS (little endian) core + Select BR2_SOFT_FLOAT + Set BR2_TARGET_OPTIMIZATION to -mmicromips + - MIPS32r2 - uClibc, Big-Endian, 2008 NaN, O32 + Not usable in Buildroot yet. + - MIPS32r2 - uClibc, Big-Endian, O32 + Not usable in Buildroot yet. + - MIPS32r2 - uClibc, Big-Endian, Soft-Float, O32 + Not usable in Buildroot yet. + - MIPS32r2 - uClibc, Little-Endian, 2008 NaN, O32 + Not usable in Buildroot yet. + - MIPS32r2 - uClibc, Little-Endian, O32 + Not usable in Buildroot yet. + - MIPS32r2 - uClibc, Little-Endian, Soft-Float, O32 + Not usable in Buildroot yet. + - MIPS64r2 - Big-Endian, N64 + Select MIPS64 (big endian) core + Select the n64 ABI + Disable BR2_SOFT_FLOAT + - MIPS64r2 - Big-Endian, Soft-Float, N64 + Select MIPS64 (big endian) core + Select the n64 ABI + Select BR2_SOFT_FLOAT + - MIPS64r2 - Little-Endian, N64 + Select MIPS64 (little endian) core + Select the n64 ABI + Disable BR2_SOFT_FLOAT + - MIPS64r2 - Little-Endian, Soft-Float, N64 + Select MIPS64 (little endian) core + Select the n64 ABI + Select BR2_SOFT_FLOAT + +comment "Sourcery CodeBench toolchains are only available for MIPS/MIPS64 o32 and n64" + depends on BR2_MIPS_NABI32 + depends on !BR2_STATIC_LIBS + +config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS + bool "Codescape IMG GNU Linux Toolchain 2015.10" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_mips_32r6 || (BR2_mips_64r6 && !BR2_MIPS_SOFT_FLOAT) + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Codescape IMG GNU Linux Toolchain 2015.10 for the MIPS + architecture, from Imagination Technologies. It uses gcc + 4.9.2, binutils 2.24.90, glibc 2.20, gdb 7.9.1 and kernel + headers 4.0. It has support for the following variants: + - MIPS32r6 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Disable 'Use soft-float' + - MIPS32r6 - Big-Endian, Soft-Float, 2008 NaN, o32 ABI + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Enable 'Use soft-float' + - MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Disable 'Use soft-float' + - MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Enable 'Use soft-float' + - MIPS32r6 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, microMIPS + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Disable 'Use soft-float' + Set BR2_TARGET_OPTIMIZATION to '-mmicromips' + - MIPS32r6 - Little-Endian, Soft-Float, 2008 NaN, o32 ABI, microMIPS + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r6' Target Architecture Variant + Enable 'Use soft-float' + Set BR2_TARGET_OPTIMIZATION to '-mmicromips' + - MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n32 ABI + Select 'MIPS64 (big endian)' Target Architecture + Select 'mips 64r6' Target Architecture Variant + Select 'n32' Target ABI + Disable 'Use soft-float' + - MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n32 ABI + Select 'MIPS64 (little endian)' Target Architecture + Select 'mips 64r6' Target Architecture Variant + Select 'n32' Target ABI + Disable 'Use soft-float' + - MIPS64r6 - Big-Endian, Hard-Float, 2008 NaN, n64 ABI + Select 'MIPS64 (big endian)' Target Architecture + Select 'mips 64r6' Target Architecture Variant + Select 'n64' Target ABI + Disable 'Use soft-float' + - MIPS64r6 - Little-Endian, Hard-Float, 2008 NaN, n64 ABI + Select 'MIPS64 (little endian)' Target Architecture + Select 'mips 64r6' Target Architecture Variant + Select 'n64' Target ABI + Disable 'Use soft-float' + +config BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS + bool "Codescape MTI GNU Linux Toolchain 2015.10" + depends on BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on BR2_mips_32r2 || (BR2_mips_64r2 && !BR2_MIPS_SOFT_FLOAT) + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Codescape MTI GNU Linux Toolchain 2015.10 for the MIPS + architecture, from Imagination Technologies. It uses gcc + 4.9.2, binutils 2.24.90, glibc 2.20, gdb 7.9.1 and kernel + headers 4.0. It has support for the following variants: + - MIPS32r2 - Big-Endian, Hard-Float, Legacy NaN, o32 ABI + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Disable 'Use soft-float' + - MIPS32r2 - Big-Endian, Hard-Float, 2008 NaN, o32 ABI + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Disable 'Use soft-float' + Set BR2_TARGET_OPTIMIZATION to '-mnan=2008' + - MIPS32r2 - Big-Endian, Soft-Float, Legacy NaN, o32 ABI + Select 'MIPS (big endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Enable 'Use soft-float' + - MIPS32r2 - Little-Endian, Hard-Float, Legacy NaN, o32 ABI + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Disable 'Use soft-float' + - MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Disable 'Use soft-float' + Set BR2_TARGET_OPTIMIZATION to '-mnan=2008' + - MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Enable 'Use soft-float' + - MIPS32r2 - Little-Endian, Hard-Float, 2008 NaN, o32 ABI, microMIPS + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Enable 'Use soft-float' + Set BR2_TARGET_OPTIMIZATION to '-mmicromips' + - MIPS32r2 - Little-Endian, Soft-Float, Legacy NaN, o32 ABI, microMIPS + Select 'MIPS (little endian)' Target Architecture + Select 'mips 32r2' Target Architecture Variant + Disable 'Use soft-float' + Set BR2_TARGET_OPTIMIZATION to '-mmicromips' + - MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n32 ABI + Select 'MIPS64 (big endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n32' Target ABI + Disable 'Use soft-float' + - MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n32 ABI + Select 'MIPS64 (little endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n32' Target ABI + Disable 'Use soft-float' + - MIPS64r2 - Big-Endian, Hard-Float, Legacy NaN, n64 ABI + Select 'MIPS64 (big endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n64' Target ABI + Disable 'Use soft-float' + - MIPS64r2 - Little-Endian, Hard-Float, Legacy NaN, n64 ABI + Select 'MIPS64 (little endian)' Target Architecture + Select 'mips 64r2' Target Architecture Variant + Select 'n64' Target ABI + Disable 'Use soft-float' + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII + bool "Sourcery CodeBench Nios-II 2015.11" + depends on BR2_nios2 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + select BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19405 # based-on binutils-2.25.1 + help + Sourcery CodeBench toolchain for the Nios-II architecture, + from Mentor Graphics. It uses gcc 5.2, binutils 2.25.51, + glibc 2.22, gdb 7.10.50 and kernel headers 4.2. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH + bool "Sourcery CodeBench SH 2012.09" + depends on BR2_sh4a || BR2_sh4aeb + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + help + Sourcery CodeBench toolchain for the SuperH architecture, + from Mentor Graphics. It uses gcc 4.7.2, binutils 2.23.51, + glibc 2.16, uClibc 0.9.30, gdb 7.4.50 and kernel headers + 3.5.4. It has support for the following variants: + - SH4A, glibc, little endian + Default. + - SH4A, glibc, big endian + Add -mb to BR2_TARGET_OPTIMIZATION + - SH4A, uClibc, little endian + Not usable in Buildroot yet. + - SH4A, uClibc, big endian + Not usable in Buildroot yet. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64 + bool "Sourcery CodeBench AMD64 2015.11" + depends on BR2_x86_64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + depends on BR2_x86_jaguar || BR2_x86_steamroller + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + help + Sourcery CodeBench toolchain for the amd64 (x86_64) + architectures, from Mentor Graphics. It uses gcc 5.2, + binutils 2.25.51, glibc 2.22, gdb 7.10.50 and kernel headers + 4.2. It has support for the following variants: + - AMD Puma/Jaguar (family 16h), glibc + Default for x86_64, nothing special to do. + - AMD Steamroller (family 15h), glibc + Select a steamroller core. + No other architecture variants are supported since glibc + is optimized for one of these two baselines. + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86 + bool "Sourcery CodeBench x86/x86_64 2012.09" + depends on BR2_i386 || BR2_x86_64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + depends on !BR2_x86_jaguar + depends on !BR2_x86_steamroller + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + help + Sourcery CodeBench toolchain for the x86/x86_64 + architectures, from Mentor Graphics. It uses gcc 4.7.2, + binutils 2.23.51, glibc 2.16, gdb 7.4.50 and kernel headers + 3.5.4. It has support for the following variants: + - Intel Pentium 4, glibc, 32 bits + Default for x86, nothing special to do. + - Intel Atom, glibc, 32 bits + Select an Atom core + - Intel Xeon, glibc, 64 bits + Default for x86_64, nothing special to do. + - Intel Core 2, glibc, 64 bits + Select a Core 2 core + Other architecture variants (beyond Pentium-4/Xeon) are + supported as well, but glibc is not optimised for it. + +config BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX + bool "Blackfin.uclinux.org 2014R1" + depends on BR2_bfin + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_USE_WCHAR + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 + help + Toolchain for the Blackfin architecture, from + http://blackfin.uclinux.org. + +# See note about Linaro ARM/ARMEB toolchains, above. +config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 + bool "Linaro AArch64 14.09" + depends on BR2_aarch64 + depends on BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Toolchain for the AArch64 architecture, from + http://www.linaro.org/engineering/armv8/ + +# See note about Linaro ARM/ARMEB toolchains, above. +config BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 + bool "Linaro AArch64 2016.02" + depends on BR2_aarch64 + depends on BR2_HOSTARCH = "x86_64" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + help + Toolchain for the AArch64 architecture, from + http://www.linaro.org/engineering/armv8/ + +config BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 + bool "CodeSourcery AArch64 2014.11" + depends on BR2_aarch64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + select BR2_TOOLCHAIN_HAS_SSP + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + help + Sourcery CodeBench toolchain for the AArch64 architecture, + from Mentor Graphics. It uses gcc 4.9.1, binutils + 2.24.51.20140217, glibc 2.20, gdb 7.7.50 and kernel headers + 3.16.2. + +config BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS + bool "Musl 1.1.12 toolchain (experimental)" + depends on (BR2_arm && BR2_ARM_EABI) || \ + (BR2_arm && BR2_ARM_EABIHF && !BR2_ARM_CPU_ARMV4) || \ + (BR2_armeb && BR2_ARM_EABI) || BR2_i386 || \ + (BR2_mips && !BR2_SOFT_FLOAT) || \ + BR2_mipsel || (BR2_powerpc && BR2_powerpc_CLASSIC) || \ + BR2_sh4 || BR2_sh4eb || \ + BR2_x86_64 + depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86" + # Unsupported for MIPS R6 + depends on !BR2_mips_32r6 && !BR2_mips_64r6 + select BR2_TOOLCHAIN_EXTERNAL_MUSL + select BR2_TOOLCHAIN_HAS_SSP + select BR2_INSTALL_LIBSTDCPP + select BR2_HOSTARCH_NEEDS_IA32_LIBS + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + help + Toolchain based on the Musl C library, provided by the + musl-cross project. It uses gcc 5.3, binutils 2.25.1 and + musl 1.1.12. It does not have a cross debugger included. + + The ARM soft-float toolchain is built for ARMv4t, while the + ARM hard-float toolchain is built for ARMv5t. + The x86 toolchain is built for i486. + + http://musl.codu.org/ + +config BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC + bool "Synopsys ARC 2014.12 toolchain" + depends on BR2_arc + depends on BR2_HOSTARCH = "x86_64" + # does not provide IPv6, and lacks many uClibc features + # expected by Buildroot. The next Synopsys toolchain version + # should fix those problems. + depends on BROKEN + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + select BR2_INSTALL_LIBSTDCPP + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + select BR2_ENABLE_LOCALE + select BR2_USE_WCHAR + select BR2_TOOLCHAIN_HAS_THREADS + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + help + Toolchain for the ARC cores, from + https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases + +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM + bool "Custom toolchain" + help + Use this option to use a custom toolchain pre-installed on + your system. + +endchoice + +choice + prompt "Toolchain origin" + # Keep compatibility with old defconfig files that are using + # custom toolchains, and which are therefore assuming that + # "preinstalled" in the default choice. + default BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED if BR2_TOOLCHAIN_EXTERNAL_CUSTOM + +config BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + bool "Toolchain to be downloaded and installed" + help + Select this option if you want Buildroot to download and install the + toolchain. If you have selected a custom toolchain, specify the URL + in BR2_TOOLCHAIN_EXTERNAL_URL. + +config BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED + bool "Pre-installed toolchain" + help + Select this option if you want to use a pre-installed toolchain. + Specify the path to this toolchain in BR2_TOOLCHAIN_EXTERNAL_PATH. + +endchoice + +config BR2_TOOLCHAIN_EXTERNAL_PATH + string "Toolchain path" + default "/path/to/toolchain/usr" + depends on BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED + help + Path to where the external toolchain is installed. + +config BR2_TOOLCHAIN_EXTERNAL_URL + string "Toolchain URL" + depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM && BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD + help + URL of the custom toolchain tarball to download and install. + +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX + string "Toolchain prefix" + depends on BR2_TOOLCHAIN_EXTERNAL_CUSTOM + default "$(ARCH)-linux" + +config BR2_TOOLCHAIN_EXTERNAL_PREFIX + string + default "arc-linux" if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arcle + default "arceb-linux" if BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC && BR2_arceb + default "arm-linux-gnueabihf" if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM + default "armeb-linux-gnueabihf" if BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB + default "arm-none-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM + default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A + default "arm-arago-linux-gnueabi" if BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE + default "aarch64-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64 + default "aarch64-amd-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64 + default "mips-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS + default "nios2-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII + default "sh-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH + default "i686-pc-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86 + default "x86_64-amd-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64 + default "bfin-uclinux" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX && BR2_BINFMT_FLAT + default "bfin-linux-uclibc" if BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX && BR2_BINFMT_FDPIC + default "arm-linux-musleabi" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABI + default "arm-linux-musleabihf" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_arm && BR2_ARM_EABIHF + default "mips-img-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS + default "mips-mti-linux-gnu" if BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS + default "armeb-linux-musleabi" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_armeb + default "i486-linux-musl" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_i386 + default "mips-linux-musl" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && (BR2_mips && !BR2_SOFT_FLOAT) + default "mipsel-linux-musl" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && (BR2_mipsel && !BR2_SOFT_FLOAT) + default "mipsel-sf-linux-musl" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && (BR2_mipsel && BR2_SOFT_FLOAT) + default "powerpc-linux-musl" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_powerpc + default "sh4-linux-musl" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_sh4 + default "sh4eb-linux-musl" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_sh4eb + default "x86_64-linux-musl" if BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS && BR2_x86_64 + default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX \ + if BR2_TOOLCHAIN_EXTERNAL_CUSTOM + +config BR2_TOOLCHAIN_EXTERNAL_GLIBC + bool + select BR2_TOOLCHAIN_USES_GLIBC + +config BR2_TOOLCHAIN_EXTERNAL_UCLIBC + bool + select BR2_TOOLCHAIN_USES_UCLIBC + +config BR2_TOOLCHAIN_EXTERNAL_MUSL + bool + select BR2_TOOLCHAIN_USES_MUSL + select BR2_PACKAGE_NETBSD_QUEUE + +if BR2_TOOLCHAIN_EXTERNAL_CUSTOM + +choice + bool "External toolchain gcc version" + default BR2_TOOLCHAIN_EXTERNAL_GCC_4_3 + help + Set to the gcc version that is used by your external + toolchain. + +config BR2_TOOLCHAIN_EXTERNAL_GCC_6 + bool "6.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_6 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_5 + bool "5.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_5 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_9 + bool "4.9.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_8 + bool "4.8.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_7 + bool "4.7.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_7 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_6 + bool "4.6.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_6 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_5 + bool "4.5.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_5 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_4 + bool "4.4.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_4 + +config BR2_TOOLCHAIN_EXTERNAL_GCC_4_3 + bool "4.3.x" + select BR2_TOOLCHAIN_GCC_AT_LEAST_4_3 + +endchoice + +choice + bool "External toolchain kernel headers series" + default BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD + help + Set to the kernel headers version that were used to build + this external toolchain. + + This is used to hide/show some packages that have strict + requirements on the version of kernel headers. + + If unsure what version your toolchain is using, you can look + at the value of LINUX_VERSION_CODE in linux/version.h in your + toolchain. The Linux version is M.m.p, with: + M = ( LINUX_VERSION_CODE >> 16 ) & 0xFF + m = ( LINUX_VERSION_CODE >> 8 ) & 0xFF + p = ( LINUX_VERSION_CODE >> 0 ) & 0xFF + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_5 + bool "4.5.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_5 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4 + bool "4.4.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_4 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_3 + bool "4.3.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_3 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_2 + bool "4.2.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_2 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_1 + bool "4.1.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_1 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_0 + bool "4.0.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_0 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_19 + bool "3.19.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_19 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_18 + bool "3.18.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_18 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_17 + bool "3.17.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_16 + bool "3.16.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_16 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_15 + bool "3.15.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_15 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14 + bool "3.14.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_14 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_13 + bool "3.13.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_12 + bool "3.12.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_11 + bool "3.11.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_11 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_10 + bool "3.10.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_10 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_9 + bool "3.9.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_9 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_8 + bool "3.8.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_7 + bool "3.7.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_6 + bool "3.6.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_6 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_5 + bool "3.5.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_5 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_4 + bool "3.4.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_3 + bool "3.3.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_3 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_2 + bool "3.2.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_2 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_1 + bool "3.1.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_1 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_0 + bool "3.0.x" + select BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_0 + +config BR2_TOOLCHAIN_EXTERNAL_HEADERS_REALLY_OLD + bool "2.6.x" + +endchoice + +choice + prompt "External toolchain C library" + default BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC + +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC + bool "uClibc" + select BR2_TOOLCHAIN_EXTERNAL_UCLIBC + # For the time being, we assume that all custom external + # toolchains have shadow password support. + select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS + help + Select this option if your external toolchain uses the + uClibc C library (available from http://www.uclibc.org/). + +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC + bool "glibc/eglibc" + depends on !BR2_STATIC_LIBS + select BR2_TOOLCHAIN_EXTERNAL_GLIBC + help + Select this option if your external toolchain uses the GNU C + library (available from https://www.gnu.org/software/libc/) + or its variant the eglibc library (http://www.eglibc.org/). + + Note: eglibc is a variant of glibc that (among other things) + can be configured to exclude some of its features. Using a + toolchain with eglibc configured to exclude key features may + cause build failures to some packages. + +comment "(e)glibc only available with shared lib support" + depends on BR2_STATIC_LIBS + +config BR2_TOOLCHAIN_EXTERNAL_CUSTOM_MUSL + bool "musl (experimental)" + select BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Select this option if your external toolchain uses the + 'musl' C library, available from http://www.musl-libc.org/. + +endchoice + +if BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC + +config BR2_TOOLCHAIN_EXTERNAL_WCHAR + bool "Toolchain has WCHAR support?" + select BR2_USE_WCHAR + help + Select this option if your external toolchain supports + WCHAR. If you don't know, leave the default value, Buildroot + will tell you if it's correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_LOCALE + bool "Toolchain has locale support?" + select BR2_TOOLCHAIN_EXTERNAL_WCHAR + select BR2_ENABLE_LOCALE + help + Select this option if your external toolchain has locale + support. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS + bool "Toolchain has threads support?" + select BR2_TOOLCHAIN_HAS_THREADS + default y + help + Select this option if your external toolchain has thread + support. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + +if BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS + +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG + bool "Toolchain has threads debugging support?" + select BR2_TOOLCHAIN_HAS_THREADS_DEBUG + default y + help + Select this option if your external toolchain has thread + debugging support. If you don't know, leave the default + value, Buildroot will tell you if it's correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_NPTL + bool "Toolchain has NPTL threads support?" + select BR2_TOOLCHAIN_HAS_THREADS_NPTL + default y + help + Select this option if your external toolchain uses the NPTL + (Native Posix Thread Library) implementation of Posix + threads. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + +endif # BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS + +endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM_UCLIBC + +config BR2_TOOLCHAIN_EXTERNAL_HAS_SSP + bool "Toolchain has SSP support?" + select BR2_TOOLCHAIN_HAS_SSP + default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC + default y if BR2_TOOLCHAIN_EXTERNAL_MUSL + help + Selection this option if your external toolchain has Stack + Smashing Protection support enabled. If you don't know, + leave the default value, Buildroot will tell you if it's + correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_INET_RPC + bool "Toolchain has RPC support?" + select BR2_TOOLCHAIN_HAS_NATIVE_RPC + depends on !BR2_TOOLCHAIN_EXTERNAL_MUSL + default y if BR2_TOOLCHAIN_EXTERNAL_GLIBC + help + Select this option if your external toolchain supports + RPC. If you don't know, leave the default value, Buildroot + will tell you if it's correct or not. + +config BR2_TOOLCHAIN_EXTERNAL_CXX + bool "Toolchain has C++ support?" + select BR2_INSTALL_LIBSTDCPP + help + Select this option if your external toolchain has C++ + support. If you don't know, leave the default value, + Buildroot will tell you if it's correct or not. + +config BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS + string "Extra toolchain libraries to be copied to target" + help + If your external toolchain provides extra libraries that + need to be copied to the target filesystem, enter them + here, separated by spaces. + +endif # BR2_TOOLCHAIN_EXTERNAL_CUSTOM + +config BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY + bool "Copy gdb server to the Target" + depends on BR2_TOOLCHAIN_EXTERNAL + help + Copy the gdbserver provided by the external toolchain to the + target. + +# When the FDPIC shared binary format is used, the corresponding libraries are +# always installed. When a different binary format is used, we offer the option +# of installing the FDPIC shared libraries. +config BR2_BFIN_INSTALL_FDPIC_SHARED + bool "Install FDPIC shared libraries" + depends on BR2_bfin && !BR2_BINFMT_FDPIC + help + The Linux kernel supports running both FDPIC and FLAT applications + concurrently if the binary format specific libraries are installed + properly. This option allows developer to install FDPIC libraries + into a buildroot rootfs image built with binary format that is not + FDPIC. + +# When the FLAT shared binary format is used, we force the installation +# of the corresponding libraries. When a different binary format is +# used, we offer the option of installing the FLAT shared libraries. +config BR2_BFIN_INSTALL_FLAT_SHARED + bool "Install FLAT shared libraries" if !BR2_BINFMT_FLAT_SHARED + depends on BR2_bfin + default y if BR2_BINFMT_FLAT_SHARED + help + The Linux kernel supports running both FDPIC and FLAT applications + concurrently if the binary format specific libraries are installed + properly. This option allows developer to install FLAT libraries + into a buildroot rootfs image built with binary format that is not + shared FLAT. + +endif # BR2_TOOLCHAIN_EXTERNAL diff --git a/toolchain/toolchain-external/toolchain-external.hash b/toolchain/toolchain-external/toolchain-external.hash new file mode 100644 index 0000000000..9be3c7a071 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external.hash @@ -0,0 +1,70 @@ +###################################### +# Next hashes are all locally computed + +# Blackfin toolchains from Analog Devices +sha256 e424e90d8481d942a40266d78d1488726561fed3ec38403094f98055e61889d0 blackfin-toolchain-2014R1-RC2.i386.tar.bz2 +sha256 c65b1b4b918d5185349d62a3b7bf43b4b21e1175c52598ec047ca56b3f11d857 blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2 + +# Mentor's Sourcery CodeBench Lite toolchains +# ARM +sha256 39ee0e789034334ecc89af94e838e3a4815400ac5ff980f808f466b04778532e arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 +sha256 e16a5b1e41d7ff1e74161f9405182001bc8d1360d89564e73911032e6966cc0d arm-2014.05-29-arm-none-linux-gnueabi.src.tar.bz2 +# NiosII +sha256 e43899fd950e5d06e90c2eb01527c626240b6b4a603cbbeb532fad9fb8ea58c3 sourceryg++-2015.11-130-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 c412375ba3f93bafc9225de22366fa5b3f4d073ef856cf19595237ddb0815e6d sourceryg++-2015.11-130-nios2-linux-gnu.src.tar.bz2 +# SuperH +sha256 59d6766fde244931aa52db01433d5acd051998762a931121c5fc109536a1a802 renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 e2e58c10e52395d5d35157e35f85233f713c6f9223a652dfc56194cfd2eed004 renesas-2012.09-61-sh-linux-gnu.src.tar.bz2 +# x86 +sha256 ea804cf02014369da52abc4f64e91e96bde2dd2230aca96109459013d4545458 ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2 +sha256 1a9519e415a1e6892c760bf21f7e98f3a633a9d1c5bb8781a96d338e4dd62717 ia32-2012.09-62-i686-pc-linux-gnu.src.tar.bz2 +# AMD64 +sha256 3c31206c8b9277f409ee00e4777ba82dfa6da2a4ca0926501cd5fb6bbd1b407e amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 0b673f5035f97d5d03c31272cddab0f117d39ad76a5ad2a3bc98c156571527de amd-2015.11-139-x86_64-amd-linux-gnu.src.tar.bz2 +# Aarch64 +sha256 405aada821146755c5f2df566375c2a682456d6b8451ee47b88cf1a52b093676 aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 3f50dd6ee433eb5b6992a1071b988e50379a738f54f58722bc60081613764716 aarch64-amd-2014.11-95-aarch64-amd-linux-gnu.src.tar.bz2 +# MIPS +sha256 d354447c4c5160439dafd5464fa3a0266dd41e79f973477238e4f0215a6b5397 mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +sha256 2658e55d5b71bba25d6f77e868e18b200ea5f75c8add7ed3a9266e716d9adfff mips-2016.05-8-mips-linux-gnu.src.tar.bz2 + +# ARM toolchains from Texas Instrument's Arago project +# There is one source file that covers both binary distributions. +sha256 f2febf3b3c565536461ad4405f1bcb835d75a6afb2a8bec958a1248cb4b81fc7 arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2 +sha256 254af7d02eb3bcc8345c78e131700bc995d65b68232caaed21150a5fd1456070 arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2 +sha256 25fbf0513ad7322b15cbaae964cafadcbb4c939f2708f57f40b8f9f2d601122b arago-toolchain-2011.09-sources.tar.bz2 + +# ARM and Aarch64 toolchains from Linaro +sha256 0cffac0caea0eb3c8bdddfa14be011ce366680f40aeddbefc7cf23cb6d4f1891 gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz +sha256 eafeb3a5247e9ce31aa35d812e296fba5d5f1443e106d9bef9e38d3ee3ade006 gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_src.tar.bz2 +sha256 dd66f07662e1f3b555eaa0d076f133b6db702ab0b9ab18f7dfc91a23eab653c5 gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz +sha256 4bc9d86390f8fa67a693ba4768ba5b12faaf7dd37c706c05ccd9321e765226e4 gcc-linaro-armeb-linux-gnueabihf-4.9-2014.09_linux.tar.xz +sha256 bf5d3111dad5aa9aef0e955875fb7fc9e918cb24519af7014dd67a9e581a49b1 gcc-linaro-armeb-linux-gnueabihf-4.9-2014.09_src.tar.bz2 +sha256 f488caf46680b0c0a16b66b43fbfd157e3d6389df18e957983132e89529a9804 gcc-linaro-5.3-2016.02-x86_64_armeb-linux-gnueabihf.tar.xz +sha256 3954f496ab01de67241109e82abfaa9b7625fdab4f05e79e7902e9814a07b832 gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz +sha256 a7b8f842fdc9d9be22ca4e0c999429780fc6f16ea798b032421b5ec0cfa53b3e gcc-linaro-aarch64-linux-gnu-4.9-2014.09_src.tar.bz2 +sha256 1c85af550bedd378be583317b4abbdc96342b42c19fb19873c13d3093ff694ad gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu.tar.xz + +# Codescape toolchains from Imagination Technologies +# From: http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.10-04/ +sha256 9222d7b08b908ce0d5fa80a3623f8c51251be51af02629600b89693f09f566c8 Codescape.GNU.Tools.Package.2015.10-04.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz +sha256 6eca906933424146e2059641a2ec85f1b163c1a3942a31c39472aba5a3f116be Codescape.GNU.Tools.Package.2015.10-04.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz + +# Synopsys DesignWare ARC toolchains +sha256 1fa4ea2c8616623205f1c7beca02ea31b019099528a7433e5b020b0876b93bf3 arc_gnu_2014.12_prebuilt_uclibc_le_arc700_linux_install.tar.gz +sha256 1080f07fcae2bfc176a3ea8d30b9ed8eaecab70fb786639d6ec70cae8322df10 arc_gnu_2014.12_prebuilt_uclibc_be_arc700_linux_install.tar.gz +sha256 aaaf6facd1f60a3cd2a537154ea39cd7d70501c175e30e01a97e8df6cb8226c7 arc_gnu_2014.12_prebuilt_uclibc_le_archs_linux_install.tar.gz +sha256 30711c5f15762764d4cd5ec1e6ced5b1fddd03aac41c424b0c4ec8a45d5d79cd arc_gnu_2014.12_prebuilt_uclibc_be_archs_linux_install.tar.gz + +# Prebuilt musl toolchains from musl-cross +sha256 e32c23d0b83639fc10ad06666ec086b66453b9be44415fe1a818c3c3b526dfb1 crossx86-armeb-linux-musleabi-1.1.12.tar.xz +sha256 eb81bd5d6ada454c6e854b18bfa8dc801333782152166f6cab9fb7cd11692987 crossx86-arm-linux-musleabi-1.1.12.tar.xz +sha256 a050da284ff22d291ae71dfc249ebdedb18334b8d626804760ce7d5963e392e6 crossx86-arm-linux-musleabihf-1.1.12.tar.xz +sha256 18d07f5c8f4cfe373461cf21cf7b1bfefa820a37e96a69b68e0f315d528b4286 crossx86-i486-linux-musl-1.1.12.tar.xz +sha256 1c1480c2618097e402fe804c1431fbd49b0d43520af81d4c1a695a2fa13a3922 crossx86-mipsel-linux-musl-1.1.12.tar.xz +sha256 f0a8b3eb0566138ab3cc77bc09648be15bc325da974ec98b9e67f2fb82be3295 crossx86-mipsel-sf-linux-musl-1.1.12.tar.xz +sha256 6a99989c3dff56776981f6760b2c54dcb9e4032be1d649968bb06c04f2e64177 crossx86-mips-linux-musl-1.1.12.tar.xz +sha256 c082adc3e8b0750bb22ca82628524fd525fd77f534517ac5a66e7ac5a297ee6e crossx86-powerpc-linux-musl-1.1.12.tar.xz +sha256 8c6c9ebb54040e47947b4d3af6823d01fef2bb6ee81b18903c801030c066092b crossx86-sh4eb-linux-musl-1.1.12.tar.xz +sha256 ae9a0a5a60226aa086a56628cfd5c1d283c9dffdca37891d7e6adc2bd21ac2e0 crossx86-sh4-linux-musl-1.1.12.tar.xz +sha256 27e0ea1043a58aebeadf1dacd67e47fd0b5c19fc36f42c9374e5fa3308df09c6 crossx86-x86_64-linux-musl-1.1.12.tar.xz diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk new file mode 100644 index 0000000000..47b951dfa7 --- /dev/null +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -0,0 +1,793 @@ +################################################################################ +# +# toolchain-external +# +################################################################################ + +# +# This package implements the support for external toolchains, i.e +# toolchains that are available pre-built, ready to use. Such toolchain +# may either be readily available on the Web (Linaro, Sourcery +# CodeBench, from processor vendors) or may be built with tools like +# Crosstool-NG or Buildroot itself. So far, we have tested this +# with: +# +# * Toolchains generated by Crosstool-NG +# * Toolchains generated by Buildroot +# * Toolchains provided by Linaro for the ARM and AArch64 +# architectures +# * Sourcery CodeBench toolchains (from Mentor Graphics) for the ARM, +# MIPS, PowerPC, x86, x86_64 and NIOS 2 architectures. For the MIPS +# toolchain, the -muclibc variant isn't supported yet, only the +# default glibc-based variant is. +# * Analog Devices toolchains for the Blackfin architecture +# * Xilinx toolchains for the Microblaze architecture +# * Synopsys DesignWare toolchains for ARC cores +# +# The basic principle is the following +# +# 1. If the toolchain is not pre-installed, download and extract it +# in $(TOOLCHAIN_EXTERNAL_INSTALL_DIR). Otherwise, +# $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) points to were the toolchain has +# already been installed by the user. +# +# 2. For all external toolchains, perform some checks on the +# conformity between the toolchain configuration described in the +# Buildroot menuconfig system, and the real configuration of the +# external toolchain. This is for example important to make sure that +# the Buildroot configuration system knows whether the toolchain +# supports RPC, IPv6, locales, large files, etc. Unfortunately, these +# things cannot be detected automatically, since the value of these +# options (such as BR2_TOOLCHAIN_HAS_NATIVE_RPC) are needed at +# configuration time because these options are used as dependencies +# for other options. And at configuration time, we are not able to +# retrieve the external toolchain configuration. +# +# 3. Copy the libraries needed at runtime to the target directory, +# $(TARGET_DIR). Obviously, things such as the C library, the dynamic +# loader and a few other utility libraries are needed if dynamic +# applications are to be executed on the target system. +# +# 4. Copy the libraries and headers to the staging directory. This +# will allow all further calls to gcc to be made using --sysroot +# $(STAGING_DIR), which greatly simplifies the compilation of the +# packages when using external toolchains. So in the end, only the +# cross-compiler binaries remains external, all libraries and headers +# are imported into the Buildroot tree. +# +# 5. Build a toolchain wrapper which executes the external toolchain +# with a number of arguments (sysroot/march/mtune/..) hardcoded, +# so we're sure the correct configuration is always used and the +# toolchain behaves similar to an internal toolchain. +# This toolchain wrapper and symlinks are installed into +# $(HOST_DIR)/usr/bin like for the internal toolchains, and the rest +# of Buildroot is handled identical for the 2 toolchain types. + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y) +TOOLCHAIN_EXTERNAL_LIBS += libatomic.so.* libc.so.* libcrypt.so.* libdl.so.* libgcc_s.so.* libm.so.* libnsl.so.* libresolv.so.* librt.so.* libutil.so.* +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_ARM_EABIHF),yy) +TOOLCHAIN_EXTERNAL_LIBS += ld-linux-armhf.so.* +else +TOOLCHAIN_EXTERNAL_LIBS += ld*.so.* +endif +ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y) +TOOLCHAIN_EXTERNAL_LIBS += libpthread.so.* +ifneq ($(BR2_PACKAGE_GDB)$(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),) +TOOLCHAIN_EXTERNAL_LIBS += libthread_db.so.* +endif # gdbserver +endif # ! no threads +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC),y) +TOOLCHAIN_EXTERNAL_LIBS += libnss_files.so.* libnss_dns.so.* +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y) +TOOLCHAIN_EXTERNAL_LIBS += libc.so libgcc_s.so.* +endif + +ifeq ($(BR2_INSTALL_LIBSTDCPP),y) +TOOLCHAIN_EXTERNAL_LIBS += libstdc++.so.* +endif + +TOOLCHAIN_EXTERNAL_LIBS += $(call qstrip,$(BR2_TOOLCHAIN_EXTRA_EXTERNAL_LIBS)) + +# Details about sysroot directory selection. +# +# To find the sysroot directory, we use the trick of looking for the +# 'libc.a' file with the -print-file-name gcc option, and then +# mangling the path to find the base directory of the sysroot. +# +# Note that we do not use the -print-sysroot option, because it is +# only available since gcc 4.4.x, and we only recently dropped support +# for 4.2.x and 4.3.x. +# +# When doing this, we don't pass any option to gcc that could select a +# multilib variant (such as -march) as we want the "main" sysroot, +# which contains all variants of the C library in the case of multilib +# toolchains. We use the TARGET_CC_NO_SYSROOT variable, which is the +# path of the cross-compiler, without the --sysroot=$(STAGING_DIR), +# since what we want to find is the location of the original toolchain +# sysroot. This "main" sysroot directory is stored in SYSROOT_DIR. +# +# Then, multilib toolchains are a little bit more complicated, since +# they in fact have multiple sysroots, one for each variant supported +# by the toolchain. So we need to find the particular sysroot we're +# interested in. +# +# To do so, we ask the compiler where its sysroot is by passing all +# flags (including -march and al.), except the --sysroot flag since we +# want to the compiler to tell us where its original sysroot +# is. ARCH_SUBDIR will contain the subdirectory, in the main +# SYSROOT_DIR, that corresponds to the selected architecture +# variant. ARCH_SYSROOT_DIR will contain the full path to this +# location. +# +# One might wonder why we don't just bother with ARCH_SYSROOT_DIR. The +# fact is that in multilib toolchains, the header files are often only +# present in the main sysroot, and only the libraries are available in +# each variant-specific sysroot directory. + + +TOOLCHAIN_EXTERNAL_PREFIX = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PREFIX)) +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD),y) +TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(HOST_DIR)/opt/ext-toolchain +else +TOOLCHAIN_EXTERNAL_INSTALL_DIR = $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_PATH)) +endif + +ifeq ($(TOOLCHAIN_EXTERNAL_INSTALL_DIR),) +ifneq ($(TOOLCHAIN_EXTERNAL_PREFIX),) +# if no path set, figure it out from path +TOOLCHAIN_EXTERNAL_BIN := $(shell dirname $(shell which $(TOOLCHAIN_EXTERNAL_PREFIX)-gcc)) +endif +else +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX),y) +TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/$(TOOLCHAIN_EXTERNAL_PREFIX)/bin +else +TOOLCHAIN_EXTERNAL_BIN := $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/bin +endif +endif + +# If this is a buildroot toolchain, it already has a wrapper which we want to +# bypass. Since this is only evaluated after it has been extracted, we can use +# $(wildcard ...) here. +TOOLCHAIN_EXTERNAL_SUFFIX = \ + $(if $(wildcard $(TOOLCHAIN_EXTERNAL_BIN)/*.br_real),.br_real) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \ + -DBR_CROSS_PATH_SUFFIX='"$(TOOLCHAIN_EXTERNAL_SUFFIX)"' + +TOOLCHAIN_EXTERNAL_CROSS = $(TOOLCHAIN_EXTERNAL_BIN)/$(TOOLCHAIN_EXTERNAL_PREFIX)- +TOOLCHAIN_EXTERNAL_CC = $(TOOLCHAIN_EXTERNAL_CROSS)gcc$(TOOLCHAIN_EXTERNAL_SUFFIX) +TOOLCHAIN_EXTERNAL_CXX = $(TOOLCHAIN_EXTERNAL_CROSS)g++$(TOOLCHAIN_EXTERNAL_SUFFIX) +TOOLCHAIN_EXTERNAL_READELF = $(TOOLCHAIN_EXTERNAL_CROSS)readelf$(TOOLCHAIN_EXTERNAL_SUFFIX) + +ifeq ($(filter $(HOST_DIR)/%,$(TOOLCHAIN_EXTERNAL_BIN)),) +# TOOLCHAIN_EXTERNAL_BIN points outside HOST_DIR => absolute path +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \ + -DBR_CROSS_PATH_ABS='"$(TOOLCHAIN_EXTERNAL_BIN)"' +else +# TOOLCHAIN_EXTERNAL_BIN points inside HOST_DIR => relative path +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += \ + -DBR_CROSS_PATH_REL='"$(TOOLCHAIN_EXTERNAL_BIN:$(HOST_DIR)/%=%)"' +endif + +ifeq ($(call qstrip,$(BR2_GCC_TARGET_CPU_REVISION)),) +CC_TARGET_CPU_ := $(call qstrip,$(BR2_GCC_TARGET_CPU)) +else +CC_TARGET_CPU_ := $(call qstrip,$(BR2_GCC_TARGET_CPU)-$(BR2_GCC_TARGET_CPU_REVISION)) +endif +CC_TARGET_ARCH_ := $(call qstrip,$(BR2_GCC_TARGET_ARCH)) +CC_TARGET_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_ABI)) +CC_TARGET_FPU_ := $(call qstrip,$(BR2_GCC_TARGET_FPU)) +CC_TARGET_FLOAT_ABI_ := $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI)) +CC_TARGET_MODE_ := $(call qstrip,$(BR2_GCC_TARGET_MODE)) + +# march/mtune/floating point mode needs to be passed to the external toolchain +# to select the right multilib variant +ifeq ($(BR2_x86_64),y) +TOOLCHAIN_EXTERNAL_CFLAGS += -m64 +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_64 +endif +ifneq ($(CC_TARGET_ARCH_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -march=$(CC_TARGET_ARCH_) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ARCH='"$(CC_TARGET_ARCH_)"' +endif +ifneq ($(CC_TARGET_CPU_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mcpu=$(CC_TARGET_CPU_) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_CPU='"$(CC_TARGET_CPU_)"' +endif +ifneq ($(CC_TARGET_ABI_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mabi=$(CC_TARGET_ABI_) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ABI='"$(CC_TARGET_ABI_)"' +endif +ifneq ($(CC_TARGET_FPU_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mfpu=$(CC_TARGET_FPU_) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FPU='"$(CC_TARGET_FPU_)"' +endif +ifneq ($(CC_TARGET_FLOAT_ABI_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -mfloat-abi=$(CC_TARGET_FLOAT_ABI_) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_FLOAT_ABI='"$(CC_TARGET_FLOAT_ABI_)"' +endif +ifneq ($(CC_TARGET_MODE_),) +TOOLCHAIN_EXTERNAL_CFLAGS += -m$(CC_TARGET_MODE_) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_MODE='"$(CC_TARGET_MODE_)"' +endif +ifeq ($(BR2_BINFMT_FLAT),y) +TOOLCHAIN_EXTERNAL_CFLAGS += -Wl,-elf2flt +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_BINFMT_FLAT +endif +ifeq ($(BR2_mipsel)$(BR2_mips64el),y) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_MIPS_TARGET_LITTLE_ENDIAN +TOOLCHAIN_EXTERNAL_CFLAGS += -EL +endif +ifeq ($(BR2_mips)$(BR2_mips64),y) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_MIPS_TARGET_BIG_ENDIAN +TOOLCHAIN_EXTERNAL_CFLAGS += -EB +endif +ifeq ($(BR2_arceb),y) +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_ARC_TARGET_BIG_ENDIAN +TOOLCHAIN_EXTERNAL_CFLAGS += -EB +endif + +TOOLCHAIN_EXTERNAL_CFLAGS += $(call qstrip,$(BR2_TARGET_OPTIMIZATION)) + +ifeq ($(BR2_SOFT_FLOAT),y) +TOOLCHAIN_EXTERNAL_CFLAGS += -msoft-float +TOOLCHAIN_EXTERNAL_TOOLCHAIN_WRAPPER_ARGS += -DBR_SOFTFLOAT=1 +endif + +# musl does not provide a sys/queue.h implementation, so add the +# netbsd-queue package that will install a sys/queue.h file in the +# staging directory based on the NetBSD implementation. +ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +TOOLCHAIN_EXTERNAL_DEPENDENCIES += netbsd-queue +endif + +# The Linaro ARMhf toolchain expects the libraries in +# {/usr,}/lib/arm-linux-gnueabihf, but Buildroot copies them to +# {/usr,}/lib, so we need to create a symbolic link. +define TOOLCHAIN_EXTERNAL_LINARO_ARMHF_SYMLINK + ln -snf . $(TARGET_DIR)/lib/arm-linux-gnueabihf + ln -snf . $(TARGET_DIR)/usr/lib/arm-linux-gnueabihf +endef + +define TOOLCHAIN_EXTERNAL_LINARO_ARMEBHF_SYMLINK + ln -snf . $(TARGET_DIR)/lib/armeb-linux-gnueabihf + ln -snf . $(TARGET_DIR)/usr/lib/armeb-linux-gnueabihf +endef + +define TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SYMLINK + ln -snf . $(TARGET_DIR)/lib/aarch64-linux-gnu + ln -snf . $(TARGET_DIR)/usr/lib/aarch64-linux-gnu +endef + +# Special fixup for Codescape MIPS toolchains, that have bin- and +# sbin- directories. We create symlinks bin -> bin- and sbin +# -> sbin- so that the rest of Buildroot can find the toolchain +# tools in the appropriate location. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS)$(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y) +ifeq ($(BR2_MIPS_OABI32),y) +TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = o32 +else ifeq ($(BR2_MIPS_NABI32),y) +TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = n32 +else ifeq ($(BR2_MIPS_NABI64),y) +TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX = n64 +endif + +define TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS + rmdir $(STAGING_DIR)/usr/bin $(STAGING_DIR)/usr/sbin + ln -sf bin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/bin + ln -sf sbin-$(TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_BIN_DIR_SUFFIX) $(STAGING_DIR)/usr/sbin +endef +endif + +# Special handling for Blackfin toolchain, because of the split in two +# tarballs, and the organization of tarball contents. The tarballs +# contain ./opt/uClinux/{bfin-uclinux,bfin-linux-uclibc} directories, +# which themselves contain the toolchain. This is why we strip more +# components than usual. +define TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT + $(call suitable-extractor,$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS)) $(DL_DIR)/$(TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS) | \ + $(TAR) --strip-components=3 --hard-dereference -C $(@D) $(TAR_OPTIONS) - +endef + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_ARM),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/arm-none-linux-gnueabi +TOOLCHAIN_EXTERNAL_SOURCE = arm-2014.05-29-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV7A),y) +TOOLCHAIN_EXTERNAL_SITE = http://software-dl.ti.com/sdoemb/sdoemb_public_sw/arago_toolchain/2011_09/exports +TOOLCHAIN_EXTERNAL_SOURCE = arago-2011.09-armv7a-linux-gnueabi-sdk.tar.bz2 +TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = arago-toolchain-2011.09-sources.tar.bz2 +define TOOLCHAIN_EXTERNAL_FIXUP_CMDS + mv $(@D)/arago-2011.09/armv7a/* $(@D)/ + rm -rf $(@D)/arago-2011.09/ +endef +TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_ARAGO_ARMV5TE),y) +TOOLCHAIN_EXTERNAL_SITE = http://software-dl.ti.com/sdoemb/sdoemb_public_sw/arago_toolchain/2011_09/exports +TOOLCHAIN_EXTERNAL_SOURCE = arago-2011.09-armv5te-linux-gnueabi-sdk.tar.bz2 +TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = arago-toolchain-2011.09-sources.tar.bz2 +define TOOLCHAIN_EXTERNAL_FIXUP_CMDS + mv $(@D)/arago-2011.09/armv5te/* $(@D)/ + rm -rf $(@D)/arago-2011.09/ +endef +TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_FIXUP_CMDS +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARM),y) +ifeq ($(HOSTARCH),x86) +TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/14.09/components/toolchain/binaries +TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz +TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_src.tar.bz2 +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_LINARO_ARMHF_SYMLINK +else +TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/arm-linux-gnueabihf +TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3-2016.02-x86_64_arm-linux-gnueabihf.tar.xz +endif +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_ARMEB),y) +ifeq ($(HOSTARCH),x86) +TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/14.09/components/toolchain/binaries +TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-armeb-linux-gnueabihf-4.9-2014.09_linux.tar.xz +TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = gcc-linaro-armeb-linux-gnueabihf-4.9-2014.09_src.tar.bz2 +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_LINARO_ARMEBHF_SYMLINK +else +TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/armeb-linux-gnueabihf +TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3-2016.02-x86_64_armeb-linux-gnueabihf.tar.xz +endif +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/mips-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = mips-2016.05-8-mips-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/nios2-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = sourceryg++-2015.11-130-nios2-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_SH),y) +TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/sh-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = renesas-2012.09-61-sh-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86),y) +TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/i686-pc-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = ia32-2012.09-62-i686-pc-linux-gnu-i386-linux.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AMD64),y) +TOOLCHAIN_EXTERNAL_SITE = https://sourcery.mentor.com/public/gnu_toolchain/x86_64-amd-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = amd-2015.11-139-x86_64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_IMG_MIPS),y) +TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.10-04 +TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.10-04.for.MIPS.IMG.Linux.CentOS-5.x86.tar.gz +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS +TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESCAPE_MTI_MIPS),y) +TOOLCHAIN_EXTERNAL_SITE = http://codescape-mips-sdk.imgtec.com/components/toolchain/2015.10-04 +TOOLCHAIN_EXTERNAL_SOURCE = Codescape.GNU.Tools.Package.2015.10-04.for.MIPS.MTI.Linux.CentOS-5.x86.tar.gz +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESCAPE_MIPS_STAGING_FIXUPS +TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 2 +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_BLACKFIN_UCLINUX),y) +TOOLCHAIN_EXTERNAL_SITE = http://downloads.sourceforge.net/project/adi-toolchain/2014R1/2014R1-RC2/i386 +TOOLCHAIN_EXTERNAL_SOURCE = blackfin-toolchain-2014R1-RC2.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_EXTRA_DOWNLOADS = blackfin-toolchain-uclibc-full-2014R1-RC2.i386.tar.bz2 +TOOLCHAIN_EXTERNAL_STRIP_COMPONENTS = 3 +TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += TOOLCHAIN_EXTERNAL_BLACKFIN_UCLIBC_EXTRA_EXTRACT +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_LINARO_AARCH64),y) +ifeq ($(HOSTARCH),x86) +TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/14.09/components/toolchain/binaries +TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz +TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL = gcc-linaro-aarch64-linux-gnu-4.9-2014.09_src.tar.bz2 +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_LINARO_AARCH64_SYMLINK +else +TOOLCHAIN_EXTERNAL_SITE = https://releases.linaro.org/components/toolchain/binaries/5.3-2016.02/aarch64-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu.tar.xz +endif +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64),y) +TOOLCHAIN_EXTERNAL_SITE = http://sourcery.mentor.com/public/gnu_toolchain/aarch64-amd-linux-gnu +TOOLCHAIN_EXTERNAL_SOURCE = aarch64-amd-2014.11-95-aarch64-amd-linux-gnu-i686-pc-linux-gnu.tar.bz2 +define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP + ln -sf ld-2.20.so $(STAGING_DIR)/lib/ld-linux-aarch64.so.1 +endef +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_STAGING_FIXUP +define TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP + ln -sf ld-2.20.so $(TARGET_DIR)/lib/ld-linux-aarch64.so.1 +endef +TOOLCHAIN_EXTERNAL_POST_INSTALL_TARGET_HOOKS += TOOLCHAIN_EXTERNAL_CODESOURCERY_AARCH64_TARGET_FIXUP +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL_CROSS),y) +TOOLCHAIN_EXTERNAL_VERSION = 1.1.12 +TOOLCHAIN_EXTERNAL_SITE = https://googledrive.com/host/0BwnS5DMB0YQ6bDhPZkpOYVFhbk0/musl-$(TOOLCHAIN_EXTERNAL_VERSION) +ifeq ($(BR2_arm)$(BR2_ARM_EABI),yy) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-arm-linux-musleabi-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz +else ifeq ($(BR2_arm)$(BR2_ARM_EABIHF),yy) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-arm-linux-musleabihf-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz +else ifeq ($(BR2_armeb),y) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-armeb-linux-musleabi-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz +else ifeq ($(BR2_i386),y) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-i486-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz +else ifeq ($(BR2_mips),y) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mips-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz +else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mipsel-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz +else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:y) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-mipsel-sf-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz +else ifeq ($(BR2_powerpc),y) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-powerpc-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz +else ifeq ($(BR2_sh4),y) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-sh4-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz +else ifeq ($(BR2_sh4eb),y) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-sh4eb-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz +else ifeq ($(BR2_x86_64),y) +TOOLCHAIN_EXTERNAL_SOURCE = crossx86-x86_64-linux-musl-$(TOOLCHAIN_EXTERNAL_VERSION).tar.xz +endif +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_SYNOPSYS_ARC),y) +TOOLCHAIN_EXTERNAL_SITE = https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2014.12 +ifeq ($(BR2_arc750d)$(BR2_arc770d),y) +TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE = arc700 +else +TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE = archs +endif +ifeq ($(BR2_arcle),y) +TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS = le +else +TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS = be +endif +TOOLCHAIN_EXTERNAL_SOURCE = arc_gnu_2014.12_prebuilt_uclibc_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_ENDIANESS)_$(TOOLCHAIN_EXTERNAL_SYNOPSYS_CORE)_linux_install.tar.gz +else +# Custom toolchain +TOOLCHAIN_EXTERNAL_SITE = $(patsubst %/,%,$(dir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL)))) +TOOLCHAIN_EXTERNAL_SOURCE = $(notdir $(call qstrip,$(BR2_TOOLCHAIN_EXTERNAL_URL))) +# We can't check hashes for custom downloaded toolchains +BR_NO_CHECK_HASH_FOR += $(TOOLCHAIN_EXTERNAL_SOURCE) +endif + +# Some toolchain vendors have a regular file naming pattern. +# For them, mass-define _ACTUAL_SOURCE_TARBALL based _SITE. +ifneq ($(findstring sourcery.mentor.com/public/gnu_toolchain,$(TOOLCHAIN_EXTERNAL_SITE)),) +TOOLCHAIN_EXTERNAL_ACTUAL_SOURCE_TARBALL ?= \ + $(subst -i686-pc-linux-gnu.tar.bz2,.src.tar.bz2,$(subst -i686-pc-linux-gnu-i386-linux.tar.bz2,-i686-pc-linux-gnu.src.tar.bz2,$(TOOLCHAIN_EXTERNAL_SOURCE))) +endif + +# In fact, we don't need to download the toolchain, since it is already +# available on the system, so force the site and source to be empty so +# that nothing will be downloaded/extracted. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_PREINSTALLED),y) +TOOLCHAIN_EXTERNAL_SITE = +TOOLCHAIN_EXTERNAL_SOURCE = +endif + +TOOLCHAIN_EXTERNAL_ADD_TOOLCHAIN_DEPENDENCY = NO + +TOOLCHAIN_EXTERNAL_INSTALL_STAGING = YES + +# Normal handling of downloaded toolchain tarball extraction. +ifneq ($(TOOLCHAIN_EXTERNAL_SOURCE),) +TOOLCHAIN_EXTERNAL_EXCLUDES = usr/lib/locale/* + +# As a regular package, the toolchain gets extracted in $(@D), but +# since it's actually a fairly special package, we need it to be moved +# into TOOLCHAIN_EXTERNAL_INSTALL_DIR. +define TOOLCHAIN_EXTERNAL_MOVE + rm -rf $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/* + mkdir -p $(TOOLCHAIN_EXTERNAL_INSTALL_DIR) + mv $(@D)/* $(TOOLCHAIN_EXTERNAL_INSTALL_DIR)/ +endef +TOOLCHAIN_EXTERNAL_POST_EXTRACT_HOOKS += \ + TOOLCHAIN_EXTERNAL_MOVE +endif + +# Returns the location of the libc.a file for the given compiler + flags +define toolchain_find_libc_a +$$(readlink -f $$(LANG=C $(1) -print-file-name=libc.a)) +endef + +# Returns the sysroot location for the given compiler + flags. We need +# to handle cases where libc.a is in: +# +# - lib/ +# - usr/lib/ +# - lib32/ +# - lib64/ +# - lib32-fp/ (Cavium toolchain) +# - lib64-fp/ (Cavium toolchain) +# - usr/lib// (Linaro toolchain) +# +# And variations on these. +define toolchain_find_sysroot +$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::') +endef + +# Returns the lib subdirectory for the given compiler + flags (i.e +# typically lib32 or lib64 for some toolchains) +define toolchain_find_libdir +$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?)/([^/]*/)?libc.a:\2:') +endef + +# Checks for an already installed toolchain: check the toolchain +# location, check that it is usable, and then verify that it +# matches the configuration provided in Buildroot: ABI, C++ support, +# kernel headers version, type of C library and all C library features. +define TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS + $(Q)$(call check_cross_compiler_exists,$(TOOLCHAIN_EXTERNAL_CC)) + $(Q)$(call check_unusable_toolchain,$(TOOLCHAIN_EXTERNAL_CC)) + $(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \ + $(call check_kernel_headers_version,\ + $(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC)),\ + $(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))); \ + $(call check_gcc_version,$(TOOLCHAIN_EXTERNAL_CC),\ + $(call qstrip,$(BR2_TOOLCHAIN_GCC_AT_LEAST))); \ + if test "$(BR2_arm)" = "y" ; then \ + $(call check_arm_abi,\ + "$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS)",\ + $(TOOLCHAIN_EXTERNAL_READELF)) ; \ + fi ; \ + if test "$(BR2_INSTALL_LIBSTDCPP)" = "y" ; then \ + $(call check_cplusplus,$(TOOLCHAIN_EXTERNAL_CXX)) ; \ + fi ; \ + if test "$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)" = "y" ; then \ + $(call check_uclibc,$${SYSROOT_DIR}) ; \ + elif test "$(BR2_TOOLCHAIN_EXTERNAL_MUSL)" = "y" ; then \ + $(call check_musl,$${SYSROOT_DIR}) ; \ + else \ + $(call check_glibc,$${SYSROOT_DIR}) ; \ + fi + $(Q)$(call check_toolchain_ssp,$(TOOLCHAIN_EXTERNAL_CC)) +endef + +# With the musl C library, the libc.so library directly plays the role +# of the dynamic library loader. We just need to create a symbolic +# link to libc.so with the appropriate name. +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_MUSL),y) +ifeq ($(BR2_i386),y) +MUSL_ARCH = i386 +else ifeq ($(BR2_ARM_EABIHF),y) +MUSL_ARCH = armhf +else ifeq ($(BR2_mipsel):$(BR2_SOFT_FLOAT),y:y) +MUSL_ARCH = mipsel-sf +else ifeq ($(BR2_sh),y) +MUSL_ARCH = sh +else +MUSL_ARCH = $(ARCH) +endif +define TOOLCHAIN_EXTERNAL_MUSL_LD_LINK + ln -sf libc.so $(TARGET_DIR)/lib/ld-musl-$(MUSL_ARCH).so.1 +endef +TOOLCHAIN_EXTERNAL_POST_INSTALL_STAGING_HOOKS += TOOLCHAIN_EXTERNAL_MUSL_LD_LINK +endif + +# Create a symlink from (usr/)$(ARCH_LIB_DIR) to lib. +# Note: the skeleton package additionally creates lib32->lib or lib64->lib +# (as appropriate) +# +# $1: destination directory (TARGET_DIR / STAGING_DIR) +create_lib_symlinks = \ + $(Q)DESTDIR="$(strip $1)" ; \ + ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + if [ ! -e "$${DESTDIR}/$${ARCH_LIB_DIR}" -a ! -e "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ]; then \ + ln -snf lib "$${DESTDIR}/$${ARCH_LIB_DIR}" ; \ + ln -snf lib "$${DESTDIR}/usr/$${ARCH_LIB_DIR}" ; \ + fi + +define TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK + $(call create_lib_symlinks,$(STAGING_DIR)) +endef + +define TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK + $(call create_lib_symlinks,$(TARGET_DIR)) +endef + +# Integration of the toolchain into Buildroot: find the main sysroot +# and the variant-specific sysroot, then copy the needed libraries to +# the $(TARGET_DIR) and copy the whole sysroot (libraries and headers) +# to $(STAGING_DIR). +# +# Variables are defined as follows: +# +# LIBC_A_LOCATION: location of the libc.a file in the default +# multilib variant (allows to find the main +# sysroot directory) +# Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/usr/lib/libc.a +# +# SYSROOT_DIR: the main sysroot directory, deduced from +# LIBC_A_LOCATION by removing the +# usr/lib[32|64]/libc.a part of the path. +# Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/ +# +# ARCH_LIBC_A_LOCATION: location of the libc.a file in the selected +# multilib variant (taking into account the +# CFLAGS). Allows to find the sysroot of the +# selected multilib variant. +# Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/mips16/soft-float/el/usr/lib/libc.a +# +# ARCH_SYSROOT_DIR: the sysroot of the selected multilib variant, +# deduced from ARCH_LIBC_A_LOCATION by removing +# usr/lib[32|64]/libc.a at the end of the path. +# Ex: /x-tools/mips-2011.03/mips-linux-gnu/libc/mips16/soft-float/el/ +# +# ARCH_LIB_DIR: 'lib', 'lib32' or 'lib64' depending on where libraries +# are stored. Deduced from ARCH_LIBC_A_LOCATION by +# looking at usr/lib??/libc.a. +# Ex: lib +# +# ARCH_SUBDIR: the relative location of the sysroot of the selected +# multilib variant compared to the main sysroot. +# Ex: mips16/soft-float/el +# +# SUPPORT_LIB_DIR: some toolchains, such as recent Linaro toolchains, +# store GCC support libraries (libstdc++, +# libgcc_s, etc.) outside of the sysroot. In +# this case, SUPPORT_LIB_DIR is set to a +# non-empty value, and points to the directory +# where these support libraries are +# available. Those libraries will be copied to +# our sysroot, and the directory will also be +# considered when searching libraries for copy +# to the target filesystem. +# +# Please be very careful to check the major toolchain sources: +# Buildroot, Crosstool-NG, CodeSourcery and Linaro +# before doing any modification on the below logic. + +ifeq ($(BR2_STATIC_LIBS),) +define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS + $(Q)$(call MESSAGE,"Copying external toolchain libraries to target...") + $(Q)for libs in $(TOOLCHAIN_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$$libs); \ + done +endef +endif + +ifeq ($(BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY),y) +define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER + $(Q)$(call MESSAGE,"Copying gdbserver") + $(Q)ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + gdbserver_found=0 ; \ + for d in $${ARCH_SYSROOT_DIR}/usr \ + $${ARCH_SYSROOT_DIR}/../debug-root/usr \ + $${ARCH_SYSROOT_DIR}/usr/$${ARCH_LIB_DIR} \ + $(TOOLCHAIN_EXTERNAL_INSTALL_DIR); do \ + if test -f $${d}/bin/gdbserver ; then \ + install -m 0755 -D $${d}/bin/gdbserver $(TARGET_DIR)/usr/bin/gdbserver ; \ + gdbserver_found=1 ; \ + break ; \ + fi ; \ + done ; \ + if [ $${gdbserver_found} -eq 0 ] ; then \ + echo "Could not find gdbserver in external toolchain" ; \ + exit 1 ; \ + fi +endef +endif + +define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS + $(Q)SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC))" ; \ + ARCH_SYSROOT_DIR="$(call toolchain_find_sysroot,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + ARCH_LIB_DIR="$(call toolchain_find_libdir,$(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + SUPPORT_LIB_DIR="" ; \ + if test `find $${ARCH_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \ + LIBSTDCPP_A_LOCATION=$$(LANG=C $(TOOLCHAIN_EXTERNAL_CC) $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libstdc++.a) ; \ + if [ -e "$${LIBSTDCPP_A_LOCATION}" ]; then \ + SUPPORT_LIB_DIR=`readlink -f $${LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \ + fi ; \ + fi ; \ + ARCH_SUBDIR=`echo $${ARCH_SYSROOT_DIR} | sed -r -e "s:^$${SYSROOT_DIR}(.*)/$$:\1:"` ; \ + $(call MESSAGE,"Copying external toolchain sysroot to staging...") ; \ + $(call copy_toolchain_sysroot,$${SYSROOT_DIR},$${ARCH_SYSROOT_DIR},$${ARCH_SUBDIR},$${ARCH_LIB_DIR},$${SUPPORT_LIB_DIR}) +endef + +# Special installation target used on the Blackfin architecture when +# FDPIC is not the primary binary format being used, but the user has +# nonetheless requested the installation of the FDPIC libraries to the +# target filesystem. +ifeq ($(BR2_BFIN_INSTALL_FDPIC_SHARED),y) +define TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS_BFIN_FDPIC + $(Q)$(call MESSAGE,"Install external toolchain FDPIC libraries to staging...") + $(Q)FDPIC_EXTERNAL_CC=$(dir $(TOOLCHAIN_EXTERNAL_CC))/../../bfin-linux-uclibc/bin/bfin-linux-uclibc-gcc ; \ + FDPIC_SYSROOT_DIR="$(call toolchain_find_sysroot,$${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + FDPIC_LIB_DIR="$(call toolchain_find_libdir,$${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS))" ; \ + FDPIC_SUPPORT_LIB_DIR="" ; \ + if test `find $${FDPIC_SYSROOT_DIR} -name 'libstdc++.a' | wc -l` -eq 0 ; then \ + FDPIC_LIBSTDCPP_A_LOCATION=$$(LANG=C $${FDPIC_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS) -print-file-name=libstdc++.a) ; \ + if [ -e "$${FDPIC_LIBSTDCPP_A_LOCATION}" ]; then \ + FDPIC_SUPPORT_LIB_DIR=`readlink -f $${FDPIC_LIBSTDCPP_A_LOCATION} | sed -r -e 's:libstdc\+\+\.a::'` ; \ + fi ; \ + fi ; \ + $(call copy_toolchain_sysroot,$${FDPIC_SYSROOT_DIR},$${FDPIC_SYSROOT_DIR},,$${FDPIC_LIB_DIR},$${FDPIC_SUPPORT_LIB_DIR}) +endef +define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FDPIC + $(Q)$(call MESSAGE,"Install external toolchain FDPIC libraries to target...") + $(Q)for libs in $(TOOLCHAIN_EXTERNAL_LIBS); do \ + $(call copy_toolchain_lib_root,$$libs); \ + done +endef +endif + +# Special installation target used on the Blackfin architecture when +# shared FLAT is not the primary format being used, but the user has +# nonetheless requested the installation of the shared FLAT libraries +# to the target filesystem. The flat libraries are found and linked +# according to the index in name "libN.so". Index 1 is reserved for +# the standard C library. Customer libraries can use 4 and above. +ifeq ($(BR2_BFIN_INSTALL_FLAT_SHARED),y) +define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FLAT + $(Q)$(call MESSAGE,"Install external toolchain FLAT libraries to target...") + $(Q)FLAT_EXTERNAL_CC=$(dir $(TOOLCHAIN_EXTERNAL_CC))../../bfin-uclinux/bin/bfin-uclinux-gcc ; \ + FLAT_LIBC_A_LOCATION=`$${FLAT_EXTERNAL_CC} $(TOOLCHAIN_EXTERNAL_CFLAGS) -mid-shared-library -print-file-name=libc`; \ + if [ -f $${FLAT_LIBC_A_LOCATION} -a ! -h $${FLAT_LIBC_A_LOCATION} ] ; then \ + $(INSTALL) -D $${FLAT_LIBC_A_LOCATION} $(TARGET_DIR)/lib/lib1.so; \ + fi +endef +endif + +# Build toolchain wrapper for preprocessor, C and C++ compiler and setup +# symlinks for everything else. Skip gdb symlink when we are building our +# own gdb to prevent two gdb's in output/host/usr/bin. +# The LTO support in gcc creates wrappers for ar, ranlib and nm which load +# the lto plugin. These wrappers are called *-gcc-ar, *-gcc-ranlib, and +# *-gcc-nm and should be used instead of the real programs when -flto is +# used. However, we should not add the toolchain wrapper for them, and they +# match the *cc-* pattern. Therefore, an additional case is added for *-ar, +# *-ranlib and *-nm. +define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER + $(Q)cd $(HOST_DIR)/usr/bin; \ + for i in $(TOOLCHAIN_EXTERNAL_CROSS)*; do \ + base=$${i##*/}; \ + case "$$base" in \ + *-ar|*-ranlib|*-nm) \ + ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \ + ;; \ + *cc|*cc-*|*++|*++-*|*cpp) \ + ln -sf toolchain-wrapper $$base; \ + ;; \ + *gdb|*gdbtui) \ + if test "$(BR2_PACKAGE_HOST_GDB)" != "y"; then \ + ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \ + fi \ + ;; \ + *) \ + ln -sf $$(echo $$i | sed 's%^$(HOST_DIR)%../..%') .; \ + ;; \ + esac; \ + done +endef + +# +# Generate gdbinit file for use with Buildroot +# +define TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT + $(Q)if test -f $(TARGET_CROSS)gdb ; then \ + $(call MESSAGE,"Installing gdbinit"); \ + $(gen_gdbinit_file); \ + fi +endef + +# uClibc-ng dynamic loader is called ld-uClibc.so.1, but gcc is not +# patched specifically for uClibc-ng, so it continues to generate +# binaries that expect the dynamic loader to be named ld-uClibc.so.0, +# like with the original uClibc. Therefore, we create an additional +# symbolic link to make uClibc-ng systems work properly. +define TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO + $(Q)if test -e $(TARGET_DIR)/lib/ld-uClibc.so.1; then \ + ln -sf ld-uClibc.so.1 $(TARGET_DIR)/lib/ld-uClibc.so.0 ; \ + fi + $(Q)if test -e $(TARGET_DIR)/lib/ld64-uClibc.so.1; then \ + ln -sf ld64-uClibc.so.1 $(TARGET_DIR)/lib/ld64-uClibc.so.0 ; \ + fi +endef + +TOOLCHAIN_EXTERNAL_BUILD_CMDS = $(TOOLCHAIN_BUILD_WRAPPER) + +define TOOLCHAIN_EXTERNAL_INSTALL_STAGING_CMDS + $(TOOLCHAIN_EXTERNAL_CREATE_STAGING_LIB_SYMLINK) + $(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS) + $(TOOLCHAIN_EXTERNAL_INSTALL_SYSROOT_LIBS_BFIN_FDPIC) + $(TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER) + $(TOOLCHAIN_EXTERNAL_INSTALL_GDBINIT) +endef + +# Even though we're installing things in both the staging, the host +# and the target directory, we do everything within the +# install-staging step, arbitrarily. +define TOOLCHAIN_EXTERNAL_INSTALL_TARGET_CMDS + $(TOOLCHAIN_EXTERNAL_CREATE_TARGET_LIB_SYMLINK) + $(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_LIBS) + $(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_GDBSERVER) + $(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FDPIC) + $(TOOLCHAIN_EXTERNAL_INSTALL_TARGET_BFIN_FLAT) + $(TOOLCHAIN_EXTERNAL_FIXUP_UCLIBCNG_LDSO) +endef + +$(eval $(generic-package)) + diff --git a/toolchain/toolchain-wrapper.c b/toolchain/toolchain-wrapper.c new file mode 100644 index 0000000000..887058f699 --- /dev/null +++ b/toolchain/toolchain-wrapper.c @@ -0,0 +1,306 @@ +/** + * Buildroot wrapper for toolchains. This simply executes the real toolchain + * with a number of arguments (sysroot/arch/..) hardcoded, to ensure the + * toolchain uses the correct configuration. + * The hardcoded path arguments are defined relative to the actual location + * of the binary. + * + * (C) 2011 Peter Korsgaard + * (C) 2011 Daniel Nyström + * (C) 2012 Arnout Vandecappelle (Essensium/Mind) + * (C) 2013 Spenser Gilliland + * + * This file is licensed under the terms of the GNU General Public License + * version 2. This program is licensed "as is" without any warranty of any + * kind, whether express or implied. + */ + +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include + +#ifdef BR_CCACHE +static char ccache_path[PATH_MAX]; +#endif +static char path[PATH_MAX]; +static char sysroot[PATH_MAX]; + +/** + * GCC errors out with certain combinations of arguments (examples are + * -mfloat-abi={hard|soft} and -m{little|big}-endian), so we have to ensure + * that we only pass the predefined one to the real compiler if the inverse + * option isn't in the argument list. + * This specifies the worst case number of extra arguments we might pass + * Currently, we have: + * -mfloat-abi= + * -march= + * -mcpu= + */ +#define EXCLUSIVE_ARGS 3 + +static char *predef_args[] = { +#ifdef BR_CCACHE + ccache_path, +#endif + path, + "--sysroot", sysroot, +#ifdef BR_ABI + "-mabi=" BR_ABI, +#endif +#ifdef BR_FPU + "-mfpu=" BR_FPU, +#endif +#ifdef BR_SOFTFLOAT + "-msoft-float", +#endif /* BR_SOFTFLOAT */ +#ifdef BR_MODE + "-m" BR_MODE, +#endif +#ifdef BR_64 + "-m64", +#endif +#ifdef BR_OMIT_LOCK_PREFIX + "-Wa,-momit-lock-prefix=yes", +#endif +#ifdef BR_BINFMT_FLAT + "-Wl,-elf2flt", +#endif +#ifdef BR_MIPS_TARGET_LITTLE_ENDIAN + "-EL", +#endif +#if defined(BR_MIPS_TARGET_BIG_ENDIAN) || defined(BR_ARC_TARGET_BIG_ENDIAN) + "-EB", +#endif +#ifdef BR_ADDITIONAL_CFLAGS + BR_ADDITIONAL_CFLAGS +#endif +}; + +static void check_unsafe_path(const char *path, int paranoid) +{ + char **c; + static char *unsafe_paths[] = { + "/lib", "/usr/include", "/usr/lib", "/usr/local/include", "/usr/local/lib", NULL, + }; + + for (c = unsafe_paths; *c != NULL; c++) { + if (!strncmp(path, *c, strlen(*c))) { + fprintf(stderr, "%s: %s: unsafe header/library path used in cross-compilation: '%s'\n", + program_invocation_short_name, + paranoid ? "ERROR" : "WARNING", path); + if (paranoid) + exit(1); + continue; + } + } +} + +int main(int argc, char **argv) +{ + char **args, **cur, **exec_args; + char *relbasedir, *absbasedir; + char *progpath = argv[0]; + char *basename; + char *env_debug; + char *paranoid_wrapper; + int paranoid; + int ret, i, count = 0, debug; + + /* Calculate the relative paths */ + basename = strrchr(progpath, '/'); + if (basename) { + *basename = '\0'; + basename++; + relbasedir = malloc(strlen(progpath) + 7); + if (relbasedir == NULL) { + perror(__FILE__ ": malloc"); + return 2; + } + sprintf(relbasedir, "%s/../..", argv[0]); + absbasedir = realpath(relbasedir, NULL); + } else { + basename = progpath; + absbasedir = malloc(PATH_MAX + 1); + ret = readlink("/proc/self/exe", absbasedir, PATH_MAX); + if (ret < 0) { + perror(__FILE__ ": readlink"); + return 2; + } + absbasedir[ret] = '\0'; + for (i = ret; i > 0; i--) { + if (absbasedir[i] == '/') { + absbasedir[i] = '\0'; + if (++count == 3) + break; + } + } + } + if (absbasedir == NULL) { + perror(__FILE__ ": realpath"); + return 2; + } + + /* Fill in the relative paths */ +#ifdef BR_CROSS_PATH_REL + ret = snprintf(path, sizeof(path), "%s/" BR_CROSS_PATH_REL "/%s" BR_CROSS_PATH_SUFFIX, absbasedir, basename); +#elif defined(BR_CROSS_PATH_ABS) + ret = snprintf(path, sizeof(path), BR_CROSS_PATH_ABS "/%s" BR_CROSS_PATH_SUFFIX, basename); +#else + ret = snprintf(path, sizeof(path), "%s/usr/bin/%s" BR_CROSS_PATH_SUFFIX, absbasedir, basename); +#endif + if (ret >= sizeof(path)) { + perror(__FILE__ ": overflow"); + return 3; + } +#ifdef BR_CCACHE + ret = snprintf(ccache_path, sizeof(ccache_path), "%s/usr/bin/ccache", absbasedir); + if (ret >= sizeof(ccache_path)) { + perror(__FILE__ ": overflow"); + return 3; + } +#endif + ret = snprintf(sysroot, sizeof(sysroot), "%s/" BR_SYSROOT, absbasedir); + if (ret >= sizeof(sysroot)) { + perror(__FILE__ ": overflow"); + return 3; + } + + cur = args = malloc(sizeof(predef_args) + + (sizeof(char *) * (argc + EXCLUSIVE_ARGS))); + if (args == NULL) { + perror(__FILE__ ": malloc"); + return 2; + } + + /* start with predefined args */ + memcpy(cur, predef_args, sizeof(predef_args)); + cur += sizeof(predef_args) / sizeof(predef_args[0]); + +#ifdef BR_FLOAT_ABI + /* add float abi if not overridden in args */ + for (i = 1; i < argc; i++) { + if (!strncmp(argv[i], "-mfloat-abi=", strlen("-mfloat-abi=")) || + !strcmp(argv[i], "-msoft-float") || + !strcmp(argv[i], "-mhard-float")) + break; + } + + if (i == argc) + *cur++ = "-mfloat-abi=" BR_FLOAT_ABI; +#endif + +#if defined(BR_ARCH) || \ + defined(BR_CPU) + /* Add our -march/cpu flags, but only if none of + * -march/mtune/mcpu are already specified on the commandline + */ + for (i = 1; i < argc; i++) { + if (!strncmp(argv[i], "-march=", strlen("-march=")) || + !strncmp(argv[i], "-mtune=", strlen("-mtune=")) || + !strncmp(argv[i], "-mcpu=", strlen("-mcpu=" ))) + break; + } + if (i == argc) { +#ifdef BR_ARCH + *cur++ = "-march=" BR_ARCH; +#endif +#ifdef BR_CPU + *cur++ = "-mcpu=" BR_CPU; +#endif + } +#endif /* ARCH || CPU */ + + paranoid_wrapper = getenv("BR_COMPILER_PARANOID_UNSAFE_PATH"); + if (paranoid_wrapper && strlen(paranoid_wrapper) > 0) + paranoid = 1; + else + paranoid = 0; + + /* Check for unsafe library and header paths */ + for (i = 1; i < argc; i++) { + + /* Skip options that do not start with -I and -L */ + if (strncmp(argv[i], "-I", 2) && strncmp(argv[i], "-L", 2)) + continue; + + /* We handle two cases: first the case where -I/-L and + * the path are separated by one space and therefore + * visible as two separate options, and then the case + * where they are stuck together forming one single + * option. + */ + if (argv[i][2] == '\0') { + i++; + if (i == argc) + continue; + check_unsafe_path(argv[i], paranoid); + } else { + check_unsafe_path(argv[i] + 2, paranoid); + } + } + + /* append forward args */ + memcpy(cur, &argv[1], sizeof(char *) * (argc - 1)); + cur += argc - 1; + + /* finish with NULL termination */ + *cur = NULL; + + exec_args = args; +#ifdef BR_CCACHE + if (getenv("BR_NO_CCACHE")) + /* Skip the ccache call */ + exec_args++; +#endif + + /* Debug the wrapper to see actual arguments passed to + * the compiler: + * unset, empty, or 0: do not trace + * set to 1 : trace all arguments on a single line + * set to 2 : trace one argument per line + */ + if ((env_debug = getenv("BR2_DEBUG_WRAPPER"))) { + debug = atoi(env_debug); + if (debug > 0) { + fprintf(stderr, "Toolchain wrapper executing:"); +#ifdef BR_CCACHE_HASH + fprintf(stderr, "%sCCACHE_COMPILERCHECK='string:" BR_CCACHE_HASH "'", + (debug == 2) ? "\n " : " "); +#endif +#ifdef BR_CCACHE_BASEDIR + fprintf(stderr, "%sCCACHE_BASEDIR='" BR_CCACHE_BASEDIR "'", + (debug == 2) ? "\n " : " "); +#endif + for (i = 0; exec_args[i]; i++) + fprintf(stderr, "%s'%s'", + (debug == 2) ? "\n " : " ", exec_args[i]); + fprintf(stderr, "\n"); + } + } + +#ifdef BR_CCACHE_HASH + /* Allow compilercheck to be overridden through the environment */ + if (setenv("CCACHE_COMPILERCHECK", "string:" BR_CCACHE_HASH, 0)) { + perror(__FILE__ ": Failed to set CCACHE_COMPILERCHECK"); + return 3; + } +#endif +#ifdef BR_CCACHE_BASEDIR + /* Allow compilercheck to be overridden through the environment */ + if (setenv("CCACHE_BASEDIR", BR_CCACHE_BASEDIR, 0)) { + perror(__FILE__ ": Failed to set CCACHE_BASEDIR"); + return 3; + } +#endif + + if (execv(exec_args[0], exec_args)) + perror(path); + + free(args); + + return 2; +} diff --git a/toolchain/toolchain-wrapper.mk b/toolchain/toolchain-wrapper.mk new file mode 100644 index 0000000000..af39071cf3 --- /dev/null +++ b/toolchain/toolchain-wrapper.mk @@ -0,0 +1,40 @@ +# This file contains the definition of the toolchain wrapper build commands + +# We use --hash-style=both to increase the compatibility of the generated +# binary with older platforms, except for MIPS, where the only acceptable +# hash style is 'sysv' +ifeq ($(findstring mips,$(HOSTARCH)),mips) +TOOLCHAIN_WRAPPER_HASH_STYLE = sysv +else +TOOLCHAIN_WRAPPER_HASH_STYLE = both +endif + +TOOLCHAIN_WRAPPER_ARGS = $($(PKG)_TOOLCHAIN_WRAPPER_ARGS) +TOOLCHAIN_WRAPPER_ARGS += -DBR_SYSROOT='"$(STAGING_SUBDIR)"' + +# We create a list like '"-mfoo", "-mbar", "-mbarfoo"' so that each flag is a +# separate argument when used in execv() by the toolchain wrapper. +TOOLCHAIN_WRAPPER_OPTS = \ + $(foreach f,$(call qstrip,$(BR2_TARGET_OPTIMIZATION)),"$(f)"$(comma)) +TOOLCHAIN_WRAPPER_ARGS += -DBR_ADDITIONAL_CFLAGS='$(TOOLCHAIN_WRAPPER_OPTS)' + +ifeq ($(BR2_CCACHE),y) +TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE +endif + +ifeq ($(BR2_x86_x1000),y) +TOOLCHAIN_WRAPPER_ARGS += -DBR_OMIT_LOCK_PREFIX +endif + +ifeq ($(BR2_CCACHE_USE_BASEDIR),y) +TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_BASEDIR='"$(BASE_DIR)"' +endif + +# For simplicity, build directly into the install location +define TOOLCHAIN_BUILD_WRAPPER + $(Q)mkdir -p $(HOST_DIR)/usr/bin + $(HOSTCC) $(HOST_CFLAGS) $(TOOLCHAIN_WRAPPER_ARGS) \ + -s -Wl,--hash-style=$(TOOLCHAIN_WRAPPER_HASH_STYLE) \ + toolchain/toolchain-wrapper.c \ + -o $(HOST_DIR)/usr/bin/toolchain-wrapper +endef diff --git a/toolchain/toolchain.mk b/toolchain/toolchain.mk new file mode 100644 index 0000000000..0a35909334 --- /dev/null +++ b/toolchain/toolchain.mk @@ -0,0 +1,56 @@ +# This file contains toolchain-related customisation of the content +# of the target/ directory. Those customisations are added to the +# TARGET_FINALIZE_HOOKS, to be applied just after all packages +# have been built. + +# Install default nsswitch.conf file if the skeleton doesn't provide it +ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y) +define GLIBC_COPY_NSSWITCH_FILE + $(Q)if [ ! -f "$(TARGET_DIR)/etc/nsswitch.conf" ]; then \ + $(INSTALL) -D -m 0644 package/glibc/nsswitch.conf $(TARGET_DIR)/etc/nsswitch.conf ; \ + fi +endef +TARGET_FINALIZE_HOOKS += GLIBC_COPY_NSSWITCH_FILE +endif + +# Install the gconv modules +ifeq ($(BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_COPY),y) +GCONV_LIBS = $(call qstrip,$(BR2_TOOLCHAIN_GLIBC_GCONV_LIBS_LIST)) +define COPY_GCONV_LIBS + $(Q)found_gconv=no; \ + for d in $(TOOLCHAIN_EXTERNAL_PREFIX) ''; do \ + [ -d "$(STAGING_DIR)/usr/lib/$${d}/gconv" ] || continue; \ + found_gconv=yes; \ + break; \ + done; \ + if [ "$${found_gconv}" = "no" ]; then \ + printf "Unable to find gconv modules\n" >&2; \ + exit 1; \ + fi; \ + if [ -z "$(GCONV_LIBS)" ]; then \ + $(INSTALL) -m 0644 -D $(STAGING_DIR)/usr/lib/$${d}/gconv/gconv-modules \ + $(TARGET_DIR)/usr/lib/gconv/gconv-modules && \ + $(INSTALL) -m 0644 $(STAGING_DIR)/usr/lib/$${d}/gconv/*.so \ + $(TARGET_DIR)/usr/lib/gconv \ + || exit 1; \ + else \ + for l in $(GCONV_LIBS); do \ + $(INSTALL) -m 0644 -D $(STAGING_DIR)/usr/lib/$${d}/gconv/$${l}.so \ + $(TARGET_DIR)/usr/lib/gconv/$${l}.so \ + || exit 1; \ + $(TARGET_READELF) -d $(STAGING_DIR)/usr/lib/$${d}/gconv/$${l}.so |\ + sort -u |\ + sed -e '/.*(NEEDED).*\[\(.*\.so\)\]$$/!d; s//\1/;' |\ + while read lib; do \ + $(INSTALL) -m 0644 -D $(STAGING_DIR)/usr/lib/$${d}/gconv/$${lib} \ + $(TARGET_DIR)/usr/lib/gconv/$${lib} \ + || exit 1; \ + done; \ + done; \ + ./support/scripts/expunge-gconv-modules "$(GCONV_LIBS)" \ + <$(STAGING_DIR)/usr/lib/$${d}/gconv/gconv-modules \ + >$(TARGET_DIR)/usr/lib/gconv/gconv-modules; \ + fi +endef +TARGET_FINALIZE_HOOKS += COPY_GCONV_LIBS +endif diff --git a/toolchain/toolchain/toolchain.mk b/toolchain/toolchain/toolchain.mk new file mode 100644 index 0000000000..c22713bfe3 --- /dev/null +++ b/toolchain/toolchain/toolchain.mk @@ -0,0 +1,17 @@ +################################################################################ +# +# toolchain +# +################################################################################ + +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) +TOOLCHAIN_DEPENDENCIES += toolchain-buildroot +else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +TOOLCHAIN_DEPENDENCIES += toolchain-external +endif + +TOOLCHAIN_ADD_TOOLCHAIN_DEPENDENCY = NO + +$(eval $(virtual-package)) + +toolchain: $(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake diff --git a/writeimage.sh b/writeimage.sh new file mode 100755 index 0000000000..857b7ff22d --- /dev/null +++ b/writeimage.sh @@ -0,0 +1,161 @@ +#!/bin/bash -e + + +function usage() { + echo "Usage: $0 [options...]" 1>&2 + echo "" + echo "Available options:" + echo " <-i image_file> - indicates the path to the image file (e.g. -i /home/user/Download/file.img.gz)" + echo " <-d sdcard_dev> - indicates the path to the sdcard block device (e.g. -d /dev/mmcblk0)" + echo " [-m modem:apn:user:pwd:pin] - configures the mobile network modem (e.g. -m ttyUSB0:internet)" + echo " [-n ssid:psk] - sets the wireless network name and key (e.g. -n mynet:mykey1234)" + echo " [-s ip/cidr:gw:dns] - sets a static IP configuration instead of DHCP (e.g. -s 192.168.1.101/24:192.168.1.1:8.8.8.8)" + exit 1 +} + +if [ -z "$1" ]; then + usage +fi + +if [[ $(id -u) -ne 0 ]]; then echo "please run as root"; exit 1; fi + +function msg() { + echo ":: $1" +} + +while getopts "a:d:f:h:i:lm:n:o:p:s:w" o; do + case "$o" in + d) + SDCARD_DEV=$OPTARG + ;; + i) + DISK_IMG=$OPTARG + ;; + m) + IFS=":" SETTINGS=($OPTARG) + MODEM=${SETTINGS[0]} + APN=${SETTINGS[1]} + MUSER=${SETTINGS[2]} + MPWD=${SETTINGS[3]} + PIN=${SETTINGS[4]} + ;; + n) + IFS=":" NETWORK=($OPTARG) + SSID=${NETWORK[0]} + PSK=${NETWORK[1]} + ;; + s) + IFS=":" S_IP=($OPTARG) + IP=${S_IP[0]} + GW=${S_IP[1]} + DNS=${S_IP[2]} + ;; + *) + usage + ;; + esac +done + +if [ -z "$SDCARD_DEV" ] || [ -z "$DISK_IMG" ]; then + usage +fi + +function cleanup { + set +e + + # unmount sdcard + umount ${SDCARD_DEV}* >/dev/null 2>&1 +} + +trap cleanup EXIT + +BOOT=$(dirname $0)/.boot + +if ! [ -f $DISK_IMG ]; then + echo "could not find image file $DISK_IMG" + exit 1 +fi + +gunzip=$(which unpigz || which gunzip) + +if [[ $DISK_IMG == *.gz ]]; then + msg "decompressing the gzipped image" + $gunzip -c $DISK_IMG > ${DISK_IMG::-3} + DISK_IMG=${DISK_IMG::-3} +fi + +umount ${SDCARD_DEV}* 2>/dev/null || true +msg "writing disk image to sdcard" +dd if=$DISK_IMG of=$SDCARD_DEV bs=1048576 +sync + +if which partprobe > /dev/null 2>&1; then + msg "re-reading sdcard partition table" + partprobe ${SDCARD_DEV} +fi + +msg "mounting sdcard" +mkdir -p $BOOT + +if [ `uname` == "Darwin" ]; then + BOOT_DEV=${SDCARD_DEV}s1 # e.g. /dev/disk4s1 + diskutil unmountDisk ${SDCARD_DEV} + mount -ft msdos $BOOT_DEV $BOOT +else # assuming Linux + BOOT_DEV=${SDCARD_DEV}p1 # e.g. /dev/mmcblk0p1 + if ! [ -e ${SDCARD_DEV}p1 ]; then + BOOT_DEV=${SDCARD_DEV}1 # e.g. /dev/sdc1 + fi + mount $BOOT_DEV $BOOT +fi + +# wifi +if [ -n "$SSID" ]; then + msg "creating wireless configuration" + conf=$BOOT/wpa_supplicant.conf + echo "update_config=1" > $conf + echo "ctrl_interface=/var/run/wpa_supplicant" >> $conf + echo "network={" >> $conf + echo " scan_ssid=1" >> $conf + echo " ssid=\"$SSID\"" >> $conf + if [ -n "$PSK" ]; then + echo " psk=\"$PSK\"" >> $conf + fi + echo -e "}\n" >> $conf +fi + +# modem +if [ -n "$MODEM" ]; then + msg "creating mobile network configuration" + conf=$BOOT/ppp + mkdir -p $conf + echo $MODEM > $conf/modem + echo "AT+CGDCONT=1,\"IP\",\"$APN\"" > $conf/apn + echo > $conf/extra + echo > $conf/auth + echo > $conf/pin + if [ -n "$MUSER" ]; then + echo "user \"$MUSER\"" > $conf/auth + echo "password \"$MPWD\"" >> $conf/auth + fi + if [ -n "$PIN" ]; then + echo "AT+CPIN=$PIN" > $conf/pin + fi +fi + +# static ip +if [ -n "$IP" ] && [ -n "$GW" ] && [ -n "$DNS" ]; then + msg "setting static IP configuration" + conf=$BOOT/static_ip.conf + echo "static_ip=\"$IP\"" > $conf + echo "static_gw=\"$GW\"" >> $conf + echo "static_dns=\"$DNS\"" >> $conf +fi + +msg "unmounting sdcard" +sync +umount $BOOT +rmdir $BOOT + +msg "you can now remove the sdcard" +